diff --git a/FCL/src/main/assets/app_runtime/caciocavallo/cacio-androidnw-1.10-SNAPSHOT.jar b/FCL/src/main/assets/app_runtime/caciocavallo/cacio-androidnw-1.10-SNAPSHOT.jar index b4ddcd80..fa2db2a1 100644 Binary files a/FCL/src/main/assets/app_runtime/caciocavallo/cacio-androidnw-1.10-SNAPSHOT.jar and b/FCL/src/main/assets/app_runtime/caciocavallo/cacio-androidnw-1.10-SNAPSHOT.jar differ diff --git a/FCL/src/main/assets/app_runtime/caciocavallo/cacio-shared-1.10-SNAPSHOT.jar b/FCL/src/main/assets/app_runtime/caciocavallo/cacio-shared-1.10-SNAPSHOT.jar index 5a35b0fc..5171bec5 100644 Binary files a/FCL/src/main/assets/app_runtime/caciocavallo/cacio-shared-1.10-SNAPSHOT.jar and b/FCL/src/main/assets/app_runtime/caciocavallo/cacio-shared-1.10-SNAPSHOT.jar differ diff --git a/FCL/src/main/assets/app_runtime/caciocavallo/version b/FCL/src/main/assets/app_runtime/caciocavallo/version index 7813681f..62f94575 100644 --- a/FCL/src/main/assets/app_runtime/caciocavallo/version +++ b/FCL/src/main/assets/app_runtime/caciocavallo/version @@ -1 +1 @@ -5 \ No newline at end of file +6 \ No newline at end of file diff --git a/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-shared-1.18-SNAPSHOT.jar b/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-shared-1.18-SNAPSHOT.jar index f67bdd01..39d65c52 100644 Binary files a/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-shared-1.18-SNAPSHOT.jar and b/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-shared-1.18-SNAPSHOT.jar differ diff --git a/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-tta-1.18-SNAPSHOT.jar b/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-tta-1.18-SNAPSHOT.jar index 233c4885..59f113b1 100644 Binary files a/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-tta-1.18-SNAPSHOT.jar and b/FCL/src/main/assets/app_runtime/caciocavallo17/cacio-tta-1.18-SNAPSHOT.jar differ diff --git a/FCL/src/main/assets/app_runtime/caciocavallo17/version b/FCL/src/main/assets/app_runtime/caciocavallo17/version index d8263ee9..e440e5c8 100644 --- a/FCL/src/main/assets/app_runtime/caciocavallo17/version +++ b/FCL/src/main/assets/app_runtime/caciocavallo17/version @@ -1 +1 @@ -2 \ No newline at end of file +3 \ No newline at end of file diff --git a/FCL/src/main/assets/app_runtime/lwjgl/lwjgl.jar b/FCL/src/main/assets/app_runtime/lwjgl/lwjgl.jar index 0d1ff678..3d489aa4 100644 Binary files a/FCL/src/main/assets/app_runtime/lwjgl/lwjgl.jar and b/FCL/src/main/assets/app_runtime/lwjgl/lwjgl.jar differ diff --git a/FCL/src/main/assets/app_runtime/lwjgl/version b/FCL/src/main/assets/app_runtime/lwjgl/version index 60418407..1f8c5354 100644 --- a/FCL/src/main/assets/app_runtime/lwjgl/version +++ b/FCL/src/main/assets/app_runtime/lwjgl/version @@ -1 +1 @@ -1712051464002 \ No newline at end of file +1724317165115 \ No newline at end of file diff --git a/FCL/src/main/java/com/tungsten/fcl/activity/JVMActivity.java b/FCL/src/main/java/com/tungsten/fcl/activity/JVMActivity.java index 6488aa37..163e1a05 100644 --- a/FCL/src/main/java/com/tungsten/fcl/activity/JVMActivity.java +++ b/FCL/src/main/java/com/tungsten/fcl/activity/JVMActivity.java @@ -21,9 +21,12 @@ import com.tungsten.fcl.control.MenuType; import com.tungsten.fcl.setting.GameOption; import com.tungsten.fclauncher.bridge.FCLBridge; import com.tungsten.fclauncher.keycodes.FCLKeycodes; +import com.tungsten.fclauncher.keycodes.LwjglGlfwKeycode; import com.tungsten.fclcore.util.Logging; import com.tungsten.fcllibrary.component.FCLActivity; +import org.lwjgl.glfw.CallbackBridge; + import java.util.Objects; import java.util.logging.Level; @@ -108,7 +111,7 @@ public class JVMActivity extends FCLActivity implements TextureView.SurfaceTextu @Override public boolean onSurfaceTextureDestroyed(@NonNull SurfaceTexture surfaceTexture) { fclBridge.setSurfaceDestroyed(true); - return false; + return true; } private int output = 0; @@ -129,6 +132,7 @@ public class JVMActivity extends FCLActivity implements TextureView.SurfaceTextu if (menu != null) { menu.onPause(); } + CallbackBridge.nativeSetWindowAttrib(LwjglGlfwKeycode.GLFW_HOVERED, 0); super.onPause(); } @@ -137,9 +141,22 @@ public class JVMActivity extends FCLActivity implements TextureView.SurfaceTextu if (menu != null) { menu.onResume(); } + CallbackBridge.nativeSetWindowAttrib(LwjglGlfwKeycode.GLFW_HOVERED, 1); super.onResume(); } + @Override + protected void onStart() { + super.onStart(); + CallbackBridge.nativeSetWindowAttrib(LwjglGlfwKeycode.GLFW_VISIBLE, 1); + } + + @Override + protected void onStop() { + CallbackBridge.nativeSetWindowAttrib(LwjglGlfwKeycode.GLFW_VISIBLE, 0); + super.onStop(); + } + @Override public boolean dispatchKeyEvent(KeyEvent event) { boolean handleEvent = true; diff --git a/FCL/src/main/java/com/tungsten/fcl/control/FCLInput.java b/FCL/src/main/java/com/tungsten/fcl/control/FCLInput.java index 6305c2c0..5ae17199 100644 --- a/FCL/src/main/java/com/tungsten/fcl/control/FCLInput.java +++ b/FCL/src/main/java/com/tungsten/fcl/control/FCLInput.java @@ -47,8 +47,8 @@ public class FCLInput implements View.OnCapturedPointerListener, GamepadHandler public static final HashMap MOUSE_MAP = new HashMap() { { put(MOUSE_LEFT, FCLBridge.Button1); - put(MOUSE_MIDDLE, FCLBridge.Button2); - put(MOUSE_RIGHT, FCLBridge.Button3); + put(MOUSE_MIDDLE, FCLBridge.Button3); + put(MOUSE_RIGHT, FCLBridge.Button2); put(MOUSE_SCROLL_UP, FCLBridge.Button4); put(MOUSE_SCROLL_DOWN, FCLBridge.Button5); } diff --git a/FCL/src/main/java/com/tungsten/fcl/game/FCLGameLauncher.java b/FCL/src/main/java/com/tungsten/fcl/game/FCLGameLauncher.java index 59b5e00b..a28d9abb 100644 --- a/FCL/src/main/java/com/tungsten/fcl/game/FCLGameLauncher.java +++ b/FCL/src/main/java/com/tungsten/fcl/game/FCLGameLauncher.java @@ -172,7 +172,6 @@ public final class FCLGameLauncher extends DefaultLauncher { @Override public FCLBridge launch() throws IOException, InterruptedException { - FileUtils.deleteDirectoryQuietly(new File("/data/user_de/0/com.tungsten.fcl/code_cache")); generateOptionsTxt(); // Sodium modifyIfConfigDetected("sodium-mixins.properties", "", "mixin.features.chunk_rendering=false", false, FCLConfig.Renderer.RENDERER_GL4ES, FCLConfig.Renderer.RENDERER_VGPU); diff --git a/FCL/src/main/java/com/tungsten/fcl/game/LauncherHelper.java b/FCL/src/main/java/com/tungsten/fcl/game/LauncherHelper.java index 241b6e68..733e72fd 100644 --- a/FCL/src/main/java/com/tungsten/fcl/game/LauncherHelper.java +++ b/FCL/src/main/java/com/tungsten/fcl/game/LauncherHelper.java @@ -67,6 +67,8 @@ import com.tungsten.fcllibrary.component.dialog.FCLAlertDialog; import com.tungsten.fcllibrary.component.dialog.FCLDialog; import com.tungsten.fcllibrary.component.view.FCLButton; +import org.lwjgl.glfw.CallbackBridge; + import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; @@ -177,6 +179,7 @@ public final class LauncherHelper { }).thenComposeAsync(launcher -> { // launcher is prev task's result return Task.supplyAsync(launcher::launch); }).thenAcceptAsync(fclBridge -> Schedulers.androidUIThread().execute(() -> { + CallbackBridge.nativeSetUseInputStackQueue(version.get().getArguments().isPresent()); Intent intent = new Intent(context, JVMActivity.class); fclBridge.setScaleFactor(repository.getVersionSetting(selectedVersion).getScaleFactor()); fclBridge.setController(repository.getVersionSetting(selectedVersion).getController()); diff --git a/FCLCore/src/main/java/com/tungsten/fclcore/launch/DefaultLauncher.java b/FCLCore/src/main/java/com/tungsten/fclcore/launch/DefaultLauncher.java index b51e22bd..6a3ce4fb 100644 --- a/FCLCore/src/main/java/com/tungsten/fclcore/launch/DefaultLauncher.java +++ b/FCLCore/src/main/java/com/tungsten/fclcore/launch/DefaultLauncher.java @@ -145,9 +145,12 @@ public class DefaultLauncher extends Launcher { res.addDefault("-Dos.name=", "Linux"); res.addDefault("-Dos.version=Android-", Build.VERSION.RELEASE); res.addDefault("-Dorg.lwjgl.opengl.libname=", "${gl_lib_name}"); + res.addDefault("-Dorg.lwjgl.freetype.libname=", context.getApplicationInfo().nativeLibraryDir + "/libfreetype.so"); res.addDefault("-Dfml.earlyprogresswindow=", "false"); - res.addDefault("-Dwindow.width=", options.getWidth() + ""); - res.addDefault("-Dwindow.height=", options.getHeight() + ""); + res.addDefault("-Dglfwstub.windowWidth=", options.getWidth() + ""); + res.addDefault("-Dglfwstub.windowHeight=", options.getHeight() + ""); + res.addDefault("-Dglfwstub.initEgl=", "false"); + res.addDefault("-Dloader.disable_forked_guis=", "true"); res.addDefault("-Duser.home=", options.getGameDir().getAbsolutePath()); res.addDefault("-Duser.language=", System.getProperty("user.language")); res.addDefault("-Duser.timezone=", TimeZone.getDefault().getID()); diff --git a/FCLauncher/src/main/java/com/tungsten/fclauncher/CriticalNativeTest.java b/FCLauncher/src/main/java/com/tungsten/fclauncher/CriticalNativeTest.java new file mode 100644 index 00000000..bccd815f --- /dev/null +++ b/FCLauncher/src/main/java/com/tungsten/fclauncher/CriticalNativeTest.java @@ -0,0 +1,11 @@ +package com.tungsten.fclauncher; + +import dalvik.annotation.optimization.CriticalNative; + +public class CriticalNativeTest { + @CriticalNative + public static native void testCriticalNative(int arg0, int arg1); + public static void invokeTest() { + testCriticalNative(0, 0); + } +} diff --git a/FCLauncher/src/main/java/com/tungsten/fclauncher/FCLauncher.java b/FCLauncher/src/main/java/com/tungsten/fclauncher/FCLauncher.java index abd25096..f956f411 100644 --- a/FCLauncher/src/main/java/com/tungsten/fclauncher/FCLauncher.java +++ b/FCLauncher/src/main/java/com/tungsten/fclauncher/FCLauncher.java @@ -156,9 +156,11 @@ public class FCLauncher { envMap.put("HOME", config.getLogDir()); envMap.put("JAVA_HOME", config.getJavaPath()); envMap.put("FCL_NATIVEDIR", config.getContext().getApplicationInfo().nativeLibraryDir); + envMap.put("POJAV_NATIVEDIR", config.getContext().getApplicationInfo().nativeLibraryDir); envMap.put("TMPDIR", config.getContext().getCacheDir().getAbsolutePath()); envMap.put("PATH", config.getJavaPath() + "/bin:" + Os.getenv("PATH")); envMap.put("LD_LIBRARY_PATH", getLibraryPath(config.getContext())); + envMap.put("FORCE_VSYNC","false"); FFmpegPlugin.discover(config.getContext()); if (FFmpegPlugin.isAvailable) { envMap.put("PATH", FFmpegPlugin.libraryPath + ":" + envMap.get("PATH")); @@ -171,9 +173,6 @@ public class FCLauncher { private static void addRendererEnv(FCLConfig config, HashMap envMap) { FCLConfig.Renderer renderer = config.getRenderer() == null ? FCLConfig.Renderer.RENDERER_GL4ES : config.getRenderer(); - envMap.put("LIBGL_STRING", renderer.toString()); - envMap.put("LIBGL_NAME", renderer.getGlLibName()); - envMap.put("LIBEGL_NAME", renderer.getEglLibName()); if (renderer == FCLConfig.Renderer.RENDERER_GL4ES || renderer == FCLConfig.Renderer.RENDERER_VGPU) { envMap.put("LIBGL_ES", "2"); envMap.put("LIBGL_MIPMAP", "3"); @@ -181,8 +180,15 @@ public class FCLauncher { envMap.put("LIBGL_VSYNC", "1"); envMap.put("LIBGL_NOINTOVLHACK", "1"); envMap.put("LIBGL_NOERROR", "1"); + if (renderer == FCLConfig.Renderer.RENDERER_GL4ES) { + envMap.put("POJAV_RENDERER","opengles2"); + } else { + envMap.put("POJAV_RENDERER","opengles2_vgpu"); + } } else if (renderer == FCLConfig.Renderer.RENDERER_ANGLE) { + envMap.put("POJAV_RENDERER","opengles3_desktopgl_angle_vulkan"); envMap.put("LIBGL_ES","3"); + envMap.put("POJAVEXEC_EGL","libEGL_angle.so"); } else { envMap.put("MESA_GLSL_CACHE_DIR", config.getContext().getCacheDir().getAbsolutePath()); envMap.put("MESA_GL_VERSION_OVERRIDE", renderer == FCLConfig.Renderer.RENDERER_VIRGL ? "4.3" : "4.6"); @@ -193,13 +199,12 @@ public class FCLauncher { envMap.put("MESA_LOADER_DRIVER_OVERRIDE", "zink"); envMap.put("VTEST_SOCKET_NAME", new File(config.getContext().getCacheDir().getAbsolutePath(), ".virgl_test").getAbsolutePath()); if (renderer == FCLConfig.Renderer.RENDERER_VIRGL) { - envMap.put("GALLIUM_DRIVER", "virpipe"); envMap.put("OSMESA_NO_FLUSH_FRONTBUFFER", "1"); + envMap.put("POJAV_RENDERER","gallium_virgl"); } else if (renderer == FCLConfig.Renderer.RENDERER_ZINK) { - envMap.put("GALLIUM_DRIVER", "zink"); + envMap.put("POJAV_RENDERER","vulkan_zink"); } else if (renderer == FCLConfig.Renderer.RENDERER_FREEDRENO) { - envMap.put("GALLIUM_DRIVER", "freedreno"); - envMap.put("MESA_LOADER_DRIVER_OVERRIDE", "kgsl"); + envMap.put("POJAV_RENDERER","gallium_freedreno"); } } } diff --git a/FCLauncher/src/main/java/com/tungsten/fclauncher/bridge/FCLBridge.java b/FCLauncher/src/main/java/com/tungsten/fclauncher/bridge/FCLBridge.java index bbdde7b9..124ca0f2 100644 --- a/FCLauncher/src/main/java/com/tungsten/fclauncher/bridge/FCLBridge.java +++ b/FCLauncher/src/main/java/com/tungsten/fclauncher/bridge/FCLBridge.java @@ -19,8 +19,11 @@ import androidx.annotation.Nullable; import androidx.core.content.FileProvider; import com.tungsten.fclauncher.keycodes.FCLKeycodes; +import com.tungsten.fclauncher.keycodes.LwjglGlfwKeycode; import com.tungsten.fclauncher.utils.FCLPath; +import org.lwjgl.glfw.CallbackBridge; + import java.io.File; import java.io.Serializable; @@ -29,44 +32,44 @@ public class FCLBridge implements Serializable { public static final int DEFAULT_WIDTH = 1280; public static final int DEFAULT_HEIGHT = 720; - public static final int HIT_RESULT_TYPE_UNKNOWN = 0; - public static final int HIT_RESULT_TYPE_MISS = 1; - public static final int HIT_RESULT_TYPE_BLOCK = 2; - public static final int HIT_RESULT_TYPE_ENTITY = 3; + public static final int HIT_RESULT_TYPE_UNKNOWN = 0; + public static final int HIT_RESULT_TYPE_MISS = 1; + public static final int HIT_RESULT_TYPE_BLOCK = 2; + public static final int HIT_RESULT_TYPE_ENTITY = 3; - public static final int INJECTOR_MODE_ENABLE = 1; - public static final int INJECTOR_MODE_DISABLE = 0; + public static final int INJECTOR_MODE_ENABLE = 1; + public static final int INJECTOR_MODE_DISABLE = 0; - public static final int KeyPress = 2; - public static final int KeyRelease = 3; - public static final int ButtonPress = 4; - public static final int ButtonRelease = 5; - public static final int MotionNotify = 6; - public static final int KeyChar = 7; - public static final int ConfigureNotify = 22; - public static final int FCLMessage = 37; + public static final int KeyPress = 2; + public static final int KeyRelease = 3; + public static final int ButtonPress = 4; + public static final int ButtonRelease = 5; + public static final int MotionNotify = 6; + public static final int KeyChar = 7; + public static final int ConfigureNotify = 22; + public static final int FCLMessage = 37; - public static final int Button1 = 1; - public static final int Button2 = 2; - public static final int Button3 = 3; - public static final int Button4 = 4; - public static final int Button5 = 5; - public static final int Button6 = 6; - public static final int Button7 = 7; + public static final int Button1 = LwjglGlfwKeycode.GLFW_MOUSE_BUTTON_1; + public static final int Button2 = LwjglGlfwKeycode.GLFW_MOUSE_BUTTON_2; + public static final int Button3 = LwjglGlfwKeycode.GLFW_MOUSE_BUTTON_3; + public static final int Button4 = LwjglGlfwKeycode.GLFW_MOUSE_BUTTON_4; + public static final int Button5 = LwjglGlfwKeycode.GLFW_MOUSE_BUTTON_5; + public static final int Button6 = LwjglGlfwKeycode.GLFW_MOUSE_BUTTON_6; + public static final int Button7 = LwjglGlfwKeycode.GLFW_MOUSE_BUTTON_7; - public static final int CursorEnabled = 1; - public static final int CursorDisabled = 0; + public static final int CursorEnabled = 1; + public static final int CursorDisabled = 0; - public static final int ShiftMask = 1 << 0; - public static final int LockMask = 1 << 1; - public static final int ControlMask = 1 << 2; - public static final int Mod1Mask = 1 << 3; - public static final int Mod2Mask = 1 << 4; - public static final int Mod3Mask = 1 << 5; - public static final int Mod4Mask = 1 << 6; - public static final int Mod5Mask = 1 << 7; + public static final int ShiftMask = 1 << 0; + public static final int LockMask = 1 << 1; + public static final int ControlMask = 1 << 2; + public static final int Mod1Mask = 1 << 3; + public static final int Mod2Mask = 1 << 4; + public static final int Mod3Mask = 1 << 5; + public static final int Mod4Mask = 1 << 6; + public static final int Mod5Mask = 1 << 7; - public static final int CloseRequest = 0; + public static final int CloseRequest = 0; private FCLBridgeCallback callback; @@ -84,25 +87,30 @@ public class FCLBridge implements Serializable { static { System.loadLibrary("fcl"); - System.loadLibrary("fcl_awt"); + System.loadLibrary("pojavexec_awt"); } public FCLBridge() { } public native int[] renderAWTScreenFrame(); + public native void nativeSendData(int type, int i1, int i2, int i3, int i4); + public native void nativeMoveWindow(int x, int y); - public native void setFCLNativeWindow(Surface surface); public native int redirectStdio(String path); + public native int chdir(String path); + public native void setenv(String key, String value); + public native int dlopen(String path); + public native void setLdLibraryPath(String path); + public native void setupExitTrap(FCLBridge bridge); - public native void setEventPipe(); - public native void pushEvent(long time, int type, int keycode, int keyChar); + public native void refreshHitResultType(); public native void setFCLBridge(FCLBridge fclBridge); @@ -132,6 +140,7 @@ public class FCLBridge implements Serializable { this.callback = callback; this.surface = surface; setFCLBridge(this); + CallbackBridge.setFCLBridge(this); receiveLog("invoke redirectStdio" + "\n"); int errorCode = redirectStdio(getLogPath()); if (errorCode != 0) { @@ -143,7 +152,6 @@ public class FCLBridge implements Serializable { handleWindow(); } receiveLog("invoke setEventPipe" + "\n"); - setEventPipe(); // start if (thread != null) { @@ -152,27 +160,36 @@ public class FCLBridge implements Serializable { } public void pushEventMouseButton(int button, boolean press) { - pushEvent(System.nanoTime(), press ? ButtonPress : ButtonRelease, button, 0); + switch (button) { + case Button4: + if (press) { + CallbackBridge.sendScroll(0, 1d); + } + break; + case Button5: + if (press) { + CallbackBridge.sendScroll(0, -1d); + } + break; + default: + CallbackBridge.sendMouseButton(button, press); + } } public void pushEventPointer(int x, int y) { - pushEvent(System.nanoTime(), MotionNotify, x, y); + CallbackBridge.sendCursorPos(x, y); } public void pushEventKey(int keyCode, int keyChar, boolean press) { - pushEvent(System.nanoTime(), press ? KeyPress : KeyRelease, keyCode, keyChar); + CallbackBridge.sendKeycode(keyCode, (char) keyChar, 0, 0, press); } - public void pushEventChar(int keyChar) { - pushEvent(System.nanoTime(), KeyChar, FCLKeycodes.KEY_RESERVED, keyChar); + public void pushEventChar(char keyChar) { + CallbackBridge.sendChar(keyChar, 0); } public void pushEventWindow(int width, int height) { - pushEvent(System.nanoTime(), ConfigureNotify, width, height); - } - - public void pushEventMessage(int msg) { - pushEvent(System.nanoTime(), FCLMessage, msg, 0); + CallbackBridge.sendUpdateWindowSize(width, height); } // FCLBridge callbacks @@ -231,7 +248,7 @@ public class FCLBridge implements Serializable { intent.setDataAndType(uri, "*/*"); context.startActivity(intent); } catch (Exception e) { - Log.e("openLink error", e.toString()); + Log.e("openLink error", "link:" + link + " err:" + e.toString()); } }); } @@ -303,7 +320,7 @@ public class FCLBridge implements Serializable { private void handleWindow() { if (gameDir != null) { receiveLog("invoke setFCLNativeWindow" + "\n"); - setFCLNativeWindow(surface); + CallbackBridge.setupBridgeWindow(surface); } else { receiveLog("start Android AWT Renderer thread" + "\n"); Thread canvasThread = new Thread(() -> { diff --git a/FCLauncher/src/main/java/com/tungsten/fclauncher/keycodes/LwjglGlfwKeycode.java b/FCLauncher/src/main/java/com/tungsten/fclauncher/keycodes/LwjglGlfwKeycode.java new file mode 100644 index 00000000..1c6815e2 --- /dev/null +++ b/FCLauncher/src/main/java/com/tungsten/fclauncher/keycodes/LwjglGlfwKeycode.java @@ -0,0 +1,201 @@ +package com.tungsten.fclauncher.keycodes; +// Keycodes from https://github.com/glfw/glfw/blob/master/include/GLFW/glfw3.h + +/*-************************************************************************ + * GLFW 3.4 - www.glfw.org + * A library for OpenGL, window and input + *------------------------------------------------------------------------ + * Copyright (c) 2002-2006 Marcus Geelnard + * Copyright (c) 2006-2019 Camilla Löwy + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would + * be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not + * be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + *************************************************************************/ + +@SuppressWarnings("unused") +public class LwjglGlfwKeycode { + /** The unknown key. */ + public static final short KEY_UNKNOWN = 0; // should be -1 + + /** Printable keys. */ + public static final short + KEY_SPACE = 32, + KEY_APOSTROPHE = 39, + KEY_COMMA = 44, + KEY_MINUS = 45, + KEY_PERIOD = 46, + KEY_SLASH = 47, + KEY_0 = 48, + KEY_1 = 49, + KEY_2 = 50, + KEY_3 = 51, + KEY_4 = 52, + KEY_5 = 53, + KEY_6 = 54, + KEY_7 = 55, + KEY_8 = 56, + KEY_9 = 57, + KEY_SEMICOLON = 59, + KEY_EQUAL = 61, + KEY_A = 65, + KEY_B = 66, + KEY_C = 67, + KEY_D = 68, + KEY_E = 69, + KEY_F = 70, + KEY_G = 71, + KEY_H = 72, + KEY_I = 73, + KEY_J = 74, + KEY_K = 75, + KEY_L = 76, + KEY_M = 77, + KEY_N = 78, + KEY_O = 79, + KEY_P = 80, + KEY_Q = 81, + KEY_R = 82, + KEY_S = 83, + KEY_T = 84, + KEY_U = 85, + KEY_V = 86, + KEY_W = 87, + KEY_X = 88, + KEY_Y = 89, + KEY_Z = 90, + KEY_LEFT_BRACKET = 91, + KEY_BACKSLASH = 92, + KEY_RIGHT_BRACKET = 93, + KEY_GRAVE_ACCENT = 96, + KEY_WORLD_1 = 161, + KEY_WORLD_2 = 162; + + /** Function keys. */ + public static final short + KEY_ESCAPE = 256, + KEY_ENTER = 257, + KEY_TAB = 258, + KEY_BACKSPACE = 259, + KEY_INSERT = 260, + KEY_DELETE = 261, + KEY_RIGHT = 262, + KEY_LEFT = 263, + KEY_DOWN = 264, + KEY_UP = 265, + KEY_PAGE_UP = 266, + KEY_PAGE_DOWN = 267, + KEY_HOME = 268, + KEY_END = 269, + KEY_CAPS_LOCK = 280, + KEY_SCROLL_LOCK = 281, + KEY_NUM_LOCK = 282, + KEY_PRINT_SCREEN = 283, + KEY_PAUSE = 284, + KEY_F1 = 290, + KEY_F2 = 291, + KEY_F3 = 292, + KEY_F4 = 293, + KEY_F5 = 294, + KEY_F6 = 295, + KEY_F7 = 296, + KEY_F8 = 297, + KEY_F9 = 298, + KEY_F10 = 299, + KEY_F11 = 300, + KEY_F12 = 301, + KEY_F13 = 302, + KEY_F14 = 303, + KEY_F15 = 304, + KEY_F16 = 305, + KEY_F17 = 306, + KEY_F18 = 307, + KEY_F19 = 308, + KEY_F20 = 309, + KEY_F21 = 310, + KEY_F22 = 311, + KEY_F23 = 312, + KEY_F24 = 313, + KEY_F25 = 314, + KEY_KP_0 = 320, + KEY_KP_1 = 321, + KEY_KP_2 = 322, + KEY_KP_3 = 323, + KEY_KP_4 = 324, + KEY_KP_5 = 325, + KEY_KP_6 = 326, + KEY_KP_7 = 327, + KEY_KP_8 = 328, + KEY_KP_9 = 329, + KEY_KP_DECIMAL = 330, + KEY_KP_DIVIDE = 331, + KEY_KP_MULTIPLY = 332, + KEY_KP_SUBTRACT = 333, + KEY_KP_ADD = 334, + KEY_KP_ENTER = 335, + KEY_KP_EQUAL = 336, + KEY_LEFT_SHIFT = 340, + KEY_LEFT_CONTROL = 341, + KEY_LEFT_ALT = 342, + KEY_LEFT_SUPER = 343, + KEY_RIGHT_SHIFT = 344, + KEY_RIGHT_CONTROL = 345, + KEY_RIGHT_ALT = 346, + KEY_RIGHT_SUPER = 347, + KEY_MENU = 348, + KEY_LAST = KEY_MENU; + + /** If this bit is set one or more Shift keys were held down. */ + public static final int GLFW_MOD_SHIFT = 0x1; + + /** If this bit is set one or more Control keys were held down. */ + public static final int GLFW_MOD_CONTROL = 0x2; + + /** If this bit is set one or more Alt keys were held down. */ + public static final int GLFW_MOD_ALT = 0x4; + + /** If this bit is set one or more Super keys were held down. */ + public static final int GLFW_MOD_SUPER = 0x8; + + /** If this bit is set the Caps Lock key is enabled and the LOCK_KEY_MODS input mode is set. */ + public static final int GLFW_MOD_CAPS_LOCK = 0x10; + + /** If this bit is set the Num Lock key is enabled and the LOCK_KEY_MODS input mode is set. */ + public static final int GLFW_MOD_NUM_LOCK = 0x20; + + + /** Mouse buttons. See mouse button input for how these are used. */ + public static final short + GLFW_MOUSE_BUTTON_1 = 0, + GLFW_MOUSE_BUTTON_2 = 1, + GLFW_MOUSE_BUTTON_3 = 2, + GLFW_MOUSE_BUTTON_4 = 3, + GLFW_MOUSE_BUTTON_5 = 4, + GLFW_MOUSE_BUTTON_6 = 5, + GLFW_MOUSE_BUTTON_7 = 6, + GLFW_MOUSE_BUTTON_8 = 7, + GLFW_MOUSE_BUTTON_LAST = GLFW_MOUSE_BUTTON_8, + GLFW_MOUSE_BUTTON_LEFT = GLFW_MOUSE_BUTTON_1, + GLFW_MOUSE_BUTTON_RIGHT = GLFW_MOUSE_BUTTON_2, + GLFW_MOUSE_BUTTON_MIDDLE = GLFW_MOUSE_BUTTON_3; + + public static final int + GLFW_VISIBLE = 0x20004, + GLFW_HOVERED = 0x2000B; +} \ No newline at end of file diff --git a/FCLauncher/src/main/java/com/tungsten/fclauncher/keycodes/LwjglKeycodeMap.java b/FCLauncher/src/main/java/com/tungsten/fclauncher/keycodes/LwjglKeycodeMap.java new file mode 100644 index 00000000..3e548eb1 --- /dev/null +++ b/FCLauncher/src/main/java/com/tungsten/fclauncher/keycodes/LwjglKeycodeMap.java @@ -0,0 +1,130 @@ +package com.tungsten.fclauncher.keycodes; + +import android.util.Log; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * @author mio + */ +public class LwjglKeycodeMap { + private static final Map KEY_MAP = new HashMap<>(); + + private static void add(int lwjglKeycode, int fclKeycode) { + KEY_MAP.put(fclKeycode, lwjglKeycode); + } + + public static int convertKeycode(int fclKeycode) { + Integer key = KEY_MAP.get(fclKeycode); + if (key != null) { + return key; + } + return LwjglGlfwKeycode.KEY_UNKNOWN; + } + + static { + add(LwjglGlfwKeycode.KEY_HOME, FCLKeycodes.KEY_HOME); + add(LwjglGlfwKeycode.KEY_ESCAPE, FCLKeycodes.KEY_ESC); + add(LwjglGlfwKeycode.KEY_0, FCLKeycodes.KEY_0); + add(LwjglGlfwKeycode.KEY_1, FCLKeycodes.KEY_1); + add(LwjglGlfwKeycode.KEY_2, FCLKeycodes.KEY_2); + add(LwjglGlfwKeycode.KEY_3, FCLKeycodes.KEY_3); + add(LwjglGlfwKeycode.KEY_4, FCLKeycodes.KEY_4); + add(LwjglGlfwKeycode.KEY_5, FCLKeycodes.KEY_5); + add(LwjglGlfwKeycode.KEY_6, FCLKeycodes.KEY_6); + add(LwjglGlfwKeycode.KEY_7, FCLKeycodes.KEY_7); + add(LwjglGlfwKeycode.KEY_8, FCLKeycodes.KEY_8); + add(LwjglGlfwKeycode.KEY_9, FCLKeycodes.KEY_9); + add(LwjglGlfwKeycode.KEY_3, FCLKeycodes.KEY_3); + add(LwjglGlfwKeycode.KEY_UP, FCLKeycodes.KEY_UP); + add(LwjglGlfwKeycode.KEY_DOWN, FCLKeycodes.KEY_DOWN); + add(LwjglGlfwKeycode.KEY_LEFT, FCLKeycodes.KEY_LEFT); + add(LwjglGlfwKeycode.KEY_RIGHT, FCLKeycodes.KEY_RIGHT); + add(LwjglGlfwKeycode.KEY_A, FCLKeycodes.KEY_A); + add(LwjglGlfwKeycode.KEY_B, FCLKeycodes.KEY_B); + add(LwjglGlfwKeycode.KEY_C, FCLKeycodes.KEY_C); + add(LwjglGlfwKeycode.KEY_D, FCLKeycodes.KEY_D); + add(LwjglGlfwKeycode.KEY_E, FCLKeycodes.KEY_E); + add(LwjglGlfwKeycode.KEY_F, FCLKeycodes.KEY_F); + add(LwjglGlfwKeycode.KEY_G, FCLKeycodes.KEY_G); + add(LwjglGlfwKeycode.KEY_H, FCLKeycodes.KEY_H); + add(LwjglGlfwKeycode.KEY_I, FCLKeycodes.KEY_I); + add(LwjglGlfwKeycode.KEY_J, FCLKeycodes.KEY_J); + add(LwjglGlfwKeycode.KEY_K, FCLKeycodes.KEY_K); + add(LwjglGlfwKeycode.KEY_L, FCLKeycodes.KEY_L); + add(LwjglGlfwKeycode.KEY_M, FCLKeycodes.KEY_M); + add(LwjglGlfwKeycode.KEY_N, FCLKeycodes.KEY_N); + add(LwjglGlfwKeycode.KEY_O, FCLKeycodes.KEY_O); + add(LwjglGlfwKeycode.KEY_P, FCLKeycodes.KEY_P); + add(LwjglGlfwKeycode.KEY_Q, FCLKeycodes.KEY_Q); + add(LwjglGlfwKeycode.KEY_R, FCLKeycodes.KEY_R); + add(LwjglGlfwKeycode.KEY_S, FCLKeycodes.KEY_S); + add(LwjglGlfwKeycode.KEY_T, FCLKeycodes.KEY_T); + add(LwjglGlfwKeycode.KEY_U, FCLKeycodes.KEY_U); + add(LwjglGlfwKeycode.KEY_V, FCLKeycodes.KEY_V); + add(LwjglGlfwKeycode.KEY_W, FCLKeycodes.KEY_W); + add(LwjglGlfwKeycode.KEY_X, FCLKeycodes.KEY_X); + add(LwjglGlfwKeycode.KEY_Y, FCLKeycodes.KEY_Y); + add(LwjglGlfwKeycode.KEY_Z, FCLKeycodes.KEY_Z); + add(LwjglGlfwKeycode.KEY_COMMA, FCLKeycodes.KEY_COMMA); + add(LwjglGlfwKeycode.KEY_PERIOD, FCLKeycodes.KEY_DOT); + add(LwjglGlfwKeycode.KEY_LEFT_ALT, FCLKeycodes.KEY_LEFTALT); + add(LwjglGlfwKeycode.KEY_RIGHT_ALT, FCLKeycodes.KEY_RIGHTALT); + add(LwjglGlfwKeycode.KEY_LEFT_SHIFT, FCLKeycodes.KEY_LEFTSHIFT); + add(LwjglGlfwKeycode.KEY_RIGHT_SHIFT, FCLKeycodes.KEY_RIGHTSHIFT); + add(LwjglGlfwKeycode.KEY_TAB, FCLKeycodes.KEY_TAB); + add(LwjglGlfwKeycode.KEY_SPACE, FCLKeycodes.KEY_SPACE); + add(LwjglGlfwKeycode.KEY_ENTER, FCLKeycodes.KEY_ENTER); + add(LwjglGlfwKeycode.KEY_BACKSPACE, FCLKeycodes.KEY_BACKSPACE); + add(LwjglGlfwKeycode.KEY_GRAVE_ACCENT, FCLKeycodes.KEY_GRAVE); + add(LwjglGlfwKeycode.KEY_MINUS, FCLKeycodes.KEY_MINUS); + add(LwjglGlfwKeycode.KEY_EQUAL, FCLKeycodes.KEY_EQUAL); + add(LwjglGlfwKeycode.KEY_LEFT_BRACKET, FCLKeycodes.KEY_LEFTBRACE); + add(LwjglGlfwKeycode.KEY_RIGHT_BRACKET, FCLKeycodes.KEY_RIGHTBRACE); + add(LwjglGlfwKeycode.KEY_BACKSLASH, FCLKeycodes.KEY_BACKSLASH); + add(LwjglGlfwKeycode.KEY_SEMICOLON, FCLKeycodes.KEY_SEMICOLON); + add(LwjglGlfwKeycode.KEY_APOSTROPHE, FCLKeycodes.KEY_APOSTROPHE); + add(LwjglGlfwKeycode.KEY_SLASH, FCLKeycodes.KEY_SLASH); + add(LwjglGlfwKeycode.KEY_PAGE_UP, FCLKeycodes.KEY_PAGEUP); + add(LwjglGlfwKeycode.KEY_PAGE_DOWN, FCLKeycodes.KEY_PAGEDOWN); + add(LwjglGlfwKeycode.KEY_ESCAPE, FCLKeycodes.KEY_ESC); + add(LwjglGlfwKeycode.KEY_LEFT_CONTROL, FCLKeycodes.KEY_LEFTCTRL); + add(LwjglGlfwKeycode.KEY_RIGHT_CONTROL, FCLKeycodes.KEY_RIGHTCTRL); + add(LwjglGlfwKeycode.KEY_CAPS_LOCK, FCLKeycodes.KEY_CAPSLOCK); + add(LwjglGlfwKeycode.KEY_PAUSE, FCLKeycodes.KEY_PAUSE); + add(LwjglGlfwKeycode.KEY_END, FCLKeycodes.KEY_END); + add(LwjglGlfwKeycode.KEY_INSERT, FCLKeycodes.KEY_INSERT); + add(LwjglGlfwKeycode.KEY_F1, FCLKeycodes.KEY_F1); + add(LwjglGlfwKeycode.KEY_F2, FCLKeycodes.KEY_F2); + add(LwjglGlfwKeycode.KEY_F3, FCLKeycodes.KEY_F3); + add(LwjglGlfwKeycode.KEY_F4, FCLKeycodes.KEY_F4); + add(LwjglGlfwKeycode.KEY_F5, FCLKeycodes.KEY_F5); + add(LwjglGlfwKeycode.KEY_F6, FCLKeycodes.KEY_F6); + add(LwjglGlfwKeycode.KEY_F7, FCLKeycodes.KEY_F7); + add(LwjglGlfwKeycode.KEY_F8, FCLKeycodes.KEY_F8); + add(LwjglGlfwKeycode.KEY_F9, FCLKeycodes.KEY_F9); + add(LwjglGlfwKeycode.KEY_F10, FCLKeycodes.KEY_F10); + add(LwjglGlfwKeycode.KEY_F11, FCLKeycodes.KEY_F11); + add(LwjglGlfwKeycode.KEY_F12, FCLKeycodes.KEY_F12); + add(LwjglGlfwKeycode.KEY_NUM_LOCK, FCLKeycodes.KEY_NUMLOCK); + add(LwjglGlfwKeycode.KEY_KP_0, FCLKeycodes.KEY_KP0); + add(LwjglGlfwKeycode.KEY_KP_1, FCLKeycodes.KEY_KP1); + add(LwjglGlfwKeycode.KEY_KP_2, FCLKeycodes.KEY_KP2); + add(LwjglGlfwKeycode.KEY_KP_3, FCLKeycodes.KEY_KP3); + add(LwjglGlfwKeycode.KEY_KP_4, FCLKeycodes.KEY_KP4); + add(LwjglGlfwKeycode.KEY_KP_5, FCLKeycodes.KEY_KP5); + add(LwjglGlfwKeycode.KEY_KP_6, FCLKeycodes.KEY_KP6); + add(LwjglGlfwKeycode.KEY_KP_7, FCLKeycodes.KEY_KP7); + add(LwjglGlfwKeycode.KEY_KP_8, FCLKeycodes.KEY_KP8); + add(LwjglGlfwKeycode.KEY_KP_9, FCLKeycodes.KEY_KP9); + add(LwjglGlfwKeycode.KEY_KP_DECIMAL, FCLKeycodes.KEY_KPDOT); + add(LwjglGlfwKeycode.KEY_KP_SUBTRACT, FCLKeycodes.KEY_KPMINUS); + add(LwjglGlfwKeycode.KEY_KP_MULTIPLY, FCLKeycodes.KEY_KPASTERISK); + add(LwjglGlfwKeycode.KEY_KP_ADD, FCLKeycodes.KEY_KPPLUS); + add(LwjglGlfwKeycode.KEY_KP_DIVIDE, FCLKeycodes.KEY_KPSLASH); + add(LwjglGlfwKeycode.KEY_KP_ENTER, FCLKeycodes.KEY_KPENTER); + add(LwjglGlfwKeycode.KEY_KP_EQUAL, FCLKeycodes.KEY_KPEQUAL); + } +} \ No newline at end of file diff --git a/FCLauncher/src/main/java/org/lwjgl/glfw/CallbackBridge.java b/FCLauncher/src/main/java/org/lwjgl/glfw/CallbackBridge.java new file mode 100644 index 00000000..8b11c9c7 --- /dev/null +++ b/FCLauncher/src/main/java/org/lwjgl/glfw/CallbackBridge.java @@ -0,0 +1,236 @@ +package org.lwjgl.glfw; + +import android.content.*; +import android.view.Choreographer; + +import androidx.annotation.Nullable; + +import com.tungsten.fclauncher.bridge.FCLBridge; +import com.tungsten.fclauncher.keycodes.LwjglGlfwKeycode; +import com.tungsten.fclauncher.keycodes.LwjglKeycodeMap; +import com.tungsten.fclauncher.utils.FCLPath; + +import java.util.function.Consumer; + +import dalvik.annotation.optimization.CriticalNative; + +public class CallbackBridge { + public static final Choreographer sChoreographer = Choreographer.getInstance(); + private static FCLBridge fclBridge = null; + private static boolean isGrabbing = false; + private static final Consumer grabListener = isGrabbing -> CallbackBridge.fclBridge.setCursorMode(isGrabbing ? FCLBridge.CursorDisabled : FCLBridge.CursorEnabled); + + public static final int CLIPBOARD_COPY = 2000; + public static final int CLIPBOARD_PASTE = 2001; + public static final int CLIPBOARD_OPEN = 2002; + + public static volatile int windowWidth, windowHeight; + public static volatile int physicalWidth, physicalHeight; + public static float mouseX, mouseY; + public volatile static boolean holdingAlt, holdingCapslock, holdingCtrl, + holdingNumlock, holdingShift; + + public static void putMouseEventWithCoords(int button, float x, float y) { + putMouseEventWithCoords(button, true, x, y); + sChoreographer.postFrameCallbackDelayed(l -> putMouseEventWithCoords(button, false, x, y), 33); + } + + public static void putMouseEventWithCoords(int button, boolean isDown, float x, float y /* , int dz, long nanos */) { + sendCursorPos(x, y); + sendMouseKeycode(button, CallbackBridge.getCurrentMods(), isDown); + } + + + public static void sendCursorPos(float x, float y) { + mouseX = x; + mouseY = y; + nativeSendCursorPos(mouseX, mouseY); + } + + public static void sendKeycode(int keycode, char keychar, int scancode, int modifiers, boolean isDown) { + // TODO CHECK: This may cause input issue, not receive input! + if (keycode != 0) { + int code = LwjglKeycodeMap.convertKeycode(keycode); + if (code <= 0) { + return; + } + nativeSendKey(code, scancode, isDown ? 1 : 0, modifiers); + } + if (isDown && keychar != '\u0000') { + nativeSendCharMods(keychar, modifiers); + nativeSendChar(keychar); + } + } + + public static void sendChar(char keychar, int modifiers) { + nativeSendCharMods(keychar, modifiers); + nativeSendChar(keychar); + } + + public static void sendKeyPress(int keyCode, int modifiers, boolean status) { + sendKeyPress(keyCode, 0, modifiers, status); + } + + public static void sendKeyPress(int keyCode, int scancode, int modifiers, boolean status) { + sendKeyPress(keyCode, '\u0000', scancode, modifiers, status); + } + + public static void sendKeyPress(int keyCode, char keyChar, int scancode, int modifiers, boolean status) { + CallbackBridge.sendKeycode(keyCode, keyChar, scancode, modifiers, status); + } + + public static void sendKeyPress(int keyCode) { + sendKeyPress(keyCode, CallbackBridge.getCurrentMods(), true); + sendKeyPress(keyCode, CallbackBridge.getCurrentMods(), false); + } + + public static void sendMouseButton(int button, boolean status) { + CallbackBridge.sendMouseKeycode(button, CallbackBridge.getCurrentMods(), status); + } + + public static void sendMouseKeycode(int button, int modifiers, boolean isDown) { + // if (isGrabbing()) DEBUG_STRING.append("MouseGrabStrace: " + android.util.Log.getStackTraceString(new Throwable()) + "\n"); + nativeSendMouseButton(button, isDown ? 1 : 0, modifiers); + } + + public static void sendMouseKeycode(int keycode) { + sendMouseKeycode(keycode, CallbackBridge.getCurrentMods(), true); + sendMouseKeycode(keycode, CallbackBridge.getCurrentMods(), false); + } + + public static void sendScroll(double xoffset, double yoffset) { + nativeSendScroll(xoffset, yoffset); + } + + public static void sendUpdateWindowSize(int w, int h) { + nativeSendScreenSize(w, h); + } + + public static boolean isGrabbing() { + // Avoid going through the JNI each time. + return isGrabbing; + } + + // Called from JRE side + @SuppressWarnings("unused") + public static @Nullable String accessAndroidClipboard(int type, String copy) { + ClipboardManager clipboard = (ClipboardManager) FCLPath.CONTEXT.getSystemService(Context.CLIPBOARD_SERVICE); + switch (type) { + case CLIPBOARD_COPY: + ClipData clip = ClipData.newPlainText("FCL Clipboard", copy); + clipboard.setPrimaryClip(clip); + return null; + + case CLIPBOARD_PASTE: + if (clipboard.hasPrimaryClip() && clipboard.getPrimaryClipDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) { + return clipboard.getPrimaryClip().getItemAt(0).getText().toString(); + } else { + return ""; + } + + case CLIPBOARD_OPEN: + FCLBridge.openLink(copy); + return null; + default: + return null; + } + } + + + public static int getCurrentMods() { + int currMods = 0; + if (holdingAlt) { + currMods |= LwjglGlfwKeycode.GLFW_MOD_ALT; + } + if (holdingCapslock) { + currMods |= LwjglGlfwKeycode.GLFW_MOD_CAPS_LOCK; + } + if (holdingCtrl) { + currMods |= LwjglGlfwKeycode.GLFW_MOD_CONTROL; + } + if (holdingNumlock) { + currMods |= LwjglGlfwKeycode.GLFW_MOD_NUM_LOCK; + } + if (holdingShift) { + currMods |= LwjglGlfwKeycode.GLFW_MOD_SHIFT; + } + return currMods; + } + + public static void setModifiers(int keyCode, boolean isDown) { + switch (keyCode) { + case LwjglGlfwKeycode.KEY_LEFT_SHIFT: + CallbackBridge.holdingShift = isDown; + break; + + case LwjglGlfwKeycode.KEY_LEFT_CONTROL: + CallbackBridge.holdingCtrl = isDown; + break; + + case LwjglGlfwKeycode.KEY_LEFT_ALT: + CallbackBridge.holdingAlt = isDown; + break; + + case LwjglGlfwKeycode.KEY_CAPS_LOCK: + CallbackBridge.holdingCapslock = isDown; + break; + + case LwjglGlfwKeycode.KEY_NUM_LOCK: + CallbackBridge.holdingNumlock = isDown; + break; + } + } + + public static void setFCLBridge(FCLBridge fclBridge) { + CallbackBridge.fclBridge = fclBridge; + } + + //Called from JRE side + @SuppressWarnings("unused") + private static void onGrabStateChanged(final boolean grabbing) { + isGrabbing = grabbing; + sChoreographer.postFrameCallbackDelayed((time) -> { + // If the grab re-changed, skip notify process + if (isGrabbing != grabbing) { + return; + } + synchronized (grabListener) { + grabListener.accept(isGrabbing); + } + }, 16); + + } + + @CriticalNative + public static native void nativeSetUseInputStackQueue(boolean useInputStackQueue); + + @CriticalNative + private static native boolean nativeSendChar(char codepoint); + + // GLFW: GLFWCharModsCallback deprecated, but is Minecraft still use? + @CriticalNative + private static native boolean nativeSendCharMods(char codepoint, int mods); + + @CriticalNative + private static native void nativeSendKey(int key, int scancode, int action, int mods); + + // private static native void nativeSendCursorEnter(int entered); + @CriticalNative + private static native void nativeSendCursorPos(float x, float y); + + @CriticalNative + private static native void nativeSendMouseButton(int button, int action, int mods); + + @CriticalNative + private static native void nativeSendScroll(double xoffset, double yoffset); + + @CriticalNative + private static native void nativeSendScreenSize(int width, int height); + + public static native void nativeSetWindowAttrib(int attrib, int value); + public static native void setupBridgeWindow(Object surface); + static { + System.loadLibrary("pojavexec"); + } +} + diff --git a/FCLauncher/src/main/jni/Android.mk b/FCLauncher/src/main/jni/Android.mk index 0a5c6a07..c895e300 100644 --- a/FCLauncher/src/main/jni/Android.mk +++ b/FCLauncher/src/main/jni/Android.mk @@ -18,40 +18,12 @@ LOCAL_SHARED_LIBRARIES := bytehook LOCAL_SRC_FILES := fcl/fcl_bridge.c \ fcl/fcl_event.c \ fcl/fcl_loader.c \ - fcl/jre_launcher.c + fcl/jre_launcher.c \ + fcl/utils.c LOCAL_C_INCLUDES := $(LOCAL_PATH)/fcl/include LOCAL_LDLIBS := -llog -ldl -landroid include $(BUILD_SHARED_LIBRARY) -include $(CLEAR_VARS) -LOCAL_MODULE := glfw -LOCAL_SHARED_LIBRARIES := fcl -LOCAL_SRC_FILES := glfw/context.c \ - glfw/init.c \ - glfw/input.c \ - glfw/monitor.c \ - glfw/vulkan.c \ - glfw/window.c \ - glfw/fcl_init.c \ - glfw/fcl_monitor.c \ - glfw/fcl_window.c \ - glfw/egl_context.c \ - glfw/osmesa_context.c \ - glfw/platform.c \ - glfw/posix_thread.c \ - glfw/posix_time.c \ - glfw/driver_helper.c \ - driver_helper/nsbypass.c -LOCAL_C_INCLUDES := $(LOCAL_PATH)/fcl/include \ - $(LOCAL_PATH)/glfw/include -LOCAL_CFLAGS := -Wall -LOCAL_LDLIBS := -llog -ldl -landroid -ifeq ($(TARGET_ARCH_ABI), arm64-v8a) -LOCAL_CFLAGS += -DADRENO_POSSIBLE -LOCAL_LDLIBS += -lEGL -lGLESv2 -endif -include $(BUILD_SHARED_LIBRARY) - #ifeq ($(TARGET_ARCH_ABI), arm64-v8a) include $(CLEAR_VARS) LOCAL_MODULE := linkerhook @@ -72,264 +44,36 @@ LOCAL_SRC_FILES := awt_xawt/xawt_fake.c include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) -LOCAL_MODULE := fcl_awt +LOCAL_MODULE := pojavexec_awt LOCAL_SHARED_LIBRARIES := fcl LOCAL_SRC_FILES := awt/awt_bridge.c include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) -LOCAL_MODULE := libffi -LOCAL_SRC_FILES := lwjgl/libffi/$(TARGET_ARCH_ABI)/libffi.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := lwjgl -LOCAL_STATIC_LIBRARIES := libffi +# Link GLESv2 for test +LOCAL_LDLIBS := -ldl -llog -landroid +# -lGLESv2 +LOCAL_MODULE := pojavexec LOCAL_SHARED_LIBRARIES := fcl -LOCAL_SRC_FILES := lwjgl/fcl_hook.c \ - lwjgl/common_tools.c \ - lwjgl/org_lwjgl_system_Callback.c \ - lwjgl/org_lwjgl_system_linux_DynamicLinkLoader.c \ - lwjgl/org_lwjgl_system_JNI.c \ - lwjgl/org_lwjgl_system_jni_JNINativeInterface.c \ - lwjgl/org_lwjgl_system_libc_LibCErrno.c \ - lwjgl/org_lwjgl_system_libc_LibCLocale.c \ - lwjgl/org_lwjgl_system_libc_LibCStdio.c \ - lwjgl/org_lwjgl_system_libc_LibCStdlib.c \ - lwjgl/org_lwjgl_system_libc_LibCString.c \ - lwjgl/org_lwjgl_system_libffi_FFICIF.c \ - lwjgl/org_lwjgl_system_libffi_FFIClosure.c \ - lwjgl/org_lwjgl_system_libffi_LibFFI.c \ - lwjgl/org_lwjgl_system_MemoryAccessJNI.c \ - lwjgl/org_lwjgl_system_MemoryUtil.c \ - lwjgl/org_lwjgl_system_SharedLibraryUtil.c \ - lwjgl/org_lwjgl_system_ThreadLocalUtil.c -LOCAL_C_INCLUDES := $(LOCAL_PATH)/lwjgl/libffi/$(TARGET_ARCH_ABI) -LOCAL_CFLAGS := -O2 -Wall -c -fPIC -std=c99 -Wunused -DLWJGL_FCL -Wunused-value +# LOCAL_CFLAGS += -DDEBUG +# -DGLES_TEST +LOCAL_SRC_FILES := \ + pojav/bigcoreaffinity.c \ + pojav/egl_bridge.c \ + pojav/ctxbridges/gl_bridge.c \ + pojav/ctxbridges/osm_bridge.c \ + pojav/ctxbridges/egl_loader.c \ + pojav/ctxbridges/osmesa_loader.c \ + pojav/ctxbridges/swap_interval_no_egl.c \ + pojav/environ/environ.c \ + pojav/input_bridge_v3.c \ + pojav/virgl/virgl.c \ + driver_helper/nsbypass.c +LOCAL_C_INCLUDES := $(LOCAL_PATH)/pojav +ifeq ($(TARGET_ARCH_ABI),arm64-v8a) +LOCAL_CFLAGS += -DADRENO_POSSIBLE +LOCAL_LDLIBS += -lEGL -lGLESv2 +endif include $(BUILD_SHARED_LIBRARY) -include $(CLEAR_VARS) -LOCAL_MODULE := lwjgl_tinyfd -LOCAL_SRC_FILES := lwjgl/tinyfd/org_lwjgl_util_tinyfd_TinyFileDialogs.c \ - lwjgl/tinyfd/tinyfiledialogs.c -LOCAL_CFLAGS := -O2 -Wall -c -fPIC -std=c99 -Wunused -DLWJGL_FCL -Wunused-value -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := lwjgl_nanovg -LOCAL_SRC_FILES := lwjgl/nanovg/org_lwjgl_nanovg_Blendish.c \ - lwjgl/nanovg/org_lwjgl_nanovg_LibNanoVG.c \ - lwjgl/nanovg/org_lwjgl_nanovg_NanoSVG.c \ - lwjgl/nanovg/org_lwjgl_nanovg_NanoVG.c \ - lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL2.c \ - lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL3.c \ - lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES2.c \ - lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES3.c \ - lwjgl/nanovg/org_lwjgl_nanovg_OUI.c -LOCAL_CFLAGS := -O2 -Wall -c -fPIC -std=c99 -Wunused -DLWJGL_FCL -Wunused-value -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := lwjgl_stb -LOCAL_SRC_FILES := lwjgl/stb/org_lwjgl_stb_LibSTB.c \ - lwjgl/stb/org_lwjgl_stb_STBDXT.c \ - lwjgl/stb/org_lwjgl_stb_STBEasyFont.c \ - lwjgl/stb/org_lwjgl_stb_STBImage.c \ - lwjgl/stb/org_lwjgl_stb_STBImageResize.c \ - lwjgl/stb/org_lwjgl_stb_STBImageWrite.c \ - lwjgl/stb/org_lwjgl_stb_STBPerlin.c \ - lwjgl/stb/org_lwjgl_stb_STBRectPack.c \ - lwjgl/stb/org_lwjgl_stb_STBTruetype.c \ - lwjgl/stb/org_lwjgl_stb_STBTTFontinfo.c \ - lwjgl/stb/org_lwjgl_stb_STBVorbis.c -LOCAL_CFLAGS := -O2 -Wall -c -fPIC -std=c99 -Wunused -DLWJGL_FCL -Wunused-value -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := lwjgl_opengl -LOCAL_SRC_FILES := lwjgl/opengl/org_lwjgl_opengl_AMDDebugOutput.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDDrawBuffersBlend.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDFramebufferMultisampleAdvanced.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDInterleavedElements.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDOcclusionQueryEvent.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDPerformanceMonitor.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDSamplePositions.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDSparseTexture.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDStencilOperationExtended.c \ - lwjgl/opengl/org_lwjgl_opengl_AMDVertexShaderTessellator.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBBindlessTexture.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBBufferStorage.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBClearBufferObject.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBCLEvent.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBColorBufferFloat.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBComputeVariableGroupSize.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBDebugOutput.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffers.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffersBlend.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBDrawInstanced.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBES32Compatibility.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBFramebufferNoAttachments.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBGeometryShader4.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBGLSPIRV.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderFP64.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderInt64.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBImaging.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBIndirectParameters.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBInstancedArrays.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBMatrixPalette.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBMultisample.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBMultitexture.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBOcclusionQuery.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBParallelShaderCompile.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBPointParameters.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBRobustness.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBSampleLocations.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBSampleShading.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBShaderObjects.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBShadingLanguageInclude.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBSparseBuffer.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBSparseTexture.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferObject.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferRange.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBTextureCompression.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorage.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorageMultisample.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBTransposeMatrix.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttrib64Bit.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttribBinding.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBVertexBlend.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBVertexBufferObject.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBVertexProgram.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBVertexShader.c \ - lwjgl/opengl/org_lwjgl_opengl_ARBWindowPos.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTBindableUniform.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTBlendColor.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTBlendEquationSeparate.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTBlendFuncSeparate.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTBlendMinmax.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTCompiledVertexArray.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTDebugLabel.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTDebugMarker.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTDepthBoundsTest.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTDrawBuffers2.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTDrawInstanced.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTEGLImageStorage.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTExternalBuffer.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlit.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlitLayers.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferMultisample.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferObject.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTGeometryShader4.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTGPUProgramParameters.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTGPUShader4.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObject.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectFD.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectWin32.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTPointParameters.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTPolygonOffsetClamp.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTProvokingVertex.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTRasterMultisample.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTSecondaryColor.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTSemaphore.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreFD.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreWin32.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTSeparateShaderObjects.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTShaderFramebufferFetchNonCoherent.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTShaderImageLoadStore.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTStencilClearTag.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTStencilTwoSide.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTTextureArray.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTTextureBufferObject.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTTextureInteger.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTTextureStorage.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTTimerQuery.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTTransformFeedback.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTVertexAttrib64bit.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTWin32KeyedMutex.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTWindowRectangles.c \ - lwjgl/opengl/org_lwjgl_opengl_EXTX11SyncObject.c \ - lwjgl/opengl/org_lwjgl_opengl_GL11.c \ - lwjgl/opengl/org_lwjgl_opengl_GL11C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL12C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL13.c \ - lwjgl/opengl/org_lwjgl_opengl_GL13C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL14.c \ - lwjgl/opengl/org_lwjgl_opengl_GL14C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL15C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL20C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL21C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL30C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL31C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL32C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL33.c \ - lwjgl/opengl/org_lwjgl_opengl_GL33C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL40C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL41C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL42C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL43C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL44C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL45.c \ - lwjgl/opengl/org_lwjgl_opengl_GL45C.c \ - lwjgl/opengl/org_lwjgl_opengl_GL46C.c \ - lwjgl/opengl/org_lwjgl_opengl_GREMEDYFrameTerminator.c \ - lwjgl/opengl/org_lwjgl_opengl_GREMEDYStringMarker.c \ - lwjgl/opengl/org_lwjgl_opengl_INTELFramebufferCMAA.c \ - lwjgl/opengl/org_lwjgl_opengl_INTELMapTexture.c \ - lwjgl/opengl/org_lwjgl_opengl_INTELPerformanceQuery.c \ - lwjgl/opengl/org_lwjgl_opengl_KHRBlendEquationAdvanced.c \ - lwjgl/opengl/org_lwjgl_opengl_KHRParallelShaderCompile.c \ - lwjgl/opengl/org_lwjgl_opengl_MESAFramebufferFlipY.c \ - lwjgl/opengl/org_lwjgl_opengl_NVAlphaToCoverageDitherControl.c \ - lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirect.c \ - lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirectCount.c \ - lwjgl/opengl/org_lwjgl_opengl_NVBindlessTexture.c \ - lwjgl/opengl/org_lwjgl_opengl_NVBlendEquationAdvanced.c \ - lwjgl/opengl/org_lwjgl_opengl_NVClipSpaceWScaling.c \ - lwjgl/opengl/org_lwjgl_opengl_NVCommandList.c \ - lwjgl/opengl/org_lwjgl_opengl_NVConditionalRender.c \ - lwjgl/opengl/org_lwjgl_opengl_NVConservativeRaster.c \ - lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterDilate.c \ - lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterPreSnapTriangles.c \ - lwjgl/opengl/org_lwjgl_opengl_NVCopyImage.c \ - lwjgl/opengl/org_lwjgl_opengl_NVDepthBufferFloat.c \ - lwjgl/opengl/org_lwjgl_opengl_NVDrawTexture.c \ - lwjgl/opengl/org_lwjgl_opengl_NVDrawVulkanImage.c \ - lwjgl/opengl/org_lwjgl_opengl_NVExplicitMultisample.c \ - lwjgl/opengl/org_lwjgl_opengl_NVFence.c \ - lwjgl/opengl/org_lwjgl_opengl_NVFragmentCoverageToColor.c \ - lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMixedSamples.c \ - lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c \ - lwjgl/opengl/org_lwjgl_opengl_NVGPUMulticast.c \ - lwjgl/opengl/org_lwjgl_opengl_NVGPUShader5.c \ - lwjgl/opengl/org_lwjgl_opengl_NVHalfFloat.c \ - lwjgl/opengl/org_lwjgl_opengl_NVInternalformatSampleQuery.c \ - lwjgl/opengl/org_lwjgl_opengl_NVMemoryAttachment.c \ - lwjgl/opengl/org_lwjgl_opengl_NVMemoryObjectSparse.c \ - lwjgl/opengl/org_lwjgl_opengl_NVMeshShader.c \ - lwjgl/opengl/org_lwjgl_opengl_NVPathRendering.c \ - lwjgl/opengl/org_lwjgl_opengl_NVPixelDataRange.c \ - lwjgl/opengl/org_lwjgl_opengl_NVPointSprite.c \ - lwjgl/opengl/org_lwjgl_opengl_NVPrimitiveRestart.c \ - lwjgl/opengl/org_lwjgl_opengl_NVQueryResource.c \ - lwjgl/opengl/org_lwjgl_opengl_NVQueryResourceTag.c \ - lwjgl/opengl/org_lwjgl_opengl_NVSampleLocations.c \ - lwjgl/opengl/org_lwjgl_opengl_NVScissorExclusive.c \ - lwjgl/opengl/org_lwjgl_opengl_NVShaderBufferLoad.c \ - lwjgl/opengl/org_lwjgl_opengl_NVShadingRateImage.c \ - lwjgl/opengl/org_lwjgl_opengl_NVTextureBarrier.c \ - lwjgl/opengl/org_lwjgl_opengl_NVTextureMultisample.c \ - lwjgl/opengl/org_lwjgl_opengl_NVTimelineSemaphore.c \ - lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback.c \ - lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback2.c \ - lwjgl/opengl/org_lwjgl_opengl_NVVertexArrayRange.c \ - lwjgl/opengl/org_lwjgl_opengl_NVVertexAttribInteger64bit.c \ - lwjgl/opengl/org_lwjgl_opengl_NVVertexBufferUnifiedMemory.c \ - lwjgl/opengl/org_lwjgl_opengl_NVViewportSwizzle.c \ - lwjgl/opengl/org_lwjgl_opengl_NVXConditionalRender.c \ - lwjgl/opengl/org_lwjgl_opengl_NVXGpuMulticast2.c \ - lwjgl/opengl/org_lwjgl_opengl_NVXProgressFence.c \ - lwjgl/opengl/org_lwjgl_opengl_OVRMultiview.c -LOCAL_CFLAGS := -O2 -Wall -c -fPIC -std=c99 -Wunused -DLWJGL_FCL -Wunused-value -include $(BUILD_SHARED_LIBRARY) $(call import-module,prefab/bytehook) \ No newline at end of file diff --git a/FCLauncher/src/main/jni/awt/awt_bridge.c b/FCLauncher/src/main/jni/awt/awt_bridge.c index 1332ecde..c52dcf6f 100644 --- a/FCLauncher/src/main/jni/awt/awt_bridge.c +++ b/FCLauncher/src/main/jni/awt/awt_bridge.c @@ -79,6 +79,22 @@ Java_sun_awt_peer_cacio_FCLClipboard_clipboardCopy(JNIEnv *env, jclass clazz, js (*env)->ReleaseStringUTFChars(env, str, stringChars); } +JNIEXPORT void JNICALL Java_net_java_openjdk_cacio_ctc_CTCClipboard_nQuerySystemClipboard(JNIEnv *env, jclass clazz) { +//TODO: implement +} + +JNIEXPORT void JNICALL Java_net_java_openjdk_cacio_ctc_CTCClipboard_nPutClipboardData(JNIEnv* env, jclass clazz, jstring clipboardData, jstring clipboardDataMime) { +//TODO: implement +} + +JNIEXPORT void JNICALL Java_com_github_caciocavallosilano_cacio_ctc_CTCClipboard_nQuerySystemClipboard(JNIEnv *env, jclass clazz) { + Java_net_java_openjdk_cacio_ctc_CTCClipboard_nQuerySystemClipboard(env, clazz); +} + +JNIEXPORT void JNICALL Java_com_github_caciocavallosilano_cacio_ctc_CTCClipboard_nPutClipboardData(JNIEnv* env, jclass clazz, jstring clipboardData, jstring clipboardDataMime) { + Java_net_java_openjdk_cacio_ctc_CTCClipboard_nPutClipboardData(env, clazz, clipboardData, clipboardDataMime); +} + JNIEXPORT jintArray JNICALL Java_com_tungsten_fclauncher_bridge_FCLBridge_renderAWTScreenFrame(JNIEnv* env, jclass clazz) { if (runtimeJNIEnvPtr_GRAPHICS == NULL) { if (runtimeJavaVMPtr == NULL) { diff --git a/FCLauncher/src/main/jni/fcl/fcl_bridge.c b/FCLauncher/src/main/jni/fcl/fcl_bridge.c index 4f2ec28d..f7133f2a 100644 --- a/FCLauncher/src/main/jni/fcl/fcl_bridge.c +++ b/FCLauncher/src/main/jni/fcl/fcl_bridge.c @@ -14,7 +14,7 @@ struct FCLInternal *fcl; __attribute__((constructor)) void env_init() { char* strptr_env = getenv("FCL_ENVIRON"); if (strptr_env == NULL) { - __android_log_print(ANDROID_LOG_INFO, "Environ", "No environ found, creating..."); + __android_log_print(ANDROID_LOG_INFO, "Environ", "No FCL environ found, creating..."); fcl = malloc(sizeof(struct FCLInternal)); assert(fcl); memset(fcl, 0 , sizeof(struct FCLInternal)); @@ -23,16 +23,12 @@ __attribute__((constructor)) void env_init() { setenv("FCL_ENVIRON", strptr_env, 1); free(strptr_env); } else { - __android_log_print(ANDROID_LOG_INFO, "Environ", "Found existing environ: %s", strptr_env); + __android_log_print(ANDROID_LOG_INFO, "Environ", "Found existing FCL environ: %s", strptr_env); fcl = (void*) strtoul(strptr_env, NULL, 0x10); } __android_log_print(ANDROID_LOG_INFO, "Environ", "%p", fcl); } -ANativeWindow* fclGetNativeWindow() { - return fcl->window; -} - void fclSetPrimaryClipString(const char* string) { PrepareFCLBridgeJNI(); CallFCLBridgeJNIFunc( , Void, setPrimaryClipString, "(Ljava/lang/String;)V", (*env)->NewStringUTF(env, string)); @@ -55,11 +51,6 @@ const char* fclGetPrimaryClipString() { return fcl->clipboard_string; } -JNIEXPORT void JNICALL Java_com_tungsten_fclauncher_bridge_FCLBridge_setFCLNativeWindow(JNIEnv* env, jclass clazz, jobject surface) { - fcl->window = ANativeWindow_fromSurface(env, surface); - FCL_INTERNAL_LOG("setFCLNativeWindow : %p, size : %dx%d", fcl->window, ANativeWindow_getWidth(fcl->window), ANativeWindow_getHeight(fcl->window)); -} - JNIEXPORT void JNICALL Java_com_tungsten_fclauncher_bridge_FCLBridge_setFCLBridge(JNIEnv *env, jobject thiz, jobject fcl_bridge) { fcl->object_FCLBridge = (jclass)(*env)->NewGlobalRef(env, thiz); } diff --git a/FCLauncher/src/main/jni/fcl/fcl_event.c b/FCLauncher/src/main/jni/fcl/fcl_event.c index 7ba881bc..864e460c 100644 --- a/FCLauncher/src/main/jni/fcl/fcl_event.c +++ b/FCLauncher/src/main/jni/fcl/fcl_event.c @@ -5,58 +5,6 @@ #include #include -void EventQueue_init(EventQueue* queue) { - queue->count = 0; - queue->head = NULL; - queue->tail = NULL; -} - -FCLEvent* EventQueue_add(EventQueue* queue) { - FCLEvent* ret = NULL; - QueueElement* e = malloc(sizeof(QueueElement)); - if (e != NULL) { - e->next = NULL; - if (queue->count > 0) { - queue->tail->next = e; - queue->tail = e; - } - else { // count == 0 - queue->head = e; - queue->tail = e; - } - queue->count++; - ret = &queue->tail->event; - } - return ret; -} - -int EventQueue_take(EventQueue* queue, FCLEvent* event) { - int ret = 0; - if (queue->count > 0) { - QueueElement* e = queue->head; - if (queue->count == 1) { - queue->head = NULL; - queue->tail = NULL; - } - else { - queue->head = e->next; - } - queue->count--; - ret = 1; - if (event != NULL) { - memcpy(event, &e->event, sizeof(FCLEvent)); - } - free(e); - } - return ret; -} - -void EventQueue_clear(EventQueue* queue) { - while (queue->count > 0) { - EventQueue_take(queue, NULL); - } -} - FCLinjectorfun injectorCallback; void fclSetInjectorCallback(FCLinjectorfun callback) { @@ -64,131 +12,11 @@ void fclSetInjectorCallback(FCLinjectorfun callback) { } void fclSetHitResultType(int type) { - if (!fcl->has_event_pipe) { - return; - } PrepareFCLBridgeJNI(); CallFCLBridgeJNIFunc( , Void, setHitResultType, "(I)V", type); } -void fclSetCursorMode(int mode) { - if (!fcl->has_event_pipe) { - return; - } - PrepareFCLBridgeJNI(); - CallFCLBridgeJNIFunc( , Void, setCursorMode, "(I)V", mode); -} - -int fclGetEventFd() { - if (!fcl->has_event_pipe) { - return -1; - } - return fcl->event_pipe_fd[0]; -} - -int fclWaitForEvent(int timeout) { - if (!fcl->has_event_pipe) { - return 0; - } - struct epoll_event ev; - int ret = epoll_wait(fcl->epoll_fd, &ev, 1, timeout); - if (ret > 0 && (ev.events & EPOLLIN)) { - return 1; - } - return 0; -} - -int fclPollEvent(FCLEvent* event) { - if (!fcl->has_event_pipe) { - return 0; - } - if (pthread_mutex_lock(&fcl->event_queue_mutex)) { - FCL_INTERNAL_LOG("Failed to acquire mutex"); - return 0; - } - char c; - int ret = 0; - if (read(fcl->event_pipe_fd[0], &c, 1) > 0) { - ret = EventQueue_take(&fcl->event_queue, event); - } - if (pthread_mutex_unlock(&fcl->event_queue_mutex)) { - FCL_INTERNAL_LOG("Failed to release mutex"); - return 0; - } - return ret; -} - JNIEXPORT void JNICALL Java_com_tungsten_fclauncher_bridge_FCLBridge_refreshHitResultType(JNIEnv *env, jobject thiz) { if (injectorCallback) injectorCallback(); -} - -JNIEXPORT void JNICALL Java_com_tungsten_fclauncher_bridge_FCLBridge_pushEvent(JNIEnv* env, jclass clazz, jlong time, jint type, jint p1, jint p2) { - if (!fcl->has_event_pipe) { - return; - } - if (pthread_mutex_lock(&fcl->event_queue_mutex)) { - FCL_INTERNAL_LOG("Failed to acquire mutex"); - return; - } - FCLEvent* event = EventQueue_add(&fcl->event_queue); - if (event == NULL) { - FCL_INTERNAL_LOG("Failed to add event to event queue"); - return; - } - event->time = time; - event->type = type; - event->state = 0; - switch (type) { - case KeyChar: - event->keychar = p2; - break; - case MotionNotify: - event->x = p1; - event->y = p2; - break; - case ButtonPress: - case ButtonRelease: - event->button = p1; - break; - case KeyPress: - case KeyRelease: - event->keycode = p1; - event->keychar = p2; - break; - case ConfigureNotify: - event->width = p1; - event->height = p2; - break; - case FCLMessage: - event->message = p1; - break; - } - write(fcl->event_pipe_fd[1], "E", 1); - if (pthread_mutex_unlock(&fcl->event_queue_mutex)) { - FCL_INTERNAL_LOG("Failed to release mutex"); - } -} - -JNIEXPORT void JNICALL Java_com_tungsten_fclauncher_bridge_FCLBridge_setEventPipe(JNIEnv* env, jclass clazz) { - if (pipe(fcl->event_pipe_fd) == -1) { - FCL_INTERNAL_LOG("Failed to create event pipe : %s", strerror(errno)); - return; - } - fcl->epoll_fd = epoll_create(3); - if (fcl->epoll_fd == -1) { - FCL_INTERNAL_LOG("Failed to get epoll fd : %s", strerror(errno)); - return; - } - struct epoll_event ev; - ev.events = EPOLLIN; - ev.data.fd = fcl->event_pipe_fd[0]; - if (epoll_ctl(fcl->epoll_fd, EPOLL_CTL_ADD, fcl->event_pipe_fd[0], &ev) == -1) { - FCL_INTERNAL_LOG("Failed to add epoll event : %s", strerror(errno)); - return; - } - EventQueue_init(&fcl->event_queue); - pthread_mutex_init(&fcl->event_queue_mutex, NULL); - fcl->has_event_pipe = 1; - FCL_INTERNAL_LOG("Succeeded to set event pipe"); } \ No newline at end of file diff --git a/FCLauncher/src/main/jni/fcl/include/fcl_bridge.h b/FCLauncher/src/main/jni/fcl/include/fcl_bridge.h index 5d6a3b15..f1910376 100644 --- a/FCLauncher/src/main/jni/fcl/include/fcl_bridge.h +++ b/FCLauncher/src/main/jni/fcl/include/fcl_bridge.h @@ -10,14 +10,8 @@ typedef void (* FCLinjectorfun)(); -ANativeWindow* fclGetNativeWindow(void); -int fclWaitForEvent(int timeout); -int fclPollEvent(FCLEvent* event); -int fclGetEventFd(void); -void fclLog(const char *buffer); void fclSetInjectorCallback(FCLinjectorfun callback); void fclSetHitResultType(int type); -void fclSetCursorMode(int mode); void fclSetPrimaryClipString(const char* string); const char* fclGetPrimaryClipString(void); diff --git a/FCLauncher/src/main/jni/fcl/include/fcl_internal.h b/FCLauncher/src/main/jni/fcl/include/fcl_internal.h index 4dc19a83..f291a2dc 100644 --- a/FCLauncher/src/main/jni/fcl/include/fcl_internal.h +++ b/FCLauncher/src/main/jni/fcl/include/fcl_internal.h @@ -17,29 +17,12 @@ #include "fcl_bridge.h" #include "fcl_keycodes.h" -typedef struct _QueueElement { - struct _QueueElement* next; - FCLEvent event; -} QueueElement; - -typedef struct { - int count; - int capacity; - QueueElement* head; - QueueElement* tail; -} EventQueue; - struct FCLInternal { JavaVM* android_jvm; jclass class_FCLBridge; jobject object_FCLBridge; ANativeWindow* window; char* clipboard_string; - EventQueue event_queue; - pthread_mutex_t event_queue_mutex; - int has_event_pipe; - int event_pipe_fd[2]; - int epoll_fd; FILE* logFile; }; diff --git a/FCLauncher/src/main/jni/fcl/include/utils.h b/FCLauncher/src/main/jni/fcl/include/utils.h new file mode 100644 index 00000000..59c27b0f --- /dev/null +++ b/FCLauncher/src/main/jni/fcl/include/utils.h @@ -0,0 +1,10 @@ +// +// Created by mio on 2024/8/22. +// + +#ifndef FOLD_CRAFT_LAUNCHER_UTILS_H +#define FOLD_CRAFT_LAUNCHER_UTILS_H + +void printVulkanInfo(void*); + +#endif //FOLD_CRAFT_LAUNCHER_UTILS_H diff --git a/FCLauncher/src/main/jni/fcl/utils.c b/FCLauncher/src/main/jni/fcl/utils.c new file mode 100644 index 00000000..6c0c2f68 --- /dev/null +++ b/FCLauncher/src/main/jni/fcl/utils.c @@ -0,0 +1,46 @@ +// +// Created by mio on 2024/8/22. +// +#include +#include +#include "utils.h" +#include "fcl_internal.h" + +void printVulkanInfo(void *handle) { + PFN_vkCreateInstance vkCreateInstance; + PFN_vkDestroyInstance vkDestroyInstance; + PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; + PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures; + PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceProperties; + vkCreateInstance = dlsym(handle, "vkCreateInstance"); + vkDestroyInstance = dlsym(handle, "vkDestroyInstance"); + vkEnumeratePhysicalDevices = dlsym(handle, "vkEnumeratePhysicalDevices"); + vkGetPhysicalDeviceFeatures = dlsym(handle, "vkGetPhysicalDeviceFeatures"); + vkGetPhysicalDeviceProperties = dlsym(handle, "vkGetPhysicalDeviceProperties"); + VkInstanceCreateInfo instanceCreateInfo = { + .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO + }; + VkInstance instance/* = malloc(sizeof(VkInstance))*/; + if (vkCreateInstance(&instanceCreateInfo, 0, &instance) != 0) { + FCL_INTERNAL_LOG("vkCreateInstance error"); + return; + } + uint32_t gpu_count; + if (vkEnumeratePhysicalDevices(instance, &gpu_count, NULL) != 0) { + FCL_INTERNAL_LOG("vkEnumeratePhysicalDevices error"); + return; + } + VkPhysicalDevice *gpus = (VkPhysicalDevice *) malloc(sizeof(VkPhysicalDevice) * gpu_count); + if (vkEnumeratePhysicalDevices(instance, &gpu_count, gpus) != 0) { + FCL_INTERNAL_LOG("vkEnumeratePhysicalDevices error"); + return; + } + VkPhysicalDevice gpu = gpus[0]; + VkPhysicalDeviceProperties gpuProperties; + vkGetPhysicalDeviceProperties(gpu, &gpuProperties); + FCL_INTERNAL_LOG("Vulkan api version:%d.%d.%d", + VK_VERSION_MAJOR(gpuProperties.apiVersion), + VK_VERSION_MINOR(gpuProperties.apiVersion), + VK_VERSION_PATCH(gpuProperties.apiVersion)); + vkDestroyInstance(instance, 0); +} diff --git a/FCLauncher/src/main/jni/glfw/context.c b/FCLauncher/src/main/jni/glfw/context.c deleted file mode 100644 index f1a705e3..00000000 --- a/FCLauncher/src/main/jni/glfw/context.c +++ /dev/null @@ -1,565 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include -#include -#include -#include -#include "fcl_bridge.h" - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -// Checks whether the desired context attributes are valid -// -// This function checks things like whether the specified client API version -// exists and whether all relevant options have supported and non-conflicting -// values -// -GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig* ctxconfig) -{ - if (ctxconfig->share) - { - if (ctxconfig->client == GLFW_NO_API || - ctxconfig->share->context.client == GLFW_NO_API) - { - _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL); - return GLFW_FALSE; - } - } - - if (ctxconfig->source != GLFW_NATIVE_CONTEXT_API && - ctxconfig->source != GLFW_EGL_CONTEXT_API && - ctxconfig->source != GLFW_OSMESA_CONTEXT_API) - { - _glfwInputError(GLFW_INVALID_ENUM, - "Invalid context creation API 0x%08X", - ctxconfig->source); - return GLFW_FALSE; - } - - if (ctxconfig->client != GLFW_NO_API && - ctxconfig->client != GLFW_OPENGL_API && - ctxconfig->client != GLFW_OPENGL_ES_API) - { - _glfwInputError(GLFW_INVALID_ENUM, - "Invalid client API 0x%08X", - ctxconfig->client); - return GLFW_FALSE; - } - - if (ctxconfig->client == GLFW_OPENGL_API) - { - if ((ctxconfig->major < 1 || ctxconfig->minor < 0) || - (ctxconfig->major == 1 && ctxconfig->minor > 5) || - (ctxconfig->major == 2 && ctxconfig->minor > 1) || - (ctxconfig->major == 3 && ctxconfig->minor > 3)) - { - // OpenGL 1.0 is the smallest valid version - // OpenGL 1.x series ended with version 1.5 - // OpenGL 2.x series ended with version 2.1 - // OpenGL 3.x series ended with version 3.3 - // For now, let everything else through - - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid OpenGL version %i.%i", - ctxconfig->major, ctxconfig->minor); - return GLFW_FALSE; - } - - if (ctxconfig->profile) - { - if (ctxconfig->profile != GLFW_OPENGL_CORE_PROFILE && - ctxconfig->profile != GLFW_OPENGL_COMPAT_PROFILE) - { - _glfwInputError(GLFW_INVALID_ENUM, - "Invalid OpenGL profile 0x%08X", - ctxconfig->profile); - return GLFW_FALSE; - } - - if (ctxconfig->major <= 2 || - (ctxconfig->major == 3 && ctxconfig->minor < 2)) - { - // Desktop OpenGL context profiles are only defined for version 3.2 - // and above - - _glfwInputError(GLFW_INVALID_VALUE, - "Context profiles are only defined for OpenGL version 3.2 and above"); - return GLFW_FALSE; - } - } - - if (ctxconfig->forward && ctxconfig->major <= 2) - { - // Forward-compatible contexts are only defined for OpenGL version 3.0 and above - _glfwInputError(GLFW_INVALID_VALUE, - "Forward-compatibility is only defined for OpenGL version 3.0 and above"); - return GLFW_FALSE; - } - } - else if (ctxconfig->client == GLFW_OPENGL_ES_API) - { - if (ctxconfig->major < 1 || ctxconfig->minor < 0 || - (ctxconfig->major == 1 && ctxconfig->minor > 1) || - (ctxconfig->major == 2 && ctxconfig->minor > 0)) - { - // OpenGL ES 1.0 is the smallest valid version - // OpenGL ES 1.x series ended with version 1.1 - // OpenGL ES 2.x series ended with version 2.0 - // For now, let everything else through - - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid OpenGL ES version %i.%i", - ctxconfig->major, ctxconfig->minor); - return GLFW_FALSE; - } - } - - if (ctxconfig->robustness) - { - if (ctxconfig->robustness != GLFW_NO_RESET_NOTIFICATION && - ctxconfig->robustness != GLFW_LOSE_CONTEXT_ON_RESET) - { - _glfwInputError(GLFW_INVALID_ENUM, - "Invalid context robustness mode 0x%08X", - ctxconfig->robustness); - return GLFW_FALSE; - } - } - - if (ctxconfig->release) - { - if (ctxconfig->release != GLFW_RELEASE_BEHAVIOR_NONE && - ctxconfig->release != GLFW_RELEASE_BEHAVIOR_FLUSH) - { - _glfwInputError(GLFW_INVALID_ENUM, - "Invalid context release behavior 0x%08X", - ctxconfig->release); - return GLFW_FALSE; - } - } - - return GLFW_TRUE; -} - -// Retrieves the attributes of the current context -// -GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig) -{ - int i; - _GLFWwindow* previous; - const char* version; - const char* prefixes[] = - { - "OpenGL ES-CM ", - "OpenGL ES-CL ", - "OpenGL ES ", - NULL - }; - - window->context.source = ctxconfig->source; - window->context.client = GLFW_OPENGL_API; - - previous = _glfwPlatformGetTls(&_glfw.contextSlot); - glfwMakeContextCurrent((GLFWwindow*) window); - - window->context.GetIntegerv = (PFNGLGETINTEGERVPROC) - window->context.getProcAddress("glGetIntegerv"); - window->context.GetString = (PFNGLGETSTRINGPROC) - window->context.getProcAddress("glGetString"); - if (!window->context.GetIntegerv || !window->context.GetString) - { - _glfwInputError(GLFW_PLATFORM_ERROR, "Entry point retrieval is broken"); - glfwMakeContextCurrent((GLFWwindow*) previous); - return GLFW_FALSE; - } - - version = (const char*) window->context.GetString(GL_VERSION); - if (!version) - { - if (ctxconfig->client == GLFW_OPENGL_API) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "OpenGL version string retrieval is broken"); - } - else - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "OpenGL ES version string retrieval is broken"); - } - - glfwMakeContextCurrent((GLFWwindow*) previous); - return GLFW_FALSE; - } - - for (i = 0; prefixes[i]; i++) - { - const size_t length = strlen(prefixes[i]); - - if (strncmp(version, prefixes[i], length) == 0) - { - version += length; - window->context.client = GLFW_OPENGL_ES_API; - break; - } - } - - if (!sscanf(version, "%d.%d.%d", - &window->context.major, - &window->context.minor, - &window->context.revision)) - { - if (window->context.client == GLFW_OPENGL_API) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "No version found in OpenGL version string"); - } - else - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "No version found in OpenGL ES version string"); - } - - glfwMakeContextCurrent((GLFWwindow*) previous); - return GLFW_FALSE; - } - - if (window->context.major >= 3) - { - // OpenGL 3.0+ uses a different function for extension string retrieval - // We cache it here instead of in glfwExtensionSupported mostly to alert - // users as early as possible that their build may be broken - - window->context.GetStringi = (PFNGLGETSTRINGIPROC) - window->context.getProcAddress("glGetStringi"); - if (!window->context.GetStringi) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "Entry point retrieval is broken"); - glfwMakeContextCurrent((GLFWwindow*) previous); - return GLFW_FALSE; - } - } - - if (window->context.client == GLFW_OPENGL_API) - { - // Read back context flags (OpenGL 3.0 and above) - if (window->context.major >= 3) - { - GLint flags; - window->context.GetIntegerv(GL_CONTEXT_FLAGS, &flags); - - if (flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) - window->context.forward = GLFW_TRUE; - - if (flags & GL_CONTEXT_FLAG_DEBUG_BIT) - window->context.debug = GLFW_TRUE; - else if (glfwExtensionSupported("GL_ARB_debug_output") && - ctxconfig->debug) - { - // HACK: This is a workaround for older drivers (pre KHR_debug) - // not setting the debug bit in the context flags for - // debug contexts - window->context.debug = GLFW_TRUE; - } - - if (flags & GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR) - window->context.noerror = GLFW_TRUE; - } - - // Read back OpenGL context profile (OpenGL 3.2 and above) - if (window->context.major >= 4 || - (window->context.major == 3 && window->context.minor >= 2)) - { - GLint mask; - window->context.GetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask); - - if (mask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) - window->context.profile = GLFW_OPENGL_COMPAT_PROFILE; - else if (mask & GL_CONTEXT_CORE_PROFILE_BIT) - window->context.profile = GLFW_OPENGL_CORE_PROFILE; - else if (glfwExtensionSupported("GL_ARB_compatibility")) - { - // HACK: This is a workaround for the compatibility profile bit - // not being set in the context flags if an OpenGL 3.2+ - // context was created without having requested a specific - // version - window->context.profile = GLFW_OPENGL_COMPAT_PROFILE; - } - } - - // Read back robustness strategy - if (glfwExtensionSupported("GL_ARB_robustness")) - { - // NOTE: We avoid using the context flags for detection, as they are - // only present from 3.0 while the extension applies from 1.1 - - GLint strategy; - window->context.GetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, - &strategy); - - if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB) - window->context.robustness = GLFW_LOSE_CONTEXT_ON_RESET; - else if (strategy == GL_NO_RESET_NOTIFICATION_ARB) - window->context.robustness = GLFW_NO_RESET_NOTIFICATION; - } - } - else - { - // Read back robustness strategy - if (glfwExtensionSupported("GL_EXT_robustness")) - { - // NOTE: The values of these constants match those of the OpenGL ARB - // one, so we can reuse them here - - GLint strategy; - window->context.GetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, - &strategy); - - if (strategy == GL_LOSE_CONTEXT_ON_RESET_ARB) - window->context.robustness = GLFW_LOSE_CONTEXT_ON_RESET; - else if (strategy == GL_NO_RESET_NOTIFICATION_ARB) - window->context.robustness = GLFW_NO_RESET_NOTIFICATION; - } - } - - if (glfwExtensionSupported("GL_KHR_context_flush_control")) - { - GLint behavior; - window->context.GetIntegerv(GL_CONTEXT_RELEASE_BEHAVIOR, &behavior); - - if (behavior == GL_NONE) - window->context.release = GLFW_RELEASE_BEHAVIOR_NONE; - else if (behavior == GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH) - window->context.release = GLFW_RELEASE_BEHAVIOR_FLUSH; - } - - // Clearing the front buffer to black to avoid garbage pixels left over from - // previous uses of our bit of VRAM - { - PFNGLCLEARPROC glClear = (PFNGLCLEARPROC) - window->context.getProcAddress("glClear"); - glClear(GL_COLOR_BUFFER_BIT); - - if (window->doublebuffer) - window->context.swapBuffers(window); - } - - glfwMakeContextCurrent((GLFWwindow*) previous); - return GLFW_TRUE; -} - -// Searches an extension string for the specified extension -// -GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions) -{ - const char* start = extensions; - - for (;;) - { - const char* where; - const char* terminator; - - where = strstr(start, string); - if (!where) - return GLFW_FALSE; - - terminator = where + strlen(string); - if (where == start || *(where - 1) == ' ') - { - if (*terminator == ' ' || *terminator == '\0') - break; - } - - start = terminator; - } - - return GLFW_TRUE; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW public API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI int glfwGetOSMesaWidth() { - struct ANativeWindow* window = fclGetNativeWindow(); - return ANativeWindow_getWidth(window); -} - -GLFWAPI int glfwGetOSMesaHeight() { - struct ANativeWindow* window = fclGetNativeWindow(); - return ANativeWindow_getHeight(window); -} - -GLFWAPI void* glfwGetOSMesaCurrentContext() { - if (!_glfw.osmesa.GetCurrentContext) - { - _glfwInputError(GLFW_PLATFORM_ERROR, "OSMesa: Failed to load required entry points"); - _glfwTerminateOSMesa(); - return GLFW_FALSE; - } - return OSMesaGetCurrentContext(); -} - -GLFWAPI long glfwGetGraphicBuffersAddr(GLFWwindow* handle) { - _GLFWwindow* window = (_GLFWwindow*) handle; - return &window->context.osmesa.buffer; -} - -GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - _GLFWwindow* previous = _glfwPlatformGetTls(&_glfw.contextSlot); - - _GLFW_REQUIRE_INIT(); - - if (window && window->context.client == GLFW_NO_API) - { - _glfwInputError(GLFW_NO_WINDOW_CONTEXT, - "Cannot make current with a window that has no OpenGL or OpenGL ES context"); - return; - } - - if (previous) - { - if (!window || window->context.source != previous->context.source) - previous->context.makeCurrent(NULL); - } - - if (window) - window->context.makeCurrent(window); -} - -GLFWAPI GLFWwindow* glfwGetCurrentContext(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return _glfwPlatformGetTls(&_glfw.contextSlot); -} - -GLFWAPI void glfwSwapBuffers(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (window->context.client == GLFW_NO_API) - { - _glfwInputError(GLFW_NO_WINDOW_CONTEXT, - "Cannot swap buffers of a window that has no OpenGL or OpenGL ES context"); - return; - } - - window->context.swapBuffers(window); -} - -GLFWAPI void glfwSwapInterval(int interval) -{ - _GLFWwindow* window; - - _GLFW_REQUIRE_INIT(); - - window = _glfwPlatformGetTls(&_glfw.contextSlot); - if (!window) - { - _glfwInputError(GLFW_NO_CURRENT_CONTEXT, - "Cannot set swap interval without a current OpenGL or OpenGL ES context"); - return; - } - - window->context.swapInterval(interval); -} - -GLFWAPI int glfwExtensionSupported(const char* extension) -{ - _GLFWwindow* window; - assert(extension != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE); - - window = _glfwPlatformGetTls(&_glfw.contextSlot); - if (!window) - { - _glfwInputError(GLFW_NO_CURRENT_CONTEXT, - "Cannot query extension without a current OpenGL or OpenGL ES context"); - return GLFW_FALSE; - } - - if (*extension == '\0') - { - _glfwInputError(GLFW_INVALID_VALUE, "Extension name cannot be an empty string"); - return GLFW_FALSE; - } - - if (window->context.major >= 3) - { - int i; - GLint count; - - // Check if extension is in the modern OpenGL extensions string list - - window->context.GetIntegerv(GL_NUM_EXTENSIONS, &count); - - for (i = 0; i < count; i++) - { - const char* en = (const char*) - window->context.GetStringi(GL_EXTENSIONS, i); - if (!en) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "Extension string retrieval is broken"); - return GLFW_FALSE; - } - - if (strcmp(en, extension) == 0) - return GLFW_TRUE; - } - } - else - { - // Check if extension is in the old style OpenGL extensions string - - const char* extensions = (const char*) - window->context.GetString(GL_EXTENSIONS); - if (!extensions) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "Extension string retrieval is broken"); - return GLFW_FALSE; - } - - if (_glfwStringInExtensionString(extension, extensions)) - return GLFW_TRUE; - } - - // Check if extension is in the platform-specific string - return window->context.extensionSupported(extension); -} - -GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname) -{ - _GLFWwindow* window; - assert(procname != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - window = _glfwPlatformGetTls(&_glfw.contextSlot); - if (!window) - { - _glfwInputError(GLFW_NO_CURRENT_CONTEXT, - "Cannot query entry point without a current OpenGL or OpenGL ES context"); - return NULL; - } - - return window->context.getProcAddress(procname); -} - diff --git a/FCLauncher/src/main/jni/glfw/driver_helper.c b/FCLauncher/src/main/jni/glfw/driver_helper.c deleted file mode 100644 index 4454807c..00000000 --- a/FCLauncher/src/main/jni/glfw/driver_helper.c +++ /dev/null @@ -1,80 +0,0 @@ -// -// Created by hanji on 2023/8/2. -// - -#include -#include -#include -#include -#include -#include -#include "driver_helper/nsbypass.h" -#include "gl/gl.h" - -//#define ADRENO_POSSIBLE -#ifdef ADRENO_POSSIBLE -//Checks if your graphics are Adreno. Returns true if your graphics are Adreno, false otherwise or if there was an error -bool checkAdrenoGraphics() { - EGLDisplay eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); - if(eglDisplay == EGL_NO_DISPLAY || eglInitialize(eglDisplay, NULL, NULL) != EGL_TRUE) return false; - EGLint egl_attributes[] = { EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_DEPTH_SIZE, 24, EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE }; - EGLint num_configs = 0; - if(eglChooseConfig(eglDisplay, egl_attributes, NULL, 0, &num_configs) != EGL_TRUE || num_configs == 0) { - eglTerminate(eglDisplay); - return false; - } - EGLConfig eglConfig; - eglChooseConfig(eglDisplay, egl_attributes, &eglConfig, 1, &num_configs); - const EGLint egl_context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE }; - EGLContext context = eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, egl_context_attributes); - if(context == EGL_NO_CONTEXT) { - eglTerminate(eglDisplay); - return false; - } - if(eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, context) != EGL_TRUE) { - eglDestroyContext(eglDisplay, context); - eglTerminate(eglDisplay); - } - const char* vendor = glGetString(GL_VENDOR); - const char* renderer = glGetString(GL_RENDERER); - bool is_adreno = false; - if(strcmp(vendor, "Qualcomm") == 0 && strstr(renderer, "Adreno") != NULL) { - is_adreno = true; // TODO: check for Turnip support - } - eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(eglDisplay, context); - eglTerminate(eglDisplay); - return is_adreno; -} -void* load_turnip_vulkan() { - if(!checkAdrenoGraphics()) return NULL; - const char* native_dir = getenv("FCL_NATIVEDIR"); - const char* cache_dir = getenv("TMPDIR"); - if(!linker_ns_load(native_dir)) return NULL; - void* linkerhook = linker_ns_dlopen("liblinkerhook.so", RTLD_LOCAL | RTLD_NOW); - if(linkerhook == NULL) return NULL; - void* turnip_driver_handle = linker_ns_dlopen("libvulkan_freedreno.so", RTLD_LOCAL | RTLD_NOW); - if(turnip_driver_handle == NULL) { - printf("AdrenoSupp: Failed to load Turnip!\n%s\n", dlerror()); - dlclose(linkerhook); - return NULL; - } - void* dl_android = linker_ns_dlopen("libdl_android.so", RTLD_LOCAL | RTLD_LAZY); - if(dl_android == NULL) { - dlclose(linkerhook); - dlclose(turnip_driver_handle); - return NULL; - } - void* android_get_exported_namespace = dlsym(dl_android, "android_get_exported_namespace"); - void (*linkerhook_pass_handles)(void*, void*, void*) = dlsym(linkerhook, "app__pojav_linkerhook_pass_handles"); - if(linkerhook_pass_handles == NULL || android_get_exported_namespace == NULL) { - dlclose(dl_android); - dlclose(linkerhook); - dlclose(turnip_driver_handle); - return NULL; - } - linkerhook_pass_handles(turnip_driver_handle, android_dlopen_ext, android_get_exported_namespace); - void* libvulkan = linker_ns_dlopen_unique(cache_dir, "libvulkan.so", RTLD_LOCAL | RTLD_NOW); - return libvulkan; -} -#endif \ No newline at end of file diff --git a/FCLauncher/src/main/jni/glfw/egl_context.c b/FCLauncher/src/main/jni/glfw/egl_context.c deleted file mode 100644 index 7f612223..00000000 --- a/FCLauncher/src/main/jni/glfw/egl_context.c +++ /dev/null @@ -1,499 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include -#include -#include - - -// Return a description of the specified EGL error -// -static const char* getEGLErrorString(EGLint error) -{ - switch (error) - { - case EGL_SUCCESS: - return "Success"; - case EGL_NOT_INITIALIZED: - return "EGL is not or could not be initialized"; - case EGL_BAD_ACCESS: - return "EGL cannot access a requested resource"; - case EGL_BAD_ALLOC: - return "EGL failed to allocate resources for the requested operation"; - case EGL_BAD_ATTRIBUTE: - return "An unrecognized attribute or attribute value was passed in the attribute list"; - case EGL_BAD_CONTEXT: - return "An EGLContext argument does not name a valid EGL rendering context"; - case EGL_BAD_CONFIG: - return "An EGLConfig argument does not name a valid EGL frame buffer configuration"; - case EGL_BAD_CURRENT_SURFACE: - return "The current surface of the calling thread is a window, pixel buffer or pixmap that is no longer valid"; - case EGL_BAD_DISPLAY: - return "An EGLDisplay argument does not name a valid EGL display connection"; - case EGL_BAD_SURFACE: - return "An EGLSurface argument does not name a valid surface configured for GL rendering"; - case EGL_BAD_MATCH: - return "Arguments are inconsistent"; - case EGL_BAD_PARAMETER: - return "One or more argument values are invalid"; - case EGL_BAD_NATIVE_PIXMAP: - return "A NativePixmapType argument does not refer to a valid native pixmap"; - case EGL_BAD_NATIVE_WINDOW: - return "A NativeWindowType argument does not refer to a valid native window"; - case EGL_CONTEXT_LOST: - return "The application must destroy all contexts and reinitialise"; - default: - return "ERROR: UNKNOWN EGL ERROR"; - } -} - -static void makeContextCurrentEGL(_GLFWwindow* window) -{ - if (window) - { - if (!eglMakeCurrent(_glfw.egl.display, - window->context.egl.surface, - window->context.egl.surface, - window->context.egl.handle)) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "EGL: Failed to make context current: %s", - getEGLErrorString(eglGetError())); - return; - } - } - else - { - if (!eglMakeCurrent(_glfw.egl.display, - EGL_NO_SURFACE, - EGL_NO_SURFACE, - EGL_NO_CONTEXT)) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "EGL: Failed to clear current context: %s", - getEGLErrorString(eglGetError())); - return; - } - } - - _glfwPlatformSetTls(&_glfw.contextSlot, window); -} - -static void swapBuffersEGL(_GLFWwindow* window) -{ - if (window != _glfwPlatformGetTls(&_glfw.contextSlot)) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "EGL: The context must be current on the calling thread when swapping buffers"); - return; - } - - eglSwapBuffers(_glfw.egl.display, window->context.egl.surface); -} - -static void swapIntervalEGL(int interval) -{ - eglSwapInterval(_glfw.egl.display, interval); -} - -static int extensionSupportedEGL(const char* extension) -{ - const char* extensions = eglQueryString(_glfw.egl.display, EGL_EXTENSIONS); - if (extensions) - { - if (_glfwStringInExtensionString(extension, extensions)) - return GLFW_TRUE; - } - - return GLFW_FALSE; -} - -static GLFWglproc getProcAddressEGL(const char* procname) -{ - _GLFWwindow* window = _glfwPlatformGetTls(&_glfw.contextSlot); - - if (window->context.egl.client) - { - GLFWglproc proc = (GLFWglproc) _glfw_dlsym(window->context.egl.client, - procname); - if (proc) - return proc; - } - - return eglGetProcAddress(procname); -} - -static void destroyContextEGL(_GLFWwindow* window) -{ - { - if (window->context.egl.client) - { - _glfw_dlclose(window->context.egl.client); - window->context.egl.client = NULL; - } - } - - if (window->context.egl.surface) - { - eglDestroySurface(_glfw.egl.display, window->context.egl.surface); - window->context.egl.surface = EGL_NO_SURFACE; - } - - if (window->context.egl.handle) - { - eglDestroyContext(_glfw.egl.display, window->context.egl.handle); - window->context.egl.handle = EGL_NO_CONTEXT; - } -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -// Initialize EGL -// -GLFWbool _glfwInitEGL(void) -{ - int i; - const char* sonames[] = - { - getenv("LIBEGL_NAME") - }; - - if (_glfw.egl.handle) - return GLFW_TRUE; - - for (i = 0; sonames[i]; i++) - { - _glfw.egl.handle = _glfw_dlopen(sonames[i]); - if (_glfw.egl.handle) - break; - } - - if (!_glfw.egl.handle) - { - _glfwInputError(GLFW_API_UNAVAILABLE, "EGL: Library not found"); - return GLFW_FALSE; - } - - const char* lib = getenv("LIBGL_NAME"); - _glfw_dlopen(lib); - - _glfw.egl.prefix = (strncmp(sonames[i], "lib", 3) == 0); - - _glfw.egl.GetConfigAttrib = (PFN_eglGetConfigAttrib) - _glfw_dlsym(_glfw.egl.handle, "eglGetConfigAttrib"); - _glfw.egl.GetConfigs = (PFN_eglGetConfigs) - _glfw_dlsym(_glfw.egl.handle, "eglGetConfigs"); - _glfw.egl.ChooseConfig = (PFN_eglChooseConfig) - _glfw_dlsym(_glfw.egl.handle, "eglChooseConfig"); - _glfw.egl.GetDisplay = (PFN_eglGetDisplay) - _glfw_dlsym(_glfw.egl.handle, "eglGetDisplay"); - _glfw.egl.GetError = (PFN_eglGetError) - _glfw_dlsym(_glfw.egl.handle, "eglGetError"); - _glfw.egl.Initialize = (PFN_eglInitialize) - _glfw_dlsym(_glfw.egl.handle, "eglInitialize"); - _glfw.egl.Terminate = (PFN_eglTerminate) - _glfw_dlsym(_glfw.egl.handle, "eglTerminate"); - _glfw.egl.BindAPI = (PFN_eglBindAPI) - _glfw_dlsym(_glfw.egl.handle, "eglBindAPI"); - _glfw.egl.CreateContext = (PFN_eglCreateContext) - _glfw_dlsym(_glfw.egl.handle, "eglCreateContext"); - _glfw.egl.DestroySurface = (PFN_eglDestroySurface) - _glfw_dlsym(_glfw.egl.handle, "eglDestroySurface"); - _glfw.egl.DestroyContext = (PFN_eglDestroyContext) - _glfw_dlsym(_glfw.egl.handle, "eglDestroyContext"); - _glfw.egl.CreateWindowSurface = (PFN_eglCreateWindowSurface) - _glfw_dlsym(_glfw.egl.handle, "eglCreateWindowSurface"); - _glfw.egl.MakeCurrent = (PFN_eglMakeCurrent) - _glfw_dlsym(_glfw.egl.handle, "eglMakeCurrent"); - _glfw.egl.SwapBuffers = (PFN_eglSwapBuffers) - _glfw_dlsym(_glfw.egl.handle, "eglSwapBuffers"); - _glfw.egl.SwapInterval = (PFN_eglSwapInterval) - _glfw_dlsym(_glfw.egl.handle, "eglSwapInterval"); - _glfw.egl.QueryString = (PFN_eglQueryString) - _glfw_dlsym(_glfw.egl.handle, "eglQueryString"); - _glfw.egl.GetProcAddress = (PFN_eglGetProcAddress) - _glfw_dlsym(_glfw.egl.handle, "eglGetProcAddress"); - - if (!_glfw.egl.GetConfigAttrib || - !_glfw.egl.GetConfigs || - !_glfw.egl.GetDisplay || - !_glfw.egl.GetError || - !_glfw.egl.Initialize || - !_glfw.egl.Terminate || - !_glfw.egl.BindAPI || - !_glfw.egl.CreateContext || - !_glfw.egl.DestroySurface || - !_glfw.egl.DestroyContext || - !_glfw.egl.CreateWindowSurface || - !_glfw.egl.MakeCurrent || - !_glfw.egl.SwapBuffers || - !_glfw.egl.SwapInterval || - !_glfw.egl.QueryString || - !_glfw.egl.GetProcAddress) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "EGL: Failed to load required entry points"); - - _glfwTerminateEGL(); - return GLFW_FALSE; - } - - _glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY); - if (_glfw.egl.display == EGL_NO_DISPLAY) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "EGL: Failed to get EGL display: %s", - getEGLErrorString(eglGetError())); - - _glfwTerminateEGL(); - return GLFW_FALSE; - } - - if (!eglInitialize(_glfw.egl.display, &_glfw.egl.major, &_glfw.egl.minor)) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "EGL: Failed to initialize EGL: %s", - getEGLErrorString(eglGetError())); - - _glfwTerminateEGL(); - return GLFW_FALSE; - } - - _glfw.egl.KHR_create_context = - extensionSupportedEGL("EGL_KHR_create_context"); - _glfw.egl.KHR_create_context_no_error = - extensionSupportedEGL("EGL_KHR_create_context_no_error"); - _glfw.egl.KHR_gl_colorspace = - extensionSupportedEGL("EGL_KHR_gl_colorspace"); - _glfw.egl.KHR_get_all_proc_addresses = - extensionSupportedEGL("EGL_KHR_get_all_proc_addresses"); - _glfw.egl.KHR_context_flush_control = - extensionSupportedEGL("EGL_KHR_context_flush_control"); - - return GLFW_TRUE; -} - -// Terminate EGL -// -void _glfwTerminateEGL(void) -{ - if (_glfw.egl.display) - { - eglTerminate(_glfw.egl.display); - _glfw.egl.display = EGL_NO_DISPLAY; - } - - if (_glfw.egl.handle) - { - _glfw_dlclose(_glfw.egl.handle); - _glfw.egl.handle = NULL; - } -} - - -// Create the OpenGL or OpenGL ES context -// -GLFWbool _glfwCreateContextEGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig) -{ - EGLConfig config = malloc(sizeof(EGLConfig)); - EGLContext share = NULL; - - if (!_glfw.egl.display) - { - _glfwInputError(GLFW_API_UNAVAILABLE, "EGL: API not available"); - return GLFW_FALSE; - } - - if (ctxconfig->share) - share = ctxconfig->share->context.egl.handle; - - EGLint egl_attributes[] = { - EGL_BLUE_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_RED_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_DEPTH_SIZE, 24, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT|0x0001, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - EGL_NONE - }; - EGLint num_configs = 0; - int libgl_es = strtol(getenv("LIBGL_ES"), NULL, 0); - if (libgl_es < 0 || libgl_es > INT16_MAX) - libgl_es = 2; - const EGLint egl_context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, libgl_es, EGL_NONE }; - if (eglChooseConfig(_glfw.egl.display, egl_attributes, NULL, 0, &num_configs) != GLFW_TRUE) { - _glfwInputError(GLFW_API_UNAVAILABLE, "eglChooseConfig() failed: %04x", - eglGetError()); - return GLFW_FALSE; - } - - if (num_configs == 0) { - _glfwInputError(GLFW_API_UNAVAILABLE, "%s", - "eglChooseConfig() found no matching config"); - return GLFW_FALSE; - } - - eglChooseConfig(_glfw.egl.display, egl_attributes, &config, 1, &num_configs); - int client = 0; - const char* renderer = getenv("LIBGL_NAME"); - if (strcmp(renderer, "libgl4es_114.so") == 0) { - client = 0; - } else if (strcmp(renderer, "libtinywrapper.so") == 0) { - client = 1; - } - - if (client == 0) - { - if (!eglBindAPI(EGL_OPENGL_ES_API)) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "EGL: Failed to bind OpenGL ES: %s", - getEGLErrorString(eglGetError())); - return GLFW_FALSE; - } - } - else - { - if (!eglBindAPI(EGL_OPENGL_API)) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "EGL: Failed to bind OpenGL: %s", - getEGLErrorString(eglGetError())); - return GLFW_FALSE; - } - } - - window->context.egl.handle = eglCreateContext(_glfw.egl.display, - config, share, egl_context_attributes); - - if (window->context.egl.handle == EGL_NO_CONTEXT) - { - _glfwInputError(GLFW_VERSION_UNAVAILABLE, - "EGL: Failed to create context: %s", - getEGLErrorString(eglGetError())); - return GLFW_FALSE; - } - - window->context.egl.surface = - eglCreateWindowSurface(_glfw.egl.display, - config, - _GLFW_EGL_NATIVE_WINDOW, - NULL); - if (window->context.egl.surface == EGL_NO_SURFACE) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "EGL: Failed to create window surface: %s", - getEGLErrorString(eglGetError())); - return GLFW_FALSE; - } - window->context.egl.config = config; - - // Load the appropriate client library - if (!_glfw.egl.KHR_get_all_proc_addresses) - { - int i; - const char** sonames; - const char* es1sonames[] = - { - "libGLESv1_CM.so.1", - "libGLES_CM.so.1", - }; - const char* es2sonames[] = - { - "libGLESv2.so.2", - }; - const char* glsonames[] = - { - getenv("LIBGL_NAME"), - }; - - if (ctxconfig->client == GLFW_OPENGL_ES_API) - { - if (ctxconfig->major == 1) - sonames = es1sonames; - else - sonames = es2sonames; - } - else - sonames = glsonames; - - for (i = 0; sonames[i]; i++) - { - // HACK: Match presence of lib prefix to increase chance of finding - // a matching pair in the jungle that is Win32 EGL/GLES - if (_glfw.egl.prefix != (strncmp(sonames[i], "lib", 3) == 0)) - continue; - - window->context.egl.client = _glfw_dlopen(sonames[i]); - if (window->context.egl.client) - break; - } - - if (!window->context.egl.client) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "EGL: Failed to load client library"); - return GLFW_FALSE; - } - } - - window->context.makeCurrent = makeContextCurrentEGL; - window->context.swapBuffers = swapBuffersEGL; - window->context.swapInterval = swapIntervalEGL; - window->context.extensionSupported = extensionSupportedEGL; - window->context.getProcAddress = getProcAddressEGL; - window->context.destroy = destroyContextEGL; - - return GLFW_TRUE; -} - - - -////////////////////////////////////////////////////////////////////////// -////// GLFW native API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI EGLDisplay glfwGetEGLDisplay(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_DISPLAY); - return _glfw.egl.display; -} - -GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_CONTEXT); - - if (window->context.client == GLFW_NO_API) - { - _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL); - return EGL_NO_CONTEXT; - } - - return window->context.egl.handle; -} - -GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - _GLFW_REQUIRE_INIT_OR_RETURN(EGL_NO_SURFACE); - - if (window->context.client == GLFW_NO_API) - { - _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL); - return EGL_NO_SURFACE; - } - - return window->context.egl.surface; -} - diff --git a/FCLauncher/src/main/jni/glfw/fcl_init.c b/FCLauncher/src/main/jni/glfw/fcl_init.c deleted file mode 100644 index 93a86f48..00000000 --- a/FCLauncher/src/main/jni/glfw/fcl_init.c +++ /dev/null @@ -1,260 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// -//======================================================================== -// This file is derived from x11_init.c -//======================================================================== - -#include - -#include - -#include -#include - - -// Create key code translation tables -// derived from wl_init.c -// -static void createKeyTables(void) -{ - int scancode; - - memset(_glfw.fcl.keycodes, -1, sizeof(_glfw.fcl.keycodes)); - memset(_glfw.fcl.scancodes, -1, sizeof(_glfw.fcl.scancodes)); - - _glfw.fcl.keycodes[KEY_GRAVE] = GLFW_KEY_GRAVE_ACCENT; - _glfw.fcl.keycodes[KEY_1] = GLFW_KEY_1; - _glfw.fcl.keycodes[KEY_2] = GLFW_KEY_2; - _glfw.fcl.keycodes[KEY_3] = GLFW_KEY_3; - _glfw.fcl.keycodes[KEY_4] = GLFW_KEY_4; - _glfw.fcl.keycodes[KEY_5] = GLFW_KEY_5; - _glfw.fcl.keycodes[KEY_6] = GLFW_KEY_6; - _glfw.fcl.keycodes[KEY_7] = GLFW_KEY_7; - _glfw.fcl.keycodes[KEY_8] = GLFW_KEY_8; - _glfw.fcl.keycodes[KEY_9] = GLFW_KEY_9; - _glfw.fcl.keycodes[KEY_0] = GLFW_KEY_0; - _glfw.fcl.keycodes[KEY_SPACE] = GLFW_KEY_SPACE; - _glfw.fcl.keycodes[KEY_MINUS] = GLFW_KEY_MINUS; - _glfw.fcl.keycodes[KEY_EQUAL] = GLFW_KEY_EQUAL; - _glfw.fcl.keycodes[KEY_Q] = GLFW_KEY_Q; - _glfw.fcl.keycodes[KEY_W] = GLFW_KEY_W; - _glfw.fcl.keycodes[KEY_E] = GLFW_KEY_E; - _glfw.fcl.keycodes[KEY_R] = GLFW_KEY_R; - _glfw.fcl.keycodes[KEY_T] = GLFW_KEY_T; - _glfw.fcl.keycodes[KEY_Y] = GLFW_KEY_Y; - _glfw.fcl.keycodes[KEY_U] = GLFW_KEY_U; - _glfw.fcl.keycodes[KEY_I] = GLFW_KEY_I; - _glfw.fcl.keycodes[KEY_O] = GLFW_KEY_O; - _glfw.fcl.keycodes[KEY_P] = GLFW_KEY_P; - _glfw.fcl.keycodes[KEY_LEFTBRACE] = GLFW_KEY_LEFT_BRACKET; - _glfw.fcl.keycodes[KEY_RIGHTBRACE] = GLFW_KEY_RIGHT_BRACKET; - _glfw.fcl.keycodes[KEY_A] = GLFW_KEY_A; - _glfw.fcl.keycodes[KEY_S] = GLFW_KEY_S; - _glfw.fcl.keycodes[KEY_D] = GLFW_KEY_D; - _glfw.fcl.keycodes[KEY_F] = GLFW_KEY_F; - _glfw.fcl.keycodes[KEY_G] = GLFW_KEY_G; - _glfw.fcl.keycodes[KEY_H] = GLFW_KEY_H; - _glfw.fcl.keycodes[KEY_J] = GLFW_KEY_J; - _glfw.fcl.keycodes[KEY_K] = GLFW_KEY_K; - _glfw.fcl.keycodes[KEY_L] = GLFW_KEY_L; - _glfw.fcl.keycodes[KEY_SEMICOLON] = GLFW_KEY_SEMICOLON; - _glfw.fcl.keycodes[KEY_APOSTROPHE] = GLFW_KEY_APOSTROPHE; - _glfw.fcl.keycodes[KEY_Z] = GLFW_KEY_Z; - _glfw.fcl.keycodes[KEY_X] = GLFW_KEY_X; - _glfw.fcl.keycodes[KEY_C] = GLFW_KEY_C; - _glfw.fcl.keycodes[KEY_V] = GLFW_KEY_V; - _glfw.fcl.keycodes[KEY_B] = GLFW_KEY_B; - _glfw.fcl.keycodes[KEY_N] = GLFW_KEY_N; - _glfw.fcl.keycodes[KEY_M] = GLFW_KEY_M; - _glfw.fcl.keycodes[KEY_COMMA] = GLFW_KEY_COMMA; - _glfw.fcl.keycodes[KEY_DOT] = GLFW_KEY_PERIOD; - _glfw.fcl.keycodes[KEY_SLASH] = GLFW_KEY_SLASH; - _glfw.fcl.keycodes[KEY_BACKSLASH] = GLFW_KEY_BACKSLASH; - _glfw.fcl.keycodes[KEY_ESC] = GLFW_KEY_ESCAPE; - _glfw.fcl.keycodes[KEY_TAB] = GLFW_KEY_TAB; - _glfw.fcl.keycodes[KEY_LEFTSHIFT] = GLFW_KEY_LEFT_SHIFT; - _glfw.fcl.keycodes[KEY_RIGHTSHIFT] = GLFW_KEY_RIGHT_SHIFT; - _glfw.fcl.keycodes[KEY_LEFTCTRL] = GLFW_KEY_LEFT_CONTROL; - _glfw.fcl.keycodes[KEY_RIGHTCTRL] = GLFW_KEY_RIGHT_CONTROL; - _glfw.fcl.keycodes[KEY_LEFTALT] = GLFW_KEY_LEFT_ALT; - _glfw.fcl.keycodes[KEY_RIGHTALT] = GLFW_KEY_RIGHT_ALT; - _glfw.fcl.keycodes[KEY_LEFTMETA] = GLFW_KEY_LEFT_SUPER; - _glfw.fcl.keycodes[KEY_RIGHTMETA] = GLFW_KEY_RIGHT_SUPER; - _glfw.fcl.keycodes[KEY_MENU] = GLFW_KEY_MENU; - _glfw.fcl.keycodes[KEY_NUMLOCK] = GLFW_KEY_NUM_LOCK; - _glfw.fcl.keycodes[KEY_CAPSLOCK] = GLFW_KEY_CAPS_LOCK; - _glfw.fcl.keycodes[KEY_PRINT] = GLFW_KEY_PRINT_SCREEN; - _glfw.fcl.keycodes[KEY_SCROLLLOCK] = GLFW_KEY_SCROLL_LOCK; - _glfw.fcl.keycodes[KEY_PAUSE] = GLFW_KEY_PAUSE; - _glfw.fcl.keycodes[KEY_DELETE] = GLFW_KEY_DELETE; - _glfw.fcl.keycodes[KEY_BACKSPACE] = GLFW_KEY_BACKSPACE; - _glfw.fcl.keycodes[KEY_ENTER] = GLFW_KEY_ENTER; - _glfw.fcl.keycodes[KEY_HOME] = GLFW_KEY_HOME; - _glfw.fcl.keycodes[KEY_END] = GLFW_KEY_END; - _glfw.fcl.keycodes[KEY_PAGEUP] = GLFW_KEY_PAGE_UP; - _glfw.fcl.keycodes[KEY_PAGEDOWN] = GLFW_KEY_PAGE_DOWN; - _glfw.fcl.keycodes[KEY_INSERT] = GLFW_KEY_INSERT; - _glfw.fcl.keycodes[KEY_LEFT] = GLFW_KEY_LEFT; - _glfw.fcl.keycodes[KEY_RIGHT] = GLFW_KEY_RIGHT; - _glfw.fcl.keycodes[KEY_DOWN] = GLFW_KEY_DOWN; - _glfw.fcl.keycodes[KEY_UP] = GLFW_KEY_UP; - _glfw.fcl.keycodes[KEY_F1] = GLFW_KEY_F1; - _glfw.fcl.keycodes[KEY_F2] = GLFW_KEY_F2; - _glfw.fcl.keycodes[KEY_F3] = GLFW_KEY_F3; - _glfw.fcl.keycodes[KEY_F4] = GLFW_KEY_F4; - _glfw.fcl.keycodes[KEY_F5] = GLFW_KEY_F5; - _glfw.fcl.keycodes[KEY_F6] = GLFW_KEY_F6; - _glfw.fcl.keycodes[KEY_F7] = GLFW_KEY_F7; - _glfw.fcl.keycodes[KEY_F8] = GLFW_KEY_F8; - _glfw.fcl.keycodes[KEY_F9] = GLFW_KEY_F9; - _glfw.fcl.keycodes[KEY_F10] = GLFW_KEY_F10; - _glfw.fcl.keycodes[KEY_F11] = GLFW_KEY_F11; - _glfw.fcl.keycodes[KEY_F12] = GLFW_KEY_F12; - _glfw.fcl.keycodes[KEY_F13] = GLFW_KEY_F13; - _glfw.fcl.keycodes[KEY_F14] = GLFW_KEY_F14; - _glfw.fcl.keycodes[KEY_F15] = GLFW_KEY_F15; - _glfw.fcl.keycodes[KEY_F16] = GLFW_KEY_F16; - _glfw.fcl.keycodes[KEY_F17] = GLFW_KEY_F17; - _glfw.fcl.keycodes[KEY_F18] = GLFW_KEY_F18; - _glfw.fcl.keycodes[KEY_F19] = GLFW_KEY_F19; - _glfw.fcl.keycodes[KEY_F20] = GLFW_KEY_F20; - _glfw.fcl.keycodes[KEY_F21] = GLFW_KEY_F21; - _glfw.fcl.keycodes[KEY_F22] = GLFW_KEY_F22; - _glfw.fcl.keycodes[KEY_F23] = GLFW_KEY_F23; - _glfw.fcl.keycodes[KEY_F24] = GLFW_KEY_F24; - _glfw.fcl.keycodes[KEY_KPSLASH] = GLFW_KEY_KP_DIVIDE; - _glfw.fcl.keycodes[KEY_KPASTERISK] = GLFW_KEY_KP_MULTIPLY; - _glfw.fcl.keycodes[KEY_KPMINUS] = GLFW_KEY_KP_SUBTRACT; - _glfw.fcl.keycodes[KEY_KPPLUS] = GLFW_KEY_KP_ADD; - _glfw.fcl.keycodes[KEY_KP0] = GLFW_KEY_KP_0; - _glfw.fcl.keycodes[KEY_KP1] = GLFW_KEY_KP_1; - _glfw.fcl.keycodes[KEY_KP2] = GLFW_KEY_KP_2; - _glfw.fcl.keycodes[KEY_KP3] = GLFW_KEY_KP_3; - _glfw.fcl.keycodes[KEY_KP4] = GLFW_KEY_KP_4; - _glfw.fcl.keycodes[KEY_KP5] = GLFW_KEY_KP_5; - _glfw.fcl.keycodes[KEY_KP6] = GLFW_KEY_KP_6; - _glfw.fcl.keycodes[KEY_KP7] = GLFW_KEY_KP_7; - _glfw.fcl.keycodes[KEY_KP8] = GLFW_KEY_KP_8; - _glfw.fcl.keycodes[KEY_KP9] = GLFW_KEY_KP_9; - _glfw.fcl.keycodes[KEY_KPEQUAL] = GLFW_KEY_KP_EQUAL; - _glfw.fcl.keycodes[KEY_KPENTER] = GLFW_KEY_KP_ENTER; - _glfw.fcl.keycodes[KEY_KPDOT] = GLFW_KEY_KP_DECIMAL; - - for (scancode = 0; scancode < 256; scancode++) - { - // Store the reverse translation for faster key name lookup - if (_glfw.fcl.keycodes[scancode] > 0) - _glfw.fcl.scancodes[_glfw.fcl.keycodes[scancode]] = scancode; - } - - strcpy(_glfw.fcl.keynames[GLFW_KEY_GRAVE_ACCENT], "`"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_1], "1"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_2], "2"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_3], "3"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_4], "4"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_5], "5"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_6], "6"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_7], "7"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_8], "8"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_9], "9"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_0], "0"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_MINUS], "-"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_EQUAL], "="); - strcpy(_glfw.fcl.keynames[GLFW_KEY_Q], "q"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_W], "w"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_E], "e"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_R], "r"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_T], "t"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_Y], "y"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_U], "u"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_I], "i"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_O], "o"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_P], "p"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_LEFT_BRACKET], "["); - strcpy(_glfw.fcl.keynames[GLFW_KEY_RIGHT_BRACKET], "]"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_A], "a"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_S], "s"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_D], "d"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_F], "f"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_G], "g"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_H], "h"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_J], "j"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_K], "k"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_L], "l"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_SEMICOLON], ";"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_APOSTROPHE], "'"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_Z], "z"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_X], "x"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_C], "c"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_V], "v"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_B], "b"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_N], "n"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_M], "m"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_COMMA], ","); - strcpy(_glfw.fcl.keynames[GLFW_KEY_PERIOD], "."); - strcpy(_glfw.fcl.keynames[GLFW_KEY_SLASH], "/"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_BACKSLASH], "\\"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_DIVIDE], "/"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_MULTIPLY], "*"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_ADD], "+"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_SUBTRACT], "-"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_0], "0"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_1], "1"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_2], "2"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_3], "3"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_4], "4"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_5], "5"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_6], "6"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_7], "7"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_8], "8"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_9], "9"); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_EQUAL], "="); - strcpy(_glfw.fcl.keynames[GLFW_KEY_KP_DECIMAL], "."); -} - -// Retrieve system content scale via folklore heuristics -// -static void getSystemContentScale(float* xscale, float* yscale) -{ - *xscale = 1.f; - *yscale = 1.f; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW platform API ////// -////////////////////////////////////////////////////////////////////////// - -int _glfwPlatformInit(void) -{ - getSystemContentScale(&_glfw.fcl.contentScaleX, &_glfw.fcl.contentScaleY); - createKeyTables(); - - _glfwInitTimerPOSIX(); - _glfwPollMonitorsFCL(); - return GLFW_TRUE; -} - -void _glfwPlatformTerminate(void) -{ - _glfwTerminateEGL(); -} - -const char* _glfwPlatformGetVersionString(void) -{ - return _GLFW_VERSION_NUMBER " FCL EGL OSMesa" -#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) - " clock_gettime" -#else - " gettimeofday" -#endif -#if defined(__linux__) - " evdev" -#endif -#if defined(_GLFW_BUILD_DLL) - " shared" -#endif - ; -} - diff --git a/FCLauncher/src/main/jni/glfw/fcl_monitor.c b/FCLauncher/src/main/jni/glfw/fcl_monitor.c deleted file mode 100644 index 338eeada..00000000 --- a/FCLauncher/src/main/jni/glfw/fcl_monitor.c +++ /dev/null @@ -1,123 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// -//======================================================================== -// This file is derived from x11_monitor.c -//======================================================================== - -#include - -#include -#include -#include - - -static void modeChangeHandle(int width, int height, void* data) -{ - GLFWvidmode mode; - _GLFWmonitor* monitor = data; - - mode.width = width; - mode.height = height; - mode.redBits = 8; - mode.greenBits = 8; - mode.blueBits = 8; - mode.refreshRate = 0; - - monitor->modeCount++; - monitor->modes = - realloc(monitor->modes, monitor->modeCount * sizeof(GLFWvidmode)); - monitor->modes[monitor->modeCount - 1] = mode; - - monitor->fcl.currentMode = monitor->modeCount - 1; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -void _glfwPollMonitorsFCL(void) -{ - struct ANativeWindow* window = fclGetNativeWindow(); - const float dpi = 141.f; - _GLFWmonitor* monitor = _glfwAllocMonitor("FCL Monitor 0", - (int) (ANativeWindow_getWidth(window) * 25.4f / dpi), - (int) (ANativeWindow_getHeight(window) * 25.4f / dpi)); - _glfwInputMonitor(monitor, GLFW_CONNECTED, _GLFW_INSERT_FIRST); -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW platform API ////// -////////////////////////////////////////////////////////////////////////// - -void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor) -{ -} - -void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) -{ - if (xpos) - *xpos = 0; - if (ypos) - *ypos = 0; -} - -void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor, - float* xscale, float* yscale) -{ - if (xscale) - *xscale = _glfw.fcl.contentScaleX; - if (yscale) - *yscale = _glfw.fcl.contentScaleY; -} - -void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height) -{ - if (xpos) - *xpos = 0; - if (ypos) - *ypos = 0; - if (width) - *width = monitor->modes[monitor->fcl.currentMode].width; - if (height) - *height = monitor->modes[monitor->fcl.currentMode].height; -} - -GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count) -{ - if (monitor->modes == NULL || monitor->modeCount == 0) { - struct ANativeWindow* window = fclGetNativeWindow(); - modeChangeHandle(ANativeWindow_getWidth(window), - ANativeWindow_getHeight(window), - monitor); - } - *count = monitor->modeCount; - return monitor->modes; -} - -void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode) -{ - if (monitor->modes == NULL || monitor->modeCount == 0) { - struct ANativeWindow* window = fclGetNativeWindow(); - modeChangeHandle(ANativeWindow_getWidth(window), - ANativeWindow_getHeight(window), - monitor); - } - *mode = monitor->modes[monitor->fcl.currentMode]; -} - -GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp) -{ - _glfwInputError(GLFW_PLATFORM_ERROR, - "FCL: Gamma ramp access not supported"); - return GLFW_FALSE; -} - -void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) -{ - _glfwInputError(GLFW_PLATFORM_ERROR, - "FCL: Gamma ramp access not supported"); -} - diff --git a/FCLauncher/src/main/jni/glfw/fcl_window.c b/FCLauncher/src/main/jni/glfw/fcl_window.c deleted file mode 100644 index ccb978b8..00000000 --- a/FCLauncher/src/main/jni/glfw/fcl_window.c +++ /dev/null @@ -1,760 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// -//======================================================================== -// This file is derived from x11_window.c -//======================================================================== - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -// Translates an FCL event modifier state mask -// -static int translateState(int state) -{ - int mods = 0; - - if (state & ShiftMask) - mods |= GLFW_MOD_SHIFT; - if (state & ControlMask) - mods |= GLFW_MOD_CONTROL; - if (state & Mod1Mask) - mods |= GLFW_MOD_ALT; - if (state & Mod4Mask) - mods |= GLFW_MOD_SUPER; - if (state & LockMask) - mods |= GLFW_MOD_CAPS_LOCK; - if (state & Mod2Mask) - mods |= GLFW_MOD_NUM_LOCK; - - return mods; -} - -// Translates an FCL key code to a GLFW key token -// -static int translateKey(int scancode) -{ - // Use the pre-filled LUT (see createKeyTables() in fcl_init.c) - if (scancode < 0 || scancode > 255) - return GLFW_KEY_UNKNOWN; - - return _glfw.fcl.keycodes[scancode]; -} - -// Apply disabled cursor mode to a focused window -// -static void disableCursor(_GLFWwindow* window) -{ - _glfw.fcl.disabledCursorWindow = window; - _glfwPlatformGetCursorPos(window, - &_glfw.fcl.restoreCursorPosX, - &_glfw.fcl.restoreCursorPosY); - // updateCursorImage(window); - _glfwCenterCursorInContentArea(window); - fclSetCursorMode(CursorDisabled); -} - -// Exit disabled cursor mode for the specified window -// -static void enableCursor(_GLFWwindow* window) -{ - _glfw.fcl.disabledCursorWindow = NULL; - fclSetCursorMode(CursorEnabled); - _glfwPlatformSetCursorPos(window, - _glfw.fcl.restoreCursorPosX, - _glfw.fcl.restoreCursorPosY); - // updateCursorImage(window); -} - -// Get the ANativeWindow and peer infomation -// -static GLFWbool createNativeWindow(_GLFWwindow* window, - const _GLFWwndconfig* wndconfig) -{ - // window width and height requirements ignored - window->fcl.handle = fclGetNativeWindow(); - ANativeWindow_acquire(window->fcl.handle); - - if (!window->fcl.handle) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "FCL: Failed to get window"); - return GLFW_FALSE; - } - - _glfw.fcl.eventCurrent = window; - - if (!wndconfig->decorated) - _glfwPlatformSetWindowDecorated(window, GLFW_FALSE); - - window->fcl.maximized = GLFW_TRUE; - _glfwPlatformSetWindowTitle(window, wndconfig->title); - _glfwPlatformGetWindowPos(window, &window->fcl.xpos, &window->fcl.ypos); - _glfwPlatformGetWindowSize(window, &window->fcl.width, &window->fcl.height); - - return GLFW_TRUE; -} - -// Make the specified window and its video mode active on its monitor -// -static void acquireMonitor(_GLFWwindow* window) -{ - _glfwInputMonitorWindow(window->monitor, window); -} - -// Remove the window -// -static void releaseMonitor(_GLFWwindow* window) -{ - if (window->monitor->window != window) - return; - - _glfwInputMonitorWindow(window->monitor, NULL); -} - -// Process the specified FCL event -// -static void processEvent(FCLEvent *event) -{ - _GLFWwindow* window = _glfw.fcl.eventCurrent; - - switch (event->type) - { - case KeyPress: - { - const int keycode = event->keycode; - const int keychar = event->keychar; - const int key = translateKey(keycode); - const int mods = translateState(event->state); - const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT)); - - _glfwInputKey(window, key, keycode, GLFW_PRESS, mods); - if (keychar) { - _glfwInputChar(window, keychar, mods, plain); - } - return; - } - - case KeyRelease: - { - const int keycode = event->keycode; - const int key = translateKey(keycode); - const int mods = translateState(event->state); - - _glfwInputKey(window, key, keycode, GLFW_RELEASE, mods); - return; - } - - case ButtonPress: - { - const int mods = translateState(event->state); - - if (event->button == Button1) - _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS, mods); - else if (event->button == Button2) - _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_MIDDLE, GLFW_PRESS, mods); - else if (event->button == Button3) - _glfwInputMouseClick(window, GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS, mods); - - // Like X11, FCL provides scroll events as mouse button presses - else if (event->button == Button4) - _glfwInputScroll(window, 0.0, 1.0); - else if (event->button == Button5) - _glfwInputScroll(window, 0.0, -1.0); - else if (event->button == Button6) - _glfwInputScroll(window, 1.0, 0.0); - else if (event->button == Button7) - _glfwInputScroll(window, -1.0, 0.0); - - else - { - // Additional buttons after 7 are treated as regular buttons - // We subtract 4 to fill the gap left by scroll input above - _glfwInputMouseClick(window, - event->button - Button1 - 4, - GLFW_PRESS, - mods); - } - - return; - } - - case ButtonRelease: - { - const int mods = translateState(event->state); - - if (event->button == Button1) - { - _glfwInputMouseClick(window, - GLFW_MOUSE_BUTTON_LEFT, - GLFW_RELEASE, - mods); - } - else if (event->button == Button2) - { - _glfwInputMouseClick(window, - GLFW_MOUSE_BUTTON_MIDDLE, - GLFW_RELEASE, - mods); - } - else if (event->button == Button3) - { - _glfwInputMouseClick(window, - GLFW_MOUSE_BUTTON_RIGHT, - GLFW_RELEASE, - mods); - } - else if (event->button > Button7) - { - // Additional buttons after 7 are treated as regular buttons - // We subtract 4 to fill the gap left by scroll input above - _glfwInputMouseClick(window, - event->button - Button1 - 4, - GLFW_RELEASE, - mods); - } - - return; - } - - case MotionNotify: - { - const int x = event->x; - const int y = event->y; - - if (x != window->fcl.warpCursorPosX || - y != window->fcl.warpCursorPosY) - { - // The cursor was moved by something other than GLFW - - if (window->cursorMode == GLFW_CURSOR_DISABLED) - { - if (_glfw.fcl.disabledCursorWindow != window) - return; - if (window->rawMouseMotion) - return; - - const int dx = x - window->fcl.lastCursorPosX; - const int dy = y - window->fcl.lastCursorPosY; - - _glfwInputCursorPos(window, - window->virtualCursorPosX + dx, - window->virtualCursorPosY + dy); - } - else - _glfwInputCursorPos(window, x, y); - } - - window->fcl.lastCursorPosX = x; - window->fcl.lastCursorPosY = y; - return; - } - - case KeyChar: - { - const int keychar = event->keychar; - const int mods = translateState(event->state); - const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT)); - - if (keychar) { - _glfwInputChar(window, keychar, mods, plain); - } - return; - } - - case ConfigureNotify: - { - const int width = event->width; - const int height = event->height; - if (width != window->fcl.width || - height != window->fcl.height) - { - _glfwInputFramebufferSize(window, - width, - height); - - _glfwInputWindowSize(window, - width, - height); - - window->fcl.width = width; - window->fcl.height = height; - } - - return; - } - - case FCLMessage: - { - if (event->message == CloseRequest) - { - // The FCL was asked to close the window, for - // example by the user pressing 'back' key - _glfwInputWindowCloseRequest(window); - } - } - } -} - -static void handleEvents(int timeout) -{ - if (fclWaitForEvent(timeout) == 0) { - return; - } - FCLEvent event; - while (fclPollEvent(&event)) - { - processEvent(&event); - if (fclWaitForEvent(0) == 0) { - break; - } - } -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW platform API ////// -////////////////////////////////////////////////////////////////////////// - -int _glfwPlatformCreateWindow(_GLFWwindow* window, - const _GLFWwndconfig* wndconfig, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig) -{ - if (!createNativeWindow(window, wndconfig)) - return GLFW_FALSE; - - if (ctxconfig->client != GLFW_NO_API) - { - if (ctxconfig->source == GLFW_EGL_CONTEXT_API || - ctxconfig->source == GLFW_NATIVE_CONTEXT_API) - { - if (!_glfwInitEGL()) - return GLFW_FALSE; - if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig)) - return GLFW_FALSE; - } - else if (ctxconfig->source == GLFW_OSMESA_CONTEXT_API) - { - const char *renderer = getenv("LIBGL_STRING"); - if (strcmp(renderer, "Zink") == 0 || - strcmp(renderer, "Freedreno") == 0 || - strcmp(renderer, "VirGLRenderer") == 0) - { - if (!_glfwInitEGL()) - return GLFW_FALSE; - } - if (!_glfwInitOSMesa()) - return GLFW_FALSE; - if (!_glfwCreateContextOSMesa(window, ctxconfig, fbconfig)) - return GLFW_FALSE; - } - } - - if (window->monitor) - { - _glfwPlatformShowWindow(window); - acquireMonitor(window); - } - - return GLFW_TRUE; -} - -void _glfwPlatformDestroyWindow(_GLFWwindow* window) -{ - if (_glfw.fcl.disabledCursorWindow == window) - _glfw.fcl.disabledCursorWindow = NULL; - - if (window->monitor) - releaseMonitor(window); - - if (window->context.destroy) - window->context.destroy(window); - - if (window->fcl.handle) - { - ANativeWindow_release(window->fcl.handle); - window->fcl.handle = NULL; - } -} - -void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) -{ -} - -void _glfwPlatformSetWindowIcon(_GLFWwindow* window, - int count, const GLFWimage* images) -{ -} - -void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos) -{ - if (xpos) - *xpos = 0; - if (ypos) - *ypos = 0; -} - -void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos) -{ -} - -void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height) -{ - if (width) - *width = ANativeWindow_getWidth(window->fcl.handle); - if (height) - *height = ANativeWindow_getHeight(window->fcl.handle); -} - -void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) -{ - if (window->monitor) - { - if (window->monitor->window == window) - acquireMonitor(window); - } -} - -void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window, - int minwidth, int minheight, - int maxwidth, int maxheight) -{ -} - -void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom) -{ -} - -void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height) -{ - _glfwPlatformGetWindowSize(window, width, height); -} - -void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, - int* left, int* top, - int* right, int* bottom) -{ - if (left) - *left = 0; - if (top) - *top = 0; - if (right) - *right = 0; - if (bottom) - *bottom = 0; -} - -void _glfwPlatformGetWindowContentScale(_GLFWwindow* window, - float* xscale, float* yscale) -{ - if (xscale) - *xscale = _glfw.fcl.contentScaleX; - if (yscale) - *yscale = _glfw.fcl.contentScaleY; -} - -void _glfwPlatformIconifyWindow(_GLFWwindow* window) -{ -} - -void _glfwPlatformRestoreWindow(_GLFWwindow* window) -{ -} - -void _glfwPlatformMaximizeWindow(_GLFWwindow* window) -{ -} - -void _glfwPlatformShowWindow(_GLFWwindow* window) -{ -} - -void _glfwPlatformHideWindow(_GLFWwindow* window) -{ -} - -void _glfwPlatformRequestWindowAttention(_GLFWwindow* window) -{ -} - -void _glfwPlatformFocusWindow(_GLFWwindow* window) -{ -} - -void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, - _GLFWmonitor* monitor, - int xpos, int ypos, - int width, int height, - int refreshRate) -{ - // Are these codes meaningful? - if (window->monitor == monitor) - { - if (monitor) - { - if (monitor->window == window) - acquireMonitor(window); - } - - return; - } - - if (window->monitor) - { - _glfwPlatformSetWindowDecorated(window, window->decorated); - _glfwPlatformSetWindowFloating(window, window->floating); - releaseMonitor(window); - } - - _glfwInputWindowMonitor(window, monitor); - - if (window->monitor) - { - acquireMonitor(window); - } -} - -int _glfwPlatformWindowFocused(_GLFWwindow* window) -{ - return GLFW_TRUE; -} - -int _glfwPlatformWindowIconified(_GLFWwindow* window) -{ - return GLFW_FALSE; -} - -int _glfwPlatformWindowVisible(_GLFWwindow* window) -{ - return GLFW_TRUE; -} - -int _glfwPlatformWindowMaximized(_GLFWwindow* window) -{ - return GLFW_TRUE; -} - -int _glfwPlatformWindowHovered(_GLFWwindow* window) -{ - return GLFW_TRUE; -} - -int _glfwPlatformFramebufferTransparent(_GLFWwindow* window) -{ - return GLFW_FALSE; -} - -void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled) -{ -} - -void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled) -{ -} - -void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled) -{ -} - -float _glfwPlatformGetWindowOpacity(_GLFWwindow* window) -{ - return 1.f; -} - -void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity) -{ -} - -void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled) -{ -} - -GLFWbool _glfwPlatformRawMouseMotionSupported(void) -{ - return GLFW_FALSE; -} - -void _glfwPlatformPollEvents(void) -{ - handleEvents(0); -} - -void _glfwPlatformWaitEvents(void) -{ - handleEvents(-1); -} - -void _glfwPlatformWaitEventsTimeout(double timeout) -{ - handleEvents((int) (timeout * 1e3)); -} - -void _glfwPlatformPostEmptyEvent(void) -{ -} - -void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos) -{ - int x, y; - - // fclGetCursorPos(&x, &y); - x = 0; - y = 0; - - if (xpos) - *xpos = x; - if (ypos) - *ypos = y; -} - -void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y) -{ - // Store the new position so it can be recognized later - window->fcl.warpCursorPosX = (int) x; - window->fcl.warpCursorPosY = (int) y; - // fclSetCursorPos(x, y); -} - -void _glfwPlatformSetInjectorCallback(FCLinjectorfun callback) { - fclSetInjectorCallback(callback); -} - -void _glfwPlatformSetHitResultType(int type) { - fclSetHitResultType(type); -} - -void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode) -{ - if (mode == GLFW_CURSOR_DISABLED) - { - if (_glfwPlatformWindowFocused(window)) - disableCursor(window); - } - else if (_glfw.fcl.disabledCursorWindow == window) - enableCursor(window); - // else - // updateCursorImage(window); -} - -const char* _glfwPlatformGetScancodeName(int scancode) -{ - if (scancode < 0 || scancode > 0xff || - _glfw.fcl.keycodes[scancode] == GLFW_KEY_UNKNOWN) - { -// _glfwInputError(GLFW_INVALID_VALUE, "Invalid scancode:%d",scancode); - return NULL; - } - - const int key = _glfw.fcl.keycodes[scancode]; - return _glfw.fcl.keynames[key]; -} - -int _glfwPlatformGetKeyScancode(int key) -{ - return _glfw.fcl.scancodes[key]; -} - -int _glfwPlatformCreateCursor(_GLFWcursor* cursor, - const GLFWimage* image, - int xhot, int yhot) -{ - return GLFW_TRUE; -} - -int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape) -{ - return GLFW_TRUE; -} - -void _glfwPlatformDestroyCursor(_GLFWcursor* cursor) -{ -} - -void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor) -{ - if (window->cursorMode == GLFW_CURSOR_NORMAL) - { - // updateCursorImage(window); - } -} - -void _glfwPlatformSetClipboardString(const char* string) -{ - fclSetPrimaryClipString(string); -} - -const char* _glfwPlatformGetClipboardString(void) -{ - return fclGetPrimaryClipString(); -} - -void _glfwPlatformGetRequiredInstanceExtensions(char** extensions) -{ - if (!_glfw.vk.KHR_surface || !_glfw.vk.KHR_android_surface) - return; - - extensions[0] = "VK_KHR_surface"; - extensions[1] = "VK_KHR_android_surface"; -} - -int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, - VkPhysicalDevice device, - uint32_t queuefamily) -{ - return GLFW_FALSE; -} - -VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, - _GLFWwindow* window, - const VkAllocationCallbacks* allocator, - VkSurfaceKHR* surface) -{ - VkResult err; - VkAndroidSurfaceCreateInfoKHR sci; - PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; - - vkCreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR) - vkGetInstanceProcAddr(instance, "vkCreateAndroidSurfaceKHR"); - if (!vkCreateAndroidSurfaceKHR) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "FCL: Vulkan instance missing VK_KHR_android_surface extension"); - return VK_ERROR_EXTENSION_NOT_PRESENT; - } - - memset(&sci, 0, sizeof(sci)); - sci.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; - sci.window = window->fcl.handle; - - err = vkCreateAndroidSurfaceKHR(instance, &sci, allocator, surface); - if (err) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "FCL: Failed to create Vulkan Android surface: %s", - _glfwGetVulkanResultString(err)); - } - - return err; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW native API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI struct ANativeWindow* glfwGetFCLWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return window->fcl.handle; -} - diff --git a/FCLauncher/src/main/jni/glfw/include/egl_context.h b/FCLauncher/src/main/jni/glfw/include/egl_context.h deleted file mode 100644 index 84760fc9..00000000 --- a/FCLauncher/src/main/jni/glfw/include/egl_context.h +++ /dev/null @@ -1,173 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#define EGLAPIENTRY -typedef void* EGLNativeDisplayType; -typedef struct ANativeWindow* EGLNativeWindowType; - -#define EGL_SUCCESS 0x3000 -#define EGL_NOT_INITIALIZED 0x3001 -#define EGL_BAD_ACCESS 0x3002 -#define EGL_BAD_ALLOC 0x3003 -#define EGL_BAD_ATTRIBUTE 0x3004 -#define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 -#define EGL_BAD_MATCH 0x3009 -#define EGL_BAD_NATIVE_PIXMAP 0x300a -#define EGL_BAD_NATIVE_WINDOW 0x300b -#define EGL_BAD_PARAMETER 0x300c -#define EGL_BAD_SURFACE 0x300d -#define EGL_CONTEXT_LOST 0x300e -#define EGL_COLOR_BUFFER_TYPE 0x303f -#define EGL_RGB_BUFFER 0x308e -#define EGL_SURFACE_TYPE 0x3033 -#define EGL_WINDOW_BIT 0x0004 -#define EGL_RENDERABLE_TYPE 0x3040 -#define EGL_OPENGL_ES_BIT 0x0001 -#define EGL_OPENGL_ES2_BIT 0x0004 -#define EGL_OPENGL_BIT 0x0008 -#define EGL_ALPHA_SIZE 0x3021 -#define EGL_BLUE_SIZE 0x3022 -#define EGL_GREEN_SIZE 0x3023 -#define EGL_RED_SIZE 0x3024 -#define EGL_DEPTH_SIZE 0x3025 -#define EGL_STENCIL_SIZE 0x3026 -#define EGL_SAMPLES 0x3031 -#define EGL_OPENGL_ES_API 0x30a0 -#define EGL_OPENGL_API 0x30a2 -#define EGL_NONE 0x3038 -#define EGL_RENDER_BUFFER 0x3086 -#define EGL_SINGLE_BUFFER 0x3085 -#define EGL_EXTENSIONS 0x3055 -#define EGL_CONTEXT_CLIENT_VERSION 0x3098 -#define EGL_NATIVE_VISUAL_ID 0x302e -#define EGL_NO_SURFACE ((EGLSurface) 0) -#define EGL_NO_DISPLAY ((EGLDisplay) 0) -#define EGL_NO_CONTEXT ((EGLContext) 0) -#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType) 0) - -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 -#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31bd -#define EGL_NO_RESET_NOTIFICATION_KHR 0x31be -#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31bf -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 -#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098 -#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30fb -#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30fd -#define EGL_CONTEXT_FLAGS_KHR 0x30fc -#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31b3 -#define EGL_GL_COLORSPACE_KHR 0x309d -#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 -#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097 -#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0 -#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098 - -typedef int EGLint; -typedef unsigned int EGLBoolean; -typedef unsigned int EGLenum; -typedef void* EGLConfig; -typedef void* EGLContext; -typedef void* EGLDisplay; -typedef void* EGLSurface; - -// EGL function pointer typedefs -typedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigAttrib)(EGLDisplay,EGLConfig,EGLint,EGLint*); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglGetConfigs)(EGLDisplay,EGLConfig*,EGLint,EGLint*); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -typedef EGLDisplay (EGLAPIENTRY * PFN_eglGetDisplay)(EGLNativeDisplayType); -typedef EGLint (EGLAPIENTRY * PFN_eglGetError)(void); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglInitialize)(EGLDisplay,EGLint*,EGLint*); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglTerminate)(EGLDisplay); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglBindAPI)(EGLenum); -typedef EGLContext (EGLAPIENTRY * PFN_eglCreateContext)(EGLDisplay,EGLConfig,EGLContext,const EGLint*); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroySurface)(EGLDisplay,EGLSurface); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglDestroyContext)(EGLDisplay,EGLContext); -typedef EGLSurface (EGLAPIENTRY * PFN_eglCreateWindowSurface)(EGLDisplay,EGLConfig,EGLNativeWindowType,const EGLint*); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglMakeCurrent)(EGLDisplay,EGLSurface,EGLSurface,EGLContext); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapBuffers)(EGLDisplay,EGLSurface); -typedef EGLBoolean (EGLAPIENTRY * PFN_eglSwapInterval)(EGLDisplay,EGLint); -typedef const char* (EGLAPIENTRY * PFN_eglQueryString)(EGLDisplay,EGLint); -typedef GLFWglproc (EGLAPIENTRY * PFN_eglGetProcAddress)(const char*); -#define eglGetConfigAttrib _glfw.egl.GetConfigAttrib -#define eglGetConfigs _glfw.egl.GetConfigs -#define eglChooseConfig _glfw.egl.ChooseConfig -#define eglGetDisplay _glfw.egl.GetDisplay -#define eglGetError _glfw.egl.GetError -#define eglInitialize _glfw.egl.Initialize -#define eglTerminate _glfw.egl.Terminate -#define eglBindAPI _glfw.egl.BindAPI -#define eglCreateContext _glfw.egl.CreateContext -#define eglDestroySurface _glfw.egl.DestroySurface -#define eglDestroyContext _glfw.egl.DestroyContext -#define eglCreateWindowSurface _glfw.egl.CreateWindowSurface -#define eglMakeCurrent _glfw.egl.MakeCurrent -#define eglSwapBuffers _glfw.egl.SwapBuffers -#define eglSwapInterval _glfw.egl.SwapInterval -#define eglQueryString _glfw.egl.QueryString -#define eglGetProcAddress _glfw.egl.GetProcAddress - -#define _GLFW_EGL_CONTEXT_STATE _GLFWcontextEGL egl -#define _GLFW_EGL_LIBRARY_CONTEXT_STATE _GLFWlibraryEGL egl - - -// EGL-specific per-context data -// -typedef struct _GLFWcontextEGL -{ - EGLConfig config; - EGLContext handle; - EGLSurface surface; - - void* client; - -} _GLFWcontextEGL; - -// EGL-specific global data -// -typedef struct _GLFWlibraryEGL -{ - EGLDisplay display; - EGLint major, minor; - GLFWbool prefix; - - GLFWbool KHR_create_context; - GLFWbool KHR_create_context_no_error; - GLFWbool KHR_gl_colorspace; - GLFWbool KHR_get_all_proc_addresses; - GLFWbool KHR_context_flush_control; - - void* handle; - - PFN_eglGetConfigAttrib GetConfigAttrib; - PFN_eglGetConfigs GetConfigs; - PFN_eglChooseConfig ChooseConfig; - PFN_eglGetDisplay GetDisplay; - PFN_eglGetError GetError; - PFN_eglInitialize Initialize; - PFN_eglTerminate Terminate; - PFN_eglBindAPI BindAPI; - PFN_eglCreateContext CreateContext; - PFN_eglDestroySurface DestroySurface; - PFN_eglDestroyContext DestroyContext; - PFN_eglCreateWindowSurface CreateWindowSurface; - PFN_eglMakeCurrent MakeCurrent; - PFN_eglSwapBuffers SwapBuffers; - PFN_eglSwapInterval SwapInterval; - PFN_eglQueryString QueryString; - PFN_eglGetProcAddress GetProcAddress; - -} _GLFWlibraryEGL; - - -GLFWbool _glfwInitEGL(void); -void _glfwTerminateEGL(void); -GLFWbool _glfwCreateContextEGL(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig); - diff --git a/FCLauncher/src/main/jni/glfw/include/fcl_platform.h b/FCLauncher/src/main/jni/glfw/include/fcl_platform.h deleted file mode 100644 index 611a3169..00000000 --- a/FCLauncher/src/main/jni/glfw/include/fcl_platform.h +++ /dev/null @@ -1,112 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// -//======================================================================== -// This file is derived from x11_platform.h -//======================================================================== - -#include -#include -#include -#include - -#include - -typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; - -typedef struct VkAndroidSurfaceCreateInfoKHR -{ - VkStructureType sType; - const void* pNext; - VkAndroidSurfaceCreateFlagsKHR flags; - struct ANativeWindow* window; -} VkAndroidSurfaceCreateInfoKHR; - -typedef VkResult (APIENTRY *PFN_vkCreateAndroidSurfaceKHR)(VkInstance, const VkAndroidSurfaceCreateInfoKHR*, const VkAllocationCallbacks*, VkSurfaceKHR*); - -#include "posix_thread.h" -#include "posix_time.h" -#include "egl_context.h" -#include "osmesa_context.h" - -#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_GLOBAL) -#define _glfw_dlclose(handle) dlclose(handle) -#define _glfw_dlsym(handle, name) dlsym(handle, name) - -#define _GLFW_EGL_NATIVE_WINDOW ((EGLNativeWindowType) window->fcl.handle) -#define _GLFW_EGL_NATIVE_DISPLAY EGL_DEFAULT_DISPLAY - -#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowFCL fcl -#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryFCL fcl -#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorFCL fcl -#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorFCL fcl - -#define _GLFW_PLATFORM_CONTEXT_STATE struct { int dummyContext; } -#define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE struct { int dummyLibraryContext; } - -// FCL-specific per-window data -// -typedef struct _GLFWwindowFCL -{ - struct ANativeWindow* handle; - - GLFWbool overrideRedirect; - GLFWbool iconified; - GLFWbool maximized; - - // Whether the visual supports framebuffer transparency - GLFWbool transparent; - - // Cached position and size used to filter out duplicate events - int width, height; - int xpos, ypos; - - // The last received cursor position, regardless of source - int lastCursorPosX, lastCursorPosY; - // The last position the cursor was warped to by GLFW - int warpCursorPosX, warpCursorPosY; - -} _GLFWwindowFCL; - -// FCL-specific global data -// -typedef struct _GLFWlibraryFCL -{ - // System content scale - float contentScaleX, contentScaleY; - // Key name string - char keynames[GLFW_KEY_LAST + 1][5]; - // FCL keycode to GLFW key LUT - short int keycodes[256]; - // GLFW key to FCL keycode LUT - short int scancodes[GLFW_KEY_LAST + 1]; - // Where to place the cursor when re-enabled - double restoreCursorPosX, restoreCursorPosY; - // The window whose disabled cursor mode is active - _GLFWwindow* disabledCursorWindow; - // The window receiving and processing events - _GLFWwindow* eventCurrent; - -} _GLFWlibraryFCL; - -// FCL-specific per-monitor data -// -typedef struct _GLFWmonitorFCL -{ - // Current monitor mode index - int currentMode; - -} _GLFWmonitorFCL; - -// FCL-specific per-cursor data -// -typedef struct _GLFWcursorFCL -{ - // Useless struct filler - void* handle; - -} _GLFWcursorFCL; - - -void _glfwPollMonitorsFCL(void); - diff --git a/FCLauncher/src/main/jni/glfw/include/glfw3.h b/FCLauncher/src/main/jni/glfw/include/glfw3.h deleted file mode 100644 index 66d00729..00000000 --- a/FCLauncher/src/main/jni/glfw/include/glfw3.h +++ /dev/null @@ -1,6136 +0,0 @@ -/************************************************************************* - * GLFW 3.3 - www.glfw.org - * A library for OpenGL, window and input - *------------------------------------------------------------------------ - * Copyright (c) 2002-2006 Marcus Geelnard - * Copyright (c) 2006-2019 Camilla Löwy - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would - * be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - *************************************************************************/ - -#ifndef _glfw3_h_ -#define _glfw3_h_ - -#ifdef __cplusplus -extern "C" { -#endif - - -/************************************************************************* - * Doxygen documentation - *************************************************************************/ - -/*! @file glfw3.h - * @brief The header of the GLFW 3 API. - * - * This is the header file of the GLFW 3 API. It defines all its types and - * declares all its functions. - * - * For more information about how to use this file, see @ref build_include. - */ -/*! @defgroup context Context reference - * @brief Functions and types related to OpenGL and OpenGL ES contexts. - * - * This is the reference documentation for OpenGL and OpenGL ES context related - * functions. For more task-oriented information, see the @ref context_guide. - */ -/*! @defgroup vulkan Vulkan support reference - * @brief Functions and types related to Vulkan. - * - * This is the reference documentation for Vulkan related functions and types. - * For more task-oriented information, see the @ref vulkan_guide. - */ -/*! @defgroup init Initialization, version and error reference - * @brief Functions and types related to initialization and error handling. - * - * This is the reference documentation for initialization and termination of - * the library, version management and error handling. For more task-oriented - * information, see the @ref intro_guide. - */ -/*! @defgroup input Input reference - * @brief Functions and types related to input handling. - * - * This is the reference documentation for input related functions and types. - * For more task-oriented information, see the @ref input_guide. - */ -/*! @defgroup monitor Monitor reference - * @brief Functions and types related to monitors. - * - * This is the reference documentation for monitor related functions and types. - * For more task-oriented information, see the @ref monitor_guide. - */ -/*! @defgroup window Window reference - * @brief Functions and types related to windows. - * - * This is the reference documentation for window related functions and types, - * including creation, deletion and event polling. For more task-oriented - * information, see the @ref window_guide. - */ - - -/************************************************************************* - * Compiler- and platform-specific preprocessor work - *************************************************************************/ - -/* If we are we on Windows, we want a single define for it. - */ -#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__)) - #define _WIN32 -#endif /* _WIN32 */ - -/* Include because most Windows GLU headers need wchar_t and - * the macOS OpenGL header blocks the definition of ptrdiff_t by glext.h. - * Include it unconditionally to avoid surprising side-effects. - */ -#include - -/* Include because it is needed by Vulkan and related functions. - * Include it unconditionally to avoid surprising side-effects. - */ -#include -#include "fcl_bridge.h" - -#if defined(GLFW_INCLUDE_VULKAN) - #include -#endif /* Vulkan header */ - -/* The Vulkan header may have indirectly included windows.h (because of - * VK_USE_PLATFORM_WIN32_KHR) so we offer our replacement symbols after it. - */ - -/* It is customary to use APIENTRY for OpenGL function pointer declarations on - * all platforms. Additionally, the Windows OpenGL header needs APIENTRY. - */ -#if !defined(APIENTRY) - #if defined(_WIN32) - #define APIENTRY __stdcall - #else - #define APIENTRY - #endif - #define GLFW_APIENTRY_DEFINED -#endif /* APIENTRY */ - -/* Some Windows OpenGL headers need this. - */ -#if !defined(WINGDIAPI) && defined(_WIN32) - #define WINGDIAPI __declspec(dllimport) - #define GLFW_WINGDIAPI_DEFINED -#endif /* WINGDIAPI */ - -/* Some Windows GLU headers need this. - */ -#if !defined(CALLBACK) && defined(_WIN32) - #define CALLBACK __stdcall - #define GLFW_CALLBACK_DEFINED -#endif /* CALLBACK */ - -/* Include the chosen OpenGL or OpenGL ES headers. - */ -#if defined(GLFW_INCLUDE_ES1) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES2) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES3) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES31) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_ES32) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif - -#elif defined(GLFW_INCLUDE_GLCOREARB) - - #if defined(__APPLE__) - - #include - #if defined(GLFW_INCLUDE_GLEXT) - #include - #endif /*GLFW_INCLUDE_GLEXT*/ - - #else /*__APPLE__*/ - - #include - - #endif /*__APPLE__*/ - -#elif defined(GLFW_INCLUDE_GLU) - - #if defined(__APPLE__) - - #if defined(GLFW_INCLUDE_GLU) - #include - #endif - - #else /*__APPLE__*/ - - #if defined(GLFW_INCLUDE_GLU) - #include - #endif - - #endif /*__APPLE__*/ - -#elif !defined(GLFW_INCLUDE_NONE) && \ - !defined(__gl_h_) && \ - !defined(__gles1_gl_h_) && \ - !defined(__gles2_gl2_h_) && \ - !defined(__gles2_gl3_h_) && \ - !defined(__gles2_gl31_h_) && \ - !defined(__gles2_gl32_h_) && \ - !defined(__gl_glcorearb_h_) && \ - !defined(__gl2_h_) /*legacy*/ && \ - !defined(__gl3_h_) /*legacy*/ && \ - !defined(__gl31_h_) /*legacy*/ && \ - !defined(__gl32_h_) /*legacy*/ && \ - !defined(__glcorearb_h_) /*legacy*/ && \ - !defined(__GL_H__) /*non-standard*/ && \ - !defined(__gltypes_h_) /*non-standard*/ && \ - !defined(__glee_h_) /*non-standard*/ - -#endif /* OpenGL and OpenGL ES headers */ - -#if defined(GLFW_DLL) && defined(_GLFW_BUILD_DLL) - /* GLFW_DLL must be defined by applications that are linking against the DLL - * version of the GLFW library. _GLFW_BUILD_DLL is defined by the GLFW - * configuration header when compiling the DLL version of the library. - */ - #error "You must not have both GLFW_DLL and _GLFW_BUILD_DLL defined" -#endif - -/* GLFWAPI is used to declare public API functions for export - * from the DLL / shared library / dynamic library. - */ -#if defined(_WIN32) && defined(_GLFW_BUILD_DLL) - /* We are building GLFW as a Win32 DLL */ - #define GLFWAPI __declspec(dllexport) -#elif defined(_WIN32) && defined(GLFW_DLL) - /* We are calling GLFW as a Win32 DLL */ - #define GLFWAPI __declspec(dllimport) -#elif defined(__GNUC__) && defined(_GLFW_BUILD_DLL) - /* We are building GLFW as a shared / dynamic library */ - #define GLFWAPI __attribute__((visibility("default"))) -#else - /* We are building or calling GLFW as a static library */ - #define GLFWAPI -#endif - - -/************************************************************************* - * GLFW API tokens - *************************************************************************/ - -/*! @name GLFW version macros - * @{ */ -/*! @brief The major version number of the GLFW header. - * - * The major version number of the GLFW header. This is incremented when the - * API is changed in non-compatible ways. - * @ingroup init - */ -#define GLFW_VERSION_MAJOR 3 -/*! @brief The minor version number of the GLFW header. - * - * The minor version number of the GLFW header. This is incremented when - * features are added to the API but it remains backward-compatible. - * @ingroup init - */ -#define GLFW_VERSION_MINOR 3 -/*! @brief The revision number of the GLFW header. - * - * The revision number of the GLFW header. This is incremented when a bug fix - * release is made that does not contain any API changes. - * @ingroup init - */ -#define GLFW_VERSION_REVISION 5 -/*! @} */ - -/*! @brief One. - * - * This is only semantic sugar for the number 1. You can instead use `1` or - * `true` or `_True` or `GL_TRUE` or `VK_TRUE` or anything else that is equal - * to one. - * - * @ingroup init - */ -#define GLFW_TRUE 1 -/*! @brief Zero. - * - * This is only semantic sugar for the number 0. You can instead use `0` or - * `false` or `_False` or `GL_FALSE` or `VK_FALSE` or anything else that is - * equal to zero. - * - * @ingroup init - */ -#define GLFW_FALSE 0 - -/*! @name Key and button actions - * @{ */ -/*! @brief The key or mouse button was released. - * - * The key or mouse button was released. - * - * @ingroup input - */ -#define GLFW_RELEASE 0 -/*! @brief The key or mouse button was pressed. - * - * The key or mouse button was pressed. - * - * @ingroup input - */ -#define GLFW_PRESS 1 -/*! @brief The key was held down until it repeated. - * - * The key was held down until it repeated. - * - * @ingroup input - */ -#define GLFW_REPEAT 2 -/*! @} */ - -/*! @defgroup hat_state Joystick hat states - * @brief Joystick hat states. - * - * See [joystick hat input](@ref joystick_hat) for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_HAT_CENTERED 0 -#define GLFW_HAT_UP 1 -#define GLFW_HAT_RIGHT 2 -#define GLFW_HAT_DOWN 4 -#define GLFW_HAT_LEFT 8 -#define GLFW_HAT_RIGHT_UP (GLFW_HAT_RIGHT | GLFW_HAT_UP) -#define GLFW_HAT_RIGHT_DOWN (GLFW_HAT_RIGHT | GLFW_HAT_DOWN) -#define GLFW_HAT_LEFT_UP (GLFW_HAT_LEFT | GLFW_HAT_UP) -#define GLFW_HAT_LEFT_DOWN (GLFW_HAT_LEFT | GLFW_HAT_DOWN) -/*! @} */ - -/*! @defgroup keys Keyboard keys - * @brief Keyboard key IDs. - * - * See [key input](@ref input_key) for how these are used. - * - * These key codes are inspired by the _USB HID Usage Tables v1.12_ (p. 53-60), - * but re-arranged to map to 7-bit ASCII for printable keys (function keys are - * put in the 256+ range). - * - * The naming of the key codes follow these rules: - * - The US keyboard layout is used - * - Names of printable alpha-numeric characters are used (e.g. "A", "R", - * "3", etc.) - * - For non-alphanumeric characters, Unicode:ish names are used (e.g. - * "COMMA", "LEFT_SQUARE_BRACKET", etc.). Note that some names do not - * correspond to the Unicode standard (usually for brevity) - * - Keys that lack a clear US mapping are named "WORLD_x" - * - For non-printable keys, custom names are used (e.g. "F4", - * "BACKSPACE", etc.) - * - * @ingroup input - * @{ - */ - -/* The unknown key */ -#define GLFW_KEY_UNKNOWN -1 - -/* Printable keys */ -#define GLFW_KEY_SPACE 32 -#define GLFW_KEY_APOSTROPHE 39 /* ' */ -#define GLFW_KEY_COMMA 44 /* , */ -#define GLFW_KEY_MINUS 45 /* - */ -#define GLFW_KEY_PERIOD 46 /* . */ -#define GLFW_KEY_SLASH 47 /* / */ -#define GLFW_KEY_0 48 -#define GLFW_KEY_1 49 -#define GLFW_KEY_2 50 -#define GLFW_KEY_3 51 -#define GLFW_KEY_4 52 -#define GLFW_KEY_5 53 -#define GLFW_KEY_6 54 -#define GLFW_KEY_7 55 -#define GLFW_KEY_8 56 -#define GLFW_KEY_9 57 -#define GLFW_KEY_SEMICOLON 59 /* ; */ -#define GLFW_KEY_EQUAL 61 /* = */ -#define GLFW_KEY_A 65 -#define GLFW_KEY_B 66 -#define GLFW_KEY_C 67 -#define GLFW_KEY_D 68 -#define GLFW_KEY_E 69 -#define GLFW_KEY_F 70 -#define GLFW_KEY_G 71 -#define GLFW_KEY_H 72 -#define GLFW_KEY_I 73 -#define GLFW_KEY_J 74 -#define GLFW_KEY_K 75 -#define GLFW_KEY_L 76 -#define GLFW_KEY_M 77 -#define GLFW_KEY_N 78 -#define GLFW_KEY_O 79 -#define GLFW_KEY_P 80 -#define GLFW_KEY_Q 81 -#define GLFW_KEY_R 82 -#define GLFW_KEY_S 83 -#define GLFW_KEY_T 84 -#define GLFW_KEY_U 85 -#define GLFW_KEY_V 86 -#define GLFW_KEY_W 87 -#define GLFW_KEY_X 88 -#define GLFW_KEY_Y 89 -#define GLFW_KEY_Z 90 -#define GLFW_KEY_LEFT_BRACKET 91 /* [ */ -#define GLFW_KEY_BACKSLASH 92 /* \ */ -#define GLFW_KEY_RIGHT_BRACKET 93 /* ] */ -#define GLFW_KEY_GRAVE_ACCENT 96 /* ` */ -#define GLFW_KEY_WORLD_1 161 /* non-US #1 */ -#define GLFW_KEY_WORLD_2 162 /* non-US #2 */ - -/* Function keys */ -#define GLFW_KEY_ESCAPE 256 -#define GLFW_KEY_ENTER 257 -#define GLFW_KEY_TAB 258 -#define GLFW_KEY_BACKSPACE 259 -#define GLFW_KEY_INSERT 260 -#define GLFW_KEY_DELETE 261 -#define GLFW_KEY_RIGHT 262 -#define GLFW_KEY_LEFT 263 -#define GLFW_KEY_DOWN 264 -#define GLFW_KEY_UP 265 -#define GLFW_KEY_PAGE_UP 266 -#define GLFW_KEY_PAGE_DOWN 267 -#define GLFW_KEY_HOME 268 -#define GLFW_KEY_END 269 -#define GLFW_KEY_CAPS_LOCK 280 -#define GLFW_KEY_SCROLL_LOCK 281 -#define GLFW_KEY_NUM_LOCK 282 -#define GLFW_KEY_PRINT_SCREEN 283 -#define GLFW_KEY_PAUSE 284 -#define GLFW_KEY_F1 290 -#define GLFW_KEY_F2 291 -#define GLFW_KEY_F3 292 -#define GLFW_KEY_F4 293 -#define GLFW_KEY_F5 294 -#define GLFW_KEY_F6 295 -#define GLFW_KEY_F7 296 -#define GLFW_KEY_F8 297 -#define GLFW_KEY_F9 298 -#define GLFW_KEY_F10 299 -#define GLFW_KEY_F11 300 -#define GLFW_KEY_F12 301 -#define GLFW_KEY_F13 302 -#define GLFW_KEY_F14 303 -#define GLFW_KEY_F15 304 -#define GLFW_KEY_F16 305 -#define GLFW_KEY_F17 306 -#define GLFW_KEY_F18 307 -#define GLFW_KEY_F19 308 -#define GLFW_KEY_F20 309 -#define GLFW_KEY_F21 310 -#define GLFW_KEY_F22 311 -#define GLFW_KEY_F23 312 -#define GLFW_KEY_F24 313 -#define GLFW_KEY_F25 314 -#define GLFW_KEY_KP_0 320 -#define GLFW_KEY_KP_1 321 -#define GLFW_KEY_KP_2 322 -#define GLFW_KEY_KP_3 323 -#define GLFW_KEY_KP_4 324 -#define GLFW_KEY_KP_5 325 -#define GLFW_KEY_KP_6 326 -#define GLFW_KEY_KP_7 327 -#define GLFW_KEY_KP_8 328 -#define GLFW_KEY_KP_9 329 -#define GLFW_KEY_KP_DECIMAL 330 -#define GLFW_KEY_KP_DIVIDE 331 -#define GLFW_KEY_KP_MULTIPLY 332 -#define GLFW_KEY_KP_SUBTRACT 333 -#define GLFW_KEY_KP_ADD 334 -#define GLFW_KEY_KP_ENTER 335 -#define GLFW_KEY_KP_EQUAL 336 -#define GLFW_KEY_LEFT_SHIFT 340 -#define GLFW_KEY_LEFT_CONTROL 341 -#define GLFW_KEY_LEFT_ALT 342 -#define GLFW_KEY_LEFT_SUPER 343 -#define GLFW_KEY_RIGHT_SHIFT 344 -#define GLFW_KEY_RIGHT_CONTROL 345 -#define GLFW_KEY_RIGHT_ALT 346 -#define GLFW_KEY_RIGHT_SUPER 347 -#define GLFW_KEY_MENU 348 - -#define GLFW_KEY_LAST GLFW_KEY_MENU - -/*! @} */ - -/*! @defgroup mods Modifier key flags - * @brief Modifier key flags. - * - * See [key input](@ref input_key) for how these are used. - * - * @ingroup input - * @{ */ - -/*! @brief If this bit is set one or more Shift keys were held down. - * - * If this bit is set one or more Shift keys were held down. - */ -#define GLFW_MOD_SHIFT 0x0001 -/*! @brief If this bit is set one or more Control keys were held down. - * - * If this bit is set one or more Control keys were held down. - */ -#define GLFW_MOD_CONTROL 0x0002 -/*! @brief If this bit is set one or more Alt keys were held down. - * - * If this bit is set one or more Alt keys were held down. - */ -#define GLFW_MOD_ALT 0x0004 -/*! @brief If this bit is set one or more Super keys were held down. - * - * If this bit is set one or more Super keys were held down. - */ -#define GLFW_MOD_SUPER 0x0008 -/*! @brief If this bit is set the Caps Lock key is enabled. - * - * If this bit is set the Caps Lock key is enabled and the @ref - * GLFW_LOCK_KEY_MODS input mode is set. - */ -#define GLFW_MOD_CAPS_LOCK 0x0010 -/*! @brief If this bit is set the Num Lock key is enabled. - * - * If this bit is set the Num Lock key is enabled and the @ref - * GLFW_LOCK_KEY_MODS input mode is set. - */ -#define GLFW_MOD_NUM_LOCK 0x0020 - -/*! @} */ - -/*! @defgroup buttons Mouse buttons - * @brief Mouse button IDs. - * - * See [mouse button input](@ref input_mouse_button) for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_MOUSE_BUTTON_1 0 -#define GLFW_MOUSE_BUTTON_2 1 -#define GLFW_MOUSE_BUTTON_3 2 -#define GLFW_MOUSE_BUTTON_4 3 -#define GLFW_MOUSE_BUTTON_5 4 -#define GLFW_MOUSE_BUTTON_6 5 -#define GLFW_MOUSE_BUTTON_7 6 -#define GLFW_MOUSE_BUTTON_8 7 -#define GLFW_MOUSE_BUTTON_LAST GLFW_MOUSE_BUTTON_8 -#define GLFW_MOUSE_BUTTON_LEFT GLFW_MOUSE_BUTTON_1 -#define GLFW_MOUSE_BUTTON_RIGHT GLFW_MOUSE_BUTTON_2 -#define GLFW_MOUSE_BUTTON_MIDDLE GLFW_MOUSE_BUTTON_3 -/*! @} */ - -/*! @defgroup joysticks Joysticks - * @brief Joystick IDs. - * - * See [joystick input](@ref joystick) for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_JOYSTICK_1 0 -#define GLFW_JOYSTICK_2 1 -#define GLFW_JOYSTICK_3 2 -#define GLFW_JOYSTICK_4 3 -#define GLFW_JOYSTICK_5 4 -#define GLFW_JOYSTICK_6 5 -#define GLFW_JOYSTICK_7 6 -#define GLFW_JOYSTICK_8 7 -#define GLFW_JOYSTICK_9 8 -#define GLFW_JOYSTICK_10 9 -#define GLFW_JOYSTICK_11 10 -#define GLFW_JOYSTICK_12 11 -#define GLFW_JOYSTICK_13 12 -#define GLFW_JOYSTICK_14 13 -#define GLFW_JOYSTICK_15 14 -#define GLFW_JOYSTICK_16 15 -#define GLFW_JOYSTICK_LAST GLFW_JOYSTICK_16 -/*! @} */ - -/*! @defgroup gamepad_buttons Gamepad buttons - * @brief Gamepad buttons. - * - * See @ref gamepad for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_GAMEPAD_BUTTON_A 0 -#define GLFW_GAMEPAD_BUTTON_B 1 -#define GLFW_GAMEPAD_BUTTON_X 2 -#define GLFW_GAMEPAD_BUTTON_Y 3 -#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER 4 -#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER 5 -#define GLFW_GAMEPAD_BUTTON_BACK 6 -#define GLFW_GAMEPAD_BUTTON_START 7 -#define GLFW_GAMEPAD_BUTTON_GUIDE 8 -#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9 -#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10 -#define GLFW_GAMEPAD_BUTTON_DPAD_UP 11 -#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12 -#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13 -#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14 -#define GLFW_GAMEPAD_BUTTON_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT - -#define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A -#define GLFW_GAMEPAD_BUTTON_CIRCLE GLFW_GAMEPAD_BUTTON_B -#define GLFW_GAMEPAD_BUTTON_SQUARE GLFW_GAMEPAD_BUTTON_X -#define GLFW_GAMEPAD_BUTTON_TRIANGLE GLFW_GAMEPAD_BUTTON_Y -/*! @} */ - -/*! @defgroup gamepad_axes Gamepad axes - * @brief Gamepad axes. - * - * See @ref gamepad for how these are used. - * - * @ingroup input - * @{ */ -#define GLFW_GAMEPAD_AXIS_LEFT_X 0 -#define GLFW_GAMEPAD_AXIS_LEFT_Y 1 -#define GLFW_GAMEPAD_AXIS_RIGHT_X 2 -#define GLFW_GAMEPAD_AXIS_RIGHT_Y 3 -#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER 4 -#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER 5 -#define GLFW_GAMEPAD_AXIS_LAST GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER -/*! @} */ - -/*! @defgroup errors Error codes - * @brief Error codes. - * - * See [error handling](@ref error_handling) for how these are used. - * - * @ingroup init - * @{ */ -/*! @brief No error has occurred. - * - * No error has occurred. - * - * @analysis Yay. - */ -#define GLFW_NO_ERROR 0 -/*! @brief GLFW has not been initialized. - * - * This occurs if a GLFW function was called that must not be called unless the - * library is [initialized](@ref intro_init). - * - * @analysis Application programmer error. Initialize GLFW before calling any - * function that requires initialization. - */ -#define GLFW_NOT_INITIALIZED 0x00010001 -/*! @brief No context is current for this thread. - * - * This occurs if a GLFW function was called that needs and operates on the - * current OpenGL or OpenGL ES context but no context is current on the calling - * thread. One such function is @ref glfwSwapInterval. - * - * @analysis Application programmer error. Ensure a context is current before - * calling functions that require a current context. - */ -#define GLFW_NO_CURRENT_CONTEXT 0x00010002 -/*! @brief One of the arguments to the function was an invalid enum value. - * - * One of the arguments to the function was an invalid enum value, for example - * requesting @ref GLFW_RED_BITS with @ref glfwGetWindowAttrib. - * - * @analysis Application programmer error. Fix the offending call. - */ -#define GLFW_INVALID_ENUM 0x00010003 -/*! @brief One of the arguments to the function was an invalid value. - * - * One of the arguments to the function was an invalid value, for example - * requesting a non-existent OpenGL or OpenGL ES version like 2.7. - * - * Requesting a valid but unavailable OpenGL or OpenGL ES version will instead - * result in a @ref GLFW_VERSION_UNAVAILABLE error. - * - * @analysis Application programmer error. Fix the offending call. - */ -#define GLFW_INVALID_VALUE 0x00010004 -/*! @brief A memory allocation failed. - * - * A memory allocation failed. - * - * @analysis A bug in GLFW or the underlying operating system. Report the bug - * to our [issue tracker](https://github.com/glfw/glfw/issues). - */ -#define GLFW_OUT_OF_MEMORY 0x00010005 -/*! @brief GLFW could not find support for the requested API on the system. - * - * GLFW could not find support for the requested API on the system. - * - * @analysis The installed graphics driver does not support the requested - * API, or does not support it via the chosen context creation backend. - * Below are a few examples. - * - * @par - * Some pre-installed Windows graphics drivers do not support OpenGL. AMD only - * supports OpenGL ES via EGL, while Nvidia and Intel only support it via - * a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa - * EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary - * driver. Older graphics drivers do not support Vulkan. - */ -#define GLFW_API_UNAVAILABLE 0x00010006 -/*! @brief The requested OpenGL or OpenGL ES version is not available. - * - * The requested OpenGL or OpenGL ES version (including any requested context - * or framebuffer hints) is not available on this machine. - * - * @analysis The machine does not support your requirements. If your - * application is sufficiently flexible, downgrade your requirements and try - * again. Otherwise, inform the user that their machine does not match your - * requirements. - * - * @par - * Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 - * comes out before the 4.x series gets that far, also fail with this error and - * not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions - * will exist. - */ -#define GLFW_VERSION_UNAVAILABLE 0x00010007 -/*! @brief A platform-specific error occurred that does not match any of the - * more specific categories. - * - * A platform-specific error occurred that does not match any of the more - * specific categories. - * - * @analysis A bug or configuration error in GLFW, the underlying operating - * system or its drivers, or a lack of required resources. Report the issue to - * our [issue tracker](https://github.com/glfw/glfw/issues). - */ -#define GLFW_PLATFORM_ERROR 0x00010008 -/*! @brief The requested format is not supported or available. - * - * If emitted during window creation, the requested pixel format is not - * supported. - * - * If emitted when querying the clipboard, the contents of the clipboard could - * not be converted to the requested format. - * - * @analysis If emitted during window creation, one or more - * [hard constraints](@ref window_hints_hard) did not match any of the - * available pixel formats. If your application is sufficiently flexible, - * downgrade your requirements and try again. Otherwise, inform the user that - * their machine does not match your requirements. - * - * @par - * If emitted when querying the clipboard, ignore the error or report it to - * the user, as appropriate. - */ -#define GLFW_FORMAT_UNAVAILABLE 0x00010009 -/*! @brief The specified window does not have an OpenGL or OpenGL ES context. - * - * A window that does not have an OpenGL or OpenGL ES context was passed to - * a function that requires it to have one. - * - * @analysis Application programmer error. Fix the offending call. - */ -#define GLFW_NO_WINDOW_CONTEXT 0x0001000A -/*! @} */ - -/*! @addtogroup window - * @{ */ -/*! @brief Input focus window hint and attribute - * - * Input focus [window hint](@ref GLFW_FOCUSED_hint) or - * [window attribute](@ref GLFW_FOCUSED_attrib). - */ -#define GLFW_FOCUSED 0x00020001 -/*! @brief Window iconification window attribute - * - * Window iconification [window attribute](@ref GLFW_ICONIFIED_attrib). - */ -#define GLFW_ICONIFIED 0x00020002 -/*! @brief Window resize-ability window hint and attribute - * - * Window resize-ability [window hint](@ref GLFW_RESIZABLE_hint) and - * [window attribute](@ref GLFW_RESIZABLE_attrib). - */ -#define GLFW_RESIZABLE 0x00020003 -/*! @brief Window visibility window hint and attribute - * - * Window visibility [window hint](@ref GLFW_VISIBLE_hint) and - * [window attribute](@ref GLFW_VISIBLE_attrib). - */ -#define GLFW_VISIBLE 0x00020004 -/*! @brief Window decoration window hint and attribute - * - * Window decoration [window hint](@ref GLFW_DECORATED_hint) and - * [window attribute](@ref GLFW_DECORATED_attrib). - */ -#define GLFW_DECORATED 0x00020005 -/*! @brief Window auto-iconification window hint and attribute - * - * Window auto-iconification [window hint](@ref GLFW_AUTO_ICONIFY_hint) and - * [window attribute](@ref GLFW_AUTO_ICONIFY_attrib). - */ -#define GLFW_AUTO_ICONIFY 0x00020006 -/*! @brief Window decoration window hint and attribute - * - * Window decoration [window hint](@ref GLFW_FLOATING_hint) and - * [window attribute](@ref GLFW_FLOATING_attrib). - */ -#define GLFW_FLOATING 0x00020007 -/*! @brief Window maximization window hint and attribute - * - * Window maximization [window hint](@ref GLFW_MAXIMIZED_hint) and - * [window attribute](@ref GLFW_MAXIMIZED_attrib). - */ -#define GLFW_MAXIMIZED 0x00020008 -/*! @brief Cursor centering window hint - * - * Cursor centering [window hint](@ref GLFW_CENTER_CURSOR_hint). - */ -#define GLFW_CENTER_CURSOR 0x00020009 -/*! @brief Window framebuffer transparency hint and attribute - * - * Window framebuffer transparency - * [window hint](@ref GLFW_TRANSPARENT_FRAMEBUFFER_hint) and - * [window attribute](@ref GLFW_TRANSPARENT_FRAMEBUFFER_attrib). - */ -#define GLFW_TRANSPARENT_FRAMEBUFFER 0x0002000A -/*! @brief Mouse cursor hover window attribute. - * - * Mouse cursor hover [window attribute](@ref GLFW_HOVERED_attrib). - */ -#define GLFW_HOVERED 0x0002000B -/*! @brief Input focus on calling show window hint and attribute - * - * Input focus [window hint](@ref GLFW_FOCUS_ON_SHOW_hint) or - * [window attribute](@ref GLFW_FOCUS_ON_SHOW_attrib). - */ -#define GLFW_FOCUS_ON_SHOW 0x0002000C - -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_RED_BITS). - */ -#define GLFW_RED_BITS 0x00021001 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_GREEN_BITS). - */ -#define GLFW_GREEN_BITS 0x00021002 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_BLUE_BITS). - */ -#define GLFW_BLUE_BITS 0x00021003 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ALPHA_BITS). - */ -#define GLFW_ALPHA_BITS 0x00021004 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_DEPTH_BITS). - */ -#define GLFW_DEPTH_BITS 0x00021005 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_STENCIL_BITS). - */ -#define GLFW_STENCIL_BITS 0x00021006 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_RED_BITS). - */ -#define GLFW_ACCUM_RED_BITS 0x00021007 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_GREEN_BITS). - */ -#define GLFW_ACCUM_GREEN_BITS 0x00021008 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_BLUE_BITS). - */ -#define GLFW_ACCUM_BLUE_BITS 0x00021009 -/*! @brief Framebuffer bit depth hint. - * - * Framebuffer bit depth [hint](@ref GLFW_ACCUM_ALPHA_BITS). - */ -#define GLFW_ACCUM_ALPHA_BITS 0x0002100A -/*! @brief Framebuffer auxiliary buffer hint. - * - * Framebuffer auxiliary buffer [hint](@ref GLFW_AUX_BUFFERS). - */ -#define GLFW_AUX_BUFFERS 0x0002100B -/*! @brief OpenGL stereoscopic rendering hint. - * - * OpenGL stereoscopic rendering [hint](@ref GLFW_STEREO). - */ -#define GLFW_STEREO 0x0002100C -/*! @brief Framebuffer MSAA samples hint. - * - * Framebuffer MSAA samples [hint](@ref GLFW_SAMPLES). - */ -#define GLFW_SAMPLES 0x0002100D -/*! @brief Framebuffer sRGB hint. - * - * Framebuffer sRGB [hint](@ref GLFW_SRGB_CAPABLE). - */ -#define GLFW_SRGB_CAPABLE 0x0002100E -/*! @brief Monitor refresh rate hint. - * - * Monitor refresh rate [hint](@ref GLFW_REFRESH_RATE). - */ -#define GLFW_REFRESH_RATE 0x0002100F -/*! @brief Framebuffer double buffering hint. - * - * Framebuffer double buffering [hint](@ref GLFW_DOUBLEBUFFER). - */ -#define GLFW_DOUBLEBUFFER 0x00021010 - -/*! @brief Context client API hint and attribute. - * - * Context client API [hint](@ref GLFW_CLIENT_API_hint) and - * [attribute](@ref GLFW_CLIENT_API_attrib). - */ -#define GLFW_CLIENT_API 0x00022001 -/*! @brief Context client API major version hint and attribute. - * - * Context client API major version [hint](@ref GLFW_CONTEXT_VERSION_MAJOR_hint) - * and [attribute](@ref GLFW_CONTEXT_VERSION_MAJOR_attrib). - */ -#define GLFW_CONTEXT_VERSION_MAJOR 0x00022002 -/*! @brief Context client API minor version hint and attribute. - * - * Context client API minor version [hint](@ref GLFW_CONTEXT_VERSION_MINOR_hint) - * and [attribute](@ref GLFW_CONTEXT_VERSION_MINOR_attrib). - */ -#define GLFW_CONTEXT_VERSION_MINOR 0x00022003 -/*! @brief Context client API revision number hint and attribute. - * - * Context client API revision number - * [attribute](@ref GLFW_CONTEXT_REVISION_attrib). - */ -#define GLFW_CONTEXT_REVISION 0x00022004 -/*! @brief Context robustness hint and attribute. - * - * Context client API revision number [hint](@ref GLFW_CONTEXT_ROBUSTNESS_hint) - * and [attribute](@ref GLFW_CONTEXT_ROBUSTNESS_attrib). - */ -#define GLFW_CONTEXT_ROBUSTNESS 0x00022005 -/*! @brief OpenGL forward-compatibility hint and attribute. - * - * OpenGL forward-compatibility [hint](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) - * and [attribute](@ref GLFW_OPENGL_FORWARD_COMPAT_attrib). - */ -#define GLFW_OPENGL_FORWARD_COMPAT 0x00022006 -/*! @brief Debug mode context hint and attribute. - * - * Debug mode context [hint](@ref GLFW_OPENGL_DEBUG_CONTEXT_hint) and - * [attribute](@ref GLFW_OPENGL_DEBUG_CONTEXT_attrib). - */ -#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022007 -/*! @brief OpenGL profile hint and attribute. - * - * OpenGL profile [hint](@ref GLFW_OPENGL_PROFILE_hint) and - * [attribute](@ref GLFW_OPENGL_PROFILE_attrib). - */ -#define GLFW_OPENGL_PROFILE 0x00022008 -/*! @brief Context flush-on-release hint and attribute. - * - * Context flush-on-release [hint](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) and - * [attribute](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_attrib). - */ -#define GLFW_CONTEXT_RELEASE_BEHAVIOR 0x00022009 -/*! @brief Context error suppression hint and attribute. - * - * Context error suppression [hint](@ref GLFW_CONTEXT_NO_ERROR_hint) and - * [attribute](@ref GLFW_CONTEXT_NO_ERROR_attrib). - */ -#define GLFW_CONTEXT_NO_ERROR 0x0002200A -/*! @brief Context creation API hint and attribute. - * - * Context creation API [hint](@ref GLFW_CONTEXT_CREATION_API_hint) and - * [attribute](@ref GLFW_CONTEXT_CREATION_API_attrib). - */ -#define GLFW_CONTEXT_CREATION_API 0x0002200B -/*! @brief Window content area scaling window - * [window hint](@ref GLFW_SCALE_TO_MONITOR). - */ -#define GLFW_SCALE_TO_MONITOR 0x0002200C -/*! @brief macOS specific - * [window hint](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint). - */ -#define GLFW_COCOA_RETINA_FRAMEBUFFER 0x00023001 -/*! @brief macOS specific - * [window hint](@ref GLFW_COCOA_FRAME_NAME_hint). - */ -#define GLFW_COCOA_FRAME_NAME 0x00023002 -/*! @brief macOS specific - * [window hint](@ref GLFW_COCOA_GRAPHICS_SWITCHING_hint). - */ -#define GLFW_COCOA_GRAPHICS_SWITCHING 0x00023003 -/*! @brief X11 specific - * [window hint](@ref GLFW_X11_CLASS_NAME_hint). - */ -#define GLFW_X11_CLASS_NAME 0x00024001 -/*! @brief X11 specific - * [window hint](@ref GLFW_X11_CLASS_NAME_hint). - */ -#define GLFW_X11_INSTANCE_NAME 0x00024002 -/*! @} */ - -#define GLFW_NO_API 0 -#define GLFW_OPENGL_API 0x00030001 -#define GLFW_OPENGL_ES_API 0x00030002 - -#define GLFW_NO_ROBUSTNESS 0 -#define GLFW_NO_RESET_NOTIFICATION 0x00031001 -#define GLFW_LOSE_CONTEXT_ON_RESET 0x00031002 - -#define GLFW_OPENGL_ANY_PROFILE 0 -#define GLFW_OPENGL_CORE_PROFILE 0x00032001 -#define GLFW_OPENGL_COMPAT_PROFILE 0x00032002 - -#define GLFW_CURSOR 0x00033001 -#define GLFW_STICKY_KEYS 0x00033002 -#define GLFW_STICKY_MOUSE_BUTTONS 0x00033003 -#define GLFW_LOCK_KEY_MODS 0x00033004 -#define GLFW_RAW_MOUSE_MOTION 0x00033005 - -#define GLFW_CURSOR_NORMAL 0x00034001 -#define GLFW_CURSOR_HIDDEN 0x00034002 -#define GLFW_CURSOR_DISABLED 0x00034003 - -#define GLFW_ANY_RELEASE_BEHAVIOR 0 -#define GLFW_RELEASE_BEHAVIOR_FLUSH 0x00035001 -#define GLFW_RELEASE_BEHAVIOR_NONE 0x00035002 - -#define GLFW_NATIVE_CONTEXT_API 0x00036001 -#define GLFW_EGL_CONTEXT_API 0x00036002 -#define GLFW_OSMESA_CONTEXT_API 0x00036003 - -/*! @defgroup shapes Standard cursor shapes - * @brief Standard system cursor shapes. - * - * See [standard cursor creation](@ref cursor_standard) for how these are used. - * - * @ingroup input - * @{ */ - -/*! @brief The regular arrow cursor shape. - * - * The regular arrow cursor. - */ -#define GLFW_ARROW_CURSOR 0x00036001 -/*! @brief The text input I-beam cursor shape. - * - * The text input I-beam cursor shape. - */ -#define GLFW_IBEAM_CURSOR 0x00036002 -/*! @brief The crosshair shape. - * - * The crosshair shape. - */ -#define GLFW_CROSSHAIR_CURSOR 0x00036003 -/*! @brief The hand shape. - * - * The hand shape. - */ -#define GLFW_HAND_CURSOR 0x00036004 -/*! @brief The horizontal resize arrow shape. - * - * The horizontal resize arrow shape. - */ -#define GLFW_HRESIZE_CURSOR 0x00036005 -/*! @brief The vertical resize arrow shape. - * - * The vertical resize arrow shape. - */ -#define GLFW_VRESIZE_CURSOR 0x00036006 -/*! @} */ - -#define GLFW_CONNECTED 0x00040001 -#define GLFW_DISCONNECTED 0x00040002 - -/*! @addtogroup init - * @{ */ -/*! @brief Joystick hat buttons init hint. - * - * Joystick hat buttons [init hint](@ref GLFW_JOYSTICK_HAT_BUTTONS). - */ -#define GLFW_JOYSTICK_HAT_BUTTONS 0x00050001 -/*! @brief macOS specific init hint. - * - * macOS specific [init hint](@ref GLFW_COCOA_CHDIR_RESOURCES_hint). - */ -#define GLFW_COCOA_CHDIR_RESOURCES 0x00051001 -/*! @brief macOS specific init hint. - * - * macOS specific [init hint](@ref GLFW_COCOA_MENUBAR_hint). - */ -#define GLFW_COCOA_MENUBAR 0x00051002 -/*! @} */ - -#define GLFW_DONT_CARE -1 - - -/************************************************************************* - * GLFW API types - *************************************************************************/ - -/*! @brief Client API function pointer type. - * - * Generic function pointer used for returning client API function pointers - * without forcing a cast from a regular pointer. - * - * @sa @ref context_glext - * @sa @ref glfwGetProcAddress - * - * @since Added in version 3.0. - * - * @ingroup context - */ -typedef void (*GLFWglproc)(void); - -/*! @brief Vulkan API function pointer type. - * - * Generic function pointer used for returning Vulkan API function pointers - * without forcing a cast from a regular pointer. - * - * @sa @ref vulkan_proc - * @sa @ref glfwGetInstanceProcAddress - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -typedef void (*GLFWvkproc)(void); - -/*! @brief Opaque monitor object. - * - * Opaque monitor object. - * - * @see @ref monitor_object - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -typedef struct GLFWmonitor GLFWmonitor; - -/*! @brief Opaque window object. - * - * Opaque window object. - * - * @see @ref window_object - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef struct GLFWwindow GLFWwindow; - -/*! @brief Opaque cursor object. - * - * Opaque cursor object. - * - * @see @ref cursor_object - * - * @since Added in version 3.1. - * - * @ingroup input - */ -typedef struct GLFWcursor GLFWcursor; - -/*! @brief The function pointer type for memory allocation callbacks. - * - * This is the function pointer type for memory allocation callbacks. A memory - * allocation callback function has the following signature: - * @code - * void* function_name(size_t size, void* user) - * @endcode - * - * This function must return either a memory block at least `size` bytes long, - * or `NULL` if allocation failed. Note that not all parts of GLFW handle allocation - * failures gracefully yet. - * - * This function may be called during @ref glfwInit but before the library is - * flagged as initialized, as well as during @ref glfwTerminate after the - * library is no longer flagged as initialized. - * - * Any memory allocated by this function will be deallocated during library - * termination or earlier. - * - * The size will always be greater than zero. Allocations of size zero are filtered out - * before reaching the custom allocator. - * - * @param[in] size The minimum size, in bytes, of the memory block. - * @param[in] user The user-defined pointer from the allocator. - * @return The address of the newly allocated memory block, or `NULL` if an - * error occurred. - * - * @pointer_lifetime The returned memory block must be valid at least until it - * is deallocated. - * - * @reentrancy This function should not call any GLFW function. - * - * @thread_safety This function may be called from any thread that calls GLFW functions. - * - * @sa @ref init_allocator - * @sa @ref GLFWallocator - * - * @since Added in version 3.4. - * - * @ingroup init - */ -typedef void* (* GLFWallocatefun)(size_t size, void* user); - -/*! @brief The function pointer type for memory reallocation callbacks. - * - * This is the function pointer type for memory reallocation callbacks. - * A memory reallocation callback function has the following signature: - * @code - * void* function_name(void* block, size_t size, void* user) - * @endcode - * - * This function must return a memory block at least `size` bytes long, or - * `NULL` if allocation failed. Note that not all parts of GLFW handle allocation - * failures gracefully yet. - * - * This function may be called during @ref glfwInit but before the library is - * flagged as initialized, as well as during @ref glfwTerminate after the - * library is no longer flagged as initialized. - * - * Any memory allocated by this function will be deallocated during library - * termination or earlier. - * - * The block address will never be `NULL` and the size will always be greater than zero. - * Reallocations of a block to size zero are converted into deallocations. Reallocations - * of `NULL` to a non-zero size are converted into regular allocations. - * - * @param[in] block The address of the memory block to reallocate. - * @param[in] size The new minimum size, in bytes, of the memory block. - * @param[in] user The user-defined pointer from the allocator. - * @return The address of the newly allocated or resized memory block, or - * `NULL` if an error occurred. - * - * @pointer_lifetime The returned memory block must be valid at least until it - * is deallocated. - * - * @reentrancy This function should not call any GLFW function. - * - * @thread_safety This function may be called from any thread that calls GLFW functions. - * - * @sa @ref init_allocator - * @sa @ref GLFWallocator - * - * @since Added in version 3.4. - * - * @ingroup init - */ -typedef void* (* GLFWreallocatefun)(void* block, size_t size, void* user); - -/*! @brief The function pointer type for memory deallocation callbacks. - * - * This is the function pointer type for memory deallocation callbacks. - * A memory deallocation callback function has the following signature: - * @code - * void function_name(void* block, void* user) - * @endcode - * - * This function may deallocate the specified memory block. This memory block - * will have been allocated with the same allocator. - * - * This function may be called during @ref glfwInit but before the library is - * flagged as initialized, as well as during @ref glfwTerminate after the - * library is no longer flagged as initialized. - * - * The block address will never be `NULL`. Deallocations of `NULL` are filtered out - * before reaching the custom allocator. - * - * @param[in] block The address of the memory block to deallocate. - * @param[in] user The user-defined pointer from the allocator. - * - * @pointer_lifetime The specified memory block will not be accessed by GLFW - * after this function is called. - * - * @reentrancy This function should not call any GLFW function. - * - * @thread_safety This function may be called from any thread that calls GLFW functions. - * - * @sa @ref init_allocator - * @sa @ref GLFWallocator - * - * @since Added in version 3.4. - * - * @ingroup init - */ -typedef void (* GLFWdeallocatefun)(void* block, void* user); - -/*! @brief The function pointer type for error callbacks. - * - * This is the function pointer type for error callbacks. An error callback - * function has the following signature: - * @code - * void callback_name(int error_code, const char* description) - * @endcode - * - * @param[in] error_code An [error code](@ref errors). Future releases may add - * more error codes. - * @param[in] description A UTF-8 encoded string describing the error. - * - * @pointer_lifetime The error description string is valid until the callback - * function returns. - * - * @sa @ref error_handling - * @sa @ref glfwSetErrorCallback - * - * @since Added in version 3.0. - * - * @ingroup init - */ -typedef void (* GLFWerrorfun)(int,const char*); - -/*! @brief The function pointer type for window position callbacks. - * - * This is the function pointer type for window position callbacks. A window - * position callback function has the following signature: - * @code - * void callback_name(GLFWwindow* window, int xpos, int ypos) - * @endcode - * - * @param[in] window The window that was moved. - * @param[in] xpos The new x-coordinate, in screen coordinates, of the - * upper-left corner of the content area of the window. - * @param[in] ypos The new y-coordinate, in screen coordinates, of the - * upper-left corner of the content area of the window. - * - * @sa @ref window_pos - * @sa @ref glfwSetWindowPosCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWwindowposfun)(GLFWwindow*,int,int); - -/*! @brief The function pointer type for window size callbacks. - * - * This is the function pointer type for window size callbacks. A window size - * callback function has the following signature: - * @code - * void callback_name(GLFWwindow* window, int width, int height) - * @endcode - * - * @param[in] window The window that was resized. - * @param[in] width The new width, in screen coordinates, of the window. - * @param[in] height The new height, in screen coordinates, of the window. - * - * @sa @ref window_size - * @sa @ref glfwSetWindowSizeCallback - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -typedef void (* GLFWwindowsizefun)(GLFWwindow*,int,int); - -/*! @brief The function pointer type for window close callbacks. - * - * This is the function pointer type for window close callbacks. A window - * close callback function has the following signature: - * @code - * void function_name(GLFWwindow* window) - * @endcode - * - * @param[in] window The window that the user attempted to close. - * - * @sa @ref window_close - * @sa @ref glfwSetWindowCloseCallback - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -typedef void (* GLFWwindowclosefun)(GLFWwindow*); - -/*! @brief The function pointer type for window content refresh callbacks. - * - * This is the function pointer type for window content refresh callbacks. - * A window content refresh callback function has the following signature: - * @code - * void function_name(GLFWwindow* window); - * @endcode - * - * @param[in] window The window whose content needs to be refreshed. - * - * @sa @ref window_refresh - * @sa @ref glfwSetWindowRefreshCallback - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -typedef void (* GLFWwindowrefreshfun)(GLFWwindow*); - -/*! @brief The function pointer type for window focus callbacks. - * - * This is the function pointer type for window focus callbacks. A window - * focus callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int focused) - * @endcode - * - * @param[in] window The window that gained or lost input focus. - * @param[in] focused `GLFW_TRUE` if the window was given input focus, or - * `GLFW_FALSE` if it lost it. - * - * @sa @ref window_focus - * @sa @ref glfwSetWindowFocusCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWwindowfocusfun)(GLFWwindow*,int); - -/*! @brief The function pointer type for window iconify callbacks. - * - * This is the function pointer type for window iconify callbacks. A window - * iconify callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int iconified) - * @endcode - * - * @param[in] window The window that was iconified or restored. - * @param[in] iconified `GLFW_TRUE` if the window was iconified, or - * `GLFW_FALSE` if it was restored. - * - * @sa @ref window_iconify - * @sa @ref glfwSetWindowIconifyCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWwindowiconifyfun)(GLFWwindow*,int); - -/*! @brief The function pointer type for window maximize callbacks. - * - * This is the function pointer type for window maximize callbacks. A window - * maximize callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int maximized) - * @endcode - * - * @param[in] window The window that was maximized or restored. - * @param[in] maximized `GLFW_TRUE` if the window was maximized, or - * `GLFW_FALSE` if it was restored. - * - * @sa @ref window_maximize - * @sa glfwSetWindowMaximizeCallback - * - * @since Added in version 3.3. - * - * @ingroup window - */ -typedef void (* GLFWwindowmaximizefun)(GLFWwindow*,int); - -/*! @brief The function pointer type for framebuffer size callbacks. - * - * This is the function pointer type for framebuffer size callbacks. - * A framebuffer size callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int width, int height) - * @endcode - * - * @param[in] window The window whose framebuffer was resized. - * @param[in] width The new width, in pixels, of the framebuffer. - * @param[in] height The new height, in pixels, of the framebuffer. - * - * @sa @ref window_fbsize - * @sa @ref glfwSetFramebufferSizeCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -typedef void (* GLFWframebuffersizefun)(GLFWwindow*,int,int); - -/*! @brief The function pointer type for window content scale callbacks. - * - * This is the function pointer type for window content scale callbacks. - * A window content scale callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, float xscale, float yscale) - * @endcode - * - * @param[in] window The window whose content scale changed. - * @param[in] xscale The new x-axis content scale of the window. - * @param[in] yscale The new y-axis content scale of the window. - * - * @sa @ref window_scale - * @sa @ref glfwSetWindowContentScaleCallback - * - * @since Added in version 3.3. - * - * @ingroup window - */ -typedef void (* GLFWwindowcontentscalefun)(GLFWwindow*,float,float); - -/*! @brief The function pointer type for mouse button callbacks. - * - * This is the function pointer type for mouse button callback functions. - * A mouse button callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int button, int action, int mods) - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] button The [mouse button](@ref buttons) that was pressed or - * released. - * @param[in] action One of `GLFW_PRESS` or `GLFW_RELEASE`. Future releases - * may add more actions. - * @param[in] mods Bit field describing which [modifier keys](@ref mods) were - * held down. - * - * @sa @ref input_mouse_button - * @sa @ref glfwSetMouseButtonCallback - * - * @since Added in version 1.0. - * @glfw3 Added window handle and modifier mask parameters. - * - * @ingroup input - */ -typedef void (* GLFWmousebuttonfun)(GLFWwindow*,int,int,int); - -/*! @brief The function pointer type for cursor position callbacks. - * - * This is the function pointer type for cursor position callbacks. A cursor - * position callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, double xpos, double ypos); - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] xpos The new cursor x-coordinate, relative to the left edge of - * the content area. - * @param[in] ypos The new cursor y-coordinate, relative to the top edge of the - * content area. - * - * @sa @ref cursor_pos - * @sa @ref glfwSetCursorPosCallback - * - * @since Added in version 3.0. Replaces `GLFWmouseposfun`. - * - * @ingroup input - */ -typedef void (* GLFWcursorposfun)(GLFWwindow*,double,double); - -/*! @brief The function pointer type for cursor enter/leave callbacks. - * - * This is the function pointer type for cursor enter/leave callbacks. - * A cursor enter/leave callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int entered) - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] entered `GLFW_TRUE` if the cursor entered the window's content - * area, or `GLFW_FALSE` if it left it. - * - * @sa @ref cursor_enter - * @sa @ref glfwSetCursorEnterCallback - * - * @since Added in version 3.0. - * - * @ingroup input - */ -typedef void (* GLFWcursorenterfun)(GLFWwindow*,int); - -/*! @brief The function pointer type for scroll callbacks. - * - * This is the function pointer type for scroll callbacks. A scroll callback - * function has the following signature: - * @code - * void function_name(GLFWwindow* window, double xoffset, double yoffset) - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] xoffset The scroll offset along the x-axis. - * @param[in] yoffset The scroll offset along the y-axis. - * - * @sa @ref scrolling - * @sa @ref glfwSetScrollCallback - * - * @since Added in version 3.0. Replaces `GLFWmousewheelfun`. - * - * @ingroup input - */ -typedef void (* GLFWscrollfun)(GLFWwindow*,double,double); - -/*! @brief The function pointer type for keyboard key callbacks. - * - * This is the function pointer type for keyboard key callbacks. A keyboard - * key callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int key, int scancode, int action, int mods) - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] key The [keyboard key](@ref keys) that was pressed or released. - * @param[in] scancode The system-specific scancode of the key. - * @param[in] action `GLFW_PRESS`, `GLFW_RELEASE` or `GLFW_REPEAT`. Future - * releases may add more actions. - * @param[in] mods Bit field describing which [modifier keys](@ref mods) were - * held down. - * - * @sa @ref input_key - * @sa @ref glfwSetKeyCallback - * - * @since Added in version 1.0. - * @glfw3 Added window handle, scancode and modifier mask parameters. - * - * @ingroup input - */ -typedef void (* GLFWkeyfun)(GLFWwindow*,int,int,int,int); - -/*! @brief The function pointer type for Unicode character callbacks. - * - * This is the function pointer type for Unicode character callbacks. - * A Unicode character callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, unsigned int codepoint) - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] codepoint The Unicode code point of the character. - * - * @sa @ref input_char - * @sa @ref glfwSetCharCallback - * - * @since Added in version 2.4. - * @glfw3 Added window handle parameter. - * - * @ingroup input - */ -typedef void (* GLFWcharfun)(GLFWwindow*,unsigned int); - -/*! @brief The function pointer type for Unicode character with modifiers - * callbacks. - * - * This is the function pointer type for Unicode character with modifiers - * callbacks. It is called for each input character, regardless of what - * modifier keys are held down. A Unicode character with modifiers callback - * function has the following signature: - * @code - * void function_name(GLFWwindow* window, unsigned int codepoint, int mods) - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] codepoint The Unicode code point of the character. - * @param[in] mods Bit field describing which [modifier keys](@ref mods) were - * held down. - * - * @sa @ref input_char - * @sa @ref glfwSetCharModsCallback - * - * @deprecated Scheduled for removal in version 4.0. - * - * @since Added in version 3.1. - * - * @ingroup input - */ -typedef void (* GLFWcharmodsfun)(GLFWwindow*,unsigned int,int); - -/*! @brief The function pointer type for path drop callbacks. - * - * This is the function pointer type for path drop callbacks. A path drop - * callback function has the following signature: - * @code - * void function_name(GLFWwindow* window, int path_count, const char* paths[]) - * @endcode - * - * @param[in] window The window that received the event. - * @param[in] path_count The number of dropped paths. - * @param[in] paths The UTF-8 encoded file and/or directory path names. - * - * @pointer_lifetime The path array and its strings are valid until the - * callback function returns. - * - * @sa @ref path_drop - * @sa @ref glfwSetDropCallback - * - * @since Added in version 3.1. - * - * @ingroup input - */ -typedef void (* GLFWdropfun)(GLFWwindow*,int,const char*[]); - -/*! @brief The function pointer type for monitor configuration callbacks. - * - * This is the function pointer type for monitor configuration callbacks. - * A monitor callback function has the following signature: - * @code - * void function_name(GLFWmonitor* monitor, int event) - * @endcode - * - * @param[in] monitor The monitor that was connected or disconnected. - * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future - * releases may add more events. - * - * @sa @ref monitor_event - * @sa @ref glfwSetMonitorCallback - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -typedef void (* GLFWmonitorfun)(GLFWmonitor*,int); - -/*! @brief The function pointer type for joystick configuration callbacks. - * - * This is the function pointer type for joystick configuration callbacks. - * A joystick configuration callback function has the following signature: - * @code - * void function_name(int jid, int event) - * @endcode - * - * @param[in] jid The joystick that was connected or disconnected. - * @param[in] event One of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`. Future - * releases may add more events. - * - * @sa @ref joystick_event - * @sa @ref glfwSetJoystickCallback - * - * @since Added in version 3.2. - * - * @ingroup input - */ -typedef void (* GLFWjoystickfun)(int,int); - -/*! @brief Video mode type. - * - * This describes a single video mode. - * - * @sa @ref monitor_modes - * @sa @ref glfwGetVideoMode - * @sa @ref glfwGetVideoModes - * - * @since Added in version 1.0. - * @glfw3 Added refresh rate member. - * - * @ingroup monitor - */ -typedef struct GLFWvidmode -{ - /*! The width, in screen coordinates, of the video mode. - */ - int width; - /*! The height, in screen coordinates, of the video mode. - */ - int height; - /*! The bit depth of the red channel of the video mode. - */ - int redBits; - /*! The bit depth of the green channel of the video mode. - */ - int greenBits; - /*! The bit depth of the blue channel of the video mode. - */ - int blueBits; - /*! The refresh rate, in Hz, of the video mode. - */ - int refreshRate; -} GLFWvidmode; - -/*! @brief Gamma ramp. - * - * This describes the gamma ramp for a monitor. - * - * @sa @ref monitor_gamma - * @sa @ref glfwGetGammaRamp - * @sa @ref glfwSetGammaRamp - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -typedef struct GLFWgammaramp -{ - /*! An array of value describing the response of the red channel. - */ - unsigned short* red; - /*! An array of value describing the response of the green channel. - */ - unsigned short* green; - /*! An array of value describing the response of the blue channel. - */ - unsigned short* blue; - /*! The number of elements in each array. - */ - unsigned int size; -} GLFWgammaramp; - -/*! @brief Image data. - * - * This describes a single 2D image. See the documentation for each related - * function what the expected pixel format is. - * - * @sa @ref cursor_custom - * @sa @ref window_icon - * - * @since Added in version 2.1. - * @glfw3 Removed format and bytes-per-pixel members. - * - * @ingroup window - */ -typedef struct GLFWimage -{ - /*! The width, in pixels, of this image. - */ - int width; - /*! The height, in pixels, of this image. - */ - int height; - /*! The pixel data of this image, arranged left-to-right, top-to-bottom. - */ - unsigned char* pixels; -} GLFWimage; - -/*! @brief Gamepad input state - * - * This describes the input state of a gamepad. - * - * @sa @ref gamepad - * @sa @ref glfwGetGamepadState - * - * @since Added in version 3.3. - * - * @ingroup input - */ -typedef struct GLFWgamepadstate -{ - /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS` - * or `GLFW_RELEASE`. - */ - unsigned char buttons[15]; - /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 - * to 1.0 inclusive. - */ - float axes[6]; -} GLFWgamepadstate; - -/*! @brief - * - * @sa @ref init_allocator - * @sa @ref glfwInitAllocator - * - * @since Added in version 3.4. - * - * @ingroup init - */ -typedef struct GLFWallocator -{ - GLFWallocatefun allocate; - GLFWreallocatefun reallocate; - GLFWdeallocatefun deallocate; - void* user; -} GLFWallocator; - - -/************************************************************************* - * GLFW API functions - *************************************************************************/ - -/*! @brief Initializes the GLFW library. - * - * This function initializes the GLFW library. Before most GLFW functions can - * be used, GLFW must be initialized, and before an application terminates GLFW - * should be terminated in order to free any resources allocated during or - * after initialization. - * - * If this function fails, it calls @ref glfwTerminate before returning. If it - * succeeds, you should call @ref glfwTerminate before the application exits. - * - * Additional calls to this function after successful initialization but before - * termination will return `GLFW_TRUE` immediately. - * - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. - * - * @remark @macos This function will change the current directory of the - * application to the `Contents/Resources` subdirectory of the application's - * bundle, if present. This can be disabled with the @ref - * GLFW_COCOA_CHDIR_RESOURCES init hint. - * - * @remark @x11 This function will set the `LC_CTYPE` category of the - * application locale according to the current environment if that category is - * still "C". This is because the "C" locale breaks Unicode text input. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref intro_init - * @sa @ref glfwTerminate - * - * @since Added in version 1.0. - * - * @ingroup init - */ -GLFWAPI int glfwInit(void); - -/*! @brief Terminates the GLFW library. - * - * This function destroys all remaining windows and cursors, restores any - * modified gamma ramps and frees any other allocated resources. Once this - * function is called, you must again call @ref glfwInit successfully before - * you will be able to use most GLFW functions. - * - * If GLFW has been successfully initialized, this function should be called - * before the application exits. If initialization fails, there is no need to - * call this function, as it is called by @ref glfwInit before it returns - * failure. - * - * This function has no effect if GLFW is not initialized. - * - * @errors Possible errors include @ref GLFW_PLATFORM_ERROR. - * - * @remark This function may be called before @ref glfwInit. - * - * @warning The contexts of any remaining windows must not be current on any - * other thread when this function is called. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref intro_init - * @sa @ref glfwInit - * - * @since Added in version 1.0. - * - * @ingroup init - */ -GLFWAPI void glfwTerminate(void); - -/*! @brief Sets the specified init hint to the desired value. - * - * This function sets hints for the next initialization of GLFW. - * - * The values you set hints to are never reset by GLFW, but they only take - * effect during initialization. Once GLFW has been initialized, any values - * you set will be ignored until the library is terminated and initialized - * again. - * - * Some hints are platform specific. These may be set on any platform but they - * will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions. - * - * @param[in] hint The [init hint](@ref init_hints) to set. - * @param[in] value The new value of the init hint. - * - * @errors Possible errors include @ref GLFW_INVALID_ENUM and @ref - * GLFW_INVALID_VALUE. - * - * @remarks This function may be called before @ref glfwInit. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa init_hints - * @sa glfwInit - * - * @since Added in version 3.3. - * - * @ingroup init - */ -GLFWAPI void glfwInitHint(int hint, int value); - -/*! @brief Sets the init allocator to the desired value. - * - * To use the default allocator, call this function with a `NULL` argument. - * - * If you specify an allocator struct, every member must be a valid function - * pointer. If any member is `NULL`, this function emits @ref - * GLFW_INVALID_VALUE and the init allocator is unchanged. - * - * @param[in] allocator The allocator to use at the next initialization, or - * `NULL` to use the default one. - * - * @errors Possible errors include @ref GLFW_INVALID_VALUE. - * - * @pointer_lifetime The specified allocator is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref init_allocator - * @sa @ref glfwInit - * - * @since Added in version 3.4. - * - * @ingroup init - */ -GLFWAPI void glfwInitAllocator(const GLFWallocator* allocator); - -/*! @brief Retrieves the version of the GLFW library. - * - * This function retrieves the major, minor and revision numbers of the GLFW - * library. It is intended for when you are using GLFW as a shared library and - * want to ensure that you are using the minimum required version. - * - * Any or all of the version arguments may be `NULL`. - * - * @param[out] major Where to store the major version number, or `NULL`. - * @param[out] minor Where to store the minor version number, or `NULL`. - * @param[out] rev Where to store the revision number, or `NULL`. - * - * @errors None. - * - * @remark This function may be called before @ref glfwInit. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref intro_version - * @sa @ref glfwGetVersionString - * - * @since Added in version 1.0. - * - * @ingroup init - */ -GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev); - -/*! @brief Returns a string describing the compile-time configuration. - * - * This function returns the compile-time generated - * [version string](@ref intro_version_string) of the GLFW library binary. It - * describes the version, platform, compiler and any platform-specific - * compile-time options. It should not be confused with the OpenGL or OpenGL - * ES version string, queried with `glGetString`. - * - * __Do not use the version string__ to parse the GLFW library version. The - * @ref glfwGetVersion function provides the version of the running library - * binary in numerical format. - * - * @return The ASCII encoded GLFW version string. - * - * @errors None. - * - * @remark This function may be called before @ref glfwInit. - * - * @pointer_lifetime The returned string is static and compile-time generated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref intro_version - * @sa @ref glfwGetVersion - * - * @since Added in version 3.0. - * - * @ingroup init - */ -GLFWAPI const char* glfwGetVersionString(void); - -/*! @brief Returns and clears the last error for the calling thread. - * - * This function returns and clears the [error code](@ref errors) of the last - * error that occurred on the calling thread, and optionally a UTF-8 encoded - * human-readable description of it. If no error has occurred since the last - * call, it returns @ref GLFW_NO_ERROR (zero) and the description pointer is - * set to `NULL`. - * - * @param[in] description Where to store the error description pointer, or `NULL`. - * @return The last error code for the calling thread, or @ref GLFW_NO_ERROR - * (zero). - * - * @errors None. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is guaranteed to be valid only until the - * next error occurs or the library is terminated. - * - * @remark This function may be called before @ref glfwInit. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref error_handling - * @sa @ref glfwSetErrorCallback - * - * @since Added in version 3.3. - * - * @ingroup init - */ -GLFWAPI int glfwGetError(const char** description); - -/*! @brief Sets the error callback. - * - * This function sets the error callback, which is called with an error code - * and a human-readable description each time a GLFW error occurs. - * - * The error code is set before the callback is called. Calling @ref - * glfwGetError from the error callback will return the same value as the error - * code argument. - * - * The error callback is called on the thread where the error occurred. If you - * are using GLFW from multiple threads, your error callback needs to be - * written accordingly. - * - * Because the description string may have been generated specifically for that - * error, it is not guaranteed to be valid after the callback has returned. If - * you wish to use it after the callback returns, you need to make a copy. - * - * Once set, the error callback remains set even after the library has been - * terminated. - * - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set. - * - * @callback_signature - * @code - * void callback_name(int error_code, const char* description) - * @endcode - * For more information about the callback parameters, see the - * [callback pointer type](@ref GLFWerrorfun). - * - * @errors None. - * - * @remark This function may be called before @ref glfwInit. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref error_handling - * @sa @ref glfwGetError - * - * @since Added in version 3.0. - * - * @ingroup init - */ -GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback); - -/*! @brief Returns the currently selected platform. - * - * This function returns the platform that was selected during initialization. The - * returned value will be one of `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`, - * `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` or `GLFW_PLATFORM_NULL`. - * - * @return The currently selected platform, or zero if an error occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref platform - * @sa @ref glfwPlatformSupported - * - * @since Added in version 3.4. - * - * @ingroup init - */ -GLFWAPI int glfwGetPlatform(void); - -/*! @brief Returns whether the library includes support for the specified platform. - * - * This function returns whether the library was compiled with support for the specified - * platform. The platform must be one of `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`, - * `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` or `GLFW_PLATFORM_NULL`. - * - * @param[in] platform The platform to query. - * @return `GLFW_TRUE` if the platform is supported, or `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_INVALID_ENUM. - * - * @remark This function may be called before @ref glfwInit. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref platform - * @sa @ref glfwGetPlatform - * - * @since Added in version 3.4. - * - * @ingroup init - */ -GLFWAPI int glfwPlatformSupported(int platform); - -/*! @brief Returns the currently connected monitors. - * - * This function returns an array of handles for all currently connected - * monitors. The primary monitor is always first in the returned array. If no - * monitors were found, this function returns `NULL`. - * - * @param[out] count Where to store the number of monitors in the returned - * array. This is set to zero if an error occurred. - * @return An array of monitor handles, or `NULL` if no monitors were found or - * if an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is guaranteed to be valid only until the - * monitor configuration changes or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_monitors - * @sa @ref monitor_event - * @sa @ref glfwGetPrimaryMonitor - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI GLFWmonitor** glfwGetMonitors(int* count); - -/*! @brief Returns the primary monitor. - * - * This function returns the primary monitor. This is usually the monitor - * where elements like the task bar or global menu bar are located. - * - * @return The primary monitor, or `NULL` if no monitors were found or if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @remark The primary monitor is always first in the array returned by @ref - * glfwGetMonitors. - * - * @sa @ref monitor_monitors - * @sa @ref glfwGetMonitors - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void); - -/*! @brief Returns the position of the monitor's viewport on the virtual screen. - * - * This function returns the position, in screen coordinates, of the upper-left - * corner of the specified monitor. - * - * Any or all of the position arguments may be `NULL`. If an error occurs, all - * non-`NULL` position arguments will be set to zero. - * - * @param[in] monitor The monitor to query. - * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`. - * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_properties - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos); - -/*! @brief Retrieves the work area of the monitor. - * - * This function returns the position, in screen coordinates, of the upper-left - * corner of the work area of the specified monitor along with the work area - * size in screen coordinates. The work area is defined as the area of the - * monitor not occluded by the operating system task bar where present. If no - * task bar exists then the work area is the monitor resolution in screen - * coordinates. - * - * Any or all of the position and size arguments may be `NULL`. If an error - * occurs, all non-`NULL` position and size arguments will be set to zero. - * - * @param[in] monitor The monitor to query. - * @param[out] xpos Where to store the monitor x-coordinate, or `NULL`. - * @param[out] ypos Where to store the monitor y-coordinate, or `NULL`. - * @param[out] width Where to store the monitor width, or `NULL`. - * @param[out] height Where to store the monitor height, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_workarea - * - * @since Added in version 3.3. - * - * @ingroup monitor - */ -GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height); - -/*! @brief Returns the physical size of the monitor. - * - * This function returns the size, in millimetres, of the display area of the - * specified monitor. - * - * Some systems do not provide accurate monitor size information, either - * because the monitor - * [EDID](https://en.wikipedia.org/wiki/Extended_display_identification_data) - * data is incorrect or because the driver does not report it accurately. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] monitor The monitor to query. - * @param[out] widthMM Where to store the width, in millimetres, of the - * monitor's display area, or `NULL`. - * @param[out] heightMM Where to store the height, in millimetres, of the - * monitor's display area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @win32 calculates the returned physical size from the - * current resolution and system DPI instead of querying the monitor EDID data. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_properties - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* monitor, int* widthMM, int* heightMM); - -/*! @brief Retrieves the content scale for the specified monitor. - * - * This function retrieves the content scale for the specified monitor. The - * content scale is the ratio between the current DPI and the platform's - * default DPI. This is especially important for text and any UI elements. If - * the pixel dimensions of your UI scaled by this look appropriate on your - * machine then it should appear at a reasonable size on other machines - * regardless of their DPI and scaling settings. This relies on the system DPI - * and scaling settings being somewhat correct. - * - * The content scale may depend on both the monitor resolution and pixel - * density and on user settings. It may be very different from the raw DPI - * calculated from the physical size and current resolution. - * - * @param[in] monitor The monitor to query. - * @param[out] xscale Where to store the x-axis content scale, or `NULL`. - * @param[out] yscale Where to store the y-axis content scale, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_scale - * @sa @ref glfwGetWindowContentScale - * - * @since Added in version 3.3. - * - * @ingroup monitor - */ -GLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* monitor, float* xscale, float* yscale); - -/*! @brief Returns the name of the specified monitor. - * - * This function returns a human-readable name, encoded as UTF-8, of the - * specified monitor. The name typically reflects the make and model of the - * monitor and is not guaranteed to be unique among the connected monitors. - * - * @param[in] monitor The monitor to query. - * @return The UTF-8 encoded name of the monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified monitor is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_properties - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* monitor); - -/*! @brief Sets the user pointer of the specified monitor. - * - * This function sets the user-defined pointer of the specified monitor. The - * current value is retained until the monitor is disconnected. The initial - * value is `NULL`. - * - * This function may be called from the monitor callback, even for a monitor - * that is being disconnected. - * - * @param[in] monitor The monitor whose pointer to set. - * @param[in] pointer The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref monitor_userptr - * @sa @ref glfwGetMonitorUserPointer - * - * @since Added in version 3.3. - * - * @ingroup monitor - */ -GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* monitor, void* pointer); - -/*! @brief Returns the user pointer of the specified monitor. - * - * This function returns the current value of the user-defined pointer of the - * specified monitor. The initial value is `NULL`. - * - * This function may be called from the monitor callback, even for a monitor - * that is being disconnected. - * - * @param[in] monitor The monitor whose pointer to return. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref monitor_userptr - * @sa @ref glfwSetMonitorUserPointer - * - * @since Added in version 3.3. - * - * @ingroup monitor - */ -GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* monitor); - -/*! @brief Sets the monitor configuration callback. - * - * This function sets the monitor configuration callback, or removes the - * currently set callback. This is called when a monitor is connected to or - * disconnected from the system. - * - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWmonitor* monitor, int event) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWmonitorfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_event - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback); - -/*! @brief Returns the available video modes for the specified monitor. - * - * This function returns an array of all video modes supported by the specified - * monitor. The returned array is sorted in ascending order, first by color - * bit depth (the sum of all channel depths), then by resolution area (the - * product of width and height), then resolution width and finally by refresh - * rate. - * - * @param[in] monitor The monitor to query. - * @param[out] count Where to store the number of video modes in the returned - * array. This is set to zero if an error occurred. - * @return An array of video modes, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified monitor is - * disconnected, this function is called again for that monitor or the library - * is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_modes - * @sa @ref glfwGetVideoMode - * - * @since Added in version 1.0. - * @glfw3 Changed to return an array of modes for a specific monitor. - * - * @ingroup monitor - */ -GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* monitor, int* count); - -/*! @brief Returns the current mode of the specified monitor. - * - * This function returns the current video mode of the specified monitor. If - * you have created a full screen window for that monitor, the return value - * will depend on whether that window is iconified. - * - * @param[in] monitor The monitor to query. - * @return The current mode of the monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified monitor is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_modes - * @sa @ref glfwGetVideoModes - * - * @since Added in version 3.0. Replaces `glfwGetDesktopMode`. - * - * @ingroup monitor - */ -GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor); - -/*! @brief Generates a gamma ramp and sets it for the specified monitor. - * - * This function generates an appropriately sized gamma ramp from the specified - * exponent and then calls @ref glfwSetGammaRamp with it. The value must be - * a finite number greater than zero. - * - * The software controlled gamma ramp is applied _in addition_ to the hardware - * gamma correction, which today is usually an approximation of sRGB gamma. - * This means that setting a perfectly linear ramp, or gamma 1.0, will produce - * the default (usually sRGB-like) behavior. - * - * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref - * GLFW_SRGB_CAPABLE hint. - * - * @param[in] monitor The monitor whose gamma ramp to set. - * @param[in] gamma The desired exponent. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark @wayland Gamma handling is a privileged protocol, this function - * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_gamma - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma); - -/*! @brief Returns the current gamma ramp for the specified monitor. - * - * This function returns the current gamma ramp of the specified monitor. - * - * @param[in] monitor The monitor to query. - * @return The current gamma ramp, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland Gamma handling is a privileged protocol, this function - * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR while - * returning `NULL`. - * - * @pointer_lifetime The returned structure and its arrays are allocated and - * freed by GLFW. You should not free them yourself. They are valid until the - * specified monitor is disconnected, this function is called again for that - * monitor or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_gamma - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor); - -/*! @brief Sets the current gamma ramp for the specified monitor. - * - * This function sets the current gamma ramp for the specified monitor. The - * original gamma ramp for that monitor is saved by GLFW the first time this - * function is called and is restored by @ref glfwTerminate. - * - * The software controlled gamma ramp is applied _in addition_ to the hardware - * gamma correction, which today is usually an approximation of sRGB gamma. - * This means that setting a perfectly linear ramp, or gamma 1.0, will produce - * the default (usually sRGB-like) behavior. - * - * For gamma correct rendering with OpenGL or OpenGL ES, see the @ref - * GLFW_SRGB_CAPABLE hint. - * - * @param[in] monitor The monitor whose gamma ramp to set. - * @param[in] ramp The gamma ramp to use. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark The size of the specified gamma ramp should match the size of the - * current ramp for that monitor. - * - * @remark @win32 The gamma ramp size must be 256. - * - * @remark @wayland Gamma handling is a privileged protocol, this function - * will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified gamma ramp is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref monitor_gamma - * - * @since Added in version 3.0. - * - * @ingroup monitor - */ -GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp); - -/*! @brief Resets all window hints to their default values. - * - * This function resets all window hints to their - * [default values](@ref window_hints_values). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hints - * @sa @ref glfwWindowHint - * @sa @ref glfwWindowHintString - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwDefaultWindowHints(void); - -/*! @brief Sets the specified window hint to the desired value. - * - * This function sets hints for the next call to @ref glfwCreateWindow. The - * hints, once set, retain their values until changed by a call to this - * function or @ref glfwDefaultWindowHints, or until the library is terminated. - * - * Only integer value hints can be set with this function. String value hints - * are set with @ref glfwWindowHintString. - * - * This function does not check whether the specified hint values are valid. - * If you set hints to invalid values this will instead be reported by the next - * call to @ref glfwCreateWindow. - * - * Some hints are platform specific. These may be set on any platform but they - * will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions. - * - * @param[in] hint The [window hint](@ref window_hints) to set. - * @param[in] value The new value of the window hint. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hints - * @sa @ref glfwWindowHintString - * @sa @ref glfwDefaultWindowHints - * - * @since Added in version 3.0. Replaces `glfwOpenWindowHint`. - * - * @ingroup window - */ -GLFWAPI void glfwWindowHint(int hint, int value); - -/*! @brief Sets the specified window hint to the desired value. - * - * This function sets hints for the next call to @ref glfwCreateWindow. The - * hints, once set, retain their values until changed by a call to this - * function or @ref glfwDefaultWindowHints, or until the library is terminated. - * - * Only string type hints can be set with this function. Integer value hints - * are set with @ref glfwWindowHint. - * - * This function does not check whether the specified hint values are valid. - * If you set hints to invalid values this will instead be reported by the next - * call to @ref glfwCreateWindow. - * - * Some hints are platform specific. These may be set on any platform but they - * will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions. - * - * @param[in] hint The [window hint](@ref window_hints) to set. - * @param[in] value The new value of the window hint. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @pointer_lifetime The specified string is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hints - * @sa @ref glfwWindowHint - * @sa @ref glfwDefaultWindowHints - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwWindowHintString(int hint, const char* value); - -/*! @brief Creates a window and its associated context. - * - * This function creates a window and its associated OpenGL or OpenGL ES - * context. Most of the options controlling how the window and its context - * should be created are specified with [window hints](@ref window_hints). - * - * Successful creation does not change which context is current. Before you - * can use the newly created context, you need to - * [make it current](@ref context_current). For information about the `share` - * parameter, see @ref context_sharing. - * - * The created window, framebuffer and context may differ from what you - * requested, as not all parameters and hints are - * [hard constraints](@ref window_hints_hard). This includes the size of the - * window, especially for full screen windows. To query the actual attributes - * of the created window, framebuffer and context, see @ref - * glfwGetWindowAttrib, @ref glfwGetWindowSize and @ref glfwGetFramebufferSize. - * - * To create a full screen window, you need to specify the monitor the window - * will cover. If no monitor is specified, the window will be windowed mode. - * Unless you have a way for the user to choose a specific monitor, it is - * recommended that you pick the primary monitor. For more information on how - * to query connected monitors, see @ref monitor_monitors. - * - * For full screen windows, the specified size becomes the resolution of the - * window's _desired video mode_. As long as a full screen window is not - * iconified, the supported video mode most closely matching the desired video - * mode is set for the specified monitor. For more information about full - * screen windows, including the creation of so called _windowed full screen_ - * or _borderless full screen_ windows, see @ref window_windowed_full_screen. - * - * Once you have created the window, you can switch it between windowed and - * full screen mode with @ref glfwSetWindowMonitor. This will not affect its - * OpenGL or OpenGL ES context. - * - * By default, newly created windows use the placement recommended by the - * window system. To create the window at a specific position, make it - * initially invisible using the [GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window - * hint, set its [position](@ref window_pos) and then [show](@ref window_hide) - * it. - * - * As long as at least one full screen window is not iconified, the screensaver - * is prohibited from starting. - * - * Window systems put limits on window sizes. Very large or very small window - * dimensions may be overridden by the window system on creation. Check the - * actual [size](@ref window_size) after creation. - * - * The [swap interval](@ref buffer_swap) is not set during window creation and - * the initial value may vary depending on driver settings and defaults. - * - * @param[in] width The desired width, in screen coordinates, of the window. - * This must be greater than zero. - * @param[in] height The desired height, in screen coordinates, of the window. - * This must be greater than zero. - * @param[in] title The initial, UTF-8 encoded window title. - * @param[in] monitor The monitor to use for full screen mode, or `NULL` for - * windowed mode. - * @param[in] share The window whose context to share resources with, or `NULL` - * to not share resources. - * @return The handle of the created window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE, @ref GLFW_API_UNAVAILABLE, @ref - * GLFW_VERSION_UNAVAILABLE, @ref GLFW_FORMAT_UNAVAILABLE and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @win32 Window creation will fail if the Microsoft GDI software - * OpenGL implementation is the only one available. - * - * @remark @win32 If the executable has an icon resource named `GLFW_ICON,` it - * will be set as the initial icon for the window. If no such icon is present, - * the `IDI_APPLICATION` icon will be used instead. To set a different icon, - * see @ref glfwSetWindowIcon. - * - * @remark @win32 The context to share resources with must not be current on - * any other thread. - * - * @remark @macos The OS only supports forward-compatible core profile contexts - * for OpenGL versions 3.2 and later. Before creating an OpenGL context of - * version 3.2 or later you must set the - * [GLFW_OPENGL_FORWARD_COMPAT](@ref GLFW_OPENGL_FORWARD_COMPAT_hint) and - * [GLFW_OPENGL_PROFILE](@ref GLFW_OPENGL_PROFILE_hint) hints accordingly. - * OpenGL 3.0 and 3.1 contexts are not supported at all on macOS. - * - * @remark @macos The GLFW window has no icon, as it is not a document - * window, but the dock icon will be the same as the application bundle's icon. - * For more information on bundles, see the - * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) - * in the Mac Developer Library. - * - * @remark @macos The first time a window is created the menu bar is created. - * If GLFW finds a `MainMenu.nib` it is loaded and assumed to contain a menu - * bar. Otherwise a minimal menu bar is created manually with common commands - * like Hide, Quit and About. The About entry opens a minimal about dialog - * with information from the application's bundle. Menu bar creation can be - * disabled entirely with the @ref GLFW_COCOA_MENUBAR init hint. - * - * @remark @macos On OS X 10.10 and later the window frame will not be rendered - * at full resolution on Retina displays unless the - * [GLFW_COCOA_RETINA_FRAMEBUFFER](@ref GLFW_COCOA_RETINA_FRAMEBUFFER_hint) - * hint is `GLFW_TRUE` and the `NSHighResolutionCapable` key is enabled in the - * application bundle's `Info.plist`. For more information, see - * [High Resolution Guidelines for OS X](https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html) - * in the Mac Developer Library. The GLFW test and example programs use - * a custom `Info.plist` template for this, which can be found as - * `CMake/MacOSXBundleInfo.plist.in` in the source tree. - * - * @remark @macos When activating frame autosaving with - * [GLFW_COCOA_FRAME_NAME](@ref GLFW_COCOA_FRAME_NAME_hint), the specified - * window size and position may be overridden by previously saved values. - * - * @remark @x11 Some window managers will not respect the placement of - * initially hidden windows. - * - * @remark @x11 Due to the asynchronous nature of X11, it may take a moment for - * a window to reach its requested state. This means you may not be able to - * query the final size, position or other attributes directly after window - * creation. - * - * @remark @x11 The class part of the `WM_CLASS` window property will by - * default be set to the window title passed to this function. The instance - * part will use the contents of the `RESOURCE_NAME` environment variable, if - * present and not empty, or fall back to the window title. Set the - * [GLFW_X11_CLASS_NAME](@ref GLFW_X11_CLASS_NAME_hint) and - * [GLFW_X11_INSTANCE_NAME](@ref GLFW_X11_INSTANCE_NAME_hint) window hints to - * override this. - * - * @remark @wayland Compositors should implement the xdg-decoration protocol - * for GLFW to decorate the window properly. If this protocol isn't - * supported, or if the compositor prefers client-side decorations, a very - * simple fallback frame will be drawn using the wp_viewporter protocol. A - * compositor can still emit close, maximize or fullscreen events, using for - * instance a keybind mechanism. If neither of these protocols is supported, - * the window won't be decorated. - * - * @remark @wayland A full screen window will not attempt to change the mode, - * no matter what the requested size or refresh rate. - * - * @remark @wayland Screensaver inhibition requires the idle-inhibit protocol - * to be implemented in the user's compositor. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_creation - * @sa @ref glfwDestroyWindow - * - * @since Added in version 3.0. Replaces `glfwOpenWindow`. - * - * @ingroup window - */ -GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share); - -/*! @brief Destroys the specified window and its context. - * - * This function destroys the specified window and its context. On calling - * this function, no further callbacks will be called for that window. - * - * If the context of the specified window is current on the main thread, it is - * detached before being destroyed. - * - * @param[in] window The window to destroy. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @note The context of the specified window must not be current on any other - * thread when this function is called. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_creation - * @sa @ref glfwCreateWindow - * - * @since Added in version 3.0. Replaces `glfwCloseWindow`. - * - * @ingroup window - */ -GLFWAPI void glfwDestroyWindow(GLFWwindow* window); - -/*! @brief Checks the close flag of the specified window. - * - * This function returns the value of the close flag of the specified window. - * - * @param[in] window The window to query. - * @return The value of the close flag. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_close - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI int glfwWindowShouldClose(GLFWwindow* window); - -/*! @brief Sets the close flag of the specified window. - * - * This function sets the value of the close flag of the specified window. - * This can be used to override the user's attempt to close the window, or - * to signal that it should be closed. - * - * @param[in] window The window whose flag to change. - * @param[in] value The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_close - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* window, int value); - -/*! @brief Sets the title of the specified window. - * - * This function sets the window title, encoded as UTF-8, of the specified - * window. - * - * @param[in] window The window whose title to change. - * @param[in] title The UTF-8 encoded window title. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @macos The window title will not be updated until the next time you - * process events. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_title - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title); - -/*! @brief Sets the icon for the specified window. - * - * This function sets the icon of the specified window. If passed an array of - * candidate images, those of or closest to the sizes desired by the system are - * selected. If no images are specified, the window reverts to its default - * icon. - * - * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight - * bits per channel with the red channel first. They are arranged canonically - * as packed sequential rows, starting from the top-left corner. - * - * The desired image sizes varies depending on platform and system settings. - * The selected images will be rescaled as needed. Good sizes include 16x16, - * 32x32 and 48x48. - * - * @param[in] window The window whose icon to set. - * @param[in] count The number of images in the specified array, or zero to - * revert to the default window icon. - * @param[in] images The images to create the icon from. This is ignored if - * count is zero. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified image data is copied before this function - * returns. - * - * @remark @macos The GLFW window has no icon, as it is not a document - * window, so this function does nothing. The dock icon will be the same as - * the application bundle's icon. For more information on bundles, see the - * [Bundle Programming Guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/) - * in the Mac Developer Library. - * - * @remark @wayland There is no existing protocol to change an icon, the - * window will thus inherit the one defined in the application's desktop file. - * This function always emits @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_icon - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowIcon(GLFWwindow* window, int count, const GLFWimage* images); - -/*! @brief Retrieves the position of the content area of the specified window. - * - * This function retrieves the position, in screen coordinates, of the - * upper-left corner of the content area of the specified window. - * - * Any or all of the position arguments may be `NULL`. If an error occurs, all - * non-`NULL` position arguments will be set to zero. - * - * @param[in] window The window to query. - * @param[out] xpos Where to store the x-coordinate of the upper-left corner of - * the content area, or `NULL`. - * @param[out] ypos Where to store the y-coordinate of the upper-left corner of - * the content area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland There is no way for an application to retrieve the global - * position of its windows, this function will always emit @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_pos - * @sa @ref glfwSetWindowPos - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowPos(GLFWwindow* window, int* xpos, int* ypos); - -/*! @brief Sets the position of the content area of the specified window. - * - * This function sets the position, in screen coordinates, of the upper-left - * corner of the content area of the specified windowed mode window. If the - * window is a full screen window, this function does nothing. - * - * __Do not use this function__ to move an already visible window unless you - * have very good reasons for doing so, as it will confuse and annoy the user. - * - * The window manager may put limits on what positions are allowed. GLFW - * cannot and should not override these limits. - * - * @param[in] window The window to query. - * @param[in] xpos The x-coordinate of the upper-left corner of the content area. - * @param[in] ypos The y-coordinate of the upper-left corner of the content area. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland There is no way for an application to set the global - * position of its windows, this function will always emit @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_pos - * @sa @ref glfwGetWindowPos - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowPos(GLFWwindow* window, int xpos, int ypos); - -/*! @brief Retrieves the size of the content area of the specified window. - * - * This function retrieves the size, in screen coordinates, of the content area - * of the specified window. If you wish to retrieve the size of the - * framebuffer of the window in pixels, see @ref glfwGetFramebufferSize. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] window The window whose size to retrieve. - * @param[out] width Where to store the width, in screen coordinates, of the - * content area, or `NULL`. - * @param[out] height Where to store the height, in screen coordinates, of the - * content area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * @sa @ref glfwSetWindowSize - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowSize(GLFWwindow* window, int* width, int* height); - -/*! @brief Sets the size limits of the specified window. - * - * This function sets the size limits of the content area of the specified - * window. If the window is full screen, the size limits only take effect - * once it is made windowed. If the window is not resizable, this function - * does nothing. - * - * The size limits are applied immediately to a windowed mode window and may - * cause it to be resized. - * - * The maximum dimensions must be greater than or equal to the minimum - * dimensions and all must be greater than or equal to zero. - * - * @param[in] window The window to set limits for. - * @param[in] minwidth The minimum width, in screen coordinates, of the content - * area, or `GLFW_DONT_CARE`. - * @param[in] minheight The minimum height, in screen coordinates, of the - * content area, or `GLFW_DONT_CARE`. - * @param[in] maxwidth The maximum width, in screen coordinates, of the content - * area, or `GLFW_DONT_CARE`. - * @param[in] maxheight The maximum height, in screen coordinates, of the - * content area, or `GLFW_DONT_CARE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark If you set size limits and an aspect ratio that conflict, the - * results are undefined. - * - * @remark @wayland The size limits will not be applied until the window is - * actually resized, either by the user or by the compositor. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_sizelimits - * @sa @ref glfwSetWindowAspectRatio - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); - -/*! @brief Sets the aspect ratio of the specified window. - * - * This function sets the required aspect ratio of the content area of the - * specified window. If the window is full screen, the aspect ratio only takes - * effect once it is made windowed. If the window is not resizable, this - * function does nothing. - * - * The aspect ratio is specified as a numerator and a denominator and both - * values must be greater than zero. For example, the common 16:9 aspect ratio - * is specified as 16 and 9, respectively. - * - * If the numerator and denominator is set to `GLFW_DONT_CARE` then the aspect - * ratio limit is disabled. - * - * The aspect ratio is applied immediately to a windowed mode window and may - * cause it to be resized. - * - * @param[in] window The window to set limits for. - * @param[in] numer The numerator of the desired aspect ratio, or - * `GLFW_DONT_CARE`. - * @param[in] denom The denominator of the desired aspect ratio, or - * `GLFW_DONT_CARE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark If you set size limits and an aspect ratio that conflict, the - * results are undefined. - * - * @remark @wayland The aspect ratio will not be applied until the window is - * actually resized, either by the user or by the compositor. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_sizelimits - * @sa @ref glfwSetWindowSizeLimits - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* window, int numer, int denom); - -/*! @brief Sets the size of the content area of the specified window. - * - * This function sets the size, in screen coordinates, of the content area of - * the specified window. - * - * For full screen windows, this function updates the resolution of its desired - * video mode and switches to the video mode closest to it, without affecting - * the window's context. As the context is unaffected, the bit depths of the - * framebuffer remain unchanged. - * - * If you wish to update the refresh rate of the desired video mode in addition - * to its resolution, see @ref glfwSetWindowMonitor. - * - * The window manager may put limits on what sizes are allowed. GLFW cannot - * and should not override these limits. - * - * @param[in] window The window to resize. - * @param[in] width The desired width, in screen coordinates, of the window - * content area. - * @param[in] height The desired height, in screen coordinates, of the window - * content area. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland A full screen window will not attempt to change the mode, - * no matter what the requested size. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * @sa @ref glfwGetWindowSize - * @sa @ref glfwSetWindowMonitor - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowSize(GLFWwindow* window, int width, int height); - -/*! @brief Retrieves the size of the framebuffer of the specified window. - * - * This function retrieves the size, in pixels, of the framebuffer of the - * specified window. If you wish to retrieve the size of the window in screen - * coordinates, see @ref glfwGetWindowSize. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] window The window whose framebuffer to query. - * @param[out] width Where to store the width, in pixels, of the framebuffer, - * or `NULL`. - * @param[out] height Where to store the height, in pixels, of the framebuffer, - * or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_fbsize - * @sa @ref glfwSetFramebufferSizeCallback - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwGetFramebufferSize(GLFWwindow* window, int* width, int* height); - -/*! @brief Retrieves the size of the frame of the window. - * - * This function retrieves the size, in screen coordinates, of each edge of the - * frame of the specified window. This size includes the title bar, if the - * window has one. The size of the frame may vary depending on the - * [window-related hints](@ref window_hints_wnd) used to create it. - * - * Because this function retrieves the size of each window frame edge and not - * the offset along a particular coordinate axis, the retrieved values will - * always be zero or positive. - * - * Any or all of the size arguments may be `NULL`. If an error occurs, all - * non-`NULL` size arguments will be set to zero. - * - * @param[in] window The window whose frame size to query. - * @param[out] left Where to store the size, in screen coordinates, of the left - * edge of the window frame, or `NULL`. - * @param[out] top Where to store the size, in screen coordinates, of the top - * edge of the window frame, or `NULL`. - * @param[out] right Where to store the size, in screen coordinates, of the - * right edge of the window frame, or `NULL`. - * @param[out] bottom Where to store the size, in screen coordinates, of the - * bottom edge of the window frame, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * - * @since Added in version 3.1. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* window, int* left, int* top, int* right, int* bottom); - -/*! @brief Retrieves the content scale for the specified window. - * - * This function retrieves the content scale for the specified window. The - * content scale is the ratio between the current DPI and the platform's - * default DPI. This is especially important for text and any UI elements. If - * the pixel dimensions of your UI scaled by this look appropriate on your - * machine then it should appear at a reasonable size on other machines - * regardless of their DPI and scaling settings. This relies on the system DPI - * and scaling settings being somewhat correct. - * - * On systems where each monitors can have its own content scale, the window - * content scale will depend on which monitor the system considers the window - * to be on. - * - * @param[in] window The window to query. - * @param[out] xscale Where to store the x-axis content scale, or `NULL`. - * @param[out] yscale Where to store the y-axis content scale, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_scale - * @sa @ref glfwSetWindowContentScaleCallback - * @sa @ref glfwGetMonitorContentScale - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwGetWindowContentScale(GLFWwindow* window, float* xscale, float* yscale); - -/*! @brief Returns the opacity of the whole window. - * - * This function returns the opacity of the window, including any decorations. - * - * The opacity (or alpha) value is a positive finite number between zero and - * one, where zero is fully transparent and one is fully opaque. If the system - * does not support whole window transparency, this function always returns one. - * - * The initial opacity value for newly created windows is one. - * - * @param[in] window The window to query. - * @return The opacity value of the specified window. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_transparency - * @sa @ref glfwSetWindowOpacity - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI float glfwGetWindowOpacity(GLFWwindow* window); - -/*! @brief Sets the opacity of the whole window. - * - * This function sets the opacity of the window, including any decorations. - * - * The opacity (or alpha) value is a positive finite number between zero and - * one, where zero is fully transparent and one is fully opaque. - * - * The initial opacity value for newly created windows is one. - * - * A window created with framebuffer transparency may not use whole window - * transparency. The results of doing this are undefined. - * - * @param[in] window The window to set the opacity for. - * @param[in] opacity The desired opacity of the specified window. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_transparency - * @sa @ref glfwGetWindowOpacity - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowOpacity(GLFWwindow* window, float opacity); - -/*! @brief Iconifies the specified window. - * - * This function iconifies (minimizes) the specified window if it was - * previously restored. If the window is already iconified, this function does - * nothing. - * - * If the specified window is a full screen window, the original monitor - * resolution is restored until the window is restored. - * - * @param[in] window The window to iconify. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland There is no concept of iconification in wl_shell, this - * function will emit @ref GLFW_PLATFORM_ERROR when using this deprecated - * protocol. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_iconify - * @sa @ref glfwRestoreWindow - * @sa @ref glfwMaximizeWindow - * - * @since Added in version 2.1. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwIconifyWindow(GLFWwindow* window); - -/*! @brief Restores the specified window. - * - * This function restores the specified window if it was previously iconified - * (minimized) or maximized. If the window is already restored, this function - * does nothing. - * - * If the specified window is a full screen window, the resolution chosen for - * the window is restored on the selected monitor. - * - * @param[in] window The window to restore. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_iconify - * @sa @ref glfwIconifyWindow - * @sa @ref glfwMaximizeWindow - * - * @since Added in version 2.1. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwRestoreWindow(GLFWwindow* window); - -/*! @brief Maximizes the specified window. - * - * This function maximizes the specified window if it was previously not - * maximized. If the window is already maximized, this function does nothing. - * - * If the specified window is a full screen window, this function does nothing. - * - * @param[in] window The window to maximize. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @par Thread Safety - * This function may only be called from the main thread. - * - * @sa @ref window_iconify - * @sa @ref glfwIconifyWindow - * @sa @ref glfwRestoreWindow - * - * @since Added in GLFW 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwMaximizeWindow(GLFWwindow* window); - -/*! @brief Makes the specified window visible. - * - * This function makes the specified window visible if it was previously - * hidden. If the window is already visible or is in full screen mode, this - * function does nothing. - * - * By default, windowed mode windows are focused when shown - * Set the [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) window hint - * to change this behavior for all newly created windows, or change the - * behavior for an existing window with @ref glfwSetWindowAttrib. - * - * @param[in] window The window to make visible. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hide - * @sa @ref glfwHideWindow - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwShowWindow(GLFWwindow* window); - -/*! @brief Hides the specified window. - * - * This function hides the specified window if it was previously visible. If - * the window is already hidden or is in full screen mode, this function does - * nothing. - * - * @param[in] window The window to hide. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_hide - * @sa @ref glfwShowWindow - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwHideWindow(GLFWwindow* window); - -/*! @brief Brings the specified window to front and sets input focus. - * - * This function brings the specified window to front and sets input focus. - * The window should already be visible and not iconified. - * - * By default, both windowed and full screen mode windows are focused when - * initially created. Set the [GLFW_FOCUSED](@ref GLFW_FOCUSED_hint) to - * disable this behavior. - * - * Also by default, windowed mode windows are focused when shown - * with @ref glfwShowWindow. Set the - * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_hint) to disable this behavior. - * - * __Do not use this function__ to steal focus from other applications unless - * you are certain that is what the user wants. Focus stealing can be - * extremely disruptive. - * - * For a less disruptive way of getting the user's attention, see - * [attention requests](@ref window_attention). - * - * @param[in] window The window to give input focus. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland It is not possible for an application to bring its windows - * to front, this function will always emit @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_focus - * @sa @ref window_attention - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwFocusWindow(GLFWwindow* window); - -/*! @brief Requests user attention to the specified window. - * - * This function requests user attention to the specified window. On - * platforms where this is not supported, attention is requested to the - * application as a whole. - * - * Once the user has given attention, usually by focusing the window or - * application, the system will end the request automatically. - * - * @param[in] window The window to request attention to. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @macos Attention is requested to the application as a whole, not the - * specific window. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_attention - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwRequestWindowAttention(GLFWwindow* window); - -/*! @brief Returns the monitor that the window uses for full screen mode. - * - * This function returns the handle of the monitor that the specified window is - * in full screen on. - * - * @param[in] window The window to query. - * @return The monitor, or `NULL` if the window is in windowed mode or an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_monitor - * @sa @ref glfwSetWindowMonitor - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* window); - -/*! @brief Sets the mode, monitor, video mode and placement of a window. - * - * This function sets the monitor that the window uses for full screen mode or, - * if the monitor is `NULL`, makes it windowed mode. - * - * When setting a monitor, this function updates the width, height and refresh - * rate of the desired video mode and switches to the video mode closest to it. - * The window position is ignored when setting a monitor. - * - * When the monitor is `NULL`, the position, width and height are used to - * place the window content area. The refresh rate is ignored when no monitor - * is specified. - * - * If you only wish to update the resolution of a full screen window or the - * size of a windowed mode window, see @ref glfwSetWindowSize. - * - * When a window transitions from full screen to windowed mode, this function - * restores any previous window settings such as whether it is decorated, - * floating, resizable, has size or aspect ratio limits, etc. - * - * @param[in] window The window whose monitor, size or video mode to set. - * @param[in] monitor The desired monitor, or `NULL` to set windowed mode. - * @param[in] xpos The desired x-coordinate of the upper-left corner of the - * content area. - * @param[in] ypos The desired y-coordinate of the upper-left corner of the - * content area. - * @param[in] width The desired with, in screen coordinates, of the content - * area or video mode. - * @param[in] height The desired height, in screen coordinates, of the content - * area or video mode. - * @param[in] refreshRate The desired refresh rate, in Hz, of the video mode, - * or `GLFW_DONT_CARE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark The OpenGL or OpenGL ES context will not be destroyed or otherwise - * affected by any resizing or mode switching, although you may need to update - * your viewport if the framebuffer size has changed. - * - * @remark @wayland The desired window position is ignored, as there is no way - * for an application to set this property. - * - * @remark @wayland Setting the window to full screen will not attempt to - * change the mode, no matter what the requested size or refresh rate. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_monitor - * @sa @ref window_full_screen - * @sa @ref glfwGetWindowMonitor - * @sa @ref glfwSetWindowSize - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowMonitor(GLFWwindow* window, GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); - -/*! @brief Returns an attribute of the specified window. - * - * This function returns the value of an attribute of the specified window or - * its OpenGL or OpenGL ES context. - * - * @param[in] window The window to query. - * @param[in] attrib The [window attribute](@ref window_attribs) whose value to - * return. - * @return The value of the attribute, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @remark Framebuffer related hints are not window attributes. See @ref - * window_attribs_fb for more information. - * - * @remark Zero is a valid value for many window and context related - * attributes so you cannot use a return value of zero as an indication of - * errors. However, this function should not fail as long as it is passed - * valid arguments and the library has been [initialized](@ref intro_init). - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_attribs - * @sa @ref glfwSetWindowAttrib - * - * @since Added in version 3.0. Replaces `glfwGetWindowParam` and - * `glfwGetGLVersion`. - * - * @ingroup window - */ -GLFWAPI int glfwGetWindowAttrib(GLFWwindow* window, int attrib); - -/*! @brief Sets an attribute of the specified window. - * - * This function sets the value of an attribute of the specified window. - * - * The supported attributes are [GLFW_DECORATED](@ref GLFW_DECORATED_attrib), - * [GLFW_RESIZABLE](@ref GLFW_RESIZABLE_attrib), - * [GLFW_FLOATING](@ref GLFW_FLOATING_attrib), - * [GLFW_AUTO_ICONIFY](@ref GLFW_AUTO_ICONIFY_attrib) and - * [GLFW_FOCUS_ON_SHOW](@ref GLFW_FOCUS_ON_SHOW_attrib). - * - * Some of these attributes are ignored for full screen windows. The new - * value will take effect if the window is later made windowed. - * - * Some of these attributes are ignored for windowed mode windows. The new - * value will take effect if the window is later made full screen. - * - * @param[in] window The window to set the attribute for. - * @param[in] attrib A supported window attribute. - * @param[in] value `GLFW_TRUE` or `GLFW_FALSE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM, @ref GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @remark Calling @ref glfwGetWindowAttrib will always return the latest - * value, even if that value is ignored by the current mode of the window. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_attribs - * @sa @ref glfwGetWindowAttrib - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowAttrib(GLFWwindow* window, int attrib, int value); - -/*! @brief Sets the user pointer of the specified window. - * - * This function sets the user-defined pointer of the specified window. The - * current value is retained until the window is destroyed. The initial value - * is `NULL`. - * - * @param[in] window The window whose pointer to set. - * @param[in] pointer The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_userptr - * @sa @ref glfwGetWindowUserPointer - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* window, void* pointer); - -/*! @brief Returns the user pointer of the specified window. - * - * This function returns the current value of the user-defined pointer of the - * specified window. The initial value is `NULL`. - * - * @param[in] window The window whose pointer to return. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref window_userptr - * @sa @ref glfwSetWindowUserPointer - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* window); - -/*! @brief Sets the position callback for the specified window. - * - * This function sets the position callback of the specified window, which is - * called when the window is moved. The callback is provided with the - * position, in screen coordinates, of the upper-left corner of the content - * area of the window. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int xpos, int ypos) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowposfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @wayland This callback will never be called, as there is no way for - * an application to know its global position. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_pos - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* window, GLFWwindowposfun callback); - -/*! @brief Sets the size callback for the specified window. - * - * This function sets the size callback of the specified window, which is - * called when the window is resized. The callback is provided with the size, - * in screen coordinates, of the content area of the window. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int width, int height) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowsizefun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_size - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup window - */ -GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* window, GLFWwindowsizefun callback); - -/*! @brief Sets the close callback for the specified window. - * - * This function sets the close callback of the specified window, which is - * called when the user attempts to close the window, for example by clicking - * the close widget in the title bar. - * - * The close flag is set before this callback is called, but you can modify it - * at any time with @ref glfwSetWindowShouldClose. - * - * The close callback is not triggered by @ref glfwDestroyWindow. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowclosefun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @macos Selecting Quit from the application menu will trigger the - * close callback for all windows. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_close - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup window - */ -GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* window, GLFWwindowclosefun callback); - -/*! @brief Sets the refresh callback for the specified window. - * - * This function sets the refresh callback of the specified window, which is - * called when the content area of the window needs to be redrawn, for example - * if the window has been exposed after having been covered by another window. - * - * On compositing window systems such as Aero, Compiz, Aqua or Wayland, where - * the window contents are saved off-screen, this callback may be called only - * very infrequently or never at all. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window); - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowrefreshfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_refresh - * - * @since Added in version 2.5. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup window - */ -GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* window, GLFWwindowrefreshfun callback); - -/*! @brief Sets the focus callback for the specified window. - * - * This function sets the focus callback of the specified window, which is - * called when the window gains or loses input focus. - * - * After the focus callback is called for a window that lost input focus, - * synthetic key and mouse button release events will be generated for all such - * that had been pressed. For more information, see @ref glfwSetKeyCallback - * and @ref glfwSetMouseButtonCallback. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int focused) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowfocusfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_focus - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* window, GLFWwindowfocusfun callback); - -/*! @brief Sets the iconify callback for the specified window. - * - * This function sets the iconification callback of the specified window, which - * is called when the window is iconified or restored. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int iconified) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowiconifyfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @wayland The wl_shell protocol has no concept of iconification, - * this callback will never be called when using this deprecated protocol. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_iconify - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* window, GLFWwindowiconifyfun callback); - -/*! @brief Sets the maximize callback for the specified window. - * - * This function sets the maximization callback of the specified window, which - * is called when the window is maximized or restored. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int maximized) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowmaximizefun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_maximize - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* window, GLFWwindowmaximizefun callback); - -/*! @brief Sets the framebuffer resize callback for the specified window. - * - * This function sets the framebuffer resize callback of the specified window, - * which is called when the framebuffer of the specified window is resized. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int width, int height) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWframebuffersizefun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_fbsize - * - * @since Added in version 3.0. - * - * @ingroup window - */ -GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun callback); - -/*! @brief Sets the window content scale callback for the specified window. - * - * This function sets the window content scale callback of the specified window, - * which is called when the content scale of the specified window changes. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, float xscale, float yscale) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWwindowcontentscalefun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref window_scale - * @sa @ref glfwGetWindowContentScale - * - * @since Added in version 3.3. - * - * @ingroup window - */ -GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* window, GLFWwindowcontentscalefun callback); - -/*! @brief Processes all pending events. - * - * This function processes only those events that are already in the event - * queue and then returns immediately. Processing events will cause the window - * and input callbacks associated with those events to be called. - * - * On some platforms, a window move, resize or menu operation will cause event - * processing to block. This is due to how event processing is designed on - * those platforms. You can use the - * [window refresh callback](@ref window_refresh) to redraw the contents of - * your window when necessary during such operations. - * - * Do not assume that callbacks you set will _only_ be called in response to - * event processing functions like this one. While it is necessary to poll for - * events, window systems that require GLFW to register callbacks of its own - * can pass events to GLFW in response to many window system function calls. - * GLFW will pass those events on to the application callbacks before - * returning. - * - * Event processing is not required for joystick input to work. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref events - * @sa @ref glfwWaitEvents - * @sa @ref glfwWaitEventsTimeout - * - * @since Added in version 1.0. - * - * @ingroup window - */ -GLFWAPI void glfwPollEvents(void); - -/*! @brief Waits until events are queued and processes them. - * - * This function puts the calling thread to sleep until at least one event is - * available in the event queue. Once one or more events are available, - * it behaves exactly like @ref glfwPollEvents, i.e. the events in the queue - * are processed and the function then returns immediately. Processing events - * will cause the window and input callbacks associated with those events to be - * called. - * - * Since not all events are associated with callbacks, this function may return - * without a callback having been called even if you are monitoring all - * callbacks. - * - * On some platforms, a window move, resize or menu operation will cause event - * processing to block. This is due to how event processing is designed on - * those platforms. You can use the - * [window refresh callback](@ref window_refresh) to redraw the contents of - * your window when necessary during such operations. - * - * Do not assume that callbacks you set will _only_ be called in response to - * event processing functions like this one. While it is necessary to poll for - * events, window systems that require GLFW to register callbacks of its own - * can pass events to GLFW in response to many window system function calls. - * GLFW will pass those events on to the application callbacks before - * returning. - * - * Event processing is not required for joystick input to work. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref events - * @sa @ref glfwPollEvents - * @sa @ref glfwWaitEventsTimeout - * - * @since Added in version 2.5. - * - * @ingroup window - */ -GLFWAPI void glfwWaitEvents(void); - -/*! @brief Waits with timeout until events are queued and processes them. - * - * This function puts the calling thread to sleep until at least one event is - * available in the event queue, or until the specified timeout is reached. If - * one or more events are available, it behaves exactly like @ref - * glfwPollEvents, i.e. the events in the queue are processed and the function - * then returns immediately. Processing events will cause the window and input - * callbacks associated with those events to be called. - * - * The timeout value must be a positive finite number. - * - * Since not all events are associated with callbacks, this function may return - * without a callback having been called even if you are monitoring all - * callbacks. - * - * On some platforms, a window move, resize or menu operation will cause event - * processing to block. This is due to how event processing is designed on - * those platforms. You can use the - * [window refresh callback](@ref window_refresh) to redraw the contents of - * your window when necessary during such operations. - * - * Do not assume that callbacks you set will _only_ be called in response to - * event processing functions like this one. While it is necessary to poll for - * events, window systems that require GLFW to register callbacks of its own - * can pass events to GLFW in response to many window system function calls. - * GLFW will pass those events on to the application callbacks before - * returning. - * - * Event processing is not required for joystick input to work. - * - * @param[in] timeout The maximum amount of time, in seconds, to wait. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_VALUE and @ref GLFW_PLATFORM_ERROR. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref events - * @sa @ref glfwPollEvents - * @sa @ref glfwWaitEvents - * - * @since Added in version 3.2. - * - * @ingroup window - */ -GLFWAPI void glfwWaitEventsTimeout(double timeout); - -/*! @brief Posts an empty event to the event queue. - * - * This function posts an empty event from the current thread to the event - * queue, causing @ref glfwWaitEvents or @ref glfwWaitEventsTimeout to return. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref events - * @sa @ref glfwWaitEvents - * @sa @ref glfwWaitEventsTimeout - * - * @since Added in version 3.1. - * - * @ingroup window - */ -GLFWAPI void glfwPostEmptyEvent(void); - -/*! @brief Returns the value of an input option for the specified window. - * - * This function returns the value of an input option for the specified window. - * The mode must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS, - * @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or - * @ref GLFW_RAW_MOUSE_MOTION. - * - * @param[in] window The window to query. - * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`, - * `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or - * `GLFW_RAW_MOUSE_MOTION`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref glfwSetInputMode - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI int glfwGetInputMode(GLFWwindow* window, int mode); - -/*! @brief Sets an input option for the specified window. - * - * This function sets an input mode option for the specified window. The mode - * must be one of @ref GLFW_CURSOR, @ref GLFW_STICKY_KEYS, - * @ref GLFW_STICKY_MOUSE_BUTTONS, @ref GLFW_LOCK_KEY_MODS or - * @ref GLFW_RAW_MOUSE_MOTION. - * - * If the mode is `GLFW_CURSOR`, the value must be one of the following cursor - * modes: - * - `GLFW_CURSOR_NORMAL` makes the cursor visible and behaving normally. - * - `GLFW_CURSOR_HIDDEN` makes the cursor invisible when it is over the - * content area of the window but does not restrict the cursor from leaving. - * - `GLFW_CURSOR_DISABLED` hides and grabs the cursor, providing virtual - * and unlimited cursor movement. This is useful for implementing for - * example 3D camera controls. - * - * If the mode is `GLFW_STICKY_KEYS`, the value must be either `GLFW_TRUE` to - * enable sticky keys, or `GLFW_FALSE` to disable it. If sticky keys are - * enabled, a key press will ensure that @ref glfwGetKey returns `GLFW_PRESS` - * the next time it is called even if the key had been released before the - * call. This is useful when you are only interested in whether keys have been - * pressed but not when or in which order. - * - * If the mode is `GLFW_STICKY_MOUSE_BUTTONS`, the value must be either - * `GLFW_TRUE` to enable sticky mouse buttons, or `GLFW_FALSE` to disable it. - * If sticky mouse buttons are enabled, a mouse button press will ensure that - * @ref glfwGetMouseButton returns `GLFW_PRESS` the next time it is called even - * if the mouse button had been released before the call. This is useful when - * you are only interested in whether mouse buttons have been pressed but not - * when or in which order. - * - * If the mode is `GLFW_LOCK_KEY_MODS`, the value must be either `GLFW_TRUE` to - * enable lock key modifier bits, or `GLFW_FALSE` to disable them. If enabled, - * callbacks that receive modifier bits will also have the @ref - * GLFW_MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on, - * and the @ref GLFW_MOD_NUM_LOCK bit when Num Lock was on. - * - * If the mode is `GLFW_RAW_MOUSE_MOTION`, the value must be either `GLFW_TRUE` - * to enable raw (unscaled and unaccelerated) mouse motion when the cursor is - * disabled, or `GLFW_FALSE` to disable it. If raw motion is not supported, - * attempting to set this will emit @ref GLFW_PLATFORM_ERROR. Call @ref - * glfwRawMouseMotionSupported to check for support. - * - * @param[in] window The window whose input mode to set. - * @param[in] mode One of `GLFW_CURSOR`, `GLFW_STICKY_KEYS`, - * `GLFW_STICKY_MOUSE_BUTTONS`, `GLFW_LOCK_KEY_MODS` or - * `GLFW_RAW_MOUSE_MOTION`. - * @param[in] value The new value of the specified input mode. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref glfwGetInputMode - * - * @since Added in version 3.0. Replaces `glfwEnable` and `glfwDisable`. - * - * @ingroup input - */ -GLFWAPI void glfwSetInputMode(GLFWwindow* window, int mode, int value); - -/** - * For FCL, set injector callback. - */ -GLFWAPI FCLinjectorfun glfwSetInjectorCallback(FCLinjectorfun callback); - -/** - * For FCL, set type of what player's cursor point to - * @param type Hit result type - */ -GLFWAPI void glfwSetHitResultType(int type); - -/*! @brief Returns whether raw mouse motion is supported. - * - * This function returns whether raw mouse motion is supported on the current - * system. This status does not change after GLFW has been initialized so you - * only need to check this once. If you attempt to enable raw motion on - * a system that does not support it, @ref GLFW_PLATFORM_ERROR will be emitted. - * - * Raw mouse motion is closer to the actual motion of the mouse across - * a surface. It is not affected by the scaling and acceleration applied to - * the motion of the desktop cursor. That processing is suitable for a cursor - * while raw motion is better for controlling for example a 3D camera. Because - * of this, raw mouse motion is only provided when the cursor is disabled. - * - * @return `GLFW_TRUE` if raw mouse motion is supported on the current machine, - * or `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref raw_mouse_motion - * @sa @ref glfwSetInputMode - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwRawMouseMotionSupported(void); - -/*! @brief Returns the layout-specific name of the specified printable key. - * - * This function returns the name of the specified printable key, encoded as - * UTF-8. This is typically the character that key would produce without any - * modifier keys, intended for displaying key bindings to the user. For dead - * keys, it is typically the diacritic it would add to a character. - * - * __Do not use this function__ for [text input](@ref input_char). You will - * break text input for many languages even if it happens to work for yours. - * - * If the key is `GLFW_KEY_UNKNOWN`, the scancode is used to identify the key, - * otherwise the scancode is ignored. If you specify a non-printable key, or - * `GLFW_KEY_UNKNOWN` and a scancode that maps to a non-printable key, this - * function returns `NULL` but does not emit an error. - * - * This behavior allows you to always pass in the arguments in the - * [key callback](@ref input_key) without modification. - * - * The printable keys are: - * - `GLFW_KEY_APOSTROPHE` - * - `GLFW_KEY_COMMA` - * - `GLFW_KEY_MINUS` - * - `GLFW_KEY_PERIOD` - * - `GLFW_KEY_SLASH` - * - `GLFW_KEY_SEMICOLON` - * - `GLFW_KEY_EQUAL` - * - `GLFW_KEY_LEFT_BRACKET` - * - `GLFW_KEY_RIGHT_BRACKET` - * - `GLFW_KEY_BACKSLASH` - * - `GLFW_KEY_WORLD_1` - * - `GLFW_KEY_WORLD_2` - * - `GLFW_KEY_0` to `GLFW_KEY_9` - * - `GLFW_KEY_A` to `GLFW_KEY_Z` - * - `GLFW_KEY_KP_0` to `GLFW_KEY_KP_9` - * - `GLFW_KEY_KP_DECIMAL` - * - `GLFW_KEY_KP_DIVIDE` - * - `GLFW_KEY_KP_MULTIPLY` - * - `GLFW_KEY_KP_SUBTRACT` - * - `GLFW_KEY_KP_ADD` - * - `GLFW_KEY_KP_EQUAL` - * - * Names for printable keys depend on keyboard layout, while names for - * non-printable keys are the same across layouts but depend on the application - * language and should be localized along with other user interface text. - * - * @param[in] key The key to query, or `GLFW_KEY_UNKNOWN`. - * @param[in] scancode The scancode of the key to query. - * @return The UTF-8 encoded, layout-specific name of the key, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark The contents of the returned string may change when a keyboard - * layout change event is received. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_key_name - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetKeyName(int key, int scancode); - -/*! @brief Returns the platform-specific scancode of the specified key. - * - * This function returns the platform-specific scancode of the specified key. - * - * If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this - * method will return `-1`. - * - * @param[in] key Any [named key](@ref keys). - * @return The platform-specific scancode for the key, or `-1` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref input_key - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwGetKeyScancode(int key); - -/*! @brief Returns the last reported state of a keyboard key for the specified - * window. - * - * This function returns the last state reported for the specified key to the - * specified window. The returned state is one of `GLFW_PRESS` or - * `GLFW_RELEASE`. The higher-level action `GLFW_REPEAT` is only reported to - * the key callback. - * - * If the @ref GLFW_STICKY_KEYS input mode is enabled, this function returns - * `GLFW_PRESS` the first time you call it for a key that was pressed, even if - * that key has already been released. - * - * The key functions deal with physical keys, with [key tokens](@ref keys) - * named after their use on the standard US keyboard layout. If you want to - * input text, use the Unicode character callback instead. - * - * The [modifier key bit masks](@ref mods) are not key tokens and cannot be - * used with this function. - * - * __Do not use this function__ to implement [text input](@ref input_char). - * - * @param[in] window The desired window. - * @param[in] key The desired [keyboard key](@ref keys). `GLFW_KEY_UNKNOWN` is - * not a valid key for this function. - * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_key - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup input - */ -GLFWAPI int glfwGetKey(GLFWwindow* window, int key); - -/*! @brief Returns the last reported state of a mouse button for the specified - * window. - * - * This function returns the last state reported for the specified mouse button - * to the specified window. The returned state is one of `GLFW_PRESS` or - * `GLFW_RELEASE`. - * - * If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function - * returns `GLFW_PRESS` the first time you call it for a mouse button that was - * pressed, even if that mouse button has already been released. - * - * @param[in] window The desired window. - * @param[in] button The desired [mouse button](@ref buttons). - * @return One of `GLFW_PRESS` or `GLFW_RELEASE`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_mouse_button - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup input - */ -GLFWAPI int glfwGetMouseButton(GLFWwindow* window, int button); - -/*! @brief Retrieves the position of the cursor relative to the content area of - * the window. - * - * This function returns the position of the cursor, in screen coordinates, - * relative to the upper-left corner of the content area of the specified - * window. - * - * If the cursor is disabled (with `GLFW_CURSOR_DISABLED`) then the cursor - * position is unbounded and limited only by the minimum and maximum values of - * a `double`. - * - * The coordinate can be converted to their integer equivalents with the - * `floor` function. Casting directly to an integer type works for positive - * coordinates, but fails for negative ones. - * - * Any or all of the position arguments may be `NULL`. If an error occurs, all - * non-`NULL` position arguments will be set to zero. - * - * @param[in] window The desired window. - * @param[out] xpos Where to store the cursor x-coordinate, relative to the - * left edge of the content area, or `NULL`. - * @param[out] ypos Where to store the cursor y-coordinate, relative to the to - * top edge of the content area, or `NULL`. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_pos - * @sa @ref glfwSetCursorPos - * - * @since Added in version 3.0. Replaces `glfwGetMousePos`. - * - * @ingroup input - */ -GLFWAPI void glfwGetCursorPos(GLFWwindow* window, double* xpos, double* ypos); - -/*! @brief Sets the position of the cursor, relative to the content area of the - * window. - * - * This function sets the position, in screen coordinates, of the cursor - * relative to the upper-left corner of the content area of the specified - * window. The window must have input focus. If the window does not have - * input focus when this function is called, it fails silently. - * - * __Do not use this function__ to implement things like camera controls. GLFW - * already provides the `GLFW_CURSOR_DISABLED` cursor mode that hides the - * cursor, transparently re-centers it and provides unconstrained cursor - * motion. See @ref glfwSetInputMode for more information. - * - * If the cursor mode is `GLFW_CURSOR_DISABLED` then the cursor position is - * unconstrained and limited only by the minimum and maximum values of - * a `double`. - * - * @param[in] window The desired window. - * @param[in] xpos The desired x-coordinate, relative to the left edge of the - * content area. - * @param[in] ypos The desired y-coordinate, relative to the top edge of the - * content area. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @remark @wayland This function will only work when the cursor mode is - * `GLFW_CURSOR_DISABLED`, otherwise it will do nothing. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_pos - * @sa @ref glfwGetCursorPos - * - * @since Added in version 3.0. Replaces `glfwSetMousePos`. - * - * @ingroup input - */ -GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos); - -/*! @brief Creates a custom cursor. - * - * Creates a new custom cursor image that can be set for a window with @ref - * glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor. - * Any remaining cursors are destroyed by @ref glfwTerminate. - * - * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight - * bits per channel with the red channel first. They are arranged canonically - * as packed sequential rows, starting from the top-left corner. - * - * The cursor hotspot is specified in pixels, relative to the upper-left corner - * of the cursor image. Like all other coordinate systems in GLFW, the X-axis - * points to the right and the Y-axis points down. - * - * @param[in] image The desired cursor image. - * @param[in] xhot The desired x-coordinate, in pixels, of the cursor hotspot. - * @param[in] yhot The desired y-coordinate, in pixels, of the cursor hotspot. - * @return The handle of the created cursor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified image data is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * @sa @ref glfwDestroyCursor - * @sa @ref glfwCreateStandardCursor - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot); - -/*! @brief Creates a cursor with a standard shape. - * - * Returns a cursor with a [standard shape](@ref shapes), that can be set for - * a window with @ref glfwSetCursor. - * - * @param[in] shape One of the [standard shapes](@ref shapes). - * @return A new cursor ready to use or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * @sa @ref glfwCreateCursor - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape); - -/*! @brief Destroys a cursor. - * - * This function destroys a cursor previously created with @ref - * glfwCreateCursor. Any remaining cursors will be destroyed by @ref - * glfwTerminate. - * - * If the specified cursor is current for any window, that window will be - * reverted to the default cursor. This does not affect the cursor mode. - * - * @param[in] cursor The cursor object to destroy. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @reentrancy This function must not be called from a callback. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * @sa @ref glfwCreateCursor - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI void glfwDestroyCursor(GLFWcursor* cursor); - -/*! @brief Sets the cursor for the window. - * - * This function sets the cursor image to be used when the cursor is over the - * content area of the specified window. The set cursor will only be visible - * when the [cursor mode](@ref cursor_mode) of the window is - * `GLFW_CURSOR_NORMAL`. - * - * On some platforms, the set cursor may not be visible unless the window also - * has input focus. - * - * @param[in] window The window to set the cursor for. - * @param[in] cursor The cursor to set, or `NULL` to switch back to the default - * arrow cursor. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_object - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor); - -/*! @brief Sets the key callback. - * - * This function sets the key callback of the specified window, which is called - * when a key is pressed, repeated or released. - * - * The key functions deal with physical keys, with layout independent - * [key tokens](@ref keys) named after their values in the standard US keyboard - * layout. If you want to input text, use the - * [character callback](@ref glfwSetCharCallback) instead. - * - * When a window loses input focus, it will generate synthetic key release - * events for all pressed keys. You can tell these events from user-generated - * events by the fact that the synthetic ones are generated after the focus - * loss event has been processed, i.e. after the - * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. - * - * The scancode of a key is specific to that platform or sometimes even to that - * machine. Scancodes are intended to allow users to bind keys that don't have - * a GLFW key token. Such keys have `key` set to `GLFW_KEY_UNKNOWN`, their - * state is not saved and so it cannot be queried with @ref glfwGetKey. - * - * Sometimes GLFW needs to generate synthetic key events, in which case the - * scancode may be zero. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new key callback, or `NULL` to remove the currently - * set callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int key, int scancode, int action, int mods) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWkeyfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_key - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup input - */ -GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* window, GLFWkeyfun callback); - -/*! @brief Sets the Unicode character callback. - * - * This function sets the character callback of the specified window, which is - * called when a Unicode character is input. - * - * The character callback is intended for Unicode text input. As it deals with - * characters, it is keyboard layout dependent, whereas the - * [key callback](@ref glfwSetKeyCallback) is not. Characters do not map 1:1 - * to physical keys, as a key may produce zero, one or more characters. If you - * want to know whether a specific physical key was pressed or released, see - * the key callback instead. - * - * The character callback behaves as system text input normally does and will - * not be called if modifier keys are held down that would prevent normal text - * input on that platform, for example a Super (Command) key on macOS or Alt key - * on Windows. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, unsigned int codepoint) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWcharfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_char - * - * @since Added in version 2.4. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup input - */ -GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* window, GLFWcharfun callback); - -/*! @brief Sets the Unicode character with modifiers callback. - * - * This function sets the character with modifiers callback of the specified - * window, which is called when a Unicode character is input regardless of what - * modifier keys are used. - * - * The character with modifiers callback is intended for implementing custom - * Unicode character input. For regular Unicode text input, see the - * [character callback](@ref glfwSetCharCallback). Like the character - * callback, the character with modifiers callback deals with characters and is - * keyboard layout dependent. Characters do not map 1:1 to physical keys, as - * a key may produce zero, one or more characters. If you want to know whether - * a specific physical key was pressed or released, see the - * [key callback](@ref glfwSetKeyCallback) instead. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or an - * [error](@ref error_handling) occurred. - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, unsigned int codepoint, int mods) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWcharmodsfun). - * - * @deprecated Scheduled for removal in version 4.0. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_char - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun callback); - -/*! @brief Sets the mouse button callback. - * - * This function sets the mouse button callback of the specified window, which - * is called when a mouse button is pressed or released. - * - * When a window loses input focus, it will generate synthetic mouse button - * release events for all pressed mouse buttons. You can tell these events - * from user-generated events by the fact that the synthetic ones are generated - * after the focus loss event has been processed, i.e. after the - * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int button, int action, int mods) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWmousebuttonfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref input_mouse_button - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter and return value. - * - * @ingroup input - */ -GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* window, GLFWmousebuttonfun callback); - -/*! @brief Sets the cursor position callback. - * - * This function sets the cursor position callback of the specified window, - * which is called when the cursor is moved. The callback is provided with the - * position, in screen coordinates, relative to the upper-left corner of the - * content area of the window. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, double xpos, double ypos); - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWcursorposfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_pos - * - * @since Added in version 3.0. Replaces `glfwSetMousePosCallback`. - * - * @ingroup input - */ -GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* window, GLFWcursorposfun callback); - -/*! @brief Sets the cursor enter/leave callback. - * - * This function sets the cursor boundary crossing callback of the specified - * window, which is called when the cursor enters or leaves the content area of - * the window. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int entered) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWcursorenterfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref cursor_enter - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* window, GLFWcursorenterfun callback); - -/*! @brief Sets the scroll callback. - * - * This function sets the scroll callback of the specified window, which is - * called when a scrolling device is used, such as a mouse wheel or scrolling - * area of a touchpad. - * - * The scroll callback receives all scrolling input, like that from a mouse - * wheel or a touchpad scrolling area. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new scroll callback, or `NULL` to remove the - * currently set callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, double xoffset, double yoffset) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWscrollfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref scrolling - * - * @since Added in version 3.0. Replaces `glfwSetMouseWheelCallback`. - * - * @ingroup input - */ -GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* window, GLFWscrollfun callback); - -/*! @brief Sets the path drop callback. - * - * This function sets the path drop callback of the specified window, which is - * called when one or more dragged paths are dropped on the window. - * - * Because the path array and its strings may have been generated specifically - * for that event, they are not guaranteed to be valid after the callback has - * returned. If you wish to use them after the callback returns, you need to - * make a deep copy. - * - * @param[in] window The window whose callback to set. - * @param[in] callback The new file drop callback, or `NULL` to remove the - * currently set callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(GLFWwindow* window, int path_count, const char* paths[]) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWdropfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @remark @wayland File drop is currently unimplemented. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref path_drop - * - * @since Added in version 3.1. - * - * @ingroup input - */ -GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* window, GLFWdropfun callback); - -/*! @brief Returns whether the specified joystick is present. - * - * This function returns whether the specified joystick is present. - * - * There is no need to call this function before other functions that accept - * a joystick ID, as they all check for presence before performing any other - * work. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return `GLFW_TRUE` if the joystick is present, or `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick - * - * @since Added in version 3.0. Replaces `glfwGetJoystickParam`. - * - * @ingroup input - */ -GLFWAPI int glfwJoystickPresent(int jid); - -/*! @brief Returns the values of all axes of the specified joystick. - * - * This function returns the values of all axes of the specified joystick. - * Each element in the array is a value between -1.0 and 1.0. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] count Where to store the number of axis values in the returned - * array. This is set to zero if the joystick is not present or an error - * occurred. - * @return An array of axis values, or `NULL` if the joystick is not present or - * an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_axis - * - * @since Added in version 3.0. Replaces `glfwGetJoystickPos`. - * - * @ingroup input - */ -GLFWAPI const float* glfwGetJoystickAxes(int jid, int* count); - -/*! @brief Returns the state of all buttons of the specified joystick. - * - * This function returns the state of all buttons of the specified joystick. - * Each element in the array is either `GLFW_PRESS` or `GLFW_RELEASE`. - * - * For backward compatibility with earlier versions that did not have @ref - * glfwGetJoystickHats, the button array also includes all hats, each - * represented as four buttons. The hats are in the same order as returned by - * __glfwGetJoystickHats__ and are in the order _up_, _right_, _down_ and - * _left_. To disable these extra buttons, set the @ref - * GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] count Where to store the number of button states in the returned - * array. This is set to zero if the joystick is not present or an error - * occurred. - * @return An array of button states, or `NULL` if the joystick is not present - * or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_button - * - * @since Added in version 2.2. - * @glfw3 Changed to return a dynamic array. - * - * @ingroup input - */ -GLFWAPI const unsigned char* glfwGetJoystickButtons(int jid, int* count); - -/*! @brief Returns the state of all hats of the specified joystick. - * - * This function returns the state of all hats of the specified joystick. - * Each element in the array is one of the following values: - * - * Name | Value - * ---- | ----- - * `GLFW_HAT_CENTERED` | 0 - * `GLFW_HAT_UP` | 1 - * `GLFW_HAT_RIGHT` | 2 - * `GLFW_HAT_DOWN` | 4 - * `GLFW_HAT_LEFT` | 8 - * `GLFW_HAT_RIGHT_UP` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_UP` - * `GLFW_HAT_RIGHT_DOWN` | `GLFW_HAT_RIGHT` \| `GLFW_HAT_DOWN` - * `GLFW_HAT_LEFT_UP` | `GLFW_HAT_LEFT` \| `GLFW_HAT_UP` - * `GLFW_HAT_LEFT_DOWN` | `GLFW_HAT_LEFT` \| `GLFW_HAT_DOWN` - * - * The diagonal directions are bitwise combinations of the primary (up, right, - * down and left) directions and you can test for these individually by ANDing - * it with the corresponding direction. - * - * @code - * if (hats[2] & GLFW_HAT_RIGHT) - * { - * // State of hat 2 could be right-up, right or right-down - * } - * @endcode - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] count Where to store the number of hat states in the returned - * array. This is set to zero if the joystick is not present or an error - * occurred. - * @return An array of hat states, or `NULL` if the joystick is not present - * or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected, this function is called again for that joystick or the library - * is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_hat - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count); - -/*! @brief Returns the name of the specified joystick. - * - * This function returns the name, encoded as UTF-8, of the specified joystick. - * The returned string is allocated and freed by GLFW. You should not free it - * yourself. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return The UTF-8 encoded name of the joystick, or `NULL` if the joystick - * is not present or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_name - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetJoystickName(int jid); - -/*! @brief Returns the SDL compatible GUID of the specified joystick. - * - * This function returns the SDL compatible GUID, as a UTF-8 encoded - * hexadecimal string, of the specified joystick. The returned string is - * allocated and freed by GLFW. You should not free it yourself. - * - * The GUID is what connects a joystick to a gamepad mapping. A connected - * joystick will always have a GUID even if there is no gamepad mapping - * assigned to it. - * - * If the specified joystick is not present this function will return `NULL` - * but will not generate an error. This can be used instead of first calling - * @ref glfwJoystickPresent. - * - * The GUID uses the format introduced in SDL 2.0.5. This GUID tries to - * uniquely identify the make and model of a joystick but does not identify - * a specific unit, e.g. all wired Xbox 360 controllers will have the same - * GUID on that platform. The GUID for a unit may vary between platforms - * depending on what hardware information the platform specific APIs provide. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return The UTF-8 encoded GUID of the joystick, or `NULL` if the joystick - * is not present or an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetJoystickGUID(int jid); - -/*! @brief Sets the user pointer of the specified joystick. - * - * This function sets the user-defined pointer of the specified joystick. The - * current value is retained until the joystick is disconnected. The initial - * value is `NULL`. - * - * This function may be called from the joystick callback, even for a joystick - * that is being disconnected. - * - * @param[in] jid The joystick whose pointer to set. - * @param[in] pointer The new value. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref joystick_userptr - * @sa @ref glfwGetJoystickUserPointer - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer); - -/*! @brief Returns the user pointer of the specified joystick. - * - * This function returns the current value of the user-defined pointer of the - * specified joystick. The initial value is `NULL`. - * - * This function may be called from the joystick callback, even for a joystick - * that is being disconnected. - * - * @param[in] jid The joystick whose pointer to return. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @sa @ref joystick_userptr - * @sa @ref glfwSetJoystickUserPointer - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI void* glfwGetJoystickUserPointer(int jid); - -/*! @brief Returns whether the specified joystick has a gamepad mapping. - * - * This function returns whether the specified joystick is both present and has - * a gamepad mapping. - * - * If the specified joystick is present but does not have a gamepad mapping - * this function will return `GLFW_FALSE` but will not generate an error. Call - * @ref glfwJoystickPresent to check if a joystick is present regardless of - * whether it has a mapping. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return `GLFW_TRUE` if a joystick is both present and has a gamepad mapping, - * or `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwGetGamepadState - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwJoystickIsGamepad(int jid); - -/*! @brief Sets the joystick configuration callback. - * - * This function sets the joystick configuration callback, or removes the - * currently set callback. This is called when a joystick is connected to or - * disconnected from the system. - * - * For joystick connection and disconnection events to be delivered on all - * platforms, you need to call one of the [event processing](@ref events) - * functions. Joystick disconnection may also be detected and the callback - * called by joystick functions. The function will then return whatever it - * returns if the joystick is not present. - * - * @param[in] callback The new callback, or `NULL` to remove the currently set - * callback. - * @return The previously set callback, or `NULL` if no callback was set or the - * library had not been [initialized](@ref intro_init). - * - * @callback_signature - * @code - * void function_name(int jid, int event) - * @endcode - * For more information about the callback parameters, see the - * [function pointer type](@ref GLFWjoystickfun). - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref joystick_event - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback); - -/*! @brief Adds the specified SDL_GameControllerDB gamepad mappings. - * - * This function parses the specified ASCII encoded string and updates the - * internal list with any gamepad mappings it finds. This string may - * contain either a single gamepad mapping or many mappings separated by - * newlines. The parser supports the full format of the `gamecontrollerdb.txt` - * source file including empty lines and comments. - * - * See @ref gamepad_mapping for a description of the format. - * - * If there is already a gamepad mapping for a given GUID in the internal list, - * it will be replaced by the one passed to this function. If the library is - * terminated and re-initialized the internal list will revert to the built-in - * default. - * - * @param[in] string The string containing the gamepad mappings. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_VALUE. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwJoystickIsGamepad - * @sa @ref glfwGetGamepadName - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwUpdateGamepadMappings(const char* string); - -/*! @brief Returns the human-readable gamepad name for the specified joystick. - * - * This function returns the human-readable name of the gamepad from the - * gamepad mapping assigned to the specified joystick. - * - * If the specified joystick is not present or does not have a gamepad mapping - * this function will return `NULL` but will not generate an error. Call - * @ref glfwJoystickPresent to check whether it is present regardless of - * whether it has a mapping. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @return The UTF-8 encoded name of the gamepad, or `NULL` if the - * joystick is not present, does not have a mapping or an - * [error](@ref error_handling) occurred. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the specified joystick is - * disconnected, the gamepad mappings are updated or the library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwJoystickIsGamepad - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetGamepadName(int jid); - -/*! @brief Retrieves the state of the specified joystick remapped as a gamepad. - * - * This function retrieves the state of the specified joystick remapped to - * an Xbox-like gamepad. - * - * If the specified joystick is not present or does not have a gamepad mapping - * this function will return `GLFW_FALSE` but will not generate an error. Call - * @ref glfwJoystickPresent to check whether it is present regardless of - * whether it has a mapping. - * - * The Guide button may not be available for input as it is often hooked by the - * system or the Steam client. - * - * Not all devices have all the buttons or axes provided by @ref - * GLFWgamepadstate. Unavailable buttons and axes will always report - * `GLFW_RELEASE` and 0.0 respectively. - * - * @param[in] jid The [joystick](@ref joysticks) to query. - * @param[out] state The gamepad input state of the joystick. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if no joystick is - * connected, it has no gamepad mapping or an [error](@ref error_handling) - * occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_ENUM. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref gamepad - * @sa @ref glfwUpdateGamepadMappings - * @sa @ref glfwJoystickIsGamepad - * - * @since Added in version 3.3. - * - * @ingroup input - */ -GLFWAPI int glfwGetGamepadState(int jid, GLFWgamepadstate* state); - -/*! @brief Sets the clipboard to the specified string. - * - * This function sets the system clipboard to the specified, UTF-8 encoded - * string. - * - * @param[in] window Deprecated. Any valid window or `NULL`. - * @param[in] string A UTF-8 encoded string. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified string is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa @ref glfwGetClipboardString - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI void glfwSetClipboardString(GLFWwindow* window, const char* string); - -/*! @brief Returns the contents of the clipboard as a string. - * - * This function returns the contents of the system clipboard, if it contains - * or is convertible to a UTF-8 encoded string. If the clipboard is empty or - * if its contents cannot be converted, `NULL` is returned and a @ref - * GLFW_FORMAT_UNAVAILABLE error is generated. - * - * @param[in] window Deprecated. Any valid window or `NULL`. - * @return The contents of the clipboard as a UTF-8 encoded string, or `NULL` - * if an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the next call to @ref - * glfwGetClipboardString or @ref glfwSetClipboardString, or until the library - * is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa @ref glfwSetClipboardString - * - * @since Added in version 3.0. - * - * @ingroup input - */ -GLFWAPI const char* glfwGetClipboardString(GLFWwindow* window); - -/*! @brief Returns the GLFW time. - * - * This function returns the current GLFW time, in seconds. Unless the time - * has been set using @ref glfwSetTime it measures time elapsed since GLFW was - * initialized. - * - * This function and @ref glfwSetTime are helper functions on top of @ref - * glfwGetTimerFrequency and @ref glfwGetTimerValue. - * - * The resolution of the timer is system dependent, but is usually on the order - * of a few micro- or nanoseconds. It uses the highest-resolution monotonic - * time source on each supported platform. - * - * @return The current time, in seconds, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. Reading and - * writing of the internal base time is not atomic, so it needs to be - * externally synchronized with calls to @ref glfwSetTime. - * - * @sa @ref time - * - * @since Added in version 1.0. - * - * @ingroup input - */ -GLFWAPI double glfwGetTime(void); - -/*! @brief Sets the GLFW time. - * - * This function sets the current GLFW time, in seconds. The value must be - * a positive finite number less than or equal to 18446744073.0, which is - * approximately 584.5 years. - * - * This function and @ref glfwGetTime are helper functions on top of @ref - * glfwGetTimerFrequency and @ref glfwGetTimerValue. - * - * @param[in] time The new value, in seconds. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_INVALID_VALUE. - * - * @remark The upper limit of GLFW time is calculated as - * floor((264 - 1) / 109) and is due to implementations - * storing nanoseconds in 64 bits. The limit may be increased in the future. - * - * @thread_safety This function may be called from any thread. Reading and - * writing of the internal base time is not atomic, so it needs to be - * externally synchronized with calls to @ref glfwGetTime. - * - * @sa @ref time - * - * @since Added in version 2.2. - * - * @ingroup input - */ -GLFWAPI void glfwSetTime(double time); - -/*! @brief Returns the current value of the raw timer. - * - * This function returns the current value of the raw timer, measured in - * 1 / frequency seconds. To get the frequency, call @ref - * glfwGetTimerFrequency. - * - * @return The value of the timer, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref time - * @sa @ref glfwGetTimerFrequency - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI uint64_t glfwGetTimerValue(void); - -/*! @brief Returns the frequency, in Hz, of the raw timer. - * - * This function returns the frequency, in Hz, of the raw timer. - * - * @return The frequency of the timer, in Hz, or zero if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref time - * @sa @ref glfwGetTimerValue - * - * @since Added in version 3.2. - * - * @ingroup input - */ -GLFWAPI uint64_t glfwGetTimerFrequency(void); - -/*! - * This function is to get OSMesa width - */ -GLFWAPI int glfwGetOSMesaWidth(); - -/*! - * This function is to get OSMesa height - */ -GLFWAPI int glfwGetOSMesaHeight(); - -/*! - * This function is to get OSMesa Current Context - */ -GLFWAPI void* glfwGetOSMesaCurrentContext(); - -/*! - * This function is to get Graphic Buffers Addr - */ -GLFWAPI long glfwGetGraphicBuffersAddr(GLFWwindow* window); - -/*! @brief Makes the context of the specified window current for the calling - * thread. - * - * This function makes the OpenGL or OpenGL ES context of the specified window - * current on the calling thread. A context must only be made current on - * a single thread at a time and each thread can have only a single current - * context at a time. - * - * When moving a context between threads, you must make it non-current on the - * old thread before making it current on the new one. - * - * By default, making a context non-current implicitly forces a pipeline flush. - * On machines that support `GL_KHR_context_flush_control`, you can control - * whether a context performs this flush by setting the - * [GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref GLFW_CONTEXT_RELEASE_BEHAVIOR_hint) - * hint. - * - * The specified window must have an OpenGL or OpenGL ES context. Specifying - * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT - * error. - * - * @param[in] window The window whose context to make current, or `NULL` to - * detach the current context. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_current - * @sa @ref glfwGetCurrentContext - * - * @since Added in version 3.0. - * - * @ingroup context - */ -GLFWAPI void glfwMakeContextCurrent(GLFWwindow* window); - -/*! @brief Returns the window whose context is current on the calling thread. - * - * This function returns the window whose OpenGL or OpenGL ES context is - * current on the calling thread. - * - * @return The window whose context is current, or `NULL` if no window's - * context is current. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_current - * @sa @ref glfwMakeContextCurrent - * - * @since Added in version 3.0. - * - * @ingroup context - */ -GLFWAPI GLFWwindow* glfwGetCurrentContext(void); - -/*! @brief Swaps the front and back buffers of the specified window. - * - * This function swaps the front and back buffers of the specified window when - * rendering with OpenGL or OpenGL ES. If the swap interval is greater than - * zero, the GPU driver waits the specified number of screen updates before - * swapping the buffers. - * - * The specified window must have an OpenGL or OpenGL ES context. Specifying - * a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT - * error. - * - * This function does not apply to Vulkan. If you are rendering with Vulkan, - * see `vkQueuePresentKHR` instead. - * - * @param[in] window The window whose buffers to swap. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @remark __EGL:__ The context of the specified window must be current on the - * calling thread. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref buffer_swap - * @sa @ref glfwSwapInterval - * - * @since Added in version 1.0. - * @glfw3 Added window handle parameter. - * - * @ingroup window - */ -GLFWAPI void glfwSwapBuffers(GLFWwindow* window); - -/*! @brief Sets the swap interval for the current context. - * - * This function sets the swap interval for the current OpenGL or OpenGL ES - * context, i.e. the number of screen updates to wait from the time @ref - * glfwSwapBuffers was called before swapping the buffers and returning. This - * is sometimes called _vertical synchronization_, _vertical retrace - * synchronization_ or just _vsync_. - * - * A context that supports either of the `WGL_EXT_swap_control_tear` and - * `GLX_EXT_swap_control_tear` extensions also accepts _negative_ swap - * intervals, which allows the driver to swap immediately even if a frame - * arrives a little bit late. You can check for these extensions with @ref - * glfwExtensionSupported. - * - * A context must be current on the calling thread. Calling this function - * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. - * - * This function does not apply to Vulkan. If you are rendering with Vulkan, - * see the present mode of your swapchain instead. - * - * @param[in] interval The minimum number of screen updates to wait for - * until the buffers are swapped by @ref glfwSwapBuffers. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @remark This function is not called during context creation, leaving the - * swap interval set to whatever is the default on that platform. This is done - * because some swap interval extensions used by GLFW do not allow the swap - * interval to be reset to zero once it has been set to a non-zero value. - * - * @remark Some GPU drivers do not honor the requested swap interval, either - * because of a user setting that overrides the application's request or due to - * bugs in the driver. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref buffer_swap - * @sa @ref glfwSwapBuffers - * - * @since Added in version 1.0. - * - * @ingroup context - */ -GLFWAPI void glfwSwapInterval(int interval); - -/*! @brief Returns whether the specified extension is available. - * - * This function returns whether the specified - * [API extension](@ref context_glext) is supported by the current OpenGL or - * OpenGL ES context. It searches both for client API extension and context - * creation API extensions. - * - * A context must be current on the calling thread. Calling this function - * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. - * - * As this functions retrieves and searches one or more extension strings each - * call, it is recommended that you cache its results if it is going to be used - * frequently. The extension strings will not change during the lifetime of - * a context, so there is no danger in doing this. - * - * This function does not apply to Vulkan. If you are using Vulkan, see @ref - * glfwGetRequiredInstanceExtensions, `vkEnumerateInstanceExtensionProperties` - * and `vkEnumerateDeviceExtensionProperties` instead. - * - * @param[in] extension The ASCII encoded name of the extension. - * @return `GLFW_TRUE` if the extension is available, or `GLFW_FALSE` - * otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_CURRENT_CONTEXT, @ref GLFW_INVALID_VALUE and @ref - * GLFW_PLATFORM_ERROR. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_glext - * @sa @ref glfwGetProcAddress - * - * @since Added in version 1.0. - * - * @ingroup context - */ -GLFWAPI int glfwExtensionSupported(const char* extension); - -/*! @brief Returns the address of the specified function for the current - * context. - * - * This function returns the address of the specified OpenGL or OpenGL ES - * [core or extension function](@ref context_glext), if it is supported - * by the current context. - * - * A context must be current on the calling thread. Calling this function - * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. - * - * This function does not apply to Vulkan. If you are rendering with Vulkan, - * see @ref glfwGetInstanceProcAddress, `vkGetInstanceProcAddr` and - * `vkGetDeviceProcAddr` instead. - * - * @param[in] procname The ASCII encoded name of the function. - * @return The address of the function, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_NO_CURRENT_CONTEXT and @ref GLFW_PLATFORM_ERROR. - * - * @remark The address of a given function is not guaranteed to be the same - * between contexts. - * - * @remark This function may return a non-`NULL` address despite the - * associated version or extension not being available. Always check the - * context version or extension string first. - * - * @pointer_lifetime The returned function pointer is valid until the context - * is destroyed or the library is terminated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref context_glext - * @sa @ref glfwExtensionSupported - * - * @since Added in version 1.0. - * - * @ingroup context - */ -GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname); - -/*! @brief Returns whether the Vulkan loader and an ICD have been found. - * - * This function returns whether the Vulkan loader and any minimally functional - * ICD have been found. - * - * The availability of a Vulkan loader and even an ICD does not by itself - * guarantee that surface creation or even instance creation is possible. - * For example, on Fermi systems Nvidia will install an ICD that provides no - * actual Vulkan support. Call @ref glfwGetRequiredInstanceExtensions to check - * whether the extensions necessary for Vulkan surface creation are available - * and @ref glfwGetPhysicalDevicePresentationSupport to check whether a queue - * family of a physical device supports image presentation. - * - * @return `GLFW_TRUE` if Vulkan is minimally available, or `GLFW_FALSE` - * otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref vulkan_support - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI int glfwVulkanSupported(void); - -/*! @brief Returns the Vulkan instance extensions required by GLFW. - * - * This function returns an array of names of Vulkan instance extensions required - * by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the - * list will always contain `VK_KHR_surface`, so if you don't require any - * additional extensions you can pass this list directly to the - * `VkInstanceCreateInfo` struct. - * - * If Vulkan is not available on the machine, this function returns `NULL` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported - * to check whether Vulkan is at least minimally available. - * - * If Vulkan is available but no set of extensions allowing window surface - * creation was found, this function returns `NULL`. You may still use Vulkan - * for off-screen rendering and compute work. - * - * @param[out] count Where to store the number of extensions in the returned - * array. This is set to zero if an error occurred. - * @return An array of ASCII encoded extension names, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_API_UNAVAILABLE. - * - * @remark Additional extensions may be required by future versions of GLFW. - * You should check if any extensions you wish to enable are already in the - * returned array, as it is an error to specify an extension more than once in - * the `VkInstanceCreateInfo` struct. - * - * @remark @macos GLFW currently supports both the `VK_MVK_macos_surface` and - * the newer `VK_EXT_metal_surface` extensions. - * - * @pointer_lifetime The returned array is allocated and freed by GLFW. You - * should not free it yourself. It is guaranteed to be valid only until the - * library is terminated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref vulkan_ext - * @sa @ref glfwCreateWindowSurface - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count); - -#if defined(VK_VERSION_1_0) - -/*! @brief Returns the address of the specified Vulkan instance function. - * - * This function returns the address of the specified Vulkan core or extension - * function for the specified instance. If instance is set to `NULL` it can - * return any function exported from the Vulkan loader, including at least the - * following functions: - * - * - `vkEnumerateInstanceExtensionProperties` - * - `vkEnumerateInstanceLayerProperties` - * - `vkCreateInstance` - * - `vkGetInstanceProcAddr` - * - * If Vulkan is not available on the machine, this function returns `NULL` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported - * to check whether Vulkan is at least minimally available. - * - * This function is equivalent to calling `vkGetInstanceProcAddr` with - * a platform-specific query of the Vulkan loader as a fallback. - * - * @param[in] instance The Vulkan instance to query, or `NULL` to retrieve - * functions related to instance creation. - * @param[in] procname The ASCII encoded name of the function. - * @return The address of the function, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_API_UNAVAILABLE. - * - * @pointer_lifetime The returned function pointer is valid until the library - * is terminated. - * - * @thread_safety This function may be called from any thread. - * - * @sa @ref vulkan_proc - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, const char* procname); - -/*! @brief Returns whether the specified queue family can present images. - * - * This function returns whether the specified queue family of the specified - * physical device supports presentation to the platform GLFW was built for. - * - * If Vulkan or the required window surface creation instance extensions are - * not available on the machine, or if the specified instance was not created - * with the required extensions, this function returns `GLFW_FALSE` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported - * to check whether Vulkan is at least minimally available and @ref - * glfwGetRequiredInstanceExtensions to check what instance extensions are - * required. - * - * @param[in] instance The instance that the physical device belongs to. - * @param[in] device The physical device that the queue family belongs to. - * @param[in] queuefamily The index of the queue family to query. - * @return `GLFW_TRUE` if the queue family supports presentation, or - * `GLFW_FALSE` otherwise. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_API_UNAVAILABLE and @ref GLFW_PLATFORM_ERROR. - * - * @remark @macos This function currently always returns `GLFW_TRUE`, as the - * `VK_MVK_macos_surface` and `VK_EXT_metal_surface` extensions do not provide - * a `vkGetPhysicalDevice*PresentationSupport` type function. - * - * @thread_safety This function may be called from any thread. For - * synchronization details of Vulkan objects, see the Vulkan specification. - * - * @sa @ref vulkan_present - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily); - -/*! @brief Creates a Vulkan surface for the specified window. - * - * This function creates a Vulkan surface for the specified window. - * - * If the Vulkan loader or at least one minimally functional ICD were not found, - * this function returns `VK_ERROR_INITIALIZATION_FAILED` and generates a @ref - * GLFW_API_UNAVAILABLE error. Call @ref glfwVulkanSupported to check whether - * Vulkan is at least minimally available. - * - * If the required window surface creation instance extensions are not - * available or if the specified instance was not created with these extensions - * enabled, this function returns `VK_ERROR_EXTENSION_NOT_PRESENT` and - * generates a @ref GLFW_API_UNAVAILABLE error. Call @ref - * glfwGetRequiredInstanceExtensions to check what instance extensions are - * required. - * - * The window surface cannot be shared with another API so the window must - * have been created with the [client api hint](@ref GLFW_CLIENT_API_attrib) - * set to `GLFW_NO_API` otherwise it generates a @ref GLFW_INVALID_VALUE error - * and returns `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`. - * - * The window surface must be destroyed before the specified Vulkan instance. - * It is the responsibility of the caller to destroy the window surface. GLFW - * does not destroy it for you. Call `vkDestroySurfaceKHR` to destroy the - * surface. - * - * @param[in] instance The Vulkan instance to create the surface in. - * @param[in] window The window to create the surface for. - * @param[in] allocator The allocator to use, or `NULL` to use the default - * allocator. - * @param[out] surface Where to store the handle of the surface. This is set - * to `VK_NULL_HANDLE` if an error occurred. - * @return `VK_SUCCESS` if successful, or a Vulkan error code if an - * [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED, @ref - * GLFW_API_UNAVAILABLE, @ref GLFW_PLATFORM_ERROR and @ref GLFW_INVALID_VALUE - * - * @remark If an error occurs before the creation call is made, GLFW returns - * the Vulkan error code most appropriate for the error. Appropriate use of - * @ref glfwVulkanSupported and @ref glfwGetRequiredInstanceExtensions should - * eliminate almost all occurrences of these errors. - * - * @remark @macos This function currently only supports the - * `VK_MVK_macos_surface` extension from MoltenVK. - * - * @remark @macos This function creates and sets a `CAMetalLayer` instance for - * the window content view, which is required for MoltenVK to function. - * - * @thread_safety This function may be called from any thread. For - * synchronization details of Vulkan objects, see the Vulkan specification. - * - * @sa @ref vulkan_surface - * @sa @ref glfwGetRequiredInstanceExtensions - * - * @since Added in version 3.2. - * - * @ingroup vulkan - */ -GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface); - -#endif /*VK_VERSION_1_0*/ - - -/************************************************************************* - * Global definition cleanup - *************************************************************************/ - -/* ------------------- BEGIN SYSTEM/COMPILER SPECIFIC -------------------- */ - -#ifdef GLFW_WINGDIAPI_DEFINED - #undef WINGDIAPI - #undef GLFW_WINGDIAPI_DEFINED -#endif - -#ifdef GLFW_CALLBACK_DEFINED - #undef CALLBACK - #undef GLFW_CALLBACK_DEFINED -#endif - -/* Some OpenGL related headers need GLAPIENTRY, but it is unconditionally - * defined by some gl.h variants (OpenBSD) so define it after if needed. - */ -#ifndef GLAPIENTRY - #define GLAPIENTRY APIENTRY -#endif - -/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ - - -#ifdef __cplusplus -} -#endif - -#endif /* _glfw3_h_ */ - diff --git a/FCLauncher/src/main/jni/glfw/include/glfw3native.h b/FCLauncher/src/main/jni/glfw/include/glfw3native.h deleted file mode 100644 index d887b94f..00000000 --- a/FCLauncher/src/main/jni/glfw/include/glfw3native.h +++ /dev/null @@ -1,541 +0,0 @@ -/************************************************************************* - * GLFW 3.3 - www.glfw.org - * A library for OpenGL, window and input - *------------------------------------------------------------------------ - * Copyright (c) 2002-2006 Marcus Geelnard - * Copyright (c) 2006-2018 Camilla Löwy - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would - * be appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - *************************************************************************/ - -#ifndef _glfw3_native_h_ -#define _glfw3_native_h_ - -#ifdef __cplusplus -extern "C" { -#endif - - -/************************************************************************* - * Doxygen documentation - *************************************************************************/ - -/*! @file glfw3native.h - * @brief The header of the native access functions. - * - * This is the header file of the native access functions. See @ref native for - * more information. - */ -/*! @defgroup native Native access - * @brief Functions related to accessing native handles. - * - * **By using the native access functions you assert that you know what you're - * doing and how to fix problems caused by using them. If you don't, you - * shouldn't be using them.** - * - * Before the inclusion of @ref glfw3native.h, you may define zero or more - * window system API macro and zero or more context creation API macros. - * - * The chosen backends must match those the library was compiled for. Failure - * to do this will cause a link-time error. - * - * The available window API macros are: - * * `GLFW_EXPOSE_NATIVE_WIN32` - * * `GLFW_EXPOSE_NATIVE_COCOA` - * * `GLFW_EXPOSE_NATIVE_X11` - * * `GLFW_EXPOSE_NATIVE_WAYLAND` - * - * The available context API macros are: - * * `GLFW_EXPOSE_NATIVE_WGL` - * * `GLFW_EXPOSE_NATIVE_NSGL` - * * `GLFW_EXPOSE_NATIVE_GLX` - * * `GLFW_EXPOSE_NATIVE_EGL` - * * `GLFW_EXPOSE_NATIVE_OSMESA` - * - * These macros select which of the native access functions that are declared - * and which platform-specific headers to include. It is then up your (by - * definition platform-specific) code to handle which of these should be - * defined. - */ - - -/************************************************************************* - * System headers and types - *************************************************************************/ - -#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL) - // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for - // example to allow applications to correctly declare a GL_KHR_debug callback) - // but windows.h assumes no one will define APIENTRY before it does - #if defined(GLFW_APIENTRY_DEFINED) - #undef APIENTRY - #undef GLFW_APIENTRY_DEFINED - #endif - #include -#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL) - #if defined(__OBJC__) - #import - #else - #include - typedef void* id; - #endif -#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX) - #include - #include -#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND) - #include -#endif - -#if defined(GLFW_EXPOSE_NATIVE_WGL) - /* WGL is declared by windows.h */ -#endif -#if defined(GLFW_EXPOSE_NATIVE_NSGL) - /* NSGL is declared by Cocoa.h */ -#endif -#if defined(GLFW_EXPOSE_NATIVE_GLX) - #include -#endif -#if defined(GLFW_EXPOSE_NATIVE_EGL) - #include -#endif -#if defined(GLFW_EXPOSE_NATIVE_OSMESA) - #include -#endif - - -/************************************************************************* - * Functions - *************************************************************************/ - -#if defined(GLFW_EXPOSE_NATIVE_WIN32) -/*! @brief Returns the adapter device name of the specified monitor. - * - * @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`) - * of the specified monitor, or `NULL` if an [error](@ref error_handling) - * occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor); - -/*! @brief Returns the display device name of the specified monitor. - * - * @return The UTF-8 encoded display device name (for example - * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor); - -/*! @brief Returns the `HWND` of the specified window. - * - * @return The `HWND` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @remark The `HDC` associated with the window can be queried with the - * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc) - * function. - * @code - * HDC dc = GetDC(glfwGetWin32Window(window)); - * @endcode - * This DC is private and does not need to be released. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_WGL) -/*! @brief Returns the `HGLRC` of the specified window. - * - * @return The `HGLRC` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @remark The `HDC` associated with the window can be queried with the - * [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc) - * function. - * @code - * HDC dc = GetDC(glfwGetWin32Window(window)); - * @endcode - * This DC is private and does not need to be released. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_COCOA) -/*! @brief Returns the `CGDirectDisplayID` of the specified monitor. - * - * @return The `CGDirectDisplayID` of the specified monitor, or - * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor); - -/*! @brief Returns the `NSWindow` of the specified window. - * - * @return The `NSWindow` of the specified window, or `nil` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_NSGL) -/*! @brief Returns the `NSOpenGLContext` of the specified window. - * - * @return The `NSOpenGLContext` of the specified window, or `nil` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI id glfwGetNSGLContext(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_X11) -/*! @brief Returns the `Display` used by GLFW. - * - * @return The `Display` used by GLFW, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI Display* glfwGetX11Display(void); - -/*! @brief Returns the `RRCrtc` of the specified monitor. - * - * @return The `RRCrtc` of the specified monitor, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor); - -/*! @brief Returns the `RROutput` of the specified monitor. - * - * @return The `RROutput` of the specified monitor, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.1. - * - * @ingroup native - */ -GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor); - -/*! @brief Returns the `Window` of the specified window. - * - * @return The `Window` of the specified window, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI Window glfwGetX11Window(GLFWwindow* window); - -/*! @brief Sets the current primary selection to the specified string. - * - * @param[in] string A UTF-8 encoded string. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The specified string is copied before this function - * returns. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa glfwGetX11SelectionString - * @sa glfwSetClipboardString - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI void glfwSetX11SelectionString(const char* string); - -/*! @brief Returns the contents of the current primary selection as a string. - * - * If the selection is empty or if its contents cannot be converted, `NULL` - * is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated. - * - * @return The contents of the selection as a UTF-8 encoded string, or `NULL` - * if an [error](@ref error_handling) occurred. - * - * @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref - * GLFW_PLATFORM_ERROR. - * - * @pointer_lifetime The returned string is allocated and freed by GLFW. You - * should not free it yourself. It is valid until the next call to @ref - * glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the - * library is terminated. - * - * @thread_safety This function must only be called from the main thread. - * - * @sa @ref clipboard - * @sa glfwSetX11SelectionString - * @sa glfwGetClipboardString - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI const char* glfwGetX11SelectionString(void); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_GLX) -/*! @brief Returns the `GLXContext` of the specified window. - * - * @return The `GLXContext` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window); - -/*! @brief Returns the `GLXWindow` of the specified window. - * - * @return The `GLXWindow` of the specified window, or `None` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_WAYLAND) -/*! @brief Returns the `struct wl_display*` used by GLFW. - * - * @return The `struct wl_display*` used by GLFW, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI struct wl_display* glfwGetWaylandDisplay(void); - -/*! @brief Returns the `struct wl_output*` of the specified monitor. - * - * @return The `struct wl_output*` of the specified monitor, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor); - -/*! @brief Returns the main `struct wl_surface*` of the specified window. - * - * @return The main `struct wl_surface*` of the specified window, or `NULL` if - * an [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.2. - * - * @ingroup native - */ -GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_EGL) -/*! @brief Returns the `EGLDisplay` used by GLFW. - * - * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI EGLDisplay glfwGetEGLDisplay(void); - -/*! @brief Returns the `EGLContext` of the specified window. - * - * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window); - -/*! @brief Returns the `EGLSurface` of the specified window. - * - * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.0. - * - * @ingroup native - */ -GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window); -#endif - -#if defined(GLFW_EXPOSE_NATIVE_OSMESA) -/*! @brief Retrieves the color buffer associated with the specified window. - * - * @param[in] window The window whose color buffer to retrieve. - * @param[out] width Where to store the width of the color buffer, or `NULL`. - * @param[out] height Where to store the height of the color buffer, or `NULL`. - * @param[out] format Where to store the OSMesa pixel format of the color - * buffer, or `NULL`. - * @param[out] buffer Where to store the address of the color buffer, or - * `NULL`. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer); - -/*! @brief Retrieves the depth buffer associated with the specified window. - * - * @param[in] window The window whose depth buffer to retrieve. - * @param[out] width Where to store the width of the depth buffer, or `NULL`. - * @param[out] height Where to store the height of the depth buffer, or `NULL`. - * @param[out] bytesPerValue Where to store the number of bytes per depth - * buffer element, or `NULL`. - * @param[out] buffer Where to store the address of the depth buffer, or - * `NULL`. - * @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer); - -/*! @brief Returns the `OSMesaContext` of the specified window. - * - * @return The `OSMesaContext` of the specified window, or `NULL` if an - * [error](@ref error_handling) occurred. - * - * @thread_safety This function may be called from any thread. Access is not - * synchronized. - * - * @since Added in version 3.3. - * - * @ingroup native - */ -GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _glfw3_native_h_ */ - diff --git a/FCLauncher/src/main/jni/glfw/include/glfw_config.h b/FCLauncher/src/main/jni/glfw/include/glfw_config.h deleted file mode 100644 index fab4784f..00000000 --- a/FCLauncher/src/main/jni/glfw/include/glfw_config.h +++ /dev/null @@ -1,62 +0,0 @@ -//======================================================================== -// GLFW 3.3 - www.glfw.org -//------------------------------------------------------------------------ -// Copyright (c) 2010-2016 Camilla Löwy -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would -// be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not -// be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source -// distribution. -// -//======================================================================== -// As glfw_config.h.in, this file is used by CMake to produce the -// glfw_config.h configuration header file. If you are adding a feature -// requiring conditional compilation, this is where to add the macro. -//======================================================================== -// As glfw_config.h, this file defines compile-time option macros for a -// specific platform and development environment. If you are using the -// GLFW CMake files, modify glfw_config.h.in instead of this file. If you -// are using your own build system, make this file define the appropriate -// macros in whatever way is suitable. -//======================================================================== - -// Define this to 1 if building GLFW for X11 -#define _GLFW_X11 -// Define this to 1 if building GLFW for Win32 -#define _GLFW_WIN32 -// Define this to 1 if building GLFW for Cocoa -#define _GLFW_COCOA -// Define this to 1 if building GLFW for Wayland -#define _GLFW_WAYLAND -// Define this to 1 if building GLFW for Boat -#define _GLFW_FCL -// Define this to 1 if building GLFW for OSMesa -#define _GLFW_OSMESA - -// Define this to 1 if building as a shared library / dynamic library / DLL -#define _GLFW_BUILD_DLL -// Define this to 1 to use Vulkan loader linked statically into application -#define _GLFW_VULKAN_STATIC - -// Define this to 1 to force use of high-performance GPU on hybrid systems -#define _GLFW_USE_HYBRID_HPG - -// Define this to 1 if xkbcommon supports the compose key -#define HAVE_XKBCOMMON_COMPOSE_H -// Define this to 1 if the libc supports memfd_create() -#define HAVE_MEMFD_CREATE - diff --git a/FCLauncher/src/main/jni/glfw/include/internal.h b/FCLauncher/src/main/jni/glfw/include/internal.h deleted file mode 100644 index a797d2e1..00000000 --- a/FCLauncher/src/main/jni/glfw/include/internal.h +++ /dev/null @@ -1,772 +0,0 @@ -//======================================================================== -// GLFW 3.3 - www.glfw.org -//------------------------------------------------------------------------ -// Copyright (c) 2002-2006 Marcus Geelnard -// Copyright (c) 2006-2019 Camilla Löwy -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would -// be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not -// be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source -// distribution. -// -//======================================================================== -#ifndef INTERNAL_H -#define INTERNAL_H - -#pragma once - -#if defined(_GLFW_USE_CONFIG_H) - #include -#endif - -#if defined(GLFW_INCLUDE_GLCOREARB) || \ - defined(GLFW_INCLUDE_ES1) || \ - defined(GLFW_INCLUDE_ES2) || \ - defined(GLFW_INCLUDE_ES3) || \ - defined(GLFW_INCLUDE_ES31) || \ - defined(GLFW_INCLUDE_ES32) || \ - defined(GLFW_INCLUDE_NONE) || \ - defined(GLFW_INCLUDE_GLEXT) || \ - defined(GLFW_INCLUDE_GLU) || \ - defined(GLFW_INCLUDE_VULKAN) || \ - defined(GLFW_DLL) -#endif - -#define GLFW_INCLUDE_NONE -#include -#include "gl/gl.h" - -#define _GLFW_INSERT_FIRST 0 -#define _GLFW_INSERT_LAST 1 - -#define _GLFW_POLL_PRESENCE 0 -#define _GLFW_POLL_AXES 1 -#define _GLFW_POLL_BUTTONS 2 -#define _GLFW_POLL_ALL (_GLFW_POLL_AXES | _GLFW_POLL_BUTTONS) - -#define _GLFW_MESSAGE_SIZE 1024 - -typedef int GLFWbool; - -typedef struct _GLFWerror _GLFWerror; -typedef struct _GLFWinitconfig _GLFWinitconfig; -typedef struct _GLFWwndconfig _GLFWwndconfig; -typedef struct _GLFWctxconfig _GLFWctxconfig; -typedef struct _GLFWfbconfig _GLFWfbconfig; -typedef struct _GLFWcontext _GLFWcontext; -typedef struct _GLFWwindow _GLFWwindow; -typedef struct _GLFWlibrary _GLFWlibrary; -typedef struct _GLFWmonitor _GLFWmonitor; -typedef struct _GLFWcursor _GLFWcursor; -typedef struct _GLFWmapelement _GLFWmapelement; -typedef struct _GLFWmapping _GLFWmapping; -typedef struct _GLFWjoystick _GLFWjoystick; -typedef struct _GLFWtls _GLFWtls; -typedef struct _GLFWmutex _GLFWmutex; - -typedef void (* _GLFWmakecontextcurrentfun)(_GLFWwindow*); -typedef void (* _GLFWswapbuffersfun)(_GLFWwindow*); -typedef void (* _GLFWswapintervalfun)(int); -typedef int (* _GLFWextensionsupportedfun)(const char*); -typedef GLFWglproc (* _GLFWgetprocaddressfun)(const char*); -typedef void (* _GLFWdestroycontextfun)(_GLFWwindow*); - -#define GL_VERSION 0x1f02 -#define GL_NONE 0 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_EXTENSIONS 0x1f03 -#define GL_NUM_EXTENSIONS 0x821d -#define GL_CONTEXT_FLAGS 0x821e -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 -#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82fb -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc -#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 - -typedef int GLint; -typedef unsigned int GLuint; -typedef unsigned int GLenum; -typedef unsigned int GLbitfield; -typedef unsigned char GLubyte; - -typedef void (APIENTRY * PFNGLCLEARPROC)(GLbitfield); -typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGPROC)(GLenum); -typedef void (APIENTRY * PFNGLGETINTEGERVPROC)(GLenum,GLint*); -typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGIPROC)(GLenum,GLuint); -typedef void (APIENTRY * PFNGLFINISH) (void); -typedef void (APIENTRY * PFNGLCLEARCOLOR) (GLclampf,GLclampf,GLclampf,GLclampf); -typedef void (APIENTRY * PFNGLCLEAR) (GLbitfield); -typedef void (APIENTRY * PFNGLREADPIXELS) (GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,void*); - -#define VK_NULL_HANDLE 0 - -typedef void* VkInstance; -typedef void* VkPhysicalDevice; -typedef uint64_t VkSurfaceKHR; -typedef uint32_t VkFlags; -typedef uint32_t VkBool32; - -typedef enum VkStructureType -{ - VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, - VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, - VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, - VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, - VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, - VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, - VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000, - VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkStructureType; - -typedef enum VkResult -{ - VK_SUCCESS = 0, - VK_NOT_READY = 1, - VK_TIMEOUT = 2, - VK_EVENT_SET = 3, - VK_EVENT_RESET = 4, - VK_INCOMPLETE = 5, - VK_ERROR_OUT_OF_HOST_MEMORY = -1, - VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, - VK_ERROR_INITIALIZATION_FAILED = -3, - VK_ERROR_DEVICE_LOST = -4, - VK_ERROR_MEMORY_MAP_FAILED = -5, - VK_ERROR_LAYER_NOT_PRESENT = -6, - VK_ERROR_EXTENSION_NOT_PRESENT = -7, - VK_ERROR_FEATURE_NOT_PRESENT = -8, - VK_ERROR_INCOMPATIBLE_DRIVER = -9, - VK_ERROR_TOO_MANY_OBJECTS = -10, - VK_ERROR_FORMAT_NOT_SUPPORTED = -11, - VK_ERROR_SURFACE_LOST_KHR = -1000000000, - VK_SUBOPTIMAL_KHR = 1000001003, - VK_ERROR_OUT_OF_DATE_KHR = -1000001004, - VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001, - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001, - VK_ERROR_VALIDATION_FAILED_EXT = -1000011001, - VK_RESULT_MAX_ENUM = 0x7FFFFFFF -} VkResult; - -typedef struct VkAllocationCallbacks VkAllocationCallbacks; - -typedef struct VkExtensionProperties -{ - char extensionName[256]; - uint32_t specVersion; -} VkExtensionProperties; - -typedef void (APIENTRY * PFN_vkVoidFunction)(void); - -#if defined(_GLFW_VULKAN_STATIC) - PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance,const char*); - VkResult vkEnumerateInstanceExtensionProperties(const char*,uint32_t*,VkExtensionProperties*); -#else - typedef PFN_vkVoidFunction (APIENTRY * PFN_vkGetInstanceProcAddr)(VkInstance,const char*); - typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const char*,uint32_t*,VkExtensionProperties*); - #define vkEnumerateInstanceExtensionProperties _glfw.vk.EnumerateInstanceExtensionProperties - #define vkGetInstanceProcAddr _glfw.vk.GetInstanceProcAddr -#endif - -#include "fcl_platform.h" - -// Constructs a version number string from the public header macros -#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r -#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r) -#define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \ - GLFW_VERSION_MINOR, \ - GLFW_VERSION_REVISION) - -// Checks for whether the library has been initialized -#define _GLFW_REQUIRE_INIT() \ - if (!_glfw.initialized) \ - { \ - _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \ - return; \ - } -#define _GLFW_REQUIRE_INIT_OR_RETURN(x) \ - if (!_glfw.initialized) \ - { \ - _glfwInputError(GLFW_NOT_INITIALIZED, NULL); \ - return x; \ - } - -// Swaps the provided pointers -#define _GLFW_SWAP_POINTERS(x, y) \ - { \ - void* t; \ - t = x; \ - x = y; \ - y = t; \ - } - -// Per-thread error structure -// -struct _GLFWerror -{ - _GLFWerror* next; - int code; - char description[_GLFW_MESSAGE_SIZE]; -}; - -// Initialization configuration -// -// Parameters relating to the initialization of the library -// -struct _GLFWinitconfig -{ - GLFWbool hatButtons; - struct { - GLFWbool menubar; - GLFWbool chdir; - } ns; -}; - -// Window configuration -// -// Parameters relating to the creation of the window but not directly related -// to the framebuffer. This is used to pass window creation parameters from -// shared code to the platform API. -// -struct _GLFWwndconfig -{ - int width; - int height; - const char* title; - GLFWbool resizable; - GLFWbool visible; - GLFWbool decorated; - GLFWbool focused; - GLFWbool autoIconify; - GLFWbool floating; - GLFWbool maximized; - GLFWbool centerCursor; - GLFWbool focusOnShow; - GLFWbool scaleToMonitor; - struct { - GLFWbool retina; - char frameName[256]; - } ns; - struct { - char className[256]; - char instanceName[256]; - } x11; -}; - -// Context configuration -// -// Parameters relating to the creation of the context but not directly related -// to the framebuffer. This is used to pass context creation parameters from -// shared code to the platform API. -// -struct _GLFWctxconfig -{ - int client; - int source; - int major; - int minor; - GLFWbool forward; - GLFWbool debug; - GLFWbool noerror; - int profile; - int robustness; - int release; - _GLFWwindow* share; - struct { - GLFWbool offline; - } nsgl; -}; - -// Framebuffer configuration -// -// This describes buffers and their sizes. It also contains -// a platform-specific ID used to map back to the backend API object. -// -// It is used to pass framebuffer parameters from shared code to the platform -// API and also to enumerate and select available framebuffer configs. -// -struct _GLFWfbconfig -{ - int redBits; - int greenBits; - int blueBits; - int alphaBits; - int depthBits; - int stencilBits; - int accumRedBits; - int accumGreenBits; - int accumBlueBits; - int accumAlphaBits; - int auxBuffers; - GLFWbool stereo; - int samples; - GLFWbool sRGB; - GLFWbool doublebuffer; - GLFWbool transparent; - uintptr_t handle; -}; - -// Context structure -// -struct _GLFWcontext -{ - int client; - int source; - int major, minor, revision; - GLFWbool forward, debug, noerror; - int profile; - int robustness; - int release; - - PFNGLGETSTRINGIPROC GetStringi; - PFNGLGETINTEGERVPROC GetIntegerv; - PFNGLGETSTRINGPROC GetString; - PFNGLFINISH Finish; - PFNGLCLEARCOLOR ClearColor; - PFNGLCLEAR Clear; - PFNGLREADPIXELS ReadPixels; - - _GLFWmakecontextcurrentfun makeCurrent; - _GLFWswapbuffersfun swapBuffers; - _GLFWswapintervalfun swapInterval; - _GLFWextensionsupportedfun extensionSupported; - _GLFWgetprocaddressfun getProcAddress; - _GLFWdestroycontextfun destroy; - - // This is defined in the context API's context.h - _GLFW_PLATFORM_CONTEXT_STATE; - // This is defined in egl_context.h - _GLFW_EGL_CONTEXT_STATE; - // This is defined in osmesa_context.h - _GLFW_OSMESA_CONTEXT_STATE; - -}; - -// Window and context structure -// -struct _GLFWwindow -{ - struct _GLFWwindow* next; - - // Window settings and state - GLFWbool resizable; - GLFWbool decorated; - GLFWbool autoIconify; - GLFWbool floating; - GLFWbool focusOnShow; - GLFWbool shouldClose; - void* userPointer; - GLFWbool doublebuffer; - GLFWvidmode videoMode; - _GLFWmonitor* monitor; - _GLFWcursor* cursor; - - int minwidth, minheight; - int maxwidth, maxheight; - int numer, denom; - - GLFWbool stickyKeys; - GLFWbool stickyMouseButtons; - GLFWbool lockKeyMods; - int cursorMode; - char mouseButtons[GLFW_MOUSE_BUTTON_LAST + 1]; - char keys[GLFW_KEY_LAST + 1]; - // Virtual cursor position when cursor is disabled - double virtualCursorPosX, virtualCursorPosY; - GLFWbool rawMouseMotion; - - _GLFWcontext context; - - struct { - GLFWwindowposfun pos; - GLFWwindowsizefun size; - GLFWwindowclosefun close; - GLFWwindowrefreshfun refresh; - GLFWwindowfocusfun focus; - GLFWwindowiconifyfun iconify; - GLFWwindowmaximizefun maximize; - GLFWframebuffersizefun fbsize; - GLFWwindowcontentscalefun scale; - GLFWmousebuttonfun mouseButton; - GLFWcursorposfun cursorPos; - GLFWcursorenterfun cursorEnter; - GLFWscrollfun scroll; - GLFWkeyfun key; - GLFWcharfun character; - GLFWcharmodsfun charmods; - GLFWdropfun drop; - } callbacks; - - // This is defined in the window API's platform.h - _GLFW_PLATFORM_WINDOW_STATE; - -}; - -// Monitor structure -// -struct _GLFWmonitor -{ - char name[128]; - void* userPointer; - - // Physical dimensions in millimeters. - int widthMM, heightMM; - - // The window whose video mode is current on this monitor - _GLFWwindow* window; - - GLFWvidmode* modes; - int modeCount; - GLFWvidmode currentMode; - - GLFWgammaramp originalRamp; - GLFWgammaramp currentRamp; - - // This is defined in the window API's platform.h - _GLFW_PLATFORM_MONITOR_STATE; - -}; - -// Cursor structure -// -struct _GLFWcursor -{ - _GLFWcursor* next; - - // This is defined in the window API's platform.h - _GLFW_PLATFORM_CURSOR_STATE; -}; - -// Gamepad mapping element structure -// -struct _GLFWmapelement -{ - uint8_t type; - uint8_t index; - int8_t axisScale; - int8_t axisOffset; -}; - -// Gamepad mapping structure -// -struct _GLFWmapping -{ - char name[128]; - char guid[33]; - _GLFWmapelement buttons[15]; - _GLFWmapelement axes[6]; -}; - -// Joystick structure -// -struct _GLFWjoystick -{ - GLFWbool present; - float* axes; - int axisCount; - unsigned char* buttons; - int buttonCount; - unsigned char* hats; - int hatCount; - char name[128]; - void* userPointer; - char guid[33]; - _GLFWmapping* mapping; - -}; - -// Thread local storage structure -// -struct _GLFWtls -{ - // This is defined in the platform's thread.h - _GLFW_PLATFORM_TLS_STATE; -}; - -// Mutex structure -// -struct _GLFWmutex -{ - // This is defined in the platform's thread.h - _GLFW_PLATFORM_MUTEX_STATE; -}; - -// Library global data -// -struct _GLFWlibrary -{ - GLFWbool initialized; - - struct { - _GLFWinitconfig init; - _GLFWfbconfig framebuffer; - _GLFWwndconfig window; - _GLFWctxconfig context; - int refreshRate; - } hints; - - _GLFWerror* errorListHead; - _GLFWcursor* cursorListHead; - _GLFWwindow* windowListHead; - - _GLFWmonitor** monitors; - int monitorCount; - - _GLFWjoystick joysticks[GLFW_JOYSTICK_LAST + 1]; - _GLFWmapping* mappings; - int mappingCount; - - _GLFWtls errorSlot; - _GLFWtls contextSlot; - _GLFWmutex errorLock; - - struct { - uint64_t offset; - // This is defined in the platform's time.h - _GLFW_PLATFORM_LIBRARY_TIMER_STATE; - } timer; - - struct { - GLFWbool available; - void* handle; - char* extensions[2]; -#if !defined(_GLFW_VULKAN_STATIC) - PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties; - PFN_vkGetInstanceProcAddr GetInstanceProcAddr; -#endif - GLFWbool KHR_surface; - - GLFWbool KHR_android_surface; - } vk; - - struct { - GLFWmonitorfun monitor; - GLFWjoystickfun joystick; - } callbacks; - - // This is defined in the window API's platform.h - _GLFW_PLATFORM_LIBRARY_WINDOW_STATE; - // This is defined in the context API's context.h - _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE; - // This is defined in egl_context.h - _GLFW_EGL_LIBRARY_CONTEXT_STATE; - // This is defined in osmesa_context.h - _GLFW_OSMESA_LIBRARY_CONTEXT_STATE; - -}; - -// Global state shared between compilation units of GLFW -// -extern _GLFWlibrary _glfw; - - -////////////////////////////////////////////////////////////////////////// -////// GLFW platform API ////// -////////////////////////////////////////////////////////////////////////// - -int _glfwPlatformInit(void); -void _glfwPlatformTerminate(void); -const char* _glfwPlatformGetVersionString(void); - -void _glfwPlatformGetCursorPos(_GLFWwindow* window, double* xpos, double* ypos); -void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos); -void _glfwPlatformSetInjectorCallback(FCLinjectorfun callback); -void _glfwPlatformSetHitResultType(int type); -void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode); -void _glfwPlatformSetRawMouseMotion(_GLFWwindow *window, GLFWbool enabled); -GLFWbool _glfwPlatformRawMouseMotionSupported(void); -int _glfwPlatformCreateCursor(_GLFWcursor* cursor, - const GLFWimage* image, int xhot, int yhot); -int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape); -void _glfwPlatformDestroyCursor(_GLFWcursor* cursor); -void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor); - -const char* _glfwPlatformGetScancodeName(int scancode); -int _glfwPlatformGetKeyScancode(int key); - -void _glfwPlatformFreeMonitor(_GLFWmonitor* monitor); -void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos); -void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor, - float* xscale, float* yscale); -void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height); -GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count); -void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode); -GLFWbool _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp); -void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp); - -void _glfwPlatformSetClipboardString(const char* string); -const char* _glfwPlatformGetClipboardString(void); - -int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode); -void _glfwPlatformUpdateGamepadGUID(char* guid); - -uint64_t _glfwPlatformGetTimerValue(void); -uint64_t _glfwPlatformGetTimerFrequency(void); - -int _glfwPlatformCreateWindow(_GLFWwindow* window, - const _GLFWwndconfig* wndconfig, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig); -void _glfwPlatformDestroyWindow(_GLFWwindow* window); -void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title); -void _glfwPlatformSetWindowIcon(_GLFWwindow* window, - int count, const GLFWimage* images); -void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos); -void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos); -void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height); -void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height); -void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window, - int minwidth, int minheight, - int maxwidth, int maxheight); -void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom); -void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height); -void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, - int* left, int* top, - int* right, int* bottom); -void _glfwPlatformGetWindowContentScale(_GLFWwindow* window, - float* xscale, float* yscale); -void _glfwPlatformIconifyWindow(_GLFWwindow* window); -void _glfwPlatformRestoreWindow(_GLFWwindow* window); -void _glfwPlatformMaximizeWindow(_GLFWwindow* window); -void _glfwPlatformShowWindow(_GLFWwindow* window); -void _glfwPlatformHideWindow(_GLFWwindow* window); -void _glfwPlatformRequestWindowAttention(_GLFWwindow* window); -void _glfwPlatformFocusWindow(_GLFWwindow* window); -void _glfwPlatformSetWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor, - int xpos, int ypos, int width, int height, - int refreshRate); -int _glfwPlatformWindowFocused(_GLFWwindow* window); -int _glfwPlatformWindowIconified(_GLFWwindow* window); -int _glfwPlatformWindowVisible(_GLFWwindow* window); -int _glfwPlatformWindowMaximized(_GLFWwindow* window); -int _glfwPlatformWindowHovered(_GLFWwindow* window); -int _glfwPlatformFramebufferTransparent(_GLFWwindow* window); -float _glfwPlatformGetWindowOpacity(_GLFWwindow* window); -void _glfwPlatformSetWindowResizable(_GLFWwindow* window, GLFWbool enabled); -void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, GLFWbool enabled); -void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled); -void _glfwPlatformSetWindowOpacity(_GLFWwindow* window, float opacity); - -void _glfwPlatformPollEvents(void); -void _glfwPlatformWaitEvents(void); -void _glfwPlatformWaitEventsTimeout(double timeout); -void _glfwPlatformPostEmptyEvent(void); - -void _glfwPlatformGetRequiredInstanceExtensions(char** extensions); -int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, - VkPhysicalDevice device, - uint32_t queuefamily); -VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, - _GLFWwindow* window, - const VkAllocationCallbacks* allocator, - VkSurfaceKHR* surface); - -GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls); -void _glfwPlatformDestroyTls(_GLFWtls* tls); -void* _glfwPlatformGetTls(_GLFWtls* tls); -void _glfwPlatformSetTls(_GLFWtls* tls, void* value); - -GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex); -void _glfwPlatformDestroyMutex(_GLFWmutex* mutex); -void _glfwPlatformLockMutex(_GLFWmutex* mutex); -void _glfwPlatformUnlockMutex(_GLFWmutex* mutex); - - -////////////////////////////////////////////////////////////////////////// -////// GLFW event API ////// -////////////////////////////////////////////////////////////////////////// - -void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused); -void _glfwInputWindowPos(_GLFWwindow* window, int xpos, int ypos); -void _glfwInputWindowSize(_GLFWwindow* window, int width, int height); -void _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height); -void _glfwInputWindowContentScale(_GLFWwindow* window, - float xscale, float yscale); -void _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified); -void _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized); -void _glfwInputWindowDamage(_GLFWwindow* window); -void _glfwInputWindowCloseRequest(_GLFWwindow* window); -void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor); - -void _glfwInputKey(_GLFWwindow* window, - int key, int scancode, int action, int mods); -void _glfwInputChar(_GLFWwindow* window, - unsigned int codepoint, int mods, GLFWbool plain); -void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset); -void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods); -void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos); -void _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered); -void _glfwInputDrop(_GLFWwindow* window, int count, const char** names); -void _glfwInputJoystick(_GLFWjoystick* js, int event); -void _glfwInputJoystickAxis(_GLFWjoystick* js, int axis, float value); -void _glfwInputJoystickButton(_GLFWjoystick* js, int button, char value); -void _glfwInputJoystickHat(_GLFWjoystick* js, int hat, char value); - -void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement); -void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window); - -#if defined(__GNUC__) -void _glfwInputError(int code, const char* format, ...) - __attribute__((format(printf, 2, 3))); -#else -void _glfwInputError(int code, const char* format, ...); -#endif - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWbool _glfwStringInExtensionString(const char* string, const char* extensions); -const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired, - const _GLFWfbconfig* alternatives, - unsigned int count); -GLFWbool _glfwRefreshContextAttribs(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig); -GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig* ctxconfig); - -const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor, - const GLFWvidmode* desired); -int _glfwCompareVideoModes(const GLFWvidmode* first, const GLFWvidmode* second); -_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM); -void _glfwFreeMonitor(_GLFWmonitor* monitor); -void _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size); -void _glfwFreeGammaArrays(GLFWgammaramp* ramp); -void _glfwSplitBPP(int bpp, int* red, int* green, int* blue); - -_GLFWjoystick* _glfwAllocJoystick(const char* name, - const char* guid, - int axisCount, - int buttonCount, - int hatCount); -void _glfwFreeJoystick(_GLFWjoystick* js); -void _glfwCenterCursorInContentArea(_GLFWwindow* window); - -GLFWbool _glfwInitVulkan(int mode); -void _glfwTerminateVulkan(void); -const char* _glfwGetVulkanResultString(VkResult result); - -char* _glfw_strdup(const char* source); -float _glfw_fminf(float a, float b); -float _glfw_fmaxf(float a, float b); - -#endif \ No newline at end of file diff --git a/FCLauncher/src/main/jni/glfw/include/osmesa_context.h b/FCLauncher/src/main/jni/glfw/include/osmesa_context.h deleted file mode 100644 index 6e39a749..00000000 --- a/FCLauncher/src/main/jni/glfw/include/osmesa_context.h +++ /dev/null @@ -1,79 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#define OSMESA_RGBA 0x1908 -#define OSMESA_FORMAT 0x22 -#define OSMESA_DEPTH_BITS 0x30 -#define OSMESA_STENCIL_BITS 0x31 -#define OSMESA_ACCUM_BITS 0x32 -#define OSMESA_PROFILE 0x33 -#define OSMESA_CORE_PROFILE 0x34 -#define OSMESA_COMPAT_PROFILE 0x35 -#define OSMESA_CONTEXT_MAJOR_VERSION 0x36 -#define OSMESA_CONTEXT_MINOR_VERSION 0x37 - -#define OSMESA_ROW_LENGTH 0x10 -#define OSMESA_Y_UP 0x11 - -typedef void* OSMesaContext; -typedef void (*OSMESAproc)(void); - -typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaCreateContext)(GLenum,OSMesaContext); -typedef OSMesaContext (GLAPIENTRY * PFN_OSMesaGetCurrentContext)(void); -typedef void (GLAPIENTRY * PFN_OSMesaDestroyContext)(OSMesaContext); -typedef void (GLAPIENTRY * PFN_OSMesaPixelStore)(GLint,GLint); -typedef int (GLAPIENTRY * PFN_OSMesaMakeCurrent)(OSMesaContext,void*,int,int,int); -typedef int (GLAPIENTRY * PFN_OSMesaGetColorBuffer)(OSMesaContext,int*,int*,int*,void**); -typedef int (GLAPIENTRY * PFN_OSMesaGetDepthBuffer)(OSMesaContext,int*,int*,int*,void**); -typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*); -#define OSMesaCreateContext _glfw.osmesa.CreateContext -#define OSMesaGetCurrentContext _glfw.osmesa.GetCurrentContext -#define OSMesaDestroyContext _glfw.osmesa.DestroyContext -#define OSMesaPixelStore _glfw.osmesa.PixelStore -#define OSMesaMakeCurrent _glfw.osmesa.MakeCurrent -#define OSMesaGetColorBuffer _glfw.osmesa.GetColorBuffer -#define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer -#define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress - -#define _GLFW_OSMESA_CONTEXT_STATE _GLFWcontextOSMesa osmesa -#define _GLFW_OSMESA_LIBRARY_CONTEXT_STATE _GLFWlibraryOSMesa osmesa - - -// OSMesa-specific per-context data -// -typedef struct _GLFWcontextOSMesa -{ - OSMesaContext handle; - int width; - int height; - void* buffer; - -} _GLFWcontextOSMesa; - -// OSMesa-specific global data -// -typedef struct _GLFWlibraryOSMesa -{ - void* handle; - - PFN_OSMesaCreateContext CreateContext; - PFN_OSMesaGetCurrentContext GetCurrentContext; - PFN_OSMesaDestroyContext DestroyContext; - PFN_OSMesaPixelStore PixelStore; - PFN_OSMesaMakeCurrent MakeCurrent; - PFN_OSMesaGetColorBuffer GetColorBuffer; - PFN_OSMesaGetDepthBuffer GetDepthBuffer; - PFN_OSMesaGetProcAddress GetProcAddress; - -} _GLFWlibraryOSMesa; - - -GLFWbool _glfwInitOSMesa(void); -void _glfwTerminateOSMesa(void); -GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig); - diff --git a/FCLauncher/src/main/jni/glfw/include/platform.h b/FCLauncher/src/main/jni/glfw/include/platform.h deleted file mode 100644 index 924e9af1..00000000 --- a/FCLauncher/src/main/jni/glfw/include/platform.h +++ /dev/null @@ -1,198 +0,0 @@ -//======================================================================== -// GLFW 3.4 - www.glfw.org -//------------------------------------------------------------------------ -// Copyright (c) 2002-2006 Marcus Geelnard -// Copyright (c) 2006-2018 Camilla Löwy -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would -// be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not -// be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source -// distribution. -// -//======================================================================== - -#if defined(GLFW_BUILD_WIN32_TIMER) || \ - defined(GLFW_BUILD_WIN32_MODULE) || \ - defined(GLFW_BUILD_WIN32_THREAD) || \ - defined(GLFW_BUILD_COCOA_TIMER) || \ - defined(GLFW_BUILD_POSIX_TIMER) || \ - defined(GLFW_BUILD_POSIX_MODULE) || \ - defined(GLFW_BUILD_POSIX_THREAD) || \ - defined(GLFW_BUILD_POSIX_POLL) || \ - defined(GLFW_BUILD_LINUX_JOYSTICK) -#error "You must not define these; define zero or more _GLFW_ macros instead" -#endif - -#if defined(_GLFW_WIN32) -#include "win32_platform.h" -#else -#define GLFW_WIN32_WINDOW_STATE -#define GLFW_WIN32_MONITOR_STATE -#define GLFW_WIN32_CURSOR_STATE -#define GLFW_WIN32_LIBRARY_WINDOW_STATE -#define GLFW_WGL_CONTEXT_STATE -#define GLFW_WGL_LIBRARY_CONTEXT_STATE -#endif - -#if defined(_GLFW_COCOA) -#include "cocoa_platform.h" -#else -#define GLFW_COCOA_WINDOW_STATE -#define GLFW_COCOA_MONITOR_STATE -#define GLFW_COCOA_CURSOR_STATE -#define GLFW_COCOA_LIBRARY_WINDOW_STATE -#define GLFW_NSGL_CONTEXT_STATE -#define GLFW_NSGL_LIBRARY_CONTEXT_STATE -#endif - -#if defined(_GLFW_WAYLAND) -#include "wl_platform.h" -#else -#define GLFW_WAYLAND_WINDOW_STATE -#define GLFW_WAYLAND_MONITOR_STATE -#define GLFW_WAYLAND_CURSOR_STATE -#define GLFW_WAYLAND_LIBRARY_WINDOW_STATE -#endif - -#if defined(_GLFW_X11) -#include "x11_platform.h" -#else -#define GLFW_X11_WINDOW_STATE -#define GLFW_X11_MONITOR_STATE -#define GLFW_X11_CURSOR_STATE -#define GLFW_X11_LIBRARY_WINDOW_STATE -#define GLFW_GLX_CONTEXT_STATE -#define GLFW_GLX_LIBRARY_CONTEXT_STATE -#endif - -#if defined(_GLFW_WIN32) -#include "win32_joystick.h" -#else -#define GLFW_WIN32_JOYSTICK_STATE -#define GLFW_WIN32_LIBRARY_JOYSTICK_STATE -#endif - -#if defined(_GLFW_COCOA) -#include "cocoa_joystick.h" -#else -#define GLFW_COCOA_JOYSTICK_STATE -#define GLFW_COCOA_LIBRARY_JOYSTICK_STATE -#endif - -#if (defined(_GLFW_X11) || defined(_GLFW_WAYLAND)) && defined(__linux__) -#define GLFW_BUILD_LINUX_JOYSTICK -#endif - -#if defined(GLFW_BUILD_LINUX_JOYSTICK) -#include "linux_joystick.h" -#else -#define GLFW_LINUX_JOYSTICK_STATE -#define GLFW_LINUX_LIBRARY_JOYSTICK_STATE -#endif - -#define GLFW_PLATFORM_WINDOW_STATE \ - GLFW_WIN32_WINDOW_STATE \ - GLFW_COCOA_WINDOW_STATE \ - GLFW_WAYLAND_WINDOW_STATE \ - GLFW_X11_WINDOW_STATE \ - GLFW_NULL_WINDOW_STATE \ - -#define GLFW_PLATFORM_MONITOR_STATE \ - GLFW_WIN32_MONITOR_STATE \ - GLFW_COCOA_MONITOR_STATE \ - GLFW_WAYLAND_MONITOR_STATE \ - GLFW_X11_MONITOR_STATE \ - GLFW_NULL_MONITOR_STATE \ - -#define GLFW_PLATFORM_CURSOR_STATE \ - GLFW_WIN32_CURSOR_STATE \ - GLFW_COCOA_CURSOR_STATE \ - GLFW_WAYLAND_CURSOR_STATE \ - GLFW_X11_CURSOR_STATE \ - GLFW_NULL_CURSOR_STATE \ - -#define GLFW_PLATFORM_JOYSTICK_STATE \ - GLFW_WIN32_JOYSTICK_STATE \ - GLFW_COCOA_JOYSTICK_STATE \ - GLFW_LINUX_JOYSTICK_STATE - -#define GLFW_PLATFORM_LIBRARY_WINDOW_STATE \ - GLFW_WIN32_LIBRARY_WINDOW_STATE \ - GLFW_COCOA_LIBRARY_WINDOW_STATE \ - GLFW_WAYLAND_LIBRARY_WINDOW_STATE \ - GLFW_X11_LIBRARY_WINDOW_STATE \ - GLFW_NULL_LIBRARY_WINDOW_STATE \ - -#define GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE \ - GLFW_WIN32_LIBRARY_JOYSTICK_STATE \ - GLFW_COCOA_LIBRARY_JOYSTICK_STATE \ - GLFW_LINUX_LIBRARY_JOYSTICK_STATE - -#define GLFW_PLATFORM_CONTEXT_STATE \ - GLFW_WGL_CONTEXT_STATE \ - GLFW_NSGL_CONTEXT_STATE \ - GLFW_GLX_CONTEXT_STATE - -#define GLFW_PLATFORM_LIBRARY_CONTEXT_STATE \ - GLFW_WGL_LIBRARY_CONTEXT_STATE \ - GLFW_NSGL_LIBRARY_CONTEXT_STATE \ - GLFW_GLX_LIBRARY_CONTEXT_STATE - -#if defined(_WIN32) -#define GLFW_BUILD_WIN32_THREAD -#else -#define GLFW_BUILD_POSIX_THREAD -#endif - -#if defined(GLFW_BUILD_WIN32_THREAD) -#include "win32_thread.h" - #define GLFW_PLATFORM_TLS_STATE GLFW_WIN32_TLS_STATE - #define GLFW_PLATFORM_MUTEX_STATE GLFW_WIN32_MUTEX_STATE -#elif defined(GLFW_BUILD_POSIX_THREAD) -#include "posix_thread.h" -#define GLFW_PLATFORM_TLS_STATE GLFW_POSIX_TLS_STATE -#define GLFW_PLATFORM_MUTEX_STATE GLFW_POSIX_MUTEX_STATE -#endif - -#if defined(_WIN32) -#define GLFW_BUILD_WIN32_TIMER -#elif defined(__APPLE__) -#define GLFW_BUILD_COCOA_TIMER -#else -#define GLFW_BUILD_POSIX_TIMER -#endif - -#if defined(GLFW_BUILD_WIN32_TIMER) -#include "win32_time.h" - #define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_WIN32_LIBRARY_TIMER_STATE -#elif defined(GLFW_BUILD_COCOA_TIMER) -#include "cocoa_time.h" - #define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_COCOA_LIBRARY_TIMER_STATE -#elif defined(GLFW_BUILD_POSIX_TIMER) -#include "posix_time.h" -#define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_POSIX_LIBRARY_TIMER_STATE -#endif - -#if defined(_WIN32) -#define GLFW_BUILD_WIN32_MODULE -#else -#define GLFW_BUILD_POSIX_MODULE -#endif - -#if defined(_GLFW_WAYLAND) || defined(_GLFW_X11) -#define GLFW_BUILD_POSIX_POLL -#endif \ No newline at end of file diff --git a/FCLauncher/src/main/jni/glfw/include/posix_thread.h b/FCLauncher/src/main/jni/glfw/include/posix_thread.h deleted file mode 100644 index 035fabdb..00000000 --- a/FCLauncher/src/main/jni/glfw/include/posix_thread.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#define _GLFW_PLATFORM_TLS_STATE _GLFWtlsPOSIX posix -#define _GLFW_PLATFORM_MUTEX_STATE _GLFWmutexPOSIX posix - - -// POSIX-specific thread local storage data -// -typedef struct _GLFWtlsPOSIX -{ - GLFWbool allocated; - pthread_key_t key; - -} _GLFWtlsPOSIX; - -// POSIX-specific mutex data -// -typedef struct _GLFWmutexPOSIX -{ - GLFWbool allocated; - pthread_mutex_t handle; - -} _GLFWmutexPOSIX; - diff --git a/FCLauncher/src/main/jni/glfw/include/posix_time.h b/FCLauncher/src/main/jni/glfw/include/posix_time.h deleted file mode 100644 index 504e3aac..00000000 --- a/FCLauncher/src/main/jni/glfw/include/posix_time.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix - -#include -#include - - -// POSIX-specific global timer data -// -typedef struct _GLFWtimerPOSIX -{ - GLFWbool monotonic; - uint64_t frequency; - -} _GLFWtimerPOSIX; - - -void _glfwInitTimerPOSIX(void); - diff --git a/FCLauncher/src/main/jni/glfw/init.c b/FCLauncher/src/main/jni/glfw/init.c deleted file mode 100644 index b0dc6cec..00000000 --- a/FCLauncher/src/main/jni/glfw/init.c +++ /dev/null @@ -1,294 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include -#include -#include -#include - - -// The global variables below comprise all mutable global data in GLFW -// -// Any other global variable is a bug - -// Global state shared between compilation units of GLFW -// -_GLFWlibrary _glfw = { GLFW_FALSE }; - -// These are outside of _glfw so they can be used before initialization and -// after termination -// -static _GLFWerror _glfwMainThreadError; -static GLFWerrorfun _glfwErrorCallback; -static GLFWallocator _glfwInitAllocator; -static _GLFWinitconfig _glfwInitHints = -{ - GLFW_TRUE, // hat buttons - { - GLFW_TRUE, // macOS menu bar - GLFW_TRUE // macOS bundle chdir - } -}; - -// Terminate the library -// -static void terminate(void) -{ - int i; - - memset(&_glfw.callbacks, 0, sizeof(_glfw.callbacks)); - - while (_glfw.windowListHead) - glfwDestroyWindow((GLFWwindow*) _glfw.windowListHead); - - while (_glfw.cursorListHead) - glfwDestroyCursor((GLFWcursor*) _glfw.cursorListHead); - - for (i = 0; i < _glfw.monitorCount; i++) - { - _GLFWmonitor* monitor = _glfw.monitors[i]; - if (monitor->originalRamp.size) - _glfwPlatformSetGammaRamp(monitor, &monitor->originalRamp); - _glfwFreeMonitor(monitor); - } - - free(_glfw.monitors); - _glfw.monitors = NULL; - _glfw.monitorCount = 0; - - free(_glfw.mappings); - _glfw.mappings = NULL; - _glfw.mappingCount = 0; - - _glfwTerminateVulkan(); - _glfwPlatformTerminate(); - - _glfw.initialized = GLFW_FALSE; - - while (_glfw.errorListHead) - { - _GLFWerror* error = _glfw.errorListHead; - _glfw.errorListHead = error->next; - free(error); - } - - _glfwPlatformDestroyTls(&_glfw.contextSlot); - _glfwPlatformDestroyTls(&_glfw.errorSlot); - _glfwPlatformDestroyMutex(&_glfw.errorLock); - - memset(&_glfw, 0, sizeof(_glfw)); -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -char* _glfw_strdup(const char* source) -{ - const size_t length = strlen(source); - char* result = calloc(length + 1, 1); - strcpy(result, source); - return result; -} - -float _glfw_fminf(float a, float b) -{ - if (a != a) - return b; - else if (b != b) - return a; - else if (a < b) - return a; - else - return b; -} - -float _glfw_fmaxf(float a, float b) -{ - if (a != a) - return b; - else if (b != b) - return a; - else if (a > b) - return a; - else - return b; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW event API ////// -////////////////////////////////////////////////////////////////////////// - -// Notifies shared code of an error -// -void _glfwInputError(int code, const char* format, ...) -{ - _GLFWerror* error; - char description[_GLFW_MESSAGE_SIZE]; - - if (format) - { - va_list vl; - - va_start(vl, format); - vsnprintf(description, sizeof(description), format, vl); - va_end(vl); - - description[sizeof(description) - 1] = '\0'; - } - else - { - if (code == GLFW_NOT_INITIALIZED) - strcpy(description, "The GLFW library is not initialized"); - else if (code == GLFW_NO_CURRENT_CONTEXT) - strcpy(description, "There is no current context"); - else if (code == GLFW_INVALID_ENUM) - strcpy(description, "Invalid argument for enum parameter"); - else if (code == GLFW_INVALID_VALUE) - strcpy(description, "Invalid value for parameter"); - else if (code == GLFW_OUT_OF_MEMORY) - strcpy(description, "Out of memory"); - else if (code == GLFW_API_UNAVAILABLE) - strcpy(description, "The requested API is unavailable"); - else if (code == GLFW_VERSION_UNAVAILABLE) - strcpy(description, "The requested API version is unavailable"); - else if (code == GLFW_PLATFORM_ERROR) - strcpy(description, "A platform-specific error occurred"); - else if (code == GLFW_FORMAT_UNAVAILABLE) - strcpy(description, "The requested format is unavailable"); - else if (code == GLFW_NO_WINDOW_CONTEXT) - strcpy(description, "The specified window has no context"); - else - strcpy(description, "ERROR: UNKNOWN GLFW ERROR"); - } - - if (_glfw.initialized) - { - error = _glfwPlatformGetTls(&_glfw.errorSlot); - if (!error) - { - error = calloc(1, sizeof(_GLFWerror)); - _glfwPlatformSetTls(&_glfw.errorSlot, error); - _glfwPlatformLockMutex(&_glfw.errorLock); - error->next = _glfw.errorListHead; - _glfw.errorListHead = error; - _glfwPlatformUnlockMutex(&_glfw.errorLock); - } - } - else - error = &_glfwMainThreadError; - - error->code = code; - strcpy(error->description, description); - - if (_glfwErrorCallback) - _glfwErrorCallback(code, description); -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW public API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI int glfwInit(void) -{ - if (_glfw.initialized) - return GLFW_TRUE; - - memset(&_glfw, 0, sizeof(_glfw)); - _glfw.hints.init = _glfwInitHints; - - if (!_glfwPlatformInit()) - { - terminate(); - return GLFW_FALSE; - } - - if (!_glfwPlatformCreateMutex(&_glfw.errorLock) || - !_glfwPlatformCreateTls(&_glfw.errorSlot) || - !_glfwPlatformCreateTls(&_glfw.contextSlot)) - { - terminate(); - return GLFW_FALSE; - } - - _glfwPlatformSetTls(&_glfw.errorSlot, &_glfwMainThreadError); - - _glfw.initialized = GLFW_TRUE; - _glfw.timer.offset = _glfwPlatformGetTimerValue(); - - glfwDefaultWindowHints(); - - return GLFW_TRUE; -} - -GLFWAPI void glfwTerminate(void) -{ - if (!_glfw.initialized) - return; - - terminate(); -} - -GLFWAPI void glfwInitHint(int hint, int value) -{ -} - -GLFWAPI void glfwInitAllocator(const GLFWallocator* allocator) -{ - if (allocator) - { - if (allocator->allocate && allocator->reallocate && allocator->deallocate) - _glfwInitAllocator = *allocator; - else - _glfwInputError(GLFW_INVALID_VALUE, "Missing function in allocator"); - } - else - memset(&_glfwInitAllocator, 0, sizeof(GLFWallocator)); -} - -GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev) -{ - if (major != NULL) - *major = GLFW_VERSION_MAJOR; - if (minor != NULL) - *minor = GLFW_VERSION_MINOR; - if (rev != NULL) - *rev = GLFW_VERSION_REVISION; -} - -GLFWAPI int glfwGetError(const char** description) -{ - _GLFWerror* error; - int code = GLFW_NO_ERROR; - - if (description) - *description = NULL; - - if (_glfw.initialized) - error = _glfwPlatformGetTls(&_glfw.errorSlot); - else - error = &_glfwMainThreadError; - - if (error) - { - code = error->code; - error->code = GLFW_NO_ERROR; - if (description && code) - *description = error->description; - } - - return code; -} - -GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun) -{ - _GLFW_SWAP_POINTERS(_glfwErrorCallback, cbfun); - return cbfun; -} diff --git a/FCLauncher/src/main/jni/glfw/input.c b/FCLauncher/src/main/jni/glfw/input.c deleted file mode 100644 index 3e4a7048..00000000 --- a/FCLauncher/src/main/jni/glfw/input.c +++ /dev/null @@ -1,600 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include -#include -#include -#include - -// Internal key state used for sticky keys -#define _GLFW_STICK 3 - -////////////////////////////////////////////////////////////////////////// -////// GLFW event API ////// -////////////////////////////////////////////////////////////////////////// - -// Notifies shared code of a physical key event -// -void _glfwInputKey(_GLFWwindow* window, int key, int scancode, int action, int mods) -{ - if (key >= 0 && key <= GLFW_KEY_LAST) - { - GLFWbool repeated = GLFW_FALSE; - - if (action == GLFW_RELEASE && window->keys[key] == GLFW_RELEASE) - return; - - if (action == GLFW_PRESS && window->keys[key] == GLFW_PRESS) - repeated = GLFW_TRUE; - - if (action == GLFW_RELEASE && window->stickyKeys) - window->keys[key] = _GLFW_STICK; - else - window->keys[key] = (char) action; - - if (repeated) - action = GLFW_REPEAT; - } - - if (!window->lockKeyMods) - mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK); - - if (window->callbacks.key) - window->callbacks.key((GLFWwindow*) window, key, scancode, action, mods); -} - -// Notifies shared code of a Unicode codepoint input event -// The 'plain' parameter determines whether to emit a regular character event -// -void _glfwInputChar(_GLFWwindow* window, unsigned int codepoint, int mods, GLFWbool plain) -{ - if (codepoint < 32 || (codepoint > 126 && codepoint < 160)) - return; - - if (!window->lockKeyMods) - mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK); - - if (window->callbacks.charmods) - window->callbacks.charmods((GLFWwindow*) window, codepoint, mods); - - if (plain) - { - if (window->callbacks.character) - window->callbacks.character((GLFWwindow*) window, codepoint); - } -} - -// Notifies shared code of a scroll event -// -void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset) -{ - if (window->callbacks.scroll) - window->callbacks.scroll((GLFWwindow*) window, xoffset, yoffset); -} - -// Notifies shared code of a mouse button click event -// -void _glfwInputMouseClick(_GLFWwindow* window, int button, int action, int mods) -{ - if (button < 0 || button > GLFW_MOUSE_BUTTON_LAST) - return; - - if (!window->lockKeyMods) - mods &= ~(GLFW_MOD_CAPS_LOCK | GLFW_MOD_NUM_LOCK); - - if (action == GLFW_RELEASE && window->stickyMouseButtons) - window->mouseButtons[button] = _GLFW_STICK; - else - window->mouseButtons[button] = (char) action; - - if (window->callbacks.mouseButton) - window->callbacks.mouseButton((GLFWwindow*) window, button, action, mods); -} - -// Notifies shared code of a cursor motion event -// The position is specified in content area relative screen coordinates -// -void _glfwInputCursorPos(_GLFWwindow* window, double xpos, double ypos) -{ - if (window->virtualCursorPosX == xpos && window->virtualCursorPosY == ypos) - return; - - window->virtualCursorPosX = xpos; - window->virtualCursorPosY = ypos; - - if (window->callbacks.cursorPos) - window->callbacks.cursorPos((GLFWwindow*) window, xpos, ypos); -} - -// Notifies shared code of a cursor enter/leave event -// -void _glfwInputCursorEnter(_GLFWwindow* window, GLFWbool entered) -{ - if (window->callbacks.cursorEnter) - window->callbacks.cursorEnter((GLFWwindow*) window, entered); -} - -// Notifies shared code of files or directories dropped on a window -// -void _glfwInputDrop(_GLFWwindow* window, int count, const char** paths) -{ - if (window->callbacks.drop) - window->callbacks.drop((GLFWwindow*) window, count, paths); -} - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -// Center the cursor in the content area of the specified window -// -void _glfwCenterCursorInContentArea(_GLFWwindow* window) -{ - int width, height; - - _glfwPlatformGetWindowSize(window, &width, &height); - _glfwPlatformSetCursorPos(window, width / 2.0, height / 2.0); -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW public API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI FCLinjectorfun glfwSetInjectorCallback(FCLinjectorfun cbfun) -{ - _glfwPlatformSetInjectorCallback(cbfun); - return cbfun; -} - -GLFWAPI void glfwSetHitResultType(int type) -{ - _glfwPlatformSetHitResultType(type); -} - -GLFWAPI int glfwGetInputMode(GLFWwindow* handle, int mode) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(0); - - switch (mode) - { - case GLFW_CURSOR: - return window->cursorMode; - case GLFW_STICKY_KEYS: - return window->stickyKeys; - case GLFW_STICKY_MOUSE_BUTTONS: - return window->stickyMouseButtons; - case GLFW_LOCK_KEY_MODS: - return window->lockKeyMods; - case GLFW_RAW_MOUSE_MOTION: - return window->rawMouseMotion; - } - - _glfwInputError(GLFW_INVALID_ENUM, "Invalid input mode 0x%08X", mode); - return 0; -} - -GLFWAPI void glfwSetInputMode(GLFWwindow* handle, int mode, int value) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (mode == GLFW_CURSOR) - { - if (value != GLFW_CURSOR_NORMAL && - value != GLFW_CURSOR_HIDDEN && - value != GLFW_CURSOR_DISABLED) - { - _glfwInputError(GLFW_INVALID_ENUM, - "Invalid cursor mode 0x%08X", - value); - return; - } - - if (window->cursorMode == value) - return; - - window->cursorMode = value; - - _glfwPlatformGetCursorPos(window, - &window->virtualCursorPosX, - &window->virtualCursorPosY); - _glfwPlatformSetCursorMode(window, value); - } - else if (mode == GLFW_STICKY_KEYS) - { - value = value ? GLFW_TRUE : GLFW_FALSE; - if (window->stickyKeys == value) - return; - - if (!value) - { - int i; - - // Release all sticky keys - for (i = 0; i <= GLFW_KEY_LAST; i++) - { - if (window->keys[i] == _GLFW_STICK) - window->keys[i] = GLFW_RELEASE; - } - } - - window->stickyKeys = value; - } - else if (mode == GLFW_STICKY_MOUSE_BUTTONS) - { - value = value ? GLFW_TRUE : GLFW_FALSE; - if (window->stickyMouseButtons == value) - return; - - if (!value) - { - int i; - - // Release all sticky mouse buttons - for (i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i++) - { - if (window->mouseButtons[i] == _GLFW_STICK) - window->mouseButtons[i] = GLFW_RELEASE; - } - } - - window->stickyMouseButtons = value; - } - else if (mode == GLFW_LOCK_KEY_MODS) - { - window->lockKeyMods = value ? GLFW_TRUE : GLFW_FALSE; - } - else if (mode == GLFW_RAW_MOUSE_MOTION) - { - if (!_glfwPlatformRawMouseMotionSupported()) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "Raw mouse motion is not supported on this system"); - return; - } - - value = value ? GLFW_TRUE : GLFW_FALSE; - if (window->rawMouseMotion == value) - return; - - window->rawMouseMotion = value; - _glfwPlatformSetRawMouseMotion(window, value); - } - else - _glfwInputError(GLFW_INVALID_ENUM, "Invalid input mode 0x%08X", mode); -} - -GLFWAPI int glfwRawMouseMotionSupported(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE); - return _glfwPlatformRawMouseMotionSupported(); -} - -GLFWAPI const char* glfwGetKeyName(int key, int scancode) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (key != GLFW_KEY_UNKNOWN) - { - if (key != GLFW_KEY_KP_EQUAL && - (key < GLFW_KEY_KP_0 || key > GLFW_KEY_KP_ADD) && - (key < GLFW_KEY_APOSTROPHE || key > GLFW_KEY_WORLD_2)) - { - return NULL; - } - - scancode = _glfwPlatformGetKeyScancode(key); - } - - return _glfwPlatformGetScancodeName(scancode); -} - -GLFWAPI int glfwGetKeyScancode(int key) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(-1); - - if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST) - { - _glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key); - return GLFW_RELEASE; - } - - return _glfwPlatformGetKeyScancode(key); -} - -GLFWAPI int glfwGetKey(GLFWwindow* handle, int key) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE); - - if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST) - { - _glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key); - return GLFW_RELEASE; - } - - if (window->keys[key] == _GLFW_STICK) - { - // Sticky mode: release key now - window->keys[key] = GLFW_RELEASE; - return GLFW_PRESS; - } - - return (int) window->keys[key]; -} - -GLFWAPI int glfwGetMouseButton(GLFWwindow* handle, int button) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE); - - if (button < GLFW_MOUSE_BUTTON_1 || button > GLFW_MOUSE_BUTTON_LAST) - { - _glfwInputError(GLFW_INVALID_ENUM, "Invalid mouse button %i", button); - return GLFW_RELEASE; - } - - if (window->mouseButtons[button] == _GLFW_STICK) - { - // Sticky mode: release mouse button now - window->mouseButtons[button] = GLFW_RELEASE; - return GLFW_PRESS; - } - - return (int) window->mouseButtons[button]; -} - -GLFWAPI void glfwGetCursorPos(GLFWwindow* handle, double* xpos, double* ypos) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - if (xpos) - *xpos = 0; - if (ypos) - *ypos = 0; - - _GLFW_REQUIRE_INIT(); - - if (window->cursorMode == GLFW_CURSOR_DISABLED) - { - if (xpos) - *xpos = window->virtualCursorPosX; - if (ypos) - *ypos = window->virtualCursorPosY; - } - else - _glfwPlatformGetCursorPos(window, xpos, ypos); -} - -GLFWAPI void glfwSetCursorPos(GLFWwindow* handle, double xpos, double ypos) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (xpos != xpos || xpos < -DBL_MAX || xpos > DBL_MAX || - ypos != ypos || ypos < -DBL_MAX || ypos > DBL_MAX) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid cursor position %f %f", - xpos, ypos); - return; - } - - if (!_glfwPlatformWindowFocused(window)) - return; - - if (window->cursorMode == GLFW_CURSOR_DISABLED) - { - // Only update the accumulated position if the cursor is disabled - window->virtualCursorPosX = xpos; - window->virtualCursorPosY = ypos; - } - else - { - // Update system cursor position - _glfwPlatformSetCursorPos(window, xpos, ypos); - } -} - -GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot) -{ - _GLFWcursor* cursor; - - assert(image != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - cursor = calloc(1, sizeof(_GLFWcursor)); - cursor->next = _glfw.cursorListHead; - _glfw.cursorListHead = cursor; - - if (!_glfwPlatformCreateCursor(cursor, image, xhot, yhot)) - { - glfwDestroyCursor((GLFWcursor*) cursor); - return NULL; - } - - return (GLFWcursor*) cursor; -} - -GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape) -{ - _GLFWcursor* cursor; - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (shape != GLFW_ARROW_CURSOR && - shape != GLFW_IBEAM_CURSOR && - shape != GLFW_CROSSHAIR_CURSOR && - shape != GLFW_HAND_CURSOR && - shape != GLFW_HRESIZE_CURSOR && - shape != GLFW_VRESIZE_CURSOR) - { - _glfwInputError(GLFW_INVALID_ENUM, "Invalid standard cursor 0x%08X", shape); - return NULL; - } - - cursor = calloc(1, sizeof(_GLFWcursor)); - cursor->next = _glfw.cursorListHead; - _glfw.cursorListHead = cursor; - - if (!_glfwPlatformCreateStandardCursor(cursor, shape)) - { - glfwDestroyCursor((GLFWcursor*) cursor); - return NULL; - } - - return (GLFWcursor*) cursor; -} - -GLFWAPI void glfwDestroyCursor(GLFWcursor *handle) {} - -GLFWAPI void glfwSetCursor(GLFWwindow* windowHandle, GLFWcursor* cursorHandle) {} - -GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow* handle, GLFWkeyfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.key, cbfun); - return cbfun; -} - -GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow* handle, GLFWcharfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.character, cbfun); - return cbfun; -} - -GLFWAPI GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* handle, GLFWcharmodsfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.charmods, cbfun); - return cbfun; -} - -GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow* handle, - GLFWmousebuttonfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.mouseButton, cbfun); - return cbfun; -} - -GLFWAPI GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow* handle, - GLFWcursorposfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.cursorPos, cbfun); - return cbfun; -} - -GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow* handle, - GLFWcursorenterfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.cursorEnter, cbfun); - return cbfun; -} - -GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow* handle, - GLFWscrollfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.scroll, cbfun); - return cbfun; -} - -GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow* handle, GLFWdropfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.drop, cbfun); - return cbfun; -} - -GLFWAPI void glfwSetClipboardString(GLFWwindow* handle, const char* string) -{ - assert(string != NULL); - - _GLFW_REQUIRE_INIT(); - _glfwPlatformSetClipboardString(string); -} - -GLFWAPI const char* glfwGetClipboardString(GLFWwindow* handle) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return _glfwPlatformGetClipboardString(); -} - -GLFWAPI double glfwGetTime(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(0.0); - return (double) (_glfwPlatformGetTimerValue() - _glfw.timer.offset) / - _glfwPlatformGetTimerFrequency(); -} - -GLFWAPI void glfwSetTime(double time) -{ - _GLFW_REQUIRE_INIT(); - - if (time != time || time < 0.0 || time > 18446744073.0) - { - _glfwInputError(GLFW_INVALID_VALUE, "Invalid time %f", time); - return; - } - - _glfw.timer.offset = _glfwPlatformGetTimerValue() - - (uint64_t) (time * _glfwPlatformGetTimerFrequency()); -} - -GLFWAPI uint64_t glfwGetTimerValue(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(0); - return _glfwPlatformGetTimerValue(); -} - -GLFWAPI uint64_t glfwGetTimerFrequency(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(0); - return _glfwPlatformGetTimerFrequency(); -} diff --git a/FCLauncher/src/main/jni/glfw/monitor.c b/FCLauncher/src/main/jni/glfw/monitor.c deleted file mode 100644 index 4174795d..00000000 --- a/FCLauncher/src/main/jni/glfw/monitor.c +++ /dev/null @@ -1,517 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include -#include -#include -#include -#include - - -// Lexically compare video modes, used by qsort -// -static int compareVideoModes(const void* fp, const void* sp) -{ - const GLFWvidmode* fm = fp; - const GLFWvidmode* sm = sp; - const int fbpp = fm->redBits + fm->greenBits + fm->blueBits; - const int sbpp = sm->redBits + sm->greenBits + sm->blueBits; - const int farea = fm->width * fm->height; - const int sarea = sm->width * sm->height; - - // First sort on color bits per pixel - if (fbpp != sbpp) - return fbpp - sbpp; - - // Then sort on screen area - if (farea != sarea) - return farea - sarea; - - // Then sort on width - if (fm->width != sm->width) - return fm->width - sm->width; - - // Lastly sort on refresh rate - return fm->refreshRate - sm->refreshRate; -} - -// Retrieves the available modes for the specified monitor -// -static GLFWbool refreshVideoModes(_GLFWmonitor* monitor) -{ - int modeCount; - GLFWvidmode* modes; - - if (monitor->modes) - return GLFW_TRUE; - - modes = _glfwPlatformGetVideoModes(monitor, &modeCount); - if (!modes) - return GLFW_FALSE; - - qsort(modes, modeCount, sizeof(GLFWvidmode), compareVideoModes); - - free(monitor->modes); - monitor->modes = modes; - monitor->modeCount = modeCount; - - return GLFW_TRUE; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW event API ////// -////////////////////////////////////////////////////////////////////////// - -// Notifies shared code of a monitor connection or disconnection -// -void _glfwInputMonitor(_GLFWmonitor* monitor, int action, int placement) -{ - if (action == GLFW_CONNECTED) - { - _glfw.monitorCount++; - _glfw.monitors = - realloc(_glfw.monitors, sizeof(_GLFWmonitor*) * _glfw.monitorCount); - - if (placement == _GLFW_INSERT_FIRST) - { - memmove(_glfw.monitors + 1, - _glfw.monitors, - ((size_t) _glfw.monitorCount - 1) * sizeof(_GLFWmonitor*)); - _glfw.monitors[0] = monitor; - } - else - _glfw.monitors[_glfw.monitorCount - 1] = monitor; - } - else if (action == GLFW_DISCONNECTED) - { - int i; - _GLFWwindow* window; - - for (window = _glfw.windowListHead; window; window = window->next) - { - if (window->monitor == monitor) - { - int width, height, xoff, yoff; - _glfwPlatformGetWindowSize(window, &width, &height); - _glfwPlatformSetWindowMonitor(window, NULL, 0, 0, width, height, 0); - _glfwPlatformGetWindowFrameSize(window, &xoff, &yoff, NULL, NULL); - _glfwPlatformSetWindowPos(window, xoff, yoff); - } - } - - for (i = 0; i < _glfw.monitorCount; i++) - { - if (_glfw.monitors[i] == monitor) - { - _glfw.monitorCount--; - memmove(_glfw.monitors + i, - _glfw.monitors + i + 1, - ((size_t) _glfw.monitorCount - i) * sizeof(_GLFWmonitor*)); - break; - } - } - } - - if (_glfw.callbacks.monitor) - _glfw.callbacks.monitor((GLFWmonitor*) monitor, action); - - if (action == GLFW_DISCONNECTED) - _glfwFreeMonitor(monitor); -} - -// Notifies shared code that a full screen window has acquired or released -// a monitor -// -void _glfwInputMonitorWindow(_GLFWmonitor* monitor, _GLFWwindow* window) -{ - monitor->window = window; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -// Allocates and returns a monitor object with the specified name and dimensions -// -_GLFWmonitor* _glfwAllocMonitor(const char* name, int widthMM, int heightMM) -{ - _GLFWmonitor* monitor = calloc(1, sizeof(_GLFWmonitor)); - monitor->widthMM = widthMM; - monitor->heightMM = heightMM; - - strncpy(monitor->name, name, sizeof(monitor->name) - 1); - - return monitor; -} - -// Frees a monitor object and any data associated with it -// -void _glfwFreeMonitor(_GLFWmonitor* monitor) -{ - if (monitor == NULL) - return; - - _glfwPlatformFreeMonitor(monitor); - - _glfwFreeGammaArrays(&monitor->originalRamp); - _glfwFreeGammaArrays(&monitor->currentRamp); - - free(monitor->modes); - free(monitor); -} - -// Allocates red, green and blue value arrays of the specified size -// -void _glfwAllocGammaArrays(GLFWgammaramp* ramp, unsigned int size) -{ - ramp->red = calloc(size, sizeof(unsigned short)); - ramp->green = calloc(size, sizeof(unsigned short)); - ramp->blue = calloc(size, sizeof(unsigned short)); - ramp->size = size; -} - -// Frees the red, green and blue value arrays and clears the struct -// -void _glfwFreeGammaArrays(GLFWgammaramp* ramp) -{ - free(ramp->red); - free(ramp->green); - free(ramp->blue); - - memset(ramp, 0, sizeof(GLFWgammaramp)); -} - -// Chooses the video mode most closely matching the desired one -// -const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor, - const GLFWvidmode* desired) -{ - int i; - unsigned int sizeDiff, leastSizeDiff = UINT_MAX; - unsigned int rateDiff, leastRateDiff = UINT_MAX; - unsigned int colorDiff, leastColorDiff = UINT_MAX; - const GLFWvidmode* current; - const GLFWvidmode* closest = NULL; - - if (!refreshVideoModes(monitor)) - return NULL; - - for (i = 0; i < monitor->modeCount; i++) - { - current = monitor->modes + i; - - colorDiff = 0; - - if (desired->redBits != GLFW_DONT_CARE) - colorDiff += abs(current->redBits - desired->redBits); - if (desired->greenBits != GLFW_DONT_CARE) - colorDiff += abs(current->greenBits - desired->greenBits); - if (desired->blueBits != GLFW_DONT_CARE) - colorDiff += abs(current->blueBits - desired->blueBits); - - sizeDiff = abs((current->width - desired->width) * - (current->width - desired->width) + - (current->height - desired->height) * - (current->height - desired->height)); - - if (desired->refreshRate != GLFW_DONT_CARE) - rateDiff = abs(current->refreshRate - desired->refreshRate); - else - rateDiff = UINT_MAX - current->refreshRate; - - if ((colorDiff < leastColorDiff) || - (colorDiff == leastColorDiff && sizeDiff < leastSizeDiff) || - (colorDiff == leastColorDiff && sizeDiff == leastSizeDiff && rateDiff < leastRateDiff)) - { - closest = current; - leastSizeDiff = sizeDiff; - leastRateDiff = rateDiff; - leastColorDiff = colorDiff; - } - } - - return closest; -} - -// Performs lexical comparison between two @ref GLFWvidmode structures -// -int _glfwCompareVideoModes(const GLFWvidmode* fm, const GLFWvidmode* sm) -{ - return compareVideoModes(fm, sm); -} - -// Splits a color depth into red, green and blue bit depths -// -void _glfwSplitBPP(int bpp, int* red, int* green, int* blue) -{ - int delta; - - // We assume that by 32 the user really meant 24 - if (bpp == 32) - bpp = 24; - - // Convert "bits per pixel" to red, green & blue sizes - - *red = *green = *blue = bpp / 3; - delta = bpp - (*red * 3); - if (delta >= 1) - *green = *green + 1; - - if (delta == 2) - *red = *red + 1; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW public API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI GLFWmonitor** glfwGetMonitors(int* count) -{ - assert(count != NULL); - - *count = 0; - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - *count = _glfw.monitorCount; - return (GLFWmonitor**) _glfw.monitors; -} - -GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (!_glfw.monitorCount) - return NULL; - - return (GLFWmonitor*) _glfw.monitors[0]; -} - -GLFWAPI void glfwGetMonitorPos(GLFWmonitor* handle, int* xpos, int* ypos) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - if (xpos) - *xpos = 0; - if (ypos) - *ypos = 0; - - _GLFW_REQUIRE_INIT(); - - _glfwPlatformGetMonitorPos(monitor, xpos, ypos); -} - -GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* handle, - int* xpos, int* ypos, - int* width, int* height) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - if (xpos) - *xpos = 0; - if (ypos) - *ypos = 0; - if (width) - *width = 0; - if (height) - *height = 0; - - _GLFW_REQUIRE_INIT(); - - _glfwPlatformGetMonitorWorkarea(monitor, xpos, ypos, width, height); -} - -GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* handle, int* widthMM, int* heightMM) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - if (widthMM) - *widthMM = 0; - if (heightMM) - *heightMM = 0; - - _GLFW_REQUIRE_INIT(); - - if (widthMM) - *widthMM = monitor->widthMM; - if (heightMM) - *heightMM = monitor->heightMM; -} - -GLFWAPI void glfwGetMonitorContentScale(GLFWmonitor* handle, - float* xscale, float* yscale) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - if (xscale) - *xscale = 0.f; - if (yscale) - *yscale = 0.f; - - _GLFW_REQUIRE_INIT(); - _glfwPlatformGetMonitorContentScale(monitor, xscale, yscale); -} - -GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* handle) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return monitor->name; -} - -GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* handle, void* pointer) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - _GLFW_REQUIRE_INIT(); - monitor->userPointer = pointer; -} - -GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* handle) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return monitor->userPointer; -} - -GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(_glfw.callbacks.monitor, cbfun); - return cbfun; -} - -GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor* handle, int* count) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - assert(count != NULL); - - *count = 0; - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (!refreshVideoModes(monitor)) - return NULL; - - *count = monitor->modeCount; - return monitor->modes; -} - -GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* handle) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - _glfwPlatformGetVideoMode(monitor, &monitor->currentMode); - return &monitor->currentMode; -} - -GLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma) -{ - unsigned int i; - unsigned short* values; - GLFWgammaramp ramp; - const GLFWgammaramp* original; - assert(handle != NULL); - assert(gamma > 0.f); - assert(gamma <= FLT_MAX); - - _GLFW_REQUIRE_INIT(); - - if (gamma != gamma || gamma <= 0.f || gamma > FLT_MAX) - { - _glfwInputError(GLFW_INVALID_VALUE, "Invalid gamma value %f", gamma); - return; - } - - original = glfwGetGammaRamp(handle); - if (!original) - return; - - values = calloc(original->size, sizeof(unsigned short)); - - for (i = 0; i < original->size; i++) - { - float value; - - // Calculate intensity - value = i / (float) (original->size - 1); - // Apply gamma curve - value = powf(value, 1.f / gamma) * 65535.f + 0.5f; - // Clamp to value range - value = _glfw_fminf(value, 65535.f); - - values[i] = (unsigned short) value; - } - - ramp.red = values; - ramp.green = values; - ramp.blue = values; - ramp.size = original->size; - - glfwSetGammaRamp(handle, &ramp); - free(values); -} - -GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* handle) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - _glfwFreeGammaArrays(&monitor->currentRamp); - if (!_glfwPlatformGetGammaRamp(monitor, &monitor->currentRamp)) - return NULL; - - return &monitor->currentRamp; -} - -GLFWAPI void glfwSetGammaRamp(GLFWmonitor* handle, const GLFWgammaramp* ramp) -{ - _GLFWmonitor* monitor = (_GLFWmonitor*) handle; - assert(monitor != NULL); - assert(ramp != NULL); - assert(ramp->size > 0); - assert(ramp->red != NULL); - assert(ramp->green != NULL); - assert(ramp->blue != NULL); - - if (ramp->size <= 0) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid gamma ramp size %i", - ramp->size); - return; - } - - _GLFW_REQUIRE_INIT(); - - if (!monitor->originalRamp.size) - { - if (!_glfwPlatformGetGammaRamp(monitor, &monitor->originalRamp)) - return; - } - - _glfwPlatformSetGammaRamp(monitor, ramp); -} - diff --git a/FCLauncher/src/main/jni/glfw/osmesa_context.c b/FCLauncher/src/main/jni/glfw/osmesa_context.c deleted file mode 100644 index 41b1eeaa..00000000 --- a/FCLauncher/src/main/jni/glfw/osmesa_context.c +++ /dev/null @@ -1,471 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include -#include -#include - -#include -#include -#include -#include - -int (*vtest_main) (int argc, char** argv); -void (*vtest_swap_buffers) (void); - -ANativeWindow_Buffer buf; -int32_t stride; - -#ifndef FCL_NSBYPASS_H -#define FCL_NSBYPASS_H - -void* load_turnip_vulkan(); - -#endif - -void* makeContextCurrentEGL(void* win) { - _GLFWwindow* window = win; - if (!eglMakeCurrent(_glfw.egl.display, - window->context.egl.handle == 0 ? (EGLSurface *) 0 : window->context.egl.surface, - window->context.egl.handle == 0 ? (EGLSurface *) 0 : window->context.egl.surface, - window->context.egl.handle)) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "EGL: Failed to make context current: %04x", - eglGetError()); - } - - if (strcmp(getenv("LIBGL_STRING"), "VirGLRenderer") == 0) { - vtest_main(3, (const char*[]) {"vtest", "--no-loop-or-fork", "--use-gles", NULL, NULL}); - } -} - -static void makeContextCurrentOSMesa(_GLFWwindow* window) -{ - if (window) - { - int width, height; - _glfwPlatformGetFramebufferSize(window, &width, &height); - - // Check to see if we need to allocate a new buffer - if ((window->context.osmesa.buffer == NULL) || - (width != window->context.osmesa.width) || - (height != window->context.osmesa.height)) - { - free(window->context.osmesa.buffer); - - // Allocate the new buffer (width * height * 8-bit RGBA) - window->context.osmesa.buffer = calloc(4, (size_t) width * height); - window->context.osmesa.width = width; - window->context.osmesa.height = height; - } - - if (!OSMesaMakeCurrent(window->context.osmesa.handle, - window->context.osmesa.buffer, - GL_UNSIGNED_BYTE, - width, height)) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "OSMesa: Failed to make context current"); - return; - } - - if (strcmp(getenv("LIBGL_STRING"), "VirGLRenderer") != 0) { - ANativeWindow_lock(window->fcl.handle, &buf, NULL); - OSMesaPixelStore(OSMESA_ROW_LENGTH, buf.stride); - stride = buf.stride; - OSMesaPixelStore(OSMESA_Y_UP, 0); - } - - window->context.Clear = (PFNGLCLEAR) window->context.getProcAddress("glClear"); - window->context.ClearColor = (PFNGLCLEARCOLOR) window->context.getProcAddress("glClearColor"); - window->context.ReadPixels = (PFNGLREADPIXELS) window->context.getProcAddress("glReadPixels"); - window->context.Finish = (PFNGLFINISH) window->context.getProcAddress("glFinish"); - if (!window->context.Clear || !window->context.ClearColor || !window->context.ReadPixels || !window->context.Finish) { - _glfwInputError(GLFW_PLATFORM_ERROR, "Entry point retrieval is broken"); - return; - } - - window->context.Clear(GL_COLOR_BUFFER_BIT); - window->context.ClearColor(0.4f, 0.4f, 0.4f, 1.0f); - - int pixelsArr[4]; - window->context.ReadPixels(0, 0, 1, 1, GL_RGB, GL_INT, &pixelsArr); - - window->context.swapBuffers(window); - } - - _glfwPlatformSetTls(&_glfw.contextSlot, window); -} - -static GLFWglproc getProcAddressOSMesa(const char* procname) -{ - return (GLFWglproc) OSMesaGetProcAddress(procname); -} - -static void destroyContextOSMesa(_GLFWwindow* window) -{ - if (window->context.osmesa.handle) - { - OSMesaDestroyContext(window->context.osmesa.handle); - window->context.osmesa.handle = NULL; - } - - if (window->context.osmesa.buffer) - { - free(window->context.osmesa.buffer); - window->context.osmesa.width = 0; - window->context.osmesa.height = 0; - } -} - -static void swapBuffersOSMesa(_GLFWwindow* window) -{ - if (strcmp(getenv("LIBGL_STRING"), "VirGLRenderer") == 0) { - window->context.Finish(); - vtest_swap_buffers(); - } else { - OSMesaContext context = OSMesaGetCurrentContext(); - if (context == NULL) { - printf("OSMesa: attempted to swap buffers without context!"); - return; - } - OSMesaMakeCurrent(context, buf.bits, GL_UNSIGNED_BYTE, buf.width, buf.height); - if (stride != buf.stride) OSMesaPixelStore(OSMESA_ROW_LENGTH, buf.stride); - stride = buf.stride; - window->context.Finish(); - ANativeWindow_unlockAndPost(window->fcl.handle); - ANativeWindow_lock(window->fcl.handle, &buf, NULL); - } -} - -static void swapIntervalOSMesa(int interval) -{ - if (strcmp(getenv("LIBGL_STRING"), "VirGLRenderer") == 0) { - eglSwapInterval(_glfw.egl.display, interval); - } -} - -static int extensionSupportedOSMesa(const char* extension) -{ - // OSMesa does not have extensions - return GLFW_FALSE; -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -static void set_vulkan_ptr(void* ptr) { - char envval[64]; - sprintf(envval, "%"PRIxPTR, (uintptr_t)ptr); - setenv("VULKAN_PTR", envval, 1); -} - -void load_vulkan() { - if(getenv("VULKAN_DRIVER_SYSTEM") == NULL && android_get_device_api_level() >= 28) { -#ifdef ADRENO_POSSIBLE - void* result = load_turnip_vulkan(); - if(result != NULL) { - printf("AdrenoSupp: Loaded Turnip, loader address: %p\n", result); - set_vulkan_ptr(result); - return; - } -#endif - } - printf("OSMDroid: loading vulkan regularly...\n"); - void* vulkan_ptr = dlopen("libvulkan.so", RTLD_LAZY | RTLD_LOCAL); - printf("OSMDroid: loaded vulkan, ptr=%p\n", vulkan_ptr); - set_vulkan_ptr(vulkan_ptr); -} - -GLFWbool _glfwInitOSMesa(void) -{ - if (_glfw.osmesa.handle) - return GLFW_TRUE; - - _glfw.osmesa.handle = _glfw_dlopen(getenv("LIBGL_NAME")); - - const char *renderer = getenv("LIBGL_STRING"); - - if (strcmp(renderer, "Zink") == 0) - load_vulkan(); - - if (!_glfw.osmesa.handle) - { - _glfwInputError(GLFW_API_UNAVAILABLE, "OSMesa: Library not found"); - return GLFW_FALSE; - } - - _glfw.osmesa.CreateContext = (PFN_OSMesaCreateContext) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaCreateContext"); - _glfw.osmesa.GetCurrentContext = (PFN_OSMesaGetCurrentContext) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaGetCurrentContext"); - _glfw.osmesa.DestroyContext = (PFN_OSMesaDestroyContext) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaDestroyContext"); - _glfw.osmesa.PixelStore = (PFN_OSMesaPixelStore) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaPixelStore"); - _glfw.osmesa.MakeCurrent = (PFN_OSMesaMakeCurrent) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaMakeCurrent"); - _glfw.osmesa.GetColorBuffer = (PFN_OSMesaGetColorBuffer) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaGetColorBuffer"); - _glfw.osmesa.GetDepthBuffer = (PFN_OSMesaGetDepthBuffer) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaGetDepthBuffer"); - _glfw.osmesa.GetProcAddress = (PFN_OSMesaGetProcAddress) - _glfw_dlsym(_glfw.osmesa.handle, "OSMesaGetProcAddress"); - - if (strcmp(renderer, "VirGLRenderer") == 0) { - char* fileName = calloc(1, 1024); - sprintf(fileName, "%s/libvirgl_test_server.so", getenv("FCL_NATIVEDIR")); - void *handle = _glfw_dlopen(fileName); - if (!handle) { - printf("VirGL: %s\n", dlerror()); - return GLFW_FALSE; - } - vtest_main = _glfw_dlsym(handle, "vtest_main"); - vtest_swap_buffers = _glfw_dlsym(handle, "vtest_swap_buffers"); - free(fileName); - if (!vtest_main || !vtest_swap_buffers) { - _glfwInputError(GLFW_PLATFORM_ERROR, "OSMesa: Failed to load required entry points"); - _glfwTerminateOSMesa(); - return GLFW_FALSE; - } - } - - if (!_glfw.osmesa.CreateContext || - !_glfw.osmesa.GetCurrentContext || - !_glfw.osmesa.DestroyContext || - !_glfw.osmesa.PixelStore || - !_glfw.osmesa.MakeCurrent || - !_glfw.osmesa.GetColorBuffer || - !_glfw.osmesa.GetDepthBuffer || - !_glfw.osmesa.GetProcAddress) - { - _glfwInputError(GLFW_PLATFORM_ERROR, "OSMesa: Failed to load required entry points"); - _glfwTerminateOSMesa(); - return GLFW_FALSE; - } - - return GLFW_TRUE; -} - -void _glfwTerminateOSMesa(void) -{ - if (_glfw.osmesa.handle) - { - _glfw_dlclose(_glfw.osmesa.handle); - _glfw.osmesa.handle = NULL; - } -} - -#define setAttrib(a, v) \ -{ \ - assert(((size_t) index + 1) < sizeof(attribs) / sizeof(attribs[0])); \ - attribs[index++] = a; \ - attribs[index++] = v; \ -} - -GLFWbool _glfwCreateContextOSMesa(_GLFWwindow* window, - const _GLFWctxconfig* ctxconfig, - const _GLFWfbconfig* fbconfig) -{ - const char *renderer = getenv("LIBGL_STRING"); - if (strcmp(renderer, "VirGLRenderer") == 0) { - EGLConfig config = malloc(sizeof(EGLConfig)); - EGLint egl_attributes[] = { - EGL_BLUE_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_RED_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_DEPTH_SIZE, 24, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT|0x0001, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - EGL_NONE - }; - - EGLint num_configs = 0; - EGLint vid; - - if (eglChooseConfig(_glfw.egl.display, egl_attributes, &config, 1, &num_configs) != GLFW_TRUE) { - _glfwInputError(GLFW_API_UNAVAILABLE, "eglChooseConfig() failed: %04x", - eglGetError()); - return GLFW_FALSE; - } - - if (num_configs == 0) { - _glfwInputError(GLFW_API_UNAVAILABLE, "%s", - "eglChooseConfig() found no matching config"); - return GLFW_FALSE; - } - - if (eglGetConfigAttrib(_glfw.egl.display, config, EGL_NATIVE_VISUAL_ID, &vid) != GLFW_TRUE) { - _glfwInputError(GLFW_API_UNAVAILABLE, "eglGetConfigAttrib() failed: %04x", - eglGetError()); - return GLFW_FALSE; - } - - ANativeWindow_setBuffersGeometry(window->fcl.handle, 0, 0, vid); - - eglBindAPI(EGL_OPENGL_ES_API); - - window->context.egl.surface = eglCreateWindowSurface(_glfw.egl.display, - config, - _GLFW_EGL_NATIVE_WINDOW, - NULL); - if (window->context.egl.surface == EGL_NO_SURFACE) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "EGL: Failed to create window surface: %04x", - eglGetError()); - return GLFW_FALSE; - } - window->context.egl.config = config; - - { - EGLint val; - assert(eglGetConfigAttrib(_glfw.egl.display, config, EGL_SURFACE_TYPE, &val)); - assert(val & EGL_WINDOW_BIT); - } - - const EGLint virgl_context_attrib[] = { - EGL_CONTEXT_CLIENT_VERSION, 3, - EGL_NONE - }; - window->context.egl.handle = eglCreateContext(_glfw.egl.display, config, NULL, virgl_context_attrib); - - if (window->context.egl.handle == EGL_NO_CONTEXT) - { - _glfwInputError(GLFW_VERSION_UNAVAILABLE, - "EGL: Failed to create context: %04x", - eglGetError()); - return GLFW_FALSE; - } - - pthread_t t; - pthread_create(&t, NULL, makeContextCurrentEGL, (void*) window); - usleep(100 * 1000); - } - - OSMesaContext share = NULL; - - if (ctxconfig->client == GLFW_OPENGL_ES_API) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "OSMesa: OpenGL ES is not available on OSMesa"); - return GLFW_FALSE; - } - - if (ctxconfig->share) - share = ctxconfig->share->context.osmesa.handle; - - window->context.osmesa.handle = OSMesaCreateContext(OSMESA_RGBA, share); - - if (window->context.osmesa.handle == NULL) - { - _glfwInputError(GLFW_VERSION_UNAVAILABLE, - "OSMesa: Failed to create context"); - return GLFW_FALSE; - } - - window->context.makeCurrent = makeContextCurrentOSMesa; - window->context.swapBuffers = swapBuffersOSMesa; - window->context.swapInterval = swapIntervalOSMesa; - window->context.extensionSupported = extensionSupportedOSMesa; - window->context.getProcAddress = getProcAddressOSMesa; - window->context.destroy = destroyContextOSMesa; - - return GLFW_TRUE; -} - -#undef setAttrib - - -////////////////////////////////////////////////////////////////////////// -////// GLFW native API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* handle, int* width, - int* height, int* format, void** buffer) -{ - void* mesaBuffer; - GLint mesaWidth, mesaHeight, mesaFormat; - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE); - - if (!OSMesaGetColorBuffer(window->context.osmesa.handle, - &mesaWidth, &mesaHeight, - &mesaFormat, &mesaBuffer)) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "OSMesa: Failed to retrieve color buffer"); - return GLFW_FALSE; - } - - if (width) - *width = mesaWidth; - if (height) - *height = mesaHeight; - if (format) - *format = mesaFormat; - if (buffer) - *buffer = mesaBuffer; - - return GLFW_TRUE; -} - -GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* handle, - int* width, int* height, - int* bytesPerValue, - void** buffer) -{ - void* mesaBuffer; - GLint mesaWidth, mesaHeight, mesaBytes; - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE); - - if (!OSMesaGetDepthBuffer(window->context.osmesa.handle, - &mesaWidth, &mesaHeight, - &mesaBytes, &mesaBuffer)) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "OSMesa: Failed to retrieve depth buffer"); - return GLFW_FALSE; - } - - if (width) - *width = mesaWidth; - if (height) - *height = mesaHeight; - if (bytesPerValue) - *bytesPerValue = mesaBytes; - if (buffer) - *buffer = mesaBuffer; - - return GLFW_TRUE; -} - -GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (window->context.client == GLFW_NO_API) - { - _glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL); - return NULL; - } - - return window->context.osmesa.handle; -} - -JNIEXPORT jlong JNICALL -Java_org_lwjgl_vulkan_VK_getVulkanDriverHandle(JNIEnv *env, jclass thiz) { - if (getenv("VULKAN_PTR") == NULL) load_vulkan(); - return strtoul(getenv("VULKAN_PTR"), NULL, 0x10); -} diff --git a/FCLauncher/src/main/jni/glfw/platform.c b/FCLauncher/src/main/jni/glfw/platform.c deleted file mode 100644 index 15515c19..00000000 --- a/FCLauncher/src/main/jni/glfw/platform.c +++ /dev/null @@ -1,169 +0,0 @@ -//======================================================================== -// GLFW 3.4 - www.glfw.org -//------------------------------------------------------------------------ -// Copyright (c) 2002-2006 Marcus Geelnard -// Copyright (c) 2006-2018 Camilla Löwy -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would -// be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not -// be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source -// distribution. -// -//======================================================================== -// Please use C89 style variable declarations in this file because VS 2010 -//======================================================================== - -#include - -// These construct a string literal from individual numeric constants -#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r -#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r) - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -int GLFW_ANY_PLATFORM = 0x60000, - GLFW_PLATFORM_WIN32 = 0x60001, - GLFW_PLATFORM_COCOA = 0x60002, - GLFW_PLATFORM_WAYLAND = 0x60003, - GLFW_PLATFORM_X11 = 0x60004, - GLFW_PLATFORM_NULL = 0x60005; - -/* -static const struct -{ - int ID; - GLFWbool (*connect)(int,_GLFWplatform*); -} supportedPlatforms[] = - { -#if defined(_GLFW_WIN32) - { GLFW_PLATFORM_WIN32, _glfwConnectWin32 }, -#endif -#if defined(_GLFW_COCOA) - { GLFW_PLATFORM_COCOA, _glfwConnectCocoa }, -#endif -#if defined(_GLFW_X11) - { GLFW_PLATFORM_X11, _glfwConnectX11 }, -#endif -#if defined(_GLFW_WAYLAND) - { GLFW_PLATFORM_WAYLAND, _glfwConnectWayland }, -#endif - }; - -GLFWbool _glfwSelectPlatform(int desiredID, _GLFWplatform* platform) -{ - const size_t count = sizeof(supportedPlatforms) / sizeof(supportedPlatforms[0]); - size_t i; - - if (desiredID != GLFW_ANY_PLATFORM && - desiredID != GLFW_PLATFORM_WIN32 && - desiredID != GLFW_PLATFORM_COCOA && - desiredID != GLFW_PLATFORM_WAYLAND && - desiredID != GLFW_PLATFORM_X11 && - desiredID != GLFW_PLATFORM_NULL) - { - _glfwInputError(GLFW_INVALID_ENUM, "Invalid platform ID 0x%08X", desiredID); - return GLFW_FALSE; - } - - // Only allow the Null platform if specifically requested - if (desiredID == GLFW_PLATFORM_NULL) - return _glfwConnectNull(desiredID, platform); - else if (count == 0) - { - _glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "This binary only supports the Null platform"); - return GLFW_FALSE; - } - - if (desiredID == GLFW_ANY_PLATFORM) - { - // If there is exactly one platform available for auto-selection, let it emit the - // error on failure as the platform-specific error description may be more helpful - if (count == 1) - return supportedPlatforms[0].connect(supportedPlatforms[0].ID, platform); - - for (i = 0; i < count; i++) - { - if (supportedPlatforms[i].connect(desiredID, platform)) - return GLFW_TRUE; - } - - _glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "Failed to detect any supported platform"); - } - else - { - for (i = 0; i < count; i++) - { - if (supportedPlatforms[i].ID == desiredID) - return supportedPlatforms[i].connect(desiredID, platform); - } - - _glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "The requested platform is not supported"); - } - - return GLFW_FALSE; -} - */ - -////////////////////////////////////////////////////////////////////////// -////// GLFW public API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI int glfwGetPlatform(void) -{ - /* - _GLFW_REQUIRE_INIT_OR_RETURN(0); - return _glfw.platform.platformID; - */ - return GLFW_PLATFORM_X11; -} - -GLFWAPI int glfwPlatformSupported(int platformID) -{ - /* - const size_t count = sizeof(supportedPlatforms) / sizeof(supportedPlatforms[0]); - size_t i; - - if (platformID != GLFW_PLATFORM_WIN32 && - platformID != GLFW_PLATFORM_COCOA && - platformID != GLFW_PLATFORM_WAYLAND && - platformID != GLFW_PLATFORM_X11 && - platformID != GLFW_PLATFORM_NULL) - { - _glfwInputError(GLFW_INVALID_ENUM, "Invalid platform ID 0x%08X", platformID); - return GLFW_FALSE; - } - - if (platformID == GLFW_PLATFORM_NULL) - return GLFW_TRUE; - - for (i = 0; i < count; i++) - { - if (platformID == supportedPlatforms[i].ID) - return GLFW_TRUE; - } - - return GLFW_FALSE; - */ - return GLFW_TRUE; -} - -GLFWAPI const char* glfwGetVersionString(void) -{ - return _glfwPlatformGetVersionString(); -} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/glfw/posix_thread.c b/FCLauncher/src/main/jni/glfw/posix_thread.c deleted file mode 100644 index 29bb84df..00000000 --- a/FCLauncher/src/main/jni/glfw/posix_thread.c +++ /dev/null @@ -1,80 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include - - -////////////////////////////////////////////////////////////////////////// -////// GLFW platform API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWbool _glfwPlatformCreateTls(_GLFWtls* tls) -{ - assert(tls->posix.allocated == GLFW_FALSE); - - if (pthread_key_create(&tls->posix.key, NULL) != 0) - { - _glfwInputError(GLFW_PLATFORM_ERROR, - "POSIX: Failed to create context TLS"); - return GLFW_FALSE; - } - - tls->posix.allocated = GLFW_TRUE; - return GLFW_TRUE; -} - -void _glfwPlatformDestroyTls(_GLFWtls* tls) -{ - if (tls->posix.allocated) - pthread_key_delete(tls->posix.key); - memset(tls, 0, sizeof(_GLFWtls)); -} - -void* _glfwPlatformGetTls(_GLFWtls* tls) -{ - assert(tls->posix.allocated == GLFW_TRUE); - return pthread_getspecific(tls->posix.key); -} - -void _glfwPlatformSetTls(_GLFWtls* tls, void* value) -{ - assert(tls->posix.allocated == GLFW_TRUE); - pthread_setspecific(tls->posix.key, value); -} - -GLFWbool _glfwPlatformCreateMutex(_GLFWmutex* mutex) -{ - assert(mutex->posix.allocated == GLFW_FALSE); - - if (pthread_mutex_init(&mutex->posix.handle, NULL) != 0) - { - _glfwInputError(GLFW_PLATFORM_ERROR, "POSIX: Failed to create mutex"); - return GLFW_FALSE; - } - - return mutex->posix.allocated = GLFW_TRUE; -} - -void _glfwPlatformDestroyMutex(_GLFWmutex* mutex) -{ - if (mutex->posix.allocated) - pthread_mutex_destroy(&mutex->posix.handle); - memset(mutex, 0, sizeof(_GLFWmutex)); -} - -void _glfwPlatformLockMutex(_GLFWmutex* mutex) -{ - assert(mutex->posix.allocated == GLFW_TRUE); - pthread_mutex_lock(&mutex->posix.handle); -} - -void _glfwPlatformUnlockMutex(_GLFWmutex* mutex) -{ - assert(mutex->posix.allocated == GLFW_TRUE); - pthread_mutex_unlock(&mutex->posix.handle); -} - diff --git a/FCLauncher/src/main/jni/glfw/posix_time.c b/FCLauncher/src/main/jni/glfw/posix_time.c deleted file mode 100644 index c6b2fe82..00000000 --- a/FCLauncher/src/main/jni/glfw/posix_time.c +++ /dev/null @@ -1,62 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include -#include - -#include - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -// Initialise timer -// -void _glfwInitTimerPOSIX(void) -{ -#if defined(CLOCK_MONOTONIC) - struct timespec ts; - - if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) - { - _glfw.timer.posix.monotonic = GLFW_TRUE; - _glfw.timer.posix.frequency = 1000000000; - } - else -#endif - { - _glfw.timer.posix.monotonic = GLFW_FALSE; - _glfw.timer.posix.frequency = 1000000; - } -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW platform API ////// -////////////////////////////////////////////////////////////////////////// - -uint64_t _glfwPlatformGetTimerValue(void) -{ -#if defined(CLOCK_MONOTONIC) - if (_glfw.timer.posix.monotonic) - { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return (uint64_t) ts.tv_sec * (uint64_t) 1000000000 + (uint64_t) ts.tv_nsec; - } - else -#endif - { - struct timeval tv; - gettimeofday(&tv, NULL); - return (uint64_t) tv.tv_sec * (uint64_t) 1000000 + (uint64_t) tv.tv_usec; - } -} - -uint64_t _glfwPlatformGetTimerFrequency(void) -{ - return _glfw.timer.posix.frequency; -} - diff --git a/FCLauncher/src/main/jni/glfw/vulkan.c b/FCLauncher/src/main/jni/glfw/vulkan.c deleted file mode 100644 index 9e0cc026..00000000 --- a/FCLauncher/src/main/jni/glfw/vulkan.c +++ /dev/null @@ -1,312 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include -#include - -#define _GLFW_FIND_LOADER 1 -#define _GLFW_REQUIRE_LOADER 2 - - -////////////////////////////////////////////////////////////////////////// -////// GLFW internal API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWbool _glfwInitVulkan(int mode) -{ - VkResult err; - VkExtensionProperties* ep; - uint32_t i, count; - - if (_glfw.vk.available) - return GLFW_TRUE; - -#if !defined(_GLFW_VULKAN_STATIC) -#if defined(_GLFW_VULKAN_LIBRARY) - _glfw.vk.handle = _glfw_dlopen(_GLFW_VULKAN_LIBRARY); -#elif defined(_GLFW_WIN32) - _glfw.vk.handle = _glfw_dlopen("vulkan-1.dll"); -#elif defined(_GLFW_COCOA) - _glfw.vk.handle = _glfw_dlopen("libvulkan.1.dylib"); - if (!_glfw.vk.handle) - _glfw.vk.handle = _glfwLoadLocalVulkanLoaderNS(); -#elif defined(_GLFW_FCL) - _glfw.vk.handle = _glfw_dlopen("libvulkan.so"); -#else - _glfw.vk.handle = _glfw_dlopen("libvulkan.so.1"); -#endif - if (!_glfw.vk.handle) - { - if (mode == _GLFW_REQUIRE_LOADER) - _glfwInputError(GLFW_API_UNAVAILABLE, "Vulkan: Loader not found"); - - return GLFW_FALSE; - } - - _glfw.vk.GetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) - _glfw_dlsym(_glfw.vk.handle, "vkGetInstanceProcAddr"); - if (!_glfw.vk.GetInstanceProcAddr) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "Vulkan: Loader does not export vkGetInstanceProcAddr"); - - _glfwTerminateVulkan(); - return GLFW_FALSE; - } - - _glfw.vk.EnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties) - vkGetInstanceProcAddr(NULL, "vkEnumerateInstanceExtensionProperties"); - if (!_glfw.vk.EnumerateInstanceExtensionProperties) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "Vulkan: Failed to retrieve vkEnumerateInstanceExtensionProperties"); - - _glfwTerminateVulkan(); - return GLFW_FALSE; - } -#endif // _GLFW_VULKAN_STATIC - - err = vkEnumerateInstanceExtensionProperties(NULL, &count, NULL); - if (err) - { - // NOTE: This happens on systems with a loader but without any Vulkan ICD - if (mode == _GLFW_REQUIRE_LOADER) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "Vulkan: Failed to query instance extension count: %s", - _glfwGetVulkanResultString(err)); - } - - _glfwTerminateVulkan(); - return GLFW_FALSE; - } - - ep = calloc(count, sizeof(VkExtensionProperties)); - - err = vkEnumerateInstanceExtensionProperties(NULL, &count, ep); - if (err) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "Vulkan: Failed to query instance extensions: %s", - _glfwGetVulkanResultString(err)); - - free(ep); - _glfwTerminateVulkan(); - return GLFW_FALSE; - } - - for (i = 0; i < count; i++) - { - if (strcmp(ep[i].extensionName, "VK_KHR_surface") == 0) - _glfw.vk.KHR_surface = GLFW_TRUE; -#if defined(_GLFW_WIN32) - else if (strcmp(ep[i].extensionName, "VK_KHR_win32_surface") == 0) - _glfw.vk.KHR_win32_surface = GLFW_TRUE; -#elif defined(_GLFW_COCOA) - else if (strcmp(ep[i].extensionName, "VK_MVK_macos_surface") == 0) - _glfw.vk.MVK_macos_surface = GLFW_TRUE; - else if (strcmp(ep[i].extensionName, "VK_EXT_metal_surface") == 0) - _glfw.vk.EXT_metal_surface = GLFW_TRUE; -#elif defined(_GLFW_X11) - else if (strcmp(ep[i].extensionName, "VK_KHR_xlib_surface") == 0) - _glfw.vk.KHR_xlib_surface = GLFW_TRUE; - else if (strcmp(ep[i].extensionName, "VK_KHR_xcb_surface") == 0) - _glfw.vk.KHR_xcb_surface = GLFW_TRUE; -#elif defined(_GLFW_FCL) - else if (strcmp(ep[i].extensionName, "VK_KHR_android_surface") == 0) - _glfw.vk.KHR_android_surface = GLFW_TRUE; -#elif defined(_GLFW_WAYLAND) - else if (strcmp(ep[i].extensionName, "VK_KHR_wayland_surface") == 0) - _glfw.vk.KHR_wayland_surface = GLFW_TRUE; -#endif - } - - free(ep); - - _glfw.vk.available = GLFW_TRUE; - - _glfwPlatformGetRequiredInstanceExtensions(_glfw.vk.extensions); - - return GLFW_TRUE; -} - -void _glfwTerminateVulkan(void) -{ -#if !defined(_GLFW_VULKAN_STATIC) - if (_glfw.vk.handle) - _glfw_dlclose(_glfw.vk.handle); -#endif -} - -const char* _glfwGetVulkanResultString(VkResult result) -{ - switch (result) - { - case VK_SUCCESS: - return "Success"; - case VK_NOT_READY: - return "A fence or query has not yet completed"; - case VK_TIMEOUT: - return "A wait operation has not completed in the specified time"; - case VK_EVENT_SET: - return "An event is signaled"; - case VK_EVENT_RESET: - return "An event is unsignaled"; - case VK_INCOMPLETE: - return "A return array was too small for the result"; - case VK_ERROR_OUT_OF_HOST_MEMORY: - return "A host memory allocation has failed"; - case VK_ERROR_OUT_OF_DEVICE_MEMORY: - return "A device memory allocation has failed"; - case VK_ERROR_INITIALIZATION_FAILED: - return "Initialization of an object could not be completed for implementation-specific reasons"; - case VK_ERROR_DEVICE_LOST: - return "The logical or physical device has been lost"; - case VK_ERROR_MEMORY_MAP_FAILED: - return "Mapping of a memory object has failed"; - case VK_ERROR_LAYER_NOT_PRESENT: - return "A requested layer is not present or could not be loaded"; - case VK_ERROR_EXTENSION_NOT_PRESENT: - return "A requested extension is not supported"; - case VK_ERROR_FEATURE_NOT_PRESENT: - return "A requested feature is not supported"; - case VK_ERROR_INCOMPATIBLE_DRIVER: - return "The requested version of Vulkan is not supported by the driver or is otherwise incompatible"; - case VK_ERROR_TOO_MANY_OBJECTS: - return "Too many objects of the type have already been created"; - case VK_ERROR_FORMAT_NOT_SUPPORTED: - return "A requested format is not supported on this device"; - case VK_ERROR_SURFACE_LOST_KHR: - return "A surface is no longer available"; - case VK_SUBOPTIMAL_KHR: - return "A swapchain no longer matches the surface properties exactly, but can still be used"; - case VK_ERROR_OUT_OF_DATE_KHR: - return "A surface has changed in such a way that it is no longer compatible with the swapchain"; - case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR: - return "The display used by a swapchain does not use the same presentable image layout"; - case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR: - return "The requested window is already connected to a VkSurfaceKHR, or to some other non-Vulkan API"; - case VK_ERROR_VALIDATION_FAILED_EXT: - return "A validation layer found an error"; - default: - return "ERROR: UNKNOWN VULKAN ERROR"; - } -} - - -////////////////////////////////////////////////////////////////////////// -////// GLFW public API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI int glfwVulkanSupported(void) -{ - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE); - return _glfwInitVulkan(_GLFW_FIND_LOADER); -} - -GLFWAPI const char** glfwGetRequiredInstanceExtensions(uint32_t* count) -{ - assert(count != NULL); - - *count = 0; - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER)) - return NULL; - - if (!_glfw.vk.extensions[0]) - return NULL; - - *count = 2; - return (const char**) _glfw.vk.extensions; -} - -GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, - const char* procname) -{ - GLFWvkproc proc; - assert(procname != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER)) - return NULL; - - proc = (GLFWvkproc) vkGetInstanceProcAddr(instance, procname); -#if defined(_GLFW_VULKAN_STATIC) - if (!proc) - { - if (strcmp(procname, "vkGetInstanceProcAddr") == 0) - return (GLFWvkproc) vkGetInstanceProcAddr; - } -#else - if (!proc) - proc = (GLFWvkproc) _glfw_dlsym(_glfw.vk.handle, procname); -#endif - - return proc; -} - -GLFWAPI int glfwGetPhysicalDevicePresentationSupport(VkInstance instance, - VkPhysicalDevice device, - uint32_t queuefamily) -{ - assert(instance != VK_NULL_HANDLE); - assert(device != VK_NULL_HANDLE); - - _GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE); - - if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER)) - return GLFW_FALSE; - - if (!_glfw.vk.extensions[0]) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "Vulkan: Window surface creation extensions not found"); - return GLFW_FALSE; - } - - return _glfwPlatformGetPhysicalDevicePresentationSupport(instance, - device, - queuefamily); -} - -GLFWAPI VkResult glfwCreateWindowSurface(VkInstance instance, - GLFWwindow* handle, - const VkAllocationCallbacks* allocator, - VkSurfaceKHR* surface) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(instance != VK_NULL_HANDLE); - assert(window != NULL); - assert(surface != NULL); - - *surface = VK_NULL_HANDLE; - - _GLFW_REQUIRE_INIT_OR_RETURN(VK_ERROR_INITIALIZATION_FAILED); - - if (!_glfwInitVulkan(_GLFW_REQUIRE_LOADER)) - return VK_ERROR_INITIALIZATION_FAILED; - - if (!_glfw.vk.extensions[0]) - { - _glfwInputError(GLFW_API_UNAVAILABLE, - "Vulkan: Window surface creation extensions not found"); - return VK_ERROR_EXTENSION_NOT_PRESENT; - } - - if (window->context.client != GLFW_NO_API) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Vulkan: Window surface creation requires the window to have the client API set to GLFW_NO_API"); - return VK_ERROR_NATIVE_WINDOW_IN_USE_KHR; - } - - return _glfwPlatformCreateWindowSurface(instance, window, allocator, surface); -} - diff --git a/FCLauncher/src/main/jni/glfw/window.c b/FCLauncher/src/main/jni/glfw/window.c deleted file mode 100644 index 99705b25..00000000 --- a/FCLauncher/src/main/jni/glfw/window.c +++ /dev/null @@ -1,1078 +0,0 @@ -// -// Created by Tungsten on 2022/10/11. -// - -#include - -#include -#include -#include -#include - - -////////////////////////////////////////////////////////////////////////// -////// GLFW event API ////// -////////////////////////////////////////////////////////////////////////// - -// Notifies shared code that a window has lost or received input focus -// -void _glfwInputWindowFocus(_GLFWwindow* window, GLFWbool focused) -{ - if (window->callbacks.focus) - window->callbacks.focus((GLFWwindow*) window, focused); - - if (!focused) - { - int key, button; - - for (key = 0; key <= GLFW_KEY_LAST; key++) - { - if (window->keys[key] == GLFW_PRESS) - { - const int scancode = _glfwPlatformGetKeyScancode(key); - _glfwInputKey(window, key, scancode, GLFW_RELEASE, 0); - } - } - - for (button = 0; button <= GLFW_MOUSE_BUTTON_LAST; button++) - { - if (window->mouseButtons[button] == GLFW_PRESS) - _glfwInputMouseClick(window, button, GLFW_RELEASE, 0); - } - } -} - -// Notifies shared code that a window has moved -// The position is specified in content area relative screen coordinates -// -void _glfwInputWindowPos(_GLFWwindow* window, int x, int y) -{ - if (window->callbacks.pos) - window->callbacks.pos((GLFWwindow*) window, x, y); -} - -// Notifies shared code that a window has been resized -// The size is specified in screen coordinates -// -void _glfwInputWindowSize(_GLFWwindow* window, int width, int height) -{ - if (window->callbacks.size) - window->callbacks.size((GLFWwindow*) window, width, height); -} - -// Notifies shared code that a window has been iconified or restored -// -void _glfwInputWindowIconify(_GLFWwindow* window, GLFWbool iconified) -{ - if (window->callbacks.iconify) - window->callbacks.iconify((GLFWwindow*) window, iconified); -} - -// Notifies shared code that a window has been maximized or restored -// -void _glfwInputWindowMaximize(_GLFWwindow* window, GLFWbool maximized) -{ - if (window->callbacks.maximize) - window->callbacks.maximize((GLFWwindow*) window, maximized); -} - -// Notifies shared code that a window framebuffer has been resized -// The size is specified in pixels -// -void _glfwInputFramebufferSize(_GLFWwindow* window, int width, int height) -{ - if (window->callbacks.fbsize) - window->callbacks.fbsize((GLFWwindow*) window, width, height); -} - -// Notifies shared code that a window content scale has changed -// The scale is specified as the ratio between the current and default DPI -// -void _glfwInputWindowContentScale(_GLFWwindow* window, float xscale, float yscale) -{ - if (window->callbacks.scale) - window->callbacks.scale((GLFWwindow*) window, xscale, yscale); -} - -// Notifies shared code that the window contents needs updating -// -void _glfwInputWindowDamage(_GLFWwindow* window) -{ - if (window->callbacks.refresh) - window->callbacks.refresh((GLFWwindow*) window); -} - -// Notifies shared code that the user wishes to close a window -// -void _glfwInputWindowCloseRequest(_GLFWwindow* window) -{ - window->shouldClose = GLFW_TRUE; - - if (window->callbacks.close) - window->callbacks.close((GLFWwindow*) window); -} - -// Notifies shared code that a window has changed its desired monitor -// -void _glfwInputWindowMonitor(_GLFWwindow* window, _GLFWmonitor* monitor) -{ - window->monitor = monitor; -} - -////////////////////////////////////////////////////////////////////////// -////// GLFW public API ////// -////////////////////////////////////////////////////////////////////////// - -GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, - const char* title, - GLFWmonitor* monitor, - GLFWwindow* share) -{ - _GLFWfbconfig fbconfig; - _GLFWctxconfig ctxconfig; - _GLFWwndconfig wndconfig; - _GLFWwindow* window; - - assert(title != NULL); - assert(width >= 0); - assert(height >= 0); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - - if (width <= 0 || height <= 0) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid window size %ix%i", - width, height); - - return NULL; - } - - fbconfig = _glfw.hints.framebuffer; - ctxconfig = _glfw.hints.context; - wndconfig = _glfw.hints.window; - - wndconfig.width = width; - wndconfig.height = height; - wndconfig.title = title; - ctxconfig.share = (_GLFWwindow*) share; - - if (!_glfwIsValidContextConfig(&ctxconfig)) - return NULL; - - window = calloc(1, sizeof(_GLFWwindow)); - window->next = _glfw.windowListHead; - _glfw.windowListHead = window; - - window->videoMode.width = width; - window->videoMode.height = height; - window->videoMode.redBits = fbconfig.redBits; - window->videoMode.greenBits = fbconfig.greenBits; - window->videoMode.blueBits = fbconfig.blueBits; - window->videoMode.refreshRate = _glfw.hints.refreshRate; - - window->monitor = (_GLFWmonitor*) monitor; - window->resizable = wndconfig.resizable; - window->decorated = wndconfig.decorated; - window->autoIconify = wndconfig.autoIconify; - window->floating = wndconfig.floating; - window->focusOnShow = wndconfig.focusOnShow; - window->cursorMode = GLFW_CURSOR_NORMAL; - - window->doublebuffer = fbconfig.doublebuffer; - - window->minwidth = GLFW_DONT_CARE; - window->minheight = GLFW_DONT_CARE; - window->maxwidth = GLFW_DONT_CARE; - window->maxheight = GLFW_DONT_CARE; - window->numer = GLFW_DONT_CARE; - window->denom = GLFW_DONT_CARE; - - // Open the actual window and create its context - if (!_glfwPlatformCreateWindow(window, &wndconfig, &ctxconfig, &fbconfig)) - { - glfwDestroyWindow((GLFWwindow*) window); - return NULL; - } - - if (ctxconfig.client != GLFW_NO_API) - { - if (!_glfwRefreshContextAttribs(window, &ctxconfig)) - { - glfwDestroyWindow((GLFWwindow*) window); - return NULL; - } - } - - if (window->monitor) - { - if (wndconfig.centerCursor) - _glfwCenterCursorInContentArea(window); - } - else - { - if (wndconfig.visible) - { - _glfwPlatformShowWindow(window); - if (wndconfig.focused) - _glfwPlatformFocusWindow(window); - } - } - - return (GLFWwindow*) window; -} - -void glfwDefaultWindowHints(void) -{ - _GLFW_REQUIRE_INIT(); - - // The default is OpenGL with minimum version 1.0 - memset(&_glfw.hints.context, 0, sizeof(_glfw.hints.context)); - _glfw.hints.context.client = GLFW_OPENGL_API; - _glfw.hints.context.source = (strncmp(getenv("LIBGL_NAME"), "libOSMesa", 9) == 0) ? GLFW_OSMESA_CONTEXT_API : GLFW_NATIVE_CONTEXT_API; - _glfw.hints.context.major = 1; - _glfw.hints.context.minor = 0; - - // The default is a focused, visible, resizable window with decorations - memset(&_glfw.hints.window, 0, sizeof(_glfw.hints.window)); - _glfw.hints.window.resizable = GLFW_TRUE; - _glfw.hints.window.visible = GLFW_TRUE; - _glfw.hints.window.decorated = GLFW_TRUE; - _glfw.hints.window.focused = GLFW_TRUE; - _glfw.hints.window.autoIconify = GLFW_TRUE; - _glfw.hints.window.centerCursor = GLFW_TRUE; - _glfw.hints.window.focusOnShow = GLFW_TRUE; - - // The default is 24 bits of color, 24 bits of depth and 8 bits of stencil, - // double buffered - memset(&_glfw.hints.framebuffer, 0, sizeof(_glfw.hints.framebuffer)); - _glfw.hints.framebuffer.redBits = 8; - _glfw.hints.framebuffer.greenBits = 8; - _glfw.hints.framebuffer.blueBits = 8; - _glfw.hints.framebuffer.alphaBits = 8; - _glfw.hints.framebuffer.depthBits = 24; - _glfw.hints.framebuffer.stencilBits = 8; - _glfw.hints.framebuffer.doublebuffer = GLFW_TRUE; - - // The default is to select the highest available refresh rate - _glfw.hints.refreshRate = GLFW_DONT_CARE; - - // The default is to use full Retina resolution framebuffers - _glfw.hints.window.ns.retina = GLFW_TRUE; -} - -GLFWAPI void glfwWindowHint(int hint, int value) -{ - _GLFW_REQUIRE_INIT(); - - switch (hint) - { - case GLFW_RED_BITS: - _glfw.hints.framebuffer.redBits = value; - return; - case GLFW_GREEN_BITS: - _glfw.hints.framebuffer.greenBits = value; - return; - case GLFW_BLUE_BITS: - _glfw.hints.framebuffer.blueBits = value; - return; - case GLFW_ALPHA_BITS: - _glfw.hints.framebuffer.alphaBits = value; - return; - case GLFW_DEPTH_BITS: - _glfw.hints.framebuffer.depthBits = value; - return; - case GLFW_STENCIL_BITS: - _glfw.hints.framebuffer.stencilBits = value; - return; - case GLFW_ACCUM_RED_BITS: - _glfw.hints.framebuffer.accumRedBits = value; - return; - case GLFW_ACCUM_GREEN_BITS: - _glfw.hints.framebuffer.accumGreenBits = value; - return; - case GLFW_ACCUM_BLUE_BITS: - _glfw.hints.framebuffer.accumBlueBits = value; - return; - case GLFW_ACCUM_ALPHA_BITS: - _glfw.hints.framebuffer.accumAlphaBits = value; - return; - case GLFW_AUX_BUFFERS: - _glfw.hints.framebuffer.auxBuffers = value; - return; - case GLFW_STEREO: - _glfw.hints.framebuffer.stereo = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_DOUBLEBUFFER: - _glfw.hints.framebuffer.doublebuffer = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_TRANSPARENT_FRAMEBUFFER: - _glfw.hints.framebuffer.transparent = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_SAMPLES: - _glfw.hints.framebuffer.samples = value; - return; - case GLFW_SRGB_CAPABLE: - _glfw.hints.framebuffer.sRGB = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_RESIZABLE: - _glfw.hints.window.resizable = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_DECORATED: - _glfw.hints.window.decorated = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_FOCUSED: - _glfw.hints.window.focused = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_AUTO_ICONIFY: - _glfw.hints.window.autoIconify = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_FLOATING: - _glfw.hints.window.floating = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_MAXIMIZED: - _glfw.hints.window.maximized = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_VISIBLE: - _glfw.hints.window.visible = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_COCOA_RETINA_FRAMEBUFFER: - _glfw.hints.window.ns.retina = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_COCOA_GRAPHICS_SWITCHING: - _glfw.hints.context.nsgl.offline = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_SCALE_TO_MONITOR: - _glfw.hints.window.scaleToMonitor = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_CENTER_CURSOR: - _glfw.hints.window.centerCursor = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_FOCUS_ON_SHOW: - _glfw.hints.window.focusOnShow = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_CLIENT_API: - _glfw.hints.context.client = value; - return; - case GLFW_CONTEXT_CREATION_API: - _glfw.hints.context.source = (strncmp(getenv("LIBGL_NAME"), "libOSMesa", 9) == 0) ? GLFW_OSMESA_CONTEXT_API : value; - return; - case GLFW_CONTEXT_VERSION_MAJOR: - _glfw.hints.context.major = value; - return; - case GLFW_CONTEXT_VERSION_MINOR: - _glfw.hints.context.minor = value; - return; - case GLFW_CONTEXT_ROBUSTNESS: - _glfw.hints.context.robustness = value; - return; - case GLFW_OPENGL_FORWARD_COMPAT: - _glfw.hints.context.forward = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_OPENGL_DEBUG_CONTEXT: - _glfw.hints.context.debug = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_CONTEXT_NO_ERROR: - _glfw.hints.context.noerror = value ? GLFW_TRUE : GLFW_FALSE; - return; - case GLFW_OPENGL_PROFILE: - _glfw.hints.context.profile = value; - return; - case GLFW_CONTEXT_RELEASE_BEHAVIOR: - _glfw.hints.context.release = value; - return; - case GLFW_REFRESH_RATE: - _glfw.hints.refreshRate = value; - return; - } - - _glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint 0x%08X", hint); -} - -GLFWAPI void glfwWindowHintString(int hint, const char* value) -{ - assert(value != NULL); - - _GLFW_REQUIRE_INIT(); - - switch (hint) - { - case GLFW_COCOA_FRAME_NAME: - strncpy(_glfw.hints.window.ns.frameName, value, - sizeof(_glfw.hints.window.ns.frameName) - 1); - return; - case GLFW_X11_CLASS_NAME: - strncpy(_glfw.hints.window.x11.className, value, - sizeof(_glfw.hints.window.x11.className) - 1); - return; - case GLFW_X11_INSTANCE_NAME: - strncpy(_glfw.hints.window.x11.instanceName, value, - sizeof(_glfw.hints.window.x11.instanceName) - 1); - return; - } - - _glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint string 0x%08X", hint); -} - -GLFWAPI void glfwDestroyWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - - _GLFW_REQUIRE_INIT(); - - // Allow closing of NULL (to match the behavior of free) - if (window == NULL) - return; - - // Clear all callbacks to avoid exposing a half torn-down window object - memset(&window->callbacks, 0, sizeof(window->callbacks)); - - // The window's context must not be current on another thread when the - // window is destroyed - if (window == _glfwPlatformGetTls(&_glfw.contextSlot)) - glfwMakeContextCurrent(NULL); - - _glfwPlatformDestroyWindow(window); - - // Unlink window from global linked list - { - _GLFWwindow** prev = &_glfw.windowListHead; - - while (*prev != window) - prev = &((*prev)->next); - - *prev = window->next; - } - - free(window); -} - -GLFWAPI int glfwWindowShouldClose(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(0); - return window->shouldClose; -} - -GLFWAPI void glfwSetWindowShouldClose(GLFWwindow* handle, int value) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - window->shouldClose = value; -} - -GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - assert(title != NULL); - - _GLFW_REQUIRE_INIT(); - _glfwPlatformSetWindowTitle(window, title); -} - -GLFWAPI void glfwSetWindowIcon(GLFWwindow* handle, - int count, const GLFWimage* images) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - assert(count >= 0); - assert(count == 0 || images != NULL); - - _GLFW_REQUIRE_INIT(); - _glfwPlatformSetWindowIcon(window, count, images); -} - -GLFWAPI void glfwGetWindowPos(GLFWwindow* handle, int* xpos, int* ypos) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - if (xpos) - *xpos = 0; - if (ypos) - *ypos = 0; - - _GLFW_REQUIRE_INIT(); - _glfwPlatformGetWindowPos(window, xpos, ypos); -} - -GLFWAPI void glfwSetWindowPos(GLFWwindow* handle, int xpos, int ypos) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (window->monitor) - return; - - _glfwPlatformSetWindowPos(window, xpos, ypos); -} - -GLFWAPI void glfwGetWindowSize(GLFWwindow* handle, int* width, int* height) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - if (width) - *width = 0; - if (height) - *height = 0; - - _GLFW_REQUIRE_INIT(); - _glfwPlatformGetWindowSize(window, width, height); -} - -GLFWAPI void glfwSetWindowSize(GLFWwindow* handle, int width, int height) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - assert(width >= 0); - assert(height >= 0); - - _GLFW_REQUIRE_INIT(); - - window->videoMode.width = width; - window->videoMode.height = height; - - _glfwPlatformSetWindowSize(window, width, height); -} - -GLFWAPI void glfwSetWindowSizeLimits(GLFWwindow* handle, - int minwidth, int minheight, - int maxwidth, int maxheight) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (minwidth != GLFW_DONT_CARE && minheight != GLFW_DONT_CARE) - { - if (minwidth < 0 || minheight < 0) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid window minimum size %ix%i", - minwidth, minheight); - return; - } - } - - if (maxwidth != GLFW_DONT_CARE && maxheight != GLFW_DONT_CARE) - { - if (maxwidth < 0 || maxheight < 0 || - maxwidth < minwidth || maxheight < minheight) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid window maximum size %ix%i", - maxwidth, maxheight); - return; - } - } - - window->minwidth = minwidth; - window->minheight = minheight; - window->maxwidth = maxwidth; - window->maxheight = maxheight; - - if (window->monitor || !window->resizable) - return; - - _glfwPlatformSetWindowSizeLimits(window, - minwidth, minheight, - maxwidth, maxheight); -} - -GLFWAPI void glfwSetWindowAspectRatio(GLFWwindow* handle, int numer, int denom) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - assert(numer != 0); - assert(denom != 0); - - _GLFW_REQUIRE_INIT(); - - if (numer != GLFW_DONT_CARE && denom != GLFW_DONT_CARE) - { - if (numer <= 0 || denom <= 0) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid window aspect ratio %i:%i", - numer, denom); - return; - } - } - - window->numer = numer; - window->denom = denom; - - if (window->monitor || !window->resizable) - return; - - _glfwPlatformSetWindowAspectRatio(window, numer, denom); -} - -GLFWAPI void glfwGetFramebufferSize(GLFWwindow* handle, int* width, int* height) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - if (width) - *width = 0; - if (height) - *height = 0; - - _GLFW_REQUIRE_INIT(); - _glfwPlatformGetFramebufferSize(window, width, height); -} - -GLFWAPI void glfwGetWindowFrameSize(GLFWwindow* handle, - int* left, int* top, - int* right, int* bottom) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - if (left) - *left = 0; - if (top) - *top = 0; - if (right) - *right = 0; - if (bottom) - *bottom = 0; - - _GLFW_REQUIRE_INIT(); - _glfwPlatformGetWindowFrameSize(window, left, top, right, bottom); -} - -GLFWAPI void glfwGetWindowContentScale(GLFWwindow* handle, - float* xscale, float* yscale) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - if (xscale) - *xscale = 0.f; - if (yscale) - *yscale = 0.f; - - _GLFW_REQUIRE_INIT(); - _glfwPlatformGetWindowContentScale(window, xscale, yscale); -} - -GLFWAPI float glfwGetWindowOpacity(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(1.f); - return _glfwPlatformGetWindowOpacity(window); -} - -GLFWAPI void glfwSetWindowOpacity(GLFWwindow* handle, float opacity) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - assert(opacity == opacity); - assert(opacity >= 0.f); - assert(opacity <= 1.f); - - _GLFW_REQUIRE_INIT(); - - if (opacity != opacity || opacity < 0.f || opacity > 1.f) - { - _glfwInputError(GLFW_INVALID_VALUE, "Invalid window opacity %f", opacity); - return; - } - - _glfwPlatformSetWindowOpacity(window, opacity); -} - -GLFWAPI void glfwIconifyWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - _glfwPlatformIconifyWindow(window); -} - -GLFWAPI void glfwRestoreWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - _glfwPlatformRestoreWindow(window); -} - -GLFWAPI void glfwMaximizeWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (window->monitor) - return; - - _glfwPlatformMaximizeWindow(window); -} - -GLFWAPI void glfwShowWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (window->monitor) - return; - - _glfwPlatformShowWindow(window); - - if (window->focusOnShow) - _glfwPlatformFocusWindow(window); -} - -GLFWAPI void glfwRequestWindowAttention(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - _glfwPlatformRequestWindowAttention(window); -} - -GLFWAPI void glfwHideWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - if (window->monitor) - return; - - _glfwPlatformHideWindow(window); -} - -GLFWAPI void glfwFocusWindow(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - _glfwPlatformFocusWindow(window); -} - -GLFWAPI int glfwGetWindowAttrib(GLFWwindow* handle, int attrib) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(0); - - switch (attrib) - { - case GLFW_FOCUSED: - return _glfwPlatformWindowFocused(window); - case GLFW_ICONIFIED: - return _glfwPlatformWindowIconified(window); - case GLFW_VISIBLE: - return _glfwPlatformWindowVisible(window); - case GLFW_MAXIMIZED: - return _glfwPlatformWindowMaximized(window); - case GLFW_HOVERED: - return _glfwPlatformWindowHovered(window); - case GLFW_FOCUS_ON_SHOW: - return window->focusOnShow; - case GLFW_TRANSPARENT_FRAMEBUFFER: - return _glfwPlatformFramebufferTransparent(window); - case GLFW_RESIZABLE: - return window->resizable; - case GLFW_DECORATED: - return window->decorated; - case GLFW_FLOATING: - return window->floating; - case GLFW_AUTO_ICONIFY: - return window->autoIconify; - case GLFW_CLIENT_API: - return window->context.client; - case GLFW_CONTEXT_CREATION_API: - return window->context.source; - case GLFW_CONTEXT_VERSION_MAJOR: - return window->context.major; - case GLFW_CONTEXT_VERSION_MINOR: - return window->context.minor; - case GLFW_CONTEXT_REVISION: - return window->context.revision; - case GLFW_CONTEXT_ROBUSTNESS: - return window->context.robustness; - case GLFW_OPENGL_FORWARD_COMPAT: - return window->context.forward; - case GLFW_OPENGL_DEBUG_CONTEXT: - return window->context.debug; - case GLFW_OPENGL_PROFILE: - return window->context.profile; - case GLFW_CONTEXT_RELEASE_BEHAVIOR: - return window->context.release; - case GLFW_CONTEXT_NO_ERROR: - return window->context.noerror; - } - - _glfwInputError(GLFW_INVALID_ENUM, "Invalid window attribute 0x%08X", attrib); - return 0; -} - -GLFWAPI void glfwSetWindowAttrib(GLFWwindow* handle, int attrib, int value) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - - value = value ? GLFW_TRUE : GLFW_FALSE; - - if (attrib == GLFW_AUTO_ICONIFY) - window->autoIconify = value; - else if (attrib == GLFW_RESIZABLE) - { - if (window->resizable == value) - return; - - window->resizable = value; - if (!window->monitor) - _glfwPlatformSetWindowResizable(window, value); - } - else if (attrib == GLFW_DECORATED) - { - if (window->decorated == value) - return; - - window->decorated = value; - if (!window->monitor) - _glfwPlatformSetWindowDecorated(window, value); - } - else if (attrib == GLFW_FLOATING) - { - if (window->floating == value) - return; - - window->floating = value; - if (!window->monitor) - _glfwPlatformSetWindowFloating(window, value); - } - else if (attrib == GLFW_FOCUS_ON_SHOW) - window->focusOnShow = value; - else - _glfwInputError(GLFW_INVALID_ENUM, "Invalid window attribute 0x%08X", attrib); -} - -GLFWAPI GLFWmonitor* glfwGetWindowMonitor(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return (GLFWmonitor*) window->monitor; -} - -GLFWAPI void glfwSetWindowMonitor(GLFWwindow* wh, - GLFWmonitor* mh, - int xpos, int ypos, - int width, int height, - int refreshRate) -{ - _GLFWwindow* window = (_GLFWwindow*) wh; - _GLFWmonitor* monitor = (_GLFWmonitor*) mh; - assert(window != NULL); - assert(width >= 0); - assert(height >= 0); - - _GLFW_REQUIRE_INIT(); - - if (width <= 0 || height <= 0) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid window size %ix%i", - width, height); - return; - } - - if (refreshRate < 0 && refreshRate != GLFW_DONT_CARE) - { - _glfwInputError(GLFW_INVALID_VALUE, - "Invalid refresh rate %i", - refreshRate); - return; - } - - window->videoMode.width = width; - window->videoMode.height = height; - window->videoMode.refreshRate = refreshRate; - - _glfwPlatformSetWindowMonitor(window, monitor, - xpos, ypos, width, height, - refreshRate); -} - -GLFWAPI void glfwSetWindowUserPointer(GLFWwindow* handle, void* pointer) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT(); - window->userPointer = pointer; -} - -GLFWAPI void* glfwGetWindowUserPointer(GLFWwindow* handle) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - return window->userPointer; -} - -GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow* handle, - GLFWwindowposfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.pos, cbfun); - return cbfun; -} - -GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow* handle, - GLFWwindowsizefun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.size, cbfun); - return cbfun; -} - -GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow* handle, - GLFWwindowclosefun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.close, cbfun); - return cbfun; -} - -GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow* handle, - GLFWwindowrefreshfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.refresh, cbfun); - return cbfun; -} - -GLFWAPI GLFWwindowfocusfun glfwSetWindowFocusCallback(GLFWwindow* handle, - GLFWwindowfocusfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.focus, cbfun); - return cbfun; -} - -GLFWAPI GLFWwindowiconifyfun glfwSetWindowIconifyCallback(GLFWwindow* handle, - GLFWwindowiconifyfun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.iconify, cbfun); - return cbfun; -} - -GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow* handle, - GLFWwindowmaximizefun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.maximize, cbfun); - return cbfun; -} - -GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* handle, - GLFWframebuffersizefun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.fbsize, cbfun); - return cbfun; -} - -GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow* handle, - GLFWwindowcontentscalefun cbfun) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - assert(window != NULL); - - _GLFW_REQUIRE_INIT_OR_RETURN(NULL); - _GLFW_SWAP_POINTERS(window->callbacks.scale, cbfun); - return cbfun; -} - -GLFWAPI void glfwPollEvents(void) -{ - _GLFW_REQUIRE_INIT(); - _glfwPlatformPollEvents(); -} - -GLFWAPI void glfwWaitEvents(void) -{ - _GLFW_REQUIRE_INIT(); - _glfwPlatformWaitEvents(); -} - -GLFWAPI void glfwWaitEventsTimeout(double timeout) -{ - _GLFW_REQUIRE_INIT(); - assert(timeout == timeout); - assert(timeout >= 0.0); - assert(timeout <= DBL_MAX); - - if (timeout != timeout || timeout < 0.0 || timeout > DBL_MAX) - { - _glfwInputError(GLFW_INVALID_VALUE, "Invalid time %f", timeout); - return; - } - - _glfwPlatformWaitEventsTimeout(timeout); -} - -GLFWAPI void glfwPostEmptyEvent(void) -{ - _GLFW_REQUIRE_INIT(); - _glfwPlatformPostEmptyEvent(); -} - diff --git a/FCLauncher/src/main/jni/lwjgl/FCLConfig.h b/FCLauncher/src/main/jni/lwjgl/FCLConfig.h deleted file mode 100644 index 31c7eb25..00000000 --- a/FCLauncher/src/main/jni/lwjgl/FCLConfig.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ - -#include -#include - -#define DISABLE_WARNINGS() \ - _Pragma("GCC diagnostic push") - _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") - _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") - _Pragma("GCC diagnostic ignored \"-Wsign-compare\"") - -#define ENABLE_WARNINGS() \ - _Pragma("GCC diagnostic pop") - -// JNIEXPORT_CRITICAL & CRITICAL are used as a workaround for JDK-8167409 on applicable functions. -#define JNIEXPORT_CRITICAL static -#define CRITICAL(function) _JavaCritical_##function \ No newline at end of file diff --git a/FCLauncher/src/main/jni/lwjgl/FCLLWJGL.h b/FCLauncher/src/main/jni/lwjgl/FCLLWJGL.h deleted file mode 100644 index 6a1b13db..00000000 --- a/FCLauncher/src/main/jni/lwjgl/FCLLWJGL.h +++ /dev/null @@ -1,5 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#pragma once \ No newline at end of file diff --git a/FCLauncher/src/main/jni/lwjgl/common_tools.c b/FCLauncher/src/main/jni/lwjgl/common_tools.c deleted file mode 100644 index 28d24dad..00000000 --- a/FCLauncher/src/main/jni/lwjgl/common_tools.c +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#ifdef LWJGL_WINDOWS - __pragma(warning(disable : 4710)) -#endif -#include "common_tools.h" -#include "fcl_hook.h" -#include -#include - -JavaVM *jvm; - -static inline JNIEnv* getThreadEnv(void) { - JNIEnv *env; - (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_6); - return env; -} - -static inline JNIEnv* attachCurrentThreadAsDaemon(void) { - JNIEnv *env; - (*jvm)->AttachCurrentThreadAsDaemon(jvm, (void **)&env, NULL); - if (env == NULL) { - fprintf(stderr, "[LWJGL] Failed to attach native thread to the JVM."); - fflush(stderr); - exit(1); - } - return env; -} - -static inline void detachCurrentThread(void) { - if ((*jvm)->DetachCurrentThread(jvm) != JNI_OK) { - fprintf(stderr, "[LWJGL] Failed to detach native thread from the JVM."); - fflush(stderr); - } -} - -static inline EnvData* createEnvData(jboolean async, JNIEnv* env) { - EnvData* data = (EnvData*)calloc(sizeof(EnvData), 1); - - data->async = async; - data->env = env; - - return data; -} - -static inline void linkEnvData(EnvData* data, JNIEnv *env) { - data->envCopy = *env; - ((void **)*env)[2] = (void *)data; -} - -#ifdef LWJGL_WINDOWS - #include - DWORD envTLS = TLS_OUT_OF_INDEXES; - - BOOL WINAPI DllMain(HINSTANCE hDLL, DWORD fdwReason, LPVOID lpvReserved) { - UNUSED_PARAMS(hDLL, lpvReserved) - - if (fdwReason == DLL_THREAD_DETACH && lpvReserved == NULL/* see: https://docs.microsoft.com/en-us/windows/win32/dlls/dllmain */) { - EnvData* data = (EnvData*)TlsGetValue(envTLS); - if (data != NULL) { - TlsSetValue(envTLS, NULL); - - JNIEnv env = data->envCopy; - if (env != NULL) { - free((void *)env); - } - free(data); - } - - if (getThreadEnv() != NULL) { - detachCurrentThread(); - } - } - - return TRUE; - } - - static inline void tlsInit(void) { - envTLS = TlsAlloc(); - if (envTLS == TLS_OUT_OF_INDEXES) { - fprintf(stderr, "[LWJGL] Failed to allocate TLS for JNIEnv."); - fflush(stderr); - } - } - - static inline void tlsDestroy(void) { - TlsFree(envTLS); - } - - EnvData* tlsCreateEnvData(void) { - jboolean async = 0; - JNIEnv* env = getThreadEnv(); - - if (env == NULL) { - async = 1; - env = attachCurrentThreadAsDaemon(); - } - - EnvData* data = createEnvData(async, env); - - TlsSetValue(envTLS, (LPVOID)data); - - return data; - } - - EnvData* tlsCreateEnvDataWithCopy(JNIEnv *env) { - EnvData* data = createEnvData(0, env); - linkEnvData(data, env); - - TlsSetValue(envTLS, (LPVOID)data); - - return data; - } - - inline EnvData* tlsGetEnvData(void) { - EnvData* data = (EnvData*)TlsGetValue(envTLS); - if (data == NULL) { - data = tlsCreateEnvData(); - } - return data; - } -#else - #include - pthread_key_t envTLS = 0; - - static void autoDetach(void* value) { - EnvData* data = (EnvData *)value; - - JNIEnv env = data->envCopy; - if (env != NULL) { - free((void *)env); - } - - free(data); - - if (getThreadEnv() != NULL) { - detachCurrentThread(); - } - } - - static inline void tlsInit(void) { - if (pthread_key_create(&envTLS, autoDetach) != 0) { - fprintf(stderr, "[LWJGL] Failed to allocate TLS for JNIEnv."); - fflush(stderr); - } - } - - static inline void tlsDestroy(void) { - if (envTLS) { - pthread_key_delete(envTLS); - envTLS = 0; - } - } - - EnvData* tlsCreateEnvData(void) { - jboolean async = 0; - JNIEnv* env = getThreadEnv(); - - if (env == NULL) { - async = 1; - env = attachCurrentThreadAsDaemon(); - } - - EnvData* data = createEnvData(async, env); - - pthread_setspecific(envTLS, data); - - return data; - } - - EnvData* tlsCreateEnvDataWithCopy(JNIEnv* env) { - EnvData* data = createEnvData(0, env); - linkEnvData(data, env); - - pthread_setspecific(envTLS, data); - - return data; - } - - inline EnvData* tlsGetEnvData(void) { - EnvData* data = (EnvData*)pthread_getspecific(envTLS); - if (data == NULL) { - data = tlsCreateEnvData(); - } - return data; - } -#endif - -inline JNIEnv* getEnv(jboolean *async) { - EnvData* data = tlsGetEnvData(); - *async = data->async; - return data->env; -} - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { - UNUSED_PARAM(reserved) - - jvm = vm; - - JNIEnv *env = NULL; - (*vm)->GetEnv(vm, (void**)&env, JNI_VERSION_1_4); - hookExec(env); - - tlsInit(); - return JNI_VERSION_1_6; -} - -JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved) { - UNUSED_PARAMS(vm, reserved); - tlsDestroy(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/common_tools.h b/FCLauncher/src/main/jni/lwjgl/common_tools.h deleted file mode 100644 index 36298535..00000000 --- a/FCLauncher/src/main/jni/lwjgl/common_tools.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#pragma once - -#ifdef LWJGL_WINDOWS - #include "WindowsConfig.h" -#endif -#ifdef LWJGL_LINUX - #include "LinuxConfig.h" -#endif -#ifdef LWJGL_FCL - #include "FCLConfig.h" -#endif -#ifdef LWJGL_MACOS - #include "macOSConfig.h" -#endif - -DISABLE_WARNINGS() -#include -#include -#include -ENABLE_WARNINGS() - -// Per-thread data, stored in a platform-specific thread-local. -// Present in threads that had Callback invocations, saveErrno/saveLastError calls, OpenGL(ES) contexts made current. -// Clean up is automatic via DllMain notifications (on Windows) or pthread destructors (on Linux/OSX). -typedef struct EnvData_ { - // true if AttachCurrentThreadAsDaemon was used to attach to a foreign thread (on a callback invocation). - jboolean async; - char padding[sizeof(void *) - sizeof(jboolean)]; - // Cached JNIEnv* for the current thread. Faster than calling jvm->GetEnv. - // NOTE: points to JavaThread::_jni_environment (jdk/src/hotspot/share/runtime/thread.hpp), which is itself a pointer to the JNINativeInterface struct. - JNIEnv* env; - // The JNIEnv copy for the current thread. - // Not NULL in threads where saveErrno/saveLastError has been called, or an OpenGL(ES) context has been made current. - // * env->reserved2 points to this EnvData instance. - // * env->reserved3 may point to the GL(ES)Capabilities function array. - // The above two enable access to thread-local data without a TL lookup. - // NOTE: Stored separately instead of dereferencing env, because JavaThread instances may already be corrupted on thread detach. - JNIEnv envCopy; - // errno for the current thread. Must be stored before a JNI function returns (may change between JNI method calls). - jint errnum; -#ifdef LWJGL_WINDOWS - // GetLastError() for the current thread. Must be stored before a JNI function returns (may change between JNI method calls). - jint LastError; -#endif -} EnvData; - -// Cached JNIEnv, using TLS. Will use attachCurrentThreadAsDaemon in foreign threads. -extern JNIEnv* getEnv(jboolean* async); - -// Upcalls are used to create EnvData, because these macros will be used in non-core modules too. -/* - * method (any module) -> ThreadLocalUtil::setupEnvData upcall (core module) - * \ / \ - * -> nfunction downcall (any module) -> saveErrno/saveLastError -> nsetupEnvData downcall (core module) - */ -#define saveErrno() \ - jint errnum = errno; \ - EnvData *envData = (EnvData *)(*__env)->reserved2; \ - if (envData == (*__env)->reserved0) { \ - jclass TLU = (*__env)->FindClass(__env, "org/lwjgl/system/ThreadLocalUtil"); \ - envData = (EnvData *)(uintptr_t)(*__env)->CallStaticLongMethod(__env, TLU, (*__env)->GetStaticMethodID(__env, TLU, "setupEnvData", "()J")); \ - } \ - envData->errnum = errnum; - -#ifdef LWJGL_WINDOWS - #define saveLastError() \ - jint LastError = (jint)GetLastError(); \ - EnvData *envData = (EnvData *)(*__env)->reserved2; \ - if (envData == (*__env)->reserved0) { \ - jclass TLU = (*__env)->FindClass(__env, "org/lwjgl/system/ThreadLocalUtil"); \ - envData = (EnvData *)(uintptr_t)(*__env)->CallStaticLongMethod(__env, TLU, (*__env)->GetStaticMethodID(__env, TLU, "setupEnvData", "()J")); \ - } \ - envData->LastError = LastError; - - #define VA_LIST_CAST &(va_list) -#else - #define VA_LIST_CAST (va_list *) -#endif - -// ----------------------------------------------------- - -#ifdef __cplusplus - #define EXTERN_C_ENTER extern "C" { - #define EXTERN_C_EXIT } -#else - #define EXTERN_C_ENTER - #define EXTERN_C_EXIT -#endif - -// ----------------------------------------------------- - -#define UNUSED_PARAM(param) \ - (void)(param); - -#define UNUSED_PARAMS(a, b) \ - (void)(a); \ - (void)(b); - -// ----------------------------------------------------- diff --git a/FCLauncher/src/main/jni/lwjgl/fcl_hook.c b/FCLauncher/src/main/jni/lwjgl/fcl_hook.c deleted file mode 100644 index e8e66c69..00000000 --- a/FCLauncher/src/main/jni/lwjgl/fcl_hook.c +++ /dev/null @@ -1,71 +0,0 @@ -// -// Created by mio on 2023/7/9. -// - -#include "fcl_hook.h" -#include -#include -#include -#include -#include "fcl/include/fcl_internal.h" - -jint (*orig_ProcessImpl_forkAndExec)(JNIEnv *env, jobject process, jint mode, jbyteArray helperpath, - jbyteArray prog, jbyteArray argBlock, jint argc, - jbyteArray envBlock, jint envc, jbyteArray dir, - jintArray std_fds, jboolean redirectErrorStream); - -jint -hooked_ProcessImpl_forkAndExec(JNIEnv *env, jobject process, jint mode, jbyteArray helperpath, - jbyteArray prog, jbyteArray argBlock, jint argc, jbyteArray envBlock, - jint envc, jbyteArray dir, jintArray std_fds, - jboolean redirectErrorStream) { - char *pProg = (char *) ((*env)->GetByteArrayElements(env, prog, NULL)); - - if (strcmp(basename(pProg), "xdg-open") != 0) { - (*env)->ReleaseByteArrayElements(env, prog, (jbyte *) pProg, 0); - return orig_ProcessImpl_forkAndExec(env, process, mode, helperpath, prog, argBlock, argc, - envBlock, envc, dir, std_fds, redirectErrorStream); - } - (*env)->ReleaseByteArrayElements(env, prog, (jbyte *) pProg, 0); - - long len = (*env)->GetArrayLength(env, argBlock); - const char *cs[len]; - (*env)->GetByteArrayRegion(env, argBlock, 0, len, (jbyte *) cs); - (*env)->DeleteLocalRef(env, argBlock); - - FCL_INTERNAL_LOG("forkAndExec:%s", cs); - JavaVM *androidVm = fcl->android_jvm; - JNIEnv *androidEnv = NULL; - char detachable = 0; - if ((*androidVm)->GetEnv(androidVm, (void **) &androidEnv, JNI_VERSION_1_2) == JNI_EDETACHED) { - (*androidVm)->AttachCurrentThread(androidVm, &androidEnv, NULL); - detachable = 1; - } - if (!androidEnv) { - FCL_INTERNAL_LOG("forkAndExec error:androidEnv in null"); - } - jmethodID method_OpenLink = (*androidEnv)->GetStaticMethodID(androidEnv, fcl->class_FCLBridge, "openLink", - "(Ljava/lang/String;)V"); - (*androidEnv)->CallStaticVoidMethod(androidEnv, fcl->class_FCLBridge, method_OpenLink, - (*androidEnv)->NewStringUTF(androidEnv, cs)); - if (detachable) (*androidVm)->DetachCurrentThread(androidVm); - - return 0; -} - -void hookExec(JNIEnv *env) { - jclass cls; - orig_ProcessImpl_forkAndExec = dlsym(RTLD_DEFAULT, "Java_java_lang_UNIXProcess_forkAndExec"); - if (!orig_ProcessImpl_forkAndExec) { - orig_ProcessImpl_forkAndExec = dlsym(RTLD_DEFAULT, - "Java_java_lang_ProcessImpl_forkAndExec"); - cls = (*env)->FindClass(env, "java/lang/ProcessImpl"); - } else { - cls = (*env)->FindClass(env, "java/lang/UNIXProcess"); - } - JNINativeMethod methods[] = { - {"forkAndExec", "(I[B[B[BI[BI[B[IZ)I", (void *) &hooked_ProcessImpl_forkAndExec} - }; - (*env)->RegisterNatives(env, cls, methods, 1); - FCL_INTERNAL_LOG("Registered forkAndExec"); -} diff --git a/FCLauncher/src/main/jni/lwjgl/fcl_hook.h b/FCLauncher/src/main/jni/lwjgl/fcl_hook.h deleted file mode 100644 index d87f29bb..00000000 --- a/FCLauncher/src/main/jni/lwjgl/fcl_hook.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// Created by mio on 2023/7/9. -// - -#ifndef FOLD_CRAFT_LAUNCHER_FCL_HOOK_H -#define FOLD_CRAFT_LAUNCHER_FCL_HOOK_H - -#include -void hookExec(JNIEnv *env); - - -#endif //FOLD_CRAFT_LAUNCHER_FCL_HOOK_H diff --git a/FCLauncher/src/main/jni/lwjgl/ffi.h b/FCLauncher/src/main/jni/lwjgl/ffi.h deleted file mode 100644 index 6c16184a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/ffi.h +++ /dev/null @@ -1,538 +0,0 @@ -/* -----------------------------------------------------------------*-C-*- - libffi @VERSION@ - - Copyright (c) 2011, 2014, 2019, 2021, 2022 Anthony Green - - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the ``Software''), to deal in the Software without - restriction, including without limitation the rights to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell copies - of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - ----------------------------------------------------------------------- */ - -/* ------------------------------------------------------------------- - Most of the API is documented in doc/libffi.texi. - - The raw API is designed to bypass some of the argument packing and - unpacking on architectures for which it can be avoided. Routines - are provided to emulate the raw API if the underlying platform - doesn't allow faster implementation. - - More details on the raw API can be found in: - - http://gcc.gnu.org/ml/java/1999-q3/msg00138.html - - and - - http://gcc.gnu.org/ml/java/1999-q3/msg00174.html - -------------------------------------------------------------------- */ - -#ifndef LIBFFI_H -#define LIBFFI_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Specify which architecture libffi is configured for. */ -//#ifndef @TARGET@ -//#define @TARGET@ -//#endif - -/* ---- System configuration information --------------------------------- */ - -#define HAVE_LONG_DOUBLE 0 -#if defined(LWJGL_MACOS) && defined(LWJGL_arm64) -#define FFI_EXEC_TRAMPOLINE_TABLE 1 -#else -#define FFI_EXEC_TRAMPOLINE_TABLE 0 -#endif - -/* If these change, update src/mips/ffitarget.h. */ -#define FFI_TYPE_VOID 0 -#define FFI_TYPE_INT 1 -#define FFI_TYPE_FLOAT 2 -#define FFI_TYPE_DOUBLE 3 -#if HAVE_LONG_DOUBLE -#define FFI_TYPE_LONGDOUBLE 4 -#else -#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE -#endif -#define FFI_TYPE_UINT8 5 -#define FFI_TYPE_SINT8 6 -#define FFI_TYPE_UINT16 7 -#define FFI_TYPE_SINT16 8 -#define FFI_TYPE_UINT32 9 -#define FFI_TYPE_SINT32 10 -#define FFI_TYPE_UINT64 11 -#define FFI_TYPE_SINT64 12 -#define FFI_TYPE_STRUCT 13 -#define FFI_TYPE_POINTER 14 -#define FFI_TYPE_COMPLEX 15 - -/* This should always refer to the last type code (for sanity checks). */ -#define FFI_TYPE_LAST FFI_TYPE_COMPLEX - -#include - -#ifndef LIBFFI_ASM - -#if defined(_MSC_VER) && !defined(__clang__) -#define __attribute__(X) -#endif - -#include -#include - -/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example). - But we can find it either under the correct ANSI name, or under GNU - C's internal name. */ - -#define FFI_64_BIT_MAX 9223372036854775807 - -#ifdef LONG_LONG_MAX -# define FFI_LONG_LONG_MAX LONG_LONG_MAX -#else -# ifdef LLONG_MAX -# define FFI_LONG_LONG_MAX LLONG_MAX -# ifdef _AIX52 /* or newer has C99 LLONG_MAX */ -# undef FFI_64_BIT_MAX -# define FFI_64_BIT_MAX 9223372036854775807LL -# endif /* _AIX52 or newer */ -# else -# ifdef __GNUC__ -# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__ -# endif -# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */ -# ifndef __PPC64__ -# if defined (__IBMC__) || defined (__IBMCPP__) -# define FFI_LONG_LONG_MAX LONGLONG_MAX -# endif -# endif /* __PPC64__ */ -# undef FFI_64_BIT_MAX -# define FFI_64_BIT_MAX 9223372036854775807LL -# endif -# endif -#endif - -/* The closure code assumes that this works on pointers, i.e. a size_t - can hold a pointer. */ - -typedef struct _ffi_type -{ - size_t size; - unsigned short alignment; - unsigned short type; - struct _ffi_type **elements; -} ffi_type; - -/* Need minimal decorations for DLLs to work on Windows. GCC has - autoimport and autoexport. Always mark externally visible symbols - as dllimport for MSVC clients, even if it means an extra indirection - when using the static version of the library. - Besides, as a workaround, they can define FFI_BUILDING if they - *know* they are going to link with the static library. */ -#if defined _MSC_VER -# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */ -# define FFI_API __declspec(dllexport) -# elif !defined FFI_BUILDING /* Importing libffi.DLL */ -# define FFI_API __declspec(dllimport) -# else /* Building/linking static library */ -# define FFI_API -# endif -#else -# define FFI_API -#endif - -/* The externally visible type declarations also need the MSVC DLL - decorations, or they will not be exported from the object file. */ -#if defined LIBFFI_HIDE_BASIC_TYPES -# define FFI_EXTERN FFI_API -#else -# define FFI_EXTERN extern FFI_API -#endif - -#ifndef LIBFFI_HIDE_BASIC_TYPES -#if SCHAR_MAX == 127 -# define ffi_type_uchar ffi_type_uint8 -# define ffi_type_schar ffi_type_sint8 -#else - #error "char size not supported" -#endif - -#if SHRT_MAX == 32767 -# define ffi_type_ushort ffi_type_uint16 -# define ffi_type_sshort ffi_type_sint16 -#elif SHRT_MAX == 2147483647 -# define ffi_type_ushort ffi_type_uint32 -# define ffi_type_sshort ffi_type_sint32 -#else - #error "short size not supported" -#endif - -#if INT_MAX == 32767 -# define ffi_type_uint ffi_type_uint16 -# define ffi_type_sint ffi_type_sint16 -#elif INT_MAX == 2147483647 -# define ffi_type_uint ffi_type_uint32 -# define ffi_type_sint ffi_type_sint32 -#elif INT_MAX == 9223372036854775807 -# define ffi_type_uint ffi_type_uint64 -# define ffi_type_sint ffi_type_sint64 -#else - #error "int size not supported" -#endif - -#if LONG_MAX == 2147483647 -# if FFI_LONG_LONG_MAX != FFI_64_BIT_MAX - #error "no 64-bit data type supported" -# endif -#elif LONG_MAX != FFI_64_BIT_MAX - #error "long size not supported" -#endif - -#if LONG_MAX == 2147483647 -# define ffi_type_ulong ffi_type_uint32 -# define ffi_type_slong ffi_type_sint32 -#elif LONG_MAX == FFI_64_BIT_MAX -# define ffi_type_ulong ffi_type_uint64 -# define ffi_type_slong ffi_type_sint64 -#else - #error "long size not supported" -#endif - -/* These are defined in types.c. */ -FFI_EXTERN ffi_type ffi_type_void; -FFI_EXTERN ffi_type ffi_type_uint8; -FFI_EXTERN ffi_type ffi_type_sint8; -FFI_EXTERN ffi_type ffi_type_uint16; -FFI_EXTERN ffi_type ffi_type_sint16; -FFI_EXTERN ffi_type ffi_type_uint32; -FFI_EXTERN ffi_type ffi_type_sint32; -FFI_EXTERN ffi_type ffi_type_uint64; -FFI_EXTERN ffi_type ffi_type_sint64; -FFI_EXTERN ffi_type ffi_type_float; -FFI_EXTERN ffi_type ffi_type_double; -FFI_EXTERN ffi_type ffi_type_pointer; - -#if HAVE_LONG_DOUBLE -FFI_EXTERN ffi_type ffi_type_longdouble; -#else -#define ffi_type_longdouble ffi_type_double -#endif - -#ifdef FFI_TARGET_HAS_COMPLEX_TYPE -FFI_EXTERN ffi_type ffi_type_complex_float; -FFI_EXTERN ffi_type ffi_type_complex_double; -#if HAVE_LONG_DOUBLE -FFI_EXTERN ffi_type ffi_type_complex_longdouble; -#else -#define ffi_type_complex_longdouble ffi_type_complex_double -#endif -#endif -#endif /* LIBFFI_HIDE_BASIC_TYPES */ - -typedef enum { - FFI_OK = 0, - FFI_BAD_TYPEDEF, - FFI_BAD_ABI, - FFI_BAD_ARGTYPE -} ffi_status; - -typedef struct { - ffi_abi abi; - unsigned nargs; - ffi_type **arg_types; - ffi_type *rtype; - unsigned bytes; - unsigned flags; -#ifdef FFI_EXTRA_CIF_FIELDS - FFI_EXTRA_CIF_FIELDS; -#endif -} ffi_cif; - -/* ---- Definitions for the raw API -------------------------------------- */ - -#ifndef FFI_SIZEOF_ARG -# if LONG_MAX == 2147483647 -# define FFI_SIZEOF_ARG 4 -# elif LONG_MAX == FFI_64_BIT_MAX -# define FFI_SIZEOF_ARG 8 -# endif -#endif - -#ifndef FFI_SIZEOF_JAVA_RAW -# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG -#endif - -typedef union { - ffi_sarg sint; - ffi_arg uint; - float flt; - char data[FFI_SIZEOF_ARG]; - void* ptr; -} ffi_raw; - -#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8 -/* This is a special case for mips64/n32 ABI (and perhaps others) where - sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */ -typedef union { - signed int sint; - unsigned int uint; - float flt; - char data[FFI_SIZEOF_JAVA_RAW]; - void* ptr; -} ffi_java_raw; -#else -typedef ffi_raw ffi_java_raw; -#endif - - -FFI_API -void ffi_raw_call (ffi_cif *cif, - void (*fn)(void), - void *rvalue, - ffi_raw *avalue); - -FFI_API void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw); -FFI_API void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); -FFI_API size_t ffi_raw_size (ffi_cif *cif); - -/* This is analogous to the raw API, except it uses Java parameter - packing, even on 64-bit machines. I.e. on 64-bit machines longs - and doubles are followed by an empty 64-bit word. */ - -#if !FFI_NATIVE_RAW_API -FFI_API -void ffi_java_raw_call (ffi_cif *cif, - void (*fn)(void), - void *rvalue, - ffi_java_raw *avalue) __attribute__((deprecated)); -#endif - -FFI_API -void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) __attribute__((deprecated)); -FFI_API -void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args) __attribute__((deprecated)); -FFI_API -size_t ffi_java_raw_size (ffi_cif *cif) __attribute__((deprecated)); - -/* ---- Definitions for closures ----------------------------------------- */ - -#if FFI_CLOSURES - -#ifdef _MSC_VER -__declspec(align(8)) -#endif -typedef struct { -#if FFI_EXEC_TRAMPOLINE_TABLE - void *trampoline_table; - void *trampoline_table_entry; -#else - union { - char tramp[FFI_TRAMPOLINE_SIZE]; - void *ftramp; - }; -#endif - ffi_cif *cif; - void (*fun)(ffi_cif*,void*,void**,void*); - void *user_data; -#if defined(_MSC_VER) && defined(_M_IX86) - void *padding; -#endif -} ffi_closure -#ifdef __GNUC__ - __attribute__((aligned (8))) -#endif - ; - -#ifndef __GNUC__ -# ifdef __sgi -# pragma pack 0 -# endif -#endif - -FFI_API void *ffi_closure_alloc (size_t size, void **code); -FFI_API void ffi_closure_free (void *); - -#if defined(PA_LINUX) || defined(PA_HPUX) -#define FFI_CLOSURE_PTR(X) ((void *)((unsigned int)(X) | 2)) -#define FFI_RESTORE_PTR(X) ((void *)((unsigned int)(X) & ~3)) -#else -#define FFI_CLOSURE_PTR(X) (X) -#define FFI_RESTORE_PTR(X) (X) -#endif - -FFI_API ffi_status -ffi_prep_closure (ffi_closure*, - ffi_cif *, - void (*fun)(ffi_cif*,void*,void**,void*), - void *user_data) -#if defined(__GNUC__) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 405) - __attribute__((deprecated ("use ffi_prep_closure_loc instead"))) -#elif defined(__GNUC__) && __GNUC__ >= 3 - __attribute__((deprecated)) -#endif - ; - -FFI_API ffi_status -ffi_prep_closure_loc (ffi_closure*, - ffi_cif *, - void (*fun)(ffi_cif*,void*,void**,void*), - void *user_data, - void *codeloc); - -#ifdef __sgi -# pragma pack 8 -#endif -typedef struct { -#if FFI_EXEC_TRAMPOLINE_TABLE - void *trampoline_table; - void *trampoline_table_entry; -#else - char tramp[FFI_TRAMPOLINE_SIZE]; -#endif - ffi_cif *cif; - -#if !FFI_NATIVE_RAW_API - - /* If this is enabled, then a raw closure has the same layout - as a regular closure. We use this to install an intermediate - handler to do the transaltion, void** -> ffi_raw*. */ - - void (*translate_args)(ffi_cif*,void*,void**,void*); - void *this_closure; - -#endif - - void (*fun)(ffi_cif*,void*,ffi_raw*,void*); - void *user_data; - -} ffi_raw_closure; - -typedef struct { -#if FFI_EXEC_TRAMPOLINE_TABLE - void *trampoline_table; - void *trampoline_table_entry; -#else - char tramp[FFI_TRAMPOLINE_SIZE]; -#endif - - ffi_cif *cif; - -#if !FFI_NATIVE_RAW_API - - /* If this is enabled, then a raw closure has the same layout - as a regular closure. We use this to install an intermediate - handler to do the translation, void** -> ffi_raw*. */ - - void (*translate_args)(ffi_cif*,void*,void**,void*); - void *this_closure; - -#endif - - void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*); - void *user_data; - -} ffi_java_raw_closure; - -FFI_API ffi_status -ffi_prep_raw_closure (ffi_raw_closure*, - ffi_cif *cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void *user_data); - -FFI_API ffi_status -ffi_prep_raw_closure_loc (ffi_raw_closure*, - ffi_cif *cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void *user_data, - void *codeloc); - -#if !FFI_NATIVE_RAW_API -FFI_API ffi_status -ffi_prep_java_raw_closure (ffi_java_raw_closure*, - ffi_cif *cif, - void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), - void *user_data) __attribute__((deprecated)); - -FFI_API ffi_status -ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*, - ffi_cif *cif, - void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), - void *user_data, - void *codeloc) __attribute__((deprecated)); -#endif - -#endif /* FFI_CLOSURES */ - -#if FFI_GO_CLOSURES - -typedef struct { - void *tramp; - ffi_cif *cif; - void (*fun)(ffi_cif*,void*,void**,void*); -} ffi_go_closure; - -FFI_API ffi_status ffi_prep_go_closure (ffi_go_closure*, ffi_cif *, - void (*fun)(ffi_cif*,void*,void**,void*)); - -FFI_API void ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue, - void **avalue, void *closure); - -#endif /* FFI_GO_CLOSURES */ - -/* ---- Public interface definition -------------------------------------- */ - -FFI_API -ffi_status ffi_prep_cif(ffi_cif *cif, - ffi_abi abi, - unsigned int nargs, - ffi_type *rtype, - ffi_type **atypes); - -FFI_API -ffi_status ffi_prep_cif_var(ffi_cif *cif, - ffi_abi abi, - unsigned int nfixedargs, - unsigned int ntotalargs, - ffi_type *rtype, - ffi_type **atypes); - -FFI_API -void ffi_call(ffi_cif *cif, - void (*fn)(void), - void *rvalue, - void **avalue); - -FFI_API -ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type, - size_t *offsets); - -/* Useful for eliminating compiler warnings. */ -#define FFI_FN(f) ((void (*)(void))f) - -/* ---- Definitions shared with assembly code ---------------------------- */ - -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/arm64-v8a/ffitarget.h b/FCLauncher/src/main/jni/lwjgl/libffi/arm64-v8a/ffitarget.h deleted file mode 100644 index 3ad68583..00000000 --- a/FCLauncher/src/main/jni/lwjgl/libffi/arm64-v8a/ffitarget.h +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -``Software''), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef LIBFFI_TARGET_H -#define LIBFFI_TARGET_H - -#ifndef LIBFFI_H -#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." -#endif - -#ifndef LIBFFI_ASM -#ifdef __ILP32__ -#define FFI_SIZEOF_ARG 8 -#define FFI_SIZEOF_JAVA_RAW 4 -typedef unsigned long long ffi_arg; -typedef signed long long ffi_sarg; -#elif defined(_WIN32) -#define FFI_SIZEOF_ARG 8 -typedef unsigned long long ffi_arg; -typedef signed long long ffi_sarg; -#else -typedef unsigned long ffi_arg; -typedef signed long ffi_sarg; -#endif - -typedef enum ffi_abi - { - FFI_FIRST_ABI = 0, - FFI_SYSV, - FFI_WIN64, - FFI_LAST_ABI, -#if defined(_WIN32) - FFI_DEFAULT_ABI = FFI_WIN64, -#else - FFI_DEFAULT_ABI = FFI_SYSV, -#endif - - // LWJGL - //FFI_WIN64 = -1, - FFI_GNUW64 = -1, - FFI_UNIX64 = -1, - FFI_EFI64 = -1, - //FFI_SYSV = -1, - FFI_STDCALL = -1, - FFI_THISCALL = -1, - FFI_FASTCALL = -1, - FFI_MS_CDECL = -1, - FFI_PASCAL = -1, - FFI_REGISTER = -1, - FFI_VFP = -1, - } ffi_abi; -#endif - -/* ---- Definitions for closures ----------------------------------------- */ - -#define FFI_CLOSURES 1 -#define FFI_NATIVE_RAW_API 0 - -#if defined (FFI_EXEC_TRAMPOLINE_TABLE) && FFI_EXEC_TRAMPOLINE_TABLE - -#ifdef __MACH__ -#define FFI_TRAMPOLINE_SIZE 16 -#define FFI_TRAMPOLINE_CLOSURE_OFFSET 16 -#else -#error "No trampoline table implementation" -#endif - -#else -#define FFI_TRAMPOLINE_SIZE 24 -#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE -#endif - -#ifdef _WIN32 -#define FFI_EXTRA_CIF_FIELDS unsigned is_variadic -#endif -#define FFI_TARGET_SPECIFIC_VARIADIC - -/* ---- Internal ---- */ - -#if defined (__APPLE__) -#define FFI_EXTRA_CIF_FIELDS unsigned aarch64_nfixedargs -#elif !defined(_WIN32) -/* iOS and Windows reserve x18 for the system. Disable Go closures until - a new static chain is chosen. */ -#define FFI_GO_CLOSURES 1 -#endif - -#ifndef _WIN32 -/* No complex type on Windows */ -#define FFI_TARGET_HAS_COMPLEX_TYPE -#endif - -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/arm64-v8a/libffi.a b/FCLauncher/src/main/jni/lwjgl/libffi/arm64-v8a/libffi.a deleted file mode 100644 index da273eb2..00000000 Binary files a/FCLauncher/src/main/jni/lwjgl/libffi/arm64-v8a/libffi.a and /dev/null differ diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/armeabi-v7a/ffitarget.h b/FCLauncher/src/main/jni/lwjgl/libffi/armeabi-v7a/ffitarget.h deleted file mode 100644 index 0f505888..00000000 --- a/FCLauncher/src/main/jni/lwjgl/libffi/armeabi-v7a/ffitarget.h +++ /dev/null @@ -1,103 +0,0 @@ -/* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 2012 Anthony Green - Copyright (c) 2010 CodeSourcery - Copyright (c) 1996-2003 Red Hat, Inc. - - Target configuration macros for ARM. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - ----------------------------------------------------------------------- */ - -#ifndef LIBFFI_TARGET_H -#define LIBFFI_TARGET_H - -#ifndef LIBFFI_H -#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." -#endif - -#ifndef LIBFFI_ASM -typedef unsigned long ffi_arg; -typedef signed long ffi_sarg; - -typedef enum ffi_abi { - FFI_FIRST_ABI = 0, - FFI_SYSV, - FFI_VFP, - FFI_LAST_ABI, -#if defined(__ARM_PCS_VFP) || defined(_M_ARM) - FFI_DEFAULT_ABI = FFI_VFP, -#else - FFI_DEFAULT_ABI = FFI_SYSV, -#endif - - // LWJGL - FFI_WIN64 = -1, - FFI_GNUW64 = -1, - FFI_UNIX64 = -1, - FFI_EFI64 = -1, - //FFI_SYSV = -1, - FFI_STDCALL = -1, - FFI_THISCALL = -1, - FFI_FASTCALL = -1, - FFI_MS_CDECL = -1, - FFI_PASCAL = -1, - FFI_REGISTER = -1, - //FFI_VFP = -1, -} ffi_abi; -#endif - -#define FFI_EXTRA_CIF_FIELDS \ - int vfp_used; \ - unsigned short vfp_reg_free, vfp_nargs; \ - signed char vfp_args[16] \ - -#define FFI_TARGET_SPECIFIC_VARIADIC -#ifndef _M_ARM -#define FFI_TARGET_HAS_COMPLEX_TYPE -#endif - -/* ---- Definitions for closures ----------------------------------------- */ - -#define FFI_CLOSURES 1 -#define FFI_GO_CLOSURES 1 -#define FFI_NATIVE_RAW_API 0 - -#if defined (FFI_EXEC_TRAMPOLINE_TABLE) && FFI_EXEC_TRAMPOLINE_TABLE - -#ifdef __MACH__ -#define FFI_TRAMPOLINE_SIZE 12 -#define FFI_TRAMPOLINE_CLOSURE_OFFSET 8 -#else -#error "No trampoline table implementation" -#endif - -#else -#ifdef _MSC_VER -#define FFI_TRAMPOLINE_SIZE 16 -#define FFI_TRAMPOLINE_CLOSURE_FUNCTION 12 -#else -#define FFI_TRAMPOLINE_SIZE 12 -#endif -#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE -#endif - -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/armeabi-v7a/libffi.a b/FCLauncher/src/main/jni/lwjgl/libffi/armeabi-v7a/libffi.a deleted file mode 100644 index 5b7a2077..00000000 Binary files a/FCLauncher/src/main/jni/lwjgl/libffi/armeabi-v7a/libffi.a and /dev/null differ diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/x86/ffitarget.h b/FCLauncher/src/main/jni/lwjgl/libffi/x86/ffitarget.h deleted file mode 100644 index 3cc1b29b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/libffi/x86/ffitarget.h +++ /dev/null @@ -1,217 +0,0 @@ -/* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 2012, 2014, 2018 Anthony Green - Copyright (c) 1996-2003, 2010 Red Hat, Inc. - Copyright (C) 2008 Free Software Foundation, Inc. - - Target configuration macros for x86 and x86-64. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - ----------------------------------------------------------------------- */ - -#ifndef LIBFFI_TARGET_H -#define LIBFFI_TARGET_H - -#ifndef LIBFFI_H -#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." -#endif - -/* ---- System specific configurations ----------------------------------- */ - -/* For code common to all platforms on x86 and x86_64. */ -#define X86_ANY - -#if defined (X86_64) && defined (__i386__) -#undef X86_64 -#define X86 -#endif - -#ifdef X86_WIN64 -#define FFI_SIZEOF_ARG 8 -#define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */ -#endif - -#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION -#ifndef _MSC_VER -#define FFI_TARGET_HAS_COMPLEX_TYPE -#endif - -/* ---- Generic type definitions ----------------------------------------- */ - -#ifndef LIBFFI_ASM -#ifdef X86_WIN64 -#ifdef _MSC_VER -typedef unsigned __int64 ffi_arg; -typedef __int64 ffi_sarg; -#else -typedef unsigned long long ffi_arg; -typedef long long ffi_sarg; -#endif -#else -#if defined __x86_64__ && defined __ILP32__ -#define FFI_SIZEOF_ARG 8 -#define FFI_SIZEOF_JAVA_RAW 4 -typedef unsigned long long ffi_arg; -typedef long long ffi_sarg; -#else -typedef unsigned long ffi_arg; -typedef signed long ffi_sarg; -#endif -#endif - -typedef enum ffi_abi { -#if defined(X86_WIN64) - FFI_FIRST_ABI = 0, - FFI_WIN64, /* sizeof(long double) == 8 - microsoft compilers */ - FFI_GNUW64, /* sizeof(long double) == 16 - GNU compilers */ - FFI_LAST_ABI, -#ifdef __GNUC__ - FFI_DEFAULT_ABI = FFI_GNUW64, -#else - FFI_DEFAULT_ABI = FFI_WIN64, - - // LWJGL - //FFI_WIN64 = -1, - //FFI_GNUW64 = -1, - FFI_UNIX64 = -1, - FFI_EFI64 = -1, - FFI_SYSV = -1, - FFI_STDCALL = -1, - FFI_THISCALL = -1, - FFI_FASTCALL = -1, - FFI_MS_CDECL = -1, - FFI_PASCAL = -1, - FFI_REGISTER = -1, - FFI_VFP = -1, -#endif - -#elif defined(X86_64) || (defined (__x86_64__) && defined (X86_DARWIN)) - FFI_FIRST_ABI = 1, - FFI_UNIX64, - FFI_WIN64, - FFI_EFI64 = FFI_WIN64, - FFI_GNUW64, - FFI_LAST_ABI, - FFI_DEFAULT_ABI = FFI_UNIX64, - - // LWJGL - //FFI_WIN64 = -1, - //FFI_GNUW64 = -1, - //FFI_UNIX64 = -1, - //FFI_EFI64 = -1, - FFI_SYSV = -1, - FFI_STDCALL = -1, - FFI_THISCALL = -1, - FFI_FASTCALL = -1, - FFI_MS_CDECL = -1, - FFI_PASCAL = -1, - FFI_REGISTER = -1, - FFI_VFP = -1, - -#elif defined(X86_WIN32) - FFI_FIRST_ABI = 0, - FFI_SYSV = 1, - FFI_STDCALL = 2, - FFI_THISCALL = 3, - FFI_FASTCALL = 4, - FFI_MS_CDECL = 5, - FFI_PASCAL = 6, - FFI_REGISTER = 7, - FFI_LAST_ABI, - FFI_DEFAULT_ABI = FFI_MS_CDECL, - - // LWJGL - FFI_WIN64 = -1, - FFI_GNUW64 = -1, - FFI_UNIX64 = -1, - FFI_EFI64 = -1, - //FFI_SYSV = -1, - //FFI_STDCALL = -1, - //FFI_THISCALL = -1, - //FFI_FASTCALL = -1, - //FFI_MS_CDECL = -1, - //FFI_PASCAL = -1, - //FFI_REGISTER = -1, - FFI_VFP = -1, -#else - FFI_FIRST_ABI = 0, - FFI_SYSV = 1, - FFI_THISCALL = 3, - FFI_FASTCALL = 4, - FFI_STDCALL = 5, - FFI_PASCAL = 6, - FFI_REGISTER = 7, - FFI_MS_CDECL = 8, - FFI_LAST_ABI, - FFI_DEFAULT_ABI = FFI_SYSV, - - // LWJGL - FFI_WIN64 = -1, - FFI_GNUW64 = -1, - FFI_UNIX64 = -1, - FFI_EFI64 = -1, - //FFI_SYSV = -1, - //FFI_STDCALL = -1, - //FFI_THISCALL = -1, - //FFI_FASTCALL = -1, - //FFI_MS_CDECL = -1, - //FFI_PASCAL = -1, - //FFI_REGISTER = -1, - FFI_VFP = -1, -#endif -} ffi_abi; -#endif - -/* ---- Definitions for closures ----------------------------------------- */ - -#define FFI_CLOSURES 1 -#define FFI_GO_CLOSURES 1 - -#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1) -#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2) -#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3) -#define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4) - -#if defined (X86_64) || defined(X86_WIN64) \ - || (defined (__x86_64__) && defined (X86_DARWIN)) -/* 4 bytes of ENDBR64 + 7 bytes of LEA + 6 bytes of JMP + 7 bytes of NOP - + 8 bytes of pointer. */ -# define FFI_TRAMPOLINE_SIZE 32 -# define FFI_NATIVE_RAW_API 0 -#else -/* 4 bytes of ENDBR32 + 5 bytes of MOV + 5 bytes of JMP + 2 unused - bytes. */ -# define FFI_TRAMPOLINE_SIZE 16 -# define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */ -#endif - -#if !defined(GENERATE_LIBFFI_MAP) && defined(__CET__) -# include -# if (__CET__ & 1) != 0 -# define ENDBR_PRESENT -# endif -# define _CET_NOTRACK notrack -#else -# define _CET_ENDBR -# define _CET_NOTRACK -#endif - -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/x86/libffi.a b/FCLauncher/src/main/jni/lwjgl/libffi/x86/libffi.a deleted file mode 100644 index b8e6c702..00000000 Binary files a/FCLauncher/src/main/jni/lwjgl/libffi/x86/libffi.a and /dev/null differ diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/x86_64/ffitarget.h b/FCLauncher/src/main/jni/lwjgl/libffi/x86_64/ffitarget.h deleted file mode 100644 index 13544cb7..00000000 --- a/FCLauncher/src/main/jni/lwjgl/libffi/x86_64/ffitarget.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 2012, 2014, 2018 Anthony Green - Copyright (c) 1996-2003, 2010 Red Hat, Inc. - Copyright (C) 2008 Free Software Foundation, Inc. - - Target configuration macros for x86 and x86-64. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - ----------------------------------------------------------------------- */ - -#ifndef LIBFFI_TARGET_H -#define LIBFFI_TARGET_H - -#ifndef LIBFFI_H -#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." -#endif - -/* ---- System specific configurations ----------------------------------- */ - -#define FFI_TARGET_SPECIFIC_STACK_SPACE_ALLOCATION -#ifndef _MSC_VER -#define FFI_TARGET_HAS_COMPLEX_TYPE -#endif - -/* ---- Generic type definitions ----------------------------------------- */ - -#ifndef LIBFFI_ASM -typedef unsigned long ffi_arg; -typedef signed long ffi_sarg; - -typedef enum ffi_abi { - - FFI_FIRST_ABI = 1, - FFI_UNIX64, - FFI_WIN64, - FFI_EFI64 = FFI_WIN64, - FFI_GNUW64, - FFI_LAST_ABI, - FFI_DEFAULT_ABI = FFI_UNIX64, - - // LWJGL - //FFI_WIN64 = -1, - //FFI_GNUW64 = -1, - //FFI_UNIX64 = -1, - //FFI_EFI64 = -1, - FFI_SYSV = -1, - FFI_STDCALL = -1, - FFI_THISCALL = -1, - FFI_FASTCALL = -1, - FFI_MS_CDECL = -1, - FFI_PASCAL = -1, - FFI_REGISTER = -1, - FFI_VFP = -1, - -} ffi_abi; -#endif - -/* ---- Definitions for closures ----------------------------------------- */ - -#define FFI_CLOSURES 1 -#define FFI_GO_CLOSURES 1 - -#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1) -#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2) -#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3) -#define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4) - -/* 4 bytes of ENDBR64 + 7 bytes of LEA + 6 bytes of JMP + 7 bytes of NOP - + 8 bytes of pointer. */ -# define FFI_TRAMPOLINE_SIZE 32 -# define FFI_NATIVE_RAW_API 0 - -# define _CET_ENDBR -# define _CET_NOTRACK - -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/libffi/x86_64/libffi.a b/FCLauncher/src/main/jni/lwjgl/libffi/x86_64/libffi.a deleted file mode 100644 index 921c2f75..00000000 Binary files a/FCLauncher/src/main/jni/lwjgl/libffi/x86_64/libffi.a and /dev/null differ diff --git a/FCLauncher/src/main/jni/lwjgl/lwjgl_malloc.h b/FCLauncher/src/main/jni/lwjgl/lwjgl_malloc.h deleted file mode 100644 index 2f35ee82..00000000 --- a/FCLauncher/src/main/jni/lwjgl/lwjgl_malloc.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#pragma once - -#include - -#define LWJGL_MALLOC(function) org_lwjgl_##function - -// Overridable memory management functions - -typedef void* (*mallocPROC) (size_t); -typedef void* (*callocPROC) (size_t num, size_t size); -typedef void* (*reallocPROC) (void *ptr, size_t size); -typedef void (*freePROC) (void *ptr); -typedef void* (*aligned_allocPROC) (size_t alignment, size_t size); -typedef void (*aligned_freePROC) (void *ptr); - -extern mallocPROC org_lwjgl_malloc; -extern callocPROC org_lwjgl_calloc; -extern reallocPROC org_lwjgl_realloc; -extern freePROC org_lwjgl_free; - -extern aligned_allocPROC org_lwjgl_aligned_alloc; -extern aligned_freePROC org_lwjgl_aligned_free; - -#ifdef LWJGL_MALLOC_LIB -#define XSETUP_MALLOC(classPath) SETUP_MALLOC(classPath) -#define SETUP_MALLOC(classPath) \ -JNIEXPORT void JNICALL Java_##classPath##_setupMalloc( \ - JNIEnv *env, jclass clazz, \ - \ - jlong malloc, \ - jlong calloc, \ - jlong realloc, \ - jlong free, \ - \ - jlong aligned_alloc, \ - jlong aligned_free \ -) { \ - UNUSED_PARAMS(env, clazz) \ - \ - org_lwjgl_malloc = (mallocPROC)(uintptr_t)malloc; \ - org_lwjgl_calloc = (callocPROC)(uintptr_t)calloc; \ - org_lwjgl_realloc = (reallocPROC)(uintptr_t)realloc; \ - org_lwjgl_free = (freePROC)(uintptr_t)free; \ - \ - org_lwjgl_aligned_alloc = (aligned_allocPROC)(uintptr_t)aligned_alloc; \ - org_lwjgl_aligned_free = (aligned_freePROC)(uintptr_t)aligned_free; \ -} - -mallocPROC org_lwjgl_malloc; -callocPROC org_lwjgl_calloc; -reallocPROC org_lwjgl_realloc; -freePROC org_lwjgl_free; - -aligned_allocPROC org_lwjgl_aligned_alloc; -aligned_freePROC org_lwjgl_aligned_free; - -EXTERN_C_ENTER - -XSETUP_MALLOC(LWJGL_MALLOC_LIB) - -EXTERN_C_EXIT -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/blendish.h b/FCLauncher/src/main/jni/lwjgl/nanovg/blendish.h deleted file mode 100644 index b52df146..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/blendish.h +++ /dev/null @@ -1,2400 +0,0 @@ -/* -Blendish - Blender 2.5 UI based theming functions for NanoVG - -Copyright (c) 2014 Leonard Ritter - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -*/ - -#ifndef BLENDISH_H -#define BLENDISH_H - -#include "nanovg.h" - -#ifndef NANOVG_H -#error "nanovg.h must be included first." -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - -Revision 6 (2014-09-21) - -Summary -------- - -Blendish is a small collection of drawing functions for NanoVG, designed to -replicate the look of the Blender 2.5+ User Interface. You can use these -functions to theme your UI library. Several metric constants for faithful -reproduction are also included. - -Blendish supports the original Blender icon sheet; As the licensing of Blenders -icons is unclear, they are not included in Blendishes repository, but a SVG -template, "icons_template.svg" is provided, which you can use to build your own -icon sheet. - -To use icons, you must first load the icon sheet using one of the -nvgCreateImage*() functions and then pass the image handle to bndSetIconImage(); -otherwise, no icons will be drawn. See bndSetIconImage() for more information. - -Blendish will not render text until a suitable UI font has been passed to -bndSetFont() has been called. See bndSetFont() for more information. - - -Drawbacks ---------- - -There is no support for varying dpi resolutions yet. The library is hardcoded -to the equivalent of 72 dpi in the Blender system settings. - -Support for label truncation is missing. Text rendering breaks when widgets are -too short to contain their labels. - -Usage ------ - -To use this header file in implementation mode, define BLENDISH_IMPLEMENTATION -before including blendish.h, otherwise the file will be in header-only mode. - -*/ - -// you can override this from the outside to pick -// the export level you need -#ifndef BND_EXPORT -#define BND_EXPORT -#endif - -// if that typedef is provided elsewhere, you may define -// BLENDISH_NO_NVG_TYPEDEFS before including the header. -#ifndef BLENDISH_NO_NVG_TYPEDEFS -typedef struct NVGcontext NVGcontext; -typedef struct NVGcolor NVGcolor; -typedef struct NVGglyphPosition NVGglyphPosition; -#endif - -// describes the theme used to draw a single widget or widget box; -// these values correspond to the same values that can be retrieved from -// the Theme panel in the Blender preferences -typedef struct BNDwidgetTheme { - // color of widget box outline - NVGcolor outlineColor; - // color of widget item (meaning changes depending on class) - NVGcolor itemColor; - // fill color of widget box - NVGcolor innerColor; - // fill color of widget box when active - NVGcolor innerSelectedColor; - // color of text label - NVGcolor textColor; - // color of text label when active - NVGcolor textSelectedColor; - // delta modifier for upper part of gradient (-100 to 100) - int shadeTop; - // delta modifier for lower part of gradient (-100 to 100) - int shadeDown; -} BNDwidgetTheme; - -// describes the theme used to draw nodes -typedef struct BNDnodeTheme { - // inner color of selected node (and downarrow) - NVGcolor nodeSelectedColor; - // outline of wires - NVGcolor wiresColor; - // color of text label when active - NVGcolor textSelectedColor; - - // inner color of active node (and dragged wire) - NVGcolor activeNodeColor; - // color of selected wire - NVGcolor wireSelectColor; - // color of background of node - NVGcolor nodeBackdropColor; - - // how much a noodle curves (0 to 10) - int noodleCurving; -} BNDnodeTheme; - -// describes the theme used to draw widgets -typedef struct BNDtheme { - // the background color of panels and windows - NVGcolor backgroundColor; - // theme for labels - BNDwidgetTheme regularTheme; - // theme for tool buttons - BNDwidgetTheme toolTheme; - // theme for radio buttons - BNDwidgetTheme radioTheme; - // theme for text fields - BNDwidgetTheme textFieldTheme; - // theme for option buttons (checkboxes) - BNDwidgetTheme optionTheme; - // theme for choice buttons (comboboxes) - // Blender calls them "menu buttons" - BNDwidgetTheme choiceTheme; - // theme for number fields - BNDwidgetTheme numberFieldTheme; - // theme for slider controls - BNDwidgetTheme sliderTheme; - // theme for scrollbars - BNDwidgetTheme scrollBarTheme; - // theme for tooltips - BNDwidgetTheme tooltipTheme; - // theme for menu backgrounds - BNDwidgetTheme menuTheme; - // theme for menu items - BNDwidgetTheme menuItemTheme; - // theme for nodes - BNDnodeTheme nodeTheme; -} BNDtheme; - -// how text on a control is aligned -typedef enum BNDtextAlignment { - BND_LEFT = 0, - BND_CENTER, -} BNDtextAlignment; - -// states altering the styling of a widget -typedef enum BNDwidgetState { - // not interacting - BND_DEFAULT = 0, - // the mouse is hovering over the control - BND_HOVER, - // the widget is activated (pressed) or in an active state (toggled) - BND_ACTIVE -} BNDwidgetState; - -// flags indicating which corners are sharp (for grouping widgets) -typedef enum BNDcornerFlags { - // all corners are round - BND_CORNER_NONE = 0, - // sharp top left corner - BND_CORNER_TOP_LEFT = 1, - // sharp top right corner - BND_CORNER_TOP_RIGHT = 2, - // sharp bottom right corner - BND_CORNER_DOWN_RIGHT = 4, - // sharp bottom left corner - BND_CORNER_DOWN_LEFT = 8, - // all corners are sharp; - // you can invert a set of flags using ^= BND_CORNER_ALL - BND_CORNER_ALL = 0xF, - // top border is sharp - BND_CORNER_TOP = 3, - // bottom border is sharp - BND_CORNER_DOWN = 0xC, - // left border is sharp - BND_CORNER_LEFT = 9, - // right border is sharp - BND_CORNER_RIGHT = 6 -} BNDcornerFlags; - -// build an icon ID from two coordinates into the icon sheet, where -// (0,0) designates the upper-leftmost icon, (1,0) the one right next to it, -// and so on. -#define BND_ICONID(x,y) ((x)|((y)<<8)) -// alpha of disabled widget groups -// can be used in conjunction with nvgGlobalAlpha() -#define BND_DISABLED_ALPHA 0.5 - -enum { - // default widget height - BND_WIDGET_HEIGHT = 21, - // default toolbutton width (if icon only) - BND_TOOL_WIDTH = 20, - - // default radius of node ports - BND_NODE_PORT_RADIUS = 5, - // top margin of node content - BND_NODE_MARGIN_TOP = 25, - // bottom margin of node content - BND_NODE_MARGIN_DOWN = 5, - // left and right margin of node content - BND_NODE_MARGIN_SIDE = 10, - // height of node title bar - BND_NODE_TITLE_HEIGHT = 20, - // width of node title arrow click area - BND_NODE_ARROW_AREA_WIDTH = 20, - - // size of splitter corner click area - BND_SPLITTER_AREA_SIZE = 12, - - // width of vertical scrollbar - BND_SCROLLBAR_WIDTH = 13, - // height of horizontal scrollbar - BND_SCROLLBAR_HEIGHT = 14, - - // default vertical spacing - BND_VSPACING = 1, - // default vertical spacing between groups - BND_VSPACING_GROUP = 8, - // default horizontal spacing - BND_HSPACING = 8, -}; - -typedef enum BNDicon { - BND_ICON_NONE = BND_ICONID(0,29), - BND_ICON_QUESTION = BND_ICONID(1,29), - BND_ICON_ERROR = BND_ICONID(2,29), - BND_ICON_CANCEL = BND_ICONID(3,29), - BND_ICON_TRIA_RIGHT = BND_ICONID(4,29), - BND_ICON_TRIA_DOWN = BND_ICONID(5,29), - BND_ICON_TRIA_LEFT = BND_ICONID(6,29), - BND_ICON_TRIA_UP = BND_ICONID(7,29), - BND_ICON_ARROW_LEFTRIGHT = BND_ICONID(8,29), - BND_ICON_PLUS = BND_ICONID(9,29), - BND_ICON_DISCLOSURE_TRI_DOWN = BND_ICONID(10,29), - BND_ICON_DISCLOSURE_TRI_RIGHT = BND_ICONID(11,29), - BND_ICON_RADIOBUT_OFF = BND_ICONID(12,29), - BND_ICON_RADIOBUT_ON = BND_ICONID(13,29), - BND_ICON_MENU_PANEL = BND_ICONID(14,29), - BND_ICON_BLENDER = BND_ICONID(15,29), - BND_ICON_GRIP = BND_ICONID(16,29), - BND_ICON_DOT = BND_ICONID(17,29), - BND_ICON_COLLAPSEMENU = BND_ICONID(18,29), - BND_ICON_X = BND_ICONID(19,29), - BND_ICON_GO_LEFT = BND_ICONID(21,29), - BND_ICON_PLUG = BND_ICONID(22,29), - BND_ICON_UI = BND_ICONID(23,29), - BND_ICON_NODE = BND_ICONID(24,29), - BND_ICON_NODE_SEL = BND_ICONID(25,29), - - BND_ICON_FULLSCREEN = BND_ICONID(0,28), - BND_ICON_SPLITSCREEN = BND_ICONID(1,28), - BND_ICON_RIGHTARROW_THIN = BND_ICONID(2,28), - BND_ICON_BORDERMOVE = BND_ICONID(3,28), - BND_ICON_VIEWZOOM = BND_ICONID(4,28), - BND_ICON_ZOOMIN = BND_ICONID(5,28), - BND_ICON_ZOOMOUT = BND_ICONID(6,28), - BND_ICON_PANEL_CLOSE = BND_ICONID(7,28), - BND_ICON_COPY_ID = BND_ICONID(8,28), - BND_ICON_EYEDROPPER = BND_ICONID(9,28), - BND_ICON_LINK_AREA = BND_ICONID(10,28), - BND_ICON_AUTO = BND_ICONID(11,28), - BND_ICON_CHECKBOX_DEHLT = BND_ICONID(12,28), - BND_ICON_CHECKBOX_HLT = BND_ICONID(13,28), - BND_ICON_UNLOCKED = BND_ICONID(14,28), - BND_ICON_LOCKED = BND_ICONID(15,28), - BND_ICON_UNPINNED = BND_ICONID(16,28), - BND_ICON_PINNED = BND_ICONID(17,28), - BND_ICON_SCREEN_BACK = BND_ICONID(18,28), - BND_ICON_RIGHTARROW = BND_ICONID(19,28), - BND_ICON_DOWNARROW_HLT = BND_ICONID(20,28), - BND_ICON_DOTSUP = BND_ICONID(21,28), - BND_ICON_DOTSDOWN = BND_ICONID(22,28), - BND_ICON_LINK = BND_ICONID(23,28), - BND_ICON_INLINK = BND_ICONID(24,28), - BND_ICON_PLUGIN = BND_ICONID(25,28), - - BND_ICON_HELP = BND_ICONID(0,27), - BND_ICON_GHOST_ENABLED = BND_ICONID(1,27), - BND_ICON_COLOR = BND_ICONID(2,27), - BND_ICON_LINKED = BND_ICONID(3,27), - BND_ICON_UNLINKED = BND_ICONID(4,27), - BND_ICON_HAND = BND_ICONID(5,27), - BND_ICON_ZOOM_ALL = BND_ICONID(6,27), - BND_ICON_ZOOM_SELECTED = BND_ICONID(7,27), - BND_ICON_ZOOM_PREVIOUS = BND_ICONID(8,27), - BND_ICON_ZOOM_IN = BND_ICONID(9,27), - BND_ICON_ZOOM_OUT = BND_ICONID(10,27), - BND_ICON_RENDER_REGION = BND_ICONID(11,27), - BND_ICON_BORDER_RECT = BND_ICONID(12,27), - BND_ICON_BORDER_LASSO = BND_ICONID(13,27), - BND_ICON_FREEZE = BND_ICONID(14,27), - BND_ICON_STYLUS_PRESSURE = BND_ICONID(15,27), - BND_ICON_GHOST_DISABLED = BND_ICONID(16,27), - BND_ICON_NEW = BND_ICONID(17,27), - BND_ICON_FILE_TICK = BND_ICONID(18,27), - BND_ICON_QUIT = BND_ICONID(19,27), - BND_ICON_URL = BND_ICONID(20,27), - BND_ICON_RECOVER_LAST = BND_ICONID(21,27), - BND_ICON_FULLSCREEN_ENTER = BND_ICONID(23,27), - BND_ICON_FULLSCREEN_EXIT = BND_ICONID(24,27), - BND_ICON_BLANK1 = BND_ICONID(25,27), - - BND_ICON_LAMP = BND_ICONID(0,26), - BND_ICON_MATERIAL = BND_ICONID(1,26), - BND_ICON_TEXTURE = BND_ICONID(2,26), - BND_ICON_ANIM = BND_ICONID(3,26), - BND_ICON_WORLD = BND_ICONID(4,26), - BND_ICON_SCENE = BND_ICONID(5,26), - BND_ICON_EDIT = BND_ICONID(6,26), - BND_ICON_GAME = BND_ICONID(7,26), - BND_ICON_RADIO = BND_ICONID(8,26), - BND_ICON_SCRIPT = BND_ICONID(9,26), - BND_ICON_PARTICLES = BND_ICONID(10,26), - BND_ICON_PHYSICS = BND_ICONID(11,26), - BND_ICON_SPEAKER = BND_ICONID(12,26), - BND_ICON_TEXTURE_SHADED = BND_ICONID(13,26), - - BND_ICON_VIEW3D = BND_ICONID(0,25), - BND_ICON_IPO = BND_ICONID(1,25), - BND_ICON_OOPS = BND_ICONID(2,25), - BND_ICON_BUTS = BND_ICONID(3,25), - BND_ICON_FILESEL = BND_ICONID(4,25), - BND_ICON_IMAGE_COL = BND_ICONID(5,25), - BND_ICON_INFO = BND_ICONID(6,25), - BND_ICON_SEQUENCE = BND_ICONID(7,25), - BND_ICON_TEXT = BND_ICONID(8,25), - BND_ICON_IMASEL = BND_ICONID(9,25), - BND_ICON_SOUND = BND_ICONID(10,25), - BND_ICON_ACTION = BND_ICONID(11,25), - BND_ICON_NLA = BND_ICONID(12,25), - BND_ICON_SCRIPTWIN = BND_ICONID(13,25), - BND_ICON_TIME = BND_ICONID(14,25), - BND_ICON_NODETREE = BND_ICONID(15,25), - BND_ICON_LOGIC = BND_ICONID(16,25), - BND_ICON_CONSOLE = BND_ICONID(17,25), - BND_ICON_PREFERENCES = BND_ICONID(18,25), - BND_ICON_CLIP = BND_ICONID(19,25), - BND_ICON_ASSET_MANAGER = BND_ICONID(20,25), - - BND_ICON_OBJECT_DATAMODE = BND_ICONID(0,24), - BND_ICON_EDITMODE_HLT = BND_ICONID(1,24), - BND_ICON_FACESEL_HLT = BND_ICONID(2,24), - BND_ICON_VPAINT_HLT = BND_ICONID(3,24), - BND_ICON_TPAINT_HLT = BND_ICONID(4,24), - BND_ICON_WPAINT_HLT = BND_ICONID(5,24), - BND_ICON_SCULPTMODE_HLT = BND_ICONID(6,24), - BND_ICON_POSE_HLT = BND_ICONID(7,24), - BND_ICON_PARTICLEMODE = BND_ICONID(8,24), - BND_ICON_LIGHTPAINT = BND_ICONID(9,24), - - BND_ICON_SCENE_DATA = BND_ICONID(0,23), - BND_ICON_RENDERLAYERS = BND_ICONID(1,23), - BND_ICON_WORLD_DATA = BND_ICONID(2,23), - BND_ICON_OBJECT_DATA = BND_ICONID(3,23), - BND_ICON_MESH_DATA = BND_ICONID(4,23), - BND_ICON_CURVE_DATA = BND_ICONID(5,23), - BND_ICON_META_DATA = BND_ICONID(6,23), - BND_ICON_LATTICE_DATA = BND_ICONID(7,23), - BND_ICON_LAMP_DATA = BND_ICONID(8,23), - BND_ICON_MATERIAL_DATA = BND_ICONID(9,23), - BND_ICON_TEXTURE_DATA = BND_ICONID(10,23), - BND_ICON_ANIM_DATA = BND_ICONID(11,23), - BND_ICON_CAMERA_DATA = BND_ICONID(12,23), - BND_ICON_PARTICLE_DATA = BND_ICONID(13,23), - BND_ICON_LIBRARY_DATA_DIRECT = BND_ICONID(14,23), - BND_ICON_GROUP = BND_ICONID(15,23), - BND_ICON_ARMATURE_DATA = BND_ICONID(16,23), - BND_ICON_POSE_DATA = BND_ICONID(17,23), - BND_ICON_BONE_DATA = BND_ICONID(18,23), - BND_ICON_CONSTRAINT = BND_ICONID(19,23), - BND_ICON_SHAPEKEY_DATA = BND_ICONID(20,23), - BND_ICON_CONSTRAINT_BONE = BND_ICONID(21,23), - BND_ICON_CAMERA_STEREO = BND_ICONID(22,23), - BND_ICON_PACKAGE = BND_ICONID(23,23), - BND_ICON_UGLYPACKAGE = BND_ICONID(24,23), - - BND_ICON_BRUSH_DATA = BND_ICONID(0,22), - BND_ICON_IMAGE_DATA = BND_ICONID(1,22), - BND_ICON_FILE = BND_ICONID(2,22), - BND_ICON_FCURVE = BND_ICONID(3,22), - BND_ICON_FONT_DATA = BND_ICONID(4,22), - BND_ICON_RENDER_RESULT = BND_ICONID(5,22), - BND_ICON_SURFACE_DATA = BND_ICONID(6,22), - BND_ICON_EMPTY_DATA = BND_ICONID(7,22), - BND_ICON_SETTINGS = BND_ICONID(8,22), - BND_ICON_RENDER_ANIMATION = BND_ICONID(9,22), - BND_ICON_RENDER_STILL = BND_ICONID(10,22), - BND_ICON_BOIDS = BND_ICONID(12,22), - BND_ICON_STRANDS = BND_ICONID(13,22), - BND_ICON_LIBRARY_DATA_INDIRECT = BND_ICONID(14,22), - BND_ICON_GREASEPENCIL = BND_ICONID(15,22), - BND_ICON_LINE_DATA = BND_ICONID(16,22), - BND_ICON_GROUP_BONE = BND_ICONID(18,22), - BND_ICON_GROUP_VERTEX = BND_ICONID(19,22), - BND_ICON_GROUP_VCOL = BND_ICONID(20,22), - BND_ICON_GROUP_UVS = BND_ICONID(21,22), - BND_ICON_RNA = BND_ICONID(24,22), - BND_ICON_RNA_ADD = BND_ICONID(25,22), - - BND_ICON_OUTLINER_OB_EMPTY = BND_ICONID(0,20), - BND_ICON_OUTLINER_OB_MESH = BND_ICONID(1,20), - BND_ICON_OUTLINER_OB_CURVE = BND_ICONID(2,20), - BND_ICON_OUTLINER_OB_LATTICE = BND_ICONID(3,20), - BND_ICON_OUTLINER_OB_META = BND_ICONID(4,20), - BND_ICON_OUTLINER_OB_LAMP = BND_ICONID(5,20), - BND_ICON_OUTLINER_OB_CAMERA = BND_ICONID(6,20), - BND_ICON_OUTLINER_OB_ARMATURE = BND_ICONID(7,20), - BND_ICON_OUTLINER_OB_FONT = BND_ICONID(8,20), - BND_ICON_OUTLINER_OB_SURFACE = BND_ICONID(9,20), - BND_ICON_OUTLINER_OB_SPEAKER = BND_ICONID(10,20), - BND_ICON_RESTRICT_VIEW_OFF = BND_ICONID(19,20), - BND_ICON_RESTRICT_VIEW_ON = BND_ICONID(20,20), - BND_ICON_RESTRICT_SELECT_OFF = BND_ICONID(21,20), - BND_ICON_RESTRICT_SELECT_ON = BND_ICONID(22,20), - BND_ICON_RESTRICT_RENDER_OFF = BND_ICONID(23,20), - BND_ICON_RESTRICT_RENDER_ON = BND_ICONID(24,20), - - BND_ICON_OUTLINER_DATA_EMPTY = BND_ICONID(0,19), - BND_ICON_OUTLINER_DATA_MESH = BND_ICONID(1,19), - BND_ICON_OUTLINER_DATA_CURVE = BND_ICONID(2,19), - BND_ICON_OUTLINER_DATA_LATTICE = BND_ICONID(3,19), - BND_ICON_OUTLINER_DATA_META = BND_ICONID(4,19), - BND_ICON_OUTLINER_DATA_LAMP = BND_ICONID(5,19), - BND_ICON_OUTLINER_DATA_CAMERA = BND_ICONID(6,19), - BND_ICON_OUTLINER_DATA_ARMATURE = BND_ICONID(7,19), - BND_ICON_OUTLINER_DATA_FONT = BND_ICONID(8,19), - BND_ICON_OUTLINER_DATA_SURFACE = BND_ICONID(9,19), - BND_ICON_OUTLINER_DATA_SPEAKER = BND_ICONID(10,19), - BND_ICON_OUTLINER_DATA_POSE = BND_ICONID(11,19), - - BND_ICON_MESH_PLANE = BND_ICONID(0,18), - BND_ICON_MESH_CUBE = BND_ICONID(1,18), - BND_ICON_MESH_CIRCLE = BND_ICONID(2,18), - BND_ICON_MESH_UVSPHERE = BND_ICONID(3,18), - BND_ICON_MESH_ICOSPHERE = BND_ICONID(4,18), - BND_ICON_MESH_GRID = BND_ICONID(5,18), - BND_ICON_MESH_MONKEY = BND_ICONID(6,18), - BND_ICON_MESH_CYLINDER = BND_ICONID(7,18), - BND_ICON_MESH_TORUS = BND_ICONID(8,18), - BND_ICON_MESH_CONE = BND_ICONID(9,18), - BND_ICON_LAMP_POINT = BND_ICONID(12,18), - BND_ICON_LAMP_SUN = BND_ICONID(13,18), - BND_ICON_LAMP_SPOT = BND_ICONID(14,18), - BND_ICON_LAMP_HEMI = BND_ICONID(15,18), - BND_ICON_LAMP_AREA = BND_ICONID(16,18), - BND_ICON_META_EMPTY = BND_ICONID(19,18), - BND_ICON_META_PLANE = BND_ICONID(20,18), - BND_ICON_META_CUBE = BND_ICONID(21,18), - BND_ICON_META_BALL = BND_ICONID(22,18), - BND_ICON_META_ELLIPSOID = BND_ICONID(23,18), - BND_ICON_META_CAPSULE = BND_ICONID(24,18), - - BND_ICON_SURFACE_NCURVE = BND_ICONID(0,17), - BND_ICON_SURFACE_NCIRCLE = BND_ICONID(1,17), - BND_ICON_SURFACE_NSURFACE = BND_ICONID(2,17), - BND_ICON_SURFACE_NCYLINDER = BND_ICONID(3,17), - BND_ICON_SURFACE_NSPHERE = BND_ICONID(4,17), - BND_ICON_SURFACE_NTORUS = BND_ICONID(5,17), - BND_ICON_CURVE_BEZCURVE = BND_ICONID(9,17), - BND_ICON_CURVE_BEZCIRCLE = BND_ICONID(10,17), - BND_ICON_CURVE_NCURVE = BND_ICONID(11,17), - BND_ICON_CURVE_NCIRCLE = BND_ICONID(12,17), - BND_ICON_CURVE_PATH = BND_ICONID(13,17), - BND_ICON_COLOR_RED = BND_ICONID(19,17), - BND_ICON_COLOR_GREEN = BND_ICONID(20,17), - BND_ICON_COLOR_BLUE = BND_ICONID(21,17), - - BND_ICON_FORCE_FORCE = BND_ICONID(0,16), - BND_ICON_FORCE_WIND = BND_ICONID(1,16), - BND_ICON_FORCE_VORTEX = BND_ICONID(2,16), - BND_ICON_FORCE_MAGNETIC = BND_ICONID(3,16), - BND_ICON_FORCE_HARMONIC = BND_ICONID(4,16), - BND_ICON_FORCE_CHARGE = BND_ICONID(5,16), - BND_ICON_FORCE_LENNARDJONES = BND_ICONID(6,16), - BND_ICON_FORCE_TEXTURE = BND_ICONID(7,16), - BND_ICON_FORCE_CURVE = BND_ICONID(8,16), - BND_ICON_FORCE_BOID = BND_ICONID(9,16), - BND_ICON_FORCE_TURBULENCE = BND_ICONID(10,16), - BND_ICON_FORCE_DRAG = BND_ICONID(11,16), - BND_ICON_FORCE_SMOKEFLOW = BND_ICONID(12,16), - - BND_ICON_MODIFIER = BND_ICONID(0,12), - BND_ICON_MOD_WAVE = BND_ICONID(1,12), - BND_ICON_MOD_BUILD = BND_ICONID(2,12), - BND_ICON_MOD_DECIM = BND_ICONID(3,12), - BND_ICON_MOD_MIRROR = BND_ICONID(4,12), - BND_ICON_MOD_SOFT = BND_ICONID(5,12), - BND_ICON_MOD_SUBSURF = BND_ICONID(6,12), - BND_ICON_HOOK = BND_ICONID(7,12), - BND_ICON_MOD_PHYSICS = BND_ICONID(8,12), - BND_ICON_MOD_PARTICLES = BND_ICONID(9,12), - BND_ICON_MOD_BOOLEAN = BND_ICONID(10,12), - BND_ICON_MOD_EDGESPLIT = BND_ICONID(11,12), - BND_ICON_MOD_ARRAY = BND_ICONID(12,12), - BND_ICON_MOD_UVPROJECT = BND_ICONID(13,12), - BND_ICON_MOD_DISPLACE = BND_ICONID(14,12), - BND_ICON_MOD_CURVE = BND_ICONID(15,12), - BND_ICON_MOD_LATTICE = BND_ICONID(16,12), - BND_ICON_CONSTRAINT_DATA = BND_ICONID(17,12), - BND_ICON_MOD_ARMATURE = BND_ICONID(18,12), - BND_ICON_MOD_SHRINKWRAP = BND_ICONID(19,12), - BND_ICON_MOD_CAST = BND_ICONID(20,12), - BND_ICON_MOD_MESHDEFORM = BND_ICONID(21,12), - BND_ICON_MOD_BEVEL = BND_ICONID(22,12), - BND_ICON_MOD_SMOOTH = BND_ICONID(23,12), - BND_ICON_MOD_SIMPLEDEFORM = BND_ICONID(24,12), - BND_ICON_MOD_MASK = BND_ICONID(25,12), - - BND_ICON_MOD_CLOTH = BND_ICONID(0,11), - BND_ICON_MOD_EXPLODE = BND_ICONID(1,11), - BND_ICON_MOD_FLUIDSIM = BND_ICONID(2,11), - BND_ICON_MOD_MULTIRES = BND_ICONID(3,11), - BND_ICON_MOD_SMOKE = BND_ICONID(4,11), - BND_ICON_MOD_SOLIDIFY = BND_ICONID(5,11), - BND_ICON_MOD_SCREW = BND_ICONID(6,11), - BND_ICON_MOD_VERTEX_WEIGHT = BND_ICONID(7,11), - BND_ICON_MOD_DYNAMICPAINT = BND_ICONID(8,11), - BND_ICON_MOD_REMESH = BND_ICONID(9,11), - BND_ICON_MOD_OCEAN = BND_ICONID(10,11), - BND_ICON_MOD_WARP = BND_ICONID(11,11), - BND_ICON_MOD_SKIN = BND_ICONID(12,11), - BND_ICON_MOD_TRIANGULATE = BND_ICONID(13,11), - BND_ICON_MOD_WIREFRAME = BND_ICONID(14,11), - - BND_ICON_REC = BND_ICONID(0,10), - BND_ICON_PLAY = BND_ICONID(1,10), - BND_ICON_FF = BND_ICONID(2,10), - BND_ICON_REW = BND_ICONID(3,10), - BND_ICON_PAUSE = BND_ICONID(4,10), - BND_ICON_PREV_KEYFRAME = BND_ICONID(5,10), - BND_ICON_NEXT_KEYFRAME = BND_ICONID(6,10), - BND_ICON_PLAY_AUDIO = BND_ICONID(7,10), - BND_ICON_PLAY_REVERSE = BND_ICONID(8,10), - BND_ICON_PREVIEW_RANGE = BND_ICONID(9,10), - BND_ICON_ACTION_TWEAK = BND_ICONID(10,10), - BND_ICON_PMARKER_ACT = BND_ICONID(11,10), - BND_ICON_PMARKER_SEL = BND_ICONID(12,10), - BND_ICON_PMARKER = BND_ICONID(13,10), - BND_ICON_MARKER_HLT = BND_ICONID(14,10), - BND_ICON_MARKER = BND_ICONID(15,10), - BND_ICON_SPACE2 = BND_ICONID(16,10), - BND_ICON_SPACE3 = BND_ICONID(17,10), - BND_ICON_KEYINGSET = BND_ICONID(18,10), - BND_ICON_KEY_DEHLT = BND_ICONID(19,10), - BND_ICON_KEY_HLT = BND_ICONID(20,10), - BND_ICON_MUTE_IPO_OFF = BND_ICONID(21,10), - BND_ICON_MUTE_IPO_ON = BND_ICONID(22,10), - BND_ICON_VISIBLE_IPO_OFF = BND_ICONID(23,10), - BND_ICON_VISIBLE_IPO_ON = BND_ICONID(24,10), - BND_ICON_DRIVER = BND_ICONID(25,10), - - BND_ICON_SOLO_OFF = BND_ICONID(0,9), - BND_ICON_SOLO_ON = BND_ICONID(1,9), - BND_ICON_FRAME_PREV = BND_ICONID(2,9), - BND_ICON_FRAME_NEXT = BND_ICONID(3,9), - BND_ICON_NLA_PUSHDOWN = BND_ICONID(4,9), - BND_ICON_IPO_CONSTANT = BND_ICONID(5,9), - BND_ICON_IPO_LINEAR = BND_ICONID(6,9), - BND_ICON_IPO_BEZIER = BND_ICONID(7,9), - BND_ICON_IPO_SINE = BND_ICONID(8,9), - BND_ICON_IPO_QUAD = BND_ICONID(9,9), - BND_ICON_IPO_CUBIC = BND_ICONID(10,9), - BND_ICON_IPO_QUART = BND_ICONID(11,9), - BND_ICON_IPO_QUINT = BND_ICONID(12,9), - BND_ICON_IPO_EXPO = BND_ICONID(13,9), - BND_ICON_IPO_CIRC = BND_ICONID(14,9), - BND_ICON_IPO_BOUNCE = BND_ICONID(15,9), - BND_ICON_IPO_ELASTIC = BND_ICONID(16,9), - BND_ICON_IPO_BACK = BND_ICONID(17,9), - BND_ICON_IPO_EASE_IN = BND_ICONID(18,9), - BND_ICON_IPO_EASE_OUT = BND_ICONID(19,9), - BND_ICON_IPO_EASE_IN_OUT = BND_ICONID(20,9), - - BND_ICON_VERTEXSEL = BND_ICONID(0,8), - BND_ICON_EDGESEL = BND_ICONID(1,8), - BND_ICON_FACESEL = BND_ICONID(2,8), - BND_ICON_LOOPSEL = BND_ICONID(3,8), - BND_ICON_ROTATE = BND_ICONID(5,8), - BND_ICON_CURSOR = BND_ICONID(6,8), - BND_ICON_ROTATECOLLECTION = BND_ICONID(7,8), - BND_ICON_ROTATECENTER = BND_ICONID(8,8), - BND_ICON_ROTACTIVE = BND_ICONID(9,8), - BND_ICON_ALIGN = BND_ICONID(10,8), - BND_ICON_SMOOTHCURVE = BND_ICONID(12,8), - BND_ICON_SPHERECURVE = BND_ICONID(13,8), - BND_ICON_ROOTCURVE = BND_ICONID(14,8), - BND_ICON_SHARPCURVE = BND_ICONID(15,8), - BND_ICON_LINCURVE = BND_ICONID(16,8), - BND_ICON_NOCURVE = BND_ICONID(17,8), - BND_ICON_RNDCURVE = BND_ICONID(18,8), - BND_ICON_PROP_OFF = BND_ICONID(19,8), - BND_ICON_PROP_ON = BND_ICONID(20,8), - BND_ICON_PROP_CON = BND_ICONID(21,8), - BND_ICON_SCULPT_DYNTOPO = BND_ICONID(22,8), - BND_ICON_PARTICLE_POINT = BND_ICONID(23,8), - BND_ICON_PARTICLE_TIP = BND_ICONID(24,8), - BND_ICON_PARTICLE_PATH = BND_ICONID(25,8), - - BND_ICON_MAN_TRANS = BND_ICONID(0,7), - BND_ICON_MAN_ROT = BND_ICONID(1,7), - BND_ICON_MAN_SCALE = BND_ICONID(2,7), - BND_ICON_MANIPUL = BND_ICONID(3,7), - BND_ICON_SNAP_OFF = BND_ICONID(4,7), - BND_ICON_SNAP_ON = BND_ICONID(5,7), - BND_ICON_SNAP_NORMAL = BND_ICONID(6,7), - BND_ICON_SNAP_INCREMENT = BND_ICONID(7,7), - BND_ICON_SNAP_VERTEX = BND_ICONID(8,7), - BND_ICON_SNAP_EDGE = BND_ICONID(9,7), - BND_ICON_SNAP_FACE = BND_ICONID(10,7), - BND_ICON_SNAP_VOLUME = BND_ICONID(11,7), - BND_ICON_STICKY_UVS_LOC = BND_ICONID(13,7), - BND_ICON_STICKY_UVS_DISABLE = BND_ICONID(14,7), - BND_ICON_STICKY_UVS_VERT = BND_ICONID(15,7), - BND_ICON_CLIPUV_DEHLT = BND_ICONID(16,7), - BND_ICON_CLIPUV_HLT = BND_ICONID(17,7), - BND_ICON_SNAP_PEEL_OBJECT = BND_ICONID(18,7), - BND_ICON_GRID = BND_ICONID(19,7), - - BND_ICON_PASTEDOWN = BND_ICONID(0,6), - BND_ICON_COPYDOWN = BND_ICONID(1,6), - BND_ICON_PASTEFLIPUP = BND_ICONID(2,6), - BND_ICON_PASTEFLIPDOWN = BND_ICONID(3,6), - BND_ICON_SNAP_SURFACE = BND_ICONID(8,6), - BND_ICON_AUTOMERGE_ON = BND_ICONID(9,6), - BND_ICON_AUTOMERGE_OFF = BND_ICONID(10,6), - BND_ICON_RETOPO = BND_ICONID(11,6), - BND_ICON_UV_VERTEXSEL = BND_ICONID(12,6), - BND_ICON_UV_EDGESEL = BND_ICONID(13,6), - BND_ICON_UV_FACESEL = BND_ICONID(14,6), - BND_ICON_UV_ISLANDSEL = BND_ICONID(15,6), - BND_ICON_UV_SYNC_SELECT = BND_ICONID(16,6), - - BND_ICON_BBOX = BND_ICONID(0,5), - BND_ICON_WIRE = BND_ICONID(1,5), - BND_ICON_SOLID = BND_ICONID(2,5), - BND_ICON_SMOOTH = BND_ICONID(3,5), - BND_ICON_POTATO = BND_ICONID(4,5), - BND_ICON_ORTHO = BND_ICONID(6,5), - BND_ICON_LOCKVIEW_OFF = BND_ICONID(9,5), - BND_ICON_LOCKVIEW_ON = BND_ICONID(10,5), - BND_ICON_AXIS_SIDE = BND_ICONID(12,5), - BND_ICON_AXIS_FRONT = BND_ICONID(13,5), - BND_ICON_AXIS_TOP = BND_ICONID(14,5), - BND_ICON_NDOF_DOM = BND_ICONID(15,5), - BND_ICON_NDOF_TURN = BND_ICONID(16,5), - BND_ICON_NDOF_FLY = BND_ICONID(17,5), - BND_ICON_NDOF_TRANS = BND_ICONID(18,5), - BND_ICON_LAYER_USED = BND_ICONID(19,5), - BND_ICON_LAYER_ACTIVE = BND_ICONID(20,5), - - BND_ICON_SORTALPHA = BND_ICONID(0,3), - BND_ICON_SORTBYEXT = BND_ICONID(1,3), - BND_ICON_SORTTIME = BND_ICONID(2,3), - BND_ICON_SORTSIZE = BND_ICONID(3,3), - BND_ICON_LONGDISPLAY = BND_ICONID(4,3), - BND_ICON_SHORTDISPLAY = BND_ICONID(5,3), - BND_ICON_GHOST = BND_ICONID(6,3), - BND_ICON_IMGDISPLAY = BND_ICONID(7,3), - BND_ICON_SAVE_AS = BND_ICONID(8,3), - BND_ICON_SAVE_COPY = BND_ICONID(9,3), - BND_ICON_BOOKMARKS = BND_ICONID(10,3), - BND_ICON_FONTPREVIEW = BND_ICONID(11,3), - BND_ICON_FILTER = BND_ICONID(12,3), - BND_ICON_NEWFOLDER = BND_ICONID(13,3), - BND_ICON_OPEN_RECENT = BND_ICONID(14,3), - BND_ICON_FILE_PARENT = BND_ICONID(15,3), - BND_ICON_FILE_REFRESH = BND_ICONID(16,3), - BND_ICON_FILE_FOLDER = BND_ICONID(17,3), - BND_ICON_FILE_BLANK = BND_ICONID(18,3), - BND_ICON_FILE_BLEND = BND_ICONID(19,3), - BND_ICON_FILE_IMAGE = BND_ICONID(20,3), - BND_ICON_FILE_MOVIE = BND_ICONID(21,3), - BND_ICON_FILE_SCRIPT = BND_ICONID(22,3), - BND_ICON_FILE_SOUND = BND_ICONID(23,3), - BND_ICON_FILE_FONT = BND_ICONID(24,3), - BND_ICON_FILE_TEXT = BND_ICONID(25,3), - - BND_ICON_RECOVER_AUTO = BND_ICONID(0,2), - BND_ICON_SAVE_PREFS = BND_ICONID(1,2), - BND_ICON_LINK_BLEND = BND_ICONID(2,2), - BND_ICON_APPEND_BLEND = BND_ICONID(3,2), - BND_ICON_IMPORT = BND_ICONID(4,2), - BND_ICON_EXPORT = BND_ICONID(5,2), - BND_ICON_EXTERNAL_DATA = BND_ICONID(6,2), - BND_ICON_LOAD_FACTORY = BND_ICONID(7,2), - BND_ICON_LOOP_BACK = BND_ICONID(13,2), - BND_ICON_LOOP_FORWARDS = BND_ICONID(14,2), - BND_ICON_BACK = BND_ICONID(15,2), - BND_ICON_FORWARD = BND_ICONID(16,2), - BND_ICON_FILE_BACKUP = BND_ICONID(24,2), - BND_ICON_DISK_DRIVE = BND_ICONID(25,2), - - BND_ICON_MATPLANE = BND_ICONID(0,1), - BND_ICON_MATSPHERE = BND_ICONID(1,1), - BND_ICON_MATCUBE = BND_ICONID(2,1), - BND_ICON_MONKEY = BND_ICONID(3,1), - BND_ICON_HAIR = BND_ICONID(4,1), - BND_ICON_ALIASED = BND_ICONID(5,1), - BND_ICON_ANTIALIASED = BND_ICONID(6,1), - BND_ICON_MAT_SPHERE_SKY = BND_ICONID(7,1), - BND_ICON_WORDWRAP_OFF = BND_ICONID(12,1), - BND_ICON_WORDWRAP_ON = BND_ICONID(13,1), - BND_ICON_SYNTAX_OFF = BND_ICONID(14,1), - BND_ICON_SYNTAX_ON = BND_ICONID(15,1), - BND_ICON_LINENUMBERS_OFF = BND_ICONID(16,1), - BND_ICON_LINENUMBERS_ON = BND_ICONID(17,1), - BND_ICON_SCRIPTPLUGINS = BND_ICONID(18,1), - - BND_ICON_SEQ_SEQUENCER = BND_ICONID(0,0), - BND_ICON_SEQ_PREVIEW = BND_ICONID(1,0), - BND_ICON_SEQ_LUMA_WAVEFORM = BND_ICONID(2,0), - BND_ICON_SEQ_CHROMA_SCOPE = BND_ICONID(3,0), - BND_ICON_SEQ_HISTOGRAM = BND_ICONID(4,0), - BND_ICON_SEQ_SPLITVIEW = BND_ICONID(5,0), - BND_ICON_IMAGE_RGB = BND_ICONID(9,0), - BND_ICON_IMAGE_RGB_ALPHA = BND_ICONID(10,0), - BND_ICON_IMAGE_ALPHA = BND_ICONID(11,0), - BND_ICON_IMAGE_ZDEPTH = BND_ICONID(12,0), - BND_ICON_IMAGEFILE = BND_ICONID(13,0), -} BNDicon; - -//////////////////////////////////////////////////////////////////////////////// - -// set the current theme all widgets will be drawn with. -// the default Blender 2.6 theme is set by default. -BND_EXPORT void bndSetTheme(BNDtheme theme); - -// Returns the currently set theme -BND_EXPORT const BNDtheme *bndGetTheme(); - -// designates an image handle as returned by nvgCreateImage*() as the themes' -// icon sheet. The icon sheet format must be compatible to Blender 2.6's icon -// sheet; the order of icons does not matter. -// A valid icon sheet is e.g. shown at -// http://wiki.blender.org/index.php/Dev:2.5/Doc/How_to/Add_an_icon -BND_EXPORT void bndSetIconImage(int image); - -// designates an image handle as returned by nvgCreateFont*() as the themes' -// UI font. Blender's original UI font Droid Sans is perfectly suited and -// available here: -// https://svn.blender.org/svnroot/bf-blender/trunk/blender/release/datafiles/fonts/ -BND_EXPORT void bndSetFont(int font); - -//////////////////////////////////////////////////////////////////////////////// - -// High Level Functions -// -------------------- -// Use these functions to draw themed widgets with your NVGcontext. - -// Draw a label with its lower left origin at (x,y) and size of (w,h). -// if iconid >= 0, an icon will be added to the widget -// if label is not NULL, a label will be added to the widget -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndLabel(NVGcontext *ctx, - float x, float y, float w, float h, int iconid, const char *label); - -// Draw a tool button with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// if iconid >= 0, an icon will be added to the widget -// if label is not NULL, a label will be added to the widget -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndToolButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *label); - -// Draw a radio button with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// if iconid >= 0, an icon will be added to the widget -// if label is not NULL, a label will be added to the widget -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndRadioButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *label); - - -// Calculate the corresponding text position for given coordinates px/py -// in a text field. -// See bndTextField for more info. -BND_EXPORT int bndTextFieldTextPosition(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, const char *text, int px, int py); - -// Draw a text field with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// if iconid >= 0, an icon will be added to the widget -// if text is not NULL, text will be printed to the widget -// cbegin must be >= 0 and <= strlen(text) and denotes the beginning of the caret -// cend must be >= cbegin and <= strlen(text) and denotes the end of the caret -// if cend < cbegin, then no caret will be drawn -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndTextField(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *text, int cbegin, int cend); - -// Draw an option button with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// if label is not NULL, a label will be added to the widget -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndOptionButton(NVGcontext *ctx, - float x, float y, float w, float h, BNDwidgetState state, - const char *label); - -// Draw a choice button with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// if iconid >= 0, an icon will be added to the widget -// if label is not NULL, a label will be added to the widget -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndChoiceButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *label); - -// Draw a color button with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndColorButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, NVGcolor color); - -// Draw a number field with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// if label is not NULL, a label will be added to the widget -// if value is not NULL, a value will be added to the widget, along with -// a ":" separator -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndNumberField(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - const char *label, const char *value); - -// Draw slider control with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags and state denotes -// the widgets current UI state. -// progress must be in the range 0..1 and controls the size of the slider bar -// if label is not NULL, a label will be added to the widget -// if value is not NULL, a value will be added to the widget, along with -// a ":" separator -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndSlider(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - float progress, const char *label, const char *value); - -// Draw scrollbar with its lower left origin at (x,y) and size of (w,h), -// where state denotes the widgets current UI state. -// offset is in the range 0..1 and controls the position of the scroll handle -// size is in the range 0..1 and controls the size of the scroll handle -// horizontal widget looks best when height is BND_SCROLLBAR_HEIGHT, -// vertical looks best when width is BND_SCROLLBAR_WIDTH -BND_EXPORT void bndScrollBar(NVGcontext *ctx, - float x, float y, float w, float h, BNDwidgetState state, - float offset, float size); - -// Draw a menu background with its lower left origin at (x,y) and size of (w,h), -// where flags is one or multiple flags from BNDcornerFlags. -BND_EXPORT void bndMenuBackground(NVGcontext *ctx, - float x, float y, float w, float h, int flags); - -// Draw a menu label with its lower left origin at (x,y) and size of (w,h). -// if iconid >= 0, an icon will be added to the widget -// if label is not NULL, a label will be added to the widget -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndMenuLabel(NVGcontext *ctx, - float x, float y, float w, float h, int iconid, const char *label); - -// Draw a menu item with its lower left origin at (x,y) and size of (w,h), -// where state denotes the widgets current UI state. -// if iconid >= 0, an icon will be added to the widget -// if label is not NULL, a label will be added to the widget -// widget looks best when height is BND_WIDGET_HEIGHT -BND_EXPORT void bndMenuItem(NVGcontext *ctx, - float x, float y, float w, float h, BNDwidgetState state, - int iconid, const char *label); - -// Draw a tooltip background with its lower left origin at (x,y) and size of (w,h) -BND_EXPORT void bndTooltipBackground(NVGcontext *ctx, float x, float y, float w, float h); - -// Draw a node port at the given position filled with the given color -BND_EXPORT void bndNodePort(NVGcontext *ctx, float x, float y, BNDwidgetState state, - NVGcolor color); - -// Draw a node wire originating at (x0,y0) and floating to (x1,y1), with -// a colored gradient based on the states state0 and state1: -// BND_DEFAULT: default wire color -// BND_HOVER: selected wire color -// BND_ACTIVE: dragged wire color -BND_EXPORT void bndNodeWire(NVGcontext *ctx, float x0, float y0, float x1, float y1, - BNDwidgetState state0, BNDwidgetState state1); - -// Draw a node wire originating at (x0,y0) and floating to (x1,y1), with -// a colored gradient based on the two colors color0 and color1 -BND_EXPORT void bndColoredNodeWire(NVGcontext *ctx, float x0, float y0, float x1, float y1, - NVGcolor color0, NVGcolor color1); - -// Draw a node background with its upper left origin at (x,y) and size of (w,h) -// where titleColor provides the base color for the title bar -BND_EXPORT void bndNodeBackground(NVGcontext *ctx, float x, float y, float w, float h, - BNDwidgetState state, int iconid, const char *label, NVGcolor titleColor); - -// Draw a window with the upper right and lower left splitter widgets into -// the rectangle at origin (x,y) and size (w, h) -BND_EXPORT void bndSplitterWidgets(NVGcontext *ctx, float x, float y, float w, float h); - -// Draw the join area overlay stencil into the rectangle -// at origin (x,y) and size (w,h) -// vertical is 0 or 1 and designates the arrow orientation, -// mirror is 0 or 1 and flips the arrow side -BND_EXPORT void bndJoinAreaOverlay(NVGcontext *ctx, float x, float y, float w, float h, - int vertical, int mirror); - -//////////////////////////////////////////////////////////////////////////////// - -// Estimator Functions -// ------------------- -// Use these functions to estimate sizes for widgets with your NVGcontext. - -// returns the ideal width for a label with given icon and text -BND_EXPORT float bndLabelWidth(NVGcontext *ctx, int iconid, const char *label); - -// returns the height for a label with given icon, text and width; this -// function is primarily useful in conjunction with multiline labels and textboxes -BND_EXPORT float bndLabelHeight(NVGcontext *ctx, int iconid, const char *label, - float width); - -//////////////////////////////////////////////////////////////////////////////// - -// Low Level Functions -// ------------------- -// these are part of the implementation detail and can be used to theme -// new kinds of controls in a similar fashion. - -// make color transparent using the default alpha value -BND_EXPORT NVGcolor bndTransparent(NVGcolor color); - -// offset a color by a given integer delta in the range -100 to 100 -BND_EXPORT NVGcolor bndOffsetColor(NVGcolor color, int delta); - -// assigns radius r to the four entries of array radiuses depending on whether -// the corner is marked as sharp or not; see BNDcornerFlags for possible -// flag values. -BND_EXPORT void bndSelectCorners(float *radiuses, float r, int flags); - -// computes the upper and lower gradient colors for the inner box from a widget -// theme and the widgets state. If flipActive is set and the state is -// BND_ACTIVE, the upper and lower colors will be swapped. -BND_EXPORT void bndInnerColors(NVGcolor *shade_top, NVGcolor *shade_down, - const BNDwidgetTheme *theme, BNDwidgetState state, int flipActive); - -// computes the text color for a widget label from a widget theme and the -// widgets state. -BND_EXPORT NVGcolor bndTextColor(const BNDwidgetTheme *theme, BNDwidgetState state); - -// computes the bounds of the scrollbar handle from the scrollbar size -// and the handles offset and size. -// offset is in the range 0..1 and defines the position of the scroll handle -// size is in the range 0..1 and defines the size of the scroll handle -BND_EXPORT void bndScrollHandleRect(float *x, float *y, float *w, float *h, - float offset, float size); - -// Add a rounded box path at position (x,y) with size (w,h) and a separate -// radius for each corner listed in clockwise order, so that cr0 = top left, -// cr1 = top right, cr2 = bottom right, cr3 = bottom left; -// this is a low level drawing function: the path must be stroked or filled -// to become visible. -BND_EXPORT void bndRoundedBox(NVGcontext *ctx, float x, float y, float w, float h, - float cr0, float cr1, float cr2, float cr3); - -// Draw a flat panel without any decorations at position (x,y) with size (w,h) -// and fills it with backgroundColor -BND_EXPORT void bndBackground(NVGcontext *ctx, float x, float y, float w, float h); - -// Draw a beveled border at position (x,y) with size (w,h) shaded with -// lighter and darker versions of backgroundColor -BND_EXPORT void bndBevel(NVGcontext *ctx, float x, float y, float w, float h); - -// Draw a lower inset for a rounded box at position (x,y) with size (w,h) -// that gives the impression the surface has been pushed in. -// cr2 and cr3 contain the radiuses of the bottom right and bottom left -// corners of the rounded box. -BND_EXPORT void bndBevelInset(NVGcontext *ctx, float x, float y, float w, float h, - float cr2, float cr3); - -// Draw an icon with (x,y) as its upper left coordinate; the iconid selects -// the icon from the sheet; use the BND_ICONID macro to build icon IDs. -BND_EXPORT void bndIcon(NVGcontext *ctx, float x, float y, int iconid); - -// Draw a drop shadow around the rounded box at (x,y) with size (w,h) and -// radius r, with feather as its maximum range in pixels. -// No shadow will be painted inside the rounded box. -BND_EXPORT void bndDropShadow(NVGcontext *ctx, float x, float y, float w, float h, - float r, float feather, float alpha); - -// Draw the inner part of a widget box, with a gradient from shade_top to -// shade_down. If h>w, the gradient will be horizontal instead of -// vertical. -BND_EXPORT void bndInnerBox(NVGcontext *ctx, float x, float y, float w, float h, - float cr0, float cr1, float cr2, float cr3, - NVGcolor shade_top, NVGcolor shade_down); - -// Draw the outline part of a widget box with the given color -BND_EXPORT void bndOutlineBox(NVGcontext *ctx, float x, float y, float w, float h, - float cr0, float cr1, float cr2, float cr3, NVGcolor color); - -// Draw an optional icon specified by and an optional label with -// given alignment (BNDtextAlignment), fontsize and color within a widget box. -// if iconid is >= 0, an icon will be drawn and the labels remaining space -// will be adjusted. -// if label is not NULL, it will be drawn with the specified alignment, fontsize -// and color. -// if value is not NULL, label and value will be drawn with a ":" separator -// inbetween. -BND_EXPORT void bndIconLabelValue(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, NVGcolor color, int align, float fontsize, const char *label, - const char *value); - -// Draw an optional icon specified by and an optional label with -// given alignment (BNDtextAlignment), fontsize and color within a node title bar -// if iconid is >= 0, an icon will be drawn -// if label is not NULL, it will be drawn with the specified alignment, fontsize -// and color. -BND_EXPORT void bndNodeIconLabel(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, NVGcolor color, NVGcolor shadowColor, int align, - float fontsize, const char *label); - -// Calculate the corresponding text position for given coordinates px/py -// in an iconLabel. -// See bndIconLabelCaret for more info. -BND_EXPORT int bndIconLabelTextPosition(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, float fontsize, const char *label, int px, int py); - -// Draw an optional icon specified by , an optional label and -// a caret with given fontsize and color within a widget box. -// if iconid is >= 0, an icon will be drawn and the labels remaining space -// will be adjusted. -// if label is not NULL, it will be drawn with the specified alignment, fontsize -// and color. -// cbegin must be >= 0 and <= strlen(text) and denotes the beginning of the caret -// cend must be >= cbegin and <= strlen(text) and denotes the end of the caret -// if cend < cbegin, then no caret will be drawn -BND_EXPORT void bndIconLabelCaret(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, NVGcolor color, float fontsize, const char *label, - NVGcolor caretcolor, int cbegin, int cend); - -// Draw a checkmark for an option box with the given upper left coordinates -// (ox,oy) with the specified color. -BND_EXPORT void bndCheck(NVGcontext *ctx, float ox, float oy, NVGcolor color); - -// Draw a horizontal arrow for a number field with its center at (x,y) and -// size s; if s is negative, the arrow points to the left. -BND_EXPORT void bndArrow(NVGcontext *ctx, float x, float y, float s, NVGcolor color); - -// Draw an up/down arrow for a choice box with its center at (x,y) and size s -BND_EXPORT void bndUpDownArrow(NVGcontext *ctx, float x, float y, float s, NVGcolor color); - -// Draw a node down-arrow with its tip at (x,y) and size s -BND_EXPORT void bndNodeArrowDown(NVGcontext *ctx, float x, float y, float s, NVGcolor color); - -// return the color of a node wire based on state -// BND_HOVER indicates selected state, -// BND_ACTIVE indicates dragged state -BND_EXPORT NVGcolor bndNodeWireColor(const BNDnodeTheme *theme, BNDwidgetState state); - -#ifdef __cplusplus -}; -#endif - -#endif // BLENDISH_H - -//////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// - -#ifdef BLENDISH_IMPLEMENTATION - -#include -#include - -#ifdef _MSC_VER - #pragma warning (disable: 4996) // Switch off security warnings - #pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings - #pragma warning (disable: 4244) - #pragma warning (disable: 4305) - #ifdef __cplusplus - #define BND_INLINE inline - #else - #define BND_INLINE - #endif - -#include - -static float bnd_fminf ( float a, float b ) -{ - return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b)); -} - -static float bnd_fmaxf ( float a, float b ) -{ - return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b)); -} - -static double bnd_fmin ( double a, double b ) -{ - return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b)); -} - -static double bnd_fmax ( double a, double b ) -{ - return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b)); -} - -#else - #define BND_INLINE inline - #define bnd_fminf(a, b) fminf(a, b) - #define bnd_fmaxf(a, b) fmaxf(a, b) - #define bnd_fmin(a, b) fmin(a, b) - #define bnd_fmax(a, b) fmax(a, b) -#endif - -//////////////////////////////////////////////////////////////////////////////// - -// default text size -#define BND_LABEL_FONT_SIZE 13 - -// default text padding in inner box -#define BND_PAD_LEFT 8 -#define BND_PAD_RIGHT 8 - -// label: value separator string -#define BND_LABEL_SEPARATOR ": " - -// alpha intensity of transparent items (0xa4) -#define BND_TRANSPARENT_ALPHA 0.643 - -// shade intensity of beveled panels -#define BND_BEVEL_SHADE 30 -// shade intensity of beveled insets -#define BND_INSET_BEVEL_SHADE 30 -// shade intensity of hovered inner boxes -#define BND_HOVER_SHADE 15 -// shade intensity of splitter bevels -#define BND_SPLITTER_SHADE 100 - -// width of icon sheet -#define BND_ICON_SHEET_WIDTH 602 -// height of icon sheet -#define BND_ICON_SHEET_HEIGHT 640 -// gridsize of icon sheet in both dimensions -#define BND_ICON_SHEET_GRID 21 -// offset of first icon tile relative to left border -#define BND_ICON_SHEET_OFFSET_X 5 -// offset of first icon tile relative to top border -#define BND_ICON_SHEET_OFFSET_Y 10 -// resolution of single icon -#define BND_ICON_SHEET_RES 16 - -// size of number field arrow -#define BND_NUMBER_ARROW_SIZE 4 - -// default text color -#define BND_COLOR_TEXT {{{ 0,0,0,1 }}} -// default highlighted text color -#define BND_COLOR_TEXT_SELECTED {{{ 1,1,1,1 }}} - -// radius of tool button -#define BND_TOOL_RADIUS 4 - -// radius of option button -#define BND_OPTION_RADIUS 4 -// width of option button checkbox -#define BND_OPTION_WIDTH 14 -// height of option button checkbox -#define BND_OPTION_HEIGHT 15 - -// radius of text field -#define BND_TEXT_RADIUS 4 - -// radius of number button -#define BND_NUMBER_RADIUS 10 - -// radius of menu popup -#define BND_MENU_RADIUS 3 -// feather of menu popup shadow -#define BND_SHADOW_FEATHER 12 -// alpha of menu popup shadow -#define BND_SHADOW_ALPHA 0.5 - -// radius of scrollbar -#define BND_SCROLLBAR_RADIUS 7 -// shade intensity of active scrollbar -#define BND_SCROLLBAR_ACTIVE_SHADE 15 - -// max glyphs for position testing -#define BND_MAX_GLYPHS 1024 - -// max rows for position testing -#define BND_MAX_ROWS 32 - -// text distance from bottom -#define BND_TEXT_PAD_DOWN 7 - -// stroke width of wire outline -#define BND_NODE_WIRE_OUTLINE_WIDTH 4 -// stroke width of wire -#define BND_NODE_WIRE_WIDTH 2 -// radius of node box -#define BND_NODE_RADIUS 8 -// feather of node title text -#define BND_NODE_TITLE_FEATHER 1 -// size of node title arrow -#define BND_NODE_ARROW_SIZE 9 - -//////////////////////////////////////////////////////////////////////////////// - -BND_INLINE float bnd_clamp(float v, float mn, float mx) { - return (v > mx)?mx:(v < mn)?mn:v; -} - -//////////////////////////////////////////////////////////////////////////////// - -// the initial theme -static BNDtheme bnd_theme = { - // backgroundColor - {{{ 0.447, 0.447, 0.447, 1.0 }}}, - // regularTheme - { - {{{ 0.098,0.098,0.098,1 }}}, // color_outline - {{{ 0.098,0.098,0.098,1 }}}, // color_item - {{{ 0.6,0.6,0.6,1 }}}, // color_inner - {{{ 0.392,0.392,0.392,1 }}}, // color_inner_selected - BND_COLOR_TEXT, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - 0, // shade_top - 0, // shade_down - }, - // toolTheme - { - {{{ 0.098,0.098,0.098,1 }}}, // color_outline - {{{ 0.098,0.098,0.098,1 }}}, // color_item - {{{ 0.6,0.6,0.6,1 }}}, // color_inner - {{{ 0.392,0.392,0.392,1 }}}, // color_inner_selected - BND_COLOR_TEXT, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - 15, // shade_top - -15, // shade_down - }, - // radioTheme - { - {{{ 0,0,0,1 }}}, // color_outline - {{{ 1,1,1,1 }}}, // color_item - {{{ 0.275,0.275,0.275,1 }}}, // color_inner - {{{ 0.337,0.502,0.761,1 }}}, // color_inner_selected - BND_COLOR_TEXT_SELECTED, // color_text - BND_COLOR_TEXT, // color_text_selected - 15, // shade_top - -15, // shade_down - }, - // textFieldTheme - { - {{{ 0.098,0.098,0.098,1 }}}, // color_outline - {{{ 0.353, 0.353, 0.353,1 }}}, // color_item - {{{ 0.6, 0.6, 0.6,1 }}}, // color_inner - {{{ 0.6, 0.6, 0.6,1 }}}, // color_inner_selected - BND_COLOR_TEXT, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - 0, // shade_top - 25, // shade_down - }, - // optionTheme - { - {{{ 0,0,0,1 }}}, // color_outline - {{{ 1,1,1,1 }}}, // color_item - {{{ 0.275,0.275,0.275,1 }}}, // color_inner - {{{ 0.275,0.275,0.275,1 }}}, // color_inner_selected - BND_COLOR_TEXT, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - 15, // shade_top - -15, // shade_down - }, - // choiceTheme - { - {{{ 0,0,0,1 }}}, // color_outline - {{{ 1,1,1,1 }}}, // color_item - {{{ 0.275,0.275,0.275,1 }}}, // color_inner - {{{ 0.275,0.275,0.275,1 }}}, // color_inner_selected - BND_COLOR_TEXT_SELECTED, // color_text - {{{ 0.8,0.8,0.8,1 }}}, // color_text_selected - 15, // shade_top - -15, // shade_down - }, - // numberFieldTheme - { - {{{ 0.098,0.098,0.098,1 }}}, // color_outline - {{{ 0.353, 0.353, 0.353,1 }}}, // color_item - {{{ 0.706, 0.706, 0.706,1 }}}, // color_inner - {{{ 0.6, 0.6, 0.6,1 }}}, // color_inner_selected - BND_COLOR_TEXT, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - -20, // shade_top - 0, // shade_down - }, - // sliderTheme - { - {{{ 0.098,0.098,0.098,1 }}}, // color_outline - {{{ 0.502,0.502,0.502,1 }}}, // color_item - {{{ 0.706, 0.706, 0.706,1 }}}, // color_inner - {{{ 0.6, 0.6, 0.6,1 }}}, // color_inner_selected - BND_COLOR_TEXT, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - -20, // shade_top - 0, // shade_down - }, - // scrollBarTheme - { - {{{ 0.196,0.196,0.196,1 }}}, // color_outline - {{{ 0.502,0.502,0.502,1 }}}, // color_item - {{{ 0.314, 0.314, 0.314,0.706 }}}, // color_inner - {{{ 0.392, 0.392, 0.392,0.706 }}}, // color_inner_selected - BND_COLOR_TEXT, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - 5, // shade_top - -5, // shade_down - }, - // tooltipTheme - { - {{{ 0,0,0,1 }}}, // color_outline - {{{ 0.392,0.392,0.392,1 }}}, // color_item - {{{ 0.098, 0.098, 0.098, 0.902 }}}, // color_inner - {{{ 0.176, 0.176, 0.176, 0.902 }}}, // color_inner_selected - {{{ 0.627, 0.627, 0.627, 1 }}}, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - 0, // shade_top - 0, // shade_down - }, - // menuTheme - { - {{{ 0,0,0,1 }}}, // color_outline - {{{ 0.392,0.392,0.392,1 }}}, // color_item - {{{ 0.098, 0.098, 0.098, 0.902 }}}, // color_inner - {{{ 0.176, 0.176, 0.176, 0.902 }}}, // color_inner_selected - {{{ 0.627, 0.627, 0.627, 1 }}}, // color_text - BND_COLOR_TEXT_SELECTED, // color_text_selected - 0, // shade_top - 0, // shade_down - }, - // menuItemTheme - { - {{{ 0,0,0,1 }}}, // color_outline - {{{ 0.675,0.675,0.675,0.502 }}}, // color_item - {{{ 0,0,0,0 }}}, // color_inner - {{{ 0.337,0.502,0.761,1 }}}, // color_inner_selected - BND_COLOR_TEXT_SELECTED, // color_text - BND_COLOR_TEXT, // color_text_selected - 38, // shade_top - 0, // shade_down - }, - // nodeTheme - { - {{{ 0.945,0.345,0,1 }}}, // nodeSelectedColor - {{{ 0,0,0,1 }}}, // wiresColor - {{{ 0.498,0.439,0.439,1 }}}, // textSelectedColor - {{{ 1,0.667,0.251,1 }}}, // activeNodeColor - {{{ 1,1,1,1 }}}, // wireSelectColor - {{{ 0.608,0.608,0.608,0.627 }}}, // nodeBackdropColor - 5, // noodleCurving - }, -}; - -//////////////////////////////////////////////////////////////////////////////// - -void bndSetTheme(BNDtheme theme) { - bnd_theme = theme; -} - -const BNDtheme *bndGetTheme() { - return &bnd_theme; -} - -// the handle to the image containing the icon sheet -static int bnd_icon_image = -1; - -void bndSetIconImage(int image) { - bnd_icon_image = image; -} - -// the handle to the UI font -static int bnd_font = -1; - -void bndSetFont(int font) { - bnd_font = font; -} - -//////////////////////////////////////////////////////////////////////////////// - -void bndLabel(NVGcontext *ctx, - float x, float y, float w, float h, int iconid, const char *label) { - bndIconLabelValue(ctx,x,y,w,h,iconid, - bnd_theme.regularTheme.textColor, BND_LEFT, - BND_LABEL_FONT_SIZE, label, NULL); -} - -void bndToolButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *label) { - float cr[4]; - NVGcolor shade_top, shade_down; - - bndSelectCorners(cr, BND_TOOL_RADIUS, flags); - bndBevelInset(ctx,x,y,w,h,cr[2],cr[3]); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.toolTheme, state, 1); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - bndOutlineBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.toolTheme.outlineColor)); - bndIconLabelValue(ctx,x,y,w,h,iconid, - bndTextColor(&bnd_theme.toolTheme, state), BND_CENTER, - BND_LABEL_FONT_SIZE, label, NULL); -} - -void bndRadioButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *label) { - float cr[4]; - NVGcolor shade_top, shade_down; - - bndSelectCorners(cr, BND_OPTION_RADIUS, flags); - bndBevelInset(ctx,x,y,w,h,cr[2],cr[3]); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.radioTheme, state, 1); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - bndOutlineBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.radioTheme.outlineColor)); - bndIconLabelValue(ctx,x,y,w,h,iconid, - bndTextColor(&bnd_theme.radioTheme, state), BND_CENTER, - BND_LABEL_FONT_SIZE, label, NULL); -} - -int bndTextFieldTextPosition(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, const char *text, int px, int py) { - return bndIconLabelTextPosition(ctx, x, y, w, h, - iconid, BND_LABEL_FONT_SIZE, text, px, py); -} - -void bndTextField(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *text, int cbegin, int cend) { - float cr[4]; - NVGcolor shade_top, shade_down; - - bndSelectCorners(cr, BND_TEXT_RADIUS, flags); - bndBevelInset(ctx,x,y,w,h,cr[2],cr[3]); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.textFieldTheme, state, 0); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - bndOutlineBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.textFieldTheme.outlineColor)); - if (state != BND_ACTIVE) { - cend = -1; - } - bndIconLabelCaret(ctx,x,y,w,h,iconid, - bndTextColor(&bnd_theme.textFieldTheme, state), BND_LABEL_FONT_SIZE, - text, bnd_theme.textFieldTheme.itemColor, cbegin, cend); -} - -void bndOptionButton(NVGcontext *ctx, - float x, float y, float w, float h, BNDwidgetState state, - const char *label) { - float ox, oy; - NVGcolor shade_top, shade_down; - - ox = x; - oy = y+h-BND_OPTION_HEIGHT-3; - - bndBevelInset(ctx,ox,oy, - BND_OPTION_WIDTH,BND_OPTION_HEIGHT, - BND_OPTION_RADIUS,BND_OPTION_RADIUS); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.optionTheme, state, 1); - bndInnerBox(ctx,ox,oy, - BND_OPTION_WIDTH,BND_OPTION_HEIGHT, - BND_OPTION_RADIUS,BND_OPTION_RADIUS,BND_OPTION_RADIUS,BND_OPTION_RADIUS, - shade_top, shade_down); - bndOutlineBox(ctx,ox,oy, - BND_OPTION_WIDTH,BND_OPTION_HEIGHT, - BND_OPTION_RADIUS,BND_OPTION_RADIUS,BND_OPTION_RADIUS,BND_OPTION_RADIUS, - bndTransparent(bnd_theme.optionTheme.outlineColor)); - if (state == BND_ACTIVE) { - bndCheck(ctx,ox,oy, bndTransparent(bnd_theme.optionTheme.itemColor)); - } - bndIconLabelValue(ctx,x+12,y,w-12,h,-1, - bndTextColor(&bnd_theme.optionTheme, state), BND_LEFT, - BND_LABEL_FONT_SIZE, label, NULL); -} - -void bndChoiceButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - int iconid, const char *label) { - float cr[4]; - NVGcolor shade_top, shade_down; - - bndSelectCorners(cr, BND_OPTION_RADIUS, flags); - bndBevelInset(ctx,x,y,w,h,cr[2],cr[3]); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.choiceTheme, state, 1); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - bndOutlineBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.choiceTheme.outlineColor)); - bndIconLabelValue(ctx,x,y,w,h,iconid, - bndTextColor(&bnd_theme.choiceTheme, state), BND_LEFT, - BND_LABEL_FONT_SIZE, label, NULL); - bndUpDownArrow(ctx,x+w-10,y+10,5, - bndTransparent(bnd_theme.choiceTheme.itemColor)); -} - -void bndColorButton(NVGcontext *ctx, - float x, float y, float w, float h, int flags, NVGcolor color) { - float cr[4]; - bndSelectCorners(cr, BND_TOOL_RADIUS, flags); - bndBevelInset(ctx,x,y,w,h,cr[2],cr[3]); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], color, color); - bndOutlineBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.toolTheme.outlineColor)); -} - -void bndNumberField(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - const char *label, const char *value) { - float cr[4]; - NVGcolor shade_top, shade_down; - - bndSelectCorners(cr, BND_NUMBER_RADIUS, flags); - bndBevelInset(ctx,x,y,w,h,cr[2],cr[3]); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.numberFieldTheme, state, 0); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - bndOutlineBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.numberFieldTheme.outlineColor)); - bndIconLabelValue(ctx,x,y,w,h,-1, - bndTextColor(&bnd_theme.numberFieldTheme, state), BND_CENTER, - BND_LABEL_FONT_SIZE, label, value); - bndArrow(ctx,x+8,y+10,-BND_NUMBER_ARROW_SIZE, - bndTransparent(bnd_theme.numberFieldTheme.itemColor)); - bndArrow(ctx,x+w-8,y+10,BND_NUMBER_ARROW_SIZE, - bndTransparent(bnd_theme.numberFieldTheme.itemColor)); -} - -void bndSlider(NVGcontext *ctx, - float x, float y, float w, float h, int flags, BNDwidgetState state, - float progress, const char *label, const char *value) { - float cr[4]; - NVGcolor shade_top, shade_down; - - bndSelectCorners(cr, BND_NUMBER_RADIUS, flags); - bndBevelInset(ctx,x,y,w,h,cr[2],cr[3]); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.sliderTheme, state, 0); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - - if (state == BND_ACTIVE) { - shade_top = bndOffsetColor( - bnd_theme.sliderTheme.itemColor, bnd_theme.sliderTheme.shadeTop); - shade_down = bndOffsetColor( - bnd_theme.sliderTheme.itemColor, bnd_theme.sliderTheme.shadeDown); - } else { - shade_top = bndOffsetColor( - bnd_theme.sliderTheme.itemColor, bnd_theme.sliderTheme.shadeDown); - shade_down = bndOffsetColor( - bnd_theme.sliderTheme.itemColor, bnd_theme.sliderTheme.shadeTop); - } - nvgScissor(ctx,x,y,8+(w-8)*bnd_clamp(progress,0,1),h); - bndInnerBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - nvgResetScissor(ctx); - - bndOutlineBox(ctx,x,y,w,h,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.sliderTheme.outlineColor)); - bndIconLabelValue(ctx,x,y,w,h,-1, - bndTextColor(&bnd_theme.sliderTheme, state), BND_CENTER, - BND_LABEL_FONT_SIZE, label, value); -} - -void bndScrollBar(NVGcontext *ctx, - float x, float y, float w, float h, BNDwidgetState state, - float offset, float size) { - - bndBevelInset(ctx,x,y,w,h, - BND_SCROLLBAR_RADIUS, BND_SCROLLBAR_RADIUS); - bndInnerBox(ctx,x,y,w,h, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - bndOffsetColor( - bnd_theme.scrollBarTheme.innerColor, 3*bnd_theme.scrollBarTheme.shadeDown), - bndOffsetColor( - bnd_theme.scrollBarTheme.innerColor, 3*bnd_theme.scrollBarTheme.shadeTop)); - bndOutlineBox(ctx,x,y,w,h, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - bndTransparent(bnd_theme.scrollBarTheme.outlineColor)); - - NVGcolor itemColor = bndOffsetColor( - bnd_theme.scrollBarTheme.itemColor, - (state == BND_ACTIVE)?BND_SCROLLBAR_ACTIVE_SHADE:0); - - bndScrollHandleRect(&x,&y,&w,&h,offset,size); - - bndInnerBox(ctx,x,y,w,h, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - bndOffsetColor( - itemColor, 3*bnd_theme.scrollBarTheme.shadeTop), - bndOffsetColor( - itemColor, 3*bnd_theme.scrollBarTheme.shadeDown)); - bndOutlineBox(ctx,x,y,w,h, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - BND_SCROLLBAR_RADIUS,BND_SCROLLBAR_RADIUS, - bndTransparent(bnd_theme.scrollBarTheme.outlineColor)); -} - -void bndMenuBackground(NVGcontext *ctx, - float x, float y, float w, float h, int flags) { - float cr[4]; - NVGcolor shade_top, shade_down; - - bndSelectCorners(cr, BND_MENU_RADIUS, flags); - bndInnerColors(&shade_top, &shade_down, &bnd_theme.menuTheme, - BND_DEFAULT, 0); - bndInnerBox(ctx,x,y,w,h+1,cr[0],cr[1],cr[2],cr[3], shade_top, shade_down); - bndOutlineBox(ctx,x,y,w,h+1,cr[0],cr[1],cr[2],cr[3], - bndTransparent(bnd_theme.menuTheme.outlineColor)); - bndDropShadow(ctx,x,y,w,h,BND_MENU_RADIUS, - BND_SHADOW_FEATHER,BND_SHADOW_ALPHA); -} - -void bndTooltipBackground(NVGcontext *ctx, float x, float y, float w, float h) { - NVGcolor shade_top, shade_down; - - bndInnerColors(&shade_top, &shade_down, &bnd_theme.tooltipTheme, - BND_DEFAULT, 0); - bndInnerBox(ctx,x,y,w,h+1, - BND_MENU_RADIUS,BND_MENU_RADIUS,BND_MENU_RADIUS,BND_MENU_RADIUS, - shade_top, shade_down); - bndOutlineBox(ctx,x,y,w,h+1, - BND_MENU_RADIUS,BND_MENU_RADIUS,BND_MENU_RADIUS,BND_MENU_RADIUS, - bndTransparent(bnd_theme.tooltipTheme.outlineColor)); - bndDropShadow(ctx,x,y,w,h,BND_MENU_RADIUS, - BND_SHADOW_FEATHER,BND_SHADOW_ALPHA); -} - -void bndMenuLabel(NVGcontext *ctx, - float x, float y, float w, float h, int iconid, const char *label) { - bndIconLabelValue(ctx,x,y,w,h,iconid, - bnd_theme.menuTheme.textColor, BND_LEFT, - BND_LABEL_FONT_SIZE, label, NULL); -} - -void bndMenuItem(NVGcontext *ctx, - float x, float y, float w, float h, BNDwidgetState state, - int iconid, const char *label) { - if (state != BND_DEFAULT) { - bndInnerBox(ctx,x,y,w,h,0,0,0,0, - bndOffsetColor(bnd_theme.menuItemTheme.innerSelectedColor, - bnd_theme.menuItemTheme.shadeTop), - bndOffsetColor(bnd_theme.menuItemTheme.innerSelectedColor, - bnd_theme.menuItemTheme.shadeDown)); - state = BND_ACTIVE; - } - bndIconLabelValue(ctx,x,y,w,h,iconid, - bndTextColor(&bnd_theme.menuItemTheme, state), BND_LEFT, - BND_LABEL_FONT_SIZE, label, NULL); -} - -void bndNodePort(NVGcontext *ctx, float x, float y, BNDwidgetState state, - NVGcolor color) { - nvgBeginPath(ctx); - nvgCircle(ctx, x, y, BND_NODE_PORT_RADIUS); - nvgStrokeColor(ctx,bnd_theme.nodeTheme.wiresColor); - nvgStrokeWidth(ctx,1.0f); - nvgStroke(ctx); - nvgFillColor(ctx,(state != BND_DEFAULT)? - bndOffsetColor(color, BND_HOVER_SHADE):color); - nvgFill(ctx); -} - -void bndColoredNodeWire(NVGcontext *ctx, float x0, float y0, float x1, float y1, - NVGcolor color0, NVGcolor color1) { - float length = bnd_fmaxf(fabsf(x1 - x0),fabsf(y1 - y0)); - float delta = length*(float)bnd_theme.nodeTheme.noodleCurving/10.0f; - - nvgBeginPath(ctx); - nvgMoveTo(ctx, x0, y0); - nvgBezierTo(ctx, - x0 + delta, y0, - x1 - delta, y1, - x1, y1); - NVGcolor colorw = bnd_theme.nodeTheme.wiresColor; - colorw.a = (color0.a= 0) { - w += BND_ICON_SHEET_RES; - } - if (label && (bnd_font >= 0)) { - nvgFontFaceId(ctx, bnd_font); - nvgFontSize(ctx, BND_LABEL_FONT_SIZE); - w += nvgTextBounds(ctx, 1, 1, label, NULL, NULL); - } - return w; -} - -float bndLabelHeight(NVGcontext *ctx, int iconid, const char *label, float width) { - int h = BND_WIDGET_HEIGHT; - width -= BND_TEXT_RADIUS*2; - if (iconid >= 0) { - width -= BND_ICON_SHEET_RES; - } - if (label && (bnd_font >= 0)) { - nvgFontFaceId(ctx, bnd_font); - nvgFontSize(ctx, BND_LABEL_FONT_SIZE); - float bounds[4]; - nvgTextBoxBounds(ctx, 1, 1, width, label, NULL, bounds); - int bh = (int)(bounds[3] - bounds[1]) + BND_TEXT_PAD_DOWN; - if (bh > h) - h = bh; - } - return h; -} - -//////////////////////////////////////////////////////////////////////////////// - -void bndRoundedBox(NVGcontext *ctx, float x, float y, float w, float h, - float cr0, float cr1, float cr2, float cr3) { - float d; - - w = bnd_fmaxf(0, w); - h = bnd_fmaxf(0, h); - d = bnd_fminf(w, h); - - nvgMoveTo(ctx, x,y+h*0.5f); - nvgArcTo(ctx, x,y, x+w,y, bnd_fminf(cr0, d/2)); - nvgArcTo(ctx, x+w,y, x+w,y+h, bnd_fminf(cr1, d/2)); - nvgArcTo(ctx, x+w,y+h, x,y+h, bnd_fminf(cr2, d/2)); - nvgArcTo(ctx, x,y+h, x,y, bnd_fminf(cr3, d/2)); - nvgClosePath(ctx); -} - -NVGcolor bndTransparent(NVGcolor color) { - color.a *= BND_TRANSPARENT_ALPHA; - return color; -} - -NVGcolor bndOffsetColor(NVGcolor color, int delta) { - float offset = (float)delta / 255.0f; - return delta?( - nvgRGBAf( - bnd_clamp(color.r+offset,0,1), - bnd_clamp(color.g+offset,0,1), - bnd_clamp(color.b+offset,0,1), - color.a) - ):color; -} - -void bndBevel(NVGcontext *ctx, float x, float y, float w, float h) { - nvgStrokeWidth(ctx, 1); - - x += 0.5f; - y += 0.5f; - w -= 1; - h -= 1; - - nvgBeginPath(ctx); - nvgMoveTo(ctx, x, y+h); - nvgLineTo(ctx, x+w, y+h); - nvgLineTo(ctx, x+w, y); - nvgStrokeColor(ctx, bndTransparent( - bndOffsetColor(bnd_theme.backgroundColor, -BND_BEVEL_SHADE))); - nvgStroke(ctx); - - nvgBeginPath(ctx); - nvgMoveTo(ctx, x, y+h); - nvgLineTo(ctx, x, y); - nvgLineTo(ctx, x+w, y); - nvgStrokeColor(ctx, bndTransparent( - bndOffsetColor(bnd_theme.backgroundColor, BND_BEVEL_SHADE))); - nvgStroke(ctx); -} - -void bndBevelInset(NVGcontext *ctx, float x, float y, float w, float h, - float cr2, float cr3) { - float d; - - y -= 0.5f; - d = bnd_fminf(w, h); - cr2 = bnd_fminf(cr2, d/2); - cr3 = bnd_fminf(cr3, d/2); - - nvgBeginPath(ctx); - nvgMoveTo(ctx, x+w,y+h-cr2); - nvgArcTo(ctx, x+w,y+h, x,y+h, cr2); - nvgArcTo(ctx, x,y+h, x,y, cr3); - - NVGcolor bevelColor = bndOffsetColor(bnd_theme.backgroundColor, - BND_INSET_BEVEL_SHADE); - - nvgStrokeWidth(ctx, 1); - nvgStrokePaint(ctx, - nvgLinearGradient(ctx, - x,y+h-bnd_fmaxf(cr2,cr3)-1, - x,y+h-1, - nvgRGBAf(bevelColor.r, bevelColor.g, bevelColor.b, 0), - bevelColor)); - nvgStroke(ctx); -} - -void bndBackground(NVGcontext *ctx, float x, float y, float w, float h) { - nvgBeginPath(ctx); - nvgRect(ctx, x, y, w, h); - nvgFillColor(ctx, bnd_theme.backgroundColor); - nvgFill(ctx); -} - -void bndIcon(NVGcontext *ctx, float x, float y, int iconid) { - int ix, iy, u, v; - if (bnd_icon_image < 0) return; // no icons loaded - - ix = iconid & 0xff; - iy = (iconid>>8) & 0xff; - u = BND_ICON_SHEET_OFFSET_X + ix*BND_ICON_SHEET_GRID; - v = BND_ICON_SHEET_OFFSET_Y + iy*BND_ICON_SHEET_GRID; - - nvgBeginPath(ctx); - nvgRect(ctx,x,y,BND_ICON_SHEET_RES,BND_ICON_SHEET_RES); - nvgFillPaint(ctx, - nvgImagePattern(ctx,x-u,y-v, - BND_ICON_SHEET_WIDTH, - BND_ICON_SHEET_HEIGHT, - 0,bnd_icon_image,1)); - nvgFill(ctx); -} - -void bndDropShadow(NVGcontext *ctx, float x, float y, float w, float h, - float r, float feather, float alpha) { - - nvgBeginPath(ctx); - y += feather; - h -= feather; - - nvgMoveTo(ctx, x-feather, y-feather); - nvgLineTo(ctx, x, y-feather); - nvgLineTo(ctx, x, y+h-feather); - nvgArcTo(ctx, x,y+h,x+r,y+h,r); - nvgArcTo(ctx, x+w,y+h,x+w,y+h-r,r); - nvgLineTo(ctx, x+w, y-feather); - nvgLineTo(ctx, x+w+feather, y-feather); - nvgLineTo(ctx, x+w+feather, y+h+feather); - nvgLineTo(ctx, x-feather, y+h+feather); - nvgClosePath(ctx); - - nvgFillPaint(ctx, nvgBoxGradient(ctx, - x - feather*0.5f,y - feather*0.5f, - w + feather,h+feather, - r+feather*0.5f, - feather, - nvgRGBAf(0,0,0,alpha*alpha), - nvgRGBAf(0,0,0,0))); - nvgFill(ctx); -} - -void bndInnerBox(NVGcontext *ctx, float x, float y, float w, float h, - float cr0, float cr1, float cr2, float cr3, - NVGcolor shade_top, NVGcolor shade_down) { - nvgBeginPath(ctx); - bndRoundedBox(ctx,x+1,y+1,w-2,h-3,bnd_fmaxf(0,cr0-1), - bnd_fmaxf(0,cr1-1),bnd_fmaxf(0,cr2-1),bnd_fmaxf(0,cr3-1)); - nvgFillPaint(ctx,((h-2)>w)? - nvgLinearGradient(ctx,x,y,x+w,y,shade_top,shade_down): - nvgLinearGradient(ctx,x,y,x,y+h,shade_top,shade_down)); - nvgFill(ctx); -} - -void bndOutlineBox(NVGcontext *ctx, float x, float y, float w, float h, - float cr0, float cr1, float cr2, float cr3, NVGcolor color) { - nvgBeginPath(ctx); - bndRoundedBox(ctx,x+0.5f,y+0.5f,w-1,h-2,cr0,cr1,cr2,cr3); - nvgStrokeColor(ctx,color); - nvgStrokeWidth(ctx,1); - nvgStroke(ctx); -} - -void bndSelectCorners(float *radiuses, float r, int flags) { - radiuses[0] = (flags & BND_CORNER_TOP_LEFT)?0:r; - radiuses[1] = (flags & BND_CORNER_TOP_RIGHT)?0:r; - radiuses[2] = (flags & BND_CORNER_DOWN_RIGHT)?0:r; - radiuses[3] = (flags & BND_CORNER_DOWN_LEFT)?0:r; -} - -void bndInnerColors( - NVGcolor *shade_top, NVGcolor *shade_down, - const BNDwidgetTheme *theme, BNDwidgetState state, int flipActive) { - - switch(state) { - default: - case BND_DEFAULT: { - *shade_top = bndOffsetColor(theme->innerColor, theme->shadeTop); - *shade_down = bndOffsetColor(theme->innerColor, theme->shadeDown); - } break; - case BND_HOVER: { - NVGcolor color = bndOffsetColor(theme->innerColor, BND_HOVER_SHADE); - *shade_top = bndOffsetColor(color, theme->shadeTop); - *shade_down = bndOffsetColor(color, theme->shadeDown); - } break; - case BND_ACTIVE: { - *shade_top = bndOffsetColor(theme->innerSelectedColor, - flipActive?theme->shadeDown:theme->shadeTop); - *shade_down = bndOffsetColor(theme->innerSelectedColor, - flipActive?theme->shadeTop:theme->shadeDown); - } break; - } -} - -NVGcolor bndTextColor(const BNDwidgetTheme *theme, BNDwidgetState state) { - return (state == BND_ACTIVE)?theme->textSelectedColor:theme->textColor; -} - -void bndIconLabelValue(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, NVGcolor color, int align, float fontsize, const char *label, - const char *value) { - float pleft = BND_PAD_LEFT; - if (label) { - if (iconid >= 0) { - bndIcon(ctx,x+4,y+2,iconid); - pleft += BND_ICON_SHEET_RES; - } - - if (bnd_font < 0) return; - nvgFontFaceId(ctx, bnd_font); - nvgFontSize(ctx, fontsize); - nvgBeginPath(ctx); - nvgFillColor(ctx, color); - if (value) { - float label_width = nvgTextBounds(ctx, 1, 1, label, NULL, NULL); - float sep_width = nvgTextBounds(ctx, 1, 1, - BND_LABEL_SEPARATOR, NULL, NULL); - - nvgTextAlign(ctx, NVG_ALIGN_LEFT|NVG_ALIGN_BASELINE); - x += pleft; - if (align == BND_CENTER) { - float width = label_width + sep_width - + nvgTextBounds(ctx, 1, 1, value, NULL, NULL); - x += ((w-BND_PAD_RIGHT-pleft)-width)*0.5f; - } - y += BND_WIDGET_HEIGHT-BND_TEXT_PAD_DOWN; - nvgText(ctx, x, y, label, NULL); - x += label_width; - nvgText(ctx, x, y, BND_LABEL_SEPARATOR, NULL); - x += sep_width; - nvgText(ctx, x, y, value, NULL); - } else { - nvgTextAlign(ctx, - (align==BND_LEFT)?(NVG_ALIGN_LEFT|NVG_ALIGN_BASELINE): - (NVG_ALIGN_CENTER|NVG_ALIGN_BASELINE)); - nvgTextBox(ctx,x+pleft,y+BND_WIDGET_HEIGHT-BND_TEXT_PAD_DOWN, - w-BND_PAD_RIGHT-pleft,label, NULL); - } - } else if (iconid >= 0) { - bndIcon(ctx,x+2,y+2,iconid); - } -} - -void bndNodeIconLabel(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, NVGcolor color, NVGcolor shadowColor, - int align, float fontsize, const char *label) { - if (label && (bnd_font >= 0)) { - nvgFontFaceId(ctx, bnd_font); - nvgFontSize(ctx, fontsize); - nvgBeginPath(ctx); - nvgTextAlign(ctx, NVG_ALIGN_LEFT|NVG_ALIGN_BASELINE); - nvgFillColor(ctx, shadowColor); - nvgFontBlur(ctx, BND_NODE_TITLE_FEATHER); - nvgTextBox(ctx,x+1,y+h+3-BND_TEXT_PAD_DOWN, - w,label, NULL); - nvgFillColor(ctx, color); - nvgFontBlur(ctx, 0); - nvgTextBox(ctx,x,y+h+2-BND_TEXT_PAD_DOWN, - w,label, NULL); - } - if (iconid >= 0) { - bndIcon(ctx,x+w-BND_ICON_SHEET_RES,y+3,iconid); - } -} - -int bndIconLabelTextPosition(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, float fontsize, const char *label, int px, int py) { - float bounds[4]; - float pleft = BND_TEXT_RADIUS; - if (!label) return -1; - if (iconid >= 0) - pleft += BND_ICON_SHEET_RES; - - if (bnd_font < 0) return -1; - - x += pleft; - y += BND_WIDGET_HEIGHT - BND_TEXT_PAD_DOWN; - - nvgFontFaceId(ctx, bnd_font); - nvgFontSize(ctx, fontsize); - nvgTextAlign(ctx, NVG_ALIGN_LEFT | NVG_ALIGN_BASELINE); - - w -= BND_TEXT_RADIUS + pleft; - - float asc, desc, lh; - static NVGtextRow rows[BND_MAX_ROWS]; - int nrows = nvgTextBreakLines( - ctx, label, NULL, w, rows, BND_MAX_ROWS); - if (nrows == 0) return 0; - nvgTextBoxBounds(ctx, x, y, w, label, NULL, bounds); - nvgTextMetrics(ctx, &asc, &desc, &lh); - - // calculate vertical position - int row = bnd_clamp((int)((float)(py - bounds[1]) / lh), 0, nrows - 1); - // search horizontal position - static NVGglyphPosition glyphs[BND_MAX_GLYPHS]; - int nglyphs = nvgTextGlyphPositions( - ctx, x, y, rows[row].start, rows[row].end + 1, glyphs, BND_MAX_GLYPHS); - int col, p = 0; - for (col = 0; col < nglyphs && glyphs[col].x < px; ++col) - p = glyphs[col].str - label; - // see if we should move one character further - if (col > 0 && col < nglyphs && glyphs[col].x - px < px - glyphs[col - 1].x) - p = glyphs[col].str - label; - return p; -} - -static void bndCaretPosition(NVGcontext *ctx, float x, float y, - float desc, float lineHeight, const char *caret, NVGtextRow *rows,int nrows, - int *cr, float *cx, float *cy) { - static NVGglyphPosition glyphs[BND_MAX_GLYPHS]; - int r,nglyphs; - for (r=0; r < nrows && rows[r].end < caret; ++r); - *cr = r; - *cx = x; - *cy = y-lineHeight-desc + r*lineHeight; - if (nrows == 0) return; - *cx = rows[r].minx; - nglyphs = nvgTextGlyphPositions( - ctx, x, y, rows[r].start, rows[r].end+1, glyphs, BND_MAX_GLYPHS); - for (int i=0; i < nglyphs; ++i) { - *cx=glyphs[i].x; - if (glyphs[i].str == caret) break; - } -} - -void bndIconLabelCaret(NVGcontext *ctx, float x, float y, float w, float h, - int iconid, NVGcolor color, float fontsize, const char *label, - NVGcolor caretcolor, int cbegin, int cend) { - float pleft = BND_TEXT_RADIUS; - if (!label) return; - if (iconid >= 0) { - bndIcon(ctx,x+4,y+2,iconid); - pleft += BND_ICON_SHEET_RES; - } - - if (bnd_font < 0) return; - - x+=pleft; - y+=BND_WIDGET_HEIGHT-BND_TEXT_PAD_DOWN; - - nvgFontFaceId(ctx, bnd_font); - nvgFontSize(ctx, fontsize); - nvgTextAlign(ctx, NVG_ALIGN_LEFT|NVG_ALIGN_BASELINE); - - w -= BND_TEXT_RADIUS+pleft; - - if (cend >= cbegin) { - int c0r,c1r; - float c0x,c0y,c1x,c1y; - float desc,lh; - static NVGtextRow rows[BND_MAX_ROWS]; - int nrows = nvgTextBreakLines( - ctx, label, label+cend+1, w, rows, BND_MAX_ROWS); - nvgTextMetrics(ctx, NULL, &desc, &lh); - - bndCaretPosition(ctx, x, y, desc, lh, label+cbegin, - rows, nrows, &c0r, &c0x, &c0y); - bndCaretPosition(ctx, x, y, desc, lh, label+cend, - rows, nrows, &c1r, &c1x, &c1y); - - nvgBeginPath(ctx); - if (cbegin == cend) { - nvgFillColor(ctx, nvgRGBf(0.337,0.502,0.761)); - nvgRect(ctx, c0x-1, c0y, 2, lh+1); - } else { - nvgFillColor(ctx, caretcolor); - if (c0r == c1r) { - nvgRect(ctx, c0x-1, c0y, c1x-c0x+1, lh+1); - } else { - int blk=c1r-c0r-1; - nvgRect(ctx, c0x-1, c0y, x+w-c0x+1, lh+1); - nvgRect(ctx, x, c1y, c1x-x+1, lh+1); - - if (blk) - nvgRect(ctx, x, c0y+lh, w, blk*lh+1); - } - } - nvgFill(ctx); - } - - nvgBeginPath(ctx); - nvgFillColor(ctx, color); - nvgTextBox(ctx,x,y,w,label, NULL); -} - -void bndCheck(NVGcontext *ctx, float ox, float oy, NVGcolor color) { - nvgBeginPath(ctx); - nvgStrokeWidth(ctx,2); - nvgStrokeColor(ctx,color); - nvgLineCap(ctx,NVG_BUTT); - nvgLineJoin(ctx,NVG_MITER); - nvgMoveTo(ctx,ox+4,oy+5); - nvgLineTo(ctx,ox+7,oy+8); - nvgLineTo(ctx,ox+14,oy+1); - nvgStroke(ctx); -} - -void bndArrow(NVGcontext *ctx, float x, float y, float s, NVGcolor color) { - nvgBeginPath(ctx); - nvgMoveTo(ctx,x,y); - nvgLineTo(ctx,x-s,y+s); - nvgLineTo(ctx,x-s,y-s); - nvgClosePath(ctx); - nvgFillColor(ctx,color); - nvgFill(ctx); -} - -void bndUpDownArrow(NVGcontext *ctx, float x, float y, float s, NVGcolor color) { - float w; - - nvgBeginPath(ctx); - w = 1.1f*s; - nvgMoveTo(ctx,x,y-1); - nvgLineTo(ctx,x+0.5*w,y-s-1); - nvgLineTo(ctx,x+w,y-1); - nvgClosePath(ctx); - nvgMoveTo(ctx,x,y+1); - nvgLineTo(ctx,x+0.5*w,y+s+1); - nvgLineTo(ctx,x+w,y+1); - nvgClosePath(ctx); - nvgFillColor(ctx,color); - nvgFill(ctx); -} - -void bndNodeArrowDown(NVGcontext *ctx, float x, float y, float s, NVGcolor color) { - float w; - nvgBeginPath(ctx); - w = 1.0f*s; - nvgMoveTo(ctx,x,y); - nvgLineTo(ctx,x+0.5*w,y-s); - nvgLineTo(ctx,x-0.5*w,y-s); - nvgClosePath(ctx); - nvgFillColor(ctx,color); - nvgFill(ctx); -} - -void bndScrollHandleRect(float *x, float *y, float *w, float *h, - float offset, float size) { - size = bnd_clamp(size,0,1); - offset = bnd_clamp(offset,0,1); - if ((*h) > (*w)) { - float hs = bnd_fmaxf(size*(*h), (*w)+1); - *y = (*y) + ((*h)-hs)*offset; - *h = hs; - } else { - float ws = bnd_fmaxf(size*(*w), (*h)-1); - *x = (*x) + ((*w)-ws)*offset; - *w = ws; - } -} - -NVGcolor bndNodeWireColor(const BNDnodeTheme *theme, BNDwidgetState state) { - switch(state) { - default: - case BND_DEFAULT: return nvgRGBf(0.5f,0.5f,0.5f); - case BND_HOVER: return theme->wireSelectColor; - case BND_ACTIVE: return theme->activeNodeColor; - } -} - -//////////////////////////////////////////////////////////////////////////////// - -#ifdef BND_INLINE -#undef BND_INLINE -#endif - -#endif // BLENDISH_IMPLEMENTATION diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/fontstash.h b/FCLauncher/src/main/jni/lwjgl/nanovg/fontstash.h deleted file mode 100644 index ce582464..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/fontstash.h +++ /dev/null @@ -1,1790 +0,0 @@ -// -// Copyright (c) 2009-2013 Mikko Mononen memon@inside.org -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// - -#ifndef FONS_H -#define FONS_H - -#define FONS_INVALID -1 - -enum FONSflags { - FONS_ZERO_TOPLEFT = 1, - FONS_ZERO_BOTTOMLEFT = 2, -}; - -enum FONSalign { - // Horizontal align - FONS_ALIGN_LEFT = 1<<0, // Default - FONS_ALIGN_CENTER = 1<<1, - FONS_ALIGN_RIGHT = 1<<2, - // Vertical align - FONS_ALIGN_TOP = 1<<3, - FONS_ALIGN_MIDDLE = 1<<4, - FONS_ALIGN_BOTTOM = 1<<5, - FONS_ALIGN_BASELINE = 1<<6, // Default -}; - -enum FONSglyphBitmap { - FONS_GLYPH_BITMAP_OPTIONAL = 1, - FONS_GLYPH_BITMAP_REQUIRED = 2, -}; - -enum FONSerrorCode { - // Font atlas is full. - FONS_ATLAS_FULL = 1, - // Scratch memory used to render glyphs is full, requested size reported in 'val', you may need to bump up FONS_SCRATCH_BUF_SIZE. - FONS_SCRATCH_FULL = 2, - // Calls to fonsPushState has created too large stack, if you need deep state stack bump up FONS_MAX_STATES. - FONS_STATES_OVERFLOW = 3, - // Trying to pop too many states fonsPopState(). - FONS_STATES_UNDERFLOW = 4, -}; - -struct FONSparams { - int width, height; - unsigned char flags; - void* userPtr; - int (*renderCreate)(void* uptr, int width, int height); - int (*renderResize)(void* uptr, int width, int height); - void (*renderUpdate)(void* uptr, int* rect, const unsigned char* data); - void (*renderDraw)(void* uptr, const float* verts, const float* tcoords, const unsigned int* colors, int nverts); - void (*renderDelete)(void* uptr); -}; -typedef struct FONSparams FONSparams; - -struct FONSquad -{ - float x0,y0,s0,t0; - float x1,y1,s1,t1; -}; -typedef struct FONSquad FONSquad; - -struct FONStextIter { - float x, y, nextx, nexty, scale, spacing; - unsigned int codepoint; - short isize, iblur; - struct FONSfont* font; - int prevGlyphIndex; - const char* str; - const char* next; - const char* end; - unsigned int utf8state; - int bitmapOption; -}; -typedef struct FONStextIter FONStextIter; - -typedef struct FONScontext FONScontext; - -// Constructor and destructor. -FONScontext* fonsCreateInternal(FONSparams* params); -void fonsDeleteInternal(FONScontext* s); - -void fonsSetErrorCallback(FONScontext* s, void (*callback)(void* uptr, int error, int val), void* uptr); -// Returns current atlas size. -void fonsGetAtlasSize(FONScontext* s, int* width, int* height); -// Expands the atlas size. -int fonsExpandAtlas(FONScontext* s, int width, int height); -// Resets the whole stash. -int fonsResetAtlas(FONScontext* stash, int width, int height); - -// Add fonts -int fonsAddFont(FONScontext* s, const char* name, const char* path, int fontIndex); -int fonsAddFontMem(FONScontext* s, const char* name, unsigned char* data, int ndata, int freeData, int fontIndex); -int fonsGetFontByName(FONScontext* s, const char* name); - -// State handling -void fonsPushState(FONScontext* s); -void fonsPopState(FONScontext* s); -void fonsClearState(FONScontext* s); - -// State setting -void fonsSetSize(FONScontext* s, float size); -void fonsSetColor(FONScontext* s, unsigned int color); -void fonsSetSpacing(FONScontext* s, float spacing); -void fonsSetBlur(FONScontext* s, float blur); -void fonsSetAlign(FONScontext* s, int align); -void fonsSetFont(FONScontext* s, int font); - -// Draw text -float fonsDrawText(FONScontext* s, float x, float y, const char* string, const char* end); - -// Measure text -float fonsTextBounds(FONScontext* s, float x, float y, const char* string, const char* end, float* bounds); -void fonsLineBounds(FONScontext* s, float y, float* miny, float* maxy); -void fonsVertMetrics(FONScontext* s, float* ascender, float* descender, float* lineh); - -// Text iterator -int fonsTextIterInit(FONScontext* stash, FONStextIter* iter, float x, float y, const char* str, const char* end, int bitmapOption); -int fonsTextIterNext(FONScontext* stash, FONStextIter* iter, struct FONSquad* quad); - -// Pull texture changes -const unsigned char* fonsGetTextureData(FONScontext* stash, int* width, int* height); -int fonsValidateTexture(FONScontext* s, int* dirty); - -// Draws the stash texture for debugging -void fonsDrawDebug(FONScontext* s, float x, float y); - -#endif // FONTSTASH_H - - -#ifdef FONTSTASH_IMPLEMENTATION - -#define FONS_NOTUSED(v) (void)sizeof(v) - -#ifdef FONS_USE_FREETYPE - -#include -#include FT_FREETYPE_H -#include FT_ADVANCES_H -#include - -struct FONSttFontImpl { - FT_Face font; -}; -typedef struct FONSttFontImpl FONSttFontImpl; - -#else - -//static void* fons__tmpalloc(size_t size, void* up); -//static void fons__tmpfree(void* ptr, void* up); -//#define STBTT_malloc(x,u) fons__tmpalloc(x,u) -//#define STBTT_free(x,u) fons__tmpfree(x,u) -#include "lwjgl/stb/stb_truetype.h" - -struct FONSttFontImpl { - stbtt_fontinfo font; -}; -typedef struct FONSttFontImpl FONSttFontImpl; - -#endif - -#ifndef FONS_SCRATCH_BUF_SIZE -# define FONS_SCRATCH_BUF_SIZE 96000 -#endif -#ifndef FONS_HASH_LUT_SIZE -# define FONS_HASH_LUT_SIZE 256 -#endif -#ifndef FONS_INIT_FONTS -# define FONS_INIT_FONTS 4 -#endif -#ifndef FONS_INIT_GLYPHS -# define FONS_INIT_GLYPHS 256 -#endif -#ifndef FONS_INIT_ATLAS_NODES -# define FONS_INIT_ATLAS_NODES 256 -#endif -#ifndef FONS_VERTEX_COUNT -# define FONS_VERTEX_COUNT 1024 -#endif -#ifndef FONS_MAX_STATES -# define FONS_MAX_STATES 20 -#endif -#ifndef FONS_MAX_FALLBACKS -# define FONS_MAX_FALLBACKS 20 -#endif - -static unsigned int fons__hashint(unsigned int a) -{ - a += ~(a<<15); - a ^= (a>>10); - a += (a<<3); - a ^= (a>>6); - a += ~(a<<11); - a ^= (a>>16); - return a; -} - -static int fons__mini(int a, int b) -{ - return a < b ? a : b; -} - -static int fons__maxi(int a, int b) -{ - return a > b ? a : b; -} - -struct FONSglyph -{ - unsigned int codepoint; - int index; - int next; - short size, blur; - short x0,y0,x1,y1; - short xadv,xoff,yoff; -}; -typedef struct FONSglyph FONSglyph; - -struct FONSfont -{ - FONSttFontImpl font; - char name[64]; - unsigned char* data; - int dataSize; - unsigned char freeData; - float ascender; - float descender; - float lineh; - FONSglyph* glyphs; - int cglyphs; - int nglyphs; - int lut[FONS_HASH_LUT_SIZE]; - int fallbacks[FONS_MAX_FALLBACKS]; - int nfallbacks; -}; -typedef struct FONSfont FONSfont; - -struct FONSstate -{ - int font; - int align; - float size; - unsigned int color; - float blur; - float spacing; -}; -typedef struct FONSstate FONSstate; - -struct FONSatlasNode { - short x, y, width; -}; -typedef struct FONSatlasNode FONSatlasNode; - -struct FONSatlas -{ - int width, height; - FONSatlasNode* nodes; - int nnodes; - int cnodes; -}; -typedef struct FONSatlas FONSatlas; - -struct FONScontext -{ - FONSparams params; - float itw,ith; - unsigned char* texData; - int dirtyRect[4]; - FONSfont** fonts; - FONSatlas* atlas; - int cfonts; - int nfonts; - float verts[FONS_VERTEX_COUNT*2]; - float tcoords[FONS_VERTEX_COUNT*2]; - unsigned int colors[FONS_VERTEX_COUNT]; - int nverts; - unsigned char* scratch; - int nscratch; - FONSstate states[FONS_MAX_STATES]; - int nstates; - void (*handleError)(void* uptr, int error, int val); - void* errorUptr; -#ifdef FONS_USE_FREETYPE - FT_Library ftLibrary; -#endif -}; - -#ifdef FONS_USE_FREETYPE - -int fons__tt_init(FONScontext *context) -{ - FT_Error ftError; - FONS_NOTUSED(context); - ftError = FT_Init_FreeType(&context->ftLibrary); - return ftError == 0; -} - -int fons__tt_done(FONScontext *context) -{ - FT_Error ftError; - FONS_NOTUSED(context); - ftError = FT_Done_FreeType(context->ftLibrary); - return ftError == 0; -} - -int fons__tt_loadFont(FONScontext *context, FONSttFontImpl *font, unsigned char *data, int dataSize, int fontIndex) -{ - FT_Error ftError; - FONS_NOTUSED(context); - - ftError = FT_New_Memory_Face(context->ftLibrary, (const FT_Byte*)data, dataSize, fontIndex, &font->font); - return ftError == 0; -} - -void fons__tt_getFontVMetrics(FONSttFontImpl *font, int *ascent, int *descent, int *lineGap) -{ - *ascent = font->font->ascender; - *descent = font->font->descender; - *lineGap = font->font->height - (*ascent - *descent); -} - -float fons__tt_getPixelHeightScale(FONSttFontImpl *font, float size) -{ - return size / font->font->units_per_EM; -} - -int fons__tt_getGlyphIndex(FONSttFontImpl *font, int codepoint) -{ - return FT_Get_Char_Index(font->font, codepoint); -} - -int fons__tt_buildGlyphBitmap(FONSttFontImpl *font, int glyph, float size, float scale, - int *advance, int *lsb, int *x0, int *y0, int *x1, int *y1) -{ - FT_Error ftError; - FT_GlyphSlot ftGlyph; - FT_Fixed advFixed; - FONS_NOTUSED(scale); - - ftError = FT_Set_Pixel_Sizes(font->font, 0, size); - if (ftError) return 0; - ftError = FT_Load_Glyph(font->font, glyph, FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT | FT_LOAD_TARGET_LIGHT); - if (ftError) return 0; - ftError = FT_Get_Advance(font->font, glyph, FT_LOAD_NO_SCALE, &advFixed); - if (ftError) return 0; - ftGlyph = font->font->glyph; - *advance = (int)advFixed; - *lsb = (int)ftGlyph->metrics.horiBearingX; - *x0 = ftGlyph->bitmap_left; - *x1 = *x0 + ftGlyph->bitmap.width; - *y0 = -ftGlyph->bitmap_top; - *y1 = *y0 + ftGlyph->bitmap.rows; - return 1; -} - -void fons__tt_renderGlyphBitmap(FONSttFontImpl *font, unsigned char *output, int outWidth, int outHeight, int outStride, - float scaleX, float scaleY, int glyph) -{ - FT_GlyphSlot ftGlyph = font->font->glyph; - int ftGlyphOffset = 0; - unsigned int x, y; - FONS_NOTUSED(outWidth); - FONS_NOTUSED(outHeight); - FONS_NOTUSED(scaleX); - FONS_NOTUSED(scaleY); - FONS_NOTUSED(glyph); // glyph has already been loaded by fons__tt_buildGlyphBitmap - - for ( y = 0; y < ftGlyph->bitmap.rows; y++ ) { - for ( x = 0; x < ftGlyph->bitmap.width; x++ ) { - output[(y * outStride) + x] = ftGlyph->bitmap.buffer[ftGlyphOffset++]; - } - } -} - -int fons__tt_getGlyphKernAdvance(FONSttFontImpl *font, int glyph1, int glyph2) -{ - FT_Vector ftKerning; - FT_Get_Kerning(font->font, glyph1, glyph2, FT_KERNING_DEFAULT, &ftKerning); - return (int)((ftKerning.x + 32) >> 6); // Round up and convert to integer -} - -#else - -int fons__tt_init(FONScontext *context) -{ - FONS_NOTUSED(context); - return 1; -} - -int fons__tt_done(FONScontext *context) -{ - FONS_NOTUSED(context); - return 1; -} - -int fons__tt_loadFont(FONScontext *context, FONSttFontImpl *font, unsigned char *data, int dataSize, int fontIndex) -{ - int offset, stbError; - FONS_NOTUSED(dataSize); - - font->font.userdata = context; - offset = stbtt_GetFontOffsetForIndex(data, fontIndex); - if (offset == -1) { - stbError = 0; - } else { - stbError = stbtt_InitFont(&font->font, data, offset); - } - return stbError; -} - -void fons__tt_getFontVMetrics(FONSttFontImpl *font, int *ascent, int *descent, int *lineGap) -{ - stbtt_GetFontVMetrics(&font->font, ascent, descent, lineGap); -} - -float fons__tt_getPixelHeightScale(FONSttFontImpl *font, float size) -{ - return stbtt_ScaleForMappingEmToPixels(&font->font, size); -} - -int fons__tt_getGlyphIndex(FONSttFontImpl *font, int codepoint) -{ - return stbtt_FindGlyphIndex(&font->font, codepoint); -} - -int fons__tt_buildGlyphBitmap(FONSttFontImpl *font, int glyph, float size, float scale, - int *advance, int *lsb, int *x0, int *y0, int *x1, int *y1) -{ - FONS_NOTUSED(size); - stbtt_GetGlyphHMetrics(&font->font, glyph, advance, lsb); - stbtt_GetGlyphBitmapBox(&font->font, glyph, scale, scale, x0, y0, x1, y1); - return 1; -} - -void fons__tt_renderGlyphBitmap(FONSttFontImpl *font, unsigned char *output, int outWidth, int outHeight, int outStride, - float scaleX, float scaleY, int glyph) -{ - stbtt_MakeGlyphBitmap(&font->font, output, outWidth, outHeight, outStride, scaleX, scaleY, glyph); -} - -int fons__tt_getGlyphKernAdvance(FONSttFontImpl *font, int glyph1, int glyph2) -{ - return stbtt_GetGlyphKernAdvance(&font->font, glyph1, glyph2); -} - -#endif - -#ifdef STB_TRUETYPE_IMPLEMENTATION - -/*static void* fons__tmpalloc(size_t size, void* up) -{ - unsigned char* ptr; - FONScontext* stash = (FONScontext*)up; - - // 16-byte align the returned pointer - size = (size + 0xf) & ~0xf; - - if (stash->nscratch+(int)size > FONS_SCRATCH_BUF_SIZE) { - if (stash->handleError) - stash->handleError(stash->errorUptr, FONS_SCRATCH_FULL, stash->nscratch+(int)size); - return NULL; - } - ptr = stash->scratch + stash->nscratch; - stash->nscratch += (int)size; - return ptr; -} - -static void fons__tmpfree(void* ptr, void* up) -{ - (void)ptr; - (void)up; - // empty -}*/ - -#endif // STB_TRUETYPE_IMPLEMENTATION - -// Copyright (c) 2008-2010 Bjoern Hoehrmann -// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. - -#define FONS_UTF8_ACCEPT 0 -#define FONS_UTF8_REJECT 12 - -static unsigned int fons__decutf8(unsigned int* state, unsigned int* codep, unsigned int byte) -{ - static const unsigned char utf8d[] = { - // The first part of the table maps bytes to character classes that - // to reduce the size of the transition table and create bitmasks. - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, - - // The second part is a transition table that maps a combination - // of a state of the automaton and a character class to a state. - 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12, - 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12, - 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12, - 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12, - 12,36,12,12,12,12,12,12,12,12,12,12, - }; - - unsigned int type = utf8d[byte]; - - *codep = (*state != FONS_UTF8_ACCEPT) ? - (byte & 0x3fu) | (*codep << 6) : - (0xff >> type) & (byte); - - *state = utf8d[256 + *state + type]; - return *state; -} - -// Atlas based on Skyline Bin Packer by Jukka Jylänki - -static void fons__deleteAtlas(FONSatlas* atlas) -{ - if (atlas == NULL) return; - if (atlas->nodes != NULL) NVG_FREE(atlas->nodes); - NVG_FREE(atlas); -} - -static FONSatlas* fons__allocAtlas(int w, int h, int nnodes) -{ - FONSatlas* atlas = NULL; - - // Allocate memory for the font stash. - atlas = (FONSatlas*)NVG_MALLOC(sizeof(FONSatlas)); - if (atlas == NULL) goto error; - memset(atlas, 0, sizeof(FONSatlas)); - - atlas->width = w; - atlas->height = h; - - // Allocate space for skyline nodes - atlas->nodes = (FONSatlasNode*)NVG_MALLOC(sizeof(FONSatlasNode) * nnodes); - if (atlas->nodes == NULL) goto error; - memset(atlas->nodes, 0, sizeof(FONSatlasNode) * nnodes); - atlas->nnodes = 0; - atlas->cnodes = nnodes; - - // Init root node. - atlas->nodes[0].x = 0; - atlas->nodes[0].y = 0; - atlas->nodes[0].width = (short)w; - atlas->nnodes++; - - return atlas; - -error: - if (atlas) fons__deleteAtlas(atlas); - return NULL; -} - -static int fons__atlasInsertNode(FONSatlas* atlas, int idx, int x, int y, int w) -{ - int i; - // Insert node - if (atlas->nnodes+1 > atlas->cnodes) { - atlas->cnodes = atlas->cnodes == 0 ? 8 : atlas->cnodes * 2; - atlas->nodes = (FONSatlasNode*)NVG_REALLOC(atlas->nodes, sizeof(FONSatlasNode) * atlas->cnodes); - if (atlas->nodes == NULL) - return 0; - } - for (i = atlas->nnodes; i > idx; i--) - atlas->nodes[i] = atlas->nodes[i-1]; - atlas->nodes[idx].x = (short)x; - atlas->nodes[idx].y = (short)y; - atlas->nodes[idx].width = (short)w; - atlas->nnodes++; - - return 1; -} - -static void fons__atlasRemoveNode(FONSatlas* atlas, int idx) -{ - int i; - if (atlas->nnodes == 0) return; - for (i = idx; i < atlas->nnodes-1; i++) - atlas->nodes[i] = atlas->nodes[i+1]; - atlas->nnodes--; -} - -static void fons__atlasExpand(FONSatlas* atlas, int w, int h) -{ - // Insert node for empty space - if (w > atlas->width) - fons__atlasInsertNode(atlas, atlas->nnodes, atlas->width, 0, w - atlas->width); - atlas->width = w; - atlas->height = h; -} - -static void fons__atlasReset(FONSatlas* atlas, int w, int h) -{ - atlas->width = w; - atlas->height = h; - atlas->nnodes = 0; - - // Init root node. - atlas->nodes[0].x = 0; - atlas->nodes[0].y = 0; - atlas->nodes[0].width = (short)w; - atlas->nnodes++; -} - -static int fons__atlasAddSkylineLevel(FONSatlas* atlas, int idx, int x, int y, int w, int h) -{ - int i; - - // Insert new node - if (fons__atlasInsertNode(atlas, idx, x, y+h, w) == 0) - return 0; - - // Delete skyline segments that fall under the shadow of the new segment. - for (i = idx+1; i < atlas->nnodes; i++) { - if (atlas->nodes[i].x < atlas->nodes[i-1].x + atlas->nodes[i-1].width) { - int shrink = atlas->nodes[i-1].x + atlas->nodes[i-1].width - atlas->nodes[i].x; - atlas->nodes[i].x += (short)shrink; - atlas->nodes[i].width -= (short)shrink; - if (atlas->nodes[i].width <= 0) { - fons__atlasRemoveNode(atlas, i); - i--; - } else { - break; - } - } else { - break; - } - } - - // Merge same height skyline segments that are next to each other. - for (i = 0; i < atlas->nnodes-1; i++) { - if (atlas->nodes[i].y == atlas->nodes[i+1].y) { - atlas->nodes[i].width += atlas->nodes[i+1].width; - fons__atlasRemoveNode(atlas, i+1); - i--; - } - } - - return 1; -} - -static int fons__atlasRectFits(FONSatlas* atlas, int i, int w, int h) -{ - // Checks if there is enough space at the location of skyline span 'i', - // and return the max height of all skyline spans under that at that location, - // (think tetris block being dropped at that position). Or -1 if no space found. - int x = atlas->nodes[i].x; - int y = atlas->nodes[i].y; - int spaceLeft; - if (x + w > atlas->width) - return -1; - spaceLeft = w; - while (spaceLeft > 0) { - if (i == atlas->nnodes) return -1; - y = fons__maxi(y, atlas->nodes[i].y); - if (y + h > atlas->height) return -1; - spaceLeft -= atlas->nodes[i].width; - ++i; - } - return y; -} - -static int fons__atlasAddRect(FONSatlas* atlas, int rw, int rh, int* rx, int* ry) -{ - int besth = atlas->height, bestw = atlas->width, besti = -1; - int bestx = -1, besty = -1, i; - - // Bottom left fit heuristic. - for (i = 0; i < atlas->nnodes; i++) { - int y = fons__atlasRectFits(atlas, i, rw, rh); - if (y != -1) { - if (y + rh < besth || (y + rh == besth && atlas->nodes[i].width < bestw)) { - besti = i; - bestw = atlas->nodes[i].width; - besth = y + rh; - bestx = atlas->nodes[i].x; - besty = y; - } - } - } - - if (besti == -1) - return 0; - - // Perform the actual packing. - if (fons__atlasAddSkylineLevel(atlas, besti, bestx, besty, rw, rh) == 0) - return 0; - - *rx = bestx; - *ry = besty; - - return 1; -} - -static void fons__addWhiteRect(FONScontext* stash, int w, int h) -{ - int x, y, gx, gy; - unsigned char* dst; - if (fons__atlasAddRect(stash->atlas, w, h, &gx, &gy) == 0) - return; - - // Rasterize - dst = &stash->texData[gx + gy * stash->params.width]; - for (y = 0; y < h; y++) { - for (x = 0; x < w; x++) - dst[x] = 0xff; - dst += stash->params.width; - } - - stash->dirtyRect[0] = fons__mini(stash->dirtyRect[0], gx); - stash->dirtyRect[1] = fons__mini(stash->dirtyRect[1], gy); - stash->dirtyRect[2] = fons__maxi(stash->dirtyRect[2], gx+w); - stash->dirtyRect[3] = fons__maxi(stash->dirtyRect[3], gy+h); -} - -FONScontext* fonsCreateInternal(FONSparams* params) -{ - FONScontext* stash = NULL; - - // Allocate memory for the font stash. - stash = (FONScontext*)NVG_MALLOC(sizeof(FONScontext)); - if (stash == NULL) goto error; - memset(stash, 0, sizeof(FONScontext)); - - stash->params = *params; - - // Allocate scratch buffer. - stash->scratch = (unsigned char*)NVG_MALLOC(FONS_SCRATCH_BUF_SIZE); - if (stash->scratch == NULL) goto error; - - // Initialize implementation library - if (!fons__tt_init(stash)) goto error; - - if (stash->params.renderCreate != NULL) { - if (stash->params.renderCreate(stash->params.userPtr, stash->params.width, stash->params.height) == 0) - goto error; - } - - stash->atlas = fons__allocAtlas(stash->params.width, stash->params.height, FONS_INIT_ATLAS_NODES); - if (stash->atlas == NULL) goto error; - - // Allocate space for fonts. - stash->fonts = (FONSfont**)NVG_MALLOC(sizeof(FONSfont*) * FONS_INIT_FONTS); - if (stash->fonts == NULL) goto error; - memset(stash->fonts, 0, sizeof(FONSfont*) * FONS_INIT_FONTS); - stash->cfonts = FONS_INIT_FONTS; - stash->nfonts = 0; - - // Create texture for the cache. - stash->itw = 1.0f/stash->params.width; - stash->ith = 1.0f/stash->params.height; - stash->texData = (unsigned char*)NVG_MALLOC(stash->params.width * stash->params.height); - if (stash->texData == NULL) goto error; - memset(stash->texData, 0, stash->params.width * stash->params.height); - - stash->dirtyRect[0] = stash->params.width; - stash->dirtyRect[1] = stash->params.height; - stash->dirtyRect[2] = 0; - stash->dirtyRect[3] = 0; - - // Add white rect at 0,0 for debug drawing. - fons__addWhiteRect(stash, 2,2); - - fonsPushState(stash); - fonsClearState(stash); - - return stash; - -error: - fonsDeleteInternal(stash); - return NULL; -} - -static FONSstate* fons__getState(FONScontext* stash) -{ - return &stash->states[stash->nstates-1]; -} - -int fonsAddFallbackFont(FONScontext* stash, int base, int fallback) -{ - FONSfont* baseFont = stash->fonts[base]; - if (baseFont->nfallbacks < FONS_MAX_FALLBACKS) { - baseFont->fallbacks[baseFont->nfallbacks++] = fallback; - return 1; - } - return 0; -} - -void fonsResetFallbackFont(FONScontext* stash, int base) -{ - int i; - - FONSfont* baseFont = stash->fonts[base]; - baseFont->nfallbacks = 0; - baseFont->nglyphs = 0; - for (i = 0; i < FONS_HASH_LUT_SIZE; i++) - baseFont->lut[i] = -1; -} - -void fonsSetSize(FONScontext* stash, float size) -{ - fons__getState(stash)->size = size; -} - -void fonsSetColor(FONScontext* stash, unsigned int color) -{ - fons__getState(stash)->color = color; -} - -void fonsSetSpacing(FONScontext* stash, float spacing) -{ - fons__getState(stash)->spacing = spacing; -} - -void fonsSetBlur(FONScontext* stash, float blur) -{ - fons__getState(stash)->blur = blur; -} - -void fonsSetAlign(FONScontext* stash, int align) -{ - fons__getState(stash)->align = align; -} - -void fonsSetFont(FONScontext* stash, int font) -{ - fons__getState(stash)->font = font; -} - -void fonsPushState(FONScontext* stash) -{ - if (stash->nstates >= FONS_MAX_STATES) { - if (stash->handleError) - stash->handleError(stash->errorUptr, FONS_STATES_OVERFLOW, 0); - return; - } - if (stash->nstates > 0) - memcpy(&stash->states[stash->nstates], &stash->states[stash->nstates-1], sizeof(FONSstate)); - stash->nstates++; -} - -void fonsPopState(FONScontext* stash) -{ - if (stash->nstates <= 1) { - if (stash->handleError) - stash->handleError(stash->errorUptr, FONS_STATES_UNDERFLOW, 0); - return; - } - stash->nstates--; -} - -void fonsClearState(FONScontext* stash) -{ - FONSstate* state = fons__getState(stash); - state->size = 12.0f; - state->color = 0xffffffff; - state->font = 0; - state->blur = 0; - state->spacing = 0; - state->align = FONS_ALIGN_LEFT | FONS_ALIGN_BASELINE; -} - -static void fons__freeFont(FONSfont* font) -{ - if (font == NULL) return; - if (font->glyphs) NVG_FREE(font->glyphs); - if (font->freeData && font->data) NVG_FREE(font->data); - NVG_FREE(font); -} - -static int fons__allocFont(FONScontext* stash) -{ - FONSfont* font = NULL; - if (stash->nfonts+1 > stash->cfonts) { - stash->cfonts = stash->cfonts == 0 ? 8 : stash->cfonts * 2; - stash->fonts = (FONSfont**)NVG_REALLOC(stash->fonts, sizeof(FONSfont*) * stash->cfonts); - if (stash->fonts == NULL) - return -1; - } - font = (FONSfont*)NVG_MALLOC(sizeof(FONSfont)); - if (font == NULL) goto error; - memset(font, 0, sizeof(FONSfont)); - - font->glyphs = (FONSglyph*)NVG_MALLOC(sizeof(FONSglyph) * FONS_INIT_GLYPHS); - if (font->glyphs == NULL) goto error; - font->cglyphs = FONS_INIT_GLYPHS; - font->nglyphs = 0; - - stash->fonts[stash->nfonts++] = font; - return stash->nfonts-1; - -error: - fons__freeFont(font); - - return FONS_INVALID; -} - -int fonsAddFont(FONScontext* stash, const char* name, const char* path, int fontIndex) -{ - FILE* fp = 0; - int dataSize = 0; - size_t readed; - unsigned char* data = NULL; - - // Read in the font data. - fp = fopen(path, "rb"); - if (fp == NULL) goto error; - fseek(fp,0,SEEK_END); - dataSize = (int)ftell(fp); - fseek(fp,0,SEEK_SET); - data = (unsigned char*)NVG_MALLOC(dataSize); - if (data == NULL) goto error; - readed = fread(data, 1, dataSize, fp); - fclose(fp); - fp = 0; - if (readed != (size_t)dataSize) goto error; - - return fonsAddFontMem(stash, name, data, dataSize, 1, fontIndex); - -error: - if (data) NVG_FREE(data); - if (fp) fclose(fp); - return FONS_INVALID; -} - -int fonsAddFontMem(FONScontext* stash, const char* name, unsigned char* data, int dataSize, int freeData, int fontIndex) -{ - int i, ascent, descent, fh, lineGap; - FONSfont* font; - - int idx = fons__allocFont(stash); - if (idx == FONS_INVALID) - return FONS_INVALID; - - font = stash->fonts[idx]; - - strncpy(font->name, name, sizeof(font->name)); - font->name[sizeof(font->name)-1] = '\0'; - - // Init hash lookup. - for (i = 0; i < FONS_HASH_LUT_SIZE; ++i) - font->lut[i] = -1; - - // Read in the font data. - font->dataSize = dataSize; - font->data = data; - font->freeData = (unsigned char)freeData; - - // Init font - stash->nscratch = 0; - if (!fons__tt_loadFont(stash, &font->font, data, dataSize, fontIndex)) goto error; - - // Store normalized line height. The real line height is got - // by multiplying the lineh by font size. - fons__tt_getFontVMetrics( &font->font, &ascent, &descent, &lineGap); - ascent += lineGap; - fh = ascent - descent; - font->ascender = (float)ascent / (float)fh; - font->descender = (float)descent / (float)fh; - font->lineh = font->ascender - font->descender; - - return idx; - -error: - fons__freeFont(font); - stash->nfonts--; - return FONS_INVALID; -} - -int fonsGetFontByName(FONScontext* s, const char* name) -{ - int i; - for (i = 0; i < s->nfonts; i++) { - if (strcmp(s->fonts[i]->name, name) == 0) - return i; - } - return FONS_INVALID; -} - - -static FONSglyph* fons__allocGlyph(FONSfont* font) -{ - if (font->nglyphs+1 > font->cglyphs) { - font->cglyphs = font->cglyphs == 0 ? 8 : font->cglyphs * 2; - font->glyphs = (FONSglyph*)NVG_REALLOC(font->glyphs, sizeof(FONSglyph) * font->cglyphs); - if (font->glyphs == NULL) return NULL; - } - font->nglyphs++; - return &font->glyphs[font->nglyphs-1]; -} - - -// Based on Exponential blur, Jani Huhtanen, 2006 - -#define APREC 16 -#define ZPREC 7 - -static void fons__blurCols(unsigned char* dst, int w, int h, int dstStride, int alpha) -{ - int x, y; - for (y = 0; y < h; y++) { - int z = 0; // force zero border - for (x = 1; x < w; x++) { - z += (alpha * (((int)(dst[x]) << ZPREC) - z)) >> APREC; - dst[x] = (unsigned char)(z >> ZPREC); - } - dst[w-1] = 0; // force zero border - z = 0; - for (x = w-2; x >= 0; x--) { - z += (alpha * (((int)(dst[x]) << ZPREC) - z)) >> APREC; - dst[x] = (unsigned char)(z >> ZPREC); - } - dst[0] = 0; // force zero border - dst += dstStride; - } -} - -static void fons__blurRows(unsigned char* dst, int w, int h, int dstStride, int alpha) -{ - int x, y; - for (x = 0; x < w; x++) { - int z = 0; // force zero border - for (y = dstStride; y < h*dstStride; y += dstStride) { - z += (alpha * (((int)(dst[y]) << ZPREC) - z)) >> APREC; - dst[y] = (unsigned char)(z >> ZPREC); - } - dst[(h-1)*dstStride] = 0; // force zero border - z = 0; - for (y = (h-2)*dstStride; y >= 0; y -= dstStride) { - z += (alpha * (((int)(dst[y]) << ZPREC) - z)) >> APREC; - dst[y] = (unsigned char)(z >> ZPREC); - } - dst[0] = 0; // force zero border - dst++; - } -} - - -static void fons__blur(FONScontext* stash, unsigned char* dst, int w, int h, int dstStride, int blur) -{ - int alpha; - float sigma; - (void)stash; - - if (blur < 1) - return; - // Calculate the alpha such that 90% of the kernel is within the radius. (Kernel extends to infinity) - sigma = (float)blur * 0.57735f; // 1 / sqrt(3) - alpha = (int)((1< 20) iblur = 20; - pad = iblur+2; - - // Reset allocator. - stash->nscratch = 0; - - // Find code point and size. - h = fons__hashint(codepoint) & (FONS_HASH_LUT_SIZE-1); - i = font->lut[h]; - while (i != -1) { - if (font->glyphs[i].codepoint == codepoint && font->glyphs[i].size == isize && font->glyphs[i].blur == iblur) { - glyph = &font->glyphs[i]; - if (bitmapOption == FONS_GLYPH_BITMAP_OPTIONAL || (glyph->x0 >= 0 && glyph->y0 >= 0)) { - return glyph; - } - // At this point, glyph exists but the bitmap data is not yet created. - break; - } - i = font->glyphs[i].next; - } - - // Create a new glyph or rasterize bitmap data for a cached glyph. - g = fons__tt_getGlyphIndex(&font->font, codepoint); - // Try to find the glyph in fallback fonts. - if (g == 0) { - for (i = 0; i < font->nfallbacks; ++i) { - FONSfont* fallbackFont = stash->fonts[font->fallbacks[i]]; - int fallbackIndex = fons__tt_getGlyphIndex(&fallbackFont->font, codepoint); - if (fallbackIndex != 0) { - g = fallbackIndex; - renderFont = fallbackFont; - break; - } - } - // It is possible that we did not find a fallback glyph. - // In that case the glyph index 'g' is 0, and we'll proceed below and cache empty glyph. - } - scale = fons__tt_getPixelHeightScale(&renderFont->font, size); - fons__tt_buildGlyphBitmap(&renderFont->font, g, size, scale, &advance, &lsb, &x0, &y0, &x1, &y1); - gw = x1-x0 + pad*2; - gh = y1-y0 + pad*2; - - // Determines the spot to draw glyph in the atlas. - if (bitmapOption == FONS_GLYPH_BITMAP_REQUIRED) { - // Find free spot for the rect in the atlas - added = fons__atlasAddRect(stash->atlas, gw, gh, &gx, &gy); - if (added == 0 && stash->handleError != NULL) { - // Atlas is full, let the user to resize the atlas (or not), and try again. - stash->handleError(stash->errorUptr, FONS_ATLAS_FULL, 0); - added = fons__atlasAddRect(stash->atlas, gw, gh, &gx, &gy); - } - if (added == 0) return NULL; - } else { - // Negative coordinate indicates there is no bitmap data created. - gx = -1; - gy = -1; - } - - // Init glyph. - if (glyph == NULL) { - glyph = fons__allocGlyph(font); - glyph->codepoint = codepoint; - glyph->size = isize; - glyph->blur = iblur; - glyph->next = 0; - - // Insert char to hash lookup. - glyph->next = font->lut[h]; - font->lut[h] = font->nglyphs-1; - } - glyph->index = g; - glyph->x0 = (short)gx; - glyph->y0 = (short)gy; - glyph->x1 = (short)(glyph->x0+gw); - glyph->y1 = (short)(glyph->y0+gh); - glyph->xadv = (short)(scale * advance * 10.0f); - glyph->xoff = (short)(x0 - pad); - glyph->yoff = (short)(y0 - pad); - - if (bitmapOption == FONS_GLYPH_BITMAP_OPTIONAL) { - return glyph; - } - - // Rasterize - dst = &stash->texData[(glyph->x0+pad) + (glyph->y0+pad) * stash->params.width]; - fons__tt_renderGlyphBitmap(&renderFont->font, dst, gw-pad*2,gh-pad*2, stash->params.width, scale, scale, g); - - // Make sure there is one pixel empty border. - dst = &stash->texData[glyph->x0 + glyph->y0 * stash->params.width]; - for (y = 0; y < gh; y++) { - dst[y*stash->params.width] = 0; - dst[gw-1 + y*stash->params.width] = 0; - } - for (x = 0; x < gw; x++) { - dst[x] = 0; - dst[x + (gh-1)*stash->params.width] = 0; - } - - // Debug code to color the glyph background -/* unsigned char* fdst = &stash->texData[glyph->x0 + glyph->y0 * stash->params.width]; - for (y = 0; y < gh; y++) { - for (x = 0; x < gw; x++) { - int a = (int)fdst[x+y*stash->params.width] + 20; - if (a > 255) a = 255; - fdst[x+y*stash->params.width] = a; - } - }*/ - - // Blur - if (iblur > 0) { - stash->nscratch = 0; - bdst = &stash->texData[glyph->x0 + glyph->y0 * stash->params.width]; - fons__blur(stash, bdst, gw, gh, stash->params.width, iblur); - } - - stash->dirtyRect[0] = fons__mini(stash->dirtyRect[0], glyph->x0); - stash->dirtyRect[1] = fons__mini(stash->dirtyRect[1], glyph->y0); - stash->dirtyRect[2] = fons__maxi(stash->dirtyRect[2], glyph->x1); - stash->dirtyRect[3] = fons__maxi(stash->dirtyRect[3], glyph->y1); - - return glyph; -} - -static void fons__getQuad(FONScontext* stash, FONSfont* font, - int prevGlyphIndex, FONSglyph* glyph, - float scale, float spacing, float* x, float* y, FONSquad* q) -{ - float rx,ry,xoff,yoff,x0,y0,x1,y1; - - if (prevGlyphIndex != -1) { - float adv = fons__tt_getGlyphKernAdvance(&font->font, prevGlyphIndex, glyph->index) * scale; - *x += (int)(adv + spacing + 0.5f); - } - - // Each glyph has 2px border to allow good interpolation, - // one pixel to prevent leaking, and one to allow good interpolation for rendering. - // Inset the texture region by one pixel for correct interpolation. - xoff = (short)(glyph->xoff+1); - yoff = (short)(glyph->yoff+1); - x0 = (float)(glyph->x0+1); - y0 = (float)(glyph->y0+1); - x1 = (float)(glyph->x1-1); - y1 = (float)(glyph->y1-1); - - if (stash->params.flags & FONS_ZERO_TOPLEFT) { - rx = floorf(*x + xoff); - ry = floorf(*y + yoff); - - q->x0 = rx; - q->y0 = ry; - q->x1 = rx + x1 - x0; - q->y1 = ry + y1 - y0; - - q->s0 = x0 * stash->itw; - q->t0 = y0 * stash->ith; - q->s1 = x1 * stash->itw; - q->t1 = y1 * stash->ith; - } else { - rx = floorf(*x + xoff); - ry = floorf(*y - yoff); - - q->x0 = rx; - q->y0 = ry; - q->x1 = rx + x1 - x0; - q->y1 = ry - y1 + y0; - - q->s0 = x0 * stash->itw; - q->t0 = y0 * stash->ith; - q->s1 = x1 * stash->itw; - q->t1 = y1 * stash->ith; - } - - *x += (int)(glyph->xadv / 10.0f + 0.5f); -} - -static void fons__flush(FONScontext* stash) -{ - // Flush texture - if (stash->dirtyRect[0] < stash->dirtyRect[2] && stash->dirtyRect[1] < stash->dirtyRect[3]) { - if (stash->params.renderUpdate != NULL) - stash->params.renderUpdate(stash->params.userPtr, stash->dirtyRect, stash->texData); - // Reset dirty rect - stash->dirtyRect[0] = stash->params.width; - stash->dirtyRect[1] = stash->params.height; - stash->dirtyRect[2] = 0; - stash->dirtyRect[3] = 0; - } - - // Flush triangles - if (stash->nverts > 0) { - if (stash->params.renderDraw != NULL) - stash->params.renderDraw(stash->params.userPtr, stash->verts, stash->tcoords, stash->colors, stash->nverts); - stash->nverts = 0; - } -} - -static __inline void fons__vertex(FONScontext* stash, float x, float y, float s, float t, unsigned int c) -{ - stash->verts[stash->nverts*2+0] = x; - stash->verts[stash->nverts*2+1] = y; - stash->tcoords[stash->nverts*2+0] = s; - stash->tcoords[stash->nverts*2+1] = t; - stash->colors[stash->nverts] = c; - stash->nverts++; -} - -static float fons__getVertAlign(FONScontext* stash, FONSfont* font, int align, short isize) -{ - if (stash->params.flags & FONS_ZERO_TOPLEFT) { - if (align & FONS_ALIGN_TOP) { - return font->ascender * (float)isize/10.0f; - } else if (align & FONS_ALIGN_MIDDLE) { - return (font->ascender + font->descender) / 2.0f * (float)isize/10.0f; - } else if (align & FONS_ALIGN_BASELINE) { - return 0.0f; - } else if (align & FONS_ALIGN_BOTTOM) { - return font->descender * (float)isize/10.0f; - } - } else { - if (align & FONS_ALIGN_TOP) { - return -font->ascender * (float)isize/10.0f; - } else if (align & FONS_ALIGN_MIDDLE) { - return -(font->ascender + font->descender) / 2.0f * (float)isize/10.0f; - } else if (align & FONS_ALIGN_BASELINE) { - return 0.0f; - } else if (align & FONS_ALIGN_BOTTOM) { - return -font->descender * (float)isize/10.0f; - } - } - return 0.0; -} - -float fonsDrawText(FONScontext* stash, - float x, float y, - const char* str, const char* end) -{ - FONSstate* state = fons__getState(stash); - unsigned int codepoint; - unsigned int utf8state = 0; - FONSglyph* glyph = NULL; - FONSquad q; - int prevGlyphIndex = -1; - short isize = (short)(state->size*10.0f); - short iblur = (short)state->blur; - float scale; - FONSfont* font; - float width; - - if (stash == NULL) return x; - if (state->font < 0 || state->font >= stash->nfonts) return x; - font = stash->fonts[state->font]; - if (font->data == NULL) return x; - - scale = fons__tt_getPixelHeightScale(&font->font, (float)isize/10.0f); - - if (end == NULL) - end = str + strlen(str); - - // Align horizontally - if (state->align & FONS_ALIGN_LEFT) { - // empty - } else if (state->align & FONS_ALIGN_RIGHT) { - width = fonsTextBounds(stash, x,y, str, end, NULL); - x -= width; - } else if (state->align & FONS_ALIGN_CENTER) { - width = fonsTextBounds(stash, x,y, str, end, NULL); - x -= width * 0.5f; - } - // Align vertically. - y += fons__getVertAlign(stash, font, state->align, isize); - - for (; str != end; ++str) { - if (fons__decutf8(&utf8state, &codepoint, *(const unsigned char*)str)) - continue; - glyph = fons__getGlyph(stash, font, codepoint, isize, iblur, FONS_GLYPH_BITMAP_REQUIRED); - if (glyph != NULL) { - fons__getQuad(stash, font, prevGlyphIndex, glyph, scale, state->spacing, &x, &y, &q); - - if (stash->nverts+6 > FONS_VERTEX_COUNT) - fons__flush(stash); - - fons__vertex(stash, q.x0, q.y0, q.s0, q.t0, state->color); - fons__vertex(stash, q.x1, q.y1, q.s1, q.t1, state->color); - fons__vertex(stash, q.x1, q.y0, q.s1, q.t0, state->color); - - fons__vertex(stash, q.x0, q.y0, q.s0, q.t0, state->color); - fons__vertex(stash, q.x0, q.y1, q.s0, q.t1, state->color); - fons__vertex(stash, q.x1, q.y1, q.s1, q.t1, state->color); - } - prevGlyphIndex = glyph != NULL ? glyph->index : -1; - } - fons__flush(stash); - - return x; -} - -int fonsTextIterInit(FONScontext* stash, FONStextIter* iter, - float x, float y, const char* str, const char* end, int bitmapOption) -{ - FONSstate* state = fons__getState(stash); - float width; - - memset(iter, 0, sizeof(*iter)); - - if (stash == NULL) return 0; - if (state->font < 0 || state->font >= stash->nfonts) return 0; - iter->font = stash->fonts[state->font]; - if (iter->font->data == NULL) return 0; - - iter->isize = (short)(state->size*10.0f); - iter->iblur = (short)state->blur; - iter->scale = fons__tt_getPixelHeightScale(&iter->font->font, (float)iter->isize/10.0f); - - // Align horizontally - if (state->align & FONS_ALIGN_LEFT) { - // empty - } else if (state->align & FONS_ALIGN_RIGHT) { - width = fonsTextBounds(stash, x,y, str, end, NULL); - x -= width; - } else if (state->align & FONS_ALIGN_CENTER) { - width = fonsTextBounds(stash, x,y, str, end, NULL); - x -= width * 0.5f; - } - // Align vertically. - y += fons__getVertAlign(stash, iter->font, state->align, iter->isize); - - if (end == NULL) - end = str + strlen(str); - - iter->x = iter->nextx = x; - iter->y = iter->nexty = y; - iter->spacing = state->spacing; - iter->str = str; - iter->next = str; - iter->end = end; - iter->codepoint = 0; - iter->prevGlyphIndex = -1; - iter->bitmapOption = bitmapOption; - - return 1; -} - -int fonsTextIterNext(FONScontext* stash, FONStextIter* iter, FONSquad* quad) -{ - FONSglyph* glyph = NULL; - const char* str = iter->next; - iter->str = iter->next; - - if (str == iter->end) - return 0; - - for (; str != iter->end; str++) { - if (fons__decutf8(&iter->utf8state, &iter->codepoint, *(const unsigned char*)str)) - continue; - str++; - // Get glyph and quad - iter->x = iter->nextx; - iter->y = iter->nexty; - glyph = fons__getGlyph(stash, iter->font, iter->codepoint, iter->isize, iter->iblur, iter->bitmapOption); - // If the iterator was initialized with FONS_GLYPH_BITMAP_OPTIONAL, then the UV coordinates of the quad will be invalid. - if (glyph != NULL) - fons__getQuad(stash, iter->font, iter->prevGlyphIndex, glyph, iter->scale, iter->spacing, &iter->nextx, &iter->nexty, quad); - iter->prevGlyphIndex = glyph != NULL ? glyph->index : -1; - break; - } - iter->next = str; - - return 1; -} - -void fonsDrawDebug(FONScontext* stash, float x, float y) -{ - int i; - int w = stash->params.width; - int h = stash->params.height; - float u = w == 0 ? 0 : (1.0f / w); - float v = h == 0 ? 0 : (1.0f / h); - - if (stash->nverts+6+6 > FONS_VERTEX_COUNT) - fons__flush(stash); - - // Draw background - fons__vertex(stash, x+0, y+0, u, v, 0x0fffffff); - fons__vertex(stash, x+w, y+h, u, v, 0x0fffffff); - fons__vertex(stash, x+w, y+0, u, v, 0x0fffffff); - - fons__vertex(stash, x+0, y+0, u, v, 0x0fffffff); - fons__vertex(stash, x+0, y+h, u, v, 0x0fffffff); - fons__vertex(stash, x+w, y+h, u, v, 0x0fffffff); - - // Draw texture - fons__vertex(stash, x+0, y+0, 0, 0, 0xffffffff); - fons__vertex(stash, x+w, y+h, 1, 1, 0xffffffff); - fons__vertex(stash, x+w, y+0, 1, 0, 0xffffffff); - - fons__vertex(stash, x+0, y+0, 0, 0, 0xffffffff); - fons__vertex(stash, x+0, y+h, 0, 1, 0xffffffff); - fons__vertex(stash, x+w, y+h, 1, 1, 0xffffffff); - - // Drawbug draw atlas - for (i = 0; i < stash->atlas->nnodes; i++) { - FONSatlasNode* n = &stash->atlas->nodes[i]; - - if (stash->nverts+6 > FONS_VERTEX_COUNT) - fons__flush(stash); - - fons__vertex(stash, x+n->x+0, y+n->y+0, u, v, 0xc00000ff); - fons__vertex(stash, x+n->x+n->width, y+n->y+1, u, v, 0xc00000ff); - fons__vertex(stash, x+n->x+n->width, y+n->y+0, u, v, 0xc00000ff); - - fons__vertex(stash, x+n->x+0, y+n->y+0, u, v, 0xc00000ff); - fons__vertex(stash, x+n->x+0, y+n->y+1, u, v, 0xc00000ff); - fons__vertex(stash, x+n->x+n->width, y+n->y+1, u, v, 0xc00000ff); - } - - fons__flush(stash); -} - -float fonsTextBounds(FONScontext* stash, - float x, float y, - const char* str, const char* end, - float* bounds) -{ - FONSstate* state = fons__getState(stash); - unsigned int codepoint; - unsigned int utf8state = 0; - FONSquad q; - FONSglyph* glyph = NULL; - int prevGlyphIndex = -1; - short isize = (short)(state->size*10.0f); - short iblur = (short)state->blur; - float scale; - FONSfont* font; - float startx, advance; - float minx, miny, maxx, maxy; - - if (stash == NULL) return 0; - if (state->font < 0 || state->font >= stash->nfonts) return 0; - font = stash->fonts[state->font]; - if (font->data == NULL) return 0; - - scale = fons__tt_getPixelHeightScale(&font->font, (float)isize/10.0f); - - // Align vertically. - y += fons__getVertAlign(stash, font, state->align, isize); - - minx = maxx = x; - miny = maxy = y; - startx = x; - - if (end == NULL) - end = str + strlen(str); - - for (; str != end; ++str) { - if (fons__decutf8(&utf8state, &codepoint, *(const unsigned char*)str)) - continue; - glyph = fons__getGlyph(stash, font, codepoint, isize, iblur, FONS_GLYPH_BITMAP_OPTIONAL); - if (glyph != NULL) { - fons__getQuad(stash, font, prevGlyphIndex, glyph, scale, state->spacing, &x, &y, &q); - if (q.x0 < minx) minx = q.x0; - if (q.x1 > maxx) maxx = q.x1; - if (stash->params.flags & FONS_ZERO_TOPLEFT) { - if (q.y0 < miny) miny = q.y0; - if (q.y1 > maxy) maxy = q.y1; - } else { - if (q.y1 < miny) miny = q.y1; - if (q.y0 > maxy) maxy = q.y0; - } - } - prevGlyphIndex = glyph != NULL ? glyph->index : -1; - } - - advance = x - startx; - - // Align horizontally - if (state->align & FONS_ALIGN_LEFT) { - // empty - } else if (state->align & FONS_ALIGN_RIGHT) { - minx -= advance; - maxx -= advance; - } else if (state->align & FONS_ALIGN_CENTER) { - minx -= advance * 0.5f; - maxx -= advance * 0.5f; - } - - if (bounds) { - bounds[0] = minx; - bounds[1] = miny; - bounds[2] = maxx; - bounds[3] = maxy; - } - - return advance; -} - -void fonsVertMetrics(FONScontext* stash, - float* ascender, float* descender, float* lineh) -{ - FONSfont* font; - FONSstate* state = fons__getState(stash); - short isize; - - if (stash == NULL) return; - if (state->font < 0 || state->font >= stash->nfonts) return; - font = stash->fonts[state->font]; - isize = (short)(state->size*10.0f); - if (font->data == NULL) return; - - if (ascender) - *ascender = font->ascender*isize/10.0f; - if (descender) - *descender = font->descender*isize/10.0f; - if (lineh) - *lineh = font->lineh*isize/10.0f; -} - -void fonsLineBounds(FONScontext* stash, float y, float* miny, float* maxy) -{ - FONSfont* font; - FONSstate* state = fons__getState(stash); - short isize; - - if (stash == NULL) return; - if (state->font < 0 || state->font >= stash->nfonts) return; - font = stash->fonts[state->font]; - isize = (short)(state->size*10.0f); - if (font->data == NULL) return; - - y += fons__getVertAlign(stash, font, state->align, isize); - - if (stash->params.flags & FONS_ZERO_TOPLEFT) { - *miny = y - font->ascender * (float)isize/10.0f; - *maxy = *miny + font->lineh*isize/10.0f; - } else { - *maxy = y + font->descender * (float)isize/10.0f; - *miny = *maxy - font->lineh*isize/10.0f; - } -} - -const unsigned char* fonsGetTextureData(FONScontext* stash, int* width, int* height) -{ - if (width != NULL) - *width = stash->params.width; - if (height != NULL) - *height = stash->params.height; - return stash->texData; -} - -int fonsValidateTexture(FONScontext* stash, int* dirty) -{ - if (stash->dirtyRect[0] < stash->dirtyRect[2] && stash->dirtyRect[1] < stash->dirtyRect[3]) { - dirty[0] = stash->dirtyRect[0]; - dirty[1] = stash->dirtyRect[1]; - dirty[2] = stash->dirtyRect[2]; - dirty[3] = stash->dirtyRect[3]; - // Reset dirty rect - stash->dirtyRect[0] = stash->params.width; - stash->dirtyRect[1] = stash->params.height; - stash->dirtyRect[2] = 0; - stash->dirtyRect[3] = 0; - return 1; - } - return 0; -} - -void fonsDeleteInternal(FONScontext* stash) -{ - int i; - if (stash == NULL) return; - - if (stash->params.renderDelete) - stash->params.renderDelete(stash->params.userPtr); - - for (i = 0; i < stash->nfonts; ++i) - fons__freeFont(stash->fonts[i]); - - if (stash->atlas) fons__deleteAtlas(stash->atlas); - if (stash->fonts) NVG_FREE(stash->fonts); - if (stash->texData) NVG_FREE(stash->texData); - if (stash->scratch) NVG_FREE(stash->scratch); - fons__tt_done(stash); - NVG_FREE(stash); -} - -void fonsSetErrorCallback(FONScontext* stash, void (*callback)(void* uptr, int error, int val), void* uptr) -{ - if (stash == NULL) return; - stash->handleError = callback; - stash->errorUptr = uptr; -} - -void fonsGetAtlasSize(FONScontext* stash, int* width, int* height) -{ - if (stash == NULL) return; - *width = stash->params.width; - *height = stash->params.height; -} - -int fonsExpandAtlas(FONScontext* stash, int width, int height) -{ - int i, maxy = 0; - unsigned char* data = NULL; - if (stash == NULL) return 0; - - width = fons__maxi(width, stash->params.width); - height = fons__maxi(height, stash->params.height); - - if (width == stash->params.width && height == stash->params.height) - return 1; - - // Flush pending glyphs. - fons__flush(stash); - - // Create new texture - if (stash->params.renderResize != NULL) { - if (stash->params.renderResize(stash->params.userPtr, width, height) == 0) - return 0; - } - // Copy old texture data over. - data = (unsigned char*)NVG_MALLOC(width * height); - if (data == NULL) - return 0; - for (i = 0; i < stash->params.height; i++) { - unsigned char* dst = &data[i*width]; - unsigned char* src = &stash->texData[i*stash->params.width]; - memcpy(dst, src, stash->params.width); - if (width > stash->params.width) - memset(dst+stash->params.width, 0, width - stash->params.width); - } - if (height > stash->params.height) - memset(&data[stash->params.height * width], 0, (height - stash->params.height) * width); - - NVG_FREE(stash->texData); - stash->texData = data; - - // Increase atlas size - fons__atlasExpand(stash->atlas, width, height); - - // Add existing data as dirty. - for (i = 0; i < stash->atlas->nnodes; i++) - maxy = fons__maxi(maxy, stash->atlas->nodes[i].y); - stash->dirtyRect[0] = 0; - stash->dirtyRect[1] = 0; - stash->dirtyRect[2] = stash->params.width; - stash->dirtyRect[3] = maxy; - - stash->params.width = width; - stash->params.height = height; - stash->itw = 1.0f/stash->params.width; - stash->ith = 1.0f/stash->params.height; - - return 1; -} - -int fonsResetAtlas(FONScontext* stash, int width, int height) -{ - int i, j; - if (stash == NULL) return 0; - - // Flush pending glyphs. - fons__flush(stash); - - // Create new texture - if (stash->params.renderResize != NULL) { - if (stash->params.renderResize(stash->params.userPtr, width, height) == 0) - return 0; - } - - // Reset atlas - fons__atlasReset(stash->atlas, width, height); - - // Clear texture data. - stash->texData = (unsigned char*)NVG_REALLOC(stash->texData, width * height); - if (stash->texData == NULL) return 0; - memset(stash->texData, 0, width * height); - - // Reset dirty rect - stash->dirtyRect[0] = width; - stash->dirtyRect[1] = height; - stash->dirtyRect[2] = 0; - stash->dirtyRect[3] = 0; - - // Reset cached glyphs - for (i = 0; i < stash->nfonts; i++) { - FONSfont* font = stash->fonts[i]; - font->nglyphs = 0; - for (j = 0; j < FONS_HASH_LUT_SIZE; j++) - font->lut[j] = -1; - } - - stash->params.width = width; - stash->params.height = height; - stash->itw = 1.0f/stash->params.width; - stash->ith = 1.0f/stash->params.height; - - // Add white rect at 0,0 for debug drawing. - fons__addWhiteRect(stash, 2,2); - - return 1; -} - - -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/nanosvg.h b/FCLauncher/src/main/jni/lwjgl/nanovg/nanosvg.h deleted file mode 100644 index e917a347..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/nanosvg.h +++ /dev/null @@ -1,3167 +0,0 @@ -/* - * Copyright (c) 2013-14 Mikko Mononen memon@inside.org - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * The SVG parser is based on Anti-Grain Geometry 2.4 SVG example - * Copyright (C) 2002-2004 Maxim Shemanarev (McSeem) (http://www.antigrain.com/) - * - * Arc calculation code based on canvg (https://code.google.com/p/canvg/) - * - * Bounding box calculation based on http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html - * - */ - -#ifndef NANOSVG_H -#define NANOSVG_H - -#ifndef NANOSVG_CPLUSPLUS -#ifdef __cplusplus -extern "C" { -#endif -#endif - -// NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes. -// -// The library suits well for anything from rendering scalable icons in your editor application to prototyping a game. -// -// NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request! -// -// The shapes in the SVG images are transformed by the viewBox and converted to specified units. -// That is, you should get the same looking data as your designed in your favorite app. -// -// NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose -// to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters. -// -// The units passed to NanoSVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'. -// DPI (dots-per-inch) controls how the unit conversion is done. -// -// If you don't know or care about the units stuff, "px" and 96 should get you going. - - -/* Example Usage: - // Load SVG - NSVGimage* image; - image = nsvgParseFromFile("test.svg", "px", 96); - printf("size: %f x %f\n", image->width, image->height); - // Use... - for (NSVGshape *shape = image->shapes; shape != NULL; shape = shape->next) { - for (NSVGpath *path = shape->paths; path != NULL; path = path->next) { - for (int i = 0; i < path->npts-1; i += 3) { - float* p = &path->pts[i*2]; - drawCubicBez(p[0],p[1], p[2],p[3], p[4],p[5], p[6],p[7]); - } - } - } - // Delete - nsvgDelete(image); -*/ - -enum NSVGpaintType { - NSVG_PAINT_UNDEF = -1, - NSVG_PAINT_NONE = 0, - NSVG_PAINT_COLOR = 1, - NSVG_PAINT_LINEAR_GRADIENT = 2, - NSVG_PAINT_RADIAL_GRADIENT = 3 -}; - -enum NSVGspreadType { - NSVG_SPREAD_PAD = 0, - NSVG_SPREAD_REFLECT = 1, - NSVG_SPREAD_REPEAT = 2 -}; - -enum NSVGlineJoin { - NSVG_JOIN_MITER = 0, - NSVG_JOIN_ROUND = 1, - NSVG_JOIN_BEVEL = 2 -}; - -enum NSVGlineCap { - NSVG_CAP_BUTT = 0, - NSVG_CAP_ROUND = 1, - NSVG_CAP_SQUARE = 2 -}; - -enum NSVGfillRule { - NSVG_FILLRULE_NONZERO = 0, - NSVG_FILLRULE_EVENODD = 1 -}; - -enum NSVGflags { - NSVG_FLAGS_VISIBLE = 0x01 -}; - -typedef struct NSVGgradientStop { - unsigned int color; - float offset; -} NSVGgradientStop; - -typedef struct NSVGgradient { - float xform[6]; - char spread; - float fx, fy; - int nstops; - NSVGgradientStop stops[1]; -} NSVGgradient; - -typedef struct NSVGpaint { - signed char type; - union { - unsigned int color; - NSVGgradient* gradient; - }; -} NSVGpaint; - -typedef struct NSVGpath -{ - float* pts; // Cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ... - int npts; // Total number of bezier points. - char closed; // Flag indicating if shapes should be treated as closed. - float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy]. - struct NSVGpath* next; // Pointer to next path, or NULL if last element. -} NSVGpath; - -typedef struct NSVGshape -{ - char id[64]; // Optional 'id' attr of the shape or its group - NSVGpaint fill; // Fill paint - NSVGpaint stroke; // Stroke paint - float opacity; // Opacity of the shape. - float strokeWidth; // Stroke width (scaled). - float strokeDashOffset; // Stroke dash offset (scaled). - float strokeDashArray[8]; // Stroke dash array (scaled). - char strokeDashCount; // Number of dash values in dash array. - char strokeLineJoin; // Stroke join type. - char strokeLineCap; // Stroke cap type. - float miterLimit; // Miter limit - char fillRule; // Fill rule, see NSVGfillRule. - unsigned char flags; // Logical or of NSVG_FLAGS_* flags - float bounds[4]; // Tight bounding box of the shape [minx,miny,maxx,maxy]. - char fillGradient[64]; // Optional 'id' of fill gradient - char strokeGradient[64]; // Optional 'id' of stroke gradient - float xform[6]; // Root transformation for fill/stroke gradient - NSVGpath* paths; // Linked list of paths in the image. - struct NSVGshape* next; // Pointer to next shape, or NULL if last element. -} NSVGshape; - -typedef struct NSVGimage -{ - float width; // Width of the image. - float height; // Height of the image. - NSVGshape* shapes; // Linked list of shapes in the image. -} NSVGimage; - -// Parses SVG file from a file, returns SVG image as paths. -NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi); - -// Parses SVG file from a null terminated string, returns SVG image as paths. -// Important note: changes the string. -NSVGimage* nsvgParse(char* input, const char* units, float dpi); - -// Duplicates a path. -NSVGpath* nsvgDuplicatePath(NSVGpath* p); - -// Deletes an image. -void nsvgDelete(NSVGimage* image); - -#ifndef NANOSVG_CPLUSPLUS -#ifdef __cplusplus -} -#endif -#endif - -#ifdef NANOSVG_IMPLEMENTATION - -#include -#include -#include -#include - -#define NSVG_PI (3.14159265358979323846264338327f) -#define NSVG_KAPPA90 (0.5522847493f) // Length proportional to radius of a cubic bezier handle for 90deg arcs. - -#define NSVG_ALIGN_MIN 0 -#define NSVG_ALIGN_MID 1 -#define NSVG_ALIGN_MAX 2 -#define NSVG_ALIGN_NONE 0 -#define NSVG_ALIGN_MEET 1 -#define NSVG_ALIGN_SLICE 2 - -#define NSVG_NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0) -#define NSVG_RGB(r, g, b) (((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16)) -#define NSVG_RGBA(r, g, b, a) (((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16) | ((unsigned int)a << 24)) - -#ifdef _MSC_VER - #pragma warning (disable: 4996) // Switch off security warnings - #pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings - #ifdef __cplusplus - #define NSVG_INLINE inline - #else - #define NSVG_INLINE - #endif -#else - #define NSVG_INLINE inline -#endif - - -static int nsvg__isspace(char c) -{ - return strchr(" \t\n\v\f\r", c) != 0; -} - -static int nsvg__isdigit(char c) -{ - return c >= '0' && c <= '9'; -} - -static NSVG_INLINE float nsvg__minf(float a, float b) { return a < b ? a : b; } -static NSVG_INLINE float nsvg__maxf(float a, float b) { return a > b ? a : b; } - - -// Simple XML parser - -#define NSVG_XML_TAG 1 -#define NSVG_XML_CONTENT 2 -#define NSVG_XML_MAX_ATTRIBS 256 - -static void nsvg__parseContent(char* s, - void (*contentCb)(void* ud, const char* s), - void* ud) -{ - // Trim start white spaces - while (*s && nsvg__isspace(*s)) s++; - if (!*s) return; - - if (contentCb) - (*contentCb)(ud, s); -} - -static void nsvg__parseElement(char* s, - void (*startelCb)(void* ud, const char* el, const char** attr), - void (*endelCb)(void* ud, const char* el), - void* ud) -{ - const char* attr[NSVG_XML_MAX_ATTRIBS]; - int nattr = 0; - char* name; - int start = 0; - int end = 0; - char quote; - - // Skip white space after the '<' - while (*s && nsvg__isspace(*s)) s++; - - // Check if the tag is end tag - if (*s == '/') { - s++; - end = 1; - } else { - start = 1; - } - - // Skip comments, data and preprocessor stuff. - if (!*s || *s == '?' || *s == '!') - return; - - // Get tag name - name = s; - while (*s && !nsvg__isspace(*s)) s++; - if (*s) { *s++ = '\0'; } - - // Get attribs - while (!end && *s && nattr < NSVG_XML_MAX_ATTRIBS-3) { - char* name = NULL; - char* value = NULL; - - // Skip white space before the attrib name - while (*s && nsvg__isspace(*s)) s++; - if (!*s) break; - if (*s == '/') { - end = 1; - break; - } - name = s; - // Find end of the attrib name. - while (*s && !nsvg__isspace(*s) && *s != '=') s++; - if (*s) { *s++ = '\0'; } - // Skip until the beginning of the value. - while (*s && *s != '\"' && *s != '\'') s++; - if (!*s) break; - quote = *s; - s++; - // Store value and find the end of it. - value = s; - while (*s && *s != quote) s++; - if (*s) { *s++ = '\0'; } - - // Store only well formed attributes - if (name && value) { - attr[nattr++] = name; - attr[nattr++] = value; - } - } - - // List terminator - attr[nattr++] = 0; - attr[nattr++] = 0; - - // Call callbacks. - if (start && startelCb) - (*startelCb)(ud, name, attr); - if (end && endelCb) - (*endelCb)(ud, name); -} - -int nsvg__parseXML(char* input, - void (*startelCb)(void* ud, const char* el, const char** attr), - void (*endelCb)(void* ud, const char* el), - void (*contentCb)(void* ud, const char* s), - void* ud) -{ - char* s = input; - char* mark = s; - int state = NSVG_XML_CONTENT; - while (*s) { - if (*s == '<' && state == NSVG_XML_CONTENT) { - // Start of a tag - *s++ = '\0'; - nsvg__parseContent(mark, contentCb, ud); - mark = s; - state = NSVG_XML_TAG; - } else if (*s == '>' && state == NSVG_XML_TAG) { - // Start of a content or new tag. - *s++ = '\0'; - nsvg__parseElement(mark, startelCb, endelCb, ud); - mark = s; - state = NSVG_XML_CONTENT; - } else { - s++; - } - } - - return 1; -} - - -/* Simple SVG parser. */ - -#define NSVG_MAX_ATTR 128 - -enum NSVGgradientUnits { - NSVG_USER_SPACE = 0, - NSVG_OBJECT_SPACE = 1 -}; - -#define NSVG_MAX_DASHES 8 - -enum NSVGunits { - NSVG_UNITS_USER, - NSVG_UNITS_PX, - NSVG_UNITS_PT, - NSVG_UNITS_PC, - NSVG_UNITS_MM, - NSVG_UNITS_CM, - NSVG_UNITS_IN, - NSVG_UNITS_PERCENT, - NSVG_UNITS_EM, - NSVG_UNITS_EX -}; - -typedef struct NSVGcoordinate { - float value; - int units; -} NSVGcoordinate; - -typedef struct NSVGlinearData { - NSVGcoordinate x1, y1, x2, y2; -} NSVGlinearData; - -typedef struct NSVGradialData { - NSVGcoordinate cx, cy, r, fx, fy; -} NSVGradialData; - -typedef struct NSVGgradientData -{ - char id[64]; - char ref[64]; - signed char type; - union { - NSVGlinearData linear; - NSVGradialData radial; - }; - char spread; - char units; - float xform[6]; - int nstops; - NSVGgradientStop* stops; - struct NSVGgradientData* next; -} NSVGgradientData; - -typedef struct NSVGattrib -{ - char id[64]; - float xform[6]; - unsigned int fillColor; - unsigned int strokeColor; - float opacity; - float fillOpacity; - float strokeOpacity; - char fillGradient[64]; - char strokeGradient[64]; - float strokeWidth; - float strokeDashOffset; - float strokeDashArray[NSVG_MAX_DASHES]; - int strokeDashCount; - char strokeLineJoin; - char strokeLineCap; - float miterLimit; - char fillRule; - float fontSize; - unsigned int stopColor; - float stopOpacity; - float stopOffset; - char hasFill; - char hasStroke; - char visible; -} NSVGattrib; - -typedef struct NSVGparser -{ - NSVGattrib attr[NSVG_MAX_ATTR]; - int attrHead; - float* pts; - int npts; - int cpts; - NSVGpath* plist; - NSVGimage* image; - NSVGgradientData* gradients; - NSVGshape* shapesTail; - float viewMinx, viewMiny, viewWidth, viewHeight; - int alignX, alignY, alignType; - float dpi; - char pathFlag; - char defsFlag; -} NSVGparser; - -static void nsvg__xformIdentity(float* t) -{ - t[0] = 1.0f; t[1] = 0.0f; - t[2] = 0.0f; t[3] = 1.0f; - t[4] = 0.0f; t[5] = 0.0f; -} - -static void nsvg__xformSetTranslation(float* t, float tx, float ty) -{ - t[0] = 1.0f; t[1] = 0.0f; - t[2] = 0.0f; t[3] = 1.0f; - t[4] = tx; t[5] = ty; -} - -static void nsvg__xformSetScale(float* t, float sx, float sy) -{ - t[0] = sx; t[1] = 0.0f; - t[2] = 0.0f; t[3] = sy; - t[4] = 0.0f; t[5] = 0.0f; -} - -static void nsvg__xformSetSkewX(float* t, float a) -{ - t[0] = 1.0f; t[1] = 0.0f; - t[2] = tanf(a); t[3] = 1.0f; - t[4] = 0.0f; t[5] = 0.0f; -} - -static void nsvg__xformSetSkewY(float* t, float a) -{ - t[0] = 1.0f; t[1] = tanf(a); - t[2] = 0.0f; t[3] = 1.0f; - t[4] = 0.0f; t[5] = 0.0f; -} - -static void nsvg__xformSetRotation(float* t, float a) -{ - float cs = cosf(a), sn = sinf(a); - t[0] = cs; t[1] = sn; - t[2] = -sn; t[3] = cs; - t[4] = 0.0f; t[5] = 0.0f; -} - -static void nsvg__xformMultiply(float* t, float* s) -{ - float t0 = t[0] * s[0] + t[1] * s[2]; - float t2 = t[2] * s[0] + t[3] * s[2]; - float t4 = t[4] * s[0] + t[5] * s[2] + s[4]; - t[1] = t[0] * s[1] + t[1] * s[3]; - t[3] = t[2] * s[1] + t[3] * s[3]; - t[5] = t[4] * s[1] + t[5] * s[3] + s[5]; - t[0] = t0; - t[2] = t2; - t[4] = t4; -} - -static void nsvg__xformInverse(float* inv, float* t) -{ - double invdet, det = (double)t[0] * t[3] - (double)t[2] * t[1]; - if (det > -1e-6 && det < 1e-6) { - nsvg__xformIdentity(t); - return; - } - invdet = 1.0 / det; - inv[0] = (float)(t[3] * invdet); - inv[2] = (float)(-t[2] * invdet); - inv[4] = (float)(((double)t[2] * t[5] - (double)t[3] * t[4]) * invdet); - inv[1] = (float)(-t[1] * invdet); - inv[3] = (float)(t[0] * invdet); - inv[5] = (float)(((double)t[1] * t[4] - (double)t[0] * t[5]) * invdet); -} - -static void nsvg__xformPremultiply(float* t, float* s) -{ - float s2[6]; - memcpy(s2, s, sizeof(float)*6); - nsvg__xformMultiply(s2, t); - memcpy(t, s2, sizeof(float)*6); -} - -static void nsvg__xformPoint(float* dx, float* dy, float x, float y, float* t) -{ - *dx = x*t[0] + y*t[2] + t[4]; - *dy = x*t[1] + y*t[3] + t[5]; -} - -static void nsvg__xformVec(float* dx, float* dy, float x, float y, float* t) -{ - *dx = x*t[0] + y*t[2]; - *dy = x*t[1] + y*t[3]; -} - -#define NSVG_EPSILON (1e-12) - -static int nsvg__ptInBounds(float* pt, float* bounds) -{ - return pt[0] >= bounds[0] && pt[0] <= bounds[2] && pt[1] >= bounds[1] && pt[1] <= bounds[3]; -} - - -static double nsvg__evalBezier(double t, double p0, double p1, double p2, double p3) -{ - double it = 1.0-t; - return it*it*it*p0 + 3.0*it*it*t*p1 + 3.0*it*t*t*p2 + t*t*t*p3; -} - -static void nsvg__curveBounds(float* bounds, float* curve) -{ - int i, j, count; - double roots[2], a, b, c, b2ac, t, v; - float* v0 = &curve[0]; - float* v1 = &curve[2]; - float* v2 = &curve[4]; - float* v3 = &curve[6]; - - // Start the bounding box by end points - bounds[0] = nsvg__minf(v0[0], v3[0]); - bounds[1] = nsvg__minf(v0[1], v3[1]); - bounds[2] = nsvg__maxf(v0[0], v3[0]); - bounds[3] = nsvg__maxf(v0[1], v3[1]); - - // Bezier curve fits inside the convex hull of it's control points. - // If control points are inside the bounds, we're done. - if (nsvg__ptInBounds(v1, bounds) && nsvg__ptInBounds(v2, bounds)) - return; - - // Add bezier curve inflection points in X and Y. - for (i = 0; i < 2; i++) { - a = -3.0 * v0[i] + 9.0 * v1[i] - 9.0 * v2[i] + 3.0 * v3[i]; - b = 6.0 * v0[i] - 12.0 * v1[i] + 6.0 * v2[i]; - c = 3.0 * v1[i] - 3.0 * v0[i]; - count = 0; - if (fabs(a) < NSVG_EPSILON) { - if (fabs(b) > NSVG_EPSILON) { - t = -c / b; - if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON) - roots[count++] = t; - } - } else { - b2ac = b*b - 4.0*c*a; - if (b2ac > NSVG_EPSILON) { - t = (-b + sqrt(b2ac)) / (2.0 * a); - if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON) - roots[count++] = t; - t = (-b - sqrt(b2ac)) / (2.0 * a); - if (t > NSVG_EPSILON && t < 1.0-NSVG_EPSILON) - roots[count++] = t; - } - } - for (j = 0; j < count; j++) { - v = nsvg__evalBezier(roots[j], v0[i], v1[i], v2[i], v3[i]); - bounds[0+i] = nsvg__minf(bounds[0+i], (float)v); - bounds[2+i] = nsvg__maxf(bounds[2+i], (float)v); - } - } -} - -static NSVGparser* nsvg__createParser(void) -{ - NSVGparser* p; - p = (NSVGparser*)NVG_MALLOC(sizeof(NSVGparser)); - if (p == NULL) goto error; - memset(p, 0, sizeof(NSVGparser)); - - p->image = (NSVGimage*)NVG_MALLOC(sizeof(NSVGimage)); - if (p->image == NULL) goto error; - memset(p->image, 0, sizeof(NSVGimage)); - - // Init style - nsvg__xformIdentity(p->attr[0].xform); - memset(p->attr[0].id, 0, sizeof p->attr[0].id); - p->attr[0].fillColor = NSVG_RGB(0,0,0); - p->attr[0].strokeColor = NSVG_RGB(0,0,0); - p->attr[0].opacity = 1; - p->attr[0].fillOpacity = 1; - p->attr[0].strokeOpacity = 1; - p->attr[0].stopOpacity = 1; - p->attr[0].strokeWidth = 1; - p->attr[0].strokeLineJoin = NSVG_JOIN_MITER; - p->attr[0].strokeLineCap = NSVG_CAP_BUTT; - p->attr[0].miterLimit = 4; - p->attr[0].fillRule = NSVG_FILLRULE_NONZERO; - p->attr[0].hasFill = 1; - p->attr[0].visible = 1; - - return p; - -error: - if (p) { - if (p->image) NVG_FREE(p->image); - NVG_FREE(p); - } - return NULL; -} - -static void nsvg__deletePaths(NSVGpath* path) -{ - while (path) { - NSVGpath *next = path->next; - if (path->pts != NULL) - NVG_FREE(path->pts); - NVG_FREE(path); - path = next; - } -} - -static void nsvg__deletePaint(NSVGpaint* paint) -{ - if (paint->type == NSVG_PAINT_LINEAR_GRADIENT || paint->type == NSVG_PAINT_RADIAL_GRADIENT) - NVG_FREE(paint->gradient); -} - -static void nsvg__deleteGradientData(NSVGgradientData* grad) -{ - NSVGgradientData* next; - while (grad != NULL) { - next = grad->next; - NVG_FREE(grad->stops); - NVG_FREE(grad); - grad = next; - } -} - -static void nsvg__deleteParser(NSVGparser* p) -{ - if (p != NULL) { - nsvg__deletePaths(p->plist); - nsvg__deleteGradientData(p->gradients); - nsvgDelete(p->image); - NVG_FREE(p->pts); - NVG_FREE(p); - } -} - -static void nsvg__resetPath(NSVGparser* p) -{ - p->npts = 0; -} - -static void nsvg__addPoint(NSVGparser* p, float x, float y) -{ - if (p->npts+1 > p->cpts) { - p->cpts = p->cpts ? p->cpts*2 : 8; - p->pts = (float*)NVG_REALLOC(p->pts, p->cpts*2*sizeof(float)); - if (!p->pts) return; - } - p->pts[p->npts*2+0] = x; - p->pts[p->npts*2+1] = y; - p->npts++; -} - -static void nsvg__moveTo(NSVGparser* p, float x, float y) -{ - if (p->npts > 0) { - p->pts[(p->npts-1)*2+0] = x; - p->pts[(p->npts-1)*2+1] = y; - } else { - nsvg__addPoint(p, x, y); - } -} - -static void nsvg__lineTo(NSVGparser* p, float x, float y) -{ - float px,py, dx,dy; - if (p->npts > 0) { - px = p->pts[(p->npts-1)*2+0]; - py = p->pts[(p->npts-1)*2+1]; - dx = x - px; - dy = y - py; - nsvg__addPoint(p, px + dx/3.0f, py + dy/3.0f); - nsvg__addPoint(p, x - dx/3.0f, y - dy/3.0f); - nsvg__addPoint(p, x, y); - } -} - -static void nsvg__cubicBezTo(NSVGparser* p, float cpx1, float cpy1, float cpx2, float cpy2, float x, float y) -{ - if (p->npts > 0) { - nsvg__addPoint(p, cpx1, cpy1); - nsvg__addPoint(p, cpx2, cpy2); - nsvg__addPoint(p, x, y); - } -} - -static NSVGattrib* nsvg__getAttr(NSVGparser* p) -{ - return &p->attr[p->attrHead]; -} - -static void nsvg__pushAttr(NSVGparser* p) -{ - if (p->attrHead < NSVG_MAX_ATTR-1) { - p->attrHead++; - memcpy(&p->attr[p->attrHead], &p->attr[p->attrHead-1], sizeof(NSVGattrib)); - } -} - -static void nsvg__popAttr(NSVGparser* p) -{ - if (p->attrHead > 0) - p->attrHead--; -} - -static float nsvg__actualOrigX(NSVGparser* p) -{ - return p->viewMinx; -} - -static float nsvg__actualOrigY(NSVGparser* p) -{ - return p->viewMiny; -} - -static float nsvg__actualWidth(NSVGparser* p) -{ - return p->viewWidth; -} - -static float nsvg__actualHeight(NSVGparser* p) -{ - return p->viewHeight; -} - -static float nsvg__actualLength(NSVGparser* p) -{ - float w = nsvg__actualWidth(p), h = nsvg__actualHeight(p); - return sqrtf(w*w + h*h) / sqrtf(2.0f); -} - -static float nsvg__convertToPixels(NSVGparser* p, NSVGcoordinate c, float orig, float length) -{ - NSVGattrib* attr = nsvg__getAttr(p); - switch (c.units) { - case NSVG_UNITS_USER: return c.value; - case NSVG_UNITS_PX: return c.value; - case NSVG_UNITS_PT: return c.value / 72.0f * p->dpi; - case NSVG_UNITS_PC: return c.value / 6.0f * p->dpi; - case NSVG_UNITS_MM: return c.value / 25.4f * p->dpi; - case NSVG_UNITS_CM: return c.value / 2.54f * p->dpi; - case NSVG_UNITS_IN: return c.value * p->dpi; - case NSVG_UNITS_EM: return c.value * attr->fontSize; - case NSVG_UNITS_EX: return c.value * attr->fontSize * 0.52f; // x-height of Helvetica. - case NSVG_UNITS_PERCENT: return orig + c.value / 100.0f * length; - default: return c.value; - } - return c.value; -} - -static NSVGgradientData* nsvg__findGradientData(NSVGparser* p, const char* id) -{ - NSVGgradientData* grad = p->gradients; - if (id == NULL || *id == '\0') - return NULL; - while (grad != NULL) { - if (strcmp(grad->id, id) == 0) - return grad; - grad = grad->next; - } - return NULL; -} - -static NSVGgradient* nsvg__createGradient(NSVGparser* p, const char* id, const float* localBounds, float *xform, signed char* paintType) -{ - NSVGgradientData* data = NULL; - NSVGgradientData* ref = NULL; - NSVGgradientStop* stops = NULL; - NSVGgradient* grad; - float ox, oy, sw, sh, sl; - int nstops = 0; - int refIter; - - data = nsvg__findGradientData(p, id); - if (data == NULL) return NULL; - - // TODO: use ref to fill in all unset values too. - ref = data; - refIter = 0; - while (ref != NULL) { - NSVGgradientData* nextRef = NULL; - if (stops == NULL && ref->stops != NULL) { - stops = ref->stops; - nstops = ref->nstops; - break; - } - nextRef = nsvg__findGradientData(p, ref->ref); - if (nextRef == ref) break; // prevent infite loops on malformed data - ref = nextRef; - refIter++; - if (refIter > 32) break; // prevent infite loops on malformed data - } - if (stops == NULL) return NULL; - - grad = (NSVGgradient*)NVG_MALLOC(sizeof(NSVGgradient) + sizeof(NSVGgradientStop)*(nstops-1)); - if (grad == NULL) return NULL; - - // The shape width and height. - if (data->units == NSVG_OBJECT_SPACE) { - ox = localBounds[0]; - oy = localBounds[1]; - sw = localBounds[2] - localBounds[0]; - sh = localBounds[3] - localBounds[1]; - } else { - ox = nsvg__actualOrigX(p); - oy = nsvg__actualOrigY(p); - sw = nsvg__actualWidth(p); - sh = nsvg__actualHeight(p); - } - sl = sqrtf(sw*sw + sh*sh) / sqrtf(2.0f); - - if (data->type == NSVG_PAINT_LINEAR_GRADIENT) { - float x1, y1, x2, y2, dx, dy; - x1 = nsvg__convertToPixels(p, data->linear.x1, ox, sw); - y1 = nsvg__convertToPixels(p, data->linear.y1, oy, sh); - x2 = nsvg__convertToPixels(p, data->linear.x2, ox, sw); - y2 = nsvg__convertToPixels(p, data->linear.y2, oy, sh); - // Calculate transform aligned to the line - dx = x2 - x1; - dy = y2 - y1; - grad->xform[0] = dy; grad->xform[1] = -dx; - grad->xform[2] = dx; grad->xform[3] = dy; - grad->xform[4] = x1; grad->xform[5] = y1; - } else { - float cx, cy, fx, fy, r; - cx = nsvg__convertToPixels(p, data->radial.cx, ox, sw); - cy = nsvg__convertToPixels(p, data->radial.cy, oy, sh); - fx = nsvg__convertToPixels(p, data->radial.fx, ox, sw); - fy = nsvg__convertToPixels(p, data->radial.fy, oy, sh); - r = nsvg__convertToPixels(p, data->radial.r, 0, sl); - // Calculate transform aligned to the circle - grad->xform[0] = r; grad->xform[1] = 0; - grad->xform[2] = 0; grad->xform[3] = r; - grad->xform[4] = cx; grad->xform[5] = cy; - grad->fx = (fx - cx) / r; - grad->fy = (fy - cy) / r; - } - - nsvg__xformMultiply(grad->xform, data->xform); - nsvg__xformMultiply(grad->xform, xform); - - grad->spread = data->spread; - memcpy(grad->stops, stops, nstops*sizeof(NSVGgradientStop)); - grad->nstops = nstops; - - *paintType = data->type; - - return grad; -} - -static float nsvg__getAverageScale(float* t) -{ - float sx = sqrtf(t[0]*t[0] + t[2]*t[2]); - float sy = sqrtf(t[1]*t[1] + t[3]*t[3]); - return (sx + sy) * 0.5f; -} - -static void nsvg__getLocalBounds(float* bounds, NSVGshape *shape, float* xform) -{ - NSVGpath* path; - float curve[4*2], curveBounds[4]; - int i, first = 1; - for (path = shape->paths; path != NULL; path = path->next) { - nsvg__xformPoint(&curve[0], &curve[1], path->pts[0], path->pts[1], xform); - for (i = 0; i < path->npts-1; i += 3) { - nsvg__xformPoint(&curve[2], &curve[3], path->pts[(i+1)*2], path->pts[(i+1)*2+1], xform); - nsvg__xformPoint(&curve[4], &curve[5], path->pts[(i+2)*2], path->pts[(i+2)*2+1], xform); - nsvg__xformPoint(&curve[6], &curve[7], path->pts[(i+3)*2], path->pts[(i+3)*2+1], xform); - nsvg__curveBounds(curveBounds, curve); - if (first) { - bounds[0] = curveBounds[0]; - bounds[1] = curveBounds[1]; - bounds[2] = curveBounds[2]; - bounds[3] = curveBounds[3]; - first = 0; - } else { - bounds[0] = nsvg__minf(bounds[0], curveBounds[0]); - bounds[1] = nsvg__minf(bounds[1], curveBounds[1]); - bounds[2] = nsvg__maxf(bounds[2], curveBounds[2]); - bounds[3] = nsvg__maxf(bounds[3], curveBounds[3]); - } - curve[0] = curve[6]; - curve[1] = curve[7]; - } - } -} - -static void nsvg__addShape(NSVGparser* p) -{ - NSVGattrib* attr = nsvg__getAttr(p); - float scale = 1.0f; - NSVGshape* shape; - NSVGpath* path; - int i; - - if (p->plist == NULL) - return; - - shape = (NSVGshape*)NVG_MALLOC(sizeof(NSVGshape)); - if (shape == NULL) goto error; - memset(shape, 0, sizeof(NSVGshape)); - - memcpy(shape->id, attr->id, sizeof shape->id); - memcpy(shape->fillGradient, attr->fillGradient, sizeof shape->fillGradient); - memcpy(shape->strokeGradient, attr->strokeGradient, sizeof shape->strokeGradient); - memcpy(shape->xform, attr->xform, sizeof shape->xform); - scale = nsvg__getAverageScale(attr->xform); - shape->strokeWidth = attr->strokeWidth * scale; - shape->strokeDashOffset = attr->strokeDashOffset * scale; - shape->strokeDashCount = (char)attr->strokeDashCount; - for (i = 0; i < attr->strokeDashCount; i++) - shape->strokeDashArray[i] = attr->strokeDashArray[i] * scale; - shape->strokeLineJoin = attr->strokeLineJoin; - shape->strokeLineCap = attr->strokeLineCap; - shape->miterLimit = attr->miterLimit; - shape->fillRule = attr->fillRule; - shape->opacity = attr->opacity; - - shape->paths = p->plist; - p->plist = NULL; - - // Calculate shape bounds - shape->bounds[0] = shape->paths->bounds[0]; - shape->bounds[1] = shape->paths->bounds[1]; - shape->bounds[2] = shape->paths->bounds[2]; - shape->bounds[3] = shape->paths->bounds[3]; - for (path = shape->paths->next; path != NULL; path = path->next) { - shape->bounds[0] = nsvg__minf(shape->bounds[0], path->bounds[0]); - shape->bounds[1] = nsvg__minf(shape->bounds[1], path->bounds[1]); - shape->bounds[2] = nsvg__maxf(shape->bounds[2], path->bounds[2]); - shape->bounds[3] = nsvg__maxf(shape->bounds[3], path->bounds[3]); - } - - // Set fill - if (attr->hasFill == 0) { - shape->fill.type = NSVG_PAINT_NONE; - } else if (attr->hasFill == 1) { - shape->fill.type = NSVG_PAINT_COLOR; - shape->fill.color = attr->fillColor; - shape->fill.color |= (unsigned int)(attr->fillOpacity*255) << 24; - } else if (attr->hasFill == 2) { - shape->fill.type = NSVG_PAINT_UNDEF; - } - - // Set stroke - if (attr->hasStroke == 0) { - shape->stroke.type = NSVG_PAINT_NONE; - } else if (attr->hasStroke == 1) { - shape->stroke.type = NSVG_PAINT_COLOR; - shape->stroke.color = attr->strokeColor; - shape->stroke.color |= (unsigned int)(attr->strokeOpacity*255) << 24; - } else if (attr->hasStroke == 2) { - shape->stroke.type = NSVG_PAINT_UNDEF; - } - - // Set flags - shape->flags = (attr->visible ? NSVG_FLAGS_VISIBLE : 0x00); - - // Add to tail - if (p->image->shapes == NULL) - p->image->shapes = shape; - else - p->shapesTail->next = shape; - p->shapesTail = shape; - - return; - -error: - if (shape) NVG_FREE(shape); -} - -static void nsvg__addPath(NSVGparser* p, char closed) -{ - NSVGattrib* attr = nsvg__getAttr(p); - NSVGpath* path = NULL; - float bounds[4]; - float* curve; - int i; - - if (p->npts < 4) - return; - - if (closed) - nsvg__lineTo(p, p->pts[0], p->pts[1]); - - // Expect 1 + N*3 points (N = number of cubic bezier segments). - if ((p->npts % 3) != 1) - return; - - path = (NSVGpath*)NVG_MALLOC(sizeof(NSVGpath)); - if (path == NULL) goto error; - memset(path, 0, sizeof(NSVGpath)); - - path->pts = (float*)NVG_MALLOC(p->npts*2*sizeof(float)); - if (path->pts == NULL) goto error; - path->closed = closed; - path->npts = p->npts; - - // Transform path. - for (i = 0; i < p->npts; ++i) - nsvg__xformPoint(&path->pts[i*2], &path->pts[i*2+1], p->pts[i*2], p->pts[i*2+1], attr->xform); - - // Find bounds - for (i = 0; i < path->npts-1; i += 3) { - curve = &path->pts[i*2]; - nsvg__curveBounds(bounds, curve); - if (i == 0) { - path->bounds[0] = bounds[0]; - path->bounds[1] = bounds[1]; - path->bounds[2] = bounds[2]; - path->bounds[3] = bounds[3]; - } else { - path->bounds[0] = nsvg__minf(path->bounds[0], bounds[0]); - path->bounds[1] = nsvg__minf(path->bounds[1], bounds[1]); - path->bounds[2] = nsvg__maxf(path->bounds[2], bounds[2]); - path->bounds[3] = nsvg__maxf(path->bounds[3], bounds[3]); - } - } - - path->next = p->plist; - p->plist = path; - - return; - -error: - if (path != NULL) { - if (path->pts != NULL) NVG_FREE(path->pts); - NVG_FREE(path); - } -} - -// We roll our own string to float because the std library one uses locale and messes things up. -static double nsvg__atof(const char* s) -{ - char* cur = (char*)s; - char* end = NULL; - double res = 0.0, sign = 1.0; - long long intPart = 0, fracPart = 0; - char hasIntPart = 0, hasFracPart = 0; - - // Parse optional sign - if (*cur == '+') { - cur++; - } else if (*cur == '-') { - sign = -1; - cur++; - } - - // Parse integer part - if (nsvg__isdigit(*cur)) { - // Parse digit sequence - intPart = strtoll(cur, &end, 10); - if (cur != end) { - res = (double)intPart; - hasIntPart = 1; - cur = end; - } - } - - // Parse fractional part. - if (*cur == '.') { - cur++; // Skip '.' - if (nsvg__isdigit(*cur)) { - // Parse digit sequence - fracPart = strtoll(cur, &end, 10); - if (cur != end) { - res += (double)fracPart / pow(10.0, (double)(end - cur)); - hasFracPart = 1; - cur = end; - } - } - } - - // A valid number should have integer or fractional part. - if (!hasIntPart && !hasFracPart) - return 0.0; - - // Parse optional exponent - if (*cur == 'e' || *cur == 'E') { - long expPart = 0; - cur++; // skip 'E' - expPart = strtol(cur, &end, 10); // Parse digit sequence with sign - if (cur != end) { - res *= pow(10.0, (double)expPart); - } - } - - return res * sign; -} - - -static const char* nsvg__parseNumber(const char* s, char* it, const int size) -{ - const int last = size-1; - int i = 0; - - // sign - if (*s == '-' || *s == '+') { - if (i < last) it[i++] = *s; - s++; - } - // integer part - while (*s && nsvg__isdigit(*s)) { - if (i < last) it[i++] = *s; - s++; - } - if (*s == '.') { - // decimal point - if (i < last) it[i++] = *s; - s++; - // fraction part - while (*s && nsvg__isdigit(*s)) { - if (i < last) it[i++] = *s; - s++; - } - } - // exponent - if ((*s == 'e' || *s == 'E') && (s[1] != 'm' && s[1] != 'x')) { - if (i < last) it[i++] = *s; - s++; - if (*s == '-' || *s == '+') { - if (i < last) it[i++] = *s; - s++; - } - while (*s && nsvg__isdigit(*s)) { - if (i < last) it[i++] = *s; - s++; - } - } - it[i] = '\0'; - - return s; -} - -static const char* nsvg__getNextPathItemWhenArcFlag(const char* s, char* it) -{ - it[0] = '\0'; - while (*s && (nsvg__isspace(*s) || *s == ',')) s++; - if (!*s) return s; - if (*s == '0' || *s == '1') { - it[0] = *s++; - it[1] = '\0'; - return s; - } - return s; -} - -static const char* nsvg__getNextPathItem(const char* s, char* it) -{ - it[0] = '\0'; - // Skip white spaces and commas - while (*s && (nsvg__isspace(*s) || *s == ',')) s++; - if (!*s) return s; - if (*s == '-' || *s == '+' || *s == '.' || nsvg__isdigit(*s)) { - s = nsvg__parseNumber(s, it, 64); - } else { - // Parse command - it[0] = *s++; - it[1] = '\0'; - return s; - } - - return s; -} - -static unsigned int nsvg__parseColorHex(const char* str) -{ - unsigned int r=0, g=0, b=0; - if (sscanf(str, "#%2x%2x%2x", &r, &g, &b) == 3 ) // 2 digit hex - return NSVG_RGB(r, g, b); - if (sscanf(str, "#%1x%1x%1x", &r, &g, &b) == 3 ) // 1 digit hex, e.g. #abc -> 0xccbbaa - return NSVG_RGB(r*17, g*17, b*17); // same effect as (r<<4|r), (g<<4|g), .. - return NSVG_RGB(128, 128, 128); -} - -// Parse rgb color. The pointer 'str' must point at "rgb(" (4+ characters). -// This function returns gray (rgb(128, 128, 128) == '#808080') on parse errors -// for backwards compatibility. Note: other image viewers return black instead. - -static unsigned int nsvg__parseColorRGB(const char* str) -{ - int i; - unsigned int rgbi[3]; - float rgbf[3]; - // try decimal integers first - if (sscanf(str, "rgb(%u, %u, %u)", &rgbi[0], &rgbi[1], &rgbi[2]) != 3) { - // integers failed, try percent values (float, locale independent) - const char delimiter[3] = {',', ',', ')'}; - str += 4; // skip "rgb(" - for (i = 0; i < 3; i++) { - while (*str && (nsvg__isspace(*str))) str++; // skip leading spaces - if (*str == '+') str++; // skip '+' (don't allow '-') - if (!*str) break; - rgbf[i] = nsvg__atof(str); - - // Note 1: it would be great if nsvg__atof() returned how many - // bytes it consumed but it doesn't. We need to skip the number, - // the '%' character, spaces, and the delimiter ',' or ')'. - - // Note 2: The following code does not allow values like "33.%", - // i.e. a decimal point w/o fractional part, but this is consistent - // with other image viewers, e.g. firefox, chrome, eog, gimp. - - while (*str && nsvg__isdigit(*str)) str++; // skip integer part - if (*str == '.') { - str++; - if (!nsvg__isdigit(*str)) break; // error: no digit after '.' - while (*str && nsvg__isdigit(*str)) str++; // skip fractional part - } - if (*str == '%') str++; else break; - while (nsvg__isspace(*str)) str++; - if (*str == delimiter[i]) str++; - else break; - } - if (i == 3) { - rgbi[0] = roundf(rgbf[0] * 2.55f); - rgbi[1] = roundf(rgbf[1] * 2.55f); - rgbi[2] = roundf(rgbf[2] * 2.55f); - } else { - rgbi[0] = rgbi[1] = rgbi[2] = 128; - } - } - // clip values as the CSS spec requires - for (i = 0; i < 3; i++) { - if (rgbi[i] > 255) rgbi[i] = 255; - } - return NSVG_RGB(rgbi[0], rgbi[1], rgbi[2]); -} - -static unsigned int nsvg__parseColorRGBA(const char* str) -{ - int i; - unsigned int rgbai[4]; - float rgbaf[4]; - // try decimal integers first - if (sscanf(str, "rgba(%u, %u, %u, %u)", &rgbai[0], &rgbai[1], &rgbai[2], &rgbai[3]) != 4) { - // integers failed, try percent values (float, locale independent) - const char delimiter[4] = {',', ',', ',', ')'}; - str += 5; // skip "rgba(" - for (i = 0; i < 4; i++) { - while (*str && (nsvg__isspace(*str))) str++; // skip leading spaces - if (*str == '+') str++; // skip '+' (don't allow '-') - if (!*str) break; - rgbaf[i] = nsvg__atof(str); - - // Note 1: it would be great if nsvg__atof() returned how many - // bytes it consumed but it doesn't. We need to skip the number, - // the '%' character, spaces, and the delimiter ',' or ')'. - - // Note 2: The following code does not allow values like "33.%", - // i.e. a decimal point w/o fractional part, but this is consistent - // with other image viewers, e.g. firefox, chrome, eog, gimp. - - while (*str && nsvg__isdigit(*str)) str++; // skip integer part - if (*str == '.') { - str++; - if (!nsvg__isdigit(*str)) break; // error: no digit after '.' - while (*str && nsvg__isdigit(*str)) str++; // skip fractional part - } - if (*str == '%') str++; else break; - while (nsvg__isspace(*str)) str++; - if (*str == delimiter[i]) str++; - else break; - } - if (i == 4) { - rgbai[0] = roundf(rgbaf[0] * 2.55f); - rgbai[1] = roundf(rgbaf[1] * 2.55f); - rgbai[2] = roundf(rgbaf[2] * 2.55f); - rgbai[3] = roundf(rgbaf[3] * 2.55f); - } else { - rgbai[0] = rgbai[1] = rgbai[2] = 128; - rgbai[3] = 255; - } - } - // clip values as the CSS spec requires - for (i = 0; i < 4; i++) { - if (rgbai[i] > 255) rgbai[i] = 255; - } - return NSVG_RGBA(rgbai[0], rgbai[1], rgbai[2], rgbai[3]); -} - -typedef struct NSVGNamedColor { - const char* name; - unsigned int color; -} NSVGNamedColor; - -NSVGNamedColor nsvg__colors[] = { - - { "red", NSVG_RGB(255, 0, 0) }, - { "green", NSVG_RGB( 0, 128, 0) }, - { "blue", NSVG_RGB( 0, 0, 255) }, - { "yellow", NSVG_RGB(255, 255, 0) }, - { "cyan", NSVG_RGB( 0, 255, 255) }, - { "magenta", NSVG_RGB(255, 0, 255) }, - { "black", NSVG_RGB( 0, 0, 0) }, - { "grey", NSVG_RGB(128, 128, 128) }, - { "gray", NSVG_RGB(128, 128, 128) }, - { "white", NSVG_RGB(255, 255, 255) }, - -#ifdef NANOSVG_ALL_COLOR_KEYWORDS - { "aliceblue", NSVG_RGB(240, 248, 255) }, - { "antiquewhite", NSVG_RGB(250, 235, 215) }, - { "aqua", NSVG_RGB( 0, 255, 255) }, - { "aquamarine", NSVG_RGB(127, 255, 212) }, - { "azure", NSVG_RGB(240, 255, 255) }, - { "beige", NSVG_RGB(245, 245, 220) }, - { "bisque", NSVG_RGB(255, 228, 196) }, - { "blanchedalmond", NSVG_RGB(255, 235, 205) }, - { "blueviolet", NSVG_RGB(138, 43, 226) }, - { "brown", NSVG_RGB(165, 42, 42) }, - { "burlywood", NSVG_RGB(222, 184, 135) }, - { "cadetblue", NSVG_RGB( 95, 158, 160) }, - { "chartreuse", NSVG_RGB(127, 255, 0) }, - { "chocolate", NSVG_RGB(210, 105, 30) }, - { "coral", NSVG_RGB(255, 127, 80) }, - { "cornflowerblue", NSVG_RGB(100, 149, 237) }, - { "cornsilk", NSVG_RGB(255, 248, 220) }, - { "crimson", NSVG_RGB(220, 20, 60) }, - { "darkblue", NSVG_RGB( 0, 0, 139) }, - { "darkcyan", NSVG_RGB( 0, 139, 139) }, - { "darkgoldenrod", NSVG_RGB(184, 134, 11) }, - { "darkgray", NSVG_RGB(169, 169, 169) }, - { "darkgreen", NSVG_RGB( 0, 100, 0) }, - { "darkgrey", NSVG_RGB(169, 169, 169) }, - { "darkkhaki", NSVG_RGB(189, 183, 107) }, - { "darkmagenta", NSVG_RGB(139, 0, 139) }, - { "darkolivegreen", NSVG_RGB( 85, 107, 47) }, - { "darkorange", NSVG_RGB(255, 140, 0) }, - { "darkorchid", NSVG_RGB(153, 50, 204) }, - { "darkred", NSVG_RGB(139, 0, 0) }, - { "darksalmon", NSVG_RGB(233, 150, 122) }, - { "darkseagreen", NSVG_RGB(143, 188, 143) }, - { "darkslateblue", NSVG_RGB( 72, 61, 139) }, - { "darkslategray", NSVG_RGB( 47, 79, 79) }, - { "darkslategrey", NSVG_RGB( 47, 79, 79) }, - { "darkturquoise", NSVG_RGB( 0, 206, 209) }, - { "darkviolet", NSVG_RGB(148, 0, 211) }, - { "deeppink", NSVG_RGB(255, 20, 147) }, - { "deepskyblue", NSVG_RGB( 0, 191, 255) }, - { "dimgray", NSVG_RGB(105, 105, 105) }, - { "dimgrey", NSVG_RGB(105, 105, 105) }, - { "dodgerblue", NSVG_RGB( 30, 144, 255) }, - { "firebrick", NSVG_RGB(178, 34, 34) }, - { "floralwhite", NSVG_RGB(255, 250, 240) }, - { "forestgreen", NSVG_RGB( 34, 139, 34) }, - { "fuchsia", NSVG_RGB(255, 0, 255) }, - { "gainsboro", NSVG_RGB(220, 220, 220) }, - { "ghostwhite", NSVG_RGB(248, 248, 255) }, - { "gold", NSVG_RGB(255, 215, 0) }, - { "goldenrod", NSVG_RGB(218, 165, 32) }, - { "greenyellow", NSVG_RGB(173, 255, 47) }, - { "honeydew", NSVG_RGB(240, 255, 240) }, - { "hotpink", NSVG_RGB(255, 105, 180) }, - { "indianred", NSVG_RGB(205, 92, 92) }, - { "indigo", NSVG_RGB( 75, 0, 130) }, - { "ivory", NSVG_RGB(255, 255, 240) }, - { "khaki", NSVG_RGB(240, 230, 140) }, - { "lavender", NSVG_RGB(230, 230, 250) }, - { "lavenderblush", NSVG_RGB(255, 240, 245) }, - { "lawngreen", NSVG_RGB(124, 252, 0) }, - { "lemonchiffon", NSVG_RGB(255, 250, 205) }, - { "lightblue", NSVG_RGB(173, 216, 230) }, - { "lightcoral", NSVG_RGB(240, 128, 128) }, - { "lightcyan", NSVG_RGB(224, 255, 255) }, - { "lightgoldenrodyellow", NSVG_RGB(250, 250, 210) }, - { "lightgray", NSVG_RGB(211, 211, 211) }, - { "lightgreen", NSVG_RGB(144, 238, 144) }, - { "lightgrey", NSVG_RGB(211, 211, 211) }, - { "lightpink", NSVG_RGB(255, 182, 193) }, - { "lightsalmon", NSVG_RGB(255, 160, 122) }, - { "lightseagreen", NSVG_RGB( 32, 178, 170) }, - { "lightskyblue", NSVG_RGB(135, 206, 250) }, - { "lightslategray", NSVG_RGB(119, 136, 153) }, - { "lightslategrey", NSVG_RGB(119, 136, 153) }, - { "lightsteelblue", NSVG_RGB(176, 196, 222) }, - { "lightyellow", NSVG_RGB(255, 255, 224) }, - { "lime", NSVG_RGB( 0, 255, 0) }, - { "limegreen", NSVG_RGB( 50, 205, 50) }, - { "linen", NSVG_RGB(250, 240, 230) }, - { "maroon", NSVG_RGB(128, 0, 0) }, - { "mediumaquamarine", NSVG_RGB(102, 205, 170) }, - { "mediumblue", NSVG_RGB( 0, 0, 205) }, - { "mediumorchid", NSVG_RGB(186, 85, 211) }, - { "mediumpurple", NSVG_RGB(147, 112, 219) }, - { "mediumseagreen", NSVG_RGB( 60, 179, 113) }, - { "mediumslateblue", NSVG_RGB(123, 104, 238) }, - { "mediumspringgreen", NSVG_RGB( 0, 250, 154) }, - { "mediumturquoise", NSVG_RGB( 72, 209, 204) }, - { "mediumvioletred", NSVG_RGB(199, 21, 133) }, - { "midnightblue", NSVG_RGB( 25, 25, 112) }, - { "mintcream", NSVG_RGB(245, 255, 250) }, - { "mistyrose", NSVG_RGB(255, 228, 225) }, - { "moccasin", NSVG_RGB(255, 228, 181) }, - { "navajowhite", NSVG_RGB(255, 222, 173) }, - { "navy", NSVG_RGB( 0, 0, 128) }, - { "oldlace", NSVG_RGB(253, 245, 230) }, - { "olive", NSVG_RGB(128, 128, 0) }, - { "olivedrab", NSVG_RGB(107, 142, 35) }, - { "orange", NSVG_RGB(255, 165, 0) }, - { "orangered", NSVG_RGB(255, 69, 0) }, - { "orchid", NSVG_RGB(218, 112, 214) }, - { "palegoldenrod", NSVG_RGB(238, 232, 170) }, - { "palegreen", NSVG_RGB(152, 251, 152) }, - { "paleturquoise", NSVG_RGB(175, 238, 238) }, - { "palevioletred", NSVG_RGB(219, 112, 147) }, - { "papayawhip", NSVG_RGB(255, 239, 213) }, - { "peachpuff", NSVG_RGB(255, 218, 185) }, - { "peru", NSVG_RGB(205, 133, 63) }, - { "pink", NSVG_RGB(255, 192, 203) }, - { "plum", NSVG_RGB(221, 160, 221) }, - { "powderblue", NSVG_RGB(176, 224, 230) }, - { "purple", NSVG_RGB(128, 0, 128) }, - { "rosybrown", NSVG_RGB(188, 143, 143) }, - { "royalblue", NSVG_RGB( 65, 105, 225) }, - { "saddlebrown", NSVG_RGB(139, 69, 19) }, - { "salmon", NSVG_RGB(250, 128, 114) }, - { "sandybrown", NSVG_RGB(244, 164, 96) }, - { "seagreen", NSVG_RGB( 46, 139, 87) }, - { "seashell", NSVG_RGB(255, 245, 238) }, - { "sienna", NSVG_RGB(160, 82, 45) }, - { "silver", NSVG_RGB(192, 192, 192) }, - { "skyblue", NSVG_RGB(135, 206, 235) }, - { "slateblue", NSVG_RGB(106, 90, 205) }, - { "slategray", NSVG_RGB(112, 128, 144) }, - { "slategrey", NSVG_RGB(112, 128, 144) }, - { "snow", NSVG_RGB(255, 250, 250) }, - { "springgreen", NSVG_RGB( 0, 255, 127) }, - { "steelblue", NSVG_RGB( 70, 130, 180) }, - { "tan", NSVG_RGB(210, 180, 140) }, - { "teal", NSVG_RGB( 0, 128, 128) }, - { "thistle", NSVG_RGB(216, 191, 216) }, - { "tomato", NSVG_RGB(255, 99, 71) }, - { "turquoise", NSVG_RGB( 64, 224, 208) }, - { "violet", NSVG_RGB(238, 130, 238) }, - { "wheat", NSVG_RGB(245, 222, 179) }, - { "whitesmoke", NSVG_RGB(245, 245, 245) }, - { "yellowgreen", NSVG_RGB(154, 205, 50) }, -#endif -}; - -static unsigned int nsvg__parseColorName(const char* str) -{ - int i, ncolors = sizeof(nsvg__colors) / sizeof(NSVGNamedColor); - - for (i = 0; i < ncolors; i++) { - if (strcmp(nsvg__colors[i].name, str) == 0) { - return nsvg__colors[i].color; - } - } - - return NSVG_RGB(128, 128, 128); -} - -static unsigned int nsvg__parseColor(const char* str) -{ - size_t len = 0; - while(*str == ' ') ++str; - len = strlen(str); - if (len >= 1 && *str == '#') - return nsvg__parseColorHex(str); - else if (len >= 4 && str[0] == 'r' && str[1] == 'g' && str[2] == 'b' && str[3] == '(') - return nsvg__parseColorRGB(str); - else if (len >= 5 && str[0] == 'r' && str[1] == 'g' && str[2] == 'b' && str[3] == 'a' && str[4] == '(') - return nsvg__parseColorRGBA(str); - return nsvg__parseColorName(str); -} - -static float nsvg__parseOpacity(const char* str) -{ - float val = nsvg__atof(str); - if (val < 0.0f) val = 0.0f; - if (val > 1.0f) val = 1.0f; - return val; -} - -static float nsvg__parseMiterLimit(const char* str) -{ - float val = nsvg__atof(str); - if (val < 0.0f) val = 0.0f; - return val; -} - -static int nsvg__parseUnits(const char* units) -{ - if (units[0] == 'p' && units[1] == 'x') - return NSVG_UNITS_PX; - else if (units[0] == 'p' && units[1] == 't') - return NSVG_UNITS_PT; - else if (units[0] == 'p' && units[1] == 'c') - return NSVG_UNITS_PC; - else if (units[0] == 'm' && units[1] == 'm') - return NSVG_UNITS_MM; - else if (units[0] == 'c' && units[1] == 'm') - return NSVG_UNITS_CM; - else if (units[0] == 'i' && units[1] == 'n') - return NSVG_UNITS_IN; - else if (units[0] == '%') - return NSVG_UNITS_PERCENT; - else if (units[0] == 'e' && units[1] == 'm') - return NSVG_UNITS_EM; - else if (units[0] == 'e' && units[1] == 'x') - return NSVG_UNITS_EX; - return NSVG_UNITS_USER; -} - -static int nsvg__isCoordinate(const char* s) -{ - // optional sign - if (*s == '-' || *s == '+') - s++; - // must have at least one digit, or start by a dot - return (nsvg__isdigit(*s) || *s == '.'); -} - -static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str) -{ - NSVGcoordinate coord = {0, NSVG_UNITS_USER}; - char buf[64]; - coord.units = nsvg__parseUnits(nsvg__parseNumber(str, buf, 64)); - coord.value = nsvg__atof(buf); - return coord; -} - -static NSVGcoordinate nsvg__coord(float v, int units) -{ - NSVGcoordinate coord = {v, units}; - return coord; -} - -static float nsvg__parseCoordinate(NSVGparser* p, const char* str, float orig, float length) -{ - NSVGcoordinate coord = nsvg__parseCoordinateRaw(str); - return nsvg__convertToPixels(p, coord, orig, length); -} - -static int nsvg__parseTransformArgs(const char* str, float* args, int maxNa, int* na) -{ - const char* end; - const char* ptr; - char it[64]; - - *na = 0; - ptr = str; - while (*ptr && *ptr != '(') ++ptr; - if (*ptr == 0) - return 1; - end = ptr; - while (*end && *end != ')') ++end; - if (*end == 0) - return 1; - - while (ptr < end) { - if (*ptr == '-' || *ptr == '+' || *ptr == '.' || nsvg__isdigit(*ptr)) { - if (*na >= maxNa) return 0; - ptr = nsvg__parseNumber(ptr, it, 64); - args[(*na)++] = (float)nsvg__atof(it); - } else { - ++ptr; - } - } - return (int)(end - str); -} - - -static int nsvg__parseMatrix(float* xform, const char* str) -{ - float t[6]; - int na = 0; - int len = nsvg__parseTransformArgs(str, t, 6, &na); - if (na != 6) return len; - memcpy(xform, t, sizeof(float)*6); - return len; -} - -static int nsvg__parseTranslate(float* xform, const char* str) -{ - float args[2]; - float t[6]; - int na = 0; - int len = nsvg__parseTransformArgs(str, args, 2, &na); - if (na == 1) args[1] = 0.0; - - nsvg__xformSetTranslation(t, args[0], args[1]); - memcpy(xform, t, sizeof(float)*6); - return len; -} - -static int nsvg__parseScale(float* xform, const char* str) -{ - float args[2]; - int na = 0; - float t[6]; - int len = nsvg__parseTransformArgs(str, args, 2, &na); - if (na == 1) args[1] = args[0]; - nsvg__xformSetScale(t, args[0], args[1]); - memcpy(xform, t, sizeof(float)*6); - return len; -} - -static int nsvg__parseSkewX(float* xform, const char* str) -{ - float args[1]; - int na = 0; - float t[6]; - int len = nsvg__parseTransformArgs(str, args, 1, &na); - nsvg__xformSetSkewX(t, args[0]/180.0f*NSVG_PI); - memcpy(xform, t, sizeof(float)*6); - return len; -} - -static int nsvg__parseSkewY(float* xform, const char* str) -{ - float args[1]; - int na = 0; - float t[6]; - int len = nsvg__parseTransformArgs(str, args, 1, &na); - nsvg__xformSetSkewY(t, args[0]/180.0f*NSVG_PI); - memcpy(xform, t, sizeof(float)*6); - return len; -} - -static int nsvg__parseRotate(float* xform, const char* str) -{ - float args[3]; - int na = 0; - float m[6]; - float t[6]; - int len = nsvg__parseTransformArgs(str, args, 3, &na); - if (na == 1) - args[1] = args[2] = 0.0f; - nsvg__xformIdentity(m); - - if (na > 1) { - nsvg__xformSetTranslation(t, -args[1], -args[2]); - nsvg__xformMultiply(m, t); - } - - nsvg__xformSetRotation(t, args[0]/180.0f*NSVG_PI); - nsvg__xformMultiply(m, t); - - if (na > 1) { - nsvg__xformSetTranslation(t, args[1], args[2]); - nsvg__xformMultiply(m, t); - } - - memcpy(xform, m, sizeof(float)*6); - - return len; -} - -static void nsvg__parseTransform(float* xform, const char* str) -{ - float t[6]; - int len; - nsvg__xformIdentity(xform); - while (*str) - { - if (strncmp(str, "matrix", 6) == 0) - len = nsvg__parseMatrix(t, str); - else if (strncmp(str, "translate", 9) == 0) - len = nsvg__parseTranslate(t, str); - else if (strncmp(str, "scale", 5) == 0) - len = nsvg__parseScale(t, str); - else if (strncmp(str, "rotate", 6) == 0) - len = nsvg__parseRotate(t, str); - else if (strncmp(str, "skewX", 5) == 0) - len = nsvg__parseSkewX(t, str); - else if (strncmp(str, "skewY", 5) == 0) - len = nsvg__parseSkewY(t, str); - else{ - ++str; - continue; - } - if (len != 0) { - str += len; - } else { - ++str; - continue; - } - - nsvg__xformPremultiply(xform, t); - } -} - -static void nsvg__parseUrl(char* id, const char* str) -{ - int i = 0; - str += 4; // "url("; - if (*str && *str == '#') - str++; - while (i < 63 && *str && *str != ')') { - id[i] = *str++; - i++; - } - id[i] = '\0'; -} - -static char nsvg__parseLineCap(const char* str) -{ - if (strcmp(str, "butt") == 0) - return NSVG_CAP_BUTT; - else if (strcmp(str, "round") == 0) - return NSVG_CAP_ROUND; - else if (strcmp(str, "square") == 0) - return NSVG_CAP_SQUARE; - // TODO: handle inherit. - return NSVG_CAP_BUTT; -} - -static char nsvg__parseLineJoin(const char* str) -{ - if (strcmp(str, "miter") == 0) - return NSVG_JOIN_MITER; - else if (strcmp(str, "round") == 0) - return NSVG_JOIN_ROUND; - else if (strcmp(str, "bevel") == 0) - return NSVG_JOIN_BEVEL; - // TODO: handle inherit. - return NSVG_JOIN_MITER; -} - -static char nsvg__parseFillRule(const char* str) -{ - if (strcmp(str, "nonzero") == 0) - return NSVG_FILLRULE_NONZERO; - else if (strcmp(str, "evenodd") == 0) - return NSVG_FILLRULE_EVENODD; - // TODO: handle inherit. - return NSVG_FILLRULE_NONZERO; -} - -static const char* nsvg__getNextDashItem(const char* s, char* it) -{ - int n = 0; - it[0] = '\0'; - // Skip white spaces and commas - while (*s && (nsvg__isspace(*s) || *s == ',')) s++; - // Advance until whitespace, comma or end. - while (*s && (!nsvg__isspace(*s) && *s != ',')) { - if (n < 63) - it[n++] = *s; - s++; - } - it[n++] = '\0'; - return s; -} - -static int nsvg__parseStrokeDashArray(NSVGparser* p, const char* str, float* strokeDashArray) -{ - char item[64]; - int count = 0, i; - float sum = 0.0f; - - // Handle "none" - if (str[0] == 'n') - return 0; - - // Parse dashes - while (*str) { - str = nsvg__getNextDashItem(str, item); - if (!*item) break; - if (count < NSVG_MAX_DASHES) - strokeDashArray[count++] = fabsf(nsvg__parseCoordinate(p, item, 0.0f, nsvg__actualLength(p))); - } - - for (i = 0; i < count; i++) - sum += strokeDashArray[i]; - if (sum <= 1e-6f) - count = 0; - - return count; -} - -static void nsvg__parseStyle(NSVGparser* p, const char* str); - -static int nsvg__parseAttr(NSVGparser* p, const char* name, const char* value) -{ - float xform[6]; - NSVGattrib* attr = nsvg__getAttr(p); - if (!attr) return 0; - - if (strcmp(name, "style") == 0) { - nsvg__parseStyle(p, value); - } else if (strcmp(name, "display") == 0) { - if (strcmp(value, "none") == 0) - attr->visible = 0; - // Don't reset ->visible on display:inline, one display:none hides the whole subtree - - } else if (strcmp(name, "fill") == 0) { - if (strcmp(value, "none") == 0) { - attr->hasFill = 0; - } else if (strncmp(value, "url(", 4) == 0) { - attr->hasFill = 2; - nsvg__parseUrl(attr->fillGradient, value); - } else { - attr->hasFill = 1; - attr->fillColor = nsvg__parseColor(value); - // if the fillColor has an alpha value then use it to - // set the fillOpacity - if (attr->fillColor & 0xFF000000) { - attr->fillOpacity = ((attr->fillColor >> 24) & 0xFF) / 255.0; - // remove the alpha value from the color - attr->fillColor &= 0x00FFFFFF; - } - } - } else if (strcmp(name, "opacity") == 0) { - attr->opacity = nsvg__parseOpacity(value); - } else if (strcmp(name, "fill-opacity") == 0) { - attr->fillOpacity = nsvg__parseOpacity(value); - } else if (strcmp(name, "stroke") == 0) { - if (strcmp(value, "none") == 0) { - attr->hasStroke = 0; - } else if (strncmp(value, "url(", 4) == 0) { - attr->hasStroke = 2; - nsvg__parseUrl(attr->strokeGradient, value); - } else { - attr->hasStroke = 1; - attr->strokeColor = nsvg__parseColor(value); - // if the strokeColor has an alpha value then use it to - // set the strokeOpacity - if (attr->strokeColor & 0xFF000000) { - attr->strokeOpacity = ((attr->strokeColor >> 24) & 0xFF) / 255.0; - // remove the alpha value from the color - attr->strokeColor &= 0x00FFFFFF; - } - } - } else if (strcmp(name, "stroke-width") == 0) { - attr->strokeWidth = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p)); - } else if (strcmp(name, "stroke-dasharray") == 0) { - attr->strokeDashCount = nsvg__parseStrokeDashArray(p, value, attr->strokeDashArray); - } else if (strcmp(name, "stroke-dashoffset") == 0) { - attr->strokeDashOffset = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p)); - } else if (strcmp(name, "stroke-opacity") == 0) { - attr->strokeOpacity = nsvg__parseOpacity(value); - } else if (strcmp(name, "stroke-linecap") == 0) { - attr->strokeLineCap = nsvg__parseLineCap(value); - } else if (strcmp(name, "stroke-linejoin") == 0) { - attr->strokeLineJoin = nsvg__parseLineJoin(value); - } else if (strcmp(name, "stroke-miterlimit") == 0) { - attr->miterLimit = nsvg__parseMiterLimit(value); - } else if (strcmp(name, "fill-rule") == 0) { - attr->fillRule = nsvg__parseFillRule(value); - } else if (strcmp(name, "font-size") == 0) { - attr->fontSize = nsvg__parseCoordinate(p, value, 0.0f, nsvg__actualLength(p)); - } else if (strcmp(name, "transform") == 0) { - nsvg__parseTransform(xform, value); - nsvg__xformPremultiply(attr->xform, xform); - } else if (strcmp(name, "stop-color") == 0) { - attr->stopColor = nsvg__parseColor(value); - } else if (strcmp(name, "stop-opacity") == 0) { - attr->stopOpacity = nsvg__parseOpacity(value); - } else if (strcmp(name, "offset") == 0) { - attr->stopOffset = nsvg__parseCoordinate(p, value, 0.0f, 1.0f); - } else if (strcmp(name, "id") == 0) { - strncpy(attr->id, value, 63); - attr->id[63] = '\0'; - } else { - return 0; - } - return 1; -} - -static int nsvg__parseNameValue(NSVGparser* p, const char* start, const char* end) -{ - const char* str; - const char* val; - char name[512]; - char value[512]; - int n; - - str = start; - while (str < end && *str != ':') ++str; - - val = str; - - // Right Trim - while (str > start && (*str == ':' || nsvg__isspace(*str))) --str; - ++str; - - n = (int)(str - start); - if (n > 511) n = 511; - if (n) memcpy(name, start, n); - name[n] = 0; - - while (val < end && (*val == ':' || nsvg__isspace(*val))) ++val; - - n = (int)(end - val); - if (n > 511) n = 511; - if (n) memcpy(value, val, n); - value[n] = 0; - - return nsvg__parseAttr(p, name, value); -} - -static void nsvg__parseStyle(NSVGparser* p, const char* str) -{ - const char* start; - const char* end; - - while (*str) { - // Left Trim - while(*str && nsvg__isspace(*str)) ++str; - start = str; - while(*str && *str != ';') ++str; - end = str; - - // Right Trim - while (end > start && (*end == ';' || nsvg__isspace(*end))) --end; - ++end; - - nsvg__parseNameValue(p, start, end); - if (*str) ++str; - } -} - -static void nsvg__parseAttribs(NSVGparser* p, const char** attr) -{ - int i; - for (i = 0; attr[i]; i += 2) - { - if (strcmp(attr[i], "style") == 0) - nsvg__parseStyle(p, attr[i + 1]); - else - nsvg__parseAttr(p, attr[i], attr[i + 1]); - } -} - -static int nsvg__getArgsPerElement(char cmd) -{ - switch (cmd) { - case 'v': - case 'V': - case 'h': - case 'H': - return 1; - case 'm': - case 'M': - case 'l': - case 'L': - case 't': - case 'T': - return 2; - case 'q': - case 'Q': - case 's': - case 'S': - return 4; - case 'c': - case 'C': - return 6; - case 'a': - case 'A': - return 7; - case 'z': - case 'Z': - return 0; - } - return -1; -} - -static void nsvg__pathMoveTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel) -{ - if (rel) { - *cpx += args[0]; - *cpy += args[1]; - } else { - *cpx = args[0]; - *cpy = args[1]; - } - nsvg__moveTo(p, *cpx, *cpy); -} - -static void nsvg__pathLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel) -{ - if (rel) { - *cpx += args[0]; - *cpy += args[1]; - } else { - *cpx = args[0]; - *cpy = args[1]; - } - nsvg__lineTo(p, *cpx, *cpy); -} - -static void nsvg__pathHLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel) -{ - if (rel) - *cpx += args[0]; - else - *cpx = args[0]; - nsvg__lineTo(p, *cpx, *cpy); -} - -static void nsvg__pathVLineTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel) -{ - if (rel) - *cpy += args[0]; - else - *cpy = args[0]; - nsvg__lineTo(p, *cpx, *cpy); -} - -static void nsvg__pathCubicBezTo(NSVGparser* p, float* cpx, float* cpy, - float* cpx2, float* cpy2, float* args, int rel) -{ - float x2, y2, cx1, cy1, cx2, cy2; - - if (rel) { - cx1 = *cpx + args[0]; - cy1 = *cpy + args[1]; - cx2 = *cpx + args[2]; - cy2 = *cpy + args[3]; - x2 = *cpx + args[4]; - y2 = *cpy + args[5]; - } else { - cx1 = args[0]; - cy1 = args[1]; - cx2 = args[2]; - cy2 = args[3]; - x2 = args[4]; - y2 = args[5]; - } - - nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2); - - *cpx2 = cx2; - *cpy2 = cy2; - *cpx = x2; - *cpy = y2; -} - -static void nsvg__pathCubicBezShortTo(NSVGparser* p, float* cpx, float* cpy, - float* cpx2, float* cpy2, float* args, int rel) -{ - float x1, y1, x2, y2, cx1, cy1, cx2, cy2; - - x1 = *cpx; - y1 = *cpy; - if (rel) { - cx2 = *cpx + args[0]; - cy2 = *cpy + args[1]; - x2 = *cpx + args[2]; - y2 = *cpy + args[3]; - } else { - cx2 = args[0]; - cy2 = args[1]; - x2 = args[2]; - y2 = args[3]; - } - - cx1 = 2*x1 - *cpx2; - cy1 = 2*y1 - *cpy2; - - nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2); - - *cpx2 = cx2; - *cpy2 = cy2; - *cpx = x2; - *cpy = y2; -} - -static void nsvg__pathQuadBezTo(NSVGparser* p, float* cpx, float* cpy, - float* cpx2, float* cpy2, float* args, int rel) -{ - float x1, y1, x2, y2, cx, cy; - float cx1, cy1, cx2, cy2; - - x1 = *cpx; - y1 = *cpy; - if (rel) { - cx = *cpx + args[0]; - cy = *cpy + args[1]; - x2 = *cpx + args[2]; - y2 = *cpy + args[3]; - } else { - cx = args[0]; - cy = args[1]; - x2 = args[2]; - y2 = args[3]; - } - - // Convert to cubic bezier - cx1 = x1 + 2.0f/3.0f*(cx - x1); - cy1 = y1 + 2.0f/3.0f*(cy - y1); - cx2 = x2 + 2.0f/3.0f*(cx - x2); - cy2 = y2 + 2.0f/3.0f*(cy - y2); - - nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2); - - *cpx2 = cx; - *cpy2 = cy; - *cpx = x2; - *cpy = y2; -} - -static void nsvg__pathQuadBezShortTo(NSVGparser* p, float* cpx, float* cpy, - float* cpx2, float* cpy2, float* args, int rel) -{ - float x1, y1, x2, y2, cx, cy; - float cx1, cy1, cx2, cy2; - - x1 = *cpx; - y1 = *cpy; - if (rel) { - x2 = *cpx + args[0]; - y2 = *cpy + args[1]; - } else { - x2 = args[0]; - y2 = args[1]; - } - - cx = 2*x1 - *cpx2; - cy = 2*y1 - *cpy2; - - // Convert to cubix bezier - cx1 = x1 + 2.0f/3.0f*(cx - x1); - cy1 = y1 + 2.0f/3.0f*(cy - y1); - cx2 = x2 + 2.0f/3.0f*(cx - x2); - cy2 = y2 + 2.0f/3.0f*(cy - y2); - - nsvg__cubicBezTo(p, cx1,cy1, cx2,cy2, x2,y2); - - *cpx2 = cx; - *cpy2 = cy; - *cpx = x2; - *cpy = y2; -} - -static float nsvg__sqr(float x) { return x*x; } -static float nsvg__vmag(float x, float y) { return sqrtf(x*x + y*y); } - -static float nsvg__vecrat(float ux, float uy, float vx, float vy) -{ - return (ux*vx + uy*vy) / (nsvg__vmag(ux,uy) * nsvg__vmag(vx,vy)); -} - -static float nsvg__vecang(float ux, float uy, float vx, float vy) -{ - float r = nsvg__vecrat(ux,uy, vx,vy); - if (r < -1.0f) r = -1.0f; - if (r > 1.0f) r = 1.0f; - return ((ux*vy < uy*vx) ? -1.0f : 1.0f) * acosf(r); -} - -static void nsvg__pathArcTo(NSVGparser* p, float* cpx, float* cpy, float* args, int rel) -{ - // Ported from canvg (https://code.google.com/p/canvg/) - float rx, ry, rotx; - float x1, y1, x2, y2, cx, cy, dx, dy, d; - float x1p, y1p, cxp, cyp, s, sa, sb; - float ux, uy, vx, vy, a1, da; - float x, y, tanx, tany, a, px = 0, py = 0, ptanx = 0, ptany = 0, t[6]; - float sinrx, cosrx; - int fa, fs; - int i, ndivs; - float hda, kappa; - - rx = fabsf(args[0]); // y radius - ry = fabsf(args[1]); // x radius - rotx = args[2] / 180.0f * NSVG_PI; // x rotation angle - fa = fabsf(args[3]) > 1e-6 ? 1 : 0; // Large arc - fs = fabsf(args[4]) > 1e-6 ? 1 : 0; // Sweep direction - x1 = *cpx; // start point - y1 = *cpy; - if (rel) { // end point - x2 = *cpx + args[5]; - y2 = *cpy + args[6]; - } else { - x2 = args[5]; - y2 = args[6]; - } - - dx = x1 - x2; - dy = y1 - y2; - d = sqrtf(dx*dx + dy*dy); - if (d < 1e-6f || rx < 1e-6f || ry < 1e-6f) { - // The arc degenerates to a line - nsvg__lineTo(p, x2, y2); - *cpx = x2; - *cpy = y2; - return; - } - - sinrx = sinf(rotx); - cosrx = cosf(rotx); - - // Convert to center point parameterization. - // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes - // 1) Compute x1', y1' - x1p = cosrx * dx / 2.0f + sinrx * dy / 2.0f; - y1p = -sinrx * dx / 2.0f + cosrx * dy / 2.0f; - d = nsvg__sqr(x1p)/nsvg__sqr(rx) + nsvg__sqr(y1p)/nsvg__sqr(ry); - if (d > 1) { - d = sqrtf(d); - rx *= d; - ry *= d; - } - // 2) Compute cx', cy' - s = 0.0f; - sa = nsvg__sqr(rx)*nsvg__sqr(ry) - nsvg__sqr(rx)*nsvg__sqr(y1p) - nsvg__sqr(ry)*nsvg__sqr(x1p); - sb = nsvg__sqr(rx)*nsvg__sqr(y1p) + nsvg__sqr(ry)*nsvg__sqr(x1p); - if (sa < 0.0f) sa = 0.0f; - if (sb > 0.0f) - s = sqrtf(sa / sb); - if (fa == fs) - s = -s; - cxp = s * rx * y1p / ry; - cyp = s * -ry * x1p / rx; - - // 3) Compute cx,cy from cx',cy' - cx = (x1 + x2)/2.0f + cosrx*cxp - sinrx*cyp; - cy = (y1 + y2)/2.0f + sinrx*cxp + cosrx*cyp; - - // 4) Calculate theta1, and delta theta. - ux = (x1p - cxp) / rx; - uy = (y1p - cyp) / ry; - vx = (-x1p - cxp) / rx; - vy = (-y1p - cyp) / ry; - a1 = nsvg__vecang(1.0f,0.0f, ux,uy); // Initial angle - da = nsvg__vecang(ux,uy, vx,vy); // Delta angle - -// if (vecrat(ux,uy,vx,vy) <= -1.0f) da = NSVG_PI; -// if (vecrat(ux,uy,vx,vy) >= 1.0f) da = 0; - - if (fs == 0 && da > 0) - da -= 2 * NSVG_PI; - else if (fs == 1 && da < 0) - da += 2 * NSVG_PI; - - // Approximate the arc using cubic spline segments. - t[0] = cosrx; t[1] = sinrx; - t[2] = -sinrx; t[3] = cosrx; - t[4] = cx; t[5] = cy; - - // Split arc into max 90 degree segments. - // The loop assumes an iteration per end point (including start and end), this +1. - ndivs = (int)(fabsf(da) / (NSVG_PI*0.5f) + 1.0f); - hda = (da / (float)ndivs) / 2.0f; - // Fix for ticket #179: division by 0: avoid cotangens around 0 (infinite) - if ((hda < 1e-3f) && (hda > -1e-3f)) - hda *= 0.5f; - else - hda = (1.0f - cosf(hda)) / sinf(hda); - kappa = fabsf(4.0f / 3.0f * hda); - if (da < 0.0f) - kappa = -kappa; - - for (i = 0; i <= ndivs; i++) { - a = a1 + da * ((float)i/(float)ndivs); - dx = cosf(a); - dy = sinf(a); - nsvg__xformPoint(&x, &y, dx*rx, dy*ry, t); // position - nsvg__xformVec(&tanx, &tany, -dy*rx * kappa, dx*ry * kappa, t); // tangent - if (i > 0) - nsvg__cubicBezTo(p, px+ptanx,py+ptany, x-tanx, y-tany, x, y); - px = x; - py = y; - ptanx = tanx; - ptany = tany; - } - - *cpx = x2; - *cpy = y2; -} - -static void nsvg__parsePath(NSVGparser* p, const char** attr) -{ - const char* s = NULL; - char cmd = '\0'; - float args[10]; - int nargs; - int rargs = 0; - char initPoint; - float cpx, cpy, cpx2, cpy2; - const char* tmp[4]; - char closedFlag; - int i; - char item[64]; - - for (i = 0; attr[i]; i += 2) { - if (strcmp(attr[i], "d") == 0) { - s = attr[i + 1]; - } else { - tmp[0] = attr[i]; - tmp[1] = attr[i + 1]; - tmp[2] = 0; - tmp[3] = 0; - nsvg__parseAttribs(p, tmp); - } - } - - if (s) { - nsvg__resetPath(p); - cpx = 0; cpy = 0; - cpx2 = 0; cpy2 = 0; - initPoint = 0; - closedFlag = 0; - nargs = 0; - - while (*s) { - item[0] = '\0'; - if ((cmd == 'A' || cmd == 'a') && (nargs == 3 || nargs == 4)) - s = nsvg__getNextPathItemWhenArcFlag(s, item); - if (!*item) - s = nsvg__getNextPathItem(s, item); - if (!*item) break; - if (cmd != '\0' && nsvg__isCoordinate(item)) { - if (nargs < 10) - args[nargs++] = (float)nsvg__atof(item); - if (nargs >= rargs) { - switch (cmd) { - case 'm': - case 'M': - nsvg__pathMoveTo(p, &cpx, &cpy, args, cmd == 'm' ? 1 : 0); - // Moveto can be followed by multiple coordinate pairs, - // which should be treated as linetos. - cmd = (cmd == 'm') ? 'l' : 'L'; - rargs = nsvg__getArgsPerElement(cmd); - cpx2 = cpx; cpy2 = cpy; - initPoint = 1; - break; - case 'l': - case 'L': - nsvg__pathLineTo(p, &cpx, &cpy, args, cmd == 'l' ? 1 : 0); - cpx2 = cpx; cpy2 = cpy; - break; - case 'H': - case 'h': - nsvg__pathHLineTo(p, &cpx, &cpy, args, cmd == 'h' ? 1 : 0); - cpx2 = cpx; cpy2 = cpy; - break; - case 'V': - case 'v': - nsvg__pathVLineTo(p, &cpx, &cpy, args, cmd == 'v' ? 1 : 0); - cpx2 = cpx; cpy2 = cpy; - break; - case 'C': - case 'c': - nsvg__pathCubicBezTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 'c' ? 1 : 0); - break; - case 'S': - case 's': - nsvg__pathCubicBezShortTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 's' ? 1 : 0); - break; - case 'Q': - case 'q': - nsvg__pathQuadBezTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 'q' ? 1 : 0); - break; - case 'T': - case 't': - nsvg__pathQuadBezShortTo(p, &cpx, &cpy, &cpx2, &cpy2, args, cmd == 't' ? 1 : 0); - break; - case 'A': - case 'a': - nsvg__pathArcTo(p, &cpx, &cpy, args, cmd == 'a' ? 1 : 0); - cpx2 = cpx; cpy2 = cpy; - break; - default: - if (nargs >= 2) { - cpx = args[nargs-2]; - cpy = args[nargs-1]; - cpx2 = cpx; cpy2 = cpy; - } - break; - } - nargs = 0; - } - } else { - cmd = item[0]; - if (cmd == 'M' || cmd == 'm') { - // Commit path. - if (p->npts > 0) - nsvg__addPath(p, closedFlag); - // Start new subpath. - nsvg__resetPath(p); - closedFlag = 0; - nargs = 0; - } else if (initPoint == 0) { - // Do not allow other commands until initial point has been set (moveTo called once). - cmd = '\0'; - } - if (cmd == 'Z' || cmd == 'z') { - closedFlag = 1; - // Commit path. - if (p->npts > 0) { - // Move current point to first point - cpx = p->pts[0]; - cpy = p->pts[1]; - cpx2 = cpx; cpy2 = cpy; - nsvg__addPath(p, closedFlag); - } - // Start new subpath. - nsvg__resetPath(p); - nsvg__moveTo(p, cpx, cpy); - closedFlag = 0; - nargs = 0; - } - rargs = nsvg__getArgsPerElement(cmd); - if (rargs == -1) { - // Command not recognized - cmd = '\0'; - rargs = 0; - } - } - } - // Commit path. - if (p->npts) - nsvg__addPath(p, closedFlag); - } - - nsvg__addShape(p); -} - -static void nsvg__parseRect(NSVGparser* p, const char** attr) -{ - float x = 0.0f; - float y = 0.0f; - float w = 0.0f; - float h = 0.0f; - float rx = -1.0f; // marks not set - float ry = -1.0f; - int i; - - for (i = 0; attr[i]; i += 2) { - if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { - if (strcmp(attr[i], "x") == 0) x = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p)); - if (strcmp(attr[i], "y") == 0) y = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p)); - if (strcmp(attr[i], "width") == 0) w = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p)); - if (strcmp(attr[i], "height") == 0) h = nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p)); - if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p))); - if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p))); - } - } - - if (rx < 0.0f && ry > 0.0f) rx = ry; - if (ry < 0.0f && rx > 0.0f) ry = rx; - if (rx < 0.0f) rx = 0.0f; - if (ry < 0.0f) ry = 0.0f; - if (rx > w/2.0f) rx = w/2.0f; - if (ry > h/2.0f) ry = h/2.0f; - - if (w != 0.0f && h != 0.0f) { - nsvg__resetPath(p); - - if (rx < 0.00001f || ry < 0.0001f) { - nsvg__moveTo(p, x, y); - nsvg__lineTo(p, x+w, y); - nsvg__lineTo(p, x+w, y+h); - nsvg__lineTo(p, x, y+h); - } else { - // Rounded rectangle - nsvg__moveTo(p, x+rx, y); - nsvg__lineTo(p, x+w-rx, y); - nsvg__cubicBezTo(p, x+w-rx*(1-NSVG_KAPPA90), y, x+w, y+ry*(1-NSVG_KAPPA90), x+w, y+ry); - nsvg__lineTo(p, x+w, y+h-ry); - nsvg__cubicBezTo(p, x+w, y+h-ry*(1-NSVG_KAPPA90), x+w-rx*(1-NSVG_KAPPA90), y+h, x+w-rx, y+h); - nsvg__lineTo(p, x+rx, y+h); - nsvg__cubicBezTo(p, x+rx*(1-NSVG_KAPPA90), y+h, x, y+h-ry*(1-NSVG_KAPPA90), x, y+h-ry); - nsvg__lineTo(p, x, y+ry); - nsvg__cubicBezTo(p, x, y+ry*(1-NSVG_KAPPA90), x+rx*(1-NSVG_KAPPA90), y, x+rx, y); - } - - nsvg__addPath(p, 1); - - nsvg__addShape(p); - } -} - -static void nsvg__parseCircle(NSVGparser* p, const char** attr) -{ - float cx = 0.0f; - float cy = 0.0f; - float r = 0.0f; - int i; - - for (i = 0; attr[i]; i += 2) { - if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { - if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p)); - if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p)); - if (strcmp(attr[i], "r") == 0) r = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualLength(p))); - } - } - - if (r > 0.0f) { - nsvg__resetPath(p); - - nsvg__moveTo(p, cx+r, cy); - nsvg__cubicBezTo(p, cx+r, cy+r*NSVG_KAPPA90, cx+r*NSVG_KAPPA90, cy+r, cx, cy+r); - nsvg__cubicBezTo(p, cx-r*NSVG_KAPPA90, cy+r, cx-r, cy+r*NSVG_KAPPA90, cx-r, cy); - nsvg__cubicBezTo(p, cx-r, cy-r*NSVG_KAPPA90, cx-r*NSVG_KAPPA90, cy-r, cx, cy-r); - nsvg__cubicBezTo(p, cx+r*NSVG_KAPPA90, cy-r, cx+r, cy-r*NSVG_KAPPA90, cx+r, cy); - - nsvg__addPath(p, 1); - - nsvg__addShape(p); - } -} - -static void nsvg__parseEllipse(NSVGparser* p, const char** attr) -{ - float cx = 0.0f; - float cy = 0.0f; - float rx = 0.0f; - float ry = 0.0f; - int i; - - for (i = 0; attr[i]; i += 2) { - if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { - if (strcmp(attr[i], "cx") == 0) cx = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigX(p), nsvg__actualWidth(p)); - if (strcmp(attr[i], "cy") == 0) cy = nsvg__parseCoordinate(p, attr[i+1], nsvg__actualOrigY(p), nsvg__actualHeight(p)); - if (strcmp(attr[i], "rx") == 0) rx = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualWidth(p))); - if (strcmp(attr[i], "ry") == 0) ry = fabsf(nsvg__parseCoordinate(p, attr[i+1], 0.0f, nsvg__actualHeight(p))); - } - } - - if (rx > 0.0f && ry > 0.0f) { - - nsvg__resetPath(p); - - nsvg__moveTo(p, cx+rx, cy); - nsvg__cubicBezTo(p, cx+rx, cy+ry*NSVG_KAPPA90, cx+rx*NSVG_KAPPA90, cy+ry, cx, cy+ry); - nsvg__cubicBezTo(p, cx-rx*NSVG_KAPPA90, cy+ry, cx-rx, cy+ry*NSVG_KAPPA90, cx-rx, cy); - nsvg__cubicBezTo(p, cx-rx, cy-ry*NSVG_KAPPA90, cx-rx*NSVG_KAPPA90, cy-ry, cx, cy-ry); - nsvg__cubicBezTo(p, cx+rx*NSVG_KAPPA90, cy-ry, cx+rx, cy-ry*NSVG_KAPPA90, cx+rx, cy); - - nsvg__addPath(p, 1); - - nsvg__addShape(p); - } -} - -static void nsvg__parseLine(NSVGparser* p, const char** attr) -{ - float x1 = 0.0; - float y1 = 0.0; - float x2 = 0.0; - float y2 = 0.0; - int i; - - for (i = 0; attr[i]; i += 2) { - if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { - if (strcmp(attr[i], "x1") == 0) x1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p)); - if (strcmp(attr[i], "y1") == 0) y1 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p)); - if (strcmp(attr[i], "x2") == 0) x2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigX(p), nsvg__actualWidth(p)); - if (strcmp(attr[i], "y2") == 0) y2 = nsvg__parseCoordinate(p, attr[i + 1], nsvg__actualOrigY(p), nsvg__actualHeight(p)); - } - } - - nsvg__resetPath(p); - - nsvg__moveTo(p, x1, y1); - nsvg__lineTo(p, x2, y2); - - nsvg__addPath(p, 0); - - nsvg__addShape(p); -} - -static void nsvg__parsePoly(NSVGparser* p, const char** attr, int closeFlag) -{ - int i; - const char* s; - float args[2]; - int nargs, npts = 0; - char item[64]; - - nsvg__resetPath(p); - - for (i = 0; attr[i]; i += 2) { - if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { - if (strcmp(attr[i], "points") == 0) { - s = attr[i + 1]; - nargs = 0; - while (*s) { - s = nsvg__getNextPathItem(s, item); - args[nargs++] = (float)nsvg__atof(item); - if (nargs >= 2) { - if (npts == 0) - nsvg__moveTo(p, args[0], args[1]); - else - nsvg__lineTo(p, args[0], args[1]); - nargs = 0; - npts++; - } - } - } - } - } - - nsvg__addPath(p, (char)closeFlag); - - nsvg__addShape(p); -} - -static void nsvg__parseSVG(NSVGparser* p, const char** attr) -{ - int i; - for (i = 0; attr[i]; i += 2) { - if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { - if (strcmp(attr[i], "width") == 0) { - p->image->width = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f); - } else if (strcmp(attr[i], "height") == 0) { - p->image->height = nsvg__parseCoordinate(p, attr[i + 1], 0.0f, 0.0f); - } else if (strcmp(attr[i], "viewBox") == 0) { - const char *s = attr[i + 1]; - char buf[64]; - s = nsvg__parseNumber(s, buf, 64); - p->viewMinx = nsvg__atof(buf); - while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++; - if (!*s) return; - s = nsvg__parseNumber(s, buf, 64); - p->viewMiny = nsvg__atof(buf); - while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++; - if (!*s) return; - s = nsvg__parseNumber(s, buf, 64); - p->viewWidth = nsvg__atof(buf); - while (*s && (nsvg__isspace(*s) || *s == '%' || *s == ',')) s++; - if (!*s) return; - s = nsvg__parseNumber(s, buf, 64); - p->viewHeight = nsvg__atof(buf); - } else if (strcmp(attr[i], "preserveAspectRatio") == 0) { - if (strstr(attr[i + 1], "none") != 0) { - // No uniform scaling - p->alignType = NSVG_ALIGN_NONE; - } else { - // Parse X align - if (strstr(attr[i + 1], "xMin") != 0) - p->alignX = NSVG_ALIGN_MIN; - else if (strstr(attr[i + 1], "xMid") != 0) - p->alignX = NSVG_ALIGN_MID; - else if (strstr(attr[i + 1], "xMax") != 0) - p->alignX = NSVG_ALIGN_MAX; - // Parse X align - if (strstr(attr[i + 1], "yMin") != 0) - p->alignY = NSVG_ALIGN_MIN; - else if (strstr(attr[i + 1], "yMid") != 0) - p->alignY = NSVG_ALIGN_MID; - else if (strstr(attr[i + 1], "yMax") != 0) - p->alignY = NSVG_ALIGN_MAX; - // Parse meet/slice - p->alignType = NSVG_ALIGN_MEET; - if (strstr(attr[i + 1], "slice") != 0) - p->alignType = NSVG_ALIGN_SLICE; - } - } - } - } -} - -static void nsvg__parseGradient(NSVGparser* p, const char** attr, signed char type) -{ - int i; - NSVGgradientData* grad = (NSVGgradientData*)NVG_MALLOC(sizeof(NSVGgradientData)); - if (grad == NULL) return; - memset(grad, 0, sizeof(NSVGgradientData)); - grad->units = NSVG_OBJECT_SPACE; - grad->type = type; - if (grad->type == NSVG_PAINT_LINEAR_GRADIENT) { - grad->linear.x1 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT); - grad->linear.y1 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT); - grad->linear.x2 = nsvg__coord(100.0f, NSVG_UNITS_PERCENT); - grad->linear.y2 = nsvg__coord(0.0f, NSVG_UNITS_PERCENT); - } else if (grad->type == NSVG_PAINT_RADIAL_GRADIENT) { - grad->radial.cx = nsvg__coord(50.0f, NSVG_UNITS_PERCENT); - grad->radial.cy = nsvg__coord(50.0f, NSVG_UNITS_PERCENT); - grad->radial.r = nsvg__coord(50.0f, NSVG_UNITS_PERCENT); - } - - nsvg__xformIdentity(grad->xform); - - for (i = 0; attr[i]; i += 2) { - if (strcmp(attr[i], "id") == 0) { - strncpy(grad->id, attr[i+1], 63); - grad->id[63] = '\0'; - } else if (!nsvg__parseAttr(p, attr[i], attr[i + 1])) { - if (strcmp(attr[i], "gradientUnits") == 0) { - if (strcmp(attr[i+1], "objectBoundingBox") == 0) - grad->units = NSVG_OBJECT_SPACE; - else - grad->units = NSVG_USER_SPACE; - } else if (strcmp(attr[i], "gradientTransform") == 0) { - nsvg__parseTransform(grad->xform, attr[i + 1]); - } else if (strcmp(attr[i], "cx") == 0) { - grad->radial.cx = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "cy") == 0) { - grad->radial.cy = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "r") == 0) { - grad->radial.r = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "fx") == 0) { - grad->radial.fx = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "fy") == 0) { - grad->radial.fy = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "x1") == 0) { - grad->linear.x1 = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "y1") == 0) { - grad->linear.y1 = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "x2") == 0) { - grad->linear.x2 = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "y2") == 0) { - grad->linear.y2 = nsvg__parseCoordinateRaw(attr[i + 1]); - } else if (strcmp(attr[i], "spreadMethod") == 0) { - if (strcmp(attr[i+1], "pad") == 0) - grad->spread = NSVG_SPREAD_PAD; - else if (strcmp(attr[i+1], "reflect") == 0) - grad->spread = NSVG_SPREAD_REFLECT; - else if (strcmp(attr[i+1], "repeat") == 0) - grad->spread = NSVG_SPREAD_REPEAT; - } else if (strcmp(attr[i], "xlink:href") == 0) { - const char *href = attr[i+1]; - strncpy(grad->ref, href+1, 62); - grad->ref[62] = '\0'; - } - } - } - - grad->next = p->gradients; - p->gradients = grad; -} - -static void nsvg__parseGradientStop(NSVGparser* p, const char** attr) -{ - NSVGattrib* curAttr = nsvg__getAttr(p); - NSVGgradientData* grad; - NSVGgradientStop* stop; - int i, idx; - - curAttr->stopOffset = 0; - curAttr->stopColor = 0; - curAttr->stopOpacity = 1.0f; - - for (i = 0; attr[i]; i += 2) { - nsvg__parseAttr(p, attr[i], attr[i + 1]); - } - - // Add stop to the last gradient. - grad = p->gradients; - if (grad == NULL) return; - - grad->nstops++; - grad->stops = (NSVGgradientStop*)NVG_REALLOC(grad->stops, sizeof(NSVGgradientStop)*grad->nstops); - if (grad->stops == NULL) return; - - // Insert - idx = grad->nstops-1; - for (i = 0; i < grad->nstops-1; i++) { - if (curAttr->stopOffset < grad->stops[i].offset) { - idx = i; - break; - } - } - if (idx != grad->nstops-1) { - for (i = grad->nstops-1; i > idx; i--) - grad->stops[i] = grad->stops[i-1]; - } - - stop = &grad->stops[idx]; - stop->color = curAttr->stopColor; - stop->color |= (unsigned int)(curAttr->stopOpacity*255) << 24; - stop->offset = curAttr->stopOffset; -} - -static void nsvg__startElement(void* ud, const char* el, const char** attr) -{ - NSVGparser* p = (NSVGparser*)ud; - - if (p->defsFlag) { - // Skip everything but gradients in defs - if (strcmp(el, "linearGradient") == 0) { - nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT); - } else if (strcmp(el, "radialGradient") == 0) { - nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT); - } else if (strcmp(el, "stop") == 0) { - nsvg__parseGradientStop(p, attr); - } - return; - } - - if (strcmp(el, "g") == 0) { - nsvg__pushAttr(p); - nsvg__parseAttribs(p, attr); - } else if (strcmp(el, "path") == 0) { - if (p->pathFlag) // Do not allow nested paths. - return; - nsvg__pushAttr(p); - nsvg__parsePath(p, attr); - nsvg__popAttr(p); - } else if (strcmp(el, "rect") == 0) { - nsvg__pushAttr(p); - nsvg__parseRect(p, attr); - nsvg__popAttr(p); - } else if (strcmp(el, "circle") == 0) { - nsvg__pushAttr(p); - nsvg__parseCircle(p, attr); - nsvg__popAttr(p); - } else if (strcmp(el, "ellipse") == 0) { - nsvg__pushAttr(p); - nsvg__parseEllipse(p, attr); - nsvg__popAttr(p); - } else if (strcmp(el, "line") == 0) { - nsvg__pushAttr(p); - nsvg__parseLine(p, attr); - nsvg__popAttr(p); - } else if (strcmp(el, "polyline") == 0) { - nsvg__pushAttr(p); - nsvg__parsePoly(p, attr, 0); - nsvg__popAttr(p); - } else if (strcmp(el, "polygon") == 0) { - nsvg__pushAttr(p); - nsvg__parsePoly(p, attr, 1); - nsvg__popAttr(p); - } else if (strcmp(el, "linearGradient") == 0) { - nsvg__parseGradient(p, attr, NSVG_PAINT_LINEAR_GRADIENT); - } else if (strcmp(el, "radialGradient") == 0) { - nsvg__parseGradient(p, attr, NSVG_PAINT_RADIAL_GRADIENT); - } else if (strcmp(el, "stop") == 0) { - nsvg__parseGradientStop(p, attr); - } else if (strcmp(el, "defs") == 0) { - p->defsFlag = 1; - } else if (strcmp(el, "svg") == 0) { - nsvg__parseSVG(p, attr); - } -} - -static void nsvg__endElement(void* ud, const char* el) -{ - NSVGparser* p = (NSVGparser*)ud; - - if (strcmp(el, "g") == 0) { - nsvg__popAttr(p); - } else if (strcmp(el, "path") == 0) { - p->pathFlag = 0; - } else if (strcmp(el, "defs") == 0) { - p->defsFlag = 0; - } -} - -static void nsvg__content(void* ud, const char* s) -{ - NSVG_NOTUSED(ud); - NSVG_NOTUSED(s); - // empty -} - -static void nsvg__imageBounds(NSVGparser* p, float* bounds) -{ - NSVGshape* shape; - shape = p->image->shapes; - if (shape == NULL) { - bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0; - return; - } - bounds[0] = shape->bounds[0]; - bounds[1] = shape->bounds[1]; - bounds[2] = shape->bounds[2]; - bounds[3] = shape->bounds[3]; - for (shape = shape->next; shape != NULL; shape = shape->next) { - bounds[0] = nsvg__minf(bounds[0], shape->bounds[0]); - bounds[1] = nsvg__minf(bounds[1], shape->bounds[1]); - bounds[2] = nsvg__maxf(bounds[2], shape->bounds[2]); - bounds[3] = nsvg__maxf(bounds[3], shape->bounds[3]); - } -} - -static float nsvg__viewAlign(float content, float container, int type) -{ - if (type == NSVG_ALIGN_MIN) - return 0; - else if (type == NSVG_ALIGN_MAX) - return container - content; - // mid - return (container - content) * 0.5f; -} - -static void nsvg__scaleGradient(NSVGgradient* grad, float tx, float ty, float sx, float sy) -{ - float t[6]; - nsvg__xformSetTranslation(t, tx, ty); - nsvg__xformMultiply (grad->xform, t); - - nsvg__xformSetScale(t, sx, sy); - nsvg__xformMultiply (grad->xform, t); -} - -static void nsvg__scaleToViewbox(NSVGparser* p, const char* units) -{ - NSVGshape* shape; - NSVGpath* path; - float tx, ty, sx, sy, us, bounds[4], t[6], avgs; - int i; - float* pt; - - // Guess image size if not set completely. - nsvg__imageBounds(p, bounds); - - if (p->viewWidth == 0) { - if (p->image->width > 0) { - p->viewWidth = p->image->width; - } else { - p->viewMinx = bounds[0]; - p->viewWidth = bounds[2] - bounds[0]; - } - } - if (p->viewHeight == 0) { - if (p->image->height > 0) { - p->viewHeight = p->image->height; - } else { - p->viewMiny = bounds[1]; - p->viewHeight = bounds[3] - bounds[1]; - } - } - if (p->image->width == 0) - p->image->width = p->viewWidth; - if (p->image->height == 0) - p->image->height = p->viewHeight; - - tx = -p->viewMinx; - ty = -p->viewMiny; - sx = p->viewWidth > 0 ? p->image->width / p->viewWidth : 0; - sy = p->viewHeight > 0 ? p->image->height / p->viewHeight : 0; - // Unit scaling - us = 1.0f / nsvg__convertToPixels(p, nsvg__coord(1.0f, nsvg__parseUnits(units)), 0.0f, 1.0f); - - // Fix aspect ratio - if (p->alignType == NSVG_ALIGN_MEET) { - // fit whole image into viewbox - sx = sy = nsvg__minf(sx, sy); - tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx; - ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy; - } else if (p->alignType == NSVG_ALIGN_SLICE) { - // fill whole viewbox with image - sx = sy = nsvg__maxf(sx, sy); - tx += nsvg__viewAlign(p->viewWidth*sx, p->image->width, p->alignX) / sx; - ty += nsvg__viewAlign(p->viewHeight*sy, p->image->height, p->alignY) / sy; - } - - // Transform - sx *= us; - sy *= us; - avgs = (sx+sy) / 2.0f; - for (shape = p->image->shapes; shape != NULL; shape = shape->next) { - shape->bounds[0] = (shape->bounds[0] + tx) * sx; - shape->bounds[1] = (shape->bounds[1] + ty) * sy; - shape->bounds[2] = (shape->bounds[2] + tx) * sx; - shape->bounds[3] = (shape->bounds[3] + ty) * sy; - for (path = shape->paths; path != NULL; path = path->next) { - path->bounds[0] = (path->bounds[0] + tx) * sx; - path->bounds[1] = (path->bounds[1] + ty) * sy; - path->bounds[2] = (path->bounds[2] + tx) * sx; - path->bounds[3] = (path->bounds[3] + ty) * sy; - for (i =0; i < path->npts; i++) { - pt = &path->pts[i*2]; - pt[0] = (pt[0] + tx) * sx; - pt[1] = (pt[1] + ty) * sy; - } - } - - if (shape->fill.type == NSVG_PAINT_LINEAR_GRADIENT || shape->fill.type == NSVG_PAINT_RADIAL_GRADIENT) { - nsvg__scaleGradient(shape->fill.gradient, tx,ty, sx,sy); - memcpy(t, shape->fill.gradient->xform, sizeof(float)*6); - nsvg__xformInverse(shape->fill.gradient->xform, t); - } - if (shape->stroke.type == NSVG_PAINT_LINEAR_GRADIENT || shape->stroke.type == NSVG_PAINT_RADIAL_GRADIENT) { - nsvg__scaleGradient(shape->stroke.gradient, tx,ty, sx,sy); - memcpy(t, shape->stroke.gradient->xform, sizeof(float)*6); - nsvg__xformInverse(shape->stroke.gradient->xform, t); - } - - shape->strokeWidth *= avgs; - shape->strokeDashOffset *= avgs; - for (i = 0; i < shape->strokeDashCount; i++) - shape->strokeDashArray[i] *= avgs; - } -} - -static void nsvg__createGradients(NSVGparser* p) -{ - NSVGshape* shape; - - for (shape = p->image->shapes; shape != NULL; shape = shape->next) { - if (shape->fill.type == NSVG_PAINT_UNDEF) { - if (shape->fillGradient[0] != '\0') { - float inv[6], localBounds[4]; - nsvg__xformInverse(inv, shape->xform); - nsvg__getLocalBounds(localBounds, shape, inv); - shape->fill.gradient = nsvg__createGradient(p, shape->fillGradient, localBounds, shape->xform, &shape->fill.type); - } - if (shape->fill.type == NSVG_PAINT_UNDEF) { - shape->fill.type = NSVG_PAINT_NONE; - } - } - if (shape->stroke.type == NSVG_PAINT_UNDEF) { - if (shape->strokeGradient[0] != '\0') { - float inv[6], localBounds[4]; - nsvg__xformInverse(inv, shape->xform); - nsvg__getLocalBounds(localBounds, shape, inv); - shape->stroke.gradient = nsvg__createGradient(p, shape->strokeGradient, localBounds, shape->xform, &shape->stroke.type); - } - if (shape->stroke.type == NSVG_PAINT_UNDEF) { - shape->stroke.type = NSVG_PAINT_NONE; - } - } - } -} - -NSVGimage* nsvgParse(char* input, const char* units, float dpi) -{ - NSVGparser* p; - NSVGimage* ret = 0; - - p = nsvg__createParser(); - if (p == NULL) { - return NULL; - } - p->dpi = dpi; - - nsvg__parseXML(input, nsvg__startElement, nsvg__endElement, nsvg__content, p); - - // Create gradients after all definitions have been parsed - nsvg__createGradients(p); - - // Scale to viewBox - nsvg__scaleToViewbox(p, units); - - ret = p->image; - p->image = NULL; - - nsvg__deleteParser(p); - - return ret; -} - -NSVGimage* nsvgParseFromFile(const char* filename, const char* units, float dpi) -{ - FILE* fp = NULL; - size_t size; - char* data = NULL; - NSVGimage* image = NULL; - - fp = fopen(filename, "rb"); - if (!fp) goto error; - fseek(fp, 0, SEEK_END); - size = ftell(fp); - fseek(fp, 0, SEEK_SET); - data = (char*)NVG_MALLOC(size+1); - if (data == NULL) goto error; - if (fread(data, 1, size, fp) != size) goto error; - data[size] = '\0'; // Must be null terminated. - fclose(fp); - image = nsvgParse(data, units, dpi); - NVG_FREE(data); - - return image; - -error: - if (fp) fclose(fp); - if (data) NVG_FREE(data); - if (image) nsvgDelete(image); - return NULL; -} - -NSVGpath* nsvgDuplicatePath(NSVGpath* p) -{ - NSVGpath* res = NULL; - - if (p == NULL) - return NULL; - - res = (NSVGpath*)NVG_MALLOC(sizeof(NSVGpath)); - if (res == NULL) goto error; - memset(res, 0, sizeof(NSVGpath)); - - res->pts = (float*)NVG_MALLOC(p->npts*2*sizeof(float)); - if (res->pts == NULL) goto error; - memcpy(res->pts, p->pts, p->npts * sizeof(float) * 2); - res->npts = p->npts; - - memcpy(res->bounds, p->bounds, sizeof(p->bounds)); - - res->closed = p->closed; - - return res; - -error: - if (res != NULL) { - NVG_FREE(res->pts); - NVG_FREE(res); - } - return NULL; -} - -void nsvgDelete(NSVGimage* image) -{ - NSVGshape *snext, *shape; - if (image == NULL) return; - shape = image->shapes; - while (shape != NULL) { - snext = shape->next; - nsvg__deletePaths(shape->paths); - nsvg__deletePaint(&shape->fill); - nsvg__deletePaint(&shape->stroke); - NVG_FREE(shape); - shape = snext; - } - NVG_FREE(image); -} - -#endif // NANOSVG_IMPLEMENTATION - -#endif // NANOSVG_H diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/nanosvgrast.h b/FCLauncher/src/main/jni/lwjgl/nanovg/nanosvgrast.h deleted file mode 100644 index 7ca64ad9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/nanosvgrast.h +++ /dev/null @@ -1,1458 +0,0 @@ -/* - * Copyright (c) 2013-14 Mikko Mononen memon@inside.org - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * The polygon rasterization is heavily based on stb_truetype rasterizer - * by Sean Barrett - http://nothings.org/ - * - */ - -#ifndef NANOSVGRAST_H -#define NANOSVGRAST_H - -#include "nanosvg.h" - -#ifndef NANOSVGRAST_CPLUSPLUS -#ifdef __cplusplus -extern "C" { -#endif -#endif - -typedef struct NSVGrasterizer NSVGrasterizer; - -/* Example Usage: - // Load SVG - NSVGimage* image; - image = nsvgParseFromFile("test.svg", "px", 96); - - // Create rasterizer (can be used to render multiple images). - struct NSVGrasterizer* rast = nsvgCreateRasterizer(); - // Allocate memory for image - unsigned char* img = malloc(w*h*4); - // Rasterize - nsvgRasterize(rast, image, 0,0,1, img, w, h, w*4); -*/ - -// Allocated rasterizer context. -NSVGrasterizer* nsvgCreateRasterizer(void); - -// Rasterizes SVG image, returns RGBA image (non-premultiplied alpha) -// r - pointer to rasterizer context -// image - pointer to image to rasterize -// tx,ty - image offset (applied after scaling) -// scale - image scale -// dst - pointer to destination image data, 4 bytes per pixel (RGBA) -// w - width of the image to render -// h - height of the image to render -// stride - number of bytes per scaleline in the destination buffer -void nsvgRasterize(NSVGrasterizer* r, - NSVGimage* image, float tx, float ty, float scale, - unsigned char* dst, int w, int h, int stride); - -// Deletes rasterizer context. -void nsvgDeleteRasterizer(NSVGrasterizer*); - - -#ifndef NANOSVGRAST_CPLUSPLUS -#ifdef __cplusplus -} -#endif -#endif - -#ifdef NANOSVGRAST_IMPLEMENTATION - -#include -#include -#include - -#define NSVG__SUBSAMPLES 5 -#define NSVG__FIXSHIFT 10 -#define NSVG__FIX (1 << NSVG__FIXSHIFT) -#define NSVG__FIXMASK (NSVG__FIX-1) -#define NSVG__MEMPAGE_SIZE 1024 - -typedef struct NSVGedge { - float x0,y0, x1,y1; - int dir; - struct NSVGedge* next; -} NSVGedge; - -typedef struct NSVGpoint { - float x, y; - float dx, dy; - float len; - float dmx, dmy; - unsigned char flags; -} NSVGpoint; - -typedef struct NSVGactiveEdge { - int x,dx; - float ey; - int dir; - struct NSVGactiveEdge *next; -} NSVGactiveEdge; - -typedef struct NSVGmemPage { - unsigned char mem[NSVG__MEMPAGE_SIZE]; - int size; - struct NSVGmemPage* next; -} NSVGmemPage; - -typedef struct NSVGcachedPaint { - signed char type; - char spread; - float xform[6]; - unsigned int colors[256]; -} NSVGcachedPaint; - -struct NSVGrasterizer -{ - float px, py; - - float tessTol; - float distTol; - - NSVGedge* edges; - int nedges; - int cedges; - - NSVGpoint* points; - int npoints; - int cpoints; - - NSVGpoint* points2; - int npoints2; - int cpoints2; - - NSVGactiveEdge* freelist; - NSVGmemPage* pages; - NSVGmemPage* curpage; - - unsigned char* scanline; - int cscanline; - - unsigned char* bitmap; - int width, height, stride; -}; - -NSVGrasterizer* nsvgCreateRasterizer(void) -{ - NSVGrasterizer* r = (NSVGrasterizer*)NVG_MALLOC(sizeof(NSVGrasterizer)); - if (r == NULL) goto error; - memset(r, 0, sizeof(NSVGrasterizer)); - - r->tessTol = 0.25f; - r->distTol = 0.01f; - - return r; - -error: - nsvgDeleteRasterizer(r); - return NULL; -} - -void nsvgDeleteRasterizer(NSVGrasterizer* r) -{ - NSVGmemPage* p; - - if (r == NULL) return; - - p = r->pages; - while (p != NULL) { - NSVGmemPage* next = p->next; - NVG_FREE(p); - p = next; - } - - if (r->edges) NVG_FREE(r->edges); - if (r->points) NVG_FREE(r->points); - if (r->points2) NVG_FREE(r->points2); - if (r->scanline) NVG_FREE(r->scanline); - - NVG_FREE(r); -} - -static NSVGmemPage* nsvg__nextPage(NSVGrasterizer* r, NSVGmemPage* cur) -{ - NSVGmemPage *newp; - - // If using existing chain, return the next page in chain - if (cur != NULL && cur->next != NULL) { - return cur->next; - } - - // Alloc new page - newp = (NSVGmemPage*)NVG_MALLOC(sizeof(NSVGmemPage)); - if (newp == NULL) return NULL; - memset(newp, 0, sizeof(NSVGmemPage)); - - // Add to linked list - if (cur != NULL) - cur->next = newp; - else - r->pages = newp; - - return newp; -} - -static void nsvg__resetPool(NSVGrasterizer* r) -{ - NSVGmemPage* p = r->pages; - while (p != NULL) { - p->size = 0; - p = p->next; - } - r->curpage = r->pages; -} - -static unsigned char* nsvg__alloc(NSVGrasterizer* r, int size) -{ - unsigned char* buf; - if (size > NSVG__MEMPAGE_SIZE) return NULL; - if (r->curpage == NULL || r->curpage->size+size > NSVG__MEMPAGE_SIZE) { - r->curpage = nsvg__nextPage(r, r->curpage); - } - buf = &r->curpage->mem[r->curpage->size]; - r->curpage->size += size; - return buf; -} - -static int nsvg__ptEquals(float x1, float y1, float x2, float y2, float tol) -{ - float dx = x2 - x1; - float dy = y2 - y1; - return dx*dx + dy*dy < tol*tol; -} - -static void nsvg__addPathPoint(NSVGrasterizer* r, float x, float y, int flags) -{ - NSVGpoint* pt; - - if (r->npoints > 0) { - pt = &r->points[r->npoints-1]; - if (nsvg__ptEquals(pt->x,pt->y, x,y, r->distTol)) { - pt->flags = (unsigned char)(pt->flags | flags); - return; - } - } - - if (r->npoints+1 > r->cpoints) { - r->cpoints = r->cpoints > 0 ? r->cpoints * 2 : 64; - r->points = (NSVGpoint*)NVG_REALLOC(r->points, sizeof(NSVGpoint) * r->cpoints); - if (r->points == NULL) return; - } - - pt = &r->points[r->npoints]; - pt->x = x; - pt->y = y; - pt->flags = (unsigned char)flags; - r->npoints++; -} - -static void nsvg__appendPathPoint(NSVGrasterizer* r, NSVGpoint pt) -{ - if (r->npoints+1 > r->cpoints) { - r->cpoints = r->cpoints > 0 ? r->cpoints * 2 : 64; - r->points = (NSVGpoint*)NVG_REALLOC(r->points, sizeof(NSVGpoint) * r->cpoints); - if (r->points == NULL) return; - } - r->points[r->npoints] = pt; - r->npoints++; -} - -static void nsvg__duplicatePoints(NSVGrasterizer* r) -{ - if (r->npoints > r->cpoints2) { - r->cpoints2 = r->npoints; - r->points2 = (NSVGpoint*)NVG_REALLOC(r->points2, sizeof(NSVGpoint) * r->cpoints2); - if (r->points2 == NULL) return; - } - - memcpy(r->points2, r->points, sizeof(NSVGpoint) * r->npoints); - r->npoints2 = r->npoints; -} - -static void nsvg__addEdge(NSVGrasterizer* r, float x0, float y0, float x1, float y1) -{ - NSVGedge* e; - - // Skip horizontal edges - if (y0 == y1) - return; - - if (r->nedges+1 > r->cedges) { - r->cedges = r->cedges > 0 ? r->cedges * 2 : 64; - r->edges = (NSVGedge*)NVG_REALLOC(r->edges, sizeof(NSVGedge) * r->cedges); - if (r->edges == NULL) return; - } - - e = &r->edges[r->nedges]; - r->nedges++; - - if (y0 < y1) { - e->x0 = x0; - e->y0 = y0; - e->x1 = x1; - e->y1 = y1; - e->dir = 1; - } else { - e->x0 = x1; - e->y0 = y1; - e->x1 = x0; - e->y1 = y0; - e->dir = -1; - } -} - -static float nsvg__normalize(float *x, float* y) -{ - float d = sqrtf((*x)*(*x) + (*y)*(*y)); - if (d > 1e-6f) { - float id = 1.0f / d; - *x *= id; - *y *= id; - } - return d; -} - -static float nsvg__absf(float x) { return x < 0 ? -x : x; } - -static void nsvg__flattenCubicBez(NSVGrasterizer* r, - float x1, float y1, float x2, float y2, - float x3, float y3, float x4, float y4, - int level, int type) -{ - float x12,y12,x23,y23,x34,y34,x123,y123,x234,y234,x1234,y1234; - float dx,dy,d2,d3; - - if (level > 10) return; - - x12 = (x1+x2)*0.5f; - y12 = (y1+y2)*0.5f; - x23 = (x2+x3)*0.5f; - y23 = (y2+y3)*0.5f; - x34 = (x3+x4)*0.5f; - y34 = (y3+y4)*0.5f; - x123 = (x12+x23)*0.5f; - y123 = (y12+y23)*0.5f; - - dx = x4 - x1; - dy = y4 - y1; - d2 = nsvg__absf(((x2 - x4) * dy - (y2 - y4) * dx)); - d3 = nsvg__absf(((x3 - x4) * dy - (y3 - y4) * dx)); - - if ((d2 + d3)*(d2 + d3) < r->tessTol * (dx*dx + dy*dy)) { - nsvg__addPathPoint(r, x4, y4, type); - return; - } - - x234 = (x23+x34)*0.5f; - y234 = (y23+y34)*0.5f; - x1234 = (x123+x234)*0.5f; - y1234 = (y123+y234)*0.5f; - - nsvg__flattenCubicBez(r, x1,y1, x12,y12, x123,y123, x1234,y1234, level+1, 0); - nsvg__flattenCubicBez(r, x1234,y1234, x234,y234, x34,y34, x4,y4, level+1, type); -} - -static void nsvg__flattenShape(NSVGrasterizer* r, NSVGshape* shape, float scale) -{ - int i, j; - NSVGpath* path; - - for (path = shape->paths; path != NULL; path = path->next) { - r->npoints = 0; - // Flatten path - nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0); - for (i = 0; i < path->npts-1; i += 3) { - float* p = &path->pts[i*2]; - nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, 0); - } - // Close path - nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, 0); - // Build edges - for (i = 0, j = r->npoints-1; i < r->npoints; j = i++) - nsvg__addEdge(r, r->points[j].x, r->points[j].y, r->points[i].x, r->points[i].y); - } -} - -enum NSVGpointFlags -{ - NSVG_PT_CORNER = 0x01, - NSVG_PT_BEVEL = 0x02, - NSVG_PT_LEFT = 0x04 -}; - -static void nsvg__initClosed(NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth) -{ - float w = lineWidth * 0.5f; - float dx = p1->x - p0->x; - float dy = p1->y - p0->y; - float len = nsvg__normalize(&dx, &dy); - float px = p0->x + dx*len*0.5f, py = p0->y + dy*len*0.5f; - float dlx = dy, dly = -dx; - float lx = px - dlx*w, ly = py - dly*w; - float rx = px + dlx*w, ry = py + dly*w; - left->x = lx; left->y = ly; - right->x = rx; right->y = ry; -} - -static void nsvg__buttCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int connect) -{ - float w = lineWidth * 0.5f; - float px = p->x, py = p->y; - float dlx = dy, dly = -dx; - float lx = px - dlx*w, ly = py - dly*w; - float rx = px + dlx*w, ry = py + dly*w; - - nsvg__addEdge(r, lx, ly, rx, ry); - - if (connect) { - nsvg__addEdge(r, left->x, left->y, lx, ly); - nsvg__addEdge(r, rx, ry, right->x, right->y); - } - left->x = lx; left->y = ly; - right->x = rx; right->y = ry; -} - -static void nsvg__squareCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int connect) -{ - float w = lineWidth * 0.5f; - float px = p->x - dx*w, py = p->y - dy*w; - float dlx = dy, dly = -dx; - float lx = px - dlx*w, ly = py - dly*w; - float rx = px + dlx*w, ry = py + dly*w; - - nsvg__addEdge(r, lx, ly, rx, ry); - - if (connect) { - nsvg__addEdge(r, left->x, left->y, lx, ly); - nsvg__addEdge(r, rx, ry, right->x, right->y); - } - left->x = lx; left->y = ly; - right->x = rx; right->y = ry; -} - -#ifndef NSVG_PI -#define NSVG_PI (3.14159265358979323846264338327f) -#endif - -static void nsvg__roundCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int ncap, int connect) -{ - int i; - float w = lineWidth * 0.5f; - float px = p->x, py = p->y; - float dlx = dy, dly = -dx; - float lx = 0, ly = 0, rx = 0, ry = 0, prevx = 0, prevy = 0; - - for (i = 0; i < ncap; i++) { - float a = (float)i/(float)(ncap-1)*NSVG_PI; - float ax = cosf(a) * w, ay = sinf(a) * w; - float x = px - dlx*ax - dx*ay; - float y = py - dly*ax - dy*ay; - - if (i > 0) - nsvg__addEdge(r, prevx, prevy, x, y); - - prevx = x; - prevy = y; - - if (i == 0) { - lx = x; ly = y; - } else if (i == ncap-1) { - rx = x; ry = y; - } - } - - if (connect) { - nsvg__addEdge(r, left->x, left->y, lx, ly); - nsvg__addEdge(r, rx, ry, right->x, right->y); - } - - left->x = lx; left->y = ly; - right->x = rx; right->y = ry; -} - -static void nsvg__bevelJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth) -{ - float w = lineWidth * 0.5f; - float dlx0 = p0->dy, dly0 = -p0->dx; - float dlx1 = p1->dy, dly1 = -p1->dx; - float lx0 = p1->x - (dlx0 * w), ly0 = p1->y - (dly0 * w); - float rx0 = p1->x + (dlx0 * w), ry0 = p1->y + (dly0 * w); - float lx1 = p1->x - (dlx1 * w), ly1 = p1->y - (dly1 * w); - float rx1 = p1->x + (dlx1 * w), ry1 = p1->y + (dly1 * w); - - nsvg__addEdge(r, lx0, ly0, left->x, left->y); - nsvg__addEdge(r, lx1, ly1, lx0, ly0); - - nsvg__addEdge(r, right->x, right->y, rx0, ry0); - nsvg__addEdge(r, rx0, ry0, rx1, ry1); - - left->x = lx1; left->y = ly1; - right->x = rx1; right->y = ry1; -} - -static void nsvg__miterJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth) -{ - float w = lineWidth * 0.5f; - float dlx0 = p0->dy, dly0 = -p0->dx; - float dlx1 = p1->dy, dly1 = -p1->dx; - float lx0, rx0, lx1, rx1; - float ly0, ry0, ly1, ry1; - - if (p1->flags & NSVG_PT_LEFT) { - lx0 = lx1 = p1->x - p1->dmx * w; - ly0 = ly1 = p1->y - p1->dmy * w; - nsvg__addEdge(r, lx1, ly1, left->x, left->y); - - rx0 = p1->x + (dlx0 * w); - ry0 = p1->y + (dly0 * w); - rx1 = p1->x + (dlx1 * w); - ry1 = p1->y + (dly1 * w); - nsvg__addEdge(r, right->x, right->y, rx0, ry0); - nsvg__addEdge(r, rx0, ry0, rx1, ry1); - } else { - lx0 = p1->x - (dlx0 * w); - ly0 = p1->y - (dly0 * w); - lx1 = p1->x - (dlx1 * w); - ly1 = p1->y - (dly1 * w); - nsvg__addEdge(r, lx0, ly0, left->x, left->y); - nsvg__addEdge(r, lx1, ly1, lx0, ly0); - - rx0 = rx1 = p1->x + p1->dmx * w; - ry0 = ry1 = p1->y + p1->dmy * w; - nsvg__addEdge(r, right->x, right->y, rx1, ry1); - } - - left->x = lx1; left->y = ly1; - right->x = rx1; right->y = ry1; -} - -static void nsvg__roundJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p0, NSVGpoint* p1, float lineWidth, int ncap) -{ - int i, n; - float w = lineWidth * 0.5f; - float dlx0 = p0->dy, dly0 = -p0->dx; - float dlx1 = p1->dy, dly1 = -p1->dx; - float a0 = atan2f(dly0, dlx0); - float a1 = atan2f(dly1, dlx1); - float da = a1 - a0; - float lx, ly, rx, ry; - - if (da < NSVG_PI) da += NSVG_PI*2; - if (da > NSVG_PI) da -= NSVG_PI*2; - - n = (int)ceilf((nsvg__absf(da) / NSVG_PI) * (float)ncap); - if (n < 2) n = 2; - if (n > ncap) n = ncap; - - lx = left->x; - ly = left->y; - rx = right->x; - ry = right->y; - - for (i = 0; i < n; i++) { - float u = (float)i/(float)(n-1); - float a = a0 + u*da; - float ax = cosf(a) * w, ay = sinf(a) * w; - float lx1 = p1->x - ax, ly1 = p1->y - ay; - float rx1 = p1->x + ax, ry1 = p1->y + ay; - - nsvg__addEdge(r, lx1, ly1, lx, ly); - nsvg__addEdge(r, rx, ry, rx1, ry1); - - lx = lx1; ly = ly1; - rx = rx1; ry = ry1; - } - - left->x = lx; left->y = ly; - right->x = rx; right->y = ry; -} - -static void nsvg__straightJoin(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p1, float lineWidth) -{ - float w = lineWidth * 0.5f; - float lx = p1->x - (p1->dmx * w), ly = p1->y - (p1->dmy * w); - float rx = p1->x + (p1->dmx * w), ry = p1->y + (p1->dmy * w); - - nsvg__addEdge(r, lx, ly, left->x, left->y); - nsvg__addEdge(r, right->x, right->y, rx, ry); - - left->x = lx; left->y = ly; - right->x = rx; right->y = ry; -} - -static int nsvg__curveDivs(float r, float arc, float tol) -{ - float da = acosf(r / (r + tol)) * 2.0f; - int divs = (int)ceilf(arc / da); - if (divs < 2) divs = 2; - return divs; -} - -static void nsvg__expandStroke(NSVGrasterizer* r, NSVGpoint* points, int npoints, int closed, int lineJoin, int lineCap, float lineWidth) -{ - int ncap = nsvg__curveDivs(lineWidth*0.5f, NSVG_PI, r->tessTol); // Calculate divisions per half circle. - NSVGpoint left = {0,0,0,0,0,0,0,0}, right = {0,0,0,0,0,0,0,0}, firstLeft = {0,0,0,0,0,0,0,0}, firstRight = {0,0,0,0,0,0,0,0}; - NSVGpoint* p0, *p1; - int j, s, e; - - // Build stroke edges - if (closed) { - // Looping - p0 = &points[npoints-1]; - p1 = &points[0]; - s = 0; - e = npoints; - } else { - // Add cap - p0 = &points[0]; - p1 = &points[1]; - s = 1; - e = npoints-1; - } - - if (closed) { - nsvg__initClosed(&left, &right, p0, p1, lineWidth); - firstLeft = left; - firstRight = right; - } else { - // Add cap - float dx = p1->x - p0->x; - float dy = p1->y - p0->y; - nsvg__normalize(&dx, &dy); - if (lineCap == NSVG_CAP_BUTT) - nsvg__buttCap(r, &left, &right, p0, dx, dy, lineWidth, 0); - else if (lineCap == NSVG_CAP_SQUARE) - nsvg__squareCap(r, &left, &right, p0, dx, dy, lineWidth, 0); - else if (lineCap == NSVG_CAP_ROUND) - nsvg__roundCap(r, &left, &right, p0, dx, dy, lineWidth, ncap, 0); - } - - for (j = s; j < e; ++j) { - if (p1->flags & NSVG_PT_CORNER) { - if (lineJoin == NSVG_JOIN_ROUND) - nsvg__roundJoin(r, &left, &right, p0, p1, lineWidth, ncap); - else if (lineJoin == NSVG_JOIN_BEVEL || (p1->flags & NSVG_PT_BEVEL)) - nsvg__bevelJoin(r, &left, &right, p0, p1, lineWidth); - else - nsvg__miterJoin(r, &left, &right, p0, p1, lineWidth); - } else { - nsvg__straightJoin(r, &left, &right, p1, lineWidth); - } - p0 = p1++; - } - - if (closed) { - // Loop it - nsvg__addEdge(r, firstLeft.x, firstLeft.y, left.x, left.y); - nsvg__addEdge(r, right.x, right.y, firstRight.x, firstRight.y); - } else { - // Add cap - float dx = p1->x - p0->x; - float dy = p1->y - p0->y; - nsvg__normalize(&dx, &dy); - if (lineCap == NSVG_CAP_BUTT) - nsvg__buttCap(r, &right, &left, p1, -dx, -dy, lineWidth, 1); - else if (lineCap == NSVG_CAP_SQUARE) - nsvg__squareCap(r, &right, &left, p1, -dx, -dy, lineWidth, 1); - else if (lineCap == NSVG_CAP_ROUND) - nsvg__roundCap(r, &right, &left, p1, -dx, -dy, lineWidth, ncap, 1); - } -} - -static void nsvg__prepareStroke(NSVGrasterizer* r, float miterLimit, int lineJoin) -{ - int i, j; - NSVGpoint* p0, *p1; - - p0 = &r->points[r->npoints-1]; - p1 = &r->points[0]; - for (i = 0; i < r->npoints; i++) { - // Calculate segment direction and length - p0->dx = p1->x - p0->x; - p0->dy = p1->y - p0->y; - p0->len = nsvg__normalize(&p0->dx, &p0->dy); - // Advance - p0 = p1++; - } - - // calculate joins - p0 = &r->points[r->npoints-1]; - p1 = &r->points[0]; - for (j = 0; j < r->npoints; j++) { - float dlx0, dly0, dlx1, dly1, dmr2, cross; - dlx0 = p0->dy; - dly0 = -p0->dx; - dlx1 = p1->dy; - dly1 = -p1->dx; - // Calculate extrusions - p1->dmx = (dlx0 + dlx1) * 0.5f; - p1->dmy = (dly0 + dly1) * 0.5f; - dmr2 = p1->dmx*p1->dmx + p1->dmy*p1->dmy; - if (dmr2 > 0.000001f) { - float s2 = 1.0f / dmr2; - if (s2 > 600.0f) { - s2 = 600.0f; - } - p1->dmx *= s2; - p1->dmy *= s2; - } - - // Clear flags, but keep the corner. - p1->flags = (p1->flags & NSVG_PT_CORNER) ? NSVG_PT_CORNER : 0; - - // Keep track of left turns. - cross = p1->dx * p0->dy - p0->dx * p1->dy; - if (cross > 0.0f) - p1->flags |= NSVG_PT_LEFT; - - // Check to see if the corner needs to be beveled. - if (p1->flags & NSVG_PT_CORNER) { - if ((dmr2 * miterLimit*miterLimit) < 1.0f || lineJoin == NSVG_JOIN_BEVEL || lineJoin == NSVG_JOIN_ROUND) { - p1->flags |= NSVG_PT_BEVEL; - } - } - - p0 = p1++; - } -} - -static void nsvg__flattenShapeStroke(NSVGrasterizer* r, NSVGshape* shape, float scale) -{ - int i, j, closed; - NSVGpath* path; - NSVGpoint* p0, *p1; - float miterLimit = shape->miterLimit; - int lineJoin = shape->strokeLineJoin; - int lineCap = shape->strokeLineCap; - float lineWidth = shape->strokeWidth * scale; - - for (path = shape->paths; path != NULL; path = path->next) { - // Flatten path - r->npoints = 0; - nsvg__addPathPoint(r, path->pts[0]*scale, path->pts[1]*scale, NSVG_PT_CORNER); - for (i = 0; i < path->npts-1; i += 3) { - float* p = &path->pts[i*2]; - nsvg__flattenCubicBez(r, p[0]*scale,p[1]*scale, p[2]*scale,p[3]*scale, p[4]*scale,p[5]*scale, p[6]*scale,p[7]*scale, 0, NSVG_PT_CORNER); - } - if (r->npoints < 2) - continue; - - closed = path->closed; - - // If the first and last points are the same, remove the last, mark as closed path. - p0 = &r->points[r->npoints-1]; - p1 = &r->points[0]; - if (nsvg__ptEquals(p0->x,p0->y, p1->x,p1->y, r->distTol)) { - r->npoints--; - p0 = &r->points[r->npoints-1]; - closed = 1; - } - - if (shape->strokeDashCount > 0) { - int idash = 0, dashState = 1; - float totalDist = 0, dashLen, allDashLen, dashOffset; - NSVGpoint cur; - - if (closed) - nsvg__appendPathPoint(r, r->points[0]); - - // Duplicate points -> points2. - nsvg__duplicatePoints(r); - - r->npoints = 0; - cur = r->points2[0]; - nsvg__appendPathPoint(r, cur); - - // Figure out dash offset. - allDashLen = 0; - for (j = 0; j < shape->strokeDashCount; j++) - allDashLen += shape->strokeDashArray[j]; - if (shape->strokeDashCount & 1) - allDashLen *= 2.0f; - // Find location inside pattern - dashOffset = fmodf(shape->strokeDashOffset, allDashLen); - if (dashOffset < 0.0f) - dashOffset += allDashLen; - - while (dashOffset > shape->strokeDashArray[idash]) { - dashOffset -= shape->strokeDashArray[idash]; - idash = (idash + 1) % shape->strokeDashCount; - } - dashLen = (shape->strokeDashArray[idash] - dashOffset) * scale; - - for (j = 1; j < r->npoints2; ) { - float dx = r->points2[j].x - cur.x; - float dy = r->points2[j].y - cur.y; - float dist = sqrtf(dx*dx + dy*dy); - - if ((totalDist + dist) > dashLen) { - // Calculate intermediate point - float d = (dashLen - totalDist) / dist; - float x = cur.x + dx * d; - float y = cur.y + dy * d; - nsvg__addPathPoint(r, x, y, NSVG_PT_CORNER); - - // Stroke - if (r->npoints > 1 && dashState) { - nsvg__prepareStroke(r, miterLimit, lineJoin); - nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth); - } - // Advance dash pattern - dashState = !dashState; - idash = (idash+1) % shape->strokeDashCount; - dashLen = shape->strokeDashArray[idash] * scale; - // Restart - cur.x = x; - cur.y = y; - cur.flags = NSVG_PT_CORNER; - totalDist = 0.0f; - r->npoints = 0; - nsvg__appendPathPoint(r, cur); - } else { - totalDist += dist; - cur = r->points2[j]; - nsvg__appendPathPoint(r, cur); - j++; - } - } - // Stroke any leftover path - if (r->npoints > 1 && dashState) - nsvg__expandStroke(r, r->points, r->npoints, 0, lineJoin, lineCap, lineWidth); - } else { - nsvg__prepareStroke(r, miterLimit, lineJoin); - nsvg__expandStroke(r, r->points, r->npoints, closed, lineJoin, lineCap, lineWidth); - } - } -} - -static int nsvg__cmpEdge(const void *p, const void *q) -{ - const NSVGedge* a = (const NSVGedge*)p; - const NSVGedge* b = (const NSVGedge*)q; - - if (a->y0 < b->y0) return -1; - if (a->y0 > b->y0) return 1; - return 0; -} - - -static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float startPoint) -{ - NSVGactiveEdge* z; - - if (r->freelist != NULL) { - // Restore from freelist. - z = r->freelist; - r->freelist = z->next; - } else { - // Alloc new edge. - z = (NSVGactiveEdge*)nsvg__alloc(r, sizeof(NSVGactiveEdge)); - if (z == NULL) return NULL; - } - - float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); -// STBTT_assert(e->y0 <= start_point); - // round dx down to avoid going too far - if (dxdy < 0) - z->dx = (int)(-floorf(NSVG__FIX * -dxdy)); - else - z->dx = (int)floorf(NSVG__FIX * dxdy); - z->x = (int)floorf(NSVG__FIX * (e->x0 + dxdy * (startPoint - e->y0))); -// z->x -= off_x * FIX; - z->ey = e->y1; - z->next = 0; - z->dir = e->dir; - - return z; -} - -static void nsvg__freeActive(NSVGrasterizer* r, NSVGactiveEdge* z) -{ - z->next = r->freelist; - r->freelist = z; -} - -static void nsvg__fillScanline(unsigned char* scanline, int len, int x0, int x1, int maxWeight, int* xmin, int* xmax) -{ - int i = x0 >> NSVG__FIXSHIFT; - int j = x1 >> NSVG__FIXSHIFT; - if (i < *xmin) *xmin = i; - if (j > *xmax) *xmax = j; - if (i < len && j >= 0) { - if (i == j) { - // x0,x1 are the same pixel, so compute combined coverage - scanline[i] = (unsigned char)(scanline[i] + ((x1 - x0) * maxWeight >> NSVG__FIXSHIFT)); - } else { - if (i >= 0) // add antialiasing for x0 - scanline[i] = (unsigned char)(scanline[i] + (((NSVG__FIX - (x0 & NSVG__FIXMASK)) * maxWeight) >> NSVG__FIXSHIFT)); - else - i = -1; // clip - - if (j < len) // add antialiasing for x1 - scanline[j] = (unsigned char)(scanline[j] + (((x1 & NSVG__FIXMASK) * maxWeight) >> NSVG__FIXSHIFT)); - else - j = len; // clip - - for (++i; i < j; ++i) // fill pixels between x0 and x1 - scanline[i] = (unsigned char)(scanline[i] + maxWeight); - } - } -} - -// note: this routine clips fills that extend off the edges... ideally this -// wouldn't happen, but it could happen if the truetype glyph bounding boxes -// are wrong, or if the user supplies a too-small bitmap -static void nsvg__fillActiveEdges(unsigned char* scanline, int len, NSVGactiveEdge* e, int maxWeight, int* xmin, int* xmax, char fillRule) -{ - // non-zero winding fill - int x0 = 0, w = 0; - - if (fillRule == NSVG_FILLRULE_NONZERO) { - // Non-zero - while (e != NULL) { - if (w == 0) { - // if we're currently at zero, we need to record the edge start point - x0 = e->x; w += e->dir; - } else { - int x1 = e->x; w += e->dir; - // if we went to zero, we need to draw - if (w == 0) - nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax); - } - e = e->next; - } - } else if (fillRule == NSVG_FILLRULE_EVENODD) { - // Even-odd - while (e != NULL) { - if (w == 0) { - // if we're currently at zero, we need to record the edge start point - x0 = e->x; w = 1; - } else { - int x1 = e->x; w = 0; - nsvg__fillScanline(scanline, len, x0, x1, maxWeight, xmin, xmax); - } - e = e->next; - } - } -} - -static float nsvg__clampf(float a, float mn, float mx) { return a < mn ? mn : (a > mx ? mx : a); } - -static unsigned int nsvg__RGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a) -{ - return ((unsigned int)r) | ((unsigned int)g << 8) | ((unsigned int)b << 16) | ((unsigned int)a << 24); -} - -static unsigned int nsvg__lerpRGBA(unsigned int c0, unsigned int c1, float u) -{ - int iu = (int)(nsvg__clampf(u, 0.0f, 1.0f) * 256.0f); - int r = (((c0) & 0xff)*(256-iu) + (((c1) & 0xff)*iu)) >> 8; - int g = (((c0>>8) & 0xff)*(256-iu) + (((c1>>8) & 0xff)*iu)) >> 8; - int b = (((c0>>16) & 0xff)*(256-iu) + (((c1>>16) & 0xff)*iu)) >> 8; - int a = (((c0>>24) & 0xff)*(256-iu) + (((c1>>24) & 0xff)*iu)) >> 8; - return nsvg__RGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a); -} - -static unsigned int nsvg__applyOpacity(unsigned int c, float u) -{ - int iu = (int)(nsvg__clampf(u, 0.0f, 1.0f) * 256.0f); - int r = (c) & 0xff; - int g = (c>>8) & 0xff; - int b = (c>>16) & 0xff; - int a = (((c>>24) & 0xff)*iu) >> 8; - return nsvg__RGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a); -} - -static inline int nsvg__div255(int x) -{ - return ((x+1) * 257) >> 16; -} - -static void nsvg__scanlineSolid(unsigned char* dst, int count, unsigned char* cover, int x, int y, - float tx, float ty, float scale, NSVGcachedPaint* cache) -{ - - if (cache->type == NSVG_PAINT_COLOR) { - int i, cr, cg, cb, ca; - cr = cache->colors[0] & 0xff; - cg = (cache->colors[0] >> 8) & 0xff; - cb = (cache->colors[0] >> 16) & 0xff; - ca = (cache->colors[0] >> 24) & 0xff; - - for (i = 0; i < count; i++) { - int r,g,b; - int a = nsvg__div255((int)cover[0] * ca); - int ia = 255 - a; - // Premultiply - r = nsvg__div255(cr * a); - g = nsvg__div255(cg * a); - b = nsvg__div255(cb * a); - - // Blend over - r += nsvg__div255(ia * (int)dst[0]); - g += nsvg__div255(ia * (int)dst[1]); - b += nsvg__div255(ia * (int)dst[2]); - a += nsvg__div255(ia * (int)dst[3]); - - dst[0] = (unsigned char)r; - dst[1] = (unsigned char)g; - dst[2] = (unsigned char)b; - dst[3] = (unsigned char)a; - - cover++; - dst += 4; - } - } else if (cache->type == NSVG_PAINT_LINEAR_GRADIENT) { - // TODO: spread modes. - // TODO: plenty of opportunities to optimize. - float fx, fy, dx, gy; - float* t = cache->xform; - int i, cr, cg, cb, ca; - unsigned int c; - - fx = ((float)x - tx) / scale; - fy = ((float)y - ty) / scale; - dx = 1.0f / scale; - - for (i = 0; i < count; i++) { - int r,g,b,a,ia; - gy = fx*t[1] + fy*t[3] + t[5]; - c = cache->colors[(int)nsvg__clampf(gy*255.0f, 0, 255.0f)]; - cr = (c) & 0xff; - cg = (c >> 8) & 0xff; - cb = (c >> 16) & 0xff; - ca = (c >> 24) & 0xff; - - a = nsvg__div255((int)cover[0] * ca); - ia = 255 - a; - - // Premultiply - r = nsvg__div255(cr * a); - g = nsvg__div255(cg * a); - b = nsvg__div255(cb * a); - - // Blend over - r += nsvg__div255(ia * (int)dst[0]); - g += nsvg__div255(ia * (int)dst[1]); - b += nsvg__div255(ia * (int)dst[2]); - a += nsvg__div255(ia * (int)dst[3]); - - dst[0] = (unsigned char)r; - dst[1] = (unsigned char)g; - dst[2] = (unsigned char)b; - dst[3] = (unsigned char)a; - - cover++; - dst += 4; - fx += dx; - } - } else if (cache->type == NSVG_PAINT_RADIAL_GRADIENT) { - // TODO: spread modes. - // TODO: plenty of opportunities to optimize. - // TODO: focus (fx,fy) - float fx, fy, dx, gx, gy, gd; - float* t = cache->xform; - int i, cr, cg, cb, ca; - unsigned int c; - - fx = ((float)x - tx) / scale; - fy = ((float)y - ty) / scale; - dx = 1.0f / scale; - - for (i = 0; i < count; i++) { - int r,g,b,a,ia; - gx = fx*t[0] + fy*t[2] + t[4]; - gy = fx*t[1] + fy*t[3] + t[5]; - gd = sqrtf(gx*gx + gy*gy); - c = cache->colors[(int)nsvg__clampf(gd*255.0f, 0, 255.0f)]; - cr = (c) & 0xff; - cg = (c >> 8) & 0xff; - cb = (c >> 16) & 0xff; - ca = (c >> 24) & 0xff; - - a = nsvg__div255((int)cover[0] * ca); - ia = 255 - a; - - // Premultiply - r = nsvg__div255(cr * a); - g = nsvg__div255(cg * a); - b = nsvg__div255(cb * a); - - // Blend over - r += nsvg__div255(ia * (int)dst[0]); - g += nsvg__div255(ia * (int)dst[1]); - b += nsvg__div255(ia * (int)dst[2]); - a += nsvg__div255(ia * (int)dst[3]); - - dst[0] = (unsigned char)r; - dst[1] = (unsigned char)g; - dst[2] = (unsigned char)b; - dst[3] = (unsigned char)a; - - cover++; - dst += 4; - fx += dx; - } - } -} - -static void nsvg__rasterizeSortedEdges(NSVGrasterizer *r, float tx, float ty, float scale, NSVGcachedPaint* cache, char fillRule) -{ - NSVGactiveEdge *active = NULL; - int y, s; - int e = 0; - int maxWeight = (255 / NSVG__SUBSAMPLES); // weight per vertical scanline - int xmin, xmax; - - for (y = 0; y < r->height; y++) { - memset(r->scanline, 0, r->width); - xmin = r->width; - xmax = 0; - for (s = 0; s < NSVG__SUBSAMPLES; ++s) { - // find center of pixel for this scanline - float scany = (float)(y*NSVG__SUBSAMPLES + s) + 0.5f; - NSVGactiveEdge **step = &active; - - // update all active edges; - // remove all active edges that terminate before the center of this scanline - while (*step) { - NSVGactiveEdge *z = *step; - if (z->ey <= scany) { - *step = z->next; // delete from list -// NSVG__assert(z->valid); - nsvg__freeActive(r, z); - } else { - z->x += z->dx; // advance to position for current scanline - step = &((*step)->next); // advance through list - } - } - - // resort the list if needed - for (;;) { - int changed = 0; - step = &active; - while (*step && (*step)->next) { - if ((*step)->x > (*step)->next->x) { - NSVGactiveEdge* t = *step; - NSVGactiveEdge* q = t->next; - t->next = q->next; - q->next = t; - *step = q; - changed = 1; - } - step = &(*step)->next; - } - if (!changed) break; - } - - // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline - while (e < r->nedges && r->edges[e].y0 <= scany) { - if (r->edges[e].y1 > scany) { - NSVGactiveEdge* z = nsvg__addActive(r, &r->edges[e], scany); - if (z == NULL) break; - // find insertion point - if (active == NULL) { - active = z; - } else if (z->x < active->x) { - // insert at front - z->next = active; - active = z; - } else { - // find thing to insert AFTER - NSVGactiveEdge* p = active; - while (p->next && p->next->x < z->x) - p = p->next; - // at this point, p->next->x is NOT < z->x - z->next = p->next; - p->next = z; - } - } - e++; - } - - // now process all active edges in non-zero fashion - if (active != NULL) - nsvg__fillActiveEdges(r->scanline, r->width, active, maxWeight, &xmin, &xmax, fillRule); - } - // Blit - if (xmin < 0) xmin = 0; - if (xmax > r->width-1) xmax = r->width-1; - if (xmin <= xmax) { - nsvg__scanlineSolid(&r->bitmap[y * r->stride] + xmin*4, xmax-xmin+1, &r->scanline[xmin], xmin, y, tx,ty, scale, cache); - } - } - -} - -static void nsvg__unpremultiplyAlpha(unsigned char* image, int w, int h, int stride) -{ - int x,y; - - // Unpremultiply - for (y = 0; y < h; y++) { - unsigned char *row = &image[y*stride]; - for (x = 0; x < w; x++) { - int r = row[0], g = row[1], b = row[2], a = row[3]; - if (a != 0) { - row[0] = (unsigned char)(r*255/a); - row[1] = (unsigned char)(g*255/a); - row[2] = (unsigned char)(b*255/a); - } - row += 4; - } - } - - // Defringe - for (y = 0; y < h; y++) { - unsigned char *row = &image[y*stride]; - for (x = 0; x < w; x++) { - int r = 0, g = 0, b = 0, a = row[3], n = 0; - if (a == 0) { - if (x-1 > 0 && row[-1] != 0) { - r += row[-4]; - g += row[-3]; - b += row[-2]; - n++; - } - if (x+1 < w && row[7] != 0) { - r += row[4]; - g += row[5]; - b += row[6]; - n++; - } - if (y-1 > 0 && row[-stride+3] != 0) { - r += row[-stride]; - g += row[-stride+1]; - b += row[-stride+2]; - n++; - } - if (y+1 < h && row[stride+3] != 0) { - r += row[stride]; - g += row[stride+1]; - b += row[stride+2]; - n++; - } - if (n > 0) { - row[0] = (unsigned char)(r/n); - row[1] = (unsigned char)(g/n); - row[2] = (unsigned char)(b/n); - } - } - row += 4; - } - } -} - - -static void nsvg__initPaint(NSVGcachedPaint* cache, NSVGpaint* paint, float opacity) -{ - int i, j; - NSVGgradient* grad; - - cache->type = paint->type; - - if (paint->type == NSVG_PAINT_COLOR) { - cache->colors[0] = nsvg__applyOpacity(paint->color, opacity); - return; - } - - grad = paint->gradient; - - cache->spread = grad->spread; - memcpy(cache->xform, grad->xform, sizeof(float)*6); - - if (grad->nstops == 0) { - for (i = 0; i < 256; i++) - cache->colors[i] = 0; - } if (grad->nstops == 1) { - for (i = 0; i < 256; i++) - cache->colors[i] = nsvg__applyOpacity(grad->stops[i].color, opacity); - } else { - unsigned int ca, cb = 0; - float ua, ub, du, u; - int ia, ib, count; - - ca = nsvg__applyOpacity(grad->stops[0].color, opacity); - ua = nsvg__clampf(grad->stops[0].offset, 0, 1); - ub = nsvg__clampf(grad->stops[grad->nstops-1].offset, ua, 1); - ia = (int)(ua * 255.0f); - ib = (int)(ub * 255.0f); - for (i = 0; i < ia; i++) { - cache->colors[i] = ca; - } - - for (i = 0; i < grad->nstops-1; i++) { - ca = nsvg__applyOpacity(grad->stops[i].color, opacity); - cb = nsvg__applyOpacity(grad->stops[i+1].color, opacity); - ua = nsvg__clampf(grad->stops[i].offset, 0, 1); - ub = nsvg__clampf(grad->stops[i+1].offset, 0, 1); - ia = (int)(ua * 255.0f); - ib = (int)(ub * 255.0f); - count = ib - ia; - if (count <= 0) continue; - u = 0; - du = 1.0f / (float)count; - for (j = 0; j < count; j++) { - cache->colors[ia+j] = nsvg__lerpRGBA(ca,cb,u); - u += du; - } - } - - for (i = ib; i < 256; i++) - cache->colors[i] = cb; - } - -} - -/* -static void dumpEdges(NSVGrasterizer* r, const char* name) -{ - float xmin = 0, xmax = 0, ymin = 0, ymax = 0; - NSVGedge *e = NULL; - int i; - if (r->nedges == 0) return; - FILE* fp = fopen(name, "w"); - if (fp == NULL) return; - - xmin = xmax = r->edges[0].x0; - ymin = ymax = r->edges[0].y0; - for (i = 0; i < r->nedges; i++) { - e = &r->edges[i]; - xmin = nsvg__minf(xmin, e->x0); - xmin = nsvg__minf(xmin, e->x1); - xmax = nsvg__maxf(xmax, e->x0); - xmax = nsvg__maxf(xmax, e->x1); - ymin = nsvg__minf(ymin, e->y0); - ymin = nsvg__minf(ymin, e->y1); - ymax = nsvg__maxf(ymax, e->y0); - ymax = nsvg__maxf(ymax, e->y1); - } - - fprintf(fp, "", xmin, ymin, (xmax - xmin), (ymax - ymin)); - - for (i = 0; i < r->nedges; i++) { - e = &r->edges[i]; - fprintf(fp ,"", e->x0,e->y0, e->x1,e->y1); - } - - for (i = 0; i < r->npoints; i++) { - if (i+1 < r->npoints) - fprintf(fp ,"", r->points[i].x, r->points[i].y, r->points[i+1].x, r->points[i+1].y); - fprintf(fp ,"", r->points[i].x, r->points[i].y, r->points[i].flags == 0 ? "#f00" : "#0f0"); - } - - fprintf(fp, ""); - fclose(fp); -} -*/ - -void nsvgRasterize(NSVGrasterizer* r, - NSVGimage* image, float tx, float ty, float scale, - unsigned char* dst, int w, int h, int stride) -{ - NSVGshape *shape = NULL; - NSVGedge *e = NULL; - NSVGcachedPaint cache; - int i; - - r->bitmap = dst; - r->width = w; - r->height = h; - r->stride = stride; - - if (w > r->cscanline) { - r->cscanline = w; - r->scanline = (unsigned char*)NVG_REALLOC(r->scanline, w); - if (r->scanline == NULL) return; - } - - for (i = 0; i < h; i++) - memset(&dst[i*stride], 0, w*4); - - for (shape = image->shapes; shape != NULL; shape = shape->next) { - if (!(shape->flags & NSVG_FLAGS_VISIBLE)) - continue; - - if (shape->fill.type != NSVG_PAINT_NONE) { - nsvg__resetPool(r); - r->freelist = NULL; - r->nedges = 0; - - nsvg__flattenShape(r, shape, scale); - - // Scale and translate edges - for (i = 0; i < r->nedges; i++) { - e = &r->edges[i]; - e->x0 = tx + e->x0; - e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES; - e->x1 = tx + e->x1; - e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES; - } - - // Rasterize edges - if (r->nedges != 0) - qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge); - - // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule - nsvg__initPaint(&cache, &shape->fill, shape->opacity); - - nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, shape->fillRule); - } - if (shape->stroke.type != NSVG_PAINT_NONE && (shape->strokeWidth * scale) > 0.01f) { - nsvg__resetPool(r); - r->freelist = NULL; - r->nedges = 0; - - nsvg__flattenShapeStroke(r, shape, scale); - -// dumpEdges(r, "edge.svg"); - - // Scale and translate edges - for (i = 0; i < r->nedges; i++) { - e = &r->edges[i]; - e->x0 = tx + e->x0; - e->y0 = (ty + e->y0) * NSVG__SUBSAMPLES; - e->x1 = tx + e->x1; - e->y1 = (ty + e->y1) * NSVG__SUBSAMPLES; - } - - // Rasterize edges - if (r->nedges != 0) - qsort(r->edges, r->nedges, sizeof(NSVGedge), nsvg__cmpEdge); - - // now, traverse the scanlines and find the intersections on each scanline, use non-zero rule - nsvg__initPaint(&cache, &shape->stroke, shape->opacity); - - nsvg__rasterizeSortedEdges(r, tx,ty,scale, &cache, NSVG_FILLRULE_NONZERO); - } - } - - nsvg__unpremultiplyAlpha(dst, w, h, stride); - - r->bitmap = NULL; - r->width = 0; - r->height = 0; - r->stride = 0; -} - -#endif // NANOSVGRAST_IMPLEMENTATION - -#endif // NANOSVGRAST_H diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg.c b/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg.c deleted file mode 100644 index f56cf904..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg.c +++ /dev/null @@ -1,2947 +0,0 @@ -// -// Copyright (c) 2013 Mikko Mononen memon@inside.org -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// - -#include -#include -#include -#include - -#include "nanovg.h" -#define FONTSTASH_IMPLEMENTATION -#include "fontstash.h" - -#ifndef NVG_NO_STB -//#define STB_IMAGE_IMPLEMENTATION -#include "lwjgl/stb/stb_image.h" -#endif - -#ifdef _MSC_VER -#pragma warning(disable: 4100) // unreferenced formal parameter -#pragma warning(disable: 4127) // conditional expression is constant -#pragma warning(disable: 4204) // nonstandard extension used : non-constant aggregate initializer -#pragma warning(disable: 4706) // assignment within conditional expression -#endif - -#define NVG_INIT_FONTIMAGE_SIZE 512 -#define NVG_MAX_FONTIMAGE_SIZE 2048 -#define NVG_MAX_FONTIMAGES 4 - -#define NVG_INIT_COMMANDS_SIZE 256 -#define NVG_INIT_POINTS_SIZE 128 -#define NVG_INIT_PATHS_SIZE 16 -#define NVG_INIT_VERTS_SIZE 256 - -#ifndef NVG_MAX_STATES -#define NVG_MAX_STATES 32 -#endif - -#define NVG_KAPPA90 0.5522847493f // Length proportional to radius of a cubic bezier handle for 90deg arcs. - -#define NVG_COUNTOF(arr) (sizeof(arr) / sizeof(0[arr])) - - -enum NVGcommands { - NVG_MOVETO = 0, - NVG_LINETO = 1, - NVG_BEZIERTO = 2, - NVG_CLOSE = 3, - NVG_WINDING = 4, -}; - -enum NVGpointFlags -{ - NVG_PT_CORNER = 0x01, - NVG_PT_LEFT = 0x02, - NVG_PT_BEVEL = 0x04, - NVG_PR_INNERBEVEL = 0x08, -}; - -struct NVGstate { - NVGcompositeOperationState compositeOperation; - int shapeAntiAlias; - NVGpaint fill; - NVGpaint stroke; - float strokeWidth; - float miterLimit; - int lineJoin; - int lineCap; - float alpha; - float xform[6]; - NVGscissor scissor; - float fontSize; - float letterSpacing; - float lineHeight; - float fontBlur; - int textAlign; - int fontId; -}; -typedef struct NVGstate NVGstate; - -struct NVGpoint { - float x,y; - float dx, dy; - float len; - float dmx, dmy; - unsigned char flags; -}; -typedef struct NVGpoint NVGpoint; - -struct NVGpathCache { - NVGpoint* points; - int npoints; - int cpoints; - NVGpath* paths; - int npaths; - int cpaths; - NVGvertex* verts; - int nverts; - int cverts; - float bounds[4]; -}; -typedef struct NVGpathCache NVGpathCache; - -struct NVGcontext { - NVGparams params; - float* commands; - int ccommands; - int ncommands; - float commandx, commandy; - NVGstate states[NVG_MAX_STATES]; - int nstates; - NVGpathCache* cache; - float tessTol; - float distTol; - float fringeWidth; - float devicePxRatio; - struct FONScontext* fs; - int fontImages[NVG_MAX_FONTIMAGES]; - int fontImageIdx; - int drawCallCount; - int fillTriCount; - int strokeTriCount; - int textTriCount; -}; - -static float nvg__sqrtf(float a) { return sqrtf(a); } -static float nvg__modf(float a, float b) { return fmodf(a, b); } -static float nvg__sinf(float a) { return sinf(a); } -static float nvg__cosf(float a) { return cosf(a); } -static float nvg__tanf(float a) { return tanf(a); } -static float nvg__atan2f(float a,float b) { return atan2f(a, b); } -static float nvg__acosf(float a) { return acosf(a); } - -static int nvg__mini(int a, int b) { return a < b ? a : b; } -static int nvg__maxi(int a, int b) { return a > b ? a : b; } -static int nvg__clampi(int a, int mn, int mx) { return a < mn ? mn : (a > mx ? mx : a); } -static float nvg__minf(float a, float b) { return a < b ? a : b; } -static float nvg__maxf(float a, float b) { return a > b ? a : b; } -static float nvg__absf(float a) { return a >= 0.0f ? a : -a; } -static float nvg__signf(float a) { return a >= 0.0f ? 1.0f : -1.0f; } -static float nvg__clampf(float a, float mn, float mx) { return a < mn ? mn : (a > mx ? mx : a); } -static float nvg__cross(float dx0, float dy0, float dx1, float dy1) { return dx1*dy0 - dx0*dy1; } - -static float nvg__normalize(float *x, float* y) -{ - float d = nvg__sqrtf((*x)*(*x) + (*y)*(*y)); - if (d > 1e-6f) { - float id = 1.0f / d; - *x *= id; - *y *= id; - } - return d; -} - - -static void nvg__deletePathCache(NVGpathCache* c) -{ - if (c == NULL) return; - if (c->points != NULL) NVG_FREE(c->points); - if (c->paths != NULL) NVG_FREE(c->paths); - if (c->verts != NULL) NVG_FREE(c->verts); - NVG_FREE(c); -} - -static NVGpathCache* nvg__allocPathCache(void) -{ - NVGpathCache* c = (NVGpathCache*)NVG_MALLOC(sizeof(NVGpathCache)); - if (c == NULL) goto error; - memset(c, 0, sizeof(NVGpathCache)); - - c->points = (NVGpoint*)NVG_MALLOC(sizeof(NVGpoint)*NVG_INIT_POINTS_SIZE); - if (!c->points) goto error; - c->npoints = 0; - c->cpoints = NVG_INIT_POINTS_SIZE; - - c->paths = (NVGpath*)NVG_MALLOC(sizeof(NVGpath)*NVG_INIT_PATHS_SIZE); - if (!c->paths) goto error; - c->npaths = 0; - c->cpaths = NVG_INIT_PATHS_SIZE; - - c->verts = (NVGvertex*)NVG_MALLOC(sizeof(NVGvertex)*NVG_INIT_VERTS_SIZE); - if (!c->verts) goto error; - c->nverts = 0; - c->cverts = NVG_INIT_VERTS_SIZE; - - return c; -error: - nvg__deletePathCache(c); - return NULL; -} - -static void nvg__setDevicePixelRatio(NVGcontext* ctx, float ratio) -{ - ctx->tessTol = 0.25f / ratio; - ctx->distTol = 0.01f / ratio; - ctx->fringeWidth = 1.0f / ratio; - ctx->devicePxRatio = ratio; -} - -static NVGcompositeOperationState nvg__compositeOperationState(int op) -{ - int sfactor, dfactor; - - if (op == NVG_SOURCE_OVER) - { - sfactor = NVG_ONE; - dfactor = NVG_ONE_MINUS_SRC_ALPHA; - } - else if (op == NVG_SOURCE_IN) - { - sfactor = NVG_DST_ALPHA; - dfactor = NVG_ZERO; - } - else if (op == NVG_SOURCE_OUT) - { - sfactor = NVG_ONE_MINUS_DST_ALPHA; - dfactor = NVG_ZERO; - } - else if (op == NVG_ATOP) - { - sfactor = NVG_DST_ALPHA; - dfactor = NVG_ONE_MINUS_SRC_ALPHA; - } - else if (op == NVG_DESTINATION_OVER) - { - sfactor = NVG_ONE_MINUS_DST_ALPHA; - dfactor = NVG_ONE; - } - else if (op == NVG_DESTINATION_IN) - { - sfactor = NVG_ZERO; - dfactor = NVG_SRC_ALPHA; - } - else if (op == NVG_DESTINATION_OUT) - { - sfactor = NVG_ZERO; - dfactor = NVG_ONE_MINUS_SRC_ALPHA; - } - else if (op == NVG_DESTINATION_ATOP) - { - sfactor = NVG_ONE_MINUS_DST_ALPHA; - dfactor = NVG_SRC_ALPHA; - } - else if (op == NVG_LIGHTER) - { - sfactor = NVG_ONE; - dfactor = NVG_ONE; - } - else if (op == NVG_COPY) - { - sfactor = NVG_ONE; - dfactor = NVG_ZERO; - } - else if (op == NVG_XOR) - { - sfactor = NVG_ONE_MINUS_DST_ALPHA; - dfactor = NVG_ONE_MINUS_SRC_ALPHA; - } - else - { - sfactor = NVG_ONE; - dfactor = NVG_ZERO; - } - - NVGcompositeOperationState state; - state.srcRGB = sfactor; - state.dstRGB = dfactor; - state.srcAlpha = sfactor; - state.dstAlpha = dfactor; - return state; -} - -static NVGstate* nvg__getState(NVGcontext* ctx) -{ - return &ctx->states[ctx->nstates-1]; -} - -NVGcontext* nvgCreateInternal(NVGparams* params) -{ - FONSparams fontParams; - NVGcontext* ctx = (NVGcontext*)NVG_MALLOC(sizeof(NVGcontext)); - int i; - if (ctx == NULL) goto error; - memset(ctx, 0, sizeof(NVGcontext)); - - ctx->params = *params; - for (i = 0; i < NVG_MAX_FONTIMAGES; i++) - ctx->fontImages[i] = 0; - - ctx->commands = (float*)NVG_MALLOC(sizeof(float)*NVG_INIT_COMMANDS_SIZE); - if (!ctx->commands) goto error; - ctx->ncommands = 0; - ctx->ccommands = NVG_INIT_COMMANDS_SIZE; - - ctx->cache = nvg__allocPathCache(); - if (ctx->cache == NULL) goto error; - - nvgSave(ctx); - nvgReset(ctx); - - nvg__setDevicePixelRatio(ctx, 1.0f); - - if (ctx->params.renderCreate(ctx->params.userPtr) == 0) goto error; - - // Init font rendering - memset(&fontParams, 0, sizeof(fontParams)); - fontParams.width = NVG_INIT_FONTIMAGE_SIZE; - fontParams.height = NVG_INIT_FONTIMAGE_SIZE; - fontParams.flags = FONS_ZERO_TOPLEFT; - fontParams.renderCreate = NULL; - fontParams.renderUpdate = NULL; - fontParams.renderDraw = NULL; - fontParams.renderDelete = NULL; - fontParams.userPtr = NULL; - ctx->fs = fonsCreateInternal(&fontParams); - if (ctx->fs == NULL) goto error; - - // Create font texture - ctx->fontImages[0] = ctx->params.renderCreateTexture(ctx->params.userPtr, NVG_TEXTURE_ALPHA, fontParams.width, fontParams.height, 0, NULL); - if (ctx->fontImages[0] == 0) goto error; - ctx->fontImageIdx = 0; - - return ctx; - -error: - nvgDeleteInternal(ctx); - return 0; -} - -NVGparams* nvgInternalParams(NVGcontext* ctx) -{ - return &ctx->params; -} - -void nvgDeleteInternal(NVGcontext* ctx) -{ - int i; - if (ctx == NULL) return; - if (ctx->commands != NULL) NVG_FREE(ctx->commands); - if (ctx->cache != NULL) nvg__deletePathCache(ctx->cache); - - if (ctx->fs) - fonsDeleteInternal(ctx->fs); - - for (i = 0; i < NVG_MAX_FONTIMAGES; i++) { - if (ctx->fontImages[i] != 0) { - nvgDeleteImage(ctx, ctx->fontImages[i]); - ctx->fontImages[i] = 0; - } - } - - if (ctx->params.renderDelete != NULL) - ctx->params.renderDelete(ctx->params.userPtr); - - NVG_FREE(ctx); -} - -void nvgBeginFrame(NVGcontext* ctx, float windowWidth, float windowHeight, float devicePixelRatio) -{ -/* printf("Tris: draws:%d fill:%d stroke:%d text:%d TOT:%d\n", - ctx->drawCallCount, ctx->fillTriCount, ctx->strokeTriCount, ctx->textTriCount, - ctx->fillTriCount+ctx->strokeTriCount+ctx->textTriCount);*/ - - ctx->nstates = 0; - nvgSave(ctx); - nvgReset(ctx); - - nvg__setDevicePixelRatio(ctx, devicePixelRatio); - - ctx->params.renderViewport(ctx->params.userPtr, windowWidth, windowHeight, devicePixelRatio); - - ctx->drawCallCount = 0; - ctx->fillTriCount = 0; - ctx->strokeTriCount = 0; - ctx->textTriCount = 0; -} - -void nvgCancelFrame(NVGcontext* ctx) -{ - ctx->params.renderCancel(ctx->params.userPtr); -} - -void nvgEndFrame(NVGcontext* ctx) -{ - ctx->params.renderFlush(ctx->params.userPtr); - if (ctx->fontImageIdx != 0) { - int fontImage = ctx->fontImages[ctx->fontImageIdx]; - ctx->fontImages[ctx->fontImageIdx] = 0; - int i, j, iw, ih; - // delete images that smaller than current one - if (fontImage == 0) - return; - nvgImageSize(ctx, fontImage, &iw, &ih); - for (i = j = 0; i < ctx->fontImageIdx; i++) { - if (ctx->fontImages[i] != 0) { - int nw, nh; - int image = ctx->fontImages[i]; - ctx->fontImages[i] = 0; - nvgImageSize(ctx, image, &nw, &nh); - if (nw < iw || nh < ih) - nvgDeleteImage(ctx, image); - else - ctx->fontImages[j++] = image; - } - } - // make current font image to first - ctx->fontImages[j] = ctx->fontImages[0]; - ctx->fontImages[0] = fontImage; - ctx->fontImageIdx = 0; - } -} - -NVGcolor nvgRGB(unsigned char r, unsigned char g, unsigned char b) -{ - return nvgRGBA(r,g,b,255); -} - -NVGcolor nvgRGBf(float r, float g, float b) -{ - return nvgRGBAf(r,g,b,1.0f); -} - -NVGcolor nvgRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a) -{ - NVGcolor color; - // Use longer initialization to suppress warning. - color.r = r / 255.0f; - color.g = g / 255.0f; - color.b = b / 255.0f; - color.a = a / 255.0f; - return color; -} - -NVGcolor nvgRGBAf(float r, float g, float b, float a) -{ - NVGcolor color; - // Use longer initialization to suppress warning. - color.r = r; - color.g = g; - color.b = b; - color.a = a; - return color; -} - -NVGcolor nvgTransRGBA(NVGcolor c, unsigned char a) -{ - c.a = a / 255.0f; - return c; -} - -NVGcolor nvgTransRGBAf(NVGcolor c, float a) -{ - c.a = a; - return c; -} - -NVGcolor nvgLerpRGBA(NVGcolor c0, NVGcolor c1, float u) -{ - int i; - float oneminu; - NVGcolor cint = {{{0}}}; - - u = nvg__clampf(u, 0.0f, 1.0f); - oneminu = 1.0f - u; - for( i = 0; i <4; i++ ) - { - cint.rgba[i] = c0.rgba[i] * oneminu + c1.rgba[i] * u; - } - - return cint; -} - -NVGcolor nvgHSL(float h, float s, float l) -{ - return nvgHSLA(h,s,l,255); -} - -static float nvg__hue(float h, float m1, float m2) -{ - if (h < 0) h += 1; - if (h > 1) h -= 1; - if (h < 1.0f/6.0f) - return m1 + (m2 - m1) * h * 6.0f; - else if (h < 3.0f/6.0f) - return m2; - else if (h < 4.0f/6.0f) - return m1 + (m2 - m1) * (2.0f/3.0f - h) * 6.0f; - return m1; -} - -NVGcolor nvgHSLA(float h, float s, float l, unsigned char a) -{ - float m1, m2; - NVGcolor col; - h = nvg__modf(h, 1.0f); - if (h < 0.0f) h += 1.0f; - s = nvg__clampf(s, 0.0f, 1.0f); - l = nvg__clampf(l, 0.0f, 1.0f); - m2 = l <= 0.5f ? (l * (1 + s)) : (l + s - l * s); - m1 = 2 * l - m2; - col.r = nvg__clampf(nvg__hue(h + 1.0f/3.0f, m1, m2), 0.0f, 1.0f); - col.g = nvg__clampf(nvg__hue(h, m1, m2), 0.0f, 1.0f); - col.b = nvg__clampf(nvg__hue(h - 1.0f/3.0f, m1, m2), 0.0f, 1.0f); - col.a = a/255.0f; - return col; -} - -void nvgTransformIdentity(float* t) -{ - t[0] = 1.0f; t[1] = 0.0f; - t[2] = 0.0f; t[3] = 1.0f; - t[4] = 0.0f; t[5] = 0.0f; -} - -void nvgTransformTranslate(float* t, float tx, float ty) -{ - t[0] = 1.0f; t[1] = 0.0f; - t[2] = 0.0f; t[3] = 1.0f; - t[4] = tx; t[5] = ty; -} - -void nvgTransformScale(float* t, float sx, float sy) -{ - t[0] = sx; t[1] = 0.0f; - t[2] = 0.0f; t[3] = sy; - t[4] = 0.0f; t[5] = 0.0f; -} - -void nvgTransformRotate(float* t, float a) -{ - float cs = nvg__cosf(a), sn = nvg__sinf(a); - t[0] = cs; t[1] = sn; - t[2] = -sn; t[3] = cs; - t[4] = 0.0f; t[5] = 0.0f; -} - -void nvgTransformSkewX(float* t, float a) -{ - t[0] = 1.0f; t[1] = 0.0f; - t[2] = nvg__tanf(a); t[3] = 1.0f; - t[4] = 0.0f; t[5] = 0.0f; -} - -void nvgTransformSkewY(float* t, float a) -{ - t[0] = 1.0f; t[1] = nvg__tanf(a); - t[2] = 0.0f; t[3] = 1.0f; - t[4] = 0.0f; t[5] = 0.0f; -} - -void nvgTransformMultiply(float* t, const float* s) -{ - float t0 = t[0] * s[0] + t[1] * s[2]; - float t2 = t[2] * s[0] + t[3] * s[2]; - float t4 = t[4] * s[0] + t[5] * s[2] + s[4]; - t[1] = t[0] * s[1] + t[1] * s[3]; - t[3] = t[2] * s[1] + t[3] * s[3]; - t[5] = t[4] * s[1] + t[5] * s[3] + s[5]; - t[0] = t0; - t[2] = t2; - t[4] = t4; -} - -void nvgTransformPremultiply(float* t, const float* s) -{ - float s2[6]; - memcpy(s2, s, sizeof(float)*6); - nvgTransformMultiply(s2, t); - memcpy(t, s2, sizeof(float)*6); -} - -int nvgTransformInverse(float* inv, const float* t) -{ - double invdet, det = (double)t[0] * t[3] - (double)t[2] * t[1]; - if (det > -1e-6 && det < 1e-6) { - nvgTransformIdentity(inv); - return 0; - } - invdet = 1.0 / det; - inv[0] = (float)(t[3] * invdet); - inv[2] = (float)(-t[2] * invdet); - inv[4] = (float)(((double)t[2] * t[5] - (double)t[3] * t[4]) * invdet); - inv[1] = (float)(-t[1] * invdet); - inv[3] = (float)(t[0] * invdet); - inv[5] = (float)(((double)t[1] * t[4] - (double)t[0] * t[5]) * invdet); - return 1; -} - -void nvgTransformPoint(float* dx, float* dy, const float* t, float sx, float sy) -{ - *dx = sx*t[0] + sy*t[2] + t[4]; - *dy = sx*t[1] + sy*t[3] + t[5]; -} - -float nvgDegToRad(float deg) -{ - return deg / 180.0f * NVG_PI; -} - -float nvgRadToDeg(float rad) -{ - return rad / NVG_PI * 180.0f; -} - -static void nvg__setPaintColor(NVGpaint* p, NVGcolor color) -{ - memset(p, 0, sizeof(*p)); - nvgTransformIdentity(p->xform); - p->radius = 0.0f; - p->feather = 1.0f; - p->innerColor = color; - p->outerColor = color; -} - - -// State handling -void nvgSave(NVGcontext* ctx) -{ - if (ctx->nstates >= NVG_MAX_STATES) - return; - if (ctx->nstates > 0) - memcpy(&ctx->states[ctx->nstates], &ctx->states[ctx->nstates-1], sizeof(NVGstate)); - ctx->nstates++; -} - -void nvgRestore(NVGcontext* ctx) -{ - if (ctx->nstates <= 1) - return; - ctx->nstates--; -} - -void nvgReset(NVGcontext* ctx) -{ - NVGstate* state = nvg__getState(ctx); - memset(state, 0, sizeof(*state)); - - nvg__setPaintColor(&state->fill, nvgRGBA(255,255,255,255)); - nvg__setPaintColor(&state->stroke, nvgRGBA(0,0,0,255)); - state->compositeOperation = nvg__compositeOperationState(NVG_SOURCE_OVER); - state->shapeAntiAlias = 1; - state->strokeWidth = 1.0f; - state->miterLimit = 10.0f; - state->lineCap = NVG_BUTT; - state->lineJoin = NVG_MITER; - state->alpha = 1.0f; - nvgTransformIdentity(state->xform); - - state->scissor.extent[0] = -1.0f; - state->scissor.extent[1] = -1.0f; - - state->fontSize = 16.0f; - state->letterSpacing = 0.0f; - state->lineHeight = 1.0f; - state->fontBlur = 0.0f; - state->textAlign = NVG_ALIGN_LEFT | NVG_ALIGN_BASELINE; - state->fontId = 0; -} - -// State setting -void nvgShapeAntiAlias(NVGcontext* ctx, int enabled) -{ - NVGstate* state = nvg__getState(ctx); - state->shapeAntiAlias = enabled; -} - -void nvgStrokeWidth(NVGcontext* ctx, float width) -{ - NVGstate* state = nvg__getState(ctx); - state->strokeWidth = width; -} - -void nvgMiterLimit(NVGcontext* ctx, float limit) -{ - NVGstate* state = nvg__getState(ctx); - state->miterLimit = limit; -} - -void nvgLineCap(NVGcontext* ctx, int cap) -{ - NVGstate* state = nvg__getState(ctx); - state->lineCap = cap; -} - -void nvgLineJoin(NVGcontext* ctx, int join) -{ - NVGstate* state = nvg__getState(ctx); - state->lineJoin = join; -} - -void nvgGlobalAlpha(NVGcontext* ctx, float alpha) -{ - NVGstate* state = nvg__getState(ctx); - state->alpha = alpha; -} - -void nvgTransform(NVGcontext* ctx, float a, float b, float c, float d, float e, float f) -{ - NVGstate* state = nvg__getState(ctx); - float t[6] = { a, b, c, d, e, f }; - nvgTransformPremultiply(state->xform, t); -} - -void nvgResetTransform(NVGcontext* ctx) -{ - NVGstate* state = nvg__getState(ctx); - nvgTransformIdentity(state->xform); -} - -void nvgTranslate(NVGcontext* ctx, float x, float y) -{ - NVGstate* state = nvg__getState(ctx); - float t[6]; - nvgTransformTranslate(t, x,y); - nvgTransformPremultiply(state->xform, t); -} - -void nvgRotate(NVGcontext* ctx, float angle) -{ - NVGstate* state = nvg__getState(ctx); - float t[6]; - nvgTransformRotate(t, angle); - nvgTransformPremultiply(state->xform, t); -} - -void nvgSkewX(NVGcontext* ctx, float angle) -{ - NVGstate* state = nvg__getState(ctx); - float t[6]; - nvgTransformSkewX(t, angle); - nvgTransformPremultiply(state->xform, t); -} - -void nvgSkewY(NVGcontext* ctx, float angle) -{ - NVGstate* state = nvg__getState(ctx); - float t[6]; - nvgTransformSkewY(t, angle); - nvgTransformPremultiply(state->xform, t); -} - -void nvgScale(NVGcontext* ctx, float x, float y) -{ - NVGstate* state = nvg__getState(ctx); - float t[6]; - nvgTransformScale(t, x,y); - nvgTransformPremultiply(state->xform, t); -} - -void nvgCurrentTransform(NVGcontext* ctx, float* xform) -{ - NVGstate* state = nvg__getState(ctx); - if (xform == NULL) return; - memcpy(xform, state->xform, sizeof(float)*6); -} - -void nvgStrokeColor(NVGcontext* ctx, NVGcolor color) -{ - NVGstate* state = nvg__getState(ctx); - nvg__setPaintColor(&state->stroke, color); -} - -void nvgStrokePaint(NVGcontext* ctx, NVGpaint paint) -{ - NVGstate* state = nvg__getState(ctx); - state->stroke = paint; - nvgTransformMultiply(state->stroke.xform, state->xform); -} - -void nvgFillColor(NVGcontext* ctx, NVGcolor color) -{ - NVGstate* state = nvg__getState(ctx); - nvg__setPaintColor(&state->fill, color); -} - -void nvgFillPaint(NVGcontext* ctx, NVGpaint paint) -{ - NVGstate* state = nvg__getState(ctx); - state->fill = paint; - nvgTransformMultiply(state->fill.xform, state->xform); -} - -#ifndef NVG_NO_STB -int nvgCreateImage(NVGcontext* ctx, const char* filename, int imageFlags) -{ - int w, h, n, image; - unsigned char* img; - stbi_set_unpremultiply_on_load(1); - stbi_convert_iphone_png_to_rgb(1); - img = stbi_load(filename, &w, &h, &n, 4); - if (img == NULL) { -// printf("Failed to load %s - %s\n", filename, stbi_failure_reason()); - return 0; - } - image = nvgCreateImageRGBA(ctx, w, h, imageFlags, img); - stbi_image_free(img); - return image; -} - -int nvgCreateImageMem(NVGcontext* ctx, int imageFlags, unsigned char* data, int ndata) -{ - int w, h, n, image; - unsigned char* img = stbi_load_from_memory(data, ndata, &w, &h, &n, 4); - if (img == NULL) { -// printf("Failed to load %s - %s\n", filename, stbi_failure_reason()); - return 0; - } - image = nvgCreateImageRGBA(ctx, w, h, imageFlags, img); - stbi_image_free(img); - return image; -} -#endif - -int nvgCreateImageRGBA(NVGcontext* ctx, int w, int h, int imageFlags, const unsigned char* data) -{ - return ctx->params.renderCreateTexture(ctx->params.userPtr, NVG_TEXTURE_RGBA, w, h, imageFlags, data); -} - -void nvgUpdateImage(NVGcontext* ctx, int image, const unsigned char* data) -{ - int w, h; - ctx->params.renderGetTextureSize(ctx->params.userPtr, image, &w, &h); - ctx->params.renderUpdateTexture(ctx->params.userPtr, image, 0,0, w,h, data); -} - -void nvgImageSize(NVGcontext* ctx, int image, int* w, int* h) -{ - ctx->params.renderGetTextureSize(ctx->params.userPtr, image, w, h); -} - -void nvgDeleteImage(NVGcontext* ctx, int image) -{ - ctx->params.renderDeleteTexture(ctx->params.userPtr, image); -} - -NVGpaint nvgLinearGradient(NVGcontext* ctx, - float sx, float sy, float ex, float ey, - NVGcolor icol, NVGcolor ocol) -{ - NVGpaint p; - float dx, dy, d; - const float large = 1e5; - NVG_NOTUSED(ctx); - memset(&p, 0, sizeof(p)); - - // Calculate transform aligned to the line - dx = ex - sx; - dy = ey - sy; - d = sqrtf(dx*dx + dy*dy); - if (d > 0.0001f) { - dx /= d; - dy /= d; - } else { - dx = 0; - dy = 1; - } - - p.xform[0] = dy; p.xform[1] = -dx; - p.xform[2] = dx; p.xform[3] = dy; - p.xform[4] = sx - dx*large; p.xform[5] = sy - dy*large; - - p.extent[0] = large; - p.extent[1] = large + d*0.5f; - - p.radius = 0.0f; - - p.feather = nvg__maxf(1.0f, d); - - p.innerColor = icol; - p.outerColor = ocol; - - return p; -} - -NVGpaint nvgRadialGradient(NVGcontext* ctx, - float cx, float cy, float inr, float outr, - NVGcolor icol, NVGcolor ocol) -{ - NVGpaint p; - float r = (inr+outr)*0.5f; - float f = (outr-inr); - NVG_NOTUSED(ctx); - memset(&p, 0, sizeof(p)); - - nvgTransformIdentity(p.xform); - p.xform[4] = cx; - p.xform[5] = cy; - - p.extent[0] = r; - p.extent[1] = r; - - p.radius = r; - - p.feather = nvg__maxf(1.0f, f); - - p.innerColor = icol; - p.outerColor = ocol; - - return p; -} - -NVGpaint nvgBoxGradient(NVGcontext* ctx, - float x, float y, float w, float h, float r, float f, - NVGcolor icol, NVGcolor ocol) -{ - NVGpaint p; - NVG_NOTUSED(ctx); - memset(&p, 0, sizeof(p)); - - nvgTransformIdentity(p.xform); - p.xform[4] = x+w*0.5f; - p.xform[5] = y+h*0.5f; - - p.extent[0] = w*0.5f; - p.extent[1] = h*0.5f; - - p.radius = r; - - p.feather = nvg__maxf(1.0f, f); - - p.innerColor = icol; - p.outerColor = ocol; - - return p; -} - - -NVGpaint nvgImagePattern(NVGcontext* ctx, - float cx, float cy, float w, float h, float angle, - int image, float alpha) -{ - NVGpaint p; - NVG_NOTUSED(ctx); - memset(&p, 0, sizeof(p)); - - nvgTransformRotate(p.xform, angle); - p.xform[4] = cx; - p.xform[5] = cy; - - p.extent[0] = w; - p.extent[1] = h; - - p.image = image; - - p.innerColor = p.outerColor = nvgRGBAf(1,1,1,alpha); - - return p; -} - -// Scissoring -void nvgScissor(NVGcontext* ctx, float x, float y, float w, float h) -{ - NVGstate* state = nvg__getState(ctx); - - w = nvg__maxf(0.0f, w); - h = nvg__maxf(0.0f, h); - - nvgTransformIdentity(state->scissor.xform); - state->scissor.xform[4] = x+w*0.5f; - state->scissor.xform[5] = y+h*0.5f; - nvgTransformMultiply(state->scissor.xform, state->xform); - - state->scissor.extent[0] = w*0.5f; - state->scissor.extent[1] = h*0.5f; -} - -static void nvg__isectRects(float* dst, - float ax, float ay, float aw, float ah, - float bx, float by, float bw, float bh) -{ - float minx = nvg__maxf(ax, bx); - float miny = nvg__maxf(ay, by); - float maxx = nvg__minf(ax+aw, bx+bw); - float maxy = nvg__minf(ay+ah, by+bh); - dst[0] = minx; - dst[1] = miny; - dst[2] = nvg__maxf(0.0f, maxx - minx); - dst[3] = nvg__maxf(0.0f, maxy - miny); -} - -void nvgIntersectScissor(NVGcontext* ctx, float x, float y, float w, float h) -{ - NVGstate* state = nvg__getState(ctx); - float pxform[6], invxorm[6]; - float rect[4]; - float ex, ey, tex, tey; - - // If no previous scissor has been set, set the scissor as current scissor. - if (state->scissor.extent[0] < 0) { - nvgScissor(ctx, x, y, w, h); - return; - } - - // Transform the current scissor rect into current transform space. - // If there is difference in rotation, this will be approximation. - memcpy(pxform, state->scissor.xform, sizeof(float)*6); - ex = state->scissor.extent[0]; - ey = state->scissor.extent[1]; - nvgTransformInverse(invxorm, state->xform); - nvgTransformMultiply(pxform, invxorm); - tex = ex*nvg__absf(pxform[0]) + ey*nvg__absf(pxform[2]); - tey = ex*nvg__absf(pxform[1]) + ey*nvg__absf(pxform[3]); - - // Intersect rects. - nvg__isectRects(rect, pxform[4]-tex,pxform[5]-tey,tex*2,tey*2, x,y,w,h); - - nvgScissor(ctx, rect[0], rect[1], rect[2], rect[3]); -} - -void nvgResetScissor(NVGcontext* ctx) -{ - NVGstate* state = nvg__getState(ctx); - memset(state->scissor.xform, 0, sizeof(state->scissor.xform)); - state->scissor.extent[0] = -1.0f; - state->scissor.extent[1] = -1.0f; -} - -// Global composite operation. -void nvgGlobalCompositeOperation(NVGcontext* ctx, int op) -{ - NVGstate* state = nvg__getState(ctx); - state->compositeOperation = nvg__compositeOperationState(op); -} - -void nvgGlobalCompositeBlendFunc(NVGcontext* ctx, int sfactor, int dfactor) -{ - nvgGlobalCompositeBlendFuncSeparate(ctx, sfactor, dfactor, sfactor, dfactor); -} - -void nvgGlobalCompositeBlendFuncSeparate(NVGcontext* ctx, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) -{ - NVGcompositeOperationState op; - op.srcRGB = srcRGB; - op.dstRGB = dstRGB; - op.srcAlpha = srcAlpha; - op.dstAlpha = dstAlpha; - - NVGstate* state = nvg__getState(ctx); - state->compositeOperation = op; -} - -static int nvg__ptEquals(float x1, float y1, float x2, float y2, float tol) -{ - float dx = x2 - x1; - float dy = y2 - y1; - return dx*dx + dy*dy < tol*tol; -} - -static float nvg__distPtSeg(float x, float y, float px, float py, float qx, float qy) -{ - float pqx, pqy, dx, dy, d, t; - pqx = qx-px; - pqy = qy-py; - dx = x-px; - dy = y-py; - d = pqx*pqx + pqy*pqy; - t = pqx*dx + pqy*dy; - if (d > 0) t /= d; - if (t < 0) t = 0; - else if (t > 1) t = 1; - dx = px + t*pqx - x; - dy = py + t*pqy - y; - return dx*dx + dy*dy; -} - -static void nvg__appendCommands(NVGcontext* ctx, float* vals, int nvals) -{ - NVGstate* state = nvg__getState(ctx); - int i; - - if (ctx->ncommands+nvals > ctx->ccommands) { - float* commands; - int ccommands = ctx->ncommands+nvals + ctx->ccommands/2; - commands = (float*)NVG_REALLOC(ctx->commands, sizeof(float)*ccommands); - if (commands == NULL) return; - ctx->commands = commands; - ctx->ccommands = ccommands; - } - - if ((int)vals[0] != NVG_CLOSE && (int)vals[0] != NVG_WINDING) { - ctx->commandx = vals[nvals-2]; - ctx->commandy = vals[nvals-1]; - } - - // transform commands - i = 0; - while (i < nvals) { - int cmd = (int)vals[i]; - switch (cmd) { - case NVG_MOVETO: - nvgTransformPoint(&vals[i+1],&vals[i+2], state->xform, vals[i+1],vals[i+2]); - i += 3; - break; - case NVG_LINETO: - nvgTransformPoint(&vals[i+1],&vals[i+2], state->xform, vals[i+1],vals[i+2]); - i += 3; - break; - case NVG_BEZIERTO: - nvgTransformPoint(&vals[i+1],&vals[i+2], state->xform, vals[i+1],vals[i+2]); - nvgTransformPoint(&vals[i+3],&vals[i+4], state->xform, vals[i+3],vals[i+4]); - nvgTransformPoint(&vals[i+5],&vals[i+6], state->xform, vals[i+5],vals[i+6]); - i += 7; - break; - case NVG_CLOSE: - i++; - break; - case NVG_WINDING: - i += 2; - break; - default: - i++; - } - } - - memcpy(&ctx->commands[ctx->ncommands], vals, nvals*sizeof(float)); - - ctx->ncommands += nvals; -} - - -static void nvg__clearPathCache(NVGcontext* ctx) -{ - ctx->cache->npoints = 0; - ctx->cache->npaths = 0; -} - -static NVGpath* nvg__lastPath(NVGcontext* ctx) -{ - if (ctx->cache->npaths > 0) - return &ctx->cache->paths[ctx->cache->npaths-1]; - return NULL; -} - -static void nvg__addPath(NVGcontext* ctx) -{ - NVGpath* path; - if (ctx->cache->npaths+1 > ctx->cache->cpaths) { - NVGpath* paths; - int cpaths = ctx->cache->npaths+1 + ctx->cache->cpaths/2; - paths = (NVGpath*)NVG_REALLOC(ctx->cache->paths, sizeof(NVGpath)*cpaths); - if (paths == NULL) return; - ctx->cache->paths = paths; - ctx->cache->cpaths = cpaths; - } - path = &ctx->cache->paths[ctx->cache->npaths]; - memset(path, 0, sizeof(*path)); - path->first = ctx->cache->npoints; - path->winding = NVG_CCW; - - ctx->cache->npaths++; -} - -static NVGpoint* nvg__lastPoint(NVGcontext* ctx) -{ - if (ctx->cache->npoints > 0) - return &ctx->cache->points[ctx->cache->npoints-1]; - return NULL; -} - -static void nvg__addPoint(NVGcontext* ctx, float x, float y, int flags) -{ - NVGpath* path = nvg__lastPath(ctx); - NVGpoint* pt; - if (path == NULL) return; - - if (path->count > 0 && ctx->cache->npoints > 0) { - pt = nvg__lastPoint(ctx); - if (nvg__ptEquals(pt->x,pt->y, x,y, ctx->distTol)) { - pt->flags |= flags; - return; - } - } - - if (ctx->cache->npoints+1 > ctx->cache->cpoints) { - NVGpoint* points; - int cpoints = ctx->cache->npoints+1 + ctx->cache->cpoints/2; - points = (NVGpoint*)NVG_REALLOC(ctx->cache->points, sizeof(NVGpoint)*cpoints); - if (points == NULL) return; - ctx->cache->points = points; - ctx->cache->cpoints = cpoints; - } - - pt = &ctx->cache->points[ctx->cache->npoints]; - memset(pt, 0, sizeof(*pt)); - pt->x = x; - pt->y = y; - pt->flags = (unsigned char)flags; - - ctx->cache->npoints++; - path->count++; -} - -static void nvg__closePath(NVGcontext* ctx) -{ - NVGpath* path = nvg__lastPath(ctx); - if (path == NULL) return; - path->closed = 1; -} - -static void nvg__pathWinding(NVGcontext* ctx, int winding) -{ - NVGpath* path = nvg__lastPath(ctx); - if (path == NULL) return; - path->winding = winding; -} - -static float nvg__getAverageScale(float *t) -{ - float sx = sqrtf(t[0]*t[0] + t[2]*t[2]); - float sy = sqrtf(t[1]*t[1] + t[3]*t[3]); - return (sx + sy) * 0.5f; -} - -static NVGvertex* nvg__allocTempVerts(NVGcontext* ctx, int nverts) -{ - if (nverts > ctx->cache->cverts) { - NVGvertex* verts; - int cverts = (nverts + 0xff) & ~0xff; // Round up to prevent allocations when things change just slightly. - verts = (NVGvertex*)NVG_REALLOC(ctx->cache->verts, sizeof(NVGvertex)*cverts); - if (verts == NULL) return NULL; - ctx->cache->verts = verts; - ctx->cache->cverts = cverts; - } - - return ctx->cache->verts; -} - -static float nvg__triarea2(float ax, float ay, float bx, float by, float cx, float cy) -{ - float abx = bx - ax; - float aby = by - ay; - float acx = cx - ax; - float acy = cy - ay; - return acx*aby - abx*acy; -} - -static float nvg__polyArea(NVGpoint* pts, int npts) -{ - int i; - float area = 0; - for (i = 2; i < npts; i++) { - NVGpoint* a = &pts[0]; - NVGpoint* b = &pts[i-1]; - NVGpoint* c = &pts[i]; - area += nvg__triarea2(a->x,a->y, b->x,b->y, c->x,c->y); - } - return area * 0.5f; -} - -static void nvg__polyReverse(NVGpoint* pts, int npts) -{ - NVGpoint tmp; - int i = 0, j = npts-1; - while (i < j) { - tmp = pts[i]; - pts[i] = pts[j]; - pts[j] = tmp; - i++; - j--; - } -} - - -static void nvg__vset(NVGvertex* vtx, float x, float y, float u, float v) -{ - vtx->x = x; - vtx->y = y; - vtx->u = u; - vtx->v = v; -} - -static void nvg__tesselateBezier(NVGcontext* ctx, - float x1, float y1, float x2, float y2, - float x3, float y3, float x4, float y4, - int level, int type) -{ - float x12,y12,x23,y23,x34,y34,x123,y123,x234,y234,x1234,y1234; - float dx,dy,d2,d3; - - if (level > 10) return; - - x12 = (x1+x2)*0.5f; - y12 = (y1+y2)*0.5f; - x23 = (x2+x3)*0.5f; - y23 = (y2+y3)*0.5f; - x34 = (x3+x4)*0.5f; - y34 = (y3+y4)*0.5f; - x123 = (x12+x23)*0.5f; - y123 = (y12+y23)*0.5f; - - dx = x4 - x1; - dy = y4 - y1; - d2 = nvg__absf(((x2 - x4) * dy - (y2 - y4) * dx)); - d3 = nvg__absf(((x3 - x4) * dy - (y3 - y4) * dx)); - - if ((d2 + d3)*(d2 + d3) < ctx->tessTol * (dx*dx + dy*dy)) { - nvg__addPoint(ctx, x4, y4, type); - return; - } - -/* if (nvg__absf(x1+x3-x2-x2) + nvg__absf(y1+y3-y2-y2) + nvg__absf(x2+x4-x3-x3) + nvg__absf(y2+y4-y3-y3) < ctx->tessTol) { - nvg__addPoint(ctx, x4, y4, type); - return; - }*/ - - x234 = (x23+x34)*0.5f; - y234 = (y23+y34)*0.5f; - x1234 = (x123+x234)*0.5f; - y1234 = (y123+y234)*0.5f; - - nvg__tesselateBezier(ctx, x1,y1, x12,y12, x123,y123, x1234,y1234, level+1, 0); - nvg__tesselateBezier(ctx, x1234,y1234, x234,y234, x34,y34, x4,y4, level+1, type); -} - -static void nvg__flattenPaths(NVGcontext* ctx) -{ - NVGpathCache* cache = ctx->cache; -// NVGstate* state = nvg__getState(ctx); - NVGpoint* last; - NVGpoint* p0; - NVGpoint* p1; - NVGpoint* pts; - NVGpath* path; - int i, j; - float* cp1; - float* cp2; - float* p; - float area; - - if (cache->npaths > 0) - return; - - // Flatten - i = 0; - while (i < ctx->ncommands) { - int cmd = (int)ctx->commands[i]; - switch (cmd) { - case NVG_MOVETO: - nvg__addPath(ctx); - p = &ctx->commands[i+1]; - nvg__addPoint(ctx, p[0], p[1], NVG_PT_CORNER); - i += 3; - break; - case NVG_LINETO: - p = &ctx->commands[i+1]; - nvg__addPoint(ctx, p[0], p[1], NVG_PT_CORNER); - i += 3; - break; - case NVG_BEZIERTO: - last = nvg__lastPoint(ctx); - if (last != NULL) { - cp1 = &ctx->commands[i+1]; - cp2 = &ctx->commands[i+3]; - p = &ctx->commands[i+5]; - nvg__tesselateBezier(ctx, last->x,last->y, cp1[0],cp1[1], cp2[0],cp2[1], p[0],p[1], 0, NVG_PT_CORNER); - } - i += 7; - break; - case NVG_CLOSE: - nvg__closePath(ctx); - i++; - break; - case NVG_WINDING: - nvg__pathWinding(ctx, (int)ctx->commands[i+1]); - i += 2; - break; - default: - i++; - } - } - - cache->bounds[0] = cache->bounds[1] = 1e6f; - cache->bounds[2] = cache->bounds[3] = -1e6f; - - // Calculate the direction and length of line segments. - for (j = 0; j < cache->npaths; j++) { - path = &cache->paths[j]; - pts = &cache->points[path->first]; - - // If the first and last points are the same, remove the last, mark as closed path. - p0 = &pts[path->count-1]; - p1 = &pts[0]; - if (nvg__ptEquals(p0->x,p0->y, p1->x,p1->y, ctx->distTol)) { - path->count--; - p0 = &pts[path->count-1]; - path->closed = 1; - } - - // Enforce winding. - if (path->count > 2) { - area = nvg__polyArea(pts, path->count); - if (path->winding == NVG_CCW && area < 0.0f) - nvg__polyReverse(pts, path->count); - if (path->winding == NVG_CW && area > 0.0f) - nvg__polyReverse(pts, path->count); - } - - for(i = 0; i < path->count; i++) { - // Calculate segment direction and length - p0->dx = p1->x - p0->x; - p0->dy = p1->y - p0->y; - p0->len = nvg__normalize(&p0->dx, &p0->dy); - // Update bounds - cache->bounds[0] = nvg__minf(cache->bounds[0], p0->x); - cache->bounds[1] = nvg__minf(cache->bounds[1], p0->y); - cache->bounds[2] = nvg__maxf(cache->bounds[2], p0->x); - cache->bounds[3] = nvg__maxf(cache->bounds[3], p0->y); - // Advance - p0 = p1++; - } - } -} - -static int nvg__curveDivs(float r, float arc, float tol) -{ - float da = acosf(r / (r + tol)) * 2.0f; - return nvg__maxi(2, (int)ceilf(arc / da)); -} - -static void nvg__chooseBevel(int bevel, NVGpoint* p0, NVGpoint* p1, float w, - float* x0, float* y0, float* x1, float* y1) -{ - if (bevel) { - *x0 = p1->x + p0->dy * w; - *y0 = p1->y - p0->dx * w; - *x1 = p1->x + p1->dy * w; - *y1 = p1->y - p1->dx * w; - } else { - *x0 = p1->x + p1->dmx * w; - *y0 = p1->y + p1->dmy * w; - *x1 = p1->x + p1->dmx * w; - *y1 = p1->y + p1->dmy * w; - } -} - -static NVGvertex* nvg__roundJoin(NVGvertex* dst, NVGpoint* p0, NVGpoint* p1, - float lw, float rw, float lu, float ru, int ncap, - float fringe) -{ - int i, n; - float dlx0 = p0->dy; - float dly0 = -p0->dx; - float dlx1 = p1->dy; - float dly1 = -p1->dx; - NVG_NOTUSED(fringe); - - if (p1->flags & NVG_PT_LEFT) { - float lx0,ly0,lx1,ly1,a0,a1; - nvg__chooseBevel(p1->flags & NVG_PR_INNERBEVEL, p0, p1, lw, &lx0,&ly0, &lx1,&ly1); - a0 = atan2f(-dly0, -dlx0); - a1 = atan2f(-dly1, -dlx1); - if (a1 > a0) a1 -= NVG_PI*2; - - nvg__vset(dst, lx0, ly0, lu,1); dst++; - nvg__vset(dst, p1->x - dlx0*rw, p1->y - dly0*rw, ru,1); dst++; - - n = nvg__clampi((int)ceilf(((a0 - a1) / NVG_PI) * ncap), 2, ncap); - for (i = 0; i < n; i++) { - float u = i/(float)(n-1); - float a = a0 + u*(a1-a0); - float rx = p1->x + cosf(a) * rw; - float ry = p1->y + sinf(a) * rw; - nvg__vset(dst, p1->x, p1->y, 0.5f,1); dst++; - nvg__vset(dst, rx, ry, ru,1); dst++; - } - - nvg__vset(dst, lx1, ly1, lu,1); dst++; - nvg__vset(dst, p1->x - dlx1*rw, p1->y - dly1*rw, ru,1); dst++; - - } else { - float rx0,ry0,rx1,ry1,a0,a1; - nvg__chooseBevel(p1->flags & NVG_PR_INNERBEVEL, p0, p1, -rw, &rx0,&ry0, &rx1,&ry1); - a0 = atan2f(dly0, dlx0); - a1 = atan2f(dly1, dlx1); - if (a1 < a0) a1 += NVG_PI*2; - - nvg__vset(dst, p1->x + dlx0*rw, p1->y + dly0*rw, lu,1); dst++; - nvg__vset(dst, rx0, ry0, ru,1); dst++; - - n = nvg__clampi((int)ceilf(((a1 - a0) / NVG_PI) * ncap), 2, ncap); - for (i = 0; i < n; i++) { - float u = i/(float)(n-1); - float a = a0 + u*(a1-a0); - float lx = p1->x + cosf(a) * lw; - float ly = p1->y + sinf(a) * lw; - nvg__vset(dst, lx, ly, lu,1); dst++; - nvg__vset(dst, p1->x, p1->y, 0.5f,1); dst++; - } - - nvg__vset(dst, p1->x + dlx1*rw, p1->y + dly1*rw, lu,1); dst++; - nvg__vset(dst, rx1, ry1, ru,1); dst++; - - } - return dst; -} - -static NVGvertex* nvg__bevelJoin(NVGvertex* dst, NVGpoint* p0, NVGpoint* p1, - float lw, float rw, float lu, float ru, float fringe) -{ - float rx0,ry0,rx1,ry1; - float lx0,ly0,lx1,ly1; - float dlx0 = p0->dy; - float dly0 = -p0->dx; - float dlx1 = p1->dy; - float dly1 = -p1->dx; - NVG_NOTUSED(fringe); - - if (p1->flags & NVG_PT_LEFT) { - nvg__chooseBevel(p1->flags & NVG_PR_INNERBEVEL, p0, p1, lw, &lx0,&ly0, &lx1,&ly1); - - nvg__vset(dst, lx0, ly0, lu,1); dst++; - nvg__vset(dst, p1->x - dlx0*rw, p1->y - dly0*rw, ru,1); dst++; - - if (p1->flags & NVG_PT_BEVEL) { - nvg__vset(dst, lx0, ly0, lu,1); dst++; - nvg__vset(dst, p1->x - dlx0*rw, p1->y - dly0*rw, ru,1); dst++; - - nvg__vset(dst, lx1, ly1, lu,1); dst++; - nvg__vset(dst, p1->x - dlx1*rw, p1->y - dly1*rw, ru,1); dst++; - } else { - rx0 = p1->x - p1->dmx * rw; - ry0 = p1->y - p1->dmy * rw; - - nvg__vset(dst, p1->x, p1->y, 0.5f,1); dst++; - nvg__vset(dst, p1->x - dlx0*rw, p1->y - dly0*rw, ru,1); dst++; - - nvg__vset(dst, rx0, ry0, ru,1); dst++; - nvg__vset(dst, rx0, ry0, ru,1); dst++; - - nvg__vset(dst, p1->x, p1->y, 0.5f,1); dst++; - nvg__vset(dst, p1->x - dlx1*rw, p1->y - dly1*rw, ru,1); dst++; - } - - nvg__vset(dst, lx1, ly1, lu,1); dst++; - nvg__vset(dst, p1->x - dlx1*rw, p1->y - dly1*rw, ru,1); dst++; - - } else { - nvg__chooseBevel(p1->flags & NVG_PR_INNERBEVEL, p0, p1, -rw, &rx0,&ry0, &rx1,&ry1); - - nvg__vset(dst, p1->x + dlx0*lw, p1->y + dly0*lw, lu,1); dst++; - nvg__vset(dst, rx0, ry0, ru,1); dst++; - - if (p1->flags & NVG_PT_BEVEL) { - nvg__vset(dst, p1->x + dlx0*lw, p1->y + dly0*lw, lu,1); dst++; - nvg__vset(dst, rx0, ry0, ru,1); dst++; - - nvg__vset(dst, p1->x + dlx1*lw, p1->y + dly1*lw, lu,1); dst++; - nvg__vset(dst, rx1, ry1, ru,1); dst++; - } else { - lx0 = p1->x + p1->dmx * lw; - ly0 = p1->y + p1->dmy * lw; - - nvg__vset(dst, p1->x + dlx0*lw, p1->y + dly0*lw, lu,1); dst++; - nvg__vset(dst, p1->x, p1->y, 0.5f,1); dst++; - - nvg__vset(dst, lx0, ly0, lu,1); dst++; - nvg__vset(dst, lx0, ly0, lu,1); dst++; - - nvg__vset(dst, p1->x + dlx1*lw, p1->y + dly1*lw, lu,1); dst++; - nvg__vset(dst, p1->x, p1->y, 0.5f,1); dst++; - } - - nvg__vset(dst, p1->x + dlx1*lw, p1->y + dly1*lw, lu,1); dst++; - nvg__vset(dst, rx1, ry1, ru,1); dst++; - } - - return dst; -} - -static NVGvertex* nvg__buttCapStart(NVGvertex* dst, NVGpoint* p, - float dx, float dy, float w, float d, - float aa, float u0, float u1) -{ - float px = p->x - dx*d; - float py = p->y - dy*d; - float dlx = dy; - float dly = -dx; - nvg__vset(dst, px + dlx*w - dx*aa, py + dly*w - dy*aa, u0,0); dst++; - nvg__vset(dst, px - dlx*w - dx*aa, py - dly*w - dy*aa, u1,0); dst++; - nvg__vset(dst, px + dlx*w, py + dly*w, u0,1); dst++; - nvg__vset(dst, px - dlx*w, py - dly*w, u1,1); dst++; - return dst; -} - -static NVGvertex* nvg__buttCapEnd(NVGvertex* dst, NVGpoint* p, - float dx, float dy, float w, float d, - float aa, float u0, float u1) -{ - float px = p->x + dx*d; - float py = p->y + dy*d; - float dlx = dy; - float dly = -dx; - nvg__vset(dst, px + dlx*w, py + dly*w, u0,1); dst++; - nvg__vset(dst, px - dlx*w, py - dly*w, u1,1); dst++; - nvg__vset(dst, px + dlx*w + dx*aa, py + dly*w + dy*aa, u0,0); dst++; - nvg__vset(dst, px - dlx*w + dx*aa, py - dly*w + dy*aa, u1,0); dst++; - return dst; -} - - -static NVGvertex* nvg__roundCapStart(NVGvertex* dst, NVGpoint* p, - float dx, float dy, float w, int ncap, - float aa, float u0, float u1) -{ - int i; - float px = p->x; - float py = p->y; - float dlx = dy; - float dly = -dx; - NVG_NOTUSED(aa); - for (i = 0; i < ncap; i++) { - float a = i/(float)(ncap-1)*NVG_PI; - float ax = cosf(a) * w, ay = sinf(a) * w; - nvg__vset(dst, px - dlx*ax - dx*ay, py - dly*ax - dy*ay, u0,1); dst++; - nvg__vset(dst, px, py, 0.5f,1); dst++; - } - nvg__vset(dst, px + dlx*w, py + dly*w, u0,1); dst++; - nvg__vset(dst, px - dlx*w, py - dly*w, u1,1); dst++; - return dst; -} - -static NVGvertex* nvg__roundCapEnd(NVGvertex* dst, NVGpoint* p, - float dx, float dy, float w, int ncap, - float aa, float u0, float u1) -{ - int i; - float px = p->x; - float py = p->y; - float dlx = dy; - float dly = -dx; - NVG_NOTUSED(aa); - nvg__vset(dst, px + dlx*w, py + dly*w, u0,1); dst++; - nvg__vset(dst, px - dlx*w, py - dly*w, u1,1); dst++; - for (i = 0; i < ncap; i++) { - float a = i/(float)(ncap-1)*NVG_PI; - float ax = cosf(a) * w, ay = sinf(a) * w; - nvg__vset(dst, px, py, 0.5f,1); dst++; - nvg__vset(dst, px - dlx*ax + dx*ay, py - dly*ax + dy*ay, u0,1); dst++; - } - return dst; -} - - -static void nvg__calculateJoins(NVGcontext* ctx, float w, int lineJoin, float miterLimit) -{ - NVGpathCache* cache = ctx->cache; - int i, j; - float iw = 0.0f; - - if (w > 0.0f) iw = 1.0f / w; - - // Calculate which joins needs extra vertices to append, and gather vertex count. - for (i = 0; i < cache->npaths; i++) { - NVGpath* path = &cache->paths[i]; - NVGpoint* pts = &cache->points[path->first]; - NVGpoint* p0 = &pts[path->count-1]; - NVGpoint* p1 = &pts[0]; - int nleft = 0; - - path->nbevel = 0; - - for (j = 0; j < path->count; j++) { - float dlx0, dly0, dlx1, dly1, dmr2, cross, limit; - dlx0 = p0->dy; - dly0 = -p0->dx; - dlx1 = p1->dy; - dly1 = -p1->dx; - // Calculate extrusions - p1->dmx = (dlx0 + dlx1) * 0.5f; - p1->dmy = (dly0 + dly1) * 0.5f; - dmr2 = p1->dmx*p1->dmx + p1->dmy*p1->dmy; - if (dmr2 > 0.000001f) { - float scale = 1.0f / dmr2; - if (scale > 600.0f) { - scale = 600.0f; - } - p1->dmx *= scale; - p1->dmy *= scale; - } - - // Clear flags, but keep the corner. - p1->flags = (p1->flags & NVG_PT_CORNER) ? NVG_PT_CORNER : 0; - - // Keep track of left turns. - cross = p1->dx * p0->dy - p0->dx * p1->dy; - if (cross > 0.0f) { - nleft++; - p1->flags |= NVG_PT_LEFT; - } - - // Calculate if we should use bevel or miter for inner join. - limit = nvg__maxf(1.01f, nvg__minf(p0->len, p1->len) * iw); - if ((dmr2 * limit*limit) < 1.0f) - p1->flags |= NVG_PR_INNERBEVEL; - - // Check to see if the corner needs to be beveled. - if (p1->flags & NVG_PT_CORNER) { - if ((dmr2 * miterLimit*miterLimit) < 1.0f || lineJoin == NVG_BEVEL || lineJoin == NVG_ROUND) { - p1->flags |= NVG_PT_BEVEL; - } - } - - if ((p1->flags & (NVG_PT_BEVEL | NVG_PR_INNERBEVEL)) != 0) - path->nbevel++; - - p0 = p1++; - } - - path->convex = (nleft == path->count) ? 1 : 0; - } -} - - -static int nvg__expandStroke(NVGcontext* ctx, float w, float fringe, int lineCap, int lineJoin, float miterLimit) -{ - NVGpathCache* cache = ctx->cache; - NVGvertex* verts; - NVGvertex* dst; - int cverts, i, j; - float aa = fringe;//ctx->fringeWidth; - float u0 = 0.0f, u1 = 1.0f; - int ncap = nvg__curveDivs(w, NVG_PI, ctx->tessTol); // Calculate divisions per half circle. - - w += aa * 0.5f; - - // Disable the gradient used for antialiasing when antialiasing is not used. - if (aa == 0.0f) { - u0 = 0.5f; - u1 = 0.5f; - } - - nvg__calculateJoins(ctx, w, lineJoin, miterLimit); - - // Calculate max vertex usage. - cverts = 0; - for (i = 0; i < cache->npaths; i++) { - NVGpath* path = &cache->paths[i]; - int loop = (path->closed == 0) ? 0 : 1; - if (lineJoin == NVG_ROUND) - cverts += (path->count + path->nbevel*(ncap+2) + 1) * 2; // plus one for loop - else - cverts += (path->count + path->nbevel*5 + 1) * 2; // plus one for loop - if (loop == 0) { - // space for caps - if (lineCap == NVG_ROUND) { - cverts += (ncap*2 + 2)*2; - } else { - cverts += (3+3)*2; - } - } - } - - verts = nvg__allocTempVerts(ctx, cverts); - if (verts == NULL) return 0; - - for (i = 0; i < cache->npaths; i++) { - NVGpath* path = &cache->paths[i]; - NVGpoint* pts = &cache->points[path->first]; - NVGpoint* p0; - NVGpoint* p1; - int s, e, loop; - float dx, dy; - - path->fill = 0; - path->nfill = 0; - - // Calculate fringe or stroke - loop = (path->closed == 0) ? 0 : 1; - dst = verts; - path->stroke = dst; - - if (loop) { - // Looping - p0 = &pts[path->count-1]; - p1 = &pts[0]; - s = 0; - e = path->count; - } else { - // Add cap - p0 = &pts[0]; - p1 = &pts[1]; - s = 1; - e = path->count-1; - } - - if (loop == 0) { - // Add cap - dx = p1->x - p0->x; - dy = p1->y - p0->y; - nvg__normalize(&dx, &dy); - if (lineCap == NVG_BUTT) - dst = nvg__buttCapStart(dst, p0, dx, dy, w, -aa*0.5f, aa, u0, u1); - else if (lineCap == NVG_BUTT || lineCap == NVG_SQUARE) - dst = nvg__buttCapStart(dst, p0, dx, dy, w, w-aa, aa, u0, u1); - else if (lineCap == NVG_ROUND) - dst = nvg__roundCapStart(dst, p0, dx, dy, w, ncap, aa, u0, u1); - } - - for (j = s; j < e; ++j) { - if ((p1->flags & (NVG_PT_BEVEL | NVG_PR_INNERBEVEL)) != 0) { - if (lineJoin == NVG_ROUND) { - dst = nvg__roundJoin(dst, p0, p1, w, w, u0, u1, ncap, aa); - } else { - dst = nvg__bevelJoin(dst, p0, p1, w, w, u0, u1, aa); - } - } else { - nvg__vset(dst, p1->x + (p1->dmx * w), p1->y + (p1->dmy * w), u0,1); dst++; - nvg__vset(dst, p1->x - (p1->dmx * w), p1->y - (p1->dmy * w), u1,1); dst++; - } - p0 = p1++; - } - - if (loop) { - // Loop it - nvg__vset(dst, verts[0].x, verts[0].y, u0,1); dst++; - nvg__vset(dst, verts[1].x, verts[1].y, u1,1); dst++; - } else { - // Add cap - dx = p1->x - p0->x; - dy = p1->y - p0->y; - nvg__normalize(&dx, &dy); - if (lineCap == NVG_BUTT) - dst = nvg__buttCapEnd(dst, p1, dx, dy, w, -aa*0.5f, aa, u0, u1); - else if (lineCap == NVG_BUTT || lineCap == NVG_SQUARE) - dst = nvg__buttCapEnd(dst, p1, dx, dy, w, w-aa, aa, u0, u1); - else if (lineCap == NVG_ROUND) - dst = nvg__roundCapEnd(dst, p1, dx, dy, w, ncap, aa, u0, u1); - } - - path->nstroke = (int)(dst - verts); - - verts = dst; - } - - return 1; -} - -static int nvg__expandFill(NVGcontext* ctx, float w, int lineJoin, float miterLimit) -{ - NVGpathCache* cache = ctx->cache; - NVGvertex* verts; - NVGvertex* dst; - int cverts, convex, i, j; - float aa = ctx->fringeWidth; - int fringe = w > 0.0f; - - nvg__calculateJoins(ctx, w, lineJoin, miterLimit); - - // Calculate max vertex usage. - cverts = 0; - for (i = 0; i < cache->npaths; i++) { - NVGpath* path = &cache->paths[i]; - cverts += path->count + path->nbevel + 1; - if (fringe) - cverts += (path->count + path->nbevel*5 + 1) * 2; // plus one for loop - } - - verts = nvg__allocTempVerts(ctx, cverts); - if (verts == NULL) return 0; - - convex = cache->npaths == 1 && cache->paths[0].convex; - - for (i = 0; i < cache->npaths; i++) { - NVGpath* path = &cache->paths[i]; - NVGpoint* pts = &cache->points[path->first]; - NVGpoint* p0; - NVGpoint* p1; - float rw, lw, woff; - float ru, lu; - - // Calculate shape vertices. - woff = 0.5f*aa; - dst = verts; - path->fill = dst; - - if (fringe) { - // Looping - p0 = &pts[path->count-1]; - p1 = &pts[0]; - for (j = 0; j < path->count; ++j) { - if (p1->flags & NVG_PT_BEVEL) { - float dlx0 = p0->dy; - float dly0 = -p0->dx; - float dlx1 = p1->dy; - float dly1 = -p1->dx; - if (p1->flags & NVG_PT_LEFT) { - float lx = p1->x + p1->dmx * woff; - float ly = p1->y + p1->dmy * woff; - nvg__vset(dst, lx, ly, 0.5f,1); dst++; - } else { - float lx0 = p1->x + dlx0 * woff; - float ly0 = p1->y + dly0 * woff; - float lx1 = p1->x + dlx1 * woff; - float ly1 = p1->y + dly1 * woff; - nvg__vset(dst, lx0, ly0, 0.5f,1); dst++; - nvg__vset(dst, lx1, ly1, 0.5f,1); dst++; - } - } else { - nvg__vset(dst, p1->x + (p1->dmx * woff), p1->y + (p1->dmy * woff), 0.5f,1); dst++; - } - p0 = p1++; - } - } else { - for (j = 0; j < path->count; ++j) { - nvg__vset(dst, pts[j].x, pts[j].y, 0.5f,1); - dst++; - } - } - - path->nfill = (int)(dst - verts); - verts = dst; - - // Calculate fringe - if (fringe) { - lw = w + woff; - rw = w - woff; - lu = 0; - ru = 1; - dst = verts; - path->stroke = dst; - - // Create only half a fringe for convex shapes so that - // the shape can be rendered without stenciling. - if (convex) { - lw = woff; // This should generate the same vertex as fill inset above. - lu = 0.5f; // Set outline fade at middle. - } - - // Looping - p0 = &pts[path->count-1]; - p1 = &pts[0]; - - for (j = 0; j < path->count; ++j) { - if ((p1->flags & (NVG_PT_BEVEL | NVG_PR_INNERBEVEL)) != 0) { - dst = nvg__bevelJoin(dst, p0, p1, lw, rw, lu, ru, ctx->fringeWidth); - } else { - nvg__vset(dst, p1->x + (p1->dmx * lw), p1->y + (p1->dmy * lw), lu,1); dst++; - nvg__vset(dst, p1->x - (p1->dmx * rw), p1->y - (p1->dmy * rw), ru,1); dst++; - } - p0 = p1++; - } - - // Loop it - nvg__vset(dst, verts[0].x, verts[0].y, lu,1); dst++; - nvg__vset(dst, verts[1].x, verts[1].y, ru,1); dst++; - - path->nstroke = (int)(dst - verts); - verts = dst; - } else { - path->stroke = NULL; - path->nstroke = 0; - } - } - - return 1; -} - - -// Draw -void nvgBeginPath(NVGcontext* ctx) -{ - ctx->ncommands = 0; - nvg__clearPathCache(ctx); -} - -void nvgMoveTo(NVGcontext* ctx, float x, float y) -{ - float vals[] = { NVG_MOVETO, x, y }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgLineTo(NVGcontext* ctx, float x, float y) -{ - float vals[] = { NVG_LINETO, x, y }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgBezierTo(NVGcontext* ctx, float c1x, float c1y, float c2x, float c2y, float x, float y) -{ - float vals[] = { NVG_BEZIERTO, c1x, c1y, c2x, c2y, x, y }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgQuadTo(NVGcontext* ctx, float cx, float cy, float x, float y) -{ - float x0 = ctx->commandx; - float y0 = ctx->commandy; - float vals[] = { NVG_BEZIERTO, - x0 + 2.0f/3.0f*(cx - x0), y0 + 2.0f/3.0f*(cy - y0), - x + 2.0f/3.0f*(cx - x), y + 2.0f/3.0f*(cy - y), - x, y }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgArcTo(NVGcontext* ctx, float x1, float y1, float x2, float y2, float radius) -{ - float x0 = ctx->commandx; - float y0 = ctx->commandy; - float dx0,dy0, dx1,dy1, a, d, cx,cy, a0,a1; - int dir; - - if (ctx->ncommands == 0) { - return; - } - - // Handle degenerate cases. - if (nvg__ptEquals(x0,y0, x1,y1, ctx->distTol) || - nvg__ptEquals(x1,y1, x2,y2, ctx->distTol) || - nvg__distPtSeg(x1,y1, x0,y0, x2,y2) < ctx->distTol*ctx->distTol || - radius < ctx->distTol) { - nvgLineTo(ctx, x1,y1); - return; - } - - // Calculate tangential circle to lines (x0,y0)-(x1,y1) and (x1,y1)-(x2,y2). - dx0 = x0-x1; - dy0 = y0-y1; - dx1 = x2-x1; - dy1 = y2-y1; - nvg__normalize(&dx0,&dy0); - nvg__normalize(&dx1,&dy1); - a = nvg__acosf(dx0*dx1 + dy0*dy1); - d = radius / nvg__tanf(a/2.0f); - -// printf("a=%f° d=%f\n", a/NVG_PI*180.0f, d); - - if (d > 10000.0f) { - nvgLineTo(ctx, x1,y1); - return; - } - - if (nvg__cross(dx0,dy0, dx1,dy1) > 0.0f) { - cx = x1 + dx0*d + dy0*radius; - cy = y1 + dy0*d + -dx0*radius; - a0 = nvg__atan2f(dx0, -dy0); - a1 = nvg__atan2f(-dx1, dy1); - dir = NVG_CW; -// printf("CW c=(%f, %f) a0=%f° a1=%f°\n", cx, cy, a0/NVG_PI*180.0f, a1/NVG_PI*180.0f); - } else { - cx = x1 + dx0*d + -dy0*radius; - cy = y1 + dy0*d + dx0*radius; - a0 = nvg__atan2f(-dx0, dy0); - a1 = nvg__atan2f(dx1, -dy1); - dir = NVG_CCW; -// printf("CCW c=(%f, %f) a0=%f° a1=%f°\n", cx, cy, a0/NVG_PI*180.0f, a1/NVG_PI*180.0f); - } - - nvgArc(ctx, cx, cy, radius, a0, a1, dir); -} - -void nvgClosePath(NVGcontext* ctx) -{ - float vals[] = { NVG_CLOSE }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgPathWinding(NVGcontext* ctx, int dir) -{ - float vals[] = { NVG_WINDING, (float)dir }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgArc(NVGcontext* ctx, float cx, float cy, float r, float a0, float a1, int dir) -{ - float a = 0, da = 0, hda = 0, kappa = 0; - float dx = 0, dy = 0, x = 0, y = 0, tanx = 0, tany = 0; - float px = 0, py = 0, ptanx = 0, ptany = 0; - float vals[3 + 5*7 + 100]; - int i, ndivs, nvals; - int move = ctx->ncommands > 0 ? NVG_LINETO : NVG_MOVETO; - - // Clamp angles - da = a1 - a0; - if (dir == NVG_CW) { - if (nvg__absf(da) >= NVG_PI*2) { - da = NVG_PI*2; - } else { - while (da < 0.0f) da += NVG_PI*2; - } - } else { - if (nvg__absf(da) >= NVG_PI*2) { - da = -NVG_PI*2; - } else { - while (da > 0.0f) da -= NVG_PI*2; - } - } - - // Split arc into max 90 degree segments. - ndivs = nvg__maxi(1, nvg__mini((int)(nvg__absf(da) / (NVG_PI*0.5f) + 0.5f), 5)); - hda = (da / (float)ndivs) / 2.0f; - kappa = nvg__absf(4.0f / 3.0f * (1.0f - nvg__cosf(hda)) / nvg__sinf(hda)); - - if (dir == NVG_CCW) - kappa = -kappa; - - nvals = 0; - for (i = 0; i <= ndivs; i++) { - a = a0 + da * (i/(float)ndivs); - dx = nvg__cosf(a); - dy = nvg__sinf(a); - x = cx + dx*r; - y = cy + dy*r; - tanx = -dy*r*kappa; - tany = dx*r*kappa; - - if (i == 0) { - vals[nvals++] = (float)move; - vals[nvals++] = x; - vals[nvals++] = y; - } else { - vals[nvals++] = NVG_BEZIERTO; - vals[nvals++] = px+ptanx; - vals[nvals++] = py+ptany; - vals[nvals++] = x-tanx; - vals[nvals++] = y-tany; - vals[nvals++] = x; - vals[nvals++] = y; - } - px = x; - py = y; - ptanx = tanx; - ptany = tany; - } - - nvg__appendCommands(ctx, vals, nvals); -} - -void nvgRect(NVGcontext* ctx, float x, float y, float w, float h) -{ - float vals[] = { - NVG_MOVETO, x,y, - NVG_LINETO, x,y+h, - NVG_LINETO, x+w,y+h, - NVG_LINETO, x+w,y, - NVG_CLOSE - }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgRoundedRect(NVGcontext* ctx, float x, float y, float w, float h, float r) -{ - nvgRoundedRectVarying(ctx, x, y, w, h, r, r, r, r); -} - -void nvgRoundedRectVarying(NVGcontext* ctx, float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft) -{ - if(radTopLeft < 0.1f && radTopRight < 0.1f && radBottomRight < 0.1f && radBottomLeft < 0.1f) { - nvgRect(ctx, x, y, w, h); - return; - } else { - float halfw = nvg__absf(w)*0.5f; - float halfh = nvg__absf(h)*0.5f; - float rxBL = nvg__minf(radBottomLeft, halfw) * nvg__signf(w), ryBL = nvg__minf(radBottomLeft, halfh) * nvg__signf(h); - float rxBR = nvg__minf(radBottomRight, halfw) * nvg__signf(w), ryBR = nvg__minf(radBottomRight, halfh) * nvg__signf(h); - float rxTR = nvg__minf(radTopRight, halfw) * nvg__signf(w), ryTR = nvg__minf(radTopRight, halfh) * nvg__signf(h); - float rxTL = nvg__minf(radTopLeft, halfw) * nvg__signf(w), ryTL = nvg__minf(radTopLeft, halfh) * nvg__signf(h); - float vals[] = { - NVG_MOVETO, x, y + ryTL, - NVG_LINETO, x, y + h - ryBL, - NVG_BEZIERTO, x, y + h - ryBL*(1 - NVG_KAPPA90), x + rxBL*(1 - NVG_KAPPA90), y + h, x + rxBL, y + h, - NVG_LINETO, x + w - rxBR, y + h, - NVG_BEZIERTO, x + w - rxBR*(1 - NVG_KAPPA90), y + h, x + w, y + h - ryBR*(1 - NVG_KAPPA90), x + w, y + h - ryBR, - NVG_LINETO, x + w, y + ryTR, - NVG_BEZIERTO, x + w, y + ryTR*(1 - NVG_KAPPA90), x + w - rxTR*(1 - NVG_KAPPA90), y, x + w - rxTR, y, - NVG_LINETO, x + rxTL, y, - NVG_BEZIERTO, x + rxTL*(1 - NVG_KAPPA90), y, x, y + ryTL*(1 - NVG_KAPPA90), x, y + ryTL, - NVG_CLOSE - }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); - } -} - -void nvgEllipse(NVGcontext* ctx, float cx, float cy, float rx, float ry) -{ - float vals[] = { - NVG_MOVETO, cx-rx, cy, - NVG_BEZIERTO, cx-rx, cy+ry*NVG_KAPPA90, cx-rx*NVG_KAPPA90, cy+ry, cx, cy+ry, - NVG_BEZIERTO, cx+rx*NVG_KAPPA90, cy+ry, cx+rx, cy+ry*NVG_KAPPA90, cx+rx, cy, - NVG_BEZIERTO, cx+rx, cy-ry*NVG_KAPPA90, cx+rx*NVG_KAPPA90, cy-ry, cx, cy-ry, - NVG_BEZIERTO, cx-rx*NVG_KAPPA90, cy-ry, cx-rx, cy-ry*NVG_KAPPA90, cx-rx, cy, - NVG_CLOSE - }; - nvg__appendCommands(ctx, vals, NVG_COUNTOF(vals)); -} - -void nvgCircle(NVGcontext* ctx, float cx, float cy, float r) -{ - nvgEllipse(ctx, cx,cy, r,r); -} - -void nvgDebugDumpPathCache(NVGcontext* ctx) -{ - const NVGpath* path; - int i, j; - - printf("Dumping %d cached paths\n", ctx->cache->npaths); - for (i = 0; i < ctx->cache->npaths; i++) { - path = &ctx->cache->paths[i]; - printf(" - Path %d\n", i); - if (path->nfill) { - printf(" - fill: %d\n", path->nfill); - for (j = 0; j < path->nfill; j++) - printf("%f\t%f\n", path->fill[j].x, path->fill[j].y); - } - if (path->nstroke) { - printf(" - stroke: %d\n", path->nstroke); - for (j = 0; j < path->nstroke; j++) - printf("%f\t%f\n", path->stroke[j].x, path->stroke[j].y); - } - } -} - -void nvgFill(NVGcontext* ctx) -{ - NVGstate* state = nvg__getState(ctx); - const NVGpath* path; - NVGpaint fillPaint = state->fill; - int i; - - nvg__flattenPaths(ctx); - if (ctx->params.edgeAntiAlias && state->shapeAntiAlias) - nvg__expandFill(ctx, ctx->fringeWidth, NVG_MITER, 2.4f); - else - nvg__expandFill(ctx, 0.0f, NVG_MITER, 2.4f); - - // Apply global alpha - fillPaint.innerColor.a *= state->alpha; - fillPaint.outerColor.a *= state->alpha; - - ctx->params.renderFill(ctx->params.userPtr, &fillPaint, state->compositeOperation, &state->scissor, ctx->fringeWidth, - ctx->cache->bounds, ctx->cache->paths, ctx->cache->npaths); - - // Count triangles - for (i = 0; i < ctx->cache->npaths; i++) { - path = &ctx->cache->paths[i]; - ctx->fillTriCount += path->nfill-2; - ctx->fillTriCount += path->nstroke-2; - ctx->drawCallCount += 2; - } -} - -void nvgStroke(NVGcontext* ctx) -{ - NVGstate* state = nvg__getState(ctx); - float scale = nvg__getAverageScale(state->xform); - float strokeWidth = nvg__clampf(state->strokeWidth * scale, 0.0f, 200.0f); - NVGpaint strokePaint = state->stroke; - const NVGpath* path; - int i; - - - if (strokeWidth < ctx->fringeWidth) { - // If the stroke width is less than pixel size, use alpha to emulate coverage. - // Since coverage is area, scale by alpha*alpha. - float alpha = nvg__clampf(strokeWidth / ctx->fringeWidth, 0.0f, 1.0f); - strokePaint.innerColor.a *= alpha*alpha; - strokePaint.outerColor.a *= alpha*alpha; - strokeWidth = ctx->fringeWidth; - } - - // Apply global alpha - strokePaint.innerColor.a *= state->alpha; - strokePaint.outerColor.a *= state->alpha; - - nvg__flattenPaths(ctx); - - if (ctx->params.edgeAntiAlias && state->shapeAntiAlias) - nvg__expandStroke(ctx, strokeWidth*0.5f, ctx->fringeWidth, state->lineCap, state->lineJoin, state->miterLimit); - else - nvg__expandStroke(ctx, strokeWidth*0.5f, 0.0f, state->lineCap, state->lineJoin, state->miterLimit); - - ctx->params.renderStroke(ctx->params.userPtr, &strokePaint, state->compositeOperation, &state->scissor, ctx->fringeWidth, - strokeWidth, ctx->cache->paths, ctx->cache->npaths); - - // Count triangles - for (i = 0; i < ctx->cache->npaths; i++) { - path = &ctx->cache->paths[i]; - ctx->strokeTriCount += path->nstroke-2; - ctx->drawCallCount++; - } -} - -// Add fonts -int nvgCreateFont(NVGcontext* ctx, const char* name, const char* filename) -{ - return fonsAddFont(ctx->fs, name, filename, 0); -} - -int nvgCreateFontAtIndex(NVGcontext* ctx, const char* name, const char* filename, const int fontIndex) -{ - return fonsAddFont(ctx->fs, name, filename, fontIndex); -} - -int nvgCreateFontMem(NVGcontext* ctx, const char* name, unsigned char* data, int ndata, int freeData) -{ - return fonsAddFontMem(ctx->fs, name, data, ndata, freeData, 0); -} - -int nvgCreateFontMemAtIndex(NVGcontext* ctx, const char* name, unsigned char* data, int ndata, int freeData, const int fontIndex) -{ - return fonsAddFontMem(ctx->fs, name, data, ndata, freeData, fontIndex); -} - -int nvgFindFont(NVGcontext* ctx, const char* name) -{ - if (name == NULL) return -1; - return fonsGetFontByName(ctx->fs, name); -} - - -int nvgAddFallbackFontId(NVGcontext* ctx, int baseFont, int fallbackFont) -{ - if(baseFont == -1 || fallbackFont == -1) return 0; - return fonsAddFallbackFont(ctx->fs, baseFont, fallbackFont); -} - -int nvgAddFallbackFont(NVGcontext* ctx, const char* baseFont, const char* fallbackFont) -{ - return nvgAddFallbackFontId(ctx, nvgFindFont(ctx, baseFont), nvgFindFont(ctx, fallbackFont)); -} - -void nvgResetFallbackFontsId(NVGcontext* ctx, int baseFont) -{ - fonsResetFallbackFont(ctx->fs, baseFont); -} - -void nvgResetFallbackFonts(NVGcontext* ctx, const char* baseFont) -{ - nvgResetFallbackFontsId(ctx, nvgFindFont(ctx, baseFont)); -} - -// State setting -void nvgFontSize(NVGcontext* ctx, float size) -{ - NVGstate* state = nvg__getState(ctx); - state->fontSize = size; -} - -void nvgFontBlur(NVGcontext* ctx, float blur) -{ - NVGstate* state = nvg__getState(ctx); - state->fontBlur = blur; -} - -void nvgTextLetterSpacing(NVGcontext* ctx, float spacing) -{ - NVGstate* state = nvg__getState(ctx); - state->letterSpacing = spacing; -} - -void nvgTextLineHeight(NVGcontext* ctx, float lineHeight) -{ - NVGstate* state = nvg__getState(ctx); - state->lineHeight = lineHeight; -} - -void nvgTextAlign(NVGcontext* ctx, int align) -{ - NVGstate* state = nvg__getState(ctx); - state->textAlign = align; -} - -void nvgFontFaceId(NVGcontext* ctx, int font) -{ - NVGstate* state = nvg__getState(ctx); - state->fontId = font; -} - -void nvgFontFace(NVGcontext* ctx, const char* font) -{ - NVGstate* state = nvg__getState(ctx); - state->fontId = fonsGetFontByName(ctx->fs, font); -} - -static float nvg__quantize(float a, float d) -{ - return ((int)(a / d + 0.5f)) * d; -} - -static float nvg__getFontScale(NVGstate* state) -{ - return nvg__minf(nvg__quantize(nvg__getAverageScale(state->xform), 0.01f), 4.0f); -} - -static void nvg__flushTextTexture(NVGcontext* ctx) -{ - int dirty[4]; - - if (fonsValidateTexture(ctx->fs, dirty)) { - int fontImage = ctx->fontImages[ctx->fontImageIdx]; - // Update texture - if (fontImage != 0) { - int iw, ih; - const unsigned char* data = fonsGetTextureData(ctx->fs, &iw, &ih); - int x = dirty[0]; - int y = dirty[1]; - int w = dirty[2] - dirty[0]; - int h = dirty[3] - dirty[1]; - ctx->params.renderUpdateTexture(ctx->params.userPtr, fontImage, x,y, w,h, data); - } - } -} - -static int nvg__allocTextAtlas(NVGcontext* ctx) -{ - int iw, ih; - nvg__flushTextTexture(ctx); - if (ctx->fontImageIdx >= NVG_MAX_FONTIMAGES-1) - return 0; - // if next fontImage already have a texture - if (ctx->fontImages[ctx->fontImageIdx+1] != 0) - nvgImageSize(ctx, ctx->fontImages[ctx->fontImageIdx+1], &iw, &ih); - else { // calculate the new font image size and create it. - nvgImageSize(ctx, ctx->fontImages[ctx->fontImageIdx], &iw, &ih); - if (iw > ih) - ih *= 2; - else - iw *= 2; - if (iw > NVG_MAX_FONTIMAGE_SIZE || ih > NVG_MAX_FONTIMAGE_SIZE) - iw = ih = NVG_MAX_FONTIMAGE_SIZE; - ctx->fontImages[ctx->fontImageIdx+1] = ctx->params.renderCreateTexture(ctx->params.userPtr, NVG_TEXTURE_ALPHA, iw, ih, 0, NULL); - } - ++ctx->fontImageIdx; - fonsResetAtlas(ctx->fs, iw, ih); - return 1; -} - -static void nvg__renderText(NVGcontext* ctx, NVGvertex* verts, int nverts) -{ - NVGstate* state = nvg__getState(ctx); - NVGpaint paint = state->fill; - - // Render triangles. - paint.image = ctx->fontImages[ctx->fontImageIdx]; - - // Apply global alpha - paint.innerColor.a *= state->alpha; - paint.outerColor.a *= state->alpha; - - ctx->params.renderTriangles(ctx->params.userPtr, &paint, state->compositeOperation, &state->scissor, verts, nverts, ctx->fringeWidth); - - ctx->drawCallCount++; - ctx->textTriCount += nverts/3; -} - -static int nvg__isTransformFlipped(const float *xform) -{ - float det = xform[0] * xform[3] - xform[2] * xform[1]; - return( det < 0); -} - -float nvgText(NVGcontext* ctx, float x, float y, const char* string, const char* end) -{ - NVGstate* state = nvg__getState(ctx); - FONStextIter iter, prevIter; - FONSquad q; - NVGvertex* verts; - float scale = nvg__getFontScale(state) * ctx->devicePxRatio; - float invscale = 1.0f / scale; - int cverts = 0; - int nverts = 0; - int isFlipped = nvg__isTransformFlipped(state->xform); - - if (end == NULL) - end = string + strlen(string); - - if (state->fontId == FONS_INVALID) return x; - - fonsSetSize(ctx->fs, state->fontSize*scale); - fonsSetSpacing(ctx->fs, state->letterSpacing*scale); - fonsSetBlur(ctx->fs, state->fontBlur*scale); - fonsSetAlign(ctx->fs, state->textAlign); - fonsSetFont(ctx->fs, state->fontId); - - cverts = nvg__maxi(2, (int)(end - string)) * 6; // conservative estimate. - verts = nvg__allocTempVerts(ctx, cverts); - if (verts == NULL) return x; - - fonsTextIterInit(ctx->fs, &iter, x*scale, y*scale, string, end, FONS_GLYPH_BITMAP_REQUIRED); - prevIter = iter; - while (fonsTextIterNext(ctx->fs, &iter, &q)) { - float c[4*2]; - if (iter.prevGlyphIndex == -1) { // can not retrieve glyph? - if (nverts != 0) { - nvg__renderText(ctx, verts, nverts); - nverts = 0; - } - if (!nvg__allocTextAtlas(ctx)) - break; // no memory :( - iter = prevIter; - fonsTextIterNext(ctx->fs, &iter, &q); // try again - if (iter.prevGlyphIndex == -1) // still can not find glyph? - break; - } - prevIter = iter; - if(isFlipped) { - float tmp; - - tmp = q.y0; q.y0 = q.y1; q.y1 = tmp; - tmp = q.t0; q.t0 = q.t1; q.t1 = tmp; - } - // Transform corners. - nvgTransformPoint(&c[0],&c[1], state->xform, q.x0*invscale, q.y0*invscale); - nvgTransformPoint(&c[2],&c[3], state->xform, q.x1*invscale, q.y0*invscale); - nvgTransformPoint(&c[4],&c[5], state->xform, q.x1*invscale, q.y1*invscale); - nvgTransformPoint(&c[6],&c[7], state->xform, q.x0*invscale, q.y1*invscale); - // Create triangles - if (nverts+6 <= cverts) { - nvg__vset(&verts[nverts], c[0], c[1], q.s0, q.t0); nverts++; - nvg__vset(&verts[nverts], c[4], c[5], q.s1, q.t1); nverts++; - nvg__vset(&verts[nverts], c[2], c[3], q.s1, q.t0); nverts++; - nvg__vset(&verts[nverts], c[0], c[1], q.s0, q.t0); nverts++; - nvg__vset(&verts[nverts], c[6], c[7], q.s0, q.t1); nverts++; - nvg__vset(&verts[nverts], c[4], c[5], q.s1, q.t1); nverts++; - } - } - - // TODO: add back-end bit to do this just once per frame. - nvg__flushTextTexture(ctx); - - nvg__renderText(ctx, verts, nverts); - - return iter.nextx / scale; -} - -void nvgTextBox(NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end) -{ - NVGstate* state = nvg__getState(ctx); - NVGtextRow rows[2]; - int nrows = 0, i; - int oldAlign = state->textAlign; - int haling = state->textAlign & (NVG_ALIGN_LEFT | NVG_ALIGN_CENTER | NVG_ALIGN_RIGHT); - int valign = state->textAlign & (NVG_ALIGN_TOP | NVG_ALIGN_MIDDLE | NVG_ALIGN_BOTTOM | NVG_ALIGN_BASELINE); - float lineh = 0; - - if (state->fontId == FONS_INVALID) return; - - nvgTextMetrics(ctx, NULL, NULL, &lineh); - - state->textAlign = NVG_ALIGN_LEFT | valign; - - while ((nrows = nvgTextBreakLines(ctx, string, end, breakRowWidth, rows, 2))) { - for (i = 0; i < nrows; i++) { - NVGtextRow* row = &rows[i]; - if (haling & NVG_ALIGN_LEFT) - nvgText(ctx, x, y, row->start, row->end); - else if (haling & NVG_ALIGN_CENTER) - nvgText(ctx, x + breakRowWidth*0.5f - row->width*0.5f, y, row->start, row->end); - else if (haling & NVG_ALIGN_RIGHT) - nvgText(ctx, x + breakRowWidth - row->width, y, row->start, row->end); - y += lineh * state->lineHeight; - } - string = rows[nrows-1].next; - } - - state->textAlign = oldAlign; -} - -int nvgTextGlyphPositions(NVGcontext* ctx, float x, float y, const char* string, const char* end, NVGglyphPosition* positions, int maxPositions) -{ - NVGstate* state = nvg__getState(ctx); - float scale = nvg__getFontScale(state) * ctx->devicePxRatio; - float invscale = 1.0f / scale; - FONStextIter iter, prevIter; - FONSquad q; - int npos = 0; - - if (state->fontId == FONS_INVALID) return 0; - - if (end == NULL) - end = string + strlen(string); - - if (string == end) - return 0; - - fonsSetSize(ctx->fs, state->fontSize*scale); - fonsSetSpacing(ctx->fs, state->letterSpacing*scale); - fonsSetBlur(ctx->fs, state->fontBlur*scale); - fonsSetAlign(ctx->fs, state->textAlign); - fonsSetFont(ctx->fs, state->fontId); - - fonsTextIterInit(ctx->fs, &iter, x*scale, y*scale, string, end, FONS_GLYPH_BITMAP_OPTIONAL); - prevIter = iter; - while (fonsTextIterNext(ctx->fs, &iter, &q)) { - if (iter.prevGlyphIndex < 0 && nvg__allocTextAtlas(ctx)) { // can not retrieve glyph? - iter = prevIter; - fonsTextIterNext(ctx->fs, &iter, &q); // try again - } - prevIter = iter; - positions[npos].str = iter.str; - positions[npos].x = iter.x * invscale; - positions[npos].minx = nvg__minf(iter.x, q.x0) * invscale; - positions[npos].maxx = nvg__maxf(iter.nextx, q.x1) * invscale; - npos++; - if (npos >= maxPositions) - break; - } - - return npos; -} - -enum NVGcodepointType { - NVG_SPACE, - NVG_NEWLINE, - NVG_CHAR, - NVG_CJK_CHAR, -}; - -int nvgTextBreakLines(NVGcontext* ctx, const char* string, const char* end, float breakRowWidth, NVGtextRow* rows, int maxRows) -{ - NVGstate* state = nvg__getState(ctx); - float scale = nvg__getFontScale(state) * ctx->devicePxRatio; - float invscale = 1.0f / scale; - FONStextIter iter, prevIter; - FONSquad q; - int nrows = 0; - float rowStartX = 0; - float rowWidth = 0; - float rowMinX = 0; - float rowMaxX = 0; - const char* rowStart = NULL; - const char* rowEnd = NULL; - const char* wordStart = NULL; - float wordStartX = 0; - float wordMinX = 0; - const char* breakEnd = NULL; - float breakWidth = 0; - float breakMaxX = 0; - int type = NVG_SPACE, ptype = NVG_SPACE; - unsigned int pcodepoint = 0; - - if (maxRows == 0) return 0; - if (state->fontId == FONS_INVALID) return 0; - - if (end == NULL) - end = string + strlen(string); - - if (string == end) return 0; - - fonsSetSize(ctx->fs, state->fontSize*scale); - fonsSetSpacing(ctx->fs, state->letterSpacing*scale); - fonsSetBlur(ctx->fs, state->fontBlur*scale); - fonsSetAlign(ctx->fs, state->textAlign); - fonsSetFont(ctx->fs, state->fontId); - - breakRowWidth *= scale; - - fonsTextIterInit(ctx->fs, &iter, 0, 0, string, end, FONS_GLYPH_BITMAP_OPTIONAL); - prevIter = iter; - while (fonsTextIterNext(ctx->fs, &iter, &q)) { - if (iter.prevGlyphIndex < 0 && nvg__allocTextAtlas(ctx)) { // can not retrieve glyph? - iter = prevIter; - fonsTextIterNext(ctx->fs, &iter, &q); // try again - } - prevIter = iter; - switch (iter.codepoint) { - case 9: // \t - case 11: // \v - case 12: // \f - case 32: // space - case 0x00a0: // NBSP - type = NVG_SPACE; - break; - case 10: // \n - type = pcodepoint == 13 ? NVG_SPACE : NVG_NEWLINE; - break; - case 13: // \r - type = pcodepoint == 10 ? NVG_SPACE : NVG_NEWLINE; - break; - case 0x0085: // NEL - type = NVG_NEWLINE; - break; - default: - if ((iter.codepoint >= 0x4E00 && iter.codepoint <= 0x9FFF) || - (iter.codepoint >= 0x3000 && iter.codepoint <= 0x30FF) || - (iter.codepoint >= 0xFF00 && iter.codepoint <= 0xFFEF) || - (iter.codepoint >= 0x1100 && iter.codepoint <= 0x11FF) || - (iter.codepoint >= 0x3130 && iter.codepoint <= 0x318F) || - (iter.codepoint >= 0xAC00 && iter.codepoint <= 0xD7AF)) - type = NVG_CJK_CHAR; - else - type = NVG_CHAR; - break; - } - - if (type == NVG_NEWLINE) { - // Always handle new lines. - rows[nrows].start = rowStart != NULL ? rowStart : iter.str; - rows[nrows].end = rowEnd != NULL ? rowEnd : iter.str; - rows[nrows].width = rowWidth * invscale; - rows[nrows].minx = rowMinX * invscale; - rows[nrows].maxx = rowMaxX * invscale; - rows[nrows].next = iter.next; - nrows++; - if (nrows >= maxRows) - return nrows; - // Set null break point - breakEnd = rowStart; - breakWidth = 0.0; - breakMaxX = 0.0; - // Indicate to skip the white space at the beginning of the row. - rowStart = NULL; - rowEnd = NULL; - rowWidth = 0; - rowMinX = rowMaxX = 0; - } else { - if (rowStart == NULL) { - // Skip white space until the beginning of the line - if (type == NVG_CHAR || type == NVG_CJK_CHAR) { - // The current char is the row so far - rowStartX = iter.x; - rowStart = iter.str; - rowEnd = iter.next; - rowWidth = iter.nextx - rowStartX; - rowMinX = q.x0 - rowStartX; - rowMaxX = q.x1 - rowStartX; - wordStart = iter.str; - wordStartX = iter.x; - wordMinX = q.x0 - rowStartX; - // Set null break point - breakEnd = rowStart; - breakWidth = 0.0; - breakMaxX = 0.0; - } - } else { - float nextWidth = iter.nextx - rowStartX; - - // track last non-white space character - if (type == NVG_CHAR || type == NVG_CJK_CHAR) { - rowEnd = iter.next; - rowWidth = iter.nextx - rowStartX; - rowMaxX = q.x1 - rowStartX; - } - // track last end of a word - if (((ptype == NVG_CHAR || ptype == NVG_CJK_CHAR) && type == NVG_SPACE) || type == NVG_CJK_CHAR) { - breakEnd = iter.str; - breakWidth = rowWidth; - breakMaxX = rowMaxX; - } - // track last beginning of a word - if ((ptype == NVG_SPACE && (type == NVG_CHAR || type == NVG_CJK_CHAR)) || type == NVG_CJK_CHAR) { - wordStart = iter.str; - wordStartX = iter.x; - wordMinX = q.x0; - } - - // Break to new line when a character is beyond break width. - if ((type == NVG_CHAR || type == NVG_CJK_CHAR) && nextWidth > breakRowWidth) { - // The run length is too long, need to break to new line. - if (breakEnd == rowStart) { - // The current word is longer than the row length, just break it from here. - rows[nrows].start = rowStart; - rows[nrows].end = iter.str; - rows[nrows].width = rowWidth * invscale; - rows[nrows].minx = rowMinX * invscale; - rows[nrows].maxx = rowMaxX * invscale; - rows[nrows].next = iter.str; - nrows++; - if (nrows >= maxRows) - return nrows; - rowStartX = iter.x; - rowStart = iter.str; - rowEnd = iter.next; - rowWidth = iter.nextx - rowStartX; - rowMinX = q.x0 - rowStartX; - rowMaxX = q.x1 - rowStartX; - wordStart = iter.str; - wordStartX = iter.x; - wordMinX = q.x0 - rowStartX; - } else { - // Break the line from the end of the last word, and start new line from the beginning of the new. - rows[nrows].start = rowStart; - rows[nrows].end = breakEnd; - rows[nrows].width = breakWidth * invscale; - rows[nrows].minx = rowMinX * invscale; - rows[nrows].maxx = breakMaxX * invscale; - rows[nrows].next = wordStart; - nrows++; - if (nrows >= maxRows) - return nrows; - // Update row - rowStartX = wordStartX; - rowStart = wordStart; - rowEnd = iter.next; - rowWidth = iter.nextx - rowStartX; - rowMinX = wordMinX - rowStartX; - rowMaxX = q.x1 - rowStartX; - } - // Set null break point - breakEnd = rowStart; - breakWidth = 0.0; - breakMaxX = 0.0; - } - } - } - - pcodepoint = iter.codepoint; - ptype = type; - } - - // Break the line from the end of the last word, and start new line from the beginning of the new. - if (rowStart != NULL) { - rows[nrows].start = rowStart; - rows[nrows].end = rowEnd; - rows[nrows].width = rowWidth * invscale; - rows[nrows].minx = rowMinX * invscale; - rows[nrows].maxx = rowMaxX * invscale; - rows[nrows].next = end; - nrows++; - } - - return nrows; -} - -float nvgTextBounds(NVGcontext* ctx, float x, float y, const char* string, const char* end, float* bounds) -{ - NVGstate* state = nvg__getState(ctx); - float scale = nvg__getFontScale(state) * ctx->devicePxRatio; - float invscale = 1.0f / scale; - float width; - - if (state->fontId == FONS_INVALID) return 0; - - fonsSetSize(ctx->fs, state->fontSize*scale); - fonsSetSpacing(ctx->fs, state->letterSpacing*scale); - fonsSetBlur(ctx->fs, state->fontBlur*scale); - fonsSetAlign(ctx->fs, state->textAlign); - fonsSetFont(ctx->fs, state->fontId); - - width = fonsTextBounds(ctx->fs, x*scale, y*scale, string, end, bounds); - if (bounds != NULL) { - // Use line bounds for height. - fonsLineBounds(ctx->fs, y*scale, &bounds[1], &bounds[3]); - bounds[0] *= invscale; - bounds[1] *= invscale; - bounds[2] *= invscale; - bounds[3] *= invscale; - } - return width * invscale; -} - -void nvgTextBoxBounds(NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end, float* bounds) -{ - NVGstate* state = nvg__getState(ctx); - NVGtextRow rows[2]; - float scale = nvg__getFontScale(state) * ctx->devicePxRatio; - float invscale = 1.0f / scale; - int nrows = 0, i; - int oldAlign = state->textAlign; - int haling = state->textAlign & (NVG_ALIGN_LEFT | NVG_ALIGN_CENTER | NVG_ALIGN_RIGHT); - int valign = state->textAlign & (NVG_ALIGN_TOP | NVG_ALIGN_MIDDLE | NVG_ALIGN_BOTTOM | NVG_ALIGN_BASELINE); - float lineh = 0, rminy = 0, rmaxy = 0; - float minx, miny, maxx, maxy; - - if (state->fontId == FONS_INVALID) { - if (bounds != NULL) - bounds[0] = bounds[1] = bounds[2] = bounds[3] = 0.0f; - return; - } - - nvgTextMetrics(ctx, NULL, NULL, &lineh); - - state->textAlign = NVG_ALIGN_LEFT | valign; - - minx = maxx = x; - miny = maxy = y; - - fonsSetSize(ctx->fs, state->fontSize*scale); - fonsSetSpacing(ctx->fs, state->letterSpacing*scale); - fonsSetBlur(ctx->fs, state->fontBlur*scale); - fonsSetAlign(ctx->fs, state->textAlign); - fonsSetFont(ctx->fs, state->fontId); - fonsLineBounds(ctx->fs, 0, &rminy, &rmaxy); - rminy *= invscale; - rmaxy *= invscale; - - while ((nrows = nvgTextBreakLines(ctx, string, end, breakRowWidth, rows, 2))) { - for (i = 0; i < nrows; i++) { - NVGtextRow* row = &rows[i]; - float rminx, rmaxx, dx = 0; - // Horizontal bounds - if (haling & NVG_ALIGN_LEFT) - dx = 0; - else if (haling & NVG_ALIGN_CENTER) - dx = breakRowWidth*0.5f - row->width*0.5f; - else if (haling & NVG_ALIGN_RIGHT) - dx = breakRowWidth - row->width; - rminx = x + row->minx + dx; - rmaxx = x + row->maxx + dx; - minx = nvg__minf(minx, rminx); - maxx = nvg__maxf(maxx, rmaxx); - // Vertical bounds. - miny = nvg__minf(miny, y + rminy); - maxy = nvg__maxf(maxy, y + rmaxy); - - y += lineh * state->lineHeight; - } - string = rows[nrows-1].next; - } - - state->textAlign = oldAlign; - - if (bounds != NULL) { - bounds[0] = minx; - bounds[1] = miny; - bounds[2] = maxx; - bounds[3] = maxy; - } -} - -void nvgTextMetrics(NVGcontext* ctx, float* ascender, float* descender, float* lineh) -{ - NVGstate* state = nvg__getState(ctx); - float scale = nvg__getFontScale(state) * ctx->devicePxRatio; - float invscale = 1.0f / scale; - - if (state->fontId == FONS_INVALID) return; - - fonsSetSize(ctx->fs, state->fontSize*scale); - fonsSetSpacing(ctx->fs, state->letterSpacing*scale); - fonsSetBlur(ctx->fs, state->fontBlur*scale); - fonsSetAlign(ctx->fs, state->textAlign); - fonsSetFont(ctx->fs, state->fontId); - - fonsVertMetrics(ctx->fs, ascender, descender, lineh); - if (ascender != NULL) - *ascender *= invscale; - if (descender != NULL) - *descender *= invscale; - if (lineh != NULL) - *lineh *= invscale; -} -// vim: ft=c nu noet ts=4 diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg.h b/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg.h deleted file mode 100644 index cb63e52e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg.h +++ /dev/null @@ -1,697 +0,0 @@ -// -// Copyright (c) 2013 Mikko Mononen memon@inside.org -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// - -#ifndef NANOVG_H -#define NANOVG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define NVG_PI 3.14159265358979323846264338327f - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4201) // nonstandard extension used : nameless struct/union -#endif - -typedef struct NVGcontext NVGcontext; - -struct NVGcolor { - union { - float rgba[4]; - struct { - float r,g,b,a; - }; - }; -}; -typedef struct NVGcolor NVGcolor; - -struct NVGpaint { - float xform[6]; - float extent[2]; - float radius; - float feather; - NVGcolor innerColor; - NVGcolor outerColor; - int image; -}; -typedef struct NVGpaint NVGpaint; - -enum NVGwinding { - NVG_CCW = 1, // Winding for solid shapes - NVG_CW = 2, // Winding for holes -}; - -enum NVGsolidity { - NVG_SOLID = 1, // CCW - NVG_HOLE = 2, // CW -}; - -enum NVGlineCap { - NVG_BUTT, - NVG_ROUND, - NVG_SQUARE, - NVG_BEVEL, - NVG_MITER, -}; - -enum NVGalign { - // Horizontal align - NVG_ALIGN_LEFT = 1<<0, // Default, align text horizontally to left. - NVG_ALIGN_CENTER = 1<<1, // Align text horizontally to center. - NVG_ALIGN_RIGHT = 1<<2, // Align text horizontally to right. - // Vertical align - NVG_ALIGN_TOP = 1<<3, // Align text vertically to top. - NVG_ALIGN_MIDDLE = 1<<4, // Align text vertically to middle. - NVG_ALIGN_BOTTOM = 1<<5, // Align text vertically to bottom. - NVG_ALIGN_BASELINE = 1<<6, // Default, align text vertically to baseline. -}; - -enum NVGblendFactor { - NVG_ZERO = 1<<0, - NVG_ONE = 1<<1, - NVG_SRC_COLOR = 1<<2, - NVG_ONE_MINUS_SRC_COLOR = 1<<3, - NVG_DST_COLOR = 1<<4, - NVG_ONE_MINUS_DST_COLOR = 1<<5, - NVG_SRC_ALPHA = 1<<6, - NVG_ONE_MINUS_SRC_ALPHA = 1<<7, - NVG_DST_ALPHA = 1<<8, - NVG_ONE_MINUS_DST_ALPHA = 1<<9, - NVG_SRC_ALPHA_SATURATE = 1<<10, -}; - -enum NVGcompositeOperation { - NVG_SOURCE_OVER, - NVG_SOURCE_IN, - NVG_SOURCE_OUT, - NVG_ATOP, - NVG_DESTINATION_OVER, - NVG_DESTINATION_IN, - NVG_DESTINATION_OUT, - NVG_DESTINATION_ATOP, - NVG_LIGHTER, - NVG_COPY, - NVG_XOR, -}; - -struct NVGcompositeOperationState { - int srcRGB; - int dstRGB; - int srcAlpha; - int dstAlpha; -}; -typedef struct NVGcompositeOperationState NVGcompositeOperationState; - -struct NVGglyphPosition { - const char* str; // Position of the glyph in the input string. - float x; // The x-coordinate of the logical glyph position. - float minx, maxx; // The bounds of the glyph shape. -}; -typedef struct NVGglyphPosition NVGglyphPosition; - -struct NVGtextRow { - const char* start; // Pointer to the input text where the row starts. - const char* end; // Pointer to the input text where the row ends (one past the last character). - const char* next; // Pointer to the beginning of the next row. - float width; // Logical width of the row. - float minx, maxx; // Actual bounds of the row. Logical with and bounds can differ because of kerning and some parts over extending. -}; -typedef struct NVGtextRow NVGtextRow; - -enum NVGimageFlags { - NVG_IMAGE_GENERATE_MIPMAPS = 1<<0, // Generate mipmaps during creation of the image. - NVG_IMAGE_REPEATX = 1<<1, // Repeat image in X direction. - NVG_IMAGE_REPEATY = 1<<2, // Repeat image in Y direction. - NVG_IMAGE_FLIPY = 1<<3, // Flips (inverses) image in Y direction when rendered. - NVG_IMAGE_PREMULTIPLIED = 1<<4, // Image data has premultiplied alpha. - NVG_IMAGE_NEAREST = 1<<5, // Image interpolation is Nearest instead Linear -}; - -// Begin drawing a new frame -// Calls to nanovg drawing API should be wrapped in nvgBeginFrame() & nvgEndFrame() -// nvgBeginFrame() defines the size of the window to render to in relation currently -// set viewport (i.e. glViewport on GL backends). Device pixel ration allows to -// control the rendering on Hi-DPI devices. -// For example, GLFW returns two dimension for an opened window: window size and -// frame buffer size. In that case you would set windowWidth/Height to the window size -// devicePixelRatio to: frameBufferWidth / windowWidth. -void nvgBeginFrame(NVGcontext* ctx, float windowWidth, float windowHeight, float devicePixelRatio); - -// Cancels drawing the current frame. -void nvgCancelFrame(NVGcontext* ctx); - -// Ends drawing flushing remaining render state. -void nvgEndFrame(NVGcontext* ctx); - -// -// Composite operation -// -// The composite operations in NanoVG are modeled after HTML Canvas API, and -// the blend func is based on OpenGL (see corresponding manuals for more info). -// The colors in the blending state have premultiplied alpha. - -// Sets the composite operation. The op parameter should be one of NVGcompositeOperation. -void nvgGlobalCompositeOperation(NVGcontext* ctx, int op); - -// Sets the composite operation with custom pixel arithmetic. The parameters should be one of NVGblendFactor. -void nvgGlobalCompositeBlendFunc(NVGcontext* ctx, int sfactor, int dfactor); - -// Sets the composite operation with custom pixel arithmetic for RGB and alpha components separately. The parameters should be one of NVGblendFactor. -void nvgGlobalCompositeBlendFuncSeparate(NVGcontext* ctx, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha); - -// -// Color utils -// -// Colors in NanoVG are stored as unsigned ints in ABGR format. - -// Returns a color value from red, green, blue values. Alpha will be set to 255 (1.0f). -NVGcolor nvgRGB(unsigned char r, unsigned char g, unsigned char b); - -// Returns a color value from red, green, blue values. Alpha will be set to 1.0f. -NVGcolor nvgRGBf(float r, float g, float b); - - -// Returns a color value from red, green, blue and alpha values. -NVGcolor nvgRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); - -// Returns a color value from red, green, blue and alpha values. -NVGcolor nvgRGBAf(float r, float g, float b, float a); - - -// Linearly interpolates from color c0 to c1, and returns resulting color value. -NVGcolor nvgLerpRGBA(NVGcolor c0, NVGcolor c1, float u); - -// Sets transparency of a color value. -NVGcolor nvgTransRGBA(NVGcolor c0, unsigned char a); - -// Sets transparency of a color value. -NVGcolor nvgTransRGBAf(NVGcolor c0, float a); - -// Returns color value specified by hue, saturation and lightness. -// HSL values are all in range [0..1], alpha will be set to 255. -NVGcolor nvgHSL(float h, float s, float l); - -// Returns color value specified by hue, saturation and lightness and alpha. -// HSL values are all in range [0..1], alpha in range [0..255] -NVGcolor nvgHSLA(float h, float s, float l, unsigned char a); - -// -// State Handling -// -// NanoVG contains state which represents how paths will be rendered. -// The state contains transform, fill and stroke styles, text and font styles, -// and scissor clipping. - -// Pushes and saves the current render state into a state stack. -// A matching nvgRestore() must be used to restore the state. -void nvgSave(NVGcontext* ctx); - -// Pops and restores current render state. -void nvgRestore(NVGcontext* ctx); - -// Resets current render state to default values. Does not affect the render state stack. -void nvgReset(NVGcontext* ctx); - -// -// Render styles -// -// Fill and stroke render style can be either a solid color or a paint which is a gradient or a pattern. -// Solid color is simply defined as a color value, different kinds of paints can be created -// using nvgLinearGradient(), nvgBoxGradient(), nvgRadialGradient() and nvgImagePattern(). -// -// Current render style can be saved and restored using nvgSave() and nvgRestore(). - -// Sets whether to draw antialias for nvgStroke() and nvgFill(). It's enabled by default. -void nvgShapeAntiAlias(NVGcontext* ctx, int enabled); - -// Sets current stroke style to a solid color. -void nvgStrokeColor(NVGcontext* ctx, NVGcolor color); - -// Sets current stroke style to a paint, which can be a one of the gradients or a pattern. -void nvgStrokePaint(NVGcontext* ctx, NVGpaint paint); - -// Sets current fill style to a solid color. -void nvgFillColor(NVGcontext* ctx, NVGcolor color); - -// Sets current fill style to a paint, which can be a one of the gradients or a pattern. -void nvgFillPaint(NVGcontext* ctx, NVGpaint paint); - -// Sets the miter limit of the stroke style. -// Miter limit controls when a sharp corner is beveled. -void nvgMiterLimit(NVGcontext* ctx, float limit); - -// Sets the stroke width of the stroke style. -void nvgStrokeWidth(NVGcontext* ctx, float size); - -// Sets how the end of the line (cap) is drawn, -// Can be one of: NVG_BUTT (default), NVG_ROUND, NVG_SQUARE. -void nvgLineCap(NVGcontext* ctx, int cap); - -// Sets how sharp path corners are drawn. -// Can be one of NVG_MITER (default), NVG_ROUND, NVG_BEVEL. -void nvgLineJoin(NVGcontext* ctx, int join); - -// Sets the transparency applied to all rendered shapes. -// Already transparent paths will get proportionally more transparent as well. -void nvgGlobalAlpha(NVGcontext* ctx, float alpha); - -// -// Transforms -// -// The paths, gradients, patterns and scissor region are transformed by an transformation -// matrix at the time when they are passed to the API. -// The current transformation matrix is a affine matrix: -// [sx kx tx] -// [ky sy ty] -// [ 0 0 1] -// Where: sx,sy define scaling, kx,ky skewing, and tx,ty translation. -// The last row is assumed to be 0,0,1 and is not stored. -// -// Apart from nvgResetTransform(), each transformation function first creates -// specific transformation matrix and pre-multiplies the current transformation by it. -// -// Current coordinate system (transformation) can be saved and restored using nvgSave() and nvgRestore(). - -// Resets current transform to a identity matrix. -void nvgResetTransform(NVGcontext* ctx); - -// Premultiplies current coordinate system by specified matrix. -// The parameters are interpreted as matrix as follows: -// [a c e] -// [b d f] -// [0 0 1] -void nvgTransform(NVGcontext* ctx, float a, float b, float c, float d, float e, float f); - -// Translates current coordinate system. -void nvgTranslate(NVGcontext* ctx, float x, float y); - -// Rotates current coordinate system. Angle is specified in radians. -void nvgRotate(NVGcontext* ctx, float angle); - -// Skews the current coordinate system along X axis. Angle is specified in radians. -void nvgSkewX(NVGcontext* ctx, float angle); - -// Skews the current coordinate system along Y axis. Angle is specified in radians. -void nvgSkewY(NVGcontext* ctx, float angle); - -// Scales the current coordinate system. -void nvgScale(NVGcontext* ctx, float x, float y); - -// Stores the top part (a-f) of the current transformation matrix in to the specified buffer. -// [a c e] -// [b d f] -// [0 0 1] -// There should be space for 6 floats in the return buffer for the values a-f. -void nvgCurrentTransform(NVGcontext* ctx, float* xform); - - -// The following functions can be used to make calculations on 2x3 transformation matrices. -// A 2x3 matrix is represented as float[6]. - -// Sets the transform to identity matrix. -void nvgTransformIdentity(float* dst); - -// Sets the transform to translation matrix matrix. -void nvgTransformTranslate(float* dst, float tx, float ty); - -// Sets the transform to scale matrix. -void nvgTransformScale(float* dst, float sx, float sy); - -// Sets the transform to rotate matrix. Angle is specified in radians. -void nvgTransformRotate(float* dst, float a); - -// Sets the transform to skew-x matrix. Angle is specified in radians. -void nvgTransformSkewX(float* dst, float a); - -// Sets the transform to skew-y matrix. Angle is specified in radians. -void nvgTransformSkewY(float* dst, float a); - -// Sets the transform to the result of multiplication of two transforms, of A = A*B. -void nvgTransformMultiply(float* dst, const float* src); - -// Sets the transform to the result of multiplication of two transforms, of A = B*A. -void nvgTransformPremultiply(float* dst, const float* src); - -// Sets the destination to inverse of specified transform. -// Returns 1 if the inverse could be calculated, else 0. -int nvgTransformInverse(float* dst, const float* src); - -// Transform a point by given transform. -void nvgTransformPoint(float* dstx, float* dsty, const float* xform, float srcx, float srcy); - -// Converts degrees to radians and vice versa. -float nvgDegToRad(float deg); -float nvgRadToDeg(float rad); - -// -// Images -// -// NanoVG allows you to load jpg, png, psd, tga, pic and gif files to be used for rendering. -// In addition you can upload your own image. The image loading is provided by stb_image. -// The parameter imageFlags is combination of flags defined in NVGimageFlags. - -// Creates image by loading it from the disk from specified file name. -// Returns handle to the image. -int nvgCreateImage(NVGcontext* ctx, const char* filename, int imageFlags); - -// Creates image by loading it from the specified chunk of memory. -// Returns handle to the image. -int nvgCreateImageMem(NVGcontext* ctx, int imageFlags, unsigned char* data, int ndata); - -// Creates image from specified image data. -// Returns handle to the image. -int nvgCreateImageRGBA(NVGcontext* ctx, int w, int h, int imageFlags, const unsigned char* data); - -// Updates image data specified by image handle. -void nvgUpdateImage(NVGcontext* ctx, int image, const unsigned char* data); - -// Returns the dimensions of a created image. -void nvgImageSize(NVGcontext* ctx, int image, int* w, int* h); - -// Deletes created image. -void nvgDeleteImage(NVGcontext* ctx, int image); - -// -// Paints -// -// NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern. -// These can be used as paints for strokes and fills. - -// Creates and returns a linear gradient. Parameters (sx,sy)-(ex,ey) specify the start and end coordinates -// of the linear gradient, icol specifies the start color and ocol the end color. -// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint(). -NVGpaint nvgLinearGradient(NVGcontext* ctx, float sx, float sy, float ex, float ey, - NVGcolor icol, NVGcolor ocol); - -// Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering -// drop shadows or highlights for boxes. Parameters (x,y) define the top-left corner of the rectangle, -// (w,h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry -// the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient. -// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint(). -NVGpaint nvgBoxGradient(NVGcontext* ctx, float x, float y, float w, float h, - float r, float f, NVGcolor icol, NVGcolor ocol); - -// Creates and returns a radial gradient. Parameters (cx,cy) specify the center, inr and outr specify -// the inner and outer radius of the gradient, icol specifies the start color and ocol the end color. -// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint(). -NVGpaint nvgRadialGradient(NVGcontext* ctx, float cx, float cy, float inr, float outr, - NVGcolor icol, NVGcolor ocol); - -// Creates and returns an image pattern. Parameters (ox,oy) specify the left-top location of the image pattern, -// (ex,ey) the size of one image, angle rotation around the top-left corner, image is handle to the image to render. -// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint(). -NVGpaint nvgImagePattern(NVGcontext* ctx, float ox, float oy, float ex, float ey, - float angle, int image, float alpha); - -// -// Scissoring -// -// Scissoring allows you to clip the rendering into a rectangle. This is useful for various -// user interface cases like rendering a text edit or a timeline. - -// Sets the current scissor rectangle. -// The scissor rectangle is transformed by the current transform. -void nvgScissor(NVGcontext* ctx, float x, float y, float w, float h); - -// Intersects current scissor rectangle with the specified rectangle. -// The scissor rectangle is transformed by the current transform. -// Note: in case the rotation of previous scissor rect differs from -// the current one, the intersection will be done between the specified -// rectangle and the previous scissor rectangle transformed in the current -// transform space. The resulting shape is always rectangle. -void nvgIntersectScissor(NVGcontext* ctx, float x, float y, float w, float h); - -// Reset and disables scissoring. -void nvgResetScissor(NVGcontext* ctx); - -// -// Paths -// -// Drawing a new shape starts with nvgBeginPath(), it clears all the currently defined paths. -// Then you define one or more paths and sub-paths which describe the shape. The are functions -// to draw common shapes like rectangles and circles, and lower level step-by-step functions, -// which allow to define a path curve by curve. -// -// NanoVG uses even-odd fill rule to draw the shapes. Solid shapes should have counter clockwise -// winding and holes should have counter clockwise order. To specify winding of a path you can -// call nvgPathWinding(). This is useful especially for the common shapes, which are drawn CCW. -// -// Finally you can fill the path using current fill style by calling nvgFill(), and stroke it -// with current stroke style by calling nvgStroke(). -// -// The curve segments and sub-paths are transformed by the current transform. - -// Clears the current path and sub-paths. -void nvgBeginPath(NVGcontext* ctx); - -// Starts new sub-path with specified point as first point. -void nvgMoveTo(NVGcontext* ctx, float x, float y); - -// Adds line segment from the last point in the path to the specified point. -void nvgLineTo(NVGcontext* ctx, float x, float y); - -// Adds cubic bezier segment from last point in the path via two control points to the specified point. -void nvgBezierTo(NVGcontext* ctx, float c1x, float c1y, float c2x, float c2y, float x, float y); - -// Adds quadratic bezier segment from last point in the path via a control point to the specified point. -void nvgQuadTo(NVGcontext* ctx, float cx, float cy, float x, float y); - -// Adds an arc segment at the corner defined by the last path point, and two specified points. -void nvgArcTo(NVGcontext* ctx, float x1, float y1, float x2, float y2, float radius); - -// Closes current sub-path with a line segment. -void nvgClosePath(NVGcontext* ctx); - -// Sets the current sub-path winding, see NVGwinding and NVGsolidity. -void nvgPathWinding(NVGcontext* ctx, int dir); - -// Creates new circle arc shaped sub-path. The arc center is at cx,cy, the arc radius is r, -// and the arc is drawn from angle a0 to a1, and swept in direction dir (NVG_CCW, or NVG_CW). -// Angles are specified in radians. -void nvgArc(NVGcontext* ctx, float cx, float cy, float r, float a0, float a1, int dir); - -// Creates new rectangle shaped sub-path. -void nvgRect(NVGcontext* ctx, float x, float y, float w, float h); - -// Creates new rounded rectangle shaped sub-path. -void nvgRoundedRect(NVGcontext* ctx, float x, float y, float w, float h, float r); - -// Creates new rounded rectangle shaped sub-path with varying radii for each corner. -void nvgRoundedRectVarying(NVGcontext* ctx, float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft); - -// Creates new ellipse shaped sub-path. -void nvgEllipse(NVGcontext* ctx, float cx, float cy, float rx, float ry); - -// Creates new circle shaped sub-path. -void nvgCircle(NVGcontext* ctx, float cx, float cy, float r); - -// Fills the current path with current fill style. -void nvgFill(NVGcontext* ctx); - -// Fills the current path with current stroke style. -void nvgStroke(NVGcontext* ctx); - - -// -// Text -// -// NanoVG allows you to load .ttf files and use the font to render text. -// -// The appearance of the text can be defined by setting the current text style -// and by specifying the fill color. Common text and font settings such as -// font size, letter spacing and text align are supported. Font blur allows you -// to create simple text effects such as drop shadows. -// -// At render time the font face can be set based on the font handles or name. -// -// Font measure functions return values in local space, the calculations are -// carried in the same resolution as the final rendering. This is done because -// the text glyph positions are snapped to the nearest pixels sharp rendering. -// -// The local space means that values are not rotated or scale as per the current -// transformation. For example if you set font size to 12, which would mean that -// line height is 16, then regardless of the current scaling and rotation, the -// returned line height is always 16. Some measures may vary because of the scaling -// since aforementioned pixel snapping. -// -// While this may sound a little odd, the setup allows you to always render the -// same way regardless of scaling. I.e. following works regardless of scaling: -// -// const char* txt = "Text me up."; -// nvgTextBounds(vg, x,y, txt, NULL, bounds); -// nvgBeginPath(vg); -// nvgRoundedRect(vg, bounds[0],bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]); -// nvgFill(vg); -// -// Note: currently only solid color fill is supported for text. - -// Creates font by loading it from the disk from specified file name. -// Returns handle to the font. -int nvgCreateFont(NVGcontext* ctx, const char* name, const char* filename); - -// fontIndex specifies which font face to load from a .ttf/.ttc file. -int nvgCreateFontAtIndex(NVGcontext* ctx, const char* name, const char* filename, const int fontIndex); - -// Creates font by loading it from the specified memory chunk. -// Returns handle to the font. -int nvgCreateFontMem(NVGcontext* ctx, const char* name, unsigned char* data, int ndata, int freeData); - -// fontIndex specifies which font face to load from a .ttf/.ttc file. -int nvgCreateFontMemAtIndex(NVGcontext* ctx, const char* name, unsigned char* data, int ndata, int freeData, const int fontIndex); - -// Finds a loaded font of specified name, and returns handle to it, or -1 if the font is not found. -int nvgFindFont(NVGcontext* ctx, const char* name); - -// Adds a fallback font by handle. -int nvgAddFallbackFontId(NVGcontext* ctx, int baseFont, int fallbackFont); - -// Adds a fallback font by name. -int nvgAddFallbackFont(NVGcontext* ctx, const char* baseFont, const char* fallbackFont); - -// Resets fallback fonts by handle. -void nvgResetFallbackFontsId(NVGcontext* ctx, int baseFont); - -// Resets fallback fonts by name. -void nvgResetFallbackFonts(NVGcontext* ctx, const char* baseFont); - -// Sets the font size of current text style. -void nvgFontSize(NVGcontext* ctx, float size); - -// Sets the blur of current text style. -void nvgFontBlur(NVGcontext* ctx, float blur); - -// Sets the letter spacing of current text style. -void nvgTextLetterSpacing(NVGcontext* ctx, float spacing); - -// Sets the proportional line height of current text style. The line height is specified as multiple of font size. -void nvgTextLineHeight(NVGcontext* ctx, float lineHeight); - -// Sets the text align of current text style, see NVGalign for options. -void nvgTextAlign(NVGcontext* ctx, int align); - -// Sets the font face based on specified id of current text style. -void nvgFontFaceId(NVGcontext* ctx, int font); - -// Sets the font face based on specified name of current text style. -void nvgFontFace(NVGcontext* ctx, const char* font); - -// Draws text string at specified location. If end is specified only the sub-string up to the end is drawn. -float nvgText(NVGcontext* ctx, float x, float y, const char* string, const char* end); - -// Draws multi-line text string at specified location wrapped at the specified width. If end is specified only the sub-string up to the end is drawn. -// White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered. -// Words longer than the max width are slit at nearest character (i.e. no hyphenation). -void nvgTextBox(NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end); - -// Measures the specified text string. Parameter bounds should be a pointer to float[4], -// if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax] -// Returns the horizontal advance of the measured text (i.e. where the next character should drawn). -// Measured values are returned in local coordinate space. -float nvgTextBounds(NVGcontext* ctx, float x, float y, const char* string, const char* end, float* bounds); - -// Measures the specified multi-text string. Parameter bounds should be a pointer to float[4], -// if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax] -// Measured values are returned in local coordinate space. -void nvgTextBoxBounds(NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end, float* bounds); - -// Calculates the glyph x positions of the specified text. If end is specified only the sub-string will be used. -// Measured values are returned in local coordinate space. -int nvgTextGlyphPositions(NVGcontext* ctx, float x, float y, const char* string, const char* end, NVGglyphPosition* positions, int maxPositions); - -// Returns the vertical metrics based on the current text style. -// Measured values are returned in local coordinate space. -void nvgTextMetrics(NVGcontext* ctx, float* ascender, float* descender, float* lineh); - -// Breaks the specified text into lines. If end is specified only the sub-string will be used. -// White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered. -// Words longer than the max width are slit at nearest character (i.e. no hyphenation). -int nvgTextBreakLines(NVGcontext* ctx, const char* string, const char* end, float breakRowWidth, NVGtextRow* rows, int maxRows); - -// -// Internal Render API -// -enum NVGtexture { - NVG_TEXTURE_ALPHA = 0x01, - NVG_TEXTURE_RGBA = 0x02, -}; - -struct NVGscissor { - float xform[6]; - float extent[2]; -}; -typedef struct NVGscissor NVGscissor; - -struct NVGvertex { - float x,y,u,v; -}; -typedef struct NVGvertex NVGvertex; - -struct NVGpath { - int first; - int count; - unsigned char closed; - int nbevel; - NVGvertex* fill; - int nfill; - NVGvertex* stroke; - int nstroke; - int winding; - int convex; -}; -typedef struct NVGpath NVGpath; - -struct NVGparams { - void* userPtr; - int edgeAntiAlias; - int (*renderCreate)(void* uptr); - int (*renderCreateTexture)(void* uptr, int type, int w, int h, int imageFlags, const unsigned char* data); - int (*renderDeleteTexture)(void* uptr, int image); - int (*renderUpdateTexture)(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data); - int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h); - void (*renderViewport)(void* uptr, float width, float height, float devicePixelRatio); - void (*renderCancel)(void* uptr); - void (*renderFlush)(void* uptr); - void (*renderFill)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths); - void (*renderStroke)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, float strokeWidth, const NVGpath* paths, int npaths); - void (*renderTriangles)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, const NVGvertex* verts, int nverts, float fringe); - void (*renderDelete)(void* uptr); -}; -typedef struct NVGparams NVGparams; - -// Constructor and destructor, called by the render back-end. -NVGcontext* nvgCreateInternal(NVGparams* params); -void nvgDeleteInternal(NVGcontext* ctx); - -NVGparams* nvgInternalParams(NVGcontext* ctx); - -// Debug function to dump cached path data. -void nvgDebugDumpPathCache(NVGcontext* ctx); - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#define NVG_NOTUSED(v) for (;;) { (void)(1 ? (void)0 : ( (void)(v) ) ); break; } - -#ifdef __cplusplus -} -#endif - -#endif // NANOVG_H diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg_gl.h b/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg_gl.h deleted file mode 100644 index e3add803..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg_gl.h +++ /dev/null @@ -1,1924 +0,0 @@ -// -// Copyright (c) 2009-2013 Mikko Mononen memon@inside.org -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// -#ifndef NANOVG_GL_H -#define NANOVG_GL_H - -#ifdef __cplusplus -extern "C" { -#endif - -// Create flags - -enum NVGcreateFlags { - // Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA). - NVG_ANTIALIAS = 1<<0, - // Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little - // slower, but path overlaps (i.e. self-intersecting or sharp turns) will be drawn just once. - NVG_STENCIL_STROKES = 1<<1, - // Flag indicating that additional debug checks are done. - NVG_DEBUG = 1<<2, -}; - -#if defined NANOVG_GL2_IMPLEMENTATION -# define NANOVG_GL2 1 -# define NANOVG_GL_IMPLEMENTATION 1 -# define EXT(name) name##GL2 -# define CONFIG_METHOD "configGL" -#elif defined NANOVG_GL3_IMPLEMENTATION -# define NANOVG_GL3 1 -# define NANOVG_GL_IMPLEMENTATION 1 -# define NANOVG_GL_USE_UNIFORMBUFFER 1 -# define EXT(name) name##GL3 -# define CONFIG_METHOD "configGL" -#elif defined NANOVG_GLES2_IMPLEMENTATION -# define NANOVG_GLES2 1 -# define NANOVG_GL_IMPLEMENTATION 1 -# define EXT(name) name##GLES2 -# define CONFIG_METHOD "configGLES" -#elif defined NANOVG_GLES3_IMPLEMENTATION -# define NANOVG_GLES3 1 -# define NANOVG_GL_IMPLEMENTATION 1 -# define EXT(name) name##GLES3 -# define CONFIG_METHOD "configGLES" -#endif - -#define NANOVG_GL_USE_STATE_FILTER (1) - -// Creates NanoVG contexts for different OpenGL (ES) versions. -// Flags should be combination of the create flags above. - -// These are additional flags on top of NVGimageFlags. -enum NVGimageFlagsGL { - NVG_IMAGE_NODELETE = 1<<16, // Do not delete GL texture handle. -}; - -#ifdef __cplusplus -} -#endif - -#endif /* NANOVG_GL_H */ - -#ifdef NANOVG_GL_IMPLEMENTATION - -#include -#include -#include -#include -#include "nanovg.h" -#include - -// ---------- LWJGL -------------- - -typedef void GLvoid; -typedef unsigned char GLboolean; -typedef char GLchar; -typedef int GLsizei; -typedef int GLint; -typedef unsigned int GLuint; -typedef unsigned int GLenum; -typedef float GLfloat; - -typedef ptrdiff_t GLsizeiptr; -typedef ptrdiff_t GLintptr; - -#define GL_ALWAYS 0x0207 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_BACK 0x0405 -#define GL_BLEND 0x0BE2 -#define GL_CCW 0x0901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_COLOR 0x1800 -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_CULL_FACE 0x0B44 -#define GL_DECR 0x1E03 -#define GL_DECR_WRAP 0x8508 -#define GL_DEPTH 0x1801 -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_DST_ALPHA 0x0304 -#define GL_DST_COLOR 0x0306 -#define GL_EQUAL 0x0202 -#define GL_FALSE 0 -#define GL_FLOAT 0x1406 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRONT 0x0404 -#define GL_GENERATE_MIPMAP 0x8191 -#define GL_INCR 0x1E02 -#define GL_INCR_WRAP 0x8507 -#define GL_INVALID_ENUM 0x0500 -#define GL_KEEP 0x1E00 -#define GL_LINE 0x1B01 -#define GL_LINEAR 0x2601 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_LINK_STATUS 0x8B82 -#define GL_LUMINANCE 0x1909 -#define GL_NEAREST 0x2600 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_NOTEQUAL 0x0205 -#define GL_NO_ERROR 0 -#define GL_ONE 1 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_R8 0x8229 -#define GL_RED 0x1903 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_REPEAT 0x2901 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_SRC_ALPHA 0x0302 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_SRC_COLOR 0x0300 -#define GL_STENCIL 0x1802 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_STENCIL_INDEX 0x1901 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_TEST 0x0B90 -#define GL_STREAM_DRAW 0x88E0 -#define GL_TEXTURE 0x1702 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRUE 1 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_ZERO 0 - -#ifndef APIENTRY - #ifdef _WIN32 - #define APIENTRY __stdcall - #else - #define APIENTRY - #endif -#endif -#define GLAPI - -typedef void (APIENTRY *glActiveTexturePROC) (GLenum texture); -typedef void (APIENTRY *glAttachShaderPROC) (GLuint program, GLuint shader); -typedef void (APIENTRY *glBindAttribLocationPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRY *glBindBufferPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRY *glBindBufferRangePROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRY *glBindFramebufferPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRY *glBindRenderbufferPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRY *glBindTexturePROC) (GLenum target, GLuint texture); -typedef void (APIENTRY *glBindVertexArrayPROC) (GLuint array); -typedef void (APIENTRY *glBlendFuncPROC) (GLenum sfactor, GLenum dfactor); -typedef void (APIENTRY *glBlendFuncSeparatePROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRY *glBufferDataPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -typedef GLenum (APIENTRY *glCheckFramebufferStatusPROC) (GLenum target); -typedef void (APIENTRY *glColorMaskPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef void (APIENTRY *glCompileShaderPROC) (GLuint shader); -typedef GLuint (APIENTRY *glCreateProgramPROC) (void); -typedef GLuint (APIENTRY *glCreateShaderPROC) (GLenum type); -typedef void (APIENTRY *glCullFacePROC) (GLenum mode); -typedef void (APIENTRY *glDeleteBuffersPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRY *glDeleteFramebuffersPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRY *glDeleteProgramPROC) (GLuint program); -typedef void (APIENTRY *glDeleteRenderbuffersPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRY *glDeleteShaderPROC) (GLuint shader); -typedef void (APIENTRY *glDeleteTexturesPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRY *glDeleteVertexArraysPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRY *glDetachShaderPROC) (GLuint program, GLuint shader); -typedef void (APIENTRY *glDisablePROC) (GLenum cap); -typedef void (APIENTRY *glDisableVertexAttribArrayPROC) (GLuint index); -typedef void (APIENTRY *glDrawArraysPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRY *glEnablePROC) (GLenum cap); -typedef void (APIENTRY *glEnableVertexAttribArrayPROC) (GLuint index); -typedef void (APIENTRY *glFinishPROC) (void); -typedef void (APIENTRY *glFlushPROC) (void); -typedef void (APIENTRY *glFramebufferRenderbufferPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRY *glFramebufferTexture2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRY *glFrontFacePROC) (GLenum mode); -typedef void (APIENTRY *glGenBuffersPROC) (GLsizei n, GLuint *buffers); -typedef void (APIENTRY *glGenFramebuffersPROC) (GLsizei n, GLuint *framebuffers); -typedef void (APIENTRY *glGenRenderbuffersPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRY *glGenTexturesPROC) (GLsizei n, GLuint *textures); -typedef void (APIENTRY *glGenVertexArraysPROC) (GLsizei n, GLuint *arrays); -typedef void (APIENTRY *glGenerateMipmapPROC) (GLenum target); -typedef GLenum (APIENTRY *glGetErrorPROC) (void); -typedef void (APIENTRY *glGetIntegervPROC) (GLenum pname, GLint *data); -typedef void (APIENTRY *glGetProgramivPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRY *glGetProgramInfoLogPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRY *glGetShaderivPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRY *glGetShaderInfoLogPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef GLuint (APIENTRY *glGetUniformBlockIndexPROC) (GLuint program, const GLchar *uniformBlockName); -typedef GLint (APIENTRY *glGetUniformLocationPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRY *glLinkProgramPROC) (GLuint program); -typedef void (APIENTRY *glPixelStoreiPROC) (GLenum pname, GLint param); -typedef void (APIENTRY *glRenderbufferStoragePROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRY *glShaderSourcePROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -typedef void (APIENTRY *glStencilFuncPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRY *glStencilMaskPROC) (GLuint mask); -typedef void (APIENTRY *glStencilOpPROC) (GLenum fail, GLenum zfail, GLenum zpass); -typedef void (APIENTRY *glStencilOpSeparatePROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRY *glTexImage2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRY *glTexParameteriPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRY *glTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (APIENTRY *glUniform1iPROC) (GLint location, GLint v0); -typedef void (APIENTRY *glUniform2fvPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRY *glUniform4fvPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRY *glUniformBlockBindingPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -typedef void (APIENTRY *glUseProgramPROC) (GLuint program); -typedef void (APIENTRY *glVertexAttribPointerPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); - -#define glActiveTexture gl->ActiveTexture -#define glAttachShader gl->AttachShader -#define glBindAttribLocation gl->BindAttribLocation -#define glBindBuffer gl->BindBuffer -#define glBindBufferRange gl->BindBufferRange -#define glBindFramebuffer gl->BindFramebuffer -#define glBindRenderbuffer gl->BindRenderbuffer -#define glBindTexture gl->BindTexture -#define glBindVertexArray gl->BindVertexArray -#define glBlendFunc gl->BlendFunc -#define glBlendFuncSeparate gl->BlendFuncSeparate -#define glBufferData gl->BufferData -#define glCheckFramebufferStatus gl->CheckFramebufferStatus -#define glColorMask gl->ColorMask -#define glCompileShader gl->CompileShader -#define glCreateProgram gl->CreateProgram -#define glCreateShader gl->CreateShader -#define glCullFace gl->CullFace -#define glDeleteBuffers gl->DeleteBuffers -#define glDeleteFramebuffers gl->DeleteFramebuffers -#define glDeleteProgram gl->DeleteProgram -#define glDeleteRenderbuffers gl->DeleteRenderbuffers -#define glDeleteShader gl->DeleteShader -#define glDeleteTextures gl->DeleteTextures -#define glDeleteVertexArrays gl->DeleteVertexArrays -#define glDetachShader gl->DetachShader -#define glDisable gl->Disable -#define glDisableVertexAttribArray gl->DisableVertexAttribArray -#define glDrawArrays gl->DrawArrays -#define glEnable gl->Enable -#define glEnableVertexAttribArray gl->EnableVertexAttribArray -#define glFinish gl->Finish -#define glFlush gl->Flush -#define glFramebufferRenderbuffer gl->FramebufferRenderbuffer -#define glFramebufferTexture2D gl->FramebufferTexture2D -#define glFrontFace gl->FrontFace -#define glGenBuffers gl->GenBuffers -#define glGenFramebuffers gl->GenFramebuffers -#define glGenRenderbuffers gl->GenRenderbuffers -#define glGenTextures gl->GenTextures -#define glGenVertexArrays gl->GenVertexArrays -#define glGenerateMipmap gl->GenerateMipmap -#define glGetError gl->GetError -#define glGetIntegerv gl->GetIntegerv -#define glGetProgramiv gl->GetProgramiv -#define glGetProgramInfoLog gl->GetProgramInfoLog -#define glGetShaderiv gl->GetShaderiv -#define glGetShaderInfoLog gl->GetShaderInfoLog -#define glGetUniformBlockIndex gl->GetUniformBlockIndex -#define glGetUniformLocation gl->GetUniformLocation -#define glLinkProgram gl->LinkProgram -#define glPixelStorei gl->PixelStorei -#define glRenderbufferStorage gl->RenderbufferStorage -#define glShaderSource gl->ShaderSource -#define glStencilFunc gl->StencilFunc -#define glStencilMask gl->StencilMask -#define glStencilOp gl->StencilOp -#define glStencilOpSeparate gl->StencilOpSeparate -#define glTexImage2D gl->TexImage2D -#define glTexParameteri gl->TexParameteri -#define glTexSubImage2D gl->TexSubImage2D -#define glUniform1i gl->Uniform1i -#define glUniform2fv gl->Uniform2fv -#define glUniform4fv gl->Uniform4fv -#define glUniformBlockBinding gl->UniformBlockBinding -#define glUseProgram gl->UseProgram -#define glVertexAttribPointer gl->VertexAttribPointer - -// ---------- LWJGL -------------- - -enum GLNVGuniformLoc { - GLNVG_LOC_VIEWSIZE, - GLNVG_LOC_TEX, - GLNVG_LOC_FRAG, - GLNVG_MAX_LOCS -}; - -enum GLNVGshaderType { - NSVG_SHADER_FILLGRAD, - NSVG_SHADER_FILLIMG, - NSVG_SHADER_SIMPLE, - NSVG_SHADER_IMG -}; - -#if NANOVG_GL_USE_UNIFORMBUFFER -enum GLNVGuniformBindings { - GLNVG_FRAG_BINDING = 0, -}; -#endif - -struct GLNVGshader { - GLuint prog; - GLuint frag; - GLuint vert; - GLint loc[GLNVG_MAX_LOCS]; -}; -typedef struct GLNVGshader GLNVGshader; - -struct GLNVGtexture { - int id; - GLuint tex; - int width, height; - int type; - int flags; -}; -typedef struct GLNVGtexture GLNVGtexture; - -struct GLNVGblend -{ - GLenum srcRGB; - GLenum dstRGB; - GLenum srcAlpha; - GLenum dstAlpha; -}; -typedef struct GLNVGblend GLNVGblend; - -enum GLNVGcallType { - GLNVG_NONE = 0, - GLNVG_FILL, - GLNVG_CONVEXFILL, - GLNVG_STROKE, - GLNVG_TRIANGLES, -}; - -struct GLNVGcall { - int type; - int image; - int pathOffset; - int pathCount; - int triangleOffset; - int triangleCount; - int uniformOffset; - GLNVGblend blendFunc; -}; -typedef struct GLNVGcall GLNVGcall; - -struct GLNVGpath { - int fillOffset; - int fillCount; - int strokeOffset; - int strokeCount; -}; -typedef struct GLNVGpath GLNVGpath; - -struct GLNVGfragUniforms { - #if NANOVG_GL_USE_UNIFORMBUFFER - float scissorMat[12]; // matrices are actually 3 vec4s - float paintMat[12]; - struct NVGcolor innerCol; - struct NVGcolor outerCol; - float scissorExt[2]; - float scissorScale[2]; - float extent[2]; - float radius; - float feather; - float strokeMult; - float strokeThr; - int texType; - int type; - #else - // note: after modifying layout or size of uniform array, - // don't forget to also update the fragment shader source! - #define NANOVG_GL_UNIFORMARRAY_SIZE 11 - union { - struct { - float scissorMat[12]; // matrices are actually 3 vec4s - float paintMat[12]; - struct NVGcolor innerCol; - struct NVGcolor outerCol; - float scissorExt[2]; - float scissorScale[2]; - float extent[2]; - float radius; - float feather; - float strokeMult; - float strokeThr; - float texType; - float type; - }; - float uniformArray[NANOVG_GL_UNIFORMARRAY_SIZE][4]; - }; - #endif -}; -typedef struct GLNVGfragUniforms GLNVGfragUniforms; - -struct GLNVGcontext { - GLNVGshader shader; - GLNVGtexture* textures; - float view[2]; - int ntextures; - int ctextures; - int textureId; - GLuint vertBuf; -#if defined NANOVG_GL3 - GLuint vertArr; -#endif -#if NANOVG_GL_USE_UNIFORMBUFFER - GLuint fragBuf; -#endif - int fragSize; - int flags; - - // Per frame buffers - GLNVGcall* calls; - int ccalls; - int ncalls; - GLNVGpath* paths; - int cpaths; - int npaths; - struct NVGvertex* verts; - int cverts; - int nverts; - unsigned char* uniforms; - int cuniforms; - int nuniforms; - - // cached state - #if NANOVG_GL_USE_STATE_FILTER - GLuint boundTexture; - GLuint stencilMask; - GLenum stencilFunc; - GLint stencilFuncRef; - GLuint stencilFuncMask; - GLNVGblend blendFunc; - #endif - - int dummyTex; - - // Function pointers - glActiveTexturePROC ActiveTexture; - glAttachShaderPROC AttachShader; - glBindAttribLocationPROC BindAttribLocation; - glBindBufferPROC BindBuffer; - glBindBufferRangePROC BindBufferRange; - glBindFramebufferPROC BindFramebuffer; - glBindRenderbufferPROC BindRenderbuffer; - glBindTexturePROC BindTexture; - glBindVertexArrayPROC BindVertexArray; - glBlendFuncPROC BlendFunc; - glBlendFuncSeparatePROC BlendFuncSeparate; - glBufferDataPROC BufferData; - glCheckFramebufferStatusPROC CheckFramebufferStatus; - glColorMaskPROC ColorMask; - glCompileShaderPROC CompileShader; - glCreateProgramPROC CreateProgram; - glCreateShaderPROC CreateShader; - glCullFacePROC CullFace; - glDeleteBuffersPROC DeleteBuffers; - glDeleteFramebuffersPROC DeleteFramebuffers; - glDeleteProgramPROC DeleteProgram; - glDeleteRenderbuffersPROC DeleteRenderbuffers; - glDeleteShaderPROC DeleteShader; - glDeleteTexturesPROC DeleteTextures; - glDeleteVertexArraysPROC DeleteVertexArrays; - glDetachShaderPROC DetachShader; - glDisablePROC Disable; - glDisableVertexAttribArrayPROC DisableVertexAttribArray; - glDrawArraysPROC DrawArrays; - glEnablePROC Enable; - glEnableVertexAttribArrayPROC EnableVertexAttribArray; - glFinishPROC Finish; - glFlushPROC Flush; - glFramebufferRenderbufferPROC FramebufferRenderbuffer; - glFramebufferTexture2DPROC FramebufferTexture2D; - glFrontFacePROC FrontFace; - glGenBuffersPROC GenBuffers; - glGenFramebuffersPROC GenFramebuffers; - glGenRenderbuffersPROC GenRenderbuffers; - glGenTexturesPROC GenTextures; - glGenVertexArraysPROC GenVertexArrays; - glGenerateMipmapPROC GenerateMipmap; - glGetErrorPROC GetError; - glGetIntegervPROC GetIntegerv; - glGetProgramivPROC GetProgramiv; - glGetProgramInfoLogPROC GetProgramInfoLog; - glGetShaderivPROC GetShaderiv; - glGetShaderInfoLogPROC GetShaderInfoLog; - glGetUniformBlockIndexPROC GetUniformBlockIndex; - glGetUniformLocationPROC GetUniformLocation; - glLinkProgramPROC LinkProgram; - glPixelStoreiPROC PixelStorei; - glRenderbufferStoragePROC RenderbufferStorage; - glShaderSourcePROC ShaderSource; - glStencilFuncPROC StencilFunc; - glStencilMaskPROC StencilMask; - glStencilOpPROC StencilOp; - glStencilOpSeparatePROC StencilOpSeparate; - glTexImage2DPROC TexImage2D; - glTexParameteriPROC TexParameteri; - glTexSubImage2DPROC TexSubImage2D; - glUniform1iPROC Uniform1i; - glUniform2fvPROC Uniform2fv; - glUniform4fvPROC Uniform4fv; - glUniformBlockBindingPROC UniformBlockBinding; - glUseProgramPROC UseProgram; - glVertexAttribPointerPROC VertexAttribPointer; -}; -typedef struct GLNVGcontext GLNVGcontext; - -static int glnvg__maxi(int a, int b) { return a > b ? a : b; } - -#ifdef NANOVG_GLES2 -static unsigned int glnvg__nearestPow2(unsigned int num) -{ - unsigned n = num > 0 ? num - 1 : 0; - n |= n >> 1; - n |= n >> 2; - n |= n >> 4; - n |= n >> 8; - n |= n >> 16; - n++; - return n; -} -#endif - -static void glnvg__bindTexture(GLNVGcontext* gl, GLuint tex) -{ -#if NANOVG_GL_USE_STATE_FILTER - if (gl->boundTexture != tex) { - gl->boundTexture = tex; - glBindTexture(GL_TEXTURE_2D, tex); - } -#else - glBindTexture(GL_TEXTURE_2D, tex); -#endif -} - -static void glnvg__stencilMask(GLNVGcontext* gl, GLuint mask) -{ -#if NANOVG_GL_USE_STATE_FILTER - if (gl->stencilMask != mask) { - gl->stencilMask = mask; - glStencilMask(mask); - } -#else - glStencilMask(mask); -#endif -} - -static void glnvg__stencilFunc(GLNVGcontext* gl, GLenum func, GLint ref, GLuint mask) -{ -#if NANOVG_GL_USE_STATE_FILTER - if ((gl->stencilFunc != func) || - (gl->stencilFuncRef != ref) || - (gl->stencilFuncMask != mask)) { - - gl->stencilFunc = func; - gl->stencilFuncRef = ref; - gl->stencilFuncMask = mask; - glStencilFunc(func, ref, mask); - } -#else - glStencilFunc(func, ref, mask); -#endif -} -static void glnvg__blendFuncSeparate(GLNVGcontext* gl, const GLNVGblend* blend) -{ -#if NANOVG_GL_USE_STATE_FILTER - if ((gl->blendFunc.srcRGB != blend->srcRGB) || - (gl->blendFunc.dstRGB != blend->dstRGB) || - (gl->blendFunc.srcAlpha != blend->srcAlpha) || - (gl->blendFunc.dstAlpha != blend->dstAlpha)) { - - gl->blendFunc = *blend; - glBlendFuncSeparate(blend->srcRGB, blend->dstRGB, blend->srcAlpha,blend->dstAlpha); - } -#else - glBlendFuncSeparate(blend->srcRGB, blend->dstRGB, blend->srcAlpha,blend->dstAlpha); -#endif -} - -static GLNVGtexture* glnvg__allocTexture(GLNVGcontext* gl) -{ - GLNVGtexture* tex = NULL; - int i; - - for (i = 0; i < gl->ntextures; i++) { - if (gl->textures[i].id == 0) { - tex = &gl->textures[i]; - break; - } - } - if (tex == NULL) { - if (gl->ntextures+1 > gl->ctextures) { - GLNVGtexture* textures; - int ctextures = glnvg__maxi(gl->ntextures+1, 4) + gl->ctextures/2; // 1.5x Overallocate - textures = (GLNVGtexture*)NVG_REALLOC(gl->textures, sizeof(GLNVGtexture)*ctextures); - if (textures == NULL) return NULL; - gl->textures = textures; - gl->ctextures = ctextures; - } - tex = &gl->textures[gl->ntextures++]; - } - - memset(tex, 0, sizeof(*tex)); - tex->id = ++gl->textureId; - - return tex; -} - -static GLNVGtexture* glnvg__findTexture(GLNVGcontext* gl, int id) -{ - int i; - for (i = 0; i < gl->ntextures; i++) - if (gl->textures[i].id == id) - return &gl->textures[i]; - return NULL; -} - -static int glnvg__deleteTexture(GLNVGcontext* gl, int id) -{ - int i; - for (i = 0; i < gl->ntextures; i++) { - if (gl->textures[i].id == id) { - if (gl->textures[i].tex != 0 && (gl->textures[i].flags & NVG_IMAGE_NODELETE) == 0) - glDeleteTextures(1, &gl->textures[i].tex); - memset(&gl->textures[i], 0, sizeof(gl->textures[i])); - return 1; - } - } - return 0; -} - -static void glnvg__dumpShaderError(GLNVGcontext* gl, GLuint shader, const char* name, const char* type) -{ - GLchar str[512+1]; - GLsizei len = 0; - glGetShaderInfoLog(shader, 512, &len, str); - if (len > 512) len = 512; - str[len] = '\0'; - printf("Shader %s/%s error:\n%s\n", name, type, str); -} - -static void glnvg__dumpProgramError(GLNVGcontext* gl, GLuint prog, const char* name) -{ - GLchar str[512+1]; - GLsizei len = 0; - glGetProgramInfoLog(prog, 512, &len, str); - if (len > 512) len = 512; - str[len] = '\0'; - printf("Program %s error:\n%s\n", name, str); -} - -static void glnvg__checkError(GLNVGcontext* gl, const char* str) -{ - GLenum err; - if ((gl->flags & NVG_DEBUG) == 0) return; - err = glGetError(); - if (err != GL_NO_ERROR) { - printf("Error %08x after %s\n", err, str); - return; - } -} - -static int glnvg__createShader(GLNVGcontext* gl, GLNVGshader* shader, const char* name, const char* header, const char* opts, const char* vshader, const char* fshader) -{ - GLint status; - GLuint prog, vert, frag; - const char* str[3]; - str[0] = header; - str[1] = opts != NULL ? opts : ""; - - memset(shader, 0, sizeof(*shader)); - - prog = glCreateProgram(); - vert = glCreateShader(GL_VERTEX_SHADER); - frag = glCreateShader(GL_FRAGMENT_SHADER); - str[2] = vshader; - glShaderSource(vert, 3, str, 0); - str[2] = fshader; - glShaderSource(frag, 3, str, 0); - - glCompileShader(vert); - glGetShaderiv(vert, GL_COMPILE_STATUS, &status); - if (status != GL_TRUE) { - glnvg__dumpShaderError(gl, vert, name, "vert"); - return 0; - } - - glCompileShader(frag); - glGetShaderiv(frag, GL_COMPILE_STATUS, &status); - if (status != GL_TRUE) { - glnvg__dumpShaderError(gl, frag, name, "frag"); - return 0; - } - - glAttachShader(prog, vert); - glAttachShader(prog, frag); - - glBindAttribLocation(prog, 0, "vertex"); - glBindAttribLocation(prog, 1, "tcoord"); - - glLinkProgram(prog); - glGetProgramiv(prog, GL_LINK_STATUS, &status); - if (status != GL_TRUE) { - glnvg__dumpProgramError(gl, prog, name); - return 0; - } - - shader->prog = prog; - shader->vert = vert; - shader->frag = frag; - - return 1; -} - -static void glnvg__deleteShader(GLNVGcontext* gl, GLNVGshader* shader) -{ - if (shader->prog != 0) - glDeleteProgram(shader->prog); - if (shader->vert != 0) - glDeleteShader(shader->vert); - if (shader->frag != 0) - glDeleteShader(shader->frag); -} - -static void glnvg__getUniforms(GLNVGcontext* gl, GLNVGshader* shader) -{ - shader->loc[GLNVG_LOC_VIEWSIZE] = glGetUniformLocation(shader->prog, "viewSize"); - shader->loc[GLNVG_LOC_TEX] = glGetUniformLocation(shader->prog, "tex"); - -#if NANOVG_GL_USE_UNIFORMBUFFER - shader->loc[GLNVG_LOC_FRAG] = glGetUniformBlockIndex(shader->prog, "frag"); -#else - shader->loc[GLNVG_LOC_FRAG] = glGetUniformLocation(shader->prog, "frag"); -#endif -} - -static int glnvg__renderCreateTexture(void* uptr, int type, int w, int h, int imageFlags, const unsigned char* data); - -static int glnvg__renderCreate(void* uptr) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - int align = 4; - - // TODO: mediump float may not be enough for GLES2 in iOS. - // see the following discussion: https://github.com/memononen/nanovg/issues/46 - static const char* shaderHeader = -#if defined NANOVG_GL2 - "#define NANOVG_GL2 1\n" -#elif defined NANOVG_GL3 - "#version 150 core\n" - "#define NANOVG_GL3 1\n" -#elif defined NANOVG_GLES2 - "#version 100\n" - "#define NANOVG_GL2 1\n" -#elif defined NANOVG_GLES3 - "#version 300 es\n" - "#define NANOVG_GL3 1\n" -#endif - -#if NANOVG_GL_USE_UNIFORMBUFFER - "#define USE_UNIFORMBUFFER 1\n" -#else - "#define UNIFORMARRAY_SIZE 11\n" -#endif - "\n"; - - static const char* fillVertShader = - "#ifdef NANOVG_GL3\n" - " uniform vec2 viewSize;\n" - " in vec2 vertex;\n" - " in vec2 tcoord;\n" - " out vec2 ftcoord;\n" - " out vec2 fpos;\n" - "#else\n" - " uniform vec2 viewSize;\n" - " attribute vec2 vertex;\n" - " attribute vec2 tcoord;\n" - " varying vec2 ftcoord;\n" - " varying vec2 fpos;\n" - "#endif\n" - "void main(void) {\n" - " ftcoord = tcoord;\n" - " fpos = vertex;\n" - " gl_Position = vec4(2.0*vertex.x/viewSize.x - 1.0, 1.0 - 2.0*vertex.y/viewSize.y, 0, 1);\n" - "}\n"; - - static const char* fillFragShader = - "#ifdef GL_ES\n" - "#if defined(GL_FRAGMENT_PRECISION_HIGH) || defined(NANOVG_GL3)\n" - " precision highp float;\n" - "#else\n" - " precision mediump float;\n" - "#endif\n" - "#endif\n" - "#ifdef NANOVG_GL3\n" - "#ifdef USE_UNIFORMBUFFER\n" - " layout(std140) uniform frag {\n" - " mat3 scissorMat;\n" - " mat3 paintMat;\n" - " vec4 innerCol;\n" - " vec4 outerCol;\n" - " vec2 scissorExt;\n" - " vec2 scissorScale;\n" - " vec2 extent;\n" - " float radius;\n" - " float feather;\n" - " float strokeMult;\n" - " float strokeThr;\n" - " int texType;\n" - " int type;\n" - " };\n" - "#else\n" // NANOVG_GL3 && !USE_UNIFORMBUFFER - " uniform vec4 frag[UNIFORMARRAY_SIZE];\n" - "#endif\n" - " uniform sampler2D tex;\n" - " in vec2 ftcoord;\n" - " in vec2 fpos;\n" - " out vec4 outColor;\n" - "#else\n" // !NANOVG_GL3 - " uniform vec4 frag[UNIFORMARRAY_SIZE];\n" - " uniform sampler2D tex;\n" - " varying vec2 ftcoord;\n" - " varying vec2 fpos;\n" - "#endif\n" - "#ifndef USE_UNIFORMBUFFER\n" - " #define scissorMat mat3(frag[0].xyz, frag[1].xyz, frag[2].xyz)\n" - " #define paintMat mat3(frag[3].xyz, frag[4].xyz, frag[5].xyz)\n" - " #define innerCol frag[6]\n" - " #define outerCol frag[7]\n" - " #define scissorExt frag[8].xy\n" - " #define scissorScale frag[8].zw\n" - " #define extent frag[9].xy\n" - " #define radius frag[9].z\n" - " #define feather frag[9].w\n" - " #define strokeMult frag[10].x\n" - " #define strokeThr frag[10].y\n" - " #define texType int(frag[10].z)\n" - " #define type int(frag[10].w)\n" - "#endif\n" - "\n" - "float sdroundrect(vec2 pt, vec2 ext, float rad) {\n" - " vec2 ext2 = ext - vec2(rad,rad);\n" - " vec2 d = abs(pt) - ext2;\n" - " return min(max(d.x,d.y),0.0) + length(max(d,0.0)) - rad;\n" - "}\n" - "\n" - "// Scissoring\n" - "float scissorMask(vec2 p) {\n" - " vec2 sc = (abs((scissorMat * vec3(p,1.0)).xy) - scissorExt);\n" - " sc = vec2(0.5,0.5) - sc * scissorScale;\n" - " return clamp(sc.x,0.0,1.0) * clamp(sc.y,0.0,1.0);\n" - "}\n" - "#ifdef EDGE_AA\n" - "// Stroke - from [0..1] to clipped pyramid, where the slope is 1px.\n" - "float strokeMask() {\n" - " return min(1.0, (1.0-abs(ftcoord.x*2.0-1.0))*strokeMult) * min(1.0, ftcoord.y);\n" - "}\n" - "#endif\n" - "\n" - "void main(void) {\n" - " vec4 result;\n" - " float scissor = scissorMask(fpos);\n" - "#ifdef EDGE_AA\n" - " float strokeAlpha = strokeMask();\n" - "#else\n" - " float strokeAlpha = 1.0;\n" - "#endif\n" - " if (type == 0) { // Gradient\n" - " // Calculate gradient color using box gradient\n" - " vec2 pt = (paintMat * vec3(fpos,1.0)).xy;\n" - " float d = clamp((sdroundrect(pt, extent, radius) + feather*0.5) / feather, 0.0, 1.0);\n" - " vec4 color = mix(innerCol,outerCol,d);\n" - " // Combine alpha\n" - " color *= strokeAlpha * scissor;\n" - " result = color;\n" - " } else if (type == 1) { // Image\n" - " // Calculate color fron texture\n" - " vec2 pt = (paintMat * vec3(fpos,1.0)).xy / extent;\n" - "#ifdef NANOVG_GL3\n" - " vec4 color = texture(tex, pt);\n" - "#else\n" - " vec4 color = texture2D(tex, pt);\n" - "#endif\n" - " if (texType == 1) color = vec4(color.xyz*color.w,color.w);" - " if (texType == 2) color = vec4(color.x);" - " // Apply color tint and alpha.\n" - " color *= innerCol;\n" - " // Combine alpha\n" - " color *= strokeAlpha * scissor;\n" - " result = color;\n" - " } else if (type == 2) { // Stencil fill\n" - " result = vec4(1,1,1,1);\n" - " } else if (type == 3) { // Textured tris\n" - "#ifdef NANOVG_GL3\n" - " vec4 color = texture(tex, ftcoord);\n" - "#else\n" - " vec4 color = texture2D(tex, ftcoord);\n" - "#endif\n" - " if (texType == 1) color = vec4(color.xyz*color.w,color.w);" - " if (texType == 2) color = vec4(color.x);" - " color *= scissor;\n" - " result = color * innerCol;\n" - " }\n" - "#ifdef EDGE_AA\n" - "#ifdef STENCIL_STROKES\n" - " if (strokeAlpha < strokeThr) discard;\n" - "#else\n" - " if (strokeAlpha < strokeThr) result.a = 0.0;\n" - "#endif\n" - "#endif\n" - "#ifdef NANOVG_GL3\n" - " outColor = result;\n" - "#else\n" - " gl_FragColor = result;\n" - "#endif\n" - "}\n"; - - glnvg__checkError(gl, "init"); - - char* opts = NULL; - if (gl->flags & NVG_ANTIALIAS) { - if (gl->flags & NVG_STENCIL_STROKES) - opts = "#define EDGE_AA 1\n#define STENCIL_STROKES 1\n"; - else - opts = "#define EDGE_AA 1\n"; - } - if (glnvg__createShader(gl, &gl->shader, "shader", shaderHeader, opts, fillVertShader, fillFragShader) == 0) - return 0; - - glnvg__checkError(gl, "uniform locations"); - glnvg__getUniforms(gl, &gl->shader); - - // Create dynamic vertex array -#if defined NANOVG_GL3 - glGenVertexArrays(1, &gl->vertArr); -#endif - glGenBuffers(1, &gl->vertBuf); - -#if NANOVG_GL_USE_UNIFORMBUFFER - // Create UBOs - glUniformBlockBinding(gl->shader.prog, gl->shader.loc[GLNVG_LOC_FRAG], GLNVG_FRAG_BINDING); - glGenBuffers(1, &gl->fragBuf); - glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, &align); -#endif - gl->fragSize = sizeof(GLNVGfragUniforms) + align - sizeof(GLNVGfragUniforms) % align; - - // Some platforms does not allow to have samples to unset textures. - // Create empty one which is bound when there's no texture specified. - gl->dummyTex = glnvg__renderCreateTexture(gl, NVG_TEXTURE_ALPHA, 1, 1, 0, NULL); - - glnvg__checkError(gl, "create done"); - - glFinish(); - - return 1; -} - -static int glnvg__renderCreateTexture(void* uptr, int type, int w, int h, int imageFlags, const unsigned char* data) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - GLNVGtexture* tex = glnvg__allocTexture(gl); - - if (tex == NULL) return 0; - -#ifdef NANOVG_GLES2 - // Check for non-power of 2. - if (glnvg__nearestPow2(w) != (unsigned int)w || glnvg__nearestPow2(h) != (unsigned int)h) { - // No repeat - if ((imageFlags & NVG_IMAGE_REPEATX) != 0 || (imageFlags & NVG_IMAGE_REPEATY) != 0) { - printf("Repeat X/Y is not supported for non power-of-two textures (%d x %d)\n", w, h); - imageFlags &= ~(NVG_IMAGE_REPEATX | NVG_IMAGE_REPEATY); - } - // No mips. - if (imageFlags & NVG_IMAGE_GENERATE_MIPMAPS) { - printf("Mip-maps is not support for non power-of-two textures (%d x %d)\n", w, h); - imageFlags &= ~NVG_IMAGE_GENERATE_MIPMAPS; - } - } -#endif - - glGenTextures(1, &tex->tex); - tex->width = w; - tex->height = h; - tex->type = type; - tex->flags = imageFlags; - glnvg__bindTexture(gl, tex->tex); - - glPixelStorei(GL_UNPACK_ALIGNMENT,1); -#ifndef NANOVG_GLES2 - glPixelStorei(GL_UNPACK_ROW_LENGTH, tex->width); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); -#endif - -#if defined (NANOVG_GL2) - // GL 1.4 and later has support for generating mipmaps using a tex parameter. - if (imageFlags & NVG_IMAGE_GENERATE_MIPMAPS) { - glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); - } -#endif - - if (type == NVG_TEXTURE_RGBA) - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); - else -#if defined(NANOVG_GLES2) || defined (NANOVG_GL2) - glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, w, h, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, data); -#elif defined(NANOVG_GLES3) - glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, w, h, 0, GL_RED, GL_UNSIGNED_BYTE, data); -#else - glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, w, h, 0, GL_RED, GL_UNSIGNED_BYTE, data); -#endif - - if (imageFlags & NVG_IMAGE_GENERATE_MIPMAPS) { - if (imageFlags & NVG_IMAGE_NEAREST) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - } - } else { - if (imageFlags & NVG_IMAGE_NEAREST) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - } - } - - if (imageFlags & NVG_IMAGE_NEAREST) { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - } else { - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - } - - if (imageFlags & NVG_IMAGE_REPEATX) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - - if (imageFlags & NVG_IMAGE_REPEATY) - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - else - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); -#ifndef NANOVG_GLES2 - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); -#endif - - // The new way to build mipmaps on GLES and GL3 -#if !defined(NANOVG_GL2) - if (imageFlags & NVG_IMAGE_GENERATE_MIPMAPS) { - glGenerateMipmap(GL_TEXTURE_2D); - } -#endif - - glnvg__checkError(gl, "create tex"); - glnvg__bindTexture(gl, 0); - - return tex->id; -} - - -static int glnvg__renderDeleteTexture(void* uptr, int image) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - return glnvg__deleteTexture(gl, image); -} - -static int glnvg__renderUpdateTexture(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - GLNVGtexture* tex = glnvg__findTexture(gl, image); - - if (tex == NULL) return 0; - glnvg__bindTexture(gl, tex->tex); - - glPixelStorei(GL_UNPACK_ALIGNMENT,1); - -#ifndef NANOVG_GLES2 - glPixelStorei(GL_UNPACK_ROW_LENGTH, tex->width); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, x); - glPixelStorei(GL_UNPACK_SKIP_ROWS, y); -#else - // No support for all of skip, need to update a whole row at a time. - if (tex->type == NVG_TEXTURE_RGBA) - data += y*tex->width*4; - else - data += y*tex->width; - x = 0; - w = tex->width; -#endif - - if (tex->type == NVG_TEXTURE_RGBA) - glTexSubImage2D(GL_TEXTURE_2D, 0, x,y, w,h, GL_RGBA, GL_UNSIGNED_BYTE, data); - else -#if defined(NANOVG_GLES2) || defined(NANOVG_GL2) - glTexSubImage2D(GL_TEXTURE_2D, 0, x,y, w,h, GL_LUMINANCE, GL_UNSIGNED_BYTE, data); -#else - glTexSubImage2D(GL_TEXTURE_2D, 0, x,y, w,h, GL_RED, GL_UNSIGNED_BYTE, data); -#endif - - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); -#ifndef NANOVG_GLES2 - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); -#endif - - glnvg__bindTexture(gl, 0); - - return 1; -} - -static int glnvg__renderGetTextureSize(void* uptr, int image, int* w, int* h) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - GLNVGtexture* tex = glnvg__findTexture(gl, image); - if (tex == NULL) return 0; - *w = tex->width; - *h = tex->height; - return 1; -} - -static void glnvg__xformToMat3x4(float* m3, float* t) -{ - m3[0] = t[0]; - m3[1] = t[1]; - m3[2] = 0.0f; - m3[3] = 0.0f; - m3[4] = t[2]; - m3[5] = t[3]; - m3[6] = 0.0f; - m3[7] = 0.0f; - m3[8] = t[4]; - m3[9] = t[5]; - m3[10] = 1.0f; - m3[11] = 0.0f; -} - -static NVGcolor glnvg__premulColor(NVGcolor c) -{ - c.r *= c.a; - c.g *= c.a; - c.b *= c.a; - return c; -} - -static int glnvg__convertPaint(GLNVGcontext* gl, GLNVGfragUniforms* frag, NVGpaint* paint, - NVGscissor* scissor, float width, float fringe, float strokeThr) -{ - GLNVGtexture* tex = NULL; - float invxform[6]; - - memset(frag, 0, sizeof(*frag)); - - frag->innerCol = glnvg__premulColor(paint->innerColor); - frag->outerCol = glnvg__premulColor(paint->outerColor); - - if (scissor->extent[0] < -0.5f || scissor->extent[1] < -0.5f) { - memset(frag->scissorMat, 0, sizeof(frag->scissorMat)); - frag->scissorExt[0] = 1.0f; - frag->scissorExt[1] = 1.0f; - frag->scissorScale[0] = 1.0f; - frag->scissorScale[1] = 1.0f; - } else { - nvgTransformInverse(invxform, scissor->xform); - glnvg__xformToMat3x4(frag->scissorMat, invxform); - frag->scissorExt[0] = scissor->extent[0]; - frag->scissorExt[1] = scissor->extent[1]; - frag->scissorScale[0] = sqrtf(scissor->xform[0]*scissor->xform[0] + scissor->xform[2]*scissor->xform[2]) / fringe; - frag->scissorScale[1] = sqrtf(scissor->xform[1]*scissor->xform[1] + scissor->xform[3]*scissor->xform[3]) / fringe; - } - - memcpy(frag->extent, paint->extent, sizeof(frag->extent)); - frag->strokeMult = (width*0.5f + fringe*0.5f) / fringe; - frag->strokeThr = strokeThr; - - if (paint->image != 0) { - tex = glnvg__findTexture(gl, paint->image); - if (tex == NULL) return 0; - if ((tex->flags & NVG_IMAGE_FLIPY) != 0) { - float m1[6], m2[6]; - nvgTransformTranslate(m1, 0.0f, frag->extent[1] * 0.5f); - nvgTransformMultiply(m1, paint->xform); - nvgTransformScale(m2, 1.0f, -1.0f); - nvgTransformMultiply(m2, m1); - nvgTransformTranslate(m1, 0.0f, -frag->extent[1] * 0.5f); - nvgTransformMultiply(m1, m2); - nvgTransformInverse(invxform, m1); - } else { - nvgTransformInverse(invxform, paint->xform); - } - frag->type = NSVG_SHADER_FILLIMG; - - #if NANOVG_GL_USE_UNIFORMBUFFER - if (tex->type == NVG_TEXTURE_RGBA) - frag->texType = (tex->flags & NVG_IMAGE_PREMULTIPLIED) ? 0 : 1; - else - frag->texType = 2; - #else - if (tex->type == NVG_TEXTURE_RGBA) - frag->texType = (tex->flags & NVG_IMAGE_PREMULTIPLIED) ? 0.0f : 1.0f; - else - frag->texType = 2.0f; - #endif -// printf("frag->texType = %d\n", frag->texType); - } else { - frag->type = NSVG_SHADER_FILLGRAD; - frag->radius = paint->radius; - frag->feather = paint->feather; - nvgTransformInverse(invxform, paint->xform); - } - - glnvg__xformToMat3x4(frag->paintMat, invxform); - - return 1; -} - -static GLNVGfragUniforms* nvg__fragUniformPtr(GLNVGcontext* gl, int i); - -static void glnvg__setUniforms(GLNVGcontext* gl, int uniformOffset, int image) -{ - GLNVGtexture* tex = NULL; -#if NANOVG_GL_USE_UNIFORMBUFFER - glBindBufferRange(GL_UNIFORM_BUFFER, GLNVG_FRAG_BINDING, gl->fragBuf, uniformOffset, sizeof(GLNVGfragUniforms)); -#else - GLNVGfragUniforms* frag = nvg__fragUniformPtr(gl, uniformOffset); - glUniform4fv(gl->shader.loc[GLNVG_LOC_FRAG], NANOVG_GL_UNIFORMARRAY_SIZE, &(frag->uniformArray[0][0])); -#endif - - if (image != 0) { - tex = glnvg__findTexture(gl, image); - } - // If no image is set, use empty texture - if (tex == NULL) { - tex = glnvg__findTexture(gl, gl->dummyTex); - } - glnvg__bindTexture(gl, tex != NULL ? tex->tex : 0); - glnvg__checkError(gl, "tex paint tex"); -} - -static void glnvg__renderViewport(void* uptr, float width, float height, float devicePixelRatio) -{ - NVG_NOTUSED(devicePixelRatio); - GLNVGcontext* gl = (GLNVGcontext*)uptr; - gl->view[0] = width; - gl->view[1] = height; -} - -static void glnvg__fill(GLNVGcontext* gl, GLNVGcall* call) -{ - GLNVGpath* paths = &gl->paths[call->pathOffset]; - int i, npaths = call->pathCount; - - // Draw shapes - glEnable(GL_STENCIL_TEST); - glnvg__stencilMask(gl, 0xff); - glnvg__stencilFunc(gl, GL_ALWAYS, 0, 0xff); - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - - // set bindpoint for solid loc - glnvg__setUniforms(gl, call->uniformOffset, 0); - glnvg__checkError(gl, "fill simple"); - - glStencilOpSeparate(GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR_WRAP); - glStencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_DECR_WRAP); - glDisable(GL_CULL_FACE); - for (i = 0; i < npaths; i++) - glDrawArrays(GL_TRIANGLE_FAN, paths[i].fillOffset, paths[i].fillCount); - glEnable(GL_CULL_FACE); - - // Draw anti-aliased pixels - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - - glnvg__setUniforms(gl, call->uniformOffset + gl->fragSize, call->image); - glnvg__checkError(gl, "fill fill"); - - if (gl->flags & NVG_ANTIALIAS) { - glnvg__stencilFunc(gl, GL_EQUAL, 0x00, 0xff); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - // Draw fringes - for (i = 0; i < npaths; i++) - glDrawArrays(GL_TRIANGLE_STRIP, paths[i].strokeOffset, paths[i].strokeCount); - } - - // Draw fill - glnvg__stencilFunc(gl, GL_NOTEQUAL, 0x0, 0xff); - glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO); - glDrawArrays(GL_TRIANGLE_STRIP, call->triangleOffset, call->triangleCount); - - glDisable(GL_STENCIL_TEST); -} - -static void glnvg__convexFill(GLNVGcontext* gl, GLNVGcall* call) -{ - GLNVGpath* paths = &gl->paths[call->pathOffset]; - int i, npaths = call->pathCount; - - glnvg__setUniforms(gl, call->uniformOffset, call->image); - glnvg__checkError(gl, "convex fill"); - - for (i = 0; i < npaths; i++) { - glDrawArrays(GL_TRIANGLE_FAN, paths[i].fillOffset, paths[i].fillCount); - // Draw fringes - if (paths[i].strokeCount > 0) { - glDrawArrays(GL_TRIANGLE_STRIP, paths[i].strokeOffset, paths[i].strokeCount); - } - } -} - -static void glnvg__stroke(GLNVGcontext* gl, GLNVGcall* call) -{ - GLNVGpath* paths = &gl->paths[call->pathOffset]; - int npaths = call->pathCount, i; - - if (gl->flags & NVG_STENCIL_STROKES) { - - glEnable(GL_STENCIL_TEST); - glnvg__stencilMask(gl, 0xff); - - // Fill the stroke base without overlap - glnvg__stencilFunc(gl, GL_EQUAL, 0x0, 0xff); - glStencilOp(GL_KEEP, GL_KEEP, GL_INCR); - glnvg__setUniforms(gl, call->uniformOffset + gl->fragSize, call->image); - glnvg__checkError(gl, "stroke fill 0"); - for (i = 0; i < npaths; i++) - glDrawArrays(GL_TRIANGLE_STRIP, paths[i].strokeOffset, paths[i].strokeCount); - - // Draw anti-aliased pixels. - glnvg__setUniforms(gl, call->uniformOffset, call->image); - glnvg__stencilFunc(gl, GL_EQUAL, 0x00, 0xff); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - for (i = 0; i < npaths; i++) - glDrawArrays(GL_TRIANGLE_STRIP, paths[i].strokeOffset, paths[i].strokeCount); - - // Clear stencil buffer. - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - glnvg__stencilFunc(gl, GL_ALWAYS, 0x0, 0xff); - glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO); - glnvg__checkError(gl, "stroke fill 1"); - for (i = 0; i < npaths; i++) - glDrawArrays(GL_TRIANGLE_STRIP, paths[i].strokeOffset, paths[i].strokeCount); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - - glDisable(GL_STENCIL_TEST); - -// glnvg__convertPaint(gl, nvg__fragUniformPtr(gl, call->uniformOffset + gl->fragSize), paint, scissor, strokeWidth, fringe, 1.0f - 0.5f/255.0f); - - } else { - glnvg__setUniforms(gl, call->uniformOffset, call->image); - glnvg__checkError(gl, "stroke fill"); - // Draw Strokes - for (i = 0; i < npaths; i++) - glDrawArrays(GL_TRIANGLE_STRIP, paths[i].strokeOffset, paths[i].strokeCount); - } -} - -static void glnvg__triangles(GLNVGcontext* gl, GLNVGcall* call) -{ - glnvg__setUniforms(gl, call->uniformOffset, call->image); - glnvg__checkError(gl, "triangles fill"); - - glDrawArrays(GL_TRIANGLES, call->triangleOffset, call->triangleCount); -} - -static void glnvg__renderCancel(void* uptr) { - GLNVGcontext* gl = (GLNVGcontext*)uptr; - gl->nverts = 0; - gl->npaths = 0; - gl->ncalls = 0; - gl->nuniforms = 0; -} - -static GLenum glnvg_convertBlendFuncFactor(int factor) -{ - if (factor == NVG_ZERO) - return GL_ZERO; - if (factor == NVG_ONE) - return GL_ONE; - if (factor == NVG_SRC_COLOR) - return GL_SRC_COLOR; - if (factor == NVG_ONE_MINUS_SRC_COLOR) - return GL_ONE_MINUS_SRC_COLOR; - if (factor == NVG_DST_COLOR) - return GL_DST_COLOR; - if (factor == NVG_ONE_MINUS_DST_COLOR) - return GL_ONE_MINUS_DST_COLOR; - if (factor == NVG_SRC_ALPHA) - return GL_SRC_ALPHA; - if (factor == NVG_ONE_MINUS_SRC_ALPHA) - return GL_ONE_MINUS_SRC_ALPHA; - if (factor == NVG_DST_ALPHA) - return GL_DST_ALPHA; - if (factor == NVG_ONE_MINUS_DST_ALPHA) - return GL_ONE_MINUS_DST_ALPHA; - if (factor == NVG_SRC_ALPHA_SATURATE) - return GL_SRC_ALPHA_SATURATE; - return GL_INVALID_ENUM; -} - -static GLNVGblend glnvg__blendCompositeOperation(NVGcompositeOperationState op) -{ - GLNVGblend blend; - blend.srcRGB = glnvg_convertBlendFuncFactor(op.srcRGB); - blend.dstRGB = glnvg_convertBlendFuncFactor(op.dstRGB); - blend.srcAlpha = glnvg_convertBlendFuncFactor(op.srcAlpha); - blend.dstAlpha = glnvg_convertBlendFuncFactor(op.dstAlpha); - if (blend.srcRGB == GL_INVALID_ENUM || blend.dstRGB == GL_INVALID_ENUM || blend.srcAlpha == GL_INVALID_ENUM || blend.dstAlpha == GL_INVALID_ENUM) - { - blend.srcRGB = GL_ONE; - blend.dstRGB = GL_ONE_MINUS_SRC_ALPHA; - blend.srcAlpha = GL_ONE; - blend.dstAlpha = GL_ONE_MINUS_SRC_ALPHA; - } - return blend; -} - -static void glnvg__renderFlush(void* uptr) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - int i; - - if (gl->ncalls > 0) { - - // Setup require GL state. - glUseProgram(gl->shader.prog); - - glEnable(GL_CULL_FACE); - glCullFace(GL_BACK); - glFrontFace(GL_CCW); - glEnable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - glDisable(GL_SCISSOR_TEST); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - glStencilMask(0xffffffff); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - glStencilFunc(GL_ALWAYS, 0, 0xffffffff); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, 0); - #if NANOVG_GL_USE_STATE_FILTER - gl->boundTexture = 0; - gl->stencilMask = 0xffffffff; - gl->stencilFunc = GL_ALWAYS; - gl->stencilFuncRef = 0; - gl->stencilFuncMask = 0xffffffff; - gl->blendFunc.srcRGB = GL_INVALID_ENUM; - gl->blendFunc.srcAlpha = GL_INVALID_ENUM; - gl->blendFunc.dstRGB = GL_INVALID_ENUM; - gl->blendFunc.dstAlpha = GL_INVALID_ENUM; - #endif - -#if NANOVG_GL_USE_UNIFORMBUFFER - // Upload ubo for frag shaders - glBindBuffer(GL_UNIFORM_BUFFER, gl->fragBuf); - glBufferData(GL_UNIFORM_BUFFER, gl->nuniforms * gl->fragSize, gl->uniforms, GL_STREAM_DRAW); -#endif - - // Upload vertex data -#if defined NANOVG_GL3 - glBindVertexArray(gl->vertArr); -#endif - glBindBuffer(GL_ARRAY_BUFFER, gl->vertBuf); - glBufferData(GL_ARRAY_BUFFER, gl->nverts * sizeof(NVGvertex), gl->verts, GL_STREAM_DRAW); - glEnableVertexAttribArray(0); - glEnableVertexAttribArray(1); - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(NVGvertex), (const GLvoid*)(size_t)0); - glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(NVGvertex), (const GLvoid*)(0 + 2*sizeof(float))); - - // Set view and texture just once per frame. - glUniform1i(gl->shader.loc[GLNVG_LOC_TEX], 0); - glUniform2fv(gl->shader.loc[GLNVG_LOC_VIEWSIZE], 1, gl->view); - -#if NANOVG_GL_USE_UNIFORMBUFFER - glBindBuffer(GL_UNIFORM_BUFFER, gl->fragBuf); -#endif - - for (i = 0; i < gl->ncalls; i++) { - GLNVGcall* call = &gl->calls[i]; - glnvg__blendFuncSeparate(gl,&call->blendFunc); - if (call->type == GLNVG_FILL) - glnvg__fill(gl, call); - else if (call->type == GLNVG_CONVEXFILL) - glnvg__convexFill(gl, call); - else if (call->type == GLNVG_STROKE) - glnvg__stroke(gl, call); - else if (call->type == GLNVG_TRIANGLES) - glnvg__triangles(gl, call); - } - - glDisableVertexAttribArray(0); - glDisableVertexAttribArray(1); -#if defined NANOVG_GL3 - glBindVertexArray(0); -#endif - glDisable(GL_CULL_FACE); - glBindBuffer(GL_ARRAY_BUFFER, 0); - glUseProgram(0); - glnvg__bindTexture(gl, 0); - } - - // Reset calls - gl->nverts = 0; - gl->npaths = 0; - gl->ncalls = 0; - gl->nuniforms = 0; -} - -static int glnvg__maxVertCount(const NVGpath* paths, int npaths) -{ - int i, count = 0; - for (i = 0; i < npaths; i++) { - count += paths[i].nfill; - count += paths[i].nstroke; - } - return count; -} - -static GLNVGcall* glnvg__allocCall(GLNVGcontext* gl) -{ - GLNVGcall* ret = NULL; - if (gl->ncalls+1 > gl->ccalls) { - GLNVGcall* calls; - int ccalls = glnvg__maxi(gl->ncalls+1, 128) + gl->ccalls/2; // 1.5x Overallocate - calls = (GLNVGcall*)NVG_REALLOC(gl->calls, sizeof(GLNVGcall) * ccalls); - if (calls == NULL) return NULL; - gl->calls = calls; - gl->ccalls = ccalls; - } - ret = &gl->calls[gl->ncalls++]; - memset(ret, 0, sizeof(GLNVGcall)); - return ret; -} - -static int glnvg__allocPaths(GLNVGcontext* gl, int n) -{ - int ret = 0; - if (gl->npaths+n > gl->cpaths) { - GLNVGpath* paths; - int cpaths = glnvg__maxi(gl->npaths + n, 128) + gl->cpaths/2; // 1.5x Overallocate - paths = (GLNVGpath*)NVG_REALLOC(gl->paths, sizeof(GLNVGpath) * cpaths); - if (paths == NULL) return -1; - gl->paths = paths; - gl->cpaths = cpaths; - } - ret = gl->npaths; - gl->npaths += n; - return ret; -} - -static int glnvg__allocVerts(GLNVGcontext* gl, int n) -{ - int ret = 0; - if (gl->nverts+n > gl->cverts) { - NVGvertex* verts; - int cverts = glnvg__maxi(gl->nverts + n, 4096) + gl->cverts/2; // 1.5x Overallocate - verts = (NVGvertex*)NVG_REALLOC(gl->verts, sizeof(NVGvertex) * cverts); - if (verts == NULL) return -1; - gl->verts = verts; - gl->cverts = cverts; - } - ret = gl->nverts; - gl->nverts += n; - return ret; -} - -static int glnvg__allocFragUniforms(GLNVGcontext* gl, int n) -{ - int ret = 0, structSize = gl->fragSize; - if (gl->nuniforms+n > gl->cuniforms) { - unsigned char* uniforms; - int cuniforms = glnvg__maxi(gl->nuniforms+n, 128) + gl->cuniforms/2; // 1.5x Overallocate - uniforms = (unsigned char*)NVG_REALLOC(gl->uniforms, structSize * cuniforms); - if (uniforms == NULL) return -1; - gl->uniforms = uniforms; - gl->cuniforms = cuniforms; - } - ret = gl->nuniforms * structSize; - gl->nuniforms += n; - return ret; -} - -static GLNVGfragUniforms* nvg__fragUniformPtr(GLNVGcontext* gl, int i) -{ - return (GLNVGfragUniforms*)&gl->uniforms[i]; -} - -static void glnvg__vset(NVGvertex* vtx, float x, float y, float u, float v) -{ - vtx->x = x; - vtx->y = y; - vtx->u = u; - vtx->v = v; -} - -static void glnvg__renderFill(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, - const float* bounds, const NVGpath* paths, int npaths) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - GLNVGcall* call = glnvg__allocCall(gl); - NVGvertex* quad; - GLNVGfragUniforms* frag; - int i, maxverts, offset; - - if (call == NULL) return; - - call->type = GLNVG_FILL; - call->triangleCount = 4; - call->pathOffset = glnvg__allocPaths(gl, npaths); - if (call->pathOffset == -1) goto error; - call->pathCount = npaths; - call->image = paint->image; - call->blendFunc = glnvg__blendCompositeOperation(compositeOperation); - - if (npaths == 1 && paths[0].convex) - { - call->type = GLNVG_CONVEXFILL; - call->triangleCount = 0; // Bounding box fill quad not needed for convex fill - } - - // Allocate vertices for all the paths. - maxverts = glnvg__maxVertCount(paths, npaths) + call->triangleCount; - offset = glnvg__allocVerts(gl, maxverts); - if (offset == -1) goto error; - - for (i = 0; i < npaths; i++) { - GLNVGpath* copy = &gl->paths[call->pathOffset + i]; - const NVGpath* path = &paths[i]; - memset(copy, 0, sizeof(GLNVGpath)); - if (path->nfill > 0) { - copy->fillOffset = offset; - copy->fillCount = path->nfill; - memcpy(&gl->verts[offset], path->fill, sizeof(NVGvertex) * path->nfill); - offset += path->nfill; - } - if (path->nstroke > 0) { - copy->strokeOffset = offset; - copy->strokeCount = path->nstroke; - memcpy(&gl->verts[offset], path->stroke, sizeof(NVGvertex) * path->nstroke); - offset += path->nstroke; - } - } - - // Setup uniforms for draw calls - if (call->type == GLNVG_FILL) { - // Quad - call->triangleOffset = offset; - quad = &gl->verts[call->triangleOffset]; - glnvg__vset(&quad[0], bounds[2], bounds[3], 0.5f, 1.0f); - glnvg__vset(&quad[1], bounds[2], bounds[1], 0.5f, 1.0f); - glnvg__vset(&quad[2], bounds[0], bounds[3], 0.5f, 1.0f); - glnvg__vset(&quad[3], bounds[0], bounds[1], 0.5f, 1.0f); - - call->uniformOffset = glnvg__allocFragUniforms(gl, 2); - if (call->uniformOffset == -1) goto error; - // Simple shader for stencil - frag = nvg__fragUniformPtr(gl, call->uniformOffset); - memset(frag, 0, sizeof(*frag)); - frag->strokeThr = -1.0f; - frag->type = NSVG_SHADER_SIMPLE; - // Fill shader - glnvg__convertPaint(gl, nvg__fragUniformPtr(gl, call->uniformOffset + gl->fragSize), paint, scissor, fringe, fringe, -1.0f); - } else { - call->uniformOffset = glnvg__allocFragUniforms(gl, 1); - if (call->uniformOffset == -1) goto error; - // Fill shader - glnvg__convertPaint(gl, nvg__fragUniformPtr(gl, call->uniformOffset), paint, scissor, fringe, fringe, -1.0f); - } - - return; - -error: - // We get here if call alloc was ok, but something else is not. - // Roll back the last call to prevent drawing it. - if (gl->ncalls > 0) gl->ncalls--; -} - -static void glnvg__renderStroke(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, - float strokeWidth, const NVGpath* paths, int npaths) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - GLNVGcall* call = glnvg__allocCall(gl); - int i, maxverts, offset; - - if (call == NULL) return; - - call->type = GLNVG_STROKE; - call->pathOffset = glnvg__allocPaths(gl, npaths); - if (call->pathOffset == -1) goto error; - call->pathCount = npaths; - call->image = paint->image; - call->blendFunc = glnvg__blendCompositeOperation(compositeOperation); - - // Allocate vertices for all the paths. - maxverts = glnvg__maxVertCount(paths, npaths); - offset = glnvg__allocVerts(gl, maxverts); - if (offset == -1) goto error; - - for (i = 0; i < npaths; i++) { - GLNVGpath* copy = &gl->paths[call->pathOffset + i]; - const NVGpath* path = &paths[i]; - memset(copy, 0, sizeof(GLNVGpath)); - if (path->nstroke) { - copy->strokeOffset = offset; - copy->strokeCount = path->nstroke; - memcpy(&gl->verts[offset], path->stroke, sizeof(NVGvertex) * path->nstroke); - offset += path->nstroke; - } - } - - if (gl->flags & NVG_STENCIL_STROKES) { - // Fill shader - call->uniformOffset = glnvg__allocFragUniforms(gl, 2); - if (call->uniformOffset == -1) goto error; - - glnvg__convertPaint(gl, nvg__fragUniformPtr(gl, call->uniformOffset), paint, scissor, strokeWidth, fringe, -1.0f); - glnvg__convertPaint(gl, nvg__fragUniformPtr(gl, call->uniformOffset + gl->fragSize), paint, scissor, strokeWidth, fringe, 1.0f - 0.5f/255.0f); - - } else { - // Fill shader - call->uniformOffset = glnvg__allocFragUniforms(gl, 1); - if (call->uniformOffset == -1) goto error; - glnvg__convertPaint(gl, nvg__fragUniformPtr(gl, call->uniformOffset), paint, scissor, strokeWidth, fringe, -1.0f); - } - - return; - -error: - // We get here if call alloc was ok, but something else is not. - // Roll back the last call to prevent drawing it. - if (gl->ncalls > 0) gl->ncalls--; -} - -static void glnvg__renderTriangles(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, - const NVGvertex* verts, int nverts, float fringe) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - GLNVGcall* call = glnvg__allocCall(gl); - GLNVGfragUniforms* frag; - - if (call == NULL) return; - - call->type = GLNVG_TRIANGLES; - call->image = paint->image; - call->blendFunc = glnvg__blendCompositeOperation(compositeOperation); - - // Allocate vertices for all the paths. - call->triangleOffset = glnvg__allocVerts(gl, nverts); - if (call->triangleOffset == -1) goto error; - call->triangleCount = nverts; - - memcpy(&gl->verts[call->triangleOffset], verts, sizeof(NVGvertex) * nverts); - - // Fill shader - call->uniformOffset = glnvg__allocFragUniforms(gl, 1); - if (call->uniformOffset == -1) goto error; - frag = nvg__fragUniformPtr(gl, call->uniformOffset); - glnvg__convertPaint(gl, frag, paint, scissor, 1.0f, fringe, -1.0f); - frag->type = NSVG_SHADER_IMG; - - return; - -error: - // We get here if call alloc was ok, but something else is not. - // Roll back the last call to prevent drawing it. - if (gl->ncalls > 0) gl->ncalls--; -} - -static void glnvg__renderDelete(void* uptr) -{ - GLNVGcontext* gl = (GLNVGcontext*)uptr; - int i; - if (gl == NULL) return; - - glnvg__deleteShader(gl, &gl->shader); - -#if NANOVG_GL3 -#if NANOVG_GL_USE_UNIFORMBUFFER - if (gl->fragBuf != 0) - glDeleteBuffers(1, &gl->fragBuf); -#endif - if (gl->vertArr != 0) - glDeleteVertexArrays(1, &gl->vertArr); -#endif - if (gl->vertBuf != 0) - glDeleteBuffers(1, &gl->vertBuf); - - for (i = 0; i < gl->ntextures; i++) { - if (gl->textures[i].tex != 0 && (gl->textures[i].flags & NVG_IMAGE_NODELETE) == 0) - glDeleteTextures(1, &gl->textures[i].tex); - } - NVG_FREE(gl->textures); - - NVG_FREE(gl->paths); - NVG_FREE(gl->verts); - NVG_FREE(gl->uniforms); - NVG_FREE(gl->calls); - - NVG_FREE(gl); -} - - -NVGcontext* EXT(nvgCreate)(JNIEnv* env, int flags) -{ - jclass NanoVGGLConfig = (*env)->FindClass(env, "org/lwjgl/nanovg/NanoVGGLConfig"); - jmethodID config = (*env)->GetStaticMethodID(env, NanoVGGLConfig, CONFIG_METHOD, "(J)V"); - - NVGparams params; - NVGcontext* ctx = NULL; - GLNVGcontext* gl = (GLNVGcontext*)NVG_MALLOC(sizeof(GLNVGcontext)); - if (gl == NULL) goto error; - memset(gl, 0, sizeof(GLNVGcontext)); - - (*env)->CallStaticVoidMethod(env, NanoVGGLConfig, config, (jlong)(uintptr_t)&gl->ActiveTexture); - if ( (*env)->ExceptionCheck(env) ) - goto error; - - memset(¶ms, 0, sizeof(params)); - params.renderCreate = glnvg__renderCreate; - params.renderCreateTexture = glnvg__renderCreateTexture; - params.renderDeleteTexture = glnvg__renderDeleteTexture; - params.renderUpdateTexture = glnvg__renderUpdateTexture; - params.renderGetTextureSize = glnvg__renderGetTextureSize; - params.renderViewport = glnvg__renderViewport; - params.renderCancel = glnvg__renderCancel; - params.renderFlush = glnvg__renderFlush; - params.renderFill = glnvg__renderFill; - params.renderStroke = glnvg__renderStroke; - params.renderTriangles = glnvg__renderTriangles; - params.renderDelete = glnvg__renderDelete; - params.userPtr = gl; - params.edgeAntiAlias = flags & NVG_ANTIALIAS ? 1 : 0; - - gl->flags = flags; - - ctx = nvgCreateInternal(¶ms); - if (ctx == NULL) goto error; - - return ctx; - -error: - // 'gl' is freed by nvgDeleteInternal. - if (ctx != NULL) nvgDeleteInternal(ctx); - return NULL; -} - -void EXT(nvgDelete)(NVGcontext* ctx) -{ - nvgDeleteInternal(ctx); -} - -int EXT(nvglCreateImageFromHandle)(NVGcontext* ctx, GLuint textureId, int w, int h, int imageFlags) -{ - GLNVGcontext* gl = (GLNVGcontext*)nvgInternalParams(ctx)->userPtr; - GLNVGtexture* tex = glnvg__allocTexture(gl); - - if (tex == NULL) return 0; - - tex->type = NVG_TEXTURE_RGBA; - tex->tex = textureId; - tex->flags = imageFlags; - tex->width = w; - tex->height = h; - - return tex->id; -} - -GLuint EXT(nvglImageHandle)(NVGcontext* ctx, int image) -{ - GLNVGcontext* gl = (GLNVGcontext*)nvgInternalParams(ctx)->userPtr; - GLNVGtexture* tex = glnvg__findTexture(gl, image); - return tex->tex; -} - -#endif /* NANOVG_GL_IMPLEMENTATION */ diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg_gl_utils.h b/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg_gl_utils.h deleted file mode 100644 index 42e503bb..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/nanovg_gl_utils.h +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) 2009-2013 Mikko Mononen memon@inside.org -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// -#ifndef NANOVG_GL_UTILS_H -#define NANOVG_GL_UTILS_H - -#if defined NANOVG_GL2 - #define EXT(name) name##GL2 -#elif defined NANOVG_GL3 - #define EXT(name) name##GL3 -#elif defined NANOVG_GLES2 - #define EXT(name) name##GLES2 -#elif defined NANOVG_GLES3 - #define EXT(name) name##GLES3 -#endif - -struct NVGLUframebuffer { - GLuint fbo; - GLuint rbo; - GLuint texture; - int image; -}; -typedef struct NVGLUframebuffer NVGLUframebuffer; - -// Helper function to create GL frame buffer to render to. -void EXT(nvgluBindFramebuffer)(NVGcontext* ctx, NVGLUframebuffer* fb); -NVGLUframebuffer* EXT(nvgluCreateFramebuffer)(NVGcontext* ctx, int w, int h, int imageFlags); -void EXT(nvgluDeleteFramebuffer)(NVGcontext* ctx, NVGLUframebuffer* fb); - -#endif // NANOVG_GL_UTILS_H - -#ifdef NANOVG_GL_IMPLEMENTATION - -static GLint defaultFBO = -1; - -NVGLUframebuffer* EXT(nvgluCreateFramebuffer)(NVGcontext* ctx, int w, int h, int imageFlags) -{ - GLNVGcontext* gl = (GLNVGcontext*)((NVGparams*)ctx)->userPtr; - GLint defaultFBO; - GLint defaultRBO; - NVGLUframebuffer* fb = NULL; - - glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO); - glGetIntegerv(GL_RENDERBUFFER_BINDING, &defaultRBO); - - fb = (NVGLUframebuffer*)NVG_MALLOC(sizeof(NVGLUframebuffer)); - if (fb == NULL) goto error; - memset(fb, 0, sizeof(NVGLUframebuffer)); - - fb->image = nvgCreateImageRGBA(ctx, w, h, imageFlags | NVG_IMAGE_FLIPY | NVG_IMAGE_PREMULTIPLIED, NULL); - - fb->texture = EXT(nvglImageHandle)(ctx, fb->image); - - // frame buffer object - glGenFramebuffers(1, &fb->fbo); - glBindFramebuffer(GL_FRAMEBUFFER, fb->fbo); - - // render buffer object - glGenRenderbuffers(1, &fb->rbo); - glBindRenderbuffer(GL_RENDERBUFFER, fb->rbo); - glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, w, h); - - // combine all - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fb->texture, 0); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, fb->rbo); - - if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { -#ifdef GL_DEPTH24_STENCIL8 - // If GL_STENCIL_INDEX8 is not supported, try GL_DEPTH24_STENCIL8 as a fallback. - // Some graphics cards require a depth buffer along with a stencil. - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, w, h); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fb->texture, 0); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, fb->rbo); - - if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) -#endif // GL_DEPTH24_STENCIL8 - goto error; - } - - glBindFramebuffer(GL_FRAMEBUFFER, defaultFBO); - glBindRenderbuffer(GL_RENDERBUFFER, defaultRBO); - return fb; -error: - glBindFramebuffer(GL_FRAMEBUFFER, defaultFBO); - glBindRenderbuffer(GL_RENDERBUFFER, defaultRBO); - EXT(nvgluDeleteFramebuffer)(ctx, fb); - return NULL; -} - -void EXT(nvgluBindFramebuffer)(NVGcontext* ctx, NVGLUframebuffer* fb) -{ - GLNVGcontext* gl = (GLNVGcontext*)((NVGparams*)ctx)->userPtr; - if (defaultFBO == -1) glGetIntegerv(GL_FRAMEBUFFER_BINDING, &defaultFBO); - glBindFramebuffer(GL_FRAMEBUFFER, fb != NULL ? fb->fbo : defaultFBO); -} - -void EXT(nvgluDeleteFramebuffer)(NVGcontext* ctx, NVGLUframebuffer* fb) -{ - GLNVGcontext* gl = (GLNVGcontext*)((NVGparams*)ctx)->userPtr; - if (fb == NULL) return; - if (fb->fbo != 0) - glDeleteFramebuffers(1, &fb->fbo); - if (fb->rbo != 0) - glDeleteRenderbuffers(1, &fb->rbo); - if (fb->image >= 0) - nvgDeleteImage(ctx, fb->image); - fb->fbo = 0; - fb->rbo = 0; - fb->texture = 0; - fb->image = -1; - NVG_FREE(fb); -} - -#endif // NANOVG_GL_IMPLEMENTATION diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_Blendish.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_Blendish.c deleted file mode 100644 index 26cd60c2..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_Blendish.c +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" - -#include "nanovg.h" -#define BLENDISH_IMPLEMENTATION -#define BLENDISH_NO_NVG_TYPEDEFS -#include "blendish.h" - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndSetTheme(JNIEnv *__env, jclass clazz, jlong themeAddress) { - BNDtheme *theme = (BNDtheme *)(uintptr_t)themeAddress; - UNUSED_PARAMS(__env, clazz) - bndSetTheme(*theme); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_Blendish_nbndGetTheme(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)bndGetTheme(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_bndSetIconImage(JNIEnv *__env, jclass clazz, jint image) { - UNUSED_PARAMS(__env, clazz) - bndSetIconImage(image); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_bndSetFont(JNIEnv *__env, jclass clazz, jint font) { - UNUSED_PARAMS(__env, clazz) - bndSetFont(font); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndLabel(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint iconid, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndLabel(ctx, x, y, w, h, iconid, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndToolButton(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags, jint state, jint iconid, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndToolButton(ctx, x, y, w, h, flags, (BNDwidgetState)state, iconid, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndRadioButton(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags, jint state, jint iconid, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndRadioButton(ctx, x, y, w, h, flags, (BNDwidgetState)state, iconid, label); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_Blendish_nbndTextFieldTextPosition(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint iconid, jlong textAddress, jint px, jint py) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *text = (char const *)(uintptr_t)textAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)bndTextFieldTextPosition(ctx, x, y, w, h, iconid, text, px, py); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndTextField(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags, jint state, jint iconid, jlong textAddress, jint cbegin, jint cend) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *text = (char const *)(uintptr_t)textAddress; - UNUSED_PARAMS(__env, clazz) - bndTextField(ctx, x, y, w, h, flags, (BNDwidgetState)state, iconid, text, cbegin, cend); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndOptionButton(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint state, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndOptionButton(ctx, x, y, w, h, (BNDwidgetState)state, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndChoiceButton(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags, jint state, jint iconid, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndChoiceButton(ctx, x, y, w, h, flags, (BNDwidgetState)state, iconid, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndColorButton(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - bndColorButton(ctx, x, y, w, h, flags, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndNumberField(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags, jint state, jlong labelAddress, jlong valueAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - char const *value = (char const *)(uintptr_t)valueAddress; - UNUSED_PARAMS(__env, clazz) - bndNumberField(ctx, x, y, w, h, flags, (BNDwidgetState)state, label, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndSlider(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags, jint state, jfloat progress, jlong labelAddress, jlong valueAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - char const *value = (char const *)(uintptr_t)valueAddress; - UNUSED_PARAMS(__env, clazz) - bndSlider(ctx, x, y, w, h, flags, (BNDwidgetState)state, progress, label, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndScrollBar(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint state, jfloat offset, jfloat size) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndScrollBar(ctx, x, y, w, h, (BNDwidgetState)state, offset, size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndMenuBackground(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint flags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndMenuBackground(ctx, x, y, w, h, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndMenuLabel(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint iconid, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndMenuLabel(ctx, x, y, w, h, iconid, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndMenuItem(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint state, jint iconid, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndMenuItem(ctx, x, y, w, h, (BNDwidgetState)state, iconid, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndTooltipBackground(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndTooltipBackground(ctx, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndNodePort(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jint state, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - bndNodePort(ctx, x, y, (BNDwidgetState)state, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndNodeWire(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x0, jfloat y0, jfloat x1, jfloat y1, jint state0, jint state1) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndNodeWire(ctx, x0, y0, x1, y1, (BNDwidgetState)state0, (BNDwidgetState)state1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndColoredNodeWire(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x0, jfloat y0, jfloat x1, jfloat y1, jlong color0Address, jlong color1Address) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color0 = (NVGcolor *)(uintptr_t)color0Address; - NVGcolor *color1 = (NVGcolor *)(uintptr_t)color1Address; - UNUSED_PARAMS(__env, clazz) - bndColoredNodeWire(ctx, x0, y0, x1, y1, *color0, *color1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndNodeBackground(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint state, jint iconid, jlong labelAddress, jlong titleColorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - NVGcolor *titleColor = (NVGcolor *)(uintptr_t)titleColorAddress; - UNUSED_PARAMS(__env, clazz) - bndNodeBackground(ctx, x, y, w, h, (BNDwidgetState)state, iconid, label, *titleColor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndSplitterWidgets(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndSplitterWidgets(ctx, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndJoinAreaOverlay(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint vertical, jint mirror) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndJoinAreaOverlay(ctx, x, y, w, h, vertical, mirror); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_nanovg_Blendish_nbndLabelWidth(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint iconid, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)bndLabelWidth(ctx, iconid, label); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_nanovg_Blendish_nbndLabelHeight(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint iconid, jlong labelAddress, jfloat width) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)bndLabelHeight(ctx, iconid, label, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndTransparent(JNIEnv *__env, jclass clazz, jlong colorAddress, jlong __result) { - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = bndTransparent(*color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndOffsetColor(JNIEnv *__env, jclass clazz, jlong colorAddress, jint delta, jlong __result) { - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = bndOffsetColor(*color, delta); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndSelectCorners__JFI(JNIEnv *__env, jclass clazz, jlong radiusesAddress, jfloat r, jint flags) { - float *radiuses = (float *)(uintptr_t)radiusesAddress; - UNUSED_PARAMS(__env, clazz) - bndSelectCorners(radiuses, r, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndInnerColors(JNIEnv *__env, jclass clazz, jlong shade_topAddress, jlong shade_downAddress, jlong themeAddress, jint state, jint flipActive) { - NVGcolor *shade_top = (NVGcolor *)(uintptr_t)shade_topAddress; - NVGcolor *shade_down = (NVGcolor *)(uintptr_t)shade_downAddress; - BNDwidgetTheme const *theme = (BNDwidgetTheme const *)(uintptr_t)themeAddress; - UNUSED_PARAMS(__env, clazz) - bndInnerColors(shade_top, shade_down, theme, (BNDwidgetState)state, flipActive); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndTextColor(JNIEnv *__env, jclass clazz, jlong themeAddress, jint state, jlong __result) { - BNDwidgetTheme const *theme = (BNDwidgetTheme const *)(uintptr_t)themeAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = bndTextColor(theme, (BNDwidgetState)state); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndScrollHandleRect__JJJJFF(JNIEnv *__env, jclass clazz, jlong xAddress, jlong yAddress, jlong wAddress, jlong hAddress, jfloat offset, jfloat size) { - float *x = (float *)(uintptr_t)xAddress; - float *y = (float *)(uintptr_t)yAddress; - float *w = (float *)(uintptr_t)wAddress; - float *h = (float *)(uintptr_t)hAddress; - UNUSED_PARAMS(__env, clazz) - bndScrollHandleRect(x, y, w, h, offset, size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndRoundedBox(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat cr0, jfloat cr1, jfloat cr2, jfloat cr3) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndRoundedBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndBackground(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndBackground(ctx, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndBevel(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndBevel(ctx, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndBevelInset(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat cr2, jfloat cr3) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndBevelInset(ctx, x, y, w, h, cr2, cr3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndIcon(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jint iconid) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndIcon(ctx, x, y, iconid); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndDropShadow(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat r, jfloat feather, jfloat alpha) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - bndDropShadow(ctx, x, y, w, h, r, feather, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndInnerBox(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat cr0, jfloat cr1, jfloat cr2, jfloat cr3, jlong shade_topAddress, jlong shade_downAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *shade_top = (NVGcolor *)(uintptr_t)shade_topAddress; - NVGcolor *shade_down = (NVGcolor *)(uintptr_t)shade_downAddress; - UNUSED_PARAMS(__env, clazz) - bndInnerBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3, *shade_top, *shade_down); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndOutlineBox(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat cr0, jfloat cr1, jfloat cr2, jfloat cr3, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - bndOutlineBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndIconLabelValue(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint iconid, jlong colorAddress, jint align, jfloat fontsize, jlong labelAddress, jlong valueAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - char const *value = (char const *)(uintptr_t)valueAddress; - UNUSED_PARAMS(__env, clazz) - bndIconLabelValue(ctx, x, y, w, h, iconid, *color, align, fontsize, label, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndNodeIconLabel(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint iconid, jlong colorAddress, jlong shadowColorAddress, jint align, jfloat fontsize, jlong labelAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - NVGcolor *shadowColor = (NVGcolor *)(uintptr_t)shadowColorAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - bndNodeIconLabel(ctx, x, y, w, h, iconid, *color, *shadowColor, align, fontsize, label); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_Blendish_nbndIconLabelTextPosition(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint iconid, jfloat fontsize, jlong labelAddress, jint px, jint py) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)bndIconLabelTextPosition(ctx, x, y, w, h, iconid, fontsize, label, px, py); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndIconLabelCaret(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jint iconid, jlong colorAddress, jfloat fontsize, jlong labelAddress, jlong caretcolorAddress, jint cbegin, jint cend) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - char const *label = (char const *)(uintptr_t)labelAddress; - NVGcolor *caretcolor = (NVGcolor *)(uintptr_t)caretcolorAddress; - UNUSED_PARAMS(__env, clazz) - bndIconLabelCaret(ctx, x, y, w, h, iconid, *color, fontsize, label, *caretcolor, cbegin, cend); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndCheck(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat ox, jfloat oy, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - bndCheck(ctx, ox, oy, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndArrow(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat s, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - bndArrow(ctx, x, y, s, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndUpDownArrow(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat s, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - bndUpDownArrow(ctx, x, y, s, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndNodeArrowDown(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat s, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - bndNodeArrowDown(ctx, x, y, s, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndNodeWireColor(JNIEnv *__env, jclass clazz, jlong themeAddress, jint state, jlong __result) { - BNDnodeTheme const *theme = (BNDnodeTheme const *)(uintptr_t)themeAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = bndNodeWireColor(theme, (BNDwidgetState)state); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndSelectCorners___3FFI(JNIEnv *__env, jclass clazz, jfloatArray radiusesAddress, jfloat r, jint flags) { - jfloat *radiuses = (*__env)->GetFloatArrayElements(__env, radiusesAddress, NULL); - UNUSED_PARAMS(__env, clazz) - bndSelectCorners((float *)radiuses, r, flags); - (*__env)->ReleaseFloatArrayElements(__env, radiusesAddress, radiuses, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_Blendish_nbndScrollHandleRect___3F_3F_3F_3FFF(JNIEnv *__env, jclass clazz, jfloatArray xAddress, jfloatArray yAddress, jfloatArray wAddress, jfloatArray hAddress, jfloat offset, jfloat size) { - jfloat *x = (*__env)->GetFloatArrayElements(__env, xAddress, NULL); - jfloat *y = (*__env)->GetFloatArrayElements(__env, yAddress, NULL); - jfloat *w = (*__env)->GetFloatArrayElements(__env, wAddress, NULL); - jfloat *h = (*__env)->GetFloatArrayElements(__env, hAddress, NULL); - UNUSED_PARAMS(__env, clazz) - bndScrollHandleRect((float *)x, (float *)y, (float *)w, (float *)h, offset, size); - (*__env)->ReleaseFloatArrayElements(__env, hAddress, h, 0); - (*__env)->ReleaseFloatArrayElements(__env, wAddress, w, 0); - (*__env)->ReleaseFloatArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseFloatArrayElements(__env, xAddress, x, 0); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_LibNanoVG.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_LibNanoVG.c deleted file mode 100644 index f15648ca..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_LibNanoVG.c +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#define LWJGL_MALLOC_LIB org_lwjgl_nanovg_LibNanoVG -#include "lwjgl/lwjgl_malloc.h" diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoSVG.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoSVG.c deleted file mode 100644 index 53263e90..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoSVG.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "lwjgl/lwjgl_malloc.h" -#define NVG_MALLOC(sz) org_lwjgl_malloc(sz) -#define NVG_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define NVG_FREE(p) org_lwjgl_free(p) -DISABLE_WARNINGS() -#define NANOSVG_IMPLEMENTATION -#include "nanosvg.h" -#define NANOSVGRAST_IMPLEMENTATION -#include "nanosvgrast.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoSVG_nnsvgParseFromFile(JNIEnv *__env, jclass clazz, jlong filenameAddress, jlong unitsAddress, jfloat dpi) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - char const *units = (char const *)(uintptr_t)unitsAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nsvgParseFromFile(filename, units, dpi); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoSVG_nnsvgParse(JNIEnv *__env, jclass clazz, jlong inputAddress, jlong unitsAddress, jfloat dpi) { - char *input = (char *)(uintptr_t)inputAddress; - char const *units = (char const *)(uintptr_t)unitsAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nsvgParse(input, units, dpi); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoSVG_nnsvgDuplicatePath(JNIEnv *__env, jclass clazz, jlong pAddress) { - NSVGpath *p = (NSVGpath *)(uintptr_t)pAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nsvgDuplicatePath(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoSVG_nnsvgDelete(JNIEnv *__env, jclass clazz, jlong imageAddress) { - NSVGimage *image = (NSVGimage *)(uintptr_t)imageAddress; - UNUSED_PARAMS(__env, clazz) - nsvgDelete(image); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoSVG_nsvgCreateRasterizer(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nsvgCreateRasterizer(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoSVG_nnsvgRasterize(JNIEnv *__env, jclass clazz, jlong rAddress, jlong imageAddress, jfloat tx, jfloat ty, jfloat scale, jlong dstAddress, jint w, jint h, jint stride) { - NSVGrasterizer *r = (NSVGrasterizer *)(uintptr_t)rAddress; - NSVGimage *image = (NSVGimage *)(uintptr_t)imageAddress; - unsigned char *dst = (unsigned char *)(uintptr_t)dstAddress; - UNUSED_PARAMS(__env, clazz) - nsvgRasterize(r, image, tx, ty, scale, dst, w, h, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoSVG_nnsvgDeleteRasterizer(JNIEnv *__env, jclass clazz, jlong rasterizerAddress) { - NSVGrasterizer *rasterizer = (NSVGrasterizer *)(uintptr_t)rasterizerAddress; - UNUSED_PARAMS(__env, clazz) - nsvgDeleteRasterizer(rasterizer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVG.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVG.c deleted file mode 100644 index 3c56d815..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVG.c +++ /dev/null @@ -1,825 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "lwjgl/lwjgl_malloc.h" -#define NVG_MALLOC(sz) org_lwjgl_malloc(sz) -#define NVG_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define NVG_FREE(p) org_lwjgl_free(p) -DISABLE_WARNINGS() -#define STBI_MALLOC(sz) org_lwjgl_malloc(sz) -#define STBI_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define STBI_FREE(p) org_lwjgl_free(p) -#define STBI_FAILURE_USERMSG -#define STBI_ASSERT(x) -#define STB_IMAGE_IMPLEMENTATION -#define STB_IMAGE_STATIC -#define STBTT_malloc(x,u) ((void)(u),org_lwjgl_malloc(x)) -#define STBTT_free(x,u) ((void)(u),org_lwjgl_free(x)) -#define STBTT_assert -#define STB_TRUETYPE_IMPLEMENTATION -#define STBTT_STATIC -#include "nanovg.c" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgBeginFrame(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat windowWidth, jfloat windowHeight, jfloat devicePixelRatio) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgBeginFrame(ctx, windowWidth, windowHeight, devicePixelRatio); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCancelFrame(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgCancelFrame(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgEndFrame(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgEndFrame(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgGlobalCompositeOperation(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint op) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgGlobalCompositeOperation(ctx, op); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgGlobalCompositeBlendFunc(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint sfactor, jint dfactor) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgGlobalCompositeBlendFunc(ctx, sfactor, dfactor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgGlobalCompositeBlendFuncSeparate(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgGlobalCompositeBlendFuncSeparate(ctx, srcRGB, dstRGB, srcAlpha, dstAlpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRGB(JNIEnv *__env, jclass clazz, jbyte r, jbyte g, jbyte b, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgRGB((unsigned char)r, (unsigned char)g, (unsigned char)b); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRGBf(JNIEnv *__env, jclass clazz, jfloat r, jfloat g, jfloat b, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgRGBf(r, g, b); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRGBA(JNIEnv *__env, jclass clazz, jbyte r, jbyte g, jbyte b, jbyte a, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgRGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRGBAf(JNIEnv *__env, jclass clazz, jfloat r, jfloat g, jfloat b, jfloat a, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgRGBAf(r, g, b, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgLerpRGBA(JNIEnv *__env, jclass clazz, jlong c0Address, jlong c1Address, jfloat u, jlong __result) { - NVGcolor *c0 = (NVGcolor *)(uintptr_t)c0Address; - NVGcolor *c1 = (NVGcolor *)(uintptr_t)c1Address; - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgLerpRGBA(*c0, *c1, u); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransRGBA(JNIEnv *__env, jclass clazz, jlong c0Address, jbyte a, jlong __result) { - NVGcolor *c0 = (NVGcolor *)(uintptr_t)c0Address; - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgTransRGBA(*c0, (unsigned char)a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransRGBAf(JNIEnv *__env, jclass clazz, jlong c0Address, jfloat a, jlong __result) { - NVGcolor *c0 = (NVGcolor *)(uintptr_t)c0Address; - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgTransRGBAf(*c0, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgHSL(JNIEnv *__env, jclass clazz, jfloat h, jfloat s, jfloat l, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgHSL(h, s, l); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgHSLA(JNIEnv *__env, jclass clazz, jfloat h, jfloat s, jfloat l, jbyte a, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((NVGcolor*)(uintptr_t)__result) = nvgHSLA(h, s, l, (unsigned char)a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgSave(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgSave(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRestore(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgRestore(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgReset(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgReset(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgShapeAntiAlias(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint enabled) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgShapeAntiAlias(ctx, enabled); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgStrokeColor(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - nvgStrokeColor(ctx, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgStrokePaint(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong paintAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGpaint *paint = (NVGpaint *)(uintptr_t)paintAddress; - UNUSED_PARAMS(__env, clazz) - nvgStrokePaint(ctx, *paint); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFillColor(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong colorAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *color = (NVGcolor *)(uintptr_t)colorAddress; - UNUSED_PARAMS(__env, clazz) - nvgFillColor(ctx, *color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFillPaint(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong paintAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGpaint *paint = (NVGpaint *)(uintptr_t)paintAddress; - UNUSED_PARAMS(__env, clazz) - nvgFillPaint(ctx, *paint); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgMiterLimit(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat limit) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgMiterLimit(ctx, limit); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgStrokeWidth(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat size) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgStrokeWidth(ctx, size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgLineCap(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint cap) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgLineCap(ctx, cap); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgLineJoin(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint join) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgLineJoin(ctx, join); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgGlobalAlpha(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat alpha) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgGlobalAlpha(ctx, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgResetTransform(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgResetTransform(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransform(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat a, jfloat b, jfloat c, jfloat d, jfloat e, jfloat f) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransform(ctx, a, b, c, d, e, f); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTranslate(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgTranslate(ctx, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRotate(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat angle) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgRotate(ctx, angle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgSkewX(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat angle) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgSkewX(ctx, angle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgSkewY(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat angle) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgSkewY(ctx, angle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgScale(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgScale(ctx, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCurrentTransform__JJ(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong xformAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - float *xform = (float *)(uintptr_t)xformAddress; - UNUSED_PARAMS(__env, clazz) - nvgCurrentTransform(ctx, xform); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformIdentity__J(JNIEnv *__env, jclass clazz, jlong dstAddress) { - float *dst = (float *)(uintptr_t)dstAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformIdentity(dst); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformTranslate__JFF(JNIEnv *__env, jclass clazz, jlong dstAddress, jfloat tx, jfloat ty) { - float *dst = (float *)(uintptr_t)dstAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformTranslate(dst, tx, ty); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformScale__JFF(JNIEnv *__env, jclass clazz, jlong dstAddress, jfloat sx, jfloat sy) { - float *dst = (float *)(uintptr_t)dstAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformScale(dst, sx, sy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformRotate__JF(JNIEnv *__env, jclass clazz, jlong dstAddress, jfloat a) { - float *dst = (float *)(uintptr_t)dstAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformRotate(dst, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformSkewX__JF(JNIEnv *__env, jclass clazz, jlong dstAddress, jfloat a) { - float *dst = (float *)(uintptr_t)dstAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformSkewX(dst, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformSkewY__JF(JNIEnv *__env, jclass clazz, jlong dstAddress, jfloat a) { - float *dst = (float *)(uintptr_t)dstAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformSkewY(dst, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformMultiply__JJ(JNIEnv *__env, jclass clazz, jlong dstAddress, jlong srcAddress) { - float *dst = (float *)(uintptr_t)dstAddress; - float const *src = (float const *)(uintptr_t)srcAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformMultiply(dst, src); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformPremultiply__JJ(JNIEnv *__env, jclass clazz, jlong dstAddress, jlong srcAddress) { - float *dst = (float *)(uintptr_t)dstAddress; - float const *src = (float const *)(uintptr_t)srcAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformPremultiply(dst, src); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformInverse__JJ(JNIEnv *__env, jclass clazz, jlong dstAddress, jlong srcAddress) { - float *dst = (float *)(uintptr_t)dstAddress; - float const *src = (float const *)(uintptr_t)srcAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgTransformInverse(dst, src); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformPoint__JJJFF(JNIEnv *__env, jclass clazz, jlong dstxAddress, jlong dstyAddress, jlong xformAddress, jfloat srcx, jfloat srcy) { - float *dstx = (float *)(uintptr_t)dstxAddress; - float *dsty = (float *)(uintptr_t)dstyAddress; - float const *xform = (float const *)(uintptr_t)xformAddress; - UNUSED_PARAMS(__env, clazz) - nvgTransformPoint(dstx, dsty, xform, srcx, srcy); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_nanovg_NanoVG_nvgDegToRad(JNIEnv *__env, jclass clazz, jfloat deg) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)nvgDegToRad(deg); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_nanovg_NanoVG_nvgRadToDeg(JNIEnv *__env, jclass clazz, jfloat rad) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)nvgRadToDeg(rad); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCreateImage(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong filenameAddress, jint imageFlags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *filename = (char const *)(uintptr_t)filenameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgCreateImage(ctx, filename, imageFlags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCreateImageMem(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint imageFlags, jlong dataAddress, jint ndata) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - unsigned char *data = (unsigned char *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgCreateImageMem(ctx, imageFlags, data, ndata); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCreateImageRGBA(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint w, jint h, jint imageFlags, jlong dataAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - unsigned char const *data = (unsigned char const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgCreateImageRGBA(ctx, w, h, imageFlags, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgUpdateImage(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image, jlong dataAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - unsigned char const *data = (unsigned char const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - nvgUpdateImage(ctx, image, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgImageSize__JIJJ(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image, jlong wAddress, jlong hAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - int *w = (int *)(uintptr_t)wAddress; - int *h = (int *)(uintptr_t)hAddress; - UNUSED_PARAMS(__env, clazz) - nvgImageSize(ctx, image, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgDeleteImage(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgDeleteImage(ctx, image); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgLinearGradient(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat sx, jfloat sy, jfloat ex, jfloat ey, jlong icolAddress, jlong ocolAddress, jlong __result) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *icol = (NVGcolor *)(uintptr_t)icolAddress; - NVGcolor *ocol = (NVGcolor *)(uintptr_t)ocolAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGpaint*)(uintptr_t)__result) = nvgLinearGradient(ctx, sx, sy, ex, ey, *icol, *ocol); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgBoxGradient(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat r, jfloat f, jlong icolAddress, jlong ocolAddress, jlong __result) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *icol = (NVGcolor *)(uintptr_t)icolAddress; - NVGcolor *ocol = (NVGcolor *)(uintptr_t)ocolAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGpaint*)(uintptr_t)__result) = nvgBoxGradient(ctx, x, y, w, h, r, f, *icol, *ocol); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRadialGradient(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat cx, jfloat cy, jfloat inr, jfloat outr, jlong icolAddress, jlong ocolAddress, jlong __result) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGcolor *icol = (NVGcolor *)(uintptr_t)icolAddress; - NVGcolor *ocol = (NVGcolor *)(uintptr_t)ocolAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGpaint*)(uintptr_t)__result) = nvgRadialGradient(ctx, cx, cy, inr, outr, *icol, *ocol); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgImagePattern(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat ox, jfloat oy, jfloat ex, jfloat ey, jfloat angle, jint image, jfloat alpha, jlong __result) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - *((NVGpaint*)(uintptr_t)__result) = nvgImagePattern(ctx, ox, oy, ex, ey, angle, image, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgScissor(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgScissor(ctx, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgIntersectScissor(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgIntersectScissor(ctx, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgResetScissor(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgResetScissor(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgBeginPath(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgBeginPath(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgMoveTo(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgMoveTo(ctx, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgLineTo(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgLineTo(ctx, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgBezierTo(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat c1x, jfloat c1y, jfloat c2x, jfloat c2y, jfloat x, jfloat y) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgBezierTo(ctx, c1x, c1y, c2x, c2y, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgQuadTo(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat cx, jfloat cy, jfloat x, jfloat y) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgQuadTo(ctx, cx, cy, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgArcTo(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x1, jfloat y1, jfloat x2, jfloat y2, jfloat radius) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgArcTo(ctx, x1, y1, x2, y2, radius); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgClosePath(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgClosePath(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgPathWinding(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint dir) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgPathWinding(ctx, dir); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgArc(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat cx, jfloat cy, jfloat r, jfloat a0, jfloat a1, jint dir) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgArc(ctx, cx, cy, r, a0, a1, dir); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRect(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgRect(ctx, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRoundedRect(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat r) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgRoundedRect(ctx, x, y, w, h, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgRoundedRectVarying(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat w, jfloat h, jfloat radTopLeft, jfloat radTopRight, jfloat radBottomRight, jfloat radBottomLeft) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgRoundedRectVarying(ctx, x, y, w, h, radTopLeft, radTopRight, radBottomRight, radBottomLeft); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgEllipse(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat cx, jfloat cy, jfloat rx, jfloat ry) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgEllipse(ctx, cx, cy, rx, ry); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCircle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat cx, jfloat cy, jfloat r) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgCircle(ctx, cx, cy, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFill(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgFill(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgStroke(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgStroke(ctx); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCreateFont(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong nameAddress, jlong filenameAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *name = (char const *)(uintptr_t)nameAddress; - char const *filename = (char const *)(uintptr_t)filenameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgCreateFont(ctx, name, filename); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCreateFontAtIndex(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong nameAddress, jlong filenameAddress, jint fontIndex) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *name = (char const *)(uintptr_t)nameAddress; - char const *filename = (char const *)(uintptr_t)filenameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgCreateFontAtIndex(ctx, name, filename, fontIndex); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCreateFontMem(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong nameAddress, jlong dataAddress, jint ndata, jint freeData) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *name = (char const *)(uintptr_t)nameAddress; - unsigned char *data = (unsigned char *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgCreateFontMem(ctx, name, data, ndata, freeData); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCreateFontMemAtIndex(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong nameAddress, jlong dataAddress, jint ndata, jint freeData, jint fontIndex) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *name = (char const *)(uintptr_t)nameAddress; - unsigned char *data = (unsigned char *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgCreateFontMemAtIndex(ctx, name, data, ndata, freeData, fontIndex); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFindFont(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong nameAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *name = (char const *)(uintptr_t)nameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgFindFont(ctx, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgAddFallbackFontId(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint baseFont, jint fallbackFont) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgAddFallbackFontId(ctx, baseFont, fallbackFont); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgAddFallbackFont(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong baseFontAddress, jlong fallbackFontAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *baseFont = (char const *)(uintptr_t)baseFontAddress; - char const *fallbackFont = (char const *)(uintptr_t)fallbackFontAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgAddFallbackFont(ctx, baseFont, fallbackFont); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgResetFallbackFontsId(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint baseFont) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgResetFallbackFontsId(ctx, baseFont); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgResetFallbackFonts(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong baseFontAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *baseFont = (char const *)(uintptr_t)baseFontAddress; - UNUSED_PARAMS(__env, clazz) - nvgResetFallbackFonts(ctx, baseFont); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFontSize(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat size) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgFontSize(ctx, size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFontBlur(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat blur) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgFontBlur(ctx, blur); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextLetterSpacing(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat spacing) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgTextLetterSpacing(ctx, spacing); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextLineHeight(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat lineHeight) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgTextLineHeight(ctx, lineHeight); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextAlign(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint align) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgTextAlign(ctx, align); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFontFaceId(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint font) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgFontFaceId(ctx, font); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgFontFace(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fontAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *font = (char const *)(uintptr_t)fontAddress; - UNUSED_PARAMS(__env, clazz) - nvgFontFace(ctx, font); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgText(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jlong stringAddress, jlong endAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)nvgText(ctx, x, y, string, end); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextBox(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat breakRowWidth, jlong stringAddress, jlong endAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - UNUSED_PARAMS(__env, clazz) - nvgTextBox(ctx, x, y, breakRowWidth, string, end); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextBounds__JFFJJJ(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jlong stringAddress, jlong endAddress, jlong boundsAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - float *bounds = (float *)(uintptr_t)boundsAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)nvgTextBounds(ctx, x, y, string, end, bounds); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextBoxBounds__JFFFJJJ(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat breakRowWidth, jlong stringAddress, jlong endAddress, jlong boundsAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - float *bounds = (float *)(uintptr_t)boundsAddress; - UNUSED_PARAMS(__env, clazz) - nvgTextBoxBounds(ctx, x, y, breakRowWidth, string, end, bounds); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextGlyphPositions(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jlong stringAddress, jlong endAddress, jlong positionsAddress, jint maxPositions) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - NVGglyphPosition *positions = (NVGglyphPosition *)(uintptr_t)positionsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgTextGlyphPositions(ctx, x, y, string, end, positions, maxPositions); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextMetrics__JJJJ(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong ascenderAddress, jlong descenderAddress, jlong linehAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - float *ascender = (float *)(uintptr_t)ascenderAddress; - float *descender = (float *)(uintptr_t)descenderAddress; - float *lineh = (float *)(uintptr_t)linehAddress; - UNUSED_PARAMS(__env, clazz) - nvgTextMetrics(ctx, ascender, descender, lineh); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextBreakLines(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong stringAddress, jlong endAddress, jfloat breakRowWidth, jlong rowsAddress, jint maxRows) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - NVGtextRow *rows = (NVGtextRow *)(uintptr_t)rowsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvgTextBreakLines(ctx, string, end, breakRowWidth, rows, maxRows); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVG_nvgCreateInternal(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&nvgCreateInternal; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVG_nvgInternalParams(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&nvgInternalParams; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVG_nvgDeleteInternal(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&nvgDeleteInternal; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgCurrentTransform__J_3F(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloatArray xformAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - jfloat *xform = (*__env)->GetFloatArrayElements(__env, xformAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgCurrentTransform(ctx, (float *)xform); - (*__env)->ReleaseFloatArrayElements(__env, xformAddress, xform, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformIdentity___3F(JNIEnv *__env, jclass clazz, jfloatArray dstAddress) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformIdentity((float *)dst); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformTranslate___3FFF(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloat tx, jfloat ty) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformTranslate((float *)dst, tx, ty); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformScale___3FFF(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloat sx, jfloat sy) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformScale((float *)dst, sx, sy); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformRotate___3FF(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloat a) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformRotate((float *)dst, a); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformSkewX___3FF(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloat a) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformSkewX((float *)dst, a); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformSkewY___3FF(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloat a) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformSkewY((float *)dst, a); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformMultiply___3F_3F(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloatArray srcAddress) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - jfloat *src = (*__env)->GetFloatArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformMultiply((float *)dst, (float const *)src); - (*__env)->ReleaseFloatArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformPremultiply___3F_3F(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloatArray srcAddress) { - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - jfloat *src = (*__env)->GetFloatArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformPremultiply((float *)dst, (float const *)src); - (*__env)->ReleaseFloatArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformInverse___3F_3F(JNIEnv *__env, jclass clazz, jfloatArray dstAddress, jfloatArray srcAddress) { - jint __result; - jfloat *dst = (*__env)->GetFloatArrayElements(__env, dstAddress, NULL); - jfloat *src = (*__env)->GetFloatArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)nvgTransformInverse((float *)dst, (float const *)src); - (*__env)->ReleaseFloatArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseFloatArrayElements(__env, dstAddress, dst, 0); - return __result; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTransformPoint___3F_3F_3FFF(JNIEnv *__env, jclass clazz, jfloatArray dstxAddress, jfloatArray dstyAddress, jfloatArray xformAddress, jfloat srcx, jfloat srcy) { - jfloat *dstx = (*__env)->GetFloatArrayElements(__env, dstxAddress, NULL); - jfloat *dsty = (*__env)->GetFloatArrayElements(__env, dstyAddress, NULL); - jfloat *xform = (*__env)->GetFloatArrayElements(__env, xformAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTransformPoint((float *)dstx, (float *)dsty, (float const *)xform, srcx, srcy); - (*__env)->ReleaseFloatArrayElements(__env, xformAddress, xform, 0); - (*__env)->ReleaseFloatArrayElements(__env, dstyAddress, dsty, 0); - (*__env)->ReleaseFloatArrayElements(__env, dstxAddress, dstx, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgImageSize__JI_3I_3I(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image, jintArray wAddress, jintArray hAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - jint *w = (*__env)->GetIntArrayElements(__env, wAddress, NULL); - jint *h = (*__env)->GetIntArrayElements(__env, hAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgImageSize(ctx, image, (int *)w, (int *)h); - (*__env)->ReleaseIntArrayElements(__env, hAddress, h, 0); - (*__env)->ReleaseIntArrayElements(__env, wAddress, w, 0); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextBounds__JFFJJ_3F(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jlong stringAddress, jlong endAddress, jfloatArray boundsAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - jfloat __result; - jfloat *bounds = boundsAddress == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, boundsAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jfloat)nvgTextBounds(ctx, x, y, string, end, (float *)bounds); - if (bounds != NULL) { (*__env)->ReleaseFloatArrayElements(__env, boundsAddress, bounds, 0); } - return __result; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextBoxBounds__JFFFJJ_3F(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloat x, jfloat y, jfloat breakRowWidth, jlong stringAddress, jlong endAddress, jfloatArray boundsAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - char const *string = (char const *)(uintptr_t)stringAddress; - char const *end = (char const *)(uintptr_t)endAddress; - jfloat *bounds = boundsAddress == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, boundsAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTextBoxBounds(ctx, x, y, breakRowWidth, string, end, (float *)bounds); - if (bounds != NULL) { (*__env)->ReleaseFloatArrayElements(__env, boundsAddress, bounds, 0); } -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVG_nnvgTextMetrics__J_3F_3F_3F(JNIEnv *__env, jclass clazz, jlong ctxAddress, jfloatArray ascenderAddress, jfloatArray descenderAddress, jfloatArray linehAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - jfloat *ascender = ascenderAddress == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, ascenderAddress, NULL); - jfloat *descender = descenderAddress == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, descenderAddress, NULL); - jfloat *lineh = linehAddress == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, linehAddress, NULL); - UNUSED_PARAMS(__env, clazz) - nvgTextMetrics(ctx, (float *)ascender, (float *)descender, (float *)lineh); - if (lineh != NULL) { (*__env)->ReleaseFloatArrayElements(__env, linehAddress, lineh, 0); } - if (descender != NULL) { (*__env)->ReleaseFloatArrayElements(__env, descenderAddress, descender, 0); } - if (ascender != NULL) { (*__env)->ReleaseFloatArrayElements(__env, ascenderAddress, ascender, 0); } -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL2.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL2.c deleted file mode 100644 index c6f49a6b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL2.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "lwjgl/lwjgl_malloc.h" -#define NVG_MALLOC(sz) org_lwjgl_malloc(sz) -#define NVG_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define NVG_FREE(p) org_lwjgl_free(p) -DISABLE_WARNINGS() -#define NANOVG_GL2_IMPLEMENTATION -#include "nanovg.h" -#include "nanovg_gl.h" -#include "nanovg_gl_utils.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGL2_nnvglCreateImageFromHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint textureId, jint w, jint h, jint flags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglCreateImageFromHandleGL2(ctx, (GLuint)textureId, w, h, flags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGL2_nnvglImageHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglImageHandleGL2(ctx, image); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGL2_nnvgCreate(JNIEnv *__env, jclass clazz, jint flags) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)nvgCreateGL2(__env, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGL2_nnvgDelete(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgDeleteGL2(ctx); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGL2_nnvgluCreateFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint w, jint h, jint imageFlags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nvgluCreateFramebufferGL2(ctx, w, h, imageFlags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGL2_nnvgluBindFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluBindFramebufferGL2(ctx, fb); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGL2_nnvgluDeleteFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluDeleteFramebufferGL2(ctx, fb); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL3.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL3.c deleted file mode 100644 index b829a734..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGL3.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "lwjgl/lwjgl_malloc.h" -#define NVG_MALLOC(sz) org_lwjgl_malloc(sz) -#define NVG_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define NVG_FREE(p) org_lwjgl_free(p) -DISABLE_WARNINGS() -#define NANOVG_GL3_IMPLEMENTATION -#include "nanovg.h" -#include "nanovg_gl.h" -#include "nanovg_gl_utils.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGL3_nnvglCreateImageFromHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint textureId, jint w, jint h, jint flags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglCreateImageFromHandleGL3(ctx, (GLuint)textureId, w, h, flags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGL3_nnvglImageHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglImageHandleGL3(ctx, image); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGL3_nnvgCreate(JNIEnv *__env, jclass clazz, jint flags) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)nvgCreateGL3(__env, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGL3_nnvgDelete(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgDeleteGL3(ctx); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGL3_nnvgluCreateFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint w, jint h, jint imageFlags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nvgluCreateFramebufferGL3(ctx, w, h, imageFlags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGL3_nnvgluBindFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluBindFramebufferGL3(ctx, fb); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGL3_nnvgluDeleteFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluDeleteFramebufferGL3(ctx, fb); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES2.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES2.c deleted file mode 100644 index 43b9925c..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES2.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "lwjgl/lwjgl_malloc.h" -#define NVG_MALLOC(sz) org_lwjgl_malloc(sz) -#define NVG_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define NVG_FREE(p) org_lwjgl_free(p) -DISABLE_WARNINGS() -#define NANOVG_GLES2_IMPLEMENTATION -#include "nanovg.h" -#include "nanovg_gl.h" -#include "nanovg_gl_utils.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGLES2_nnvglCreateImageFromHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint textureId, jint w, jint h, jint flags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglCreateImageFromHandleGLES2(ctx, (GLuint)textureId, w, h, flags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGLES2_nnvglImageHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglImageHandleGLES2(ctx, image); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGLES2_nnvgCreate(JNIEnv *__env, jclass clazz, jint flags) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)nvgCreateGLES2(__env, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGLES2_nnvgDelete(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgDeleteGLES2(ctx); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGLES2_nnvgluCreateFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint w, jint h, jint imageFlags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nvgluCreateFramebufferGLES2(ctx, w, h, imageFlags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGLES2_nnvgluBindFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluBindFramebufferGLES2(ctx, fb); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGLES2_nnvgluDeleteFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluDeleteFramebufferGLES2(ctx, fb); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES3.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES3.c deleted file mode 100644 index 84fe24c3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_NanoVGGLES3.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "lwjgl/lwjgl_malloc.h" -#define NVG_MALLOC(sz) org_lwjgl_malloc(sz) -#define NVG_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define NVG_FREE(p) org_lwjgl_free(p) -DISABLE_WARNINGS() -#define NANOVG_GLES3_IMPLEMENTATION -#include "nanovg.h" -#include "nanovg_gl.h" -#include "nanovg_gl_utils.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGLES3_nnvglCreateImageFromHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint textureId, jint w, jint h, jint flags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglCreateImageFromHandleGLES3(ctx, (GLuint)textureId, w, h, flags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_NanoVGGLES3_nnvglImageHandle(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint image) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)nvglImageHandleGLES3(ctx, image); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGLES3_nnvgCreate(JNIEnv *__env, jclass clazz, jint flags) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)nvgCreateGLES3(__env, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGLES3_nnvgDelete(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - nvgDeleteGLES3(ctx); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_NanoVGGLES3_nnvgluCreateFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jint w, jint h, jint imageFlags) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)nvgluCreateFramebufferGLES3(ctx, w, h, imageFlags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGLES3_nnvgluBindFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluBindFramebufferGLES3(ctx, fb); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_NanoVGGLES3_nnvgluDeleteFramebuffer(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong fbAddress) { - NVGcontext *ctx = (NVGcontext *)(uintptr_t)ctxAddress; - NVGLUframebuffer *fb = (NVGLUframebuffer *)(uintptr_t)fbAddress; - UNUSED_PARAMS(__env, clazz) - nvgluDeleteFramebufferGLES3(ctx, fb); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_OUI.c b/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_OUI.c deleted file mode 100644 index 45f44204..00000000 --- a/FCLauncher/src/main/jni/lwjgl/nanovg/org_lwjgl_nanovg_OUI.c +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" - -#include -#include -#include -#include "lwjgl/lwjgl_malloc.h" -#define OUI_IMPLEMENTATION -#include "lwjgl/oui.h" - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_OUI_uiCreateContext(JNIEnv *__env, jclass clazz, jint item_capacity, jint buffer_capacity) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)uiCreateContext((unsigned int)item_capacity, (unsigned int)buffer_capacity); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiMakeCurrent(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - UIcontext *ctx = (UIcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - uiMakeCurrent(ctx); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiDestroyContext(JNIEnv *__env, jclass clazz, jlong ctxAddress) { - UIcontext *ctx = (UIcontext *)(uintptr_t)ctxAddress; - UNUSED_PARAMS(__env, clazz) - uiDestroyContext(ctx); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_OUI_uiGetContext(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)uiGetContext(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetCursor(JNIEnv *__env, jclass clazz, jint x, jint y) { - UNUSED_PARAMS(__env, clazz) - uiSetCursor(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetCursor(JNIEnv *__env, jclass clazz, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((UIvec2*)(uintptr_t)__result) = uiGetCursor(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetCursorDelta(JNIEnv *__env, jclass clazz, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((UIvec2*)(uintptr_t)__result) = uiGetCursorDelta(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetCursorStart(JNIEnv *__env, jclass clazz, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((UIvec2*)(uintptr_t)__result) = uiGetCursorStart(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetCursorStartDelta(JNIEnv *__env, jclass clazz, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((UIvec2*)(uintptr_t)__result) = uiGetCursorStartDelta(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiSetButton(JNIEnv *__env, jclass clazz, jint button, jint mod, jint enabled) { - UNUSED_PARAMS(__env, clazz) - uiSetButton((unsigned int)button, (unsigned int)mod, enabled); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetButton(JNIEnv *__env, jclass clazz, jint button) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetButton((unsigned int)button); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetClicks(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetClicks(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiSetKey(JNIEnv *__env, jclass clazz, jint key, jint mod, jint enabled) { - UNUSED_PARAMS(__env, clazz) - uiSetKey((unsigned int)key, (unsigned int)mod, enabled); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetChar(JNIEnv *__env, jclass clazz, jint value) { - UNUSED_PARAMS(__env, clazz) - uiSetChar((unsigned int)value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetScroll(JNIEnv *__env, jclass clazz, jint x, jint y) { - UNUSED_PARAMS(__env, clazz) - uiSetScroll(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetScroll(JNIEnv *__env, jclass clazz, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((UIvec2*)(uintptr_t)__result) = uiGetScroll(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiBeginLayout(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - uiBeginLayout(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiEndLayout(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - uiEndLayout(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiUpdateHotItem(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - uiUpdateHotItem(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiProcess(JNIEnv *__env, jclass clazz, jint timestamp) { - UNUSED_PARAMS(__env, clazz) - uiProcess(timestamp); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiClearState(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - uiClearState(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiItem(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiItem(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiSetFrozen(JNIEnv *__env, jclass clazz, jint item, jint enable) { - UNUSED_PARAMS(__env, clazz) - uiSetFrozen(item, enable); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetHandle(JNIEnv *__env, jclass clazz, jint item, jlong handleAddress) { - void *handle = (void *)(uintptr_t)handleAddress; - UNUSED_PARAMS(__env, clazz) - uiSetHandle(item, handle); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_OUI_nuiAllocHandle(JNIEnv *__env, jclass clazz, jint item, jint size) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)uiAllocHandle(item, (unsigned int)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiSetHandler(JNIEnv *__env, jclass clazz, jlong handlerAddress) { - UIhandler handler = (UIhandler)(uintptr_t)handlerAddress; - UNUSED_PARAMS(__env, clazz) - uiSetHandler(handler); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetEvents(JNIEnv *__env, jclass clazz, jint item, jint flags) { - UNUSED_PARAMS(__env, clazz) - uiSetEvents(item, (unsigned int)flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetFlags(JNIEnv *__env, jclass clazz, jint item, jint flags) { - UNUSED_PARAMS(__env, clazz) - uiSetFlags(item, (unsigned int)flags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiInsert(JNIEnv *__env, jclass clazz, jint item, jint child) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiInsert(item, child); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiAppend(JNIEnv *__env, jclass clazz, jint item, jint sibling) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiAppend(item, sibling); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiInsertBack(JNIEnv *__env, jclass clazz, jint item, jint child) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiInsertBack(item, child); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiInsertFront(JNIEnv *__env, jclass clazz, jint item, jint child) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiInsertFront(item, child); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetSize(JNIEnv *__env, jclass clazz, jint item, jint w, jint h) { - UNUSED_PARAMS(__env, clazz) - uiSetSize(item, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetLayout(JNIEnv *__env, jclass clazz, jint item, jint flags) { - UNUSED_PARAMS(__env, clazz) - uiSetLayout(item, (unsigned int)flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiSetBox(JNIEnv *__env, jclass clazz, jint item, jint flags) { - UNUSED_PARAMS(__env, clazz) - uiSetBox(item, (unsigned int)flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiSetMargins(JNIEnv *__env, jclass clazz, jint item, jshort l, jshort t, jshort r, jshort b) { - UNUSED_PARAMS(__env, clazz) - uiSetMargins(item, l, t, r, b); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiFocus(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - uiFocus(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiFirstChild(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiFirstChild(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiNextSibling(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiNextSibling(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetItemCount(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetItemCount(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetAllocSize(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetAllocSize(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetState(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetState(item); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_OUI_uiGetHandle(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)uiGetHandle(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetHotItem(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetHotItem(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetFocusedItem(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetFocusedItem(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiFindItem(JNIEnv *__env, jclass clazz, jint item, jint x, jint y, jint flags, jint mask) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiFindItem(item, x, y, (unsigned int)flags, (unsigned int)mask); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetHandler(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)uiGetHandler(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetEvents(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetEvents(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetFlags(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetFlags(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetKey(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetKey(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetModifier(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetModifier(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_nuiGetRect(JNIEnv *__env, jclass clazz, jint item, jlong __result) { - UNUSED_PARAMS(__env, clazz) - *((UIrect*)(uintptr_t)__result) = uiGetRect(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_nuiContains(JNIEnv *__env, jclass clazz, jint item, jint x, jint y) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiContains(item, x, y); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetWidth(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetWidth(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetHeight(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetHeight(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetLayout(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetLayout(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetBox(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetBox(item); -} - -JNIEXPORT jshort JNICALL Java_org_lwjgl_nanovg_OUI_uiGetMarginLeft(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jshort)uiGetMarginLeft(item); -} - -JNIEXPORT jshort JNICALL Java_org_lwjgl_nanovg_OUI_uiGetMarginTop(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jshort)uiGetMarginTop(item); -} - -JNIEXPORT jshort JNICALL Java_org_lwjgl_nanovg_OUI_uiGetMarginRight(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jshort)uiGetMarginRight(item); -} - -JNIEXPORT jshort JNICALL Java_org_lwjgl_nanovg_OUI_uiGetMarginDown(JNIEnv *__env, jclass clazz, jint item) { - UNUSED_PARAMS(__env, clazz) - return (jshort)uiGetMarginDown(item); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiRecoverItem(JNIEnv *__env, jclass clazz, jint olditem) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiRecoverItem(olditem); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_nanovg_OUI_uiRemapItem(JNIEnv *__env, jclass clazz, jint olditem, jint newitem) { - UNUSED_PARAMS(__env, clazz) - uiRemapItem(olditem, newitem); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_nanovg_OUI_uiGetLastItemCount(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)uiGetLastItemCount(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/opengl.h b/FCLauncher/src/main/jni/lwjgl/opengl/opengl.h deleted file mode 100644 index a82008a7..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/opengl.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#pragma once -#include "lwjgl/common_tools.h" - -#ifdef LWJGL_WINDOWS - #define APIENTRY __stdcall -#else - #define APIENTRY -#endif - -#define tlsGetFunction(index) (uintptr_t)((void **)(*__env)->reserved3)[index] diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDDebugOutput.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDDebugOutput.c deleted file mode 100644 index b6bf5677..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDDebugOutput.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDebugMessageEnableAMDPROC) (jint, jint, jint, uintptr_t, jboolean); -typedef void (APIENTRY *glDebugMessageInsertAMDPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glDebugMessageCallbackAMDPROC) (uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetDebugMessageLogAMDPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglDebugMessageEnableAMD__IIIJZ(JNIEnv *__env, jclass clazz, jint category, jint severity, jint count, jlong idsAddress, jboolean enabled) { - glDebugMessageEnableAMDPROC glDebugMessageEnableAMD = (glDebugMessageEnableAMDPROC)tlsGetFunction(1048); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glDebugMessageEnableAMD(category, severity, count, ids, enabled); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglDebugMessageInsertAMD(JNIEnv *__env, jclass clazz, jint category, jint severity, jint id, jint length, jlong bufAddress) { - glDebugMessageInsertAMDPROC glDebugMessageInsertAMD = (glDebugMessageInsertAMDPROC)tlsGetFunction(1049); - uintptr_t buf = (uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - glDebugMessageInsertAMD(category, severity, id, length, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglDebugMessageCallbackAMD(JNIEnv *__env, jclass clazz, jlong callbackAddress, jlong userParamAddress) { - glDebugMessageCallbackAMDPROC glDebugMessageCallbackAMD = (glDebugMessageCallbackAMDPROC)tlsGetFunction(1050); - uintptr_t callback = (uintptr_t)callbackAddress; - uintptr_t userParam = (uintptr_t)userParamAddress; - UNUSED_PARAM(clazz) - glDebugMessageCallbackAMD(callback, userParam); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglGetDebugMessageLogAMD__IIJJJJJ(JNIEnv *__env, jclass clazz, jint count, jint bufsize, jlong categoriesAddress, jlong severitiesAddress, jlong idsAddress, jlong lengthsAddress, jlong messageLogAddress) { - glGetDebugMessageLogAMDPROC glGetDebugMessageLogAMD = (glGetDebugMessageLogAMDPROC)tlsGetFunction(1051); - uintptr_t categories = (uintptr_t)categoriesAddress; - uintptr_t severities = (uintptr_t)severitiesAddress; - uintptr_t ids = (uintptr_t)idsAddress; - uintptr_t lengths = (uintptr_t)lengthsAddress; - uintptr_t messageLog = (uintptr_t)messageLogAddress; - UNUSED_PARAM(clazz) - return glGetDebugMessageLogAMD(count, bufsize, categories, severities, ids, lengths, messageLog); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDDrawBuffersBlend.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDDrawBuffersBlend.c deleted file mode 100644 index 2a17fe0a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDDrawBuffersBlend.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendFuncIndexedAMDPROC) (jint, jint, jint); -typedef void (APIENTRY *glBlendFuncSeparateIndexedAMDPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glBlendEquationIndexedAMDPROC) (jint, jint); -typedef void (APIENTRY *glBlendEquationSeparateIndexedAMDPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_glBlendFuncIndexedAMD(JNIEnv *__env, jclass clazz, jint buf, jint src, jint dst) { - glBlendFuncIndexedAMDPROC glBlendFuncIndexedAMD = (glBlendFuncIndexedAMDPROC)tlsGetFunction(1052); - UNUSED_PARAM(clazz) - glBlendFuncIndexedAMD(buf, src, dst); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_glBlendFuncSeparateIndexedAMD(JNIEnv *__env, jclass clazz, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { - glBlendFuncSeparateIndexedAMDPROC glBlendFuncSeparateIndexedAMD = (glBlendFuncSeparateIndexedAMDPROC)tlsGetFunction(1053); - UNUSED_PARAM(clazz) - glBlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_glBlendEquationIndexedAMD(JNIEnv *__env, jclass clazz, jint buf, jint mode) { - glBlendEquationIndexedAMDPROC glBlendEquationIndexedAMD = (glBlendEquationIndexedAMDPROC)tlsGetFunction(1054); - UNUSED_PARAM(clazz) - glBlendEquationIndexedAMD(buf, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_glBlendEquationSeparateIndexedAMD(JNIEnv *__env, jclass clazz, jint buf, jint modeRGB, jint modeAlpha) { - glBlendEquationSeparateIndexedAMDPROC glBlendEquationSeparateIndexedAMD = (glBlendEquationSeparateIndexedAMDPROC)tlsGetFunction(1055); - UNUSED_PARAM(clazz) - glBlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDFramebufferMultisampleAdvanced.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDFramebufferMultisampleAdvanced.c deleted file mode 100644 index b03cdff2..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDFramebufferMultisampleAdvanced.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glRenderbufferStorageMultisampleAdvancedAMDPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedRenderbufferStorageMultisampleAdvancedAMDPROC) (jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDFramebufferMultisampleAdvanced_glRenderbufferStorageMultisampleAdvancedAMD(JNIEnv *__env, jclass clazz, jint target, jint samples, jint storageSamples, jint internalformat, jint width, jint height) { - glRenderbufferStorageMultisampleAdvancedAMDPROC glRenderbufferStorageMultisampleAdvancedAMD = (glRenderbufferStorageMultisampleAdvancedAMDPROC)tlsGetFunction(1056); - UNUSED_PARAM(clazz) - glRenderbufferStorageMultisampleAdvancedAMD(target, samples, storageSamples, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDFramebufferMultisampleAdvanced_glNamedRenderbufferStorageMultisampleAdvancedAMD(JNIEnv *__env, jclass clazz, jint renderbuffer, jint samples, jint storageSamples, jint internalformat, jint width, jint height) { - glNamedRenderbufferStorageMultisampleAdvancedAMDPROC glNamedRenderbufferStorageMultisampleAdvancedAMD = (glNamedRenderbufferStorageMultisampleAdvancedAMDPROC)tlsGetFunction(1057); - UNUSED_PARAM(clazz) - glNamedRenderbufferStorageMultisampleAdvancedAMD(renderbuffer, samples, storageSamples, internalformat, width, height); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDInterleavedElements.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDInterleavedElements.c deleted file mode 100644 index fcbc1e50..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDInterleavedElements.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexAttribParameteriAMDPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDInterleavedElements_glVertexAttribParameteriAMD(JNIEnv *__env, jclass clazz, jint index, jint pname, jint param) { - glVertexAttribParameteriAMDPROC glVertexAttribParameteriAMD = (glVertexAttribParameteriAMDPROC)tlsGetFunction(1092); - UNUSED_PARAM(clazz) - glVertexAttribParameteriAMD(index, pname, param); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDOcclusionQueryEvent.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDOcclusionQueryEvent.c deleted file mode 100644 index 3d9b5284..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDOcclusionQueryEvent.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glQueryObjectParameteruiAMDPROC) (jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDOcclusionQueryEvent_glQueryObjectParameteruiAMD(JNIEnv *__env, jclass clazz, jint target, jint id, jint pname, jint param) { - glQueryObjectParameteruiAMDPROC glQueryObjectParameteruiAMD = (glQueryObjectParameteruiAMDPROC)tlsGetFunction(1093); - UNUSED_PARAM(clazz) - glQueryObjectParameteruiAMD(target, id, pname, param); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDPerformanceMonitor.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDPerformanceMonitor.c deleted file mode 100644 index a3c36d29..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDPerformanceMonitor.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetPerfMonitorGroupsAMDPROC) (uintptr_t, jint, uintptr_t); -typedef void (APIENTRY *glGetPerfMonitorCountersAMDPROC) (jint, uintptr_t, uintptr_t, jint, uintptr_t); -typedef void (APIENTRY *glGetPerfMonitorGroupStringAMDPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetPerfMonitorCounterStringAMDPROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetPerfMonitorCounterInfoAMDPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGenPerfMonitorsAMDPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeletePerfMonitorsAMDPROC) (jint, uintptr_t); -typedef void (APIENTRY *glSelectPerfMonitorCountersAMDPROC) (jint, jboolean, jint, jint, uintptr_t); -typedef void (APIENTRY *glBeginPerfMonitorAMDPROC) (jint); -typedef void (APIENTRY *glEndPerfMonitorAMDPROC) (jint); -typedef void (APIENTRY *glGetPerfMonitorCounterDataAMDPROC) (jint, jint, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorGroupsAMD__JIJ(JNIEnv *__env, jclass clazz, jlong numGroupsAddress, jint groupsSize, jlong groupsAddress) { - glGetPerfMonitorGroupsAMDPROC glGetPerfMonitorGroupsAMD = (glGetPerfMonitorGroupsAMDPROC)tlsGetFunction(1094); - uintptr_t numGroups = (uintptr_t)numGroupsAddress; - uintptr_t groups = (uintptr_t)groupsAddress; - UNUSED_PARAM(clazz) - glGetPerfMonitorGroupsAMD(numGroups, groupsSize, groups); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCountersAMD__IJJIJ(JNIEnv *__env, jclass clazz, jint group, jlong numCountersAddress, jlong maxActiveCountersAddress, jint counterSize, jlong countersAddress) { - glGetPerfMonitorCountersAMDPROC glGetPerfMonitorCountersAMD = (glGetPerfMonitorCountersAMDPROC)tlsGetFunction(1095); - uintptr_t numCounters = (uintptr_t)numCountersAddress; - uintptr_t maxActiveCounters = (uintptr_t)maxActiveCountersAddress; - uintptr_t counters = (uintptr_t)countersAddress; - UNUSED_PARAM(clazz) - glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorGroupStringAMD__IIJJ(JNIEnv *__env, jclass clazz, jint group, jint bufSize, jlong lengthAddress, jlong groupStringAddress) { - glGetPerfMonitorGroupStringAMDPROC glGetPerfMonitorGroupStringAMD = (glGetPerfMonitorGroupStringAMDPROC)tlsGetFunction(1096); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t groupString = (uintptr_t)groupStringAddress; - UNUSED_PARAM(clazz) - glGetPerfMonitorGroupStringAMD(group, bufSize, length, groupString); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCounterStringAMD__IIIJJ(JNIEnv *__env, jclass clazz, jint group, jint counter, jint bufSize, jlong lengthAddress, jlong counterStringAddress) { - glGetPerfMonitorCounterStringAMDPROC glGetPerfMonitorCounterStringAMD = (glGetPerfMonitorCounterStringAMDPROC)tlsGetFunction(1097); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t counterString = (uintptr_t)counterStringAddress; - UNUSED_PARAM(clazz) - glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCounterInfoAMD__IIIJ(JNIEnv *__env, jclass clazz, jint group, jint counter, jint pname, jlong dataAddress) { - glGetPerfMonitorCounterInfoAMDPROC glGetPerfMonitorCounterInfoAMD = (glGetPerfMonitorCounterInfoAMDPROC)tlsGetFunction(1098); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetPerfMonitorCounterInfoAMD(group, counter, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGenPerfMonitorsAMD__IJ(JNIEnv *__env, jclass clazz, jint n, jlong monitorsAddress) { - glGenPerfMonitorsAMDPROC glGenPerfMonitorsAMD = (glGenPerfMonitorsAMDPROC)tlsGetFunction(1099); - uintptr_t monitors = (uintptr_t)monitorsAddress; - UNUSED_PARAM(clazz) - glGenPerfMonitorsAMD(n, monitors); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglDeletePerfMonitorsAMD__IJ(JNIEnv *__env, jclass clazz, jint n, jlong monitorsAddress) { - glDeletePerfMonitorsAMDPROC glDeletePerfMonitorsAMD = (glDeletePerfMonitorsAMDPROC)tlsGetFunction(1100); - uintptr_t monitors = (uintptr_t)monitorsAddress; - UNUSED_PARAM(clazz) - glDeletePerfMonitorsAMD(n, monitors); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglSelectPerfMonitorCountersAMD__IZIIJ(JNIEnv *__env, jclass clazz, jint monitor, jboolean enable, jint group, jint numCounters, jlong counterListAddress) { - glSelectPerfMonitorCountersAMDPROC glSelectPerfMonitorCountersAMD = (glSelectPerfMonitorCountersAMDPROC)tlsGetFunction(1101); - uintptr_t counterList = (uintptr_t)counterListAddress; - UNUSED_PARAM(clazz) - glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_glBeginPerfMonitorAMD(JNIEnv *__env, jclass clazz, jint monitor) { - glBeginPerfMonitorAMDPROC glBeginPerfMonitorAMD = (glBeginPerfMonitorAMDPROC)tlsGetFunction(1102); - UNUSED_PARAM(clazz) - glBeginPerfMonitorAMD(monitor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_glEndPerfMonitorAMD(JNIEnv *__env, jclass clazz, jint monitor) { - glEndPerfMonitorAMDPROC glEndPerfMonitorAMD = (glEndPerfMonitorAMDPROC)tlsGetFunction(1103); - UNUSED_PARAM(clazz) - glEndPerfMonitorAMD(monitor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCounterDataAMD__IIIJJ(JNIEnv *__env, jclass clazz, jint monitor, jint pname, jint dataSize, jlong dataAddress, jlong bytesWrittenAddress) { - glGetPerfMonitorCounterDataAMDPROC glGetPerfMonitorCounterDataAMD = (glGetPerfMonitorCounterDataAMDPROC)tlsGetFunction(1104); - uintptr_t data = (uintptr_t)dataAddress; - uintptr_t bytesWritten = (uintptr_t)bytesWrittenAddress; - UNUSED_PARAM(clazz) - glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDSamplePositions.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDSamplePositions.c deleted file mode 100644 index 7f7aed7b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDSamplePositions.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glSetMultisamplefvAMDPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSamplePositions_nglSetMultisamplefvAMD__IIJ(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong valAddress) { - glSetMultisamplefvAMDPROC glSetMultisamplefvAMD = (glSetMultisamplefvAMDPROC)tlsGetFunction(1105); - uintptr_t val = (uintptr_t)valAddress; - UNUSED_PARAM(clazz) - glSetMultisamplefvAMD(pname, index, val); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDSparseTexture.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDSparseTexture.c deleted file mode 100644 index 28ec1366..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDSparseTexture.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTexStorageSparseAMDPROC) (jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorageSparseAMDPROC) (jint, jint, jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSparseTexture_glTexStorageSparseAMD(JNIEnv *__env, jclass clazz, jint target, jint internalFormat, jint width, jint height, jint depth, jint layers, jint flags) { - glTexStorageSparseAMDPROC glTexStorageSparseAMD = (glTexStorageSparseAMDPROC)tlsGetFunction(1106); - UNUSED_PARAM(clazz) - glTexStorageSparseAMD(target, internalFormat, width, height, depth, layers, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSparseTexture_glTextureStorageSparseAMD(JNIEnv *__env, jclass clazz, jint texture, jint target, jint internalFormat, jint width, jint height, jint depth, jint layers, jint flags) { - glTextureStorageSparseAMDPROC glTextureStorageSparseAMD = (glTextureStorageSparseAMDPROC)tlsGetFunction(1107); - UNUSED_PARAM(clazz) - glTextureStorageSparseAMD(texture, target, internalFormat, width, height, depth, layers, flags); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDStencilOperationExtended.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDStencilOperationExtended.c deleted file mode 100644 index 1b956e69..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDStencilOperationExtended.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glStencilOpValueAMDPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDStencilOperationExtended_glStencilOpValueAMD(JNIEnv *__env, jclass clazz, jint face, jint value) { - glStencilOpValueAMDPROC glStencilOpValueAMD = (glStencilOpValueAMDPROC)tlsGetFunction(1108); - UNUSED_PARAM(clazz) - glStencilOpValueAMD(face, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDVertexShaderTessellator.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDVertexShaderTessellator.c deleted file mode 100644 index ce6b1ff3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_AMDVertexShaderTessellator.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTessellationFactorAMDPROC) (jfloat); -typedef void (APIENTRY *glTessellationModeAMDPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDVertexShaderTessellator_glTessellationFactorAMD(JNIEnv *__env, jclass clazz, jfloat factor) { - glTessellationFactorAMDPROC glTessellationFactorAMD = (glTessellationFactorAMDPROC)tlsGetFunction(1109); - UNUSED_PARAM(clazz) - glTessellationFactorAMD(factor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDVertexShaderTessellator_glTessellationModeAMD(JNIEnv *__env, jclass clazz, jint mode) { - glTessellationModeAMDPROC glTessellationModeAMD = (glTessellationModeAMDPROC)tlsGetFunction(1110); - UNUSED_PARAM(clazz) - glTessellationModeAMD(mode); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBBindlessTexture.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBBindlessTexture.c deleted file mode 100644 index a2081bac..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBBindlessTexture.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jlong (APIENTRY *glGetTextureHandleARBPROC) (jint); -typedef jlong (APIENTRY *glGetTextureSamplerHandleARBPROC) (jint, jint); -typedef void (APIENTRY *glMakeTextureHandleResidentARBPROC) (jlong); -typedef void (APIENTRY *glMakeTextureHandleNonResidentARBPROC) (jlong); -typedef jlong (APIENTRY *glGetImageHandleARBPROC) (jint, jint, jboolean, jint, jint); -typedef void (APIENTRY *glMakeImageHandleResidentARBPROC) (jlong, jint); -typedef void (APIENTRY *glMakeImageHandleNonResidentARBPROC) (jlong); -typedef void (APIENTRY *glUniformHandleui64ARBPROC) (jint, jlong); -typedef void (APIENTRY *glUniformHandleui64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniformHandleui64ARBPROC) (jint, jint, jlong); -typedef void (APIENTRY *glProgramUniformHandleui64vARBPROC) (jint, jint, jint, uintptr_t); -typedef jboolean (APIENTRY *glIsTextureHandleResidentARBPROC) (jlong); -typedef jboolean (APIENTRY *glIsImageHandleResidentARBPROC) (jlong); -typedef void (APIENTRY *glVertexAttribL1ui64ARBPROC) (jint, jlong); -typedef void (APIENTRY *glVertexAttribL1ui64vARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribLui64vARBPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glGetTextureHandleARB(JNIEnv *__env, jclass clazz, jint texture) { - glGetTextureHandleARBPROC glGetTextureHandleARB = (glGetTextureHandleARBPROC)tlsGetFunction(1111); - UNUSED_PARAM(clazz) - return glGetTextureHandleARB(texture); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glGetTextureSamplerHandleARB(JNIEnv *__env, jclass clazz, jint texture, jint sampler) { - glGetTextureSamplerHandleARBPROC glGetTextureSamplerHandleARB = (glGetTextureSamplerHandleARBPROC)tlsGetFunction(1112); - UNUSED_PARAM(clazz) - return glGetTextureSamplerHandleARB(texture, sampler); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glMakeTextureHandleResidentARB(JNIEnv *__env, jclass clazz, jlong handle) { - glMakeTextureHandleResidentARBPROC glMakeTextureHandleResidentARB = (glMakeTextureHandleResidentARBPROC)tlsGetFunction(1113); - UNUSED_PARAM(clazz) - glMakeTextureHandleResidentARB(handle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glMakeTextureHandleNonResidentARB(JNIEnv *__env, jclass clazz, jlong handle) { - glMakeTextureHandleNonResidentARBPROC glMakeTextureHandleNonResidentARB = (glMakeTextureHandleNonResidentARBPROC)tlsGetFunction(1114); - UNUSED_PARAM(clazz) - glMakeTextureHandleNonResidentARB(handle); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glGetImageHandleARB(JNIEnv *__env, jclass clazz, jint texture, jint level, jboolean layered, jint layer, jint format) { - glGetImageHandleARBPROC glGetImageHandleARB = (glGetImageHandleARBPROC)tlsGetFunction(1115); - UNUSED_PARAM(clazz) - return glGetImageHandleARB(texture, level, layered, layer, format); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glMakeImageHandleResidentARB(JNIEnv *__env, jclass clazz, jlong handle, jint access) { - glMakeImageHandleResidentARBPROC glMakeImageHandleResidentARB = (glMakeImageHandleResidentARBPROC)tlsGetFunction(1116); - UNUSED_PARAM(clazz) - glMakeImageHandleResidentARB(handle, access); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glMakeImageHandleNonResidentARB(JNIEnv *__env, jclass clazz, jlong handle) { - glMakeImageHandleNonResidentARBPROC glMakeImageHandleNonResidentARB = (glMakeImageHandleNonResidentARBPROC)tlsGetFunction(1117); - UNUSED_PARAM(clazz) - glMakeImageHandleNonResidentARB(handle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glUniformHandleui64ARB(JNIEnv *__env, jclass clazz, jint location, jlong value) { - glUniformHandleui64ARBPROC glUniformHandleui64ARB = (glUniformHandleui64ARBPROC)tlsGetFunction(1118); - UNUSED_PARAM(clazz) - glUniformHandleui64ARB(location, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglUniformHandleui64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valuesAddress) { - glUniformHandleui64vARBPROC glUniformHandleui64vARB = (glUniformHandleui64vARBPROC)tlsGetFunction(1119); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glUniformHandleui64vARB(location, count, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glProgramUniformHandleui64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong value) { - glProgramUniformHandleui64ARBPROC glProgramUniformHandleui64ARB = (glProgramUniformHandleui64ARBPROC)tlsGetFunction(1120); - UNUSED_PARAM(clazz) - glProgramUniformHandleui64ARB(program, location, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglProgramUniformHandleui64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valuesAddress) { - glProgramUniformHandleui64vARBPROC glProgramUniformHandleui64vARB = (glProgramUniformHandleui64vARBPROC)tlsGetFunction(1121); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glProgramUniformHandleui64vARB(program, location, count, values); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glIsTextureHandleResidentARB(JNIEnv *__env, jclass clazz, jlong handle) { - glIsTextureHandleResidentARBPROC glIsTextureHandleResidentARB = (glIsTextureHandleResidentARBPROC)tlsGetFunction(1122); - UNUSED_PARAM(clazz) - return glIsTextureHandleResidentARB(handle); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glIsImageHandleResidentARB(JNIEnv *__env, jclass clazz, jlong handle) { - glIsImageHandleResidentARBPROC glIsImageHandleResidentARB = (glIsImageHandleResidentARBPROC)tlsGetFunction(1123); - UNUSED_PARAM(clazz) - return glIsImageHandleResidentARB(handle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_glVertexAttribL1ui64ARB(JNIEnv *__env, jclass clazz, jint index, jlong x) { - glVertexAttribL1ui64ARBPROC glVertexAttribL1ui64ARB = (glVertexAttribL1ui64ARBPROC)tlsGetFunction(1124); - UNUSED_PARAM(clazz) - glVertexAttribL1ui64ARB(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglVertexAttribL1ui64vARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL1ui64vARBPROC glVertexAttribL1ui64vARB = (glVertexAttribL1ui64vARBPROC)tlsGetFunction(1125); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL1ui64vARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglGetVertexAttribLui64vARB__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribLui64vARBPROC glGetVertexAttribLui64vARB = (glGetVertexAttribLui64vARBPROC)tlsGetFunction(1126); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribLui64vARB(index, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBBufferStorage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBBufferStorage.c deleted file mode 100644 index f262a278..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBBufferStorage.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glNamedBufferStorageEXTPROC) (jint, uintptr_t, uintptr_t, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferStorage_nglNamedBufferStorageEXT__IJJI(JNIEnv *__env, jclass clazz, jint buffer, jlong size, jlong dataAddress, jint flags) { - glNamedBufferStorageEXTPROC glNamedBufferStorageEXT = (glNamedBufferStorageEXTPROC)tlsGetFunction(1127); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glNamedBufferStorageEXT(buffer, (uintptr_t)size, data, flags); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBCLEvent.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBCLEvent.c deleted file mode 100644 index 230fdf34..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBCLEvent.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef uintptr_t (APIENTRY *glCreateSyncFromCLeventARBPROC) (uintptr_t, uintptr_t, jint); - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBCLEvent_nglCreateSyncFromCLeventARB(JNIEnv *__env, jclass clazz, jlong contextAddress, jlong eventAddress, jint flags) { - glCreateSyncFromCLeventARBPROC glCreateSyncFromCLeventARB = (glCreateSyncFromCLeventARBPROC)tlsGetFunction(1128); - uintptr_t context = (uintptr_t)contextAddress; - uintptr_t event = (uintptr_t)eventAddress; - UNUSED_PARAM(clazz) - return (jlong)glCreateSyncFromCLeventARB(context, event, flags); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBClearBufferObject.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBClearBufferObject.c deleted file mode 100644 index edb37974..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBClearBufferObject.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glClearNamedBufferDataEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glClearNamedBufferSubDataEXTPROC) (jint, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBClearBufferObject_nglClearNamedBufferDataEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint buffer, jint internalformat, jint format, jint type, jlong dataAddress) { - glClearNamedBufferDataEXTPROC glClearNamedBufferDataEXT = (glClearNamedBufferDataEXTPROC)tlsGetFunction(1128); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearNamedBufferDataEXT(buffer, internalformat, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBClearBufferObject_nglClearNamedBufferSubDataEXT__IIJJIIJ(JNIEnv *__env, jclass clazz, jint buffer, jint internalformat, jlong offset, jlong size, jint format, jint type, jlong dataAddress) { - glClearNamedBufferSubDataEXTPROC glClearNamedBufferSubDataEXT = (glClearNamedBufferSubDataEXTPROC)tlsGetFunction(1129); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearNamedBufferSubDataEXT(buffer, internalformat, (uintptr_t)offset, (uintptr_t)size, format, type, data); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBColorBufferFloat.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBColorBufferFloat.c deleted file mode 100644 index ef5a6dfa..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBColorBufferFloat.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glClampColorARBPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBColorBufferFloat_glClampColorARB(JNIEnv *__env, jclass clazz, jint target, jint clamp) { - glClampColorARBPROC glClampColorARB = (glClampColorARBPROC)tlsGetFunction(1130); - UNUSED_PARAM(clazz) - glClampColorARB(target, clamp); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBComputeVariableGroupSize.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBComputeVariableGroupSize.c deleted file mode 100644 index 79901baa..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBComputeVariableGroupSize.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDispatchComputeGroupSizeARBPROC) (jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBComputeVariableGroupSize_glDispatchComputeGroupSizeARB(JNIEnv *__env, jclass clazz, jint num_groups_x, jint num_groups_y, jint num_groups_z, jint group_size_x, jint group_size_y, jint group_size_z) { - glDispatchComputeGroupSizeARBPROC glDispatchComputeGroupSizeARB = (glDispatchComputeGroupSizeARBPROC)tlsGetFunction(1131); - UNUSED_PARAM(clazz) - glDispatchComputeGroupSizeARB(num_groups_x, num_groups_y, num_groups_z, group_size_x, group_size_y, group_size_z); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDebugOutput.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDebugOutput.c deleted file mode 100644 index 9e3b90c6..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDebugOutput.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDebugMessageControlARBPROC) (jint, jint, jint, jint, uintptr_t, jboolean); -typedef void (APIENTRY *glDebugMessageInsertARBPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glDebugMessageCallbackARBPROC) (uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetDebugMessageLogARBPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglDebugMessageControlARB__IIIIJZ(JNIEnv *__env, jclass clazz, jint source, jint type, jint severity, jint count, jlong idsAddress, jboolean enabled) { - glDebugMessageControlARBPROC glDebugMessageControlARB = (glDebugMessageControlARBPROC)tlsGetFunction(1132); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glDebugMessageControlARB(source, type, severity, count, ids, enabled); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglDebugMessageInsertARB(JNIEnv *__env, jclass clazz, jint source, jint type, jint id, jint severity, jint length, jlong bufAddress) { - glDebugMessageInsertARBPROC glDebugMessageInsertARB = (glDebugMessageInsertARBPROC)tlsGetFunction(1133); - uintptr_t buf = (uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - glDebugMessageInsertARB(source, type, id, severity, length, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglDebugMessageCallbackARB(JNIEnv *__env, jclass clazz, jlong callbackAddress, jlong userParamAddress) { - glDebugMessageCallbackARBPROC glDebugMessageCallbackARB = (glDebugMessageCallbackARBPROC)tlsGetFunction(1134); - uintptr_t callback = (uintptr_t)callbackAddress; - uintptr_t userParam = (uintptr_t)userParamAddress; - UNUSED_PARAM(clazz) - glDebugMessageCallbackARB(callback, userParam); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglGetDebugMessageLogARB__IIJJJJJJ(JNIEnv *__env, jclass clazz, jint count, jint bufSize, jlong sourcesAddress, jlong typesAddress, jlong idsAddress, jlong severitiesAddress, jlong lengthsAddress, jlong messageLogAddress) { - glGetDebugMessageLogARBPROC glGetDebugMessageLogARB = (glGetDebugMessageLogARBPROC)tlsGetFunction(1135); - uintptr_t sources = (uintptr_t)sourcesAddress; - uintptr_t types = (uintptr_t)typesAddress; - uintptr_t ids = (uintptr_t)idsAddress; - uintptr_t severities = (uintptr_t)severitiesAddress; - uintptr_t lengths = (uintptr_t)lengthsAddress; - uintptr_t messageLog = (uintptr_t)messageLogAddress; - UNUSED_PARAM(clazz) - return glGetDebugMessageLogARB(count, bufSize, sources, types, ids, severities, lengths, messageLog); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffers.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffers.c deleted file mode 100644 index c47ca9f3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffers.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDrawBuffersARBPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffers_nglDrawBuffersARB__IJ(JNIEnv *__env, jclass clazz, jint n, jlong bufsAddress) { - glDrawBuffersARBPROC glDrawBuffersARB = (glDrawBuffersARBPROC)tlsGetFunction(1136); - uintptr_t bufs = (uintptr_t)bufsAddress; - UNUSED_PARAM(clazz) - glDrawBuffersARB(n, bufs); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffersBlend.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffersBlend.c deleted file mode 100644 index 75b32331..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawBuffersBlend.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendEquationiARBPROC) (jint, jint); -typedef void (APIENTRY *glBlendEquationSeparateiARBPROC) (jint, jint, jint); -typedef void (APIENTRY *glBlendFunciARBPROC) (jint, jint, jint); -typedef void (APIENTRY *glBlendFuncSeparateiARBPROC) (jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_glBlendEquationiARB(JNIEnv *__env, jclass clazz, jint buf, jint mode) { - glBlendEquationiARBPROC glBlendEquationiARB = (glBlendEquationiARBPROC)tlsGetFunction(1137); - UNUSED_PARAM(clazz) - glBlendEquationiARB(buf, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_glBlendEquationSeparateiARB(JNIEnv *__env, jclass clazz, jint buf, jint modeRGB, jint modeAlpha) { - glBlendEquationSeparateiARBPROC glBlendEquationSeparateiARB = (glBlendEquationSeparateiARBPROC)tlsGetFunction(1138); - UNUSED_PARAM(clazz) - glBlendEquationSeparateiARB(buf, modeRGB, modeAlpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_glBlendFunciARB(JNIEnv *__env, jclass clazz, jint buf, jint src, jint dst) { - glBlendFunciARBPROC glBlendFunciARB = (glBlendFunciARBPROC)tlsGetFunction(1139); - UNUSED_PARAM(clazz) - glBlendFunciARB(buf, src, dst); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_glBlendFuncSeparateiARB(JNIEnv *__env, jclass clazz, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { - glBlendFuncSeparateiARBPROC glBlendFuncSeparateiARB = (glBlendFuncSeparateiARBPROC)tlsGetFunction(1140); - UNUSED_PARAM(clazz) - glBlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawInstanced.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawInstanced.c deleted file mode 100644 index b8c73be6..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBDrawInstanced.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDrawArraysInstancedARBPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glDrawElementsInstancedARBPROC) (jint, jint, jint, uintptr_t, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawInstanced_glDrawArraysInstancedARB(JNIEnv *__env, jclass clazz, jint mode, jint first, jint count, jint primcount) { - glDrawArraysInstancedARBPROC glDrawArraysInstancedARB = (glDrawArraysInstancedARBPROC)tlsGetFunction(1141); - UNUSED_PARAM(clazz) - glDrawArraysInstancedARB(mode, first, count, primcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawInstanced_nglDrawElementsInstancedARB(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress, jint primcount) { - glDrawElementsInstancedARBPROC glDrawElementsInstancedARB = (glDrawElementsInstancedARBPROC)tlsGetFunction(1142); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElementsInstancedARB(mode, count, type, indices, primcount); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBES32Compatibility.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBES32Compatibility.c deleted file mode 100644 index 4d4768aa..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBES32Compatibility.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPrimitiveBoundingBoxARBPROC) (jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBES32Compatibility_glPrimitiveBoundingBoxARB(JNIEnv *__env, jclass clazz, jfloat minX, jfloat minY, jfloat minZ, jfloat minW, jfloat maxX, jfloat maxY, jfloat maxZ, jfloat maxW) { - glPrimitiveBoundingBoxARBPROC glPrimitiveBoundingBoxARB = (glPrimitiveBoundingBoxARBPROC)tlsGetFunction(1143); - UNUSED_PARAM(clazz) - glPrimitiveBoundingBoxARB(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBFramebufferNoAttachments.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBFramebufferNoAttachments.c deleted file mode 100644 index 6f0a587b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBFramebufferNoAttachments.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glNamedFramebufferParameteriEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glGetNamedFramebufferParameterivEXTPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBFramebufferNoAttachments_glNamedFramebufferParameteriEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint pname, jint param) { - glNamedFramebufferParameteriEXTPROC glNamedFramebufferParameteriEXT = (glNamedFramebufferParameteriEXTPROC)tlsGetFunction(1144); - UNUSED_PARAM(clazz) - glNamedFramebufferParameteriEXT(framebuffer, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBFramebufferNoAttachments_nglGetNamedFramebufferParameterivEXT__IIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint pname, jlong paramsAddress) { - glGetNamedFramebufferParameterivEXTPROC glGetNamedFramebufferParameterivEXT = (glGetNamedFramebufferParameterivEXTPROC)tlsGetFunction(1145); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedFramebufferParameterivEXT(framebuffer, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGLSPIRV.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGLSPIRV.c deleted file mode 100644 index f8feaea9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGLSPIRV.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glSpecializeShaderARBPROC) (jint, uintptr_t, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGLSPIRV_nglSpecializeShaderARB__IJIJJ(JNIEnv *__env, jclass clazz, jint shader, jlong pEntryPointAddress, jint numSpecializationConstants, jlong pConstantIndexAddress, jlong pConstantValueAddress) { - glSpecializeShaderARBPROC glSpecializeShaderARB = (glSpecializeShaderARBPROC)tlsGetFunction(1150); - uintptr_t pEntryPoint = (uintptr_t)pEntryPointAddress; - uintptr_t pConstantIndex = (uintptr_t)pConstantIndexAddress; - uintptr_t pConstantValue = (uintptr_t)pConstantValueAddress; - UNUSED_PARAM(clazz) - glSpecializeShaderARB(shader, pEntryPoint, numSpecializationConstants, pConstantIndex, pConstantValue); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderFP64.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderFP64.c deleted file mode 100644 index 5912b065..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderFP64.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glProgramUniform1dEXTPROC) (jint, jint, jdouble); -typedef void (APIENTRY *glProgramUniform2dEXTPROC) (jint, jint, jdouble, jdouble); -typedef void (APIENTRY *glProgramUniform3dEXTPROC) (jint, jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glProgramUniform4dEXTPROC) (jint, jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glProgramUniform1dvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2dvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3dvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4dvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x3dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x4dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x2dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x4dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x2dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x3dvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_glProgramUniform1dEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x) { - glProgramUniform1dEXTPROC glProgramUniform1dEXT = (glProgramUniform1dEXTPROC)tlsGetFunction(1151); - UNUSED_PARAM(clazz) - glProgramUniform1dEXT(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_glProgramUniform2dEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x, jdouble y) { - glProgramUniform2dEXTPROC glProgramUniform2dEXT = (glProgramUniform2dEXTPROC)tlsGetFunction(1152); - UNUSED_PARAM(clazz) - glProgramUniform2dEXT(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_glProgramUniform3dEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x, jdouble y, jdouble z) { - glProgramUniform3dEXTPROC glProgramUniform3dEXT = (glProgramUniform3dEXTPROC)tlsGetFunction(1153); - UNUSED_PARAM(clazz) - glProgramUniform3dEXT(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_glProgramUniform4dEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x, jdouble y, jdouble z, jdouble w) { - glProgramUniform4dEXTPROC glProgramUniform4dEXT = (glProgramUniform4dEXTPROC)tlsGetFunction(1154); - UNUSED_PARAM(clazz) - glProgramUniform4dEXT(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniform1dvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1dvEXTPROC glProgramUniform1dvEXT = (glProgramUniform1dvEXTPROC)tlsGetFunction(1155); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1dvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniform2dvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2dvEXTPROC glProgramUniform2dvEXT = (glProgramUniform2dvEXTPROC)tlsGetFunction(1156); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2dvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniform3dvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3dvEXTPROC glProgramUniform3dvEXT = (glProgramUniform3dvEXTPROC)tlsGetFunction(1157); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3dvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniform4dvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4dvEXTPROC glProgramUniform4dvEXT = (glProgramUniform4dvEXTPROC)tlsGetFunction(1158); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4dvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix2dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2dvEXTPROC glProgramUniformMatrix2dvEXT = (glProgramUniformMatrix2dvEXTPROC)tlsGetFunction(1159); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix3dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3dvEXTPROC glProgramUniformMatrix3dvEXT = (glProgramUniformMatrix3dvEXTPROC)tlsGetFunction(1160); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix4dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4dvEXTPROC glProgramUniformMatrix4dvEXT = (glProgramUniformMatrix4dvEXTPROC)tlsGetFunction(1161); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix2x3dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x3dvEXTPROC glProgramUniformMatrix2x3dvEXT = (glProgramUniformMatrix2x3dvEXTPROC)tlsGetFunction(1162); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x3dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix2x4dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x4dvEXTPROC glProgramUniformMatrix2x4dvEXT = (glProgramUniformMatrix2x4dvEXTPROC)tlsGetFunction(1163); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x4dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix3x2dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x2dvEXTPROC glProgramUniformMatrix3x2dvEXT = (glProgramUniformMatrix3x2dvEXTPROC)tlsGetFunction(1164); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x2dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix3x4dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x4dvEXTPROC glProgramUniformMatrix3x4dvEXT = (glProgramUniformMatrix3x4dvEXTPROC)tlsGetFunction(1165); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x4dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix4x2dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x2dvEXTPROC glProgramUniformMatrix4x2dvEXT = (glProgramUniformMatrix4x2dvEXTPROC)tlsGetFunction(1166); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x2dvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderFP64_nglProgramUniformMatrix4x3dvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x3dvEXTPROC glProgramUniformMatrix4x3dvEXT = (glProgramUniformMatrix4x3dvEXTPROC)tlsGetFunction(1167); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x3dvEXT(program, location, count, transpose, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderInt64.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderInt64.c deleted file mode 100644 index 3e294ec3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGPUShaderInt64.c +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glUniform1i64ARBPROC) (jint, jlong); -typedef void (APIENTRY *glUniform1i64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1i64ARBPROC) (jint, jint, jlong); -typedef void (APIENTRY *glProgramUniform1i64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2i64ARBPROC) (jint, jlong, jlong); -typedef void (APIENTRY *glUniform2i64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2i64ARBPROC) (jint, jint, jlong, jlong); -typedef void (APIENTRY *glProgramUniform2i64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3i64ARBPROC) (jint, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform3i64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3i64ARBPROC) (jint, jint, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform3i64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4i64ARBPROC) (jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform4i64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4i64ARBPROC) (jint, jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform4i64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform1ui64ARBPROC) (jint, jlong); -typedef void (APIENTRY *glUniform1ui64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1ui64ARBPROC) (jint, jint, jlong); -typedef void (APIENTRY *glProgramUniform1ui64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2ui64ARBPROC) (jint, jlong, jlong); -typedef void (APIENTRY *glUniform2ui64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2ui64ARBPROC) (jint, jint, jlong, jlong); -typedef void (APIENTRY *glProgramUniform2ui64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3ui64ARBPROC) (jint, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform3ui64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3ui64ARBPROC) (jint, jint, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform3ui64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4ui64ARBPROC) (jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform4ui64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4ui64ARBPROC) (jint, jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform4ui64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformi64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformui64vARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformi64vARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformui64vARBPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform1i64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x) { - glUniform1i64ARBPROC glUniform1i64ARB = (glUniform1i64ARBPROC)tlsGetFunction(1168); - UNUSED_PARAM(clazz) - glUniform1i64ARB(location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform1i64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1i64vARBPROC glUniform1i64vARB = (glUniform1i64vARBPROC)tlsGetFunction(1169); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1i64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform1i64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x) { - glProgramUniform1i64ARBPROC glProgramUniform1i64ARB = (glProgramUniform1i64ARBPROC)tlsGetFunction(1170); - UNUSED_PARAM(clazz) - glProgramUniform1i64ARB(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform1i64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1i64vARBPROC glProgramUniform1i64vARB = (glProgramUniform1i64vARBPROC)tlsGetFunction(1171); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1i64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform2i64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y) { - glUniform2i64ARBPROC glUniform2i64ARB = (glUniform2i64ARBPROC)tlsGetFunction(1172); - UNUSED_PARAM(clazz) - glUniform2i64ARB(location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform2i64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2i64vARBPROC glUniform2i64vARB = (glUniform2i64vARBPROC)tlsGetFunction(1173); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2i64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform2i64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y) { - glProgramUniform2i64ARBPROC glProgramUniform2i64ARB = (glProgramUniform2i64ARBPROC)tlsGetFunction(1174); - UNUSED_PARAM(clazz) - glProgramUniform2i64ARB(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform2i64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2i64vARBPROC glProgramUniform2i64vARB = (glProgramUniform2i64vARBPROC)tlsGetFunction(1175); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2i64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform3i64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z) { - glUniform3i64ARBPROC glUniform3i64ARB = (glUniform3i64ARBPROC)tlsGetFunction(1176); - UNUSED_PARAM(clazz) - glUniform3i64ARB(location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform3i64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3i64vARBPROC glUniform3i64vARB = (glUniform3i64vARBPROC)tlsGetFunction(1177); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3i64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform3i64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z) { - glProgramUniform3i64ARBPROC glProgramUniform3i64ARB = (glProgramUniform3i64ARBPROC)tlsGetFunction(1178); - UNUSED_PARAM(clazz) - glProgramUniform3i64ARB(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform3i64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3i64vARBPROC glProgramUniform3i64vARB = (glProgramUniform3i64vARBPROC)tlsGetFunction(1179); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3i64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform4i64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong w) { - glUniform4i64ARBPROC glUniform4i64ARB = (glUniform4i64ARBPROC)tlsGetFunction(1180); - UNUSED_PARAM(clazz) - glUniform4i64ARB(location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform4i64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4i64vARBPROC glUniform4i64vARB = (glUniform4i64vARBPROC)tlsGetFunction(1181); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4i64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform4i64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong w) { - glProgramUniform4i64ARBPROC glProgramUniform4i64ARB = (glProgramUniform4i64ARBPROC)tlsGetFunction(1182); - UNUSED_PARAM(clazz) - glProgramUniform4i64ARB(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform4i64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4i64vARBPROC glProgramUniform4i64vARB = (glProgramUniform4i64vARBPROC)tlsGetFunction(1183); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4i64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform1ui64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x) { - glUniform1ui64ARBPROC glUniform1ui64ARB = (glUniform1ui64ARBPROC)tlsGetFunction(1184); - UNUSED_PARAM(clazz) - glUniform1ui64ARB(location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform1ui64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1ui64vARBPROC glUniform1ui64vARB = (glUniform1ui64vARBPROC)tlsGetFunction(1185); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1ui64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform1ui64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x) { - glProgramUniform1ui64ARBPROC glProgramUniform1ui64ARB = (glProgramUniform1ui64ARBPROC)tlsGetFunction(1186); - UNUSED_PARAM(clazz) - glProgramUniform1ui64ARB(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform1ui64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1ui64vARBPROC glProgramUniform1ui64vARB = (glProgramUniform1ui64vARBPROC)tlsGetFunction(1187); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1ui64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform2ui64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y) { - glUniform2ui64ARBPROC glUniform2ui64ARB = (glUniform2ui64ARBPROC)tlsGetFunction(1188); - UNUSED_PARAM(clazz) - glUniform2ui64ARB(location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform2ui64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2ui64vARBPROC glUniform2ui64vARB = (glUniform2ui64vARBPROC)tlsGetFunction(1189); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2ui64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform2ui64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y) { - glProgramUniform2ui64ARBPROC glProgramUniform2ui64ARB = (glProgramUniform2ui64ARBPROC)tlsGetFunction(1190); - UNUSED_PARAM(clazz) - glProgramUniform2ui64ARB(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform2ui64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2ui64vARBPROC glProgramUniform2ui64vARB = (glProgramUniform2ui64vARBPROC)tlsGetFunction(1191); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2ui64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform3ui64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z) { - glUniform3ui64ARBPROC glUniform3ui64ARB = (glUniform3ui64ARBPROC)tlsGetFunction(1192); - UNUSED_PARAM(clazz) - glUniform3ui64ARB(location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform3ui64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3ui64vARBPROC glUniform3ui64vARB = (glUniform3ui64vARBPROC)tlsGetFunction(1193); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3ui64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform3ui64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z) { - glProgramUniform3ui64ARBPROC glProgramUniform3ui64ARB = (glProgramUniform3ui64ARBPROC)tlsGetFunction(1194); - UNUSED_PARAM(clazz) - glProgramUniform3ui64ARB(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform3ui64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3ui64vARBPROC glProgramUniform3ui64vARB = (glProgramUniform3ui64vARBPROC)tlsGetFunction(1195); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3ui64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glUniform4ui64ARB(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong w) { - glUniform4ui64ARBPROC glUniform4ui64ARB = (glUniform4ui64ARBPROC)tlsGetFunction(1196); - UNUSED_PARAM(clazz) - glUniform4ui64ARB(location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglUniform4ui64vARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4ui64vARBPROC glUniform4ui64vARB = (glUniform4ui64vARBPROC)tlsGetFunction(1197); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4ui64vARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_glProgramUniform4ui64ARB(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong w) { - glProgramUniform4ui64ARBPROC glProgramUniform4ui64ARB = (glProgramUniform4ui64ARBPROC)tlsGetFunction(1198); - UNUSED_PARAM(clazz) - glProgramUniform4ui64ARB(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglProgramUniform4ui64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4ui64vARBPROC glProgramUniform4ui64vARB = (glProgramUniform4ui64vARBPROC)tlsGetFunction(1199); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4ui64vARB(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglGetUniformi64vARB__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformi64vARBPROC glGetUniformi64vARB = (glGetUniformi64vARBPROC)tlsGetFunction(1200); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformi64vARB(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglGetUniformui64vARB__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformui64vARBPROC glGetUniformui64vARB = (glGetUniformui64vARBPROC)tlsGetFunction(1201); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformui64vARB(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglGetnUniformi64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformi64vARBPROC glGetnUniformi64vARB = (glGetnUniformi64vARBPROC)tlsGetFunction(1202); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformi64vARB(program, location, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGPUShaderInt64_nglGetnUniformui64vARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformui64vARBPROC glGetnUniformui64vARB = (glGetnUniformui64vARBPROC)tlsGetFunction(1203); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformui64vARB(program, location, bufSize, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGeometryShader4.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGeometryShader4.c deleted file mode 100644 index b12bc84d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBGeometryShader4.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glProgramParameteriARBPROC) (jint, jint, jint); -typedef void (APIENTRY *glFramebufferTextureARBPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTextureLayerARBPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTextureFaceARBPROC) (jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_glProgramParameteriARB(JNIEnv *__env, jclass clazz, jint program, jint pname, jint value) { - glProgramParameteriARBPROC glProgramParameteriARB = (glProgramParameteriARBPROC)tlsGetFunction(1146); - UNUSED_PARAM(clazz) - glProgramParameteriARB(program, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_glFramebufferTextureARB(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level) { - glFramebufferTextureARBPROC glFramebufferTextureARB = (glFramebufferTextureARBPROC)tlsGetFunction(1147); - UNUSED_PARAM(clazz) - glFramebufferTextureARB(target, attachment, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_glFramebufferTextureLayerARB(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer) { - glFramebufferTextureLayerARBPROC glFramebufferTextureLayerARB = (glFramebufferTextureLayerARBPROC)tlsGetFunction(1148); - UNUSED_PARAM(clazz) - glFramebufferTextureLayerARB(target, attachment, texture, level, layer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_glFramebufferTextureFaceARB(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint face) { - glFramebufferTextureFaceARBPROC glFramebufferTextureFaceARB = (glFramebufferTextureFaceARBPROC)tlsGetFunction(1149); - UNUSED_PARAM(clazz) - glFramebufferTextureFaceARB(target, attachment, texture, level, face); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBImaging.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBImaging.c deleted file mode 100644 index abbf9703..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBImaging.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glColorTablePROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyColorTablePROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glColorTableParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glColorTableParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetColorTablePROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetColorTableParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetColorTableParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glColorSubTablePROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyColorSubTablePROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glConvolutionFilter1DPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glConvolutionFilter2DPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyConvolutionFilter1DPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyConvolutionFilter2DPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glGetConvolutionFilterPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glSeparableFilter2DPROC) (jint, jint, jint, jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetSeparableFilterPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glConvolutionParameteriPROC) (jint, jint, jint); -typedef void (APIENTRY *glConvolutionParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glConvolutionParameterfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glConvolutionParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetConvolutionParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetConvolutionParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glHistogramPROC) (jint, jint, jint, jboolean); -typedef void (APIENTRY *glResetHistogramPROC) (jint); -typedef void (APIENTRY *glGetHistogramPROC) (jint, jboolean, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetHistogramParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetHistogramParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glMinmaxPROC) (jint, jint, jboolean); -typedef void (APIENTRY *glResetMinmaxPROC) (jint); -typedef void (APIENTRY *glGetMinmaxPROC) (jint, jboolean, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMinmaxParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMinmaxParameterfvPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTable__IIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint width, jint format, jint type, jlong tableAddress) { - glColorTablePROC glColorTable = (glColorTablePROC)tlsGetFunction(1204); - uintptr_t table = (uintptr_t)tableAddress; - UNUSED_PARAM(clazz) - glColorTable(target, internalformat, width, format, type, table); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glCopyColorTable(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width) { - glCopyColorTablePROC glCopyColorTable = (glCopyColorTablePROC)tlsGetFunction(1205); - UNUSED_PARAM(clazz) - glCopyColorTable(target, internalformat, x, y, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTableParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glColorTableParameterivPROC glColorTableParameteriv = (glColorTableParameterivPROC)tlsGetFunction(1206); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glColorTableParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTableParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glColorTableParameterfvPROC glColorTableParameterfv = (glColorTableParameterfvPROC)tlsGetFunction(1207); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glColorTableParameterfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetColorTable__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jlong tableAddress) { - glGetColorTablePROC glGetColorTable = (glGetColorTablePROC)tlsGetFunction(1208); - uintptr_t table = (uintptr_t)tableAddress; - UNUSED_PARAM(clazz) - glGetColorTable(target, format, type, table); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetColorTableParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetColorTableParameterivPROC glGetColorTableParameteriv = (glGetColorTableParameterivPROC)tlsGetFunction(1209); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetColorTableParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetColorTableParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetColorTableParameterfvPROC glGetColorTableParameterfv = (glGetColorTableParameterfvPROC)tlsGetFunction(1210); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetColorTableParameterfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorSubTable(JNIEnv *__env, jclass clazz, jint target, jint start, jint count, jint format, jint type, jlong dataAddress) { - glColorSubTablePROC glColorSubTable = (glColorSubTablePROC)tlsGetFunction(1211); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glColorSubTable(target, start, count, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glCopyColorSubTable(JNIEnv *__env, jclass clazz, jint target, jint start, jint x, jint y, jint width) { - glCopyColorSubTablePROC glCopyColorSubTable = (glCopyColorSubTablePROC)tlsGetFunction(1212); - UNUSED_PARAM(clazz) - glCopyColorSubTable(target, start, x, y, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter1D(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint width, jint format, jint type, jlong dataAddress) { - glConvolutionFilter1DPROC glConvolutionFilter1D = (glConvolutionFilter1DPROC)tlsGetFunction(1213); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glConvolutionFilter1D(target, internalformat, width, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter2D(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jlong dataAddress) { - glConvolutionFilter2DPROC glConvolutionFilter2D = (glConvolutionFilter2DPROC)tlsGetFunction(1214); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glConvolutionFilter2D(target, internalformat, width, height, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glCopyConvolutionFilter1D(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width) { - glCopyConvolutionFilter1DPROC glCopyConvolutionFilter1D = (glCopyConvolutionFilter1DPROC)tlsGetFunction(1215); - UNUSED_PARAM(clazz) - glCopyConvolutionFilter1D(target, internalformat, x, y, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glCopyConvolutionFilter2D(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width, jint height) { - glCopyConvolutionFilter2DPROC glCopyConvolutionFilter2D = (glCopyConvolutionFilter2DPROC)tlsGetFunction(1216); - UNUSED_PARAM(clazz) - glCopyConvolutionFilter2D(target, internalformat, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionFilter(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jlong imageAddress) { - glGetConvolutionFilterPROC glGetConvolutionFilter = (glGetConvolutionFilterPROC)tlsGetFunction(1217); - uintptr_t image = (uintptr_t)imageAddress; - UNUSED_PARAM(clazz) - glGetConvolutionFilter(target, format, type, image); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglSeparableFilter2D(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jlong rowAddress, jlong columnAddress) { - glSeparableFilter2DPROC glSeparableFilter2D = (glSeparableFilter2DPROC)tlsGetFunction(1218); - uintptr_t row = (uintptr_t)rowAddress; - uintptr_t column = (uintptr_t)columnAddress; - UNUSED_PARAM(clazz) - glSeparableFilter2D(target, internalformat, width, height, format, type, row, column); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetSeparableFilter(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jlong rowAddress, jlong columnAddress, jlong spanAddress) { - glGetSeparableFilterPROC glGetSeparableFilter = (glGetSeparableFilterPROC)tlsGetFunction(1219); - uintptr_t row = (uintptr_t)rowAddress; - uintptr_t column = (uintptr_t)columnAddress; - uintptr_t span = (uintptr_t)spanAddress; - UNUSED_PARAM(clazz) - glGetSeparableFilter(target, format, type, row, column, span); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glConvolutionParameteri(JNIEnv *__env, jclass clazz, jint target, jint pname, jint param) { - glConvolutionParameteriPROC glConvolutionParameteri = (glConvolutionParameteriPROC)tlsGetFunction(1220); - UNUSED_PARAM(clazz) - glConvolutionParameteri(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glConvolutionParameterivPROC glConvolutionParameteriv = (glConvolutionParameterivPROC)tlsGetFunction(1221); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glConvolutionParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glConvolutionParameterf(JNIEnv *__env, jclass clazz, jint target, jint pname, jfloat param) { - glConvolutionParameterfPROC glConvolutionParameterf = (glConvolutionParameterfPROC)tlsGetFunction(1222); - UNUSED_PARAM(clazz) - glConvolutionParameterf(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glConvolutionParameterfvPROC glConvolutionParameterfv = (glConvolutionParameterfvPROC)tlsGetFunction(1223); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glConvolutionParameterfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetConvolutionParameterivPROC glGetConvolutionParameteriv = (glGetConvolutionParameterivPROC)tlsGetFunction(1224); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetConvolutionParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetConvolutionParameterfvPROC glGetConvolutionParameterfv = (glGetConvolutionParameterfvPROC)tlsGetFunction(1225); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetConvolutionParameterfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glHistogram(JNIEnv *__env, jclass clazz, jint target, jint width, jint internalformat, jboolean sink) { - glHistogramPROC glHistogram = (glHistogramPROC)tlsGetFunction(1226); - UNUSED_PARAM(clazz) - glHistogram(target, width, internalformat, sink); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glResetHistogram(JNIEnv *__env, jclass clazz, jint target) { - glResetHistogramPROC glResetHistogram = (glResetHistogramPROC)tlsGetFunction(1227); - UNUSED_PARAM(clazz) - glResetHistogram(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogram(JNIEnv *__env, jclass clazz, jint target, jboolean reset, jint format, jint type, jlong valuesAddress) { - glGetHistogramPROC glGetHistogram = (glGetHistogramPROC)tlsGetFunction(1228); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetHistogram(target, reset, format, type, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetHistogramParameterivPROC glGetHistogramParameteriv = (glGetHistogramParameterivPROC)tlsGetFunction(1229); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetHistogramParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetHistogramParameterfvPROC glGetHistogramParameterfv = (glGetHistogramParameterfvPROC)tlsGetFunction(1230); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetHistogramParameterfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glMinmax(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jboolean sink) { - glMinmaxPROC glMinmax = (glMinmaxPROC)tlsGetFunction(1231); - UNUSED_PARAM(clazz) - glMinmax(target, internalformat, sink); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_glResetMinmax(JNIEnv *__env, jclass clazz, jint target) { - glResetMinmaxPROC glResetMinmax = (glResetMinmaxPROC)tlsGetFunction(1232); - UNUSED_PARAM(clazz) - glResetMinmax(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmax(JNIEnv *__env, jclass clazz, jint target, jboolean reset, jint format, jint type, jlong valuesAddress) { - glGetMinmaxPROC glGetMinmax = (glGetMinmaxPROC)tlsGetFunction(1233); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetMinmax(target, reset, format, type, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetMinmaxParameterivPROC glGetMinmaxParameteriv = (glGetMinmaxParameterivPROC)tlsGetFunction(1234); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMinmaxParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetMinmaxParameterfvPROC glGetMinmaxParameterfv = (glGetMinmaxParameterfvPROC)tlsGetFunction(1235); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMinmaxParameterfv(target, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBIndirectParameters.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBIndirectParameters.c deleted file mode 100644 index a8ee91b1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBIndirectParameters.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMultiDrawArraysIndirectCountARBPROC) (jint, uintptr_t, uintptr_t, jint, jint); -typedef void (APIENTRY *glMultiDrawElementsIndirectCountARBPROC) (jint, jint, uintptr_t, uintptr_t, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBIndirectParameters_nglMultiDrawArraysIndirectCountARB__IJJII(JNIEnv *__env, jclass clazz, jint mode, jlong indirectAddress, jlong drawcount, jint maxdrawcount, jint stride) { - glMultiDrawArraysIndirectCountARBPROC glMultiDrawArraysIndirectCountARB = (glMultiDrawArraysIndirectCountARBPROC)tlsGetFunction(1236); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawArraysIndirectCountARB(mode, indirect, (uintptr_t)drawcount, maxdrawcount, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBIndirectParameters_nglMultiDrawElementsIndirectCountARB__IIJJII(JNIEnv *__env, jclass clazz, jint mode, jint type, jlong indirectAddress, jlong drawcount, jint maxdrawcount, jint stride) { - glMultiDrawElementsIndirectCountARBPROC glMultiDrawElementsIndirectCountARB = (glMultiDrawElementsIndirectCountARBPROC)tlsGetFunction(1237); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawElementsIndirectCountARB(mode, type, indirect, (uintptr_t)drawcount, maxdrawcount, stride); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBInstancedArrays.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBInstancedArrays.c deleted file mode 100644 index 7bcf5efc..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBInstancedArrays.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexAttribDivisorARBPROC) (jint, jint); -typedef void (APIENTRY *glVertexArrayVertexAttribDivisorEXTPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBInstancedArrays_glVertexAttribDivisorARB(JNIEnv *__env, jclass clazz, jint index, jint divisor) { - glVertexAttribDivisorARBPROC glVertexAttribDivisorARB = (glVertexAttribDivisorARBPROC)tlsGetFunction(1238); - UNUSED_PARAM(clazz) - glVertexAttribDivisorARB(index, divisor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBInstancedArrays_glVertexArrayVertexAttribDivisorEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint index, jint divisor) { - glVertexArrayVertexAttribDivisorEXTPROC glVertexArrayVertexAttribDivisorEXT = (glVertexArrayVertexAttribDivisorEXTPROC)tlsGetFunction(1239); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribDivisorEXT(vaobj, index, divisor); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMatrixPalette.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMatrixPalette.c deleted file mode 100644 index 67cad1d7..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMatrixPalette.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glCurrentPaletteMatrixARBPROC) (jint); -typedef void (APIENTRY *glMatrixIndexuivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixIndexubvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixIndexusvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixIndexPointerARBPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_glCurrentPaletteMatrixARB(JNIEnv *__env, jclass clazz, jint index) { - glCurrentPaletteMatrixARBPROC glCurrentPaletteMatrixARB = (glCurrentPaletteMatrixARBPROC)tlsGetFunction(1240); - UNUSED_PARAM(clazz) - glCurrentPaletteMatrixARB(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexuivARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong indicesAddress) { - glMatrixIndexuivARBPROC glMatrixIndexuivARB = (glMatrixIndexuivARBPROC)tlsGetFunction(1241); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glMatrixIndexuivARB(size, indices); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexubvARB(JNIEnv *__env, jclass clazz, jint size, jlong indicesAddress) { - glMatrixIndexubvARBPROC glMatrixIndexubvARB = (glMatrixIndexubvARBPROC)tlsGetFunction(1242); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glMatrixIndexubvARB(size, indices); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexusvARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong indicesAddress) { - glMatrixIndexusvARBPROC glMatrixIndexusvARB = (glMatrixIndexusvARBPROC)tlsGetFunction(1243); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glMatrixIndexusvARB(size, indices); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexPointerARB(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride, jlong pointerAddress) { - glMatrixIndexPointerARBPROC glMatrixIndexPointerARB = (glMatrixIndexPointerARBPROC)tlsGetFunction(1244); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glMatrixIndexPointerARB(size, type, stride, pointer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMultisample.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMultisample.c deleted file mode 100644 index a48dbea4..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMultisample.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glSampleCoverageARBPROC) (jfloat, jboolean); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultisample_glSampleCoverageARB(JNIEnv *__env, jclass clazz, jfloat value, jboolean invert) { - glSampleCoverageARBPROC glSampleCoverageARB = (glSampleCoverageARBPROC)tlsGetFunction(1245); - UNUSED_PARAM(clazz) - glSampleCoverageARB(value, invert); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMultitexture.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMultitexture.c deleted file mode 100644 index cfc3827d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBMultitexture.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glActiveTextureARBPROC) (jint); -typedef void (APIENTRY *glClientActiveTextureARBPROC) (jint); -typedef void (APIENTRY *glMultiTexCoord1fARBPROC) (jint, jfloat); -typedef void (APIENTRY *glMultiTexCoord1sARBPROC) (jint, jshort); -typedef void (APIENTRY *glMultiTexCoord1iARBPROC) (jint, jint); -typedef void (APIENTRY *glMultiTexCoord1dARBPROC) (jint, jdouble); -typedef void (APIENTRY *glMultiTexCoord1fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord1svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord1ivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord1dvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2fARBPROC) (jint, jfloat, jfloat); -typedef void (APIENTRY *glMultiTexCoord2sARBPROC) (jint, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord2iARBPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoord2dARBPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glMultiTexCoord2fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2ivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2dvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3fARBPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glMultiTexCoord3sARBPROC) (jint, jshort, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord3iARBPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoord3dARBPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMultiTexCoord3fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3ivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3dvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4fARBPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glMultiTexCoord4sARBPROC) (jint, jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord4iARBPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoord4dARBPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMultiTexCoord4fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4ivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4dvARBPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glActiveTextureARB(JNIEnv *__env, jclass clazz, jint texture) { - glActiveTextureARBPROC glActiveTextureARB = (glActiveTextureARBPROC)tlsGetFunction(1246); - UNUSED_PARAM(clazz) - glActiveTextureARB(texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glClientActiveTextureARB(JNIEnv *__env, jclass clazz, jint texture) { - glClientActiveTextureARBPROC glClientActiveTextureARB = (glClientActiveTextureARBPROC)tlsGetFunction(1247); - UNUSED_PARAM(clazz) - glClientActiveTextureARB(texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord1fARB(JNIEnv *__env, jclass clazz, jint texture, jfloat s) { - glMultiTexCoord1fARBPROC glMultiTexCoord1fARB = (glMultiTexCoord1fARBPROC)tlsGetFunction(1248); - UNUSED_PARAM(clazz) - glMultiTexCoord1fARB(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord1sARB(JNIEnv *__env, jclass clazz, jint texture, jshort s) { - glMultiTexCoord1sARBPROC glMultiTexCoord1sARB = (glMultiTexCoord1sARBPROC)tlsGetFunction(1249); - UNUSED_PARAM(clazz) - glMultiTexCoord1sARB(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord1iARB(JNIEnv *__env, jclass clazz, jint texture, jint s) { - glMultiTexCoord1iARBPROC glMultiTexCoord1iARB = (glMultiTexCoord1iARBPROC)tlsGetFunction(1250); - UNUSED_PARAM(clazz) - glMultiTexCoord1iARB(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord1dARB(JNIEnv *__env, jclass clazz, jint texture, jdouble s) { - glMultiTexCoord1dARBPROC glMultiTexCoord1dARB = (glMultiTexCoord1dARBPROC)tlsGetFunction(1251); - UNUSED_PARAM(clazz) - glMultiTexCoord1dARB(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1fvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1fvARBPROC glMultiTexCoord1fvARB = (glMultiTexCoord1fvARBPROC)tlsGetFunction(1252); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1fvARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1svARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1svARBPROC glMultiTexCoord1svARB = (glMultiTexCoord1svARBPROC)tlsGetFunction(1253); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1svARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1ivARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1ivARBPROC glMultiTexCoord1ivARB = (glMultiTexCoord1ivARBPROC)tlsGetFunction(1254); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1ivARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1dvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1dvARBPROC glMultiTexCoord1dvARB = (glMultiTexCoord1dvARBPROC)tlsGetFunction(1255); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1dvARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord2fARB(JNIEnv *__env, jclass clazz, jint texture, jfloat s, jfloat t) { - glMultiTexCoord2fARBPROC glMultiTexCoord2fARB = (glMultiTexCoord2fARBPROC)tlsGetFunction(1256); - UNUSED_PARAM(clazz) - glMultiTexCoord2fARB(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord2sARB(JNIEnv *__env, jclass clazz, jint texture, jshort s, jshort t) { - glMultiTexCoord2sARBPROC glMultiTexCoord2sARB = (glMultiTexCoord2sARBPROC)tlsGetFunction(1257); - UNUSED_PARAM(clazz) - glMultiTexCoord2sARB(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord2iARB(JNIEnv *__env, jclass clazz, jint texture, jint s, jint t) { - glMultiTexCoord2iARBPROC glMultiTexCoord2iARB = (glMultiTexCoord2iARBPROC)tlsGetFunction(1258); - UNUSED_PARAM(clazz) - glMultiTexCoord2iARB(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord2dARB(JNIEnv *__env, jclass clazz, jint texture, jdouble s, jdouble t) { - glMultiTexCoord2dARBPROC glMultiTexCoord2dARB = (glMultiTexCoord2dARBPROC)tlsGetFunction(1259); - UNUSED_PARAM(clazz) - glMultiTexCoord2dARB(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2fvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2fvARBPROC glMultiTexCoord2fvARB = (glMultiTexCoord2fvARBPROC)tlsGetFunction(1260); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2fvARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2svARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2svARBPROC glMultiTexCoord2svARB = (glMultiTexCoord2svARBPROC)tlsGetFunction(1261); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2svARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2ivARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2ivARBPROC glMultiTexCoord2ivARB = (glMultiTexCoord2ivARBPROC)tlsGetFunction(1262); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2ivARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2dvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2dvARBPROC glMultiTexCoord2dvARB = (glMultiTexCoord2dvARBPROC)tlsGetFunction(1263); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2dvARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord3fARB(JNIEnv *__env, jclass clazz, jint texture, jfloat s, jfloat t, jfloat r) { - glMultiTexCoord3fARBPROC glMultiTexCoord3fARB = (glMultiTexCoord3fARBPROC)tlsGetFunction(1264); - UNUSED_PARAM(clazz) - glMultiTexCoord3fARB(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord3sARB(JNIEnv *__env, jclass clazz, jint texture, jshort s, jshort t, jshort r) { - glMultiTexCoord3sARBPROC glMultiTexCoord3sARB = (glMultiTexCoord3sARBPROC)tlsGetFunction(1265); - UNUSED_PARAM(clazz) - glMultiTexCoord3sARB(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord3iARB(JNIEnv *__env, jclass clazz, jint texture, jint s, jint t, jint r) { - glMultiTexCoord3iARBPROC glMultiTexCoord3iARB = (glMultiTexCoord3iARBPROC)tlsGetFunction(1266); - UNUSED_PARAM(clazz) - glMultiTexCoord3iARB(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord3dARB(JNIEnv *__env, jclass clazz, jint texture, jdouble s, jdouble t, jdouble r) { - glMultiTexCoord3dARBPROC glMultiTexCoord3dARB = (glMultiTexCoord3dARBPROC)tlsGetFunction(1267); - UNUSED_PARAM(clazz) - glMultiTexCoord3dARB(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3fvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3fvARBPROC glMultiTexCoord3fvARB = (glMultiTexCoord3fvARBPROC)tlsGetFunction(1268); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3fvARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3svARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3svARBPROC glMultiTexCoord3svARB = (glMultiTexCoord3svARBPROC)tlsGetFunction(1269); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3svARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3ivARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3ivARBPROC glMultiTexCoord3ivARB = (glMultiTexCoord3ivARBPROC)tlsGetFunction(1270); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3ivARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3dvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3dvARBPROC glMultiTexCoord3dvARB = (glMultiTexCoord3dvARBPROC)tlsGetFunction(1271); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3dvARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord4fARB(JNIEnv *__env, jclass clazz, jint texture, jfloat s, jfloat t, jfloat r, jfloat q) { - glMultiTexCoord4fARBPROC glMultiTexCoord4fARB = (glMultiTexCoord4fARBPROC)tlsGetFunction(1272); - UNUSED_PARAM(clazz) - glMultiTexCoord4fARB(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord4sARB(JNIEnv *__env, jclass clazz, jint texture, jshort s, jshort t, jshort r, jshort q) { - glMultiTexCoord4sARBPROC glMultiTexCoord4sARB = (glMultiTexCoord4sARBPROC)tlsGetFunction(1273); - UNUSED_PARAM(clazz) - glMultiTexCoord4sARB(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord4iARB(JNIEnv *__env, jclass clazz, jint texture, jint s, jint t, jint r, jint q) { - glMultiTexCoord4iARBPROC glMultiTexCoord4iARB = (glMultiTexCoord4iARBPROC)tlsGetFunction(1274); - UNUSED_PARAM(clazz) - glMultiTexCoord4iARB(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_glMultiTexCoord4dARB(JNIEnv *__env, jclass clazz, jint texture, jdouble s, jdouble t, jdouble r, jdouble q) { - glMultiTexCoord4dARBPROC glMultiTexCoord4dARB = (glMultiTexCoord4dARBPROC)tlsGetFunction(1275); - UNUSED_PARAM(clazz) - glMultiTexCoord4dARB(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4fvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4fvARBPROC glMultiTexCoord4fvARB = (glMultiTexCoord4fvARBPROC)tlsGetFunction(1276); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4fvARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4svARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4svARBPROC glMultiTexCoord4svARB = (glMultiTexCoord4svARBPROC)tlsGetFunction(1277); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4svARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4ivARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4ivARBPROC glMultiTexCoord4ivARB = (glMultiTexCoord4ivARBPROC)tlsGetFunction(1278); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4ivARB(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4dvARB__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4dvARBPROC glMultiTexCoord4dvARB = (glMultiTexCoord4dvARBPROC)tlsGetFunction(1279); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4dvARB(texture, v); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBOcclusionQuery.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBOcclusionQuery.c deleted file mode 100644 index c2733173..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBOcclusionQuery.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGenQueriesARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteQueriesARBPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsQueryARBPROC) (jint); -typedef void (APIENTRY *glBeginQueryARBPROC) (jint, jint); -typedef void (APIENTRY *glEndQueryARBPROC) (jint); -typedef void (APIENTRY *glGetQueryivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryObjectivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryObjectuivARBPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGenQueriesARB__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glGenQueriesARBPROC glGenQueriesARB = (glGenQueriesARBPROC)tlsGetFunction(1280); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glGenQueriesARB(n, ids); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglDeleteQueriesARB__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glDeleteQueriesARBPROC glDeleteQueriesARB = (glDeleteQueriesARBPROC)tlsGetFunction(1281); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glDeleteQueriesARB(n, ids); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_glIsQueryARB(JNIEnv *__env, jclass clazz, jint id) { - glIsQueryARBPROC glIsQueryARB = (glIsQueryARBPROC)tlsGetFunction(1282); - UNUSED_PARAM(clazz) - return glIsQueryARB(id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_glBeginQueryARB(JNIEnv *__env, jclass clazz, jint target, jint id) { - glBeginQueryARBPROC glBeginQueryARB = (glBeginQueryARBPROC)tlsGetFunction(1283); - UNUSED_PARAM(clazz) - glBeginQueryARB(target, id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_glEndQueryARB(JNIEnv *__env, jclass clazz, jint target) { - glEndQueryARBPROC glEndQueryARB = (glEndQueryARBPROC)tlsGetFunction(1284); - UNUSED_PARAM(clazz) - glEndQueryARB(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGetQueryivARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetQueryivARBPROC glGetQueryivARB = (glGetQueryivARBPROC)tlsGetFunction(1285); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryivARB(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGetQueryObjectivARB__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjectivARBPROC glGetQueryObjectivARB = (glGetQueryObjectivARBPROC)tlsGetFunction(1286); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjectivARB(id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGetQueryObjectuivARB__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjectuivARBPROC glGetQueryObjectuivARB = (glGetQueryObjectuivARBPROC)tlsGetFunction(1287); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjectuivARB(id, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBParallelShaderCompile.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBParallelShaderCompile.c deleted file mode 100644 index 7873d559..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBParallelShaderCompile.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMaxShaderCompilerThreadsARBPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBParallelShaderCompile_glMaxShaderCompilerThreadsARB(JNIEnv *__env, jclass clazz, jint count) { - glMaxShaderCompilerThreadsARBPROC glMaxShaderCompilerThreadsARB = (glMaxShaderCompilerThreadsARBPROC)tlsGetFunction(1288); - UNUSED_PARAM(clazz) - glMaxShaderCompilerThreadsARB(count); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBPointParameters.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBPointParameters.c deleted file mode 100644 index 8a6acacc..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBPointParameters.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPointParameterfARBPROC) (jint, jfloat); -typedef void (APIENTRY *glPointParameterfvARBPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBPointParameters_glPointParameterfARB(JNIEnv *__env, jclass clazz, jint pname, jfloat param) { - glPointParameterfARBPROC glPointParameterfARB = (glPointParameterfARBPROC)tlsGetFunction(1289); - UNUSED_PARAM(clazz) - glPointParameterfARB(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBPointParameters_nglPointParameterfvARB__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glPointParameterfvARBPROC glPointParameterfvARB = (glPointParameterfvARBPROC)tlsGetFunction(1290); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glPointParameterfvARB(pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBRobustness.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBRobustness.c deleted file mode 100644 index a88fe55e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBRobustness.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jint (APIENTRY *glGetGraphicsResetStatusARBPROC) (void); -typedef void (APIENTRY *glGetnMapdvARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnMapfvARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnMapivARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPixelMapfvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPixelMapuivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPixelMapusvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPolygonStippleARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetnTexImageARBPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glReadnPixelsARBPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnColorTableARBPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnConvolutionFilterARBPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnSeparableFilterARBPROC) (jint, jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetnHistogramARBPROC) (jint, jboolean, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnMinmaxARBPROC) (jint, jboolean, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnCompressedTexImageARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformfvARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformivARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformuivARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformdvARBPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBRobustness_glGetGraphicsResetStatusARB(JNIEnv *__env, jclass clazz) { - glGetGraphicsResetStatusARBPROC glGetGraphicsResetStatusARB = (glGetGraphicsResetStatusARBPROC)tlsGetFunction(1291); - UNUSED_PARAM(clazz) - return glGetGraphicsResetStatusARB(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMapdvARB__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jint bufSize, jlong dataAddress) { - glGetnMapdvARBPROC glGetnMapdvARB = (glGetnMapdvARBPROC)tlsGetFunction(1292); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnMapdvARB(target, query, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMapfvARB__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jint bufSize, jlong dataAddress) { - glGetnMapfvARBPROC glGetnMapfvARB = (glGetnMapfvARBPROC)tlsGetFunction(1293); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnMapfvARB(target, query, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMapivARB__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jint bufSize, jlong dataAddress) { - glGetnMapivARBPROC glGetnMapivARB = (glGetnMapivARBPROC)tlsGetFunction(1294); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnMapivARB(target, query, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPixelMapfvARB__IIJ(JNIEnv *__env, jclass clazz, jint map, jint bufSize, jlong dataAddress) { - glGetnPixelMapfvARBPROC glGetnPixelMapfvARB = (glGetnPixelMapfvARBPROC)tlsGetFunction(1295); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnPixelMapfvARB(map, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPixelMapuivARB__IIJ(JNIEnv *__env, jclass clazz, jint map, jint bufSize, jlong dataAddress) { - glGetnPixelMapuivARBPROC glGetnPixelMapuivARB = (glGetnPixelMapuivARBPROC)tlsGetFunction(1296); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnPixelMapuivARB(map, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPixelMapusvARB__IIJ(JNIEnv *__env, jclass clazz, jint map, jint bufSize, jlong dataAddress) { - glGetnPixelMapusvARBPROC glGetnPixelMapusvARB = (glGetnPixelMapusvARBPROC)tlsGetFunction(1297); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnPixelMapusvARB(map, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPolygonStippleARB(JNIEnv *__env, jclass clazz, jint bufSize, jlong patternAddress) { - glGetnPolygonStippleARBPROC glGetnPolygonStippleARB = (glGetnPolygonStippleARBPROC)tlsGetFunction(1298); - uintptr_t pattern = (uintptr_t)patternAddress; - UNUSED_PARAM(clazz) - glGetnPolygonStippleARB(bufSize, pattern); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnTexImageARB__IIIIIJ(JNIEnv *__env, jclass clazz, jint tex, jint level, jint format, jint type, jint bufSize, jlong imgAddress) { - glGetnTexImageARBPROC glGetnTexImageARB = (glGetnTexImageARBPROC)tlsGetFunction(1299); - uintptr_t img = (uintptr_t)imgAddress; - UNUSED_PARAM(clazz) - glGetnTexImageARB(tex, level, format, type, bufSize, img); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglReadnPixelsARB__IIIIIIIJ(JNIEnv *__env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jlong dataAddress) { - glReadnPixelsARBPROC glReadnPixelsARB = (glReadnPixelsARBPROC)tlsGetFunction(1300); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glReadnPixelsARB(x, y, width, height, format, type, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnColorTableARB__IIIIJ(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jint bufSize, jlong tableAddress) { - glGetnColorTableARBPROC glGetnColorTableARB = (glGetnColorTableARBPROC)tlsGetFunction(1301); - uintptr_t table = (uintptr_t)tableAddress; - UNUSED_PARAM(clazz) - glGetnColorTableARB(target, format, type, bufSize, table); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnConvolutionFilterARB(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jint bufSize, jlong imageAddress) { - glGetnConvolutionFilterARBPROC glGetnConvolutionFilterARB = (glGetnConvolutionFilterARBPROC)tlsGetFunction(1302); - uintptr_t image = (uintptr_t)imageAddress; - UNUSED_PARAM(clazz) - glGetnConvolutionFilterARB(target, format, type, bufSize, image); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnSeparableFilterARB(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jint rowBufSize, jlong rowAddress, jint columnBufSize, jlong columnAddress, jlong spanAddress) { - glGetnSeparableFilterARBPROC glGetnSeparableFilterARB = (glGetnSeparableFilterARBPROC)tlsGetFunction(1303); - uintptr_t row = (uintptr_t)rowAddress; - uintptr_t column = (uintptr_t)columnAddress; - uintptr_t span = (uintptr_t)spanAddress; - UNUSED_PARAM(clazz) - glGetnSeparableFilterARB(target, format, type, rowBufSize, row, columnBufSize, column, span); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnHistogramARB(JNIEnv *__env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong valuesAddress) { - glGetnHistogramARBPROC glGetnHistogramARB = (glGetnHistogramARBPROC)tlsGetFunction(1304); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetnHistogramARB(target, reset, format, type, bufSize, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMinmaxARB(JNIEnv *__env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong valuesAddress) { - glGetnMinmaxARBPROC glGetnMinmaxARB = (glGetnMinmaxARBPROC)tlsGetFunction(1305); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetnMinmaxARB(target, reset, format, type, bufSize, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnCompressedTexImageARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint bufSize, jlong imgAddress) { - glGetnCompressedTexImageARBPROC glGetnCompressedTexImageARB = (glGetnCompressedTexImageARBPROC)tlsGetFunction(1306); - uintptr_t img = (uintptr_t)imgAddress; - UNUSED_PARAM(clazz) - glGetnCompressedTexImageARB(target, level, bufSize, img); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformfvARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformfvARBPROC glGetnUniformfvARB = (glGetnUniformfvARBPROC)tlsGetFunction(1307); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformfvARB(program, location, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformivARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformivARBPROC glGetnUniformivARB = (glGetnUniformivARBPROC)tlsGetFunction(1308); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformivARB(program, location, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformuivARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformuivARBPROC glGetnUniformuivARB = (glGetnUniformuivARBPROC)tlsGetFunction(1309); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformuivARB(program, location, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformdvARB__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformdvARBPROC glGetnUniformdvARB = (glGetnUniformdvARBPROC)tlsGetFunction(1310); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformdvARB(program, location, bufSize, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSampleLocations.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSampleLocations.c deleted file mode 100644 index 80317db1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSampleLocations.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFramebufferSampleLocationsfvARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedFramebufferSampleLocationsfvARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glEvaluateDepthValuesARBPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSampleLocations_nglFramebufferSampleLocationsfvARB__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint start, jint count, jlong vAddress) { - glFramebufferSampleLocationsfvARBPROC glFramebufferSampleLocationsfvARB = (glFramebufferSampleLocationsfvARBPROC)tlsGetFunction(1311); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glFramebufferSampleLocationsfvARB(target, start, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSampleLocations_nglNamedFramebufferSampleLocationsfvARB__IIIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint start, jint count, jlong vAddress) { - glNamedFramebufferSampleLocationsfvARBPROC glNamedFramebufferSampleLocationsfvARB = (glNamedFramebufferSampleLocationsfvARBPROC)tlsGetFunction(1312); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNamedFramebufferSampleLocationsfvARB(framebuffer, start, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSampleLocations_glEvaluateDepthValuesARB(JNIEnv *__env, jclass clazz) { - glEvaluateDepthValuesARBPROC glEvaluateDepthValuesARB = (glEvaluateDepthValuesARBPROC)tlsGetFunction(1313); - UNUSED_PARAM(clazz) - glEvaluateDepthValuesARB(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSampleShading.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSampleShading.c deleted file mode 100644 index 7decbeaa..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSampleShading.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMinSampleShadingARBPROC) (jfloat); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSampleShading_glMinSampleShadingARB(JNIEnv *__env, jclass clazz, jfloat value) { - glMinSampleShadingARBPROC glMinSampleShadingARB = (glMinSampleShadingARBPROC)tlsGetFunction(1314); - UNUSED_PARAM(clazz) - glMinSampleShadingARB(value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBShaderObjects.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBShaderObjects.c deleted file mode 100644 index a4ab03f3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBShaderObjects.c +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDeleteObjectARBPROC) (jint); -typedef jint (APIENTRY *glGetHandleARBPROC) (jint); -typedef void (APIENTRY *glDetachObjectARBPROC) (jint, jint); -typedef jint (APIENTRY *glCreateShaderObjectARBPROC) (jint); -typedef void (APIENTRY *glShaderSourceARBPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glCompileShaderARBPROC) (jint); -typedef jint (APIENTRY *glCreateProgramObjectARBPROC) (void); -typedef void (APIENTRY *glAttachObjectARBPROC) (jint, jint); -typedef void (APIENTRY *glLinkProgramARBPROC) (jint); -typedef void (APIENTRY *glUseProgramObjectARBPROC) (jint); -typedef void (APIENTRY *glValidateProgramARBPROC) (jint); -typedef void (APIENTRY *glUniform1fARBPROC) (jint, jfloat); -typedef void (APIENTRY *glUniform2fARBPROC) (jint, jfloat, jfloat); -typedef void (APIENTRY *glUniform3fARBPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glUniform4fARBPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glUniform1iARBPROC) (jint, jint); -typedef void (APIENTRY *glUniform2iARBPROC) (jint, jint, jint); -typedef void (APIENTRY *glUniform3iARBPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glUniform4iARBPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glUniform1fvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2fvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3fvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4fvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform1ivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2ivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3ivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4ivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniformMatrix2fvARBPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix3fvARBPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix4fvARBPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glGetObjectParameterfvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetObjectParameterivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetInfoLogARBPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetAttachedObjectsARBPROC) (jint, jint, uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetUniformLocationARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetActiveUniformARBPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetUniformfvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetShaderSourceARBPROC) (jint, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glDeleteObjectARB(JNIEnv *__env, jclass clazz, jint obj) { - glDeleteObjectARBPROC glDeleteObjectARB = (glDeleteObjectARBPROC)tlsGetFunction(1315); - UNUSED_PARAM(clazz) - glDeleteObjectARB(obj); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glGetHandleARB(JNIEnv *__env, jclass clazz, jint pname) { - glGetHandleARBPROC glGetHandleARB = (glGetHandleARBPROC)tlsGetFunction(1316); - UNUSED_PARAM(clazz) - return glGetHandleARB(pname); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glDetachObjectARB(JNIEnv *__env, jclass clazz, jint containerObj, jint attachedObj) { - glDetachObjectARBPROC glDetachObjectARB = (glDetachObjectARBPROC)tlsGetFunction(1317); - UNUSED_PARAM(clazz) - glDetachObjectARB(containerObj, attachedObj); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glCreateShaderObjectARB(JNIEnv *__env, jclass clazz, jint shaderType) { - glCreateShaderObjectARBPROC glCreateShaderObjectARB = (glCreateShaderObjectARBPROC)tlsGetFunction(1318); - UNUSED_PARAM(clazz) - return glCreateShaderObjectARB(shaderType); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglShaderSourceARB__IIJJ(JNIEnv *__env, jclass clazz, jint shaderObj, jint count, jlong stringAddress, jlong lengthAddress) { - glShaderSourceARBPROC glShaderSourceARB = (glShaderSourceARBPROC)tlsGetFunction(1319); - uintptr_t string = (uintptr_t)stringAddress; - uintptr_t length = (uintptr_t)lengthAddress; - UNUSED_PARAM(clazz) - glShaderSourceARB(shaderObj, count, string, length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glCompileShaderARB(JNIEnv *__env, jclass clazz, jint shaderObj) { - glCompileShaderARBPROC glCompileShaderARB = (glCompileShaderARBPROC)tlsGetFunction(1320); - UNUSED_PARAM(clazz) - glCompileShaderARB(shaderObj); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glCreateProgramObjectARB(JNIEnv *__env, jclass clazz) { - glCreateProgramObjectARBPROC glCreateProgramObjectARB = (glCreateProgramObjectARBPROC)tlsGetFunction(1321); - UNUSED_PARAM(clazz) - return glCreateProgramObjectARB(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glAttachObjectARB(JNIEnv *__env, jclass clazz, jint containerObj, jint obj) { - glAttachObjectARBPROC glAttachObjectARB = (glAttachObjectARBPROC)tlsGetFunction(1322); - UNUSED_PARAM(clazz) - glAttachObjectARB(containerObj, obj); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glLinkProgramARB(JNIEnv *__env, jclass clazz, jint programObj) { - glLinkProgramARBPROC glLinkProgramARB = (glLinkProgramARBPROC)tlsGetFunction(1323); - UNUSED_PARAM(clazz) - glLinkProgramARB(programObj); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUseProgramObjectARB(JNIEnv *__env, jclass clazz, jint programObj) { - glUseProgramObjectARBPROC glUseProgramObjectARB = (glUseProgramObjectARBPROC)tlsGetFunction(1324); - UNUSED_PARAM(clazz) - glUseProgramObjectARB(programObj); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glValidateProgramARB(JNIEnv *__env, jclass clazz, jint programObj) { - glValidateProgramARBPROC glValidateProgramARB = (glValidateProgramARBPROC)tlsGetFunction(1325); - UNUSED_PARAM(clazz) - glValidateProgramARB(programObj); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform1fARB(JNIEnv *__env, jclass clazz, jint location, jfloat v0) { - glUniform1fARBPROC glUniform1fARB = (glUniform1fARBPROC)tlsGetFunction(1326); - UNUSED_PARAM(clazz) - glUniform1fARB(location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform2fARB(JNIEnv *__env, jclass clazz, jint location, jfloat v0, jfloat v1) { - glUniform2fARBPROC glUniform2fARB = (glUniform2fARBPROC)tlsGetFunction(1327); - UNUSED_PARAM(clazz) - glUniform2fARB(location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform3fARB(JNIEnv *__env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2) { - glUniform3fARBPROC glUniform3fARB = (glUniform3fARBPROC)tlsGetFunction(1328); - UNUSED_PARAM(clazz) - glUniform3fARB(location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform4fARB(JNIEnv *__env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) { - glUniform4fARBPROC glUniform4fARB = (glUniform4fARBPROC)tlsGetFunction(1329); - UNUSED_PARAM(clazz) - glUniform4fARB(location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform1iARB(JNIEnv *__env, jclass clazz, jint location, jint v0) { - glUniform1iARBPROC glUniform1iARB = (glUniform1iARBPROC)tlsGetFunction(1330); - UNUSED_PARAM(clazz) - glUniform1iARB(location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform2iARB(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1) { - glUniform2iARBPROC glUniform2iARB = (glUniform2iARBPROC)tlsGetFunction(1331); - UNUSED_PARAM(clazz) - glUniform2iARB(location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform3iARB(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2) { - glUniform3iARBPROC glUniform3iARB = (glUniform3iARBPROC)tlsGetFunction(1332); - UNUSED_PARAM(clazz) - glUniform3iARB(location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_glUniform4iARB(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3) { - glUniform4iARBPROC glUniform4iARB = (glUniform4iARBPROC)tlsGetFunction(1333); - UNUSED_PARAM(clazz) - glUniform4iARB(location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform1fvARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1fvARBPROC glUniform1fvARB = (glUniform1fvARBPROC)tlsGetFunction(1334); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1fvARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform2fvARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2fvARBPROC glUniform2fvARB = (glUniform2fvARBPROC)tlsGetFunction(1335); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2fvARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform3fvARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3fvARBPROC glUniform3fvARB = (glUniform3fvARBPROC)tlsGetFunction(1336); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3fvARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform4fvARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4fvARBPROC glUniform4fvARB = (glUniform4fvARBPROC)tlsGetFunction(1337); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4fvARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform1ivARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1ivARBPROC glUniform1ivARB = (glUniform1ivARBPROC)tlsGetFunction(1338); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1ivARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform2ivARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2ivARBPROC glUniform2ivARB = (glUniform2ivARBPROC)tlsGetFunction(1339); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2ivARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform3ivARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3ivARBPROC glUniform3ivARB = (glUniform3ivARBPROC)tlsGetFunction(1340); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3ivARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform4ivARB__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4ivARBPROC glUniform4ivARB = (glUniform4ivARBPROC)tlsGetFunction(1341); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4ivARB(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniformMatrix2fvARB__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix2fvARBPROC glUniformMatrix2fvARB = (glUniformMatrix2fvARBPROC)tlsGetFunction(1342); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix2fvARB(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniformMatrix3fvARB__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix3fvARBPROC glUniformMatrix3fvARB = (glUniformMatrix3fvARBPROC)tlsGetFunction(1343); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix3fvARB(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniformMatrix4fvARB__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix4fvARBPROC glUniformMatrix4fvARB = (glUniformMatrix4fvARBPROC)tlsGetFunction(1344); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix4fvARB(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetObjectParameterfvARB__IIJ(JNIEnv *__env, jclass clazz, jint obj, jint pname, jlong paramsAddress) { - glGetObjectParameterfvARBPROC glGetObjectParameterfvARB = (glGetObjectParameterfvARBPROC)tlsGetFunction(1345); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetObjectParameterfvARB(obj, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetObjectParameterivARB__IIJ(JNIEnv *__env, jclass clazz, jint obj, jint pname, jlong paramsAddress) { - glGetObjectParameterivARBPROC glGetObjectParameterivARB = (glGetObjectParameterivARBPROC)tlsGetFunction(1346); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetObjectParameterivARB(obj, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetInfoLogARB__IIJJ(JNIEnv *__env, jclass clazz, jint obj, jint maxLength, jlong lengthAddress, jlong infoLogAddress) { - glGetInfoLogARBPROC glGetInfoLogARB = (glGetInfoLogARBPROC)tlsGetFunction(1347); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t infoLog = (uintptr_t)infoLogAddress; - UNUSED_PARAM(clazz) - glGetInfoLogARB(obj, maxLength, length, infoLog); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetAttachedObjectsARB__IIJJ(JNIEnv *__env, jclass clazz, jint containerObj, jint maxCount, jlong countAddress, jlong objAddress) { - glGetAttachedObjectsARBPROC glGetAttachedObjectsARB = (glGetAttachedObjectsARBPROC)tlsGetFunction(1348); - uintptr_t count = (uintptr_t)countAddress; - uintptr_t obj = (uintptr_t)objAddress; - UNUSED_PARAM(clazz) - glGetAttachedObjectsARB(containerObj, maxCount, count, obj); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetUniformLocationARB(JNIEnv *__env, jclass clazz, jint programObj, jlong nameAddress) { - glGetUniformLocationARBPROC glGetUniformLocationARB = (glGetUniformLocationARBPROC)tlsGetFunction(1349); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetUniformLocationARB(programObj, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetActiveUniformARB__IIIJJJJ(JNIEnv *__env, jclass clazz, jint programObj, jint index, jint maxLength, jlong lengthAddress, jlong sizeAddress, jlong typeAddress, jlong nameAddress) { - glGetActiveUniformARBPROC glGetActiveUniformARB = (glGetActiveUniformARBPROC)tlsGetFunction(1350); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t size = (uintptr_t)sizeAddress; - uintptr_t type = (uintptr_t)typeAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetActiveUniformARB(programObj, index, maxLength, length, size, type, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetUniformfvARB__IIJ(JNIEnv *__env, jclass clazz, jint programObj, jint location, jlong paramsAddress) { - glGetUniformfvARBPROC glGetUniformfvARB = (glGetUniformfvARBPROC)tlsGetFunction(1351); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformfvARB(programObj, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetUniformivARB__IIJ(JNIEnv *__env, jclass clazz, jint programObj, jint location, jlong paramsAddress) { - glGetUniformivARBPROC glGetUniformivARB = (glGetUniformivARBPROC)tlsGetFunction(1352); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformivARB(programObj, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetShaderSourceARB__IIJJ(JNIEnv *__env, jclass clazz, jint obj, jint maxLength, jlong lengthAddress, jlong sourceAddress) { - glGetShaderSourceARBPROC glGetShaderSourceARB = (glGetShaderSourceARBPROC)tlsGetFunction(1353); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t source = (uintptr_t)sourceAddress; - UNUSED_PARAM(clazz) - glGetShaderSourceARB(obj, maxLength, length, source); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBShadingLanguageInclude.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBShadingLanguageInclude.c deleted file mode 100644 index 8f718090..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBShadingLanguageInclude.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glNamedStringARBPROC) (jint, jint, uintptr_t, jint, uintptr_t); -typedef void (APIENTRY *glDeleteNamedStringARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glCompileShaderIncludeARBPROC) (jint, jint, uintptr_t, uintptr_t); -typedef jboolean (APIENTRY *glIsNamedStringARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetNamedStringARBPROC) (jint, uintptr_t, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetNamedStringivARBPROC) (jint, uintptr_t, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglNamedStringARB(JNIEnv *__env, jclass clazz, jint type, jint namelen, jlong nameAddress, jint stringlen, jlong stringAddress) { - glNamedStringARBPROC glNamedStringARB = (glNamedStringARBPROC)tlsGetFunction(1354); - uintptr_t name = (uintptr_t)nameAddress; - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - glNamedStringARB(type, namelen, name, stringlen, string); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglDeleteNamedStringARB(JNIEnv *__env, jclass clazz, jint namelen, jlong nameAddress) { - glDeleteNamedStringARBPROC glDeleteNamedStringARB = (glDeleteNamedStringARBPROC)tlsGetFunction(1355); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glDeleteNamedStringARB(namelen, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglCompileShaderIncludeARB__IIJJ(JNIEnv *__env, jclass clazz, jint shader, jint count, jlong pathAddress, jlong lengthAddress) { - glCompileShaderIncludeARBPROC glCompileShaderIncludeARB = (glCompileShaderIncludeARBPROC)tlsGetFunction(1356); - uintptr_t path = (uintptr_t)pathAddress; - uintptr_t length = (uintptr_t)lengthAddress; - UNUSED_PARAM(clazz) - glCompileShaderIncludeARB(shader, count, path, length); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglIsNamedStringARB(JNIEnv *__env, jclass clazz, jint namelen, jlong nameAddress) { - glIsNamedStringARBPROC glIsNamedStringARB = (glIsNamedStringARBPROC)tlsGetFunction(1357); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glIsNamedStringARB(namelen, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglGetNamedStringARB__IJIJJ(JNIEnv *__env, jclass clazz, jint namelen, jlong nameAddress, jint bufSize, jlong stringlenAddress, jlong stringAddress) { - glGetNamedStringARBPROC glGetNamedStringARB = (glGetNamedStringARBPROC)tlsGetFunction(1358); - uintptr_t name = (uintptr_t)nameAddress; - uintptr_t stringlen = (uintptr_t)stringlenAddress; - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - glGetNamedStringARB(namelen, name, bufSize, stringlen, string); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglGetNamedStringivARB__IJIJ(JNIEnv *__env, jclass clazz, jint namelen, jlong nameAddress, jint pname, jlong paramsAddress) { - glGetNamedStringivARBPROC glGetNamedStringivARB = (glGetNamedStringivARBPROC)tlsGetFunction(1359); - uintptr_t name = (uintptr_t)nameAddress; - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedStringivARB(namelen, name, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSparseBuffer.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSparseBuffer.c deleted file mode 100644 index c3a93e31..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSparseBuffer.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBufferPageCommitmentARBPROC) (jint, uintptr_t, uintptr_t, jboolean); -typedef void (APIENTRY *glNamedBufferPageCommitmentEXTPROC) (jint, uintptr_t, uintptr_t, jboolean); -typedef void (APIENTRY *glNamedBufferPageCommitmentARBPROC) (jint, uintptr_t, uintptr_t, jboolean); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSparseBuffer_glBufferPageCommitmentARB(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong size, jboolean commit) { - glBufferPageCommitmentARBPROC glBufferPageCommitmentARB = (glBufferPageCommitmentARBPROC)tlsGetFunction(1360); - UNUSED_PARAM(clazz) - glBufferPageCommitmentARB(target, (uintptr_t)offset, (uintptr_t)size, commit); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSparseBuffer_glNamedBufferPageCommitmentEXT(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jboolean commit) { - glNamedBufferPageCommitmentEXTPROC glNamedBufferPageCommitmentEXT = (glNamedBufferPageCommitmentEXTPROC)tlsGetFunction(1361); - UNUSED_PARAM(clazz) - glNamedBufferPageCommitmentEXT(buffer, (uintptr_t)offset, (uintptr_t)size, commit); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSparseBuffer_glNamedBufferPageCommitmentARB(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jboolean commit) { - glNamedBufferPageCommitmentARBPROC glNamedBufferPageCommitmentARB = (glNamedBufferPageCommitmentARBPROC)tlsGetFunction(1362); - UNUSED_PARAM(clazz) - glNamedBufferPageCommitmentARB(buffer, (uintptr_t)offset, (uintptr_t)size, commit); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSparseTexture.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSparseTexture.c deleted file mode 100644 index 37734620..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBSparseTexture.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTexPageCommitmentARBPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTexturePageCommitmentEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jboolean); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSparseTexture_glTexPageCommitmentARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jboolean commit) { - glTexPageCommitmentARBPROC glTexPageCommitmentARB = (glTexPageCommitmentARBPROC)tlsGetFunction(1363); - UNUSED_PARAM(clazz) - glTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSparseTexture_glTexturePageCommitmentEXT(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jboolean commit) { - glTexturePageCommitmentEXTPROC glTexturePageCommitmentEXT = (glTexturePageCommitmentEXTPROC)tlsGetFunction(1364); - UNUSED_PARAM(clazz) - glTexturePageCommitmentEXT(texture, level, xoffset, yoffset, zoffset, width, height, depth, commit); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferObject.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferObject.c deleted file mode 100644 index e29a3a00..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferObject.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTexBufferARBPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureBufferObject_glTexBufferARB(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint buffer) { - glTexBufferARBPROC glTexBufferARB = (glTexBufferARBPROC)tlsGetFunction(1365); - UNUSED_PARAM(clazz) - glTexBufferARB(target, internalformat, buffer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferRange.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferRange.c deleted file mode 100644 index 82bfc1fb..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureBufferRange.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTextureBufferRangeEXTPROC) (jint, jint, jint, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureBufferRange_glTextureBufferRangeEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint internalformat, jint buffer, jlong offset, jlong size) { - glTextureBufferRangeEXTPROC glTextureBufferRangeEXT = (glTextureBufferRangeEXTPROC)tlsGetFunction(1366); - UNUSED_PARAM(clazz) - glTextureBufferRangeEXT(texture, target, internalformat, buffer, (uintptr_t)offset, (uintptr_t)size); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureCompression.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureCompression.c deleted file mode 100644 index 5277a2d2..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureCompression.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glCompressedTexImage3DARBPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexImage2DARBPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexImage1DARBPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexSubImage3DARBPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexSubImage2DARBPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexSubImage1DARBPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetCompressedTexImageARBPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong dataAddress) { - glCompressedTexImage3DARBPROC glCompressedTexImage3DARB = (glCompressedTexImage3DARBPROC)tlsGetFunction(1367); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong dataAddress) { - glCompressedTexImage2DARBPROC glCompressedTexImage2DARB = (glCompressedTexImage2DARBPROC)tlsGetFunction(1368); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong dataAddress) { - glCompressedTexImage1DARBPROC glCompressedTexImage1DARB = (glCompressedTexImage1DARBPROC)tlsGetFunction(1369); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong dataAddress) { - glCompressedTexSubImage3DARBPROC glCompressedTexSubImage3DARB = (glCompressedTexSubImage3DARBPROC)tlsGetFunction(1370); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong dataAddress) { - glCompressedTexSubImage2DARBPROC glCompressedTexSubImage2DARB = (glCompressedTexSubImage2DARBPROC)tlsGetFunction(1371); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARB(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong dataAddress) { - glCompressedTexSubImage1DARBPROC glCompressedTexSubImage1DARB = (glCompressedTexSubImage1DARBPROC)tlsGetFunction(1372); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARB(JNIEnv *__env, jclass clazz, jint target, jint level, jlong pixelsAddress) { - glGetCompressedTexImageARBPROC glGetCompressedTexImageARB = (glGetCompressedTexImageARBPROC)tlsGetFunction(1373); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetCompressedTexImageARB(target, level, pixels); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorage.c deleted file mode 100644 index bae12d65..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorage.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTextureStorage1DEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage2DEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorage_glTextureStorage1DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width) { - glTextureStorage1DEXTPROC glTextureStorage1DEXT = (glTextureStorage1DEXTPROC)tlsGetFunction(1374); - UNUSED_PARAM(clazz) - glTextureStorage1DEXT(texture, target, levels, internalformat, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorage_glTextureStorage2DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height) { - glTextureStorage2DEXTPROC glTextureStorage2DEXT = (glTextureStorage2DEXTPROC)tlsGetFunction(1375); - UNUSED_PARAM(clazz) - glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorage_glTextureStorage3DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { - glTextureStorage3DEXTPROC glTextureStorage3DEXT = (glTextureStorage3DEXTPROC)tlsGetFunction(1376); - UNUSED_PARAM(clazz) - glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorageMultisample.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorageMultisample.c deleted file mode 100644 index 570c3676..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTextureStorageMultisample.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTextureStorage2DMultisampleEXTPROC) (jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureStorage3DMultisampleEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jboolean); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorageMultisample_glTextureStorage2DMultisampleEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) { - glTextureStorage2DMultisampleEXTPROC glTextureStorage2DMultisampleEXT = (glTextureStorage2DMultisampleEXTPROC)tlsGetFunction(1377); - UNUSED_PARAM(clazz) - glTextureStorage2DMultisampleEXT(texture, target, samples, internalformat, width, height, fixedsamplelocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorageMultisample_glTextureStorage3DMultisampleEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) { - glTextureStorage3DMultisampleEXTPROC glTextureStorage3DMultisampleEXT = (glTextureStorage3DMultisampleEXTPROC)tlsGetFunction(1378); - UNUSED_PARAM(clazz) - glTextureStorage3DMultisampleEXT(texture, target, samples, internalformat, width, height, depth, fixedsamplelocations); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTransposeMatrix.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTransposeMatrix.c deleted file mode 100644 index aedef903..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBTransposeMatrix.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glLoadTransposeMatrixfARBPROC) (uintptr_t); -typedef void (APIENTRY *glLoadTransposeMatrixdARBPROC) (uintptr_t); -typedef void (APIENTRY *glMultTransposeMatrixfARBPROC) (uintptr_t); -typedef void (APIENTRY *glMultTransposeMatrixdARBPROC) (uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTransposeMatrix_nglLoadTransposeMatrixfARB__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glLoadTransposeMatrixfARBPROC glLoadTransposeMatrixfARB = (glLoadTransposeMatrixfARBPROC)tlsGetFunction(1379); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glLoadTransposeMatrixfARB(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTransposeMatrix_nglLoadTransposeMatrixdARB__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glLoadTransposeMatrixdARBPROC glLoadTransposeMatrixdARB = (glLoadTransposeMatrixdARBPROC)tlsGetFunction(1380); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glLoadTransposeMatrixdARB(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTransposeMatrix_nglMultTransposeMatrixfARB__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glMultTransposeMatrixfARBPROC glMultTransposeMatrixfARB = (glMultTransposeMatrixfARBPROC)tlsGetFunction(1381); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMultTransposeMatrixfARB(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTransposeMatrix_nglMultTransposeMatrixdARB__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glMultTransposeMatrixdARBPROC glMultTransposeMatrixdARB = (glMultTransposeMatrixdARBPROC)tlsGetFunction(1382); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMultTransposeMatrixdARB(m); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttrib64Bit.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttrib64Bit.c deleted file mode 100644 index 72029258..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttrib64Bit.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexArrayVertexAttribLOffsetEXTPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttrib64Bit_glVertexArrayVertexAttribLOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jint stride, jlong offset) { - glVertexArrayVertexAttribLOffsetEXTPROC glVertexArrayVertexAttribLOffsetEXT = (glVertexArrayVertexAttribLOffsetEXTPROC)tlsGetFunction(1383); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, (uintptr_t)offset); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttribBinding.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttribBinding.c deleted file mode 100644 index 7ec5dfc9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexAttribBinding.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexArrayBindVertexBufferEXTPROC) (jint, jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glVertexArrayVertexAttribFormatEXTPROC) (jint, jint, jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexArrayVertexAttribIFormatEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexArrayVertexAttribLFormatEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexArrayVertexAttribBindingEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertexArrayVertexBindingDivisorEXTPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttribBinding_glVertexArrayBindVertexBufferEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint bindingindex, jint buffer, jlong offset, jint stride) { - glVertexArrayBindVertexBufferEXTPROC glVertexArrayBindVertexBufferEXT = (glVertexArrayBindVertexBufferEXTPROC)tlsGetFunction(1384); - UNUSED_PARAM(clazz) - glVertexArrayBindVertexBufferEXT(vaobj, bindingindex, buffer, (uintptr_t)offset, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttribBinding_glVertexArrayVertexAttribFormatEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) { - glVertexArrayVertexAttribFormatEXTPROC glVertexArrayVertexAttribFormatEXT = (glVertexArrayVertexAttribFormatEXTPROC)tlsGetFunction(1385); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribFormatEXT(vaobj, attribindex, size, type, normalized, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttribBinding_glVertexArrayVertexAttribIFormatEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint size, jint type, jint relativeoffset) { - glVertexArrayVertexAttribIFormatEXTPROC glVertexArrayVertexAttribIFormatEXT = (glVertexArrayVertexAttribIFormatEXTPROC)tlsGetFunction(1386); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribIFormatEXT(vaobj, attribindex, size, type, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttribBinding_glVertexArrayVertexAttribLFormatEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint size, jint type, jint relativeoffset) { - glVertexArrayVertexAttribLFormatEXTPROC glVertexArrayVertexAttribLFormatEXT = (glVertexArrayVertexAttribLFormatEXTPROC)tlsGetFunction(1387); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribLFormatEXT(vaobj, attribindex, size, type, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttribBinding_glVertexArrayVertexAttribBindingEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint bindingindex) { - glVertexArrayVertexAttribBindingEXTPROC glVertexArrayVertexAttribBindingEXT = (glVertexArrayVertexAttribBindingEXTPROC)tlsGetFunction(1388); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribBindingEXT(vaobj, attribindex, bindingindex); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttribBinding_glVertexArrayVertexBindingDivisorEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint bindingindex, jint divisor) { - glVertexArrayVertexBindingDivisorEXTPROC glVertexArrayVertexBindingDivisorEXT = (glVertexArrayVertexBindingDivisorEXTPROC)tlsGetFunction(1389); - UNUSED_PARAM(clazz) - glVertexArrayVertexBindingDivisorEXT(vaobj, bindingindex, divisor); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexBlend.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexBlend.c deleted file mode 100644 index 285a33db..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexBlend.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glWeightfvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightbvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightubvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightsvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightusvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightuivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightdvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glWeightPointerARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexBlendARBPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightfvARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightfvARBPROC glWeightfvARB = (glWeightfvARBPROC)tlsGetFunction(1390); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightfvARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightbvARB(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightbvARBPROC glWeightbvARB = (glWeightbvARBPROC)tlsGetFunction(1391); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightbvARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightubvARB(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightubvARBPROC glWeightubvARB = (glWeightubvARBPROC)tlsGetFunction(1392); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightubvARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightsvARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightsvARBPROC glWeightsvARB = (glWeightsvARBPROC)tlsGetFunction(1393); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightsvARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightusvARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightusvARBPROC glWeightusvARB = (glWeightusvARBPROC)tlsGetFunction(1394); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightusvARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightivARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightivARBPROC glWeightivARB = (glWeightivARBPROC)tlsGetFunction(1395); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightivARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightuivARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightuivARBPROC glWeightuivARB = (glWeightuivARBPROC)tlsGetFunction(1396); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightuivARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightdvARB__IJ(JNIEnv *__env, jclass clazz, jint size, jlong weightsAddress) { - glWeightdvARBPROC glWeightdvARB = (glWeightdvARBPROC)tlsGetFunction(1397); - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightdvARB(size, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightPointerARB__IIIJ(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride, jlong pointerAddress) { - glWeightPointerARBPROC glWeightPointerARB = (glWeightPointerARBPROC)tlsGetFunction(1398); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glWeightPointerARB(size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_glVertexBlendARB(JNIEnv *__env, jclass clazz, jint count) { - glVertexBlendARBPROC glVertexBlendARB = (glVertexBlendARBPROC)tlsGetFunction(1399); - UNUSED_PARAM(clazz) - glVertexBlendARB(count); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexBufferObject.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexBufferObject.c deleted file mode 100644 index 8562ffe2..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexBufferObject.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBindBufferARBPROC) (jint, jint); -typedef void (APIENTRY *glDeleteBuffersARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenBuffersARBPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsBufferARBPROC) (jint); -typedef void (APIENTRY *glBufferDataARBPROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glBufferSubDataARBPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetBufferSubDataARBPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef uintptr_t (APIENTRY *glMapBufferARBPROC) (jint, jint); -typedef jboolean (APIENTRY *glUnmapBufferARBPROC) (jint); -typedef void (APIENTRY *glGetBufferParameterivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetBufferPointervARBPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_glBindBufferARB(JNIEnv *__env, jclass clazz, jint target, jint buffer) { - glBindBufferARBPROC glBindBufferARB = (glBindBufferARBPROC)tlsGetFunction(1400); - UNUSED_PARAM(clazz) - glBindBufferARB(target, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglDeleteBuffersARB__IJ(JNIEnv *__env, jclass clazz, jint n, jlong buffersAddress) { - glDeleteBuffersARBPROC glDeleteBuffersARB = (glDeleteBuffersARBPROC)tlsGetFunction(1401); - uintptr_t buffers = (uintptr_t)buffersAddress; - UNUSED_PARAM(clazz) - glDeleteBuffersARB(n, buffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglGenBuffersARB__IJ(JNIEnv *__env, jclass clazz, jint n, jlong buffersAddress) { - glGenBuffersARBPROC glGenBuffersARB = (glGenBuffersARBPROC)tlsGetFunction(1402); - uintptr_t buffers = (uintptr_t)buffersAddress; - UNUSED_PARAM(clazz) - glGenBuffersARB(n, buffers); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_glIsBufferARB(JNIEnv *__env, jclass clazz, jint buffer) { - glIsBufferARBPROC glIsBufferARB = (glIsBufferARBPROC)tlsGetFunction(1403); - UNUSED_PARAM(clazz) - return glIsBufferARB(buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglBufferDataARB__IJJI(JNIEnv *__env, jclass clazz, jint target, jlong size, jlong dataAddress, jint usage) { - glBufferDataARBPROC glBufferDataARB = (glBufferDataARBPROC)tlsGetFunction(1404); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glBufferDataARB(target, (uintptr_t)size, data, usage); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglBufferSubDataARB__IJJJ(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong size, jlong dataAddress) { - glBufferSubDataARBPROC glBufferSubDataARB = (glBufferSubDataARBPROC)tlsGetFunction(1405); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glBufferSubDataARB(target, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglGetBufferSubDataARB__IJJJ(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong size, jlong dataAddress) { - glGetBufferSubDataARBPROC glGetBufferSubDataARB = (glGetBufferSubDataARBPROC)tlsGetFunction(1406); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetBufferSubDataARB(target, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglMapBufferARB(JNIEnv *__env, jclass clazz, jint target, jint access) { - glMapBufferARBPROC glMapBufferARB = (glMapBufferARBPROC)tlsGetFunction(1407); - UNUSED_PARAM(clazz) - return (jlong)glMapBufferARB(target, access); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_glUnmapBufferARB(JNIEnv *__env, jclass clazz, jint target) { - glUnmapBufferARBPROC glUnmapBufferARB = (glUnmapBufferARBPROC)tlsGetFunction(1408); - UNUSED_PARAM(clazz) - return glUnmapBufferARB(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglGetBufferParameterivARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetBufferParameterivARBPROC glGetBufferParameterivARB = (glGetBufferParameterivARBPROC)tlsGetFunction(1409); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetBufferParameterivARB(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_nglGetBufferPointervARB(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetBufferPointervARBPROC glGetBufferPointervARB = (glGetBufferPointervARBPROC)tlsGetFunction(1410); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetBufferPointervARB(target, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexProgram.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexProgram.c deleted file mode 100644 index 805032e7..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexProgram.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glProgramStringARBPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glBindProgramARBPROC) (jint, jint); -typedef void (APIENTRY *glDeleteProgramsARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenProgramsARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glProgramEnvParameter4dARBPROC) (jint, jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glProgramEnvParameter4dvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramEnvParameter4fARBPROC) (jint, jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glProgramEnvParameter4fvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramLocalParameter4dARBPROC) (jint, jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glProgramLocalParameter4dvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramLocalParameter4fARBPROC) (jint, jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glProgramLocalParameter4fvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramEnvParameterfvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramEnvParameterdvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramLocalParameterfvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramLocalParameterdvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramStringARBPROC) (jint, jint, uintptr_t); -typedef jboolean (APIENTRY *glIsProgramARBPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglProgramStringARB(JNIEnv *__env, jclass clazz, jint target, jint format, jint len, jlong stringAddress) { - glProgramStringARBPROC glProgramStringARB = (glProgramStringARBPROC)tlsGetFunction(1450); - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - glProgramStringARB(target, format, len, string); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_glBindProgramARB(JNIEnv *__env, jclass clazz, jint target, jint program) { - glBindProgramARBPROC glBindProgramARB = (glBindProgramARBPROC)tlsGetFunction(1451); - UNUSED_PARAM(clazz) - glBindProgramARB(target, program); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglDeleteProgramsARB__IJ(JNIEnv *__env, jclass clazz, jint n, jlong programsAddress) { - glDeleteProgramsARBPROC glDeleteProgramsARB = (glDeleteProgramsARBPROC)tlsGetFunction(1452); - uintptr_t programs = (uintptr_t)programsAddress; - UNUSED_PARAM(clazz) - glDeleteProgramsARB(n, programs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGenProgramsARB__IJ(JNIEnv *__env, jclass clazz, jint n, jlong programsAddress) { - glGenProgramsARBPROC glGenProgramsARB = (glGenProgramsARBPROC)tlsGetFunction(1453); - uintptr_t programs = (uintptr_t)programsAddress; - UNUSED_PARAM(clazz) - glGenProgramsARB(n, programs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_glProgramEnvParameter4dARB(JNIEnv *__env, jclass clazz, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w) { - glProgramEnvParameter4dARBPROC glProgramEnvParameter4dARB = (glProgramEnvParameter4dARBPROC)tlsGetFunction(1454); - UNUSED_PARAM(clazz) - glProgramEnvParameter4dARB(target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglProgramEnvParameter4dvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glProgramEnvParameter4dvARBPROC glProgramEnvParameter4dvARB = (glProgramEnvParameter4dvARBPROC)tlsGetFunction(1455); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glProgramEnvParameter4dvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_glProgramEnvParameter4fARB(JNIEnv *__env, jclass clazz, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w) { - glProgramEnvParameter4fARBPROC glProgramEnvParameter4fARB = (glProgramEnvParameter4fARBPROC)tlsGetFunction(1456); - UNUSED_PARAM(clazz) - glProgramEnvParameter4fARB(target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglProgramEnvParameter4fvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glProgramEnvParameter4fvARBPROC glProgramEnvParameter4fvARB = (glProgramEnvParameter4fvARBPROC)tlsGetFunction(1457); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glProgramEnvParameter4fvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_glProgramLocalParameter4dARB(JNIEnv *__env, jclass clazz, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w) { - glProgramLocalParameter4dARBPROC glProgramLocalParameter4dARB = (glProgramLocalParameter4dARBPROC)tlsGetFunction(1458); - UNUSED_PARAM(clazz) - glProgramLocalParameter4dARB(target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglProgramLocalParameter4dvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glProgramLocalParameter4dvARBPROC glProgramLocalParameter4dvARB = (glProgramLocalParameter4dvARBPROC)tlsGetFunction(1459); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glProgramLocalParameter4dvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_glProgramLocalParameter4fARB(JNIEnv *__env, jclass clazz, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w) { - glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB = (glProgramLocalParameter4fARBPROC)tlsGetFunction(1460); - UNUSED_PARAM(clazz) - glProgramLocalParameter4fARB(target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglProgramLocalParameter4fvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glProgramLocalParameter4fvARBPROC glProgramLocalParameter4fvARB = (glProgramLocalParameter4fvARBPROC)tlsGetFunction(1461); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glProgramLocalParameter4fvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetProgramEnvParameterfvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glGetProgramEnvParameterfvARBPROC glGetProgramEnvParameterfvARB = (glGetProgramEnvParameterfvARBPROC)tlsGetFunction(1462); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramEnvParameterfvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetProgramEnvParameterdvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glGetProgramEnvParameterdvARBPROC glGetProgramEnvParameterdvARB = (glGetProgramEnvParameterdvARBPROC)tlsGetFunction(1463); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramEnvParameterdvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetProgramLocalParameterfvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB = (glGetProgramLocalParameterfvARBPROC)tlsGetFunction(1464); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramLocalParameterfvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetProgramLocalParameterdvARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glGetProgramLocalParameterdvARBPROC glGetProgramLocalParameterdvARB = (glGetProgramLocalParameterdvARBPROC)tlsGetFunction(1465); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramLocalParameterdvARB(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetProgramivARB__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetProgramivARBPROC glGetProgramivARB = (glGetProgramivARBPROC)tlsGetFunction(1466); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramivARB(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_nglGetProgramStringARB(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong stringAddress) { - glGetProgramStringARBPROC glGetProgramStringARB = (glGetProgramStringARBPROC)tlsGetFunction(1467); - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - glGetProgramStringARB(target, pname, string); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBVertexProgram_glIsProgramARB(JNIEnv *__env, jclass clazz, jint program) { - glIsProgramARBPROC glIsProgramARB = (glIsProgramARBPROC)tlsGetFunction(1472); - UNUSED_PARAM(clazz) - return glIsProgramARB(program); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexShader.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexShader.c deleted file mode 100644 index d6a8fe02..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBVertexShader.c +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexAttrib1fARBPROC) (jint, jfloat); -typedef void (APIENTRY *glVertexAttrib1sARBPROC) (jint, jshort); -typedef void (APIENTRY *glVertexAttrib1dARBPROC) (jint, jdouble); -typedef void (APIENTRY *glVertexAttrib2fARBPROC) (jint, jfloat, jfloat); -typedef void (APIENTRY *glVertexAttrib2sARBPROC) (jint, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib2dARBPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttrib3fARBPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glVertexAttrib3sARBPROC) (jint, jshort, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib3dARBPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttrib4fARBPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glVertexAttrib4sARBPROC) (jint, jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib4dARBPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttrib4NubARBPROC) (jint, uint8_t, uint8_t, uint8_t, uint8_t); -typedef void (APIENTRY *glVertexAttrib1fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib1svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib1dvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib2fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib2svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib2dvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib3fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib3svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib3dvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4fvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4svARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4dvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4ivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4bvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4ubvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4usvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4uivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NbvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NsvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NubvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NusvARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NuivARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribPointerARBPROC) (jint, jint, jint, jboolean, jint, uintptr_t); -typedef void (APIENTRY *glEnableVertexAttribArrayARBPROC) (jint); -typedef void (APIENTRY *glDisableVertexAttribArrayARBPROC) (jint); -typedef void (APIENTRY *glBindAttribLocationARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetActiveAttribARBPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetAttribLocationARBPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribivARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribfvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribdvARBPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribPointervARBPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib1fARB(JNIEnv *__env, jclass clazz, jint index, jfloat v0) { - glVertexAttrib1fARBPROC glVertexAttrib1fARB = (glVertexAttrib1fARBPROC)tlsGetFunction(1412); - UNUSED_PARAM(clazz) - glVertexAttrib1fARB(index, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib1sARB(JNIEnv *__env, jclass clazz, jint index, jshort v0) { - glVertexAttrib1sARBPROC glVertexAttrib1sARB = (glVertexAttrib1sARBPROC)tlsGetFunction(1411); - UNUSED_PARAM(clazz) - glVertexAttrib1sARB(index, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib1dARB(JNIEnv *__env, jclass clazz, jint index, jdouble v0) { - glVertexAttrib1dARBPROC glVertexAttrib1dARB = (glVertexAttrib1dARBPROC)tlsGetFunction(1413); - UNUSED_PARAM(clazz) - glVertexAttrib1dARB(index, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib2fARB(JNIEnv *__env, jclass clazz, jint index, jfloat v0, jfloat v1) { - glVertexAttrib2fARBPROC glVertexAttrib2fARB = (glVertexAttrib2fARBPROC)tlsGetFunction(1415); - UNUSED_PARAM(clazz) - glVertexAttrib2fARB(index, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib2sARB(JNIEnv *__env, jclass clazz, jint index, jshort v0, jshort v1) { - glVertexAttrib2sARBPROC glVertexAttrib2sARB = (glVertexAttrib2sARBPROC)tlsGetFunction(1414); - UNUSED_PARAM(clazz) - glVertexAttrib2sARB(index, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib2dARB(JNIEnv *__env, jclass clazz, jint index, jdouble v0, jdouble v1) { - glVertexAttrib2dARBPROC glVertexAttrib2dARB = (glVertexAttrib2dARBPROC)tlsGetFunction(1416); - UNUSED_PARAM(clazz) - glVertexAttrib2dARB(index, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib3fARB(JNIEnv *__env, jclass clazz, jint index, jfloat v0, jfloat v1, jfloat v2) { - glVertexAttrib3fARBPROC glVertexAttrib3fARB = (glVertexAttrib3fARBPROC)tlsGetFunction(1418); - UNUSED_PARAM(clazz) - glVertexAttrib3fARB(index, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib3sARB(JNIEnv *__env, jclass clazz, jint index, jshort v0, jshort v1, jshort v2) { - glVertexAttrib3sARBPROC glVertexAttrib3sARB = (glVertexAttrib3sARBPROC)tlsGetFunction(1417); - UNUSED_PARAM(clazz) - glVertexAttrib3sARB(index, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib3dARB(JNIEnv *__env, jclass clazz, jint index, jdouble v0, jdouble v1, jdouble v2) { - glVertexAttrib3dARBPROC glVertexAttrib3dARB = (glVertexAttrib3dARBPROC)tlsGetFunction(1419); - UNUSED_PARAM(clazz) - glVertexAttrib3dARB(index, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib4fARB(JNIEnv *__env, jclass clazz, jint index, jfloat v0, jfloat v1, jfloat v2, jfloat v3) { - glVertexAttrib4fARBPROC glVertexAttrib4fARB = (glVertexAttrib4fARBPROC)tlsGetFunction(1421); - UNUSED_PARAM(clazz) - glVertexAttrib4fARB(index, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib4sARB(JNIEnv *__env, jclass clazz, jint index, jshort v0, jshort v1, jshort v2, jshort v3) { - glVertexAttrib4sARBPROC glVertexAttrib4sARB = (glVertexAttrib4sARBPROC)tlsGetFunction(1420); - UNUSED_PARAM(clazz) - glVertexAttrib4sARB(index, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib4dARB(JNIEnv *__env, jclass clazz, jint index, jdouble v0, jdouble v1, jdouble v2, jdouble v3) { - glVertexAttrib4dARBPROC glVertexAttrib4dARB = (glVertexAttrib4dARBPROC)tlsGetFunction(1422); - UNUSED_PARAM(clazz) - glVertexAttrib4dARB(index, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glVertexAttrib4NubARB(JNIEnv *__env, jclass clazz, jint index, jbyte x, jbyte y, jbyte z, jbyte w) { - glVertexAttrib4NubARBPROC glVertexAttrib4NubARB = (glVertexAttrib4NubARBPROC)tlsGetFunction(1423); - UNUSED_PARAM(clazz) - glVertexAttrib4NubARB(index, (uint8_t)x, (uint8_t)y, (uint8_t)z, (uint8_t)w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib1fvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib1fvARBPROC glVertexAttrib1fvARB = (glVertexAttrib1fvARBPROC)tlsGetFunction(1425); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib1fvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib1svARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib1svARBPROC glVertexAttrib1svARB = (glVertexAttrib1svARBPROC)tlsGetFunction(1424); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib1svARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib1dvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib1dvARBPROC glVertexAttrib1dvARB = (glVertexAttrib1dvARBPROC)tlsGetFunction(1426); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib1dvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib2fvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib2fvARBPROC glVertexAttrib2fvARB = (glVertexAttrib2fvARBPROC)tlsGetFunction(1428); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib2fvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib2svARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib2svARBPROC glVertexAttrib2svARB = (glVertexAttrib2svARBPROC)tlsGetFunction(1427); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib2svARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib2dvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib2dvARBPROC glVertexAttrib2dvARB = (glVertexAttrib2dvARBPROC)tlsGetFunction(1429); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib2dvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib3fvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib3fvARBPROC glVertexAttrib3fvARB = (glVertexAttrib3fvARBPROC)tlsGetFunction(1431); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib3fvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib3svARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib3svARBPROC glVertexAttrib3svARB = (glVertexAttrib3svARBPROC)tlsGetFunction(1430); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib3svARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib3dvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib3dvARBPROC glVertexAttrib3dvARB = (glVertexAttrib3dvARBPROC)tlsGetFunction(1432); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib3dvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4fvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4fvARBPROC glVertexAttrib4fvARB = (glVertexAttrib4fvARBPROC)tlsGetFunction(1433); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4fvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4svARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4svARBPROC glVertexAttrib4svARB = (glVertexAttrib4svARBPROC)tlsGetFunction(1435); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4svARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4dvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4dvARBPROC glVertexAttrib4dvARB = (glVertexAttrib4dvARBPROC)tlsGetFunction(1440); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4dvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4ivARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4ivARBPROC glVertexAttrib4ivARB = (glVertexAttrib4ivARBPROC)tlsGetFunction(1436); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4ivARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4bvARB(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4bvARBPROC glVertexAttrib4bvARB = (glVertexAttrib4bvARBPROC)tlsGetFunction(1434); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4bvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4ubvARB(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4ubvARBPROC glVertexAttrib4ubvARB = (glVertexAttrib4ubvARBPROC)tlsGetFunction(1437); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4ubvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4usvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4usvARBPROC glVertexAttrib4usvARB = (glVertexAttrib4usvARBPROC)tlsGetFunction(1438); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4usvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4uivARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4uivARBPROC glVertexAttrib4uivARB = (glVertexAttrib4uivARBPROC)tlsGetFunction(1439); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4uivARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4NbvARB(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NbvARBPROC glVertexAttrib4NbvARB = (glVertexAttrib4NbvARBPROC)tlsGetFunction(1441); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4NbvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4NsvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NsvARBPROC glVertexAttrib4NsvARB = (glVertexAttrib4NsvARBPROC)tlsGetFunction(1442); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4NsvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4NivARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NivARBPROC glVertexAttrib4NivARB = (glVertexAttrib4NivARBPROC)tlsGetFunction(1443); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4NivARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4NubvARB(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NubvARBPROC glVertexAttrib4NubvARB = (glVertexAttrib4NubvARBPROC)tlsGetFunction(1444); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4NubvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4NusvARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NusvARBPROC glVertexAttrib4NusvARB = (glVertexAttrib4NusvARBPROC)tlsGetFunction(1445); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4NusvARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4NuivARB__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NuivARBPROC glVertexAttrib4NuivARB = (glVertexAttrib4NuivARBPROC)tlsGetFunction(1446); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4NuivARB(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttribPointerARB__IIIZIJ(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong pointerAddress) { - glVertexAttribPointerARBPROC glVertexAttribPointerARB = (glVertexAttribPointerARBPROC)tlsGetFunction(1447); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glEnableVertexAttribArrayARB(JNIEnv *__env, jclass clazz, jint index) { - glEnableVertexAttribArrayARBPROC glEnableVertexAttribArrayARB = (glEnableVertexAttribArrayARBPROC)tlsGetFunction(1448); - UNUSED_PARAM(clazz) - glEnableVertexAttribArrayARB(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_glDisableVertexAttribArrayARB(JNIEnv *__env, jclass clazz, jint index) { - glDisableVertexAttribArrayARBPROC glDisableVertexAttribArrayARB = (glDisableVertexAttribArrayARBPROC)tlsGetFunction(1449); - UNUSED_PARAM(clazz) - glDisableVertexAttribArrayARB(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglBindAttribLocationARB(JNIEnv *__env, jclass clazz, jint programObj, jint index, jlong nameAddress) { - glBindAttribLocationARBPROC glBindAttribLocationARB = (glBindAttribLocationARBPROC)tlsGetFunction(1473); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glBindAttribLocationARB(programObj, index, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetActiveAttribARB__IIIJJJJ(JNIEnv *__env, jclass clazz, jint programObj, jint index, jint maxLength, jlong lengthAddress, jlong sizeAddress, jlong typeAddress, jlong nameAddress) { - glGetActiveAttribARBPROC glGetActiveAttribARB = (glGetActiveAttribARBPROC)tlsGetFunction(1474); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t size = (uintptr_t)sizeAddress; - uintptr_t type = (uintptr_t)typeAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetActiveAttribARB(programObj, index, maxLength, length, size, type, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetAttribLocationARB(JNIEnv *__env, jclass clazz, jint programObj, jlong nameAddress) { - glGetAttribLocationARBPROC glGetAttribLocationARB = (glGetAttribLocationARBPROC)tlsGetFunction(1475); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetAttribLocationARB(programObj, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribivARB__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribivARBPROC glGetVertexAttribivARB = (glGetVertexAttribivARBPROC)tlsGetFunction(1470); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribivARB(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribfvARB__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribfvARBPROC glGetVertexAttribfvARB = (glGetVertexAttribfvARBPROC)tlsGetFunction(1468); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribfvARB(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribdvARB__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribdvARBPROC glGetVertexAttribdvARB = (glGetVertexAttribdvARBPROC)tlsGetFunction(1469); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribdvARB(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribPointervARB(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong pointerAddress) { - glGetVertexAttribPointervARBPROC glGetVertexAttribPointervARB = (glGetVertexAttribPointervARBPROC)tlsGetFunction(1471); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribPointervARB(index, pname, pointer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBWindowPos.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBWindowPos.c deleted file mode 100644 index 12f17607..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_ARBWindowPos.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glWindowPos2iARBPROC) (jint, jint); -typedef void (APIENTRY *glWindowPos2sARBPROC) (jshort, jshort); -typedef void (APIENTRY *glWindowPos2fARBPROC) (jfloat, jfloat); -typedef void (APIENTRY *glWindowPos2dARBPROC) (jdouble, jdouble); -typedef void (APIENTRY *glWindowPos2ivARBPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos2svARBPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos2fvARBPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos2dvARBPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3iARBPROC) (jint, jint, jint); -typedef void (APIENTRY *glWindowPos3sARBPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glWindowPos3fARBPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glWindowPos3dARBPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glWindowPos3ivARBPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3svARBPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3fvARBPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3dvARBPROC) (uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos2iARB(JNIEnv *__env, jclass clazz, jint x, jint y) { - glWindowPos2iARBPROC glWindowPos2iARB = (glWindowPos2iARBPROC)tlsGetFunction(1476); - UNUSED_PARAM(clazz) - glWindowPos2iARB(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos2sARB(JNIEnv *__env, jclass clazz, jshort x, jshort y) { - glWindowPos2sARBPROC glWindowPos2sARB = (glWindowPos2sARBPROC)tlsGetFunction(1477); - UNUSED_PARAM(clazz) - glWindowPos2sARB(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos2fARB(JNIEnv *__env, jclass clazz, jfloat x, jfloat y) { - glWindowPos2fARBPROC glWindowPos2fARB = (glWindowPos2fARBPROC)tlsGetFunction(1478); - UNUSED_PARAM(clazz) - glWindowPos2fARB(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos2dARB(JNIEnv *__env, jclass clazz, jdouble x, jdouble y) { - glWindowPos2dARBPROC glWindowPos2dARB = (glWindowPos2dARBPROC)tlsGetFunction(1479); - UNUSED_PARAM(clazz) - glWindowPos2dARB(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2ivARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2ivARBPROC glWindowPos2ivARB = (glWindowPos2ivARBPROC)tlsGetFunction(1480); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2ivARB(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2svARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2svARBPROC glWindowPos2svARB = (glWindowPos2svARBPROC)tlsGetFunction(1481); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2svARB(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2fvARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2fvARBPROC glWindowPos2fvARB = (glWindowPos2fvARBPROC)tlsGetFunction(1482); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2fvARB(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2dvARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2dvARBPROC glWindowPos2dvARB = (glWindowPos2dvARBPROC)tlsGetFunction(1483); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2dvARB(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos3iARB(JNIEnv *__env, jclass clazz, jint x, jint y, jint z) { - glWindowPos3iARBPROC glWindowPos3iARB = (glWindowPos3iARBPROC)tlsGetFunction(1484); - UNUSED_PARAM(clazz) - glWindowPos3iARB(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos3sARB(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z) { - glWindowPos3sARBPROC glWindowPos3sARB = (glWindowPos3sARBPROC)tlsGetFunction(1485); - UNUSED_PARAM(clazz) - glWindowPos3sARB(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos3fARB(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z) { - glWindowPos3fARBPROC glWindowPos3fARB = (glWindowPos3fARBPROC)tlsGetFunction(1486); - UNUSED_PARAM(clazz) - glWindowPos3fARB(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_glWindowPos3dARB(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z) { - glWindowPos3dARBPROC glWindowPos3dARB = (glWindowPos3dARBPROC)tlsGetFunction(1487); - UNUSED_PARAM(clazz) - glWindowPos3dARB(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3ivARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3ivARBPROC glWindowPos3ivARB = (glWindowPos3ivARBPROC)tlsGetFunction(1488); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3ivARB(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3svARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3svARBPROC glWindowPos3svARB = (glWindowPos3svARBPROC)tlsGetFunction(1489); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3svARB(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3fvARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3fvARBPROC glWindowPos3fvARB = (glWindowPos3fvARBPROC)tlsGetFunction(1490); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3fvARB(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3dvARB__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3dvARBPROC glWindowPos3dvARB = (glWindowPos3dvARBPROC)tlsGetFunction(1491); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3dvARB(p); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBindableUniform.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBindableUniform.c deleted file mode 100644 index 1d2518d0..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBindableUniform.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glUniformBufferEXTPROC) (jint, jint, jint); -typedef jint (APIENTRY *glGetUniformBufferSizeEXTPROC) (jint, jint); -typedef uintptr_t (APIENTRY *glGetUniformOffsetEXTPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBindableUniform_glUniformBufferEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint buffer) { - glUniformBufferEXTPROC glUniformBufferEXT = (glUniformBufferEXTPROC)tlsGetFunction(1492); - UNUSED_PARAM(clazz) - glUniformBufferEXT(program, location, buffer); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTBindableUniform_glGetUniformBufferSizeEXT(JNIEnv *__env, jclass clazz, jint program, jint location) { - glGetUniformBufferSizeEXTPROC glGetUniformBufferSizeEXT = (glGetUniformBufferSizeEXTPROC)tlsGetFunction(1493); - UNUSED_PARAM(clazz) - return glGetUniformBufferSizeEXT(program, location); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_EXTBindableUniform_glGetUniformOffsetEXT(JNIEnv *__env, jclass clazz, jint program, jint location) { - glGetUniformOffsetEXTPROC glGetUniformOffsetEXT = (glGetUniformOffsetEXTPROC)tlsGetFunction(1494); - UNUSED_PARAM(clazz) - return (jlong)glGetUniformOffsetEXT(program, location); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendColor.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendColor.c deleted file mode 100644 index 46f0b051..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendColor.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendColorEXTPROC) (jfloat, jfloat, jfloat, jfloat); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendColor_glBlendColorEXT(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha) { - glBlendColorEXTPROC glBlendColorEXT = (glBlendColorEXTPROC)tlsGetFunction(1495); - UNUSED_PARAM(clazz) - glBlendColorEXT(red, green, blue, alpha); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendEquationSeparate.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendEquationSeparate.c deleted file mode 100644 index ab1ed174..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendEquationSeparate.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendEquationSeparateEXTPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendEquationSeparate_glBlendEquationSeparateEXT(JNIEnv *__env, jclass clazz, jint modeRGB, jint modeAlpha) { - glBlendEquationSeparateEXTPROC glBlendEquationSeparateEXT = (glBlendEquationSeparateEXTPROC)tlsGetFunction(1496); - UNUSED_PARAM(clazz) - glBlendEquationSeparateEXT(modeRGB, modeAlpha); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendFuncSeparate.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendFuncSeparate.c deleted file mode 100644 index 45e845bb..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendFuncSeparate.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendFuncSeparateEXTPROC) (jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendFuncSeparate_glBlendFuncSeparateEXT(JNIEnv *__env, jclass clazz, jint sfactorRGB, jint dfactorRGB, jint sfactorAlpha, jint dfactorAlpha) { - glBlendFuncSeparateEXTPROC glBlendFuncSeparateEXT = (glBlendFuncSeparateEXTPROC)tlsGetFunction(1497); - UNUSED_PARAM(clazz) - glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendMinmax.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendMinmax.c deleted file mode 100644 index dd2b5703..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTBlendMinmax.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendEquationEXTPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendMinmax_glBlendEquationEXT(JNIEnv *__env, jclass clazz, jint mode) { - glBlendEquationEXTPROC glBlendEquationEXT = (glBlendEquationEXTPROC)tlsGetFunction(1498); - UNUSED_PARAM(clazz) - glBlendEquationEXT(mode); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTCompiledVertexArray.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTCompiledVertexArray.c deleted file mode 100644 index 2693e6f8..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTCompiledVertexArray.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glLockArraysEXTPROC) (jint, jint); -typedef void (APIENTRY *glUnlockArraysEXTPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTCompiledVertexArray_glLockArraysEXT(JNIEnv *__env, jclass clazz, jint first, jint count) { - glLockArraysEXTPROC glLockArraysEXT = (glLockArraysEXTPROC)tlsGetFunction(1499); - UNUSED_PARAM(clazz) - glLockArraysEXT(first, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTCompiledVertexArray_glUnlockArraysEXT(JNIEnv *__env, jclass clazz) { - glUnlockArraysEXTPROC glUnlockArraysEXT = (glUnlockArraysEXTPROC)tlsGetFunction(1500); - UNUSED_PARAM(clazz) - glUnlockArraysEXT(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDebugLabel.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDebugLabel.c deleted file mode 100644 index ed0f20e5..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDebugLabel.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glLabelObjectEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetObjectLabelEXTPROC) (jint, jint, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDebugLabel_nglLabelObjectEXT(JNIEnv *__env, jclass clazz, jint type, jint object, jint length, jlong labelAddress) { - glLabelObjectEXTPROC glLabelObjectEXT = (glLabelObjectEXTPROC)tlsGetFunction(1501); - uintptr_t label = (uintptr_t)labelAddress; - UNUSED_PARAM(clazz) - glLabelObjectEXT(type, object, length, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDebugLabel_nglGetObjectLabelEXT__IIIJJ(JNIEnv *__env, jclass clazz, jint type, jint object, jint bufSize, jlong lengthAddress, jlong labelAddress) { - glGetObjectLabelEXTPROC glGetObjectLabelEXT = (glGetObjectLabelEXTPROC)tlsGetFunction(1502); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t label = (uintptr_t)labelAddress; - UNUSED_PARAM(clazz) - glGetObjectLabelEXT(type, object, bufSize, length, label); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDebugMarker.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDebugMarker.c deleted file mode 100644 index f0012e3d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDebugMarker.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glInsertEventMarkerEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glPushGroupMarkerEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glPopGroupMarkerEXTPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDebugMarker_nglInsertEventMarkerEXT(JNIEnv *__env, jclass clazz, jint length, jlong markerAddress) { - glInsertEventMarkerEXTPROC glInsertEventMarkerEXT = (glInsertEventMarkerEXTPROC)tlsGetFunction(1503); - uintptr_t marker = (uintptr_t)markerAddress; - UNUSED_PARAM(clazz) - glInsertEventMarkerEXT(length, marker); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDebugMarker_nglPushGroupMarkerEXT(JNIEnv *__env, jclass clazz, jint length, jlong markerAddress) { - glPushGroupMarkerEXTPROC glPushGroupMarkerEXT = (glPushGroupMarkerEXTPROC)tlsGetFunction(1504); - uintptr_t marker = (uintptr_t)markerAddress; - UNUSED_PARAM(clazz) - glPushGroupMarkerEXT(length, marker); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDebugMarker_glPopGroupMarkerEXT(JNIEnv *__env, jclass clazz) { - glPopGroupMarkerEXTPROC glPopGroupMarkerEXT = (glPopGroupMarkerEXTPROC)tlsGetFunction(1505); - UNUSED_PARAM(clazz) - glPopGroupMarkerEXT(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDepthBoundsTest.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDepthBoundsTest.c deleted file mode 100644 index 19ab445e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDepthBoundsTest.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDepthBoundsEXTPROC) (jdouble, jdouble); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDepthBoundsTest_glDepthBoundsEXT(JNIEnv *__env, jclass clazz, jdouble zmin, jdouble zmax) { - glDepthBoundsEXTPROC glDepthBoundsEXT = (glDepthBoundsEXTPROC)tlsGetFunction(1506); - UNUSED_PARAM(clazz) - glDepthBoundsEXT(zmin, zmax); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c deleted file mode 100644 index 214fc37b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c +++ /dev/null @@ -1,1616 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glClientAttribDefaultEXTPROC) (jint); -typedef void (APIENTRY *glPushClientAttribDefaultEXTPROC) (jint); -typedef void (APIENTRY *glMatrixLoadfEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixLoaddEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixMultfEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixMultdEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixLoadIdentityEXTPROC) (jint); -typedef void (APIENTRY *glMatrixRotatefEXTPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glMatrixRotatedEXTPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMatrixScalefEXTPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glMatrixScaledEXTPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMatrixTranslatefEXTPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glMatrixTranslatedEXTPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMatrixOrthoEXTPROC) (jint, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMatrixFrustumEXTPROC) (jint, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMatrixPushEXTPROC) (jint); -typedef void (APIENTRY *glMatrixPopEXTPROC) (jint); -typedef void (APIENTRY *glTextureParameteriEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glTextureParameterivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureParameterfEXTPROC) (jint, jint, jint, jfloat); -typedef void (APIENTRY *glTextureParameterfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureSubImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureSubImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyTextureImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTextureImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTextureSubImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTextureSubImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glGetTextureImageEXTPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureLevelParameterfvEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureLevelParameterivEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureSubImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyTextureSubImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glBindMultiTextureEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoordPointerEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexEnvfEXTPROC) (jint, jint, jint, jfloat); -typedef void (APIENTRY *glMultiTexEnvfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexEnviEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexEnvivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexGendEXTPROC) (jint, jint, jint, jdouble); -typedef void (APIENTRY *glMultiTexGendvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexGenfEXTPROC) (jint, jint, jint, jfloat); -typedef void (APIENTRY *glMultiTexGenfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexGeniEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexGenivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexEnvfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexEnvivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexGendvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexGenfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexGenivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexParameteriEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexParameterivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexParameterfEXTPROC) (jint, jint, jint, jfloat); -typedef void (APIENTRY *glMultiTexParameterfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexSubImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexSubImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyMultiTexImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyMultiTexImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyMultiTexSubImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyMultiTexSubImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glGetMultiTexImageEXTPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexParameterfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexParameterivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexLevelParameterfvEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexLevelParameterivEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexSubImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyMultiTexSubImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glEnableClientStateIndexedEXTPROC) (jint, jint); -typedef void (APIENTRY *glDisableClientStateIndexedEXTPROC) (jint, jint); -typedef void (APIENTRY *glEnableClientStateiEXTPROC) (jint, jint); -typedef void (APIENTRY *glDisableClientStateiEXTPROC) (jint, jint); -typedef void (APIENTRY *glGetFloatIndexedvEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetDoubleIndexedvEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPointerIndexedvEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetFloati_vEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetDoublei_vEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPointeri_vEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramStringEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramLocalParameter4dEXTPROC) (jint, jint, jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glNamedProgramLocalParameter4dvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramLocalParameter4fEXTPROC) (jint, jint, jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glNamedProgramLocalParameter4fvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedProgramLocalParameterdvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedProgramLocalParameterfvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedProgramivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedProgramStringEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureSubImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureSubImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureSubImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetCompressedTextureImageEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedMultiTexImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedMultiTexImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedMultiTexImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedMultiTexSubImage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedMultiTexSubImage2DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedMultiTexSubImage1DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetCompressedMultiTexImageEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMatrixLoadTransposefEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixLoadTransposedEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixMultTransposefEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixMultTransposedEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glNamedBufferDataEXTPROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glNamedBufferSubDataEXTPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef uintptr_t (APIENTRY *glMapNamedBufferEXTPROC) (jint, jint); -typedef jboolean (APIENTRY *glUnmapNamedBufferEXTPROC) (jint); -typedef void (APIENTRY *glGetNamedBufferParameterivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedBufferSubDataEXTPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glProgramUniform1fEXTPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glProgramUniform2fEXTPROC) (jint, jint, jfloat, jfloat); -typedef void (APIENTRY *glProgramUniform3fEXTPROC) (jint, jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glProgramUniform4fEXTPROC) (jint, jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glProgramUniform1iEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glProgramUniform2iEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform3iEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform4iEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform1fvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2fvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3fvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4fvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1ivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2ivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3ivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4ivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x3fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x2fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x4fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x2fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x4fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x3fvEXTPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glTextureBufferEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexBufferEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glTextureParameterIivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureParameterIuivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterIivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterIuivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexParameterIivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexParameterIuivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexParameterIivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMultiTexParameterIuivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1uiEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glProgramUniform2uiEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform3uiEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform4uiEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform1uivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2uivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3uivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4uivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramLocalParameters4fvEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramLocalParameterI4iEXTPROC) (jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedProgramLocalParameterI4ivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramLocalParametersI4ivEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramLocalParameterI4uiEXTPROC) (jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedProgramLocalParameterI4uivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedProgramLocalParametersI4uivEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedProgramLocalParameterIivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedProgramLocalParameterIuivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedRenderbufferStorageEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glGetNamedRenderbufferParameterivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedRenderbufferStorageMultisampleEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedRenderbufferStorageMultisampleCoverageEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef jint (APIENTRY *glCheckNamedFramebufferStatusEXTPROC) (jint, jint); -typedef void (APIENTRY *glNamedFramebufferTexture1DEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferTexture2DEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferTexture3DEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferRenderbufferEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glGetNamedFramebufferAttachmentParameterivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGenerateTextureMipmapEXTPROC) (jint, jint); -typedef void (APIENTRY *glGenerateMultiTexMipmapEXTPROC) (jint, jint); -typedef void (APIENTRY *glFramebufferDrawBufferEXTPROC) (jint, jint); -typedef void (APIENTRY *glFramebufferDrawBuffersEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glFramebufferReadBufferEXTPROC) (jint, jint); -typedef void (APIENTRY *glGetFramebufferParameterivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedCopyBufferSubDataEXTPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glNamedFramebufferTextureEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferTextureLayerEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferTextureFaceEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureRenderbufferEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexRenderbufferEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertexArrayVertexOffsetEXTPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayColorOffsetEXTPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayEdgeFlagOffsetEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayIndexOffsetEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayNormalOffsetEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayTexCoordOffsetEXTPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayMultiTexCoordOffsetEXTPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayFogCoordOffsetEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArraySecondaryColorOffsetEXTPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayVertexAttribOffsetEXTPROC) (jint, jint, jint, jint, jint, jboolean, jint, uintptr_t); -typedef void (APIENTRY *glVertexArrayVertexAttribIOffsetEXTPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glEnableVertexArrayEXTPROC) (jint, jint); -typedef void (APIENTRY *glDisableVertexArrayEXTPROC) (jint, jint); -typedef void (APIENTRY *glEnableVertexArrayAttribEXTPROC) (jint, jint); -typedef void (APIENTRY *glDisableVertexArrayAttribEXTPROC) (jint, jint); -typedef void (APIENTRY *glGetVertexArrayIntegervEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexArrayPointervEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexArrayIntegeri_vEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexArrayPointeri_vEXTPROC) (jint, jint, jint, uintptr_t); -typedef uintptr_t (APIENTRY *glMapNamedBufferRangeEXTPROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glFlushMappedNamedBufferRangeEXTPROC) (jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glClientAttribDefaultEXT(JNIEnv *__env, jclass clazz, jint mask) { - glClientAttribDefaultEXTPROC glClientAttribDefaultEXT = (glClientAttribDefaultEXTPROC)tlsGetFunction(1507); - UNUSED_PARAM(clazz) - glClientAttribDefaultEXT(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glPushClientAttribDefaultEXT(JNIEnv *__env, jclass clazz, jint mask) { - glPushClientAttribDefaultEXTPROC glPushClientAttribDefaultEXT = (glPushClientAttribDefaultEXTPROC)tlsGetFunction(1508); - UNUSED_PARAM(clazz) - glPushClientAttribDefaultEXT(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadfEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixLoadfEXTPROC glMatrixLoadfEXT = (glMatrixLoadfEXTPROC)tlsGetFunction(1509); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixLoadfEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoaddEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixLoaddEXTPROC glMatrixLoaddEXT = (glMatrixLoaddEXTPROC)tlsGetFunction(1510); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixLoaddEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultfEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixMultfEXTPROC glMatrixMultfEXT = (glMatrixMultfEXTPROC)tlsGetFunction(1511); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixMultfEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultdEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixMultdEXTPROC glMatrixMultdEXT = (glMatrixMultdEXTPROC)tlsGetFunction(1512); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixMultdEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixLoadIdentityEXT(JNIEnv *__env, jclass clazz, jint matrixMode) { - glMatrixLoadIdentityEXTPROC glMatrixLoadIdentityEXT = (glMatrixLoadIdentityEXTPROC)tlsGetFunction(1513); - UNUSED_PARAM(clazz) - glMatrixLoadIdentityEXT(matrixMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixRotatefEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jfloat angle, jfloat x, jfloat y, jfloat z) { - glMatrixRotatefEXTPROC glMatrixRotatefEXT = (glMatrixRotatefEXTPROC)tlsGetFunction(1514); - UNUSED_PARAM(clazz) - glMatrixRotatefEXT(matrixMode, angle, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixRotatedEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jdouble angle, jdouble x, jdouble y, jdouble z) { - glMatrixRotatedEXTPROC glMatrixRotatedEXT = (glMatrixRotatedEXTPROC)tlsGetFunction(1515); - UNUSED_PARAM(clazz) - glMatrixRotatedEXT(matrixMode, angle, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixScalefEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jfloat x, jfloat y, jfloat z) { - glMatrixScalefEXTPROC glMatrixScalefEXT = (glMatrixScalefEXTPROC)tlsGetFunction(1516); - UNUSED_PARAM(clazz) - glMatrixScalefEXT(matrixMode, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixScaledEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jdouble x, jdouble y, jdouble z) { - glMatrixScaledEXTPROC glMatrixScaledEXT = (glMatrixScaledEXTPROC)tlsGetFunction(1517); - UNUSED_PARAM(clazz) - glMatrixScaledEXT(matrixMode, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixTranslatefEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jfloat x, jfloat y, jfloat z) { - glMatrixTranslatefEXTPROC glMatrixTranslatefEXT = (glMatrixTranslatefEXTPROC)tlsGetFunction(1518); - UNUSED_PARAM(clazz) - glMatrixTranslatefEXT(matrixMode, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixTranslatedEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jdouble x, jdouble y, jdouble z) { - glMatrixTranslatedEXTPROC glMatrixTranslatedEXT = (glMatrixTranslatedEXTPROC)tlsGetFunction(1519); - UNUSED_PARAM(clazz) - glMatrixTranslatedEXT(matrixMode, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixOrthoEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f) { - glMatrixOrthoEXTPROC glMatrixOrthoEXT = (glMatrixOrthoEXTPROC)tlsGetFunction(1520); - UNUSED_PARAM(clazz) - glMatrixOrthoEXT(matrixMode, l, r, b, t, n, f); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixFrustumEXT(JNIEnv *__env, jclass clazz, jint matrixMode, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f) { - glMatrixFrustumEXTPROC glMatrixFrustumEXT = (glMatrixFrustumEXTPROC)tlsGetFunction(1521); - UNUSED_PARAM(clazz) - glMatrixFrustumEXT(matrixMode, l, r, b, t, n, f); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixPushEXT(JNIEnv *__env, jclass clazz, jint matrixMode) { - glMatrixPushEXTPROC glMatrixPushEXT = (glMatrixPushEXTPROC)tlsGetFunction(1522); - UNUSED_PARAM(clazz) - glMatrixPushEXT(matrixMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMatrixPopEXT(JNIEnv *__env, jclass clazz, jint matrixMode) { - glMatrixPopEXTPROC glMatrixPopEXT = (glMatrixPopEXTPROC)tlsGetFunction(1523); - UNUSED_PARAM(clazz) - glMatrixPopEXT(matrixMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glTextureParameteriEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jint param) { - glTextureParameteriEXTPROC glTextureParameteriEXT = (glTextureParameteriEXTPROC)tlsGetFunction(1524); - UNUSED_PARAM(clazz) - glTextureParameteriEXT(texture, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramAddress) { - glTextureParameterivEXTPROC glTextureParameterivEXT = (glTextureParameterivEXTPROC)tlsGetFunction(1525); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glTextureParameterivEXT(texture, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glTextureParameterfEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jfloat param) { - glTextureParameterfEXTPROC glTextureParameterfEXT = (glTextureParameterfEXTPROC)tlsGetFunction(1526); - UNUSED_PARAM(clazz) - glTextureParameterfEXT(texture, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramAddress) { - glTextureParameterfvEXTPROC glTextureParameterfvEXT = (glTextureParameterfvEXTPROC)tlsGetFunction(1527); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glTextureParameterfvEXT(texture, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage1DEXT__IIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixelsAddress) { - glTextureImage1DEXTPROC glTextureImage1DEXT = (glTextureImage1DEXTPROC)tlsGetFunction(1528); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage2DEXT__IIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixelsAddress) { - glTextureImage2DEXTPROC glTextureImage2DEXT = (glTextureImage2DEXTPROC)tlsGetFunction(1529); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage1DEXT__IIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixelsAddress) { - glTextureSubImage1DEXTPROC glTextureSubImage1DEXT = (glTextureSubImage1DEXTPROC)tlsGetFunction(1530); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage2DEXT__IIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixelsAddress) { - glTextureSubImage2DEXTPROC glTextureSubImage2DEXT = (glTextureSubImage2DEXTPROC)tlsGetFunction(1531); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyTextureImage1DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint border) { - glCopyTextureImage1DEXTPROC glCopyTextureImage1DEXT = (glCopyTextureImage1DEXTPROC)tlsGetFunction(1532); - UNUSED_PARAM(clazz) - glCopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyTextureImage2DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) { - glCopyTextureImage2DEXTPROC glCopyTextureImage2DEXT = (glCopyTextureImage2DEXTPROC)tlsGetFunction(1533); - UNUSED_PARAM(clazz) - glCopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyTextureSubImage1DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint x, jint y, jint width) { - glCopyTextureSubImage1DEXTPROC glCopyTextureSubImage1DEXT = (glCopyTextureSubImage1DEXTPROC)tlsGetFunction(1534); - UNUSED_PARAM(clazz) - glCopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyTextureSubImage2DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) { - glCopyTextureSubImage2DEXTPROC glCopyTextureSubImage2DEXT = (glCopyTextureSubImage2DEXTPROC)tlsGetFunction(1535); - UNUSED_PARAM(clazz) - glCopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureImageEXT__IIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint format, jint type, jlong pixelsAddress) { - glGetTextureImageEXTPROC glGetTextureImageEXT = (glGetTextureImageEXTPROC)tlsGetFunction(1536); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetTextureImageEXT(texture, target, level, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramsAddress) { - glGetTextureParameterfvEXTPROC glGetTextureParameterfvEXT = (glGetTextureParameterfvEXTPROC)tlsGetFunction(1537); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameterfvEXT(texture, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramsAddress) { - glGetTextureParameterivEXTPROC glGetTextureParameterivEXT = (glGetTextureParameterivEXTPROC)tlsGetFunction(1538); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameterivEXT(texture, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureLevelParameterfvEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint pname, jlong paramsAddress) { - glGetTextureLevelParameterfvEXTPROC glGetTextureLevelParameterfvEXT = (glGetTextureLevelParameterfvEXTPROC)tlsGetFunction(1539); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureLevelParameterfvEXT(texture, target, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureLevelParameterivEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint pname, jlong paramsAddress) { - glGetTextureLevelParameterivEXTPROC glGetTextureLevelParameterivEXT = (glGetTextureLevelParameterivEXTPROC)tlsGetFunction(1540); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureLevelParameterivEXT(texture, target, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage3DEXT__IIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixelsAddress) { - glTextureImage3DEXTPROC glTextureImage3DEXT = (glTextureImage3DEXTPROC)tlsGetFunction(1541); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage3DEXT__IIIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixelsAddress) { - glTextureSubImage3DEXTPROC glTextureSubImage3DEXT = (glTextureSubImage3DEXTPROC)tlsGetFunction(1542); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyTextureSubImage3DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { - glCopyTextureSubImage3DEXTPROC glCopyTextureSubImage3DEXT = (glCopyTextureSubImage3DEXTPROC)tlsGetFunction(1543); - UNUSED_PARAM(clazz) - glCopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glBindMultiTextureEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint texture) { - glBindMultiTextureEXTPROC glBindMultiTextureEXT = (glBindMultiTextureEXTPROC)tlsGetFunction(1544); - UNUSED_PARAM(clazz) - glBindMultiTextureEXT(texunit, target, texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexCoordPointerEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint size, jint type, jint stride, jlong pointerAddress) { - glMultiTexCoordPointerEXTPROC glMultiTexCoordPointerEXT = (glMultiTexCoordPointerEXTPROC)tlsGetFunction(1545); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glMultiTexCoordPointerEXT(texunit, size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexEnvfEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jfloat param) { - glMultiTexEnvfEXTPROC glMultiTexEnvfEXT = (glMultiTexEnvfEXTPROC)tlsGetFunction(1546); - UNUSED_PARAM(clazz) - glMultiTexEnvfEXT(texunit, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glMultiTexEnvfvEXTPROC glMultiTexEnvfvEXT = (glMultiTexEnvfvEXTPROC)tlsGetFunction(1547); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMultiTexEnvfvEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexEnviEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jint param) { - glMultiTexEnviEXTPROC glMultiTexEnviEXT = (glMultiTexEnviEXTPROC)tlsGetFunction(1548); - UNUSED_PARAM(clazz) - glMultiTexEnviEXT(texunit, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glMultiTexEnvivEXTPROC glMultiTexEnvivEXT = (glMultiTexEnvivEXTPROC)tlsGetFunction(1549); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMultiTexEnvivEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexGendEXT(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jdouble param) { - glMultiTexGendEXTPROC glMultiTexGendEXT = (glMultiTexGendEXTPROC)tlsGetFunction(1550); - UNUSED_PARAM(clazz) - glMultiTexGendEXT(texunit, coord, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGendvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jlong paramsAddress) { - glMultiTexGendvEXTPROC glMultiTexGendvEXT = (glMultiTexGendvEXTPROC)tlsGetFunction(1551); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMultiTexGendvEXT(texunit, coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexGenfEXT(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jfloat param) { - glMultiTexGenfEXTPROC glMultiTexGenfEXT = (glMultiTexGenfEXTPROC)tlsGetFunction(1552); - UNUSED_PARAM(clazz) - glMultiTexGenfEXT(texunit, coord, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jlong paramsAddress) { - glMultiTexGenfvEXTPROC glMultiTexGenfvEXT = (glMultiTexGenfvEXTPROC)tlsGetFunction(1553); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMultiTexGenfvEXT(texunit, coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexGeniEXT(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jint param) { - glMultiTexGeniEXTPROC glMultiTexGeniEXT = (glMultiTexGeniEXTPROC)tlsGetFunction(1554); - UNUSED_PARAM(clazz) - glMultiTexGeniEXT(texunit, coord, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jlong paramsAddress) { - glMultiTexGenivEXTPROC glMultiTexGenivEXT = (glMultiTexGenivEXTPROC)tlsGetFunction(1555); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMultiTexGenivEXT(texunit, coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexEnvfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glGetMultiTexEnvfvEXTPROC glGetMultiTexEnvfvEXT = (glGetMultiTexEnvfvEXTPROC)tlsGetFunction(1556); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexEnvfvEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexEnvivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glGetMultiTexEnvivEXTPROC glGetMultiTexEnvivEXT = (glGetMultiTexEnvivEXTPROC)tlsGetFunction(1557); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexEnvivEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGendvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jlong paramsAddress) { - glGetMultiTexGendvEXTPROC glGetMultiTexGendvEXT = (glGetMultiTexGendvEXTPROC)tlsGetFunction(1558); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexGendvEXT(texunit, coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGenfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jlong paramsAddress) { - glGetMultiTexGenfvEXTPROC glGetMultiTexGenfvEXT = (glGetMultiTexGenfvEXTPROC)tlsGetFunction(1559); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexGenfvEXT(texunit, coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGenivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint coord, jint pname, jlong paramsAddress) { - glGetMultiTexGenivEXTPROC glGetMultiTexGenivEXT = (glGetMultiTexGenivEXTPROC)tlsGetFunction(1560); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexGenivEXT(texunit, coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexParameteriEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jint param) { - glMultiTexParameteriEXTPROC glMultiTexParameteriEXT = (glMultiTexParameteriEXTPROC)tlsGetFunction(1561); - UNUSED_PARAM(clazz) - glMultiTexParameteriEXT(texunit, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramAddress) { - glMultiTexParameterivEXTPROC glMultiTexParameterivEXT = (glMultiTexParameterivEXTPROC)tlsGetFunction(1562); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glMultiTexParameterivEXT(texunit, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexParameterfEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jfloat param) { - glMultiTexParameterfEXTPROC glMultiTexParameterfEXT = (glMultiTexParameterfEXTPROC)tlsGetFunction(1563); - UNUSED_PARAM(clazz) - glMultiTexParameterfEXT(texunit, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramAddress) { - glMultiTexParameterfvEXTPROC glMultiTexParameterfvEXT = (glMultiTexParameterfvEXTPROC)tlsGetFunction(1564); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glMultiTexParameterfvEXT(texunit, target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage1DEXT__IIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixelsAddress) { - glMultiTexImage1DEXTPROC glMultiTexImage1DEXT = (glMultiTexImage1DEXTPROC)tlsGetFunction(1565); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage2DEXT__IIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixelsAddress) { - glMultiTexImage2DEXTPROC glMultiTexImage2DEXT = (glMultiTexImage2DEXTPROC)tlsGetFunction(1566); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage1DEXT__IIIIIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixelsAddress) { - glMultiTexSubImage1DEXTPROC glMultiTexSubImage1DEXT = (glMultiTexSubImage1DEXTPROC)tlsGetFunction(1567); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage2DEXT__IIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixelsAddress) { - glMultiTexSubImage2DEXTPROC glMultiTexSubImage2DEXT = (glMultiTexSubImage2DEXTPROC)tlsGetFunction(1568); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyMultiTexImage1DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint border) { - glCopyMultiTexImage1DEXTPROC glCopyMultiTexImage1DEXT = (glCopyMultiTexImage1DEXTPROC)tlsGetFunction(1569); - UNUSED_PARAM(clazz) - glCopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyMultiTexImage2DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) { - glCopyMultiTexImage2DEXTPROC glCopyMultiTexImage2DEXT = (glCopyMultiTexImage2DEXTPROC)tlsGetFunction(1570); - UNUSED_PARAM(clazz) - glCopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyMultiTexSubImage1DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint x, jint y, jint width) { - glCopyMultiTexSubImage1DEXTPROC glCopyMultiTexSubImage1DEXT = (glCopyMultiTexSubImage1DEXTPROC)tlsGetFunction(1571); - UNUSED_PARAM(clazz) - glCopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyMultiTexSubImage2DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) { - glCopyMultiTexSubImage2DEXTPROC glCopyMultiTexSubImage2DEXT = (glCopyMultiTexSubImage2DEXTPROC)tlsGetFunction(1572); - UNUSED_PARAM(clazz) - glCopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexImageEXT__IIIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint format, jint type, jlong pixelsAddress) { - glGetMultiTexImageEXTPROC glGetMultiTexImageEXT = (glGetMultiTexImageEXTPROC)tlsGetFunction(1573); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glGetMultiTexParameterfvEXTPROC glGetMultiTexParameterfvEXT = (glGetMultiTexParameterfvEXTPROC)tlsGetFunction(1574); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexParameterfvEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glGetMultiTexParameterivEXTPROC glGetMultiTexParameterivEXT = (glGetMultiTexParameterivEXTPROC)tlsGetFunction(1575); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexParameterivEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexLevelParameterfvEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint pname, jlong paramsAddress) { - glGetMultiTexLevelParameterfvEXTPROC glGetMultiTexLevelParameterfvEXT = (glGetMultiTexLevelParameterfvEXTPROC)tlsGetFunction(1576); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexLevelParameterivEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint pname, jlong paramsAddress) { - glGetMultiTexLevelParameterivEXTPROC glGetMultiTexLevelParameterivEXT = (glGetMultiTexLevelParameterivEXTPROC)tlsGetFunction(1577); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexLevelParameterivEXT(texunit, target, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage3DEXT__IIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixelsAddress) { - glMultiTexImage3DEXTPROC glMultiTexImage3DEXT = (glMultiTexImage3DEXTPROC)tlsGetFunction(1578); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage3DEXT__IIIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixelsAddress) { - glMultiTexSubImage3DEXTPROC glMultiTexSubImage3DEXT = (glMultiTexSubImage3DEXTPROC)tlsGetFunction(1579); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCopyMultiTexSubImage3DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { - glCopyMultiTexSubImage3DEXTPROC glCopyMultiTexSubImage3DEXT = (glCopyMultiTexSubImage3DEXTPROC)tlsGetFunction(1580); - UNUSED_PARAM(clazz) - glCopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glEnableClientStateIndexedEXT(JNIEnv *__env, jclass clazz, jint array, jint index) { - glEnableClientStateIndexedEXTPROC glEnableClientStateIndexedEXT = (glEnableClientStateIndexedEXTPROC)tlsGetFunction(1581); - UNUSED_PARAM(clazz) - glEnableClientStateIndexedEXT(array, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glDisableClientStateIndexedEXT(JNIEnv *__env, jclass clazz, jint array, jint index) { - glDisableClientStateIndexedEXTPROC glDisableClientStateIndexedEXT = (glDisableClientStateIndexedEXTPROC)tlsGetFunction(1582); - UNUSED_PARAM(clazz) - glDisableClientStateIndexedEXT(array, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glEnableClientStateiEXT(JNIEnv *__env, jclass clazz, jint array, jint index) { - glEnableClientStateiEXTPROC glEnableClientStateiEXT = (glEnableClientStateiEXTPROC)tlsGetFunction(1583); - UNUSED_PARAM(clazz) - glEnableClientStateiEXT(array, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glDisableClientStateiEXT(JNIEnv *__env, jclass clazz, jint array, jint index) { - glDisableClientStateiEXTPROC glDisableClientStateiEXT = (glDisableClientStateiEXTPROC)tlsGetFunction(1584); - UNUSED_PARAM(clazz) - glDisableClientStateiEXT(array, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFloatIndexedvEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glGetFloatIndexedvEXTPROC glGetFloatIndexedvEXT = (glGetFloatIndexedvEXTPROC)tlsGetFunction(1585); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFloatIndexedvEXT(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetDoubleIndexedvEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glGetDoubleIndexedvEXTPROC glGetDoubleIndexedvEXT = (glGetDoubleIndexedvEXTPROC)tlsGetFunction(1586); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetDoubleIndexedvEXT(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetPointerIndexedvEXT(JNIEnv *__env, jclass clazz, jint target, jint index, jlong paramsAddress) { - glGetPointerIndexedvEXTPROC glGetPointerIndexedvEXT = (glGetPointerIndexedvEXTPROC)tlsGetFunction(1587); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetPointerIndexedvEXT(target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFloati_1vEXT__IIJ(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong paramsAddress) { - glGetFloati_vEXTPROC glGetFloati_vEXT = (glGetFloati_vEXTPROC)tlsGetFunction(1588); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFloati_vEXT(pname, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetDoublei_1vEXT__IIJ(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong paramsAddress) { - glGetDoublei_vEXTPROC glGetDoublei_vEXT = (glGetDoublei_vEXTPROC)tlsGetFunction(1589); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetDoublei_vEXT(pname, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetPointeri_1vEXT(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong paramsAddress) { - glGetPointeri_vEXTPROC glGetPointeri_vEXT = (glGetPointeri_vEXTPROC)tlsGetFunction(1590); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetPointeri_vEXT(pname, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramStringEXT(JNIEnv *__env, jclass clazz, jint program, jint target, jint format, jint len, jlong stringAddress) { - glNamedProgramStringEXTPROC glNamedProgramStringEXT = (glNamedProgramStringEXTPROC)tlsGetFunction(1596); - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - glNamedProgramStringEXT(program, target, format, len, string); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedProgramLocalParameter4dEXT(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w) { - glNamedProgramLocalParameter4dEXTPROC glNamedProgramLocalParameter4dEXT = (glNamedProgramLocalParameter4dEXTPROC)tlsGetFunction(1597); - UNUSED_PARAM(clazz) - glNamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4dvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glNamedProgramLocalParameter4dvEXTPROC glNamedProgramLocalParameter4dvEXT = (glNamedProgramLocalParameter4dvEXTPROC)tlsGetFunction(1598); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glNamedProgramLocalParameter4dvEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedProgramLocalParameter4fEXT(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w) { - glNamedProgramLocalParameter4fEXTPROC glNamedProgramLocalParameter4fEXT = (glNamedProgramLocalParameter4fEXTPROC)tlsGetFunction(1599); - UNUSED_PARAM(clazz) - glNamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4fvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glNamedProgramLocalParameter4fvEXTPROC glNamedProgramLocalParameter4fvEXT = (glNamedProgramLocalParameter4fvEXTPROC)tlsGetFunction(1600); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glNamedProgramLocalParameter4fvEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterdvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glGetNamedProgramLocalParameterdvEXTPROC glGetNamedProgramLocalParameterdvEXT = (glGetNamedProgramLocalParameterdvEXTPROC)tlsGetFunction(1601); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedProgramLocalParameterdvEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterfvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glGetNamedProgramLocalParameterfvEXTPROC glGetNamedProgramLocalParameterfvEXT = (glGetNamedProgramLocalParameterfvEXTPROC)tlsGetFunction(1602); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedProgramLocalParameterfvEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint pname, jlong paramsAddress) { - glGetNamedProgramivEXTPROC glGetNamedProgramivEXT = (glGetNamedProgramivEXTPROC)tlsGetFunction(1603); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedProgramivEXT(program, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramStringEXT(JNIEnv *__env, jclass clazz, jint program, jint target, jint pname, jlong stringAddress) { - glGetNamedProgramStringEXTPROC glGetNamedProgramStringEXT = (glGetNamedProgramStringEXTPROC)tlsGetFunction(1604); - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - glGetNamedProgramStringEXT(program, target, pname, string); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage3DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong dataAddress) { - glCompressedTextureImage3DEXTPROC glCompressedTextureImage3DEXT = (glCompressedTextureImage3DEXTPROC)tlsGetFunction(1605); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage2DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong dataAddress) { - glCompressedTextureImage2DEXTPROC glCompressedTextureImage2DEXT = (glCompressedTextureImage2DEXTPROC)tlsGetFunction(1606); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage1DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong dataAddress) { - glCompressedTextureImage1DEXTPROC glCompressedTextureImage1DEXT = (glCompressedTextureImage1DEXTPROC)tlsGetFunction(1607); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage3DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong dataAddress) { - glCompressedTextureSubImage3DEXTPROC glCompressedTextureSubImage3DEXT = (glCompressedTextureSubImage3DEXTPROC)tlsGetFunction(1608); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage2DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong dataAddress) { - glCompressedTextureSubImage2DEXTPROC glCompressedTextureSubImage2DEXT = (glCompressedTextureSubImage2DEXTPROC)tlsGetFunction(1609); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage1DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong dataAddress) { - glCompressedTextureSubImage1DEXTPROC glCompressedTextureSubImage1DEXT = (glCompressedTextureSubImage1DEXTPROC)tlsGetFunction(1610); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedTextureImageEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint level, jlong imgAddress) { - glGetCompressedTextureImageEXTPROC glGetCompressedTextureImageEXT = (glGetCompressedTextureImageEXTPROC)tlsGetFunction(1611); - uintptr_t img = (uintptr_t)imgAddress; - UNUSED_PARAM(clazz) - glGetCompressedTextureImageEXT(texture, target, level, img); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage3DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong dataAddress) { - glCompressedMultiTexImage3DEXTPROC glCompressedMultiTexImage3DEXT = (glCompressedMultiTexImage3DEXTPROC)tlsGetFunction(1612); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage2DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong dataAddress) { - glCompressedMultiTexImage2DEXTPROC glCompressedMultiTexImage2DEXT = (glCompressedMultiTexImage2DEXTPROC)tlsGetFunction(1613); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage1DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong dataAddress) { - glCompressedMultiTexImage1DEXTPROC glCompressedMultiTexImage1DEXT = (glCompressedMultiTexImage1DEXTPROC)tlsGetFunction(1614); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage3DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong dataAddress) { - glCompressedMultiTexSubImage3DEXTPROC glCompressedMultiTexSubImage3DEXT = (glCompressedMultiTexSubImage3DEXTPROC)tlsGetFunction(1615); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage2DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong dataAddress) { - glCompressedMultiTexSubImage2DEXTPROC glCompressedMultiTexSubImage2DEXT = (glCompressedMultiTexSubImage2DEXTPROC)tlsGetFunction(1616); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage1DEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong dataAddress) { - glCompressedMultiTexSubImage1DEXTPROC glCompressedMultiTexSubImage1DEXT = (glCompressedMultiTexSubImage1DEXTPROC)tlsGetFunction(1617); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedMultiTexImageEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint level, jlong imgAddress) { - glGetCompressedMultiTexImageEXTPROC glGetCompressedMultiTexImageEXT = (glGetCompressedMultiTexImageEXTPROC)tlsGetFunction(1618); - uintptr_t img = (uintptr_t)imgAddress; - UNUSED_PARAM(clazz) - glGetCompressedMultiTexImageEXT(texunit, target, level, img); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadTransposefEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixLoadTransposefEXTPROC glMatrixLoadTransposefEXT = (glMatrixLoadTransposefEXTPROC)tlsGetFunction(1619); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixLoadTransposefEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadTransposedEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixLoadTransposedEXTPROC glMatrixLoadTransposedEXT = (glMatrixLoadTransposedEXTPROC)tlsGetFunction(1620); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixLoadTransposedEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultTransposefEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixMultTransposefEXTPROC glMatrixMultTransposefEXT = (glMatrixMultTransposefEXTPROC)tlsGetFunction(1621); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixMultTransposefEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultTransposedEXT__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixMultTransposedEXTPROC glMatrixMultTransposedEXT = (glMatrixMultTransposedEXTPROC)tlsGetFunction(1622); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixMultTransposedEXT(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedBufferDataEXT__IJJI(JNIEnv *__env, jclass clazz, jint buffer, jlong size, jlong dataAddress, jint usage) { - glNamedBufferDataEXTPROC glNamedBufferDataEXT = (glNamedBufferDataEXTPROC)tlsGetFunction(1623); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glNamedBufferDataEXT(buffer, (uintptr_t)size, data, usage); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedBufferSubDataEXT__IJJJ(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jlong dataAddress) { - glNamedBufferSubDataEXTPROC glNamedBufferSubDataEXT = (glNamedBufferSubDataEXTPROC)tlsGetFunction(1624); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glNamedBufferSubDataEXT(buffer, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMapNamedBufferEXT(JNIEnv *__env, jclass clazz, jint buffer, jint access) { - glMapNamedBufferEXTPROC glMapNamedBufferEXT = (glMapNamedBufferEXTPROC)tlsGetFunction(1625); - UNUSED_PARAM(clazz) - return (jlong)glMapNamedBufferEXT(buffer, access); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glUnmapNamedBufferEXT(JNIEnv *__env, jclass clazz, jint buffer) { - glUnmapNamedBufferEXTPROC glUnmapNamedBufferEXT = (glUnmapNamedBufferEXTPROC)tlsGetFunction(1626); - UNUSED_PARAM(clazz) - return glUnmapNamedBufferEXT(buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferParameterivEXT__IIJ(JNIEnv *__env, jclass clazz, jint buffer, jint pname, jlong paramsAddress) { - glGetNamedBufferParameterivEXTPROC glGetNamedBufferParameterivEXT = (glGetNamedBufferParameterivEXTPROC)tlsGetFunction(1627); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedBufferParameterivEXT(buffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferSubDataEXT__IJJJ(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jlong dataAddress) { - glGetNamedBufferSubDataEXTPROC glGetNamedBufferSubDataEXT = (glGetNamedBufferSubDataEXTPROC)tlsGetFunction(1628); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetNamedBufferSubDataEXT(buffer, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform1fEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat v0) { - glProgramUniform1fEXTPROC glProgramUniform1fEXT = (glProgramUniform1fEXTPROC)tlsGetFunction(1629); - UNUSED_PARAM(clazz) - glProgramUniform1fEXT(program, location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform2fEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1) { - glProgramUniform2fEXTPROC glProgramUniform2fEXT = (glProgramUniform2fEXTPROC)tlsGetFunction(1630); - UNUSED_PARAM(clazz) - glProgramUniform2fEXT(program, location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform3fEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) { - glProgramUniform3fEXTPROC glProgramUniform3fEXT = (glProgramUniform3fEXTPROC)tlsGetFunction(1631); - UNUSED_PARAM(clazz) - glProgramUniform3fEXT(program, location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform4fEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) { - glProgramUniform4fEXTPROC glProgramUniform4fEXT = (glProgramUniform4fEXTPROC)tlsGetFunction(1632); - UNUSED_PARAM(clazz) - glProgramUniform4fEXT(program, location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform1iEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0) { - glProgramUniform1iEXTPROC glProgramUniform1iEXT = (glProgramUniform1iEXTPROC)tlsGetFunction(1633); - UNUSED_PARAM(clazz) - glProgramUniform1iEXT(program, location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform2iEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0, jint v1) { - glProgramUniform2iEXTPROC glProgramUniform2iEXT = (glProgramUniform2iEXTPROC)tlsGetFunction(1634); - UNUSED_PARAM(clazz) - glProgramUniform2iEXT(program, location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform3iEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2) { - glProgramUniform3iEXTPROC glProgramUniform3iEXT = (glProgramUniform3iEXTPROC)tlsGetFunction(1635); - UNUSED_PARAM(clazz) - glProgramUniform3iEXT(program, location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform4iEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3) { - glProgramUniform4iEXTPROC glProgramUniform4iEXT = (glProgramUniform4iEXTPROC)tlsGetFunction(1636); - UNUSED_PARAM(clazz) - glProgramUniform4iEXT(program, location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1fvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1fvEXTPROC glProgramUniform1fvEXT = (glProgramUniform1fvEXTPROC)tlsGetFunction(1637); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1fvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2fvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2fvEXTPROC glProgramUniform2fvEXT = (glProgramUniform2fvEXTPROC)tlsGetFunction(1638); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2fvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3fvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3fvEXTPROC glProgramUniform3fvEXT = (glProgramUniform3fvEXTPROC)tlsGetFunction(1639); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3fvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4fvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4fvEXTPROC glProgramUniform4fvEXT = (glProgramUniform4fvEXTPROC)tlsGetFunction(1640); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4fvEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1ivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1ivEXTPROC glProgramUniform1ivEXT = (glProgramUniform1ivEXTPROC)tlsGetFunction(1641); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1ivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2ivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2ivEXTPROC glProgramUniform2ivEXT = (glProgramUniform2ivEXTPROC)tlsGetFunction(1642); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2ivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3ivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3ivEXTPROC glProgramUniform3ivEXT = (glProgramUniform3ivEXTPROC)tlsGetFunction(1643); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3ivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4ivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4ivEXTPROC glProgramUniform4ivEXT = (glProgramUniform4ivEXTPROC)tlsGetFunction(1644); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4ivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2fvEXTPROC glProgramUniformMatrix2fvEXT = (glProgramUniformMatrix2fvEXTPROC)tlsGetFunction(1645); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3fvEXTPROC glProgramUniformMatrix3fvEXT = (glProgramUniformMatrix3fvEXTPROC)tlsGetFunction(1646); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4fvEXTPROC glProgramUniformMatrix4fvEXT = (glProgramUniformMatrix4fvEXTPROC)tlsGetFunction(1647); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2x3fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x3fvEXTPROC glProgramUniformMatrix2x3fvEXT = (glProgramUniformMatrix2x3fvEXTPROC)tlsGetFunction(1648); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3x2fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x2fvEXTPROC glProgramUniformMatrix3x2fvEXT = (glProgramUniformMatrix3x2fvEXTPROC)tlsGetFunction(1649); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2x4fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x4fvEXTPROC glProgramUniformMatrix2x4fvEXT = (glProgramUniformMatrix2x4fvEXTPROC)tlsGetFunction(1650); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4x2fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x2fvEXTPROC glProgramUniformMatrix4x2fvEXT = (glProgramUniformMatrix4x2fvEXTPROC)tlsGetFunction(1651); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3x4fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x4fvEXTPROC glProgramUniformMatrix3x4fvEXT = (glProgramUniformMatrix3x4fvEXTPROC)tlsGetFunction(1652); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4x3fvEXT__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x3fvEXTPROC glProgramUniformMatrix4x3fvEXT = (glProgramUniformMatrix4x3fvEXTPROC)tlsGetFunction(1653); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glTextureBufferEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint internalformat, jint buffer) { - glTextureBufferEXTPROC glTextureBufferEXT = (glTextureBufferEXTPROC)tlsGetFunction(1654); - UNUSED_PARAM(clazz) - glTextureBufferEXT(texture, target, internalformat, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexBufferEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint internalformat, jint buffer) { - glMultiTexBufferEXTPROC glMultiTexBufferEXT = (glMultiTexBufferEXTPROC)tlsGetFunction(1655); - UNUSED_PARAM(clazz) - glMultiTexBufferEXT(texunit, target, internalformat, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterIivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramsAddress) { - glTextureParameterIivEXTPROC glTextureParameterIivEXT = (glTextureParameterIivEXTPROC)tlsGetFunction(1656); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTextureParameterIivEXT(texture, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterIuivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramsAddress) { - glTextureParameterIuivEXTPROC glTextureParameterIuivEXT = (glTextureParameterIuivEXTPROC)tlsGetFunction(1657); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTextureParameterIuivEXT(texture, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterIivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramsAddress) { - glGetTextureParameterIivEXTPROC glGetTextureParameterIivEXT = (glGetTextureParameterIivEXTPROC)tlsGetFunction(1658); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameterIivEXT(texture, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterIuivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint target, jint pname, jlong paramsAddress) { - glGetTextureParameterIuivEXTPROC glGetTextureParameterIuivEXT = (glGetTextureParameterIuivEXTPROC)tlsGetFunction(1659); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameterIuivEXT(texture, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterIivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glMultiTexParameterIivEXTPROC glMultiTexParameterIivEXT = (glMultiTexParameterIivEXTPROC)tlsGetFunction(1660); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMultiTexParameterIivEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterIuivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glMultiTexParameterIuivEXTPROC glMultiTexParameterIuivEXT = (glMultiTexParameterIuivEXTPROC)tlsGetFunction(1661); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMultiTexParameterIuivEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterIivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glGetMultiTexParameterIivEXTPROC glGetMultiTexParameterIivEXT = (glGetMultiTexParameterIivEXTPROC)tlsGetFunction(1662); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexParameterIivEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterIuivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint pname, jlong paramsAddress) { - glGetMultiTexParameterIuivEXTPROC glGetMultiTexParameterIuivEXT = (glGetMultiTexParameterIuivEXTPROC)tlsGetFunction(1663); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMultiTexParameterIuivEXT(texunit, target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform1uiEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0) { - glProgramUniform1uiEXTPROC glProgramUniform1uiEXT = (glProgramUniform1uiEXTPROC)tlsGetFunction(1664); - UNUSED_PARAM(clazz) - glProgramUniform1uiEXT(program, location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform2uiEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0, jint v1) { - glProgramUniform2uiEXTPROC glProgramUniform2uiEXT = (glProgramUniform2uiEXTPROC)tlsGetFunction(1665); - UNUSED_PARAM(clazz) - glProgramUniform2uiEXT(program, location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform3uiEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2) { - glProgramUniform3uiEXTPROC glProgramUniform3uiEXT = (glProgramUniform3uiEXTPROC)tlsGetFunction(1666); - UNUSED_PARAM(clazz) - glProgramUniform3uiEXT(program, location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glProgramUniform4uiEXT(JNIEnv *__env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3) { - glProgramUniform4uiEXTPROC glProgramUniform4uiEXT = (glProgramUniform4uiEXTPROC)tlsGetFunction(1667); - UNUSED_PARAM(clazz) - glProgramUniform4uiEXT(program, location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1uivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1uivEXTPROC glProgramUniform1uivEXT = (glProgramUniform1uivEXTPROC)tlsGetFunction(1668); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1uivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2uivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2uivEXTPROC glProgramUniform2uivEXT = (glProgramUniform2uivEXTPROC)tlsGetFunction(1669); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2uivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3uivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3uivEXTPROC glProgramUniform3uivEXT = (glProgramUniform3uivEXTPROC)tlsGetFunction(1670); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3uivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4uivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4uivEXTPROC glProgramUniform4uivEXT = (glProgramUniform4uivEXTPROC)tlsGetFunction(1671); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4uivEXT(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameters4fvEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jint count, jlong paramsAddress) { - glNamedProgramLocalParameters4fvEXTPROC glNamedProgramLocalParameters4fvEXT = (glNamedProgramLocalParameters4fvEXTPROC)tlsGetFunction(1672); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glNamedProgramLocalParameters4fvEXT(program, target, index, count, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedProgramLocalParameterI4iEXT(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jint x, jint y, jint z, jint w) { - glNamedProgramLocalParameterI4iEXTPROC glNamedProgramLocalParameterI4iEXT = (glNamedProgramLocalParameterI4iEXTPROC)tlsGetFunction(1673); - UNUSED_PARAM(clazz) - glNamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4ivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glNamedProgramLocalParameterI4ivEXTPROC glNamedProgramLocalParameterI4ivEXT = (glNamedProgramLocalParameterI4ivEXTPROC)tlsGetFunction(1674); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glNamedProgramLocalParameterI4ivEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParametersI4ivEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jint count, jlong paramsAddress) { - glNamedProgramLocalParametersI4ivEXTPROC glNamedProgramLocalParametersI4ivEXT = (glNamedProgramLocalParametersI4ivEXTPROC)tlsGetFunction(1675); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glNamedProgramLocalParametersI4ivEXT(program, target, index, count, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedProgramLocalParameterI4uiEXT(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jint x, jint y, jint z, jint w) { - glNamedProgramLocalParameterI4uiEXTPROC glNamedProgramLocalParameterI4uiEXT = (glNamedProgramLocalParameterI4uiEXTPROC)tlsGetFunction(1676); - UNUSED_PARAM(clazz) - glNamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4uivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glNamedProgramLocalParameterI4uivEXTPROC glNamedProgramLocalParameterI4uivEXT = (glNamedProgramLocalParameterI4uivEXTPROC)tlsGetFunction(1677); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glNamedProgramLocalParameterI4uivEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParametersI4uivEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jint count, jlong paramsAddress) { - glNamedProgramLocalParametersI4uivEXTPROC glNamedProgramLocalParametersI4uivEXT = (glNamedProgramLocalParametersI4uivEXTPROC)tlsGetFunction(1678); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glNamedProgramLocalParametersI4uivEXT(program, target, index, count, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterIivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glGetNamedProgramLocalParameterIivEXTPROC glGetNamedProgramLocalParameterIivEXT = (glGetNamedProgramLocalParameterIivEXTPROC)tlsGetFunction(1679); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedProgramLocalParameterIivEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterIuivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint target, jint index, jlong paramsAddress) { - glGetNamedProgramLocalParameterIuivEXTPROC glGetNamedProgramLocalParameterIuivEXT = (glGetNamedProgramLocalParameterIuivEXTPROC)tlsGetFunction(1680); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedProgramLocalParameterIuivEXT(program, target, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedRenderbufferStorageEXT(JNIEnv *__env, jclass clazz, jint renderbuffer, jint internalformat, jint width, jint height) { - glNamedRenderbufferStorageEXTPROC glNamedRenderbufferStorageEXT = (glNamedRenderbufferStorageEXTPROC)tlsGetFunction(1681); - UNUSED_PARAM(clazz) - glNamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedRenderbufferParameterivEXT__IIJ(JNIEnv *__env, jclass clazz, jint renderbuffer, jint pname, jlong paramsAddress) { - glGetNamedRenderbufferParameterivEXTPROC glGetNamedRenderbufferParameterivEXT = (glGetNamedRenderbufferParameterivEXTPROC)tlsGetFunction(1682); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedRenderbufferParameterivEXT(renderbuffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedRenderbufferStorageMultisampleEXT(JNIEnv *__env, jclass clazz, jint renderbuffer, jint samples, jint internalformat, jint width, jint height) { - glNamedRenderbufferStorageMultisampleEXTPROC glNamedRenderbufferStorageMultisampleEXT = (glNamedRenderbufferStorageMultisampleEXTPROC)tlsGetFunction(1683); - UNUSED_PARAM(clazz) - glNamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedRenderbufferStorageMultisampleCoverageEXT(JNIEnv *__env, jclass clazz, jint renderbuffer, jint coverageSamples, jint colorSamples, jint internalformat, jint width, jint height) { - glNamedRenderbufferStorageMultisampleCoverageEXTPROC glNamedRenderbufferStorageMultisampleCoverageEXT = (glNamedRenderbufferStorageMultisampleCoverageEXTPROC)tlsGetFunction(1684); - UNUSED_PARAM(clazz) - glNamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer, coverageSamples, colorSamples, internalformat, width, height); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glCheckNamedFramebufferStatusEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint target) { - glCheckNamedFramebufferStatusEXTPROC glCheckNamedFramebufferStatusEXT = (glCheckNamedFramebufferStatusEXTPROC)tlsGetFunction(1685); - UNUSED_PARAM(clazz) - return glCheckNamedFramebufferStatusEXT(framebuffer, target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedFramebufferTexture1DEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level) { - glNamedFramebufferTexture1DEXTPROC glNamedFramebufferTexture1DEXT = (glNamedFramebufferTexture1DEXTPROC)tlsGetFunction(1686); - UNUSED_PARAM(clazz) - glNamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedFramebufferTexture2DEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level) { - glNamedFramebufferTexture2DEXTPROC glNamedFramebufferTexture2DEXT = (glNamedFramebufferTexture2DEXTPROC)tlsGetFunction(1687); - UNUSED_PARAM(clazz) - glNamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedFramebufferTexture3DEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level, jint zoffset) { - glNamedFramebufferTexture3DEXTPROC glNamedFramebufferTexture3DEXT = (glNamedFramebufferTexture3DEXTPROC)tlsGetFunction(1688); - UNUSED_PARAM(clazz) - glNamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedFramebufferRenderbufferEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint renderbuffertarget, jint renderbuffer) { - glNamedFramebufferRenderbufferEXTPROC glNamedFramebufferRenderbufferEXT = (glNamedFramebufferRenderbufferEXTPROC)tlsGetFunction(1689); - UNUSED_PARAM(clazz) - glNamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedFramebufferAttachmentParameterivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint pname, jlong paramsAddress) { - glGetNamedFramebufferAttachmentParameterivEXTPROC glGetNamedFramebufferAttachmentParameterivEXT = (glGetNamedFramebufferAttachmentParameterivEXTPROC)tlsGetFunction(1690); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glGenerateTextureMipmapEXT(JNIEnv *__env, jclass clazz, jint texture, jint target) { - glGenerateTextureMipmapEXTPROC glGenerateTextureMipmapEXT = (glGenerateTextureMipmapEXTPROC)tlsGetFunction(1691); - UNUSED_PARAM(clazz) - glGenerateTextureMipmapEXT(texture, target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glGenerateMultiTexMipmapEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target) { - glGenerateMultiTexMipmapEXTPROC glGenerateMultiTexMipmapEXT = (glGenerateMultiTexMipmapEXTPROC)tlsGetFunction(1692); - UNUSED_PARAM(clazz) - glGenerateMultiTexMipmapEXT(texunit, target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glFramebufferDrawBufferEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint mode) { - glFramebufferDrawBufferEXTPROC glFramebufferDrawBufferEXT = (glFramebufferDrawBufferEXTPROC)tlsGetFunction(1693); - UNUSED_PARAM(clazz) - glFramebufferDrawBufferEXT(framebuffer, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFramebufferDrawBuffersEXT__IIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint n, jlong bufsAddress) { - glFramebufferDrawBuffersEXTPROC glFramebufferDrawBuffersEXT = (glFramebufferDrawBuffersEXTPROC)tlsGetFunction(1694); - uintptr_t bufs = (uintptr_t)bufsAddress; - UNUSED_PARAM(clazz) - glFramebufferDrawBuffersEXT(framebuffer, n, bufs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glFramebufferReadBufferEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint mode) { - glFramebufferReadBufferEXTPROC glFramebufferReadBufferEXT = (glFramebufferReadBufferEXTPROC)tlsGetFunction(1695); - UNUSED_PARAM(clazz) - glFramebufferReadBufferEXT(framebuffer, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFramebufferParameterivEXT__IIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint pname, jlong paramAddress) { - glGetFramebufferParameterivEXTPROC glGetFramebufferParameterivEXT = (glGetFramebufferParameterivEXTPROC)tlsGetFunction(1696); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetFramebufferParameterivEXT(framebuffer, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedCopyBufferSubDataEXT(JNIEnv *__env, jclass clazz, jint readBuffer, jint writeBuffer, jlong readOffset, jlong writeOffset, jlong size) { - glNamedCopyBufferSubDataEXTPROC glNamedCopyBufferSubDataEXT = (glNamedCopyBufferSubDataEXTPROC)tlsGetFunction(1697); - UNUSED_PARAM(clazz) - glNamedCopyBufferSubDataEXT(readBuffer, writeBuffer, (uintptr_t)readOffset, (uintptr_t)writeOffset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedFramebufferTextureEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level) { - glNamedFramebufferTextureEXTPROC glNamedFramebufferTextureEXT = (glNamedFramebufferTextureEXTPROC)tlsGetFunction(1698); - UNUSED_PARAM(clazz) - glNamedFramebufferTextureEXT(framebuffer, attachment, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedFramebufferTextureLayerEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint layer) { - glNamedFramebufferTextureLayerEXTPROC glNamedFramebufferTextureLayerEXT = (glNamedFramebufferTextureLayerEXTPROC)tlsGetFunction(1699); - UNUSED_PARAM(clazz) - glNamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glNamedFramebufferTextureFaceEXT(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint face) { - glNamedFramebufferTextureFaceEXTPROC glNamedFramebufferTextureFaceEXT = (glNamedFramebufferTextureFaceEXTPROC)tlsGetFunction(1700); - UNUSED_PARAM(clazz) - glNamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glTextureRenderbufferEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint renderbuffer) { - glTextureRenderbufferEXTPROC glTextureRenderbufferEXT = (glTextureRenderbufferEXTPROC)tlsGetFunction(1701); - UNUSED_PARAM(clazz) - glTextureRenderbufferEXT(texture, target, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glMultiTexRenderbufferEXT(JNIEnv *__env, jclass clazz, jint texunit, jint target, jint renderbuffer) { - glMultiTexRenderbufferEXTPROC glMultiTexRenderbufferEXT = (glMultiTexRenderbufferEXTPROC)tlsGetFunction(1702); - UNUSED_PARAM(clazz) - glMultiTexRenderbufferEXT(texunit, target, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayVertexOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset) { - glVertexArrayVertexOffsetEXTPROC glVertexArrayVertexOffsetEXT = (glVertexArrayVertexOffsetEXTPROC)tlsGetFunction(1703); - UNUSED_PARAM(clazz) - glVertexArrayVertexOffsetEXT(vaobj, buffer, size, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayColorOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset) { - glVertexArrayColorOffsetEXTPROC glVertexArrayColorOffsetEXT = (glVertexArrayColorOffsetEXTPROC)tlsGetFunction(1704); - UNUSED_PARAM(clazz) - glVertexArrayColorOffsetEXT(vaobj, buffer, size, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayEdgeFlagOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint stride, jlong offset) { - glVertexArrayEdgeFlagOffsetEXTPROC glVertexArrayEdgeFlagOffsetEXT = (glVertexArrayEdgeFlagOffsetEXTPROC)tlsGetFunction(1705); - UNUSED_PARAM(clazz) - glVertexArrayEdgeFlagOffsetEXT(vaobj, buffer, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayIndexOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset) { - glVertexArrayIndexOffsetEXTPROC glVertexArrayIndexOffsetEXT = (glVertexArrayIndexOffsetEXTPROC)tlsGetFunction(1706); - UNUSED_PARAM(clazz) - glVertexArrayIndexOffsetEXT(vaobj, buffer, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayNormalOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset) { - glVertexArrayNormalOffsetEXTPROC glVertexArrayNormalOffsetEXT = (glVertexArrayNormalOffsetEXTPROC)tlsGetFunction(1707); - UNUSED_PARAM(clazz) - glVertexArrayNormalOffsetEXT(vaobj, buffer, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayTexCoordOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset) { - glVertexArrayTexCoordOffsetEXTPROC glVertexArrayTexCoordOffsetEXT = (glVertexArrayTexCoordOffsetEXTPROC)tlsGetFunction(1708); - UNUSED_PARAM(clazz) - glVertexArrayTexCoordOffsetEXT(vaobj, buffer, size, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayMultiTexCoordOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint texunit, jint size, jint type, jint stride, jlong offset) { - glVertexArrayMultiTexCoordOffsetEXTPROC glVertexArrayMultiTexCoordOffsetEXT = (glVertexArrayMultiTexCoordOffsetEXTPROC)tlsGetFunction(1709); - UNUSED_PARAM(clazz) - glVertexArrayMultiTexCoordOffsetEXT(vaobj, buffer, texunit, size, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayFogCoordOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset) { - glVertexArrayFogCoordOffsetEXTPROC glVertexArrayFogCoordOffsetEXT = (glVertexArrayFogCoordOffsetEXTPROC)tlsGetFunction(1710); - UNUSED_PARAM(clazz) - glVertexArrayFogCoordOffsetEXT(vaobj, buffer, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArraySecondaryColorOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset) { - glVertexArraySecondaryColorOffsetEXTPROC glVertexArraySecondaryColorOffsetEXT = (glVertexArraySecondaryColorOffsetEXTPROC)tlsGetFunction(1711); - UNUSED_PARAM(clazz) - glVertexArraySecondaryColorOffsetEXT(vaobj, buffer, size, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayVertexAttribOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jboolean normalized, jint stride, jlong offset) { - glVertexArrayVertexAttribOffsetEXTPROC glVertexArrayVertexAttribOffsetEXT = (glVertexArrayVertexAttribOffsetEXTPROC)tlsGetFunction(1712); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribOffsetEXT(vaobj, buffer, index, size, type, normalized, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glVertexArrayVertexAttribIOffsetEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jint stride, jlong offset) { - glVertexArrayVertexAttribIOffsetEXTPROC glVertexArrayVertexAttribIOffsetEXT = (glVertexArrayVertexAttribIOffsetEXTPROC)tlsGetFunction(1713); - UNUSED_PARAM(clazz) - glVertexArrayVertexAttribIOffsetEXT(vaobj, buffer, index, size, type, stride, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glEnableVertexArrayEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint array) { - glEnableVertexArrayEXTPROC glEnableVertexArrayEXT = (glEnableVertexArrayEXTPROC)tlsGetFunction(1714); - UNUSED_PARAM(clazz) - glEnableVertexArrayEXT(vaobj, array); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glDisableVertexArrayEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint array) { - glDisableVertexArrayEXTPROC glDisableVertexArrayEXT = (glDisableVertexArrayEXTPROC)tlsGetFunction(1715); - UNUSED_PARAM(clazz) - glDisableVertexArrayEXT(vaobj, array); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glEnableVertexArrayAttribEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint index) { - glEnableVertexArrayAttribEXTPROC glEnableVertexArrayAttribEXT = (glEnableVertexArrayAttribEXTPROC)tlsGetFunction(1716); - UNUSED_PARAM(clazz) - glEnableVertexArrayAttribEXT(vaobj, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glDisableVertexArrayAttribEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint index) { - glDisableVertexArrayAttribEXTPROC glDisableVertexArrayAttribEXT = (glDisableVertexArrayAttribEXTPROC)tlsGetFunction(1717); - UNUSED_PARAM(clazz) - glDisableVertexArrayAttribEXT(vaobj, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayIntegervEXT__IIJ(JNIEnv *__env, jclass clazz, jint vaobj, jint pname, jlong paramAddress) { - glGetVertexArrayIntegervEXTPROC glGetVertexArrayIntegervEXT = (glGetVertexArrayIntegervEXTPROC)tlsGetFunction(1718); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetVertexArrayIntegervEXT(vaobj, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayPointervEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint pname, jlong paramAddress) { - glGetVertexArrayPointervEXTPROC glGetVertexArrayPointervEXT = (glGetVertexArrayPointervEXTPROC)tlsGetFunction(1719); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetVertexArrayPointervEXT(vaobj, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayIntegeri_1vEXT__IIIJ(JNIEnv *__env, jclass clazz, jint vaobj, jint index, jint pname, jlong paramAddress) { - glGetVertexArrayIntegeri_vEXTPROC glGetVertexArrayIntegeri_vEXT = (glGetVertexArrayIntegeri_vEXTPROC)tlsGetFunction(1720); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetVertexArrayIntegeri_vEXT(vaobj, index, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayPointeri_1vEXT(JNIEnv *__env, jclass clazz, jint vaobj, jint index, jint pname, jlong paramAddress) { - glGetVertexArrayPointeri_vEXTPROC glGetVertexArrayPointeri_vEXT = (glGetVertexArrayPointeri_vEXTPROC)tlsGetFunction(1721); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetVertexArrayPointeri_vEXT(vaobj, index, pname, param); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMapNamedBufferRangeEXT(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong length, jint access) { - glMapNamedBufferRangeEXTPROC glMapNamedBufferRangeEXT = (glMapNamedBufferRangeEXTPROC)tlsGetFunction(1722); - UNUSED_PARAM(clazz) - return (jlong)glMapNamedBufferRangeEXT(buffer, (uintptr_t)offset, (uintptr_t)length, access); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_glFlushMappedNamedBufferRangeEXT(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong length) { - glFlushMappedNamedBufferRangeEXTPROC glFlushMappedNamedBufferRangeEXT = (glFlushMappedNamedBufferRangeEXTPROC)tlsGetFunction(1723); - UNUSED_PARAM(clazz) - glFlushMappedNamedBufferRangeEXT(buffer, (uintptr_t)offset, (uintptr_t)length); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDrawBuffers2.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDrawBuffers2.c deleted file mode 100644 index 77c6c158..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDrawBuffers2.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glColorMaskIndexedEXTPROC) (jint, jboolean, jboolean, jboolean, jboolean); -typedef void (APIENTRY *glGetBooleanIndexedvEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetIntegerIndexedvEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glEnableIndexedEXTPROC) (jint, jint); -typedef void (APIENTRY *glDisableIndexedEXTPROC) (jint, jint); -typedef jboolean (APIENTRY *glIsEnabledIndexedEXTPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_glColorMaskIndexedEXT(JNIEnv *__env, jclass clazz, jint index, jboolean r, jboolean g, jboolean b, jboolean a) { - glColorMaskIndexedEXTPROC glColorMaskIndexedEXT = (glColorMaskIndexedEXTPROC)tlsGetFunction(1724); - UNUSED_PARAM(clazz) - glColorMaskIndexedEXT(index, r, g, b, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglGetBooleanIndexedvEXT(JNIEnv *__env, jclass clazz, jint target, jint index, jlong dataAddress) { - glGetBooleanIndexedvEXTPROC glGetBooleanIndexedvEXT = (glGetBooleanIndexedvEXTPROC)tlsGetFunction(1595); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetBooleanIndexedvEXT(target, index, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglGetIntegerIndexedvEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong dataAddress) { - glGetIntegerIndexedvEXTPROC glGetIntegerIndexedvEXT = (glGetIntegerIndexedvEXTPROC)tlsGetFunction(1594); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetIntegerIndexedvEXT(target, index, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_glEnableIndexedEXT(JNIEnv *__env, jclass clazz, jint target, jint index) { - glEnableIndexedEXTPROC glEnableIndexedEXT = (glEnableIndexedEXTPROC)tlsGetFunction(1591); - UNUSED_PARAM(clazz) - glEnableIndexedEXT(target, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_glDisableIndexedEXT(JNIEnv *__env, jclass clazz, jint target, jint index) { - glDisableIndexedEXTPROC glDisableIndexedEXT = (glDisableIndexedEXTPROC)tlsGetFunction(1592); - UNUSED_PARAM(clazz) - glDisableIndexedEXT(target, index); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_glIsEnabledIndexedEXT(JNIEnv *__env, jclass clazz, jint target, jint index) { - glIsEnabledIndexedEXTPROC glIsEnabledIndexedEXT = (glIsEnabledIndexedEXTPROC)tlsGetFunction(1593); - UNUSED_PARAM(clazz) - return glIsEnabledIndexedEXT(target, index); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDrawInstanced.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDrawInstanced.c deleted file mode 100644 index 6451f1f2..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTDrawInstanced.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDrawArraysInstancedEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glDrawElementsInstancedEXTPROC) (jint, jint, jint, uintptr_t, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawInstanced_glDrawArraysInstancedEXT(JNIEnv *__env, jclass clazz, jint mode, jint start, jint count, jint primcount) { - glDrawArraysInstancedEXTPROC glDrawArraysInstancedEXT = (glDrawArraysInstancedEXTPROC)tlsGetFunction(1725); - UNUSED_PARAM(clazz) - glDrawArraysInstancedEXT(mode, start, count, primcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawInstanced_nglDrawElementsInstancedEXT(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress, jint primcount) { - glDrawElementsInstancedEXTPROC glDrawElementsInstancedEXT = (glDrawElementsInstancedEXTPROC)tlsGetFunction(1726); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElementsInstancedEXT(mode, count, type, indices, primcount); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTEGLImageStorage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTEGLImageStorage.c deleted file mode 100644 index 417b0b7d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTEGLImageStorage.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glEGLImageTargetTexStorageEXTPROC) (jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glEGLImageTargetTextureStorageEXTPROC) (jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTEGLImageStorage_nglEGLImageTargetTexStorageEXT__IJJ(JNIEnv *__env, jclass clazz, jint target, jlong imageAddress, jlong attrib_listAddress) { - glEGLImageTargetTexStorageEXTPROC glEGLImageTargetTexStorageEXT = (glEGLImageTargetTexStorageEXTPROC)tlsGetFunction(1727); - uintptr_t image = (uintptr_t)imageAddress; - uintptr_t attrib_list = (uintptr_t)attrib_listAddress; - UNUSED_PARAM(clazz) - glEGLImageTargetTexStorageEXT(target, image, attrib_list); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTEGLImageStorage_nglEGLImageTargetTextureStorageEXT__IJJ(JNIEnv *__env, jclass clazz, jint texture, jlong imageAddress, jlong attrib_listAddress) { - glEGLImageTargetTextureStorageEXTPROC glEGLImageTargetTextureStorageEXT = (glEGLImageTargetTextureStorageEXTPROC)tlsGetFunction(1728); - uintptr_t image = (uintptr_t)imageAddress; - uintptr_t attrib_list = (uintptr_t)attrib_listAddress; - UNUSED_PARAM(clazz) - glEGLImageTargetTextureStorageEXT(texture, image, attrib_list); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTExternalBuffer.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTExternalBuffer.c deleted file mode 100644 index b975b53a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTExternalBuffer.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBufferStorageExternalEXTPROC) (jint, uintptr_t, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glNamedBufferStorageExternalEXTPROC) (jint, uintptr_t, uintptr_t, uintptr_t, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTExternalBuffer_nglBufferStorageExternalEXT(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong size, jlong clientBufferAddress, jint flags) { - glBufferStorageExternalEXTPROC glBufferStorageExternalEXT = (glBufferStorageExternalEXTPROC)tlsGetFunction(1729); - uintptr_t clientBuffer = (uintptr_t)clientBufferAddress; - UNUSED_PARAM(clazz) - glBufferStorageExternalEXT(target, (uintptr_t)offset, (uintptr_t)size, clientBuffer, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTExternalBuffer_nglNamedBufferStorageExternalEXT(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jlong clientBufferAddress, jint flags) { - glNamedBufferStorageExternalEXTPROC glNamedBufferStorageExternalEXT = (glNamedBufferStorageExternalEXTPROC)tlsGetFunction(1730); - uintptr_t clientBuffer = (uintptr_t)clientBufferAddress; - UNUSED_PARAM(clazz) - glNamedBufferStorageExternalEXT(buffer, (uintptr_t)offset, (uintptr_t)size, clientBuffer, flags); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlit.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlit.c deleted file mode 100644 index 0daeb987..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlit.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlitFramebufferEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferBlit_glBlitFramebufferEXT(JNIEnv *__env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { - glBlitFramebufferEXTPROC glBlitFramebufferEXT = (glBlitFramebufferEXTPROC)tlsGetFunction(1731); - UNUSED_PARAM(clazz) - glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlitLayers.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlitLayers.c deleted file mode 100644 index 99eca8e8..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferBlitLayers.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlitFramebufferLayersEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glBlitFramebufferLayerEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferBlitLayers_glBlitFramebufferLayersEXT(JNIEnv *__env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { - glBlitFramebufferLayersEXTPROC glBlitFramebufferLayersEXT = (glBlitFramebufferLayersEXTPROC)tlsGetFunction(1732); - UNUSED_PARAM(clazz) - glBlitFramebufferLayersEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferBlitLayers_glBlitFramebufferLayerEXT(JNIEnv *__env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint srcLayer, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint dstLayer, jint mask, jint filter) { - glBlitFramebufferLayerEXTPROC glBlitFramebufferLayerEXT = (glBlitFramebufferLayerEXTPROC)tlsGetFunction(1733); - UNUSED_PARAM(clazz) - glBlitFramebufferLayerEXT(srcX0, srcY0, srcX1, srcY1, srcLayer, dstX0, dstY0, dstX1, dstY1, dstLayer, mask, filter); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferMultisample.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferMultisample.c deleted file mode 100644 index 2d272c9e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferMultisample.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glRenderbufferStorageMultisampleEXTPROC) (jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferMultisample_glRenderbufferStorageMultisampleEXT(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height) { - glRenderbufferStorageMultisampleEXTPROC glRenderbufferStorageMultisampleEXT = (glRenderbufferStorageMultisampleEXTPROC)tlsGetFunction(1734); - UNUSED_PARAM(clazz) - glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferObject.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferObject.c deleted file mode 100644 index 44ff13eb..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTFramebufferObject.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jboolean (APIENTRY *glIsRenderbufferEXTPROC) (jint); -typedef void (APIENTRY *glBindRenderbufferEXTPROC) (jint, jint); -typedef void (APIENTRY *glDeleteRenderbuffersEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenRenderbuffersEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glRenderbufferStorageEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glGetRenderbufferParameterivEXTPROC) (jint, jint, uintptr_t); -typedef jboolean (APIENTRY *glIsFramebufferEXTPROC) (jint); -typedef void (APIENTRY *glBindFramebufferEXTPROC) (jint, jint); -typedef void (APIENTRY *glDeleteFramebuffersEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenFramebuffersEXTPROC) (jint, uintptr_t); -typedef jint (APIENTRY *glCheckFramebufferStatusEXTPROC) (jint); -typedef void (APIENTRY *glFramebufferTexture1DEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTexture2DEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTexture3DEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferRenderbufferEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glGetFramebufferAttachmentParameterivEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGenerateMipmapEXTPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glIsRenderbufferEXT(JNIEnv *__env, jclass clazz, jint renderbuffer) { - glIsRenderbufferEXTPROC glIsRenderbufferEXT = (glIsRenderbufferEXTPROC)tlsGetFunction(1735); - UNUSED_PARAM(clazz) - return glIsRenderbufferEXT(renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glBindRenderbufferEXT(JNIEnv *__env, jclass clazz, jint target, jint renderbuffer) { - glBindRenderbufferEXTPROC glBindRenderbufferEXT = (glBindRenderbufferEXTPROC)tlsGetFunction(1736); - UNUSED_PARAM(clazz) - glBindRenderbufferEXT(target, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglDeleteRenderbuffersEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong renderbuffersAddress) { - glDeleteRenderbuffersEXTPROC glDeleteRenderbuffersEXT = (glDeleteRenderbuffersEXTPROC)tlsGetFunction(1737); - uintptr_t renderbuffers = (uintptr_t)renderbuffersAddress; - UNUSED_PARAM(clazz) - glDeleteRenderbuffersEXT(n, renderbuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGenRenderbuffersEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong renderbuffersAddress) { - glGenRenderbuffersEXTPROC glGenRenderbuffersEXT = (glGenRenderbuffersEXTPROC)tlsGetFunction(1738); - uintptr_t renderbuffers = (uintptr_t)renderbuffersAddress; - UNUSED_PARAM(clazz) - glGenRenderbuffersEXT(n, renderbuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glRenderbufferStorageEXT(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint width, jint height) { - glRenderbufferStorageEXTPROC glRenderbufferStorageEXT = (glRenderbufferStorageEXTPROC)tlsGetFunction(1739); - UNUSED_PARAM(clazz) - glRenderbufferStorageEXT(target, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGetRenderbufferParameterivEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetRenderbufferParameterivEXTPROC glGetRenderbufferParameterivEXT = (glGetRenderbufferParameterivEXTPROC)tlsGetFunction(1740); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetRenderbufferParameterivEXT(target, pname, params); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glIsFramebufferEXT(JNIEnv *__env, jclass clazz, jint framebuffer) { - glIsFramebufferEXTPROC glIsFramebufferEXT = (glIsFramebufferEXTPROC)tlsGetFunction(1741); - UNUSED_PARAM(clazz) - return glIsFramebufferEXT(framebuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glBindFramebufferEXT(JNIEnv *__env, jclass clazz, jint target, jint framebuffer) { - glBindFramebufferEXTPROC glBindFramebufferEXT = (glBindFramebufferEXTPROC)tlsGetFunction(1742); - UNUSED_PARAM(clazz) - glBindFramebufferEXT(target, framebuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglDeleteFramebuffersEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong framebuffersAddress) { - glDeleteFramebuffersEXTPROC glDeleteFramebuffersEXT = (glDeleteFramebuffersEXTPROC)tlsGetFunction(1743); - uintptr_t framebuffers = (uintptr_t)framebuffersAddress; - UNUSED_PARAM(clazz) - glDeleteFramebuffersEXT(n, framebuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGenFramebuffersEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong framebuffersAddress) { - glGenFramebuffersEXTPROC glGenFramebuffersEXT = (glGenFramebuffersEXTPROC)tlsGetFunction(1744); - uintptr_t framebuffers = (uintptr_t)framebuffersAddress; - UNUSED_PARAM(clazz) - glGenFramebuffersEXT(n, framebuffers); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glCheckFramebufferStatusEXT(JNIEnv *__env, jclass clazz, jint target) { - glCheckFramebufferStatusEXTPROC glCheckFramebufferStatusEXT = (glCheckFramebufferStatusEXTPROC)tlsGetFunction(1745); - UNUSED_PARAM(clazz) - return glCheckFramebufferStatusEXT(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glFramebufferTexture1DEXT(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level) { - glFramebufferTexture1DEXTPROC glFramebufferTexture1DEXT = (glFramebufferTexture1DEXTPROC)tlsGetFunction(1746); - UNUSED_PARAM(clazz) - glFramebufferTexture1DEXT(target, attachment, textarget, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glFramebufferTexture2DEXT(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level) { - glFramebufferTexture2DEXTPROC glFramebufferTexture2DEXT = (glFramebufferTexture2DEXTPROC)tlsGetFunction(1747); - UNUSED_PARAM(clazz) - glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glFramebufferTexture3DEXT(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jint zoffset) { - glFramebufferTexture3DEXTPROC glFramebufferTexture3DEXT = (glFramebufferTexture3DEXTPROC)tlsGetFunction(1748); - UNUSED_PARAM(clazz) - glFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glFramebufferRenderbufferEXT(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { - glFramebufferRenderbufferEXTPROC glFramebufferRenderbufferEXT = (glFramebufferRenderbufferEXTPROC)tlsGetFunction(1749); - UNUSED_PARAM(clazz) - glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGetFramebufferAttachmentParameterivEXT__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint pname, jlong paramsAddress) { - glGetFramebufferAttachmentParameterivEXTPROC glGetFramebufferAttachmentParameterivEXT = (glGetFramebufferAttachmentParameterivEXTPROC)tlsGetFunction(1750); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_glGenerateMipmapEXT(JNIEnv *__env, jclass clazz, jint target) { - glGenerateMipmapEXTPROC glGenerateMipmapEXT = (glGenerateMipmapEXTPROC)tlsGetFunction(1751); - UNUSED_PARAM(clazz) - glGenerateMipmapEXT(target); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGPUProgramParameters.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGPUProgramParameters.c deleted file mode 100644 index 84826d0e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGPUProgramParameters.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glProgramEnvParameters4fvEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramLocalParameters4fvEXTPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUProgramParameters_nglProgramEnvParameters4fvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jint count, jlong paramsAddress) { - glProgramEnvParameters4fvEXTPROC glProgramEnvParameters4fvEXT = (glProgramEnvParameters4fvEXTPROC)tlsGetFunction(1756); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glProgramEnvParameters4fvEXT(target, index, count, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUProgramParameters_nglProgramLocalParameters4fvEXT__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jint count, jlong paramsAddress) { - glProgramLocalParameters4fvEXTPROC glProgramLocalParameters4fvEXT = (glProgramLocalParameters4fvEXTPROC)tlsGetFunction(1757); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glProgramLocalParameters4fvEXT(target, index, count, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGPUShader4.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGPUShader4.c deleted file mode 100644 index 42869799..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGPUShader4.c +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexAttribI1iEXTPROC) (jint, jint); -typedef void (APIENTRY *glVertexAttribI2iEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI3iEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI4iEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI1uiEXTPROC) (jint, jint); -typedef void (APIENTRY *glVertexAttribI2uiEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI3uiEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI4uiEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI1ivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI2ivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI3ivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4ivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI1uivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI2uivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI3uivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4uivEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4bvEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4svEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4ubvEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4usvEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribIPointerEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribIivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribIuivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformuivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glBindFragDataLocationEXTPROC) (jint, jint, uintptr_t); -typedef jint (APIENTRY *glGetFragDataLocationEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glUniform1uiEXTPROC) (jint, jint); -typedef void (APIENTRY *glUniform2uiEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glUniform3uiEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glUniform4uiEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glUniform1uivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2uivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3uivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4uivEXTPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI1iEXT(JNIEnv *__env, jclass clazz, jint index, jint x) { - glVertexAttribI1iEXTPROC glVertexAttribI1iEXT = (glVertexAttribI1iEXTPROC)tlsGetFunction(1758); - UNUSED_PARAM(clazz) - glVertexAttribI1iEXT(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI2iEXT(JNIEnv *__env, jclass clazz, jint index, jint x, jint y) { - glVertexAttribI2iEXTPROC glVertexAttribI2iEXT = (glVertexAttribI2iEXTPROC)tlsGetFunction(1759); - UNUSED_PARAM(clazz) - glVertexAttribI2iEXT(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI3iEXT(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z) { - glVertexAttribI3iEXTPROC glVertexAttribI3iEXT = (glVertexAttribI3iEXTPROC)tlsGetFunction(1760); - UNUSED_PARAM(clazz) - glVertexAttribI3iEXT(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI4iEXT(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z, jint w) { - glVertexAttribI4iEXTPROC glVertexAttribI4iEXT = (glVertexAttribI4iEXTPROC)tlsGetFunction(1761); - UNUSED_PARAM(clazz) - glVertexAttribI4iEXT(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI1uiEXT(JNIEnv *__env, jclass clazz, jint index, jint x) { - glVertexAttribI1uiEXTPROC glVertexAttribI1uiEXT = (glVertexAttribI1uiEXTPROC)tlsGetFunction(1762); - UNUSED_PARAM(clazz) - glVertexAttribI1uiEXT(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI2uiEXT(JNIEnv *__env, jclass clazz, jint index, jint x, jint y) { - glVertexAttribI2uiEXTPROC glVertexAttribI2uiEXT = (glVertexAttribI2uiEXTPROC)tlsGetFunction(1763); - UNUSED_PARAM(clazz) - glVertexAttribI2uiEXT(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI3uiEXT(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z) { - glVertexAttribI3uiEXTPROC glVertexAttribI3uiEXT = (glVertexAttribI3uiEXTPROC)tlsGetFunction(1764); - UNUSED_PARAM(clazz) - glVertexAttribI3uiEXT(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glVertexAttribI4uiEXT(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z, jint w) { - glVertexAttribI4uiEXTPROC glVertexAttribI4uiEXT = (glVertexAttribI4uiEXTPROC)tlsGetFunction(1765); - UNUSED_PARAM(clazz) - glVertexAttribI4uiEXT(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI1ivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI1ivEXTPROC glVertexAttribI1ivEXT = (glVertexAttribI1ivEXTPROC)tlsGetFunction(1766); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI1ivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI2ivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI2ivEXTPROC glVertexAttribI2ivEXT = (glVertexAttribI2ivEXTPROC)tlsGetFunction(1767); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI2ivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI3ivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI3ivEXTPROC glVertexAttribI3ivEXT = (glVertexAttribI3ivEXTPROC)tlsGetFunction(1768); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI3ivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI4ivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4ivEXTPROC glVertexAttribI4ivEXT = (glVertexAttribI4ivEXTPROC)tlsGetFunction(1769); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4ivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI1uivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI1uivEXTPROC glVertexAttribI1uivEXT = (glVertexAttribI1uivEXTPROC)tlsGetFunction(1770); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI1uivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI2uivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI2uivEXTPROC glVertexAttribI2uivEXT = (glVertexAttribI2uivEXTPROC)tlsGetFunction(1771); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI2uivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI3uivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI3uivEXTPROC glVertexAttribI3uivEXT = (glVertexAttribI3uivEXTPROC)tlsGetFunction(1772); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI3uivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI4uivEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4uivEXTPROC glVertexAttribI4uivEXT = (glVertexAttribI4uivEXTPROC)tlsGetFunction(1773); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4uivEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI4bvEXT(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4bvEXTPROC glVertexAttribI4bvEXT = (glVertexAttribI4bvEXTPROC)tlsGetFunction(1774); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4bvEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI4svEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4svEXTPROC glVertexAttribI4svEXT = (glVertexAttribI4svEXTPROC)tlsGetFunction(1775); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4svEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI4ubvEXT(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4ubvEXTPROC glVertexAttribI4ubvEXT = (glVertexAttribI4ubvEXTPROC)tlsGetFunction(1776); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4ubvEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribI4usvEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4usvEXTPROC glVertexAttribI4usvEXT = (glVertexAttribI4usvEXTPROC)tlsGetFunction(1777); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4usvEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglVertexAttribIPointerEXT__IIIIJ(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointerAddress) { - glVertexAttribIPointerEXTPROC glVertexAttribIPointerEXT = (glVertexAttribIPointerEXTPROC)tlsGetFunction(1778); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexAttribIPointerEXT(index, size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglGetVertexAttribIivEXT__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribIivEXTPROC glGetVertexAttribIivEXT = (glGetVertexAttribIivEXTPROC)tlsGetFunction(1779); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribIivEXT(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglGetVertexAttribIuivEXT__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribIuivEXTPROC glGetVertexAttribIuivEXT = (glGetVertexAttribIuivEXTPROC)tlsGetFunction(1780); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribIuivEXT(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglGetUniformuivEXT__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformuivEXTPROC glGetUniformuivEXT = (glGetUniformuivEXTPROC)tlsGetFunction(1781); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformuivEXT(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglBindFragDataLocationEXT(JNIEnv *__env, jclass clazz, jint program, jint color, jlong nameAddress) { - glBindFragDataLocationEXTPROC glBindFragDataLocationEXT = (glBindFragDataLocationEXTPROC)tlsGetFunction(1782); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glBindFragDataLocationEXT(program, color, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglGetFragDataLocationEXT(JNIEnv *__env, jclass clazz, jint program, jlong nameAddress) { - glGetFragDataLocationEXTPROC glGetFragDataLocationEXT = (glGetFragDataLocationEXTPROC)tlsGetFunction(1783); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetFragDataLocationEXT(program, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glUniform1uiEXT(JNIEnv *__env, jclass clazz, jint location, jint v0) { - glUniform1uiEXTPROC glUniform1uiEXT = (glUniform1uiEXTPROC)tlsGetFunction(1784); - UNUSED_PARAM(clazz) - glUniform1uiEXT(location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glUniform2uiEXT(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1) { - glUniform2uiEXTPROC glUniform2uiEXT = (glUniform2uiEXTPROC)tlsGetFunction(1785); - UNUSED_PARAM(clazz) - glUniform2uiEXT(location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glUniform3uiEXT(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2) { - glUniform3uiEXTPROC glUniform3uiEXT = (glUniform3uiEXTPROC)tlsGetFunction(1786); - UNUSED_PARAM(clazz) - glUniform3uiEXT(location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_glUniform4uiEXT(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3) { - glUniform4uiEXTPROC glUniform4uiEXT = (glUniform4uiEXTPROC)tlsGetFunction(1787); - UNUSED_PARAM(clazz) - glUniform4uiEXT(location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglUniform1uivEXT__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1uivEXTPROC glUniform1uivEXT = (glUniform1uivEXTPROC)tlsGetFunction(1788); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1uivEXT(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglUniform2uivEXT__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2uivEXTPROC glUniform2uivEXT = (glUniform2uivEXTPROC)tlsGetFunction(1789); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2uivEXT(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglUniform3uivEXT__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3uivEXTPROC glUniform3uivEXT = (glUniform3uivEXTPROC)tlsGetFunction(1790); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3uivEXT(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGPUShader4_nglUniform4uivEXT__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4uivEXTPROC glUniform4uivEXT = (glUniform4uivEXTPROC)tlsGetFunction(1791); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4uivEXT(location, count, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGeometryShader4.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGeometryShader4.c deleted file mode 100644 index 062916e7..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTGeometryShader4.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glProgramParameteriEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glFramebufferTextureEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTextureFaceEXTPROC) (jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGeometryShader4_glProgramParameteriEXT(JNIEnv *__env, jclass clazz, jint program, jint pname, jint value) { - glProgramParameteriEXTPROC glProgramParameteriEXT = (glProgramParameteriEXTPROC)tlsGetFunction(1752); - UNUSED_PARAM(clazz) - glProgramParameteriEXT(program, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGeometryShader4_glFramebufferTextureEXT(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level) { - glFramebufferTextureEXTPROC glFramebufferTextureEXT = (glFramebufferTextureEXTPROC)tlsGetFunction(1753); - UNUSED_PARAM(clazz) - glFramebufferTextureEXT(target, attachment, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGeometryShader4_glFramebufferTextureFaceEXT(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint face) { - glFramebufferTextureFaceEXTPROC glFramebufferTextureFaceEXT = (glFramebufferTextureFaceEXTPROC)tlsGetFunction(1755); - UNUSED_PARAM(clazz) - glFramebufferTextureFaceEXT(target, attachment, texture, level, face); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObject.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObject.c deleted file mode 100644 index 0f71840f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObject.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetUnsignedBytevEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetUnsignedBytei_vEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glDeleteMemoryObjectsEXTPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsMemoryObjectEXTPROC) (jint); -typedef void (APIENTRY *glCreateMemoryObjectsEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMemoryObjectParameterivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMemoryObjectParameterivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexStorageMem2DEXTPROC) (jint, jint, jint, jint, jint, jint, jlong); -typedef void (APIENTRY *glTexStorageMem2DMultisampleEXTPROC) (jint, jint, jint, jint, jint, jboolean, jint, jlong); -typedef void (APIENTRY *glTexStorageMem3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jlong); -typedef void (APIENTRY *glTexStorageMem3DMultisampleEXTPROC) (jint, jint, jint, jint, jint, jint, jboolean, jint, jlong); -typedef void (APIENTRY *glBufferStorageMemEXTPROC) (jint, uintptr_t, jint, jlong); -typedef void (APIENTRY *glTextureStorageMem2DEXTPROC) (jint, jint, jint, jint, jint, jint, jlong); -typedef void (APIENTRY *glTextureStorageMem2DMultisampleEXTPROC) (jint, jint, jint, jint, jint, jboolean, jint, jlong); -typedef void (APIENTRY *glTextureStorageMem3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint, jlong); -typedef void (APIENTRY *glTextureStorageMem3DMultisampleEXTPROC) (jint, jint, jint, jint, jint, jint, jboolean, jint, jlong); -typedef void (APIENTRY *glNamedBufferStorageMemEXTPROC) (jint, uintptr_t, jint, jlong); -typedef void (APIENTRY *glTexStorageMem1DEXTPROC) (jint, jint, jint, jint, jint, jlong); -typedef void (APIENTRY *glTextureStorageMem1DEXTPROC) (jint, jint, jint, jint, jint, jlong); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_nglGetUnsignedBytevEXT(JNIEnv *__env, jclass clazz, jint pname, jlong dataAddress) { - glGetUnsignedBytevEXTPROC glGetUnsignedBytevEXT = (glGetUnsignedBytevEXTPROC)tlsGetFunction(1792); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetUnsignedBytevEXT(pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_nglGetUnsignedBytei_1vEXT(JNIEnv *__env, jclass clazz, jint target, jint index, jlong dataAddress) { - glGetUnsignedBytei_vEXTPROC glGetUnsignedBytei_vEXT = (glGetUnsignedBytei_vEXTPROC)tlsGetFunction(1793); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetUnsignedBytei_vEXT(target, index, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_nglDeleteMemoryObjectsEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong memoryObjectsAddress) { - glDeleteMemoryObjectsEXTPROC glDeleteMemoryObjectsEXT = (glDeleteMemoryObjectsEXTPROC)tlsGetFunction(1794); - uintptr_t memoryObjects = (uintptr_t)memoryObjectsAddress; - UNUSED_PARAM(clazz) - glDeleteMemoryObjectsEXT(n, memoryObjects); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glIsMemoryObjectEXT(JNIEnv *__env, jclass clazz, jint memoryObject) { - glIsMemoryObjectEXTPROC glIsMemoryObjectEXT = (glIsMemoryObjectEXTPROC)tlsGetFunction(1795); - UNUSED_PARAM(clazz) - return glIsMemoryObjectEXT(memoryObject); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_nglCreateMemoryObjectsEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong memoryObjectsAddress) { - glCreateMemoryObjectsEXTPROC glCreateMemoryObjectsEXT = (glCreateMemoryObjectsEXTPROC)tlsGetFunction(1796); - uintptr_t memoryObjects = (uintptr_t)memoryObjectsAddress; - UNUSED_PARAM(clazz) - glCreateMemoryObjectsEXT(n, memoryObjects); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_nglMemoryObjectParameterivEXT__IIJ(JNIEnv *__env, jclass clazz, jint memoryObject, jint pname, jlong paramsAddress) { - glMemoryObjectParameterivEXTPROC glMemoryObjectParameterivEXT = (glMemoryObjectParameterivEXTPROC)tlsGetFunction(1797); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMemoryObjectParameterivEXT(memoryObject, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_nglGetMemoryObjectParameterivEXT__IIJ(JNIEnv *__env, jclass clazz, jint memoryObject, jint pname, jlong paramsAddress) { - glGetMemoryObjectParameterivEXTPROC glGetMemoryObjectParameterivEXT = (glGetMemoryObjectParameterivEXTPROC)tlsGetFunction(1798); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMemoryObjectParameterivEXT(memoryObject, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTexStorageMem2DEXT(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalFormat, jint width, jint height, jint memory, jlong offset) { - glTexStorageMem2DEXTPROC glTexStorageMem2DEXT = (glTexStorageMem2DEXTPROC)tlsGetFunction(1799); - UNUSED_PARAM(clazz) - glTexStorageMem2DEXT(target, levels, internalFormat, width, height, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTexStorageMem2DMultisampleEXT(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations, jint memory, jlong offset) { - glTexStorageMem2DMultisampleEXTPROC glTexStorageMem2DMultisampleEXT = (glTexStorageMem2DMultisampleEXTPROC)tlsGetFunction(1800); - UNUSED_PARAM(clazz) - glTexStorageMem2DMultisampleEXT(target, samples, internalFormat, width, height, fixedSampleLocations, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTexStorageMem3DEXT(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalFormat, jint width, jint height, jint depth, jint memory, jlong offset) { - glTexStorageMem3DEXTPROC glTexStorageMem3DEXT = (glTexStorageMem3DEXTPROC)tlsGetFunction(1801); - UNUSED_PARAM(clazz) - glTexStorageMem3DEXT(target, levels, internalFormat, width, height, depth, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTexStorageMem3DMultisampleEXT(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations, jint memory, jlong offset) { - glTexStorageMem3DMultisampleEXTPROC glTexStorageMem3DMultisampleEXT = (glTexStorageMem3DMultisampleEXTPROC)tlsGetFunction(1802); - UNUSED_PARAM(clazz) - glTexStorageMem3DMultisampleEXT(target, samples, internalFormat, width, height, depth, fixedSampleLocations, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glBufferStorageMemEXT(JNIEnv *__env, jclass clazz, jint target, jlong size, jint memory, jlong offset) { - glBufferStorageMemEXTPROC glBufferStorageMemEXT = (glBufferStorageMemEXTPROC)tlsGetFunction(1803); - UNUSED_PARAM(clazz) - glBufferStorageMemEXT(target, (uintptr_t)size, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTextureStorageMem2DEXT(JNIEnv *__env, jclass clazz, jint texture, jint levels, jint internalFormat, jint width, jint height, jint memory, jlong offset) { - glTextureStorageMem2DEXTPROC glTextureStorageMem2DEXT = (glTextureStorageMem2DEXTPROC)tlsGetFunction(1804); - UNUSED_PARAM(clazz) - glTextureStorageMem2DEXT(texture, levels, internalFormat, width, height, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTextureStorageMem2DMultisampleEXT(JNIEnv *__env, jclass clazz, jint texture, jint samples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations, jint memory, jlong offset) { - glTextureStorageMem2DMultisampleEXTPROC glTextureStorageMem2DMultisampleEXT = (glTextureStorageMem2DMultisampleEXTPROC)tlsGetFunction(1805); - UNUSED_PARAM(clazz) - glTextureStorageMem2DMultisampleEXT(texture, samples, internalFormat, width, height, fixedSampleLocations, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTextureStorageMem3DEXT(JNIEnv *__env, jclass clazz, jint texture, jint levels, jint internalFormat, jint width, jint height, jint depth, jint memory, jlong offset) { - glTextureStorageMem3DEXTPROC glTextureStorageMem3DEXT = (glTextureStorageMem3DEXTPROC)tlsGetFunction(1806); - UNUSED_PARAM(clazz) - glTextureStorageMem3DEXT(texture, levels, internalFormat, width, height, depth, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTextureStorageMem3DMultisampleEXT(JNIEnv *__env, jclass clazz, jint texture, jint samples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations, jint memory, jlong offset) { - glTextureStorageMem3DMultisampleEXTPROC glTextureStorageMem3DMultisampleEXT = (glTextureStorageMem3DMultisampleEXTPROC)tlsGetFunction(1807); - UNUSED_PARAM(clazz) - glTextureStorageMem3DMultisampleEXT(texture, samples, internalFormat, width, height, depth, fixedSampleLocations, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glNamedBufferStorageMemEXT(JNIEnv *__env, jclass clazz, jint buffer, jlong size, jint memory, jlong offset) { - glNamedBufferStorageMemEXTPROC glNamedBufferStorageMemEXT = (glNamedBufferStorageMemEXTPROC)tlsGetFunction(1808); - UNUSED_PARAM(clazz) - glNamedBufferStorageMemEXT(buffer, (uintptr_t)size, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTexStorageMem1DEXT(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalFormat, jint width, jint memory, jlong offset) { - glTexStorageMem1DEXTPROC glTexStorageMem1DEXT = (glTexStorageMem1DEXTPROC)tlsGetFunction(1809); - UNUSED_PARAM(clazz) - glTexStorageMem1DEXT(target, levels, internalFormat, width, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObject_glTextureStorageMem1DEXT(JNIEnv *__env, jclass clazz, jint texture, jint levels, jint internalFormat, jint width, jint memory, jlong offset) { - glTextureStorageMem1DEXTPROC glTextureStorageMem1DEXT = (glTextureStorageMem1DEXTPROC)tlsGetFunction(1810); - UNUSED_PARAM(clazz) - glTextureStorageMem1DEXT(texture, levels, internalFormat, width, memory, offset); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectFD.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectFD.c deleted file mode 100644 index f5eeb1b8..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectFD.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glImportMemoryFdEXTPROC) (jint, jlong, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObjectFD_glImportMemoryFdEXT(JNIEnv *__env, jclass clazz, jint memory, jlong size, jint handleType, jint fd) { - glImportMemoryFdEXTPROC glImportMemoryFdEXT = (glImportMemoryFdEXTPROC)tlsGetFunction(1811); - UNUSED_PARAM(clazz) - glImportMemoryFdEXT(memory, size, handleType, fd); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectWin32.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectWin32.c deleted file mode 100644 index d9e84be3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTMemoryObjectWin32.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glImportMemoryWin32HandleEXTPROC) (jint, jlong, jint, uintptr_t); -typedef void (APIENTRY *glImportMemoryWin32NameEXTPROC) (jint, jlong, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObjectWin32_nglImportMemoryWin32HandleEXT(JNIEnv *__env, jclass clazz, jint memory, jlong size, jint handleType, jlong handleAddress) { - glImportMemoryWin32HandleEXTPROC glImportMemoryWin32HandleEXT = (glImportMemoryWin32HandleEXTPROC)tlsGetFunction(1812); - uintptr_t handle = (uintptr_t)handleAddress; - UNUSED_PARAM(clazz) - glImportMemoryWin32HandleEXT(memory, size, handleType, handle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMemoryObjectWin32_nglImportMemoryWin32NameEXT(JNIEnv *__env, jclass clazz, jint memory, jlong size, jint handleType, jlong nameAddress) { - glImportMemoryWin32NameEXTPROC glImportMemoryWin32NameEXT = (glImportMemoryWin32NameEXTPROC)tlsGetFunction(1813); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glImportMemoryWin32NameEXT(memory, size, handleType, name); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTPointParameters.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTPointParameters.c deleted file mode 100644 index 20dcf35a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTPointParameters.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPointParameterfEXTPROC) (jint, jfloat); -typedef void (APIENTRY *glPointParameterfvEXTPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPointParameters_glPointParameterfEXT(JNIEnv *__env, jclass clazz, jint pname, jfloat param) { - glPointParameterfEXTPROC glPointParameterfEXT = (glPointParameterfEXTPROC)tlsGetFunction(1814); - UNUSED_PARAM(clazz) - glPointParameterfEXT(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPointParameters_nglPointParameterfvEXT__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glPointParameterfvEXTPROC glPointParameterfvEXT = (glPointParameterfvEXTPROC)tlsGetFunction(1815); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glPointParameterfvEXT(pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTPolygonOffsetClamp.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTPolygonOffsetClamp.c deleted file mode 100644 index d6299e31..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTPolygonOffsetClamp.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPolygonOffsetClampEXTPROC) (jfloat, jfloat, jfloat); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPolygonOffsetClamp_glPolygonOffsetClampEXT(JNIEnv *__env, jclass clazz, jfloat factor, jfloat units, jfloat clamp) { - glPolygonOffsetClampEXTPROC glPolygonOffsetClampEXT = (glPolygonOffsetClampEXTPROC)tlsGetFunction(1816); - UNUSED_PARAM(clazz) - glPolygonOffsetClampEXT(factor, units, clamp); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTProvokingVertex.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTProvokingVertex.c deleted file mode 100644 index 1519702b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTProvokingVertex.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glProvokingVertexEXTPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTProvokingVertex_glProvokingVertexEXT(JNIEnv *__env, jclass clazz, jint mode) { - glProvokingVertexEXTPROC glProvokingVertexEXT = (glProvokingVertexEXTPROC)tlsGetFunction(1817); - UNUSED_PARAM(clazz) - glProvokingVertexEXT(mode); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTRasterMultisample.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTRasterMultisample.c deleted file mode 100644 index 1121c025..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTRasterMultisample.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glRasterSamplesEXTPROC) (jint, jboolean); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTRasterMultisample_glRasterSamplesEXT(JNIEnv *__env, jclass clazz, jint samples, jboolean fixedsamplelocations) { - glRasterSamplesEXTPROC glRasterSamplesEXT = (glRasterSamplesEXTPROC)tlsGetFunction(1818); - UNUSED_PARAM(clazz) - glRasterSamplesEXT(samples, fixedsamplelocations); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSecondaryColor.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSecondaryColor.c deleted file mode 100644 index c195d9f6..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSecondaryColor.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glSecondaryColor3bEXTPROC) (jbyte, jbyte, jbyte); -typedef void (APIENTRY *glSecondaryColor3sEXTPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glSecondaryColor3iEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glSecondaryColor3fEXTPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glSecondaryColor3dEXTPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glSecondaryColor3ubEXTPROC) (uint8_t, uint8_t, uint8_t); -typedef void (APIENTRY *glSecondaryColor3usEXTPROC) (uint16_t, uint16_t, uint16_t); -typedef void (APIENTRY *glSecondaryColor3uiEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glSecondaryColor3bvEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3svEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3ivEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3fvEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3dvEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3ubvEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3usvEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3uivEXTPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColorPointerEXTPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3bEXT(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue) { - glSecondaryColor3bEXTPROC glSecondaryColor3bEXT = (glSecondaryColor3bEXTPROC)tlsGetFunction(1819); - UNUSED_PARAM(clazz) - glSecondaryColor3bEXT(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3sEXT(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glSecondaryColor3sEXTPROC glSecondaryColor3sEXT = (glSecondaryColor3sEXTPROC)tlsGetFunction(1820); - UNUSED_PARAM(clazz) - glSecondaryColor3sEXT(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3iEXT(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue) { - glSecondaryColor3iEXTPROC glSecondaryColor3iEXT = (glSecondaryColor3iEXTPROC)tlsGetFunction(1821); - UNUSED_PARAM(clazz) - glSecondaryColor3iEXT(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3fEXT(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue) { - glSecondaryColor3fEXTPROC glSecondaryColor3fEXT = (glSecondaryColor3fEXTPROC)tlsGetFunction(1822); - UNUSED_PARAM(clazz) - glSecondaryColor3fEXT(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3dEXT(JNIEnv *__env, jclass clazz, jdouble red, jdouble green, jdouble blue) { - glSecondaryColor3dEXTPROC glSecondaryColor3dEXT = (glSecondaryColor3dEXTPROC)tlsGetFunction(1823); - UNUSED_PARAM(clazz) - glSecondaryColor3dEXT(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3ubEXT(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue) { - glSecondaryColor3ubEXTPROC glSecondaryColor3ubEXT = (glSecondaryColor3ubEXTPROC)tlsGetFunction(1824); - UNUSED_PARAM(clazz) - glSecondaryColor3ubEXT((uint8_t)red, (uint8_t)green, (uint8_t)blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3usEXT(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glSecondaryColor3usEXTPROC glSecondaryColor3usEXT = (glSecondaryColor3usEXTPROC)tlsGetFunction(1825); - UNUSED_PARAM(clazz) - glSecondaryColor3usEXT((uint16_t)red, (uint16_t)green, (uint16_t)blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3uiEXT(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue) { - glSecondaryColor3uiEXTPROC glSecondaryColor3uiEXT = (glSecondaryColor3uiEXTPROC)tlsGetFunction(1826); - UNUSED_PARAM(clazz) - glSecondaryColor3uiEXT(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3bvEXT(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3bvEXTPROC glSecondaryColor3bvEXT = (glSecondaryColor3bvEXTPROC)tlsGetFunction(1827); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3bvEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3svEXT__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3svEXTPROC glSecondaryColor3svEXT = (glSecondaryColor3svEXTPROC)tlsGetFunction(1828); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3svEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3ivEXT__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3ivEXTPROC glSecondaryColor3ivEXT = (glSecondaryColor3ivEXTPROC)tlsGetFunction(1829); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3ivEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3fvEXT__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3fvEXTPROC glSecondaryColor3fvEXT = (glSecondaryColor3fvEXTPROC)tlsGetFunction(1830); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3fvEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3dvEXT__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3dvEXTPROC glSecondaryColor3dvEXT = (glSecondaryColor3dvEXTPROC)tlsGetFunction(1831); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3dvEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3ubvEXT(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3ubvEXTPROC glSecondaryColor3ubvEXT = (glSecondaryColor3ubvEXTPROC)tlsGetFunction(1832); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3ubvEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3usvEXT__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3usvEXTPROC glSecondaryColor3usvEXT = (glSecondaryColor3usvEXTPROC)tlsGetFunction(1833); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3usvEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3uivEXT__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3uivEXTPROC glSecondaryColor3uivEXT = (glSecondaryColor3uivEXTPROC)tlsGetFunction(1834); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3uivEXT(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColorPointerEXT__IIIJ(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride, jlong pointerAddress) { - glSecondaryColorPointerEXTPROC glSecondaryColorPointerEXT = (glSecondaryColorPointerEXTPROC)tlsGetFunction(1835); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glSecondaryColorPointerEXT(size, type, stride, pointer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphore.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphore.c deleted file mode 100644 index ae60e914..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphore.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGenSemaphoresEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteSemaphoresEXTPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsSemaphoreEXTPROC) (jint); -typedef void (APIENTRY *glSemaphoreParameterui64vEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetSemaphoreParameterui64vEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glWaitSemaphoreEXTPROC) (jint, jint, uintptr_t, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glSignalSemaphoreEXTPROC) (jint, jint, uintptr_t, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphore_nglGenSemaphoresEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong semaphoresAddress) { - glGenSemaphoresEXTPROC glGenSemaphoresEXT = (glGenSemaphoresEXTPROC)tlsGetFunction(1836); - uintptr_t semaphores = (uintptr_t)semaphoresAddress; - UNUSED_PARAM(clazz) - glGenSemaphoresEXT(n, semaphores); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphore_nglDeleteSemaphoresEXT__IJ(JNIEnv *__env, jclass clazz, jint n, jlong semaphoresAddress) { - glDeleteSemaphoresEXTPROC glDeleteSemaphoresEXT = (glDeleteSemaphoresEXTPROC)tlsGetFunction(1837); - uintptr_t semaphores = (uintptr_t)semaphoresAddress; - UNUSED_PARAM(clazz) - glDeleteSemaphoresEXT(n, semaphores); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTSemaphore_glIsSemaphoreEXT(JNIEnv *__env, jclass clazz, jint semaphore) { - glIsSemaphoreEXTPROC glIsSemaphoreEXT = (glIsSemaphoreEXTPROC)tlsGetFunction(1838); - UNUSED_PARAM(clazz) - return glIsSemaphoreEXT(semaphore); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphore_nglSemaphoreParameterui64vEXT__IIJ(JNIEnv *__env, jclass clazz, jint semaphore, jint pname, jlong paramsAddress) { - glSemaphoreParameterui64vEXTPROC glSemaphoreParameterui64vEXT = (glSemaphoreParameterui64vEXTPROC)tlsGetFunction(1839); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glSemaphoreParameterui64vEXT(semaphore, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphore_nglGetSemaphoreParameterui64vEXT__IIJ(JNIEnv *__env, jclass clazz, jint semaphore, jint pname, jlong paramsAddress) { - glGetSemaphoreParameterui64vEXTPROC glGetSemaphoreParameterui64vEXT = (glGetSemaphoreParameterui64vEXTPROC)tlsGetFunction(1840); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetSemaphoreParameterui64vEXT(semaphore, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphore_nglWaitSemaphoreEXT__IIJIJJ(JNIEnv *__env, jclass clazz, jint semaphore, jint numBufferBarriers, jlong buffersAddress, jint numTextureBarriers, jlong texturesAddress, jlong srcLayoutsAddress) { - glWaitSemaphoreEXTPROC glWaitSemaphoreEXT = (glWaitSemaphoreEXTPROC)tlsGetFunction(1841); - uintptr_t buffers = (uintptr_t)buffersAddress; - uintptr_t textures = (uintptr_t)texturesAddress; - uintptr_t srcLayouts = (uintptr_t)srcLayoutsAddress; - UNUSED_PARAM(clazz) - glWaitSemaphoreEXT(semaphore, numBufferBarriers, buffers, numTextureBarriers, textures, srcLayouts); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphore_nglSignalSemaphoreEXT__IIJIJJ(JNIEnv *__env, jclass clazz, jint semaphore, jint numBufferBarriers, jlong buffersAddress, jint numTextureBarriers, jlong texturesAddress, jlong dstLayoutsAddress) { - glSignalSemaphoreEXTPROC glSignalSemaphoreEXT = (glSignalSemaphoreEXTPROC)tlsGetFunction(1842); - uintptr_t buffers = (uintptr_t)buffersAddress; - uintptr_t textures = (uintptr_t)texturesAddress; - uintptr_t dstLayouts = (uintptr_t)dstLayoutsAddress; - UNUSED_PARAM(clazz) - glSignalSemaphoreEXT(semaphore, numBufferBarriers, buffers, numTextureBarriers, textures, dstLayouts); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreFD.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreFD.c deleted file mode 100644 index 43dc20ae..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreFD.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glImportSemaphoreFdEXTPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphoreFD_glImportSemaphoreFdEXT(JNIEnv *__env, jclass clazz, jint semaphore, jint handleType, jint fd) { - glImportSemaphoreFdEXTPROC glImportSemaphoreFdEXT = (glImportSemaphoreFdEXTPROC)tlsGetFunction(1843); - UNUSED_PARAM(clazz) - glImportSemaphoreFdEXT(semaphore, handleType, fd); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreWin32.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreWin32.c deleted file mode 100644 index f4582013..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSemaphoreWin32.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glImportSemaphoreWin32HandleEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glImportSemaphoreWin32NameEXTPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphoreWin32_nglImportSemaphoreWin32HandleEXT(JNIEnv *__env, jclass clazz, jint semaphore, jint handleType, jlong handleAddress) { - glImportSemaphoreWin32HandleEXTPROC glImportSemaphoreWin32HandleEXT = (glImportSemaphoreWin32HandleEXTPROC)tlsGetFunction(1844); - uintptr_t handle = (uintptr_t)handleAddress; - UNUSED_PARAM(clazz) - glImportSemaphoreWin32HandleEXT(semaphore, handleType, handle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSemaphoreWin32_nglImportSemaphoreWin32NameEXT(JNIEnv *__env, jclass clazz, jint semaphore, jint handleType, jlong nameAddress) { - glImportSemaphoreWin32NameEXTPROC glImportSemaphoreWin32NameEXT = (glImportSemaphoreWin32NameEXTPROC)tlsGetFunction(1845); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glImportSemaphoreWin32NameEXT(semaphore, handleType, name); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSeparateShaderObjects.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSeparateShaderObjects.c deleted file mode 100644 index 4cbd0949..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTSeparateShaderObjects.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glUseShaderProgramEXTPROC) (jint, jint); -typedef void (APIENTRY *glActiveProgramEXTPROC) (jint); -typedef jint (APIENTRY *glCreateShaderProgramEXTPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSeparateShaderObjects_glUseShaderProgramEXT(JNIEnv *__env, jclass clazz, jint type, jint program) { - glUseShaderProgramEXTPROC glUseShaderProgramEXT = (glUseShaderProgramEXTPROC)tlsGetFunction(1846); - UNUSED_PARAM(clazz) - glUseShaderProgramEXT(type, program); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSeparateShaderObjects_glActiveProgramEXT(JNIEnv *__env, jclass clazz, jint program) { - glActiveProgramEXTPROC glActiveProgramEXT = (glActiveProgramEXTPROC)tlsGetFunction(1847); - UNUSED_PARAM(clazz) - glActiveProgramEXT(program); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTSeparateShaderObjects_nglCreateShaderProgramEXT(JNIEnv *__env, jclass clazz, jint type, jlong stringAddress) { - glCreateShaderProgramEXTPROC glCreateShaderProgramEXT = (glCreateShaderProgramEXTPROC)tlsGetFunction(1848); - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - return glCreateShaderProgramEXT(type, string); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTShaderFramebufferFetchNonCoherent.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTShaderFramebufferFetchNonCoherent.c deleted file mode 100644 index 1ed2f66f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTShaderFramebufferFetchNonCoherent.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFramebufferFetchBarrierEXTPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTShaderFramebufferFetchNonCoherent_glFramebufferFetchBarrierEXT(JNIEnv *__env, jclass clazz) { - glFramebufferFetchBarrierEXTPROC glFramebufferFetchBarrierEXT = (glFramebufferFetchBarrierEXTPROC)tlsGetFunction(1849); - UNUSED_PARAM(clazz) - glFramebufferFetchBarrierEXT(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTShaderImageLoadStore.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTShaderImageLoadStore.c deleted file mode 100644 index f978863a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTShaderImageLoadStore.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBindImageTextureEXTPROC) (jint, jint, jint, jboolean, jint, jint, jint); -typedef void (APIENTRY *glMemoryBarrierEXTPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTShaderImageLoadStore_glBindImageTextureEXT(JNIEnv *__env, jclass clazz, jint index, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) { - glBindImageTextureEXTPROC glBindImageTextureEXT = (glBindImageTextureEXTPROC)tlsGetFunction(1850); - UNUSED_PARAM(clazz) - glBindImageTextureEXT(index, texture, level, layered, layer, access, format); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTShaderImageLoadStore_glMemoryBarrierEXT(JNIEnv *__env, jclass clazz, jint barriers) { - glMemoryBarrierEXTPROC glMemoryBarrierEXT = (glMemoryBarrierEXTPROC)tlsGetFunction(1851); - UNUSED_PARAM(clazz) - glMemoryBarrierEXT(barriers); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTStencilClearTag.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTStencilClearTag.c deleted file mode 100644 index 69cba70a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTStencilClearTag.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glStencilClearTagEXTPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTStencilClearTag_glStencilClearTagEXT(JNIEnv *__env, jclass clazz, jint stencilTagBits, jint stencilClearTag) { - glStencilClearTagEXTPROC glStencilClearTagEXT = (glStencilClearTagEXTPROC)tlsGetFunction(1852); - UNUSED_PARAM(clazz) - glStencilClearTagEXT(stencilTagBits, stencilClearTag); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTStencilTwoSide.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTStencilTwoSide.c deleted file mode 100644 index bace43a9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTStencilTwoSide.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glActiveStencilFaceEXTPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTStencilTwoSide_glActiveStencilFaceEXT(JNIEnv *__env, jclass clazz, jint face) { - glActiveStencilFaceEXTPROC glActiveStencilFaceEXT = (glActiveStencilFaceEXTPROC)tlsGetFunction(1853); - UNUSED_PARAM(clazz) - glActiveStencilFaceEXT(face); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureArray.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureArray.c deleted file mode 100644 index fd56528c..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureArray.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFramebufferTextureLayerEXTPROC) (jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureArray_glFramebufferTextureLayerEXT(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer) { - glFramebufferTextureLayerEXTPROC glFramebufferTextureLayerEXT = (glFramebufferTextureLayerEXTPROC)tlsGetFunction(1754); - UNUSED_PARAM(clazz) - glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureBufferObject.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureBufferObject.c deleted file mode 100644 index f968f591..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureBufferObject.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTexBufferEXTPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureBufferObject_glTexBufferEXT(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint buffer) { - glTexBufferEXTPROC glTexBufferEXT = (glTexBufferEXTPROC)tlsGetFunction(1854); - UNUSED_PARAM(clazz) - glTexBufferEXT(target, internalformat, buffer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureInteger.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureInteger.c deleted file mode 100644 index 3bc70281..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureInteger.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glClearColorIiEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glClearColorIuiEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glTexParameterIivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexParameterIuivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexParameterIivEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexParameterIuivEXTPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_glClearColorIiEXT(JNIEnv *__env, jclass clazz, jint r, jint g, jint b, jint a) { - glClearColorIiEXTPROC glClearColorIiEXT = (glClearColorIiEXTPROC)tlsGetFunction(1855); - UNUSED_PARAM(clazz) - glClearColorIiEXT(r, g, b, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_glClearColorIuiEXT(JNIEnv *__env, jclass clazz, jint r, jint g, jint b, jint a) { - glClearColorIuiEXTPROC glClearColorIuiEXT = (glClearColorIuiEXTPROC)tlsGetFunction(1856); - UNUSED_PARAM(clazz) - glClearColorIuiEXT(r, g, b, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglTexParameterIivEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexParameterIivEXTPROC glTexParameterIivEXT = (glTexParameterIivEXTPROC)tlsGetFunction(1857); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexParameterIivEXT(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglTexParameterIuivEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexParameterIuivEXTPROC glTexParameterIuivEXT = (glTexParameterIuivEXTPROC)tlsGetFunction(1858); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexParameterIuivEXT(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglGetTexParameterIivEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetTexParameterIivEXTPROC glGetTexParameterIivEXT = (glGetTexParameterIivEXTPROC)tlsGetFunction(1859); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexParameterIivEXT(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglGetTexParameterIuivEXT__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetTexParameterIuivEXTPROC glGetTexParameterIuivEXT = (glGetTexParameterIuivEXTPROC)tlsGetFunction(1860); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexParameterIuivEXT(target, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureStorage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureStorage.c deleted file mode 100644 index b5ee8d61..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTextureStorage.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTexStorage1DEXTPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glTexStorage2DEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTexStorage3DEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage1DEXTPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage2DEXTPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage3DEXTPROC) (jint, jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureStorage_glTexStorage1DEXT(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalformat, jint width) { - glTexStorage1DEXTPROC glTexStorage1DEXT = (glTexStorage1DEXTPROC)tlsGetFunction(1861); - UNUSED_PARAM(clazz) - glTexStorage1DEXT(target, levels, internalformat, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureStorage_glTexStorage2DEXT(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height) { - glTexStorage2DEXTPROC glTexStorage2DEXT = (glTexStorage2DEXTPROC)tlsGetFunction(1862); - UNUSED_PARAM(clazz) - glTexStorage2DEXT(target, levels, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureStorage_glTexStorage3DEXT(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { - glTexStorage3DEXTPROC glTexStorage3DEXT = (glTexStorage3DEXTPROC)tlsGetFunction(1863); - UNUSED_PARAM(clazz) - glTexStorage3DEXT(target, levels, internalformat, width, height, depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureStorage_glTextureStorage1DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width) { - glTextureStorage1DEXTPROC glTextureStorage1DEXT = (glTextureStorage1DEXTPROC)tlsGetFunction(1374); - UNUSED_PARAM(clazz) - glTextureStorage1DEXT(texture, target, levels, internalformat, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureStorage_glTextureStorage2DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height) { - glTextureStorage2DEXTPROC glTextureStorage2DEXT = (glTextureStorage2DEXTPROC)tlsGetFunction(1375); - UNUSED_PARAM(clazz) - glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureStorage_glTextureStorage3DEXT(JNIEnv *__env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { - glTextureStorage3DEXTPROC glTextureStorage3DEXT = (glTextureStorage3DEXTPROC)tlsGetFunction(1376); - UNUSED_PARAM(clazz) - glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTimerQuery.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTimerQuery.c deleted file mode 100644 index 5744adb5..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTimerQuery.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetQueryObjecti64vEXTPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryObjectui64vEXTPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjecti64vEXT__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjecti64vEXTPROC glGetQueryObjecti64vEXT = (glGetQueryObjecti64vEXTPROC)tlsGetFunction(1864); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjecti64vEXT(id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjectui64vEXT__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjectui64vEXTPROC glGetQueryObjectui64vEXT = (glGetQueryObjectui64vEXTPROC)tlsGetFunction(1865); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjectui64vEXT(id, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTransformFeedback.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTransformFeedback.c deleted file mode 100644 index 02b2441e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTTransformFeedback.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBindBufferRangeEXTPROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glBindBufferOffsetEXTPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glBindBufferBaseEXTPROC) (jint, jint, jint); -typedef void (APIENTRY *glBeginTransformFeedbackEXTPROC) (jint); -typedef void (APIENTRY *glEndTransformFeedbackEXTPROC) (void); -typedef void (APIENTRY *glTransformFeedbackVaryingsEXTPROC) (jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glGetTransformFeedbackVaryingEXTPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_glBindBufferRangeEXT(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong size) { - glBindBufferRangeEXTPROC glBindBufferRangeEXT = (glBindBufferRangeEXTPROC)tlsGetFunction(1866); - UNUSED_PARAM(clazz) - glBindBufferRangeEXT(target, index, buffer, (uintptr_t)offset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_glBindBufferOffsetEXT(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer, jlong offset) { - glBindBufferOffsetEXTPROC glBindBufferOffsetEXT = (glBindBufferOffsetEXTPROC)tlsGetFunction(1867); - UNUSED_PARAM(clazz) - glBindBufferOffsetEXT(target, index, buffer, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_glBindBufferBaseEXT(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer) { - glBindBufferBaseEXTPROC glBindBufferBaseEXT = (glBindBufferBaseEXTPROC)tlsGetFunction(1868); - UNUSED_PARAM(clazz) - glBindBufferBaseEXT(target, index, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_glBeginTransformFeedbackEXT(JNIEnv *__env, jclass clazz, jint primitiveMode) { - glBeginTransformFeedbackEXTPROC glBeginTransformFeedbackEXT = (glBeginTransformFeedbackEXTPROC)tlsGetFunction(1869); - UNUSED_PARAM(clazz) - glBeginTransformFeedbackEXT(primitiveMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_glEndTransformFeedbackEXT(JNIEnv *__env, jclass clazz) { - glEndTransformFeedbackEXTPROC glEndTransformFeedbackEXT = (glEndTransformFeedbackEXTPROC)tlsGetFunction(1870); - UNUSED_PARAM(clazz) - glEndTransformFeedbackEXT(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglTransformFeedbackVaryingsEXT(JNIEnv *__env, jclass clazz, jint program, jint count, jlong varyingsAddress, jint bufferMode) { - glTransformFeedbackVaryingsEXTPROC glTransformFeedbackVaryingsEXT = (glTransformFeedbackVaryingsEXTPROC)tlsGetFunction(1871); - uintptr_t varyings = (uintptr_t)varyingsAddress; - UNUSED_PARAM(clazz) - glTransformFeedbackVaryingsEXT(program, count, varyings, bufferMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglGetTransformFeedbackVaryingEXT__IIIJJJJ(JNIEnv *__env, jclass clazz, jint program, jint index, jint bufSize, jlong lengthAddress, jlong sizeAddress, jlong typeAddress, jlong nameAddress) { - glGetTransformFeedbackVaryingEXTPROC glGetTransformFeedbackVaryingEXT = (glGetTransformFeedbackVaryingEXTPROC)tlsGetFunction(1872); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t size = (uintptr_t)sizeAddress; - uintptr_t type = (uintptr_t)typeAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetTransformFeedbackVaryingEXT(program, index, bufSize, length, size, type, name); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTVertexAttrib64bit.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTVertexAttrib64bit.c deleted file mode 100644 index 547ac55a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTVertexAttrib64bit.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexAttribL1dEXTPROC) (jint, jdouble); -typedef void (APIENTRY *glVertexAttribL2dEXTPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttribL3dEXTPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttribL4dEXTPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttribL1dvEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL2dvEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL3dvEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL4dvEXTPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribLPointerEXTPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribLdvEXTPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_glVertexAttribL1dEXT(JNIEnv *__env, jclass clazz, jint index, jdouble x) { - glVertexAttribL1dEXTPROC glVertexAttribL1dEXT = (glVertexAttribL1dEXTPROC)tlsGetFunction(1873); - UNUSED_PARAM(clazz) - glVertexAttribL1dEXT(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_glVertexAttribL2dEXT(JNIEnv *__env, jclass clazz, jint index, jdouble x, jdouble y) { - glVertexAttribL2dEXTPROC glVertexAttribL2dEXT = (glVertexAttribL2dEXTPROC)tlsGetFunction(1874); - UNUSED_PARAM(clazz) - glVertexAttribL2dEXT(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_glVertexAttribL3dEXT(JNIEnv *__env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z) { - glVertexAttribL3dEXTPROC glVertexAttribL3dEXT = (glVertexAttribL3dEXTPROC)tlsGetFunction(1875); - UNUSED_PARAM(clazz) - glVertexAttribL3dEXT(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_glVertexAttribL4dEXT(JNIEnv *__env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jdouble w) { - glVertexAttribL4dEXTPROC glVertexAttribL4dEXT = (glVertexAttribL4dEXTPROC)tlsGetFunction(1876); - UNUSED_PARAM(clazz) - glVertexAttribL4dEXT(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL1dvEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL1dvEXTPROC glVertexAttribL1dvEXT = (glVertexAttribL1dvEXTPROC)tlsGetFunction(1877); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL1dvEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL2dvEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL2dvEXTPROC glVertexAttribL2dvEXT = (glVertexAttribL2dvEXTPROC)tlsGetFunction(1878); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL2dvEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL3dvEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL3dvEXTPROC glVertexAttribL3dvEXT = (glVertexAttribL3dvEXTPROC)tlsGetFunction(1879); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL3dvEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL4dvEXT__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL4dvEXTPROC glVertexAttribL4dvEXT = (glVertexAttribL4dvEXTPROC)tlsGetFunction(1880); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL4dvEXT(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribLPointerEXT(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointerAddress) { - glVertexAttribLPointerEXTPROC glVertexAttribLPointerEXT = (glVertexAttribLPointerEXTPROC)tlsGetFunction(1881); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexAttribLPointerEXT(index, size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglGetVertexAttribLdvEXT__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribLdvEXTPROC glGetVertexAttribLdvEXT = (glGetVertexAttribLdvEXTPROC)tlsGetFunction(1882); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribLdvEXT(index, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTWin32KeyedMutex.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTWin32KeyedMutex.c deleted file mode 100644 index b3ebf785..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTWin32KeyedMutex.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jboolean (APIENTRY *glAcquireKeyedMutexWin32EXTPROC) (jint, jlong, jint); -typedef jboolean (APIENTRY *glReleaseKeyedMutexWin32EXTPROC) (jint, jlong); - -EXTERN_C_ENTER - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTWin32KeyedMutex_glAcquireKeyedMutexWin32EXT(JNIEnv *__env, jclass clazz, jint memory, jlong key, jint timeout) { - glAcquireKeyedMutexWin32EXTPROC glAcquireKeyedMutexWin32EXT = (glAcquireKeyedMutexWin32EXTPROC)tlsGetFunction(1883); - UNUSED_PARAM(clazz) - return glAcquireKeyedMutexWin32EXT(memory, key, timeout); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTWin32KeyedMutex_glReleaseKeyedMutexWin32EXT(JNIEnv *__env, jclass clazz, jint memory, jlong key) { - glReleaseKeyedMutexWin32EXTPROC glReleaseKeyedMutexWin32EXT = (glReleaseKeyedMutexWin32EXTPROC)tlsGetFunction(1884); - UNUSED_PARAM(clazz) - return glReleaseKeyedMutexWin32EXT(memory, key); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTWindowRectangles.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTWindowRectangles.c deleted file mode 100644 index 78c8a011..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTWindowRectangles.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glWindowRectanglesEXTPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTWindowRectangles_nglWindowRectanglesEXT__IIJ(JNIEnv *__env, jclass clazz, jint mode, jint count, jlong boxAddress) { - glWindowRectanglesEXTPROC glWindowRectanglesEXT = (glWindowRectanglesEXTPROC)tlsGetFunction(1885); - uintptr_t box = (uintptr_t)boxAddress; - UNUSED_PARAM(clazz) - glWindowRectanglesEXT(mode, count, box); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTX11SyncObject.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTX11SyncObject.c deleted file mode 100644 index 3853fbb1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_EXTX11SyncObject.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef uintptr_t (APIENTRY *glImportSyncEXTPROC) (jint, uintptr_t, jint); - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_EXTX11SyncObject_glImportSyncEXT(JNIEnv *__env, jclass clazz, jint external_sync_type, jlong external_sync, jint flags) { - glImportSyncEXTPROC glImportSyncEXT = (glImportSyncEXTPROC)tlsGetFunction(1886); - UNUSED_PARAM(clazz) - return (jlong)glImportSyncEXT(external_sync_type, (uintptr_t)external_sync, flags); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL11.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL11.c deleted file mode 100644 index 9aea130f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL11.c +++ /dev/null @@ -1,2068 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glAccumPROC) (jint, jfloat); -typedef void (APIENTRY *glAlphaFuncPROC) (jint, jfloat); -typedef jboolean (APIENTRY *glAreTexturesResidentPROC) (jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glArrayElementPROC) (jint); -typedef void (APIENTRY *glBeginPROC) (jint); -typedef void (APIENTRY *glBitmapPROC) (jint, jint, jfloat, jfloat, jfloat, jfloat, uintptr_t); -typedef void (APIENTRY *glCallListPROC) (jint); -typedef void (APIENTRY *glCallListsPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glClearAccumPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glClearIndexPROC) (jfloat); -typedef void (APIENTRY *glClipPlanePROC) (jint, uintptr_t); -typedef void (APIENTRY *glColor3bPROC) (jbyte, jbyte, jbyte); -typedef void (APIENTRY *glColor3sPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glColor3iPROC) (jint, jint, jint); -typedef void (APIENTRY *glColor3fPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glColor3dPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glColor3ubPROC) (uint8_t, uint8_t, uint8_t); -typedef void (APIENTRY *glColor3usPROC) (uint16_t, uint16_t, uint16_t); -typedef void (APIENTRY *glColor3uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glColor3bvPROC) (uintptr_t); -typedef void (APIENTRY *glColor3svPROC) (uintptr_t); -typedef void (APIENTRY *glColor3ivPROC) (uintptr_t); -typedef void (APIENTRY *glColor3fvPROC) (uintptr_t); -typedef void (APIENTRY *glColor3dvPROC) (uintptr_t); -typedef void (APIENTRY *glColor3ubvPROC) (uintptr_t); -typedef void (APIENTRY *glColor3usvPROC) (uintptr_t); -typedef void (APIENTRY *glColor3uivPROC) (uintptr_t); -typedef void (APIENTRY *glColor4bPROC) (jbyte, jbyte, jbyte, jbyte); -typedef void (APIENTRY *glColor4sPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glColor4iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glColor4fPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glColor4dPROC) (jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glColor4ubPROC) (uint8_t, uint8_t, uint8_t, uint8_t); -typedef void (APIENTRY *glColor4usPROC) (uint16_t, uint16_t, uint16_t, uint16_t); -typedef void (APIENTRY *glColor4uiPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glColor4bvPROC) (uintptr_t); -typedef void (APIENTRY *glColor4svPROC) (uintptr_t); -typedef void (APIENTRY *glColor4ivPROC) (uintptr_t); -typedef void (APIENTRY *glColor4fvPROC) (uintptr_t); -typedef void (APIENTRY *glColor4dvPROC) (uintptr_t); -typedef void (APIENTRY *glColor4ubvPROC) (uintptr_t); -typedef void (APIENTRY *glColor4usvPROC) (uintptr_t); -typedef void (APIENTRY *glColor4uivPROC) (uintptr_t); -typedef void (APIENTRY *glColorMaterialPROC) (jint, jint); -typedef void (APIENTRY *glColorPointerPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyPixelsPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glDeleteListsPROC) (jint, jint); -typedef void (APIENTRY *glDisableClientStatePROC) (jint); -typedef void (APIENTRY *glDrawPixelsPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glEdgeFlagPROC) (jboolean); -typedef void (APIENTRY *glEdgeFlagvPROC) (uintptr_t); -typedef void (APIENTRY *glEdgeFlagPointerPROC) (jint, uintptr_t); -typedef void (APIENTRY *glEnableClientStatePROC) (jint); -typedef void (APIENTRY *glEndPROC) (void); -typedef void (APIENTRY *glEvalCoord1fPROC) (jfloat); -typedef void (APIENTRY *glEvalCoord1fvPROC) (uintptr_t); -typedef void (APIENTRY *glEvalCoord1dPROC) (jdouble); -typedef void (APIENTRY *glEvalCoord1dvPROC) (uintptr_t); -typedef void (APIENTRY *glEvalCoord2fPROC) (jfloat, jfloat); -typedef void (APIENTRY *glEvalCoord2fvPROC) (uintptr_t); -typedef void (APIENTRY *glEvalCoord2dPROC) (jdouble, jdouble); -typedef void (APIENTRY *glEvalCoord2dvPROC) (uintptr_t); -typedef void (APIENTRY *glEvalMesh1PROC) (jint, jint, jint); -typedef void (APIENTRY *glEvalMesh2PROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glEvalPoint1PROC) (jint); -typedef void (APIENTRY *glEvalPoint2PROC) (jint, jint); -typedef void (APIENTRY *glFeedbackBufferPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glFogiPROC) (jint, jint); -typedef void (APIENTRY *glFogivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glFogfPROC) (jint, jfloat); -typedef void (APIENTRY *glFogfvPROC) (jint, uintptr_t); -typedef jint (APIENTRY *glGenListsPROC) (jint); -typedef void (APIENTRY *glGetClipPlanePROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetLightivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetLightfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMapivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMapfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMapdvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMaterialivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetMaterialfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPixelMapfvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetPixelMapusvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetPixelMapuivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetPolygonStipplePROC) (uintptr_t); -typedef void (APIENTRY *glGetTexEnvivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexEnvfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexGenivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexGenfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexGendvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glIndexiPROC) (jint); -typedef void (APIENTRY *glIndexubPROC) (uint8_t); -typedef void (APIENTRY *glIndexsPROC) (jshort); -typedef void (APIENTRY *glIndexfPROC) (jfloat); -typedef void (APIENTRY *glIndexdPROC) (jdouble); -typedef void (APIENTRY *glIndexivPROC) (uintptr_t); -typedef void (APIENTRY *glIndexubvPROC) (uintptr_t); -typedef void (APIENTRY *glIndexsvPROC) (uintptr_t); -typedef void (APIENTRY *glIndexfvPROC) (uintptr_t); -typedef void (APIENTRY *glIndexdvPROC) (uintptr_t); -typedef void (APIENTRY *glIndexMaskPROC) (jint); -typedef void (APIENTRY *glIndexPointerPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glInitNamesPROC) (void); -typedef void (APIENTRY *glInterleavedArraysPROC) (jint, jint, uintptr_t); -typedef jboolean (APIENTRY *glIsListPROC) (jint); -typedef void (APIENTRY *glLightModeliPROC) (jint, jint); -typedef void (APIENTRY *glLightModelfPROC) (jint, jfloat); -typedef void (APIENTRY *glLightModelivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glLightModelfvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glLightiPROC) (jint, jint, jint); -typedef void (APIENTRY *glLightfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glLightivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glLightfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glLineStipplePROC) (jint, uint16_t); -typedef void (APIENTRY *glListBasePROC) (jint); -typedef void (APIENTRY *glLoadMatrixfPROC) (uintptr_t); -typedef void (APIENTRY *glLoadMatrixdPROC) (uintptr_t); -typedef void (APIENTRY *glLoadIdentityPROC) (void); -typedef void (APIENTRY *glLoadNamePROC) (jint); -typedef void (APIENTRY *glMap1fPROC) (jint, jfloat, jfloat, jint, jint, uintptr_t); -typedef void (APIENTRY *glMap1dPROC) (jint, jdouble, jdouble, jint, jint, uintptr_t); -typedef void (APIENTRY *glMap2fPROC) (jint, jfloat, jfloat, jint, jint, jfloat, jfloat, jint, jint, uintptr_t); -typedef void (APIENTRY *glMap2dPROC) (jint, jdouble, jdouble, jint, jint, jdouble, jdouble, jint, jint, uintptr_t); -typedef void (APIENTRY *glMapGrid1fPROC) (jint, jfloat, jfloat); -typedef void (APIENTRY *glMapGrid1dPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glMapGrid2fPROC) (jint, jfloat, jfloat, jint, jfloat, jfloat); -typedef void (APIENTRY *glMapGrid2dPROC) (jint, jdouble, jdouble, jint, jdouble, jdouble); -typedef void (APIENTRY *glMaterialiPROC) (jint, jint, jint); -typedef void (APIENTRY *glMaterialfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glMaterialivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glMaterialfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glMatrixModePROC) (jint); -typedef void (APIENTRY *glMultMatrixfPROC) (uintptr_t); -typedef void (APIENTRY *glMultMatrixdPROC) (uintptr_t); -typedef void (APIENTRY *glFrustumPROC) (jdouble, jdouble, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glNewListPROC) (jint, jint); -typedef void (APIENTRY *glEndListPROC) (void); -typedef void (APIENTRY *glNormal3fPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glNormal3bPROC) (jbyte, jbyte, jbyte); -typedef void (APIENTRY *glNormal3sPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glNormal3iPROC) (jint, jint, jint); -typedef void (APIENTRY *glNormal3dPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glNormal3fvPROC) (uintptr_t); -typedef void (APIENTRY *glNormal3bvPROC) (uintptr_t); -typedef void (APIENTRY *glNormal3svPROC) (uintptr_t); -typedef void (APIENTRY *glNormal3ivPROC) (uintptr_t); -typedef void (APIENTRY *glNormal3dvPROC) (uintptr_t); -typedef void (APIENTRY *glNormalPointerPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glOrthoPROC) (jdouble, jdouble, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glPassThroughPROC) (jfloat); -typedef void (APIENTRY *glPixelMapfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glPixelMapusvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glPixelMapuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glPixelTransferiPROC) (jint, jint); -typedef void (APIENTRY *glPixelTransferfPROC) (jint, jfloat); -typedef void (APIENTRY *glPixelZoomPROC) (jfloat, jfloat); -typedef void (APIENTRY *glPolygonStipplePROC) (uintptr_t); -typedef void (APIENTRY *glPushAttribPROC) (jint); -typedef void (APIENTRY *glPushClientAttribPROC) (jint); -typedef void (APIENTRY *glPopAttribPROC) (void); -typedef void (APIENTRY *glPopClientAttribPROC) (void); -typedef void (APIENTRY *glPopMatrixPROC) (void); -typedef void (APIENTRY *glPopNamePROC) (void); -typedef void (APIENTRY *glPrioritizeTexturesPROC) (jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glPushMatrixPROC) (void); -typedef void (APIENTRY *glPushNamePROC) (jint); -typedef void (APIENTRY *glRasterPos2iPROC) (jint, jint); -typedef void (APIENTRY *glRasterPos2sPROC) (jshort, jshort); -typedef void (APIENTRY *glRasterPos2fPROC) (jfloat, jfloat); -typedef void (APIENTRY *glRasterPos2dPROC) (jdouble, jdouble); -typedef void (APIENTRY *glRasterPos2ivPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos2svPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos2fvPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos2dvPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos3iPROC) (jint, jint, jint); -typedef void (APIENTRY *glRasterPos3sPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glRasterPos3fPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glRasterPos3dPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glRasterPos3ivPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos3svPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos3fvPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos3dvPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos4iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glRasterPos4sPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glRasterPos4fPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glRasterPos4dPROC) (jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glRasterPos4ivPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos4svPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos4fvPROC) (uintptr_t); -typedef void (APIENTRY *glRasterPos4dvPROC) (uintptr_t); -typedef void (APIENTRY *glRectiPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glRectsPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glRectfPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glRectdPROC) (jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glRectivPROC) (uintptr_t, uintptr_t); -typedef void (APIENTRY *glRectsvPROC) (uintptr_t, uintptr_t); -typedef void (APIENTRY *glRectfvPROC) (uintptr_t, uintptr_t); -typedef void (APIENTRY *glRectdvPROC) (uintptr_t, uintptr_t); -typedef jint (APIENTRY *glRenderModePROC) (jint); -typedef void (APIENTRY *glRotatefPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glRotatedPROC) (jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glScalefPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glScaledPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glSelectBufferPROC) (jint, uintptr_t); -typedef void (APIENTRY *glShadeModelPROC) (jint); -typedef void (APIENTRY *glTexCoord1fPROC) (jfloat); -typedef void (APIENTRY *glTexCoord1sPROC) (jshort); -typedef void (APIENTRY *glTexCoord1iPROC) (jint); -typedef void (APIENTRY *glTexCoord1dPROC) (jdouble); -typedef void (APIENTRY *glTexCoord1fvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord1svPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord1ivPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord1dvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord2fPROC) (jfloat, jfloat); -typedef void (APIENTRY *glTexCoord2sPROC) (jshort, jshort); -typedef void (APIENTRY *glTexCoord2iPROC) (jint, jint); -typedef void (APIENTRY *glTexCoord2dPROC) (jdouble, jdouble); -typedef void (APIENTRY *glTexCoord2fvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord2svPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord2ivPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord2dvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord3fPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glTexCoord3sPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glTexCoord3iPROC) (jint, jint, jint); -typedef void (APIENTRY *glTexCoord3dPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glTexCoord3fvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord3svPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord3ivPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord3dvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord4fPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glTexCoord4sPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glTexCoord4iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glTexCoord4dPROC) (jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glTexCoord4fvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord4svPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord4ivPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord4dvPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoordPointerPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTexEnviPROC) (jint, jint, jint); -typedef void (APIENTRY *glTexEnvivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexEnvfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glTexEnvfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexGeniPROC) (jint, jint, jint); -typedef void (APIENTRY *glTexGenivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexGenfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glTexGenfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexGendPROC) (jint, jint, jdouble); -typedef void (APIENTRY *glTexGendvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTranslatefPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glTranslatedPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertex2fPROC) (jfloat, jfloat); -typedef void (APIENTRY *glVertex2sPROC) (jshort, jshort); -typedef void (APIENTRY *glVertex2iPROC) (jint, jint); -typedef void (APIENTRY *glVertex2dPROC) (jdouble, jdouble); -typedef void (APIENTRY *glVertex2fvPROC) (uintptr_t); -typedef void (APIENTRY *glVertex2svPROC) (uintptr_t); -typedef void (APIENTRY *glVertex2ivPROC) (uintptr_t); -typedef void (APIENTRY *glVertex2dvPROC) (uintptr_t); -typedef void (APIENTRY *glVertex3fPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glVertex3sPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glVertex3iPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertex3dPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertex3fvPROC) (uintptr_t); -typedef void (APIENTRY *glVertex3svPROC) (uintptr_t); -typedef void (APIENTRY *glVertex3ivPROC) (uintptr_t); -typedef void (APIENTRY *glVertex3dvPROC) (uintptr_t); -typedef void (APIENTRY *glVertex4fPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glVertex4sPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glVertex4iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glVertex4dPROC) (jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertex4fvPROC) (uintptr_t); -typedef void (APIENTRY *glVertex4svPROC) (uintptr_t); -typedef void (APIENTRY *glVertex4ivPROC) (uintptr_t); -typedef void (APIENTRY *glVertex4dvPROC) (uintptr_t); -typedef void (APIENTRY *glVertexPointerPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glAccum(JNIEnv *__env, jclass clazz, jint op, jfloat value) { - glAccumPROC glAccum = (glAccumPROC)tlsGetFunction(2); - UNUSED_PARAM(clazz) - glAccum(op, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glAlphaFunc(JNIEnv *__env, jclass clazz, jint func, jfloat ref) { - glAlphaFuncPROC glAlphaFunc = (glAlphaFuncPROC)tlsGetFunction(3); - UNUSED_PARAM(clazz) - glAlphaFunc(func, ref); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11_nglAreTexturesResident__IJJ(JNIEnv *__env, jclass clazz, jint n, jlong texturesAddress, jlong residencesAddress) { - glAreTexturesResidentPROC glAreTexturesResident = (glAreTexturesResidentPROC)tlsGetFunction(4); - uintptr_t textures = (uintptr_t)texturesAddress; - uintptr_t residences = (uintptr_t)residencesAddress; - UNUSED_PARAM(clazz) - return glAreTexturesResident(n, textures, residences); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glArrayElement(JNIEnv *__env, jclass clazz, jint i) { - glArrayElementPROC glArrayElement = (glArrayElementPROC)tlsGetFunction(5); - UNUSED_PARAM(clazz) - glArrayElement(i); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glBegin(JNIEnv *__env, jclass clazz, jint mode) { - glBeginPROC glBegin = (glBeginPROC)tlsGetFunction(6); - UNUSED_PARAM(clazz) - glBegin(mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglBitmap(JNIEnv *__env, jclass clazz, jint w, jint h, jfloat xOrig, jfloat yOrig, jfloat xInc, jfloat yInc, jlong dataAddress) { - glBitmapPROC glBitmap = (glBitmapPROC)tlsGetFunction(8); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glBitmap(w, h, xOrig, yOrig, xInc, yInc, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glCallList(JNIEnv *__env, jclass clazz, jint list) { - glCallListPROC glCallList = (glCallListPROC)tlsGetFunction(10); - UNUSED_PARAM(clazz) - glCallList(list); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCallLists(JNIEnv *__env, jclass clazz, jint n, jint type, jlong listsAddress) { - glCallListsPROC glCallLists = (glCallListsPROC)tlsGetFunction(11); - uintptr_t lists = (uintptr_t)listsAddress; - UNUSED_PARAM(clazz) - glCallLists(n, type, lists); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glClearAccum(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha) { - glClearAccumPROC glClearAccum = (glClearAccumPROC)tlsGetFunction(13); - UNUSED_PARAM(clazz) - glClearAccum(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glClearIndex(JNIEnv *__env, jclass clazz, jfloat index) { - glClearIndexPROC glClearIndex = (glClearIndexPROC)tlsGetFunction(16); - UNUSED_PARAM(clazz) - glClearIndex(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglClipPlane__IJ(JNIEnv *__env, jclass clazz, jint plane, jlong equationAddress) { - glClipPlanePROC glClipPlane = (glClipPlanePROC)tlsGetFunction(18); - uintptr_t equation = (uintptr_t)equationAddress; - UNUSED_PARAM(clazz) - glClipPlane(plane, equation); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3b(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue) { - glColor3bPROC glColor3b = (glColor3bPROC)tlsGetFunction(19); - UNUSED_PARAM(clazz) - glColor3b(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3s(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glColor3sPROC glColor3s = (glColor3sPROC)tlsGetFunction(20); - UNUSED_PARAM(clazz) - glColor3s(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3i(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue) { - glColor3iPROC glColor3i = (glColor3iPROC)tlsGetFunction(21); - UNUSED_PARAM(clazz) - glColor3i(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3f(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue) { - glColor3fPROC glColor3f = (glColor3fPROC)tlsGetFunction(22); - UNUSED_PARAM(clazz) - glColor3f(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3d(JNIEnv *__env, jclass clazz, jdouble red, jdouble green, jdouble blue) { - glColor3dPROC glColor3d = (glColor3dPROC)tlsGetFunction(23); - UNUSED_PARAM(clazz) - glColor3d(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3ub(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue) { - glColor3ubPROC glColor3ub = (glColor3ubPROC)tlsGetFunction(24); - UNUSED_PARAM(clazz) - glColor3ub((uint8_t)red, (uint8_t)green, (uint8_t)blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3us(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glColor3usPROC glColor3us = (glColor3usPROC)tlsGetFunction(25); - UNUSED_PARAM(clazz) - glColor3us((uint16_t)red, (uint16_t)green, (uint16_t)blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor3ui(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue) { - glColor3uiPROC glColor3ui = (glColor3uiPROC)tlsGetFunction(26); - UNUSED_PARAM(clazz) - glColor3ui(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3bv(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3bvPROC glColor3bv = (glColor3bvPROC)tlsGetFunction(27); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3bv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3svPROC glColor3sv = (glColor3svPROC)tlsGetFunction(28); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3ivPROC glColor3iv = (glColor3ivPROC)tlsGetFunction(29); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3fvPROC glColor3fv = (glColor3fvPROC)tlsGetFunction(30); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3dvPROC glColor3dv = (glColor3dvPROC)tlsGetFunction(31); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3ubv(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3ubvPROC glColor3ubv = (glColor3ubvPROC)tlsGetFunction(32); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3ubv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3usv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3usvPROC glColor3usv = (glColor3usvPROC)tlsGetFunction(33); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3usv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3uiv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3uivPROC glColor3uiv = (glColor3uivPROC)tlsGetFunction(34); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3uiv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4b(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue, jbyte alpha) { - glColor4bPROC glColor4b = (glColor4bPROC)tlsGetFunction(35); - UNUSED_PARAM(clazz) - glColor4b(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4s(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue, jshort alpha) { - glColor4sPROC glColor4s = (glColor4sPROC)tlsGetFunction(36); - UNUSED_PARAM(clazz) - glColor4s(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4i(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue, jint alpha) { - glColor4iPROC glColor4i = (glColor4iPROC)tlsGetFunction(37); - UNUSED_PARAM(clazz) - glColor4i(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4f(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha) { - glColor4fPROC glColor4f = (glColor4fPROC)tlsGetFunction(38); - UNUSED_PARAM(clazz) - glColor4f(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4d(JNIEnv *__env, jclass clazz, jdouble red, jdouble green, jdouble blue, jdouble alpha) { - glColor4dPROC glColor4d = (glColor4dPROC)tlsGetFunction(39); - UNUSED_PARAM(clazz) - glColor4d(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4ub(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue, jbyte alpha) { - glColor4ubPROC glColor4ub = (glColor4ubPROC)tlsGetFunction(40); - UNUSED_PARAM(clazz) - glColor4ub((uint8_t)red, (uint8_t)green, (uint8_t)blue, (uint8_t)alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4us(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue, jshort alpha) { - glColor4usPROC glColor4us = (glColor4usPROC)tlsGetFunction(41); - UNUSED_PARAM(clazz) - glColor4us((uint16_t)red, (uint16_t)green, (uint16_t)blue, (uint16_t)alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColor4ui(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue, jint alpha) { - glColor4uiPROC glColor4ui = (glColor4uiPROC)tlsGetFunction(42); - UNUSED_PARAM(clazz) - glColor4ui(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4bv(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4bvPROC glColor4bv = (glColor4bvPROC)tlsGetFunction(43); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4bv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4svPROC glColor4sv = (glColor4svPROC)tlsGetFunction(44); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4ivPROC glColor4iv = (glColor4ivPROC)tlsGetFunction(45); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4fvPROC glColor4fv = (glColor4fvPROC)tlsGetFunction(46); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4dvPROC glColor4dv = (glColor4dvPROC)tlsGetFunction(47); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4ubv(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4ubvPROC glColor4ubv = (glColor4ubvPROC)tlsGetFunction(48); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4ubv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4usv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4usvPROC glColor4usv = (glColor4usvPROC)tlsGetFunction(49); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4usv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4uiv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4uivPROC glColor4uiv = (glColor4uivPROC)tlsGetFunction(50); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4uiv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glColorMaterial(JNIEnv *__env, jclass clazz, jint face, jint mode) { - glColorMaterialPROC glColorMaterial = (glColorMaterialPROC)tlsGetFunction(52); - UNUSED_PARAM(clazz) - glColorMaterial(face, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColorPointer(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride, jlong pointerAddress) { - glColorPointerPROC glColorPointer = (glColorPointerPROC)tlsGetFunction(53); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glColorPointer(size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glCopyPixels(JNIEnv *__env, jclass clazz, jint x, jint y, jint width, jint height, jint type) { - glCopyPixelsPROC glCopyPixels = (glCopyPixelsPROC)tlsGetFunction(54); - UNUSED_PARAM(clazz) - glCopyPixels(x, y, width, height, type); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glDeleteLists(JNIEnv *__env, jclass clazz, jint list, jint range) { - glDeleteListsPROC glDeleteLists = (glDeleteListsPROC)tlsGetFunction(56); - UNUSED_PARAM(clazz) - glDeleteLists(list, range); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glDisableClientState(JNIEnv *__env, jclass clazz, jint cap) { - glDisableClientStatePROC glDisableClientState = (glDisableClientStatePROC)tlsGetFunction(60); - UNUSED_PARAM(clazz) - glDisableClientState(cap); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawPixels__IIIIJ(JNIEnv *__env, jclass clazz, jint width, jint height, jint format, jint type, jlong pixelsAddress) { - glDrawPixelsPROC glDrawPixels = (glDrawPixelsPROC)tlsGetFunction(64); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glDrawPixels(width, height, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEdgeFlag(JNIEnv *__env, jclass clazz, jboolean flag) { - glEdgeFlagPROC glEdgeFlag = (glEdgeFlagPROC)tlsGetFunction(65); - UNUSED_PARAM(clazz) - glEdgeFlag(flag); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEdgeFlagv(JNIEnv *__env, jclass clazz, jlong flagAddress) { - glEdgeFlagvPROC glEdgeFlagv = (glEdgeFlagvPROC)tlsGetFunction(66); - uintptr_t flag = (uintptr_t)flagAddress; - UNUSED_PARAM(clazz) - glEdgeFlagv(flag); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEdgeFlagPointer(JNIEnv *__env, jclass clazz, jint stride, jlong pointerAddress) { - glEdgeFlagPointerPROC glEdgeFlagPointer = (glEdgeFlagPointerPROC)tlsGetFunction(67); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glEdgeFlagPointer(stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEnableClientState(JNIEnv *__env, jclass clazz, jint cap) { - glEnableClientStatePROC glEnableClientState = (glEnableClientStatePROC)tlsGetFunction(68); - UNUSED_PARAM(clazz) - glEnableClientState(cap); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEnd(JNIEnv *__env, jclass clazz) { - glEndPROC glEnd = (glEndPROC)tlsGetFunction(69); - UNUSED_PARAM(clazz) - glEnd(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalCoord1f(JNIEnv *__env, jclass clazz, jfloat u) { - glEvalCoord1fPROC glEvalCoord1f = (glEvalCoord1fPROC)tlsGetFunction(70); - UNUSED_PARAM(clazz) - glEvalCoord1f(u); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord1fv__J(JNIEnv *__env, jclass clazz, jlong uAddress) { - glEvalCoord1fvPROC glEvalCoord1fv = (glEvalCoord1fvPROC)tlsGetFunction(71); - uintptr_t u = (uintptr_t)uAddress; - UNUSED_PARAM(clazz) - glEvalCoord1fv(u); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalCoord1d(JNIEnv *__env, jclass clazz, jdouble u) { - glEvalCoord1dPROC glEvalCoord1d = (glEvalCoord1dPROC)tlsGetFunction(72); - UNUSED_PARAM(clazz) - glEvalCoord1d(u); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord1dv__J(JNIEnv *__env, jclass clazz, jlong uAddress) { - glEvalCoord1dvPROC glEvalCoord1dv = (glEvalCoord1dvPROC)tlsGetFunction(73); - uintptr_t u = (uintptr_t)uAddress; - UNUSED_PARAM(clazz) - glEvalCoord1dv(u); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalCoord2f(JNIEnv *__env, jclass clazz, jfloat u, jfloat v) { - glEvalCoord2fPROC glEvalCoord2f = (glEvalCoord2fPROC)tlsGetFunction(74); - UNUSED_PARAM(clazz) - glEvalCoord2f(u, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord2fv__J(JNIEnv *__env, jclass clazz, jlong uAddress) { - glEvalCoord2fvPROC glEvalCoord2fv = (glEvalCoord2fvPROC)tlsGetFunction(75); - uintptr_t u = (uintptr_t)uAddress; - UNUSED_PARAM(clazz) - glEvalCoord2fv(u); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalCoord2d(JNIEnv *__env, jclass clazz, jdouble u, jdouble v) { - glEvalCoord2dPROC glEvalCoord2d = (glEvalCoord2dPROC)tlsGetFunction(76); - UNUSED_PARAM(clazz) - glEvalCoord2d(u, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord2dv__J(JNIEnv *__env, jclass clazz, jlong uAddress) { - glEvalCoord2dvPROC glEvalCoord2dv = (glEvalCoord2dvPROC)tlsGetFunction(77); - uintptr_t u = (uintptr_t)uAddress; - UNUSED_PARAM(clazz) - glEvalCoord2dv(u); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalMesh1(JNIEnv *__env, jclass clazz, jint mode, jint i1, jint i2) { - glEvalMesh1PROC glEvalMesh1 = (glEvalMesh1PROC)tlsGetFunction(78); - UNUSED_PARAM(clazz) - glEvalMesh1(mode, i1, i2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalMesh2(JNIEnv *__env, jclass clazz, jint mode, jint i1, jint i2, jint j1, jint j2) { - glEvalMesh2PROC glEvalMesh2 = (glEvalMesh2PROC)tlsGetFunction(79); - UNUSED_PARAM(clazz) - glEvalMesh2(mode, i1, i2, j1, j2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalPoint1(JNIEnv *__env, jclass clazz, jint i) { - glEvalPoint1PROC glEvalPoint1 = (glEvalPoint1PROC)tlsGetFunction(80); - UNUSED_PARAM(clazz) - glEvalPoint1(i); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEvalPoint2(JNIEnv *__env, jclass clazz, jint i, jint j) { - glEvalPoint2PROC glEvalPoint2 = (glEvalPoint2PROC)tlsGetFunction(81); - UNUSED_PARAM(clazz) - glEvalPoint2(i, j); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFeedbackBuffer__IIJ(JNIEnv *__env, jclass clazz, jint size, jint type, jlong bufferAddress) { - glFeedbackBufferPROC glFeedbackBuffer = (glFeedbackBufferPROC)tlsGetFunction(82); - uintptr_t buffer = (uintptr_t)bufferAddress; - UNUSED_PARAM(clazz) - glFeedbackBuffer(size, type, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glFogi(JNIEnv *__env, jclass clazz, jint pname, jint param) { - glFogiPROC glFogi = (glFogiPROC)tlsGetFunction(85); - UNUSED_PARAM(clazz) - glFogi(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFogiv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glFogivPROC glFogiv = (glFogivPROC)tlsGetFunction(86); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glFogiv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glFogf(JNIEnv *__env, jclass clazz, jint pname, jfloat param) { - glFogfPROC glFogf = (glFogfPROC)tlsGetFunction(87); - UNUSED_PARAM(clazz) - glFogf(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFogfv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glFogfvPROC glFogfv = (glFogfvPROC)tlsGetFunction(88); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glFogfv(pname, params); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL11_glGenLists(JNIEnv *__env, jclass clazz, jint s) { - glGenListsPROC glGenLists = (glGenListsPROC)tlsGetFunction(90); - UNUSED_PARAM(clazz) - return glGenLists(s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetClipPlane__IJ(JNIEnv *__env, jclass clazz, jint plane, jlong equationAddress) { - glGetClipPlanePROC glGetClipPlane = (glGetClipPlanePROC)tlsGetFunction(93); - uintptr_t equation = (uintptr_t)equationAddress; - UNUSED_PARAM(clazz) - glGetClipPlane(plane, equation); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetLightiv__IIJ(JNIEnv *__env, jclass clazz, jint light, jint pname, jlong dataAddress) { - glGetLightivPROC glGetLightiv = (glGetLightivPROC)tlsGetFunction(99); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetLightiv(light, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetLightfv__IIJ(JNIEnv *__env, jclass clazz, jint light, jint pname, jlong dataAddress) { - glGetLightfvPROC glGetLightfv = (glGetLightfvPROC)tlsGetFunction(100); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetLightfv(light, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMapiv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jlong dataAddress) { - glGetMapivPROC glGetMapiv = (glGetMapivPROC)tlsGetFunction(101); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetMapiv(target, query, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMapfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jlong dataAddress) { - glGetMapfvPROC glGetMapfv = (glGetMapfvPROC)tlsGetFunction(102); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetMapfv(target, query, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMapdv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jlong dataAddress) { - glGetMapdvPROC glGetMapdv = (glGetMapdvPROC)tlsGetFunction(103); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetMapdv(target, query, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMaterialiv__IIJ(JNIEnv *__env, jclass clazz, jint face, jint pname, jlong dataAddress) { - glGetMaterialivPROC glGetMaterialiv = (glGetMaterialivPROC)tlsGetFunction(104); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetMaterialiv(face, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMaterialfv__IIJ(JNIEnv *__env, jclass clazz, jint face, jint pname, jlong dataAddress) { - glGetMaterialfvPROC glGetMaterialfv = (glGetMaterialfvPROC)tlsGetFunction(105); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetMaterialfv(face, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapfv__IJ(JNIEnv *__env, jclass clazz, jint map, jlong dataAddress) { - glGetPixelMapfvPROC glGetPixelMapfv = (glGetPixelMapfvPROC)tlsGetFunction(106); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetPixelMapfv(map, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapusv__IJ(JNIEnv *__env, jclass clazz, jint map, jlong dataAddress) { - glGetPixelMapusvPROC glGetPixelMapusv = (glGetPixelMapusvPROC)tlsGetFunction(107); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetPixelMapusv(map, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapuiv__IJ(JNIEnv *__env, jclass clazz, jint map, jlong dataAddress) { - glGetPixelMapuivPROC glGetPixelMapuiv = (glGetPixelMapuivPROC)tlsGetFunction(108); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetPixelMapuiv(map, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPolygonStipple(JNIEnv *__env, jclass clazz, jlong patternAddress) { - glGetPolygonStipplePROC glGetPolygonStipple = (glGetPolygonStipplePROC)tlsGetFunction(110); - uintptr_t pattern = (uintptr_t)patternAddress; - UNUSED_PARAM(clazz) - glGetPolygonStipple(pattern); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexEnviv__IIJ(JNIEnv *__env, jclass clazz, jint env, jint pname, jlong dataAddress) { - glGetTexEnvivPROC glGetTexEnviv = (glGetTexEnvivPROC)tlsGetFunction(112); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetTexEnviv(env, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexEnvfv__IIJ(JNIEnv *__env, jclass clazz, jint env, jint pname, jlong dataAddress) { - glGetTexEnvfvPROC glGetTexEnvfv = (glGetTexEnvfvPROC)tlsGetFunction(113); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetTexEnvfv(env, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexGeniv__IIJ(JNIEnv *__env, jclass clazz, jint coord, jint pname, jlong dataAddress) { - glGetTexGenivPROC glGetTexGeniv = (glGetTexGenivPROC)tlsGetFunction(114); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetTexGeniv(coord, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexGenfv__IIJ(JNIEnv *__env, jclass clazz, jint coord, jint pname, jlong dataAddress) { - glGetTexGenfvPROC glGetTexGenfv = (glGetTexGenfvPROC)tlsGetFunction(115); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetTexGenfv(coord, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexGendv__IIJ(JNIEnv *__env, jclass clazz, jint coord, jint pname, jlong dataAddress) { - glGetTexGendvPROC glGetTexGendv = (glGetTexGendvPROC)tlsGetFunction(116); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetTexGendv(coord, pname, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glIndexi(JNIEnv *__env, jclass clazz, jint index) { - glIndexiPROC glIndexi = (glIndexiPROC)tlsGetFunction(123); - UNUSED_PARAM(clazz) - glIndexi(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glIndexub(JNIEnv *__env, jclass clazz, jbyte index) { - glIndexubPROC glIndexub = (glIndexubPROC)tlsGetFunction(124); - UNUSED_PARAM(clazz) - glIndexub((uint8_t)index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glIndexs(JNIEnv *__env, jclass clazz, jshort index) { - glIndexsPROC glIndexs = (glIndexsPROC)tlsGetFunction(125); - UNUSED_PARAM(clazz) - glIndexs(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glIndexf(JNIEnv *__env, jclass clazz, jfloat index) { - glIndexfPROC glIndexf = (glIndexfPROC)tlsGetFunction(126); - UNUSED_PARAM(clazz) - glIndexf(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glIndexd(JNIEnv *__env, jclass clazz, jdouble index) { - glIndexdPROC glIndexd = (glIndexdPROC)tlsGetFunction(127); - UNUSED_PARAM(clazz) - glIndexd(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglIndexiv__J(JNIEnv *__env, jclass clazz, jlong indexAddress) { - glIndexivPROC glIndexiv = (glIndexivPROC)tlsGetFunction(128); - uintptr_t index = (uintptr_t)indexAddress; - UNUSED_PARAM(clazz) - glIndexiv(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglIndexubv(JNIEnv *__env, jclass clazz, jlong indexAddress) { - glIndexubvPROC glIndexubv = (glIndexubvPROC)tlsGetFunction(129); - uintptr_t index = (uintptr_t)indexAddress; - UNUSED_PARAM(clazz) - glIndexubv(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglIndexsv__J(JNIEnv *__env, jclass clazz, jlong indexAddress) { - glIndexsvPROC glIndexsv = (glIndexsvPROC)tlsGetFunction(130); - uintptr_t index = (uintptr_t)indexAddress; - UNUSED_PARAM(clazz) - glIndexsv(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglIndexfv__J(JNIEnv *__env, jclass clazz, jlong indexAddress) { - glIndexfvPROC glIndexfv = (glIndexfvPROC)tlsGetFunction(131); - uintptr_t index = (uintptr_t)indexAddress; - UNUSED_PARAM(clazz) - glIndexfv(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglIndexdv__J(JNIEnv *__env, jclass clazz, jlong indexAddress) { - glIndexdvPROC glIndexdv = (glIndexdvPROC)tlsGetFunction(132); - uintptr_t index = (uintptr_t)indexAddress; - UNUSED_PARAM(clazz) - glIndexdv(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glIndexMask(JNIEnv *__env, jclass clazz, jint mask) { - glIndexMaskPROC glIndexMask = (glIndexMaskPROC)tlsGetFunction(133); - UNUSED_PARAM(clazz) - glIndexMask(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglIndexPointer(JNIEnv *__env, jclass clazz, jint type, jint stride, jlong pointerAddress) { - glIndexPointerPROC glIndexPointer = (glIndexPointerPROC)tlsGetFunction(134); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glIndexPointer(type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glInitNames(JNIEnv *__env, jclass clazz) { - glInitNamesPROC glInitNames = (glInitNamesPROC)tlsGetFunction(135); - UNUSED_PARAM(clazz) - glInitNames(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglInterleavedArrays__IIJ(JNIEnv *__env, jclass clazz, jint format, jint stride, jlong pointerAddress) { - glInterleavedArraysPROC glInterleavedArrays = (glInterleavedArraysPROC)tlsGetFunction(136); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glInterleavedArrays(format, stride, pointer); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11_glIsList(JNIEnv *__env, jclass clazz, jint list) { - glIsListPROC glIsList = (glIsListPROC)tlsGetFunction(138); - UNUSED_PARAM(clazz) - return glIsList(list); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glLightModeli(JNIEnv *__env, jclass clazz, jint pname, jint param) { - glLightModeliPROC glLightModeli = (glLightModeliPROC)tlsGetFunction(140); - UNUSED_PARAM(clazz) - glLightModeli(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glLightModelf(JNIEnv *__env, jclass clazz, jint pname, jfloat param) { - glLightModelfPROC glLightModelf = (glLightModelfPROC)tlsGetFunction(141); - UNUSED_PARAM(clazz) - glLightModelf(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightModeliv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glLightModelivPROC glLightModeliv = (glLightModelivPROC)tlsGetFunction(142); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glLightModeliv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightModelfv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glLightModelfvPROC glLightModelfv = (glLightModelfvPROC)tlsGetFunction(143); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glLightModelfv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glLighti(JNIEnv *__env, jclass clazz, jint light, jint pname, jint param) { - glLightiPROC glLighti = (glLightiPROC)tlsGetFunction(144); - UNUSED_PARAM(clazz) - glLighti(light, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glLightf(JNIEnv *__env, jclass clazz, jint light, jint pname, jfloat param) { - glLightfPROC glLightf = (glLightfPROC)tlsGetFunction(145); - UNUSED_PARAM(clazz) - glLightf(light, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightiv__IIJ(JNIEnv *__env, jclass clazz, jint light, jint pname, jlong paramsAddress) { - glLightivPROC glLightiv = (glLightivPROC)tlsGetFunction(146); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glLightiv(light, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightfv__IIJ(JNIEnv *__env, jclass clazz, jint light, jint pname, jlong paramsAddress) { - glLightfvPROC glLightfv = (glLightfvPROC)tlsGetFunction(147); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glLightfv(light, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glLineStipple(JNIEnv *__env, jclass clazz, jint factor, jshort pattern) { - glLineStipplePROC glLineStipple = (glLineStipplePROC)tlsGetFunction(148); - UNUSED_PARAM(clazz) - glLineStipple(factor, (uint16_t)pattern); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glListBase(JNIEnv *__env, jclass clazz, jint base) { - glListBasePROC glListBase = (glListBasePROC)tlsGetFunction(150); - UNUSED_PARAM(clazz) - glListBase(base); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLoadMatrixf__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glLoadMatrixfPROC glLoadMatrixf = (glLoadMatrixfPROC)tlsGetFunction(151); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glLoadMatrixf(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLoadMatrixd__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glLoadMatrixdPROC glLoadMatrixd = (glLoadMatrixdPROC)tlsGetFunction(152); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glLoadMatrixd(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glLoadIdentity(JNIEnv *__env, jclass clazz) { - glLoadIdentityPROC glLoadIdentity = (glLoadIdentityPROC)tlsGetFunction(153); - UNUSED_PARAM(clazz) - glLoadIdentity(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glLoadName(JNIEnv *__env, jclass clazz, jint name) { - glLoadNamePROC glLoadName = (glLoadNamePROC)tlsGetFunction(154); - UNUSED_PARAM(clazz) - glLoadName(name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap1f__IFFIIJ(JNIEnv *__env, jclass clazz, jint target, jfloat u1, jfloat u2, jint stride, jint order, jlong pointsAddress) { - glMap1fPROC glMap1f = (glMap1fPROC)tlsGetFunction(156); - uintptr_t points = (uintptr_t)pointsAddress; - UNUSED_PARAM(clazz) - glMap1f(target, u1, u2, stride, order, points); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap1d__IDDIIJ(JNIEnv *__env, jclass clazz, jint target, jdouble u1, jdouble u2, jint stride, jint order, jlong pointsAddress) { - glMap1dPROC glMap1d = (glMap1dPROC)tlsGetFunction(157); - uintptr_t points = (uintptr_t)pointsAddress; - UNUSED_PARAM(clazz) - glMap1d(target, u1, u2, stride, order, points); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap2f__IFFIIFFIIJ(JNIEnv *__env, jclass clazz, jint target, jfloat u1, jfloat u2, jint ustride, jint uorder, jfloat v1, jfloat v2, jint vstride, jint vorder, jlong pointsAddress) { - glMap2fPROC glMap2f = (glMap2fPROC)tlsGetFunction(158); - uintptr_t points = (uintptr_t)pointsAddress; - UNUSED_PARAM(clazz) - glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap2d__IDDIIDDIIJ(JNIEnv *__env, jclass clazz, jint target, jdouble u1, jdouble u2, jint ustride, jint uorder, jdouble v1, jdouble v2, jint vstride, jint vorder, jlong pointsAddress) { - glMap2dPROC glMap2d = (glMap2dPROC)tlsGetFunction(159); - uintptr_t points = (uintptr_t)pointsAddress; - UNUSED_PARAM(clazz) - glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glMapGrid1f(JNIEnv *__env, jclass clazz, jint n, jfloat u1, jfloat u2) { - glMapGrid1fPROC glMapGrid1f = (glMapGrid1fPROC)tlsGetFunction(160); - UNUSED_PARAM(clazz) - glMapGrid1f(n, u1, u2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glMapGrid1d(JNIEnv *__env, jclass clazz, jint n, jdouble u1, jdouble u2) { - glMapGrid1dPROC glMapGrid1d = (glMapGrid1dPROC)tlsGetFunction(161); - UNUSED_PARAM(clazz) - glMapGrid1d(n, u1, u2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glMapGrid2f(JNIEnv *__env, jclass clazz, jint un, jfloat u1, jfloat u2, jint vn, jfloat v1, jfloat v2) { - glMapGrid2fPROC glMapGrid2f = (glMapGrid2fPROC)tlsGetFunction(162); - UNUSED_PARAM(clazz) - glMapGrid2f(un, u1, u2, vn, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glMapGrid2d(JNIEnv *__env, jclass clazz, jint un, jdouble u1, jdouble u2, jint vn, jdouble v1, jdouble v2) { - glMapGrid2dPROC glMapGrid2d = (glMapGrid2dPROC)tlsGetFunction(163); - UNUSED_PARAM(clazz) - glMapGrid2d(un, u1, u2, vn, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glMateriali(JNIEnv *__env, jclass clazz, jint face, jint pname, jint param) { - glMaterialiPROC glMateriali = (glMaterialiPROC)tlsGetFunction(164); - UNUSED_PARAM(clazz) - glMateriali(face, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glMaterialf(JNIEnv *__env, jclass clazz, jint face, jint pname, jfloat param) { - glMaterialfPROC glMaterialf = (glMaterialfPROC)tlsGetFunction(165); - UNUSED_PARAM(clazz) - glMaterialf(face, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMaterialiv__IIJ(JNIEnv *__env, jclass clazz, jint face, jint pname, jlong paramsAddress) { - glMaterialivPROC glMaterialiv = (glMaterialivPROC)tlsGetFunction(166); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMaterialiv(face, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMaterialfv__IIJ(JNIEnv *__env, jclass clazz, jint face, jint pname, jlong paramsAddress) { - glMaterialfvPROC glMaterialfv = (glMaterialfvPROC)tlsGetFunction(167); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMaterialfv(face, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glMatrixMode(JNIEnv *__env, jclass clazz, jint mode) { - glMatrixModePROC glMatrixMode = (glMatrixModePROC)tlsGetFunction(168); - UNUSED_PARAM(clazz) - glMatrixMode(mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMultMatrixf__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glMultMatrixfPROC glMultMatrixf = (glMultMatrixfPROC)tlsGetFunction(169); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMultMatrixf(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMultMatrixd__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glMultMatrixdPROC glMultMatrixd = (glMultMatrixdPROC)tlsGetFunction(170); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMultMatrixd(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glFrustum(JNIEnv *__env, jclass clazz, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f) { - glFrustumPROC glFrustum = (glFrustumPROC)tlsGetFunction(171); - UNUSED_PARAM(clazz) - glFrustum(l, r, b, t, n, f); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glNewList(JNIEnv *__env, jclass clazz, jint n, jint mode) { - glNewListPROC glNewList = (glNewListPROC)tlsGetFunction(172); - UNUSED_PARAM(clazz) - glNewList(n, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glEndList(JNIEnv *__env, jclass clazz) { - glEndListPROC glEndList = (glEndListPROC)tlsGetFunction(173); - UNUSED_PARAM(clazz) - glEndList(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glNormal3f(JNIEnv *__env, jclass clazz, jfloat nx, jfloat ny, jfloat nz) { - glNormal3fPROC glNormal3f = (glNormal3fPROC)tlsGetFunction(174); - UNUSED_PARAM(clazz) - glNormal3f(nx, ny, nz); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glNormal3b(JNIEnv *__env, jclass clazz, jbyte nx, jbyte ny, jbyte nz) { - glNormal3bPROC glNormal3b = (glNormal3bPROC)tlsGetFunction(175); - UNUSED_PARAM(clazz) - glNormal3b(nx, ny, nz); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glNormal3s(JNIEnv *__env, jclass clazz, jshort nx, jshort ny, jshort nz) { - glNormal3sPROC glNormal3s = (glNormal3sPROC)tlsGetFunction(176); - UNUSED_PARAM(clazz) - glNormal3s(nx, ny, nz); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glNormal3i(JNIEnv *__env, jclass clazz, jint nx, jint ny, jint nz) { - glNormal3iPROC glNormal3i = (glNormal3iPROC)tlsGetFunction(177); - UNUSED_PARAM(clazz) - glNormal3i(nx, ny, nz); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glNormal3d(JNIEnv *__env, jclass clazz, jdouble nx, jdouble ny, jdouble nz) { - glNormal3dPROC glNormal3d = (glNormal3dPROC)tlsGetFunction(178); - UNUSED_PARAM(clazz) - glNormal3d(nx, ny, nz); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glNormal3fvPROC glNormal3fv = (glNormal3fvPROC)tlsGetFunction(179); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNormal3fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3bv(JNIEnv *__env, jclass clazz, jlong vAddress) { - glNormal3bvPROC glNormal3bv = (glNormal3bvPROC)tlsGetFunction(180); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNormal3bv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glNormal3svPROC glNormal3sv = (glNormal3svPROC)tlsGetFunction(181); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNormal3sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glNormal3ivPROC glNormal3iv = (glNormal3ivPROC)tlsGetFunction(182); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNormal3iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glNormal3dvPROC glNormal3dv = (glNormal3dvPROC)tlsGetFunction(183); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNormal3dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormalPointer(JNIEnv *__env, jclass clazz, jint type, jint stride, jlong pointerAddress) { - glNormalPointerPROC glNormalPointer = (glNormalPointerPROC)tlsGetFunction(184); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glNormalPointer(type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glOrtho(JNIEnv *__env, jclass clazz, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f) { - glOrthoPROC glOrtho = (glOrthoPROC)tlsGetFunction(185); - UNUSED_PARAM(clazz) - glOrtho(l, r, b, t, n, f); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPassThrough(JNIEnv *__env, jclass clazz, jfloat token) { - glPassThroughPROC glPassThrough = (glPassThroughPROC)tlsGetFunction(186); - UNUSED_PARAM(clazz) - glPassThrough(token); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapfv__IIJ(JNIEnv *__env, jclass clazz, jint map, jint size, jlong valuesAddress) { - glPixelMapfvPROC glPixelMapfv = (glPixelMapfvPROC)tlsGetFunction(187); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glPixelMapfv(map, size, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapusv__IIJ(JNIEnv *__env, jclass clazz, jint map, jint size, jlong valuesAddress) { - glPixelMapusvPROC glPixelMapusv = (glPixelMapusvPROC)tlsGetFunction(188); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glPixelMapusv(map, size, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapuiv__IIJ(JNIEnv *__env, jclass clazz, jint map, jint size, jlong valuesAddress) { - glPixelMapuivPROC glPixelMapuiv = (glPixelMapuivPROC)tlsGetFunction(189); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glPixelMapuiv(map, size, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPixelTransferi(JNIEnv *__env, jclass clazz, jint pname, jint param) { - glPixelTransferiPROC glPixelTransferi = (glPixelTransferiPROC)tlsGetFunction(192); - UNUSED_PARAM(clazz) - glPixelTransferi(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPixelTransferf(JNIEnv *__env, jclass clazz, jint pname, jfloat param) { - glPixelTransferfPROC glPixelTransferf = (glPixelTransferfPROC)tlsGetFunction(193); - UNUSED_PARAM(clazz) - glPixelTransferf(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPixelZoom(JNIEnv *__env, jclass clazz, jfloat xfactor, jfloat yfactor) { - glPixelZoomPROC glPixelZoom = (glPixelZoomPROC)tlsGetFunction(194); - UNUSED_PARAM(clazz) - glPixelZoom(xfactor, yfactor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPolygonStipple(JNIEnv *__env, jclass clazz, jlong patternAddress) { - glPolygonStipplePROC glPolygonStipple = (glPolygonStipplePROC)tlsGetFunction(198); - uintptr_t pattern = (uintptr_t)patternAddress; - UNUSED_PARAM(clazz) - glPolygonStipple(pattern); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPushAttrib(JNIEnv *__env, jclass clazz, jint mask) { - glPushAttribPROC glPushAttrib = (glPushAttribPROC)tlsGetFunction(199); - UNUSED_PARAM(clazz) - glPushAttrib(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPushClientAttrib(JNIEnv *__env, jclass clazz, jint mask) { - glPushClientAttribPROC glPushClientAttrib = (glPushClientAttribPROC)tlsGetFunction(200); - UNUSED_PARAM(clazz) - glPushClientAttrib(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPopAttrib(JNIEnv *__env, jclass clazz) { - glPopAttribPROC glPopAttrib = (glPopAttribPROC)tlsGetFunction(201); - UNUSED_PARAM(clazz) - glPopAttrib(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPopClientAttrib(JNIEnv *__env, jclass clazz) { - glPopClientAttribPROC glPopClientAttrib = (glPopClientAttribPROC)tlsGetFunction(202); - UNUSED_PARAM(clazz) - glPopClientAttrib(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPopMatrix(JNIEnv *__env, jclass clazz) { - glPopMatrixPROC glPopMatrix = (glPopMatrixPROC)tlsGetFunction(203); - UNUSED_PARAM(clazz) - glPopMatrix(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPopName(JNIEnv *__env, jclass clazz) { - glPopNamePROC glPopName = (glPopNamePROC)tlsGetFunction(204); - UNUSED_PARAM(clazz) - glPopName(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPrioritizeTextures__IJJ(JNIEnv *__env, jclass clazz, jint n, jlong texturesAddress, jlong prioritiesAddress) { - glPrioritizeTexturesPROC glPrioritizeTextures = (glPrioritizeTexturesPROC)tlsGetFunction(205); - uintptr_t textures = (uintptr_t)texturesAddress; - uintptr_t priorities = (uintptr_t)prioritiesAddress; - UNUSED_PARAM(clazz) - glPrioritizeTextures(n, textures, priorities); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPushMatrix(JNIEnv *__env, jclass clazz) { - glPushMatrixPROC glPushMatrix = (glPushMatrixPROC)tlsGetFunction(206); - UNUSED_PARAM(clazz) - glPushMatrix(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glPushName(JNIEnv *__env, jclass clazz, jint name) { - glPushNamePROC glPushName = (glPushNamePROC)tlsGetFunction(207); - UNUSED_PARAM(clazz) - glPushName(name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos2i(JNIEnv *__env, jclass clazz, jint x, jint y) { - glRasterPos2iPROC glRasterPos2i = (glRasterPos2iPROC)tlsGetFunction(208); - UNUSED_PARAM(clazz) - glRasterPos2i(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos2s(JNIEnv *__env, jclass clazz, jshort x, jshort y) { - glRasterPos2sPROC glRasterPos2s = (glRasterPos2sPROC)tlsGetFunction(209); - UNUSED_PARAM(clazz) - glRasterPos2s(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos2f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y) { - glRasterPos2fPROC glRasterPos2f = (glRasterPos2fPROC)tlsGetFunction(210); - UNUSED_PARAM(clazz) - glRasterPos2f(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos2d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y) { - glRasterPos2dPROC glRasterPos2d = (glRasterPos2dPROC)tlsGetFunction(211); - UNUSED_PARAM(clazz) - glRasterPos2d(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos2iv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos2ivPROC glRasterPos2iv = (glRasterPos2ivPROC)tlsGetFunction(212); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos2iv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos2sv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos2svPROC glRasterPos2sv = (glRasterPos2svPROC)tlsGetFunction(213); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos2sv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos2fv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos2fvPROC glRasterPos2fv = (glRasterPos2fvPROC)tlsGetFunction(214); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos2fv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos2dv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos2dvPROC glRasterPos2dv = (glRasterPos2dvPROC)tlsGetFunction(215); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos2dv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos3i(JNIEnv *__env, jclass clazz, jint x, jint y, jint z) { - glRasterPos3iPROC glRasterPos3i = (glRasterPos3iPROC)tlsGetFunction(216); - UNUSED_PARAM(clazz) - glRasterPos3i(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos3s(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z) { - glRasterPos3sPROC glRasterPos3s = (glRasterPos3sPROC)tlsGetFunction(217); - UNUSED_PARAM(clazz) - glRasterPos3s(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos3f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z) { - glRasterPos3fPROC glRasterPos3f = (glRasterPos3fPROC)tlsGetFunction(218); - UNUSED_PARAM(clazz) - glRasterPos3f(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos3d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z) { - glRasterPos3dPROC glRasterPos3d = (glRasterPos3dPROC)tlsGetFunction(219); - UNUSED_PARAM(clazz) - glRasterPos3d(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos3iv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos3ivPROC glRasterPos3iv = (glRasterPos3ivPROC)tlsGetFunction(220); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos3iv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos3sv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos3svPROC glRasterPos3sv = (glRasterPos3svPROC)tlsGetFunction(221); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos3sv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos3fv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos3fvPROC glRasterPos3fv = (glRasterPos3fvPROC)tlsGetFunction(222); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos3fv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos3dv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos3dvPROC glRasterPos3dv = (glRasterPos3dvPROC)tlsGetFunction(223); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos3dv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos4i(JNIEnv *__env, jclass clazz, jint x, jint y, jint z, jint w) { - glRasterPos4iPROC glRasterPos4i = (glRasterPos4iPROC)tlsGetFunction(224); - UNUSED_PARAM(clazz) - glRasterPos4i(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos4s(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z, jshort w) { - glRasterPos4sPROC glRasterPos4s = (glRasterPos4sPROC)tlsGetFunction(225); - UNUSED_PARAM(clazz) - glRasterPos4s(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos4f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jfloat w) { - glRasterPos4fPROC glRasterPos4f = (glRasterPos4fPROC)tlsGetFunction(226); - UNUSED_PARAM(clazz) - glRasterPos4f(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRasterPos4d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z, jdouble w) { - glRasterPos4dPROC glRasterPos4d = (glRasterPos4dPROC)tlsGetFunction(227); - UNUSED_PARAM(clazz) - glRasterPos4d(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos4iv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos4ivPROC glRasterPos4iv = (glRasterPos4ivPROC)tlsGetFunction(228); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos4iv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos4sv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos4svPROC glRasterPos4sv = (glRasterPos4svPROC)tlsGetFunction(229); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos4sv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos4fv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos4fvPROC glRasterPos4fv = (glRasterPos4fvPROC)tlsGetFunction(230); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos4fv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos4dv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glRasterPos4dvPROC glRasterPos4dv = (glRasterPos4dvPROC)tlsGetFunction(231); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glRasterPos4dv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRecti(JNIEnv *__env, jclass clazz, jint x1, jint y1, jint x2, jint y2) { - glRectiPROC glRecti = (glRectiPROC)tlsGetFunction(234); - UNUSED_PARAM(clazz) - glRecti(x1, y1, x2, y2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRects(JNIEnv *__env, jclass clazz, jshort x1, jshort y1, jshort x2, jshort y2) { - glRectsPROC glRects = (glRectsPROC)tlsGetFunction(235); - UNUSED_PARAM(clazz) - glRects(x1, y1, x2, y2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRectf(JNIEnv *__env, jclass clazz, jfloat x1, jfloat y1, jfloat x2, jfloat y2) { - glRectfPROC glRectf = (glRectfPROC)tlsGetFunction(236); - UNUSED_PARAM(clazz) - glRectf(x1, y1, x2, y2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRectd(JNIEnv *__env, jclass clazz, jdouble x1, jdouble y1, jdouble x2, jdouble y2) { - glRectdPROC glRectd = (glRectdPROC)tlsGetFunction(237); - UNUSED_PARAM(clazz) - glRectd(x1, y1, x2, y2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRectiv__JJ(JNIEnv *__env, jclass clazz, jlong v1Address, jlong v2Address) { - glRectivPROC glRectiv = (glRectivPROC)tlsGetFunction(238); - uintptr_t v1 = (uintptr_t)v1Address; - uintptr_t v2 = (uintptr_t)v2Address; - UNUSED_PARAM(clazz) - glRectiv(v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRectsv__JJ(JNIEnv *__env, jclass clazz, jlong v1Address, jlong v2Address) { - glRectsvPROC glRectsv = (glRectsvPROC)tlsGetFunction(239); - uintptr_t v1 = (uintptr_t)v1Address; - uintptr_t v2 = (uintptr_t)v2Address; - UNUSED_PARAM(clazz) - glRectsv(v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRectfv__JJ(JNIEnv *__env, jclass clazz, jlong v1Address, jlong v2Address) { - glRectfvPROC glRectfv = (glRectfvPROC)tlsGetFunction(240); - uintptr_t v1 = (uintptr_t)v1Address; - uintptr_t v2 = (uintptr_t)v2Address; - UNUSED_PARAM(clazz) - glRectfv(v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRectdv__JJ(JNIEnv *__env, jclass clazz, jlong v1Address, jlong v2Address) { - glRectdvPROC glRectdv = (glRectdvPROC)tlsGetFunction(241); - uintptr_t v1 = (uintptr_t)v1Address; - uintptr_t v2 = (uintptr_t)v2Address; - UNUSED_PARAM(clazz) - glRectdv(v1, v2); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL11_glRenderMode(JNIEnv *__env, jclass clazz, jint mode) { - glRenderModePROC glRenderMode = (glRenderModePROC)tlsGetFunction(242); - UNUSED_PARAM(clazz) - return glRenderMode(mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRotatef(JNIEnv *__env, jclass clazz, jfloat angle, jfloat x, jfloat y, jfloat z) { - glRotatefPROC glRotatef = (glRotatefPROC)tlsGetFunction(243); - UNUSED_PARAM(clazz) - glRotatef(angle, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glRotated(JNIEnv *__env, jclass clazz, jdouble angle, jdouble x, jdouble y, jdouble z) { - glRotatedPROC glRotated = (glRotatedPROC)tlsGetFunction(244); - UNUSED_PARAM(clazz) - glRotated(angle, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glScalef(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z) { - glScalefPROC glScalef = (glScalefPROC)tlsGetFunction(245); - UNUSED_PARAM(clazz) - glScalef(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glScaled(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z) { - glScaledPROC glScaled = (glScaledPROC)tlsGetFunction(246); - UNUSED_PARAM(clazz) - glScaled(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglSelectBuffer__IJ(JNIEnv *__env, jclass clazz, jint size, jlong bufferAddress) { - glSelectBufferPROC glSelectBuffer = (glSelectBufferPROC)tlsGetFunction(248); - uintptr_t buffer = (uintptr_t)bufferAddress; - UNUSED_PARAM(clazz) - glSelectBuffer(size, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glShadeModel(JNIEnv *__env, jclass clazz, jint mode) { - glShadeModelPROC glShadeModel = (glShadeModelPROC)tlsGetFunction(249); - UNUSED_PARAM(clazz) - glShadeModel(mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord1f(JNIEnv *__env, jclass clazz, jfloat s) { - glTexCoord1fPROC glTexCoord1f = (glTexCoord1fPROC)tlsGetFunction(253); - UNUSED_PARAM(clazz) - glTexCoord1f(s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord1s(JNIEnv *__env, jclass clazz, jshort s) { - glTexCoord1sPROC glTexCoord1s = (glTexCoord1sPROC)tlsGetFunction(254); - UNUSED_PARAM(clazz) - glTexCoord1s(s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord1i(JNIEnv *__env, jclass clazz, jint s) { - glTexCoord1iPROC glTexCoord1i = (glTexCoord1iPROC)tlsGetFunction(255); - UNUSED_PARAM(clazz) - glTexCoord1i(s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord1d(JNIEnv *__env, jclass clazz, jdouble s) { - glTexCoord1dPROC glTexCoord1d = (glTexCoord1dPROC)tlsGetFunction(256); - UNUSED_PARAM(clazz) - glTexCoord1d(s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord1fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord1fvPROC glTexCoord1fv = (glTexCoord1fvPROC)tlsGetFunction(257); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord1fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord1sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord1svPROC glTexCoord1sv = (glTexCoord1svPROC)tlsGetFunction(258); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord1sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord1iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord1ivPROC glTexCoord1iv = (glTexCoord1ivPROC)tlsGetFunction(259); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord1iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord1dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord1dvPROC glTexCoord1dv = (glTexCoord1dvPROC)tlsGetFunction(260); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord1dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord2f(JNIEnv *__env, jclass clazz, jfloat s, jfloat t) { - glTexCoord2fPROC glTexCoord2f = (glTexCoord2fPROC)tlsGetFunction(261); - UNUSED_PARAM(clazz) - glTexCoord2f(s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord2s(JNIEnv *__env, jclass clazz, jshort s, jshort t) { - glTexCoord2sPROC glTexCoord2s = (glTexCoord2sPROC)tlsGetFunction(262); - UNUSED_PARAM(clazz) - glTexCoord2s(s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord2i(JNIEnv *__env, jclass clazz, jint s, jint t) { - glTexCoord2iPROC glTexCoord2i = (glTexCoord2iPROC)tlsGetFunction(263); - UNUSED_PARAM(clazz) - glTexCoord2i(s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord2d(JNIEnv *__env, jclass clazz, jdouble s, jdouble t) { - glTexCoord2dPROC glTexCoord2d = (glTexCoord2dPROC)tlsGetFunction(264); - UNUSED_PARAM(clazz) - glTexCoord2d(s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord2fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord2fvPROC glTexCoord2fv = (glTexCoord2fvPROC)tlsGetFunction(265); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord2fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord2sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord2svPROC glTexCoord2sv = (glTexCoord2svPROC)tlsGetFunction(266); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord2sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord2iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord2ivPROC glTexCoord2iv = (glTexCoord2ivPROC)tlsGetFunction(267); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord2iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord2dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord2dvPROC glTexCoord2dv = (glTexCoord2dvPROC)tlsGetFunction(268); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord2dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord3f(JNIEnv *__env, jclass clazz, jfloat s, jfloat t, jfloat r) { - glTexCoord3fPROC glTexCoord3f = (glTexCoord3fPROC)tlsGetFunction(269); - UNUSED_PARAM(clazz) - glTexCoord3f(s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord3s(JNIEnv *__env, jclass clazz, jshort s, jshort t, jshort r) { - glTexCoord3sPROC glTexCoord3s = (glTexCoord3sPROC)tlsGetFunction(270); - UNUSED_PARAM(clazz) - glTexCoord3s(s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord3i(JNIEnv *__env, jclass clazz, jint s, jint t, jint r) { - glTexCoord3iPROC glTexCoord3i = (glTexCoord3iPROC)tlsGetFunction(271); - UNUSED_PARAM(clazz) - glTexCoord3i(s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord3d(JNIEnv *__env, jclass clazz, jdouble s, jdouble t, jdouble r) { - glTexCoord3dPROC glTexCoord3d = (glTexCoord3dPROC)tlsGetFunction(272); - UNUSED_PARAM(clazz) - glTexCoord3d(s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord3fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord3fvPROC glTexCoord3fv = (glTexCoord3fvPROC)tlsGetFunction(273); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord3fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord3sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord3svPROC glTexCoord3sv = (glTexCoord3svPROC)tlsGetFunction(274); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord3sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord3iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord3ivPROC glTexCoord3iv = (glTexCoord3ivPROC)tlsGetFunction(275); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord3iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord3dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord3dvPROC glTexCoord3dv = (glTexCoord3dvPROC)tlsGetFunction(276); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord3dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord4f(JNIEnv *__env, jclass clazz, jfloat s, jfloat t, jfloat r, jfloat q) { - glTexCoord4fPROC glTexCoord4f = (glTexCoord4fPROC)tlsGetFunction(277); - UNUSED_PARAM(clazz) - glTexCoord4f(s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord4s(JNIEnv *__env, jclass clazz, jshort s, jshort t, jshort r, jshort q) { - glTexCoord4sPROC glTexCoord4s = (glTexCoord4sPROC)tlsGetFunction(278); - UNUSED_PARAM(clazz) - glTexCoord4s(s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord4i(JNIEnv *__env, jclass clazz, jint s, jint t, jint r, jint q) { - glTexCoord4iPROC glTexCoord4i = (glTexCoord4iPROC)tlsGetFunction(279); - UNUSED_PARAM(clazz) - glTexCoord4i(s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexCoord4d(JNIEnv *__env, jclass clazz, jdouble s, jdouble t, jdouble r, jdouble q) { - glTexCoord4dPROC glTexCoord4d = (glTexCoord4dPROC)tlsGetFunction(280); - UNUSED_PARAM(clazz) - glTexCoord4d(s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord4fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord4fvPROC glTexCoord4fv = (glTexCoord4fvPROC)tlsGetFunction(281); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord4fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord4sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord4svPROC glTexCoord4sv = (glTexCoord4svPROC)tlsGetFunction(282); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord4sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord4iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord4ivPROC glTexCoord4iv = (glTexCoord4ivPROC)tlsGetFunction(283); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord4iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord4dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord4dvPROC glTexCoord4dv = (glTexCoord4dvPROC)tlsGetFunction(284); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord4dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoordPointer(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride, jlong pointerAddress) { - glTexCoordPointerPROC glTexCoordPointer = (glTexCoordPointerPROC)tlsGetFunction(285); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glTexCoordPointer(size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexEnvi(JNIEnv *__env, jclass clazz, jint target, jint pname, jint param) { - glTexEnviPROC glTexEnvi = (glTexEnviPROC)tlsGetFunction(286); - UNUSED_PARAM(clazz) - glTexEnvi(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexEnviv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexEnvivPROC glTexEnviv = (glTexEnvivPROC)tlsGetFunction(287); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexEnviv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexEnvf(JNIEnv *__env, jclass clazz, jint target, jint pname, jfloat param) { - glTexEnvfPROC glTexEnvf = (glTexEnvfPROC)tlsGetFunction(288); - UNUSED_PARAM(clazz) - glTexEnvf(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexEnvfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexEnvfvPROC glTexEnvfv = (glTexEnvfvPROC)tlsGetFunction(289); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexEnvfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexGeni(JNIEnv *__env, jclass clazz, jint coord, jint pname, jint param) { - glTexGeniPROC glTexGeni = (glTexGeniPROC)tlsGetFunction(290); - UNUSED_PARAM(clazz) - glTexGeni(coord, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGeniv__IIJ(JNIEnv *__env, jclass clazz, jint coord, jint pname, jlong paramsAddress) { - glTexGenivPROC glTexGeniv = (glTexGenivPROC)tlsGetFunction(291); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexGeniv(coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexGenf(JNIEnv *__env, jclass clazz, jint coord, jint pname, jfloat param) { - glTexGenfPROC glTexGenf = (glTexGenfPROC)tlsGetFunction(292); - UNUSED_PARAM(clazz) - glTexGenf(coord, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGenfv__IIJ(JNIEnv *__env, jclass clazz, jint coord, jint pname, jlong paramsAddress) { - glTexGenfvPROC glTexGenfv = (glTexGenfvPROC)tlsGetFunction(293); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexGenfv(coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexGend(JNIEnv *__env, jclass clazz, jint coord, jint pname, jdouble param) { - glTexGendPROC glTexGend = (glTexGendPROC)tlsGetFunction(294); - UNUSED_PARAM(clazz) - glTexGend(coord, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGendv__IIJ(JNIEnv *__env, jclass clazz, jint coord, jint pname, jlong paramsAddress) { - glTexGendvPROC glTexGendv = (glTexGendvPROC)tlsGetFunction(295); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexGendv(coord, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTranslatef(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z) { - glTranslatefPROC glTranslatef = (glTranslatefPROC)tlsGetFunction(308); - UNUSED_PARAM(clazz) - glTranslatef(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTranslated(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z) { - glTranslatedPROC glTranslated = (glTranslatedPROC)tlsGetFunction(309); - UNUSED_PARAM(clazz) - glTranslated(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex2f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y) { - glVertex2fPROC glVertex2f = (glVertex2fPROC)tlsGetFunction(310); - UNUSED_PARAM(clazz) - glVertex2f(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex2s(JNIEnv *__env, jclass clazz, jshort x, jshort y) { - glVertex2sPROC glVertex2s = (glVertex2sPROC)tlsGetFunction(311); - UNUSED_PARAM(clazz) - glVertex2s(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex2i(JNIEnv *__env, jclass clazz, jint x, jint y) { - glVertex2iPROC glVertex2i = (glVertex2iPROC)tlsGetFunction(312); - UNUSED_PARAM(clazz) - glVertex2i(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex2d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y) { - glVertex2dPROC glVertex2d = (glVertex2dPROC)tlsGetFunction(313); - UNUSED_PARAM(clazz) - glVertex2d(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex2fv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex2fvPROC glVertex2fv = (glVertex2fvPROC)tlsGetFunction(314); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex2fv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex2sv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex2svPROC glVertex2sv = (glVertex2svPROC)tlsGetFunction(315); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex2sv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex2iv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex2ivPROC glVertex2iv = (glVertex2ivPROC)tlsGetFunction(316); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex2iv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex2dv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex2dvPROC glVertex2dv = (glVertex2dvPROC)tlsGetFunction(317); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex2dv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex3f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z) { - glVertex3fPROC glVertex3f = (glVertex3fPROC)tlsGetFunction(318); - UNUSED_PARAM(clazz) - glVertex3f(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex3s(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z) { - glVertex3sPROC glVertex3s = (glVertex3sPROC)tlsGetFunction(319); - UNUSED_PARAM(clazz) - glVertex3s(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex3i(JNIEnv *__env, jclass clazz, jint x, jint y, jint z) { - glVertex3iPROC glVertex3i = (glVertex3iPROC)tlsGetFunction(320); - UNUSED_PARAM(clazz) - glVertex3i(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex3d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z) { - glVertex3dPROC glVertex3d = (glVertex3dPROC)tlsGetFunction(321); - UNUSED_PARAM(clazz) - glVertex3d(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex3fv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex3fvPROC glVertex3fv = (glVertex3fvPROC)tlsGetFunction(322); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex3fv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex3sv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex3svPROC glVertex3sv = (glVertex3svPROC)tlsGetFunction(323); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex3sv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex3iv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex3ivPROC glVertex3iv = (glVertex3ivPROC)tlsGetFunction(324); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex3iv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex3dv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex3dvPROC glVertex3dv = (glVertex3dvPROC)tlsGetFunction(325); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex3dv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex4f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jfloat w) { - glVertex4fPROC glVertex4f = (glVertex4fPROC)tlsGetFunction(326); - UNUSED_PARAM(clazz) - glVertex4f(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex4s(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z, jshort w) { - glVertex4sPROC glVertex4s = (glVertex4sPROC)tlsGetFunction(327); - UNUSED_PARAM(clazz) - glVertex4s(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex4i(JNIEnv *__env, jclass clazz, jint x, jint y, jint z, jint w) { - glVertex4iPROC glVertex4i = (glVertex4iPROC)tlsGetFunction(328); - UNUSED_PARAM(clazz) - glVertex4i(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glVertex4d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z, jdouble w) { - glVertex4dPROC glVertex4d = (glVertex4dPROC)tlsGetFunction(329); - UNUSED_PARAM(clazz) - glVertex4d(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex4fv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex4fvPROC glVertex4fv = (glVertex4fvPROC)tlsGetFunction(330); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex4fv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex4sv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex4svPROC glVertex4sv = (glVertex4svPROC)tlsGetFunction(331); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex4sv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex4iv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex4ivPROC glVertex4iv = (glVertex4ivPROC)tlsGetFunction(332); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex4iv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex4dv__J(JNIEnv *__env, jclass clazz, jlong coordsAddress) { - glVertex4dvPROC glVertex4dv = (glVertex4dvPROC)tlsGetFunction(333); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glVertex4dv(coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertexPointer(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride, jlong pointerAddress) { - glVertexPointerPROC glVertexPointer = (glVertexPointerPROC)tlsGetFunction(334); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexPointer(size, type, stride, pointer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL11C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL11C.c deleted file mode 100644 index 2fa516c4..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL11C.c +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glEnablePROC) (jint); -typedef void (APIENTRY *glDisablePROC) (jint); -typedef void (APIENTRY *glBindTexturePROC) (jint, jint); -typedef void (APIENTRY *glBlendFuncPROC) (jint, jint); -typedef void (APIENTRY *glClearPROC) (jint); -typedef void (APIENTRY *glClearColorPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glClearDepthPROC) (jdouble); -typedef void (APIENTRY *glClearStencilPROC) (jint); -typedef void (APIENTRY *glColorMaskPROC) (jboolean, jboolean, jboolean, jboolean); -typedef void (APIENTRY *glCullFacePROC) (jint); -typedef void (APIENTRY *glDepthFuncPROC) (jint); -typedef void (APIENTRY *glDepthMaskPROC) (jboolean); -typedef void (APIENTRY *glDepthRangePROC) (jdouble, jdouble); -typedef void (APIENTRY *glDrawArraysPROC) (jint, jint, jint); -typedef void (APIENTRY *glDrawBufferPROC) (jint); -typedef void (APIENTRY *glDrawElementsPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glFinishPROC) (void); -typedef void (APIENTRY *glFlushPROC) (void); -typedef void (APIENTRY *glFrontFacePROC) (jint); -typedef void (APIENTRY *glGenTexturesPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteTexturesPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetBooleanvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetFloatvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetIntegervPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetDoublevPROC) (jint, uintptr_t); -typedef jint (APIENTRY *glGetErrorPROC) (void); -typedef void (APIENTRY *glGetPointervPROC) (jint, uintptr_t); -typedef uintptr_t (APIENTRY *glGetStringPROC) (jint); -typedef void (APIENTRY *glGetTexImagePROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexLevelParameterivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexLevelParameterfvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glHintPROC) (jint, jint); -typedef jboolean (APIENTRY *glIsEnabledPROC) (jint); -typedef jboolean (APIENTRY *glIsTexturePROC) (jint); -typedef void (APIENTRY *glLineWidthPROC) (jfloat); -typedef void (APIENTRY *glLogicOpPROC) (jint); -typedef void (APIENTRY *glPixelStoreiPROC) (jint, jint); -typedef void (APIENTRY *glPixelStorefPROC) (jint, jfloat); -typedef void (APIENTRY *glPointSizePROC) (jfloat); -typedef void (APIENTRY *glPolygonModePROC) (jint, jint); -typedef void (APIENTRY *glPolygonOffsetPROC) (jfloat, jfloat); -typedef void (APIENTRY *glReadBufferPROC) (jint); -typedef void (APIENTRY *glReadPixelsPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glScissorPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glStencilFuncPROC) (jint, jint, jint); -typedef void (APIENTRY *glStencilMaskPROC) (jint); -typedef void (APIENTRY *glStencilOpPROC) (jint, jint, jint); -typedef void (APIENTRY *glTexImage1DPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTexImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyTexImage1DPROC) (jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTexImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTexSubImage1DPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTexSubImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTexParameteriPROC) (jint, jint, jint); -typedef void (APIENTRY *glTexParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexParameterfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glTexParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexSubImage1DPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTexSubImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glViewportPROC) (jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glEnable(JNIEnv *__env, jclass clazz, jint target) { - glEnablePROC glEnable = (glEnablePROC)tlsGetFunction(0); - UNUSED_PARAM(clazz) - glEnable(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glDisable(JNIEnv *__env, jclass clazz, jint target) { - glDisablePROC glDisable = (glDisablePROC)tlsGetFunction(1); - UNUSED_PARAM(clazz) - glDisable(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glBindTexture(JNIEnv *__env, jclass clazz, jint target, jint texture) { - glBindTexturePROC glBindTexture = (glBindTexturePROC)tlsGetFunction(7); - UNUSED_PARAM(clazz) - glBindTexture(target, texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glBlendFunc(JNIEnv *__env, jclass clazz, jint sfactor, jint dfactor) { - glBlendFuncPROC glBlendFunc = (glBlendFuncPROC)tlsGetFunction(9); - UNUSED_PARAM(clazz) - glBlendFunc(sfactor, dfactor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glClear(JNIEnv *__env, jclass clazz, jint mask) { - glClearPROC glClear = (glClearPROC)tlsGetFunction(12); - UNUSED_PARAM(clazz) - glClear(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glClearColor(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha) { - glClearColorPROC glClearColor = (glClearColorPROC)tlsGetFunction(14); - UNUSED_PARAM(clazz) - glClearColor(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glClearDepth(JNIEnv *__env, jclass clazz, jdouble depth) { - glClearDepthPROC glClearDepth = (glClearDepthPROC)tlsGetFunction(15); - UNUSED_PARAM(clazz) - glClearDepth(depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glClearStencil(JNIEnv *__env, jclass clazz, jint s) { - glClearStencilPROC glClearStencil = (glClearStencilPROC)tlsGetFunction(17); - UNUSED_PARAM(clazz) - glClearStencil(s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glColorMask(JNIEnv *__env, jclass clazz, jboolean red, jboolean green, jboolean blue, jboolean alpha) { - glColorMaskPROC glColorMask = (glColorMaskPROC)tlsGetFunction(51); - UNUSED_PARAM(clazz) - glColorMask(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glCullFace(JNIEnv *__env, jclass clazz, jint mode) { - glCullFacePROC glCullFace = (glCullFacePROC)tlsGetFunction(55); - UNUSED_PARAM(clazz) - glCullFace(mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glDepthFunc(JNIEnv *__env, jclass clazz, jint func) { - glDepthFuncPROC glDepthFunc = (glDepthFuncPROC)tlsGetFunction(57); - UNUSED_PARAM(clazz) - glDepthFunc(func); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glDepthMask(JNIEnv *__env, jclass clazz, jboolean flag) { - glDepthMaskPROC glDepthMask = (glDepthMaskPROC)tlsGetFunction(58); - UNUSED_PARAM(clazz) - glDepthMask(flag); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glDepthRange(JNIEnv *__env, jclass clazz, jdouble zNear, jdouble zFar) { - glDepthRangePROC glDepthRange = (glDepthRangePROC)tlsGetFunction(59); - UNUSED_PARAM(clazz) - glDepthRange(zNear, zFar); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glDrawArrays(JNIEnv *__env, jclass clazz, jint mode, jint first, jint count) { - glDrawArraysPROC glDrawArrays = (glDrawArraysPROC)tlsGetFunction(61); - UNUSED_PARAM(clazz) - glDrawArrays(mode, first, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glDrawBuffer(JNIEnv *__env, jclass clazz, jint buf) { - glDrawBufferPROC glDrawBuffer = (glDrawBufferPROC)tlsGetFunction(62); - UNUSED_PARAM(clazz) - glDrawBuffer(buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglDrawElements(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress) { - glDrawElementsPROC glDrawElements = (glDrawElementsPROC)tlsGetFunction(63); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElements(mode, count, type, indices); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glFinish(JNIEnv *__env, jclass clazz) { - glFinishPROC glFinish = (glFinishPROC)tlsGetFunction(83); - UNUSED_PARAM(clazz) - glFinish(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glFlush(JNIEnv *__env, jclass clazz) { - glFlushPROC glFlush = (glFlushPROC)tlsGetFunction(84); - UNUSED_PARAM(clazz) - glFlush(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glFrontFace(JNIEnv *__env, jclass clazz, jint dir) { - glFrontFacePROC glFrontFace = (glFrontFacePROC)tlsGetFunction(89); - UNUSED_PARAM(clazz) - glFrontFace(dir); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGenTextures__IJ(JNIEnv *__env, jclass clazz, jint n, jlong texturesAddress) { - glGenTexturesPROC glGenTextures = (glGenTexturesPROC)tlsGetFunction(91); - uintptr_t textures = (uintptr_t)texturesAddress; - UNUSED_PARAM(clazz) - glGenTextures(n, textures); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglDeleteTextures__IJ(JNIEnv *__env, jclass clazz, jint n, jlong texturesAddress) { - glDeleteTexturesPROC glDeleteTextures = (glDeleteTexturesPROC)tlsGetFunction(92); - uintptr_t textures = (uintptr_t)texturesAddress; - UNUSED_PARAM(clazz) - glDeleteTextures(n, textures); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetBooleanv(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glGetBooleanvPROC glGetBooleanv = (glGetBooleanvPROC)tlsGetFunction(94); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetBooleanv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetFloatv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glGetFloatvPROC glGetFloatv = (glGetFloatvPROC)tlsGetFunction(95); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFloatv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetIntegerv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glGetIntegervPROC glGetIntegerv = (glGetIntegervPROC)tlsGetFunction(96); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetIntegerv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetDoublev__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glGetDoublevPROC glGetDoublev = (glGetDoublevPROC)tlsGetFunction(97); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetDoublev(pname, params); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL11C_glGetError(JNIEnv *__env, jclass clazz) { - glGetErrorPROC glGetError = (glGetErrorPROC)tlsGetFunction(98); - UNUSED_PARAM(clazz) - return glGetError(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetPointerv(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glGetPointervPROC glGetPointerv = (glGetPointervPROC)tlsGetFunction(109); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetPointerv(pname, params); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL11C_nglGetString(JNIEnv *__env, jclass clazz, jint name) { - glGetStringPROC glGetString = (glGetStringPROC)tlsGetFunction(111); - UNUSED_PARAM(clazz) - return (jlong)glGetString(name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetTexImage__IIIIJ(JNIEnv *__env, jclass clazz, jint tex, jint level, jint format, jint type, jlong pixelsAddress) { - glGetTexImagePROC glGetTexImage = (glGetTexImagePROC)tlsGetFunction(117); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetTexImage(tex, level, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetTexLevelParameteriv__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint pname, jlong paramsAddress) { - glGetTexLevelParameterivPROC glGetTexLevelParameteriv = (glGetTexLevelParameterivPROC)tlsGetFunction(118); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexLevelParameteriv(target, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetTexLevelParameterfv__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint pname, jlong paramsAddress) { - glGetTexLevelParameterfvPROC glGetTexLevelParameterfv = (glGetTexLevelParameterfvPROC)tlsGetFunction(119); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexLevelParameterfv(target, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetTexParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetTexParameterivPROC glGetTexParameteriv = (glGetTexParameterivPROC)tlsGetFunction(120); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglGetTexParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetTexParameterfvPROC glGetTexParameterfv = (glGetTexParameterfvPROC)tlsGetFunction(121); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexParameterfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glHint(JNIEnv *__env, jclass clazz, jint target, jint hint) { - glHintPROC glHint = (glHintPROC)tlsGetFunction(122); - UNUSED_PARAM(clazz) - glHint(target, hint); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11C_glIsEnabled(JNIEnv *__env, jclass clazz, jint cap) { - glIsEnabledPROC glIsEnabled = (glIsEnabledPROC)tlsGetFunction(137); - UNUSED_PARAM(clazz) - return glIsEnabled(cap); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11C_glIsTexture(JNIEnv *__env, jclass clazz, jint texture) { - glIsTexturePROC glIsTexture = (glIsTexturePROC)tlsGetFunction(139); - UNUSED_PARAM(clazz) - return glIsTexture(texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glLineWidth(JNIEnv *__env, jclass clazz, jfloat width) { - glLineWidthPROC glLineWidth = (glLineWidthPROC)tlsGetFunction(149); - UNUSED_PARAM(clazz) - glLineWidth(width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glLogicOp(JNIEnv *__env, jclass clazz, jint op) { - glLogicOpPROC glLogicOp = (glLogicOpPROC)tlsGetFunction(155); - UNUSED_PARAM(clazz) - glLogicOp(op); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glPixelStorei(JNIEnv *__env, jclass clazz, jint pname, jint param) { - glPixelStoreiPROC glPixelStorei = (glPixelStoreiPROC)tlsGetFunction(190); - UNUSED_PARAM(clazz) - glPixelStorei(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glPixelStoref(JNIEnv *__env, jclass clazz, jint pname, jfloat param) { - glPixelStorefPROC glPixelStoref = (glPixelStorefPROC)tlsGetFunction(191); - UNUSED_PARAM(clazz) - glPixelStoref(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glPointSize(JNIEnv *__env, jclass clazz, jfloat size) { - glPointSizePROC glPointSize = (glPointSizePROC)tlsGetFunction(195); - UNUSED_PARAM(clazz) - glPointSize(size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glPolygonMode(JNIEnv *__env, jclass clazz, jint face, jint mode) { - glPolygonModePROC glPolygonMode = (glPolygonModePROC)tlsGetFunction(196); - UNUSED_PARAM(clazz) - glPolygonMode(face, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glPolygonOffset(JNIEnv *__env, jclass clazz, jfloat factor, jfloat units) { - glPolygonOffsetPROC glPolygonOffset = (glPolygonOffsetPROC)tlsGetFunction(197); - UNUSED_PARAM(clazz) - glPolygonOffset(factor, units); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glReadBuffer(JNIEnv *__env, jclass clazz, jint src) { - glReadBufferPROC glReadBuffer = (glReadBufferPROC)tlsGetFunction(232); - UNUSED_PARAM(clazz) - glReadBuffer(src); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglReadPixels__IIIIIIJ(JNIEnv *__env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jlong pixelsAddress) { - glReadPixelsPROC glReadPixels = (glReadPixelsPROC)tlsGetFunction(233); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glReadPixels(x, y, width, height, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glScissor(JNIEnv *__env, jclass clazz, jint x, jint y, jint width, jint height) { - glScissorPROC glScissor = (glScissorPROC)tlsGetFunction(247); - UNUSED_PARAM(clazz) - glScissor(x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glStencilFunc(JNIEnv *__env, jclass clazz, jint func, jint ref, jint mask) { - glStencilFuncPROC glStencilFunc = (glStencilFuncPROC)tlsGetFunction(250); - UNUSED_PARAM(clazz) - glStencilFunc(func, ref, mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glStencilMask(JNIEnv *__env, jclass clazz, jint mask) { - glStencilMaskPROC glStencilMask = (glStencilMaskPROC)tlsGetFunction(251); - UNUSED_PARAM(clazz) - glStencilMask(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glStencilOp(JNIEnv *__env, jclass clazz, jint sfail, jint dpfail, jint dppass) { - glStencilOpPROC glStencilOp = (glStencilOpPROC)tlsGetFunction(252); - UNUSED_PARAM(clazz) - glStencilOp(sfail, dpfail, dppass); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglTexImage1D__IIIIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixelsAddress) { - glTexImage1DPROC glTexImage1D = (glTexImage1DPROC)tlsGetFunction(296); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTexImage1D(target, level, internalformat, width, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglTexImage2D__IIIIIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixelsAddress) { - glTexImage2DPROC glTexImage2D = (glTexImage2DPROC)tlsGetFunction(297); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glCopyTexImage1D(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalFormat, jint x, jint y, jint width, jint border) { - glCopyTexImage1DPROC glCopyTexImage1D = (glCopyTexImage1DPROC)tlsGetFunction(298); - UNUSED_PARAM(clazz) - glCopyTexImage1D(target, level, internalFormat, x, y, width, border); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glCopyTexImage2D(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalFormat, jint x, jint y, jint width, jint height, jint border) { - glCopyTexImage2DPROC glCopyTexImage2D = (glCopyTexImage2DPROC)tlsGetFunction(299); - UNUSED_PARAM(clazz) - glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glCopyTexSubImage1D(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint x, jint y, jint width) { - glCopyTexSubImage1DPROC glCopyTexSubImage1D = (glCopyTexSubImage1DPROC)tlsGetFunction(300); - UNUSED_PARAM(clazz) - glCopyTexSubImage1D(target, level, xoffset, x, y, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glCopyTexSubImage2D(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) { - glCopyTexSubImage2DPROC glCopyTexSubImage2D = (glCopyTexSubImage2DPROC)tlsGetFunction(301); - UNUSED_PARAM(clazz) - glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glTexParameteri(JNIEnv *__env, jclass clazz, jint target, jint pname, jint param) { - glTexParameteriPROC glTexParameteri = (glTexParameteriPROC)tlsGetFunction(302); - UNUSED_PARAM(clazz) - glTexParameteri(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglTexParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexParameterivPROC glTexParameteriv = (glTexParameterivPROC)tlsGetFunction(303); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glTexParameterf(JNIEnv *__env, jclass clazz, jint target, jint pname, jfloat param) { - glTexParameterfPROC glTexParameterf = (glTexParameterfPROC)tlsGetFunction(304); - UNUSED_PARAM(clazz) - glTexParameterf(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglTexParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexParameterfvPROC glTexParameterfv = (glTexParameterfvPROC)tlsGetFunction(305); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexParameterfv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglTexSubImage1D__IIIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixelsAddress) { - glTexSubImage1DPROC glTexSubImage1D = (glTexSubImage1DPROC)tlsGetFunction(306); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTexSubImage1D(target, level, xoffset, width, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_nglTexSubImage2D__IIIIIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixelsAddress) { - glTexSubImage2DPROC glTexSubImage2D = (glTexSubImage2DPROC)tlsGetFunction(307); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11C_glViewport(JNIEnv *__env, jclass clazz, jint x, jint y, jint w, jint h) { - glViewportPROC glViewport = (glViewportPROC)tlsGetFunction(335); - UNUSED_PARAM(clazz) - glViewport(x, y, w, h); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL12C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL12C.c deleted file mode 100644 index 6815d043..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL12C.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTexImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTexSubImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyTexSubImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glDrawRangeElementsPROC) (jint, jint, jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12C_nglTexImage3D__IIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixelsAddress) { - glTexImage3DPROC glTexImage3D = (glTexImage3DPROC)tlsGetFunction(336); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12C_nglTexSubImage3D__IIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixelsAddress) { - glTexSubImage3DPROC glTexSubImage3D = (glTexSubImage3DPROC)tlsGetFunction(337); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12C_glCopyTexSubImage3D(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { - glCopyTexSubImage3DPROC glCopyTexSubImage3D = (glCopyTexSubImage3DPROC)tlsGetFunction(338); - UNUSED_PARAM(clazz) - glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12C_nglDrawRangeElements(JNIEnv *__env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indicesAddress) { - glDrawRangeElementsPROC glDrawRangeElements = (glDrawRangeElementsPROC)tlsGetFunction(339); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawRangeElements(mode, start, end, count, type, indices); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL13.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL13.c deleted file mode 100644 index 303b9fd7..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL13.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glClientActiveTexturePROC) (jint); -typedef void (APIENTRY *glMultiTexCoord1fPROC) (jint, jfloat); -typedef void (APIENTRY *glMultiTexCoord1sPROC) (jint, jshort); -typedef void (APIENTRY *glMultiTexCoord1iPROC) (jint, jint); -typedef void (APIENTRY *glMultiTexCoord1dPROC) (jint, jdouble); -typedef void (APIENTRY *glMultiTexCoord1fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord1svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord1ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord1dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2fPROC) (jint, jfloat, jfloat); -typedef void (APIENTRY *glMultiTexCoord2sPROC) (jint, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord2iPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoord2dPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glMultiTexCoord2fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3fPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glMultiTexCoord3sPROC) (jint, jshort, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord3iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoord3dPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMultiTexCoord3fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4fPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glMultiTexCoord4sPROC) (jint, jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord4iPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoord4dPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glMultiTexCoord4fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glLoadTransposeMatrixfPROC) (uintptr_t); -typedef void (APIENTRY *glLoadTransposeMatrixdPROC) (uintptr_t); -typedef void (APIENTRY *glMultTransposeMatrixfPROC) (uintptr_t); -typedef void (APIENTRY *glMultTransposeMatrixdPROC) (uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glClientActiveTexture(JNIEnv *__env, jclass clazz, jint texture) { - glClientActiveTexturePROC glClientActiveTexture = (glClientActiveTexturePROC)tlsGetFunction(349); - UNUSED_PARAM(clazz) - glClientActiveTexture(texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord1f(JNIEnv *__env, jclass clazz, jint texture, jfloat s) { - glMultiTexCoord1fPROC glMultiTexCoord1f = (glMultiTexCoord1fPROC)tlsGetFunction(350); - UNUSED_PARAM(clazz) - glMultiTexCoord1f(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord1s(JNIEnv *__env, jclass clazz, jint texture, jshort s) { - glMultiTexCoord1sPROC glMultiTexCoord1s = (glMultiTexCoord1sPROC)tlsGetFunction(351); - UNUSED_PARAM(clazz) - glMultiTexCoord1s(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord1i(JNIEnv *__env, jclass clazz, jint texture, jint s) { - glMultiTexCoord1iPROC glMultiTexCoord1i = (glMultiTexCoord1iPROC)tlsGetFunction(352); - UNUSED_PARAM(clazz) - glMultiTexCoord1i(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord1d(JNIEnv *__env, jclass clazz, jint texture, jdouble s) { - glMultiTexCoord1dPROC glMultiTexCoord1d = (glMultiTexCoord1dPROC)tlsGetFunction(353); - UNUSED_PARAM(clazz) - glMultiTexCoord1d(texture, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord1fv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1fvPROC glMultiTexCoord1fv = (glMultiTexCoord1fvPROC)tlsGetFunction(354); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1fv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord1sv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1svPROC glMultiTexCoord1sv = (glMultiTexCoord1svPROC)tlsGetFunction(355); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1sv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord1iv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1ivPROC glMultiTexCoord1iv = (glMultiTexCoord1ivPROC)tlsGetFunction(356); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1iv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord1dv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord1dvPROC glMultiTexCoord1dv = (glMultiTexCoord1dvPROC)tlsGetFunction(357); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1dv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord2f(JNIEnv *__env, jclass clazz, jint texture, jfloat s, jfloat t) { - glMultiTexCoord2fPROC glMultiTexCoord2f = (glMultiTexCoord2fPROC)tlsGetFunction(358); - UNUSED_PARAM(clazz) - glMultiTexCoord2f(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord2s(JNIEnv *__env, jclass clazz, jint texture, jshort s, jshort t) { - glMultiTexCoord2sPROC glMultiTexCoord2s = (glMultiTexCoord2sPROC)tlsGetFunction(359); - UNUSED_PARAM(clazz) - glMultiTexCoord2s(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord2i(JNIEnv *__env, jclass clazz, jint texture, jint s, jint t) { - glMultiTexCoord2iPROC glMultiTexCoord2i = (glMultiTexCoord2iPROC)tlsGetFunction(360); - UNUSED_PARAM(clazz) - glMultiTexCoord2i(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord2d(JNIEnv *__env, jclass clazz, jint texture, jdouble s, jdouble t) { - glMultiTexCoord2dPROC glMultiTexCoord2d = (glMultiTexCoord2dPROC)tlsGetFunction(361); - UNUSED_PARAM(clazz) - glMultiTexCoord2d(texture, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord2fv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2fvPROC glMultiTexCoord2fv = (glMultiTexCoord2fvPROC)tlsGetFunction(362); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2fv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord2sv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2svPROC glMultiTexCoord2sv = (glMultiTexCoord2svPROC)tlsGetFunction(363); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2sv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord2iv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2ivPROC glMultiTexCoord2iv = (glMultiTexCoord2ivPROC)tlsGetFunction(364); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2iv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord2dv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord2dvPROC glMultiTexCoord2dv = (glMultiTexCoord2dvPROC)tlsGetFunction(365); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2dv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord3f(JNIEnv *__env, jclass clazz, jint texture, jfloat s, jfloat t, jfloat r) { - glMultiTexCoord3fPROC glMultiTexCoord3f = (glMultiTexCoord3fPROC)tlsGetFunction(366); - UNUSED_PARAM(clazz) - glMultiTexCoord3f(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord3s(JNIEnv *__env, jclass clazz, jint texture, jshort s, jshort t, jshort r) { - glMultiTexCoord3sPROC glMultiTexCoord3s = (glMultiTexCoord3sPROC)tlsGetFunction(367); - UNUSED_PARAM(clazz) - glMultiTexCoord3s(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord3i(JNIEnv *__env, jclass clazz, jint texture, jint s, jint t, jint r) { - glMultiTexCoord3iPROC glMultiTexCoord3i = (glMultiTexCoord3iPROC)tlsGetFunction(368); - UNUSED_PARAM(clazz) - glMultiTexCoord3i(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord3d(JNIEnv *__env, jclass clazz, jint texture, jdouble s, jdouble t, jdouble r) { - glMultiTexCoord3dPROC glMultiTexCoord3d = (glMultiTexCoord3dPROC)tlsGetFunction(369); - UNUSED_PARAM(clazz) - glMultiTexCoord3d(texture, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord3fv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3fvPROC glMultiTexCoord3fv = (glMultiTexCoord3fvPROC)tlsGetFunction(370); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3fv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord3sv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3svPROC glMultiTexCoord3sv = (glMultiTexCoord3svPROC)tlsGetFunction(371); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3sv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord3iv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3ivPROC glMultiTexCoord3iv = (glMultiTexCoord3ivPROC)tlsGetFunction(372); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3iv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord3dv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord3dvPROC glMultiTexCoord3dv = (glMultiTexCoord3dvPROC)tlsGetFunction(373); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3dv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord4f(JNIEnv *__env, jclass clazz, jint texture, jfloat s, jfloat t, jfloat r, jfloat q) { - glMultiTexCoord4fPROC glMultiTexCoord4f = (glMultiTexCoord4fPROC)tlsGetFunction(374); - UNUSED_PARAM(clazz) - glMultiTexCoord4f(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord4s(JNIEnv *__env, jclass clazz, jint texture, jshort s, jshort t, jshort r, jshort q) { - glMultiTexCoord4sPROC glMultiTexCoord4s = (glMultiTexCoord4sPROC)tlsGetFunction(375); - UNUSED_PARAM(clazz) - glMultiTexCoord4s(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord4i(JNIEnv *__env, jclass clazz, jint texture, jint s, jint t, jint r, jint q) { - glMultiTexCoord4iPROC glMultiTexCoord4i = (glMultiTexCoord4iPROC)tlsGetFunction(376); - UNUSED_PARAM(clazz) - glMultiTexCoord4i(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_glMultiTexCoord4d(JNIEnv *__env, jclass clazz, jint texture, jdouble s, jdouble t, jdouble r, jdouble q) { - glMultiTexCoord4dPROC glMultiTexCoord4d = (glMultiTexCoord4dPROC)tlsGetFunction(377); - UNUSED_PARAM(clazz) - glMultiTexCoord4d(texture, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord4fv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4fvPROC glMultiTexCoord4fv = (glMultiTexCoord4fvPROC)tlsGetFunction(378); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4fv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord4sv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4svPROC glMultiTexCoord4sv = (glMultiTexCoord4svPROC)tlsGetFunction(379); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4sv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord4iv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4ivPROC glMultiTexCoord4iv = (glMultiTexCoord4ivPROC)tlsGetFunction(380); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4iv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord4dv__IJ(JNIEnv *__env, jclass clazz, jint texture, jlong vAddress) { - glMultiTexCoord4dvPROC glMultiTexCoord4dv = (glMultiTexCoord4dvPROC)tlsGetFunction(381); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4dv(texture, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglLoadTransposeMatrixf__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glLoadTransposeMatrixfPROC glLoadTransposeMatrixf = (glLoadTransposeMatrixfPROC)tlsGetFunction(382); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glLoadTransposeMatrixf(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglLoadTransposeMatrixd__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glLoadTransposeMatrixdPROC glLoadTransposeMatrixd = (glLoadTransposeMatrixdPROC)tlsGetFunction(383); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glLoadTransposeMatrixd(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultTransposeMatrixf__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glMultTransposeMatrixfPROC glMultTransposeMatrixf = (glMultTransposeMatrixfPROC)tlsGetFunction(384); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMultTransposeMatrixf(m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultTransposeMatrixd__J(JNIEnv *__env, jclass clazz, jlong mAddress) { - glMultTransposeMatrixdPROC glMultTransposeMatrixd = (glMultTransposeMatrixdPROC)tlsGetFunction(385); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMultTransposeMatrixd(m); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL13C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL13C.c deleted file mode 100644 index 4826dfed..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL13C.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glCompressedTexImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexImage1DPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexSubImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexSubImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTexSubImage1DPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetCompressedTexImagePROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glSampleCoveragePROC) (jfloat, jboolean); -typedef void (APIENTRY *glActiveTexturePROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_nglCompressedTexImage3D(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong dataAddress) { - glCompressedTexImage3DPROC glCompressedTexImage3D = (glCompressedTexImage3DPROC)tlsGetFunction(340); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_nglCompressedTexImage2D(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong dataAddress) { - glCompressedTexImage2DPROC glCompressedTexImage2D = (glCompressedTexImage2DPROC)tlsGetFunction(341); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_nglCompressedTexImage1D(JNIEnv *__env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong dataAddress) { - glCompressedTexImage1DPROC glCompressedTexImage1D = (glCompressedTexImage1DPROC)tlsGetFunction(342); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_nglCompressedTexSubImage3D(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong dataAddress) { - glCompressedTexSubImage3DPROC glCompressedTexSubImage3D = (glCompressedTexSubImage3DPROC)tlsGetFunction(343); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_nglCompressedTexSubImage2D(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong dataAddress) { - glCompressedTexSubImage2DPROC glCompressedTexSubImage2D = (glCompressedTexSubImage2DPROC)tlsGetFunction(344); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_nglCompressedTexSubImage1D(JNIEnv *__env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong dataAddress) { - glCompressedTexSubImage1DPROC glCompressedTexSubImage1D = (glCompressedTexSubImage1DPROC)tlsGetFunction(345); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_nglGetCompressedTexImage(JNIEnv *__env, jclass clazz, jint target, jint level, jlong pixelsAddress) { - glGetCompressedTexImagePROC glGetCompressedTexImage = (glGetCompressedTexImagePROC)tlsGetFunction(346); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetCompressedTexImage(target, level, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_glSampleCoverage(JNIEnv *__env, jclass clazz, jfloat value, jboolean invert) { - glSampleCoveragePROC glSampleCoverage = (glSampleCoveragePROC)tlsGetFunction(347); - UNUSED_PARAM(clazz) - glSampleCoverage(value, invert); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13C_glActiveTexture(JNIEnv *__env, jclass clazz, jint texture) { - glActiveTexturePROC glActiveTexture = (glActiveTexturePROC)tlsGetFunction(348); - UNUSED_PARAM(clazz) - glActiveTexture(texture); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL14.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL14.c deleted file mode 100644 index dc885501..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL14.c +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFogCoordfPROC) (jfloat); -typedef void (APIENTRY *glFogCoorddPROC) (jdouble); -typedef void (APIENTRY *glFogCoordfvPROC) (uintptr_t); -typedef void (APIENTRY *glFogCoorddvPROC) (uintptr_t); -typedef void (APIENTRY *glFogCoordPointerPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glSecondaryColor3bPROC) (jbyte, jbyte, jbyte); -typedef void (APIENTRY *glSecondaryColor3sPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glSecondaryColor3iPROC) (jint, jint, jint); -typedef void (APIENTRY *glSecondaryColor3fPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glSecondaryColor3dPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glSecondaryColor3ubPROC) (uint8_t, uint8_t, uint8_t); -typedef void (APIENTRY *glSecondaryColor3usPROC) (uint16_t, uint16_t, uint16_t); -typedef void (APIENTRY *glSecondaryColor3uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glSecondaryColor3bvPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3svPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3ivPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3fvPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3dvPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3ubvPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3usvPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3uivPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColorPointerPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glWindowPos2iPROC) (jint, jint); -typedef void (APIENTRY *glWindowPos2sPROC) (jshort, jshort); -typedef void (APIENTRY *glWindowPos2fPROC) (jfloat, jfloat); -typedef void (APIENTRY *glWindowPos2dPROC) (jdouble, jdouble); -typedef void (APIENTRY *glWindowPos2ivPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos2svPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos2fvPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos2dvPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3iPROC) (jint, jint, jint); -typedef void (APIENTRY *glWindowPos3sPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glWindowPos3fPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glWindowPos3dPROC) (jdouble, jdouble, jdouble); -typedef void (APIENTRY *glWindowPos3ivPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3svPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3fvPROC) (uintptr_t); -typedef void (APIENTRY *glWindowPos3dvPROC) (uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glFogCoordf(JNIEnv *__env, jclass clazz, jfloat coord) { - glFogCoordfPROC glFogCoordf = (glFogCoordfPROC)tlsGetFunction(388); - UNUSED_PARAM(clazz) - glFogCoordf(coord); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glFogCoordd(JNIEnv *__env, jclass clazz, jdouble coord) { - glFogCoorddPROC glFogCoordd = (glFogCoorddPROC)tlsGetFunction(389); - UNUSED_PARAM(clazz) - glFogCoordd(coord); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordfv__J(JNIEnv *__env, jclass clazz, jlong coordAddress) { - glFogCoordfvPROC glFogCoordfv = (glFogCoordfvPROC)tlsGetFunction(390); - uintptr_t coord = (uintptr_t)coordAddress; - UNUSED_PARAM(clazz) - glFogCoordfv(coord); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoorddv__J(JNIEnv *__env, jclass clazz, jlong coordAddress) { - glFogCoorddvPROC glFogCoorddv = (glFogCoorddvPROC)tlsGetFunction(391); - uintptr_t coord = (uintptr_t)coordAddress; - UNUSED_PARAM(clazz) - glFogCoorddv(coord); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordPointer(JNIEnv *__env, jclass clazz, jint type, jint stride, jlong pointerAddress) { - glFogCoordPointerPROC glFogCoordPointer = (glFogCoordPointerPROC)tlsGetFunction(392); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glFogCoordPointer(type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3b(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue) { - glSecondaryColor3bPROC glSecondaryColor3b = (glSecondaryColor3bPROC)tlsGetFunction(399); - UNUSED_PARAM(clazz) - glSecondaryColor3b(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3s(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glSecondaryColor3sPROC glSecondaryColor3s = (glSecondaryColor3sPROC)tlsGetFunction(400); - UNUSED_PARAM(clazz) - glSecondaryColor3s(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3i(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue) { - glSecondaryColor3iPROC glSecondaryColor3i = (glSecondaryColor3iPROC)tlsGetFunction(401); - UNUSED_PARAM(clazz) - glSecondaryColor3i(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3f(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue) { - glSecondaryColor3fPROC glSecondaryColor3f = (glSecondaryColor3fPROC)tlsGetFunction(402); - UNUSED_PARAM(clazz) - glSecondaryColor3f(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3d(JNIEnv *__env, jclass clazz, jdouble red, jdouble green, jdouble blue) { - glSecondaryColor3dPROC glSecondaryColor3d = (glSecondaryColor3dPROC)tlsGetFunction(403); - UNUSED_PARAM(clazz) - glSecondaryColor3d(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3ub(JNIEnv *__env, jclass clazz, jbyte red, jbyte green, jbyte blue) { - glSecondaryColor3ubPROC glSecondaryColor3ub = (glSecondaryColor3ubPROC)tlsGetFunction(404); - UNUSED_PARAM(clazz) - glSecondaryColor3ub((uint8_t)red, (uint8_t)green, (uint8_t)blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3us(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glSecondaryColor3usPROC glSecondaryColor3us = (glSecondaryColor3usPROC)tlsGetFunction(405); - UNUSED_PARAM(clazz) - glSecondaryColor3us((uint16_t)red, (uint16_t)green, (uint16_t)blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glSecondaryColor3ui(JNIEnv *__env, jclass clazz, jint red, jint green, jint blue) { - glSecondaryColor3uiPROC glSecondaryColor3ui = (glSecondaryColor3uiPROC)tlsGetFunction(406); - UNUSED_PARAM(clazz) - glSecondaryColor3ui(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3bv(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3bvPROC glSecondaryColor3bv = (glSecondaryColor3bvPROC)tlsGetFunction(407); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3bv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3sv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3svPROC glSecondaryColor3sv = (glSecondaryColor3svPROC)tlsGetFunction(408); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3sv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3iv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3ivPROC glSecondaryColor3iv = (glSecondaryColor3ivPROC)tlsGetFunction(409); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3iv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3fv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3fvPROC glSecondaryColor3fv = (glSecondaryColor3fvPROC)tlsGetFunction(410); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3fv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3dv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3dvPROC glSecondaryColor3dv = (glSecondaryColor3dvPROC)tlsGetFunction(411); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3dv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3ubv(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3ubvPROC glSecondaryColor3ubv = (glSecondaryColor3ubvPROC)tlsGetFunction(412); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3ubv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3usv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3usvPROC glSecondaryColor3usv = (glSecondaryColor3usvPROC)tlsGetFunction(413); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3usv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3uiv__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3uivPROC glSecondaryColor3uiv = (glSecondaryColor3uivPROC)tlsGetFunction(414); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3uiv(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColorPointer(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride, jlong pointerAddress) { - glSecondaryColorPointerPROC glSecondaryColorPointer = (glSecondaryColorPointerPROC)tlsGetFunction(415); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glSecondaryColorPointer(size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos2i(JNIEnv *__env, jclass clazz, jint x, jint y) { - glWindowPos2iPROC glWindowPos2i = (glWindowPos2iPROC)tlsGetFunction(417); - UNUSED_PARAM(clazz) - glWindowPos2i(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos2s(JNIEnv *__env, jclass clazz, jshort x, jshort y) { - glWindowPos2sPROC glWindowPos2s = (glWindowPos2sPROC)tlsGetFunction(418); - UNUSED_PARAM(clazz) - glWindowPos2s(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos2f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y) { - glWindowPos2fPROC glWindowPos2f = (glWindowPos2fPROC)tlsGetFunction(419); - UNUSED_PARAM(clazz) - glWindowPos2f(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos2d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y) { - glWindowPos2dPROC glWindowPos2d = (glWindowPos2dPROC)tlsGetFunction(420); - UNUSED_PARAM(clazz) - glWindowPos2d(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos2iv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2ivPROC glWindowPos2iv = (glWindowPos2ivPROC)tlsGetFunction(421); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2iv(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos2sv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2svPROC glWindowPos2sv = (glWindowPos2svPROC)tlsGetFunction(422); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2sv(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos2fv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2fvPROC glWindowPos2fv = (glWindowPos2fvPROC)tlsGetFunction(423); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2fv(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos2dv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos2dvPROC glWindowPos2dv = (glWindowPos2dvPROC)tlsGetFunction(424); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos2dv(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos3i(JNIEnv *__env, jclass clazz, jint x, jint y, jint z) { - glWindowPos3iPROC glWindowPos3i = (glWindowPos3iPROC)tlsGetFunction(425); - UNUSED_PARAM(clazz) - glWindowPos3i(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos3s(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z) { - glWindowPos3sPROC glWindowPos3s = (glWindowPos3sPROC)tlsGetFunction(426); - UNUSED_PARAM(clazz) - glWindowPos3s(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos3f(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z) { - glWindowPos3fPROC glWindowPos3f = (glWindowPos3fPROC)tlsGetFunction(427); - UNUSED_PARAM(clazz) - glWindowPos3f(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_glWindowPos3d(JNIEnv *__env, jclass clazz, jdouble x, jdouble y, jdouble z) { - glWindowPos3dPROC glWindowPos3d = (glWindowPos3dPROC)tlsGetFunction(428); - UNUSED_PARAM(clazz) - glWindowPos3d(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos3iv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3ivPROC glWindowPos3iv = (glWindowPos3ivPROC)tlsGetFunction(429); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3iv(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos3sv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3svPROC glWindowPos3sv = (glWindowPos3svPROC)tlsGetFunction(430); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3sv(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos3fv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3fvPROC glWindowPos3fv = (glWindowPos3fvPROC)tlsGetFunction(431); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3fv(p); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos3dv__J(JNIEnv *__env, jclass clazz, jlong pAddress) { - glWindowPos3dvPROC glWindowPos3dv = (glWindowPos3dvPROC)tlsGetFunction(432); - uintptr_t p = (uintptr_t)pAddress; - UNUSED_PARAM(clazz) - glWindowPos3dv(p); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL14C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL14C.c deleted file mode 100644 index 82843aff..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL14C.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendColorPROC) (jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glBlendEquationPROC) (jint); -typedef void (APIENTRY *glMultiDrawArraysPROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glMultiDrawElementsPROC) (jint, uintptr_t, jint, uintptr_t, jint); -typedef void (APIENTRY *glPointParameterfPROC) (jint, jfloat); -typedef void (APIENTRY *glPointParameteriPROC) (jint, jint); -typedef void (APIENTRY *glPointParameterfvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glPointParameterivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glBlendFuncSeparatePROC) (jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_glBlendColor(JNIEnv *__env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha) { - glBlendColorPROC glBlendColor = (glBlendColorPROC)tlsGetFunction(386); - UNUSED_PARAM(clazz) - glBlendColor(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_glBlendEquation(JNIEnv *__env, jclass clazz, jint mode) { - glBlendEquationPROC glBlendEquation = (glBlendEquationPROC)tlsGetFunction(387); - UNUSED_PARAM(clazz) - glBlendEquation(mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_nglMultiDrawArrays__IJJI(JNIEnv *__env, jclass clazz, jint mode, jlong firstAddress, jlong countAddress, jint drawcount) { - glMultiDrawArraysPROC glMultiDrawArrays = (glMultiDrawArraysPROC)tlsGetFunction(393); - uintptr_t first = (uintptr_t)firstAddress; - uintptr_t count = (uintptr_t)countAddress; - UNUSED_PARAM(clazz) - glMultiDrawArrays(mode, first, count, drawcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_nglMultiDrawElements__IJIJI(JNIEnv *__env, jclass clazz, jint mode, jlong countAddress, jint type, jlong indicesAddress, jint drawcount) { - glMultiDrawElementsPROC glMultiDrawElements = (glMultiDrawElementsPROC)tlsGetFunction(394); - uintptr_t count = (uintptr_t)countAddress; - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glMultiDrawElements(mode, count, type, indices, drawcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_glPointParameterf(JNIEnv *__env, jclass clazz, jint pname, jfloat param) { - glPointParameterfPROC glPointParameterf = (glPointParameterfPROC)tlsGetFunction(395); - UNUSED_PARAM(clazz) - glPointParameterf(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_glPointParameteri(JNIEnv *__env, jclass clazz, jint pname, jint param) { - glPointParameteriPROC glPointParameteri = (glPointParameteriPROC)tlsGetFunction(396); - UNUSED_PARAM(clazz) - glPointParameteri(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_nglPointParameterfv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glPointParameterfvPROC glPointParameterfv = (glPointParameterfvPROC)tlsGetFunction(397); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glPointParameterfv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_nglPointParameteriv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glPointParameterivPROC glPointParameteriv = (glPointParameterivPROC)tlsGetFunction(398); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glPointParameteriv(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14C_glBlendFuncSeparate(JNIEnv *__env, jclass clazz, jint sfactorRGB, jint dfactorRGB, jint sfactorAlpha, jint dfactorAlpha) { - glBlendFuncSeparatePROC glBlendFuncSeparate = (glBlendFuncSeparatePROC)tlsGetFunction(416); - UNUSED_PARAM(clazz) - glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL15C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL15C.c deleted file mode 100644 index 354ef987..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL15C.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBindBufferPROC) (jint, jint); -typedef void (APIENTRY *glDeleteBuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenBuffersPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsBufferPROC) (jint); -typedef void (APIENTRY *glBufferDataPROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glBufferSubDataPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetBufferSubDataPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef uintptr_t (APIENTRY *glMapBufferPROC) (jint, jint); -typedef jboolean (APIENTRY *glUnmapBufferPROC) (jint); -typedef void (APIENTRY *glGetBufferParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetBufferPointervPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGenQueriesPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteQueriesPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsQueryPROC) (jint); -typedef void (APIENTRY *glBeginQueryPROC) (jint, jint); -typedef void (APIENTRY *glEndQueryPROC) (jint); -typedef void (APIENTRY *glGetQueryivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryObjectivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryObjectuivPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_glBindBuffer(JNIEnv *__env, jclass clazz, jint target, jint buffer) { - glBindBufferPROC glBindBuffer = (glBindBufferPROC)tlsGetFunction(433); - UNUSED_PARAM(clazz) - glBindBuffer(target, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglDeleteBuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong buffersAddress) { - glDeleteBuffersPROC glDeleteBuffers = (glDeleteBuffersPROC)tlsGetFunction(434); - uintptr_t buffers = (uintptr_t)buffersAddress; - UNUSED_PARAM(clazz) - glDeleteBuffers(n, buffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGenBuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong buffersAddress) { - glGenBuffersPROC glGenBuffers = (glGenBuffersPROC)tlsGetFunction(435); - uintptr_t buffers = (uintptr_t)buffersAddress; - UNUSED_PARAM(clazz) - glGenBuffers(n, buffers); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15C_glIsBuffer(JNIEnv *__env, jclass clazz, jint buffer) { - glIsBufferPROC glIsBuffer = (glIsBufferPROC)tlsGetFunction(436); - UNUSED_PARAM(clazz) - return glIsBuffer(buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglBufferData__IJJI(JNIEnv *__env, jclass clazz, jint target, jlong size, jlong dataAddress, jint usage) { - glBufferDataPROC glBufferData = (glBufferDataPROC)tlsGetFunction(437); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glBufferData(target, (uintptr_t)size, data, usage); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglBufferSubData__IJJJ(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong size, jlong dataAddress) { - glBufferSubDataPROC glBufferSubData = (glBufferSubDataPROC)tlsGetFunction(438); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glBufferSubData(target, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGetBufferSubData__IJJJ(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong size, jlong dataAddress) { - glGetBufferSubDataPROC glGetBufferSubData = (glGetBufferSubDataPROC)tlsGetFunction(439); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetBufferSubData(target, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL15C_nglMapBuffer(JNIEnv *__env, jclass clazz, jint target, jint access) { - glMapBufferPROC glMapBuffer = (glMapBufferPROC)tlsGetFunction(440); - UNUSED_PARAM(clazz) - return (jlong)glMapBuffer(target, access); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15C_glUnmapBuffer(JNIEnv *__env, jclass clazz, jint target) { - glUnmapBufferPROC glUnmapBuffer = (glUnmapBufferPROC)tlsGetFunction(441); - UNUSED_PARAM(clazz) - return glUnmapBuffer(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGetBufferParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetBufferParameterivPROC glGetBufferParameteriv = (glGetBufferParameterivPROC)tlsGetFunction(442); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetBufferParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGetBufferPointerv(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetBufferPointervPROC glGetBufferPointerv = (glGetBufferPointervPROC)tlsGetFunction(443); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetBufferPointerv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGenQueries__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glGenQueriesPROC glGenQueries = (glGenQueriesPROC)tlsGetFunction(444); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glGenQueries(n, ids); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglDeleteQueries__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glDeleteQueriesPROC glDeleteQueries = (glDeleteQueriesPROC)tlsGetFunction(445); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glDeleteQueries(n, ids); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15C_glIsQuery(JNIEnv *__env, jclass clazz, jint id) { - glIsQueryPROC glIsQuery = (glIsQueryPROC)tlsGetFunction(446); - UNUSED_PARAM(clazz) - return glIsQuery(id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_glBeginQuery(JNIEnv *__env, jclass clazz, jint target, jint id) { - glBeginQueryPROC glBeginQuery = (glBeginQueryPROC)tlsGetFunction(447); - UNUSED_PARAM(clazz) - glBeginQuery(target, id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_glEndQuery(JNIEnv *__env, jclass clazz, jint target) { - glEndQueryPROC glEndQuery = (glEndQueryPROC)tlsGetFunction(448); - UNUSED_PARAM(clazz) - glEndQuery(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGetQueryiv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetQueryivPROC glGetQueryiv = (glGetQueryivPROC)tlsGetFunction(449); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryiv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGetQueryObjectiv__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjectivPROC glGetQueryObjectiv = (glGetQueryObjectivPROC)tlsGetFunction(450); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjectiv(id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15C_nglGetQueryObjectuiv__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjectuivPROC glGetQueryObjectuiv = (glGetQueryObjectuivPROC)tlsGetFunction(451); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjectuiv(id, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL20C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL20C.c deleted file mode 100644 index 712e8e3c..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL20C.c +++ /dev/null @@ -1,728 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jint (APIENTRY *glCreateProgramPROC) (void); -typedef void (APIENTRY *glDeleteProgramPROC) (jint); -typedef jboolean (APIENTRY *glIsProgramPROC) (jint); -typedef jint (APIENTRY *glCreateShaderPROC) (jint); -typedef void (APIENTRY *glDeleteShaderPROC) (jint); -typedef jboolean (APIENTRY *glIsShaderPROC) (jint); -typedef void (APIENTRY *glAttachShaderPROC) (jint, jint); -typedef void (APIENTRY *glDetachShaderPROC) (jint, jint); -typedef void (APIENTRY *glShaderSourcePROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glCompileShaderPROC) (jint); -typedef void (APIENTRY *glLinkProgramPROC) (jint); -typedef void (APIENTRY *glUseProgramPROC) (jint); -typedef void (APIENTRY *glValidateProgramPROC) (jint); -typedef void (APIENTRY *glUniform1fPROC) (jint, jfloat); -typedef void (APIENTRY *glUniform2fPROC) (jint, jfloat, jfloat); -typedef void (APIENTRY *glUniform3fPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glUniform4fPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glUniform1iPROC) (jint, jint); -typedef void (APIENTRY *glUniform2iPROC) (jint, jint, jint); -typedef void (APIENTRY *glUniform3iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glUniform4iPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glUniform1fvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2fvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3fvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4fvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform1ivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2ivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3ivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4ivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniformMatrix2fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix3fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix4fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glGetShaderivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetShaderInfoLogPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetProgramInfoLogPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetAttachedShadersPROC) (jint, jint, uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetUniformLocationPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetActiveUniformPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetUniformfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetShaderSourcePROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glVertexAttrib1fPROC) (jint, jfloat); -typedef void (APIENTRY *glVertexAttrib1sPROC) (jint, jshort); -typedef void (APIENTRY *glVertexAttrib1dPROC) (jint, jdouble); -typedef void (APIENTRY *glVertexAttrib2fPROC) (jint, jfloat, jfloat); -typedef void (APIENTRY *glVertexAttrib2sPROC) (jint, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib2dPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttrib3fPROC) (jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glVertexAttrib3sPROC) (jint, jshort, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib3dPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttrib4fPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glVertexAttrib4sPROC) (jint, jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib4dPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttrib4NubPROC) (jint, uint8_t, uint8_t, uint8_t, uint8_t); -typedef void (APIENTRY *glVertexAttrib1fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib1svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib1dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib2fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib2svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib2dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib3fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib3svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib3dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4fvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4bvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4ubvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4usvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NbvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NsvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NubvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NusvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4NuivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribPointerPROC) (jint, jint, jint, jboolean, jint, uintptr_t); -typedef void (APIENTRY *glEnableVertexAttribArrayPROC) (jint); -typedef void (APIENTRY *glDisableVertexAttribArrayPROC) (jint); -typedef void (APIENTRY *glBindAttribLocationPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetActiveAttribPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetAttribLocationPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribdvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribPointervPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glDrawBuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glBlendEquationSeparatePROC) (jint, jint); -typedef void (APIENTRY *glStencilOpSeparatePROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glStencilFuncSeparatePROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glStencilMaskSeparatePROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20C_glCreateProgram(JNIEnv *__env, jclass clazz) { - glCreateProgramPROC glCreateProgram = (glCreateProgramPROC)tlsGetFunction(452); - UNUSED_PARAM(clazz) - return glCreateProgram(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glDeleteProgram(JNIEnv *__env, jclass clazz, jint program) { - glDeleteProgramPROC glDeleteProgram = (glDeleteProgramPROC)tlsGetFunction(453); - UNUSED_PARAM(clazz) - glDeleteProgram(program); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL20C_glIsProgram(JNIEnv *__env, jclass clazz, jint program) { - glIsProgramPROC glIsProgram = (glIsProgramPROC)tlsGetFunction(454); - UNUSED_PARAM(clazz) - return glIsProgram(program); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20C_glCreateShader(JNIEnv *__env, jclass clazz, jint type) { - glCreateShaderPROC glCreateShader = (glCreateShaderPROC)tlsGetFunction(455); - UNUSED_PARAM(clazz) - return glCreateShader(type); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glDeleteShader(JNIEnv *__env, jclass clazz, jint shader) { - glDeleteShaderPROC glDeleteShader = (glDeleteShaderPROC)tlsGetFunction(456); - UNUSED_PARAM(clazz) - glDeleteShader(shader); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL20C_glIsShader(JNIEnv *__env, jclass clazz, jint shader) { - glIsShaderPROC glIsShader = (glIsShaderPROC)tlsGetFunction(457); - UNUSED_PARAM(clazz) - return glIsShader(shader); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glAttachShader(JNIEnv *__env, jclass clazz, jint program, jint shader) { - glAttachShaderPROC glAttachShader = (glAttachShaderPROC)tlsGetFunction(458); - UNUSED_PARAM(clazz) - glAttachShader(program, shader); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glDetachShader(JNIEnv *__env, jclass clazz, jint program, jint shader) { - glDetachShaderPROC glDetachShader = (glDetachShaderPROC)tlsGetFunction(459); - UNUSED_PARAM(clazz) - glDetachShader(program, shader); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglShaderSource__IIJJ(JNIEnv *__env, jclass clazz, jint shader, jint count, jlong stringsAddress, jlong lengthAddress) { - glShaderSourcePROC glShaderSource = (glShaderSourcePROC)tlsGetFunction(460); - uintptr_t strings = (uintptr_t)stringsAddress; - uintptr_t length = (uintptr_t)lengthAddress; - UNUSED_PARAM(clazz) - glShaderSource(shader, count, strings, length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glCompileShader(JNIEnv *__env, jclass clazz, jint shader) { - glCompileShaderPROC glCompileShader = (glCompileShaderPROC)tlsGetFunction(461); - UNUSED_PARAM(clazz) - glCompileShader(shader); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glLinkProgram(JNIEnv *__env, jclass clazz, jint program) { - glLinkProgramPROC glLinkProgram = (glLinkProgramPROC)tlsGetFunction(462); - UNUSED_PARAM(clazz) - glLinkProgram(program); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUseProgram(JNIEnv *__env, jclass clazz, jint program) { - glUseProgramPROC glUseProgram = (glUseProgramPROC)tlsGetFunction(463); - UNUSED_PARAM(clazz) - glUseProgram(program); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glValidateProgram(JNIEnv *__env, jclass clazz, jint program) { - glValidateProgramPROC glValidateProgram = (glValidateProgramPROC)tlsGetFunction(464); - UNUSED_PARAM(clazz) - glValidateProgram(program); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform1f(JNIEnv *__env, jclass clazz, jint location, jfloat v0) { - glUniform1fPROC glUniform1f = (glUniform1fPROC)tlsGetFunction(465); - UNUSED_PARAM(clazz) - glUniform1f(location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform2f(JNIEnv *__env, jclass clazz, jint location, jfloat v0, jfloat v1) { - glUniform2fPROC glUniform2f = (glUniform2fPROC)tlsGetFunction(466); - UNUSED_PARAM(clazz) - glUniform2f(location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform3f(JNIEnv *__env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2) { - glUniform3fPROC glUniform3f = (glUniform3fPROC)tlsGetFunction(467); - UNUSED_PARAM(clazz) - glUniform3f(location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform4f(JNIEnv *__env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) { - glUniform4fPROC glUniform4f = (glUniform4fPROC)tlsGetFunction(468); - UNUSED_PARAM(clazz) - glUniform4f(location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform1i(JNIEnv *__env, jclass clazz, jint location, jint v0) { - glUniform1iPROC glUniform1i = (glUniform1iPROC)tlsGetFunction(469); - UNUSED_PARAM(clazz) - glUniform1i(location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform2i(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1) { - glUniform2iPROC glUniform2i = (glUniform2iPROC)tlsGetFunction(470); - UNUSED_PARAM(clazz) - glUniform2i(location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform3i(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2) { - glUniform3iPROC glUniform3i = (glUniform3iPROC)tlsGetFunction(471); - UNUSED_PARAM(clazz) - glUniform3i(location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glUniform4i(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3) { - glUniform4iPROC glUniform4i = (glUniform4iPROC)tlsGetFunction(472); - UNUSED_PARAM(clazz) - glUniform4i(location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform1fv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1fvPROC glUniform1fv = (glUniform1fvPROC)tlsGetFunction(473); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1fv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform2fv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2fvPROC glUniform2fv = (glUniform2fvPROC)tlsGetFunction(474); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2fv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform3fv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3fvPROC glUniform3fv = (glUniform3fvPROC)tlsGetFunction(475); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3fv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform4fv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4fvPROC glUniform4fv = (glUniform4fvPROC)tlsGetFunction(476); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4fv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform1iv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1ivPROC glUniform1iv = (glUniform1ivPROC)tlsGetFunction(477); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1iv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform2iv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2ivPROC glUniform2iv = (glUniform2ivPROC)tlsGetFunction(478); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2iv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform3iv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3ivPROC glUniform3iv = (glUniform3ivPROC)tlsGetFunction(479); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3iv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniform4iv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4ivPROC glUniform4iv = (glUniform4ivPROC)tlsGetFunction(480); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4iv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniformMatrix2fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix2fvPROC glUniformMatrix2fv = (glUniformMatrix2fvPROC)tlsGetFunction(481); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix2fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniformMatrix3fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix3fvPROC glUniformMatrix3fv = (glUniformMatrix3fvPROC)tlsGetFunction(482); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix3fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglUniformMatrix4fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix4fvPROC glUniformMatrix4fv = (glUniformMatrix4fvPROC)tlsGetFunction(483); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix4fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetShaderiv__IIJ(JNIEnv *__env, jclass clazz, jint shader, jint pname, jlong paramsAddress) { - glGetShaderivPROC glGetShaderiv = (glGetShaderivPROC)tlsGetFunction(484); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetShaderiv(shader, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetProgramiv__IIJ(JNIEnv *__env, jclass clazz, jint program, jint pname, jlong paramsAddress) { - glGetProgramivPROC glGetProgramiv = (glGetProgramivPROC)tlsGetFunction(485); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramiv(program, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetShaderInfoLog__IIJJ(JNIEnv *__env, jclass clazz, jint shader, jint maxLength, jlong lengthAddress, jlong infoLogAddress) { - glGetShaderInfoLogPROC glGetShaderInfoLog = (glGetShaderInfoLogPROC)tlsGetFunction(486); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t infoLog = (uintptr_t)infoLogAddress; - UNUSED_PARAM(clazz) - glGetShaderInfoLog(shader, maxLength, length, infoLog); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetProgramInfoLog__IIJJ(JNIEnv *__env, jclass clazz, jint program, jint maxLength, jlong lengthAddress, jlong infoLogAddress) { - glGetProgramInfoLogPROC glGetProgramInfoLog = (glGetProgramInfoLogPROC)tlsGetFunction(487); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t infoLog = (uintptr_t)infoLogAddress; - UNUSED_PARAM(clazz) - glGetProgramInfoLog(program, maxLength, length, infoLog); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetAttachedShaders__IIJJ(JNIEnv *__env, jclass clazz, jint program, jint maxCount, jlong countAddress, jlong shadersAddress) { - glGetAttachedShadersPROC glGetAttachedShaders = (glGetAttachedShadersPROC)tlsGetFunction(488); - uintptr_t count = (uintptr_t)countAddress; - uintptr_t shaders = (uintptr_t)shadersAddress; - UNUSED_PARAM(clazz) - glGetAttachedShaders(program, maxCount, count, shaders); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20C_nglGetUniformLocation(JNIEnv *__env, jclass clazz, jint program, jlong nameAddress) { - glGetUniformLocationPROC glGetUniformLocation = (glGetUniformLocationPROC)tlsGetFunction(489); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetUniformLocation(program, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetActiveUniform__IIIJJJJ(JNIEnv *__env, jclass clazz, jint program, jint index, jint maxLength, jlong lengthAddress, jlong sizeAddress, jlong typeAddress, jlong nameAddress) { - glGetActiveUniformPROC glGetActiveUniform = (glGetActiveUniformPROC)tlsGetFunction(490); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t size = (uintptr_t)sizeAddress; - uintptr_t type = (uintptr_t)typeAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetActiveUniform(program, index, maxLength, length, size, type, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetUniformfv__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformfvPROC glGetUniformfv = (glGetUniformfvPROC)tlsGetFunction(491); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformfv(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetUniformiv__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformivPROC glGetUniformiv = (glGetUniformivPROC)tlsGetFunction(492); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformiv(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetShaderSource__IIJJ(JNIEnv *__env, jclass clazz, jint shader, jint maxLength, jlong lengthAddress, jlong sourceAddress) { - glGetShaderSourcePROC glGetShaderSource = (glGetShaderSourcePROC)tlsGetFunction(493); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t source = (uintptr_t)sourceAddress; - UNUSED_PARAM(clazz) - glGetShaderSource(shader, maxLength, length, source); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib1f(JNIEnv *__env, jclass clazz, jint index, jfloat v0) { - glVertexAttrib1fPROC glVertexAttrib1f = (glVertexAttrib1fPROC)tlsGetFunction(494); - UNUSED_PARAM(clazz) - glVertexAttrib1f(index, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib1s(JNIEnv *__env, jclass clazz, jint index, jshort v0) { - glVertexAttrib1sPROC glVertexAttrib1s = (glVertexAttrib1sPROC)tlsGetFunction(495); - UNUSED_PARAM(clazz) - glVertexAttrib1s(index, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib1d(JNIEnv *__env, jclass clazz, jint index, jdouble v0) { - glVertexAttrib1dPROC glVertexAttrib1d = (glVertexAttrib1dPROC)tlsGetFunction(496); - UNUSED_PARAM(clazz) - glVertexAttrib1d(index, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib2f(JNIEnv *__env, jclass clazz, jint index, jfloat v0, jfloat v1) { - glVertexAttrib2fPROC glVertexAttrib2f = (glVertexAttrib2fPROC)tlsGetFunction(497); - UNUSED_PARAM(clazz) - glVertexAttrib2f(index, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib2s(JNIEnv *__env, jclass clazz, jint index, jshort v0, jshort v1) { - glVertexAttrib2sPROC glVertexAttrib2s = (glVertexAttrib2sPROC)tlsGetFunction(498); - UNUSED_PARAM(clazz) - glVertexAttrib2s(index, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib2d(JNIEnv *__env, jclass clazz, jint index, jdouble v0, jdouble v1) { - glVertexAttrib2dPROC glVertexAttrib2d = (glVertexAttrib2dPROC)tlsGetFunction(499); - UNUSED_PARAM(clazz) - glVertexAttrib2d(index, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib3f(JNIEnv *__env, jclass clazz, jint index, jfloat v0, jfloat v1, jfloat v2) { - glVertexAttrib3fPROC glVertexAttrib3f = (glVertexAttrib3fPROC)tlsGetFunction(500); - UNUSED_PARAM(clazz) - glVertexAttrib3f(index, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib3s(JNIEnv *__env, jclass clazz, jint index, jshort v0, jshort v1, jshort v2) { - glVertexAttrib3sPROC glVertexAttrib3s = (glVertexAttrib3sPROC)tlsGetFunction(501); - UNUSED_PARAM(clazz) - glVertexAttrib3s(index, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib3d(JNIEnv *__env, jclass clazz, jint index, jdouble v0, jdouble v1, jdouble v2) { - glVertexAttrib3dPROC glVertexAttrib3d = (glVertexAttrib3dPROC)tlsGetFunction(502); - UNUSED_PARAM(clazz) - glVertexAttrib3d(index, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib4f(JNIEnv *__env, jclass clazz, jint index, jfloat v0, jfloat v1, jfloat v2, jfloat v3) { - glVertexAttrib4fPROC glVertexAttrib4f = (glVertexAttrib4fPROC)tlsGetFunction(503); - UNUSED_PARAM(clazz) - glVertexAttrib4f(index, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib4s(JNIEnv *__env, jclass clazz, jint index, jshort v0, jshort v1, jshort v2, jshort v3) { - glVertexAttrib4sPROC glVertexAttrib4s = (glVertexAttrib4sPROC)tlsGetFunction(504); - UNUSED_PARAM(clazz) - glVertexAttrib4s(index, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib4d(JNIEnv *__env, jclass clazz, jint index, jdouble v0, jdouble v1, jdouble v2, jdouble v3) { - glVertexAttrib4dPROC glVertexAttrib4d = (glVertexAttrib4dPROC)tlsGetFunction(505); - UNUSED_PARAM(clazz) - glVertexAttrib4d(index, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glVertexAttrib4Nub(JNIEnv *__env, jclass clazz, jint index, jbyte x, jbyte y, jbyte z, jbyte w) { - glVertexAttrib4NubPROC glVertexAttrib4Nub = (glVertexAttrib4NubPROC)tlsGetFunction(506); - UNUSED_PARAM(clazz) - glVertexAttrib4Nub(index, (uint8_t)x, (uint8_t)y, (uint8_t)z, (uint8_t)w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib1fv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib1fvPROC glVertexAttrib1fv = (glVertexAttrib1fvPROC)tlsGetFunction(507); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib1fv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib1sv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib1svPROC glVertexAttrib1sv = (glVertexAttrib1svPROC)tlsGetFunction(508); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib1sv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib1dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib1dvPROC glVertexAttrib1dv = (glVertexAttrib1dvPROC)tlsGetFunction(509); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib1dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib2fv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib2fvPROC glVertexAttrib2fv = (glVertexAttrib2fvPROC)tlsGetFunction(510); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib2fv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib2sv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib2svPROC glVertexAttrib2sv = (glVertexAttrib2svPROC)tlsGetFunction(511); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib2sv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib2dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib2dvPROC glVertexAttrib2dv = (glVertexAttrib2dvPROC)tlsGetFunction(512); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib2dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib3fv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib3fvPROC glVertexAttrib3fv = (glVertexAttrib3fvPROC)tlsGetFunction(513); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib3fv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib3sv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib3svPROC glVertexAttrib3sv = (glVertexAttrib3svPROC)tlsGetFunction(514); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib3sv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib3dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib3dvPROC glVertexAttrib3dv = (glVertexAttrib3dvPROC)tlsGetFunction(515); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib3dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4fv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4fvPROC glVertexAttrib4fv = (glVertexAttrib4fvPROC)tlsGetFunction(516); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4fv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4sv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4svPROC glVertexAttrib4sv = (glVertexAttrib4svPROC)tlsGetFunction(517); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4sv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4dvPROC glVertexAttrib4dv = (glVertexAttrib4dvPROC)tlsGetFunction(518); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4iv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4ivPROC glVertexAttrib4iv = (glVertexAttrib4ivPROC)tlsGetFunction(519); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4iv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4bv(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4bvPROC glVertexAttrib4bv = (glVertexAttrib4bvPROC)tlsGetFunction(520); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4bv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4ubv(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4ubvPROC glVertexAttrib4ubv = (glVertexAttrib4ubvPROC)tlsGetFunction(521); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4ubv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4usv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4usvPROC glVertexAttrib4usv = (glVertexAttrib4usvPROC)tlsGetFunction(522); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4usv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4uiv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4uivPROC glVertexAttrib4uiv = (glVertexAttrib4uivPROC)tlsGetFunction(523); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4uiv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4Nbv(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NbvPROC glVertexAttrib4Nbv = (glVertexAttrib4NbvPROC)tlsGetFunction(524); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4Nbv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4Nsv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NsvPROC glVertexAttrib4Nsv = (glVertexAttrib4NsvPROC)tlsGetFunction(525); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4Nsv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4Niv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NivPROC glVertexAttrib4Niv = (glVertexAttrib4NivPROC)tlsGetFunction(526); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4Niv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4Nubv(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NubvPROC glVertexAttrib4Nubv = (glVertexAttrib4NubvPROC)tlsGetFunction(527); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4Nubv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4Nusv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NusvPROC glVertexAttrib4Nusv = (glVertexAttrib4NusvPROC)tlsGetFunction(528); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4Nusv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttrib4Nuiv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4NuivPROC glVertexAttrib4Nuiv = (glVertexAttrib4NuivPROC)tlsGetFunction(529); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4Nuiv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglVertexAttribPointer(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong pointerAddress) { - glVertexAttribPointerPROC glVertexAttribPointer = (glVertexAttribPointerPROC)tlsGetFunction(530); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexAttribPointer(index, size, type, normalized, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glEnableVertexAttribArray(JNIEnv *__env, jclass clazz, jint index) { - glEnableVertexAttribArrayPROC glEnableVertexAttribArray = (glEnableVertexAttribArrayPROC)tlsGetFunction(531); - UNUSED_PARAM(clazz) - glEnableVertexAttribArray(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glDisableVertexAttribArray(JNIEnv *__env, jclass clazz, jint index) { - glDisableVertexAttribArrayPROC glDisableVertexAttribArray = (glDisableVertexAttribArrayPROC)tlsGetFunction(532); - UNUSED_PARAM(clazz) - glDisableVertexAttribArray(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglBindAttribLocation(JNIEnv *__env, jclass clazz, jint program, jint index, jlong nameAddress) { - glBindAttribLocationPROC glBindAttribLocation = (glBindAttribLocationPROC)tlsGetFunction(533); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glBindAttribLocation(program, index, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetActiveAttrib__IIIJJJJ(JNIEnv *__env, jclass clazz, jint program, jint index, jint maxLength, jlong lengthAddress, jlong sizeAddress, jlong typeAddress, jlong nameAddress) { - glGetActiveAttribPROC glGetActiveAttrib = (glGetActiveAttribPROC)tlsGetFunction(534); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t size = (uintptr_t)sizeAddress; - uintptr_t type = (uintptr_t)typeAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetActiveAttrib(program, index, maxLength, length, size, type, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20C_nglGetAttribLocation(JNIEnv *__env, jclass clazz, jint program, jlong nameAddress) { - glGetAttribLocationPROC glGetAttribLocation = (glGetAttribLocationPROC)tlsGetFunction(535); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetAttribLocation(program, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetVertexAttribiv__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribivPROC glGetVertexAttribiv = (glGetVertexAttribivPROC)tlsGetFunction(536); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribiv(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetVertexAttribfv__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribfvPROC glGetVertexAttribfv = (glGetVertexAttribfvPROC)tlsGetFunction(537); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribfv(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetVertexAttribdv__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribdvPROC glGetVertexAttribdv = (glGetVertexAttribdvPROC)tlsGetFunction(538); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribdv(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglGetVertexAttribPointerv(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong pointerAddress) { - glGetVertexAttribPointervPROC glGetVertexAttribPointerv = (glGetVertexAttribPointervPROC)tlsGetFunction(539); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribPointerv(index, pname, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_nglDrawBuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong bufsAddress) { - glDrawBuffersPROC glDrawBuffers = (glDrawBuffersPROC)tlsGetFunction(540); - uintptr_t bufs = (uintptr_t)bufsAddress; - UNUSED_PARAM(clazz) - glDrawBuffers(n, bufs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glBlendEquationSeparate(JNIEnv *__env, jclass clazz, jint modeRGB, jint modeAlpha) { - glBlendEquationSeparatePROC glBlendEquationSeparate = (glBlendEquationSeparatePROC)tlsGetFunction(541); - UNUSED_PARAM(clazz) - glBlendEquationSeparate(modeRGB, modeAlpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glStencilOpSeparate(JNIEnv *__env, jclass clazz, jint face, jint sfail, jint dpfail, jint dppass) { - glStencilOpSeparatePROC glStencilOpSeparate = (glStencilOpSeparatePROC)tlsGetFunction(542); - UNUSED_PARAM(clazz) - glStencilOpSeparate(face, sfail, dpfail, dppass); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glStencilFuncSeparate(JNIEnv *__env, jclass clazz, jint face, jint func, jint ref, jint mask) { - glStencilFuncSeparatePROC glStencilFuncSeparate = (glStencilFuncSeparatePROC)tlsGetFunction(543); - UNUSED_PARAM(clazz) - glStencilFuncSeparate(face, func, ref, mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20C_glStencilMaskSeparate(JNIEnv *__env, jclass clazz, jint face, jint mask) { - glStencilMaskSeparatePROC glStencilMaskSeparate = (glStencilMaskSeparatePROC)tlsGetFunction(544); - UNUSED_PARAM(clazz) - glStencilMaskSeparate(face, mask); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL21C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL21C.c deleted file mode 100644 index 411bce5b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL21C.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glUniformMatrix2x3fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix3x2fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix2x4fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix4x2fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix3x4fvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix4x3fvPROC) (jint, jint, jboolean, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21C_nglUniformMatrix2x3fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix2x3fvPROC glUniformMatrix2x3fv = (glUniformMatrix2x3fvPROC)tlsGetFunction(545); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix2x3fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21C_nglUniformMatrix3x2fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix3x2fvPROC glUniformMatrix3x2fv = (glUniformMatrix3x2fvPROC)tlsGetFunction(546); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix3x2fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21C_nglUniformMatrix2x4fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix2x4fvPROC glUniformMatrix2x4fv = (glUniformMatrix2x4fvPROC)tlsGetFunction(547); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix2x4fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21C_nglUniformMatrix4x2fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix4x2fvPROC glUniformMatrix4x2fv = (glUniformMatrix4x2fvPROC)tlsGetFunction(548); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix4x2fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21C_nglUniformMatrix3x4fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix3x4fvPROC glUniformMatrix3x4fv = (glUniformMatrix3x4fvPROC)tlsGetFunction(549); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix3x4fv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21C_nglUniformMatrix4x3fv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix4x3fvPROC glUniformMatrix4x3fv = (glUniformMatrix4x3fvPROC)tlsGetFunction(550); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix4x3fv(location, count, transpose, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL30C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL30C.c deleted file mode 100644 index 6eb33332..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL30C.c +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef uintptr_t (APIENTRY *glGetStringiPROC) (jint, jint); -typedef void (APIENTRY *glClearBufferivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glClearBufferuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glClearBufferfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glClearBufferfiPROC) (jint, jint, jfloat, jint); -typedef void (APIENTRY *glVertexAttribI1iPROC) (jint, jint); -typedef void (APIENTRY *glVertexAttribI2iPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI3iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI4iPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI1uiPROC) (jint, jint); -typedef void (APIENTRY *glVertexAttribI2uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI3uiPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI4uiPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribI1ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI2ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI3ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4ivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI1uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI2uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI3uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4bvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4svPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4ubvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribI4usvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribIPointerPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribIivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribIuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform1uiPROC) (jint, jint); -typedef void (APIENTRY *glUniform2uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glUniform3uiPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glUniform4uiPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glUniform1uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glBindFragDataLocationPROC) (jint, jint, uintptr_t); -typedef jint (APIENTRY *glGetFragDataLocationPROC) (jint, uintptr_t); -typedef void (APIENTRY *glBeginConditionalRenderPROC) (jint, jint); -typedef void (APIENTRY *glEndConditionalRenderPROC) (void); -typedef uintptr_t (APIENTRY *glMapBufferRangePROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glFlushMappedBufferRangePROC) (jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glClampColorPROC) (jint, jint); -typedef jboolean (APIENTRY *glIsRenderbufferPROC) (jint); -typedef void (APIENTRY *glBindRenderbufferPROC) (jint, jint); -typedef void (APIENTRY *glDeleteRenderbuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenRenderbuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glRenderbufferStoragePROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glRenderbufferStorageMultisamplePROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glGetRenderbufferParameterivPROC) (jint, jint, uintptr_t); -typedef jboolean (APIENTRY *glIsFramebufferPROC) (jint); -typedef void (APIENTRY *glBindFramebufferPROC) (jint, jint); -typedef void (APIENTRY *glDeleteFramebuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenFramebuffersPROC) (jint, uintptr_t); -typedef jint (APIENTRY *glCheckFramebufferStatusPROC) (jint); -typedef void (APIENTRY *glFramebufferTexture1DPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTexture2DPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTexture3DPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferTextureLayerPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glFramebufferRenderbufferPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glGetFramebufferAttachmentParameterivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glBlitFramebufferPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glGenerateMipmapPROC) (jint); -typedef void (APIENTRY *glTexParameterIivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTexParameterIuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexParameterIivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTexParameterIuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glColorMaskiPROC) (jint, jboolean, jboolean, jboolean, jboolean); -typedef void (APIENTRY *glGetBooleani_vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetIntegeri_vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glEnableiPROC) (jint, jint); -typedef void (APIENTRY *glDisableiPROC) (jint, jint); -typedef jboolean (APIENTRY *glIsEnablediPROC) (jint, jint); -typedef void (APIENTRY *glBindBufferRangePROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glBindBufferBasePROC) (jint, jint, jint); -typedef void (APIENTRY *glBeginTransformFeedbackPROC) (jint); -typedef void (APIENTRY *glEndTransformFeedbackPROC) (void); -typedef void (APIENTRY *glTransformFeedbackVaryingsPROC) (jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glGetTransformFeedbackVaryingPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glBindVertexArrayPROC) (jint); -typedef void (APIENTRY *glDeleteVertexArraysPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenVertexArraysPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsVertexArrayPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL30C_nglGetStringi(JNIEnv *__env, jclass clazz, jint name, jint index) { - glGetStringiPROC glGetStringi = (glGetStringiPROC)tlsGetFunction(551); - UNUSED_PARAM(clazz) - return (jlong)glGetStringi(name, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglClearBufferiv__IIJ(JNIEnv *__env, jclass clazz, jint buffer, jint drawbuffer, jlong valueAddress) { - glClearBufferivPROC glClearBufferiv = (glClearBufferivPROC)tlsGetFunction(552); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glClearBufferiv(buffer, drawbuffer, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglClearBufferuiv__IIJ(JNIEnv *__env, jclass clazz, jint buffer, jint drawbuffer, jlong valueAddress) { - glClearBufferuivPROC glClearBufferuiv = (glClearBufferuivPROC)tlsGetFunction(553); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glClearBufferuiv(buffer, drawbuffer, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglClearBufferfv__IIJ(JNIEnv *__env, jclass clazz, jint buffer, jint drawbuffer, jlong valueAddress) { - glClearBufferfvPROC glClearBufferfv = (glClearBufferfvPROC)tlsGetFunction(554); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glClearBufferfv(buffer, drawbuffer, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glClearBufferfi(JNIEnv *__env, jclass clazz, jint buffer, jint drawbuffer, jfloat depth, jint stencil) { - glClearBufferfiPROC glClearBufferfi = (glClearBufferfiPROC)tlsGetFunction(555); - UNUSED_PARAM(clazz) - glClearBufferfi(buffer, drawbuffer, depth, stencil); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI1i(JNIEnv *__env, jclass clazz, jint index, jint x) { - glVertexAttribI1iPROC glVertexAttribI1i = (glVertexAttribI1iPROC)tlsGetFunction(556); - UNUSED_PARAM(clazz) - glVertexAttribI1i(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI2i(JNIEnv *__env, jclass clazz, jint index, jint x, jint y) { - glVertexAttribI2iPROC glVertexAttribI2i = (glVertexAttribI2iPROC)tlsGetFunction(557); - UNUSED_PARAM(clazz) - glVertexAttribI2i(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI3i(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z) { - glVertexAttribI3iPROC glVertexAttribI3i = (glVertexAttribI3iPROC)tlsGetFunction(558); - UNUSED_PARAM(clazz) - glVertexAttribI3i(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI4i(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z, jint w) { - glVertexAttribI4iPROC glVertexAttribI4i = (glVertexAttribI4iPROC)tlsGetFunction(559); - UNUSED_PARAM(clazz) - glVertexAttribI4i(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI1ui(JNIEnv *__env, jclass clazz, jint index, jint x) { - glVertexAttribI1uiPROC glVertexAttribI1ui = (glVertexAttribI1uiPROC)tlsGetFunction(560); - UNUSED_PARAM(clazz) - glVertexAttribI1ui(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI2ui(JNIEnv *__env, jclass clazz, jint index, jint x, jint y) { - glVertexAttribI2uiPROC glVertexAttribI2ui = (glVertexAttribI2uiPROC)tlsGetFunction(561); - UNUSED_PARAM(clazz) - glVertexAttribI2ui(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI3ui(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z) { - glVertexAttribI3uiPROC glVertexAttribI3ui = (glVertexAttribI3uiPROC)tlsGetFunction(562); - UNUSED_PARAM(clazz) - glVertexAttribI3ui(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glVertexAttribI4ui(JNIEnv *__env, jclass clazz, jint index, jint x, jint y, jint z, jint w) { - glVertexAttribI4uiPROC glVertexAttribI4ui = (glVertexAttribI4uiPROC)tlsGetFunction(563); - UNUSED_PARAM(clazz) - glVertexAttribI4ui(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI1iv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI1ivPROC glVertexAttribI1iv = (glVertexAttribI1ivPROC)tlsGetFunction(564); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI1iv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI2iv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI2ivPROC glVertexAttribI2iv = (glVertexAttribI2ivPROC)tlsGetFunction(565); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI2iv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI3iv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI3ivPROC glVertexAttribI3iv = (glVertexAttribI3ivPROC)tlsGetFunction(566); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI3iv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI4iv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4ivPROC glVertexAttribI4iv = (glVertexAttribI4ivPROC)tlsGetFunction(567); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4iv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI1uiv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI1uivPROC glVertexAttribI1uiv = (glVertexAttribI1uivPROC)tlsGetFunction(568); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI1uiv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI2uiv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI2uivPROC glVertexAttribI2uiv = (glVertexAttribI2uivPROC)tlsGetFunction(569); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI2uiv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI3uiv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI3uivPROC glVertexAttribI3uiv = (glVertexAttribI3uivPROC)tlsGetFunction(570); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI3uiv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI4uiv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4uivPROC glVertexAttribI4uiv = (glVertexAttribI4uivPROC)tlsGetFunction(571); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4uiv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI4bv(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4bvPROC glVertexAttribI4bv = (glVertexAttribI4bvPROC)tlsGetFunction(572); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4bv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI4sv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4svPROC glVertexAttribI4sv = (glVertexAttribI4svPROC)tlsGetFunction(573); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4sv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI4ubv(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4ubvPROC glVertexAttribI4ubv = (glVertexAttribI4ubvPROC)tlsGetFunction(574); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4ubv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribI4usv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribI4usvPROC glVertexAttribI4usv = (glVertexAttribI4usvPROC)tlsGetFunction(575); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribI4usv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglVertexAttribIPointer(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointerAddress) { - glVertexAttribIPointerPROC glVertexAttribIPointer = (glVertexAttribIPointerPROC)tlsGetFunction(576); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexAttribIPointer(index, size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetVertexAttribIiv__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribIivPROC glGetVertexAttribIiv = (glGetVertexAttribIivPROC)tlsGetFunction(577); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribIiv(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetVertexAttribIuiv__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribIuivPROC glGetVertexAttribIuiv = (glGetVertexAttribIuivPROC)tlsGetFunction(578); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribIuiv(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glUniform1ui(JNIEnv *__env, jclass clazz, jint location, jint v0) { - glUniform1uiPROC glUniform1ui = (glUniform1uiPROC)tlsGetFunction(579); - UNUSED_PARAM(clazz) - glUniform1ui(location, v0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glUniform2ui(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1) { - glUniform2uiPROC glUniform2ui = (glUniform2uiPROC)tlsGetFunction(580); - UNUSED_PARAM(clazz) - glUniform2ui(location, v0, v1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glUniform3ui(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2) { - glUniform3uiPROC glUniform3ui = (glUniform3uiPROC)tlsGetFunction(581); - UNUSED_PARAM(clazz) - glUniform3ui(location, v0, v1, v2); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glUniform4ui(JNIEnv *__env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3) { - glUniform4uiPROC glUniform4ui = (glUniform4uiPROC)tlsGetFunction(582); - UNUSED_PARAM(clazz) - glUniform4ui(location, v0, v1, v2, v3); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglUniform1uiv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1uivPROC glUniform1uiv = (glUniform1uivPROC)tlsGetFunction(583); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1uiv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglUniform2uiv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2uivPROC glUniform2uiv = (glUniform2uivPROC)tlsGetFunction(584); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2uiv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglUniform3uiv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3uivPROC glUniform3uiv = (glUniform3uivPROC)tlsGetFunction(585); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3uiv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglUniform4uiv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4uivPROC glUniform4uiv = (glUniform4uivPROC)tlsGetFunction(586); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4uiv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetUniformuiv__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformuivPROC glGetUniformuiv = (glGetUniformuivPROC)tlsGetFunction(587); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformuiv(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglBindFragDataLocation(JNIEnv *__env, jclass clazz, jint program, jint colorNumber, jlong nameAddress) { - glBindFragDataLocationPROC glBindFragDataLocation = (glBindFragDataLocationPROC)tlsGetFunction(588); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glBindFragDataLocation(program, colorNumber, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL30C_nglGetFragDataLocation(JNIEnv *__env, jclass clazz, jint program, jlong nameAddress) { - glGetFragDataLocationPROC glGetFragDataLocation = (glGetFragDataLocationPROC)tlsGetFunction(589); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetFragDataLocation(program, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBeginConditionalRender(JNIEnv *__env, jclass clazz, jint id, jint mode) { - glBeginConditionalRenderPROC glBeginConditionalRender = (glBeginConditionalRenderPROC)tlsGetFunction(590); - UNUSED_PARAM(clazz) - glBeginConditionalRender(id, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glEndConditionalRender(JNIEnv *__env, jclass clazz) { - glEndConditionalRenderPROC glEndConditionalRender = (glEndConditionalRenderPROC)tlsGetFunction(591); - UNUSED_PARAM(clazz) - glEndConditionalRender(); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL30C_nglMapBufferRange(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong length, jint access) { - glMapBufferRangePROC glMapBufferRange = (glMapBufferRangePROC)tlsGetFunction(592); - UNUSED_PARAM(clazz) - return (jlong)glMapBufferRange(target, (uintptr_t)offset, (uintptr_t)length, access); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glFlushMappedBufferRange(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong length) { - glFlushMappedBufferRangePROC glFlushMappedBufferRange = (glFlushMappedBufferRangePROC)tlsGetFunction(593); - UNUSED_PARAM(clazz) - glFlushMappedBufferRange(target, (uintptr_t)offset, (uintptr_t)length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glClampColor(JNIEnv *__env, jclass clazz, jint target, jint clamp) { - glClampColorPROC glClampColor = (glClampColorPROC)tlsGetFunction(594); - UNUSED_PARAM(clazz) - glClampColor(target, clamp); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30C_glIsRenderbuffer(JNIEnv *__env, jclass clazz, jint renderbuffer) { - glIsRenderbufferPROC glIsRenderbuffer = (glIsRenderbufferPROC)tlsGetFunction(595); - UNUSED_PARAM(clazz) - return glIsRenderbuffer(renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBindRenderbuffer(JNIEnv *__env, jclass clazz, jint target, jint renderbuffer) { - glBindRenderbufferPROC glBindRenderbuffer = (glBindRenderbufferPROC)tlsGetFunction(596); - UNUSED_PARAM(clazz) - glBindRenderbuffer(target, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglDeleteRenderbuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong renderbuffersAddress) { - glDeleteRenderbuffersPROC glDeleteRenderbuffers = (glDeleteRenderbuffersPROC)tlsGetFunction(597); - uintptr_t renderbuffers = (uintptr_t)renderbuffersAddress; - UNUSED_PARAM(clazz) - glDeleteRenderbuffers(n, renderbuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGenRenderbuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong renderbuffersAddress) { - glGenRenderbuffersPROC glGenRenderbuffers = (glGenRenderbuffersPROC)tlsGetFunction(598); - uintptr_t renderbuffers = (uintptr_t)renderbuffersAddress; - UNUSED_PARAM(clazz) - glGenRenderbuffers(n, renderbuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glRenderbufferStorage(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint width, jint height) { - glRenderbufferStoragePROC glRenderbufferStorage = (glRenderbufferStoragePROC)tlsGetFunction(599); - UNUSED_PARAM(clazz) - glRenderbufferStorage(target, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glRenderbufferStorageMultisample(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height) { - glRenderbufferStorageMultisamplePROC glRenderbufferStorageMultisample = (glRenderbufferStorageMultisamplePROC)tlsGetFunction(600); - UNUSED_PARAM(clazz) - glRenderbufferStorageMultisample(target, samples, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetRenderbufferParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetRenderbufferParameterivPROC glGetRenderbufferParameteriv = (glGetRenderbufferParameterivPROC)tlsGetFunction(601); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetRenderbufferParameteriv(target, pname, params); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30C_glIsFramebuffer(JNIEnv *__env, jclass clazz, jint framebuffer) { - glIsFramebufferPROC glIsFramebuffer = (glIsFramebufferPROC)tlsGetFunction(602); - UNUSED_PARAM(clazz) - return glIsFramebuffer(framebuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBindFramebuffer(JNIEnv *__env, jclass clazz, jint target, jint framebuffer) { - glBindFramebufferPROC glBindFramebuffer = (glBindFramebufferPROC)tlsGetFunction(603); - UNUSED_PARAM(clazz) - glBindFramebuffer(target, framebuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglDeleteFramebuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong framebuffersAddress) { - glDeleteFramebuffersPROC glDeleteFramebuffers = (glDeleteFramebuffersPROC)tlsGetFunction(604); - uintptr_t framebuffers = (uintptr_t)framebuffersAddress; - UNUSED_PARAM(clazz) - glDeleteFramebuffers(n, framebuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGenFramebuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong framebuffersAddress) { - glGenFramebuffersPROC glGenFramebuffers = (glGenFramebuffersPROC)tlsGetFunction(605); - uintptr_t framebuffers = (uintptr_t)framebuffersAddress; - UNUSED_PARAM(clazz) - glGenFramebuffers(n, framebuffers); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL30C_glCheckFramebufferStatus(JNIEnv *__env, jclass clazz, jint target) { - glCheckFramebufferStatusPROC glCheckFramebufferStatus = (glCheckFramebufferStatusPROC)tlsGetFunction(606); - UNUSED_PARAM(clazz) - return glCheckFramebufferStatus(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glFramebufferTexture1D(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level) { - glFramebufferTexture1DPROC glFramebufferTexture1D = (glFramebufferTexture1DPROC)tlsGetFunction(607); - UNUSED_PARAM(clazz) - glFramebufferTexture1D(target, attachment, textarget, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glFramebufferTexture2D(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level) { - glFramebufferTexture2DPROC glFramebufferTexture2D = (glFramebufferTexture2DPROC)tlsGetFunction(608); - UNUSED_PARAM(clazz) - glFramebufferTexture2D(target, attachment, textarget, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glFramebufferTexture3D(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jint layer) { - glFramebufferTexture3DPROC glFramebufferTexture3D = (glFramebufferTexture3DPROC)tlsGetFunction(609); - UNUSED_PARAM(clazz) - glFramebufferTexture3D(target, attachment, textarget, texture, level, layer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glFramebufferTextureLayer(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer) { - glFramebufferTextureLayerPROC glFramebufferTextureLayer = (glFramebufferTextureLayerPROC)tlsGetFunction(610); - UNUSED_PARAM(clazz) - glFramebufferTextureLayer(target, attachment, texture, level, layer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glFramebufferRenderbuffer(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { - glFramebufferRenderbufferPROC glFramebufferRenderbuffer = (glFramebufferRenderbufferPROC)tlsGetFunction(611); - UNUSED_PARAM(clazz) - glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetFramebufferAttachmentParameteriv__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint pname, jlong paramsAddress) { - glGetFramebufferAttachmentParameterivPROC glGetFramebufferAttachmentParameteriv = (glGetFramebufferAttachmentParameterivPROC)tlsGetFunction(612); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBlitFramebuffer(JNIEnv *__env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { - glBlitFramebufferPROC glBlitFramebuffer = (glBlitFramebufferPROC)tlsGetFunction(613); - UNUSED_PARAM(clazz) - glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glGenerateMipmap(JNIEnv *__env, jclass clazz, jint target) { - glGenerateMipmapPROC glGenerateMipmap = (glGenerateMipmapPROC)tlsGetFunction(614); - UNUSED_PARAM(clazz) - glGenerateMipmap(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglTexParameterIiv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexParameterIivPROC glTexParameterIiv = (glTexParameterIivPROC)tlsGetFunction(615); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexParameterIiv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglTexParameterIuiv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glTexParameterIuivPROC glTexParameterIuiv = (glTexParameterIuivPROC)tlsGetFunction(616); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTexParameterIuiv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetTexParameterIiv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetTexParameterIivPROC glGetTexParameterIiv = (glGetTexParameterIivPROC)tlsGetFunction(617); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexParameterIiv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetTexParameterIuiv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetTexParameterIuivPROC glGetTexParameterIuiv = (glGetTexParameterIuivPROC)tlsGetFunction(618); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTexParameterIuiv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glColorMaski(JNIEnv *__env, jclass clazz, jint buf, jboolean r, jboolean g, jboolean b, jboolean a) { - glColorMaskiPROC glColorMaski = (glColorMaskiPROC)tlsGetFunction(619); - UNUSED_PARAM(clazz) - glColorMaski(buf, r, g, b, a); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetBooleani_1v(JNIEnv *__env, jclass clazz, jint target, jint index, jlong dataAddress) { - glGetBooleani_vPROC glGetBooleani_v = (glGetBooleani_vPROC)tlsGetFunction(620); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetBooleani_v(target, index, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetIntegeri_1v__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong dataAddress) { - glGetIntegeri_vPROC glGetIntegeri_v = (glGetIntegeri_vPROC)tlsGetFunction(621); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetIntegeri_v(target, index, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glEnablei(JNIEnv *__env, jclass clazz, jint cap, jint index) { - glEnableiPROC glEnablei = (glEnableiPROC)tlsGetFunction(622); - UNUSED_PARAM(clazz) - glEnablei(cap, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glDisablei(JNIEnv *__env, jclass clazz, jint target, jint index) { - glDisableiPROC glDisablei = (glDisableiPROC)tlsGetFunction(623); - UNUSED_PARAM(clazz) - glDisablei(target, index); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30C_glIsEnabledi(JNIEnv *__env, jclass clazz, jint target, jint index) { - glIsEnablediPROC glIsEnabledi = (glIsEnablediPROC)tlsGetFunction(624); - UNUSED_PARAM(clazz) - return glIsEnabledi(target, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBindBufferRange(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong size) { - glBindBufferRangePROC glBindBufferRange = (glBindBufferRangePROC)tlsGetFunction(625); - UNUSED_PARAM(clazz) - glBindBufferRange(target, index, buffer, (uintptr_t)offset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBindBufferBase(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer) { - glBindBufferBasePROC glBindBufferBase = (glBindBufferBasePROC)tlsGetFunction(626); - UNUSED_PARAM(clazz) - glBindBufferBase(target, index, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBeginTransformFeedback(JNIEnv *__env, jclass clazz, jint primitiveMode) { - glBeginTransformFeedbackPROC glBeginTransformFeedback = (glBeginTransformFeedbackPROC)tlsGetFunction(627); - UNUSED_PARAM(clazz) - glBeginTransformFeedback(primitiveMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glEndTransformFeedback(JNIEnv *__env, jclass clazz) { - glEndTransformFeedbackPROC glEndTransformFeedback = (glEndTransformFeedbackPROC)tlsGetFunction(628); - UNUSED_PARAM(clazz) - glEndTransformFeedback(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglTransformFeedbackVaryings(JNIEnv *__env, jclass clazz, jint program, jint count, jlong varyingsAddress, jint bufferMode) { - glTransformFeedbackVaryingsPROC glTransformFeedbackVaryings = (glTransformFeedbackVaryingsPROC)tlsGetFunction(629); - uintptr_t varyings = (uintptr_t)varyingsAddress; - UNUSED_PARAM(clazz) - glTransformFeedbackVaryings(program, count, varyings, bufferMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGetTransformFeedbackVarying__IIIJJJJ(JNIEnv *__env, jclass clazz, jint program, jint index, jint bufSize, jlong lengthAddress, jlong sizeAddress, jlong typeAddress, jlong nameAddress) { - glGetTransformFeedbackVaryingPROC glGetTransformFeedbackVarying = (glGetTransformFeedbackVaryingPROC)tlsGetFunction(630); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t size = (uintptr_t)sizeAddress; - uintptr_t type = (uintptr_t)typeAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_glBindVertexArray(JNIEnv *__env, jclass clazz, jint array) { - glBindVertexArrayPROC glBindVertexArray = (glBindVertexArrayPROC)tlsGetFunction(631); - UNUSED_PARAM(clazz) - glBindVertexArray(array); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglDeleteVertexArrays__IJ(JNIEnv *__env, jclass clazz, jint n, jlong arraysAddress) { - glDeleteVertexArraysPROC glDeleteVertexArrays = (glDeleteVertexArraysPROC)tlsGetFunction(632); - uintptr_t arrays = (uintptr_t)arraysAddress; - UNUSED_PARAM(clazz) - glDeleteVertexArrays(n, arrays); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30C_nglGenVertexArrays__IJ(JNIEnv *__env, jclass clazz, jint n, jlong arraysAddress) { - glGenVertexArraysPROC glGenVertexArrays = (glGenVertexArraysPROC)tlsGetFunction(633); - uintptr_t arrays = (uintptr_t)arraysAddress; - UNUSED_PARAM(clazz) - glGenVertexArrays(n, arrays); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30C_glIsVertexArray(JNIEnv *__env, jclass clazz, jint array) { - glIsVertexArrayPROC glIsVertexArray = (glIsVertexArrayPROC)tlsGetFunction(634); - UNUSED_PARAM(clazz) - return glIsVertexArray(array); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL31C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL31C.c deleted file mode 100644 index c30f32e1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL31C.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDrawArraysInstancedPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glDrawElementsInstancedPROC) (jint, jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glCopyBufferSubDataPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glPrimitiveRestartIndexPROC) (jint); -typedef void (APIENTRY *glTexBufferPROC) (jint, jint, jint); -typedef void (APIENTRY *glGetUniformIndicesPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetActiveUniformsivPROC) (jint, jint, uintptr_t, jint, uintptr_t); -typedef void (APIENTRY *glGetActiveUniformNamePROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetUniformBlockIndexPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetActiveUniformBlockivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetActiveUniformBlockNamePROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glUniformBlockBindingPROC) (jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_glDrawArraysInstanced(JNIEnv *__env, jclass clazz, jint mode, jint first, jint count, jint primcount) { - glDrawArraysInstancedPROC glDrawArraysInstanced = (glDrawArraysInstancedPROC)tlsGetFunction(635); - UNUSED_PARAM(clazz) - glDrawArraysInstanced(mode, first, count, primcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_nglDrawElementsInstanced(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress, jint primcount) { - glDrawElementsInstancedPROC glDrawElementsInstanced = (glDrawElementsInstancedPROC)tlsGetFunction(636); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElementsInstanced(mode, count, type, indices, primcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_glCopyBufferSubData(JNIEnv *__env, jclass clazz, jint readTarget, jint writeTarget, jlong readOffset, jlong writeOffset, jlong size) { - glCopyBufferSubDataPROC glCopyBufferSubData = (glCopyBufferSubDataPROC)tlsGetFunction(637); - UNUSED_PARAM(clazz) - glCopyBufferSubData(readTarget, writeTarget, (uintptr_t)readOffset, (uintptr_t)writeOffset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_glPrimitiveRestartIndex(JNIEnv *__env, jclass clazz, jint index) { - glPrimitiveRestartIndexPROC glPrimitiveRestartIndex = (glPrimitiveRestartIndexPROC)tlsGetFunction(638); - UNUSED_PARAM(clazz) - glPrimitiveRestartIndex(index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_glTexBuffer(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint buffer) { - glTexBufferPROC glTexBuffer = (glTexBufferPROC)tlsGetFunction(639); - UNUSED_PARAM(clazz) - glTexBuffer(target, internalformat, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_nglGetUniformIndices__IIJJ(JNIEnv *__env, jclass clazz, jint program, jint uniformCount, jlong uniformNamesAddress, jlong uniformIndicesAddress) { - glGetUniformIndicesPROC glGetUniformIndices = (glGetUniformIndicesPROC)tlsGetFunction(640); - uintptr_t uniformNames = (uintptr_t)uniformNamesAddress; - uintptr_t uniformIndices = (uintptr_t)uniformIndicesAddress; - UNUSED_PARAM(clazz) - glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_nglGetActiveUniformsiv__IIJIJ(JNIEnv *__env, jclass clazz, jint program, jint uniformCount, jlong uniformIndicesAddress, jint pname, jlong paramsAddress) { - glGetActiveUniformsivPROC glGetActiveUniformsiv = (glGetActiveUniformsivPROC)tlsGetFunction(641); - uintptr_t uniformIndices = (uintptr_t)uniformIndicesAddress; - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_nglGetActiveUniformName__IIIJJ(JNIEnv *__env, jclass clazz, jint program, jint uniformIndex, jint bufSize, jlong lengthAddress, jlong uniformNameAddress) { - glGetActiveUniformNamePROC glGetActiveUniformName = (glGetActiveUniformNamePROC)tlsGetFunction(642); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t uniformName = (uintptr_t)uniformNameAddress; - UNUSED_PARAM(clazz) - glGetActiveUniformName(program, uniformIndex, bufSize, length, uniformName); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL31C_nglGetUniformBlockIndex(JNIEnv *__env, jclass clazz, jint program, jlong uniformBlockNameAddress) { - glGetUniformBlockIndexPROC glGetUniformBlockIndex = (glGetUniformBlockIndexPROC)tlsGetFunction(643); - uintptr_t uniformBlockName = (uintptr_t)uniformBlockNameAddress; - UNUSED_PARAM(clazz) - return glGetUniformBlockIndex(program, uniformBlockName); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_nglGetActiveUniformBlockiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint uniformBlockIndex, jint pname, jlong paramsAddress) { - glGetActiveUniformBlockivPROC glGetActiveUniformBlockiv = (glGetActiveUniformBlockivPROC)tlsGetFunction(644); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_nglGetActiveUniformBlockName__IIIJJ(JNIEnv *__env, jclass clazz, jint program, jint uniformBlockIndex, jint bufSize, jlong lengthAddress, jlong uniformBlockNameAddress) { - glGetActiveUniformBlockNamePROC glGetActiveUniformBlockName = (glGetActiveUniformBlockNamePROC)tlsGetFunction(645); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t uniformBlockName = (uintptr_t)uniformBlockNameAddress; - UNUSED_PARAM(clazz) - glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31C_glUniformBlockBinding(JNIEnv *__env, jclass clazz, jint program, jint uniformBlockIndex, jint uniformBlockBinding) { - glUniformBlockBindingPROC glUniformBlockBinding = (glUniformBlockBindingPROC)tlsGetFunction(646); - UNUSED_PARAM(clazz) - glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL32C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL32C.c deleted file mode 100644 index 74d65594..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL32C.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetBufferParameteri64vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glDrawElementsBaseVertexPROC) (jint, jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glDrawRangeElementsBaseVertexPROC) (jint, jint, jint, jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glDrawElementsInstancedBaseVertexPROC) (jint, jint, jint, uintptr_t, jint, jint); -typedef void (APIENTRY *glMultiDrawElementsBaseVertexPROC) (jint, uintptr_t, jint, uintptr_t, jint, uintptr_t); -typedef void (APIENTRY *glProvokingVertexPROC) (jint); -typedef void (APIENTRY *glTexImage2DMultisamplePROC) (jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTexImage3DMultisamplePROC) (jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glGetMultisamplefvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glSampleMaskiPROC) (jint, jint); -typedef void (APIENTRY *glFramebufferTexturePROC) (jint, jint, jint, jint); -typedef uintptr_t (APIENTRY *glFenceSyncPROC) (jint, jint); -typedef jboolean (APIENTRY *glIsSyncPROC) (uintptr_t); -typedef void (APIENTRY *glDeleteSyncPROC) (uintptr_t); -typedef jint (APIENTRY *glClientWaitSyncPROC) (uintptr_t, jint, jlong); -typedef void (APIENTRY *glWaitSyncPROC) (uintptr_t, jint, jlong); -typedef void (APIENTRY *glGetInteger64vPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetInteger64i_vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetSyncivPROC) (uintptr_t, jint, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglGetBufferParameteri64v__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetBufferParameteri64vPROC glGetBufferParameteri64v = (glGetBufferParameteri64vPROC)tlsGetFunction(647); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetBufferParameteri64v(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglDrawElementsBaseVertex(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress, jint basevertex) { - glDrawElementsBaseVertexPROC glDrawElementsBaseVertex = (glDrawElementsBaseVertexPROC)tlsGetFunction(648); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElementsBaseVertex(mode, count, type, indices, basevertex); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglDrawRangeElementsBaseVertex(JNIEnv *__env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indicesAddress, jint basevertex) { - glDrawRangeElementsBaseVertexPROC glDrawRangeElementsBaseVertex = (glDrawRangeElementsBaseVertexPROC)tlsGetFunction(649); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglDrawElementsInstancedBaseVertex(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress, jint primcount, jint basevertex) { - glDrawElementsInstancedBaseVertexPROC glDrawElementsInstancedBaseVertex = (glDrawElementsInstancedBaseVertexPROC)tlsGetFunction(650); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglMultiDrawElementsBaseVertex__IJIJIJ(JNIEnv *__env, jclass clazz, jint mode, jlong countAddress, jint type, jlong indicesAddress, jint drawcount, jlong basevertexAddress) { - glMultiDrawElementsBaseVertexPROC glMultiDrawElementsBaseVertex = (glMultiDrawElementsBaseVertexPROC)tlsGetFunction(651); - uintptr_t count = (uintptr_t)countAddress; - uintptr_t indices = (uintptr_t)indicesAddress; - uintptr_t basevertex = (uintptr_t)basevertexAddress; - UNUSED_PARAM(clazz) - glMultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_glProvokingVertex(JNIEnv *__env, jclass clazz, jint mode) { - glProvokingVertexPROC glProvokingVertex = (glProvokingVertexPROC)tlsGetFunction(652); - UNUSED_PARAM(clazz) - glProvokingVertex(mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_glTexImage2DMultisample(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) { - glTexImage2DMultisamplePROC glTexImage2DMultisample = (glTexImage2DMultisamplePROC)tlsGetFunction(653); - UNUSED_PARAM(clazz) - glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_glTexImage3DMultisample(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) { - glTexImage3DMultisamplePROC glTexImage3DMultisample = (glTexImage3DMultisamplePROC)tlsGetFunction(654); - UNUSED_PARAM(clazz) - glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglGetMultisamplefv__IIJ(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong valAddress) { - glGetMultisamplefvPROC glGetMultisamplefv = (glGetMultisamplefvPROC)tlsGetFunction(655); - uintptr_t val = (uintptr_t)valAddress; - UNUSED_PARAM(clazz) - glGetMultisamplefv(pname, index, val); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_glSampleMaski(JNIEnv *__env, jclass clazz, jint index, jint mask) { - glSampleMaskiPROC glSampleMaski = (glSampleMaskiPROC)tlsGetFunction(656); - UNUSED_PARAM(clazz) - glSampleMaski(index, mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_glFramebufferTexture(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level) { - glFramebufferTexturePROC glFramebufferTexture = (glFramebufferTexturePROC)tlsGetFunction(657); - UNUSED_PARAM(clazz) - glFramebufferTexture(target, attachment, texture, level); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL32C_glFenceSync(JNIEnv *__env, jclass clazz, jint condition, jint flags) { - glFenceSyncPROC glFenceSync = (glFenceSyncPROC)tlsGetFunction(658); - UNUSED_PARAM(clazz) - return (jlong)glFenceSync(condition, flags); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL32C_nglIsSync(JNIEnv *__env, jclass clazz, jlong syncAddress) { - glIsSyncPROC glIsSync = (glIsSyncPROC)tlsGetFunction(659); - uintptr_t sync = (uintptr_t)syncAddress; - UNUSED_PARAM(clazz) - return glIsSync(sync); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglDeleteSync(JNIEnv *__env, jclass clazz, jlong syncAddress) { - glDeleteSyncPROC glDeleteSync = (glDeleteSyncPROC)tlsGetFunction(660); - uintptr_t sync = (uintptr_t)syncAddress; - UNUSED_PARAM(clazz) - glDeleteSync(sync); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL32C_nglClientWaitSync(JNIEnv *__env, jclass clazz, jlong syncAddress, jint flags, jlong timeout) { - glClientWaitSyncPROC glClientWaitSync = (glClientWaitSyncPROC)tlsGetFunction(661); - uintptr_t sync = (uintptr_t)syncAddress; - UNUSED_PARAM(clazz) - return glClientWaitSync(sync, flags, timeout); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglWaitSync(JNIEnv *__env, jclass clazz, jlong syncAddress, jint flags, jlong timeout) { - glWaitSyncPROC glWaitSync = (glWaitSyncPROC)tlsGetFunction(662); - uintptr_t sync = (uintptr_t)syncAddress; - UNUSED_PARAM(clazz) - glWaitSync(sync, flags, timeout); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglGetInteger64v__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glGetInteger64vPROC glGetInteger64v = (glGetInteger64vPROC)tlsGetFunction(663); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetInteger64v(pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglGetInteger64i_1v__IIJ(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong paramsAddress) { - glGetInteger64i_vPROC glGetInteger64i_v = (glGetInteger64i_vPROC)tlsGetFunction(664); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetInteger64i_v(pname, index, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32C_nglGetSynciv__JIIJJ(JNIEnv *__env, jclass clazz, jlong syncAddress, jint pname, jint bufSize, jlong lengthAddress, jlong valuesAddress) { - glGetSyncivPROC glGetSynciv = (glGetSyncivPROC)tlsGetFunction(665); - uintptr_t sync = (uintptr_t)syncAddress; - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetSynciv(sync, pname, bufSize, length, values); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL33.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL33.c deleted file mode 100644 index b36e6196..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL33.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexP2uiPROC) (jint, jint); -typedef void (APIENTRY *glVertexP3uiPROC) (jint, jint); -typedef void (APIENTRY *glVertexP4uiPROC) (jint, jint); -typedef void (APIENTRY *glVertexP2uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexP3uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexP4uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glTexCoordP1uiPROC) (jint, jint); -typedef void (APIENTRY *glTexCoordP2uiPROC) (jint, jint); -typedef void (APIENTRY *glTexCoordP3uiPROC) (jint, jint); -typedef void (APIENTRY *glTexCoordP4uiPROC) (jint, jint); -typedef void (APIENTRY *glTexCoordP1uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glTexCoordP2uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glTexCoordP3uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glTexCoordP4uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoordP1uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoordP2uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoordP3uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoordP4uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glMultiTexCoordP1uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoordP2uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoordP3uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoordP4uivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glNormalP3uiPROC) (jint, jint); -typedef void (APIENTRY *glNormalP3uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glColorP3uiPROC) (jint, jint); -typedef void (APIENTRY *glColorP4uiPROC) (jint, jint); -typedef void (APIENTRY *glColorP3uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glColorP4uivPROC) (jint, uintptr_t); -typedef void (APIENTRY *glSecondaryColorP3uiPROC) (jint, jint); -typedef void (APIENTRY *glSecondaryColorP3uivPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glVertexP2ui(JNIEnv *__env, jclass clazz, jint type, jint value) { - glVertexP2uiPROC glVertexP2ui = (glVertexP2uiPROC)tlsGetFunction(686); - UNUSED_PARAM(clazz) - glVertexP2ui(type, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glVertexP3ui(JNIEnv *__env, jclass clazz, jint type, jint value) { - glVertexP3uiPROC glVertexP3ui = (glVertexP3uiPROC)tlsGetFunction(687); - UNUSED_PARAM(clazz) - glVertexP3ui(type, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glVertexP4ui(JNIEnv *__env, jclass clazz, jint type, jint value) { - glVertexP4uiPROC glVertexP4ui = (glVertexP4uiPROC)tlsGetFunction(688); - UNUSED_PARAM(clazz) - glVertexP4ui(type, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP2uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong valueAddress) { - glVertexP2uivPROC glVertexP2uiv = (glVertexP2uivPROC)tlsGetFunction(689); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glVertexP2uiv(type, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP3uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong valueAddress) { - glVertexP3uivPROC glVertexP3uiv = (glVertexP3uivPROC)tlsGetFunction(690); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glVertexP3uiv(type, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP4uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong valueAddress) { - glVertexP4uivPROC glVertexP4uiv = (glVertexP4uivPROC)tlsGetFunction(691); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glVertexP4uiv(type, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glTexCoordP1ui(JNIEnv *__env, jclass clazz, jint type, jint coords) { - glTexCoordP1uiPROC glTexCoordP1ui = (glTexCoordP1uiPROC)tlsGetFunction(692); - UNUSED_PARAM(clazz) - glTexCoordP1ui(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glTexCoordP2ui(JNIEnv *__env, jclass clazz, jint type, jint coords) { - glTexCoordP2uiPROC glTexCoordP2ui = (glTexCoordP2uiPROC)tlsGetFunction(693); - UNUSED_PARAM(clazz) - glTexCoordP2ui(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glTexCoordP3ui(JNIEnv *__env, jclass clazz, jint type, jint coords) { - glTexCoordP3uiPROC glTexCoordP3ui = (glTexCoordP3uiPROC)tlsGetFunction(694); - UNUSED_PARAM(clazz) - glTexCoordP3ui(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glTexCoordP4ui(JNIEnv *__env, jclass clazz, jint type, jint coords) { - glTexCoordP4uiPROC glTexCoordP4ui = (glTexCoordP4uiPROC)tlsGetFunction(695); - UNUSED_PARAM(clazz) - glTexCoordP4ui(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP1uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong coordsAddress) { - glTexCoordP1uivPROC glTexCoordP1uiv = (glTexCoordP1uivPROC)tlsGetFunction(696); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glTexCoordP1uiv(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP2uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong coordsAddress) { - glTexCoordP2uivPROC glTexCoordP2uiv = (glTexCoordP2uivPROC)tlsGetFunction(697); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glTexCoordP2uiv(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP3uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong coordsAddress) { - glTexCoordP3uivPROC glTexCoordP3uiv = (glTexCoordP3uivPROC)tlsGetFunction(698); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glTexCoordP3uiv(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP4uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong coordsAddress) { - glTexCoordP4uivPROC glTexCoordP4uiv = (glTexCoordP4uivPROC)tlsGetFunction(699); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glTexCoordP4uiv(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glMultiTexCoordP1ui(JNIEnv *__env, jclass clazz, jint texture, jint type, jint coords) { - glMultiTexCoordP1uiPROC glMultiTexCoordP1ui = (glMultiTexCoordP1uiPROC)tlsGetFunction(700); - UNUSED_PARAM(clazz) - glMultiTexCoordP1ui(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glMultiTexCoordP2ui(JNIEnv *__env, jclass clazz, jint texture, jint type, jint coords) { - glMultiTexCoordP2uiPROC glMultiTexCoordP2ui = (glMultiTexCoordP2uiPROC)tlsGetFunction(701); - UNUSED_PARAM(clazz) - glMultiTexCoordP2ui(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glMultiTexCoordP3ui(JNIEnv *__env, jclass clazz, jint texture, jint type, jint coords) { - glMultiTexCoordP3uiPROC glMultiTexCoordP3ui = (glMultiTexCoordP3uiPROC)tlsGetFunction(702); - UNUSED_PARAM(clazz) - glMultiTexCoordP3ui(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glMultiTexCoordP4ui(JNIEnv *__env, jclass clazz, jint texture, jint type, jint coords) { - glMultiTexCoordP4uiPROC glMultiTexCoordP4ui = (glMultiTexCoordP4uiPROC)tlsGetFunction(703); - UNUSED_PARAM(clazz) - glMultiTexCoordP4ui(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP1uiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint type, jlong coordsAddress) { - glMultiTexCoordP1uivPROC glMultiTexCoordP1uiv = (glMultiTexCoordP1uivPROC)tlsGetFunction(704); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glMultiTexCoordP1uiv(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP2uiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint type, jlong coordsAddress) { - glMultiTexCoordP2uivPROC glMultiTexCoordP2uiv = (glMultiTexCoordP2uivPROC)tlsGetFunction(705); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glMultiTexCoordP2uiv(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP3uiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint type, jlong coordsAddress) { - glMultiTexCoordP3uivPROC glMultiTexCoordP3uiv = (glMultiTexCoordP3uivPROC)tlsGetFunction(706); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glMultiTexCoordP3uiv(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP4uiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint type, jlong coordsAddress) { - glMultiTexCoordP4uivPROC glMultiTexCoordP4uiv = (glMultiTexCoordP4uivPROC)tlsGetFunction(707); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glMultiTexCoordP4uiv(texture, type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glNormalP3ui(JNIEnv *__env, jclass clazz, jint type, jint coords) { - glNormalP3uiPROC glNormalP3ui = (glNormalP3uiPROC)tlsGetFunction(708); - UNUSED_PARAM(clazz) - glNormalP3ui(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglNormalP3uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong coordsAddress) { - glNormalP3uivPROC glNormalP3uiv = (glNormalP3uivPROC)tlsGetFunction(709); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glNormalP3uiv(type, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glColorP3ui(JNIEnv *__env, jclass clazz, jint type, jint color) { - glColorP3uiPROC glColorP3ui = (glColorP3uiPROC)tlsGetFunction(710); - UNUSED_PARAM(clazz) - glColorP3ui(type, color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glColorP4ui(JNIEnv *__env, jclass clazz, jint type, jint color) { - glColorP4uiPROC glColorP4ui = (glColorP4uiPROC)tlsGetFunction(711); - UNUSED_PARAM(clazz) - glColorP4ui(type, color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglColorP3uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong colorAddress) { - glColorP3uivPROC glColorP3uiv = (glColorP3uivPROC)tlsGetFunction(712); - uintptr_t color = (uintptr_t)colorAddress; - UNUSED_PARAM(clazz) - glColorP3uiv(type, color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglColorP4uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong colorAddress) { - glColorP4uivPROC glColorP4uiv = (glColorP4uivPROC)tlsGetFunction(713); - uintptr_t color = (uintptr_t)colorAddress; - UNUSED_PARAM(clazz) - glColorP4uiv(type, color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_glSecondaryColorP3ui(JNIEnv *__env, jclass clazz, jint type, jint color) { - glSecondaryColorP3uiPROC glSecondaryColorP3ui = (glSecondaryColorP3uiPROC)tlsGetFunction(714); - UNUSED_PARAM(clazz) - glSecondaryColorP3ui(type, color); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSecondaryColorP3uiv__IJ(JNIEnv *__env, jclass clazz, jint type, jlong colorAddress) { - glSecondaryColorP3uivPROC glSecondaryColorP3uiv = (glSecondaryColorP3uivPROC)tlsGetFunction(715); - uintptr_t color = (uintptr_t)colorAddress; - UNUSED_PARAM(clazz) - glSecondaryColorP3uiv(type, color); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL33C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL33C.c deleted file mode 100644 index 83ce9515..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL33C.c +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBindFragDataLocationIndexedPROC) (jint, jint, jint, uintptr_t); -typedef jint (APIENTRY *glGetFragDataIndexPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenSamplersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteSamplersPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsSamplerPROC) (jint); -typedef void (APIENTRY *glBindSamplerPROC) (jint, jint); -typedef void (APIENTRY *glSamplerParameteriPROC) (jint, jint, jint); -typedef void (APIENTRY *glSamplerParameterfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glSamplerParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glSamplerParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glSamplerParameterIivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glSamplerParameterIuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetSamplerParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetSamplerParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetSamplerParameterIivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetSamplerParameterIuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glQueryCounterPROC) (jint, jint); -typedef void (APIENTRY *glGetQueryObjecti64vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryObjectui64vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribDivisorPROC) (jint, jint); -typedef void (APIENTRY *glVertexAttribP1uiPROC) (jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexAttribP2uiPROC) (jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexAttribP3uiPROC) (jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexAttribP4uiPROC) (jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexAttribP1uivPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glVertexAttribP2uivPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glVertexAttribP3uivPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glVertexAttribP4uivPROC) (jint, jint, jboolean, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglBindFragDataLocationIndexed(JNIEnv *__env, jclass clazz, jint program, jint colorNumber, jint index, jlong nameAddress) { - glBindFragDataLocationIndexedPROC glBindFragDataLocationIndexed = (glBindFragDataLocationIndexedPROC)tlsGetFunction(666); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glBindFragDataLocationIndexed(program, colorNumber, index, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL33C_nglGetFragDataIndex(JNIEnv *__env, jclass clazz, jint program, jlong nameAddress) { - glGetFragDataIndexPROC glGetFragDataIndex = (glGetFragDataIndexPROC)tlsGetFunction(667); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetFragDataIndex(program, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglGenSamplers__IJ(JNIEnv *__env, jclass clazz, jint count, jlong samplersAddress) { - glGenSamplersPROC glGenSamplers = (glGenSamplersPROC)tlsGetFunction(668); - uintptr_t samplers = (uintptr_t)samplersAddress; - UNUSED_PARAM(clazz) - glGenSamplers(count, samplers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglDeleteSamplers__IJ(JNIEnv *__env, jclass clazz, jint count, jlong samplersAddress) { - glDeleteSamplersPROC glDeleteSamplers = (glDeleteSamplersPROC)tlsGetFunction(669); - uintptr_t samplers = (uintptr_t)samplersAddress; - UNUSED_PARAM(clazz) - glDeleteSamplers(count, samplers); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL33C_glIsSampler(JNIEnv *__env, jclass clazz, jint sampler) { - glIsSamplerPROC glIsSampler = (glIsSamplerPROC)tlsGetFunction(670); - UNUSED_PARAM(clazz) - return glIsSampler(sampler); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glBindSampler(JNIEnv *__env, jclass clazz, jint unit, jint sampler) { - glBindSamplerPROC glBindSampler = (glBindSamplerPROC)tlsGetFunction(671); - UNUSED_PARAM(clazz) - glBindSampler(unit, sampler); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glSamplerParameteri(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jint param) { - glSamplerParameteriPROC glSamplerParameteri = (glSamplerParameteriPROC)tlsGetFunction(672); - UNUSED_PARAM(clazz) - glSamplerParameteri(sampler, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glSamplerParameterf(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jfloat param) { - glSamplerParameterfPROC glSamplerParameterf = (glSamplerParameterfPROC)tlsGetFunction(673); - UNUSED_PARAM(clazz) - glSamplerParameterf(sampler, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglSamplerParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glSamplerParameterivPROC glSamplerParameteriv = (glSamplerParameterivPROC)tlsGetFunction(674); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glSamplerParameteriv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglSamplerParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glSamplerParameterfvPROC glSamplerParameterfv = (glSamplerParameterfvPROC)tlsGetFunction(675); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glSamplerParameterfv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglSamplerParameterIiv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glSamplerParameterIivPROC glSamplerParameterIiv = (glSamplerParameterIivPROC)tlsGetFunction(676); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glSamplerParameterIiv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglSamplerParameterIuiv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glSamplerParameterIuivPROC glSamplerParameterIuiv = (glSamplerParameterIuivPROC)tlsGetFunction(677); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glSamplerParameterIuiv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglGetSamplerParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glGetSamplerParameterivPROC glGetSamplerParameteriv = (glGetSamplerParameterivPROC)tlsGetFunction(678); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetSamplerParameteriv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglGetSamplerParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glGetSamplerParameterfvPROC glGetSamplerParameterfv = (glGetSamplerParameterfvPROC)tlsGetFunction(679); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetSamplerParameterfv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglGetSamplerParameterIiv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glGetSamplerParameterIivPROC glGetSamplerParameterIiv = (glGetSamplerParameterIivPROC)tlsGetFunction(680); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetSamplerParameterIiv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglGetSamplerParameterIuiv__IIJ(JNIEnv *__env, jclass clazz, jint sampler, jint pname, jlong paramsAddress) { - glGetSamplerParameterIuivPROC glGetSamplerParameterIuiv = (glGetSamplerParameterIuivPROC)tlsGetFunction(681); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetSamplerParameterIuiv(sampler, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glQueryCounter(JNIEnv *__env, jclass clazz, jint id, jint target) { - glQueryCounterPROC glQueryCounter = (glQueryCounterPROC)tlsGetFunction(682); - UNUSED_PARAM(clazz) - glQueryCounter(id, target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglGetQueryObjecti64v__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjecti64vPROC glGetQueryObjecti64v = (glGetQueryObjecti64vPROC)tlsGetFunction(683); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjecti64v(id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglGetQueryObjectui64v__IIJ(JNIEnv *__env, jclass clazz, jint id, jint pname, jlong paramsAddress) { - glGetQueryObjectui64vPROC glGetQueryObjectui64v = (glGetQueryObjectui64vPROC)tlsGetFunction(684); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryObjectui64v(id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glVertexAttribDivisor(JNIEnv *__env, jclass clazz, jint index, jint divisor) { - glVertexAttribDivisorPROC glVertexAttribDivisor = (glVertexAttribDivisorPROC)tlsGetFunction(685); - UNUSED_PARAM(clazz) - glVertexAttribDivisor(index, divisor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glVertexAttribP1ui(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jint value) { - glVertexAttribP1uiPROC glVertexAttribP1ui = (glVertexAttribP1uiPROC)tlsGetFunction(716); - UNUSED_PARAM(clazz) - glVertexAttribP1ui(index, type, normalized, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glVertexAttribP2ui(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jint value) { - glVertexAttribP2uiPROC glVertexAttribP2ui = (glVertexAttribP2uiPROC)tlsGetFunction(717); - UNUSED_PARAM(clazz) - glVertexAttribP2ui(index, type, normalized, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glVertexAttribP3ui(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jint value) { - glVertexAttribP3uiPROC glVertexAttribP3ui = (glVertexAttribP3uiPROC)tlsGetFunction(718); - UNUSED_PARAM(clazz) - glVertexAttribP3ui(index, type, normalized, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_glVertexAttribP4ui(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jint value) { - glVertexAttribP4uiPROC glVertexAttribP4ui = (glVertexAttribP4uiPROC)tlsGetFunction(719); - UNUSED_PARAM(clazz) - glVertexAttribP4ui(index, type, normalized, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglVertexAttribP1uiv__IIZJ(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jlong valueAddress) { - glVertexAttribP1uivPROC glVertexAttribP1uiv = (glVertexAttribP1uivPROC)tlsGetFunction(720); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glVertexAttribP1uiv(index, type, normalized, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglVertexAttribP2uiv__IIZJ(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jlong valueAddress) { - glVertexAttribP2uivPROC glVertexAttribP2uiv = (glVertexAttribP2uivPROC)tlsGetFunction(721); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glVertexAttribP2uiv(index, type, normalized, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglVertexAttribP3uiv__IIZJ(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jlong valueAddress) { - glVertexAttribP3uivPROC glVertexAttribP3uiv = (glVertexAttribP3uivPROC)tlsGetFunction(722); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glVertexAttribP3uiv(index, type, normalized, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33C_nglVertexAttribP4uiv__IIZJ(JNIEnv *__env, jclass clazz, jint index, jint type, jboolean normalized, jlong valueAddress) { - glVertexAttribP4uivPROC glVertexAttribP4uiv = (glVertexAttribP4uivPROC)tlsGetFunction(723); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glVertexAttribP4uiv(index, type, normalized, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL40C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL40C.c deleted file mode 100644 index 0e9a550d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL40C.c +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendEquationiPROC) (jint, jint); -typedef void (APIENTRY *glBlendEquationSeparateiPROC) (jint, jint, jint); -typedef void (APIENTRY *glBlendFunciPROC) (jint, jint, jint); -typedef void (APIENTRY *glBlendFuncSeparateiPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glDrawArraysIndirectPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDrawElementsIndirectPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform1dPROC) (jint, jdouble); -typedef void (APIENTRY *glUniform2dPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glUniform3dPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glUniform4dPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glUniform1dvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2dvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3dvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4dvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniformMatrix2dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix3dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix4dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix2x3dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix2x4dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix3x2dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix3x4dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix4x2dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glUniformMatrix4x3dvPROC) (jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glGetUniformdvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glMinSampleShadingPROC) (jfloat); -typedef jint (APIENTRY *glGetSubroutineUniformLocationPROC) (jint, jint, uintptr_t); -typedef jint (APIENTRY *glGetSubroutineIndexPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetActiveSubroutineUniformivPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetActiveSubroutineUniformNamePROC) (jint, jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetActiveSubroutineNamePROC) (jint, jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glUniformSubroutinesuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformSubroutineuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramStageivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPatchParameteriPROC) (jint, jint); -typedef void (APIENTRY *glPatchParameterfvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glBindTransformFeedbackPROC) (jint, jint); -typedef void (APIENTRY *glDeleteTransformFeedbacksPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenTransformFeedbacksPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsTransformFeedbackPROC) (jint); -typedef void (APIENTRY *glPauseTransformFeedbackPROC) (void); -typedef void (APIENTRY *glResumeTransformFeedbackPROC) (void); -typedef void (APIENTRY *glDrawTransformFeedbackPROC) (jint, jint); -typedef void (APIENTRY *glDrawTransformFeedbackStreamPROC) (jint, jint, jint); -typedef void (APIENTRY *glBeginQueryIndexedPROC) (jint, jint, jint); -typedef void (APIENTRY *glEndQueryIndexedPROC) (jint, jint); -typedef void (APIENTRY *glGetQueryIndexedivPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glBlendEquationi(JNIEnv *__env, jclass clazz, jint buf, jint mode) { - glBlendEquationiPROC glBlendEquationi = (glBlendEquationiPROC)tlsGetFunction(724); - UNUSED_PARAM(clazz) - glBlendEquationi(buf, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glBlendEquationSeparatei(JNIEnv *__env, jclass clazz, jint buf, jint modeRGB, jint modeAlpha) { - glBlendEquationSeparateiPROC glBlendEquationSeparatei = (glBlendEquationSeparateiPROC)tlsGetFunction(725); - UNUSED_PARAM(clazz) - glBlendEquationSeparatei(buf, modeRGB, modeAlpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glBlendFunci(JNIEnv *__env, jclass clazz, jint buf, jint sfactor, jint dfactor) { - glBlendFunciPROC glBlendFunci = (glBlendFunciPROC)tlsGetFunction(726); - UNUSED_PARAM(clazz) - glBlendFunci(buf, sfactor, dfactor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glBlendFuncSeparatei(JNIEnv *__env, jclass clazz, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { - glBlendFuncSeparateiPROC glBlendFuncSeparatei = (glBlendFuncSeparateiPROC)tlsGetFunction(727); - UNUSED_PARAM(clazz) - glBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglDrawArraysIndirect__IJ(JNIEnv *__env, jclass clazz, jint mode, jlong indirectAddress) { - glDrawArraysIndirectPROC glDrawArraysIndirect = (glDrawArraysIndirectPROC)tlsGetFunction(728); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glDrawArraysIndirect(mode, indirect); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglDrawElementsIndirect__IIJ(JNIEnv *__env, jclass clazz, jint mode, jint type, jlong indirectAddress) { - glDrawElementsIndirectPROC glDrawElementsIndirect = (glDrawElementsIndirectPROC)tlsGetFunction(729); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glDrawElementsIndirect(mode, type, indirect); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glUniform1d(JNIEnv *__env, jclass clazz, jint location, jdouble x) { - glUniform1dPROC glUniform1d = (glUniform1dPROC)tlsGetFunction(730); - UNUSED_PARAM(clazz) - glUniform1d(location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glUniform2d(JNIEnv *__env, jclass clazz, jint location, jdouble x, jdouble y) { - glUniform2dPROC glUniform2d = (glUniform2dPROC)tlsGetFunction(731); - UNUSED_PARAM(clazz) - glUniform2d(location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glUniform3d(JNIEnv *__env, jclass clazz, jint location, jdouble x, jdouble y, jdouble z) { - glUniform3dPROC glUniform3d = (glUniform3dPROC)tlsGetFunction(732); - UNUSED_PARAM(clazz) - glUniform3d(location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glUniform4d(JNIEnv *__env, jclass clazz, jint location, jdouble x, jdouble y, jdouble z, jdouble w) { - glUniform4dPROC glUniform4d = (glUniform4dPROC)tlsGetFunction(733); - UNUSED_PARAM(clazz) - glUniform4d(location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniform1dv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1dvPROC glUniform1dv = (glUniform1dvPROC)tlsGetFunction(734); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1dv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniform2dv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2dvPROC glUniform2dv = (glUniform2dvPROC)tlsGetFunction(735); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2dv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniform3dv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3dvPROC glUniform3dv = (glUniform3dvPROC)tlsGetFunction(736); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3dv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniform4dv__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4dvPROC glUniform4dv = (glUniform4dvPROC)tlsGetFunction(737); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4dv(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix2dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix2dvPROC glUniformMatrix2dv = (glUniformMatrix2dvPROC)tlsGetFunction(738); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix2dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix3dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix3dvPROC glUniformMatrix3dv = (glUniformMatrix3dvPROC)tlsGetFunction(739); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix3dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix4dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix4dvPROC glUniformMatrix4dv = (glUniformMatrix4dvPROC)tlsGetFunction(740); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix4dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix2x3dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix2x3dvPROC glUniformMatrix2x3dv = (glUniformMatrix2x3dvPROC)tlsGetFunction(741); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix2x3dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix2x4dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix2x4dvPROC glUniformMatrix2x4dv = (glUniformMatrix2x4dvPROC)tlsGetFunction(742); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix2x4dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix3x2dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix3x2dvPROC glUniformMatrix3x2dv = (glUniformMatrix3x2dvPROC)tlsGetFunction(743); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix3x2dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix3x4dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix3x4dvPROC glUniformMatrix3x4dv = (glUniformMatrix3x4dvPROC)tlsGetFunction(744); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix3x4dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix4x2dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix4x2dvPROC glUniformMatrix4x2dv = (glUniformMatrix4x2dvPROC)tlsGetFunction(745); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix4x2dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformMatrix4x3dv__IIZJ(JNIEnv *__env, jclass clazz, jint location, jint count, jboolean transpose, jlong valueAddress) { - glUniformMatrix4x3dvPROC glUniformMatrix4x3dv = (glUniformMatrix4x3dvPROC)tlsGetFunction(746); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformMatrix4x3dv(location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGetUniformdv__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformdvPROC glGetUniformdv = (glGetUniformdvPROC)tlsGetFunction(747); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformdv(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glMinSampleShading(JNIEnv *__env, jclass clazz, jfloat value) { - glMinSampleShadingPROC glMinSampleShading = (glMinSampleShadingPROC)tlsGetFunction(748); - UNUSED_PARAM(clazz) - glMinSampleShading(value); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL40C_nglGetSubroutineUniformLocation(JNIEnv *__env, jclass clazz, jint program, jint shadertype, jlong nameAddress) { - glGetSubroutineUniformLocationPROC glGetSubroutineUniformLocation = (glGetSubroutineUniformLocationPROC)tlsGetFunction(749); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetSubroutineUniformLocation(program, shadertype, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL40C_nglGetSubroutineIndex(JNIEnv *__env, jclass clazz, jint program, jint shadertype, jlong nameAddress) { - glGetSubroutineIndexPROC glGetSubroutineIndex = (glGetSubroutineIndexPROC)tlsGetFunction(750); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetSubroutineIndex(program, shadertype, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGetActiveSubroutineUniformiv__IIIIJ(JNIEnv *__env, jclass clazz, jint program, jint shadertype, jint index, jint pname, jlong valuesAddress) { - glGetActiveSubroutineUniformivPROC glGetActiveSubroutineUniformiv = (glGetActiveSubroutineUniformivPROC)tlsGetFunction(751); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGetActiveSubroutineUniformName__IIIIJJ(JNIEnv *__env, jclass clazz, jint program, jint shadertype, jint index, jint bufsize, jlong lengthAddress, jlong nameAddress) { - glGetActiveSubroutineUniformNamePROC glGetActiveSubroutineUniformName = (glGetActiveSubroutineUniformNamePROC)tlsGetFunction(752); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGetActiveSubroutineName__IIIIJJ(JNIEnv *__env, jclass clazz, jint program, jint shadertype, jint index, jint bufsize, jlong lengthAddress, jlong nameAddress) { - glGetActiveSubroutineNamePROC glGetActiveSubroutineName = (glGetActiveSubroutineNamePROC)tlsGetFunction(753); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetActiveSubroutineName(program, shadertype, index, bufsize, length, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglUniformSubroutinesuiv__IIJ(JNIEnv *__env, jclass clazz, jint shadertype, jint count, jlong indicesAddress) { - glUniformSubroutinesuivPROC glUniformSubroutinesuiv = (glUniformSubroutinesuivPROC)tlsGetFunction(754); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glUniformSubroutinesuiv(shadertype, count, indices); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGetUniformSubroutineuiv__IIJ(JNIEnv *__env, jclass clazz, jint shadertype, jint location, jlong paramsAddress) { - glGetUniformSubroutineuivPROC glGetUniformSubroutineuiv = (glGetUniformSubroutineuivPROC)tlsGetFunction(755); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformSubroutineuiv(shadertype, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGetProgramStageiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint shadertype, jint pname, jlong valuesAddress) { - glGetProgramStageivPROC glGetProgramStageiv = (glGetProgramStageivPROC)tlsGetFunction(756); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetProgramStageiv(program, shadertype, pname, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glPatchParameteri(JNIEnv *__env, jclass clazz, jint pname, jint value) { - glPatchParameteriPROC glPatchParameteri = (glPatchParameteriPROC)tlsGetFunction(757); - UNUSED_PARAM(clazz) - glPatchParameteri(pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglPatchParameterfv__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong valuesAddress) { - glPatchParameterfvPROC glPatchParameterfv = (glPatchParameterfvPROC)tlsGetFunction(758); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glPatchParameterfv(pname, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glBindTransformFeedback(JNIEnv *__env, jclass clazz, jint target, jint id) { - glBindTransformFeedbackPROC glBindTransformFeedback = (glBindTransformFeedbackPROC)tlsGetFunction(759); - UNUSED_PARAM(clazz) - glBindTransformFeedback(target, id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglDeleteTransformFeedbacks__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glDeleteTransformFeedbacksPROC glDeleteTransformFeedbacks = (glDeleteTransformFeedbacksPROC)tlsGetFunction(760); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glDeleteTransformFeedbacks(n, ids); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGenTransformFeedbacks__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glGenTransformFeedbacksPROC glGenTransformFeedbacks = (glGenTransformFeedbacksPROC)tlsGetFunction(761); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glGenTransformFeedbacks(n, ids); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL40C_glIsTransformFeedback(JNIEnv *__env, jclass clazz, jint id) { - glIsTransformFeedbackPROC glIsTransformFeedback = (glIsTransformFeedbackPROC)tlsGetFunction(762); - UNUSED_PARAM(clazz) - return glIsTransformFeedback(id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glPauseTransformFeedback(JNIEnv *__env, jclass clazz) { - glPauseTransformFeedbackPROC glPauseTransformFeedback = (glPauseTransformFeedbackPROC)tlsGetFunction(763); - UNUSED_PARAM(clazz) - glPauseTransformFeedback(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glResumeTransformFeedback(JNIEnv *__env, jclass clazz) { - glResumeTransformFeedbackPROC glResumeTransformFeedback = (glResumeTransformFeedbackPROC)tlsGetFunction(764); - UNUSED_PARAM(clazz) - glResumeTransformFeedback(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glDrawTransformFeedback(JNIEnv *__env, jclass clazz, jint mode, jint id) { - glDrawTransformFeedbackPROC glDrawTransformFeedback = (glDrawTransformFeedbackPROC)tlsGetFunction(765); - UNUSED_PARAM(clazz) - glDrawTransformFeedback(mode, id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glDrawTransformFeedbackStream(JNIEnv *__env, jclass clazz, jint mode, jint id, jint stream) { - glDrawTransformFeedbackStreamPROC glDrawTransformFeedbackStream = (glDrawTransformFeedbackStreamPROC)tlsGetFunction(766); - UNUSED_PARAM(clazz) - glDrawTransformFeedbackStream(mode, id, stream); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glBeginQueryIndexed(JNIEnv *__env, jclass clazz, jint target, jint index, jint id) { - glBeginQueryIndexedPROC glBeginQueryIndexed = (glBeginQueryIndexedPROC)tlsGetFunction(767); - UNUSED_PARAM(clazz) - glBeginQueryIndexed(target, index, id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_glEndQueryIndexed(JNIEnv *__env, jclass clazz, jint target, jint index) { - glEndQueryIndexedPROC glEndQueryIndexed = (glEndQueryIndexedPROC)tlsGetFunction(768); - UNUSED_PARAM(clazz) - glEndQueryIndexed(target, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40C_nglGetQueryIndexediv__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jint pname, jlong paramsAddress) { - glGetQueryIndexedivPROC glGetQueryIndexediv = (glGetQueryIndexedivPROC)tlsGetFunction(769); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetQueryIndexediv(target, index, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL41C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL41C.c deleted file mode 100644 index 443afe45..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL41C.c +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glReleaseShaderCompilerPROC) (void); -typedef void (APIENTRY *glShaderBinaryPROC) (jint, uintptr_t, jint, uintptr_t, jint); -typedef void (APIENTRY *glGetShaderPrecisionFormatPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glDepthRangefPROC) (jfloat, jfloat); -typedef void (APIENTRY *glClearDepthfPROC) (jfloat); -typedef void (APIENTRY *glGetProgramBinaryPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glProgramBinaryPROC) (jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glProgramParameteriPROC) (jint, jint, jint); -typedef void (APIENTRY *glUseProgramStagesPROC) (jint, jint, jint); -typedef void (APIENTRY *glActiveShaderProgramPROC) (jint, jint); -typedef jint (APIENTRY *glCreateShaderProgramvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glBindProgramPipelinePROC) (jint); -typedef void (APIENTRY *glDeleteProgramPipelinesPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenProgramPipelinesPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsProgramPipelinePROC) (jint); -typedef void (APIENTRY *glGetProgramPipelineivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1iPROC) (jint, jint, jint); -typedef void (APIENTRY *glProgramUniform2iPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform3iPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform4iPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform1uiPROC) (jint, jint, jint); -typedef void (APIENTRY *glProgramUniform2uiPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform3uiPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform4uiPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glProgramUniform1fPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glProgramUniform2fPROC) (jint, jint, jfloat, jfloat); -typedef void (APIENTRY *glProgramUniform3fPROC) (jint, jint, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glProgramUniform4fPROC) (jint, jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glProgramUniform1dPROC) (jint, jint, jdouble); -typedef void (APIENTRY *glProgramUniform2dPROC) (jint, jint, jdouble, jdouble); -typedef void (APIENTRY *glProgramUniform3dPROC) (jint, jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glProgramUniform4dPROC) (jint, jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glProgramUniform1ivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2ivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3ivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4ivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1uivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2uivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3uivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4uivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1fvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2fvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3fvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4fvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1dvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2dvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3dvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4dvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x3fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x2fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x4fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x2fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x4fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x3fvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x3dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x2dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix2x4dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x2dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix3x4dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glProgramUniformMatrix4x3dvPROC) (jint, jint, jint, jboolean, uintptr_t); -typedef void (APIENTRY *glValidateProgramPipelinePROC) (jint); -typedef void (APIENTRY *glGetProgramPipelineInfoLogPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glVertexAttribL1dPROC) (jint, jdouble); -typedef void (APIENTRY *glVertexAttribL2dPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttribL3dPROC) (jint, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttribL4dPROC) (jint, jdouble, jdouble, jdouble, jdouble); -typedef void (APIENTRY *glVertexAttribL1dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL2dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL3dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL4dvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribLPointerPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribLdvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glViewportArrayvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glViewportIndexedfPROC) (jint, jfloat, jfloat, jfloat, jfloat); -typedef void (APIENTRY *glViewportIndexedfvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glScissorArrayvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glScissorIndexedPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glScissorIndexedvPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDepthRangeArrayvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glDepthRangeIndexedPROC) (jint, jdouble, jdouble); -typedef void (APIENTRY *glGetFloati_vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetDoublei_vPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glReleaseShaderCompiler(JNIEnv *__env, jclass clazz) { - glReleaseShaderCompilerPROC glReleaseShaderCompiler = (glReleaseShaderCompilerPROC)tlsGetFunction(770); - UNUSED_PARAM(clazz) - glReleaseShaderCompiler(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglShaderBinary__IJIJI(JNIEnv *__env, jclass clazz, jint count, jlong shadersAddress, jint binaryformat, jlong binaryAddress, jint length) { - glShaderBinaryPROC glShaderBinary = (glShaderBinaryPROC)tlsGetFunction(771); - uintptr_t shaders = (uintptr_t)shadersAddress; - uintptr_t binary = (uintptr_t)binaryAddress; - UNUSED_PARAM(clazz) - glShaderBinary(count, shaders, binaryformat, binary, length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGetShaderPrecisionFormat__IIJJ(JNIEnv *__env, jclass clazz, jint shadertype, jint precisiontype, jlong rangeAddress, jlong precisionAddress) { - glGetShaderPrecisionFormatPROC glGetShaderPrecisionFormat = (glGetShaderPrecisionFormatPROC)tlsGetFunction(772); - uintptr_t range = (uintptr_t)rangeAddress; - uintptr_t precision = (uintptr_t)precisionAddress; - UNUSED_PARAM(clazz) - glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glDepthRangef(JNIEnv *__env, jclass clazz, jfloat zNear, jfloat zFar) { - glDepthRangefPROC glDepthRangef = (glDepthRangefPROC)tlsGetFunction(773); - UNUSED_PARAM(clazz) - glDepthRangef(zNear, zFar); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glClearDepthf(JNIEnv *__env, jclass clazz, jfloat depth) { - glClearDepthfPROC glClearDepthf = (glClearDepthfPROC)tlsGetFunction(774); - UNUSED_PARAM(clazz) - glClearDepthf(depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGetProgramBinary__IIJJJ(JNIEnv *__env, jclass clazz, jint program, jint bufSize, jlong lengthAddress, jlong binaryFormatAddress, jlong binaryAddress) { - glGetProgramBinaryPROC glGetProgramBinary = (glGetProgramBinaryPROC)tlsGetFunction(775); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t binaryFormat = (uintptr_t)binaryFormatAddress; - uintptr_t binary = (uintptr_t)binaryAddress; - UNUSED_PARAM(clazz) - glGetProgramBinary(program, bufSize, length, binaryFormat, binary); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramBinary(JNIEnv *__env, jclass clazz, jint program, jint binaryFormat, jlong binaryAddress, jint length) { - glProgramBinaryPROC glProgramBinary = (glProgramBinaryPROC)tlsGetFunction(776); - uintptr_t binary = (uintptr_t)binaryAddress; - UNUSED_PARAM(clazz) - glProgramBinary(program, binaryFormat, binary, length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramParameteri(JNIEnv *__env, jclass clazz, jint program, jint pname, jint value) { - glProgramParameteriPROC glProgramParameteri = (glProgramParameteriPROC)tlsGetFunction(777); - UNUSED_PARAM(clazz) - glProgramParameteri(program, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glUseProgramStages(JNIEnv *__env, jclass clazz, jint pipeline, jint stages, jint program) { - glUseProgramStagesPROC glUseProgramStages = (glUseProgramStagesPROC)tlsGetFunction(778); - UNUSED_PARAM(clazz) - glUseProgramStages(pipeline, stages, program); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glActiveShaderProgram(JNIEnv *__env, jclass clazz, jint pipeline, jint program) { - glActiveShaderProgramPROC glActiveShaderProgram = (glActiveShaderProgramPROC)tlsGetFunction(779); - UNUSED_PARAM(clazz) - glActiveShaderProgram(pipeline, program); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL41C_nglCreateShaderProgramv(JNIEnv *__env, jclass clazz, jint type, jint count, jlong stringsAddress) { - glCreateShaderProgramvPROC glCreateShaderProgramv = (glCreateShaderProgramvPROC)tlsGetFunction(780); - uintptr_t strings = (uintptr_t)stringsAddress; - UNUSED_PARAM(clazz) - return glCreateShaderProgramv(type, count, strings); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glBindProgramPipeline(JNIEnv *__env, jclass clazz, jint pipeline) { - glBindProgramPipelinePROC glBindProgramPipeline = (glBindProgramPipelinePROC)tlsGetFunction(781); - UNUSED_PARAM(clazz) - glBindProgramPipeline(pipeline); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglDeleteProgramPipelines__IJ(JNIEnv *__env, jclass clazz, jint n, jlong pipelinesAddress) { - glDeleteProgramPipelinesPROC glDeleteProgramPipelines = (glDeleteProgramPipelinesPROC)tlsGetFunction(782); - uintptr_t pipelines = (uintptr_t)pipelinesAddress; - UNUSED_PARAM(clazz) - glDeleteProgramPipelines(n, pipelines); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGenProgramPipelines__IJ(JNIEnv *__env, jclass clazz, jint n, jlong pipelinesAddress) { - glGenProgramPipelinesPROC glGenProgramPipelines = (glGenProgramPipelinesPROC)tlsGetFunction(783); - uintptr_t pipelines = (uintptr_t)pipelinesAddress; - UNUSED_PARAM(clazz) - glGenProgramPipelines(n, pipelines); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL41C_glIsProgramPipeline(JNIEnv *__env, jclass clazz, jint pipeline) { - glIsProgramPipelinePROC glIsProgramPipeline = (glIsProgramPipelinePROC)tlsGetFunction(784); - UNUSED_PARAM(clazz) - return glIsProgramPipeline(pipeline); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGetProgramPipelineiv__IIJ(JNIEnv *__env, jclass clazz, jint pipeline, jint pname, jlong paramsAddress) { - glGetProgramPipelineivPROC glGetProgramPipelineiv = (glGetProgramPipelineivPROC)tlsGetFunction(785); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramPipelineiv(pipeline, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform1i(JNIEnv *__env, jclass clazz, jint program, jint location, jint x) { - glProgramUniform1iPROC glProgramUniform1i = (glProgramUniform1iPROC)tlsGetFunction(786); - UNUSED_PARAM(clazz) - glProgramUniform1i(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform2i(JNIEnv *__env, jclass clazz, jint program, jint location, jint x, jint y) { - glProgramUniform2iPROC glProgramUniform2i = (glProgramUniform2iPROC)tlsGetFunction(787); - UNUSED_PARAM(clazz) - glProgramUniform2i(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform3i(JNIEnv *__env, jclass clazz, jint program, jint location, jint x, jint y, jint z) { - glProgramUniform3iPROC glProgramUniform3i = (glProgramUniform3iPROC)tlsGetFunction(788); - UNUSED_PARAM(clazz) - glProgramUniform3i(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform4i(JNIEnv *__env, jclass clazz, jint program, jint location, jint x, jint y, jint z, jint w) { - glProgramUniform4iPROC glProgramUniform4i = (glProgramUniform4iPROC)tlsGetFunction(789); - UNUSED_PARAM(clazz) - glProgramUniform4i(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform1ui(JNIEnv *__env, jclass clazz, jint program, jint location, jint x) { - glProgramUniform1uiPROC glProgramUniform1ui = (glProgramUniform1uiPROC)tlsGetFunction(790); - UNUSED_PARAM(clazz) - glProgramUniform1ui(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform2ui(JNIEnv *__env, jclass clazz, jint program, jint location, jint x, jint y) { - glProgramUniform2uiPROC glProgramUniform2ui = (glProgramUniform2uiPROC)tlsGetFunction(791); - UNUSED_PARAM(clazz) - glProgramUniform2ui(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform3ui(JNIEnv *__env, jclass clazz, jint program, jint location, jint x, jint y, jint z) { - glProgramUniform3uiPROC glProgramUniform3ui = (glProgramUniform3uiPROC)tlsGetFunction(792); - UNUSED_PARAM(clazz) - glProgramUniform3ui(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform4ui(JNIEnv *__env, jclass clazz, jint program, jint location, jint x, jint y, jint z, jint w) { - glProgramUniform4uiPROC glProgramUniform4ui = (glProgramUniform4uiPROC)tlsGetFunction(793); - UNUSED_PARAM(clazz) - glProgramUniform4ui(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform1f(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat x) { - glProgramUniform1fPROC glProgramUniform1f = (glProgramUniform1fPROC)tlsGetFunction(794); - UNUSED_PARAM(clazz) - glProgramUniform1f(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform2f(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat x, jfloat y) { - glProgramUniform2fPROC glProgramUniform2f = (glProgramUniform2fPROC)tlsGetFunction(795); - UNUSED_PARAM(clazz) - glProgramUniform2f(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform3f(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat x, jfloat y, jfloat z) { - glProgramUniform3fPROC glProgramUniform3f = (glProgramUniform3fPROC)tlsGetFunction(796); - UNUSED_PARAM(clazz) - glProgramUniform3f(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform4f(JNIEnv *__env, jclass clazz, jint program, jint location, jfloat x, jfloat y, jfloat z, jfloat w) { - glProgramUniform4fPROC glProgramUniform4f = (glProgramUniform4fPROC)tlsGetFunction(797); - UNUSED_PARAM(clazz) - glProgramUniform4f(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform1d(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x) { - glProgramUniform1dPROC glProgramUniform1d = (glProgramUniform1dPROC)tlsGetFunction(798); - UNUSED_PARAM(clazz) - glProgramUniform1d(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform2d(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x, jdouble y) { - glProgramUniform2dPROC glProgramUniform2d = (glProgramUniform2dPROC)tlsGetFunction(799); - UNUSED_PARAM(clazz) - glProgramUniform2d(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform3d(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x, jdouble y, jdouble z) { - glProgramUniform3dPROC glProgramUniform3d = (glProgramUniform3dPROC)tlsGetFunction(800); - UNUSED_PARAM(clazz) - glProgramUniform3d(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glProgramUniform4d(JNIEnv *__env, jclass clazz, jint program, jint location, jdouble x, jdouble y, jdouble z, jdouble w) { - glProgramUniform4dPROC glProgramUniform4d = (glProgramUniform4dPROC)tlsGetFunction(801); - UNUSED_PARAM(clazz) - glProgramUniform4d(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform1iv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1ivPROC glProgramUniform1iv = (glProgramUniform1ivPROC)tlsGetFunction(802); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1iv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform2iv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2ivPROC glProgramUniform2iv = (glProgramUniform2ivPROC)tlsGetFunction(803); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2iv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform3iv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3ivPROC glProgramUniform3iv = (glProgramUniform3ivPROC)tlsGetFunction(804); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3iv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform4iv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4ivPROC glProgramUniform4iv = (glProgramUniform4ivPROC)tlsGetFunction(805); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4iv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform1uiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1uivPROC glProgramUniform1uiv = (glProgramUniform1uivPROC)tlsGetFunction(806); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1uiv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform2uiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2uivPROC glProgramUniform2uiv = (glProgramUniform2uivPROC)tlsGetFunction(807); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2uiv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform3uiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3uivPROC glProgramUniform3uiv = (glProgramUniform3uivPROC)tlsGetFunction(808); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3uiv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform4uiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4uivPROC glProgramUniform4uiv = (glProgramUniform4uivPROC)tlsGetFunction(809); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4uiv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform1fv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1fvPROC glProgramUniform1fv = (glProgramUniform1fvPROC)tlsGetFunction(810); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1fv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform2fv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2fvPROC glProgramUniform2fv = (glProgramUniform2fvPROC)tlsGetFunction(811); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2fv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform3fv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3fvPROC glProgramUniform3fv = (glProgramUniform3fvPROC)tlsGetFunction(812); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3fv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform4fv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4fvPROC glProgramUniform4fv = (glProgramUniform4fvPROC)tlsGetFunction(813); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4fv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform1dv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1dvPROC glProgramUniform1dv = (glProgramUniform1dvPROC)tlsGetFunction(814); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1dv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform2dv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2dvPROC glProgramUniform2dv = (glProgramUniform2dvPROC)tlsGetFunction(815); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2dv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform3dv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3dvPROC glProgramUniform3dv = (glProgramUniform3dvPROC)tlsGetFunction(816); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3dv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniform4dv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4dvPROC glProgramUniform4dv = (glProgramUniform4dvPROC)tlsGetFunction(817); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4dv(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix2fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2fvPROC glProgramUniformMatrix2fv = (glProgramUniformMatrix2fvPROC)tlsGetFunction(818); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix3fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3fvPROC glProgramUniformMatrix3fv = (glProgramUniformMatrix3fvPROC)tlsGetFunction(819); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix4fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4fvPROC glProgramUniformMatrix4fv = (glProgramUniformMatrix4fvPROC)tlsGetFunction(820); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix2dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2dvPROC glProgramUniformMatrix2dv = (glProgramUniformMatrix2dvPROC)tlsGetFunction(821); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix3dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3dvPROC glProgramUniformMatrix3dv = (glProgramUniformMatrix3dvPROC)tlsGetFunction(822); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix4dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4dvPROC glProgramUniformMatrix4dv = (glProgramUniformMatrix4dvPROC)tlsGetFunction(823); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix2x3fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x3fvPROC glProgramUniformMatrix2x3fv = (glProgramUniformMatrix2x3fvPROC)tlsGetFunction(824); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x3fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix3x2fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x2fvPROC glProgramUniformMatrix3x2fv = (glProgramUniformMatrix3x2fvPROC)tlsGetFunction(825); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x2fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix2x4fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x4fvPROC glProgramUniformMatrix2x4fv = (glProgramUniformMatrix2x4fvPROC)tlsGetFunction(826); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x4fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix4x2fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x2fvPROC glProgramUniformMatrix4x2fv = (glProgramUniformMatrix4x2fvPROC)tlsGetFunction(827); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x2fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix3x4fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x4fvPROC glProgramUniformMatrix3x4fv = (glProgramUniformMatrix3x4fvPROC)tlsGetFunction(828); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x4fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix4x3fv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x3fvPROC glProgramUniformMatrix4x3fv = (glProgramUniformMatrix4x3fvPROC)tlsGetFunction(829); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x3fv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix2x3dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x3dvPROC glProgramUniformMatrix2x3dv = (glProgramUniformMatrix2x3dvPROC)tlsGetFunction(830); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x3dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix3x2dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x2dvPROC glProgramUniformMatrix3x2dv = (glProgramUniformMatrix3x2dvPROC)tlsGetFunction(831); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x2dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix2x4dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix2x4dvPROC glProgramUniformMatrix2x4dv = (glProgramUniformMatrix2x4dvPROC)tlsGetFunction(832); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix2x4dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix4x2dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x2dvPROC glProgramUniformMatrix4x2dv = (glProgramUniformMatrix4x2dvPROC)tlsGetFunction(833); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x2dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix3x4dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix3x4dvPROC glProgramUniformMatrix3x4dv = (glProgramUniformMatrix3x4dvPROC)tlsGetFunction(834); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix3x4dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglProgramUniformMatrix4x3dv__IIIZJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong valueAddress) { - glProgramUniformMatrix4x3dvPROC glProgramUniformMatrix4x3dv = (glProgramUniformMatrix4x3dvPROC)tlsGetFunction(835); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformMatrix4x3dv(program, location, count, transpose, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glValidateProgramPipeline(JNIEnv *__env, jclass clazz, jint pipeline) { - glValidateProgramPipelinePROC glValidateProgramPipeline = (glValidateProgramPipelinePROC)tlsGetFunction(836); - UNUSED_PARAM(clazz) - glValidateProgramPipeline(pipeline); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGetProgramPipelineInfoLog__IIJJ(JNIEnv *__env, jclass clazz, jint pipeline, jint bufSize, jlong lengthAddress, jlong infoLogAddress) { - glGetProgramPipelineInfoLogPROC glGetProgramPipelineInfoLog = (glGetProgramPipelineInfoLogPROC)tlsGetFunction(837); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t infoLog = (uintptr_t)infoLogAddress; - UNUSED_PARAM(clazz) - glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glVertexAttribL1d(JNIEnv *__env, jclass clazz, jint index, jdouble x) { - glVertexAttribL1dPROC glVertexAttribL1d = (glVertexAttribL1dPROC)tlsGetFunction(838); - UNUSED_PARAM(clazz) - glVertexAttribL1d(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glVertexAttribL2d(JNIEnv *__env, jclass clazz, jint index, jdouble x, jdouble y) { - glVertexAttribL2dPROC glVertexAttribL2d = (glVertexAttribL2dPROC)tlsGetFunction(839); - UNUSED_PARAM(clazz) - glVertexAttribL2d(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glVertexAttribL3d(JNIEnv *__env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z) { - glVertexAttribL3dPROC glVertexAttribL3d = (glVertexAttribL3dPROC)tlsGetFunction(840); - UNUSED_PARAM(clazz) - glVertexAttribL3d(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glVertexAttribL4d(JNIEnv *__env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jdouble w) { - glVertexAttribL4dPROC glVertexAttribL4d = (glVertexAttribL4dPROC)tlsGetFunction(841); - UNUSED_PARAM(clazz) - glVertexAttribL4d(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglVertexAttribL1dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL1dvPROC glVertexAttribL1dv = (glVertexAttribL1dvPROC)tlsGetFunction(842); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL1dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglVertexAttribL2dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL2dvPROC glVertexAttribL2dv = (glVertexAttribL2dvPROC)tlsGetFunction(843); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL2dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglVertexAttribL3dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL3dvPROC glVertexAttribL3dv = (glVertexAttribL3dvPROC)tlsGetFunction(844); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL3dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglVertexAttribL4dv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL4dvPROC glVertexAttribL4dv = (glVertexAttribL4dvPROC)tlsGetFunction(845); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL4dv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglVertexAttribLPointer(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointerAddress) { - glVertexAttribLPointerPROC glVertexAttribLPointer = (glVertexAttribLPointerPROC)tlsGetFunction(846); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexAttribLPointer(index, size, type, stride, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGetVertexAttribLdv__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribLdvPROC glGetVertexAttribLdv = (glGetVertexAttribLdvPROC)tlsGetFunction(847); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribLdv(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglViewportArrayv__IIJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong vAddress) { - glViewportArrayvPROC glViewportArrayv = (glViewportArrayvPROC)tlsGetFunction(848); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glViewportArrayv(first, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glViewportIndexedf(JNIEnv *__env, jclass clazz, jint index, jfloat x, jfloat y, jfloat w, jfloat h) { - glViewportIndexedfPROC glViewportIndexedf = (glViewportIndexedfPROC)tlsGetFunction(849); - UNUSED_PARAM(clazz) - glViewportIndexedf(index, x, y, w, h); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglViewportIndexedfv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glViewportIndexedfvPROC glViewportIndexedfv = (glViewportIndexedfvPROC)tlsGetFunction(850); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glViewportIndexedfv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglScissorArrayv__IIJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong vAddress) { - glScissorArrayvPROC glScissorArrayv = (glScissorArrayvPROC)tlsGetFunction(851); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glScissorArrayv(first, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glScissorIndexed(JNIEnv *__env, jclass clazz, jint index, jint left, jint bottom, jint width, jint height) { - glScissorIndexedPROC glScissorIndexed = (glScissorIndexedPROC)tlsGetFunction(852); - UNUSED_PARAM(clazz) - glScissorIndexed(index, left, bottom, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglScissorIndexedv__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glScissorIndexedvPROC glScissorIndexedv = (glScissorIndexedvPROC)tlsGetFunction(853); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glScissorIndexedv(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglDepthRangeArrayv__IIJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong vAddress) { - glDepthRangeArrayvPROC glDepthRangeArrayv = (glDepthRangeArrayvPROC)tlsGetFunction(854); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glDepthRangeArrayv(first, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_glDepthRangeIndexed(JNIEnv *__env, jclass clazz, jint index, jdouble zNear, jdouble zFar) { - glDepthRangeIndexedPROC glDepthRangeIndexed = (glDepthRangeIndexedPROC)tlsGetFunction(855); - UNUSED_PARAM(clazz) - glDepthRangeIndexed(index, zNear, zFar); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGetFloati_1v__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong dataAddress) { - glGetFloati_vPROC glGetFloati_v = (glGetFloati_vPROC)tlsGetFunction(856); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetFloati_v(target, index, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41C_nglGetDoublei_1v__IIJ(JNIEnv *__env, jclass clazz, jint target, jint index, jlong dataAddress) { - glGetDoublei_vPROC glGetDoublei_v = (glGetDoublei_vPROC)tlsGetFunction(857); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetDoublei_v(target, index, data); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL42C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL42C.c deleted file mode 100644 index 55e57c0e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL42C.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetActiveAtomicCounterBufferivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTexStorage1DPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glTexStorage2DPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTexStorage3DPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glDrawTransformFeedbackInstancedPROC) (jint, jint, jint); -typedef void (APIENTRY *glDrawTransformFeedbackStreamInstancedPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glDrawArraysInstancedBaseInstancePROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glDrawElementsInstancedBaseInstancePROC) (jint, jint, jint, uintptr_t, jint, jint); -typedef void (APIENTRY *glDrawElementsInstancedBaseVertexBaseInstancePROC) (jint, jint, jint, uintptr_t, jint, jint, jint); -typedef void (APIENTRY *glBindImageTexturePROC) (jint, jint, jint, jboolean, jint, jint, jint); -typedef void (APIENTRY *glMemoryBarrierPROC) (jint); -typedef void (APIENTRY *glGetInternalformativPROC) (jint, jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_nglGetActiveAtomicCounterBufferiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint bufferIndex, jint pname, jlong paramsAddress) { - glGetActiveAtomicCounterBufferivPROC glGetActiveAtomicCounterBufferiv = (glGetActiveAtomicCounterBufferivPROC)tlsGetFunction(858); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glTexStorage1D(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalformat, jint width) { - glTexStorage1DPROC glTexStorage1D = (glTexStorage1DPROC)tlsGetFunction(859); - UNUSED_PARAM(clazz) - glTexStorage1D(target, levels, internalformat, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glTexStorage2D(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height) { - glTexStorage2DPROC glTexStorage2D = (glTexStorage2DPROC)tlsGetFunction(860); - UNUSED_PARAM(clazz) - glTexStorage2D(target, levels, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glTexStorage3D(JNIEnv *__env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { - glTexStorage3DPROC glTexStorage3D = (glTexStorage3DPROC)tlsGetFunction(861); - UNUSED_PARAM(clazz) - glTexStorage3D(target, levels, internalformat, width, height, depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glDrawTransformFeedbackInstanced(JNIEnv *__env, jclass clazz, jint mode, jint id, jint primcount) { - glDrawTransformFeedbackInstancedPROC glDrawTransformFeedbackInstanced = (glDrawTransformFeedbackInstancedPROC)tlsGetFunction(862); - UNUSED_PARAM(clazz) - glDrawTransformFeedbackInstanced(mode, id, primcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glDrawTransformFeedbackStreamInstanced(JNIEnv *__env, jclass clazz, jint mode, jint id, jint stream, jint primcount) { - glDrawTransformFeedbackStreamInstancedPROC glDrawTransformFeedbackStreamInstanced = (glDrawTransformFeedbackStreamInstancedPROC)tlsGetFunction(863); - UNUSED_PARAM(clazz) - glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glDrawArraysInstancedBaseInstance(JNIEnv *__env, jclass clazz, jint mode, jint first, jint count, jint primcount, jint baseinstance) { - glDrawArraysInstancedBaseInstancePROC glDrawArraysInstancedBaseInstance = (glDrawArraysInstancedBaseInstancePROC)tlsGetFunction(864); - UNUSED_PARAM(clazz) - glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_nglDrawElementsInstancedBaseInstance(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress, jint primcount, jint baseinstance) { - glDrawElementsInstancedBaseInstancePROC glDrawElementsInstancedBaseInstance = (glDrawElementsInstancedBaseInstancePROC)tlsGetFunction(865); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElementsInstancedBaseInstance(mode, count, type, indices, primcount, baseinstance); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_nglDrawElementsInstancedBaseVertexBaseInstance(JNIEnv *__env, jclass clazz, jint mode, jint count, jint type, jlong indicesAddress, jint primcount, jint basevertex, jint baseinstance) { - glDrawElementsInstancedBaseVertexBaseInstancePROC glDrawElementsInstancedBaseVertexBaseInstance = (glDrawElementsInstancedBaseVertexBaseInstancePROC)tlsGetFunction(866); - uintptr_t indices = (uintptr_t)indicesAddress; - UNUSED_PARAM(clazz) - glDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, primcount, basevertex, baseinstance); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glBindImageTexture(JNIEnv *__env, jclass clazz, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format) { - glBindImageTexturePROC glBindImageTexture = (glBindImageTexturePROC)tlsGetFunction(867); - UNUSED_PARAM(clazz) - glBindImageTexture(unit, texture, level, layered, layer, access, format); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_glMemoryBarrier(JNIEnv *__env, jclass clazz, jint barriers) { - glMemoryBarrierPROC glMemoryBarrier = (glMemoryBarrierPROC)tlsGetFunction(868); - UNUSED_PARAM(clazz) - glMemoryBarrier(barriers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42C_nglGetInternalformativ__IIIIJ(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint pname, jint bufSize, jlong paramsAddress) { - glGetInternalformativPROC glGetInternalformativ = (glGetInternalformativPROC)tlsGetFunction(869); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetInternalformativ(target, internalformat, pname, bufSize, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL43C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL43C.c deleted file mode 100644 index eb4a367b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL43C.c +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glClearBufferDataPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glClearBufferSubDataPROC) (jint, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t); -typedef void (APIENTRY *glDispatchComputePROC) (jint, jint, jint); -typedef void (APIENTRY *glDispatchComputeIndirectPROC) (uintptr_t); -typedef void (APIENTRY *glCopyImageSubDataPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glDebugMessageControlPROC) (jint, jint, jint, jint, uintptr_t, jboolean); -typedef void (APIENTRY *glDebugMessageInsertPROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glDebugMessageCallbackPROC) (uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetDebugMessageLogPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glPushDebugGroupPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPopDebugGroupPROC) (void); -typedef void (APIENTRY *glObjectLabelPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetObjectLabelPROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glObjectPtrLabelPROC) (uintptr_t, jint, uintptr_t); -typedef void (APIENTRY *glGetObjectPtrLabelPROC) (uintptr_t, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glFramebufferParameteriPROC) (jint, jint, jint); -typedef void (APIENTRY *glGetFramebufferParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetInternalformati64vPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glInvalidateTexSubImagePROC) (jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glInvalidateTexImagePROC) (jint, jint); -typedef void (APIENTRY *glInvalidateBufferSubDataPROC) (jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glInvalidateBufferDataPROC) (jint); -typedef void (APIENTRY *glInvalidateFramebufferPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glInvalidateSubFramebufferPROC) (jint, jint, uintptr_t, jint, jint, jint, jint); -typedef void (APIENTRY *glMultiDrawArraysIndirectPROC) (jint, uintptr_t, jint, jint); -typedef void (APIENTRY *glMultiDrawElementsIndirectPROC) (jint, jint, uintptr_t, jint, jint); -typedef void (APIENTRY *glGetProgramInterfaceivPROC) (jint, jint, jint, uintptr_t); -typedef jint (APIENTRY *glGetProgramResourceIndexPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetProgramResourceNamePROC) (jint, jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetProgramResourceivPROC) (jint, jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t); -typedef jint (APIENTRY *glGetProgramResourceLocationPROC) (jint, jint, uintptr_t); -typedef jint (APIENTRY *glGetProgramResourceLocationIndexPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glShaderStorageBlockBindingPROC) (jint, jint, jint); -typedef void (APIENTRY *glTexBufferRangePROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glTexStorage2DMultisamplePROC) (jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTexStorage3DMultisamplePROC) (jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureViewPROC) (jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glBindVertexBufferPROC) (jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glVertexAttribFormatPROC) (jint, jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexAttribIFormatPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribLFormatPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glVertexAttribBindingPROC) (jint, jint); -typedef void (APIENTRY *glVertexBindingDivisorPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglClearBufferData__IIIIJ(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint format, jint type, jlong dataAddress) { - glClearBufferDataPROC glClearBufferData = (glClearBufferDataPROC)tlsGetFunction(870); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearBufferData(target, internalformat, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglClearBufferSubData__IIJJIIJ(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jlong offset, jlong size, jint format, jint type, jlong dataAddress) { - glClearBufferSubDataPROC glClearBufferSubData = (glClearBufferSubDataPROC)tlsGetFunction(871); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearBufferSubData(target, internalformat, (uintptr_t)offset, (uintptr_t)size, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glDispatchCompute(JNIEnv *__env, jclass clazz, jint num_groups_x, jint num_groups_y, jint num_groups_z) { - glDispatchComputePROC glDispatchCompute = (glDispatchComputePROC)tlsGetFunction(872); - UNUSED_PARAM(clazz) - glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glDispatchComputeIndirect(JNIEnv *__env, jclass clazz, jlong indirect) { - glDispatchComputeIndirectPROC glDispatchComputeIndirect = (glDispatchComputeIndirectPROC)tlsGetFunction(873); - UNUSED_PARAM(clazz) - glDispatchComputeIndirect((uintptr_t)indirect); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glCopyImageSubData(JNIEnv *__env, jclass clazz, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint srcWidth, jint srcHeight, jint srcDepth) { - glCopyImageSubDataPROC glCopyImageSubData = (glCopyImageSubDataPROC)tlsGetFunction(874); - UNUSED_PARAM(clazz) - glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglDebugMessageControl__IIIIJZ(JNIEnv *__env, jclass clazz, jint source, jint type, jint severity, jint count, jlong idsAddress, jboolean enabled) { - glDebugMessageControlPROC glDebugMessageControl = (glDebugMessageControlPROC)tlsGetFunction(875); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glDebugMessageControl(source, type, severity, count, ids, enabled); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglDebugMessageInsert(JNIEnv *__env, jclass clazz, jint source, jint type, jint id, jint severity, jint length, jlong messageAddress) { - glDebugMessageInsertPROC glDebugMessageInsert = (glDebugMessageInsertPROC)tlsGetFunction(876); - uintptr_t message = (uintptr_t)messageAddress; - UNUSED_PARAM(clazz) - glDebugMessageInsert(source, type, id, severity, length, message); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglDebugMessageCallback(JNIEnv *__env, jclass clazz, jlong callbackAddress, jlong userParamAddress) { - glDebugMessageCallbackPROC glDebugMessageCallback = (glDebugMessageCallbackPROC)tlsGetFunction(877); - uintptr_t callback = (uintptr_t)callbackAddress; - uintptr_t userParam = (uintptr_t)userParamAddress; - UNUSED_PARAM(clazz) - glDebugMessageCallback(callback, userParam); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43C_nglGetDebugMessageLog__IIJJJJJJ(JNIEnv *__env, jclass clazz, jint count, jint bufsize, jlong sourcesAddress, jlong typesAddress, jlong idsAddress, jlong severitiesAddress, jlong lengthsAddress, jlong messageLogAddress) { - glGetDebugMessageLogPROC glGetDebugMessageLog = (glGetDebugMessageLogPROC)tlsGetFunction(878); - uintptr_t sources = (uintptr_t)sourcesAddress; - uintptr_t types = (uintptr_t)typesAddress; - uintptr_t ids = (uintptr_t)idsAddress; - uintptr_t severities = (uintptr_t)severitiesAddress; - uintptr_t lengths = (uintptr_t)lengthsAddress; - uintptr_t messageLog = (uintptr_t)messageLogAddress; - UNUSED_PARAM(clazz) - return glGetDebugMessageLog(count, bufsize, sources, types, ids, severities, lengths, messageLog); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglPushDebugGroup(JNIEnv *__env, jclass clazz, jint source, jint id, jint length, jlong messageAddress) { - glPushDebugGroupPROC glPushDebugGroup = (glPushDebugGroupPROC)tlsGetFunction(879); - uintptr_t message = (uintptr_t)messageAddress; - UNUSED_PARAM(clazz) - glPushDebugGroup(source, id, length, message); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glPopDebugGroup(JNIEnv *__env, jclass clazz) { - glPopDebugGroupPROC glPopDebugGroup = (glPopDebugGroupPROC)tlsGetFunction(880); - UNUSED_PARAM(clazz) - glPopDebugGroup(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglObjectLabel(JNIEnv *__env, jclass clazz, jint identifier, jint name, jint length, jlong labelAddress) { - glObjectLabelPROC glObjectLabel = (glObjectLabelPROC)tlsGetFunction(881); - uintptr_t label = (uintptr_t)labelAddress; - UNUSED_PARAM(clazz) - glObjectLabel(identifier, name, length, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglGetObjectLabel__IIIJJ(JNIEnv *__env, jclass clazz, jint identifier, jint name, jint bufSize, jlong lengthAddress, jlong labelAddress) { - glGetObjectLabelPROC glGetObjectLabel = (glGetObjectLabelPROC)tlsGetFunction(882); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t label = (uintptr_t)labelAddress; - UNUSED_PARAM(clazz) - glGetObjectLabel(identifier, name, bufSize, length, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglObjectPtrLabel(JNIEnv *__env, jclass clazz, jlong ptrAddress, jint length, jlong labelAddress) { - glObjectPtrLabelPROC glObjectPtrLabel = (glObjectPtrLabelPROC)tlsGetFunction(883); - uintptr_t ptr = (uintptr_t)ptrAddress; - uintptr_t label = (uintptr_t)labelAddress; - UNUSED_PARAM(clazz) - glObjectPtrLabel(ptr, length, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglGetObjectPtrLabel__JIJJ(JNIEnv *__env, jclass clazz, jlong ptrAddress, jint bufSize, jlong lengthAddress, jlong labelAddress) { - glGetObjectPtrLabelPROC glGetObjectPtrLabel = (glGetObjectPtrLabelPROC)tlsGetFunction(884); - uintptr_t ptr = (uintptr_t)ptrAddress; - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t label = (uintptr_t)labelAddress; - UNUSED_PARAM(clazz) - glGetObjectPtrLabel(ptr, bufSize, length, label); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glFramebufferParameteri(JNIEnv *__env, jclass clazz, jint target, jint pname, jint param) { - glFramebufferParameteriPROC glFramebufferParameteri = (glFramebufferParameteriPROC)tlsGetFunction(885); - UNUSED_PARAM(clazz) - glFramebufferParameteri(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglGetFramebufferParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetFramebufferParameterivPROC glGetFramebufferParameteriv = (glGetFramebufferParameterivPROC)tlsGetFunction(886); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFramebufferParameteriv(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglGetInternalformati64v__IIIIJ(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint pname, jint bufSize, jlong paramsAddress) { - glGetInternalformati64vPROC glGetInternalformati64v = (glGetInternalformati64vPROC)tlsGetFunction(887); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetInternalformati64v(target, internalformat, pname, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glInvalidateTexSubImage(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth) { - glInvalidateTexSubImagePROC glInvalidateTexSubImage = (glInvalidateTexSubImagePROC)tlsGetFunction(888); - UNUSED_PARAM(clazz) - glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glInvalidateTexImage(JNIEnv *__env, jclass clazz, jint texture, jint level) { - glInvalidateTexImagePROC glInvalidateTexImage = (glInvalidateTexImagePROC)tlsGetFunction(889); - UNUSED_PARAM(clazz) - glInvalidateTexImage(texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glInvalidateBufferSubData(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong length) { - glInvalidateBufferSubDataPROC glInvalidateBufferSubData = (glInvalidateBufferSubDataPROC)tlsGetFunction(890); - UNUSED_PARAM(clazz) - glInvalidateBufferSubData(buffer, (uintptr_t)offset, (uintptr_t)length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glInvalidateBufferData(JNIEnv *__env, jclass clazz, jint buffer) { - glInvalidateBufferDataPROC glInvalidateBufferData = (glInvalidateBufferDataPROC)tlsGetFunction(891); - UNUSED_PARAM(clazz) - glInvalidateBufferData(buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglInvalidateFramebuffer__IIJ(JNIEnv *__env, jclass clazz, jint target, jint numAttachments, jlong attachmentsAddress) { - glInvalidateFramebufferPROC glInvalidateFramebuffer = (glInvalidateFramebufferPROC)tlsGetFunction(892); - uintptr_t attachments = (uintptr_t)attachmentsAddress; - UNUSED_PARAM(clazz) - glInvalidateFramebuffer(target, numAttachments, attachments); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglInvalidateSubFramebuffer__IIJIIII(JNIEnv *__env, jclass clazz, jint target, jint numAttachments, jlong attachmentsAddress, jint x, jint y, jint width, jint height) { - glInvalidateSubFramebufferPROC glInvalidateSubFramebuffer = (glInvalidateSubFramebufferPROC)tlsGetFunction(893); - uintptr_t attachments = (uintptr_t)attachmentsAddress; - UNUSED_PARAM(clazz) - glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglMultiDrawArraysIndirect__IJII(JNIEnv *__env, jclass clazz, jint mode, jlong indirectAddress, jint drawcount, jint stride) { - glMultiDrawArraysIndirectPROC glMultiDrawArraysIndirect = (glMultiDrawArraysIndirectPROC)tlsGetFunction(894); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglMultiDrawElementsIndirect__IIJII(JNIEnv *__env, jclass clazz, jint mode, jint type, jlong indirectAddress, jint drawcount, jint stride) { - glMultiDrawElementsIndirectPROC glMultiDrawElementsIndirect = (glMultiDrawElementsIndirectPROC)tlsGetFunction(895); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglGetProgramInterfaceiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint programInterface, jint pname, jlong paramsAddress) { - glGetProgramInterfaceivPROC glGetProgramInterfaceiv = (glGetProgramInterfaceivPROC)tlsGetFunction(896); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramInterfaceiv(program, programInterface, pname, params); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43C_nglGetProgramResourceIndex(JNIEnv *__env, jclass clazz, jint program, jint programInterface, jlong nameAddress) { - glGetProgramResourceIndexPROC glGetProgramResourceIndex = (glGetProgramResourceIndexPROC)tlsGetFunction(897); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetProgramResourceIndex(program, programInterface, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglGetProgramResourceName__IIIIJJ(JNIEnv *__env, jclass clazz, jint program, jint programInterface, jint index, jint bufSize, jlong lengthAddress, jlong nameAddress) { - glGetProgramResourceNamePROC glGetProgramResourceName = (glGetProgramResourceNamePROC)tlsGetFunction(898); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetProgramResourceName(program, programInterface, index, bufSize, length, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_nglGetProgramResourceiv__IIIIJIJJ(JNIEnv *__env, jclass clazz, jint program, jint programInterface, jint index, jint propCount, jlong propsAddress, jint bufSize, jlong lengthAddress, jlong paramsAddress) { - glGetProgramResourceivPROC glGetProgramResourceiv = (glGetProgramResourceivPROC)tlsGetFunction(899); - uintptr_t props = (uintptr_t)propsAddress; - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43C_nglGetProgramResourceLocation(JNIEnv *__env, jclass clazz, jint program, jint programInterface, jlong nameAddress) { - glGetProgramResourceLocationPROC glGetProgramResourceLocation = (glGetProgramResourceLocationPROC)tlsGetFunction(900); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetProgramResourceLocation(program, programInterface, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43C_nglGetProgramResourceLocationIndex(JNIEnv *__env, jclass clazz, jint program, jint programInterface, jlong nameAddress) { - glGetProgramResourceLocationIndexPROC glGetProgramResourceLocationIndex = (glGetProgramResourceLocationIndexPROC)tlsGetFunction(901); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetProgramResourceLocationIndex(program, programInterface, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glShaderStorageBlockBinding(JNIEnv *__env, jclass clazz, jint program, jint storageBlockIndex, jint storageBlockBinding) { - glShaderStorageBlockBindingPROC glShaderStorageBlockBinding = (glShaderStorageBlockBindingPROC)tlsGetFunction(902); - UNUSED_PARAM(clazz) - glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glTexBufferRange(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint buffer, jlong offset, jlong size) { - glTexBufferRangePROC glTexBufferRange = (glTexBufferRangePROC)tlsGetFunction(903); - UNUSED_PARAM(clazz) - glTexBufferRange(target, internalformat, buffer, (uintptr_t)offset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glTexStorage2DMultisample(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) { - glTexStorage2DMultisamplePROC glTexStorage2DMultisample = (glTexStorage2DMultisamplePROC)tlsGetFunction(904); - UNUSED_PARAM(clazz) - glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glTexStorage3DMultisample(JNIEnv *__env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) { - glTexStorage3DMultisamplePROC glTexStorage3DMultisample = (glTexStorage3DMultisamplePROC)tlsGetFunction(905); - UNUSED_PARAM(clazz) - glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glTextureView(JNIEnv *__env, jclass clazz, jint texture, jint target, jint origtexture, jint internalformat, jint minlevel, jint numlevels, jint minlayer, jint numlayers) { - glTextureViewPROC glTextureView = (glTextureViewPROC)tlsGetFunction(906); - UNUSED_PARAM(clazz) - glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glBindVertexBuffer(JNIEnv *__env, jclass clazz, jint bindingindex, jint buffer, jlong offset, jint stride) { - glBindVertexBufferPROC glBindVertexBuffer = (glBindVertexBufferPROC)tlsGetFunction(907); - UNUSED_PARAM(clazz) - glBindVertexBuffer(bindingindex, buffer, (uintptr_t)offset, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glVertexAttribFormat(JNIEnv *__env, jclass clazz, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) { - glVertexAttribFormatPROC glVertexAttribFormat = (glVertexAttribFormatPROC)tlsGetFunction(908); - UNUSED_PARAM(clazz) - glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glVertexAttribIFormat(JNIEnv *__env, jclass clazz, jint attribindex, jint size, jint type, jint relativeoffset) { - glVertexAttribIFormatPROC glVertexAttribIFormat = (glVertexAttribIFormatPROC)tlsGetFunction(909); - UNUSED_PARAM(clazz) - glVertexAttribIFormat(attribindex, size, type, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glVertexAttribLFormat(JNIEnv *__env, jclass clazz, jint attribindex, jint size, jint type, jint relativeoffset) { - glVertexAttribLFormatPROC glVertexAttribLFormat = (glVertexAttribLFormatPROC)tlsGetFunction(910); - UNUSED_PARAM(clazz) - glVertexAttribLFormat(attribindex, size, type, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glVertexAttribBinding(JNIEnv *__env, jclass clazz, jint attribindex, jint bindingindex) { - glVertexAttribBindingPROC glVertexAttribBinding = (glVertexAttribBindingPROC)tlsGetFunction(911); - UNUSED_PARAM(clazz) - glVertexAttribBinding(attribindex, bindingindex); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43C_glVertexBindingDivisor(JNIEnv *__env, jclass clazz, jint bindingindex, jint divisor) { - glVertexBindingDivisorPROC glVertexBindingDivisor = (glVertexBindingDivisorPROC)tlsGetFunction(912); - UNUSED_PARAM(clazz) - glVertexBindingDivisor(bindingindex, divisor); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL44C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL44C.c deleted file mode 100644 index c94f20a1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL44C.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBufferStoragePROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glClearTexSubImagePROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glClearTexImagePROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glBindBuffersBasePROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glBindBuffersRangePROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glBindTexturesPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glBindSamplersPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glBindImageTexturesPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glBindVertexBuffersPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglBufferStorage__IJJI(JNIEnv *__env, jclass clazz, jint target, jlong size, jlong dataAddress, jint flags) { - glBufferStoragePROC glBufferStorage = (glBufferStoragePROC)tlsGetFunction(913); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glBufferStorage(target, (uintptr_t)size, data, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglClearTexSubImage__IIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong dataAddress) { - glClearTexSubImagePROC glClearTexSubImage = (glClearTexSubImagePROC)tlsGetFunction(914); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglClearTexImage__IIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint format, jint type, jlong dataAddress) { - glClearTexImagePROC glClearTexImage = (glClearTexImagePROC)tlsGetFunction(915); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearTexImage(texture, level, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglBindBuffersBase__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint first, jint count, jlong buffersAddress) { - glBindBuffersBasePROC glBindBuffersBase = (glBindBuffersBasePROC)tlsGetFunction(916); - uintptr_t buffers = (uintptr_t)buffersAddress; - UNUSED_PARAM(clazz) - glBindBuffersBase(target, first, count, buffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglBindBuffersRange__IIIJJJ(JNIEnv *__env, jclass clazz, jint target, jint first, jint count, jlong buffersAddress, jlong offsetsAddress, jlong sizesAddress) { - glBindBuffersRangePROC glBindBuffersRange = (glBindBuffersRangePROC)tlsGetFunction(917); - uintptr_t buffers = (uintptr_t)buffersAddress; - uintptr_t offsets = (uintptr_t)offsetsAddress; - uintptr_t sizes = (uintptr_t)sizesAddress; - UNUSED_PARAM(clazz) - glBindBuffersRange(target, first, count, buffers, offsets, sizes); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglBindTextures__IIJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong texturesAddress) { - glBindTexturesPROC glBindTextures = (glBindTexturesPROC)tlsGetFunction(918); - uintptr_t textures = (uintptr_t)texturesAddress; - UNUSED_PARAM(clazz) - glBindTextures(first, count, textures); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglBindSamplers__IIJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong samplersAddress) { - glBindSamplersPROC glBindSamplers = (glBindSamplersPROC)tlsGetFunction(919); - uintptr_t samplers = (uintptr_t)samplersAddress; - UNUSED_PARAM(clazz) - glBindSamplers(first, count, samplers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglBindImageTextures__IIJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong texturesAddress) { - glBindImageTexturesPROC glBindImageTextures = (glBindImageTexturesPROC)tlsGetFunction(920); - uintptr_t textures = (uintptr_t)texturesAddress; - UNUSED_PARAM(clazz) - glBindImageTextures(first, count, textures); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44C_nglBindVertexBuffers__IIJJJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong buffersAddress, jlong offsetsAddress, jlong stridesAddress) { - glBindVertexBuffersPROC glBindVertexBuffers = (glBindVertexBuffersPROC)tlsGetFunction(921); - uintptr_t buffers = (uintptr_t)buffersAddress; - uintptr_t offsets = (uintptr_t)offsetsAddress; - uintptr_t strides = (uintptr_t)stridesAddress; - UNUSED_PARAM(clazz) - glBindVertexBuffers(first, count, buffers, offsets, strides); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL45.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL45.c deleted file mode 100644 index 02d1c6ca..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL45.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetnMapdvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnMapfvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnMapivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPixelMapfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPixelMapuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPixelMapusvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnPolygonStipplePROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetnColorTablePROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnConvolutionFilterPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnSeparableFilterPROC) (jint, jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetnHistogramPROC) (jint, jboolean, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnMinmaxPROC) (jint, jboolean, jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnMapdv__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jint bufSize, jlong dataAddress) { - glGetnMapdvPROC glGetnMapdv = (glGetnMapdvPROC)tlsGetFunction(1025); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnMapdv(target, query, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnMapfv__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jint bufSize, jlong dataAddress) { - glGetnMapfvPROC glGetnMapfv = (glGetnMapfvPROC)tlsGetFunction(1026); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnMapfv(target, query, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnMapiv__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint query, jint bufSize, jlong dataAddress) { - glGetnMapivPROC glGetnMapiv = (glGetnMapivPROC)tlsGetFunction(1027); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnMapiv(target, query, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnPixelMapfv__IIJ(JNIEnv *__env, jclass clazz, jint map, jint bufSize, jlong dataAddress) { - glGetnPixelMapfvPROC glGetnPixelMapfv = (glGetnPixelMapfvPROC)tlsGetFunction(1028); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnPixelMapfv(map, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnPixelMapuiv__IIJ(JNIEnv *__env, jclass clazz, jint map, jint bufSize, jlong dataAddress) { - glGetnPixelMapuivPROC glGetnPixelMapuiv = (glGetnPixelMapuivPROC)tlsGetFunction(1029); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnPixelMapuiv(map, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnPixelMapusv__IIJ(JNIEnv *__env, jclass clazz, jint map, jint bufSize, jlong dataAddress) { - glGetnPixelMapusvPROC glGetnPixelMapusv = (glGetnPixelMapusvPROC)tlsGetFunction(1030); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetnPixelMapusv(map, bufSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnPolygonStipple(JNIEnv *__env, jclass clazz, jint bufSize, jlong patternAddress) { - glGetnPolygonStipplePROC glGetnPolygonStipple = (glGetnPolygonStipplePROC)tlsGetFunction(1031); - uintptr_t pattern = (uintptr_t)patternAddress; - UNUSED_PARAM(clazz) - glGetnPolygonStipple(bufSize, pattern); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnColorTable__IIIIJ(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jint bufSize, jlong tableAddress) { - glGetnColorTablePROC glGetnColorTable = (glGetnColorTablePROC)tlsGetFunction(1034); - uintptr_t table = (uintptr_t)tableAddress; - UNUSED_PARAM(clazz) - glGetnColorTable(target, format, type, bufSize, table); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnConvolutionFilter(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jint bufSize, jlong imageAddress) { - glGetnConvolutionFilterPROC glGetnConvolutionFilter = (glGetnConvolutionFilterPROC)tlsGetFunction(1035); - uintptr_t image = (uintptr_t)imageAddress; - UNUSED_PARAM(clazz) - glGetnConvolutionFilter(target, format, type, bufSize, image); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnSeparableFilter(JNIEnv *__env, jclass clazz, jint target, jint format, jint type, jint rowBufSize, jlong rowAddress, jint columnBufSize, jlong columnAddress, jlong spanAddress) { - glGetnSeparableFilterPROC glGetnSeparableFilter = (glGetnSeparableFilterPROC)tlsGetFunction(1036); - uintptr_t row = (uintptr_t)rowAddress; - uintptr_t column = (uintptr_t)columnAddress; - uintptr_t span = (uintptr_t)spanAddress; - UNUSED_PARAM(clazz) - glGetnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize, column, span); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnHistogram(JNIEnv *__env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong valuesAddress) { - glGetnHistogramPROC glGetnHistogram = (glGetnHistogramPROC)tlsGetFunction(1037); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetnHistogram(target, reset, format, type, bufSize, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45_nglGetnMinmax(JNIEnv *__env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong valuesAddress) { - glGetnMinmaxPROC glGetnMinmax = (glGetnMinmaxPROC)tlsGetFunction(1038); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glGetnMinmax(target, reset, format, type, bufSize, values); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL45C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL45C.c deleted file mode 100644 index 2cfe92f4..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL45C.c +++ /dev/null @@ -1,845 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glClipControlPROC) (jint, jint); -typedef void (APIENTRY *glCreateTransformFeedbacksPROC) (jint, uintptr_t); -typedef void (APIENTRY *glTransformFeedbackBufferBasePROC) (jint, jint, jint); -typedef void (APIENTRY *glTransformFeedbackBufferRangePROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetTransformFeedbackivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTransformFeedbacki_vPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTransformFeedbacki64_vPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCreateBuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glNamedBufferStoragePROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glNamedBufferDataPROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glNamedBufferSubDataPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glCopyNamedBufferSubDataPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glClearNamedBufferDataPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glClearNamedBufferSubDataPROC) (jint, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t); -typedef uintptr_t (APIENTRY *glMapNamedBufferPROC) (jint, jint); -typedef uintptr_t (APIENTRY *glMapNamedBufferRangePROC) (jint, uintptr_t, uintptr_t, jint); -typedef jboolean (APIENTRY *glUnmapNamedBufferPROC) (jint); -typedef void (APIENTRY *glFlushMappedNamedBufferRangePROC) (jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetNamedBufferParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedBufferParameteri64vPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedBufferPointervPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedBufferSubDataPROC) (jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glCreateFramebuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glNamedFramebufferRenderbufferPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferParameteriPROC) (jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferTexturePROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferTextureLayerPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferDrawBufferPROC) (jint, jint); -typedef void (APIENTRY *glNamedFramebufferDrawBuffersPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedFramebufferReadBufferPROC) (jint, jint); -typedef void (APIENTRY *glInvalidateNamedFramebufferDataPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glInvalidateNamedFramebufferSubDataPROC) (jint, jint, uintptr_t, jint, jint, jint, jint); -typedef void (APIENTRY *glClearNamedFramebufferivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glClearNamedFramebufferuivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glClearNamedFramebufferfvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glClearNamedFramebufferfiPROC) (jint, jint, jint, jfloat, jint); -typedef void (APIENTRY *glBlitNamedFramebufferPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef jint (APIENTRY *glCheckNamedFramebufferStatusPROC) (jint, jint); -typedef void (APIENTRY *glGetNamedFramebufferParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedFramebufferAttachmentParameterivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCreateRenderbuffersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glNamedRenderbufferStoragePROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glNamedRenderbufferStorageMultisamplePROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glGetNamedRenderbufferParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glCreateTexturesPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureBufferPROC) (jint, jint, jint); -typedef void (APIENTRY *glTextureBufferRangePROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glTextureStorage1DPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage2DPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage3DPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureStorage2DMultisamplePROC) (jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureStorage3DMultisamplePROC) (jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureSubImage1DPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureSubImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureSubImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureSubImage1DPROC) (jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureSubImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCompressedTextureSubImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCopyTextureSubImage1DPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTextureSubImage2DPROC) (jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glCopyTextureSubImage3DPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glTextureParameterfPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glTextureParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureParameteriPROC) (jint, jint, jint); -typedef void (APIENTRY *glTextureParameterIivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureParameterIuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGenerateTextureMipmapPROC) (jint); -typedef void (APIENTRY *glBindTextureUnitPROC) (jint, jint); -typedef void (APIENTRY *glGetTextureImagePROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetCompressedTextureImagePROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureLevelParameterfvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureLevelParameterivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterfvPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterIivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterIuivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetTextureParameterivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glCreateVertexArraysPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDisableVertexArrayAttribPROC) (jint, jint); -typedef void (APIENTRY *glEnableVertexArrayAttribPROC) (jint, jint); -typedef void (APIENTRY *glVertexArrayElementBufferPROC) (jint, jint); -typedef void (APIENTRY *glVertexArrayVertexBufferPROC) (jint, jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glVertexArrayVertexBuffersPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glVertexArrayAttribFormatPROC) (jint, jint, jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexArrayAttribIFormatPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexArrayAttribLFormatPROC) (jint, jint, jint, jint, jint); -typedef void (APIENTRY *glVertexArrayAttribBindingPROC) (jint, jint, jint); -typedef void (APIENTRY *glVertexArrayBindingDivisorPROC) (jint, jint, jint); -typedef void (APIENTRY *glGetVertexArrayivPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexArrayIndexedivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexArrayIndexed64ivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCreateSamplersPROC) (jint, uintptr_t); -typedef void (APIENTRY *glCreateProgramPipelinesPROC) (jint, uintptr_t); -typedef void (APIENTRY *glCreateQueriesPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryBufferObjectivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryBufferObjectuivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryBufferObjecti64vPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetQueryBufferObjectui64vPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMemoryBarrierByRegionPROC) (jint); -typedef void (APIENTRY *glGetTextureSubImagePROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetCompressedTextureSubImagePROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glTextureBarrierPROC) (void); -typedef jint (APIENTRY *glGetGraphicsResetStatusPROC) (void); -typedef void (APIENTRY *glGetnTexImagePROC) (jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glReadnPixelsPROC) (jint, jint, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnCompressedTexImagePROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformfvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformdvPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformivPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetnUniformuivPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glClipControl(JNIEnv *__env, jclass clazz, jint origin, jint depth) { - glClipControlPROC glClipControl = (glClipControlPROC)tlsGetFunction(922); - UNUSED_PARAM(clazz) - glClipControl(origin, depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateTransformFeedbacks__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glCreateTransformFeedbacksPROC glCreateTransformFeedbacks = (glCreateTransformFeedbacksPROC)tlsGetFunction(923); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glCreateTransformFeedbacks(n, ids); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTransformFeedbackBufferBase(JNIEnv *__env, jclass clazz, jint xfb, jint index, jint buffer) { - glTransformFeedbackBufferBasePROC glTransformFeedbackBufferBase = (glTransformFeedbackBufferBasePROC)tlsGetFunction(924); - UNUSED_PARAM(clazz) - glTransformFeedbackBufferBase(xfb, index, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTransformFeedbackBufferRange(JNIEnv *__env, jclass clazz, jint xfb, jint index, jint buffer, jlong offset, jlong size) { - glTransformFeedbackBufferRangePROC glTransformFeedbackBufferRange = (glTransformFeedbackBufferRangePROC)tlsGetFunction(925); - UNUSED_PARAM(clazz) - glTransformFeedbackBufferRange(xfb, index, buffer, (uintptr_t)offset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTransformFeedbackiv__IIJ(JNIEnv *__env, jclass clazz, jint xfb, jint pname, jlong paramAddress) { - glGetTransformFeedbackivPROC glGetTransformFeedbackiv = (glGetTransformFeedbackivPROC)tlsGetFunction(926); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetTransformFeedbackiv(xfb, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTransformFeedbacki_1v__IIIJ(JNIEnv *__env, jclass clazz, jint xfb, jint pname, jint index, jlong paramAddress) { - glGetTransformFeedbacki_vPROC glGetTransformFeedbacki_v = (glGetTransformFeedbacki_vPROC)tlsGetFunction(927); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetTransformFeedbacki_v(xfb, pname, index, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTransformFeedbacki64_1v__IIIJ(JNIEnv *__env, jclass clazz, jint xfb, jint pname, jint index, jlong paramAddress) { - glGetTransformFeedbacki64_vPROC glGetTransformFeedbacki64_v = (glGetTransformFeedbacki64_vPROC)tlsGetFunction(928); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetTransformFeedbacki64_v(xfb, pname, index, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateBuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong buffersAddress) { - glCreateBuffersPROC glCreateBuffers = (glCreateBuffersPROC)tlsGetFunction(929); - uintptr_t buffers = (uintptr_t)buffersAddress; - UNUSED_PARAM(clazz) - glCreateBuffers(n, buffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglNamedBufferStorage__IJJI(JNIEnv *__env, jclass clazz, jint buffer, jlong size, jlong dataAddress, jint flags) { - glNamedBufferStoragePROC glNamedBufferStorage = (glNamedBufferStoragePROC)tlsGetFunction(930); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glNamedBufferStorage(buffer, (uintptr_t)size, data, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglNamedBufferData__IJJI(JNIEnv *__env, jclass clazz, jint buffer, jlong size, jlong dataAddress, jint usage) { - glNamedBufferDataPROC glNamedBufferData = (glNamedBufferDataPROC)tlsGetFunction(931); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glNamedBufferData(buffer, (uintptr_t)size, data, usage); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglNamedBufferSubData__IJJJ(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jlong dataAddress) { - glNamedBufferSubDataPROC glNamedBufferSubData = (glNamedBufferSubDataPROC)tlsGetFunction(932); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glNamedBufferSubData(buffer, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glCopyNamedBufferSubData(JNIEnv *__env, jclass clazz, jint readBuffer, jint writeBuffer, jlong readOffset, jlong writeOffset, jlong size) { - glCopyNamedBufferSubDataPROC glCopyNamedBufferSubData = (glCopyNamedBufferSubDataPROC)tlsGetFunction(933); - UNUSED_PARAM(clazz) - glCopyNamedBufferSubData(readBuffer, writeBuffer, (uintptr_t)readOffset, (uintptr_t)writeOffset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglClearNamedBufferData__IIIIJ(JNIEnv *__env, jclass clazz, jint buffer, jint internalformat, jint format, jint type, jlong dataAddress) { - glClearNamedBufferDataPROC glClearNamedBufferData = (glClearNamedBufferDataPROC)tlsGetFunction(934); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearNamedBufferData(buffer, internalformat, format, type, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglClearNamedBufferSubData__IIJJIIJ(JNIEnv *__env, jclass clazz, jint buffer, jint internalformat, jlong offset, jlong size, jint format, jint type, jlong dataAddress) { - glClearNamedBufferSubDataPROC glClearNamedBufferSubData = (glClearNamedBufferSubDataPROC)tlsGetFunction(935); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glClearNamedBufferSubData(buffer, internalformat, (uintptr_t)offset, (uintptr_t)size, format, type, data); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL45C_nglMapNamedBuffer(JNIEnv *__env, jclass clazz, jint buffer, jint access) { - glMapNamedBufferPROC glMapNamedBuffer = (glMapNamedBufferPROC)tlsGetFunction(936); - UNUSED_PARAM(clazz) - return (jlong)glMapNamedBuffer(buffer, access); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL45C_nglMapNamedBufferRange(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong length, jint access) { - glMapNamedBufferRangePROC glMapNamedBufferRange = (glMapNamedBufferRangePROC)tlsGetFunction(937); - UNUSED_PARAM(clazz) - return (jlong)glMapNamedBufferRange(buffer, (uintptr_t)offset, (uintptr_t)length, access); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL45C_glUnmapNamedBuffer(JNIEnv *__env, jclass clazz, jint buffer) { - glUnmapNamedBufferPROC glUnmapNamedBuffer = (glUnmapNamedBufferPROC)tlsGetFunction(938); - UNUSED_PARAM(clazz) - return glUnmapNamedBuffer(buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glFlushMappedNamedBufferRange(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong length) { - glFlushMappedNamedBufferRangePROC glFlushMappedNamedBufferRange = (glFlushMappedNamedBufferRangePROC)tlsGetFunction(939); - UNUSED_PARAM(clazz) - glFlushMappedNamedBufferRange(buffer, (uintptr_t)offset, (uintptr_t)length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetNamedBufferParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint buffer, jint pname, jlong paramsAddress) { - glGetNamedBufferParameterivPROC glGetNamedBufferParameteriv = (glGetNamedBufferParameterivPROC)tlsGetFunction(940); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedBufferParameteriv(buffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetNamedBufferParameteri64v__IIJ(JNIEnv *__env, jclass clazz, jint buffer, jint pname, jlong paramsAddress) { - glGetNamedBufferParameteri64vPROC glGetNamedBufferParameteri64v = (glGetNamedBufferParameteri64vPROC)tlsGetFunction(941); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedBufferParameteri64v(buffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetNamedBufferPointerv(JNIEnv *__env, jclass clazz, jint buffer, jint pname, jlong paramsAddress) { - glGetNamedBufferPointervPROC glGetNamedBufferPointerv = (glGetNamedBufferPointervPROC)tlsGetFunction(942); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedBufferPointerv(buffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetNamedBufferSubData__IJJJ(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jlong dataAddress) { - glGetNamedBufferSubDataPROC glGetNamedBufferSubData = (glGetNamedBufferSubDataPROC)tlsGetFunction(943); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glGetNamedBufferSubData(buffer, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateFramebuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong framebuffersAddress) { - glCreateFramebuffersPROC glCreateFramebuffers = (glCreateFramebuffersPROC)tlsGetFunction(944); - uintptr_t framebuffers = (uintptr_t)framebuffersAddress; - UNUSED_PARAM(clazz) - glCreateFramebuffers(n, framebuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedFramebufferRenderbuffer(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint renderbuffertarget, jint renderbuffer) { - glNamedFramebufferRenderbufferPROC glNamedFramebufferRenderbuffer = (glNamedFramebufferRenderbufferPROC)tlsGetFunction(945); - UNUSED_PARAM(clazz) - glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedFramebufferParameteri(JNIEnv *__env, jclass clazz, jint framebuffer, jint pname, jint param) { - glNamedFramebufferParameteriPROC glNamedFramebufferParameteri = (glNamedFramebufferParameteriPROC)tlsGetFunction(946); - UNUSED_PARAM(clazz) - glNamedFramebufferParameteri(framebuffer, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedFramebufferTexture(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level) { - glNamedFramebufferTexturePROC glNamedFramebufferTexture = (glNamedFramebufferTexturePROC)tlsGetFunction(947); - UNUSED_PARAM(clazz) - glNamedFramebufferTexture(framebuffer, attachment, texture, level); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedFramebufferTextureLayer(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint layer) { - glNamedFramebufferTextureLayerPROC glNamedFramebufferTextureLayer = (glNamedFramebufferTextureLayerPROC)tlsGetFunction(948); - UNUSED_PARAM(clazz) - glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedFramebufferDrawBuffer(JNIEnv *__env, jclass clazz, jint framebuffer, jint buf) { - glNamedFramebufferDrawBufferPROC glNamedFramebufferDrawBuffer = (glNamedFramebufferDrawBufferPROC)tlsGetFunction(949); - UNUSED_PARAM(clazz) - glNamedFramebufferDrawBuffer(framebuffer, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglNamedFramebufferDrawBuffers__IIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint n, jlong bufsAddress) { - glNamedFramebufferDrawBuffersPROC glNamedFramebufferDrawBuffers = (glNamedFramebufferDrawBuffersPROC)tlsGetFunction(950); - uintptr_t bufs = (uintptr_t)bufsAddress; - UNUSED_PARAM(clazz) - glNamedFramebufferDrawBuffers(framebuffer, n, bufs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedFramebufferReadBuffer(JNIEnv *__env, jclass clazz, jint framebuffer, jint src) { - glNamedFramebufferReadBufferPROC glNamedFramebufferReadBuffer = (glNamedFramebufferReadBufferPROC)tlsGetFunction(951); - UNUSED_PARAM(clazz) - glNamedFramebufferReadBuffer(framebuffer, src); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglInvalidateNamedFramebufferData__IIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint numAttachments, jlong attachmentsAddress) { - glInvalidateNamedFramebufferDataPROC glInvalidateNamedFramebufferData = (glInvalidateNamedFramebufferDataPROC)tlsGetFunction(952); - uintptr_t attachments = (uintptr_t)attachmentsAddress; - UNUSED_PARAM(clazz) - glInvalidateNamedFramebufferData(framebuffer, numAttachments, attachments); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglInvalidateNamedFramebufferSubData__IIJIIII(JNIEnv *__env, jclass clazz, jint framebuffer, jint numAttachments, jlong attachmentsAddress, jint x, jint y, jint width, jint height) { - glInvalidateNamedFramebufferSubDataPROC glInvalidateNamedFramebufferSubData = (glInvalidateNamedFramebufferSubDataPROC)tlsGetFunction(953); - uintptr_t attachments = (uintptr_t)attachmentsAddress; - UNUSED_PARAM(clazz) - glInvalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglClearNamedFramebufferiv__IIIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint buffer, jint drawbuffer, jlong valueAddress) { - glClearNamedFramebufferivPROC glClearNamedFramebufferiv = (glClearNamedFramebufferivPROC)tlsGetFunction(954); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglClearNamedFramebufferuiv__IIIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint buffer, jint drawbuffer, jlong valueAddress) { - glClearNamedFramebufferuivPROC glClearNamedFramebufferuiv = (glClearNamedFramebufferuivPROC)tlsGetFunction(955); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglClearNamedFramebufferfv__IIIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint buffer, jint drawbuffer, jlong valueAddress) { - glClearNamedFramebufferfvPROC glClearNamedFramebufferfv = (glClearNamedFramebufferfvPROC)tlsGetFunction(956); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glClearNamedFramebufferfi(JNIEnv *__env, jclass clazz, jint framebuffer, jint buffer, jint drawbuffer, jfloat depth, jint stencil) { - glClearNamedFramebufferfiPROC glClearNamedFramebufferfi = (glClearNamedFramebufferfiPROC)tlsGetFunction(957); - UNUSED_PARAM(clazz) - glClearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glBlitNamedFramebuffer(JNIEnv *__env, jclass clazz, jint readFramebuffer, jint drawFramebuffer, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { - glBlitNamedFramebufferPROC glBlitNamedFramebuffer = (glBlitNamedFramebufferPROC)tlsGetFunction(958); - UNUSED_PARAM(clazz) - glBlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL45C_glCheckNamedFramebufferStatus(JNIEnv *__env, jclass clazz, jint framebuffer, jint target) { - glCheckNamedFramebufferStatusPROC glCheckNamedFramebufferStatus = (glCheckNamedFramebufferStatusPROC)tlsGetFunction(959); - UNUSED_PARAM(clazz) - return glCheckNamedFramebufferStatus(framebuffer, target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetNamedFramebufferParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint pname, jlong paramsAddress) { - glGetNamedFramebufferParameterivPROC glGetNamedFramebufferParameteriv = (glGetNamedFramebufferParameterivPROC)tlsGetFunction(960); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedFramebufferParameteriv(framebuffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetNamedFramebufferAttachmentParameteriv__IIIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint pname, jlong paramsAddress) { - glGetNamedFramebufferAttachmentParameterivPROC glGetNamedFramebufferAttachmentParameteriv = (glGetNamedFramebufferAttachmentParameterivPROC)tlsGetFunction(961); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateRenderbuffers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong renderbuffersAddress) { - glCreateRenderbuffersPROC glCreateRenderbuffers = (glCreateRenderbuffersPROC)tlsGetFunction(962); - uintptr_t renderbuffers = (uintptr_t)renderbuffersAddress; - UNUSED_PARAM(clazz) - glCreateRenderbuffers(n, renderbuffers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedRenderbufferStorage(JNIEnv *__env, jclass clazz, jint renderbuffer, jint internalformat, jint width, jint height) { - glNamedRenderbufferStoragePROC glNamedRenderbufferStorage = (glNamedRenderbufferStoragePROC)tlsGetFunction(963); - UNUSED_PARAM(clazz) - glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glNamedRenderbufferStorageMultisample(JNIEnv *__env, jclass clazz, jint renderbuffer, jint samples, jint internalformat, jint width, jint height) { - glNamedRenderbufferStorageMultisamplePROC glNamedRenderbufferStorageMultisample = (glNamedRenderbufferStorageMultisamplePROC)tlsGetFunction(964); - UNUSED_PARAM(clazz) - glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetNamedRenderbufferParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint renderbuffer, jint pname, jlong paramsAddress) { - glGetNamedRenderbufferParameterivPROC glGetNamedRenderbufferParameteriv = (glGetNamedRenderbufferParameterivPROC)tlsGetFunction(965); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateTextures__IIJ(JNIEnv *__env, jclass clazz, jint target, jint n, jlong texturesAddress) { - glCreateTexturesPROC glCreateTextures = (glCreateTexturesPROC)tlsGetFunction(966); - uintptr_t textures = (uintptr_t)texturesAddress; - UNUSED_PARAM(clazz) - glCreateTextures(target, n, textures); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureBuffer(JNIEnv *__env, jclass clazz, jint texture, jint internalformat, jint buffer) { - glTextureBufferPROC glTextureBuffer = (glTextureBufferPROC)tlsGetFunction(967); - UNUSED_PARAM(clazz) - glTextureBuffer(texture, internalformat, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureBufferRange(JNIEnv *__env, jclass clazz, jint texture, jint internalformat, jint buffer, jlong offset, jlong size) { - glTextureBufferRangePROC glTextureBufferRange = (glTextureBufferRangePROC)tlsGetFunction(968); - UNUSED_PARAM(clazz) - glTextureBufferRange(texture, internalformat, buffer, (uintptr_t)offset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureStorage1D(JNIEnv *__env, jclass clazz, jint texture, jint levels, jint internalformat, jint width) { - glTextureStorage1DPROC glTextureStorage1D = (glTextureStorage1DPROC)tlsGetFunction(969); - UNUSED_PARAM(clazz) - glTextureStorage1D(texture, levels, internalformat, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureStorage2D(JNIEnv *__env, jclass clazz, jint texture, jint levels, jint internalformat, jint width, jint height) { - glTextureStorage2DPROC glTextureStorage2D = (glTextureStorage2DPROC)tlsGetFunction(970); - UNUSED_PARAM(clazz) - glTextureStorage2D(texture, levels, internalformat, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureStorage3D(JNIEnv *__env, jclass clazz, jint texture, jint levels, jint internalformat, jint width, jint height, jint depth) { - glTextureStorage3DPROC glTextureStorage3D = (glTextureStorage3DPROC)tlsGetFunction(971); - UNUSED_PARAM(clazz) - glTextureStorage3D(texture, levels, internalformat, width, height, depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureStorage2DMultisample(JNIEnv *__env, jclass clazz, jint texture, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations) { - glTextureStorage2DMultisamplePROC glTextureStorage2DMultisample = (glTextureStorage2DMultisamplePROC)tlsGetFunction(972); - UNUSED_PARAM(clazz) - glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureStorage3DMultisample(JNIEnv *__env, jclass clazz, jint texture, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations) { - glTextureStorage3DMultisamplePROC glTextureStorage3DMultisample = (glTextureStorage3DMultisamplePROC)tlsGetFunction(973); - UNUSED_PARAM(clazz) - glTextureStorage3DMultisample(texture, samples, internalformat, width, height, depth, fixedsamplelocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglTextureSubImage1D__IIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint width, jint format, jint type, jlong pixelsAddress) { - glTextureSubImage1DPROC glTextureSubImage1D = (glTextureSubImage1DPROC)tlsGetFunction(974); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglTextureSubImage2D__IIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixelsAddress) { - glTextureSubImage2DPROC glTextureSubImage2D = (glTextureSubImage2DPROC)tlsGetFunction(975); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglTextureSubImage3D__IIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixelsAddress) { - glTextureSubImage3DPROC glTextureSubImage3D = (glTextureSubImage3DPROC)tlsGetFunction(976); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCompressedTextureSubImage1D(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong dataAddress) { - glCompressedTextureSubImage1DPROC glCompressedTextureSubImage1D = (glCompressedTextureSubImage1DPROC)tlsGetFunction(977); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCompressedTextureSubImage2D(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong dataAddress) { - glCompressedTextureSubImage2DPROC glCompressedTextureSubImage2D = (glCompressedTextureSubImage2DPROC)tlsGetFunction(978); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCompressedTextureSubImage3D(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong dataAddress) { - glCompressedTextureSubImage3DPROC glCompressedTextureSubImage3D = (glCompressedTextureSubImage3DPROC)tlsGetFunction(979); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glCopyTextureSubImage1D(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint x, jint y, jint width) { - glCopyTextureSubImage1DPROC glCopyTextureSubImage1D = (glCopyTextureSubImage1DPROC)tlsGetFunction(980); - UNUSED_PARAM(clazz) - glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glCopyTextureSubImage2D(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) { - glCopyTextureSubImage2DPROC glCopyTextureSubImage2D = (glCopyTextureSubImage2DPROC)tlsGetFunction(981); - UNUSED_PARAM(clazz) - glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glCopyTextureSubImage3D(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { - glCopyTextureSubImage3DPROC glCopyTextureSubImage3D = (glCopyTextureSubImage3DPROC)tlsGetFunction(982); - UNUSED_PARAM(clazz) - glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureParameterf(JNIEnv *__env, jclass clazz, jint texture, jint pname, jfloat param) { - glTextureParameterfPROC glTextureParameterf = (glTextureParameterfPROC)tlsGetFunction(983); - UNUSED_PARAM(clazz) - glTextureParameterf(texture, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglTextureParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glTextureParameterfvPROC glTextureParameterfv = (glTextureParameterfvPROC)tlsGetFunction(984); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTextureParameterfv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureParameteri(JNIEnv *__env, jclass clazz, jint texture, jint pname, jint param) { - glTextureParameteriPROC glTextureParameteri = (glTextureParameteriPROC)tlsGetFunction(985); - UNUSED_PARAM(clazz) - glTextureParameteri(texture, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglTextureParameterIiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glTextureParameterIivPROC glTextureParameterIiv = (glTextureParameterIivPROC)tlsGetFunction(986); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTextureParameterIiv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglTextureParameterIuiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glTextureParameterIuivPROC glTextureParameterIuiv = (glTextureParameterIuivPROC)tlsGetFunction(987); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTextureParameterIuiv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglTextureParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glTextureParameterivPROC glTextureParameteriv = (glTextureParameterivPROC)tlsGetFunction(988); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glTextureParameteriv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glGenerateTextureMipmap(JNIEnv *__env, jclass clazz, jint texture) { - glGenerateTextureMipmapPROC glGenerateTextureMipmap = (glGenerateTextureMipmapPROC)tlsGetFunction(989); - UNUSED_PARAM(clazz) - glGenerateTextureMipmap(texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glBindTextureUnit(JNIEnv *__env, jclass clazz, jint unit, jint texture) { - glBindTextureUnitPROC glBindTextureUnit = (glBindTextureUnitPROC)tlsGetFunction(990); - UNUSED_PARAM(clazz) - glBindTextureUnit(unit, texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureImage__IIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint format, jint type, jint bufSize, jlong pixelsAddress) { - glGetTextureImagePROC glGetTextureImage = (glGetTextureImagePROC)tlsGetFunction(991); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetTextureImage(texture, level, format, type, bufSize, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetCompressedTextureImage(JNIEnv *__env, jclass clazz, jint texture, jint level, jint bufSize, jlong pixelsAddress) { - glGetCompressedTextureImagePROC glGetCompressedTextureImage = (glGetCompressedTextureImagePROC)tlsGetFunction(992); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetCompressedTextureImage(texture, level, bufSize, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureLevelParameterfv__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint pname, jlong paramsAddress) { - glGetTextureLevelParameterfvPROC glGetTextureLevelParameterfv = (glGetTextureLevelParameterfvPROC)tlsGetFunction(993); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureLevelParameterfv(texture, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureLevelParameteriv__IIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint pname, jlong paramsAddress) { - glGetTextureLevelParameterivPROC glGetTextureLevelParameteriv = (glGetTextureLevelParameterivPROC)tlsGetFunction(994); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureLevelParameteriv(texture, level, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureParameterfv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glGetTextureParameterfvPROC glGetTextureParameterfv = (glGetTextureParameterfvPROC)tlsGetFunction(995); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameterfv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureParameterIiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glGetTextureParameterIivPROC glGetTextureParameterIiv = (glGetTextureParameterIivPROC)tlsGetFunction(996); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameterIiv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureParameterIuiv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glGetTextureParameterIuivPROC glGetTextureParameterIuiv = (glGetTextureParameterIuivPROC)tlsGetFunction(997); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameterIuiv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureParameteriv__IIJ(JNIEnv *__env, jclass clazz, jint texture, jint pname, jlong paramsAddress) { - glGetTextureParameterivPROC glGetTextureParameteriv = (glGetTextureParameterivPROC)tlsGetFunction(998); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetTextureParameteriv(texture, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateVertexArrays__IJ(JNIEnv *__env, jclass clazz, jint n, jlong arraysAddress) { - glCreateVertexArraysPROC glCreateVertexArrays = (glCreateVertexArraysPROC)tlsGetFunction(999); - uintptr_t arrays = (uintptr_t)arraysAddress; - UNUSED_PARAM(clazz) - glCreateVertexArrays(n, arrays); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glDisableVertexArrayAttrib(JNIEnv *__env, jclass clazz, jint vaobj, jint index) { - glDisableVertexArrayAttribPROC glDisableVertexArrayAttrib = (glDisableVertexArrayAttribPROC)tlsGetFunction(1000); - UNUSED_PARAM(clazz) - glDisableVertexArrayAttrib(vaobj, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glEnableVertexArrayAttrib(JNIEnv *__env, jclass clazz, jint vaobj, jint index) { - glEnableVertexArrayAttribPROC glEnableVertexArrayAttrib = (glEnableVertexArrayAttribPROC)tlsGetFunction(1001); - UNUSED_PARAM(clazz) - glEnableVertexArrayAttrib(vaobj, index); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glVertexArrayElementBuffer(JNIEnv *__env, jclass clazz, jint vaobj, jint buffer) { - glVertexArrayElementBufferPROC glVertexArrayElementBuffer = (glVertexArrayElementBufferPROC)tlsGetFunction(1002); - UNUSED_PARAM(clazz) - glVertexArrayElementBuffer(vaobj, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glVertexArrayVertexBuffer(JNIEnv *__env, jclass clazz, jint vaobj, jint bindingindex, jint buffer, jlong offset, jint stride) { - glVertexArrayVertexBufferPROC glVertexArrayVertexBuffer = (glVertexArrayVertexBufferPROC)tlsGetFunction(1003); - UNUSED_PARAM(clazz) - glVertexArrayVertexBuffer(vaobj, bindingindex, buffer, (uintptr_t)offset, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglVertexArrayVertexBuffers__IIIJJJ(JNIEnv *__env, jclass clazz, jint vaobj, jint first, jint count, jlong buffersAddress, jlong offsetsAddress, jlong stridesAddress) { - glVertexArrayVertexBuffersPROC glVertexArrayVertexBuffers = (glVertexArrayVertexBuffersPROC)tlsGetFunction(1004); - uintptr_t buffers = (uintptr_t)buffersAddress; - uintptr_t offsets = (uintptr_t)offsetsAddress; - uintptr_t strides = (uintptr_t)stridesAddress; - UNUSED_PARAM(clazz) - glVertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, strides); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glVertexArrayAttribFormat(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset) { - glVertexArrayAttribFormatPROC glVertexArrayAttribFormat = (glVertexArrayAttribFormatPROC)tlsGetFunction(1005); - UNUSED_PARAM(clazz) - glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glVertexArrayAttribIFormat(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint size, jint type, jint relativeoffset) { - glVertexArrayAttribIFormatPROC glVertexArrayAttribIFormat = (glVertexArrayAttribIFormatPROC)tlsGetFunction(1006); - UNUSED_PARAM(clazz) - glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glVertexArrayAttribLFormat(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint size, jint type, jint relativeoffset) { - glVertexArrayAttribLFormatPROC glVertexArrayAttribLFormat = (glVertexArrayAttribLFormatPROC)tlsGetFunction(1007); - UNUSED_PARAM(clazz) - glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glVertexArrayAttribBinding(JNIEnv *__env, jclass clazz, jint vaobj, jint attribindex, jint bindingindex) { - glVertexArrayAttribBindingPROC glVertexArrayAttribBinding = (glVertexArrayAttribBindingPROC)tlsGetFunction(1008); - UNUSED_PARAM(clazz) - glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glVertexArrayBindingDivisor(JNIEnv *__env, jclass clazz, jint vaobj, jint bindingindex, jint divisor) { - glVertexArrayBindingDivisorPROC glVertexArrayBindingDivisor = (glVertexArrayBindingDivisorPROC)tlsGetFunction(1009); - UNUSED_PARAM(clazz) - glVertexArrayBindingDivisor(vaobj, bindingindex, divisor); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetVertexArrayiv__IIJ(JNIEnv *__env, jclass clazz, jint vaobj, jint pname, jlong paramAddress) { - glGetVertexArrayivPROC glGetVertexArrayiv = (glGetVertexArrayivPROC)tlsGetFunction(1010); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetVertexArrayiv(vaobj, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetVertexArrayIndexediv__IIIJ(JNIEnv *__env, jclass clazz, jint vaobj, jint index, jint pname, jlong paramAddress) { - glGetVertexArrayIndexedivPROC glGetVertexArrayIndexediv = (glGetVertexArrayIndexedivPROC)tlsGetFunction(1011); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetVertexArrayIndexediv(vaobj, index, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetVertexArrayIndexed64iv__IIIJ(JNIEnv *__env, jclass clazz, jint vaobj, jint index, jint pname, jlong paramAddress) { - glGetVertexArrayIndexed64ivPROC glGetVertexArrayIndexed64iv = (glGetVertexArrayIndexed64ivPROC)tlsGetFunction(1012); - uintptr_t param = (uintptr_t)paramAddress; - UNUSED_PARAM(clazz) - glGetVertexArrayIndexed64iv(vaobj, index, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateSamplers__IJ(JNIEnv *__env, jclass clazz, jint n, jlong samplersAddress) { - glCreateSamplersPROC glCreateSamplers = (glCreateSamplersPROC)tlsGetFunction(1013); - uintptr_t samplers = (uintptr_t)samplersAddress; - UNUSED_PARAM(clazz) - glCreateSamplers(n, samplers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateProgramPipelines__IJ(JNIEnv *__env, jclass clazz, jint n, jlong pipelinesAddress) { - glCreateProgramPipelinesPROC glCreateProgramPipelines = (glCreateProgramPipelinesPROC)tlsGetFunction(1014); - uintptr_t pipelines = (uintptr_t)pipelinesAddress; - UNUSED_PARAM(clazz) - glCreateProgramPipelines(n, pipelines); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglCreateQueries__IIJ(JNIEnv *__env, jclass clazz, jint target, jint n, jlong idsAddress) { - glCreateQueriesPROC glCreateQueries = (glCreateQueriesPROC)tlsGetFunction(1015); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glCreateQueries(target, n, ids); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glGetQueryBufferObjectiv(JNIEnv *__env, jclass clazz, jint id, jint buffer, jint pname, jlong offset) { - glGetQueryBufferObjectivPROC glGetQueryBufferObjectiv = (glGetQueryBufferObjectivPROC)tlsGetFunction(1016); - UNUSED_PARAM(clazz) - glGetQueryBufferObjectiv(id, buffer, pname, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glGetQueryBufferObjectuiv(JNIEnv *__env, jclass clazz, jint id, jint buffer, jint pname, jlong offset) { - glGetQueryBufferObjectuivPROC glGetQueryBufferObjectuiv = (glGetQueryBufferObjectuivPROC)tlsGetFunction(1017); - UNUSED_PARAM(clazz) - glGetQueryBufferObjectuiv(id, buffer, pname, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glGetQueryBufferObjecti64v(JNIEnv *__env, jclass clazz, jint id, jint buffer, jint pname, jlong offset) { - glGetQueryBufferObjecti64vPROC glGetQueryBufferObjecti64v = (glGetQueryBufferObjecti64vPROC)tlsGetFunction(1018); - UNUSED_PARAM(clazz) - glGetQueryBufferObjecti64v(id, buffer, pname, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glGetQueryBufferObjectui64v(JNIEnv *__env, jclass clazz, jint id, jint buffer, jint pname, jlong offset) { - glGetQueryBufferObjectui64vPROC glGetQueryBufferObjectui64v = (glGetQueryBufferObjectui64vPROC)tlsGetFunction(1019); - UNUSED_PARAM(clazz) - glGetQueryBufferObjectui64v(id, buffer, pname, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glMemoryBarrierByRegion(JNIEnv *__env, jclass clazz, jint barriers) { - glMemoryBarrierByRegionPROC glMemoryBarrierByRegion = (glMemoryBarrierByRegionPROC)tlsGetFunction(1020); - UNUSED_PARAM(clazz) - glMemoryBarrierByRegion(barriers); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetTextureSubImage__IIIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jint bufSize, jlong pixelsAddress) { - glGetTextureSubImagePROC glGetTextureSubImage = (glGetTextureSubImagePROC)tlsGetFunction(1021); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetCompressedTextureSubImage__IIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint bufSize, jlong pixelsAddress) { - glGetCompressedTextureSubImagePROC glGetCompressedTextureSubImage = (glGetCompressedTextureSubImagePROC)tlsGetFunction(1022); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_glTextureBarrier(JNIEnv *__env, jclass clazz) { - glTextureBarrierPROC glTextureBarrier = (glTextureBarrierPROC)tlsGetFunction(1023); - UNUSED_PARAM(clazz) - glTextureBarrier(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL45C_glGetGraphicsResetStatus(JNIEnv *__env, jclass clazz) { - glGetGraphicsResetStatusPROC glGetGraphicsResetStatus = (glGetGraphicsResetStatusPROC)tlsGetFunction(1024); - UNUSED_PARAM(clazz) - return glGetGraphicsResetStatus(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetnTexImage__IIIIIJ(JNIEnv *__env, jclass clazz, jint tex, jint level, jint format, jint type, jint bufSize, jlong imgAddress) { - glGetnTexImagePROC glGetnTexImage = (glGetnTexImagePROC)tlsGetFunction(1032); - uintptr_t img = (uintptr_t)imgAddress; - UNUSED_PARAM(clazz) - glGetnTexImage(tex, level, format, type, bufSize, img); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglReadnPixels__IIIIIIIJ(JNIEnv *__env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jlong pixelsAddress) { - glReadnPixelsPROC glReadnPixels = (glReadnPixelsPROC)tlsGetFunction(1033); - uintptr_t pixels = (uintptr_t)pixelsAddress; - UNUSED_PARAM(clazz) - glReadnPixels(x, y, width, height, format, type, bufSize, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetnCompressedTexImage(JNIEnv *__env, jclass clazz, jint target, jint level, jint bufSize, jlong imgAddress) { - glGetnCompressedTexImagePROC glGetnCompressedTexImage = (glGetnCompressedTexImagePROC)tlsGetFunction(1039); - uintptr_t img = (uintptr_t)imgAddress; - UNUSED_PARAM(clazz) - glGetnCompressedTexImage(target, level, bufSize, img); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetnUniformfv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformfvPROC glGetnUniformfv = (glGetnUniformfvPROC)tlsGetFunction(1040); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformfv(program, location, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetnUniformdv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformdvPROC glGetnUniformdv = (glGetnUniformdvPROC)tlsGetFunction(1041); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformdv(program, location, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetnUniformiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformivPROC glGetnUniformiv = (glGetnUniformivPROC)tlsGetFunction(1042); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformiv(program, location, bufSize, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL45C_nglGetnUniformuiv__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint bufSize, jlong paramsAddress) { - glGetnUniformuivPROC glGetnUniformuiv = (glGetnUniformuivPROC)tlsGetFunction(1043); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetnUniformuiv(program, location, bufSize, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL46C.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL46C.c deleted file mode 100644 index 7e41fa6a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GL46C.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMultiDrawArraysIndirectCountPROC) (jint, uintptr_t, uintptr_t, jint, jint); -typedef void (APIENTRY *glMultiDrawElementsIndirectCountPROC) (jint, jint, uintptr_t, uintptr_t, jint, jint); -typedef void (APIENTRY *glPolygonOffsetClampPROC) (jfloat, jfloat, jfloat); -typedef void (APIENTRY *glSpecializeShaderPROC) (jint, uintptr_t, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL46C_nglMultiDrawArraysIndirectCount__IJJII(JNIEnv *__env, jclass clazz, jint mode, jlong indirectAddress, jlong drawcount, jint maxdrawcount, jint stride) { - glMultiDrawArraysIndirectCountPROC glMultiDrawArraysIndirectCount = (glMultiDrawArraysIndirectCountPROC)tlsGetFunction(1044); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawArraysIndirectCount(mode, indirect, (uintptr_t)drawcount, maxdrawcount, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL46C_nglMultiDrawElementsIndirectCount__IIJJII(JNIEnv *__env, jclass clazz, jint mode, jint type, jlong indirectAddress, jlong drawcount, jint maxdrawcount, jint stride) { - glMultiDrawElementsIndirectCountPROC glMultiDrawElementsIndirectCount = (glMultiDrawElementsIndirectCountPROC)tlsGetFunction(1045); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawElementsIndirectCount(mode, type, indirect, (uintptr_t)drawcount, maxdrawcount, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL46C_glPolygonOffsetClamp(JNIEnv *__env, jclass clazz, jfloat factor, jfloat units, jfloat clamp) { - glPolygonOffsetClampPROC glPolygonOffsetClamp = (glPolygonOffsetClampPROC)tlsGetFunction(1046); - UNUSED_PARAM(clazz) - glPolygonOffsetClamp(factor, units, clamp); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL46C_nglSpecializeShader__IJIJJ(JNIEnv *__env, jclass clazz, jint shader, jlong pEntryPointAddress, jint numSpecializationConstants, jlong pConstantIndexAddress, jlong pConstantValueAddress) { - glSpecializeShaderPROC glSpecializeShader = (glSpecializeShaderPROC)tlsGetFunction(1047); - uintptr_t pEntryPoint = (uintptr_t)pEntryPointAddress; - uintptr_t pConstantIndex = (uintptr_t)pConstantIndexAddress; - uintptr_t pConstantValue = (uintptr_t)pConstantValueAddress; - UNUSED_PARAM(clazz) - glSpecializeShader(shader, pEntryPoint, numSpecializationConstants, pConstantIndex, pConstantValue); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GREMEDYFrameTerminator.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GREMEDYFrameTerminator.c deleted file mode 100644 index 02142618..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GREMEDYFrameTerminator.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFrameTerminatorGREMEDYPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GREMEDYFrameTerminator_glFrameTerminatorGREMEDY(JNIEnv *__env, jclass clazz) { - glFrameTerminatorGREMEDYPROC glFrameTerminatorGREMEDY = (glFrameTerminatorGREMEDYPROC)tlsGetFunction(1887); - UNUSED_PARAM(clazz) - glFrameTerminatorGREMEDY(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GREMEDYStringMarker.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GREMEDYStringMarker.c deleted file mode 100644 index c4d12a7f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_GREMEDYStringMarker.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glStringMarkerGREMEDYPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GREMEDYStringMarker_nglStringMarkerGREMEDY(JNIEnv *__env, jclass clazz, jint len, jlong stringAddress) { - glStringMarkerGREMEDYPROC glStringMarkerGREMEDY = (glStringMarkerGREMEDYPROC)tlsGetFunction(1888); - uintptr_t string = (uintptr_t)stringAddress; - UNUSED_PARAM(clazz) - glStringMarkerGREMEDY(len, string); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELFramebufferCMAA.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELFramebufferCMAA.c deleted file mode 100644 index dce2a791..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELFramebufferCMAA.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glApplyFramebufferAttachmentCMAAINTELPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELFramebufferCMAA_glApplyFramebufferAttachmentCMAAINTEL(JNIEnv *__env, jclass clazz) { - glApplyFramebufferAttachmentCMAAINTELPROC glApplyFramebufferAttachmentCMAAINTEL = (glApplyFramebufferAttachmentCMAAINTELPROC)tlsGetFunction(1889); - UNUSED_PARAM(clazz) - glApplyFramebufferAttachmentCMAAINTEL(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELMapTexture.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELMapTexture.c deleted file mode 100644 index a37668db..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELMapTexture.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glSyncTextureINTELPROC) (jint); -typedef void (APIENTRY *glUnmapTexture2DINTELPROC) (jint, jint); -typedef uintptr_t (APIENTRY *glMapTexture2DINTELPROC) (jint, jint, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELMapTexture_glSyncTextureINTEL(JNIEnv *__env, jclass clazz, jint texture) { - glSyncTextureINTELPROC glSyncTextureINTEL = (glSyncTextureINTELPROC)tlsGetFunction(1890); - UNUSED_PARAM(clazz) - glSyncTextureINTEL(texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELMapTexture_glUnmapTexture2DINTEL(JNIEnv *__env, jclass clazz, jint texture, jint level) { - glUnmapTexture2DINTELPROC glUnmapTexture2DINTEL = (glUnmapTexture2DINTELPROC)tlsGetFunction(1891); - UNUSED_PARAM(clazz) - glUnmapTexture2DINTEL(texture, level); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_INTELMapTexture_nglMapTexture2DINTEL__IIIJJ(JNIEnv *__env, jclass clazz, jint texture, jint level, jint access, jlong strideAddress, jlong layoutAddress) { - glMapTexture2DINTELPROC glMapTexture2DINTEL = (glMapTexture2DINTELPROC)tlsGetFunction(1892); - uintptr_t stride = (uintptr_t)strideAddress; - uintptr_t layout = (uintptr_t)layoutAddress; - UNUSED_PARAM(clazz) - return (jlong)glMapTexture2DINTEL(texture, level, access, stride, layout); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELPerformanceQuery.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELPerformanceQuery.c deleted file mode 100644 index 96d39c18..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_INTELPerformanceQuery.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBeginPerfQueryINTELPROC) (jint); -typedef void (APIENTRY *glCreatePerfQueryINTELPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeletePerfQueryINTELPROC) (jint); -typedef void (APIENTRY *glEndPerfQueryINTELPROC) (jint); -typedef void (APIENTRY *glGetFirstPerfQueryIdINTELPROC) (uintptr_t); -typedef void (APIENTRY *glGetNextPerfQueryIdINTELPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetPerfCounterInfoINTELPROC) (jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetPerfQueryDataINTELPROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetPerfQueryIdByNameINTELPROC) (uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetPerfQueryInfoINTELPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_glBeginPerfQueryINTEL(JNIEnv *__env, jclass clazz, jint queryHandle) { - glBeginPerfQueryINTELPROC glBeginPerfQueryINTEL = (glBeginPerfQueryINTELPROC)tlsGetFunction(1893); - UNUSED_PARAM(clazz) - glBeginPerfQueryINTEL(queryHandle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_nglCreatePerfQueryINTEL__IJ(JNIEnv *__env, jclass clazz, jint queryId, jlong queryHandleAddress) { - glCreatePerfQueryINTELPROC glCreatePerfQueryINTEL = (glCreatePerfQueryINTELPROC)tlsGetFunction(1894); - uintptr_t queryHandle = (uintptr_t)queryHandleAddress; - UNUSED_PARAM(clazz) - glCreatePerfQueryINTEL(queryId, queryHandle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_glDeletePerfQueryINTEL(JNIEnv *__env, jclass clazz, jint queryHandle) { - glDeletePerfQueryINTELPROC glDeletePerfQueryINTEL = (glDeletePerfQueryINTELPROC)tlsGetFunction(1895); - UNUSED_PARAM(clazz) - glDeletePerfQueryINTEL(queryHandle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_glEndPerfQueryINTEL(JNIEnv *__env, jclass clazz, jint queryHandle) { - glEndPerfQueryINTELPROC glEndPerfQueryINTEL = (glEndPerfQueryINTELPROC)tlsGetFunction(1896); - UNUSED_PARAM(clazz) - glEndPerfQueryINTEL(queryHandle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_nglGetFirstPerfQueryIdINTEL__J(JNIEnv *__env, jclass clazz, jlong queryIdAddress) { - glGetFirstPerfQueryIdINTELPROC glGetFirstPerfQueryIdINTEL = (glGetFirstPerfQueryIdINTELPROC)tlsGetFunction(1897); - uintptr_t queryId = (uintptr_t)queryIdAddress; - UNUSED_PARAM(clazz) - glGetFirstPerfQueryIdINTEL(queryId); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_nglGetNextPerfQueryIdINTEL__IJ(JNIEnv *__env, jclass clazz, jint queryId, jlong nextQueryIdAddress) { - glGetNextPerfQueryIdINTELPROC glGetNextPerfQueryIdINTEL = (glGetNextPerfQueryIdINTELPROC)tlsGetFunction(1898); - uintptr_t nextQueryId = (uintptr_t)nextQueryIdAddress; - UNUSED_PARAM(clazz) - glGetNextPerfQueryIdINTEL(queryId, nextQueryId); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_nglGetPerfCounterInfoINTEL__IIIJIJJJJJJ(JNIEnv *__env, jclass clazz, jint queryId, jint counterId, jint counterNameLength, jlong counterNameAddress, jint counterDescLength, jlong counterDescAddress, jlong counterOffsetAddress, jlong counterDataSizeAddress, jlong counterTypeEnumAddress, jlong counterDataTypeEnumAddress, jlong rawCounterMaxValueAddress) { - glGetPerfCounterInfoINTELPROC glGetPerfCounterInfoINTEL = (glGetPerfCounterInfoINTELPROC)tlsGetFunction(1899); - uintptr_t counterName = (uintptr_t)counterNameAddress; - uintptr_t counterDesc = (uintptr_t)counterDescAddress; - uintptr_t counterOffset = (uintptr_t)counterOffsetAddress; - uintptr_t counterDataSize = (uintptr_t)counterDataSizeAddress; - uintptr_t counterTypeEnum = (uintptr_t)counterTypeEnumAddress; - uintptr_t counterDataTypeEnum = (uintptr_t)counterDataTypeEnumAddress; - uintptr_t rawCounterMaxValue = (uintptr_t)rawCounterMaxValueAddress; - UNUSED_PARAM(clazz) - glGetPerfCounterInfoINTEL(queryId, counterId, counterNameLength, counterName, counterDescLength, counterDesc, counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_nglGetPerfQueryDataINTEL__IIIJJ(JNIEnv *__env, jclass clazz, jint queryHandle, jint flags, jint dataSize, jlong dataAddress, jlong bytesWrittenAddress) { - glGetPerfQueryDataINTELPROC glGetPerfQueryDataINTEL = (glGetPerfQueryDataINTELPROC)tlsGetFunction(1900); - uintptr_t data = (uintptr_t)dataAddress; - uintptr_t bytesWritten = (uintptr_t)bytesWrittenAddress; - UNUSED_PARAM(clazz) - glGetPerfQueryDataINTEL(queryHandle, flags, dataSize, data, bytesWritten); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_nglGetPerfQueryIdByNameINTEL__JJ(JNIEnv *__env, jclass clazz, jlong queryNameAddress, jlong queryIdAddress) { - glGetPerfQueryIdByNameINTELPROC glGetPerfQueryIdByNameINTEL = (glGetPerfQueryIdByNameINTELPROC)tlsGetFunction(1901); - uintptr_t queryName = (uintptr_t)queryNameAddress; - uintptr_t queryId = (uintptr_t)queryIdAddress; - UNUSED_PARAM(clazz) - glGetPerfQueryIdByNameINTEL(queryName, queryId); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELPerformanceQuery_nglGetPerfQueryInfoINTEL__IIJJJJJ(JNIEnv *__env, jclass clazz, jint queryId, jint queryNameLength, jlong queryNameAddress, jlong dataSizeAddress, jlong noCountersAddress, jlong noInstancesAddress, jlong capsMaskAddress) { - glGetPerfQueryInfoINTELPROC glGetPerfQueryInfoINTEL = (glGetPerfQueryInfoINTELPROC)tlsGetFunction(1902); - uintptr_t queryName = (uintptr_t)queryNameAddress; - uintptr_t dataSize = (uintptr_t)dataSizeAddress; - uintptr_t noCounters = (uintptr_t)noCountersAddress; - uintptr_t noInstances = (uintptr_t)noInstancesAddress; - uintptr_t capsMask = (uintptr_t)capsMaskAddress; - UNUSED_PARAM(clazz) - glGetPerfQueryInfoINTEL(queryId, queryNameLength, queryName, dataSize, noCounters, noInstances, capsMask); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_KHRBlendEquationAdvanced.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_KHRBlendEquationAdvanced.c deleted file mode 100644 index 876d85d8..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_KHRBlendEquationAdvanced.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendBarrierKHRPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_KHRBlendEquationAdvanced_glBlendBarrierKHR(JNIEnv *__env, jclass clazz) { - glBlendBarrierKHRPROC glBlendBarrierKHR = (glBlendBarrierKHRPROC)tlsGetFunction(1903); - UNUSED_PARAM(clazz) - glBlendBarrierKHR(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_KHRParallelShaderCompile.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_KHRParallelShaderCompile.c deleted file mode 100644 index 4a9f1458..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_KHRParallelShaderCompile.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMaxShaderCompilerThreadsKHRPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_KHRParallelShaderCompile_glMaxShaderCompilerThreadsKHR(JNIEnv *__env, jclass clazz, jint count) { - glMaxShaderCompilerThreadsKHRPROC glMaxShaderCompilerThreadsKHR = (glMaxShaderCompilerThreadsKHRPROC)tlsGetFunction(1904); - UNUSED_PARAM(clazz) - glMaxShaderCompilerThreadsKHR(count); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_MESAFramebufferFlipY.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_MESAFramebufferFlipY.c deleted file mode 100644 index 7ebfbf7f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_MESAFramebufferFlipY.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFramebufferParameteriMESAPROC) (jint, jint, jint); -typedef void (APIENTRY *glGetFramebufferParameterivMESAPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MESAFramebufferFlipY_glFramebufferParameteriMESA(JNIEnv *__env, jclass clazz, jint target, jint pname, jint param) { - glFramebufferParameteriMESAPROC glFramebufferParameteriMESA = (glFramebufferParameteriMESAPROC)tlsGetFunction(1905); - UNUSED_PARAM(clazz) - glFramebufferParameteriMESA(target, pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MESAFramebufferFlipY_nglGetFramebufferParameterivMESA__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetFramebufferParameterivMESAPROC glGetFramebufferParameterivMESA = (glGetFramebufferParameterivMESAPROC)tlsGetFunction(1906); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFramebufferParameterivMESA(target, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVAlphaToCoverageDitherControl.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVAlphaToCoverageDitherControl.c deleted file mode 100644 index 26f4a7e3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVAlphaToCoverageDitherControl.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glAlphaToCoverageDitherControlNVPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVAlphaToCoverageDitherControl_glAlphaToCoverageDitherControlNV(JNIEnv *__env, jclass clazz, jint mode) { - glAlphaToCoverageDitherControlNVPROC glAlphaToCoverageDitherControlNV = (glAlphaToCoverageDitherControlNVPROC)tlsGetFunction(1907); - UNUSED_PARAM(clazz) - glAlphaToCoverageDitherControlNV(mode); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirect.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirect.c deleted file mode 100644 index 180c1f00..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirect.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMultiDrawArraysIndirectBindlessNVPROC) (jint, uintptr_t, jint, jint, jint); -typedef void (APIENTRY *glMultiDrawElementsIndirectBindlessNVPROC) (jint, jint, uintptr_t, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirect_nglMultiDrawArraysIndirectBindlessNV(JNIEnv *__env, jclass clazz, jint mode, jlong indirectAddress, jint drawCount, jint stride, jint vertexBufferCount) { - glMultiDrawArraysIndirectBindlessNVPROC glMultiDrawArraysIndirectBindlessNV = (glMultiDrawArraysIndirectBindlessNVPROC)tlsGetFunction(1908); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawArraysIndirectBindlessNV(mode, indirect, drawCount, stride, vertexBufferCount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirect_nglMultiDrawElementsIndirectBindlessNV(JNIEnv *__env, jclass clazz, jint mode, jint type, jlong indirectAddress, jint drawCount, jint stride, jint vertexBufferCount) { - glMultiDrawElementsIndirectBindlessNVPROC glMultiDrawElementsIndirectBindlessNV = (glMultiDrawElementsIndirectBindlessNVPROC)tlsGetFunction(1909); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawElementsIndirectBindlessNV(mode, type, indirect, drawCount, stride, vertexBufferCount); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirectCount.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirectCount.c deleted file mode 100644 index 5a554ac3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirectCount.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMultiDrawArraysIndirectBindlessCountNVPROC) (jint, uintptr_t, uintptr_t, jint, jint, jint); -typedef void (APIENTRY *glMultiDrawElementsIndirectBindlessCountNVPROC) (jint, jint, uintptr_t, uintptr_t, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirectCount_nglMultiDrawArraysIndirectBindlessCountNV(JNIEnv *__env, jclass clazz, jint mode, jlong indirectAddress, jlong drawCount, jint maxDrawCount, jint stride, jint vertexBufferCount) { - glMultiDrawArraysIndirectBindlessCountNVPROC glMultiDrawArraysIndirectBindlessCountNV = (glMultiDrawArraysIndirectBindlessCountNVPROC)tlsGetFunction(1910); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawArraysIndirectBindlessCountNV(mode, indirect, (uintptr_t)drawCount, maxDrawCount, stride, vertexBufferCount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirectCount_nglMultiDrawElementsIndirectBindlessCountNV(JNIEnv *__env, jclass clazz, jint mode, jint type, jlong indirectAddress, jlong drawCount, jint maxDrawCount, jint stride, jint vertexBufferCount) { - glMultiDrawElementsIndirectBindlessCountNVPROC glMultiDrawElementsIndirectBindlessCountNV = (glMultiDrawElementsIndirectBindlessCountNVPROC)tlsGetFunction(1911); - uintptr_t indirect = (uintptr_t)indirectAddress; - UNUSED_PARAM(clazz) - glMultiDrawElementsIndirectBindlessCountNV(mode, type, indirect, (uintptr_t)drawCount, maxDrawCount, stride, vertexBufferCount); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessTexture.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessTexture.c deleted file mode 100644 index d3257672..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBindlessTexture.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jlong (APIENTRY *glGetTextureHandleNVPROC) (jint); -typedef jlong (APIENTRY *glGetTextureSamplerHandleNVPROC) (jint, jint); -typedef void (APIENTRY *glMakeTextureHandleResidentNVPROC) (jlong); -typedef void (APIENTRY *glMakeTextureHandleNonResidentNVPROC) (jlong); -typedef jlong (APIENTRY *glGetImageHandleNVPROC) (jint, jint, jboolean, jint, jint); -typedef void (APIENTRY *glMakeImageHandleResidentNVPROC) (jlong, jint); -typedef void (APIENTRY *glMakeImageHandleNonResidentNVPROC) (jlong); -typedef void (APIENTRY *glUniformHandleui64NVPROC) (jint, jlong); -typedef void (APIENTRY *glUniformHandleui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniformHandleui64NVPROC) (jint, jint, jlong); -typedef void (APIENTRY *glProgramUniformHandleui64vNVPROC) (jint, jint, jint, uintptr_t); -typedef jboolean (APIENTRY *glIsTextureHandleResidentNVPROC) (jlong); -typedef jboolean (APIENTRY *glIsImageHandleResidentNVPROC) (jlong); - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glGetTextureHandleNV(JNIEnv *__env, jclass clazz, jint texture) { - glGetTextureHandleNVPROC glGetTextureHandleNV = (glGetTextureHandleNVPROC)tlsGetFunction(1912); - UNUSED_PARAM(clazz) - return glGetTextureHandleNV(texture); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glGetTextureSamplerHandleNV(JNIEnv *__env, jclass clazz, jint texture, jint sampler) { - glGetTextureSamplerHandleNVPROC glGetTextureSamplerHandleNV = (glGetTextureSamplerHandleNVPROC)tlsGetFunction(1913); - UNUSED_PARAM(clazz) - return glGetTextureSamplerHandleNV(texture, sampler); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glMakeTextureHandleResidentNV(JNIEnv *__env, jclass clazz, jlong handle) { - glMakeTextureHandleResidentNVPROC glMakeTextureHandleResidentNV = (glMakeTextureHandleResidentNVPROC)tlsGetFunction(1914); - UNUSED_PARAM(clazz) - glMakeTextureHandleResidentNV(handle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glMakeTextureHandleNonResidentNV(JNIEnv *__env, jclass clazz, jlong handle) { - glMakeTextureHandleNonResidentNVPROC glMakeTextureHandleNonResidentNV = (glMakeTextureHandleNonResidentNVPROC)tlsGetFunction(1915); - UNUSED_PARAM(clazz) - glMakeTextureHandleNonResidentNV(handle); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glGetImageHandleNV(JNIEnv *__env, jclass clazz, jint texture, jint level, jboolean layered, jint layer, jint format) { - glGetImageHandleNVPROC glGetImageHandleNV = (glGetImageHandleNVPROC)tlsGetFunction(1916); - UNUSED_PARAM(clazz) - return glGetImageHandleNV(texture, level, layered, layer, format); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glMakeImageHandleResidentNV(JNIEnv *__env, jclass clazz, jlong handle, jint access) { - glMakeImageHandleResidentNVPROC glMakeImageHandleResidentNV = (glMakeImageHandleResidentNVPROC)tlsGetFunction(1917); - UNUSED_PARAM(clazz) - glMakeImageHandleResidentNV(handle, access); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glMakeImageHandleNonResidentNV(JNIEnv *__env, jclass clazz, jlong handle) { - glMakeImageHandleNonResidentNVPROC glMakeImageHandleNonResidentNV = (glMakeImageHandleNonResidentNVPROC)tlsGetFunction(1918); - UNUSED_PARAM(clazz) - glMakeImageHandleNonResidentNV(handle); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glUniformHandleui64NV(JNIEnv *__env, jclass clazz, jint location, jlong value) { - glUniformHandleui64NVPROC glUniformHandleui64NV = (glUniformHandleui64NVPROC)tlsGetFunction(1919); - UNUSED_PARAM(clazz) - glUniformHandleui64NV(location, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglUniformHandleui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valuesAddress) { - glUniformHandleui64vNVPROC glUniformHandleui64vNV = (glUniformHandleui64vNVPROC)tlsGetFunction(1920); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glUniformHandleui64vNV(location, count, values); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glProgramUniformHandleui64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong value) { - glProgramUniformHandleui64NVPROC glProgramUniformHandleui64NV = (glProgramUniformHandleui64NVPROC)tlsGetFunction(1921); - UNUSED_PARAM(clazz) - glProgramUniformHandleui64NV(program, location, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglProgramUniformHandleui64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valuesAddress) { - glProgramUniformHandleui64vNVPROC glProgramUniformHandleui64vNV = (glProgramUniformHandleui64vNVPROC)tlsGetFunction(1922); - uintptr_t values = (uintptr_t)valuesAddress; - UNUSED_PARAM(clazz) - glProgramUniformHandleui64vNV(program, location, count, values); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glIsTextureHandleResidentNV(JNIEnv *__env, jclass clazz, jlong handle) { - glIsTextureHandleResidentNVPROC glIsTextureHandleResidentNV = (glIsTextureHandleResidentNVPROC)tlsGetFunction(1923); - UNUSED_PARAM(clazz) - return glIsTextureHandleResidentNV(handle); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_glIsImageHandleResidentNV(JNIEnv *__env, jclass clazz, jlong handle) { - glIsImageHandleResidentNVPROC glIsImageHandleResidentNV = (glIsImageHandleResidentNVPROC)tlsGetFunction(1924); - UNUSED_PARAM(clazz) - return glIsImageHandleResidentNV(handle); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBlendEquationAdvanced.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBlendEquationAdvanced.c deleted file mode 100644 index 2e50e23f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVBlendEquationAdvanced.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBlendParameteriNVPROC) (jint, jint); -typedef void (APIENTRY *glBlendBarrierNVPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBlendEquationAdvanced_glBlendParameteriNV(JNIEnv *__env, jclass clazz, jint pname, jint value) { - glBlendParameteriNVPROC glBlendParameteriNV = (glBlendParameteriNVPROC)tlsGetFunction(1925); - UNUSED_PARAM(clazz) - glBlendParameteriNV(pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBlendEquationAdvanced_glBlendBarrierNV(JNIEnv *__env, jclass clazz) { - glBlendBarrierNVPROC glBlendBarrierNV = (glBlendBarrierNVPROC)tlsGetFunction(1926); - UNUSED_PARAM(clazz) - glBlendBarrierNV(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVClipSpaceWScaling.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVClipSpaceWScaling.c deleted file mode 100644 index 93938d20..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVClipSpaceWScaling.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glViewportPositionWScaleNVPROC) (jint, jfloat, jfloat); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVClipSpaceWScaling_glViewportPositionWScaleNV(JNIEnv *__env, jclass clazz, jint index, jfloat xcoeff, jfloat ycoeff) { - glViewportPositionWScaleNVPROC glViewportPositionWScaleNV = (glViewportPositionWScaleNVPROC)tlsGetFunction(1927); - UNUSED_PARAM(clazz) - glViewportPositionWScaleNV(index, xcoeff, ycoeff); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVCommandList.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVCommandList.c deleted file mode 100644 index b06f0957..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVCommandList.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glCreateStatesNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteStatesNVPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsStateNVPROC) (jint); -typedef void (APIENTRY *glStateCaptureNVPROC) (jint, jint); -typedef jint (APIENTRY *glGetCommandHeaderNVPROC) (jint, jint); -typedef uint16_t (APIENTRY *glGetStageIndexNVPROC) (jint); -typedef void (APIENTRY *glDrawCommandsNVPROC) (jint, jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glDrawCommandsAddressNVPROC) (jint, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glDrawCommandsStatesNVPROC) (jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glDrawCommandsStatesAddressNVPROC) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glCreateCommandListsNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteCommandListsNVPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsCommandListNVPROC) (jint); -typedef void (APIENTRY *glListDrawCommandsStatesClientNVPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint); -typedef void (APIENTRY *glCommandListSegmentsNVPROC) (jint, jint); -typedef void (APIENTRY *glCompileCommandListNVPROC) (jint); -typedef void (APIENTRY *glCallCommandListNVPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglCreateStatesNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong statesAddress) { - glCreateStatesNVPROC glCreateStatesNV = (glCreateStatesNVPROC)tlsGetFunction(1928); - uintptr_t states = (uintptr_t)statesAddress; - UNUSED_PARAM(clazz) - glCreateStatesNV(n, states); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglDeleteStatesNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong statesAddress) { - glDeleteStatesNVPROC glDeleteStatesNV = (glDeleteStatesNVPROC)tlsGetFunction(1929); - uintptr_t states = (uintptr_t)statesAddress; - UNUSED_PARAM(clazz) - glDeleteStatesNV(n, states); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVCommandList_glIsStateNV(JNIEnv *__env, jclass clazz, jint state) { - glIsStateNVPROC glIsStateNV = (glIsStateNVPROC)tlsGetFunction(1930); - UNUSED_PARAM(clazz) - return glIsStateNV(state); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_glStateCaptureNV(JNIEnv *__env, jclass clazz, jint state, jint mode) { - glStateCaptureNVPROC glStateCaptureNV = (glStateCaptureNVPROC)tlsGetFunction(1931); - UNUSED_PARAM(clazz) - glStateCaptureNV(state, mode); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVCommandList_glGetCommandHeaderNV(JNIEnv *__env, jclass clazz, jint tokenID, jint size) { - glGetCommandHeaderNVPROC glGetCommandHeaderNV = (glGetCommandHeaderNVPROC)tlsGetFunction(1932); - UNUSED_PARAM(clazz) - return glGetCommandHeaderNV(tokenID, size); -} - -JNIEXPORT jshort JNICALL Java_org_lwjgl_opengl_NVCommandList_glGetStageIndexNV(JNIEnv *__env, jclass clazz, jint shadertype) { - glGetStageIndexNVPROC glGetStageIndexNV = (glGetStageIndexNVPROC)tlsGetFunction(1933); - UNUSED_PARAM(clazz) - return (jshort)glGetStageIndexNV(shadertype); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglDrawCommandsNV__IIJJI(JNIEnv *__env, jclass clazz, jint primitiveMode, jint buffer, jlong indirectsAddress, jlong sizesAddress, jint count) { - glDrawCommandsNVPROC glDrawCommandsNV = (glDrawCommandsNVPROC)tlsGetFunction(1934); - uintptr_t indirects = (uintptr_t)indirectsAddress; - uintptr_t sizes = (uintptr_t)sizesAddress; - UNUSED_PARAM(clazz) - glDrawCommandsNV(primitiveMode, buffer, indirects, sizes, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglDrawCommandsAddressNV__IJJI(JNIEnv *__env, jclass clazz, jint primitiveMode, jlong indirectsAddress, jlong sizesAddress, jint count) { - glDrawCommandsAddressNVPROC glDrawCommandsAddressNV = (glDrawCommandsAddressNVPROC)tlsGetFunction(1935); - uintptr_t indirects = (uintptr_t)indirectsAddress; - uintptr_t sizes = (uintptr_t)sizesAddress; - UNUSED_PARAM(clazz) - glDrawCommandsAddressNV(primitiveMode, indirects, sizes, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglDrawCommandsStatesNV__IJJJJI(JNIEnv *__env, jclass clazz, jint buffer, jlong indirectsAddress, jlong sizesAddress, jlong statesAddress, jlong fbosAddress, jint count) { - glDrawCommandsStatesNVPROC glDrawCommandsStatesNV = (glDrawCommandsStatesNVPROC)tlsGetFunction(1936); - uintptr_t indirects = (uintptr_t)indirectsAddress; - uintptr_t sizes = (uintptr_t)sizesAddress; - uintptr_t states = (uintptr_t)statesAddress; - uintptr_t fbos = (uintptr_t)fbosAddress; - UNUSED_PARAM(clazz) - glDrawCommandsStatesNV(buffer, indirects, sizes, states, fbos, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglDrawCommandsStatesAddressNV__JJJJI(JNIEnv *__env, jclass clazz, jlong indirectsAddress, jlong sizesAddress, jlong statesAddress, jlong fbosAddress, jint count) { - glDrawCommandsStatesAddressNVPROC glDrawCommandsStatesAddressNV = (glDrawCommandsStatesAddressNVPROC)tlsGetFunction(1937); - uintptr_t indirects = (uintptr_t)indirectsAddress; - uintptr_t sizes = (uintptr_t)sizesAddress; - uintptr_t states = (uintptr_t)statesAddress; - uintptr_t fbos = (uintptr_t)fbosAddress; - UNUSED_PARAM(clazz) - glDrawCommandsStatesAddressNV(indirects, sizes, states, fbos, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglCreateCommandListsNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong listsAddress) { - glCreateCommandListsNVPROC glCreateCommandListsNV = (glCreateCommandListsNVPROC)tlsGetFunction(1938); - uintptr_t lists = (uintptr_t)listsAddress; - UNUSED_PARAM(clazz) - glCreateCommandListsNV(n, lists); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglDeleteCommandListsNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong listsAddress) { - glDeleteCommandListsNVPROC glDeleteCommandListsNV = (glDeleteCommandListsNVPROC)tlsGetFunction(1939); - uintptr_t lists = (uintptr_t)listsAddress; - UNUSED_PARAM(clazz) - glDeleteCommandListsNV(n, lists); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVCommandList_glIsCommandListNV(JNIEnv *__env, jclass clazz, jint list) { - glIsCommandListNVPROC glIsCommandListNV = (glIsCommandListNVPROC)tlsGetFunction(1940); - UNUSED_PARAM(clazz) - return glIsCommandListNV(list); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_nglListDrawCommandsStatesClientNV__IIJJJJI(JNIEnv *__env, jclass clazz, jint list, jint segment, jlong indirectsAddress, jlong sizesAddress, jlong statesAddress, jlong fbosAddress, jint count) { - glListDrawCommandsStatesClientNVPROC glListDrawCommandsStatesClientNV = (glListDrawCommandsStatesClientNVPROC)tlsGetFunction(1941); - uintptr_t indirects = (uintptr_t)indirectsAddress; - uintptr_t sizes = (uintptr_t)sizesAddress; - uintptr_t states = (uintptr_t)statesAddress; - uintptr_t fbos = (uintptr_t)fbosAddress; - UNUSED_PARAM(clazz) - glListDrawCommandsStatesClientNV(list, segment, indirects, sizes, states, fbos, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_glCommandListSegmentsNV(JNIEnv *__env, jclass clazz, jint list, jint segments) { - glCommandListSegmentsNVPROC glCommandListSegmentsNV = (glCommandListSegmentsNVPROC)tlsGetFunction(1942); - UNUSED_PARAM(clazz) - glCommandListSegmentsNV(list, segments); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_glCompileCommandListNV(JNIEnv *__env, jclass clazz, jint list) { - glCompileCommandListNVPROC glCompileCommandListNV = (glCompileCommandListNVPROC)tlsGetFunction(1943); - UNUSED_PARAM(clazz) - glCompileCommandListNV(list); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCommandList_glCallCommandListNV(JNIEnv *__env, jclass clazz, jint list) { - glCallCommandListNVPROC glCallCommandListNV = (glCallCommandListNVPROC)tlsGetFunction(1944); - UNUSED_PARAM(clazz) - glCallCommandListNV(list); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConditionalRender.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConditionalRender.c deleted file mode 100644 index 01e3549d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConditionalRender.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBeginConditionalRenderNVPROC) (jint, jint); -typedef void (APIENTRY *glEndConditionalRenderNVPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVConditionalRender_glBeginConditionalRenderNV(JNIEnv *__env, jclass clazz, jint id, jint mode) { - glBeginConditionalRenderNVPROC glBeginConditionalRenderNV = (glBeginConditionalRenderNVPROC)tlsGetFunction(1945); - UNUSED_PARAM(clazz) - glBeginConditionalRenderNV(id, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVConditionalRender_glEndConditionalRenderNV(JNIEnv *__env, jclass clazz) { - glEndConditionalRenderNVPROC glEndConditionalRenderNV = (glEndConditionalRenderNVPROC)tlsGetFunction(1946); - UNUSED_PARAM(clazz) - glEndConditionalRenderNV(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRaster.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRaster.c deleted file mode 100644 index e52912be..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRaster.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glSubpixelPrecisionBiasNVPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVConservativeRaster_glSubpixelPrecisionBiasNV(JNIEnv *__env, jclass clazz, jint xbits, jint ybits) { - glSubpixelPrecisionBiasNVPROC glSubpixelPrecisionBiasNV = (glSubpixelPrecisionBiasNVPROC)tlsGetFunction(1947); - UNUSED_PARAM(clazz) - glSubpixelPrecisionBiasNV(xbits, ybits); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterDilate.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterDilate.c deleted file mode 100644 index 2faa93cc..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterDilate.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glConservativeRasterParameterfNVPROC) (jint, jfloat); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVConservativeRasterDilate_glConservativeRasterParameterfNV(JNIEnv *__env, jclass clazz, jint pname, jfloat value) { - glConservativeRasterParameterfNVPROC glConservativeRasterParameterfNV = (glConservativeRasterParameterfNVPROC)tlsGetFunction(1948); - UNUSED_PARAM(clazz) - glConservativeRasterParameterfNV(pname, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterPreSnapTriangles.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterPreSnapTriangles.c deleted file mode 100644 index 2d7253dc..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVConservativeRasterPreSnapTriangles.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glConservativeRasterParameteriNVPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVConservativeRasterPreSnapTriangles_glConservativeRasterParameteriNV(JNIEnv *__env, jclass clazz, jint pname, jint param) { - glConservativeRasterParameteriNVPROC glConservativeRasterParameteriNV = (glConservativeRasterParameteriNVPROC)tlsGetFunction(1949); - UNUSED_PARAM(clazz) - glConservativeRasterParameteriNV(pname, param); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVCopyImage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVCopyImage.c deleted file mode 100644 index 9e1324e1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVCopyImage.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glCopyImageSubDataNVPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCopyImage_glCopyImageSubDataNV(JNIEnv *__env, jclass clazz, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint width, jint height, jint depth) { - glCopyImageSubDataNVPROC glCopyImageSubDataNV = (glCopyImageSubDataNVPROC)tlsGetFunction(1950); - UNUSED_PARAM(clazz) - glCopyImageSubDataNV(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDepthBufferFloat.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDepthBufferFloat.c deleted file mode 100644 index 0bfaca58..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDepthBufferFloat.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDepthRangedNVPROC) (jdouble, jdouble); -typedef void (APIENTRY *glClearDepthdNVPROC) (jdouble); -typedef void (APIENTRY *glDepthBoundsdNVPROC) (jdouble, jdouble); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDepthBufferFloat_glDepthRangedNV(JNIEnv *__env, jclass clazz, jdouble zNear, jdouble zFar) { - glDepthRangedNVPROC glDepthRangedNV = (glDepthRangedNVPROC)tlsGetFunction(1951); - UNUSED_PARAM(clazz) - glDepthRangedNV(zNear, zFar); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDepthBufferFloat_glClearDepthdNV(JNIEnv *__env, jclass clazz, jdouble depth) { - glClearDepthdNVPROC glClearDepthdNV = (glClearDepthdNVPROC)tlsGetFunction(1952); - UNUSED_PARAM(clazz) - glClearDepthdNV(depth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDepthBufferFloat_glDepthBoundsdNV(JNIEnv *__env, jclass clazz, jdouble zmin, jdouble zmax) { - glDepthBoundsdNVPROC glDepthBoundsdNV = (glDepthBoundsdNVPROC)tlsGetFunction(1953); - UNUSED_PARAM(clazz) - glDepthBoundsdNV(zmin, zmax); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDrawTexture.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDrawTexture.c deleted file mode 100644 index 1f8cfa6b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDrawTexture.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDrawTextureNVPROC) (jint, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDrawTexture_glDrawTextureNV(JNIEnv *__env, jclass clazz, jint texture, jint sampler, jfloat x0, jfloat y0, jfloat x1, jfloat y1, jfloat z, jfloat s0, jfloat t0, jfloat s1, jfloat t1) { - glDrawTextureNVPROC glDrawTextureNV = (glDrawTextureNVPROC)tlsGetFunction(1954); - UNUSED_PARAM(clazz) - glDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDrawVulkanImage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDrawVulkanImage.c deleted file mode 100644 index 4137ff84..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVDrawVulkanImage.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDrawVkImageNVPROC) (jlong, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat); -typedef uintptr_t (APIENTRY *glGetVkProcAddrNVPROC) (uintptr_t); -typedef void (APIENTRY *glWaitVkSemaphoreNVPROC) (jlong); -typedef void (APIENTRY *glSignalVkSemaphoreNVPROC) (jlong); -typedef void (APIENTRY *glSignalVkFenceNVPROC) (jlong); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDrawVulkanImage_glDrawVkImageNV(JNIEnv *__env, jclass clazz, jlong vkImage, jint sampler, jfloat x0, jfloat y0, jfloat x1, jfloat y1, jfloat z, jfloat s0, jfloat t0, jfloat s1, jfloat t1) { - glDrawVkImageNVPROC glDrawVkImageNV = (glDrawVkImageNVPROC)tlsGetFunction(1955); - UNUSED_PARAM(clazz) - glDrawVkImageNV(vkImage, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVDrawVulkanImage_nglGetVkProcAddrNV(JNIEnv *__env, jclass clazz, jlong nameAddress) { - glGetVkProcAddrNVPROC glGetVkProcAddrNV = (glGetVkProcAddrNVPROC)tlsGetFunction(1956); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return (jlong)glGetVkProcAddrNV(name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDrawVulkanImage_glWaitVkSemaphoreNV(JNIEnv *__env, jclass clazz, jlong vkSemaphore) { - glWaitVkSemaphoreNVPROC glWaitVkSemaphoreNV = (glWaitVkSemaphoreNVPROC)tlsGetFunction(1957); - UNUSED_PARAM(clazz) - glWaitVkSemaphoreNV(vkSemaphore); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDrawVulkanImage_glSignalVkSemaphoreNV(JNIEnv *__env, jclass clazz, jlong vkSemaphore) { - glSignalVkSemaphoreNVPROC glSignalVkSemaphoreNV = (glSignalVkSemaphoreNVPROC)tlsGetFunction(1958); - UNUSED_PARAM(clazz) - glSignalVkSemaphoreNV(vkSemaphore); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDrawVulkanImage_glSignalVkFenceNV(JNIEnv *__env, jclass clazz, jlong vkFence) { - glSignalVkFenceNVPROC glSignalVkFenceNV = (glSignalVkFenceNVPROC)tlsGetFunction(1959); - UNUSED_PARAM(clazz) - glSignalVkFenceNV(vkFence); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVExplicitMultisample.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVExplicitMultisample.c deleted file mode 100644 index 2a48db3d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVExplicitMultisample.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetMultisamplefvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glSampleMaskIndexedNVPROC) (jint, jint); -typedef void (APIENTRY *glTexRenderbufferNVPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVExplicitMultisample_nglGetMultisamplefvNV__IIJ(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong valAddress) { - glGetMultisamplefvNVPROC glGetMultisamplefvNV = (glGetMultisamplefvNVPROC)tlsGetFunction(1960); - uintptr_t val = (uintptr_t)valAddress; - UNUSED_PARAM(clazz) - glGetMultisamplefvNV(pname, index, val); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVExplicitMultisample_glSampleMaskIndexedNV(JNIEnv *__env, jclass clazz, jint index, jint mask) { - glSampleMaskIndexedNVPROC glSampleMaskIndexedNV = (glSampleMaskIndexedNVPROC)tlsGetFunction(1961); - UNUSED_PARAM(clazz) - glSampleMaskIndexedNV(index, mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVExplicitMultisample_glTexRenderbufferNV(JNIEnv *__env, jclass clazz, jint target, jint renderbuffer) { - glTexRenderbufferNVPROC glTexRenderbufferNV = (glTexRenderbufferNVPROC)tlsGetFunction(1962); - UNUSED_PARAM(clazz) - glTexRenderbufferNV(target, renderbuffer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFence.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFence.c deleted file mode 100644 index ab6b1556..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFence.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDeleteFencesNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenFencesNVPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsFenceNVPROC) (jint); -typedef jboolean (APIENTRY *glTestFenceNVPROC) (jint); -typedef void (APIENTRY *glGetFenceivNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glFinishFenceNVPROC) (jint); -typedef void (APIENTRY *glSetFenceNVPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglDeleteFencesNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong fencesAddress) { - glDeleteFencesNVPROC glDeleteFencesNV = (glDeleteFencesNVPROC)tlsGetFunction(1963); - uintptr_t fences = (uintptr_t)fencesAddress; - UNUSED_PARAM(clazz) - glDeleteFencesNV(n, fences); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglGenFencesNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong fencesAddress) { - glGenFencesNVPROC glGenFencesNV = (glGenFencesNVPROC)tlsGetFunction(1964); - uintptr_t fences = (uintptr_t)fencesAddress; - UNUSED_PARAM(clazz) - glGenFencesNV(n, fences); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVFence_glIsFenceNV(JNIEnv *__env, jclass clazz, jint fence) { - glIsFenceNVPROC glIsFenceNV = (glIsFenceNVPROC)tlsGetFunction(1965); - UNUSED_PARAM(clazz) - return glIsFenceNV(fence); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVFence_glTestFenceNV(JNIEnv *__env, jclass clazz, jint fence) { - glTestFenceNVPROC glTestFenceNV = (glTestFenceNVPROC)tlsGetFunction(1966); - UNUSED_PARAM(clazz) - return glTestFenceNV(fence); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglGetFenceivNV__IIJ(JNIEnv *__env, jclass clazz, jint fence, jint pname, jlong paramsAddress) { - glGetFenceivNVPROC glGetFenceivNV = (glGetFenceivNVPROC)tlsGetFunction(1967); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetFenceivNV(fence, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_glFinishFenceNV(JNIEnv *__env, jclass clazz, jint fence) { - glFinishFenceNVPROC glFinishFenceNV = (glFinishFenceNVPROC)tlsGetFunction(1968); - UNUSED_PARAM(clazz) - glFinishFenceNV(fence); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_glSetFenceNV(JNIEnv *__env, jclass clazz, jint fence, jint condition) { - glSetFenceNVPROC glSetFenceNV = (glSetFenceNVPROC)tlsGetFunction(1969); - UNUSED_PARAM(clazz) - glSetFenceNV(fence, condition); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFragmentCoverageToColor.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFragmentCoverageToColor.c deleted file mode 100644 index 8d998f39..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFragmentCoverageToColor.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFragmentCoverageColorNVPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFragmentCoverageToColor_glFragmentCoverageColorNV(JNIEnv *__env, jclass clazz, jint color) { - glFragmentCoverageColorNVPROC glFragmentCoverageColorNV = (glFragmentCoverageColorNVPROC)tlsGetFunction(1970); - UNUSED_PARAM(clazz) - glFragmentCoverageColorNV(color); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMixedSamples.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMixedSamples.c deleted file mode 100644 index bcef48a9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMixedSamples.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glCoverageModulationTableNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetCoverageModulationTableNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glCoverageModulationNVPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFramebufferMixedSamples_nglCoverageModulationTableNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong vAddress) { - glCoverageModulationTableNVPROC glCoverageModulationTableNV = (glCoverageModulationTableNVPROC)tlsGetFunction(1971); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glCoverageModulationTableNV(n, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFramebufferMixedSamples_nglGetCoverageModulationTableNV__IJ(JNIEnv *__env, jclass clazz, jint bufsize, jlong vAddress) { - glGetCoverageModulationTableNVPROC glGetCoverageModulationTableNV = (glGetCoverageModulationTableNVPROC)tlsGetFunction(1972); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glGetCoverageModulationTableNV(bufsize, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFramebufferMixedSamples_glCoverageModulationNV(JNIEnv *__env, jclass clazz, jint components) { - glCoverageModulationNVPROC glCoverageModulationNV = (glCoverageModulationNVPROC)tlsGetFunction(1973); - UNUSED_PARAM(clazz) - glCoverageModulationNV(components); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c deleted file mode 100644 index a8e53ca4..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glRenderbufferStorageMultisampleCoverageNVPROC) (jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFramebufferMultisampleCoverage_glRenderbufferStorageMultisampleCoverageNV(JNIEnv *__env, jclass clazz, jint target, jint coverageSamples, jint colorSamples, jint internalformat, jint width, jint height) { - glRenderbufferStorageMultisampleCoverageNVPROC glRenderbufferStorageMultisampleCoverageNV = (glRenderbufferStorageMultisampleCoverageNVPROC)tlsGetFunction(1974); - UNUSED_PARAM(clazz) - glRenderbufferStorageMultisampleCoverageNV(target, coverageSamples, colorSamples, internalformat, width, height); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVGPUMulticast.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVGPUMulticast.c deleted file mode 100644 index fd892b13..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVGPUMulticast.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glRenderGpuMaskNVPROC) (jint); -typedef void (APIENTRY *glMulticastBufferSubDataNVPROC) (jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glMulticastCopyBufferSubDataNVPROC) (jint, jint, jint, jint, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glMulticastCopyImageSubDataNVPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glMulticastBlitFramebufferNVPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glMulticastFramebufferSampleLocationsfvNVPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMulticastBarrierNVPROC) (void); -typedef void (APIENTRY *glMulticastWaitSyncNVPROC) (jint, jint); -typedef void (APIENTRY *glMulticastGetQueryObjectivNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMulticastGetQueryObjectuivNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMulticastGetQueryObjecti64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMulticastGetQueryObjectui64vNVPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_glRenderGpuMaskNV(JNIEnv *__env, jclass clazz, jint mask) { - glRenderGpuMaskNVPROC glRenderGpuMaskNV = (glRenderGpuMaskNVPROC)tlsGetFunction(1975); - UNUSED_PARAM(clazz) - glRenderGpuMaskNV(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_nglMulticastBufferSubDataNV__IIJJJ(JNIEnv *__env, jclass clazz, jint gpuMask, jint buffer, jlong offset, jlong size, jlong dataAddress) { - glMulticastBufferSubDataNVPROC glMulticastBufferSubDataNV = (glMulticastBufferSubDataNVPROC)tlsGetFunction(1976); - uintptr_t data = (uintptr_t)dataAddress; - UNUSED_PARAM(clazz) - glMulticastBufferSubDataNV(gpuMask, buffer, (uintptr_t)offset, (uintptr_t)size, data); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_glMulticastCopyBufferSubDataNV(JNIEnv *__env, jclass clazz, jint readGpu, jint writeGpuMask, jint readBuffer, jint writeBuffer, jlong readOffset, jlong writeOffset, jlong size) { - glMulticastCopyBufferSubDataNVPROC glMulticastCopyBufferSubDataNV = (glMulticastCopyBufferSubDataNVPROC)tlsGetFunction(1977); - UNUSED_PARAM(clazz) - glMulticastCopyBufferSubDataNV(readGpu, writeGpuMask, readBuffer, writeBuffer, (uintptr_t)readOffset, (uintptr_t)writeOffset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_glMulticastCopyImageSubDataNV(JNIEnv *__env, jclass clazz, jint srcGpu, jint dstGpuMask, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srxY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint srcWidth, jint srcHeight, jint srcDepth) { - glMulticastCopyImageSubDataNVPROC glMulticastCopyImageSubDataNV = (glMulticastCopyImageSubDataNVPROC)tlsGetFunction(1978); - UNUSED_PARAM(clazz) - glMulticastCopyImageSubDataNV(srcGpu, dstGpuMask, srcName, srcTarget, srcLevel, srcX, srxY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_glMulticastBlitFramebufferNV(JNIEnv *__env, jclass clazz, jint srcGpu, jint dstGpu, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { - glMulticastBlitFramebufferNVPROC glMulticastBlitFramebufferNV = (glMulticastBlitFramebufferNVPROC)tlsGetFunction(1979); - UNUSED_PARAM(clazz) - glMulticastBlitFramebufferNV(srcGpu, dstGpu, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_nglMulticastFramebufferSampleLocationsfvNV__IIIIJ(JNIEnv *__env, jclass clazz, jint gpu, jint framebuffer, jint start, jint count, jlong vAddress) { - glMulticastFramebufferSampleLocationsfvNVPROC glMulticastFramebufferSampleLocationsfvNV = (glMulticastFramebufferSampleLocationsfvNVPROC)tlsGetFunction(1980); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMulticastFramebufferSampleLocationsfvNV(gpu, framebuffer, start, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_glMulticastBarrierNV(JNIEnv *__env, jclass clazz) { - glMulticastBarrierNVPROC glMulticastBarrierNV = (glMulticastBarrierNVPROC)tlsGetFunction(1981); - UNUSED_PARAM(clazz) - glMulticastBarrierNV(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_glMulticastWaitSyncNV(JNIEnv *__env, jclass clazz, jint signalGpu, jint waitGpuMask) { - glMulticastWaitSyncNVPROC glMulticastWaitSyncNV = (glMulticastWaitSyncNVPROC)tlsGetFunction(1982); - UNUSED_PARAM(clazz) - glMulticastWaitSyncNV(signalGpu, waitGpuMask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_nglMulticastGetQueryObjectivNV__IIIJ(JNIEnv *__env, jclass clazz, jint gpu, jint id, jint pname, jlong paramsAddress) { - glMulticastGetQueryObjectivNVPROC glMulticastGetQueryObjectivNV = (glMulticastGetQueryObjectivNVPROC)tlsGetFunction(1983); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMulticastGetQueryObjectivNV(gpu, id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_nglMulticastGetQueryObjectuivNV__IIIJ(JNIEnv *__env, jclass clazz, jint gpu, jint id, jint pname, jlong paramsAddress) { - glMulticastGetQueryObjectuivNVPROC glMulticastGetQueryObjectuivNV = (glMulticastGetQueryObjectuivNVPROC)tlsGetFunction(1984); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMulticastGetQueryObjectuivNV(gpu, id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_nglMulticastGetQueryObjecti64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint gpu, jint id, jint pname, jlong paramsAddress) { - glMulticastGetQueryObjecti64vNVPROC glMulticastGetQueryObjecti64vNV = (glMulticastGetQueryObjecti64vNVPROC)tlsGetFunction(1985); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMulticastGetQueryObjecti64vNV(gpu, id, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUMulticast_nglMulticastGetQueryObjectui64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint gpu, jint id, jint pname, jlong paramsAddress) { - glMulticastGetQueryObjectui64vNVPROC glMulticastGetQueryObjectui64vNV = (glMulticastGetQueryObjectui64vNVPROC)tlsGetFunction(1986); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glMulticastGetQueryObjectui64vNV(gpu, id, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVGPUShader5.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVGPUShader5.c deleted file mode 100644 index f278b7f8..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVGPUShader5.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glUniform1i64NVPROC) (jint, jlong); -typedef void (APIENTRY *glUniform2i64NVPROC) (jint, jlong, jlong); -typedef void (APIENTRY *glUniform3i64NVPROC) (jint, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform4i64NVPROC) (jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform1i64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2i64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3i64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4i64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform1ui64NVPROC) (jint, jlong); -typedef void (APIENTRY *glUniform2ui64NVPROC) (jint, jlong, jlong); -typedef void (APIENTRY *glUniform3ui64NVPROC) (jint, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform4ui64NVPROC) (jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glUniform1ui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform2ui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform3ui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glUniform4ui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformi64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1i64NVPROC) (jint, jint, jlong); -typedef void (APIENTRY *glProgramUniform2i64NVPROC) (jint, jint, jlong, jlong); -typedef void (APIENTRY *glProgramUniform3i64NVPROC) (jint, jint, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform4i64NVPROC) (jint, jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform1i64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2i64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3i64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4i64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform1ui64NVPROC) (jint, jint, jlong); -typedef void (APIENTRY *glProgramUniform2ui64NVPROC) (jint, jint, jlong, jlong); -typedef void (APIENTRY *glProgramUniform3ui64NVPROC) (jint, jint, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform4ui64NVPROC) (jint, jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glProgramUniform1ui64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform2ui64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform3ui64vNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniform4ui64vNVPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform1i64NV(JNIEnv *__env, jclass clazz, jint location, jlong x) { - glUniform1i64NVPROC glUniform1i64NV = (glUniform1i64NVPROC)tlsGetFunction(1058); - UNUSED_PARAM(clazz) - glUniform1i64NV(location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform2i64NV(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y) { - glUniform2i64NVPROC glUniform2i64NV = (glUniform2i64NVPROC)tlsGetFunction(1059); - UNUSED_PARAM(clazz) - glUniform2i64NV(location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform3i64NV(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z) { - glUniform3i64NVPROC glUniform3i64NV = (glUniform3i64NVPROC)tlsGetFunction(1060); - UNUSED_PARAM(clazz) - glUniform3i64NV(location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform4i64NV(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong w) { - glUniform4i64NVPROC glUniform4i64NV = (glUniform4i64NVPROC)tlsGetFunction(1061); - UNUSED_PARAM(clazz) - glUniform4i64NV(location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform1i64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1i64vNVPROC glUniform1i64vNV = (glUniform1i64vNVPROC)tlsGetFunction(1062); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1i64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform2i64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2i64vNVPROC glUniform2i64vNV = (glUniform2i64vNVPROC)tlsGetFunction(1063); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2i64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform3i64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3i64vNVPROC glUniform3i64vNV = (glUniform3i64vNVPROC)tlsGetFunction(1064); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3i64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform4i64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4i64vNVPROC glUniform4i64vNV = (glUniform4i64vNVPROC)tlsGetFunction(1065); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4i64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform1ui64NV(JNIEnv *__env, jclass clazz, jint location, jlong x) { - glUniform1ui64NVPROC glUniform1ui64NV = (glUniform1ui64NVPROC)tlsGetFunction(1066); - UNUSED_PARAM(clazz) - glUniform1ui64NV(location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform2ui64NV(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y) { - glUniform2ui64NVPROC glUniform2ui64NV = (glUniform2ui64NVPROC)tlsGetFunction(1067); - UNUSED_PARAM(clazz) - glUniform2ui64NV(location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform3ui64NV(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z) { - glUniform3ui64NVPROC glUniform3ui64NV = (glUniform3ui64NVPROC)tlsGetFunction(1068); - UNUSED_PARAM(clazz) - glUniform3ui64NV(location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glUniform4ui64NV(JNIEnv *__env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong w) { - glUniform4ui64NVPROC glUniform4ui64NV = (glUniform4ui64NVPROC)tlsGetFunction(1069); - UNUSED_PARAM(clazz) - glUniform4ui64NV(location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform1ui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform1ui64vNVPROC glUniform1ui64vNV = (glUniform1ui64vNVPROC)tlsGetFunction(1070); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform1ui64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform2ui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform2ui64vNVPROC glUniform2ui64vNV = (glUniform2ui64vNVPROC)tlsGetFunction(1071); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform2ui64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform3ui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform3ui64vNVPROC glUniform3ui64vNV = (glUniform3ui64vNVPROC)tlsGetFunction(1072); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform3ui64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglUniform4ui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniform4ui64vNVPROC glUniform4ui64vNV = (glUniform4ui64vNVPROC)tlsGetFunction(1073); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniform4ui64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglGetUniformi64vNV__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformi64vNVPROC glGetUniformi64vNV = (glGetUniformi64vNVPROC)tlsGetFunction(1074); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformi64vNV(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform1i64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x) { - glProgramUniform1i64NVPROC glProgramUniform1i64NV = (glProgramUniform1i64NVPROC)tlsGetFunction(1076); - UNUSED_PARAM(clazz) - glProgramUniform1i64NV(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform2i64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y) { - glProgramUniform2i64NVPROC glProgramUniform2i64NV = (glProgramUniform2i64NVPROC)tlsGetFunction(1077); - UNUSED_PARAM(clazz) - glProgramUniform2i64NV(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform3i64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z) { - glProgramUniform3i64NVPROC glProgramUniform3i64NV = (glProgramUniform3i64NVPROC)tlsGetFunction(1078); - UNUSED_PARAM(clazz) - glProgramUniform3i64NV(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform4i64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong w) { - glProgramUniform4i64NVPROC glProgramUniform4i64NV = (glProgramUniform4i64NVPROC)tlsGetFunction(1079); - UNUSED_PARAM(clazz) - glProgramUniform4i64NV(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform1i64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1i64vNVPROC glProgramUniform1i64vNV = (glProgramUniform1i64vNVPROC)tlsGetFunction(1080); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1i64vNV(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform2i64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2i64vNVPROC glProgramUniform2i64vNV = (glProgramUniform2i64vNVPROC)tlsGetFunction(1081); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2i64vNV(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform3i64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3i64vNVPROC glProgramUniform3i64vNV = (glProgramUniform3i64vNVPROC)tlsGetFunction(1082); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3i64vNV(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform4i64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4i64vNVPROC glProgramUniform4i64vNV = (glProgramUniform4i64vNVPROC)tlsGetFunction(1083); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4i64vNV(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform1ui64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x) { - glProgramUniform1ui64NVPROC glProgramUniform1ui64NV = (glProgramUniform1ui64NVPROC)tlsGetFunction(1084); - UNUSED_PARAM(clazz) - glProgramUniform1ui64NV(program, location, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform2ui64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y) { - glProgramUniform2ui64NVPROC glProgramUniform2ui64NV = (glProgramUniform2ui64NVPROC)tlsGetFunction(1085); - UNUSED_PARAM(clazz) - glProgramUniform2ui64NV(program, location, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform3ui64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z) { - glProgramUniform3ui64NVPROC glProgramUniform3ui64NV = (glProgramUniform3ui64NVPROC)tlsGetFunction(1086); - UNUSED_PARAM(clazz) - glProgramUniform3ui64NV(program, location, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_glProgramUniform4ui64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong w) { - glProgramUniform4ui64NVPROC glProgramUniform4ui64NV = (glProgramUniform4ui64NVPROC)tlsGetFunction(1087); - UNUSED_PARAM(clazz) - glProgramUniform4ui64NV(program, location, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform1ui64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform1ui64vNVPROC glProgramUniform1ui64vNV = (glProgramUniform1ui64vNVPROC)tlsGetFunction(1088); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform1ui64vNV(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform2ui64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform2ui64vNVPROC glProgramUniform2ui64vNV = (glProgramUniform2ui64vNVPROC)tlsGetFunction(1089); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform2ui64vNV(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform3ui64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform3ui64vNVPROC glProgramUniform3ui64vNV = (glProgramUniform3ui64vNVPROC)tlsGetFunction(1090); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform3ui64vNV(program, location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGPUShader5_nglProgramUniform4ui64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniform4ui64vNVPROC glProgramUniform4ui64vNV = (glProgramUniform4ui64vNVPROC)tlsGetFunction(1091); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniform4ui64vNV(program, location, count, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVHalfFloat.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVHalfFloat.c deleted file mode 100644 index d62a76dd..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVHalfFloat.c +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertex2hNVPROC) (jshort, jshort); -typedef void (APIENTRY *glVertex2hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glVertex3hNVPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glVertex3hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glVertex4hNVPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glVertex4hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glNormal3hNVPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glNormal3hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glColor3hNVPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glColor3hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glColor4hNVPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glColor4hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord1hNVPROC) (jshort); -typedef void (APIENTRY *glTexCoord1hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord2hNVPROC) (jshort, jshort); -typedef void (APIENTRY *glTexCoord2hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord3hNVPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glTexCoord3hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glTexCoord4hNVPROC) (jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glTexCoord4hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glMultiTexCoord1hNVPROC) (jint, jshort); -typedef void (APIENTRY *glMultiTexCoord1hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord2hNVPROC) (jint, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord2hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord3hNVPROC) (jint, jshort, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord3hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMultiTexCoord4hNVPROC) (jint, jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glMultiTexCoord4hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glFogCoordhNVPROC) (jshort); -typedef void (APIENTRY *glFogCoordhvNVPROC) (uintptr_t); -typedef void (APIENTRY *glSecondaryColor3hNVPROC) (jshort, jshort, jshort); -typedef void (APIENTRY *glSecondaryColor3hvNVPROC) (uintptr_t); -typedef void (APIENTRY *glVertexWeighthNVPROC) (jshort); -typedef void (APIENTRY *glVertexWeighthvNVPROC) (uintptr_t); -typedef void (APIENTRY *glVertexAttrib1hNVPROC) (jint, jshort); -typedef void (APIENTRY *glVertexAttrib1hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib2hNVPROC) (jint, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib2hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib3hNVPROC) (jint, jshort, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib3hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttrib4hNVPROC) (jint, jshort, jshort, jshort, jshort); -typedef void (APIENTRY *glVertexAttrib4hvNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribs1hvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribs2hvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribs3hvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribs4hvNVPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertex2hNV(JNIEnv *__env, jclass clazz, jshort x, jshort y) { - glVertex2hNVPROC glVertex2hNV = (glVertex2hNVPROC)tlsGetFunction(1987); - UNUSED_PARAM(clazz) - glVertex2hNV(x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertex2hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glVertex2hvNVPROC glVertex2hvNV = (glVertex2hvNVPROC)tlsGetFunction(1988); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertex2hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertex3hNV(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z) { - glVertex3hNVPROC glVertex3hNV = (glVertex3hNVPROC)tlsGetFunction(1989); - UNUSED_PARAM(clazz) - glVertex3hNV(x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertex3hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glVertex3hvNVPROC glVertex3hvNV = (glVertex3hvNVPROC)tlsGetFunction(1990); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertex3hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertex4hNV(JNIEnv *__env, jclass clazz, jshort x, jshort y, jshort z, jshort w) { - glVertex4hNVPROC glVertex4hNV = (glVertex4hNVPROC)tlsGetFunction(1991); - UNUSED_PARAM(clazz) - glVertex4hNV(x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertex4hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glVertex4hvNVPROC glVertex4hvNV = (glVertex4hvNVPROC)tlsGetFunction(1992); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertex4hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glNormal3hNV(JNIEnv *__env, jclass clazz, jshort nx, jshort ny, jshort nz) { - glNormal3hNVPROC glNormal3hNV = (glNormal3hNVPROC)tlsGetFunction(1993); - UNUSED_PARAM(clazz) - glNormal3hNV(nx, ny, nz); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglNormal3hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glNormal3hvNVPROC glNormal3hvNV = (glNormal3hvNVPROC)tlsGetFunction(1994); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNormal3hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glColor3hNV(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glColor3hNVPROC glColor3hNV = (glColor3hNVPROC)tlsGetFunction(1995); - UNUSED_PARAM(clazz) - glColor3hNV(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglColor3hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor3hvNVPROC glColor3hvNV = (glColor3hvNVPROC)tlsGetFunction(1996); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor3hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glColor4hNV(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue, jshort alpha) { - glColor4hNVPROC glColor4hNV = (glColor4hNVPROC)tlsGetFunction(1997); - UNUSED_PARAM(clazz) - glColor4hNV(red, green, blue, alpha); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglColor4hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glColor4hvNVPROC glColor4hvNV = (glColor4hvNVPROC)tlsGetFunction(1998); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glColor4hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord1hNV(JNIEnv *__env, jclass clazz, jshort s) { - glTexCoord1hNVPROC glTexCoord1hNV = (glTexCoord1hNVPROC)tlsGetFunction(1999); - UNUSED_PARAM(clazz) - glTexCoord1hNV(s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord1hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord1hvNVPROC glTexCoord1hvNV = (glTexCoord1hvNVPROC)tlsGetFunction(2000); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord1hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord2hNV(JNIEnv *__env, jclass clazz, jshort s, jshort t) { - glTexCoord2hNVPROC glTexCoord2hNV = (glTexCoord2hNVPROC)tlsGetFunction(2001); - UNUSED_PARAM(clazz) - glTexCoord2hNV(s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord2hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord2hvNVPROC glTexCoord2hvNV = (glTexCoord2hvNVPROC)tlsGetFunction(2002); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord2hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord3hNV(JNIEnv *__env, jclass clazz, jshort s, jshort t, jshort r) { - glTexCoord3hNVPROC glTexCoord3hNV = (glTexCoord3hNVPROC)tlsGetFunction(2003); - UNUSED_PARAM(clazz) - glTexCoord3hNV(s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord3hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord3hvNVPROC glTexCoord3hvNV = (glTexCoord3hvNVPROC)tlsGetFunction(2004); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord3hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord4hNV(JNIEnv *__env, jclass clazz, jshort s, jshort t, jshort r, jshort q) { - glTexCoord4hNVPROC glTexCoord4hNV = (glTexCoord4hNVPROC)tlsGetFunction(2005); - UNUSED_PARAM(clazz) - glTexCoord4hNV(s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord4hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glTexCoord4hvNVPROC glTexCoord4hvNV = (glTexCoord4hvNVPROC)tlsGetFunction(2006); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glTexCoord4hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord1hNV(JNIEnv *__env, jclass clazz, jint target, jshort s) { - glMultiTexCoord1hNVPROC glMultiTexCoord1hNV = (glMultiTexCoord1hNVPROC)tlsGetFunction(2007); - UNUSED_PARAM(clazz) - glMultiTexCoord1hNV(target, s); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord1hvNV__IJ(JNIEnv *__env, jclass clazz, jint target, jlong vAddress) { - glMultiTexCoord1hvNVPROC glMultiTexCoord1hvNV = (glMultiTexCoord1hvNVPROC)tlsGetFunction(2008); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord1hvNV(target, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord2hNV(JNIEnv *__env, jclass clazz, jint target, jshort s, jshort t) { - glMultiTexCoord2hNVPROC glMultiTexCoord2hNV = (glMultiTexCoord2hNVPROC)tlsGetFunction(2009); - UNUSED_PARAM(clazz) - glMultiTexCoord2hNV(target, s, t); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord2hvNV__IJ(JNIEnv *__env, jclass clazz, jint target, jlong vAddress) { - glMultiTexCoord2hvNVPROC glMultiTexCoord2hvNV = (glMultiTexCoord2hvNVPROC)tlsGetFunction(2010); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord2hvNV(target, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord3hNV(JNIEnv *__env, jclass clazz, jint target, jshort s, jshort t, jshort r) { - glMultiTexCoord3hNVPROC glMultiTexCoord3hNV = (glMultiTexCoord3hNVPROC)tlsGetFunction(2011); - UNUSED_PARAM(clazz) - glMultiTexCoord3hNV(target, s, t, r); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord3hvNV__IJ(JNIEnv *__env, jclass clazz, jint target, jlong vAddress) { - glMultiTexCoord3hvNVPROC glMultiTexCoord3hvNV = (glMultiTexCoord3hvNVPROC)tlsGetFunction(2012); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord3hvNV(target, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord4hNV(JNIEnv *__env, jclass clazz, jint target, jshort s, jshort t, jshort r, jshort q) { - glMultiTexCoord4hNVPROC glMultiTexCoord4hNV = (glMultiTexCoord4hNVPROC)tlsGetFunction(2013); - UNUSED_PARAM(clazz) - glMultiTexCoord4hNV(target, s, t, r, q); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord4hvNV__IJ(JNIEnv *__env, jclass clazz, jint target, jlong vAddress) { - glMultiTexCoord4hvNVPROC glMultiTexCoord4hvNV = (glMultiTexCoord4hvNVPROC)tlsGetFunction(2014); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMultiTexCoord4hvNV(target, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glFogCoordhNV(JNIEnv *__env, jclass clazz, jshort fog) { - glFogCoordhNVPROC glFogCoordhNV = (glFogCoordhNVPROC)tlsGetFunction(2015); - UNUSED_PARAM(clazz) - glFogCoordhNV(fog); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglFogCoordhvNV__J(JNIEnv *__env, jclass clazz, jlong fogAddress) { - glFogCoordhvNVPROC glFogCoordhvNV = (glFogCoordhvNVPROC)tlsGetFunction(2016); - uintptr_t fog = (uintptr_t)fogAddress; - UNUSED_PARAM(clazz) - glFogCoordhvNV(fog); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glSecondaryColor3hNV(JNIEnv *__env, jclass clazz, jshort red, jshort green, jshort blue) { - glSecondaryColor3hNVPROC glSecondaryColor3hNV = (glSecondaryColor3hNVPROC)tlsGetFunction(2017); - UNUSED_PARAM(clazz) - glSecondaryColor3hNV(red, green, blue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglSecondaryColor3hvNV__J(JNIEnv *__env, jclass clazz, jlong vAddress) { - glSecondaryColor3hvNVPROC glSecondaryColor3hvNV = (glSecondaryColor3hvNVPROC)tlsGetFunction(2018); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glSecondaryColor3hvNV(v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexWeighthNV(JNIEnv *__env, jclass clazz, jshort weight) { - glVertexWeighthNVPROC glVertexWeighthNV = (glVertexWeighthNVPROC)tlsGetFunction(2019); - UNUSED_PARAM(clazz) - glVertexWeighthNV(weight); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexWeighthvNV__J(JNIEnv *__env, jclass clazz, jlong weightAddress) { - glVertexWeighthvNVPROC glVertexWeighthvNV = (glVertexWeighthvNVPROC)tlsGetFunction(2020); - uintptr_t weight = (uintptr_t)weightAddress; - UNUSED_PARAM(clazz) - glVertexWeighthvNV(weight); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib1hNV(JNIEnv *__env, jclass clazz, jint index, jshort x) { - glVertexAttrib1hNVPROC glVertexAttrib1hNV = (glVertexAttrib1hNVPROC)tlsGetFunction(2021); - UNUSED_PARAM(clazz) - glVertexAttrib1hNV(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib1hvNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib1hvNVPROC glVertexAttrib1hvNV = (glVertexAttrib1hvNVPROC)tlsGetFunction(2022); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib1hvNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib2hNV(JNIEnv *__env, jclass clazz, jint index, jshort x, jshort y) { - glVertexAttrib2hNVPROC glVertexAttrib2hNV = (glVertexAttrib2hNVPROC)tlsGetFunction(2023); - UNUSED_PARAM(clazz) - glVertexAttrib2hNV(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib2hvNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib2hvNVPROC glVertexAttrib2hvNV = (glVertexAttrib2hvNVPROC)tlsGetFunction(2024); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib2hvNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib3hNV(JNIEnv *__env, jclass clazz, jint index, jshort x, jshort y, jshort z) { - glVertexAttrib3hNVPROC glVertexAttrib3hNV = (glVertexAttrib3hNVPROC)tlsGetFunction(2025); - UNUSED_PARAM(clazz) - glVertexAttrib3hNV(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib3hvNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib3hvNVPROC glVertexAttrib3hvNV = (glVertexAttrib3hvNVPROC)tlsGetFunction(2026); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib3hvNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib4hNV(JNIEnv *__env, jclass clazz, jint index, jshort x, jshort y, jshort z, jshort w) { - glVertexAttrib4hNVPROC glVertexAttrib4hNV = (glVertexAttrib4hNVPROC)tlsGetFunction(2027); - UNUSED_PARAM(clazz) - glVertexAttrib4hNV(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib4hvNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttrib4hvNVPROC glVertexAttrib4hvNV = (glVertexAttrib4hvNVPROC)tlsGetFunction(2028); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttrib4hvNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs1hvNV__IIJ(JNIEnv *__env, jclass clazz, jint index, jint n, jlong vAddress) { - glVertexAttribs1hvNVPROC glVertexAttribs1hvNV = (glVertexAttribs1hvNVPROC)tlsGetFunction(2029); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribs1hvNV(index, n, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs2hvNV__IIJ(JNIEnv *__env, jclass clazz, jint index, jint n, jlong vAddress) { - glVertexAttribs2hvNVPROC glVertexAttribs2hvNV = (glVertexAttribs2hvNVPROC)tlsGetFunction(2030); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribs2hvNV(index, n, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs3hvNV__IIJ(JNIEnv *__env, jclass clazz, jint index, jint n, jlong vAddress) { - glVertexAttribs3hvNVPROC glVertexAttribs3hvNV = (glVertexAttribs3hvNVPROC)tlsGetFunction(2031); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribs3hvNV(index, n, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs4hvNV__IIJ(JNIEnv *__env, jclass clazz, jint index, jint n, jlong vAddress) { - glVertexAttribs4hvNVPROC glVertexAttribs4hvNV = (glVertexAttribs4hvNVPROC)tlsGetFunction(2032); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribs4hvNV(index, n, v); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVInternalformatSampleQuery.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVInternalformatSampleQuery.c deleted file mode 100644 index 624e9ca0..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVInternalformatSampleQuery.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetInternalformatSampleivNVPROC) (jint, jint, jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVInternalformatSampleQuery_nglGetInternalformatSampleivNV__IIIIIJ(JNIEnv *__env, jclass clazz, jint target, jint internalformat, jint samples, jint pname, jint bufSize, jlong paramsAddress) { - glGetInternalformatSampleivNVPROC glGetInternalformatSampleivNV = (glGetInternalformatSampleivNVPROC)tlsGetFunction(2033); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetInternalformatSampleivNV(target, internalformat, samples, pname, bufSize, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMemoryAttachment.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMemoryAttachment.c deleted file mode 100644 index 8ab55f3a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMemoryAttachment.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGetMemoryObjectDetachedResourcesuivNVPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glResetMemoryObjectParameterNVPROC) (jint, jint); -typedef void (APIENTRY *glTexAttachMemoryNVPROC) (jint, jint, jlong); -typedef void (APIENTRY *glBufferAttachMemoryNVPROC) (jint, jint, jlong); -typedef void (APIENTRY *glTextureAttachMemoryNVPROC) (jint, jint, jlong); -typedef void (APIENTRY *glNamedBufferAttachMemoryNVPROC) (jint, jint, jlong); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryAttachment_nglGetMemoryObjectDetachedResourcesuivNV__IIIIJ(JNIEnv *__env, jclass clazz, jint memory, jint pname, jint first, jint count, jlong paramsAddress) { - glGetMemoryObjectDetachedResourcesuivNVPROC glGetMemoryObjectDetachedResourcesuivNV = (glGetMemoryObjectDetachedResourcesuivNVPROC)tlsGetFunction(2034); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetMemoryObjectDetachedResourcesuivNV(memory, pname, first, count, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryAttachment_glResetMemoryObjectParameterNV(JNIEnv *__env, jclass clazz, jint memory, jint pname) { - glResetMemoryObjectParameterNVPROC glResetMemoryObjectParameterNV = (glResetMemoryObjectParameterNVPROC)tlsGetFunction(2035); - UNUSED_PARAM(clazz) - glResetMemoryObjectParameterNV(memory, pname); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryAttachment_glTexAttachMemoryNV(JNIEnv *__env, jclass clazz, jint target, jint memory, jlong offset) { - glTexAttachMemoryNVPROC glTexAttachMemoryNV = (glTexAttachMemoryNVPROC)tlsGetFunction(2036); - UNUSED_PARAM(clazz) - glTexAttachMemoryNV(target, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryAttachment_glBufferAttachMemoryNV(JNIEnv *__env, jclass clazz, jint target, jint memory, jlong offset) { - glBufferAttachMemoryNVPROC glBufferAttachMemoryNV = (glBufferAttachMemoryNVPROC)tlsGetFunction(2037); - UNUSED_PARAM(clazz) - glBufferAttachMemoryNV(target, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryAttachment_glTextureAttachMemoryNV(JNIEnv *__env, jclass clazz, jint texture, jint memory, jlong offset) { - glTextureAttachMemoryNVPROC glTextureAttachMemoryNV = (glTextureAttachMemoryNVPROC)tlsGetFunction(2038); - UNUSED_PARAM(clazz) - glTextureAttachMemoryNV(texture, memory, offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryAttachment_glNamedBufferAttachMemoryNV(JNIEnv *__env, jclass clazz, jint buffer, jint memory, jlong offset) { - glNamedBufferAttachMemoryNVPROC glNamedBufferAttachMemoryNV = (glNamedBufferAttachMemoryNVPROC)tlsGetFunction(2039); - UNUSED_PARAM(clazz) - glNamedBufferAttachMemoryNV(buffer, memory, offset); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMemoryObjectSparse.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMemoryObjectSparse.c deleted file mode 100644 index b2a354e1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMemoryObjectSparse.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBufferPageCommitmentMemNVPROC) (jint, uintptr_t, uintptr_t, jint, jlong, jboolean); -typedef void (APIENTRY *glNamedBufferPageCommitmentMemNVPROC) (jint, uintptr_t, uintptr_t, jint, jlong, jboolean); -typedef void (APIENTRY *glTexPageCommitmentMemNVPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jlong, jboolean); -typedef void (APIENTRY *glTexturePageCommitmentMemNVPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jlong, jboolean); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryObjectSparse_glBufferPageCommitmentMemNV(JNIEnv *__env, jclass clazz, jint target, jlong offset, jlong size, jint memory, jlong memOffset, jboolean commit) { - glBufferPageCommitmentMemNVPROC glBufferPageCommitmentMemNV = (glBufferPageCommitmentMemNVPROC)tlsGetFunction(2040); - UNUSED_PARAM(clazz) - glBufferPageCommitmentMemNV(target, (uintptr_t)offset, (uintptr_t)size, memory, memOffset, commit); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryObjectSparse_glNamedBufferPageCommitmentMemNV(JNIEnv *__env, jclass clazz, jint buffer, jlong offset, jlong size, jint memory, jlong memOffset, jboolean commit) { - glNamedBufferPageCommitmentMemNVPROC glNamedBufferPageCommitmentMemNV = (glNamedBufferPageCommitmentMemNVPROC)tlsGetFunction(2041); - UNUSED_PARAM(clazz) - glNamedBufferPageCommitmentMemNV(buffer, (uintptr_t)offset, (uintptr_t)size, memory, memOffset, commit); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryObjectSparse_glTexPageCommitmentMemNV(JNIEnv *__env, jclass clazz, jint target, jint layer, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint memory, jlong offset, jboolean commit) { - glTexPageCommitmentMemNVPROC glTexPageCommitmentMemNV = (glTexPageCommitmentMemNVPROC)tlsGetFunction(2042); - UNUSED_PARAM(clazz) - glTexPageCommitmentMemNV(target, layer, level, xoffset, yoffset, zoffset, width, height, depth, memory, offset, commit); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMemoryObjectSparse_glTexturePageCommitmentMemNV(JNIEnv *__env, jclass clazz, jint texture, jint layer, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint memory, jlong offset, jboolean commit) { - glTexturePageCommitmentMemNVPROC glTexturePageCommitmentMemNV = (glTexturePageCommitmentMemNVPROC)tlsGetFunction(2043); - UNUSED_PARAM(clazz) - glTexturePageCommitmentMemNV(texture, layer, level, xoffset, yoffset, zoffset, width, height, depth, memory, offset, commit); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMeshShader.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMeshShader.c deleted file mode 100644 index 34108806..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVMeshShader.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glDrawMeshTasksNVPROC) (jint, jint); -typedef void (APIENTRY *glDrawMeshTasksIndirectNVPROC) (uintptr_t); -typedef void (APIENTRY *glMultiDrawMeshTasksIndirectNVPROC) (uintptr_t, jint, jint); -typedef void (APIENTRY *glMultiDrawMeshTasksIndirectCountNVPROC) (uintptr_t, uintptr_t, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMeshShader_glDrawMeshTasksNV(JNIEnv *__env, jclass clazz, jint first, jint count) { - glDrawMeshTasksNVPROC glDrawMeshTasksNV = (glDrawMeshTasksNVPROC)tlsGetFunction(2044); - UNUSED_PARAM(clazz) - glDrawMeshTasksNV(first, count); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMeshShader_glDrawMeshTasksIndirectNV(JNIEnv *__env, jclass clazz, jlong indirect) { - glDrawMeshTasksIndirectNVPROC glDrawMeshTasksIndirectNV = (glDrawMeshTasksIndirectNVPROC)tlsGetFunction(2045); - UNUSED_PARAM(clazz) - glDrawMeshTasksIndirectNV((uintptr_t)indirect); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMeshShader_glMultiDrawMeshTasksIndirectNV(JNIEnv *__env, jclass clazz, jlong indirect, jint drawcount, jint stride) { - glMultiDrawMeshTasksIndirectNVPROC glMultiDrawMeshTasksIndirectNV = (glMultiDrawMeshTasksIndirectNVPROC)tlsGetFunction(2046); - UNUSED_PARAM(clazz) - glMultiDrawMeshTasksIndirectNV((uintptr_t)indirect, drawcount, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVMeshShader_glMultiDrawMeshTasksIndirectCountNV(JNIEnv *__env, jclass clazz, jlong indirect, jlong drawcount, jint maxdrawcount, jint stride) { - glMultiDrawMeshTasksIndirectCountNVPROC glMultiDrawMeshTasksIndirectCountNV = (glMultiDrawMeshTasksIndirectCountNVPROC)tlsGetFunction(2047); - UNUSED_PARAM(clazz) - glMultiDrawMeshTasksIndirectCountNV((uintptr_t)indirect, (uintptr_t)drawcount, maxdrawcount, stride); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPathRendering.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPathRendering.c deleted file mode 100644 index 9d10ce01..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPathRendering.c +++ /dev/null @@ -1,522 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPathCommandsNVPROC) (jint, jint, uintptr_t, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathCoordsNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathSubCommandsNVPROC) (jint, jint, jint, jint, uintptr_t, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathSubCoordsNVPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathStringNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathGlyphsNVPROC) (jint, jint, uintptr_t, jint, jint, jint, uintptr_t, jint, jint, jfloat); -typedef void (APIENTRY *glPathGlyphRangeNVPROC) (jint, jint, uintptr_t, jint, jint, jint, jint, jint, jfloat); -typedef jint (APIENTRY *glPathGlyphIndexArrayNVPROC) (jint, jint, uintptr_t, jint, jint, jint, jint, jfloat); -typedef jint (APIENTRY *glPathMemoryGlyphIndexArrayNVPROC) (jint, jint, uintptr_t, uintptr_t, jint, jint, jint, jint, jfloat); -typedef void (APIENTRY *glCopyPathNVPROC) (jint, jint); -typedef void (APIENTRY *glWeightPathsNVPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glInterpolatePathsNVPROC) (jint, jint, jint, jfloat); -typedef void (APIENTRY *glTransformPathNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathParameterivNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glPathParameteriNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glPathParameterfvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glPathParameterfNVPROC) (jint, jint, jfloat); -typedef void (APIENTRY *glPathDashArrayNVPROC) (jint, jint, uintptr_t); -typedef jint (APIENTRY *glGenPathsNVPROC) (jint); -typedef void (APIENTRY *glDeletePathsNVPROC) (jint, jint); -typedef jboolean (APIENTRY *glIsPathNVPROC) (jint); -typedef void (APIENTRY *glPathStencilFuncNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glPathStencilDepthOffsetNVPROC) (jfloat, jfloat); -typedef void (APIENTRY *glStencilFillPathNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glStencilStrokePathNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glStencilFillPathInstancedNVPROC) (jint, jint, uintptr_t, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glStencilStrokePathInstancedNVPROC) (jint, jint, uintptr_t, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathCoverDepthFuncNVPROC) (jint); -typedef void (APIENTRY *glPathColorGenNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathTexGenNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glPathFogGenNVPROC) (jint); -typedef void (APIENTRY *glCoverFillPathNVPROC) (jint, jint); -typedef void (APIENTRY *glCoverStrokePathNVPROC) (jint, jint); -typedef void (APIENTRY *glCoverFillPathInstancedNVPROC) (jint, jint, uintptr_t, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glCoverStrokePathInstancedNVPROC) (jint, jint, uintptr_t, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glStencilThenCoverFillPathNVPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glStencilThenCoverStrokePathNVPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glStencilThenCoverFillPathInstancedNVPROC) (jint, jint, uintptr_t, jint, jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glStencilThenCoverStrokePathInstancedNVPROC) (jint, jint, uintptr_t, jint, jint, jint, jint, jint, uintptr_t); -typedef jint (APIENTRY *glPathGlyphIndexRangeNVPROC) (jint, uintptr_t, jint, jint, jfloat, uintptr_t); -typedef void (APIENTRY *glProgramPathFragmentInputGenNVPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathParameterivNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathParameterfvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathCommandsNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetPathCoordsNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetPathDashArrayNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetPathMetricsNVPROC) (jint, jint, jint, uintptr_t, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathMetricRangeNVPROC) (jint, jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathSpacingNVPROC) (jint, jint, jint, uintptr_t, jint, jfloat, jfloat, jint, uintptr_t); -typedef void (APIENTRY *glGetPathColorGenivNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathColorGenfvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathTexGenivNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetPathTexGenfvNVPROC) (jint, jint, uintptr_t); -typedef jboolean (APIENTRY *glIsPointInFillPathNVPROC) (jint, jint, jfloat, jfloat); -typedef jboolean (APIENTRY *glIsPointInStrokePathNVPROC) (jint, jfloat, jfloat); -typedef jfloat (APIENTRY *glGetPathLengthNVPROC) (jint, jint, jint); -typedef jboolean (APIENTRY *glPointAlongPathNVPROC) (jint, jint, jint, jfloat, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glMatrixLoad3x2fNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixLoad3x3fNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixLoadTranspose3x3fNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixMult3x2fNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixMult3x3fNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glMatrixMultTranspose3x3fNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetProgramResourcefvNVPROC) (jint, jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathCommandsNV__IIJIIJ(JNIEnv *__env, jclass clazz, jint path, jint numCommands, jlong commandsAddress, jint numCoords, jint coordType, jlong coordsAddress) { - glPathCommandsNVPROC glPathCommandsNV = (glPathCommandsNVPROC)tlsGetFunction(2048); - uintptr_t commands = (uintptr_t)commandsAddress; - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glPathCommandsNV(path, numCommands, commands, numCoords, coordType, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathCoordsNV__IIIJ(JNIEnv *__env, jclass clazz, jint path, jint numCoords, jint coordType, jlong coordsAddress) { - glPathCoordsNVPROC glPathCoordsNV = (glPathCoordsNVPROC)tlsGetFunction(2049); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glPathCoordsNV(path, numCoords, coordType, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathSubCommandsNV__IIIIJIIJ(JNIEnv *__env, jclass clazz, jint path, jint commandStart, jint commandsToDelete, jint numCommands, jlong commandsAddress, jint numCoords, jint coordType, jlong coordsAddress) { - glPathSubCommandsNVPROC glPathSubCommandsNV = (glPathSubCommandsNVPROC)tlsGetFunction(2050); - uintptr_t commands = (uintptr_t)commandsAddress; - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glPathSubCommandsNV(path, commandStart, commandsToDelete, numCommands, commands, numCoords, coordType, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathSubCoordsNV__IIIIJ(JNIEnv *__env, jclass clazz, jint path, jint coordStart, jint numCoords, jint coordType, jlong coordsAddress) { - glPathSubCoordsNVPROC glPathSubCoordsNV = (glPathSubCoordsNVPROC)tlsGetFunction(2051); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glPathSubCoordsNV(path, coordStart, numCoords, coordType, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathStringNV(JNIEnv *__env, jclass clazz, jint path, jint format, jint length, jlong pathStringAddress) { - glPathStringNVPROC glPathStringNV = (glPathStringNVPROC)tlsGetFunction(2052); - uintptr_t pathString = (uintptr_t)pathStringAddress; - UNUSED_PARAM(clazz) - glPathStringNV(path, format, length, pathString); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathGlyphsNV(JNIEnv *__env, jclass clazz, jint firstPathName, jint fontTarget, jlong fontNameAddress, jint fontStyle, jint numGlyphs, jint type, jlong charcodesAddress, jint handleMissingGlyphs, jint pathParameterTemplate, jfloat emScale) { - glPathGlyphsNVPROC glPathGlyphsNV = (glPathGlyphsNVPROC)tlsGetFunction(2053); - uintptr_t fontName = (uintptr_t)fontNameAddress; - uintptr_t charcodes = (uintptr_t)charcodesAddress; - UNUSED_PARAM(clazz) - glPathGlyphsNV(firstPathName, fontTarget, fontName, fontStyle, numGlyphs, type, charcodes, handleMissingGlyphs, pathParameterTemplate, emScale); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathGlyphRangeNV(JNIEnv *__env, jclass clazz, jint firstPathName, jint fontTarget, jlong fontNameAddress, jint fontStyle, jint firstGlyph, jint numGlyphs, jint handleMissingGlyphs, jint pathParameterTemplate, jfloat emScale) { - glPathGlyphRangeNVPROC glPathGlyphRangeNV = (glPathGlyphRangeNVPROC)tlsGetFunction(2054); - uintptr_t fontName = (uintptr_t)fontNameAddress; - UNUSED_PARAM(clazz) - glPathGlyphRangeNV(firstPathName, fontTarget, fontName, fontStyle, firstGlyph, numGlyphs, handleMissingGlyphs, pathParameterTemplate, emScale); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathGlyphIndexArrayNV(JNIEnv *__env, jclass clazz, jint firstPathName, jint fontTarget, jlong fontNameAddress, jint fontStyle, jint firstGlyphIndex, jint numGlyphs, jint pathParameterTemplate, jfloat emScale) { - glPathGlyphIndexArrayNVPROC glPathGlyphIndexArrayNV = (glPathGlyphIndexArrayNVPROC)tlsGetFunction(2055); - uintptr_t fontName = (uintptr_t)fontNameAddress; - UNUSED_PARAM(clazz) - return glPathGlyphIndexArrayNV(firstPathName, fontTarget, fontName, fontStyle, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathMemoryGlyphIndexArrayNV(JNIEnv *__env, jclass clazz, jint firstPathName, jint fontTarget, jlong fontSize, jlong fontDataAddress, jint faceIndex, jint firstGlyphIndex, jint numGlyphs, jint pathParameterTemplate, jfloat emScale) { - glPathMemoryGlyphIndexArrayNVPROC glPathMemoryGlyphIndexArrayNV = (glPathMemoryGlyphIndexArrayNVPROC)tlsGetFunction(2056); - uintptr_t fontData = (uintptr_t)fontDataAddress; - UNUSED_PARAM(clazz) - return glPathMemoryGlyphIndexArrayNV(firstPathName, fontTarget, (uintptr_t)fontSize, fontData, faceIndex, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glCopyPathNV(JNIEnv *__env, jclass clazz, jint resultPath, jint srcPath) { - glCopyPathNVPROC glCopyPathNV = (glCopyPathNVPROC)tlsGetFunction(2057); - UNUSED_PARAM(clazz) - glCopyPathNV(resultPath, srcPath); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglWeightPathsNV__IIJJ(JNIEnv *__env, jclass clazz, jint resultPath, jint numPaths, jlong pathsAddress, jlong weightsAddress) { - glWeightPathsNVPROC glWeightPathsNV = (glWeightPathsNVPROC)tlsGetFunction(2058); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t weights = (uintptr_t)weightsAddress; - UNUSED_PARAM(clazz) - glWeightPathsNV(resultPath, numPaths, paths, weights); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glInterpolatePathsNV(JNIEnv *__env, jclass clazz, jint resultPath, jint pathA, jint pathB, jfloat weight) { - glInterpolatePathsNVPROC glInterpolatePathsNV = (glInterpolatePathsNVPROC)tlsGetFunction(2059); - UNUSED_PARAM(clazz) - glInterpolatePathsNV(resultPath, pathA, pathB, weight); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglTransformPathNV__IIIJ(JNIEnv *__env, jclass clazz, jint resultPath, jint srcPath, jint transformType, jlong transformValuesAddress) { - glTransformPathNVPROC glTransformPathNV = (glTransformPathNVPROC)tlsGetFunction(2060); - uintptr_t transformValues = (uintptr_t)transformValuesAddress; - UNUSED_PARAM(clazz) - glTransformPathNV(resultPath, srcPath, transformType, transformValues); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathParameterivNV__IIJ(JNIEnv *__env, jclass clazz, jint path, jint pname, jlong valueAddress) { - glPathParameterivNVPROC glPathParameterivNV = (glPathParameterivNVPROC)tlsGetFunction(2061); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glPathParameterivNV(path, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glPathParameteriNV(JNIEnv *__env, jclass clazz, jint path, jint pname, jint value) { - glPathParameteriNVPROC glPathParameteriNV = (glPathParameteriNVPROC)tlsGetFunction(2062); - UNUSED_PARAM(clazz) - glPathParameteriNV(path, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathParameterfvNV__IIJ(JNIEnv *__env, jclass clazz, jint path, jint pname, jlong valueAddress) { - glPathParameterfvNVPROC glPathParameterfvNV = (glPathParameterfvNVPROC)tlsGetFunction(2063); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glPathParameterfvNV(path, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glPathParameterfNV(JNIEnv *__env, jclass clazz, jint path, jint pname, jfloat value) { - glPathParameterfNVPROC glPathParameterfNV = (glPathParameterfNVPROC)tlsGetFunction(2064); - UNUSED_PARAM(clazz) - glPathParameterfNV(path, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathDashArrayNV__IIJ(JNIEnv *__env, jclass clazz, jint path, jint dashCount, jlong dashArrayAddress) { - glPathDashArrayNVPROC glPathDashArrayNV = (glPathDashArrayNVPROC)tlsGetFunction(2065); - uintptr_t dashArray = (uintptr_t)dashArrayAddress; - UNUSED_PARAM(clazz) - glPathDashArrayNV(path, dashCount, dashArray); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPathRendering_glGenPathsNV(JNIEnv *__env, jclass clazz, jint range) { - glGenPathsNVPROC glGenPathsNV = (glGenPathsNVPROC)tlsGetFunction(2066); - UNUSED_PARAM(clazz) - return glGenPathsNV(range); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glDeletePathsNV(JNIEnv *__env, jclass clazz, jint path, jint range) { - glDeletePathsNVPROC glDeletePathsNV = (glDeletePathsNVPROC)tlsGetFunction(2067); - UNUSED_PARAM(clazz) - glDeletePathsNV(path, range); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_glIsPathNV(JNIEnv *__env, jclass clazz, jint path) { - glIsPathNVPROC glIsPathNV = (glIsPathNVPROC)tlsGetFunction(2068); - UNUSED_PARAM(clazz) - return glIsPathNV(path); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glPathStencilFuncNV(JNIEnv *__env, jclass clazz, jint func, jint ref, jint mask) { - glPathStencilFuncNVPROC glPathStencilFuncNV = (glPathStencilFuncNVPROC)tlsGetFunction(2069); - UNUSED_PARAM(clazz) - glPathStencilFuncNV(func, ref, mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glPathStencilDepthOffsetNV(JNIEnv *__env, jclass clazz, jfloat factor, jfloat units) { - glPathStencilDepthOffsetNVPROC glPathStencilDepthOffsetNV = (glPathStencilDepthOffsetNVPROC)tlsGetFunction(2070); - UNUSED_PARAM(clazz) - glPathStencilDepthOffsetNV(factor, units); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glStencilFillPathNV(JNIEnv *__env, jclass clazz, jint path, jint fillMode, jint mask) { - glStencilFillPathNVPROC glStencilFillPathNV = (glStencilFillPathNVPROC)tlsGetFunction(2071); - UNUSED_PARAM(clazz) - glStencilFillPathNV(path, fillMode, mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glStencilStrokePathNV(JNIEnv *__env, jclass clazz, jint path, jint reference, jint mask) { - glStencilStrokePathNVPROC glStencilStrokePathNV = (glStencilStrokePathNVPROC)tlsGetFunction(2072); - UNUSED_PARAM(clazz) - glStencilStrokePathNV(path, reference, mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilFillPathInstancedNV__IIJIIIIJ(JNIEnv *__env, jclass clazz, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jint fillMode, jint mask, jint transformType, jlong transformValuesAddress) { - glStencilFillPathInstancedNVPROC glStencilFillPathInstancedNV = (glStencilFillPathInstancedNVPROC)tlsGetFunction(2073); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t transformValues = (uintptr_t)transformValuesAddress; - UNUSED_PARAM(clazz) - glStencilFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, fillMode, mask, transformType, transformValues); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilStrokePathInstancedNV__IIJIIIIJ(JNIEnv *__env, jclass clazz, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jint reference, jint mask, jint transformType, jlong transformValuesAddress) { - glStencilStrokePathInstancedNVPROC glStencilStrokePathInstancedNV = (glStencilStrokePathInstancedNVPROC)tlsGetFunction(2074); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t transformValues = (uintptr_t)transformValuesAddress; - UNUSED_PARAM(clazz) - glStencilStrokePathInstancedNV(numPaths, pathNameType, paths, pathBase, reference, mask, transformType, transformValues); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glPathCoverDepthFuncNV(JNIEnv *__env, jclass clazz, jint zfunc) { - glPathCoverDepthFuncNVPROC glPathCoverDepthFuncNV = (glPathCoverDepthFuncNVPROC)tlsGetFunction(2075); - UNUSED_PARAM(clazz) - glPathCoverDepthFuncNV(zfunc); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathColorGenNV__IIIJ(JNIEnv *__env, jclass clazz, jint color, jint genMode, jint colorFormat, jlong coeffsAddress) { - glPathColorGenNVPROC glPathColorGenNV = (glPathColorGenNVPROC)tlsGetFunction(2076); - uintptr_t coeffs = (uintptr_t)coeffsAddress; - UNUSED_PARAM(clazz) - glPathColorGenNV(color, genMode, colorFormat, coeffs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathTexGenNV__IIIJ(JNIEnv *__env, jclass clazz, jint texCoordSet, jint genMode, jint components, jlong coeffsAddress) { - glPathTexGenNVPROC glPathTexGenNV = (glPathTexGenNVPROC)tlsGetFunction(2077); - uintptr_t coeffs = (uintptr_t)coeffsAddress; - UNUSED_PARAM(clazz) - glPathTexGenNV(texCoordSet, genMode, components, coeffs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glPathFogGenNV(JNIEnv *__env, jclass clazz, jint genMode) { - glPathFogGenNVPROC glPathFogGenNV = (glPathFogGenNVPROC)tlsGetFunction(2078); - UNUSED_PARAM(clazz) - glPathFogGenNV(genMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glCoverFillPathNV(JNIEnv *__env, jclass clazz, jint path, jint coverMode) { - glCoverFillPathNVPROC glCoverFillPathNV = (glCoverFillPathNVPROC)tlsGetFunction(2079); - UNUSED_PARAM(clazz) - glCoverFillPathNV(path, coverMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glCoverStrokePathNV(JNIEnv *__env, jclass clazz, jint path, jint coverMode) { - glCoverStrokePathNVPROC glCoverStrokePathNV = (glCoverStrokePathNVPROC)tlsGetFunction(2080); - UNUSED_PARAM(clazz) - glCoverStrokePathNV(path, coverMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglCoverFillPathInstancedNV__IIJIIIJ(JNIEnv *__env, jclass clazz, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jint coverMode, jint transformType, jlong transformValuesAddress) { - glCoverFillPathInstancedNVPROC glCoverFillPathInstancedNV = (glCoverFillPathInstancedNVPROC)tlsGetFunction(2081); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t transformValues = (uintptr_t)transformValuesAddress; - UNUSED_PARAM(clazz) - glCoverFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglCoverStrokePathInstancedNV__IIJIIIJ(JNIEnv *__env, jclass clazz, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jint coverMode, jint transformType, jlong transformValuesAddress) { - glCoverStrokePathInstancedNVPROC glCoverStrokePathInstancedNV = (glCoverStrokePathInstancedNVPROC)tlsGetFunction(2082); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t transformValues = (uintptr_t)transformValuesAddress; - UNUSED_PARAM(clazz) - glCoverStrokePathInstancedNV(numPaths, pathNameType, paths, pathBase, coverMode, transformType, transformValues); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glStencilThenCoverFillPathNV(JNIEnv *__env, jclass clazz, jint path, jint fillMode, jint mask, jint coverMode) { - glStencilThenCoverFillPathNVPROC glStencilThenCoverFillPathNV = (glStencilThenCoverFillPathNVPROC)tlsGetFunction(2083); - UNUSED_PARAM(clazz) - glStencilThenCoverFillPathNV(path, fillMode, mask, coverMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_glStencilThenCoverStrokePathNV(JNIEnv *__env, jclass clazz, jint path, jint reference, jint mask, jint coverMode) { - glStencilThenCoverStrokePathNVPROC glStencilThenCoverStrokePathNV = (glStencilThenCoverStrokePathNVPROC)tlsGetFunction(2084); - UNUSED_PARAM(clazz) - glStencilThenCoverStrokePathNV(path, reference, mask, coverMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilThenCoverFillPathInstancedNV__IIJIIIIIJ(JNIEnv *__env, jclass clazz, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jint fillMode, jint mask, jint coverMode, jint transformType, jlong transformValuesAddress) { - glStencilThenCoverFillPathInstancedNVPROC glStencilThenCoverFillPathInstancedNV = (glStencilThenCoverFillPathInstancedNVPROC)tlsGetFunction(2085); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t transformValues = (uintptr_t)transformValuesAddress; - UNUSED_PARAM(clazz) - glStencilThenCoverFillPathInstancedNV(numPaths, pathNameType, paths, pathBase, fillMode, mask, coverMode, transformType, transformValues); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilThenCoverStrokePathInstancedNV__IIJIIIIIJ(JNIEnv *__env, jclass clazz, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jint reference, jint mask, jint coverMode, jint transformType, jlong transformValuesAddress) { - glStencilThenCoverStrokePathInstancedNVPROC glStencilThenCoverStrokePathInstancedNV = (glStencilThenCoverStrokePathInstancedNVPROC)tlsGetFunction(2086); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t transformValues = (uintptr_t)transformValuesAddress; - UNUSED_PARAM(clazz) - glStencilThenCoverStrokePathInstancedNV(numPaths, pathNameType, paths, pathBase, reference, mask, coverMode, transformType, transformValues); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathGlyphIndexRangeNV__IJIIFJ(JNIEnv *__env, jclass clazz, jint fontTarget, jlong fontNameAddress, jint fontStyle, jint pathParameterTemplate, jfloat emScale, jlong baseAndCountAddress) { - glPathGlyphIndexRangeNVPROC glPathGlyphIndexRangeNV = (glPathGlyphIndexRangeNVPROC)tlsGetFunction(2087); - uintptr_t fontName = (uintptr_t)fontNameAddress; - uintptr_t baseAndCount = (uintptr_t)baseAndCountAddress; - UNUSED_PARAM(clazz) - return glPathGlyphIndexRangeNV(fontTarget, fontName, fontStyle, pathParameterTemplate, emScale, baseAndCount); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglProgramPathFragmentInputGenNV__IIIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint genMode, jint components, jlong coeffsAddress) { - glProgramPathFragmentInputGenNVPROC glProgramPathFragmentInputGenNV = (glProgramPathFragmentInputGenNVPROC)tlsGetFunction(2088); - uintptr_t coeffs = (uintptr_t)coeffsAddress; - UNUSED_PARAM(clazz) - glProgramPathFragmentInputGenNV(program, location, genMode, components, coeffs); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathParameterivNV__IIJ(JNIEnv *__env, jclass clazz, jint path, jint pname, jlong valueAddress) { - glGetPathParameterivNVPROC glGetPathParameterivNV = (glGetPathParameterivNVPROC)tlsGetFunction(2089); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glGetPathParameterivNV(path, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathParameterfvNV__IIJ(JNIEnv *__env, jclass clazz, jint path, jint pname, jlong valueAddress) { - glGetPathParameterfvNVPROC glGetPathParameterfvNV = (glGetPathParameterfvNVPROC)tlsGetFunction(2090); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glGetPathParameterfvNV(path, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathCommandsNV(JNIEnv *__env, jclass clazz, jint path, jlong commandsAddress) { - glGetPathCommandsNVPROC glGetPathCommandsNV = (glGetPathCommandsNVPROC)tlsGetFunction(2091); - uintptr_t commands = (uintptr_t)commandsAddress; - UNUSED_PARAM(clazz) - glGetPathCommandsNV(path, commands); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathCoordsNV__IJ(JNIEnv *__env, jclass clazz, jint path, jlong coordsAddress) { - glGetPathCoordsNVPROC glGetPathCoordsNV = (glGetPathCoordsNVPROC)tlsGetFunction(2092); - uintptr_t coords = (uintptr_t)coordsAddress; - UNUSED_PARAM(clazz) - glGetPathCoordsNV(path, coords); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathDashArrayNV__IJ(JNIEnv *__env, jclass clazz, jint path, jlong dashArrayAddress) { - glGetPathDashArrayNVPROC glGetPathDashArrayNV = (glGetPathDashArrayNVPROC)tlsGetFunction(2093); - uintptr_t dashArray = (uintptr_t)dashArrayAddress; - UNUSED_PARAM(clazz) - glGetPathDashArrayNV(path, dashArray); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathMetricsNV__IIIJIIJ(JNIEnv *__env, jclass clazz, jint metricQueryMask, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jint stride, jlong metricsAddress) { - glGetPathMetricsNVPROC glGetPathMetricsNV = (glGetPathMetricsNVPROC)tlsGetFunction(2094); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t metrics = (uintptr_t)metricsAddress; - UNUSED_PARAM(clazz) - glGetPathMetricsNV(metricQueryMask, numPaths, pathNameType, paths, pathBase, stride, metrics); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathMetricRangeNV__IIIIJ(JNIEnv *__env, jclass clazz, jint metricQueryMask, jint firstPathName, jint numPaths, jint stride, jlong metricsAddress) { - glGetPathMetricRangeNVPROC glGetPathMetricRangeNV = (glGetPathMetricRangeNVPROC)tlsGetFunction(2095); - uintptr_t metrics = (uintptr_t)metricsAddress; - UNUSED_PARAM(clazz) - glGetPathMetricRangeNV(metricQueryMask, firstPathName, numPaths, stride, metrics); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathSpacingNV__IIIJIFFIJ(JNIEnv *__env, jclass clazz, jint pathListMode, jint numPaths, jint pathNameType, jlong pathsAddress, jint pathBase, jfloat advanceScale, jfloat kerningScale, jint transformType, jlong returnedSpacingAddress) { - glGetPathSpacingNVPROC glGetPathSpacingNV = (glGetPathSpacingNVPROC)tlsGetFunction(2096); - uintptr_t paths = (uintptr_t)pathsAddress; - uintptr_t returnedSpacing = (uintptr_t)returnedSpacingAddress; - UNUSED_PARAM(clazz) - glGetPathSpacingNV(pathListMode, numPaths, pathNameType, paths, pathBase, advanceScale, kerningScale, transformType, returnedSpacing); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathColorGenivNV__IIJ(JNIEnv *__env, jclass clazz, jint color, jint pname, jlong valueAddress) { - glGetPathColorGenivNVPROC glGetPathColorGenivNV = (glGetPathColorGenivNVPROC)tlsGetFunction(2097); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glGetPathColorGenivNV(color, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathColorGenfvNV__IIJ(JNIEnv *__env, jclass clazz, jint color, jint pname, jlong valueAddress) { - glGetPathColorGenfvNVPROC glGetPathColorGenfvNV = (glGetPathColorGenfvNVPROC)tlsGetFunction(2098); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glGetPathColorGenfvNV(color, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathTexGenivNV__IIJ(JNIEnv *__env, jclass clazz, jint texCoordSet, jint pname, jlong valueAddress) { - glGetPathTexGenivNVPROC glGetPathTexGenivNV = (glGetPathTexGenivNVPROC)tlsGetFunction(2099); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glGetPathTexGenivNV(texCoordSet, pname, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathTexGenfvNV__IIJ(JNIEnv *__env, jclass clazz, jint texCoordSet, jint pname, jlong valueAddress) { - glGetPathTexGenfvNVPROC glGetPathTexGenfvNV = (glGetPathTexGenfvNVPROC)tlsGetFunction(2100); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glGetPathTexGenfvNV(texCoordSet, pname, value); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_glIsPointInFillPathNV(JNIEnv *__env, jclass clazz, jint path, jint mask, jfloat x, jfloat y) { - glIsPointInFillPathNVPROC glIsPointInFillPathNV = (glIsPointInFillPathNVPROC)tlsGetFunction(2101); - UNUSED_PARAM(clazz) - return glIsPointInFillPathNV(path, mask, x, y); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_glIsPointInStrokePathNV(JNIEnv *__env, jclass clazz, jint path, jfloat x, jfloat y) { - glIsPointInStrokePathNVPROC glIsPointInStrokePathNV = (glIsPointInStrokePathNVPROC)tlsGetFunction(2102); - UNUSED_PARAM(clazz) - return glIsPointInStrokePathNV(path, x, y); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_opengl_NVPathRendering_glGetPathLengthNV(JNIEnv *__env, jclass clazz, jint path, jint startSegment, jint numSegments) { - glGetPathLengthNVPROC glGetPathLengthNV = (glGetPathLengthNVPROC)tlsGetFunction(2103); - UNUSED_PARAM(clazz) - return glGetPathLengthNV(path, startSegment, numSegments); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPointAlongPathNV__IIIFJJJJ(JNIEnv *__env, jclass clazz, jint path, jint startSegment, jint numSegments, jfloat distance, jlong xAddress, jlong yAddress, jlong tangentXAddress, jlong tangentYAddress) { - glPointAlongPathNVPROC glPointAlongPathNV = (glPointAlongPathNVPROC)tlsGetFunction(2104); - uintptr_t x = (uintptr_t)xAddress; - uintptr_t y = (uintptr_t)yAddress; - uintptr_t tangentX = (uintptr_t)tangentXAddress; - uintptr_t tangentY = (uintptr_t)tangentYAddress; - UNUSED_PARAM(clazz) - return glPointAlongPathNV(path, startSegment, numSegments, distance, x, y, tangentX, tangentY); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglMatrixLoad3x2fNV__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixLoad3x2fNVPROC glMatrixLoad3x2fNV = (glMatrixLoad3x2fNVPROC)tlsGetFunction(2105); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixLoad3x2fNV(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglMatrixLoad3x3fNV__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixLoad3x3fNVPROC glMatrixLoad3x3fNV = (glMatrixLoad3x3fNVPROC)tlsGetFunction(2106); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixLoad3x3fNV(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglMatrixLoadTranspose3x3fNV__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixLoadTranspose3x3fNVPROC glMatrixLoadTranspose3x3fNV = (glMatrixLoadTranspose3x3fNVPROC)tlsGetFunction(2107); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixLoadTranspose3x3fNV(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglMatrixMult3x2fNV__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixMult3x2fNVPROC glMatrixMult3x2fNV = (glMatrixMult3x2fNVPROC)tlsGetFunction(2108); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixMult3x2fNV(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglMatrixMult3x3fNV__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixMult3x3fNVPROC glMatrixMult3x3fNV = (glMatrixMult3x3fNVPROC)tlsGetFunction(2109); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixMult3x3fNV(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglMatrixMultTranspose3x3fNV__IJ(JNIEnv *__env, jclass clazz, jint matrixMode, jlong mAddress) { - glMatrixMultTranspose3x3fNVPROC glMatrixMultTranspose3x3fNV = (glMatrixMultTranspose3x3fNVPROC)tlsGetFunction(2110); - uintptr_t m = (uintptr_t)mAddress; - UNUSED_PARAM(clazz) - glMatrixMultTranspose3x3fNV(matrixMode, m); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetProgramResourcefvNV__IIIIJIJJ(JNIEnv *__env, jclass clazz, jint program, jint programInterface, jint index, jint propCount, jlong propsAddress, jint bufSize, jlong lengthAddress, jlong paramsAddress) { - glGetProgramResourcefvNVPROC glGetProgramResourcefvNV = (glGetProgramResourcefvNVPROC)tlsGetFunction(2111); - uintptr_t props = (uintptr_t)propsAddress; - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetProgramResourcefvNV(program, programInterface, index, propCount, props, bufSize, length, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPixelDataRange.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPixelDataRange.c deleted file mode 100644 index 55fced18..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPixelDataRange.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPixelDataRangeNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glFlushPixelDataRangeNVPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPixelDataRange_nglPixelDataRangeNV(JNIEnv *__env, jclass clazz, jint target, jint length, jlong pointerAddress) { - glPixelDataRangeNVPROC glPixelDataRangeNV = (glPixelDataRangeNVPROC)tlsGetFunction(2112); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glPixelDataRangeNV(target, length, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPixelDataRange_glFlushPixelDataRangeNV(JNIEnv *__env, jclass clazz, jint target) { - glFlushPixelDataRangeNVPROC glFlushPixelDataRangeNV = (glFlushPixelDataRangeNVPROC)tlsGetFunction(2113); - UNUSED_PARAM(clazz) - glFlushPixelDataRangeNV(target); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPointSprite.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPointSprite.c deleted file mode 100644 index 877e4ec3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPointSprite.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPointParameteriNVPROC) (jint, jint); -typedef void (APIENTRY *glPointParameterivNVPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPointSprite_glPointParameteriNV(JNIEnv *__env, jclass clazz, jint pname, jint param) { - glPointParameteriNVPROC glPointParameteriNV = (glPointParameteriNVPROC)tlsGetFunction(2114); - UNUSED_PARAM(clazz) - glPointParameteriNV(pname, param); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPointSprite_nglPointParameterivNV__IJ(JNIEnv *__env, jclass clazz, jint pname, jlong paramsAddress) { - glPointParameterivNVPROC glPointParameterivNV = (glPointParameterivNVPROC)tlsGetFunction(2115); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glPointParameterivNV(pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPrimitiveRestart.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPrimitiveRestart.c deleted file mode 100644 index 14458431..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVPrimitiveRestart.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glPrimitiveRestartNVPROC) (void); -typedef void (APIENTRY *glPrimitiveRestartIndexNVPROC) (jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPrimitiveRestart_glPrimitiveRestartNV(JNIEnv *__env, jclass clazz) { - glPrimitiveRestartNVPROC glPrimitiveRestartNV = (glPrimitiveRestartNVPROC)tlsGetFunction(2116); - UNUSED_PARAM(clazz) - glPrimitiveRestartNV(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPrimitiveRestart_glPrimitiveRestartIndexNV(JNIEnv *__env, jclass clazz, jint index) { - glPrimitiveRestartIndexNVPROC glPrimitiveRestartIndexNV = (glPrimitiveRestartIndexNVPROC)tlsGetFunction(2117); - UNUSED_PARAM(clazz) - glPrimitiveRestartIndexNV(index); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVQueryResource.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVQueryResource.c deleted file mode 100644 index 6428efe5..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVQueryResource.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jint (APIENTRY *glQueryResourceNVPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVQueryResource_nglQueryResourceNV__IIIJ(JNIEnv *__env, jclass clazz, jint queryType, jint pname, jint bufSize, jlong bufferAddress) { - glQueryResourceNVPROC glQueryResourceNV = (glQueryResourceNVPROC)tlsGetFunction(2118); - uintptr_t buffer = (uintptr_t)bufferAddress; - UNUSED_PARAM(clazz) - return glQueryResourceNV(queryType, pname, bufSize, buffer); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVQueryResourceTag.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVQueryResourceTag.c deleted file mode 100644 index a8100a5d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVQueryResourceTag.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glGenQueryResourceTagNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glDeleteQueryResourceTagNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glQueryResourceTagNVPROC) (jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVQueryResourceTag_nglGenQueryResourceTagNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong tagIdsAddress) { - glGenQueryResourceTagNVPROC glGenQueryResourceTagNV = (glGenQueryResourceTagNVPROC)tlsGetFunction(2119); - uintptr_t tagIds = (uintptr_t)tagIdsAddress; - UNUSED_PARAM(clazz) - glGenQueryResourceTagNV(n, tagIds); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVQueryResourceTag_nglDeleteQueryResourceTagNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong tagIdsAddress) { - glDeleteQueryResourceTagNVPROC glDeleteQueryResourceTagNV = (glDeleteQueryResourceTagNVPROC)tlsGetFunction(2120); - uintptr_t tagIds = (uintptr_t)tagIdsAddress; - UNUSED_PARAM(clazz) - glDeleteQueryResourceTagNV(n, tagIds); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVQueryResourceTag_nglQueryResourceTagNV(JNIEnv *__env, jclass clazz, jint tagId, jlong tagStringAddress) { - glQueryResourceTagNVPROC glQueryResourceTagNV = (glQueryResourceTagNVPROC)tlsGetFunction(2121); - uintptr_t tagString = (uintptr_t)tagStringAddress; - UNUSED_PARAM(clazz) - glQueryResourceTagNV(tagId, tagString); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVSampleLocations.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVSampleLocations.c deleted file mode 100644 index 24a5cb18..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVSampleLocations.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFramebufferSampleLocationsfvNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glNamedFramebufferSampleLocationsfvNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glResolveDepthValuesNVPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVSampleLocations_nglFramebufferSampleLocationsfvNV__IIIJ(JNIEnv *__env, jclass clazz, jint target, jint start, jint count, jlong vAddress) { - glFramebufferSampleLocationsfvNVPROC glFramebufferSampleLocationsfvNV = (glFramebufferSampleLocationsfvNVPROC)tlsGetFunction(2122); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glFramebufferSampleLocationsfvNV(target, start, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVSampleLocations_nglNamedFramebufferSampleLocationsfvNV__IIIJ(JNIEnv *__env, jclass clazz, jint framebuffer, jint start, jint count, jlong vAddress) { - glNamedFramebufferSampleLocationsfvNVPROC glNamedFramebufferSampleLocationsfvNV = (glNamedFramebufferSampleLocationsfvNVPROC)tlsGetFunction(2123); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glNamedFramebufferSampleLocationsfvNV(framebuffer, start, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVSampleLocations_glResolveDepthValuesNV(JNIEnv *__env, jclass clazz) { - glResolveDepthValuesNVPROC glResolveDepthValuesNV = (glResolveDepthValuesNVPROC)tlsGetFunction(2124); - UNUSED_PARAM(clazz) - glResolveDepthValuesNV(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVScissorExclusive.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVScissorExclusive.c deleted file mode 100644 index 0dffad6b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVScissorExclusive.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glScissorExclusiveArrayvNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glScissorExclusiveNVPROC) (jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVScissorExclusive_nglScissorExclusiveArrayvNV__IIJ(JNIEnv *__env, jclass clazz, jint first, jint count, jlong vAddress) { - glScissorExclusiveArrayvNVPROC glScissorExclusiveArrayvNV = (glScissorExclusiveArrayvNVPROC)tlsGetFunction(2125); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glScissorExclusiveArrayvNV(first, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVScissorExclusive_glScissorExclusiveNV(JNIEnv *__env, jclass clazz, jint x, jint y, jint width, jint height) { - glScissorExclusiveNVPROC glScissorExclusiveNV = (glScissorExclusiveNVPROC)tlsGetFunction(2126); - UNUSED_PARAM(clazz) - glScissorExclusiveNV(x, y, width, height); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVShaderBufferLoad.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVShaderBufferLoad.c deleted file mode 100644 index 9d4ed975..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVShaderBufferLoad.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glMakeBufferResidentNVPROC) (jint, jint); -typedef void (APIENTRY *glMakeBufferNonResidentNVPROC) (jint); -typedef jboolean (APIENTRY *glIsBufferResidentNVPROC) (jint); -typedef void (APIENTRY *glMakeNamedBufferResidentNVPROC) (jint, jint); -typedef void (APIENTRY *glMakeNamedBufferNonResidentNVPROC) (jint); -typedef jboolean (APIENTRY *glIsNamedBufferResidentNVPROC) (jint); -typedef void (APIENTRY *glGetBufferParameterui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetNamedBufferParameterui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetIntegerui64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glUniformui64NVPROC) (jint, jlong); -typedef void (APIENTRY *glUniformui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetUniformui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glProgramUniformui64NVPROC) (jint, jint, jlong); -typedef void (APIENTRY *glProgramUniformui64vNVPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glMakeBufferResidentNV(JNIEnv *__env, jclass clazz, jint target, jint access) { - glMakeBufferResidentNVPROC glMakeBufferResidentNV = (glMakeBufferResidentNVPROC)tlsGetFunction(2127); - UNUSED_PARAM(clazz) - glMakeBufferResidentNV(target, access); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glMakeBufferNonResidentNV(JNIEnv *__env, jclass clazz, jint target) { - glMakeBufferNonResidentNVPROC glMakeBufferNonResidentNV = (glMakeBufferNonResidentNVPROC)tlsGetFunction(2128); - UNUSED_PARAM(clazz) - glMakeBufferNonResidentNV(target); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glIsBufferResidentNV(JNIEnv *__env, jclass clazz, jint target) { - glIsBufferResidentNVPROC glIsBufferResidentNV = (glIsBufferResidentNVPROC)tlsGetFunction(2129); - UNUSED_PARAM(clazz) - return glIsBufferResidentNV(target); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glMakeNamedBufferResidentNV(JNIEnv *__env, jclass clazz, jint buffer, jint access) { - glMakeNamedBufferResidentNVPROC glMakeNamedBufferResidentNV = (glMakeNamedBufferResidentNVPROC)tlsGetFunction(2130); - UNUSED_PARAM(clazz) - glMakeNamedBufferResidentNV(buffer, access); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glMakeNamedBufferNonResidentNV(JNIEnv *__env, jclass clazz, jint buffer) { - glMakeNamedBufferNonResidentNVPROC glMakeNamedBufferNonResidentNV = (glMakeNamedBufferNonResidentNVPROC)tlsGetFunction(2131); - UNUSED_PARAM(clazz) - glMakeNamedBufferNonResidentNV(buffer); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glIsNamedBufferResidentNV(JNIEnv *__env, jclass clazz, jint buffer) { - glIsNamedBufferResidentNVPROC glIsNamedBufferResidentNV = (glIsNamedBufferResidentNVPROC)tlsGetFunction(2132); - UNUSED_PARAM(clazz) - return glIsNamedBufferResidentNV(buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglGetBufferParameterui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint target, jint pname, jlong paramsAddress) { - glGetBufferParameterui64vNVPROC glGetBufferParameterui64vNV = (glGetBufferParameterui64vNVPROC)tlsGetFunction(2133); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetBufferParameterui64vNV(target, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglGetNamedBufferParameterui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint buffer, jint pname, jlong paramsAddress) { - glGetNamedBufferParameterui64vNVPROC glGetNamedBufferParameterui64vNV = (glGetNamedBufferParameterui64vNVPROC)tlsGetFunction(2134); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetNamedBufferParameterui64vNV(buffer, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglGetIntegerui64vNV__IJ(JNIEnv *__env, jclass clazz, jint value, jlong resultAddress) { - glGetIntegerui64vNVPROC glGetIntegerui64vNV = (glGetIntegerui64vNVPROC)tlsGetFunction(2135); - uintptr_t result = (uintptr_t)resultAddress; - UNUSED_PARAM(clazz) - glGetIntegerui64vNV(value, result); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glUniformui64NV(JNIEnv *__env, jclass clazz, jint location, jlong value) { - glUniformui64NVPROC glUniformui64NV = (glUniformui64NVPROC)tlsGetFunction(2136); - UNUSED_PARAM(clazz) - glUniformui64NV(location, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglUniformui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint location, jint count, jlong valueAddress) { - glUniformui64vNVPROC glUniformui64vNV = (glUniformui64vNVPROC)tlsGetFunction(2137); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glUniformui64vNV(location, count, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglGetUniformui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jlong paramsAddress) { - glGetUniformui64vNVPROC glGetUniformui64vNV = (glGetUniformui64vNVPROC)tlsGetFunction(1075); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetUniformui64vNV(program, location, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_glProgramUniformui64NV(JNIEnv *__env, jclass clazz, jint program, jint location, jlong value) { - glProgramUniformui64NVPROC glProgramUniformui64NV = (glProgramUniformui64NVPROC)tlsGetFunction(2138); - UNUSED_PARAM(clazz) - glProgramUniformui64NV(program, location, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglProgramUniformui64vNV__IIIJ(JNIEnv *__env, jclass clazz, jint program, jint location, jint count, jlong valueAddress) { - glProgramUniformui64vNVPROC glProgramUniformui64vNV = (glProgramUniformui64vNVPROC)tlsGetFunction(2139); - uintptr_t value = (uintptr_t)valueAddress; - UNUSED_PARAM(clazz) - glProgramUniformui64vNV(program, location, count, value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVShadingRateImage.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVShadingRateImage.c deleted file mode 100644 index abc136de..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVShadingRateImage.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBindShadingRateImageNVPROC) (jint); -typedef void (APIENTRY *glShadingRateImagePaletteNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glGetShadingRateImagePaletteNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glShadingRateImageBarrierNVPROC) (jboolean); -typedef void (APIENTRY *glShadingRateSampleOrderNVPROC) (jint); -typedef void (APIENTRY *glShadingRateSampleOrderCustomNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetShadingRateSampleLocationivNVPROC) (jint, jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShadingRateImage_glBindShadingRateImageNV(JNIEnv *__env, jclass clazz, jint texture) { - glBindShadingRateImageNVPROC glBindShadingRateImageNV = (glBindShadingRateImageNVPROC)tlsGetFunction(2140); - UNUSED_PARAM(clazz) - glBindShadingRateImageNV(texture); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShadingRateImage_nglShadingRateImagePaletteNV__IIIJ(JNIEnv *__env, jclass clazz, jint viewport, jint first, jint count, jlong ratesAddress) { - glShadingRateImagePaletteNVPROC glShadingRateImagePaletteNV = (glShadingRateImagePaletteNVPROC)tlsGetFunction(2141); - uintptr_t rates = (uintptr_t)ratesAddress; - UNUSED_PARAM(clazz) - glShadingRateImagePaletteNV(viewport, first, count, rates); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShadingRateImage_nglGetShadingRateImagePaletteNV__IIJ(JNIEnv *__env, jclass clazz, jint viewport, jint entry, jlong rateAddress) { - glGetShadingRateImagePaletteNVPROC glGetShadingRateImagePaletteNV = (glGetShadingRateImagePaletteNVPROC)tlsGetFunction(2142); - uintptr_t rate = (uintptr_t)rateAddress; - UNUSED_PARAM(clazz) - glGetShadingRateImagePaletteNV(viewport, entry, rate); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShadingRateImage_glShadingRateImageBarrierNV(JNIEnv *__env, jclass clazz, jboolean synchronize) { - glShadingRateImageBarrierNVPROC glShadingRateImageBarrierNV = (glShadingRateImageBarrierNVPROC)tlsGetFunction(2143); - UNUSED_PARAM(clazz) - glShadingRateImageBarrierNV(synchronize); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShadingRateImage_glShadingRateSampleOrderNV(JNIEnv *__env, jclass clazz, jint order) { - glShadingRateSampleOrderNVPROC glShadingRateSampleOrderNV = (glShadingRateSampleOrderNVPROC)tlsGetFunction(2144); - UNUSED_PARAM(clazz) - glShadingRateSampleOrderNV(order); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShadingRateImage_nglShadingRateSampleOrderCustomNV__IIJ(JNIEnv *__env, jclass clazz, jint rate, jint samples, jlong locationsAddress) { - glShadingRateSampleOrderCustomNVPROC glShadingRateSampleOrderCustomNV = (glShadingRateSampleOrderCustomNVPROC)tlsGetFunction(2145); - uintptr_t locations = (uintptr_t)locationsAddress; - UNUSED_PARAM(clazz) - glShadingRateSampleOrderCustomNV(rate, samples, locations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShadingRateImage_nglGetShadingRateSampleLocationivNV__IIIJ(JNIEnv *__env, jclass clazz, jint rate, jint samples, jint index, jlong locationAddress) { - glGetShadingRateSampleLocationivNVPROC glGetShadingRateSampleLocationivNV = (glGetShadingRateSampleLocationivNVPROC)tlsGetFunction(2146); - uintptr_t location = (uintptr_t)locationAddress; - UNUSED_PARAM(clazz) - glGetShadingRateSampleLocationivNV(rate, samples, index, location); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTextureBarrier.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTextureBarrier.c deleted file mode 100644 index f0f49b1a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTextureBarrier.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTextureBarrierNVPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureBarrier_glTextureBarrierNV(JNIEnv *__env, jclass clazz) { - glTextureBarrierNVPROC glTextureBarrierNV = (glTextureBarrierNVPROC)tlsGetFunction(2147); - UNUSED_PARAM(clazz) - glTextureBarrierNV(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTextureMultisample.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTextureMultisample.c deleted file mode 100644 index a07ccf66..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTextureMultisample.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glTexImage2DMultisampleCoverageNVPROC) (jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTexImage3DMultisampleCoverageNVPROC) (jint, jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureImage2DMultisampleNVPROC) (jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureImage3DMultisampleNVPROC) (jint, jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureImage2DMultisampleCoverageNVPROC) (jint, jint, jint, jint, jint, jint, jint, jboolean); -typedef void (APIENTRY *glTextureImage3DMultisampleCoverageNVPROC) (jint, jint, jint, jint, jint, jint, jint, jint, jboolean); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_glTexImage2DMultisampleCoverageNV(JNIEnv *__env, jclass clazz, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations) { - glTexImage2DMultisampleCoverageNVPROC glTexImage2DMultisampleCoverageNV = (glTexImage2DMultisampleCoverageNVPROC)tlsGetFunction(2148); - UNUSED_PARAM(clazz) - glTexImage2DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_glTexImage3DMultisampleCoverageNV(JNIEnv *__env, jclass clazz, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations) { - glTexImage3DMultisampleCoverageNVPROC glTexImage3DMultisampleCoverageNV = (glTexImage3DMultisampleCoverageNVPROC)tlsGetFunction(2149); - UNUSED_PARAM(clazz) - glTexImage3DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_glTextureImage2DMultisampleNV(JNIEnv *__env, jclass clazz, jint texture, jint target, jint samples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations) { - glTextureImage2DMultisampleNVPROC glTextureImage2DMultisampleNV = (glTextureImage2DMultisampleNVPROC)tlsGetFunction(2150); - UNUSED_PARAM(clazz) - glTextureImage2DMultisampleNV(texture, target, samples, internalFormat, width, height, fixedSampleLocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_glTextureImage3DMultisampleNV(JNIEnv *__env, jclass clazz, jint texture, jint target, jint samples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations) { - glTextureImage3DMultisampleNVPROC glTextureImage3DMultisampleNV = (glTextureImage3DMultisampleNVPROC)tlsGetFunction(2151); - UNUSED_PARAM(clazz) - glTextureImage3DMultisampleNV(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_glTextureImage2DMultisampleCoverageNV(JNIEnv *__env, jclass clazz, jint texture, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations) { - glTextureImage2DMultisampleCoverageNVPROC glTextureImage2DMultisampleCoverageNV = (glTextureImage2DMultisampleCoverageNVPROC)tlsGetFunction(2152); - UNUSED_PARAM(clazz) - glTextureImage2DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_glTextureImage3DMultisampleCoverageNV(JNIEnv *__env, jclass clazz, jint texture, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations) { - glTextureImage3DMultisampleCoverageNVPROC glTextureImage3DMultisampleCoverageNV = (glTextureImage3DMultisampleCoverageNVPROC)tlsGetFunction(2153); - UNUSED_PARAM(clazz) - glTextureImage3DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTimelineSemaphore.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTimelineSemaphore.c deleted file mode 100644 index 505579ff..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTimelineSemaphore.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glCreateSemaphoresNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glSemaphoreParameterivNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetSemaphoreParameterivNVPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTimelineSemaphore_nglCreateSemaphoresNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong semaphoresAddress) { - glCreateSemaphoresNVPROC glCreateSemaphoresNV = (glCreateSemaphoresNVPROC)tlsGetFunction(2154); - uintptr_t semaphores = (uintptr_t)semaphoresAddress; - UNUSED_PARAM(clazz) - glCreateSemaphoresNV(n, semaphores); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTimelineSemaphore_nglSemaphoreParameterivNV__IIJ(JNIEnv *__env, jclass clazz, jint semaphore, jint pname, jlong paramsAddress) { - glSemaphoreParameterivNVPROC glSemaphoreParameterivNV = (glSemaphoreParameterivNVPROC)tlsGetFunction(2155); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glSemaphoreParameterivNV(semaphore, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTimelineSemaphore_nglGetSemaphoreParameterivNV__IIJ(JNIEnv *__env, jclass clazz, jint semaphore, jint pname, jlong paramsAddress) { - glGetSemaphoreParameterivNVPROC glGetSemaphoreParameterivNV = (glGetSemaphoreParameterivNVPROC)tlsGetFunction(2156); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetSemaphoreParameterivNV(semaphore, pname, params); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback.c deleted file mode 100644 index bd1a1379..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBeginTransformFeedbackNVPROC) (jint); -typedef void (APIENTRY *glEndTransformFeedbackNVPROC) (void); -typedef void (APIENTRY *glTransformFeedbackAttribsNVPROC) (jint, uintptr_t, jint); -typedef void (APIENTRY *glBindBufferRangeNVPROC) (jint, jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glBindBufferOffsetNVPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glBindBufferBaseNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glTransformFeedbackVaryingsNVPROC) (jint, jint, uintptr_t, jint); -typedef void (APIENTRY *glActiveVaryingNVPROC) (jint, uintptr_t); -typedef jint (APIENTRY *glGetVaryingLocationNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetActiveVaryingNVPROC) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -typedef void (APIENTRY *glGetTransformFeedbackVaryingNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glTransformFeedbackStreamAttribsNVPROC) (jint, uintptr_t, jint, uintptr_t, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_glBeginTransformFeedbackNV(JNIEnv *__env, jclass clazz, jint primitiveMode) { - glBeginTransformFeedbackNVPROC glBeginTransformFeedbackNV = (glBeginTransformFeedbackNVPROC)tlsGetFunction(2157); - UNUSED_PARAM(clazz) - glBeginTransformFeedbackNV(primitiveMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_glEndTransformFeedbackNV(JNIEnv *__env, jclass clazz) { - glEndTransformFeedbackNVPROC glEndTransformFeedbackNV = (glEndTransformFeedbackNVPROC)tlsGetFunction(2158); - UNUSED_PARAM(clazz) - glEndTransformFeedbackNV(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglTransformFeedbackAttribsNV__IJI(JNIEnv *__env, jclass clazz, jint count, jlong attribsAddress, jint bufferMode) { - glTransformFeedbackAttribsNVPROC glTransformFeedbackAttribsNV = (glTransformFeedbackAttribsNVPROC)tlsGetFunction(2159); - uintptr_t attribs = (uintptr_t)attribsAddress; - UNUSED_PARAM(clazz) - glTransformFeedbackAttribsNV(count, attribs, bufferMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_glBindBufferRangeNV(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong size) { - glBindBufferRangeNVPROC glBindBufferRangeNV = (glBindBufferRangeNVPROC)tlsGetFunction(2160); - UNUSED_PARAM(clazz) - glBindBufferRangeNV(target, index, buffer, (uintptr_t)offset, (uintptr_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_glBindBufferOffsetNV(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer, jlong offset) { - glBindBufferOffsetNVPROC glBindBufferOffsetNV = (glBindBufferOffsetNVPROC)tlsGetFunction(2161); - UNUSED_PARAM(clazz) - glBindBufferOffsetNV(target, index, buffer, (uintptr_t)offset); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_glBindBufferBaseNV(JNIEnv *__env, jclass clazz, jint target, jint index, jint buffer) { - glBindBufferBaseNVPROC glBindBufferBaseNV = (glBindBufferBaseNVPROC)tlsGetFunction(2162); - UNUSED_PARAM(clazz) - glBindBufferBaseNV(target, index, buffer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglTransformFeedbackVaryingsNV__IIJI(JNIEnv *__env, jclass clazz, jint program, jint count, jlong locationsAddress, jint bufferMode) { - glTransformFeedbackVaryingsNVPROC glTransformFeedbackVaryingsNV = (glTransformFeedbackVaryingsNVPROC)tlsGetFunction(2163); - uintptr_t locations = (uintptr_t)locationsAddress; - UNUSED_PARAM(clazz) - glTransformFeedbackVaryingsNV(program, count, locations, bufferMode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglActiveVaryingNV(JNIEnv *__env, jclass clazz, jint program, jlong nameAddress) { - glActiveVaryingNVPROC glActiveVaryingNV = (glActiveVaryingNVPROC)tlsGetFunction(2164); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glActiveVaryingNV(program, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglGetVaryingLocationNV(JNIEnv *__env, jclass clazz, jint program, jlong nameAddress) { - glGetVaryingLocationNVPROC glGetVaryingLocationNV = (glGetVaryingLocationNVPROC)tlsGetFunction(2165); - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - return glGetVaryingLocationNV(program, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglGetActiveVaryingNV__IIIJJJJ(JNIEnv *__env, jclass clazz, jint program, jint index, jint bufSize, jlong lengthAddress, jlong sizeAddress, jlong typeAddress, jlong nameAddress) { - glGetActiveVaryingNVPROC glGetActiveVaryingNV = (glGetActiveVaryingNVPROC)tlsGetFunction(2166); - uintptr_t length = (uintptr_t)lengthAddress; - uintptr_t size = (uintptr_t)sizeAddress; - uintptr_t type = (uintptr_t)typeAddress; - uintptr_t name = (uintptr_t)nameAddress; - UNUSED_PARAM(clazz) - glGetActiveVaryingNV(program, index, bufSize, length, size, type, name); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglGetTransformFeedbackVaryingNV__IIJ(JNIEnv *__env, jclass clazz, jint program, jint index, jlong locationAddress) { - glGetTransformFeedbackVaryingNVPROC glGetTransformFeedbackVaryingNV = (glGetTransformFeedbackVaryingNVPROC)tlsGetFunction(2167); - uintptr_t location = (uintptr_t)locationAddress; - UNUSED_PARAM(clazz) - glGetTransformFeedbackVaryingNV(program, index, location); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglTransformFeedbackStreamAttribsNV__IJIJI(JNIEnv *__env, jclass clazz, jint count, jlong attribsAddress, jint nbuffers, jlong bufstreamsAddress, jint bufferMode) { - glTransformFeedbackStreamAttribsNVPROC glTransformFeedbackStreamAttribsNV = (glTransformFeedbackStreamAttribsNVPROC)tlsGetFunction(2168); - uintptr_t attribs = (uintptr_t)attribsAddress; - uintptr_t bufstreams = (uintptr_t)bufstreamsAddress; - UNUSED_PARAM(clazz) - glTransformFeedbackStreamAttribsNV(count, attribs, nbuffers, bufstreams, bufferMode); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback2.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback2.c deleted file mode 100644 index 666dcfc6..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVTransformFeedback2.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBindTransformFeedbackNVPROC) (jint, jint); -typedef void (APIENTRY *glDeleteTransformFeedbacksNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGenTransformFeedbacksNVPROC) (jint, uintptr_t); -typedef jboolean (APIENTRY *glIsTransformFeedbackNVPROC) (jint); -typedef void (APIENTRY *glPauseTransformFeedbackNVPROC) (void); -typedef void (APIENTRY *glResumeTransformFeedbackNVPROC) (void); -typedef void (APIENTRY *glDrawTransformFeedbackNVPROC) (jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_glBindTransformFeedbackNV(JNIEnv *__env, jclass clazz, jint target, jint id) { - glBindTransformFeedbackNVPROC glBindTransformFeedbackNV = (glBindTransformFeedbackNVPROC)tlsGetFunction(2169); - UNUSED_PARAM(clazz) - glBindTransformFeedbackNV(target, id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglDeleteTransformFeedbacksNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glDeleteTransformFeedbacksNVPROC glDeleteTransformFeedbacksNV = (glDeleteTransformFeedbacksNVPROC)tlsGetFunction(2170); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glDeleteTransformFeedbacksNV(n, ids); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglGenTransformFeedbacksNV__IJ(JNIEnv *__env, jclass clazz, jint n, jlong idsAddress) { - glGenTransformFeedbacksNVPROC glGenTransformFeedbacksNV = (glGenTransformFeedbacksNVPROC)tlsGetFunction(2171); - uintptr_t ids = (uintptr_t)idsAddress; - UNUSED_PARAM(clazz) - glGenTransformFeedbacksNV(n, ids); -} - -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_glIsTransformFeedbackNV(JNIEnv *__env, jclass clazz, jint id) { - glIsTransformFeedbackNVPROC glIsTransformFeedbackNV = (glIsTransformFeedbackNVPROC)tlsGetFunction(2172); - UNUSED_PARAM(clazz) - return glIsTransformFeedbackNV(id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_glPauseTransformFeedbackNV(JNIEnv *__env, jclass clazz) { - glPauseTransformFeedbackNVPROC glPauseTransformFeedbackNV = (glPauseTransformFeedbackNVPROC)tlsGetFunction(2173); - UNUSED_PARAM(clazz) - glPauseTransformFeedbackNV(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_glResumeTransformFeedbackNV(JNIEnv *__env, jclass clazz) { - glResumeTransformFeedbackNVPROC glResumeTransformFeedbackNV = (glResumeTransformFeedbackNVPROC)tlsGetFunction(2174); - UNUSED_PARAM(clazz) - glResumeTransformFeedbackNV(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_glDrawTransformFeedbackNV(JNIEnv *__env, jclass clazz, jint mode, jint id) { - glDrawTransformFeedbackNVPROC glDrawTransformFeedbackNV = (glDrawTransformFeedbackNVPROC)tlsGetFunction(2175); - UNUSED_PARAM(clazz) - glDrawTransformFeedbackNV(mode, id); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexArrayRange.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexArrayRange.c deleted file mode 100644 index 8b2445df..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexArrayRange.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexArrayRangeNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glFlushVertexArrayRangeNVPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_nglVertexArrayRangeNV(JNIEnv *__env, jclass clazz, jint length, jlong pointerAddress) { - glVertexArrayRangeNVPROC glVertexArrayRangeNV = (glVertexArrayRangeNVPROC)tlsGetFunction(2176); - uintptr_t pointer = (uintptr_t)pointerAddress; - UNUSED_PARAM(clazz) - glVertexArrayRangeNV(length, pointer); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_glFlushVertexArrayRangeNV(JNIEnv *__env, jclass clazz) { - glFlushVertexArrayRangeNVPROC glFlushVertexArrayRangeNV = (glFlushVertexArrayRangeNVPROC)tlsGetFunction(2177); - UNUSED_PARAM(clazz) - glFlushVertexArrayRangeNV(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexAttribInteger64bit.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexAttribInteger64bit.c deleted file mode 100644 index b368d8c9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexAttribInteger64bit.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glVertexAttribL1i64NVPROC) (jint, jlong); -typedef void (APIENTRY *glVertexAttribL2i64NVPROC) (jint, jlong, jlong); -typedef void (APIENTRY *glVertexAttribL3i64NVPROC) (jint, jlong, jlong, jlong); -typedef void (APIENTRY *glVertexAttribL4i64NVPROC) (jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glVertexAttribL1i64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL2i64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL3i64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL4i64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL1ui64NVPROC) (jint, jlong); -typedef void (APIENTRY *glVertexAttribL2ui64NVPROC) (jint, jlong, jlong); -typedef void (APIENTRY *glVertexAttribL3ui64NVPROC) (jint, jlong, jlong, jlong); -typedef void (APIENTRY *glVertexAttribL4ui64NVPROC) (jint, jlong, jlong, jlong, jlong); -typedef void (APIENTRY *glVertexAttribL1ui64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL2ui64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL3ui64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribL4ui64vNVPROC) (jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribLi64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glGetVertexAttribLui64vNVPROC) (jint, jint, uintptr_t); -typedef void (APIENTRY *glVertexAttribLFormatNVPROC) (jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL1i64NV(JNIEnv *__env, jclass clazz, jint index, jlong x) { - glVertexAttribL1i64NVPROC glVertexAttribL1i64NV = (glVertexAttribL1i64NVPROC)tlsGetFunction(2178); - UNUSED_PARAM(clazz) - glVertexAttribL1i64NV(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL2i64NV(JNIEnv *__env, jclass clazz, jint index, jlong x, jlong y) { - glVertexAttribL2i64NVPROC glVertexAttribL2i64NV = (glVertexAttribL2i64NVPROC)tlsGetFunction(2179); - UNUSED_PARAM(clazz) - glVertexAttribL2i64NV(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL3i64NV(JNIEnv *__env, jclass clazz, jint index, jlong x, jlong y, jlong z) { - glVertexAttribL3i64NVPROC glVertexAttribL3i64NV = (glVertexAttribL3i64NVPROC)tlsGetFunction(2180); - UNUSED_PARAM(clazz) - glVertexAttribL3i64NV(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL4i64NV(JNIEnv *__env, jclass clazz, jint index, jlong x, jlong y, jlong z, jlong w) { - glVertexAttribL4i64NVPROC glVertexAttribL4i64NV = (glVertexAttribL4i64NVPROC)tlsGetFunction(2181); - UNUSED_PARAM(clazz) - glVertexAttribL4i64NV(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL1i64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL1i64vNVPROC glVertexAttribL1i64vNV = (glVertexAttribL1i64vNVPROC)tlsGetFunction(2182); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL1i64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL2i64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL2i64vNVPROC glVertexAttribL2i64vNV = (glVertexAttribL2i64vNVPROC)tlsGetFunction(2183); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL2i64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL3i64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL3i64vNVPROC glVertexAttribL3i64vNV = (glVertexAttribL3i64vNVPROC)tlsGetFunction(2184); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL3i64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL4i64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL4i64vNVPROC glVertexAttribL4i64vNV = (glVertexAttribL4i64vNVPROC)tlsGetFunction(2185); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL4i64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL1ui64NV(JNIEnv *__env, jclass clazz, jint index, jlong x) { - glVertexAttribL1ui64NVPROC glVertexAttribL1ui64NV = (glVertexAttribL1ui64NVPROC)tlsGetFunction(2186); - UNUSED_PARAM(clazz) - glVertexAttribL1ui64NV(index, x); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL2ui64NV(JNIEnv *__env, jclass clazz, jint index, jlong x, jlong y) { - glVertexAttribL2ui64NVPROC glVertexAttribL2ui64NV = (glVertexAttribL2ui64NVPROC)tlsGetFunction(2187); - UNUSED_PARAM(clazz) - glVertexAttribL2ui64NV(index, x, y); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL3ui64NV(JNIEnv *__env, jclass clazz, jint index, jlong x, jlong y, jlong z) { - glVertexAttribL3ui64NVPROC glVertexAttribL3ui64NV = (glVertexAttribL3ui64NVPROC)tlsGetFunction(2188); - UNUSED_PARAM(clazz) - glVertexAttribL3ui64NV(index, x, y, z); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribL4ui64NV(JNIEnv *__env, jclass clazz, jint index, jlong x, jlong y, jlong z, jlong w) { - glVertexAttribL4ui64NVPROC glVertexAttribL4ui64NV = (glVertexAttribL4ui64NVPROC)tlsGetFunction(2189); - UNUSED_PARAM(clazz) - glVertexAttribL4ui64NV(index, x, y, z, w); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL1ui64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL1ui64vNVPROC glVertexAttribL1ui64vNV = (glVertexAttribL1ui64vNVPROC)tlsGetFunction(2190); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL1ui64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL2ui64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL2ui64vNVPROC glVertexAttribL2ui64vNV = (glVertexAttribL2ui64vNVPROC)tlsGetFunction(2191); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL2ui64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL3ui64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL3ui64vNVPROC glVertexAttribL3ui64vNV = (glVertexAttribL3ui64vNVPROC)tlsGetFunction(2192); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL3ui64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL4ui64vNV__IJ(JNIEnv *__env, jclass clazz, jint index, jlong vAddress) { - glVertexAttribL4ui64vNVPROC glVertexAttribL4ui64vNV = (glVertexAttribL4ui64vNVPROC)tlsGetFunction(2193); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glVertexAttribL4ui64vNV(index, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglGetVertexAttribLi64vNV__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribLi64vNVPROC glGetVertexAttribLi64vNV = (glGetVertexAttribLi64vNVPROC)tlsGetFunction(2194); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribLi64vNV(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglGetVertexAttribLui64vNV__IIJ(JNIEnv *__env, jclass clazz, jint index, jint pname, jlong paramsAddress) { - glGetVertexAttribLui64vNVPROC glGetVertexAttribLui64vNV = (glGetVertexAttribLui64vNVPROC)tlsGetFunction(2195); - uintptr_t params = (uintptr_t)paramsAddress; - UNUSED_PARAM(clazz) - glGetVertexAttribLui64vNV(index, pname, params); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_glVertexAttribLFormatNV(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jint stride) { - glVertexAttribLFormatNVPROC glVertexAttribLFormatNV = (glVertexAttribLFormatNVPROC)tlsGetFunction(2196); - UNUSED_PARAM(clazz) - glVertexAttribLFormatNV(index, size, type, stride); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexBufferUnifiedMemory.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexBufferUnifiedMemory.c deleted file mode 100644 index 610b4adc..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVVertexBufferUnifiedMemory.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBufferAddressRangeNVPROC) (jint, jint, jlong, uintptr_t); -typedef void (APIENTRY *glVertexFormatNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glNormalFormatNVPROC) (jint, jint); -typedef void (APIENTRY *glColorFormatNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glIndexFormatNVPROC) (jint, jint); -typedef void (APIENTRY *glTexCoordFormatNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glEdgeFlagFormatNVPROC) (jint); -typedef void (APIENTRY *glSecondaryColorFormatNVPROC) (jint, jint, jint); -typedef void (APIENTRY *glFogCoordFormatNVPROC) (jint, jint); -typedef void (APIENTRY *glVertexAttribFormatNVPROC) (jint, jint, jint, jboolean, jint); -typedef void (APIENTRY *glVertexAttribIFormatNVPROC) (jint, jint, jint, jint); -typedef void (APIENTRY *glGetIntegerui64i_vNVPROC) (jint, jint, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glBufferAddressRangeNV(JNIEnv *__env, jclass clazz, jint pname, jint index, jlong address, jlong length) { - glBufferAddressRangeNVPROC glBufferAddressRangeNV = (glBufferAddressRangeNVPROC)tlsGetFunction(2197); - UNUSED_PARAM(clazz) - glBufferAddressRangeNV(pname, index, address, (uintptr_t)length); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glVertexFormatNV(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride) { - glVertexFormatNVPROC glVertexFormatNV = (glVertexFormatNVPROC)tlsGetFunction(2198); - UNUSED_PARAM(clazz) - glVertexFormatNV(size, type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glNormalFormatNV(JNIEnv *__env, jclass clazz, jint type, jint stride) { - glNormalFormatNVPROC glNormalFormatNV = (glNormalFormatNVPROC)tlsGetFunction(2199); - UNUSED_PARAM(clazz) - glNormalFormatNV(type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glColorFormatNV(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride) { - glColorFormatNVPROC glColorFormatNV = (glColorFormatNVPROC)tlsGetFunction(2200); - UNUSED_PARAM(clazz) - glColorFormatNV(size, type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glIndexFormatNV(JNIEnv *__env, jclass clazz, jint type, jint stride) { - glIndexFormatNVPROC glIndexFormatNV = (glIndexFormatNVPROC)tlsGetFunction(2201); - UNUSED_PARAM(clazz) - glIndexFormatNV(type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glTexCoordFormatNV(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride) { - glTexCoordFormatNVPROC glTexCoordFormatNV = (glTexCoordFormatNVPROC)tlsGetFunction(2202); - UNUSED_PARAM(clazz) - glTexCoordFormatNV(size, type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glEdgeFlagFormatNV(JNIEnv *__env, jclass clazz, jint stride) { - glEdgeFlagFormatNVPROC glEdgeFlagFormatNV = (glEdgeFlagFormatNVPROC)tlsGetFunction(2203); - UNUSED_PARAM(clazz) - glEdgeFlagFormatNV(stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glSecondaryColorFormatNV(JNIEnv *__env, jclass clazz, jint size, jint type, jint stride) { - glSecondaryColorFormatNVPROC glSecondaryColorFormatNV = (glSecondaryColorFormatNVPROC)tlsGetFunction(2204); - UNUSED_PARAM(clazz) - glSecondaryColorFormatNV(size, type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glFogCoordFormatNV(JNIEnv *__env, jclass clazz, jint type, jint stride) { - glFogCoordFormatNVPROC glFogCoordFormatNV = (glFogCoordFormatNVPROC)tlsGetFunction(2205); - UNUSED_PARAM(clazz) - glFogCoordFormatNV(type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glVertexAttribFormatNV(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride) { - glVertexAttribFormatNVPROC glVertexAttribFormatNV = (glVertexAttribFormatNVPROC)tlsGetFunction(2206); - UNUSED_PARAM(clazz) - glVertexAttribFormatNV(index, size, type, normalized, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_glVertexAttribIFormatNV(JNIEnv *__env, jclass clazz, jint index, jint size, jint type, jint stride) { - glVertexAttribIFormatNVPROC glVertexAttribIFormatNV = (glVertexAttribIFormatNVPROC)tlsGetFunction(2207); - UNUSED_PARAM(clazz) - glVertexAttribIFormatNV(index, size, type, stride); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglGetIntegerui64i_1vNV__IIJ(JNIEnv *__env, jclass clazz, jint value, jint index, jlong resultAddress) { - glGetIntegerui64i_vNVPROC glGetIntegerui64i_vNV = (glGetIntegerui64i_vNVPROC)tlsGetFunction(2208); - uintptr_t result = (uintptr_t)resultAddress; - UNUSED_PARAM(clazz) - glGetIntegerui64i_vNV(value, index, result); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVViewportSwizzle.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVViewportSwizzle.c deleted file mode 100644 index 8c3df276..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVViewportSwizzle.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glViewportSwizzleNVPROC) (jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVViewportSwizzle_glViewportSwizzleNV(JNIEnv *__env, jclass clazz, jint index, jint swizzlex, jint swizzley, jint swizzlez, jint swizzlew) { - glViewportSwizzleNVPROC glViewportSwizzleNV = (glViewportSwizzleNVPROC)tlsGetFunction(2209); - UNUSED_PARAM(clazz) - glViewportSwizzleNV(index, swizzlex, swizzley, swizzlez, swizzlew); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXConditionalRender.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXConditionalRender.c deleted file mode 100644 index 44bae4b7..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXConditionalRender.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glBeginConditionalRenderNVXPROC) (jint); -typedef void (APIENTRY *glEndConditionalRenderNVXPROC) (void); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXConditionalRender_glBeginConditionalRenderNVX(JNIEnv *__env, jclass clazz, jint id) { - glBeginConditionalRenderNVXPROC glBeginConditionalRenderNVX = (glBeginConditionalRenderNVXPROC)tlsGetFunction(2210); - UNUSED_PARAM(clazz) - glBeginConditionalRenderNVX(id); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXConditionalRender_glEndConditionalRenderNVX(JNIEnv *__env, jclass clazz) { - glEndConditionalRenderNVXPROC glEndConditionalRenderNVX = (glEndConditionalRenderNVXPROC)tlsGetFunction(2211); - UNUSED_PARAM(clazz) - glEndConditionalRenderNVX(); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXGpuMulticast2.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXGpuMulticast2.c deleted file mode 100644 index 1dfe7e6f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXGpuMulticast2.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jint (APIENTRY *glAsyncCopyImageSubDataNVXPROC) (jint, uintptr_t, uintptr_t, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t, uintptr_t); -typedef uintptr_t (APIENTRY *glAsyncCopyBufferSubDataNVXPROC) (jint, uintptr_t, uintptr_t, jint, jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glUploadGpuMaskNVXPROC) (jint); -typedef void (APIENTRY *glMulticastViewportArrayvNVXPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMulticastScissorArrayvNVXPROC) (jint, jint, jint, uintptr_t); -typedef void (APIENTRY *glMulticastViewportPositionWScaleNVXPROC) (jint, jint, jfloat, jfloat); - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVXGpuMulticast2_nglAsyncCopyImageSubDataNVX__IJJIIIIIIIIIIIIIIIIIIJJ(JNIEnv *__env, jclass clazz, jint waitSemaphoreCount, jlong waitSemaphoreArrayAddress, jlong waitValueArrayAddress, jint srcGpu, jint dstGpuMask, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint srcWidth, jint srcHeight, jint srcDepth, jint signalSemaphoreCount, jlong signalSemaphoreArrayAddress, jlong signalValueArrayAddress) { - glAsyncCopyImageSubDataNVXPROC glAsyncCopyImageSubDataNVX = (glAsyncCopyImageSubDataNVXPROC)tlsGetFunction(2212); - uintptr_t waitSemaphoreArray = (uintptr_t)waitSemaphoreArrayAddress; - uintptr_t waitValueArray = (uintptr_t)waitValueArrayAddress; - uintptr_t signalSemaphoreArray = (uintptr_t)signalSemaphoreArrayAddress; - uintptr_t signalValueArray = (uintptr_t)signalValueArrayAddress; - UNUSED_PARAM(clazz) - return glAsyncCopyImageSubDataNVX(waitSemaphoreCount, waitSemaphoreArray, waitValueArray, srcGpu, dstGpuMask, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth, signalSemaphoreCount, signalSemaphoreArray, signalValueArray); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVXGpuMulticast2_nglAsyncCopyBufferSubDataNVX__IJJIIIIJJJIJJ(JNIEnv *__env, jclass clazz, jint waitSemaphoreCount, jlong waitSemaphoreArrayAddress, jlong fenceValueArrayAddress, jint readGpu, jint writeGpuMask, jint readBuffer, jint writeBuffer, jlong readOffset, jlong writeOffset, jlong size, jint signalSemaphoreCount, jlong signalSemaphoreArrayAddress, jlong signalValueArrayAddress) { - glAsyncCopyBufferSubDataNVXPROC glAsyncCopyBufferSubDataNVX = (glAsyncCopyBufferSubDataNVXPROC)tlsGetFunction(2213); - uintptr_t waitSemaphoreArray = (uintptr_t)waitSemaphoreArrayAddress; - uintptr_t fenceValueArray = (uintptr_t)fenceValueArrayAddress; - uintptr_t signalSemaphoreArray = (uintptr_t)signalSemaphoreArrayAddress; - uintptr_t signalValueArray = (uintptr_t)signalValueArrayAddress; - UNUSED_PARAM(clazz) - return (jlong)glAsyncCopyBufferSubDataNVX(waitSemaphoreCount, waitSemaphoreArray, fenceValueArray, readGpu, writeGpuMask, readBuffer, writeBuffer, (uintptr_t)readOffset, (uintptr_t)writeOffset, (uintptr_t)size, signalSemaphoreCount, signalSemaphoreArray, signalValueArray); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXGpuMulticast2_glUploadGpuMaskNVX(JNIEnv *__env, jclass clazz, jint mask) { - glUploadGpuMaskNVXPROC glUploadGpuMaskNVX = (glUploadGpuMaskNVXPROC)tlsGetFunction(2214); - UNUSED_PARAM(clazz) - glUploadGpuMaskNVX(mask); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXGpuMulticast2_nglMulticastViewportArrayvNVX__IIIJ(JNIEnv *__env, jclass clazz, jint gpu, jint first, jint count, jlong vAddress) { - glMulticastViewportArrayvNVXPROC glMulticastViewportArrayvNVX = (glMulticastViewportArrayvNVXPROC)tlsGetFunction(2215); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMulticastViewportArrayvNVX(gpu, first, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXGpuMulticast2_nglMulticastScissorArrayvNVX__IIIJ(JNIEnv *__env, jclass clazz, jint gpu, jint first, jint count, jlong vAddress) { - glMulticastScissorArrayvNVXPROC glMulticastScissorArrayvNVX = (glMulticastScissorArrayvNVXPROC)tlsGetFunction(2216); - uintptr_t v = (uintptr_t)vAddress; - UNUSED_PARAM(clazz) - glMulticastScissorArrayvNVX(gpu, first, count, v); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXGpuMulticast2_glMulticastViewportPositionWScaleNVX(JNIEnv *__env, jclass clazz, jint gpu, jint index, jfloat xcoeff, jfloat ycoeff) { - glMulticastViewportPositionWScaleNVXPROC glMulticastViewportPositionWScaleNVX = (glMulticastViewportPositionWScaleNVXPROC)tlsGetFunction(2217); - UNUSED_PARAM(clazz) - glMulticastViewportPositionWScaleNVX(gpu, index, xcoeff, ycoeff); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXProgressFence.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXProgressFence.c deleted file mode 100644 index 706656fb..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_NVXProgressFence.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef jint (APIENTRY *glCreateProgressFenceNVXPROC) (void); -typedef void (APIENTRY *glSignalSemaphoreui64NVXPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glWaitSemaphoreui64NVXPROC) (jint, jint, uintptr_t, uintptr_t); -typedef void (APIENTRY *glClientWaitSemaphoreui64NVXPROC) (jint, uintptr_t, uintptr_t); - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVXProgressFence_glCreateProgressFenceNVX(JNIEnv *__env, jclass clazz) { - glCreateProgressFenceNVXPROC glCreateProgressFenceNVX = (glCreateProgressFenceNVXPROC)tlsGetFunction(2218); - UNUSED_PARAM(clazz) - return glCreateProgressFenceNVX(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXProgressFence_nglSignalSemaphoreui64NVX__IIJJ(JNIEnv *__env, jclass clazz, jint signalGpu, jint fenceObjectCount, jlong semaphoreArrayAddress, jlong fenceValueArrayAddress) { - glSignalSemaphoreui64NVXPROC glSignalSemaphoreui64NVX = (glSignalSemaphoreui64NVXPROC)tlsGetFunction(2219); - uintptr_t semaphoreArray = (uintptr_t)semaphoreArrayAddress; - uintptr_t fenceValueArray = (uintptr_t)fenceValueArrayAddress; - UNUSED_PARAM(clazz) - glSignalSemaphoreui64NVX(signalGpu, fenceObjectCount, semaphoreArray, fenceValueArray); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXProgressFence_nglWaitSemaphoreui64NVX__IIJJ(JNIEnv *__env, jclass clazz, jint waitGpu, jint fenceObjectCount, jlong semaphoreArrayAddress, jlong fenceValueArrayAddress) { - glWaitSemaphoreui64NVXPROC glWaitSemaphoreui64NVX = (glWaitSemaphoreui64NVXPROC)tlsGetFunction(2220); - uintptr_t semaphoreArray = (uintptr_t)semaphoreArrayAddress; - uintptr_t fenceValueArray = (uintptr_t)fenceValueArrayAddress; - UNUSED_PARAM(clazz) - glWaitSemaphoreui64NVX(waitGpu, fenceObjectCount, semaphoreArray, fenceValueArray); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVXProgressFence_nglClientWaitSemaphoreui64NVX__IJJ(JNIEnv *__env, jclass clazz, jint fenceObjectCount, jlong semaphoreArrayAddress, jlong fenceValueArrayAddress) { - glClientWaitSemaphoreui64NVXPROC glClientWaitSemaphoreui64NVX = (glClientWaitSemaphoreui64NVXPROC)tlsGetFunction(2221); - uintptr_t semaphoreArray = (uintptr_t)semaphoreArrayAddress; - uintptr_t fenceValueArray = (uintptr_t)fenceValueArrayAddress; - UNUSED_PARAM(clazz) - glClientWaitSemaphoreui64NVX(fenceObjectCount, semaphoreArray, fenceValueArray); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_OVRMultiview.c b/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_OVRMultiview.c deleted file mode 100644 index 0b403ef1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/opengl/org_lwjgl_opengl_OVRMultiview.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "opengl.h" - -typedef void (APIENTRY *glFramebufferTextureMultiviewOVRPROC) (jint, jint, jint, jint, jint, jint); -typedef void (APIENTRY *glNamedFramebufferTextureMultiviewOVRPROC) (jint, jint, jint, jint, jint, jint); - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_OVRMultiview_glFramebufferTextureMultiviewOVR(JNIEnv *__env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint baseViewIndex, jint numViews) { - glFramebufferTextureMultiviewOVRPROC glFramebufferTextureMultiviewOVR = (glFramebufferTextureMultiviewOVRPROC)tlsGetFunction(2222); - UNUSED_PARAM(clazz) - glFramebufferTextureMultiviewOVR(target, attachment, texture, level, baseViewIndex, numViews); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_OVRMultiview_glNamedFramebufferTextureMultiviewOVR(JNIEnv *__env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint baseViewIndex, jint numViews) { - glNamedFramebufferTextureMultiviewOVRPROC glNamedFramebufferTextureMultiviewOVR = (glNamedFramebufferTextureMultiviewOVRPROC)tlsGetFunction(2223); - UNUSED_PARAM(clazz) - glNamedFramebufferTextureMultiviewOVR(framebuffer, attachment, texture, level, baseViewIndex, numViews); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_Callback.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_Callback.c deleted file mode 100644 index 87c30fab..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_Callback.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#include "common_tools.h" -DISABLE_WARNINGS() -#include "ffi.h" -ENABLE_WARNINGS() - -static jmethodID javaCallback; - -typedef struct LWJGLCallback { - jweak reference; - const char* debug; -} LWJGLCallback; - -#if LWJGL_WINDOWS - #define noinline __declspec(noinline) -#else - #define noinline __attribute__((noinline)) -#endif - -noinline static void asyncCallbackException(JNIEnv* env) { - fprintf(stderr, "[LWJGL] Exception in callback that was invoked asynchronously from a native thread.\n"); - fflush(stderr); - - (*env)->ExceptionDescribe(env); - (*env)->ExceptionClear(env); -} - -static void cbHandler(ffi_cif *cif, void *ret, void **args, void *user_data) { - jboolean async; - JNIEnv* env = getEnv(&async); - - UNUSED_PARAM(cif) - UNUSED_PARAM(ret) - - // Invoke the Java callback - (*env)->CallVoidMethod(env, - (jobject)user_data, - javaCallback, - (jlong)(uintptr_t)ret, - (jlong)(uintptr_t)args - ); - - // Check for exception - if ((*env)->ExceptionCheck(env) && async) { - asyncCallbackException(env); - } -} - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_Callback_getCallbackHandler(JNIEnv *env, jclass clazz, jobject method) { - UNUSED_PARAMS(env, clazz) - - javaCallback = (*env)->FromReflectedMethod(env, method); - return (jlong)(uintptr_t)&cbHandler; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_JNI.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_JNI.c deleted file mode 100644 index 3b1dbfa3..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_JNI.c +++ /dev/null @@ -1,5128 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" - -#ifdef LWJGL_WINDOWS - #define APIENTRY __stdcall -#else - #define APIENTRY -#endif - -JNIEXPORT jshort JNICALL Java_org_lwjgl_system_JNI_invokePC__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jshort)((uint16_t (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jdouble JNICALL Java_org_lwjgl_system_JNI_invokeD__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jdouble (*) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT jdouble JNICALL Java_org_lwjgl_system_JNI_invokeD__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jdouble (*) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jdouble JNICALL Java_org_lwjgl_system_JNI_invokePD__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jdouble (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jdouble JNICALL Java_org_lwjgl_system_JNI_invokePD__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jdouble (*) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jfloat JNICALL Java_org_lwjgl_system_JNI_invokeF__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jfloat (*) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jfloat JNICALL Java_org_lwjgl_system_JNI_invokePF__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jfloat (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jfloat JNICALL Java_org_lwjgl_system_JNI_invokePF__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jfloat (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jfloat JNICALL Java_org_lwjgl_system_JNI_invokePF__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jfloat (*) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokeI__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokeI__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokeI__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokeI__IIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePI__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePI__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePI__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePI__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePI__JIZJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jboolean param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePI__JIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNI__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNI__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, long))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (long)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNI__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__IJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JJZJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jboolean param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JZJJ(JNIEnv *__env, jclass clazz, jlong param0, jboolean param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jboolean, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIJZJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jboolean param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIZJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jboolean param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JJZZJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jboolean param2, jboolean param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jboolean, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__JIIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePCPI__JSJJ(JNIEnv *__env, jclass clazz, jlong param0, jshort param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uint16_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uint16_t)param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNNI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNPI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNPI__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNPI__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNI__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (long)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNNI__JJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, long, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIIIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPI__JIIJIJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jint param4, jlong param5, jint param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, uintptr_t, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, param6, param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNPPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNNI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, long, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (long)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPNI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (long)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNNPI__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, jint, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, param2, (long)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPNI__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (long)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJIJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JIIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JIIJIJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jint param4, jlong param5, jlong param6, jint param7, jint param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, (uintptr_t)param6, param7, param8); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNNPPI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, long, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNNPI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, long, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (long)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPNNI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, long, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (long)param3, (long)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPNI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (long)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePJPPNI__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jlong, uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (long)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNPPI__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, long, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (long)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNPPI__JJJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, long, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPNJI__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t, long, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (long)param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPNNI__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t, long, long))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (long)param4, (long)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPNPI__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (long)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPNI__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (long)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPNI__JJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4, (long)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__JJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__JJJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__JJJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNPPPI__JIIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, long, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (long)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__JJIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__JJIJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, jint, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__JJJIIIFJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jint param5, jfloat param6, jlong param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, jint, jint, jint, jfloat, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6, (uintptr_t)param7, (uintptr_t)param8); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPPI__JJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPNPPPI__JIJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, long, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (long)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPPI__JIJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNNPPPI__JJJIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, long, long, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2, param3, param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPPI__JIIJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPPPI__JJJIJFFJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jfloat param5, jfloat param6, jlong param7, jlong param8, jlong param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (*) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, jfloat, jfloat, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4, param5, param6, (uintptr_t)param7, (uintptr_t)param8, (uintptr_t)param9); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeJ__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (*) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePJ__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePJ__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeNN__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (long))(uintptr_t)__functionAddress)((long)param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePN__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePN__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeNNN__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (long, long))(uintptr_t)__functionAddress)((long)param0, (long)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPN__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeNNNN__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (long, long, long))(uintptr_t)__functionAddress)((long)param0, (long)param1, (long)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePNPN__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePNPN__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t, long, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPNN__JIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t, jint, jint, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (long)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePNPNN__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t, long, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2, (long)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePNPNPN__JJIIIIIIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jlong param9, jlong param10, jlong param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (*) (uintptr_t, long, jint, jint, jint, jint, jint, jint, jint, uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)param9, (long)param10, (uintptr_t)param11); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeP__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeP__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeP__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__IIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__JIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePP__JIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePNP__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPP__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePCP__JSZJ(JNIEnv *__env, jclass clazz, jlong param0, jshort param1, jboolean param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uint16_t, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uint16_t)param1, param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPP__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPP__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPP__JIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPP__JJZZJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jboolean param2, jboolean param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, jboolean, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPP__JZZJJ(JNIEnv *__env, jclass clazz, jlong param0, jboolean param1, jboolean param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jboolean, jboolean, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPP__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPP__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPP__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPP__IIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPP__JIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPP__JJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokeJPPP__IIIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (jint, jint, jint, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePNNPP__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, long, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPNNP__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, long, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (long)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPPP__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPPP__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPPP__JJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePJPPP__JIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, jint, jint, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePNNNPP__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, long, long, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2, (long)param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPPNP__JJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4, (long)param5); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPPPP__JJJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4, param5, (uintptr_t)param6); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPPPPP__JJJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPPPPPP__JJJJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, param6); -} -JNIEXPORT jbyte JNICALL Java_org_lwjgl_system_JNI_invokeU__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jbyte)((uint8_t (*) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__DJ(JNIEnv *__env, jclass clazz, jdouble param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jdouble))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__FJ(JNIEnv *__env, jclass clazz, jfloat param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jfloat))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jfloat))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdouble param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IFFFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIDDDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdouble param2, jdouble param3, jdouble param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIFFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeV__IIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeJV__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jlong))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JZJ(JNIEnv *__env, jclass clazz, jlong param0, jboolean param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeJV__IIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jlong))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IJZJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jboolean param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, uintptr_t, jboolean))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JDDJ(JNIEnv *__env, jclass clazz, jlong param0, jdouble param1, jdouble param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jdouble, jdouble))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JFFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIDJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jdouble param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jdouble))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIFJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JFFIJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jfloat, jfloat, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIIDJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jdouble param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jdouble))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIIFJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIJIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__JIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePJV__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePNV__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePJV__IJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, uintptr_t, jlong))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePJV__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJZJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jboolean param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePBV__JIIBJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jbyte param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jbyte))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePCV__JIISJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jshort param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, uint16_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uint16_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__IIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePSV__JIISJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jshort param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jshort))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePUV__JIIBJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jbyte param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, uint8_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uint8_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__IIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__IIIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JIIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJFFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JJFFFFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePNNV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, long, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePNPV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPNV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__IJJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokeJJJV__IIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, jlong, jlong, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePNNV__JJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, long, jint, jint, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, param2, param3, (long)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__IIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJJFFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jfloat param3, jfloat param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJJZZJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jboolean param3, jboolean param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jboolean, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JIIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JIJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JIJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJJIZZJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jboolean param4, jboolean param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jint, jboolean, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JIIJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jint param4, jlong param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJFFFFJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJJFFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJFFFFFFJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5, param6, param7, (uintptr_t)param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__JJJFFFFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jfloat param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6, param7, param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePNPPV__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, long, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JJJFFJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jfloat param3, jfloat param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JJJFFFFJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JJJIIIFJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jint param5, jfloat param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jint, jint, jint, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPV__JJJFFFFFFJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jfloat param8, jlong param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6, param7, param8, (uintptr_t)param9); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__IJJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__JJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__JIIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__JJIJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__JJIJJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jint param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (*) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokeZ__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePZ__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePZ__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePZ__JZJ(JNIEnv *__env, jclass clazz, jlong param0, jboolean param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePZ__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePZ__JIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPZ__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPZ__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPZ__JIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPZ__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPZ__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPZ__JJJZIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jboolean param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t, jboolean, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPPZ__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPPZ__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPUPZ__JJJBJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jbyte param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t, uint8_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uint8_t)param3, (uintptr_t)param4); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPPPZ__JJJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPPPZ__JJJJJZIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jboolean param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jboolean, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5, param6); -} -JNIEXPORT jshort JNICALL Java_org_lwjgl_system_JNI_callC__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jshort)((uint16_t (APIENTRY *) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jfloat JNICALL Java_org_lwjgl_system_JNI_callF__IIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jfloat (APIENTRY *) (jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT jfloat JNICALL Java_org_lwjgl_system_JNI_callPF__JFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jfloat (APIENTRY *) (uintptr_t, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callI__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callI__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callI__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callI__IIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JFFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JFIJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jfloat, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIFJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callJI__IJIIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jlong, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIFFJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIIZJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jboolean param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIFFIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, jfloat, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IJIIFIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jint param3, jfloat param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, uintptr_t, jint, jint, jfloat, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, param3, param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JIIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IIJIIIIFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jfloat param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint, jfloat))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, param6, param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__JFFFFFFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jfloat param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, param7, param8); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJI__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJI__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJI__JJFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJI__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__IJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JFJJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__IIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIFJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJFFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJFIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jfloat, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIFFJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJIIZJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jboolean param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, jboolean))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__IJIIFJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jint param3, jfloat param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, uintptr_t, jint, jint, jfloat, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIFFFJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JJIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIFFFIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, jfloat, jfloat, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIIIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIFFFFIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, jfloat, jfloat, jfloat, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIIIIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__IIJJIIIIFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jint param6, jint param7, jfloat param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint, jint, jint, jfloat))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5, param6, param7, param8); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIFFFFFIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jint param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, param7, (uintptr_t)param8); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIIFFFFFIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jint param8, jlong param9, jint param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)param9, param10); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JIIIIIIJIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong param7, jint param8, jint param9, jint param10, jint param11, jint param12, jint param13, jint param14, jint param15, jint param16, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, jint, uintptr_t, jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, (uintptr_t)param7, param8, param9, param10, param11, param12, param13, param14, param15, param16); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJI__JJJFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJI__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJI__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJI__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPNI__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (long)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJI__JJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jint, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JIJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jlong, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJI__JIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__IJIJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JFFIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jint param3, jint param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jfloat, jfloat, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIIIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIJJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5, param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJIIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callJPPI__IIIIIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, jint, jint, jint, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callJJPPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jlong, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJJI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPNPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJJI__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jlong, jlong, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JIJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JIJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4, param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JIIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__IJJIIIIIIIIIIIIIIIIIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jint param11, jint param12, jint param13, jint param14, jint param15, jint param16, jint param17, jint param18, jint param19, jint param20, jlong param21, jlong param22, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, (uintptr_t)param21, (uintptr_t)param22); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJPPI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPPI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJPPI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJJPI__JJJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPPI__JJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JJJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JJJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__IIJJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JIIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JIJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JIJJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callJPPPPI__IIJJIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, jlong, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPJI__JJIIJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong param5, jlong param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jint, jint, uintptr_t, uintptr_t, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, param6, param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJJJPI__JJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPJPI__JJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPI__JJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJPPPI__JJJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPPPI__JIJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jlong, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPI__IIJJJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPI__JIJIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPPI__JJJJJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6, param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPPI__JIJIJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jlong param5, jlong param6, jlong param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7, (uintptr_t)param8); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPJPPI__JJJJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPPPI__JIIJJJJIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong param6, jint param7, jlong param8, jlong param9, jlong param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6, param7, (uintptr_t)param8, (uintptr_t)param9, (uintptr_t)param10); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callJ__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (APIENTRY *) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callJ__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (APIENTRY *) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callJ__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (APIENTRY *) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callJ__IIZIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jboolean param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (APIENTRY *) (jint, jint, jboolean, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPJ__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPJJ__JJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jlong (APIENTRY *) (uintptr_t, jlong, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPN__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((long (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callP__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callP__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callP__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callP__IFFFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP__IIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP__IJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP__IIJIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPNP__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__IJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__IJJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__IIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPNP__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPNPP__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPJPP__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPJPPP__JJJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPPPPP__IJJIIIIJJJIJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jlong param7, jlong param8, jlong param9, jint param10, jlong param11, jlong param12, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return (jlong)((uintptr_t (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5, param6, (uintptr_t)param7, (uintptr_t)param8, (uintptr_t)param9, param10, (uintptr_t)param11, (uintptr_t)param12); -} -JNIEXPORT jshort JNICALL Java_org_lwjgl_system_JNI_callS__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jshort (APIENTRY *) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__J(JNIEnv *__env, jclass clazz, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (void))(uintptr_t)__functionAddress)(); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__DJ(JNIEnv *__env, jclass clazz, jdouble param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jdouble))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__FJ(JNIEnv *__env, jclass clazz, jfloat param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jfloat))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__ZJ(JNIEnv *__env, jclass clazz, jboolean param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jboolean))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__DDJ(JNIEnv *__env, jclass clazz, jdouble param0, jdouble param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__FFJ(JNIEnv *__env, jclass clazz, jfloat param0, jfloat param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__FZJ(JNIEnv *__env, jclass clazz, jfloat param0, jboolean param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jfloat, jboolean))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IDJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jfloat))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IZJ(JNIEnv *__env, jclass clazz, jint param0, jboolean param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jboolean))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__DDDJ(JNIEnv *__env, jclass clazz, jdouble param0, jdouble param1, jdouble param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__FFFJ(JNIEnv *__env, jclass clazz, jfloat param0, jfloat param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IDDJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IFFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdouble param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jboolean param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__DDDDJ(JNIEnv *__env, jclass clazz, jdouble param0, jdouble param1, jdouble param2, jdouble param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jdouble, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__FFFFJ(JNIEnv *__env, jclass clazz, jfloat param0, jfloat param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IDDDJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jdouble param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IFFFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIDDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdouble param2, jdouble param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIFIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jfloat, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jdouble param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIZIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jboolean param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jboolean, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__ZZZZJ(JNIEnv *__env, jclass clazz, jboolean param0, jboolean param1, jboolean param2, jboolean param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jboolean, jboolean, jboolean, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IDDDDJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jdouble param3, jdouble param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IFFFFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jfloat param3, jfloat param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIDDDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdouble param2, jdouble param3, jdouble param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIFFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIFIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jfloat param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jfloat, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIZIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jboolean, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IZZZZJ(JNIEnv *__env, jclass clazz, jint param0, jboolean param1, jboolean param2, jboolean param3, jboolean param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jboolean, jboolean, jboolean, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__DDDDDDJ(JNIEnv *__env, jclass clazz, jdouble param0, jdouble param1, jdouble param2, jdouble param3, jdouble param4, jdouble param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jdouble, jdouble, jdouble, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IDDIDDJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jint param3, jdouble param4, jdouble param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble, jdouble, jint, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IFFIFFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jint param3, jfloat param4, jfloat param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jfloat, jfloat, jint, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIDDDDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdouble param2, jdouble param3, jdouble param4, jdouble param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jdouble, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIFFFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jboolean param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIZIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jboolean param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jboolean, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IDDDDDDJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jdouble param3, jdouble param4, jdouble param5, jdouble param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIDDDDJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jdouble param3, jdouble param4, jdouble param5, jdouble param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jdouble, jdouble, jdouble, jdouble))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIFFFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jboolean param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIZIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jboolean, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__FFFFFFFFJ(JNIEnv *__env, jclass clazz, jfloat param0, jfloat param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIFFFFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jfloat, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jboolean param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIIZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jboolean param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIFFFFFFFFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jfloat param8, jfloat param9, jfloat param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jint param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jint param11, jint param12, jint param13, jint param14, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callV__IIIIIIIIIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jint param11, jint param12, jint param13, jint param14, jint param15, jint param16, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jlong))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSV__SJ(JNIEnv *__env, jclass clazz, jshort param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jshort))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callUV__BJ(JNIEnv *__env, jclass clazz, jbyte param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uint8_t))(uintptr_t)__functionAddress)((uint8_t)param0); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callCV__ISJ(JNIEnv *__env, jclass clazz, jint param0, jshort param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uint16_t))(uintptr_t)__functionAddress)(param0, (uint16_t)param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jlong))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jlong, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSV__ISJ(JNIEnv *__env, jclass clazz, jint param0, jshort param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jshort))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jlong))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JFFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IJIIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jlong, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callNV__JIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (long, jint, jint, jint))(uintptr_t)__functionAddress)((long)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIJIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIZJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jboolean param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IJIIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jfloat param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIJIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIJZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jboolean param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIZJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIJIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IJIIIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IZIIJJ(JNIEnv *__env, jclass clazz, jint param0, jboolean param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jboolean, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IDDIIJJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble, jdouble, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IFFIIJJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jfloat, jfloat, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIJZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jboolean param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIJIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIZIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jboolean, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIJIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IZIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jboolean param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jboolean, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIFFFFJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jfloat, jfloat, jfloat, jfloat, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIJIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIJIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIJIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JIIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IIIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IIIIIZIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jboolean param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jboolean, jint, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIZIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jboolean param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jboolean, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IIIIIIZIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jboolean param6, jint param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jboolean, jint, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, (uintptr_t)param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIJIIIIIFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jint param7, jfloat param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint, jint, jfloat))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, param6, param7, param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IDDIIDDIIJJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jint param3, jint param4, jdouble param5, jdouble param6, jint param7, jint param8, jlong param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jdouble, jdouble, jint, jint, jdouble, jdouble, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)param9); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IFFIIFFIIJJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jint param3, jint param4, jfloat param5, jfloat param6, jint param7, jint param8, jlong param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jfloat, jfloat, jint, jint, jfloat, jfloat, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)param9); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jlong param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)param9); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__JIFFFFFFFFFJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloat param2, jfloat param3, jfloat param4, jfloat param5, jfloat param6, jfloat param7, jfloat param8, jfloat param9, jfloat param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jlong, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jlong param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, (uintptr_t)param10); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__JIIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJV__IIIIIIIIIIJZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jlong param10, jboolean param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jlong, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jlong param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, (uintptr_t)param11); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSSV__SSJ(JNIEnv *__env, jclass clazz, jshort param0, jshort param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jshort, jshort))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJJV__IJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jlong, jlong))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPCV__JISJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jshort param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uint16_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uint16_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__JJFJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jfloat))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSSV__ISSJ(JNIEnv *__env, jclass clazz, jint param0, jshort param1, jshort param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jshort, jshort))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJJV__IIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jlong, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJPV__IIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jlong, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJPV__IJIJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__IJIJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, jlong))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__JIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__JJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJIJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJJZJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jboolean param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jboolean))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJV__JJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJJIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJIJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJJIIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJJIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJJIIIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JIJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIJIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJJIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIIIIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIIJIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jint param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIJIFFIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jfloat param5, jfloat param6, jint param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, jfloat, jfloat, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, param5, param6, param7, (uintptr_t)param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIIIIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jint param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, param6, param7, (uintptr_t)param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIIIJIIFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jlong param6, jint param7, jint param8, jfloat param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, uintptr_t, jint, jint, jfloat))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, (uintptr_t)param6, param7, param8, param9); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callBBBV__BBBJ(JNIEnv *__env, jclass clazz, jbyte param0, jbyte param1, jbyte param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jbyte, jbyte, jbyte))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callCCCV__SSSJ(JNIEnv *__env, jclass clazz, jshort param0, jshort param1, jshort param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uint16_t, uint16_t, uint16_t))(uintptr_t)__functionAddress)((uint16_t)param0, (uint16_t)param1, (uint16_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPNV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSSSV__SSSJ(JNIEnv *__env, jclass clazz, jshort param0, jshort param1, jshort param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jshort, jshort, jshort))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callUUUV__BBBJ(JNIEnv *__env, jclass clazz, jbyte param0, jbyte param1, jbyte param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uint8_t, uint8_t, uint8_t))(uintptr_t)__functionAddress)((uint8_t)param0, (uint8_t)param1, (uint8_t)param2); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJJJV__IJJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jlong, jlong, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJV__JJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSSSV__ISSSJ(JNIEnv *__env, jclass clazz, jint param0, jshort param1, jshort param2, jshort param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jshort, jshort, jshort))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJJJV__IIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jlong, jlong, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJV__JIJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jlong, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJV__JJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJIJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJIJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JIJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jlong, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPJV__IJJIJZJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jint param3, jlong param4, jboolean param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jlong, jboolean))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPJV__JIJIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJIJIJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJV__JIIJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jlong, jlong, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIIIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJIIJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JIJIIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIIIJIJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jint param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JIIIIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JJIIIIIIJIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jlong param8, jint param9, jint param10, jint param11, jint param12, jint param13, jint param14, jint param15, jint param16, jint param17, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, jint, jint, jint, jint, uintptr_t, jint, jint, jint, jint, jint, jint, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5, param6, param7, (uintptr_t)param8, param9, param10, param11, param12, param13, param14, param15, param16, param17); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callBBBBV__BBBBJ(JNIEnv *__env, jclass clazz, jbyte param0, jbyte param1, jbyte param2, jbyte param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jbyte, jbyte, jbyte, jbyte))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callCCCCV__SSSSJ(JNIEnv *__env, jclass clazz, jshort param0, jshort param1, jshort param2, jshort param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uint16_t, uint16_t, uint16_t, uint16_t))(uintptr_t)__functionAddress)((uint16_t)param0, (uint16_t)param1, (uint16_t)param2, (uint16_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPV__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPNV__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, long))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (long)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSSSSV__SSSSJ(JNIEnv *__env, jclass clazz, jshort param0, jshort param1, jshort param2, jshort param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jshort, jshort, jshort, jshort))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callUUUUV__BBBBJ(JNIEnv *__env, jclass clazz, jbyte param0, jbyte param1, jbyte param2, jbyte param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uint8_t, uint8_t, uint8_t, uint8_t))(uintptr_t)__functionAddress)((uint8_t)param0, (uint8_t)param1, (uint8_t)param2, (uint8_t)param3); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJJJJV__IJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jlong, jlong, jlong, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJV__JJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JJJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callSSSSV__ISSSSJ(JNIEnv *__env, jclass clazz, jint param0, jshort param1, jshort param2, jshort param3, jshort param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jshort, jshort, jshort, jshort))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callUUUUV__IBBBBJ(JNIEnv *__env, jclass clazz, jint param0, jbyte param1, jbyte param2, jbyte param3, jbyte param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uint8_t, uint8_t, uint8_t, uint8_t))(uintptr_t)__functionAddress)(param0, (uint8_t)param1, (uint8_t)param2, (uint8_t)param3, (uint8_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callJJJJV__IIJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jlong, jlong, jlong, jlong))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JJJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPV__JJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__IJIJJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__IJJJJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JJIIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JJIJIIJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jint param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jlong, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPV__JIJIIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jlong, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__IIIJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__IIJJJJIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JJIJIIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jint param4, jint param5, jlong param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jlong, jint, jint, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, (uintptr_t)param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPV__JIJIIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jlong param5, jint param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jlong, jint, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5, param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JIIIIJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jlong param5, jint param6, jlong param7, jint param8, jlong param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, jint, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)param5, param6, (uintptr_t)param7, param8, (uintptr_t)param9); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJPV__JJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__JIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJJV__JJJJJIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, jlong, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__IIJJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__JIIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJJV__JJIIJJJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlong param5, jlong param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jlong, jlong, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPPV__JIIJJIJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jlong param4, jint param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, jint, jlong, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__JJJJJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jint param5, jint param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5, param6, param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__JIJIIIJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jlong param6, jint param7, jlong param8, jint param9, jlong param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jint, jint, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, param4, param5, (uintptr_t)param6, param7, (uintptr_t)param8, param9, (uintptr_t)param10); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPJV__JJJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)param4, param5); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPPV__JJJIIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPPPV__IIIJIJJJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jlong param5, jlong param6, jlong param7, jlong param8, jlong param9, jlong param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7, (uintptr_t)param8, (uintptr_t)param9, (uintptr_t)param10); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPJJJJJJV__JJJJIJJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jint param4, jlong param5, jlong param6, jlong param7, jlong param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, uintptr_t, jlong, jlong, jint, jlong, jlong, jlong, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, param4, param5, param6, param7, param8); -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJJJJJJJJJV__JJJJJJJJJJJJIIIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jlong param5, jlong param6, jlong param7, jlong param8, jlong param9, jlong param10, jlong param11, jint param12, jint param13, jint param14, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jint, jint, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callZ__IJ(JNIEnv *__env, jclass clazz, jint param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callZ__IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, jint))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callZ__IFFJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callZ__IIFFJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloat param2, jfloat param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, jint, jfloat, jfloat))(uintptr_t)__functionAddress)(param0, param1, param2, param3); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callJZ__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jlong))(uintptr_t)__functionAddress)(param0); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callPZ__JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callJZ__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, jlong))(uintptr_t)__functionAddress)(param0, param1); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callPZ__IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callJZ__IJIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, jlong, jint))(uintptr_t)__functionAddress)(param0, param1, param2); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callPPZ__IJJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2); -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callPPPPZ__IIIFJJJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jfloat param3, jlong param4, jlong param5, jlong param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - return ((jboolean (APIENTRY *) (jint, jint, jint, jfloat, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6, (uintptr_t)param7); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPI__IJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (*) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPI__JJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePPPPPI__J_3I_3I_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jintArray param2, jintArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_invokePNNPPPI__JJJII_3I_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jint param4, jintArray param5, jintArray param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - jint __result = ((jint (*) (uintptr_t, long, long, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (long)param2, param3, param4, (uintptr_t)paramArray5, (uintptr_t)paramArray6, (uintptr_t)param7); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_invokePPP__J_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jlong __result = (jlong)((uintptr_t (*) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__I_3DJ(JNIEnv *__env, jclass clazz, jint param0, jdoubleArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param1, NULL); - ((void (*) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__I_3FJ(JNIEnv *__env, jclass clazz, jint param0, jfloatArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param1, NULL); - ((void (*) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (*) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__II_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdoubleArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param2, NULL); - ((void (*) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__II_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloatArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - ((void (*) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__II_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (*) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__II_3JJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlongArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (*) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__I_3IZJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jboolean param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (*) (jint, uintptr_t, jboolean))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__II_3FIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloatArray param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - ((void (*) (jint, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3, param4); - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__II_3IIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (*) (jint, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3, param4); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__II_3SIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jshortArray param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param2, NULL); - ((void (*) (jint, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3, param4); - if (param2 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jdoubleArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param5, NULL); - ((void (*) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jfloatArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - ((void (*) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (*) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jshortArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param5, NULL); - ((void (*) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jdoubleArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param6, NULL); - ((void (*) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jfloatArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param6, NULL); - ((void (*) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jintArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - ((void (*) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePV__IIIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jshortArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param6, NULL); - ((void (*) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePJV__I_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (*) (jint, uintptr_t, jlong))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__J_3FIJ(JNIEnv *__env, jclass clazz, jlong param0, jfloatArray param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param1, NULL); - ((void (*) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, param2); - if (param1 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__J_3IIJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (*) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__J_3SIJ(JNIEnv *__env, jclass clazz, jlong param0, jshortArray param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param1, NULL); - ((void (*) (uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, param2); - if (param1 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (*) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPV__JII_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - ((void (*) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePNPV__JJ_3SJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jshortArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param2, NULL); - ((void (*) (uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__J_3D_3DJ(JNIEnv *__env, jclass clazz, jlong param0, jdoubleArray param1, jdoubleArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param2, NULL); - ((void (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__J_3F_3FJ(JNIEnv *__env, jclass clazz, jlong param0, jfloatArray param1, jfloatArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - ((void (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__J_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV___3I_3I_3IJ(JNIEnv *__env, jclass clazz, jintArray param0, jintArray param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__I_3F_3F_3FJ(JNIEnv *__env, jclass clazz, jint param0, jfloatArray param1, jfloatArray param2, jfloatArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param3, NULL); - ((void (*) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__II_3D_3D_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdoubleArray param2, jdoubleArray param3, jdoubleArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param4, NULL); - ((void (*) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__II_3F_3F_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloatArray param2, jfloatArray param3, jfloatArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param4, NULL); - ((void (*) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPV__II_3J_3J_3JJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlongArray param2, jlongArray param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - ((void (*) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePNPPV__JJJ_3SJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jshortArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param3, NULL); - ((void (*) (uintptr_t, long, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (long)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_invokePPPPPV__J_3I_3I_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jintArray param2, jintArray param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (*) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPZ__J_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jboolean __result = ((jboolean (*) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_invokePPPZ__JJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jboolean __result = ((jboolean (*) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI___3IJ(JNIEnv *__env, jclass clazz, jintArray param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0); - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jint __result = ((jint (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI___3IIJ(JNIEnv *__env, jclass clazz, jintArray param0, jint param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, param1); - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__II_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__I_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jint __result = ((jint (APIENTRY *) (jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__III_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jfloatArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPI__IIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__J_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI___3IJJ(JNIEnv *__env, jclass clazz, jintArray param0, jlong param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)param1); - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__IJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JI_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlongArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__JII_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPI__IJIIF_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jint param3, jfloat param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (jint, uintptr_t, jint, jint, jfloat, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlongArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlongArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__J_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__J_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI___3IJ_3IJ(JNIEnv *__env, jclass clazz, jintArray param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JIJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPI__JJI_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JI_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JI_3I_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJI_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JJ_3IIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJI__JI_3JIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlongArray param2, jint param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jlong))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, param3, param4); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIIJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlong param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIII_3I_3FJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jintArray param4, jfloatArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPI__JIII_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jintArray param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJ_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJ_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPI__JJ_3I_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPNPI__JJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJ_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJ_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JIJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JIJ_3J_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlongArray param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JI_3IJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlong param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3, (uintptr_t)param4); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJI_3JJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlongArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JJJI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__J_3IJI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__JII_3J_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlongArray param3, jintArray param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPI__I_3I_3JIIIIIIIIIIIIIIIIII_3I_3JJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlongArray param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jint param11, jint param12, jint param13, jint param14, jint param15, jint param16, jint param17, jint param18, jint param19, jint param20, jintArray param21, jlongArray param22, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - void *paramArray21 = param21 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param21, NULL); - void *paramArray22 = param22 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param22, NULL); - jint __result = ((jint (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, (uintptr_t)paramArray21, (uintptr_t)paramArray22); - if (param22 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param22, paramArray22, 0); } - if (param21 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param21, paramArray21, 0); } - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPPI__JJJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPJPPI__JJJ_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jintArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JJ_3I_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jintArray param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JJ_3I_3I_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jintArray param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__J_3I_3I_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jintArray param2, jintArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPPI__JJIJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jlong param4, jlongArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)param3, (uintptr_t)param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param5, paramArray5, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JJJ_3II_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jintArray param3, jint param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__J_3I_3FI_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jfloatArray param2, jint param3, jintArray param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, param3, (uintptr_t)paramArray4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__II_3I_3I_3I_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jintArray param3, jintArray param4, jintArray param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5, (uintptr_t)param6); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPI__JI_3JIJJJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlongArray param2, jint param3, jlong param4, jlong param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)param6); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPJI__JJIIJ_3IJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jintArray param5, jlong param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, jint, jint, uintptr_t, uintptr_t, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)paramArray5, param6, param7); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJPPJI__JJIIJ_3JJIJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jlong param4, jlongArray param5, jlong param6, jint param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, jint, jint, uintptr_t, uintptr_t, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)paramArray5, param6, param7); - if (param5 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param5, paramArray5, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJJJPI__JJJJJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlong param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPI__J_3I_3I_3I_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jintArray param2, jintArray param3, jintArray param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPJJPPPI__JJJIJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jlong param4, jlong param5, jlongArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param6, NULL); - jint __result = ((jint (APIENTRY *) (uintptr_t, jlong, jlong, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)param4, (uintptr_t)param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param6, paramArray6, 0); } - return __result; -} -JNIEXPORT jint JNICALL Java_org_lwjgl_system_JNI_callPPPPPPI__II_3I_3I_3I_3I_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jintArray param3, jintArray param4, jintArray param5, jintArray param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - jint __result = ((jint (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5, (uintptr_t)paramArray6, (uintptr_t)param7); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPP___3IJ(JNIEnv *__env, jclass clazz, jintArray param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0); - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__J_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__IJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__III_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPP__JIII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JI_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPP__JJII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPNPP__JJJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, long, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (long)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JJJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JIJJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JJIJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlong param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPP__JJJI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - return __result; -} -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_JNI_callPPPPPPPP__I_3I_3JIIIIJJJI_3I_3JJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlongArray param2, jint param3, jint param4, jint param5, jint param6, jlong param7, jlong param8, jlong param9, jint param10, jintArray param11, jlongArray param12, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - void *paramArray11 = param11 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param11, NULL); - void *paramArray12 = param12 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param12, NULL); - jlong __result = (jlong)((uintptr_t (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, param3, param4, param5, param6, (uintptr_t)param7, (uintptr_t)param8, (uintptr_t)param9, param10, (uintptr_t)paramArray11, (uintptr_t)paramArray12); - if (param12 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param12, paramArray12, 0); } - if (param11 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param11, paramArray11, 0); } - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV___3DJ(JNIEnv *__env, jclass clazz, jdoubleArray param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param0, NULL); - ((void (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0); - if (param0 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV___3FJ(JNIEnv *__env, jclass clazz, jfloatArray param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param0, NULL); - ((void (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0); - if (param0 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV___3IJ(JNIEnv *__env, jclass clazz, jintArray param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - ((void (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0); - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV___3SJ(JNIEnv *__env, jclass clazz, jshortArray param0, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param0, NULL); - ((void (APIENTRY *) (uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0); - if (param0 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__I_3DJ(JNIEnv *__env, jclass clazz, jint param0, jdoubleArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__I_3FJ(JNIEnv *__env, jclass clazz, jint param0, jfloatArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__I_3JJ(JNIEnv *__env, jclass clazz, jint param0, jlongArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__I_3SJ(JNIEnv *__env, jclass clazz, jint param0, jshortArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jdoubleArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jfloatArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3JJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlongArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jshortArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__I_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jint param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__III_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jdoubleArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__III_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jfloatArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__III_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__III_3JJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__III_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jshortArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIZ_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jboolean param2, jdoubleArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIZ_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jboolean param2, jfloatArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIZ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jboolean param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__I_3IIIJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jint param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2, param3); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jdoubleArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jfloatArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIII_3JJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jshortArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIZ_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jdoubleArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIZ_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jfloatArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jboolean, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__III_3IZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jboolean param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3, param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3IIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3, param4); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IZII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jboolean param1, jint param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jboolean, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IDDII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jint param3, jint param4, jdoubleArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jdouble, jdouble, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IFFII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jint param3, jint param4, jfloatArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jfloat, jfloat, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jdoubleArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jfloatArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jshortArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIII_3IZJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jintArray param4, jboolean param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jboolean))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4, param5); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIZI_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jint param4, jfloatArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, jboolean, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIZI_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jint param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, jboolean, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIZI_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jboolean param3, jint param4, jshortArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, jboolean, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jdoubleArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jfloatArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jintArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jshortArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__II_3IIIIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jint param3, jint param4, jint param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3, param4, param5, param6); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jdoubleArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param7, paramArray7, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jfloatArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param7, paramArray7, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jintArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param7, paramArray7, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jshortArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param7, paramArray7, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jdoubleArray param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray8 = param8 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param8, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, (uintptr_t)paramArray8); - if (param8 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param8, paramArray8, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jfloatArray param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray8 = param8 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param8, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, (uintptr_t)paramArray8); - if (param8 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param8, paramArray8, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jintArray param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray8 = param8 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param8, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, (uintptr_t)paramArray8); - if (param8 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param8, paramArray8, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jshortArray param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray8 = param8 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param8, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, (uintptr_t)paramArray8); - if (param8 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param8, paramArray8, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IDDIIDDII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jdouble param1, jdouble param2, jint param3, jint param4, jdouble param5, jdouble param6, jint param7, jint param8, jdoubleArray param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray9 = param9 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param9, NULL); - ((void (APIENTRY *) (jint, jdouble, jdouble, jint, jint, jdouble, jdouble, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)paramArray9); - if (param9 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param9, paramArray9, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IFFIIFFII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jfloat param1, jfloat param2, jint param3, jint param4, jfloat param5, jfloat param6, jint param7, jint param8, jfloatArray param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray9 = param9 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param9, NULL); - ((void (APIENTRY *) (jint, jfloat, jfloat, jint, jint, jfloat, jfloat, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)paramArray9); - if (param9 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param9, paramArray9, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jdoubleArray param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray9 = param9 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param9, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)paramArray9); - if (param9 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param9, paramArray9, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jfloatArray param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray9 = param9 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param9, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)paramArray9); - if (param9 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param9, paramArray9, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jintArray param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray9 = param9 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param9, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)paramArray9); - if (param9 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param9, paramArray9, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jshortArray param9, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray9 = param9 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param9, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, (uintptr_t)paramArray9); - if (param9 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param9, paramArray9, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jdoubleArray param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray10 = param10 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param10, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, (uintptr_t)paramArray10); - if (param10 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param10, paramArray10, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jfloatArray param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray10 = param10 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param10, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, (uintptr_t)paramArray10); - if (param10 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param10, paramArray10, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jintArray param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray10 = param10 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param10, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, (uintptr_t)paramArray10); - if (param10 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param10, paramArray10, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jshortArray param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray10 = param10 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param10, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, (uintptr_t)paramArray10); - if (param10 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param10, paramArray10, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIIII_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jdoubleArray param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray11 = param11 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param11, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, (uintptr_t)paramArray11); - if (param11 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param11, paramArray11, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jfloatArray param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray11 = param11 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param11, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, (uintptr_t)paramArray11); - if (param11 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param11, paramArray11, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIIII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jintArray param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray11 = param11 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param11, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, (uintptr_t)paramArray11); - if (param11 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param11, paramArray11, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPV__IIIIIIIIIII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jint param4, jint param5, jint param6, jint param7, jint param8, jint param9, jint param10, jshortArray param11, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray11 = param11 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param11, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, (uintptr_t)paramArray11); - if (param11 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param11, paramArray11, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__J_3FJ(JNIEnv *__env, jclass clazz, jlong param0, jfloatArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__J_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV___3D_3DJ(JNIEnv *__env, jclass clazz, jdoubleArray param0, jdoubleArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param0, NULL); - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param1, paramArray1, 0); } - if (param0 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV___3F_3FJ(JNIEnv *__env, jclass clazz, jfloatArray param0, jfloatArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param0, NULL); - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param1, paramArray1, 0); } - if (param0 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV___3I_3IJ(JNIEnv *__env, jclass clazz, jintArray param0, jintArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV___3S_3SJ(JNIEnv *__env, jclass clazz, jshortArray param0, jshortArray param1, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param0, NULL); - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)paramArray1); - if (param1 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param1, paramArray1, 0); } - if (param0 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3I_3FJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jfloatArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3I_3JJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlongArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JI_3FJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jfloatArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV___3II_3IJ(JNIEnv *__env, jclass clazz, jintArray param0, jint param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param0, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__II_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__II_3I_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jfloatArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__II_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__II_3I_3JJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJI_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJ_3DIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jdoubleArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJ_3FIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jfloatArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJ_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jintArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJ_3JIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlongArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IJ_3SIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jshortArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3I_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jintArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3J_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jlongArray param1, jintArray param2, jint param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__III_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__III_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJ_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jintArray param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3, param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__II_3II_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3IIJIJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jint param2, jlong param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2, (uintptr_t)param3, param4); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3II_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jint param2, jintArray param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2, (uintptr_t)paramArray3, param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__I_3IJIIJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlong param2, jint param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)param2, param3, param4); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__JIII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIII_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jintArray param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4, (uintptr_t)param5); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jfloatArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jshortArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__II_3IJIIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jlong param3, jint param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3, param4, param5); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIJII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jint param5, jfloatArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jfloatArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIIJII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jint param5, jint param6, jfloatArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, param5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param7, paramArray7, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIIJII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jlong param4, jint param5, jint param6, jshortArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)param4, param5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param7, paramArray7, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jfloatArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param7, paramArray7, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIIJIFFI_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jfloat param5, jfloat param6, jint param7, jfloatArray param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray8 = param8 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param8, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, jfloat, jfloat, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, param5, param6, param7, (uintptr_t)paramArray8); - if (param8 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param8, paramArray8, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPV__IIJIIIII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jint param6, jint param7, jfloatArray param8, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray8 = param8 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param8, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, jint, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, param3, param4, param5, param6, param7, (uintptr_t)paramArray8); - if (param8 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param8, paramArray8, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlongArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__J_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jintArray param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)paramArray1, (uintptr_t)param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJI_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJ_3DJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jdoubleArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJ_3FJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jfloatArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJ_3JJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJJ_3SJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jlong param2, jshortArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JI_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JI_3I_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jintArray param2, jlongArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JI_3JJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlongArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JJI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jintArray param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJ_3DJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jdoubleArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJ_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jfloatArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJ_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jshortArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__II_3IJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jlong param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__II_3I_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jintArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJI_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jintArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IJI_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jint param2, jintArray param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__I_3I_3II_3IJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jintArray param2, jint param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JII_3I_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jintArray param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JII_3J_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlongArray param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJIII_3DJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jdoubleArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJIII_3FJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jfloatArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJIII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJIII_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jlongArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPV__JJIII_3SJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jint param2, jint param3, jint param4, jshortArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPJV__JI_3JIJIJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlongArray param2, jint param3, jlong param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jlong, jint))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, param3, param4, param5); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__III_3IJJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jlong param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)param4, (uintptr_t)param5); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__III_3IJ_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jlong param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__II_3II_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jintArray param2, jint param3, jintArray param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)paramArray2, param3, (uintptr_t)paramArray4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__I_3IIJI_3IJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jint param2, jlong param3, jint param4, jintArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, param2, (uintptr_t)param3, param4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJII_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jfloatArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJII_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jintArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIJJII_3SJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jlong param3, jint param4, jint param5, jshortArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, jint, jint, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JIJIII_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jint param5, jintArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jint, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, param3, param4, param5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIII_3II_3I_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jintArray param4, jint param5, jintArray param6, jfloatArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4, param5, (uintptr_t)paramArray6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param7, paramArray7, 0); } - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__IIII_3II_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jint param3, jintArray param4, jint param5, jintArray param6, jintArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (jint, jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4, param5, (uintptr_t)paramArray6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param7, paramArray7, 0); } - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPV__JIIIII_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jint param3, jint param4, jint param5, jintArray param6, jlong param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jint, jint, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, param5, (uintptr_t)paramArray6, (uintptr_t)param7); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPV__JJ_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JJ_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jintArray param2, jlong param3, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, (uintptr_t)param1, (uintptr_t)paramArray2, (uintptr_t)param3); - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJPV__JIJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlong param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JIJ_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jintArray param3, jlong param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3, (uintptr_t)param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV___3J_3I_3I_3IIJ(JNIEnv *__env, jclass clazz, jlongArray param0, jintArray param1, jintArray param2, jintArray param3, jint param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray0 = param0 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param0, NULL); - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - ((void (APIENTRY *) (uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)((uintptr_t)paramArray0, (uintptr_t)paramArray1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, param4); - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - if (param0 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param0, paramArray0, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__IJ_3I_3I_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jlong param1, jintArray param2, jintArray param3, jintArray param4, jint param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param2, NULL); - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, (uintptr_t)param1, (uintptr_t)paramArray2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, param5); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } - if (param2 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__JII_3J_3J_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlongArray param3, jlongArray param4, jlongArray param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5); - if (param5 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPV__JIJII_3I_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jintArray param5, jlongArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jlong, jint, jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param6, paramArray6, 0); } - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__III_3I_3I_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jintArray param3, jintArray param4, jintArray param5, jlong param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5, (uintptr_t)param6); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPV__IIJ_3I_3I_3IIJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jintArray param3, jintArray param4, jintArray param5, jint param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, jint))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5, param6); - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJPPV__JIJII_3JI_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jint param3, jint param4, jlongArray param5, jint param6, jintArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param5, NULL); - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param7, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jlong, jint, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, param4, (uintptr_t)paramArray5, param6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param7, paramArray7, 0); } - if (param5 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param5, paramArray5, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJPV__JJJJ_3DJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jdoubleArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetDoubleArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseDoubleArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJPV__JJJJ_3FJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jfloatArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJPV__JJJJ_3IJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jintArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJPV__JJJJ_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jlongArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPJJJPV__JJJJ_3SJ(JNIEnv *__env, jclass clazz, jlong param0, jlong param1, jlong param2, jlong param3, jshortArray param4, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetShortArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jlong, jlong, jlong, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, param3, (uintptr_t)paramArray4); - if (param4 != NULL) { (*__env)->ReleaseShortArrayElements(__env, param4, paramArray4, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__JIJ_3J_3IJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlong param2, jlongArray param3, jintArray param4, jlong param5, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)param5); - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__IIJ_3I_3I_3I_3IJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jlong param2, jintArray param3, jintArray param4, jintArray param5, jintArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param5, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, (uintptr_t)param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } - if (param5 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__JII_3J_3J_3J_3JJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jint param2, jlongArray param3, jlongArray param4, jlongArray param5, jlongArray param6, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray3 = param3 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param3, NULL); - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param5, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param6, NULL); - ((void (APIENTRY *) (uintptr_t, jint, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, param2, (uintptr_t)paramArray3, (uintptr_t)paramArray4, (uintptr_t)paramArray5, (uintptr_t)paramArray6); - if (param6 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param6, paramArray6, 0); } - if (param5 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param4, paramArray4, 0); } - if (param3 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param3, paramArray3, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPV__JI_3JIIIJIJIJJ(JNIEnv *__env, jclass clazz, jlong param0, jint param1, jlongArray param2, jint param3, jint param4, jint param5, jlong param6, jint param7, jlong param8, jint param9, jlong param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray2 = param2 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param2, NULL); - ((void (APIENTRY *) (uintptr_t, jint, uintptr_t, jint, jint, jint, uintptr_t, jint, uintptr_t, jint, uintptr_t))(uintptr_t)__functionAddress)((uintptr_t)param0, param1, (uintptr_t)paramArray2, param3, param4, param5, (uintptr_t)param6, param7, (uintptr_t)param8, param9, (uintptr_t)param10); - if (param2 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param2, paramArray2, 0); } -} -JNIEXPORT void JNICALL Java_org_lwjgl_system_JNI_callPPPPPPPV__IIIJIJ_3I_3I_3I_3I_3JJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jlong param3, jint param4, jlong param5, jintArray param6, jintArray param7, jintArray param8, jintArray param9, jlongArray param10, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param6, NULL); - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param7, NULL); - void *paramArray8 = param8 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param8, NULL); - void *paramArray9 = param9 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param9, NULL); - void *paramArray10 = param10 == NULL ? NULL : (*__env)->GetLongArrayElements(__env, param10, NULL); - ((void (APIENTRY *) (jint, jint, jint, uintptr_t, jint, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, (uintptr_t)param3, param4, (uintptr_t)param5, (uintptr_t)paramArray6, (uintptr_t)paramArray7, (uintptr_t)paramArray8, (uintptr_t)paramArray9, (uintptr_t)paramArray10); - if (param10 != NULL) { (*__env)->ReleaseLongArrayElements(__env, param10, paramArray10, 0); } - if (param9 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param9, paramArray9, 0); } - if (param8 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param8, paramArray8, 0); } - if (param7 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param7, paramArray7, 0); } - if (param6 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param6, paramArray6, 0); } -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callPPZ__I_3IJJ(JNIEnv *__env, jclass clazz, jint param0, jintArray param1, jlong param2, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray1 = param1 == NULL ? NULL : (*__env)->GetIntArrayElements(__env, param1, NULL); - jboolean __result = ((jboolean (APIENTRY *) (jint, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, (uintptr_t)paramArray1, (uintptr_t)param2); - if (param1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, param1, paramArray1, 0); } - return __result; -} -JNIEXPORT jboolean JNICALL Java_org_lwjgl_system_JNI_callPPPPZ__IIIF_3F_3F_3F_3FJ(JNIEnv *__env, jclass clazz, jint param0, jint param1, jint param2, jfloat param3, jfloatArray param4, jfloatArray param5, jfloatArray param6, jfloatArray param7, jlong __functionAddress) { - UNUSED_PARAMS(__env, clazz) - void *paramArray4 = param4 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param4, NULL); - void *paramArray5 = param5 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param5, NULL); - void *paramArray6 = param6 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param6, NULL); - void *paramArray7 = param7 == NULL ? NULL : (*__env)->GetFloatArrayElements(__env, param7, NULL); - jboolean __result = ((jboolean (APIENTRY *) (jint, jint, jint, jfloat, uintptr_t, uintptr_t, uintptr_t, uintptr_t))(uintptr_t)__functionAddress)(param0, param1, param2, param3, (uintptr_t)paramArray4, (uintptr_t)paramArray5, (uintptr_t)paramArray6, (uintptr_t)paramArray7); - if (param7 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param7, paramArray7, 0); } - if (param6 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param6, paramArray6, 0); } - if (param5 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param5, paramArray5, 0); } - if (param4 != NULL) { (*__env)->ReleaseFloatArrayElements(__env, param4, paramArray4, 0); } - return __result; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_MemoryAccessJNI.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_MemoryAccessJNI.c deleted file mode 100644 index 62cfd0c9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_MemoryAccessJNI.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" -#include -#include -#ifdef LWJGL_WINDOWS - static void* __aligned_alloc(size_t alignment, size_t size) { - return _aligned_malloc(size, alignment); - } - #define __aligned_free _aligned_free -#else - #if defined(__USE_ISOC11) - #define __aligned_alloc aligned_alloc - #else - static void* __aligned_alloc(size_t alignment, size_t size) { - void *p; - return posix_memalign(&p, alignment, size) ? NULL : p; - } - #endif - #define __aligned_free free -#endif - -// ----------- - -static inline int8_t getByte(void *ptr) { return *(int8_t *)ptr; } -static inline int16_t getShort(void *ptr) { return *(int16_t *)ptr; } -static inline int32_t getInt(void *ptr) { return *(int32_t *)ptr; } -static inline int64_t getLong(void *ptr) { return *(int64_t *)ptr; } -static inline float getFloat(void *ptr) { return *(float *)ptr; } -static inline double getDouble(void *ptr) { return *(double *)ptr; } -static inline uintptr_t getAddress(void *ptr) { return *(uintptr_t *)ptr; } - -// ----------- - -static inline void putByte(void *ptr, int8_t value) { *(int8_t *)ptr = value; } -static inline void putShort(void *ptr, int16_t value) { *(int16_t *)ptr = value; } -static inline void putInt(void *ptr, int32_t value) { *(int32_t *)ptr = value; } -static inline void putLong(void *ptr, int64_t value) { *(int64_t *)ptr = value; } -static inline void putFloat(void *ptr, float value) { *(float *)ptr = value; } -static inline void putDouble(void *ptr, double value) { *(double *)ptr = value; } -static inline void putAddress(void *ptr, uintptr_t value) { *(uintptr_t *)ptr = value; } - -// ----------- - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_MemoryAccessJNI_getPointerSize(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)sizeof(void *); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_malloc(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&malloc; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_calloc(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&calloc; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_realloc(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&realloc; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_free(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&free; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_aligned_1alloc(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&__aligned_alloc; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_aligned_1free(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&__aligned_free; -} - -JNIEXPORT jbyte JNICALL Java_org_lwjgl_system_MemoryAccessJNI_ngetByte(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jbyte)getByte(ptr); -} - -JNIEXPORT jshort JNICALL Java_org_lwjgl_system_MemoryAccessJNI_ngetShort(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jshort)getShort(ptr); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_MemoryAccessJNI_ngetInt(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)getInt(ptr); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_ngetLong(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)getLong(ptr); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_system_MemoryAccessJNI_ngetFloat(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)getFloat(ptr); -} - -JNIEXPORT jdouble JNICALL Java_org_lwjgl_system_MemoryAccessJNI_ngetDouble(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jdouble)getDouble(ptr); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_MemoryAccessJNI_ngetAddress(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)getAddress(ptr); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_MemoryAccessJNI_nputByte(JNIEnv *__env, jclass clazz, jlong ptrAddress, jbyte value) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - putByte(ptr, (int8_t)value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_MemoryAccessJNI_nputShort(JNIEnv *__env, jclass clazz, jlong ptrAddress, jshort value) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - putShort(ptr, (int16_t)value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_MemoryAccessJNI_nputInt(JNIEnv *__env, jclass clazz, jlong ptrAddress, jint value) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - putInt(ptr, (int32_t)value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_MemoryAccessJNI_nputLong(JNIEnv *__env, jclass clazz, jlong ptrAddress, jlong value) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - putLong(ptr, (int64_t)value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_MemoryAccessJNI_nputFloat(JNIEnv *__env, jclass clazz, jlong ptrAddress, jfloat value) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - putFloat(ptr, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_MemoryAccessJNI_nputDouble(JNIEnv *__env, jclass clazz, jlong ptrAddress, jdouble value) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - putDouble(ptr, value); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_MemoryAccessJNI_nputAddress(JNIEnv *__env, jclass clazz, jlong ptrAddress, jlong value) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - putAddress(ptr, (uintptr_t)value); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_MemoryUtil.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_MemoryUtil.c deleted file mode 100644 index 881c6fcc..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_MemoryUtil.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#include "common_tools.h" - -EXTERN_C_ENTER - -// memGlobalRefToObject(J)Ljava/lang/Object; -JNIEXPORT jobject JNICALL Java_org_lwjgl_system_MemoryUtil_memGlobalRefToObject(JNIEnv *env, jclass clazz, - jlong globalRef -) { - UNUSED_PARAMS(env, clazz) - return (jobject)(uintptr_t)globalRef; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_SharedLibraryUtil.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_SharedLibraryUtil.c deleted file mode 100644 index e387b873..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_SharedLibraryUtil.c +++ /dev/null @@ -1,349 +0,0 @@ -// dyncall's dynload JNIfied for LWJGL. - -/* - - Package: dyncall - Library: autovar - File: autovar/autovar_OS.h - Description: - License: - - Copyright (c) 2011-2018 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - -#ifndef AUTOVAR_OS_H -#define AUTOVAR_OS_H - -#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) -# define OS_Win64 -#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__WINDOWS__) || defined(_WINDOWS) -# define OS_Win32 -#elif defined(__APPLE__) || defined(__Darwin__) -# define OS_Darwin -# if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) -# define OS_IOS -# else /* defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) */ -# define OS_MacOSX -# endif -#elif defined(__linux__) || defined(__linux) || defined(__gnu_linux__) -# define OS_Linux -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) /* latter is (also) used by systems using FreeBSD kernel, e.g. Debian/kFreeBSD, which could be detected specifically by also checking for __GLIBC__ */ -# define OS_FreeBSD -#elif defined(__OpenBSD__) -# define OS_OpenBSD -#elif defined(__NetBSD__) -# define OS_NetBSD -#elif defined(__DragonFly__) -# define OS_DragonFlyBSD -#elif defined(__sun__) || defined(__sun) || defined(sun) -# define OS_SunOS -#elif defined(__CYGWIN__) -# define OS_Cygwin -#elif defined(__MINGW__) -# define OS_MinGW -#elif defined(__nds__) -# define OS_NDS -#elif defined(__psp__) || defined(PSP) -# define OS_PSP -#elif defined(__HAIKU__) || defined(__BEOS__) -# define OS_BeOS -#elif defined(Plan9) || defined(__Plan9__) -# define OS_Plan9 -#elif defined(__vms) -# define OS_VMS -#elif defined(__minix) -# define OS_Minix -#else -# define OS_Unknown -#endif - -/** Platforms. */ - -#if defined(__ANDROID__) -# define OS_Android -#endif - -#endif /* AUTOVAR_OS */ - -/* - - Package: dyncall - Library: dynload - File: dynload/dynload_unix.c - Description: - License: - - Copyright (c) 2007-2018 Daniel Adler , - Tassilo Philipp - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -*/ - - -/* - - dynload_unix.c - - dynload module for .so (unix) and .dylib (mach-o darwin/OS X) files - -*/ - - -#include "common_tools.h" - -#include - -#if defined(__GLIBC__) -/* @@@ version check glibc more precisely... dl_iterate_phdr(): glibc ver >= 2.2.4*/ -# if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 3) -# define DL_USE_GLIBC_ITER_PHDR -# endif -/* to access dl_iterate_phdr(), and related w/ glibc */ -# ifndef _GNU_SOURCE -# define _GNU_SOURCE -# define __USE_GNU -# endif -#endif - -#include - - -/* for dlopen-based dlGetLibraryPath impls below, prefer RTLD_NOLOAD that - * merely checks lib names */ -#if defined(RTLD_NOLOAD) -# define RTLD_LIGHTEST RTLD_LAZY|RTLD_NOLOAD -#else -# define RTLD_LIGHTEST RTLD_LAZY -#endif - - -/* helper copying string if buffer big enough, returning length (without \0) */ -static int dl_strlen_strcpy(char* dst, const char* src, int dstSize) -{ - int l = strlen(src); - if(l < dstSize) /* l+'\0' <= bufSize */ - strcpy(dst, src); - return l; -} - -/* code for dlGetLibraryPath() is platform specific */ - -/* if dlinfo() exists use it (except on glibc, where it exists since version - * 2.3.3, but its implementation is dangerous, as no checks are done whether - * the handle is valid, thus rendering the returned values useless) check for - * RTLD_DI_LINKMAP and RTLD_SELF, which are #defines used by dlinfo() on most - * supported targets, or specifically check the OS (e.g. dlinfo() is originally - * from Solaris) */ -#if ((defined(RTLD_DI_LINKMAP) && defined(RTLD_SELF)) || defined(OS_SunOS)) && !defined(DL_USE_GLIBC_ITER_PHDR) - -#include - -EXTERN_C_ENTER - -JNIEXPORT int JNICALL Java_org_lwjgl_system_SharedLibraryUtil_getLibraryPath(JNIEnv *env, jclass clazz, jlong pLibAddress, jlong sOutAddress, int bufSize) -{ - UNUSED_PARAMS(env, clazz) - void *pLib = (void *)(uintptr_t)pLibAddress; - char *sOut = (char *)(uintptr_t)sOutAddress; - - struct link_map* p = NULL; - int l = -1; - if(dlinfo(pLib ? pLib : RTLD_SELF, RTLD_DI_LINKMAP, &p) == 0) - l = dl_strlen_strcpy(sOut, p->l_name, bufSize); - - return l+1; /* strlen + '\0' */ -} - -EXTERN_C_EXIT - -/* specific implementation needed on Darwin -----> */ -#elif defined(OS_Darwin) - -#include -#include - -EXTERN_C_ENTER - -JNIEXPORT int JNICALL Java_org_lwjgl_system_SharedLibraryUtil_getLibraryPath(JNIEnv *env, jclass clazz, jlong pLibAddress, jlong sOutAddress, jint bufSize) -{ - UNUSED_PARAMS(env, clazz) - void *pLib = (void *)(uintptr_t)pLibAddress; - char *sOut = (char *)(uintptr_t)sOutAddress; - - uint32_t i; - int l = -1; - - UNUSED_PARAMS(env, clazz) - - /* request info about own process? lookup first loaded image */ - if(pLib == NULL) { - const char* libPath = _dyld_get_image_name(0); //@@@ consider using _NSGetExecutablePath() - if(libPath) - l = dl_strlen_strcpy(sOut, libPath, bufSize); - } - else { - /* Darwin's code doesn't come with (non-standard) dlinfo(), so use dyld(1) - * code. There doesn't seem to be a direct way to query the library path, - * so "double-load" temporarily all already loaded images (just increases - * ref count) and compare handles until we found ours. Return the name. */ - for(i=_dyld_image_count(); i>0;) /* backwards, ours is more likely at end */ - { - const char* libPath = _dyld_get_image_name(--i); - void* lib = dlopen(libPath, RTLD_LIGHTEST); - if(lib) { - dlclose(lib); - - /* compare handle pointers' high bits (in low 2 bits some flags might */ - /* be stored - should be safe b/c address needs alignment, anyways) */ - if(((uintptr_t)pLib ^ (uintptr_t)lib) < 4) { - l = dl_strlen_strcpy(sOut, libPath, bufSize); - break; - } - } - } - } - - return l+1; /* strlen + '\0' */ -} - -EXTERN_C_EXIT - - -/* - OpenBSD >= 3.7 has dl_iterate_phdr(), as well as glibc >= 2.2.4 - - also some libc impls (like musl) provide dlinfo(), but not RTLD_SELF (see above), however they might come - with dl_iterate_phdr (which comes from ELF program header iteration), so base it on that - - skip and use dladdr()-based guessing (see below) if explicitly requested, e.g. by ./configure */ -#elif !defined(DL_DLADDR_TO_LIBPATH) && (defined(OS_OpenBSD) || defined(DL_USE_GLIBC_ITER_PHDR) || (!defined(RTLD_SELF) && defined(__ELF__))) - -#include -#include - -typedef struct { - void* pLib; - char* sOut; - int bufSize; -} iter_phdr_data; - -static int iter_phdr_cb(struct dl_phdr_info* info, size_t size, void* data) -{ - UNUSED_PARAM(size); - int l = -1; - iter_phdr_data* d = (iter_phdr_data*)data; - void* lib = NULL; - - /* get loaded object's handle if not requesting info about process itself */ - if(d->pLib != NULL) { - /* unable to relate info->dlpi_addr directly to our dlopen handle, let's - * do what we do on macOS above, re-dlopen the already loaded lib (just - * increases ref count) and compare handles */ - /* @@@ might be b/c it's the reloc addr... see below */ - lib = dlopen(info->dlpi_name, RTLD_LIGHTEST); - if(lib) - dlclose(lib); - } - - /* compare handles and get name if found; if d->pLib == NULL this will - enter info on first iterated object, which is the process itself */ - if(lib == (void*)d->pLib) { - l = dl_strlen_strcpy(d->sOut, info->dlpi_name, d->bufSize); - - /* if dlpi_name is empty, lookup name via dladdr(proc_load_addr, ...) */ - if(l == 0 && d->pLib == NULL) { - /* dlpi_addr is the reloc base (0 if PIE), find real virtual load addr */ - void* vladdr = (void*)info->dlpi_addr; - int i = 0; - for(; i < info->dlpi_phnum; ++i) { - if(info->dlpi_phdr[i].p_type == PT_LOAD) { - vladdr = (void*)(info->dlpi_addr + info->dlpi_phdr[i].p_vaddr); - break; - } - } - Dl_info di; - if(dladdr(vladdr, &di) != 0) - l = dl_strlen_strcpy(d->sOut, di.dli_fname, d->bufSize); - } - } - - return l+1; /* strlen + '\0'; is 0 if lib not found, which continues iter */ -} - -EXTERN_C_ENTER - -JNIEXPORT int JNICALL Java_org_lwjgl_system_SharedLibraryUtil_getLibraryPath(JNIEnv *env, jclass clazz, jlong pLibAddress, jlong sOutAddress, jint bufSize) -{ - UNUSED_PARAMS(env, clazz) - void *pLib = (void *)(uintptr_t)pLibAddress; - char *sOut = (char *)(uintptr_t)sOutAddress; - - iter_phdr_data d = { pLib, sOut, bufSize }; - return dl_iterate_phdr(iter_phdr_cb, &d); -} - -EXTERN_C_EXIT - -/* glibc with neither dl_iterate_phdr() nor dlinfo() (latter introduced after former) @@@ -#elif defined(__GLIBC__) && !defined(DL_USE_GLIBC_ITER_PHDR) - -@@@impl */ - -/* fallback to dladdr() hack */ -#else - -#warning "Using non-optimal code for dlGetLibraryPath() b/c of platform limitations." - -/* if nothing else is available, fall back to guessing using dladdr() - this */ -/* might not always work, as it's trying to getit via the _fini() symbol, */ -/* which is usually defined in ELF files, but not guaranteed */ - -/* @@@Note: On some platforms this might be improved, e.g. on BeOS we have */ -/* lt_dlgetinfo, which requires iterating over ltdl stuff, but was unable */ -/* to get that to work (would also introduce a link dependency on libltdl) */ - -EXTERN_C_ENTER - -JNIEXPORT int JNICALL Java_org_lwjgl_system_SharedLibraryUtil_getLibraryPath(JNIEnv *env, jclass clazz, jlong pLibAddress, jlong sOutAddress, jint bufSize) -{ - UNUSED_PARAMS(env, clazz) - void *pLib = (void *)(uintptr_t)pLibAddress; - char *sOut = (char *)(uintptr_t)sOutAddress; - -/*@@@ missing handler for pLib == NULL*/ - /* cross fingers that shared object is standard ELF and look for _fini */ - int l = -1; - void* s = dlsym((void*)pLib, "_fini"); - if(s) { - Dl_info i; - if(dladdr(s, &i) != 0) - l = dl_strlen_strcpy(sOut, i.dli_fname, bufSize); - } - return l+1; /* strlen + '\0' */ -} - -EXTERN_C_EXIT - -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_ThreadLocalUtil.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_ThreadLocalUtil.c deleted file mode 100644 index b771d345..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_ThreadLocalUtil.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -#include "common_tools.h" -#include - -static void JNICALL functionMissingAbort(void) { -} - -EXTERN_C_ENTER - -// getThreadJNIEnv()J -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_ThreadLocalUtil_getThreadJNIEnv(JNIEnv *env, jclass clazz) { - UNUSED_PARAM(clazz) - - return (jlong)(uintptr_t)env; -} - -// getFunctionMissingAbort()J -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_ThreadLocalUtil_getFunctionMissingAbort(JNIEnv *env, jclass clazz) { - UNUSED_PARAMS(env, clazz) - return (jlong)(uintptr_t)functionMissingAbort; -} - -extern EnvData* tlsCreateEnvDataWithCopy(JNIEnv* env); -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_ThreadLocalUtil_nsetupEnvData(JNIEnv *env, jclass clazz, jint functionCount) { - UNUSED_PARAM(clazz) - - void *envCopy = malloc(functionCount * sizeof(void *)); - memcpy(envCopy, *env, functionCount * sizeof(void *)); - *(void **)env = envCopy; - - return (jlong)(uintptr_t)tlsCreateEnvDataWithCopy(env); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_jni_JNINativeInterface.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_jni_JNINativeInterface.c deleted file mode 100644 index c5a3a355..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_jni_JNINativeInterface.c +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_GetVersion(JNIEnv *__env, jclass clazz) { - UNUSED_PARAM(clazz) - return (*__env)->GetVersion(__env); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_FromReflectedMethod(JNIEnv *__env, jclass clazz, jobject method) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->FromReflectedMethod(__env, method); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_FromReflectedField(JNIEnv *__env, jclass clazz, jobject field) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->FromReflectedField(__env, field); -} - -JNIEXPORT jobject JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nToReflectedMethod(JNIEnv *__env, jclass clazz, jclass cls, jlong methodIDAddress, jboolean isStatic) { - jmethodID methodID = (jmethodID)(uintptr_t)methodIDAddress; - UNUSED_PARAM(clazz) - return (*__env)->ToReflectedMethod(__env, cls, methodID, isStatic); -} - -JNIEXPORT jobject JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nToReflectedField(JNIEnv *__env, jclass clazz, jclass cls, jlong fieldIDAddress, jboolean isStatic) { - jfieldID fieldID = (jfieldID)(uintptr_t)fieldIDAddress; - UNUSED_PARAM(clazz) - return (*__env)->ToReflectedField(__env, cls, fieldID, isStatic); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_NewGlobalRef(JNIEnv *__env, jclass clazz, jobject obj) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->NewGlobalRef(__env, obj); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nDeleteGlobalRef(JNIEnv *__env, jclass clazz, jlong globalRefAddress) { - void *globalRef = (void *)(uintptr_t)globalRefAddress; - UNUSED_PARAM(clazz) - (*__env)->DeleteGlobalRef(__env, globalRef); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetBooleanArrayElements(JNIEnv *__env, jclass clazz, jbooleanArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetBooleanArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseBooleanArrayElements(JNIEnv *__env, jclass clazz, jbooleanArray array, jlong elemsAddress, jint mode) { - jboolean *elems = (jboolean *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseBooleanArrayElements(__env, array, elems, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetByteArrayElements(JNIEnv *__env, jclass clazz, jbyteArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetByteArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseByteArrayElements(JNIEnv *__env, jclass clazz, jbyteArray array, jlong elemsAddress, jint mode) { - jbyte *elems = (jbyte *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseByteArrayElements(__env, array, elems, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetCharArrayElements(JNIEnv *__env, jclass clazz, jcharArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetCharArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseCharArrayElements(JNIEnv *__env, jclass clazz, jcharArray array, jlong elemsAddress, jint mode) { - jchar *elems = (jchar *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseCharArrayElements(__env, array, elems, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetShortArrayElements(JNIEnv *__env, jclass clazz, jshortArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetShortArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseShortArrayElements(JNIEnv *__env, jclass clazz, jshortArray array, jlong elemsAddress, jint mode) { - jshort *elems = (jshort *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseShortArrayElements(__env, array, elems, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetIntArrayElements(JNIEnv *__env, jclass clazz, jintArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetIntArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseIntArrayElements(JNIEnv *__env, jclass clazz, jintArray array, jlong elemsAddress, jint mode) { - jint *elems = (jint *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseIntArrayElements(__env, array, elems, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetLongArrayElements(JNIEnv *__env, jclass clazz, jlongArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetLongArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseLongArrayElements(JNIEnv *__env, jclass clazz, jlongArray array, jlong elemsAddress, jint mode) { - jlong *elems = (jlong *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseLongArrayElements(__env, array, elems, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetFloatArrayElements(JNIEnv *__env, jclass clazz, jfloatArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetFloatArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseFloatArrayElements(JNIEnv *__env, jclass clazz, jfloatArray array, jlong elemsAddress, jint mode) { - jfloat *elems = (jfloat *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseFloatArrayElements(__env, array, elems, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetDoubleArrayElements(JNIEnv *__env, jclass clazz, jdoubleArray array, jlong isCopyAddress) { - jboolean *isCopy = (jboolean *)(uintptr_t)isCopyAddress; - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetDoubleArrayElements(__env, array, isCopy); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nReleaseDoubleArrayElements(JNIEnv *__env, jclass clazz, jdoubleArray array, jlong elemsAddress, jint mode) { - jdouble *elems = (jdouble *)(uintptr_t)elemsAddress; - UNUSED_PARAM(clazz) - (*__env)->ReleaseDoubleArrayElements(__env, array, elems, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetBooleanArrayRegion(JNIEnv *__env, jclass clazz, jbooleanArray array, jint start, jint len, jlong bufAddress) { - jboolean *buf = (jboolean *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetBooleanArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetBooleanArrayRegion(JNIEnv *__env, jclass clazz, jbooleanArray array, jint start, jint len, jlong bufAddress) { - jboolean const *buf = (jboolean const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetBooleanArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetByteArrayRegion(JNIEnv *__env, jclass clazz, jbyteArray array, jint start, jint len, jlong bufAddress) { - jbyte *buf = (jbyte *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetByteArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetByteArrayRegion(JNIEnv *__env, jclass clazz, jbyteArray array, jint start, jint len, jlong bufAddress) { - jbyte const *buf = (jbyte const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetByteArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetCharArrayRegion(JNIEnv *__env, jclass clazz, jcharArray array, jint start, jint len, jlong bufAddress) { - jchar *buf = (jchar *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetCharArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetCharArrayRegion(JNIEnv *__env, jclass clazz, jcharArray array, jint start, jint len, jlong bufAddress) { - jchar const *buf = (jchar const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetCharArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetShortArrayRegion(JNIEnv *__env, jclass clazz, jshortArray array, jint start, jint len, jlong bufAddress) { - jshort *buf = (jshort *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetShortArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetShortArrayRegion(JNIEnv *__env, jclass clazz, jshortArray array, jint start, jint len, jlong bufAddress) { - jshort const *buf = (jshort const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetShortArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetIntArrayRegion(JNIEnv *__env, jclass clazz, jintArray array, jint start, jint len, jlong bufAddress) { - jint *buf = (jint *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetIntArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetIntArrayRegion(JNIEnv *__env, jclass clazz, jintArray array, jint start, jint len, jlong bufAddress) { - jint const *buf = (jint const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetIntArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetLongArrayRegion(JNIEnv *__env, jclass clazz, jlongArray array, jint start, jint len, jlong bufAddress) { - jlong *buf = (jlong *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetLongArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetLongArrayRegion(JNIEnv *__env, jclass clazz, jlongArray array, jint start, jint len, jlong bufAddress) { - jlong const *buf = (jlong const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetLongArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetFloatArrayRegion(JNIEnv *__env, jclass clazz, jfloatArray array, jint start, jint len, jlong bufAddress) { - jfloat *buf = (jfloat *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetFloatArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetFloatArrayRegion(JNIEnv *__env, jclass clazz, jfloatArray array, jint start, jint len, jlong bufAddress) { - jfloat const *buf = (jfloat const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetFloatArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetDoubleArrayRegion(JNIEnv *__env, jclass clazz, jdoubleArray array, jint start, jint len, jlong bufAddress) { - jdouble *buf = (jdouble *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetDoubleArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nSetDoubleArrayRegion(JNIEnv *__env, jclass clazz, jdoubleArray array, jint start, jint len, jlong bufAddress) { - jdouble const *buf = (jdouble const *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->SetDoubleArrayRegion(__env, array, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nRegisterNatives(JNIEnv *__env, jclass clazz, jclass targetClass, jlong methodsAddress, jint nMethods) { - JNINativeMethod const *methods = (JNINativeMethod const *)(uintptr_t)methodsAddress; - UNUSED_PARAM(clazz) - return (*__env)->RegisterNatives(__env, targetClass, methods, nMethods); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_UnregisterNatives(JNIEnv *__env, jclass clazz, jclass targetClass) { - UNUSED_PARAM(clazz) - return (*__env)->UnregisterNatives(__env, targetClass); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetJavaVM(JNIEnv *__env, jclass clazz, jlong vmAddress) { - JavaVM **vm = (JavaVM **)(uintptr_t)vmAddress; - UNUSED_PARAM(clazz) - return (*__env)->GetJavaVM(__env, vm); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetStringRegion(JNIEnv *__env, jclass clazz, jstring str, jint start, jint len, jlong bufAddress) { - jchar *buf = (jchar *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetStringRegion(__env, str, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nGetStringUTFRegion(JNIEnv *__env, jclass clazz, jstring str, jint start, jint len, jlong bufAddress) { - char *buf = (char *)(uintptr_t)bufAddress; - UNUSED_PARAM(clazz) - (*__env)->GetStringUTFRegion(__env, str, (jsize)start, (jsize)len, buf); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_NewWeakGlobalRef(JNIEnv *__env, jclass clazz, jobject obj) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->NewWeakGlobalRef(__env, obj); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nDeleteWeakGlobalRef(JNIEnv *__env, jclass clazz, jlong weakGlobalRefAddress) { - void *weakGlobalRef = (void *)(uintptr_t)weakGlobalRefAddress; - UNUSED_PARAM(clazz) - (*__env)->DeleteWeakGlobalRef(__env, weakGlobalRef); -} - -JNIEXPORT jobject JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_nNewDirectByteBuffer(JNIEnv *__env, jclass clazz, jlong addressAddress, jlong capacity) { - void *address = (void *)(uintptr_t)addressAddress; - UNUSED_PARAM(clazz) - return (*__env)->NewDirectByteBuffer(__env, address, capacity); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_GetDirectBufferAddress(JNIEnv *__env, jclass clazz, jobject buf) { - UNUSED_PARAM(clazz) - return (jlong)(uintptr_t)(*__env)->GetDirectBufferAddress(__env, buf); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_GetObjectRefType(JNIEnv *__env, jclass clazz, jobject obj) { - UNUSED_PARAM(clazz) - return (jint)(*__env)->GetObjectRefType(__env, obj); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_jni_JNINativeInterface_noop(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCErrno.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCErrno.c deleted file mode 100644 index 16f5e699..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCErrno.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" -#include - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCErrno_errno(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)errno; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCErrno_getErrno(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - EnvData *envData = (EnvData *)(*__env)->reserved2; - return envData == (*__env)->reserved0 ? 0 : envData->errnum; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCLocale.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCLocale.c deleted file mode 100644 index 99857903..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCLocale.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" -#include - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCLocale_LC_1ALL(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)LC_ALL; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCLocale_LC_1COLLATE(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)LC_COLLATE; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCLocale_LC_1CTYPE(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)LC_CTYPE; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCLocale_LC_1MONETARY(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)LC_MONETARY; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCLocale_LC_1NUMERIC(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)LC_NUMERIC; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCLocale_LC_1TIME(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)LC_TIME; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCLocale_nsetlocale(JNIEnv *__env, jclass clazz, jint category, jlong localeAddress) { - char const *locale = (char const *)(uintptr_t)localeAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)setlocale(category, locale); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCStdio.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCStdio.c deleted file mode 100644 index 65943c73..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCStdio.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#ifdef LWJGL_WINDOWS - #define _CRT_SECURE_NO_WARNINGS -#endif -#include "common_tools.h" -#include - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCStdio_sscanf(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)sscanf; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCStdio_nvsscanf(JNIEnv *__env, jclass clazz, jlong bufferAddress, jlong formatAddress, jlong vlistAddress) { - char const *buffer = (char const *)(uintptr_t)bufferAddress; - char const *format = (char const *)(uintptr_t)formatAddress; - va_list *vlist = VA_LIST_CAST(uintptr_t)vlistAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)vsscanf(buffer, format, *vlist); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCStdio_snprintf(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)snprintf; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libc_LibCStdio_nvsnprintf(JNIEnv *__env, jclass clazz, jlong bufferAddress, jlong buf_size, jlong formatAddress, jlong vlistAddress) { - char *buffer = (char *)(uintptr_t)bufferAddress; - char const *format = (char const *)(uintptr_t)formatAddress; - va_list *vlist = VA_LIST_CAST(uintptr_t)vlistAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)vsnprintf(buffer, (size_t)buf_size, format, *vlist); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCStdlib.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCStdlib.c deleted file mode 100644 index d5d5560c..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCStdlib.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" -#include -#ifdef LWJGL_WINDOWS - #define __aligned_alloc(alignment, size) _aligned_malloc(size, alignment) - #define __aligned_free _aligned_free -#else - #if defined(__USE_ISOC11) - #define __aligned_alloc aligned_alloc - #else - inline void* __aligned_alloc(size_t alignment, size_t size) { - void *p; - return posix_memalign(&p, alignment, size) ? NULL : p; - } - #endif - #define __aligned_free free -#endif - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCStdlib_nmalloc(JNIEnv *__env, jclass clazz, jlong size) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)malloc((size_t)size); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCStdlib_ncalloc(JNIEnv *__env, jclass clazz, jlong nmemb, jlong size) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)calloc((size_t)nmemb, (size_t)size); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCStdlib_nrealloc(JNIEnv *__env, jclass clazz, jlong ptrAddress, jlong size) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)realloc(ptr, (size_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_libc_LibCStdlib_nfree(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - free(ptr); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCStdlib_naligned_1alloc(JNIEnv *__env, jclass clazz, jlong alignment, jlong size) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)__aligned_alloc((size_t)alignment, (size_t)size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_libc_LibCStdlib_naligned_1free(JNIEnv *__env, jclass clazz, jlong ptrAddress) { - void *ptr = (void *)(uintptr_t)ptrAddress; - UNUSED_PARAMS(__env, clazz) - __aligned_free(ptr); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCString.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCString.c deleted file mode 100644 index 9acc6f3a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libc_LibCString.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#ifdef LWJGL_WINDOWS - #define _CRT_SECURE_NO_WARNINGS -#endif -#include "common_tools.h" -#include - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemset__JIJ(JNIEnv *__env, jclass clazz, jlong destAddress, jint c, jlong count) { - void *dest = (void *)(uintptr_t)destAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)memset(dest, c, (size_t)count); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemcpy__JJJ(JNIEnv *__env, jclass clazz, jlong destAddress, jlong srcAddress, jlong count) { - void *dest = (void *)(uintptr_t)destAddress; - void const *src = (void const *)(uintptr_t)srcAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)memcpy(dest, src, (size_t)count); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemmove__JJJ(JNIEnv *__env, jclass clazz, jlong destAddress, jlong srcAddress, jlong count) { - void *dest = (void *)(uintptr_t)destAddress; - void const *src = (void const *)(uintptr_t)srcAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)memmove(dest, src, (size_t)count); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nstrlen(JNIEnv *__env, jclass clazz, jlong strAddress) { - char const *str = (char const *)(uintptr_t)strAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)strlen(str); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nstrerror(JNIEnv *__env, jclass clazz, jint errnum) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)strerror(errnum); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemset___3BIJ(JNIEnv *__env, jclass clazz, jbyteArray destAddress, jint c, jlong count) { - jlong __result; - jbyte *dest = (*__env)->GetByteArrayElements(__env, destAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memset((void *)dest, c, (size_t)count); - (*__env)->ReleaseByteArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemset___3SIJ(JNIEnv *__env, jclass clazz, jshortArray destAddress, jint c, jlong count) { - jlong __result; - jshort *dest = (*__env)->GetShortArrayElements(__env, destAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memset((void *)dest, c, (size_t)count); - (*__env)->ReleaseShortArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemset___3IIJ(JNIEnv *__env, jclass clazz, jintArray destAddress, jint c, jlong count) { - jlong __result; - jint *dest = (*__env)->GetIntArrayElements(__env, destAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memset((void *)dest, c, (size_t)count); - (*__env)->ReleaseIntArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemset___3JIJ(JNIEnv *__env, jclass clazz, jlongArray destAddress, jint c, jlong count) { - jlong __result; - jlong *dest = (*__env)->GetLongArrayElements(__env, destAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memset((void *)dest, c, (size_t)count); - (*__env)->ReleaseLongArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemset___3FIJ(JNIEnv *__env, jclass clazz, jfloatArray destAddress, jint c, jlong count) { - jlong __result; - jfloat *dest = (*__env)->GetFloatArrayElements(__env, destAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memset((void *)dest, c, (size_t)count); - (*__env)->ReleaseFloatArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemset___3DIJ(JNIEnv *__env, jclass clazz, jdoubleArray destAddress, jint c, jlong count) { - jlong __result; - jdouble *dest = (*__env)->GetDoubleArrayElements(__env, destAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memset((void *)dest, c, (size_t)count); - (*__env)->ReleaseDoubleArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemcpy___3B_3BJ(JNIEnv *__env, jclass clazz, jbyteArray destAddress, jbyteArray srcAddress, jlong count) { - jlong __result; - jbyte *dest = (*__env)->GetByteArrayElements(__env, destAddress, NULL); - jbyte *src = (*__env)->GetByteArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memcpy((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseByteArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseByteArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemcpy___3S_3SJ(JNIEnv *__env, jclass clazz, jshortArray destAddress, jshortArray srcAddress, jlong count) { - jlong __result; - jshort *dest = (*__env)->GetShortArrayElements(__env, destAddress, NULL); - jshort *src = (*__env)->GetShortArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memcpy((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseShortArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseShortArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemcpy___3I_3IJ(JNIEnv *__env, jclass clazz, jintArray destAddress, jintArray srcAddress, jlong count) { - jlong __result; - jint *dest = (*__env)->GetIntArrayElements(__env, destAddress, NULL); - jint *src = (*__env)->GetIntArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memcpy((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseIntArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseIntArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemcpy___3J_3JJ(JNIEnv *__env, jclass clazz, jlongArray destAddress, jlongArray srcAddress, jlong count) { - jlong __result; - jlong *dest = (*__env)->GetLongArrayElements(__env, destAddress, NULL); - jlong *src = (*__env)->GetLongArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memcpy((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseLongArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseLongArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemcpy___3F_3FJ(JNIEnv *__env, jclass clazz, jfloatArray destAddress, jfloatArray srcAddress, jlong count) { - jlong __result; - jfloat *dest = (*__env)->GetFloatArrayElements(__env, destAddress, NULL); - jfloat *src = (*__env)->GetFloatArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memcpy((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseFloatArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseFloatArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemcpy___3D_3DJ(JNIEnv *__env, jclass clazz, jdoubleArray destAddress, jdoubleArray srcAddress, jlong count) { - jlong __result; - jdouble *dest = (*__env)->GetDoubleArrayElements(__env, destAddress, NULL); - jdouble *src = (*__env)->GetDoubleArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memcpy((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseDoubleArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseDoubleArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemmove___3B_3BJ(JNIEnv *__env, jclass clazz, jbyteArray destAddress, jbyteArray srcAddress, jlong count) { - jlong __result; - jbyte *dest = (*__env)->GetByteArrayElements(__env, destAddress, NULL); - jbyte *src = (*__env)->GetByteArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memmove((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseByteArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseByteArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemmove___3S_3SJ(JNIEnv *__env, jclass clazz, jshortArray destAddress, jshortArray srcAddress, jlong count) { - jlong __result; - jshort *dest = (*__env)->GetShortArrayElements(__env, destAddress, NULL); - jshort *src = (*__env)->GetShortArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memmove((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseShortArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseShortArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemmove___3I_3IJ(JNIEnv *__env, jclass clazz, jintArray destAddress, jintArray srcAddress, jlong count) { - jlong __result; - jint *dest = (*__env)->GetIntArrayElements(__env, destAddress, NULL); - jint *src = (*__env)->GetIntArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memmove((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseIntArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseIntArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemmove___3J_3JJ(JNIEnv *__env, jclass clazz, jlongArray destAddress, jlongArray srcAddress, jlong count) { - jlong __result; - jlong *dest = (*__env)->GetLongArrayElements(__env, destAddress, NULL); - jlong *src = (*__env)->GetLongArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memmove((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseLongArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseLongArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemmove___3F_3FJ(JNIEnv *__env, jclass clazz, jfloatArray destAddress, jfloatArray srcAddress, jlong count) { - jlong __result; - jfloat *dest = (*__env)->GetFloatArrayElements(__env, destAddress, NULL); - jfloat *src = (*__env)->GetFloatArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memmove((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseFloatArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseFloatArrayElements(__env, destAddress, dest, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libc_LibCString_nmemmove___3D_3DJ(JNIEnv *__env, jclass clazz, jdoubleArray destAddress, jdoubleArray srcAddress, jlong count) { - jlong __result; - jdouble *dest = (*__env)->GetDoubleArrayElements(__env, destAddress, NULL); - jdouble *src = (*__env)->GetDoubleArrayElements(__env, srcAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)memmove((void *)dest, (void const *)src, (size_t)count); - (*__env)->ReleaseDoubleArrayElements(__env, srcAddress, src, 0); - (*__env)->ReleaseDoubleArrayElements(__env, destAddress, dest, 0); - return __result; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_FFICIF.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_FFICIF.c deleted file mode 100644 index d948727f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_FFICIF.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" -#include - -DISABLE_WARNINGS() -#include "ffi.h" -ENABLE_WARNINGS() -#ifdef LWJGL_WINDOWS - #define alignof __alignof -#else - #include -#endif - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_FFICIF_offsets(JNIEnv *__env, jclass clazz, jlong bufferAddress) { - jint *buffer = (jint *)(uintptr_t)bufferAddress; - - UNUSED_PARAMS(__env, clazz) - - buffer[0] = (jint)offsetof(ffi_cif, abi); - buffer[1] = (jint)offsetof(ffi_cif, nargs); - buffer[2] = (jint)offsetof(ffi_cif, arg_types); - buffer[3] = (jint)offsetof(ffi_cif, rtype); - buffer[4] = (jint)offsetof(ffi_cif, bytes); - buffer[5] = (jint)offsetof(ffi_cif, flags); - - buffer[6] = alignof(ffi_cif); - - return sizeof(ffi_cif); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_FFIClosure.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_FFIClosure.c deleted file mode 100644 index 9f3305d9..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_FFIClosure.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" -#include - -DISABLE_WARNINGS() -#include "ffi.h" -ENABLE_WARNINGS() -#ifdef LWJGL_WINDOWS - #define alignof __alignof -#else - #include -#endif - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_FFIClosure_offsets(JNIEnv *__env, jclass clazz, jlong bufferAddress) { - jint *buffer = (jint *)(uintptr_t)bufferAddress; - - UNUSED_PARAMS(__env, clazz) - - buffer[0] = (jint)offsetof(ffi_closure, cif); - buffer[1] = (jint)offsetof(ffi_closure, fun); - buffer[2] = (jint)offsetof(ffi_closure, user_data); - - buffer[3] = alignof(ffi_closure); - - return sizeof(ffi_closure); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_LibFFI.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_LibFFI.c deleted file mode 100644 index 304d76dd..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_libffi_LibFFI.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" - -DISABLE_WARNINGS() -#define FFI_BUILDING -#include "ffi.h" -ENABLE_WARNINGS() -typedef void (*FFI_FN_TYPE)(void); -typedef void (*FFI_CLOSURE_FUN)(ffi_cif*, void*, void**, void*); - -EXTERN_C_ENTER - -JNIEXPORT jshort JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1TYPE_1DOUBLE(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jshort)FFI_TYPE_DOUBLE; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1WIN64(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_WIN64; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1GNUW64(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_GNUW64; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1UNIX64(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_UNIX64; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1EFI64(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_EFI64; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1SYSV(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_SYSV; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1STDCALL(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_STDCALL; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1THISCALL(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_THISCALL; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1FASTCALL(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_FASTCALL; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1MS_1CDECL(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_MS_CDECL; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1PASCAL(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_PASCAL; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1REGISTER(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_REGISTER; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1VFP(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_VFP; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1FIRST_1ABI(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_FIRST_ABI; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1LAST_1ABI(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_LAST_ABI; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_FFI_1DEFAULT_1ABI(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jint)FFI_DEFAULT_ABI; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1void(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_void; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1uint8(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_uint8; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1sint8(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_sint8; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1uint16(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_uint16; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1sint16(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_sint16; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1uint32(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_uint32; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1sint32(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_sint32; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1uint64(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_uint64; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1sint64(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_sint64; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1uchar(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_uchar; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1schar(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_schar; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1ushort(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_ushort; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1sshort(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_sshort; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1uint(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_uint; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1sint(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_sint; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1ulong(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_ulong; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1slong(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_slong; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1float(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_float; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1double(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_double; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1longdouble(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_longdouble; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1type_1pointer(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&ffi_type_pointer; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1prep_1cif(JNIEnv *__env, jclass clazz, jlong cifAddress, jint abi, jint nargs, jlong rtypeAddress, jlong atypesAddress) { - ffi_cif *cif = (ffi_cif *)(uintptr_t)cifAddress; - ffi_type *rtype = (ffi_type *)(uintptr_t)rtypeAddress; - ffi_type **atypes = (ffi_type **)(uintptr_t)atypesAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)ffi_prep_cif(cif, (ffi_abi)abi, (unsigned int)nargs, rtype, atypes); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1prep_1cif_1var(JNIEnv *__env, jclass clazz, jlong cifAddress, jint abi, jint nfixedargs, jint ntotalargs, jlong rtypeAddress, jlong atypesAddress) { - ffi_cif *cif = (ffi_cif *)(uintptr_t)cifAddress; - ffi_type *rtype = (ffi_type *)(uintptr_t)rtypeAddress; - ffi_type **atypes = (ffi_type **)(uintptr_t)atypesAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)ffi_prep_cif_var(cif, (ffi_abi)abi, (unsigned int)nfixedargs, (unsigned int)ntotalargs, rtype, atypes); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1call(JNIEnv *__env, jclass clazz, jlong cifAddress, jlong fnAddress, jlong rvalueAddress, jlong avaluesAddress) { - ffi_cif *cif = (ffi_cif *)(uintptr_t)cifAddress; - FFI_FN_TYPE fn = (FFI_FN_TYPE)(uintptr_t)fnAddress; - void *rvalue = (void *)(uintptr_t)rvalueAddress; - void **avalues = (void **)(uintptr_t)avaluesAddress; - UNUSED_PARAMS(__env, clazz) - ffi_call(cif, fn, rvalue, avalues); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1get_1struct_1offsets(JNIEnv *__env, jclass clazz, jint abi, jlong struct_typeAddress, jlong offsetsAddress) { - ffi_type *struct_type = (ffi_type *)(uintptr_t)struct_typeAddress; - size_t *offsets = (size_t *)(uintptr_t)offsetsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)ffi_get_struct_offsets((ffi_abi)abi, struct_type, offsets); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1closure_1alloc(JNIEnv *__env, jclass clazz, jlong size, jlong codeAddress) { - void **code = (void **)(uintptr_t)codeAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)ffi_closure_alloc((size_t)size, code); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1closure_1free(JNIEnv *__env, jclass clazz, jlong writableAddress) { - ffi_closure *writable = (ffi_closure *)(uintptr_t)writableAddress; - UNUSED_PARAMS(__env, clazz) - ffi_closure_free(writable); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_libffi_LibFFI_nffi_1prep_1closure_1loc(JNIEnv *__env, jclass clazz, jlong closureAddress, jlong cifAddress, jlong funAddress, jlong user_dataAddress, jlong codelocAddress) { - ffi_closure *closure = (ffi_closure *)(uintptr_t)closureAddress; - ffi_cif *cif = (ffi_cif *)(uintptr_t)cifAddress; - FFI_CLOSURE_FUN fun = (FFI_CLOSURE_FUN)(uintptr_t)funAddress; - void *user_data = (void *)(uintptr_t)user_dataAddress; - void *codeloc = (void *)(uintptr_t)codelocAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)ffi_prep_closure_loc(closure, cif, fun, user_data, codeloc); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_linux_DynamicLinkLoader.c b/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_linux_DynamicLinkLoader.c deleted file mode 100644 index 952c1a59..00000000 --- a/FCLauncher/src/main/jni/lwjgl/org_lwjgl_system_linux_DynamicLinkLoader.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "common_tools.h" -#include "FCLLWJGL.h" -#include - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlopen(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint mode) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)dlopen(filename, mode); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlerror(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)dlerror(); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlsym(JNIEnv *__env, jclass clazz, jlong handleAddress, jlong nameAddress) { - void *handle = (void *)(uintptr_t)handleAddress; - char const *name = (char const *)(uintptr_t)nameAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)dlsym(handle, name); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_system_linux_DynamicLinkLoader_ndlclose(JNIEnv *__env, jclass clazz, jlong handleAddress) { - void *handle = (void *)(uintptr_t)handleAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)dlclose(handle); -} - -EXTERN_C_EXIT \ No newline at end of file diff --git a/FCLauncher/src/main/jni/lwjgl/oui.h b/FCLauncher/src/main/jni/lwjgl/oui.h deleted file mode 100644 index 8fe110e8..00000000 --- a/FCLauncher/src/main/jni/lwjgl/oui.h +++ /dev/null @@ -1,2033 +0,0 @@ -/* -OUI - A minimal semi-immediate GUI handling & layouting library - -Copyright (c) 2014 Leonard Ritter - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - */ - -#ifndef _OUI_H_ -#define _OUI_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -Revision 4 (2014-12-17) - -OUI (short for "Open UI", spoken like the french "oui" for "yes") is a -platform agnostic single-header C library for layouting GUI elements and -handling related user input. Together with a set of widget drawing and logic -routines it can be used to build complex user interfaces. - -OUI is a semi-immediate GUI. Widget declarations are persistent for the duration -of the setup and evaluation, but do not need to be kept around longer than one -frame. - -OUI has no widget types; instead, it provides only one kind of element, "Items", -which can be tailored to the application by the user and expanded with custom -buffers and event handlers to behave as containers, buttons, sliders, radio -buttons, and so on. - -OUI also does not draw anything; Instead it provides a set of functions to -iterate and query the layouted items in order to allow client code to render -each widget with its current state using a preferred graphics library. - -See example.cpp in the repository for a full usage example. - -A basic setup for OUI usage in C looks like this: -================================================= - -// a header for each widget -typedef struct Data { - int type; - UIhandler handler; -} Data; - -/// global event dispatch -void ui_handler(int item, UIevent event) { - Data *data = (Data *)uiGetHandle(item); - if (data && data->handler) { - data->handler(item, event); - } -} - -void app_main(...) { - UIcontext *context = uiCreateContext(4096, 1<<20); - uiMakeCurrent(context); - uiSetHandler(ui_handler); - - while (app_running()) { - // update position of mouse cursor; the ui can also be updated - // from received events. - uiSetCursor(app_get_mouse_x(), app_get_mouse_y()); - - // update button state - for (int i = 0; i < 3; ++i) - uiSetButton(i, app_get_button_state(i)); - - // you can also send keys and scroll events; see example.cpp for more - - // -------------- - // this section does not have to be regenerated on frame; a good - // policy is to invalidate it on events, as this usually alters - // structure and layout. - - // begin new UI declarations - uiBeginLayout(); - - // - UI setup code goes here - - app_setup_ui(); - - // layout UI - uiEndLayout(); - - // -------------- - - // draw UI, starting with the first item, index 0 - app_draw_ui(render_context,0); - - // update states and fire handlers - uiProcess(get_time_ms()); - } - - uiDestroyContext(context); -} - -Here's an example setup for a checkbox control: -=============================================== - -typedef struct CheckBoxData { - Data head; - const char *label; - bool *checked; -} CheckBoxData; - -// called when the item is clicked (see checkbox()) -void app_checkbox_handler(int item, UIevent event) { - // retrieve custom data (see checkbox()) - CheckBoxData *data = (CheckBoxData *)uiGetHandle(item); - - switch(event) { - default: break; - case UI_BUTTON0_DOWN: { - // toggle value - *data->checked = !(*data->checked); - } break; - } -} - -// creates a checkbox control for a pointer to a boolean -int checkbox(const char *label, bool *checked) { - - // create new ui item - int item = uiItem(); - - // set minimum size of wiget; horizontal size is dynamic, vertical is fixed - uiSetSize(item, 0, APP_WIDGET_HEIGHT); - - // store some custom data with the checkbox that we use for rendering - // and value changes. - CheckBoxData *data = (CheckBoxData *)uiAllocHandle(item, sizeof(CheckBoxData)); - - // assign a custom typeid to the data so the renderer knows how to - // render this control, and our event handler - data->head.type = APP_WIDGET_CHECKBOX; - data->head.handler = app_checkbox_handler; - data->label = label; - data->checked = checked; - - // set to fire as soon as the left button is - // pressed; UI_BUTTON0_HOT_UP is also a popular alternative. - uiSetEvents(item, UI_BUTTON0_DOWN); - - return item; -} - -A simple recursive drawing routine can look like this: -====================================================== - -void app_draw_ui(AppRenderContext *ctx, int item) { - // retrieve custom data and cast it to Data; we assume the first member - // of every widget data item to be a Data field. - Data *head = (Data *)uiGetHandle(item); - - // if a handle is set, this is a specialized widget - if (head) { - // get the widgets absolute rectangle - UIrect rect = uiGetRect(item); - - switch(head->type) { - default: break; - case APP_WIDGET_LABEL: { - // ... - } break; - case APP_WIDGET_BUTTON: { - // ... - } break; - case APP_WIDGET_CHECKBOX: { - // cast to the full data type - CheckBoxData *data = (CheckBoxData*)head; - - // get the widgets current state - int state = uiGetState(item); - - // if the value is set, the state is always active - if (*data->checked) - state = UI_ACTIVE; - - // draw the checkbox - app_draw_checkbox(ctx, rect, state, data->label); - } break; - } - } - - // iterate through all children and draw - int kid = uiFirstChild(item); - while (kid != -1) { - app_draw_ui(ctx, kid); - kid = uiNextSibling(kid); - } -} - -Layouting items works like this: -================================ - -void layout_window(int w, int h) { - // create root item; the first item always has index 0 - int parent = uiItem(); - // assign fixed size - uiSetSize(parent, w, h); - - // create column box and use as new parent - parent = uiInsert(parent, uiItem()); - // configure as column - uiSetBox(parent, UI_COLUMN); - // span horizontally, attach to top - uiSetLayout(parent, UI_HFILL | UI_TOP); - - // add a label - we're assuming custom control functions to exist - int item = uiInsert(parent, label("Hello World")); - // set a fixed height for the label - uiSetSize(item, 0, APP_WIDGET_HEIGHT); - // span the label horizontally - uiSetLayout(item, UI_HFILL); - - static bool checked = false; - - // add a checkbox to the same parent as item; this is faster than - // calling uiInsert on the same parent repeatedly. - item = uiAppend(item, checkbox("Checked:", &checked)); - // set a fixed height for the checkbox - uiSetSize(item, 0, APP_WIDGET_HEIGHT); - // span the checkbox in the same way as the label - uiSetLayout(item, UI_HFILL); -} - - - - */ - -// you can override this from the outside to pick -// the export level you need -#ifndef OUI_EXPORT -#define OUI_EXPORT -#endif - -// some language bindings (e.g. terra) have no good support -// for unions or unnamed structs; -// #define OUI_USE_UNION_VECTORS 0 to disable. -#ifndef OUI_USE_UNION_VECTORS -#define OUI_USE_UNION_VECTORS 1 -#endif - -// limits - -enum { - // maximum size in bytes of a single data buffer passed to uiAllocData(). - UI_MAX_DATASIZE = 4096, - // maximum depth of nested containers - UI_MAX_DEPTH = 64, - // maximum number of buffered input events - UI_MAX_INPUT_EVENTS = 64, - // consecutive click threshold in ms - UI_CLICK_THRESHOLD = 250, -}; - -typedef unsigned int UIuint; - -// opaque UI context -typedef struct UIcontext UIcontext; - -// item states as returned by uiGetState() - -typedef enum UIitemState { - // the item is inactive - UI_COLD = 0, - // the item is inactive, but the cursor is hovering over this item - UI_HOT = 1, - // the item is toggled, activated, focused (depends on item kind) - UI_ACTIVE = 2, - // the item is unresponsive - UI_FROZEN = 3, -} UIitemState; - -// container flags to pass to uiSetBox() -typedef enum UIboxFlags { - // flex-direction (bit 0+1) - - // left to right - UI_ROW = 0x002, - // top to bottom - UI_COLUMN = 0x003, - - // model (bit 1) - - // free layout - UI_LAYOUT = 0x000, - // flex model - UI_FLEX = 0x002, - - // flex-wrap (bit 2) - - // single-line - UI_NOWRAP = 0x000, - // multi-line, wrap left to right - UI_WRAP = 0x004, - - - // justify-content (start, end, center, space-between) - // at start of row/column - UI_START = 0x008, - // at center of row/column - UI_MIDDLE = 0x000, - // at end of row/column - UI_END = 0x010, - // insert spacing to stretch across whole row/column - UI_JUSTIFY = 0x018, - - // align-items - // can be implemented by putting a flex container in a layout container, - // then using UI_TOP, UI_DOWN, UI_VFILL, UI_VCENTER, etc. - // FILL is equivalent to stretch/grow - - // align-content (start, end, center, stretch) - // can be implemented by putting a flex container in a layout container, - // then using UI_TOP, UI_DOWN, UI_VFILL, UI_VCENTER, etc. - // FILL is equivalent to stretch; space-between is not supported. -} UIboxFlags; - -// child layout flags to pass to uiSetLayout() -typedef enum UIlayoutFlags { - // attachments (bit 5-8) - // fully valid when parent uses UI_LAYOUT model - // partially valid when in UI_FLEX model - - // anchor to left item or left side of parent - UI_LEFT = 0x020, - // anchor to top item or top side of parent - UI_TOP = 0x040, - // anchor to right item or right side of parent - UI_RIGHT = 0x080, - // anchor to bottom item or bottom side of parent - UI_DOWN = 0x100, - // anchor to both left and right item or parent borders - UI_HFILL = 0x0a0, - // anchor to both top and bottom item or parent borders - UI_VFILL = 0x140, - // center horizontally, with left margin as offset - UI_HCENTER = 0x000, - // center vertically, with top margin as offset - UI_VCENTER = 0x000, - // center in both directions, with left/top margin as offset - UI_CENTER = 0x000, - // anchor to all four directions - UI_FILL = 0x1e0, - // when wrapping, put this element on a new line - // wrapping layout code auto-inserts UI_BREAK flags, - // drawing routines can read them with uiGetLayout() - UI_BREAK = 0x200 -} UIlayoutFlags; - -// event flags -typedef enum UIevent { - // on button 0 down - UI_BUTTON0_DOWN = 0x0400, - // on button 0 up - // when this event has a handler, uiGetState() will return UI_ACTIVE as - // long as button 0 is down. - UI_BUTTON0_UP = 0x0800, - // on button 0 up while item is hovered - // when this event has a handler, uiGetState() will return UI_ACTIVE - // when the cursor is hovering the items rectangle; this is the - // behavior expected for buttons. - UI_BUTTON0_HOT_UP = 0x1000, - // item is being captured (button 0 constantly pressed); - // when this event has a handler, uiGetState() will return UI_ACTIVE as - // long as button 0 is down. - UI_BUTTON0_CAPTURE = 0x2000, - // on button 2 down (right mouse button, usually triggers context menu) - UI_BUTTON2_DOWN = 0x4000, - // item has received a scrollwheel event - // the accumulated wheel offset can be queried with uiGetScroll() - UI_SCROLL = 0x8000, - // item is focused and has received a key-down event - // the respective key can be queried using uiGetKey() and uiGetModifier() - UI_KEY_DOWN = 0x10000, - // item is focused and has received a key-up event - // the respective key can be queried using uiGetKey() and uiGetModifier() - UI_KEY_UP = 0x20000, - // item is focused and has received a character event - // the respective character can be queried using uiGetKey() - UI_CHAR = 0x40000, -} UIevent; - -enum { - // these bits, starting at bit 24, can be safely assigned by the - // application, e.g. as item types, other event types, drop targets, etc. - // they can be set and queried using uiSetFlags() and uiGetFlags() - UI_USERMASK = 0xff000000, - - // a special mask passed to uiFindItem() - UI_ANY = 0xffffffff, -}; - -// handler callback; event is one of UI_EVENT_* -typedef void (*UIhandler)(int item, UIevent event); - -// for cursor positions, mainly -typedef struct UIvec2 { -#if OUI_USE_UNION_VECTORS || defined(OUI_IMPLEMENTATION) - union { - int v[2]; - struct { int x, y; }; - }; -#else - int x, y; -#endif -} UIvec2; - -// layout rectangle -typedef struct UIrect { -#if OUI_USE_UNION_VECTORS || defined(OUI_IMPLEMENTATION) - union { - int v[4]; - struct { int x, y, w, h; }; - }; -#else - int x, y, w, h; -#endif -} UIrect; - -// unless declared otherwise, all operations have the complexity O(1). - -// Context Management -// ------------------ - -// create a new UI context; call uiMakeCurrent() to make this context the -// current context. The context is managed by the client and must be released -// using uiDestroyContext() -// item_capacity is the maximum of number of items that can be declared. -// buffer_capacity is the maximum total size of bytes that can be allocated -// using uiAllocHandle(); you may pass 0 if you don't need to allocate -// handles. -// 4096 and (1<<20) are good starting values. -OUI_EXPORT UIcontext *uiCreateContext( - unsigned int item_capacity, - unsigned int buffer_capacity); - -// select an UI context as the current context; a context must always be -// selected before using any of the other UI functions -OUI_EXPORT void uiMakeCurrent(UIcontext *ctx); - -// release the memory of an UI context created with uiCreateContext(); if the -// context is the current context, the current context will be set to NULL -OUI_EXPORT void uiDestroyContext(UIcontext *ctx); - -// returns the currently selected context or NULL -OUI_EXPORT UIcontext *uiGetContext(); - -// Input Control -// ------------- - -// sets the current cursor position (usually belonging to a mouse) to the -// screen coordinates at (x,y) -OUI_EXPORT void uiSetCursor(int x, int y); - -// returns the current cursor position in screen coordinates as set by -// uiSetCursor() -OUI_EXPORT UIvec2 uiGetCursor(); - -// returns the offset of the cursor relative to the last call to uiProcess() -OUI_EXPORT UIvec2 uiGetCursorDelta(); - -// returns the beginning point of a drag operation. -OUI_EXPORT UIvec2 uiGetCursorStart(); - -// returns the offset of the cursor relative to the beginning point of a drag -// operation. -OUI_EXPORT UIvec2 uiGetCursorStartDelta(); - -// sets a mouse or gamepad button as pressed/released -// button is in the range 0..63 and maps to an application defined input -// source. -// mod is an application defined set of flags for modifier keys -// enabled is 1 for pressed, 0 for released -OUI_EXPORT void uiSetButton(unsigned int button, unsigned int mod, int enabled); - -// returns the current state of an application dependent input button -// as set by uiSetButton(). -// the function returns 1 if the button has been set to pressed, 0 for released. -OUI_EXPORT int uiGetButton(unsigned int button); - -// returns the number of chained clicks; 1 is a single click, -// 2 is a double click, etc. -OUI_EXPORT int uiGetClicks(); - -// sets a key as down/up; the key can be any application defined keycode -// mod is an application defined set of flags for modifier keys -// enabled is 1 for key down, 0 for key up -// all key events are being buffered until the next call to uiProcess() -OUI_EXPORT void uiSetKey(unsigned int key, unsigned int mod, int enabled); - -// sends a single character for text input; the character is usually in the -// unicode range, but can be application defined. -// all char events are being buffered until the next call to uiProcess() -OUI_EXPORT void uiSetChar(unsigned int value); - -// accumulates scroll wheel offsets for the current frame -// all offsets are being accumulated until the next call to uiProcess() -OUI_EXPORT void uiSetScroll(int x, int y); - -// returns the currently accumulated scroll wheel offsets for this frame -OUI_EXPORT UIvec2 uiGetScroll(); - - - - - -// Stages -// ------ - -// clear the item buffer; uiBeginLayout() should be called before the first -// UI declaration for this frame to avoid concatenation of the same UI multiple -// times. -// After the call, all previously declared item IDs are invalid, and all -// application dependent context data has been freed. -// uiBeginLayout() must be followed by uiEndLayout(). -OUI_EXPORT void uiBeginLayout(); - -// layout all added items starting from the root item 0. -// after calling uiEndLayout(), no further modifications to the item tree should -// be done until the next call to uiBeginLayout(). -// It is safe to immediately draw the items after a call to uiEndLayout(). -// this is an O(N) operation for N = number of declared items. -OUI_EXPORT void uiEndLayout(); - -// update the current hot item; this only needs to be called if items are kept -// for more than one frame and uiEndLayout() is not called -OUI_EXPORT void uiUpdateHotItem(); - -// update the internal state according to the current cursor position and -// button states, and call all registered handlers. -// timestamp is the time in milliseconds relative to the last call to uiProcess() -// and is used to estimate the threshold for double-clicks -// after calling uiProcess(), no further modifications to the item tree should -// be done until the next call to uiBeginLayout(). -// Items should be drawn before a call to uiProcess() -// this is an O(N) operation for N = number of declared items. -OUI_EXPORT void uiProcess(int timestamp); - -// reset the currently stored hot/active etc. handles; this should be called when -// a re-declaration of the UI changes the item indices, to avoid state -// related glitches because item identities have changed. -OUI_EXPORT void uiClearState(); - -// UI Declaration -// -------------- - -// create a new UI item and return the new items ID. -OUI_EXPORT int uiItem(); - -// set an items state to frozen; the UI will not recurse into frozen items -// when searching for hot or active items; subsequently, frozen items and -// their child items will not cause mouse event notifications. -// The frozen state is not applied recursively; uiGetState() will report -// UI_COLD for child items. Upon encountering a frozen item, the drawing -// routine needs to handle rendering of child items appropriately. -// see example.cpp for a demonstration. -OUI_EXPORT void uiSetFrozen(int item, int enable); - -// set the application-dependent handle of an item. -// handle is an application defined 64-bit handle. If handle is NULL, the item -// will not be interactive. -OUI_EXPORT void uiSetHandle(int item, void *handle); - -// allocate space for application-dependent context data and assign it -// as the handle to the item. -// The memory of the pointer is managed by the UI context and released -// upon the next call to uiBeginLayout() -OUI_EXPORT void *uiAllocHandle(int item, unsigned int size); - -// set the global handler callback for interactive items. -// the handler will be called for each item whose event flags are set using -// uiSetEvents. -OUI_EXPORT void uiSetHandler(UIhandler handler); - -// flags is a combination of UI_EVENT_* and designates for which events the -// handler should be called. -OUI_EXPORT void uiSetEvents(int item, unsigned int flags); - -// flags is a user-defined set of flags defined by UI_USERMASK. -OUI_EXPORT void uiSetFlags(int item, unsigned int flags); - -// assign an item to a container. -// an item ID of 0 refers to the root item. -// the function returns the child item ID -// if the container has already added items, the function searches -// for the last item and calls uiAppend() on it, which is an -// O(N) operation for N siblings. -// it is usually more efficient to call uiInsert() for the first child, -// then chain additional siblings using uiAppend(). -OUI_EXPORT int uiInsert(int item, int child); - -// assign an item to the same container as another item -// sibling is inserted after item. -OUI_EXPORT int uiAppend(int item, int sibling); - -// insert child into container item like uiInsert(), but prepend -// it to the first child item, effectively putting it in -// the background. -// it is efficient to call uiInsertBack() repeatedly -// in cases where drawing or layout order doesn't matter. -OUI_EXPORT int uiInsertBack(int item, int child); - -// same as uiInsert() -OUI_EXPORT int uiInsertFront(int item, int child); - -// set the size of the item; a size of 0 indicates the dimension to be -// dynamic; if the size is set, the item can not expand beyond that size. -OUI_EXPORT void uiSetSize(int item, int w, int h); - -// set the anchoring behavior of the item to one or multiple UIlayoutFlags -OUI_EXPORT void uiSetLayout(int item, unsigned int flags); - -// set the box model behavior of the item to one or multiple UIboxFlags -OUI_EXPORT void uiSetBox(int item, unsigned int flags); - -// set the left, top, right and bottom margins of an item; when the item is -// anchored to the parent or another item, the margin controls the distance -// from the neighboring element. -OUI_EXPORT void uiSetMargins(int item, short l, short t, short r, short b); - -// set item as recipient of all keyboard events; if item is -1, no item will -// be focused. -OUI_EXPORT void uiFocus(int item); - -// Iteration -// --------- - -// returns the first child item of a container item. If the item is not -// a container or does not contain any items, -1 is returned. -// if item is 0, the first child item of the root item will be returned. -OUI_EXPORT int uiFirstChild(int item); - -// returns an items next sibling in the list of the parent containers children. -// if item is 0 or the item is the last child item, -1 will be returned. -OUI_EXPORT int uiNextSibling(int item); - -// Querying -// -------- - -// return the total number of allocated items -OUI_EXPORT int uiGetItemCount(); - -// return the total bytes that have been allocated by uiAllocHandle() -OUI_EXPORT unsigned int uiGetAllocSize(); - -// return the current state of the item. This state is only valid after -// a call to uiProcess(). -// The returned value is one of UI_COLD, UI_HOT, UI_ACTIVE, UI_FROZEN. -OUI_EXPORT UIitemState uiGetState(int item); - -// return the application-dependent handle of the item as passed to uiSetHandle() -// or uiAllocHandle(). -OUI_EXPORT void *uiGetHandle(int item); - -// return the item that is currently under the cursor or -1 for none -OUI_EXPORT int uiGetHotItem(); - -// return the item that is currently focused or -1 for none -OUI_EXPORT int uiGetFocusedItem(); - -// returns the topmost item containing absolute location (x,y), starting with -// item as parent, using a set of flags and masks as filter: -// if both flags and mask are UI_ANY, the first topmost item is returned. -// if mask is UI_ANY, the first topmost item matching *any* of flags is returned. -// otherwise the first item matching (item.flags & flags) == mask is returned. -// you may combine box, layout, event and user flags. -// frozen items will always be ignored. -OUI_EXPORT int uiFindItem(int item, int x, int y, - unsigned int flags, unsigned int mask); - -// return the handler callback as passed to uiSetHandler() -OUI_EXPORT UIhandler uiGetHandler(); -// return the event flags for an item as passed to uiSetEvents() -OUI_EXPORT unsigned int uiGetEvents(int item); -// return the user-defined flags for an item as passed to uiSetFlags() -OUI_EXPORT unsigned int uiGetFlags(int item); - -// when handling a KEY_DOWN/KEY_UP event: the key that triggered this event -OUI_EXPORT unsigned int uiGetKey(); -// when handling a keyboard or mouse event: the active modifier keys -OUI_EXPORT unsigned int uiGetModifier(); - -// returns the items layout rectangle in absolute coordinates. If -// uiGetRect() is called before uiEndLayout(), the values of the returned -// rectangle are undefined. -OUI_EXPORT UIrect uiGetRect(int item); - -// returns 1 if an items absolute rectangle contains a given coordinate -// otherwise 0 -OUI_EXPORT int uiContains(int item, int x, int y); - -// return the width of the item as set by uiSetSize() -OUI_EXPORT int uiGetWidth(int item); -// return the height of the item as set by uiSetSize() -OUI_EXPORT int uiGetHeight(int item); - -// return the anchoring behavior as set by uiSetLayout() -OUI_EXPORT unsigned int uiGetLayout(int item); -// return the box model as set by uiSetBox() -OUI_EXPORT unsigned int uiGetBox(int item); - -// return the left margin of the item as set with uiSetMargins() -OUI_EXPORT short uiGetMarginLeft(int item); -// return the top margin of the item as set with uiSetMargins() -OUI_EXPORT short uiGetMarginTop(int item); -// return the right margin of the item as set with uiSetMargins() -OUI_EXPORT short uiGetMarginRight(int item); -// return the bottom margin of the item as set with uiSetMargins() -OUI_EXPORT short uiGetMarginDown(int item); - -// when uiBeginLayout() is called, the most recently declared items are retained. -// when uiEndLayout() completes, it matches the old item hierarchy to the new one -// and attempts to map old items to new items as well as possible. -// when passed an item Id from the previous frame, uiRecoverItem() returns the -// items new assumed Id, or -1 if the item could not be mapped. -// it is valid to pass -1 as item. -OUI_EXPORT int uiRecoverItem(int olditem); - -// in cases where it is important to recover old state over changes in -// the view, and the built-in remapping fails, the UI declaration can manually -// remap old items to new IDs in cases where e.g. the previous item ID has been -// temporarily saved; uiRemapItem() would then be called after creating the -// new item using uiItem(). -OUI_EXPORT void uiRemapItem(int olditem, int newitem); - -// returns the number if items that have been allocated in the last frame -OUI_EXPORT int uiGetLastItemCount(); - -#ifdef __cplusplus -}; -#endif - -#endif // _OUI_H_ - -#ifdef OUI_IMPLEMENTATION - -#include - -#ifdef _MSC_VER - #pragma warning (disable: 4996) // Switch off security warnings - #pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings - #pragma warning (disable: 4244) - #pragma warning (disable: 4305) - - #ifdef __cplusplus - #define UI_INLINE inline - #else - #define UI_INLINE static inline - #endif -#else - #define UI_INLINE static inline -#endif - -#define UI_MAX_KIND 16 - -#define UI_ANY_BUTTON0_INPUT (UI_BUTTON0_DOWN \ - |UI_BUTTON0_UP \ - |UI_BUTTON0_HOT_UP \ - |UI_BUTTON0_CAPTURE) - -#define UI_ANY_BUTTON2_INPUT (UI_BUTTON2_DOWN) - -#define UI_ANY_MOUSE_INPUT (UI_ANY_BUTTON0_INPUT \ - |UI_ANY_BUTTON2_INPUT) - -#define UI_ANY_KEY_INPUT (UI_KEY_DOWN \ - |UI_KEY_UP \ - |UI_CHAR) - -#define UI_ANY_INPUT (UI_ANY_MOUSE_INPUT \ - |UI_ANY_KEY_INPUT) - -enum { - // extra item flags - - // bit 0-2 - UI_ITEM_BOX_MODEL_MASK = 0x000007, - // bit 0-4 - UI_ITEM_BOX_MASK = 0x00001F, - // bit 5-8 - UI_ITEM_LAYOUT_MASK = 0x0003E0, - // bit 9-18 - UI_ITEM_EVENT_MASK = 0x07FC00, - // item is frozen (bit 19) - UI_ITEM_FROZEN = 0x080000, - // item handle is pointer to data (bit 20) - UI_ITEM_DATA = 0x100000, - // item has been inserted (bit 21) - UI_ITEM_INSERTED = 0x200000, - // horizontal size has been explicitly set (bit 22) - UI_ITEM_HFIXED = 0x400000, - // vertical size has been explicitly set (bit 23) - UI_ITEM_VFIXED = 0x800000, - // bit 22-23 - UI_ITEM_FIXED_MASK = 0xC00000, - - // which flag bits will be compared - UI_ITEM_COMPARE_MASK = UI_ITEM_BOX_MODEL_MASK - | (UI_ITEM_LAYOUT_MASK & ~UI_BREAK) - | UI_ITEM_EVENT_MASK - | UI_USERMASK, -}; - -typedef struct UIitem { - // data handle - void *handle; - - // about 27 bits worth of flags - unsigned int flags; - - // index of first kid - // if old item: index of equivalent new item - int firstkid; - // index of next sibling with same parent - int nextitem; - - // margin offsets, interpretation depends on flags - // after layouting, the first two components are absolute coordinates - short margins[4]; - // size - short size[2]; -} UIitem; - -typedef enum UIstate { - UI_STATE_IDLE = 0, - UI_STATE_CAPTURE, -} UIstate; - -typedef enum UIstage { - UI_STAGE_LAYOUT = 0, - UI_STAGE_POST_LAYOUT, - UI_STAGE_PROCESS, -} UIstage; - -typedef struct UIhandleEntry { - unsigned int key; - int item; -} UIhandleEntry; - -typedef struct UIinputEvent { - unsigned int key; - unsigned int mod; - UIevent event; -} UIinputEvent; - -struct UIcontext { - unsigned int item_capacity; - unsigned int buffer_capacity; - - // handler - UIhandler handler; - - // button state in this frame - unsigned long long buttons; - // button state in the previous frame - unsigned long long last_buttons; - - // where the cursor was at the beginning of the active state - UIvec2 start_cursor; - // where the cursor was last frame - UIvec2 last_cursor; - // where the cursor is currently - UIvec2 cursor; - // accumulated scroll wheel offsets - UIvec2 scroll; - - int active_item; - int focus_item; - int last_hot_item; - int last_click_item; - int hot_item; - - UIstate state; - UIstage stage; - unsigned int active_key; - unsigned int active_modifier; - unsigned int active_button_modifier; - int last_timestamp; - int last_click_timestamp; - int clicks; - - int count; - int last_count; - int eventcount; - unsigned int datasize; - - UIitem *items; - unsigned char *data; - UIitem *last_items; - int *item_map; - UIinputEvent events[UI_MAX_INPUT_EVENTS]; -}; - -UI_INLINE int ui_max(int a, int b) { - return (a>b)?a:b; -} - -UI_INLINE int ui_min(int a, int b) { - return (ab)?a:b; -} - -UI_INLINE float ui_minf(float a, float b) { - return (alast_count = ui_context->count; - ui_context->count = 0; - ui_context->datasize = 0; - ui_context->hot_item = -1; - // swap buffers - UIitem *items = ui_context->items; - ui_context->items = ui_context->last_items; - ui_context->last_items = items; - for (int i = 0; i < ui_context->last_count; ++i) { - ui_context->item_map[i] = -1; - } -} - -UIcontext *uiCreateContext( - unsigned int item_capacity, - unsigned int buffer_capacity) { - assert(item_capacity); - UIcontext *ctx = (UIcontext *)org_lwjgl_malloc(sizeof(UIcontext)); - memset(ctx, 0, sizeof(UIcontext)); - ctx->item_capacity = item_capacity; - ctx->buffer_capacity = buffer_capacity; - ctx->stage = UI_STAGE_PROCESS; - ctx->items = (UIitem *)org_lwjgl_malloc(sizeof(UIitem) * item_capacity); - ctx->last_items = (UIitem *)org_lwjgl_malloc(sizeof(UIitem) * item_capacity); - ctx->item_map = (int *)org_lwjgl_malloc(sizeof(int) * item_capacity); - if (buffer_capacity) { - ctx->data = (unsigned char *)org_lwjgl_malloc(buffer_capacity); - } - - UIcontext *oldctx = ui_context; - uiMakeCurrent(ctx); - uiClear(); - uiClearState(); - uiMakeCurrent(oldctx); - return ctx; -} - -void uiMakeCurrent(UIcontext *ctx) { - ui_context = ctx; -} - -void uiDestroyContext(UIcontext *ctx) { - if (ui_context == ctx) - uiMakeCurrent(NULL); - org_lwjgl_free(ctx->items); - org_lwjgl_free(ctx->last_items); - org_lwjgl_free(ctx->item_map); - org_lwjgl_free(ctx->data); - org_lwjgl_free(ctx); -} - -OUI_EXPORT UIcontext *uiGetContext() { - return ui_context; -} - -void uiSetButton(unsigned int button, unsigned int mod, int enabled) { - assert(ui_context); - unsigned long long mask = 1ull<buttons = (enabled)? - (ui_context->buttons | mask): - (ui_context->buttons & ~mask); - ui_context->active_button_modifier = mod; -} - -static void uiAddInputEvent(UIinputEvent event) { - assert(ui_context); - if (ui_context->eventcount == UI_MAX_INPUT_EVENTS) return; - ui_context->events[ui_context->eventcount++] = event; -} - -static void uiClearInputEvents() { - assert(ui_context); - ui_context->eventcount = 0; - ui_context->scroll.x = 0; - ui_context->scroll.y = 0; -} - -void uiSetKey(unsigned int key, unsigned int mod, int enabled) { - assert(ui_context); - UIinputEvent event = { key, mod, enabled?UI_KEY_DOWN:UI_KEY_UP }; - uiAddInputEvent(event); -} - -void uiSetChar(unsigned int value) { - assert(ui_context); - UIinputEvent event = { value, 0, UI_CHAR }; - uiAddInputEvent(event); -} - -void uiSetScroll(int x, int y) { - assert(ui_context); - ui_context->scroll.x += x; - ui_context->scroll.y += y; -} - -UIvec2 uiGetScroll() { - assert(ui_context); - return ui_context->scroll; -} - -int uiGetLastButton(int button) { - assert(ui_context); - return (ui_context->last_buttons & (1ull<buttons & (1ull<cursor.x = x; - ui_context->cursor.y = y; -} - -UIvec2 uiGetCursor() { - assert(ui_context); - return ui_context->cursor; -} - -UIvec2 uiGetCursorStart() { - assert(ui_context); - return ui_context->start_cursor; -} - -UIvec2 uiGetCursorDelta() { - assert(ui_context); - UIvec2 result = {{{ - ui_context->cursor.x - ui_context->last_cursor.x, - ui_context->cursor.y - ui_context->last_cursor.y - }}}; - return result; -} - -UIvec2 uiGetCursorStartDelta() { - assert(ui_context); - UIvec2 result = {{{ - ui_context->cursor.x - ui_context->start_cursor.x, - ui_context->cursor.y - ui_context->start_cursor.y - }}}; - return result; -} - -unsigned int uiGetKey() { - assert(ui_context); - return ui_context->active_key; -} - -unsigned int uiGetModifier() { - assert(ui_context); - return ui_context->active_modifier; -} - -int uiGetItemCount() { - assert(ui_context); - return ui_context->count; -} - -int uiGetLastItemCount() { - assert(ui_context); - return ui_context->last_count; -} - -unsigned int uiGetAllocSize() { - assert(ui_context); - return ui_context->datasize; -} - -UIitem *uiItemPtr(int item) { - assert(ui_context && (item >= 0) && (item < ui_context->count)); - return ui_context->items + item; -} - -UIitem *uiLastItemPtr(int item) { - assert(ui_context && (item >= 0) && (item < ui_context->last_count)); - return ui_context->last_items + item; -} - -int uiGetHotItem() { - assert(ui_context); - return ui_context->hot_item; -} - -void uiFocus(int item) { - assert(ui_context && (item >= -1) && (item < ui_context->count)); - assert(ui_context->stage != UI_STAGE_LAYOUT); - ui_context->focus_item = item; -} - -static void uiValidateStateItems() { - assert(ui_context); - ui_context->last_hot_item = uiRecoverItem(ui_context->last_hot_item); - ui_context->active_item = uiRecoverItem(ui_context->active_item); - ui_context->focus_item = uiRecoverItem(ui_context->focus_item); - ui_context->last_click_item = uiRecoverItem(ui_context->last_click_item); -} - -int uiGetFocusedItem() { - assert(ui_context); - return ui_context->focus_item; -} - - -void uiBeginLayout() { - assert(ui_context); - assert(ui_context->stage == UI_STAGE_PROCESS); // must run uiEndLayout(), uiProcess() first - uiClear(); - ui_context->stage = UI_STAGE_LAYOUT; -} - -void uiClearState() { - assert(ui_context); - ui_context->last_hot_item = -1; - ui_context->active_item = -1; - ui_context->focus_item = -1; - ui_context->last_click_item = -1; -} - -int uiItem() { - assert(ui_context); - assert(ui_context->stage == UI_STAGE_LAYOUT); // must run between uiBeginLayout() and uiEndLayout() - assert(ui_context->count < (int)ui_context->item_capacity); - int idx = ui_context->count++; - UIitem *item = uiItemPtr(idx); - memset(item, 0, sizeof(UIitem)); - item->firstkid = -1; - item->nextitem = -1; - return idx; -} - -void uiNotifyItem(int item, UIevent event) { - assert(ui_context); - if (!ui_context->handler) - return; - assert((event & UI_ITEM_EVENT_MASK) == event); - UIitem *pitem = uiItemPtr(item); - if (pitem->flags & event) { - ui_context->handler(item, event); - } -} - -UI_INLINE int uiLastChild(int item) { - item = uiFirstChild(item); - if (item < 0) - return -1; - while (true) { - int nextitem = uiNextSibling(item); - if (nextitem < 0) - return item; - item = nextitem; - } -} - -int uiAppend(int item, int sibling) { - assert(sibling > 0); - UIitem *pitem = uiItemPtr(item); - UIitem *psibling = uiItemPtr(sibling); - assert(!(psibling->flags & UI_ITEM_INSERTED)); - psibling->nextitem = pitem->nextitem; - psibling->flags |= UI_ITEM_INSERTED; - pitem->nextitem = sibling; - return sibling; -} - -int uiInsert(int item, int child) { - assert(child > 0); - UIitem *pparent = uiItemPtr(item); - UIitem *pchild = uiItemPtr(child); - assert(!(pchild->flags & UI_ITEM_INSERTED)); - if (pparent->firstkid < 0) { - pparent->firstkid = child; - pchild->flags |= UI_ITEM_INSERTED; - } else { - uiAppend(uiLastChild(item), child); - } - return child; -} - -int uiInsertFront(int item, int child) { - return uiInsert(item, child); -} - -int uiInsertBack(int item, int child) { - assert(child > 0); - UIitem *pparent = uiItemPtr(item); - UIitem *pchild = uiItemPtr(child); - assert(!(pchild->flags & UI_ITEM_INSERTED)); - pchild->nextitem = pparent->firstkid; - pparent->firstkid = child; - pchild->flags |= UI_ITEM_INSERTED; - return child; -} - -void uiSetFrozen(int item, int enable) { - UIitem *pitem = uiItemPtr(item); - if (enable) - pitem->flags |= UI_ITEM_FROZEN; - else - pitem->flags &= ~UI_ITEM_FROZEN; -} - -void uiSetSize(int item, int w, int h) { - UIitem *pitem = uiItemPtr(item); - pitem->size[0] = w; - pitem->size[1] = h; - if (!w) - pitem->flags &= ~UI_ITEM_HFIXED; - else - pitem->flags |= UI_ITEM_HFIXED; - if (!h) - pitem->flags &= ~UI_ITEM_VFIXED; - else - pitem->flags |= UI_ITEM_VFIXED; -} - -int uiGetWidth(int item) { - return uiItemPtr(item)->size[0]; -} - -int uiGetHeight(int item) { - return uiItemPtr(item)->size[1]; -} - -void uiSetLayout(int item, unsigned int flags) { - UIitem *pitem = uiItemPtr(item); - assert((flags & UI_ITEM_LAYOUT_MASK) == (unsigned int)flags); - pitem->flags &= ~UI_ITEM_LAYOUT_MASK; - pitem->flags |= flags & UI_ITEM_LAYOUT_MASK; -} - -unsigned int uiGetLayout(int item) { - return uiItemPtr(item)->flags & UI_ITEM_LAYOUT_MASK; -} - -void uiSetBox(int item, unsigned int flags) { - UIitem *pitem = uiItemPtr(item); - assert((flags & UI_ITEM_BOX_MASK) == (unsigned int)flags); - pitem->flags &= ~UI_ITEM_BOX_MASK; - pitem->flags |= flags & UI_ITEM_BOX_MASK; -} - -unsigned int uiGetBox(int item) { - return uiItemPtr(item)->flags & UI_ITEM_BOX_MASK; -} - -void uiSetMargins(int item, short l, short t, short r, short b) { - UIitem *pitem = uiItemPtr(item); - pitem->margins[0] = l; - pitem->margins[1] = t; - pitem->margins[2] = r; - pitem->margins[3] = b; -} - -short uiGetMarginLeft(int item) { - return uiItemPtr(item)->margins[0]; -} -short uiGetMarginTop(int item) { - return uiItemPtr(item)->margins[1]; -} -short uiGetMarginRight(int item) { - return uiItemPtr(item)->margins[2]; -} -short uiGetMarginDown(int item) { - return uiItemPtr(item)->margins[3]; -} - -// compute bounding box of all items super-imposed -UI_INLINE void uiComputeImposedSize(UIitem *pitem, int dim) { - int wdim = dim+2; - // largest size is required size - short need_size = 0; - int kid = pitem->firstkid; - while (kid >= 0) { - UIitem *pkid = uiItemPtr(kid); - - // width = start margin + calculated width + end margin - int kidsize = pkid->margins[dim] + pkid->size[dim] + pkid->margins[wdim]; - need_size = ui_max(need_size, kidsize); - kid = uiNextSibling(kid); - } - pitem->size[dim] = need_size; -} - -// compute bounding box of all items stacked -UI_INLINE void uiComputeStackedSize(UIitem *pitem, int dim) { - int wdim = dim+2; - short need_size = 0; - int kid = pitem->firstkid; - while (kid >= 0) { - UIitem *pkid = uiItemPtr(kid); - // width += start margin + calculated width + end margin - need_size += pkid->margins[dim] + pkid->size[dim] + pkid->margins[wdim]; - kid = uiNextSibling(kid); - } - pitem->size[dim] = need_size; -} - -// compute bounding box of all items stacked, repeating when breaking -UI_INLINE void uiComputeWrappedStackedSize(UIitem *pitem, int dim) { - int wdim = dim+2; - - short need_size = 0; - short need_size2 = 0; - int kid = pitem->firstkid; - while (kid >= 0) { - UIitem *pkid = uiItemPtr(kid); - - // if next position moved back, we assume a new line - if (pkid->flags & UI_BREAK) { - need_size2 = ui_max(need_size2, need_size); - // newline - need_size = 0; - } - - // width = start margin + calculated width + end margin - need_size += pkid->margins[dim] + pkid->size[dim] + pkid->margins[wdim]; - kid = uiNextSibling(kid); - } - pitem->size[dim] = ui_max(need_size2, need_size); -} - -// compute bounding box of all items stacked + wrapped -UI_INLINE void uiComputeWrappedSize(UIitem *pitem, int dim) { - int wdim = dim+2; - - short need_size = 0; - short need_size2 = 0; - int kid = pitem->firstkid; - while (kid >= 0) { - UIitem *pkid = uiItemPtr(kid); - - // if next position moved back, we assume a new line - if (pkid->flags & UI_BREAK) { - need_size2 += need_size; - // newline - need_size = 0; - } - - // width = start margin + calculated width + end margin - int kidsize = pkid->margins[dim] + pkid->size[dim] + pkid->margins[wdim]; - need_size = ui_max(need_size, kidsize); - kid = uiNextSibling(kid); - } - pitem->size[dim] = need_size2 + need_size; -} - -static void uiComputeSize(int item, int dim) { - UIitem *pitem = uiItemPtr(item); - - // children expand the size - int kid = pitem->firstkid; - while (kid >= 0) { - uiComputeSize(kid, dim); - kid = uiNextSibling(kid); - } - - if (pitem->size[dim]) - return; - switch(pitem->flags & UI_ITEM_BOX_MODEL_MASK) { - case UI_COLUMN|UI_WRAP: { - // flex model - if (dim) // direction - uiComputeStackedSize(pitem, 1); - else - uiComputeImposedSize(pitem, 0); - } break; - case UI_ROW|UI_WRAP: { - // flex model - if (!dim) // direction - uiComputeWrappedStackedSize(pitem, 0); - else - uiComputeWrappedSize(pitem, 1); - } break; - case UI_COLUMN: - case UI_ROW: { - // flex model - if ((pitem->flags & 1) == (unsigned int)dim) // direction - uiComputeStackedSize(pitem, dim); - else - uiComputeImposedSize(pitem, dim); - } break; - default: { - // layout model - uiComputeImposedSize(pitem, dim); - } break; - } -} - -// stack all items according to their alignment -UI_INLINE void uiArrangeStacked(UIitem *pitem, int dim, bool wrap) { - int wdim = dim+2; - - short space = pitem->size[dim]; - float max_x2 = (float)pitem->margins[dim] + (float)space; - - int start_kid = pitem->firstkid; - while (start_kid >= 0) { - short used = 0; - - int count = 0; // count of fillers - int squeezed_count = 0; // count of squeezable elements - int total = 0; - bool hardbreak = false; - // first pass: count items that need to be expanded, - // and the space that is used - int kid = start_kid; - int end_kid = -1; - while (kid >= 0) { - UIitem *pkid = uiItemPtr(kid); - int flags = (pkid->flags & UI_ITEM_LAYOUT_MASK) >> dim; - int fflags = (pkid->flags & UI_ITEM_FIXED_MASK) >> dim; - short extend = used; - if ((flags & UI_HFILL) == UI_HFILL) { // grow - count++; - extend += pkid->margins[dim] + pkid->margins[wdim]; - } else { - if ((fflags & UI_ITEM_HFIXED) != UI_ITEM_HFIXED) - squeezed_count++; - extend += pkid->margins[dim] + pkid->size[dim] + pkid->margins[wdim]; - } - // wrap on end of line or manual flag - if (wrap && (total && ((extend > space) || (pkid->flags & UI_BREAK)))) { - end_kid = kid; - hardbreak = ((pkid->flags & UI_BREAK) == UI_BREAK); - // add marker for subsequent queries - pkid->flags |= UI_BREAK; - break; - } else { - used = extend; - kid = uiNextSibling(kid); - } - total++; - } - - int extra_space = space - used; - float filler = 0.0f; - float spacer = 0.0f; - float extra_margin = 0.0f; - float eater = 0.0f; - - if (extra_space > 0) { - if (count) { - filler = (float)extra_space / (float)count; - } else if (total) { - switch(pitem->flags & UI_JUSTIFY) { - default: { - extra_margin = extra_space / 2.0f; - } break; - case UI_JUSTIFY: { - // justify when not wrapping or not in last line, - // or not manually breaking - if (!wrap || ((end_kid != -1) && !hardbreak)) - spacer = (float)extra_space / (float)(total-1); - } break; - case UI_START: { - } break; - case UI_END: { - extra_margin = extra_space; - } break; - } - } - } else if (!wrap && (extra_space < 0)) { - eater = (float)extra_space / (float)squeezed_count; - } - - // distribute width among items - float x = (float)pitem->margins[dim]; - float x1; - // second pass: distribute and rescale - kid = start_kid; - while (kid != end_kid) { - short ix0,ix1; - UIitem *pkid = uiItemPtr(kid); - int flags = (pkid->flags & UI_ITEM_LAYOUT_MASK) >> dim; - int fflags = (pkid->flags & UI_ITEM_FIXED_MASK) >> dim; - - x += (float)pkid->margins[dim] + extra_margin; - if ((flags & UI_HFILL) == UI_HFILL) { // grow - x1 = x+filler; - } else if ((fflags & UI_ITEM_HFIXED) == UI_ITEM_HFIXED) { - x1 = x+(float)pkid->size[dim]; - } else { - // squeeze - x1 = x+ui_maxf(0.0f,(float)pkid->size[dim]+eater); - } - ix0 = (short)x; - if (wrap) - ix1 = (short)ui_minf(max_x2-(float)pkid->margins[wdim], x1); - else - ix1 = (short)x1; - pkid->margins[dim] = ix0; - pkid->size[dim] = ix1-ix0; - x = x1 + (float)pkid->margins[wdim]; - - kid = uiNextSibling(kid); - extra_margin = spacer; - } - - start_kid = end_kid; - } -} - -// superimpose all items according to their alignment -UI_INLINE void uiArrangeImposedRange(UIitem *pitem, int dim, - int start_kid, int end_kid, short offset, short space) { - int wdim = dim+2; - - int kid = start_kid; - while (kid != end_kid) { - UIitem *pkid = uiItemPtr(kid); - - int flags = (pkid->flags & UI_ITEM_LAYOUT_MASK) >> dim; - - switch(flags & UI_HFILL) { - default: break; - case UI_HCENTER: { - pkid->margins[dim] += (space-pkid->size[dim])/2 - pkid->margins[wdim]; - } break; - case UI_RIGHT: { - pkid->margins[dim] = space-pkid->size[dim]-pkid->margins[wdim]; - } break; - case UI_HFILL: { - pkid->size[dim] = ui_max(0,space-pkid->margins[dim]-pkid->margins[wdim]); - } break; - } - pkid->margins[dim] += offset; - - kid = uiNextSibling(kid); - } -} - -UI_INLINE void uiArrangeImposed(UIitem *pitem, int dim) { - uiArrangeImposedRange(pitem, dim, pitem->firstkid, -1, pitem->margins[dim], pitem->size[dim]); -} - -// superimpose all items according to their alignment, -// squeeze items that expand the available space -UI_INLINE void uiArrangeImposedSqueezedRange(UIitem *pitem, int dim, - int start_kid, int end_kid, short offset, short space) { - int wdim = dim+2; - - int kid = start_kid; - while (kid != end_kid) { - UIitem *pkid = uiItemPtr(kid); - - int flags = (pkid->flags & UI_ITEM_LAYOUT_MASK) >> dim; - - short min_size = ui_max(0,space-pkid->margins[dim]-pkid->margins[wdim]); - switch(flags & UI_HFILL) { - default: { - pkid->size[dim] = ui_min(pkid->size[dim], min_size); - } break; - case UI_HCENTER: { - pkid->size[dim] = ui_min(pkid->size[dim], min_size); - pkid->margins[dim] += (space-pkid->size[dim])/2 - pkid->margins[wdim]; - } break; - case UI_RIGHT: { - pkid->size[dim] = ui_min(pkid->size[dim], min_size); - pkid->margins[dim] = space-pkid->size[dim]-pkid->margins[wdim]; - } break; - case UI_HFILL: { - pkid->size[dim] = min_size; - } break; - } - pkid->margins[dim] += offset; - - kid = uiNextSibling(kid); - } -} - -UI_INLINE void uiArrangeImposedSqueezed(UIitem *pitem, int dim) { - uiArrangeImposedSqueezedRange(pitem, dim, pitem->firstkid, -1, pitem->margins[dim], pitem->size[dim]); -} - -// superimpose all items according to their alignment -UI_INLINE short uiArrangeWrappedImposedSqueezed(UIitem *pitem, int dim) { - int wdim = dim+2; - - short offset = pitem->margins[dim]; - - short need_size = 0; - int kid = pitem->firstkid; - int start_kid = kid; - while (kid >= 0) { - UIitem *pkid = uiItemPtr(kid); - - if (pkid->flags & UI_BREAK) { - uiArrangeImposedSqueezedRange(pitem, dim, start_kid, kid, offset, need_size); - offset += need_size; - start_kid = kid; - // newline - need_size = 0; - } - - // width = start margin + calculated width + end margin - int kidsize = pkid->margins[dim] + pkid->size[dim] + pkid->margins[wdim]; - need_size = ui_max(need_size, kidsize); - kid = uiNextSibling(kid); - } - - uiArrangeImposedSqueezedRange(pitem, dim, start_kid, -1, offset, need_size); - offset += need_size; - return offset; -} - -static void uiArrange(int item, int dim) { - UIitem *pitem = uiItemPtr(item); - - switch(pitem->flags & UI_ITEM_BOX_MODEL_MASK) { - case UI_COLUMN|UI_WRAP: { - // flex model, wrapping - if (dim) { // direction - uiArrangeStacked(pitem, 1, true); - // this retroactive resize will not effect parent widths - short offset = uiArrangeWrappedImposedSqueezed(pitem, 0); - pitem->size[0] = offset - pitem->margins[0]; - } - } break; - case UI_ROW|UI_WRAP: { - // flex model, wrapping - if (!dim) { // direction - uiArrangeStacked(pitem, 0, true); - } else { - uiArrangeWrappedImposedSqueezed(pitem, 1); - } - } break; - case UI_COLUMN: - case UI_ROW: { - // flex model - if ((pitem->flags & 1) == (unsigned int)dim) // direction - uiArrangeStacked(pitem, dim, false); - else - uiArrangeImposedSqueezed(pitem, dim); - } break; - default: { - // layout model - uiArrangeImposed(pitem, dim); - } break; - } - - int kid = uiFirstChild(item); - while (kid >= 0) { - uiArrange(kid, dim); - kid = uiNextSibling(kid); - } -} - -UI_INLINE bool uiCompareItems(UIitem *item1, UIitem *item2) { - return ((item1->flags & UI_ITEM_COMPARE_MASK) == (item2->flags & UI_ITEM_COMPARE_MASK)); - -} - -static bool uiMapItems(int item1, int item2) { - UIitem *pitem1 = uiLastItemPtr(item1); - if (item2 == -1) { - return false; - } - - UIitem *pitem2 = uiItemPtr(item2); - if (!uiCompareItems(pitem1, pitem2)) { - return false; - } - - int count = 0; - int failed = 0; - int kid1 = pitem1->firstkid; - int kid2 = pitem2->firstkid; - while (kid1 != -1) { - UIitem *pkid1 = uiLastItemPtr(kid1); - count++; - if (!uiMapItems(kid1, kid2)) { - failed = count; - break; - } - kid1 = pkid1->nextitem; - if (kid2 != -1) { - kid2 = uiItemPtr(kid2)->nextitem; - } - } - - if (count && (failed == 1)) { - return false; - } - - ui_context->item_map[item1] = item2; - return true; -} - -int uiRecoverItem(int olditem) { - assert(ui_context); - assert((olditem >= -1) && (olditem < ui_context->last_count)); - if (olditem == -1) return -1; - return ui_context->item_map[olditem]; -} - -void uiRemapItem(int olditem, int newitem) { - assert(ui_context); - assert((olditem >= 0) && (olditem < ui_context->last_count)); - assert((newitem >= -1) && (newitem < ui_context->count)); - ui_context->item_map[olditem] = newitem; -} - -void uiEndLayout() { - assert(ui_context); - assert(ui_context->stage == UI_STAGE_LAYOUT); // must run uiBeginLayout() first - - if (ui_context->count) { - uiComputeSize(0,0); - uiArrange(0,0); - uiComputeSize(0,1); - uiArrange(0,1); - - if (ui_context->last_count) { - // map old item id to new item id - uiMapItems(0,0); - } - } - - uiValidateStateItems(); - if (ui_context->count) { - // drawing routines may require this to be set already - uiUpdateHotItem(); - } - - ui_context->stage = UI_STAGE_POST_LAYOUT; -} - -UIrect uiGetRect(int item) { - UIitem *pitem = uiItemPtr(item); - UIrect rc = {{{ - pitem->margins[0], pitem->margins[1], - pitem->size[0], pitem->size[1] - }}}; - return rc; -} - -int uiFirstChild(int item) { - return uiItemPtr(item)->firstkid; -} - -int uiNextSibling(int item) { - return uiItemPtr(item)->nextitem; -} - -void *uiAllocHandle(int item, unsigned int size) { - assert((size > 0) && (size < UI_MAX_DATASIZE)); - UIitem *pitem = uiItemPtr(item); - assert(pitem->handle == NULL); - assert((ui_context->datasize+size) <= ui_context->buffer_capacity); - pitem->handle = ui_context->data + ui_context->datasize; - pitem->flags |= UI_ITEM_DATA; - ui_context->datasize += size; - return pitem->handle; -} - -void uiSetHandle(int item, void *handle) { - UIitem *pitem = uiItemPtr(item); - assert(pitem->handle == NULL); - pitem->handle = handle; -} - -void *uiGetHandle(int item) { - return uiItemPtr(item)->handle; -} - -void uiSetHandler(UIhandler handler) { - assert(ui_context); - ui_context->handler = handler; -} - -UIhandler uiGetHandler() { - assert(ui_context); - return ui_context->handler; -} - -void uiSetEvents(int item, unsigned int flags) { - UIitem *pitem = uiItemPtr(item); - pitem->flags &= ~UI_ITEM_EVENT_MASK; - pitem->flags |= flags & UI_ITEM_EVENT_MASK; -} - -unsigned int uiGetEvents(int item) { - return uiItemPtr(item)->flags & UI_ITEM_EVENT_MASK; -} - -void uiSetFlags(int item, unsigned int flags) { - UIitem *pitem = uiItemPtr(item); - pitem->flags &= ~UI_USERMASK; - pitem->flags |= flags & UI_USERMASK; -} - -unsigned int uiGetFlags(int item) { - return uiItemPtr(item)->flags & UI_USERMASK; -} - -int uiContains(int item, int x, int y) { - UIrect rect = uiGetRect(item); - x -= rect.x; - y -= rect.y; - if ((x>=0) - && (y>=0) - && (xflags & UI_ITEM_FROZEN) return -1; - if (uiContains(item, x, y)) { - int best_hit = -1; - int kid = uiFirstChild(item); - while (kid >= 0) { - int hit = uiFindItem(kid, x, y, flags, mask); - if (hit >= 0) { - best_hit = hit; - } - kid = uiNextSibling(kid); - } - if (best_hit >= 0) { - return best_hit; - } - if (((mask == UI_ANY) && ((flags == UI_ANY) - || (pitem->flags & flags))) - || ((pitem->flags & flags) == mask)) { - return item; - } - } - return -1; -} - -void uiUpdateHotItem() { - assert(ui_context); - if (!ui_context->count) return; - ui_context->hot_item = uiFindItem(0, - ui_context->cursor.x, ui_context->cursor.y, - UI_ANY_MOUSE_INPUT, UI_ANY); -} - -int uiGetClicks() { - return ui_context->clicks; -} - -void uiProcess(int timestamp) { - assert(ui_context); - - assert(ui_context->stage != UI_STAGE_LAYOUT); // must run uiBeginLayout(), uiEndLayout() first - - if (ui_context->stage == UI_STAGE_PROCESS) { - uiUpdateHotItem(); - } - ui_context->stage = UI_STAGE_PROCESS; - - if (!ui_context->count) { - uiClearInputEvents(); - return; - } - - int hot_item = ui_context->last_hot_item; - int active_item = ui_context->active_item; - int focus_item = ui_context->focus_item; - - // send all keyboard events - if (focus_item >= 0) { - for (int i = 0; i < ui_context->eventcount; ++i) { - ui_context->active_key = ui_context->events[i].key; - ui_context->active_modifier = ui_context->events[i].mod; - uiNotifyItem(focus_item, - ui_context->events[i].event); - } - } else { - ui_context->focus_item = -1; - } - if (ui_context->scroll.x || ui_context->scroll.y) { - int scroll_item = uiFindItem(0, - ui_context->cursor.x, ui_context->cursor.y, - UI_SCROLL, UI_ANY); - if (scroll_item >= 0) { - uiNotifyItem(scroll_item, UI_SCROLL); - } - } - - uiClearInputEvents(); - - int hot = ui_context->hot_item; - - switch(ui_context->state) { - default: - case UI_STATE_IDLE: { - ui_context->start_cursor = ui_context->cursor; - if (uiGetButton(0)) { - hot_item = -1; - active_item = hot; - - if (active_item != focus_item) { - focus_item = -1; - ui_context->focus_item = -1; - } - - if (active_item >= 0) { - if ( - ((timestamp - ui_context->last_click_timestamp) > UI_CLICK_THRESHOLD) - || (ui_context->last_click_item != active_item)) { - ui_context->clicks = 0; - } - ui_context->clicks++; - - ui_context->last_click_timestamp = timestamp; - ui_context->last_click_item = active_item; - ui_context->active_modifier = ui_context->active_button_modifier; - uiNotifyItem(active_item, UI_BUTTON0_DOWN); - } - ui_context->state = UI_STATE_CAPTURE; - } else if (uiGetButton(2) && !uiGetLastButton(2)) { - hot_item = -1; - hot = uiFindItem(0, ui_context->cursor.x, ui_context->cursor.y, - UI_BUTTON2_DOWN, UI_ANY); - if (hot >= 0) { - ui_context->active_modifier = ui_context->active_button_modifier; - uiNotifyItem(hot, UI_BUTTON2_DOWN); - } - } else { - hot_item = hot; - } - } break; - case UI_STATE_CAPTURE: { - if (!uiGetButton(0)) { - if (active_item >= 0) { - ui_context->active_modifier = ui_context->active_button_modifier; - uiNotifyItem(active_item, UI_BUTTON0_UP); - if (active_item == hot) { - uiNotifyItem(active_item, UI_BUTTON0_HOT_UP); - } - } - active_item = -1; - ui_context->state = UI_STATE_IDLE; - } else { - if (active_item >= 0) { - ui_context->active_modifier = ui_context->active_button_modifier; - uiNotifyItem(active_item, UI_BUTTON0_CAPTURE); - } - if (hot == active_item) - hot_item = hot; - else - hot_item = -1; - } - } break; - } - - ui_context->last_cursor = ui_context->cursor; - ui_context->last_hot_item = hot_item; - ui_context->active_item = active_item; - - ui_context->last_timestamp = timestamp; - ui_context->last_buttons = ui_context->buttons; -} - -static int uiIsActive(int item) { - assert(ui_context); - return ui_context->active_item == item; -} - -static int uiIsHot(int item) { - assert(ui_context); - return ui_context->last_hot_item == item; -} - -static int uiIsFocused(int item) { - assert(ui_context); - return ui_context->focus_item == item; -} - -UIitemState uiGetState(int item) { - UIitem *pitem = uiItemPtr(item); - if (pitem->flags & UI_ITEM_FROZEN) return UI_FROZEN; - if (uiIsFocused(item)) { - if (pitem->flags & (UI_KEY_DOWN|UI_CHAR|UI_KEY_UP)) return UI_ACTIVE; - } - if (uiIsActive(item)) { - if (pitem->flags & (UI_BUTTON0_CAPTURE|UI_BUTTON0_UP)) return UI_ACTIVE; - if ((pitem->flags & UI_BUTTON0_HOT_UP) - && uiIsHot(item)) return UI_ACTIVE; - return UI_COLD; - } else if (uiIsHot(item)) { - return UI_HOT; - } - return UI_COLD; -} - -#endif // OUI_IMPLEMENTATION diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_LibSTB.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_LibSTB.c deleted file mode 100644 index e1179805..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_LibSTB.c +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#define LWJGL_MALLOC_LIB org_lwjgl_stb_LibSTB -#include "lwjgl/lwjgl_malloc.h" diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBDXT.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBDXT.c deleted file mode 100644 index 7101d27a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBDXT.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#define STB_DXT_IMPLEMENTATION -#define STB_DXT_STATIC -#include "stb_dxt.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBDXT_nstb_1compress_1dxt_1block(JNIEnv *__env, jclass clazz, jlong destAddress, jlong src_rgba_four_bytes_per_pixelAddress, jint alpha, jint mode) { - unsigned char *dest = (unsigned char *)(uintptr_t)destAddress; - unsigned char const *src_rgba_four_bytes_per_pixel = (unsigned char const *)(uintptr_t)src_rgba_four_bytes_per_pixelAddress; - UNUSED_PARAMS(__env, clazz) - stb_compress_dxt_block(dest, src_rgba_four_bytes_per_pixel, alpha, mode); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBDXT_nstb_1compress_1bc4_1block(JNIEnv *__env, jclass clazz, jlong destAddress, jlong src_r_one_byte_per_pixelAddress) { - unsigned char *dest = (unsigned char *)(uintptr_t)destAddress; - unsigned char const *src_r_one_byte_per_pixel = (unsigned char const *)(uintptr_t)src_r_one_byte_per_pixelAddress; - UNUSED_PARAMS(__env, clazz) - stb_compress_bc4_block(dest, src_r_one_byte_per_pixel); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBDXT_nstb_1compress_1bc5_1block(JNIEnv *__env, jclass clazz, jlong destAddress, jlong src_rg_two_byte_per_pixelAddress) { - unsigned char *dest = (unsigned char *)(uintptr_t)destAddress; - unsigned char const *src_rg_two_byte_per_pixel = (unsigned char const *)(uintptr_t)src_rg_two_byte_per_pixelAddress; - UNUSED_PARAMS(__env, clazz) - stb_compress_bc5_block(dest, src_rg_two_byte_per_pixel); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBEasyFont.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBEasyFont.c deleted file mode 100644 index bfeacc2e..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBEasyFont.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#include "stb_easy_font.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBEasyFont_nstb_1easy_1font_1width(JNIEnv *__env, jclass clazz, jlong textAddress) { - char *text = (char *)(uintptr_t)textAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_easy_font_width(text); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBEasyFont_nstb_1easy_1font_1height(JNIEnv *__env, jclass clazz, jlong textAddress) { - char *text = (char *)(uintptr_t)textAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_easy_font_height(text); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBEasyFont_nstb_1easy_1font_1print(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jlong textAddress, jlong colorAddress, jlong vertex_bufferAddress, jint vbuf_size) { - char *text = (char *)(uintptr_t)textAddress; - unsigned char *color = (unsigned char *)(uintptr_t)colorAddress; - void *vertex_buffer = (void *)(uintptr_t)vertex_bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_easy_font_print(x, y, text, color, vertex_buffer, vbuf_size); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBEasyFont_stb_1easy_1font_1spacing(JNIEnv *__env, jclass clazz, jfloat spacing) { - UNUSED_PARAMS(__env, clazz) - stb_easy_font_spacing(spacing); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImage.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImage.c deleted file mode 100644 index bc6ad3a5..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImage.c +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#include "lwjgl/lwjgl_malloc.h" -#define STBI_MALLOC(sz) org_lwjgl_malloc(sz) -#define STBI_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define STBI_FREE(p) org_lwjgl_free(p) -#define STBI_FAILURE_USERMSG -#define STBI_ASSERT(x) -#define STB_IMAGE_IMPLEMENTATION -#define STB_IMAGE_STATIC -#ifdef LWJGL_WINDOWS - #define STBI_WINDOWS_UTF8 -#endif -#include "stb_image.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load__JJJJI(JNIEnv *__env, jclass clazz, jlong filenameAddress, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_load(filename, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_1from_1memory__JIJJJI(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_load_from_memory(buffer, len, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_1from_1callbacks__JJJJJI(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_load_from_callbacks(clbk, user, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_1gif_1from_1memory__JIJJJJJI(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong delaysAddress, jlong xAddress, jlong yAddress, jlong zAddress, jlong channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - int **delays = (int **)(uintptr_t)delaysAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *z = (int *)(uintptr_t)zAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_load_gif_from_memory(buffer, len, delays, x, y, z, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_116__JJJJI(JNIEnv *__env, jclass clazz, jlong filenameAddress, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_load_16(filename, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_116_1from_1memory__JIJJJI(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_load_16_from_memory(buffer, len, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_116_1from_1callbacks__JJJJJI(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_load_16_from_callbacks(clbk, user, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1loadf__JJJJI(JNIEnv *__env, jclass clazz, jlong filenameAddress, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_loadf(filename, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1loadf_1from_1memory__JIJJJI(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_loadf_from_memory(buffer, len, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1loadf_1from_1callbacks__JJJJJI(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jlong xAddress, jlong yAddress, jlong channels_in_fileAddress, jint desired_channels) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *channels_in_file = (int *)(uintptr_t)channels_in_fileAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_loadf_from_callbacks(clbk, user, x, y, channels_in_file, desired_channels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_stbi_1hdr_1to_1ldr_1gamma(JNIEnv *__env, jclass clazz, jfloat gamma) { - UNUSED_PARAMS(__env, clazz) - stbi_hdr_to_ldr_gamma(gamma); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_stbi_1hdr_1to_1ldr_1scale(JNIEnv *__env, jclass clazz, jfloat scale) { - UNUSED_PARAMS(__env, clazz) - stbi_hdr_to_ldr_scale(scale); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_stbi_1ldr_1to_1hdr_1gamma(JNIEnv *__env, jclass clazz, jfloat gamma) { - UNUSED_PARAMS(__env, clazz) - stbi_ldr_to_hdr_gamma(gamma); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_stbi_1ldr_1to_1hdr_1scale(JNIEnv *__env, jclass clazz, jfloat scale) { - UNUSED_PARAMS(__env, clazz) - stbi_ldr_to_hdr_scale(scale); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1is_1hdr(JNIEnv *__env, jclass clazz, jlong filenameAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_is_hdr(filename); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1is_1hdr_1from_1memory(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_is_hdr_from_memory(buffer, len); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1is_1hdr_1from_1callbacks(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_is_hdr_from_callbacks(clbk, user); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1failure_1reason(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_failure_reason(); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1image_1free(JNIEnv *__env, jclass clazz, jlong retval_from_stbi_loadAddress) { - void *retval_from_stbi_load = (void *)(uintptr_t)retval_from_stbi_loadAddress; - UNUSED_PARAMS(__env, clazz) - stbi_image_free(retval_from_stbi_load); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1info__JJJJ(JNIEnv *__env, jclass clazz, jlong filenameAddress, jlong xAddress, jlong yAddress, jlong compAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *comp = (int *)(uintptr_t)compAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_info(filename, x, y, comp); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1info_1from_1memory__JIJJJ(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong xAddress, jlong yAddress, jlong compAddress) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *comp = (int *)(uintptr_t)compAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_info_from_memory(buffer, len, x, y, comp); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1info_1from_1callbacks__JJJJJ(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jlong xAddress, jlong yAddress, jlong compAddress) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - int *x = (int *)(uintptr_t)xAddress; - int *y = (int *)(uintptr_t)yAddress; - int *comp = (int *)(uintptr_t)compAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_info_from_callbacks(clbk, user, x, y, comp); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1is_116_1bit(JNIEnv *__env, jclass clazz, jlong filenameAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_is_16_bit(filename); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1is_116_1bit_1from_1memory(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_is_16_bit_from_memory(buffer, len); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1is_116_1bit_1from_1callbacks(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_is_16_bit_from_callbacks(clbk, user); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1set_1unpremultiply_1on_1load(JNIEnv *__env, jclass clazz, jint flag_true_if_should_unpremultiply) { - UNUSED_PARAMS(__env, clazz) - stbi_set_unpremultiply_on_load(flag_true_if_should_unpremultiply); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1convert_1iphone_1png_1to_1rgb(JNIEnv *__env, jclass clazz, jint flag_true_if_should_convert) { - UNUSED_PARAMS(__env, clazz) - stbi_convert_iphone_png_to_rgb(flag_true_if_should_convert); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1set_1flip_1vertically_1on_1load(JNIEnv *__env, jclass clazz, jint flag_true_if_should_flip) { - UNUSED_PARAMS(__env, clazz) - stbi_set_flip_vertically_on_load(flag_true_if_should_flip); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1set_1unpremultiply_1on_1load_1thread(JNIEnv *__env, jclass clazz, jint flag_true_if_should_unpremultiply) { - UNUSED_PARAMS(__env, clazz) - stbi_set_unpremultiply_on_load_thread(flag_true_if_should_unpremultiply); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1convert_1iphone_1png_1to_1rgb_1thread(JNIEnv *__env, jclass clazz, jint flag_true_if_should_convert) { - UNUSED_PARAMS(__env, clazz) - stbi_convert_iphone_png_to_rgb_thread(flag_true_if_should_convert); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImage_stbi_1set_1flip_1vertically_1on_1load_1thread(JNIEnv *__env, jclass clazz, jint flag_true_if_should_flip) { - UNUSED_PARAMS(__env, clazz) - stbi_set_flip_vertically_on_load_thread(flag_true_if_should_flip); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1zlib_1decode_1malloc_1guesssize(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jint initial_size, jlong outlenAddress) { - char const *buffer = (char const *)(uintptr_t)bufferAddress; - int *outlen = (int *)(uintptr_t)outlenAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_zlib_decode_malloc_guesssize(buffer, len, initial_size, outlen); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1zlib_1decode_1malloc_1guesssize_1headerflag(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jint initial_size, jlong outlenAddress, jint parse_header) { - char const *buffer = (char const *)(uintptr_t)bufferAddress; - int *outlen = (int *)(uintptr_t)outlenAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_zlib_decode_malloc_guesssize_headerflag(buffer, len, initial_size, outlen, parse_header); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1zlib_1decode_1malloc(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong outlenAddress) { - char const *buffer = (char const *)(uintptr_t)bufferAddress; - int *outlen = (int *)(uintptr_t)outlenAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_zlib_decode_malloc(buffer, len, outlen); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1zlib_1decode_1buffer(JNIEnv *__env, jclass clazz, jlong obufferAddress, jint olen, jlong ibufferAddress, jint ilen) { - char *obuffer = (char *)(uintptr_t)obufferAddress; - char const *ibuffer = (char const *)(uintptr_t)ibufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_zlib_decode_buffer(obuffer, olen, ibuffer, ilen); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1zlib_1decode_1noheader_1malloc(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong outlenAddress) { - char const *buffer = (char const *)(uintptr_t)bufferAddress; - int *outlen = (int *)(uintptr_t)outlenAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbi_zlib_decode_noheader_malloc(buffer, len, outlen); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1zlib_1decode_1noheader_1buffer(JNIEnv *__env, jclass clazz, jlong obufferAddress, jint olen, jlong ibufferAddress, jint ilen) { - char *obuffer = (char *)(uintptr_t)obufferAddress; - char const *ibuffer = (char const *)(uintptr_t)ibufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_zlib_decode_noheader_buffer(obuffer, olen, ibuffer, ilen); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load__J_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong filenameAddress, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_load(filename, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_1from_1memory__JI_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_load_from_memory(buffer, len, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_1from_1callbacks__JJ_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_load_from_callbacks(clbk, user, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_1gif_1from_1memory__JIJ_3I_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jlong delaysAddress, jintArray xAddress, jintArray yAddress, jintArray zAddress, jintArray channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - int **delays = (int **)(uintptr_t)delaysAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *z = (*__env)->GetIntArrayElements(__env, zAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_load_gif_from_memory(buffer, len, delays, (int *)x, (int *)y, (int *)z, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, zAddress, z, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_116__J_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong filenameAddress, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_load_16(filename, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_116_1from_1memory__JI_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_load_16_from_memory(buffer, len, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1load_116_1from_1callbacks__JJ_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_load_16_from_callbacks(clbk, user, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1loadf__J_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong filenameAddress, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_loadf(filename, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1loadf_1from_1memory__JI_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_loadf_from_memory(buffer, len, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1loadf_1from_1callbacks__JJ_3I_3I_3II(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jintArray xAddress, jintArray yAddress, jintArray channels_in_fileAddress, jint desired_channels) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - jlong __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *channels_in_file = (*__env)->GetIntArrayElements(__env, channels_in_fileAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbi_loadf_from_callbacks(clbk, user, (int *)x, (int *)y, (int *)channels_in_file, desired_channels); - (*__env)->ReleaseIntArrayElements(__env, channels_in_fileAddress, channels_in_file, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1info__J_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong filenameAddress, jintArray xAddress, jintArray yAddress, jintArray compAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - jint __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *comp = (*__env)->GetIntArrayElements(__env, compAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbi_info(filename, (int *)x, (int *)y, (int *)comp); - (*__env)->ReleaseIntArrayElements(__env, compAddress, comp, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1info_1from_1memory__JI_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong bufferAddress, jint len, jintArray xAddress, jintArray yAddress, jintArray compAddress) { - stbi_uc const *buffer = (stbi_uc const *)(uintptr_t)bufferAddress; - jint __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *comp = (*__env)->GetIntArrayElements(__env, compAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbi_info_from_memory(buffer, len, (int *)x, (int *)y, (int *)comp); - (*__env)->ReleaseIntArrayElements(__env, compAddress, comp, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImage_nstbi_1info_1from_1callbacks__JJ_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong clbkAddress, jlong userAddress, jintArray xAddress, jintArray yAddress, jintArray compAddress) { - stbi_io_callbacks const *clbk = (stbi_io_callbacks const *)(uintptr_t)clbkAddress; - void *user = (void *)(uintptr_t)userAddress; - jint __result; - jint *x = (*__env)->GetIntArrayElements(__env, xAddress, NULL); - jint *y = (*__env)->GetIntArrayElements(__env, yAddress, NULL); - jint *comp = (*__env)->GetIntArrayElements(__env, compAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbi_info_from_callbacks(clbk, user, (int *)x, (int *)y, (int *)comp); - (*__env)->ReleaseIntArrayElements(__env, compAddress, comp, 0); - (*__env)->ReleaseIntArrayElements(__env, yAddress, y, 0); - (*__env)->ReleaseIntArrayElements(__env, xAddress, x, 0); - return __result; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImageResize.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImageResize.c deleted file mode 100644 index 79709103..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImageResize.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#include "lwjgl/lwjgl_malloc.h" -#define STBIR_MALLOC(size,c) org_lwjgl_malloc(size) -#define STBIR_FREE(ptr,c) org_lwjgl_free(ptr) -#define STBIR_ASSERT(x) -#define STB_IMAGE_RESIZE_IMPLEMENTATION -#define STB_IMAGE_RESIZE_STATIC -#include "stb_image_resize.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1uint8(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels) { - unsigned char const *input_pixels = (unsigned char const *)(uintptr_t)input_pixelsAddress; - unsigned char *output_pixels = (unsigned char *)(uintptr_t)output_pixelsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_uint8(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1float__JIIIJIIII(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels) { - float const *input_pixels = (float const *)(uintptr_t)input_pixelsAddress; - float *output_pixels = (float *)(uintptr_t)output_pixelsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_float(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1uint8_1srgb(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels, jint alpha_channel, jint flags) { - unsigned char const *input_pixels = (unsigned char const *)(uintptr_t)input_pixelsAddress; - unsigned char *output_pixels = (unsigned char *)(uintptr_t)output_pixelsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_uint8_srgb(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1uint8_1srgb_1edgemode(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels, jint alpha_channel, jint flags, jint edge_wrap_mode) { - unsigned char const *input_pixels = (unsigned char const *)(uintptr_t)input_pixelsAddress; - unsigned char *output_pixels = (unsigned char *)(uintptr_t)output_pixelsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_uint8_srgb_edgemode(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, (stbir_edge)edge_wrap_mode); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1uint8_1generic(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels, jint alpha_channel, jint flags, jint edge_wrap_mode, jint filter, jint space, jlong alloc_contextAddress) { - unsigned char const *input_pixels = (unsigned char const *)(uintptr_t)input_pixelsAddress; - unsigned char *output_pixels = (unsigned char *)(uintptr_t)output_pixelsAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_uint8_generic(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, (stbir_edge)edge_wrap_mode, (stbir_filter)filter, (stbir_colorspace)space, alloc_context); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1uint16_1generic__JIIIJIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels, jint alpha_channel, jint flags, jint edge_wrap_mode, jint filter, jint space, jlong alloc_contextAddress) { - stbir_uint16 const *input_pixels = (stbir_uint16 const *)(uintptr_t)input_pixelsAddress; - stbir_uint16 *output_pixels = (stbir_uint16 *)(uintptr_t)output_pixelsAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_uint16_generic(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, (stbir_edge)edge_wrap_mode, (stbir_filter)filter, (stbir_colorspace)space, alloc_context); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1float_1generic__JIIIJIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels, jint alpha_channel, jint flags, jint edge_wrap_mode, jint filter, jint space, jlong alloc_contextAddress) { - float const *input_pixels = (float const *)(uintptr_t)input_pixelsAddress; - float *output_pixels = (float *)(uintptr_t)output_pixelsAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_float_generic(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, (stbir_edge)edge_wrap_mode, (stbir_filter)filter, (stbir_colorspace)space, alloc_context); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint datatype, jint num_channels, jint alpha_channel, jint flags, jint edge_mode_horizontal, jint edge_mode_vertical, jint filter_horizontal, jint filter_vertical, jint space, jlong alloc_contextAddress) { - void const *input_pixels = (void const *)(uintptr_t)input_pixelsAddress; - void *output_pixels = (void *)(uintptr_t)output_pixelsAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, (stbir_datatype)datatype, num_channels, alpha_channel, flags, (stbir_edge)edge_mode_horizontal, (stbir_edge)edge_mode_vertical, (stbir_filter)filter_horizontal, (stbir_filter)filter_vertical, (stbir_colorspace)space, alloc_context); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1subpixel(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint datatype, jint num_channels, jint alpha_channel, jint flags, jint edge_mode_horizontal, jint edge_mode_vertical, jint filter_horizontal, jint filter_vertical, jint space, jlong alloc_contextAddress, jfloat x_scale, jfloat y_scale, jfloat x_offset, jfloat y_offset) { - void const *input_pixels = (void const *)(uintptr_t)input_pixelsAddress; - void *output_pixels = (void *)(uintptr_t)output_pixelsAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_subpixel(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, (stbir_datatype)datatype, num_channels, alpha_channel, flags, (stbir_edge)edge_mode_horizontal, (stbir_edge)edge_mode_vertical, (stbir_filter)filter_horizontal, (stbir_filter)filter_vertical, (stbir_colorspace)space, alloc_context, x_scale, y_scale, x_offset, y_offset); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1region(JNIEnv *__env, jclass clazz, jlong input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jlong output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint datatype, jint num_channels, jint alpha_channel, jint flags, jint edge_mode_horizontal, jint edge_mode_vertical, jint filter_horizontal, jint filter_vertical, jint space, jlong alloc_contextAddress, jfloat s0, jfloat t0, jfloat s1, jfloat t1) { - void const *input_pixels = (void const *)(uintptr_t)input_pixelsAddress; - void *output_pixels = (void *)(uintptr_t)output_pixelsAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbir_resize_region(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, (stbir_datatype)datatype, num_channels, alpha_channel, flags, (stbir_edge)edge_mode_horizontal, (stbir_edge)edge_mode_vertical, (stbir_filter)filter_horizontal, (stbir_filter)filter_vertical, (stbir_colorspace)space, alloc_context, s0, t0, s1, t1); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1float___3FIII_3FIIII(JNIEnv *__env, jclass clazz, jfloatArray input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jfloatArray output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels) { - jint __result; - jfloat *input_pixels = (*__env)->GetFloatArrayElements(__env, input_pixelsAddress, NULL); - jfloat *output_pixels = (*__env)->GetFloatArrayElements(__env, output_pixelsAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbir_resize_float((float const *)input_pixels, input_w, input_h, input_stride_in_bytes, (float *)output_pixels, output_w, output_h, output_stride_in_bytes, num_channels); - (*__env)->ReleaseFloatArrayElements(__env, output_pixelsAddress, output_pixels, 0); - (*__env)->ReleaseFloatArrayElements(__env, input_pixelsAddress, input_pixels, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1uint16_1generic___3SIII_3SIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jshortArray input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jshortArray output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels, jint alpha_channel, jint flags, jint edge_wrap_mode, jint filter, jint space, jlong alloc_contextAddress) { - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - jint __result; - jshort *input_pixels = (*__env)->GetShortArrayElements(__env, input_pixelsAddress, NULL); - jshort *output_pixels = (*__env)->GetShortArrayElements(__env, output_pixelsAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbir_resize_uint16_generic((stbir_uint16 const *)input_pixels, input_w, input_h, input_stride_in_bytes, (stbir_uint16 *)output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, (stbir_edge)edge_wrap_mode, (stbir_filter)filter, (stbir_colorspace)space, alloc_context); - (*__env)->ReleaseShortArrayElements(__env, output_pixelsAddress, output_pixels, 0); - (*__env)->ReleaseShortArrayElements(__env, input_pixelsAddress, input_pixels, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageResize_nstbir_1resize_1float_1generic___3FIII_3FIIIIIIIIIJ(JNIEnv *__env, jclass clazz, jfloatArray input_pixelsAddress, jint input_w, jint input_h, jint input_stride_in_bytes, jfloatArray output_pixelsAddress, jint output_w, jint output_h, jint output_stride_in_bytes, jint num_channels, jint alpha_channel, jint flags, jint edge_wrap_mode, jint filter, jint space, jlong alloc_contextAddress) { - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - jint __result; - jfloat *input_pixels = (*__env)->GetFloatArrayElements(__env, input_pixelsAddress, NULL); - jfloat *output_pixels = (*__env)->GetFloatArrayElements(__env, output_pixelsAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbir_resize_float_generic((float const *)input_pixels, input_w, input_h, input_stride_in_bytes, (float *)output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, (stbir_edge)edge_wrap_mode, (stbir_filter)filter, (stbir_colorspace)space, alloc_context); - (*__env)->ReleaseFloatArrayElements(__env, output_pixelsAddress, output_pixels, 0); - (*__env)->ReleaseFloatArrayElements(__env, input_pixelsAddress, input_pixels, 0); - return __result; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImageWrite.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImageWrite.c deleted file mode 100644 index 222c9e31..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBImageWrite.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#include "lwjgl/lwjgl_malloc.h" -#define STBIW_MALLOC(sz) org_lwjgl_malloc(sz) -#define STBIW_REALLOC(p,sz) org_lwjgl_realloc(p,sz) -#define STBIW_FREE(p) org_lwjgl_free(p) -#define STBIW_ASSERT(x) -#define STB_IMAGE_WRITE_IMPLEMENTATION -#define STB_IMAGE_WRITE_STATIC -#ifdef LWJGL_WINDOWS - #define STBIW_WINDOWS_UTF8 - #define STBI_MSC_SECURE_CRT -#endif -#include "stb_image_write.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1png(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint w, jint h, jint comp, jlong dataAddress, jint stride_in_bytes) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_png(filename, w, h, comp, data, stride_in_bytes); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1png_1compression_1level(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&stbi_write_png_compression_level; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1force_1png_1filter(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&stbi_write_force_png_filter; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1zlib_1compress(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&stbi_zlib_compress; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1bmp(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint w, jint h, jint comp, jlong dataAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_bmp(filename, w, h, comp, data); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1tga(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint w, jint h, jint comp, jlong dataAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_tga(filename, w, h, comp, data); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1tga_1with_1rle(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)&stbi_write_tga_with_rle; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1hdr__JIIIJ(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint w, jint h, jint comp, jlong dataAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - float const *data = (float const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_hdr(filename, w, h, comp, data); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1jpg(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint w, jint h, jint comp, jlong dataAddress, jint quality) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_jpg(filename, w, h, comp, data, quality); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1png_1to_1func(JNIEnv *__env, jclass clazz, jlong funcAddress, jlong contextAddress, jint w, jint h, jint comp, jlong dataAddress, jint stride_in_bytes) { - stbi_write_func *func = (stbi_write_func *)(uintptr_t)funcAddress; - void *context = (void *)(uintptr_t)contextAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_png_to_func(func, context, w, h, comp, data, stride_in_bytes); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1bmp_1to_1func(JNIEnv *__env, jclass clazz, jlong funcAddress, jlong contextAddress, jint w, jint h, jint comp, jlong dataAddress) { - stbi_write_func *func = (stbi_write_func *)(uintptr_t)funcAddress; - void *context = (void *)(uintptr_t)contextAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_bmp_to_func(func, context, w, h, comp, data); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1tga_1to_1func(JNIEnv *__env, jclass clazz, jlong funcAddress, jlong contextAddress, jint w, jint h, jint comp, jlong dataAddress) { - stbi_write_func *func = (stbi_write_func *)(uintptr_t)funcAddress; - void *context = (void *)(uintptr_t)contextAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_tga_to_func(func, context, w, h, comp, data); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1hdr_1to_1func__JJIIIJ(JNIEnv *__env, jclass clazz, jlong funcAddress, jlong contextAddress, jint w, jint h, jint comp, jlong dataAddress) { - stbi_write_func *func = (stbi_write_func *)(uintptr_t)funcAddress; - void *context = (void *)(uintptr_t)contextAddress; - float const *data = (float const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_hdr_to_func(func, context, w, h, comp, data); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1jpg_1to_1func(JNIEnv *__env, jclass clazz, jlong funcAddress, jlong contextAddress, jint w, jint h, jint comp, jlong dataAddress, jint quality) { - stbi_write_func *func = (stbi_write_func *)(uintptr_t)funcAddress; - void *context = (void *)(uintptr_t)contextAddress; - void const *data = (void const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbi_write_jpg_to_func(func, context, w, h, comp, data, quality); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1flip_1vertically_1on_1write(JNIEnv *__env, jclass clazz, jint flip_boolean) { - UNUSED_PARAMS(__env, clazz) - stbi_flip_vertically_on_write(flip_boolean); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1hdr__JIII_3F(JNIEnv *__env, jclass clazz, jlong filenameAddress, jint w, jint h, jint comp, jfloatArray dataAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - jint __result; - jfloat *data = (*__env)->GetFloatArrayElements(__env, dataAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbi_write_hdr(filename, w, h, comp, (float const *)data); - (*__env)->ReleaseFloatArrayElements(__env, dataAddress, data, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBImageWrite_nstbi_1write_1hdr_1to_1func__JJIII_3F(JNIEnv *__env, jclass clazz, jlong funcAddress, jlong contextAddress, jint w, jint h, jint comp, jfloatArray dataAddress) { - stbi_write_func *func = (stbi_write_func *)(uintptr_t)funcAddress; - void *context = (void *)(uintptr_t)contextAddress; - jint __result; - jfloat *data = (*__env)->GetFloatArrayElements(__env, dataAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbi_write_hdr_to_func(func, context, w, h, comp, (float const *)data); - (*__env)->ReleaseFloatArrayElements(__env, dataAddress, data, 0); - return __result; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBPerlin.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBPerlin.c deleted file mode 100644 index fbe52c6d..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBPerlin.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#define STB_PERLIN_IMPLEMENTATION -#include "stb_perlin.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBPerlin_stb_1perlin_1noise3(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jint x_wrap, jint y_wrap, jint z_wrap) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)stb_perlin_noise3(x, y, z, x_wrap, y_wrap, z_wrap); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBPerlin_stb_1perlin_1noise3_1seed(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jint x_wrap, jint y_wrap, jint z_wrap, jint seed) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)stb_perlin_noise3_seed(x, y, z, x_wrap, y_wrap, z_wrap, seed); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBPerlin_stb_1perlin_1ridge_1noise3(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jfloat lacunarity, jfloat gain, jfloat offset, jint octaves) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)stb_perlin_ridge_noise3(x, y, z, lacunarity, gain, offset, octaves); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBPerlin_stb_1perlin_1fbm_1noise3(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jfloat lacunarity, jfloat gain, jint octaves) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)stb_perlin_fbm_noise3(x, y, z, lacunarity, gain, octaves); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBPerlin_stb_1perlin_1turbulence_1noise3(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jfloat lacunarity, jfloat gain, jint octaves) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)stb_perlin_turbulence_noise3(x, y, z, lacunarity, gain, octaves); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBPerlin_stb_1perlin_1noise3_1wrap_1nonpow2(JNIEnv *__env, jclass clazz, jfloat x, jfloat y, jfloat z, jint x_wrap, jint y_wrap, jint z_wrap, jbyte seed) { - UNUSED_PARAMS(__env, clazz) - return (jfloat)stb_perlin_noise3_wrap_nonpow2(x, y, z, x_wrap, y_wrap, z_wrap, (unsigned char)seed); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBRectPack.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBRectPack.c deleted file mode 100644 index 6bfa8800..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBRectPack.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#define STBRP_ASSERT -#define STB_RECT_PACK_IMPLEMENTATION -#include "stb_rect_pack.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBRectPack_nstbrp_1pack_1rects(JNIEnv *__env, jclass clazz, jlong contextAddress, jlong rectsAddress, jint num_rects) { - stbrp_context *context = (stbrp_context *)(uintptr_t)contextAddress; - stbrp_rect *rects = (stbrp_rect *)(uintptr_t)rectsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbrp_pack_rects(context, rects, num_rects); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBRectPack_nstbrp_1init_1target(JNIEnv *__env, jclass clazz, jlong contextAddress, jint width, jint height, jlong nodesAddress, jint num_nodes) { - stbrp_context *context = (stbrp_context *)(uintptr_t)contextAddress; - stbrp_node *nodes = (stbrp_node *)(uintptr_t)nodesAddress; - UNUSED_PARAMS(__env, clazz) - stbrp_init_target(context, width, height, nodes, num_nodes); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBRectPack_nstbrp_1setup_1allow_1out_1of_1mem(JNIEnv *__env, jclass clazz, jlong contextAddress, jint allow_out_of_mem) { - stbrp_context *context = (stbrp_context *)(uintptr_t)contextAddress; - UNUSED_PARAMS(__env, clazz) - stbrp_setup_allow_out_of_mem(context, allow_out_of_mem); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBRectPack_nstbrp_1setup_1heuristic(JNIEnv *__env, jclass clazz, jlong contextAddress, jint heuristic) { - stbrp_context *context = (stbrp_context *)(uintptr_t)contextAddress; - UNUSED_PARAMS(__env, clazz) - stbrp_setup_heuristic(context, heuristic); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBTTFontinfo.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBTTFontinfo.c deleted file mode 100644 index d90ac874..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBTTFontinfo.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include -DISABLE_WARNINGS() -#include "stb_truetype.h" -ENABLE_WARNINGS() -#ifdef LWJGL_WINDOWS - #define alignof __alignof -#else - #include -#endif - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTTFontinfo_offsets(JNIEnv *__env, jclass clazz, jlong bufferAddress) { - jint *buffer = (jint *)(uintptr_t)bufferAddress; - - UNUSED_PARAMS(__env, clazz) - - buffer[0] = alignof(stbtt_fontinfo); - - return sizeof(stbtt_fontinfo); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBTruetype.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBTruetype.c deleted file mode 100644 index 9d9f76ae..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBTruetype.c +++ /dev/null @@ -1,784 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#include "lwjgl/lwjgl_malloc.h" -#define STBTT_malloc(x,u) ((void)(u),org_lwjgl_malloc(x)) -#define STBTT_free(x,u) ((void)(u),org_lwjgl_free(x)) -#define STBTT_assert -#define STB_TRUETYPE_IMPLEMENTATION -#define STBTT_STATIC -#include "stb_rect_pack.h" -#include "stb_truetype.h" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1BakeFontBitmap(JNIEnv *__env, jclass clazz, jlong dataAddress, jint offset, jfloat pixel_height, jlong pixelsAddress, jint pw, jint ph, jint first_char, jint num_chars, jlong chardataAddress) { - unsigned char const *data = (unsigned char const *)(uintptr_t)dataAddress; - unsigned char *pixels = (unsigned char *)(uintptr_t)pixelsAddress; - stbtt_bakedchar *chardata = (stbtt_bakedchar *)(uintptr_t)chardataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_BakeFontBitmap(data, offset, pixel_height, pixels, pw, ph, first_char, num_chars, chardata); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetBakedQuad__JIIIJJJI(JNIEnv *__env, jclass clazz, jlong chardataAddress, jint pw, jint ph, jint char_index, jlong xposAddress, jlong yposAddress, jlong qAddress, jint opengl_fillrule) { - stbtt_bakedchar const *chardata = (stbtt_bakedchar const *)(uintptr_t)chardataAddress; - float *xpos = (float *)(uintptr_t)xposAddress; - float *ypos = (float *)(uintptr_t)yposAddress; - stbtt_aligned_quad *q = (stbtt_aligned_quad *)(uintptr_t)qAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_GetBakedQuad(chardata, pw, ph, char_index, xpos, ypos, q, opengl_fillrule); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetScaledFontVMetrics__JIFJJJ(JNIEnv *__env, jclass clazz, jlong fontdataAddress, jint index, jfloat size, jlong ascentAddress, jlong descentAddress, jlong lineGapAddress) { - unsigned char const *fontdata = (unsigned char const *)(uintptr_t)fontdataAddress; - float *ascent = (float *)(uintptr_t)ascentAddress; - float *descent = (float *)(uintptr_t)descentAddress; - float *lineGap = (float *)(uintptr_t)lineGapAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_GetScaledFontVMetrics(fontdata, index, size, ascent, descent, lineGap); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackBegin(JNIEnv *__env, jclass clazz, jlong spcAddress, jlong pixelsAddress, jint width, jint height, jint stride_in_bytes, jint padding, jlong alloc_contextAddress) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - unsigned char *pixels = (unsigned char *)(uintptr_t)pixelsAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_PackBegin(spc, pixels, width, height, stride_in_bytes, padding, alloc_context); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackEnd(JNIEnv *__env, jclass clazz, jlong spcAddress) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_PackEnd(spc); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackFontRange(JNIEnv *__env, jclass clazz, jlong spcAddress, jlong fontdataAddress, jint font_index, jfloat font_size, jint first_unicode_char_in_range, jint num_chars_in_range, jlong chardata_for_rangeAddress) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - unsigned char const *fontdata = (unsigned char const *)(uintptr_t)fontdataAddress; - stbtt_packedchar *chardata_for_range = (stbtt_packedchar *)(uintptr_t)chardata_for_rangeAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_PackFontRange(spc, fontdata, font_index, font_size, first_unicode_char_in_range, num_chars_in_range, chardata_for_range); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackFontRanges(JNIEnv *__env, jclass clazz, jlong spcAddress, jlong fontdataAddress, jint font_index, jlong rangesAddress, jint num_ranges) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - unsigned char const *fontdata = (unsigned char const *)(uintptr_t)fontdataAddress; - stbtt_pack_range *ranges = (stbtt_pack_range *)(uintptr_t)rangesAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_PackFontRanges(spc, fontdata, font_index, ranges, num_ranges); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackSetOversampling(JNIEnv *__env, jclass clazz, jlong spcAddress, jint h_oversample, jint v_oversample) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_PackSetOversampling(spc, (unsigned int)h_oversample, (unsigned int)v_oversample); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackSetSkipMissingCodepoints(JNIEnv *__env, jclass clazz, jlong spcAddress, jint skip) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_PackSetSkipMissingCodepoints(spc, skip); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetPackedQuad__JIIIJJJI(JNIEnv *__env, jclass clazz, jlong chardataAddress, jint pw, jint ph, jint char_index, jlong xposAddress, jlong yposAddress, jlong qAddress, jint align_to_integer) { - stbtt_packedchar const *chardata = (stbtt_packedchar const *)(uintptr_t)chardataAddress; - float *xpos = (float *)(uintptr_t)xposAddress; - float *ypos = (float *)(uintptr_t)yposAddress; - stbtt_aligned_quad *q = (stbtt_aligned_quad *)(uintptr_t)qAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_GetPackedQuad(chardata, pw, ph, char_index, xpos, ypos, q, align_to_integer); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackFontRangesGatherRects(JNIEnv *__env, jclass clazz, jlong spcAddress, jlong infoAddress, jlong rangesAddress, jint num_ranges, jlong rectsAddress) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - stbtt_fontinfo *info = (stbtt_fontinfo *)(uintptr_t)infoAddress; - stbtt_pack_range *ranges = (stbtt_pack_range *)(uintptr_t)rangesAddress; - stbrp_rect *rects = (stbrp_rect *)(uintptr_t)rectsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_PackFontRangesGatherRects(spc, info, ranges, num_ranges, rects); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackFontRangesPackRects(JNIEnv *__env, jclass clazz, jlong spcAddress, jlong rectsAddress, jint num_rects) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - stbrp_rect *rects = (stbrp_rect *)(uintptr_t)rectsAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_PackFontRangesPackRects(spc, rects, num_rects); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1PackFontRangesRenderIntoRects(JNIEnv *__env, jclass clazz, jlong spcAddress, jlong infoAddress, jlong rangesAddress, jint num_ranges, jlong rectsAddress) { - stbtt_pack_context *spc = (stbtt_pack_context *)(uintptr_t)spcAddress; - stbtt_fontinfo *info = (stbtt_fontinfo *)(uintptr_t)infoAddress; - stbtt_pack_range *ranges = (stbtt_pack_range *)(uintptr_t)rangesAddress; - stbrp_rect *rects = (stbrp_rect *)(uintptr_t)rectsAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_PackFontRangesRenderIntoRects(spc, info, ranges, num_ranges, rects); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetNumberOfFonts(JNIEnv *__env, jclass clazz, jlong dataAddress) { - unsigned char const *data = (unsigned char const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetNumberOfFonts(data); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontOffsetForIndex(JNIEnv *__env, jclass clazz, jlong dataAddress, jint index) { - unsigned char const *data = (unsigned char const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetFontOffsetForIndex(data, index); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1InitFont(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong dataAddress, jint offset) { - stbtt_fontinfo *info = (stbtt_fontinfo *)(uintptr_t)infoAddress; - unsigned char const *data = (unsigned char const *)(uintptr_t)dataAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_InitFont(info, data, offset); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1FindGlyphIndex(JNIEnv *__env, jclass clazz, jlong infoAddress, jint unicode_codepoint) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_FindGlyphIndex(info, unicode_codepoint); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1ScaleForPixelHeight(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat pixels) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)stbtt_ScaleForPixelHeight(info, pixels); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1ScaleForMappingEmToPixels(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat pixels) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)stbtt_ScaleForMappingEmToPixels(info, pixels); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontVMetrics__JJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong ascentAddress, jlong descentAddress, jlong lineGapAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *ascent = (int *)(uintptr_t)ascentAddress; - int *descent = (int *)(uintptr_t)descentAddress; - int *lineGap = (int *)(uintptr_t)lineGapAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_GetFontVMetrics(info, ascent, descent, lineGap); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontVMetricsOS2__JJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong typoAscentAddress, jlong typoDescentAddress, jlong typoLineGapAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *typoAscent = (int *)(uintptr_t)typoAscentAddress; - int *typoDescent = (int *)(uintptr_t)typoDescentAddress; - int *typoLineGap = (int *)(uintptr_t)typoLineGapAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetFontVMetricsOS2(info, typoAscent, typoDescent, typoLineGap); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontBoundingBox__JJJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong x0Address, jlong y0Address, jlong x1Address, jlong y1Address) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *x0 = (int *)(uintptr_t)x0Address; - int *y0 = (int *)(uintptr_t)y0Address; - int *x1 = (int *)(uintptr_t)x1Address; - int *y1 = (int *)(uintptr_t)y1Address; - UNUSED_PARAMS(__env, clazz) - stbtt_GetFontBoundingBox(info, x0, y0, x1, y1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointHMetrics__JIJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jint codepoint, jlong advanceWidthAddress, jlong leftSideBearingAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *advanceWidth = (int *)(uintptr_t)advanceWidthAddress; - int *leftSideBearing = (int *)(uintptr_t)leftSideBearingAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_GetCodepointHMetrics(info, codepoint, advanceWidth, leftSideBearing); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointKernAdvance(JNIEnv *__env, jclass clazz, jlong infoAddress, jint ch1, jint ch2) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetCodepointKernAdvance(info, ch1, ch2); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBox__JIJJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jint codepoint, jlong x0Address, jlong y0Address, jlong x1Address, jlong y1Address) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *x0 = (int *)(uintptr_t)x0Address; - int *y0 = (int *)(uintptr_t)y0Address; - int *x1 = (int *)(uintptr_t)x1Address; - int *y1 = (int *)(uintptr_t)y1Address; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetCodepointBox(info, codepoint, x0, y0, x1, y1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphHMetrics__JIJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jint glyph_index, jlong advanceWidthAddress, jlong leftSideBearingAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *advanceWidth = (int *)(uintptr_t)advanceWidthAddress; - int *leftSideBearing = (int *)(uintptr_t)leftSideBearingAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_GetGlyphHMetrics(info, glyph_index, advanceWidth, leftSideBearing); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphKernAdvance(JNIEnv *__env, jclass clazz, jlong infoAddress, jint glyph1, jint glyph2) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetGlyphKernAdvance(info, glyph1, glyph2); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBox__JIJJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jint glyph_index, jlong x0Address, jlong y0Address, jlong x1Address, jlong y1Address) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *x0 = (int *)(uintptr_t)x0Address; - int *y0 = (int *)(uintptr_t)y0Address; - int *x1 = (int *)(uintptr_t)x1Address; - int *y1 = (int *)(uintptr_t)y1Address; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetGlyphBox(info, glyph_index, x0, y0, x1, y1); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetKerningTableLength(JNIEnv *__env, jclass clazz, jlong infoAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetKerningTableLength(info); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetKerningTable(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong tableAddress, jint table_length) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - stbtt_kerningentry *table = (stbtt_kerningentry *)(uintptr_t)tableAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetKerningTable(info, table, table_length); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1IsGlyphEmpty(JNIEnv *__env, jclass clazz, jlong infoAddress, jint glyph_index) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_IsGlyphEmpty(info, glyph_index); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointShape(JNIEnv *__env, jclass clazz, jlong infoAddress, jint unicode_codepoint, jlong verticesAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - stbtt_vertex **vertices = (stbtt_vertex **)(uintptr_t)verticesAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetCodepointShape(info, unicode_codepoint, vertices); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphShape(JNIEnv *__env, jclass clazz, jlong infoAddress, jint glyph_index, jlong verticesAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - stbtt_vertex **vertices = (stbtt_vertex **)(uintptr_t)verticesAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetGlyphShape(info, glyph_index, vertices); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1FreeShape(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong verticesAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - stbtt_vertex *vertices = (stbtt_vertex *)(uintptr_t)verticesAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_FreeShape(info, vertices); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1FindSVGDoc(JNIEnv *__env, jclass clazz, jlong infoAddress, jint gl) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_FindSVGDoc(info, gl); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointSVG(JNIEnv *__env, jclass clazz, jlong infoAddress, jint unicode_codepoint, jlong svgAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - char const **svg = (char const **)(uintptr_t)svgAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetCodepointSVG(info, unicode_codepoint, svg); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphSVG(JNIEnv *__env, jclass clazz, jlong infoAddress, jint gl, jlong svgAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - char const **svg = (char const **)(uintptr_t)svgAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_GetGlyphSVG(info, gl, svg); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1FreeBitmap(JNIEnv *__env, jclass clazz, jlong bitmapAddress, jlong userdataAddress) { - unsigned char *bitmap = (unsigned char *)(uintptr_t)bitmapAddress; - void *userdata = (void *)(uintptr_t)userdataAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_FreeBitmap(bitmap, userdata); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmap__JFFIJJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jint codepoint, jlong widthAddress, jlong heightAddress, jlong xoffAddress, jlong yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *width = (int *)(uintptr_t)widthAddress; - int *height = (int *)(uintptr_t)heightAddress; - int *xoff = (int *)(uintptr_t)xoffAddress; - int *yoff = (int *)(uintptr_t)yoffAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_GetCodepointBitmap(info, scale_x, scale_y, codepoint, width, height, xoff, yoff); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmapSubpixel__JFFFFIJJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint codepoint, jlong widthAddress, jlong heightAddress, jlong xoffAddress, jlong yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *width = (int *)(uintptr_t)widthAddress; - int *height = (int *)(uintptr_t)heightAddress; - int *xoff = (int *)(uintptr_t)xoffAddress; - int *yoff = (int *)(uintptr_t)yoffAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, shift_x, shift_y, codepoint, width, height, xoff, yoff); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeCodepointBitmap(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jint codepoint) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_MakeCodepointBitmap(info, output, out_w, out_h, out_stride, scale_x, scale_y, codepoint); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeCodepointBitmapSubpixel(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint codepoint) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_MakeCodepointBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, codepoint); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeCodepointBitmapSubpixelPrefilter__JJIIIFFFFIIJJI(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint oversample_x, jint oversample_y, jlong sub_xAddress, jlong sub_yAddress, jint codepoint) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - float *sub_x = (float *)(uintptr_t)sub_xAddress; - float *sub_y = (float *)(uintptr_t)sub_yAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_MakeCodepointBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, sub_x, sub_y, codepoint); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmapBox__JIFFJJJJ(JNIEnv *__env, jclass clazz, jlong fontAddress, jint codepoint, jfloat scale_x, jfloat scale_y, jlong ix0Address, jlong iy0Address, jlong ix1Address, jlong iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - int *ix0 = (int *)(uintptr_t)ix0Address; - int *iy0 = (int *)(uintptr_t)iy0Address; - int *ix1 = (int *)(uintptr_t)ix1Address; - int *iy1 = (int *)(uintptr_t)iy1Address; - UNUSED_PARAMS(__env, clazz) - stbtt_GetCodepointBitmapBox(font, codepoint, scale_x, scale_y, ix0, iy0, ix1, iy1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmapBoxSubpixel__JIFFFFJJJJ(JNIEnv *__env, jclass clazz, jlong fontAddress, jint codepoint, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jlong ix0Address, jlong iy0Address, jlong ix1Address, jlong iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - int *ix0 = (int *)(uintptr_t)ix0Address; - int *iy0 = (int *)(uintptr_t)iy0Address; - int *ix1 = (int *)(uintptr_t)ix1Address; - int *iy1 = (int *)(uintptr_t)iy1Address; - UNUSED_PARAMS(__env, clazz) - stbtt_GetCodepointBitmapBoxSubpixel(font, codepoint, scale_x, scale_y, shift_x, shift_y, ix0, iy0, ix1, iy1); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmap__JFFIJJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jint glyph, jlong widthAddress, jlong heightAddress, jlong xoffAddress, jlong yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *width = (int *)(uintptr_t)widthAddress; - int *height = (int *)(uintptr_t)heightAddress; - int *xoff = (int *)(uintptr_t)xoffAddress; - int *yoff = (int *)(uintptr_t)yoffAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_GetGlyphBitmap(info, scale_x, scale_y, glyph, width, height, xoff, yoff); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmapSubpixel__JFFFFIJJJJ(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint glyph, jlong widthAddress, jlong heightAddress, jlong xoffAddress, jlong yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - int *width = (int *)(uintptr_t)widthAddress; - int *height = (int *)(uintptr_t)heightAddress; - int *xoff = (int *)(uintptr_t)xoffAddress; - int *yoff = (int *)(uintptr_t)yoffAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y, shift_x, shift_y, glyph, width, height, xoff, yoff); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeGlyphBitmap(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jint glyph) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_MakeGlyphBitmap(info, output, out_w, out_h, out_stride, scale_x, scale_y, glyph); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeGlyphBitmapSubpixel(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint glyph) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, glyph); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeGlyphBitmapSubpixelPrefilter__JJIIIFFFFIIJJI(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint oversample_x, jint oversample_y, jlong sub_xAddress, jlong sub_yAddress, jint glyph) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - float *sub_x = (float *)(uintptr_t)sub_xAddress; - float *sub_y = (float *)(uintptr_t)sub_yAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_MakeGlyphBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, sub_x, sub_y, glyph); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmapBox__JIFFJJJJ(JNIEnv *__env, jclass clazz, jlong fontAddress, jint glyph, jfloat scale_x, jfloat scale_y, jlong ix0Address, jlong iy0Address, jlong ix1Address, jlong iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - int *ix0 = (int *)(uintptr_t)ix0Address; - int *iy0 = (int *)(uintptr_t)iy0Address; - int *ix1 = (int *)(uintptr_t)ix1Address; - int *iy1 = (int *)(uintptr_t)iy1Address; - UNUSED_PARAMS(__env, clazz) - stbtt_GetGlyphBitmapBox(font, glyph, scale_x, scale_y, ix0, iy0, ix1, iy1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmapBoxSubpixel__JIFFFFJJJJ(JNIEnv *__env, jclass clazz, jlong fontAddress, jint glyph, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jlong ix0Address, jlong iy0Address, jlong ix1Address, jlong iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - int *ix0 = (int *)(uintptr_t)ix0Address; - int *iy0 = (int *)(uintptr_t)iy0Address; - int *ix1 = (int *)(uintptr_t)ix1Address; - int *iy1 = (int *)(uintptr_t)iy1Address; - UNUSED_PARAMS(__env, clazz) - stbtt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y, shift_x, shift_y, ix0, iy0, ix1, iy1); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1Rasterize(JNIEnv *__env, jclass clazz, jlong resultAddress, jfloat flatness_in_pixels, jlong verticesAddress, jint num_verts, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint x_off, jint y_off, jint invert, jlong alloc_contextAddress) { - stbtt__bitmap *result = (stbtt__bitmap *)(uintptr_t)resultAddress; - stbtt_vertex *vertices = (stbtt_vertex *)(uintptr_t)verticesAddress; - void *alloc_context = (void *)(uintptr_t)alloc_contextAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_Rasterize(result, flatness_in_pixels, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert, alloc_context); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1FreeSDF(JNIEnv *__env, jclass clazz, jlong bitmapAddress, jlong userdataAddress) { - unsigned char *bitmap = (unsigned char *)(uintptr_t)bitmapAddress; - void *userdata = (void *)(uintptr_t)userdataAddress; - UNUSED_PARAMS(__env, clazz) - stbtt_FreeSDF(bitmap, userdata); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphSDF__JFIIBFJJJJ(JNIEnv *__env, jclass clazz, jlong fontAddress, jfloat scale, jint glyph, jint padding, jbyte onedge_value, jfloat pixel_dist_scale, jlong widthAddress, jlong heightAddress, jlong xoffAddress, jlong yoffAddress) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - int *width = (int *)(uintptr_t)widthAddress; - int *height = (int *)(uintptr_t)heightAddress; - int *xoff = (int *)(uintptr_t)xoffAddress; - int *yoff = (int *)(uintptr_t)yoffAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_GetGlyphSDF(font, scale, glyph, padding, (unsigned char)onedge_value, pixel_dist_scale, width, height, xoff, yoff); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointSDF__JFIIBFJJJJ(JNIEnv *__env, jclass clazz, jlong fontAddress, jfloat scale, jint codepoint, jint padding, jbyte onedge_value, jfloat pixel_dist_scale, jlong widthAddress, jlong heightAddress, jlong xoffAddress, jlong yoffAddress) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - int *width = (int *)(uintptr_t)widthAddress; - int *height = (int *)(uintptr_t)heightAddress; - int *xoff = (int *)(uintptr_t)xoffAddress; - int *yoff = (int *)(uintptr_t)yoffAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_GetCodepointSDF(font, scale, codepoint, padding, (unsigned char)onedge_value, pixel_dist_scale, width, height, xoff, yoff); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1FindMatchingFont(JNIEnv *__env, jclass clazz, jlong fontdataAddress, jlong nameAddress, jint flags) { - unsigned char const *fontdata = (unsigned char const *)(uintptr_t)fontdataAddress; - char const *name = (char const *)(uintptr_t)nameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_FindMatchingFont(fontdata, name, flags); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1CompareUTF8toUTF16_1bigendian(JNIEnv *__env, jclass clazz, jlong s1Address, jint len1, jlong s2Address, jint len2) { - char const *s1 = (char const *)(uintptr_t)s1Address; - char const *s2 = (char const *)(uintptr_t)s2Address; - UNUSED_PARAMS(__env, clazz) - return (jint)stbtt_CompareUTF8toUTF16_bigendian(s1, len1, s2, len2); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontNameString(JNIEnv *__env, jclass clazz, jlong fontAddress, jlong lengthAddress, jint platformID, jint encodingID, jint languageID, jint nameID) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - int *length = (int *)(uintptr_t)lengthAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stbtt_GetFontNameString(font, length, platformID, encodingID, languageID, nameID); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetBakedQuad__JIII_3F_3FJI(JNIEnv *__env, jclass clazz, jlong chardataAddress, jint pw, jint ph, jint char_index, jfloatArray xposAddress, jfloatArray yposAddress, jlong qAddress, jint opengl_fillrule) { - stbtt_bakedchar const *chardata = (stbtt_bakedchar const *)(uintptr_t)chardataAddress; - stbtt_aligned_quad *q = (stbtt_aligned_quad *)(uintptr_t)qAddress; - jfloat *xpos = (*__env)->GetFloatArrayElements(__env, xposAddress, NULL); - jfloat *ypos = (*__env)->GetFloatArrayElements(__env, yposAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetBakedQuad(chardata, pw, ph, char_index, (float *)xpos, (float *)ypos, q, opengl_fillrule); - (*__env)->ReleaseFloatArrayElements(__env, yposAddress, ypos, 0); - (*__env)->ReleaseFloatArrayElements(__env, xposAddress, xpos, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetScaledFontVMetrics__JIF_3F_3F_3F(JNIEnv *__env, jclass clazz, jlong fontdataAddress, jint index, jfloat size, jfloatArray ascentAddress, jfloatArray descentAddress, jfloatArray lineGapAddress) { - unsigned char const *fontdata = (unsigned char const *)(uintptr_t)fontdataAddress; - jfloat *ascent = (*__env)->GetFloatArrayElements(__env, ascentAddress, NULL); - jfloat *descent = (*__env)->GetFloatArrayElements(__env, descentAddress, NULL); - jfloat *lineGap = (*__env)->GetFloatArrayElements(__env, lineGapAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetScaledFontVMetrics(fontdata, index, size, (float *)ascent, (float *)descent, (float *)lineGap); - (*__env)->ReleaseFloatArrayElements(__env, lineGapAddress, lineGap, 0); - (*__env)->ReleaseFloatArrayElements(__env, descentAddress, descent, 0); - (*__env)->ReleaseFloatArrayElements(__env, ascentAddress, ascent, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetPackedQuad__JIII_3F_3FJI(JNIEnv *__env, jclass clazz, jlong chardataAddress, jint pw, jint ph, jint char_index, jfloatArray xposAddress, jfloatArray yposAddress, jlong qAddress, jint align_to_integer) { - stbtt_packedchar const *chardata = (stbtt_packedchar const *)(uintptr_t)chardataAddress; - stbtt_aligned_quad *q = (stbtt_aligned_quad *)(uintptr_t)qAddress; - jfloat *xpos = (*__env)->GetFloatArrayElements(__env, xposAddress, NULL); - jfloat *ypos = (*__env)->GetFloatArrayElements(__env, yposAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetPackedQuad(chardata, pw, ph, char_index, (float *)xpos, (float *)ypos, q, align_to_integer); - (*__env)->ReleaseFloatArrayElements(__env, yposAddress, ypos, 0); - (*__env)->ReleaseFloatArrayElements(__env, xposAddress, xpos, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontVMetrics__J_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jintArray ascentAddress, jintArray descentAddress, jintArray lineGapAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jint *ascent = ascentAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ascentAddress, NULL); - jint *descent = descentAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, descentAddress, NULL); - jint *lineGap = lineGapAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, lineGapAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetFontVMetrics(info, (int *)ascent, (int *)descent, (int *)lineGap); - if (lineGap != NULL) { (*__env)->ReleaseIntArrayElements(__env, lineGapAddress, lineGap, 0); } - if (descent != NULL) { (*__env)->ReleaseIntArrayElements(__env, descentAddress, descent, 0); } - if (ascent != NULL) { (*__env)->ReleaseIntArrayElements(__env, ascentAddress, ascent, 0); } -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontVMetricsOS2__J_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jintArray typoAscentAddress, jintArray typoDescentAddress, jintArray typoLineGapAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jint __result; - jint *typoAscent = typoAscentAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, typoAscentAddress, NULL); - jint *typoDescent = typoDescentAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, typoDescentAddress, NULL); - jint *typoLineGap = typoLineGapAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, typoLineGapAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbtt_GetFontVMetricsOS2(info, (int *)typoAscent, (int *)typoDescent, (int *)typoLineGap); - if (typoLineGap != NULL) { (*__env)->ReleaseIntArrayElements(__env, typoLineGapAddress, typoLineGap, 0); } - if (typoDescent != NULL) { (*__env)->ReleaseIntArrayElements(__env, typoDescentAddress, typoDescent, 0); } - if (typoAscent != NULL) { (*__env)->ReleaseIntArrayElements(__env, typoAscentAddress, typoAscent, 0); } - return __result; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetFontBoundingBox__J_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jintArray x0Address, jintArray y0Address, jintArray x1Address, jintArray y1Address) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jint *x0 = (*__env)->GetIntArrayElements(__env, x0Address, NULL); - jint *y0 = (*__env)->GetIntArrayElements(__env, y0Address, NULL); - jint *x1 = (*__env)->GetIntArrayElements(__env, x1Address, NULL); - jint *y1 = (*__env)->GetIntArrayElements(__env, y1Address, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetFontBoundingBox(info, (int *)x0, (int *)y0, (int *)x1, (int *)y1); - (*__env)->ReleaseIntArrayElements(__env, y1Address, y1, 0); - (*__env)->ReleaseIntArrayElements(__env, x1Address, x1, 0); - (*__env)->ReleaseIntArrayElements(__env, y0Address, y0, 0); - (*__env)->ReleaseIntArrayElements(__env, x0Address, x0, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointHMetrics__JI_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jint codepoint, jintArray advanceWidthAddress, jintArray leftSideBearingAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jint *advanceWidth = advanceWidthAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, advanceWidthAddress, NULL); - jint *leftSideBearing = leftSideBearingAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, leftSideBearingAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetCodepointHMetrics(info, codepoint, (int *)advanceWidth, (int *)leftSideBearing); - if (leftSideBearing != NULL) { (*__env)->ReleaseIntArrayElements(__env, leftSideBearingAddress, leftSideBearing, 0); } - if (advanceWidth != NULL) { (*__env)->ReleaseIntArrayElements(__env, advanceWidthAddress, advanceWidth, 0); } -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBox__JI_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jint codepoint, jintArray x0Address, jintArray y0Address, jintArray x1Address, jintArray y1Address) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jint __result; - jint *x0 = x0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, x0Address, NULL); - jint *y0 = y0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, y0Address, NULL); - jint *x1 = x1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, x1Address, NULL); - jint *y1 = y1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, y1Address, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbtt_GetCodepointBox(info, codepoint, (int *)x0, (int *)y0, (int *)x1, (int *)y1); - if (y1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, y1Address, y1, 0); } - if (x1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, x1Address, x1, 0); } - if (y0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, y0Address, y0, 0); } - if (x0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, x0Address, x0, 0); } - return __result; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphHMetrics__JI_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jint glyph_index, jintArray advanceWidthAddress, jintArray leftSideBearingAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jint *advanceWidth = advanceWidthAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, advanceWidthAddress, NULL); - jint *leftSideBearing = leftSideBearingAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, leftSideBearingAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetGlyphHMetrics(info, glyph_index, (int *)advanceWidth, (int *)leftSideBearing); - if (leftSideBearing != NULL) { (*__env)->ReleaseIntArrayElements(__env, leftSideBearingAddress, leftSideBearing, 0); } - if (advanceWidth != NULL) { (*__env)->ReleaseIntArrayElements(__env, advanceWidthAddress, advanceWidth, 0); } -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBox__JI_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jint glyph_index, jintArray x0Address, jintArray y0Address, jintArray x1Address, jintArray y1Address) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jint __result; - jint *x0 = x0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, x0Address, NULL); - jint *y0 = y0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, y0Address, NULL); - jint *x1 = x1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, x1Address, NULL); - jint *y1 = y1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, y1Address, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stbtt_GetGlyphBox(info, glyph_index, (int *)x0, (int *)y0, (int *)x1, (int *)y1); - if (y1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, y1Address, y1, 0); } - if (x1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, x1Address, x1, 0); } - if (y0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, y0Address, y0, 0); } - if (x0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, x0Address, x0, 0); } - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmap__JFFI_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jint codepoint, jintArray widthAddress, jintArray heightAddress, jintArray xoffAddress, jintArray yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jlong __result; - jint *width = (*__env)->GetIntArrayElements(__env, widthAddress, NULL); - jint *height = (*__env)->GetIntArrayElements(__env, heightAddress, NULL); - jint *xoff = xoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, xoffAddress, NULL); - jint *yoff = yoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, yoffAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbtt_GetCodepointBitmap(info, scale_x, scale_y, codepoint, (int *)width, (int *)height, (int *)xoff, (int *)yoff); - if (yoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, yoffAddress, yoff, 0); } - if (xoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, xoffAddress, xoff, 0); } - (*__env)->ReleaseIntArrayElements(__env, heightAddress, height, 0); - (*__env)->ReleaseIntArrayElements(__env, widthAddress, width, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmapSubpixel__JFFFFI_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint codepoint, jintArray widthAddress, jintArray heightAddress, jintArray xoffAddress, jintArray yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jlong __result; - jint *width = (*__env)->GetIntArrayElements(__env, widthAddress, NULL); - jint *height = (*__env)->GetIntArrayElements(__env, heightAddress, NULL); - jint *xoff = xoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, xoffAddress, NULL); - jint *yoff = yoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, yoffAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, shift_x, shift_y, codepoint, (int *)width, (int *)height, (int *)xoff, (int *)yoff); - if (yoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, yoffAddress, yoff, 0); } - if (xoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, xoffAddress, xoff, 0); } - (*__env)->ReleaseIntArrayElements(__env, heightAddress, height, 0); - (*__env)->ReleaseIntArrayElements(__env, widthAddress, width, 0); - return __result; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeCodepointBitmapSubpixelPrefilter__JJIIIFFFFII_3F_3FI(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint oversample_x, jint oversample_y, jfloatArray sub_xAddress, jfloatArray sub_yAddress, jint codepoint) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - jfloat *sub_x = (*__env)->GetFloatArrayElements(__env, sub_xAddress, NULL); - jfloat *sub_y = (*__env)->GetFloatArrayElements(__env, sub_yAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_MakeCodepointBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, (float *)sub_x, (float *)sub_y, codepoint); - (*__env)->ReleaseFloatArrayElements(__env, sub_yAddress, sub_y, 0); - (*__env)->ReleaseFloatArrayElements(__env, sub_xAddress, sub_x, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmapBox__JIFF_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong fontAddress, jint codepoint, jfloat scale_x, jfloat scale_y, jintArray ix0Address, jintArray iy0Address, jintArray ix1Address, jintArray iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - jint *ix0 = ix0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix0Address, NULL); - jint *iy0 = iy0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy0Address, NULL); - jint *ix1 = ix1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix1Address, NULL); - jint *iy1 = iy1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy1Address, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetCodepointBitmapBox(font, codepoint, scale_x, scale_y, (int *)ix0, (int *)iy0, (int *)ix1, (int *)iy1); - if (iy1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy1Address, iy1, 0); } - if (ix1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix1Address, ix1, 0); } - if (iy0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy0Address, iy0, 0); } - if (ix0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix0Address, ix0, 0); } -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointBitmapBoxSubpixel__JIFFFF_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong fontAddress, jint codepoint, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jintArray ix0Address, jintArray iy0Address, jintArray ix1Address, jintArray iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - jint *ix0 = ix0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix0Address, NULL); - jint *iy0 = iy0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy0Address, NULL); - jint *ix1 = ix1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix1Address, NULL); - jint *iy1 = iy1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy1Address, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetCodepointBitmapBoxSubpixel(font, codepoint, scale_x, scale_y, shift_x, shift_y, (int *)ix0, (int *)iy0, (int *)ix1, (int *)iy1); - if (iy1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy1Address, iy1, 0); } - if (ix1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix1Address, ix1, 0); } - if (iy0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy0Address, iy0, 0); } - if (ix0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix0Address, ix0, 0); } -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmap__JFFI_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jint glyph, jintArray widthAddress, jintArray heightAddress, jintArray xoffAddress, jintArray yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jlong __result; - jint *width = (*__env)->GetIntArrayElements(__env, widthAddress, NULL); - jint *height = (*__env)->GetIntArrayElements(__env, heightAddress, NULL); - jint *xoff = xoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, xoffAddress, NULL); - jint *yoff = yoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, yoffAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbtt_GetGlyphBitmap(info, scale_x, scale_y, glyph, (int *)width, (int *)height, (int *)xoff, (int *)yoff); - if (yoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, yoffAddress, yoff, 0); } - if (xoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, xoffAddress, xoff, 0); } - (*__env)->ReleaseIntArrayElements(__env, heightAddress, height, 0); - (*__env)->ReleaseIntArrayElements(__env, widthAddress, width, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmapSubpixel__JFFFFI_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong infoAddress, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint glyph, jintArray widthAddress, jintArray heightAddress, jintArray xoffAddress, jintArray yoffAddress) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - jlong __result; - jint *width = (*__env)->GetIntArrayElements(__env, widthAddress, NULL); - jint *height = (*__env)->GetIntArrayElements(__env, heightAddress, NULL); - jint *xoff = xoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, xoffAddress, NULL); - jint *yoff = yoffAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, yoffAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y, shift_x, shift_y, glyph, (int *)width, (int *)height, (int *)xoff, (int *)yoff); - if (yoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, yoffAddress, yoff, 0); } - if (xoff != NULL) { (*__env)->ReleaseIntArrayElements(__env, xoffAddress, xoff, 0); } - (*__env)->ReleaseIntArrayElements(__env, heightAddress, height, 0); - (*__env)->ReleaseIntArrayElements(__env, widthAddress, width, 0); - return __result; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1MakeGlyphBitmapSubpixelPrefilter__JJIIIFFFFII_3F_3FI(JNIEnv *__env, jclass clazz, jlong infoAddress, jlong outputAddress, jint out_w, jint out_h, jint out_stride, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jint oversample_x, jint oversample_y, jfloatArray sub_xAddress, jfloatArray sub_yAddress, jint glyph) { - stbtt_fontinfo const *info = (stbtt_fontinfo const *)(uintptr_t)infoAddress; - unsigned char *output = (unsigned char *)(uintptr_t)outputAddress; - jfloat *sub_x = (*__env)->GetFloatArrayElements(__env, sub_xAddress, NULL); - jfloat *sub_y = (*__env)->GetFloatArrayElements(__env, sub_yAddress, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_MakeGlyphBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, (float *)sub_x, (float *)sub_y, glyph); - (*__env)->ReleaseFloatArrayElements(__env, sub_yAddress, sub_y, 0); - (*__env)->ReleaseFloatArrayElements(__env, sub_xAddress, sub_x, 0); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmapBox__JIFF_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong fontAddress, jint glyph, jfloat scale_x, jfloat scale_y, jintArray ix0Address, jintArray iy0Address, jintArray ix1Address, jintArray iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - jint *ix0 = ix0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix0Address, NULL); - jint *iy0 = iy0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy0Address, NULL); - jint *ix1 = ix1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix1Address, NULL); - jint *iy1 = iy1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy1Address, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetGlyphBitmapBox(font, glyph, scale_x, scale_y, (int *)ix0, (int *)iy0, (int *)ix1, (int *)iy1); - if (iy1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy1Address, iy1, 0); } - if (ix1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix1Address, ix1, 0); } - if (iy0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy0Address, iy0, 0); } - if (ix0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix0Address, ix0, 0); } -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphBitmapBoxSubpixel__JIFFFF_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong fontAddress, jint glyph, jfloat scale_x, jfloat scale_y, jfloat shift_x, jfloat shift_y, jintArray ix0Address, jintArray iy0Address, jintArray ix1Address, jintArray iy1Address) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - jint *ix0 = ix0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix0Address, NULL); - jint *iy0 = iy0Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy0Address, NULL); - jint *ix1 = ix1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, ix1Address, NULL); - jint *iy1 = iy1Address == NULL ? NULL : (*__env)->GetIntArrayElements(__env, iy1Address, NULL); - UNUSED_PARAMS(__env, clazz) - stbtt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y, shift_x, shift_y, (int *)ix0, (int *)iy0, (int *)ix1, (int *)iy1); - if (iy1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy1Address, iy1, 0); } - if (ix1 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix1Address, ix1, 0); } - if (iy0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, iy0Address, iy0, 0); } - if (ix0 != NULL) { (*__env)->ReleaseIntArrayElements(__env, ix0Address, ix0, 0); } -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetGlyphSDF__JFIIBF_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong fontAddress, jfloat scale, jint glyph, jint padding, jbyte onedge_value, jfloat pixel_dist_scale, jintArray widthAddress, jintArray heightAddress, jintArray xoffAddress, jintArray yoffAddress) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - jlong __result; - jint *width = (*__env)->GetIntArrayElements(__env, widthAddress, NULL); - jint *height = (*__env)->GetIntArrayElements(__env, heightAddress, NULL); - jint *xoff = (*__env)->GetIntArrayElements(__env, xoffAddress, NULL); - jint *yoff = (*__env)->GetIntArrayElements(__env, yoffAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbtt_GetGlyphSDF(font, scale, glyph, padding, (unsigned char)onedge_value, pixel_dist_scale, (int *)width, (int *)height, (int *)xoff, (int *)yoff); - (*__env)->ReleaseIntArrayElements(__env, yoffAddress, yoff, 0); - (*__env)->ReleaseIntArrayElements(__env, xoffAddress, xoff, 0); - (*__env)->ReleaseIntArrayElements(__env, heightAddress, height, 0); - (*__env)->ReleaseIntArrayElements(__env, widthAddress, width, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBTruetype_nstbtt_1GetCodepointSDF__JFIIBF_3I_3I_3I_3I(JNIEnv *__env, jclass clazz, jlong fontAddress, jfloat scale, jint codepoint, jint padding, jbyte onedge_value, jfloat pixel_dist_scale, jintArray widthAddress, jintArray heightAddress, jintArray xoffAddress, jintArray yoffAddress) { - stbtt_fontinfo const *font = (stbtt_fontinfo const *)(uintptr_t)fontAddress; - jlong __result; - jint *width = (*__env)->GetIntArrayElements(__env, widthAddress, NULL); - jint *height = (*__env)->GetIntArrayElements(__env, heightAddress, NULL); - jint *xoff = (*__env)->GetIntArrayElements(__env, xoffAddress, NULL); - jint *yoff = (*__env)->GetIntArrayElements(__env, yoffAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stbtt_GetCodepointSDF(font, scale, codepoint, padding, (unsigned char)onedge_value, pixel_dist_scale, (int *)width, (int *)height, (int *)xoff, (int *)yoff); - (*__env)->ReleaseIntArrayElements(__env, yoffAddress, yoff, 0); - (*__env)->ReleaseIntArrayElements(__env, xoffAddress, xoff, 0); - (*__env)->ReleaseIntArrayElements(__env, heightAddress, height, 0); - (*__env)->ReleaseIntArrayElements(__env, widthAddress, width, 0); - return __result; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBVorbis.c b/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBVorbis.c deleted file mode 100644 index 1a558454..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/org_lwjgl_stb_STBVorbis.c +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -DISABLE_WARNINGS() -#ifdef LWJGL_LINUX - #include -#endif -#include "stb_vorbis.c" -ENABLE_WARNINGS() - -EXTERN_C_ENTER - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1info(JNIEnv *__env, jclass clazz, jlong fAddress, jlong __result) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - *((stb_vorbis_info*)(uintptr_t)__result) = stb_vorbis_get_info(f); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1comment(JNIEnv *__env, jclass clazz, jlong fAddress, jlong __result) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - *((stb_vorbis_comment*)(uintptr_t)__result) = stb_vorbis_get_comment(f); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1error(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_error(f); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1close(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - stb_vorbis_close(f); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1sample_1offset(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_sample_offset(f); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1file_1offset(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_file_offset(f); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1open_1pushdata__JIJJJ(JNIEnv *__env, jclass clazz, jlong datablockAddress, jint datablock_length_in_bytes, jlong datablock_memory_consumed_in_bytesAddress, jlong errorAddress, jlong alloc_bufferAddress) { - unsigned char const *datablock = (unsigned char const *)(uintptr_t)datablockAddress; - int *datablock_memory_consumed_in_bytes = (int *)(uintptr_t)datablock_memory_consumed_in_bytesAddress; - int *error = (int *)(uintptr_t)errorAddress; - stb_vorbis_alloc const *alloc_buffer = (stb_vorbis_alloc const *)(uintptr_t)alloc_bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stb_vorbis_open_pushdata(datablock, datablock_length_in_bytes, datablock_memory_consumed_in_bytes, error, alloc_buffer); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1decode_1frame_1pushdata__JJIJJJ(JNIEnv *__env, jclass clazz, jlong fAddress, jlong datablockAddress, jint datablock_length_in_bytes, jlong channelsAddress, jlong outputAddress, jlong samplesAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - unsigned char const *datablock = (unsigned char const *)(uintptr_t)datablockAddress; - int *channels = (int *)(uintptr_t)channelsAddress; - float ***output = (float ***)(uintptr_t)outputAddress; - int *samples = (int *)(uintptr_t)samplesAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_decode_frame_pushdata(f, datablock, datablock_length_in_bytes, channels, output, samples); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1flush_1pushdata(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - stb_vorbis_flush_pushdata(f); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1decode_1filename__JJJJ(JNIEnv *__env, jclass clazz, jlong filenameAddress, jlong channelsAddress, jlong sample_rateAddress, jlong outputAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - int *channels = (int *)(uintptr_t)channelsAddress; - int *sample_rate = (int *)(uintptr_t)sample_rateAddress; - short **output = (short **)(uintptr_t)outputAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_decode_filename(filename, channels, sample_rate, output); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1decode_1memory__JIJJJ(JNIEnv *__env, jclass clazz, jlong memAddress, jint len, jlong channelsAddress, jlong sample_rateAddress, jlong outputAddress) { - unsigned char const *mem = (unsigned char const *)(uintptr_t)memAddress; - int *channels = (int *)(uintptr_t)channelsAddress; - int *sample_rate = (int *)(uintptr_t)sample_rateAddress; - short **output = (short **)(uintptr_t)outputAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_decode_memory(mem, len, channels, sample_rate, output); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1open_1memory__JIJJ(JNIEnv *__env, jclass clazz, jlong memAddress, jint len, jlong errorAddress, jlong alloc_bufferAddress) { - unsigned char const *mem = (unsigned char const *)(uintptr_t)memAddress; - int *error = (int *)(uintptr_t)errorAddress; - stb_vorbis_alloc const *alloc_buffer = (stb_vorbis_alloc const *)(uintptr_t)alloc_bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stb_vorbis_open_memory(mem, len, error, alloc_buffer); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1open_1filename__JJJ(JNIEnv *__env, jclass clazz, jlong filenameAddress, jlong errorAddress, jlong alloc_bufferAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - int *error = (int *)(uintptr_t)errorAddress; - stb_vorbis_alloc const *alloc_buffer = (stb_vorbis_alloc const *)(uintptr_t)alloc_bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)stb_vorbis_open_filename(filename, error, alloc_buffer); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1seek_1frame(JNIEnv *__env, jclass clazz, jlong fAddress, jint sample_number) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_seek_frame(f, (unsigned int)sample_number); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1seek(JNIEnv *__env, jclass clazz, jlong fAddress, jint sample_number) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_seek(f, (unsigned int)sample_number); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1seek_1start(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_seek_start(f); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1stream_1length_1in_1samples(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_stream_length_in_samples(f); -} - -JNIEXPORT jfloat JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1stream_1length_1in_1seconds(JNIEnv *__env, jclass clazz, jlong fAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - UNUSED_PARAMS(__env, clazz) - return (jfloat)stb_vorbis_stream_length_in_seconds(f); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1frame_1float__JJJ(JNIEnv *__env, jclass clazz, jlong fAddress, jlong channelsAddress, jlong outputAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - int *channels = (int *)(uintptr_t)channelsAddress; - float ***output = (float ***)(uintptr_t)outputAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_frame_float(f, channels, output); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1frame_1short(JNIEnv *__env, jclass clazz, jlong fAddress, jint num_c, jlong bufferAddress, jint num_samples) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - short **buffer = (short **)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_frame_short(f, num_c, buffer, num_samples); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1frame_1short_1interleaved__JIJI(JNIEnv *__env, jclass clazz, jlong fAddress, jint num_c, jlong bufferAddress, jint num_shorts) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - short *buffer = (short *)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_frame_short_interleaved(f, num_c, buffer, num_shorts); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1samples_1float(JNIEnv *__env, jclass clazz, jlong fAddress, jint channels, jlong bufferAddress, jint num_samples) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - float **buffer = (float **)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_samples_float(f, channels, buffer, num_samples); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1samples_1float_1interleaved__JIJI(JNIEnv *__env, jclass clazz, jlong fAddress, jint channels, jlong bufferAddress, jint num_floats) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - float *buffer = (float *)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_samples_float_interleaved(f, channels, buffer, num_floats); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1samples_1short(JNIEnv *__env, jclass clazz, jlong fAddress, jint channels, jlong bufferAddress, jint num_samples) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - short **buffer = (short **)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_samples_short(f, channels, buffer, num_samples); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1samples_1short_1interleaved__JIJI(JNIEnv *__env, jclass clazz, jlong fAddress, jint channels, jlong bufferAddress, jint num_shorts) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - short *buffer = (short *)(uintptr_t)bufferAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)stb_vorbis_get_samples_short_interleaved(f, channels, buffer, num_shorts); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1open_1pushdata__JI_3I_3IJ(JNIEnv *__env, jclass clazz, jlong datablockAddress, jint datablock_length_in_bytes, jintArray datablock_memory_consumed_in_bytesAddress, jintArray errorAddress, jlong alloc_bufferAddress) { - unsigned char const *datablock = (unsigned char const *)(uintptr_t)datablockAddress; - stb_vorbis_alloc const *alloc_buffer = (stb_vorbis_alloc const *)(uintptr_t)alloc_bufferAddress; - jlong __result; - jint *datablock_memory_consumed_in_bytes = (*__env)->GetIntArrayElements(__env, datablock_memory_consumed_in_bytesAddress, NULL); - jint *error = (*__env)->GetIntArrayElements(__env, errorAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stb_vorbis_open_pushdata(datablock, datablock_length_in_bytes, (int *)datablock_memory_consumed_in_bytes, (int *)error, alloc_buffer); - (*__env)->ReleaseIntArrayElements(__env, errorAddress, error, 0); - (*__env)->ReleaseIntArrayElements(__env, datablock_memory_consumed_in_bytesAddress, datablock_memory_consumed_in_bytes, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1decode_1frame_1pushdata__JJI_3IJ_3I(JNIEnv *__env, jclass clazz, jlong fAddress, jlong datablockAddress, jint datablock_length_in_bytes, jintArray channelsAddress, jlong outputAddress, jintArray samplesAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - unsigned char const *datablock = (unsigned char const *)(uintptr_t)datablockAddress; - float ***output = (float ***)(uintptr_t)outputAddress; - jint __result; - jint *channels = channelsAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, channelsAddress, NULL); - jint *samples = (*__env)->GetIntArrayElements(__env, samplesAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stb_vorbis_decode_frame_pushdata(f, datablock, datablock_length_in_bytes, (int *)channels, output, (int *)samples); - (*__env)->ReleaseIntArrayElements(__env, samplesAddress, samples, 0); - if (channels != NULL) { (*__env)->ReleaseIntArrayElements(__env, channelsAddress, channels, 0); } - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1decode_1filename__J_3I_3IJ(JNIEnv *__env, jclass clazz, jlong filenameAddress, jintArray channelsAddress, jintArray sample_rateAddress, jlong outputAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - short **output = (short **)(uintptr_t)outputAddress; - jint __result; - jint *channels = (*__env)->GetIntArrayElements(__env, channelsAddress, NULL); - jint *sample_rate = (*__env)->GetIntArrayElements(__env, sample_rateAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stb_vorbis_decode_filename(filename, (int *)channels, (int *)sample_rate, output); - (*__env)->ReleaseIntArrayElements(__env, sample_rateAddress, sample_rate, 0); - (*__env)->ReleaseIntArrayElements(__env, channelsAddress, channels, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1decode_1memory__JI_3I_3IJ(JNIEnv *__env, jclass clazz, jlong memAddress, jint len, jintArray channelsAddress, jintArray sample_rateAddress, jlong outputAddress) { - unsigned char const *mem = (unsigned char const *)(uintptr_t)memAddress; - short **output = (short **)(uintptr_t)outputAddress; - jint __result; - jint *channels = (*__env)->GetIntArrayElements(__env, channelsAddress, NULL); - jint *sample_rate = (*__env)->GetIntArrayElements(__env, sample_rateAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stb_vorbis_decode_memory(mem, len, (int *)channels, (int *)sample_rate, output); - (*__env)->ReleaseIntArrayElements(__env, sample_rateAddress, sample_rate, 0); - (*__env)->ReleaseIntArrayElements(__env, channelsAddress, channels, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1open_1memory__JI_3IJ(JNIEnv *__env, jclass clazz, jlong memAddress, jint len, jintArray errorAddress, jlong alloc_bufferAddress) { - unsigned char const *mem = (unsigned char const *)(uintptr_t)memAddress; - stb_vorbis_alloc const *alloc_buffer = (stb_vorbis_alloc const *)(uintptr_t)alloc_bufferAddress; - jlong __result; - jint *error = (*__env)->GetIntArrayElements(__env, errorAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stb_vorbis_open_memory(mem, len, (int *)error, alloc_buffer); - (*__env)->ReleaseIntArrayElements(__env, errorAddress, error, 0); - return __result; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1open_1filename__J_3IJ(JNIEnv *__env, jclass clazz, jlong filenameAddress, jintArray errorAddress, jlong alloc_bufferAddress) { - char const *filename = (char const *)(uintptr_t)filenameAddress; - stb_vorbis_alloc const *alloc_buffer = (stb_vorbis_alloc const *)(uintptr_t)alloc_bufferAddress; - jlong __result; - jint *error = (*__env)->GetIntArrayElements(__env, errorAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jlong)(uintptr_t)stb_vorbis_open_filename(filename, (int *)error, alloc_buffer); - (*__env)->ReleaseIntArrayElements(__env, errorAddress, error, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1frame_1float__J_3IJ(JNIEnv *__env, jclass clazz, jlong fAddress, jintArray channelsAddress, jlong outputAddress) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - float ***output = (float ***)(uintptr_t)outputAddress; - jint __result; - jint *channels = channelsAddress == NULL ? NULL : (*__env)->GetIntArrayElements(__env, channelsAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stb_vorbis_get_frame_float(f, (int *)channels, output); - if (channels != NULL) { (*__env)->ReleaseIntArrayElements(__env, channelsAddress, channels, 0); } - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1frame_1short_1interleaved__JI_3SI(JNIEnv *__env, jclass clazz, jlong fAddress, jint num_c, jshortArray bufferAddress, jint num_shorts) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - jint __result; - jshort *buffer = (*__env)->GetShortArrayElements(__env, bufferAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stb_vorbis_get_frame_short_interleaved(f, num_c, (short *)buffer, num_shorts); - (*__env)->ReleaseShortArrayElements(__env, bufferAddress, buffer, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1samples_1float_1interleaved__JI_3FI(JNIEnv *__env, jclass clazz, jlong fAddress, jint channels, jfloatArray bufferAddress, jint num_floats) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - jint __result; - jfloat *buffer = (*__env)->GetFloatArrayElements(__env, bufferAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stb_vorbis_get_samples_float_interleaved(f, channels, (float *)buffer, num_floats); - (*__env)->ReleaseFloatArrayElements(__env, bufferAddress, buffer, 0); - return __result; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_stb_STBVorbis_nstb_1vorbis_1get_1samples_1short_1interleaved__JI_3SI(JNIEnv *__env, jclass clazz, jlong fAddress, jint channels, jshortArray bufferAddress, jint num_shorts) { - stb_vorbis *f = (stb_vorbis *)(uintptr_t)fAddress; - jint __result; - jshort *buffer = (*__env)->GetShortArrayElements(__env, bufferAddress, NULL); - UNUSED_PARAMS(__env, clazz) - __result = (jint)stb_vorbis_get_samples_short_interleaved(f, channels, (short *)buffer, num_shorts); - (*__env)->ReleaseShortArrayElements(__env, bufferAddress, buffer, 0); - return __result; -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_dxt.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_dxt.h deleted file mode 100644 index 6150a87f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_dxt.h +++ /dev/null @@ -1,719 +0,0 @@ -// stb_dxt.h - v1.12 - DXT1/DXT5 compressor - public domain -// original by fabian "ryg" giesen - ported to C by stb -// use '#define STB_DXT_IMPLEMENTATION' before including to create the implementation -// -// USAGE: -// call stb_compress_dxt_block() for every block (you must pad) -// source should be a 4x4 block of RGBA data in row-major order; -// Alpha channel is not stored if you specify alpha=0 (but you -// must supply some constant alpha in the alpha channel). -// You can turn on dithering and "high quality" using mode. -// -// version history: -// v1.12 - (ryg) fix bug in single-color table generator -// v1.11 - (ryg) avoid racy global init, better single-color tables, remove dither -// v1.10 - (i.c) various small quality improvements -// v1.09 - (stb) update documentation re: surprising alpha channel requirement -// v1.08 - (stb) fix bug in dxt-with-alpha block -// v1.07 - (stb) bc4; allow not using libc; add STB_DXT_STATIC -// v1.06 - (stb) fix to known-broken 1.05 -// v1.05 - (stb) support bc5/3dc (Arvids Kokins), use extern "C" in C++ (Pavel Krajcevski) -// v1.04 - (ryg) default to no rounding bias for lerped colors (as per S3TC/DX10 spec); -// single color match fix (allow for inexact color interpolation); -// optimal DXT5 index finder; "high quality" mode that runs multiple refinement steps. -// v1.03 - (stb) endianness support -// v1.02 - (stb) fix alpha encoding bug -// v1.01 - (stb) fix bug converting to RGB that messed up quality, thanks ryg & cbloom -// v1.00 - (stb) first release -// -// contributors: -// Rich Geldreich (more accurate index selection) -// Kevin Schmidt (#defines for "freestanding" compilation) -// github:ppiastucki (BC4 support) -// Ignacio Castano - improve DXT endpoint quantization -// Alan Hickman - static table initialization -// -// LICENSE -// -// See end of file for license information. - -#ifndef STB_INCLUDE_STB_DXT_H -#define STB_INCLUDE_STB_DXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef STB_DXT_STATIC -#define STBDDEF static -#else -#define STBDDEF extern -#endif - -// compression mode (bitflags) -#define STB_DXT_NORMAL 0 -#define STB_DXT_DITHER 1 // use dithering. was always dubious, now deprecated. does nothing! -#define STB_DXT_HIGHQUAL 2 // high quality mode, does two refinement steps instead of 1. ~30-40% slower. - -STBDDEF void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src_rgba_four_bytes_per_pixel, int alpha, int mode); -STBDDEF void stb_compress_bc4_block(unsigned char *dest, const unsigned char *src_r_one_byte_per_pixel); -STBDDEF void stb_compress_bc5_block(unsigned char *dest, const unsigned char *src_rg_two_byte_per_pixel); - -#define STB_COMPRESS_DXT_BLOCK - -#ifdef __cplusplus -} -#endif -#endif // STB_INCLUDE_STB_DXT_H - -#ifdef STB_DXT_IMPLEMENTATION - -// configuration options for DXT encoder. set them in the project/makefile or just define -// them at the top. - -// STB_DXT_USE_ROUNDING_BIAS -// use a rounding bias during color interpolation. this is closer to what "ideal" -// interpolation would do but doesn't match the S3TC/DX10 spec. old versions (pre-1.03) -// implicitly had this turned on. -// -// in case you're targeting a specific type of hardware (e.g. console programmers): -// NVidia and Intel GPUs (as of 2010) as well as DX9 ref use DXT decoders that are closer -// to STB_DXT_USE_ROUNDING_BIAS. AMD/ATI, S3 and DX10 ref are closer to rounding with no bias. -// you also see "(a*5 + b*3) / 8" on some old GPU designs. -// #define STB_DXT_USE_ROUNDING_BIAS - -#include - -#if !defined(STBD_FABS) -#include -#endif - -#ifndef STBD_FABS -#define STBD_FABS(x) fabs(x) -#endif - -static const unsigned char stb__OMatch5[256][2] = { - { 0, 0 }, { 0, 0 }, { 0, 1 }, { 0, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 1 }, - { 1, 1 }, { 1, 1 }, { 1, 2 }, { 0, 4 }, { 2, 1 }, { 2, 1 }, { 2, 1 }, { 2, 2 }, - { 2, 2 }, { 2, 2 }, { 2, 3 }, { 1, 5 }, { 3, 2 }, { 3, 2 }, { 4, 0 }, { 3, 3 }, - { 3, 3 }, { 3, 3 }, { 3, 4 }, { 3, 4 }, { 3, 4 }, { 3, 5 }, { 4, 3 }, { 4, 3 }, - { 5, 2 }, { 4, 4 }, { 4, 4 }, { 4, 5 }, { 4, 5 }, { 5, 4 }, { 5, 4 }, { 5, 4 }, - { 6, 3 }, { 5, 5 }, { 5, 5 }, { 5, 6 }, { 4, 8 }, { 6, 5 }, { 6, 5 }, { 6, 5 }, - { 6, 6 }, { 6, 6 }, { 6, 6 }, { 6, 7 }, { 5, 9 }, { 7, 6 }, { 7, 6 }, { 8, 4 }, - { 7, 7 }, { 7, 7 }, { 7, 7 }, { 7, 8 }, { 7, 8 }, { 7, 8 }, { 7, 9 }, { 8, 7 }, - { 8, 7 }, { 9, 6 }, { 8, 8 }, { 8, 8 }, { 8, 9 }, { 8, 9 }, { 9, 8 }, { 9, 8 }, - { 9, 8 }, { 10, 7 }, { 9, 9 }, { 9, 9 }, { 9, 10 }, { 8, 12 }, { 10, 9 }, { 10, 9 }, - { 10, 9 }, { 10, 10 }, { 10, 10 }, { 10, 10 }, { 10, 11 }, { 9, 13 }, { 11, 10 }, { 11, 10 }, - { 12, 8 }, { 11, 11 }, { 11, 11 }, { 11, 11 }, { 11, 12 }, { 11, 12 }, { 11, 12 }, { 11, 13 }, - { 12, 11 }, { 12, 11 }, { 13, 10 }, { 12, 12 }, { 12, 12 }, { 12, 13 }, { 12, 13 }, { 13, 12 }, - { 13, 12 }, { 13, 12 }, { 14, 11 }, { 13, 13 }, { 13, 13 }, { 13, 14 }, { 12, 16 }, { 14, 13 }, - { 14, 13 }, { 14, 13 }, { 14, 14 }, { 14, 14 }, { 14, 14 }, { 14, 15 }, { 13, 17 }, { 15, 14 }, - { 15, 14 }, { 16, 12 }, { 15, 15 }, { 15, 15 }, { 15, 15 }, { 15, 16 }, { 15, 16 }, { 15, 16 }, - { 15, 17 }, { 16, 15 }, { 16, 15 }, { 17, 14 }, { 16, 16 }, { 16, 16 }, { 16, 17 }, { 16, 17 }, - { 17, 16 }, { 17, 16 }, { 17, 16 }, { 18, 15 }, { 17, 17 }, { 17, 17 }, { 17, 18 }, { 16, 20 }, - { 18, 17 }, { 18, 17 }, { 18, 17 }, { 18, 18 }, { 18, 18 }, { 18, 18 }, { 18, 19 }, { 17, 21 }, - { 19, 18 }, { 19, 18 }, { 20, 16 }, { 19, 19 }, { 19, 19 }, { 19, 19 }, { 19, 20 }, { 19, 20 }, - { 19, 20 }, { 19, 21 }, { 20, 19 }, { 20, 19 }, { 21, 18 }, { 20, 20 }, { 20, 20 }, { 20, 21 }, - { 20, 21 }, { 21, 20 }, { 21, 20 }, { 21, 20 }, { 22, 19 }, { 21, 21 }, { 21, 21 }, { 21, 22 }, - { 20, 24 }, { 22, 21 }, { 22, 21 }, { 22, 21 }, { 22, 22 }, { 22, 22 }, { 22, 22 }, { 22, 23 }, - { 21, 25 }, { 23, 22 }, { 23, 22 }, { 24, 20 }, { 23, 23 }, { 23, 23 }, { 23, 23 }, { 23, 24 }, - { 23, 24 }, { 23, 24 }, { 23, 25 }, { 24, 23 }, { 24, 23 }, { 25, 22 }, { 24, 24 }, { 24, 24 }, - { 24, 25 }, { 24, 25 }, { 25, 24 }, { 25, 24 }, { 25, 24 }, { 26, 23 }, { 25, 25 }, { 25, 25 }, - { 25, 26 }, { 24, 28 }, { 26, 25 }, { 26, 25 }, { 26, 25 }, { 26, 26 }, { 26, 26 }, { 26, 26 }, - { 26, 27 }, { 25, 29 }, { 27, 26 }, { 27, 26 }, { 28, 24 }, { 27, 27 }, { 27, 27 }, { 27, 27 }, - { 27, 28 }, { 27, 28 }, { 27, 28 }, { 27, 29 }, { 28, 27 }, { 28, 27 }, { 29, 26 }, { 28, 28 }, - { 28, 28 }, { 28, 29 }, { 28, 29 }, { 29, 28 }, { 29, 28 }, { 29, 28 }, { 30, 27 }, { 29, 29 }, - { 29, 29 }, { 29, 30 }, { 29, 30 }, { 30, 29 }, { 30, 29 }, { 30, 29 }, { 30, 30 }, { 30, 30 }, - { 30, 30 }, { 30, 31 }, { 30, 31 }, { 31, 30 }, { 31, 30 }, { 31, 30 }, { 31, 31 }, { 31, 31 }, -}; -static const unsigned char stb__OMatch6[256][2] = { - { 0, 0 }, { 0, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 }, { 1, 2 }, { 2, 1 }, { 2, 2 }, - { 2, 2 }, { 2, 3 }, { 3, 2 }, { 3, 3 }, { 3, 3 }, { 3, 4 }, { 4, 3 }, { 4, 4 }, - { 4, 4 }, { 4, 5 }, { 5, 4 }, { 5, 5 }, { 5, 5 }, { 5, 6 }, { 6, 5 }, { 6, 6 }, - { 6, 6 }, { 6, 7 }, { 7, 6 }, { 7, 7 }, { 7, 7 }, { 7, 8 }, { 8, 7 }, { 8, 8 }, - { 8, 8 }, { 8, 9 }, { 9, 8 }, { 9, 9 }, { 9, 9 }, { 9, 10 }, { 10, 9 }, { 10, 10 }, - { 10, 10 }, { 10, 11 }, { 11, 10 }, { 8, 16 }, { 11, 11 }, { 11, 12 }, { 12, 11 }, { 9, 17 }, - { 12, 12 }, { 12, 13 }, { 13, 12 }, { 11, 16 }, { 13, 13 }, { 13, 14 }, { 14, 13 }, { 12, 17 }, - { 14, 14 }, { 14, 15 }, { 15, 14 }, { 14, 16 }, { 15, 15 }, { 15, 16 }, { 16, 14 }, { 16, 15 }, - { 17, 14 }, { 16, 16 }, { 16, 17 }, { 17, 16 }, { 18, 15 }, { 17, 17 }, { 17, 18 }, { 18, 17 }, - { 20, 14 }, { 18, 18 }, { 18, 19 }, { 19, 18 }, { 21, 15 }, { 19, 19 }, { 19, 20 }, { 20, 19 }, - { 20, 20 }, { 20, 20 }, { 20, 21 }, { 21, 20 }, { 21, 21 }, { 21, 21 }, { 21, 22 }, { 22, 21 }, - { 22, 22 }, { 22, 22 }, { 22, 23 }, { 23, 22 }, { 23, 23 }, { 23, 23 }, { 23, 24 }, { 24, 23 }, - { 24, 24 }, { 24, 24 }, { 24, 25 }, { 25, 24 }, { 25, 25 }, { 25, 25 }, { 25, 26 }, { 26, 25 }, - { 26, 26 }, { 26, 26 }, { 26, 27 }, { 27, 26 }, { 24, 32 }, { 27, 27 }, { 27, 28 }, { 28, 27 }, - { 25, 33 }, { 28, 28 }, { 28, 29 }, { 29, 28 }, { 27, 32 }, { 29, 29 }, { 29, 30 }, { 30, 29 }, - { 28, 33 }, { 30, 30 }, { 30, 31 }, { 31, 30 }, { 30, 32 }, { 31, 31 }, { 31, 32 }, { 32, 30 }, - { 32, 31 }, { 33, 30 }, { 32, 32 }, { 32, 33 }, { 33, 32 }, { 34, 31 }, { 33, 33 }, { 33, 34 }, - { 34, 33 }, { 36, 30 }, { 34, 34 }, { 34, 35 }, { 35, 34 }, { 37, 31 }, { 35, 35 }, { 35, 36 }, - { 36, 35 }, { 36, 36 }, { 36, 36 }, { 36, 37 }, { 37, 36 }, { 37, 37 }, { 37, 37 }, { 37, 38 }, - { 38, 37 }, { 38, 38 }, { 38, 38 }, { 38, 39 }, { 39, 38 }, { 39, 39 }, { 39, 39 }, { 39, 40 }, - { 40, 39 }, { 40, 40 }, { 40, 40 }, { 40, 41 }, { 41, 40 }, { 41, 41 }, { 41, 41 }, { 41, 42 }, - { 42, 41 }, { 42, 42 }, { 42, 42 }, { 42, 43 }, { 43, 42 }, { 40, 48 }, { 43, 43 }, { 43, 44 }, - { 44, 43 }, { 41, 49 }, { 44, 44 }, { 44, 45 }, { 45, 44 }, { 43, 48 }, { 45, 45 }, { 45, 46 }, - { 46, 45 }, { 44, 49 }, { 46, 46 }, { 46, 47 }, { 47, 46 }, { 46, 48 }, { 47, 47 }, { 47, 48 }, - { 48, 46 }, { 48, 47 }, { 49, 46 }, { 48, 48 }, { 48, 49 }, { 49, 48 }, { 50, 47 }, { 49, 49 }, - { 49, 50 }, { 50, 49 }, { 52, 46 }, { 50, 50 }, { 50, 51 }, { 51, 50 }, { 53, 47 }, { 51, 51 }, - { 51, 52 }, { 52, 51 }, { 52, 52 }, { 52, 52 }, { 52, 53 }, { 53, 52 }, { 53, 53 }, { 53, 53 }, - { 53, 54 }, { 54, 53 }, { 54, 54 }, { 54, 54 }, { 54, 55 }, { 55, 54 }, { 55, 55 }, { 55, 55 }, - { 55, 56 }, { 56, 55 }, { 56, 56 }, { 56, 56 }, { 56, 57 }, { 57, 56 }, { 57, 57 }, { 57, 57 }, - { 57, 58 }, { 58, 57 }, { 58, 58 }, { 58, 58 }, { 58, 59 }, { 59, 58 }, { 59, 59 }, { 59, 59 }, - { 59, 60 }, { 60, 59 }, { 60, 60 }, { 60, 60 }, { 60, 61 }, { 61, 60 }, { 61, 61 }, { 61, 61 }, - { 61, 62 }, { 62, 61 }, { 62, 62 }, { 62, 62 }, { 62, 63 }, { 63, 62 }, { 63, 63 }, { 63, 63 }, -}; - -static int stb__Mul8Bit(int a, int b) -{ - int t = a*b + 128; - return (t + (t >> 8)) >> 8; -} - -static void stb__From16Bit(unsigned char *out, unsigned short v) -{ - int rv = (v & 0xf800) >> 11; - int gv = (v & 0x07e0) >> 5; - int bv = (v & 0x001f) >> 0; - - // expand to 8 bits via bit replication - out[0] = (rv * 33) >> 2; - out[1] = (gv * 65) >> 4; - out[2] = (bv * 33) >> 2; - out[3] = 0; -} - -static unsigned short stb__As16Bit(int r, int g, int b) -{ - return (unsigned short)((stb__Mul8Bit(r,31) << 11) + (stb__Mul8Bit(g,63) << 5) + stb__Mul8Bit(b,31)); -} - -// linear interpolation at 1/3 point between a and b, using desired rounding type -static int stb__Lerp13(int a, int b) -{ -#ifdef STB_DXT_USE_ROUNDING_BIAS - // with rounding bias - return a + stb__Mul8Bit(b-a, 0x55); -#else - // without rounding bias - // replace "/ 3" by "* 0xaaab) >> 17" if your compiler sucks or you really need every ounce of speed. - return (2*a + b) / 3; -#endif -} - -// lerp RGB color -static void stb__Lerp13RGB(unsigned char *out, unsigned char *p1, unsigned char *p2) -{ - out[0] = (unsigned char)stb__Lerp13(p1[0], p2[0]); - out[1] = (unsigned char)stb__Lerp13(p1[1], p2[1]); - out[2] = (unsigned char)stb__Lerp13(p1[2], p2[2]); -} - -/****************************************************************************/ - -static void stb__EvalColors(unsigned char *color,unsigned short c0,unsigned short c1) -{ - stb__From16Bit(color+ 0, c0); - stb__From16Bit(color+ 4, c1); - stb__Lerp13RGB(color+ 8, color+0, color+4); - stb__Lerp13RGB(color+12, color+4, color+0); -} - -// The color matching function -static unsigned int stb__MatchColorsBlock(unsigned char *block, unsigned char *color) -{ - unsigned int mask = 0; - int dirr = color[0*4+0] - color[1*4+0]; - int dirg = color[0*4+1] - color[1*4+1]; - int dirb = color[0*4+2] - color[1*4+2]; - int dots[16]; - int stops[4]; - int i; - int c0Point, halfPoint, c3Point; - - for(i=0;i<16;i++) - dots[i] = block[i*4+0]*dirr + block[i*4+1]*dirg + block[i*4+2]*dirb; - - for(i=0;i<4;i++) - stops[i] = color[i*4+0]*dirr + color[i*4+1]*dirg + color[i*4+2]*dirb; - - // think of the colors as arranged on a line; project point onto that line, then choose - // next color out of available ones. we compute the crossover points for "best color in top - // half"/"best in bottom half" and then the same inside that subinterval. - // - // relying on this 1d approximation isn't always optimal in terms of euclidean distance, - // but it's very close and a lot faster. - // http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html - - c0Point = (stops[1] + stops[3]); - halfPoint = (stops[3] + stops[2]); - c3Point = (stops[2] + stops[0]); - - for (i=15;i>=0;i--) { - int dot = dots[i]*2; - mask <<= 2; - - if(dot < halfPoint) - mask |= (dot < c0Point) ? 1 : 3; - else - mask |= (dot < c3Point) ? 2 : 0; - } - - return mask; -} - -// The color optimization function. (Clever code, part 1) -static void stb__OptimizeColorsBlock(unsigned char *block, unsigned short *pmax16, unsigned short *pmin16) -{ - int mind,maxd; - unsigned char *minp, *maxp; - double magn; - int v_r,v_g,v_b; - static const int nIterPower = 4; - float covf[6],vfr,vfg,vfb; - - // determine color distribution - int cov[6]; - int mu[3],min[3],max[3]; - int ch,i,iter; - - for(ch=0;ch<3;ch++) - { - const unsigned char *bp = ((const unsigned char *) block) + ch; - int muv,minv,maxv; - - muv = minv = maxv = bp[0]; - for(i=4;i<64;i+=4) - { - muv += bp[i]; - if (bp[i] < minv) minv = bp[i]; - else if (bp[i] > maxv) maxv = bp[i]; - } - - mu[ch] = (muv + 8) >> 4; - min[ch] = minv; - max[ch] = maxv; - } - - // determine covariance matrix - for (i=0;i<6;i++) - cov[i] = 0; - - for (i=0;i<16;i++) - { - int r = block[i*4+0] - mu[0]; - int g = block[i*4+1] - mu[1]; - int b = block[i*4+2] - mu[2]; - - cov[0] += r*r; - cov[1] += r*g; - cov[2] += r*b; - cov[3] += g*g; - cov[4] += g*b; - cov[5] += b*b; - } - - // convert covariance matrix to float, find principal axis via power iter - for(i=0;i<6;i++) - covf[i] = cov[i] / 255.0f; - - vfr = (float) (max[0] - min[0]); - vfg = (float) (max[1] - min[1]); - vfb = (float) (max[2] - min[2]); - - for(iter=0;iter magn) magn = STBD_FABS(vfg); - if (STBD_FABS(vfb) > magn) magn = STBD_FABS(vfb); - - if(magn < 4.0f) { // too small, default to luminance - v_r = 299; // JPEG YCbCr luma coefs, scaled by 1000. - v_g = 587; - v_b = 114; - } else { - magn = 512.0 / magn; - v_r = (int) (vfr * magn); - v_g = (int) (vfg * magn); - v_b = (int) (vfb * magn); - } - - minp = maxp = block; - mind = maxd = block[0]*v_r + block[1]*v_g + block[2]*v_b; - // Pick colors at extreme points - for(i=1;i<16;i++) - { - int dot = block[i*4+0]*v_r + block[i*4+1]*v_g + block[i*4+2]*v_b; - - if (dot < mind) { - mind = dot; - minp = block+i*4; - } - - if (dot > maxd) { - maxd = dot; - maxp = block+i*4; - } - } - - *pmax16 = stb__As16Bit(maxp[0],maxp[1],maxp[2]); - *pmin16 = stb__As16Bit(minp[0],minp[1],minp[2]); -} - -static const float stb__midpoints5[32] = { - 0.015686f, 0.047059f, 0.078431f, 0.111765f, 0.145098f, 0.176471f, 0.207843f, 0.241176f, 0.274510f, 0.305882f, 0.337255f, 0.370588f, 0.403922f, 0.435294f, 0.466667f, 0.5f, - 0.533333f, 0.564706f, 0.596078f, 0.629412f, 0.662745f, 0.694118f, 0.725490f, 0.758824f, 0.792157f, 0.823529f, 0.854902f, 0.888235f, 0.921569f, 0.952941f, 0.984314f, 1.0f -}; - -static const float stb__midpoints6[64] = { - 0.007843f, 0.023529f, 0.039216f, 0.054902f, 0.070588f, 0.086275f, 0.101961f, 0.117647f, 0.133333f, 0.149020f, 0.164706f, 0.180392f, 0.196078f, 0.211765f, 0.227451f, 0.245098f, - 0.262745f, 0.278431f, 0.294118f, 0.309804f, 0.325490f, 0.341176f, 0.356863f, 0.372549f, 0.388235f, 0.403922f, 0.419608f, 0.435294f, 0.450980f, 0.466667f, 0.482353f, 0.500000f, - 0.517647f, 0.533333f, 0.549020f, 0.564706f, 0.580392f, 0.596078f, 0.611765f, 0.627451f, 0.643137f, 0.658824f, 0.674510f, 0.690196f, 0.705882f, 0.721569f, 0.737255f, 0.754902f, - 0.772549f, 0.788235f, 0.803922f, 0.819608f, 0.835294f, 0.850980f, 0.866667f, 0.882353f, 0.898039f, 0.913725f, 0.929412f, 0.945098f, 0.960784f, 0.976471f, 0.992157f, 1.0f -}; - -static unsigned short stb__Quantize5(float x) -{ - unsigned short q; - x = x < 0 ? 0 : x > 1 ? 1 : x; // saturate - q = (unsigned short)(x * 31); - q += (x > stb__midpoints5[q]); - return q; -} - -static unsigned short stb__Quantize6(float x) -{ - unsigned short q; - x = x < 0 ? 0 : x > 1 ? 1 : x; // saturate - q = (unsigned short)(x * 63); - q += (x > stb__midpoints6[q]); - return q; -} - -// The refinement function. (Clever code, part 2) -// Tries to optimize colors to suit block contents better. -// (By solving a least squares system via normal equations+Cramer's rule) -static int stb__RefineBlock(unsigned char *block, unsigned short *pmax16, unsigned short *pmin16, unsigned int mask) -{ - static const int w1Tab[4] = { 3,0,2,1 }; - static const int prods[4] = { 0x090000,0x000900,0x040102,0x010402 }; - // ^some magic to save a lot of multiplies in the accumulating loop... - // (precomputed products of weights for least squares system, accumulated inside one 32-bit register) - - float f; - unsigned short oldMin, oldMax, min16, max16; - int i, akku = 0, xx,xy,yy; - int At1_r,At1_g,At1_b; - int At2_r,At2_g,At2_b; - unsigned int cm = mask; - - oldMin = *pmin16; - oldMax = *pmax16; - - if((mask ^ (mask<<2)) < 4) // all pixels have the same index? - { - // yes, linear system would be singular; solve using optimal - // single-color match on average color - int r = 8, g = 8, b = 8; - for (i=0;i<16;++i) { - r += block[i*4+0]; - g += block[i*4+1]; - b += block[i*4+2]; - } - - r >>= 4; g >>= 4; b >>= 4; - - max16 = (stb__OMatch5[r][0]<<11) | (stb__OMatch6[g][0]<<5) | stb__OMatch5[b][0]; - min16 = (stb__OMatch5[r][1]<<11) | (stb__OMatch6[g][1]<<5) | stb__OMatch5[b][1]; - } else { - At1_r = At1_g = At1_b = 0; - At2_r = At2_g = At2_b = 0; - for (i=0;i<16;++i,cm>>=2) { - int step = cm&3; - int w1 = w1Tab[step]; - int r = block[i*4+0]; - int g = block[i*4+1]; - int b = block[i*4+2]; - - akku += prods[step]; - At1_r += w1*r; - At1_g += w1*g; - At1_b += w1*b; - At2_r += r; - At2_g += g; - At2_b += b; - } - - At2_r = 3*At2_r - At1_r; - At2_g = 3*At2_g - At1_g; - At2_b = 3*At2_b - At1_b; - - // extract solutions and decide solvability - xx = akku >> 16; - yy = (akku >> 8) & 0xff; - xy = (akku >> 0) & 0xff; - - f = 3.0f / 255.0f / (xx*yy - xy*xy); - - max16 = stb__Quantize5((At1_r*yy - At2_r * xy) * f) << 11; - max16 |= stb__Quantize6((At1_g*yy - At2_g * xy) * f) << 5; - max16 |= stb__Quantize5((At1_b*yy - At2_b * xy) * f) << 0; - - min16 = stb__Quantize5((At2_r*xx - At1_r * xy) * f) << 11; - min16 |= stb__Quantize6((At2_g*xx - At1_g * xy) * f) << 5; - min16 |= stb__Quantize5((At2_b*xx - At1_b * xy) * f) << 0; - } - - *pmin16 = min16; - *pmax16 = max16; - return oldMin != min16 || oldMax != max16; -} - -// Color block compression -static void stb__CompressColorBlock(unsigned char *dest, unsigned char *block, int mode) -{ - unsigned int mask; - int i; - int refinecount; - unsigned short max16, min16; - unsigned char color[4*4]; - - refinecount = (mode & STB_DXT_HIGHQUAL) ? 2 : 1; - - // check if block is constant - for (i=1;i<16;i++) - if (((unsigned int *) block)[i] != ((unsigned int *) block)[0]) - break; - - if(i == 16) { // constant color - int r = block[0], g = block[1], b = block[2]; - mask = 0xaaaaaaaa; - max16 = (stb__OMatch5[r][0]<<11) | (stb__OMatch6[g][0]<<5) | stb__OMatch5[b][0]; - min16 = (stb__OMatch5[r][1]<<11) | (stb__OMatch6[g][1]<<5) | stb__OMatch5[b][1]; - } else { - // first step: PCA+map along principal axis - stb__OptimizeColorsBlock(block,&max16,&min16); - if (max16 != min16) { - stb__EvalColors(color,max16,min16); - mask = stb__MatchColorsBlock(block,color); - } else - mask = 0; - - // third step: refine (multiple times if requested) - for (i=0;i> 8); - dest[2] = (unsigned char) (min16); - dest[3] = (unsigned char) (min16 >> 8); - dest[4] = (unsigned char) (mask); - dest[5] = (unsigned char) (mask >> 8); - dest[6] = (unsigned char) (mask >> 16); - dest[7] = (unsigned char) (mask >> 24); -} - -// Alpha block compression (this is easy for a change) -static void stb__CompressAlphaBlock(unsigned char *dest,unsigned char *src, int stride) -{ - int i,dist,bias,dist4,dist2,bits,mask; - - // find min/max color - int mn,mx; - mn = mx = src[0]; - - for (i=1;i<16;i++) - { - if (src[i*stride] < mn) mn = src[i*stride]; - else if (src[i*stride] > mx) mx = src[i*stride]; - } - - // encode them - dest[0] = (unsigned char)mx; - dest[1] = (unsigned char)mn; - dest += 2; - - // determine bias and emit color indices - // given the choice of mx/mn, these indices are optimal: - // http://fgiesen.wordpress.com/2009/12/15/dxt5-alpha-block-index-determination/ - dist = mx-mn; - dist4 = dist*4; - dist2 = dist*2; - bias = (dist < 8) ? (dist - 1) : (dist/2 + 2); - bias -= mn * 7; - bits = 0,mask=0; - - for (i=0;i<16;i++) { - int a = src[i*stride]*7 + bias; - int ind,t; - - // select index. this is a "linear scale" lerp factor between 0 (val=min) and 7 (val=max). - t = (a >= dist4) ? -1 : 0; ind = t & 4; a -= dist4 & t; - t = (a >= dist2) ? -1 : 0; ind += t & 2; a -= dist2 & t; - ind += (a >= dist); - - // turn linear scale into DXT index (0/1 are extremal pts) - ind = -ind & 7; - ind ^= (2 > ind); - - // write index - mask |= ind << bits; - if((bits += 3) >= 8) { - *dest++ = (unsigned char)mask; - mask >>= 8; - bits -= 8; - } - } -} - -void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src, int alpha, int mode) -{ - unsigned char data[16][4]; - if (alpha) { - int i; - stb__CompressAlphaBlock(dest,(unsigned char*) src+3, 4); - dest += 8; - // make a new copy of the data in which alpha is opaque, - // because code uses a fast test for color constancy - memcpy(data, src, 4*16); - for (i=0; i < 16; ++i) - data[i][3] = 255; - src = &data[0][0]; - } - - stb__CompressColorBlock(dest,(unsigned char*) src,mode); -} - -void stb_compress_bc4_block(unsigned char *dest, const unsigned char *src) -{ - stb__CompressAlphaBlock(dest,(unsigned char*) src, 1); -} - -void stb_compress_bc5_block(unsigned char *dest, const unsigned char *src) -{ - stb__CompressAlphaBlock(dest,(unsigned char*) src,2); - stb__CompressAlphaBlock(dest + 8,(unsigned char*) src+1,2); -} -#endif // STB_DXT_IMPLEMENTATION - -// Compile with STB_DXT_IMPLEMENTATION and STB_DXT_GENERATE_TABLES -// defined to generate the tables above. -#ifdef STB_DXT_GENERATE_TABLES -#include - -int main() -{ - int i, j; - const char *omatch_names[] = { "stb__OMatch5", "stb__OMatch6" }; - int dequant_mults[2] = { 33*4, 65 }; // .4 fixed-point dequant multipliers - - // optimal endpoint tables - for (i = 0; i < 2; ++i) { - int dequant = dequant_mults[i]; - int size = i ? 64 : 32; - printf("static const unsigned char %s[256][2] = {\n", omatch_names[i]); - for (int j = 0; j < 256; ++j) { - int mn, mx; - int best_mn = 0, best_mx = 0; - int best_err = 256 * 100; - for (mn=0;mn> 4; - int maxe = (mx * dequant) >> 4; - int err = abs(stb__Lerp13(maxe, mine) - j) * 100; - - // DX10 spec says that interpolation must be within 3% of "correct" result, - // add this as error term. Normally we'd expect a random distribution of - // +-1.5% error, but nowhere in the spec does it say that the error has to be - // unbiased - better safe than sorry. - err += abs(maxe - mine) * 3; - - if(err < best_err) { - best_mn = mn; - best_mx = mx; - best_err = err; - } - } - } - if ((j % 8) == 0) printf(" "); // 2 spaces, third is done below - printf(" { %2d, %2d },", best_mx, best_mn); - if ((j % 8) == 7) printf("\n"); - } - printf("};\n"); - } - - return 0; -} -#endif - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_easy_font.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_easy_font.h deleted file mode 100644 index b6632584..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_easy_font.h +++ /dev/null @@ -1,305 +0,0 @@ -// stb_easy_font.h - v1.1 - bitmap font for 3D rendering - public domain -// Sean Barrett, Feb 2015 -// -// Easy-to-deploy, -// reasonably compact, -// extremely inefficient performance-wise, -// crappy-looking, -// ASCII-only, -// bitmap font for use in 3D APIs. -// -// Intended for when you just want to get some text displaying -// in a 3D app as quickly as possible. -// -// Doesn't use any textures, instead builds characters out of quads. -// -// DOCUMENTATION: -// -// int stb_easy_font_width(char *text) -// int stb_easy_font_height(char *text) -// -// Takes a string and returns the horizontal size and the -// vertical size (which can vary if 'text' has newlines). -// -// int stb_easy_font_print(float x, float y, -// char *text, unsigned char color[4], -// void *vertex_buffer, int vbuf_size) -// -// Takes a string (which can contain '\n') and fills out a -// vertex buffer with renderable data to draw the string. -// Output data assumes increasing x is rightwards, increasing y -// is downwards. -// -// The vertex data is divided into quads, i.e. there are four -// vertices in the vertex buffer for each quad. -// -// The vertices are stored in an interleaved format: -// -// x:float -// y:float -// z:float -// color:uint8[4] -// -// You can ignore z and color if you get them from elsewhere -// This format was chosen in the hopes it would make it -// easier for you to reuse existing vertex-buffer-drawing code. -// -// If you pass in NULL for color, it becomes 255,255,255,255. -// -// Returns the number of quads. -// -// If the buffer isn't large enough, it will truncate. -// Expect it to use an average of ~270 bytes per character. -// -// If your API doesn't draw quads, build a reusable index -// list that allows you to render quads as indexed triangles. -// -// void stb_easy_font_spacing(float spacing) -// -// Use positive values to expand the space between characters, -// and small negative values (no smaller than -1.5) to contract -// the space between characters. -// -// E.g. spacing = 1 adds one "pixel" of spacing between the -// characters. spacing = -1 is reasonable but feels a bit too -// compact to me; -0.5 is a reasonable compromise as long as -// you're scaling the font up. -// -// LICENSE -// -// See end of file for license information. -// -// VERSION HISTORY -// -// (2020-02-02) 1.1 make everything static so can compile it in more than one src file -// (2017-01-15) 1.0 space character takes same space as numbers; fix bad spacing of 'f' -// (2016-01-22) 0.7 width() supports multiline text; add height() -// (2015-09-13) 0.6 #include ; updated license -// (2015-02-01) 0.5 First release -// -// CONTRIBUTORS -// -// github:vassvik -- bug report -// github:podsvirov -- fix multiple definition errors - -#if 0 -// SAMPLE CODE: -// -// Here's sample code for old OpenGL; it's a lot more complicated -// to make work on modern APIs, and that's your problem. -// -void print_string(float x, float y, char *text, float r, float g, float b) -{ - static char buffer[99999]; // ~500 chars - int num_quads; - - num_quads = stb_easy_font_print(x, y, text, NULL, buffer, sizeof(buffer)); - - glColor3f(r,g,b); - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(2, GL_FLOAT, 16, buffer); - glDrawArrays(GL_QUADS, 0, num_quads*4); - glDisableClientState(GL_VERTEX_ARRAY); -} -#endif - -#ifndef INCLUDE_STB_EASY_FONT_H -#define INCLUDE_STB_EASY_FONT_H - -#include -#include - -static struct stb_easy_font_info_struct { - unsigned char advance; - unsigned char h_seg; - unsigned char v_seg; -} stb_easy_font_charinfo[96] = { - { 6, 0, 0 }, { 3, 0, 0 }, { 5, 1, 1 }, { 7, 1, 4 }, - { 7, 3, 7 }, { 7, 6, 12 }, { 7, 8, 19 }, { 4, 16, 21 }, - { 4, 17, 22 }, { 4, 19, 23 }, { 23, 21, 24 }, { 23, 22, 31 }, - { 20, 23, 34 }, { 22, 23, 36 }, { 19, 24, 36 }, { 21, 25, 36 }, - { 6, 25, 39 }, { 6, 27, 43 }, { 6, 28, 45 }, { 6, 30, 49 }, - { 6, 33, 53 }, { 6, 34, 57 }, { 6, 40, 58 }, { 6, 46, 59 }, - { 6, 47, 62 }, { 6, 55, 64 }, { 19, 57, 68 }, { 20, 59, 68 }, - { 21, 61, 69 }, { 22, 66, 69 }, { 21, 68, 69 }, { 7, 73, 69 }, - { 9, 75, 74 }, { 6, 78, 81 }, { 6, 80, 85 }, { 6, 83, 90 }, - { 6, 85, 91 }, { 6, 87, 95 }, { 6, 90, 96 }, { 7, 92, 97 }, - { 6, 96,102 }, { 5, 97,106 }, { 6, 99,107 }, { 6,100,110 }, - { 6,100,115 }, { 7,101,116 }, { 6,101,121 }, { 6,101,125 }, - { 6,102,129 }, { 7,103,133 }, { 6,104,140 }, { 6,105,145 }, - { 7,107,149 }, { 6,108,151 }, { 7,109,155 }, { 7,109,160 }, - { 7,109,165 }, { 7,118,167 }, { 6,118,172 }, { 4,120,176 }, - { 6,122,177 }, { 4,122,181 }, { 23,124,182 }, { 22,129,182 }, - { 4,130,182 }, { 22,131,183 }, { 6,133,187 }, { 22,135,191 }, - { 6,137,192 }, { 22,139,196 }, { 6,144,197 }, { 22,147,198 }, - { 6,150,202 }, { 19,151,206 }, { 21,152,207 }, { 6,155,209 }, - { 3,160,210 }, { 23,160,211 }, { 22,164,216 }, { 22,165,220 }, - { 22,167,224 }, { 22,169,228 }, { 21,171,232 }, { 21,173,233 }, - { 5,178,233 }, { 22,179,234 }, { 23,180,238 }, { 23,180,243 }, - { 23,180,248 }, { 22,189,248 }, { 22,191,252 }, { 5,196,252 }, - { 3,203,252 }, { 5,203,253 }, { 22,210,253 }, { 0,214,253 }, -}; - -static unsigned char stb_easy_font_hseg[214] = { - 97,37,69,84,28,51,2,18,10,49,98,41,65,25,81,105,33,9,97,1,97,37,37,36, - 81,10,98,107,3,100,3,99,58,51,4,99,58,8,73,81,10,50,98,8,73,81,4,10,50, - 98,8,25,33,65,81,10,50,17,65,97,25,33,25,49,9,65,20,68,1,65,25,49,41, - 11,105,13,101,76,10,50,10,50,98,11,99,10,98,11,50,99,11,50,11,99,8,57, - 58,3,99,99,107,10,10,11,10,99,11,5,100,41,65,57,41,65,9,17,81,97,3,107, - 9,97,1,97,33,25,9,25,41,100,41,26,82,42,98,27,83,42,98,26,51,82,8,41, - 35,8,10,26,82,114,42,1,114,8,9,73,57,81,41,97,18,8,8,25,26,26,82,26,82, - 26,82,41,25,33,82,26,49,73,35,90,17,81,41,65,57,41,65,25,81,90,114,20, - 84,73,57,41,49,25,33,65,81,9,97,1,97,25,33,65,81,57,33,25,41,25, -}; - -static unsigned char stb_easy_font_vseg[253] = { - 4,2,8,10,15,8,15,33,8,15,8,73,82,73,57,41,82,10,82,18,66,10,21,29,1,65, - 27,8,27,9,65,8,10,50,97,74,66,42,10,21,57,41,29,25,14,81,73,57,26,8,8, - 26,66,3,8,8,15,19,21,90,58,26,18,66,18,105,89,28,74,17,8,73,57,26,21, - 8,42,41,42,8,28,22,8,8,30,7,8,8,26,66,21,7,8,8,29,7,7,21,8,8,8,59,7,8, - 8,15,29,8,8,14,7,57,43,10,82,7,7,25,42,25,15,7,25,41,15,21,105,105,29, - 7,57,57,26,21,105,73,97,89,28,97,7,57,58,26,82,18,57,57,74,8,30,6,8,8, - 14,3,58,90,58,11,7,74,43,74,15,2,82,2,42,75,42,10,67,57,41,10,7,2,42, - 74,106,15,2,35,8,8,29,7,8,8,59,35,51,8,8,15,35,30,35,8,8,30,7,8,8,60, - 36,8,45,7,7,36,8,43,8,44,21,8,8,44,35,8,8,43,23,8,8,43,35,8,8,31,21,15, - 20,8,8,28,18,58,89,58,26,21,89,73,89,29,20,8,8,30,7, -}; - -typedef struct -{ - unsigned char c[4]; -} stb_easy_font_color; - -static int stb_easy_font_draw_segs(float x, float y, unsigned char *segs, int num_segs, int vertical, stb_easy_font_color c, char *vbuf, int vbuf_size, int offset) -{ - int i,j; - for (i=0; i < num_segs; ++i) { - int len = segs[i] & 7; - x += (float) ((segs[i] >> 3) & 1); - if (len && offset+64 <= vbuf_size) { - float y0 = y + (float) (segs[i]>>4); - for (j=0; j < 4; ++j) { - * (float *) (vbuf+offset+0) = x + (j==1 || j==2 ? (vertical ? 1 : len) : 0); - * (float *) (vbuf+offset+4) = y0 + ( j >= 2 ? (vertical ? len : 1) : 0); - * (float *) (vbuf+offset+8) = 0.f; - * (stb_easy_font_color *) (vbuf+offset+12) = c; - offset += 16; - } - } - } - return offset; -} - -static float stb_easy_font_spacing_val = 0; -static void stb_easy_font_spacing(float spacing) -{ - stb_easy_font_spacing_val = spacing; -} - -static int stb_easy_font_print(float x, float y, char *text, unsigned char color[4], void *vertex_buffer, int vbuf_size) -{ - char *vbuf = (char *) vertex_buffer; - float start_x = x; - int offset = 0; - - stb_easy_font_color c = { 255,255,255,255 }; // use structure copying to avoid needing depending on memcpy() - if (color) { c.c[0] = color[0]; c.c[1] = color[1]; c.c[2] = color[2]; c.c[3] = color[3]; } - - while (*text && offset < vbuf_size) { - if (*text == '\n') { - y += 12; - x = start_x; - } else { - unsigned char advance = stb_easy_font_charinfo[*text-32].advance; - float y_ch = advance & 16 ? y+1 : y; - int h_seg, v_seg, num_h, num_v; - h_seg = stb_easy_font_charinfo[*text-32 ].h_seg; - v_seg = stb_easy_font_charinfo[*text-32 ].v_seg; - num_h = stb_easy_font_charinfo[*text-32+1].h_seg - h_seg; - num_v = stb_easy_font_charinfo[*text-32+1].v_seg - v_seg; - offset = stb_easy_font_draw_segs(x, y_ch, &stb_easy_font_hseg[h_seg], num_h, 0, c, vbuf, vbuf_size, offset); - offset = stb_easy_font_draw_segs(x, y_ch, &stb_easy_font_vseg[v_seg], num_v, 1, c, vbuf, vbuf_size, offset); - x += advance & 15; - x += stb_easy_font_spacing_val; - } - ++text; - } - return (unsigned) offset/64; -} - -static int stb_easy_font_width(char *text) -{ - float len = 0; - float max_len = 0; - while (*text) { - if (*text == '\n') { - if (len > max_len) max_len = len; - len = 0; - } else { - len += stb_easy_font_charinfo[*text-32].advance & 15; - len += stb_easy_font_spacing_val; - } - ++text; - } - if (len > max_len) max_len = len; - return (int) ceil(max_len); -} - -static int stb_easy_font_height(char *text) -{ - float y = 0; - int nonempty_line=0; - while (*text) { - if (*text == '\n') { - y += 12; - nonempty_line = 0; - } else { - nonempty_line = 1; - } - ++text; - } - return (int) ceil(y + (nonempty_line ? 12 : 0)); -} -#endif - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_image.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_image.h deleted file mode 100644 index 5e807a0a..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_image.h +++ /dev/null @@ -1,7987 +0,0 @@ -/* stb_image - v2.28 - public domain image loader - http://nothings.org/stb - no warranty implied; use at your own risk - - Do this: - #define STB_IMAGE_IMPLEMENTATION - before you include this file in *one* C or C++ file to create the implementation. - - // i.e. it should look like this: - #include ... - #include ... - #include ... - #define STB_IMAGE_IMPLEMENTATION - #include "stb_image.h" - - You can #define STBI_ASSERT(x) before the #include to avoid using assert.h. - And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free - - - QUICK NOTES: - Primarily of interest to game developers and other people who can - avoid problematic images and only need the trivial interface - - JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib) - PNG 1/2/4/8/16-bit-per-channel - - TGA (not sure what subset, if a subset) - BMP non-1bpp, non-RLE - PSD (composited view only, no extra channels, 8/16 bit-per-channel) - - GIF (*comp always reports as 4-channel) - HDR (radiance rgbE format) - PIC (Softimage PIC) - PNM (PPM and PGM binary only) - - Animated GIF still needs a proper API, but here's one way to do it: - http://gist.github.com/urraka/685d9a6340b26b830d49 - - - decode from memory or through FILE (define STBI_NO_STDIO to remove code) - - decode from arbitrary I/O callbacks - - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON) - - Full documentation under "DOCUMENTATION" below. - - -LICENSE - - See end of file for license information. - -RECENT REVISION HISTORY: - - 2.28 (2023-01-29) many error fixes, security errors, just tons of stuff - 2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes - 2.26 (2020-07-13) many minor fixes - 2.25 (2020-02-02) fix warnings - 2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically - 2.23 (2019-08-11) fix clang static analysis warning - 2.22 (2019-03-04) gif fixes, fix warnings - 2.21 (2019-02-25) fix typo in comment - 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs - 2.19 (2018-02-11) fix warning - 2.18 (2018-01-30) fix warnings - 2.17 (2018-01-29) bugfix, 1-bit BMP, 16-bitness query, fix warnings - 2.16 (2017-07-23) all functions have 16-bit variants; optimizations; bugfixes - 2.15 (2017-03-18) fix png-1,2,4; all Imagenet JPGs; no runtime SSE detection on GCC - 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs - 2.13 (2016-12-04) experimental 16-bit API, only for PNG so far; fixes - 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes - 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64 - RGB-format JPEG; remove white matting in PSD; - allocate large structures on the stack; - correct channel count for PNG & BMP - 2.10 (2016-01-22) avoid warning introduced in 2.09 - 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED - - See end of file for full revision history. - - - ============================ Contributors ========================= - - Image formats Extensions, features - Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info) - Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info) - Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG) - Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks) - Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG) - Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip) - Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD) - github:urraka (animated gif) Junggon Kim (PNM comments) - Christopher Forseth (animated gif) Daniel Gibson (16-bit TGA) - socks-the-fox (16-bit PNG) - Jeremy Sawicki (handle all ImageNet JPGs) - Optimizations & bugfixes Mikhail Morozov (1-bit BMP) - Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query) - Arseny Kapoulkine Simon Breuss (16-bit PNM) - John-Mark Allen - Carmelo J Fdez-Aguera - - Bug & warning fixes - Marc LeBlanc David Woo Guillaume George Martins Mozeiko - Christpher Lloyd Jerry Jansson Joseph Thomson Blazej Dariusz Roszkowski - Phil Jordan Dave Moore Roy Eltham - Hayaki Saito Nathan Reed Won Chun - Luke Graham Johan Duparc Nick Verigakis the Horde3D community - Thomas Ruf Ronny Chevalier github:rlyeh - Janez Zemva John Bartholomew Michal Cichon github:romigrou - Jonathan Blow Ken Hamada Tero Hanninen github:svdijk - Eugene Golushkov Laurent Gomila Cort Stratton github:snagar - Aruelien Pocheville Sergio Gonzalez Thibault Reuille github:Zelex - Cass Everitt Ryamond Barbiero github:grim210 - Paul Du Bois Engin Manap Aldo Culquicondor github:sammyhw - Philipp Wiesemann Dale Weiler Oriol Ferrer Mesia github:phprus - Josh Tobin Neil Bickford Matthew Gregan github:poppolopoppo - Julian Raschke Gregory Mullen Christian Floisand github:darealshinji - Baldur Karlsson Kevin Schmidt JR Smith github:Michaelangel007 - Brad Weinberger Matvey Cherevko github:mosra - Luca Sas Alexander Veselov Zack Middleton [reserved] - Ryan C. Gordon [reserved] [reserved] - DO NOT ADD YOUR NAME HERE - - Jacko Dirks - - To add your name to the credits, pick a random blank space in the middle and fill it. - 80% of merge conflicts on stb PRs are due to people adding their name at the end - of the credits. -*/ - -#ifndef STBI_INCLUDE_STB_IMAGE_H -#define STBI_INCLUDE_STB_IMAGE_H - -// DOCUMENTATION -// -// Limitations: -// - no 12-bit-per-channel JPEG -// - no JPEGs with arithmetic coding -// - GIF always returns *comp=4 -// -// Basic usage (see HDR discussion below for HDR usage): -// int x,y,n; -// unsigned char *data = stbi_load(filename, &x, &y, &n, 0); -// // ... process data if not NULL ... -// // ... x = width, y = height, n = # 8-bit components per pixel ... -// // ... replace '0' with '1'..'4' to force that many components per pixel -// // ... but 'n' will always be the number that it would have been if you said 0 -// stbi_image_free(data); -// -// Standard parameters: -// int *x -- outputs image width in pixels -// int *y -- outputs image height in pixels -// int *channels_in_file -- outputs # of image components in image file -// int desired_channels -- if non-zero, # of image components requested in result -// -// The return value from an image loader is an 'unsigned char *' which points -// to the pixel data, or NULL on an allocation failure or if the image is -// corrupt or invalid. The pixel data consists of *y scanlines of *x pixels, -// with each pixel consisting of N interleaved 8-bit components; the first -// pixel pointed to is top-left-most in the image. There is no padding between -// image scanlines or between pixels, regardless of format. The number of -// components N is 'desired_channels' if desired_channels is non-zero, or -// *channels_in_file otherwise. If desired_channels is non-zero, -// *channels_in_file has the number of components that _would_ have been -// output otherwise. E.g. if you set desired_channels to 4, you will always -// get RGBA output, but you can check *channels_in_file to see if it's trivially -// opaque because e.g. there were only 3 channels in the source image. -// -// An output image with N components has the following components interleaved -// in this order in each pixel: -// -// N=#comp components -// 1 grey -// 2 grey, alpha -// 3 red, green, blue -// 4 red, green, blue, alpha -// -// If image loading fails for any reason, the return value will be NULL, -// and *x, *y, *channels_in_file will be unchanged. The function -// stbi_failure_reason() can be queried for an extremely brief, end-user -// unfriendly explanation of why the load failed. Define STBI_NO_FAILURE_STRINGS -// to avoid compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly -// more user-friendly ones. -// -// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized. -// -// To query the width, height and component count of an image without having to -// decode the full file, you can use the stbi_info family of functions: -// -// int x,y,n,ok; -// ok = stbi_info(filename, &x, &y, &n); -// // returns ok=1 and sets x, y, n if image is a supported format, -// // 0 otherwise. -// -// Note that stb_image pervasively uses ints in its public API for sizes, -// including sizes of memory buffers. This is now part of the API and thus -// hard to change without causing breakage. As a result, the various image -// loaders all have certain limits on image size; these differ somewhat -// by format but generally boil down to either just under 2GB or just under -// 1GB. When the decoded image would be larger than this, stb_image decoding -// will fail. -// -// Additionally, stb_image will reject image files that have any of their -// dimensions set to a larger value than the configurable STBI_MAX_DIMENSIONS, -// which defaults to 2**24 = 16777216 pixels. Due to the above memory limit, -// the only way to have an image with such dimensions load correctly -// is for it to have a rather extreme aspect ratio. Either way, the -// assumption here is that such larger images are likely to be malformed -// or malicious. If you do need to load an image with individual dimensions -// larger than that, and it still fits in the overall size limit, you can -// #define STBI_MAX_DIMENSIONS on your own to be something larger. -// -// =========================================================================== -// -// UNICODE: -// -// If compiling for Windows and you wish to use Unicode filenames, compile -// with -// #define STBI_WINDOWS_UTF8 -// and pass utf8-encoded filenames. Call stbi_convert_wchar_to_utf8 to convert -// Windows wchar_t filenames to utf8. -// -// =========================================================================== -// -// Philosophy -// -// stb libraries are designed with the following priorities: -// -// 1. easy to use -// 2. easy to maintain -// 3. good performance -// -// Sometimes I let "good performance" creep up in priority over "easy to maintain", -// and for best performance I may provide less-easy-to-use APIs that give higher -// performance, in addition to the easy-to-use ones. Nevertheless, it's important -// to keep in mind that from the standpoint of you, a client of this library, -// all you care about is #1 and #3, and stb libraries DO NOT emphasize #3 above all. -// -// Some secondary priorities arise directly from the first two, some of which -// provide more explicit reasons why performance can't be emphasized. -// -// - Portable ("ease of use") -// - Small source code footprint ("easy to maintain") -// - No dependencies ("ease of use") -// -// =========================================================================== -// -// I/O callbacks -// -// I/O callbacks allow you to read from arbitrary sources, like packaged -// files or some other source. Data read from callbacks are processed -// through a small internal buffer (currently 128 bytes) to try to reduce -// overhead. -// -// The three functions you must define are "read" (reads some bytes of data), -// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end). -// -// =========================================================================== -// -// SIMD support -// -// The JPEG decoder will try to automatically use SIMD kernels on x86 when -// supported by the compiler. For ARM Neon support, you must explicitly -// request it. -// -// (The old do-it-yourself SIMD API is no longer supported in the current -// code.) -// -// On x86, SSE2 will automatically be used when available based on a run-time -// test; if not, the generic C versions are used as a fall-back. On ARM targets, -// the typical path is to have separate builds for NEON and non-NEON devices -// (at least this is true for iOS and Android). Therefore, the NEON support is -// toggled by a build flag: define STBI_NEON to get NEON loops. -// -// If for some reason you do not want to use any of SIMD code, or if -// you have issues compiling it, you can disable it entirely by -// defining STBI_NO_SIMD. -// -// =========================================================================== -// -// HDR image support (disable by defining STBI_NO_HDR) -// -// stb_image supports loading HDR images in general, and currently the Radiance -// .HDR file format specifically. You can still load any file through the existing -// interface; if you attempt to load an HDR file, it will be automatically remapped -// to LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1; -// both of these constants can be reconfigured through this interface: -// -// stbi_hdr_to_ldr_gamma(2.2f); -// stbi_hdr_to_ldr_scale(1.0f); -// -// (note, do not use _inverse_ constants; stbi_image will invert them -// appropriately). -// -// Additionally, there is a new, parallel interface for loading files as -// (linear) floats to preserve the full dynamic range: -// -// float *data = stbi_loadf(filename, &x, &y, &n, 0); -// -// If you load LDR images through this interface, those images will -// be promoted to floating point values, run through the inverse of -// constants corresponding to the above: -// -// stbi_ldr_to_hdr_scale(1.0f); -// stbi_ldr_to_hdr_gamma(2.2f); -// -// Finally, given a filename (or an open file or memory block--see header -// file for details) containing image data, you can query for the "most -// appropriate" interface to use (that is, whether the image is HDR or -// not), using: -// -// stbi_is_hdr(char *filename); -// -// =========================================================================== -// -// iPhone PNG support: -// -// We optionally support converting iPhone-formatted PNGs (which store -// premultiplied BGRA) back to RGB, even though they're internally encoded -// differently. To enable this conversion, call -// stbi_convert_iphone_png_to_rgb(1). -// -// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per -// pixel to remove any premultiplied alpha *only* if the image file explicitly -// says there's premultiplied data (currently only happens in iPhone images, -// and only if iPhone convert-to-rgb processing is on). -// -// =========================================================================== -// -// ADDITIONAL CONFIGURATION -// -// - You can suppress implementation of any of the decoders to reduce -// your code footprint by #defining one or more of the following -// symbols before creating the implementation. -// -// STBI_NO_JPEG -// STBI_NO_PNG -// STBI_NO_BMP -// STBI_NO_PSD -// STBI_NO_TGA -// STBI_NO_GIF -// STBI_NO_HDR -// STBI_NO_PIC -// STBI_NO_PNM (.ppm and .pgm) -// -// - You can request *only* certain decoders and suppress all other ones -// (this will be more forward-compatible, as addition of new decoders -// doesn't require you to disable them explicitly): -// -// STBI_ONLY_JPEG -// STBI_ONLY_PNG -// STBI_ONLY_BMP -// STBI_ONLY_PSD -// STBI_ONLY_TGA -// STBI_ONLY_GIF -// STBI_ONLY_HDR -// STBI_ONLY_PIC -// STBI_ONLY_PNM (.ppm and .pgm) -// -// - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still -// want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB -// -// - If you define STBI_MAX_DIMENSIONS, stb_image will reject images greater -// than that size (in either width or height) without further processing. -// This is to let programs in the wild set an upper bound to prevent -// denial-of-service attacks on untrusted data, as one could generate a -// valid image of gigantic dimensions and force stb_image to allocate a -// huge block of memory and spend disproportionate time decoding it. By -// default this is set to (1 << 24), which is 16777216, but that's still -// very big. - -#ifndef STBI_NO_STDIO -#include -#endif // STBI_NO_STDIO - -#define STBI_VERSION 1 - -enum -{ - STBI_default = 0, // only used for desired_channels - - STBI_grey = 1, - STBI_grey_alpha = 2, - STBI_rgb = 3, - STBI_rgb_alpha = 4 -}; - -#include -typedef unsigned char stbi_uc; -typedef unsigned short stbi_us; - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef STBIDEF -#ifdef STB_IMAGE_STATIC -#define STBIDEF static -#else -#define STBIDEF extern -#endif -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// PRIMARY API - works on images of any type -// - -// -// load image by filename, open file, or memory buffer -// - -typedef struct -{ - int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read - void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative - int (*eof) (void *user); // returns nonzero if we are at end of file/data -} stbi_io_callbacks; - -//////////////////////////////////// -// -// 8-bits-per-channel interface -// - -STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *channels_in_file, int desired_channels); - -#ifndef STBI_NO_STDIO -STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); -// for stbi_load_from_file, file pointer is left pointing immediately after image -#endif - -#ifndef STBI_NO_GIF -STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp); -#endif - -#ifdef STBI_WINDOWS_UTF8 -STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); -#endif - -//////////////////////////////////// -// -// 16-bits-per-channel interface -// - -STBIDEF stbi_us *stbi_load_16_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); - -#ifndef STBI_NO_STDIO -STBIDEF stbi_us *stbi_load_16 (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); -STBIDEF stbi_us *stbi_load_from_file_16(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); -#endif - -//////////////////////////////////// -// -// float-per-channel interface -// -#ifndef STBI_NO_LINEAR - STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); - STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); - - #ifndef STBI_NO_STDIO - STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); - STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); - #endif -#endif - -#ifndef STBI_NO_HDR - STBIDEF void stbi_hdr_to_ldr_gamma(float gamma); - STBIDEF void stbi_hdr_to_ldr_scale(float scale); -#endif // STBI_NO_HDR - -#ifndef STBI_NO_LINEAR - STBIDEF void stbi_ldr_to_hdr_gamma(float gamma); - STBIDEF void stbi_ldr_to_hdr_scale(float scale); -#endif // STBI_NO_LINEAR - -// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR -STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user); -STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len); -#ifndef STBI_NO_STDIO -STBIDEF int stbi_is_hdr (char const *filename); -STBIDEF int stbi_is_hdr_from_file(FILE *f); -#endif // STBI_NO_STDIO - - -// get a VERY brief reason for failure -// on most compilers (and ALL modern mainstream compilers) this is threadsafe -STBIDEF const char *stbi_failure_reason (void); - -// free the loaded image -- this is just free() -STBIDEF void stbi_image_free (void *retval_from_stbi_load); - -// get image dimensions & components without fully decoding -STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp); -STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp); -STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len); -STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *clbk, void *user); - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp); -STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp); -STBIDEF int stbi_is_16_bit (char const *filename); -STBIDEF int stbi_is_16_bit_from_file(FILE *f); -#endif - - - -// for image formats that explicitly notate that they have premultiplied alpha, -// we just return the colors as stored in the file. set this flag to force -// unpremultiplication. results are undefined if the unpremultiply overflow. -STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply); - -// indicate whether we should process iphone images back to canonical format, -// or just pass them through "as-is" -STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); - -// flip the image vertically, so the first pixel in the output array is the bottom left -STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); - -// as above, but only applies to images loaded on the thread that calls the function -// this function is only available if your compiler supports thread-local variables; -// calling it will fail to link if your compiler doesn't -STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply); -STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert); -STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip); - -// ZLIB client - used by PNG, available for other purposes - -STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen); -STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header); -STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen); -STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); - -STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen); -STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); - - -#ifdef __cplusplus -} -#endif - -// -// -//// end header file ///////////////////////////////////////////////////// -#endif // STBI_INCLUDE_STB_IMAGE_H - -#ifdef STB_IMAGE_IMPLEMENTATION - -#if defined(STBI_ONLY_JPEG) || defined(STBI_ONLY_PNG) || defined(STBI_ONLY_BMP) \ - || defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \ - || defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \ - || defined(STBI_ONLY_ZLIB) - #ifndef STBI_ONLY_JPEG - #define STBI_NO_JPEG - #endif - #ifndef STBI_ONLY_PNG - #define STBI_NO_PNG - #endif - #ifndef STBI_ONLY_BMP - #define STBI_NO_BMP - #endif - #ifndef STBI_ONLY_PSD - #define STBI_NO_PSD - #endif - #ifndef STBI_ONLY_TGA - #define STBI_NO_TGA - #endif - #ifndef STBI_ONLY_GIF - #define STBI_NO_GIF - #endif - #ifndef STBI_ONLY_HDR - #define STBI_NO_HDR - #endif - #ifndef STBI_ONLY_PIC - #define STBI_NO_PIC - #endif - #ifndef STBI_ONLY_PNM - #define STBI_NO_PNM - #endif -#endif - -#if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB) -#define STBI_NO_ZLIB -#endif - - -#include -#include // ptrdiff_t on osx -#include -#include -#include - -#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) -#include // ldexp, pow -#endif - -#ifndef STBI_NO_STDIO -#include -#endif - -#ifndef STBI_ASSERT -#include -#define STBI_ASSERT(x) assert(x) -#endif - -#ifdef __cplusplus -#define STBI_EXTERN extern "C" -#else -#define STBI_EXTERN extern -#endif - - -#ifndef _MSC_VER - #ifdef __cplusplus - #define stbi_inline inline - #else - #define stbi_inline - #endif -#else - #define stbi_inline __forceinline -#endif - -#ifndef STBI_NO_THREAD_LOCALS - #if defined(__cplusplus) && __cplusplus >= 201103L - #define STBI_THREAD_LOCAL thread_local - #elif defined(__GNUC__) && __GNUC__ < 5 - #define STBI_THREAD_LOCAL __thread - #elif defined(_MSC_VER) - #define STBI_THREAD_LOCAL __declspec(thread) - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__) - #define STBI_THREAD_LOCAL _Thread_local - #endif - - #ifndef STBI_THREAD_LOCAL - #if defined(__GNUC__) - #define STBI_THREAD_LOCAL __thread - #endif - #endif -#endif - -#if defined(_MSC_VER) || defined(__SYMBIAN32__) -typedef unsigned short stbi__uint16; -typedef signed short stbi__int16; -typedef unsigned int stbi__uint32; -typedef signed int stbi__int32; -#else -#include -typedef uint16_t stbi__uint16; -typedef int16_t stbi__int16; -typedef uint32_t stbi__uint32; -typedef int32_t stbi__int32; -#endif - -// should produce compiler error if size is wrong -typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1]; - -#ifdef _MSC_VER -#define STBI_NOTUSED(v) (void)(v) -#else -#define STBI_NOTUSED(v) (void)sizeof(v) -#endif - -#ifdef _MSC_VER -#define STBI_HAS_LROTL -#endif - -#ifdef STBI_HAS_LROTL - #define stbi_lrot(x,y) _lrotl(x,y) -#else - #define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (-(y) & 31))) -#endif - -#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED)) -// ok -#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED) -// ok -#else -#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)." -#endif - -#ifndef STBI_MALLOC -#define STBI_MALLOC(sz) malloc(sz) -#define STBI_REALLOC(p,newsz) realloc(p,newsz) -#define STBI_FREE(p) free(p) -#endif - -#ifndef STBI_REALLOC_SIZED -#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz) -#endif - -// x86/x64 detection -#if defined(__x86_64__) || defined(_M_X64) -#define STBI__X64_TARGET -#elif defined(__i386) || defined(_M_IX86) -#define STBI__X86_TARGET -#endif - -#if defined(__GNUC__) && defined(STBI__X86_TARGET) && !defined(__SSE2__) && !defined(STBI_NO_SIMD) -// gcc doesn't support sse2 intrinsics unless you compile with -msse2, -// which in turn means it gets to use SSE2 everywhere. This is unfortunate, -// but previous attempts to provide the SSE2 functions with runtime -// detection caused numerous issues. The way architecture extensions are -// exposed in GCC/Clang is, sadly, not really suited for one-file libs. -// New behavior: if compiled with -msse2, we use SSE2 without any -// detection; if not, we don't use it at all. -#define STBI_NO_SIMD -#endif - -#if defined(__MINGW32__) && defined(STBI__X86_TARGET) && !defined(STBI_MINGW_ENABLE_SSE2) && !defined(STBI_NO_SIMD) -// Note that __MINGW32__ doesn't actually mean 32-bit, so we have to avoid STBI__X64_TARGET -// -// 32-bit MinGW wants ESP to be 16-byte aligned, but this is not in the -// Windows ABI and VC++ as well as Windows DLLs don't maintain that invariant. -// As a result, enabling SSE2 on 32-bit MinGW is dangerous when not -// simultaneously enabling "-mstackrealign". -// -// See https://github.com/nothings/stb/issues/81 for more information. -// -// So default to no SSE2 on 32-bit MinGW. If you've read this far and added -// -mstackrealign to your build settings, feel free to #define STBI_MINGW_ENABLE_SSE2. -#define STBI_NO_SIMD -#endif - -#if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) -#define STBI_SSE2 -#include - -#ifdef _MSC_VER - -#if _MSC_VER >= 1400 // not VC6 -#include // __cpuid -static int stbi__cpuid3(void) -{ - int info[4]; - __cpuid(info,1); - return info[3]; -} -#else -static int stbi__cpuid3(void) -{ - int res; - __asm { - mov eax,1 - cpuid - mov res,edx - } - return res; -} -#endif - -#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name - -#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) -static int stbi__sse2_available(void) -{ - int info3 = stbi__cpuid3(); - return ((info3 >> 26) & 1) != 0; -} -#endif - -#else // assume GCC-style if not VC++ -#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) - -#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) -static int stbi__sse2_available(void) -{ - // If we're even attempting to compile this on GCC/Clang, that means - // -msse2 is on, which means the compiler is allowed to use SSE2 - // instructions at will, and so are we. - return 1; -} -#endif - -#endif -#endif - -// ARM NEON -#if defined(STBI_NO_SIMD) && defined(STBI_NEON) -#undef STBI_NEON -#endif - -#ifdef STBI_NEON -#include -#ifdef _MSC_VER -#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name -#else -#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) -#endif -#endif - -#ifndef STBI_SIMD_ALIGN -#define STBI_SIMD_ALIGN(type, name) type name -#endif - -#ifndef STBI_MAX_DIMENSIONS -#define STBI_MAX_DIMENSIONS (1 << 24) -#endif - -/////////////////////////////////////////////// -// -// stbi__context struct and start_xxx functions - -// stbi__context structure is our basic context used by all images, so it -// contains all the IO context, plus some basic image information -typedef struct -{ - stbi__uint32 img_x, img_y; - int img_n, img_out_n; - - stbi_io_callbacks io; - void *io_user_data; - - int read_from_callbacks; - int buflen; - stbi_uc buffer_start[128]; - int callback_already_read; - - stbi_uc *img_buffer, *img_buffer_end; - stbi_uc *img_buffer_original, *img_buffer_original_end; -} stbi__context; - - -static void stbi__refill_buffer(stbi__context *s); - -// initialize a memory-decode context -static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len) -{ - s->io.read = NULL; - s->read_from_callbacks = 0; - s->callback_already_read = 0; - s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer; - s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len; -} - -// initialize a callback-based context -static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) -{ - s->io = *c; - s->io_user_data = user; - s->buflen = sizeof(s->buffer_start); - s->read_from_callbacks = 1; - s->callback_already_read = 0; - s->img_buffer = s->img_buffer_original = s->buffer_start; - stbi__refill_buffer(s); - s->img_buffer_original_end = s->img_buffer_end; -} - -#ifndef STBI_NO_STDIO - -static int stbi__stdio_read(void *user, char *data, int size) -{ - return (int) fread(data,1,size,(FILE*) user); -} - -static void stbi__stdio_skip(void *user, int n) -{ - int ch; - fseek((FILE*) user, n, SEEK_CUR); - ch = fgetc((FILE*) user); /* have to read a byte to reset feof()'s flag */ - if (ch != EOF) { - ungetc(ch, (FILE *) user); /* push byte back onto stream if valid. */ - } -} - -static int stbi__stdio_eof(void *user) -{ - return feof((FILE*) user) || ferror((FILE *) user); -} - -static stbi_io_callbacks stbi__stdio_callbacks = -{ - stbi__stdio_read, - stbi__stdio_skip, - stbi__stdio_eof, -}; - -static void stbi__start_file(stbi__context *s, FILE *f) -{ - stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f); -} - -//static void stop_file(stbi__context *s) { } - -#endif // !STBI_NO_STDIO - -static void stbi__rewind(stbi__context *s) -{ - // conceptually rewind SHOULD rewind to the beginning of the stream, - // but we just rewind to the beginning of the initial buffer, because - // we only use it after doing 'test', which only ever looks at at most 92 bytes - s->img_buffer = s->img_buffer_original; - s->img_buffer_end = s->img_buffer_original_end; -} - -enum -{ - STBI_ORDER_RGB, - STBI_ORDER_BGR -}; - -typedef struct -{ - int bits_per_channel; - int num_channels; - int channel_order; -} stbi__result_info; - -#ifndef STBI_NO_JPEG -static int stbi__jpeg_test(stbi__context *s); -static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PNG -static int stbi__png_test(stbi__context *s); -static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp); -static int stbi__png_is16(stbi__context *s); -#endif - -#ifndef STBI_NO_BMP -static int stbi__bmp_test(stbi__context *s); -static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_TGA -static int stbi__tga_test(stbi__context *s); -static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PSD -static int stbi__psd_test(stbi__context *s); -static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc); -static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp); -static int stbi__psd_is16(stbi__context *s); -#endif - -#ifndef STBI_NO_HDR -static int stbi__hdr_test(stbi__context *s); -static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PIC -static int stbi__pic_test(stbi__context *s); -static void *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_GIF -static int stbi__gif_test(stbi__context *s); -static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp); -static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PNM -static int stbi__pnm_test(stbi__context *s); -static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); -static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp); -static int stbi__pnm_is16(stbi__context *s); -#endif - -static -#ifdef STBI_THREAD_LOCAL -STBI_THREAD_LOCAL -#endif -const char *stbi__g_failure_reason; - -STBIDEF const char *stbi_failure_reason(void) -{ - return stbi__g_failure_reason; -} - -#ifndef STBI_NO_FAILURE_STRINGS -static int stbi__err(const char *str) -{ - stbi__g_failure_reason = str; - return 0; -} -#endif - -static void *stbi__malloc(size_t size) -{ - return STBI_MALLOC(size); -} - -// stb_image uses ints pervasively, including for offset calculations. -// therefore the largest decoded image size we can support with the -// current code, even on 64-bit targets, is INT_MAX. this is not a -// significant limitation for the intended use case. -// -// we do, however, need to make sure our size calculations don't -// overflow. hence a few helper functions for size calculations that -// multiply integers together, making sure that they're non-negative -// and no overflow occurs. - -// return 1 if the sum is valid, 0 on overflow. -// negative terms are considered invalid. -static int stbi__addsizes_valid(int a, int b) -{ - if (b < 0) return 0; - // now 0 <= b <= INT_MAX, hence also - // 0 <= INT_MAX - b <= INTMAX. - // And "a + b <= INT_MAX" (which might overflow) is the - // same as a <= INT_MAX - b (no overflow) - return a <= INT_MAX - b; -} - -// returns 1 if the product is valid, 0 on overflow. -// negative factors are considered invalid. -static int stbi__mul2sizes_valid(int a, int b) -{ - if (a < 0 || b < 0) return 0; - if (b == 0) return 1; // mul-by-0 is always safe - // portable way to check for no overflows in a*b - return a <= INT_MAX/b; -} - -#if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) -// returns 1 if "a*b + add" has no negative terms/factors and doesn't overflow -static int stbi__mad2sizes_valid(int a, int b, int add) -{ - return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a*b, add); -} -#endif - -// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow -static int stbi__mad3sizes_valid(int a, int b, int c, int add) -{ - return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && - stbi__addsizes_valid(a*b*c, add); -} - -// returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow -#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) -static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add) -{ - return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && - stbi__mul2sizes_valid(a*b*c, d) && stbi__addsizes_valid(a*b*c*d, add); -} -#endif - -#if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) -// mallocs with size overflow checking -static void *stbi__malloc_mad2(int a, int b, int add) -{ - if (!stbi__mad2sizes_valid(a, b, add)) return NULL; - return stbi__malloc(a*b + add); -} -#endif - -static void *stbi__malloc_mad3(int a, int b, int c, int add) -{ - if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; - return stbi__malloc(a*b*c + add); -} - -#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) -static void *stbi__malloc_mad4(int a, int b, int c, int d, int add) -{ - if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; - return stbi__malloc(a*b*c*d + add); -} -#endif - -// returns 1 if the sum of two signed ints is valid (between -2^31 and 2^31-1 inclusive), 0 on overflow. -static int stbi__addints_valid(int a, int b) -{ - if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. - return a <= INT_MAX - b; -} - -// returns 1 if the product of two signed shorts is valid, 0 on overflow. -static int stbi__mul2shorts_valid(short a, short b) -{ - if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow - if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX/b; // product is positive, so similar to mul2sizes_valid - if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN - return a >= SHRT_MIN / b; -} - -// stbi__err - error -// stbi__errpf - error returning pointer to float -// stbi__errpuc - error returning pointer to unsigned char - -#ifdef STBI_NO_FAILURE_STRINGS - #define stbi__err(x,y) 0 -#elif defined(STBI_FAILURE_USERMSG) - #define stbi__err(x,y) stbi__err(y) -#else - #define stbi__err(x,y) stbi__err(x) -#endif - -#define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL)) -#define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL)) - -STBIDEF void stbi_image_free(void *retval_from_stbi_load) -{ - STBI_FREE(retval_from_stbi_load); -} - -#ifndef STBI_NO_LINEAR -static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp); -#endif - -#ifndef STBI_NO_HDR -static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp); -#endif - -static int stbi__vertically_flip_on_load_global = 0; - -STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) -{ - stbi__vertically_flip_on_load_global = flag_true_if_should_flip; -} - -#ifndef STBI_THREAD_LOCAL -#define stbi__vertically_flip_on_load stbi__vertically_flip_on_load_global -#else -static STBI_THREAD_LOCAL int stbi__vertically_flip_on_load_local, stbi__vertically_flip_on_load_set; - -STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip) -{ - stbi__vertically_flip_on_load_local = flag_true_if_should_flip; - stbi__vertically_flip_on_load_set = 1; -} - -#define stbi__vertically_flip_on_load (stbi__vertically_flip_on_load_set \ - ? stbi__vertically_flip_on_load_local \ - : stbi__vertically_flip_on_load_global) -#endif // STBI_THREAD_LOCAL - -static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) -{ - memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields - ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed - ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order - ri->num_channels = 0; - - // test the formats with a very explicit header first (at least a FOURCC - // or distinctive magic number first) - #ifndef STBI_NO_PNG - if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_BMP - if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_GIF - if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_PSD - if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); - #else - STBI_NOTUSED(bpc); - #endif - #ifndef STBI_NO_PIC - if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); - #endif - - // then the formats that can end up attempting to load with just 1 or 2 - // bytes matching expectations; these are prone to false positives, so - // try them later - #ifndef STBI_NO_JPEG - if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); - #endif - #ifndef STBI_NO_PNM - if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); - #endif - - #ifndef STBI_NO_HDR - if (stbi__hdr_test(s)) { - float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); - return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); - } - #endif - - #ifndef STBI_NO_TGA - // test tga last because it's a crappy test! - if (stbi__tga_test(s)) - return stbi__tga_load(s,x,y,comp,req_comp, ri); - #endif - - return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); -} - -static stbi_uc *stbi__convert_16_to_8(stbi__uint16 *orig, int w, int h, int channels) -{ - int i; - int img_len = w * h * channels; - stbi_uc *reduced; - - reduced = (stbi_uc *) stbi__malloc(img_len); - if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); - - for (i = 0; i < img_len; ++i) - reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - - STBI_FREE(orig); - return reduced; -} - -static stbi__uint16 *stbi__convert_8_to_16(stbi_uc *orig, int w, int h, int channels) -{ - int i; - int img_len = w * h * channels; - stbi__uint16 *enlarged; - - enlarged = (stbi__uint16 *) stbi__malloc(img_len*2); - if (enlarged == NULL) return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); - - for (i = 0; i < img_len; ++i) - enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff - - STBI_FREE(orig); - return enlarged; -} - -static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel) -{ - int row; - size_t bytes_per_row = (size_t)w * bytes_per_pixel; - stbi_uc temp[2048]; - stbi_uc *bytes = (stbi_uc *)image; - - for (row = 0; row < (h>>1); row++) { - stbi_uc *row0 = bytes + row*bytes_per_row; - stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row; - // swap row0 with row1 - size_t bytes_left = bytes_per_row; - while (bytes_left) { - size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); - memcpy(temp, row0, bytes_copy); - memcpy(row0, row1, bytes_copy); - memcpy(row1, temp, bytes_copy); - row0 += bytes_copy; - row1 += bytes_copy; - bytes_left -= bytes_copy; - } - } -} - -#ifndef STBI_NO_GIF -static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel) -{ - int slice; - int slice_size = w * h * bytes_per_pixel; - - stbi_uc *bytes = (stbi_uc *)image; - for (slice = 0; slice < z; ++slice) { - stbi__vertical_flip(bytes, w, h, bytes_per_pixel); - bytes += slice_size; - } -} -#endif - -static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi__result_info ri; - void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); - - if (result == NULL) - return NULL; - - // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. - STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); - - if (ri.bits_per_channel != 8) { - result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp); - ri.bits_per_channel = 8; - } - - // @TODO: move stbi__convert_format to here - - if (stbi__vertically_flip_on_load) { - int channels = req_comp ? req_comp : *comp; - stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); - } - - return (unsigned char *) result; -} - -static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi__result_info ri; - void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); - - if (result == NULL) - return NULL; - - // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. - STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); - - if (ri.bits_per_channel != 16) { - result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); - ri.bits_per_channel = 16; - } - - // @TODO: move stbi__convert_format16 to here - // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision - - if (stbi__vertically_flip_on_load) { - int channels = req_comp ? req_comp : *comp; - stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); - } - - return (stbi__uint16 *) result; -} - -#if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR) -static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp) -{ - if (stbi__vertically_flip_on_load && result != NULL) { - int channels = req_comp ? req_comp : *comp; - stbi__vertical_flip(result, *x, *y, channels * sizeof(float)); - } -} -#endif - -#ifndef STBI_NO_STDIO - -#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) -STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); -STBI_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); -#endif - -#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) -STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input) -{ - return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int) bufferlen, NULL, NULL); -} -#endif - -static FILE *stbi__fopen(char const *filename, char const *mode) -{ - FILE *f; -#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) - wchar_t wMode[64]; - wchar_t wFilename[1024]; - if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename))) - return 0; - - if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode)/sizeof(*wMode))) - return 0; - -#if defined(_MSC_VER) && _MSC_VER >= 1400 - if (0 != _wfopen_s(&f, wFilename, wMode)) - f = 0; -#else - f = _wfopen(wFilename, wMode); -#endif - -#elif defined(_MSC_VER) && _MSC_VER >= 1400 - if (0 != fopen_s(&f, filename, mode)) - f=0; -#else - f = fopen(filename, mode); -#endif - return f; -} - - -STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - unsigned char *result; - if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); - result = stbi_load_from_file(f,x,y,comp,req_comp); - fclose(f); - return result; -} - -STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - unsigned char *result; - stbi__context s; - stbi__start_file(&s,f); - result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); - if (result) { - // need to 'unget' all the characters in the IO buffer - fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); - } - return result; -} - -STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - stbi__uint16 *result; - stbi__context s; - stbi__start_file(&s,f); - result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); - if (result) { - // need to 'unget' all the characters in the IO buffer - fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); - } - return result; -} - -STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - stbi__uint16 *result; - if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file"); - result = stbi_load_from_file_16(f,x,y,comp,req_comp); - fclose(f); - return result; -} - - -#endif //!STBI_NO_STDIO - -STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); -} - -STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user); - return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); -} - -STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); -} - -STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); -} - -#ifndef STBI_NO_GIF -STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) -{ - unsigned char *result; - stbi__context s; - stbi__start_mem(&s,buffer,len); - - result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); - if (stbi__vertically_flip_on_load) { - stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); - } - - return result; -} -#endif - -#ifndef STBI_NO_LINEAR -static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - unsigned char *data; - #ifndef STBI_NO_HDR - if (stbi__hdr_test(s)) { - stbi__result_info ri; - float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri); - if (hdr_data) - stbi__float_postprocess(hdr_data,x,y,comp,req_comp); - return hdr_data; - } - #endif - data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp); - if (data) - return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); - return stbi__errpf("unknown image type", "Image not of any known type, or corrupt"); -} - -STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} - -STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} - -#ifndef STBI_NO_STDIO -STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - float *result; - FILE *f = stbi__fopen(filename, "rb"); - if (!f) return stbi__errpf("can't fopen", "Unable to open file"); - result = stbi_loadf_from_file(f,x,y,comp,req_comp); - fclose(f); - return result; -} - -STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_file(&s,f); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} -#endif // !STBI_NO_STDIO - -#endif // !STBI_NO_LINEAR - -// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is -// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always -// reports false! - -STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len) -{ - #ifndef STBI_NO_HDR - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__hdr_test(&s); - #else - STBI_NOTUSED(buffer); - STBI_NOTUSED(len); - return 0; - #endif -} - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_is_hdr (char const *filename) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result=0; - if (f) { - result = stbi_is_hdr_from_file(f); - fclose(f); - } - return result; -} - -STBIDEF int stbi_is_hdr_from_file(FILE *f) -{ - #ifndef STBI_NO_HDR - long pos = ftell(f); - int res; - stbi__context s; - stbi__start_file(&s,f); - res = stbi__hdr_test(&s); - fseek(f, pos, SEEK_SET); - return res; - #else - STBI_NOTUSED(f); - return 0; - #endif -} -#endif // !STBI_NO_STDIO - -STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user) -{ - #ifndef STBI_NO_HDR - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__hdr_test(&s); - #else - STBI_NOTUSED(clbk); - STBI_NOTUSED(user); - return 0; - #endif -} - -#ifndef STBI_NO_LINEAR -static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f; - -STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; } -STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; } -#endif - -static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f; - -STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; } -STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; } - - -////////////////////////////////////////////////////////////////////////////// -// -// Common code used by all image loaders -// - -enum -{ - STBI__SCAN_load=0, - STBI__SCAN_type, - STBI__SCAN_header -}; - -static void stbi__refill_buffer(stbi__context *s) -{ - int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); - s->callback_already_read += (int) (s->img_buffer - s->img_buffer_original); - if (n == 0) { - // at end of file, treat same as if from memory, but need to handle case - // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file - s->read_from_callbacks = 0; - s->img_buffer = s->buffer_start; - s->img_buffer_end = s->buffer_start+1; - *s->img_buffer = 0; - } else { - s->img_buffer = s->buffer_start; - s->img_buffer_end = s->buffer_start + n; - } -} - -stbi_inline static stbi_uc stbi__get8(stbi__context *s) -{ - if (s->img_buffer < s->img_buffer_end) - return *s->img_buffer++; - if (s->read_from_callbacks) { - stbi__refill_buffer(s); - return *s->img_buffer++; - } - return 0; -} - -#if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -// nothing -#else -stbi_inline static int stbi__at_eof(stbi__context *s) -{ - if (s->io.read) { - if (!(s->io.eof)(s->io_user_data)) return 0; - // if feof() is true, check if buffer = end - // special case: we've only got the special 0 character at the end - if (s->read_from_callbacks == 0) return 1; - } - - return s->img_buffer >= s->img_buffer_end; -} -#endif - -#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -// nothing -#else -static void stbi__skip(stbi__context *s, int n) -{ - if (n == 0) return; // already there! - if (n < 0) { - s->img_buffer = s->img_buffer_end; - return; - } - if (s->io.read) { - int blen = (int) (s->img_buffer_end - s->img_buffer); - if (blen < n) { - s->img_buffer = s->img_buffer_end; - (s->io.skip)(s->io_user_data, n - blen); - return; - } - } - s->img_buffer += n; -} -#endif - -#if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -// nothing -#else -static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) -{ - if (s->io.read) { - int blen = (int) (s->img_buffer_end - s->img_buffer); - if (blen < n) { - int res, count; - - memcpy(buffer, s->img_buffer, blen); - - count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); - res = (count == (n-blen)); - s->img_buffer = s->img_buffer_end; - return res; - } - } - - if (s->img_buffer+n <= s->img_buffer_end) { - memcpy(buffer, s->img_buffer, n); - s->img_buffer += n; - return 1; - } else - return 0; -} -#endif - -#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -// nothing -#else -static int stbi__get16be(stbi__context *s) -{ - int z = stbi__get8(s); - return (z << 8) + stbi__get8(s); -} -#endif - -#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -// nothing -#else -static stbi__uint32 stbi__get32be(stbi__context *s) -{ - stbi__uint32 z = stbi__get16be(s); - return (z << 16) + stbi__get16be(s); -} -#endif - -#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -// nothing -#else -static int stbi__get16le(stbi__context *s) -{ - int z = stbi__get8(s); - return z + (stbi__get8(s) << 8); -} -#endif - -#ifndef STBI_NO_BMP -static stbi__uint32 stbi__get32le(stbi__context *s) -{ - stbi__uint32 z = stbi__get16le(s); - z += (stbi__uint32)stbi__get16le(s) << 16; - return z; -} -#endif - -#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings - -#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -// nothing -#else -////////////////////////////////////////////////////////////////////////////// -// -// generic converter from built-in img_n to req_comp -// individual types do this automatically as much as possible (e.g. jpeg -// does all cases internally since it needs to colorspace convert anyway, -// and it never has alpha, so very few cases ). png can automatically -// interleave an alpha=255 channel, but falls back to this for other cases -// -// assume data buffer is malloced, so malloc a new one and free that one -// only failure mode is malloc failing - -static stbi_uc stbi__compute_y(int r, int g, int b) -{ - return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); -} -#endif - -#if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -// nothing -#else -static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y) -{ - int i,j; - unsigned char *good; - - if (req_comp == img_n) return data; - STBI_ASSERT(req_comp >= 1 && req_comp <= 4); - - good = (unsigned char *) stbi__malloc_mad3(req_comp, x, y, 0); - if (good == NULL) { - STBI_FREE(data); - return stbi__errpuc("outofmem", "Out of memory"); - } - - for (j=0; j < (int) y; ++j) { - unsigned char *src = data + j * x * img_n ; - unsigned char *dest = good + j * x * req_comp; - - #define STBI__COMBO(a,b) ((a)*8+(b)) - #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) - // convert source image with img_n components to one with req_comp components; - // avoid switch per pixel, so use switch per scanline and massive macros - switch (STBI__COMBO(img_n, req_comp)) { - STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break; - STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break; - STBI__CASE(2,1) { dest[0]=src[0]; } break; - STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; - STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=255; } break; - STBI__CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; - STBI__CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break; - STBI__CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; - STBI__CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break; - STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; - default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); - } - #undef STBI__CASE - } - - STBI_FREE(data); - return good; -} -#endif - -#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -// nothing -#else -static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -{ - return (stbi__uint16) (((r*77) + (g*150) + (29*b)) >> 8); -} -#endif - -#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -// nothing -#else -static stbi__uint16 *stbi__convert_format16(stbi__uint16 *data, int img_n, int req_comp, unsigned int x, unsigned int y) -{ - int i,j; - stbi__uint16 *good; - - if (req_comp == img_n) return data; - STBI_ASSERT(req_comp >= 1 && req_comp <= 4); - - good = (stbi__uint16 *) stbi__malloc(req_comp * x * y * 2); - if (good == NULL) { - STBI_FREE(data); - return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); - } - - for (j=0; j < (int) y; ++j) { - stbi__uint16 *src = data + j * x * img_n ; - stbi__uint16 *dest = good + j * x * req_comp; - - #define STBI__COMBO(a,b) ((a)*8+(b)) - #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) - // convert source image with img_n components to one with req_comp components; - // avoid switch per pixel, so use switch per scanline and massive macros - switch (STBI__COMBO(img_n, req_comp)) { - STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=0xffff; } break; - STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=0xffff; } break; - STBI__CASE(2,1) { dest[0]=src[0]; } break; - STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; - STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; - STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=0xffff; } break; - STBI__CASE(3,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; - STBI__CASE(3,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = 0xffff; } break; - STBI__CASE(4,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; - STBI__CASE(4,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = src[3]; } break; - STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; - default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion"); - } - #undef STBI__CASE - } - - STBI_FREE(data); - return good; -} -#endif - -#ifndef STBI_NO_LINEAR -static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp) -{ - int i,k,n; - float *output; - if (!data) return NULL; - output = (float *) stbi__malloc_mad4(x, y, comp, sizeof(float), 0); - if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } - // compute number of non-alpha components - if (comp & 1) n = comp; else n = comp-1; - for (i=0; i < x*y; ++i) { - for (k=0; k < n; ++k) { - output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale); - } - } - if (n < comp) { - for (i=0; i < x*y; ++i) { - output[i*comp + n] = data[i*comp + n]/255.0f; - } - } - STBI_FREE(data); - return output; -} -#endif - -#ifndef STBI_NO_HDR -#define stbi__float2int(x) ((int) (x)) -static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) -{ - int i,k,n; - stbi_uc *output; - if (!data) return NULL; - output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0); - if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } - // compute number of non-alpha components - if (comp & 1) n = comp; else n = comp-1; - for (i=0; i < x*y; ++i) { - for (k=0; k < n; ++k) { - float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; - if (z < 0) z = 0; - if (z > 255) z = 255; - output[i*comp + k] = (stbi_uc) stbi__float2int(z); - } - if (k < comp) { - float z = data[i*comp+k] * 255 + 0.5f; - if (z < 0) z = 0; - if (z > 255) z = 255; - output[i*comp + k] = (stbi_uc) stbi__float2int(z); - } - } - STBI_FREE(data); - return output; -} -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// "baseline" JPEG/JFIF decoder -// -// simple implementation -// - doesn't support delayed output of y-dimension -// - simple interface (only one output format: 8-bit interleaved RGB) -// - doesn't try to recover corrupt jpegs -// - doesn't allow partial loading, loading multiple at once -// - still fast on x86 (copying globals into locals doesn't help x86) -// - allocates lots of intermediate memory (full size of all components) -// - non-interleaved case requires this anyway -// - allows good upsampling (see next) -// high-quality -// - upsampled channels are bilinearly interpolated, even across blocks -// - quality integer IDCT derived from IJG's 'slow' -// performance -// - fast huffman; reasonable integer IDCT -// - some SIMD kernels for common paths on targets with SSE2/NEON -// - uses a lot of intermediate memory, could cache poorly - -#ifndef STBI_NO_JPEG - -// huffman decoding acceleration -#define FAST_BITS 9 // larger handles more cases; smaller stomps less cache - -typedef struct -{ - stbi_uc fast[1 << FAST_BITS]; - // weirdly, repacking this into AoS is a 10% speed loss, instead of a win - stbi__uint16 code[256]; - stbi_uc values[256]; - stbi_uc size[257]; - unsigned int maxcode[18]; - int delta[17]; // old 'firstsymbol' - old 'firstcode' -} stbi__huffman; - -typedef struct -{ - stbi__context *s; - stbi__huffman huff_dc[4]; - stbi__huffman huff_ac[4]; - stbi__uint16 dequant[4][64]; - stbi__int16 fast_ac[4][1 << FAST_BITS]; - -// sizes for components, interleaved MCUs - int img_h_max, img_v_max; - int img_mcu_x, img_mcu_y; - int img_mcu_w, img_mcu_h; - -// definition of jpeg image component - struct - { - int id; - int h,v; - int tq; - int hd,ha; - int dc_pred; - - int x,y,w2,h2; - stbi_uc *data; - void *raw_data, *raw_coeff; - stbi_uc *linebuf; - short *coeff; // progressive only - int coeff_w, coeff_h; // number of 8x8 coefficient blocks - } img_comp[4]; - - stbi__uint32 code_buffer; // jpeg entropy-coded buffer - int code_bits; // number of valid bits - unsigned char marker; // marker seen while filling entropy buffer - int nomore; // flag if we saw a marker so must stop - - int progressive; - int spec_start; - int spec_end; - int succ_high; - int succ_low; - int eob_run; - int jfif; - int app14_color_transform; // Adobe APP14 tag - int rgb; - - int scan_n, order[4]; - int restart_interval, todo; - -// kernels - void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]); - void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step); - stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs); -} stbi__jpeg; - -static int stbi__build_huffman(stbi__huffman *h, int *count) -{ - int i,j,k=0; - unsigned int code; - // build size list for each symbol (from JPEG spec) - for (i=0; i < 16; ++i) { - for (j=0; j < count[i]; ++j) { - h->size[k++] = (stbi_uc) (i+1); - if(k >= 257) return stbi__err("bad size list","Corrupt JPEG"); - } - } - h->size[k] = 0; - - // compute actual symbols (from jpeg spec) - code = 0; - k = 0; - for(j=1; j <= 16; ++j) { - // compute delta to add to code to compute symbol id - h->delta[j] = k - code; - if (h->size[k] == j) { - while (h->size[k] == j) - h->code[k++] = (stbi__uint16) (code++); - if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG"); - } - // compute largest code + 1 for this size, preshifted as needed later - h->maxcode[j] = code << (16-j); - code <<= 1; - } - h->maxcode[j] = 0xffffffff; - - // build non-spec acceleration table; 255 is flag for not-accelerated - memset(h->fast, 255, 1 << FAST_BITS); - for (i=0; i < k; ++i) { - int s = h->size[i]; - if (s <= FAST_BITS) { - int c = h->code[i] << (FAST_BITS-s); - int m = 1 << (FAST_BITS-s); - for (j=0; j < m; ++j) { - h->fast[c+j] = (stbi_uc) i; - } - } - } - return 1; -} - -// build a table that decodes both magnitude and value of small ACs in -// one go. -static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h) -{ - int i; - for (i=0; i < (1 << FAST_BITS); ++i) { - stbi_uc fast = h->fast[i]; - fast_ac[i] = 0; - if (fast < 255) { - int rs = h->values[fast]; - int run = (rs >> 4) & 15; - int magbits = rs & 15; - int len = h->size[fast]; - - if (magbits && len + magbits <= FAST_BITS) { - // magnitude code followed by receive_extend code - int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); - int m = 1 << (magbits - 1); - if (k < m) k += (~0U << magbits) + 1; - // if the result is small enough, we can fit it in fast_ac table - if (k >= -128 && k <= 127) - fast_ac[i] = (stbi__int16) ((k * 256) + (run * 16) + (len + magbits)); - } - } - } -} - -static void stbi__grow_buffer_unsafe(stbi__jpeg *j) -{ - do { - unsigned int b = j->nomore ? 0 : stbi__get8(j->s); - if (b == 0xff) { - int c = stbi__get8(j->s); - while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes - if (c != 0) { - j->marker = (unsigned char) c; - j->nomore = 1; - return; - } - } - j->code_buffer |= b << (24 - j->code_bits); - j->code_bits += 8; - } while (j->code_bits <= 24); -} - -// (1 << n) - 1 -static const stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535}; - -// decode a jpeg huffman value from the bitstream -stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h) -{ - unsigned int temp; - int c,k; - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - // look at the top FAST_BITS and determine what symbol ID it is, - // if the code is <= FAST_BITS - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - k = h->fast[c]; - if (k < 255) { - int s = h->size[k]; - if (s > j->code_bits) - return -1; - j->code_buffer <<= s; - j->code_bits -= s; - return h->values[k]; - } - - // naive test is to shift the code_buffer down so k bits are - // valid, then test against maxcode. To speed this up, we've - // preshifted maxcode left so that it has (16-k) 0s at the - // end; in other words, regardless of the number of bits, it - // wants to be compared against something shifted to have 16; - // that way we don't need to shift inside the loop. - temp = j->code_buffer >> 16; - for (k=FAST_BITS+1 ; ; ++k) - if (temp < h->maxcode[k]) - break; - if (k == 17) { - // error! code not found - j->code_bits -= 16; - return -1; - } - - if (k > j->code_bits) - return -1; - - // convert the huffman code to the symbol id - c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - if(c < 0 || c >= 256) // symbol id out of bounds! - return -1; - STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); - - // convert the id to a symbol - j->code_bits -= k; - j->code_buffer <<= k; - return h->values[c]; -} - -// bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); - if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - - sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) - k = stbi_lrot(j->code_buffer, n); - j->code_buffer = k & ~stbi__bmask[n]; - k &= stbi__bmask[n]; - j->code_bits -= n; - return k + (stbi__jbias[n] & (sgn - 1)); -} - -// get some unsigned bits -stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n) -{ - unsigned int k; - if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - k = stbi_lrot(j->code_buffer, n); - j->code_buffer = k & ~stbi__bmask[n]; - k &= stbi__bmask[n]; - j->code_bits -= n; - return k; -} - -stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) -{ - unsigned int k; - if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing - k = j->code_buffer; - j->code_buffer <<= 1; - --j->code_bits; - return k & 0x80000000; -} - -// given a value that's at position X in the zigzag stream, -// where does it appear in the 8x8 matrix coded as row-major? -static const stbi_uc stbi__jpeg_dezigzag[64+15] = -{ - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, - 27, 20, 13, 6, 7, 14, 21, 28, - 35, 42, 49, 56, 57, 50, 43, 36, - 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, - 53, 60, 61, 54, 47, 55, 62, 63, - // let corrupt input sample past end - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63 -}; - -// decode one 64-entry block-- -static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi__uint16 *dequant) -{ - int diff,dc,k; - int t; - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - t = stbi__jpeg_huff_decode(j, hdc); - if (t < 0 || t > 15) return stbi__err("bad huffman code","Corrupt JPEG"); - - // 0 all the ac values now so we can do it 32-bits at a time - memset(data,0,64*sizeof(data[0])); - - diff = t ? stbi__extend_receive(j, t) : 0; - if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta","Corrupt JPEG"); - dc = j->img_comp[b].dc_pred + diff; - j->img_comp[b].dc_pred = dc; - if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - data[0] = (short) (dc * dequant[0]); - - // decode AC components, see JPEG spec - k = 1; - do { - unsigned int zig; - int c,r,s; - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - r = fac[c]; - if (r) { // fast-AC path - k += (r >> 4) & 15; // run - s = r & 15; // combined length - if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); - j->code_buffer <<= s; - j->code_bits -= s; - // decode into unzigzag'd location - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) ((r >> 8) * dequant[zig]); - } else { - int rs = stbi__jpeg_huff_decode(j, hac); - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (rs != 0xf0) break; // end block - k += 16; - } else { - k += r; - // decode into unzigzag'd location - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]); - } - } - } while (k < 64); - return 1; -} - -static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b) -{ - int diff,dc; - int t; - if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - if (j->succ_high == 0) { - // first scan for DC coefficient, must be first - memset(data,0,64*sizeof(data[0])); // 0 all the ac values now - t = stbi__jpeg_huff_decode(j, hdc); - if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - diff = t ? stbi__extend_receive(j, t) : 0; - - if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - dc = j->img_comp[b].dc_pred + diff; - j->img_comp[b].dc_pred = dc; - if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - data[0] = (short) (dc * (1 << j->succ_low)); - } else { - // refinement scan for DC coefficient - if (stbi__jpeg_get_bit(j)) - data[0] += (short) (1 << j->succ_low); - } - return 1; -} - -// @OPTIMIZE: store non-zigzagged during the decode passes, -// and only de-zigzag when dequantizing -static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac) -{ - int k; - if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - if (j->succ_high == 0) { - int shift = j->succ_low; - - if (j->eob_run) { - --j->eob_run; - return 1; - } - - k = j->spec_start; - do { - unsigned int zig; - int c,r,s; - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - r = fac[c]; - if (r) { // fast-AC path - k += (r >> 4) & 15; // run - s = r & 15; // combined length - if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); - j->code_buffer <<= s; - j->code_bits -= s; - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) ((r >> 8) * (1 << shift)); - } else { - int rs = stbi__jpeg_huff_decode(j, hac); - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (r < 15) { - j->eob_run = (1 << r); - if (r) - j->eob_run += stbi__jpeg_get_bits(j, r); - --j->eob_run; - break; - } - k += 16; - } else { - k += r; - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) (stbi__extend_receive(j,s) * (1 << shift)); - } - } - } while (k <= j->spec_end); - } else { - // refinement scan for these AC coefficients - - short bit = (short) (1 << j->succ_low); - - if (j->eob_run) { - --j->eob_run; - for (k = j->spec_start; k <= j->spec_end; ++k) { - short *p = &data[stbi__jpeg_dezigzag[k]]; - if (*p != 0) - if (stbi__jpeg_get_bit(j)) - if ((*p & bit)==0) { - if (*p > 0) - *p += bit; - else - *p -= bit; - } - } - } else { - k = j->spec_start; - do { - int r,s; - int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (r < 15) { - j->eob_run = (1 << r) - 1; - if (r) - j->eob_run += stbi__jpeg_get_bits(j, r); - r = 64; // force end of block - } else { - // r=15 s=0 should write 16 0s, so we just do - // a run of 15 0s and then write s (which is 0), - // so we don't have to do anything special here - } - } else { - if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); - // sign bit - if (stbi__jpeg_get_bit(j)) - s = bit; - else - s = -bit; - } - - // advance by r - while (k <= j->spec_end) { - short *p = &data[stbi__jpeg_dezigzag[k++]]; - if (*p != 0) { - if (stbi__jpeg_get_bit(j)) - if ((*p & bit)==0) { - if (*p > 0) - *p += bit; - else - *p -= bit; - } - } else { - if (r == 0) { - *p = (short) s; - break; - } - --r; - } - } - } while (k <= j->spec_end); - } - } - return 1; -} - -// take a -128..127 value and stbi__clamp it and convert to 0..255 -stbi_inline static stbi_uc stbi__clamp(int x) -{ - // trick to use a single test to catch both cases - if ((unsigned int) x > 255) { - if (x < 0) return 0; - if (x > 255) return 255; - } - return (stbi_uc) x; -} - -#define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -#define stbi__fsh(x) ((x) * 4096) - -// derived from jidctint -- DCT_ISLOW -#define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ - int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ - p2 = s2; \ - p3 = s6; \ - p1 = (p2+p3) * stbi__f2f(0.5411961f); \ - t2 = p1 + p3*stbi__f2f(-1.847759065f); \ - t3 = p1 + p2*stbi__f2f( 0.765366865f); \ - p2 = s0; \ - p3 = s4; \ - t0 = stbi__fsh(p2+p3); \ - t1 = stbi__fsh(p2-p3); \ - x0 = t0+t3; \ - x3 = t0-t3; \ - x1 = t1+t2; \ - x2 = t1-t2; \ - t0 = s7; \ - t1 = s5; \ - t2 = s3; \ - t3 = s1; \ - p3 = t0+t2; \ - p4 = t1+t3; \ - p1 = t0+t3; \ - p2 = t1+t2; \ - p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ - t0 = t0*stbi__f2f( 0.298631336f); \ - t1 = t1*stbi__f2f( 2.053119869f); \ - t2 = t2*stbi__f2f( 3.072711026f); \ - t3 = t3*stbi__f2f( 1.501321110f); \ - p1 = p5 + p1*stbi__f2f(-0.899976223f); \ - p2 = p5 + p2*stbi__f2f(-2.562915447f); \ - p3 = p3*stbi__f2f(-1.961570560f); \ - p4 = p4*stbi__f2f(-0.390180644f); \ - t3 += p1+p4; \ - t2 += p2+p3; \ - t1 += p2+p4; \ - t0 += p1+p3; - -static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64]) -{ - int i,val[64],*v=val; - stbi_uc *o; - short *d = data; - - // columns - for (i=0; i < 8; ++i,++d, ++v) { - // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing - if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0 - && d[40]==0 && d[48]==0 && d[56]==0) { - // no shortcut 0 seconds - // (1|2|3|4|5|6|7)==0 0 seconds - // all separate -0.047 seconds - // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds - int dcterm = d[0]*4; - v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; - } else { - STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56]) - // constants scaled things up by 1<<12; let's bring them back - // down, but keep 2 extra bits of precision - x0 += 512; x1 += 512; x2 += 512; x3 += 512; - v[ 0] = (x0+t3) >> 10; - v[56] = (x0-t3) >> 10; - v[ 8] = (x1+t2) >> 10; - v[48] = (x1-t2) >> 10; - v[16] = (x2+t1) >> 10; - v[40] = (x2-t1) >> 10; - v[24] = (x3+t0) >> 10; - v[32] = (x3-t0) >> 10; - } - } - - for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) { - // no fast case since the first 1D IDCT spread components out - STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7]) - // constants scaled things up by 1<<12, plus we had 1<<2 from first - // loop, plus horizontal and vertical each scale by sqrt(8) so together - // we've got an extra 1<<3, so 1<<17 total we need to remove. - // so we want to round that, which means adding 0.5 * 1<<17, - // aka 65536. Also, we'll end up with -128 to 127 that we want - // to encode as 0..255 by adding 128, so we'll add that before the shift - x0 += 65536 + (128<<17); - x1 += 65536 + (128<<17); - x2 += 65536 + (128<<17); - x3 += 65536 + (128<<17); - // tried computing the shifts into temps, or'ing the temps to see - // if any were out of range, but that was slower - o[0] = stbi__clamp((x0+t3) >> 17); - o[7] = stbi__clamp((x0-t3) >> 17); - o[1] = stbi__clamp((x1+t2) >> 17); - o[6] = stbi__clamp((x1-t2) >> 17); - o[2] = stbi__clamp((x2+t1) >> 17); - o[5] = stbi__clamp((x2-t1) >> 17); - o[3] = stbi__clamp((x3+t0) >> 17); - o[4] = stbi__clamp((x3-t0) >> 17); - } -} - -#ifdef STBI_SSE2 -// sse2 integer IDCT. not the fastest possible implementation but it -// produces bit-identical results to the generic C version so it's -// fully "transparent". -static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) -{ - // This is constructed to match our regular (generic) integer IDCT exactly. - __m128i row0, row1, row2, row3, row4, row5, row6, row7; - __m128i tmp; - - // dot product constant: even elems=x, odd elems=y - #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) - - // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) - // out(1) = c1[even]*x + c1[odd]*y - #define dct_rot(out0,out1, x,y,c0,c1) \ - __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ - __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ - __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ - __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ - __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ - __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) - - // out = in << 12 (in 16-bit, out 32-bit) - #define dct_widen(out, in) \ - __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ - __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) - - // wide add - #define dct_wadd(out, a, b) \ - __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ - __m128i out##_h = _mm_add_epi32(a##_h, b##_h) - - // wide sub - #define dct_wsub(out, a, b) \ - __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ - __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) - - // butterfly a/b, add bias, then shift by "s" and pack - #define dct_bfly32o(out0, out1, a,b,bias,s) \ - { \ - __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ - __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ - dct_wadd(sum, abiased, b); \ - dct_wsub(dif, abiased, b); \ - out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ - out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ - } - - // 8-bit interleave step (for transposes) - #define dct_interleave8(a, b) \ - tmp = a; \ - a = _mm_unpacklo_epi8(a, b); \ - b = _mm_unpackhi_epi8(tmp, b) - - // 16-bit interleave step (for transposes) - #define dct_interleave16(a, b) \ - tmp = a; \ - a = _mm_unpacklo_epi16(a, b); \ - b = _mm_unpackhi_epi16(tmp, b) - - #define dct_pass(bias,shift) \ - { \ - /* even part */ \ - dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ - __m128i sum04 = _mm_add_epi16(row0, row4); \ - __m128i dif04 = _mm_sub_epi16(row0, row4); \ - dct_widen(t0e, sum04); \ - dct_widen(t1e, dif04); \ - dct_wadd(x0, t0e, t3e); \ - dct_wsub(x3, t0e, t3e); \ - dct_wadd(x1, t1e, t2e); \ - dct_wsub(x2, t1e, t2e); \ - /* odd part */ \ - dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ - dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ - __m128i sum17 = _mm_add_epi16(row1, row7); \ - __m128i sum35 = _mm_add_epi16(row3, row5); \ - dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ - dct_wadd(x4, y0o, y4o); \ - dct_wadd(x5, y1o, y5o); \ - dct_wadd(x6, y2o, y5o); \ - dct_wadd(x7, y3o, y4o); \ - dct_bfly32o(row0,row7, x0,x7,bias,shift); \ - dct_bfly32o(row1,row6, x1,x6,bias,shift); \ - dct_bfly32o(row2,row5, x2,x5,bias,shift); \ - dct_bfly32o(row3,row4, x3,x4,bias,shift); \ - } - - __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); - __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f)); - __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); - __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); - __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f)); - __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f)); - __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f)); - __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f)); - - // rounding biases in column/row passes, see stbi__idct_block for explanation. - __m128i bias_0 = _mm_set1_epi32(512); - __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17)); - - // load - row0 = _mm_load_si128((const __m128i *) (data + 0*8)); - row1 = _mm_load_si128((const __m128i *) (data + 1*8)); - row2 = _mm_load_si128((const __m128i *) (data + 2*8)); - row3 = _mm_load_si128((const __m128i *) (data + 3*8)); - row4 = _mm_load_si128((const __m128i *) (data + 4*8)); - row5 = _mm_load_si128((const __m128i *) (data + 5*8)); - row6 = _mm_load_si128((const __m128i *) (data + 6*8)); - row7 = _mm_load_si128((const __m128i *) (data + 7*8)); - - // column pass - dct_pass(bias_0, 10); - - { - // 16bit 8x8 transpose pass 1 - dct_interleave16(row0, row4); - dct_interleave16(row1, row5); - dct_interleave16(row2, row6); - dct_interleave16(row3, row7); - - // transpose pass 2 - dct_interleave16(row0, row2); - dct_interleave16(row1, row3); - dct_interleave16(row4, row6); - dct_interleave16(row5, row7); - - // transpose pass 3 - dct_interleave16(row0, row1); - dct_interleave16(row2, row3); - dct_interleave16(row4, row5); - dct_interleave16(row6, row7); - } - - // row pass - dct_pass(bias_1, 17); - - { - // pack - __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 - __m128i p1 = _mm_packus_epi16(row2, row3); - __m128i p2 = _mm_packus_epi16(row4, row5); - __m128i p3 = _mm_packus_epi16(row6, row7); - - // 8bit 8x8 transpose pass 1 - dct_interleave8(p0, p2); // a0e0a1e1... - dct_interleave8(p1, p3); // c0g0c1g1... - - // transpose pass 2 - dct_interleave8(p0, p1); // a0c0e0g0... - dct_interleave8(p2, p3); // b0d0f0h0... - - // transpose pass 3 - dct_interleave8(p0, p2); // a0b0c0d0... - dct_interleave8(p1, p3); // a4b4c4d4... - - // store - _mm_storel_epi64((__m128i *) out, p0); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p2); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p1); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p3); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e)); - } - -#undef dct_const -#undef dct_rot -#undef dct_widen -#undef dct_wadd -#undef dct_wsub -#undef dct_bfly32o -#undef dct_interleave8 -#undef dct_interleave16 -#undef dct_pass -} - -#endif // STBI_SSE2 - -#ifdef STBI_NEON - -// NEON integer IDCT. should produce bit-identical -// results to the generic C version. -static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) -{ - int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; - - int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); - int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); - int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f)); - int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f)); - int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); - int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); - int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); - int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); - int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f)); - int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f)); - int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f)); - int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f)); - -#define dct_long_mul(out, inq, coeff) \ - int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ - int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) - -#define dct_long_mac(out, acc, inq, coeff) \ - int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ - int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) - -#define dct_widen(out, inq) \ - int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ - int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) - -// wide add -#define dct_wadd(out, a, b) \ - int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ - int32x4_t out##_h = vaddq_s32(a##_h, b##_h) - -// wide sub -#define dct_wsub(out, a, b) \ - int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ - int32x4_t out##_h = vsubq_s32(a##_h, b##_h) - -// butterfly a/b, then shift using "shiftop" by "s" and pack -#define dct_bfly32o(out0,out1, a,b,shiftop,s) \ - { \ - dct_wadd(sum, a, b); \ - dct_wsub(dif, a, b); \ - out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ - out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ - } - -#define dct_pass(shiftop, shift) \ - { \ - /* even part */ \ - int16x8_t sum26 = vaddq_s16(row2, row6); \ - dct_long_mul(p1e, sum26, rot0_0); \ - dct_long_mac(t2e, p1e, row6, rot0_1); \ - dct_long_mac(t3e, p1e, row2, rot0_2); \ - int16x8_t sum04 = vaddq_s16(row0, row4); \ - int16x8_t dif04 = vsubq_s16(row0, row4); \ - dct_widen(t0e, sum04); \ - dct_widen(t1e, dif04); \ - dct_wadd(x0, t0e, t3e); \ - dct_wsub(x3, t0e, t3e); \ - dct_wadd(x1, t1e, t2e); \ - dct_wsub(x2, t1e, t2e); \ - /* odd part */ \ - int16x8_t sum15 = vaddq_s16(row1, row5); \ - int16x8_t sum17 = vaddq_s16(row1, row7); \ - int16x8_t sum35 = vaddq_s16(row3, row5); \ - int16x8_t sum37 = vaddq_s16(row3, row7); \ - int16x8_t sumodd = vaddq_s16(sum17, sum35); \ - dct_long_mul(p5o, sumodd, rot1_0); \ - dct_long_mac(p1o, p5o, sum17, rot1_1); \ - dct_long_mac(p2o, p5o, sum35, rot1_2); \ - dct_long_mul(p3o, sum37, rot2_0); \ - dct_long_mul(p4o, sum15, rot2_1); \ - dct_wadd(sump13o, p1o, p3o); \ - dct_wadd(sump24o, p2o, p4o); \ - dct_wadd(sump23o, p2o, p3o); \ - dct_wadd(sump14o, p1o, p4o); \ - dct_long_mac(x4, sump13o, row7, rot3_0); \ - dct_long_mac(x5, sump24o, row5, rot3_1); \ - dct_long_mac(x6, sump23o, row3, rot3_2); \ - dct_long_mac(x7, sump14o, row1, rot3_3); \ - dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ - dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ - dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ - dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ - } - - // load - row0 = vld1q_s16(data + 0*8); - row1 = vld1q_s16(data + 1*8); - row2 = vld1q_s16(data + 2*8); - row3 = vld1q_s16(data + 3*8); - row4 = vld1q_s16(data + 4*8); - row5 = vld1q_s16(data + 5*8); - row6 = vld1q_s16(data + 6*8); - row7 = vld1q_s16(data + 7*8); - - // add DC bias - row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); - - // column pass - dct_pass(vrshrn_n_s32, 10); - - // 16bit 8x8 transpose - { -// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -// whether compilers actually get this is another story, sadly. -#define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -#define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -#define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } - - // pass 1 - dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 - dct_trn16(row2, row3); - dct_trn16(row4, row5); - dct_trn16(row6, row7); - - // pass 2 - dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 - dct_trn32(row1, row3); - dct_trn32(row4, row6); - dct_trn32(row5, row7); - - // pass 3 - dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 - dct_trn64(row1, row5); - dct_trn64(row2, row6); - dct_trn64(row3, row7); - -#undef dct_trn16 -#undef dct_trn32 -#undef dct_trn64 - } - - // row pass - // vrshrn_n_s32 only supports shifts up to 16, we need - // 17. so do a non-rounding shift of 16 first then follow - // up with a rounding shift by 1. - dct_pass(vshrn_n_s32, 16); - - { - // pack and round - uint8x8_t p0 = vqrshrun_n_s16(row0, 1); - uint8x8_t p1 = vqrshrun_n_s16(row1, 1); - uint8x8_t p2 = vqrshrun_n_s16(row2, 1); - uint8x8_t p3 = vqrshrun_n_s16(row3, 1); - uint8x8_t p4 = vqrshrun_n_s16(row4, 1); - uint8x8_t p5 = vqrshrun_n_s16(row5, 1); - uint8x8_t p6 = vqrshrun_n_s16(row6, 1); - uint8x8_t p7 = vqrshrun_n_s16(row7, 1); - - // again, these can translate into one instruction, but often don't. -#define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -#define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -#define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } - - // sadly can't use interleaved stores here since we only write - // 8 bytes to each scan line! - - // 8x8 8-bit transpose pass 1 - dct_trn8_8(p0, p1); - dct_trn8_8(p2, p3); - dct_trn8_8(p4, p5); - dct_trn8_8(p6, p7); - - // pass 2 - dct_trn8_16(p0, p2); - dct_trn8_16(p1, p3); - dct_trn8_16(p4, p6); - dct_trn8_16(p5, p7); - - // pass 3 - dct_trn8_32(p0, p4); - dct_trn8_32(p1, p5); - dct_trn8_32(p2, p6); - dct_trn8_32(p3, p7); - - // store - vst1_u8(out, p0); out += out_stride; - vst1_u8(out, p1); out += out_stride; - vst1_u8(out, p2); out += out_stride; - vst1_u8(out, p3); out += out_stride; - vst1_u8(out, p4); out += out_stride; - vst1_u8(out, p5); out += out_stride; - vst1_u8(out, p6); out += out_stride; - vst1_u8(out, p7); - -#undef dct_trn8_8 -#undef dct_trn8_16 -#undef dct_trn8_32 - } - -#undef dct_long_mul -#undef dct_long_mac -#undef dct_widen -#undef dct_wadd -#undef dct_wsub -#undef dct_bfly32o -#undef dct_pass -} - -#endif // STBI_NEON - -#define STBI__MARKER_none 0xff -// if there's a pending marker from the entropy stream, return that -// otherwise, fetch from the stream and get a marker. if there's no -// marker, return 0xff, which is never a valid marker value -static stbi_uc stbi__get_marker(stbi__jpeg *j) -{ - stbi_uc x; - if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - x = stbi__get8(j->s); - if (x != 0xff) return STBI__MARKER_none; - while (x == 0xff) - x = stbi__get8(j->s); // consume repeated 0xff fill bytes - return x; -} - -// in each scan, we'll have scan_n components, and the order -// of the components is specified by order[] -#define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) - -// after a restart interval, stbi__jpeg_reset the entropy decoder and -// the dc prediction -static void stbi__jpeg_reset(stbi__jpeg *j) -{ - j->code_bits = 0; - j->code_buffer = 0; - j->nomore = 0; - j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - j->marker = STBI__MARKER_none; - j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - j->eob_run = 0; - // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, - // since we don't even allow 1<<30 pixels -} - -static int stbi__parse_entropy_coded_data(stbi__jpeg *z) -{ - stbi__jpeg_reset(z); - if (!z->progressive) { - if (z->scan_n == 1) { - int i,j; - STBI_SIMD_ALIGN(short, data[64]); - int n = z->order[0]; - // non-interleaved data, we just need to process one block at a time, - // in trivial scanline order - // number of blocks to do just depends on how many actual "pixels" this - // component has, independent of interleaved MCU blocking and such - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); - // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - // if it's NOT a restart, then just bail, so we get corrupt data - // rather than no data - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } else { // interleaved - int i,j,k,x,y; - STBI_SIMD_ALIGN(short, data[64]); - for (j=0; j < z->img_mcu_y; ++j) { - for (i=0; i < z->img_mcu_x; ++i) { - // scan an interleaved mcu... process scan_n components in order - for (k=0; k < z->scan_n; ++k) { - int n = z->order[k]; - // scan out an mcu's worth of this component; that's just determined - // by the basic H and V specified for the component - for (y=0; y < z->img_comp[n].v; ++y) { - for (x=0; x < z->img_comp[n].h; ++x) { - int x2 = (i*z->img_comp[n].h + x)*8; - int y2 = (j*z->img_comp[n].v + y)*8; - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data); - } - } - } - // after all interleaved components, that's an interleaved MCU, - // so now count down the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } - } else { - if (z->scan_n == 1) { - int i,j; - int n = z->order[0]; - // non-interleaved data, we just need to process one block at a time, - // in trivial scanline order - // number of blocks to do just depends on how many actual "pixels" this - // component has, independent of interleaved MCU blocking and such - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - if (z->spec_start == 0) { - if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - return 0; - } else { - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) - return 0; - } - // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } else { // interleaved - int i,j,k,x,y; - for (j=0; j < z->img_mcu_y; ++j) { - for (i=0; i < z->img_mcu_x; ++i) { - // scan an interleaved mcu... process scan_n components in order - for (k=0; k < z->scan_n; ++k) { - int n = z->order[k]; - // scan out an mcu's worth of this component; that's just determined - // by the basic H and V specified for the component - for (y=0; y < z->img_comp[n].v; ++y) { - for (x=0; x < z->img_comp[n].h; ++x) { - int x2 = (i*z->img_comp[n].h + x); - int y2 = (j*z->img_comp[n].v + y); - short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); - if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - return 0; - } - } - } - // after all interleaved components, that's an interleaved MCU, - // so now count down the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } - } -} - -static void stbi__jpeg_dequantize(short *data, stbi__uint16 *dequant) -{ - int i; - for (i=0; i < 64; ++i) - data[i] *= dequant[i]; -} - -static void stbi__jpeg_finish(stbi__jpeg *z) -{ - if (z->progressive) { - // dequantize and idct the data - int i,j,n; - for (n=0; n < z->s->img_n; ++n) { - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); - } - } - } - } -} - -static int stbi__process_marker(stbi__jpeg *z, int m) -{ - int L; - switch (m) { - case STBI__MARKER_none: // no marker found - return stbi__err("expected marker","Corrupt JPEG"); - - case 0xDD: // DRI - specify restart interval - if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG"); - z->restart_interval = stbi__get16be(z->s); - return 1; - - case 0xDB: // DQT - define quantization table - L = stbi__get16be(z->s)-2; - while (L > 0) { - int q = stbi__get8(z->s); - int p = q >> 4, sixteen = (p != 0); - int t = q & 15,i; - if (p != 0 && p != 1) return stbi__err("bad DQT type","Corrupt JPEG"); - if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG"); - - for (i=0; i < 64; ++i) - z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); - L -= (sixteen ? 129 : 65); - } - return L==0; - - case 0xC4: // DHT - define huffman table - L = stbi__get16be(z->s)-2; - while (L > 0) { - stbi_uc *v; - int sizes[16],i,n=0; - int q = stbi__get8(z->s); - int tc = q >> 4; - int th = q & 15; - if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG"); - for (i=0; i < 16; ++i) { - sizes[i] = stbi__get8(z->s); - n += sizes[i]; - } - if(n > 256) return stbi__err("bad DHT header","Corrupt JPEG"); // Loop over i < n would write past end of values! - L -= 17; - if (tc == 0) { - if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0; - v = z->huff_dc[th].values; - } else { - if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0; - v = z->huff_ac[th].values; - } - for (i=0; i < n; ++i) - v[i] = stbi__get8(z->s); - if (tc != 0) - stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); - L -= n; - } - return L==0; - } - - // check for comment block or APP blocks - if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { - L = stbi__get16be(z->s); - if (L < 2) { - if (m == 0xFE) - return stbi__err("bad COM len","Corrupt JPEG"); - else - return stbi__err("bad APP len","Corrupt JPEG"); - } - L -= 2; - - if (m == 0xE0 && L >= 5) { // JFIF APP0 segment - static const unsigned char tag[5] = {'J','F','I','F','\0'}; - int ok = 1; - int i; - for (i=0; i < 5; ++i) - if (stbi__get8(z->s) != tag[i]) - ok = 0; - L -= 5; - if (ok) - z->jfif = 1; - } else if (m == 0xEE && L >= 12) { // Adobe APP14 segment - static const unsigned char tag[6] = {'A','d','o','b','e','\0'}; - int ok = 1; - int i; - for (i=0; i < 6; ++i) - if (stbi__get8(z->s) != tag[i]) - ok = 0; - L -= 6; - if (ok) { - stbi__get8(z->s); // version - stbi__get16be(z->s); // flags0 - stbi__get16be(z->s); // flags1 - z->app14_color_transform = stbi__get8(z->s); // color transform - L -= 6; - } - } - - stbi__skip(z->s, L); - return 1; - } - - return stbi__err("unknown marker","Corrupt JPEG"); -} - -// after we see SOS -static int stbi__process_scan_header(stbi__jpeg *z) -{ - int i; - int Ls = stbi__get16be(z->s); - z->scan_n = stbi__get8(z->s); - if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); - if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); - for (i=0; i < z->scan_n; ++i) { - int id = stbi__get8(z->s), which; - int q = stbi__get8(z->s); - for (which = 0; which < z->s->img_n; ++which) - if (z->img_comp[which].id == id) - break; - if (which == z->s->img_n) return 0; // no match - z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); - z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); - z->order[i] = which; - } - - { - int aa; - z->spec_start = stbi__get8(z->s); - z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 - aa = stbi__get8(z->s); - z->succ_high = (aa >> 4); - z->succ_low = (aa & 15); - if (z->progressive) { - if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) - return stbi__err("bad SOS", "Corrupt JPEG"); - } else { - if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); - if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); - z->spec_end = 63; - } - } - - return 1; -} - -static int stbi__free_jpeg_components(stbi__jpeg *z, int ncomp, int why) -{ - int i; - for (i=0; i < ncomp; ++i) { - if (z->img_comp[i].raw_data) { - STBI_FREE(z->img_comp[i].raw_data); - z->img_comp[i].raw_data = NULL; - z->img_comp[i].data = NULL; - } - if (z->img_comp[i].raw_coeff) { - STBI_FREE(z->img_comp[i].raw_coeff); - z->img_comp[i].raw_coeff = 0; - z->img_comp[i].coeff = 0; - } - if (z->img_comp[i].linebuf) { - STBI_FREE(z->img_comp[i].linebuf); - z->img_comp[i].linebuf = NULL; - } - } - return why; -} - -static int stbi__process_frame_header(stbi__jpeg *z, int scan) -{ - stbi__context *s = z->s; - int Lf,p,i,q, h_max=1,v_max=1,c; - Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG - p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline - s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG - s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires - if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); - if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); - c = stbi__get8(s); - if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count","Corrupt JPEG"); - s->img_n = c; - for (i=0; i < c; ++i) { - z->img_comp[i].data = NULL; - z->img_comp[i].linebuf = NULL; - } - - if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG"); - - z->rgb = 0; - for (i=0; i < s->img_n; ++i) { - static const unsigned char rgb[3] = { 'R', 'G', 'B' }; - z->img_comp[i].id = stbi__get8(s); - if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) - ++z->rgb; - q = stbi__get8(s); - z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG"); - z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG"); - z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG"); - } - - if (scan != STBI__SCAN_load) return 1; - - if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); - - for (i=0; i < s->img_n; ++i) { - if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; - if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; - } - - // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios - // and I've never seen a non-corrupted JPEG file actually use them - for (i=0; i < s->img_n; ++i) { - if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H","Corrupt JPEG"); - if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V","Corrupt JPEG"); - } - - // compute interleaved mcu info - z->img_h_max = h_max; - z->img_v_max = v_max; - z->img_mcu_w = h_max * 8; - z->img_mcu_h = v_max * 8; - // these sizes can't be more than 17 bits - z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w; - z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h; - - for (i=0; i < s->img_n; ++i) { - // number of effective pixels (e.g. for non-interleaved MCU) - z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max; - z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max; - // to simplify generation, we'll allocate enough memory to decode - // the bogus oversized data from using interleaved MCUs and their - // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't - // discard the extra data until colorspace conversion - // - // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) - // so these muls can't overflow with 32-bit ints (which we require) - z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; - z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; - z->img_comp[i].coeff = 0; - z->img_comp[i].raw_coeff = 0; - z->img_comp[i].linebuf = NULL; - z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); - if (z->img_comp[i].raw_data == NULL) - return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); - // align blocks for idct using mmx/sse - z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15); - if (z->progressive) { - // w2, h2 are multiples of 8 (see above) - z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; - z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; - z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); - if (z->img_comp[i].raw_coeff == NULL) - return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); - z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15); - } - } - - return 1; -} - -// use comparisons since in some cases we handle more than one case (e.g. SOF) -#define stbi__DNL(x) ((x) == 0xdc) -#define stbi__SOI(x) ((x) == 0xd8) -#define stbi__EOI(x) ((x) == 0xd9) -#define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -#define stbi__SOS(x) ((x) == 0xda) - -#define stbi__SOF_progressive(x) ((x) == 0xc2) - -static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) -{ - int m; - z->jfif = 0; - z->app14_color_transform = -1; // valid values are 0,1,2 - z->marker = STBI__MARKER_none; // initialize cached marker to empty - m = stbi__get_marker(z); - if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG"); - if (scan == STBI__SCAN_type) return 1; - m = stbi__get_marker(z); - while (!stbi__SOF(m)) { - if (!stbi__process_marker(z,m)) return 0; - m = stbi__get_marker(z); - while (m == STBI__MARKER_none) { - // some files have extra padding after their blocks, so ok, we'll scan - if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); - m = stbi__get_marker(z); - } - } - z->progressive = stbi__SOF_progressive(m); - if (!stbi__process_frame_header(z, scan)) return 0; - return 1; -} - -static int stbi__skip_jpeg_junk_at_end(stbi__jpeg *j) -{ - // some JPEGs have junk at end, skip over it but if we find what looks - // like a valid marker, resume there - while (!stbi__at_eof(j->s)) { - int x = stbi__get8(j->s); - while (x == 255) { // might be a marker - if (stbi__at_eof(j->s)) return STBI__MARKER_none; - x = stbi__get8(j->s); - if (x != 0x00 && x != 0xff) { - // not a stuffed zero or lead-in to another marker, looks - // like an actual marker, return it - return x; - } - // stuffed zero has x=0 now which ends the loop, meaning we go - // back to regular scan loop. - // repeated 0xff keeps trying to read the next byte of the marker. - } - } - return STBI__MARKER_none; -} - -// decode image to YCbCr format -static int stbi__decode_jpeg_image(stbi__jpeg *j) -{ - int m; - for (m = 0; m < 4; m++) { - j->img_comp[m].raw_data = NULL; - j->img_comp[m].raw_coeff = NULL; - } - j->restart_interval = 0; - if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; - m = stbi__get_marker(j); - while (!stbi__EOI(m)) { - if (stbi__SOS(m)) { - if (!stbi__process_scan_header(j)) return 0; - if (!stbi__parse_entropy_coded_data(j)) return 0; - if (j->marker == STBI__MARKER_none ) { - j->marker = stbi__skip_jpeg_junk_at_end(j); - // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 - } - m = stbi__get_marker(j); - if (STBI__RESTART(m)) - m = stbi__get_marker(j); - } else if (stbi__DNL(m)) { - int Ld = stbi__get16be(j->s); - stbi__uint32 NL = stbi__get16be(j->s); - if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); - if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); - m = stbi__get_marker(j); - } else { - if (!stbi__process_marker(j, m)) return 1; - m = stbi__get_marker(j); - } - } - if (j->progressive) - stbi__jpeg_finish(j); - return 1; -} - -// static jfif-centered resampling (across block boundaries) - -typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1, - int w, int hs); - -#define stbi__div4(x) ((stbi_uc) ((x) >> 2)) - -static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - STBI_NOTUSED(out); - STBI_NOTUSED(in_far); - STBI_NOTUSED(w); - STBI_NOTUSED(hs); - return in_near; -} - -static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate two samples vertically for every one in input - int i; - STBI_NOTUSED(hs); - for (i=0; i < w; ++i) - out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2); - return out; -} - -static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate two samples horizontally for every one in input - int i; - stbi_uc *input = in_near; - - if (w == 1) { - // if only one sample, can't do any interpolation - out[0] = out[1] = input[0]; - return out; - } - - out[0] = input[0]; - out[1] = stbi__div4(input[0]*3 + input[1] + 2); - for (i=1; i < w-1; ++i) { - int n = 3*input[i]+2; - out[i*2+0] = stbi__div4(n+input[i-1]); - out[i*2+1] = stbi__div4(n+input[i+1]); - } - out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2); - out[i*2+1] = input[w-1]; - - STBI_NOTUSED(in_far); - STBI_NOTUSED(hs); - - return out; -} - -#define stbi__div16(x) ((stbi_uc) ((x) >> 4)) - -static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate 2x2 samples for every one in input - int i,t0,t1; - if (w == 1) { - out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); - return out; - } - - t1 = 3*in_near[0] + in_far[0]; - out[0] = stbi__div4(t1+2); - for (i=1; i < w; ++i) { - t0 = t1; - t1 = 3*in_near[i]+in_far[i]; - out[i*2-1] = stbi__div16(3*t0 + t1 + 8); - out[i*2 ] = stbi__div16(3*t1 + t0 + 8); - } - out[w*2-1] = stbi__div4(t1+2); - - STBI_NOTUSED(hs); - - return out; -} - -#if defined(STBI_SSE2) || defined(STBI_NEON) -static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate 2x2 samples for every one in input - int i=0,t0,t1; - - if (w == 1) { - out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); - return out; - } - - t1 = 3*in_near[0] + in_far[0]; - // process groups of 8 pixels for as long as we can. - // note we can't handle the last pixel in a row in this loop - // because we need to handle the filter boundary conditions. - for (; i < ((w-1) & ~7); i += 8) { -#if defined(STBI_SSE2) - // load and perform the vertical filtering pass - // this uses 3*x + y = 4*x + (y - x) - __m128i zero = _mm_setzero_si128(); - __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i)); - __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i)); - __m128i farw = _mm_unpacklo_epi8(farb, zero); - __m128i nearw = _mm_unpacklo_epi8(nearb, zero); - __m128i diff = _mm_sub_epi16(farw, nearw); - __m128i nears = _mm_slli_epi16(nearw, 2); - __m128i curr = _mm_add_epi16(nears, diff); // current row - - // horizontal filter works the same based on shifted vers of current - // row. "prev" is current row shifted right by 1 pixel; we need to - // insert the previous pixel value (from t1). - // "next" is current row shifted left by 1 pixel, with first pixel - // of next block of 8 pixels added in. - __m128i prv0 = _mm_slli_si128(curr, 2); - __m128i nxt0 = _mm_srli_si128(curr, 2); - __m128i prev = _mm_insert_epi16(prv0, t1, 0); - __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7); - - // horizontal filter, polyphase implementation since it's convenient: - // even pixels = 3*cur + prev = cur*4 + (prev - cur) - // odd pixels = 3*cur + next = cur*4 + (next - cur) - // note the shared term. - __m128i bias = _mm_set1_epi16(8); - __m128i curs = _mm_slli_epi16(curr, 2); - __m128i prvd = _mm_sub_epi16(prev, curr); - __m128i nxtd = _mm_sub_epi16(next, curr); - __m128i curb = _mm_add_epi16(curs, bias); - __m128i even = _mm_add_epi16(prvd, curb); - __m128i odd = _mm_add_epi16(nxtd, curb); - - // interleave even and odd pixels, then undo scaling. - __m128i int0 = _mm_unpacklo_epi16(even, odd); - __m128i int1 = _mm_unpackhi_epi16(even, odd); - __m128i de0 = _mm_srli_epi16(int0, 4); - __m128i de1 = _mm_srli_epi16(int1, 4); - - // pack and write output - __m128i outv = _mm_packus_epi16(de0, de1); - _mm_storeu_si128((__m128i *) (out + i*2), outv); -#elif defined(STBI_NEON) - // load and perform the vertical filtering pass - // this uses 3*x + y = 4*x + (y - x) - uint8x8_t farb = vld1_u8(in_far + i); - uint8x8_t nearb = vld1_u8(in_near + i); - int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); - int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); - int16x8_t curr = vaddq_s16(nears, diff); // current row - - // horizontal filter works the same based on shifted vers of current - // row. "prev" is current row shifted right by 1 pixel; we need to - // insert the previous pixel value (from t1). - // "next" is current row shifted left by 1 pixel, with first pixel - // of next block of 8 pixels added in. - int16x8_t prv0 = vextq_s16(curr, curr, 7); - int16x8_t nxt0 = vextq_s16(curr, curr, 1); - int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); - int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7); - - // horizontal filter, polyphase implementation since it's convenient: - // even pixels = 3*cur + prev = cur*4 + (prev - cur) - // odd pixels = 3*cur + next = cur*4 + (next - cur) - // note the shared term. - int16x8_t curs = vshlq_n_s16(curr, 2); - int16x8_t prvd = vsubq_s16(prev, curr); - int16x8_t nxtd = vsubq_s16(next, curr); - int16x8_t even = vaddq_s16(curs, prvd); - int16x8_t odd = vaddq_s16(curs, nxtd); - - // undo scaling and round, then store with even/odd phases interleaved - uint8x8x2_t o; - o.val[0] = vqrshrun_n_s16(even, 4); - o.val[1] = vqrshrun_n_s16(odd, 4); - vst2_u8(out + i*2, o); -#endif - - // "previous" value for next iter - t1 = 3*in_near[i+7] + in_far[i+7]; - } - - t0 = t1; - t1 = 3*in_near[i] + in_far[i]; - out[i*2] = stbi__div16(3*t1 + t0 + 8); - - for (++i; i < w; ++i) { - t0 = t1; - t1 = 3*in_near[i]+in_far[i]; - out[i*2-1] = stbi__div16(3*t0 + t1 + 8); - out[i*2 ] = stbi__div16(3*t1 + t0 + 8); - } - out[w*2-1] = stbi__div4(t1+2); - - STBI_NOTUSED(hs); - - return out; -} -#endif - -static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // resample with nearest-neighbor - int i,j; - STBI_NOTUSED(in_far); - for (i=0; i < w; ++i) - for (j=0; j < hs; ++j) - out[i*hs+j] = in_near[i]; - return out; -} - -// this is a reduced-precision calculation of YCbCr-to-RGB introduced -// to make sure the code produces the same results in both SIMD and scalar -#define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step) -{ - int i; - for (i=0; i < count; ++i) { - int y_fixed = (y[i] << 20) + (1<<19); // rounding - int r,g,b; - int cr = pcr[i] - 128; - int cb = pcb[i] - 128; - r = y_fixed + cr* stbi__float2fixed(1.40200f); - g = y_fixed + (cr*-stbi__float2fixed(0.71414f)) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); - b = y_fixed + cb* stbi__float2fixed(1.77200f); - r >>= 20; - g >>= 20; - b >>= 20; - if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } - if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } - if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } - out[0] = (stbi_uc)r; - out[1] = (stbi_uc)g; - out[2] = (stbi_uc)b; - out[3] = 255; - out += step; - } -} - -#if defined(STBI_SSE2) || defined(STBI_NEON) -static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step) -{ - int i = 0; - -#ifdef STBI_SSE2 - // step == 3 is pretty ugly on the final interleave, and i'm not convinced - // it's useful in practice (you wouldn't use it for textures, for example). - // so just accelerate step == 4 case. - if (step == 4) { - // this is a fairly straightforward implementation and not super-optimized. - __m128i signflip = _mm_set1_epi8(-0x80); - __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f)); - __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f)); - __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f)); - __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f)); - __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128); - __m128i xw = _mm_set1_epi16(255); // alpha channel - - for (; i+7 < count; i += 8) { - // load - __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i)); - __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i)); - __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i)); - __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 - __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 - - // unpack to short (and left-shift cr, cb by 8) - __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); - __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); - __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); - - // color transform - __m128i yws = _mm_srli_epi16(yw, 4); - __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); - __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); - __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); - __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); - __m128i rws = _mm_add_epi16(cr0, yws); - __m128i gwt = _mm_add_epi16(cb0, yws); - __m128i bws = _mm_add_epi16(yws, cb1); - __m128i gws = _mm_add_epi16(gwt, cr1); - - // descale - __m128i rw = _mm_srai_epi16(rws, 4); - __m128i bw = _mm_srai_epi16(bws, 4); - __m128i gw = _mm_srai_epi16(gws, 4); - - // back to byte, set up for transpose - __m128i brb = _mm_packus_epi16(rw, bw); - __m128i gxb = _mm_packus_epi16(gw, xw); - - // transpose to interleave channels - __m128i t0 = _mm_unpacklo_epi8(brb, gxb); - __m128i t1 = _mm_unpackhi_epi8(brb, gxb); - __m128i o0 = _mm_unpacklo_epi16(t0, t1); - __m128i o1 = _mm_unpackhi_epi16(t0, t1); - - // store - _mm_storeu_si128((__m128i *) (out + 0), o0); - _mm_storeu_si128((__m128i *) (out + 16), o1); - out += 32; - } - } -#endif - -#ifdef STBI_NEON - // in this version, step=3 support would be easy to add. but is there demand? - if (step == 4) { - // this is a fairly straightforward implementation and not super-optimized. - uint8x8_t signflip = vdup_n_u8(0x80); - int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f)); - int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f)); - int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f)); - int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f)); - - for (; i+7 < count; i += 8) { - // load - uint8x8_t y_bytes = vld1_u8(y + i); - uint8x8_t cr_bytes = vld1_u8(pcr + i); - uint8x8_t cb_bytes = vld1_u8(pcb + i); - int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); - int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); - - // expand to s16 - int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); - int16x8_t crw = vshll_n_s8(cr_biased, 7); - int16x8_t cbw = vshll_n_s8(cb_biased, 7); - - // color transform - int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); - int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); - int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); - int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); - int16x8_t rws = vaddq_s16(yws, cr0); - int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); - int16x8_t bws = vaddq_s16(yws, cb1); - - // undo scaling, round, convert to byte - uint8x8x4_t o; - o.val[0] = vqrshrun_n_s16(rws, 4); - o.val[1] = vqrshrun_n_s16(gws, 4); - o.val[2] = vqrshrun_n_s16(bws, 4); - o.val[3] = vdup_n_u8(255); - - // store, interleaving r/g/b/a - vst4_u8(out, o); - out += 8*4; - } - } -#endif - - for (; i < count; ++i) { - int y_fixed = (y[i] << 20) + (1<<19); // rounding - int r,g,b; - int cr = pcr[i] - 128; - int cb = pcb[i] - 128; - r = y_fixed + cr* stbi__float2fixed(1.40200f); - g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); - b = y_fixed + cb* stbi__float2fixed(1.77200f); - r >>= 20; - g >>= 20; - b >>= 20; - if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } - if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } - if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } - out[0] = (stbi_uc)r; - out[1] = (stbi_uc)g; - out[2] = (stbi_uc)b; - out[3] = 255; - out += step; - } -} -#endif - -// set up the kernels -static void stbi__setup_jpeg(stbi__jpeg *j) -{ - j->idct_block_kernel = stbi__idct_block; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - -#ifdef STBI_SSE2 - if (stbi__sse2_available()) { - j->idct_block_kernel = stbi__idct_simd; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - } -#endif - -#ifdef STBI_NEON - j->idct_block_kernel = stbi__idct_simd; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -#endif -} - -// clean up the temporary component buffers -static void stbi__cleanup_jpeg(stbi__jpeg *j) -{ - stbi__free_jpeg_components(j, j->s->img_n, 0); -} - -typedef struct -{ - resample_row_func resample; - stbi_uc *line0,*line1; - int hs,vs; // expansion factor in each axis - int w_lores; // horizontal pixels pre-expansion - int ystep; // how far through vertical expansion we are - int ypos; // which pre-expansion row we're on -} stbi__resample; - -// fast 0..255 * 0..255 => 0..255 rounded multiplication -static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -{ - unsigned int t = x*y + 128; - return (stbi_uc) ((t + (t >>8)) >> 8); -} - -static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp) -{ - int n, decode_n, is_rgb; - z->s->img_n = 0; // make stbi__cleanup_jpeg safe - - // validate req_comp - if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - - // load a jpeg image from whichever source, but leave in YCbCr format - if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } - - // determine actual number of components to generate - n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; - - is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); - - if (z->s->img_n == 3 && n < 3 && !is_rgb) - decode_n = 1; - else - decode_n = z->s->img_n; - - // nothing to do if no components requested; check this now to avoid - // accessing uninitialized coutput[0] later - if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } - - // resample and color-convert - { - int k; - unsigned int i,j; - stbi_uc *output; - stbi_uc *coutput[4] = { NULL, NULL, NULL, NULL }; - - stbi__resample res_comp[4]; - - for (k=0; k < decode_n; ++k) { - stbi__resample *r = &res_comp[k]; - - // allocate line buffer big enough for upsampling off the edges - // with upsample factor of 4 - z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3); - if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - r->hs = z->img_h_max / z->img_comp[k].h; - r->vs = z->img_v_max / z->img_comp[k].v; - r->ystep = r->vs >> 1; - r->w_lores = (z->s->img_x + r->hs-1) / r->hs; - r->ypos = 0; - r->line0 = r->line1 = z->img_comp[k].data; - - if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; - else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; - else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; - else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; - else r->resample = stbi__resample_row_generic; - } - - // can't error after this so, this is safe - output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); - if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - // now go ahead and resample - for (j=0; j < z->s->img_y; ++j) { - stbi_uc *out = output + n * z->s->img_x * j; - for (k=0; k < decode_n; ++k) { - stbi__resample *r = &res_comp[k]; - int y_bot = r->ystep >= (r->vs >> 1); - coutput[k] = r->resample(z->img_comp[k].linebuf, - y_bot ? r->line1 : r->line0, - y_bot ? r->line0 : r->line1, - r->w_lores, r->hs); - if (++r->ystep >= r->vs) { - r->ystep = 0; - r->line0 = r->line1; - if (++r->ypos < z->img_comp[k].y) - r->line1 += z->img_comp[k].w2; - } - } - if (n >= 3) { - stbi_uc *y = coutput[0]; - if (z->s->img_n == 3) { - if (is_rgb) { - for (i=0; i < z->s->img_x; ++i) { - out[0] = y[i]; - out[1] = coutput[1][i]; - out[2] = coutput[2][i]; - out[3] = 255; - out += n; - } - } else { - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - } - } else if (z->s->img_n == 4) { - if (z->app14_color_transform == 0) { // CMYK - for (i=0; i < z->s->img_x; ++i) { - stbi_uc m = coutput[3][i]; - out[0] = stbi__blinn_8x8(coutput[0][i], m); - out[1] = stbi__blinn_8x8(coutput[1][i], m); - out[2] = stbi__blinn_8x8(coutput[2][i], m); - out[3] = 255; - out += n; - } - } else if (z->app14_color_transform == 2) { // YCCK - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - for (i=0; i < z->s->img_x; ++i) { - stbi_uc m = coutput[3][i]; - out[0] = stbi__blinn_8x8(255 - out[0], m); - out[1] = stbi__blinn_8x8(255 - out[1], m); - out[2] = stbi__blinn_8x8(255 - out[2], m); - out += n; - } - } else { // YCbCr + alpha? Ignore the fourth channel for now - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - } - } else - for (i=0; i < z->s->img_x; ++i) { - out[0] = out[1] = out[2] = y[i]; - out[3] = 255; // not used if n==3 - out += n; - } - } else { - if (is_rgb) { - if (n == 1) - for (i=0; i < z->s->img_x; ++i) - *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - else { - for (i=0; i < z->s->img_x; ++i, out += 2) { - out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - out[1] = 255; - } - } - } else if (z->s->img_n == 4 && z->app14_color_transform == 0) { - for (i=0; i < z->s->img_x; ++i) { - stbi_uc m = coutput[3][i]; - stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); - stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); - stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); - out[0] = stbi__compute_y(r, g, b); - out[1] = 255; - out += n; - } - } else if (z->s->img_n == 4 && z->app14_color_transform == 2) { - for (i=0; i < z->s->img_x; ++i) { - out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); - out[1] = 255; - out += n; - } - } else { - stbi_uc *y = coutput[0]; - if (n == 1) - for (i=0; i < z->s->img_x; ++i) out[i] = y[i]; - else - for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } - } - } - } - stbi__cleanup_jpeg(z); - *out_x = z->s->img_x; - *out_y = z->s->img_y; - if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output - return output; - } -} - -static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - unsigned char* result; - stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg)); - if (!j) return stbi__errpuc("outofmem", "Out of memory"); - memset(j, 0, sizeof(stbi__jpeg)); - STBI_NOTUSED(ri); - j->s = s; - stbi__setup_jpeg(j); - result = load_jpeg_image(j, x,y,comp,req_comp); - STBI_FREE(j); - return result; -} - -static int stbi__jpeg_test(stbi__context *s) -{ - int r; - stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); - if (!j) return stbi__err("outofmem", "Out of memory"); - memset(j, 0, sizeof(stbi__jpeg)); - j->s = s; - stbi__setup_jpeg(j); - r = stbi__decode_jpeg_header(j, STBI__SCAN_type); - stbi__rewind(s); - STBI_FREE(j); - return r; -} - -static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) -{ - if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { - stbi__rewind( j->s ); - return 0; - } - if (x) *x = j->s->img_x; - if (y) *y = j->s->img_y; - if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; - return 1; -} - -static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) -{ - int result; - stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); - if (!j) return stbi__err("outofmem", "Out of memory"); - memset(j, 0, sizeof(stbi__jpeg)); - j->s = s; - result = stbi__jpeg_info_raw(j, x, y, comp); - STBI_FREE(j); - return result; -} -#endif - -// public domain zlib decode v0.2 Sean Barrett 2006-11-18 -// simple implementation -// - all input must be provided in an upfront buffer -// - all output is written to a single output buffer (can malloc/realloc) -// performance -// - fast huffman - -#ifndef STBI_NO_ZLIB - -// fast-way is faster to check than jpeg huffman, but slow way is slower -#define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -#define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -#define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet - -// zlib-style huffman encoding -// (jpegs packs from left, zlib from right, so can't share code) -typedef struct -{ - stbi__uint16 fast[1 << STBI__ZFAST_BITS]; - stbi__uint16 firstcode[16]; - int maxcode[17]; - stbi__uint16 firstsymbol[16]; - stbi_uc size[STBI__ZNSYMS]; - stbi__uint16 value[STBI__ZNSYMS]; -} stbi__zhuffman; - -stbi_inline static int stbi__bitreverse16(int n) -{ - n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - return n; -} - -stbi_inline static int stbi__bit_reverse(int v, int bits) -{ - STBI_ASSERT(bits <= 16); - // to bit reverse n bits, reverse 16 and shift - // e.g. 11 bits, bit reverse and shift away 5 - return stbi__bitreverse16(v) >> (16-bits); -} - -static int stbi__zbuild_huffman(stbi__zhuffman *z, const stbi_uc *sizelist, int num) -{ - int i,k=0; - int code, next_code[16], sizes[17]; - - // DEFLATE spec for generating codes - memset(sizes, 0, sizeof(sizes)); - memset(z->fast, 0, sizeof(z->fast)); - for (i=0; i < num; ++i) - ++sizes[sizelist[i]]; - sizes[0] = 0; - for (i=1; i < 16; ++i) - if (sizes[i] > (1 << i)) - return stbi__err("bad sizes", "Corrupt PNG"); - code = 0; - for (i=1; i < 16; ++i) { - next_code[i] = code; - z->firstcode[i] = (stbi__uint16) code; - z->firstsymbol[i] = (stbi__uint16) k; - code = (code + sizes[i]); - if (sizes[i]) - if (code-1 >= (1 << i)) return stbi__err("bad codelengths","Corrupt PNG"); - z->maxcode[i] = code << (16-i); // preshift for inner loop - code <<= 1; - k += sizes[i]; - } - z->maxcode[16] = 0x10000; // sentinel - for (i=0; i < num; ++i) { - int s = sizelist[i]; - if (s) { - int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; - stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i); - z->size [c] = (stbi_uc ) s; - z->value[c] = (stbi__uint16) i; - if (s <= STBI__ZFAST_BITS) { - int j = stbi__bit_reverse(next_code[s],s); - while (j < (1 << STBI__ZFAST_BITS)) { - z->fast[j] = fastv; - j += (1 << s); - } - } - ++next_code[s]; - } - } - return 1; -} - -// zlib-from-memory implementation for PNG reading -// because PNG allows splitting the zlib stream arbitrarily, -// and it's annoying structurally to have PNG call ZLIB call PNG, -// we require PNG read all the IDATs and combine them into a single -// memory buffer - -typedef struct -{ - stbi_uc *zbuffer, *zbuffer_end; - int num_bits; - stbi__uint32 code_buffer; - - char *zout; - char *zout_start; - char *zout_end; - int z_expandable; - - stbi__zhuffman z_length, z_distance; -} stbi__zbuf; - -stbi_inline static int stbi__zeof(stbi__zbuf *z) -{ - return (z->zbuffer >= z->zbuffer_end); -} - -stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z) -{ - return stbi__zeof(z) ? 0 : *z->zbuffer++; -} - -static void stbi__fill_bits(stbi__zbuf *z) -{ - do { - if (z->code_buffer >= (1U << z->num_bits)) { - z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - return; - } - z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits; - z->num_bits += 8; - } while (z->num_bits <= 24); -} - -stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n) -{ - unsigned int k; - if (z->num_bits < n) stbi__fill_bits(z); - k = z->code_buffer & ((1 << n) - 1); - z->code_buffer >>= n; - z->num_bits -= n; - return k; -} - -static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z) -{ - int b,s,k; - // not resolved by fast table, so compute it the slow way - // use jpeg approach, which requires MSbits at top - k = stbi__bit_reverse(a->code_buffer, 16); - for (s=STBI__ZFAST_BITS+1; ; ++s) - if (k < z->maxcode[s]) - break; - if (s >= 16) return -1; // invalid code! - // code size is s, so: - b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s]; - if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! - if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. - a->code_buffer >>= s; - a->num_bits -= s; - return z->value[b]; -} - -stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z) -{ - int b,s; - if (a->num_bits < 16) { - if (stbi__zeof(a)) { - return -1; /* report error for unexpected end of data. */ - } - stbi__fill_bits(a); - } - b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - if (b) { - s = b >> 9; - a->code_buffer >>= s; - a->num_bits -= s; - return b & 511; - } - return stbi__zhuffman_decode_slowpath(a, z); -} - -static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes -{ - char *q; - unsigned int cur, limit, old_limit; - z->zout = zout; - if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG"); - cur = (unsigned int) (z->zout - z->zout_start); - limit = old_limit = (unsigned) (z->zout_end - z->zout_start); - if (UINT_MAX - cur < (unsigned) n) return stbi__err("outofmem", "Out of memory"); - while (cur + n > limit) { - if(limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); - limit *= 2; - } - q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); - STBI_NOTUSED(old_limit); - if (q == NULL) return stbi__err("outofmem", "Out of memory"); - z->zout_start = q; - z->zout = q + cur; - z->zout_end = q + limit; - return 1; -} - -static const int stbi__zlength_base[31] = { - 3,4,5,6,7,8,9,10,11,13, - 15,17,19,23,27,31,35,43,51,59, - 67,83,99,115,131,163,195,227,258,0,0 }; - -static const int stbi__zlength_extra[31]= -{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; - -static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; - -static const int stbi__zdist_extra[32] = -{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; - -static int stbi__parse_huffman_block(stbi__zbuf *a) -{ - char *zout = a->zout; - for(;;) { - int z = stbi__zhuffman_decode(a, &a->z_length); - if (z < 256) { - if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes - if (zout >= a->zout_end) { - if (!stbi__zexpand(a, zout, 1)) return 0; - zout = a->zout; - } - *zout++ = (char) z; - } else { - stbi_uc *p; - int len,dist; - if (z == 256) { - a->zout = zout; - return 1; - } - if (z >= 286) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data - z -= 257; - len = stbi__zlength_base[z]; - if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - z = stbi__zhuffman_decode(a, &a->z_distance); - if (z < 0 || z >= 30) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data - dist = stbi__zdist_base[z]; - if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); - if (zout + len > a->zout_end) { - if (!stbi__zexpand(a, zout, len)) return 0; - zout = a->zout; - } - p = (stbi_uc *) (zout - dist); - if (dist == 1) { // run of one byte; common in images. - stbi_uc v = *p; - if (len) { do *zout++ = v; while (--len); } - } else { - if (len) { do *zout++ = *p++; while (--len); } - } - } - } -} - -static int stbi__compute_huffman_codes(stbi__zbuf *a) -{ - static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; - stbi__zhuffman z_codelength; - stbi_uc lencodes[286+32+137];//padding for maximum single op - stbi_uc codelength_sizes[19]; - int i,n; - - int hlit = stbi__zreceive(a,5) + 257; - int hdist = stbi__zreceive(a,5) + 1; - int hclen = stbi__zreceive(a,4) + 4; - int ntot = hlit + hdist; - - memset(codelength_sizes, 0, sizeof(codelength_sizes)); - for (i=0; i < hclen; ++i) { - int s = stbi__zreceive(a,3); - codelength_sizes[length_dezigzag[i]] = (stbi_uc) s; - } - if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; - - n = 0; - while (n < ntot) { - int c = stbi__zhuffman_decode(a, &z_codelength); - if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); - if (c < 16) - lencodes[n++] = (stbi_uc) c; - else { - stbi_uc fill = 0; - if (c == 16) { - c = stbi__zreceive(a,2)+3; - if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); - fill = lencodes[n-1]; - } else if (c == 17) { - c = stbi__zreceive(a,3)+3; - } else if (c == 18) { - c = stbi__zreceive(a,7)+11; - } else { - return stbi__err("bad codelengths", "Corrupt PNG"); - } - if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); - memset(lencodes+n, fill, c); - n += c; - } - } - if (n != ntot) return stbi__err("bad codelengths","Corrupt PNG"); - if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; - if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0; - return 1; -} - -static int stbi__parse_uncompressed_block(stbi__zbuf *a) -{ - stbi_uc header[4]; - int len,nlen,k; - if (a->num_bits & 7) - stbi__zreceive(a, a->num_bits & 7); // discard - // drain the bit-packed data into header - k = 0; - while (a->num_bits > 0) { - header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check - a->code_buffer >>= 8; - a->num_bits -= 8; - } - if (a->num_bits < 0) return stbi__err("zlib corrupt","Corrupt PNG"); - // now fill header the normal way - while (k < 4) - header[k++] = stbi__zget8(a); - len = header[1] * 256 + header[0]; - nlen = header[3] * 256 + header[2]; - if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG"); - if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG"); - if (a->zout + len > a->zout_end) - if (!stbi__zexpand(a, a->zout, len)) return 0; - memcpy(a->zout, a->zbuffer, len); - a->zbuffer += len; - a->zout += len; - return 1; -} - -static int stbi__parse_zlib_header(stbi__zbuf *a) -{ - int cmf = stbi__zget8(a); - int cm = cmf & 15; - /* int cinfo = cmf >> 4; */ - int flg = stbi__zget8(a); - if (stbi__zeof(a)) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec - if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec - if (flg & 32) return stbi__err("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png - if (cm != 8) return stbi__err("bad compression","Corrupt PNG"); // DEFLATE required for png - // window = 1 << (8 + cinfo)... but who cares, we fully buffer output - return 1; -} - -static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -{ - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -}; -static const stbi_uc stbi__zdefault_distance[32] = -{ - 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -}; -/* -Init algorithm: -{ - int i; // use <= to match clearly with spec - for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; - for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; - for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; - for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; - - for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -} -*/ - -static int stbi__parse_zlib(stbi__zbuf *a, int parse_header) -{ - int final, type; - if (parse_header) - if (!stbi__parse_zlib_header(a)) return 0; - a->num_bits = 0; - a->code_buffer = 0; - do { - final = stbi__zreceive(a,1); - type = stbi__zreceive(a,2); - if (type == 0) { - if (!stbi__parse_uncompressed_block(a)) return 0; - } else if (type == 3) { - return 0; - } else { - if (type == 1) { - // use fixed code lengths - if (!stbi__zbuild_huffman(&a->z_length , stbi__zdefault_length , STBI__ZNSYMS)) return 0; - if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; - } else { - if (!stbi__compute_huffman_codes(a)) return 0; - } - if (!stbi__parse_huffman_block(a)) return 0; - } - } while (!final); - return 1; -} - -static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header) -{ - a->zout_start = obuf; - a->zout = obuf; - a->zout_end = obuf + olen; - a->z_expandable = exp; - - return stbi__parse_zlib(a, parse_header); -} - -STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(initial_size); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer + len; - if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen) -{ - return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -} - -STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(initial_size); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer + len; - if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen) -{ - stbi__zbuf a; - a.zbuffer = (stbi_uc *) ibuffer; - a.zbuffer_end = (stbi_uc *) ibuffer + ilen; - if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) - return (int) (a.zout - a.zout_start); - else - return -1; -} - -STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(16384); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer+len; - if (stbi__do_zlib(&a, p, 16384, 1, 0)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) -{ - stbi__zbuf a; - a.zbuffer = (stbi_uc *) ibuffer; - a.zbuffer_end = (stbi_uc *) ibuffer + ilen; - if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) - return (int) (a.zout - a.zout_start); - else - return -1; -} -#endif - -// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -// simple implementation -// - only 8-bit samples -// - no CRC checking -// - allocates lots of intermediate memory -// - avoids problem of streaming data between subsystems -// - avoids explicit window management -// performance -// - uses stb_zlib, a PD zlib implementation with fast huffman decoding - -#ifndef STBI_NO_PNG -typedef struct -{ - stbi__uint32 length; - stbi__uint32 type; -} stbi__pngchunk; - -static stbi__pngchunk stbi__get_chunk_header(stbi__context *s) -{ - stbi__pngchunk c; - c.length = stbi__get32be(s); - c.type = stbi__get32be(s); - return c; -} - -static int stbi__check_png_header(stbi__context *s) -{ - static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; - int i; - for (i=0; i < 8; ++i) - if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG"); - return 1; -} - -typedef struct -{ - stbi__context *s; - stbi_uc *idata, *expanded, *out; - int depth; -} stbi__png; - - -enum { - STBI__F_none=0, - STBI__F_sub=1, - STBI__F_up=2, - STBI__F_avg=3, - STBI__F_paeth=4, - // synthetic filters used for first scanline to avoid needing a dummy row of 0s - STBI__F_avg_first, - STBI__F_paeth_first -}; - -static stbi_uc first_row_filter[5] = -{ - STBI__F_none, - STBI__F_sub, - STBI__F_none, - STBI__F_avg_first, - STBI__F_paeth_first -}; - -static int stbi__paeth(int a, int b, int c) -{ - int p = a + b - c; - int pa = abs(p-a); - int pb = abs(p-b); - int pc = abs(p-c); - if (pa <= pb && pa <= pc) return a; - if (pb <= pc) return b; - return c; -} - -static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; - -// create the png data from post-deflated data -static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -{ - int bytes = (depth == 16? 2 : 1); - stbi__context *s = a->s; - stbi__uint32 i,j,stride = x*out_n*bytes; - stbi__uint32 img_len, img_width_bytes; - int k; - int img_n = s->img_n; // copy it into a local for later - - int output_bytes = out_n*bytes; - int filter_bytes = img_n*bytes; - int width = x; - - STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1); - a->out = (stbi_uc *) stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into - if (!a->out) return stbi__err("outofmem", "Out of memory"); - - if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); - img_width_bytes = (((img_n * x * depth) + 7) >> 3); - img_len = (img_width_bytes + 1) * y; - - // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, - // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), - // so just check for raw_len < img_len always. - if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG"); - - for (j=0; j < y; ++j) { - stbi_uc *cur = a->out + stride*j; - stbi_uc *prior; - int filter = *raw++; - - if (filter > 4) - return stbi__err("invalid filter","Corrupt PNG"); - - if (depth < 8) { - if (img_width_bytes > x) return stbi__err("invalid width","Corrupt PNG"); - cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place - filter_bytes = 1; - width = img_width_bytes; - } - prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above - - // if first row, use special filter that doesn't sample previous row - if (j == 0) filter = first_row_filter[filter]; - - // handle first byte explicitly - for (k=0; k < filter_bytes; ++k) { - switch (filter) { - case STBI__F_none : cur[k] = raw[k]; break; - case STBI__F_sub : cur[k] = raw[k]; break; - case STBI__F_up : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; - case STBI__F_avg : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break; - case STBI__F_paeth : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break; - case STBI__F_avg_first : cur[k] = raw[k]; break; - case STBI__F_paeth_first: cur[k] = raw[k]; break; - } - } - - if (depth == 8) { - if (img_n != out_n) - cur[img_n] = 255; // first pixel - raw += img_n; - cur += out_n; - prior += out_n; - } else if (depth == 16) { - if (img_n != out_n) { - cur[filter_bytes] = 255; // first pixel top byte - cur[filter_bytes+1] = 255; // first pixel bottom byte - } - raw += filter_bytes; - cur += output_bytes; - prior += output_bytes; - } else { - raw += 1; - cur += 1; - prior += 1; - } - - // this is a little gross, so that we don't switch per-pixel or per-component - if (depth < 8 || img_n == out_n) { - int nk = (width - 1)*filter_bytes; - #define STBI__CASE(f) \ - case f: \ - for (k=0; k < nk; ++k) - switch (filter) { - // "none" filter turns into a memcpy here; make that explicit. - case STBI__F_none: memcpy(cur, raw, nk); break; - STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break; - STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break; - STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break; - STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break; - STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break; - } - #undef STBI__CASE - raw += nk; - } else { - STBI_ASSERT(img_n+1 == out_n); - #define STBI__CASE(f) \ - case f: \ - for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ - for (k=0; k < filter_bytes; ++k) - switch (filter) { - STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; - STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break; - STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break; - STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break; - STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break; - STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break; - } - #undef STBI__CASE - - // the loop above sets the high byte of the pixels' alpha, but for - // 16 bit png files we also need the low byte set. we'll do that here. - if (depth == 16) { - cur = a->out + stride*j; // start at the beginning of the row again - for (i=0; i < x; ++i,cur+=output_bytes) { - cur[filter_bytes+1] = 255; - } - } - } - } - - // we make a separate pass to expand bits to pixels; for performance, - // this could run two scanlines behind the above code, so it won't - // intefere with filtering but will still be in the cache. - if (depth < 8) { - for (j=0; j < y; ++j) { - stbi_uc *cur = a->out + stride*j; - stbi_uc *in = a->out + stride*j + x*out_n - img_width_bytes; - // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit - // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop - stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range - - // note that the final byte might overshoot and write more data than desired. - // we can allocate enough data that this never writes out of memory, but it - // could also overwrite the next scanline. can it overwrite non-empty data - // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. - // so we need to explicitly clamp the final ones - - if (depth == 4) { - for (k=x*img_n; k >= 2; k-=2, ++in) { - *cur++ = scale * ((*in >> 4) ); - *cur++ = scale * ((*in ) & 0x0f); - } - if (k > 0) *cur++ = scale * ((*in >> 4) ); - } else if (depth == 2) { - for (k=x*img_n; k >= 4; k-=4, ++in) { - *cur++ = scale * ((*in >> 6) ); - *cur++ = scale * ((*in >> 4) & 0x03); - *cur++ = scale * ((*in >> 2) & 0x03); - *cur++ = scale * ((*in ) & 0x03); - } - if (k > 0) *cur++ = scale * ((*in >> 6) ); - if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); - if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); - } else if (depth == 1) { - for (k=x*img_n; k >= 8; k-=8, ++in) { - *cur++ = scale * ((*in >> 7) ); - *cur++ = scale * ((*in >> 6) & 0x01); - *cur++ = scale * ((*in >> 5) & 0x01); - *cur++ = scale * ((*in >> 4) & 0x01); - *cur++ = scale * ((*in >> 3) & 0x01); - *cur++ = scale * ((*in >> 2) & 0x01); - *cur++ = scale * ((*in >> 1) & 0x01); - *cur++ = scale * ((*in ) & 0x01); - } - if (k > 0) *cur++ = scale * ((*in >> 7) ); - if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); - if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); - if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); - if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); - if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); - if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); - } - if (img_n != out_n) { - int q; - // insert alpha = 255 - cur = a->out + stride*j; - if (img_n == 1) { - for (q=x-1; q >= 0; --q) { - cur[q*2+1] = 255; - cur[q*2+0] = cur[q]; - } - } else { - STBI_ASSERT(img_n == 3); - for (q=x-1; q >= 0; --q) { - cur[q*4+3] = 255; - cur[q*4+2] = cur[q*3+2]; - cur[q*4+1] = cur[q*3+1]; - cur[q*4+0] = cur[q*3+0]; - } - } - } - } - } else if (depth == 16) { - // force the image data from big-endian to platform-native. - // this is done in a separate pass due to the decoding relying - // on the data being untouched, but could probably be done - // per-line during decode if care is taken. - stbi_uc *cur = a->out; - stbi__uint16 *cur16 = (stbi__uint16*)cur; - - for(i=0; i < x*y*out_n; ++i,cur16++,cur+=2) { - *cur16 = (cur[0] << 8) | cur[1]; - } - } - - return 1; -} - -static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -{ - int bytes = (depth == 16 ? 2 : 1); - int out_bytes = out_n * bytes; - stbi_uc *final; - int p; - if (!interlaced) - return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); - - // de-interlacing - final = (stbi_uc *) stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); - if (!final) return stbi__err("outofmem", "Out of memory"); - for (p=0; p < 7; ++p) { - int xorig[] = { 0,4,0,2,0,1,0 }; - int yorig[] = { 0,0,4,0,2,0,1 }; - int xspc[] = { 8,8,4,4,2,2,1 }; - int yspc[] = { 8,8,8,4,4,2,2 }; - int i,j,x,y; - // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 - x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p]; - y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p]; - if (x && y) { - stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; - if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { - STBI_FREE(final); - return 0; - } - for (j=0; j < y; ++j) { - for (i=0; i < x; ++i) { - int out_y = j*yspc[p]+yorig[p]; - int out_x = i*xspc[p]+xorig[p]; - memcpy(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes, - a->out + (j*x+i)*out_bytes, out_bytes); - } - } - STBI_FREE(a->out); - image_data += img_len; - image_data_len -= img_len; - } - } - a->out = final; - - return 1; -} - -static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi_uc *p = z->out; - - // compute color-based transparency, assuming we've - // already got 255 as the alpha value in the output - STBI_ASSERT(out_n == 2 || out_n == 4); - - if (out_n == 2) { - for (i=0; i < pixel_count; ++i) { - p[1] = (p[0] == tc[0] ? 0 : 255); - p += 2; - } - } else { - for (i=0; i < pixel_count; ++i) { - if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - p[3] = 0; - p += 4; - } - } - return 1; -} - -static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi__uint16 *p = (stbi__uint16*) z->out; - - // compute color-based transparency, assuming we've - // already got 65535 as the alpha value in the output - STBI_ASSERT(out_n == 2 || out_n == 4); - - if (out_n == 2) { - for (i = 0; i < pixel_count; ++i) { - p[1] = (p[0] == tc[0] ? 0 : 65535); - p += 2; - } - } else { - for (i = 0; i < pixel_count; ++i) { - if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - p[3] = 0; - p += 4; - } - } - return 1; -} - -static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n) -{ - stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; - stbi_uc *p, *temp_out, *orig = a->out; - - p = (stbi_uc *) stbi__malloc_mad2(pixel_count, pal_img_n, 0); - if (p == NULL) return stbi__err("outofmem", "Out of memory"); - - // between here and free(out) below, exitting would leak - temp_out = p; - - if (pal_img_n == 3) { - for (i=0; i < pixel_count; ++i) { - int n = orig[i]*4; - p[0] = palette[n ]; - p[1] = palette[n+1]; - p[2] = palette[n+2]; - p += 3; - } - } else { - for (i=0; i < pixel_count; ++i) { - int n = orig[i]*4; - p[0] = palette[n ]; - p[1] = palette[n+1]; - p[2] = palette[n+2]; - p[3] = palette[n+3]; - p += 4; - } - } - STBI_FREE(a->out); - a->out = temp_out; - - STBI_NOTUSED(len); - - return 1; -} - -static int stbi__unpremultiply_on_load_global = 0; -static int stbi__de_iphone_flag_global = 0; - -STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -{ - stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -} - -STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -{ - stbi__de_iphone_flag_global = flag_true_if_should_convert; -} - -#ifndef STBI_THREAD_LOCAL -#define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -#define stbi__de_iphone_flag stbi__de_iphone_flag_global -#else -static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; - -STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -{ - stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; - stbi__unpremultiply_on_load_set = 1; -} - -STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -{ - stbi__de_iphone_flag_local = flag_true_if_should_convert; - stbi__de_iphone_flag_set = 1; -} - -#define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ - ? stbi__unpremultiply_on_load_local \ - : stbi__unpremultiply_on_load_global) -#define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ - ? stbi__de_iphone_flag_local \ - : stbi__de_iphone_flag_global) -#endif // STBI_THREAD_LOCAL - -static void stbi__de_iphone(stbi__png *z) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi_uc *p = z->out; - - if (s->img_out_n == 3) { // convert bgr to rgb - for (i=0; i < pixel_count; ++i) { - stbi_uc t = p[0]; - p[0] = p[2]; - p[2] = t; - p += 3; - } - } else { - STBI_ASSERT(s->img_out_n == 4); - if (stbi__unpremultiply_on_load) { - // convert bgr to rgb and unpremultiply - for (i=0; i < pixel_count; ++i) { - stbi_uc a = p[3]; - stbi_uc t = p[0]; - if (a) { - stbi_uc half = a / 2; - p[0] = (p[2] * 255 + half) / a; - p[1] = (p[1] * 255 + half) / a; - p[2] = ( t * 255 + half) / a; - } else { - p[0] = p[2]; - p[2] = t; - } - p += 4; - } - } else { - // convert bgr to rgb - for (i=0; i < pixel_count; ++i) { - stbi_uc t = p[0]; - p[0] = p[2]; - p[2] = t; - p += 4; - } - } - } -} - -#define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) - -static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) -{ - stbi_uc palette[1024], pal_img_n=0; - stbi_uc has_trans=0, tc[3]={0}; - stbi__uint16 tc16[3]; - stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0; - int first=1,k,interlace=0, color=0, is_iphone=0; - stbi__context *s = z->s; - - z->expanded = NULL; - z->idata = NULL; - z->out = NULL; - - if (!stbi__check_png_header(s)) return 0; - - if (scan == STBI__SCAN_type) return 1; - - for (;;) { - stbi__pngchunk c = stbi__get_chunk_header(s); - switch (c.type) { - case STBI__PNG_TYPE('C','g','B','I'): - is_iphone = 1; - stbi__skip(s, c.length); - break; - case STBI__PNG_TYPE('I','H','D','R'): { - int comp,filter; - if (!first) return stbi__err("multiple IHDR","Corrupt PNG"); - first = 0; - if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG"); - s->img_x = stbi__get32be(s); - s->img_y = stbi__get32be(s); - if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); - if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); - z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only"); - color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG"); - if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG"); - if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG"); - comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG"); - filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG"); - interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG"); - if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG"); - if (!pal_img_n) { - s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); - if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); - } else { - // if paletted, then pal_n is our final components, and - // img_n is # components to decompress/filter. - s->img_n = 1; - if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG"); - } - // even with SCAN_header, have to scan to see if we have a tRNS - break; - } - - case STBI__PNG_TYPE('P','L','T','E'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG"); - pal_len = c.length / 3; - if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG"); - for (i=0; i < pal_len; ++i) { - palette[i*4+0] = stbi__get8(s); - palette[i*4+1] = stbi__get8(s); - palette[i*4+2] = stbi__get8(s); - palette[i*4+3] = 255; - } - break; - } - - case STBI__PNG_TYPE('t','R','N','S'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG"); - if (pal_img_n) { - if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } - if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG"); - if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG"); - pal_img_n = 4; - for (i=0; i < c.length; ++i) - palette[i*4+3] = stbi__get8(s); - } else { - if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); - if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); - has_trans = 1; - // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. - if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } - if (z->depth == 16) { - for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is - } else { - for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger - } - } - break; - } - - case STBI__PNG_TYPE('I','D','A','T'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG"); - if (scan == STBI__SCAN_header) { - // header scan definitely stops at first IDAT - if (pal_img_n) - s->img_n = pal_img_n; - return 1; - } - if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); - if ((int)(ioff + c.length) < (int)ioff) return 0; - if (ioff + c.length > idata_limit) { - stbi__uint32 idata_limit_old = idata_limit; - stbi_uc *p; - if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; - while (ioff + c.length > idata_limit) - idata_limit *= 2; - STBI_NOTUSED(idata_limit_old); - p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); - z->idata = p; - } - if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG"); - ioff += c.length; - break; - } - - case STBI__PNG_TYPE('I','E','N','D'): { - stbi__uint32 raw_len, bpl; - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (scan != STBI__SCAN_load) return 1; - if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG"); - // initial guess for decoded data size to avoid unnecessary reallocs - bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component - raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; - z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone); - if (z->expanded == NULL) return 0; // zlib should set error - STBI_FREE(z->idata); z->idata = NULL; - if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans) - s->img_out_n = s->img_n+1; - else - s->img_out_n = s->img_n; - if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; - if (has_trans) { - if (z->depth == 16) { - if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; - } else { - if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; - } - } - if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) - stbi__de_iphone(z); - if (pal_img_n) { - // pal_img_n == 3 or 4 - s->img_n = pal_img_n; // record the actual colors we had - s->img_out_n = pal_img_n; - if (req_comp >= 3) s->img_out_n = req_comp; - if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) - return 0; - } else if (has_trans) { - // non-paletted image with tRNS -> source image has (constant) alpha - ++s->img_n; - } - STBI_FREE(z->expanded); z->expanded = NULL; - // end of PNG chunk, read and skip CRC - stbi__get32be(s); - return 1; - } - - default: - // if critical, fail - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if ((c.type & (1 << 29)) == 0) { - #ifndef STBI_NO_FAILURE_STRINGS - // not threadsafe - static char invalid_chunk[] = "XXXX PNG chunk not known"; - invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); - invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); - invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); - invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); - #endif - return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); - } - stbi__skip(s, c.length); - break; - } - // end of PNG chunk, read and skip CRC - stbi__get32be(s); - } -} - -static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp, stbi__result_info *ri) -{ - void *result=NULL; - if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { - if (p->depth <= 8) - ri->bits_per_channel = 8; - else if (p->depth == 16) - ri->bits_per_channel = 16; - else - return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); - result = p->out; - p->out = NULL; - if (req_comp && req_comp != p->s->img_out_n) { - if (ri->bits_per_channel == 8) - result = stbi__convert_format((unsigned char *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - else - result = stbi__convert_format16((stbi__uint16 *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - p->s->img_out_n = req_comp; - if (result == NULL) return result; - } - *x = p->s->img_x; - *y = p->s->img_y; - if (n) *n = p->s->img_n; - } - STBI_FREE(p->out); p->out = NULL; - STBI_FREE(p->expanded); p->expanded = NULL; - STBI_FREE(p->idata); p->idata = NULL; - - return result; -} - -static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi__png p; - p.s = s; - return stbi__do_png(&p, x,y,comp,req_comp, ri); -} - -static int stbi__png_test(stbi__context *s) -{ - int r; - r = stbi__check_png_header(s); - stbi__rewind(s); - return r; -} - -static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp) -{ - if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { - stbi__rewind( p->s ); - return 0; - } - if (x) *x = p->s->img_x; - if (y) *y = p->s->img_y; - if (comp) *comp = p->s->img_n; - return 1; -} - -static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) -{ - stbi__png p; - p.s = s; - return stbi__png_info_raw(&p, x, y, comp); -} - -static int stbi__png_is16(stbi__context *s) -{ - stbi__png p; - p.s = s; - if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) - return 0; - if (p.depth != 16) { - stbi__rewind(p.s); - return 0; - } - return 1; -} -#endif - -// Microsoft/Windows BMP image - -#ifndef STBI_NO_BMP -static int stbi__bmp_test_raw(stbi__context *s) -{ - int r; - int sz; - if (stbi__get8(s) != 'B') return 0; - if (stbi__get8(s) != 'M') return 0; - stbi__get32le(s); // discard filesize - stbi__get16le(s); // discard reserved - stbi__get16le(s); // discard reserved - stbi__get32le(s); // discard data offset - sz = stbi__get32le(s); - r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); - return r; -} - -static int stbi__bmp_test(stbi__context *s) -{ - int r = stbi__bmp_test_raw(s); - stbi__rewind(s); - return r; -} - - -// returns 0..31 for the highest set bit -static int stbi__high_bit(unsigned int z) -{ - int n=0; - if (z == 0) return -1; - if (z >= 0x10000) { n += 16; z >>= 16; } - if (z >= 0x00100) { n += 8; z >>= 8; } - if (z >= 0x00010) { n += 4; z >>= 4; } - if (z >= 0x00004) { n += 2; z >>= 2; } - if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - return n; -} - -static int stbi__bitcount(unsigned int a) -{ - a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - a = (a + (a >> 8)); // max 16 per 8 bits - a = (a + (a >> 16)); // max 32 per 8 bits - return a & 0xff; -} - -// extract an arbitrarily-aligned N-bit value (N=bits) -// from v, and then make it 8-bits long and fractionally -// extend it to full full range. -static int stbi__shiftsigned(unsigned int v, int shift, int bits) -{ - static unsigned int mul_table[9] = { - 0, - 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, - 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, - }; - static unsigned int shift_table[9] = { - 0, 0,0,1,0,2,4,6,0, - }; - if (shift < 0) - v <<= -shift; - else - v >>= shift; - STBI_ASSERT(v < 256); - v >>= (8-bits); - STBI_ASSERT(bits >= 0 && bits <= 8); - return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits]; -} - -typedef struct -{ - int bpp, offset, hsz; - unsigned int mr,mg,mb,ma, all_a; - int extra_read; -} stbi__bmp_data; - -static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress) -{ - // BI_BITFIELDS specifies masks explicitly, don't override - if (compress == 3) - return 1; - - if (compress == 0) { - if (info->bpp == 16) { - info->mr = 31u << 10; - info->mg = 31u << 5; - info->mb = 31u << 0; - } else if (info->bpp == 32) { - info->mr = 0xffu << 16; - info->mg = 0xffu << 8; - info->mb = 0xffu << 0; - info->ma = 0xffu << 24; - info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 - } else { - // otherwise, use defaults, which is all-0 - info->mr = info->mg = info->mb = info->ma = 0; - } - return 1; - } - return 0; // error -} - -static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info) -{ - int hsz; - if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - stbi__get32le(s); // discard filesize - stbi__get16le(s); // discard reserved - stbi__get16le(s); // discard reserved - info->offset = stbi__get32le(s); - info->hsz = hsz = stbi__get32le(s); - info->mr = info->mg = info->mb = info->ma = 0; - info->extra_read = 14; - - if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); - - if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); - if (hsz == 12) { - s->img_x = stbi__get16le(s); - s->img_y = stbi__get16le(s); - } else { - s->img_x = stbi__get32le(s); - s->img_y = stbi__get32le(s); - } - if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); - info->bpp = stbi__get16le(s); - if (hsz != 12) { - int compress = stbi__get32le(s); - if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); - if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes - if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel - stbi__get32le(s); // discard sizeof - stbi__get32le(s); // discard hres - stbi__get32le(s); // discard vres - stbi__get32le(s); // discard colorsused - stbi__get32le(s); // discard max important - if (hsz == 40 || hsz == 56) { - if (hsz == 56) { - stbi__get32le(s); - stbi__get32le(s); - stbi__get32le(s); - stbi__get32le(s); - } - if (info->bpp == 16 || info->bpp == 32) { - if (compress == 0) { - stbi__bmp_set_mask_defaults(info, compress); - } else if (compress == 3) { - info->mr = stbi__get32le(s); - info->mg = stbi__get32le(s); - info->mb = stbi__get32le(s); - info->extra_read += 12; - // not documented, but generated by photoshop and handled by mspaint - if (info->mr == info->mg && info->mg == info->mb) { - // ?!?!? - return stbi__errpuc("bad BMP", "bad BMP"); - } - } else - return stbi__errpuc("bad BMP", "bad BMP"); - } - } else { - // V4/V5 header - int i; - if (hsz != 108 && hsz != 124) - return stbi__errpuc("bad BMP", "bad BMP"); - info->mr = stbi__get32le(s); - info->mg = stbi__get32le(s); - info->mb = stbi__get32le(s); - info->ma = stbi__get32le(s); - if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs - stbi__bmp_set_mask_defaults(info, compress); - stbi__get32le(s); // discard color space - for (i=0; i < 12; ++i) - stbi__get32le(s); // discard color space parameters - if (hsz == 124) { - stbi__get32le(s); // discard rendering intent - stbi__get32le(s); // discard offset of profile data - stbi__get32le(s); // discard size of profile data - stbi__get32le(s); // discard reserved - } - } - } - return (void *) 1; -} - - -static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi_uc *out; - unsigned int mr=0,mg=0,mb=0,ma=0, all_a; - stbi_uc pal[256][4]; - int psize=0,i,j,width; - int flip_vertically, pad, target; - stbi__bmp_data info; - STBI_NOTUSED(ri); - - info.all_a = 255; - if (stbi__bmp_parse_header(s, &info) == NULL) - return NULL; // error code already set - - flip_vertically = ((int) s->img_y) > 0; - s->img_y = abs((int) s->img_y); - - if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - - mr = info.mr; - mg = info.mg; - mb = info.mb; - ma = info.ma; - all_a = info.all_a; - - if (info.hsz == 12) { - if (info.bpp < 24) - psize = (info.offset - info.extra_read - 24) / 3; - } else { - if (info.bpp < 16) - psize = (info.offset - info.extra_read - info.hsz) >> 2; - } - if (psize == 0) { - // accept some number of extra bytes after the header, but if the offset points either to before - // the header ends or implies a large amount of extra data, reject the file as malformed - int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); - int header_limit = 1024; // max we actually read is below 256 bytes currently. - int extra_data_limit = 256*4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. - if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { - return stbi__errpuc("bad header", "Corrupt BMP"); - } - // we established that bytes_read_so_far is positive and sensible. - // the first half of this test rejects offsets that are either too small positives, or - // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn - // ensures the number computed in the second half of the test can't overflow. - if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { - return stbi__errpuc("bad offset", "Corrupt BMP"); - } else { - stbi__skip(s, info.offset - bytes_read_so_far); - } - } - - if (info.bpp == 24 && ma == 0xff000000) - s->img_n = 3; - else - s->img_n = ma ? 4 : 3; - if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 - target = req_comp; - else - target = s->img_n; // if they want monochrome, we'll post-convert - - // sanity-check size - if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) - return stbi__errpuc("too large", "Corrupt BMP"); - - out = (stbi_uc *) stbi__malloc_mad3(target, s->img_x, s->img_y, 0); - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - if (info.bpp < 16) { - int z=0; - if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } - for (i=0; i < psize; ++i) { - pal[i][2] = stbi__get8(s); - pal[i][1] = stbi__get8(s); - pal[i][0] = stbi__get8(s); - if (info.hsz != 12) stbi__get8(s); - pal[i][3] = 255; - } - stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); - if (info.bpp == 1) width = (s->img_x + 7) >> 3; - else if (info.bpp == 4) width = (s->img_x + 1) >> 1; - else if (info.bpp == 8) width = s->img_x; - else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } - pad = (-width)&3; - if (info.bpp == 1) { - for (j=0; j < (int) s->img_y; ++j) { - int bit_offset = 7, v = stbi__get8(s); - for (i=0; i < (int) s->img_x; ++i) { - int color = (v>>bit_offset)&0x1; - out[z++] = pal[color][0]; - out[z++] = pal[color][1]; - out[z++] = pal[color][2]; - if (target == 4) out[z++] = 255; - if (i+1 == (int) s->img_x) break; - if((--bit_offset) < 0) { - bit_offset = 7; - v = stbi__get8(s); - } - } - stbi__skip(s, pad); - } - } else { - for (j=0; j < (int) s->img_y; ++j) { - for (i=0; i < (int) s->img_x; i += 2) { - int v=stbi__get8(s),v2=0; - if (info.bpp == 4) { - v2 = v & 15; - v >>= 4; - } - out[z++] = pal[v][0]; - out[z++] = pal[v][1]; - out[z++] = pal[v][2]; - if (target == 4) out[z++] = 255; - if (i+1 == (int) s->img_x) break; - v = (info.bpp == 8) ? stbi__get8(s) : v2; - out[z++] = pal[v][0]; - out[z++] = pal[v][1]; - out[z++] = pal[v][2]; - if (target == 4) out[z++] = 255; - } - stbi__skip(s, pad); - } - } - } else { - int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0; - int z = 0; - int easy=0; - stbi__skip(s, info.offset - info.extra_read - info.hsz); - if (info.bpp == 24) width = 3 * s->img_x; - else if (info.bpp == 16) width = 2*s->img_x; - else /* bpp = 32 and pad = 0 */ width=0; - pad = (-width) & 3; - if (info.bpp == 24) { - easy = 1; - } else if (info.bpp == 32) { - if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) - easy = 2; - } - if (!easy) { - if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - // right shift amt to put high bit in position #7 - rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr); - gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg); - bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb); - ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma); - if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - } - for (j=0; j < (int) s->img_y; ++j) { - if (easy) { - for (i=0; i < (int) s->img_x; ++i) { - unsigned char a; - out[z+2] = stbi__get8(s); - out[z+1] = stbi__get8(s); - out[z+0] = stbi__get8(s); - z += 3; - a = (easy == 2 ? stbi__get8(s) : 255); - all_a |= a; - if (target == 4) out[z++] = a; - } - } else { - int bpp = info.bpp; - for (i=0; i < (int) s->img_x; ++i) { - stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s)); - unsigned int a; - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); - a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - all_a |= a; - if (target == 4) out[z++] = STBI__BYTECAST(a); - } - } - stbi__skip(s, pad); - } - } - - // if alpha channel is all 0s, replace with all 255s - if (target == 4 && all_a == 0) - for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4) - out[i] = 255; - - if (flip_vertically) { - stbi_uc t; - for (j=0; j < (int) s->img_y>>1; ++j) { - stbi_uc *p1 = out + j *s->img_x*target; - stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target; - for (i=0; i < (int) s->img_x*target; ++i) { - t = p1[i]; p1[i] = p2[i]; p2[i] = t; - } - } - } - - if (req_comp && req_comp != target) { - out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - - *x = s->img_x; - *y = s->img_y; - if (comp) *comp = s->img_n; - return out; -} -#endif - -// Targa Truevision - TGA -// by Jonathan Dummer -#ifndef STBI_NO_TGA -// returns STBI_rgb or whatever, 0 on error -static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -{ - // only RGB or RGBA (incl. 16bit) or grey allowed - if (is_rgb16) *is_rgb16 = 0; - switch(bits_per_pixel) { - case 8: return STBI_grey; - case 16: if(is_grey) return STBI_grey_alpha; - // fallthrough - case 15: if(is_rgb16) *is_rgb16 = 1; - return STBI_rgb; - case 24: // fallthrough - case 32: return bits_per_pixel/8; - default: return 0; - } -} - -static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) -{ - int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; - int sz, tga_colormap_type; - stbi__get8(s); // discard Offset - tga_colormap_type = stbi__get8(s); // colormap type - if( tga_colormap_type > 1 ) { - stbi__rewind(s); - return 0; // only RGB or indexed allowed - } - tga_image_type = stbi__get8(s); // image type - if ( tga_colormap_type == 1 ) { // colormapped (paletted) image - if (tga_image_type != 1 && tga_image_type != 9) { - stbi__rewind(s); - return 0; - } - stbi__skip(s,4); // skip index of first colormap entry and number of entries - sz = stbi__get8(s); // check bits per palette color entry - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { - stbi__rewind(s); - return 0; - } - stbi__skip(s,4); // skip image x and y origin - tga_colormap_bpp = sz; - } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE - if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { - stbi__rewind(s); - return 0; // only RGB or grey allowed, +/- RLE - } - stbi__skip(s,9); // skip colormap specification and image x/y origin - tga_colormap_bpp = 0; - } - tga_w = stbi__get16le(s); - if( tga_w < 1 ) { - stbi__rewind(s); - return 0; // test width - } - tga_h = stbi__get16le(s); - if( tga_h < 1 ) { - stbi__rewind(s); - return 0; // test height - } - tga_bits_per_pixel = stbi__get8(s); // bits per pixel - stbi__get8(s); // ignore alpha bits - if (tga_colormap_bpp != 0) { - if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { - // when using a colormap, tga_bits_per_pixel is the size of the indexes - // I don't think anything but 8 or 16bit indexes makes sense - stbi__rewind(s); - return 0; - } - tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); - } else { - tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); - } - if(!tga_comp) { - stbi__rewind(s); - return 0; - } - if (x) *x = tga_w; - if (y) *y = tga_h; - if (comp) *comp = tga_comp; - return 1; // seems to have passed everything -} - -static int stbi__tga_test(stbi__context *s) -{ - int res = 0; - int sz, tga_color_type; - stbi__get8(s); // discard Offset - tga_color_type = stbi__get8(s); // color type - if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed - sz = stbi__get8(s); // image type - if ( tga_color_type == 1 ) { // colormapped (paletted) image - if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 - stbi__skip(s,4); // skip index of first colormap entry and number of entries - sz = stbi__get8(s); // check bits per palette color entry - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; - stbi__skip(s,4); // skip image x and y origin - } else { // "normal" image w/o colormap - if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE - stbi__skip(s,9); // skip colormap specification and image x/y origin - } - if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width - if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height - sz = stbi__get8(s); // bits per pixel - if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; - - res = 1; // if we got this far, everything's good and we can return 1 instead of 0 - -errorEnd: - stbi__rewind(s); - return res; -} - -// read 16bit value and convert to 24bit RGB -static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out) -{ - stbi__uint16 px = (stbi__uint16)stbi__get16le(s); - stbi__uint16 fiveBitMask = 31; - // we have 3 channels with 5bits each - int r = (px >> 10) & fiveBitMask; - int g = (px >> 5) & fiveBitMask; - int b = px & fiveBitMask; - // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later - out[0] = (stbi_uc)((r * 255)/31); - out[1] = (stbi_uc)((g * 255)/31); - out[2] = (stbi_uc)((b * 255)/31); - - // some people claim that the most significant bit might be used for alpha - // (possibly if an alpha-bit is set in the "image descriptor byte") - // but that only made 16bit test images completely translucent.. - // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -} - -static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - // read in the TGA header stuff - int tga_offset = stbi__get8(s); - int tga_indexed = stbi__get8(s); - int tga_image_type = stbi__get8(s); - int tga_is_RLE = 0; - int tga_palette_start = stbi__get16le(s); - int tga_palette_len = stbi__get16le(s); - int tga_palette_bits = stbi__get8(s); - int tga_x_origin = stbi__get16le(s); - int tga_y_origin = stbi__get16le(s); - int tga_width = stbi__get16le(s); - int tga_height = stbi__get16le(s); - int tga_bits_per_pixel = stbi__get8(s); - int tga_comp, tga_rgb16=0; - int tga_inverted = stbi__get8(s); - // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) - // image data - unsigned char *tga_data; - unsigned char *tga_palette = NULL; - int i, j; - unsigned char raw_data[4] = {0}; - int RLE_count = 0; - int RLE_repeating = 0; - int read_next_pixel = 1; - STBI_NOTUSED(ri); - STBI_NOTUSED(tga_x_origin); // @TODO - STBI_NOTUSED(tga_y_origin); // @TODO - - if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - - // do a tiny bit of precessing - if ( tga_image_type >= 8 ) - { - tga_image_type -= 8; - tga_is_RLE = 1; - } - tga_inverted = 1 - ((tga_inverted >> 5) & 1); - - // If I'm paletted, then I'll use the number of bits from the palette - if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); - else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); - - if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency - return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); - - // tga info - *x = tga_width; - *y = tga_height; - if (comp) *comp = tga_comp; - - if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) - return stbi__errpuc("too large", "Corrupt TGA"); - - tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); - if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); - - // skip to the data's starting position (offset usually = 0) - stbi__skip(s, tga_offset ); - - if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) { - for (i=0; i < tga_height; ++i) { - int row = tga_inverted ? tga_height -i - 1 : i; - stbi_uc *tga_row = tga_data + row*tga_width*tga_comp; - stbi__getn(s, tga_row, tga_width * tga_comp); - } - } else { - // do I need to load a palette? - if ( tga_indexed) - { - if (tga_palette_len == 0) { /* you have to have at least one entry! */ - STBI_FREE(tga_data); - return stbi__errpuc("bad palette", "Corrupt TGA"); - } - - // any data to skip? (offset usually = 0) - stbi__skip(s, tga_palette_start ); - // load the palette - tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); - if (!tga_palette) { - STBI_FREE(tga_data); - return stbi__errpuc("outofmem", "Out of memory"); - } - if (tga_rgb16) { - stbi_uc *pal_entry = tga_palette; - STBI_ASSERT(tga_comp == STBI_rgb); - for (i=0; i < tga_palette_len; ++i) { - stbi__tga_read_rgb16(s, pal_entry); - pal_entry += tga_comp; - } - } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { - STBI_FREE(tga_data); - STBI_FREE(tga_palette); - return stbi__errpuc("bad palette", "Corrupt TGA"); - } - } - // load the data - for (i=0; i < tga_width * tga_height; ++i) - { - // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? - if ( tga_is_RLE ) - { - if ( RLE_count == 0 ) - { - // yep, get the next byte as a RLE command - int RLE_cmd = stbi__get8(s); - RLE_count = 1 + (RLE_cmd & 127); - RLE_repeating = RLE_cmd >> 7; - read_next_pixel = 1; - } else if ( !RLE_repeating ) - { - read_next_pixel = 1; - } - } else - { - read_next_pixel = 1; - } - // OK, if I need to read a pixel, do it now - if ( read_next_pixel ) - { - // load however much data we did have - if ( tga_indexed ) - { - // read in index, then perform the lookup - int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - if ( pal_idx >= tga_palette_len ) { - // invalid index - pal_idx = 0; - } - pal_idx *= tga_comp; - for (j = 0; j < tga_comp; ++j) { - raw_data[j] = tga_palette[pal_idx+j]; - } - } else if(tga_rgb16) { - STBI_ASSERT(tga_comp == STBI_rgb); - stbi__tga_read_rgb16(s, raw_data); - } else { - // read in the data raw - for (j = 0; j < tga_comp; ++j) { - raw_data[j] = stbi__get8(s); - } - } - // clear the reading flag for the next pixel - read_next_pixel = 0; - } // end of reading a pixel - - // copy data - for (j = 0; j < tga_comp; ++j) - tga_data[i*tga_comp+j] = raw_data[j]; - - // in case we're in RLE mode, keep counting down - --RLE_count; - } - // do I need to invert the image? - if ( tga_inverted ) - { - for (j = 0; j*2 < tga_height; ++j) - { - int index1 = j * tga_width * tga_comp; - int index2 = (tga_height - 1 - j) * tga_width * tga_comp; - for (i = tga_width * tga_comp; i > 0; --i) - { - unsigned char temp = tga_data[index1]; - tga_data[index1] = tga_data[index2]; - tga_data[index2] = temp; - ++index1; - ++index2; - } - } - } - // clear my palette, if I had one - if ( tga_palette != NULL ) - { - STBI_FREE( tga_palette ); - } - } - - // swap RGB - if the source data was RGB16, it already is in the right order - if (tga_comp >= 3 && !tga_rgb16) - { - unsigned char* tga_pixel = tga_data; - for (i=0; i < tga_width * tga_height; ++i) - { - unsigned char temp = tga_pixel[0]; - tga_pixel[0] = tga_pixel[2]; - tga_pixel[2] = temp; - tga_pixel += tga_comp; - } - } - - // convert to target component count - if (req_comp && req_comp != tga_comp) - tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); - - // the things I do to get rid of an error message, and yet keep - // Microsoft's C compilers happy... [8^( - tga_palette_start = tga_palette_len = tga_palette_bits = - tga_x_origin = tga_y_origin = 0; - STBI_NOTUSED(tga_palette_start); - // OK, done - return tga_data; -} -#endif - -// ************************************************************************************************* -// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB - -#ifndef STBI_NO_PSD -static int stbi__psd_test(stbi__context *s) -{ - int r = (stbi__get32be(s) == 0x38425053); - stbi__rewind(s); - return r; -} - -static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount) -{ - int count, nleft, len; - - count = 0; - while ((nleft = pixelCount - count) > 0) { - len = stbi__get8(s); - if (len == 128) { - // No-op. - } else if (len < 128) { - // Copy next len+1 bytes literally. - len++; - if (len > nleft) return 0; // corrupt data - count += len; - while (len) { - *p = stbi__get8(s); - p += 4; - len--; - } - } else if (len > 128) { - stbi_uc val; - // Next -len+1 bytes in the dest are replicated from next source byte. - // (Interpret len as a negative 8-bit int.) - len = 257 - len; - if (len > nleft) return 0; // corrupt data - val = stbi__get8(s); - count += len; - while (len) { - *p = val; - p += 4; - len--; - } - } - } - - return 1; -} - -static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) -{ - int pixelCount; - int channelCount, compression; - int channel, i; - int bitdepth; - int w,h; - stbi_uc *out; - STBI_NOTUSED(ri); - - // Check identifier - if (stbi__get32be(s) != 0x38425053) // "8BPS" - return stbi__errpuc("not PSD", "Corrupt PSD image"); - - // Check file type version. - if (stbi__get16be(s) != 1) - return stbi__errpuc("wrong version", "Unsupported version of PSD image"); - - // Skip 6 reserved bytes. - stbi__skip(s, 6 ); - - // Read the number of channels (R, G, B, A, etc). - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) - return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); - - // Read the rows and columns of the image. - h = stbi__get32be(s); - w = stbi__get32be(s); - - if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - - // Make sure the depth is 8 bits. - bitdepth = stbi__get16be(s); - if (bitdepth != 8 && bitdepth != 16) - return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); - - // Make sure the color mode is RGB. - // Valid options are: - // 0: Bitmap - // 1: Grayscale - // 2: Indexed color - // 3: RGB color - // 4: CMYK color - // 7: Multichannel - // 8: Duotone - // 9: Lab color - if (stbi__get16be(s) != 3) - return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); - - // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) - stbi__skip(s,stbi__get32be(s) ); - - // Skip the image resources. (resolution, pen tool paths, etc) - stbi__skip(s, stbi__get32be(s) ); - - // Skip the reserved data. - stbi__skip(s, stbi__get32be(s) ); - - // Find out if the data is compressed. - // Known values: - // 0: no compression - // 1: RLE compressed - compression = stbi__get16be(s); - if (compression > 1) - return stbi__errpuc("bad compression", "PSD has an unknown compression format"); - - // Check size - if (!stbi__mad3sizes_valid(4, w, h, 0)) - return stbi__errpuc("too large", "Corrupt PSD"); - - // Create the destination image. - - if (!compression && bitdepth == 16 && bpc == 16) { - out = (stbi_uc *) stbi__malloc_mad3(8, w, h, 0); - ri->bits_per_channel = 16; - } else - out = (stbi_uc *) stbi__malloc(4 * w*h); - - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - pixelCount = w*h; - - // Initialize the data to zero. - //memset( out, 0, pixelCount * 4 ); - - // Finally, the image data. - if (compression) { - // RLE as used by .PSD and .TIFF - // Loop until you get the number of unpacked bytes you are expecting: - // Read the next source byte into n. - // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. - // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. - // Else if n is 128, noop. - // Endloop - - // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, - // which we're going to just skip. - stbi__skip(s, h * channelCount * 2 ); - - // Read the RLE data by channel. - for (channel = 0; channel < 4; channel++) { - stbi_uc *p; - - p = out+channel; - if (channel >= channelCount) { - // Fill this channel with default data. - for (i = 0; i < pixelCount; i++, p += 4) - *p = (channel == 3 ? 255 : 0); - } else { - // Read the RLE data. - if (!stbi__psd_decode_rle(s, p, pixelCount)) { - STBI_FREE(out); - return stbi__errpuc("corrupt", "bad RLE data"); - } - } - } - - } else { - // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) - // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. - - // Read the data by channel. - for (channel = 0; channel < 4; channel++) { - if (channel >= channelCount) { - // Fill this channel with default data. - if (bitdepth == 16 && bpc == 16) { - stbi__uint16 *q = ((stbi__uint16 *) out) + channel; - stbi__uint16 val = channel == 3 ? 65535 : 0; - for (i = 0; i < pixelCount; i++, q += 4) - *q = val; - } else { - stbi_uc *p = out+channel; - stbi_uc val = channel == 3 ? 255 : 0; - for (i = 0; i < pixelCount; i++, p += 4) - *p = val; - } - } else { - if (ri->bits_per_channel == 16) { // output bpc - stbi__uint16 *q = ((stbi__uint16 *) out) + channel; - for (i = 0; i < pixelCount; i++, q += 4) - *q = (stbi__uint16) stbi__get16be(s); - } else { - stbi_uc *p = out+channel; - if (bitdepth == 16) { // input bpc - for (i = 0; i < pixelCount; i++, p += 4) - *p = (stbi_uc) (stbi__get16be(s) >> 8); - } else { - for (i = 0; i < pixelCount; i++, p += 4) - *p = stbi__get8(s); - } - } - } - } - } - - // remove weird white matte from PSD - if (channelCount >= 4) { - if (ri->bits_per_channel == 16) { - for (i=0; i < w*h; ++i) { - stbi__uint16 *pixel = (stbi__uint16 *) out + 4*i; - if (pixel[3] != 0 && pixel[3] != 65535) { - float a = pixel[3] / 65535.0f; - float ra = 1.0f / a; - float inv_a = 65535.0f * (1 - ra); - pixel[0] = (stbi__uint16) (pixel[0]*ra + inv_a); - pixel[1] = (stbi__uint16) (pixel[1]*ra + inv_a); - pixel[2] = (stbi__uint16) (pixel[2]*ra + inv_a); - } - } - } else { - for (i=0; i < w*h; ++i) { - unsigned char *pixel = out + 4*i; - if (pixel[3] != 0 && pixel[3] != 255) { - float a = pixel[3] / 255.0f; - float ra = 1.0f / a; - float inv_a = 255.0f * (1 - ra); - pixel[0] = (unsigned char) (pixel[0]*ra + inv_a); - pixel[1] = (unsigned char) (pixel[1]*ra + inv_a); - pixel[2] = (unsigned char) (pixel[2]*ra + inv_a); - } - } - } - } - - // convert to desired output format - if (req_comp && req_comp != 4) { - if (ri->bits_per_channel == 16) - out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, 4, req_comp, w, h); - else - out = stbi__convert_format(out, 4, req_comp, w, h); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - - if (comp) *comp = 4; - *y = h; - *x = w; - - return out; -} -#endif - -// ************************************************************************************************* -// Softimage PIC loader -// by Tom Seddon -// -// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ - -#ifndef STBI_NO_PIC -static int stbi__pic_is4(stbi__context *s,const char *str) -{ - int i; - for (i=0; i<4; ++i) - if (stbi__get8(s) != (stbi_uc)str[i]) - return 0; - - return 1; -} - -static int stbi__pic_test_core(stbi__context *s) -{ - int i; - - if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) - return 0; - - for(i=0;i<84;++i) - stbi__get8(s); - - if (!stbi__pic_is4(s,"PICT")) - return 0; - - return 1; -} - -typedef struct -{ - stbi_uc size,type,channel; -} stbi__pic_packet; - -static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) -{ - int mask=0x80, i; - - for (i=0; i<4; ++i, mask>>=1) { - if (channel & mask) { - if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); - dest[i]=stbi__get8(s); - } - } - - return dest; -} - -static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src) -{ - int mask=0x80,i; - - for (i=0;i<4; ++i, mask>>=1) - if (channel&mask) - dest[i]=src[i]; -} - -static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result) -{ - int act_comp=0,num_packets=0,y,chained; - stbi__pic_packet packets[10]; - - // this will (should...) cater for even some bizarre stuff like having data - // for the same channel in multiple packets. - do { - stbi__pic_packet *packet; - - if (num_packets==sizeof(packets)/sizeof(packets[0])) - return stbi__errpuc("bad format","too many packets"); - - packet = &packets[num_packets++]; - - chained = stbi__get8(s); - packet->size = stbi__get8(s); - packet->type = stbi__get8(s); - packet->channel = stbi__get8(s); - - act_comp |= packet->channel; - - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (reading packets)"); - if (packet->size != 8) return stbi__errpuc("bad format","packet isn't 8bpp"); - } while (chained); - - *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? - - for(y=0; ytype) { - default: - return stbi__errpuc("bad format","packet has bad compression type"); - - case 0: {//uncompressed - int x; - - for(x=0;xchannel,dest)) - return 0; - break; - } - - case 1://Pure RLE - { - int left=width, i; - - while (left>0) { - stbi_uc count,value[4]; - - count=stbi__get8(s); - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pure read count)"); - - if (count > left) - count = (stbi_uc) left; - - if (!stbi__readval(s,packet->channel,value)) return 0; - - for(i=0; ichannel,dest,value); - left -= count; - } - } - break; - - case 2: {//Mixed RLE - int left=width; - while (left>0) { - int count = stbi__get8(s), i; - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (mixed read count)"); - - if (count >= 128) { // Repeated - stbi_uc value[4]; - - if (count==128) - count = stbi__get16be(s); - else - count -= 127; - if (count > left) - return stbi__errpuc("bad file","scanline overrun"); - - if (!stbi__readval(s,packet->channel,value)) - return 0; - - for(i=0;ichannel,dest,value); - } else { // Raw - ++count; - if (count>left) return stbi__errpuc("bad file","scanline overrun"); - - for(i=0;ichannel,dest)) - return 0; - } - left-=count; - } - break; - } - } - } - } - - return result; -} - -static void *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp, stbi__result_info *ri) -{ - stbi_uc *result; - int i, x,y, internal_comp; - STBI_NOTUSED(ri); - - if (!comp) comp = &internal_comp; - - for (i=0; i<92; ++i) - stbi__get8(s); - - x = stbi__get16be(s); - y = stbi__get16be(s); - - if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pic header)"); - if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); - - stbi__get32be(s); //skip `ratio' - stbi__get16be(s); //skip `fields' - stbi__get16be(s); //skip `pad' - - // intermediate buffer is RGBA - result = (stbi_uc *) stbi__malloc_mad3(x, y, 4, 0); - if (!result) return stbi__errpuc("outofmem", "Out of memory"); - memset(result, 0xff, x*y*4); - - if (!stbi__pic_load_core(s,x,y,comp, result)) { - STBI_FREE(result); - result=0; - } - *px = x; - *py = y; - if (req_comp == 0) req_comp = *comp; - result=stbi__convert_format(result,4,req_comp,x,y); - - return result; -} - -static int stbi__pic_test(stbi__context *s) -{ - int r = stbi__pic_test_core(s); - stbi__rewind(s); - return r; -} -#endif - -// ************************************************************************************************* -// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb - -#ifndef STBI_NO_GIF -typedef struct -{ - stbi__int16 prefix; - stbi_uc first; - stbi_uc suffix; -} stbi__gif_lzw; - -typedef struct -{ - int w,h; - stbi_uc *out; // output buffer (always 4 components) - stbi_uc *background; // The current "background" as far as a gif is concerned - stbi_uc *history; - int flags, bgindex, ratio, transparent, eflags; - stbi_uc pal[256][4]; - stbi_uc lpal[256][4]; - stbi__gif_lzw codes[8192]; - stbi_uc *color_table; - int parse, step; - int lflags; - int start_x, start_y; - int max_x, max_y; - int cur_x, cur_y; - int line_size; - int delay; -} stbi__gif; - -static int stbi__gif_test_raw(stbi__context *s) -{ - int sz; - if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - sz = stbi__get8(s); - if (sz != '9' && sz != '7') return 0; - if (stbi__get8(s) != 'a') return 0; - return 1; -} - -static int stbi__gif_test(stbi__context *s) -{ - int r = stbi__gif_test_raw(s); - stbi__rewind(s); - return r; -} - -static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp) -{ - int i; - for (i=0; i < num_entries; ++i) { - pal[i][2] = stbi__get8(s); - pal[i][1] = stbi__get8(s); - pal[i][0] = stbi__get8(s); - pal[i][3] = transp == i ? 0 : 255; - } -} - -static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info) -{ - stbi_uc version; - if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - return stbi__err("not GIF", "Corrupt GIF"); - - version = stbi__get8(s); - if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); - if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); - - stbi__g_failure_reason = ""; - g->w = stbi__get16le(s); - g->h = stbi__get16le(s); - g->flags = stbi__get8(s); - g->bgindex = stbi__get8(s); - g->ratio = stbi__get8(s); - g->transparent = -1; - - if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); - if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); - - if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments - - if (is_info) return 1; - - if (g->flags & 0x80) - stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1); - - return 1; -} - -static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) -{ - stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif)); - if (!g) return stbi__err("outofmem", "Out of memory"); - if (!stbi__gif_header(s, g, comp, 1)) { - STBI_FREE(g); - stbi__rewind( s ); - return 0; - } - if (x) *x = g->w; - if (y) *y = g->h; - STBI_FREE(g); - return 1; -} - -static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) -{ - stbi_uc *p, *c; - int idx; - - // recurse to decode the prefixes, since the linked-list is backwards, - // and working backwards through an interleaved image would be nasty - if (g->codes[code].prefix >= 0) - stbi__out_gif_code(g, g->codes[code].prefix); - - if (g->cur_y >= g->max_y) return; - - idx = g->cur_x + g->cur_y; - p = &g->out[idx]; - g->history[idx / 4] = 1; - - c = &g->color_table[g->codes[code].suffix * 4]; - if (c[3] > 128) { // don't render transparent pixels; - p[0] = c[2]; - p[1] = c[1]; - p[2] = c[0]; - p[3] = c[3]; - } - g->cur_x += 4; - - if (g->cur_x >= g->max_x) { - g->cur_x = g->start_x; - g->cur_y += g->step; - - while (g->cur_y >= g->max_y && g->parse > 0) { - g->step = (1 << g->parse) * g->line_size; - g->cur_y = g->start_y + (g->step >> 1); - --g->parse; - } - } -} - -static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) -{ - stbi_uc lzw_cs; - stbi__int32 len, init_code; - stbi__uint32 first; - stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; - stbi__gif_lzw *p; - - lzw_cs = stbi__get8(s); - if (lzw_cs > 12) return NULL; - clear = 1 << lzw_cs; - first = 1; - codesize = lzw_cs + 1; - codemask = (1 << codesize) - 1; - bits = 0; - valid_bits = 0; - for (init_code = 0; init_code < clear; init_code++) { - g->codes[init_code].prefix = -1; - g->codes[init_code].first = (stbi_uc) init_code; - g->codes[init_code].suffix = (stbi_uc) init_code; - } - - // support no starting clear code - avail = clear+2; - oldcode = -1; - - len = 0; - for(;;) { - if (valid_bits < codesize) { - if (len == 0) { - len = stbi__get8(s); // start new block - if (len == 0) - return g->out; - } - --len; - bits |= (stbi__int32) stbi__get8(s) << valid_bits; - valid_bits += 8; - } else { - stbi__int32 code = bits & codemask; - bits >>= codesize; - valid_bits -= codesize; - // @OPTIMIZE: is there some way we can accelerate the non-clear path? - if (code == clear) { // clear code - codesize = lzw_cs + 1; - codemask = (1 << codesize) - 1; - avail = clear + 2; - oldcode = -1; - first = 0; - } else if (code == clear + 1) { // end of stream code - stbi__skip(s, len); - while ((len = stbi__get8(s)) > 0) - stbi__skip(s,len); - return g->out; - } else if (code <= avail) { - if (first) { - return stbi__errpuc("no clear code", "Corrupt GIF"); - } - - if (oldcode >= 0) { - p = &g->codes[avail++]; - if (avail > 8192) { - return stbi__errpuc("too many codes", "Corrupt GIF"); - } - - p->prefix = (stbi__int16) oldcode; - p->first = g->codes[oldcode].first; - p->suffix = (code == avail) ? p->first : g->codes[code].first; - } else if (code == avail) - return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - - stbi__out_gif_code(g, (stbi__uint16) code); - - if ((avail & codemask) == 0 && avail <= 0x0FFF) { - codesize++; - codemask = (1 << codesize) - 1; - } - - oldcode = code; - } else { - return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - } - } - } -} - -// this function is designed to support animated gifs, although stb_image doesn't support it -// two back is the image from two frames ago, used for a very specific disposal format -static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back) -{ - int dispose; - int first_frame; - int pi; - int pcount; - STBI_NOTUSED(req_comp); - - // on first frame, any non-written pixels get the background colour (non-transparent) - first_frame = 0; - if (g->out == 0) { - if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header - if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) - return stbi__errpuc("too large", "GIF image is too large"); - pcount = g->w * g->h; - g->out = (stbi_uc *) stbi__malloc(4 * pcount); - g->background = (stbi_uc *) stbi__malloc(4 * pcount); - g->history = (stbi_uc *) stbi__malloc(pcount); - if (!g->out || !g->background || !g->history) - return stbi__errpuc("outofmem", "Out of memory"); - - // image is treated as "transparent" at the start - ie, nothing overwrites the current background; - // background colour is only used for pixels that are not rendered first frame, after that "background" - // color refers to the color that was there the previous frame. - memset(g->out, 0x00, 4 * pcount); - memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) - memset(g->history, 0x00, pcount); // pixels that were affected previous frame - first_frame = 1; - } else { - // second frame - how do we dispose of the previous one? - dispose = (g->eflags & 0x1C) >> 2; - pcount = g->w * g->h; - - if ((dispose == 3) && (two_back == 0)) { - dispose = 2; // if I don't have an image to revert back to, default to the old background - } - - if (dispose == 3) { // use previous graphic - for (pi = 0; pi < pcount; ++pi) { - if (g->history[pi]) { - memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); - } - } - } else if (dispose == 2) { - // restore what was changed last frame to background before that frame; - for (pi = 0; pi < pcount; ++pi) { - if (g->history[pi]) { - memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); - } - } - } else { - // This is a non-disposal case eithe way, so just - // leave the pixels as is, and they will become the new background - // 1: do not dispose - // 0: not specified. - } - - // background is what out is after the undoing of the previou frame; - memcpy( g->background, g->out, 4 * g->w * g->h ); - } - - // clear my history; - memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame - - for (;;) { - int tag = stbi__get8(s); - switch (tag) { - case 0x2C: /* Image Descriptor */ - { - stbi__int32 x, y, w, h; - stbi_uc *o; - - x = stbi__get16le(s); - y = stbi__get16le(s); - w = stbi__get16le(s); - h = stbi__get16le(s); - if (((x + w) > (g->w)) || ((y + h) > (g->h))) - return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); - - g->line_size = g->w * 4; - g->start_x = x * 4; - g->start_y = y * g->line_size; - g->max_x = g->start_x + w * 4; - g->max_y = g->start_y + h * g->line_size; - g->cur_x = g->start_x; - g->cur_y = g->start_y; - - // if the width of the specified rectangle is 0, that means - // we may not see *any* pixels or the image is malformed; - // to make sure this is caught, move the current y down to - // max_y (which is what out_gif_code checks). - if (w == 0) - g->cur_y = g->max_y; - - g->lflags = stbi__get8(s); - - if (g->lflags & 0x40) { - g->step = 8 * g->line_size; // first interlaced spacing - g->parse = 3; - } else { - g->step = g->line_size; - g->parse = 0; - } - - if (g->lflags & 0x80) { - stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); - g->color_table = (stbi_uc *) g->lpal; - } else if (g->flags & 0x80) { - g->color_table = (stbi_uc *) g->pal; - } else - return stbi__errpuc("missing color table", "Corrupt GIF"); - - o = stbi__process_gif_raster(s, g); - if (!o) return NULL; - - // if this was the first frame, - pcount = g->w * g->h; - if (first_frame && (g->bgindex > 0)) { - // if first frame, any pixel not drawn to gets the background color - for (pi = 0; pi < pcount; ++pi) { - if (g->history[pi] == 0) { - g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; - memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); - } - } - } - - return o; - } - - case 0x21: // Comment Extension. - { - int len; - int ext = stbi__get8(s); - if (ext == 0xF9) { // Graphic Control Extension. - len = stbi__get8(s); - if (len == 4) { - g->eflags = stbi__get8(s); - g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. - - // unset old transparent - if (g->transparent >= 0) { - g->pal[g->transparent][3] = 255; - } - if (g->eflags & 0x01) { - g->transparent = stbi__get8(s); - if (g->transparent >= 0) { - g->pal[g->transparent][3] = 0; - } - } else { - // don't need transparent - stbi__skip(s, 1); - g->transparent = -1; - } - } else { - stbi__skip(s, len); - break; - } - } - while ((len = stbi__get8(s)) != 0) { - stbi__skip(s, len); - } - break; - } - - case 0x3B: // gif stream termination code - return (stbi_uc *) s; // using '1' causes warning on some compilers - - default: - return stbi__errpuc("unknown code", "Corrupt GIF"); - } - } -} - -static void *stbi__load_gif_main_outofmem(stbi__gif *g, stbi_uc *out, int **delays) -{ - STBI_FREE(g->out); - STBI_FREE(g->history); - STBI_FREE(g->background); - - if (out) STBI_FREE(out); - if (delays && *delays) STBI_FREE(*delays); - return stbi__errpuc("outofmem", "Out of memory"); -} - -static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp) -{ - if (stbi__gif_test(s)) { - int layers = 0; - stbi_uc *u = 0; - stbi_uc *out = 0; - stbi_uc *two_back = 0; - stbi__gif g; - int stride; - int out_size = 0; - int delays_size = 0; - - STBI_NOTUSED(out_size); - STBI_NOTUSED(delays_size); - - memset(&g, 0, sizeof(g)); - if (delays) { - *delays = 0; - } - - do { - u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); - if (u == (stbi_uc *) s) u = 0; // end of animated gif marker - - if (u) { - *x = g.w; - *y = g.h; - ++layers; - stride = g.w * g.h * 4; - - if (out) { - void *tmp = (stbi_uc*) STBI_REALLOC_SIZED( out, out_size, layers * stride ); - if (!tmp) - return stbi__load_gif_main_outofmem(&g, out, delays); - else { - out = (stbi_uc*) tmp; - out_size = layers * stride; - } - - if (delays) { - int *new_delays = (int*) STBI_REALLOC_SIZED( *delays, delays_size, sizeof(int) * layers ); - if (!new_delays) - return stbi__load_gif_main_outofmem(&g, out, delays); - *delays = new_delays; - delays_size = layers * sizeof(int); - } - } else { - out = (stbi_uc*)stbi__malloc( layers * stride ); - if (!out) - return stbi__load_gif_main_outofmem(&g, out, delays); - out_size = layers * stride; - if (delays) { - *delays = (int*) stbi__malloc( layers * sizeof(int) ); - if (!*delays) - return stbi__load_gif_main_outofmem(&g, out, delays); - delays_size = layers * sizeof(int); - } - } - memcpy( out + ((layers - 1) * stride), u, stride ); - if (layers >= 2) { - two_back = out - 2 * stride; - } - - if (delays) { - (*delays)[layers - 1U] = g.delay; - } - } - } while (u != 0); - - // free temp buffer; - STBI_FREE(g.out); - STBI_FREE(g.history); - STBI_FREE(g.background); - - // do the final conversion after loading everything; - if (req_comp && req_comp != 4) - out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); - - *z = layers; - return out; - } else { - return stbi__errpuc("not GIF", "Image was not as a gif type."); - } -} - -static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi_uc *u = 0; - stbi__gif g; - memset(&g, 0, sizeof(g)); - STBI_NOTUSED(ri); - - u = stbi__gif_load_next(s, &g, comp, req_comp, 0); - if (u == (stbi_uc *) s) u = 0; // end of animated gif marker - if (u) { - *x = g.w; - *y = g.h; - - // moved conversion to after successful load so that the same - // can be done for multiple frames. - if (req_comp && req_comp != 4) - u = stbi__convert_format(u, 4, req_comp, g.w, g.h); - } else if (g.out) { - // if there was an error and we allocated an image buffer, free it! - STBI_FREE(g.out); - } - - // free buffers needed for multiple frame loading; - STBI_FREE(g.history); - STBI_FREE(g.background); - - return u; -} - -static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp) -{ - return stbi__gif_info_raw(s,x,y,comp); -} -#endif - -// ************************************************************************************************* -// Radiance RGBE HDR loader -// originally by Nicolas Schulz -#ifndef STBI_NO_HDR -static int stbi__hdr_test_core(stbi__context *s, const char *signature) -{ - int i; - for (i=0; signature[i]; ++i) - if (stbi__get8(s) != signature[i]) - return 0; - stbi__rewind(s); - return 1; -} - -static int stbi__hdr_test(stbi__context* s) -{ - int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); - stbi__rewind(s); - if(!r) { - r = stbi__hdr_test_core(s, "#?RGBE\n"); - stbi__rewind(s); - } - return r; -} - -#define STBI__HDR_BUFLEN 1024 -static char *stbi__hdr_gettoken(stbi__context *z, char *buffer) -{ - int len=0; - char c = '\0'; - - c = (char) stbi__get8(z); - - while (!stbi__at_eof(z) && c != '\n') { - buffer[len++] = c; - if (len == STBI__HDR_BUFLEN-1) { - // flush to end of line - while (!stbi__at_eof(z) && stbi__get8(z) != '\n') - ; - break; - } - c = (char) stbi__get8(z); - } - - buffer[len] = 0; - return buffer; -} - -static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp) -{ - if ( input[3] != 0 ) { - float f1; - // Exponent - f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8)); - if (req_comp <= 2) - output[0] = (input[0] + input[1] + input[2]) * f1 / 3; - else { - output[0] = input[0] * f1; - output[1] = input[1] * f1; - output[2] = input[2] * f1; - } - if (req_comp == 2) output[1] = 1; - if (req_comp == 4) output[3] = 1; - } else { - switch (req_comp) { - case 4: output[3] = 1; /* fallthrough */ - case 3: output[0] = output[1] = output[2] = 0; - break; - case 2: output[1] = 1; /* fallthrough */ - case 1: output[0] = 0; - break; - } - } -} - -static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - char buffer[STBI__HDR_BUFLEN]; - char *token; - int valid = 0; - int width, height; - stbi_uc *scanline; - float *hdr_data; - int len; - unsigned char count, value; - int i, j, k, c1,c2, z; - const char *headerToken; - STBI_NOTUSED(ri); - - // Check identifier - headerToken = stbi__hdr_gettoken(s,buffer); - if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) - return stbi__errpf("not HDR", "Corrupt HDR image"); - - // Parse header - for(;;) { - token = stbi__hdr_gettoken(s,buffer); - if (token[0] == 0) break; - if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - } - - if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); - - // Parse width and height - // can't use sscanf() if we're not using stdio! - token = stbi__hdr_gettoken(s,buffer); - if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - token += 3; - height = (int) strtol(token, &token, 10); - while (*token == ' ') ++token; - if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - token += 3; - width = (int) strtol(token, NULL, 10); - - if (height > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); - if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); - - *x = width; - *y = height; - - if (comp) *comp = 3; - if (req_comp == 0) req_comp = 3; - - if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) - return stbi__errpf("too large", "HDR image is too large"); - - // Read data - hdr_data = (float *) stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); - if (!hdr_data) - return stbi__errpf("outofmem", "Out of memory"); - - // Load image data - // image data is stored as some number of sca - if ( width < 8 || width >= 32768) { - // Read flat data - for (j=0; j < height; ++j) { - for (i=0; i < width; ++i) { - stbi_uc rgbe[4]; - main_decode_loop: - stbi__getn(s, rgbe, 4); - stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); - } - } - } else { - // Read RLE-encoded data - scanline = NULL; - - for (j = 0; j < height; ++j) { - c1 = stbi__get8(s); - c2 = stbi__get8(s); - len = stbi__get8(s); - if (c1 != 2 || c2 != 2 || (len & 0x80)) { - // not run-length encoded, so we have to actually use THIS data as a decoded - // pixel (note this can't be a valid pixel--one of RGB must be >= 128) - stbi_uc rgbe[4]; - rgbe[0] = (stbi_uc) c1; - rgbe[1] = (stbi_uc) c2; - rgbe[2] = (stbi_uc) len; - rgbe[3] = (stbi_uc) stbi__get8(s); - stbi__hdr_convert(hdr_data, rgbe, req_comp); - i = 1; - j = 0; - STBI_FREE(scanline); - goto main_decode_loop; // yes, this makes no sense - } - len <<= 8; - len |= stbi__get8(s); - if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } - if (scanline == NULL) { - scanline = (stbi_uc *) stbi__malloc_mad2(width, 4, 0); - if (!scanline) { - STBI_FREE(hdr_data); - return stbi__errpf("outofmem", "Out of memory"); - } - } - - for (k = 0; k < 4; ++k) { - int nleft; - i = 0; - while ((nleft = width - i) > 0) { - count = stbi__get8(s); - if (count > 128) { - // Run - value = stbi__get8(s); - count -= 128; - if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - for (z = 0; z < count; ++z) - scanline[i++ * 4 + k] = value; - } else { - // Dump - if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - for (z = 0; z < count; ++z) - scanline[i++ * 4 + k] = stbi__get8(s); - } - } - } - for (i=0; i < width; ++i) - stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp); - } - if (scanline) - STBI_FREE(scanline); - } - - return hdr_data; -} - -static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp) -{ - char buffer[STBI__HDR_BUFLEN]; - char *token; - int valid = 0; - int dummy; - - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - - if (stbi__hdr_test(s) == 0) { - stbi__rewind( s ); - return 0; - } - - for(;;) { - token = stbi__hdr_gettoken(s,buffer); - if (token[0] == 0) break; - if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - } - - if (!valid) { - stbi__rewind( s ); - return 0; - } - token = stbi__hdr_gettoken(s,buffer); - if (strncmp(token, "-Y ", 3)) { - stbi__rewind( s ); - return 0; - } - token += 3; - *y = (int) strtol(token, &token, 10); - while (*token == ' ') ++token; - if (strncmp(token, "+X ", 3)) { - stbi__rewind( s ); - return 0; - } - token += 3; - *x = (int) strtol(token, NULL, 10); - *comp = 3; - return 1; -} -#endif // STBI_NO_HDR - -#ifndef STBI_NO_BMP -static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) -{ - void *p; - stbi__bmp_data info; - - info.all_a = 255; - p = stbi__bmp_parse_header(s, &info); - if (p == NULL) { - stbi__rewind( s ); - return 0; - } - if (x) *x = s->img_x; - if (y) *y = s->img_y; - if (comp) { - if (info.bpp == 24 && info.ma == 0xff000000) - *comp = 3; - else - *comp = info.ma ? 4 : 3; - } - return 1; -} -#endif - -#ifndef STBI_NO_PSD -static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp) -{ - int channelCount, dummy, depth; - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - if (stbi__get32be(s) != 0x38425053) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 1) { - stbi__rewind( s ); - return 0; - } - stbi__skip(s, 6); - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) { - stbi__rewind( s ); - return 0; - } - *y = stbi__get32be(s); - *x = stbi__get32be(s); - depth = stbi__get16be(s); - if (depth != 8 && depth != 16) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 3) { - stbi__rewind( s ); - return 0; - } - *comp = 4; - return 1; -} - -static int stbi__psd_is16(stbi__context *s) -{ - int channelCount, depth; - if (stbi__get32be(s) != 0x38425053) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 1) { - stbi__rewind( s ); - return 0; - } - stbi__skip(s, 6); - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) { - stbi__rewind( s ); - return 0; - } - STBI_NOTUSED(stbi__get32be(s)); - STBI_NOTUSED(stbi__get32be(s)); - depth = stbi__get16be(s); - if (depth != 16) { - stbi__rewind( s ); - return 0; - } - return 1; -} -#endif - -#ifndef STBI_NO_PIC -static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) -{ - int act_comp=0,num_packets=0,chained,dummy; - stbi__pic_packet packets[10]; - - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - - if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) { - stbi__rewind(s); - return 0; - } - - stbi__skip(s, 88); - - *x = stbi__get16be(s); - *y = stbi__get16be(s); - if (stbi__at_eof(s)) { - stbi__rewind( s); - return 0; - } - if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) { - stbi__rewind( s ); - return 0; - } - - stbi__skip(s, 8); - - do { - stbi__pic_packet *packet; - - if (num_packets==sizeof(packets)/sizeof(packets[0])) - return 0; - - packet = &packets[num_packets++]; - chained = stbi__get8(s); - packet->size = stbi__get8(s); - packet->type = stbi__get8(s); - packet->channel = stbi__get8(s); - act_comp |= packet->channel; - - if (stbi__at_eof(s)) { - stbi__rewind( s ); - return 0; - } - if (packet->size != 8) { - stbi__rewind( s ); - return 0; - } - } while (chained); - - *comp = (act_comp & 0x10 ? 4 : 3); - - return 1; -} -#endif - -// ************************************************************************************************* -// Portable Gray Map and Portable Pixel Map loader -// by Ken Miller -// -// PGM: http://netpbm.sourceforge.net/doc/pgm.html -// PPM: http://netpbm.sourceforge.net/doc/ppm.html -// -// Known limitations: -// Does not support comments in the header section -// Does not support ASCII image data (formats P2 and P3) - -#ifndef STBI_NO_PNM - -static int stbi__pnm_test(stbi__context *s) -{ - char p, t; - p = (char) stbi__get8(s); - t = (char) stbi__get8(s); - if (p != 'P' || (t != '5' && t != '6')) { - stbi__rewind( s ); - return 0; - } - return 1; -} - -static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) -{ - stbi_uc *out; - STBI_NOTUSED(ri); - - ri->bits_per_channel = stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n); - if (ri->bits_per_channel == 0) - return 0; - - if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); - - *x = s->img_x; - *y = s->img_y; - if (comp) *comp = s->img_n; - - if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0)) - return stbi__errpuc("too large", "PNM too large"); - - out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { - STBI_FREE(out); - return stbi__errpuc("bad PNM", "PNM file truncated"); - } - - if (req_comp && req_comp != s->img_n) { - if (ri->bits_per_channel == 16) { - out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y); - } else { - out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); - } - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - return out; -} - -static int stbi__pnm_isspace(char c) -{ - return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; -} - -static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) -{ - for (;;) { - while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) - *c = (char) stbi__get8(s); - - if (stbi__at_eof(s) || *c != '#') - break; - - while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) - *c = (char) stbi__get8(s); - } -} - -static int stbi__pnm_isdigit(char c) -{ - return c >= '0' && c <= '9'; -} - -static int stbi__pnm_getinteger(stbi__context *s, char *c) -{ - int value = 0; - - while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { - value = value*10 + (*c - '0'); - *c = (char) stbi__get8(s); - if((value > 214748364) || (value == 214748364 && *c > '7')) - return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); - } - - return value; -} - -static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) -{ - int maxv, dummy; - char c, p, t; - - if (!x) x = &dummy; - if (!y) y = &dummy; - if (!comp) comp = &dummy; - - stbi__rewind(s); - - // Get identifier - p = (char) stbi__get8(s); - t = (char) stbi__get8(s); - if (p != 'P' || (t != '5' && t != '6')) { - stbi__rewind(s); - return 0; - } - - *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm - - c = (char) stbi__get8(s); - stbi__pnm_skip_whitespace(s, &c); - - *x = stbi__pnm_getinteger(s, &c); // read width - if(*x == 0) - return stbi__err("invalid width", "PPM image header had zero or overflowing width"); - stbi__pnm_skip_whitespace(s, &c); - - *y = stbi__pnm_getinteger(s, &c); // read height - if (*y == 0) - return stbi__err("invalid width", "PPM image header had zero or overflowing width"); - stbi__pnm_skip_whitespace(s, &c); - - maxv = stbi__pnm_getinteger(s, &c); // read max value - if (maxv > 65535) - return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images"); - else if (maxv > 255) - return 16; - else - return 8; -} - -static int stbi__pnm_is16(stbi__context *s) -{ - if (stbi__pnm_info(s, NULL, NULL, NULL) == 16) - return 1; - return 0; -} -#endif - -static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp) -{ - #ifndef STBI_NO_JPEG - if (stbi__jpeg_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PNG - if (stbi__png_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_GIF - if (stbi__gif_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_BMP - if (stbi__bmp_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PSD - if (stbi__psd_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PIC - if (stbi__pic_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PNM - if (stbi__pnm_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_HDR - if (stbi__hdr_info(s, x, y, comp)) return 1; - #endif - - // test tga last because it's a crappy test! - #ifndef STBI_NO_TGA - if (stbi__tga_info(s, x, y, comp)) - return 1; - #endif - return stbi__err("unknown image type", "Image not of any known type, or corrupt"); -} - -static int stbi__is_16_main(stbi__context *s) -{ - #ifndef STBI_NO_PNG - if (stbi__png_is16(s)) return 1; - #endif - - #ifndef STBI_NO_PSD - if (stbi__psd_is16(s)) return 1; - #endif - - #ifndef STBI_NO_PNM - if (stbi__pnm_is16(s)) return 1; - #endif - return 0; -} - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result; - if (!f) return stbi__err("can't fopen", "Unable to open file"); - result = stbi_info_from_file(f, x, y, comp); - fclose(f); - return result; -} - -STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) -{ - int r; - stbi__context s; - long pos = ftell(f); - stbi__start_file(&s, f); - r = stbi__info_main(&s,x,y,comp); - fseek(f,pos,SEEK_SET); - return r; -} - -STBIDEF int stbi_is_16_bit(char const *filename) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result; - if (!f) return stbi__err("can't fopen", "Unable to open file"); - result = stbi_is_16_bit_from_file(f); - fclose(f); - return result; -} - -STBIDEF int stbi_is_16_bit_from_file(FILE *f) -{ - int r; - stbi__context s; - long pos = ftell(f); - stbi__start_file(&s, f); - r = stbi__is_16_main(&s); - fseek(f,pos,SEEK_SET); - return r; -} -#endif // !STBI_NO_STDIO - -STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__info_main(&s,x,y,comp); -} - -STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); - return stbi__info_main(&s,x,y,comp); -} - -STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__is_16_main(&s); -} - -STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, void *user) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); - return stbi__is_16_main(&s); -} - -#endif // STB_IMAGE_IMPLEMENTATION - -/* - revision history: - 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs - 2.19 (2018-02-11) fix warning - 2.18 (2018-01-30) fix warnings - 2.17 (2018-01-29) change sbti__shiftsigned to avoid clang -O2 bug - 1-bit BMP - *_is_16_bit api - avoid warnings - 2.16 (2017-07-23) all functions have 16-bit variants; - STBI_NO_STDIO works again; - compilation fixes; - fix rounding in unpremultiply; - optimize vertical flip; - disable raw_len validation; - documentation fixes - 2.15 (2017-03-18) fix png-1,2,4 bug; now all Imagenet JPGs decode; - warning fixes; disable run-time SSE detection on gcc; - uniform handling of optional "return" values; - thread-safe initialization of zlib tables - 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs - 2.13 (2016-11-29) add 16-bit API, only supported for PNG right now - 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes - 2.11 (2016-04-02) allocate large structures on the stack - remove white matting for transparent PSD - fix reported channel count for PNG & BMP - re-enable SSE2 in non-gcc 64-bit - support RGB-formatted JPEG - read 16-bit PNGs (only as 8-bit) - 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED - 2.09 (2016-01-16) allow comments in PNM files - 16-bit-per-pixel TGA (not bit-per-component) - info() for TGA could break due to .hdr handling - info() for BMP to shares code instead of sloppy parse - can use STBI_REALLOC_SIZED if allocator doesn't support realloc - code cleanup - 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA - 2.07 (2015-09-13) fix compiler warnings - partial animated GIF support - limited 16-bpc PSD support - #ifdef unused functions - bug with < 92 byte PIC,PNM,HDR,TGA - 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value - 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning - 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit - 2.03 (2015-04-12) extra corruption checking (mmozeiko) - stbi_set_flip_vertically_on_load (nguillemot) - fix NEON support; fix mingw support - 2.02 (2015-01-19) fix incorrect assert, fix warning - 2.01 (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2 - 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG - 2.00 (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg) - progressive JPEG (stb) - PGM/PPM support (Ken Miller) - STBI_MALLOC,STBI_REALLOC,STBI_FREE - GIF bugfix -- seemingly never worked - STBI_NO_*, STBI_ONLY_* - 1.48 (2014-12-14) fix incorrectly-named assert() - 1.47 (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb) - optimize PNG (ryg) - fix bug in interlaced PNG with user-specified channel count (stb) - 1.46 (2014-08-26) - fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG - 1.45 (2014-08-16) - fix MSVC-ARM internal compiler error by wrapping malloc - 1.44 (2014-08-07) - various warning fixes from Ronny Chevalier - 1.43 (2014-07-15) - fix MSVC-only compiler problem in code changed in 1.42 - 1.42 (2014-07-09) - don't define _CRT_SECURE_NO_WARNINGS (affects user code) - fixes to stbi__cleanup_jpeg path - added STBI_ASSERT to avoid requiring assert.h - 1.41 (2014-06-25) - fix search&replace from 1.36 that messed up comments/error messages - 1.40 (2014-06-22) - fix gcc struct-initialization warning - 1.39 (2014-06-15) - fix to TGA optimization when req_comp != number of components in TGA; - fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite) - add support for BMP version 5 (more ignored fields) - 1.38 (2014-06-06) - suppress MSVC warnings on integer casts truncating values - fix accidental rename of 'skip' field of I/O - 1.37 (2014-06-04) - remove duplicate typedef - 1.36 (2014-06-03) - convert to header file single-file library - if de-iphone isn't set, load iphone images color-swapped instead of returning NULL - 1.35 (2014-05-27) - various warnings - fix broken STBI_SIMD path - fix bug where stbi_load_from_file no longer left file pointer in correct place - fix broken non-easy path for 32-bit BMP (possibly never used) - TGA optimization by Arseny Kapoulkine - 1.34 (unknown) - use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case - 1.33 (2011-07-14) - make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements - 1.32 (2011-07-13) - support for "info" function for all supported filetypes (SpartanJ) - 1.31 (2011-06-20) - a few more leak fixes, bug in PNG handling (SpartanJ) - 1.30 (2011-06-11) - added ability to load files via callbacks to accomidate custom input streams (Ben Wenger) - removed deprecated format-specific test/load functions - removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway - error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha) - fix inefficiency in decoding 32-bit BMP (David Woo) - 1.29 (2010-08-16) - various warning fixes from Aurelien Pocheville - 1.28 (2010-08-01) - fix bug in GIF palette transparency (SpartanJ) - 1.27 (2010-08-01) - cast-to-stbi_uc to fix warnings - 1.26 (2010-07-24) - fix bug in file buffering for PNG reported by SpartanJ - 1.25 (2010-07-17) - refix trans_data warning (Won Chun) - 1.24 (2010-07-12) - perf improvements reading from files on platforms with lock-heavy fgetc() - minor perf improvements for jpeg - deprecated type-specific functions so we'll get feedback if they're needed - attempt to fix trans_data warning (Won Chun) - 1.23 fixed bug in iPhone support - 1.22 (2010-07-10) - removed image *writing* support - stbi_info support from Jetro Lauha - GIF support from Jean-Marc Lienher - iPhone PNG-extensions from James Brown - warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva) - 1.21 fix use of 'stbi_uc' in header (reported by jon blow) - 1.20 added support for Softimage PIC, by Tom Seddon - 1.19 bug in interlaced PNG corruption check (found by ryg) - 1.18 (2008-08-02) - fix a threading bug (local mutable static) - 1.17 support interlaced PNG - 1.16 major bugfix - stbi__convert_format converted one too many pixels - 1.15 initialize some fields for thread safety - 1.14 fix threadsafe conversion bug - header-file-only version (#define STBI_HEADER_FILE_ONLY before including) - 1.13 threadsafe - 1.12 const qualifiers in the API - 1.11 Support installable IDCT, colorspace conversion routines - 1.10 Fixes for 64-bit (don't use "unsigned long") - optimized upsampling by Fabian "ryg" Giesen - 1.09 Fix format-conversion for PSD code (bad global variables!) - 1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz - 1.07 attempt to fix C++ warning/errors again - 1.06 attempt to fix C++ warning/errors again - 1.05 fix TGA loading to return correct *comp and use good luminance calc - 1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free - 1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR - 1.02 support for (subset of) HDR files, float interface for preferred access to them - 1.01 fix bug: possible bug in handling right-side up bmps... not sure - fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all - 1.00 interface to zlib that skips zlib header - 0.99 correct handling of alpha in palette - 0.98 TGA loader by lonesock; dynamically add loaders (untested) - 0.97 jpeg errors on too large a file; also catch another malloc failure - 0.96 fix detection of invalid v value - particleman@mollyrocket forum - 0.95 during header scan, seek to markers in case of padding - 0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same - 0.93 handle jpegtran output; verbose errors - 0.92 read 4,8,16,24,32-bit BMP files of several formats - 0.91 output 24-bit Windows 3.0 BMP files - 0.90 fix a few more warnings; bump version number to approach 1.0 - 0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd - 0.60 fix compiling as c++ - 0.59 fix warnings: merge Dave Moore's -Wall fixes - 0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian - 0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available - 0.56 fix bug: zlib uncompressed mode len vs. nlen - 0.55 fix bug: restart_interval not initialized to 0 - 0.54 allow NULL for 'int *comp' - 0.53 fix bug in png 3->4; speedup png decoding - 0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments - 0.51 obey req_comp requests, 1-component jpegs return as 1-component, - on 'test' only check type, not whether we support this variant - 0.50 (2006-11-19) - first released version -*/ - - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_image_resize.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_image_resize.h deleted file mode 100644 index ef9e6fe8..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_image_resize.h +++ /dev/null @@ -1,2634 +0,0 @@ -/* stb_image_resize - v0.97 - public domain image resizing - by Jorge L Rodriguez (@VinoBS) - 2014 - http://github.com/nothings/stb - - Written with emphasis on usability, portability, and efficiency. (No - SIMD or threads, so it be easily outperformed by libs that use those.) - Only scaling and translation is supported, no rotations or shears. - Easy API downsamples w/Mitchell filter, upsamples w/cubic interpolation. - - COMPILING & LINKING - In one C/C++ file that #includes this file, do this: - #define STB_IMAGE_RESIZE_IMPLEMENTATION - before the #include. That will create the implementation in that file. - - QUICKSTART - stbir_resize_uint8( input_pixels , in_w , in_h , 0, - output_pixels, out_w, out_h, 0, num_channels) - stbir_resize_float(...) - stbir_resize_uint8_srgb( input_pixels , in_w , in_h , 0, - output_pixels, out_w, out_h, 0, - num_channels , alpha_chan , 0) - stbir_resize_uint8_srgb_edgemode( - input_pixels , in_w , in_h , 0, - output_pixels, out_w, out_h, 0, - num_channels , alpha_chan , 0, STBIR_EDGE_CLAMP) - // WRAP/REFLECT/ZERO - - FULL API - See the "header file" section of the source for API documentation. - - ADDITIONAL DOCUMENTATION - - SRGB & FLOATING POINT REPRESENTATION - The sRGB functions presume IEEE floating point. If you do not have - IEEE floating point, define STBIR_NON_IEEE_FLOAT. This will use - a slower implementation. - - MEMORY ALLOCATION - The resize functions here perform a single memory allocation using - malloc. To control the memory allocation, before the #include that - triggers the implementation, do: - - #define STBIR_MALLOC(size,context) ... - #define STBIR_FREE(ptr,context) ... - - Each resize function makes exactly one call to malloc/free, so to use - temp memory, store the temp memory in the context and return that. - - ASSERT - Define STBIR_ASSERT(boolval) to override assert() and not use assert.h - - OPTIMIZATION - Define STBIR_SATURATE_INT to compute clamp values in-range using - integer operations instead of float operations. This may be faster - on some platforms. - - DEFAULT FILTERS - For functions which don't provide explicit control over what filters - to use, you can change the compile-time defaults with - - #define STBIR_DEFAULT_FILTER_UPSAMPLE STBIR_FILTER_something - #define STBIR_DEFAULT_FILTER_DOWNSAMPLE STBIR_FILTER_something - - See stbir_filter in the header-file section for the list of filters. - - NEW FILTERS - A number of 1D filter kernels are used. For a list of - supported filters see the stbir_filter enum. To add a new filter, - write a filter function and add it to stbir__filter_info_table. - - PROGRESS - For interactive use with slow resize operations, you can install - a progress-report callback: - - #define STBIR_PROGRESS_REPORT(val) some_func(val) - - The parameter val is a float which goes from 0 to 1 as progress is made. - - For example: - - static void my_progress_report(float progress); - #define STBIR_PROGRESS_REPORT(val) my_progress_report(val) - - #define STB_IMAGE_RESIZE_IMPLEMENTATION - #include "stb_image_resize.h" - - static void my_progress_report(float progress) - { - printf("Progress: %f%%\n", progress*100); - } - - MAX CHANNELS - If your image has more than 64 channels, define STBIR_MAX_CHANNELS - to the max you'll have. - - ALPHA CHANNEL - Most of the resizing functions provide the ability to control how - the alpha channel of an image is processed. The important things - to know about this: - - 1. The best mathematically-behaved version of alpha to use is - called "premultiplied alpha", in which the other color channels - have had the alpha value multiplied in. If you use premultiplied - alpha, linear filtering (such as image resampling done by this - library, or performed in texture units on GPUs) does the "right - thing". While premultiplied alpha is standard in the movie CGI - industry, it is still uncommon in the videogame/real-time world. - - If you linearly filter non-premultiplied alpha, strange effects - occur. (For example, the 50/50 average of 99% transparent bright green - and 1% transparent black produces 50% transparent dark green when - non-premultiplied, whereas premultiplied it produces 50% - transparent near-black. The former introduces green energy - that doesn't exist in the source image.) - - 2. Artists should not edit premultiplied-alpha images; artists - want non-premultiplied alpha images. Thus, art tools generally output - non-premultiplied alpha images. - - 3. You will get best results in most cases by converting images - to premultiplied alpha before processing them mathematically. - - 4. If you pass the flag STBIR_FLAG_ALPHA_PREMULTIPLIED, the - resizer does not do anything special for the alpha channel; - it is resampled identically to other channels. This produces - the correct results for premultiplied-alpha images, but produces - less-than-ideal results for non-premultiplied-alpha images. - - 5. If you do not pass the flag STBIR_FLAG_ALPHA_PREMULTIPLIED, - then the resizer weights the contribution of input pixels - based on their alpha values, or, equivalently, it multiplies - the alpha value into the color channels, resamples, then divides - by the resultant alpha value. Input pixels which have alpha=0 do - not contribute at all to output pixels unless _all_ of the input - pixels affecting that output pixel have alpha=0, in which case - the result for that pixel is the same as it would be without - STBIR_FLAG_ALPHA_PREMULTIPLIED. However, this is only true for - input images in integer formats. For input images in float format, - input pixels with alpha=0 have no effect, and output pixels - which have alpha=0 will be 0 in all channels. (For float images, - you can manually achieve the same result by adding a tiny epsilon - value to the alpha channel of every image, and then subtracting - or clamping it at the end.) - - 6. You can suppress the behavior described in #5 and make - all-0-alpha pixels have 0 in all channels by #defining - STBIR_NO_ALPHA_EPSILON. - - 7. You can separately control whether the alpha channel is - interpreted as linear or affected by the colorspace. By default - it is linear; you almost never want to apply the colorspace. - (For example, graphics hardware does not apply sRGB conversion - to the alpha channel.) - - CONTRIBUTORS - Jorge L Rodriguez: Implementation - Sean Barrett: API design, optimizations - Aras Pranckevicius: bugfix - Nathan Reed: warning fixes - - REVISIONS - 0.97 (2020-02-02) fixed warning - 0.96 (2019-03-04) fixed warnings - 0.95 (2017-07-23) fixed warnings - 0.94 (2017-03-18) fixed warnings - 0.93 (2017-03-03) fixed bug with certain combinations of heights - 0.92 (2017-01-02) fix integer overflow on large (>2GB) images - 0.91 (2016-04-02) fix warnings; fix handling of subpixel regions - 0.90 (2014-09-17) first released version - - LICENSE - See end of file for license information. - - TODO - Don't decode all of the image data when only processing a partial tile - Don't use full-width decode buffers when only processing a partial tile - When processing wide images, break processing into tiles so data fits in L1 cache - Installable filters? - Resize that respects alpha test coverage - (Reference code: FloatImage::alphaTestCoverage and FloatImage::scaleAlphaToCoverage: - https://code.google.com/p/nvidia-texture-tools/source/browse/trunk/src/nvimage/FloatImage.cpp ) -*/ - -#ifndef STBIR_INCLUDE_STB_IMAGE_RESIZE_H -#define STBIR_INCLUDE_STB_IMAGE_RESIZE_H - -#ifdef _MSC_VER -typedef unsigned char stbir_uint8; -typedef unsigned short stbir_uint16; -typedef unsigned int stbir_uint32; -#else -#include -typedef uint8_t stbir_uint8; -typedef uint16_t stbir_uint16; -typedef uint32_t stbir_uint32; -#endif - -#ifndef STBIRDEF -#ifdef STB_IMAGE_RESIZE_STATIC -#define STBIRDEF static -#else -#ifdef __cplusplus -#define STBIRDEF extern "C" -#else -#define STBIRDEF extern -#endif -#endif -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// Easy-to-use API: -// -// * "input pixels" points to an array of image data with 'num_channels' channels (e.g. RGB=3, RGBA=4) -// * input_w is input image width (x-axis), input_h is input image height (y-axis) -// * stride is the offset between successive rows of image data in memory, in bytes. you can -// specify 0 to mean packed continuously in memory -// * alpha channel is treated identically to other channels. -// * colorspace is linear or sRGB as specified by function name -// * returned result is 1 for success or 0 in case of an error. -// #define STBIR_ASSERT() to trigger an assert on parameter validation errors. -// * Memory required grows approximately linearly with input and output size, but with -// discontinuities at input_w == output_w and input_h == output_h. -// * These functions use a "default" resampling filter defined at compile time. To change the filter, -// you can change the compile-time defaults by #defining STBIR_DEFAULT_FILTER_UPSAMPLE -// and STBIR_DEFAULT_FILTER_DOWNSAMPLE, or you can use the medium-complexity API. - -STBIRDEF int stbir_resize_uint8( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels); - -STBIRDEF int stbir_resize_float( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - float *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels); - - -// The following functions interpret image data as gamma-corrected sRGB. -// Specify STBIR_ALPHA_CHANNEL_NONE if you have no alpha channel, -// or otherwise provide the index of the alpha channel. Flags value -// of 0 will probably do the right thing if you're not sure what -// the flags mean. - -#define STBIR_ALPHA_CHANNEL_NONE -1 - -// Set this flag if your texture has premultiplied alpha. Otherwise, stbir will -// use alpha-weighted resampling (effectively premultiplying, resampling, -// then unpremultiplying). -#define STBIR_FLAG_ALPHA_PREMULTIPLIED (1 << 0) -// The specified alpha channel should be handled as gamma-corrected value even -// when doing sRGB operations. -#define STBIR_FLAG_ALPHA_USES_COLORSPACE (1 << 1) - -STBIRDEF int stbir_resize_uint8_srgb(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags); - - -typedef enum -{ - STBIR_EDGE_CLAMP = 1, - STBIR_EDGE_REFLECT = 2, - STBIR_EDGE_WRAP = 3, - STBIR_EDGE_ZERO = 4, -} stbir_edge; - -// This function adds the ability to specify how requests to sample off the edge of the image are handled. -STBIRDEF int stbir_resize_uint8_srgb_edgemode(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode); - -////////////////////////////////////////////////////////////////////////////// -// -// Medium-complexity API -// -// This extends the easy-to-use API as follows: -// -// * Alpha-channel can be processed separately -// * If alpha_channel is not STBIR_ALPHA_CHANNEL_NONE -// * Alpha channel will not be gamma corrected (unless flags&STBIR_FLAG_GAMMA_CORRECT) -// * Filters will be weighted by alpha channel (unless flags&STBIR_FLAG_ALPHA_PREMULTIPLIED) -// * Filter can be selected explicitly -// * uint16 image type -// * sRGB colorspace available for all types -// * context parameter for passing to STBIR_MALLOC - -typedef enum -{ - STBIR_FILTER_DEFAULT = 0, // use same filter type that easy-to-use API chooses - STBIR_FILTER_BOX = 1, // A trapezoid w/1-pixel wide ramps, same result as box for integer scale ratios - STBIR_FILTER_TRIANGLE = 2, // On upsampling, produces same results as bilinear texture filtering - STBIR_FILTER_CUBICBSPLINE = 3, // The cubic b-spline (aka Mitchell-Netrevalli with B=1,C=0), gaussian-esque - STBIR_FILTER_CATMULLROM = 4, // An interpolating cubic spline - STBIR_FILTER_MITCHELL = 5, // Mitchell-Netrevalli filter with B=1/3, C=1/3 -} stbir_filter; - -typedef enum -{ - STBIR_COLORSPACE_LINEAR, - STBIR_COLORSPACE_SRGB, - - STBIR_MAX_COLORSPACES, -} stbir_colorspace; - -// The following functions are all identical except for the type of the image data - -STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, - void *alloc_context); - -STBIRDEF int stbir_resize_uint16_generic(const stbir_uint16 *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - stbir_uint16 *output_pixels , int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, - void *alloc_context); - -STBIRDEF int stbir_resize_float_generic( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - float *output_pixels , int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, - void *alloc_context); - - - -////////////////////////////////////////////////////////////////////////////// -// -// Full-complexity API -// -// This extends the medium API as follows: -// -// * uint32 image type -// * not typesafe -// * separate filter types for each axis -// * separate edge modes for each axis -// * can specify scale explicitly for subpixel correctness -// * can specify image source tile using texture coordinates - -typedef enum -{ - STBIR_TYPE_UINT8 , - STBIR_TYPE_UINT16, - STBIR_TYPE_UINT32, - STBIR_TYPE_FLOAT , - - STBIR_MAX_TYPES -} stbir_datatype; - -STBIRDEF int stbir_resize( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - stbir_datatype datatype, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, - stbir_filter filter_horizontal, stbir_filter filter_vertical, - stbir_colorspace space, void *alloc_context); - -STBIRDEF int stbir_resize_subpixel(const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - stbir_datatype datatype, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, - stbir_filter filter_horizontal, stbir_filter filter_vertical, - stbir_colorspace space, void *alloc_context, - float x_scale, float y_scale, - float x_offset, float y_offset); - -STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - stbir_datatype datatype, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, - stbir_filter filter_horizontal, stbir_filter filter_vertical, - stbir_colorspace space, void *alloc_context, - float s0, float t0, float s1, float t1); -// (s0, t0) & (s1, t1) are the top-left and bottom right corner (uv addressing style: [0, 1]x[0, 1]) of a region of the input image to use. - -// -// -//// end header file ///////////////////////////////////////////////////// -#endif // STBIR_INCLUDE_STB_IMAGE_RESIZE_H - - - - - -#ifdef STB_IMAGE_RESIZE_IMPLEMENTATION - -#ifndef STBIR_ASSERT -#include -#define STBIR_ASSERT(x) assert(x) -#endif - -// For memset -#include - -#include - -#ifndef STBIR_MALLOC -#include -// use comma operator to evaluate c, to avoid "unused parameter" warnings -#define STBIR_MALLOC(size,c) ((void)(c), malloc(size)) -#define STBIR_FREE(ptr,c) ((void)(c), free(ptr)) -#endif - -#ifndef _MSC_VER -#ifdef __cplusplus -#define stbir__inline inline -#else -#define stbir__inline -#endif -#else -#define stbir__inline __forceinline -#endif - - -// should produce compiler error if size is wrong -typedef unsigned char stbir__validate_uint32[sizeof(stbir_uint32) == 4 ? 1 : -1]; - -#ifdef _MSC_VER -#define STBIR__NOTUSED(v) (void)(v) -#else -#define STBIR__NOTUSED(v) (void)sizeof(v) -#endif - -#define STBIR__ARRAY_SIZE(a) (sizeof((a))/sizeof((a)[0])) - -#ifndef STBIR_DEFAULT_FILTER_UPSAMPLE -#define STBIR_DEFAULT_FILTER_UPSAMPLE STBIR_FILTER_CATMULLROM -#endif - -#ifndef STBIR_DEFAULT_FILTER_DOWNSAMPLE -#define STBIR_DEFAULT_FILTER_DOWNSAMPLE STBIR_FILTER_MITCHELL -#endif - -#ifndef STBIR_PROGRESS_REPORT -#define STBIR_PROGRESS_REPORT(float_0_to_1) -#endif - -#ifndef STBIR_MAX_CHANNELS -#define STBIR_MAX_CHANNELS 64 -#endif - -#if STBIR_MAX_CHANNELS > 65536 -#error "Too many channels; STBIR_MAX_CHANNELS must be no more than 65536." -// because we store the indices in 16-bit variables -#endif - -// This value is added to alpha just before premultiplication to avoid -// zeroing out color values. It is equivalent to 2^-80. If you don't want -// that behavior (it may interfere if you have floating point images with -// very small alpha values) then you can define STBIR_NO_ALPHA_EPSILON to -// disable it. -#ifndef STBIR_ALPHA_EPSILON -#define STBIR_ALPHA_EPSILON ((float)1 / (1 << 20) / (1 << 20) / (1 << 20) / (1 << 20)) -#endif - - - -#ifdef _MSC_VER -#define STBIR__UNUSED_PARAM(v) (void)(v) -#else -#define STBIR__UNUSED_PARAM(v) (void)sizeof(v) -#endif - -// must match stbir_datatype -static unsigned char stbir__type_size[] = { - 1, // STBIR_TYPE_UINT8 - 2, // STBIR_TYPE_UINT16 - 4, // STBIR_TYPE_UINT32 - 4, // STBIR_TYPE_FLOAT -}; - -// Kernel function centered at 0 -typedef float (stbir__kernel_fn)(float x, float scale); -typedef float (stbir__support_fn)(float scale); - -typedef struct -{ - stbir__kernel_fn* kernel; - stbir__support_fn* support; -} stbir__filter_info; - -// When upsampling, the contributors are which source pixels contribute. -// When downsampling, the contributors are which destination pixels are contributed to. -typedef struct -{ - int n0; // First contributing pixel - int n1; // Last contributing pixel -} stbir__contributors; - -typedef struct -{ - const void* input_data; - int input_w; - int input_h; - int input_stride_bytes; - - void* output_data; - int output_w; - int output_h; - int output_stride_bytes; - - float s0, t0, s1, t1; - - float horizontal_shift; // Units: output pixels - float vertical_shift; // Units: output pixels - float horizontal_scale; - float vertical_scale; - - int channels; - int alpha_channel; - stbir_uint32 flags; - stbir_datatype type; - stbir_filter horizontal_filter; - stbir_filter vertical_filter; - stbir_edge edge_horizontal; - stbir_edge edge_vertical; - stbir_colorspace colorspace; - - stbir__contributors* horizontal_contributors; - float* horizontal_coefficients; - - stbir__contributors* vertical_contributors; - float* vertical_coefficients; - - int decode_buffer_pixels; - float* decode_buffer; - - float* horizontal_buffer; - - // cache these because ceil/floor are inexplicably showing up in profile - int horizontal_coefficient_width; - int vertical_coefficient_width; - int horizontal_filter_pixel_width; - int vertical_filter_pixel_width; - int horizontal_filter_pixel_margin; - int vertical_filter_pixel_margin; - int horizontal_num_contributors; - int vertical_num_contributors; - - int ring_buffer_length_bytes; // The length of an individual entry in the ring buffer. The total number of ring buffers is stbir__get_filter_pixel_width(filter) - int ring_buffer_num_entries; // Total number of entries in the ring buffer. - int ring_buffer_first_scanline; - int ring_buffer_last_scanline; - int ring_buffer_begin_index; // first_scanline is at this index in the ring buffer - float* ring_buffer; - - float* encode_buffer; // A temporary buffer to store floats so we don't lose precision while we do multiply-adds. - - int horizontal_contributors_size; - int horizontal_coefficients_size; - int vertical_contributors_size; - int vertical_coefficients_size; - int decode_buffer_size; - int horizontal_buffer_size; - int ring_buffer_size; - int encode_buffer_size; -} stbir__info; - - -static const float stbir__max_uint8_as_float = 255.0f; -static const float stbir__max_uint16_as_float = 65535.0f; -static const double stbir__max_uint32_as_float = 4294967295.0; - - -static stbir__inline int stbir__min(int a, int b) -{ - return a < b ? a : b; -} - -static stbir__inline float stbir__saturate(float x) -{ - if (x < 0) - return 0; - - if (x > 1) - return 1; - - return x; -} - -#ifdef STBIR_SATURATE_INT -static stbir__inline stbir_uint8 stbir__saturate8(int x) -{ - if ((unsigned int) x <= 255) - return x; - - if (x < 0) - return 0; - - return 255; -} - -static stbir__inline stbir_uint16 stbir__saturate16(int x) -{ - if ((unsigned int) x <= 65535) - return x; - - if (x < 0) - return 0; - - return 65535; -} -#endif - -static float stbir__srgb_uchar_to_linear_float[256] = { - 0.000000f, 0.000304f, 0.000607f, 0.000911f, 0.001214f, 0.001518f, 0.001821f, 0.002125f, 0.002428f, 0.002732f, 0.003035f, - 0.003347f, 0.003677f, 0.004025f, 0.004391f, 0.004777f, 0.005182f, 0.005605f, 0.006049f, 0.006512f, 0.006995f, 0.007499f, - 0.008023f, 0.008568f, 0.009134f, 0.009721f, 0.010330f, 0.010960f, 0.011612f, 0.012286f, 0.012983f, 0.013702f, 0.014444f, - 0.015209f, 0.015996f, 0.016807f, 0.017642f, 0.018500f, 0.019382f, 0.020289f, 0.021219f, 0.022174f, 0.023153f, 0.024158f, - 0.025187f, 0.026241f, 0.027321f, 0.028426f, 0.029557f, 0.030713f, 0.031896f, 0.033105f, 0.034340f, 0.035601f, 0.036889f, - 0.038204f, 0.039546f, 0.040915f, 0.042311f, 0.043735f, 0.045186f, 0.046665f, 0.048172f, 0.049707f, 0.051269f, 0.052861f, - 0.054480f, 0.056128f, 0.057805f, 0.059511f, 0.061246f, 0.063010f, 0.064803f, 0.066626f, 0.068478f, 0.070360f, 0.072272f, - 0.074214f, 0.076185f, 0.078187f, 0.080220f, 0.082283f, 0.084376f, 0.086500f, 0.088656f, 0.090842f, 0.093059f, 0.095307f, - 0.097587f, 0.099899f, 0.102242f, 0.104616f, 0.107023f, 0.109462f, 0.111932f, 0.114435f, 0.116971f, 0.119538f, 0.122139f, - 0.124772f, 0.127438f, 0.130136f, 0.132868f, 0.135633f, 0.138432f, 0.141263f, 0.144128f, 0.147027f, 0.149960f, 0.152926f, - 0.155926f, 0.158961f, 0.162029f, 0.165132f, 0.168269f, 0.171441f, 0.174647f, 0.177888f, 0.181164f, 0.184475f, 0.187821f, - 0.191202f, 0.194618f, 0.198069f, 0.201556f, 0.205079f, 0.208637f, 0.212231f, 0.215861f, 0.219526f, 0.223228f, 0.226966f, - 0.230740f, 0.234551f, 0.238398f, 0.242281f, 0.246201f, 0.250158f, 0.254152f, 0.258183f, 0.262251f, 0.266356f, 0.270498f, - 0.274677f, 0.278894f, 0.283149f, 0.287441f, 0.291771f, 0.296138f, 0.300544f, 0.304987f, 0.309469f, 0.313989f, 0.318547f, - 0.323143f, 0.327778f, 0.332452f, 0.337164f, 0.341914f, 0.346704f, 0.351533f, 0.356400f, 0.361307f, 0.366253f, 0.371238f, - 0.376262f, 0.381326f, 0.386430f, 0.391573f, 0.396755f, 0.401978f, 0.407240f, 0.412543f, 0.417885f, 0.423268f, 0.428691f, - 0.434154f, 0.439657f, 0.445201f, 0.450786f, 0.456411f, 0.462077f, 0.467784f, 0.473532f, 0.479320f, 0.485150f, 0.491021f, - 0.496933f, 0.502887f, 0.508881f, 0.514918f, 0.520996f, 0.527115f, 0.533276f, 0.539480f, 0.545725f, 0.552011f, 0.558340f, - 0.564712f, 0.571125f, 0.577581f, 0.584078f, 0.590619f, 0.597202f, 0.603827f, 0.610496f, 0.617207f, 0.623960f, 0.630757f, - 0.637597f, 0.644480f, 0.651406f, 0.658375f, 0.665387f, 0.672443f, 0.679543f, 0.686685f, 0.693872f, 0.701102f, 0.708376f, - 0.715694f, 0.723055f, 0.730461f, 0.737911f, 0.745404f, 0.752942f, 0.760525f, 0.768151f, 0.775822f, 0.783538f, 0.791298f, - 0.799103f, 0.806952f, 0.814847f, 0.822786f, 0.830770f, 0.838799f, 0.846873f, 0.854993f, 0.863157f, 0.871367f, 0.879622f, - 0.887923f, 0.896269f, 0.904661f, 0.913099f, 0.921582f, 0.930111f, 0.938686f, 0.947307f, 0.955974f, 0.964686f, 0.973445f, - 0.982251f, 0.991102f, 1.0f -}; - -static float stbir__srgb_to_linear(float f) -{ - if (f <= 0.04045f) - return f / 12.92f; - else - return (float)pow((f + 0.055f) / 1.055f, 2.4f); -} - -static float stbir__linear_to_srgb(float f) -{ - if (f <= 0.0031308f) - return f * 12.92f; - else - return 1.055f * (float)pow(f, 1 / 2.4f) - 0.055f; -} - -#ifndef STBIR_NON_IEEE_FLOAT -// From https://gist.github.com/rygorous/2203834 - -typedef union -{ - stbir_uint32 u; - float f; -} stbir__FP32; - -static const stbir_uint32 fp32_to_srgb8_tab4[104] = { - 0x0073000d, 0x007a000d, 0x0080000d, 0x0087000d, 0x008d000d, 0x0094000d, 0x009a000d, 0x00a1000d, - 0x00a7001a, 0x00b4001a, 0x00c1001a, 0x00ce001a, 0x00da001a, 0x00e7001a, 0x00f4001a, 0x0101001a, - 0x010e0033, 0x01280033, 0x01410033, 0x015b0033, 0x01750033, 0x018f0033, 0x01a80033, 0x01c20033, - 0x01dc0067, 0x020f0067, 0x02430067, 0x02760067, 0x02aa0067, 0x02dd0067, 0x03110067, 0x03440067, - 0x037800ce, 0x03df00ce, 0x044600ce, 0x04ad00ce, 0x051400ce, 0x057b00c5, 0x05dd00bc, 0x063b00b5, - 0x06970158, 0x07420142, 0x07e30130, 0x087b0120, 0x090b0112, 0x09940106, 0x0a1700fc, 0x0a9500f2, - 0x0b0f01cb, 0x0bf401ae, 0x0ccb0195, 0x0d950180, 0x0e56016e, 0x0f0d015e, 0x0fbc0150, 0x10630143, - 0x11070264, 0x1238023e, 0x1357021d, 0x14660201, 0x156601e9, 0x165a01d3, 0x174401c0, 0x182401af, - 0x18fe0331, 0x1a9602fe, 0x1c1502d2, 0x1d7e02ad, 0x1ed4028d, 0x201a0270, 0x21520256, 0x227d0240, - 0x239f0443, 0x25c003fe, 0x27bf03c4, 0x29a10392, 0x2b6a0367, 0x2d1d0341, 0x2ebe031f, 0x304d0300, - 0x31d105b0, 0x34a80555, 0x37520507, 0x39d504c5, 0x3c37048b, 0x3e7c0458, 0x40a8042a, 0x42bd0401, - 0x44c20798, 0x488e071e, 0x4c1c06b6, 0x4f76065d, 0x52a50610, 0x55ac05cc, 0x5892058f, 0x5b590559, - 0x5e0c0a23, 0x631c0980, 0x67db08f6, 0x6c55087f, 0x70940818, 0x74a007bd, 0x787d076c, 0x7c330723, -}; - -static stbir_uint8 stbir__linear_to_srgb_uchar(float in) -{ - static const stbir__FP32 almostone = { 0x3f7fffff }; // 1-eps - static const stbir__FP32 minval = { (127-13) << 23 }; - stbir_uint32 tab,bias,scale,t; - stbir__FP32 f; - - // Clamp to [2^(-13), 1-eps]; these two values map to 0 and 1, respectively. - // The tests are carefully written so that NaNs map to 0, same as in the reference - // implementation. - if (!(in > minval.f)) // written this way to catch NaNs - in = minval.f; - if (in > almostone.f) - in = almostone.f; - - // Do the table lookup and unpack bias, scale - f.f = in; - tab = fp32_to_srgb8_tab4[(f.u - minval.u) >> 20]; - bias = (tab >> 16) << 9; - scale = tab & 0xffff; - - // Grab next-highest mantissa bits and perform linear interpolation - t = (f.u >> 12) & 0xff; - return (unsigned char) ((bias + scale*t) >> 16); -} - -#else -// sRGB transition values, scaled by 1<<28 -static int stbir__srgb_offset_to_linear_scaled[256] = -{ - 0, 40738, 122216, 203693, 285170, 366648, 448125, 529603, - 611080, 692557, 774035, 855852, 942009, 1033024, 1128971, 1229926, - 1335959, 1447142, 1563542, 1685229, 1812268, 1944725, 2082664, 2226148, - 2375238, 2529996, 2690481, 2856753, 3028870, 3206888, 3390865, 3580856, - 3776916, 3979100, 4187460, 4402049, 4622919, 4850123, 5083710, 5323731, - 5570236, 5823273, 6082892, 6349140, 6622065, 6901714, 7188133, 7481369, - 7781466, 8088471, 8402427, 8723380, 9051372, 9386448, 9728650, 10078021, - 10434603, 10798439, 11169569, 11548036, 11933879, 12327139, 12727857, 13136073, - 13551826, 13975156, 14406100, 14844697, 15290987, 15745007, 16206795, 16676389, - 17153826, 17639142, 18132374, 18633560, 19142734, 19659934, 20185196, 20718552, - 21260042, 21809696, 22367554, 22933648, 23508010, 24090680, 24681686, 25281066, - 25888850, 26505076, 27129772, 27762974, 28404716, 29055026, 29713942, 30381490, - 31057708, 31742624, 32436272, 33138682, 33849884, 34569912, 35298800, 36036568, - 36783260, 37538896, 38303512, 39077136, 39859796, 40651528, 41452360, 42262316, - 43081432, 43909732, 44747252, 45594016, 46450052, 47315392, 48190064, 49074096, - 49967516, 50870356, 51782636, 52704392, 53635648, 54576432, 55526772, 56486700, - 57456236, 58435408, 59424248, 60422780, 61431036, 62449032, 63476804, 64514376, - 65561776, 66619028, 67686160, 68763192, 69850160, 70947088, 72053992, 73170912, - 74297864, 75434880, 76581976, 77739184, 78906536, 80084040, 81271736, 82469648, - 83677792, 84896192, 86124888, 87363888, 88613232, 89872928, 91143016, 92423512, - 93714432, 95015816, 96327688, 97650056, 98982952, 100326408, 101680440, 103045072, - 104420320, 105806224, 107202800, 108610064, 110028048, 111456776, 112896264, 114346544, - 115807632, 117279552, 118762328, 120255976, 121760536, 123276016, 124802440, 126339832, - 127888216, 129447616, 131018048, 132599544, 134192112, 135795792, 137410592, 139036528, - 140673648, 142321952, 143981456, 145652208, 147334208, 149027488, 150732064, 152447968, - 154175200, 155913792, 157663776, 159425168, 161197984, 162982240, 164777968, 166585184, - 168403904, 170234160, 172075968, 173929344, 175794320, 177670896, 179559120, 181458992, - 183370528, 185293776, 187228736, 189175424, 191133888, 193104112, 195086128, 197079968, - 199085648, 201103184, 203132592, 205173888, 207227120, 209292272, 211369392, 213458480, - 215559568, 217672656, 219797792, 221934976, 224084240, 226245600, 228419056, 230604656, - 232802400, 235012320, 237234432, 239468736, 241715280, 243974080, 246245120, 248528464, - 250824112, 253132064, 255452368, 257785040, 260130080, 262487520, 264857376, 267239664, -}; - -static stbir_uint8 stbir__linear_to_srgb_uchar(float f) -{ - int x = (int) (f * (1 << 28)); // has headroom so you don't need to clamp - int v = 0; - int i; - - // Refine the guess with a short binary search. - i = v + 128; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - i = v + 64; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - i = v + 32; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - i = v + 16; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - i = v + 8; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - i = v + 4; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - i = v + 2; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - i = v + 1; if (x >= stbir__srgb_offset_to_linear_scaled[i]) v = i; - - return (stbir_uint8) v; -} -#endif - -static float stbir__filter_trapezoid(float x, float scale) -{ - float halfscale = scale / 2; - float t = 0.5f + halfscale; - STBIR_ASSERT(scale <= 1); - - x = (float)fabs(x); - - if (x >= t) - return 0; - else - { - float r = 0.5f - halfscale; - if (x <= r) - return 1; - else - return (t - x) / scale; - } -} - -static float stbir__support_trapezoid(float scale) -{ - STBIR_ASSERT(scale <= 1); - return 0.5f + scale / 2; -} - -static float stbir__filter_triangle(float x, float s) -{ - STBIR__UNUSED_PARAM(s); - - x = (float)fabs(x); - - if (x <= 1.0f) - return 1 - x; - else - return 0; -} - -static float stbir__filter_cubic(float x, float s) -{ - STBIR__UNUSED_PARAM(s); - - x = (float)fabs(x); - - if (x < 1.0f) - return (4 + x*x*(3*x - 6))/6; - else if (x < 2.0f) - return (8 + x*(-12 + x*(6 - x)))/6; - - return (0.0f); -} - -static float stbir__filter_catmullrom(float x, float s) -{ - STBIR__UNUSED_PARAM(s); - - x = (float)fabs(x); - - if (x < 1.0f) - return 1 - x*x*(2.5f - 1.5f*x); - else if (x < 2.0f) - return 2 - x*(4 + x*(0.5f*x - 2.5f)); - - return (0.0f); -} - -static float stbir__filter_mitchell(float x, float s) -{ - STBIR__UNUSED_PARAM(s); - - x = (float)fabs(x); - - if (x < 1.0f) - return (16 + x*x*(21 * x - 36))/18; - else if (x < 2.0f) - return (32 + x*(-60 + x*(36 - 7*x)))/18; - - return (0.0f); -} - -static float stbir__support_zero(float s) -{ - STBIR__UNUSED_PARAM(s); - return 0; -} - -static float stbir__support_one(float s) -{ - STBIR__UNUSED_PARAM(s); - return 1; -} - -static float stbir__support_two(float s) -{ - STBIR__UNUSED_PARAM(s); - return 2; -} - -static stbir__filter_info stbir__filter_info_table[] = { - { NULL, stbir__support_zero }, - { stbir__filter_trapezoid, stbir__support_trapezoid }, - { stbir__filter_triangle, stbir__support_one }, - { stbir__filter_cubic, stbir__support_two }, - { stbir__filter_catmullrom, stbir__support_two }, - { stbir__filter_mitchell, stbir__support_two }, -}; - -stbir__inline static int stbir__use_upsampling(float ratio) -{ - return ratio > 1; -} - -stbir__inline static int stbir__use_width_upsampling(stbir__info* stbir_info) -{ - return stbir__use_upsampling(stbir_info->horizontal_scale); -} - -stbir__inline static int stbir__use_height_upsampling(stbir__info* stbir_info) -{ - return stbir__use_upsampling(stbir_info->vertical_scale); -} - -// This is the maximum number of input samples that can affect an output sample -// with the given filter -static int stbir__get_filter_pixel_width(stbir_filter filter, float scale) -{ - STBIR_ASSERT(filter != 0); - STBIR_ASSERT(filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); - - if (stbir__use_upsampling(scale)) - return (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2); - else - return (int)ceil(stbir__filter_info_table[filter].support(scale) * 2 / scale); -} - -// This is how much to expand buffers to account for filters seeking outside -// the image boundaries. -static int stbir__get_filter_pixel_margin(stbir_filter filter, float scale) -{ - return stbir__get_filter_pixel_width(filter, scale) / 2; -} - -static int stbir__get_coefficient_width(stbir_filter filter, float scale) -{ - if (stbir__use_upsampling(scale)) - return (int)ceil(stbir__filter_info_table[filter].support(1 / scale) * 2); - else - return (int)ceil(stbir__filter_info_table[filter].support(scale) * 2); -} - -static int stbir__get_contributors(float scale, stbir_filter filter, int input_size, int output_size) -{ - if (stbir__use_upsampling(scale)) - return output_size; - else - return (input_size + stbir__get_filter_pixel_margin(filter, scale) * 2); -} - -static int stbir__get_total_horizontal_coefficients(stbir__info* info) -{ - return info->horizontal_num_contributors - * stbir__get_coefficient_width (info->horizontal_filter, info->horizontal_scale); -} - -static int stbir__get_total_vertical_coefficients(stbir__info* info) -{ - return info->vertical_num_contributors - * stbir__get_coefficient_width (info->vertical_filter, info->vertical_scale); -} - -static stbir__contributors* stbir__get_contributor(stbir__contributors* contributors, int n) -{ - return &contributors[n]; -} - -// For perf reasons this code is duplicated in stbir__resample_horizontal_upsample/downsample, -// if you change it here change it there too. -static float* stbir__get_coefficient(float* coefficients, stbir_filter filter, float scale, int n, int c) -{ - int width = stbir__get_coefficient_width(filter, scale); - return &coefficients[width*n + c]; -} - -static int stbir__edge_wrap_slow(stbir_edge edge, int n, int max) -{ - switch (edge) - { - case STBIR_EDGE_ZERO: - return 0; // we'll decode the wrong pixel here, and then overwrite with 0s later - - case STBIR_EDGE_CLAMP: - if (n < 0) - return 0; - - if (n >= max) - return max - 1; - - return n; // NOTREACHED - - case STBIR_EDGE_REFLECT: - { - if (n < 0) - { - if (n < max) - return -n; - else - return max - 1; - } - - if (n >= max) - { - int max2 = max * 2; - if (n >= max2) - return 0; - else - return max2 - n - 1; - } - - return n; // NOTREACHED - } - - case STBIR_EDGE_WRAP: - if (n >= 0) - return (n % max); - else - { - int m = (-n) % max; - - if (m != 0) - m = max - m; - - return (m); - } - // NOTREACHED - - default: - STBIR_ASSERT(!"Unimplemented edge type"); - return 0; - } -} - -stbir__inline static int stbir__edge_wrap(stbir_edge edge, int n, int max) -{ - // avoid per-pixel switch - if (n >= 0 && n < max) - return n; - return stbir__edge_wrap_slow(edge, n, max); -} - -// What input pixels contribute to this output pixel? -static void stbir__calculate_sample_range_upsample(int n, float out_filter_radius, float scale_ratio, float out_shift, int* in_first_pixel, int* in_last_pixel, float* in_center_of_out) -{ - float out_pixel_center = (float)n + 0.5f; - float out_pixel_influence_lowerbound = out_pixel_center - out_filter_radius; - float out_pixel_influence_upperbound = out_pixel_center + out_filter_radius; - - float in_pixel_influence_lowerbound = (out_pixel_influence_lowerbound + out_shift) / scale_ratio; - float in_pixel_influence_upperbound = (out_pixel_influence_upperbound + out_shift) / scale_ratio; - - *in_center_of_out = (out_pixel_center + out_shift) / scale_ratio; - *in_first_pixel = (int)(floor(in_pixel_influence_lowerbound + 0.5)); - *in_last_pixel = (int)(floor(in_pixel_influence_upperbound - 0.5)); -} - -// What output pixels does this input pixel contribute to? -static void stbir__calculate_sample_range_downsample(int n, float in_pixels_radius, float scale_ratio, float out_shift, int* out_first_pixel, int* out_last_pixel, float* out_center_of_in) -{ - float in_pixel_center = (float)n + 0.5f; - float in_pixel_influence_lowerbound = in_pixel_center - in_pixels_radius; - float in_pixel_influence_upperbound = in_pixel_center + in_pixels_radius; - - float out_pixel_influence_lowerbound = in_pixel_influence_lowerbound * scale_ratio - out_shift; - float out_pixel_influence_upperbound = in_pixel_influence_upperbound * scale_ratio - out_shift; - - *out_center_of_in = in_pixel_center * scale_ratio - out_shift; - *out_first_pixel = (int)(floor(out_pixel_influence_lowerbound + 0.5)); - *out_last_pixel = (int)(floor(out_pixel_influence_upperbound - 0.5)); -} - -static void stbir__calculate_coefficients_upsample(stbir_filter filter, float scale, int in_first_pixel, int in_last_pixel, float in_center_of_out, stbir__contributors* contributor, float* coefficient_group) -{ - int i; - float total_filter = 0; - float filter_scale; - - STBIR_ASSERT(in_last_pixel - in_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical. - - contributor->n0 = in_first_pixel; - contributor->n1 = in_last_pixel; - - STBIR_ASSERT(contributor->n1 >= contributor->n0); - - for (i = 0; i <= in_last_pixel - in_first_pixel; i++) - { - float in_pixel_center = (float)(i + in_first_pixel) + 0.5f; - coefficient_group[i] = stbir__filter_info_table[filter].kernel(in_center_of_out - in_pixel_center, 1 / scale); - - // If the coefficient is zero, skip it. (Don't do the <0 check here, we want the influence of those outside pixels.) - if (i == 0 && !coefficient_group[i]) - { - contributor->n0 = ++in_first_pixel; - i--; - continue; - } - - total_filter += coefficient_group[i]; - } - - // NOTE(fg): Not actually true in general, nor is there any reason to expect it should be. - // It would be true in exact math but is at best approximately true in floating-point math, - // and it would not make sense to try and put actual bounds on this here because it depends - // on the image aspect ratio which can get pretty extreme. - //STBIR_ASSERT(stbir__filter_info_table[filter].kernel((float)(in_last_pixel + 1) + 0.5f - in_center_of_out, 1/scale) == 0); - - STBIR_ASSERT(total_filter > 0.9); - STBIR_ASSERT(total_filter < 1.1f); // Make sure it's not way off. - - // Make sure the sum of all coefficients is 1. - filter_scale = 1 / total_filter; - - for (i = 0; i <= in_last_pixel - in_first_pixel; i++) - coefficient_group[i] *= filter_scale; - - for (i = in_last_pixel - in_first_pixel; i >= 0; i--) - { - if (coefficient_group[i]) - break; - - // This line has no weight. We can skip it. - contributor->n1 = contributor->n0 + i - 1; - } -} - -static void stbir__calculate_coefficients_downsample(stbir_filter filter, float scale_ratio, int out_first_pixel, int out_last_pixel, float out_center_of_in, stbir__contributors* contributor, float* coefficient_group) -{ - int i; - - STBIR_ASSERT(out_last_pixel - out_first_pixel <= (int)ceil(stbir__filter_info_table[filter].support(scale_ratio) * 2)); // Taken directly from stbir__get_coefficient_width() which we can't call because we don't know if we're horizontal or vertical. - - contributor->n0 = out_first_pixel; - contributor->n1 = out_last_pixel; - - STBIR_ASSERT(contributor->n1 >= contributor->n0); - - for (i = 0; i <= out_last_pixel - out_first_pixel; i++) - { - float out_pixel_center = (float)(i + out_first_pixel) + 0.5f; - float x = out_pixel_center - out_center_of_in; - coefficient_group[i] = stbir__filter_info_table[filter].kernel(x, scale_ratio) * scale_ratio; - } - - // NOTE(fg): Not actually true in general, nor is there any reason to expect it should be. - // It would be true in exact math but is at best approximately true in floating-point math, - // and it would not make sense to try and put actual bounds on this here because it depends - // on the image aspect ratio which can get pretty extreme. - //STBIR_ASSERT(stbir__filter_info_table[filter].kernel((float)(out_last_pixel + 1) + 0.5f - out_center_of_in, scale_ratio) == 0); - - for (i = out_last_pixel - out_first_pixel; i >= 0; i--) - { - if (coefficient_group[i]) - break; - - // This line has no weight. We can skip it. - contributor->n1 = contributor->n0 + i - 1; - } -} - -static void stbir__normalize_downsample_coefficients(stbir__contributors* contributors, float* coefficients, stbir_filter filter, float scale_ratio, int input_size, int output_size) -{ - int num_contributors = stbir__get_contributors(scale_ratio, filter, input_size, output_size); - int num_coefficients = stbir__get_coefficient_width(filter, scale_ratio); - int i, j; - int skip; - - for (i = 0; i < output_size; i++) - { - float scale; - float total = 0; - - for (j = 0; j < num_contributors; j++) - { - if (i >= contributors[j].n0 && i <= contributors[j].n1) - { - float coefficient = *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i - contributors[j].n0); - total += coefficient; - } - else if (i < contributors[j].n0) - break; - } - - STBIR_ASSERT(total > 0.9f); - STBIR_ASSERT(total < 1.1f); - - scale = 1 / total; - - for (j = 0; j < num_contributors; j++) - { - if (i >= contributors[j].n0 && i <= contributors[j].n1) - *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i - contributors[j].n0) *= scale; - else if (i < contributors[j].n0) - break; - } - } - - // Optimize: Skip zero coefficients and contributions outside of image bounds. - // Do this after normalizing because normalization depends on the n0/n1 values. - for (j = 0; j < num_contributors; j++) - { - int range, max, width; - - skip = 0; - while (*stbir__get_coefficient(coefficients, filter, scale_ratio, j, skip) == 0) - skip++; - - contributors[j].n0 += skip; - - while (contributors[j].n0 < 0) - { - contributors[j].n0++; - skip++; - } - - range = contributors[j].n1 - contributors[j].n0 + 1; - max = stbir__min(num_coefficients, range); - - width = stbir__get_coefficient_width(filter, scale_ratio); - for (i = 0; i < max; i++) - { - if (i + skip >= width) - break; - - *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i) = *stbir__get_coefficient(coefficients, filter, scale_ratio, j, i + skip); - } - - continue; - } - - // Using min to avoid writing into invalid pixels. - for (i = 0; i < num_contributors; i++) - contributors[i].n1 = stbir__min(contributors[i].n1, output_size - 1); -} - -// Each scan line uses the same kernel values so we should calculate the kernel -// values once and then we can use them for every scan line. -static void stbir__calculate_filters(stbir__contributors* contributors, float* coefficients, stbir_filter filter, float scale_ratio, float shift, int input_size, int output_size) -{ - int n; - int total_contributors = stbir__get_contributors(scale_ratio, filter, input_size, output_size); - - if (stbir__use_upsampling(scale_ratio)) - { - float out_pixels_radius = stbir__filter_info_table[filter].support(1 / scale_ratio) * scale_ratio; - - // Looping through out pixels - for (n = 0; n < total_contributors; n++) - { - float in_center_of_out; // Center of the current out pixel in the in pixel space - int in_first_pixel, in_last_pixel; - - stbir__calculate_sample_range_upsample(n, out_pixels_radius, scale_ratio, shift, &in_first_pixel, &in_last_pixel, &in_center_of_out); - - stbir__calculate_coefficients_upsample(filter, scale_ratio, in_first_pixel, in_last_pixel, in_center_of_out, stbir__get_contributor(contributors, n), stbir__get_coefficient(coefficients, filter, scale_ratio, n, 0)); - } - } - else - { - float in_pixels_radius = stbir__filter_info_table[filter].support(scale_ratio) / scale_ratio; - - // Looping through in pixels - for (n = 0; n < total_contributors; n++) - { - float out_center_of_in; // Center of the current out pixel in the in pixel space - int out_first_pixel, out_last_pixel; - int n_adjusted = n - stbir__get_filter_pixel_margin(filter, scale_ratio); - - stbir__calculate_sample_range_downsample(n_adjusted, in_pixels_radius, scale_ratio, shift, &out_first_pixel, &out_last_pixel, &out_center_of_in); - - stbir__calculate_coefficients_downsample(filter, scale_ratio, out_first_pixel, out_last_pixel, out_center_of_in, stbir__get_contributor(contributors, n), stbir__get_coefficient(coefficients, filter, scale_ratio, n, 0)); - } - - stbir__normalize_downsample_coefficients(contributors, coefficients, filter, scale_ratio, input_size, output_size); - } -} - -static float* stbir__get_decode_buffer(stbir__info* stbir_info) -{ - // The 0 index of the decode buffer starts after the margin. This makes - // it okay to use negative indexes on the decode buffer. - return &stbir_info->decode_buffer[stbir_info->horizontal_filter_pixel_margin * stbir_info->channels]; -} - -#define STBIR__DECODE(type, colorspace) ((int)(type) * (STBIR_MAX_COLORSPACES) + (int)(colorspace)) - -static void stbir__decode_scanline(stbir__info* stbir_info, int n) -{ - int c; - int channels = stbir_info->channels; - int alpha_channel = stbir_info->alpha_channel; - int type = stbir_info->type; - int colorspace = stbir_info->colorspace; - int input_w = stbir_info->input_w; - size_t input_stride_bytes = stbir_info->input_stride_bytes; - float* decode_buffer = stbir__get_decode_buffer(stbir_info); - stbir_edge edge_horizontal = stbir_info->edge_horizontal; - stbir_edge edge_vertical = stbir_info->edge_vertical; - size_t in_buffer_row_offset = stbir__edge_wrap(edge_vertical, n, stbir_info->input_h) * input_stride_bytes; - const void* input_data = (char *) stbir_info->input_data + in_buffer_row_offset; - int max_x = input_w + stbir_info->horizontal_filter_pixel_margin; - int decode = STBIR__DECODE(type, colorspace); - - int x = -stbir_info->horizontal_filter_pixel_margin; - - // special handling for STBIR_EDGE_ZERO because it needs to return an item that doesn't appear in the input, - // and we want to avoid paying overhead on every pixel if not STBIR_EDGE_ZERO - if (edge_vertical == STBIR_EDGE_ZERO && (n < 0 || n >= stbir_info->input_h)) - { - for (; x < max_x; x++) - for (c = 0; c < channels; c++) - decode_buffer[x*channels + c] = 0; - return; - } - - switch (decode) - { - case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_LINEAR): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = ((float)((const unsigned char*)input_data)[input_pixel_index + c]) / stbir__max_uint8_as_float; - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_SRGB): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = stbir__srgb_uchar_to_linear_float[((const unsigned char*)input_data)[input_pixel_index + c]]; - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) - decode_buffer[decode_pixel_index + alpha_channel] = ((float)((const unsigned char*)input_data)[input_pixel_index + alpha_channel]) / stbir__max_uint8_as_float; - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_LINEAR): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = ((float)((const unsigned short*)input_data)[input_pixel_index + c]) / stbir__max_uint16_as_float; - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_SRGB): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = stbir__srgb_to_linear(((float)((const unsigned short*)input_data)[input_pixel_index + c]) / stbir__max_uint16_as_float); - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) - decode_buffer[decode_pixel_index + alpha_channel] = ((float)((const unsigned short*)input_data)[input_pixel_index + alpha_channel]) / stbir__max_uint16_as_float; - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_LINEAR): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = (float)(((double)((const unsigned int*)input_data)[input_pixel_index + c]) / stbir__max_uint32_as_float); - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_SRGB): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = stbir__srgb_to_linear((float)(((double)((const unsigned int*)input_data)[input_pixel_index + c]) / stbir__max_uint32_as_float)); - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) - decode_buffer[decode_pixel_index + alpha_channel] = (float)(((double)((const unsigned int*)input_data)[input_pixel_index + alpha_channel]) / stbir__max_uint32_as_float); - } - break; - - case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_LINEAR): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = ((const float*)input_data)[input_pixel_index + c]; - } - break; - - case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_SRGB): - for (; x < max_x; x++) - { - int decode_pixel_index = x * channels; - int input_pixel_index = stbir__edge_wrap(edge_horizontal, x, input_w) * channels; - for (c = 0; c < channels; c++) - decode_buffer[decode_pixel_index + c] = stbir__srgb_to_linear(((const float*)input_data)[input_pixel_index + c]); - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) - decode_buffer[decode_pixel_index + alpha_channel] = ((const float*)input_data)[input_pixel_index + alpha_channel]; - } - - break; - - default: - STBIR_ASSERT(!"Unknown type/colorspace/channels combination."); - break; - } - - if (!(stbir_info->flags & STBIR_FLAG_ALPHA_PREMULTIPLIED)) - { - for (x = -stbir_info->horizontal_filter_pixel_margin; x < max_x; x++) - { - int decode_pixel_index = x * channels; - - // If the alpha value is 0 it will clobber the color values. Make sure it's not. - float alpha = decode_buffer[decode_pixel_index + alpha_channel]; -#ifndef STBIR_NO_ALPHA_EPSILON - if (stbir_info->type != STBIR_TYPE_FLOAT) { - alpha += STBIR_ALPHA_EPSILON; - decode_buffer[decode_pixel_index + alpha_channel] = alpha; - } -#endif - for (c = 0; c < channels; c++) - { - if (c == alpha_channel) - continue; - - decode_buffer[decode_pixel_index + c] *= alpha; - } - } - } - - if (edge_horizontal == STBIR_EDGE_ZERO) - { - for (x = -stbir_info->horizontal_filter_pixel_margin; x < 0; x++) - { - for (c = 0; c < channels; c++) - decode_buffer[x*channels + c] = 0; - } - for (x = input_w; x < max_x; x++) - { - for (c = 0; c < channels; c++) - decode_buffer[x*channels + c] = 0; - } - } -} - -static float* stbir__get_ring_buffer_entry(float* ring_buffer, int index, int ring_buffer_length) -{ - return &ring_buffer[index * ring_buffer_length]; -} - -static float* stbir__add_empty_ring_buffer_entry(stbir__info* stbir_info, int n) -{ - int ring_buffer_index; - float* ring_buffer; - - stbir_info->ring_buffer_last_scanline = n; - - if (stbir_info->ring_buffer_begin_index < 0) - { - ring_buffer_index = stbir_info->ring_buffer_begin_index = 0; - stbir_info->ring_buffer_first_scanline = n; - } - else - { - ring_buffer_index = (stbir_info->ring_buffer_begin_index + (stbir_info->ring_buffer_last_scanline - stbir_info->ring_buffer_first_scanline)) % stbir_info->ring_buffer_num_entries; - STBIR_ASSERT(ring_buffer_index != stbir_info->ring_buffer_begin_index); - } - - ring_buffer = stbir__get_ring_buffer_entry(stbir_info->ring_buffer, ring_buffer_index, stbir_info->ring_buffer_length_bytes / sizeof(float)); - memset(ring_buffer, 0, stbir_info->ring_buffer_length_bytes); - - return ring_buffer; -} - - -static void stbir__resample_horizontal_upsample(stbir__info* stbir_info, float* output_buffer) -{ - int x, k; - int output_w = stbir_info->output_w; - int channels = stbir_info->channels; - float* decode_buffer = stbir__get_decode_buffer(stbir_info); - stbir__contributors* horizontal_contributors = stbir_info->horizontal_contributors; - float* horizontal_coefficients = stbir_info->horizontal_coefficients; - int coefficient_width = stbir_info->horizontal_coefficient_width; - - for (x = 0; x < output_w; x++) - { - int n0 = horizontal_contributors[x].n0; - int n1 = horizontal_contributors[x].n1; - - int out_pixel_index = x * channels; - int coefficient_group = coefficient_width * x; - int coefficient_counter = 0; - - STBIR_ASSERT(n1 >= n0); - STBIR_ASSERT(n0 >= -stbir_info->horizontal_filter_pixel_margin); - STBIR_ASSERT(n1 >= -stbir_info->horizontal_filter_pixel_margin); - STBIR_ASSERT(n0 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin); - STBIR_ASSERT(n1 < stbir_info->input_w + stbir_info->horizontal_filter_pixel_margin); - - switch (channels) { - case 1: - for (k = n0; k <= n1; k++) - { - int in_pixel_index = k * 1; - float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; - STBIR_ASSERT(coefficient != 0); - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - } - break; - case 2: - for (k = n0; k <= n1; k++) - { - int in_pixel_index = k * 2; - float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; - STBIR_ASSERT(coefficient != 0); - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; - } - break; - case 3: - for (k = n0; k <= n1; k++) - { - int in_pixel_index = k * 3; - float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; - STBIR_ASSERT(coefficient != 0); - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; - output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; - } - break; - case 4: - for (k = n0; k <= n1; k++) - { - int in_pixel_index = k * 4; - float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; - STBIR_ASSERT(coefficient != 0); - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; - output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; - output_buffer[out_pixel_index + 3] += decode_buffer[in_pixel_index + 3] * coefficient; - } - break; - default: - for (k = n0; k <= n1; k++) - { - int in_pixel_index = k * channels; - float coefficient = horizontal_coefficients[coefficient_group + coefficient_counter++]; - int c; - STBIR_ASSERT(coefficient != 0); - for (c = 0; c < channels; c++) - output_buffer[out_pixel_index + c] += decode_buffer[in_pixel_index + c] * coefficient; - } - break; - } - } -} - -static void stbir__resample_horizontal_downsample(stbir__info* stbir_info, float* output_buffer) -{ - int x, k; - int input_w = stbir_info->input_w; - int channels = stbir_info->channels; - float* decode_buffer = stbir__get_decode_buffer(stbir_info); - stbir__contributors* horizontal_contributors = stbir_info->horizontal_contributors; - float* horizontal_coefficients = stbir_info->horizontal_coefficients; - int coefficient_width = stbir_info->horizontal_coefficient_width; - int filter_pixel_margin = stbir_info->horizontal_filter_pixel_margin; - int max_x = input_w + filter_pixel_margin * 2; - - STBIR_ASSERT(!stbir__use_width_upsampling(stbir_info)); - - switch (channels) { - case 1: - for (x = 0; x < max_x; x++) - { - int n0 = horizontal_contributors[x].n0; - int n1 = horizontal_contributors[x].n1; - - int in_x = x - filter_pixel_margin; - int in_pixel_index = in_x * 1; - int max_n = n1; - int coefficient_group = coefficient_width * x; - - for (k = n0; k <= max_n; k++) - { - int out_pixel_index = k * 1; - float coefficient = horizontal_coefficients[coefficient_group + k - n0]; - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - } - } - break; - - case 2: - for (x = 0; x < max_x; x++) - { - int n0 = horizontal_contributors[x].n0; - int n1 = horizontal_contributors[x].n1; - - int in_x = x - filter_pixel_margin; - int in_pixel_index = in_x * 2; - int max_n = n1; - int coefficient_group = coefficient_width * x; - - for (k = n0; k <= max_n; k++) - { - int out_pixel_index = k * 2; - float coefficient = horizontal_coefficients[coefficient_group + k - n0]; - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; - } - } - break; - - case 3: - for (x = 0; x < max_x; x++) - { - int n0 = horizontal_contributors[x].n0; - int n1 = horizontal_contributors[x].n1; - - int in_x = x - filter_pixel_margin; - int in_pixel_index = in_x * 3; - int max_n = n1; - int coefficient_group = coefficient_width * x; - - for (k = n0; k <= max_n; k++) - { - int out_pixel_index = k * 3; - float coefficient = horizontal_coefficients[coefficient_group + k - n0]; - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; - output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; - } - } - break; - - case 4: - for (x = 0; x < max_x; x++) - { - int n0 = horizontal_contributors[x].n0; - int n1 = horizontal_contributors[x].n1; - - int in_x = x - filter_pixel_margin; - int in_pixel_index = in_x * 4; - int max_n = n1; - int coefficient_group = coefficient_width * x; - - for (k = n0; k <= max_n; k++) - { - int out_pixel_index = k * 4; - float coefficient = horizontal_coefficients[coefficient_group + k - n0]; - output_buffer[out_pixel_index + 0] += decode_buffer[in_pixel_index + 0] * coefficient; - output_buffer[out_pixel_index + 1] += decode_buffer[in_pixel_index + 1] * coefficient; - output_buffer[out_pixel_index + 2] += decode_buffer[in_pixel_index + 2] * coefficient; - output_buffer[out_pixel_index + 3] += decode_buffer[in_pixel_index + 3] * coefficient; - } - } - break; - - default: - for (x = 0; x < max_x; x++) - { - int n0 = horizontal_contributors[x].n0; - int n1 = horizontal_contributors[x].n1; - - int in_x = x - filter_pixel_margin; - int in_pixel_index = in_x * channels; - int max_n = n1; - int coefficient_group = coefficient_width * x; - - for (k = n0; k <= max_n; k++) - { - int c; - int out_pixel_index = k * channels; - float coefficient = horizontal_coefficients[coefficient_group + k - n0]; - for (c = 0; c < channels; c++) - output_buffer[out_pixel_index + c] += decode_buffer[in_pixel_index + c] * coefficient; - } - } - break; - } -} - -static void stbir__decode_and_resample_upsample(stbir__info* stbir_info, int n) -{ - // Decode the nth scanline from the source image into the decode buffer. - stbir__decode_scanline(stbir_info, n); - - // Now resample it into the ring buffer. - if (stbir__use_width_upsampling(stbir_info)) - stbir__resample_horizontal_upsample(stbir_info, stbir__add_empty_ring_buffer_entry(stbir_info, n)); - else - stbir__resample_horizontal_downsample(stbir_info, stbir__add_empty_ring_buffer_entry(stbir_info, n)); - - // Now it's sitting in the ring buffer ready to be used as source for the vertical sampling. -} - -static void stbir__decode_and_resample_downsample(stbir__info* stbir_info, int n) -{ - // Decode the nth scanline from the source image into the decode buffer. - stbir__decode_scanline(stbir_info, n); - - memset(stbir_info->horizontal_buffer, 0, stbir_info->output_w * stbir_info->channels * sizeof(float)); - - // Now resample it into the horizontal buffer. - if (stbir__use_width_upsampling(stbir_info)) - stbir__resample_horizontal_upsample(stbir_info, stbir_info->horizontal_buffer); - else - stbir__resample_horizontal_downsample(stbir_info, stbir_info->horizontal_buffer); - - // Now it's sitting in the horizontal buffer ready to be distributed into the ring buffers. -} - -// Get the specified scan line from the ring buffer. -static float* stbir__get_ring_buffer_scanline(int get_scanline, float* ring_buffer, int begin_index, int first_scanline, int ring_buffer_num_entries, int ring_buffer_length) -{ - int ring_buffer_index = (begin_index + (get_scanline - first_scanline)) % ring_buffer_num_entries; - return stbir__get_ring_buffer_entry(ring_buffer, ring_buffer_index, ring_buffer_length); -} - - -static void stbir__encode_scanline(stbir__info* stbir_info, int num_pixels, void *output_buffer, float *encode_buffer, int channels, int alpha_channel, int decode) -{ - int x; - int n; - int num_nonalpha; - stbir_uint16 nonalpha[STBIR_MAX_CHANNELS]; - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_PREMULTIPLIED)) - { - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - float alpha = encode_buffer[pixel_index + alpha_channel]; - float reciprocal_alpha = alpha ? 1.0f / alpha : 0; - - // unrolling this produced a 1% slowdown upscaling a large RGBA linear-space image on my machine - stb - for (n = 0; n < channels; n++) - if (n != alpha_channel) - encode_buffer[pixel_index + n] *= reciprocal_alpha; - - // We added in a small epsilon to prevent the color channel from being deleted with zero alpha. - // Because we only add it for integer types, it will automatically be discarded on integer - // conversion, so we don't need to subtract it back out (which would be problematic for - // numeric precision reasons). - } - } - - // build a table of all channels that need colorspace correction, so - // we don't perform colorspace correction on channels that don't need it. - for (x = 0, num_nonalpha = 0; x < channels; ++x) - { - if (x != alpha_channel || (stbir_info->flags & STBIR_FLAG_ALPHA_USES_COLORSPACE)) - { - nonalpha[num_nonalpha++] = (stbir_uint16)x; - } - } - - #define STBIR__ROUND_INT(f) ((int) ((f)+0.5)) - #define STBIR__ROUND_UINT(f) ((stbir_uint32) ((f)+0.5)) - - #ifdef STBIR__SATURATE_INT - #define STBIR__ENCODE_LINEAR8(f) stbir__saturate8 (STBIR__ROUND_INT((f) * stbir__max_uint8_as_float )) - #define STBIR__ENCODE_LINEAR16(f) stbir__saturate16(STBIR__ROUND_INT((f) * stbir__max_uint16_as_float)) - #else - #define STBIR__ENCODE_LINEAR8(f) (unsigned char ) STBIR__ROUND_INT(stbir__saturate(f) * stbir__max_uint8_as_float ) - #define STBIR__ENCODE_LINEAR16(f) (unsigned short) STBIR__ROUND_INT(stbir__saturate(f) * stbir__max_uint16_as_float) - #endif - - switch (decode) - { - case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_LINEAR): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < channels; n++) - { - int index = pixel_index + n; - ((unsigned char*)output_buffer)[index] = STBIR__ENCODE_LINEAR8(encode_buffer[index]); - } - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT8, STBIR_COLORSPACE_SRGB): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < num_nonalpha; n++) - { - int index = pixel_index + nonalpha[n]; - ((unsigned char*)output_buffer)[index] = stbir__linear_to_srgb_uchar(encode_buffer[index]); - } - - if (!(stbir_info->flags & STBIR_FLAG_ALPHA_USES_COLORSPACE)) - ((unsigned char *)output_buffer)[pixel_index + alpha_channel] = STBIR__ENCODE_LINEAR8(encode_buffer[pixel_index+alpha_channel]); - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_LINEAR): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < channels; n++) - { - int index = pixel_index + n; - ((unsigned short*)output_buffer)[index] = STBIR__ENCODE_LINEAR16(encode_buffer[index]); - } - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT16, STBIR_COLORSPACE_SRGB): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < num_nonalpha; n++) - { - int index = pixel_index + nonalpha[n]; - ((unsigned short*)output_buffer)[index] = (unsigned short)STBIR__ROUND_INT(stbir__linear_to_srgb(stbir__saturate(encode_buffer[index])) * stbir__max_uint16_as_float); - } - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) - ((unsigned short*)output_buffer)[pixel_index + alpha_channel] = STBIR__ENCODE_LINEAR16(encode_buffer[pixel_index + alpha_channel]); - } - - break; - - case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_LINEAR): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < channels; n++) - { - int index = pixel_index + n; - ((unsigned int*)output_buffer)[index] = (unsigned int)STBIR__ROUND_UINT(((double)stbir__saturate(encode_buffer[index])) * stbir__max_uint32_as_float); - } - } - break; - - case STBIR__DECODE(STBIR_TYPE_UINT32, STBIR_COLORSPACE_SRGB): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < num_nonalpha; n++) - { - int index = pixel_index + nonalpha[n]; - ((unsigned int*)output_buffer)[index] = (unsigned int)STBIR__ROUND_UINT(((double)stbir__linear_to_srgb(stbir__saturate(encode_buffer[index]))) * stbir__max_uint32_as_float); - } - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) - ((unsigned int*)output_buffer)[pixel_index + alpha_channel] = (unsigned int)STBIR__ROUND_INT(((double)stbir__saturate(encode_buffer[pixel_index + alpha_channel])) * stbir__max_uint32_as_float); - } - break; - - case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_LINEAR): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < channels; n++) - { - int index = pixel_index + n; - ((float*)output_buffer)[index] = encode_buffer[index]; - } - } - break; - - case STBIR__DECODE(STBIR_TYPE_FLOAT, STBIR_COLORSPACE_SRGB): - for (x=0; x < num_pixels; ++x) - { - int pixel_index = x*channels; - - for (n = 0; n < num_nonalpha; n++) - { - int index = pixel_index + nonalpha[n]; - ((float*)output_buffer)[index] = stbir__linear_to_srgb(encode_buffer[index]); - } - - if (!(stbir_info->flags&STBIR_FLAG_ALPHA_USES_COLORSPACE)) - ((float*)output_buffer)[pixel_index + alpha_channel] = encode_buffer[pixel_index + alpha_channel]; - } - break; - - default: - STBIR_ASSERT(!"Unknown type/colorspace/channels combination."); - break; - } -} - -static void stbir__resample_vertical_upsample(stbir__info* stbir_info, int n) -{ - int x, k; - int output_w = stbir_info->output_w; - stbir__contributors* vertical_contributors = stbir_info->vertical_contributors; - float* vertical_coefficients = stbir_info->vertical_coefficients; - int channels = stbir_info->channels; - int alpha_channel = stbir_info->alpha_channel; - int type = stbir_info->type; - int colorspace = stbir_info->colorspace; - int ring_buffer_entries = stbir_info->ring_buffer_num_entries; - void* output_data = stbir_info->output_data; - float* encode_buffer = stbir_info->encode_buffer; - int decode = STBIR__DECODE(type, colorspace); - int coefficient_width = stbir_info->vertical_coefficient_width; - int coefficient_counter; - int contributor = n; - - float* ring_buffer = stbir_info->ring_buffer; - int ring_buffer_begin_index = stbir_info->ring_buffer_begin_index; - int ring_buffer_first_scanline = stbir_info->ring_buffer_first_scanline; - int ring_buffer_length = stbir_info->ring_buffer_length_bytes/sizeof(float); - - int n0,n1, output_row_start; - int coefficient_group = coefficient_width * contributor; - - n0 = vertical_contributors[contributor].n0; - n1 = vertical_contributors[contributor].n1; - - output_row_start = n * stbir_info->output_stride_bytes; - - STBIR_ASSERT(stbir__use_height_upsampling(stbir_info)); - - memset(encode_buffer, 0, output_w * sizeof(float) * channels); - - // I tried reblocking this for better cache usage of encode_buffer - // (using x_outer, k, x_inner), but it lost speed. -- stb - - coefficient_counter = 0; - switch (channels) { - case 1: - for (k = n0; k <= n1; k++) - { - int coefficient_index = coefficient_counter++; - float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); - float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; - for (x = 0; x < output_w; ++x) - { - int in_pixel_index = x * 1; - encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; - } - } - break; - case 2: - for (k = n0; k <= n1; k++) - { - int coefficient_index = coefficient_counter++; - float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); - float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; - for (x = 0; x < output_w; ++x) - { - int in_pixel_index = x * 2; - encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; - encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient; - } - } - break; - case 3: - for (k = n0; k <= n1; k++) - { - int coefficient_index = coefficient_counter++; - float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); - float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; - for (x = 0; x < output_w; ++x) - { - int in_pixel_index = x * 3; - encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; - encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient; - encode_buffer[in_pixel_index + 2] += ring_buffer_entry[in_pixel_index + 2] * coefficient; - } - } - break; - case 4: - for (k = n0; k <= n1; k++) - { - int coefficient_index = coefficient_counter++; - float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); - float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; - for (x = 0; x < output_w; ++x) - { - int in_pixel_index = x * 4; - encode_buffer[in_pixel_index + 0] += ring_buffer_entry[in_pixel_index + 0] * coefficient; - encode_buffer[in_pixel_index + 1] += ring_buffer_entry[in_pixel_index + 1] * coefficient; - encode_buffer[in_pixel_index + 2] += ring_buffer_entry[in_pixel_index + 2] * coefficient; - encode_buffer[in_pixel_index + 3] += ring_buffer_entry[in_pixel_index + 3] * coefficient; - } - } - break; - default: - for (k = n0; k <= n1; k++) - { - int coefficient_index = coefficient_counter++; - float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); - float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; - for (x = 0; x < output_w; ++x) - { - int in_pixel_index = x * channels; - int c; - for (c = 0; c < channels; c++) - encode_buffer[in_pixel_index + c] += ring_buffer_entry[in_pixel_index + c] * coefficient; - } - } - break; - } - stbir__encode_scanline(stbir_info, output_w, (char *) output_data + output_row_start, encode_buffer, channels, alpha_channel, decode); -} - -static void stbir__resample_vertical_downsample(stbir__info* stbir_info, int n) -{ - int x, k; - int output_w = stbir_info->output_w; - stbir__contributors* vertical_contributors = stbir_info->vertical_contributors; - float* vertical_coefficients = stbir_info->vertical_coefficients; - int channels = stbir_info->channels; - int ring_buffer_entries = stbir_info->ring_buffer_num_entries; - float* horizontal_buffer = stbir_info->horizontal_buffer; - int coefficient_width = stbir_info->vertical_coefficient_width; - int contributor = n + stbir_info->vertical_filter_pixel_margin; - - float* ring_buffer = stbir_info->ring_buffer; - int ring_buffer_begin_index = stbir_info->ring_buffer_begin_index; - int ring_buffer_first_scanline = stbir_info->ring_buffer_first_scanline; - int ring_buffer_length = stbir_info->ring_buffer_length_bytes/sizeof(float); - int n0,n1; - - n0 = vertical_contributors[contributor].n0; - n1 = vertical_contributors[contributor].n1; - - STBIR_ASSERT(!stbir__use_height_upsampling(stbir_info)); - - for (k = n0; k <= n1; k++) - { - int coefficient_index = k - n0; - int coefficient_group = coefficient_width * contributor; - float coefficient = vertical_coefficients[coefficient_group + coefficient_index]; - - float* ring_buffer_entry = stbir__get_ring_buffer_scanline(k, ring_buffer, ring_buffer_begin_index, ring_buffer_first_scanline, ring_buffer_entries, ring_buffer_length); - - switch (channels) { - case 1: - for (x = 0; x < output_w; x++) - { - int in_pixel_index = x * 1; - ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; - } - break; - case 2: - for (x = 0; x < output_w; x++) - { - int in_pixel_index = x * 2; - ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; - ring_buffer_entry[in_pixel_index + 1] += horizontal_buffer[in_pixel_index + 1] * coefficient; - } - break; - case 3: - for (x = 0; x < output_w; x++) - { - int in_pixel_index = x * 3; - ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; - ring_buffer_entry[in_pixel_index + 1] += horizontal_buffer[in_pixel_index + 1] * coefficient; - ring_buffer_entry[in_pixel_index + 2] += horizontal_buffer[in_pixel_index + 2] * coefficient; - } - break; - case 4: - for (x = 0; x < output_w; x++) - { - int in_pixel_index = x * 4; - ring_buffer_entry[in_pixel_index + 0] += horizontal_buffer[in_pixel_index + 0] * coefficient; - ring_buffer_entry[in_pixel_index + 1] += horizontal_buffer[in_pixel_index + 1] * coefficient; - ring_buffer_entry[in_pixel_index + 2] += horizontal_buffer[in_pixel_index + 2] * coefficient; - ring_buffer_entry[in_pixel_index + 3] += horizontal_buffer[in_pixel_index + 3] * coefficient; - } - break; - default: - for (x = 0; x < output_w; x++) - { - int in_pixel_index = x * channels; - - int c; - for (c = 0; c < channels; c++) - ring_buffer_entry[in_pixel_index + c] += horizontal_buffer[in_pixel_index + c] * coefficient; - } - break; - } - } -} - -static void stbir__buffer_loop_upsample(stbir__info* stbir_info) -{ - int y; - float scale_ratio = stbir_info->vertical_scale; - float out_scanlines_radius = stbir__filter_info_table[stbir_info->vertical_filter].support(1/scale_ratio) * scale_ratio; - - STBIR_ASSERT(stbir__use_height_upsampling(stbir_info)); - - for (y = 0; y < stbir_info->output_h; y++) - { - float in_center_of_out = 0; // Center of the current out scanline in the in scanline space - int in_first_scanline = 0, in_last_scanline = 0; - - stbir__calculate_sample_range_upsample(y, out_scanlines_radius, scale_ratio, stbir_info->vertical_shift, &in_first_scanline, &in_last_scanline, &in_center_of_out); - - STBIR_ASSERT(in_last_scanline - in_first_scanline + 1 <= stbir_info->ring_buffer_num_entries); - - if (stbir_info->ring_buffer_begin_index >= 0) - { - // Get rid of whatever we don't need anymore. - while (in_first_scanline > stbir_info->ring_buffer_first_scanline) - { - if (stbir_info->ring_buffer_first_scanline == stbir_info->ring_buffer_last_scanline) - { - // We just popped the last scanline off the ring buffer. - // Reset it to the empty state. - stbir_info->ring_buffer_begin_index = -1; - stbir_info->ring_buffer_first_scanline = 0; - stbir_info->ring_buffer_last_scanline = 0; - break; - } - else - { - stbir_info->ring_buffer_first_scanline++; - stbir_info->ring_buffer_begin_index = (stbir_info->ring_buffer_begin_index + 1) % stbir_info->ring_buffer_num_entries; - } - } - } - - // Load in new ones. - if (stbir_info->ring_buffer_begin_index < 0) - stbir__decode_and_resample_upsample(stbir_info, in_first_scanline); - - while (in_last_scanline > stbir_info->ring_buffer_last_scanline) - stbir__decode_and_resample_upsample(stbir_info, stbir_info->ring_buffer_last_scanline + 1); - - // Now all buffers should be ready to write a row of vertical sampling. - stbir__resample_vertical_upsample(stbir_info, y); - - STBIR_PROGRESS_REPORT((float)y / stbir_info->output_h); - } -} - -static void stbir__empty_ring_buffer(stbir__info* stbir_info, int first_necessary_scanline) -{ - int output_stride_bytes = stbir_info->output_stride_bytes; - int channels = stbir_info->channels; - int alpha_channel = stbir_info->alpha_channel; - int type = stbir_info->type; - int colorspace = stbir_info->colorspace; - int output_w = stbir_info->output_w; - void* output_data = stbir_info->output_data; - int decode = STBIR__DECODE(type, colorspace); - - float* ring_buffer = stbir_info->ring_buffer; - int ring_buffer_length = stbir_info->ring_buffer_length_bytes/sizeof(float); - - if (stbir_info->ring_buffer_begin_index >= 0) - { - // Get rid of whatever we don't need anymore. - while (first_necessary_scanline > stbir_info->ring_buffer_first_scanline) - { - if (stbir_info->ring_buffer_first_scanline >= 0 && stbir_info->ring_buffer_first_scanline < stbir_info->output_h) - { - int output_row_start = stbir_info->ring_buffer_first_scanline * output_stride_bytes; - float* ring_buffer_entry = stbir__get_ring_buffer_entry(ring_buffer, stbir_info->ring_buffer_begin_index, ring_buffer_length); - stbir__encode_scanline(stbir_info, output_w, (char *) output_data + output_row_start, ring_buffer_entry, channels, alpha_channel, decode); - STBIR_PROGRESS_REPORT((float)stbir_info->ring_buffer_first_scanline / stbir_info->output_h); - } - - if (stbir_info->ring_buffer_first_scanline == stbir_info->ring_buffer_last_scanline) - { - // We just popped the last scanline off the ring buffer. - // Reset it to the empty state. - stbir_info->ring_buffer_begin_index = -1; - stbir_info->ring_buffer_first_scanline = 0; - stbir_info->ring_buffer_last_scanline = 0; - break; - } - else - { - stbir_info->ring_buffer_first_scanline++; - stbir_info->ring_buffer_begin_index = (stbir_info->ring_buffer_begin_index + 1) % stbir_info->ring_buffer_num_entries; - } - } - } -} - -static void stbir__buffer_loop_downsample(stbir__info* stbir_info) -{ - int y; - float scale_ratio = stbir_info->vertical_scale; - int output_h = stbir_info->output_h; - float in_pixels_radius = stbir__filter_info_table[stbir_info->vertical_filter].support(scale_ratio) / scale_ratio; - int pixel_margin = stbir_info->vertical_filter_pixel_margin; - int max_y = stbir_info->input_h + pixel_margin; - - STBIR_ASSERT(!stbir__use_height_upsampling(stbir_info)); - - for (y = -pixel_margin; y < max_y; y++) - { - float out_center_of_in; // Center of the current out scanline in the in scanline space - int out_first_scanline, out_last_scanline; - - stbir__calculate_sample_range_downsample(y, in_pixels_radius, scale_ratio, stbir_info->vertical_shift, &out_first_scanline, &out_last_scanline, &out_center_of_in); - - STBIR_ASSERT(out_last_scanline - out_first_scanline + 1 <= stbir_info->ring_buffer_num_entries); - - if (out_last_scanline < 0 || out_first_scanline >= output_h) - continue; - - stbir__empty_ring_buffer(stbir_info, out_first_scanline); - - stbir__decode_and_resample_downsample(stbir_info, y); - - // Load in new ones. - if (stbir_info->ring_buffer_begin_index < 0) - stbir__add_empty_ring_buffer_entry(stbir_info, out_first_scanline); - - while (out_last_scanline > stbir_info->ring_buffer_last_scanline) - stbir__add_empty_ring_buffer_entry(stbir_info, stbir_info->ring_buffer_last_scanline + 1); - - // Now the horizontal buffer is ready to write to all ring buffer rows. - stbir__resample_vertical_downsample(stbir_info, y); - } - - stbir__empty_ring_buffer(stbir_info, stbir_info->output_h); -} - -static void stbir__setup(stbir__info *info, int input_w, int input_h, int output_w, int output_h, int channels) -{ - info->input_w = input_w; - info->input_h = input_h; - info->output_w = output_w; - info->output_h = output_h; - info->channels = channels; -} - -static void stbir__calculate_transform(stbir__info *info, float s0, float t0, float s1, float t1, float *transform) -{ - info->s0 = s0; - info->t0 = t0; - info->s1 = s1; - info->t1 = t1; - - if (transform) - { - info->horizontal_scale = transform[0]; - info->vertical_scale = transform[1]; - info->horizontal_shift = transform[2]; - info->vertical_shift = transform[3]; - } - else - { - info->horizontal_scale = ((float)info->output_w / info->input_w) / (s1 - s0); - info->vertical_scale = ((float)info->output_h / info->input_h) / (t1 - t0); - - info->horizontal_shift = s0 * info->output_w / (s1 - s0); - info->vertical_shift = t0 * info->output_h / (t1 - t0); - } -} - -static void stbir__choose_filter(stbir__info *info, stbir_filter h_filter, stbir_filter v_filter) -{ - if (h_filter == 0) - h_filter = stbir__use_upsampling(info->horizontal_scale) ? STBIR_DEFAULT_FILTER_UPSAMPLE : STBIR_DEFAULT_FILTER_DOWNSAMPLE; - if (v_filter == 0) - v_filter = stbir__use_upsampling(info->vertical_scale) ? STBIR_DEFAULT_FILTER_UPSAMPLE : STBIR_DEFAULT_FILTER_DOWNSAMPLE; - info->horizontal_filter = h_filter; - info->vertical_filter = v_filter; -} - -static stbir_uint32 stbir__calculate_memory(stbir__info *info) -{ - int pixel_margin = stbir__get_filter_pixel_margin(info->horizontal_filter, info->horizontal_scale); - int filter_height = stbir__get_filter_pixel_width(info->vertical_filter, info->vertical_scale); - - info->horizontal_num_contributors = stbir__get_contributors(info->horizontal_scale, info->horizontal_filter, info->input_w, info->output_w); - info->vertical_num_contributors = stbir__get_contributors(info->vertical_scale , info->vertical_filter , info->input_h, info->output_h); - - // One extra entry because floating point precision problems sometimes cause an extra to be necessary. - info->ring_buffer_num_entries = filter_height + 1; - - info->horizontal_contributors_size = info->horizontal_num_contributors * sizeof(stbir__contributors); - info->horizontal_coefficients_size = stbir__get_total_horizontal_coefficients(info) * sizeof(float); - info->vertical_contributors_size = info->vertical_num_contributors * sizeof(stbir__contributors); - info->vertical_coefficients_size = stbir__get_total_vertical_coefficients(info) * sizeof(float); - info->decode_buffer_size = (info->input_w + pixel_margin * 2) * info->channels * sizeof(float); - info->horizontal_buffer_size = info->output_w * info->channels * sizeof(float); - info->ring_buffer_size = info->output_w * info->channels * info->ring_buffer_num_entries * sizeof(float); - info->encode_buffer_size = info->output_w * info->channels * sizeof(float); - - STBIR_ASSERT(info->horizontal_filter != 0); - STBIR_ASSERT(info->horizontal_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); // this now happens too late - STBIR_ASSERT(info->vertical_filter != 0); - STBIR_ASSERT(info->vertical_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); // this now happens too late - - if (stbir__use_height_upsampling(info)) - // The horizontal buffer is for when we're downsampling the height and we - // can't output the result of sampling the decode buffer directly into the - // ring buffers. - info->horizontal_buffer_size = 0; - else - // The encode buffer is to retain precision in the height upsampling method - // and isn't used when height downsampling. - info->encode_buffer_size = 0; - - return info->horizontal_contributors_size + info->horizontal_coefficients_size - + info->vertical_contributors_size + info->vertical_coefficients_size - + info->decode_buffer_size + info->horizontal_buffer_size - + info->ring_buffer_size + info->encode_buffer_size; -} - -static int stbir__resize_allocated(stbir__info *info, - const void* input_data, int input_stride_in_bytes, - void* output_data, int output_stride_in_bytes, - int alpha_channel, stbir_uint32 flags, stbir_datatype type, - stbir_edge edge_horizontal, stbir_edge edge_vertical, stbir_colorspace colorspace, - void* tempmem, size_t tempmem_size_in_bytes) -{ - size_t memory_required = stbir__calculate_memory(info); - - int width_stride_input = input_stride_in_bytes ? input_stride_in_bytes : info->channels * info->input_w * stbir__type_size[type]; - int width_stride_output = output_stride_in_bytes ? output_stride_in_bytes : info->channels * info->output_w * stbir__type_size[type]; - -#ifdef STBIR_DEBUG_OVERWRITE_TEST -#define OVERWRITE_ARRAY_SIZE 8 - unsigned char overwrite_output_before_pre[OVERWRITE_ARRAY_SIZE]; - unsigned char overwrite_tempmem_before_pre[OVERWRITE_ARRAY_SIZE]; - unsigned char overwrite_output_after_pre[OVERWRITE_ARRAY_SIZE]; - unsigned char overwrite_tempmem_after_pre[OVERWRITE_ARRAY_SIZE]; - - size_t begin_forbidden = width_stride_output * (info->output_h - 1) + info->output_w * info->channels * stbir__type_size[type]; - memcpy(overwrite_output_before_pre, &((unsigned char*)output_data)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE); - memcpy(overwrite_output_after_pre, &((unsigned char*)output_data)[begin_forbidden], OVERWRITE_ARRAY_SIZE); - memcpy(overwrite_tempmem_before_pre, &((unsigned char*)tempmem)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE); - memcpy(overwrite_tempmem_after_pre, &((unsigned char*)tempmem)[tempmem_size_in_bytes], OVERWRITE_ARRAY_SIZE); -#endif - - STBIR_ASSERT(info->channels >= 0); - STBIR_ASSERT(info->channels <= STBIR_MAX_CHANNELS); - - if (info->channels < 0 || info->channels > STBIR_MAX_CHANNELS) - return 0; - - STBIR_ASSERT(info->horizontal_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); - STBIR_ASSERT(info->vertical_filter < STBIR__ARRAY_SIZE(stbir__filter_info_table)); - - if (info->horizontal_filter >= STBIR__ARRAY_SIZE(stbir__filter_info_table)) - return 0; - if (info->vertical_filter >= STBIR__ARRAY_SIZE(stbir__filter_info_table)) - return 0; - - if (alpha_channel < 0) - flags |= STBIR_FLAG_ALPHA_USES_COLORSPACE | STBIR_FLAG_ALPHA_PREMULTIPLIED; - - if (!(flags&STBIR_FLAG_ALPHA_USES_COLORSPACE) || !(flags&STBIR_FLAG_ALPHA_PREMULTIPLIED)) { - STBIR_ASSERT(alpha_channel >= 0 && alpha_channel < info->channels); - } - - if (alpha_channel >= info->channels) - return 0; - - STBIR_ASSERT(tempmem); - - if (!tempmem) - return 0; - - STBIR_ASSERT(tempmem_size_in_bytes >= memory_required); - - if (tempmem_size_in_bytes < memory_required) - return 0; - - memset(tempmem, 0, tempmem_size_in_bytes); - - info->input_data = input_data; - info->input_stride_bytes = width_stride_input; - - info->output_data = output_data; - info->output_stride_bytes = width_stride_output; - - info->alpha_channel = alpha_channel; - info->flags = flags; - info->type = type; - info->edge_horizontal = edge_horizontal; - info->edge_vertical = edge_vertical; - info->colorspace = colorspace; - - info->horizontal_coefficient_width = stbir__get_coefficient_width (info->horizontal_filter, info->horizontal_scale); - info->vertical_coefficient_width = stbir__get_coefficient_width (info->vertical_filter , info->vertical_scale ); - info->horizontal_filter_pixel_width = stbir__get_filter_pixel_width (info->horizontal_filter, info->horizontal_scale); - info->vertical_filter_pixel_width = stbir__get_filter_pixel_width (info->vertical_filter , info->vertical_scale ); - info->horizontal_filter_pixel_margin = stbir__get_filter_pixel_margin(info->horizontal_filter, info->horizontal_scale); - info->vertical_filter_pixel_margin = stbir__get_filter_pixel_margin(info->vertical_filter , info->vertical_scale ); - - info->ring_buffer_length_bytes = info->output_w * info->channels * sizeof(float); - info->decode_buffer_pixels = info->input_w + info->horizontal_filter_pixel_margin * 2; - -#define STBIR__NEXT_MEMPTR(current, newtype) (newtype*)(((unsigned char*)current) + current##_size) - - info->horizontal_contributors = (stbir__contributors *) tempmem; - info->horizontal_coefficients = STBIR__NEXT_MEMPTR(info->horizontal_contributors, float); - info->vertical_contributors = STBIR__NEXT_MEMPTR(info->horizontal_coefficients, stbir__contributors); - info->vertical_coefficients = STBIR__NEXT_MEMPTR(info->vertical_contributors, float); - info->decode_buffer = STBIR__NEXT_MEMPTR(info->vertical_coefficients, float); - - if (stbir__use_height_upsampling(info)) - { - info->horizontal_buffer = NULL; - info->ring_buffer = STBIR__NEXT_MEMPTR(info->decode_buffer, float); - info->encode_buffer = STBIR__NEXT_MEMPTR(info->ring_buffer, float); - - STBIR_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->encode_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes); - } - else - { - info->horizontal_buffer = STBIR__NEXT_MEMPTR(info->decode_buffer, float); - info->ring_buffer = STBIR__NEXT_MEMPTR(info->horizontal_buffer, float); - info->encode_buffer = NULL; - - STBIR_ASSERT((size_t)STBIR__NEXT_MEMPTR(info->ring_buffer, unsigned char) == (size_t)tempmem + tempmem_size_in_bytes); - } - -#undef STBIR__NEXT_MEMPTR - - // This signals that the ring buffer is empty - info->ring_buffer_begin_index = -1; - - stbir__calculate_filters(info->horizontal_contributors, info->horizontal_coefficients, info->horizontal_filter, info->horizontal_scale, info->horizontal_shift, info->input_w, info->output_w); - stbir__calculate_filters(info->vertical_contributors, info->vertical_coefficients, info->vertical_filter, info->vertical_scale, info->vertical_shift, info->input_h, info->output_h); - - STBIR_PROGRESS_REPORT(0); - - if (stbir__use_height_upsampling(info)) - stbir__buffer_loop_upsample(info); - else - stbir__buffer_loop_downsample(info); - - STBIR_PROGRESS_REPORT(1); - -#ifdef STBIR_DEBUG_OVERWRITE_TEST - STBIR_ASSERT(memcmp(overwrite_output_before_pre, &((unsigned char*)output_data)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE) == 0); - STBIR_ASSERT(memcmp(overwrite_output_after_pre, &((unsigned char*)output_data)[begin_forbidden], OVERWRITE_ARRAY_SIZE) == 0); - STBIR_ASSERT(memcmp(overwrite_tempmem_before_pre, &((unsigned char*)tempmem)[-OVERWRITE_ARRAY_SIZE], OVERWRITE_ARRAY_SIZE) == 0); - STBIR_ASSERT(memcmp(overwrite_tempmem_after_pre, &((unsigned char*)tempmem)[tempmem_size_in_bytes], OVERWRITE_ARRAY_SIZE) == 0); -#endif - - return 1; -} - - -static int stbir__resize_arbitrary( - void *alloc_context, - const void* input_data, int input_w, int input_h, int input_stride_in_bytes, - void* output_data, int output_w, int output_h, int output_stride_in_bytes, - float s0, float t0, float s1, float t1, float *transform, - int channels, int alpha_channel, stbir_uint32 flags, stbir_datatype type, - stbir_filter h_filter, stbir_filter v_filter, - stbir_edge edge_horizontal, stbir_edge edge_vertical, stbir_colorspace colorspace) -{ - stbir__info info; - int result; - size_t memory_required; - void* extra_memory; - - stbir__setup(&info, input_w, input_h, output_w, output_h, channels); - stbir__calculate_transform(&info, s0,t0,s1,t1,transform); - stbir__choose_filter(&info, h_filter, v_filter); - memory_required = stbir__calculate_memory(&info); - extra_memory = STBIR_MALLOC(memory_required, alloc_context); - - if (!extra_memory) - return 0; - - result = stbir__resize_allocated(&info, input_data, input_stride_in_bytes, - output_data, output_stride_in_bytes, - alpha_channel, flags, type, - edge_horizontal, edge_vertical, - colorspace, extra_memory, memory_required); - - STBIR_FREE(extra_memory, alloc_context); - - return result; -} - -STBIRDEF int stbir_resize_uint8( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels) -{ - return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,-1,0, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, - STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_LINEAR); -} - -STBIRDEF int stbir_resize_float( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - float *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels) -{ - return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,-1,0, STBIR_TYPE_FLOAT, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, - STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_LINEAR); -} - -STBIRDEF int stbir_resize_uint8_srgb(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags) -{ - return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, - STBIR_EDGE_CLAMP, STBIR_EDGE_CLAMP, STBIR_COLORSPACE_SRGB); -} - -STBIRDEF int stbir_resize_uint8_srgb_edgemode(const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode) -{ - return stbir__resize_arbitrary(NULL, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, STBIR_FILTER_DEFAULT, STBIR_FILTER_DEFAULT, - edge_wrap_mode, edge_wrap_mode, STBIR_COLORSPACE_SRGB); -} - -STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, - void *alloc_context) -{ - return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT8, filter, filter, - edge_wrap_mode, edge_wrap_mode, space); -} - -STBIRDEF int stbir_resize_uint16_generic(const stbir_uint16 *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - stbir_uint16 *output_pixels , int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, - void *alloc_context) -{ - return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_UINT16, filter, filter, - edge_wrap_mode, edge_wrap_mode, space); -} - - -STBIRDEF int stbir_resize_float_generic( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - float *output_pixels , int output_w, int output_h, int output_stride_in_bytes, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, - void *alloc_context) -{ - return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,alpha_channel,flags, STBIR_TYPE_FLOAT, filter, filter, - edge_wrap_mode, edge_wrap_mode, space); -} - - -STBIRDEF int stbir_resize( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - stbir_datatype datatype, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, - stbir_filter filter_horizontal, stbir_filter filter_vertical, - stbir_colorspace space, void *alloc_context) -{ - return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,NULL,num_channels,alpha_channel,flags, datatype, filter_horizontal, filter_vertical, - edge_mode_horizontal, edge_mode_vertical, space); -} - - -STBIRDEF int stbir_resize_subpixel(const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - stbir_datatype datatype, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, - stbir_filter filter_horizontal, stbir_filter filter_vertical, - stbir_colorspace space, void *alloc_context, - float x_scale, float y_scale, - float x_offset, float y_offset) -{ - float transform[4]; - transform[0] = x_scale; - transform[1] = y_scale; - transform[2] = x_offset; - transform[3] = y_offset; - return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - 0,0,1,1,transform,num_channels,alpha_channel,flags, datatype, filter_horizontal, filter_vertical, - edge_mode_horizontal, edge_mode_vertical, space); -} - -STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes, - void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, - stbir_datatype datatype, - int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, - stbir_filter filter_horizontal, stbir_filter filter_vertical, - stbir_colorspace space, void *alloc_context, - float s0, float t0, float s1, float t1) -{ - return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, - output_pixels, output_w, output_h, output_stride_in_bytes, - s0,t0,s1,t1,NULL,num_channels,alpha_channel,flags, datatype, filter_horizontal, filter_vertical, - edge_mode_horizontal, edge_mode_vertical, space); -} - -#endif // STB_IMAGE_RESIZE_IMPLEMENTATION - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_image_write.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_image_write.h deleted file mode 100644 index e4b32ed1..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_image_write.h +++ /dev/null @@ -1,1724 +0,0 @@ -/* stb_image_write - v1.16 - public domain - http://nothings.org/stb - writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015 - no warranty implied; use at your own risk - - Before #including, - - #define STB_IMAGE_WRITE_IMPLEMENTATION - - in the file that you want to have the implementation. - - Will probably not work correctly with strict-aliasing optimizations. - -ABOUT: - - This header file is a library for writing images to C stdio or a callback. - - The PNG output is not optimal; it is 20-50% larger than the file - written by a decent optimizing implementation; though providing a custom - zlib compress function (see STBIW_ZLIB_COMPRESS) can mitigate that. - This library is designed for source code compactness and simplicity, - not optimal image file size or run-time performance. - -BUILDING: - - You can #define STBIW_ASSERT(x) before the #include to avoid using assert.h. - You can #define STBIW_MALLOC(), STBIW_REALLOC(), and STBIW_FREE() to replace - malloc,realloc,free. - You can #define STBIW_MEMMOVE() to replace memmove() - You can #define STBIW_ZLIB_COMPRESS to use a custom zlib-style compress function - for PNG compression (instead of the builtin one), it must have the following signature: - unsigned char * my_compress(unsigned char *data, int data_len, int *out_len, int quality); - The returned data will be freed with STBIW_FREE() (free() by default), - so it must be heap allocated with STBIW_MALLOC() (malloc() by default), - -UNICODE: - - If compiling for Windows and you wish to use Unicode filenames, compile - with - #define STBIW_WINDOWS_UTF8 - and pass utf8-encoded filenames. Call stbiw_convert_wchar_to_utf8 to convert - Windows wchar_t filenames to utf8. - -USAGE: - - There are five functions, one for each image file format: - - int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes); - int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data); - int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data); - int stbi_write_jpg(char const *filename, int w, int h, int comp, const void *data, int quality); - int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data); - - void stbi_flip_vertically_on_write(int flag); // flag is non-zero to flip data vertically - - There are also five equivalent functions that use an arbitrary write function. You are - expected to open/close your file-equivalent before and after calling these: - - int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes); - int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data); - int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data); - int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data); - int stbi_write_jpg_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int quality); - - where the callback is: - void stbi_write_func(void *context, void *data, int size); - - You can configure it with these global variables: - int stbi_write_tga_with_rle; // defaults to true; set to 0 to disable RLE - int stbi_write_png_compression_level; // defaults to 8; set to higher for more compression - int stbi_write_force_png_filter; // defaults to -1; set to 0..5 to force a filter mode - - - You can define STBI_WRITE_NO_STDIO to disable the file variant of these - functions, so the library will not use stdio.h at all. However, this will - also disable HDR writing, because it requires stdio for formatted output. - - Each function returns 0 on failure and non-0 on success. - - The functions create an image file defined by the parameters. The image - is a rectangle of pixels stored from left-to-right, top-to-bottom. - Each pixel contains 'comp' channels of data stored interleaved with 8-bits - per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is - monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall. - The *data pointer points to the first byte of the top-left-most pixel. - For PNG, "stride_in_bytes" is the distance in bytes from the first byte of - a row of pixels to the first byte of the next row of pixels. - - PNG creates output files with the same number of components as the input. - The BMP format expands Y to RGB in the file format and does not - output alpha. - - PNG supports writing rectangles of data even when the bytes storing rows of - data are not consecutive in memory (e.g. sub-rectangles of a larger image), - by supplying the stride between the beginning of adjacent rows. The other - formats do not. (Thus you cannot write a native-format BMP through the BMP - writer, both because it is in BGR order and because it may have padding - at the end of the line.) - - PNG allows you to set the deflate compression level by setting the global - variable 'stbi_write_png_compression_level' (it defaults to 8). - - HDR expects linear float data. Since the format is always 32-bit rgb(e) - data, alpha (if provided) is discarded, and for monochrome data it is - replicated across all three channels. - - TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed - data, set the global variable 'stbi_write_tga_with_rle' to 0. - - JPEG does ignore alpha channels in input data; quality is between 1 and 100. - Higher quality looks better but results in a bigger image. - JPEG baseline (no JPEG progressive). - -CREDITS: - - - Sean Barrett - PNG/BMP/TGA - Baldur Karlsson - HDR - Jean-Sebastien Guay - TGA monochrome - Tim Kelsey - misc enhancements - Alan Hickman - TGA RLE - Emmanuel Julien - initial file IO callback implementation - Jon Olick - original jo_jpeg.cpp code - Daniel Gibson - integrate JPEG, allow external zlib - Aarni Koskela - allow choosing PNG filter - - bugfixes: - github:Chribba - Guillaume Chereau - github:jry2 - github:romigrou - Sergio Gonzalez - Jonas Karlsson - Filip Wasil - Thatcher Ulrich - github:poppolopoppo - Patrick Boettcher - github:xeekworx - Cap Petschulat - Simon Rodriguez - Ivan Tikhonov - github:ignotion - Adam Schackart - Andrew Kensler - -LICENSE - - See end of file for license information. - -*/ - -#ifndef INCLUDE_STB_IMAGE_WRITE_H -#define INCLUDE_STB_IMAGE_WRITE_H - -#include - -// if STB_IMAGE_WRITE_STATIC causes problems, try defining STBIWDEF to 'inline' or 'static inline' -#ifndef STBIWDEF -#ifdef STB_IMAGE_WRITE_STATIC -#define STBIWDEF static -#else -#ifdef __cplusplus -#define STBIWDEF extern "C" -#else -#define STBIWDEF extern -#endif -#endif -#endif - -#ifndef STB_IMAGE_WRITE_STATIC // C++ forbids static forward declarations -STBIWDEF int stbi_write_tga_with_rle; -STBIWDEF int stbi_write_png_compression_level; -STBIWDEF int stbi_write_force_png_filter; -#endif - -#ifndef STBI_WRITE_NO_STDIO -STBIWDEF int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes); -STBIWDEF int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data); -STBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data); -STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data); -STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality); - -#ifdef STBIW_WINDOWS_UTF8 -STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); -#endif -#endif - -typedef void stbi_write_func(void *context, void *data, int size); - -STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data, int stride_in_bytes); -STBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data); -STBIWDEF int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void *data); -STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data); -STBIWDEF int stbi_write_jpg_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int quality); - -STBIWDEF void stbi_flip_vertically_on_write(int flip_boolean); - -#endif//INCLUDE_STB_IMAGE_WRITE_H - -#ifdef STB_IMAGE_WRITE_IMPLEMENTATION - -#ifdef _WIN32 - #ifndef _CRT_SECURE_NO_WARNINGS - #define _CRT_SECURE_NO_WARNINGS - #endif - #ifndef _CRT_NONSTDC_NO_DEPRECATE - #define _CRT_NONSTDC_NO_DEPRECATE - #endif -#endif - -#ifndef STBI_WRITE_NO_STDIO -#include -#endif // STBI_WRITE_NO_STDIO - -#include -#include -#include -#include - -#if defined(STBIW_MALLOC) && defined(STBIW_FREE) && (defined(STBIW_REALLOC) || defined(STBIW_REALLOC_SIZED)) -// ok -#elif !defined(STBIW_MALLOC) && !defined(STBIW_FREE) && !defined(STBIW_REALLOC) && !defined(STBIW_REALLOC_SIZED) -// ok -#else -#error "Must define all or none of STBIW_MALLOC, STBIW_FREE, and STBIW_REALLOC (or STBIW_REALLOC_SIZED)." -#endif - -#ifndef STBIW_MALLOC -#define STBIW_MALLOC(sz) malloc(sz) -#define STBIW_REALLOC(p,newsz) realloc(p,newsz) -#define STBIW_FREE(p) free(p) -#endif - -#ifndef STBIW_REALLOC_SIZED -#define STBIW_REALLOC_SIZED(p,oldsz,newsz) STBIW_REALLOC(p,newsz) -#endif - - -#ifndef STBIW_MEMMOVE -#define STBIW_MEMMOVE(a,b,sz) memmove(a,b,sz) -#endif - - -#ifndef STBIW_ASSERT -#include -#define STBIW_ASSERT(x) assert(x) -#endif - -#define STBIW_UCHAR(x) (unsigned char) ((x) & 0xff) - -#ifdef STB_IMAGE_WRITE_STATIC -static int stbi_write_png_compression_level = 8; -static int stbi_write_tga_with_rle = 1; -static int stbi_write_force_png_filter = -1; -#else -int stbi_write_png_compression_level = 8; -int stbi_write_tga_with_rle = 1; -int stbi_write_force_png_filter = -1; -#endif - -static int stbi__flip_vertically_on_write = 0; - -STBIWDEF void stbi_flip_vertically_on_write(int flag) -{ - stbi__flip_vertically_on_write = flag; -} - -typedef struct -{ - stbi_write_func *func; - void *context; - unsigned char buffer[64]; - int buf_used; -} stbi__write_context; - -// initialize a callback-based context -static void stbi__start_write_callbacks(stbi__write_context *s, stbi_write_func *c, void *context) -{ - s->func = c; - s->context = context; -} - -#ifndef STBI_WRITE_NO_STDIO - -static void stbi__stdio_write(void *context, void *data, int size) -{ - fwrite(data,1,size,(FILE*) context); -} - -#if defined(_WIN32) && defined(STBIW_WINDOWS_UTF8) -#ifdef __cplusplus -#define STBIW_EXTERN extern "C" -#else -#define STBIW_EXTERN extern -#endif -STBIW_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); -STBIW_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); - -STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input) -{ - return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int) bufferlen, NULL, NULL); -} -#endif - -static FILE *stbiw__fopen(char const *filename, char const *mode) -{ - FILE *f; -#if defined(_WIN32) && defined(STBIW_WINDOWS_UTF8) - wchar_t wMode[64]; - wchar_t wFilename[1024]; - if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename))) - return 0; - - if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode)/sizeof(*wMode))) - return 0; - -#if defined(_MSC_VER) && _MSC_VER >= 1400 - if (0 != _wfopen_s(&f, wFilename, wMode)) - f = 0; -#else - f = _wfopen(wFilename, wMode); -#endif - -#elif defined(_MSC_VER) && _MSC_VER >= 1400 - if (0 != fopen_s(&f, filename, mode)) - f=0; -#else - f = fopen(filename, mode); -#endif - return f; -} - -static int stbi__start_write_file(stbi__write_context *s, const char *filename) -{ - FILE *f = stbiw__fopen(filename, "wb"); - stbi__start_write_callbacks(s, stbi__stdio_write, (void *) f); - return f != NULL; -} - -static void stbi__end_write_file(stbi__write_context *s) -{ - fclose((FILE *)s->context); -} - -#endif // !STBI_WRITE_NO_STDIO - -typedef unsigned int stbiw_uint32; -typedef int stb_image_write_test[sizeof(stbiw_uint32)==4 ? 1 : -1]; - -static void stbiw__writefv(stbi__write_context *s, const char *fmt, va_list v) -{ - while (*fmt) { - switch (*fmt++) { - case ' ': break; - case '1': { unsigned char x = STBIW_UCHAR(va_arg(v, int)); - s->func(s->context,&x,1); - break; } - case '2': { int x = va_arg(v,int); - unsigned char b[2]; - b[0] = STBIW_UCHAR(x); - b[1] = STBIW_UCHAR(x>>8); - s->func(s->context,b,2); - break; } - case '4': { stbiw_uint32 x = va_arg(v,int); - unsigned char b[4]; - b[0]=STBIW_UCHAR(x); - b[1]=STBIW_UCHAR(x>>8); - b[2]=STBIW_UCHAR(x>>16); - b[3]=STBIW_UCHAR(x>>24); - s->func(s->context,b,4); - break; } - default: - STBIW_ASSERT(0); - return; - } - } -} - -static void stbiw__writef(stbi__write_context *s, const char *fmt, ...) -{ - va_list v; - va_start(v, fmt); - stbiw__writefv(s, fmt, v); - va_end(v); -} - -static void stbiw__write_flush(stbi__write_context *s) -{ - if (s->buf_used) { - s->func(s->context, &s->buffer, s->buf_used); - s->buf_used = 0; - } -} - -static void stbiw__putc(stbi__write_context *s, unsigned char c) -{ - s->func(s->context, &c, 1); -} - -static void stbiw__write1(stbi__write_context *s, unsigned char a) -{ - if ((size_t)s->buf_used + 1 > sizeof(s->buffer)) - stbiw__write_flush(s); - s->buffer[s->buf_used++] = a; -} - -static void stbiw__write3(stbi__write_context *s, unsigned char a, unsigned char b, unsigned char c) -{ - int n; - if ((size_t)s->buf_used + 3 > sizeof(s->buffer)) - stbiw__write_flush(s); - n = s->buf_used; - s->buf_used = n+3; - s->buffer[n+0] = a; - s->buffer[n+1] = b; - s->buffer[n+2] = c; -} - -static void stbiw__write_pixel(stbi__write_context *s, int rgb_dir, int comp, int write_alpha, int expand_mono, unsigned char *d) -{ - unsigned char bg[3] = { 255, 0, 255}, px[3]; - int k; - - if (write_alpha < 0) - stbiw__write1(s, d[comp - 1]); - - switch (comp) { - case 2: // 2 pixels = mono + alpha, alpha is written separately, so same as 1-channel case - case 1: - if (expand_mono) - stbiw__write3(s, d[0], d[0], d[0]); // monochrome bmp - else - stbiw__write1(s, d[0]); // monochrome TGA - break; - case 4: - if (!write_alpha) { - // composite against pink background - for (k = 0; k < 3; ++k) - px[k] = bg[k] + ((d[k] - bg[k]) * d[3]) / 255; - stbiw__write3(s, px[1 - rgb_dir], px[1], px[1 + rgb_dir]); - break; - } - /* FALLTHROUGH */ - case 3: - stbiw__write3(s, d[1 - rgb_dir], d[1], d[1 + rgb_dir]); - break; - } - if (write_alpha > 0) - stbiw__write1(s, d[comp - 1]); -} - -static void stbiw__write_pixels(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, void *data, int write_alpha, int scanline_pad, int expand_mono) -{ - stbiw_uint32 zero = 0; - int i,j, j_end; - - if (y <= 0) - return; - - if (stbi__flip_vertically_on_write) - vdir *= -1; - - if (vdir < 0) { - j_end = -1; j = y-1; - } else { - j_end = y; j = 0; - } - - for (; j != j_end; j += vdir) { - for (i=0; i < x; ++i) { - unsigned char *d = (unsigned char *) data + (j*x+i)*comp; - stbiw__write_pixel(s, rgb_dir, comp, write_alpha, expand_mono, d); - } - stbiw__write_flush(s); - s->func(s->context, &zero, scanline_pad); - } -} - -static int stbiw__outfile(stbi__write_context *s, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt, ...) -{ - if (y < 0 || x < 0) { - return 0; - } else { - va_list v; - va_start(v, fmt); - stbiw__writefv(s, fmt, v); - va_end(v); - stbiw__write_pixels(s,rgb_dir,vdir,x,y,comp,data,alpha,pad, expand_mono); - return 1; - } -} - -static int stbi_write_bmp_core(stbi__write_context *s, int x, int y, int comp, const void *data) -{ - if (comp != 4) { - // write RGB bitmap - int pad = (-x*3) & 3; - return stbiw__outfile(s,-1,-1,x,y,comp,1,(void *) data,0,pad, - "11 4 22 4" "4 44 22 444444", - 'B', 'M', 14+40+(x*3+pad)*y, 0,0, 14+40, // file header - 40, x,y, 1,24, 0,0,0,0,0,0); // bitmap header - } else { - // RGBA bitmaps need a v4 header - // use BI_BITFIELDS mode with 32bpp and alpha mask - // (straight BI_RGB with alpha mask doesn't work in most readers) - return stbiw__outfile(s,-1,-1,x,y,comp,1,(void *)data,1,0, - "11 4 22 4" "4 44 22 444444 4444 4 444 444 444 444", - 'B', 'M', 14+108+x*y*4, 0, 0, 14+108, // file header - 108, x,y, 1,32, 3,0,0,0,0,0, 0xff0000,0xff00,0xff,0xff000000u, 0, 0,0,0, 0,0,0, 0,0,0, 0,0,0); // bitmap V4 header - } -} - -STBIWDEF int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data) -{ - stbi__write_context s = { 0 }; - stbi__start_write_callbacks(&s, func, context); - return stbi_write_bmp_core(&s, x, y, comp, data); -} - -#ifndef STBI_WRITE_NO_STDIO -STBIWDEF int stbi_write_bmp(char const *filename, int x, int y, int comp, const void *data) -{ - stbi__write_context s = { 0 }; - if (stbi__start_write_file(&s,filename)) { - int r = stbi_write_bmp_core(&s, x, y, comp, data); - stbi__end_write_file(&s); - return r; - } else - return 0; -} -#endif //!STBI_WRITE_NO_STDIO - -static int stbi_write_tga_core(stbi__write_context *s, int x, int y, int comp, void *data) -{ - int has_alpha = (comp == 2 || comp == 4); - int colorbytes = has_alpha ? comp-1 : comp; - int format = colorbytes < 2 ? 3 : 2; // 3 color channels (RGB/RGBA) = 2, 1 color channel (Y/YA) = 3 - - if (y < 0 || x < 0) - return 0; - - if (!stbi_write_tga_with_rle) { - return stbiw__outfile(s, -1, -1, x, y, comp, 0, (void *) data, has_alpha, 0, - "111 221 2222 11", 0, 0, format, 0, 0, 0, 0, 0, x, y, (colorbytes + has_alpha) * 8, has_alpha * 8); - } else { - int i,j,k; - int jend, jdir; - - stbiw__writef(s, "111 221 2222 11", 0,0,format+8, 0,0,0, 0,0,x,y, (colorbytes + has_alpha) * 8, has_alpha * 8); - - if (stbi__flip_vertically_on_write) { - j = 0; - jend = y; - jdir = 1; - } else { - j = y-1; - jend = -1; - jdir = -1; - } - for (; j != jend; j += jdir) { - unsigned char *row = (unsigned char *) data + j * x * comp; - int len; - - for (i = 0; i < x; i += len) { - unsigned char *begin = row + i * comp; - int diff = 1; - len = 1; - - if (i < x - 1) { - ++len; - diff = memcmp(begin, row + (i + 1) * comp, comp); - if (diff) { - const unsigned char *prev = begin; - for (k = i + 2; k < x && len < 128; ++k) { - if (memcmp(prev, row + k * comp, comp)) { - prev += comp; - ++len; - } else { - --len; - break; - } - } - } else { - for (k = i + 2; k < x && len < 128; ++k) { - if (!memcmp(begin, row + k * comp, comp)) { - ++len; - } else { - break; - } - } - } - } - - if (diff) { - unsigned char header = STBIW_UCHAR(len - 1); - stbiw__write1(s, header); - for (k = 0; k < len; ++k) { - stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin + k * comp); - } - } else { - unsigned char header = STBIW_UCHAR(len - 129); - stbiw__write1(s, header); - stbiw__write_pixel(s, -1, comp, has_alpha, 0, begin); - } - } - } - stbiw__write_flush(s); - } - return 1; -} - -STBIWDEF int stbi_write_tga_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data) -{ - stbi__write_context s = { 0 }; - stbi__start_write_callbacks(&s, func, context); - return stbi_write_tga_core(&s, x, y, comp, (void *) data); -} - -#ifndef STBI_WRITE_NO_STDIO -STBIWDEF int stbi_write_tga(char const *filename, int x, int y, int comp, const void *data) -{ - stbi__write_context s = { 0 }; - if (stbi__start_write_file(&s,filename)) { - int r = stbi_write_tga_core(&s, x, y, comp, (void *) data); - stbi__end_write_file(&s); - return r; - } else - return 0; -} -#endif - -// ************************************************************************************************* -// Radiance RGBE HDR writer -// by Baldur Karlsson - -#define stbiw__max(a, b) ((a) > (b) ? (a) : (b)) - -#ifndef STBI_WRITE_NO_STDIO - -static void stbiw__linear_to_rgbe(unsigned char *rgbe, float *linear) -{ - int exponent; - float maxcomp = stbiw__max(linear[0], stbiw__max(linear[1], linear[2])); - - if (maxcomp < 1e-32f) { - rgbe[0] = rgbe[1] = rgbe[2] = rgbe[3] = 0; - } else { - float normalize = (float) frexp(maxcomp, &exponent) * 256.0f/maxcomp; - - rgbe[0] = (unsigned char)(linear[0] * normalize); - rgbe[1] = (unsigned char)(linear[1] * normalize); - rgbe[2] = (unsigned char)(linear[2] * normalize); - rgbe[3] = (unsigned char)(exponent + 128); - } -} - -static void stbiw__write_run_data(stbi__write_context *s, int length, unsigned char databyte) -{ - unsigned char lengthbyte = STBIW_UCHAR(length+128); - STBIW_ASSERT(length+128 <= 255); - s->func(s->context, &lengthbyte, 1); - s->func(s->context, &databyte, 1); -} - -static void stbiw__write_dump_data(stbi__write_context *s, int length, unsigned char *data) -{ - unsigned char lengthbyte = STBIW_UCHAR(length); - STBIW_ASSERT(length <= 128); // inconsistent with spec but consistent with official code - s->func(s->context, &lengthbyte, 1); - s->func(s->context, data, length); -} - -static void stbiw__write_hdr_scanline(stbi__write_context *s, int width, int ncomp, unsigned char *scratch, float *scanline) -{ - unsigned char scanlineheader[4] = { 2, 2, 0, 0 }; - unsigned char rgbe[4]; - float linear[3]; - int x; - - scanlineheader[2] = (width&0xff00)>>8; - scanlineheader[3] = (width&0x00ff); - - /* skip RLE for images too small or large */ - if (width < 8 || width >= 32768) { - for (x=0; x < width; x++) { - switch (ncomp) { - case 4: /* fallthrough */ - case 3: linear[2] = scanline[x*ncomp + 2]; - linear[1] = scanline[x*ncomp + 1]; - linear[0] = scanline[x*ncomp + 0]; - break; - default: - linear[0] = linear[1] = linear[2] = scanline[x*ncomp + 0]; - break; - } - stbiw__linear_to_rgbe(rgbe, linear); - s->func(s->context, rgbe, 4); - } - } else { - int c,r; - /* encode into scratch buffer */ - for (x=0; x < width; x++) { - switch(ncomp) { - case 4: /* fallthrough */ - case 3: linear[2] = scanline[x*ncomp + 2]; - linear[1] = scanline[x*ncomp + 1]; - linear[0] = scanline[x*ncomp + 0]; - break; - default: - linear[0] = linear[1] = linear[2] = scanline[x*ncomp + 0]; - break; - } - stbiw__linear_to_rgbe(rgbe, linear); - scratch[x + width*0] = rgbe[0]; - scratch[x + width*1] = rgbe[1]; - scratch[x + width*2] = rgbe[2]; - scratch[x + width*3] = rgbe[3]; - } - - s->func(s->context, scanlineheader, 4); - - /* RLE each component separately */ - for (c=0; c < 4; c++) { - unsigned char *comp = &scratch[width*c]; - - x = 0; - while (x < width) { - // find first run - r = x; - while (r+2 < width) { - if (comp[r] == comp[r+1] && comp[r] == comp[r+2]) - break; - ++r; - } - if (r+2 >= width) - r = width; - // dump up to first run - while (x < r) { - int len = r-x; - if (len > 128) len = 128; - stbiw__write_dump_data(s, len, &comp[x]); - x += len; - } - // if there's a run, output it - if (r+2 < width) { // same test as what we break out of in search loop, so only true if we break'd - // find next byte after run - while (r < width && comp[r] == comp[x]) - ++r; - // output run up to r - while (x < r) { - int len = r-x; - if (len > 127) len = 127; - stbiw__write_run_data(s, len, comp[x]); - x += len; - } - } - } - } - } -} - -static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, float *data) -{ - if (y <= 0 || x <= 0 || data == NULL) - return 0; - else { - // Each component is stored separately. Allocate scratch space for full output scanline. - unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4); - int i, len; - char buffer[128]; - char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n"; - s->func(s->context, header, sizeof(header)-1); - -#ifdef __STDC_LIB_EXT1__ - len = sprintf_s(buffer, sizeof(buffer), "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); -#else - len = sprintf(buffer, "EXPOSURE= 1.0000000000000\n\n-Y %d +X %d\n", y, x); -#endif - s->func(s->context, buffer, len); - - for(i=0; i < y; i++) - stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp*x*(stbi__flip_vertically_on_write ? y-1-i : i)); - STBIW_FREE(scratch); - return 1; - } -} - -STBIWDEF int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const float *data) -{ - stbi__write_context s = { 0 }; - stbi__start_write_callbacks(&s, func, context); - return stbi_write_hdr_core(&s, x, y, comp, (float *) data); -} - -STBIWDEF int stbi_write_hdr(char const *filename, int x, int y, int comp, const float *data) -{ - stbi__write_context s = { 0 }; - if (stbi__start_write_file(&s,filename)) { - int r = stbi_write_hdr_core(&s, x, y, comp, (float *) data); - stbi__end_write_file(&s); - return r; - } else - return 0; -} -#endif // STBI_WRITE_NO_STDIO - - -////////////////////////////////////////////////////////////////////////////// -// -// PNG writer -// - -#ifndef STBIW_ZLIB_COMPRESS -// stretchy buffer; stbiw__sbpush() == vector<>::push_back() -- stbiw__sbcount() == vector<>::size() -#define stbiw__sbraw(a) ((int *) (void *) (a) - 2) -#define stbiw__sbm(a) stbiw__sbraw(a)[0] -#define stbiw__sbn(a) stbiw__sbraw(a)[1] - -#define stbiw__sbneedgrow(a,n) ((a)==0 || stbiw__sbn(a)+n >= stbiw__sbm(a)) -#define stbiw__sbmaybegrow(a,n) (stbiw__sbneedgrow(a,(n)) ? stbiw__sbgrow(a,n) : 0) -#define stbiw__sbgrow(a,n) stbiw__sbgrowf((void **) &(a), (n), sizeof(*(a))) - -#define stbiw__sbpush(a, v) (stbiw__sbmaybegrow(a,1), (a)[stbiw__sbn(a)++] = (v)) -#define stbiw__sbcount(a) ((a) ? stbiw__sbn(a) : 0) -#define stbiw__sbfree(a) ((a) ? STBIW_FREE(stbiw__sbraw(a)),0 : 0) - -static void *stbiw__sbgrowf(void **arr, int increment, int itemsize) -{ - int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1; - void *p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr)*itemsize + sizeof(int)*2) : 0, itemsize * m + sizeof(int)*2); - STBIW_ASSERT(p); - if (p) { - if (!*arr) ((int *) p)[1] = 0; - *arr = (void *) ((int *) p + 2); - stbiw__sbm(*arr) = m; - } - return *arr; -} - -static unsigned char *stbiw__zlib_flushf(unsigned char *data, unsigned int *bitbuffer, int *bitcount) -{ - while (*bitcount >= 8) { - stbiw__sbpush(data, STBIW_UCHAR(*bitbuffer)); - *bitbuffer >>= 8; - *bitcount -= 8; - } - return data; -} - -static int stbiw__zlib_bitrev(int code, int codebits) -{ - int res=0; - while (codebits--) { - res = (res << 1) | (code & 1); - code >>= 1; - } - return res; -} - -static unsigned int stbiw__zlib_countm(unsigned char *a, unsigned char *b, int limit) -{ - int i; - for (i=0; i < limit && i < 258; ++i) - if (a[i] != b[i]) break; - return i; -} - -static unsigned int stbiw__zhash(unsigned char *data) -{ - stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16); - hash ^= hash << 3; - hash += hash >> 5; - hash ^= hash << 4; - hash += hash >> 17; - hash ^= hash << 25; - hash += hash >> 6; - return hash; -} - -#define stbiw__zlib_flush() (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount)) -#define stbiw__zlib_add(code,codebits) \ - (bitbuf |= (code) << bitcount, bitcount += (codebits), stbiw__zlib_flush()) -#define stbiw__zlib_huffa(b,c) stbiw__zlib_add(stbiw__zlib_bitrev(b,c),c) -// default huffman tables -#define stbiw__zlib_huff1(n) stbiw__zlib_huffa(0x30 + (n), 8) -#define stbiw__zlib_huff2(n) stbiw__zlib_huffa(0x190 + (n)-144, 9) -#define stbiw__zlib_huff3(n) stbiw__zlib_huffa(0 + (n)-256,7) -#define stbiw__zlib_huff4(n) stbiw__zlib_huffa(0xc0 + (n)-280,8) -#define stbiw__zlib_huff(n) ((n) <= 143 ? stbiw__zlib_huff1(n) : (n) <= 255 ? stbiw__zlib_huff2(n) : (n) <= 279 ? stbiw__zlib_huff3(n) : stbiw__zlib_huff4(n)) -#define stbiw__zlib_huffb(n) ((n) <= 143 ? stbiw__zlib_huff1(n) : stbiw__zlib_huff2(n)) - -#define stbiw__ZHASH 16384 - -#endif // STBIW_ZLIB_COMPRESS - -STBIWDEF unsigned char * stbi_zlib_compress(unsigned char *data, int data_len, int *out_len, int quality) -{ -#ifdef STBIW_ZLIB_COMPRESS - // user provided a zlib compress implementation, use that - return STBIW_ZLIB_COMPRESS(data, data_len, out_len, quality); -#else // use builtin - static unsigned short lengthc[] = { 3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258, 259 }; - static unsigned char lengtheb[]= { 0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; - static unsigned short distc[] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 32768 }; - static unsigned char disteb[] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; - unsigned int bitbuf=0; - int i,j, bitcount=0; - unsigned char *out = NULL; - unsigned char ***hash_table = (unsigned char***) STBIW_MALLOC(stbiw__ZHASH * sizeof(unsigned char**)); - if (hash_table == NULL) - return NULL; - if (quality < 5) quality = 5; - - stbiw__sbpush(out, 0x78); // DEFLATE 32K window - stbiw__sbpush(out, 0x5e); // FLEVEL = 1 - stbiw__zlib_add(1,1); // BFINAL = 1 - stbiw__zlib_add(1,2); // BTYPE = 1 -- fixed huffman - - for (i=0; i < stbiw__ZHASH; ++i) - hash_table[i] = NULL; - - i=0; - while (i < data_len-3) { - // hash next 3 bytes of data to be compressed - int h = stbiw__zhash(data+i)&(stbiw__ZHASH-1), best=3; - unsigned char *bestloc = 0; - unsigned char **hlist = hash_table[h]; - int n = stbiw__sbcount(hlist); - for (j=0; j < n; ++j) { - if (hlist[j]-data > i-32768) { // if entry lies within window - int d = stbiw__zlib_countm(hlist[j], data+i, data_len-i); - if (d >= best) { best=d; bestloc=hlist[j]; } - } - } - // when hash table entry is too long, delete half the entries - if (hash_table[h] && stbiw__sbn(hash_table[h]) == 2*quality) { - STBIW_MEMMOVE(hash_table[h], hash_table[h]+quality, sizeof(hash_table[h][0])*quality); - stbiw__sbn(hash_table[h]) = quality; - } - stbiw__sbpush(hash_table[h],data+i); - - if (bestloc) { - // "lazy matching" - check match at *next* byte, and if it's better, do cur byte as literal - h = stbiw__zhash(data+i+1)&(stbiw__ZHASH-1); - hlist = hash_table[h]; - n = stbiw__sbcount(hlist); - for (j=0; j < n; ++j) { - if (hlist[j]-data > i-32767) { - int e = stbiw__zlib_countm(hlist[j], data+i+1, data_len-i-1); - if (e > best) { // if next match is better, bail on current match - bestloc = NULL; - break; - } - } - } - } - - if (bestloc) { - int d = (int) (data+i - bestloc); // distance back - STBIW_ASSERT(d <= 32767 && best <= 258); - for (j=0; best > lengthc[j+1]-1; ++j); - stbiw__zlib_huff(j+257); - if (lengtheb[j]) stbiw__zlib_add(best - lengthc[j], lengtheb[j]); - for (j=0; d > distc[j+1]-1; ++j); - stbiw__zlib_add(stbiw__zlib_bitrev(j,5),5); - if (disteb[j]) stbiw__zlib_add(d - distc[j], disteb[j]); - i += best; - } else { - stbiw__zlib_huffb(data[i]); - ++i; - } - } - // write out final bytes - for (;i < data_len; ++i) - stbiw__zlib_huffb(data[i]); - stbiw__zlib_huff(256); // end of block - // pad with 0 bits to byte boundary - while (bitcount) - stbiw__zlib_add(0,1); - - for (i=0; i < stbiw__ZHASH; ++i) - (void) stbiw__sbfree(hash_table[i]); - STBIW_FREE(hash_table); - - // store uncompressed instead if compression was worse - if (stbiw__sbn(out) > data_len + 2 + ((data_len+32766)/32767)*5) { - stbiw__sbn(out) = 2; // truncate to DEFLATE 32K window and FLEVEL = 1 - for (j = 0; j < data_len;) { - int blocklen = data_len - j; - if (blocklen > 32767) blocklen = 32767; - stbiw__sbpush(out, data_len - j == blocklen); // BFINAL = ?, BTYPE = 0 -- no compression - stbiw__sbpush(out, STBIW_UCHAR(blocklen)); // LEN - stbiw__sbpush(out, STBIW_UCHAR(blocklen >> 8)); - stbiw__sbpush(out, STBIW_UCHAR(~blocklen)); // NLEN - stbiw__sbpush(out, STBIW_UCHAR(~blocklen >> 8)); - memcpy(out+stbiw__sbn(out), data+j, blocklen); - stbiw__sbn(out) += blocklen; - j += blocklen; - } - } - - { - // compute adler32 on input - unsigned int s1=1, s2=0; - int blocklen = (int) (data_len % 5552); - j=0; - while (j < data_len) { - for (i=0; i < blocklen; ++i) { s1 += data[j+i]; s2 += s1; } - s1 %= 65521; s2 %= 65521; - j += blocklen; - blocklen = 5552; - } - stbiw__sbpush(out, STBIW_UCHAR(s2 >> 8)); - stbiw__sbpush(out, STBIW_UCHAR(s2)); - stbiw__sbpush(out, STBIW_UCHAR(s1 >> 8)); - stbiw__sbpush(out, STBIW_UCHAR(s1)); - } - *out_len = stbiw__sbn(out); - // make returned pointer freeable - STBIW_MEMMOVE(stbiw__sbraw(out), out, *out_len); - return (unsigned char *) stbiw__sbraw(out); -#endif // STBIW_ZLIB_COMPRESS -} - -static unsigned int stbiw__crc32(unsigned char *buffer, int len) -{ -#ifdef STBIW_CRC32 - return STBIW_CRC32(buffer, len); -#else - static unsigned int crc_table[256] = - { - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, - 0x0eDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, - 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, - 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, - 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, - 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, - 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, - 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, - 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, - 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, - 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, - 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, - 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, - 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, - 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, - 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, - 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, - 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, - 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, - 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, - 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, - 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, - 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, - 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, - 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D - }; - - unsigned int crc = ~0u; - int i; - for (i=0; i < len; ++i) - crc = (crc >> 8) ^ crc_table[buffer[i] ^ (crc & 0xff)]; - return ~crc; -#endif -} - -#define stbiw__wpng4(o,a,b,c,d) ((o)[0]=STBIW_UCHAR(a),(o)[1]=STBIW_UCHAR(b),(o)[2]=STBIW_UCHAR(c),(o)[3]=STBIW_UCHAR(d),(o)+=4) -#define stbiw__wp32(data,v) stbiw__wpng4(data, (v)>>24,(v)>>16,(v)>>8,(v)); -#define stbiw__wptag(data,s) stbiw__wpng4(data, s[0],s[1],s[2],s[3]) - -static void stbiw__wpcrc(unsigned char **data, int len) -{ - unsigned int crc = stbiw__crc32(*data - len - 4, len+4); - stbiw__wp32(*data, crc); -} - -static unsigned char stbiw__paeth(int a, int b, int c) -{ - int p = a + b - c, pa = abs(p-a), pb = abs(p-b), pc = abs(p-c); - if (pa <= pb && pa <= pc) return STBIW_UCHAR(a); - if (pb <= pc) return STBIW_UCHAR(b); - return STBIW_UCHAR(c); -} - -// @OPTIMIZE: provide an option that always forces left-predict or paeth predict -static void stbiw__encode_png_line(unsigned char *pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char *line_buffer) -{ - static int mapping[] = { 0,1,2,3,4 }; - static int firstmap[] = { 0,1,0,5,6 }; - int *mymap = (y != 0) ? mapping : firstmap; - int i; - int type = mymap[filter_type]; - unsigned char *z = pixels + stride_bytes * (stbi__flip_vertically_on_write ? height-1-y : y); - int signed_stride = stbi__flip_vertically_on_write ? -stride_bytes : stride_bytes; - - if (type==0) { - memcpy(line_buffer, z, width*n); - return; - } - - // first loop isn't optimized since it's just one pixel - for (i = 0; i < n; ++i) { - switch (type) { - case 1: line_buffer[i] = z[i]; break; - case 2: line_buffer[i] = z[i] - z[i-signed_stride]; break; - case 3: line_buffer[i] = z[i] - (z[i-signed_stride]>>1); break; - case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-signed_stride],0)); break; - case 5: line_buffer[i] = z[i]; break; - case 6: line_buffer[i] = z[i]; break; - } - } - switch (type) { - case 1: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-n]; break; - case 2: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-signed_stride]; break; - case 3: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - ((z[i-n] + z[i-signed_stride])>>1); break; - case 4: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-signed_stride], z[i-signed_stride-n]); break; - case 5: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - (z[i-n]>>1); break; - case 6: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break; - } -} - -STBIWDEF unsigned char *stbi_write_png_to_mem(const unsigned char *pixels, int stride_bytes, int x, int y, int n, int *out_len) -{ - int force_filter = stbi_write_force_png_filter; - int ctype[5] = { -1, 0, 4, 2, 6 }; - unsigned char sig[8] = { 137,80,78,71,13,10,26,10 }; - unsigned char *out,*o, *filt, *zlib; - signed char *line_buffer; - int j,zlen; - - if (stride_bytes == 0) - stride_bytes = x * n; - - if (force_filter >= 5) { - force_filter = -1; - } - - filt = (unsigned char *) STBIW_MALLOC((x*n+1) * y); if (!filt) return 0; - line_buffer = (signed char *) STBIW_MALLOC(x * n); if (!line_buffer) { STBIW_FREE(filt); return 0; } - for (j=0; j < y; ++j) { - int filter_type; - if (force_filter > -1) { - filter_type = force_filter; - stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, force_filter, line_buffer); - } else { // Estimate the best filter by running through all of them: - int best_filter = 0, best_filter_val = 0x7fffffff, est, i; - for (filter_type = 0; filter_type < 5; filter_type++) { - stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, filter_type, line_buffer); - - // Estimate the entropy of the line using this filter; the less, the better. - est = 0; - for (i = 0; i < x*n; ++i) { - est += abs((signed char) line_buffer[i]); - } - if (est < best_filter_val) { - best_filter_val = est; - best_filter = filter_type; - } - } - if (filter_type != best_filter) { // If the last iteration already got us the best filter, don't redo it - stbiw__encode_png_line((unsigned char*)(pixels), stride_bytes, x, y, j, n, best_filter, line_buffer); - filter_type = best_filter; - } - } - // when we get here, filter_type contains the filter type, and line_buffer contains the data - filt[j*(x*n+1)] = (unsigned char) filter_type; - STBIW_MEMMOVE(filt+j*(x*n+1)+1, line_buffer, x*n); - } - STBIW_FREE(line_buffer); - zlib = stbi_zlib_compress(filt, y*( x*n+1), &zlen, stbi_write_png_compression_level); - STBIW_FREE(filt); - if (!zlib) return 0; - - // each tag requires 12 bytes of overhead - out = (unsigned char *) STBIW_MALLOC(8 + 12+13 + 12+zlen + 12); - if (!out) return 0; - *out_len = 8 + 12+13 + 12+zlen + 12; - - o=out; - STBIW_MEMMOVE(o,sig,8); o+= 8; - stbiw__wp32(o, 13); // header length - stbiw__wptag(o, "IHDR"); - stbiw__wp32(o, x); - stbiw__wp32(o, y); - *o++ = 8; - *o++ = STBIW_UCHAR(ctype[n]); - *o++ = 0; - *o++ = 0; - *o++ = 0; - stbiw__wpcrc(&o,13); - - stbiw__wp32(o, zlen); - stbiw__wptag(o, "IDAT"); - STBIW_MEMMOVE(o, zlib, zlen); - o += zlen; - STBIW_FREE(zlib); - stbiw__wpcrc(&o, zlen); - - stbiw__wp32(o,0); - stbiw__wptag(o, "IEND"); - stbiw__wpcrc(&o,0); - - STBIW_ASSERT(o == out + *out_len); - - return out; -} - -#ifndef STBI_WRITE_NO_STDIO -STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes) -{ - FILE *f; - int len; - unsigned char *png = stbi_write_png_to_mem((const unsigned char *) data, stride_bytes, x, y, comp, &len); - if (png == NULL) return 0; - - f = stbiw__fopen(filename, "wb"); - if (!f) { STBIW_FREE(png); return 0; } - fwrite(png, 1, len, f); - fclose(f); - STBIW_FREE(png); - return 1; -} -#endif - -STBIWDEF int stbi_write_png_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int stride_bytes) -{ - int len; - unsigned char *png = stbi_write_png_to_mem((const unsigned char *) data, stride_bytes, x, y, comp, &len); - if (png == NULL) return 0; - func(context, png, len); - STBIW_FREE(png); - return 1; -} - - -/* *************************************************************************** - * - * JPEG writer - * - * This is based on Jon Olick's jo_jpeg.cpp: - * public domain Simple, Minimalistic JPEG writer - http://www.jonolick.com/code.html - */ - -static const unsigned char stbiw__jpg_ZigZag[] = { 0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18, - 24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63 }; - -static void stbiw__jpg_writeBits(stbi__write_context *s, int *bitBufP, int *bitCntP, const unsigned short *bs) { - int bitBuf = *bitBufP, bitCnt = *bitCntP; - bitCnt += bs[1]; - bitBuf |= bs[0] << (24 - bitCnt); - while(bitCnt >= 8) { - unsigned char c = (bitBuf >> 16) & 255; - stbiw__putc(s, c); - if(c == 255) { - stbiw__putc(s, 0); - } - bitBuf <<= 8; - bitCnt -= 8; - } - *bitBufP = bitBuf; - *bitCntP = bitCnt; -} - -static void stbiw__jpg_DCT(float *d0p, float *d1p, float *d2p, float *d3p, float *d4p, float *d5p, float *d6p, float *d7p) { - float d0 = *d0p, d1 = *d1p, d2 = *d2p, d3 = *d3p, d4 = *d4p, d5 = *d5p, d6 = *d6p, d7 = *d7p; - float z1, z2, z3, z4, z5, z11, z13; - - float tmp0 = d0 + d7; - float tmp7 = d0 - d7; - float tmp1 = d1 + d6; - float tmp6 = d1 - d6; - float tmp2 = d2 + d5; - float tmp5 = d2 - d5; - float tmp3 = d3 + d4; - float tmp4 = d3 - d4; - - // Even part - float tmp10 = tmp0 + tmp3; // phase 2 - float tmp13 = tmp0 - tmp3; - float tmp11 = tmp1 + tmp2; - float tmp12 = tmp1 - tmp2; - - d0 = tmp10 + tmp11; // phase 3 - d4 = tmp10 - tmp11; - - z1 = (tmp12 + tmp13) * 0.707106781f; // c4 - d2 = tmp13 + z1; // phase 5 - d6 = tmp13 - z1; - - // Odd part - tmp10 = tmp4 + tmp5; // phase 2 - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - // The rotator is modified from fig 4-8 to avoid extra negations. - z5 = (tmp10 - tmp12) * 0.382683433f; // c6 - z2 = tmp10 * 0.541196100f + z5; // c2-c6 - z4 = tmp12 * 1.306562965f + z5; // c2+c6 - z3 = tmp11 * 0.707106781f; // c4 - - z11 = tmp7 + z3; // phase 5 - z13 = tmp7 - z3; - - *d5p = z13 + z2; // phase 6 - *d3p = z13 - z2; - *d1p = z11 + z4; - *d7p = z11 - z4; - - *d0p = d0; *d2p = d2; *d4p = d4; *d6p = d6; -} - -static void stbiw__jpg_calcBits(int val, unsigned short bits[2]) { - int tmp1 = val < 0 ? -val : val; - val = val < 0 ? val-1 : val; - bits[1] = 1; - while(tmp1 >>= 1) { - ++bits[1]; - } - bits[0] = val & ((1<0)&&(DU[end0pos]==0); --end0pos) { - } - // end0pos = first element in reverse order !=0 - if(end0pos == 0) { - stbiw__jpg_writeBits(s, bitBuf, bitCnt, EOB); - return DU[0]; - } - for(i = 1; i <= end0pos; ++i) { - int startpos = i; - int nrzeroes; - unsigned short bits[2]; - for (; DU[i]==0 && i<=end0pos; ++i) { - } - nrzeroes = i-startpos; - if ( nrzeroes >= 16 ) { - int lng = nrzeroes>>4; - int nrmarker; - for (nrmarker=1; nrmarker <= lng; ++nrmarker) - stbiw__jpg_writeBits(s, bitBuf, bitCnt, M16zeroes); - nrzeroes &= 15; - } - stbiw__jpg_calcBits(DU[i], bits); - stbiw__jpg_writeBits(s, bitBuf, bitCnt, HTAC[(nrzeroes<<4)+bits[1]]); - stbiw__jpg_writeBits(s, bitBuf, bitCnt, bits); - } - if(end0pos != 63) { - stbiw__jpg_writeBits(s, bitBuf, bitCnt, EOB); - } - return DU[0]; -} - -static int stbi_write_jpg_core(stbi__write_context *s, int width, int height, int comp, const void* data, int quality) { - // Constants that don't pollute global namespace - static const unsigned char std_dc_luminance_nrcodes[] = {0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0}; - static const unsigned char std_dc_luminance_values[] = {0,1,2,3,4,5,6,7,8,9,10,11}; - static const unsigned char std_ac_luminance_nrcodes[] = {0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d}; - static const unsigned char std_ac_luminance_values[] = { - 0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08, - 0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28, - 0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59, - 0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89, - 0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6, - 0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2, - 0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa - }; - static const unsigned char std_dc_chrominance_nrcodes[] = {0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0}; - static const unsigned char std_dc_chrominance_values[] = {0,1,2,3,4,5,6,7,8,9,10,11}; - static const unsigned char std_ac_chrominance_nrcodes[] = {0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77}; - static const unsigned char std_ac_chrominance_values[] = { - 0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91, - 0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26, - 0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58, - 0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87, - 0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4, - 0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda, - 0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa - }; - // Huffman tables - static const unsigned short YDC_HT[256][2] = { {0,2},{2,3},{3,3},{4,3},{5,3},{6,3},{14,4},{30,5},{62,6},{126,7},{254,8},{510,9}}; - static const unsigned short UVDC_HT[256][2] = { {0,2},{1,2},{2,2},{6,3},{14,4},{30,5},{62,6},{126,7},{254,8},{510,9},{1022,10},{2046,11}}; - static const unsigned short YAC_HT[256][2] = { - {10,4},{0,2},{1,2},{4,3},{11,4},{26,5},{120,7},{248,8},{1014,10},{65410,16},{65411,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {12,4},{27,5},{121,7},{502,9},{2038,11},{65412,16},{65413,16},{65414,16},{65415,16},{65416,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {28,5},{249,8},{1015,10},{4084,12},{65417,16},{65418,16},{65419,16},{65420,16},{65421,16},{65422,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {58,6},{503,9},{4085,12},{65423,16},{65424,16},{65425,16},{65426,16},{65427,16},{65428,16},{65429,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {59,6},{1016,10},{65430,16},{65431,16},{65432,16},{65433,16},{65434,16},{65435,16},{65436,16},{65437,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {122,7},{2039,11},{65438,16},{65439,16},{65440,16},{65441,16},{65442,16},{65443,16},{65444,16},{65445,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {123,7},{4086,12},{65446,16},{65447,16},{65448,16},{65449,16},{65450,16},{65451,16},{65452,16},{65453,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {250,8},{4087,12},{65454,16},{65455,16},{65456,16},{65457,16},{65458,16},{65459,16},{65460,16},{65461,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {504,9},{32704,15},{65462,16},{65463,16},{65464,16},{65465,16},{65466,16},{65467,16},{65468,16},{65469,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {505,9},{65470,16},{65471,16},{65472,16},{65473,16},{65474,16},{65475,16},{65476,16},{65477,16},{65478,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {506,9},{65479,16},{65480,16},{65481,16},{65482,16},{65483,16},{65484,16},{65485,16},{65486,16},{65487,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {1017,10},{65488,16},{65489,16},{65490,16},{65491,16},{65492,16},{65493,16},{65494,16},{65495,16},{65496,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {1018,10},{65497,16},{65498,16},{65499,16},{65500,16},{65501,16},{65502,16},{65503,16},{65504,16},{65505,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {2040,11},{65506,16},{65507,16},{65508,16},{65509,16},{65510,16},{65511,16},{65512,16},{65513,16},{65514,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {65515,16},{65516,16},{65517,16},{65518,16},{65519,16},{65520,16},{65521,16},{65522,16},{65523,16},{65524,16},{0,0},{0,0},{0,0},{0,0},{0,0}, - {2041,11},{65525,16},{65526,16},{65527,16},{65528,16},{65529,16},{65530,16},{65531,16},{65532,16},{65533,16},{65534,16},{0,0},{0,0},{0,0},{0,0},{0,0} - }; - static const unsigned short UVAC_HT[256][2] = { - {0,2},{1,2},{4,3},{10,4},{24,5},{25,5},{56,6},{120,7},{500,9},{1014,10},{4084,12},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {11,4},{57,6},{246,8},{501,9},{2038,11},{4085,12},{65416,16},{65417,16},{65418,16},{65419,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {26,5},{247,8},{1015,10},{4086,12},{32706,15},{65420,16},{65421,16},{65422,16},{65423,16},{65424,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {27,5},{248,8},{1016,10},{4087,12},{65425,16},{65426,16},{65427,16},{65428,16},{65429,16},{65430,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {58,6},{502,9},{65431,16},{65432,16},{65433,16},{65434,16},{65435,16},{65436,16},{65437,16},{65438,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {59,6},{1017,10},{65439,16},{65440,16},{65441,16},{65442,16},{65443,16},{65444,16},{65445,16},{65446,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {121,7},{2039,11},{65447,16},{65448,16},{65449,16},{65450,16},{65451,16},{65452,16},{65453,16},{65454,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {122,7},{2040,11},{65455,16},{65456,16},{65457,16},{65458,16},{65459,16},{65460,16},{65461,16},{65462,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {249,8},{65463,16},{65464,16},{65465,16},{65466,16},{65467,16},{65468,16},{65469,16},{65470,16},{65471,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {503,9},{65472,16},{65473,16},{65474,16},{65475,16},{65476,16},{65477,16},{65478,16},{65479,16},{65480,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {504,9},{65481,16},{65482,16},{65483,16},{65484,16},{65485,16},{65486,16},{65487,16},{65488,16},{65489,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {505,9},{65490,16},{65491,16},{65492,16},{65493,16},{65494,16},{65495,16},{65496,16},{65497,16},{65498,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {506,9},{65499,16},{65500,16},{65501,16},{65502,16},{65503,16},{65504,16},{65505,16},{65506,16},{65507,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {2041,11},{65508,16},{65509,16},{65510,16},{65511,16},{65512,16},{65513,16},{65514,16},{65515,16},{65516,16},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, - {16352,14},{65517,16},{65518,16},{65519,16},{65520,16},{65521,16},{65522,16},{65523,16},{65524,16},{65525,16},{0,0},{0,0},{0,0},{0,0},{0,0}, - {1018,10},{32707,15},{65526,16},{65527,16},{65528,16},{65529,16},{65530,16},{65531,16},{65532,16},{65533,16},{65534,16},{0,0},{0,0},{0,0},{0,0},{0,0} - }; - static const int YQT[] = {16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22, - 37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99}; - static const int UVQT[] = {17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99, - 99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99}; - static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f, - 1.0f * 2.828427125f, 0.785694958f * 2.828427125f, 0.541196100f * 2.828427125f, 0.275899379f * 2.828427125f }; - - int row, col, i, k, subsample; - float fdtbl_Y[64], fdtbl_UV[64]; - unsigned char YTable[64], UVTable[64]; - - if(!data || !width || !height || comp > 4 || comp < 1) { - return 0; - } - - quality = quality ? quality : 90; - subsample = quality <= 90 ? 1 : 0; - quality = quality < 1 ? 1 : quality > 100 ? 100 : quality; - quality = quality < 50 ? 5000 / quality : 200 - quality * 2; - - for(i = 0; i < 64; ++i) { - int uvti, yti = (YQT[i]*quality+50)/100; - YTable[stbiw__jpg_ZigZag[i]] = (unsigned char) (yti < 1 ? 1 : yti > 255 ? 255 : yti); - uvti = (UVQT[i]*quality+50)/100; - UVTable[stbiw__jpg_ZigZag[i]] = (unsigned char) (uvti < 1 ? 1 : uvti > 255 ? 255 : uvti); - } - - for(row = 0, k = 0; row < 8; ++row) { - for(col = 0; col < 8; ++col, ++k) { - fdtbl_Y[k] = 1 / (YTable [stbiw__jpg_ZigZag[k]] * aasf[row] * aasf[col]); - fdtbl_UV[k] = 1 / (UVTable[stbiw__jpg_ZigZag[k]] * aasf[row] * aasf[col]); - } - } - - // Write Headers - { - static const unsigned char head0[] = { 0xFF,0xD8,0xFF,0xE0,0,0x10,'J','F','I','F',0,1,1,0,0,1,0,1,0,0,0xFF,0xDB,0,0x84,0 }; - static const unsigned char head2[] = { 0xFF,0xDA,0,0xC,3,1,0,2,0x11,3,0x11,0,0x3F,0 }; - const unsigned char head1[] = { 0xFF,0xC0,0,0x11,8,(unsigned char)(height>>8),STBIW_UCHAR(height),(unsigned char)(width>>8),STBIW_UCHAR(width), - 3,1,(unsigned char)(subsample?0x22:0x11),0,2,0x11,1,3,0x11,1,0xFF,0xC4,0x01,0xA2,0 }; - s->func(s->context, (void*)head0, sizeof(head0)); - s->func(s->context, (void*)YTable, sizeof(YTable)); - stbiw__putc(s, 1); - s->func(s->context, UVTable, sizeof(UVTable)); - s->func(s->context, (void*)head1, sizeof(head1)); - s->func(s->context, (void*)(std_dc_luminance_nrcodes+1), sizeof(std_dc_luminance_nrcodes)-1); - s->func(s->context, (void*)std_dc_luminance_values, sizeof(std_dc_luminance_values)); - stbiw__putc(s, 0x10); // HTYACinfo - s->func(s->context, (void*)(std_ac_luminance_nrcodes+1), sizeof(std_ac_luminance_nrcodes)-1); - s->func(s->context, (void*)std_ac_luminance_values, sizeof(std_ac_luminance_values)); - stbiw__putc(s, 1); // HTUDCinfo - s->func(s->context, (void*)(std_dc_chrominance_nrcodes+1), sizeof(std_dc_chrominance_nrcodes)-1); - s->func(s->context, (void*)std_dc_chrominance_values, sizeof(std_dc_chrominance_values)); - stbiw__putc(s, 0x11); // HTUACinfo - s->func(s->context, (void*)(std_ac_chrominance_nrcodes+1), sizeof(std_ac_chrominance_nrcodes)-1); - s->func(s->context, (void*)std_ac_chrominance_values, sizeof(std_ac_chrominance_values)); - s->func(s->context, (void*)head2, sizeof(head2)); - } - - // Encode 8x8 macroblocks - { - static const unsigned short fillBits[] = {0x7F, 7}; - int DCY=0, DCU=0, DCV=0; - int bitBuf=0, bitCnt=0; - // comp == 2 is grey+alpha (alpha is ignored) - int ofsG = comp > 2 ? 1 : 0, ofsB = comp > 2 ? 2 : 0; - const unsigned char *dataR = (const unsigned char *)data; - const unsigned char *dataG = dataR + ofsG; - const unsigned char *dataB = dataR + ofsB; - int x, y, pos; - if(subsample) { - for(y = 0; y < height; y += 16) { - for(x = 0; x < width; x += 16) { - float Y[256], U[256], V[256]; - for(row = y, pos = 0; row < y+16; ++row) { - // row >= height => use last input row - int clamped_row = (row < height) ? row : height - 1; - int base_p = (stbi__flip_vertically_on_write ? (height-1-clamped_row) : clamped_row)*width*comp; - for(col = x; col < x+16; ++col, ++pos) { - // if col >= width => use pixel from last input column - int p = base_p + ((col < width) ? col : (width-1))*comp; - float r = dataR[p], g = dataG[p], b = dataB[p]; - Y[pos]= +0.29900f*r + 0.58700f*g + 0.11400f*b - 128; - U[pos]= -0.16874f*r - 0.33126f*g + 0.50000f*b; - V[pos]= +0.50000f*r - 0.41869f*g - 0.08131f*b; - } - } - DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y+0, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y+8, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y+128, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y+136, 16, fdtbl_Y, DCY, YDC_HT, YAC_HT); - - // subsample U,V - { - float subU[64], subV[64]; - int yy, xx; - for(yy = 0, pos = 0; yy < 8; ++yy) { - for(xx = 0; xx < 8; ++xx, ++pos) { - int j = yy*32+xx*2; - subU[pos] = (U[j+0] + U[j+1] + U[j+16] + U[j+17]) * 0.25f; - subV[pos] = (V[j+0] + V[j+1] + V[j+16] + V[j+17]) * 0.25f; - } - } - DCU = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, subU, 8, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); - DCV = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, subV, 8, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); - } - } - } - } else { - for(y = 0; y < height; y += 8) { - for(x = 0; x < width; x += 8) { - float Y[64], U[64], V[64]; - for(row = y, pos = 0; row < y+8; ++row) { - // row >= height => use last input row - int clamped_row = (row < height) ? row : height - 1; - int base_p = (stbi__flip_vertically_on_write ? (height-1-clamped_row) : clamped_row)*width*comp; - for(col = x; col < x+8; ++col, ++pos) { - // if col >= width => use pixel from last input column - int p = base_p + ((col < width) ? col : (width-1))*comp; - float r = dataR[p], g = dataG[p], b = dataB[p]; - Y[pos]= +0.29900f*r + 0.58700f*g + 0.11400f*b - 128; - U[pos]= -0.16874f*r - 0.33126f*g + 0.50000f*b; - V[pos]= +0.50000f*r - 0.41869f*g - 0.08131f*b; - } - } - - DCY = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, Y, 8, fdtbl_Y, DCY, YDC_HT, YAC_HT); - DCU = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, U, 8, fdtbl_UV, DCU, UVDC_HT, UVAC_HT); - DCV = stbiw__jpg_processDU(s, &bitBuf, &bitCnt, V, 8, fdtbl_UV, DCV, UVDC_HT, UVAC_HT); - } - } - } - - // Do the bit alignment of the EOI marker - stbiw__jpg_writeBits(s, &bitBuf, &bitCnt, fillBits); - } - - // EOI - stbiw__putc(s, 0xFF); - stbiw__putc(s, 0xD9); - - return 1; -} - -STBIWDEF int stbi_write_jpg_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int quality) -{ - stbi__write_context s = { 0 }; - stbi__start_write_callbacks(&s, func, context); - return stbi_write_jpg_core(&s, x, y, comp, (void *) data, quality); -} - - -#ifndef STBI_WRITE_NO_STDIO -STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality) -{ - stbi__write_context s = { 0 }; - if (stbi__start_write_file(&s,filename)) { - int r = stbi_write_jpg_core(&s, x, y, comp, data, quality); - stbi__end_write_file(&s); - return r; - } else - return 0; -} -#endif - -#endif // STB_IMAGE_WRITE_IMPLEMENTATION - -/* Revision history - 1.16 (2021-07-11) - make Deflate code emit uncompressed blocks when it would otherwise expand - support writing BMPs with alpha channel - 1.15 (2020-07-13) unknown - 1.14 (2020-02-02) updated JPEG writer to downsample chroma channels - 1.13 - 1.12 - 1.11 (2019-08-11) - - 1.10 (2019-02-07) - support utf8 filenames in Windows; fix warnings and platform ifdefs - 1.09 (2018-02-11) - fix typo in zlib quality API, improve STB_I_W_STATIC in C++ - 1.08 (2018-01-29) - add stbi__flip_vertically_on_write, external zlib, zlib quality, choose PNG filter - 1.07 (2017-07-24) - doc fix - 1.06 (2017-07-23) - writing JPEG (using Jon Olick's code) - 1.05 ??? - 1.04 (2017-03-03) - monochrome BMP expansion - 1.03 ??? - 1.02 (2016-04-02) - avoid allocating large structures on the stack - 1.01 (2016-01-16) - STBIW_REALLOC_SIZED: support allocators with no realloc support - avoid race-condition in crc initialization - minor compile issues - 1.00 (2015-09-14) - installable file IO function - 0.99 (2015-09-13) - warning fixes; TGA rle support - 0.98 (2015-04-08) - added STBIW_MALLOC, STBIW_ASSERT etc - 0.97 (2015-01-18) - fixed HDR asserts, rewrote HDR rle logic - 0.96 (2015-01-17) - add HDR output - fix monochrome BMP - 0.95 (2014-08-17) - add monochrome TGA output - 0.94 (2014-05-31) - rename private functions to avoid conflicts with stb_image.h - 0.93 (2014-05-27) - warning fixes - 0.92 (2010-08-01) - casts to unsigned char to fix warnings - 0.91 (2010-07-17) - first public release - 0.90 first internal release -*/ - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_perlin.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_perlin.h deleted file mode 100644 index 47cb9a43..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_perlin.h +++ /dev/null @@ -1,428 +0,0 @@ -// stb_perlin.h - v0.5 - perlin noise -// public domain single-file C implementation by Sean Barrett -// -// LICENSE -// -// See end of file. -// -// -// to create the implementation, -// #define STB_PERLIN_IMPLEMENTATION -// in *one* C/CPP file that includes this file. -// -// -// Documentation: -// -// float stb_perlin_noise3( float x, -// float y, -// float z, -// int x_wrap=0, -// int y_wrap=0, -// int z_wrap=0) -// -// This function computes a random value at the coordinate (x,y,z). -// Adjacent random values are continuous but the noise fluctuates -// its randomness with period 1, i.e. takes on wholly unrelated values -// at integer points. Specifically, this implements Ken Perlin's -// revised noise function from 2002. -// -// The "wrap" parameters can be used to create wraparound noise that -// wraps at powers of two. The numbers MUST be powers of two. Specify -// 0 to mean "don't care". (The noise always wraps every 256 due -// details of the implementation, even if you ask for larger or no -// wrapping.) -// -// float stb_perlin_noise3_seed( float x, -// float y, -// float z, -// int x_wrap=0, -// int y_wrap=0, -// int z_wrap=0, -// int seed) -// -// As above, but 'seed' selects from multiple different variations of the -// noise function. The current implementation only uses the bottom 8 bits -// of 'seed', but possibly in the future more bits will be used. -// -// -// Fractal Noise: -// -// Three common fractal noise functions are included, which produce -// a wide variety of nice effects depending on the parameters -// provided. Note that each function will call stb_perlin_noise3 -// 'octaves' times, so this parameter will affect runtime. -// -// float stb_perlin_ridge_noise3(float x, float y, float z, -// float lacunarity, float gain, float offset, int octaves) -// -// float stb_perlin_fbm_noise3(float x, float y, float z, -// float lacunarity, float gain, int octaves) -// -// float stb_perlin_turbulence_noise3(float x, float y, float z, -// float lacunarity, float gain, int octaves) -// -// Typical values to start playing with: -// octaves = 6 -- number of "octaves" of noise3() to sum -// lacunarity = ~ 2.0 -- spacing between successive octaves (use exactly 2.0 for wrapping output) -// gain = 0.5 -- relative weighting applied to each successive octave -// offset = 1.0? -- used to invert the ridges, may need to be larger, not sure -// -// -// Contributors: -// Jack Mott - additional noise functions -// Jordan Peck - seeded noise -// - - -#ifdef __cplusplus -extern "C" { -#endif -extern float stb_perlin_noise3(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap); -extern float stb_perlin_noise3_seed(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap, int seed); -extern float stb_perlin_ridge_noise3(float x, float y, float z, float lacunarity, float gain, float offset, int octaves); -extern float stb_perlin_fbm_noise3(float x, float y, float z, float lacunarity, float gain, int octaves); -extern float stb_perlin_turbulence_noise3(float x, float y, float z, float lacunarity, float gain, int octaves); -extern float stb_perlin_noise3_wrap_nonpow2(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap, unsigned char seed); -#ifdef __cplusplus -} -#endif - -#ifdef STB_PERLIN_IMPLEMENTATION - -#include // fabs() - -// not same permutation table as Perlin's reference to avoid copyright issues; -// Perlin's table can be found at http://mrl.nyu.edu/~perlin/noise/ -static unsigned char stb__perlin_randtab[512] = -{ - 23, 125, 161, 52, 103, 117, 70, 37, 247, 101, 203, 169, 124, 126, 44, 123, - 152, 238, 145, 45, 171, 114, 253, 10, 192, 136, 4, 157, 249, 30, 35, 72, - 175, 63, 77, 90, 181, 16, 96, 111, 133, 104, 75, 162, 93, 56, 66, 240, - 8, 50, 84, 229, 49, 210, 173, 239, 141, 1, 87, 18, 2, 198, 143, 57, - 225, 160, 58, 217, 168, 206, 245, 204, 199, 6, 73, 60, 20, 230, 211, 233, - 94, 200, 88, 9, 74, 155, 33, 15, 219, 130, 226, 202, 83, 236, 42, 172, - 165, 218, 55, 222, 46, 107, 98, 154, 109, 67, 196, 178, 127, 158, 13, 243, - 65, 79, 166, 248, 25, 224, 115, 80, 68, 51, 184, 128, 232, 208, 151, 122, - 26, 212, 105, 43, 179, 213, 235, 148, 146, 89, 14, 195, 28, 78, 112, 76, - 250, 47, 24, 251, 140, 108, 186, 190, 228, 170, 183, 139, 39, 188, 244, 246, - 132, 48, 119, 144, 180, 138, 134, 193, 82, 182, 120, 121, 86, 220, 209, 3, - 91, 241, 149, 85, 205, 150, 113, 216, 31, 100, 41, 164, 177, 214, 153, 231, - 38, 71, 185, 174, 97, 201, 29, 95, 7, 92, 54, 254, 191, 118, 34, 221, - 131, 11, 163, 99, 234, 81, 227, 147, 156, 176, 17, 142, 69, 12, 110, 62, - 27, 255, 0, 194, 59, 116, 242, 252, 19, 21, 187, 53, 207, 129, 64, 135, - 61, 40, 167, 237, 102, 223, 106, 159, 197, 189, 215, 137, 36, 32, 22, 5, - - // and a second copy so we don't need an extra mask or static initializer - 23, 125, 161, 52, 103, 117, 70, 37, 247, 101, 203, 169, 124, 126, 44, 123, - 152, 238, 145, 45, 171, 114, 253, 10, 192, 136, 4, 157, 249, 30, 35, 72, - 175, 63, 77, 90, 181, 16, 96, 111, 133, 104, 75, 162, 93, 56, 66, 240, - 8, 50, 84, 229, 49, 210, 173, 239, 141, 1, 87, 18, 2, 198, 143, 57, - 225, 160, 58, 217, 168, 206, 245, 204, 199, 6, 73, 60, 20, 230, 211, 233, - 94, 200, 88, 9, 74, 155, 33, 15, 219, 130, 226, 202, 83, 236, 42, 172, - 165, 218, 55, 222, 46, 107, 98, 154, 109, 67, 196, 178, 127, 158, 13, 243, - 65, 79, 166, 248, 25, 224, 115, 80, 68, 51, 184, 128, 232, 208, 151, 122, - 26, 212, 105, 43, 179, 213, 235, 148, 146, 89, 14, 195, 28, 78, 112, 76, - 250, 47, 24, 251, 140, 108, 186, 190, 228, 170, 183, 139, 39, 188, 244, 246, - 132, 48, 119, 144, 180, 138, 134, 193, 82, 182, 120, 121, 86, 220, 209, 3, - 91, 241, 149, 85, 205, 150, 113, 216, 31, 100, 41, 164, 177, 214, 153, 231, - 38, 71, 185, 174, 97, 201, 29, 95, 7, 92, 54, 254, 191, 118, 34, 221, - 131, 11, 163, 99, 234, 81, 227, 147, 156, 176, 17, 142, 69, 12, 110, 62, - 27, 255, 0, 194, 59, 116, 242, 252, 19, 21, 187, 53, 207, 129, 64, 135, - 61, 40, 167, 237, 102, 223, 106, 159, 197, 189, 215, 137, 36, 32, 22, 5, -}; - - -// perlin's gradient has 12 cases so some get used 1/16th of the time -// and some 2/16ths. We reduce bias by changing those fractions -// to 5/64ths and 6/64ths - -// this array is designed to match the previous implementation -// of gradient hash: indices[stb__perlin_randtab[i]&63] -static unsigned char stb__perlin_randtab_grad_idx[512] = -{ - 7, 9, 5, 0, 11, 1, 6, 9, 3, 9, 11, 1, 8, 10, 4, 7, - 8, 6, 1, 5, 3, 10, 9, 10, 0, 8, 4, 1, 5, 2, 7, 8, - 7, 11, 9, 10, 1, 0, 4, 7, 5, 0, 11, 6, 1, 4, 2, 8, - 8, 10, 4, 9, 9, 2, 5, 7, 9, 1, 7, 2, 2, 6, 11, 5, - 5, 4, 6, 9, 0, 1, 1, 0, 7, 6, 9, 8, 4, 10, 3, 1, - 2, 8, 8, 9, 10, 11, 5, 11, 11, 2, 6, 10, 3, 4, 2, 4, - 9, 10, 3, 2, 6, 3, 6, 10, 5, 3, 4, 10, 11, 2, 9, 11, - 1, 11, 10, 4, 9, 4, 11, 0, 4, 11, 4, 0, 0, 0, 7, 6, - 10, 4, 1, 3, 11, 5, 3, 4, 2, 9, 1, 3, 0, 1, 8, 0, - 6, 7, 8, 7, 0, 4, 6, 10, 8, 2, 3, 11, 11, 8, 0, 2, - 4, 8, 3, 0, 0, 10, 6, 1, 2, 2, 4, 5, 6, 0, 1, 3, - 11, 9, 5, 5, 9, 6, 9, 8, 3, 8, 1, 8, 9, 6, 9, 11, - 10, 7, 5, 6, 5, 9, 1, 3, 7, 0, 2, 10, 11, 2, 6, 1, - 3, 11, 7, 7, 2, 1, 7, 3, 0, 8, 1, 1, 5, 0, 6, 10, - 11, 11, 0, 2, 7, 0, 10, 8, 3, 5, 7, 1, 11, 1, 0, 7, - 9, 0, 11, 5, 10, 3, 2, 3, 5, 9, 7, 9, 8, 4, 6, 5, - - // and a second copy so we don't need an extra mask or static initializer - 7, 9, 5, 0, 11, 1, 6, 9, 3, 9, 11, 1, 8, 10, 4, 7, - 8, 6, 1, 5, 3, 10, 9, 10, 0, 8, 4, 1, 5, 2, 7, 8, - 7, 11, 9, 10, 1, 0, 4, 7, 5, 0, 11, 6, 1, 4, 2, 8, - 8, 10, 4, 9, 9, 2, 5, 7, 9, 1, 7, 2, 2, 6, 11, 5, - 5, 4, 6, 9, 0, 1, 1, 0, 7, 6, 9, 8, 4, 10, 3, 1, - 2, 8, 8, 9, 10, 11, 5, 11, 11, 2, 6, 10, 3, 4, 2, 4, - 9, 10, 3, 2, 6, 3, 6, 10, 5, 3, 4, 10, 11, 2, 9, 11, - 1, 11, 10, 4, 9, 4, 11, 0, 4, 11, 4, 0, 0, 0, 7, 6, - 10, 4, 1, 3, 11, 5, 3, 4, 2, 9, 1, 3, 0, 1, 8, 0, - 6, 7, 8, 7, 0, 4, 6, 10, 8, 2, 3, 11, 11, 8, 0, 2, - 4, 8, 3, 0, 0, 10, 6, 1, 2, 2, 4, 5, 6, 0, 1, 3, - 11, 9, 5, 5, 9, 6, 9, 8, 3, 8, 1, 8, 9, 6, 9, 11, - 10, 7, 5, 6, 5, 9, 1, 3, 7, 0, 2, 10, 11, 2, 6, 1, - 3, 11, 7, 7, 2, 1, 7, 3, 0, 8, 1, 1, 5, 0, 6, 10, - 11, 11, 0, 2, 7, 0, 10, 8, 3, 5, 7, 1, 11, 1, 0, 7, - 9, 0, 11, 5, 10, 3, 2, 3, 5, 9, 7, 9, 8, 4, 6, 5, -}; - -static float stb__perlin_lerp(float a, float b, float t) -{ - return a + (b-a) * t; -} - -static int stb__perlin_fastfloor(float a) -{ - int ai = (int) a; - return (a < ai) ? ai-1 : ai; -} - -// different grad function from Perlin's, but easy to modify to match reference -static float stb__perlin_grad(int grad_idx, float x, float y, float z) -{ - static float basis[12][4] = - { - { 1, 1, 0 }, - { -1, 1, 0 }, - { 1,-1, 0 }, - { -1,-1, 0 }, - { 1, 0, 1 }, - { -1, 0, 1 }, - { 1, 0,-1 }, - { -1, 0,-1 }, - { 0, 1, 1 }, - { 0,-1, 1 }, - { 0, 1,-1 }, - { 0,-1,-1 }, - }; - - float *grad = basis[grad_idx]; - return grad[0]*x + grad[1]*y + grad[2]*z; -} - -float stb_perlin_noise3_internal(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap, unsigned char seed) -{ - float u,v,w; - float n000,n001,n010,n011,n100,n101,n110,n111; - float n00,n01,n10,n11; - float n0,n1; - - unsigned int x_mask = (x_wrap-1) & 255; - unsigned int y_mask = (y_wrap-1) & 255; - unsigned int z_mask = (z_wrap-1) & 255; - int px = stb__perlin_fastfloor(x); - int py = stb__perlin_fastfloor(y); - int pz = stb__perlin_fastfloor(z); - int x0 = px & x_mask, x1 = (px+1) & x_mask; - int y0 = py & y_mask, y1 = (py+1) & y_mask; - int z0 = pz & z_mask, z1 = (pz+1) & z_mask; - int r0,r1, r00,r01,r10,r11; - - #define stb__perlin_ease(a) (((a*6-15)*a + 10) * a * a * a) - - x -= px; u = stb__perlin_ease(x); - y -= py; v = stb__perlin_ease(y); - z -= pz; w = stb__perlin_ease(z); - - r0 = stb__perlin_randtab[x0+seed]; - r1 = stb__perlin_randtab[x1+seed]; - - r00 = stb__perlin_randtab[r0+y0]; - r01 = stb__perlin_randtab[r0+y1]; - r10 = stb__perlin_randtab[r1+y0]; - r11 = stb__perlin_randtab[r1+y1]; - - n000 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r00+z0], x , y , z ); - n001 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r00+z1], x , y , z-1 ); - n010 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r01+z0], x , y-1, z ); - n011 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r01+z1], x , y-1, z-1 ); - n100 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r10+z0], x-1, y , z ); - n101 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r10+z1], x-1, y , z-1 ); - n110 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r11+z0], x-1, y-1, z ); - n111 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r11+z1], x-1, y-1, z-1 ); - - n00 = stb__perlin_lerp(n000,n001,w); - n01 = stb__perlin_lerp(n010,n011,w); - n10 = stb__perlin_lerp(n100,n101,w); - n11 = stb__perlin_lerp(n110,n111,w); - - n0 = stb__perlin_lerp(n00,n01,v); - n1 = stb__perlin_lerp(n10,n11,v); - - return stb__perlin_lerp(n0,n1,u); -} - -float stb_perlin_noise3(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap) -{ - return stb_perlin_noise3_internal(x,y,z,x_wrap,y_wrap,z_wrap,0); -} - -float stb_perlin_noise3_seed(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap, int seed) -{ - return stb_perlin_noise3_internal(x,y,z,x_wrap,y_wrap,z_wrap, (unsigned char) seed); -} - -float stb_perlin_ridge_noise3(float x, float y, float z, float lacunarity, float gain, float offset, int octaves) -{ - int i; - float frequency = 1.0f; - float prev = 1.0f; - float amplitude = 0.5f; - float sum = 0.0f; - - for (i = 0; i < octaves; i++) { - float r = stb_perlin_noise3_internal(x*frequency,y*frequency,z*frequency,0,0,0,(unsigned char)i); - r = offset - (float) fabs(r); - r = r*r; - sum += r*amplitude*prev; - prev = r; - frequency *= lacunarity; - amplitude *= gain; - } - return sum; -} - -float stb_perlin_fbm_noise3(float x, float y, float z, float lacunarity, float gain, int octaves) -{ - int i; - float frequency = 1.0f; - float amplitude = 1.0f; - float sum = 0.0f; - - for (i = 0; i < octaves; i++) { - sum += stb_perlin_noise3_internal(x*frequency,y*frequency,z*frequency,0,0,0,(unsigned char)i)*amplitude; - frequency *= lacunarity; - amplitude *= gain; - } - return sum; -} - -float stb_perlin_turbulence_noise3(float x, float y, float z, float lacunarity, float gain, int octaves) -{ - int i; - float frequency = 1.0f; - float amplitude = 1.0f; - float sum = 0.0f; - - for (i = 0; i < octaves; i++) { - float r = stb_perlin_noise3_internal(x*frequency,y*frequency,z*frequency,0,0,0,(unsigned char)i)*amplitude; - sum += (float) fabs(r); - frequency *= lacunarity; - amplitude *= gain; - } - return sum; -} - -float stb_perlin_noise3_wrap_nonpow2(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap, unsigned char seed) -{ - float u,v,w; - float n000,n001,n010,n011,n100,n101,n110,n111; - float n00,n01,n10,n11; - float n0,n1; - - int px = stb__perlin_fastfloor(x); - int py = stb__perlin_fastfloor(y); - int pz = stb__perlin_fastfloor(z); - int x_wrap2 = (x_wrap ? x_wrap : 256); - int y_wrap2 = (y_wrap ? y_wrap : 256); - int z_wrap2 = (z_wrap ? z_wrap : 256); - int x0 = px % x_wrap2, x1; - int y0 = py % y_wrap2, y1; - int z0 = pz % z_wrap2, z1; - int r0,r1, r00,r01,r10,r11; - - if (x0 < 0) x0 += x_wrap2; - if (y0 < 0) y0 += y_wrap2; - if (z0 < 0) z0 += z_wrap2; - x1 = (x0+1) % x_wrap2; - y1 = (y0+1) % y_wrap2; - z1 = (z0+1) % z_wrap2; - - #define stb__perlin_ease(a) (((a*6-15)*a + 10) * a * a * a) - - x -= px; u = stb__perlin_ease(x); - y -= py; v = stb__perlin_ease(y); - z -= pz; w = stb__perlin_ease(z); - - r0 = stb__perlin_randtab[x0]; - r0 = stb__perlin_randtab[r0+seed]; - r1 = stb__perlin_randtab[x1]; - r1 = stb__perlin_randtab[r1+seed]; - - r00 = stb__perlin_randtab[r0+y0]; - r01 = stb__perlin_randtab[r0+y1]; - r10 = stb__perlin_randtab[r1+y0]; - r11 = stb__perlin_randtab[r1+y1]; - - n000 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r00+z0], x , y , z ); - n001 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r00+z1], x , y , z-1 ); - n010 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r01+z0], x , y-1, z ); - n011 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r01+z1], x , y-1, z-1 ); - n100 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r10+z0], x-1, y , z ); - n101 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r10+z1], x-1, y , z-1 ); - n110 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r11+z0], x-1, y-1, z ); - n111 = stb__perlin_grad(stb__perlin_randtab_grad_idx[r11+z1], x-1, y-1, z-1 ); - - n00 = stb__perlin_lerp(n000,n001,w); - n01 = stb__perlin_lerp(n010,n011,w); - n10 = stb__perlin_lerp(n100,n101,w); - n11 = stb__perlin_lerp(n110,n111,w); - - n0 = stb__perlin_lerp(n00,n01,v); - n1 = stb__perlin_lerp(n10,n11,v); - - return stb__perlin_lerp(n0,n1,u); -} -#endif // STB_PERLIN_IMPLEMENTATION - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_rect_pack.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_rect_pack.h deleted file mode 100644 index 6a633ce6..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_rect_pack.h +++ /dev/null @@ -1,623 +0,0 @@ -// stb_rect_pack.h - v1.01 - public domain - rectangle packing -// Sean Barrett 2014 -// -// Useful for e.g. packing rectangular textures into an atlas. -// Does not do rotation. -// -// Before #including, -// -// #define STB_RECT_PACK_IMPLEMENTATION -// -// in the file that you want to have the implementation. -// -// Not necessarily the awesomest packing method, but better than -// the totally naive one in stb_truetype (which is primarily what -// this is meant to replace). -// -// Has only had a few tests run, may have issues. -// -// More docs to come. -// -// No memory allocations; uses qsort() and assert() from stdlib. -// Can override those by defining STBRP_SORT and STBRP_ASSERT. -// -// This library currently uses the Skyline Bottom-Left algorithm. -// -// Please note: better rectangle packers are welcome! Please -// implement them to the same API, but with a different init -// function. -// -// Credits -// -// Library -// Sean Barrett -// Minor features -// Martins Mozeiko -// github:IntellectualKitty -// -// Bugfixes / warning fixes -// Jeremy Jaussaud -// Fabian Giesen -// -// Version history: -// -// 1.01 (2021-07-11) always use large rect mode, expose STBRP__MAXVAL in public section -// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles -// 0.99 (2019-02-07) warning fixes -// 0.11 (2017-03-03) return packing success/fail result -// 0.10 (2016-10-25) remove cast-away-const to avoid warnings -// 0.09 (2016-08-27) fix compiler warnings -// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0) -// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0) -// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort -// 0.05: added STBRP_ASSERT to allow replacing assert -// 0.04: fixed minor bug in STBRP_LARGE_RECTS support -// 0.01: initial release -// -// LICENSE -// -// See end of file for license information. - -////////////////////////////////////////////////////////////////////////////// -// -// INCLUDE SECTION -// - -#ifndef STB_INCLUDE_STB_RECT_PACK_H -#define STB_INCLUDE_STB_RECT_PACK_H - -#define STB_RECT_PACK_VERSION 1 - -#ifdef STBRP_STATIC -#define STBRP_DEF static -#else -#define STBRP_DEF extern -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct stbrp_context stbrp_context; -typedef struct stbrp_node stbrp_node; -typedef struct stbrp_rect stbrp_rect; - -typedef int stbrp_coord; - -#define STBRP__MAXVAL 0x7fffffff -// Mostly for internal use, but this is the maximum supported coordinate value. - -STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects); -// Assign packed locations to rectangles. The rectangles are of type -// 'stbrp_rect' defined below, stored in the array 'rects', and there -// are 'num_rects' many of them. -// -// Rectangles which are successfully packed have the 'was_packed' flag -// set to a non-zero value and 'x' and 'y' store the minimum location -// on each axis (i.e. bottom-left in cartesian coordinates, top-left -// if you imagine y increasing downwards). Rectangles which do not fit -// have the 'was_packed' flag set to 0. -// -// You should not try to access the 'rects' array from another thread -// while this function is running, as the function temporarily reorders -// the array while it executes. -// -// To pack into another rectangle, you need to call stbrp_init_target -// again. To continue packing into the same rectangle, you can call -// this function again. Calling this multiple times with multiple rect -// arrays will probably produce worse packing results than calling it -// a single time with the full rectangle array, but the option is -// available. -// -// The function returns 1 if all of the rectangles were successfully -// packed and 0 otherwise. - -struct stbrp_rect -{ - // reserved for your use: - int id; - - // input: - stbrp_coord w, h; - - // output: - stbrp_coord x, y; - int was_packed; // non-zero if valid packing - -}; // 16 bytes, nominally - - -STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes); -// Initialize a rectangle packer to: -// pack a rectangle that is 'width' by 'height' in dimensions -// using temporary storage provided by the array 'nodes', which is 'num_nodes' long -// -// You must call this function every time you start packing into a new target. -// -// There is no "shutdown" function. The 'nodes' memory must stay valid for -// the following stbrp_pack_rects() call (or calls), but can be freed after -// the call (or calls) finish. -// -// Note: to guarantee best results, either: -// 1. make sure 'num_nodes' >= 'width' -// or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1' -// -// If you don't do either of the above things, widths will be quantized to multiples -// of small integers to guarantee the algorithm doesn't run out of temporary storage. -// -// If you do #2, then the non-quantized algorithm will be used, but the algorithm -// may run out of temporary storage and be unable to pack some rectangles. - -STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem); -// Optionally call this function after init but before doing any packing to -// change the handling of the out-of-temp-memory scenario, described above. -// If you call init again, this will be reset to the default (false). - - -STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic); -// Optionally select which packing heuristic the library should use. Different -// heuristics will produce better/worse results for different data sets. -// If you call init again, this will be reset to the default. - -enum -{ - STBRP_HEURISTIC_Skyline_default=0, - STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default, - STBRP_HEURISTIC_Skyline_BF_sortHeight -}; - - -////////////////////////////////////////////////////////////////////////////// -// -// the details of the following structures don't matter to you, but they must -// be visible so you can handle the memory allocations for them - -struct stbrp_node -{ - stbrp_coord x,y; - stbrp_node *next; -}; - -struct stbrp_context -{ - int width; - int height; - int align; - int init_mode; - int heuristic; - int num_nodes; - stbrp_node *active_head; - stbrp_node *free_head; - stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2' -}; - -#ifdef __cplusplus -} -#endif - -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// IMPLEMENTATION SECTION -// - -#ifdef STB_RECT_PACK_IMPLEMENTATION -#ifndef STBRP_SORT -#include -#define STBRP_SORT qsort -#endif - -#ifndef STBRP_ASSERT -#include -#define STBRP_ASSERT assert -#endif - -#ifdef _MSC_VER -#define STBRP__NOTUSED(v) (void)(v) -#define STBRP__CDECL __cdecl -#else -#define STBRP__NOTUSED(v) (void)sizeof(v) -#define STBRP__CDECL -#endif - -enum -{ - STBRP__INIT_skyline = 1 -}; - -STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic) -{ - switch (context->init_mode) { - case STBRP__INIT_skyline: - STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight); - context->heuristic = heuristic; - break; - default: - STBRP_ASSERT(0); - } -} - -STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem) -{ - if (allow_out_of_mem) - // if it's ok to run out of memory, then don't bother aligning them; - // this gives better packing, but may fail due to OOM (even though - // the rectangles easily fit). @TODO a smarter approach would be to only - // quantize once we've hit OOM, then we could get rid of this parameter. - context->align = 1; - else { - // if it's not ok to run out of memory, then quantize the widths - // so that num_nodes is always enough nodes. - // - // I.e. num_nodes * align >= width - // align >= width / num_nodes - // align = ceil(width/num_nodes) - - context->align = (context->width + context->num_nodes-1) / context->num_nodes; - } -} - -STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes) -{ - int i; - - for (i=0; i < num_nodes-1; ++i) - nodes[i].next = &nodes[i+1]; - nodes[i].next = NULL; - context->init_mode = STBRP__INIT_skyline; - context->heuristic = STBRP_HEURISTIC_Skyline_default; - context->free_head = &nodes[0]; - context->active_head = &context->extra[0]; - context->width = width; - context->height = height; - context->num_nodes = num_nodes; - stbrp_setup_allow_out_of_mem(context, 0); - - // node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly) - context->extra[0].x = 0; - context->extra[0].y = 0; - context->extra[0].next = &context->extra[1]; - context->extra[1].x = (stbrp_coord) width; - context->extra[1].y = (1<<30); - context->extra[1].next = NULL; -} - -// find minimum y position if it starts at x1 -static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste) -{ - stbrp_node *node = first; - int x1 = x0 + width; - int min_y, visited_width, waste_area; - - STBRP__NOTUSED(c); - - STBRP_ASSERT(first->x <= x0); - - #if 0 - // skip in case we're past the node - while (node->next->x <= x0) - ++node; - #else - STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency - #endif - - STBRP_ASSERT(node->x <= x0); - - min_y = 0; - waste_area = 0; - visited_width = 0; - while (node->x < x1) { - if (node->y > min_y) { - // raise min_y higher. - // we've accounted for all waste up to min_y, - // but we'll now add more waste for everything we've visted - waste_area += visited_width * (node->y - min_y); - min_y = node->y; - // the first time through, visited_width might be reduced - if (node->x < x0) - visited_width += node->next->x - x0; - else - visited_width += node->next->x - node->x; - } else { - // add waste area - int under_width = node->next->x - node->x; - if (under_width + visited_width > width) - under_width = width - visited_width; - waste_area += under_width * (min_y - node->y); - visited_width += under_width; - } - node = node->next; - } - - *pwaste = waste_area; - return min_y; -} - -typedef struct -{ - int x,y; - stbrp_node **prev_link; -} stbrp__findresult; - -static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int width, int height) -{ - int best_waste = (1<<30), best_x, best_y = (1 << 30); - stbrp__findresult fr; - stbrp_node **prev, *node, *tail, **best = NULL; - - // align to multiple of c->align - width = (width + c->align - 1); - width -= width % c->align; - STBRP_ASSERT(width % c->align == 0); - - // if it can't possibly fit, bail immediately - if (width > c->width || height > c->height) { - fr.prev_link = NULL; - fr.x = fr.y = 0; - return fr; - } - - node = c->active_head; - prev = &c->active_head; - while (node->x + width <= c->width) { - int y,waste; - y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste); - if (c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL - // bottom left - if (y < best_y) { - best_y = y; - best = prev; - } - } else { - // best-fit - if (y + height <= c->height) { - // can only use it if it first vertically - if (y < best_y || (y == best_y && waste < best_waste)) { - best_y = y; - best_waste = waste; - best = prev; - } - } - } - prev = &node->next; - node = node->next; - } - - best_x = (best == NULL) ? 0 : (*best)->x; - - // if doing best-fit (BF), we also have to try aligning right edge to each node position - // - // e.g, if fitting - // - // ____________________ - // |____________________| - // - // into - // - // | | - // | ____________| - // |____________| - // - // then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned - // - // This makes BF take about 2x the time - - if (c->heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight) { - tail = c->active_head; - node = c->active_head; - prev = &c->active_head; - // find first node that's admissible - while (tail->x < width) - tail = tail->next; - while (tail) { - int xpos = tail->x - width; - int y,waste; - STBRP_ASSERT(xpos >= 0); - // find the left position that matches this - while (node->next->x <= xpos) { - prev = &node->next; - node = node->next; - } - STBRP_ASSERT(node->next->x > xpos && node->x <= xpos); - y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste); - if (y + height <= c->height) { - if (y <= best_y) { - if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) { - best_x = xpos; - STBRP_ASSERT(y <= best_y); - best_y = y; - best_waste = waste; - best = prev; - } - } - } - tail = tail->next; - } - } - - fr.prev_link = best; - fr.x = best_x; - fr.y = best_y; - return fr; -} - -static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height) -{ - // find best position according to heuristic - stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height); - stbrp_node *node, *cur; - - // bail if: - // 1. it failed - // 2. the best node doesn't fit (we don't always check this) - // 3. we're out of memory - if (res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) { - res.prev_link = NULL; - return res; - } - - // on success, create new node - node = context->free_head; - node->x = (stbrp_coord) res.x; - node->y = (stbrp_coord) (res.y + height); - - context->free_head = node->next; - - // insert the new node into the right starting point, and - // let 'cur' point to the remaining nodes needing to be - // stiched back in - - cur = *res.prev_link; - if (cur->x < res.x) { - // preserve the existing one, so start testing with the next one - stbrp_node *next = cur->next; - cur->next = node; - cur = next; - } else { - *res.prev_link = node; - } - - // from here, traverse cur and free the nodes, until we get to one - // that shouldn't be freed - while (cur->next && cur->next->x <= res.x + width) { - stbrp_node *next = cur->next; - // move the current node to the free list - cur->next = context->free_head; - context->free_head = cur; - cur = next; - } - - // stitch the list back in - node->next = cur; - - if (cur->x < res.x + width) - cur->x = (stbrp_coord) (res.x + width); - -#ifdef _DEBUG - cur = context->active_head; - while (cur->x < context->width) { - STBRP_ASSERT(cur->x < cur->next->x); - cur = cur->next; - } - STBRP_ASSERT(cur->next == NULL); - - { - int count=0; - cur = context->active_head; - while (cur) { - cur = cur->next; - ++count; - } - cur = context->free_head; - while (cur) { - cur = cur->next; - ++count; - } - STBRP_ASSERT(count == context->num_nodes+2); - } -#endif - - return res; -} - -static int STBRP__CDECL rect_height_compare(const void *a, const void *b) -{ - const stbrp_rect *p = (const stbrp_rect *) a; - const stbrp_rect *q = (const stbrp_rect *) b; - if (p->h > q->h) - return -1; - if (p->h < q->h) - return 1; - return (p->w > q->w) ? -1 : (p->w < q->w); -} - -static int STBRP__CDECL rect_original_order(const void *a, const void *b) -{ - const stbrp_rect *p = (const stbrp_rect *) a; - const stbrp_rect *q = (const stbrp_rect *) b; - return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed); -} - -STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects) -{ - int i, all_rects_packed = 1; - - // we use the 'was_packed' field internally to allow sorting/unsorting - for (i=0; i < num_rects; ++i) { - rects[i].was_packed = i; - } - - // sort according to heuristic - STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare); - - for (i=0; i < num_rects; ++i) { - if (rects[i].w == 0 || rects[i].h == 0) { - rects[i].x = rects[i].y = 0; // empty rect needs no space - } else { - stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h); - if (fr.prev_link) { - rects[i].x = (stbrp_coord) fr.x; - rects[i].y = (stbrp_coord) fr.y; - } else { - rects[i].x = rects[i].y = STBRP__MAXVAL; - } - } - } - - // unsort - STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order); - - // set was_packed flags and all_rects_packed status - for (i=0; i < num_rects; ++i) { - rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL); - if (!rects[i].was_packed) - all_rects_packed = 0; - } - - // return the all_rects_packed status - return all_rects_packed; -} -#endif - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_truetype.h b/FCLauncher/src/main/jni/lwjgl/stb/stb_truetype.h deleted file mode 100644 index bbf2284b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_truetype.h +++ /dev/null @@ -1,5077 +0,0 @@ -// stb_truetype.h - v1.26 - public domain -// authored from 2009-2021 by Sean Barrett / RAD Game Tools -// -// ======================================================================= -// -// NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES -// -// This library does no range checking of the offsets found in the file, -// meaning an attacker can use it to read arbitrary memory. -// -// ======================================================================= -// -// This library processes TrueType files: -// parse files -// extract glyph metrics -// extract glyph shapes -// render glyphs to one-channel bitmaps with antialiasing (box filter) -// render glyphs to one-channel SDF bitmaps (signed-distance field/function) -// -// Todo: -// non-MS cmaps -// crashproof on bad data -// hinting? (no longer patented) -// cleartype-style AA? -// optimize: use simple memory allocator for intermediates -// optimize: build edge-list directly from curves -// optimize: rasterize directly from curves? -// -// ADDITIONAL CONTRIBUTORS -// -// Mikko Mononen: compound shape support, more cmap formats -// Tor Andersson: kerning, subpixel rendering -// Dougall Johnson: OpenType / Type 2 font handling -// Daniel Ribeiro Maciel: basic GPOS-based kerning -// -// Misc other: -// Ryan Gordon -// Simon Glass -// github:IntellectualKitty -// Imanol Celaya -// Daniel Ribeiro Maciel -// -// Bug/warning reports/fixes: -// "Zer" on mollyrocket Fabian "ryg" Giesen github:NiLuJe -// Cass Everitt Martins Mozeiko github:aloucks -// stoiko (Haemimont Games) Cap Petschulat github:oyvindjam -// Brian Hook Omar Cornut github:vassvik -// Walter van Niftrik Ryan Griege -// David Gow Peter LaValle -// David Given Sergey Popov -// Ivan-Assen Ivanov Giumo X. Clanjor -// Anthony Pesch Higor Euripedes -// Johan Duparc Thomas Fields -// Hou Qiming Derek Vinyard -// Rob Loach Cort Stratton -// Kenney Phillis Jr. Brian Costabile -// Ken Voskuil (kaesve) -// -// VERSION HISTORY -// -// 1.26 (2021-08-28) fix broken rasterizer -// 1.25 (2021-07-11) many fixes -// 1.24 (2020-02-05) fix warning -// 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS) -// 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined -// 1.21 (2019-02-25) fix warning -// 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics() -// 1.19 (2018-02-11) GPOS kerning, STBTT_fmod -// 1.18 (2018-01-29) add missing function -// 1.17 (2017-07-23) make more arguments const; doc fix -// 1.16 (2017-07-12) SDF support -// 1.15 (2017-03-03) make more arguments const -// 1.14 (2017-01-16) num-fonts-in-TTC function -// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts -// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual -// 1.11 (2016-04-02) fix unused-variable warning -// 1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef -// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly -// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges -// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints; -// variant PackFontRanges to pack and render in separate phases; -// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?); -// fixed an assert() bug in the new rasterizer -// replace assert() with STBTT_assert() in new rasterizer -// -// Full history can be found at the end of this file. -// -// LICENSE -// -// See end of file for license information. -// -// USAGE -// -// Include this file in whatever places need to refer to it. In ONE C/C++ -// file, write: -// #define STB_TRUETYPE_IMPLEMENTATION -// before the #include of this file. This expands out the actual -// implementation into that C/C++ file. -// -// To make the implementation private to the file that generates the implementation, -// #define STBTT_STATIC -// -// Simple 3D API (don't ship this, but it's fine for tools and quick start) -// stbtt_BakeFontBitmap() -- bake a font to a bitmap for use as texture -// stbtt_GetBakedQuad() -- compute quad to draw for a given char -// -// Improved 3D API (more shippable): -// #include "stb_rect_pack.h" -- optional, but you really want it -// stbtt_PackBegin() -// stbtt_PackSetOversampling() -- for improved quality on small fonts -// stbtt_PackFontRanges() -- pack and renders -// stbtt_PackEnd() -// stbtt_GetPackedQuad() -// -// "Load" a font file from a memory buffer (you have to keep the buffer loaded) -// stbtt_InitFont() -// stbtt_GetFontOffsetForIndex() -- indexing for TTC font collections -// stbtt_GetNumberOfFonts() -- number of fonts for TTC font collections -// -// Render a unicode codepoint to a bitmap -// stbtt_GetCodepointBitmap() -- allocates and returns a bitmap -// stbtt_MakeCodepointBitmap() -- renders into bitmap you provide -// stbtt_GetCodepointBitmapBox() -- how big the bitmap must be -// -// Character advance/positioning -// stbtt_GetCodepointHMetrics() -// stbtt_GetFontVMetrics() -// stbtt_GetFontVMetricsOS2() -// stbtt_GetCodepointKernAdvance() -// -// Starting with version 1.06, the rasterizer was replaced with a new, -// faster and generally-more-precise rasterizer. The new rasterizer more -// accurately measures pixel coverage for anti-aliasing, except in the case -// where multiple shapes overlap, in which case it overestimates the AA pixel -// coverage. Thus, anti-aliasing of intersecting shapes may look wrong. If -// this turns out to be a problem, you can re-enable the old rasterizer with -// #define STBTT_RASTERIZER_VERSION 1 -// which will incur about a 15% speed hit. -// -// ADDITIONAL DOCUMENTATION -// -// Immediately after this block comment are a series of sample programs. -// -// After the sample programs is the "header file" section. This section -// includes documentation for each API function. -// -// Some important concepts to understand to use this library: -// -// Codepoint -// Characters are defined by unicode codepoints, e.g. 65 is -// uppercase A, 231 is lowercase c with a cedilla, 0x7e30 is -// the hiragana for "ma". -// -// Glyph -// A visual character shape (every codepoint is rendered as -// some glyph) -// -// Glyph index -// A font-specific integer ID representing a glyph -// -// Baseline -// Glyph shapes are defined relative to a baseline, which is the -// bottom of uppercase characters. Characters extend both above -// and below the baseline. -// -// Current Point -// As you draw text to the screen, you keep track of a "current point" -// which is the origin of each character. The current point's vertical -// position is the baseline. Even "baked fonts" use this model. -// -// Vertical Font Metrics -// The vertical qualities of the font, used to vertically position -// and space the characters. See docs for stbtt_GetFontVMetrics. -// -// Font Size in Pixels or Points -// The preferred interface for specifying font sizes in stb_truetype -// is to specify how tall the font's vertical extent should be in pixels. -// If that sounds good enough, skip the next paragraph. -// -// Most font APIs instead use "points", which are a common typographic -// measurement for describing font size, defined as 72 points per inch. -// stb_truetype provides a point API for compatibility. However, true -// "per inch" conventions don't make much sense on computer displays -// since different monitors have different number of pixels per -// inch. For example, Windows traditionally uses a convention that -// there are 96 pixels per inch, thus making 'inch' measurements have -// nothing to do with inches, and thus effectively defining a point to -// be 1.333 pixels. Additionally, the TrueType font data provides -// an explicit scale factor to scale a given font's glyphs to points, -// but the author has observed that this scale factor is often wrong -// for non-commercial fonts, thus making fonts scaled in points -// according to the TrueType spec incoherently sized in practice. -// -// DETAILED USAGE: -// -// Scale: -// Select how high you want the font to be, in points or pixels. -// Call ScaleForPixelHeight or ScaleForMappingEmToPixels to compute -// a scale factor SF that will be used by all other functions. -// -// Baseline: -// You need to select a y-coordinate that is the baseline of where -// your text will appear. Call GetFontBoundingBox to get the baseline-relative -// bounding box for all characters. SF*-y0 will be the distance in pixels -// that the worst-case character could extend above the baseline, so if -// you want the top edge of characters to appear at the top of the -// screen where y=0, then you would set the baseline to SF*-y0. -// -// Current point: -// Set the current point where the first character will appear. The -// first character could extend left of the current point; this is font -// dependent. You can either choose a current point that is the leftmost -// point and hope, or add some padding, or check the bounding box or -// left-side-bearing of the first character to be displayed and set -// the current point based on that. -// -// Displaying a character: -// Compute the bounding box of the character. It will contain signed values -// relative to . I.e. if it returns x0,y0,x1,y1, -// then the character should be displayed in the rectangle from -// to = 32 && *text < 128) { - stbtt_aligned_quad q; - stbtt_GetBakedQuad(cdata, 512,512, *text-32, &x,&y,&q,1);//1=opengl & d3d10+,0=d3d9 - glTexCoord2f(q.s0,q.t0); glVertex2f(q.x0,q.y0); - glTexCoord2f(q.s1,q.t0); glVertex2f(q.x1,q.y0); - glTexCoord2f(q.s1,q.t1); glVertex2f(q.x1,q.y1); - glTexCoord2f(q.s0,q.t1); glVertex2f(q.x0,q.y1); - } - ++text; - } - glEnd(); -} -#endif -// -// -////////////////////////////////////////////////////////////////////////////// -// -// Complete program (this compiles): get a single bitmap, print as ASCII art -// -#if 0 -#include -#define STB_TRUETYPE_IMPLEMENTATION // force following include to generate implementation -#include "stb_truetype.h" - -char ttf_buffer[1<<25]; - -int main(int argc, char **argv) -{ - stbtt_fontinfo font; - unsigned char *bitmap; - int w,h,i,j,c = (argc > 1 ? atoi(argv[1]) : 'a'), s = (argc > 2 ? atoi(argv[2]) : 20); - - fread(ttf_buffer, 1, 1<<25, fopen(argc > 3 ? argv[3] : "c:/windows/fonts/arialbd.ttf", "rb")); - - stbtt_InitFont(&font, ttf_buffer, stbtt_GetFontOffsetForIndex(ttf_buffer,0)); - bitmap = stbtt_GetCodepointBitmap(&font, 0,stbtt_ScaleForPixelHeight(&font, s), c, &w, &h, 0,0); - - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) - putchar(" .:ioVM@"[bitmap[j*w+i]>>5]); - putchar('\n'); - } - return 0; -} -#endif -// -// Output: -// -// .ii. -// @@@@@@. -// V@Mio@@o -// :i. V@V -// :oM@@M -// :@@@MM@M -// @@o o@M -// :@@. M@M -// @@@o@@@@ -// :M@@V:@@. -// -////////////////////////////////////////////////////////////////////////////// -// -// Complete program: print "Hello World!" banner, with bugs -// -#if 0 -char buffer[24<<20]; -unsigned char screen[20][79]; - -int main(int arg, char **argv) -{ - stbtt_fontinfo font; - int i,j,ascent,baseline,ch=0; - float scale, xpos=2; // leave a little padding in case the character extends left - char *text = "Heljo World!"; // intentionally misspelled to show 'lj' brokenness - - fread(buffer, 1, 1000000, fopen("c:/windows/fonts/arialbd.ttf", "rb")); - stbtt_InitFont(&font, buffer, 0); - - scale = stbtt_ScaleForPixelHeight(&font, 15); - stbtt_GetFontVMetrics(&font, &ascent,0,0); - baseline = (int) (ascent*scale); - - while (text[ch]) { - int advance,lsb,x0,y0,x1,y1; - float x_shift = xpos - (float) floor(xpos); - stbtt_GetCodepointHMetrics(&font, text[ch], &advance, &lsb); - stbtt_GetCodepointBitmapBoxSubpixel(&font, text[ch], scale,scale,x_shift,0, &x0,&y0,&x1,&y1); - stbtt_MakeCodepointBitmapSubpixel(&font, &screen[baseline + y0][(int) xpos + x0], x1-x0,y1-y0, 79, scale,scale,x_shift,0, text[ch]); - // note that this stomps the old data, so where character boxes overlap (e.g. 'lj') it's wrong - // because this API is really for baking character bitmaps into textures. if you want to render - // a sequence of characters, you really need to render each bitmap to a temp buffer, then - // "alpha blend" that into the working buffer - xpos += (advance * scale); - if (text[ch+1]) - xpos += scale*stbtt_GetCodepointKernAdvance(&font, text[ch],text[ch+1]); - ++ch; - } - - for (j=0; j < 20; ++j) { - for (i=0; i < 78; ++i) - putchar(" .:ioVM@"[screen[j][i]>>5]); - putchar('\n'); - } - - return 0; -} -#endif - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -//// -//// INTEGRATION WITH YOUR CODEBASE -//// -//// The following sections allow you to supply alternate definitions -//// of C library functions used by stb_truetype, e.g. if you don't -//// link with the C runtime library. - -#ifdef STB_TRUETYPE_IMPLEMENTATION - // #define your own (u)stbtt_int8/16/32 before including to override this - #ifndef stbtt_uint8 - typedef unsigned char stbtt_uint8; - typedef signed char stbtt_int8; - typedef unsigned short stbtt_uint16; - typedef signed short stbtt_int16; - typedef unsigned int stbtt_uint32; - typedef signed int stbtt_int32; - #endif - - typedef char stbtt__check_size32[sizeof(stbtt_int32)==4 ? 1 : -1]; - typedef char stbtt__check_size16[sizeof(stbtt_int16)==2 ? 1 : -1]; - - // e.g. #define your own STBTT_ifloor/STBTT_iceil() to avoid math.h - #ifndef STBTT_ifloor - #include - #define STBTT_ifloor(x) ((int) floor(x)) - #define STBTT_iceil(x) ((int) ceil(x)) - #endif - - #ifndef STBTT_sqrt - #include - #define STBTT_sqrt(x) sqrt(x) - #define STBTT_pow(x,y) pow(x,y) - #endif - - #ifndef STBTT_fmod - #include - #define STBTT_fmod(x,y) fmod(x,y) - #endif - - #ifndef STBTT_cos - #include - #define STBTT_cos(x) cos(x) - #define STBTT_acos(x) acos(x) - #endif - - #ifndef STBTT_fabs - #include - #define STBTT_fabs(x) fabs(x) - #endif - - // #define your own functions "STBTT_malloc" / "STBTT_free" to avoid malloc.h - #ifndef STBTT_malloc - #include - #define STBTT_malloc(x,u) ((void)(u),malloc(x)) - #define STBTT_free(x,u) ((void)(u),free(x)) - #endif - - #ifndef STBTT_assert - #include - #define STBTT_assert(x) assert(x) - #endif - - #ifndef STBTT_strlen - #include - #define STBTT_strlen(x) strlen(x) - #endif - - #ifndef STBTT_memcpy - #include - #define STBTT_memcpy memcpy - #define STBTT_memset memset - #endif -#endif - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//// -//// INTERFACE -//// -//// - -#ifndef __STB_INCLUDE_STB_TRUETYPE_H__ -#define __STB_INCLUDE_STB_TRUETYPE_H__ - -#ifdef STBTT_STATIC -#define STBTT_DEF static -#else -#define STBTT_DEF extern -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -// private structure -typedef struct -{ - unsigned char *data; - int cursor; - int size; -} stbtt__buf; - -////////////////////////////////////////////////////////////////////////////// -// -// TEXTURE BAKING API -// -// If you use this API, you only have to call two functions ever. -// - -typedef struct -{ - unsigned short x0,y0,x1,y1; // coordinates of bbox in bitmap - float xoff,yoff,xadvance; -} stbtt_bakedchar; - -STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, // font location (use offset=0 for plain .ttf) - float pixel_height, // height of font in pixels - unsigned char *pixels, int pw, int ph, // bitmap to be filled in - int first_char, int num_chars, // characters to bake - stbtt_bakedchar *chardata); // you allocate this, it's num_chars long -// if return is positive, the first unused row of the bitmap -// if return is negative, returns the negative of the number of characters that fit -// if return is 0, no characters fit and no rows were used -// This uses a very crappy packing. - -typedef struct -{ - float x0,y0,s0,t0; // top-left - float x1,y1,s1,t1; // bottom-right -} stbtt_aligned_quad; - -STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, // same data as above - int char_index, // character to display - float *xpos, float *ypos, // pointers to current position in screen pixel space - stbtt_aligned_quad *q, // output: quad to draw - int opengl_fillrule); // true if opengl fill rule; false if DX9 or earlier -// Call GetBakedQuad with char_index = 'character - first_char', and it -// creates the quad you need to draw and advances the current position. -// -// The coordinate system used assumes y increases downwards. -// -// Characters will extend both above and below the current position; -// see discussion of "BASELINE" above. -// -// It's inefficient; you might want to c&p it and optimize it. - -STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap); -// Query the font vertical metrics without having to create a font first. - - -////////////////////////////////////////////////////////////////////////////// -// -// NEW TEXTURE BAKING API -// -// This provides options for packing multiple fonts into one atlas, not -// perfectly but better than nothing. - -typedef struct -{ - unsigned short x0,y0,x1,y1; // coordinates of bbox in bitmap - float xoff,yoff,xadvance; - float xoff2,yoff2; -} stbtt_packedchar; - -typedef struct stbtt_pack_context stbtt_pack_context; -typedef struct stbtt_fontinfo stbtt_fontinfo; -#ifndef STB_RECT_PACK_VERSION -typedef struct stbrp_rect stbrp_rect; -#endif - -STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int width, int height, int stride_in_bytes, int padding, void *alloc_context); -// Initializes a packing context stored in the passed-in stbtt_pack_context. -// Future calls using this context will pack characters into the bitmap passed -// in here: a 1-channel bitmap that is width * height. stride_in_bytes is -// the distance from one row to the next (or 0 to mean they are packed tightly -// together). "padding" is the amount of padding to leave between each -// character (normally you want '1' for bitmaps you'll use as textures with -// bilinear filtering). -// -// Returns 0 on failure, 1 on success. - -STBTT_DEF void stbtt_PackEnd (stbtt_pack_context *spc); -// Cleans up the packing context and frees all memory. - -#define STBTT_POINT_SIZE(x) (-(x)) - -STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size, - int first_unicode_char_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range); -// Creates character bitmaps from the font_index'th font found in fontdata (use -// font_index=0 if you don't know what that is). It creates num_chars_in_range -// bitmaps for characters with unicode values starting at first_unicode_char_in_range -// and increasing. Data for how to render them is stored in chardata_for_range; -// pass these to stbtt_GetPackedQuad to get back renderable quads. -// -// font_size is the full height of the character from ascender to descender, -// as computed by stbtt_ScaleForPixelHeight. To use a point size as computed -// by stbtt_ScaleForMappingEmToPixels, wrap the point size in STBTT_POINT_SIZE() -// and pass that result as 'font_size': -// ..., 20 , ... // font max minus min y is 20 pixels tall -// ..., STBTT_POINT_SIZE(20), ... // 'M' is 20 pixels tall - -typedef struct -{ - float font_size; - int first_unicode_codepoint_in_range; // if non-zero, then the chars are continuous, and this is the first codepoint - int *array_of_unicode_codepoints; // if non-zero, then this is an array of unicode codepoints - int num_chars; - stbtt_packedchar *chardata_for_range; // output - unsigned char h_oversample, v_oversample; // don't set these, they're used internally -} stbtt_pack_range; - -STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges); -// Creates character bitmaps from multiple ranges of characters stored in -// ranges. This will usually create a better-packed bitmap than multiple -// calls to stbtt_PackFontRange. Note that you can call this multiple -// times within a single PackBegin/PackEnd. - -STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample); -// Oversampling a font increases the quality by allowing higher-quality subpixel -// positioning, and is especially valuable at smaller text sizes. -// -// This function sets the amount of oversampling for all following calls to -// stbtt_PackFontRange(s) or stbtt_PackFontRangesGatherRects for a given -// pack context. The default (no oversampling) is achieved by h_oversample=1 -// and v_oversample=1. The total number of pixels required is -// h_oversample*v_oversample larger than the default; for example, 2x2 -// oversampling requires 4x the storage of 1x1. For best results, render -// oversampled textures with bilinear filtering. Look at the readme in -// stb/tests/oversample for information about oversampled fonts -// -// To use with PackFontRangesGather etc., you must set it before calls -// call to PackFontRangesGatherRects. - -STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip); -// If skip != 0, this tells stb_truetype to skip any codepoints for which -// there is no corresponding glyph. If skip=0, which is the default, then -// codepoints without a glyph recived the font's "missing character" glyph, -// typically an empty box by convention. - -STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, // same data as above - int char_index, // character to display - float *xpos, float *ypos, // pointers to current position in screen pixel space - stbtt_aligned_quad *q, // output: quad to draw - int align_to_integer); - -STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); -STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects); -STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); -// Calling these functions in sequence is roughly equivalent to calling -// stbtt_PackFontRanges(). If you more control over the packing of multiple -// fonts, or if you want to pack custom data into a font texture, take a look -// at the source to of stbtt_PackFontRanges() and create a custom version -// using these functions, e.g. call GatherRects multiple times, -// building up a single array of rects, then call PackRects once, -// then call RenderIntoRects repeatedly. This may result in a -// better packing than calling PackFontRanges multiple times -// (or it may not). - -// this is an opaque structure that you shouldn't mess with which holds -// all the context needed from PackBegin to PackEnd. -struct stbtt_pack_context { - void *user_allocator_context; - void *pack_info; - int width; - int height; - int stride_in_bytes; - int padding; - int skip_missing; - unsigned int h_oversample, v_oversample; - unsigned char *pixels; - void *nodes; -}; - -////////////////////////////////////////////////////////////////////////////// -// -// FONT LOADING -// -// - -STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data); -// This function will determine the number of fonts in a font file. TrueType -// collection (.ttc) files may contain multiple fonts, while TrueType font -// (.ttf) files only contain one font. The number of fonts can be used for -// indexing with the previous function where the index is between zero and one -// less than the total fonts. If an error occurs, -1 is returned. - -STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index); -// Each .ttf/.ttc file may have more than one font. Each font has a sequential -// index number starting from 0. Call this function to get the font offset for -// a given index; it returns -1 if the index is out of range. A regular .ttf -// file will only define one font and it always be at offset 0, so it will -// return '0' for index 0, and -1 for all other indices. - -// The following structure is defined publicly so you can declare one on -// the stack or as a global or etc, but you should treat it as opaque. -struct stbtt_fontinfo -{ - void * userdata; - unsigned char * data; // pointer to .ttf file - int fontstart; // offset of start of font - - int numGlyphs; // number of glyphs, needed for range checking - - int loca,head,glyf,hhea,hmtx,kern,gpos,svg; // table locations as offset from start of .ttf - int index_map; // a cmap mapping for our chosen character encoding - int indexToLocFormat; // format needed to map from glyph index to glyph - - stbtt__buf cff; // cff font data - stbtt__buf charstrings; // the charstring index - stbtt__buf gsubrs; // global charstring subroutines index - stbtt__buf subrs; // private charstring subroutines index - stbtt__buf fontdicts; // array of font dicts - stbtt__buf fdselect; // map from glyph to fontdict -}; - -STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset); -// Given an offset into the file that defines a font, this function builds -// the necessary cached info for the rest of the system. You must allocate -// the stbtt_fontinfo yourself, and stbtt_InitFont will fill it out. You don't -// need to do anything special to free it, because the contents are pure -// value data with no additional data structures. Returns 0 on failure. - - -////////////////////////////////////////////////////////////////////////////// -// -// CHARACTER TO GLYPH-INDEX CONVERSIOn - -STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint); -// If you're going to perform multiple operations on the same character -// and you want a speed-up, call this function with the character you're -// going to process, then use glyph-based functions instead of the -// codepoint-based functions. -// Returns 0 if the character codepoint is not defined in the font. - - -////////////////////////////////////////////////////////////////////////////// -// -// CHARACTER PROPERTIES -// - -STBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float pixels); -// computes a scale factor to produce a font whose "height" is 'pixels' tall. -// Height is measured as the distance from the highest ascender to the lowest -// descender; in other words, it's equivalent to calling stbtt_GetFontVMetrics -// and computing: -// scale = pixels / (ascent - descent) -// so if you prefer to measure height by the ascent only, use a similar calculation. - -STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels); -// computes a scale factor to produce a font whose EM size is mapped to -// 'pixels' tall. This is probably what traditional APIs compute, but -// I'm not positive. - -STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int *descent, int *lineGap); -// ascent is the coordinate above the baseline the font extends; descent -// is the coordinate below the baseline the font extends (i.e. it is typically negative) -// lineGap is the spacing between one row's descent and the next row's ascent... -// so you should advance the vertical position by "*ascent - *descent + *lineGap" -// these are expressed in unscaled coordinates, so you must multiply by -// the scale factor for a given size - -STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap); -// analogous to GetFontVMetrics, but returns the "typographic" values from the OS/2 -// table (specific to MS/Windows TTF files). -// -// Returns 1 on success (table present), 0 on failure. - -STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1); -// the bounding box around all possible characters - -STBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int codepoint, int *advanceWidth, int *leftSideBearing); -// leftSideBearing is the offset from the current horizontal position to the left edge of the character -// advanceWidth is the offset from the current horizontal position to the next horizontal position -// these are expressed in unscaled coordinates - -STBTT_DEF int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int ch1, int ch2); -// an additional amount to add to the 'advance' value between ch1 and ch2 - -STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int *x0, int *y0, int *x1, int *y1); -// Gets the bounding box of the visible part of the glyph, in unscaled coordinates - -STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing); -STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2); -STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1); -// as above, but takes one or more glyph indices for greater efficiency - -typedef struct stbtt_kerningentry -{ - int glyph1; // use stbtt_FindGlyphIndex - int glyph2; - int advance; -} stbtt_kerningentry; - -STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo *info); -STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length); -// Retrieves a complete list of all of the kerning pairs provided by the font -// stbtt_GetKerningTable never writes more than table_length entries and returns how many entries it did write. -// The table will be sorted by (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1) - -////////////////////////////////////////////////////////////////////////////// -// -// GLYPH SHAPES (you probably don't need these, but they have to go before -// the bitmaps for C declaration-order reasons) -// - -#ifndef STBTT_vmove // you can predefine these to use different values (but why?) - enum { - STBTT_vmove=1, - STBTT_vline, - STBTT_vcurve, - STBTT_vcubic - }; -#endif - -#ifndef stbtt_vertex // you can predefine this to use different values - // (we share this with other code at RAD) - #define stbtt_vertex_type short // can't use stbtt_int16 because that's not visible in the header file - typedef struct - { - stbtt_vertex_type x,y,cx,cy,cx1,cy1; - unsigned char type,padding; - } stbtt_vertex; -#endif - -STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index); -// returns non-zero if nothing is drawn for this glyph - -STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_codepoint, stbtt_vertex **vertices); -STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **vertices); -// returns # of vertices and fills *vertices with the pointer to them -// these are expressed in "unscaled" coordinates -// -// The shape is a series of contours. Each one starts with -// a STBTT_moveto, then consists of a series of mixed -// STBTT_lineto and STBTT_curveto segments. A lineto -// draws a line from previous endpoint to its x,y; a curveto -// draws a quadratic bezier from previous endpoint to -// its x,y, using cx,cy as the bezier control point. - -STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *vertices); -// frees the data allocated above - -STBTT_DEF unsigned char *stbtt_FindSVGDoc(const stbtt_fontinfo *info, int gl); -STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg); -STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg); -// fills svg with the character's SVG data. -// returns data size or 0 if SVG not found. - -////////////////////////////////////////////////////////////////////////////// -// -// BITMAP RENDERING -// - -STBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata); -// frees the bitmap allocated below - -STBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff); -// allocates a large-enough single-channel 8bpp bitmap and renders the -// specified character/glyph at the specified scale into it, with -// antialiasing. 0 is no coverage (transparent), 255 is fully covered (opaque). -// *width & *height are filled out with the width & height of the bitmap, -// which is stored left-to-right, top-to-bottom. -// -// xoff/yoff are the offset it pixel space from the glyph origin to the top-left of the bitmap - -STBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff); -// the same as stbtt_GetCodepoitnBitmap, but you can specify a subpixel -// shift for the character - -STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint); -// the same as stbtt_GetCodepointBitmap, but you pass in storage for the bitmap -// in the form of 'output', with row spacing of 'out_stride' bytes. the bitmap -// is clipped to out_w/out_h bytes. Call stbtt_GetCodepointBitmapBox to get the -// width and height and positioning info for it first. - -STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint); -// same as stbtt_MakeCodepointBitmap, but you can specify a subpixel -// shift for the character - -STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint); -// same as stbtt_MakeCodepointBitmapSubpixel, but prefiltering -// is performed (see stbtt_PackSetOversampling) - -STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); -// get the bbox of the bitmap centered around the glyph origin; so the -// bitmap width is ix1-ix0, height is iy1-iy0, and location to place -// the bitmap top left is (leftSideBearing*scale,iy0). -// (Note that the bitmap uses y-increases-down, but the shape uses -// y-increases-up, so CodepointBitmapBox and CodepointBox are inverted.) - -STBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); -// same as stbtt_GetCodepointBitmapBox, but you can specify a subpixel -// shift for the character - -// the following functions are equivalent to the above functions, but operate -// on glyph indices instead of Unicode codepoints (for efficiency) -STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff); -STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff); -STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph); -STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph); -STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int glyph); -STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); -STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); - - -// @TODO: don't expose this structure -typedef struct -{ - int w,h,stride; - unsigned char *pixels; -} stbtt__bitmap; - -// rasterize a shape with quadratic beziers into a bitmap -STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, // 1-channel bitmap to draw into - float flatness_in_pixels, // allowable error of curve in pixels - stbtt_vertex *vertices, // array of vertices defining shape - int num_verts, // number of vertices in above array - float scale_x, float scale_y, // scale applied to input vertices - float shift_x, float shift_y, // translation applied to input vertices - int x_off, int y_off, // another translation applied to input - int invert, // if non-zero, vertically flip shape - void *userdata); // context for to STBTT_MALLOC - -////////////////////////////////////////////////////////////////////////////// -// -// Signed Distance Function (or Field) rendering - -STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata); -// frees the SDF bitmap allocated below - -STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff); -STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff); -// These functions compute a discretized SDF field for a single character, suitable for storing -// in a single-channel texture, sampling with bilinear filtering, and testing against -// larger than some threshold to produce scalable fonts. -// info -- the font -// scale -- controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap -// glyph/codepoint -- the character to generate the SDF for -// padding -- extra "pixels" around the character which are filled with the distance to the character (not 0), -// which allows effects like bit outlines -// onedge_value -- value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character) -// pixel_dist_scale -- what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale) -// if positive, > onedge_value is inside; if negative, < onedge_value is inside -// width,height -- output height & width of the SDF bitmap (including padding) -// xoff,yoff -- output origin of the character -// return value -- a 2D array of bytes 0..255, width*height in size -// -// pixel_dist_scale & onedge_value are a scale & bias that allows you to make -// optimal use of the limited 0..255 for your application, trading off precision -// and special effects. SDF values outside the range 0..255 are clamped to 0..255. -// -// Example: -// scale = stbtt_ScaleForPixelHeight(22) -// padding = 5 -// onedge_value = 180 -// pixel_dist_scale = 180/5.0 = 36.0 -// -// This will create an SDF bitmap in which the character is about 22 pixels -// high but the whole bitmap is about 22+5+5=32 pixels high. To produce a filled -// shape, sample the SDF at each pixel and fill the pixel if the SDF value -// is greater than or equal to 180/255. (You'll actually want to antialias, -// which is beyond the scope of this example.) Additionally, you can compute -// offset outlines (e.g. to stroke the character border inside & outside, -// or only outside). For example, to fill outside the character up to 3 SDF -// pixels, you would compare against (180-36.0*3)/255 = 72/255. The above -// choice of variables maps a range from 5 pixels outside the shape to -// 2 pixels inside the shape to 0..255; this is intended primarily for apply -// outside effects only (the interior range is needed to allow proper -// antialiasing of the font at *smaller* sizes) -// -// The function computes the SDF analytically at each SDF pixel, not by e.g. -// building a higher-res bitmap and approximating it. In theory the quality -// should be as high as possible for an SDF of this size & representation, but -// unclear if this is true in practice (perhaps building a higher-res bitmap -// and computing from that can allow drop-out prevention). -// -// The algorithm has not been optimized at all, so expect it to be slow -// if computing lots of characters or very large sizes. - - - -////////////////////////////////////////////////////////////////////////////// -// -// Finding the right font... -// -// You should really just solve this offline, keep your own tables -// of what font is what, and don't try to get it out of the .ttf file. -// That's because getting it out of the .ttf file is really hard, because -// the names in the file can appear in many possible encodings, in many -// possible languages, and e.g. if you need a case-insensitive comparison, -// the details of that depend on the encoding & language in a complex way -// (actually underspecified in truetype, but also gigantic). -// -// But you can use the provided functions in two possible ways: -// stbtt_FindMatchingFont() will use *case-sensitive* comparisons on -// unicode-encoded names to try to find the font you want; -// you can run this before calling stbtt_InitFont() -// -// stbtt_GetFontNameString() lets you get any of the various strings -// from the file yourself and do your own comparisons on them. -// You have to have called stbtt_InitFont() first. - - -STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags); -// returns the offset (not index) of the font that matches, or -1 if none -// if you use STBTT_MACSTYLE_DONTCARE, use a font name like "Arial Bold". -// if you use any other flag, use a font name like "Arial"; this checks -// the 'macStyle' header field; i don't know if fonts set this consistently -#define STBTT_MACSTYLE_DONTCARE 0 -#define STBTT_MACSTYLE_BOLD 1 -#define STBTT_MACSTYLE_ITALIC 2 -#define STBTT_MACSTYLE_UNDERSCORE 4 -#define STBTT_MACSTYLE_NONE 8 // <= not same as 0, this makes us check the bitfield is 0 - -STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2); -// returns 1/0 whether the first string interpreted as utf8 is identical to -// the second string interpreted as big-endian utf16... useful for strings from next func - -STBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int *length, int platformID, int encodingID, int languageID, int nameID); -// returns the string (which may be big-endian double byte, e.g. for unicode) -// and puts the length in bytes in *length. -// -// some of the values for the IDs are below; for more see the truetype spec: -// http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6name.html -// http://www.microsoft.com/typography/otspec/name.htm - -enum { // platformID - STBTT_PLATFORM_ID_UNICODE =0, - STBTT_PLATFORM_ID_MAC =1, - STBTT_PLATFORM_ID_ISO =2, - STBTT_PLATFORM_ID_MICROSOFT =3 -}; - -enum { // encodingID for STBTT_PLATFORM_ID_UNICODE - STBTT_UNICODE_EID_UNICODE_1_0 =0, - STBTT_UNICODE_EID_UNICODE_1_1 =1, - STBTT_UNICODE_EID_ISO_10646 =2, - STBTT_UNICODE_EID_UNICODE_2_0_BMP=3, - STBTT_UNICODE_EID_UNICODE_2_0_FULL=4 -}; - -enum { // encodingID for STBTT_PLATFORM_ID_MICROSOFT - STBTT_MS_EID_SYMBOL =0, - STBTT_MS_EID_UNICODE_BMP =1, - STBTT_MS_EID_SHIFTJIS =2, - STBTT_MS_EID_UNICODE_FULL =10 -}; - -enum { // encodingID for STBTT_PLATFORM_ID_MAC; same as Script Manager codes - STBTT_MAC_EID_ROMAN =0, STBTT_MAC_EID_ARABIC =4, - STBTT_MAC_EID_JAPANESE =1, STBTT_MAC_EID_HEBREW =5, - STBTT_MAC_EID_CHINESE_TRAD =2, STBTT_MAC_EID_GREEK =6, - STBTT_MAC_EID_KOREAN =3, STBTT_MAC_EID_RUSSIAN =7 -}; - -enum { // languageID for STBTT_PLATFORM_ID_MICROSOFT; same as LCID... - // problematic because there are e.g. 16 english LCIDs and 16 arabic LCIDs - STBTT_MS_LANG_ENGLISH =0x0409, STBTT_MS_LANG_ITALIAN =0x0410, - STBTT_MS_LANG_CHINESE =0x0804, STBTT_MS_LANG_JAPANESE =0x0411, - STBTT_MS_LANG_DUTCH =0x0413, STBTT_MS_LANG_KOREAN =0x0412, - STBTT_MS_LANG_FRENCH =0x040c, STBTT_MS_LANG_RUSSIAN =0x0419, - STBTT_MS_LANG_GERMAN =0x0407, STBTT_MS_LANG_SPANISH =0x0409, - STBTT_MS_LANG_HEBREW =0x040d, STBTT_MS_LANG_SWEDISH =0x041D -}; - -enum { // languageID for STBTT_PLATFORM_ID_MAC - STBTT_MAC_LANG_ENGLISH =0 , STBTT_MAC_LANG_JAPANESE =11, - STBTT_MAC_LANG_ARABIC =12, STBTT_MAC_LANG_KOREAN =23, - STBTT_MAC_LANG_DUTCH =4 , STBTT_MAC_LANG_RUSSIAN =32, - STBTT_MAC_LANG_FRENCH =1 , STBTT_MAC_LANG_SPANISH =6 , - STBTT_MAC_LANG_GERMAN =2 , STBTT_MAC_LANG_SWEDISH =5 , - STBTT_MAC_LANG_HEBREW =10, STBTT_MAC_LANG_CHINESE_SIMPLIFIED =33, - STBTT_MAC_LANG_ITALIAN =3 , STBTT_MAC_LANG_CHINESE_TRAD =19 -}; - -#ifdef __cplusplus -} -#endif - -#endif // __STB_INCLUDE_STB_TRUETYPE_H__ - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -//// -//// IMPLEMENTATION -//// -//// - -#ifdef STB_TRUETYPE_IMPLEMENTATION - -#ifndef STBTT_MAX_OVERSAMPLE -#define STBTT_MAX_OVERSAMPLE 8 -#endif - -#if STBTT_MAX_OVERSAMPLE > 255 -#error "STBTT_MAX_OVERSAMPLE cannot be > 255" -#endif - -typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERSAMPLE-1)) == 0 ? 1 : -1]; - -#ifndef STBTT_RASTERIZER_VERSION -#define STBTT_RASTERIZER_VERSION 2 -#endif - -#ifdef _MSC_VER -#define STBTT__NOTUSED(v) (void)(v) -#else -#define STBTT__NOTUSED(v) (void)sizeof(v) -#endif - -////////////////////////////////////////////////////////////////////////// -// -// stbtt__buf helpers to parse data from file -// - -static stbtt_uint8 stbtt__buf_get8(stbtt__buf *b) -{ - if (b->cursor >= b->size) - return 0; - return b->data[b->cursor++]; -} - -static stbtt_uint8 stbtt__buf_peek8(stbtt__buf *b) -{ - if (b->cursor >= b->size) - return 0; - return b->data[b->cursor]; -} - -static void stbtt__buf_seek(stbtt__buf *b, int o) -{ - STBTT_assert(!(o > b->size || o < 0)); - b->cursor = (o > b->size || o < 0) ? b->size : o; -} - -static void stbtt__buf_skip(stbtt__buf *b, int o) -{ - stbtt__buf_seek(b, b->cursor + o); -} - -static stbtt_uint32 stbtt__buf_get(stbtt__buf *b, int n) -{ - stbtt_uint32 v = 0; - int i; - STBTT_assert(n >= 1 && n <= 4); - for (i = 0; i < n; i++) - v = (v << 8) | stbtt__buf_get8(b); - return v; -} - -static stbtt__buf stbtt__new_buf(const void *p, size_t size) -{ - stbtt__buf r; - STBTT_assert(size < 0x40000000); - r.data = (stbtt_uint8*) p; - r.size = (int) size; - r.cursor = 0; - return r; -} - -#define stbtt__buf_get16(b) stbtt__buf_get((b), 2) -#define stbtt__buf_get32(b) stbtt__buf_get((b), 4) - -static stbtt__buf stbtt__buf_range(const stbtt__buf *b, int o, int s) -{ - stbtt__buf r = stbtt__new_buf(NULL, 0); - if (o < 0 || s < 0 || o > b->size || s > b->size - o) return r; - r.data = b->data + o; - r.size = s; - return r; -} - -static stbtt__buf stbtt__cff_get_index(stbtt__buf *b) -{ - int count, start, offsize; - start = b->cursor; - count = stbtt__buf_get16(b); - if (count) { - offsize = stbtt__buf_get8(b); - STBTT_assert(offsize >= 1 && offsize <= 4); - stbtt__buf_skip(b, offsize * count); - stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1); - } - return stbtt__buf_range(b, start, b->cursor - start); -} - -static stbtt_uint32 stbtt__cff_int(stbtt__buf *b) -{ - int b0 = stbtt__buf_get8(b); - if (b0 >= 32 && b0 <= 246) return b0 - 139; - else if (b0 >= 247 && b0 <= 250) return (b0 - 247)*256 + stbtt__buf_get8(b) + 108; - else if (b0 >= 251 && b0 <= 254) return -(b0 - 251)*256 - stbtt__buf_get8(b) - 108; - else if (b0 == 28) return stbtt__buf_get16(b); - else if (b0 == 29) return stbtt__buf_get32(b); - STBTT_assert(0); - return 0; -} - -static void stbtt__cff_skip_operand(stbtt__buf *b) { - int v, b0 = stbtt__buf_peek8(b); - STBTT_assert(b0 >= 28); - if (b0 == 30) { - stbtt__buf_skip(b, 1); - while (b->cursor < b->size) { - v = stbtt__buf_get8(b); - if ((v & 0xF) == 0xF || (v >> 4) == 0xF) - break; - } - } else { - stbtt__cff_int(b); - } -} - -static stbtt__buf stbtt__dict_get(stbtt__buf *b, int key) -{ - stbtt__buf_seek(b, 0); - while (b->cursor < b->size) { - int start = b->cursor, end, op; - while (stbtt__buf_peek8(b) >= 28) - stbtt__cff_skip_operand(b); - end = b->cursor; - op = stbtt__buf_get8(b); - if (op == 12) op = stbtt__buf_get8(b) | 0x100; - if (op == key) return stbtt__buf_range(b, start, end-start); - } - return stbtt__buf_range(b, 0, 0); -} - -static void stbtt__dict_get_ints(stbtt__buf *b, int key, int outcount, stbtt_uint32 *out) -{ - int i; - stbtt__buf operands = stbtt__dict_get(b, key); - for (i = 0; i < outcount && operands.cursor < operands.size; i++) - out[i] = stbtt__cff_int(&operands); -} - -static int stbtt__cff_index_count(stbtt__buf *b) -{ - stbtt__buf_seek(b, 0); - return stbtt__buf_get16(b); -} - -static stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i) -{ - int count, offsize, start, end; - stbtt__buf_seek(&b, 0); - count = stbtt__buf_get16(&b); - offsize = stbtt__buf_get8(&b); - STBTT_assert(i >= 0 && i < count); - STBTT_assert(offsize >= 1 && offsize <= 4); - stbtt__buf_skip(&b, i*offsize); - start = stbtt__buf_get(&b, offsize); - end = stbtt__buf_get(&b, offsize); - return stbtt__buf_range(&b, 2+(count+1)*offsize+start, end - start); -} - -////////////////////////////////////////////////////////////////////////// -// -// accessors to parse data from file -// - -// on platforms that don't allow misaligned reads, if we want to allow -// truetype fonts that aren't padded to alignment, define ALLOW_UNALIGNED_TRUETYPE - -#define ttBYTE(p) (* (stbtt_uint8 *) (p)) -#define ttCHAR(p) (* (stbtt_int8 *) (p)) -#define ttFixed(p) ttLONG(p) - -static stbtt_uint16 ttUSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } -static stbtt_int16 ttSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } -static stbtt_uint32 ttULONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } -static stbtt_int32 ttLONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } - -#define stbtt_tag4(p,c0,c1,c2,c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3)) -#define stbtt_tag(p,str) stbtt_tag4(p,str[0],str[1],str[2],str[3]) - -static int stbtt__isfont(stbtt_uint8 *font) -{ - // check the version number - if (stbtt_tag4(font, '1',0,0,0)) return 1; // TrueType 1 - if (stbtt_tag(font, "typ1")) return 1; // TrueType with type 1 font -- we don't support this! - if (stbtt_tag(font, "OTTO")) return 1; // OpenType with CFF - if (stbtt_tag4(font, 0,1,0,0)) return 1; // OpenType 1.0 - if (stbtt_tag(font, "true")) return 1; // Apple specification for TrueType fonts - return 0; -} - -// @OPTIMIZE: binary search -static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart, const char *tag) -{ - stbtt_int32 num_tables = ttUSHORT(data+fontstart+4); - stbtt_uint32 tabledir = fontstart + 12; - stbtt_int32 i; - for (i=0; i < num_tables; ++i) { - stbtt_uint32 loc = tabledir + 16*i; - if (stbtt_tag(data+loc+0, tag)) - return ttULONG(data+loc+8); - } - return 0; -} - -static int stbtt_GetFontOffsetForIndex_internal(unsigned char *font_collection, int index) -{ - // if it's just a font, there's only one valid index - if (stbtt__isfont(font_collection)) - return index == 0 ? 0 : -1; - - // check if it's a TTC - if (stbtt_tag(font_collection, "ttcf")) { - // version 1? - if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) { - stbtt_int32 n = ttLONG(font_collection+8); - if (index >= n) - return -1; - return ttULONG(font_collection+12+index*4); - } - } - return -1; -} - -static int stbtt_GetNumberOfFonts_internal(unsigned char *font_collection) -{ - // if it's just a font, there's only one valid font - if (stbtt__isfont(font_collection)) - return 1; - - // check if it's a TTC - if (stbtt_tag(font_collection, "ttcf")) { - // version 1? - if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) { - return ttLONG(font_collection+8); - } - } - return 0; -} - -static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict) -{ - stbtt_uint32 subrsoff = 0, private_loc[2] = { 0, 0 }; - stbtt__buf pdict; - stbtt__dict_get_ints(&fontdict, 18, 2, private_loc); - if (!private_loc[1] || !private_loc[0]) return stbtt__new_buf(NULL, 0); - pdict = stbtt__buf_range(&cff, private_loc[1], private_loc[0]); - stbtt__dict_get_ints(&pdict, 19, 1, &subrsoff); - if (!subrsoff) return stbtt__new_buf(NULL, 0); - stbtt__buf_seek(&cff, private_loc[1]+subrsoff); - return stbtt__cff_get_index(&cff); -} - -// since most people won't use this, find this table the first time it's needed -static int stbtt__get_svg(stbtt_fontinfo *info) -{ - stbtt_uint32 t; - if (info->svg < 0) { - t = stbtt__find_table(info->data, info->fontstart, "SVG "); - if (t) { - stbtt_uint32 offset = ttULONG(info->data + t + 2); - info->svg = t + offset; - } else { - info->svg = 0; - } - } - return info->svg; -} - -static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, int fontstart) -{ - stbtt_uint32 cmap, t; - stbtt_int32 i,numTables; - - info->data = data; - info->fontstart = fontstart; - info->cff = stbtt__new_buf(NULL, 0); - - cmap = stbtt__find_table(data, fontstart, "cmap"); // required - info->loca = stbtt__find_table(data, fontstart, "loca"); // required - info->head = stbtt__find_table(data, fontstart, "head"); // required - info->glyf = stbtt__find_table(data, fontstart, "glyf"); // required - info->hhea = stbtt__find_table(data, fontstart, "hhea"); // required - info->hmtx = stbtt__find_table(data, fontstart, "hmtx"); // required - info->kern = stbtt__find_table(data, fontstart, "kern"); // not required - info->gpos = stbtt__find_table(data, fontstart, "GPOS"); // not required - - if (!cmap || !info->head || !info->hhea || !info->hmtx) - return 0; - if (info->glyf) { - // required for truetype - if (!info->loca) return 0; - } else { - // initialization for CFF / Type2 fonts (OTF) - stbtt__buf b, topdict, topdictidx; - stbtt_uint32 cstype = 2, charstrings = 0, fdarrayoff = 0, fdselectoff = 0; - stbtt_uint32 cff; - - cff = stbtt__find_table(data, fontstart, "CFF "); - if (!cff) return 0; - - info->fontdicts = stbtt__new_buf(NULL, 0); - info->fdselect = stbtt__new_buf(NULL, 0); - - // @TODO this should use size from table (not 512MB) - info->cff = stbtt__new_buf(data+cff, 512*1024*1024); - b = info->cff; - - // read the header - stbtt__buf_skip(&b, 2); - stbtt__buf_seek(&b, stbtt__buf_get8(&b)); // hdrsize - - // @TODO the name INDEX could list multiple fonts, - // but we just use the first one. - stbtt__cff_get_index(&b); // name INDEX - topdictidx = stbtt__cff_get_index(&b); - topdict = stbtt__cff_index_get(topdictidx, 0); - stbtt__cff_get_index(&b); // string INDEX - info->gsubrs = stbtt__cff_get_index(&b); - - stbtt__dict_get_ints(&topdict, 17, 1, &charstrings); - stbtt__dict_get_ints(&topdict, 0x100 | 6, 1, &cstype); - stbtt__dict_get_ints(&topdict, 0x100 | 36, 1, &fdarrayoff); - stbtt__dict_get_ints(&topdict, 0x100 | 37, 1, &fdselectoff); - info->subrs = stbtt__get_subrs(b, topdict); - - // we only support Type 2 charstrings - if (cstype != 2) return 0; - if (charstrings == 0) return 0; - - if (fdarrayoff) { - // looks like a CID font - if (!fdselectoff) return 0; - stbtt__buf_seek(&b, fdarrayoff); - info->fontdicts = stbtt__cff_get_index(&b); - info->fdselect = stbtt__buf_range(&b, fdselectoff, b.size-fdselectoff); - } - - stbtt__buf_seek(&b, charstrings); - info->charstrings = stbtt__cff_get_index(&b); - } - - t = stbtt__find_table(data, fontstart, "maxp"); - if (t) - info->numGlyphs = ttUSHORT(data+t+4); - else - info->numGlyphs = 0xffff; - - info->svg = -1; - - // find a cmap encoding table we understand *now* to avoid searching - // later. (todo: could make this installable) - // the same regardless of glyph. - numTables = ttUSHORT(data + cmap + 2); - info->index_map = 0; - for (i=0; i < numTables; ++i) { - stbtt_uint32 encoding_record = cmap + 4 + 8 * i; - // find an encoding we understand: - switch(ttUSHORT(data+encoding_record)) { - case STBTT_PLATFORM_ID_MICROSOFT: - switch (ttUSHORT(data+encoding_record+2)) { - case STBTT_MS_EID_UNICODE_BMP: - case STBTT_MS_EID_UNICODE_FULL: - // MS/Unicode - info->index_map = cmap + ttULONG(data+encoding_record+4); - break; - } - break; - case STBTT_PLATFORM_ID_UNICODE: - // Mac/iOS has these - // all the encodingIDs are unicode, so we don't bother to check it - info->index_map = cmap + ttULONG(data+encoding_record+4); - break; - } - } - if (info->index_map == 0) - return 0; - - info->indexToLocFormat = ttUSHORT(data+info->head + 50); - return 1; -} - -STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint) -{ - stbtt_uint8 *data = info->data; - stbtt_uint32 index_map = info->index_map; - - stbtt_uint16 format = ttUSHORT(data + index_map + 0); - if (format == 0) { // apple byte encoding - stbtt_int32 bytes = ttUSHORT(data + index_map + 2); - if (unicode_codepoint < bytes-6) - return ttBYTE(data + index_map + 6 + unicode_codepoint); - return 0; - } else if (format == 6) { - stbtt_uint32 first = ttUSHORT(data + index_map + 6); - stbtt_uint32 count = ttUSHORT(data + index_map + 8); - if ((stbtt_uint32) unicode_codepoint >= first && (stbtt_uint32) unicode_codepoint < first+count) - return ttUSHORT(data + index_map + 10 + (unicode_codepoint - first)*2); - return 0; - } else if (format == 2) { - STBTT_assert(0); // @TODO: high-byte mapping for japanese/chinese/korean - return 0; - } else if (format == 4) { // standard mapping for windows fonts: binary search collection of ranges - stbtt_uint16 segcount = ttUSHORT(data+index_map+6) >> 1; - stbtt_uint16 searchRange = ttUSHORT(data+index_map+8) >> 1; - stbtt_uint16 entrySelector = ttUSHORT(data+index_map+10); - stbtt_uint16 rangeShift = ttUSHORT(data+index_map+12) >> 1; - - // do a binary search of the segments - stbtt_uint32 endCount = index_map + 14; - stbtt_uint32 search = endCount; - - if (unicode_codepoint > 0xffff) - return 0; - - // they lie from endCount .. endCount + segCount - // but searchRange is the nearest power of two, so... - if (unicode_codepoint >= ttUSHORT(data + search + rangeShift*2)) - search += rangeShift*2; - - // now decrement to bias correctly to find smallest - search -= 2; - while (entrySelector) { - stbtt_uint16 end; - searchRange >>= 1; - end = ttUSHORT(data + search + searchRange*2); - if (unicode_codepoint > end) - search += searchRange*2; - --entrySelector; - } - search += 2; - - { - stbtt_uint16 offset, start, last; - stbtt_uint16 item = (stbtt_uint16) ((search - endCount) >> 1); - - start = ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item); - last = ttUSHORT(data + endCount + 2*item); - if (unicode_codepoint < start || unicode_codepoint > last) - return 0; - - offset = ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item); - if (offset == 0) - return (stbtt_uint16) (unicode_codepoint + ttSHORT(data + index_map + 14 + segcount*4 + 2 + 2*item)); - - return ttUSHORT(data + offset + (unicode_codepoint-start)*2 + index_map + 14 + segcount*6 + 2 + 2*item); - } - } else if (format == 12 || format == 13) { - stbtt_uint32 ngroups = ttULONG(data+index_map+12); - stbtt_int32 low,high; - low = 0; high = (stbtt_int32)ngroups; - // Binary search the right group. - while (low < high) { - stbtt_int32 mid = low + ((high-low) >> 1); // rounds down, so low <= mid < high - stbtt_uint32 start_char = ttULONG(data+index_map+16+mid*12); - stbtt_uint32 end_char = ttULONG(data+index_map+16+mid*12+4); - if ((stbtt_uint32) unicode_codepoint < start_char) - high = mid; - else if ((stbtt_uint32) unicode_codepoint > end_char) - low = mid+1; - else { - stbtt_uint32 start_glyph = ttULONG(data+index_map+16+mid*12+8); - if (format == 12) - return start_glyph + unicode_codepoint-start_char; - else // format == 13 - return start_glyph; - } - } - return 0; // not found - } - // @TODO - STBTT_assert(0); - return 0; -} - -STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_codepoint, stbtt_vertex **vertices) -{ - return stbtt_GetGlyphShape(info, stbtt_FindGlyphIndex(info, unicode_codepoint), vertices); -} - -static void stbtt_setvertex(stbtt_vertex *v, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy) -{ - v->type = type; - v->x = (stbtt_int16) x; - v->y = (stbtt_int16) y; - v->cx = (stbtt_int16) cx; - v->cy = (stbtt_int16) cy; -} - -static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index) -{ - int g1,g2; - - STBTT_assert(!info->cff.size); - - if (glyph_index >= info->numGlyphs) return -1; // glyph index out of range - if (info->indexToLocFormat >= 2) return -1; // unknown index->glyph map format - - if (info->indexToLocFormat == 0) { - g1 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2) * 2; - g2 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2; - } else { - g1 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4); - g2 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4 + 4); - } - - return g1==g2 ? -1 : g1; // if length is 0, return -1 -} - -static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1); - -STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) -{ - if (info->cff.size) { - stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1); - } else { - int g = stbtt__GetGlyfOffset(info, glyph_index); - if (g < 0) return 0; - - if (x0) *x0 = ttSHORT(info->data + g + 2); - if (y0) *y0 = ttSHORT(info->data + g + 4); - if (x1) *x1 = ttSHORT(info->data + g + 6); - if (y1) *y1 = ttSHORT(info->data + g + 8); - } - return 1; -} - -STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int *x0, int *y0, int *x1, int *y1) -{ - return stbtt_GetGlyphBox(info, stbtt_FindGlyphIndex(info,codepoint), x0,y0,x1,y1); -} - -STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index) -{ - stbtt_int16 numberOfContours; - int g; - if (info->cff.size) - return stbtt__GetGlyphInfoT2(info, glyph_index, NULL, NULL, NULL, NULL) == 0; - g = stbtt__GetGlyfOffset(info, glyph_index); - if (g < 0) return 1; - numberOfContours = ttSHORT(info->data + g); - return numberOfContours == 0; -} - -static int stbtt__close_shape(stbtt_vertex *vertices, int num_vertices, int was_off, int start_off, - stbtt_int32 sx, stbtt_int32 sy, stbtt_int32 scx, stbtt_int32 scy, stbtt_int32 cx, stbtt_int32 cy) -{ - if (start_off) { - if (was_off) - stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+scx)>>1, (cy+scy)>>1, cx,cy); - stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, sx,sy,scx,scy); - } else { - if (was_off) - stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve,sx,sy,cx,cy); - else - stbtt_setvertex(&vertices[num_vertices++], STBTT_vline,sx,sy,0,0); - } - return num_vertices; -} - -static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) -{ - stbtt_int16 numberOfContours; - stbtt_uint8 *endPtsOfContours; - stbtt_uint8 *data = info->data; - stbtt_vertex *vertices=0; - int num_vertices=0; - int g = stbtt__GetGlyfOffset(info, glyph_index); - - *pvertices = NULL; - - if (g < 0) return 0; - - numberOfContours = ttSHORT(data + g); - - if (numberOfContours > 0) { - stbtt_uint8 flags=0,flagcount; - stbtt_int32 ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0; - stbtt_int32 x,y,cx,cy,sx,sy, scx,scy; - stbtt_uint8 *points; - endPtsOfContours = (data + g + 10); - ins = ttUSHORT(data + g + 10 + numberOfContours * 2); - points = data + g + 10 + numberOfContours * 2 + 2 + ins; - - n = 1+ttUSHORT(endPtsOfContours + numberOfContours*2-2); - - m = n + 2*numberOfContours; // a loose bound on how many vertices we might need - vertices = (stbtt_vertex *) STBTT_malloc(m * sizeof(vertices[0]), info->userdata); - if (vertices == 0) - return 0; - - next_move = 0; - flagcount=0; - - // in first pass, we load uninterpreted data into the allocated array - // above, shifted to the end of the array so we won't overwrite it when - // we create our final data starting from the front - - off = m - n; // starting offset for uninterpreted data, regardless of how m ends up being calculated - - // first load flags - - for (i=0; i < n; ++i) { - if (flagcount == 0) { - flags = *points++; - if (flags & 8) - flagcount = *points++; - } else - --flagcount; - vertices[off+i].type = flags; - } - - // now load x coordinates - x=0; - for (i=0; i < n; ++i) { - flags = vertices[off+i].type; - if (flags & 2) { - stbtt_int16 dx = *points++; - x += (flags & 16) ? dx : -dx; // ??? - } else { - if (!(flags & 16)) { - x = x + (stbtt_int16) (points[0]*256 + points[1]); - points += 2; - } - } - vertices[off+i].x = (stbtt_int16) x; - } - - // now load y coordinates - y=0; - for (i=0; i < n; ++i) { - flags = vertices[off+i].type; - if (flags & 4) { - stbtt_int16 dy = *points++; - y += (flags & 32) ? dy : -dy; // ??? - } else { - if (!(flags & 32)) { - y = y + (stbtt_int16) (points[0]*256 + points[1]); - points += 2; - } - } - vertices[off+i].y = (stbtt_int16) y; - } - - // now convert them to our format - num_vertices=0; - sx = sy = cx = cy = scx = scy = 0; - for (i=0; i < n; ++i) { - flags = vertices[off+i].type; - x = (stbtt_int16) vertices[off+i].x; - y = (stbtt_int16) vertices[off+i].y; - - if (next_move == i) { - if (i != 0) - num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy); - - // now start the new one - start_off = !(flags & 1); - if (start_off) { - // if we start off with an off-curve point, then when we need to find a point on the curve - // where we can start, and we need to save some state for when we wraparound. - scx = x; - scy = y; - if (!(vertices[off+i+1].type & 1)) { - // next point is also a curve point, so interpolate an on-point curve - sx = (x + (stbtt_int32) vertices[off+i+1].x) >> 1; - sy = (y + (stbtt_int32) vertices[off+i+1].y) >> 1; - } else { - // otherwise just use the next point as our start point - sx = (stbtt_int32) vertices[off+i+1].x; - sy = (stbtt_int32) vertices[off+i+1].y; - ++i; // we're using point i+1 as the starting point, so skip it - } - } else { - sx = x; - sy = y; - } - stbtt_setvertex(&vertices[num_vertices++], STBTT_vmove,sx,sy,0,0); - was_off = 0; - next_move = 1 + ttUSHORT(endPtsOfContours+j*2); - ++j; - } else { - if (!(flags & 1)) { // if it's a curve - if (was_off) // two off-curve control points in a row means interpolate an on-curve midpoint - stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+x)>>1, (cy+y)>>1, cx, cy); - cx = x; - cy = y; - was_off = 1; - } else { - if (was_off) - stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, x,y, cx, cy); - else - stbtt_setvertex(&vertices[num_vertices++], STBTT_vline, x,y,0,0); - was_off = 0; - } - } - } - num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy); - } else if (numberOfContours < 0) { - // Compound shapes. - int more = 1; - stbtt_uint8 *comp = data + g + 10; - num_vertices = 0; - vertices = 0; - while (more) { - stbtt_uint16 flags, gidx; - int comp_num_verts = 0, i; - stbtt_vertex *comp_verts = 0, *tmp = 0; - float mtx[6] = {1,0,0,1,0,0}, m, n; - - flags = ttSHORT(comp); comp+=2; - gidx = ttSHORT(comp); comp+=2; - - if (flags & 2) { // XY values - if (flags & 1) { // shorts - mtx[4] = ttSHORT(comp); comp+=2; - mtx[5] = ttSHORT(comp); comp+=2; - } else { - mtx[4] = ttCHAR(comp); comp+=1; - mtx[5] = ttCHAR(comp); comp+=1; - } - } - else { - // @TODO handle matching point - STBTT_assert(0); - } - if (flags & (1<<3)) { // WE_HAVE_A_SCALE - mtx[0] = mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; - mtx[1] = mtx[2] = 0; - } else if (flags & (1<<6)) { // WE_HAVE_AN_X_AND_YSCALE - mtx[0] = ttSHORT(comp)/16384.0f; comp+=2; - mtx[1] = mtx[2] = 0; - mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; - } else if (flags & (1<<7)) { // WE_HAVE_A_TWO_BY_TWO - mtx[0] = ttSHORT(comp)/16384.0f; comp+=2; - mtx[1] = ttSHORT(comp)/16384.0f; comp+=2; - mtx[2] = ttSHORT(comp)/16384.0f; comp+=2; - mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; - } - - // Find transformation scales. - m = (float) STBTT_sqrt(mtx[0]*mtx[0] + mtx[1]*mtx[1]); - n = (float) STBTT_sqrt(mtx[2]*mtx[2] + mtx[3]*mtx[3]); - - // Get indexed glyph. - comp_num_verts = stbtt_GetGlyphShape(info, gidx, &comp_verts); - if (comp_num_verts > 0) { - // Transform vertices. - for (i = 0; i < comp_num_verts; ++i) { - stbtt_vertex* v = &comp_verts[i]; - stbtt_vertex_type x,y; - x=v->x; y=v->y; - v->x = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4])); - v->y = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5])); - x=v->cx; y=v->cy; - v->cx = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4])); - v->cy = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5])); - } - // Append vertices. - tmp = (stbtt_vertex*)STBTT_malloc((num_vertices+comp_num_verts)*sizeof(stbtt_vertex), info->userdata); - if (!tmp) { - if (vertices) STBTT_free(vertices, info->userdata); - if (comp_verts) STBTT_free(comp_verts, info->userdata); - return 0; - } - if (num_vertices > 0 && vertices) STBTT_memcpy(tmp, vertices, num_vertices*sizeof(stbtt_vertex)); - STBTT_memcpy(tmp+num_vertices, comp_verts, comp_num_verts*sizeof(stbtt_vertex)); - if (vertices) STBTT_free(vertices, info->userdata); - vertices = tmp; - STBTT_free(comp_verts, info->userdata); - num_vertices += comp_num_verts; - } - // More components ? - more = flags & (1<<5); - } - } else { - // numberOfCounters == 0, do nothing - } - - *pvertices = vertices; - return num_vertices; -} - -typedef struct -{ - int bounds; - int started; - float first_x, first_y; - float x, y; - stbtt_int32 min_x, max_x, min_y, max_y; - - stbtt_vertex *pvertices; - int num_vertices; -} stbtt__csctx; - -#define STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0} - -static void stbtt__track_vertex(stbtt__csctx *c, stbtt_int32 x, stbtt_int32 y) -{ - if (x > c->max_x || !c->started) c->max_x = x; - if (y > c->max_y || !c->started) c->max_y = y; - if (x < c->min_x || !c->started) c->min_x = x; - if (y < c->min_y || !c->started) c->min_y = y; - c->started = 1; -} - -static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1) -{ - if (c->bounds) { - stbtt__track_vertex(c, x, y); - if (type == STBTT_vcubic) { - stbtt__track_vertex(c, cx, cy); - stbtt__track_vertex(c, cx1, cy1); - } - } else { - stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy); - c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1; - c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1; - } - c->num_vertices++; -} - -static void stbtt__csctx_close_shape(stbtt__csctx *ctx) -{ - if (ctx->first_x != ctx->x || ctx->first_y != ctx->y) - stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->first_x, (int)ctx->first_y, 0, 0, 0, 0); -} - -static void stbtt__csctx_rmove_to(stbtt__csctx *ctx, float dx, float dy) -{ - stbtt__csctx_close_shape(ctx); - ctx->first_x = ctx->x = ctx->x + dx; - ctx->first_y = ctx->y = ctx->y + dy; - stbtt__csctx_v(ctx, STBTT_vmove, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); -} - -static void stbtt__csctx_rline_to(stbtt__csctx *ctx, float dx, float dy) -{ - ctx->x += dx; - ctx->y += dy; - stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); -} - -static void stbtt__csctx_rccurve_to(stbtt__csctx *ctx, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3) -{ - float cx1 = ctx->x + dx1; - float cy1 = ctx->y + dy1; - float cx2 = cx1 + dx2; - float cy2 = cy1 + dy2; - ctx->x = cx2 + dx3; - ctx->y = cy2 + dy3; - stbtt__csctx_v(ctx, STBTT_vcubic, (int)ctx->x, (int)ctx->y, (int)cx1, (int)cy1, (int)cx2, (int)cy2); -} - -static stbtt__buf stbtt__get_subr(stbtt__buf idx, int n) -{ - int count = stbtt__cff_index_count(&idx); - int bias = 107; - if (count >= 33900) - bias = 32768; - else if (count >= 1240) - bias = 1131; - n += bias; - if (n < 0 || n >= count) - return stbtt__new_buf(NULL, 0); - return stbtt__cff_index_get(idx, n); -} - -static stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo *info, int glyph_index) -{ - stbtt__buf fdselect = info->fdselect; - int nranges, start, end, v, fmt, fdselector = -1, i; - - stbtt__buf_seek(&fdselect, 0); - fmt = stbtt__buf_get8(&fdselect); - if (fmt == 0) { - // untested - stbtt__buf_skip(&fdselect, glyph_index); - fdselector = stbtt__buf_get8(&fdselect); - } else if (fmt == 3) { - nranges = stbtt__buf_get16(&fdselect); - start = stbtt__buf_get16(&fdselect); - for (i = 0; i < nranges; i++) { - v = stbtt__buf_get8(&fdselect); - end = stbtt__buf_get16(&fdselect); - if (glyph_index >= start && glyph_index < end) { - fdselector = v; - break; - } - start = end; - } - } - if (fdselector == -1) stbtt__new_buf(NULL, 0); - return stbtt__get_subrs(info->cff, stbtt__cff_index_get(info->fontdicts, fdselector)); -} - -static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, stbtt__csctx *c) -{ - int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0; - int has_subrs = 0, clear_stack; - float s[48]; - stbtt__buf subr_stack[10], subrs = info->subrs, b; - float f; - -#define STBTT__CSERR(s) (0) - - // this currently ignores the initial width value, which isn't needed if we have hmtx - b = stbtt__cff_index_get(info->charstrings, glyph_index); - while (b.cursor < b.size) { - i = 0; - clear_stack = 1; - b0 = stbtt__buf_get8(&b); - switch (b0) { - // @TODO implement hinting - case 0x13: // hintmask - case 0x14: // cntrmask - if (in_header) - maskbits += (sp / 2); // implicit "vstem" - in_header = 0; - stbtt__buf_skip(&b, (maskbits + 7) / 8); - break; - - case 0x01: // hstem - case 0x03: // vstem - case 0x12: // hstemhm - case 0x17: // vstemhm - maskbits += (sp / 2); - break; - - case 0x15: // rmoveto - in_header = 0; - if (sp < 2) return STBTT__CSERR("rmoveto stack"); - stbtt__csctx_rmove_to(c, s[sp-2], s[sp-1]); - break; - case 0x04: // vmoveto - in_header = 0; - if (sp < 1) return STBTT__CSERR("vmoveto stack"); - stbtt__csctx_rmove_to(c, 0, s[sp-1]); - break; - case 0x16: // hmoveto - in_header = 0; - if (sp < 1) return STBTT__CSERR("hmoveto stack"); - stbtt__csctx_rmove_to(c, s[sp-1], 0); - break; - - case 0x05: // rlineto - if (sp < 2) return STBTT__CSERR("rlineto stack"); - for (; i + 1 < sp; i += 2) - stbtt__csctx_rline_to(c, s[i], s[i+1]); - break; - - // hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical - // starting from a different place. - - case 0x07: // vlineto - if (sp < 1) return STBTT__CSERR("vlineto stack"); - goto vlineto; - case 0x06: // hlineto - if (sp < 1) return STBTT__CSERR("hlineto stack"); - for (;;) { - if (i >= sp) break; - stbtt__csctx_rline_to(c, s[i], 0); - i++; - vlineto: - if (i >= sp) break; - stbtt__csctx_rline_to(c, 0, s[i]); - i++; - } - break; - - case 0x1F: // hvcurveto - if (sp < 4) return STBTT__CSERR("hvcurveto stack"); - goto hvcurveto; - case 0x1E: // vhcurveto - if (sp < 4) return STBTT__CSERR("vhcurveto stack"); - for (;;) { - if (i + 3 >= sp) break; - stbtt__csctx_rccurve_to(c, 0, s[i], s[i+1], s[i+2], s[i+3], (sp - i == 5) ? s[i + 4] : 0.0f); - i += 4; - hvcurveto: - if (i + 3 >= sp) break; - stbtt__csctx_rccurve_to(c, s[i], 0, s[i+1], s[i+2], (sp - i == 5) ? s[i+4] : 0.0f, s[i+3]); - i += 4; - } - break; - - case 0x08: // rrcurveto - if (sp < 6) return STBTT__CSERR("rcurveline stack"); - for (; i + 5 < sp; i += 6) - stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); - break; - - case 0x18: // rcurveline - if (sp < 8) return STBTT__CSERR("rcurveline stack"); - for (; i + 5 < sp - 2; i += 6) - stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); - if (i + 1 >= sp) return STBTT__CSERR("rcurveline stack"); - stbtt__csctx_rline_to(c, s[i], s[i+1]); - break; - - case 0x19: // rlinecurve - if (sp < 8) return STBTT__CSERR("rlinecurve stack"); - for (; i + 1 < sp - 6; i += 2) - stbtt__csctx_rline_to(c, s[i], s[i+1]); - if (i + 5 >= sp) return STBTT__CSERR("rlinecurve stack"); - stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); - break; - - case 0x1A: // vvcurveto - case 0x1B: // hhcurveto - if (sp < 4) return STBTT__CSERR("(vv|hh)curveto stack"); - f = 0.0; - if (sp & 1) { f = s[i]; i++; } - for (; i + 3 < sp; i += 4) { - if (b0 == 0x1B) - stbtt__csctx_rccurve_to(c, s[i], f, s[i+1], s[i+2], s[i+3], 0.0); - else - stbtt__csctx_rccurve_to(c, f, s[i], s[i+1], s[i+2], 0.0, s[i+3]); - f = 0.0; - } - break; - - case 0x0A: // callsubr - if (!has_subrs) { - if (info->fdselect.size) - subrs = stbtt__cid_get_glyph_subrs(info, glyph_index); - has_subrs = 1; - } - // FALLTHROUGH - case 0x1D: // callgsubr - if (sp < 1) return STBTT__CSERR("call(g|)subr stack"); - v = (int) s[--sp]; - if (subr_stack_height >= 10) return STBTT__CSERR("recursion limit"); - subr_stack[subr_stack_height++] = b; - b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v); - if (b.size == 0) return STBTT__CSERR("subr not found"); - b.cursor = 0; - clear_stack = 0; - break; - - case 0x0B: // return - if (subr_stack_height <= 0) return STBTT__CSERR("return outside subr"); - b = subr_stack[--subr_stack_height]; - clear_stack = 0; - break; - - case 0x0E: // endchar - stbtt__csctx_close_shape(c); - return 1; - - case 0x0C: { // two-byte escape - float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6; - float dx, dy; - int b1 = stbtt__buf_get8(&b); - switch (b1) { - // @TODO These "flex" implementations ignore the flex-depth and resolution, - // and always draw beziers. - case 0x22: // hflex - if (sp < 7) return STBTT__CSERR("hflex stack"); - dx1 = s[0]; - dx2 = s[1]; - dy2 = s[2]; - dx3 = s[3]; - dx4 = s[4]; - dx5 = s[5]; - dx6 = s[6]; - stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0); - stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0); - break; - - case 0x23: // flex - if (sp < 13) return STBTT__CSERR("flex stack"); - dx1 = s[0]; - dy1 = s[1]; - dx2 = s[2]; - dy2 = s[3]; - dx3 = s[4]; - dy3 = s[5]; - dx4 = s[6]; - dy4 = s[7]; - dx5 = s[8]; - dy5 = s[9]; - dx6 = s[10]; - dy6 = s[11]; - //fd is s[12] - stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); - stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); - break; - - case 0x24: // hflex1 - if (sp < 9) return STBTT__CSERR("hflex1 stack"); - dx1 = s[0]; - dy1 = s[1]; - dx2 = s[2]; - dy2 = s[3]; - dx3 = s[4]; - dx4 = s[5]; - dx5 = s[6]; - dy5 = s[7]; - dx6 = s[8]; - stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0); - stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1+dy2+dy5)); - break; - - case 0x25: // flex1 - if (sp < 11) return STBTT__CSERR("flex1 stack"); - dx1 = s[0]; - dy1 = s[1]; - dx2 = s[2]; - dy2 = s[3]; - dx3 = s[4]; - dy3 = s[5]; - dx4 = s[6]; - dy4 = s[7]; - dx5 = s[8]; - dy5 = s[9]; - dx6 = dy6 = s[10]; - dx = dx1+dx2+dx3+dx4+dx5; - dy = dy1+dy2+dy3+dy4+dy5; - if (STBTT_fabs(dx) > STBTT_fabs(dy)) - dy6 = -dy; - else - dx6 = -dx; - stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); - stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); - break; - - default: - return STBTT__CSERR("unimplemented"); - } - } break; - - default: - if (b0 != 255 && b0 != 28 && b0 < 32) - return STBTT__CSERR("reserved operator"); - - // push immediate - if (b0 == 255) { - f = (float)(stbtt_int32)stbtt__buf_get32(&b) / 0x10000; - } else { - stbtt__buf_skip(&b, -1); - f = (float)(stbtt_int16)stbtt__cff_int(&b); - } - if (sp >= 48) return STBTT__CSERR("push stack overflow"); - s[sp++] = f; - clear_stack = 0; - break; - } - if (clear_stack) sp = 0; - } - return STBTT__CSERR("no endchar"); - -#undef STBTT__CSERR -} - -static int stbtt__GetGlyphShapeT2(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) -{ - // runs the charstring twice, once to count and once to output (to avoid realloc) - stbtt__csctx count_ctx = STBTT__CSCTX_INIT(1); - stbtt__csctx output_ctx = STBTT__CSCTX_INIT(0); - if (stbtt__run_charstring(info, glyph_index, &count_ctx)) { - *pvertices = (stbtt_vertex*)STBTT_malloc(count_ctx.num_vertices*sizeof(stbtt_vertex), info->userdata); - output_ctx.pvertices = *pvertices; - if (stbtt__run_charstring(info, glyph_index, &output_ctx)) { - STBTT_assert(output_ctx.num_vertices == count_ctx.num_vertices); - return output_ctx.num_vertices; - } - } - *pvertices = NULL; - return 0; -} - -static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) -{ - stbtt__csctx c = STBTT__CSCTX_INIT(1); - int r = stbtt__run_charstring(info, glyph_index, &c); - if (x0) *x0 = r ? c.min_x : 0; - if (y0) *y0 = r ? c.min_y : 0; - if (x1) *x1 = r ? c.max_x : 0; - if (y1) *y1 = r ? c.max_y : 0; - return r ? c.num_vertices : 0; -} - -STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) -{ - if (!info->cff.size) - return stbtt__GetGlyphShapeTT(info, glyph_index, pvertices); - else - return stbtt__GetGlyphShapeT2(info, glyph_index, pvertices); -} - -STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing) -{ - stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34); - if (glyph_index < numOfLongHorMetrics) { - if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*glyph_index); - if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*glyph_index + 2); - } else { - if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1)); - if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics)); - } -} - -STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo *info) -{ - stbtt_uint8 *data = info->data + info->kern; - - // we only look at the first table. it must be 'horizontal' and format 0. - if (!info->kern) - return 0; - if (ttUSHORT(data+2) < 1) // number of tables, need at least 1 - return 0; - if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format - return 0; - - return ttUSHORT(data+10); -} - -STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length) -{ - stbtt_uint8 *data = info->data + info->kern; - int k, length; - - // we only look at the first table. it must be 'horizontal' and format 0. - if (!info->kern) - return 0; - if (ttUSHORT(data+2) < 1) // number of tables, need at least 1 - return 0; - if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format - return 0; - - length = ttUSHORT(data+10); - if (table_length < length) - length = table_length; - - for (k = 0; k < length; k++) - { - table[k].glyph1 = ttUSHORT(data+18+(k*6)); - table[k].glyph2 = ttUSHORT(data+20+(k*6)); - table[k].advance = ttSHORT(data+22+(k*6)); - } - - return length; -} - -static int stbtt__GetGlyphKernInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2) -{ - stbtt_uint8 *data = info->data + info->kern; - stbtt_uint32 needle, straw; - int l, r, m; - - // we only look at the first table. it must be 'horizontal' and format 0. - if (!info->kern) - return 0; - if (ttUSHORT(data+2) < 1) // number of tables, need at least 1 - return 0; - if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format - return 0; - - l = 0; - r = ttUSHORT(data+10) - 1; - needle = glyph1 << 16 | glyph2; - while (l <= r) { - m = (l + r) >> 1; - straw = ttULONG(data+18+(m*6)); // note: unaligned read - if (needle < straw) - r = m - 1; - else if (needle > straw) - l = m + 1; - else - return ttSHORT(data+22+(m*6)); - } - return 0; -} - -static stbtt_int32 stbtt__GetCoverageIndex(stbtt_uint8 *coverageTable, int glyph) -{ - stbtt_uint16 coverageFormat = ttUSHORT(coverageTable); - switch (coverageFormat) { - case 1: { - stbtt_uint16 glyphCount = ttUSHORT(coverageTable + 2); - - // Binary search. - stbtt_int32 l=0, r=glyphCount-1, m; - int straw, needle=glyph; - while (l <= r) { - stbtt_uint8 *glyphArray = coverageTable + 4; - stbtt_uint16 glyphID; - m = (l + r) >> 1; - glyphID = ttUSHORT(glyphArray + 2 * m); - straw = glyphID; - if (needle < straw) - r = m - 1; - else if (needle > straw) - l = m + 1; - else { - return m; - } - } - break; - } - - case 2: { - stbtt_uint16 rangeCount = ttUSHORT(coverageTable + 2); - stbtt_uint8 *rangeArray = coverageTable + 4; - - // Binary search. - stbtt_int32 l=0, r=rangeCount-1, m; - int strawStart, strawEnd, needle=glyph; - while (l <= r) { - stbtt_uint8 *rangeRecord; - m = (l + r) >> 1; - rangeRecord = rangeArray + 6 * m; - strawStart = ttUSHORT(rangeRecord); - strawEnd = ttUSHORT(rangeRecord + 2); - if (needle < strawStart) - r = m - 1; - else if (needle > strawEnd) - l = m + 1; - else { - stbtt_uint16 startCoverageIndex = ttUSHORT(rangeRecord + 4); - return startCoverageIndex + glyph - strawStart; - } - } - break; - } - - default: return -1; // unsupported - } - - return -1; -} - -static stbtt_int32 stbtt__GetGlyphClass(stbtt_uint8 *classDefTable, int glyph) -{ - stbtt_uint16 classDefFormat = ttUSHORT(classDefTable); - switch (classDefFormat) - { - case 1: { - stbtt_uint16 startGlyphID = ttUSHORT(classDefTable + 2); - stbtt_uint16 glyphCount = ttUSHORT(classDefTable + 4); - stbtt_uint8 *classDef1ValueArray = classDefTable + 6; - - if (glyph >= startGlyphID && glyph < startGlyphID + glyphCount) - return (stbtt_int32)ttUSHORT(classDef1ValueArray + 2 * (glyph - startGlyphID)); - break; - } - - case 2: { - stbtt_uint16 classRangeCount = ttUSHORT(classDefTable + 2); - stbtt_uint8 *classRangeRecords = classDefTable + 4; - - // Binary search. - stbtt_int32 l=0, r=classRangeCount-1, m; - int strawStart, strawEnd, needle=glyph; - while (l <= r) { - stbtt_uint8 *classRangeRecord; - m = (l + r) >> 1; - classRangeRecord = classRangeRecords + 6 * m; - strawStart = ttUSHORT(classRangeRecord); - strawEnd = ttUSHORT(classRangeRecord + 2); - if (needle < strawStart) - r = m - 1; - else if (needle > strawEnd) - l = m + 1; - else - return (stbtt_int32)ttUSHORT(classRangeRecord + 4); - } - break; - } - - default: - return -1; // Unsupported definition type, return an error. - } - - // "All glyphs not assigned to a class fall into class 0". (OpenType spec) - return 0; -} - -// Define to STBTT_assert(x) if you want to break on unimplemented formats. -#define STBTT_GPOS_TODO_assert(x) - -static stbtt_int32 stbtt__GetGlyphGPOSInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2) -{ - stbtt_uint16 lookupListOffset; - stbtt_uint8 *lookupList; - stbtt_uint16 lookupCount; - stbtt_uint8 *data; - stbtt_int32 i, sti; - - if (!info->gpos) return 0; - - data = info->data + info->gpos; - - if (ttUSHORT(data+0) != 1) return 0; // Major version 1 - if (ttUSHORT(data+2) != 0) return 0; // Minor version 0 - - lookupListOffset = ttUSHORT(data+8); - lookupList = data + lookupListOffset; - lookupCount = ttUSHORT(lookupList); - - for (i=0; i= pairSetCount) return 0; - - needle=glyph2; - r=pairValueCount-1; - l=0; - - // Binary search. - while (l <= r) { - stbtt_uint16 secondGlyph; - stbtt_uint8 *pairValue; - m = (l + r) >> 1; - pairValue = pairValueArray + (2 + valueRecordPairSizeInBytes) * m; - secondGlyph = ttUSHORT(pairValue); - straw = secondGlyph; - if (needle < straw) - r = m - 1; - else if (needle > straw) - l = m + 1; - else { - stbtt_int16 xAdvance = ttSHORT(pairValue + 2); - return xAdvance; - } - } - } else - return 0; - break; - } - - case 2: { - stbtt_uint16 valueFormat1 = ttUSHORT(table + 4); - stbtt_uint16 valueFormat2 = ttUSHORT(table + 6); - if (valueFormat1 == 4 && valueFormat2 == 0) { // Support more formats? - stbtt_uint16 classDef1Offset = ttUSHORT(table + 8); - stbtt_uint16 classDef2Offset = ttUSHORT(table + 10); - int glyph1class = stbtt__GetGlyphClass(table + classDef1Offset, glyph1); - int glyph2class = stbtt__GetGlyphClass(table + classDef2Offset, glyph2); - - stbtt_uint16 class1Count = ttUSHORT(table + 12); - stbtt_uint16 class2Count = ttUSHORT(table + 14); - stbtt_uint8 *class1Records, *class2Records; - stbtt_int16 xAdvance; - - if (glyph1class < 0 || glyph1class >= class1Count) return 0; // malformed - if (glyph2class < 0 || glyph2class >= class2Count) return 0; // malformed - - class1Records = table + 16; - class2Records = class1Records + 2 * (glyph1class * class2Count); - xAdvance = ttSHORT(class2Records + 2 * glyph2class); - return xAdvance; - } else - return 0; - break; - } - - default: - return 0; // Unsupported position format - } - } - } - - return 0; -} - -STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int g1, int g2) -{ - int xAdvance = 0; - - if (info->gpos) - xAdvance += stbtt__GetGlyphGPOSInfoAdvance(info, g1, g2); - else if (info->kern) - xAdvance += stbtt__GetGlyphKernInfoAdvance(info, g1, g2); - - return xAdvance; -} - -STBTT_DEF int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int ch1, int ch2) -{ - if (!info->kern && !info->gpos) // if no kerning table, don't waste time looking up both codepoint->glyphs - return 0; - return stbtt_GetGlyphKernAdvance(info, stbtt_FindGlyphIndex(info,ch1), stbtt_FindGlyphIndex(info,ch2)); -} - -STBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int codepoint, int *advanceWidth, int *leftSideBearing) -{ - stbtt_GetGlyphHMetrics(info, stbtt_FindGlyphIndex(info,codepoint), advanceWidth, leftSideBearing); -} - -STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int *descent, int *lineGap) -{ - if (ascent ) *ascent = ttSHORT(info->data+info->hhea + 4); - if (descent) *descent = ttSHORT(info->data+info->hhea + 6); - if (lineGap) *lineGap = ttSHORT(info->data+info->hhea + 8); -} - -STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap) -{ - int tab = stbtt__find_table(info->data, info->fontstart, "OS/2"); - if (!tab) - return 0; - if (typoAscent ) *typoAscent = ttSHORT(info->data+tab + 68); - if (typoDescent) *typoDescent = ttSHORT(info->data+tab + 70); - if (typoLineGap) *typoLineGap = ttSHORT(info->data+tab + 72); - return 1; -} - -STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1) -{ - *x0 = ttSHORT(info->data + info->head + 36); - *y0 = ttSHORT(info->data + info->head + 38); - *x1 = ttSHORT(info->data + info->head + 40); - *y1 = ttSHORT(info->data + info->head + 42); -} - -STBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float height) -{ - int fheight = ttSHORT(info->data + info->hhea + 4) - ttSHORT(info->data + info->hhea + 6); - return (float) height / fheight; -} - -STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels) -{ - int unitsPerEm = ttUSHORT(info->data + info->head + 18); - return pixels / unitsPerEm; -} - -STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v) -{ - STBTT_free(v, info->userdata); -} - -STBTT_DEF stbtt_uint8 *stbtt_FindSVGDoc(const stbtt_fontinfo *info, int gl) -{ - int i; - stbtt_uint8 *data = info->data; - stbtt_uint8 *svg_doc_list = data + stbtt__get_svg((stbtt_fontinfo *) info); - - int numEntries = ttUSHORT(svg_doc_list); - stbtt_uint8 *svg_docs = svg_doc_list + 2; - - for(i=0; i= ttUSHORT(svg_doc)) && (gl <= ttUSHORT(svg_doc + 2))) - return svg_doc; - } - return 0; -} - -STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg) -{ - stbtt_uint8 *data = info->data; - stbtt_uint8 *svg_doc; - - if (info->svg == 0) - return 0; - - svg_doc = stbtt_FindSVGDoc(info, gl); - if (svg_doc != NULL) { - *svg = (char *) data + info->svg + ttULONG(svg_doc + 4); - return ttULONG(svg_doc + 8); - } else { - return 0; - } -} - -STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg) -{ - return stbtt_GetGlyphSVG(info, stbtt_FindGlyphIndex(info, unicode_codepoint), svg); -} - -////////////////////////////////////////////////////////////////////////////// -// -// antialiasing software rasterizer -// - -STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1) -{ - int x0=0,y0=0,x1,y1; // =0 suppresses compiler warning - if (!stbtt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) { - // e.g. space character - if (ix0) *ix0 = 0; - if (iy0) *iy0 = 0; - if (ix1) *ix1 = 0; - if (iy1) *iy1 = 0; - } else { - // move to integral bboxes (treating pixels as little squares, what pixels get touched)? - if (ix0) *ix0 = STBTT_ifloor( x0 * scale_x + shift_x); - if (iy0) *iy0 = STBTT_ifloor(-y1 * scale_y + shift_y); - if (ix1) *ix1 = STBTT_iceil ( x1 * scale_x + shift_x); - if (iy1) *iy1 = STBTT_iceil (-y0 * scale_y + shift_y); - } -} - -STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1) -{ - stbtt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y,0.0f,0.0f, ix0, iy0, ix1, iy1); -} - -STBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1) -{ - stbtt_GetGlyphBitmapBoxSubpixel(font, stbtt_FindGlyphIndex(font,codepoint), scale_x, scale_y,shift_x,shift_y, ix0,iy0,ix1,iy1); -} - -STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1) -{ - stbtt_GetCodepointBitmapBoxSubpixel(font, codepoint, scale_x, scale_y,0.0f,0.0f, ix0,iy0,ix1,iy1); -} - -////////////////////////////////////////////////////////////////////////////// -// -// Rasterizer - -typedef struct stbtt__hheap_chunk -{ - struct stbtt__hheap_chunk *next; -} stbtt__hheap_chunk; - -typedef struct stbtt__hheap -{ - struct stbtt__hheap_chunk *head; - void *first_free; - int num_remaining_in_head_chunk; -} stbtt__hheap; - -static void *stbtt__hheap_alloc(stbtt__hheap *hh, size_t size, void *userdata) -{ - if (hh->first_free) { - void *p = hh->first_free; - hh->first_free = * (void **) p; - return p; - } else { - if (hh->num_remaining_in_head_chunk == 0) { - int count = (size < 32 ? 2000 : size < 128 ? 800 : 100); - stbtt__hheap_chunk *c = (stbtt__hheap_chunk *) STBTT_malloc(sizeof(stbtt__hheap_chunk) + size * count, userdata); - if (c == NULL) - return NULL; - c->next = hh->head; - hh->head = c; - hh->num_remaining_in_head_chunk = count; - } - --hh->num_remaining_in_head_chunk; - return (char *) (hh->head) + sizeof(stbtt__hheap_chunk) + size * hh->num_remaining_in_head_chunk; - } -} - -static void stbtt__hheap_free(stbtt__hheap *hh, void *p) -{ - *(void **) p = hh->first_free; - hh->first_free = p; -} - -static void stbtt__hheap_cleanup(stbtt__hheap *hh, void *userdata) -{ - stbtt__hheap_chunk *c = hh->head; - while (c) { - stbtt__hheap_chunk *n = c->next; - STBTT_free(c, userdata); - c = n; - } -} - -typedef struct stbtt__edge { - float x0,y0, x1,y1; - int invert; -} stbtt__edge; - - -typedef struct stbtt__active_edge -{ - struct stbtt__active_edge *next; - #if STBTT_RASTERIZER_VERSION==1 - int x,dx; - float ey; - int direction; - #elif STBTT_RASTERIZER_VERSION==2 - float fx,fdx,fdy; - float direction; - float sy; - float ey; - #else - #error "Unrecognized value of STBTT_RASTERIZER_VERSION" - #endif -} stbtt__active_edge; - -#if STBTT_RASTERIZER_VERSION == 1 -#define STBTT_FIXSHIFT 10 -#define STBTT_FIX (1 << STBTT_FIXSHIFT) -#define STBTT_FIXMASK (STBTT_FIX-1) - -static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, int off_x, float start_point, void *userdata) -{ - stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata); - float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); - STBTT_assert(z != NULL); - if (!z) return z; - - // round dx down to avoid overshooting - if (dxdy < 0) - z->dx = -STBTT_ifloor(STBTT_FIX * -dxdy); - else - z->dx = STBTT_ifloor(STBTT_FIX * dxdy); - - z->x = STBTT_ifloor(STBTT_FIX * e->x0 + z->dx * (start_point - e->y0)); // use z->dx so when we offset later it's by the same amount - z->x -= off_x * STBTT_FIX; - - z->ey = e->y1; - z->next = 0; - z->direction = e->invert ? 1 : -1; - return z; -} -#elif STBTT_RASTERIZER_VERSION == 2 -static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, int off_x, float start_point, void *userdata) -{ - stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata); - float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); - STBTT_assert(z != NULL); - //STBTT_assert(e->y0 <= start_point); - if (!z) return z; - z->fdx = dxdy; - z->fdy = dxdy != 0.0f ? (1.0f/dxdy) : 0.0f; - z->fx = e->x0 + dxdy * (start_point - e->y0); - z->fx -= off_x; - z->direction = e->invert ? 1.0f : -1.0f; - z->sy = e->y0; - z->ey = e->y1; - z->next = 0; - return z; -} -#else -#error "Unrecognized value of STBTT_RASTERIZER_VERSION" -#endif - -#if STBTT_RASTERIZER_VERSION == 1 -// note: this routine clips fills that extend off the edges... ideally this -// wouldn't happen, but it could happen if the truetype glyph bounding boxes -// are wrong, or if the user supplies a too-small bitmap -static void stbtt__fill_active_edges(unsigned char *scanline, int len, stbtt__active_edge *e, int max_weight) -{ - // non-zero winding fill - int x0=0, w=0; - - while (e) { - if (w == 0) { - // if we're currently at zero, we need to record the edge start point - x0 = e->x; w += e->direction; - } else { - int x1 = e->x; w += e->direction; - // if we went to zero, we need to draw - if (w == 0) { - int i = x0 >> STBTT_FIXSHIFT; - int j = x1 >> STBTT_FIXSHIFT; - - if (i < len && j >= 0) { - if (i == j) { - // x0,x1 are the same pixel, so compute combined coverage - scanline[i] = scanline[i] + (stbtt_uint8) ((x1 - x0) * max_weight >> STBTT_FIXSHIFT); - } else { - if (i >= 0) // add antialiasing for x0 - scanline[i] = scanline[i] + (stbtt_uint8) (((STBTT_FIX - (x0 & STBTT_FIXMASK)) * max_weight) >> STBTT_FIXSHIFT); - else - i = -1; // clip - - if (j < len) // add antialiasing for x1 - scanline[j] = scanline[j] + (stbtt_uint8) (((x1 & STBTT_FIXMASK) * max_weight) >> STBTT_FIXSHIFT); - else - j = len; // clip - - for (++i; i < j; ++i) // fill pixels between x0 and x1 - scanline[i] = scanline[i] + (stbtt_uint8) max_weight; - } - } - } - } - - e = e->next; - } -} - -static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata) -{ - stbtt__hheap hh = { 0, 0, 0 }; - stbtt__active_edge *active = NULL; - int y,j=0; - int max_weight = (255 / vsubsample); // weight per vertical scanline - int s; // vertical subsample index - unsigned char scanline_data[512], *scanline; - - if (result->w > 512) - scanline = (unsigned char *) STBTT_malloc(result->w, userdata); - else - scanline = scanline_data; - - y = off_y * vsubsample; - e[n].y0 = (off_y + result->h) * (float) vsubsample + 1; - - while (j < result->h) { - STBTT_memset(scanline, 0, result->w); - for (s=0; s < vsubsample; ++s) { - // find center of pixel for this scanline - float scan_y = y + 0.5f; - stbtt__active_edge **step = &active; - - // update all active edges; - // remove all active edges that terminate before the center of this scanline - while (*step) { - stbtt__active_edge * z = *step; - if (z->ey <= scan_y) { - *step = z->next; // delete from list - STBTT_assert(z->direction); - z->direction = 0; - stbtt__hheap_free(&hh, z); - } else { - z->x += z->dx; // advance to position for current scanline - step = &((*step)->next); // advance through list - } - } - - // resort the list if needed - for(;;) { - int changed=0; - step = &active; - while (*step && (*step)->next) { - if ((*step)->x > (*step)->next->x) { - stbtt__active_edge *t = *step; - stbtt__active_edge *q = t->next; - - t->next = q->next; - q->next = t; - *step = q; - changed = 1; - } - step = &(*step)->next; - } - if (!changed) break; - } - - // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline - while (e->y0 <= scan_y) { - if (e->y1 > scan_y) { - stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y, userdata); - if (z != NULL) { - // find insertion point - if (active == NULL) - active = z; - else if (z->x < active->x) { - // insert at front - z->next = active; - active = z; - } else { - // find thing to insert AFTER - stbtt__active_edge *p = active; - while (p->next && p->next->x < z->x) - p = p->next; - // at this point, p->next->x is NOT < z->x - z->next = p->next; - p->next = z; - } - } - } - ++e; - } - - // now process all active edges in XOR fashion - if (active) - stbtt__fill_active_edges(scanline, result->w, active, max_weight); - - ++y; - } - STBTT_memcpy(result->pixels + j * result->stride, scanline, result->w); - ++j; - } - - stbtt__hheap_cleanup(&hh, userdata); - - if (scanline != scanline_data) - STBTT_free(scanline, userdata); -} - -#elif STBTT_RASTERIZER_VERSION == 2 - -// the edge passed in here does not cross the vertical line at x or the vertical line at x+1 -// (i.e. it has already been clipped to those) -static void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__active_edge *e, float x0, float y0, float x1, float y1) -{ - if (y0 == y1) return; - STBTT_assert(y0 < y1); - STBTT_assert(e->sy <= e->ey); - if (y0 > e->ey) return; - if (y1 < e->sy) return; - if (y0 < e->sy) { - x0 += (x1-x0) * (e->sy - y0) / (y1-y0); - y0 = e->sy; - } - if (y1 > e->ey) { - x1 += (x1-x0) * (e->ey - y1) / (y1-y0); - y1 = e->ey; - } - - if (x0 == x) - STBTT_assert(x1 <= x+1); - else if (x0 == x+1) - STBTT_assert(x1 >= x); - else if (x0 <= x) - STBTT_assert(x1 <= x); - else if (x0 >= x+1) - STBTT_assert(x1 >= x+1); - else - STBTT_assert(x1 >= x && x1 <= x+1); - - if (x0 <= x && x1 <= x) - scanline[x] += e->direction * (y1-y0); - else if (x0 >= x+1 && x1 >= x+1) - ; - else { - STBTT_assert(x0 >= x && x0 <= x+1 && x1 >= x && x1 <= x+1); - scanline[x] += e->direction * (y1-y0) * (1-((x0-x)+(x1-x))/2); // coverage = 1 - average x position - } -} - -static float stbtt__sized_trapezoid_area(float height, float top_width, float bottom_width) -{ - STBTT_assert(top_width >= 0); - STBTT_assert(bottom_width >= 0); - return (top_width + bottom_width) / 2.0f * height; -} - -static float stbtt__position_trapezoid_area(float height, float tx0, float tx1, float bx0, float bx1) -{ - return stbtt__sized_trapezoid_area(height, tx1 - tx0, bx1 - bx0); -} - -static float stbtt__sized_triangle_area(float height, float width) -{ - return height * width / 2; -} - -static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill, int len, stbtt__active_edge *e, float y_top) -{ - float y_bottom = y_top+1; - - while (e) { - // brute force every pixel - - // compute intersection points with top & bottom - STBTT_assert(e->ey >= y_top); - - if (e->fdx == 0) { - float x0 = e->fx; - if (x0 < len) { - if (x0 >= 0) { - stbtt__handle_clipped_edge(scanline,(int) x0,e, x0,y_top, x0,y_bottom); - stbtt__handle_clipped_edge(scanline_fill-1,(int) x0+1,e, x0,y_top, x0,y_bottom); - } else { - stbtt__handle_clipped_edge(scanline_fill-1,0,e, x0,y_top, x0,y_bottom); - } - } - } else { - float x0 = e->fx; - float dx = e->fdx; - float xb = x0 + dx; - float x_top, x_bottom; - float sy0,sy1; - float dy = e->fdy; - STBTT_assert(e->sy <= y_bottom && e->ey >= y_top); - - // compute endpoints of line segment clipped to this scanline (if the - // line segment starts on this scanline. x0 is the intersection of the - // line with y_top, but that may be off the line segment. - if (e->sy > y_top) { - x_top = x0 + dx * (e->sy - y_top); - sy0 = e->sy; - } else { - x_top = x0; - sy0 = y_top; - } - if (e->ey < y_bottom) { - x_bottom = x0 + dx * (e->ey - y_top); - sy1 = e->ey; - } else { - x_bottom = xb; - sy1 = y_bottom; - } - - if (x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len) { - // from here on, we don't have to range check x values - - if ((int) x_top == (int) x_bottom) { - float height; - // simple case, only spans one pixel - int x = (int) x_top; - height = (sy1 - sy0) * e->direction; - STBTT_assert(x >= 0 && x < len); - scanline[x] += stbtt__position_trapezoid_area(height, x_top, x+1.0f, x_bottom, x+1.0f); - scanline_fill[x] += height; // everything right of this pixel is filled - } else { - int x,x1,x2; - float y_crossing, y_final, step, sign, area; - // covers 2+ pixels - if (x_top > x_bottom) { - // flip scanline vertically; signed area is the same - float t; - sy0 = y_bottom - (sy0 - y_top); - sy1 = y_bottom - (sy1 - y_top); - t = sy0, sy0 = sy1, sy1 = t; - t = x_bottom, x_bottom = x_top, x_top = t; - dx = -dx; - dy = -dy; - t = x0, x0 = xb, xb = t; - } - STBTT_assert(dy >= 0); - STBTT_assert(dx >= 0); - - x1 = (int) x_top; - x2 = (int) x_bottom; - // compute intersection with y axis at x1+1 - y_crossing = y_top + dy * (x1+1 - x0); - - // compute intersection with y axis at x2 - y_final = y_top + dy * (x2 - x0); - - // x1 x_top x2 x_bottom - // y_top +------|-----+------------+------------+--------|---+------------+ - // | | | | | | - // | | | | | | - // sy0 | Txxxxx|............|............|............|............| - // y_crossing | *xxxxx.......|............|............|............| - // | | xxxxx..|............|............|............| - // | | /- xx*xxxx........|............|............| - // | | dy < | xxxxxx..|............|............| - // y_final | | \- | xx*xxx.........|............| - // sy1 | | | | xxxxxB...|............| - // | | | | | | - // | | | | | | - // y_bottom +------------+------------+------------+------------+------------+ - // - // goal is to measure the area covered by '.' in each pixel - - // if x2 is right at the right edge of x1, y_crossing can blow up, github #1057 - // @TODO: maybe test against sy1 rather than y_bottom? - if (y_crossing > y_bottom) - y_crossing = y_bottom; - - sign = e->direction; - - // area of the rectangle covered from sy0..y_crossing - area = sign * (y_crossing-sy0); - - // area of the triangle (x_top,sy0), (x1+1,sy0), (x1+1,y_crossing) - scanline[x1] += stbtt__sized_triangle_area(area, x1+1 - x_top); - - // check if final y_crossing is blown up; no test case for this - if (y_final > y_bottom) { - y_final = y_bottom; - dy = (y_final - y_crossing ) / (x2 - (x1+1)); // if denom=0, y_final = y_crossing, so y_final <= y_bottom - } - - // in second pixel, area covered by line segment found in first pixel - // is always a rectangle 1 wide * the height of that line segment; this - // is exactly what the variable 'area' stores. it also gets a contribution - // from the line segment within it. the THIRD pixel will get the first - // pixel's rectangle contribution, the second pixel's rectangle contribution, - // and its own contribution. the 'own contribution' is the same in every pixel except - // the leftmost and rightmost, a trapezoid that slides down in each pixel. - // the second pixel's contribution to the third pixel will be the - // rectangle 1 wide times the height change in the second pixel, which is dy. - - step = sign * dy * 1; // dy is dy/dx, change in y for every 1 change in x, - // which multiplied by 1-pixel-width is how much pixel area changes for each step in x - // so the area advances by 'step' every time - - for (x = x1+1; x < x2; ++x) { - scanline[x] += area + step/2; // area of trapezoid is 1*step/2 - area += step; - } - STBTT_assert(STBTT_fabs(area) <= 1.01f); // accumulated error from area += step unless we round step down - STBTT_assert(sy1 > y_final-0.01f); - - // area covered in the last pixel is the rectangle from all the pixels to the left, - // plus the trapezoid filled by the line segment in this pixel all the way to the right edge - scanline[x2] += area + sign * stbtt__position_trapezoid_area(sy1-y_final, (float) x2, x2+1.0f, x_bottom, x2+1.0f); - - // the rest of the line is filled based on the total height of the line segment in this pixel - scanline_fill[x2] += sign * (sy1-sy0); - } - } else { - // if edge goes outside of box we're drawing, we require - // clipping logic. since this does not match the intended use - // of this library, we use a different, very slow brute - // force implementation - // note though that this does happen some of the time because - // x_top and x_bottom can be extrapolated at the top & bottom of - // the shape and actually lie outside the bounding box - int x; - for (x=0; x < len; ++x) { - // cases: - // - // there can be up to two intersections with the pixel. any intersection - // with left or right edges can be handled by splitting into two (or three) - // regions. intersections with top & bottom do not necessitate case-wise logic. - // - // the old way of doing this found the intersections with the left & right edges, - // then used some simple logic to produce up to three segments in sorted order - // from top-to-bottom. however, this had a problem: if an x edge was epsilon - // across the x border, then the corresponding y position might not be distinct - // from the other y segment, and it might ignored as an empty segment. to avoid - // that, we need to explicitly produce segments based on x positions. - - // rename variables to clearly-defined pairs - float y0 = y_top; - float x1 = (float) (x); - float x2 = (float) (x+1); - float x3 = xb; - float y3 = y_bottom; - - // x = e->x + e->dx * (y-y_top) - // (y-y_top) = (x - e->x) / e->dx - // y = (x - e->x) / e->dx + y_top - float y1 = (x - x0) / dx + y_top; - float y2 = (x+1 - x0) / dx + y_top; - - if (x0 < x1 && x3 > x2) { // three segments descending down-right - stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); - stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x2,y2); - stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); - } else if (x3 < x1 && x0 > x2) { // three segments descending down-left - stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); - stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x1,y1); - stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); - } else if (x0 < x1 && x3 > x1) { // two segments across x, down-right - stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); - stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); - } else if (x3 < x1 && x0 > x1) { // two segments across x, down-left - stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); - stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); - } else if (x0 < x2 && x3 > x2) { // two segments across x+1, down-right - stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); - stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); - } else if (x3 < x2 && x0 > x2) { // two segments across x+1, down-left - stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); - stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); - } else { // one segment - stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x3,y3); - } - } - } - } - e = e->next; - } -} - -// directly AA rasterize edges w/o supersampling -static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata) -{ - stbtt__hheap hh = { 0, 0, 0 }; - stbtt__active_edge *active = NULL; - int y,j=0, i; - float scanline_data[129], *scanline, *scanline2; - - STBTT__NOTUSED(vsubsample); - - if (result->w > 64) - scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata); - else - scanline = scanline_data; - - scanline2 = scanline + result->w; - - y = off_y; - e[n].y0 = (float) (off_y + result->h) + 1; - - while (j < result->h) { - // find center of pixel for this scanline - float scan_y_top = y + 0.0f; - float scan_y_bottom = y + 1.0f; - stbtt__active_edge **step = &active; - - STBTT_memset(scanline , 0, result->w*sizeof(scanline[0])); - STBTT_memset(scanline2, 0, (result->w+1)*sizeof(scanline[0])); - - // update all active edges; - // remove all active edges that terminate before the top of this scanline - while (*step) { - stbtt__active_edge * z = *step; - if (z->ey <= scan_y_top) { - *step = z->next; // delete from list - STBTT_assert(z->direction); - z->direction = 0; - stbtt__hheap_free(&hh, z); - } else { - step = &((*step)->next); // advance through list - } - } - - // insert all edges that start before the bottom of this scanline - while (e->y0 <= scan_y_bottom) { - if (e->y0 != e->y1) { - stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata); - if (z != NULL) { - if (j == 0 && off_y != 0) { - if (z->ey < scan_y_top) { - // this can happen due to subpixel positioning and some kind of fp rounding error i think - z->ey = scan_y_top; - } - } - STBTT_assert(z->ey >= scan_y_top); // if we get really unlucky a tiny bit of an edge can be out of bounds - // insert at front - z->next = active; - active = z; - } - } - ++e; - } - - // now process all active edges - if (active) - stbtt__fill_active_edges_new(scanline, scanline2+1, result->w, active, scan_y_top); - - { - float sum = 0; - for (i=0; i < result->w; ++i) { - float k; - int m; - sum += scanline2[i]; - k = scanline[i] + sum; - k = (float) STBTT_fabs(k)*255 + 0.5f; - m = (int) k; - if (m > 255) m = 255; - result->pixels[j*result->stride + i] = (unsigned char) m; - } - } - // advance all the edges - step = &active; - while (*step) { - stbtt__active_edge *z = *step; - z->fx += z->fdx; // advance to position for current scanline - step = &((*step)->next); // advance through list - } - - ++y; - ++j; - } - - stbtt__hheap_cleanup(&hh, userdata); - - if (scanline != scanline_data) - STBTT_free(scanline, userdata); -} -#else -#error "Unrecognized value of STBTT_RASTERIZER_VERSION" -#endif - -#define STBTT__COMPARE(a,b) ((a)->y0 < (b)->y0) - -static void stbtt__sort_edges_ins_sort(stbtt__edge *p, int n) -{ - int i,j; - for (i=1; i < n; ++i) { - stbtt__edge t = p[i], *a = &t; - j = i; - while (j > 0) { - stbtt__edge *b = &p[j-1]; - int c = STBTT__COMPARE(a,b); - if (!c) break; - p[j] = p[j-1]; - --j; - } - if (i != j) - p[j] = t; - } -} - -static void stbtt__sort_edges_quicksort(stbtt__edge *p, int n) -{ - /* threshold for transitioning to insertion sort */ - while (n > 12) { - stbtt__edge t; - int c01,c12,c,m,i,j; - - /* compute median of three */ - m = n >> 1; - c01 = STBTT__COMPARE(&p[0],&p[m]); - c12 = STBTT__COMPARE(&p[m],&p[n-1]); - /* if 0 >= mid >= end, or 0 < mid < end, then use mid */ - if (c01 != c12) { - /* otherwise, we'll need to swap something else to middle */ - int z; - c = STBTT__COMPARE(&p[0],&p[n-1]); - /* 0>mid && midn => n; 0 0 */ - /* 0n: 0>n => 0; 0 n */ - z = (c == c12) ? 0 : n-1; - t = p[z]; - p[z] = p[m]; - p[m] = t; - } - /* now p[m] is the median-of-three */ - /* swap it to the beginning so it won't move around */ - t = p[0]; - p[0] = p[m]; - p[m] = t; - - /* partition loop */ - i=1; - j=n-1; - for(;;) { - /* handling of equality is crucial here */ - /* for sentinels & efficiency with duplicates */ - for (;;++i) { - if (!STBTT__COMPARE(&p[i], &p[0])) break; - } - for (;;--j) { - if (!STBTT__COMPARE(&p[0], &p[j])) break; - } - /* make sure we haven't crossed */ - if (i >= j) break; - t = p[i]; - p[i] = p[j]; - p[j] = t; - - ++i; - --j; - } - /* recurse on smaller side, iterate on larger */ - if (j < (n-i)) { - stbtt__sort_edges_quicksort(p,j); - p = p+i; - n = n-i; - } else { - stbtt__sort_edges_quicksort(p+i, n-i); - n = j; - } - } -} - -static void stbtt__sort_edges(stbtt__edge *p, int n) -{ - stbtt__sort_edges_quicksort(p, n); - stbtt__sort_edges_ins_sort(p, n); -} - -typedef struct -{ - float x,y; -} stbtt__point; - -static void stbtt__rasterize(stbtt__bitmap *result, stbtt__point *pts, int *wcount, int windings, float scale_x, float scale_y, float shift_x, float shift_y, int off_x, int off_y, int invert, void *userdata) -{ - float y_scale_inv = invert ? -scale_y : scale_y; - stbtt__edge *e; - int n,i,j,k,m; -#if STBTT_RASTERIZER_VERSION == 1 - int vsubsample = result->h < 8 ? 15 : 5; -#elif STBTT_RASTERIZER_VERSION == 2 - int vsubsample = 1; -#else - #error "Unrecognized value of STBTT_RASTERIZER_VERSION" -#endif - // vsubsample should divide 255 evenly; otherwise we won't reach full opacity - - // now we have to blow out the windings into explicit edge lists - n = 0; - for (i=0; i < windings; ++i) - n += wcount[i]; - - e = (stbtt__edge *) STBTT_malloc(sizeof(*e) * (n+1), userdata); // add an extra one as a sentinel - if (e == 0) return; - n = 0; - - m=0; - for (i=0; i < windings; ++i) { - stbtt__point *p = pts + m; - m += wcount[i]; - j = wcount[i]-1; - for (k=0; k < wcount[i]; j=k++) { - int a=k,b=j; - // skip the edge if horizontal - if (p[j].y == p[k].y) - continue; - // add edge from j to k to the list - e[n].invert = 0; - if (invert ? p[j].y > p[k].y : p[j].y < p[k].y) { - e[n].invert = 1; - a=j,b=k; - } - e[n].x0 = p[a].x * scale_x + shift_x; - e[n].y0 = (p[a].y * y_scale_inv + shift_y) * vsubsample; - e[n].x1 = p[b].x * scale_x + shift_x; - e[n].y1 = (p[b].y * y_scale_inv + shift_y) * vsubsample; - ++n; - } - } - - // now sort the edges by their highest point (should snap to integer, and then by x) - //STBTT_sort(e, n, sizeof(e[0]), stbtt__edge_compare); - stbtt__sort_edges(e, n); - - // now, traverse the scanlines and find the intersections on each scanline, use xor winding rule - stbtt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, off_y, userdata); - - STBTT_free(e, userdata); -} - -static void stbtt__add_point(stbtt__point *points, int n, float x, float y) -{ - if (!points) return; // during first pass, it's unallocated - points[n].x = x; - points[n].y = y; -} - -// tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching -static int stbtt__tesselate_curve(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float objspace_flatness_squared, int n) -{ - // midpoint - float mx = (x0 + 2*x1 + x2)/4; - float my = (y0 + 2*y1 + y2)/4; - // versus directly drawn line - float dx = (x0+x2)/2 - mx; - float dy = (y0+y2)/2 - my; - if (n > 16) // 65536 segments on one curve better be enough! - return 1; - if (dx*dx+dy*dy > objspace_flatness_squared) { // half-pixel error allowed... need to be smaller if AA - stbtt__tesselate_curve(points, num_points, x0,y0, (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1); - stbtt__tesselate_curve(points, num_points, mx,my, (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1); - } else { - stbtt__add_point(points, *num_points,x2,y2); - *num_points = *num_points+1; - } - return 1; -} - -static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n) -{ - // @TODO this "flatness" calculation is just made-up nonsense that seems to work well enough - float dx0 = x1-x0; - float dy0 = y1-y0; - float dx1 = x2-x1; - float dy1 = y2-y1; - float dx2 = x3-x2; - float dy2 = y3-y2; - float dx = x3-x0; - float dy = y3-y0; - float longlen = (float) (STBTT_sqrt(dx0*dx0+dy0*dy0)+STBTT_sqrt(dx1*dx1+dy1*dy1)+STBTT_sqrt(dx2*dx2+dy2*dy2)); - float shortlen = (float) STBTT_sqrt(dx*dx+dy*dy); - float flatness_squared = longlen*longlen-shortlen*shortlen; - - if (n > 16) // 65536 segments on one curve better be enough! - return; - - if (flatness_squared > objspace_flatness_squared) { - float x01 = (x0+x1)/2; - float y01 = (y0+y1)/2; - float x12 = (x1+x2)/2; - float y12 = (y1+y2)/2; - float x23 = (x2+x3)/2; - float y23 = (y2+y3)/2; - - float xa = (x01+x12)/2; - float ya = (y01+y12)/2; - float xb = (x12+x23)/2; - float yb = (y12+y23)/2; - - float mx = (xa+xb)/2; - float my = (ya+yb)/2; - - stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1); - stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1); - } else { - stbtt__add_point(points, *num_points,x3,y3); - *num_points = *num_points+1; - } -} - -// returns number of contours -static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, float objspace_flatness, int **contour_lengths, int *num_contours, void *userdata) -{ - stbtt__point *points=0; - int num_points=0; - - float objspace_flatness_squared = objspace_flatness * objspace_flatness; - int i,n=0,start=0, pass; - - // count how many "moves" there are to get the contour count - for (i=0; i < num_verts; ++i) - if (vertices[i].type == STBTT_vmove) - ++n; - - *num_contours = n; - if (n == 0) return 0; - - *contour_lengths = (int *) STBTT_malloc(sizeof(**contour_lengths) * n, userdata); - - if (*contour_lengths == 0) { - *num_contours = 0; - return 0; - } - - // make two passes through the points so we don't need to realloc - for (pass=0; pass < 2; ++pass) { - float x=0,y=0; - if (pass == 1) { - points = (stbtt__point *) STBTT_malloc(num_points * sizeof(points[0]), userdata); - if (points == NULL) goto error; - } - num_points = 0; - n= -1; - for (i=0; i < num_verts; ++i) { - switch (vertices[i].type) { - case STBTT_vmove: - // start the next contour - if (n >= 0) - (*contour_lengths)[n] = num_points - start; - ++n; - start = num_points; - - x = vertices[i].x, y = vertices[i].y; - stbtt__add_point(points, num_points++, x,y); - break; - case STBTT_vline: - x = vertices[i].x, y = vertices[i].y; - stbtt__add_point(points, num_points++, x, y); - break; - case STBTT_vcurve: - stbtt__tesselate_curve(points, &num_points, x,y, - vertices[i].cx, vertices[i].cy, - vertices[i].x, vertices[i].y, - objspace_flatness_squared, 0); - x = vertices[i].x, y = vertices[i].y; - break; - case STBTT_vcubic: - stbtt__tesselate_cubic(points, &num_points, x,y, - vertices[i].cx, vertices[i].cy, - vertices[i].cx1, vertices[i].cy1, - vertices[i].x, vertices[i].y, - objspace_flatness_squared, 0); - x = vertices[i].x, y = vertices[i].y; - break; - } - } - (*contour_lengths)[n] = num_points - start; - } - - return points; -error: - STBTT_free(points, userdata); - STBTT_free(*contour_lengths, userdata); - *contour_lengths = 0; - *num_contours = 0; - return NULL; -} - -STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, float flatness_in_pixels, stbtt_vertex *vertices, int num_verts, float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, int invert, void *userdata) -{ - float scale = scale_x > scale_y ? scale_y : scale_x; - int winding_count = 0; - int *winding_lengths = NULL; - stbtt__point *windings = stbtt_FlattenCurves(vertices, num_verts, flatness_in_pixels / scale, &winding_lengths, &winding_count, userdata); - if (windings) { - stbtt__rasterize(result, windings, winding_lengths, winding_count, scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert, userdata); - STBTT_free(winding_lengths, userdata); - STBTT_free(windings, userdata); - } -} - -STBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata) -{ - STBTT_free(bitmap, userdata); -} - -STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff) -{ - int ix0,iy0,ix1,iy1; - stbtt__bitmap gbm; - stbtt_vertex *vertices; - int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices); - - if (scale_x == 0) scale_x = scale_y; - if (scale_y == 0) { - if (scale_x == 0) { - STBTT_free(vertices, info->userdata); - return NULL; - } - scale_y = scale_x; - } - - stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,&ix1,&iy1); - - // now we get the size - gbm.w = (ix1 - ix0); - gbm.h = (iy1 - iy0); - gbm.pixels = NULL; // in case we error - - if (width ) *width = gbm.w; - if (height) *height = gbm.h; - if (xoff ) *xoff = ix0; - if (yoff ) *yoff = iy0; - - if (gbm.w && gbm.h) { - gbm.pixels = (unsigned char *) STBTT_malloc(gbm.w * gbm.h, info->userdata); - if (gbm.pixels) { - gbm.stride = gbm.w; - - stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0, iy0, 1, info->userdata); - } - } - STBTT_free(vertices, info->userdata); - return gbm.pixels; -} - -STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff) -{ - return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y, 0.0f, 0.0f, glyph, width, height, xoff, yoff); -} - -STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph) -{ - int ix0,iy0; - stbtt_vertex *vertices; - int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices); - stbtt__bitmap gbm; - - stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0); - gbm.pixels = output; - gbm.w = out_w; - gbm.h = out_h; - gbm.stride = out_stride; - - if (gbm.w && gbm.h) - stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0,iy0, 1, info->userdata); - - STBTT_free(vertices, info->userdata); -} - -STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph) -{ - stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f,0.0f, glyph); -} - -STBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff) -{ - return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y,shift_x,shift_y, stbtt_FindGlyphIndex(info,codepoint), width,height,xoff,yoff); -} - -STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint) -{ - stbtt_MakeGlyphBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, sub_x, sub_y, stbtt_FindGlyphIndex(info,codepoint)); -} - -STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint) -{ - stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, stbtt_FindGlyphIndex(info,codepoint)); -} - -STBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff) -{ - return stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, 0.0f,0.0f, codepoint, width,height,xoff,yoff); -} - -STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint) -{ - stbtt_MakeCodepointBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f,0.0f, codepoint); -} - -////////////////////////////////////////////////////////////////////////////// -// -// bitmap baking -// -// This is SUPER-CRAPPY packing to keep source code small - -static int stbtt_BakeFontBitmap_internal(unsigned char *data, int offset, // font location (use offset=0 for plain .ttf) - float pixel_height, // height of font in pixels - unsigned char *pixels, int pw, int ph, // bitmap to be filled in - int first_char, int num_chars, // characters to bake - stbtt_bakedchar *chardata) -{ - float scale; - int x,y,bottom_y, i; - stbtt_fontinfo f; - f.userdata = NULL; - if (!stbtt_InitFont(&f, data, offset)) - return -1; - STBTT_memset(pixels, 0, pw*ph); // background of 0 around pixels - x=y=1; - bottom_y = 1; - - scale = stbtt_ScaleForPixelHeight(&f, pixel_height); - - for (i=0; i < num_chars; ++i) { - int advance, lsb, x0,y0,x1,y1,gw,gh; - int g = stbtt_FindGlyphIndex(&f, first_char + i); - stbtt_GetGlyphHMetrics(&f, g, &advance, &lsb); - stbtt_GetGlyphBitmapBox(&f, g, scale,scale, &x0,&y0,&x1,&y1); - gw = x1-x0; - gh = y1-y0; - if (x + gw + 1 >= pw) - y = bottom_y, x = 1; // advance to next row - if (y + gh + 1 >= ph) // check if it fits vertically AFTER potentially moving to next row - return -i; - STBTT_assert(x+gw < pw); - STBTT_assert(y+gh < ph); - stbtt_MakeGlyphBitmap(&f, pixels+x+y*pw, gw,gh,pw, scale,scale, g); - chardata[i].x0 = (stbtt_int16) x; - chardata[i].y0 = (stbtt_int16) y; - chardata[i].x1 = (stbtt_int16) (x + gw); - chardata[i].y1 = (stbtt_int16) (y + gh); - chardata[i].xadvance = scale * advance; - chardata[i].xoff = (float) x0; - chardata[i].yoff = (float) y0; - x = x + gw + 1; - if (y+gh+1 > bottom_y) - bottom_y = y+gh+1; - } - return bottom_y; -} - -STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule) -{ - float d3d_bias = opengl_fillrule ? 0 : -0.5f; - float ipw = 1.0f / pw, iph = 1.0f / ph; - const stbtt_bakedchar *b = chardata + char_index; - int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5f); - int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5f); - - q->x0 = round_x + d3d_bias; - q->y0 = round_y + d3d_bias; - q->x1 = round_x + b->x1 - b->x0 + d3d_bias; - q->y1 = round_y + b->y1 - b->y0 + d3d_bias; - - q->s0 = b->x0 * ipw; - q->t0 = b->y0 * iph; - q->s1 = b->x1 * ipw; - q->t1 = b->y1 * iph; - - *xpos += b->xadvance; -} - -////////////////////////////////////////////////////////////////////////////// -// -// rectangle packing replacement routines if you don't have stb_rect_pack.h -// - -#ifndef STB_RECT_PACK_VERSION - -typedef int stbrp_coord; - -//////////////////////////////////////////////////////////////////////////////////// -// // -// // -// COMPILER WARNING ?!?!? // -// // -// // -// if you get a compile warning due to these symbols being defined more than // -// once, move #include "stb_rect_pack.h" before #include "stb_truetype.h" // -// // -//////////////////////////////////////////////////////////////////////////////////// - -typedef struct -{ - int width,height; - int x,y,bottom_y; -} stbrp_context; - -typedef struct -{ - unsigned char x; -} stbrp_node; - -struct stbrp_rect -{ - stbrp_coord x,y; - int id,w,h,was_packed; -}; - -static void stbrp_init_target(stbrp_context *con, int pw, int ph, stbrp_node *nodes, int num_nodes) -{ - con->width = pw; - con->height = ph; - con->x = 0; - con->y = 0; - con->bottom_y = 0; - STBTT__NOTUSED(nodes); - STBTT__NOTUSED(num_nodes); -} - -static void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int num_rects) -{ - int i; - for (i=0; i < num_rects; ++i) { - if (con->x + rects[i].w > con->width) { - con->x = 0; - con->y = con->bottom_y; - } - if (con->y + rects[i].h > con->height) - break; - rects[i].x = con->x; - rects[i].y = con->y; - rects[i].was_packed = 1; - con->x += rects[i].w; - if (con->y + rects[i].h > con->bottom_y) - con->bottom_y = con->y + rects[i].h; - } - for ( ; i < num_rects; ++i) - rects[i].was_packed = 0; -} -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// bitmap baking -// -// This is SUPER-AWESOME (tm Ryan Gordon) packing using stb_rect_pack.h. If -// stb_rect_pack.h isn't available, it uses the BakeFontBitmap strategy. - -STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int pw, int ph, int stride_in_bytes, int padding, void *alloc_context) -{ - stbrp_context *context = (stbrp_context *) STBTT_malloc(sizeof(*context) ,alloc_context); - int num_nodes = pw - padding; - stbrp_node *nodes = (stbrp_node *) STBTT_malloc(sizeof(*nodes ) * num_nodes,alloc_context); - - if (context == NULL || nodes == NULL) { - if (context != NULL) STBTT_free(context, alloc_context); - if (nodes != NULL) STBTT_free(nodes , alloc_context); - return 0; - } - - spc->user_allocator_context = alloc_context; - spc->width = pw; - spc->height = ph; - spc->pixels = pixels; - spc->pack_info = context; - spc->nodes = nodes; - spc->padding = padding; - spc->stride_in_bytes = stride_in_bytes != 0 ? stride_in_bytes : pw; - spc->h_oversample = 1; - spc->v_oversample = 1; - spc->skip_missing = 0; - - stbrp_init_target(context, pw-padding, ph-padding, nodes, num_nodes); - - if (pixels) - STBTT_memset(pixels, 0, pw*ph); // background of 0 around pixels - - return 1; -} - -STBTT_DEF void stbtt_PackEnd (stbtt_pack_context *spc) -{ - STBTT_free(spc->nodes , spc->user_allocator_context); - STBTT_free(spc->pack_info, spc->user_allocator_context); -} - -STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample) -{ - STBTT_assert(h_oversample <= STBTT_MAX_OVERSAMPLE); - STBTT_assert(v_oversample <= STBTT_MAX_OVERSAMPLE); - if (h_oversample <= STBTT_MAX_OVERSAMPLE) - spc->h_oversample = h_oversample; - if (v_oversample <= STBTT_MAX_OVERSAMPLE) - spc->v_oversample = v_oversample; -} - -STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip) -{ - spc->skip_missing = skip; -} - -#define STBTT__OVER_MASK (STBTT_MAX_OVERSAMPLE-1) - -static void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width) -{ - unsigned char buffer[STBTT_MAX_OVERSAMPLE]; - int safe_w = w - kernel_width; - int j; - STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze - for (j=0; j < h; ++j) { - int i; - unsigned int total; - STBTT_memset(buffer, 0, kernel_width); - - total = 0; - - // make kernel_width a constant in common cases so compiler can optimize out the divide - switch (kernel_width) { - case 2: - for (i=0; i <= safe_w; ++i) { - total += pixels[i] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; - pixels[i] = (unsigned char) (total / 2); - } - break; - case 3: - for (i=0; i <= safe_w; ++i) { - total += pixels[i] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; - pixels[i] = (unsigned char) (total / 3); - } - break; - case 4: - for (i=0; i <= safe_w; ++i) { - total += pixels[i] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; - pixels[i] = (unsigned char) (total / 4); - } - break; - case 5: - for (i=0; i <= safe_w; ++i) { - total += pixels[i] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; - pixels[i] = (unsigned char) (total / 5); - } - break; - default: - for (i=0; i <= safe_w; ++i) { - total += pixels[i] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; - pixels[i] = (unsigned char) (total / kernel_width); - } - break; - } - - for (; i < w; ++i) { - STBTT_assert(pixels[i] == 0); - total -= buffer[i & STBTT__OVER_MASK]; - pixels[i] = (unsigned char) (total / kernel_width); - } - - pixels += stride_in_bytes; - } -} - -static void stbtt__v_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width) -{ - unsigned char buffer[STBTT_MAX_OVERSAMPLE]; - int safe_h = h - kernel_width; - int j; - STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze - for (j=0; j < w; ++j) { - int i; - unsigned int total; - STBTT_memset(buffer, 0, kernel_width); - - total = 0; - - // make kernel_width a constant in common cases so compiler can optimize out the divide - switch (kernel_width) { - case 2: - for (i=0; i <= safe_h; ++i) { - total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; - pixels[i*stride_in_bytes] = (unsigned char) (total / 2); - } - break; - case 3: - for (i=0; i <= safe_h; ++i) { - total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; - pixels[i*stride_in_bytes] = (unsigned char) (total / 3); - } - break; - case 4: - for (i=0; i <= safe_h; ++i) { - total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; - pixels[i*stride_in_bytes] = (unsigned char) (total / 4); - } - break; - case 5: - for (i=0; i <= safe_h; ++i) { - total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; - pixels[i*stride_in_bytes] = (unsigned char) (total / 5); - } - break; - default: - for (i=0; i <= safe_h; ++i) { - total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; - buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; - pixels[i*stride_in_bytes] = (unsigned char) (total / kernel_width); - } - break; - } - - for (; i < h; ++i) { - STBTT_assert(pixels[i*stride_in_bytes] == 0); - total -= buffer[i & STBTT__OVER_MASK]; - pixels[i*stride_in_bytes] = (unsigned char) (total / kernel_width); - } - - pixels += 1; - } -} - -static float stbtt__oversample_shift(int oversample) -{ - if (!oversample) - return 0.0f; - - // The prefilter is a box filter of width "oversample", - // which shifts phase by (oversample - 1)/2 pixels in - // oversampled space. We want to shift in the opposite - // direction to counter this. - return (float)-(oversample - 1) / (2.0f * (float)oversample); -} - -// rects array must be big enough to accommodate all characters in the given ranges -STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) -{ - int i,j,k; - int missing_glyph_added = 0; - - k=0; - for (i=0; i < num_ranges; ++i) { - float fh = ranges[i].font_size; - float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh); - ranges[i].h_oversample = (unsigned char) spc->h_oversample; - ranges[i].v_oversample = (unsigned char) spc->v_oversample; - for (j=0; j < ranges[i].num_chars; ++j) { - int x0,y0,x1,y1; - int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j]; - int glyph = stbtt_FindGlyphIndex(info, codepoint); - if (glyph == 0 && (spc->skip_missing || missing_glyph_added)) { - rects[k].w = rects[k].h = 0; - } else { - stbtt_GetGlyphBitmapBoxSubpixel(info,glyph, - scale * spc->h_oversample, - scale * spc->v_oversample, - 0,0, - &x0,&y0,&x1,&y1); - rects[k].w = (stbrp_coord) (x1-x0 + spc->padding + spc->h_oversample-1); - rects[k].h = (stbrp_coord) (y1-y0 + spc->padding + spc->v_oversample-1); - if (glyph == 0) - missing_glyph_added = 1; - } - ++k; - } - } - - return k; -} - -STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int prefilter_x, int prefilter_y, float *sub_x, float *sub_y, int glyph) -{ - stbtt_MakeGlyphBitmapSubpixel(info, - output, - out_w - (prefilter_x - 1), - out_h - (prefilter_y - 1), - out_stride, - scale_x, - scale_y, - shift_x, - shift_y, - glyph); - - if (prefilter_x > 1) - stbtt__h_prefilter(output, out_w, out_h, out_stride, prefilter_x); - - if (prefilter_y > 1) - stbtt__v_prefilter(output, out_w, out_h, out_stride, prefilter_y); - - *sub_x = stbtt__oversample_shift(prefilter_x); - *sub_y = stbtt__oversample_shift(prefilter_y); -} - -// rects array must be big enough to accommodate all characters in the given ranges -STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) -{ - int i,j,k, missing_glyph = -1, return_value = 1; - - // save current values - int old_h_over = spc->h_oversample; - int old_v_over = spc->v_oversample; - - k = 0; - for (i=0; i < num_ranges; ++i) { - float fh = ranges[i].font_size; - float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh); - float recip_h,recip_v,sub_x,sub_y; - spc->h_oversample = ranges[i].h_oversample; - spc->v_oversample = ranges[i].v_oversample; - recip_h = 1.0f / spc->h_oversample; - recip_v = 1.0f / spc->v_oversample; - sub_x = stbtt__oversample_shift(spc->h_oversample); - sub_y = stbtt__oversample_shift(spc->v_oversample); - for (j=0; j < ranges[i].num_chars; ++j) { - stbrp_rect *r = &rects[k]; - if (r->was_packed && r->w != 0 && r->h != 0) { - stbtt_packedchar *bc = &ranges[i].chardata_for_range[j]; - int advance, lsb, x0,y0,x1,y1; - int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j]; - int glyph = stbtt_FindGlyphIndex(info, codepoint); - stbrp_coord pad = (stbrp_coord) spc->padding; - - // pad on left and top - r->x += pad; - r->y += pad; - r->w -= pad; - r->h -= pad; - stbtt_GetGlyphHMetrics(info, glyph, &advance, &lsb); - stbtt_GetGlyphBitmapBox(info, glyph, - scale * spc->h_oversample, - scale * spc->v_oversample, - &x0,&y0,&x1,&y1); - stbtt_MakeGlyphBitmapSubpixel(info, - spc->pixels + r->x + r->y*spc->stride_in_bytes, - r->w - spc->h_oversample+1, - r->h - spc->v_oversample+1, - spc->stride_in_bytes, - scale * spc->h_oversample, - scale * spc->v_oversample, - 0,0, - glyph); - - if (spc->h_oversample > 1) - stbtt__h_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes, - r->w, r->h, spc->stride_in_bytes, - spc->h_oversample); - - if (spc->v_oversample > 1) - stbtt__v_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes, - r->w, r->h, spc->stride_in_bytes, - spc->v_oversample); - - bc->x0 = (stbtt_int16) r->x; - bc->y0 = (stbtt_int16) r->y; - bc->x1 = (stbtt_int16) (r->x + r->w); - bc->y1 = (stbtt_int16) (r->y + r->h); - bc->xadvance = scale * advance; - bc->xoff = (float) x0 * recip_h + sub_x; - bc->yoff = (float) y0 * recip_v + sub_y; - bc->xoff2 = (x0 + r->w) * recip_h + sub_x; - bc->yoff2 = (y0 + r->h) * recip_v + sub_y; - - if (glyph == 0) - missing_glyph = j; - } else if (spc->skip_missing) { - return_value = 0; - } else if (r->was_packed && r->w == 0 && r->h == 0 && missing_glyph >= 0) { - ranges[i].chardata_for_range[j] = ranges[i].chardata_for_range[missing_glyph]; - } else { - return_value = 0; // if any fail, report failure - } - - ++k; - } - } - - // restore original values - spc->h_oversample = old_h_over; - spc->v_oversample = old_v_over; - - return return_value; -} - -STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects) -{ - stbrp_pack_rects((stbrp_context *) spc->pack_info, rects, num_rects); -} - -STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges) -{ - stbtt_fontinfo info; - int i,j,n, return_value = 1; - //stbrp_context *context = (stbrp_context *) spc->pack_info; - stbrp_rect *rects; - - // flag all characters as NOT packed - for (i=0; i < num_ranges; ++i) - for (j=0; j < ranges[i].num_chars; ++j) - ranges[i].chardata_for_range[j].x0 = - ranges[i].chardata_for_range[j].y0 = - ranges[i].chardata_for_range[j].x1 = - ranges[i].chardata_for_range[j].y1 = 0; - - n = 0; - for (i=0; i < num_ranges; ++i) - n += ranges[i].num_chars; - - rects = (stbrp_rect *) STBTT_malloc(sizeof(*rects) * n, spc->user_allocator_context); - if (rects == NULL) - return 0; - - info.userdata = spc->user_allocator_context; - stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata,font_index)); - - n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects); - - stbtt_PackFontRangesPackRects(spc, rects, n); - - return_value = stbtt_PackFontRangesRenderIntoRects(spc, &info, ranges, num_ranges, rects); - - STBTT_free(rects, spc->user_allocator_context); - return return_value; -} - -STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size, - int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range) -{ - stbtt_pack_range range; - range.first_unicode_codepoint_in_range = first_unicode_codepoint_in_range; - range.array_of_unicode_codepoints = NULL; - range.num_chars = num_chars_in_range; - range.chardata_for_range = chardata_for_range; - range.font_size = font_size; - return stbtt_PackFontRanges(spc, fontdata, font_index, &range, 1); -} - -STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap) -{ - int i_ascent, i_descent, i_lineGap; - float scale; - stbtt_fontinfo info; - stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata, index)); - scale = size > 0 ? stbtt_ScaleForPixelHeight(&info, size) : stbtt_ScaleForMappingEmToPixels(&info, -size); - stbtt_GetFontVMetrics(&info, &i_ascent, &i_descent, &i_lineGap); - *ascent = (float) i_ascent * scale; - *descent = (float) i_descent * scale; - *lineGap = (float) i_lineGap * scale; -} - -STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer) -{ - float ipw = 1.0f / pw, iph = 1.0f / ph; - const stbtt_packedchar *b = chardata + char_index; - - if (align_to_integer) { - float x = (float) STBTT_ifloor((*xpos + b->xoff) + 0.5f); - float y = (float) STBTT_ifloor((*ypos + b->yoff) + 0.5f); - q->x0 = x; - q->y0 = y; - q->x1 = x + b->xoff2 - b->xoff; - q->y1 = y + b->yoff2 - b->yoff; - } else { - q->x0 = *xpos + b->xoff; - q->y0 = *ypos + b->yoff; - q->x1 = *xpos + b->xoff2; - q->y1 = *ypos + b->yoff2; - } - - q->s0 = b->x0 * ipw; - q->t0 = b->y0 * iph; - q->s1 = b->x1 * ipw; - q->t1 = b->y1 * iph; - - *xpos += b->xadvance; -} - -////////////////////////////////////////////////////////////////////////////// -// -// sdf computation -// - -#define STBTT_min(a,b) ((a) < (b) ? (a) : (b)) -#define STBTT_max(a,b) ((a) < (b) ? (b) : (a)) - -static int stbtt__ray_intersect_bezier(float orig[2], float ray[2], float q0[2], float q1[2], float q2[2], float hits[2][2]) -{ - float q0perp = q0[1]*ray[0] - q0[0]*ray[1]; - float q1perp = q1[1]*ray[0] - q1[0]*ray[1]; - float q2perp = q2[1]*ray[0] - q2[0]*ray[1]; - float roperp = orig[1]*ray[0] - orig[0]*ray[1]; - - float a = q0perp - 2*q1perp + q2perp; - float b = q1perp - q0perp; - float c = q0perp - roperp; - - float s0 = 0., s1 = 0.; - int num_s = 0; - - if (a != 0.0) { - float discr = b*b - a*c; - if (discr > 0.0) { - float rcpna = -1 / a; - float d = (float) STBTT_sqrt(discr); - s0 = (b+d) * rcpna; - s1 = (b-d) * rcpna; - if (s0 >= 0.0 && s0 <= 1.0) - num_s = 1; - if (d > 0.0 && s1 >= 0.0 && s1 <= 1.0) { - if (num_s == 0) s0 = s1; - ++num_s; - } - } - } else { - // 2*b*s + c = 0 - // s = -c / (2*b) - s0 = c / (-2 * b); - if (s0 >= 0.0 && s0 <= 1.0) - num_s = 1; - } - - if (num_s == 0) - return 0; - else { - float rcp_len2 = 1 / (ray[0]*ray[0] + ray[1]*ray[1]); - float rayn_x = ray[0] * rcp_len2, rayn_y = ray[1] * rcp_len2; - - float q0d = q0[0]*rayn_x + q0[1]*rayn_y; - float q1d = q1[0]*rayn_x + q1[1]*rayn_y; - float q2d = q2[0]*rayn_x + q2[1]*rayn_y; - float rod = orig[0]*rayn_x + orig[1]*rayn_y; - - float q10d = q1d - q0d; - float q20d = q2d - q0d; - float q0rd = q0d - rod; - - hits[0][0] = q0rd + s0*(2.0f - 2.0f*s0)*q10d + s0*s0*q20d; - hits[0][1] = a*s0+b; - - if (num_s > 1) { - hits[1][0] = q0rd + s1*(2.0f - 2.0f*s1)*q10d + s1*s1*q20d; - hits[1][1] = a*s1+b; - return 2; - } else { - return 1; - } - } -} - -static int equal(float *a, float *b) -{ - return (a[0] == b[0] && a[1] == b[1]); -} - -static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex *verts) -{ - int i; - float orig[2], ray[2] = { 1, 0 }; - float y_frac; - int winding = 0; - - // make sure y never passes through a vertex of the shape - y_frac = (float) STBTT_fmod(y, 1.0f); - if (y_frac < 0.01f) - y += 0.01f; - else if (y_frac > 0.99f) - y -= 0.01f; - - orig[0] = x; - orig[1] = y; - - // test a ray from (-infinity,y) to (x,y) - for (i=0; i < nverts; ++i) { - if (verts[i].type == STBTT_vline) { - int x0 = (int) verts[i-1].x, y0 = (int) verts[i-1].y; - int x1 = (int) verts[i ].x, y1 = (int) verts[i ].y; - if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) { - float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0; - if (x_inter < x) - winding += (y0 < y1) ? 1 : -1; - } - } - if (verts[i].type == STBTT_vcurve) { - int x0 = (int) verts[i-1].x , y0 = (int) verts[i-1].y ; - int x1 = (int) verts[i ].cx, y1 = (int) verts[i ].cy; - int x2 = (int) verts[i ].x , y2 = (int) verts[i ].y ; - int ax = STBTT_min(x0,STBTT_min(x1,x2)), ay = STBTT_min(y0,STBTT_min(y1,y2)); - int by = STBTT_max(y0,STBTT_max(y1,y2)); - if (y > ay && y < by && x > ax) { - float q0[2],q1[2],q2[2]; - float hits[2][2]; - q0[0] = (float)x0; - q0[1] = (float)y0; - q1[0] = (float)x1; - q1[1] = (float)y1; - q2[0] = (float)x2; - q2[1] = (float)y2; - if (equal(q0,q1) || equal(q1,q2)) { - x0 = (int)verts[i-1].x; - y0 = (int)verts[i-1].y; - x1 = (int)verts[i ].x; - y1 = (int)verts[i ].y; - if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) { - float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0; - if (x_inter < x) - winding += (y0 < y1) ? 1 : -1; - } - } else { - int num_hits = stbtt__ray_intersect_bezier(orig, ray, q0, q1, q2, hits); - if (num_hits >= 1) - if (hits[0][0] < 0) - winding += (hits[0][1] < 0 ? -1 : 1); - if (num_hits >= 2) - if (hits[1][0] < 0) - winding += (hits[1][1] < 0 ? -1 : 1); - } - } - } - } - return winding; -} - -static float stbtt__cuberoot( float x ) -{ - if (x<0) - return -(float) STBTT_pow(-x,1.0f/3.0f); - else - return (float) STBTT_pow( x,1.0f/3.0f); -} - -// x^3 + a*x^2 + b*x + c = 0 -static int stbtt__solve_cubic(float a, float b, float c, float* r) -{ - float s = -a / 3; - float p = b - a*a / 3; - float q = a * (2*a*a - 9*b) / 27 + c; - float p3 = p*p*p; - float d = q*q + 4*p3 / 27; - if (d >= 0) { - float z = (float) STBTT_sqrt(d); - float u = (-q + z) / 2; - float v = (-q - z) / 2; - u = stbtt__cuberoot(u); - v = stbtt__cuberoot(v); - r[0] = s + u + v; - return 1; - } else { - float u = (float) STBTT_sqrt(-p/3); - float v = (float) STBTT_acos(-STBTT_sqrt(-27/p3) * q / 2) / 3; // p3 must be negative, since d is negative - float m = (float) STBTT_cos(v); - float n = (float) STBTT_cos(v-3.141592/2)*1.732050808f; - r[0] = s + u * 2 * m; - r[1] = s - u * (m + n); - r[2] = s - u * (m - n); - - //STBTT_assert( STBTT_fabs(((r[0]+a)*r[0]+b)*r[0]+c) < 0.05f); // these asserts may not be safe at all scales, though they're in bezier t parameter units so maybe? - //STBTT_assert( STBTT_fabs(((r[1]+a)*r[1]+b)*r[1]+c) < 0.05f); - //STBTT_assert( STBTT_fabs(((r[2]+a)*r[2]+b)*r[2]+c) < 0.05f); - return 3; - } -} - -STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff) -{ - float scale_x = scale, scale_y = scale; - int ix0,iy0,ix1,iy1; - int w,h; - unsigned char *data; - - if (scale == 0) return NULL; - - stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale, scale, 0.0f,0.0f, &ix0,&iy0,&ix1,&iy1); - - // if empty, return NULL - if (ix0 == ix1 || iy0 == iy1) - return NULL; - - ix0 -= padding; - iy0 -= padding; - ix1 += padding; - iy1 += padding; - - w = (ix1 - ix0); - h = (iy1 - iy0); - - if (width ) *width = w; - if (height) *height = h; - if (xoff ) *xoff = ix0; - if (yoff ) *yoff = iy0; - - // invert for y-downwards bitmaps - scale_y = -scale_y; - - { - int x,y,i,j; - float *precompute; - stbtt_vertex *verts; - int num_verts = stbtt_GetGlyphShape(info, glyph, &verts); - data = (unsigned char *) STBTT_malloc(w * h, info->userdata); - precompute = (float *) STBTT_malloc(num_verts * sizeof(float), info->userdata); - - for (i=0,j=num_verts-1; i < num_verts; j=i++) { - if (verts[i].type == STBTT_vline) { - float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y; - float x1 = verts[j].x*scale_x, y1 = verts[j].y*scale_y; - float dist = (float) STBTT_sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0)); - precompute[i] = (dist == 0) ? 0.0f : 1.0f / dist; - } else if (verts[i].type == STBTT_vcurve) { - float x2 = verts[j].x *scale_x, y2 = verts[j].y *scale_y; - float x1 = verts[i].cx*scale_x, y1 = verts[i].cy*scale_y; - float x0 = verts[i].x *scale_x, y0 = verts[i].y *scale_y; - float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2; - float len2 = bx*bx + by*by; - if (len2 != 0.0f) - precompute[i] = 1.0f / (bx*bx + by*by); - else - precompute[i] = 0.0f; - } else - precompute[i] = 0.0f; - } - - for (y=iy0; y < iy1; ++y) { - for (x=ix0; x < ix1; ++x) { - float val; - float min_dist = 999999.0f; - float sx = (float) x + 0.5f; - float sy = (float) y + 0.5f; - float x_gspace = (sx / scale_x); - float y_gspace = (sy / scale_y); - - int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts, verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tesselated curves so a new path - - for (i=0; i < num_verts; ++i) { - float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y; - - if (verts[i].type == STBTT_vline && precompute[i] != 0.0f) { - float x1 = verts[i-1].x*scale_x, y1 = verts[i-1].y*scale_y; - - float dist,dist2 = (x0-sx)*(x0-sx) + (y0-sy)*(y0-sy); - if (dist2 < min_dist*min_dist) - min_dist = (float) STBTT_sqrt(dist2); - - // coarse culling against bbox - //if (sx > STBTT_min(x0,x1)-min_dist && sx < STBTT_max(x0,x1)+min_dist && - // sy > STBTT_min(y0,y1)-min_dist && sy < STBTT_max(y0,y1)+min_dist) - dist = (float) STBTT_fabs((x1-x0)*(y0-sy) - (y1-y0)*(x0-sx)) * precompute[i]; - STBTT_assert(i != 0); - if (dist < min_dist) { - // check position along line - // x' = x0 + t*(x1-x0), y' = y0 + t*(y1-y0) - // minimize (x'-sx)*(x'-sx)+(y'-sy)*(y'-sy) - float dx = x1-x0, dy = y1-y0; - float px = x0-sx, py = y0-sy; - // minimize (px+t*dx)^2 + (py+t*dy)^2 = px*px + 2*px*dx*t + t^2*dx*dx + py*py + 2*py*dy*t + t^2*dy*dy - // derivative: 2*px*dx + 2*py*dy + (2*dx*dx+2*dy*dy)*t, set to 0 and solve - float t = -(px*dx + py*dy) / (dx*dx + dy*dy); - if (t >= 0.0f && t <= 1.0f) - min_dist = dist; - } - } else if (verts[i].type == STBTT_vcurve) { - float x2 = verts[i-1].x *scale_x, y2 = verts[i-1].y *scale_y; - float x1 = verts[i ].cx*scale_x, y1 = verts[i ].cy*scale_y; - float box_x0 = STBTT_min(STBTT_min(x0,x1),x2); - float box_y0 = STBTT_min(STBTT_min(y0,y1),y2); - float box_x1 = STBTT_max(STBTT_max(x0,x1),x2); - float box_y1 = STBTT_max(STBTT_max(y0,y1),y2); - // coarse culling against bbox to avoid computing cubic unnecessarily - if (sx > box_x0-min_dist && sx < box_x1+min_dist && sy > box_y0-min_dist && sy < box_y1+min_dist) { - int num=0; - float ax = x1-x0, ay = y1-y0; - float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2; - float mx = x0 - sx, my = y0 - sy; - float res[3] = {0.f,0.f,0.f}; - float px,py,t,it,dist2; - float a_inv = precompute[i]; - if (a_inv == 0.0) { // if a_inv is 0, it's 2nd degree so use quadratic formula - float a = 3*(ax*bx + ay*by); - float b = 2*(ax*ax + ay*ay) + (mx*bx+my*by); - float c = mx*ax+my*ay; - if (a == 0.0) { // if a is 0, it's linear - if (b != 0.0) { - res[num++] = -c/b; - } - } else { - float discriminant = b*b - 4*a*c; - if (discriminant < 0) - num = 0; - else { - float root = (float) STBTT_sqrt(discriminant); - res[0] = (-b - root)/(2*a); - res[1] = (-b + root)/(2*a); - num = 2; // don't bother distinguishing 1-solution case, as code below will still work - } - } - } else { - float b = 3*(ax*bx + ay*by) * a_inv; // could precompute this as it doesn't depend on sample point - float c = (2*(ax*ax + ay*ay) + (mx*bx+my*by)) * a_inv; - float d = (mx*ax+my*ay) * a_inv; - num = stbtt__solve_cubic(b, c, d, res); - } - dist2 = (x0-sx)*(x0-sx) + (y0-sy)*(y0-sy); - if (dist2 < min_dist*min_dist) - min_dist = (float) STBTT_sqrt(dist2); - - if (num >= 1 && res[0] >= 0.0f && res[0] <= 1.0f) { - t = res[0], it = 1.0f - t; - px = it*it*x0 + 2*t*it*x1 + t*t*x2; - py = it*it*y0 + 2*t*it*y1 + t*t*y2; - dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy); - if (dist2 < min_dist * min_dist) - min_dist = (float) STBTT_sqrt(dist2); - } - if (num >= 2 && res[1] >= 0.0f && res[1] <= 1.0f) { - t = res[1], it = 1.0f - t; - px = it*it*x0 + 2*t*it*x1 + t*t*x2; - py = it*it*y0 + 2*t*it*y1 + t*t*y2; - dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy); - if (dist2 < min_dist * min_dist) - min_dist = (float) STBTT_sqrt(dist2); - } - if (num >= 3 && res[2] >= 0.0f && res[2] <= 1.0f) { - t = res[2], it = 1.0f - t; - px = it*it*x0 + 2*t*it*x1 + t*t*x2; - py = it*it*y0 + 2*t*it*y1 + t*t*y2; - dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy); - if (dist2 < min_dist * min_dist) - min_dist = (float) STBTT_sqrt(dist2); - } - } - } - } - if (winding == 0) - min_dist = -min_dist; // if outside the shape, value is negative - val = onedge_value + pixel_dist_scale * min_dist; - if (val < 0) - val = 0; - else if (val > 255) - val = 255; - data[(y-iy0)*w+(x-ix0)] = (unsigned char) val; - } - } - STBTT_free(precompute, info->userdata); - STBTT_free(verts, info->userdata); - } - return data; -} - -STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff) -{ - return stbtt_GetGlyphSDF(info, scale, stbtt_FindGlyphIndex(info, codepoint), padding, onedge_value, pixel_dist_scale, width, height, xoff, yoff); -} - -STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata) -{ - STBTT_free(bitmap, userdata); -} - -////////////////////////////////////////////////////////////////////////////// -// -// font name matching -- recommended not to use this -// - -// check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string -static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, stbtt_int32 len1, stbtt_uint8 *s2, stbtt_int32 len2) -{ - stbtt_int32 i=0; - - // convert utf16 to utf8 and compare the results while converting - while (len2) { - stbtt_uint16 ch = s2[0]*256 + s2[1]; - if (ch < 0x80) { - if (i >= len1) return -1; - if (s1[i++] != ch) return -1; - } else if (ch < 0x800) { - if (i+1 >= len1) return -1; - if (s1[i++] != 0xc0 + (ch >> 6)) return -1; - if (s1[i++] != 0x80 + (ch & 0x3f)) return -1; - } else if (ch >= 0xd800 && ch < 0xdc00) { - stbtt_uint32 c; - stbtt_uint16 ch2 = s2[2]*256 + s2[3]; - if (i+3 >= len1) return -1; - c = ((ch - 0xd800) << 10) + (ch2 - 0xdc00) + 0x10000; - if (s1[i++] != 0xf0 + (c >> 18)) return -1; - if (s1[i++] != 0x80 + ((c >> 12) & 0x3f)) return -1; - if (s1[i++] != 0x80 + ((c >> 6) & 0x3f)) return -1; - if (s1[i++] != 0x80 + ((c ) & 0x3f)) return -1; - s2 += 2; // plus another 2 below - len2 -= 2; - } else if (ch >= 0xdc00 && ch < 0xe000) { - return -1; - } else { - if (i+2 >= len1) return -1; - if (s1[i++] != 0xe0 + (ch >> 12)) return -1; - if (s1[i++] != 0x80 + ((ch >> 6) & 0x3f)) return -1; - if (s1[i++] != 0x80 + ((ch ) & 0x3f)) return -1; - } - s2 += 2; - len2 -= 2; - } - return i; -} - -static int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len1, char *s2, int len2) -{ - return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8*) s1, len1, (stbtt_uint8*) s2, len2); -} - -// returns results in whatever encoding you request... but note that 2-byte encodings -// will be BIG-ENDIAN... use stbtt_CompareUTF8toUTF16_bigendian() to compare -STBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int *length, int platformID, int encodingID, int languageID, int nameID) -{ - stbtt_int32 i,count,stringOffset; - stbtt_uint8 *fc = font->data; - stbtt_uint32 offset = font->fontstart; - stbtt_uint32 nm = stbtt__find_table(fc, offset, "name"); - if (!nm) return NULL; - - count = ttUSHORT(fc+nm+2); - stringOffset = nm + ttUSHORT(fc+nm+4); - for (i=0; i < count; ++i) { - stbtt_uint32 loc = nm + 6 + 12 * i; - if (platformID == ttUSHORT(fc+loc+0) && encodingID == ttUSHORT(fc+loc+2) - && languageID == ttUSHORT(fc+loc+4) && nameID == ttUSHORT(fc+loc+6)) { - *length = ttUSHORT(fc+loc+8); - return (const char *) (fc+stringOffset+ttUSHORT(fc+loc+10)); - } - } - return NULL; -} - -static int stbtt__matchpair(stbtt_uint8 *fc, stbtt_uint32 nm, stbtt_uint8 *name, stbtt_int32 nlen, stbtt_int32 target_id, stbtt_int32 next_id) -{ - stbtt_int32 i; - stbtt_int32 count = ttUSHORT(fc+nm+2); - stbtt_int32 stringOffset = nm + ttUSHORT(fc+nm+4); - - for (i=0; i < count; ++i) { - stbtt_uint32 loc = nm + 6 + 12 * i; - stbtt_int32 id = ttUSHORT(fc+loc+6); - if (id == target_id) { - // find the encoding - stbtt_int32 platform = ttUSHORT(fc+loc+0), encoding = ttUSHORT(fc+loc+2), language = ttUSHORT(fc+loc+4); - - // is this a Unicode encoding? - if (platform == 0 || (platform == 3 && encoding == 1) || (platform == 3 && encoding == 10)) { - stbtt_int32 slen = ttUSHORT(fc+loc+8); - stbtt_int32 off = ttUSHORT(fc+loc+10); - - // check if there's a prefix match - stbtt_int32 matchlen = stbtt__CompareUTF8toUTF16_bigendian_prefix(name, nlen, fc+stringOffset+off,slen); - if (matchlen >= 0) { - // check for target_id+1 immediately following, with same encoding & language - if (i+1 < count && ttUSHORT(fc+loc+12+6) == next_id && ttUSHORT(fc+loc+12) == platform && ttUSHORT(fc+loc+12+2) == encoding && ttUSHORT(fc+loc+12+4) == language) { - slen = ttUSHORT(fc+loc+12+8); - off = ttUSHORT(fc+loc+12+10); - if (slen == 0) { - if (matchlen == nlen) - return 1; - } else if (matchlen < nlen && name[matchlen] == ' ') { - ++matchlen; - if (stbtt_CompareUTF8toUTF16_bigendian_internal((char*) (name+matchlen), nlen-matchlen, (char*)(fc+stringOffset+off),slen)) - return 1; - } - } else { - // if nothing immediately following - if (matchlen == nlen) - return 1; - } - } - } - - // @TODO handle other encodings - } - } - return 0; -} - -static int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_uint8 *name, stbtt_int32 flags) -{ - stbtt_int32 nlen = (stbtt_int32) STBTT_strlen((char *) name); - stbtt_uint32 nm,hd; - if (!stbtt__isfont(fc+offset)) return 0; - - // check italics/bold/underline flags in macStyle... - if (flags) { - hd = stbtt__find_table(fc, offset, "head"); - if ((ttUSHORT(fc+hd+44) & 7) != (flags & 7)) return 0; - } - - nm = stbtt__find_table(fc, offset, "name"); - if (!nm) return 0; - - if (flags) { - // if we checked the macStyle flags, then just check the family and ignore the subfamily - if (stbtt__matchpair(fc, nm, name, nlen, 16, -1)) return 1; - if (stbtt__matchpair(fc, nm, name, nlen, 1, -1)) return 1; - if (stbtt__matchpair(fc, nm, name, nlen, 3, -1)) return 1; - } else { - if (stbtt__matchpair(fc, nm, name, nlen, 16, 17)) return 1; - if (stbtt__matchpair(fc, nm, name, nlen, 1, 2)) return 1; - if (stbtt__matchpair(fc, nm, name, nlen, 3, -1)) return 1; - } - - return 0; -} - -static int stbtt_FindMatchingFont_internal(unsigned char *font_collection, char *name_utf8, stbtt_int32 flags) -{ - stbtt_int32 i; - for (i=0;;++i) { - stbtt_int32 off = stbtt_GetFontOffsetForIndex(font_collection, i); - if (off < 0) return off; - if (stbtt__matches((stbtt_uint8 *) font_collection, off, (stbtt_uint8*) name_utf8, flags)) - return off; - } -} - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-qual" -#endif - -STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, - float pixel_height, unsigned char *pixels, int pw, int ph, - int first_char, int num_chars, stbtt_bakedchar *chardata) -{ - return stbtt_BakeFontBitmap_internal((unsigned char *) data, offset, pixel_height, pixels, pw, ph, first_char, num_chars, chardata); -} - -STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index) -{ - return stbtt_GetFontOffsetForIndex_internal((unsigned char *) data, index); -} - -STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data) -{ - return stbtt_GetNumberOfFonts_internal((unsigned char *) data); -} - -STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset) -{ - return stbtt_InitFont_internal(info, (unsigned char *) data, offset); -} - -STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags) -{ - return stbtt_FindMatchingFont_internal((unsigned char *) fontdata, (char *) name, flags); -} - -STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2) -{ - return stbtt_CompareUTF8toUTF16_bigendian_internal((char *) s1, len1, (char *) s2, len2); -} - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - -#endif // STB_TRUETYPE_IMPLEMENTATION - - -// FULL VERSION HISTORY -// -// 1.25 (2021-07-11) many fixes -// 1.24 (2020-02-05) fix warning -// 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS) -// 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined -// 1.21 (2019-02-25) fix warning -// 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics() -// 1.19 (2018-02-11) OpenType GPOS kerning (horizontal only), STBTT_fmod -// 1.18 (2018-01-29) add missing function -// 1.17 (2017-07-23) make more arguments const; doc fix -// 1.16 (2017-07-12) SDF support -// 1.15 (2017-03-03) make more arguments const -// 1.14 (2017-01-16) num-fonts-in-TTC function -// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts -// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual -// 1.11 (2016-04-02) fix unused-variable warning -// 1.10 (2016-04-02) allow user-defined fabs() replacement -// fix memory leak if fontsize=0.0 -// fix warning from duplicate typedef -// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use alloc userdata for PackFontRanges -// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges -// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints; -// allow PackFontRanges to pack and render in separate phases; -// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?); -// fixed an assert() bug in the new rasterizer -// replace assert() with STBTT_assert() in new rasterizer -// 1.06 (2015-07-14) performance improvements (~35% faster on x86 and x64 on test machine) -// also more precise AA rasterizer, except if shapes overlap -// remove need for STBTT_sort -// 1.05 (2015-04-15) fix misplaced definitions for STBTT_STATIC -// 1.04 (2015-04-15) typo in example -// 1.03 (2015-04-12) STBTT_STATIC, fix memory leak in new packing, various fixes -// 1.02 (2014-12-10) fix various warnings & compile issues w/ stb_rect_pack, C++ -// 1.01 (2014-12-08) fix subpixel position when oversampling to exactly match -// non-oversampled; STBTT_POINT_SIZE for packed case only -// 1.00 (2014-12-06) add new PackBegin etc. API, w/ support for oversampling -// 0.99 (2014-09-18) fix multiple bugs with subpixel rendering (ryg) -// 0.9 (2014-08-07) support certain mac/iOS fonts without an MS platformID -// 0.8b (2014-07-07) fix a warning -// 0.8 (2014-05-25) fix a few more warnings -// 0.7 (2013-09-25) bugfix: subpixel glyph bug fixed in 0.5 had come back -// 0.6c (2012-07-24) improve documentation -// 0.6b (2012-07-20) fix a few more warnings -// 0.6 (2012-07-17) fix warnings; added stbtt_ScaleForMappingEmToPixels, -// stbtt_GetFontBoundingBox, stbtt_IsGlyphEmpty -// 0.5 (2011-12-09) bugfixes: -// subpixel glyph renderer computed wrong bounding box -// first vertex of shape can be off-curve (FreeSans) -// 0.4b (2011-12-03) fixed an error in the font baking example -// 0.4 (2011-12-01) kerning, subpixel rendering (tor) -// bugfixes for: -// codepoint-to-glyph conversion using table fmt=12 -// codepoint-to-glyph conversion using table fmt=4 -// stbtt_GetBakedQuad with non-square texture (Zer) -// updated Hello World! sample to use kerning and subpixel -// fixed some warnings -// 0.3 (2009-06-24) cmap fmt=12, compound shapes (MM) -// userdata, malloc-from-userdata, non-zero fill (stb) -// 0.2 (2009-03-11) Fix unsigned/signed char warnings -// 0.1 (2009-03-09) First public release -// - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/stb/stb_vorbis.c b/FCLauncher/src/main/jni/lwjgl/stb/stb_vorbis.c deleted file mode 100644 index 3e5c2504..00000000 --- a/FCLauncher/src/main/jni/lwjgl/stb/stb_vorbis.c +++ /dev/null @@ -1,5584 +0,0 @@ -// Ogg Vorbis audio decoder - v1.22 - public domain -// http://nothings.org/stb_vorbis/ -// -// Original version written by Sean Barrett in 2007. -// -// Originally sponsored by RAD Game Tools. Seeking implementation -// sponsored by Phillip Bennefall, Marc Andersen, Aaron Baker, -// Elias Software, Aras Pranckevicius, and Sean Barrett. -// -// LICENSE -// -// See end of file for license information. -// -// Limitations: -// -// - floor 0 not supported (used in old ogg vorbis files pre-2004) -// - lossless sample-truncation at beginning ignored -// - cannot concatenate multiple vorbis streams -// - sample positions are 32-bit, limiting seekable 192Khz -// files to around 6 hours (Ogg supports 64-bit) -// -// Feature contributors: -// Dougall Johnson (sample-exact seeking) -// -// Bugfix/warning contributors: -// Terje Mathisen Niklas Frykholm Andy Hill -// Casey Muratori John Bolton Gargaj -// Laurent Gomila Marc LeBlanc Ronny Chevalier -// Bernhard Wodo Evan Balster github:alxprd -// Tom Beaumont Ingo Leitgeb Nicolas Guillemot -// Phillip Bennefall Rohit Thiago Goulart -// github:manxorist Saga Musix github:infatum -// Timur Gagiev Maxwell Koo Peter Waller -// github:audinowho Dougall Johnson David Reid -// github:Clownacy Pedro J. Estebanez Remi Verschelde -// AnthoFoxo github:morlat Gabriel Ravier -// -// Partial history: -// 1.22 - 2021-07-11 - various small fixes -// 1.21 - 2021-07-02 - fix bug for files with no comments -// 1.20 - 2020-07-11 - several small fixes -// 1.19 - 2020-02-05 - warnings -// 1.18 - 2020-02-02 - fix seek bugs; parse header comments; misc warnings etc. -// 1.17 - 2019-07-08 - fix CVE-2019-13217..CVE-2019-13223 (by ForAllSecure) -// 1.16 - 2019-03-04 - fix warnings -// 1.15 - 2019-02-07 - explicit failure if Ogg Skeleton data is found -// 1.14 - 2018-02-11 - delete bogus dealloca usage -// 1.13 - 2018-01-29 - fix truncation of last frame (hopefully) -// 1.12 - 2017-11-21 - limit residue begin/end to blocksize/2 to avoid large temp allocs in bad/corrupt files -// 1.11 - 2017-07-23 - fix MinGW compilation -// 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memory -// 1.09 - 2016-04-04 - back out 'truncation of last frame' fix from previous version -// 1.08 - 2016-04-02 - warnings; setup memory leaks; truncation of last frame -// 1.07 - 2015-01-16 - fixes for crashes on invalid files; warning fixes; const -// 1.06 - 2015-08-31 - full, correct support for seeking API (Dougall Johnson) -// some crash fixes when out of memory or with corrupt files -// fix some inappropriately signed shifts -// 1.05 - 2015-04-19 - don't define __forceinline if it's redundant -// 1.04 - 2014-08-27 - fix missing const-correct case in API -// 1.03 - 2014-08-07 - warning fixes -// 1.02 - 2014-07-09 - declare qsort comparison as explicitly _cdecl in Windows -// 1.01 - 2014-06-18 - fix stb_vorbis_get_samples_float (interleaved was correct) -// 1.0 - 2014-05-26 - fix memory leaks; fix warnings; fix bugs in >2-channel; -// (API change) report sample rate for decode-full-file funcs -// -// See end of file for full version history. - - -////////////////////////////////////////////////////////////////////////////// -// -// HEADER BEGINS HERE -// - -#ifndef STB_VORBIS_INCLUDE_STB_VORBIS_H -#define STB_VORBIS_INCLUDE_STB_VORBIS_H - -#if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO) -#define STB_VORBIS_NO_STDIO 1 -#endif - -#ifndef STB_VORBIS_NO_STDIO -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/////////// THREAD SAFETY - -// Individual stb_vorbis* handles are not thread-safe; you cannot decode from -// them from multiple threads at the same time. However, you can have multiple -// stb_vorbis* handles and decode from them independently in multiple thrads. - - -/////////// MEMORY ALLOCATION - -// normally stb_vorbis uses malloc() to allocate memory at startup, -// and alloca() to allocate temporary memory during a frame on the -// stack. (Memory consumption will depend on the amount of setup -// data in the file and how you set the compile flags for speed -// vs. size. In my test files the maximal-size usage is ~150KB.) -// -// You can modify the wrapper functions in the source (setup_malloc, -// setup_temp_malloc, temp_malloc) to change this behavior, or you -// can use a simpler allocation model: you pass in a buffer from -// which stb_vorbis will allocate _all_ its memory (including the -// temp memory). "open" may fail with a VORBIS_outofmem if you -// do not pass in enough data; there is no way to determine how -// much you do need except to succeed (at which point you can -// query get_info to find the exact amount required. yes I know -// this is lame). -// -// If you pass in a non-NULL buffer of the type below, allocation -// will occur from it as described above. Otherwise just pass NULL -// to use malloc()/alloca() - -typedef struct -{ - char *alloc_buffer; - int alloc_buffer_length_in_bytes; -} stb_vorbis_alloc; - - -/////////// FUNCTIONS USEABLE WITH ALL INPUT MODES - -typedef struct stb_vorbis stb_vorbis; - -typedef struct -{ - unsigned int sample_rate; - int channels; - - unsigned int setup_memory_required; - unsigned int setup_temp_memory_required; - unsigned int temp_memory_required; - - int max_frame_size; -} stb_vorbis_info; - -typedef struct -{ - char *vendor; - - int comment_list_length; - char **comment_list; -} stb_vorbis_comment; - -// get general information about the file -extern stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f); - -// get ogg comments -extern stb_vorbis_comment stb_vorbis_get_comment(stb_vorbis *f); - -// get the last error detected (clears it, too) -extern int stb_vorbis_get_error(stb_vorbis *f); - -// close an ogg vorbis file and free all memory in use -extern void stb_vorbis_close(stb_vorbis *f); - -// this function returns the offset (in samples) from the beginning of the -// file that will be returned by the next decode, if it is known, or -1 -// otherwise. after a flush_pushdata() call, this may take a while before -// it becomes valid again. -// NOT WORKING YET after a seek with PULLDATA API -extern int stb_vorbis_get_sample_offset(stb_vorbis *f); - -// returns the current seek point within the file, or offset from the beginning -// of the memory buffer. In pushdata mode it returns 0. -extern unsigned int stb_vorbis_get_file_offset(stb_vorbis *f); - -/////////// PUSHDATA API - -#ifndef STB_VORBIS_NO_PUSHDATA_API - -// this API allows you to get blocks of data from any source and hand -// them to stb_vorbis. you have to buffer them; stb_vorbis will tell -// you how much it used, and you have to give it the rest next time; -// and stb_vorbis may not have enough data to work with and you will -// need to give it the same data again PLUS more. Note that the Vorbis -// specification does not bound the size of an individual frame. - -extern stb_vorbis *stb_vorbis_open_pushdata( - const unsigned char * datablock, int datablock_length_in_bytes, - int *datablock_memory_consumed_in_bytes, - int *error, - const stb_vorbis_alloc *alloc_buffer); -// create a vorbis decoder by passing in the initial data block containing -// the ogg&vorbis headers (you don't need to do parse them, just provide -// the first N bytes of the file--you're told if it's not enough, see below) -// on success, returns an stb_vorbis *, does not set error, returns the amount of -// data parsed/consumed on this call in *datablock_memory_consumed_in_bytes; -// on failure, returns NULL on error and sets *error, does not change *datablock_memory_consumed -// if returns NULL and *error is VORBIS_need_more_data, then the input block was -// incomplete and you need to pass in a larger block from the start of the file - -extern int stb_vorbis_decode_frame_pushdata( - stb_vorbis *f, - const unsigned char *datablock, int datablock_length_in_bytes, - int *channels, // place to write number of float * buffers - float ***output, // place to write float ** array of float * buffers - int *samples // place to write number of output samples - ); -// decode a frame of audio sample data if possible from the passed-in data block -// -// return value: number of bytes we used from datablock -// -// possible cases: -// 0 bytes used, 0 samples output (need more data) -// N bytes used, 0 samples output (resynching the stream, keep going) -// N bytes used, M samples output (one frame of data) -// note that after opening a file, you will ALWAYS get one N-bytes,0-sample -// frame, because Vorbis always "discards" the first frame. -// -// Note that on resynch, stb_vorbis will rarely consume all of the buffer, -// instead only datablock_length_in_bytes-3 or less. This is because it wants -// to avoid missing parts of a page header if they cross a datablock boundary, -// without writing state-machiney code to record a partial detection. -// -// The number of channels returned are stored in *channels (which can be -// NULL--it is always the same as the number of channels reported by -// get_info). *output will contain an array of float* buffers, one per -// channel. In other words, (*output)[0][0] contains the first sample from -// the first channel, and (*output)[1][0] contains the first sample from -// the second channel. -// -// *output points into stb_vorbis's internal output buffer storage; these -// buffers are owned by stb_vorbis and application code should not free -// them or modify their contents. They are transient and will be overwritten -// once you ask for more data to get decoded, so be sure to grab any data -// you need before then. - -extern void stb_vorbis_flush_pushdata(stb_vorbis *f); -// inform stb_vorbis that your next datablock will not be contiguous with -// previous ones (e.g. you've seeked in the data); future attempts to decode -// frames will cause stb_vorbis to resynchronize (as noted above), and -// once it sees a valid Ogg page (typically 4-8KB, as large as 64KB), it -// will begin decoding the _next_ frame. -// -// if you want to seek using pushdata, you need to seek in your file, then -// call stb_vorbis_flush_pushdata(), then start calling decoding, then once -// decoding is returning you data, call stb_vorbis_get_sample_offset, and -// if you don't like the result, seek your file again and repeat. -#endif - - -////////// PULLING INPUT API - -#ifndef STB_VORBIS_NO_PULLDATA_API -// This API assumes stb_vorbis is allowed to pull data from a source-- -// either a block of memory containing the _entire_ vorbis stream, or a -// FILE * that you or it create, or possibly some other reading mechanism -// if you go modify the source to replace the FILE * case with some kind -// of callback to your code. (But if you don't support seeking, you may -// just want to go ahead and use pushdata.) - -#if !defined(STB_VORBIS_NO_STDIO) && !defined(STB_VORBIS_NO_INTEGER_CONVERSION) -extern int stb_vorbis_decode_filename(const char *filename, int *channels, int *sample_rate, short **output); -#endif -#if !defined(STB_VORBIS_NO_INTEGER_CONVERSION) -extern int stb_vorbis_decode_memory(const unsigned char *mem, int len, int *channels, int *sample_rate, short **output); -#endif -// decode an entire file and output the data interleaved into a malloc()ed -// buffer stored in *output. The return value is the number of samples -// decoded, or -1 if the file could not be opened or was not an ogg vorbis file. -// When you're done with it, just free() the pointer returned in *output. - -extern stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len, - int *error, const stb_vorbis_alloc *alloc_buffer); -// create an ogg vorbis decoder from an ogg vorbis stream in memory (note -// this must be the entire stream!). on failure, returns NULL and sets *error - -#ifndef STB_VORBIS_NO_STDIO -extern stb_vorbis * stb_vorbis_open_filename(const char *filename, - int *error, const stb_vorbis_alloc *alloc_buffer); -// create an ogg vorbis decoder from a filename via fopen(). on failure, -// returns NULL and sets *error (possibly to VORBIS_file_open_failure). - -extern stb_vorbis * stb_vorbis_open_file(FILE *f, int close_handle_on_close, - int *error, const stb_vorbis_alloc *alloc_buffer); -// create an ogg vorbis decoder from an open FILE *, looking for a stream at -// the _current_ seek point (ftell). on failure, returns NULL and sets *error. -// note that stb_vorbis must "own" this stream; if you seek it in between -// calls to stb_vorbis, it will become confused. Moreover, if you attempt to -// perform stb_vorbis_seek_*() operations on this file, it will assume it -// owns the _entire_ rest of the file after the start point. Use the next -// function, stb_vorbis_open_file_section(), to limit it. - -extern stb_vorbis * stb_vorbis_open_file_section(FILE *f, int close_handle_on_close, - int *error, const stb_vorbis_alloc *alloc_buffer, unsigned int len); -// create an ogg vorbis decoder from an open FILE *, looking for a stream at -// the _current_ seek point (ftell); the stream will be of length 'len' bytes. -// on failure, returns NULL and sets *error. note that stb_vorbis must "own" -// this stream; if you seek it in between calls to stb_vorbis, it will become -// confused. -#endif - -extern int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number); -extern int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number); -// these functions seek in the Vorbis file to (approximately) 'sample_number'. -// after calling seek_frame(), the next call to get_frame_*() will include -// the specified sample. after calling stb_vorbis_seek(), the next call to -// stb_vorbis_get_samples_* will start with the specified sample. If you -// do not need to seek to EXACTLY the target sample when using get_samples_*, -// you can also use seek_frame(). - -extern int stb_vorbis_seek_start(stb_vorbis *f); -// this function is equivalent to stb_vorbis_seek(f,0) - -extern unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f); -extern float stb_vorbis_stream_length_in_seconds(stb_vorbis *f); -// these functions return the total length of the vorbis stream - -extern int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output); -// decode the next frame and return the number of samples. the number of -// channels returned are stored in *channels (which can be NULL--it is always -// the same as the number of channels reported by get_info). *output will -// contain an array of float* buffers, one per channel. These outputs will -// be overwritten on the next call to stb_vorbis_get_frame_*. -// -// You generally should not intermix calls to stb_vorbis_get_frame_*() -// and stb_vorbis_get_samples_*(), since the latter calls the former. - -#ifndef STB_VORBIS_NO_INTEGER_CONVERSION -extern int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts); -extern int stb_vorbis_get_frame_short (stb_vorbis *f, int num_c, short **buffer, int num_samples); -#endif -// decode the next frame and return the number of *samples* per channel. -// Note that for interleaved data, you pass in the number of shorts (the -// size of your array), but the return value is the number of samples per -// channel, not the total number of samples. -// -// The data is coerced to the number of channels you request according to the -// channel coercion rules (see below). You must pass in the size of your -// buffer(s) so that stb_vorbis will not overwrite the end of the buffer. -// The maximum buffer size needed can be gotten from get_info(); however, -// the Vorbis I specification implies an absolute maximum of 4096 samples -// per channel. - -// Channel coercion rules: -// Let M be the number of channels requested, and N the number of channels present, -// and Cn be the nth channel; let stereo L be the sum of all L and center channels, -// and stereo R be the sum of all R and center channels (channel assignment from the -// vorbis spec). -// M N output -// 1 k sum(Ck) for all k -// 2 * stereo L, stereo R -// k l k > l, the first l channels, then 0s -// k l k <= l, the first k channels -// Note that this is not _good_ surround etc. mixing at all! It's just so -// you get something useful. - -extern int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats); -extern int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples); -// gets num_samples samples, not necessarily on a frame boundary--this requires -// buffering so you have to supply the buffers. DOES NOT APPLY THE COERCION RULES. -// Returns the number of samples stored per channel; it may be less than requested -// at the end of the file. If there are no more samples in the file, returns 0. - -#ifndef STB_VORBIS_NO_INTEGER_CONVERSION -extern int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts); -extern int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int num_samples); -#endif -// gets num_samples samples, not necessarily on a frame boundary--this requires -// buffering so you have to supply the buffers. Applies the coercion rules above -// to produce 'channels' channels. Returns the number of samples stored per channel; -// it may be less than requested at the end of the file. If there are no more -// samples in the file, returns 0. - -#endif - -//////// ERROR CODES - -enum STBVorbisError -{ - VORBIS__no_error, - - VORBIS_need_more_data=1, // not a real error - - VORBIS_invalid_api_mixing, // can't mix API modes - VORBIS_outofmem, // not enough memory - VORBIS_feature_not_supported, // uses floor 0 - VORBIS_too_many_channels, // STB_VORBIS_MAX_CHANNELS is too small - VORBIS_file_open_failure, // fopen() failed - VORBIS_seek_without_length, // can't seek in unknown-length file - - VORBIS_unexpected_eof=10, // file is truncated? - VORBIS_seek_invalid, // seek past EOF - - // decoding errors (corrupt/invalid stream) -- you probably - // don't care about the exact details of these - - // vorbis errors: - VORBIS_invalid_setup=20, - VORBIS_invalid_stream, - - // ogg errors: - VORBIS_missing_capture_pattern=30, - VORBIS_invalid_stream_structure_version, - VORBIS_continued_packet_flag_invalid, - VORBIS_incorrect_stream_serial_number, - VORBIS_invalid_first_page, - VORBIS_bad_packet_type, - VORBIS_cant_find_last_page, - VORBIS_seek_failed, - VORBIS_ogg_skeleton_not_supported -}; - - -#ifdef __cplusplus -} -#endif - -#endif // STB_VORBIS_INCLUDE_STB_VORBIS_H -// -// HEADER ENDS HERE -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef STB_VORBIS_HEADER_ONLY - -// global configuration settings (e.g. set these in the project/makefile), -// or just set them in this file at the top (although ideally the first few -// should be visible when the header file is compiled too, although it's not -// crucial) - -// STB_VORBIS_NO_PUSHDATA_API -// does not compile the code for the various stb_vorbis_*_pushdata() -// functions -// #define STB_VORBIS_NO_PUSHDATA_API - -// STB_VORBIS_NO_PULLDATA_API -// does not compile the code for the non-pushdata APIs -// #define STB_VORBIS_NO_PULLDATA_API - -// STB_VORBIS_NO_STDIO -// does not compile the code for the APIs that use FILE *s internally -// or externally (implied by STB_VORBIS_NO_PULLDATA_API) -// #define STB_VORBIS_NO_STDIO - -// STB_VORBIS_NO_INTEGER_CONVERSION -// does not compile the code for converting audio sample data from -// float to integer (implied by STB_VORBIS_NO_PULLDATA_API) -// #define STB_VORBIS_NO_INTEGER_CONVERSION - -// STB_VORBIS_NO_FAST_SCALED_FLOAT -// does not use a fast float-to-int trick to accelerate float-to-int on -// most platforms which requires endianness be defined correctly. -//#define STB_VORBIS_NO_FAST_SCALED_FLOAT - - -// STB_VORBIS_MAX_CHANNELS [number] -// globally define this to the maximum number of channels you need. -// The spec does not put a restriction on channels except that -// the count is stored in a byte, so 255 is the hard limit. -// Reducing this saves about 16 bytes per value, so using 16 saves -// (255-16)*16 or around 4KB. Plus anything other memory usage -// I forgot to account for. Can probably go as low as 8 (7.1 audio), -// 6 (5.1 audio), or 2 (stereo only). -#ifndef STB_VORBIS_MAX_CHANNELS -#define STB_VORBIS_MAX_CHANNELS 16 // enough for anyone? -#endif - -// STB_VORBIS_PUSHDATA_CRC_COUNT [number] -// after a flush_pushdata(), stb_vorbis begins scanning for the -// next valid page, without backtracking. when it finds something -// that looks like a page, it streams through it and verifies its -// CRC32. Should that validation fail, it keeps scanning. But it's -// possible that _while_ streaming through to check the CRC32 of -// one candidate page, it sees another candidate page. This #define -// determines how many "overlapping" candidate pages it can search -// at once. Note that "real" pages are typically ~4KB to ~8KB, whereas -// garbage pages could be as big as 64KB, but probably average ~16KB. -// So don't hose ourselves by scanning an apparent 64KB page and -// missing a ton of real ones in the interim; so minimum of 2 -#ifndef STB_VORBIS_PUSHDATA_CRC_COUNT -#define STB_VORBIS_PUSHDATA_CRC_COUNT 4 -#endif - -// STB_VORBIS_FAST_HUFFMAN_LENGTH [number] -// sets the log size of the huffman-acceleration table. Maximum -// supported value is 24. with larger numbers, more decodings are O(1), -// but the table size is larger so worse cache missing, so you'll have -// to probe (and try multiple ogg vorbis files) to find the sweet spot. -#ifndef STB_VORBIS_FAST_HUFFMAN_LENGTH -#define STB_VORBIS_FAST_HUFFMAN_LENGTH 10 -#endif - -// STB_VORBIS_FAST_BINARY_LENGTH [number] -// sets the log size of the binary-search acceleration table. this -// is used in similar fashion to the fast-huffman size to set initial -// parameters for the binary search - -// STB_VORBIS_FAST_HUFFMAN_INT -// The fast huffman tables are much more efficient if they can be -// stored as 16-bit results instead of 32-bit results. This restricts -// the codebooks to having only 65535 possible outcomes, though. -// (At least, accelerated by the huffman table.) -#ifndef STB_VORBIS_FAST_HUFFMAN_INT -#define STB_VORBIS_FAST_HUFFMAN_SHORT -#endif - -// STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH -// If the 'fast huffman' search doesn't succeed, then stb_vorbis falls -// back on binary searching for the correct one. This requires storing -// extra tables with the huffman codes in sorted order. Defining this -// symbol trades off space for speed by forcing a linear search in the -// non-fast case, except for "sparse" codebooks. -// #define STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH - -// STB_VORBIS_DIVIDES_IN_RESIDUE -// stb_vorbis precomputes the result of the scalar residue decoding -// that would otherwise require a divide per chunk. you can trade off -// space for time by defining this symbol. -// #define STB_VORBIS_DIVIDES_IN_RESIDUE - -// STB_VORBIS_DIVIDES_IN_CODEBOOK -// vorbis VQ codebooks can be encoded two ways: with every case explicitly -// stored, or with all elements being chosen from a small range of values, -// and all values possible in all elements. By default, stb_vorbis expands -// this latter kind out to look like the former kind for ease of decoding, -// because otherwise an integer divide-per-vector-element is required to -// unpack the index. If you define STB_VORBIS_DIVIDES_IN_CODEBOOK, you can -// trade off storage for speed. -//#define STB_VORBIS_DIVIDES_IN_CODEBOOK - -#ifdef STB_VORBIS_CODEBOOK_SHORTS -#error "STB_VORBIS_CODEBOOK_SHORTS is no longer supported as it produced incorrect results for some input formats" -#endif - -// STB_VORBIS_DIVIDE_TABLE -// this replaces small integer divides in the floor decode loop with -// table lookups. made less than 1% difference, so disabled by default. - -// STB_VORBIS_NO_INLINE_DECODE -// disables the inlining of the scalar codebook fast-huffman decode. -// might save a little codespace; useful for debugging -// #define STB_VORBIS_NO_INLINE_DECODE - -// STB_VORBIS_NO_DEFER_FLOOR -// Normally we only decode the floor without synthesizing the actual -// full curve. We can instead synthesize the curve immediately. This -// requires more memory and is very likely slower, so I don't think -// you'd ever want to do it except for debugging. -// #define STB_VORBIS_NO_DEFER_FLOOR - - - - -////////////////////////////////////////////////////////////////////////////// - -#ifdef STB_VORBIS_NO_PULLDATA_API - #define STB_VORBIS_NO_INTEGER_CONVERSION - #define STB_VORBIS_NO_STDIO -#endif - -#if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO) - #define STB_VORBIS_NO_STDIO 1 -#endif - -#ifndef STB_VORBIS_NO_INTEGER_CONVERSION -#ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT - - // only need endianness for fast-float-to-int, which we don't - // use for pushdata - - #ifndef STB_VORBIS_BIG_ENDIAN - #define STB_VORBIS_ENDIAN 0 - #else - #define STB_VORBIS_ENDIAN 1 - #endif - -#endif -#endif - - -#ifndef STB_VORBIS_NO_STDIO -#include -#endif - -#ifndef STB_VORBIS_NO_CRT - #include - #include - #include - #include - - // find definition of alloca if it's not in stdlib.h: - #if defined(_MSC_VER) || defined(__MINGW32__) - #include - #endif - #if defined(__linux__) || defined(__linux) || defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__) - #include - #endif -#else // STB_VORBIS_NO_CRT - #define NULL 0 - #define malloc(s) 0 - #define free(s) ((void) 0) - #define realloc(s) 0 -#endif // STB_VORBIS_NO_CRT - -#include - -#ifdef __MINGW32__ - // eff you mingw: - // "fixed": - // http://sourceforge.net/p/mingw-w64/mailman/message/32882927/ - // "no that broke the build, reverted, who cares about C": - // http://sourceforge.net/p/mingw-w64/mailman/message/32890381/ - #ifdef __forceinline - #undef __forceinline - #endif - #define __forceinline - #ifndef alloca - #define alloca __builtin_alloca - #endif -#elif !defined(_MSC_VER) - #if __GNUC__ - #define __forceinline inline - #else - #define __forceinline - #endif -#endif - -#if STB_VORBIS_MAX_CHANNELS > 256 -#error "Value of STB_VORBIS_MAX_CHANNELS outside of allowed range" -#endif - -#if STB_VORBIS_FAST_HUFFMAN_LENGTH > 24 -#error "Value of STB_VORBIS_FAST_HUFFMAN_LENGTH outside of allowed range" -#endif - - -#if 0 -#include -#define CHECK(f) _CrtIsValidHeapPointer(f->channel_buffers[1]) -#else -#define CHECK(f) ((void) 0) -#endif - -#define MAX_BLOCKSIZE_LOG 13 // from specification -#define MAX_BLOCKSIZE (1 << MAX_BLOCKSIZE_LOG) - - -typedef unsigned char uint8; -typedef signed char int8; -typedef unsigned short uint16; -typedef signed short int16; -typedef unsigned int uint32; -typedef signed int int32; - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -typedef float codetype; - -#ifdef _MSC_VER -#define STBV_NOTUSED(v) (void)(v) -#else -#define STBV_NOTUSED(v) (void)sizeof(v) -#endif - -// @NOTE -// -// Some arrays below are tagged "//varies", which means it's actually -// a variable-sized piece of data, but rather than malloc I assume it's -// small enough it's better to just allocate it all together with the -// main thing -// -// Most of the variables are specified with the smallest size I could pack -// them into. It might give better performance to make them all full-sized -// integers. It should be safe to freely rearrange the structures or change -// the sizes larger--nothing relies on silently truncating etc., nor the -// order of variables. - -#define FAST_HUFFMAN_TABLE_SIZE (1 << STB_VORBIS_FAST_HUFFMAN_LENGTH) -#define FAST_HUFFMAN_TABLE_MASK (FAST_HUFFMAN_TABLE_SIZE - 1) - -typedef struct -{ - int dimensions, entries; - uint8 *codeword_lengths; - float minimum_value; - float delta_value; - uint8 value_bits; - uint8 lookup_type; - uint8 sequence_p; - uint8 sparse; - uint32 lookup_values; - codetype *multiplicands; - uint32 *codewords; - #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT - int16 fast_huffman[FAST_HUFFMAN_TABLE_SIZE]; - #else - int32 fast_huffman[FAST_HUFFMAN_TABLE_SIZE]; - #endif - uint32 *sorted_codewords; - int *sorted_values; - int sorted_entries; -} Codebook; - -typedef struct -{ - uint8 order; - uint16 rate; - uint16 bark_map_size; - uint8 amplitude_bits; - uint8 amplitude_offset; - uint8 number_of_books; - uint8 book_list[16]; // varies -} Floor0; - -typedef struct -{ - uint8 partitions; - uint8 partition_class_list[32]; // varies - uint8 class_dimensions[16]; // varies - uint8 class_subclasses[16]; // varies - uint8 class_masterbooks[16]; // varies - int16 subclass_books[16][8]; // varies - uint16 Xlist[31*8+2]; // varies - uint8 sorted_order[31*8+2]; - uint8 neighbors[31*8+2][2]; - uint8 floor1_multiplier; - uint8 rangebits; - int values; -} Floor1; - -typedef union -{ - Floor0 floor0; - Floor1 floor1; -} Floor; - -typedef struct -{ - uint32 begin, end; - uint32 part_size; - uint8 classifications; - uint8 classbook; - uint8 **classdata; - int16 (*residue_books)[8]; -} Residue; - -typedef struct -{ - uint8 magnitude; - uint8 angle; - uint8 mux; -} MappingChannel; - -typedef struct -{ - uint16 coupling_steps; - MappingChannel *chan; - uint8 submaps; - uint8 submap_floor[15]; // varies - uint8 submap_residue[15]; // varies -} Mapping; - -typedef struct -{ - uint8 blockflag; - uint8 mapping; - uint16 windowtype; - uint16 transformtype; -} Mode; - -typedef struct -{ - uint32 goal_crc; // expected crc if match - int bytes_left; // bytes left in packet - uint32 crc_so_far; // running crc - int bytes_done; // bytes processed in _current_ chunk - uint32 sample_loc; // granule pos encoded in page -} CRCscan; - -typedef struct -{ - uint32 page_start, page_end; - uint32 last_decoded_sample; -} ProbedPage; - -struct stb_vorbis -{ - // user-accessible info - unsigned int sample_rate; - int channels; - - unsigned int setup_memory_required; - unsigned int temp_memory_required; - unsigned int setup_temp_memory_required; - - char *vendor; - int comment_list_length; - char **comment_list; - - // input config -#ifndef STB_VORBIS_NO_STDIO - FILE *f; - uint32 f_start; - int close_on_free; -#endif - - uint8 *stream; - uint8 *stream_start; - uint8 *stream_end; - - uint32 stream_len; - - uint8 push_mode; - - // the page to seek to when seeking to start, may be zero - uint32 first_audio_page_offset; - - // p_first is the page on which the first audio packet ends - // (but not necessarily the page on which it starts) - ProbedPage p_first, p_last; - - // memory management - stb_vorbis_alloc alloc; - int setup_offset; - int temp_offset; - - // run-time results - int eof; - enum STBVorbisError error; - - // user-useful data - - // header info - int blocksize[2]; - int blocksize_0, blocksize_1; - int codebook_count; - Codebook *codebooks; - int floor_count; - uint16 floor_types[64]; // varies - Floor *floor_config; - int residue_count; - uint16 residue_types[64]; // varies - Residue *residue_config; - int mapping_count; - Mapping *mapping; - int mode_count; - Mode mode_config[64]; // varies - - uint32 total_samples; - - // decode buffer - float *channel_buffers[STB_VORBIS_MAX_CHANNELS]; - float *outputs [STB_VORBIS_MAX_CHANNELS]; - - float *previous_window[STB_VORBIS_MAX_CHANNELS]; - int previous_length; - - #ifndef STB_VORBIS_NO_DEFER_FLOOR - int16 *finalY[STB_VORBIS_MAX_CHANNELS]; - #else - float *floor_buffers[STB_VORBIS_MAX_CHANNELS]; - #endif - - uint32 current_loc; // sample location of next frame to decode - int current_loc_valid; - - // per-blocksize precomputed data - - // twiddle factors - float *A[2],*B[2],*C[2]; - float *window[2]; - uint16 *bit_reverse[2]; - - // current page/packet/segment streaming info - uint32 serial; // stream serial number for verification - int last_page; - int segment_count; - uint8 segments[255]; - uint8 page_flag; - uint8 bytes_in_seg; - uint8 first_decode; - int next_seg; - int last_seg; // flag that we're on the last segment - int last_seg_which; // what was the segment number of the last seg? - uint32 acc; - int valid_bits; - int packet_bytes; - int end_seg_with_known_loc; - uint32 known_loc_for_packet; - int discard_samples_deferred; - uint32 samples_output; - - // push mode scanning - int page_crc_tests; // only in push_mode: number of tests active; -1 if not searching -#ifndef STB_VORBIS_NO_PUSHDATA_API - CRCscan scan[STB_VORBIS_PUSHDATA_CRC_COUNT]; -#endif - - // sample-access - int channel_buffer_start; - int channel_buffer_end; -}; - -#if defined(STB_VORBIS_NO_PUSHDATA_API) - #define IS_PUSH_MODE(f) FALSE -#elif defined(STB_VORBIS_NO_PULLDATA_API) - #define IS_PUSH_MODE(f) TRUE -#else - #define IS_PUSH_MODE(f) ((f)->push_mode) -#endif - -typedef struct stb_vorbis vorb; - -static int error(vorb *f, enum STBVorbisError e) -{ - f->error = e; - if (!f->eof && e != VORBIS_need_more_data) { - f->error=e; // breakpoint for debugging - } - return 0; -} - - -// these functions are used for allocating temporary memory -// while decoding. if you can afford the stack space, use -// alloca(); otherwise, provide a temp buffer and it will -// allocate out of those. - -#define array_size_required(count,size) (count*(sizeof(void *)+(size))) - -#define temp_alloc(f,size) (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size)) -#define temp_free(f,p) (void)0 -#define temp_alloc_save(f) ((f)->temp_offset) -#define temp_alloc_restore(f,p) ((f)->temp_offset = (p)) - -#define temp_block_array(f,count,size) make_block_array(temp_alloc(f,array_size_required(count,size)), count, size) - -// given a sufficiently large block of memory, make an array of pointers to subblocks of it -static void *make_block_array(void *mem, int count, int size) -{ - int i; - void ** p = (void **) mem; - char *q = (char *) (p + count); - for (i=0; i < count; ++i) { - p[i] = q; - q += size; - } - return p; -} - -static void *setup_malloc(vorb *f, int sz) -{ - sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs. - f->setup_memory_required += sz; - if (f->alloc.alloc_buffer) { - void *p = (char *) f->alloc.alloc_buffer + f->setup_offset; - if (f->setup_offset + sz > f->temp_offset) return NULL; - f->setup_offset += sz; - return p; - } - return sz ? malloc(sz) : NULL; -} - -static void setup_free(vorb *f, void *p) -{ - if (f->alloc.alloc_buffer) return; // do nothing; setup mem is a stack - free(p); -} - -static void *setup_temp_malloc(vorb *f, int sz) -{ - sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs. - if (f->alloc.alloc_buffer) { - if (f->temp_offset - sz < f->setup_offset) return NULL; - f->temp_offset -= sz; - return (char *) f->alloc.alloc_buffer + f->temp_offset; - } - return malloc(sz); -} - -static void setup_temp_free(vorb *f, void *p, int sz) -{ - if (f->alloc.alloc_buffer) { - f->temp_offset += (sz+7)&~7; - return; - } - free(p); -} - -#define CRC32_POLY 0x04c11db7 // from spec - -static uint32 crc_table[256]; -static void crc32_init(void) -{ - int i,j; - uint32 s; - for(i=0; i < 256; i++) { - for (s=(uint32) i << 24, j=0; j < 8; ++j) - s = (s << 1) ^ (s >= (1U<<31) ? CRC32_POLY : 0); - crc_table[i] = s; - } -} - -static __forceinline uint32 crc32_update(uint32 crc, uint8 byte) -{ - return (crc << 8) ^ crc_table[byte ^ (crc >> 24)]; -} - - -// used in setup, and for huffman that doesn't go fast path -static unsigned int bit_reverse(unsigned int n) -{ - n = ((n & 0xAAAAAAAA) >> 1) | ((n & 0x55555555) << 1); - n = ((n & 0xCCCCCCCC) >> 2) | ((n & 0x33333333) << 2); - n = ((n & 0xF0F0F0F0) >> 4) | ((n & 0x0F0F0F0F) << 4); - n = ((n & 0xFF00FF00) >> 8) | ((n & 0x00FF00FF) << 8); - return (n >> 16) | (n << 16); -} - -static float square(float x) -{ - return x*x; -} - -// this is a weird definition of log2() for which log2(1) = 1, log2(2) = 2, log2(4) = 3 -// as required by the specification. fast(?) implementation from stb.h -// @OPTIMIZE: called multiple times per-packet with "constants"; move to setup -static int ilog(int32 n) -{ - static signed char log2_4[16] = { 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4 }; - - if (n < 0) return 0; // signed n returns 0 - - // 2 compares if n < 16, 3 compares otherwise (4 if signed or n > 1<<29) - if (n < (1 << 14)) - if (n < (1 << 4)) return 0 + log2_4[n ]; - else if (n < (1 << 9)) return 5 + log2_4[n >> 5]; - else return 10 + log2_4[n >> 10]; - else if (n < (1 << 24)) - if (n < (1 << 19)) return 15 + log2_4[n >> 15]; - else return 20 + log2_4[n >> 20]; - else if (n < (1 << 29)) return 25 + log2_4[n >> 25]; - else return 30 + log2_4[n >> 30]; -} - -#ifndef M_PI - #define M_PI 3.14159265358979323846264f // from CRC -#endif - -// code length assigned to a value with no huffman encoding -#define NO_CODE 255 - -/////////////////////// LEAF SETUP FUNCTIONS ////////////////////////// -// -// these functions are only called at setup, and only a few times -// per file - -static float float32_unpack(uint32 x) -{ - // from the specification - uint32 mantissa = x & 0x1fffff; - uint32 sign = x & 0x80000000; - uint32 exp = (x & 0x7fe00000) >> 21; - double res = sign ? -(double)mantissa : (double)mantissa; - return (float) ldexp((float)res, (int)exp-788); -} - - -// zlib & jpeg huffman tables assume that the output symbols -// can either be arbitrarily arranged, or have monotonically -// increasing frequencies--they rely on the lengths being sorted; -// this makes for a very simple generation algorithm. -// vorbis allows a huffman table with non-sorted lengths. This -// requires a more sophisticated construction, since symbols in -// order do not map to huffman codes "in order". -static void add_entry(Codebook *c, uint32 huff_code, int symbol, int count, int len, uint32 *values) -{ - if (!c->sparse) { - c->codewords [symbol] = huff_code; - } else { - c->codewords [count] = huff_code; - c->codeword_lengths[count] = len; - values [count] = symbol; - } -} - -static int compute_codewords(Codebook *c, uint8 *len, int n, uint32 *values) -{ - int i,k,m=0; - uint32 available[32]; - - memset(available, 0, sizeof(available)); - // find the first entry - for (k=0; k < n; ++k) if (len[k] < NO_CODE) break; - if (k == n) { assert(c->sorted_entries == 0); return TRUE; } - assert(len[k] < 32); // no error return required, code reading lens checks this - // add to the list - add_entry(c, 0, k, m++, len[k], values); - // add all available leaves - for (i=1; i <= len[k]; ++i) - available[i] = 1U << (32-i); - // note that the above code treats the first case specially, - // but it's really the same as the following code, so they - // could probably be combined (except the initial code is 0, - // and I use 0 in available[] to mean 'empty') - for (i=k+1; i < n; ++i) { - uint32 res; - int z = len[i], y; - if (z == NO_CODE) continue; - assert(z < 32); // no error return required, code reading lens checks this - // find lowest available leaf (should always be earliest, - // which is what the specification calls for) - // note that this property, and the fact we can never have - // more than one free leaf at a given level, isn't totally - // trivial to prove, but it seems true and the assert never - // fires, so! - while (z > 0 && !available[z]) --z; - if (z == 0) { return FALSE; } - res = available[z]; - available[z] = 0; - add_entry(c, bit_reverse(res), i, m++, len[i], values); - // propagate availability up the tree - if (z != len[i]) { - for (y=len[i]; y > z; --y) { - assert(available[y] == 0); - available[y] = res + (1 << (32-y)); - } - } - } - return TRUE; -} - -// accelerated huffman table allows fast O(1) match of all symbols -// of length <= STB_VORBIS_FAST_HUFFMAN_LENGTH -static void compute_accelerated_huffman(Codebook *c) -{ - int i, len; - for (i=0; i < FAST_HUFFMAN_TABLE_SIZE; ++i) - c->fast_huffman[i] = -1; - - len = c->sparse ? c->sorted_entries : c->entries; - #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT - if (len > 32767) len = 32767; // largest possible value we can encode! - #endif - for (i=0; i < len; ++i) { - if (c->codeword_lengths[i] <= STB_VORBIS_FAST_HUFFMAN_LENGTH) { - uint32 z = c->sparse ? bit_reverse(c->sorted_codewords[i]) : c->codewords[i]; - // set table entries for all bit combinations in the higher bits - while (z < FAST_HUFFMAN_TABLE_SIZE) { - c->fast_huffman[z] = i; - z += 1 << c->codeword_lengths[i]; - } - } - } -} - -#ifdef _MSC_VER -#define STBV_CDECL __cdecl -#else -#define STBV_CDECL -#endif - -static int STBV_CDECL uint32_compare(const void *p, const void *q) -{ - uint32 x = * (uint32 *) p; - uint32 y = * (uint32 *) q; - return x < y ? -1 : x > y; -} - -static int include_in_sort(Codebook *c, uint8 len) -{ - if (c->sparse) { assert(len != NO_CODE); return TRUE; } - if (len == NO_CODE) return FALSE; - if (len > STB_VORBIS_FAST_HUFFMAN_LENGTH) return TRUE; - return FALSE; -} - -// if the fast table above doesn't work, we want to binary -// search them... need to reverse the bits -static void compute_sorted_huffman(Codebook *c, uint8 *lengths, uint32 *values) -{ - int i, len; - // build a list of all the entries - // OPTIMIZATION: don't include the short ones, since they'll be caught by FAST_HUFFMAN. - // this is kind of a frivolous optimization--I don't see any performance improvement, - // but it's like 4 extra lines of code, so. - if (!c->sparse) { - int k = 0; - for (i=0; i < c->entries; ++i) - if (include_in_sort(c, lengths[i])) - c->sorted_codewords[k++] = bit_reverse(c->codewords[i]); - assert(k == c->sorted_entries); - } else { - for (i=0; i < c->sorted_entries; ++i) - c->sorted_codewords[i] = bit_reverse(c->codewords[i]); - } - - qsort(c->sorted_codewords, c->sorted_entries, sizeof(c->sorted_codewords[0]), uint32_compare); - c->sorted_codewords[c->sorted_entries] = 0xffffffff; - - len = c->sparse ? c->sorted_entries : c->entries; - // now we need to indicate how they correspond; we could either - // #1: sort a different data structure that says who they correspond to - // #2: for each sorted entry, search the original list to find who corresponds - // #3: for each original entry, find the sorted entry - // #1 requires extra storage, #2 is slow, #3 can use binary search! - for (i=0; i < len; ++i) { - int huff_len = c->sparse ? lengths[values[i]] : lengths[i]; - if (include_in_sort(c,huff_len)) { - uint32 code = bit_reverse(c->codewords[i]); - int x=0, n=c->sorted_entries; - while (n > 1) { - // invariant: sc[x] <= code < sc[x+n] - int m = x + (n >> 1); - if (c->sorted_codewords[m] <= code) { - x = m; - n -= (n>>1); - } else { - n >>= 1; - } - } - assert(c->sorted_codewords[x] == code); - if (c->sparse) { - c->sorted_values[x] = values[i]; - c->codeword_lengths[x] = huff_len; - } else { - c->sorted_values[x] = i; - } - } - } -} - -// only run while parsing the header (3 times) -static int vorbis_validate(uint8 *data) -{ - static uint8 vorbis[6] = { 'v', 'o', 'r', 'b', 'i', 's' }; - return memcmp(data, vorbis, 6) == 0; -} - -// called from setup only, once per code book -// (formula implied by specification) -static int lookup1_values(int entries, int dim) -{ - int r = (int) floor(exp((float) log((float) entries) / dim)); - if ((int) floor(pow((float) r+1, dim)) <= entries) // (int) cast for MinGW warning; - ++r; // floor() to avoid _ftol() when non-CRT - if (pow((float) r+1, dim) <= entries) - return -1; - if ((int) floor(pow((float) r, dim)) > entries) - return -1; - return r; -} - -// called twice per file -static void compute_twiddle_factors(int n, float *A, float *B, float *C) -{ - int n4 = n >> 2, n8 = n >> 3; - int k,k2; - - for (k=k2=0; k < n4; ++k,k2+=2) { - A[k2 ] = (float) cos(4*k*M_PI/n); - A[k2+1] = (float) -sin(4*k*M_PI/n); - B[k2 ] = (float) cos((k2+1)*M_PI/n/2) * 0.5f; - B[k2+1] = (float) sin((k2+1)*M_PI/n/2) * 0.5f; - } - for (k=k2=0; k < n8; ++k,k2+=2) { - C[k2 ] = (float) cos(2*(k2+1)*M_PI/n); - C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n); - } -} - -static void compute_window(int n, float *window) -{ - int n2 = n >> 1, i; - for (i=0; i < n2; ++i) - window[i] = (float) sin(0.5 * M_PI * square((float) sin((i - 0 + 0.5) / n2 * 0.5 * M_PI))); -} - -static void compute_bitreverse(int n, uint16 *rev) -{ - int ld = ilog(n) - 1; // ilog is off-by-one from normal definitions - int i, n8 = n >> 3; - for (i=0; i < n8; ++i) - rev[i] = (bit_reverse(i) >> (32-ld+3)) << 2; -} - -static int init_blocksize(vorb *f, int b, int n) -{ - int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3; - f->A[b] = (float *) setup_malloc(f, sizeof(float) * n2); - f->B[b] = (float *) setup_malloc(f, sizeof(float) * n2); - f->C[b] = (float *) setup_malloc(f, sizeof(float) * n4); - if (!f->A[b] || !f->B[b] || !f->C[b]) return error(f, VORBIS_outofmem); - compute_twiddle_factors(n, f->A[b], f->B[b], f->C[b]); - f->window[b] = (float *) setup_malloc(f, sizeof(float) * n2); - if (!f->window[b]) return error(f, VORBIS_outofmem); - compute_window(n, f->window[b]); - f->bit_reverse[b] = (uint16 *) setup_malloc(f, sizeof(uint16) * n8); - if (!f->bit_reverse[b]) return error(f, VORBIS_outofmem); - compute_bitreverse(n, f->bit_reverse[b]); - return TRUE; -} - -static void neighbors(uint16 *x, int n, int *plow, int *phigh) -{ - int low = -1; - int high = 65536; - int i; - for (i=0; i < n; ++i) { - if (x[i] > low && x[i] < x[n]) { *plow = i; low = x[i]; } - if (x[i] < high && x[i] > x[n]) { *phigh = i; high = x[i]; } - } -} - -// this has been repurposed so y is now the original index instead of y -typedef struct -{ - uint16 x,id; -} stbv__floor_ordering; - -static int STBV_CDECL point_compare(const void *p, const void *q) -{ - stbv__floor_ordering *a = (stbv__floor_ordering *) p; - stbv__floor_ordering *b = (stbv__floor_ordering *) q; - return a->x < b->x ? -1 : a->x > b->x; -} - -// -/////////////////////// END LEAF SETUP FUNCTIONS ////////////////////////// - - -#if defined(STB_VORBIS_NO_STDIO) - #define USE_MEMORY(z) TRUE -#else - #define USE_MEMORY(z) ((z)->stream) -#endif - -static uint8 get8(vorb *z) -{ - if (USE_MEMORY(z)) { - if (z->stream >= z->stream_end) { z->eof = TRUE; return 0; } - return *z->stream++; - } - - #ifndef STB_VORBIS_NO_STDIO - { - int c = fgetc(z->f); - if (c == EOF) { z->eof = TRUE; return 0; } - return c; - } - #endif -} - -static uint32 get32(vorb *f) -{ - uint32 x; - x = get8(f); - x += get8(f) << 8; - x += get8(f) << 16; - x += (uint32) get8(f) << 24; - return x; -} - -static int getn(vorb *z, uint8 *data, int n) -{ - if (USE_MEMORY(z)) { - if (z->stream+n > z->stream_end) { z->eof = 1; return 0; } - memcpy(data, z->stream, n); - z->stream += n; - return 1; - } - - #ifndef STB_VORBIS_NO_STDIO - if (fread(data, n, 1, z->f) == 1) - return 1; - else { - z->eof = 1; - return 0; - } - #endif -} - -static void skip(vorb *z, int n) -{ - if (USE_MEMORY(z)) { - z->stream += n; - if (z->stream >= z->stream_end) z->eof = 1; - return; - } - #ifndef STB_VORBIS_NO_STDIO - { - long x = ftell(z->f); - fseek(z->f, x+n, SEEK_SET); - } - #endif -} - -static int set_file_offset(stb_vorbis *f, unsigned int loc) -{ - #ifndef STB_VORBIS_NO_PUSHDATA_API - if (f->push_mode) return 0; - #endif - f->eof = 0; - if (USE_MEMORY(f)) { - if (f->stream_start + loc >= f->stream_end || f->stream_start + loc < f->stream_start) { - f->stream = f->stream_end; - f->eof = 1; - return 0; - } else { - f->stream = f->stream_start + loc; - return 1; - } - } - #ifndef STB_VORBIS_NO_STDIO - if (loc + f->f_start < loc || loc >= 0x80000000) { - loc = 0x7fffffff; - f->eof = 1; - } else { - loc += f->f_start; - } - if (!fseek(f->f, loc, SEEK_SET)) - return 1; - f->eof = 1; - fseek(f->f, f->f_start, SEEK_END); - return 0; - #endif -} - - -static uint8 ogg_page_header[4] = { 0x4f, 0x67, 0x67, 0x53 }; - -static int capture_pattern(vorb *f) -{ - if (0x4f != get8(f)) return FALSE; - if (0x67 != get8(f)) return FALSE; - if (0x67 != get8(f)) return FALSE; - if (0x53 != get8(f)) return FALSE; - return TRUE; -} - -#define PAGEFLAG_continued_packet 1 -#define PAGEFLAG_first_page 2 -#define PAGEFLAG_last_page 4 - -static int start_page_no_capturepattern(vorb *f) -{ - uint32 loc0,loc1,n; - if (f->first_decode && !IS_PUSH_MODE(f)) { - f->p_first.page_start = stb_vorbis_get_file_offset(f) - 4; - } - // stream structure version - if (0 != get8(f)) return error(f, VORBIS_invalid_stream_structure_version); - // header flag - f->page_flag = get8(f); - // absolute granule position - loc0 = get32(f); - loc1 = get32(f); - // @TODO: validate loc0,loc1 as valid positions? - // stream serial number -- vorbis doesn't interleave, so discard - get32(f); - //if (f->serial != get32(f)) return error(f, VORBIS_incorrect_stream_serial_number); - // page sequence number - n = get32(f); - f->last_page = n; - // CRC32 - get32(f); - // page_segments - f->segment_count = get8(f); - if (!getn(f, f->segments, f->segment_count)) - return error(f, VORBIS_unexpected_eof); - // assume we _don't_ know any the sample position of any segments - f->end_seg_with_known_loc = -2; - if (loc0 != ~0U || loc1 != ~0U) { - int i; - // determine which packet is the last one that will complete - for (i=f->segment_count-1; i >= 0; --i) - if (f->segments[i] < 255) - break; - // 'i' is now the index of the _last_ segment of a packet that ends - if (i >= 0) { - f->end_seg_with_known_loc = i; - f->known_loc_for_packet = loc0; - } - } - if (f->first_decode) { - int i,len; - len = 0; - for (i=0; i < f->segment_count; ++i) - len += f->segments[i]; - len += 27 + f->segment_count; - f->p_first.page_end = f->p_first.page_start + len; - f->p_first.last_decoded_sample = loc0; - } - f->next_seg = 0; - return TRUE; -} - -static int start_page(vorb *f) -{ - if (!capture_pattern(f)) return error(f, VORBIS_missing_capture_pattern); - return start_page_no_capturepattern(f); -} - -static int start_packet(vorb *f) -{ - while (f->next_seg == -1) { - if (!start_page(f)) return FALSE; - if (f->page_flag & PAGEFLAG_continued_packet) - return error(f, VORBIS_continued_packet_flag_invalid); - } - f->last_seg = FALSE; - f->valid_bits = 0; - f->packet_bytes = 0; - f->bytes_in_seg = 0; - // f->next_seg is now valid - return TRUE; -} - -static int maybe_start_packet(vorb *f) -{ - if (f->next_seg == -1) { - int x = get8(f); - if (f->eof) return FALSE; // EOF at page boundary is not an error! - if (0x4f != x ) return error(f, VORBIS_missing_capture_pattern); - if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern); - if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern); - if (0x53 != get8(f)) return error(f, VORBIS_missing_capture_pattern); - if (!start_page_no_capturepattern(f)) return FALSE; - if (f->page_flag & PAGEFLAG_continued_packet) { - // set up enough state that we can read this packet if we want, - // e.g. during recovery - f->last_seg = FALSE; - f->bytes_in_seg = 0; - return error(f, VORBIS_continued_packet_flag_invalid); - } - } - return start_packet(f); -} - -static int next_segment(vorb *f) -{ - int len; - if (f->last_seg) return 0; - if (f->next_seg == -1) { - f->last_seg_which = f->segment_count-1; // in case start_page fails - if (!start_page(f)) { f->last_seg = 1; return 0; } - if (!(f->page_flag & PAGEFLAG_continued_packet)) return error(f, VORBIS_continued_packet_flag_invalid); - } - len = f->segments[f->next_seg++]; - if (len < 255) { - f->last_seg = TRUE; - f->last_seg_which = f->next_seg-1; - } - if (f->next_seg >= f->segment_count) - f->next_seg = -1; - assert(f->bytes_in_seg == 0); - f->bytes_in_seg = len; - return len; -} - -#define EOP (-1) -#define INVALID_BITS (-1) - -static int get8_packet_raw(vorb *f) -{ - if (!f->bytes_in_seg) { // CLANG! - if (f->last_seg) return EOP; - else if (!next_segment(f)) return EOP; - } - assert(f->bytes_in_seg > 0); - --f->bytes_in_seg; - ++f->packet_bytes; - return get8(f); -} - -static int get8_packet(vorb *f) -{ - int x = get8_packet_raw(f); - f->valid_bits = 0; - return x; -} - -static int get32_packet(vorb *f) -{ - uint32 x; - x = get8_packet(f); - x += get8_packet(f) << 8; - x += get8_packet(f) << 16; - x += (uint32) get8_packet(f) << 24; - return x; -} - -static void flush_packet(vorb *f) -{ - while (get8_packet_raw(f) != EOP); -} - -// @OPTIMIZE: this is the secondary bit decoder, so it's probably not as important -// as the huffman decoder? -static uint32 get_bits(vorb *f, int n) -{ - uint32 z; - - if (f->valid_bits < 0) return 0; - if (f->valid_bits < n) { - if (n > 24) { - // the accumulator technique below would not work correctly in this case - z = get_bits(f, 24); - z += get_bits(f, n-24) << 24; - return z; - } - if (f->valid_bits == 0) f->acc = 0; - while (f->valid_bits < n) { - int z = get8_packet_raw(f); - if (z == EOP) { - f->valid_bits = INVALID_BITS; - return 0; - } - f->acc += z << f->valid_bits; - f->valid_bits += 8; - } - } - - assert(f->valid_bits >= n); - z = f->acc & ((1 << n)-1); - f->acc >>= n; - f->valid_bits -= n; - return z; -} - -// @OPTIMIZE: primary accumulator for huffman -// expand the buffer to as many bits as possible without reading off end of packet -// it might be nice to allow f->valid_bits and f->acc to be stored in registers, -// e.g. cache them locally and decode locally -static __forceinline void prep_huffman(vorb *f) -{ - if (f->valid_bits <= 24) { - if (f->valid_bits == 0) f->acc = 0; - do { - int z; - if (f->last_seg && !f->bytes_in_seg) return; - z = get8_packet_raw(f); - if (z == EOP) return; - f->acc += (unsigned) z << f->valid_bits; - f->valid_bits += 8; - } while (f->valid_bits <= 24); - } -} - -enum -{ - VORBIS_packet_id = 1, - VORBIS_packet_comment = 3, - VORBIS_packet_setup = 5 -}; - -static int codebook_decode_scalar_raw(vorb *f, Codebook *c) -{ - int i; - prep_huffman(f); - - if (c->codewords == NULL && c->sorted_codewords == NULL) - return -1; - - // cases to use binary search: sorted_codewords && !c->codewords - // sorted_codewords && c->entries > 8 - if (c->entries > 8 ? c->sorted_codewords!=NULL : !c->codewords) { - // binary search - uint32 code = bit_reverse(f->acc); - int x=0, n=c->sorted_entries, len; - - while (n > 1) { - // invariant: sc[x] <= code < sc[x+n] - int m = x + (n >> 1); - if (c->sorted_codewords[m] <= code) { - x = m; - n -= (n>>1); - } else { - n >>= 1; - } - } - // x is now the sorted index - if (!c->sparse) x = c->sorted_values[x]; - // x is now sorted index if sparse, or symbol otherwise - len = c->codeword_lengths[x]; - if (f->valid_bits >= len) { - f->acc >>= len; - f->valid_bits -= len; - return x; - } - - f->valid_bits = 0; - return -1; - } - - // if small, linear search - assert(!c->sparse); - for (i=0; i < c->entries; ++i) { - if (c->codeword_lengths[i] == NO_CODE) continue; - if (c->codewords[i] == (f->acc & ((1 << c->codeword_lengths[i])-1))) { - if (f->valid_bits >= c->codeword_lengths[i]) { - f->acc >>= c->codeword_lengths[i]; - f->valid_bits -= c->codeword_lengths[i]; - return i; - } - f->valid_bits = 0; - return -1; - } - } - - error(f, VORBIS_invalid_stream); - f->valid_bits = 0; - return -1; -} - -#ifndef STB_VORBIS_NO_INLINE_DECODE - -#define DECODE_RAW(var, f,c) \ - if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) \ - prep_huffman(f); \ - var = f->acc & FAST_HUFFMAN_TABLE_MASK; \ - var = c->fast_huffman[var]; \ - if (var >= 0) { \ - int n = c->codeword_lengths[var]; \ - f->acc >>= n; \ - f->valid_bits -= n; \ - if (f->valid_bits < 0) { f->valid_bits = 0; var = -1; } \ - } else { \ - var = codebook_decode_scalar_raw(f,c); \ - } - -#else - -static int codebook_decode_scalar(vorb *f, Codebook *c) -{ - int i; - if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) - prep_huffman(f); - // fast huffman table lookup - i = f->acc & FAST_HUFFMAN_TABLE_MASK; - i = c->fast_huffman[i]; - if (i >= 0) { - f->acc >>= c->codeword_lengths[i]; - f->valid_bits -= c->codeword_lengths[i]; - if (f->valid_bits < 0) { f->valid_bits = 0; return -1; } - return i; - } - return codebook_decode_scalar_raw(f,c); -} - -#define DECODE_RAW(var,f,c) var = codebook_decode_scalar(f,c); - -#endif - -#define DECODE(var,f,c) \ - DECODE_RAW(var,f,c) \ - if (c->sparse) var = c->sorted_values[var]; - -#ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK - #define DECODE_VQ(var,f,c) DECODE_RAW(var,f,c) -#else - #define DECODE_VQ(var,f,c) DECODE(var,f,c) -#endif - - - - - - -// CODEBOOK_ELEMENT_FAST is an optimization for the CODEBOOK_FLOATS case -// where we avoid one addition -#define CODEBOOK_ELEMENT(c,off) (c->multiplicands[off]) -#define CODEBOOK_ELEMENT_FAST(c,off) (c->multiplicands[off]) -#define CODEBOOK_ELEMENT_BASE(c) (0) - -static int codebook_decode_start(vorb *f, Codebook *c) -{ - int z = -1; - - // type 0 is only legal in a scalar context - if (c->lookup_type == 0) - error(f, VORBIS_invalid_stream); - else { - DECODE_VQ(z,f,c); - if (c->sparse) assert(z < c->sorted_entries); - if (z < 0) { // check for EOP - if (!f->bytes_in_seg) - if (f->last_seg) - return z; - error(f, VORBIS_invalid_stream); - } - } - return z; -} - -static int codebook_decode(vorb *f, Codebook *c, float *output, int len) -{ - int i,z = codebook_decode_start(f,c); - if (z < 0) return FALSE; - if (len > c->dimensions) len = c->dimensions; - -#ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK - if (c->lookup_type == 1) { - float last = CODEBOOK_ELEMENT_BASE(c); - int div = 1; - for (i=0; i < len; ++i) { - int off = (z / div) % c->lookup_values; - float val = CODEBOOK_ELEMENT_FAST(c,off) + last; - output[i] += val; - if (c->sequence_p) last = val + c->minimum_value; - div *= c->lookup_values; - } - return TRUE; - } -#endif - - z *= c->dimensions; - if (c->sequence_p) { - float last = CODEBOOK_ELEMENT_BASE(c); - for (i=0; i < len; ++i) { - float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; - output[i] += val; - last = val + c->minimum_value; - } - } else { - float last = CODEBOOK_ELEMENT_BASE(c); - for (i=0; i < len; ++i) { - output[i] += CODEBOOK_ELEMENT_FAST(c,z+i) + last; - } - } - - return TRUE; -} - -static int codebook_decode_step(vorb *f, Codebook *c, float *output, int len, int step) -{ - int i,z = codebook_decode_start(f,c); - float last = CODEBOOK_ELEMENT_BASE(c); - if (z < 0) return FALSE; - if (len > c->dimensions) len = c->dimensions; - -#ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK - if (c->lookup_type == 1) { - int div = 1; - for (i=0; i < len; ++i) { - int off = (z / div) % c->lookup_values; - float val = CODEBOOK_ELEMENT_FAST(c,off) + last; - output[i*step] += val; - if (c->sequence_p) last = val; - div *= c->lookup_values; - } - return TRUE; - } -#endif - - z *= c->dimensions; - for (i=0; i < len; ++i) { - float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; - output[i*step] += val; - if (c->sequence_p) last = val; - } - - return TRUE; -} - -static int codebook_decode_deinterleave_repeat(vorb *f, Codebook *c, float **outputs, int ch, int *c_inter_p, int *p_inter_p, int len, int total_decode) -{ - int c_inter = *c_inter_p; - int p_inter = *p_inter_p; - int i,z, effective = c->dimensions; - - // type 0 is only legal in a scalar context - if (c->lookup_type == 0) return error(f, VORBIS_invalid_stream); - - while (total_decode > 0) { - float last = CODEBOOK_ELEMENT_BASE(c); - DECODE_VQ(z,f,c); - #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK - assert(!c->sparse || z < c->sorted_entries); - #endif - if (z < 0) { - if (!f->bytes_in_seg) - if (f->last_seg) return FALSE; - return error(f, VORBIS_invalid_stream); - } - - // if this will take us off the end of the buffers, stop short! - // we check by computing the length of the virtual interleaved - // buffer (len*ch), our current offset within it (p_inter*ch)+(c_inter), - // and the length we'll be using (effective) - if (c_inter + p_inter*ch + effective > len * ch) { - effective = len*ch - (p_inter*ch - c_inter); - } - - #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK - if (c->lookup_type == 1) { - int div = 1; - for (i=0; i < effective; ++i) { - int off = (z / div) % c->lookup_values; - float val = CODEBOOK_ELEMENT_FAST(c,off) + last; - if (outputs[c_inter]) - outputs[c_inter][p_inter] += val; - if (++c_inter == ch) { c_inter = 0; ++p_inter; } - if (c->sequence_p) last = val; - div *= c->lookup_values; - } - } else - #endif - { - z *= c->dimensions; - if (c->sequence_p) { - for (i=0; i < effective; ++i) { - float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; - if (outputs[c_inter]) - outputs[c_inter][p_inter] += val; - if (++c_inter == ch) { c_inter = 0; ++p_inter; } - last = val; - } - } else { - for (i=0; i < effective; ++i) { - float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; - if (outputs[c_inter]) - outputs[c_inter][p_inter] += val; - if (++c_inter == ch) { c_inter = 0; ++p_inter; } - } - } - } - - total_decode -= effective; - } - *c_inter_p = c_inter; - *p_inter_p = p_inter; - return TRUE; -} - -static int predict_point(int x, int x0, int x1, int y0, int y1) -{ - int dy = y1 - y0; - int adx = x1 - x0; - // @OPTIMIZE: force int division to round in the right direction... is this necessary on x86? - int err = abs(dy) * (x - x0); - int off = err / adx; - return dy < 0 ? y0 - off : y0 + off; -} - -// the following table is block-copied from the specification -static float inverse_db_table[256] = -{ - 1.0649863e-07f, 1.1341951e-07f, 1.2079015e-07f, 1.2863978e-07f, - 1.3699951e-07f, 1.4590251e-07f, 1.5538408e-07f, 1.6548181e-07f, - 1.7623575e-07f, 1.8768855e-07f, 1.9988561e-07f, 2.1287530e-07f, - 2.2670913e-07f, 2.4144197e-07f, 2.5713223e-07f, 2.7384213e-07f, - 2.9163793e-07f, 3.1059021e-07f, 3.3077411e-07f, 3.5226968e-07f, - 3.7516214e-07f, 3.9954229e-07f, 4.2550680e-07f, 4.5315863e-07f, - 4.8260743e-07f, 5.1396998e-07f, 5.4737065e-07f, 5.8294187e-07f, - 6.2082472e-07f, 6.6116941e-07f, 7.0413592e-07f, 7.4989464e-07f, - 7.9862701e-07f, 8.5052630e-07f, 9.0579828e-07f, 9.6466216e-07f, - 1.0273513e-06f, 1.0941144e-06f, 1.1652161e-06f, 1.2409384e-06f, - 1.3215816e-06f, 1.4074654e-06f, 1.4989305e-06f, 1.5963394e-06f, - 1.7000785e-06f, 1.8105592e-06f, 1.9282195e-06f, 2.0535261e-06f, - 2.1869758e-06f, 2.3290978e-06f, 2.4804557e-06f, 2.6416497e-06f, - 2.8133190e-06f, 2.9961443e-06f, 3.1908506e-06f, 3.3982101e-06f, - 3.6190449e-06f, 3.8542308e-06f, 4.1047004e-06f, 4.3714470e-06f, - 4.6555282e-06f, 4.9580707e-06f, 5.2802740e-06f, 5.6234160e-06f, - 5.9888572e-06f, 6.3780469e-06f, 6.7925283e-06f, 7.2339451e-06f, - 7.7040476e-06f, 8.2047000e-06f, 8.7378876e-06f, 9.3057248e-06f, - 9.9104632e-06f, 1.0554501e-05f, 1.1240392e-05f, 1.1970856e-05f, - 1.2748789e-05f, 1.3577278e-05f, 1.4459606e-05f, 1.5399272e-05f, - 1.6400004e-05f, 1.7465768e-05f, 1.8600792e-05f, 1.9809576e-05f, - 2.1096914e-05f, 2.2467911e-05f, 2.3928002e-05f, 2.5482978e-05f, - 2.7139006e-05f, 2.8902651e-05f, 3.0780908e-05f, 3.2781225e-05f, - 3.4911534e-05f, 3.7180282e-05f, 3.9596466e-05f, 4.2169667e-05f, - 4.4910090e-05f, 4.7828601e-05f, 5.0936773e-05f, 5.4246931e-05f, - 5.7772202e-05f, 6.1526565e-05f, 6.5524908e-05f, 6.9783085e-05f, - 7.4317983e-05f, 7.9147585e-05f, 8.4291040e-05f, 8.9768747e-05f, - 9.5602426e-05f, 0.00010181521f, 0.00010843174f, 0.00011547824f, - 0.00012298267f, 0.00013097477f, 0.00013948625f, 0.00014855085f, - 0.00015820453f, 0.00016848555f, 0.00017943469f, 0.00019109536f, - 0.00020351382f, 0.00021673929f, 0.00023082423f, 0.00024582449f, - 0.00026179955f, 0.00027881276f, 0.00029693158f, 0.00031622787f, - 0.00033677814f, 0.00035866388f, 0.00038197188f, 0.00040679456f, - 0.00043323036f, 0.00046138411f, 0.00049136745f, 0.00052329927f, - 0.00055730621f, 0.00059352311f, 0.00063209358f, 0.00067317058f, - 0.00071691700f, 0.00076350630f, 0.00081312324f, 0.00086596457f, - 0.00092223983f, 0.00098217216f, 0.0010459992f, 0.0011139742f, - 0.0011863665f, 0.0012634633f, 0.0013455702f, 0.0014330129f, - 0.0015261382f, 0.0016253153f, 0.0017309374f, 0.0018434235f, - 0.0019632195f, 0.0020908006f, 0.0022266726f, 0.0023713743f, - 0.0025254795f, 0.0026895994f, 0.0028643847f, 0.0030505286f, - 0.0032487691f, 0.0034598925f, 0.0036847358f, 0.0039241906f, - 0.0041792066f, 0.0044507950f, 0.0047400328f, 0.0050480668f, - 0.0053761186f, 0.0057254891f, 0.0060975636f, 0.0064938176f, - 0.0069158225f, 0.0073652516f, 0.0078438871f, 0.0083536271f, - 0.0088964928f, 0.009474637f, 0.010090352f, 0.010746080f, - 0.011444421f, 0.012188144f, 0.012980198f, 0.013823725f, - 0.014722068f, 0.015678791f, 0.016697687f, 0.017782797f, - 0.018938423f, 0.020169149f, 0.021479854f, 0.022875735f, - 0.024362330f, 0.025945531f, 0.027631618f, 0.029427276f, - 0.031339626f, 0.033376252f, 0.035545228f, 0.037855157f, - 0.040315199f, 0.042935108f, 0.045725273f, 0.048696758f, - 0.051861348f, 0.055231591f, 0.058820850f, 0.062643361f, - 0.066714279f, 0.071049749f, 0.075666962f, 0.080584227f, - 0.085821044f, 0.091398179f, 0.097337747f, 0.10366330f, - 0.11039993f, 0.11757434f, 0.12521498f, 0.13335215f, - 0.14201813f, 0.15124727f, 0.16107617f, 0.17154380f, - 0.18269168f, 0.19456402f, 0.20720788f, 0.22067342f, - 0.23501402f, 0.25028656f, 0.26655159f, 0.28387361f, - 0.30232132f, 0.32196786f, 0.34289114f, 0.36517414f, - 0.38890521f, 0.41417847f, 0.44109412f, 0.46975890f, - 0.50028648f, 0.53279791f, 0.56742212f, 0.60429640f, - 0.64356699f, 0.68538959f, 0.72993007f, 0.77736504f, - 0.82788260f, 0.88168307f, 0.9389798f, 1.0f -}; - - -// @OPTIMIZE: if you want to replace this bresenham line-drawing routine, -// note that you must produce bit-identical output to decode correctly; -// this specific sequence of operations is specified in the spec (it's -// drawing integer-quantized frequency-space lines that the encoder -// expects to be exactly the same) -// ... also, isn't the whole point of Bresenham's algorithm to NOT -// have to divide in the setup? sigh. -#ifndef STB_VORBIS_NO_DEFER_FLOOR -#define LINE_OP(a,b) a *= b -#else -#define LINE_OP(a,b) a = b -#endif - -#ifdef STB_VORBIS_DIVIDE_TABLE -#define DIVTAB_NUMER 32 -#define DIVTAB_DENOM 64 -int8 integer_divide_table[DIVTAB_NUMER][DIVTAB_DENOM]; // 2KB -#endif - -static __forceinline void draw_line(float *output, int x0, int y0, int x1, int y1, int n) -{ - int dy = y1 - y0; - int adx = x1 - x0; - int ady = abs(dy); - int base; - int x=x0,y=y0; - int err = 0; - int sy; - -#ifdef STB_VORBIS_DIVIDE_TABLE - if (adx < DIVTAB_DENOM && ady < DIVTAB_NUMER) { - if (dy < 0) { - base = -integer_divide_table[ady][adx]; - sy = base-1; - } else { - base = integer_divide_table[ady][adx]; - sy = base+1; - } - } else { - base = dy / adx; - if (dy < 0) - sy = base - 1; - else - sy = base+1; - } -#else - base = dy / adx; - if (dy < 0) - sy = base - 1; - else - sy = base+1; -#endif - ady -= abs(base) * adx; - if (x1 > n) x1 = n; - if (x < x1) { - LINE_OP(output[x], inverse_db_table[y&255]); - for (++x; x < x1; ++x) { - err += ady; - if (err >= adx) { - err -= adx; - y += sy; - } else - y += base; - LINE_OP(output[x], inverse_db_table[y&255]); - } - } -} - -static int residue_decode(vorb *f, Codebook *book, float *target, int offset, int n, int rtype) -{ - int k; - if (rtype == 0) { - int step = n / book->dimensions; - for (k=0; k < step; ++k) - if (!codebook_decode_step(f, book, target+offset+k, n-offset-k, step)) - return FALSE; - } else { - for (k=0; k < n; ) { - if (!codebook_decode(f, book, target+offset, n-k)) - return FALSE; - k += book->dimensions; - offset += book->dimensions; - } - } - return TRUE; -} - -// n is 1/2 of the blocksize -- -// specification: "Correct per-vector decode length is [n]/2" -static void decode_residue(vorb *f, float *residue_buffers[], int ch, int n, int rn, uint8 *do_not_decode) -{ - int i,j,pass; - Residue *r = f->residue_config + rn; - int rtype = f->residue_types[rn]; - int c = r->classbook; - int classwords = f->codebooks[c].dimensions; - unsigned int actual_size = rtype == 2 ? n*2 : n; - unsigned int limit_r_begin = (r->begin < actual_size ? r->begin : actual_size); - unsigned int limit_r_end = (r->end < actual_size ? r->end : actual_size); - int n_read = limit_r_end - limit_r_begin; - int part_read = n_read / r->part_size; - int temp_alloc_point = temp_alloc_save(f); - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - uint8 ***part_classdata = (uint8 ***) temp_block_array(f,f->channels, part_read * sizeof(**part_classdata)); - #else - int **classifications = (int **) temp_block_array(f,f->channels, part_read * sizeof(**classifications)); - #endif - - CHECK(f); - - for (i=0; i < ch; ++i) - if (!do_not_decode[i]) - memset(residue_buffers[i], 0, sizeof(float) * n); - - if (rtype == 2 && ch != 1) { - for (j=0; j < ch; ++j) - if (!do_not_decode[j]) - break; - if (j == ch) - goto done; - - for (pass=0; pass < 8; ++pass) { - int pcount = 0, class_set = 0; - if (ch == 2) { - while (pcount < part_read) { - int z = r->begin + pcount*r->part_size; - int c_inter = (z & 1), p_inter = z>>1; - if (pass == 0) { - Codebook *c = f->codebooks+r->classbook; - int q; - DECODE(q,f,c); - if (q == EOP) goto done; - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - part_classdata[0][class_set] = r->classdata[q]; - #else - for (i=classwords-1; i >= 0; --i) { - classifications[0][i+pcount] = q % r->classifications; - q /= r->classifications; - } - #endif - } - for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { - int z = r->begin + pcount*r->part_size; - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - int c = part_classdata[0][class_set][i]; - #else - int c = classifications[0][pcount]; - #endif - int b = r->residue_books[c][pass]; - if (b >= 0) { - Codebook *book = f->codebooks + b; - #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK - if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) - goto done; - #else - // saves 1% - if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) - goto done; - #endif - } else { - z += r->part_size; - c_inter = z & 1; - p_inter = z >> 1; - } - } - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - ++class_set; - #endif - } - } else if (ch > 2) { - while (pcount < part_read) { - int z = r->begin + pcount*r->part_size; - int c_inter = z % ch, p_inter = z/ch; - if (pass == 0) { - Codebook *c = f->codebooks+r->classbook; - int q; - DECODE(q,f,c); - if (q == EOP) goto done; - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - part_classdata[0][class_set] = r->classdata[q]; - #else - for (i=classwords-1; i >= 0; --i) { - classifications[0][i+pcount] = q % r->classifications; - q /= r->classifications; - } - #endif - } - for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { - int z = r->begin + pcount*r->part_size; - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - int c = part_classdata[0][class_set][i]; - #else - int c = classifications[0][pcount]; - #endif - int b = r->residue_books[c][pass]; - if (b >= 0) { - Codebook *book = f->codebooks + b; - if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) - goto done; - } else { - z += r->part_size; - c_inter = z % ch; - p_inter = z / ch; - } - } - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - ++class_set; - #endif - } - } - } - goto done; - } - CHECK(f); - - for (pass=0; pass < 8; ++pass) { - int pcount = 0, class_set=0; - while (pcount < part_read) { - if (pass == 0) { - for (j=0; j < ch; ++j) { - if (!do_not_decode[j]) { - Codebook *c = f->codebooks+r->classbook; - int temp; - DECODE(temp,f,c); - if (temp == EOP) goto done; - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - part_classdata[j][class_set] = r->classdata[temp]; - #else - for (i=classwords-1; i >= 0; --i) { - classifications[j][i+pcount] = temp % r->classifications; - temp /= r->classifications; - } - #endif - } - } - } - for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { - for (j=0; j < ch; ++j) { - if (!do_not_decode[j]) { - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - int c = part_classdata[j][class_set][i]; - #else - int c = classifications[j][pcount]; - #endif - int b = r->residue_books[c][pass]; - if (b >= 0) { - float *target = residue_buffers[j]; - int offset = r->begin + pcount * r->part_size; - int n = r->part_size; - Codebook *book = f->codebooks + b; - if (!residue_decode(f, book, target, offset, n, rtype)) - goto done; - } - } - } - } - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - ++class_set; - #endif - } - } - done: - CHECK(f); - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - temp_free(f,part_classdata); - #else - temp_free(f,classifications); - #endif - temp_alloc_restore(f,temp_alloc_point); -} - - -#if 0 -// slow way for debugging -void inverse_mdct_slow(float *buffer, int n) -{ - int i,j; - int n2 = n >> 1; - float *x = (float *) malloc(sizeof(*x) * n2); - memcpy(x, buffer, sizeof(*x) * n2); - for (i=0; i < n; ++i) { - float acc = 0; - for (j=0; j < n2; ++j) - // formula from paper: - //acc += n/4.0f * x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1)); - // formula from wikipedia - //acc += 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5)); - // these are equivalent, except the formula from the paper inverts the multiplier! - // however, what actually works is NO MULTIPLIER!?! - //acc += 64 * 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5)); - acc += x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1)); - buffer[i] = acc; - } - free(x); -} -#elif 0 -// same as above, but just barely able to run in real time on modern machines -void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) -{ - float mcos[16384]; - int i,j; - int n2 = n >> 1, nmask = (n << 2) -1; - float *x = (float *) malloc(sizeof(*x) * n2); - memcpy(x, buffer, sizeof(*x) * n2); - for (i=0; i < 4*n; ++i) - mcos[i] = (float) cos(M_PI / 2 * i / n); - - for (i=0; i < n; ++i) { - float acc = 0; - for (j=0; j < n2; ++j) - acc += x[j] * mcos[(2 * i + 1 + n2)*(2*j+1) & nmask]; - buffer[i] = acc; - } - free(x); -} -#elif 0 -// transform to use a slow dct-iv; this is STILL basically trivial, -// but only requires half as many ops -void dct_iv_slow(float *buffer, int n) -{ - float mcos[16384]; - float x[2048]; - int i,j; - int n2 = n >> 1, nmask = (n << 3) - 1; - memcpy(x, buffer, sizeof(*x) * n); - for (i=0; i < 8*n; ++i) - mcos[i] = (float) cos(M_PI / 4 * i / n); - for (i=0; i < n; ++i) { - float acc = 0; - for (j=0; j < n; ++j) - acc += x[j] * mcos[((2 * i + 1)*(2*j+1)) & nmask]; - buffer[i] = acc; - } -} - -void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) -{ - int i, n4 = n >> 2, n2 = n >> 1, n3_4 = n - n4; - float temp[4096]; - - memcpy(temp, buffer, n2 * sizeof(float)); - dct_iv_slow(temp, n2); // returns -c'-d, a-b' - - for (i=0; i < n4 ; ++i) buffer[i] = temp[i+n4]; // a-b' - for ( ; i < n3_4; ++i) buffer[i] = -temp[n3_4 - i - 1]; // b-a', c+d' - for ( ; i < n ; ++i) buffer[i] = -temp[i - n3_4]; // c'+d -} -#endif - -#ifndef LIBVORBIS_MDCT -#define LIBVORBIS_MDCT 0 -#endif - -#if LIBVORBIS_MDCT -// directly call the vorbis MDCT using an interface documented -// by Jeff Roberts... useful for performance comparison -typedef struct -{ - int n; - int log2n; - - float *trig; - int *bitrev; - - float scale; -} mdct_lookup; - -extern void mdct_init(mdct_lookup *lookup, int n); -extern void mdct_clear(mdct_lookup *l); -extern void mdct_backward(mdct_lookup *init, float *in, float *out); - -mdct_lookup M1,M2; - -void inverse_mdct(float *buffer, int n, vorb *f, int blocktype) -{ - mdct_lookup *M; - if (M1.n == n) M = &M1; - else if (M2.n == n) M = &M2; - else if (M1.n == 0) { mdct_init(&M1, n); M = &M1; } - else { - if (M2.n) __asm int 3; - mdct_init(&M2, n); - M = &M2; - } - - mdct_backward(M, buffer, buffer); -} -#endif - - -// the following were split out into separate functions while optimizing; -// they could be pushed back up but eh. __forceinline showed no change; -// they're probably already being inlined. -static void imdct_step3_iter0_loop(int n, float *e, int i_off, int k_off, float *A) -{ - float *ee0 = e + i_off; - float *ee2 = ee0 + k_off; - int i; - - assert((n & 3) == 0); - for (i=(n>>2); i > 0; --i) { - float k00_20, k01_21; - k00_20 = ee0[ 0] - ee2[ 0]; - k01_21 = ee0[-1] - ee2[-1]; - ee0[ 0] += ee2[ 0];//ee0[ 0] = ee0[ 0] + ee2[ 0]; - ee0[-1] += ee2[-1];//ee0[-1] = ee0[-1] + ee2[-1]; - ee2[ 0] = k00_20 * A[0] - k01_21 * A[1]; - ee2[-1] = k01_21 * A[0] + k00_20 * A[1]; - A += 8; - - k00_20 = ee0[-2] - ee2[-2]; - k01_21 = ee0[-3] - ee2[-3]; - ee0[-2] += ee2[-2];//ee0[-2] = ee0[-2] + ee2[-2]; - ee0[-3] += ee2[-3];//ee0[-3] = ee0[-3] + ee2[-3]; - ee2[-2] = k00_20 * A[0] - k01_21 * A[1]; - ee2[-3] = k01_21 * A[0] + k00_20 * A[1]; - A += 8; - - k00_20 = ee0[-4] - ee2[-4]; - k01_21 = ee0[-5] - ee2[-5]; - ee0[-4] += ee2[-4];//ee0[-4] = ee0[-4] + ee2[-4]; - ee0[-5] += ee2[-5];//ee0[-5] = ee0[-5] + ee2[-5]; - ee2[-4] = k00_20 * A[0] - k01_21 * A[1]; - ee2[-5] = k01_21 * A[0] + k00_20 * A[1]; - A += 8; - - k00_20 = ee0[-6] - ee2[-6]; - k01_21 = ee0[-7] - ee2[-7]; - ee0[-6] += ee2[-6];//ee0[-6] = ee0[-6] + ee2[-6]; - ee0[-7] += ee2[-7];//ee0[-7] = ee0[-7] + ee2[-7]; - ee2[-6] = k00_20 * A[0] - k01_21 * A[1]; - ee2[-7] = k01_21 * A[0] + k00_20 * A[1]; - A += 8; - ee0 -= 8; - ee2 -= 8; - } -} - -static void imdct_step3_inner_r_loop(int lim, float *e, int d0, int k_off, float *A, int k1) -{ - int i; - float k00_20, k01_21; - - float *e0 = e + d0; - float *e2 = e0 + k_off; - - for (i=lim >> 2; i > 0; --i) { - k00_20 = e0[-0] - e2[-0]; - k01_21 = e0[-1] - e2[-1]; - e0[-0] += e2[-0];//e0[-0] = e0[-0] + e2[-0]; - e0[-1] += e2[-1];//e0[-1] = e0[-1] + e2[-1]; - e2[-0] = (k00_20)*A[0] - (k01_21) * A[1]; - e2[-1] = (k01_21)*A[0] + (k00_20) * A[1]; - - A += k1; - - k00_20 = e0[-2] - e2[-2]; - k01_21 = e0[-3] - e2[-3]; - e0[-2] += e2[-2];//e0[-2] = e0[-2] + e2[-2]; - e0[-3] += e2[-3];//e0[-3] = e0[-3] + e2[-3]; - e2[-2] = (k00_20)*A[0] - (k01_21) * A[1]; - e2[-3] = (k01_21)*A[0] + (k00_20) * A[1]; - - A += k1; - - k00_20 = e0[-4] - e2[-4]; - k01_21 = e0[-5] - e2[-5]; - e0[-4] += e2[-4];//e0[-4] = e0[-4] + e2[-4]; - e0[-5] += e2[-5];//e0[-5] = e0[-5] + e2[-5]; - e2[-4] = (k00_20)*A[0] - (k01_21) * A[1]; - e2[-5] = (k01_21)*A[0] + (k00_20) * A[1]; - - A += k1; - - k00_20 = e0[-6] - e2[-6]; - k01_21 = e0[-7] - e2[-7]; - e0[-6] += e2[-6];//e0[-6] = e0[-6] + e2[-6]; - e0[-7] += e2[-7];//e0[-7] = e0[-7] + e2[-7]; - e2[-6] = (k00_20)*A[0] - (k01_21) * A[1]; - e2[-7] = (k01_21)*A[0] + (k00_20) * A[1]; - - e0 -= 8; - e2 -= 8; - - A += k1; - } -} - -static void imdct_step3_inner_s_loop(int n, float *e, int i_off, int k_off, float *A, int a_off, int k0) -{ - int i; - float A0 = A[0]; - float A1 = A[0+1]; - float A2 = A[0+a_off]; - float A3 = A[0+a_off+1]; - float A4 = A[0+a_off*2+0]; - float A5 = A[0+a_off*2+1]; - float A6 = A[0+a_off*3+0]; - float A7 = A[0+a_off*3+1]; - - float k00,k11; - - float *ee0 = e +i_off; - float *ee2 = ee0+k_off; - - for (i=n; i > 0; --i) { - k00 = ee0[ 0] - ee2[ 0]; - k11 = ee0[-1] - ee2[-1]; - ee0[ 0] = ee0[ 0] + ee2[ 0]; - ee0[-1] = ee0[-1] + ee2[-1]; - ee2[ 0] = (k00) * A0 - (k11) * A1; - ee2[-1] = (k11) * A0 + (k00) * A1; - - k00 = ee0[-2] - ee2[-2]; - k11 = ee0[-3] - ee2[-3]; - ee0[-2] = ee0[-2] + ee2[-2]; - ee0[-3] = ee0[-3] + ee2[-3]; - ee2[-2] = (k00) * A2 - (k11) * A3; - ee2[-3] = (k11) * A2 + (k00) * A3; - - k00 = ee0[-4] - ee2[-4]; - k11 = ee0[-5] - ee2[-5]; - ee0[-4] = ee0[-4] + ee2[-4]; - ee0[-5] = ee0[-5] + ee2[-5]; - ee2[-4] = (k00) * A4 - (k11) * A5; - ee2[-5] = (k11) * A4 + (k00) * A5; - - k00 = ee0[-6] - ee2[-6]; - k11 = ee0[-7] - ee2[-7]; - ee0[-6] = ee0[-6] + ee2[-6]; - ee0[-7] = ee0[-7] + ee2[-7]; - ee2[-6] = (k00) * A6 - (k11) * A7; - ee2[-7] = (k11) * A6 + (k00) * A7; - - ee0 -= k0; - ee2 -= k0; - } -} - -static __forceinline void iter_54(float *z) -{ - float k00,k11,k22,k33; - float y0,y1,y2,y3; - - k00 = z[ 0] - z[-4]; - y0 = z[ 0] + z[-4]; - y2 = z[-2] + z[-6]; - k22 = z[-2] - z[-6]; - - z[-0] = y0 + y2; // z0 + z4 + z2 + z6 - z[-2] = y0 - y2; // z0 + z4 - z2 - z6 - - // done with y0,y2 - - k33 = z[-3] - z[-7]; - - z[-4] = k00 + k33; // z0 - z4 + z3 - z7 - z[-6] = k00 - k33; // z0 - z4 - z3 + z7 - - // done with k33 - - k11 = z[-1] - z[-5]; - y1 = z[-1] + z[-5]; - y3 = z[-3] + z[-7]; - - z[-1] = y1 + y3; // z1 + z5 + z3 + z7 - z[-3] = y1 - y3; // z1 + z5 - z3 - z7 - z[-5] = k11 - k22; // z1 - z5 + z2 - z6 - z[-7] = k11 + k22; // z1 - z5 - z2 + z6 -} - -static void imdct_step3_inner_s_loop_ld654(int n, float *e, int i_off, float *A, int base_n) -{ - int a_off = base_n >> 3; - float A2 = A[0+a_off]; - float *z = e + i_off; - float *base = z - 16 * n; - - while (z > base) { - float k00,k11; - float l00,l11; - - k00 = z[-0] - z[ -8]; - k11 = z[-1] - z[ -9]; - l00 = z[-2] - z[-10]; - l11 = z[-3] - z[-11]; - z[ -0] = z[-0] + z[ -8]; - z[ -1] = z[-1] + z[ -9]; - z[ -2] = z[-2] + z[-10]; - z[ -3] = z[-3] + z[-11]; - z[ -8] = k00; - z[ -9] = k11; - z[-10] = (l00+l11) * A2; - z[-11] = (l11-l00) * A2; - - k00 = z[ -4] - z[-12]; - k11 = z[ -5] - z[-13]; - l00 = z[ -6] - z[-14]; - l11 = z[ -7] - z[-15]; - z[ -4] = z[ -4] + z[-12]; - z[ -5] = z[ -5] + z[-13]; - z[ -6] = z[ -6] + z[-14]; - z[ -7] = z[ -7] + z[-15]; - z[-12] = k11; - z[-13] = -k00; - z[-14] = (l11-l00) * A2; - z[-15] = (l00+l11) * -A2; - - iter_54(z); - iter_54(z-8); - z -= 16; - } -} - -static void inverse_mdct(float *buffer, int n, vorb *f, int blocktype) -{ - int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l; - int ld; - // @OPTIMIZE: reduce register pressure by using fewer variables? - int save_point = temp_alloc_save(f); - float *buf2 = (float *) temp_alloc(f, n2 * sizeof(*buf2)); - float *u=NULL,*v=NULL; - // twiddle factors - float *A = f->A[blocktype]; - - // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio" - // See notes about bugs in that paper in less-optimal implementation 'inverse_mdct_old' after this function. - - // kernel from paper - - - // merged: - // copy and reflect spectral data - // step 0 - - // note that it turns out that the items added together during - // this step are, in fact, being added to themselves (as reflected - // by step 0). inexplicable inefficiency! this became obvious - // once I combined the passes. - - // so there's a missing 'times 2' here (for adding X to itself). - // this propagates through linearly to the end, where the numbers - // are 1/2 too small, and need to be compensated for. - - { - float *d,*e, *AA, *e_stop; - d = &buf2[n2-2]; - AA = A; - e = &buffer[0]; - e_stop = &buffer[n2]; - while (e != e_stop) { - d[1] = (e[0] * AA[0] - e[2]*AA[1]); - d[0] = (e[0] * AA[1] + e[2]*AA[0]); - d -= 2; - AA += 2; - e += 4; - } - - e = &buffer[n2-3]; - while (d >= buf2) { - d[1] = (-e[2] * AA[0] - -e[0]*AA[1]); - d[0] = (-e[2] * AA[1] + -e[0]*AA[0]); - d -= 2; - AA += 2; - e -= 4; - } - } - - // now we use symbolic names for these, so that we can - // possibly swap their meaning as we change which operations - // are in place - - u = buffer; - v = buf2; - - // step 2 (paper output is w, now u) - // this could be in place, but the data ends up in the wrong - // place... _somebody_'s got to swap it, so this is nominated - { - float *AA = &A[n2-8]; - float *d0,*d1, *e0, *e1; - - e0 = &v[n4]; - e1 = &v[0]; - - d0 = &u[n4]; - d1 = &u[0]; - - while (AA >= A) { - float v40_20, v41_21; - - v41_21 = e0[1] - e1[1]; - v40_20 = e0[0] - e1[0]; - d0[1] = e0[1] + e1[1]; - d0[0] = e0[0] + e1[0]; - d1[1] = v41_21*AA[4] - v40_20*AA[5]; - d1[0] = v40_20*AA[4] + v41_21*AA[5]; - - v41_21 = e0[3] - e1[3]; - v40_20 = e0[2] - e1[2]; - d0[3] = e0[3] + e1[3]; - d0[2] = e0[2] + e1[2]; - d1[3] = v41_21*AA[0] - v40_20*AA[1]; - d1[2] = v40_20*AA[0] + v41_21*AA[1]; - - AA -= 8; - - d0 += 4; - d1 += 4; - e0 += 4; - e1 += 4; - } - } - - // step 3 - ld = ilog(n) - 1; // ilog is off-by-one from normal definitions - - // optimized step 3: - - // the original step3 loop can be nested r inside s or s inside r; - // it's written originally as s inside r, but this is dumb when r - // iterates many times, and s few. So I have two copies of it and - // switch between them halfway. - - // this is iteration 0 of step 3 - imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*0, -(n >> 3), A); - imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*1, -(n >> 3), A); - - // this is iteration 1 of step 3 - imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*0, -(n >> 4), A, 16); - imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*1, -(n >> 4), A, 16); - imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*2, -(n >> 4), A, 16); - imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*3, -(n >> 4), A, 16); - - l=2; - for (; l < (ld-3)>>1; ++l) { - int k0 = n >> (l+2), k0_2 = k0>>1; - int lim = 1 << (l+1); - int i; - for (i=0; i < lim; ++i) - imdct_step3_inner_r_loop(n >> (l+4), u, n2-1 - k0*i, -k0_2, A, 1 << (l+3)); - } - - for (; l < ld-6; ++l) { - int k0 = n >> (l+2), k1 = 1 << (l+3), k0_2 = k0>>1; - int rlim = n >> (l+6), r; - int lim = 1 << (l+1); - int i_off; - float *A0 = A; - i_off = n2-1; - for (r=rlim; r > 0; --r) { - imdct_step3_inner_s_loop(lim, u, i_off, -k0_2, A0, k1, k0); - A0 += k1*4; - i_off -= 8; - } - } - - // iterations with count: - // ld-6,-5,-4 all interleaved together - // the big win comes from getting rid of needless flops - // due to the constants on pass 5 & 4 being all 1 and 0; - // combining them to be simultaneous to improve cache made little difference - imdct_step3_inner_s_loop_ld654(n >> 5, u, n2-1, A, n); - - // output is u - - // step 4, 5, and 6 - // cannot be in-place because of step 5 - { - uint16 *bitrev = f->bit_reverse[blocktype]; - // weirdly, I'd have thought reading sequentially and writing - // erratically would have been better than vice-versa, but in - // fact that's not what my testing showed. (That is, with - // j = bitreverse(i), do you read i and write j, or read j and write i.) - - float *d0 = &v[n4-4]; - float *d1 = &v[n2-4]; - while (d0 >= v) { - int k4; - - k4 = bitrev[0]; - d1[3] = u[k4+0]; - d1[2] = u[k4+1]; - d0[3] = u[k4+2]; - d0[2] = u[k4+3]; - - k4 = bitrev[1]; - d1[1] = u[k4+0]; - d1[0] = u[k4+1]; - d0[1] = u[k4+2]; - d0[0] = u[k4+3]; - - d0 -= 4; - d1 -= 4; - bitrev += 2; - } - } - // (paper output is u, now v) - - - // data must be in buf2 - assert(v == buf2); - - // step 7 (paper output is v, now v) - // this is now in place - { - float *C = f->C[blocktype]; - float *d, *e; - - d = v; - e = v + n2 - 4; - - while (d < e) { - float a02,a11,b0,b1,b2,b3; - - a02 = d[0] - e[2]; - a11 = d[1] + e[3]; - - b0 = C[1]*a02 + C[0]*a11; - b1 = C[1]*a11 - C[0]*a02; - - b2 = d[0] + e[ 2]; - b3 = d[1] - e[ 3]; - - d[0] = b2 + b0; - d[1] = b3 + b1; - e[2] = b2 - b0; - e[3] = b1 - b3; - - a02 = d[2] - e[0]; - a11 = d[3] + e[1]; - - b0 = C[3]*a02 + C[2]*a11; - b1 = C[3]*a11 - C[2]*a02; - - b2 = d[2] + e[ 0]; - b3 = d[3] - e[ 1]; - - d[2] = b2 + b0; - d[3] = b3 + b1; - e[0] = b2 - b0; - e[1] = b1 - b3; - - C += 4; - d += 4; - e -= 4; - } - } - - // data must be in buf2 - - - // step 8+decode (paper output is X, now buffer) - // this generates pairs of data a la 8 and pushes them directly through - // the decode kernel (pushing rather than pulling) to avoid having - // to make another pass later - - // this cannot POSSIBLY be in place, so we refer to the buffers directly - - { - float *d0,*d1,*d2,*d3; - - float *B = f->B[blocktype] + n2 - 8; - float *e = buf2 + n2 - 8; - d0 = &buffer[0]; - d1 = &buffer[n2-4]; - d2 = &buffer[n2]; - d3 = &buffer[n-4]; - while (e >= v) { - float p0,p1,p2,p3; - - p3 = e[6]*B[7] - e[7]*B[6]; - p2 = -e[6]*B[6] - e[7]*B[7]; - - d0[0] = p3; - d1[3] = - p3; - d2[0] = p2; - d3[3] = p2; - - p1 = e[4]*B[5] - e[5]*B[4]; - p0 = -e[4]*B[4] - e[5]*B[5]; - - d0[1] = p1; - d1[2] = - p1; - d2[1] = p0; - d3[2] = p0; - - p3 = e[2]*B[3] - e[3]*B[2]; - p2 = -e[2]*B[2] - e[3]*B[3]; - - d0[2] = p3; - d1[1] = - p3; - d2[2] = p2; - d3[1] = p2; - - p1 = e[0]*B[1] - e[1]*B[0]; - p0 = -e[0]*B[0] - e[1]*B[1]; - - d0[3] = p1; - d1[0] = - p1; - d2[3] = p0; - d3[0] = p0; - - B -= 8; - e -= 8; - d0 += 4; - d2 += 4; - d1 -= 4; - d3 -= 4; - } - } - - temp_free(f,buf2); - temp_alloc_restore(f,save_point); -} - -#if 0 -// this is the original version of the above code, if you want to optimize it from scratch -void inverse_mdct_naive(float *buffer, int n) -{ - float s; - float A[1 << 12], B[1 << 12], C[1 << 11]; - int i,k,k2,k4, n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l; - int n3_4 = n - n4, ld; - // how can they claim this only uses N words?! - // oh, because they're only used sparsely, whoops - float u[1 << 13], X[1 << 13], v[1 << 13], w[1 << 13]; - // set up twiddle factors - - for (k=k2=0; k < n4; ++k,k2+=2) { - A[k2 ] = (float) cos(4*k*M_PI/n); - A[k2+1] = (float) -sin(4*k*M_PI/n); - B[k2 ] = (float) cos((k2+1)*M_PI/n/2); - B[k2+1] = (float) sin((k2+1)*M_PI/n/2); - } - for (k=k2=0; k < n8; ++k,k2+=2) { - C[k2 ] = (float) cos(2*(k2+1)*M_PI/n); - C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n); - } - - // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio" - // Note there are bugs in that pseudocode, presumably due to them attempting - // to rename the arrays nicely rather than representing the way their actual - // implementation bounces buffers back and forth. As a result, even in the - // "some formulars corrected" version, a direct implementation fails. These - // are noted below as "paper bug". - - // copy and reflect spectral data - for (k=0; k < n2; ++k) u[k] = buffer[k]; - for ( ; k < n ; ++k) u[k] = -buffer[n - k - 1]; - // kernel from paper - // step 1 - for (k=k2=k4=0; k < n4; k+=1, k2+=2, k4+=4) { - v[n-k4-1] = (u[k4] - u[n-k4-1]) * A[k2] - (u[k4+2] - u[n-k4-3])*A[k2+1]; - v[n-k4-3] = (u[k4] - u[n-k4-1]) * A[k2+1] + (u[k4+2] - u[n-k4-3])*A[k2]; - } - // step 2 - for (k=k4=0; k < n8; k+=1, k4+=4) { - w[n2+3+k4] = v[n2+3+k4] + v[k4+3]; - w[n2+1+k4] = v[n2+1+k4] + v[k4+1]; - w[k4+3] = (v[n2+3+k4] - v[k4+3])*A[n2-4-k4] - (v[n2+1+k4]-v[k4+1])*A[n2-3-k4]; - w[k4+1] = (v[n2+1+k4] - v[k4+1])*A[n2-4-k4] + (v[n2+3+k4]-v[k4+3])*A[n2-3-k4]; - } - // step 3 - ld = ilog(n) - 1; // ilog is off-by-one from normal definitions - for (l=0; l < ld-3; ++l) { - int k0 = n >> (l+2), k1 = 1 << (l+3); - int rlim = n >> (l+4), r4, r; - int s2lim = 1 << (l+2), s2; - for (r=r4=0; r < rlim; r4+=4,++r) { - for (s2=0; s2 < s2lim; s2+=2) { - u[n-1-k0*s2-r4] = w[n-1-k0*s2-r4] + w[n-1-k0*(s2+1)-r4]; - u[n-3-k0*s2-r4] = w[n-3-k0*s2-r4] + w[n-3-k0*(s2+1)-r4]; - u[n-1-k0*(s2+1)-r4] = (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1] - - (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1+1]; - u[n-3-k0*(s2+1)-r4] = (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1] - + (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1+1]; - } - } - if (l+1 < ld-3) { - // paper bug: ping-ponging of u&w here is omitted - memcpy(w, u, sizeof(u)); - } - } - - // step 4 - for (i=0; i < n8; ++i) { - int j = bit_reverse(i) >> (32-ld+3); - assert(j < n8); - if (i == j) { - // paper bug: original code probably swapped in place; if copying, - // need to directly copy in this case - int i8 = i << 3; - v[i8+1] = u[i8+1]; - v[i8+3] = u[i8+3]; - v[i8+5] = u[i8+5]; - v[i8+7] = u[i8+7]; - } else if (i < j) { - int i8 = i << 3, j8 = j << 3; - v[j8+1] = u[i8+1], v[i8+1] = u[j8 + 1]; - v[j8+3] = u[i8+3], v[i8+3] = u[j8 + 3]; - v[j8+5] = u[i8+5], v[i8+5] = u[j8 + 5]; - v[j8+7] = u[i8+7], v[i8+7] = u[j8 + 7]; - } - } - // step 5 - for (k=0; k < n2; ++k) { - w[k] = v[k*2+1]; - } - // step 6 - for (k=k2=k4=0; k < n8; ++k, k2 += 2, k4 += 4) { - u[n-1-k2] = w[k4]; - u[n-2-k2] = w[k4+1]; - u[n3_4 - 1 - k2] = w[k4+2]; - u[n3_4 - 2 - k2] = w[k4+3]; - } - // step 7 - for (k=k2=0; k < n8; ++k, k2 += 2) { - v[n2 + k2 ] = ( u[n2 + k2] + u[n-2-k2] + C[k2+1]*(u[n2+k2]-u[n-2-k2]) + C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2; - v[n-2 - k2] = ( u[n2 + k2] + u[n-2-k2] - C[k2+1]*(u[n2+k2]-u[n-2-k2]) - C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2; - v[n2+1+ k2] = ( u[n2+1+k2] - u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2; - v[n-1 - k2] = (-u[n2+1+k2] + u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2; - } - // step 8 - for (k=k2=0; k < n4; ++k,k2 += 2) { - X[k] = v[k2+n2]*B[k2 ] + v[k2+1+n2]*B[k2+1]; - X[n2-1-k] = v[k2+n2]*B[k2+1] - v[k2+1+n2]*B[k2 ]; - } - - // decode kernel to output - // determined the following value experimentally - // (by first figuring out what made inverse_mdct_slow work); then matching that here - // (probably vorbis encoder premultiplies by n or n/2, to save it on the decoder?) - s = 0.5; // theoretically would be n4 - - // [[[ note! the s value of 0.5 is compensated for by the B[] in the current code, - // so it needs to use the "old" B values to behave correctly, or else - // set s to 1.0 ]]] - for (i=0; i < n4 ; ++i) buffer[i] = s * X[i+n4]; - for ( ; i < n3_4; ++i) buffer[i] = -s * X[n3_4 - i - 1]; - for ( ; i < n ; ++i) buffer[i] = -s * X[i - n3_4]; -} -#endif - -static float *get_window(vorb *f, int len) -{ - len <<= 1; - if (len == f->blocksize_0) return f->window[0]; - if (len == f->blocksize_1) return f->window[1]; - return NULL; -} - -#ifndef STB_VORBIS_NO_DEFER_FLOOR -typedef int16 YTYPE; -#else -typedef int YTYPE; -#endif -static int do_floor(vorb *f, Mapping *map, int i, int n, float *target, YTYPE *finalY, uint8 *step2_flag) -{ - int n2 = n >> 1; - int s = map->chan[i].mux, floor; - floor = map->submap_floor[s]; - if (f->floor_types[floor] == 0) { - return error(f, VORBIS_invalid_stream); - } else { - Floor1 *g = &f->floor_config[floor].floor1; - int j,q; - int lx = 0, ly = finalY[0] * g->floor1_multiplier; - for (q=1; q < g->values; ++q) { - j = g->sorted_order[q]; - #ifndef STB_VORBIS_NO_DEFER_FLOOR - STBV_NOTUSED(step2_flag); - if (finalY[j] >= 0) - #else - if (step2_flag[j]) - #endif - { - int hy = finalY[j] * g->floor1_multiplier; - int hx = g->Xlist[j]; - if (lx != hx) - draw_line(target, lx,ly, hx,hy, n2); - CHECK(f); - lx = hx, ly = hy; - } - } - if (lx < n2) { - // optimization of: draw_line(target, lx,ly, n,ly, n2); - for (j=lx; j < n2; ++j) - LINE_OP(target[j], inverse_db_table[ly]); - CHECK(f); - } - } - return TRUE; -} - -// The meaning of "left" and "right" -// -// For a given frame: -// we compute samples from 0..n -// window_center is n/2 -// we'll window and mix the samples from left_start to left_end with data from the previous frame -// all of the samples from left_end to right_start can be output without mixing; however, -// this interval is 0-length except when transitioning between short and long frames -// all of the samples from right_start to right_end need to be mixed with the next frame, -// which we don't have, so those get saved in a buffer -// frame N's right_end-right_start, the number of samples to mix with the next frame, -// has to be the same as frame N+1's left_end-left_start (which they are by -// construction) - -static int vorbis_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode) -{ - Mode *m; - int i, n, prev, next, window_center; - f->channel_buffer_start = f->channel_buffer_end = 0; - - retry: - if (f->eof) return FALSE; - if (!maybe_start_packet(f)) - return FALSE; - // check packet type - if (get_bits(f,1) != 0) { - if (IS_PUSH_MODE(f)) - return error(f,VORBIS_bad_packet_type); - while (EOP != get8_packet(f)); - goto retry; - } - - if (f->alloc.alloc_buffer) - assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); - - i = get_bits(f, ilog(f->mode_count-1)); - if (i == EOP) return FALSE; - if (i >= f->mode_count) return FALSE; - *mode = i; - m = f->mode_config + i; - if (m->blockflag) { - n = f->blocksize_1; - prev = get_bits(f,1); - next = get_bits(f,1); - } else { - prev = next = 0; - n = f->blocksize_0; - } - -// WINDOWING - - window_center = n >> 1; - if (m->blockflag && !prev) { - *p_left_start = (n - f->blocksize_0) >> 2; - *p_left_end = (n + f->blocksize_0) >> 2; - } else { - *p_left_start = 0; - *p_left_end = window_center; - } - if (m->blockflag && !next) { - *p_right_start = (n*3 - f->blocksize_0) >> 2; - *p_right_end = (n*3 + f->blocksize_0) >> 2; - } else { - *p_right_start = window_center; - *p_right_end = n; - } - - return TRUE; -} - -static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start, int left_end, int right_start, int right_end, int *p_left) -{ - Mapping *map; - int i,j,k,n,n2; - int zero_channel[256]; - int really_zero_channel[256]; - -// WINDOWING - - STBV_NOTUSED(left_end); - n = f->blocksize[m->blockflag]; - map = &f->mapping[m->mapping]; - -// FLOORS - n2 = n >> 1; - - CHECK(f); - - for (i=0; i < f->channels; ++i) { - int s = map->chan[i].mux, floor; - zero_channel[i] = FALSE; - floor = map->submap_floor[s]; - if (f->floor_types[floor] == 0) { - return error(f, VORBIS_invalid_stream); - } else { - Floor1 *g = &f->floor_config[floor].floor1; - if (get_bits(f, 1)) { - short *finalY; - uint8 step2_flag[256]; - static int range_list[4] = { 256, 128, 86, 64 }; - int range = range_list[g->floor1_multiplier-1]; - int offset = 2; - finalY = f->finalY[i]; - finalY[0] = get_bits(f, ilog(range)-1); - finalY[1] = get_bits(f, ilog(range)-1); - for (j=0; j < g->partitions; ++j) { - int pclass = g->partition_class_list[j]; - int cdim = g->class_dimensions[pclass]; - int cbits = g->class_subclasses[pclass]; - int csub = (1 << cbits)-1; - int cval = 0; - if (cbits) { - Codebook *c = f->codebooks + g->class_masterbooks[pclass]; - DECODE(cval,f,c); - } - for (k=0; k < cdim; ++k) { - int book = g->subclass_books[pclass][cval & csub]; - cval = cval >> cbits; - if (book >= 0) { - int temp; - Codebook *c = f->codebooks + book; - DECODE(temp,f,c); - finalY[offset++] = temp; - } else - finalY[offset++] = 0; - } - } - if (f->valid_bits == INVALID_BITS) goto error; // behavior according to spec - step2_flag[0] = step2_flag[1] = 1; - for (j=2; j < g->values; ++j) { - int low, high, pred, highroom, lowroom, room, val; - low = g->neighbors[j][0]; - high = g->neighbors[j][1]; - //neighbors(g->Xlist, j, &low, &high); - pred = predict_point(g->Xlist[j], g->Xlist[low], g->Xlist[high], finalY[low], finalY[high]); - val = finalY[j]; - highroom = range - pred; - lowroom = pred; - if (highroom < lowroom) - room = highroom * 2; - else - room = lowroom * 2; - if (val) { - step2_flag[low] = step2_flag[high] = 1; - step2_flag[j] = 1; - if (val >= room) - if (highroom > lowroom) - finalY[j] = val - lowroom + pred; - else - finalY[j] = pred - val + highroom - 1; - else - if (val & 1) - finalY[j] = pred - ((val+1)>>1); - else - finalY[j] = pred + (val>>1); - } else { - step2_flag[j] = 0; - finalY[j] = pred; - } - } - -#ifdef STB_VORBIS_NO_DEFER_FLOOR - do_floor(f, map, i, n, f->floor_buffers[i], finalY, step2_flag); -#else - // defer final floor computation until _after_ residue - for (j=0; j < g->values; ++j) { - if (!step2_flag[j]) - finalY[j] = -1; - } -#endif - } else { - error: - zero_channel[i] = TRUE; - } - // So we just defer everything else to later - - // at this point we've decoded the floor into buffer - } - } - CHECK(f); - // at this point we've decoded all floors - - if (f->alloc.alloc_buffer) - assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); - - // re-enable coupled channels if necessary - memcpy(really_zero_channel, zero_channel, sizeof(really_zero_channel[0]) * f->channels); - for (i=0; i < map->coupling_steps; ++i) - if (!zero_channel[map->chan[i].magnitude] || !zero_channel[map->chan[i].angle]) { - zero_channel[map->chan[i].magnitude] = zero_channel[map->chan[i].angle] = FALSE; - } - - CHECK(f); -// RESIDUE DECODE - for (i=0; i < map->submaps; ++i) { - float *residue_buffers[STB_VORBIS_MAX_CHANNELS]; - int r; - uint8 do_not_decode[256]; - int ch = 0; - for (j=0; j < f->channels; ++j) { - if (map->chan[j].mux == i) { - if (zero_channel[j]) { - do_not_decode[ch] = TRUE; - residue_buffers[ch] = NULL; - } else { - do_not_decode[ch] = FALSE; - residue_buffers[ch] = f->channel_buffers[j]; - } - ++ch; - } - } - r = map->submap_residue[i]; - decode_residue(f, residue_buffers, ch, n2, r, do_not_decode); - } - - if (f->alloc.alloc_buffer) - assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); - CHECK(f); - -// INVERSE COUPLING - for (i = map->coupling_steps-1; i >= 0; --i) { - int n2 = n >> 1; - float *m = f->channel_buffers[map->chan[i].magnitude]; - float *a = f->channel_buffers[map->chan[i].angle ]; - for (j=0; j < n2; ++j) { - float a2,m2; - if (m[j] > 0) - if (a[j] > 0) - m2 = m[j], a2 = m[j] - a[j]; - else - a2 = m[j], m2 = m[j] + a[j]; - else - if (a[j] > 0) - m2 = m[j], a2 = m[j] + a[j]; - else - a2 = m[j], m2 = m[j] - a[j]; - m[j] = m2; - a[j] = a2; - } - } - CHECK(f); - - // finish decoding the floors -#ifndef STB_VORBIS_NO_DEFER_FLOOR - for (i=0; i < f->channels; ++i) { - if (really_zero_channel[i]) { - memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2); - } else { - do_floor(f, map, i, n, f->channel_buffers[i], f->finalY[i], NULL); - } - } -#else - for (i=0; i < f->channels; ++i) { - if (really_zero_channel[i]) { - memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2); - } else { - for (j=0; j < n2; ++j) - f->channel_buffers[i][j] *= f->floor_buffers[i][j]; - } - } -#endif - -// INVERSE MDCT - CHECK(f); - for (i=0; i < f->channels; ++i) - inverse_mdct(f->channel_buffers[i], n, f, m->blockflag); - CHECK(f); - - // this shouldn't be necessary, unless we exited on an error - // and want to flush to get to the next packet - flush_packet(f); - - if (f->first_decode) { - // assume we start so first non-discarded sample is sample 0 - // this isn't to spec, but spec would require us to read ahead - // and decode the size of all current frames--could be done, - // but presumably it's not a commonly used feature - f->current_loc = 0u - n2; // start of first frame is positioned for discard (NB this is an intentional unsigned overflow/wrap-around) - // we might have to discard samples "from" the next frame too, - // if we're lapping a large block then a small at the start? - f->discard_samples_deferred = n - right_end; - f->current_loc_valid = TRUE; - f->first_decode = FALSE; - } else if (f->discard_samples_deferred) { - if (f->discard_samples_deferred >= right_start - left_start) { - f->discard_samples_deferred -= (right_start - left_start); - left_start = right_start; - *p_left = left_start; - } else { - left_start += f->discard_samples_deferred; - *p_left = left_start; - f->discard_samples_deferred = 0; - } - } else if (f->previous_length == 0 && f->current_loc_valid) { - // we're recovering from a seek... that means we're going to discard - // the samples from this packet even though we know our position from - // the last page header, so we need to update the position based on - // the discarded samples here - // but wait, the code below is going to add this in itself even - // on a discard, so we don't need to do it here... - } - - // check if we have ogg information about the sample # for this packet - if (f->last_seg_which == f->end_seg_with_known_loc) { - // if we have a valid current loc, and this is final: - if (f->current_loc_valid && (f->page_flag & PAGEFLAG_last_page)) { - uint32 current_end = f->known_loc_for_packet; - // then let's infer the size of the (probably) short final frame - if (current_end < f->current_loc + (right_end-left_start)) { - if (current_end < f->current_loc) { - // negative truncation, that's impossible! - *len = 0; - } else { - *len = current_end - f->current_loc; - } - *len += left_start; // this doesn't seem right, but has no ill effect on my test files - if (*len > right_end) *len = right_end; // this should never happen - f->current_loc += *len; - return TRUE; - } - } - // otherwise, just set our sample loc - // guess that the ogg granule pos refers to the _middle_ of the - // last frame? - // set f->current_loc to the position of left_start - f->current_loc = f->known_loc_for_packet - (n2-left_start); - f->current_loc_valid = TRUE; - } - if (f->current_loc_valid) - f->current_loc += (right_start - left_start); - - if (f->alloc.alloc_buffer) - assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); - *len = right_end; // ignore samples after the window goes to 0 - CHECK(f); - - return TRUE; -} - -static int vorbis_decode_packet(vorb *f, int *len, int *p_left, int *p_right) -{ - int mode, left_end, right_end; - if (!vorbis_decode_initial(f, p_left, &left_end, p_right, &right_end, &mode)) return 0; - return vorbis_decode_packet_rest(f, len, f->mode_config + mode, *p_left, left_end, *p_right, right_end, p_left); -} - -static int vorbis_finish_frame(stb_vorbis *f, int len, int left, int right) -{ - int prev,i,j; - // we use right&left (the start of the right- and left-window sin()-regions) - // to determine how much to return, rather than inferring from the rules - // (same result, clearer code); 'left' indicates where our sin() window - // starts, therefore where the previous window's right edge starts, and - // therefore where to start mixing from the previous buffer. 'right' - // indicates where our sin() ending-window starts, therefore that's where - // we start saving, and where our returned-data ends. - - // mixin from previous window - if (f->previous_length) { - int i,j, n = f->previous_length; - float *w = get_window(f, n); - if (w == NULL) return 0; - for (i=0; i < f->channels; ++i) { - for (j=0; j < n; ++j) - f->channel_buffers[i][left+j] = - f->channel_buffers[i][left+j]*w[ j] + - f->previous_window[i][ j]*w[n-1-j]; - } - } - - prev = f->previous_length; - - // last half of this data becomes previous window - f->previous_length = len - right; - - // @OPTIMIZE: could avoid this copy by double-buffering the - // output (flipping previous_window with channel_buffers), but - // then previous_window would have to be 2x as large, and - // channel_buffers couldn't be temp mem (although they're NOT - // currently temp mem, they could be (unless we want to level - // performance by spreading out the computation)) - for (i=0; i < f->channels; ++i) - for (j=0; right+j < len; ++j) - f->previous_window[i][j] = f->channel_buffers[i][right+j]; - - if (!prev) - // there was no previous packet, so this data isn't valid... - // this isn't entirely true, only the would-have-overlapped data - // isn't valid, but this seems to be what the spec requires - return 0; - - // truncate a short frame - if (len < right) right = len; - - f->samples_output += right-left; - - return right - left; -} - -static int vorbis_pump_first_frame(stb_vorbis *f) -{ - int len, right, left, res; - res = vorbis_decode_packet(f, &len, &left, &right); - if (res) - vorbis_finish_frame(f, len, left, right); - return res; -} - -#ifndef STB_VORBIS_NO_PUSHDATA_API -static int is_whole_packet_present(stb_vorbis *f) -{ - // make sure that we have the packet available before continuing... - // this requires a full ogg parse, but we know we can fetch from f->stream - - // instead of coding this out explicitly, we could save the current read state, - // read the next packet with get8() until end-of-packet, check f->eof, then - // reset the state? but that would be slower, esp. since we'd have over 256 bytes - // of state to restore (primarily the page segment table) - - int s = f->next_seg, first = TRUE; - uint8 *p = f->stream; - - if (s != -1) { // if we're not starting the packet with a 'continue on next page' flag - for (; s < f->segment_count; ++s) { - p += f->segments[s]; - if (f->segments[s] < 255) // stop at first short segment - break; - } - // either this continues, or it ends it... - if (s == f->segment_count) - s = -1; // set 'crosses page' flag - if (p > f->stream_end) return error(f, VORBIS_need_more_data); - first = FALSE; - } - for (; s == -1;) { - uint8 *q; - int n; - - // check that we have the page header ready - if (p + 26 >= f->stream_end) return error(f, VORBIS_need_more_data); - // validate the page - if (memcmp(p, ogg_page_header, 4)) return error(f, VORBIS_invalid_stream); - if (p[4] != 0) return error(f, VORBIS_invalid_stream); - if (first) { // the first segment must NOT have 'continued_packet', later ones MUST - if (f->previous_length) - if ((p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream); - // if no previous length, we're resynching, so we can come in on a continued-packet, - // which we'll just drop - } else { - if (!(p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream); - } - n = p[26]; // segment counts - q = p+27; // q points to segment table - p = q + n; // advance past header - // make sure we've read the segment table - if (p > f->stream_end) return error(f, VORBIS_need_more_data); - for (s=0; s < n; ++s) { - p += q[s]; - if (q[s] < 255) - break; - } - if (s == n) - s = -1; // set 'crosses page' flag - if (p > f->stream_end) return error(f, VORBIS_need_more_data); - first = FALSE; - } - return TRUE; -} -#endif // !STB_VORBIS_NO_PUSHDATA_API - -static int start_decoder(vorb *f) -{ - uint8 header[6], x,y; - int len,i,j,k, max_submaps = 0; - int longest_floorlist=0; - - // first page, first packet - f->first_decode = TRUE; - - if (!start_page(f)) return FALSE; - // validate page flag - if (!(f->page_flag & PAGEFLAG_first_page)) return error(f, VORBIS_invalid_first_page); - if (f->page_flag & PAGEFLAG_last_page) return error(f, VORBIS_invalid_first_page); - if (f->page_flag & PAGEFLAG_continued_packet) return error(f, VORBIS_invalid_first_page); - // check for expected packet length - if (f->segment_count != 1) return error(f, VORBIS_invalid_first_page); - if (f->segments[0] != 30) { - // check for the Ogg skeleton fishead identifying header to refine our error - if (f->segments[0] == 64 && - getn(f, header, 6) && - header[0] == 'f' && - header[1] == 'i' && - header[2] == 's' && - header[3] == 'h' && - header[4] == 'e' && - header[5] == 'a' && - get8(f) == 'd' && - get8(f) == '\0') return error(f, VORBIS_ogg_skeleton_not_supported); - else - return error(f, VORBIS_invalid_first_page); - } - - // read packet - // check packet header - if (get8(f) != VORBIS_packet_id) return error(f, VORBIS_invalid_first_page); - if (!getn(f, header, 6)) return error(f, VORBIS_unexpected_eof); - if (!vorbis_validate(header)) return error(f, VORBIS_invalid_first_page); - // vorbis_version - if (get32(f) != 0) return error(f, VORBIS_invalid_first_page); - f->channels = get8(f); if (!f->channels) return error(f, VORBIS_invalid_first_page); - if (f->channels > STB_VORBIS_MAX_CHANNELS) return error(f, VORBIS_too_many_channels); - f->sample_rate = get32(f); if (!f->sample_rate) return error(f, VORBIS_invalid_first_page); - get32(f); // bitrate_maximum - get32(f); // bitrate_nominal - get32(f); // bitrate_minimum - x = get8(f); - { - int log0,log1; - log0 = x & 15; - log1 = x >> 4; - f->blocksize_0 = 1 << log0; - f->blocksize_1 = 1 << log1; - if (log0 < 6 || log0 > 13) return error(f, VORBIS_invalid_setup); - if (log1 < 6 || log1 > 13) return error(f, VORBIS_invalid_setup); - if (log0 > log1) return error(f, VORBIS_invalid_setup); - } - - // framing_flag - x = get8(f); - if (!(x & 1)) return error(f, VORBIS_invalid_first_page); - - // second packet! - if (!start_page(f)) return FALSE; - - if (!start_packet(f)) return FALSE; - - if (!next_segment(f)) return FALSE; - - if (get8_packet(f) != VORBIS_packet_comment) return error(f, VORBIS_invalid_setup); - for (i=0; i < 6; ++i) header[i] = get8_packet(f); - if (!vorbis_validate(header)) return error(f, VORBIS_invalid_setup); - //file vendor - len = get32_packet(f); - f->vendor = (char*)setup_malloc(f, sizeof(char) * (len+1)); - if (f->vendor == NULL) return error(f, VORBIS_outofmem); - for(i=0; i < len; ++i) { - f->vendor[i] = get8_packet(f); - } - f->vendor[len] = (char)'\0'; - //user comments - f->comment_list_length = get32_packet(f); - f->comment_list = NULL; - if (f->comment_list_length > 0) - { - f->comment_list = (char**) setup_malloc(f, sizeof(char*) * (f->comment_list_length)); - if (f->comment_list == NULL) return error(f, VORBIS_outofmem); - } - - for(i=0; i < f->comment_list_length; ++i) { - len = get32_packet(f); - f->comment_list[i] = (char*)setup_malloc(f, sizeof(char) * (len+1)); - if (f->comment_list[i] == NULL) return error(f, VORBIS_outofmem); - - for(j=0; j < len; ++j) { - f->comment_list[i][j] = get8_packet(f); - } - f->comment_list[i][len] = (char)'\0'; - } - - // framing_flag - x = get8_packet(f); - if (!(x & 1)) return error(f, VORBIS_invalid_setup); - - - skip(f, f->bytes_in_seg); - f->bytes_in_seg = 0; - - do { - len = next_segment(f); - skip(f, len); - f->bytes_in_seg = 0; - } while (len); - - // third packet! - if (!start_packet(f)) return FALSE; - - #ifndef STB_VORBIS_NO_PUSHDATA_API - if (IS_PUSH_MODE(f)) { - if (!is_whole_packet_present(f)) { - // convert error in ogg header to write type - if (f->error == VORBIS_invalid_stream) - f->error = VORBIS_invalid_setup; - return FALSE; - } - } - #endif - - crc32_init(); // always init it, to avoid multithread race conditions - - if (get8_packet(f) != VORBIS_packet_setup) return error(f, VORBIS_invalid_setup); - for (i=0; i < 6; ++i) header[i] = get8_packet(f); - if (!vorbis_validate(header)) return error(f, VORBIS_invalid_setup); - - // codebooks - - f->codebook_count = get_bits(f,8) + 1; - f->codebooks = (Codebook *) setup_malloc(f, sizeof(*f->codebooks) * f->codebook_count); - if (f->codebooks == NULL) return error(f, VORBIS_outofmem); - memset(f->codebooks, 0, sizeof(*f->codebooks) * f->codebook_count); - for (i=0; i < f->codebook_count; ++i) { - uint32 *values; - int ordered, sorted_count; - int total=0; - uint8 *lengths; - Codebook *c = f->codebooks+i; - CHECK(f); - x = get_bits(f, 8); if (x != 0x42) return error(f, VORBIS_invalid_setup); - x = get_bits(f, 8); if (x != 0x43) return error(f, VORBIS_invalid_setup); - x = get_bits(f, 8); if (x != 0x56) return error(f, VORBIS_invalid_setup); - x = get_bits(f, 8); - c->dimensions = (get_bits(f, 8)<<8) + x; - x = get_bits(f, 8); - y = get_bits(f, 8); - c->entries = (get_bits(f, 8)<<16) + (y<<8) + x; - ordered = get_bits(f,1); - c->sparse = ordered ? 0 : get_bits(f,1); - - if (c->dimensions == 0 && c->entries != 0) return error(f, VORBIS_invalid_setup); - - if (c->sparse) - lengths = (uint8 *) setup_temp_malloc(f, c->entries); - else - lengths = c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries); - - if (!lengths) return error(f, VORBIS_outofmem); - - if (ordered) { - int current_entry = 0; - int current_length = get_bits(f,5) + 1; - while (current_entry < c->entries) { - int limit = c->entries - current_entry; - int n = get_bits(f, ilog(limit)); - if (current_length >= 32) return error(f, VORBIS_invalid_setup); - if (current_entry + n > (int) c->entries) { return error(f, VORBIS_invalid_setup); } - memset(lengths + current_entry, current_length, n); - current_entry += n; - ++current_length; - } - } else { - for (j=0; j < c->entries; ++j) { - int present = c->sparse ? get_bits(f,1) : 1; - if (present) { - lengths[j] = get_bits(f, 5) + 1; - ++total; - if (lengths[j] == 32) - return error(f, VORBIS_invalid_setup); - } else { - lengths[j] = NO_CODE; - } - } - } - - if (c->sparse && total >= c->entries >> 2) { - // convert sparse items to non-sparse! - if (c->entries > (int) f->setup_temp_memory_required) - f->setup_temp_memory_required = c->entries; - - c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries); - if (c->codeword_lengths == NULL) return error(f, VORBIS_outofmem); - memcpy(c->codeword_lengths, lengths, c->entries); - setup_temp_free(f, lengths, c->entries); // note this is only safe if there have been no intervening temp mallocs! - lengths = c->codeword_lengths; - c->sparse = 0; - } - - // compute the size of the sorted tables - if (c->sparse) { - sorted_count = total; - } else { - sorted_count = 0; - #ifndef STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH - for (j=0; j < c->entries; ++j) - if (lengths[j] > STB_VORBIS_FAST_HUFFMAN_LENGTH && lengths[j] != NO_CODE) - ++sorted_count; - #endif - } - - c->sorted_entries = sorted_count; - values = NULL; - - CHECK(f); - if (!c->sparse) { - c->codewords = (uint32 *) setup_malloc(f, sizeof(c->codewords[0]) * c->entries); - if (!c->codewords) return error(f, VORBIS_outofmem); - } else { - unsigned int size; - if (c->sorted_entries) { - c->codeword_lengths = (uint8 *) setup_malloc(f, c->sorted_entries); - if (!c->codeword_lengths) return error(f, VORBIS_outofmem); - c->codewords = (uint32 *) setup_temp_malloc(f, sizeof(*c->codewords) * c->sorted_entries); - if (!c->codewords) return error(f, VORBIS_outofmem); - values = (uint32 *) setup_temp_malloc(f, sizeof(*values) * c->sorted_entries); - if (!values) return error(f, VORBIS_outofmem); - } - size = c->entries + (sizeof(*c->codewords) + sizeof(*values)) * c->sorted_entries; - if (size > f->setup_temp_memory_required) - f->setup_temp_memory_required = size; - } - - if (!compute_codewords(c, lengths, c->entries, values)) { - if (c->sparse) setup_temp_free(f, values, 0); - return error(f, VORBIS_invalid_setup); - } - - if (c->sorted_entries) { - // allocate an extra slot for sentinels - c->sorted_codewords = (uint32 *) setup_malloc(f, sizeof(*c->sorted_codewords) * (c->sorted_entries+1)); - if (c->sorted_codewords == NULL) return error(f, VORBIS_outofmem); - // allocate an extra slot at the front so that c->sorted_values[-1] is defined - // so that we can catch that case without an extra if - c->sorted_values = ( int *) setup_malloc(f, sizeof(*c->sorted_values ) * (c->sorted_entries+1)); - if (c->sorted_values == NULL) return error(f, VORBIS_outofmem); - ++c->sorted_values; - c->sorted_values[-1] = -1; - compute_sorted_huffman(c, lengths, values); - } - - if (c->sparse) { - setup_temp_free(f, values, sizeof(*values)*c->sorted_entries); - setup_temp_free(f, c->codewords, sizeof(*c->codewords)*c->sorted_entries); - setup_temp_free(f, lengths, c->entries); - c->codewords = NULL; - } - - compute_accelerated_huffman(c); - - CHECK(f); - c->lookup_type = get_bits(f, 4); - if (c->lookup_type > 2) return error(f, VORBIS_invalid_setup); - if (c->lookup_type > 0) { - uint16 *mults; - c->minimum_value = float32_unpack(get_bits(f, 32)); - c->delta_value = float32_unpack(get_bits(f, 32)); - c->value_bits = get_bits(f, 4)+1; - c->sequence_p = get_bits(f,1); - if (c->lookup_type == 1) { - int values = lookup1_values(c->entries, c->dimensions); - if (values < 0) return error(f, VORBIS_invalid_setup); - c->lookup_values = (uint32) values; - } else { - c->lookup_values = c->entries * c->dimensions; - } - if (c->lookup_values == 0) return error(f, VORBIS_invalid_setup); - mults = (uint16 *) setup_temp_malloc(f, sizeof(mults[0]) * c->lookup_values); - if (mults == NULL) return error(f, VORBIS_outofmem); - for (j=0; j < (int) c->lookup_values; ++j) { - int q = get_bits(f, c->value_bits); - if (q == EOP) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_invalid_setup); } - mults[j] = q; - } - -#ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK - if (c->lookup_type == 1) { - int len, sparse = c->sparse; - float last=0; - // pre-expand the lookup1-style multiplicands, to avoid a divide in the inner loop - if (sparse) { - if (c->sorted_entries == 0) goto skip; - c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->sorted_entries * c->dimensions); - } else - c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->entries * c->dimensions); - if (c->multiplicands == NULL) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_outofmem); } - len = sparse ? c->sorted_entries : c->entries; - for (j=0; j < len; ++j) { - unsigned int z = sparse ? c->sorted_values[j] : j; - unsigned int div=1; - for (k=0; k < c->dimensions; ++k) { - int off = (z / div) % c->lookup_values; - float val = mults[off]*c->delta_value + c->minimum_value + last; - c->multiplicands[j*c->dimensions + k] = val; - if (c->sequence_p) - last = val; - if (k+1 < c->dimensions) { - if (div > UINT_MAX / (unsigned int) c->lookup_values) { - setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); - return error(f, VORBIS_invalid_setup); - } - div *= c->lookup_values; - } - } - } - c->lookup_type = 2; - } - else -#endif - { - float last=0; - CHECK(f); - c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->lookup_values); - if (c->multiplicands == NULL) { setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_outofmem); } - for (j=0; j < (int) c->lookup_values; ++j) { - float val = mults[j] * c->delta_value + c->minimum_value + last; - c->multiplicands[j] = val; - if (c->sequence_p) - last = val; - } - } -#ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK - skip:; -#endif - setup_temp_free(f, mults, sizeof(mults[0])*c->lookup_values); - - CHECK(f); - } - CHECK(f); - } - - // time domain transfers (notused) - - x = get_bits(f, 6) + 1; - for (i=0; i < x; ++i) { - uint32 z = get_bits(f, 16); - if (z != 0) return error(f, VORBIS_invalid_setup); - } - - // Floors - f->floor_count = get_bits(f, 6)+1; - f->floor_config = (Floor *) setup_malloc(f, f->floor_count * sizeof(*f->floor_config)); - if (f->floor_config == NULL) return error(f, VORBIS_outofmem); - for (i=0; i < f->floor_count; ++i) { - f->floor_types[i] = get_bits(f, 16); - if (f->floor_types[i] > 1) return error(f, VORBIS_invalid_setup); - if (f->floor_types[i] == 0) { - Floor0 *g = &f->floor_config[i].floor0; - g->order = get_bits(f,8); - g->rate = get_bits(f,16); - g->bark_map_size = get_bits(f,16); - g->amplitude_bits = get_bits(f,6); - g->amplitude_offset = get_bits(f,8); - g->number_of_books = get_bits(f,4) + 1; - for (j=0; j < g->number_of_books; ++j) - g->book_list[j] = get_bits(f,8); - return error(f, VORBIS_feature_not_supported); - } else { - stbv__floor_ordering p[31*8+2]; - Floor1 *g = &f->floor_config[i].floor1; - int max_class = -1; - g->partitions = get_bits(f, 5); - for (j=0; j < g->partitions; ++j) { - g->partition_class_list[j] = get_bits(f, 4); - if (g->partition_class_list[j] > max_class) - max_class = g->partition_class_list[j]; - } - for (j=0; j <= max_class; ++j) { - g->class_dimensions[j] = get_bits(f, 3)+1; - g->class_subclasses[j] = get_bits(f, 2); - if (g->class_subclasses[j]) { - g->class_masterbooks[j] = get_bits(f, 8); - if (g->class_masterbooks[j] >= f->codebook_count) return error(f, VORBIS_invalid_setup); - } - for (k=0; k < 1 << g->class_subclasses[j]; ++k) { - g->subclass_books[j][k] = (int16)get_bits(f,8)-1; - if (g->subclass_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup); - } - } - g->floor1_multiplier = get_bits(f,2)+1; - g->rangebits = get_bits(f,4); - g->Xlist[0] = 0; - g->Xlist[1] = 1 << g->rangebits; - g->values = 2; - for (j=0; j < g->partitions; ++j) { - int c = g->partition_class_list[j]; - for (k=0; k < g->class_dimensions[c]; ++k) { - g->Xlist[g->values] = get_bits(f, g->rangebits); - ++g->values; - } - } - // precompute the sorting - for (j=0; j < g->values; ++j) { - p[j].x = g->Xlist[j]; - p[j].id = j; - } - qsort(p, g->values, sizeof(p[0]), point_compare); - for (j=0; j < g->values-1; ++j) - if (p[j].x == p[j+1].x) - return error(f, VORBIS_invalid_setup); - for (j=0; j < g->values; ++j) - g->sorted_order[j] = (uint8) p[j].id; - // precompute the neighbors - for (j=2; j < g->values; ++j) { - int low = 0,hi = 0; - neighbors(g->Xlist, j, &low,&hi); - g->neighbors[j][0] = low; - g->neighbors[j][1] = hi; - } - - if (g->values > longest_floorlist) - longest_floorlist = g->values; - } - } - - // Residue - f->residue_count = get_bits(f, 6)+1; - f->residue_config = (Residue *) setup_malloc(f, f->residue_count * sizeof(f->residue_config[0])); - if (f->residue_config == NULL) return error(f, VORBIS_outofmem); - memset(f->residue_config, 0, f->residue_count * sizeof(f->residue_config[0])); - for (i=0; i < f->residue_count; ++i) { - uint8 residue_cascade[64]; - Residue *r = f->residue_config+i; - f->residue_types[i] = get_bits(f, 16); - if (f->residue_types[i] > 2) return error(f, VORBIS_invalid_setup); - r->begin = get_bits(f, 24); - r->end = get_bits(f, 24); - if (r->end < r->begin) return error(f, VORBIS_invalid_setup); - r->part_size = get_bits(f,24)+1; - r->classifications = get_bits(f,6)+1; - r->classbook = get_bits(f,8); - if (r->classbook >= f->codebook_count) return error(f, VORBIS_invalid_setup); - for (j=0; j < r->classifications; ++j) { - uint8 high_bits=0; - uint8 low_bits=get_bits(f,3); - if (get_bits(f,1)) - high_bits = get_bits(f,5); - residue_cascade[j] = high_bits*8 + low_bits; - } - r->residue_books = (short (*)[8]) setup_malloc(f, sizeof(r->residue_books[0]) * r->classifications); - if (r->residue_books == NULL) return error(f, VORBIS_outofmem); - for (j=0; j < r->classifications; ++j) { - for (k=0; k < 8; ++k) { - if (residue_cascade[j] & (1 << k)) { - r->residue_books[j][k] = get_bits(f, 8); - if (r->residue_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup); - } else { - r->residue_books[j][k] = -1; - } - } - } - // precompute the classifications[] array to avoid inner-loop mod/divide - // call it 'classdata' since we already have r->classifications - r->classdata = (uint8 **) setup_malloc(f, sizeof(*r->classdata) * f->codebooks[r->classbook].entries); - if (!r->classdata) return error(f, VORBIS_outofmem); - memset(r->classdata, 0, sizeof(*r->classdata) * f->codebooks[r->classbook].entries); - for (j=0; j < f->codebooks[r->classbook].entries; ++j) { - int classwords = f->codebooks[r->classbook].dimensions; - int temp = j; - r->classdata[j] = (uint8 *) setup_malloc(f, sizeof(r->classdata[j][0]) * classwords); - if (r->classdata[j] == NULL) return error(f, VORBIS_outofmem); - for (k=classwords-1; k >= 0; --k) { - r->classdata[j][k] = temp % r->classifications; - temp /= r->classifications; - } - } - } - - f->mapping_count = get_bits(f,6)+1; - f->mapping = (Mapping *) setup_malloc(f, f->mapping_count * sizeof(*f->mapping)); - if (f->mapping == NULL) return error(f, VORBIS_outofmem); - memset(f->mapping, 0, f->mapping_count * sizeof(*f->mapping)); - for (i=0; i < f->mapping_count; ++i) { - Mapping *m = f->mapping + i; - int mapping_type = get_bits(f,16); - if (mapping_type != 0) return error(f, VORBIS_invalid_setup); - m->chan = (MappingChannel *) setup_malloc(f, f->channels * sizeof(*m->chan)); - if (m->chan == NULL) return error(f, VORBIS_outofmem); - if (get_bits(f,1)) - m->submaps = get_bits(f,4)+1; - else - m->submaps = 1; - if (m->submaps > max_submaps) - max_submaps = m->submaps; - if (get_bits(f,1)) { - m->coupling_steps = get_bits(f,8)+1; - if (m->coupling_steps > f->channels) return error(f, VORBIS_invalid_setup); - for (k=0; k < m->coupling_steps; ++k) { - m->chan[k].magnitude = get_bits(f, ilog(f->channels-1)); - m->chan[k].angle = get_bits(f, ilog(f->channels-1)); - if (m->chan[k].magnitude >= f->channels) return error(f, VORBIS_invalid_setup); - if (m->chan[k].angle >= f->channels) return error(f, VORBIS_invalid_setup); - if (m->chan[k].magnitude == m->chan[k].angle) return error(f, VORBIS_invalid_setup); - } - } else - m->coupling_steps = 0; - - // reserved field - if (get_bits(f,2)) return error(f, VORBIS_invalid_setup); - if (m->submaps > 1) { - for (j=0; j < f->channels; ++j) { - m->chan[j].mux = get_bits(f, 4); - if (m->chan[j].mux >= m->submaps) return error(f, VORBIS_invalid_setup); - } - } else - // @SPECIFICATION: this case is missing from the spec - for (j=0; j < f->channels; ++j) - m->chan[j].mux = 0; - - for (j=0; j < m->submaps; ++j) { - get_bits(f,8); // discard - m->submap_floor[j] = get_bits(f,8); - m->submap_residue[j] = get_bits(f,8); - if (m->submap_floor[j] >= f->floor_count) return error(f, VORBIS_invalid_setup); - if (m->submap_residue[j] >= f->residue_count) return error(f, VORBIS_invalid_setup); - } - } - - // Modes - f->mode_count = get_bits(f, 6)+1; - for (i=0; i < f->mode_count; ++i) { - Mode *m = f->mode_config+i; - m->blockflag = get_bits(f,1); - m->windowtype = get_bits(f,16); - m->transformtype = get_bits(f,16); - m->mapping = get_bits(f,8); - if (m->windowtype != 0) return error(f, VORBIS_invalid_setup); - if (m->transformtype != 0) return error(f, VORBIS_invalid_setup); - if (m->mapping >= f->mapping_count) return error(f, VORBIS_invalid_setup); - } - - flush_packet(f); - - f->previous_length = 0; - - for (i=0; i < f->channels; ++i) { - f->channel_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1); - f->previous_window[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2); - f->finalY[i] = (int16 *) setup_malloc(f, sizeof(int16) * longest_floorlist); - if (f->channel_buffers[i] == NULL || f->previous_window[i] == NULL || f->finalY[i] == NULL) return error(f, VORBIS_outofmem); - memset(f->channel_buffers[i], 0, sizeof(float) * f->blocksize_1); - #ifdef STB_VORBIS_NO_DEFER_FLOOR - f->floor_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2); - if (f->floor_buffers[i] == NULL) return error(f, VORBIS_outofmem); - #endif - } - - if (!init_blocksize(f, 0, f->blocksize_0)) return FALSE; - if (!init_blocksize(f, 1, f->blocksize_1)) return FALSE; - f->blocksize[0] = f->blocksize_0; - f->blocksize[1] = f->blocksize_1; - -#ifdef STB_VORBIS_DIVIDE_TABLE - if (integer_divide_table[1][1]==0) - for (i=0; i < DIVTAB_NUMER; ++i) - for (j=1; j < DIVTAB_DENOM; ++j) - integer_divide_table[i][j] = i / j; -#endif - - // compute how much temporary memory is needed - - // 1. - { - uint32 imdct_mem = (f->blocksize_1 * sizeof(float) >> 1); - uint32 classify_mem; - int i,max_part_read=0; - for (i=0; i < f->residue_count; ++i) { - Residue *r = f->residue_config + i; - unsigned int actual_size = f->blocksize_1 / 2; - unsigned int limit_r_begin = r->begin < actual_size ? r->begin : actual_size; - unsigned int limit_r_end = r->end < actual_size ? r->end : actual_size; - int n_read = limit_r_end - limit_r_begin; - int part_read = n_read / r->part_size; - if (part_read > max_part_read) - max_part_read = part_read; - } - #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE - classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(uint8 *)); - #else - classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(int *)); - #endif - - // maximum reasonable partition size is f->blocksize_1 - - f->temp_memory_required = classify_mem; - if (imdct_mem > f->temp_memory_required) - f->temp_memory_required = imdct_mem; - } - - - if (f->alloc.alloc_buffer) { - assert(f->temp_offset == f->alloc.alloc_buffer_length_in_bytes); - // check if there's enough temp memory so we don't error later - if (f->setup_offset + sizeof(*f) + f->temp_memory_required > (unsigned) f->temp_offset) - return error(f, VORBIS_outofmem); - } - - // @TODO: stb_vorbis_seek_start expects first_audio_page_offset to point to a page - // without PAGEFLAG_continued_packet, so this either points to the first page, or - // the page after the end of the headers. It might be cleaner to point to a page - // in the middle of the headers, when that's the page where the first audio packet - // starts, but we'd have to also correctly skip the end of any continued packet in - // stb_vorbis_seek_start. - if (f->next_seg == -1) { - f->first_audio_page_offset = stb_vorbis_get_file_offset(f); - } else { - f->first_audio_page_offset = 0; - } - - return TRUE; -} - -static void vorbis_deinit(stb_vorbis *p) -{ - int i,j; - - setup_free(p, p->vendor); - for (i=0; i < p->comment_list_length; ++i) { - setup_free(p, p->comment_list[i]); - } - setup_free(p, p->comment_list); - - if (p->residue_config) { - for (i=0; i < p->residue_count; ++i) { - Residue *r = p->residue_config+i; - if (r->classdata) { - for (j=0; j < p->codebooks[r->classbook].entries; ++j) - setup_free(p, r->classdata[j]); - setup_free(p, r->classdata); - } - setup_free(p, r->residue_books); - } - } - - if (p->codebooks) { - CHECK(p); - for (i=0; i < p->codebook_count; ++i) { - Codebook *c = p->codebooks + i; - setup_free(p, c->codeword_lengths); - setup_free(p, c->multiplicands); - setup_free(p, c->codewords); - setup_free(p, c->sorted_codewords); - // c->sorted_values[-1] is the first entry in the array - setup_free(p, c->sorted_values ? c->sorted_values-1 : NULL); - } - setup_free(p, p->codebooks); - } - setup_free(p, p->floor_config); - setup_free(p, p->residue_config); - if (p->mapping) { - for (i=0; i < p->mapping_count; ++i) - setup_free(p, p->mapping[i].chan); - setup_free(p, p->mapping); - } - CHECK(p); - for (i=0; i < p->channels && i < STB_VORBIS_MAX_CHANNELS; ++i) { - setup_free(p, p->channel_buffers[i]); - setup_free(p, p->previous_window[i]); - #ifdef STB_VORBIS_NO_DEFER_FLOOR - setup_free(p, p->floor_buffers[i]); - #endif - setup_free(p, p->finalY[i]); - } - for (i=0; i < 2; ++i) { - setup_free(p, p->A[i]); - setup_free(p, p->B[i]); - setup_free(p, p->C[i]); - setup_free(p, p->window[i]); - setup_free(p, p->bit_reverse[i]); - } - #ifndef STB_VORBIS_NO_STDIO - if (p->close_on_free) fclose(p->f); - #endif -} - -void stb_vorbis_close(stb_vorbis *p) -{ - if (p == NULL) return; - vorbis_deinit(p); - setup_free(p,p); -} - -static void vorbis_init(stb_vorbis *p, const stb_vorbis_alloc *z) -{ - memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start - if (z) { - p->alloc = *z; - p->alloc.alloc_buffer_length_in_bytes &= ~7; - p->temp_offset = p->alloc.alloc_buffer_length_in_bytes; - } - p->eof = 0; - p->error = VORBIS__no_error; - p->stream = NULL; - p->codebooks = NULL; - p->page_crc_tests = -1; - #ifndef STB_VORBIS_NO_STDIO - p->close_on_free = FALSE; - p->f = NULL; - #endif -} - -int stb_vorbis_get_sample_offset(stb_vorbis *f) -{ - if (f->current_loc_valid) - return f->current_loc; - else - return -1; -} - -stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f) -{ - stb_vorbis_info d; - d.channels = f->channels; - d.sample_rate = f->sample_rate; - d.setup_memory_required = f->setup_memory_required; - d.setup_temp_memory_required = f->setup_temp_memory_required; - d.temp_memory_required = f->temp_memory_required; - d.max_frame_size = f->blocksize_1 >> 1; - return d; -} - -stb_vorbis_comment stb_vorbis_get_comment(stb_vorbis *f) -{ - stb_vorbis_comment d; - d.vendor = f->vendor; - d.comment_list_length = f->comment_list_length; - d.comment_list = f->comment_list; - return d; -} - -int stb_vorbis_get_error(stb_vorbis *f) -{ - int e = f->error; - f->error = VORBIS__no_error; - return e; -} - -static stb_vorbis * vorbis_alloc(stb_vorbis *f) -{ - stb_vorbis *p = (stb_vorbis *) setup_malloc(f, sizeof(*p)); - return p; -} - -#ifndef STB_VORBIS_NO_PUSHDATA_API - -void stb_vorbis_flush_pushdata(stb_vorbis *f) -{ - f->previous_length = 0; - f->page_crc_tests = 0; - f->discard_samples_deferred = 0; - f->current_loc_valid = FALSE; - f->first_decode = FALSE; - f->samples_output = 0; - f->channel_buffer_start = 0; - f->channel_buffer_end = 0; -} - -static int vorbis_search_for_page_pushdata(vorb *f, uint8 *data, int data_len) -{ - int i,n; - for (i=0; i < f->page_crc_tests; ++i) - f->scan[i].bytes_done = 0; - - // if we have room for more scans, search for them first, because - // they may cause us to stop early if their header is incomplete - if (f->page_crc_tests < STB_VORBIS_PUSHDATA_CRC_COUNT) { - if (data_len < 4) return 0; - data_len -= 3; // need to look for 4-byte sequence, so don't miss - // one that straddles a boundary - for (i=0; i < data_len; ++i) { - if (data[i] == 0x4f) { - if (0==memcmp(data+i, ogg_page_header, 4)) { - int j,len; - uint32 crc; - // make sure we have the whole page header - if (i+26 >= data_len || i+27+data[i+26] >= data_len) { - // only read up to this page start, so hopefully we'll - // have the whole page header start next time - data_len = i; - break; - } - // ok, we have it all; compute the length of the page - len = 27 + data[i+26]; - for (j=0; j < data[i+26]; ++j) - len += data[i+27+j]; - // scan everything up to the embedded crc (which we must 0) - crc = 0; - for (j=0; j < 22; ++j) - crc = crc32_update(crc, data[i+j]); - // now process 4 0-bytes - for ( ; j < 26; ++j) - crc = crc32_update(crc, 0); - // len is the total number of bytes we need to scan - n = f->page_crc_tests++; - f->scan[n].bytes_left = len-j; - f->scan[n].crc_so_far = crc; - f->scan[n].goal_crc = data[i+22] + (data[i+23] << 8) + (data[i+24]<<16) + (data[i+25]<<24); - // if the last frame on a page is continued to the next, then - // we can't recover the sample_loc immediately - if (data[i+27+data[i+26]-1] == 255) - f->scan[n].sample_loc = ~0; - else - f->scan[n].sample_loc = data[i+6] + (data[i+7] << 8) + (data[i+ 8]<<16) + (data[i+ 9]<<24); - f->scan[n].bytes_done = i+j; - if (f->page_crc_tests == STB_VORBIS_PUSHDATA_CRC_COUNT) - break; - // keep going if we still have room for more - } - } - } - } - - for (i=0; i < f->page_crc_tests;) { - uint32 crc; - int j; - int n = f->scan[i].bytes_done; - int m = f->scan[i].bytes_left; - if (m > data_len - n) m = data_len - n; - // m is the bytes to scan in the current chunk - crc = f->scan[i].crc_so_far; - for (j=0; j < m; ++j) - crc = crc32_update(crc, data[n+j]); - f->scan[i].bytes_left -= m; - f->scan[i].crc_so_far = crc; - if (f->scan[i].bytes_left == 0) { - // does it match? - if (f->scan[i].crc_so_far == f->scan[i].goal_crc) { - // Houston, we have page - data_len = n+m; // consumption amount is wherever that scan ended - f->page_crc_tests = -1; // drop out of page scan mode - f->previous_length = 0; // decode-but-don't-output one frame - f->next_seg = -1; // start a new page - f->current_loc = f->scan[i].sample_loc; // set the current sample location - // to the amount we'd have decoded had we decoded this page - f->current_loc_valid = f->current_loc != ~0U; - return data_len; - } - // delete entry - f->scan[i] = f->scan[--f->page_crc_tests]; - } else { - ++i; - } - } - - return data_len; -} - -// return value: number of bytes we used -int stb_vorbis_decode_frame_pushdata( - stb_vorbis *f, // the file we're decoding - const uint8 *data, int data_len, // the memory available for decoding - int *channels, // place to write number of float * buffers - float ***output, // place to write float ** array of float * buffers - int *samples // place to write number of output samples - ) -{ - int i; - int len,right,left; - - if (!IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); - - if (f->page_crc_tests >= 0) { - *samples = 0; - return vorbis_search_for_page_pushdata(f, (uint8 *) data, data_len); - } - - f->stream = (uint8 *) data; - f->stream_end = (uint8 *) data + data_len; - f->error = VORBIS__no_error; - - // check that we have the entire packet in memory - if (!is_whole_packet_present(f)) { - *samples = 0; - return 0; - } - - if (!vorbis_decode_packet(f, &len, &left, &right)) { - // save the actual error we encountered - enum STBVorbisError error = f->error; - if (error == VORBIS_bad_packet_type) { - // flush and resynch - f->error = VORBIS__no_error; - while (get8_packet(f) != EOP) - if (f->eof) break; - *samples = 0; - return (int) (f->stream - data); - } - if (error == VORBIS_continued_packet_flag_invalid) { - if (f->previous_length == 0) { - // we may be resynching, in which case it's ok to hit one - // of these; just discard the packet - f->error = VORBIS__no_error; - while (get8_packet(f) != EOP) - if (f->eof) break; - *samples = 0; - return (int) (f->stream - data); - } - } - // if we get an error while parsing, what to do? - // well, it DEFINITELY won't work to continue from where we are! - stb_vorbis_flush_pushdata(f); - // restore the error that actually made us bail - f->error = error; - *samples = 0; - return 1; - } - - // success! - len = vorbis_finish_frame(f, len, left, right); - for (i=0; i < f->channels; ++i) - f->outputs[i] = f->channel_buffers[i] + left; - - if (channels) *channels = f->channels; - *samples = len; - *output = f->outputs; - return (int) (f->stream - data); -} - -stb_vorbis *stb_vorbis_open_pushdata( - const unsigned char *data, int data_len, // the memory available for decoding - int *data_used, // only defined if result is not NULL - int *error, const stb_vorbis_alloc *alloc) -{ - stb_vorbis *f, p; - vorbis_init(&p, alloc); - p.stream = (uint8 *) data; - p.stream_end = (uint8 *) data + data_len; - p.push_mode = TRUE; - if (!start_decoder(&p)) { - if (p.eof) - *error = VORBIS_need_more_data; - else - *error = p.error; - vorbis_deinit(&p); - return NULL; - } - f = vorbis_alloc(&p); - if (f) { - *f = p; - *data_used = (int) (f->stream - data); - *error = 0; - return f; - } else { - vorbis_deinit(&p); - return NULL; - } -} -#endif // STB_VORBIS_NO_PUSHDATA_API - -unsigned int stb_vorbis_get_file_offset(stb_vorbis *f) -{ - #ifndef STB_VORBIS_NO_PUSHDATA_API - if (f->push_mode) return 0; - #endif - if (USE_MEMORY(f)) return (unsigned int) (f->stream - f->stream_start); - #ifndef STB_VORBIS_NO_STDIO - return (unsigned int) (ftell(f->f) - f->f_start); - #endif -} - -#ifndef STB_VORBIS_NO_PULLDATA_API -// -// DATA-PULLING API -// - -static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last) -{ - for(;;) { - int n; - if (f->eof) return 0; - n = get8(f); - if (n == 0x4f) { // page header candidate - unsigned int retry_loc = stb_vorbis_get_file_offset(f); - int i; - // check if we're off the end of a file_section stream - if (retry_loc - 25 > f->stream_len) - return 0; - // check the rest of the header - for (i=1; i < 4; ++i) - if (get8(f) != ogg_page_header[i]) - break; - if (f->eof) return 0; - if (i == 4) { - uint8 header[27]; - uint32 i, crc, goal, len; - for (i=0; i < 4; ++i) - header[i] = ogg_page_header[i]; - for (; i < 27; ++i) - header[i] = get8(f); - if (f->eof) return 0; - if (header[4] != 0) goto invalid; - goal = header[22] + (header[23] << 8) + (header[24]<<16) + ((uint32)header[25]<<24); - for (i=22; i < 26; ++i) - header[i] = 0; - crc = 0; - for (i=0; i < 27; ++i) - crc = crc32_update(crc, header[i]); - len = 0; - for (i=0; i < header[26]; ++i) { - int s = get8(f); - crc = crc32_update(crc, s); - len += s; - } - if (len && f->eof) return 0; - for (i=0; i < len; ++i) - crc = crc32_update(crc, get8(f)); - // finished parsing probable page - if (crc == goal) { - // we could now check that it's either got the last - // page flag set, OR it's followed by the capture - // pattern, but I guess TECHNICALLY you could have - // a file with garbage between each ogg page and recover - // from it automatically? So even though that paranoia - // might decrease the chance of an invalid decode by - // another 2^32, not worth it since it would hose those - // invalid-but-useful files? - if (end) - *end = stb_vorbis_get_file_offset(f); - if (last) { - if (header[5] & 0x04) - *last = 1; - else - *last = 0; - } - set_file_offset(f, retry_loc-1); - return 1; - } - } - invalid: - // not a valid page, so rewind and look for next one - set_file_offset(f, retry_loc); - } - } -} - - -#define SAMPLE_unknown 0xffffffff - -// seeking is implemented with a binary search, which narrows down the range to -// 64K, before using a linear search (because finding the synchronization -// pattern can be expensive, and the chance we'd find the end page again is -// relatively high for small ranges) -// -// two initial interpolation-style probes are used at the start of the search -// to try to bound either side of the binary search sensibly, while still -// working in O(log n) time if they fail. - -static int get_seek_page_info(stb_vorbis *f, ProbedPage *z) -{ - uint8 header[27], lacing[255]; - int i,len; - - // record where the page starts - z->page_start = stb_vorbis_get_file_offset(f); - - // parse the header - getn(f, header, 27); - if (header[0] != 'O' || header[1] != 'g' || header[2] != 'g' || header[3] != 'S') - return 0; - getn(f, lacing, header[26]); - - // determine the length of the payload - len = 0; - for (i=0; i < header[26]; ++i) - len += lacing[i]; - - // this implies where the page ends - z->page_end = z->page_start + 27 + header[26] + len; - - // read the last-decoded sample out of the data - z->last_decoded_sample = header[6] + (header[7] << 8) + (header[8] << 16) + (header[9] << 24); - - // restore file state to where we were - set_file_offset(f, z->page_start); - return 1; -} - -// rarely used function to seek back to the preceding page while finding the -// start of a packet -static int go_to_page_before(stb_vorbis *f, unsigned int limit_offset) -{ - unsigned int previous_safe, end; - - // now we want to seek back 64K from the limit - if (limit_offset >= 65536 && limit_offset-65536 >= f->first_audio_page_offset) - previous_safe = limit_offset - 65536; - else - previous_safe = f->first_audio_page_offset; - - set_file_offset(f, previous_safe); - - while (vorbis_find_page(f, &end, NULL)) { - if (end >= limit_offset && stb_vorbis_get_file_offset(f) < limit_offset) - return 1; - set_file_offset(f, end); - } - - return 0; -} - -// implements the search logic for finding a page and starting decoding. if -// the function succeeds, current_loc_valid will be true and current_loc will -// be less than or equal to the provided sample number (the closer the -// better). -static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number) -{ - ProbedPage left, right, mid; - int i, start_seg_with_known_loc, end_pos, page_start; - uint32 delta, stream_length, padding, last_sample_limit; - double offset = 0.0, bytes_per_sample = 0.0; - int probe = 0; - - // find the last page and validate the target sample - stream_length = stb_vorbis_stream_length_in_samples(f); - if (stream_length == 0) return error(f, VORBIS_seek_without_length); - if (sample_number > stream_length) return error(f, VORBIS_seek_invalid); - - // this is the maximum difference between the window-center (which is the - // actual granule position value), and the right-start (which the spec - // indicates should be the granule position (give or take one)). - padding = ((f->blocksize_1 - f->blocksize_0) >> 2); - if (sample_number < padding) - last_sample_limit = 0; - else - last_sample_limit = sample_number - padding; - - left = f->p_first; - while (left.last_decoded_sample == ~0U) { - // (untested) the first page does not have a 'last_decoded_sample' - set_file_offset(f, left.page_end); - if (!get_seek_page_info(f, &left)) goto error; - } - - right = f->p_last; - assert(right.last_decoded_sample != ~0U); - - // starting from the start is handled differently - if (last_sample_limit <= left.last_decoded_sample) { - if (stb_vorbis_seek_start(f)) { - if (f->current_loc > sample_number) - return error(f, VORBIS_seek_failed); - return 1; - } - return 0; - } - - while (left.page_end != right.page_start) { - assert(left.page_end < right.page_start); - // search range in bytes - delta = right.page_start - left.page_end; - if (delta <= 65536) { - // there's only 64K left to search - handle it linearly - set_file_offset(f, left.page_end); - } else { - if (probe < 2) { - if (probe == 0) { - // first probe (interpolate) - double data_bytes = right.page_end - left.page_start; - bytes_per_sample = data_bytes / right.last_decoded_sample; - offset = left.page_start + bytes_per_sample * (last_sample_limit - left.last_decoded_sample); - } else { - // second probe (try to bound the other side) - double error = ((double) last_sample_limit - mid.last_decoded_sample) * bytes_per_sample; - if (error >= 0 && error < 8000) error = 8000; - if (error < 0 && error > -8000) error = -8000; - offset += error * 2; - } - - // ensure the offset is valid - if (offset < left.page_end) - offset = left.page_end; - if (offset > right.page_start - 65536) - offset = right.page_start - 65536; - - set_file_offset(f, (unsigned int) offset); - } else { - // binary search for large ranges (offset by 32K to ensure - // we don't hit the right page) - set_file_offset(f, left.page_end + (delta / 2) - 32768); - } - - if (!vorbis_find_page(f, NULL, NULL)) goto error; - } - - for (;;) { - if (!get_seek_page_info(f, &mid)) goto error; - if (mid.last_decoded_sample != ~0U) break; - // (untested) no frames end on this page - set_file_offset(f, mid.page_end); - assert(mid.page_start < right.page_start); - } - - // if we've just found the last page again then we're in a tricky file, - // and we're close enough (if it wasn't an interpolation probe). - if (mid.page_start == right.page_start) { - if (probe >= 2 || delta <= 65536) - break; - } else { - if (last_sample_limit < mid.last_decoded_sample) - right = mid; - else - left = mid; - } - - ++probe; - } - - // seek back to start of the last packet - page_start = left.page_start; - set_file_offset(f, page_start); - if (!start_page(f)) return error(f, VORBIS_seek_failed); - end_pos = f->end_seg_with_known_loc; - assert(end_pos >= 0); - - for (;;) { - for (i = end_pos; i > 0; --i) - if (f->segments[i-1] != 255) - break; - - start_seg_with_known_loc = i; - - if (start_seg_with_known_loc > 0 || !(f->page_flag & PAGEFLAG_continued_packet)) - break; - - // (untested) the final packet begins on an earlier page - if (!go_to_page_before(f, page_start)) - goto error; - - page_start = stb_vorbis_get_file_offset(f); - if (!start_page(f)) goto error; - end_pos = f->segment_count - 1; - } - - // prepare to start decoding - f->current_loc_valid = FALSE; - f->last_seg = FALSE; - f->valid_bits = 0; - f->packet_bytes = 0; - f->bytes_in_seg = 0; - f->previous_length = 0; - f->next_seg = start_seg_with_known_loc; - - for (i = 0; i < start_seg_with_known_loc; i++) - skip(f, f->segments[i]); - - // start decoding (optimizable - this frame is generally discarded) - if (!vorbis_pump_first_frame(f)) - return 0; - if (f->current_loc > sample_number) - return error(f, VORBIS_seek_failed); - return 1; - -error: - // try to restore the file to a valid state - stb_vorbis_seek_start(f); - return error(f, VORBIS_seek_failed); -} - -// the same as vorbis_decode_initial, but without advancing -static int peek_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode) -{ - int bits_read, bytes_read; - - if (!vorbis_decode_initial(f, p_left_start, p_left_end, p_right_start, p_right_end, mode)) - return 0; - - // either 1 or 2 bytes were read, figure out which so we can rewind - bits_read = 1 + ilog(f->mode_count-1); - if (f->mode_config[*mode].blockflag) - bits_read += 2; - bytes_read = (bits_read + 7) / 8; - - f->bytes_in_seg += bytes_read; - f->packet_bytes -= bytes_read; - skip(f, -bytes_read); - if (f->next_seg == -1) - f->next_seg = f->segment_count - 1; - else - f->next_seg--; - f->valid_bits = 0; - - return 1; -} - -int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number) -{ - uint32 max_frame_samples; - - if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); - - // fast page-level search - if (!seek_to_sample_coarse(f, sample_number)) - return 0; - - assert(f->current_loc_valid); - assert(f->current_loc <= sample_number); - - // linear search for the relevant packet - max_frame_samples = (f->blocksize_1*3 - f->blocksize_0) >> 2; - while (f->current_loc < sample_number) { - int left_start, left_end, right_start, right_end, mode, frame_samples; - if (!peek_decode_initial(f, &left_start, &left_end, &right_start, &right_end, &mode)) - return error(f, VORBIS_seek_failed); - // calculate the number of samples returned by the next frame - frame_samples = right_start - left_start; - if (f->current_loc + frame_samples > sample_number) { - return 1; // the next frame will contain the sample - } else if (f->current_loc + frame_samples + max_frame_samples > sample_number) { - // there's a chance the frame after this could contain the sample - vorbis_pump_first_frame(f); - } else { - // this frame is too early to be relevant - f->current_loc += frame_samples; - f->previous_length = 0; - maybe_start_packet(f); - flush_packet(f); - } - } - // the next frame should start with the sample - if (f->current_loc != sample_number) return error(f, VORBIS_seek_failed); - return 1; -} - -int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number) -{ - if (!stb_vorbis_seek_frame(f, sample_number)) - return 0; - - if (sample_number != f->current_loc) { - int n; - uint32 frame_start = f->current_loc; - stb_vorbis_get_frame_float(f, &n, NULL); - assert(sample_number > frame_start); - assert(f->channel_buffer_start + (int) (sample_number-frame_start) <= f->channel_buffer_end); - f->channel_buffer_start += (sample_number - frame_start); - } - - return 1; -} - -int stb_vorbis_seek_start(stb_vorbis *f) -{ - if (IS_PUSH_MODE(f)) { return error(f, VORBIS_invalid_api_mixing); } - set_file_offset(f, f->first_audio_page_offset); - f->previous_length = 0; - f->first_decode = TRUE; - f->next_seg = -1; - return vorbis_pump_first_frame(f); -} - -unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f) -{ - unsigned int restore_offset, previous_safe; - unsigned int end, last_page_loc; - - if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); - if (!f->total_samples) { - unsigned int last; - uint32 lo,hi; - char header[6]; - - // first, store the current decode position so we can restore it - restore_offset = stb_vorbis_get_file_offset(f); - - // now we want to seek back 64K from the end (the last page must - // be at most a little less than 64K, but let's allow a little slop) - if (f->stream_len >= 65536 && f->stream_len-65536 >= f->first_audio_page_offset) - previous_safe = f->stream_len - 65536; - else - previous_safe = f->first_audio_page_offset; - - set_file_offset(f, previous_safe); - // previous_safe is now our candidate 'earliest known place that seeking - // to will lead to the final page' - - if (!vorbis_find_page(f, &end, &last)) { - // if we can't find a page, we're hosed! - f->error = VORBIS_cant_find_last_page; - f->total_samples = 0xffffffff; - goto done; - } - - // check if there are more pages - last_page_loc = stb_vorbis_get_file_offset(f); - - // stop when the last_page flag is set, not when we reach eof; - // this allows us to stop short of a 'file_section' end without - // explicitly checking the length of the section - while (!last) { - set_file_offset(f, end); - if (!vorbis_find_page(f, &end, &last)) { - // the last page we found didn't have the 'last page' flag - // set. whoops! - break; - } - //previous_safe = last_page_loc+1; // NOTE: not used after this point, but note for debugging - last_page_loc = stb_vorbis_get_file_offset(f); - } - - set_file_offset(f, last_page_loc); - - // parse the header - getn(f, (unsigned char *)header, 6); - // extract the absolute granule position - lo = get32(f); - hi = get32(f); - if (lo == 0xffffffff && hi == 0xffffffff) { - f->error = VORBIS_cant_find_last_page; - f->total_samples = SAMPLE_unknown; - goto done; - } - if (hi) - lo = 0xfffffffe; // saturate - f->total_samples = lo; - - f->p_last.page_start = last_page_loc; - f->p_last.page_end = end; - f->p_last.last_decoded_sample = lo; - - done: - set_file_offset(f, restore_offset); - } - return f->total_samples == SAMPLE_unknown ? 0 : f->total_samples; -} - -float stb_vorbis_stream_length_in_seconds(stb_vorbis *f) -{ - return stb_vorbis_stream_length_in_samples(f) / (float) f->sample_rate; -} - - - -int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output) -{ - int len, right,left,i; - if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); - - if (!vorbis_decode_packet(f, &len, &left, &right)) { - f->channel_buffer_start = f->channel_buffer_end = 0; - return 0; - } - - len = vorbis_finish_frame(f, len, left, right); - for (i=0; i < f->channels; ++i) - f->outputs[i] = f->channel_buffers[i] + left; - - f->channel_buffer_start = left; - f->channel_buffer_end = left+len; - - if (channels) *channels = f->channels; - if (output) *output = f->outputs; - return len; -} - -#ifndef STB_VORBIS_NO_STDIO - -stb_vorbis * stb_vorbis_open_file_section(FILE *file, int close_on_free, int *error, const stb_vorbis_alloc *alloc, unsigned int length) -{ - stb_vorbis *f, p; - vorbis_init(&p, alloc); - p.f = file; - p.f_start = (uint32) ftell(file); - p.stream_len = length; - p.close_on_free = close_on_free; - if (start_decoder(&p)) { - f = vorbis_alloc(&p); - if (f) { - *f = p; - vorbis_pump_first_frame(f); - return f; - } - } - if (error) *error = p.error; - vorbis_deinit(&p); - return NULL; -} - -stb_vorbis * stb_vorbis_open_file(FILE *file, int close_on_free, int *error, const stb_vorbis_alloc *alloc) -{ - unsigned int len, start; - start = (unsigned int) ftell(file); - fseek(file, 0, SEEK_END); - len = (unsigned int) (ftell(file) - start); - fseek(file, start, SEEK_SET); - return stb_vorbis_open_file_section(file, close_on_free, error, alloc, len); -} - -stb_vorbis * stb_vorbis_open_filename(const char *filename, int *error, const stb_vorbis_alloc *alloc) -{ - FILE *f; -#if defined(_WIN32) && defined(__STDC_WANT_SECURE_LIB__) - if (0 != fopen_s(&f, filename, "rb")) - f = NULL; -#else - f = fopen(filename, "rb"); -#endif - if (f) - return stb_vorbis_open_file(f, TRUE, error, alloc); - if (error) *error = VORBIS_file_open_failure; - return NULL; -} -#endif // STB_VORBIS_NO_STDIO - -stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len, int *error, const stb_vorbis_alloc *alloc) -{ - stb_vorbis *f, p; - if (!data) { - if (error) *error = VORBIS_unexpected_eof; - return NULL; - } - vorbis_init(&p, alloc); - p.stream = (uint8 *) data; - p.stream_end = (uint8 *) data + len; - p.stream_start = (uint8 *) p.stream; - p.stream_len = len; - p.push_mode = FALSE; - if (start_decoder(&p)) { - f = vorbis_alloc(&p); - if (f) { - *f = p; - vorbis_pump_first_frame(f); - if (error) *error = VORBIS__no_error; - return f; - } - } - if (error) *error = p.error; - vorbis_deinit(&p); - return NULL; -} - -#ifndef STB_VORBIS_NO_INTEGER_CONVERSION -#define PLAYBACK_MONO 1 -#define PLAYBACK_LEFT 2 -#define PLAYBACK_RIGHT 4 - -#define L (PLAYBACK_LEFT | PLAYBACK_MONO) -#define C (PLAYBACK_LEFT | PLAYBACK_RIGHT | PLAYBACK_MONO) -#define R (PLAYBACK_RIGHT | PLAYBACK_MONO) - -static int8 channel_position[7][6] = -{ - { 0 }, - { C }, - { L, R }, - { L, C, R }, - { L, R, L, R }, - { L, C, R, L, R }, - { L, C, R, L, R, C }, -}; - - -#ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT - typedef union { - float f; - int i; - } float_conv; - typedef char stb_vorbis_float_size_test[sizeof(float)==4 && sizeof(int) == 4]; - #define FASTDEF(x) float_conv x - // add (1<<23) to convert to int, then divide by 2^SHIFT, then add 0.5/2^SHIFT to round - #define MAGIC(SHIFT) (1.5f * (1 << (23-SHIFT)) + 0.5f/(1 << SHIFT)) - #define ADDEND(SHIFT) (((150-SHIFT) << 23) + (1 << 22)) - #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) (temp.f = (x) + MAGIC(s), temp.i - ADDEND(s)) - #define check_endianness() -#else - #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) ((int) ((x) * (1 << (s)))) - #define check_endianness() - #define FASTDEF(x) -#endif - -static void copy_samples(short *dest, float *src, int len) -{ - int i; - check_endianness(); - for (i=0; i < len; ++i) { - FASTDEF(temp); - int v = FAST_SCALED_FLOAT_TO_INT(temp, src[i],15); - if ((unsigned int) (v + 32768) > 65535) - v = v < 0 ? -32768 : 32767; - dest[i] = v; - } -} - -static void compute_samples(int mask, short *output, int num_c, float **data, int d_offset, int len) -{ - #define STB_BUFFER_SIZE 32 - float buffer[STB_BUFFER_SIZE]; - int i,j,o,n = STB_BUFFER_SIZE; - check_endianness(); - for (o = 0; o < len; o += STB_BUFFER_SIZE) { - memset(buffer, 0, sizeof(buffer)); - if (o + n > len) n = len - o; - for (j=0; j < num_c; ++j) { - if (channel_position[num_c][j] & mask) { - for (i=0; i < n; ++i) - buffer[i] += data[j][d_offset+o+i]; - } - } - for (i=0; i < n; ++i) { - FASTDEF(temp); - int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15); - if ((unsigned int) (v + 32768) > 65535) - v = v < 0 ? -32768 : 32767; - output[o+i] = v; - } - } - #undef STB_BUFFER_SIZE -} - -static void compute_stereo_samples(short *output, int num_c, float **data, int d_offset, int len) -{ - #define STB_BUFFER_SIZE 32 - float buffer[STB_BUFFER_SIZE]; - int i,j,o,n = STB_BUFFER_SIZE >> 1; - // o is the offset in the source data - check_endianness(); - for (o = 0; o < len; o += STB_BUFFER_SIZE >> 1) { - // o2 is the offset in the output data - int o2 = o << 1; - memset(buffer, 0, sizeof(buffer)); - if (o + n > len) n = len - o; - for (j=0; j < num_c; ++j) { - int m = channel_position[num_c][j] & (PLAYBACK_LEFT | PLAYBACK_RIGHT); - if (m == (PLAYBACK_LEFT | PLAYBACK_RIGHT)) { - for (i=0; i < n; ++i) { - buffer[i*2+0] += data[j][d_offset+o+i]; - buffer[i*2+1] += data[j][d_offset+o+i]; - } - } else if (m == PLAYBACK_LEFT) { - for (i=0; i < n; ++i) { - buffer[i*2+0] += data[j][d_offset+o+i]; - } - } else if (m == PLAYBACK_RIGHT) { - for (i=0; i < n; ++i) { - buffer[i*2+1] += data[j][d_offset+o+i]; - } - } - } - for (i=0; i < (n<<1); ++i) { - FASTDEF(temp); - int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15); - if ((unsigned int) (v + 32768) > 65535) - v = v < 0 ? -32768 : 32767; - output[o2+i] = v; - } - } - #undef STB_BUFFER_SIZE -} - -static void convert_samples_short(int buf_c, short **buffer, int b_offset, int data_c, float **data, int d_offset, int samples) -{ - int i; - if (buf_c != data_c && buf_c <= 2 && data_c <= 6) { - static int channel_selector[3][2] = { {0}, {PLAYBACK_MONO}, {PLAYBACK_LEFT, PLAYBACK_RIGHT} }; - for (i=0; i < buf_c; ++i) - compute_samples(channel_selector[buf_c][i], buffer[i]+b_offset, data_c, data, d_offset, samples); - } else { - int limit = buf_c < data_c ? buf_c : data_c; - for (i=0; i < limit; ++i) - copy_samples(buffer[i]+b_offset, data[i]+d_offset, samples); - for ( ; i < buf_c; ++i) - memset(buffer[i]+b_offset, 0, sizeof(short) * samples); - } -} - -int stb_vorbis_get_frame_short(stb_vorbis *f, int num_c, short **buffer, int num_samples) -{ - float **output = NULL; - int len = stb_vorbis_get_frame_float(f, NULL, &output); - if (len > num_samples) len = num_samples; - if (len) - convert_samples_short(num_c, buffer, 0, f->channels, output, 0, len); - return len; -} - -static void convert_channels_short_interleaved(int buf_c, short *buffer, int data_c, float **data, int d_offset, int len) -{ - int i; - check_endianness(); - if (buf_c != data_c && buf_c <= 2 && data_c <= 6) { - assert(buf_c == 2); - for (i=0; i < buf_c; ++i) - compute_stereo_samples(buffer, data_c, data, d_offset, len); - } else { - int limit = buf_c < data_c ? buf_c : data_c; - int j; - for (j=0; j < len; ++j) { - for (i=0; i < limit; ++i) { - FASTDEF(temp); - float f = data[i][d_offset+j]; - int v = FAST_SCALED_FLOAT_TO_INT(temp, f,15);//data[i][d_offset+j],15); - if ((unsigned int) (v + 32768) > 65535) - v = v < 0 ? -32768 : 32767; - *buffer++ = v; - } - for ( ; i < buf_c; ++i) - *buffer++ = 0; - } - } -} - -int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts) -{ - float **output; - int len; - if (num_c == 1) return stb_vorbis_get_frame_short(f,num_c,&buffer, num_shorts); - len = stb_vorbis_get_frame_float(f, NULL, &output); - if (len) { - if (len*num_c > num_shorts) len = num_shorts / num_c; - convert_channels_short_interleaved(num_c, buffer, f->channels, output, 0, len); - } - return len; -} - -int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts) -{ - float **outputs; - int len = num_shorts / channels; - int n=0; - while (n < len) { - int k = f->channel_buffer_end - f->channel_buffer_start; - if (n+k >= len) k = len - n; - if (k) - convert_channels_short_interleaved(channels, buffer, f->channels, f->channel_buffers, f->channel_buffer_start, k); - buffer += k*channels; - n += k; - f->channel_buffer_start += k; - if (n == len) break; - if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; - } - return n; -} - -int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int len) -{ - float **outputs; - int n=0; - while (n < len) { - int k = f->channel_buffer_end - f->channel_buffer_start; - if (n+k >= len) k = len - n; - if (k) - convert_samples_short(channels, buffer, n, f->channels, f->channel_buffers, f->channel_buffer_start, k); - n += k; - f->channel_buffer_start += k; - if (n == len) break; - if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; - } - return n; -} - -#ifndef STB_VORBIS_NO_STDIO -int stb_vorbis_decode_filename(const char *filename, int *channels, int *sample_rate, short **output) -{ - int data_len, offset, total, limit, error; - short *data; - stb_vorbis *v = stb_vorbis_open_filename(filename, &error, NULL); - if (v == NULL) return -1; - limit = v->channels * 4096; - *channels = v->channels; - if (sample_rate) - *sample_rate = v->sample_rate; - offset = data_len = 0; - total = limit; - data = (short *) malloc(total * sizeof(*data)); - if (data == NULL) { - stb_vorbis_close(v); - return -2; - } - for (;;) { - int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset); - if (n == 0) break; - data_len += n; - offset += n * v->channels; - if (offset + limit > total) { - short *data2; - total *= 2; - data2 = (short *) realloc(data, total * sizeof(*data)); - if (data2 == NULL) { - free(data); - stb_vorbis_close(v); - return -2; - } - data = data2; - } - } - *output = data; - stb_vorbis_close(v); - return data_len; -} -#endif // NO_STDIO - -int stb_vorbis_decode_memory(const uint8 *mem, int len, int *channels, int *sample_rate, short **output) -{ - int data_len, offset, total, limit, error; - short *data; - stb_vorbis *v = stb_vorbis_open_memory(mem, len, &error, NULL); - if (v == NULL) return -1; - limit = v->channels * 4096; - *channels = v->channels; - if (sample_rate) - *sample_rate = v->sample_rate; - offset = data_len = 0; - total = limit; - data = (short *) malloc(total * sizeof(*data)); - if (data == NULL) { - stb_vorbis_close(v); - return -2; - } - for (;;) { - int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset); - if (n == 0) break; - data_len += n; - offset += n * v->channels; - if (offset + limit > total) { - short *data2; - total *= 2; - data2 = (short *) realloc(data, total * sizeof(*data)); - if (data2 == NULL) { - free(data); - stb_vorbis_close(v); - return -2; - } - data = data2; - } - } - *output = data; - stb_vorbis_close(v); - return data_len; -} -#endif // STB_VORBIS_NO_INTEGER_CONVERSION - -int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats) -{ - float **outputs; - int len = num_floats / channels; - int n=0; - int z = f->channels; - if (z > channels) z = channels; - while (n < len) { - int i,j; - int k = f->channel_buffer_end - f->channel_buffer_start; - if (n+k >= len) k = len - n; - for (j=0; j < k; ++j) { - for (i=0; i < z; ++i) - *buffer++ = f->channel_buffers[i][f->channel_buffer_start+j]; - for ( ; i < channels; ++i) - *buffer++ = 0; - } - n += k; - f->channel_buffer_start += k; - if (n == len) - break; - if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) - break; - } - return n; -} - -int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples) -{ - float **outputs; - int n=0; - int z = f->channels; - if (z > channels) z = channels; - while (n < num_samples) { - int i; - int k = f->channel_buffer_end - f->channel_buffer_start; - if (n+k >= num_samples) k = num_samples - n; - if (k) { - for (i=0; i < z; ++i) - memcpy(buffer[i]+n, f->channel_buffers[i]+f->channel_buffer_start, sizeof(float)*k); - for ( ; i < channels; ++i) - memset(buffer[i]+n, 0, sizeof(float) * k); - } - n += k; - f->channel_buffer_start += k; - if (n == num_samples) - break; - if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) - break; - } - return n; -} -#endif // STB_VORBIS_NO_PULLDATA_API - -/* Version history - 1.17 - 2019-07-08 - fix CVE-2019-13217, -13218, -13219, -13220, -13221, -13222, -13223 - found with Mayhem by ForAllSecure - 1.16 - 2019-03-04 - fix warnings - 1.15 - 2019-02-07 - explicit failure if Ogg Skeleton data is found - 1.14 - 2018-02-11 - delete bogus dealloca usage - 1.13 - 2018-01-29 - fix truncation of last frame (hopefully) - 1.12 - 2017-11-21 - limit residue begin/end to blocksize/2 to avoid large temp allocs in bad/corrupt files - 1.11 - 2017-07-23 - fix MinGW compilation - 1.10 - 2017-03-03 - more robust seeking; fix negative ilog(); clear error in open_memory - 1.09 - 2016-04-04 - back out 'avoid discarding last frame' fix from previous version - 1.08 - 2016-04-02 - fixed multiple warnings; fix setup memory leaks; - avoid discarding last frame of audio data - 1.07 - 2015-01-16 - fixed some warnings, fix mingw, const-correct API - some more crash fixes when out of memory or with corrupt files - 1.06 - 2015-08-31 - full, correct support for seeking API (Dougall Johnson) - some crash fixes when out of memory or with corrupt files - 1.05 - 2015-04-19 - don't define __forceinline if it's redundant - 1.04 - 2014-08-27 - fix missing const-correct case in API - 1.03 - 2014-08-07 - Warning fixes - 1.02 - 2014-07-09 - Declare qsort compare function _cdecl on windows - 1.01 - 2014-06-18 - fix stb_vorbis_get_samples_float - 1.0 - 2014-05-26 - fix memory leaks; fix warnings; fix bugs in multichannel - (API change) report sample rate for decode-full-file funcs - 0.99996 - bracket #include for macintosh compilation by Laurent Gomila - 0.99995 - use union instead of pointer-cast for fast-float-to-int to avoid alias-optimization problem - 0.99994 - change fast-float-to-int to work in single-precision FPU mode, remove endian-dependence - 0.99993 - remove assert that fired on legal files with empty tables - 0.99992 - rewind-to-start - 0.99991 - bugfix to stb_vorbis_get_samples_short by Bernhard Wodo - 0.9999 - (should have been 0.99990) fix no-CRT support, compiling as C++ - 0.9998 - add a full-decode function with a memory source - 0.9997 - fix a bug in the read-from-FILE case in 0.9996 addition - 0.9996 - query length of vorbis stream in samples/seconds - 0.9995 - bugfix to another optimization that only happened in certain files - 0.9994 - bugfix to one of the optimizations that caused significant (but inaudible?) errors - 0.9993 - performance improvements; runs in 99% to 104% of time of reference implementation - 0.9992 - performance improvement of IMDCT; now performs close to reference implementation - 0.9991 - performance improvement of IMDCT - 0.999 - (should have been 0.9990) performance improvement of IMDCT - 0.998 - no-CRT support from Casey Muratori - 0.997 - bugfixes for bugs found by Terje Mathisen - 0.996 - bugfix: fast-huffman decode initialized incorrectly for sparse codebooks; fixing gives 10% speedup - found by Terje Mathisen - 0.995 - bugfix: fix to 'effective' overrun detection - found by Terje Mathisen - 0.994 - bugfix: garbage decode on final VQ symbol of a non-multiple - found by Terje Mathisen - 0.993 - bugfix: pushdata API required 1 extra byte for empty page (failed to consume final page if empty) - found by Terje Mathisen - 0.992 - fixes for MinGW warning - 0.991 - turn fast-float-conversion on by default - 0.990 - fix push-mode seek recovery if you seek into the headers - 0.98b - fix to bad release of 0.98 - 0.98 - fix push-mode seek recovery; robustify float-to-int and support non-fast mode - 0.97 - builds under c++ (typecasting, don't use 'class' keyword) - 0.96 - somehow MY 0.95 was right, but the web one was wrong, so here's my 0.95 rereleased as 0.96, fixes a typo in the clamping code - 0.95 - clamping code for 16-bit functions - 0.94 - not publically released - 0.93 - fixed all-zero-floor case (was decoding garbage) - 0.92 - fixed a memory leak - 0.91 - conditional compiles to omit parts of the API and the infrastructure to support them: STB_VORBIS_NO_PULLDATA_API, STB_VORBIS_NO_PUSHDATA_API, STB_VORBIS_NO_STDIO, STB_VORBIS_NO_INTEGER_CONVERSION - 0.90 - first public release -*/ - -#endif // STB_VORBIS_HEADER_ONLY - - -/* ------------------------------------------------------------------------------- -This software is available under 2 licenses -- choose whichever you prefer. ------------------------------------------------------------------------------- -ALTERNATIVE A - MIT License -Copyright (c) 2017 Sean Barrett -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ------------------------------------------------------------------------------- -ALTERNATIVE B - Public Domain (www.unlicense.org) -This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute this -software, either in source code form or as a compiled binary, for any purpose, -commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and to -the detriment of our heirs and successors. We intend this dedication to be an -overt act of relinquishment in perpetuity of all present and future rights to -this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------- -*/ diff --git a/FCLauncher/src/main/jni/lwjgl/tinyfd/org_lwjgl_util_tinyfd_TinyFileDialogs.c b/FCLauncher/src/main/jni/lwjgl/tinyfd/org_lwjgl_util_tinyfd_TinyFileDialogs.c deleted file mode 100644 index ffc17ccd..00000000 --- a/FCLauncher/src/main/jni/lwjgl/tinyfd/org_lwjgl_util_tinyfd_TinyFileDialogs.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -#include "lwjgl/common_tools.h" -#include "tinyfiledialogs.h" - -EXTERN_C_ENTER - -JNIEXPORT jlong JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1getGlobalChar(JNIEnv *__env, jclass clazz, jlong aCharVariableNameAddress) { - char const *aCharVariableName = (char const *)(uintptr_t)aCharVariableNameAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)tinyfd_getGlobalChar(aCharVariableName); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1getGlobalInt(JNIEnv *__env, jclass clazz, jlong aIntVariableNameAddress) { - char const *aIntVariableName = (char const *)(uintptr_t)aIntVariableNameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)tinyfd_getGlobalInt(aIntVariableName); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1setGlobalInt(JNIEnv *__env, jclass clazz, jlong aIntVariableNameAddress, jint aValue) { - char const *aIntVariableName = (char const *)(uintptr_t)aIntVariableNameAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)tinyfd_setGlobalInt(aIntVariableName, aValue); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_tinyfd_1beep(JNIEnv *__env, jclass clazz) { - UNUSED_PARAMS(__env, clazz) - tinyfd_beep(); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1notifyPopup(JNIEnv *__env, jclass clazz, jlong aTitleAddress, jlong aMessageAddress, jlong aIconTypeAddress) { - char const *aTitle = (char const *)(uintptr_t)aTitleAddress; - char const *aMessage = (char const *)(uintptr_t)aMessageAddress; - char const *aIconType = (char const *)(uintptr_t)aIconTypeAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)tinyfd_notifyPopup(aTitle, aMessage, aIconType); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1messageBox(JNIEnv *__env, jclass clazz, jlong aTitleAddress, jlong aMessageAddress, jlong aDialogTypeAddress, jlong aIconTypeAddress, jint aDefaultButton) { - char const *aTitle = (char const *)(uintptr_t)aTitleAddress; - char const *aMessage = (char const *)(uintptr_t)aMessageAddress; - char const *aDialogType = (char const *)(uintptr_t)aDialogTypeAddress; - char const *aIconType = (char const *)(uintptr_t)aIconTypeAddress; - UNUSED_PARAMS(__env, clazz) - return (jint)tinyfd_messageBox(aTitle, aMessage, aDialogType, aIconType, aDefaultButton); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1inputBox(JNIEnv *__env, jclass clazz, jlong aTitleAddress, jlong aMessageAddress, jlong aDefaultInputAddress) { - char const *aTitle = (char const *)(uintptr_t)aTitleAddress; - char const *aMessage = (char const *)(uintptr_t)aMessageAddress; - char const *aDefaultInput = (char const *)(uintptr_t)aDefaultInputAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)tinyfd_inputBox(aTitle, aMessage, aDefaultInput); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1saveFileDialog(JNIEnv *__env, jclass clazz, jlong aTitleAddress, jlong aDefaultPathAndFileAddress, jint aNumOfFilterPatterns, jlong aFilterPatternsAddress, jlong aSingleFilterDescriptionAddress) { - char const *aTitle = (char const *)(uintptr_t)aTitleAddress; - char const *aDefaultPathAndFile = (char const *)(uintptr_t)aDefaultPathAndFileAddress; - char const * const *aFilterPatterns = (char const * const *)(uintptr_t)aFilterPatternsAddress; - char const *aSingleFilterDescription = (char const *)(uintptr_t)aSingleFilterDescriptionAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)tinyfd_saveFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1openFileDialog(JNIEnv *__env, jclass clazz, jlong aTitleAddress, jlong aDefaultPathAndFileAddress, jint aNumOfFilterPatterns, jlong aFilterPatternsAddress, jlong aSingleFilterDescriptionAddress, jint aAllowMultipleSelects) { - char const *aTitle = (char const *)(uintptr_t)aTitleAddress; - char const *aDefaultPathAndFile = (char const *)(uintptr_t)aDefaultPathAndFileAddress; - char const * const *aFilterPatterns = (char const * const *)(uintptr_t)aFilterPatternsAddress; - char const *aSingleFilterDescription = (char const *)(uintptr_t)aSingleFilterDescriptionAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)tinyfd_openFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1selectFolderDialog(JNIEnv *__env, jclass clazz, jlong aTitleAddress, jlong aDefaultPathAddress) { - char const *aTitle = (char const *)(uintptr_t)aTitleAddress; - char const *aDefaultPath = (char const *)(uintptr_t)aDefaultPathAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)tinyfd_selectFolderDialog(aTitle, aDefaultPath); -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_util_tinyfd_TinyFileDialogs_ntinyfd_1colorChooser(JNIEnv *__env, jclass clazz, jlong aTitleAddress, jlong aDefaultHexRGBAddress, jlong aDefaultRGBAddress, jlong aoResultRGBAddress) { - char const *aTitle = (char const *)(uintptr_t)aTitleAddress; - char const *aDefaultHexRGB = (char const *)(uintptr_t)aDefaultHexRGBAddress; - unsigned char *aDefaultRGB = (unsigned char *)(uintptr_t)aDefaultRGBAddress; - unsigned char *aoResultRGB = (unsigned char *)(uintptr_t)aoResultRGBAddress; - UNUSED_PARAMS(__env, clazz) - return (jlong)(uintptr_t)tinyfd_colorChooser(aTitle, aDefaultHexRGB, aDefaultRGB, aoResultRGB); -} - -EXTERN_C_EXIT diff --git a/FCLauncher/src/main/jni/lwjgl/tinyfd/tinyfiledialogs.c b/FCLauncher/src/main/jni/lwjgl/tinyfd/tinyfiledialogs.c deleted file mode 100644 index df5fb62b..00000000 --- a/FCLauncher/src/main/jni/lwjgl/tinyfd/tinyfiledialogs.c +++ /dev/null @@ -1,7848 +0,0 @@ -/* SPDX-License-Identifier: ZLIB - -this file can be renamed with extension ".cpp" and compiled as C++. -The code is 100% compatible C C++ -(just comment out << extern "C" >> in the header file) - _________ - / \ tinyfiledialogs.c v3.13.3 [Jul 2, 2023] zlib licence - |tiny file| Unique code file created [November 9, 2014] - | dialogs | Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - ____________________________________________ - | | - | email: tinyfiledialogs at ysengrin.com | - |____________________________________________| - _________________________________________________________________________________ - | | - | the windows only wchar_t UTF-16 prototypes are at the bottom of the header file | - |_________________________________________________________________________________| - _________________________________________________________ - | | - | on windows: - since v3.6 char is UTF-8 by default | - | - if you want MBCS set tinyfd_winUtf8 to 0 | - | - functions like fopen expect MBCS | - |_________________________________________________________| - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - -- License - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef __sun -#ifndef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 2 /* to accept POSIX 2 in old ANSI C standards */ -#endif -#endif - -#if !defined(_WIN32) && ( defined(__GNUC__) || defined(__clang__) ) -#if !defined(_GNU_SOURCE) - #define _GNU_SOURCE /* used only to resolve symbolic links. Can be commented out */ -#endif -#endif - -#include -#include -#include -#include -#include - -#ifdef _WIN32 - #ifdef __BORLANDC__ - #define _getch getch - #endif - #ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0500 - #endif - #include - #include - #include - #include - #include - #define TINYFD_NOCCSUNICODE - #define SLASH "\\" -#else - #include - #include - #include /* on old systems try instead */ - #include - #include - #include /* on old systems try instead */ - #define SLASH "/" -#endif /* _WIN32 */ - -#include "tinyfiledialogs.h" - -#define MAX_PATH_OR_CMD 1024 /* _MAX_PATH or MAX_PATH */ - -#ifndef MAX_MULTIPLE_FILES -#define MAX_MULTIPLE_FILES 1024 -#endif -#define LOW_MULTIPLE_FILES 32 - -char tinyfd_version[8] = "3.13.3"; - -/******************************************************************************************************/ -/**************************************** UTF-8 on Windows ********************************************/ -/******************************************************************************************************/ -#ifdef _WIN32 -/* if you want to use UTF-8 ( instead of the UTF-16/wchar_t functions at the end of tinyfiledialogs.h ) -Make sure your code is really prepared for UTF-8 (on windows, functions like fopen() expect MBCS and not UTF-8) */ -int tinyfd_winUtf8 = 1; /* on windows char strings can be 1:UTF-8(default) or 0:MBCS */ -/* for MBCS change this to 0, here or in your code */ -#endif -/******************************************************************************************************/ -/******************************************************************************************************/ -/******************************************************************************************************/ - -int tinyfd_verbose = 0 ; /* on unix: prints the command line calls */ -int tinyfd_silent = 1 ; /* 1 (default) or 0 : on unix, hide errors and warnings from called dialogs */ - -/* Curses dialogs are difficult to use, on windows they are only ascii and uses the unix backslah */ -int tinyfd_allowCursesDialogs = 0 ; /* 0 (default) or 1 */ -int tinyfd_forceConsole = 0 ; /* 0 (default) or 1 */ -/* for unix & windows: 0 (graphic mode) or 1 (console mode). -0: try to use a graphic solution, if it fails then it uses console mode. -1: forces all dialogs into console mode even when the X server is present. - it can use the package dialog or dialog.exe. - on windows it only make sense for console applications */ - -int tinyfd_assumeGraphicDisplay = 0; /* 0 (default) or 1 */ -/* some systems don't set the environment variable DISPLAY even when a graphic display is present. -set this to 1 to tell tinyfiledialogs to assume the existence of a graphic display */ - - -char tinyfd_response[1024]; -/* if you pass "tinyfd_query" as aTitle, -the functions will not display the dialogs -but and return 0 for console mode, 1 for graphic mode. -tinyfd_response is then filled with the retain solution. -possible values for tinyfd_response are (all lowercase) -for graphic mode: - windows_wchar windows applescript kdialog zenity zenity3 yad matedialog - shellementary qarma python2-tkinter python3-tkinter python-dbus - perl-dbus gxmessage gmessage xmessage xdialog gdialog dunst -for console mode: - dialog whiptail basicinput no_solution */ - -static int gWarningDisplayed = 0 ; -static char gTitle[]="missing software! (we will try basic console input)"; - -#ifdef _WIN32 -char tinyfd_needs[] = "\ - ___________\n\ -/ \\ \n\ -| tiny file |\n\ -| dialogs |\n\ -\\_____ ____/\n\ - \\|\ -\ntiny file dialogs on Windows needs:\ -\n a graphic display\ -\nor dialog.exe (curses console mode ** Disabled by default **)\ -\nor a console for basic input"; -#else -char tinyfd_needs[] = "\ - ___________\n\ -/ \\ \n\ -| tiny file |\n\ -| dialogs |\n\ -\\_____ ____/\n\ - \\|\ -\ntiny file dialogs on UNIX needs:\ -\n applescript or kdialog or yad or Xdialog\ -\nor zenity (or matedialog or shellementary or qarma)\ -\nor python (2 or 3) + tkinter + python-dbus (optional)\ -\nor dialog (opens console if needed) ** Disabled by default **\ -\nor xterm + bash (opens console for basic input)\ -\nor existing console for basic input\ -\nand the command `which\x60 to detect any of the above."; /* ` or \x60 is the grave accent */ - -#endif - -#ifdef _MSC_VER -#pragma warning(disable:4996) /* allows usage of strncpy, strcpy, strcat, sprintf, fopen */ -#pragma warning(disable:4100) /* allows usage of strncpy, strcpy, strcat, sprintf, fopen */ -#pragma warning(disable:4706) /* allows usage of strncpy, strcpy, strcat, sprintf, fopen */ -#endif - -static int getenvDISPLAY(void) -{ - return tinyfd_assumeGraphicDisplay || getenv("DISPLAY"); -} - - -static char * getCurDir(void) -{ - static char lCurDir[MAX_PATH_OR_CMD]; - return getcwd(lCurDir, sizeof(lCurDir)); -} - - -static char * getPathWithoutFinalSlash( - char * aoDestination, /* make sure it is allocated, use _MAX_PATH */ - char const * aSource) /* aoDestination and aSource can be the same */ -{ - char const * lTmp ; - if ( aSource ) - { - lTmp = strrchr(aSource, '/'); - if (!lTmp) - { - lTmp = strrchr(aSource, '\\'); - } - if (lTmp) - { - strncpy(aoDestination, aSource, lTmp - aSource ); - aoDestination[lTmp - aSource] = '\0'; - } - else - { - * aoDestination = '\0'; - } - } - else - { - * aoDestination = '\0'; - } - return aoDestination; -} - - -static char * getLastName( - char * aoDestination, /* make sure it is allocated */ - char const * aSource) -{ - /* copy the last name after '/' or '\' */ - char const * lTmp ; - if ( aSource ) - { - lTmp = strrchr(aSource, '/'); - if (!lTmp) - { - lTmp = strrchr(aSource, '\\'); - } - if (lTmp) - { - strcpy(aoDestination, lTmp + 1); - } - else - { - strcpy(aoDestination, aSource); - } - } - else - { - * aoDestination = '\0'; - } - return aoDestination; -} - - -static void ensureFinalSlash( char * aioString ) -{ - if ( aioString && strlen( aioString ) ) - { - char * lastcar = aioString + strlen( aioString ) - 1 ; - if ( strncmp( lastcar , SLASH , 1 ) ) - { - strcat( lastcar , SLASH ) ; - } - } -} - - -static void Hex2RGB( char const aHexRGB[8] , unsigned char aoResultRGB[3] ) -{ - char lColorChannel[8] ; - if ( aoResultRGB ) - { - if ( aHexRGB ) - { - strcpy(lColorChannel, aHexRGB ) ; - aoResultRGB[2] = (unsigned char)strtoul(lColorChannel+5,NULL,16); - lColorChannel[5] = '\0'; - aoResultRGB[1] = (unsigned char)strtoul(lColorChannel+3,NULL,16); - lColorChannel[3] = '\0'; - aoResultRGB[0] = (unsigned char)strtoul(lColorChannel+1,NULL,16); -/* printf("%d %d %d\n", aoResultRGB[0], aoResultRGB[1], aoResultRGB[2]); */ - } - else - { - aoResultRGB[0]=0; - aoResultRGB[1]=0; - aoResultRGB[2]=0; - } - } -} - -static void RGB2Hex( unsigned char const aRGB[3], char aoResultHexRGB[8] ) -{ - if ( aoResultHexRGB ) - { - if ( aRGB ) - { -#if (defined(__cplusplus ) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__clang__) - sprintf(aoResultHexRGB, "#%02hhx%02hhx%02hhx", aRGB[0], aRGB[1], aRGB[2]); -#else - sprintf(aoResultHexRGB, "#%02hx%02hx%02hx", aRGB[0], aRGB[1], aRGB[2]); -#endif - /*printf("aoResultHexRGB %s\n", aoResultHexRGB);*/ - } - else - { - aoResultHexRGB[0]=0; - aoResultHexRGB[1]=0; - aoResultHexRGB[2]=0; - } - } -} - - -void tfd_replaceSubStr( char const * aSource, char const * aOldSubStr, - char const * aNewSubStr, char * aoDestination ) -{ - char const * pOccurence ; - char const * p ; - char const * lNewSubStr = "" ; - size_t lOldSubLen = strlen( aOldSubStr ) ; - - if ( ! aSource ) - { - * aoDestination = '\0' ; - return ; - } - if ( ! aOldSubStr ) - { - strcpy( aoDestination , aSource ) ; - return ; - } - if ( aNewSubStr ) - { - lNewSubStr = aNewSubStr ; - } - p = aSource ; - * aoDestination = '\0' ; - while ( ( pOccurence = strstr( p , aOldSubStr ) ) != NULL ) - { - strncat( aoDestination , p , pOccurence - p ) ; - strcat( aoDestination , lNewSubStr ) ; - p = pOccurence + lOldSubLen ; - } - strcat( aoDestination , p ) ; -} - - -static int filenameValid( char const * aFileNameWithoutPath ) -{ - if ( ! aFileNameWithoutPath - || ! strlen(aFileNameWithoutPath) - || strpbrk(aFileNameWithoutPath , "\\/:*?\"<>|") ) - { - return 0 ; - } - return 1 ; -} - -#ifndef _WIN32 - -static int fileExists( char const * aFilePathAndName ) -{ - FILE * lIn ; - if ( ! aFilePathAndName || ! strlen(aFilePathAndName) ) - { - return 0 ; - } - lIn = fopen( aFilePathAndName , "r" ) ; - if ( ! lIn ) - { - return 0 ; - } - fclose( lIn ) ; - return 1 ; -} - -#endif - - -static void wipefile(char const * aFilename) -{ - int i; - struct stat st; - FILE * lIn; - - if (stat(aFilename, &st) == 0) - { - if ((lIn = fopen(aFilename, "w"))) - { - for (i = 0; i < st.st_size; i++) - { - fputc('A', lIn); - } - fclose(lIn); - } - } -} - - -int tfd_quoteDetected(char const * aString) -{ - char const * p; - - if (!aString) return 0; - - p = aString; - while ((p = strchr(p, '\''))) - { - return 1; - } - - p = aString; - while ((p = strchr(p, '\"'))) - { - return 1; - } - - return 0; -} - - -char const * tinyfd_getGlobalChar(char const * aCharVariableName) /* to be called from C# (you don't need this in C or C++) */ -{ - if (!aCharVariableName || !strlen(aCharVariableName)) return NULL; - else if (!strcmp(aCharVariableName, "tinyfd_version")) return tinyfd_version; - else if (!strcmp(aCharVariableName, "tinyfd_needs")) return tinyfd_needs; - else if (!strcmp(aCharVariableName, "tinyfd_response")) return tinyfd_response; - else return NULL ; -} - - -int tinyfd_getGlobalInt(char const * aIntVariableName) /* to be called from C# (you don't need this in C or C++) */ -{ - if ( !aIntVariableName || !strlen(aIntVariableName) ) return -1 ; - else if ( !strcmp(aIntVariableName, "tinyfd_verbose") ) return tinyfd_verbose ; - else if ( !strcmp(aIntVariableName, "tinyfd_silent") ) return tinyfd_silent ; - else if ( !strcmp(aIntVariableName, "tinyfd_allowCursesDialogs") ) return tinyfd_allowCursesDialogs ; - else if ( !strcmp(aIntVariableName, "tinyfd_forceConsole") ) return tinyfd_forceConsole ; - else if ( !strcmp(aIntVariableName, "tinyfd_assumeGraphicDisplay") ) return tinyfd_assumeGraphicDisplay ; -#ifdef _WIN32 - else if ( !strcmp(aIntVariableName, "tinyfd_winUtf8") ) return tinyfd_winUtf8 ; -#endif - else return -1; -} - - -int tinyfd_setGlobalInt(char const * aIntVariableName, int aValue) /* to be called from C# (you don't need this in C or C++) */ -{ - if (!aIntVariableName || !strlen(aIntVariableName)) return -1 ; - else if (!strcmp(aIntVariableName, "tinyfd_verbose")) { tinyfd_verbose = aValue; return tinyfd_verbose; } - else if (!strcmp(aIntVariableName, "tinyfd_silent")) { tinyfd_silent = aValue; return tinyfd_silent; } - else if (!strcmp(aIntVariableName, "tinyfd_allowCursesDialogs")) { tinyfd_allowCursesDialogs = aValue; return tinyfd_allowCursesDialogs; } - else if (!strcmp(aIntVariableName, "tinyfd_forceConsole")) { tinyfd_forceConsole = aValue; return tinyfd_forceConsole; } - else if (!strcmp(aIntVariableName, "tinyfd_assumeGraphicDisplay")) { tinyfd_assumeGraphicDisplay = aValue; return tinyfd_assumeGraphicDisplay; } -#ifdef _WIN32 - else if (!strcmp(aIntVariableName, "tinyfd_winUtf8")) { tinyfd_winUtf8 = aValue; return tinyfd_winUtf8; } -#endif - else return -1; -} - - -#ifdef _WIN32 -static int powershellPresent(void) -{ /*only on vista and above (or installed on xp)*/ - static int lPowershellPresent = -1; - char lBuff[MAX_PATH_OR_CMD]; - FILE* lIn; - char const* lString = "powershell.exe"; - - if (lPowershellPresent < 0) - { - if (!(lIn = _popen("where powershell.exe", "r"))) - { - lPowershellPresent = 0; - return 0; - } - while (fgets(lBuff, sizeof(lBuff), lIn) != NULL) - { - } - _pclose(lIn); - if (lBuff[strlen(lBuff) - 1] == '\n') - { - lBuff[strlen(lBuff) - 1] = '\0'; - } - if (strcmp(lBuff + strlen(lBuff) - strlen(lString), lString)) - { - lPowershellPresent = 0; - } - else - { - lPowershellPresent = 1; - } - } - return lPowershellPresent; -} - -static int windowsVersion(void) -{ -#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR) - typedef LONG NTSTATUS ; - typedef NTSTATUS(WINAPI* RtlGetVersionPtr)(PRTL_OSVERSIONINFOW); - HMODULE hMod; - RtlGetVersionPtr lFxPtr; - RTL_OSVERSIONINFOW lRovi = { 0 }; - - hMod = GetModuleHandleW(L"ntdll.dll"); - if (hMod) { - lFxPtr = (RtlGetVersionPtr)GetProcAddress(hMod, "RtlGetVersion"); - if (lFxPtr) - { - lRovi.dwOSVersionInfoSize = sizeof(lRovi); - if (!lFxPtr(&lRovi)) - { - return lRovi.dwMajorVersion; - } - } - } -#endif - if (powershellPresent()) return 6; /*minimum is vista or installed on xp*/ - return 0; -} - - -static void replaceChr(char * aString, char aOldChr, char aNewChr) -{ - char * p; - - if (!aString) return; - if (aOldChr == aNewChr) return; - - p = aString; - while ((p = strchr(p, aOldChr))) - { - *p = aNewChr; - p++; - } - return; -} - - -#if !defined(WC_ERR_INVALID_CHARS) -/* undefined prior to Vista, so not yet in MINGW header file */ -#define WC_ERR_INVALID_CHARS 0x00000000 /* 0x00000080 for MINGW maybe ? */ -#endif - -static int sizeUtf16From8(char const * aUtf8string) -{ - return MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, - aUtf8string, -1, NULL, 0); -} - - -static int sizeUtf16FromMbcs(char const * aMbcsString) -{ - return MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, - aMbcsString, -1, NULL, 0); -} - - -static int sizeUtf8(wchar_t const * aUtf16string) -{ - return WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, - aUtf16string, -1, NULL, 0, NULL, NULL); -} - - -static int sizeMbcs(wchar_t const * aMbcsString) -{ - int lRes = WideCharToMultiByte(CP_ACP, 0, - aMbcsString, -1, NULL, 0, NULL, NULL); - /* DWORD licic = GetLastError(); */ - return lRes; -} - - -wchar_t* tinyfd_mbcsTo16(char const* aMbcsString) -{ - static wchar_t* lMbcsString = NULL; - int lSize; - - free(lMbcsString); - if (!aMbcsString) { lMbcsString = NULL; return NULL; } - lSize = sizeUtf16FromMbcs(aMbcsString); - if (lSize) - { - lMbcsString = (wchar_t*)malloc(lSize * sizeof(wchar_t)); - lSize = MultiByteToWideChar(CP_ACP, 0, aMbcsString, -1, lMbcsString, lSize); - } - else wcscpy(lMbcsString, L""); - return lMbcsString; -} - - -wchar_t * tinyfd_utf8to16(char const * aUtf8string) -{ - static wchar_t * lUtf16string = NULL; - int lSize; - - free(lUtf16string); - if (!aUtf8string) {lUtf16string = NULL; return NULL;} - lSize = sizeUtf16From8(aUtf8string); - if (lSize) - { - lUtf16string = (wchar_t*)malloc(lSize * sizeof(wchar_t)); - lSize = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, - aUtf8string, -1, lUtf16string, lSize); - return lUtf16string; - } - else - { - /* let's try mbcs anyway */ - lUtf16string = NULL; - return tinyfd_mbcsTo16(aUtf8string); - } -} - - -char * tinyfd_utf16toMbcs(wchar_t const * aUtf16string) -{ - static char * lMbcsString = NULL; - int lSize; - - free(lMbcsString); - if (!aUtf16string) { lMbcsString = NULL; return NULL; } - lSize = sizeMbcs(aUtf16string); - if (lSize) - { - lMbcsString = (char*)malloc(lSize); - lSize = WideCharToMultiByte(CP_ACP, 0, aUtf16string, -1, lMbcsString, lSize, NULL, NULL); - } - else strcpy(lMbcsString, ""); - return lMbcsString; -} - - -char * tinyfd_utf8toMbcs(char const * aUtf8string) -{ - wchar_t const * lUtf16string; - lUtf16string = tinyfd_utf8to16(aUtf8string); - return tinyfd_utf16toMbcs(lUtf16string); -} - - -char * tinyfd_utf16to8(wchar_t const * aUtf16string) -{ - static char * lUtf8string = NULL; - int lSize; - - free(lUtf8string); - if (!aUtf16string) { lUtf8string = NULL; return NULL; } - lSize = sizeUtf8(aUtf16string); - if (lSize) - { - lUtf8string = (char*)malloc(lSize); - lSize = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, aUtf16string, -1, lUtf8string, lSize, NULL, NULL); - } - else strcpy(lUtf8string, ""); - return lUtf8string; -} - - -char * tinyfd_mbcsTo8(char const * aMbcsString) -{ - wchar_t const * lUtf16string; - lUtf16string = tinyfd_mbcsTo16(aMbcsString); - return tinyfd_utf16to8(lUtf16string); -} - - -void tinyfd_beep(void) -{ - if (windowsVersion() > 5) Beep(440, 300); - else MessageBeep(MB_OK); -} - - -static void wipefileW(wchar_t const * aFilename) -{ - int i; - FILE * lIn; -#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64__) && (__MINGW32_MAJOR_VERSION <= 3) - struct _stat st; - if (_wstat(aFilename, &st) == 0) -#else - struct __stat64 st; - if (_wstat64(aFilename, &st) == 0) -#endif - { - if ((lIn = _wfopen(aFilename, L"w"))) - { - for (i = 0; i < st.st_size; i++) - { - fputc('A', lIn); - } - fclose(lIn); - } - } -} - - -static wchar_t * getPathWithoutFinalSlashW( - wchar_t * aoDestination, /* make sure it is allocated, use _MAX_PATH */ - wchar_t const * aSource) /* aoDestination and aSource can be the same */ -{ - wchar_t const * lTmp; - if (aSource) - { - lTmp = wcsrchr(aSource, L'/'); - if (!lTmp) - { - lTmp = wcsrchr(aSource, L'\\'); - } - if (lTmp) - { - wcsncpy(aoDestination, aSource, lTmp - aSource); - aoDestination[lTmp - aSource] = L'\0'; - } - else - { - *aoDestination = L'\0'; - } - } - else - { - *aoDestination = L'\0'; - } - return aoDestination; -} - - -static wchar_t * getLastNameW( - wchar_t * aoDestination, /* make sure it is allocated */ - wchar_t const * aSource) -{ - /* copy the last name after '/' or '\' */ - wchar_t const * lTmp; - if (aSource) - { - lTmp = wcsrchr(aSource, L'/'); - if (!lTmp) - { - lTmp = wcsrchr(aSource, L'\\'); - } - if (lTmp) - { - wcscpy(aoDestination, lTmp + 1); - } - else - { - wcscpy(aoDestination, aSource); - } - } - else - { - *aoDestination = L'\0'; - } - return aoDestination; -} - - -static void Hex2RGBW(wchar_t const aHexRGB[8], unsigned char aoResultRGB[3]) -{ - wchar_t lColorChannel[8]; - if (aoResultRGB) - { - if (aHexRGB) - { - wcscpy(lColorChannel, aHexRGB); - aoResultRGB[2] = (unsigned char)wcstoul(lColorChannel + 5, NULL, 16); - lColorChannel[5] = '\0'; - aoResultRGB[1] = (unsigned char)wcstoul(lColorChannel + 3, NULL, 16); - lColorChannel[3] = '\0'; - aoResultRGB[0] = (unsigned char)wcstoul(lColorChannel + 1, NULL, 16); - /* printf("%d %d %d\n", aoResultRGB[0], aoResultRGB[1], aoResultRGB[2]); */ - } - else - { - aoResultRGB[0] = 0; - aoResultRGB[1] = 0; - aoResultRGB[2] = 0; - } - } -} - - -static void RGB2HexW( unsigned char const aRGB[3], wchar_t aoResultHexRGB[8]) -{ -#if (defined(__cplusplus ) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__clang__) - wchar_t const * const lPrintFormat = L"#%02hhx%02hhx%02hhx"; -#else - wchar_t const * const lPrintFormat = L"#%02hx%02hx%02hx"; -#endif - - if (aoResultHexRGB) - { - if (aRGB) - { - /* wprintf(L"aoResultHexRGB %s\n", aoResultHexRGB); */ -#if !defined(__BORLANDC__) && !defined(__TINYC__) && !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) - swprintf(aoResultHexRGB, 8, lPrintFormat, aRGB[0], aRGB[1], aRGB[2]); -#else - swprintf(aoResultHexRGB, lPrintFormat, aRGB[0], aRGB[1], aRGB[2]); -#endif - - } - else - { - aoResultHexRGB[0] = 0; - aoResultHexRGB[1] = 0; - aoResultHexRGB[2] = 0; - } - } -} - - -static int dirExists(char const * aDirPath) -{ -#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64__) && (__MINGW32_MAJOR_VERSION <= 3) - struct _stat lInfo; -#else - struct __stat64 lInfo; -#endif - wchar_t * lTmpWChar; - int lStatRet; - size_t lDirLen; - - if (!aDirPath) - return 0; - lDirLen = strlen(aDirPath); - if (!lDirLen) - return 1; - if ( (lDirLen == 2) && (aDirPath[1] == ':') ) - return 1; - - if (tinyfd_winUtf8) - { - lTmpWChar = tinyfd_utf8to16(aDirPath); -#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64__) && (__MINGW32_MAJOR_VERSION <= 3) - lStatRet = _wstat(lTmpWChar, &lInfo); -#else - lStatRet = _wstat64(lTmpWChar, &lInfo); -#endif - if (lStatRet != 0) - return 0; - else if (lInfo.st_mode & S_IFDIR) - return 1; - else - return 0; - } -#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64__) && (__MINGW32_MAJOR_VERSION <= 3) - else if (_stat(aDirPath, &lInfo) != 0) -#else - else if (_stat64(aDirPath, &lInfo) != 0) -#endif - return 0; - else if (lInfo.st_mode & S_IFDIR) - return 1; - else - return 0; -} - - -static int fileExists(char const * aFilePathAndName) -{ -#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64__) && (__MINGW32_MAJOR_VERSION <= 3) - struct _stat lInfo; -#else - struct __stat64 lInfo; -#endif - wchar_t * lTmpWChar; - int lStatRet; - FILE * lIn; - - if (!aFilePathAndName || !strlen(aFilePathAndName)) - { - return 0; - } - - if (tinyfd_winUtf8) - { - lTmpWChar = tinyfd_utf8to16(aFilePathAndName); -#if defined(__MINGW32_MAJOR_VERSION) && !defined(__MINGW64__) && (__MINGW32_MAJOR_VERSION <= 3) - lStatRet = _wstat(lTmpWChar, &lInfo); -#else - lStatRet = _wstat64(lTmpWChar, &lInfo); -#endif - - if (lStatRet != 0) - return 0; - else if (lInfo.st_mode & _S_IFREG) - return 1; - else - return 0; - } - else - { - lIn = fopen(aFilePathAndName, "r"); - if (!lIn) - { - return 0; - } - fclose(lIn); - return 1; - } -} - -static void replaceWchar(wchar_t * aString, - wchar_t aOldChr, - wchar_t aNewChr) -{ - wchar_t * p; - - if (!aString) - { - return ; - } - - if (aOldChr == aNewChr) - { - return ; - } - - p = aString; - while ((p = wcsrchr(p, aOldChr))) - { - *p = aNewChr; -#ifdef TINYFD_NOCCSUNICODE - p++; -#endif - p++; - } - return ; -} - - -static int quoteDetectedW(wchar_t const * aString) -{ - wchar_t const * p; - - if (!aString) return 0; - - p = aString; - while ((p = wcsrchr(p, L'\''))) - { - return 1; - } - - p = aString; - while ((p = wcsrchr(p, L'\"'))) - { - return 1; - } - - return 0; -} - -#endif /* _WIN32 */ - -/* source and destination can be the same or ovelap*/ -static char * ensureFilesExist(char * aDestination, - char const * aSourcePathsAndNames) -{ - char * lDestination = aDestination; - char const * p; - char const * p2; - size_t lLen; - - if (!aSourcePathsAndNames) - { - return NULL; - } - lLen = strlen(aSourcePathsAndNames); - if (!lLen) - { - return NULL; - } - - p = aSourcePathsAndNames; - while ((p2 = strchr(p, '|')) != NULL) - { - lLen = p2 - p; - memmove(lDestination, p, lLen); - lDestination[lLen] = '\0'; - if (fileExists(lDestination)) - { - lDestination += lLen; - *lDestination = '|'; - lDestination++; - } - p = p2 + 1; - } - if (fileExists(p)) - { - lLen = strlen(p); - memmove(lDestination, p, lLen); - lDestination[lLen] = '\0'; - } - else - { - *(lDestination - 1) = '\0'; - } - return aDestination; -} - -#ifdef _WIN32 - -static int __stdcall EnumThreadWndProc(HWND hwnd, LPARAM lParam) -{ - wchar_t lTitleName[MAX_PATH]; - wchar_t const* lDialogTitle = (wchar_t const *) lParam; - - GetWindowTextW(hwnd, lTitleName, MAX_PATH); - /* wprintf(L"lTitleName %ls \n", lTitleName); */ - - if (wcscmp(lDialogTitle, lTitleName) == 0) - { - SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - return 0; - } - return 1; -} - - -static void hiddenConsoleW(wchar_t const * aString, wchar_t const * aDialogTitle, int aInFront) -{ - STARTUPINFOW StartupInfo; - PROCESS_INFORMATION ProcessInfo; - - if (!aString || !wcslen(aString) ) return; - - memset(&StartupInfo, 0, sizeof(StartupInfo)); - StartupInfo.cb = sizeof(STARTUPINFOW); - StartupInfo.dwFlags = STARTF_USESHOWWINDOW; - StartupInfo.wShowWindow = SW_HIDE; - - if (!CreateProcessW(NULL, (LPWSTR)aString, NULL, NULL, FALSE, - CREATE_NEW_CONSOLE, NULL, NULL, - &StartupInfo, &ProcessInfo)) - { - return; /* GetLastError(); */ - } - - WaitForInputIdle(ProcessInfo.hProcess, INFINITE); - if (aInFront) - { - while (EnumWindows(EnumThreadWndProc, (LPARAM)aDialogTitle)) {} - } - WaitForSingleObject(ProcessInfo.hProcess, INFINITE); - CloseHandle(ProcessInfo.hThread); - CloseHandle(ProcessInfo.hProcess); -} - - -int tinyfd_messageBoxW( - wchar_t const * aTitle, /* NULL or "" */ - wchar_t const * aMessage, /* NULL or "" may contain \n and \t */ - wchar_t const * aDialogType, /* "ok" "okcancel" "yesno" "yesnocancel" */ - wchar_t const * aIconType, /* "info" "warning" "error" "question" */ - int aDefaultButton) /* 0 for cancel/no , 1 for ok/yes , 2 for no in yesnocancel */ -{ - int lBoxReturnValue; - UINT aCode; - - if (aTitle&&!wcscmp(aTitle, L"tinyfd_query")){ strcpy(tinyfd_response, "windows_wchar"); return 1; } - - if (quoteDetectedW(aTitle)) return tinyfd_messageBoxW(L"INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 \\x60 instead.", aMessage, aDialogType, aIconType, aDefaultButton); - if (quoteDetectedW(aMessage)) return tinyfd_messageBoxW(aTitle, L"INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDialogType, aIconType, aDefaultButton); - - if (aIconType && !wcscmp(L"warning", aIconType)) - { - aCode = MB_ICONWARNING; - } - else if (aIconType && !wcscmp(L"error", aIconType)) - { - aCode = MB_ICONERROR; - } - else if (aIconType && !wcscmp(L"question", aIconType)) - { - aCode = MB_ICONQUESTION; - } - else - { - aCode = MB_ICONINFORMATION; - } - - if (aDialogType && !wcscmp(L"okcancel", aDialogType)) - { - aCode += MB_OKCANCEL; - if (!aDefaultButton) - { - aCode += MB_DEFBUTTON2; - } - } - else if (aDialogType && !wcscmp(L"yesno", aDialogType)) - { - aCode += MB_YESNO; - if (!aDefaultButton) - { - aCode += MB_DEFBUTTON2; - } - } - else if (aDialogType && !wcscmp(L"yesnocancel", aDialogType)) - { - aCode += MB_YESNOCANCEL; - if (aDefaultButton == 1) - { - aCode += MB_DEFBUTTON1; - } - else if (aDefaultButton == 2) - { - aCode += MB_DEFBUTTON2; - } - else - { - aCode += MB_DEFBUTTON3; - } - } - else - { - aCode += MB_OK; - } - - aCode += MB_TOPMOST; - - lBoxReturnValue = MessageBoxW(GetForegroundWindow(), aMessage, aTitle, aCode); - - if ( (lBoxReturnValue == IDNO) && (aDialogType && !wcscmp(L"yesnocancel", aDialogType)) ) - { - return 2; - } - else if ( (lBoxReturnValue == IDOK) || (lBoxReturnValue == IDYES) ) - { - return 1; - } - else - { - return 0; - } -} - - -/* return has only meaning for tinyfd_query */ -int tinyfd_notifyPopupW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aMessage, /* NULL or L"" may contain \n \t */ - wchar_t const * aIconType) /* L"info" L"warning" L"error" */ -{ - wchar_t * lDialogString; - size_t lTitleLen; - size_t lMessageLen; - size_t lDialogStringLen; - - if (aTitle && !wcscmp(aTitle, L"tinyfd_query")) { strcpy(tinyfd_response, "windows_wchar"); return 1; } - - if (quoteDetectedW(aTitle)) return tinyfd_notifyPopupW(L"INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aIconType); - if (quoteDetectedW(aMessage)) return tinyfd_notifyPopupW(aTitle, L"INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aIconType); - - lTitleLen = aTitle ? wcslen(aTitle) : 0; - lMessageLen = aMessage ? wcslen(aMessage) : 0; - lDialogStringLen = 3 * MAX_PATH_OR_CMD + lTitleLen + lMessageLen; - lDialogString = (wchar_t *)malloc(2 * lDialogStringLen); - if (!lDialogString) return 0; - - wcscpy(lDialogString, L"powershell.exe -command \"\ -function Show-BalloonTip {\ -[cmdletbinding()] \ -param( \ -[string]$Title = ' ', \ -[string]$Message = ' ', \ -[ValidateSet('info', 'warning', 'error')] \ -[string]$IconType = 'info');\ -[system.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | Out-Null ; \ -$balloon = New-Object System.Windows.Forms.NotifyIcon ; \ -$path = Get-Process -id $pid | Select-Object -ExpandProperty Path ; \ -$icon = [System.Drawing.Icon]::ExtractAssociatedIcon($path) ;"); - - wcscat(lDialogString, L"\ -$balloon.Icon = $icon ; \ -$balloon.BalloonTipIcon = $IconType ; \ -$balloon.BalloonTipText = $Message ; \ -$balloon.BalloonTipTitle = $Title ; \ -$balloon.Text = 'tinyfiledialogs' ; \ -$balloon.Visible = $true ; \ -$balloon.ShowBalloonTip(5000)};\ -Show-BalloonTip"); - - if (aTitle && wcslen(aTitle)) - { - wcscat(lDialogString, L" -Title '"); - wcscat(lDialogString, aTitle); - wcscat(lDialogString, L"'"); - } - if (aMessage && wcslen(aMessage)) - { - wcscat(lDialogString, L" -Message '"); - wcscat(lDialogString, aMessage); - wcscat(lDialogString, L"'"); - } - if (aMessage && wcslen(aIconType)) - { - wcscat(lDialogString, L" -IconType '"); - wcscat(lDialogString, aIconType); - wcscat(lDialogString, L"'"); - } - wcscat(lDialogString, L"\""); - - /* wprintf ( L"lDialogString: %ls\n" , lDialogString ) ; */ - - hiddenConsoleW(lDialogString, aTitle, 0); - free(lDialogString); - return 1; -} - - -wchar_t * tinyfd_inputBoxW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aMessage, /* NULL or L"" (\n and \t have no effect) */ - wchar_t const * aDefaultInput) /* L"" , if NULL it's a passwordBox */ -{ - static wchar_t lBuff[MAX_PATH_OR_CMD]; - wchar_t * lDialogString; - FILE * lIn; - FILE * lFile; - int lResult; - size_t lTitleLen; - size_t lMessageLen; - size_t lDialogStringLen; - - if (aTitle&&!wcscmp(aTitle, L"tinyfd_query")){ strcpy(tinyfd_response, "windows_wchar"); return (wchar_t *)1; } - - if (quoteDetectedW(aTitle)) return tinyfd_inputBoxW(L"INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aDefaultInput); - if (quoteDetectedW(aMessage)) return tinyfd_inputBoxW(aTitle, L"INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultInput); - if (quoteDetectedW(aDefaultInput)) return tinyfd_inputBoxW(aTitle, aMessage, L"INVALID DEFAULT_INPUT WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - - lTitleLen = aTitle ? wcslen(aTitle) : 0 ; - lMessageLen = aMessage ? wcslen(aMessage) : 0 ; - lDialogStringLen = 3 * MAX_PATH_OR_CMD + lTitleLen + lMessageLen; - lDialogString = (wchar_t *)malloc(2 * lDialogStringLen); - - if (aDefaultInput) - { - swprintf(lDialogString, -#if !defined(__BORLANDC__) && !defined(__TINYC__) && !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) - lDialogStringLen, -#endif - L"%ls\\tinyfd.vbs", _wgetenv(L"TEMP")); - } - else - { - swprintf(lDialogString, -#if !defined(__BORLANDC__) && !defined(__TINYC__) && !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) - lDialogStringLen, -#endif - L"%ls\\tinyfd.hta", _wgetenv(L"TEMP")); - } - lIn = _wfopen(lDialogString, L"w"); - if (!lIn) - { - free(lDialogString); - return NULL; - } - - if ( aDefaultInput ) - { - wcscpy(lDialogString, L"Dim result:result=InputBox(\""); - if (aMessage && wcslen(aMessage)) - { - wcscpy(lBuff, aMessage); - replaceWchar(lBuff, L'\n', L' '); - wcscat(lDialogString, lBuff); - } - wcscat(lDialogString, L"\",\""); - if (aTitle) wcscat(lDialogString, aTitle); - wcscat(lDialogString, L"\",\""); - - if (aDefaultInput && wcslen(aDefaultInput)) - { - wcscpy(lBuff, aDefaultInput); - replaceWchar(lBuff, L'\n', L' '); - wcscat(lDialogString, lBuff); - } - wcscat(lDialogString, L"\"):If IsEmpty(result) then:WScript.Echo 0"); - wcscat(lDialogString, L":Else: WScript.Echo \"1\" & result : End If"); - } - else - { - wcscpy(lDialogString, L"\n\ -\n\ -\n\ -"); - if (aTitle) wcscat(lDialogString, aTitle); - wcscat(lDialogString, L"\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -\n\ -
\n"); - - wcscat(lDialogString, aMessage ? aMessage : L""); - - wcscat(lDialogString, L"\n\ -\n\ -\n\ -\n\ -
\n\ -

\n\ -\n\ -
\n\ -
\n"); - - wcscat(lDialogString, L"\n\ -\n\ -\n\ -\n\ -
\n\ -
\n\ -
\n\ -\n\ -\n\ -" ) ; - } - fputws(lDialogString, lIn); - fclose(lIn); - - if (aDefaultInput) - { - swprintf(lDialogString, -#if !defined(__BORLANDC__) && !defined(__TINYC__) && !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) - lDialogStringLen, -#endif - L"%ls\\tinyfd.txt",_wgetenv(L"TEMP")); - -#ifdef TINYFD_NOCCSUNICODE - lFile = _wfopen(lDialogString, L"w"); - fputc(0xFF, lFile); - fputc(0xFE, lFile); -#else - lFile = _wfopen(lDialogString, L"wt, ccs=UNICODE"); /*or ccs=UTF-16LE*/ -#endif - fclose(lFile); - - wcscpy(lDialogString, L"cmd.exe /c cscript.exe //U //Nologo "); - wcscat(lDialogString, L"\"%TEMP%\\tinyfd.vbs\" "); - wcscat(lDialogString, L">> \"%TEMP%\\tinyfd.txt\""); - } - else - { - wcscpy(lDialogString, - L"cmd.exe /c mshta.exe \"%TEMP%\\tinyfd.hta\""); - } - - /* wprintf ( "lDialogString: %ls\n" , lDialogString ) ; */ - - hiddenConsoleW(lDialogString, aTitle, 1); - - swprintf(lDialogString, -#if !defined(__BORLANDC__) && !defined(__TINYC__) && !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) - lDialogStringLen, -#endif - L"%ls\\tinyfd.txt", _wgetenv(L"TEMP")); - /* wprintf(L"lDialogString: %ls\n", lDialogString); */ -#ifdef TINYFD_NOCCSUNICODE - if (!(lIn = _wfopen(lDialogString, L"r"))) -#else - if (!(lIn = _wfopen(lDialogString, L"rt, ccs=UNICODE"))) /*or ccs=UTF-16LE*/ -#endif - { - _wremove(lDialogString); - free(lDialogString); - return NULL; - } - - memset(lBuff, 0, MAX_PATH_OR_CMD * sizeof(wchar_t) ); - -#ifdef TINYFD_NOCCSUNICODE - fgets((char *)lBuff, 2*MAX_PATH_OR_CMD, lIn); -#else - fgetws(lBuff, MAX_PATH_OR_CMD, lIn); -#endif - fclose(lIn); - wipefileW(lDialogString); - _wremove(lDialogString); - - if (aDefaultInput) - { - swprintf(lDialogString, -#if !defined(__BORLANDC__) && !defined(__TINYC__) && !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) - lDialogStringLen, -#endif - L"%ls\\tinyfd.vbs", _wgetenv(L"TEMP")); - } - else - { - swprintf(lDialogString, -#if !defined(__BORLANDC__) && !defined(__TINYC__) && !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) - lDialogStringLen, -#endif - L"%ls\\tinyfd.hta", _wgetenv(L"TEMP")); - } - _wremove(lDialogString); - free(lDialogString); - /* wprintf( L"lBuff: %ls\n" , lBuff ) ; */ -#ifdef TINYFD_NOCCSUNICODE - lResult = !wcsncmp(lBuff+1, L"1", 1); -#else - lResult = !wcsncmp(lBuff, L"1", 1); -#endif - - /* printf( "lResult: %d \n" , lResult ) ; */ - if (!lResult) - { - return NULL ; - } - - /* wprintf( "lBuff+1: %ls\n" , lBuff+1 ) ; */ - -#ifdef TINYFD_NOCCSUNICODE - if (aDefaultInput) - { - lDialogStringLen = wcslen(lBuff) ; - lBuff[lDialogStringLen - 1] = L'\0'; - lBuff[lDialogStringLen - 2] = L'\0'; - } - return lBuff + 2; -#else - if (aDefaultInput) lBuff[wcslen(lBuff) - 1] = L'\0'; - return lBuff + 1; -#endif -} - - -wchar_t * tinyfd_saveFileDialogW( - wchar_t const * aTitle, /* NULL or "" */ - wchar_t const * aDefaultPathAndFile, /* NULL or "" */ - int aNumOfFilterPatterns, /* 0 */ - wchar_t const * const * aFilterPatterns, /* NULL or {"*.jpg","*.png"} */ - wchar_t const * aSingleFilterDescription) /* NULL or "image files" */ -{ - static wchar_t lBuff[MAX_PATH_OR_CMD]; - wchar_t lDirname[MAX_PATH_OR_CMD]; - wchar_t lDialogString[MAX_PATH_OR_CMD]; - wchar_t lFilterPatterns[MAX_PATH_OR_CMD] = L""; - wchar_t * p; - wchar_t * lRetval; - wchar_t const * ldefExt = NULL; - int i; - HRESULT lHResult; - OPENFILENAMEW ofn = {0}; - - if (aTitle&&!wcscmp(aTitle, L"tinyfd_query")){ strcpy(tinyfd_response, "windows_wchar"); return (wchar_t *)1; } - - if (quoteDetectedW(aTitle)) return tinyfd_saveFileDialogW(L"INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription); - if (quoteDetectedW(aDefaultPathAndFile)) return tinyfd_saveFileDialogW(aTitle, L"INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription); - if (quoteDetectedW(aSingleFilterDescription)) return tinyfd_saveFileDialogW(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, L"INVALID FILTER_DESCRIPTION WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (quoteDetectedW(aFilterPatterns[i])) return tinyfd_saveFileDialogW(L"INVALID FILTER_PATTERN WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, 0, NULL, NULL); - } - - lHResult = CoInitializeEx(NULL, 0); - - getPathWithoutFinalSlashW(lDirname, aDefaultPathAndFile); - getLastNameW(lBuff, aDefaultPathAndFile); - - if (aNumOfFilterPatterns > 0) - { - ldefExt = aFilterPatterns[0]; - - if (aSingleFilterDescription && wcslen(aSingleFilterDescription)) - { - wcscpy(lFilterPatterns, aSingleFilterDescription); - wcscat(lFilterPatterns, L"\n"); - } - wcscat(lFilterPatterns, aFilterPatterns[0]); - for (i = 1; i < aNumOfFilterPatterns; i++) - { - wcscat(lFilterPatterns, L";"); - wcscat(lFilterPatterns, aFilterPatterns[i]); - } - wcscat(lFilterPatterns, L"\n"); - if (!(aSingleFilterDescription && wcslen(aSingleFilterDescription))) - { - wcscpy(lDialogString, lFilterPatterns); - wcscat(lFilterPatterns, lDialogString); - } - wcscat(lFilterPatterns, L"All Files\n*.*\n"); - p = lFilterPatterns; - while ((p = wcschr(p, L'\n')) != NULL) - { - *p = L'\0'; - p++; - } - } - - ofn.lStructSize = sizeof(OPENFILENAMEW); - ofn.hwndOwner = GetForegroundWindow(); - ofn.hInstance = 0; - ofn.lpstrFilter = wcslen(lFilterPatterns) ? lFilterPatterns : NULL; - ofn.lpstrCustomFilter = NULL; - ofn.nMaxCustFilter = 0; - ofn.nFilterIndex = 1; - ofn.lpstrFile = lBuff; - - ofn.nMaxFile = MAX_PATH_OR_CMD; - ofn.lpstrFileTitle = NULL; - ofn.nMaxFileTitle = MAX_PATH_OR_CMD/2; - ofn.lpstrInitialDir = wcslen(lDirname) ? lDirname : NULL; - ofn.lpstrTitle = aTitle && wcslen(aTitle) ? aTitle : NULL; - ofn.Flags = OFN_OVERWRITEPROMPT | OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST ; - ofn.nFileOffset = 0; - ofn.nFileExtension = 0; - ofn.lpstrDefExt = ldefExt; - ofn.lCustData = 0L; - ofn.lpfnHook = NULL; - ofn.lpTemplateName = NULL; - - if (GetSaveFileNameW(&ofn) == 0) - { - lRetval = NULL; - } - else - { - lRetval = lBuff; - } - - if (lHResult == S_OK || lHResult == S_FALSE) - { - CoUninitialize(); - } - return lRetval; -} - - -wchar_t * tinyfd_openFileDialogW( - wchar_t const * aTitle, /* NULL or "" */ - wchar_t const * aDefaultPathAndFile, /* NULL or "" */ - int aNumOfFilterPatterns, /* 0 */ - wchar_t const * const * aFilterPatterns, /* NULL or {"*.jpg","*.png"} */ - wchar_t const * aSingleFilterDescription, /* NULL or "image files" */ - int aAllowMultipleSelects) /* 0 or 1 ; -1 to free allocated memory and return */ -{ - size_t lLengths[MAX_MULTIPLE_FILES]; - wchar_t lDirname[MAX_PATH_OR_CMD]; - wchar_t lFilterPatterns[MAX_PATH_OR_CMD] = L""; - wchar_t lDialogString[MAX_PATH_OR_CMD]; - wchar_t * lPointers[MAX_MULTIPLE_FILES+1]; - wchar_t * p; - int i, j; - size_t lBuffLen; - DWORD lFullBuffLen; - HRESULT lHResult; - OPENFILENAMEW ofn = { 0 }; - static wchar_t * lBuff = NULL; - - free(lBuff); - lBuff = NULL; - if (aAllowMultipleSelects < 0) return (wchar_t *)0; - - if (aTitle&&!wcscmp(aTitle, L"tinyfd_query")){ strcpy(tinyfd_response, "windows_wchar"); return (wchar_t *)1; } - - if (quoteDetectedW(aTitle)) return tinyfd_openFileDialogW(L"INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); - if (quoteDetectedW(aDefaultPathAndFile)) return tinyfd_openFileDialogW(aTitle, L"INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); - if (quoteDetectedW(aSingleFilterDescription)) return tinyfd_openFileDialogW(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, L"INVALID FILTER_DESCRIPTION WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aAllowMultipleSelects); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (quoteDetectedW(aFilterPatterns[i])) return tinyfd_openFileDialogW(L"INVALID FILTER_PATTERN WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, 0, NULL, NULL, aAllowMultipleSelects); - } - - if (aAllowMultipleSelects) - { - lFullBuffLen = MAX_MULTIPLE_FILES * MAX_PATH_OR_CMD + 1; - lBuff = (wchar_t*)(malloc(lFullBuffLen * sizeof(wchar_t))); - if (!lBuff) - { - lFullBuffLen = LOW_MULTIPLE_FILES * MAX_PATH_OR_CMD + 1; - lBuff = (wchar_t*)( malloc( lFullBuffLen * sizeof(wchar_t))); - } - } - else - { - lFullBuffLen = MAX_PATH_OR_CMD + 1; - lBuff = (wchar_t*)(malloc(lFullBuffLen * sizeof(wchar_t))); - } - if (!lBuff) return NULL; - - lHResult = CoInitializeEx(NULL, 0); - - getPathWithoutFinalSlashW(lDirname, aDefaultPathAndFile); - getLastNameW(lBuff, aDefaultPathAndFile); - - if (aNumOfFilterPatterns > 0) - { - if (aSingleFilterDescription && wcslen(aSingleFilterDescription)) - { - wcscpy(lFilterPatterns, aSingleFilterDescription); - wcscat(lFilterPatterns, L"\n"); - } - wcscat(lFilterPatterns, aFilterPatterns[0]); - for (i = 1; i < aNumOfFilterPatterns; i++) - { - wcscat(lFilterPatterns, L";"); - wcscat(lFilterPatterns, aFilterPatterns[i]); - } - wcscat(lFilterPatterns, L"\n"); - if (!(aSingleFilterDescription && wcslen(aSingleFilterDescription))) - { - wcscpy(lDialogString, lFilterPatterns); - wcscat(lFilterPatterns, lDialogString); - } - wcscat(lFilterPatterns, L"All Files\n*.*\n"); - p = lFilterPatterns; - while ((p = wcschr(p, L'\n')) != NULL) - { - *p = L'\0'; - p++; - } - } - - ofn.lStructSize = sizeof(OPENFILENAME); - ofn.hwndOwner = GetForegroundWindow(); - ofn.hInstance = 0; - ofn.lpstrFilter = wcslen(lFilterPatterns) ? lFilterPatterns : NULL; - ofn.lpstrCustomFilter = NULL; - ofn.nMaxCustFilter = 0; - ofn.nFilterIndex = 1; - ofn.lpstrFile = lBuff; - ofn.nMaxFile = lFullBuffLen; - ofn.lpstrFileTitle = NULL; - ofn.nMaxFileTitle = MAX_PATH_OR_CMD / 2; - ofn.lpstrInitialDir = wcslen(lDirname) ? lDirname : NULL; - ofn.lpstrTitle = aTitle && wcslen(aTitle) ? aTitle : NULL; - ofn.Flags = OFN_EXPLORER | OFN_NOCHANGEDIR | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; - ofn.nFileOffset = 0; - ofn.nFileExtension = 0; - ofn.lpstrDefExt = NULL; - ofn.lCustData = 0L; - ofn.lpfnHook = NULL; - ofn.lpTemplateName = NULL; - - if (aAllowMultipleSelects) - { - ofn.Flags |= OFN_ALLOWMULTISELECT; - } - - if (GetOpenFileNameW(&ofn) == 0) - { - free(lBuff); - lBuff = NULL; - } - else - { - lBuffLen = wcslen(lBuff); - lPointers[0] = lBuff + lBuffLen + 1; - if (aAllowMultipleSelects && (lPointers[0][0] != L'\0')) - { - i = 0; - do - { - lLengths[i] = wcslen(lPointers[i]); - lPointers[i + 1] = lPointers[i] + lLengths[i] + 1; - i++; - } while (lPointers[i][0] != L'\0' && i < MAX_MULTIPLE_FILES ); - if (i > MAX_MULTIPLE_FILES) - { - free(lBuff); - lBuff = NULL; - } - else - { - i--; - p = lBuff + lFullBuffLen - 1; - *p = L'\0'; - for (j = i; j >= 0; j--) - { - p -= lLengths[j]; - memmove(p, lPointers[j], lLengths[j] * sizeof(wchar_t)); - p--; - *p = L'\\'; - p -= lBuffLen; - memmove(p, lBuff, lBuffLen*sizeof(wchar_t)); - p--; - *p = L'|'; - } - p++; - wcscpy(lBuff, p); - lBuffLen = wcslen(lBuff); - } - } - if (lBuff) lBuff = (wchar_t*)(realloc(lBuff, (lBuffLen + 1) * sizeof(wchar_t))); - } - - if (lHResult == S_OK || lHResult == S_FALSE) - { - CoUninitialize(); - } - return lBuff; -} - - -BOOL CALLBACK BrowseCallbackProcW_enum(HWND hWndChild, LPARAM lParam) -{ - wchar_t buf[255]; - GetClassNameW(hWndChild, buf, sizeof(buf)); - if (wcscmp(buf, L"SysTreeView32") == 0) { - HTREEITEM hNode = TreeView_GetSelection(hWndChild); - TreeView_EnsureVisible(hWndChild, hNode); - return FALSE; - } - return TRUE; -} - - -static int __stdcall BrowseCallbackProcW(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) -{ - switch (uMsg) { - case BFFM_INITIALIZED: - SendMessage(hwnd, BFFM_SETSELECTIONW, TRUE, (LPARAM)pData); - break; - case BFFM_SELCHANGED: - EnumChildWindows(hwnd, BrowseCallbackProcW_enum, 0); - } - return 0; -} - -wchar_t * tinyfd_selectFolderDialogW( - wchar_t const * aTitle, /* NULL or "" */ - wchar_t const * aDefaultPath) /* NULL or "" */ -{ - static wchar_t lBuff[MAX_PATH_OR_CMD]; - wchar_t * lRetval; - - BROWSEINFOW bInfo; - LPITEMIDLIST lpItem; - HRESULT lHResult; - - if (aTitle&&!wcscmp(aTitle, L"tinyfd_query")){ strcpy(tinyfd_response, "windows_wchar"); return (wchar_t *)1; } - - if (quoteDetectedW(aTitle)) return tinyfd_selectFolderDialogW(L"INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPath); - if (quoteDetectedW(aDefaultPath)) return tinyfd_selectFolderDialogW(aTitle, L"INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - - lHResult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - bInfo.hwndOwner = GetForegroundWindow(); - bInfo.pidlRoot = NULL; - bInfo.pszDisplayName = lBuff; - bInfo.lpszTitle = aTitle && wcslen(aTitle) ? aTitle : NULL; - if (lHResult == S_OK || lHResult == S_FALSE) - { - bInfo.ulFlags = BIF_USENEWUI; - } - bInfo.lpfn = BrowseCallbackProcW; - bInfo.lParam = (LPARAM)aDefaultPath; - bInfo.iImage = -1; - - lpItem = SHBrowseForFolderW(&bInfo); - if (!lpItem) - { - lRetval = NULL; - } - else - { - SHGetPathFromIDListW(lpItem, lBuff); - lRetval = lBuff ; - } - - if (lHResult == S_OK || lHResult == S_FALSE) - { - CoUninitialize(); - } - return lRetval; -} - - -wchar_t * tinyfd_colorChooserW( - wchar_t const * aTitle, /* NULL or "" */ - wchar_t const * aDefaultHexRGB, /* NULL or "#FF0000"*/ - unsigned char const aDefaultRGB[3], /* { 0 , 255 , 255 } */ - unsigned char aoResultRGB[3]) /* { 0 , 0 , 0 } */ -{ - static wchar_t lResultHexRGB[8]; - CHOOSECOLORW cc; - COLORREF crCustColors[16]; - unsigned char lDefaultRGB[3]; - int lRet; - - HRESULT lHResult; - - if (aTitle&&!wcscmp(aTitle, L"tinyfd_query")){ strcpy(tinyfd_response, "windows_wchar"); return (wchar_t *)1; } - - if (quoteDetectedW(aTitle)) return tinyfd_colorChooserW(L"INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultHexRGB, aDefaultRGB, aoResultRGB); - if (quoteDetectedW(aDefaultHexRGB)) return tinyfd_colorChooserW(aTitle, L"INVALID DEFAULT_HEX_RGB WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultRGB, aoResultRGB); - - lHResult = CoInitializeEx(NULL, 0); - - if ( aDefaultHexRGB ) - { - Hex2RGBW(aDefaultHexRGB, lDefaultRGB); - } - else - { - lDefaultRGB[0] = aDefaultRGB[0]; - lDefaultRGB[1] = aDefaultRGB[1]; - lDefaultRGB[2] = aDefaultRGB[2]; - } - - /* we can't use aTitle */ - cc.lStructSize = sizeof(CHOOSECOLOR); - cc.hwndOwner = GetForegroundWindow(); - cc.hInstance = NULL; - cc.rgbResult = RGB(lDefaultRGB[0], lDefaultRGB[1], lDefaultRGB[2]); - cc.lpCustColors = crCustColors; - cc.Flags = CC_RGBINIT | CC_FULLOPEN | CC_ANYCOLOR ; - cc.lCustData = 0; - cc.lpfnHook = NULL; - cc.lpTemplateName = NULL; - - lRet = ChooseColorW(&cc); - - if (!lRet) - { - return NULL; - } - - aoResultRGB[0] = GetRValue(cc.rgbResult); - aoResultRGB[1] = GetGValue(cc.rgbResult); - aoResultRGB[2] = GetBValue(cc.rgbResult); - - RGB2HexW(aoResultRGB, lResultHexRGB); - - if (lHResult == S_OK || lHResult == S_FALSE) - { - CoUninitialize(); - } - - return lResultHexRGB; -} - - -static int messageBoxWinGui( - char const * aTitle, /* NULL or "" */ - char const * aMessage, /* NULL or "" may contain \n and \t */ - char const * aDialogType, /* "ok" "okcancel" "yesno" "yesnocancel" */ - char const * aIconType, /* "info" "warning" "error" "question" */ - int aDefaultButton) /* 0 for cancel/no , 1 for ok/yes , 2 for no in yesnocancel */ -{ - int lIntRetVal; - wchar_t lTitle[128] = L""; - wchar_t * lMessage = NULL; - wchar_t lDialogType[16] = L""; - wchar_t lIconType[16] = L""; - wchar_t * lTmpWChar; - - if (aTitle) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aTitle); - else lTmpWChar = tinyfd_mbcsTo16(aTitle); - wcscpy(lTitle, lTmpWChar); - } - if (aMessage) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aMessage); - else lTmpWChar = tinyfd_mbcsTo16(aMessage); - lMessage = (wchar_t *) malloc((wcslen(lTmpWChar) + 1)* sizeof(wchar_t)); - if (lMessage) wcscpy(lMessage, lTmpWChar); - } - if (aDialogType) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aDialogType); - else lTmpWChar = tinyfd_mbcsTo16(aDialogType); - wcscpy(lDialogType, lTmpWChar); - } - if (aIconType) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aIconType); - else lTmpWChar = tinyfd_mbcsTo16(aIconType); - wcscpy(lIconType, lTmpWChar); - } - - lIntRetVal = tinyfd_messageBoxW(lTitle, lMessage, lDialogType, lIconType, aDefaultButton); - - free(lMessage); - - return lIntRetVal; -} - - -static int notifyWinGui( - char const * aTitle, /* NULL or "" */ - char const * aMessage, /* NULL or "" may NOT contain \n nor \t */ - char const * aIconType) -{ - wchar_t lTitle[128] = L""; - wchar_t * lMessage = NULL; - wchar_t lIconType[16] = L""; - wchar_t * lTmpWChar; - - if (aTitle) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aTitle); - else lTmpWChar = tinyfd_mbcsTo16(aTitle); - wcscpy(lTitle, lTmpWChar); - } - if (aMessage) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aMessage); - else lTmpWChar = tinyfd_mbcsTo16(aMessage); - lMessage = (wchar_t *) malloc((wcslen(lTmpWChar) + 1)* sizeof(wchar_t)); - if (lMessage) wcscpy(lMessage, lTmpWChar); - } - if (aIconType) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aIconType); - else lTmpWChar = tinyfd_mbcsTo16(aIconType); - wcscpy(lIconType, lTmpWChar); - } - - tinyfd_notifyPopupW(lTitle, lMessage, lIconType); - - free(lMessage); - - return 1; -} - - -static int inputBoxWinGui( - char * aoBuff, - char const * aTitle, /* NULL or "" */ - char const * aMessage, /* NULL or "" may NOT contain \n nor \t */ - char const * aDefaultInput) /* "" , if NULL it's a passwordBox */ -{ - wchar_t lTitle[128] = L""; - wchar_t * lMessage = NULL; - wchar_t lDefaultInput[MAX_PATH_OR_CMD] = L""; - wchar_t * lTmpWChar; - char * lTmpChar; - - if (aTitle) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aTitle); - else lTmpWChar = tinyfd_mbcsTo16(aTitle); - wcscpy(lTitle, lTmpWChar); - } - if (aMessage) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aMessage); - else lTmpWChar = tinyfd_mbcsTo16(aMessage); - lMessage = (wchar_t *) malloc((wcslen(lTmpWChar) + 1)* sizeof(wchar_t)); - if (lMessage) wcscpy(lMessage, lTmpWChar); - } - if (aDefaultInput) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aDefaultInput); - else lTmpWChar = tinyfd_mbcsTo16(aDefaultInput); - wcscpy(lDefaultInput, lTmpWChar); - lTmpWChar = tinyfd_inputBoxW(lTitle, lMessage, lDefaultInput); - } - else lTmpWChar = tinyfd_inputBoxW(lTitle, lMessage, NULL); - - free(lMessage); - - if (!lTmpWChar) - { - aoBuff[0] = '\0'; - return 0; - } - - if (tinyfd_winUtf8) lTmpChar = tinyfd_utf16to8(lTmpWChar); - else lTmpChar = tinyfd_utf16toMbcs(lTmpWChar); - - strcpy(aoBuff, lTmpChar); - - return 1; -} - - -static char * saveFileDialogWinGui( - char * aoBuff, - char const * aTitle, /* NULL or "" */ - char const * aDefaultPathAndFile, /* NULL or "" */ - int aNumOfFilterPatterns, /* 0 */ - char const * const * aFilterPatterns, /* NULL or {"*.jpg","*.png"} */ - char const * aSingleFilterDescription) /* NULL or "image files" */ -{ - wchar_t lTitle[128] = L""; - wchar_t lDefaultPathAndFile[MAX_PATH_OR_CMD] = L""; - wchar_t lSingleFilterDescription[128] = L""; - wchar_t * * lFilterPatterns; - wchar_t * lTmpWChar; - char * lTmpChar; - int i; - - lFilterPatterns = (wchar_t **)malloc(aNumOfFilterPatterns*sizeof(wchar_t *)); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aFilterPatterns[i]); - else lTmpWChar = tinyfd_mbcsTo16(aFilterPatterns[i]); - lFilterPatterns[i] = (wchar_t *)malloc((wcslen(lTmpWChar) + 1) * sizeof(wchar_t *)); - if (lFilterPatterns[i]) wcscpy(lFilterPatterns[i], lTmpWChar); - } - - if (aTitle) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aTitle); - else lTmpWChar = tinyfd_mbcsTo16(aTitle); - wcscpy(lTitle, lTmpWChar); - } - if (aDefaultPathAndFile) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aDefaultPathAndFile); - else lTmpWChar = tinyfd_mbcsTo16(aDefaultPathAndFile); - wcscpy(lDefaultPathAndFile, lTmpWChar); - } - if (aSingleFilterDescription) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aSingleFilterDescription); - else lTmpWChar = tinyfd_mbcsTo16(aSingleFilterDescription); - wcscpy(lSingleFilterDescription, lTmpWChar); - } - - lTmpWChar = tinyfd_saveFileDialogW( - lTitle, - lDefaultPathAndFile, - aNumOfFilterPatterns, - (wchar_t const**) lFilterPatterns, /*stupid cast for gcc*/ - lSingleFilterDescription); - - for (i = 0; i < aNumOfFilterPatterns; i++) - { - free(lFilterPatterns[i]); - } - free(lFilterPatterns); - - if (!lTmpWChar) - { - return NULL; - } - - if (tinyfd_winUtf8) lTmpChar = tinyfd_utf16to8(lTmpWChar); - else lTmpChar = tinyfd_utf16toMbcs(lTmpWChar); - strcpy(aoBuff, lTmpChar); - if (tinyfd_winUtf8) (void)tinyfd_utf16to8(NULL); - else (void)tinyfd_utf16toMbcs(NULL); - - return aoBuff; -} - - -static char * openFileDialogWinGui( - char const * aTitle, /* NULL or "" */ - char const * aDefaultPathAndFile, /* NULL or "" */ - int aNumOfFilterPatterns, /* 0 */ - char const * const * aFilterPatterns, /* NULL or {"*.jpg","*.png"} */ - char const * aSingleFilterDescription, /* NULL or "image files" */ - int aAllowMultipleSelects) /* 0 or 1 */ -{ - wchar_t lTitle[128] = L""; - wchar_t lDefaultPathAndFile[MAX_PATH_OR_CMD] = L""; - wchar_t lSingleFilterDescription[128] = L""; - wchar_t * * lFilterPatterns; - wchar_t * lTmpWChar; - char * lTmpChar; - int i; - - lFilterPatterns = (wchar_t * *)malloc(aNumOfFilterPatterns*sizeof(wchar_t *)); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aFilterPatterns[i]); - else lTmpWChar = tinyfd_mbcsTo16(aFilterPatterns[i]); - lFilterPatterns[i] = (wchar_t *)malloc((wcslen(lTmpWChar) + 1)*sizeof(wchar_t *)); - if (lFilterPatterns[i]) wcscpy(lFilterPatterns[i], lTmpWChar); - } - - if (aTitle) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aTitle); - else lTmpWChar = tinyfd_mbcsTo16(aTitle); - wcscpy(lTitle, lTmpWChar); - } - if (aDefaultPathAndFile) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aDefaultPathAndFile); - else lTmpWChar = tinyfd_mbcsTo16(aDefaultPathAndFile); - wcscpy(lDefaultPathAndFile, lTmpWChar); - } - if (aSingleFilterDescription) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aSingleFilterDescription); - else lTmpWChar = tinyfd_mbcsTo16(aSingleFilterDescription); - wcscpy(lSingleFilterDescription, lTmpWChar); - } - - lTmpWChar = tinyfd_openFileDialogW( - lTitle, - lDefaultPathAndFile, - aNumOfFilterPatterns, - (wchar_t const**) lFilterPatterns, /*stupid cast for gcc*/ - lSingleFilterDescription, - aAllowMultipleSelects); - - for (i = 0; i < aNumOfFilterPatterns; i++) - { - free(lFilterPatterns[i]); - } - free(lFilterPatterns); - - if (!lTmpWChar) return NULL; - - if (tinyfd_winUtf8) lTmpChar = tinyfd_utf16to8(lTmpWChar); - else lTmpChar = tinyfd_utf16toMbcs(lTmpWChar); - (void)tinyfd_openFileDialogW(NULL, NULL, 0, NULL, NULL, -1); - - return lTmpChar; -} - - -static char * selectFolderDialogWinGui( - char * aoBuff, - char const * aTitle, /* NULL or "" */ - char const * aDefaultPath) /* NULL or "" */ -{ - wchar_t lTitle[128] = L""; - wchar_t lDefaultPath[MAX_PATH_OR_CMD] = L""; - wchar_t * lTmpWChar; - char * lTmpChar; - - if (aTitle) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aTitle); - else lTmpWChar = tinyfd_mbcsTo16(aTitle); - wcscpy(lTitle, lTmpWChar); - } - if (aDefaultPath) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aDefaultPath); - else lTmpWChar = tinyfd_mbcsTo16(aDefaultPath); - wcscpy(lDefaultPath, lTmpWChar); - } - - lTmpWChar = tinyfd_selectFolderDialogW( - lTitle, - lDefaultPath); - - if (!lTmpWChar) - { - return NULL; - } - - if (tinyfd_winUtf8) lTmpChar = tinyfd_utf16to8(lTmpWChar); - else lTmpChar = tinyfd_utf16toMbcs(lTmpWChar); - strcpy(aoBuff, lTmpChar); - - return aoBuff; -} - - -static char * colorChooserWinGui( - char const * aTitle, /* NULL or "" */ - char const * aDefaultHexRGB, /* NULL or "#FF0000"*/ - unsigned char const aDefaultRGB[3], /* { 0 , 255 , 255 } */ - unsigned char aoResultRGB[3]) /* { 0 , 0 , 0 } */ -{ - static char lResultHexRGB[8]; - - wchar_t lTitle[128]; - wchar_t lDefaultHexRGB[16]; - wchar_t * lTmpWChar; - char * lTmpChar; - - if (aTitle) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aTitle); - else lTmpWChar = tinyfd_mbcsTo16(aTitle); - wcscpy(lTitle, lTmpWChar); - } - if (aDefaultHexRGB) - { - if (tinyfd_winUtf8) lTmpWChar = tinyfd_utf8to16(aDefaultHexRGB); - else lTmpWChar = tinyfd_mbcsTo16(aDefaultHexRGB); - wcscpy(lDefaultHexRGB, lTmpWChar); - } - - lTmpWChar = tinyfd_colorChooserW( - lTitle, - lDefaultHexRGB, - aDefaultRGB, - aoResultRGB ); - - if (!lTmpWChar) - { - return NULL; - } - - if (tinyfd_winUtf8) lTmpChar = tinyfd_utf16to8(lTmpWChar); - else lTmpChar = tinyfd_utf16toMbcs(lTmpWChar); - strcpy(lResultHexRGB, lTmpChar); - - return lResultHexRGB; -} - - -static int dialogPresent(void) -{ - static int lDialogPresent = -1 ; - char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - char const * lString = "dialog.exe"; - if (!tinyfd_allowCursesDialogs) return 0; - if (lDialogPresent < 0) - { - if (!(lIn = _popen("where dialog.exe","r"))) - { - lDialogPresent = 0 ; - return 0 ; - } - while ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - {} - _pclose( lIn ) ; - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - if ( strcmp(lBuff+strlen(lBuff)-strlen(lString),lString) ) - { - lDialogPresent = 0 ; - } - else - { - lDialogPresent = 1 ; - } - } - return lDialogPresent; -} - - -static int messageBoxWinConsole( - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" may contain \n and \t */ - char const * aDialogType , /* "ok" "okcancel" "yesno" "yesnocancel" */ - char const * aIconType , /* "info" "warning" "error" "question" */ - int aDefaultButton ) /* 0 for cancel/no , 1 for ok/yes , 2 for no in yesnocancel */ -{ - char lDialogString[MAX_PATH_OR_CMD]; - char lDialogFile[MAX_PATH_OR_CMD]; - FILE * lIn; - char lBuff[MAX_PATH_OR_CMD] = ""; - - strcpy(lDialogString, "dialog "); - if (aTitle && strlen(aTitle)) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - if ( aDialogType && ( !strcmp( "okcancel" , aDialogType ) - || !strcmp("yesno", aDialogType) || !strcmp("yesnocancel", aDialogType) ) ) - { - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, "tab: move focus") ; - strcat(lDialogString, "\" ") ; - } - - if ( aDialogType && ! strcmp( "okcancel" , aDialogType ) ) - { - if ( ! aDefaultButton ) - { - strcat( lDialogString , "--defaultno " ) ; - } - strcat( lDialogString , - "--yes-label \"Ok\" --no-label \"Cancel\" --yesno " ) ; - } - else if ( aDialogType && ! strcmp( "yesno" , aDialogType ) ) - { - if ( ! aDefaultButton ) - { - strcat( lDialogString , "--defaultno " ) ; - } - strcat( lDialogString , "--yesno " ) ; - } - else if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - if (!aDefaultButton) - { - strcat(lDialogString, "--defaultno "); - } - strcat(lDialogString, "--menu "); - } - else - { - strcat( lDialogString , "--msgbox " ) ; - } - - strcat( lDialogString , "\"" ) ; - if ( aMessage && strlen(aMessage) ) - { - tfd_replaceSubStr( aMessage , "\n" , "\\n" , lBuff ) ; - strcat(lDialogString, lBuff) ; - lBuff[0]='\0'; - } - strcat(lDialogString, "\" "); - - if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - strcat(lDialogString, "0 60 0 Yes \"\" No \"\""); - strcat(lDialogString, "2>>"); - } - else - { - strcat(lDialogString, "10 60"); - strcat(lDialogString, " && echo 1 > "); - } - - strcpy(lDialogFile, getenv("TEMP")); - strcat(lDialogFile, "\\tinyfd.txt"); - strcat(lDialogString, lDialogFile); - - /*if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ;*/ - system( lDialogString ) ; - - if (!(lIn = fopen(lDialogFile, "r"))) - { - remove(lDialogFile); - return 0 ; - } - while (fgets(lBuff, sizeof(lBuff), lIn) != NULL) - {} - fclose(lIn); - remove(lDialogFile); - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - - /* if (tinyfd_verbose) printf("lBuff: %s\n", lBuff); */ - if ( ! strlen(lBuff) ) - { - return 0; - } - - if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - if (lBuff[0] == 'Y') return 1; - else return 2; - } - - return 1; -} - - -static int inputBoxWinConsole( - char * aoBuff , - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" may NOT contain \n nor \t */ - char const * aDefaultInput ) /* "" , if NULL it's a passwordBox */ -{ - char lDialogString[MAX_PATH_OR_CMD]; - char lDialogFile[MAX_PATH_OR_CMD]; - FILE * lIn; - int lResult; - - strcpy(lDialogFile, getenv("TEMP")); - strcat(lDialogFile, "\\tinyfd.txt"); - strcpy(lDialogString , "echo|set /p=1 >" ) ; - strcat(lDialogString, lDialogFile); - strcat( lDialogString , " & " ) ; - - strcat( lDialogString , "dialog " ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, "tab: move focus") ; - if ( ! aDefaultInput ) - { - strcat(lDialogString, " (sometimes nothing, no blink nor star, is shown in text field)") ; - } - - strcat(lDialogString, "\" ") ; - - if ( ! aDefaultInput ) - { - strcat( lDialogString , "--insecure --passwordbox" ) ; - } - else - { - strcat( lDialogString , "--inputbox" ) ; - } - strcat( lDialogString , " \"" ) ; - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage) ; - } - strcat(lDialogString,"\" 10 60 ") ; - if ( aDefaultInput && strlen(aDefaultInput) ) - { - strcat(lDialogString, "\"") ; - strcat(lDialogString, aDefaultInput) ; - strcat(lDialogString, "\" ") ; - } - - strcat(lDialogString, "2>>"); - strcpy(lDialogFile, getenv("TEMP")); - strcat(lDialogFile, "\\tinyfd.txt"); - strcat(lDialogString, lDialogFile); - strcat(lDialogString, " || echo 0 > "); - strcat(lDialogString, lDialogFile); - - /* printf( "lDialogString: %s\n" , lDialogString ) ; */ - system( lDialogString ) ; - - if (!(lIn = fopen(lDialogFile, "r"))) - { - remove(lDialogFile); - aoBuff[0] = '\0'; - return 0; - } - while (fgets(aoBuff, MAX_PATH_OR_CMD, lIn) != NULL) - {} - fclose(lIn); - - wipefile(lDialogFile); - remove(lDialogFile); - if ( aoBuff[strlen( aoBuff ) -1] == '\n' ) - { - aoBuff[strlen( aoBuff ) -1] = '\0' ; - } - /* printf( "aoBuff: %s\n" , aoBuff ) ; */ - - /* printf( "aoBuff: %s len: %lu \n" , aoBuff , strlen(aoBuff) ) ; */ - lResult = strncmp( aoBuff , "1" , 1) ? 0 : 1 ; - /* printf( "lResult: %d \n" , lResult ) ; */ - if ( ! lResult ) - { - aoBuff[0] = '\0'; - return 0 ; - } - /* printf( "aoBuff+1: %s\n" , aoBuff+1 ) ; */ - strcpy(aoBuff, aoBuff+3); - return 1; -} - - -static char * saveFileDialogWinConsole( - char * aoBuff , - char const * aTitle , /* NULL or "" */ - char const * aDefaultPathAndFile ) /* NULL or "" */ -{ - char lDialogString[MAX_PATH_OR_CMD]; - char lPathAndFile[MAX_PATH_OR_CMD] = ""; - FILE * lIn; - - strcpy( lDialogString , "dialog " ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, - "tab: focus | /: populate | spacebar: fill text field | ok: TEXT FIELD ONLY") ; - strcat(lDialogString, "\" ") ; - - strcat( lDialogString , "--fselect \"" ) ; - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - /* dialog.exe uses unix separators even on windows */ - strcpy(lPathAndFile, aDefaultPathAndFile); - replaceChr( lPathAndFile , '\\' , '/' ) ; - } - - /* dialog.exe needs at least one separator */ - if ( ! strchr(lPathAndFile, '/') ) - { - strcat(lDialogString, "./") ; - } - strcat(lDialogString, lPathAndFile) ; - strcat(lDialogString, "\" 0 60 2>"); - strcpy(lPathAndFile, getenv("TEMP")); - strcat(lPathAndFile, "\\tinyfd.txt"); - strcat(lDialogString, lPathAndFile); - - /* printf( "lDialogString: %s\n" , lDialogString ) ; */ - system( lDialogString ) ; - - if (!(lIn = fopen(lPathAndFile, "r"))) - { - remove(lPathAndFile); - return NULL; - } - while (fgets(aoBuff, MAX_PATH_OR_CMD, lIn) != NULL) - {} - fclose(lIn); - remove(lPathAndFile); - replaceChr( aoBuff , '/' , '\\' ) ; - /* printf( "aoBuff: %s\n" , aoBuff ) ; */ - getLastName(lDialogString,aoBuff); - if ( ! strlen(lDialogString) ) - { - return NULL; - } - return aoBuff; -} - - -static char * openFileDialogWinConsole( - char const * aTitle , /* NULL or "" */ - char const * aDefaultPathAndFile ) /* NULL or "" */ -{ - char lFilterPatterns[MAX_PATH_OR_CMD] = ""; - char lDialogString[MAX_PATH_OR_CMD] ; - FILE * lIn; - - static char aoBuff[MAX_PATH_OR_CMD]; - - strcpy( lDialogString , "dialog " ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, - "tab: focus | /: populate | spacebar: fill text field | ok: TEXT FIELD ONLY") ; - strcat(lDialogString, "\" ") ; - - strcat( lDialogString , "--fselect \"" ) ; - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - /* dialog.exe uses unix separators even on windows */ - strcpy(lFilterPatterns, aDefaultPathAndFile); - replaceChr( lFilterPatterns , '\\' , '/' ) ; - } - - /* dialog.exe needs at least one separator */ - if ( ! strchr(lFilterPatterns, '/') ) - { - strcat(lDialogString, "./") ; - } - strcat(lDialogString, lFilterPatterns) ; - strcat(lDialogString, "\" 0 60 2>"); - strcpy(lFilterPatterns, getenv("TEMP")); - strcat(lFilterPatterns, "\\tinyfd.txt"); - strcat(lDialogString, lFilterPatterns); - - /* printf( "lDialogString: %s\n" , lDialogString ) ; */ - system( lDialogString ) ; - - if (!(lIn = fopen(lFilterPatterns, "r"))) - { - remove(lFilterPatterns); - return NULL; - } - while (fgets(aoBuff, MAX_PATH_OR_CMD, lIn) != NULL) - {} - fclose(lIn); - remove(lFilterPatterns); - replaceChr( aoBuff , '/' , '\\' ) ; - /* printf( "aoBuff: %s\n" , aoBuff ) ; */ - return aoBuff; -} - - -static char * selectFolderDialogWinConsole( - char * aoBuff , - char const * aTitle , /* NULL or "" */ - char const * aDefaultPath ) /* NULL or "" */ -{ - char lDialogString[MAX_PATH_OR_CMD] ; - char lString[MAX_PATH_OR_CMD] ; - FILE * lIn ; - - strcpy( lDialogString , "dialog " ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, - "tab: focus | /: populate | spacebar: fill text field | ok: TEXT FIELD ONLY") ; - strcat(lDialogString, "\" ") ; - - strcat( lDialogString , "--dselect \"" ) ; - if ( aDefaultPath && strlen(aDefaultPath) ) - { - /* dialog.exe uses unix separators even on windows */ - strcpy(lString, aDefaultPath) ; - ensureFinalSlash(lString); - replaceChr( lString , '\\' , '/' ) ; - strcat(lDialogString, lString) ; - } - else - { - /* dialog.exe needs at least one separator */ - strcat(lDialogString, "./") ; - } - strcat(lDialogString, "\" 0 60 2>"); - strcpy(lString, getenv("TEMP")); - strcat(lString, "\\tinyfd.txt"); - strcat(lDialogString, lString); - - /* printf( "lDialogString: %s\n" , lDialogString ) ; */ - system( lDialogString ) ; - - if (!(lIn = fopen(lString, "r"))) - { - remove(lString); - return NULL; - } - while (fgets(aoBuff, MAX_PATH_OR_CMD, lIn) != NULL) - {} - fclose(lIn); - remove(lString); - replaceChr( aoBuff , '/' , '\\' ) ; - /* printf( "aoBuff: %s\n" , aoBuff ) ; */ - return aoBuff; -} - -static void writeUtf8( char const * aUtf8String ) -{ - unsigned long lNum; - void * lConsoleHandle; - wchar_t * lTmpWChar; - - lConsoleHandle = GetStdHandle(STD_OUTPUT_HANDLE); - lTmpWChar = tinyfd_utf8to16(aUtf8String); - (void)WriteConsoleW(lConsoleHandle, lTmpWChar, (DWORD) wcslen(lTmpWChar), &lNum, NULL); -} - - -int tinyfd_messageBox( - char const * aTitle, /* NULL or "" */ - char const * aMessage, /* NULL or "" may contain \n and \t */ - char const * aDialogType, /* "ok" "okcancel" "yesno" "yesnocancel" */ - char const * aIconType, /* "info" "warning" "error" "question" */ - int aDefaultButton) /* 0 for cancel/no , 1 for ok/yes , 2 for no in yesnocancel */ -{ - char lChar; - UINT lOriginalCP = 0; - UINT lOriginalOutputCP = 0; - - if (tfd_quoteDetected(aTitle)) return tinyfd_messageBox("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aDialogType, aIconType, aDefaultButton); - if (tfd_quoteDetected(aMessage)) return tinyfd_messageBox(aTitle, "INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDialogType, aIconType, aDefaultButton); - - if ((!tinyfd_forceConsole || !(GetConsoleWindow() || dialogPresent())) - && (!getenv("SSH_CLIENT") || getenvDISPLAY())) - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "windows"); return 1; } - return messageBoxWinGui(aTitle, aMessage, aDialogType, aIconType, aDefaultButton); - } - else if (dialogPresent()) - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "dialog"); return 0; } - return messageBoxWinConsole( - aTitle, aMessage, aDialogType, aIconType, aDefaultButton); - } - else - { - if (!tinyfd_winUtf8) - { - lOriginalCP = GetConsoleCP(); - lOriginalOutputCP = GetConsoleOutputCP(); - (void)SetConsoleCP(GetACP()); - (void)SetConsoleOutputCP(GetACP()); - } - - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "basicinput"); return 0; } - if (!gWarningDisplayed && !tinyfd_forceConsole) - { - gWarningDisplayed = 1; - printf("\n\n%s\n", gTitle); - printf("%s\n\n", tinyfd_needs); - } - - if (aTitle && strlen(aTitle)) - { - printf("\n"); - if (tinyfd_winUtf8) writeUtf8(aTitle); - else printf("%s", aTitle); - printf("\n\n"); - } - if (aDialogType && !strcmp("yesno", aDialogType)) - { - do - { - if (aMessage && strlen(aMessage)) - { - if (tinyfd_winUtf8) writeUtf8(aMessage); - else printf("%s", aMessage); - printf("\n"); - } - printf("y/n: "); - lChar = (char)tolower(_getch()); - printf("\n\n"); - } while (lChar != 'y' && lChar != 'n'); - if (!tinyfd_winUtf8) { (void)SetConsoleCP(lOriginalCP); (void)SetConsoleOutputCP(lOriginalOutputCP); } - return lChar == 'y' ? 1 : 0; - } - else if (aDialogType && !strcmp("okcancel", aDialogType)) - { - do - { - if (aMessage && strlen(aMessage)) - { - if (tinyfd_winUtf8) writeUtf8(aMessage); - else printf("%s", aMessage); - printf("\n"); - } - printf("[O]kay/[C]ancel: "); - lChar = (char)tolower(_getch()); - printf("\n\n"); - } while (lChar != 'o' && lChar != 'c'); - if (!tinyfd_winUtf8) { (void)SetConsoleCP(lOriginalCP); (void)SetConsoleOutputCP(lOriginalOutputCP); } - return lChar == 'o' ? 1 : 0; - } - else if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - do - { - if (aMessage && strlen(aMessage)) - { - if (tinyfd_winUtf8) writeUtf8(aMessage); - else printf("%s", aMessage); - printf("\n"); - } - printf("[Y]es/[N]o/[C]ancel: "); - lChar = (char)tolower(_getch()); - printf("\n\n"); - } while (lChar != 'y' && lChar != 'n' && lChar != 'c'); - if (!tinyfd_winUtf8) { (void)SetConsoleCP(lOriginalCP); (void)SetConsoleOutputCP(lOriginalOutputCP); } - return (lChar == 'y') ? 1 : (lChar == 'n') ? 2 : 0; - } - else - { - if (aMessage && strlen(aMessage)) - { - if (tinyfd_winUtf8) writeUtf8(aMessage); - else printf("%s", aMessage); - printf("\n\n"); - } - printf("press enter to continue "); - lChar = (char)_getch(); - printf("\n\n"); - if (!tinyfd_winUtf8) { (void)SetConsoleCP(lOriginalCP); (void)SetConsoleOutputCP(lOriginalOutputCP); } - return 1; - } - } -} - - -/* return has only meaning for tinyfd_query */ -int tinyfd_notifyPopup( - char const * aTitle, /* NULL or "" */ - char const * aMessage , /* NULL or "" may contain \n \t */ - char const * aIconType ) /* "info" "warning" "error" */ -{ - if (tfd_quoteDetected(aTitle)) return tinyfd_notifyPopup("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aIconType); - if (tfd_quoteDetected(aMessage)) return tinyfd_notifyPopup(aTitle, "INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aIconType); - - if ( powershellPresent() && (!tinyfd_forceConsole || !( - GetConsoleWindow() || - dialogPresent())) - && (!getenv("SSH_CLIENT") || getenvDISPLAY())) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"windows");return 1;} - return notifyWinGui(aTitle, aMessage, aIconType); - } - else - return tinyfd_messageBox(aTitle, aMessage, "ok" , aIconType, 0); -} - - -/* returns NULL on cancel */ -char * tinyfd_inputBox( - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" (\n and \t have no effect) */ - char const * aDefaultInput ) /* "" , if NULL it's a passwordBox */ -{ - static char lBuff[MAX_PATH_OR_CMD] = ""; - char * lEOF; - - DWORD mode = 0; - HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); - - unsigned long lNum; - void * lConsoleHandle; - char * lTmpChar; - wchar_t lBuffW[1024]; - - UINT lOriginalCP = 0; - UINT lOriginalOutputCP = 0; - - if (!aTitle && !aMessage && !aDefaultInput) return lBuff; /* now I can fill lBuff from outside */ - - if (tfd_quoteDetected(aTitle)) return tinyfd_inputBox("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aDefaultInput); - if (tfd_quoteDetected(aMessage)) return tinyfd_inputBox(aTitle, "INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultInput); - if (tfd_quoteDetected(aDefaultInput)) return tinyfd_inputBox(aTitle, aMessage, "INVALID DEFAULT_INPUT WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - - mode = 0; - hStdin = GetStdHandle(STD_INPUT_HANDLE); - - if ((!tinyfd_forceConsole || !( - GetConsoleWindow() || - dialogPresent())) - && (!getenv("SSH_CLIENT") || getenvDISPLAY())) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"windows");return (char *)1;} - lBuff[0]='\0'; - if (inputBoxWinGui(lBuff, aTitle, aMessage, aDefaultInput)) return lBuff; - else return NULL; - } - else if ( dialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - lBuff[0]='\0'; - if (inputBoxWinConsole(lBuff, aTitle, aMessage, aDefaultInput) ) return lBuff; - else return NULL; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"basicinput");return (char *)0;} - lBuff[0]='\0'; - if (!gWarningDisplayed && !tinyfd_forceConsole) - { - gWarningDisplayed = 1 ; - printf("\n\n%s\n", gTitle); - printf("%s\n\n", tinyfd_needs); - } - - if (!tinyfd_winUtf8) - { - lOriginalCP = GetConsoleCP(); - lOriginalOutputCP = GetConsoleOutputCP(); - (void)SetConsoleCP(GetACP()); - (void)SetConsoleOutputCP(GetACP()); - } - - if (aTitle && strlen(aTitle)) - { - printf("\n"); - if (tinyfd_winUtf8) writeUtf8(aTitle); - else printf("%s", aTitle); - printf("\n\n"); - } - if ( aMessage && strlen(aMessage) ) - { - if (tinyfd_winUtf8) writeUtf8(aMessage); - else printf("%s", aMessage); - printf("\n"); - } - printf("(ctrl-Z + enter to cancel): "); - if ( ! aDefaultInput ) - { - (void) GetConsoleMode(hStdin, &mode); - (void) SetConsoleMode(hStdin, mode & (~ENABLE_ECHO_INPUT)); - } - if (tinyfd_winUtf8) - { - lConsoleHandle = GetStdHandle(STD_INPUT_HANDLE); - (void) ReadConsoleW(lConsoleHandle, lBuffW, MAX_PATH_OR_CMD, &lNum, NULL); - if (!aDefaultInput) - { - (void)SetConsoleMode(hStdin, mode); - printf("\n"); - } - lBuffW[lNum] = '\0'; - if (lBuffW[wcslen(lBuffW) - 1] == '\n') lBuffW[wcslen(lBuffW) - 1] = '\0'; - if (lBuffW[wcslen(lBuffW) - 1] == '\r') lBuffW[wcslen(lBuffW) - 1] = '\0'; - lTmpChar = tinyfd_utf16to8(lBuffW); - if (lTmpChar) - { - strcpy(lBuff, lTmpChar); - return lBuff; - } - else - return NULL; - } - else - { - lEOF = fgets(lBuff, MAX_PATH_OR_CMD, stdin); - if (!aDefaultInput) - { - (void)SetConsoleMode(hStdin, mode); - printf("\n"); - } - - if (!tinyfd_winUtf8) - { - (void)SetConsoleCP(lOriginalCP); - (void)SetConsoleOutputCP(lOriginalOutputCP); - } - - if (!lEOF) - { - return NULL; - } - printf("\n"); - if (strchr(lBuff, 27)) - { - return NULL; - } - if (lBuff[strlen(lBuff) - 1] == '\n') - { - lBuff[strlen(lBuff) - 1] = '\0'; - } - return lBuff; - } - } -} - - -char * tinyfd_saveFileDialog( - char const * aTitle , /* NULL or "" */ - char const * aDefaultPathAndFile , /* NULL or "" */ - int aNumOfFilterPatterns , /* 0 */ - char const * const * aFilterPatterns , /* NULL or {"*.jpg","*.png"} */ - char const * aSingleFilterDescription ) /* NULL or "image files" */ -{ - static char lBuff[MAX_PATH_OR_CMD] ; - char lString[MAX_PATH_OR_CMD] ; - char * p ; - char * lPointerInputBox; - int i; - - lBuff[0]='\0'; - - if ( ! aFilterPatterns ) aNumOfFilterPatterns = 0 ; - if (tfd_quoteDetected(aTitle)) return tinyfd_saveFileDialog("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription); - if (tfd_quoteDetected(aDefaultPathAndFile)) return tinyfd_saveFileDialog(aTitle, "INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription); - if (tfd_quoteDetected(aSingleFilterDescription)) return tinyfd_saveFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, "INVALID FILTER_DESCRIPTION WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (tfd_quoteDetected(aFilterPatterns[i])) return tinyfd_saveFileDialog("INVALID FILTER_PATTERN WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, 0, NULL, NULL); - } - - - if ( ( !tinyfd_forceConsole || !( GetConsoleWindow() || dialogPresent() ) ) - && (!getenv("SSH_CLIENT") || getenvDISPLAY())) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"windows");return (char *)1;} - p = saveFileDialogWinGui(lBuff, - aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, (char const * const *)aFilterPatterns, aSingleFilterDescription); - } - else if (dialogPresent()) - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "dialog"); return (char *)0; } - p = saveFileDialogWinConsole(lBuff, aTitle, aDefaultPathAndFile); - } - else - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "basicinput"); return (char *)0; } - strcpy(lBuff, "Save file in "); - strcat(lBuff, getCurDir()); - - lPointerInputBox = tinyfd_inputBox(NULL,NULL,NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, lBuff, ""); - if (p) strcpy(lBuff, p); else lBuff[0] = '\0'; - if (lPointerInputBox) strcpy(lPointerInputBox, lString); /* restore its previous content to tinyfd_inputBox */ - p = lBuff; - } - - if ( ! p || ! strlen( p ) ) - { - return NULL; - } - getPathWithoutFinalSlash( lString , p ) ; - if ( strlen( lString ) && ! dirExists( lString ) ) - { - return NULL ; - } - getLastName(lString,p); - if ( ! filenameValid(lString) ) - { - return NULL; - } - return p ; -} - - -/* in case of multiple files, the separator is | */ -char * tinyfd_openFileDialog( - char const * aTitle , /* NULL or "" */ - char const * aDefaultPathAndFile, /* NULL or "" */ - int aNumOfFilterPatterns , /* 0 */ - char const * const * aFilterPatterns, /* NULL or {"*.jpg","*.png"} */ - char const * aSingleFilterDescription, /* NULL or "image files" */ - int aAllowMultipleSelects ) /* 0 or 1 */ -{ - static char lBuff[MAX_PATH_OR_CMD]; - char lString[MAX_PATH_OR_CMD]; - char * p; - char * lPointerInputBox; - int i; - - if ( ! aFilterPatterns ) aNumOfFilterPatterns = 0 ; - if (tfd_quoteDetected(aTitle)) return tinyfd_openFileDialog("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); - if (tfd_quoteDetected(aDefaultPathAndFile)) return tinyfd_openFileDialog(aTitle, "INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); - if (tfd_quoteDetected(aSingleFilterDescription)) return tinyfd_openFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, "INVALID FILTER_DESCRIPTION WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aAllowMultipleSelects); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (tfd_quoteDetected(aFilterPatterns[i])) return tinyfd_openFileDialog("INVALID FILTER_PATTERN WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, 0, NULL, NULL, aAllowMultipleSelects); - } - - if ( ( !tinyfd_forceConsole || !( GetConsoleWindow() || dialogPresent() ) ) - && (!getenv("SSH_CLIENT") || getenvDISPLAY())) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"windows");return (char *)1;} - p = openFileDialogWinGui( aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, - (char const * const *)aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); - } - else if (dialogPresent()) - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "dialog"); return (char *)0; } - p = openFileDialogWinConsole(aTitle, aDefaultPathAndFile); - } - else - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "basicinput"); return (char *)0; } - strcpy(lBuff, "Open file from "); - strcat(lBuff, getCurDir()); - lPointerInputBox = tinyfd_inputBox(NULL, NULL, NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, lBuff, ""); - if (p) strcpy(lBuff, p); else lBuff[0] = '\0'; - if (lPointerInputBox) strcpy(lPointerInputBox, lString); /* restore its previous content to tinyfd_inputBox */ - p = lBuff; - } - - if ( ! p || ! strlen( p ) ) - { - return NULL; - } - if ( aAllowMultipleSelects && strchr(p, '|') ) - { - p = ensureFilesExist( (char *) p , p ) ; - } - else if ( ! fileExists(p) ) - { - return NULL ; - } - /* printf( "lBuff3: %s\n" , p ) ; */ - return p ; -} - - -char * tinyfd_selectFolderDialog( - char const * aTitle , /* NULL or "" */ - char const * aDefaultPath ) /* NULL or "" */ -{ - static char lBuff[MAX_PATH_OR_CMD]; - char * p; - char * lPointerInputBox; - char lString[MAX_PATH_OR_CMD]; - - if (tfd_quoteDetected(aTitle)) return tinyfd_selectFolderDialog("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPath); - if (tfd_quoteDetected(aDefaultPath)) return tinyfd_selectFolderDialog(aTitle, "INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - - if ( ( !tinyfd_forceConsole || !( GetConsoleWindow() || dialogPresent() ) ) - && (!getenv("SSH_CLIENT") || getenvDISPLAY())) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"windows");return (char *)1;} - p = selectFolderDialogWinGui(lBuff, aTitle, aDefaultPath); - } - else - if (dialogPresent()) - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "dialog"); return (char *)0; } - p = selectFolderDialogWinConsole(lBuff, aTitle, aDefaultPath); - } - else - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "basicinput"); return (char *)0; } - strcpy(lBuff, "Select folder from "); - strcat(lBuff, getCurDir()); - lPointerInputBox = tinyfd_inputBox(NULL, NULL, NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, lBuff, ""); - if (p) strcpy(lBuff, p); else lBuff[0] = '\0'; - if (lPointerInputBox) strcpy(lPointerInputBox, lString); /* restore its previous content to tinyfd_inputBox */ - p = lBuff; - } - - if ( ! p || ! strlen( p ) || ! dirExists( p ) ) - { - return NULL ; - } - return p ; -} - - -/* aDefaultRGB is used only if aDefaultHexRGB is absent */ -/* aDefaultRGB and aoResultRGB can be the same array */ -/* returns NULL on cancel */ -/* returns the hexcolor as a string "#FF0000" */ -/* aoResultRGB also contains the result */ -char * tinyfd_colorChooser( - char const * aTitle, /* NULL or "" */ - char const * aDefaultHexRGB, /* NULL or "" or "#FF0000"*/ - unsigned char const aDefaultRGB[3], /* { 0 , 255 , 255 } */ - unsigned char aoResultRGB[3]) /* { 0 , 0 , 0 } */ -{ - static char lDefaultHexRGB[16]; - int i; - char * p ; - char * lPointerInputBox; - char lString[MAX_PATH_OR_CMD]; - - lDefaultHexRGB[0] = '\0'; - - if (tfd_quoteDetected(aTitle)) return tinyfd_colorChooser("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultHexRGB, aDefaultRGB, aoResultRGB); - if (tfd_quoteDetected(aDefaultHexRGB)) return tinyfd_colorChooser(aTitle, "INVALID DEFAULT_HEX_RGB WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultRGB, aoResultRGB); - - if ( (!tinyfd_forceConsole || !( GetConsoleWindow() || dialogPresent()) ) - && (!getenv("SSH_CLIENT") || getenvDISPLAY())) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"windows");return (char *)1;} - p = colorChooserWinGui(aTitle, aDefaultHexRGB, aDefaultRGB, aoResultRGB); - if (p) - { - strcpy(lDefaultHexRGB, p); - return lDefaultHexRGB; - } - return NULL; - } - else if (dialogPresent()) - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "dialog"); return (char *)0; } - } - else - { - if (aTitle&&!strcmp(aTitle, "tinyfd_query")){ strcpy(tinyfd_response, "basicinput"); return (char *)0; } - } - - if (aDefaultHexRGB && (strlen(aDefaultHexRGB)==7) ) - { - strncpy(lDefaultHexRGB, aDefaultHexRGB,7); - lDefaultHexRGB[7]='\0'; - } - else - { - RGB2Hex(aDefaultRGB, lDefaultHexRGB); - } - - lPointerInputBox = tinyfd_inputBox(NULL, NULL, NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, "Enter hex rgb color (i.e. #f5ca20)", lDefaultHexRGB); - - if ( !p || (strlen(p) != 7) || (p[0] != '#') ) - { - return NULL ; - } - for ( i = 1 ; i < 7 ; i ++ ) - { - if ( ! isxdigit( (int) p[i] ) ) - { - return NULL ; - } - } - Hex2RGB(p,aoResultRGB); - - strcpy(lDefaultHexRGB, p); - - if (lPointerInputBox) strcpy(lPointerInputBox, lString); /* restore its previous content to tinyfd_inputBox */ - - return lDefaultHexRGB; -} - - -#else /* unix */ - -static char gPython2Name[16]; -static char gPython3Name[16]; -static char gPythonName[16]; - -int tfd_isDarwin(void) -{ - static int lsIsDarwin = -1 ; - struct utsname lUtsname ; - if ( lsIsDarwin < 0 ) - { - lsIsDarwin = !uname(&lUtsname) && !strcmp(lUtsname.sysname,"Darwin") ; - } - return lsIsDarwin ; -} - - -static int dirExists( char const * aDirPath ) -{ - DIR * lDir ; - if ( ! aDirPath || ! strlen( aDirPath ) ) - return 0 ; - lDir = opendir( aDirPath ) ; - if ( ! lDir ) - { - return 0 ; - } - closedir( lDir ) ; - return 1 ; -} - - -static int detectPresence( char const * aExecutable ) -{ - char lBuff[MAX_PATH_OR_CMD] ; - char lTestedString[MAX_PATH_OR_CMD] = "which " ; - FILE * lIn ; -#ifdef _GNU_SOURCE - char* lAllocatedCharString; - int lSubstringUndetected; -#endif - - strcat( lTestedString , aExecutable ) ; - strcat( lTestedString, " 2>/dev/null "); - lIn = popen( lTestedString , "r" ) ; - if ( ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - && ( ! strchr( lBuff , ':' ) ) && ( strncmp(lBuff, "no ", 3) ) ) - { /* present */ - pclose( lIn ) ; - -#ifdef _GNU_SOURCE /*to bypass this, just comment out "#define _GNU_SOURCE" at the top of the file*/ - if ( lBuff[strlen( lBuff ) -1] == '\n' ) lBuff[strlen( lBuff ) -1] = '\0' ; - lAllocatedCharString = realpath(lBuff,NULL); /*same as canonicalize_file_name*/ - lSubstringUndetected = ! strstr(lAllocatedCharString, aExecutable); - free(lAllocatedCharString); - if (lSubstringUndetected) - { - if (tinyfd_verbose) printf("detectPresence %s %d\n", aExecutable, 0); - return 0; - } -#endif /*_GNU_SOURCE*/ - - if (tinyfd_verbose) printf("detectPresence %s %d\n", aExecutable, 1); - return 1 ; - } - else - { - pclose( lIn ) ; - if (tinyfd_verbose) printf("detectPresence %s %d\n", aExecutable, 0); - return 0 ; - } -} - - -static char * getVersion( char const * aExecutable ) /*version must be first numeral*/ -{ - static char lBuff[MAX_PATH_OR_CMD] ; - char lTestedString[MAX_PATH_OR_CMD] ; - FILE * lIn ; - char * lTmp ; - - strcpy( lTestedString , aExecutable ) ; - strcat( lTestedString , " --version" ) ; - - lIn = popen( lTestedString , "r" ) ; - lTmp = fgets( lBuff , sizeof( lBuff ) , lIn ) ; - pclose( lIn ) ; - - lTmp += strcspn(lTmp,"0123456789"); - /* printf("lTmp:%s\n", lTmp); */ - return lTmp ; -} - - -static int * getMajorMinorPatch( char const * aExecutable ) -{ - static int lArray[3] ; - char * lTmp ; - - lTmp = (char *) getVersion(aExecutable); - lArray[0] = atoi( strtok(lTmp," ,.-") ) ; - /* printf("lArray0 %d\n", lArray[0]); */ - lArray[1] = atoi( strtok(0," ,.-") ) ; - /* printf("lArray1 %d\n", lArray[1]); */ - lArray[2] = atoi( strtok(0," ,.-") ) ; - /* printf("lArray2 %d\n", lArray[2]); */ - - if ( !lArray[0] && !lArray[1] && !lArray[2] ) return NULL; - return lArray ; -} - - -static int tryCommand( char const * aCommand ) -{ - char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - - lIn = popen( aCommand , "r" ) ; - if ( fgets( lBuff , sizeof( lBuff ) , lIn ) == NULL ) - { /* present */ - pclose( lIn ) ; - return 1 ; - } - else - { - pclose( lIn ) ; - return 0 ; - } - -} - - -static int isTerminalRunning(void) -{ - static int lIsTerminalRunning = -1 ; - if ( lIsTerminalRunning < 0 ) - { - lIsTerminalRunning = isatty(1); - if (tinyfd_verbose) printf("isTerminalRunning %d\n", lIsTerminalRunning ); - } - return lIsTerminalRunning; -} - - -static char * dialogNameOnly(void) -{ - static char lDialogName[128] = "*" ; - if ( lDialogName[0] == '*' ) - { - if (!tinyfd_allowCursesDialogs) - { - strcpy(lDialogName , "" ); - } - else if ( tfd_isDarwin() && * strcpy(lDialogName , "/opt/local/bin/dialog" ) - && detectPresence( lDialogName ) ) - {} - else if ( * strcpy(lDialogName , "dialog" ) - && detectPresence( lDialogName ) ) - {} - else - { - strcpy(lDialogName , "" ); - } - } - return lDialogName ; -} - - -int isDialogVersionBetter09b(void) -{ - char const * lDialogName ; - char * lVersion ; - int lMajor ; - int lMinor ; - int lDate ; - int lResult ; - char * lMinorP ; - char * lLetter ; - char lBuff[128] ; - - /*char lTest[128] = " 0.9b-20031126" ;*/ - - lDialogName = dialogNameOnly() ; - if ( ! strlen(lDialogName) || !(lVersion = (char *) getVersion(lDialogName)) ) return 0 ; - /*lVersion = lTest ;*/ - /*printf("lVersion %s\n", lVersion);*/ - strcpy(lBuff,lVersion); - lMajor = atoi( strtok(lVersion," ,.-") ) ; - /*printf("lMajor %d\n", lMajor);*/ - lMinorP = strtok(0," ,.-abcdefghijklmnopqrstuvxyz"); - lMinor = atoi( lMinorP ) ; - /*printf("lMinor %d\n", lMinor );*/ - lDate = atoi( strtok(0," ,.-") ) ; - if (lDate<0) lDate = - lDate; - /*printf("lDate %d\n", lDate);*/ - lLetter = lMinorP + strlen(lMinorP) ; - strcpy(lVersion,lBuff); - strtok(lLetter," ,.-"); - /*printf("lLetter %s\n", lLetter);*/ - lResult = (lMajor > 0) || ( ( lMinor == 9 ) && (*lLetter == 'b') && (lDate >= 20031126) ); - /*printf("lResult %d\n", lResult);*/ - return lResult; -} - - -static int whiptailPresentOnly(void) -{ - static int lWhiptailPresent = -1 ; - if (!tinyfd_allowCursesDialogs) return 0; - if ( lWhiptailPresent < 0 ) - { - lWhiptailPresent = detectPresence( "whiptail" ) ; - } - return lWhiptailPresent ; -} - - -static char * terminalName(void) -{ - static char lTerminalName[128] = "*" ; - char lShellName[64] = "*" ; - int * lArray; - - if ( lTerminalName[0] == '*' ) - { - if ( detectPresence( "bash" ) ) - { - strcpy(lShellName , "bash -c " ) ; /*good for basic input*/ - } - else if ( strlen(dialogNameOnly()) || whiptailPresentOnly() ) - { - strcpy(lShellName , "sh -c " ) ; /*good enough for dialog & whiptail*/ - } - else - { - strcpy(lTerminalName , "" ) ; - return NULL ; - } - - if ( tfd_isDarwin() ) - { - if ( * strcpy(lTerminalName , "/opt/X11/bin/xterm" ) - && detectPresence( lTerminalName ) ) - { - strcat(lTerminalName , " -fa 'DejaVu Sans Mono' -fs 10 -title tinyfiledialogs -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else - { - strcpy(lTerminalName , "" ) ; - } - } - else if ( * strcpy(lTerminalName,"xterm") /*good (small without parameters)*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -fa 'DejaVu Sans Mono' -fs 10 -title tinyfiledialogs -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"terminator") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -x " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"lxterminal") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"konsole") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"kterm") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"tilix") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"xfce4-terminal") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -x " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"mate-terminal") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -x " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"Eterm") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"evilvte") /*good*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"pterm") /*good (only letters)*/ - && detectPresence(lTerminalName) ) - { - strcat(lTerminalName , " -e " ) ; - strcat(lTerminalName , lShellName ) ; - } - else if ( * strcpy(lTerminalName,"gnome-terminal") - && detectPresence(lTerminalName) && (lArray = getMajorMinorPatch(lTerminalName)) - && ((lArray[0]<3) || (lArray[0]==3 && lArray[1]<=6)) ) - { - strcat(lTerminalName , " --disable-factory -x " ) ; - strcat(lTerminalName , lShellName ) ; - } - else - { - strcpy(lTerminalName , "" ) ; - } - /* bad: koi rxterm guake tilda vala-terminal qterminal kgx - aterm Terminal terminology sakura lilyterm weston-terminal - roxterm termit xvt rxvt mrxvt urxvt */ - } - if ( strlen(lTerminalName) ) - { - return lTerminalName ; - } - else - { - return NULL ; - } -} - - -static char * dialogName(void) -{ - char * lDialogName ; - lDialogName = dialogNameOnly( ) ; - if ( strlen(lDialogName) && ( isTerminalRunning() || terminalName() ) ) - { - return lDialogName ; - } - else - { - return NULL ; - } -} - - -static int whiptailPresent(void) -{ - int lWhiptailPresent ; - lWhiptailPresent = whiptailPresentOnly( ) ; - if ( lWhiptailPresent && ( isTerminalRunning() || terminalName() ) ) - { - return lWhiptailPresent ; - } - else - { - return 0 ; - } -} - - - -static int graphicMode(void) -{ - return !( tinyfd_forceConsole && (isTerminalRunning() || terminalName()) ) - && ( getenvDISPLAY() - || (tfd_isDarwin() && (!getenv("SSH_TTY") || getenvDISPLAY() ) ) ) ; -} - - -static int pactlPresent(void) -{ - static int lPactlPresent = -1 ; - if ( lPactlPresent < 0 ) - { - lPactlPresent = detectPresence("pactl") ; - } - return lPactlPresent ; -} - - -static int speakertestPresent(void) -{ - static int lSpeakertestPresent = -1 ; - if ( lSpeakertestPresent < 0 ) - { - lSpeakertestPresent = detectPresence("speaker-test") ; - } - return lSpeakertestPresent ; -} - - -static int playPresent() -{ - static int lPlayPresent = -1; - if (lPlayPresent < 0) - { - lPlayPresent = detectPresence("sox"); /*if sox is present, play is ready*/ - } - return lPlayPresent; -} - - -static int beepexePresent() -{ - static int lBeepexePresent = -1; - if (lBeepexePresent < 0) - { - lBeepexePresent = detectPresence("beep.exe"); - } - return lBeepexePresent; -} - - -static int beepPresent(void) -{ - static int lBeepPresent = -1 ; - if ( lBeepPresent < 0 ) - { - lBeepPresent = detectPresence("beep") ; - } - return lBeepPresent ; -} - - -static int xmessagePresent(void) -{ - static int lXmessagePresent = -1 ; - if ( lXmessagePresent < 0 ) - { - lXmessagePresent = detectPresence("xmessage");/*if not tty,not on osxpath*/ - } - return lXmessagePresent && graphicMode( ) ; -} - - -static int gxmessagePresent(void) -{ - static int lGxmessagePresent = -1 ; - if ( lGxmessagePresent < 0 ) - { - lGxmessagePresent = detectPresence("gxmessage") ; - } - return lGxmessagePresent && graphicMode( ) ; -} - - -static int gmessagePresent(void) -{ - static int lGmessagePresent = -1 ; - if ( lGmessagePresent < 0 ) - { - lGmessagePresent = detectPresence("gmessage") ; - } - return lGmessagePresent && graphicMode( ) ; -} - - -static int notifysendPresent(void) -{ - static int lNotifysendPresent = -1 ; - if ( lNotifysendPresent < 0 ) - { - lNotifysendPresent = detectPresence("notify-send") ; - } - return lNotifysendPresent && graphicMode( ) ; -} - - -static int perlPresent(void) -{ - static int lPerlPresent = -1 ; - char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - - if ( lPerlPresent < 0 ) - { - lPerlPresent = detectPresence("perl") ; - if (lPerlPresent) - { - lIn = popen("perl -MNet::DBus -e \"Net::DBus->session->get_service('org.freedesktop.Notifications')\" 2>&1", "r"); - if (fgets(lBuff, sizeof(lBuff), lIn) == NULL) - { - lPerlPresent = 2; - } - pclose(lIn); - if (tinyfd_verbose) printf("perl-dbus %d\n", lPerlPresent); - } - } - return graphicMode() ? lPerlPresent : 0 ; -} - - -static int afplayPresent(void) -{ - static int lAfplayPresent = -1 ; - char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - - if ( lAfplayPresent < 0 ) - { - lAfplayPresent = detectPresence("afplay") ; - if ( lAfplayPresent ) - { - lIn = popen( "test -e /System/Library/Sounds/Ping.aiff || echo Ping" , "r" ) ; - if ( fgets( lBuff , sizeof( lBuff ) , lIn ) == NULL ) - { - lAfplayPresent = 2 ; - } - pclose( lIn ) ; - if (tinyfd_verbose) printf("afplay %d\n", lAfplayPresent); - } - } - return graphicMode() ? lAfplayPresent : 0 ; -} - - -static int xdialogPresent(void) -{ - static int lXdialogPresent = -1 ; - if ( lXdialogPresent < 0 ) - { - lXdialogPresent = detectPresence("Xdialog") ; - } - return lXdialogPresent && graphicMode( ) ; -} - - -static int gdialogPresent(void) -{ - static int lGdialoglPresent = -1 ; - if ( lGdialoglPresent < 0 ) - { - lGdialoglPresent = detectPresence( "gdialog" ) ; - } - return lGdialoglPresent && graphicMode( ) ; -} - - -static int osascriptPresent(void) -{ - static int lOsascriptPresent = -1 ; - if ( lOsascriptPresent < 0 ) - { - gWarningDisplayed |= !!getenv("SSH_TTY"); - lOsascriptPresent = detectPresence( "osascript" ) ; - } - return lOsascriptPresent && graphicMode() && !getenv("SSH_TTY") ; -} - - -static int dunstifyPresent(void) -{ - static int lDunstifyPresent = -1 ; - static char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - char * lTmp ; - - if ( lDunstifyPresent < 0 ) - { - lDunstifyPresent = detectPresence( "dunstify" ) ; - if ( lDunstifyPresent ) - { - lIn = popen( "dunstify -s" , "r" ) ; - lTmp = fgets( lBuff , sizeof( lBuff ) , lIn ) ; - pclose( lIn ) ; - /* printf("lTmp:%s\n", lTmp); */ - lDunstifyPresent = strstr(lTmp,"name:dunst\n") ? 1 : 0 ; - if (tinyfd_verbose) printf("lDunstifyPresent %d\n", lDunstifyPresent); - } - } - return lDunstifyPresent && graphicMode( ) ; -} - - -static int dunstPresent(void) -{ - static int lDunstPresent = -1 ; - static char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - char * lTmp ; - - if ( lDunstPresent < 0 ) - { - lDunstPresent = detectPresence( "dunst" ) ; - if ( lDunstPresent ) - { - lIn = popen( "ps -e | grep dunst | grep -v grep" , "r" ) ; /* add "| wc -l" to receive the number of lines */ - lTmp = fgets( lBuff , sizeof( lBuff ) , lIn ) ; - pclose( lIn ) ; - /* if ( lTmp ) printf("lTmp:%s\n", lTmp); */ - if ( lTmp ) lDunstPresent = 1 ; - else lDunstPresent = 0 ; - if (tinyfd_verbose) printf("lDunstPresent %d\n", lDunstPresent); - } - } - return lDunstPresent && graphicMode( ) ; -} - - -int tfd_qarmaPresent(void) -{ - static int lQarmaPresent = -1 ; - if ( lQarmaPresent < 0 ) - { - lQarmaPresent = detectPresence("qarma") ; - } - return lQarmaPresent && graphicMode( ) ; -} - - -int tfd_matedialogPresent(void) -{ - static int lMatedialogPresent = -1 ; - if ( lMatedialogPresent < 0 ) - { - lMatedialogPresent = detectPresence("matedialog") ; - } - return lMatedialogPresent && graphicMode( ) ; -} - - -int tfd_shellementaryPresent(void) -{ - static int lShellementaryPresent = -1 ; - if ( lShellementaryPresent < 0 ) - { - lShellementaryPresent = 0 ; /*detectPresence("shellementary"); shellementary is not ready yet */ - } - return lShellementaryPresent && graphicMode( ) ; -} - - -int tfd_xpropPresent(void) -{ - static int lXpropPresent = -1 ; - if ( lXpropPresent < 0 ) - { - lXpropPresent = detectPresence("xprop") ; - } - return lXpropPresent && graphicMode( ) ; -} - - -int tfd_zenityPresent(void) -{ - static int lZenityPresent = -1 ; - if ( lZenityPresent < 0 ) - { - lZenityPresent = detectPresence("zenity") ; - } - return lZenityPresent && graphicMode( ) ; -} - - -int tfd_yadPresent(void) -{ - static int lYadPresent = -1; - if (lYadPresent < 0) - { - lYadPresent = detectPresence("yad"); - } - return lYadPresent && graphicMode(); -} - - -int tfd_zenity3Present(void) -{ - static int lZenity3Present = -1 ; - char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - int lIntTmp ; - - if ( lZenity3Present < 0 ) - { - lZenity3Present = 0 ; - if ( tfd_zenityPresent() ) - { - lIn = popen( "zenity --version" , "r" ) ; - if ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - { - if ( atoi(lBuff) >= 3 ) - { - lZenity3Present = 3 ; - lIntTmp = atoi(strtok(lBuff,".")+2 ) ; - if ( lIntTmp >= 18 ) - { - lZenity3Present = 5 ; - } - else if ( lIntTmp >= 10 ) - { - lZenity3Present = 4 ; - } - } - else if ( ( atoi(lBuff) == 2 ) && ( atoi(strtok(lBuff,".")+2 ) >= 32 ) ) - { - lZenity3Present = 2 ; - } - if (tinyfd_verbose) printf("zenity type %d\n", lZenity3Present); - } - pclose( lIn ) ; - } - } - return graphicMode() ? lZenity3Present : 0 ; -} - - -int tfd_kdialogPresent(void) -{ - static int lKdialogPresent = -1 ; - char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - char * lDesktop; - - if ( lKdialogPresent < 0 ) - { - if ( tfd_zenityPresent() ) - { - lDesktop = getenv("XDG_SESSION_DESKTOP"); - if ( !lDesktop || ( strcmp(lDesktop, "KDE") && strcmp(lDesktop, "lxqt") ) ) - { - lKdialogPresent = 0 ; - return lKdialogPresent ; - } - } - - lKdialogPresent = detectPresence("kdialog") ; - if ( lKdialogPresent && !getenv("SSH_TTY") ) - { - lIn = popen( "kdialog --attach 2>&1" , "r" ) ; - if ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - { - if ( ! strstr( "Unknown" , lBuff ) ) - { - lKdialogPresent = 2 ; - if (tinyfd_verbose) printf("kdialog-attach %d\n", lKdialogPresent); - } - } - pclose( lIn ) ; - - if (lKdialogPresent == 2) - { - lKdialogPresent = 1 ; - lIn = popen( "kdialog --passivepopup 2>&1" , "r" ) ; - if ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - { - if ( ! strstr( "Unknown" , lBuff ) ) - { - lKdialogPresent = 2 ; - if (tinyfd_verbose) printf("kdialog-popup %d\n", lKdialogPresent); - } - } - pclose( lIn ) ; - } - } - } - return graphicMode() ? lKdialogPresent : 0 ; -} - - -static int osx9orBetter(void) -{ - static int lOsx9orBetter = -1 ; - char lBuff[MAX_PATH_OR_CMD] ; - FILE * lIn ; - int V,v; - - if ( lOsx9orBetter < 0 ) - { - lOsx9orBetter = 0 ; - lIn = popen( "osascript -e 'set osver to system version of (system info)'" , "r" ) ; - V = 0 ; - if ( ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - && ( 2 == sscanf(lBuff, "%d.%d", &V, &v) ) ) - { - V = V * 100 + v; - if ( V >= 1009 ) - { - lOsx9orBetter = 1 ; - } - } - pclose( lIn ) ; - if (tinyfd_verbose) printf("Osx10 = %d, %d = %s\n", lOsx9orBetter, V, lBuff) ; - } - return lOsx9orBetter ; -} - - -static int python3Present(void) -{ - static int lPython3Present = -1 ; - int i; - - if ( lPython3Present < 0 ) - { - lPython3Present = 0 ; - strcpy(gPython3Name , "python3" ) ; - if ( detectPresence(gPython3Name) ) lPython3Present = 1; - else - { - for ( i = 9 ; i >= 0 ; i -- ) - { - sprintf( gPython3Name , "python3.%d" , i ) ; - if ( detectPresence(gPython3Name) ) - { - lPython3Present = 1; - break; - } - } - } - if (tinyfd_verbose) printf("lPython3Present %d\n", lPython3Present) ; - if (tinyfd_verbose) printf("gPython3Name %s\n", gPython3Name) ; - } - return lPython3Present ; -} - - -static int python2Present(void) -{ - static int lPython2Present = -1 ; - - if ( lPython2Present < 0 ) - { - lPython2Present = 0 ; - strcpy(gPython2Name , "python2" ) ; - if ( detectPresence(gPython2Name) ) lPython2Present = 1; - /*else - { - for ( i = 9 ; i >= 0 ; i -- ) - { - sprintf( gPython2Name , "python2.%d" , i ) ; - if ( detectPresence(gPython2Name) ) - { - lPython2Present = 1; - break; - } - } - }*/ - if (tinyfd_verbose) printf("lPython2Present %d\n", lPython2Present) ; - if (tinyfd_verbose) printf("gPython2Name %s\n", gPython2Name) ; - } - return lPython2Present ; -} - - -static int tkinter3Present(void) -{ - static int lTkinter3Present = -1 ; - char lPythonCommand[256]; - char lPythonParams[128] = - "-S -c \"try:\n\timport tkinter;\nexcept:\n\tprint(0);\""; - - if ( lTkinter3Present < 0 ) - { - lTkinter3Present = 0 ; - if ( python3Present() ) - { - sprintf( lPythonCommand , "%s %s" , gPython3Name , lPythonParams ) ; - lTkinter3Present = tryCommand(lPythonCommand) ; - } - if (tinyfd_verbose) printf("lTkinter3Present %d\n", lTkinter3Present) ; - } - return lTkinter3Present && graphicMode() && !(tfd_isDarwin() && getenv("SSH_TTY") ); -} - - -static int tkinter2Present(void) -{ - static int lTkinter2Present = -1 ; - char lPythonCommand[256]; - char lPythonParams[128] = - "-S -c \"try:\n\timport Tkinter;\nexcept:\n\tprint 0;\""; - - if ( lTkinter2Present < 0 ) - { - lTkinter2Present = 0 ; - if ( python2Present() ) - { - sprintf( lPythonCommand , "%s %s" , gPython2Name , lPythonParams ) ; - lTkinter2Present = tryCommand(lPythonCommand) ; - } - if (tinyfd_verbose) printf("lTkinter2Present %d graphicMode %d \n", lTkinter2Present, graphicMode() ) ; - } - return lTkinter2Present && graphicMode() && !(tfd_isDarwin() && getenv("SSH_TTY") ); -} - - -static int pythonDbusPresent(void) -{ - static int lPythonDbusPresent = -1 ; - char lPythonCommand[384]; - char lPythonParams[256] = -"-c \"try:\n\timport dbus;bus=dbus.SessionBus();\ -notif=bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications');\ -notify=dbus.Interface(notif,'org.freedesktop.Notifications');\nexcept:\n\tprint(0);\""; - - if (lPythonDbusPresent < 0 ) - { - lPythonDbusPresent = 0 ; - if ( python2Present() ) - { - strcpy(gPythonName , gPython2Name ) ; - sprintf( lPythonCommand , "%s %s" , gPythonName , lPythonParams ) ; - lPythonDbusPresent = tryCommand(lPythonCommand) ; - } - - if ( !lPythonDbusPresent && python3Present() ) - { - strcpy(gPythonName , gPython3Name ) ; - sprintf( lPythonCommand , "%s %s" , gPythonName , lPythonParams ) ; - lPythonDbusPresent = tryCommand(lPythonCommand) ; - } - - if (tinyfd_verbose) printf("lPythonDbusPresent %d\n", lPythonDbusPresent) ; - if (tinyfd_verbose) printf("gPythonName %s\n", gPythonName) ; - } - return lPythonDbusPresent && graphicMode() && !(tfd_isDarwin() && getenv("SSH_TTY") ); -} - - -static void sigHandler(int signum) -{ - FILE * lIn ; - if ( ( lIn = popen( "pactl unload-module module-sine" , "r" ) ) ) - { - pclose( lIn ) ; - } - if (tinyfd_verbose) printf("tinyfiledialogs caught signal %d\n", signum); -} - -void tinyfd_beep(void) -{ - char lDialogString[256] ; - FILE * lIn ; - - if ( osascriptPresent() ) - { - if ( afplayPresent() >= 2 ) - { - strcpy( lDialogString , "afplay /System/Library/Sounds/Ping.aiff") ; - } - else - { - strcpy( lDialogString , "osascript -e 'tell application \"System Events\" to beep'") ; - } - } - else if ( pactlPresent() ) - { - signal(SIGINT, sigHandler); - /*strcpy( lDialogString , "pactl load-module module-sine frequency=440;sleep .3;pactl unload-module module-sine" ) ;*/ - strcpy( lDialogString , "thnum=$(pactl load-module module-sine frequency=440);sleep .3;pactl unload-module $thnum" ) ; - } - else if ( speakertestPresent() ) - { - /*strcpy( lDialogString , "timeout -k .3 .3 speaker-test --frequency 440 --test sine > /dev/tty" ) ;*/ - strcpy( lDialogString , "( speaker-test -t sine -f 440 > /dev/tty )& pid=$!;sleep .5; kill -9 $pid" ) ; /*.3 was too short for mac g3*/ - } - else if (beepexePresent()) - { - strcpy(lDialogString, "beep.exe 440 300"); - } - else if (playPresent()) /* play is part of sox */ - { - strcpy(lDialogString, "play -q -n synth .3 sine 440"); - } - else if ( beepPresent() ) - { - strcpy( lDialogString , "beep -f 440 -l 300" ) ; - } - else - { - strcpy( lDialogString , "printf '\a' > /dev/tty" ) ; - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - - if ( ( lIn = popen( lDialogString , "r" ) ) ) - { - pclose( lIn ) ; - } - - if ( pactlPresent() ) - { - signal(SIGINT, SIG_DFL); - } -} - - -int tinyfd_messageBox( - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" may contain \n and \t */ - char const * aDialogType , /* "ok" "okcancel" "yesno" "yesnocancel" */ - char const * aIconType , /* "info" "warning" "error" "question" */ - int aDefaultButton ) /* 0 for cancel/no , 1 for ok/yes , 2 for no in yesnocancel */ -{ - char lBuff[MAX_PATH_OR_CMD] ; - char * lDialogString = NULL ; - char * lpDialogString; - FILE * lIn ; - int lWasGraphicDialog = 0 ; - int lWasXterm = 0 ; - int lResult ; - char lChar ; - struct termios infoOri; - struct termios info; - size_t lTitleLen ; - size_t lMessageLen ; - - lBuff[0]='\0'; - - if (tfd_quoteDetected(aTitle)) return tinyfd_messageBox("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aDialogType, aIconType, aDefaultButton); - if (tfd_quoteDetected(aMessage)) return tinyfd_messageBox(aTitle, "INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDialogType, aIconType, aDefaultButton); - - lTitleLen = aTitle ? strlen(aTitle) : 0 ; - lMessageLen = aMessage ? strlen(aMessage) : 0 ; - if ( !aTitle || strcmp(aTitle,"tinyfd_query") ) - { - lDialogString = (char *) malloc( MAX_PATH_OR_CMD + lTitleLen + lMessageLen ); - } - - if ( osascriptPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"applescript");return 1;} - - strcpy( lDialogString , "osascript "); - if ( ! osx9orBetter() ) strcat( lDialogString , " -e 'tell application \"System Events\"' -e 'Activate'"); - strcat( lDialogString , " -e 'try' -e 'set {vButton} to {button returned} of ( display dialog \"") ; - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage) ; - } - strcat(lDialogString, "\" ") ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "with title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - strcat(lDialogString, "with icon ") ; - if ( aIconType && ! strcmp( "error" , aIconType ) ) - { - strcat(lDialogString, "stop " ) ; - } - else if ( aIconType && ! strcmp( "warning" , aIconType ) ) - { - strcat(lDialogString, "caution " ) ; - } - else /* question or info */ - { - strcat(lDialogString, "note " ) ; - } - if ( aDialogType && ! strcmp( "okcancel" , aDialogType ) ) - { - if ( ! aDefaultButton ) - { - strcat( lDialogString ,"default button \"Cancel\" " ) ; - } - } - else if ( aDialogType && ! strcmp( "yesno" , aDialogType ) ) - { - strcat( lDialogString ,"buttons {\"No\", \"Yes\"} " ) ; - if (aDefaultButton) - { - strcat( lDialogString ,"default button \"Yes\" " ) ; - } - else - { - strcat( lDialogString ,"default button \"No\" " ) ; - } - strcat( lDialogString ,"cancel button \"No\"" ) ; - } - else if ( aDialogType && ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat( lDialogString ,"buttons {\"No\", \"Yes\", \"Cancel\"} " ) ; - switch (aDefaultButton) - { - case 1: strcat( lDialogString ,"default button \"Yes\" " ) ; break; - case 2: strcat( lDialogString ,"default button \"No\" " ) ; break; - case 0: strcat( lDialogString ,"default button \"Cancel\" " ) ; break; - } - strcat( lDialogString ,"cancel button \"Cancel\"" ) ; - } - else - { - strcat( lDialogString ,"buttons {\"OK\"} " ) ; - strcat( lDialogString ,"default button \"OK\" " ) ; - } - strcat( lDialogString, ")' ") ; - - strcat( lDialogString, -"-e 'if vButton is \"Yes\" then' -e 'return 1'\ - -e 'else if vButton is \"OK\" then' -e 'return 1'\ - -e 'else if vButton is \"No\" then' -e 'return 2'\ - -e 'else' -e 'return 0' -e 'end if' " ); - - strcat( lDialogString, "-e 'on error number -128' " ) ; - strcat( lDialogString, "-e '0' " ); - - strcat( lDialogString, "-e 'end try'") ; - if ( ! osx9orBetter() ) strcat( lDialogString, " -e 'end tell'") ; - } - else if ( tfd_kdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"kdialog");return 1;} - - strcpy( lDialogString , "kdialog" ) ; - if ( (tfd_kdialogPresent() == 2) && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - - strcat( lDialogString , " --" ) ; - if ( aDialogType && ( ! strcmp( "okcancel" , aDialogType ) - || ! strcmp( "yesno" , aDialogType ) || ! strcmp( "yesnocancel" , aDialogType ) ) ) - { - if ( aIconType && ( ! strcmp( "warning" , aIconType ) - || ! strcmp( "error" , aIconType ) ) ) - { - strcat( lDialogString , "warning" ) ; - } - if ( ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat( lDialogString , "yesnocancel" ) ; - } - else - { - strcat( lDialogString , "yesno" ) ; - } - } - else if ( aIconType && ! strcmp( "error" , aIconType ) ) - { - strcat( lDialogString , "error" ) ; - } - else if ( aIconType && ! strcmp( "warning" , aIconType ) ) - { - strcat( lDialogString , "sorry" ) ; - } - else - { - strcat( lDialogString , "msgbox" ) ; - } - strcat( lDialogString , " \"" ) ; - if ( aMessage ) - { - strcat( lDialogString , aMessage ) ; - } - strcat( lDialogString , "\"" ) ; - if ( aDialogType && ! strcmp( "okcancel" , aDialogType ) ) - { - strcat( lDialogString , - " --yes-label Ok --no-label Cancel" ) ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, " --title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - } - - if ( ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat( lDialogString , "; x=$? ;if [ $x = 0 ] ;then echo 1;elif [ $x = 1 ] ;then echo 2;else echo 0;fi"); - } - else - { - strcat( lDialogString , ";if [ $? = 0 ];then echo 1;else echo 0;fi"); - } - } - else if ( tfd_zenityPresent() || tfd_matedialogPresent() || tfd_shellementaryPresent() || tfd_qarmaPresent() ) - { - if ( tfd_zenityPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity");return 1;} - strcpy( lDialogString , "szAnswer=$(zenity" ) ; - if ( (tfd_zenity3Present() >= 4) && !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(sleep .01;xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - else if ( tfd_matedialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"matedialog");return 1;} - strcpy( lDialogString , "szAnswer=$(matedialog" ) ; - } - else if ( tfd_shellementaryPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"shellementary");return 1;} - strcpy( lDialogString , "szAnswer=$(shellementary" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"qarma");return 1;} - strcpy( lDialogString , "szAnswer=$(qarma" ) ; - if ( !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - strcat(lDialogString, " --"); - - if ( aDialogType && ! strcmp( "okcancel" , aDialogType ) ) - { - strcat( lDialogString , - "question --ok-label=Ok --cancel-label=Cancel" ) ; - } - else if ( aDialogType && ! strcmp( "yesno" , aDialogType ) ) - { - strcat( lDialogString , "question" ) ; - } - else if ( aDialogType && ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat( lDialogString , "list --column \"\" --hide-header \"Yes\" \"No\"" ) ; - } - else if ( aIconType && ! strcmp( "error" , aIconType ) ) - { - strcat( lDialogString , "error" ) ; - } - else if ( aIconType && ! strcmp( "warning" , aIconType ) ) - { - strcat( lDialogString , "warning" ) ; - } - else - { - strcat( lDialogString , "info" ) ; - } - - strcat(lDialogString, " --title=\""); - if ( aTitle && strlen(aTitle) ) strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\""); - - if (strcmp("yesnocancel", aDialogType)) strcat(lDialogString, " --no-wrap"); - - strcat(lDialogString, " --text=\"") ; - if (aMessage && strlen(aMessage)) strcat(lDialogString, aMessage) ; - strcat(lDialogString, "\"") ; - - if ( (tfd_zenity3Present() >= 3) || (!tfd_zenityPresent() && (tfd_shellementaryPresent() || tfd_qarmaPresent()) ) ) - { - strcat( lDialogString , " --icon-name=dialog-" ) ; - if ( aIconType && (! strcmp( "question" , aIconType ) - || ! strcmp( "error" , aIconType ) - || ! strcmp( "warning" , aIconType ) ) ) - { - strcat( lDialogString , aIconType ) ; - } - else - { - strcat( lDialogString , "information" ) ; - } - } - - if (tinyfd_silent) strcat( lDialogString , " 2>/dev/null "); - - if ( ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat( lDialogString , -");if [ $? = 1 ];then echo 0;elif [ $szAnswer = \"No\" ];then echo 2;else echo 1;fi"); - } - else - { - strcat( lDialogString , ");if [ $? = 0 ];then echo 1;else echo 0;fi"); - } - } - - else if (tfd_yadPresent()) - { - if (aTitle && !strcmp(aTitle, "tinyfd_query")) { strcpy(tinyfd_response, "yad"); return 1; } - strcpy(lDialogString, "szAnswer=$(yad --"); - if (aDialogType && !strcmp("ok", aDialogType)) - { - strcat(lDialogString,"button=Ok:1"); - } - else if (aDialogType && !strcmp("okcancel", aDialogType)) - { - strcat(lDialogString,"button=Ok:1 --button=Cancel:0"); - } - else if (aDialogType && !strcmp("yesno", aDialogType)) - { - strcat(lDialogString, "button=Yes:1 --button=No:0"); - } - else if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - strcat(lDialogString, "button=Yes:1 --button=No:2 --button=Cancel:0"); - } - else if (aIconType && !strcmp("error", aIconType)) - { - strcat(lDialogString, "error"); - } - else if (aIconType && !strcmp("warning", aIconType)) - { - strcat(lDialogString, "warning"); - } - else - { - strcat(lDialogString, "info"); - } - if (aTitle && strlen(aTitle)) - { - strcat(lDialogString, " --title=\""); - strcat(lDialogString, aTitle); - strcat(lDialogString, "\""); - } - if (aMessage && strlen(aMessage)) - { - strcat(lDialogString, " --text=\""); - strcat(lDialogString, aMessage); - strcat(lDialogString, "\""); - } - - strcat(lDialogString, " --image=dialog-"); - if (aIconType && (!strcmp("question", aIconType) - || !strcmp("error", aIconType) - || !strcmp("warning", aIconType))) - { - strcat(lDialogString, aIconType); - } - else - { - strcat(lDialogString, "information"); - } - - if (tinyfd_silent) strcat(lDialogString, " 2>/dev/null "); - strcat(lDialogString,");echo $?"); - } - - else if ( !gxmessagePresent() && !gmessagePresent() && !gdialogPresent() && !xdialogPresent() && tkinter3Present() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python3-tkinter");return 1;} - - strcpy( lDialogString , gPython3Name ) ; - strcat( lDialogString , - " -S -c \"import tkinter;from tkinter import messagebox;root=tkinter.Tk();root.withdraw();"); - - strcat( lDialogString ,"res=messagebox." ) ; - if ( aDialogType && ! strcmp( "okcancel" , aDialogType ) ) - { - strcat( lDialogString , "askokcancel(" ) ; - if ( aDefaultButton ) - { - strcat( lDialogString , "default=messagebox.OK," ) ; - } - else - { - strcat( lDialogString , "default=messagebox.CANCEL," ) ; - } - } - else if ( aDialogType && ! strcmp( "yesno" , aDialogType ) ) - { - strcat( lDialogString , "askyesno(" ) ; - if ( aDefaultButton ) - { - strcat( lDialogString , "default=messagebox.YES," ) ; - } - else - { - strcat( lDialogString , "default=messagebox.NO," ) ; - } - } - else if ( aDialogType && ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat( lDialogString , "askyesnocancel(" ) ; - switch ( aDefaultButton ) - { - case 1: strcat( lDialogString , "default=messagebox.YES," ); break; - case 2: strcat( lDialogString , "default=messagebox.NO," ); break; - case 0: strcat( lDialogString , "default=messagebox.CANCEL," ); break; - } - } - else - { - strcat( lDialogString , "showinfo(" ) ; - } - - strcat( lDialogString , "icon='" ) ; - if ( aIconType && (! strcmp( "question" , aIconType ) - || ! strcmp( "error" , aIconType ) - || ! strcmp( "warning" , aIconType ) ) ) - { - strcat( lDialogString , aIconType ) ; - } - else - { - strcat( lDialogString , "info" ) ; - } - - strcat(lDialogString, "',") ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, "message='") ; - lpDialogString = lDialogString + strlen(lDialogString); - tfd_replaceSubStr( aMessage , "\n" , "\\n" , lpDialogString ) ; - strcat(lDialogString, "'") ; - } - - if ( aDialogType && ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat(lDialogString, ");\n\ -if res is None :\n\tprint(0)\n\ -elif res is False :\n\tprint(2)\n\ -else :\n\tprint (1)\n\"" ) ; - } - else - { - strcat(lDialogString, ");\n\ -if res is False :\n\tprint(0)\n\ -else :\n\tprint(1)\n\"" ) ; - } - } - else if ( !gxmessagePresent() && !gmessagePresent() && !gdialogPresent() && !xdialogPresent() && tkinter2Present() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python2-tkinter");return 1;} - strcpy( lDialogString , "export PYTHONIOENCODING=utf-8;" ) ; - strcat( lDialogString , gPython2Name ) ; - if ( ! isTerminalRunning( ) && tfd_isDarwin( ) ) - { - strcat( lDialogString , " -i" ) ; /* for osx without console */ - } - - strcat( lDialogString , -" -S -c \"import Tkinter,tkMessageBox;root=Tkinter.Tk();root.withdraw();"); - - if ( tfd_isDarwin( ) ) - { - strcat( lDialogString , -"import os;os.system('''/usr/bin/osascript -e 'tell app \\\"Finder\\\" to set \ -frontmost of process \\\"Python\\\" to true' ''');"); - } - - strcat( lDialogString ,"res=tkMessageBox." ) ; - if ( aDialogType && ! strcmp( "okcancel" , aDialogType ) ) - { - strcat( lDialogString , "askokcancel(" ) ; - if ( aDefaultButton ) - { - strcat( lDialogString , "default=tkMessageBox.OK," ) ; - } - else - { - strcat( lDialogString , "default=tkMessageBox.CANCEL," ) ; - } - } - else if ( aDialogType && ! strcmp( "yesno" , aDialogType ) ) - { - strcat( lDialogString , "askyesno(" ) ; - if ( aDefaultButton ) - { - strcat( lDialogString , "default=tkMessageBox.YES," ) ; - } - else - { - strcat( lDialogString , "default=tkMessageBox.NO," ) ; - } - } - else if ( aDialogType && ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat( lDialogString , "askyesnocancel(" ) ; - switch ( aDefaultButton ) - { - case 1: strcat( lDialogString , "default=tkMessageBox.YES," ); break; - case 2: strcat( lDialogString , "default=tkMessageBox.NO," ); break; - case 0: strcat( lDialogString , "default=tkMessageBox.CANCEL," ); break; - } - } - else - { - strcat( lDialogString , "showinfo(" ) ; - } - - strcat( lDialogString , "icon='" ) ; - if ( aIconType && (! strcmp( "question" , aIconType ) - || ! strcmp( "error" , aIconType ) - || ! strcmp( "warning" , aIconType ) ) ) - { - strcat( lDialogString , aIconType ) ; - } - else - { - strcat( lDialogString , "info" ) ; - } - - strcat(lDialogString, "',") ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, "message='") ; - lpDialogString = lDialogString + strlen(lDialogString); - tfd_replaceSubStr( aMessage , "\n" , "\\n" , lpDialogString ) ; - strcat(lDialogString, "'") ; - } - - if ( aDialogType && ! strcmp( "yesnocancel" , aDialogType ) ) - { - strcat(lDialogString, ");\n\ -if res is None :\n\tprint 0\n\ -elif res is False :\n\tprint 2\n\ -else :\n\tprint 1\n\"" ) ; - } - else - { - strcat(lDialogString, ");\n\ -if res is False :\n\tprint 0\n\ -else :\n\tprint 1\n\"" ) ; - } - } - else if ( gxmessagePresent() || gmessagePresent() || (!gdialogPresent() && !xdialogPresent() && xmessagePresent()) ) - { - if ( gxmessagePresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"gxmessage");return 1;} - strcpy( lDialogString , "gxmessage"); - } - else if ( gmessagePresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"gmessage");return 1;} - strcpy( lDialogString , "gmessage"); - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"xmessage");return 1;} - strcpy( lDialogString , "xmessage"); - } - - if ( aDialogType && ! strcmp("okcancel" , aDialogType) ) - { - strcat( lDialogString , " -buttons Ok:1,Cancel:0"); - switch ( aDefaultButton ) - { - case 1: strcat( lDialogString , " -default Ok"); break; - case 0: strcat( lDialogString , " -default Cancel"); break; - } - } - else if ( aDialogType && ! strcmp("yesno" , aDialogType) ) - { - strcat( lDialogString , " -buttons Yes:1,No:0"); - switch ( aDefaultButton ) - { - case 1: strcat( lDialogString , " -default Yes"); break; - case 0: strcat( lDialogString , " -default No"); break; - } - } - else if ( aDialogType && ! strcmp("yesnocancel" , aDialogType) ) - { - strcat( lDialogString , " -buttons Yes:1,No:2,Cancel:0"); - switch ( aDefaultButton ) - { - case 1: strcat( lDialogString , " -default Yes"); break; - case 2: strcat( lDialogString , " -default No"); break; - case 0: strcat( lDialogString , " -default Cancel"); break; - } - } - else - { - strcat( lDialogString , " -buttons Ok:1"); - strcat( lDialogString , " -default Ok"); - } - - strcat( lDialogString , " -center \""); - if ( aMessage && strlen(aMessage) ) - { - strcat( lDialogString , aMessage ) ; - } - strcat(lDialogString, "\"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat( lDialogString , " -title \""); - strcat( lDialogString , aTitle ) ; - strcat( lDialogString, "\"" ) ; - } - strcat( lDialogString , " ; echo $? "); - } - else if ( xdialogPresent() || gdialogPresent() || dialogName() || whiptailPresent() ) - { - if ( gdialogPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"gdialog");return 1;} - lWasGraphicDialog = 1 ; - strcpy( lDialogString , "(gdialog " ) ; - } - else if ( xdialogPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"xdialog");return 1;} - lWasGraphicDialog = 1 ; - strcpy( lDialogString , "(Xdialog " ) ; - } - else if ( dialogName( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return 0;} - if ( isTerminalRunning( ) ) - { - strcpy( lDialogString , "(dialog " ) ; - } - else - { - lWasXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'(" ) ; - strcat( lDialogString , dialogName() ) ; - strcat( lDialogString , " " ) ; - } - } - else if ( isTerminalRunning( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"whiptail");return 0;} - strcpy( lDialogString , "(whiptail " ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"whiptail");return 0;} - lWasXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'(whiptail " ) ; - } - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - if ( !xdialogPresent() && !gdialogPresent() ) - { - if ( aDialogType && ( !strcmp( "okcancel" , aDialogType ) || !strcmp( "yesno" , aDialogType ) - || !strcmp( "yesnocancel" , aDialogType ) ) ) - { - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, "tab: move focus") ; - strcat(lDialogString, "\" ") ; - } - } - - if ( aDialogType && ! strcmp( "okcancel" , aDialogType ) ) - { - if ( ! aDefaultButton ) - { - strcat( lDialogString , "--defaultno " ) ; - } - strcat( lDialogString , - "--yes-label \"Ok\" --no-label \"Cancel\" --yesno " ) ; - } - else if ( aDialogType && ! strcmp( "yesno" , aDialogType ) ) - { - if ( ! aDefaultButton ) - { - strcat( lDialogString , "--defaultno " ) ; - } - strcat( lDialogString , "--yesno " ) ; - } - else if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - if (!aDefaultButton) - { - strcat(lDialogString, "--defaultno "); - } - strcat(lDialogString, "--menu "); - } - else - { - strcat( lDialogString , "--msgbox " ) ; - - } - strcat( lDialogString , "\"" ) ; - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage) ; - } - strcat(lDialogString, "\" "); - - if ( lWasGraphicDialog ) - { - if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - strcat(lDialogString,"0 60 0 Yes \"\" No \"\") 2>/tmp/tinyfd.txt;\ -if [ $? = 0 ];then tinyfdBool=1;else tinyfdBool=0;fi;\ -tinyfdRes=$(cat /tmp/tinyfd.txt);echo $tinyfdBool$tinyfdRes") ; - } - else - { - strcat(lDialogString, - "10 60 ) 2>&1;if [ $? = 0 ];then echo 1;else echo 0;fi"); - } - } - else - { - if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - strcat(lDialogString,"0 60 0 Yes \"\" No \"\" >/dev/tty ) 2>/tmp/tinyfd.txt;\ - if [ $? = 0 ];then tinyfdBool=1;else tinyfdBool=0;fi;\ - tinyfdRes=$(cat /tmp/tinyfd.txt);echo $tinyfdBool$tinyfdRes") ; - - if ( lWasXterm ) - { - strcat(lDialogString," >/tmp/tinyfd0.txt';cat /tmp/tinyfd0.txt"); - } - else - { - strcat(lDialogString, "; clear >/dev/tty") ; - } - } - else - { - strcat(lDialogString, "10 60 >/dev/tty) 2>&1;if [ $? = 0 ];"); - if ( lWasXterm ) - { - strcat( lDialogString , -"then\n\techo 1\nelse\n\techo 0\nfi >/tmp/tinyfd.txt';cat /tmp/tinyfd.txt;rm /tmp/tinyfd.txt"); - } - else - { - strcat(lDialogString, - "then echo 1;else echo 0;fi;clear >/dev/tty"); - } - } - } - } - else if ( !isTerminalRunning() && terminalName() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"basicinput");return 0;} - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'" ) ; - if ( !gWarningDisplayed && !tinyfd_forceConsole) - { - gWarningDisplayed = 1 ; - strcat( lDialogString , "echo \"" ) ; - strcat( lDialogString, gTitle) ; - strcat( lDialogString , "\";" ) ; - strcat( lDialogString , "echo \"" ) ; - strcat( lDialogString, tinyfd_needs) ; - strcat( lDialogString , "\";echo;echo;" ) ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat( lDialogString , "echo \"" ) ; - strcat( lDialogString, aTitle) ; - strcat( lDialogString , "\";echo;" ) ; - } - if ( aMessage && strlen(aMessage) ) - { - strcat( lDialogString , "echo \"" ) ; - strcat( lDialogString, aMessage) ; - strcat( lDialogString , "\"; " ) ; - } - if ( aDialogType && !strcmp("yesno",aDialogType) ) - { - strcat( lDialogString , "echo -n \"y/n: \"; " ) ; - strcat( lDialogString , "stty sane -echo;" ) ; - strcat( lDialogString , - "answer=$( while ! head -c 1 | grep -i [ny];do true ;done);"); - strcat( lDialogString , - "if echo \"$answer\" | grep -iq \"^y\";then\n"); - strcat( lDialogString , "\techo 1\nelse\n\techo 0\nfi" ) ; - } - else if ( aDialogType && !strcmp("okcancel",aDialogType) ) - { - strcat( lDialogString , "echo -n \"[O]kay/[C]ancel: \"; " ) ; - strcat( lDialogString , "stty sane -echo;" ) ; - strcat( lDialogString , - "answer=$( while ! head -c 1 | grep -i [oc];do true ;done);"); - strcat( lDialogString , - "if echo \"$answer\" | grep -iq \"^o\";then\n"); - strcat( lDialogString , "\techo 1\nelse\n\techo 0\nfi" ) ; - } - else if ( aDialogType && !strcmp("yesnocancel",aDialogType) ) - { - strcat( lDialogString , "echo -n \"[Y]es/[N]o/[C]ancel: \"; " ) ; - strcat( lDialogString , "stty sane -echo;" ) ; - strcat( lDialogString , - "answer=$( while ! head -c 1 | grep -i [nyc];do true ;done);"); - strcat( lDialogString , - "if echo \"$answer\" | grep -iq \"^y\";then\n\techo 1\n"); - strcat( lDialogString , "elif echo \"$answer\" | grep -iq \"^n\";then\n\techo 2\n" ) ; - strcat( lDialogString , "else\n\techo 0\nfi" ) ; - } - else - { - strcat(lDialogString , "echo -n \"press enter to continue \"; "); - strcat( lDialogString , "stty sane -echo;" ) ; - strcat( lDialogString , - "answer=$( while ! head -c 1;do true ;done);echo 1"); - } - strcat( lDialogString , - " >/tmp/tinyfd.txt';cat /tmp/tinyfd.txt;rm /tmp/tinyfd.txt"); - } - else if ( !isTerminalRunning() && pythonDbusPresent() && !strcmp("ok" , aDialogType) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python-dbus");return 1;} - strcpy( lDialogString , gPythonName ) ; - strcat( lDialogString ," -c \"import dbus;bus=dbus.SessionBus();"); - strcat( lDialogString ,"notif=bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications');" ) ; - strcat( lDialogString ,"notify=dbus.Interface(notif,'org.freedesktop.Notifications');" ) ; - strcat( lDialogString ,"notify.Notify('',0,'" ) ; - if ( aIconType && strlen(aIconType) ) - { - strcat( lDialogString , aIconType ) ; - } - strcat(lDialogString, "','") ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, aTitle) ; - } - strcat(lDialogString, "','") ; - if ( aMessage && strlen(aMessage) ) - { - lpDialogString = lDialogString + strlen(lDialogString); - tfd_replaceSubStr( aMessage , "\n" , "\\n" , lpDialogString ) ; - } - strcat(lDialogString, "','','',5000)\"") ; - } - else if ( !isTerminalRunning() && (perlPresent() >= 2) && !strcmp("ok" , aDialogType) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"perl-dbus");return 1;} - - strcpy( lDialogString , "perl -e \"use Net::DBus;\ -my \\$sessionBus = Net::DBus->session;\ -my \\$notificationsService = \\$sessionBus->get_service('org.freedesktop.Notifications');\ -my \\$notificationsObject = \\$notificationsService->get_object('/org/freedesktop/Notifications',\ -'org.freedesktop.Notifications');"); - - sprintf( lDialogString + strlen(lDialogString), -"my \\$notificationId;\\$notificationId = \\$notificationsObject->Notify(shift, 0, '%s', '%s', '%s', [], {}, -1);\" ", - aIconType?aIconType:"", aTitle?aTitle:"", aMessage?aMessage:"" ) ; - } - else if ( !isTerminalRunning() && notifysendPresent() && !strcmp("ok" , aDialogType) ) - { - - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"notifysend");return 1;} - strcpy( lDialogString , "notify-send" ) ; - if ( aIconType && strlen(aIconType) ) - { - strcat( lDialogString , " -i '" ) ; - strcat( lDialogString , aIconType ) ; - strcat( lDialogString , "'" ) ; - } - strcat( lDialogString , " \"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, aTitle) ; - strcat( lDialogString , " | " ) ; - } - if ( aMessage && strlen(aMessage) ) - { - tfd_replaceSubStr( aMessage , "\n\t" , " | " , lBuff ) ; - tfd_replaceSubStr( aMessage , "\n" , " | " , lBuff ) ; - tfd_replaceSubStr( aMessage , "\t" , " " , lBuff ) ; - strcat(lDialogString, lBuff) ; - } - strcat( lDialogString , "\"" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"basicinput");return 0;} - if ( !gWarningDisplayed && !tinyfd_forceConsole) - { - gWarningDisplayed = 1 ; - printf("\n\n%s\n", gTitle); - printf("%s\n\n", tinyfd_needs); - } - if ( aTitle && strlen(aTitle) ) - { - printf("\n%s\n", aTitle); - } - - tcgetattr(0, &infoOri); - tcgetattr(0, &info); - info.c_lflag &= ~ICANON; - info.c_cc[VMIN] = 1; - info.c_cc[VTIME] = 0; - tcsetattr(0, TCSANOW, &info); - if ( aDialogType && !strcmp("yesno",aDialogType) ) - { - do - { - if ( aMessage && strlen(aMessage) ) - { - printf("\n%s\n",aMessage); - } - printf("y/n: "); fflush(stdout); - lChar = (char) tolower( getchar() ) ; - printf("\n\n"); - } - while ( lChar != 'y' && lChar != 'n' ); - lResult = lChar == 'y' ? 1 : 0 ; - } - else if ( aDialogType && !strcmp("okcancel",aDialogType) ) - { - do - { - if ( aMessage && strlen(aMessage) ) - { - printf("\n%s\n",aMessage); - } - printf("[O]kay/[C]ancel: "); fflush(stdout); - lChar = (char) tolower( getchar() ) ; - printf("\n\n"); - } - while ( lChar != 'o' && lChar != 'c' ); - lResult = lChar == 'o' ? 1 : 0 ; - } - else if ( aDialogType && !strcmp("yesnocancel",aDialogType) ) - { - do - { - if ( aMessage && strlen(aMessage) ) - { - printf("\n%s\n",aMessage); - } - printf("[Y]es/[N]o/[C]ancel: "); fflush(stdout); - lChar = (char) tolower( getchar() ) ; - printf("\n\n"); - } - while ( lChar != 'y' && lChar != 'n' && lChar != 'c' ); - lResult = (lChar == 'y') ? 1 : (lChar == 'n') ? 2 : 0 ; - } - else - { - if ( aMessage && strlen(aMessage) ) - { - printf("\n%s\n\n",aMessage); - } - printf("press enter to continue "); fflush(stdout); - getchar() ; - printf("\n\n"); - lResult = 1 ; - } - tcsetattr(0, TCSANOW, &infoOri); - free(lDialogString); - return lResult ; - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - - if ( ! ( lIn = popen( lDialogString , "r" ) ) ) - { - free(lDialogString); - return 0 ; - } - while ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - {} - - pclose( lIn ) ; - - /* printf( "lBuff: %s len: %lu \n" , lBuff , strlen(lBuff) ) ; */ - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - /* printf( "lBuff1: %s len: %lu \n" , lBuff , strlen(lBuff) ) ; */ - - if (aDialogType && !strcmp("yesnocancel", aDialogType)) - { - if ( lBuff[0]=='1' ) - { - if ( !strcmp( lBuff+1 , "Yes" )) strcpy(lBuff,"1"); - else if ( !strcmp( lBuff+1 , "No" )) strcpy(lBuff,"2"); - } - } - /* printf( "lBuff2: %s len: %lu \n" , lBuff , strlen(lBuff) ) ; */ - - lResult = !strcmp( lBuff , "2" ) ? 2 : !strcmp( lBuff , "1" ) ? 1 : 0; - - /* printf( "lResult: %d\n" , lResult ) ; */ - free(lDialogString); - return lResult ; -} - - -/* return has only meaning for tinyfd_query */ -int tinyfd_notifyPopup( - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" may contain \n and \t */ - char const * aIconType ) /* "info" "warning" "error" */ -{ - char lBuff[MAX_PATH_OR_CMD]; - char * lDialogString = NULL ; - char * lpDialogString ; - FILE * lIn ; - size_t lTitleLen ; - size_t lMessageLen ; - - if (tfd_quoteDetected(aTitle)) return tinyfd_notifyPopup("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aIconType); - if (tfd_quoteDetected(aMessage)) return tinyfd_notifyPopup(aTitle, "INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aIconType); - - if ( getenv("SSH_TTY") && !dunstifyPresent() && !dunstPresent() ) - { - return tinyfd_messageBox(aTitle, aMessage, "ok", aIconType, 0); - } - - lTitleLen = aTitle ? strlen(aTitle) : 0 ; - lMessageLen = aMessage ? strlen(aMessage) : 0 ; - if ( !aTitle || strcmp(aTitle,"tinyfd_query") ) - { - lDialogString = (char *) malloc( MAX_PATH_OR_CMD + lTitleLen + lMessageLen ); - } - - if ( getenv("SSH_TTY") ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dunst");return 1;} - strcpy( lDialogString , "notify-send \"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat( lDialogString , aTitle ) ; - strcat( lDialogString , "\" \"" ) ; - } - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage) ; - } - strcat( lDialogString , "\"" ) ; - } - else if ( osascriptPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"applescript");return 1;} - - strcpy( lDialogString , "osascript "); - if ( ! osx9orBetter() ) strcat( lDialogString , " -e 'tell application \"System Events\"' -e 'Activate'"); - strcat( lDialogString , " -e 'try' -e 'display notification \"") ; - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage) ; - } - strcat(lDialogString, " \" ") ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "with title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - strcat( lDialogString, "' -e 'end try'") ; - if ( ! osx9orBetter() ) strcat( lDialogString, " -e 'end tell'") ; - } - else if ( tfd_kdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"kdialog");return 1;} - strcpy( lDialogString , "kdialog" ) ; - - if ( aIconType && strlen(aIconType) ) - { - strcat( lDialogString , " --icon '" ) ; - strcat( lDialogString , aIconType ) ; - strcat( lDialogString , "'" ) ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat( lDialogString , " --title \"" ) ; - strcat( lDialogString , aTitle ) ; - strcat( lDialogString , "\"" ) ; - } - - strcat( lDialogString , " --passivepopup" ) ; - strcat( lDialogString , " \"" ) ; - if ( aMessage ) - { - strcat( lDialogString , aMessage ) ; - } - strcat( lDialogString , " \" 5" ) ; - } - else if ( tfd_yadPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"yad");return 1;} - strcpy( lDialogString , "yad --notification"); - - if ( aIconType && strlen( aIconType ) ) - { - strcat( lDialogString , " --image=\""); - strcat( lDialogString , aIconType ) ; - strcat( lDialogString , "\"" ) ; - } - - strcat( lDialogString , " --text=\"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\n") ; - } - if ( aMessage && strlen( aMessage ) ) - { - strcat( lDialogString , aMessage ) ; - } - strcat( lDialogString , " \"" ) ; - } - else if ( perlPresent() >= 2 ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"perl-dbus");return 1;} - - strcpy( lDialogString , "perl -e \"use Net::DBus;\ -my \\$sessionBus = Net::DBus->session;\ -my \\$notificationsService = \\$sessionBus->get_service('org.freedesktop.Notifications');\ -my \\$notificationsObject = \\$notificationsService->get_object('/org/freedesktop/Notifications',\ -'org.freedesktop.Notifications');"); - - sprintf( lDialogString + strlen(lDialogString) , -"my \\$notificationId;\\$notificationId = \\$notificationsObject->Notify(shift, 0, '%s', '%s', '%s', [], {}, -1);\" ", -aIconType?aIconType:"", aTitle?aTitle:"", aMessage?aMessage:"" ) ; - } - else if ( pythonDbusPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python-dbus");return 1;} - strcpy( lDialogString , gPythonName ) ; - strcat( lDialogString ," -c \"import dbus;bus=dbus.SessionBus();"); - strcat( lDialogString ,"notif=bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications');" ) ; - strcat( lDialogString ,"notify=dbus.Interface(notif,'org.freedesktop.Notifications');" ) ; - strcat( lDialogString ,"notify.Notify('',0,'" ) ; - if ( aIconType && strlen(aIconType) ) - { - strcat( lDialogString , aIconType ) ; - } - strcat(lDialogString, "','") ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, aTitle) ; - } - strcat(lDialogString, "','") ; - if ( aMessage && strlen(aMessage) ) - { - lpDialogString = lDialogString + strlen(lDialogString); - tfd_replaceSubStr( aMessage , "\n" , "\\n" , lpDialogString ) ; - } - strcat(lDialogString, "','','',5000)\"") ; - } - else if ( notifysendPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"notifysend");return 1;} - strcpy( lDialogString , "notify-send" ) ; - if ( aIconType && strlen(aIconType) ) - { - strcat( lDialogString , " -i '" ) ; - strcat( lDialogString , aIconType ) ; - strcat( lDialogString , "'" ) ; - } - strcat( lDialogString , " \"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, aTitle) ; - strcat( lDialogString , " | " ) ; - } - if ( aMessage && strlen(aMessage) ) - { - tfd_replaceSubStr( aMessage , "\n\t" , " | " , lBuff ) ; - tfd_replaceSubStr( aMessage , "\n" , " | " , lBuff ) ; - tfd_replaceSubStr( aMessage , "\t" , " " , lBuff ) ; - strcat(lDialogString, lBuff) ; - } - strcat( lDialogString , "\"" ) ; - } - else if ( (tfd_zenity3Present()>=5) ) - { - /* zenity 2.32 & 3.14 has the notification but with a bug: it doesnt return from it */ - /* zenity 3.8 show the notification as an alert ok cancel box */ - /* zenity 3.44 doesn't have the notification (3.42 has it) */ - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity");return 1;} - strcpy( lDialogString , "zenity --notification"); - - if ( aIconType && strlen( aIconType ) ) - { - strcat( lDialogString , " --window-icon '"); - strcat( lDialogString , aIconType ) ; - strcat( lDialogString , "'" ) ; - } - - strcat( lDialogString , " --text \"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\n") ; - } - if ( aMessage && strlen( aMessage ) ) - { - strcat( lDialogString , aMessage ) ; - } - strcat( lDialogString , " \"" ) ; - } - else - { - if (lDialogString) free(lDialogString); - return tinyfd_messageBox(aTitle, aMessage, "ok", aIconType, 0); - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - - if ( ! ( lIn = popen( lDialogString , "r" ) ) ) - { - free(lDialogString); - return 0 ; - } - - pclose( lIn ) ; - free(lDialogString); - return 1; -} - - -/* returns NULL on cancel */ -char * tinyfd_inputBox( - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" (\n and \t have no effect) */ - char const * aDefaultInput ) /* "" , if NULL it's a passwordBox */ -{ - static char lBuff[MAX_PATH_OR_CMD]; - char * lDialogString = NULL; - char * lpDialogString; - FILE * lIn ; - int lResult ; - int lWasGdialog = 0 ; - int lWasGraphicDialog = 0 ; - int lWasXterm = 0 ; - int lWasBasicXterm = 0 ; - struct termios oldt ; - struct termios newt ; - char * lEOF; - size_t lTitleLen ; - size_t lMessageLen ; - - if (!aTitle && !aMessage && !aDefaultInput) return lBuff; /* now I can fill lBuff from outside */ - - lBuff[0]='\0'; - - if (tfd_quoteDetected(aTitle)) return tinyfd_inputBox("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aMessage, aDefaultInput); - if (tfd_quoteDetected(aMessage)) return tinyfd_inputBox(aTitle, "INVALID MESSAGE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultInput); - if (tfd_quoteDetected(aDefaultInput)) return tinyfd_inputBox(aTitle, aMessage, "INVALID DEFAULT_INPUT WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - - lTitleLen = aTitle ? strlen(aTitle) : 0 ; - lMessageLen = aMessage ? strlen(aMessage) : 0 ; - if ( !aTitle || strcmp(aTitle,"tinyfd_query") ) - { - lDialogString = (char *) malloc( MAX_PATH_OR_CMD + lTitleLen + lMessageLen ); - } - - if ( osascriptPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"applescript");return (char *)1;} - strcpy( lDialogString , "osascript "); - if ( ! osx9orBetter() ) strcat( lDialogString , " -e 'tell application \"System Events\"' -e 'Activate'"); - strcat( lDialogString , " -e 'try' -e 'display dialog \"") ; - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage) ; - } - strcat(lDialogString, "\" ") ; - strcat(lDialogString, "default answer \"") ; - if ( aDefaultInput && strlen(aDefaultInput) ) - { - strcat(lDialogString, aDefaultInput) ; - } - strcat(lDialogString, "\" ") ; - if ( ! aDefaultInput ) - { - strcat(lDialogString, "hidden answer true ") ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "with title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - strcat(lDialogString, "with icon note' ") ; - strcat(lDialogString, "-e '\"1\" & text returned of result' " ); - strcat(lDialogString, "-e 'on error number -128' " ) ; - strcat(lDialogString, "-e '0' " ); - strcat(lDialogString, "-e 'end try'") ; - if ( ! osx9orBetter() ) strcat(lDialogString, " -e 'end tell'") ; - } - else if ( tfd_kdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"kdialog");return (char *)1;} - strcpy( lDialogString , "szAnswer=$(kdialog" ) ; - - if ( (tfd_kdialogPresent() == 2) && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - - if ( ! aDefaultInput ) - { - strcat(lDialogString, " --password ") ; - } - else - { - strcat(lDialogString, " --inputbox ") ; - - } - strcat(lDialogString, "\"") ; - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage ) ; - } - strcat(lDialogString , "\" \"" ) ; - if ( aDefaultInput && strlen(aDefaultInput) ) - { - strcat(lDialogString, aDefaultInput ) ; - } - strcat(lDialogString , "\"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, " --title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - } - strcat( lDialogString , - ");if [ $? = 0 ];then echo 1$szAnswer;else echo 0$szAnswer;fi"); - } - else if ( tfd_zenityPresent() || tfd_matedialogPresent() || tfd_shellementaryPresent() || tfd_qarmaPresent() ) - { - if ( tfd_zenityPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity");return (char *)1;} - strcpy( lDialogString , "szAnswer=$(zenity" ) ; - if ( (tfd_zenity3Present() >= 4) && !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat( lDialogString, " --attach=$(sleep .01;xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - else if ( tfd_matedialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"matedialog");return (char *)1;} - strcpy( lDialogString , "szAnswer=$(matedialog" ) ; - } - else if ( tfd_shellementaryPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"shellementary");return (char *)1;} - strcpy( lDialogString , "szAnswer=$(shellementary" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"qarma");return (char *)1;} - strcpy( lDialogString , "szAnswer=$(qarma" ) ; - if ( !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - strcat( lDialogString ," --entry" ) ; - - strcat(lDialogString, " --title=\"") ; - if (aTitle && strlen(aTitle)) strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - - strcat(lDialogString, " --text=\"") ; - if (aMessage && strlen(aMessage)) strcat(lDialogString, aMessage) ; - strcat(lDialogString, "\"") ; - - if ( aDefaultInput ) - { - strcat(lDialogString, " --entry-text=\"") ; - strcat(lDialogString, aDefaultInput) ; - strcat(lDialogString, "\"") ; - } - else - { - strcat(lDialogString, " --hide-text") ; - } - if (tinyfd_silent) strcat( lDialogString , " 2>/dev/null "); - strcat( lDialogString , - ");if [ $? = 0 ];then echo 1$szAnswer;else echo 0$szAnswer;fi"); - } - else if (tfd_yadPresent()) - { - if (aTitle && !strcmp(aTitle, "tinyfd_query")) { strcpy(tinyfd_response, "yad"); return (char*)1; } - strcpy(lDialogString, "szAnswer=$(yad --entry"); - if (aTitle && strlen(aTitle)) - { - strcat(lDialogString, " --title=\""); - strcat(lDialogString, aTitle); - strcat(lDialogString, "\""); - } - if (aMessage && strlen(aMessage)) - { - strcat(lDialogString, " --text=\""); - strcat(lDialogString, aMessage); - strcat(lDialogString, "\""); - } - if (aDefaultInput && strlen(aDefaultInput)) - { - strcat(lDialogString, " --entry-text=\""); - strcat(lDialogString, aDefaultInput); - strcat(lDialogString, "\""); - } - else - { - strcat(lDialogString, " --hide-text"); - } - if (tinyfd_silent) strcat(lDialogString, " 2>/dev/null "); - strcat(lDialogString, - ");if [ $? = 0 ];then echo 1$szAnswer;else echo 0$szAnswer;fi"); - } - else if ( gxmessagePresent() || gmessagePresent() ) - { - if ( gxmessagePresent() ) { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"gxmessage");return (char *)1;} - strcpy( lDialogString , "szAnswer=$(gxmessage -buttons Ok:1,Cancel:0 -center \""); - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"gmessage");return (char *)1;} - strcpy( lDialogString , "szAnswer=$(gmessage -buttons Ok:1,Cancel:0 -center \""); - } - - if ( aMessage && strlen(aMessage) ) - { - strcat( lDialogString , aMessage ) ; - } - strcat(lDialogString, "\"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat( lDialogString , " -title \""); - strcat( lDialogString , aTitle ) ; - strcat(lDialogString, "\" " ) ; - } - strcat(lDialogString, " -entrytext \"" ) ; - if ( aDefaultInput && strlen(aDefaultInput) ) - { - strcat( lDialogString , aDefaultInput ) ; - } - strcat(lDialogString, "\"" ) ; - strcat( lDialogString , ");echo $?$szAnswer"); - } - else if ( !gdialogPresent() && !xdialogPresent() && tkinter3Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python3-tkinter");return (char *)1;} - strcpy( lDialogString , gPython3Name ) ; - strcat( lDialogString , - " -S -c \"import tkinter; from tkinter import simpledialog;root=tkinter.Tk();root.withdraw();"); - strcat( lDialogString ,"res=simpledialog.askstring(" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aMessage && strlen(aMessage) ) - { - - strcat(lDialogString, "prompt='") ; - lpDialogString = lDialogString + strlen(lDialogString); - tfd_replaceSubStr( aMessage , "\n" , "\\n" , lpDialogString ) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultInput ) - { - if ( strlen(aDefaultInput) ) - { - strcat(lDialogString, "initialvalue='") ; - strcat(lDialogString, aDefaultInput) ; - strcat(lDialogString, "',") ; - } - } - else - { - strcat(lDialogString, "show='*'") ; - } - strcat(lDialogString, ");\nif res is None :\n\tprint(0)"); - strcat(lDialogString, "\nelse :\n\tprint('1'+res)\n\"" ) ; - } - else if ( !gdialogPresent() && !xdialogPresent() && tkinter2Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python2-tkinter");return (char *)1;} - strcpy( lDialogString , "export PYTHONIOENCODING=utf-8;" ) ; - strcat( lDialogString , gPython2Name ) ; - if ( ! isTerminalRunning( ) && tfd_isDarwin( ) ) - { - strcat( lDialogString , " -i" ) ; /* for osx without console */ - } - - strcat( lDialogString , - " -S -c \"import Tkinter,tkSimpleDialog;root=Tkinter.Tk();root.withdraw();"); - - if ( tfd_isDarwin( ) ) - { - strcat( lDialogString , -"import os;os.system('''/usr/bin/osascript -e 'tell app \\\"Finder\\\" to set \ -frontmost of process \\\"Python\\\" to true' ''');"); - } - - strcat( lDialogString ,"res=tkSimpleDialog.askstring(" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aMessage && strlen(aMessage) ) - { - - strcat(lDialogString, "prompt='") ; - lpDialogString = lDialogString + strlen(lDialogString); - tfd_replaceSubStr( aMessage , "\n" , "\\n" , lpDialogString ) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultInput ) - { - if ( strlen(aDefaultInput) ) - { - strcat(lDialogString, "initialvalue='") ; - strcat(lDialogString, aDefaultInput) ; - strcat(lDialogString, "',") ; - } - } - else - { - strcat(lDialogString, "show='*'") ; - } - strcat(lDialogString, ");\nif res is None :\n\tprint 0"); - strcat(lDialogString, "\nelse :\n\tprint '1'+res\n\"" ) ; - } - else if ( gdialogPresent() || xdialogPresent() || dialogName() || whiptailPresent() ) - { - if ( gdialogPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"gdialog");return (char *)1;} - lWasGraphicDialog = 1 ; - lWasGdialog = 1 ; - strcpy( lDialogString , "(gdialog " ) ; - } - else if ( xdialogPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"xdialog");return (char *)1;} - lWasGraphicDialog = 1 ; - strcpy( lDialogString , "(Xdialog " ) ; - } - else if ( dialogName( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - if ( isTerminalRunning( ) ) - { - strcpy( lDialogString , "(dialog " ) ; - } - else - { - lWasXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'(" ) ; - strcat( lDialogString , dialogName() ) ; - strcat( lDialogString , " " ) ; - } - } - else if ( isTerminalRunning( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"whiptail");return (char *)0;} - strcpy( lDialogString , "(whiptail " ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"whiptail");return (char *)0;} - lWasXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'(whiptail " ) ; - } - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - if ( !xdialogPresent() && !gdialogPresent() ) - { - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, "tab: move focus") ; - if ( ! aDefaultInput && !lWasGdialog ) - { - strcat(lDialogString, " (sometimes nothing, no blink nor star, is shown in text field)") ; - } - strcat(lDialogString, "\" ") ; - } - - if ( aDefaultInput || lWasGdialog ) - { - strcat( lDialogString , "--inputbox" ) ; - } - else - { - if ( !lWasGraphicDialog && dialogName() && isDialogVersionBetter09b() ) - { - strcat( lDialogString , "--insecure " ) ; - } - strcat( lDialogString , "--passwordbox" ) ; - } - strcat( lDialogString , " \"" ) ; - if ( aMessage && strlen(aMessage) ) - { - strcat(lDialogString, aMessage) ; - } - strcat(lDialogString,"\" 10 60 ") ; - if ( aDefaultInput && strlen(aDefaultInput) ) - { - strcat(lDialogString, "\"") ; - strcat(lDialogString, aDefaultInput) ; - strcat(lDialogString, "\" ") ; - } - if ( lWasGraphicDialog ) - { - strcat(lDialogString,") 2>/tmp/tinyfd.txt;\ - if [ $? = 0 ];then tinyfdBool=1;else tinyfdBool=0;fi;\ - tinyfdRes=$(cat /tmp/tinyfd.txt);echo $tinyfdBool$tinyfdRes") ; - } - else - { - strcat(lDialogString,">/dev/tty ) 2>/tmp/tinyfd.txt;\ - if [ $? = 0 ];then tinyfdBool=1;else tinyfdBool=0;fi;\ - tinyfdRes=$(cat /tmp/tinyfd.txt);echo $tinyfdBool$tinyfdRes") ; - - if ( lWasXterm ) - { - strcat(lDialogString," >/tmp/tinyfd0.txt';cat /tmp/tinyfd0.txt"); - } - else - { - strcat(lDialogString, "; clear >/dev/tty") ; - } - } - } - else if ( ! isTerminalRunning( ) && terminalName() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"basicinput");return (char *)0;} - lWasBasicXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'" ) ; - if ( !gWarningDisplayed && !tinyfd_forceConsole) - { - gWarningDisplayed = 1 ; - tinyfd_messageBox(gTitle,tinyfd_needs,"ok","warning",0); - } - if ( aTitle && strlen(aTitle) && !tinyfd_forceConsole) - { - strcat( lDialogString , "echo \"" ) ; - strcat( lDialogString, aTitle) ; - strcat( lDialogString , "\";echo;" ) ; - } - - strcat( lDialogString , "echo \"" ) ; - if ( aMessage && strlen(aMessage) ) - { - strcat( lDialogString, aMessage) ; - } - strcat( lDialogString , "\";read " ) ; - if ( ! aDefaultInput ) - { - strcat( lDialogString , "-s " ) ; - } - strcat( lDialogString , "-p \"" ) ; - strcat( lDialogString , "(esc+enter to cancel): \" ANSWER " ) ; - strcat( lDialogString , ";echo 1$ANSWER >/tmp/tinyfd.txt';" ) ; - strcat( lDialogString , "cat -v /tmp/tinyfd.txt"); - } - else if ( !gWarningDisplayed && ! isTerminalRunning( ) && ! terminalName() ) { - gWarningDisplayed = 1 ; - tinyfd_messageBox(gTitle,tinyfd_needs,"ok","warning",0); - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"no_solution");return (char *)0;} - free(lDialogString); - return NULL; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"basicinput");return (char *)0;} - if ( !gWarningDisplayed && !tinyfd_forceConsole) - { - gWarningDisplayed = 1 ; - tinyfd_messageBox(gTitle,tinyfd_needs,"ok","warning",0); - } - if ( aTitle && strlen(aTitle) ) - { - printf("\n%s\n", aTitle); - } - if ( aMessage && strlen(aMessage) ) - { - printf("\n%s\n",aMessage); - } - printf("(esc+enter to cancel): "); fflush(stdout); - if ( ! aDefaultInput ) - { - tcgetattr(STDIN_FILENO, & oldt) ; - newt = oldt ; - newt.c_lflag &= ~ECHO ; - tcsetattr(STDIN_FILENO, TCSANOW, & newt); - } - - lEOF = fgets(lBuff, MAX_PATH_OR_CMD, stdin); - /* printf("lbuff<%c><%d>\n",lBuff[0],lBuff[0]); */ - if ( ! lEOF || (lBuff[0] == '\0') ) - { - free(lDialogString); - return NULL; - } - - if ( lBuff[0] == '\n' ) - { - lEOF = fgets(lBuff, MAX_PATH_OR_CMD, stdin); - /* printf("lbuff<%c><%d>\n",lBuff[0],lBuff[0]); */ - if ( ! lEOF || (lBuff[0] == '\0') ) - { - free(lDialogString); - return NULL; - } - } - - if ( ! aDefaultInput ) - { - tcsetattr(STDIN_FILENO, TCSANOW, & oldt); - printf("\n"); - } - printf("\n"); - if ( strchr(lBuff,27) ) - { - free(lDialogString); - return NULL ; - } - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - free(lDialogString); - return lBuff ; - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - lIn = popen( lDialogString , "r" ); - if ( ! lIn ) - { - if ( fileExists("/tmp/tinyfd.txt") ) - { - wipefile("/tmp/tinyfd.txt"); - remove("/tmp/tinyfd.txt"); - } - if ( fileExists("/tmp/tinyfd0.txt") ) - { - wipefile("/tmp/tinyfd0.txt"); - remove("/tmp/tinyfd0.txt"); - } - free(lDialogString); - return NULL ; - } - while ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - {} - - pclose( lIn ) ; - - if ( fileExists("/tmp/tinyfd.txt") ) - { - wipefile("/tmp/tinyfd.txt"); - remove("/tmp/tinyfd.txt"); - } - if ( fileExists("/tmp/tinyfd0.txt") ) - { - wipefile("/tmp/tinyfd0.txt"); - remove("/tmp/tinyfd0.txt"); - } - - /* printf( "len Buff: %lu\n" , strlen(lBuff) ) ; */ - /* printf( "lBuff0: %s\n" , lBuff ) ; */ - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - /* printf( "lBuff1: %s len: %lu \n" , lBuff , strlen(lBuff) ) ; */ - if ( lWasBasicXterm ) - { - if ( strstr(lBuff,"^[") ) /* esc was pressed */ - { - free(lDialogString); - return NULL ; - } - } - - lResult = strncmp( lBuff , "1" , 1) ? 0 : 1 ; - /* printf( "lResult: %d \n" , lResult ) ; */ - if ( ! lResult ) - { - free(lDialogString); - return NULL ; - } - - /* printf( "lBuff+1: %s\n" , lBuff+1 ) ; */ - free(lDialogString); - return lBuff+1 ; -} - - -char * tinyfd_saveFileDialog( - char const * aTitle , /* NULL or "" */ - char const * aDefaultPathAndFile , /* NULL or "" */ - int aNumOfFilterPatterns , /* 0 */ - char const * const * aFilterPatterns , /* NULL or {"*.txt","*.doc"} */ - char const * aSingleFilterDescription ) /* NULL or "text files" */ -{ - static char lBuff[MAX_PATH_OR_CMD] ; - char lDialogString[MAX_PATH_OR_CMD] ; - char lString[MAX_PATH_OR_CMD] ; - int i ; - int lWasGraphicDialog = 0 ; - int lWasXterm = 0 ; - char * p ; - char * lPointerInputBox ; - FILE * lIn ; - lBuff[0]='\0'; - - if ( ! aFilterPatterns ) aNumOfFilterPatterns = 0 ; - if (tfd_quoteDetected(aTitle)) return tinyfd_saveFileDialog("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription); - if (tfd_quoteDetected(aDefaultPathAndFile)) return tinyfd_saveFileDialog(aTitle, "INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription); - if (tfd_quoteDetected(aSingleFilterDescription)) return tinyfd_saveFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, "INVALID FILTER_DESCRIPTION WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (tfd_quoteDetected(aFilterPatterns[i])) return tinyfd_saveFileDialog("INVALID FILTER_PATTERN WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, 0, NULL, NULL); - } - - if ( osascriptPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"applescript");return (char *)1;} - strcpy( lDialogString , "osascript "); - if ( ! osx9orBetter() ) strcat( lDialogString , " -e 'tell application \"Finder\"' -e 'Activate'"); - strcat( lDialogString , " -e 'try' -e 'POSIX path of ( choose file name " ); - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "with prompt \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - getPathWithoutFinalSlash( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "default location \"") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "\" " ) ; - } - getLastName( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "default name \"") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "\" " ) ; - } - strcat( lDialogString , ")' " ) ; - strcat(lDialogString, "-e 'on error number -128' " ) ; - strcat(lDialogString, "-e 'end try'") ; - if ( ! osx9orBetter() ) strcat( lDialogString, " -e 'end tell'") ; - } - else if ( tfd_kdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"kdialog");return (char *)1;} - - strcpy( lDialogString , "kdialog" ) ; - if ( (tfd_kdialogPresent() == 2) && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - strcat( lDialogString , " --getsavefilename " ) ; - - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - if ( aDefaultPathAndFile[0] != '/' ) - { - strcat(lDialogString, "$PWD/") ; - } - strcat(lDialogString, "\"") ; - strcat(lDialogString, aDefaultPathAndFile ) ; - strcat(lDialogString , "\"" ) ; - } - else - { - strcat(lDialogString, "$PWD/") ; - } - - if ( aNumOfFilterPatterns > 0 ) - { - strcat(lDialogString , " \"" ) ; - strcat( lDialogString , aFilterPatterns[0] ) ; - for ( i = 1 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , " " ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - } - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , " | " ) ; - strcat( lDialogString , aSingleFilterDescription ) ; - } - strcat( lDialogString , "\"" ) ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, " --title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - } - } - else if ( tfd_zenityPresent() || tfd_matedialogPresent() || tfd_shellementaryPresent() || tfd_qarmaPresent() ) - { - if ( tfd_zenityPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity");return (char *)1;} - strcpy( lDialogString , "zenity" ) ; - if ( (tfd_zenity3Present() >= 4) && !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat( lDialogString, " --attach=$(sleep .01;xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - else if ( tfd_matedialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"matedialog");return (char *)1;} - strcpy( lDialogString , "matedialog" ) ; - } - else if ( tfd_shellementaryPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"shellementary");return (char *)1;} - strcpy( lDialogString , "shellementary" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"qarma");return (char *)1;} - strcpy( lDialogString , "qarma" ) ; - if ( !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - strcat(lDialogString, " --file-selection --save --confirm-overwrite" ) ; - - strcat(lDialogString, " --title=\"") ; - if (aTitle && strlen(aTitle)) strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - strcat(lDialogString, " --filename=\"") ; - strcat(lDialogString, aDefaultPathAndFile) ; - strcat(lDialogString, "\"") ; - } - if ( aNumOfFilterPatterns > 0 ) - { - strcat( lDialogString , " --file-filter='" ) ; - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , aSingleFilterDescription ) ; - strcat( lDialogString , " |" ) ; - } - for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , " " ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - } - strcat( lDialogString , "' --file-filter='All files | *'" ) ; - } - if (tinyfd_silent) strcat( lDialogString , " 2>/dev/null "); - } - else if (tfd_yadPresent()) - { - if (aTitle && !strcmp(aTitle, "tinyfd_query")) { strcpy(tinyfd_response, "yad"); return (char*)1; } - strcpy(lDialogString, "yad --file --save --confirm-overwrite"); - if (aTitle && strlen(aTitle)) - { - strcat(lDialogString, " --title=\""); - strcat(lDialogString, aTitle); - strcat(lDialogString, "\""); - } - if (aDefaultPathAndFile && strlen(aDefaultPathAndFile)) - { - strcat(lDialogString, " --filename=\""); - strcat(lDialogString, aDefaultPathAndFile); - strcat(lDialogString, "\""); - } - if (aNumOfFilterPatterns > 0) - { - strcat(lDialogString, " --file-filter='"); - if (aSingleFilterDescription && strlen(aSingleFilterDescription)) - { - strcat(lDialogString, aSingleFilterDescription); - strcat(lDialogString, " |"); - } - for (i = 0; i < aNumOfFilterPatterns; i++) - { - strcat(lDialogString, " "); - strcat(lDialogString, aFilterPatterns[i]); - } - strcat(lDialogString, "' --file-filter='All files | *'"); - } - if (tinyfd_silent) strcat(lDialogString, " 2>/dev/null "); - } - else if ( !xdialogPresent() && tkinter3Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python3-tkinter");return (char *)1;} - strcpy( lDialogString , gPython3Name ) ; - strcat( lDialogString , - " -S -c \"import tkinter;from tkinter import filedialog;root=tkinter.Tk();root.withdraw();"); - strcat( lDialogString , "res=filedialog.asksaveasfilename("); - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - getPathWithoutFinalSlash( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialdir='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - getLastName( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialfile='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - } - if ( ( aNumOfFilterPatterns > 1 ) - || ( (aNumOfFilterPatterns == 1) /* test because poor osx behaviour */ - && ( aFilterPatterns[0][strlen(aFilterPatterns[0])-1] != '*' ) ) ) - { - strcat(lDialogString , "filetypes=(" ) ; - strcat( lDialogString , "('" ) ; - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , aSingleFilterDescription ) ; - } - strcat( lDialogString , "',(" ) ; - for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , "'" ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - strcat( lDialogString , "'," ) ; - } - strcat( lDialogString , "))," ) ; - strcat( lDialogString , "('All files','*'))" ) ; - } - strcat( lDialogString, ");\nif not isinstance(res, tuple):\n\tprint(res)\n\"" ) ; - } - else if ( !xdialogPresent() && tkinter2Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python2-tkinter");return (char *)1;} - strcpy( lDialogString , "export PYTHONIOENCODING=utf-8;" ) ; - strcat( lDialogString , gPython2Name ) ; - if ( ! isTerminalRunning( ) && tfd_isDarwin( )) - { - strcat( lDialogString , " -i" ) ; /* for osx without console */ - } - strcat( lDialogString , -" -S -c \"import Tkinter,tkFileDialog;root=Tkinter.Tk();root.withdraw();"); - - if ( tfd_isDarwin( ) ) - { - strcat( lDialogString , -"import os;os.system('''/usr/bin/osascript -e 'tell app \\\"Finder\\\" to set\ - frontmost of process \\\"Python\\\" to true' ''');"); - } - - strcat( lDialogString , "res=tkFileDialog.asksaveasfilename("); - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - getPathWithoutFinalSlash( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialdir='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - getLastName( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialfile='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - } - if ( ( aNumOfFilterPatterns > 1 ) - || ( (aNumOfFilterPatterns == 1) /* test because poor osx behaviour */ - && ( aFilterPatterns[0][strlen(aFilterPatterns[0])-1] != '*' ) ) ) - { - strcat(lDialogString , "filetypes=(" ) ; - strcat( lDialogString , "('" ) ; - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , aSingleFilterDescription ) ; - } - strcat( lDialogString , "',(" ) ; - for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , "'" ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - strcat( lDialogString , "'," ) ; - } - strcat( lDialogString , "))," ) ; - strcat( lDialogString , "('All files','*'))" ) ; - } - strcat( lDialogString, ");\nif not isinstance(res, tuple):\n\tprint res \n\"" ) ; - } - else if ( xdialogPresent() || dialogName() ) - { - if ( xdialogPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"xdialog");return (char *)1;} - lWasGraphicDialog = 1 ; - strcpy( lDialogString , "(Xdialog " ) ; - } - else if ( isTerminalRunning( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - strcpy( lDialogString , "(dialog " ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - lWasXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'(" ) ; - strcat( lDialogString , dialogName() ) ; - strcat( lDialogString , " " ) ; - } - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - if ( !xdialogPresent() && !gdialogPresent() ) - { - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, - "tab: focus | /: populate | spacebar: fill text field | ok: TEXT FIELD ONLY") ; - strcat(lDialogString, "\" ") ; - } - - strcat( lDialogString , "--fselect \"" ) ; - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - if ( ! strchr(aDefaultPathAndFile, '/') ) - { - strcat(lDialogString, "./") ; - } - strcat(lDialogString, aDefaultPathAndFile) ; - } - else if ( ! isTerminalRunning( ) && !lWasGraphicDialog ) - { - strcat(lDialogString, getenv("HOME")) ; - strcat(lDialogString, "/") ; - } - else - { - strcat(lDialogString, "./") ; - } - - if ( lWasGraphicDialog ) - { - strcat(lDialogString, "\" 0 60 ) 2>&1 ") ; - } - else - { - strcat(lDialogString, "\" 0 60 >/dev/tty) ") ; - if ( lWasXterm ) - { - strcat( lDialogString , - "2>/tmp/tinyfd.txt';cat /tmp/tinyfd.txt;rm /tmp/tinyfd.txt"); - } - else - { - strcat(lDialogString, "2>&1 ; clear >/dev/tty") ; - } - } - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){return tinyfd_inputBox(aTitle,NULL,NULL);} - strcpy(lBuff, "Save file in "); - strcat(lBuff, getCurDir()); - lPointerInputBox = tinyfd_inputBox(NULL, NULL, NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, lBuff, ""); - if (p) strcpy(lBuff, p); else lBuff[0] = '\0'; - if (lPointerInputBox) strcpy(lPointerInputBox, lString); /* restore its previous content to tinyfd_inputBox */ - p = lBuff; - - getPathWithoutFinalSlash( lString , p ) ; - if ( strlen( lString ) && ! dirExists( lString ) ) - { - return NULL ; - } - getLastName(lString,p); - if ( ! strlen(lString) ) - { - return NULL; - } - return p ; - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - if ( ! ( lIn = popen( lDialogString , "r" ) ) ) - { - return NULL ; - } - while ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - {} - pclose( lIn ) ; - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - /* printf( "lBuff: %s\n" , lBuff ) ; */ - if ( ! strlen(lBuff) ) - { - return NULL; - } - getPathWithoutFinalSlash( lString , lBuff ) ; - if ( strlen( lString ) && ! dirExists( lString ) ) - { - return NULL ; - } - getLastName(lString,lBuff); - if ( ! filenameValid(lString) ) - { - return NULL; - } - return lBuff ; -} - - -/* in case of multiple files, the separator is | */ -char * tinyfd_openFileDialog( - char const * aTitle , /* NULL or "" */ - char const * aDefaultPathAndFile , /* NULL or "" */ - int aNumOfFilterPatterns , /* 0 */ - char const * const * aFilterPatterns , /* NULL or {"*.jpg","*.png"} */ - char const * aSingleFilterDescription , /* NULL or "image files" */ - int aAllowMultipleSelects ) /* 0 or 1 */ -{ - char lDialogString[MAX_PATH_OR_CMD] ; - char lString[MAX_PATH_OR_CMD] ; - int i ; - FILE * lIn ; - char * p ; - char * lPointerInputBox ; - int lWasKdialog = 0 ; - int lWasGraphicDialog = 0 ; - int lWasXterm = 0 ; - size_t lFullBuffLen ; - static char * lBuff = NULL; - - if ( ! aFilterPatterns ) aNumOfFilterPatterns = 0 ; - if (tfd_quoteDetected(aTitle)) return tinyfd_openFileDialog("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); - if (tfd_quoteDetected(aDefaultPathAndFile)) return tinyfd_openFileDialog(aTitle, "INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aNumOfFilterPatterns, aFilterPatterns, aSingleFilterDescription, aAllowMultipleSelects); - if (tfd_quoteDetected(aSingleFilterDescription)) return tinyfd_openFileDialog(aTitle, aDefaultPathAndFile, aNumOfFilterPatterns, aFilterPatterns, "INVALID FILTER_DESCRIPTION WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aAllowMultipleSelects); - for (i = 0; i < aNumOfFilterPatterns; i++) - { - if (tfd_quoteDetected(aFilterPatterns[i])) return tinyfd_openFileDialog("INVALID FILTER_PATTERN WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPathAndFile, 0, NULL, NULL, aAllowMultipleSelects); - } - - free(lBuff); - if (aTitle&&!strcmp(aTitle,"tinyfd_query")) - { - lBuff = NULL; - } - else - { - if (aAllowMultipleSelects) - { - lFullBuffLen = MAX_MULTIPLE_FILES * MAX_PATH_OR_CMD + 1; - lBuff = (char *)(malloc(lFullBuffLen * sizeof(char))); - if (!lBuff) - { - lFullBuffLen = LOW_MULTIPLE_FILES * MAX_PATH_OR_CMD + 1; - lBuff = (char *)( malloc( lFullBuffLen * sizeof(char))); - } - } - else - { - lFullBuffLen = MAX_PATH_OR_CMD + 1; - lBuff = (char *)(malloc(lFullBuffLen * sizeof(char))); - } - if (!lBuff) return NULL; - lBuff[0]='\0'; - } - - if ( osascriptPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"applescript");return (char *)1;} - strcpy( lDialogString , "osascript "); - if ( ! osx9orBetter() ) strcat( lDialogString , " -e 'tell application \"System Events\"' -e 'Activate'"); - strcat( lDialogString , " -e 'try' -e '" ); - if ( ! aAllowMultipleSelects ) - { - - - strcat( lDialogString , "POSIX path of ( " ); - } - else - { - strcat( lDialogString , "set mylist to " ); - } - strcat( lDialogString , "choose file " ); - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "with prompt \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - getPathWithoutFinalSlash( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "default location \"") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "\" " ) ; - } - if ( aNumOfFilterPatterns > 0 ) - { - strcat(lDialogString , "of type {\"" ); - strcat( lDialogString , aFilterPatterns[0] + 2 ) ; - strcat( lDialogString , "\"" ) ; - for ( i = 1 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , ",\"" ) ; - strcat( lDialogString , aFilterPatterns[i] + 2) ; - strcat( lDialogString , "\"" ) ; - } - strcat( lDialogString , "} " ) ; - } - if ( aAllowMultipleSelects ) - { - strcat( lDialogString , "multiple selections allowed true ' " ) ; - strcat( lDialogString , - "-e 'set mystring to POSIX path of item 1 of mylist' " ); - strcat( lDialogString , - "-e 'repeat with i from 2 to the count of mylist' " ); - strcat( lDialogString , "-e 'set mystring to mystring & \"|\"' " ); - strcat( lDialogString , - "-e 'set mystring to mystring & POSIX path of item i of mylist' " ); - strcat( lDialogString , "-e 'end repeat' " ); - strcat( lDialogString , "-e 'mystring' " ); - } - else - { - strcat( lDialogString , ")' " ) ; - } - strcat(lDialogString, "-e 'on error number -128' " ) ; - strcat(lDialogString, "-e 'end try'") ; - if ( ! osx9orBetter() ) strcat( lDialogString, " -e 'end tell'") ; - } - else if ( tfd_kdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"kdialog");return (char *)1;} - lWasKdialog = 1 ; - - strcpy( lDialogString , "kdialog" ) ; - if ( (tfd_kdialogPresent() == 2) && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - strcat( lDialogString , " --getopenfilename " ) ; - - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - if ( aDefaultPathAndFile[0] != '/' ) - { - strcat(lDialogString, "$PWD/") ; - } - strcat(lDialogString, "\"") ; - strcat(lDialogString, aDefaultPathAndFile ) ; - strcat(lDialogString , "\"" ) ; - } - else - { - strcat(lDialogString, "$PWD/") ; - } - - if ( aNumOfFilterPatterns > 0 ) - { - strcat(lDialogString , " \"" ) ; - strcat( lDialogString , aFilterPatterns[0] ) ; - for ( i = 1 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , " " ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - } - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , " | " ) ; - strcat( lDialogString , aSingleFilterDescription ) ; - } - strcat( lDialogString , "\"" ) ; - } - if ( aAllowMultipleSelects ) - { - strcat( lDialogString , " --multiple --separate-output" ) ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, " --title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - } - } - else if ( tfd_zenityPresent() || tfd_matedialogPresent() || tfd_shellementaryPresent() || tfd_qarmaPresent() ) - { - if ( tfd_zenityPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity");return (char *)1;} - strcpy( lDialogString , "zenity" ) ; - if ( (tfd_zenity3Present() >= 4) && !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat( lDialogString, " --attach=$(sleep .01;xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - else if ( tfd_matedialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"matedialog");return (char *)1;} - strcpy( lDialogString , "matedialog" ) ; - } - else if ( tfd_shellementaryPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"shellementary");return (char *)1;} - strcpy( lDialogString , "shellementary" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"qarma");return (char *)1;} - strcpy( lDialogString , "qarma" ) ; - if ( !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - strcat( lDialogString , " --file-selection" ) ; - - if ( aAllowMultipleSelects ) - { - strcat( lDialogString , " --multiple" ) ; - } - - strcat(lDialogString, " --title=\"") ; - if (aTitle && strlen(aTitle)) strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - strcat(lDialogString, " --filename=\"") ; - strcat(lDialogString, aDefaultPathAndFile) ; - strcat(lDialogString, "\"") ; - } - if ( aNumOfFilterPatterns > 0 ) - { - strcat( lDialogString , " --file-filter='" ) ; - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , aSingleFilterDescription ) ; - strcat( lDialogString , " |" ) ; - } - for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , " " ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - } - strcat( lDialogString , "' --file-filter='All files | *'" ) ; - } - if (tinyfd_silent) strcat( lDialogString , " 2>/dev/null "); - } - else if (tfd_yadPresent()) - { - if (aTitle && !strcmp(aTitle, "tinyfd_query")) { strcpy(tinyfd_response, "yad"); return (char*)1; } - strcpy(lDialogString, "yad --file"); - if (aAllowMultipleSelects) - { - strcat(lDialogString, " --multiple"); - } - if (aTitle && strlen(aTitle)) - { - strcat(lDialogString, " --title=\""); - strcat(lDialogString, aTitle); - strcat(lDialogString, "\""); - } - if (aDefaultPathAndFile && strlen(aDefaultPathAndFile)) - { - strcat(lDialogString, " --filename=\""); - strcat(lDialogString, aDefaultPathAndFile); - strcat(lDialogString, "\""); - } - if (aNumOfFilterPatterns > 0) - { - strcat(lDialogString, " --file-filter='"); - if (aSingleFilterDescription && strlen(aSingleFilterDescription)) - { - strcat(lDialogString, aSingleFilterDescription); - strcat(lDialogString, " |"); - } - for (i = 0; i < aNumOfFilterPatterns; i++) - { - strcat(lDialogString, " "); - strcat(lDialogString, aFilterPatterns[i]); - } - strcat(lDialogString, "' --file-filter='All files | *'"); - } - if (tinyfd_silent) strcat(lDialogString, " 2>/dev/null "); - } - else if ( tkinter3Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python3-tkinter");return (char *)1;} - strcpy( lDialogString , gPython3Name ) ; - strcat( lDialogString , - " -S -c \"import tkinter;from tkinter import filedialog;root=tkinter.Tk();root.withdraw();"); - strcat( lDialogString , "lFiles=filedialog.askopenfilename("); - if ( aAllowMultipleSelects ) - { - strcat( lDialogString , "multiple=1," ) ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - getPathWithoutFinalSlash( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialdir='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - getLastName( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialfile='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - } - if ( ( aNumOfFilterPatterns > 1 ) - || ( ( aNumOfFilterPatterns == 1 ) /*test because poor osx behaviour*/ - && ( aFilterPatterns[0][strlen(aFilterPatterns[0])-1] != '*' ) ) ) - { - strcat(lDialogString , "filetypes=(" ) ; - strcat( lDialogString , "('" ) ; - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , aSingleFilterDescription ) ; - } - strcat( lDialogString , "',(" ) ; - for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , "'" ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - strcat( lDialogString , "'," ) ; - } - strcat( lDialogString , "))," ) ; - strcat( lDialogString , "('All files','*'))" ) ; - } - strcat( lDialogString , ");\ -\nif not isinstance(lFiles, tuple):\n\tprint(lFiles)\nelse:\ -\n\tlFilesString=''\n\tfor lFile in lFiles:\n\t\tlFilesString+=str(lFile)+'|'\ -\n\tprint(lFilesString[:-1])\n\"" ) ; - } - else if ( tkinter2Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python2-tkinter");return (char *)1;} - strcpy( lDialogString , "export PYTHONIOENCODING=utf-8;" ) ; - strcat( lDialogString , gPython2Name ) ; - if ( ! isTerminalRunning( ) && tfd_isDarwin( ) ) - { - strcat( lDialogString , " -i" ) ; /* for osx without console */ - } - strcat( lDialogString , -" -S -c \"import Tkinter,tkFileDialog;root=Tkinter.Tk();root.withdraw();"); - - if ( tfd_isDarwin( ) ) - { - strcat( lDialogString , -"import os;os.system('''/usr/bin/osascript -e 'tell app \\\"Finder\\\" to set \ -frontmost of process \\\"Python\\\" to true' ''');"); - } - strcat( lDialogString , "lFiles=tkFileDialog.askopenfilename("); - if ( aAllowMultipleSelects ) - { - strcat( lDialogString , "multiple=1," ) ; - } - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - getPathWithoutFinalSlash( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialdir='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - getLastName( lString , aDefaultPathAndFile ) ; - if ( strlen(lString) ) - { - strcat(lDialogString, "initialfile='") ; - strcat(lDialogString, lString ) ; - strcat(lDialogString , "'," ) ; - } - } - if ( ( aNumOfFilterPatterns > 1 ) - || ( ( aNumOfFilterPatterns == 1 ) /*test because poor osx behaviour*/ - && ( aFilterPatterns[0][strlen(aFilterPatterns[0])-1] != '*' ) ) ) - { - strcat(lDialogString , "filetypes=(" ) ; - strcat( lDialogString , "('" ) ; - if ( aSingleFilterDescription && strlen(aSingleFilterDescription) ) - { - strcat( lDialogString , aSingleFilterDescription ) ; - } - strcat( lDialogString , "',(" ) ; - for ( i = 0 ; i < aNumOfFilterPatterns ; i ++ ) - { - strcat( lDialogString , "'" ) ; - strcat( lDialogString , aFilterPatterns[i] ) ; - strcat( lDialogString , "'," ) ; - } - strcat( lDialogString , "))," ) ; - strcat( lDialogString , "('All files','*'))" ) ; - } - strcat( lDialogString , ");\ -\nif not isinstance(lFiles, tuple):\n\tprint lFiles\nelse:\ -\n\tlFilesString=''\n\tfor lFile in lFiles:\n\t\tlFilesString+=str(lFile)+'|'\ -\n\tprint lFilesString[:-1]\n\"" ) ; - } - else if ( xdialogPresent() || dialogName() ) - { - if ( xdialogPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"xdialog");return (char *)1;} - lWasGraphicDialog = 1 ; - strcpy( lDialogString , "(Xdialog " ) ; - } - else if ( isTerminalRunning( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - strcpy( lDialogString , "(dialog " ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - lWasXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'(" ) ; - strcat( lDialogString , dialogName() ) ; - strcat( lDialogString , " " ) ; - } - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - if ( !xdialogPresent() && !gdialogPresent() ) - { - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, - "tab: focus | /: populate | spacebar: fill text field | ok: TEXT FIELD ONLY") ; - strcat(lDialogString, "\" ") ; - } - - strcat( lDialogString , "--fselect \"" ) ; - if ( aDefaultPathAndFile && strlen(aDefaultPathAndFile) ) - { - if ( ! strchr(aDefaultPathAndFile, '/') ) - { - strcat(lDialogString, "./") ; - } - strcat(lDialogString, aDefaultPathAndFile) ; - } - else if ( ! isTerminalRunning( ) && !lWasGraphicDialog ) - { - strcat(lDialogString, getenv("HOME")) ; - strcat(lDialogString, "/"); - } - else - { - strcat(lDialogString, "./") ; - } - - if ( lWasGraphicDialog ) - { - strcat(lDialogString, "\" 0 60 ) 2>&1 ") ; - } - else - { - strcat(lDialogString, "\" 0 60 >/dev/tty) ") ; - if ( lWasXterm ) - { - strcat( lDialogString , - "2>/tmp/tinyfd.txt';cat /tmp/tinyfd.txt;rm /tmp/tinyfd.txt"); - } - else - { - strcat(lDialogString, "2>&1 ; clear >/dev/tty") ; - } - } - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){return tinyfd_inputBox(aTitle,NULL,NULL);} - strcpy(lBuff, "Open file from "); - strcat(lBuff, getCurDir()); - lPointerInputBox = tinyfd_inputBox(NULL, NULL, NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lDialogString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, lBuff, ""); - if ( p ) strcpy(lBuff, p); else lBuff[0] = '\0'; - if (lPointerInputBox) strcpy(lPointerInputBox, lDialogString); /* restore its previous content to tinyfd_inputBox */ - if ( ! fileExists(lBuff) ) - { - free(lBuff); - lBuff = NULL; - } - else - { - lBuff = (char *)( realloc( lBuff, (strlen(lBuff)+1) * sizeof(char))); - } - return lBuff ; - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - if ( ! ( lIn = popen( lDialogString , "r" ) ) ) - { - free(lBuff); - lBuff = NULL; - return NULL ; - } - lBuff[0]='\0'; - p = lBuff; - while ( fgets( p , sizeof( lBuff ) , lIn ) != NULL ) - { - p += strlen( p ); - } - pclose( lIn ) ; - - if ( strlen( lBuff ) && lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - /* printf( "strlen lBuff: %d\n" , strlen( lBuff ) ) ; */ - if ( lWasKdialog && aAllowMultipleSelects ) - { - p = lBuff ; - while ( ( p = strchr( p , '\n' ) ) ) - * p = '|' ; - } - /* printf( "lBuff2: %s\n" , lBuff ) ; */ - if ( ! strlen( lBuff ) ) - { - free(lBuff); - lBuff = NULL; - return NULL; - } - if ( aAllowMultipleSelects && strchr(lBuff, '|') ) - { - if( ! ensureFilesExist( lBuff , lBuff ) ) - { - free(lBuff); - lBuff = NULL; - return NULL; - } - } - else if ( !fileExists(lBuff) ) - { - free(lBuff); - lBuff = NULL; - return NULL; - } - - lBuff = (char *)( realloc( lBuff, (strlen(lBuff)+1) * sizeof(char))); - - /*printf( "lBuff3 [%lu]: %s\n" , strlen(lBuff) , lBuff ) ; */ - return lBuff ; -} - - -char * tinyfd_selectFolderDialog( - char const * aTitle , /* "" */ - char const * aDefaultPath ) /* "" */ -{ - static char lBuff[MAX_PATH_OR_CMD] ; - char lDialogString[MAX_PATH_OR_CMD] ; - FILE * lIn ; - char * p ; - char * lPointerInputBox ; - int lWasGraphicDialog = 0 ; - int lWasXterm = 0 ; - lBuff[0]='\0'; - - if (tfd_quoteDetected(aTitle)) return tinyfd_selectFolderDialog("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultPath); - if (tfd_quoteDetected(aDefaultPath)) return tinyfd_selectFolderDialog(aTitle, "INVALID DEFAULT_PATH WITH QUOTES: use the GRAVE ACCENT \\x60 instead."); - - if ( osascriptPresent( )) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"applescript");return (char *)1;} - strcpy( lDialogString , "osascript "); - if ( ! osx9orBetter() ) strcat( lDialogString , " -e 'tell application \"System Events\"' -e 'Activate'"); - strcat( lDialogString , " -e 'try' -e 'POSIX path of ( choose folder "); - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "with prompt \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - if ( aDefaultPath && strlen(aDefaultPath) ) - { - strcat(lDialogString, "default location \"") ; - strcat(lDialogString, aDefaultPath ) ; - strcat(lDialogString , "\" " ) ; - } - strcat( lDialogString , ")' " ) ; - strcat(lDialogString, "-e 'on error number -128' " ) ; - strcat(lDialogString, "-e 'end try'") ; - if ( ! osx9orBetter() ) strcat( lDialogString, " -e 'end tell'") ; - } - else if ( tfd_kdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"kdialog");return (char *)1;} - strcpy( lDialogString , "kdialog" ) ; - if ( (tfd_kdialogPresent() == 2) && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - strcat( lDialogString , " --getexistingdirectory " ) ; - - if ( aDefaultPath && strlen(aDefaultPath) ) - { - if ( aDefaultPath[0] != '/' ) - { - strcat(lDialogString, "$PWD/") ; - } - strcat(lDialogString, "\"") ; - strcat(lDialogString, aDefaultPath ) ; - strcat(lDialogString , "\"" ) ; - } - else - { - strcat(lDialogString, "$PWD/") ; - } - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, " --title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - } - } - else if ( tfd_zenityPresent() || tfd_matedialogPresent() || tfd_shellementaryPresent() || tfd_qarmaPresent() ) - { - if ( tfd_zenityPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity");return (char *)1;} - strcpy( lDialogString , "zenity" ) ; - if ( (tfd_zenity3Present() >= 4) && !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat( lDialogString, " --attach=$(sleep .01;xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - else if ( tfd_matedialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"matedialog");return (char *)1;} - strcpy( lDialogString , "matedialog" ) ; - } - else if ( tfd_shellementaryPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"shellementary");return (char *)1;} - strcpy( lDialogString , "shellementary" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"qarma");return (char *)1;} - strcpy( lDialogString , "qarma" ) ; - if ( !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - strcat( lDialogString , " --file-selection --directory" ) ; - - strcat(lDialogString, " --title=\"") ; - if (aTitle && strlen(aTitle)) strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - - if ( aDefaultPath && strlen(aDefaultPath) ) - { - strcat(lDialogString, " --filename=\"") ; - strcat(lDialogString, aDefaultPath) ; - strcat(lDialogString, "\"") ; - } - if (tinyfd_silent) strcat( lDialogString , " 2>/dev/null "); - } - else if (tfd_yadPresent()) - { - if (aTitle && !strcmp(aTitle, "tinyfd_query")) { strcpy(tinyfd_response, "yad"); return (char*)1; } - strcpy(lDialogString, "yad --file --directory"); - if (aTitle && strlen(aTitle)) - { - strcat(lDialogString, " --title=\""); - strcat(lDialogString, aTitle); - strcat(lDialogString, "\""); - } - if (aDefaultPath && strlen(aDefaultPath)) - { - strcat(lDialogString, " --filename=\""); - strcat(lDialogString, aDefaultPath); - strcat(lDialogString, "\""); - } - if (tinyfd_silent) strcat(lDialogString, " 2>/dev/null "); - } - else if ( !xdialogPresent() && tkinter3Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python3-tkinter");return (char *)1;} - strcpy( lDialogString , gPython3Name ) ; - strcat( lDialogString , - " -S -c \"import tkinter;from tkinter import filedialog;root=tkinter.Tk();root.withdraw();"); - strcat( lDialogString , "res=filedialog.askdirectory("); - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultPath && strlen(aDefaultPath) ) - { - strcat(lDialogString, "initialdir='") ; - strcat(lDialogString, aDefaultPath ) ; - strcat(lDialogString , "'" ) ; - } - strcat( lDialogString, ");\nif not isinstance(res, tuple):\n\tprint(res)\n\"" ) ; - } - else if ( !xdialogPresent() && tkinter2Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python2-tkinter");return (char *)1;} - strcpy( lDialogString , "export PYTHONIOENCODING=utf-8;" ) ; - strcat( lDialogString , gPython2Name ) ; - if ( ! isTerminalRunning( ) && tfd_isDarwin( ) ) - { - strcat( lDialogString , " -i" ) ; /* for osx without console */ - } - strcat( lDialogString , -" -S -c \"import Tkinter,tkFileDialog;root=Tkinter.Tk();root.withdraw();"); - - if ( tfd_isDarwin( ) ) - { - strcat( lDialogString , -"import os;os.system('''/usr/bin/osascript -e 'tell app \\\"Finder\\\" to set \ -frontmost of process \\\"Python\\\" to true' ''');"); - } - - strcat( lDialogString , "print tkFileDialog.askdirectory("); - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "',") ; - } - if ( aDefaultPath && strlen(aDefaultPath) ) - { - strcat(lDialogString, "initialdir='") ; - strcat(lDialogString, aDefaultPath ) ; - strcat(lDialogString , "'" ) ; - } - strcat( lDialogString , ")\"" ) ; - } - else if ( xdialogPresent() || dialogName() ) - { - if ( xdialogPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"xdialog");return (char *)1;} - lWasGraphicDialog = 1 ; - strcpy( lDialogString , "(Xdialog " ) ; - } - else if ( isTerminalRunning( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - strcpy( lDialogString , "(dialog " ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"dialog");return (char *)0;} - lWasXterm = 1 ; - strcpy( lDialogString , terminalName() ) ; - strcat( lDialogString , "'(" ) ; - strcat( lDialogString , dialogName() ) ; - strcat( lDialogString , " " ) ; - } - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, "--title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\" ") ; - } - - if ( !xdialogPresent() && !gdialogPresent() ) - { - strcat(lDialogString, "--backtitle \"") ; - strcat(lDialogString, - "tab: focus | /: populate | spacebar: fill text field | ok: TEXT FIELD ONLY") ; - strcat(lDialogString, "\" ") ; - } - - strcat( lDialogString , "--dselect \"" ) ; - if ( aDefaultPath && strlen(aDefaultPath) ) - { - strcat(lDialogString, aDefaultPath) ; - ensureFinalSlash(lDialogString); - } - else if ( ! isTerminalRunning( ) && !lWasGraphicDialog ) - { - strcat(lDialogString, getenv("HOME")) ; - strcat(lDialogString, "/"); - } - else - { - strcat(lDialogString, "./") ; - } - - if ( lWasGraphicDialog ) - { - strcat(lDialogString, "\" 0 60 ) 2>&1 ") ; - } - else - { - strcat(lDialogString, "\" 0 60 >/dev/tty) ") ; - if ( lWasXterm ) - { - strcat( lDialogString , - "2>/tmp/tinyfd.txt';cat /tmp/tinyfd.txt;rm /tmp/tinyfd.txt"); - } - else - { - strcat(lDialogString, "2>&1 ; clear >/dev/tty") ; - } - } - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){return tinyfd_inputBox(aTitle,NULL,NULL);} - strcpy(lBuff, "Select folder from "); - strcat(lBuff, getCurDir()); - lPointerInputBox = tinyfd_inputBox(NULL, NULL, NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lDialogString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, lBuff, ""); - if (p) strcpy(lBuff, p); else lBuff[0] = '\0'; - if (lPointerInputBox) strcpy(lPointerInputBox, lDialogString); /* restore its previous content to tinyfd_inputBox */ - p = lBuff; - - if ( !p || ! strlen( p ) || ! dirExists( p ) ) - { - return NULL ; - } - return p ; - } - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - if ( ! ( lIn = popen( lDialogString , "r" ) ) ) - { - return NULL ; - } - while ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - {} - pclose( lIn ) ; - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - /* printf( "lBuff: %s\n" , lBuff ) ; */ - if ( ! strlen( lBuff ) || ! dirExists( lBuff ) ) - { - return NULL ; - } - return lBuff ; -} - - -/* aDefaultRGB is used only if aDefaultHexRGB is absent */ -/* aDefaultRGB and aoResultRGB can be the same array */ -/* returns NULL on cancel */ -/* returns the hexcolor as a string "#FF0000" */ -/* aoResultRGB also contains the result */ -char * tinyfd_colorChooser( - char const * aTitle , /* NULL or "" */ - char const * aDefaultHexRGB , /* NULL or "#FF0000"*/ - unsigned char const aDefaultRGB[3] , /* { 0 , 255 , 255 } */ - unsigned char aoResultRGB[3] ) /* { 0 , 0 , 0 } */ -{ - static char lDefaultHexRGB[16]; - char lBuff[128] ; - - char lTmp[128] ; -#if !((defined(__cplusplus ) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__clang__)) - char * lTmp2 ; -#endif - char lDialogString[MAX_PATH_OR_CMD] ; - unsigned char lDefaultRGB[3]; - char * p; - char * lPointerInputBox; - FILE * lIn ; - int i ; - int lWasZenity3 = 0 ; - int lWasOsascript = 0 ; - int lWasXdialog = 0 ; - lBuff[0]='\0'; - - if (tfd_quoteDetected(aTitle)) return tinyfd_colorChooser("INVALID TITLE WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultHexRGB, aDefaultRGB, aoResultRGB); - if (tfd_quoteDetected(aDefaultHexRGB)) return tinyfd_colorChooser(aTitle, "INVALID DEFAULT_HEX_RGB WITH QUOTES: use the GRAVE ACCENT \\x60 instead.", aDefaultRGB, aoResultRGB); - - if (aDefaultHexRGB && (strlen(aDefaultHexRGB)==7) ) - { - Hex2RGB(aDefaultHexRGB, lDefaultRGB); - strcpy(lDefaultHexRGB, aDefaultHexRGB); - } - else - { - lDefaultRGB[0] = aDefaultRGB[0]; - lDefaultRGB[1] = aDefaultRGB[1]; - lDefaultRGB[2] = aDefaultRGB[2]; - RGB2Hex(aDefaultRGB, lDefaultHexRGB); - } - - if ( osascriptPresent( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"applescript");return (char *)1;} - lWasOsascript = 1 ; - strcpy( lDialogString , "osascript"); - - if ( ! osx9orBetter() ) - { - strcat( lDialogString , " -e 'tell application \"System Events\"' -e 'Activate'"); - strcat( lDialogString , " -e 'try' -e 'set mycolor to choose color default color {"); - } - else - { - strcat( lDialogString , -" -e 'try' -e 'tell app (path to frontmost application as Unicode text) \ -to set mycolor to choose color default color {"); - } - - sprintf(lTmp, "%d", 256 * lDefaultRGB[0] ) ; - strcat(lDialogString, lTmp ) ; - strcat(lDialogString, "," ) ; - sprintf(lTmp, "%d", 256 * lDefaultRGB[1] ) ; - strcat(lDialogString, lTmp ) ; - strcat(lDialogString, "," ) ; - sprintf(lTmp, "%d", 256 * lDefaultRGB[2] ) ; - strcat(lDialogString, lTmp ) ; - strcat(lDialogString, "}' " ) ; - strcat( lDialogString , -"-e 'set mystring to ((item 1 of mycolor) div 256 as integer) as string' " ); - strcat( lDialogString , -"-e 'repeat with i from 2 to the count of mycolor' " ); - strcat( lDialogString , -"-e 'set mystring to mystring & \" \" & ((item i of mycolor) div 256 as integer) as string' " ); - strcat( lDialogString , "-e 'end repeat' " ); - strcat( lDialogString , "-e 'mystring' "); - strcat(lDialogString, "-e 'on error number -128' " ) ; - strcat(lDialogString, "-e 'end try'") ; - if ( ! osx9orBetter() ) strcat( lDialogString, " -e 'end tell'") ; - } - else if ( tfd_kdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"kdialog");return (char *)1;} - strcpy( lDialogString , "kdialog" ) ; - if ( (tfd_kdialogPresent() == 2) && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - sprintf( lDialogString + strlen(lDialogString) , " --getcolor --default '%s'" , lDefaultHexRGB ) ; - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, " --title \"") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - } - } - else if ( tfd_zenity3Present() || tfd_matedialogPresent() || tfd_shellementaryPresent() || tfd_qarmaPresent() ) - { - lWasZenity3 = 1 ; - if ( tfd_zenity3Present() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"zenity3");return (char *)1;} - strcpy( lDialogString , "zenity" ); - if ( (tfd_zenity3Present() >= 4) && !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat( lDialogString, " --attach=$(sleep .01;xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - else if ( tfd_matedialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"matedialog");return (char *)1;} - strcpy( lDialogString , "matedialog" ) ; - } - else if ( tfd_shellementaryPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"shellementary");return (char *)1;} - strcpy( lDialogString , "shellementary" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"qarma");return (char *)1;} - strcpy( lDialogString , "qarma" ) ; - if ( !getenv("SSH_TTY") && tfd_xpropPresent() ) - { - strcat(lDialogString, " --attach=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"); /* contribution: Paul Rouget */ - } - } - strcat( lDialogString , " --color-selection --show-palette" ) ; - sprintf( lDialogString + strlen(lDialogString), " --color=%s" , lDefaultHexRGB ) ; - - strcat(lDialogString, " --title=\"") ; - if (aTitle && strlen(aTitle)) strcat(lDialogString, aTitle) ; - strcat(lDialogString, "\"") ; - - if (tinyfd_silent) strcat( lDialogString , " 2>/dev/null "); - } - else if (tfd_yadPresent()) - { - if (aTitle && !strcmp(aTitle, "tinyfd_query")) { strcpy(tinyfd_response, "yad"); return (char*)1; } - strcpy(lDialogString, "yad --color"); - sprintf(lDialogString + strlen(lDialogString), " --init-color=%s", lDefaultHexRGB); - if (aTitle && strlen(aTitle)) - { - strcat(lDialogString, " --title=\""); - strcat(lDialogString, aTitle); - strcat(lDialogString, "\""); - } - if (tinyfd_silent) strcat(lDialogString, " 2>/dev/null "); - } - else if ( xdialogPresent() ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"xdialog");return (char *)1;} - lWasXdialog = 1 ; - strcpy( lDialogString , "Xdialog --colorsel \"" ) ; - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, aTitle) ; - } - strcat(lDialogString, "\" 0 60 ") ; -#if (defined(__cplusplus ) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__clang__) - sprintf(lTmp,"%hhu %hhu %hhu",lDefaultRGB[0],lDefaultRGB[1],lDefaultRGB[2]); -#else - sprintf(lTmp,"%hu %hu %hu",lDefaultRGB[0],lDefaultRGB[1],lDefaultRGB[2]); -#endif - strcat(lDialogString, lTmp) ; - strcat(lDialogString, " 2>&1"); - } - else if ( tkinter3Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python3-tkinter");return (char *)1;} - strcpy( lDialogString , gPython3Name ) ; - strcat( lDialogString , - " -S -c \"import tkinter;from tkinter import colorchooser;root=tkinter.Tk();root.withdraw();"); - strcat( lDialogString , "res=colorchooser.askcolor(color='" ) ; - strcat(lDialogString, lDefaultHexRGB ) ; - strcat(lDialogString, "'") ; - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, ",title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "'") ; - } - strcat( lDialogString , ");\ -\nif res[1] is not None:\n\tprint(res[1])\"" ) ; - } - else if ( tkinter2Present( ) ) - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){strcpy(tinyfd_response,"python2-tkinter");return (char *)1;} - strcpy( lDialogString , "export PYTHONIOENCODING=utf-8;" ) ; - strcat( lDialogString , gPython2Name ) ; - if ( ! isTerminalRunning( ) && tfd_isDarwin( ) ) - { - strcat( lDialogString , " -i" ) ; /* for osx without console */ - } - - strcat( lDialogString , -" -S -c \"import Tkinter,tkColorChooser;root=Tkinter.Tk();root.withdraw();"); - - if ( tfd_isDarwin( ) ) - { - strcat( lDialogString , -"import os;os.system('''osascript -e 'tell app \\\"Finder\\\" to set \ -frontmost of process \\\"Python\\\" to true' ''');"); - } - - strcat( lDialogString , "res=tkColorChooser.askcolor(color='" ) ; - strcat(lDialogString, lDefaultHexRGB ) ; - strcat(lDialogString, "'") ; - - - if ( aTitle && strlen(aTitle) ) - { - strcat(lDialogString, ",title='") ; - strcat(lDialogString, aTitle) ; - strcat(lDialogString, "'") ; - } - strcat( lDialogString , ");\ -\nif res[1] is not None:\n\tprint res[1]\"" ) ; - } - else - { - if (aTitle&&!strcmp(aTitle,"tinyfd_query")){return tinyfd_inputBox(aTitle,NULL,NULL);} - lPointerInputBox = tinyfd_inputBox(NULL, NULL, NULL); /* obtain a pointer on the current content of tinyfd_inputBox */ - if (lPointerInputBox) strcpy(lDialogString, lPointerInputBox); /* preserve the current content of tinyfd_inputBox */ - p = tinyfd_inputBox(aTitle, "Enter hex rgb color (i.e. #f5ca20)", lDefaultHexRGB); - - if ( !p || (strlen(p) != 7) || (p[0] != '#') ) - { - return NULL ; - } - for ( i = 1 ; i < 7 ; i ++ ) - { - if ( ! isxdigit( (int) p[i] ) ) - { - return NULL ; - } - } - Hex2RGB(p,aoResultRGB); - strcpy(lDefaultHexRGB, p); - if (lPointerInputBox) strcpy(lPointerInputBox, lDialogString); /* restore its previous content to tinyfd_inputBox */ - return lDefaultHexRGB; - } - - if (tinyfd_verbose) printf( "lDialogString: %s\n" , lDialogString ) ; - if ( ! ( lIn = popen( lDialogString , "r" ) ) ) - { - return NULL ; - } - while ( fgets( lBuff , sizeof( lBuff ) , lIn ) != NULL ) - { - } - pclose( lIn ) ; - if ( ! strlen( lBuff ) ) - { - return NULL ; - } - /* printf( "len Buff: %lu\n" , strlen(lBuff) ) ; */ - /* printf( "lBuff0: %s\n" , lBuff ) ; */ - if ( lBuff[strlen( lBuff ) -1] == '\n' ) - { - lBuff[strlen( lBuff ) -1] = '\0' ; - } - - if ( lWasZenity3 ) - { - if ( lBuff[0] == '#' ) - { - if ( strlen(lBuff)>7 ) - { - lBuff[3]=lBuff[5]; - lBuff[4]=lBuff[6]; - lBuff[5]=lBuff[9]; - lBuff[6]=lBuff[10]; - lBuff[7]='\0'; - } - Hex2RGB(lBuff,aoResultRGB); - } - else if ( lBuff[3] == '(' ) { -#if (defined(__cplusplus ) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__clang__) - sscanf(lBuff,"rgb(%hhu,%hhu,%hhu", & aoResultRGB[0], & aoResultRGB[1],& aoResultRGB[2]); -#else - aoResultRGB[0] = strtol(lBuff+4, & lTmp2, 10 ); - aoResultRGB[1] = strtol(lTmp2+1, & lTmp2, 10 ); - aoResultRGB[2] = strtol(lTmp2+1, NULL, 10 ); -#endif - RGB2Hex(aoResultRGB,lBuff); - } - else if ( lBuff[4] == '(' ) { -#if (defined(__cplusplus ) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__clang__) - sscanf(lBuff,"rgba(%hhu,%hhu,%hhu", & aoResultRGB[0], & aoResultRGB[1],& aoResultRGB[2]); -#else - aoResultRGB[0] = strtol(lBuff+5, & lTmp2, 10 ); - aoResultRGB[1] = strtol(lTmp2+1, & lTmp2, 10 ); - aoResultRGB[2] = strtol(lTmp2+1, NULL, 10 ); -#endif - RGB2Hex(aoResultRGB,lBuff); - } - } - else if ( lWasOsascript || lWasXdialog ) - { - /* printf( "lBuff: %s\n" , lBuff ) ; */ -#if (defined(__cplusplus ) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__clang__) - sscanf(lBuff,"%hhu %hhu %hhu", & aoResultRGB[0], & aoResultRGB[1],& aoResultRGB[2]); -#else - aoResultRGB[0] = strtol(lBuff, & lTmp2, 10 ); - aoResultRGB[1] = strtol(lTmp2+1, & lTmp2, 10 ); - aoResultRGB[2] = strtol(lTmp2+1, NULL, 10 ); -#endif - RGB2Hex(aoResultRGB,lBuff); - } - else - { - Hex2RGB(lBuff,aoResultRGB); - } - /* printf("%d %d %d\n", aoResultRGB[0],aoResultRGB[1],aoResultRGB[2]); */ - /* printf( "lBuff: %s\n" , lBuff ) ; */ - - strcpy(lDefaultHexRGB,lBuff); - return lDefaultHexRGB ; -} - -#endif /* _WIN32 */ - - -/* -int main( int argc , char * argv[] ) -{ -char const * lTmp; -char const * lTheSaveFileName; -char const * lTheOpenFileName; -char const * lTheSelectFolderName; -char const * lTheHexColor; -char const * lWillBeGraphicMode; -unsigned char lRgbColor[3]; -FILE * lIn; -char lBuffer[1024]; -char lString[1024]; -char const * lFilterPatterns[2] = { "*.txt", "*.text" }; - -tinyfd_verbose = argc - 1; -tinyfd_silent = 1; - -lWillBeGraphicMode = tinyfd_inputBox("tinyfd_query", NULL, NULL); - -strcpy(lBuffer, "v"); -strcat(lBuffer, tinyfd_version); -if (lWillBeGraphicMode) -{ - strcat(lBuffer, "\ngraphic mode: "); -} -else -{ - strcat(lBuffer, "\nconsole mode: "); -} -strcat(lBuffer, tinyfd_response); -strcat(lBuffer, "\n"); -strcat(lBuffer, tinyfd_needs+78); -strcpy(lString, "tinyfiledialogs"); -tinyfd_messageBox(lString, lBuffer, "ok", "info", 0); - -tinyfd_notifyPopup("the title", "the message\n\tfrom outer-space", "info"); - -if (lWillBeGraphicMode && !tinyfd_forceConsole) -{ - tinyfd_forceConsole = ! tinyfd_messageBox("Hello World", - "graphic dialogs [yes] / console mode [no]?", - "yesno", "question", 1); -} - -lTmp = tinyfd_inputBox( - "a password box", "your password will be revealed", NULL); - -if (!lTmp) return 1; - -strcpy(lString, lTmp); - -lTheSaveFileName = tinyfd_saveFileDialog( - "let us save this password", - "passwordFile.txt", - 2, - lFilterPatterns, - NULL); - -if (!lTheSaveFileName) -{ - tinyfd_messageBox( - "Error", - "Save file name is NULL", - "ok", - "error", - 1); - return 1; -} - -lIn = fopen(lTheSaveFileName, "w"); -if (!lIn) -{ - tinyfd_messageBox( - "Error", - "Can not open this file in write mode", - "ok", - "error", - 1); - return 1; -} -fputs(lString, lIn); -fclose(lIn); - -lTheOpenFileName = tinyfd_openFileDialog( - "let us read the password back", - "", - 2, - lFilterPatterns, - NULL, - 0); - -if (!lTheOpenFileName) -{ - tinyfd_messageBox( - "Error", - "Open file name is NULL", - "ok", - "error", - 1); - return 1; -} - -lIn = fopen(lTheOpenFileName, "r"); - -if (!lIn) -{ - tinyfd_messageBox( - "Error", - "Can not open this file in read mode", - "ok", - "error", - 1); - return(1); -} -lBuffer[0] = '\0'; -fgets(lBuffer, sizeof(lBuffer), lIn); -fclose(lIn); - -tinyfd_messageBox("your password is", - lBuffer, "ok", "info", 1); - -lTheSelectFolderName = tinyfd_selectFolderDialog( - "let us just select a directory", NULL); - -if (!lTheSelectFolderName) -{ - tinyfd_messageBox( - "Error", - "Select folder name is NULL", - "ok", - "error", - 1); - return 1; -} - -tinyfd_messageBox("The selected folder is", - lTheSelectFolderName, "ok", "info", 1); - -lTheHexColor = tinyfd_colorChooser( - "choose a nice color", - "#FF0077", - lRgbColor, - lRgbColor); - -if (!lTheHexColor) -{ - tinyfd_messageBox( - "Error", - "hexcolor is NULL", - "ok", - "error", - 1); - return 1; -} - -tinyfd_messageBox("The selected hexcolor is", - lTheHexColor, "ok", "info", 1); - - tinyfd_beep(); - - return 0; -} -*/ - -#ifdef _MSC_VER -#pragma warning(default:4996) -#pragma warning(default:4100) -#pragma warning(default:4706) -#endif diff --git a/FCLauncher/src/main/jni/lwjgl/tinyfd/tinyfiledialogs.h b/FCLauncher/src/main/jni/lwjgl/tinyfd/tinyfiledialogs.h deleted file mode 100644 index c2e8647f..00000000 --- a/FCLauncher/src/main/jni/lwjgl/tinyfd/tinyfiledialogs.h +++ /dev/null @@ -1,307 +0,0 @@ -/* SPDX-License-Identifier: ZLIB -Copyright (c) 2014 - 2023 Guillaume Vareille http://ysengrin.com - -If you are using a C++ compiler to compile tinyfiledialogs.c (maybe renamed with an extension ".cpp") -then comment out << extern "C" >> bellow in this header file) - _________ - / \ tinyfiledialogs.h v3.13.3 [Jul 2, 2023] - |tiny file| Unique header file created [November 9, 2014] - | dialogs | - \____ ___/ http://tinyfiledialogs.sourceforge.net - \| git clone http://git.code.sf.net/p/tinyfiledialogs/code tinyfd - ____________________________________________ -| | -| email: tinyfiledialogs at ysengrin.com | -|____________________________________________| - ________________________________________________________________________________ -| ____________________________________________________________________________ | -| | | | -| | - in tinyfiledialogs, char is UTF-8 by default (since v3.6) | | -| | | | -| | on windows: | | -| | - for UTF-16, use the wchar_t functions at the bottom of the header file | | -| | - _wfopen() requires wchar_t | | -| | | | -| | - but fopen() expects MBCS (not UTF-8) | | -| | - if you want char to be MBCS: set tinyfd_winUtf8 to 0 | | -| | | | -| | - alternatively, tinyfiledialogs provides | | -| | functions to convert between UTF-8, UTF-16 and MBCS | | -| |____________________________________________________________________________| | -|________________________________________________________________________________| - -If you like tinyfiledialogs, please upvote my stackoverflow answer -https://stackoverflow.com/a/47651444 - -- License - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software -in a product, an acknowledgment in the product documentation would be -appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef TINYFILEDIALOGS_H -#define TINYFILEDIALOGS_H - -#ifdef __cplusplus -/* if tinydialogs.c is compiled as C++ code rather than C code, you may need to comment this out - and the corresponding closing bracket near the end of this file. */ -extern "C" { -#endif - -/******************************************************************************************************/ -/**************************************** UTF-8 on Windows ********************************************/ -/******************************************************************************************************/ -#ifdef _WIN32 -/* On windows, if you want to use UTF-8 ( instead of the UTF-16/wchar_t functions at the end of this file ) -Make sure your code is really prepared for UTF-8 (on windows, functions like fopen() expect MBCS and not UTF-8) */ -extern int tinyfd_winUtf8; /* on windows char strings can be 1:UTF-8(default) or 0:MBCS */ -/* for MBCS change this to 0, in tinyfiledialogs.c or in your code */ - -/* Here are some functions to help you convert between UTF-16 UTF-8 MBSC */ -char * tinyfd_utf8toMbcs(char const * aUtf8string); -char * tinyfd_utf16toMbcs(wchar_t const * aUtf16string); -wchar_t * tinyfd_mbcsTo16(char const * aMbcsString); -char * tinyfd_mbcsTo8(char const * aMbcsString); -wchar_t * tinyfd_utf8to16(char const * aUtf8string); -char * tinyfd_utf16to8(wchar_t const * aUtf16string); -#endif -/******************************************************************************************************/ -/******************************************************************************************************/ -/******************************************************************************************************/ - -/************* 3 funtions for C# (you don't need this in C or C++) : */ -char const * tinyfd_getGlobalChar(char const * aCharVariableName); /* returns NULL on error */ -int tinyfd_getGlobalInt(char const * aIntVariableName); /* returns -1 on error */ -int tinyfd_setGlobalInt(char const * aIntVariableName, int aValue); /* returns -1 on error */ -/* aCharVariableName: "tinyfd_version" "tinyfd_needs" "tinyfd_response" - aIntVariableName : "tinyfd_verbose" "tinyfd_silent" "tinyfd_allowCursesDialogs" - "tinyfd_forceConsole" "tinyfd_assumeGraphicDisplay" "tinyfd_winUtf8" -**************/ - - -extern char tinyfd_version[8]; /* contains tinyfd current version number */ -extern char tinyfd_needs[]; /* info about requirements */ -extern int tinyfd_verbose; /* 0 (default) or 1 : on unix, prints the command line calls */ -extern int tinyfd_silent; /* 1 (default) or 0 : on unix, hide errors and warnings from called dialogs */ - -/** Curses dialogs are difficult to use and counter-intuitive. -On windows they are only ascii and still uses the unix backslash ! **/ -extern int tinyfd_allowCursesDialogs; /* 0 (default) or 1 */ - -extern int tinyfd_forceConsole; /* 0 (default) or 1 */ -/* for unix & windows: 0 (graphic mode) or 1 (console mode). -0: try to use a graphic solution, if it fails then it uses console mode. -1: forces all dialogs into console mode even when an X server is present. - if enabled, it can use the package Dialog or dialog.exe. - on windows it only make sense for console applications */ - -extern int tinyfd_assumeGraphicDisplay; /* 0 (default) or 1 */ -/* some systems don't set the environment variable DISPLAY even when a graphic display is present. -set this to 1 to tell tinyfiledialogs to assume the existence of a graphic display */ - -extern char tinyfd_response[1024]; -/* if you pass "tinyfd_query" as aTitle, -the functions will not display the dialogs -but will return 0 for console mode, 1 for graphic mode. -tinyfd_response is then filled with the retain solution. -possible values for tinyfd_response are (all lowercase) -for graphic mode: - windows_wchar windows applescript kdialog zenity zenity3 yad matedialog - shellementary qarma python2-tkinter python3-tkinter python-dbus - perl-dbus gxmessage gmessage xmessage xdialog gdialog dunst -for console mode: - dialog whiptail basicinput no_solution */ - -void tinyfd_beep(void); - -int tinyfd_notifyPopup( - char const * aTitle, /* NULL or "" */ - char const * aMessage, /* NULL or "" may contain \n \t */ - char const * aIconType); /* "info" "warning" "error" */ - /* return has only meaning for tinyfd_query */ - -int tinyfd_messageBox( - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" may contain \n \t */ - char const * aDialogType , /* "ok" "okcancel" "yesno" "yesnocancel" */ - char const * aIconType , /* "info" "warning" "error" "question" */ - int aDefaultButton ) ; - /* 0 for cancel/no , 1 for ok/yes , 2 for no in yesnocancel */ - -char * tinyfd_inputBox( - char const * aTitle , /* NULL or "" */ - char const * aMessage , /* NULL or "" (\n and \t have no effect) */ - char const * aDefaultInput ) ; /* NULL = passwordBox, "" = inputbox */ - /* returns NULL on cancel */ - -char * tinyfd_saveFileDialog( - char const * aTitle , /* NULL or "" */ - char const * aDefaultPathAndFile , /* NULL or "" */ - int aNumOfFilterPatterns , /* 0 (1 in the following example) */ - char const * const * aFilterPatterns , /* NULL or char const * lFilterPatterns[1]={"*.txt"} */ - char const * aSingleFilterDescription ) ; /* NULL or "text files" */ - /* returns NULL on cancel */ - -char * tinyfd_openFileDialog( - char const * aTitle, /* NULL or "" */ - char const * aDefaultPathAndFile, /* NULL or "" */ - int aNumOfFilterPatterns , /* 0 (2 in the following example) */ - char const * const * aFilterPatterns, /* NULL or char const * lFilterPatterns[2]={"*.png","*.jpg"}; */ - char const * aSingleFilterDescription, /* NULL or "image files" */ - int aAllowMultipleSelects ) ; /* 0 or 1 */ - /* in case of multiple files, the separator is | */ - /* returns NULL on cancel */ - -char * tinyfd_selectFolderDialog( - char const * aTitle, /* NULL or "" */ - char const * aDefaultPath); /* NULL or "" */ - /* returns NULL on cancel */ - -char * tinyfd_colorChooser( - char const * aTitle, /* NULL or "" */ - char const * aDefaultHexRGB, /* NULL or "" or "#FF0000" */ - unsigned char const aDefaultRGB[3] , /* unsigned char lDefaultRGB[3] = { 0 , 128 , 255 }; */ - unsigned char aoResultRGB[3] ) ; /* unsigned char lResultRGB[3]; */ - /* aDefaultRGB is used only if aDefaultHexRGB is absent */ - /* aDefaultRGB and aoResultRGB can be the same array */ - /* returns NULL on cancel */ - /* returns the hexcolor as a string "#FF0000" */ - /* aoResultRGB also contains the result */ - - -/************ WINDOWS ONLY SECTION ************************/ -#ifdef _WIN32 - -/* windows only - utf-16 version */ -int tinyfd_notifyPopupW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aMessage, /* NULL or L"" may contain \n \t */ - wchar_t const * aIconType); /* L"info" L"warning" L"error" */ - -/* windows only - utf-16 version */ -int tinyfd_messageBoxW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aMessage, /* NULL or L"" may contain \n \t */ - wchar_t const * aDialogType, /* L"ok" L"okcancel" L"yesno" */ - wchar_t const * aIconType, /* L"info" L"warning" L"error" L"question" */ - int aDefaultButton ); /* 0 for cancel/no , 1 for ok/yes */ - /* returns 0 for cancel/no , 1 for ok/yes */ - -/* windows only - utf-16 version */ -wchar_t * tinyfd_inputBoxW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aMessage, /* NULL or L"" (\n nor \t not respected) */ - wchar_t const * aDefaultInput); /* NULL passwordBox, L"" inputbox */ - -/* windows only - utf-16 version */ -wchar_t * tinyfd_saveFileDialogW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aDefaultPathAndFile, /* NULL or L"" */ - int aNumOfFilterPatterns, /* 0 (1 in the following example) */ - wchar_t const * const * aFilterPatterns, /* NULL or wchar_t const * lFilterPatterns[1]={L"*.txt"} */ - wchar_t const * aSingleFilterDescription); /* NULL or L"text files" */ - /* returns NULL on cancel */ - -/* windows only - utf-16 version */ -wchar_t * tinyfd_openFileDialogW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aDefaultPathAndFile, /* NULL or L"" */ - int aNumOfFilterPatterns , /* 0 (2 in the following example) */ - wchar_t const * const * aFilterPatterns, /* NULL or wchar_t const * lFilterPatterns[2]={L"*.png","*.jpg"} */ - wchar_t const * aSingleFilterDescription, /* NULL or L"image files" */ - int aAllowMultipleSelects ) ; /* 0 or 1 */ - /* in case of multiple files, the separator is | */ - /* returns NULL on cancel */ - -/* windows only - utf-16 version */ -wchar_t * tinyfd_selectFolderDialogW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aDefaultPath); /* NULL or L"" */ - /* returns NULL on cancel */ - -/* windows only - utf-16 version */ -wchar_t * tinyfd_colorChooserW( - wchar_t const * aTitle, /* NULL or L"" */ - wchar_t const * aDefaultHexRGB, /* NULL or L"#FF0000" */ - unsigned char const aDefaultRGB[3], /* unsigned char lDefaultRGB[3] = { 0 , 128 , 255 }; */ - unsigned char aoResultRGB[3]); /* unsigned char lResultRGB[3]; */ - /* returns the hexcolor as a string L"#FF0000" */ - /* aoResultRGB also contains the result */ - /* aDefaultRGB is used only if aDefaultHexRGB is NULL */ - /* aDefaultRGB and aoResultRGB can be the same array */ - /* returns NULL on cancel */ - -#endif /*_WIN32 */ - -#ifdef __cplusplus -} /*extern "C"*/ -#endif - -#endif /* TINYFILEDIALOGS_H */ - -/* - ________________________________________________________________________________ -| ____________________________________________________________________________ | -| | | | -| | on windows: | | -| | - for UTF-16, use the wchar_t functions at the bottom of the header file | | -| | - _wfopen() requires wchar_t | | -| | | | -| | - in tinyfiledialogs, char is UTF-8 by default (since v3.6) | | -| | - but fopen() expects MBCS (not UTF-8) | | -| | - if you want char to be MBCS: set tinyfd_winUtf8 to 0 | | -| | | | -| | - alternatively, tinyfiledialogs provides | | -| | functions to convert between UTF-8, UTF-16 and MBCS | | -| |____________________________________________________________________________| | -|________________________________________________________________________________| - -- This is not for ios nor android (it works in termux though). -- The files can be renamed with extension ".cpp" as the code is 100% compatible C C++ - (just comment out << extern "C" >> in the header file) -- Windows is fully supported from XP to 10 (maybe even older versions) -- C# & LUA via dll, see files in the folder EXTRAS -- OSX supported from 10.4 to latest (maybe even older versions) -- Do not use " and ' as the dialogs will be displayed with a warning - instead of the title, message, etc... -- There's one file filter only, it may contain several patterns. -- If no filter description is provided, - the list of patterns will become the description. -- On windows link against Comdlg32.lib and Ole32.lib - (on windows the no linking claim is a lie) -- On unix: it tries command line calls, so no such need (NO LINKING). -- On unix you need one of the following: - applescript, kdialog, zenity, matedialog, shellementary, qarma, yad, - python (2 or 3)/tkinter/python-dbus (optional), Xdialog - or curses dialogs (opens terminal if running without console). -- One of those is already included on most (if not all) desktops. -- In the absence of those it will use gdialog, gxmessage or whiptail - with a textinputbox. If nothing is found, it switches to basic console input, - it opens a console if needed (requires xterm + bash). -- for curses dialogs you must set tinyfd_allowCursesDialogs=1 -- You can query the type of dialog that will be used (pass "tinyfd_query" as aTitle) -- String memory is preallocated statically for all the returned values. -- File and path names are tested before return, they should be valid. -- tinyfd_forceConsole=1; at run time, forces dialogs into console mode. -- On windows, console mode only make sense for console applications. -- On windows, console mode is not implemented for wchar_T UTF-16. -- Mutiple selects are not possible in console mode. -- The package dialog must be installed to run in curses dialogs in console mode. - It is already installed on most unix systems. -- On osx, the package dialog can be installed via - http://macappstore.org/dialog or http://macports.org -- On windows, for curses dialogs console mode, - dialog.exe should be copied somewhere on your executable path. - It can be found at the bottom of the following page: - http://andrear.altervista.org/home/cdialog.php -*/ diff --git a/FCLauncher/src/main/jni/gl/gl.h b/FCLauncher/src/main/jni/pojav/GL/gl.h similarity index 99% rename from FCLauncher/src/main/jni/gl/gl.h rename to FCLauncher/src/main/jni/pojav/GL/gl.h index a4001d71..522f7906 100644 --- a/FCLauncher/src/main/jni/gl/gl.h +++ b/FCLauncher/src/main/jni/pojav/GL/gl.h @@ -2046,7 +2046,7 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh #else /* GL_GLEXT_LEGACY */ -#include "glext.h" +#include "pojav/GL/glext.h" #endif /* GL_GLEXT_LEGACY */ diff --git a/FCLauncher/src/main/jni/gl/glext.h b/FCLauncher/src/main/jni/pojav/GL/glext.h similarity index 100% rename from FCLauncher/src/main/jni/gl/glext.h rename to FCLauncher/src/main/jni/pojav/GL/glext.h diff --git a/FCLauncher/src/main/jni/pojav/GL/osmesa.h b/FCLauncher/src/main/jni/pojav/GL/osmesa.h new file mode 100644 index 00000000..96b0533d --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/GL/osmesa.h @@ -0,0 +1,332 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + + +/* + * Mesa Off-Screen rendering interface. + * + * This is an operating system and window system independent interface to + * Mesa which allows one to render images into a client-supplied buffer in + * main memory. Such images may manipulated or saved in whatever way the + * client wants. + * + * These are the API functions: + * OSMesaCreateContext - create a new Off-Screen Mesa rendering context + * OSMesaMakeCurrent - bind an OSMesaContext to a client's image buffer + * and make the specified context the current one. + * OSMesaDestroyContext - destroy an OSMesaContext + * OSMesaGetCurrentContext - return thread's current context ID + * OSMesaPixelStore - controls how pixels are stored in image buffer + * OSMesaGetIntegerv - return OSMesa state parameters + * + * + * The limits on the width and height of an image buffer can be retrieved + * via OSMesaGetIntegerv(OSMESA_MAX_WIDTH/OSMESA_MAX_HEIGHT). + */ + + +#ifndef OSMESA_H +#define OSMESA_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +#include "pojav/GL/gl.h" + + +#define OSMESA_MAJOR_VERSION 11 +#define OSMESA_MINOR_VERSION 2 +#define OSMESA_PATCH_VERSION 0 + + + +/* + * Values for the format parameter of OSMesaCreateContext() + * New in version 2.0. + */ +#define OSMESA_COLOR_INDEX GL_COLOR_INDEX +#define OSMESA_RGBA GL_RGBA +#define OSMESA_BGRA 0x1 +#define OSMESA_ARGB 0x2 +#define OSMESA_RGB GL_RGB +#define OSMESA_BGR 0x4 +#define OSMESA_RGB_565 0x5 + + +/* + * OSMesaPixelStore() parameters: + * New in version 2.0. + */ +#define OSMESA_ROW_LENGTH 0x10 +#define OSMESA_Y_UP 0x11 + + +/* + * Accepted by OSMesaGetIntegerv: + */ +#define OSMESA_WIDTH 0x20 +#define OSMESA_HEIGHT 0x21 +#define OSMESA_FORMAT 0x22 +#define OSMESA_TYPE 0x23 +#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */ +#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */ + +/* + * Accepted in OSMesaCreateContextAttrib's attribute list. + */ +#define OSMESA_DEPTH_BITS 0x30 +#define OSMESA_STENCIL_BITS 0x31 +#define OSMESA_ACCUM_BITS 0x32 +#define OSMESA_PROFILE 0x33 +#define OSMESA_CORE_PROFILE 0x34 +#define OSMESA_COMPAT_PROFILE 0x35 +#define OSMESA_CONTEXT_MAJOR_VERSION 0x36 +#define OSMESA_CONTEXT_MINOR_VERSION 0x37 + + +typedef struct osmesa_context *OSMesaContext; + + +/* + * Create an Off-Screen Mesa rendering context. The only attribute needed is + * an RGBA vs Color-Index mode flag. + * + * Input: format - one of OSMESA_COLOR_INDEX, OSMESA_RGBA, OSMESA_BGRA, + * OSMESA_ARGB, OSMESA_RGB, or OSMESA_BGR. + * sharelist - specifies another OSMesaContext with which to share + * display lists. NULL indicates no sharing. + * Return: an OSMesaContext or 0 if error + */ +GLAPI OSMesaContext GLAPIENTRY +OSMesaCreateContext( GLenum format, OSMesaContext sharelist ); + + + +/* + * Create an Off-Screen Mesa rendering context and specify desired + * size of depth buffer, stencil buffer and accumulation buffer. + * If you specify zero for depthBits, stencilBits, accumBits you + * can save some memory. + * + * New in Mesa 3.5 + */ +GLAPI OSMesaContext GLAPIENTRY +OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, + GLint accumBits, OSMesaContext sharelist); + + +/* + * Create an Off-Screen Mesa rendering context with attribute list. + * The list is composed of (attribute, value) pairs and terminated with + * attribute==0. Supported Attributes: + * + * Attributes Values + * -------------------------------------------------------------------------- + * OSMESA_FORMAT OSMESA_RGBA*, OSMESA_BGRA, OSMESA_ARGB, etc. + * OSMESA_DEPTH_BITS 0*, 16, 24, 32 + * OSMESA_STENCIL_BITS 0*, 8 + * OSMESA_ACCUM_BITS 0*, 16 + * OSMESA_PROFILE OSMESA_COMPAT_PROFILE*, OSMESA_CORE_PROFILE + * OSMESA_CONTEXT_MAJOR_VERSION 1*, 2, 3 + * OSMESA_CONTEXT_MINOR_VERSION 0+ + * + * Note: * = default value + * + * We return a context version >= what's specified by OSMESA_CONTEXT_MAJOR/ + * MINOR_VERSION for the given profile. For example, if you request a GL 1.4 + * compat profile, you might get a GL 3.0 compat profile. + * Otherwise, null is returned if the version/profile is not supported. + * + * New in Mesa 11.2 + */ +GLAPI OSMesaContext GLAPIENTRY +OSMesaCreateContextAttribs( const int *attribList, OSMesaContext sharelist ); + + + +/* + * Destroy an Off-Screen Mesa rendering context. + * + * Input: ctx - the context to destroy + */ +GLAPI void GLAPIENTRY +OSMesaDestroyContext( OSMesaContext ctx ); + + + +/* + * Bind an OSMesaContext to an image buffer. The image buffer is just a + * block of memory which the client provides. Its size must be at least + * as large as width*height*sizeof(type). Its address should be a multiple + * of 4 if using RGBA mode. + * + * Image data is stored in the order of glDrawPixels: row-major order + * with the lower-left image pixel stored in the first array position + * (ie. bottom-to-top). + * + * Since the only type initially supported is GL_UNSIGNED_BYTE, if the + * context is in RGBA mode, each pixel will be stored as a 4-byte RGBA + * value. If the context is in color indexed mode, each pixel will be + * stored as a 1-byte value. + * + * If the context's viewport hasn't been initialized yet, it will now be + * initialized to (0,0,width,height). + * + * Input: ctx - the rendering context + * buffer - the image buffer memory + * type - data type for pixel components, only GL_UNSIGNED_BYTE + * supported now + * width, height - size of image buffer in pixels, at least 1 + * Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx, + * invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1, + * width>internal limit or height>internal limit. + */ +GLAPI GLboolean GLAPIENTRY +OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type, + GLsizei width, GLsizei height ); + + + + +/* + * Return the current Off-Screen Mesa rendering context handle. + */ +GLAPI OSMesaContext GLAPIENTRY +OSMesaGetCurrentContext( void ); + + + +/* + * Set pixel store/packing parameters for the current context. + * This is similar to glPixelStore. + * Input: pname - OSMESA_ROW_LENGTH + * specify actual pixels per row in image buffer + * 0 = same as image width (default) + * OSMESA_Y_UP + * zero = Y coordinates increase downward + * non-zero = Y coordinates increase upward (default) + * value - the value for the parameter pname + * + * New in version 2.0. + */ +GLAPI void GLAPIENTRY +OSMesaPixelStore( GLint pname, GLint value ); + + + +/* + * Return an integer value like glGetIntegerv. + * Input: pname - + * OSMESA_WIDTH return current image width + * OSMESA_HEIGHT return current image height + * OSMESA_FORMAT return image format + * OSMESA_TYPE return color component data type + * OSMESA_ROW_LENGTH return row length in pixels + * OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction + * value - pointer to integer in which to return result. + */ +GLAPI void GLAPIENTRY +OSMesaGetIntegerv( GLint pname, GLint *value ); + + + +/* + * Return the depth buffer associated with an OSMesa context. + * Input: c - the OSMesa context + * Output: width, height - size of buffer in pixels + * bytesPerValue - bytes per depth value (2 or 4) + * buffer - pointer to depth buffer values + * Return: GL_TRUE or GL_FALSE to indicate success or failure. + * + * New in Mesa 2.4. + */ +GLAPI GLboolean GLAPIENTRY +OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height, + GLint *bytesPerValue, void **buffer ); + + + +/* + * Return the color buffer associated with an OSMesa context. + * Input: c - the OSMesa context + * Output: width, height - size of buffer in pixels + * format - buffer format (OSMESA_FORMAT) + * buffer - pointer to depth buffer values + * Return: GL_TRUE or GL_FALSE to indicate success or failure. + * + * New in Mesa 3.3. + */ +GLAPI GLboolean GLAPIENTRY +OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height, + GLint *format, void **buffer ); + + + +/** + * This typedef is new in Mesa 6.3. + */ +typedef void (*OSMESAproc)(); + + +/* + * Return pointer to the named function. + * New in Mesa 4.1 + * Return OSMESAproc in 6.3. + */ +GLAPI OSMESAproc GLAPIENTRY +OSMesaGetProcAddress( const char *funcName ); + + + +/** + * Enable/disable color clamping, off by default. + * New in Mesa 6.4.2 + */ +GLAPI void GLAPIENTRY +OSMesaColorClamp(GLboolean enable); + + +/** + * Enable/disable Gallium post-process filters. + * This should be called after a context is created, but before it is + * made current for the first time. After a context has been made + * current, this function has no effect. + * If the enable_value param is zero, the filter is disabled. Otherwise + * the filter is enabled, and the value may control the filter's quality. + * New in Mesa 10.0 + */ +GLAPI void GLAPIENTRY +OSMesaPostprocess(OSMesaContext osmesa, const char *filter, + unsigned enable_value); + + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/FCLauncher/src/main/jni/pojav/bigcoreaffinity.c b/FCLauncher/src/main/jni/pojav/bigcoreaffinity.c new file mode 100644 index 00000000..fe47741b --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/bigcoreaffinity.c @@ -0,0 +1,55 @@ +// +// Created by maks on 19.06.2023. +// + +#define _GNU_SOURCE // we are GNU GPLv3 + +#include +#include +#include +#include +#include +#include +#include + +#define FREQ_MAX 256 +void bigcore_format_cpu_path(char* buffer, unsigned int cpu_core) { + snprintf(buffer, PATH_MAX, "/sys/devices/system/cpu/cpu%i/cpufreq/cpuinfo_max_freq", cpu_core); +} + +void bigcore_set_affinity() { + char path_buffer[PATH_MAX]; + char freq_buffer[FREQ_MAX]; + char* discard; + unsigned long core_freq; + unsigned long max_freq = 0; + unsigned int corecnt = 0; + unsigned int big_core_id = 0; + while(1) { + bigcore_format_cpu_path(path_buffer, corecnt); + int corefreqfd = open(path_buffer, O_RDONLY); + if(corefreqfd != -1) { + ssize_t read_count = read(corefreqfd, freq_buffer, FREQ_MAX); + close(corefreqfd); + freq_buffer[read_count] = 0; + core_freq = strtoul(freq_buffer, &discard, 10); + if(core_freq >= max_freq) { + max_freq = core_freq; + big_core_id = corecnt; + } + }else{ + break; + } + corecnt++; + } + printf("bigcore: big CPU number is %u, frequency %lu Hz\n", big_core_id, max_freq); + cpu_set_t bigcore_affinity_set; + CPU_ZERO(&bigcore_affinity_set); + CPU_SET_S(big_core_id, CPU_SETSIZE, &bigcore_affinity_set); + int result = sched_setaffinity(0, CPU_SETSIZE, &bigcore_affinity_set); + if(result != 0) { + printf("bigcore: setting affinity failed: %s\n", strerror(result)); + }else{ + printf("bigcore: forced current thread onto big core\n"); + } +} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/bridge_tbl.h b/FCLauncher/src/main/jni/pojav/ctxbridges/bridge_tbl.h new file mode 100644 index 00000000..2285273c --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/bridge_tbl.h @@ -0,0 +1,45 @@ +// +// Created by maks on 18.10.2023. +// + +#ifndef POJAVLAUNCHER_BRIDGE_TBL_H +#define POJAVLAUNCHER_BRIDGE_TBL_H + +#include "pojav/ctxbridges/common.h" +#include "pojav/ctxbridges/gl_bridge.h" +#include "pojav/ctxbridges/osm_bridge.h" + +typedef basic_render_window_t* (*br_init_context_t)(basic_render_window_t* share); +typedef void (*br_make_current_t)(basic_render_window_t* bundle); +typedef basic_render_window_t* (*br_get_current_t)(); + +bool (*br_init)() = NULL; +br_init_context_t br_init_context = NULL; +br_make_current_t br_make_current = NULL; +br_get_current_t br_get_current = NULL; +void (*br_swap_buffers)() = NULL; +void (*br_setup_window)() = NULL; +void (*br_swap_interval)(int swapInterval) = NULL; + + +void set_osm_bridge_tbl() { + br_init = osm_init; + br_init_context = (br_init_context_t) osm_init_context; + br_make_current = (br_make_current_t) osm_make_current; + br_get_current = (br_get_current_t) osm_get_current; + br_swap_buffers = osm_swap_buffers; + br_setup_window = osm_setup_window; + br_swap_interval = osm_swap_interval; +} + +void set_gl_bridge_tbl() { + br_init = gl_init; + br_init_context = (br_init_context_t) gl_init_context; + br_make_current = (br_make_current_t) gl_make_current; + br_get_current = (br_get_current_t) gl_get_current; + br_swap_buffers = gl_swap_buffers; + br_setup_window = gl_setup_window; + br_swap_interval = gl_swap_interval; +} + +#endif //POJAVLAUNCHER_BRIDGE_TBL_H diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/common.h b/FCLauncher/src/main/jni/pojav/ctxbridges/common.h new file mode 100644 index 00000000..4fe10aff --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/common.h @@ -0,0 +1,17 @@ +// +// Created by maks on 18.10.2023. +// + +#ifndef POJAVLAUNCHER_COMMON_H +#define POJAVLAUNCHER_COMMON_H + +#define STATE_RENDERER_ALIVE 0 +#define STATE_RENDERER_NEW_WINDOW 1 + +typedef struct { + char state; + struct ANativeWindow *nativeSurface; + struct ANativeWindow *newNativeSurface; +} basic_render_window_t; + +#endif //POJAVLAUNCHER_COMMON_H diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/egl_loader.c b/FCLauncher/src/main/jni/pojav/ctxbridges/egl_loader.c new file mode 100644 index 00000000..ca53001e --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/egl_loader.c @@ -0,0 +1,51 @@ +// +// Created by maks on 21.09.2022. +// +#include +#include +#include +#include "egl_loader.h" + +EGLBoolean (*eglMakeCurrent_p) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); +EGLBoolean (*eglDestroyContext_p) (EGLDisplay dpy, EGLContext ctx); +EGLBoolean (*eglDestroySurface_p) (EGLDisplay dpy, EGLSurface surface); +EGLBoolean (*eglTerminate_p) (EGLDisplay dpy); +EGLBoolean (*eglReleaseThread_p) (void); +EGLContext (*eglGetCurrentContext_p) (void); +EGLDisplay (*eglGetDisplay_p) (NativeDisplayType display); +EGLBoolean (*eglInitialize_p) (EGLDisplay dpy, EGLint *major, EGLint *minor); +EGLBoolean (*eglChooseConfig_p) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); +EGLBoolean (*eglGetConfigAttrib_p) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); +EGLBoolean (*eglBindAPI_p) (EGLenum api); +EGLSurface (*eglCreatePbufferSurface_p) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); +EGLSurface (*eglCreateWindowSurface_p) (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list); +EGLBoolean (*eglSwapBuffers_p) (EGLDisplay dpy, EGLSurface draw); +EGLint (*eglGetError_p) (void); +EGLContext (*eglCreateContext_p) (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list); +EGLBoolean (*eglSwapInterval_p) (EGLDisplay dpy, EGLint interval); +EGLSurface (*eglGetCurrentSurface_p) (EGLint readdraw); + +void dlsym_EGL() { + void* dl_handle = NULL; + if(getenv("POJAVEXEC_EGL")) dl_handle = dlopen(getenv("POJAVEXEC_EGL"), RTLD_LAZY); + if(dl_handle == NULL) dl_handle = dlopen("libEGL.so", RTLD_LAZY); + if(dl_handle == NULL) abort(); + eglBindAPI_p = dlsym(dl_handle,"eglBindAPI"); + eglChooseConfig_p = dlsym(dl_handle, "eglChooseConfig"); + eglCreateContext_p = dlsym(dl_handle, "eglCreateContext"); + eglCreatePbufferSurface_p = dlsym(dl_handle, "eglCreatePbufferSurface"); + eglCreateWindowSurface_p = dlsym(dl_handle, "eglCreateWindowSurface"); + eglDestroyContext_p = dlsym(dl_handle, "eglDestroyContext"); + eglDestroySurface_p = dlsym(dl_handle, "eglDestroySurface"); + eglGetConfigAttrib_p = dlsym(dl_handle, "eglGetConfigAttrib"); + eglGetCurrentContext_p = dlsym(dl_handle, "eglGetCurrentContext"); + eglGetDisplay_p = dlsym(dl_handle, "eglGetDisplay"); + eglGetError_p = dlsym(dl_handle, "eglGetError"); + eglInitialize_p = dlsym(dl_handle, "eglInitialize"); + eglMakeCurrent_p = dlsym(dl_handle, "eglMakeCurrent"); + eglSwapBuffers_p = dlsym(dl_handle, "eglSwapBuffers"); + eglReleaseThread_p = dlsym(dl_handle, "eglReleaseThread"); + eglSwapInterval_p = dlsym(dl_handle, "eglSwapInterval"); + eglTerminate_p = dlsym(dl_handle, "eglTerminate"); + eglGetCurrentSurface_p = dlsym(dl_handle,"eglGetCurrentSurface"); +} diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/egl_loader.h b/FCLauncher/src/main/jni/pojav/ctxbridges/egl_loader.h new file mode 100644 index 00000000..5c761d26 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/egl_loader.h @@ -0,0 +1,29 @@ +// +// Created by maks on 21.09.2022. +// +#include +#ifndef POJAVLAUNCHER_EGL_LOADER_H +#define POJAVLAUNCHER_EGL_LOADER_H + +extern EGLBoolean (*eglMakeCurrent_p) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); +extern EGLBoolean (*eglDestroyContext_p) (EGLDisplay dpy, EGLContext ctx); +extern EGLBoolean (*eglDestroySurface_p) (EGLDisplay dpy, EGLSurface surface); +extern EGLBoolean (*eglTerminate_p) (EGLDisplay dpy); +extern EGLBoolean (*eglReleaseThread_p) (void); +extern EGLContext (*eglGetCurrentContext_p) (void); +extern EGLDisplay (*eglGetDisplay_p) (NativeDisplayType display); +extern EGLBoolean (*eglInitialize_p) (EGLDisplay dpy, EGLint *major, EGLint *minor); +extern EGLBoolean (*eglChooseConfig_p) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); +extern EGLBoolean (*eglGetConfigAttrib_p) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); +extern EGLBoolean (*eglBindAPI_p) (EGLenum api); +extern EGLSurface (*eglCreatePbufferSurface_p) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); +extern EGLSurface (*eglCreateWindowSurface_p) (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list); +extern EGLBoolean (*eglSwapBuffers_p) (EGLDisplay dpy, EGLSurface draw); +extern EGLint (*eglGetError_p) (void); +extern EGLContext (*eglCreateContext_p) (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list); +extern EGLBoolean (*eglSwapInterval_p) (EGLDisplay dpy, EGLint interval); +extern EGLSurface (*eglGetCurrentSurface_p) (EGLint readdraw); + +void dlsym_EGL(); + +#endif //POJAVLAUNCHER_EGL_LOADER_H diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/gl_bridge.c b/FCLauncher/src/main/jni/pojav/ctxbridges/gl_bridge.c new file mode 100644 index 00000000..5b030a27 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/gl_bridge.c @@ -0,0 +1,173 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pojav/environ/environ.h" +#include "gl_bridge.h" +#include "egl_loader.h" + +// +// Created by maks on 17.09.2022. +// + +static const char* g_LogTag = "GLBridge"; +static __thread gl_render_window_t* currentBundle; +static EGLDisplay g_EglDisplay; + +bool gl_init() { + dlsym_EGL(); + g_EglDisplay = eglGetDisplay_p(EGL_DEFAULT_DISPLAY); + if (g_EglDisplay == EGL_NO_DISPLAY) { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", + "eglGetDisplay_p(EGL_DEFAULT_DISPLAY) returned EGL_NO_DISPLAY"); + return false; + } + if (eglInitialize_p(g_EglDisplay, 0, 0) != EGL_TRUE) { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "eglInitialize_p() failed: %04x", + eglGetError_p()); + return false; + } + return true; +} + +gl_render_window_t* gl_get_current() { + return currentBundle; +} + +gl_render_window_t* gl_init_context(gl_render_window_t *share) { + gl_render_window_t* bundle = malloc(sizeof(gl_render_window_t)); + memset(bundle, 0, sizeof(gl_render_window_t)); + EGLint egl_attributes[] = { EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_DEPTH_SIZE, 24, EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_PBUFFER_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE }; + EGLint num_configs = 0; + + if (eglChooseConfig_p(g_EglDisplay, egl_attributes, NULL, 0, &num_configs) != EGL_TRUE) { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "eglChooseConfig_p() failed: %04x", + eglGetError_p()); + free(bundle); + return NULL; + } + if (num_configs == 0) { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "%s", + "eglChooseConfig_p() found no matching config"); + free(bundle); + return NULL; + } + + // Get the first matching config + eglChooseConfig_p(g_EglDisplay, egl_attributes, &bundle->config, 1, &num_configs); + eglGetConfigAttrib_p(g_EglDisplay, bundle->config, EGL_NATIVE_VISUAL_ID, &bundle->format); + + { + EGLBoolean bindResult; + if (strncmp(getenv("POJAV_RENDERER"), "opengles3_desktopgl", 19) == 0) { + printf("EGLBridge: Binding to desktop OpenGL\n"); + bindResult = eglBindAPI_p(EGL_OPENGL_API); + } else { + printf("EGLBridge: Binding to OpenGL ES\n"); + bindResult = eglBindAPI_p(EGL_OPENGL_ES_API); + } + if (!bindResult) printf("EGLBridge: bind failed: %p\n", eglGetError_p()); + } + + int libgl_es = strtol(getenv("LIBGL_ES"), NULL, 0); + if(libgl_es < 0 || libgl_es > INT16_MAX) libgl_es = 2; + const EGLint egl_context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, libgl_es, EGL_NONE }; + bundle->context = eglCreateContext_p(g_EglDisplay, bundle->config, share == NULL ? EGL_NO_CONTEXT : share->context, egl_context_attributes); + + if (bundle->context == EGL_NO_CONTEXT) { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "eglCreateContext_p() finished with error: %04x", + eglGetError_p()); + free(bundle); + return NULL; + } + return bundle; +} + +void gl_swap_surface(gl_render_window_t* bundle) { + if(bundle->nativeSurface != NULL) { + ANativeWindow_release(bundle->nativeSurface); + } + if(bundle->surface != NULL) eglDestroySurface_p(g_EglDisplay, bundle->surface); + if(bundle->newNativeSurface != NULL) { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "Switching to new native surface"); + bundle->nativeSurface = bundle->newNativeSurface; + bundle->newNativeSurface = NULL; + ANativeWindow_acquire(bundle->nativeSurface); + ANativeWindow_setBuffersGeometry(bundle->nativeSurface, 0, 0, bundle->format); + bundle->surface = eglCreateWindowSurface_p(g_EglDisplay, bundle->config, bundle->nativeSurface, NULL); + }else{ + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "No new native surface, switching to 1x1 pbuffer"); + bundle->nativeSurface = NULL; + const EGLint pbuffer_attrs[] = {EGL_WIDTH, 1 , EGL_HEIGHT, 1, EGL_NONE}; + bundle->surface = eglCreatePbufferSurface_p(g_EglDisplay, bundle->config, pbuffer_attrs); + } + //eglMakeCurrent_p(g_EglDisplay, bundle->surface, bundle->surface, bundle->context); +} + +void gl_make_current(gl_render_window_t* bundle) { + if(bundle == NULL) { + if(eglMakeCurrent_p(g_EglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)) { + currentBundle = NULL; + } + return; + } + bool hasSetMainWindow = false; + if(pojav_environ->mainWindowBundle == NULL) { + pojav_environ->mainWindowBundle = (basic_render_window_t*)bundle; + __android_log_print(ANDROID_LOG_INFO, g_LogTag, "Main window bundle is now %p", pojav_environ->mainWindowBundle); + pojav_environ->mainWindowBundle->newNativeSurface = pojav_environ->pojavWindow; + hasSetMainWindow = true; + } + __android_log_print(ANDROID_LOG_INFO, g_LogTag, "Making current, surface=%p, nativeSurface=%p, newNativeSurface=%p", bundle->surface, bundle->nativeSurface, bundle->newNativeSurface); + if(bundle->surface == NULL) { //it likely will be on the first run + gl_swap_surface(bundle); + } + if(eglMakeCurrent_p(g_EglDisplay, bundle->surface, bundle->surface, bundle->context)) { + currentBundle = bundle; + }else { + if(hasSetMainWindow) { + pojav_environ->mainWindowBundle->newNativeSurface = NULL; + gl_swap_surface((gl_render_window_t*)pojav_environ->mainWindowBundle); + pojav_environ->mainWindowBundle = NULL; + } + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "eglMakeCurrent returned with error: %04x", eglGetError_p()); + } + +} + +void gl_swap_buffers() { + if(currentBundle->state == STATE_RENDERER_NEW_WINDOW) { + eglMakeCurrent_p(g_EglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); //detach everything to destroy the old EGLSurface + gl_swap_surface(currentBundle); + eglMakeCurrent_p(g_EglDisplay, currentBundle->surface, currentBundle->surface, currentBundle->context); + currentBundle->state = STATE_RENDERER_ALIVE; + } + if(currentBundle->surface != NULL) + if(!eglSwapBuffers_p(g_EglDisplay, currentBundle->surface) && eglGetError_p() == EGL_BAD_SURFACE) { + eglMakeCurrent_p(g_EglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + currentBundle->newNativeSurface = NULL; + gl_swap_surface(currentBundle); + eglMakeCurrent_p(g_EglDisplay, currentBundle->surface, currentBundle->surface, currentBundle->context); + __android_log_print(ANDROID_LOG_INFO, g_LogTag, "The window has died, awaiting window change"); + } + +} + +void gl_setup_window() { + if(pojav_environ->mainWindowBundle != NULL) { + __android_log_print(ANDROID_LOG_INFO, g_LogTag, "Main window bundle is not NULL, changing state"); + pojav_environ->mainWindowBundle->state = STATE_RENDERER_NEW_WINDOW; + pojav_environ->mainWindowBundle->newNativeSurface = pojav_environ->pojavWindow; + } +} + +void gl_swap_interval(int swapInterval) { + if(pojav_environ->force_vsync) swapInterval = 1; + + eglSwapInterval_p(g_EglDisplay, swapInterval); +} diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/gl_bridge.h b/FCLauncher/src/main/jni/pojav/ctxbridges/gl_bridge.h new file mode 100644 index 00000000..7eef9b55 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/gl_bridge.h @@ -0,0 +1,28 @@ +// +// Created by maks on 17.09.2022. +// +#include +#include +#ifndef POJAVLAUNCHER_GL_BRIDGE_H +#define POJAVLAUNCHER_GL_BRIDGE_H + +typedef struct { + char state; + struct ANativeWindow *nativeSurface; + struct ANativeWindow *newNativeSurface; + EGLConfig config; + EGLint format; + EGLContext context; + EGLSurface surface; +} gl_render_window_t; + +bool gl_init(); +gl_render_window_t* gl_get_current(); +gl_render_window_t* gl_init_context(gl_render_window_t* share); +void gl_make_current(gl_render_window_t* bundle); +void gl_swap_buffers(); +void gl_setup_window(); +void gl_swap_interval(int swapInterval); + + +#endif //POJAVLAUNCHER_GL_BRIDGE_H diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/osm_bridge.c b/FCLauncher/src/main/jni/pojav/ctxbridges/osm_bridge.c new file mode 100644 index 00000000..454202fe --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/osm_bridge.c @@ -0,0 +1,148 @@ +// +// Created by maks on 18.10.2023. +// +#include +#include +#include "pojav/environ/environ.h" +#include +#include "osm_bridge.h" + +static const char* g_LogTag = "GLBridge"; +static __thread osm_render_window_t* currentBundle; +// a tiny buffer for rendering when there's nowhere t render +static char no_render_buffer[4]; +static bool hasSetNoRendererBuffer = false; + +// Its not in a .h file because it is not supposed to be used outsife of this file. +void setNativeWindowSwapInterval(struct ANativeWindow* nativeWindow, int swapInterval); + +bool osm_init() { + dlsym_OSMesa(); + return true; // no more specific initialization required +} + +osm_render_window_t* osm_get_current() { + return currentBundle; +} + +osm_render_window_t* osm_init_context(osm_render_window_t* share) { + osm_render_window_t* render_window = malloc(sizeof(osm_render_window_t)); + if(render_window == NULL) return NULL; + memset(render_window, 0, sizeof(osm_render_window_t)); + OSMesaContext osmesa_share = NULL; + if(share != NULL) osmesa_share = share->context; + OSMesaContext context = OSMesaCreateContext_p(GL_RGBA, osmesa_share); + if(context == NULL) { + free(render_window); + return NULL; + } + render_window->context = context; + return render_window; +} + +void osm_set_no_render_buffer(ANativeWindow_Buffer* buffer) { + buffer->bits = &no_render_buffer; + buffer->width = 1; + buffer->height = 1; + buffer->stride = 0; +} + +void osm_swap_surfaces(osm_render_window_t* bundle) { + if(bundle->nativeSurface != NULL && bundle->newNativeSurface != bundle->nativeSurface) { + if(!bundle->disable_rendering) { + __android_log_print(ANDROID_LOG_INFO, g_LogTag, "Unlocking for cleanup..."); + ANativeWindow_unlockAndPost(bundle->nativeSurface); + } + ANativeWindow_release(bundle->nativeSurface); + } + if(bundle->newNativeSurface != NULL) { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, "Switching to new native surface"); + bundle->nativeSurface = bundle->newNativeSurface; + bundle->newNativeSurface = NULL; + ANativeWindow_acquire(bundle->nativeSurface); + ANativeWindow_setBuffersGeometry(bundle->nativeSurface, 0, 0, WINDOW_FORMAT_RGBX_8888); + bundle->disable_rendering = false; + return; + }else { + __android_log_print(ANDROID_LOG_ERROR, g_LogTag, + "No new native surface, switching to dummy framebuffer"); + bundle->nativeSurface = NULL; + osm_set_no_render_buffer(&bundle->buffer); + bundle->disable_rendering = true; + } + +} + +void osm_release_window() { + currentBundle->newNativeSurface = NULL; + osm_swap_surfaces(currentBundle); +} + +void osm_apply_current_ll() { + ANativeWindow_Buffer* buffer = ¤tBundle->buffer; + OSMesaMakeCurrent_p(currentBundle->context, buffer->bits, GL_UNSIGNED_BYTE, buffer->width, buffer->height); + if(buffer->stride != currentBundle->last_stride) + OSMesaPixelStore_p(OSMESA_ROW_LENGTH, buffer->stride); + currentBundle->last_stride = buffer->stride; +} + +void osm_make_current(osm_render_window_t* bundle) { + if(bundle == NULL) { + //technically this does nothing as its not possible to unbind a context in OSMesa + OSMesaMakeCurrent_p(NULL, NULL, 0, 0, 0); + currentBundle = NULL; + return; + } + bool hasSetMainWindow = false; + currentBundle = bundle; + if(pojav_environ->mainWindowBundle == NULL) { + pojav_environ->mainWindowBundle = (basic_render_window_t*) bundle; + __android_log_print(ANDROID_LOG_INFO, g_LogTag, "Main window bundle is now %p", pojav_environ->mainWindowBundle); + pojav_environ->mainWindowBundle->newNativeSurface = pojav_environ->pojavWindow; + hasSetMainWindow = true; + } + if(bundle->nativeSurface == NULL) { + //prepare the buffer for our first render! + osm_swap_surfaces(bundle); + if(hasSetMainWindow) pojav_environ->mainWindowBundle->state = STATE_RENDERER_ALIVE; + } + if (!hasSetNoRendererBuffer) + { + osm_set_no_render_buffer(&bundle->buffer); + hasSetNoRendererBuffer = true; + } + osm_apply_current_ll(); + OSMesaPixelStore_p(OSMESA_Y_UP,0); +} + +void osm_swap_buffers() { + if(currentBundle->state == STATE_RENDERER_NEW_WINDOW) { + osm_swap_surfaces(currentBundle); + currentBundle->state = STATE_RENDERER_ALIVE; + } + + if(currentBundle->nativeSurface != NULL && !currentBundle->disable_rendering) + if(ANativeWindow_lock(currentBundle->nativeSurface, ¤tBundle->buffer, NULL) != 0) + osm_release_window(); + + osm_apply_current_ll(); + glFinish_p(); // this will force osmesa to write the last rendered image into the buffer + + if(currentBundle->nativeSurface != NULL && !currentBundle->disable_rendering) + if(ANativeWindow_unlockAndPost(currentBundle->nativeSurface) != 0) + osm_release_window(); +} + +void osm_setup_window() { + if(pojav_environ->mainWindowBundle != NULL) { + __android_log_print(ANDROID_LOG_INFO, g_LogTag, "Main window bundle is not NULL, changing state"); + pojav_environ->mainWindowBundle->state = STATE_RENDERER_NEW_WINDOW; + pojav_environ->mainWindowBundle->newNativeSurface = pojav_environ->pojavWindow; + } +} + +void osm_swap_interval(int swapInterval) { + if(pojav_environ->mainWindowBundle != NULL && pojav_environ->mainWindowBundle->nativeSurface != NULL) { + setNativeWindowSwapInterval(pojav_environ->mainWindowBundle->nativeSurface, swapInterval); + } +} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/osm_bridge.h b/FCLauncher/src/main/jni/pojav/ctxbridges/osm_bridge.h new file mode 100644 index 00000000..0fe61080 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/osm_bridge.h @@ -0,0 +1,29 @@ +// +// Created by maks on 18.10.2023. +// +#include +#include +#ifndef POJAVLAUNCHER_OSM_BRIDGE_H +#define POJAVLAUNCHER_OSM_BRIDGE_H +#include "osmesa_loader.h" + + +typedef struct { + char state; + struct ANativeWindow *nativeSurface; + struct ANativeWindow *newNativeSurface; + ANativeWindow_Buffer buffer; + int32_t last_stride; + bool disable_rendering; + OSMesaContext context; +} osm_render_window_t; + +bool osm_init(); +osm_render_window_t* osm_get_current(); +osm_render_window_t* osm_init_context(osm_render_window_t* share); +void osm_make_current(osm_render_window_t* bundle); +void osm_swap_buffers(); +void osm_setup_window(); +void osm_swap_interval(int swapInterval); + +#endif //POJAVLAUNCHER_OSM_BRIDGE_H diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/osmesa_loader.c b/FCLauncher/src/main/jni/pojav/ctxbridges/osmesa_loader.c new file mode 100644 index 00000000..32efcc6f --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/osmesa_loader.c @@ -0,0 +1,45 @@ +// +// Created by maks on 21.09.2022. +// +#include +#include +#include +#include "osmesa_loader.h" +#include "pojav/environ/environ.h" +#include "pojav/virgl/virgl.h" + +GLboolean (*OSMesaMakeCurrent_p) (OSMesaContext ctx, void *buffer, GLenum type, + GLsizei width, GLsizei height); +OSMesaContext (*OSMesaGetCurrentContext_p) (void); +OSMesaContext (*OSMesaCreateContext_p) (GLenum format, OSMesaContext sharelist); +void (*OSMesaDestroyContext_p) (OSMesaContext ctx); +void (*OSMesaPixelStore_p) ( GLint pname, GLint value ); +GLubyte* (*glGetString_p) (GLenum name); +void (*glFinish_p) (void); +void (*glClearColor_p) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +void (*glClear_p) (GLbitfield mask); +void (*glReadPixels_p) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * data); + +void dlsym_OSMesa() { + char* main_path = NULL; + char *fmt = "%s/libOSMesa_8.so"; + if (pojav_environ->config_renderer == RENDERER_VIRGL) { + fmt = "%s/libOSMesa_81.so"; + } + if (asprintf(&main_path, fmt, getenv("POJAV_NATIVEDIR")) == -1) { + abort(); + } + void* dl_handle = NULL; + dl_handle = dlopen(main_path, RTLD_GLOBAL); + if(dl_handle == NULL) abort(); + OSMesaMakeCurrent_p = dlsym(dl_handle, "OSMesaMakeCurrent"); + OSMesaGetCurrentContext_p = dlsym(dl_handle,"OSMesaGetCurrentContext"); + OSMesaCreateContext_p = dlsym(dl_handle, "OSMesaCreateContext"); + OSMesaDestroyContext_p = dlsym(dl_handle, "OSMesaDestroyContext"); + OSMesaPixelStore_p = dlsym(dl_handle,"OSMesaPixelStore"); + glGetString_p = dlsym(dl_handle,"glGetString"); + glClearColor_p = dlsym(dl_handle, "glClearColor"); + glClear_p = dlsym(dl_handle,"glClear"); + glFinish_p = dlsym(dl_handle,"glFinish"); + glReadPixels_p = dlsym(dl_handle,"glReadPixels"); +} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/osmesa_loader.h b/FCLauncher/src/main/jni/pojav/ctxbridges/osmesa_loader.h new file mode 100644 index 00000000..0b41d45c --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/osmesa_loader.h @@ -0,0 +1,22 @@ +// +// Created by maks on 21.09.2022. +// + +#ifndef POJAVLAUNCHER_OSMESA_LOADER_H +#define POJAVLAUNCHER_OSMESA_LOADER_H + +#include "pojav/GL/osmesa.h" + +extern GLboolean (*OSMesaMakeCurrent_p) (OSMesaContext ctx, void *buffer, GLenum type, + GLsizei width, GLsizei height); +extern OSMesaContext (*OSMesaGetCurrentContext_p) (void); +extern OSMesaContext (*OSMesaCreateContext_p) (GLenum format, OSMesaContext sharelist); +extern void (*OSMesaDestroyContext_p) (OSMesaContext ctx); +extern void (*OSMesaPixelStore_p) ( GLint pname, GLint value ); +extern GLubyte* (*glGetString_p) (GLenum name); +extern void (*glFinish_p) (void); +extern void (*glClearColor_p) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +extern void (*glClear_p) (GLbitfield mask); +extern void (*glReadPixels_p) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * data); +void dlsym_OSMesa(); +#endif //POJAVLAUNCHER_OSMESA_LOADER_H diff --git a/FCLauncher/src/main/jni/pojav/ctxbridges/swap_interval_no_egl.c b/FCLauncher/src/main/jni/pojav/ctxbridges/swap_interval_no_egl.c new file mode 100644 index 00000000..580aa9e3 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/ctxbridges/swap_interval_no_egl.c @@ -0,0 +1,243 @@ +// +// Created by maks on 08.11.2023. +// + +#include +#include +#include +#include +#include + +// Taken from https://android.googlesource.com/platform/frameworks/native/+/41abd67/include/ui/egl/android_natives.h +// Might be outdated, if you can find a more recent version please add it there +// region android_native_base_t definition +typedef struct android_native_base_t +{ + /* a magic value defined by the actual EGL native type */ + int magic; + /* the sizeof() of the actual EGL native type */ + int version; + void* reserved[4]; + /* reference-counting interface */ + void (*incRef)(struct android_native_base_t* base); + void (*decRef)(struct android_native_base_t* base); +} android_native_base_t; +// endregion +// region ANativeWindow magic definition +#define ANDROID_NATIVE_MAKE_CONSTANT(a,b,c,d) \ + (((unsigned)(a)<<24)|((unsigned)(b)<<16)|((unsigned)(c)<<8)|(unsigned)(d)) +#define ANDROID_NATIVE_WINDOW_MAGIC \ + ANDROID_NATIVE_MAKE_CONSTANT('_','w','n','d') +// endregion +struct ANativeWindowBuffer; // opaque, actually an internal system struct but we don't use it + +// Taken from https://android.googlesource.com/platform/frameworks/native/+/refs/heads/main/libs/nativewindow/include/system/window.h +// region ANativeWindow struct definition +struct ANativeWindow_real +{ + struct android_native_base_t common; + /* flags describing some attributes of this surface or its updater */ + const uint32_t flags; + /* min swap interval supported by this updated */ + const int minSwapInterval; + /* max swap interval supported by this updated */ + const int maxSwapInterval; + /* horizontal and vertical resolution in DPI */ + const float xdpi; + const float ydpi; + /* Some storage reserved for the OEM's driver. */ + intptr_t oem[4]; + /* + * Set the swap interval for this surface. + * + * Returns 0 on success or -errno on error. + */ + int (*setSwapInterval)(struct ANativeWindow* window, + int interval); + /* + * Hook called by EGL to acquire a buffer. After this call, the buffer + * is not locked, so its content cannot be modified. This call may block if + * no buffers are available. + * + * The window holds a reference to the buffer between dequeueBuffer and + * either queueBuffer or cancelBuffer, so clients only need their own + * reference if they might use the buffer after queueing or canceling it. + * Holding a reference to a buffer after queueing or canceling it is only + * allowed if a specific buffer count has been set. + * + * Returns 0 on success or -errno on error. + * + * XXX: This function is deprecated. It will continue to work for some + * time for binary compatibility, but the new dequeueBuffer function that + * outputs a fence file descriptor should be used in its place. + */ + int (*dequeueBuffer_DEPRECATED)(struct ANativeWindow* window, + struct ANativeWindowBuffer** buffer); + /* + * hook called by EGL to lock a buffer. This MUST be called before modifying + * the content of a buffer. The buffer must have been acquired with + * dequeueBuffer first. + * + * Returns 0 on success or -errno on error. + * + * XXX: This function is deprecated. It will continue to work for some + * time for binary compatibility, but it is essentially a no-op, and calls + * to it should be removed. + */ + int (*lockBuffer_DEPRECATED)(struct ANativeWindow* window, + struct ANativeWindowBuffer* buffer); + /* + * Hook called by EGL when modifications to the render buffer are done. + * This unlocks and post the buffer. + * + * The window holds a reference to the buffer between dequeueBuffer and + * either queueBuffer or cancelBuffer, so clients only need their own + * reference if they might use the buffer after queueing or canceling it. + * Holding a reference to a buffer after queueing or canceling it is only + * allowed if a specific buffer count has been set. + * + * Buffers MUST be queued in the same order than they were dequeued. + * + * Returns 0 on success or -errno on error. + * + * XXX: This function is deprecated. It will continue to work for some + * time for binary compatibility, but the new queueBuffer function that + * takes a fence file descriptor should be used in its place (pass a value + * of -1 for the fence file descriptor if there is no valid one to pass). + */ + int (*queueBuffer_DEPRECATED)(struct ANativeWindow* window, + struct ANativeWindowBuffer* buffer); + /* + * hook used to retrieve information about the native window. + * + * Returns 0 on success or -errno on error. + */ + int (*query)(const struct ANativeWindow* window, + int what, int* value); + /* + * hook used to perform various operations on the surface. + * (*perform)() is a generic mechanism to add functionality to + * ANativeWindow while keeping backward binary compatibility. + * + * DO NOT CALL THIS HOOK DIRECTLY. Instead, use the helper functions + * defined below. + * + * (*perform)() returns -ENOENT if the 'what' parameter is not supported + * by the surface's implementation. + * + * See above for a list of valid operations, such as + * NATIVE_WINDOW_SET_USAGE or NATIVE_WINDOW_CONNECT + */ + int (*perform)(struct ANativeWindow* window, + int operation, ... ); + /* + * Hook used to cancel a buffer that has been dequeued. + * No synchronization is performed between dequeue() and cancel(), so + * either external synchronization is needed, or these functions must be + * called from the same thread. + * + * The window holds a reference to the buffer between dequeueBuffer and + * either queueBuffer or cancelBuffer, so clients only need their own + * reference if they might use the buffer after queueing or canceling it. + * Holding a reference to a buffer after queueing or canceling it is only + * allowed if a specific buffer count has been set. + * + * XXX: This function is deprecated. It will continue to work for some + * time for binary compatibility, but the new cancelBuffer function that + * takes a fence file descriptor should be used in its place (pass a value + * of -1 for the fence file descriptor if there is no valid one to pass). + */ + int (*cancelBuffer_DEPRECATED)(struct ANativeWindow* window, + struct ANativeWindowBuffer* buffer); + /* + * Hook called by EGL to acquire a buffer. This call may block if no + * buffers are available. + * + * The window holds a reference to the buffer between dequeueBuffer and + * either queueBuffer or cancelBuffer, so clients only need their own + * reference if they might use the buffer after queueing or canceling it. + * Holding a reference to a buffer after queueing or canceling it is only + * allowed if a specific buffer count has been set. + * + * The libsync fence file descriptor returned in the int pointed to by the + * fenceFd argument will refer to the fence that must signal before the + * dequeued buffer may be written to. A value of -1 indicates that the + * caller may access the buffer immediately without waiting on a fence. If + * a valid file descriptor is returned (i.e. any value except -1) then the + * caller is responsible for closing the file descriptor. + * + * Returns 0 on success or -errno on error. + */ + int (*dequeueBuffer)(struct ANativeWindow* window, + struct ANativeWindowBuffer** buffer, int* fenceFd); + /* + * Hook called by EGL when modifications to the render buffer are done. + * This unlocks and post the buffer. + * + * The window holds a reference to the buffer between dequeueBuffer and + * either queueBuffer or cancelBuffer, so clients only need their own + * reference if they might use the buffer after queueing or canceling it. + * Holding a reference to a buffer after queueing or canceling it is only + * allowed if a specific buffer count has been set. + * + * The fenceFd argument specifies a libsync fence file descriptor for a + * fence that must signal before the buffer can be accessed. If the buffer + * can be accessed immediately then a value of -1 should be used. The + * caller must not use the file descriptor after it is passed to + * queueBuffer, and the ANativeWindow implementation is responsible for + * closing it. + * + * Returns 0 on success or -errno on error. + */ + int (*queueBuffer)(struct ANativeWindow* window, + struct ANativeWindowBuffer* buffer, int fenceFd); + /* + * Hook used to cancel a buffer that has been dequeued. + * No synchronization is performed between dequeue() and cancel(), so + * either external synchronization is needed, or these functions must be + * called from the same thread. + * + * The window holds a reference to the buffer between dequeueBuffer and + * either queueBuffer or cancelBuffer, so clients only need their own + * reference if they might use the buffer after queueing or canceling it. + * Holding a reference to a buffer after queueing or canceling it is only + * allowed if a specific buffer count has been set. + * + * The fenceFd argument specifies a libsync fence file decsriptor for a + * fence that must signal before the buffer can be accessed. If the buffer + * can be accessed immediately then a value of -1 should be used. + * + * Note that if the client has not waited on the fence that was returned + * from dequeueBuffer, that same fence should be passed to cancelBuffer to + * ensure that future uses of the buffer are preceded by a wait on that + * fence. The caller must not use the file descriptor after it is passed + * to cancelBuffer, and the ANativeWindow implementation is responsible for + * closing it. + * + * Returns 0 on success or -errno on error. + */ + int (*cancelBuffer)(struct ANativeWindow* window, + struct ANativeWindowBuffer* buffer, int fenceFd); +}; +// endregion + +void setNativeWindowSwapInterval(struct ANativeWindow* nativeWindow, int swapInterval) { + if(!getenv("POJAV_VSYNC_IN_ZINK")) { + return; + } + struct ANativeWindow_real* nativeWindowReal = (struct ANativeWindow_real*) nativeWindow; + if(nativeWindowReal->common.magic != ANDROID_NATIVE_WINDOW_MAGIC) { + __android_log_print(ANDROID_LOG_WARN, "SwapIntervalNoEGL", "ANativeWindow magic does not match. Expected %i, got %i", + ANDROID_NATIVE_WINDOW_MAGIC, nativeWindowReal->common.magic); + return; + } + if(nativeWindowReal->common.version != sizeof(struct ANativeWindow_real)) { + __android_log_print(ANDROID_LOG_WARN, "SwapIntervalNoEGL", "ANativeWindow version does not match. Expected %i, got %i", + sizeof(struct ANativeWindow_real), nativeWindowReal->common.version); + return; + } + int error; + if((error = nativeWindowReal->setSwapInterval(nativeWindow, swapInterval)) != 0) { + __android_log_print(ANDROID_LOG_WARN, "SwapIntervalNoEGL", "Failed to set swap interval: %s", strerror(-error)); + } +} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/pojav/egl_bridge.c b/FCLauncher/src/main/jni/pojav/egl_bridge.c new file mode 100644 index 00000000..2d68146c --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/egl_bridge.c @@ -0,0 +1,296 @@ +#include "pojav/egl_bridge.h" +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include "pojav/GL/osmesa.h" +#include "ctxbridges/osmesa_loader.h" +#include "driver_helper/nsbypass.h" + +#ifdef GLES_TEST +#include +#endif + +#include +#include +#include +#include +#include "pojav/environ/environ.h" +#include +#include "ctxbridges/bridge_tbl.h" +#include "ctxbridges/osm_bridge.h" +#include "fcl/include/utils.h" + +#define GLFW_CLIENT_API 0x22001 +/* Consider GLFW_NO_API as Vulkan API */ +#define GLFW_NO_API 0 +#define GLFW_OPENGL_API 0x30001 + +// This means that the function is an external API and that it will be used +#define EXTERNAL_API __attribute__((used)) +// This means that you are forced to have this function/variable for ABI compatibility +#define ABI_COMPAT __attribute__((unused)) + +EGLConfig config; +struct PotatoBridge potatoBridge; + +#include "ctxbridges/egl_loader.h" +#include "ctxbridges/osmesa_loader.h" +#include "pojav/virgl/virgl.h" +#include "fcl/include/fcl_bridge.h" + +#define RENDERER_GL4ES 1 +#define RENDERER_VK_ZINK 2 +#define RENDERER_VULKAN 4 + +EXTERNAL_API void pojavTerminate() { + printf("EGLBridge: Terminating\n"); + + switch (pojav_environ->config_renderer) { + case RENDERER_GL4ES: { + eglMakeCurrent_p(potatoBridge.eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroySurface_p(potatoBridge.eglDisplay, potatoBridge.eglSurface); + eglDestroyContext_p(potatoBridge.eglDisplay, potatoBridge.eglContext); + eglTerminate_p(potatoBridge.eglDisplay); + eglReleaseThread_p(); + + potatoBridge.eglContext = EGL_NO_CONTEXT; + potatoBridge.eglDisplay = EGL_NO_DISPLAY; + potatoBridge.eglSurface = EGL_NO_SURFACE; + } break; + + //case RENDERER_VIRGL: + case RENDERER_VK_ZINK: { + // Nothing to do here + } break; + } +} + +JNIEXPORT void JNICALL +Java_org_lwjgl_glfw_CallbackBridge_setupBridgeWindow(JNIEnv *env, ABI_COMPAT jclass clazz, jobject surface) { + pojav_environ->pojavWindow = ANativeWindow_fromSurface(env, surface); + if(br_setup_window != NULL) br_setup_window(); +} + + +JNIEXPORT void JNICALL +Java_net_kdt_pojavlaunch_utils_JREUtils_releaseBridgeWindow(ABI_COMPAT JNIEnv *env, ABI_COMPAT jclass clazz) { + ANativeWindow_release(pojav_environ->pojavWindow); +} + +EXTERNAL_API void* pojavGetCurrentContext() { + if (pojav_environ->config_renderer == RENDERER_VIRGL) { + return virglGetCurrentContext(); + } + return br_get_current(); +} + +//#define ADRENO_POSSIBLE +#ifdef ADRENO_POSSIBLE +//Checks if your graphics are Adreno. Returns true if your graphics are Adreno, false otherwise or if there was an error +bool checkAdrenoGraphics() { + EGLDisplay eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); + if(eglDisplay == EGL_NO_DISPLAY || eglInitialize(eglDisplay, NULL, NULL) != EGL_TRUE) return false; + EGLint egl_attributes[] = { EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_RED_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_DEPTH_SIZE, 24, EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE }; + EGLint num_configs = 0; + if(eglChooseConfig(eglDisplay, egl_attributes, NULL, 0, &num_configs) != EGL_TRUE || num_configs == 0) { + eglTerminate(eglDisplay); + return false; + } + EGLConfig eglConfig; + eglChooseConfig(eglDisplay, egl_attributes, &eglConfig, 1, &num_configs); + const EGLint egl_context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE }; + EGLContext context = eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, egl_context_attributes); + if(context == EGL_NO_CONTEXT) { + eglTerminate(eglDisplay); + return false; + } + if(eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, context) != EGL_TRUE) { + eglDestroyContext(eglDisplay, context); + eglTerminate(eglDisplay); + } + const char* vendor = glGetString(GL_VENDOR); + const char* renderer = glGetString(GL_RENDERER); + bool is_adreno = false; + if(strcmp(vendor, "Qualcomm") == 0 && strstr(renderer, "Adreno") != NULL) { + is_adreno = true; // TODO: check for Turnip support + } + eglMakeCurrent(eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroyContext(eglDisplay, context); + eglTerminate(eglDisplay); + return is_adreno; +} +void* load_turnip_vulkan() { + if(!checkAdrenoGraphics()) return NULL; + const char* native_dir = getenv("POJAV_NATIVEDIR"); + const char* cache_dir = getenv("TMPDIR"); + if(!linker_ns_load(native_dir)) return NULL; + void* linkerhook = linker_ns_dlopen("liblinkerhook.so", RTLD_LOCAL | RTLD_NOW); + if(linkerhook == NULL) return NULL; + void* turnip_driver_handle = linker_ns_dlopen("libvulkan_freedreno.so", RTLD_LOCAL | RTLD_NOW); + if(turnip_driver_handle == NULL) { + printf("AdrenoSupp: Failed to load Turnip!\n%s\n", dlerror()); + dlclose(linkerhook); + return NULL; + } + void* dl_android = linker_ns_dlopen("libdl_android.so", RTLD_LOCAL | RTLD_LAZY); + if(dl_android == NULL) { + dlclose(linkerhook); + dlclose(turnip_driver_handle); + return NULL; + } + void* android_get_exported_namespace = dlsym(dl_android, "android_get_exported_namespace"); + void (*linkerhook_pass_handles)(void*, void*, void*) = dlsym(linkerhook, "app__pojav_linkerhook_pass_handles"); + if(linkerhook_pass_handles == NULL || android_get_exported_namespace == NULL) { + dlclose(dl_android); + dlclose(linkerhook); + dlclose(turnip_driver_handle); + return NULL; + } + linkerhook_pass_handles(turnip_driver_handle, android_dlopen_ext, android_get_exported_namespace); + void* libvulkan = linker_ns_dlopen_unique(cache_dir, "libvulkan.so", RTLD_LOCAL | RTLD_NOW); + return libvulkan; +} +#endif + +static void set_vulkan_ptr(void* ptr) { + char envval[64]; + sprintf(envval, "%"PRIxPTR, (uintptr_t)ptr); + setenv("VULKAN_PTR", envval, 1); +} + +void load_vulkan() { + if (getenv("VULKAN_DRIVER_SYSTEM") == NULL && + android_get_device_api_level() >= 28) { // the loader does not support below that +#ifdef ADRENO_POSSIBLE + void* result = load_turnip_vulkan(); + if(result != NULL) { + printf("AdrenoSupp: Loaded Turnip, loader address: %p\n", result); + set_vulkan_ptr(result); + return; + } +#endif + } + printf("OSMDroid: loading vulkan regularly...\n"); + void* vulkan_ptr = dlopen("libvulkan.so", RTLD_LAZY | RTLD_LOCAL); + printf("OSMDroid: loaded vulkan, ptr=%p\n", vulkan_ptr); + set_vulkan_ptr(vulkan_ptr); + printVulkanInfo(vulkan_ptr); +} + +int pojavInitOpenGL() { + // Only affects GL4ES as of now + const char *forceVsync = getenv("FORCE_VSYNC"); + if (!strcmp(forceVsync, "true")) + pojav_environ->force_vsync = true; + + // NOTE: Override for now. + const char *renderer = getenv("POJAV_RENDERER"); + if (!strncmp("opengles", renderer, 8)) { + pojav_environ->config_renderer = RENDERER_GL4ES; + set_gl_bridge_tbl(); + } else if (!strcmp(renderer, "gallium_virgl")) { + pojav_environ->config_renderer = RENDERER_VIRGL; + setenv("GALLIUM_DRIVER", "virpipe", 1); + loadSymbolsVirGL(); + virglInit(); + return 0; + } else if (!strcmp(renderer, "vulkan_zink")) { + pojav_environ->config_renderer = RENDERER_VK_ZINK; + load_vulkan(); + setenv("GALLIUM_DRIVER", "zink", 1); + set_osm_bridge_tbl(); + } else if (!strcmp(renderer, "gallium_freedreno")) { + pojav_environ->config_renderer = RENDERER_VK_ZINK; + load_vulkan(); + setenv("GALLIUM_DRIVER", "freedreno", 1); + setenv("MESA_LOADER_DRIVER_OVERRIDE", "kgsl", 1); + set_osm_bridge_tbl(); + } + + if(br_init()) br_setup_window(); + + return 0; +} + +EXTERNAL_API int pojavInit() { + ANativeWindow_acquire(pojav_environ->pojavWindow); + pojav_environ->savedWidth = ANativeWindow_getWidth(pojav_environ->pojavWindow); + pojav_environ->savedHeight = ANativeWindow_getHeight(pojav_environ->pojavWindow); + ANativeWindow_setBuffersGeometry(pojav_environ->pojavWindow,pojav_environ->savedWidth,pojav_environ->savedHeight,AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM); + pojavInitOpenGL(); + return 1; +} + +EXTERNAL_API void pojavSetWindowHint(int hint, int value) { + if (hint != GLFW_CLIENT_API) return; + switch (value) { + case GLFW_NO_API: + pojav_environ->config_renderer = RENDERER_VULKAN; + /* Nothing to do: initialization is handled in Java-side */ + // pojavInitVulkan(); + break; + case GLFW_OPENGL_API: + /* Nothing to do: initialization is called in pojavCreateContext */ + // pojavInitOpenGL(); + break; + default: + printf("GLFW: Unimplemented API 0x%x\n", value); + abort(); + } +} + +EXTERNAL_API void pojavSwapBuffers() { + if (pojav_environ->config_renderer == RENDERER_VIRGL) + virglSwapBuffers(); + else br_swap_buffers(); +} + + +EXTERNAL_API void pojavMakeCurrent(void* window) { + if (pojav_environ->config_renderer == RENDERER_VIRGL) + virglMakeCurrent(window); + else br_make_current((basic_render_window_t*)window); +} + +EXTERNAL_API void* pojavCreateContext(void* contextSrc) { + if (pojav_environ->config_renderer == RENDERER_VULKAN) + return (void *) pojav_environ->pojavWindow; + + if (pojav_environ->config_renderer == RENDERER_VIRGL) + return virglCreateContext(contextSrc); + + return br_init_context((basic_render_window_t*)contextSrc); +} + +EXTERNAL_API JNIEXPORT jlong JNICALL +Java_org_lwjgl_vulkan_VK_getVulkanDriverHandle(ABI_COMPAT JNIEnv *env, ABI_COMPAT jclass thiz) { + printf("EGLBridge: LWJGL-side Vulkan loader requested the Vulkan handle\n"); + // The code below still uses the env var because + // 1. it's easier to do that + // 2. it won't break if something will try to load vulkan and osmesa simultaneously + if(getenv("VULKAN_PTR") == NULL) load_vulkan(); + return strtoul(getenv("VULKAN_PTR"), NULL, 0x10); +} + +EXTERNAL_API void pojavSwapInterval(int interval) { + if (pojav_environ->config_renderer == RENDERER_VIRGL) + virglSwapInterval(interval); + else br_swap_interval(interval); +} + +EXTERNAL_API void pojavSetInjectorCallback(FCLinjectorfun callback) { + fclSetInjectorCallback(callback); +} + +EXTERNAL_API void pojavSetHitResultType(int type) { + fclSetHitResultType(type); +} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/pojav/egl_bridge.h b/FCLauncher/src/main/jni/pojav/egl_bridge.h new file mode 100644 index 00000000..7d239f27 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/egl_bridge.h @@ -0,0 +1,23 @@ +// +// Created by mio on 2024/8/20. +// + +#ifndef FOLD_CRAFT_LAUNCHER_EGL_BRIDGE_H +#define FOLD_CRAFT_LAUNCHER_EGL_BRIDGE_H + +#include + +struct PotatoBridge { + + /* EGLContext */ void* eglContext; + /* EGLDisplay */ void* eglDisplay; + /* EGLSurface */ void* eglSurface; +/* + void* eglSurfaceRead; + void* eglSurfaceDraw; +*/ +}; +extern EGLConfig config; +extern struct PotatoBridge potatoBridge; + +#endif //FOLD_CRAFT_LAUNCHER_EGL_BRIDGE_H diff --git a/FCLauncher/src/main/jni/pojav/environ/environ.c b/FCLauncher/src/main/jni/pojav/environ/environ.c new file mode 100644 index 00000000..0fc04b5d --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/environ/environ.c @@ -0,0 +1,28 @@ +// +// Created by maks on 24.09.2022. +// + +#include +#include +#include +#include +#include "environ.h" + +struct pojav_environ_s *pojav_environ; + +__attribute__((constructor)) void env_init() { + char *strptr_env = getenv("POJAV_ENVIRON"); + if (strptr_env == NULL) { + __android_log_print(ANDROID_LOG_INFO, "Environ", "No Pojav environ found, creating..."); + pojav_environ = malloc(sizeof(struct pojav_environ_s)); + assert(pojav_environ); + memset(pojav_environ, 0, sizeof(struct pojav_environ_s)); + if (asprintf(&strptr_env, "%p", pojav_environ) == -1) abort(); + setenv("POJAV_ENVIRON", strptr_env, 1); + free(strptr_env); + } else { + __android_log_print(ANDROID_LOG_INFO, "Environ", "Foun Pojavd existing environ: %s", strptr_env); + pojav_environ = (void *) strtoul(strptr_env, NULL, 0x10); + } + __android_log_print(ANDROID_LOG_INFO, "Environ", "%p", pojav_environ); +} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/pojav/environ/environ.h b/FCLauncher/src/main/jni/pojav/environ/environ.h new file mode 100644 index 00000000..d63310dc --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/environ/environ.h @@ -0,0 +1,77 @@ +// +// Created by maks on 24.09.2022. +// + +#ifndef POJAVLAUNCHER_ENVIRON_H +#define POJAVLAUNCHER_ENVIRON_H + +#include "pojav/ctxbridges/common.h" +#include +#include + +/* How many events can be handled at the same time */ +#define EVENT_WINDOW_SIZE 8000 + +typedef struct { + int type; + int i1; + int i2; + int i3; + int i4; +} GLFWInputEvent; + +typedef void GLFW_invoke_Char_func(void* window, unsigned int codepoint); +typedef void GLFW_invoke_CharMods_func(void* window, unsigned int codepoint, int mods); +typedef void GLFW_invoke_CursorEnter_func(void* window, int entered); +typedef void GLFW_invoke_CursorPos_func(void* window, double xpos, double ypos); +typedef void GLFW_invoke_FramebufferSize_func(void* window, int width, int height); +typedef void GLFW_invoke_Key_func(void* window, int key, int scancode, int action, int mods); +typedef void GLFW_invoke_MouseButton_func(void* window, int button, int action, int mods); +typedef void GLFW_invoke_Scroll_func(void* window, double xoffset, double yoffset); +typedef void GLFW_invoke_WindowSize_func(void* window, int width, int height); + +struct pojav_environ_s { + struct ANativeWindow* pojavWindow; + basic_render_window_t* mainWindowBundle; + int config_renderer; + bool force_vsync; + atomic_size_t eventCounter; // Count the number of events to be pumped out + GLFWInputEvent events[EVENT_WINDOW_SIZE]; + size_t outEventIndex; // Point to the current event that has yet to be pumped out to MC + size_t outTargetIndex; // Point to the newt index to stop by + size_t inEventIndex; // Point to the next event that has to be filled + size_t inEventCount; // Count registered right before pumping OUT events. Used as a cache. + double cursorX, cursorY, cLastX, cLastY; + jmethodID method_accessAndroidClipboard; + jmethodID method_onGrabStateChanged; + jmethodID method_glftSetWindowAttrib; + jmethodID method_internalWindowSizeChanged; + jclass bridgeClazz; + jclass vmGlfwClass; + jboolean isGrabbing; + jbyte* keyDownBuffer; + jbyte* mouseDownBuffer; + JavaVM* runtimeJavaVMPtr; + JNIEnv* runtimeJNIEnvPtr_JRE; + JavaVM* dalvikJavaVMPtr; + JNIEnv* dalvikJNIEnvPtr_ANDROID; + long showingWindow; + bool isInputReady, isCursorEntered, isUseStackQueueCall, isPumpingEvents; + int savedWidth, savedHeight; +#define ADD_CALLBACK_WWIN(NAME) \ + GLFW_invoke_##NAME##_func* GLFW_invoke_##NAME; + ADD_CALLBACK_WWIN(Char); + ADD_CALLBACK_WWIN(CharMods); + ADD_CALLBACK_WWIN(CursorEnter); + ADD_CALLBACK_WWIN(CursorPos); + ADD_CALLBACK_WWIN(FramebufferSize); + ADD_CALLBACK_WWIN(Key); + ADD_CALLBACK_WWIN(MouseButton); + ADD_CALLBACK_WWIN(Scroll); + ADD_CALLBACK_WWIN(WindowSize); + +#undef ADD_CALLBACK_WWIN +}; +extern struct pojav_environ_s *pojav_environ; + +#endif //POJAVLAUNCHER_ENVIRON_H diff --git a/FCLauncher/src/main/jni/pojav/input_bridge_v3.c b/FCLauncher/src/main/jni/pojav/input_bridge_v3.c new file mode 100644 index 00000000..a5368569 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/input_bridge_v3.c @@ -0,0 +1,638 @@ +/* + * V3 input bridge implementation. + * + * Status: + * - Active development + * - Works with some bugs: + * + Modded versions gives broken stuff.. + * + * + * - Implements glfwSetCursorPos() to handle grab camera pos correctly. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "environ/environ.h" +#include "fcl/include/fcl_internal.h" + +#define EVENT_TYPE_CHAR 1000 +#define EVENT_TYPE_CHAR_MODS 1001 +#define EVENT_TYPE_CURSOR_ENTER 1002 +#define EVENT_TYPE_FRAMEBUFFER_SIZE 1004 +#define EVENT_TYPE_KEY 1005 +#define EVENT_TYPE_MOUSE_BUTTON 1006 +#define EVENT_TYPE_SCROLL 1007 +#define EVENT_TYPE_WINDOW_SIZE 1008 + +jint (*orig_ProcessImpl_forkAndExec)(JNIEnv *env, jobject process, jint mode, jbyteArray helperpath, jbyteArray prog, jbyteArray argBlock, jint argc, jbyteArray envBlock, jint envc, jbyteArray dir, jintArray std_fds, jboolean redirectErrorStream); + +static void registerFunctions(JNIEnv *env); + +void hookExec(); +void installLinkerBugMitigation(); +void installEMUIIteratorMititgation(); +JNIEXPORT jstring JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeClipboard(JNIEnv* env, jclass clazz, jint action, jbyteArray copySrc); + +jint JNI_OnLoad(JavaVM* vm, __attribute__((unused)) void* reserved) { + if (pojav_environ->dalvikJavaVMPtr == NULL) { + __android_log_print(ANDROID_LOG_INFO, "Native", "Saving DVM environ..."); + //Save dalvik global JavaVM pointer + pojav_environ->dalvikJavaVMPtr = vm; + (*vm)->GetEnv(vm, (void**) &pojav_environ->dalvikJNIEnvPtr_ANDROID, JNI_VERSION_1_4); + pojav_environ->bridgeClazz = (*pojav_environ->dalvikJNIEnvPtr_ANDROID)->NewGlobalRef(pojav_environ->dalvikJNIEnvPtr_ANDROID,(*pojav_environ->dalvikJNIEnvPtr_ANDROID) ->FindClass(pojav_environ->dalvikJNIEnvPtr_ANDROID,"org/lwjgl/glfw/CallbackBridge")); + pojav_environ->method_accessAndroidClipboard = (*pojav_environ->dalvikJNIEnvPtr_ANDROID)->GetStaticMethodID(pojav_environ->dalvikJNIEnvPtr_ANDROID, pojav_environ->bridgeClazz, "accessAndroidClipboard", "(ILjava/lang/String;)Ljava/lang/String;"); + pojav_environ->method_onGrabStateChanged = (*pojav_environ->dalvikJNIEnvPtr_ANDROID)->GetStaticMethodID(pojav_environ->dalvikJNIEnvPtr_ANDROID, pojav_environ->bridgeClazz, "onGrabStateChanged", "(Z)V"); + pojav_environ->isUseStackQueueCall = JNI_FALSE; + } else if (pojav_environ->dalvikJavaVMPtr != vm) { + __android_log_print(ANDROID_LOG_INFO, "Native", "Saving JVM environ..."); + pojav_environ->runtimeJavaVMPtr = vm; + (*vm)->GetEnv(vm, (void**) &pojav_environ->runtimeJNIEnvPtr_JRE, JNI_VERSION_1_4); + pojav_environ->vmGlfwClass = (*pojav_environ->runtimeJNIEnvPtr_JRE)->NewGlobalRef(pojav_environ->runtimeJNIEnvPtr_JRE, (*pojav_environ->runtimeJNIEnvPtr_JRE)->FindClass(pojav_environ->runtimeJNIEnvPtr_JRE, "org/lwjgl/glfw/GLFW")); + pojav_environ->method_glftSetWindowAttrib = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetStaticMethodID(pojav_environ->runtimeJNIEnvPtr_JRE, pojav_environ->vmGlfwClass, "glfwSetWindowAttrib", "(JII)V"); + pojav_environ->method_internalWindowSizeChanged = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetStaticMethodID(pojav_environ->runtimeJNIEnvPtr_JRE, pojav_environ->vmGlfwClass, "internalWindowSizeChanged", "(JII)V"); + jfieldID field_keyDownBuffer = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetStaticFieldID(pojav_environ->runtimeJNIEnvPtr_JRE, pojav_environ->vmGlfwClass, "keyDownBuffer", "Ljava/nio/ByteBuffer;"); + jobject keyDownBufferJ = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetStaticObjectField(pojav_environ->runtimeJNIEnvPtr_JRE, pojav_environ->vmGlfwClass, field_keyDownBuffer); + pojav_environ->keyDownBuffer = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetDirectBufferAddress(pojav_environ->runtimeJNIEnvPtr_JRE, keyDownBufferJ); + jfieldID field_mouseDownBuffer = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetStaticFieldID(pojav_environ->runtimeJNIEnvPtr_JRE, pojav_environ->vmGlfwClass, "mouseDownBuffer", "Ljava/nio/ByteBuffer;"); + jobject mouseDownBufferJ = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetStaticObjectField(pojav_environ->runtimeJNIEnvPtr_JRE, pojav_environ->vmGlfwClass, field_mouseDownBuffer); + pojav_environ->mouseDownBuffer = (*pojav_environ->runtimeJNIEnvPtr_JRE)->GetDirectBufferAddress(pojav_environ->runtimeJNIEnvPtr_JRE, mouseDownBufferJ); + hookExec(); + installLinkerBugMitigation(); + installEMUIIteratorMititgation(); + } + + if(pojav_environ->dalvikJavaVMPtr == vm) { + //perform in all DVM instances, not only during first ever set up + JNIEnv *env; + (*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_4); + registerFunctions(env); + } + pojav_environ->isGrabbing = JNI_FALSE; + + return JNI_VERSION_1_4; +} + +#define ADD_CALLBACK_WWIN(NAME) \ +JNIEXPORT jlong JNICALL Java_org_lwjgl_glfw_GLFW_nglfwSet##NAME##Callback(JNIEnv * env, jclass cls, jlong window, jlong callbackptr) { \ + void** oldCallback = (void**) &pojav_environ->GLFW_invoke_##NAME; \ + pojav_environ->GLFW_invoke_##NAME = (GLFW_invoke_##NAME##_func*) (uintptr_t) callbackptr; \ + return (jlong) (uintptr_t) *oldCallback; \ +} + +ADD_CALLBACK_WWIN(Char) +ADD_CALLBACK_WWIN(CharMods) +ADD_CALLBACK_WWIN(CursorEnter) +ADD_CALLBACK_WWIN(CursorPos) +ADD_CALLBACK_WWIN(FramebufferSize) +ADD_CALLBACK_WWIN(Key) +ADD_CALLBACK_WWIN(MouseButton) +ADD_CALLBACK_WWIN(Scroll) +ADD_CALLBACK_WWIN(WindowSize) + +#undef ADD_CALLBACK_WWIN + +void handleFramebufferSizeJava(long window, int w, int h) { + (*pojav_environ->runtimeJNIEnvPtr_JRE)->CallStaticVoidMethod(pojav_environ->runtimeJNIEnvPtr_JRE, pojav_environ->vmGlfwClass, pojav_environ->method_internalWindowSizeChanged, (long)window, w, h); +} + +void pojavPumpEvents(void* window) { + if(pojav_environ->isPumpingEvents) return; + // prevent further calls until we exit the loop + // by spec, they will be called on the same thread so no synchronization here + pojav_environ->isPumpingEvents = true; + + if((pojav_environ->cLastX != pojav_environ->cursorX || pojav_environ->cLastY != pojav_environ->cursorY) && pojav_environ->GLFW_invoke_CursorPos) { + pojav_environ->cLastX = pojav_environ->cursorX; + pojav_environ->cLastY = pojav_environ->cursorY; + pojav_environ->GLFW_invoke_CursorPos(window, floor(pojav_environ->cursorX), + floor(pojav_environ->cursorY)); + } + + size_t index = pojav_environ->outEventIndex; + size_t targetIndex = pojav_environ->outTargetIndex; + + while (targetIndex != index) { + GLFWInputEvent event = pojav_environ->events[index]; + switch (event.type) { + case EVENT_TYPE_CHAR: + if(pojav_environ->GLFW_invoke_Char) pojav_environ->GLFW_invoke_Char(window, event.i1); + break; + case EVENT_TYPE_CHAR_MODS: + if(pojav_environ->GLFW_invoke_CharMods) pojav_environ->GLFW_invoke_CharMods(window, event.i1, event.i2); + break; + case EVENT_TYPE_KEY: + if(pojav_environ->GLFW_invoke_Key) pojav_environ->GLFW_invoke_Key(window, event.i1, event.i2, event.i3, event.i4); + break; + case EVENT_TYPE_MOUSE_BUTTON: + if(pojav_environ->GLFW_invoke_MouseButton) pojav_environ->GLFW_invoke_MouseButton(window, event.i1, event.i2, event.i3); + break; + case EVENT_TYPE_SCROLL: + if(pojav_environ->GLFW_invoke_Scroll) pojav_environ->GLFW_invoke_Scroll(window, event.i1, event.i2); + break; + case EVENT_TYPE_FRAMEBUFFER_SIZE: + handleFramebufferSizeJava(pojav_environ->showingWindow, event.i1, event.i2); + if(pojav_environ->GLFW_invoke_FramebufferSize) pojav_environ->GLFW_invoke_FramebufferSize(window, event.i1, event.i2); + break; + case EVENT_TYPE_WINDOW_SIZE: + handleFramebufferSizeJava(pojav_environ->showingWindow, event.i1, event.i2); + if(pojav_environ->GLFW_invoke_WindowSize) pojav_environ->GLFW_invoke_WindowSize(window, event.i1, event.i2); + break; + } + + index++; + if (index >= EVENT_WINDOW_SIZE) + index -= EVENT_WINDOW_SIZE; + } + + // The out target index is updated by the rewinder + pojav_environ->isPumpingEvents = false; +} + +/** Setup the amount of event that will get pumped into each window */ +void pojavComputeEventTarget() { + size_t counter = atomic_load_explicit(&pojav_environ->eventCounter, memory_order_acquire); + size_t index = pojav_environ->outEventIndex; + + unsigned targetIndex = index + counter; + if (targetIndex >= EVENT_WINDOW_SIZE) + targetIndex -= EVENT_WINDOW_SIZE; + + // Only accessed by one unique thread, no need for atomic store + pojav_environ->inEventCount = counter; + pojav_environ->outTargetIndex = targetIndex; +} + +/** Apply index offsets after events have been pumped */ +void pojavRewindEvents() { + pojav_environ->outEventIndex = pojav_environ->outTargetIndex; + + // New events may have arrived while pumping, so remove only the difference before the start and end of execution + atomic_fetch_sub_explicit(&pojav_environ->eventCounter, pojav_environ->inEventCount, memory_order_acquire); +} + +JNIEXPORT void JNICALL +Java_org_lwjgl_glfw_GLFW_nglfwGetCursorPos(JNIEnv *env, __attribute__((unused)) jclass clazz, __attribute__((unused)) jlong window, jobject xpos, + jobject ypos) { + *(double*)(*env)->GetDirectBufferAddress(env, xpos) = pojav_environ->cursorX; + *(double*)(*env)->GetDirectBufferAddress(env, ypos) = pojav_environ->cursorY; +} + +JNIEXPORT void JNICALL JavaCritical_org_lwjgl_glfw_GLFW_nglfwGetCursorPosA(__attribute__((unused)) jlong window, jint lengthx, jdouble* xpos, jint lengthy, jdouble* ypos) { + *xpos = pojav_environ->cursorX; + *ypos = pojav_environ->cursorY; +} + +JNIEXPORT void JNICALL +Java_org_lwjgl_glfw_GLFW_nglfwGetCursorPosA(JNIEnv *env, __attribute__((unused)) jclass clazz, __attribute__((unused)) jlong window, + jdoubleArray xpos, jdoubleArray ypos) { + (*env)->SetDoubleArrayRegion(env, xpos, 0,1, &pojav_environ->cursorX); + (*env)->SetDoubleArrayRegion(env, ypos, 0,1, &pojav_environ->cursorY); +} + +JNIEXPORT void JNICALL JavaCritical_org_lwjgl_glfw_GLFW_glfwSetCursorPos(__attribute__((unused)) jlong window, jdouble xpos, + jdouble ypos) { + pojav_environ->cLastX = pojav_environ->cursorX = xpos; + pojav_environ->cLastY = pojav_environ->cursorY = ypos; +} + +JNIEXPORT void JNICALL +Java_org_lwjgl_glfw_GLFW_glfwSetCursorPos(__attribute__((unused)) JNIEnv *env, __attribute__((unused)) jclass clazz, __attribute__((unused)) jlong window, jdouble xpos, + jdouble ypos) { + JavaCritical_org_lwjgl_glfw_GLFW_glfwSetCursorPos(window, xpos, ypos); +} + + + +void sendData(int type, int i1, int i2, int i3, int i4) { + GLFWInputEvent *event = &pojav_environ->events[pojav_environ->inEventIndex]; + event->type = type; + event->i1 = i1; + event->i2 = i2; + event->i3 = i3; + event->i4 = i4; + + if (++pojav_environ->inEventIndex >= EVENT_WINDOW_SIZE) + pojav_environ->inEventIndex -= EVENT_WINDOW_SIZE; + + atomic_fetch_add_explicit(&pojav_environ->eventCounter, 1, memory_order_acquire); +} + +/** + * Hooked version of java.lang.UNIXProcess.forkAndExec() + * which is used to handle the "open" command. + */ +jint +hooked_ProcessImpl_forkAndExec(JNIEnv *env, jobject process, jint mode, jbyteArray helperpath, jbyteArray prog, jbyteArray argBlock, jint argc, jbyteArray envBlock, jint envc, jbyteArray dir, jintArray std_fds, jboolean redirectErrorStream) { + char *pProg = (char *)((*env)->GetByteArrayElements(env, prog, NULL)); + + // Here we only handle the "xdg-open" command + if (strcmp(basename(pProg), "xdg-open") != 0) { + (*env)->ReleaseByteArrayElements(env, prog, (jbyte *)pProg, 0); + return orig_ProcessImpl_forkAndExec(env, process, mode, helperpath, prog, argBlock, argc, envBlock, envc, dir, std_fds, redirectErrorStream); + } + (*env)->ReleaseByteArrayElements(env, prog, (jbyte *)pProg, 0); + + Java_org_lwjgl_glfw_CallbackBridge_nativeClipboard(env, NULL, /* CLIPBOARD_OPEN */ 2002, argBlock); + return 0; +} + +void hookExec() { + jclass cls; + orig_ProcessImpl_forkAndExec = dlsym(RTLD_DEFAULT, "Java_java_lang_UNIXProcess_forkAndExec"); + if (!orig_ProcessImpl_forkAndExec) { + orig_ProcessImpl_forkAndExec = dlsym(RTLD_DEFAULT, "Java_java_lang_ProcessImpl_forkAndExec"); + cls = (*pojav_environ->runtimeJNIEnvPtr_JRE)->FindClass(pojav_environ->runtimeJNIEnvPtr_JRE, "java/lang/ProcessImpl"); + } else { + cls = (*pojav_environ->runtimeJNIEnvPtr_JRE)->FindClass(pojav_environ->runtimeJNIEnvPtr_JRE, "java/lang/UNIXProcess"); + } + JNINativeMethod methods[] = { + {"forkAndExec", "(I[B[B[BI[BI[B[IZ)I", (void *)&hooked_ProcessImpl_forkAndExec} + }; + (*pojav_environ->runtimeJNIEnvPtr_JRE)->RegisterNatives(pojav_environ->runtimeJNIEnvPtr_JRE, cls, methods, 1); + printf("Registered forkAndExec\n"); +} + +/** + * Basically a verbatim implementation of ndlopen(), found at + * https://github.com/PojavLauncherTeam/lwjgl3/blob/3.3.1/modules/lwjgl/core/src/generated/c/linux/org_lwjgl_system_linux_DynamicLinkLoader.c#L11 + * The idea is that since, on Android 10 and earlier, the linker doesn't really do namespace nesting. + * It is not a problem as most of the libraries are in the launcher path, but when you try to run + * VulkanMod which loads shaderc outside of the default jni libs directory through this method, + * it can't load it because the path is not in the allowed paths for the anonymous namesapce. + * This method fixes the issue by being in libpojavexec, and thus being in the classloader namespace + */ +jlong ndlopen_bugfix(__attribute__((unused)) JNIEnv *env, + __attribute__((unused)) jclass class, + jlong filename_ptr, + jint jmode) { + const char* filename = (const char*) filename_ptr; + int mode = (int)jmode; + return (jlong) dlopen(filename, mode); +} + +/** + * Install the linker bug mitigation for Android 10 and lower. Fixes VulkanMod crashing on these + * Android versions due to missing namespace nesting. + */ +void installLinkerBugMitigation() { + if(android_get_device_api_level() >= 30) return; + __android_log_print(ANDROID_LOG_INFO, "Api29LinkerFix", "API < 30 detected, installing linker bug mitigation"); + JNIEnv* env = pojav_environ->runtimeJNIEnvPtr_JRE; + jclass dynamicLinkLoader = (*env)->FindClass(env, "org/lwjgl/system/linux/DynamicLinkLoader"); + if(dynamicLinkLoader == NULL) { + __android_log_print(ANDROID_LOG_ERROR, "Api29LinkerFix", "Failed to find the target class"); + (*env)->ExceptionClear(env); + return; + } + JNINativeMethod ndlopenMethod[] = { + {"ndlopen", "(JI)J", &ndlopen_bugfix} + }; + if((*env)->RegisterNatives(env, dynamicLinkLoader, ndlopenMethod, 1) != 0) { + __android_log_print(ANDROID_LOG_ERROR, "Api29LinkerFix", "Failed to register the bugfix method"); + (*env)->ExceptionClear(env); + } +} + +/** + * This function is meant as a substitute for SharedLibraryUtil.getLibraryPath() that just returns 0 + * (thus making the parent Java function return null). This is done to avoid using the LWJGL's default function, + * which will hang the crappy EMUI linker by dlopen()ing inside of dl_iterate_phdr(). + * @return 0, to make the parent Java function return null immediately. + * For reference: https://github.com/PojavLauncherTeam/lwjgl3/blob/fix_huawei_hang/modules/lwjgl/core/src/main/java/org/lwjgl/system/SharedLibraryUtil.java + */ +jint getLibraryPath_fix(__attribute__((unused)) JNIEnv *env, + __attribute__((unused)) jclass class, + __attribute__((unused)) jlong pLibAddress, + __attribute__((unused)) jlong sOutAddress, + __attribute__((unused)) jint bufSize){ + return 0; +} + +/** + * Install the linker hang mitigation that is meant to prevent linker hangs on old EMUI firmware. + */ +void installEMUIIteratorMititgation() { + if(getenv("POJAV_EMUI_ITERATOR_MITIGATE") == NULL) return; + __android_log_print(ANDROID_LOG_INFO, "EMUIIteratorFix", "Installing..."); + JNIEnv* env = pojav_environ->runtimeJNIEnvPtr_JRE; + jclass sharedLibraryUtil = (*env)->FindClass(env, "org/lwjgl/system/SharedLibraryUtil"); + if(sharedLibraryUtil == NULL) { + __android_log_print(ANDROID_LOG_ERROR, "EMUIIteratorFix", "Failed to find the target class"); + (*env)->ExceptionClear(env); + return; + } + JNINativeMethod getLibraryPathMethod[] = { + {"getLibraryPath", "(JJI)I", &getLibraryPath_fix} + }; + if((*env)->RegisterNatives(env, sharedLibraryUtil, getLibraryPathMethod, 1) != 0) { + __android_log_print(ANDROID_LOG_ERROR, "EMUIIteratorFix", "Failed to register the mitigation method"); + (*env)->ExceptionClear(env); + } +} + +void critical_set_stackqueue(jboolean use_input_stack_queue) { + pojav_environ->isUseStackQueueCall = (int) use_input_stack_queue; +} + +void noncritical_set_stackqueue(__attribute__((unused)) JNIEnv *env, __attribute__((unused)) jclass clazz, jboolean use_input_stack_queue) { + critical_set_stackqueue(use_input_stack_queue); +} + +jstring convertStringJVM(JNIEnv* srcEnv, JNIEnv* dstEnv, jstring srcStr) { + if (srcStr == NULL) { + return NULL; + } + + const char* srcStrC = (*srcEnv)->GetStringUTFChars(srcEnv, srcStr, 0); + jstring dstStr = (*dstEnv)->NewStringUTF(dstEnv, srcStrC); + (*srcEnv)->ReleaseStringUTFChars(srcEnv, srcStr, srcStrC); + return dstStr; +} + +JNIEXPORT jstring JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeClipboard(JNIEnv* env, __attribute__((unused)) jclass clazz, jint action, jbyteArray copySrc) { +#ifdef DEBUG + FCL_INTERNAL_LOG("Debug: Clipboard access is going on\n", pojav_environ->isUseStackQueueCall); +#endif + + JNIEnv *dalvikEnv; + (*pojav_environ->dalvikJavaVMPtr)->AttachCurrentThread(pojav_environ->dalvikJavaVMPtr, &dalvikEnv, NULL); + assert(dalvikEnv != NULL); + assert(pojav_environ->bridgeClazz != NULL); + + FCL_INTERNAL_LOG("Clipboard: Converting string\n"); + char *copySrcC; + jstring copyDst = NULL; + if (copySrc) { + copySrcC = (char *)((*env)->GetByteArrayElements(env, copySrc, NULL)); + copyDst = (*dalvikEnv)->NewStringUTF(dalvikEnv, copySrcC); + } + + FCL_INTERNAL_LOG("Clipboard: Calling 2nd\n"); + jstring pasteDst = convertStringJVM(dalvikEnv, env, (jstring) (*dalvikEnv)->CallStaticObjectMethod(dalvikEnv, pojav_environ->bridgeClazz, pojav_environ->method_accessAndroidClipboard, action, copyDst)); + + if (copySrc) { + (*dalvikEnv)->DeleteLocalRef(dalvikEnv, copyDst); + (*env)->ReleaseByteArrayElements(env, copySrc, (jbyte *)copySrcC, 0); + } + (*pojav_environ->dalvikJavaVMPtr)->DetachCurrentThread(pojav_environ->dalvikJavaVMPtr); + return pasteDst; +} + +JNIEXPORT jboolean JNICALL JavaCritical_org_lwjgl_glfw_CallbackBridge_nativeSetInputReady(jboolean inputReady) { +#ifdef DEBUG + FCL_INTERNAL_LOG("Debug: Changing input state, isReady=%d, pojav_environ->isUseStackQueueCall=%d\n", inputReady, pojav_environ->isUseStackQueueCall); +#endif + __android_log_print(ANDROID_LOG_INFO, "NativeInput", "Input ready: %i", inputReady); + pojav_environ->isInputReady = inputReady; + return pojav_environ->isUseStackQueueCall; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSetInputReady(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jboolean inputReady) { + return JavaCritical_org_lwjgl_glfw_CallbackBridge_nativeSetInputReady(inputReady); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSetGrabbing(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jboolean grabbing) { + JNIEnv *dalvikEnv; + (*pojav_environ->dalvikJavaVMPtr)->AttachCurrentThread(pojav_environ->dalvikJavaVMPtr, &dalvikEnv, NULL); + (*dalvikEnv)->CallStaticVoidMethod(dalvikEnv, pojav_environ->bridgeClazz, pojav_environ->method_onGrabStateChanged, grabbing); + (*pojav_environ->dalvikJavaVMPtr)->DetachCurrentThread(pojav_environ->dalvikJavaVMPtr); + pojav_environ->isGrabbing = grabbing; +} + +jboolean critical_send_char(jchar codepoint) { + if (pojav_environ->GLFW_invoke_Char && pojav_environ->isInputReady) { + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_CHAR, codepoint, 0, 0, 0); + } else { + pojav_environ->GLFW_invoke_Char((void*) pojav_environ->showingWindow, (unsigned int) codepoint); + } + return JNI_TRUE; + } + return JNI_FALSE; +} + +jboolean noncritical_send_char(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jchar codepoint) { + return critical_send_char(codepoint); +} + +jboolean critical_send_char_mods(jchar codepoint, jint mods) { + if (pojav_environ->GLFW_invoke_CharMods && pojav_environ->isInputReady) { + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_CHAR_MODS, (int) codepoint, mods, 0, 0); + } else { + pojav_environ->GLFW_invoke_CharMods((void*) pojav_environ->showingWindow, codepoint, mods); + } + return JNI_TRUE; + } + return JNI_FALSE; +} + +jboolean noncritical_send_char_mods(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jchar codepoint, jint mods) { + return critical_send_char_mods(codepoint, mods); +} +/* +JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendCursorEnter(JNIEnv* env, jclass clazz, jint entered) { + if (pojav_environ->GLFW_invoke_CursorEnter && pojav_environ->isInputReady) { + pojav_environ->GLFW_invoke_CursorEnter(pojav_environ->showingWindow, entered); + } +} +*/ + +void critical_send_cursor_pos(jfloat x, jfloat y) { +#ifdef DEBUG + FCL_INTERNAL_LOG("Sending cursor position \n"); +#endif + if (pojav_environ->GLFW_invoke_CursorPos && pojav_environ->isInputReady) { +#ifdef DEBUG + FCL_INTERNAL_LOG("pojav_environ->GLFW_invoke_CursorPos && pojav_environ->isInputReady \n"); +#endif + if (!pojav_environ->isCursorEntered) { + if (pojav_environ->GLFW_invoke_CursorEnter) { + pojav_environ->isCursorEntered = true; + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_CURSOR_ENTER, 1, 0, 0, 0); + } else { + pojav_environ->GLFW_invoke_CursorEnter((void*) pojav_environ->showingWindow, 1); + } + } else if (pojav_environ->isGrabbing) { + // Some Minecraft versions does not use GLFWCursorEnterCallback + // This is a smart check, as Minecraft will not in grab mode if already not. + pojav_environ->isCursorEntered = true; + } + } + + if (!pojav_environ->isUseStackQueueCall) { + pojav_environ->GLFW_invoke_CursorPos((void*) pojav_environ->showingWindow, (double) (x), (double) (y)); + } else { + pojav_environ->cursorX = x; + pojav_environ->cursorY = y; + } + } +} + +void noncritical_send_cursor_pos(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jfloat x, jfloat y) { + critical_send_cursor_pos(x, y); +} +#define max(a,b) \ + ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +void critical_send_key(jint key, jint scancode, jint action, jint mods) { + if (pojav_environ->GLFW_invoke_Key && pojav_environ->isInputReady) { + pojav_environ->keyDownBuffer[max(0, key-31)] = (jbyte) action; + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_KEY, key, scancode, action, mods); + } else { + pojav_environ->GLFW_invoke_Key((void*) pojav_environ->showingWindow, key, scancode, action, mods); + } + } +} +void noncritical_send_key(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jint key, jint scancode, jint action, jint mods) { + critical_send_key(key, scancode, action, mods); +} + +void critical_send_mouse_button(jint button, jint action, jint mods) { + if (pojav_environ->GLFW_invoke_MouseButton && pojav_environ->isInputReady) { + pojav_environ->mouseDownBuffer[max(0, button)] = (jbyte) action; + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_MOUSE_BUTTON, button, action, mods, 0); + } else { + pojav_environ->GLFW_invoke_MouseButton((void*) pojav_environ->showingWindow, button, action, mods); + } + } +} + +void noncritical_send_mouse_button(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jint button, jint action, jint mods) { + critical_send_mouse_button(button, action, mods); +} + +void critical_send_screen_size(jint width, jint height) { + pojav_environ->savedWidth = width; + pojav_environ->savedHeight = height; + if (pojav_environ->isInputReady) { + if (pojav_environ->GLFW_invoke_FramebufferSize) { + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_FRAMEBUFFER_SIZE, width, height, 0, 0); + } else { + pojav_environ->GLFW_invoke_FramebufferSize((void*) pojav_environ->showingWindow, width, height); + } + } + + if (pojav_environ->GLFW_invoke_WindowSize) { + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_WINDOW_SIZE, width, height, 0, 0); + } else { + pojav_environ->GLFW_invoke_WindowSize((void*) pojav_environ->showingWindow, width, height); + } + } + } +} + +void noncritical_send_screen_size(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jint width, jint height) { + critical_send_screen_size(width, height); +} + +void critical_send_scroll(jdouble xoffset, jdouble yoffset) { + if (pojav_environ->GLFW_invoke_Scroll && pojav_environ->isInputReady) { + if (pojav_environ->isUseStackQueueCall) { + sendData(EVENT_TYPE_SCROLL, (int)xoffset, (int)yoffset, 0, 0); + } else { + pojav_environ->GLFW_invoke_Scroll((void*) pojav_environ->showingWindow, (double) xoffset, (double) yoffset); + } + } +} + +void noncritical_send_scroll(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jdouble xoffset, jdouble yoffset) { + critical_send_scroll(xoffset, yoffset); +} + + +JNIEXPORT void JNICALL Java_org_lwjgl_glfw_GLFW_nglfwSetShowingWindow(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jlong window) { + pojav_environ->showingWindow = (long) window; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSetWindowAttrib(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jclass clazz, jint attrib, jint value) { + if (!pojav_environ->showingWindow || !pojav_environ->isUseStackQueueCall) { + // If the window is not shown, there is nothing to do yet. + // For Minecraft < 1.13, calling to JNI functions here crashes the JVM for some reason, therefore it is skipped for now. + return; + } + + (*pojav_environ->runtimeJNIEnvPtr_JRE)->CallStaticVoidMethod( + pojav_environ->runtimeJNIEnvPtr_JRE, + pojav_environ->vmGlfwClass, pojav_environ->method_glftSetWindowAttrib, + (jlong) pojav_environ->showingWindow, attrib, value + ); +} +const static JNINativeMethod critical_fcns[] = { + {"nativeSetUseInputStackQueue", "(Z)V", critical_set_stackqueue}, + {"nativeSendChar", "(C)Z", critical_send_char}, + {"nativeSendCharMods", "(CI)Z", critical_send_char_mods}, + {"nativeSendKey", "(IIII)V", critical_send_key}, + {"nativeSendCursorPos", "(FF)V", critical_send_cursor_pos}, + {"nativeSendMouseButton", "(III)V", critical_send_mouse_button}, + {"nativeSendScroll", "(DD)V", critical_send_scroll}, + {"nativeSendScreenSize", "(II)V", critical_send_screen_size} +}; + +const static JNINativeMethod noncritical_fcns[] = { + {"nativeSetUseInputStackQueue", "(Z)V", noncritical_set_stackqueue}, + {"nativeSendChar", "(C)Z", noncritical_send_char}, + {"nativeSendCharMods", "(CI)Z", noncritical_send_char_mods}, + {"nativeSendKey", "(IIII)V", noncritical_send_key}, + {"nativeSendCursorPos", "(FF)V", noncritical_send_cursor_pos}, + {"nativeSendMouseButton", "(III)V", noncritical_send_mouse_button}, + {"nativeSendScroll", "(DD)V", noncritical_send_scroll}, + {"nativeSendScreenSize", "(II)V", noncritical_send_screen_size} +}; + + +static bool criticalNativeAvailable; + +void dvm_testCriticalNative(void* arg0, void* arg1, void* arg2, void* arg3) { + if(arg0 != 0 && arg2 == 0 && arg3 == 0) { + criticalNativeAvailable = false; + }else if (arg0 == 0 && arg1 == 0){ + criticalNativeAvailable = true; + }else { + criticalNativeAvailable = false; // just to be safe + } +} + +static bool tryCriticalNative(JNIEnv *env) { + static const JNINativeMethod testJNIMethod[] = { + { "testCriticalNative", "(II)V", dvm_testCriticalNative} + }; + jclass criticalNativeTest = (*env)->FindClass(env, "com/tungsten/fclauncher/CriticalNativeTest"); + if(criticalNativeTest == NULL) { + (*env)->ExceptionClear(env); + return false; + } + jmethodID criticalNativeTestMethod = (*env)->GetStaticMethodID(env, criticalNativeTest, "invokeTest", "()V"); + (*env)->RegisterNatives(env, criticalNativeTest, testJNIMethod, 1); + (*env)->CallStaticVoidMethod(env, criticalNativeTest, criticalNativeTestMethod); + (*env)->UnregisterNatives(env, criticalNativeTest); + return criticalNativeAvailable; +} + +static void registerFunctions(JNIEnv *env) { + bool use_critical_cc = tryCriticalNative(env); + jclass bridge_class = (*env)->FindClass(env, "org/lwjgl/glfw/CallbackBridge"); + if(use_critical_cc) { + __android_log_print(ANDROID_LOG_INFO, "pojavexec", "CriticalNative is available. Enjoy the 4.6x times faster input!"); + }else{ + __android_log_print(ANDROID_LOG_INFO, "pojavexec", "CriticalNative is not available. Upgrade, maybe?"); + } + (*env)->RegisterNatives(env, + bridge_class, + use_critical_cc ? critical_fcns : noncritical_fcns, + sizeof(critical_fcns)/sizeof(critical_fcns[0])); +} diff --git a/FCLauncher/src/main/jni/pojav/virgl/virgl.c b/FCLauncher/src/main/jni/pojav/virgl/virgl.c new file mode 100644 index 00000000..fe53aa34 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/virgl/virgl.c @@ -0,0 +1,187 @@ +// +// Created by mio on 2024/8/20. +// + +#include +#include +#include +#include +#include +#include +#include +#include "virgl.h" +#include "environ/environ.h" +#include "ctxbridges/osm_bridge.h" +#include "egl_bridge.h" +#include "ctxbridges/egl_loader.h" + +int (*vtest_main_p)(int argc, char **argv); + +void (*vtest_swap_buffers_p)(void); + +void *virglGetCurrentContext() { + return (void *) OSMesaGetCurrentContext_p(); +} + +void virglSwapBuffers() { + glFinish_p(); + vtest_swap_buffers_p(); +} + +void virglMakeCurrent(void *window) { + printf("OSMDroid: making current\n"); + OSMesaMakeCurrent_p((OSMesaContext) window, + setbuffer, + GL_UNSIGNED_BYTE, + pojav_environ->savedWidth, + pojav_environ->savedHeight); + + printf("OSMDroid: vendor: %s\n", glGetString_p(GL_VENDOR)); + printf("OSMDroid: renderer: %s\n", glGetString_p(GL_RENDERER)); + glClear_p(GL_COLOR_BUFFER_BIT); + glClearColor_p(0.4f, 0.4f, 0.4f, 1.0f); + + // Trigger a texture creation, which then set VIRGL_TEXTURE_ID + int pixelsArr[4]; + glReadPixels_p(0, 0, 1, 1, GL_RGB, GL_INT, &pixelsArr); + + virglSwapBuffers(); +} + +void *virglCreateContext(void *contextSrc) { + printf("OSMDroid: generating context\n"); + void *ctx = OSMesaCreateContext_p(OSMESA_RGBA, contextSrc); + printf("OSMDroid: context=%p\n", ctx); + return ctx; +} + +void loadSymbolsVirGL() { + dlsym_OSMesa(); + dlsym_EGL(); + + char *fileName = calloc(1, 1024); + + sprintf(fileName, "%s/libvirgl_test_server.so", getenv("POJAV_NATIVEDIR")); + void *handle = dlopen(fileName, RTLD_LAZY); + printf("VirGL: libvirgl_test_server = %p\n", handle); + if (!handle) { + printf("VirGL: %s\n", dlerror()); + } + vtest_main_p = dlsym(handle, "vtest_main"); + vtest_swap_buffers_p = dlsym(handle, "vtest_swap_buffers"); + + free(fileName); +} + +void *egl_make_current(void *window) { + EGLBoolean success = eglMakeCurrent_p( + potatoBridge.eglDisplay, + window == 0 ? (EGLSurface *) 0 : potatoBridge.eglSurface, + window == 0 ? (EGLSurface *) 0 : potatoBridge.eglSurface, + /* window==0 ? EGL_NO_CONTEXT : */ (EGLContext *) window + ); + + if (success == EGL_FALSE) { + printf("EGLBridge: Error: eglMakeCurrent() failed: %p\n", eglGetError_p()); + } else { + printf("EGLBridge: eglMakeCurrent() succeed!\n"); + } + + printf("VirGL: vtest_main = %p\n", vtest_main_p); + printf("VirGL: Calling VTest server's main function\n"); + vtest_main_p(3, (const char *[]) {"vtest", "--no-loop-or-fork", "--use-gles", NULL, NULL}); +} + +void virglSwapInterval(int interval) { + eglSwapInterval_p(potatoBridge.eglDisplay, interval); +} + +int virglInit() { + if (potatoBridge.eglDisplay == NULL || potatoBridge.eglDisplay == EGL_NO_DISPLAY) { + potatoBridge.eglDisplay = eglGetDisplay_p(EGL_DEFAULT_DISPLAY); + if (potatoBridge.eglDisplay == EGL_NO_DISPLAY) { + printf("EGLBridge: Error eglGetDefaultDisplay() failed: %p\n", eglGetError_p()); + return 0; + } + } + + printf("EGLBridge: Initializing\n"); + // printf("EGLBridge: ANativeWindow pointer = %p\n", pojav_environ->pojavWindow); + //(*env)->ThrowNew(env,(*env)->FindClass(env,"java/lang/Exception"),"Trace exception"); + if (!eglInitialize_p(potatoBridge.eglDisplay, NULL, NULL)) { + printf("EGLBridge: Error eglInitialize() failed: %s\n", eglGetError_p()); + return 0; + } + + static const EGLint attribs[] = { + EGL_RED_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_ALPHA_SIZE, 8, + // Minecraft required on initial 24 + EGL_DEPTH_SIZE, 24, + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_NONE + }; + + EGLint num_configs; + EGLint vid; + + if (!eglChooseConfig_p(potatoBridge.eglDisplay, attribs, &config, 1, &num_configs)) { + printf("EGLBridge: Error couldn't get an EGL visual config: %s\n", eglGetError_p()); + return 0; + } + + assert(config); + assert(num_configs > 0); + + if (!eglGetConfigAttrib_p(potatoBridge.eglDisplay, config, EGL_NATIVE_VISUAL_ID, &vid)) { + printf("EGLBridge: Error eglGetConfigAttrib() failed: %s\n", eglGetError_p()); + return 0; + } + + ANativeWindow_setBuffersGeometry(pojav_environ->pojavWindow, 0, 0, vid); + + eglBindAPI_p(EGL_OPENGL_ES_API); + + potatoBridge.eglSurface = eglCreateWindowSurface_p(potatoBridge.eglDisplay, config, + pojav_environ->pojavWindow, NULL); + + if (!potatoBridge.eglSurface) { + printf("EGLBridge: Error eglCreateWindowSurface failed: %p\n", eglGetError_p()); + //(*env)->ThrowNew(env,(*env)->FindClass(env,"java/lang/Exception"),"Trace exception"); + return 0; + } + + // sanity checks + { + EGLint val; + assert(eglGetConfigAttrib_p(potatoBridge.eglDisplay, config, EGL_SURFACE_TYPE, &val)); + assert(val & EGL_WINDOW_BIT); + } + + printf("EGLBridge: Initialized!\n"); + printf("EGLBridge: ThreadID=%d\n", gettid()); + printf("EGLBridge: EGLDisplay=%p, EGLSurface=%p\n", +/* window==0 ? EGL_NO_CONTEXT : */ + potatoBridge.eglDisplay, + potatoBridge.eglSurface + ); + + // Init EGL context and vtest server + const EGLint ctx_attribs[] = { + EGL_CONTEXT_CLIENT_VERSION, 3, + EGL_NONE + }; + EGLContext *ctx = eglCreateContext_p(potatoBridge.eglDisplay, config, NULL, ctx_attribs); + printf("VirGL: created EGL context %p\n", ctx); + + pthread_t t; + pthread_create(&t, NULL, egl_make_current, (void *) ctx); + usleep(100 * 1000); // need enough time for the server to init + + if (OSMesaCreateContext_p == NULL) { + printf("OSMDroid: %s\n", dlerror()); + } + return 0; +} \ No newline at end of file diff --git a/FCLauncher/src/main/jni/pojav/virgl/virgl.h b/FCLauncher/src/main/jni/pojav/virgl/virgl.h new file mode 100644 index 00000000..17d476d4 --- /dev/null +++ b/FCLauncher/src/main/jni/pojav/virgl/virgl.h @@ -0,0 +1,18 @@ +// +// Created by mio on 2024/8/20. +// + +#ifndef FOLD_CRAFT_LAUNCHER_VIRGL_H +#define FOLD_CRAFT_LAUNCHER_VIRGL_H + +#define RENDERER_VIRGL 3 + +void* virglGetCurrentContext(); +void loadSymbolsVirGL(); +int virglInit(); +void virglSwapBuffers(); +void virglMakeCurrent(void* window); +void* virglCreateContext(void* contextSrc); +void virglSwapInterval(int interval); + +#endif //FOLD_CRAFT_LAUNCHER_VIRGL_H diff --git a/FCLauncher/src/main/jni/tinywrapper/main.c b/FCLauncher/src/main/jni/tinywrapper/main.c index 986dc417..c3388338 100644 --- a/FCLauncher/src/main/jni/tinywrapper/main.c +++ b/FCLauncher/src/main/jni/tinywrapper/main.c @@ -4,7 +4,7 @@ #include #include -#include "gl/gl.h" +#include "pojav/GL/gl.h" #include "GLES3/gl32.h" #include "include/string_utils.h" diff --git a/FCLauncher/src/main/jniLibs/arm64-v8a/libfreetype.so b/FCLauncher/src/main/jniLibs/arm64-v8a/libfreetype.so new file mode 100644 index 00000000..4b463d9f Binary files /dev/null and b/FCLauncher/src/main/jniLibs/arm64-v8a/libfreetype.so differ diff --git a/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl.so b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl.so new file mode 100644 index 00000000..db7926ee Binary files /dev/null and b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl.so differ diff --git a/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_nanovg.so b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_nanovg.so new file mode 100644 index 00000000..e882a7ec Binary files /dev/null and b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_nanovg.so differ diff --git a/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_opengl.so b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_opengl.so new file mode 100644 index 00000000..42affb58 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_opengl.so differ diff --git a/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_stb.so b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_stb.so new file mode 100644 index 00000000..f5b7636d Binary files /dev/null and b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_stb.so differ diff --git a/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_tinyfd.so b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_tinyfd.so new file mode 100644 index 00000000..4cd5dad0 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/arm64-v8a/liblwjgl_tinyfd.so differ diff --git a/FCLauncher/src/main/jniLibs/armeabi-v7a/libfreetype.so b/FCLauncher/src/main/jniLibs/armeabi-v7a/libfreetype.so new file mode 100644 index 00000000..861d8eed Binary files /dev/null and b/FCLauncher/src/main/jniLibs/armeabi-v7a/libfreetype.so differ diff --git a/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl.so b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl.so new file mode 100644 index 00000000..f60e066e Binary files /dev/null and b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl.so differ diff --git a/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_nanovg.so b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_nanovg.so new file mode 100644 index 00000000..d2a325ce Binary files /dev/null and b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_nanovg.so differ diff --git a/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_opengl.so b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_opengl.so new file mode 100644 index 00000000..43a127d9 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_opengl.so differ diff --git a/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_stb.so b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_stb.so new file mode 100644 index 00000000..4e9f6a09 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_stb.so differ diff --git a/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_tinyfd.so b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_tinyfd.so new file mode 100644 index 00000000..9687cbb6 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/armeabi-v7a/liblwjgl_tinyfd.so differ diff --git a/FCLauncher/src/main/jniLibs/x86/libfreetype.so b/FCLauncher/src/main/jniLibs/x86/libfreetype.so new file mode 100644 index 00000000..621719e0 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86/libfreetype.so differ diff --git a/FCLauncher/src/main/jniLibs/x86/liblwjgl.so b/FCLauncher/src/main/jniLibs/x86/liblwjgl.so new file mode 100644 index 00000000..2abc1bdc Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86/liblwjgl.so differ diff --git a/FCLauncher/src/main/jniLibs/x86/liblwjgl_nanovg.so b/FCLauncher/src/main/jniLibs/x86/liblwjgl_nanovg.so new file mode 100644 index 00000000..7c4d6750 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86/liblwjgl_nanovg.so differ diff --git a/FCLauncher/src/main/jniLibs/x86/liblwjgl_opengl.so b/FCLauncher/src/main/jniLibs/x86/liblwjgl_opengl.so new file mode 100644 index 00000000..06b7487f Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86/liblwjgl_opengl.so differ diff --git a/FCLauncher/src/main/jniLibs/x86/liblwjgl_stb.so b/FCLauncher/src/main/jniLibs/x86/liblwjgl_stb.so new file mode 100644 index 00000000..3b06eb6c Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86/liblwjgl_stb.so differ diff --git a/FCLauncher/src/main/jniLibs/x86/liblwjgl_tinyfd.so b/FCLauncher/src/main/jniLibs/x86/liblwjgl_tinyfd.so new file mode 100644 index 00000000..9bedb534 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86/liblwjgl_tinyfd.so differ diff --git a/FCLauncher/src/main/jniLibs/x86_64/libfreetype.so b/FCLauncher/src/main/jniLibs/x86_64/libfreetype.so new file mode 100644 index 00000000..2360a1d5 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86_64/libfreetype.so differ diff --git a/FCLauncher/src/main/jniLibs/x86_64/liblwjgl.so b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl.so new file mode 100644 index 00000000..cadba703 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl.so differ diff --git a/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_nanovg.so b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_nanovg.so new file mode 100644 index 00000000..5979a2b6 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_nanovg.so differ diff --git a/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_opengl.so b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_opengl.so new file mode 100644 index 00000000..a9fcee9a Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_opengl.so differ diff --git a/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_stb.so b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_stb.so new file mode 100644 index 00000000..29bfb738 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_stb.so differ diff --git a/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_tinyfd.so b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_tinyfd.so new file mode 100644 index 00000000..ba103170 Binary files /dev/null and b/FCLauncher/src/main/jniLibs/x86_64/liblwjgl_tinyfd.so differ diff --git a/LWJGL/build.gradle b/LWJGL-Pojav/build.gradle similarity index 58% rename from LWJGL/build.gradle rename to LWJGL-Pojav/build.gradle index dbc05fcd..2e6a2ac6 100644 --- a/LWJGL/build.gradle +++ b/LWJGL-Pojav/build.gradle @@ -12,12 +12,18 @@ project.setLibsDirName("${rootDir}/FCL/src/main/assets/app_runtime/lwjgl") task buildLwjgl(dependsOn:'jar') jar { - doLast { - archiveFileName = 'lwjgl.jar' - manifest { - attributes 'Manifest-Version': '3.3.3' + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + from { + configurations.default.collect { + println(it.getName()) + it.isDirectory() ? it : zipTree(it) } - destinationDirectory.set(file("../FCL/src/main/assets/app_runtime/lwjgl")) + } + exclude 'net/java/openjdk/cacio/ctc/**' + manifest { + attributes 'Manifest-Version': '3.3.3' + } + doLast { File versionFile = file("../FCL/src/main/assets/app_runtime/lwjgl/version") versionFile.write(String.valueOf(new Date().getTime())) } @@ -30,6 +36,5 @@ java { } dependencies { - compileOnly 'com.google.code.findbugs:jsr305:3.0.2' - compileOnly fileTree(dir: 'libs', include: ['*.jar']) -} + implementation fileTree(dir: 'libs', include: ['*.jar']) +} \ No newline at end of file diff --git a/LWJGL-Pojav/libs/jsr305.jar b/LWJGL-Pojav/libs/jsr305.jar new file mode 100644 index 00000000..59222d9c Binary files /dev/null and b/LWJGL-Pojav/libs/jsr305.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-freetype.jar b/LWJGL-Pojav/libs/lwjgl-freetype.jar new file mode 100644 index 00000000..2b65c416 Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-freetype.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-glfw.jar b/LWJGL-Pojav/libs/lwjgl-glfw.jar new file mode 100644 index 00000000..0cf35520 Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-glfw.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-jemalloc.jar b/LWJGL-Pojav/libs/lwjgl-jemalloc.jar new file mode 100644 index 00000000..9b2bbcdb Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-jemalloc.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-lwjglx.jar b/LWJGL-Pojav/libs/lwjgl-lwjglx.jar new file mode 100644 index 00000000..64831632 Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-lwjglx.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-nanovg.jar b/LWJGL-Pojav/libs/lwjgl-nanovg.jar new file mode 100644 index 00000000..1b30eef2 Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-nanovg.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-openal.jar b/LWJGL-Pojav/libs/lwjgl-openal.jar new file mode 100644 index 00000000..0757751a Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-openal.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-opengl.jar b/LWJGL-Pojav/libs/lwjgl-opengl.jar new file mode 100644 index 00000000..df83c5aa Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-opengl.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-stb.jar b/LWJGL-Pojav/libs/lwjgl-stb.jar new file mode 100644 index 00000000..f9bc3d23 Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-stb.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl-tinyfd.jar b/LWJGL-Pojav/libs/lwjgl-tinyfd.jar new file mode 100644 index 00000000..31a3ba0e Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl-tinyfd.jar differ diff --git a/LWJGL-Pojav/libs/lwjgl.jar b/LWJGL-Pojav/libs/lwjgl.jar new file mode 100644 index 00000000..fa972c65 Binary files /dev/null and b/LWJGL-Pojav/libs/lwjgl.jar differ diff --git a/LWJGL-Pojav/src/main/java/android/util/ArrayMap.java b/LWJGL-Pojav/src/main/java/android/util/ArrayMap.java new file mode 100644 index 00000000..a28c3432 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/android/util/ArrayMap.java @@ -0,0 +1,884 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.util; + +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +/** + * ArrayMap is a generic key->value mapping data structure that is + * designed to be more memory efficient than a traditional {@link java.util.HashMap}. + * It keeps its mappings in an array data structure -- an integer array of hash + * codes for each item, and an Object array of the key/value pairs. This allows it to + * avoid having to create an extra object for every entry put in to the map, and it + * also tries to control the growth of the size of these arrays more aggressively + * (since growing them only requires copying the entries in the array, not rebuilding + * a hash map). + * + *

Note that this implementation is not intended to be appropriate for data structures + * that may contain large numbers of items. It is generally slower than a traditional + * HashMap, since lookups require a binary search and adds and removes require inserting + * and deleting entries in the array. For containers holding up to hundreds of items, + * the performance difference is not significant, less than 50%.

+ * + *

Because this container is intended to better balance memory use, unlike most other + * standard Java containers it will shrink its array as items are removed from it. Currently + * you have no control over this shrinking -- if you set a capacity and then remove an + * item, it may reduce the capacity to better match the current size. In the future an + * explicit call to set the capacity should turn off this aggressive shrinking behavior.

+ */ +public final class ArrayMap implements Map { + private static final boolean DEBUG = false; + private static final String TAG = "ArrayMap"; + + /** + * The minimum amount by which the capacity of a ArrayMap will increase. + * This is tuned to be relatively space-efficient. + */ + private static final int BASE_SIZE = 4; + + /** + * Maximum number of entries to have in array caches. + */ + private static final int CACHE_SIZE = 10; + + /** + * Special hash array value that indicates the container is immutable. + */ + static final int[] EMPTY_IMMUTABLE_INTS = new int[0]; + + /** + * @hide Special immutable empty ArrayMap. + */ + public static final ArrayMap EMPTY = new ArrayMap(true); + + /** + * Caches of small array objects to avoid spamming garbage. The cache + * Object[] variable is a pointer to a linked list of array objects. + * The first entry in the array is a pointer to the next array in the + * list; the second entry is a pointer to the int[] hash code array for it. + */ + static Object[] mBaseCache; + static int mBaseCacheSize; + static Object[] mTwiceBaseCache; + static int mTwiceBaseCacheSize; + + int[] mHashes; + Object[] mArray; + int mSize; + MapCollections mCollections; + + int indexOf(Object key, int hash) { + final int N = mSize; + + // Important fast case: if nothing is in here, nothing to look for. + if (N == 0) { + return ~0; + } + + int index = ContainerHelpers.binarySearch(mHashes, N, hash); + + // If the hash code wasn't found, then we have no entry for this key. + if (index < 0) { + return index; + } + + // If the key at the returned index matches, that's what we want. + if (key.equals(mArray[index<<1])) { + return index; + } + + // Search for a matching key after the index. + int end; + for (end = index + 1; end < N && mHashes[end] == hash; end++) { + if (key.equals(mArray[end << 1])) return end; + } + + // Search for a matching key before the index. + for (int i = index - 1; i >= 0 && mHashes[i] == hash; i--) { + if (key.equals(mArray[i << 1])) return i; + } + + // Key not found -- return negative value indicating where a + // new entry for this key should go. We use the end of the + // hash chain to reduce the number of array entries that will + // need to be copied when inserting. + return ~end; + } + + int indexOfNull() { + final int N = mSize; + + // Important fast case: if nothing is in here, nothing to look for. + if (N == 0) { + return ~0; + } + + int index = ContainerHelpers.binarySearch(mHashes, N, 0); + + // If the hash code wasn't found, then we have no entry for this key. + if (index < 0) { + return index; + } + + // If the key at the returned index matches, that's what we want. + if (null == mArray[index<<1]) { + return index; + } + + // Search for a matching key after the index. + int end; + for (end = index + 1; end < N && mHashes[end] == 0; end++) { + if (null == mArray[end << 1]) return end; + } + + // Search for a matching key before the index. + for (int i = index - 1; i >= 0 && mHashes[i] == 0; i--) { + if (null == mArray[i << 1]) return i; + } + + // Key not found -- return negative value indicating where a + // new entry for this key should go. We use the end of the + // hash chain to reduce the number of array entries that will + // need to be copied when inserting. + return ~end; + } + + private void allocArrays(final int size) { + if (mHashes == EMPTY_IMMUTABLE_INTS) { + throw new UnsupportedOperationException("ArrayMap is immutable"); + } + if (size == (BASE_SIZE*2)) { + synchronized (ArrayMap.class) { + if (mTwiceBaseCache != null) { + final Object[] array = mTwiceBaseCache; + mArray = array; + mTwiceBaseCache = (Object[])array[0]; + mHashes = (int[])array[1]; + array[0] = array[1] = null; + mTwiceBaseCacheSize--; + if (DEBUG) System.out.println("Retrieving 2x cache " + mHashes + + " now have " + mTwiceBaseCacheSize + " entries"); + return; + } + } + } else if (size == BASE_SIZE) { + synchronized (ArrayMap.class) { + if (mBaseCache != null) { + final Object[] array = mBaseCache; + mArray = array; + mBaseCache = (Object[])array[0]; + mHashes = (int[])array[1]; + array[0] = array[1] = null; + mBaseCacheSize--; + if (DEBUG) System.out.println("Retrieving 1x cache " + mHashes + + " now have " + mBaseCacheSize + " entries"); + return; + } + } + } + + mHashes = new int[size]; + mArray = new Object[size<<1]; + } + + private static void freeArrays(final int[] hashes, final Object[] array, final int size) { + if (hashes.length == (BASE_SIZE*2)) { + synchronized (ArrayMap.class) { + if (mTwiceBaseCacheSize < CACHE_SIZE) { + array[0] = mTwiceBaseCache; + array[1] = hashes; + for (int i=(size<<1)-1; i>=2; i--) { + array[i] = null; + } + mTwiceBaseCache = array; + mTwiceBaseCacheSize++; + if (DEBUG) System.out.println("Storing 2x cache " + array + + " now have " + mTwiceBaseCacheSize + " entries"); + } + } + } else if (hashes.length == BASE_SIZE) { + synchronized (ArrayMap.class) { + if (mBaseCacheSize < CACHE_SIZE) { + array[0] = mBaseCache; + array[1] = hashes; + for (int i=(size<<1)-1; i>=2; i--) { + array[i] = null; + } + mBaseCache = array; + mBaseCacheSize++; + if (DEBUG) System.out.println("Storing 1x cache " + array + + " now have " + mBaseCacheSize + " entries"); + } + } + } + } + + /** + * Create a new empty ArrayMap. The default capacity of an array map is 0, and + * will grow once items are added to it. + */ + public ArrayMap() { + mHashes = EmptyArray.INT; + mArray = EmptyArray.OBJECT; + mSize = 0; + } + + /** + * Create a new ArrayMap with a given initial capacity. + */ + public ArrayMap(int capacity) { + if (capacity == 0) { + mHashes = EmptyArray.INT; + mArray = EmptyArray.OBJECT; + } else { + allocArrays(capacity); + } + mSize = 0; + } + + private ArrayMap(boolean immutable) { + // If this is immutable, use the sentinal EMPTY_IMMUTABLE_INTS + // instance instead of the usual EmptyArray.INT. The reference + // is checked later to see if the array is allowed to grow. + mHashes = immutable ? EMPTY_IMMUTABLE_INTS : EmptyArray.INT; + mArray = EmptyArray.OBJECT; + mSize = 0; + } + + /** + * Create a new ArrayMap with the mappings from the given ArrayMap. + */ + public ArrayMap(ArrayMap map) { + this(); + if (map != null) { + putAll(map); + } + } + + /** + * Make the array map empty. All storage is released. + */ + @Override + public void clear() { + if (mSize > 0) { + freeArrays(mHashes, mArray, mSize); + mHashes = EmptyArray.INT; + mArray = EmptyArray.OBJECT; + mSize = 0; + } + } + + /** + * @hide + * Like {@link #clear}, but doesn't reduce the capacity of the ArrayMap. + */ + public void erase() { + if (mSize > 0) { + final int N = mSize<<1; + final Object[] array = mArray; + for (int i=0; iminimumCapacity + * items. + */ + public void ensureCapacity(int minimumCapacity) { + if (mHashes.length < minimumCapacity) { + final int[] ohashes = mHashes; + final Object[] oarray = mArray; + allocArrays(minimumCapacity); + if (mSize > 0) { + System.arraycopy(ohashes, 0, mHashes, 0, mSize); + System.arraycopy(oarray, 0, mArray, 0, mSize<<1); + } + freeArrays(ohashes, oarray, mSize); + } + } + + /** + * Check whether a key exists in the array. + * + * @param key The key to search for. + * @return Returns true if the key exists, else false. + */ + @Override + public boolean containsKey(Object key) { + return indexOfKey(key) >= 0; + } + + /** + * Returns the index of a key in the set. + * + * @param key The key to search for. + * @return Returns the index of the key if it exists, else a negative integer. + */ + public int indexOfKey(Object key) { + return key == null ? indexOfNull() : indexOf(key, key.hashCode()); + } + + int indexOfValue(Object value) { + final int N = mSize*2; + final Object[] array = mArray; + if (value == null) { + for (int i=1; i>1; + } + } + } else { + for (int i=1; i>1; + } + } + } + return -1; + } + + /** + * Check whether a value exists in the array. This requires a linear search + * through the entire array. + * + * @param value The value to search for. + * @return Returns true if the value exists, else false. + */ + @Override + public boolean containsValue(Object value) { + return indexOfValue(value) >= 0; + } + + /** + * Retrieve a value from the array. + * @param key The key of the value to retrieve. + * @return Returns the value associated with the given key, + * or null if there is no such key. + */ + @Override + public V get(Object key) { + final int index = indexOfKey(key); + return index >= 0 ? (V)mArray[(index<<1)+1] : null; + } + + /** + * Return the key at the given index in the array. + * @param index The desired index, must be between 0 and {@link #size()}-1. + * @return Returns the key stored at the given index. + */ + public K keyAt(int index) { + return (K)mArray[index << 1]; + } + + /** + * Return the value at the given index in the array. + * @param index The desired index, must be between 0 and {@link #size()}-1. + * @return Returns the value stored at the given index. + */ + public V valueAt(int index) { + return (V)mArray[(index << 1) + 1]; + } + + /** + * Set the value at a given index in the array. + * @param index The desired index, must be between 0 and {@link #size()}-1. + * @param value The new value to store at this index. + * @return Returns the previous value at the given index. + */ + public V setValueAt(int index, V value) { + index = (index << 1) + 1; + V old = (V)mArray[index]; + mArray[index] = value; + return old; + } + + /** + * Return true if the array map contains no items. + */ + @Override + public boolean isEmpty() { + return mSize <= 0; + } + + /** + * Add a new value to the array map. + * @param key The key under which to store the value. If + * this key already exists in the array, its value will be replaced. + * @param value The value to store for the given key. + * @return Returns the old value that was stored for the given key, or null if there + * was no such key. + */ + @Override + public V put(K key, V value) { + final int hash; + int index; + if (key == null) { + hash = 0; + index = indexOfNull(); + } else { + hash = key.hashCode(); + index = indexOf(key, hash); + } + if (index >= 0) { + index = (index<<1) + 1; + final V old = (V)mArray[index]; + mArray[index] = value; + return old; + } + + index = ~index; + if (mSize >= mHashes.length) { + final int n = mSize >= (BASE_SIZE*2) ? (mSize+(mSize>>1)) + : (mSize >= BASE_SIZE ? (BASE_SIZE*2) : BASE_SIZE); + + if (DEBUG) System.out.println("put: grow from " + mHashes.length + " to " + n); + + final int[] ohashes = mHashes; + final Object[] oarray = mArray; + allocArrays(n); + + if (mHashes.length > 0) { + if (DEBUG) System.out.println("put: copy 0-" + mSize + " to 0"); + System.arraycopy(ohashes, 0, mHashes, 0, ohashes.length); + System.arraycopy(oarray, 0, mArray, 0, oarray.length); + } + + freeArrays(ohashes, oarray, mSize); + } + + if (index < mSize) { + if (DEBUG) System.out.println("put: move " + index + "-" + (mSize-index) + + " to " + (index+1)); + System.arraycopy(mHashes, index, mHashes, index + 1, mSize - index); + System.arraycopy(mArray, index << 1, mArray, (index + 1) << 1, (mSize - index) << 1); + } + + mHashes[index] = hash; + mArray[index<<1] = key; + mArray[(index<<1)+1] = value; + mSize++; + return null; + } + + /** + * Special fast path for appending items to the end of the array without validation. + * The array must already be large enough to contain the item. + * @hide + */ + public void append(K key, V value) { + int index = mSize; + final int hash = key == null ? 0 : key.hashCode(); + if (index >= mHashes.length) { + throw new IllegalStateException("Array is full"); + } + if (index > 0 && mHashes[index-1] > hash) { + RuntimeException e = new RuntimeException("here"); + e.fillInStackTrace(); + System.out.println("New hash " + hash + + " is before end of array hash " + mHashes[index-1] + + " at index " + index + " key " + key); + e.printStackTrace(); + put(key, value); + return; + } + mSize = index+1; + mHashes[index] = hash; + index <<= 1; + mArray[index] = key; + mArray[index+1] = value; + } + + /** + * The use of the {@link #append} function can result in invalid array maps, in particular + * an array map where the same key appears multiple times. This function verifies that + * the array map is valid, throwing IllegalArgumentException if a problem is found. The + * main use for this method is validating an array map after unpacking from an IPC, to + * protect against malicious callers. + * @hide + */ + public void validate() { + final int N = mSize; + if (N <= 1) { + // There can't be dups. + return; + } + int basehash = mHashes[0]; + int basei = 0; + for (int i=1; i=basei; j--) { + final Object prev = mArray[j<<1]; + if (cur == prev) { + throw new IllegalArgumentException("Duplicate key in ArrayMap: " + cur); + } + if (cur != null && prev != null && cur.equals(prev)) { + throw new IllegalArgumentException("Duplicate key in ArrayMap: " + cur); + } + } + } + } + + /** + * Perform a {@link #put(Object, Object)} of all key/value pairs in array + * @param array The array whose contents are to be retrieved. + */ + public void putAll(ArrayMap array) { + final int N = array.mSize; + ensureCapacity(mSize + N); + if (mSize == 0) { + if (N > 0) { + System.arraycopy(array.mHashes, 0, mHashes, 0, N); + System.arraycopy(array.mArray, 0, mArray, 0, N<<1); + mSize = N; + } + } else { + for (int i=0; i= 0) { + return removeAt(index); + } + + return null; + } + + /** + * Remove the key/value mapping at the given index. + * @param index The desired index, must be between 0 and {@link #size()}-1. + * @return Returns the value that was stored at this index. + */ + public V removeAt(int index) { + final Object old = mArray[(index << 1) + 1]; + if (mSize <= 1) { + // Now empty. + if (DEBUG) System.out.println("remove: shrink from " + mHashes.length + " to 0"); + freeArrays(mHashes, mArray, mSize); + mHashes = EmptyArray.INT; + mArray = EmptyArray.OBJECT; + mSize = 0; + } else { + if (mHashes.length > (BASE_SIZE*2) && mSize < mHashes.length/3) { + // Shrunk enough to reduce size of arrays. We don't allow it to + // shrink smaller than (BASE_SIZE*2) to avoid flapping between + // that and BASE_SIZE. + final int n = mSize > (BASE_SIZE*2) ? (mSize + (mSize>>1)) : (BASE_SIZE*2); + + if (DEBUG) System.out.println("remove: shrink from " + mHashes.length + " to " + n); + + final int[] ohashes = mHashes; + final Object[] oarray = mArray; + allocArrays(n); + + mSize--; + if (index > 0) { + if (DEBUG) System.out.println("remove: copy from 0-" + index + " to 0"); + System.arraycopy(ohashes, 0, mHashes, 0, index); + System.arraycopy(oarray, 0, mArray, 0, index << 1); + } + if (index < mSize) { + if (DEBUG) System.out.println("remove: copy from " + (index+1) + "-" + mSize + + " to " + index); + System.arraycopy(ohashes, index + 1, mHashes, index, mSize - index); + System.arraycopy(oarray, (index + 1) << 1, mArray, index << 1, + (mSize - index) << 1); + } + } else { + mSize--; + if (index < mSize) { + if (DEBUG) System.out.println("remove: move " + (index+1) + "-" + mSize + + " to " + index); + System.arraycopy(mHashes, index + 1, mHashes, index, mSize - index); + System.arraycopy(mArray, (index + 1) << 1, mArray, index << 1, + (mSize - index) << 1); + } + mArray[mSize << 1] = null; + mArray[(mSize << 1) + 1] = null; + } + } + return (V)old; + } + + /** + * Return the number of items in this array map. + */ + @Override + public int size() { + return mSize; + } + + /** + * {@inheritDoc} + * + *

This implementation returns false if the object is not a map, or + * if the maps have different sizes. Otherwise, for each key in this map, + * values of both maps are compared. If the values for any key are not + * equal, the method returns false, otherwise it returns true. + */ + @Override + public boolean equals(Object object) { + if (this == object) { + return true; + } + if (object instanceof Map) { + Map map = (Map) object; + if (size() != map.size()) { + return false; + } + + try { + for (int i=0; iThis implementation composes a string by iterating over its mappings. If + * this map contains itself as a key or a value, the string "(this Map)" + * will appear in its place. + */ + @Override + public String toString() { + if (isEmpty()) { + return "{}"; + } + + StringBuilder buffer = new StringBuilder(mSize * 28); + buffer.append('{'); + for (int i=0; i 0) { + buffer.append(", "); + } + Object key = keyAt(i); + if (key != this) { + buffer.append(key); + } else { + buffer.append("(this Map)"); + } + buffer.append('='); + Object value = valueAt(i); + if (value != this) { + buffer.append(value); + } else { + buffer.append("(this Map)"); + } + } + buffer.append('}'); + return buffer.toString(); + } + + // ------------------------------------------------------------------------ + // Interop with traditional Java containers. Not as efficient as using + // specialized collection APIs. + // ------------------------------------------------------------------------ + + private MapCollections getCollection() { + if (mCollections == null) { + mCollections = new MapCollections() { + @Override + protected int colGetSize() { + return mSize; + } + + @Override + protected Object colGetEntry(int index, int offset) { + return mArray[(index<<1) + offset]; + } + + @Override + protected int colIndexOfKey(Object key) { + return indexOfKey(key); + } + + @Override + protected int colIndexOfValue(Object value) { + return indexOfValue(value); + } + + @Override + protected Map colGetMap() { + return ArrayMap.this; + } + + @Override + protected void colPut(K key, V value) { + put(key, value); + } + + @Override + protected V colSetValue(int index, V value) { + return setValueAt(index, value); + } + + @Override + protected void colRemoveAt(int index) { + removeAt(index); + } + + @Override + protected void colClear() { + clear(); + } + }; + } + return mCollections; + } + + /** + * Determine if the array map contains all of the keys in the given collection. + * @param collection The collection whose contents are to be checked against. + * @return Returns true if this array map contains a key for every entry + * in collection, else returns false. + */ + public boolean containsAll(Collection collection) { + return MapCollections.containsAllHelper(this, collection); + } + + /** + * Perform a {@link #put(Object, Object)} of all key/value pairs in map + * @param map The map whose contents are to be retrieved. + */ + @Override + public void putAll(Map map) { + ensureCapacity(mSize + map.size()); + for (Map.Entry entry : map.entrySet()) { + put(entry.getKey(), entry.getValue()); + } + } + + /** + * Remove all keys in the array map that exist in the given collection. + * @param collection The collection whose contents are to be used to remove keys. + * @return Returns true if any keys were removed from the array map, else false. + */ + public boolean removeAll(Collection collection) { + return MapCollections.removeAllHelper(this, collection); + } + + /** + * Remove all keys in the array map that do not exist in the given collection. + * @param collection The collection whose contents are to be used to determine which + * keys to keep. + * @return Returns true if any keys were removed from the array map, else false. + */ + public boolean retainAll(Collection collection) { + return MapCollections.retainAllHelper(this, collection); + } + + /** + * Return a {@link java.util.Set} for iterating over and interacting with all mappings + * in the array map. + * + *

Note: this is a very inefficient way to access the array contents, it + * requires generating a number of temporary objects and allocates additional state + * information associated with the container that will remain for the life of the container.

+ * + *

Note:

the semantics of this + * Set are subtly different than that of a {@link java.util.HashMap}: most important, + * the {@link java.util.Map.Entry Map.Entry} object returned by its iterator is a single + * object that exists for the entire iterator, so you can not hold on to it + * after calling {@link java.util.Iterator#next() Iterator.next}.

+ */ + @Override + public Set> entrySet() { + return getCollection().getEntrySet(); + } + + /** + * Return a {@link java.util.Set} for iterating over and interacting with all keys + * in the array map. + * + *

Note: this is a fairly inefficient way to access the array contents, it + * requires generating a number of temporary objects and allocates additional state + * information associated with the container that will remain for the life of the container.

+ */ + @Override + public Set keySet() { + return getCollection().getKeySet(); + } + + /** + * Return a {@link java.util.Collection} for iterating over and interacting with all values + * in the array map. + * + *

Note: this is a fairly inefficient way to access the array contents, it + * requires generating a number of temporary objects and allocates additional state + * information associated with the container that will remain for the life of the container.

+ */ + @Override + public Collection values() { + return getCollection().getValues(); + } +} diff --git a/LWJGL-Pojav/src/main/java/android/util/ContainerHelpers.java b/LWJGL-Pojav/src/main/java/android/util/ContainerHelpers.java new file mode 100644 index 00000000..4e5fefb9 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/android/util/ContainerHelpers.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.util; + +class ContainerHelpers { + + // This is Arrays.binarySearch(), but doesn't do any argument validation. + static int binarySearch(int[] array, int size, int value) { + int lo = 0; + int hi = size - 1; + + while (lo <= hi) { + final int mid = (lo + hi) >>> 1; + final int midVal = array[mid]; + + if (midVal < value) { + lo = mid + 1; + } else if (midVal > value) { + hi = mid - 1; + } else { + return mid; // value found + } + } + return ~lo; // value not present + } + + static int binarySearch(long[] array, int size, long value) { + int lo = 0; + int hi = size - 1; + + while (lo <= hi) { + final int mid = (lo + hi) >>> 1; + final long midVal = array[mid]; + + if (midVal < value) { + lo = mid + 1; + } else if (midVal > value) { + hi = mid - 1; + } else { + return mid; // value found + } + } + return ~lo; // value not present + } +} diff --git a/LWJGL-Pojav/src/main/java/android/util/EmptyArray.java b/LWJGL-Pojav/src/main/java/android/util/EmptyArray.java new file mode 100644 index 00000000..a5735fbc --- /dev/null +++ b/LWJGL-Pojav/src/main/java/android/util/EmptyArray.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.util; + +public final class EmptyArray { + private EmptyArray() {} + public static final boolean[] BOOLEAN = new boolean[0]; + public static final byte[] BYTE = new byte[0]; + public static final char[] CHAR = new char[0]; + public static final double[] DOUBLE = new double[0]; + public static final int[] INT = new int[0]; + public static final Class[] CLASS = new Class[0]; + public static final Object[] OBJECT = new Object[0]; + public static final String[] STRING = new String[0]; + public static final Throwable[] THROWABLE = new Throwable[0]; + public static final StackTraceElement[] STACK_TRACE_ELEMENT = new StackTraceElement[0]; +} diff --git a/LWJGL-Pojav/src/main/java/android/util/MapCollections.java b/LWJGL-Pojav/src/main/java/android/util/MapCollections.java new file mode 100644 index 00000000..acfc1ada --- /dev/null +++ b/LWJGL-Pojav/src/main/java/android/util/MapCollections.java @@ -0,0 +1,557 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.util; + +import java.lang.reflect.Array; +import java.util.Collection; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +/** + * Helper for writing standard Java collection interfaces to a data + * structure like {@link ArrayMap}. + * @hide + */ +abstract class MapCollections { + EntrySet mEntrySet; + KeySet mKeySet; + ValuesCollection mValues; + + final class ArrayIterator implements Iterator { + final int mOffset; + int mSize; + int mIndex; + boolean mCanRemove = false; + + ArrayIterator(int offset) { + mOffset = offset; + mSize = colGetSize(); + } + + @Override + public boolean hasNext() { + return mIndex < mSize; + } + + @Override + public T next() { + Object res = colGetEntry(mIndex, mOffset); + mIndex++; + mCanRemove = true; + return (T)res; + } + + @Override + public void remove() { + if (!mCanRemove) { + throw new IllegalStateException(); + } + mIndex--; + mSize--; + mCanRemove = false; + colRemoveAt(mIndex); + } + } + + final class MapIterator implements Iterator>, Map.Entry { + int mEnd; + int mIndex; + boolean mEntryValid = false; + + MapIterator() { + mEnd = colGetSize() - 1; + mIndex = -1; + } + + @Override + public boolean hasNext() { + return mIndex < mEnd; + } + + @Override + public Map.Entry next() { + mIndex++; + mEntryValid = true; + return this; + } + + @Override + public void remove() { + if (!mEntryValid) { + throw new IllegalStateException(); + } + colRemoveAt(mIndex); + mIndex--; + mEnd--; + mEntryValid = false; + } + + @Override + public K getKey() { + if (!mEntryValid) { + throw new IllegalStateException( + "This container does not support retaining Map.Entry objects"); + } + return (K)colGetEntry(mIndex, 0); + } + + @Override + public V getValue() { + if (!mEntryValid) { + throw new IllegalStateException( + "This container does not support retaining Map.Entry objects"); + } + return (V)colGetEntry(mIndex, 1); + } + + @Override + public V setValue(V object) { + if (!mEntryValid) { + throw new IllegalStateException( + "This container does not support retaining Map.Entry objects"); + } + return colSetValue(mIndex, object); + } + + @Override + public final boolean equals(Object o) { + if (!mEntryValid) { + throw new IllegalStateException( + "This container does not support retaining Map.Entry objects"); + } + if (!(o instanceof Map.Entry)) { + return false; + } + Map.Entry e = (Map.Entry) o; + return Objects.equal(e.getKey(), colGetEntry(mIndex, 0)) + && Objects.equal(e.getValue(), colGetEntry(mIndex, 1)); + } + + @Override + public final int hashCode() { + if (!mEntryValid) { + throw new IllegalStateException( + "This container does not support retaining Map.Entry objects"); + } + final Object key = colGetEntry(mIndex, 0); + final Object value = colGetEntry(mIndex, 1); + return (key == null ? 0 : key.hashCode()) ^ + (value == null ? 0 : value.hashCode()); + } + + @Override + public final String toString() { + return getKey() + "=" + getValue(); + } + } + + final class EntrySet implements Set> { + @Override + public boolean add(Map.Entry object) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean addAll(Collection> collection) { + int oldSize = colGetSize(); + for (Map.Entry entry : collection) { + colPut(entry.getKey(), entry.getValue()); + } + return oldSize != colGetSize(); + } + + @Override + public void clear() { + colClear(); + } + + @Override + public boolean contains(Object o) { + if (!(o instanceof Map.Entry)) + return false; + Map.Entry e = (Map.Entry) o; + int index = colIndexOfKey(e.getKey()); + if (index < 0) { + return false; + } + Object foundVal = colGetEntry(index, 1); + return Objects.equal(foundVal, e.getValue()); + } + + @Override + public boolean containsAll(Collection collection) { + Iterator it = collection.iterator(); + while (it.hasNext()) { + if (!contains(it.next())) { + return false; + } + } + return true; + } + + @Override + public boolean isEmpty() { + return colGetSize() == 0; + } + + @Override + public Iterator> iterator() { + return new MapIterator(); + } + + @Override + public boolean remove(Object object) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean removeAll(Collection collection) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean retainAll(Collection collection) { + throw new UnsupportedOperationException(); + } + + @Override + public int size() { + return colGetSize(); + } + + @Override + public Object[] toArray() { + throw new UnsupportedOperationException(); + } + + @Override + public T[] toArray(T[] array) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean equals(Object object) { + return equalsSetHelper(this, object); + } + + @Override + public int hashCode() { + int result = 0; + for (int i=colGetSize()-1; i>=0; i--) { + final Object key = colGetEntry(i, 0); + final Object value = colGetEntry(i, 1); + result += ( (key == null ? 0 : key.hashCode()) ^ + (value == null ? 0 : value.hashCode()) ); + } + return result; + } + }; + + final class KeySet implements Set { + + @Override + public boolean add(K object) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean addAll(Collection collection) { + throw new UnsupportedOperationException(); + } + + @Override + public void clear() { + colClear(); + } + + @Override + public boolean contains(Object object) { + return colIndexOfKey(object) >= 0; + } + + @Override + public boolean containsAll(Collection collection) { + return containsAllHelper(colGetMap(), collection); + } + + @Override + public boolean isEmpty() { + return colGetSize() == 0; + } + + @Override + public Iterator iterator() { + return new ArrayIterator(0); + } + + @Override + public boolean remove(Object object) { + int index = colIndexOfKey(object); + if (index >= 0) { + colRemoveAt(index); + return true; + } + return false; + } + + @Override + public boolean removeAll(Collection collection) { + return removeAllHelper(colGetMap(), collection); + } + + @Override + public boolean retainAll(Collection collection) { + return retainAllHelper(colGetMap(), collection); + } + + @Override + public int size() { + return colGetSize(); + } + + @Override + public Object[] toArray() { + return toArrayHelper(0); + } + + @Override + public T[] toArray(T[] array) { + return toArrayHelper(array, 0); + } + + @Override + public boolean equals(Object object) { + return equalsSetHelper(this, object); + } + + @Override + public int hashCode() { + int result = 0; + for (int i=colGetSize()-1; i>=0; i--) { + Object obj = colGetEntry(i, 0); + result += obj == null ? 0 : obj.hashCode(); + } + return result; + } + }; + + final class ValuesCollection implements Collection { + + @Override + public boolean add(V object) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean addAll(Collection collection) { + throw new UnsupportedOperationException(); + } + + @Override + public void clear() { + colClear(); + } + + @Override + public boolean contains(Object object) { + return colIndexOfValue(object) >= 0; + } + + @Override + public boolean containsAll(Collection collection) { + Iterator it = collection.iterator(); + while (it.hasNext()) { + if (!contains(it.next())) { + return false; + } + } + return true; + } + + @Override + public boolean isEmpty() { + return colGetSize() == 0; + } + + @Override + public Iterator iterator() { + return new ArrayIterator(1); + } + + @Override + public boolean remove(Object object) { + int index = colIndexOfValue(object); + if (index >= 0) { + colRemoveAt(index); + return true; + } + return false; + } + + @Override + public boolean removeAll(Collection collection) { + int N = colGetSize(); + boolean changed = false; + for (int i=0; i collection) { + int N = colGetSize(); + boolean changed = false; + for (int i=0; i T[] toArray(T[] array) { + return toArrayHelper(array, 1); + } + }; + + public static boolean containsAllHelper(Map map, Collection collection) { + Iterator it = collection.iterator(); + while (it.hasNext()) { + if (!map.containsKey(it.next())) { + return false; + } + } + return true; + } + + public static boolean removeAllHelper(Map map, Collection collection) { + int oldSize = map.size(); + Iterator it = collection.iterator(); + while (it.hasNext()) { + map.remove(it.next()); + } + return oldSize != map.size(); + } + + public static boolean retainAllHelper(Map map, Collection collection) { + int oldSize = map.size(); + Iterator it = map.keySet().iterator(); + while (it.hasNext()) { + if (!collection.contains(it.next())) { + it.remove(); + } + } + return oldSize != map.size(); + } + + public Object[] toArrayHelper(int offset) { + final int N = colGetSize(); + Object[] result = new Object[N]; + for (int i=0; i T[] toArrayHelper(T[] array, int offset) { + final int N = colGetSize(); + if (array.length < N) { + @SuppressWarnings("unchecked") T[] newArray + = (T[]) Array.newInstance(array.getClass().getComponentType(), N); + array = newArray; + } + for (int i=0; i N) { + array[N] = null; + } + return array; + } + + public static boolean equalsSetHelper(Set set, Object object) { + if (set == object) { + return true; + } + if (object instanceof Set) { + Set s = (Set) object; + + try { + return set.size() == s.size() && set.containsAll(s); + } catch (NullPointerException ignored) { + return false; + } catch (ClassCastException ignored) { + return false; + } + } + return false; + } + + public Set> getEntrySet() { + if (mEntrySet == null) { + mEntrySet = new EntrySet(); + } + return mEntrySet; + } + + public Set getKeySet() { + if (mKeySet == null) { + mKeySet = new KeySet(); + } + return mKeySet; + } + + public Collection getValues() { + if (mValues == null) { + mValues = new ValuesCollection(); + } + return mValues; + } + + protected abstract int colGetSize(); + protected abstract Object colGetEntry(int index, int offset); + protected abstract int colIndexOfKey(Object key); + protected abstract int colIndexOfValue(Object key); + protected abstract Map colGetMap(); + protected abstract void colPut(K key, V value); + protected abstract V colSetValue(int index, V value); + protected abstract void colRemoveAt(int index); + protected abstract void colClear(); +} diff --git a/LWJGL-Pojav/src/main/java/android/util/Objects.java b/LWJGL-Pojav/src/main/java/android/util/Objects.java new file mode 100644 index 00000000..64693903 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/android/util/Objects.java @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.util; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Arrays; +public final class Objects { + private Objects() {} + /** + * Returns true if two possibly-null objects are equal. + */ + public static boolean equal(Object a, Object b) { + return a == b || (a != null && a.equals(b)); + } + public static int hashCode(Object o) { + return (o == null) ? 0 : o.hashCode(); + } + /** + * Returns a string reporting the value of each declared field, via reflection. + * Static and transient fields are automatically skipped. Produces output like + * "SimpleClassName[integer=1234,string="hello",character='c',intArray=[1,2,3]]". + */ + public static String toString(Object o) { + Class c = o.getClass(); + StringBuilder sb = new StringBuilder(); + sb.append(c.getSimpleName()).append('['); + int i = 0; + for (Field f : c.getDeclaredFields()) { + if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT)) != 0) { + continue; + } + f.setAccessible(true); + try { + Object value = f.get(o); + if (i++ > 0) { + sb.append(','); + } + sb.append(f.getName()); + sb.append('='); + if (value.getClass().isArray()) { + if (value.getClass() == boolean[].class) { + sb.append(Arrays.toString((boolean[]) value)); + } else if (value.getClass() == byte[].class) { + sb.append(Arrays.toString((byte[]) value)); + } else if (value.getClass() == char[].class) { + sb.append(Arrays.toString((char[]) value)); + } else if (value.getClass() == double[].class) { + sb.append(Arrays.toString((double[]) value)); + } else if (value.getClass() == float[].class) { + sb.append(Arrays.toString((float[]) value)); + } else if (value.getClass() == int[].class) { + sb.append(Arrays.toString((int[]) value)); + } else if (value.getClass() == long[].class) { + sb.append(Arrays.toString((long[]) value)); + } else if (value.getClass() == short[].class) { + sb.append(Arrays.toString((short[]) value)); + } else { + sb.append(Arrays.toString((Object[]) value)); + } + } else if (value.getClass() == Character.class) { + sb.append('\'').append(value).append('\''); + } else if (value.getClass() == String.class) { + sb.append('"').append(value).append('"'); + } else { + sb.append(value); + } + } catch (IllegalAccessException unexpected) { + throw new AssertionError(unexpected); + } + } + sb.append("]"); + return sb.toString(); + } +} diff --git a/LWJGL-Pojav/src/main/java/net/java/openjdk/cacio/ctc/ExternalMouseReader.java b/LWJGL-Pojav/src/main/java/net/java/openjdk/cacio/ctc/ExternalMouseReader.java new file mode 100644 index 00000000..4dfa6934 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/net/java/openjdk/cacio/ctc/ExternalMouseReader.java @@ -0,0 +1,6 @@ +package net.java.openjdk.cacio.ctc; + +public interface ExternalMouseReader { + int getX(); + int getY(); +} diff --git a/LWJGL-Pojav/src/main/java/net/java/openjdk/cacio/ctc/InfdevGrabHandler.java b/LWJGL-Pojav/src/main/java/net/java/openjdk/cacio/ctc/InfdevGrabHandler.java new file mode 100644 index 00000000..3af42ce5 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/net/java/openjdk/cacio/ctc/InfdevGrabHandler.java @@ -0,0 +1,10 @@ +package net.java.openjdk.cacio.ctc; + +public class InfdevGrabHandler { + public static void setMouseReader(ExternalMouseReader reader) { + + } + public static void setGrabbed(boolean grabbed) { + + } +} diff --git a/LWJGL-Pojav/src/main/java/net/minecraft/client/ClientBrandRetriever.java.z b/LWJGL-Pojav/src/main/java/net/minecraft/client/ClientBrandRetriever.java.z new file mode 100644 index 00000000..987a62f0 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/net/minecraft/client/ClientBrandRetriever.java.z @@ -0,0 +1,8 @@ +package net.minecraft.client; + +public class ClientBrandRetriever { + public static String getClientModName() { + // return "vanilla"; + return System.getProperty("net.minecraft.clientmodname", "vanilla"); + } +} diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/CallbackBridge.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/CallbackBridge.java new file mode 100644 index 00000000..74b92386 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/CallbackBridge.java @@ -0,0 +1,51 @@ +package org.lwjgl.glfw; +import java.util.*; + +public class CallbackBridge { + public static final int CLIPBOARD_COPY = 2000; + public static final int CLIPBOARD_PASTE = 2001; + + public static final int EVENT_TYPE_CHAR = 1000; + public static final int EVENT_TYPE_CHAR_MODS = 1001; + public static final int EVENT_TYPE_CURSOR_ENTER = 1002; + public static final int EVENT_TYPE_CURSOR_POS = 1003; + public static final int EVENT_TYPE_FRAMEBUFFER_SIZE = 1004; + public static final int EVENT_TYPE_KEY = 1005; + public static final int EVENT_TYPE_MOUSE_BUTTON = 1006; + public static final int EVENT_TYPE_SCROLL = 1007; + public static final int EVENT_TYPE_WINDOW_SIZE = 1008; + + public static final int ANDROID_TYPE_GRAB_STATE = 0; + + public static final boolean INPUT_DEBUG_ENABLED; + + // TODO send grab state event to Android + + static { + INPUT_DEBUG_ENABLED = Boolean.parseBoolean(System.getProperty("glfwstub.debugInput", "false")); + + +/* + if (isDebugEnabled) { + //try { + //debugEventStream = new PrintStream(new File(System.getProperty("user.dir"), "glfwstub_inputeventlog.txt")); + debugEventStream = System.out; + //} catch (FileNotFoundException e) { + // e.printStackTrace(); + //} + } + + //Quick and dirty: debul all key inputs to System.out +*/ + } + + + public static void sendData(int type, String data) { + nativeSendData(false, type, data); + } + public static native void nativeSendData(boolean isAndroid, int type, String data); + public static native boolean nativeSetInputReady(boolean ready); + public static native String nativeClipboard(int action, byte[] copy); + public static native void nativeSetGrabbing(boolean grab); +} + diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/Callbacks.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/Callbacks.java similarity index 52% rename from LWJGL/src/main/java/org/lwjgl/glfw/Callbacks.java rename to LWJGL-Pojav/src/main/java/org/lwjgl/glfw/Callbacks.java index 375d896f..f014546a 100644 --- a/LWJGL/src/main/java/org/lwjgl/glfw/Callbacks.java +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/Callbacks.java @@ -9,6 +9,7 @@ import org.lwjgl.system.*; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.JNI.*; import static org.lwjgl.system.MemoryUtil.*; +import java.lang.reflect.*; /** Utility class for GLFW callbacks. */ public final class Callbacks { @@ -31,30 +32,20 @@ public final class Callbacks { check(window); } - for (long callback : new long[] { - GLFW.Functions.SetWindowPosCallback, - GLFW.Functions.SetWindowSizeCallback, - GLFW.Functions.SetWindowCloseCallback, - GLFW.Functions.SetWindowRefreshCallback, - GLFW.Functions.SetWindowFocusCallback, - GLFW.Functions.SetWindowIconifyCallback, - GLFW.Functions.SetWindowMaximizeCallback, - GLFW.Functions.SetFramebufferSizeCallback, - GLFW.Functions.SetWindowContentScaleCallback, - GLFW.Functions.SetKeyCallback, - GLFW.Functions.SetCharCallback, - GLFW.Functions.SetCharModsCallback, - GLFW.Functions.SetMouseButtonCallback, - GLFW.Functions.SetCursorPosCallback, - GLFW.Functions.SetCursorEnterCallback, - GLFW.Functions.SetScrollCallback, - GLFW.Functions.SetDropCallback - }) { - long prevCB = invokePPP(window, NULL, callback); - if (prevCB != NULL) { - Callback.free(prevCB); + try { + for (Method callback : GLFW.class.getMethods()) { + if (callback.getName().startsWith("glfwSet") && callback.getName().endsWith("Callback")) { + if (callback.getParameterCount() == 1) { + callback.invoke(null, (Object)null); + } else { + callback.invoke(null, GLFW.glfwGetCurrentContext(), null); + } + } } + } catch (IllegalAccessException|NullPointerException e) { + throw new RuntimeException("org.lwjgl.GLFW.glfwSetXXXCallback() must be set to public and static", e); + } catch (InvocationTargetException e) { + throw new RuntimeException(e); } } - -} \ No newline at end of file +} diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/FCLInjector.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjector.java similarity index 96% rename from LWJGL/src/main/java/org/lwjgl/glfw/FCLInjector.java rename to LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjector.java index 664f90cc..fe0d2c7e 100644 --- a/LWJGL/src/main/java/org/lwjgl/glfw/FCLInjector.java +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjector.java @@ -18,8 +18,8 @@ import static org.lwjgl.system.MemoryUtil.memAddressSafe; */ public class FCLInjector { - public static final long SetInjectorCallBack = apiGetFunctionAddress(GLFW.GLFW, "glfwSetInjectorCallback"); - public static final long SetHitResultType = apiGetFunctionAddress(GLFW.GLFW, "glfwSetHitResultType"); + public static final long SetInjectorCallBack = apiGetFunctionAddress(GLFW.GLFW, "pojavSetInjectorCallback"); + public static final long SetHitResultType = apiGetFunctionAddress(GLFW.GLFW, "pojavSetHitResultType"); private static boolean get = false; private static ClassLoader classLoader; @@ -84,6 +84,10 @@ public class FCLInjector { @Nullable @NativeType("FCLinjectorfun") public static FCLInjectorCallback glfwSetFCLInjectorCallback(@Nullable @NativeType("FCLinjectorfun") FCLInjectorCallbackI cbfun) { +// boolean a =true; +// if (a) { +// throw new IllegalArgumentException("glfwSetFCLInjectorCallback"); +// } return FCLInjectorCallback.createSafe(nglfwSetFCLInjectorCallback(memAddressSafe(cbfun))); } diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/FCLInjectorCallback.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjectorCallback.java similarity index 90% rename from LWJGL/src/main/java/org/lwjgl/glfw/FCLInjectorCallback.java rename to LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjectorCallback.java index 2a7cc925..c7a524a2 100644 --- a/LWJGL/src/main/java/org/lwjgl/glfw/FCLInjectorCallback.java +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjectorCallback.java @@ -12,7 +12,7 @@ public abstract class FCLInjectorCallback extends Callback implements FCLInjecto FCLInjectorCallbackI instance = Callback.get(functionPointer); return instance instanceof FCLInjectorCallback ? (FCLInjectorCallback)instance - : new FCLInjectorCallback.Container(functionPointer, instance); + : new Container(functionPointer, instance); } /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ @@ -25,7 +25,7 @@ public abstract class FCLInjectorCallback extends Callback implements FCLInjecto public static FCLInjectorCallback create(FCLInjectorCallbackI instance) { return instance instanceof FCLInjectorCallback ? (FCLInjectorCallback)instance - : new FCLInjectorCallback.Container(instance.address(), instance); + : new Container(instance.address(), instance); } protected FCLInjectorCallback() { diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/FCLInjectorCallbackI.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjectorCallbackI.java similarity index 100% rename from LWJGL/src/main/java/org/lwjgl/glfw/FCLInjectorCallbackI.java rename to LWJGL-Pojav/src/main/java/org/lwjgl/glfw/FCLInjectorCallbackI.java diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFW.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFW.java new file mode 100644 index 00000000..f0096244 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFW.java @@ -0,0 +1,1385 @@ +/* + * Copyright LWJGL. All rights reserved. + * License terms: https://www.lwjgl.org/license + */ +package org.lwjgl.glfw; + +import android.util.*; + +import java.lang.annotation.Native; +import java.lang.reflect.*; +import java.nio.*; + +import javax.annotation.*; + +import org.lwjgl.*; +import org.lwjgl.system.*; + +import static org.lwjgl.opengl.GL20.*; +import static org.lwjgl.system.APIUtil.*; +import static org.lwjgl.system.Checks.*; +import static org.lwjgl.system.JNI.*; +import static org.lwjgl.system.MemoryStack.*; +import static org.lwjgl.system.MemoryUtil.*; +import java.util.*; + +import sun.misc.Unsafe; + +public class GLFW +{ + static FloatBuffer joystickData = (FloatBuffer)FloatBuffer.allocate(8).flip(); + static ByteBuffer buttonData = (ByteBuffer)ByteBuffer.allocate(8).flip(); + /** The major version number of the GLFW library. This is incremented when the API is changed in non-compatible ways. */ + public static final int GLFW_VERSION_MAJOR = 3; + + /** The minor version number of the GLFW library. This is incremented when features are added to the API but it remains backward-compatible. */ + public static final int GLFW_VERSION_MINOR = 4; + + /** The revision number of the GLFW library. This is incremented when a bug fix release is made that does not contain any API changes. */ + public static final int GLFW_VERSION_REVISION = 0; + + /** Boolean values. */ + public static final int + GLFW_TRUE = 1, + GLFW_FALSE = 0; + + /** The key or button was released. */ + public static final int GLFW_RELEASE = 0; + + /** The key or button was pressed. */ + public static final int GLFW_PRESS = 1; + + /** The key was held down until it repeated. */ + public static final int GLFW_REPEAT = 2; + + /** Joystick hat states. */ + public static final int + GLFW_HAT_CENTERED = 0, + GLFW_HAT_UP = 1, + GLFW_HAT_RIGHT = 2, + GLFW_HAT_DOWN = 4, + GLFW_HAT_LEFT = 8, + GLFW_HAT_RIGHT_UP = (GLFW_HAT_RIGHT | GLFW_HAT_UP), + GLFW_HAT_RIGHT_DOWN = (GLFW_HAT_RIGHT | GLFW_HAT_DOWN), + GLFW_HAT_LEFT_UP = (GLFW_HAT_LEFT | GLFW_HAT_UP), + GLFW_HAT_LEFT_DOWN = (GLFW_HAT_LEFT | GLFW_HAT_DOWN); + + /** The unknown key. */ + public static final int GLFW_KEY_UNKNOWN = -1; + + /** Printable keys. */ + public static final int + GLFW_KEY_SPACE = 32, + GLFW_KEY_APOSTROPHE = 39, + GLFW_KEY_COMMA = 44, + GLFW_KEY_MINUS = 45, + GLFW_KEY_PERIOD = 46, + GLFW_KEY_SLASH = 47, + GLFW_KEY_0 = 48, + GLFW_KEY_1 = 49, + GLFW_KEY_2 = 50, + GLFW_KEY_3 = 51, + GLFW_KEY_4 = 52, + GLFW_KEY_5 = 53, + GLFW_KEY_6 = 54, + GLFW_KEY_7 = 55, + GLFW_KEY_8 = 56, + GLFW_KEY_9 = 57, + GLFW_KEY_SEMICOLON = 59, + GLFW_KEY_EQUAL = 61, + GLFW_KEY_A = 65, + GLFW_KEY_B = 66, + GLFW_KEY_C = 67, + GLFW_KEY_D = 68, + GLFW_KEY_E = 69, + GLFW_KEY_F = 70, + GLFW_KEY_G = 71, + GLFW_KEY_H = 72, + GLFW_KEY_I = 73, + GLFW_KEY_J = 74, + GLFW_KEY_K = 75, + GLFW_KEY_L = 76, + GLFW_KEY_M = 77, + GLFW_KEY_N = 78, + GLFW_KEY_O = 79, + GLFW_KEY_P = 80, + GLFW_KEY_Q = 81, + GLFW_KEY_R = 82, + GLFW_KEY_S = 83, + GLFW_KEY_T = 84, + GLFW_KEY_U = 85, + GLFW_KEY_V = 86, + GLFW_KEY_W = 87, + GLFW_KEY_X = 88, + GLFW_KEY_Y = 89, + GLFW_KEY_Z = 90, + GLFW_KEY_LEFT_BRACKET = 91, + GLFW_KEY_BACKSLASH = 92, + GLFW_KEY_RIGHT_BRACKET = 93, + GLFW_KEY_GRAVE_ACCENT = 96, + GLFW_KEY_WORLD_1 = 161, + GLFW_KEY_WORLD_2 = 162; + + /** Function keys. */ + public static final int + GLFW_KEY_ESCAPE = 256, + GLFW_KEY_ENTER = 257, + GLFW_KEY_TAB = 258, + GLFW_KEY_BACKSPACE = 259, + GLFW_KEY_INSERT = 260, + GLFW_KEY_DELETE = 261, + GLFW_KEY_RIGHT = 262, + GLFW_KEY_LEFT = 263, + GLFW_KEY_DOWN = 264, + GLFW_KEY_UP = 265, + GLFW_KEY_PAGE_UP = 266, + GLFW_KEY_PAGE_DOWN = 267, + GLFW_KEY_HOME = 268, + GLFW_KEY_END = 269, + GLFW_KEY_CAPS_LOCK = 280, + GLFW_KEY_SCROLL_LOCK = 281, + GLFW_KEY_NUM_LOCK = 282, + GLFW_KEY_PRINT_SCREEN = 283, + GLFW_KEY_PAUSE = 284, + GLFW_KEY_F1 = 290, + GLFW_KEY_F2 = 291, + GLFW_KEY_F3 = 292, + GLFW_KEY_F4 = 293, + GLFW_KEY_F5 = 294, + GLFW_KEY_F6 = 295, + GLFW_KEY_F7 = 296, + GLFW_KEY_F8 = 297, + GLFW_KEY_F9 = 298, + GLFW_KEY_F10 = 299, + GLFW_KEY_F11 = 300, + GLFW_KEY_F12 = 301, + GLFW_KEY_F13 = 302, + GLFW_KEY_F14 = 303, + GLFW_KEY_F15 = 304, + GLFW_KEY_F16 = 305, + GLFW_KEY_F17 = 306, + GLFW_KEY_F18 = 307, + GLFW_KEY_F19 = 308, + GLFW_KEY_F20 = 309, + GLFW_KEY_F21 = 310, + GLFW_KEY_F22 = 311, + GLFW_KEY_F23 = 312, + GLFW_KEY_F24 = 313, + GLFW_KEY_F25 = 314, + GLFW_KEY_KP_0 = 320, + GLFW_KEY_KP_1 = 321, + GLFW_KEY_KP_2 = 322, + GLFW_KEY_KP_3 = 323, + GLFW_KEY_KP_4 = 324, + GLFW_KEY_KP_5 = 325, + GLFW_KEY_KP_6 = 326, + GLFW_KEY_KP_7 = 327, + GLFW_KEY_KP_8 = 328, + GLFW_KEY_KP_9 = 329, + GLFW_KEY_KP_DECIMAL = 330, + GLFW_KEY_KP_DIVIDE = 331, + GLFW_KEY_KP_MULTIPLY = 332, + GLFW_KEY_KP_SUBTRACT = 333, + GLFW_KEY_KP_ADD = 334, + GLFW_KEY_KP_ENTER = 335, + GLFW_KEY_KP_EQUAL = 336, + GLFW_KEY_LEFT_SHIFT = 340, + GLFW_KEY_LEFT_CONTROL = 341, + GLFW_KEY_LEFT_ALT = 342, + GLFW_KEY_LEFT_SUPER = 343, + GLFW_KEY_RIGHT_SHIFT = 344, + GLFW_KEY_RIGHT_CONTROL = 345, + GLFW_KEY_RIGHT_ALT = 346, + GLFW_KEY_RIGHT_SUPER = 347, + GLFW_KEY_MENU = 348, + GLFW_KEY_LAST = GLFW_KEY_MENU; + + /** If this bit is set one or more Shift keys were held down. */ + public static final int GLFW_MOD_SHIFT = 0x1; + + /** If this bit is set one or more Control keys were held down. */ + public static final int GLFW_MOD_CONTROL = 0x2; + + /** If this bit is set one or more Alt keys were held down. */ + public static final int GLFW_MOD_ALT = 0x4; + + /** If this bit is set one or more Super keys were held down. */ + public static final int GLFW_MOD_SUPER = 0x8; + + /** If this bit is set the Caps Lock key is enabled and the {@link #GLFW_LOCK_KEY_MODS LOCK_KEY_MODS} input mode is set. */ + public static final int GLFW_MOD_CAPS_LOCK = 0x10; + + /** If this bit is set the Num Lock key is enabled and the {@link #GLFW_LOCK_KEY_MODS LOCK_KEY_MODS} input mode is set. */ + public static final int GLFW_MOD_NUM_LOCK = 0x20; + + + /** Mouse buttons. See mouse button input for how these are used. */ + public static final int + GLFW_MOUSE_BUTTON_1 = 0, + GLFW_MOUSE_BUTTON_2 = 1, + GLFW_MOUSE_BUTTON_3 = 2, + GLFW_MOUSE_BUTTON_4 = 3, + GLFW_MOUSE_BUTTON_5 = 4, + GLFW_MOUSE_BUTTON_6 = 5, + GLFW_MOUSE_BUTTON_7 = 6, + GLFW_MOUSE_BUTTON_8 = 7, + GLFW_MOUSE_BUTTON_LAST = GLFW_MOUSE_BUTTON_8, + GLFW_MOUSE_BUTTON_LEFT = GLFW_MOUSE_BUTTON_1, + GLFW_MOUSE_BUTTON_RIGHT = GLFW_MOUSE_BUTTON_2, + GLFW_MOUSE_BUTTON_MIDDLE = GLFW_MOUSE_BUTTON_3; + + /** Joysticks. See joystick input for how these are used. */ + public static final int + GLFW_JOYSTICK_1 = 0, + GLFW_JOYSTICK_2 = 1, + GLFW_JOYSTICK_3 = 2, + GLFW_JOYSTICK_4 = 3, + GLFW_JOYSTICK_5 = 4, + GLFW_JOYSTICK_6 = 5, + GLFW_JOYSTICK_7 = 6, + GLFW_JOYSTICK_8 = 7, + GLFW_JOYSTICK_9 = 8, + GLFW_JOYSTICK_10 = 9, + GLFW_JOYSTICK_11 = 10, + GLFW_JOYSTICK_12 = 11, + GLFW_JOYSTICK_13 = 12, + GLFW_JOYSTICK_14 = 13, + GLFW_JOYSTICK_15 = 14, + GLFW_JOYSTICK_16 = 15, + GLFW_JOYSTICK_LAST = GLFW_JOYSTICK_16; + + /** Gamepad buttons. See gamepad for how these are used. */ + public static final int + GLFW_GAMEPAD_BUTTON_A = 0, + GLFW_GAMEPAD_BUTTON_B = 1, + GLFW_GAMEPAD_BUTTON_X = 2, + GLFW_GAMEPAD_BUTTON_Y = 3, + GLFW_GAMEPAD_BUTTON_LEFT_BUMPER = 4, + GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER = 5, + GLFW_GAMEPAD_BUTTON_BACK = 6, + GLFW_GAMEPAD_BUTTON_START = 7, + GLFW_GAMEPAD_BUTTON_GUIDE = 8, + GLFW_GAMEPAD_BUTTON_LEFT_THUMB = 9, + GLFW_GAMEPAD_BUTTON_RIGHT_THUMB = 10, + GLFW_GAMEPAD_BUTTON_DPAD_UP = 11, + GLFW_GAMEPAD_BUTTON_DPAD_RIGHT = 12, + GLFW_GAMEPAD_BUTTON_DPAD_DOWN = 13, + GLFW_GAMEPAD_BUTTON_DPAD_LEFT = 14, + GLFW_GAMEPAD_BUTTON_LAST = GLFW_GAMEPAD_BUTTON_DPAD_LEFT, + GLFW_GAMEPAD_BUTTON_CROSS = GLFW_GAMEPAD_BUTTON_A, + GLFW_GAMEPAD_BUTTON_CIRCLE = GLFW_GAMEPAD_BUTTON_B, + GLFW_GAMEPAD_BUTTON_SQUARE = GLFW_GAMEPAD_BUTTON_X, + GLFW_GAMEPAD_BUTTON_TRIANGLE = GLFW_GAMEPAD_BUTTON_Y; + + /** Gamepad axes. See gamepad for how these are used. */ + public static final int + GLFW_GAMEPAD_AXIS_LEFT_X = 0, + GLFW_GAMEPAD_AXIS_LEFT_Y = 1, + GLFW_GAMEPAD_AXIS_RIGHT_X = 2, + GLFW_GAMEPAD_AXIS_RIGHT_Y = 3, + GLFW_GAMEPAD_AXIS_LEFT_TRIGGER = 4, + GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER = 5, + GLFW_GAMEPAD_AXIS_LAST = GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER; + + public static final int + GLFW_NO_ERROR = 0, + GLFW_NOT_INITIALIZED = 0x10001, + GLFW_NO_CURRENT_CONTEXT = 0x10002, + GLFW_INVALID_ENUM = 0x10003, + GLFW_INVALID_VALUE = 0x10004, + GLFW_OUT_OF_MEMORY = 0x10005, + GLFW_API_UNAVAILABLE = 0x10006, + GLFW_VERSION_UNAVAILABLE = 0x10007, + GLFW_PLATFORM_ERROR = 0x10008, + GLFW_FORMAT_UNAVAILABLE = 0x10009, + GLFW_NO_WINDOW_CONTEXT = 0x1000A, + GLFW_CURSOR_UNAVAILABLE = 0x1000B, + GLFW_FEATURE_UNAVAILABLE = 0x1000C, + GLFW_FEATURE_UNIMPLEMENTED = 0x1000D; + + public static final int + GLFW_FOCUSED = 0x20001, + GLFW_ICONIFIED = 0x20002, + GLFW_RESIZABLE = 0x20003, + GLFW_VISIBLE = 0x20004, + GLFW_DECORATED = 0x20005, + GLFW_AUTO_ICONIFY = 0x20006, + GLFW_FLOATING = 0x20007, + GLFW_MAXIMIZED = 0x20008, + GLFW_CENTER_CURSOR = 0x20009, + GLFW_TRANSPARENT_FRAMEBUFFER = 0x2000A, + GLFW_HOVERED = 0x2000B, + GLFW_FOCUS_ON_SHOW = 0x2000C; + + /** Input options. */ + public static final int + GLFW_CURSOR = 0x33001, + GLFW_STICKY_KEYS = 0x33002, + GLFW_STICKY_MOUSE_BUTTONS = 0x33003, + GLFW_LOCK_KEY_MODS = 0x33004, + GLFW_RAW_MOUSE_MOTION = 0x33005; + + /** Cursor state. */ + public static final int + GLFW_CURSOR_NORMAL = 0x34001, + GLFW_CURSOR_HIDDEN = 0x34002, + GLFW_CURSOR_DISABLED = 0x34003; + + /** The regular arrow cursor shape. */ + public static final int GLFW_ARROW_CURSOR = 0x36001; + + /** The text input I-beam cursor shape. */ + public static final int GLFW_IBEAM_CURSOR = 0x36002; + + /** The crosshair cursor shape. */ + public static final int GLFW_CROSSHAIR_CURSOR = 0x36003; + + /** The pointing hand cursor shape. */ + public static final int GLFW_POINTING_HAND_CURSOR = 0x36004; + + public static final int GLFW_RESIZE_EW_CURSOR = 0x36005; + public static final int GLFW_RESIZE_NS_CURSOR = 0x36006; + public static final int GLFW_RESIZE_NWSE_CURSOR = 0x36007; + public static final int GLFW_RESIZE_NESW_CURSOR = 0x36008; + + /** + * The omni-directional resize cursor/move shape. + * + *

This is usually either a combined horizontal and vertical double-headed arrow or a grabbing hand.

+ */ + public static final int GLFW_RESIZE_ALL_CURSOR = 0x36009; + + public static final int GLFW_NOT_ALLOWED_CURSOR = 0x3600A; + + /** Legacy name for compatibility. */ + public static final int GLFW_HRESIZE_CURSOR = GLFW_RESIZE_EW_CURSOR; + + /** Legacy name for compatibility. */ + public static final int GLFW_VRESIZE_CURSOR = GLFW_RESIZE_NS_CURSOR; + + /** Legacy name for compatibility. */ + public static final int GLFW_HAND_CURSOR = GLFW_POINTING_HAND_CURSOR; + + /** Monitor events. */ + public static final int + GLFW_CONNECTED = 0x40001, + GLFW_DISCONNECTED = 0x40002; + + /** Init hints. */ + public static final int + GLFW_JOYSTICK_HAT_BUTTONS = 0x50001, + GLFW_COCOA_CHDIR_RESOURCES = 0x51001, + GLFW_COCOA_MENUBAR = 0x51002; + + /** Hint value for {@link #GLFW_PLATFORM PLATFORM} that enables automatic platform selection. */ + public static final int + GLFW_ANY_PLATFORM = 0x60000, + GLFW_PLATFORM_WIN32 = 0x60001, + GLFW_PLATFORM_COCOA = 0x60002, + GLFW_PLATFORM_WAYLAND = 0x60003, + GLFW_PLATFORM_X11 = 0x60004, + GLFW_PLATFORM_NULL = 0x60005; + + /** Don't care value. */ + public static final int GLFW_DONT_CARE = -1; + + /** PixelFormat hints. */ + public static final int + GLFW_RED_BITS = 0x21001, + GLFW_GREEN_BITS = 0x21002, + GLFW_BLUE_BITS = 0x21003, + GLFW_ALPHA_BITS = 0x21004, + GLFW_DEPTH_BITS = 0x21005, + GLFW_STENCIL_BITS = 0x21006, + GLFW_ACCUM_RED_BITS = 0x21007, + GLFW_ACCUM_GREEN_BITS = 0x21008, + GLFW_ACCUM_BLUE_BITS = 0x21009, + GLFW_ACCUM_ALPHA_BITS = 0x2100A, + GLFW_AUX_BUFFERS = 0x2100B, + GLFW_STEREO = 0x2100C, + GLFW_SAMPLES = 0x2100D, + GLFW_SRGB_CAPABLE = 0x2100E, + GLFW_REFRESH_RATE = 0x2100F, + GLFW_DOUBLEBUFFER = 0x21010; + + public static final int + GLFW_CLIENT_API = 0x22001, + GLFW_CONTEXT_VERSION_MAJOR = 0x22002, + GLFW_CONTEXT_VERSION_MINOR = 0x22003, + GLFW_CONTEXT_REVISION = 0x22004, + GLFW_CONTEXT_ROBUSTNESS = 0x22005, + GLFW_OPENGL_FORWARD_COMPAT = 0x22006, + GLFW_OPENGL_DEBUG_CONTEXT = 0x22007, + GLFW_OPENGL_PROFILE = 0x22008, + GLFW_CONTEXT_RELEASE_BEHAVIOR = 0x22009, + GLFW_CONTEXT_NO_ERROR = 0x2200A, + GLFW_CONTEXT_CREATION_API = 0x2200B, + GLFW_SCALE_TO_MONITOR = 0x2200C; + + /** Specifies whether to use full resolution framebuffers on Retina displays. This is ignored on other platforms. */ + public static final int GLFW_COCOA_RETINA_FRAMEBUFFER = 0x23001; + + /** + * Specifies the UTF-8 encoded name to use for autosaving the window frame, or if empty disables frame autosaving for the window. This is ignored on other + * platforms. This is set with {@link #glfwWindowHintString WindowHintString}. + */ + public static final int GLFW_COCOA_FRAME_NAME = 0x23002; + + /** + * Specifies whether to enable Automatic Graphics Switching, i.e. to allow the system to choose the integrated GPU for the OpenGL context and move it + * between GPUs if necessary or whether to force it to always run on the discrete GPU. This only affects systems with both integrated and discrete GPUs. + * This is ignored on other platforms. + */ + public static final int GLFW_COCOA_GRAPHICS_SWITCHING = 0x23003; + + /** The desired ASCII encoded class and instance parts of the ICCCM {@code WM_CLASS} window property. These are set with {@link #glfwWindowHintString WindowHintString}. */ + public static final int + GLFW_X11_CLASS_NAME = 0x24001, + GLFW_X11_INSTANCE_NAME = 0x24002; + + /** + * Specifies whether to allow access to the window menu via the Alt+Space and Alt-and-then-Space keyboard shortcuts. + * + *

This is ignored on other platforms.

+ */ + public static final int GLFW_WIN32_KEYBOARD_MENU = 0x25001; + + /** Values for the {@link #GLFW_CLIENT_API CLIENT_API} hint. */ + public static final int + GLFW_NO_API = 0, + GLFW_OPENGL_API = 0x30001, + GLFW_OPENGL_ES_API = 0x30002; + + /** Values for the {@link #GLFW_CONTEXT_ROBUSTNESS CONTEXT_ROBUSTNESS} hint. */ + public static final int + GLFW_NO_ROBUSTNESS = 0, + GLFW_NO_RESET_NOTIFICATION = 0x31001, + GLFW_LOSE_CONTEXT_ON_RESET = 0x31002; + + /** Values for the {@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE} hint. */ + public static final int + GLFW_OPENGL_ANY_PROFILE = 0, + GLFW_OPENGL_CORE_PROFILE = 0x32001, + GLFW_OPENGL_COMPAT_PROFILE = 0x32002; + + /** Values for the {@link #GLFW_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR} hint. */ + public static final int + GLFW_ANY_RELEASE_BEHAVIOR = 0, + GLFW_RELEASE_BEHAVIOR_FLUSH = 0x35001, + GLFW_RELEASE_BEHAVIOR_NONE = 0x35002; + + /** Values for the {@link #GLFW_CONTEXT_CREATION_API CONTEXT_CREATION_API} hint. */ + public static final int + GLFW_NATIVE_CONTEXT_API = 0x36001, + GLFW_EGL_CONTEXT_API = 0x36002, + GLFW_OSMESA_CONTEXT_API = 0x36003; + + // GLFW Callbacks + /* volatile */ public static GLFWCharCallback mGLFWCharCallback; + /* volatile */ public static GLFWCharModsCallback mGLFWCharModsCallback; + /* volatile */ public static GLFWCursorEnterCallback mGLFWCursorEnterCallback; + /* volatile */ public static GLFWCursorPosCallback mGLFWCursorPosCallback; + /* volatile */ public static GLFWDropCallback mGLFWDropCallback; + /* volatile */ public static GLFWErrorCallback mGLFWErrorCallback; + /* volatile */ public static GLFWFramebufferSizeCallback mGLFWFramebufferSizeCallback; + /* volatile */ public static GLFWJoystickCallback mGLFWJoystickCallback; + /* volatile */ public static GLFWKeyCallback mGLFWKeyCallback; + /* volatile */ public static GLFWMonitorCallback mGLFWMonitorCallback; + /* volatile */ public static GLFWMouseButtonCallback mGLFWMouseButtonCallback; + /* volatile */ public static GLFWScrollCallback mGLFWScrollCallback; + /* volatile */ public static GLFWWindowCloseCallback mGLFWWindowCloseCallback; + /* volatile */ public static GLFWWindowContentScaleCallback mGLFWWindowContentScaleCallback; + /* volatile */ public static GLFWWindowFocusCallback mGLFWWindowFocusCallback; + /* volatile */ public static GLFWWindowIconifyCallback mGLFWWindowIconifyCallback; + /* volatile */ public static GLFWWindowMaximizeCallback mGLFWWindowMaximizeCallback; + /* volatile */ public static GLFWWindowPosCallback mGLFWWindowPosCallback; + /* volatile */ public static GLFWWindowRefreshCallback mGLFWWindowRefreshCallback; + /* volatile */ public static GLFWWindowSizeCallback mGLFWWindowSizeCallback; + + volatile public static int mGLFWWindowWidth, mGLFWWindowHeight; + + private static GLFWGammaRamp mGLFWGammaRamp; + private static Map mGLFWKeyCodes; + private static GLFWVidMode mGLFWVideoMode; + private static long mGLFWWindowMonitor; + + private static double mGLFWInitialTime; + + private static ArrayMap mGLFWWindowMap; + public static boolean mGLFWIsInputReady; + public static final ByteBuffer keyDownBuffer = ByteBuffer.allocateDirect(317); + public static final ByteBuffer mouseDownBuffer = ByteBuffer.allocateDirect(8); + + private static final String PROP_WINDOW_WIDTH = "glfwstub.windowWidth"; + private static final String PROP_WINDOW_HEIGHT= "glfwstub.windowHeight"; + public static long mainContext = 0; + + static { + String windowWidth = System.getProperty(PROP_WINDOW_WIDTH); + String windowHeight = System.getProperty(PROP_WINDOW_HEIGHT); + if (windowWidth == null || windowHeight == null) { + System.err.println("Warning: Property " + PROP_WINDOW_WIDTH + " or " + PROP_WINDOW_HEIGHT + " not set, defaulting to 1280 and 720"); + + mGLFWWindowWidth = 1280; + mGLFWWindowHeight = 720; + } else { + mGLFWWindowWidth = Integer.parseInt(windowWidth); + mGLFWWindowHeight = Integer.parseInt(windowHeight); + } + + // Minecraft triggers a glfwPollEvents() on splash screen, so update window size there. + // CallbackBridge.receiveCallback(CallbackBridge.EVENT_TYPE_FRAMEBUFFER_SIZE, mGLFWWindowWidth, mGLFWWindowHeight, 0, 0); + // CallbackBridge.receiveCallback(CallbackBridge.EVENT_TYPE_WINDOW_SIZE, mGLFWWindowWidth, mGLFWWindowHeight, 0, 0); + + try { + System.loadLibrary("pojavexec"); + } catch (UnsatisfiedLinkError e) { + e.printStackTrace(); + } + mGLFWErrorCallback = GLFWErrorCallback.createPrint(); + mGLFWKeyCodes = new ArrayMap<>(); + + mGLFWWindowMap = new ArrayMap<>(); + + mGLFWVideoMode = new GLFWVidMode(ByteBuffer.allocateDirect(GLFWVidMode.SIZEOF)); + memPutInt(mGLFWVideoMode.address() + mGLFWVideoMode.WIDTH, mGLFWWindowWidth); + memPutInt(mGLFWVideoMode.address() + mGLFWVideoMode.HEIGHT, mGLFWWindowHeight); + memPutInt(mGLFWVideoMode.address() + mGLFWVideoMode.REDBITS, 8); + memPutInt(mGLFWVideoMode.address() + mGLFWVideoMode.GREENBITS, 8); + memPutInt(mGLFWVideoMode.address() + mGLFWVideoMode.BLUEBITS, 8); + memPutInt(mGLFWVideoMode.address() + mGLFWVideoMode.REFRESHRATE, 60); + + // A way to generate key code names + Field[] thisFieldArr = GLFW.class.getFields(); + try { + for (Field thisField : thisFieldArr) { + if (thisField.getName().startsWith("GLFW_KEY_")) { + mGLFWKeyCodes.put( + (int) thisField.get(null), + thisField.getName().substring(9, 10).toUpperCase() + + thisField.getName().substring(10).replace("_", " ").toLowerCase() + ); + } + } + } catch (IllegalAccessException e) { + // This will never happen since this is accessing itself + } + + /* + mGLFWMonitorCallback = new GLFWMonitorCallback(){ + + // Fake one!!! + @Override + public void free() {} + + @Override + public void callback(long args) { + // TODO: Implement this method + } + }; + */ + } + + private static native long nglfwSetCharCallback(long window, long ptr); + private static native long nglfwSetCharModsCallback(long window, long ptr); + private static native long nglfwSetCursorEnterCallback(long window, long ptr); + private static native long nglfwSetCursorPosCallback(long window, long ptr); + private static native long nglfwSetFramebufferSizeCallback(long window, long ptr); + private static native long nglfwSetKeyCallback(long window, long ptr); + private static native long nglfwSetMouseButtonCallback(long window, long ptr); + private static native long nglfwSetScrollCallback(long window, long ptr); + private static native long nglfwSetWindowSizeCallback(long window, long ptr); + // private static native void nglfwSetInputReady(); + private static native void nglfwSetShowingWindow(long window); + + /* + private static void priGlfwSetError(int error) { + mGLFW_currentError = error; + if (error != GLFW_NO_ERROR && mGLFWErrorCallback != null) { + mGLFWErrorCallback.invoke(error, 0); + } + } + + private static void priGlfwNoError() { + priGlfwSetError(GLFW_NO_ERROR); + } + */ + protected GLFW() { + throw new UnsupportedOperationException(); + } + + public static final SharedLibrary GLFW = Library.loadNative(GLFW.class, "org.lwjgl.glfw", "libpojavexec.so", true); + + /** Contains the function pointers loaded from the glfw {@link SharedLibrary}. */ + public static final class Functions { + + private Functions() {} + + /** Function address. */ + public static final long + Init = apiGetFunctionAddress(GLFW, "pojavInit"), + CreateContext = apiGetFunctionAddress(GLFW, "pojavCreateContext"), + GetCurrentContext = apiGetFunctionAddress(GLFW, "pojavGetCurrentContext"), + //DetachOnCurrentThread = apiGetFunctionAddress(GLFW, "pojavDetachOnCurrentThread"), + MakeContextCurrent = apiGetFunctionAddress(GLFW, "pojavMakeCurrent"), + Terminate = apiGetFunctionAddress(GLFW, "pojavTerminate"), + SetWindowHint = apiGetFunctionAddress(GLFW, "pojavSetWindowHint"), + SwapBuffers = apiGetFunctionAddress(GLFW, "pojavSwapBuffers"), + SwapInterval = apiGetFunctionAddress(GLFW, "pojavSwapInterval"), + PumpEvents = apiGetFunctionAddress(GLFW, "pojavPumpEvents"), + RewindEvents = apiGetFunctionAddress(GLFW, "pojavRewindEvents"), + SetupEvents = apiGetFunctionAddress(GLFW, "pojavComputeEventTarget"); + } + + public static SharedLibrary getLibrary() { + return GLFW; + } + + public static void internalChangeMonitorSize(int width, int height) { + mGLFWWindowWidth = width; + mGLFWWindowHeight = height; + if (mGLFWVideoMode == null) return; + memPutInt(mGLFWVideoMode.address() + (long) mGLFWVideoMode.WIDTH, mGLFWWindowWidth); + memPutInt(mGLFWVideoMode.address() + (long) mGLFWVideoMode.HEIGHT, mGLFWWindowHeight); + } + + public static GLFWWindowProperties internalGetWindow(long window) { + GLFWWindowProperties win = mGLFWWindowMap.get(window); + if (win == null) { + throw new IllegalArgumentException("No window pointer found: " + window); + } + return win; + } + + // Generated stub callback methods + public static GLFWCharCallback glfwSetCharCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcharfun") GLFWCharCallbackI cbfun) { + GLFWCharCallback lastCallback = mGLFWCharCallback; + if (cbfun == null) mGLFWCharCallback = null; + else mGLFWCharCallback = GLFWCharCallback.createSafe(nglfwSetCharCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWCharModsCallback glfwSetCharModsCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcharmodsfun") GLFWCharModsCallbackI cbfun) { + GLFWCharModsCallback lastCallback = mGLFWCharModsCallback; + if (cbfun == null) mGLFWCharModsCallback = null; + else mGLFWCharModsCallback = GLFWCharModsCallback.createSafe(nglfwSetCharModsCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWCursorEnterCallback glfwSetCursorEnterCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcursorenterfun") GLFWCursorEnterCallbackI cbfun) { + GLFWCursorEnterCallback lastCallback = mGLFWCursorEnterCallback; + if (cbfun == null) mGLFWCursorEnterCallback = null; + else mGLFWCursorEnterCallback = GLFWCursorEnterCallback.createSafe(nglfwSetCursorEnterCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWCursorPosCallback glfwSetCursorPosCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcursorposfun") GLFWCursorPosCallbackI cbfun) { + GLFWCursorPosCallback lastCallback = mGLFWCursorPosCallback; + if (cbfun == null) mGLFWCursorPosCallback = null; + else mGLFWCursorPosCallback = GLFWCursorPosCallback.createSafe(nglfwSetCursorPosCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWDropCallback glfwSetDropCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWdropfun") GLFWDropCallbackI cbfun) { + GLFWDropCallback lastCallback = mGLFWDropCallback; + if (cbfun == null) mGLFWDropCallback = null; + else mGLFWDropCallback = GLFWDropCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWErrorCallback glfwSetErrorCallback(@Nullable @NativeType("GLFWerrorfun") GLFWErrorCallbackI cbfun) { + GLFWErrorCallback lastCallback = mGLFWErrorCallback; + if (cbfun == null) mGLFWErrorCallback = null; + else mGLFWErrorCallback = GLFWErrorCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWFramebufferSizeCallback glfwSetFramebufferSizeCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWframebuffersizefun") GLFWFramebufferSizeCallbackI cbfun) { + GLFWFramebufferSizeCallback lastCallback = mGLFWFramebufferSizeCallback; + if (cbfun == null) mGLFWFramebufferSizeCallback = null; + else mGLFWFramebufferSizeCallback = GLFWFramebufferSizeCallback.createSafe(nglfwSetFramebufferSizeCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWJoystickCallback glfwSetJoystickCallback(/* @NativeType("GLFWwindow *") long window, */ @Nullable @NativeType("GLFWjoystickfun") GLFWJoystickCallbackI cbfun) { + GLFWJoystickCallback lastCallback = mGLFWJoystickCallback; + if (cbfun == null) mGLFWJoystickCallback = null; + else mGLFWJoystickCallback = GLFWJoystickCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWKeyCallback glfwSetKeyCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWkeyfun") GLFWKeyCallbackI cbfun) { + GLFWKeyCallback lastCallback = mGLFWKeyCallback; + if (cbfun == null) mGLFWKeyCallback = null; + else mGLFWKeyCallback = GLFWKeyCallback.createSafe(nglfwSetKeyCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWMonitorCallback glfwSetMonitorCallback(@Nullable @NativeType("GLFWmonitorfun") GLFWMonitorCallbackI cbfun) { + GLFWMonitorCallback lastCallback = mGLFWMonitorCallback; + if (cbfun == null) mGLFWMonitorCallback = null; + else mGLFWMonitorCallback = GLFWMonitorCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWMouseButtonCallback glfwSetMouseButtonCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWmousebuttonfun") GLFWMouseButtonCallbackI cbfun) { + GLFWMouseButtonCallback lastCallback = mGLFWMouseButtonCallback; + if (cbfun == null) mGLFWMouseButtonCallback = null; + else mGLFWMouseButtonCallback = GLFWMouseButtonCallback.createSafe(nglfwSetMouseButtonCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWScrollCallback glfwSetScrollCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWscrollfun") GLFWScrollCallbackI cbfun) { + GLFWScrollCallback lastCallback = mGLFWScrollCallback; + if (cbfun == null) mGLFWScrollCallback = null; + else mGLFWScrollCallback = GLFWScrollCallback.createSafe(nglfwSetScrollCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + public static GLFWWindowCloseCallback glfwSetWindowCloseCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowclosefun") GLFWWindowCloseCallbackI cbfun) { + GLFWWindowCloseCallback lastCallback = mGLFWWindowCloseCallback; + if (cbfun == null) mGLFWWindowCloseCallback = null; + else mGLFWWindowCloseCallback = GLFWWindowCloseCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWWindowContentScaleCallback glfwSetWindowContentScaleCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowcontentscalefun") GLFWWindowContentScaleCallbackI cbfun) { + GLFWWindowContentScaleCallback lastCallback = mGLFWWindowContentScaleCallback; + if (cbfun == null) mGLFWWindowContentScaleCallback = null; + else mGLFWWindowContentScaleCallback = GLFWWindowContentScaleCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWWindowFocusCallback glfwSetWindowFocusCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowfocusfun") GLFWWindowFocusCallbackI cbfun) { + GLFWWindowFocusCallback lastCallback = mGLFWWindowFocusCallback; + if (cbfun == null) mGLFWWindowFocusCallback = null; + else mGLFWWindowFocusCallback = GLFWWindowFocusCallback.create(cbfun); + return lastCallback; + } + + public static GLFWWindowIconifyCallback glfwSetWindowIconifyCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowiconifyfun") GLFWWindowIconifyCallbackI cbfun) { + GLFWWindowIconifyCallback lastCallback = mGLFWWindowIconifyCallback; + if (cbfun == null) mGLFWWindowIconifyCallback = null; + else mGLFWWindowIconifyCallback = GLFWWindowIconifyCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWWindowMaximizeCallback glfwSetWindowMaximizeCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowmaximizefun") GLFWWindowMaximizeCallbackI cbfun) { + GLFWWindowMaximizeCallback lastCallback = mGLFWWindowMaximizeCallback; + if (cbfun == null) mGLFWWindowMaximizeCallback = null; + else mGLFWWindowMaximizeCallback = GLFWWindowMaximizeCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWWindowPosCallback glfwSetWindowPosCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowposfun") GLFWWindowPosCallbackI cbfun) { + GLFWWindowPosCallback lastCallback = mGLFWWindowPosCallback; + if (cbfun == null) mGLFWWindowPosCallback = null; + else mGLFWWindowPosCallback = GLFWWindowPosCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWWindowRefreshCallback glfwSetWindowRefreshCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowrefreshfun") GLFWWindowRefreshCallbackI cbfun) { + GLFWWindowRefreshCallback lastCallback = mGLFWWindowRefreshCallback; + if (cbfun == null) mGLFWWindowRefreshCallback = null; + else mGLFWWindowRefreshCallback = GLFWWindowRefreshCallback.create(cbfun); + + return lastCallback; + } + + public static GLFWWindowSizeCallback glfwSetWindowSizeCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowsizefun") GLFWWindowSizeCallbackI cbfun) { + GLFWWindowSizeCallback lastCallback = mGLFWWindowSizeCallback; + if (cbfun == null) mGLFWWindowSizeCallback = null; + else mGLFWWindowSizeCallback = GLFWWindowSizeCallback.createSafe(nglfwSetWindowSizeCallback(window, memAddressSafe(cbfun))); + + return lastCallback; + } + + static boolean isGLFWReady; + public static boolean glfwInit() { + if (!isGLFWReady) { + //CallbackBridge.nativeAttachThreadToOther(false, false); + mGLFWInitialTime = (double) System.nanoTime(); + long __functionAddress = Functions.Init; + isGLFWReady = invokeI(__functionAddress) != 0; + FCLInjector.setClassLoader(Thread.currentThread().getContextClassLoader()); + } + return isGLFWReady; + } + + public static void glfwTerminate() { + mGLFWIsInputReady = false; + CallbackBridge.nativeSetInputReady(false); + + long __functionAddress = Functions.Terminate; + invokeV(__functionAddress); + } + + public static void glfwInitHint(int hint, int value) { } + + public static int glfwGetPlatform() { + return GLFW_PLATFORM_X11; + } + + @NativeType("GLFWwindow *") + public static long glfwGetCurrentContext() { + long __functionAddress = Functions.GetCurrentContext; + return invokeP(__functionAddress); + } + + public static void glfwGetFramebufferSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height) { + if (CHECKS) { + checkSafe(width, 1); + checkSafe(height, 1); + } + width.put(internalGetWindow(window).width); + height.put(internalGetWindow(window).height); + } + + @Nullable + @NativeType("GLFWmonitor **") + public static PointerBuffer glfwGetMonitors() { + PointerBuffer pBuffer = PointerBuffer.allocateDirect(1); + pBuffer.put(glfwGetPrimaryMonitor()); + return pBuffer; + } + + public static long glfwGetPrimaryMonitor() { + // Prevent NULL check + return 1L; + } + + public static void glfwGetMonitorPos(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") IntBuffer xpos, @Nullable @NativeType("int *") IntBuffer ypos) { + if (CHECKS) { + checkSafe(xpos, 1); + checkSafe(ypos, 1); + } + + xpos.put(0); + ypos.put(0); + } + + public static void glfwGetMonitorWorkarea(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") IntBuffer xpos, @Nullable @NativeType("int *") IntBuffer ypos, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height) { + if (CHECKS) { + checkSafe(xpos, 1); + checkSafe(ypos, 1); + checkSafe(width, 1); + checkSafe(height, 1); + } + + xpos.put(0); + ypos.put(0); + width.put(mGLFWWindowWidth); + height.put(mGLFWWindowHeight); + } + + @NativeType("GLFWmonitor *") + public static long glfwGetWindowMonitor(@NativeType("GLFWwindow *") long window) { + return mGLFWWindowMonitor; + } + + public static void glfwSetWindowMonitor(@NativeType("GLFWwindow *") long window, @NativeType("GLFWmonitor *") long monitor, int xpos, int ypos, int width, int height, int refreshRate) { + // weird calculation to fake pointer + mGLFWWindowMonitor = window * monitor; + } + + public static int glfwGetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib) { + return internalGetWindow(window).windowAttribs.getOrDefault(attrib, 0); + } + + public static void glfwSetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib, int value) { + internalGetWindow(window).windowAttribs.put(attrib, value); + } + + public static void glfwGetVersion(IntBuffer major, IntBuffer minor, IntBuffer rev) { + if (CHECKS) { + checkSafe(major, 1); + checkSafe(minor, 1); + checkSafe(rev, 1); + } + + major.put(GLFW_VERSION_MAJOR); + minor.put(GLFW_VERSION_MINOR); + rev.put(GLFW_VERSION_REVISION); + } + + public static String glfwGetVersionString() { + return GLFW_VERSION_MAJOR + "." + GLFW_VERSION_MINOR + "." + GLFW_VERSION_REVISION; + } + + public static int glfwGetError(@Nullable PointerBuffer description) { + return GLFW_NO_ERROR; + } + + @Nullable + @NativeType("GLFWvidmode const *") + public static GLFWVidMode.Buffer glfwGetVideoModes(@NativeType("GLFWmonitor *") long monitor) { + MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); + try { + // long __result = nglfwGetVideoModes(monitor, memAddress(count)); + long __result = glfwGetVideoMode(monitor).address(); + return GLFWVidMode.createSafe(__result, 1); + } finally { + stack.setPointer(stackPointer); + } + } + + @Nullable + public static GLFWVidMode glfwGetVideoMode(long monitor) { + return mGLFWVideoMode; + } + + public static GLFWGammaRamp glfwGetGammaRamp(@NativeType("GLFWmonitor *") long monitor) { + return mGLFWGammaRamp; + } + public static void glfwSetGammaRamp(@NativeType("GLFWmonitor *") long monitor, @NativeType("const GLFWgammaramp *") GLFWGammaRamp ramp) { + mGLFWGammaRamp = ramp; + } + + public static void glfwMakeContextCurrent(@NativeType("GLFWwindow *") long window) { + long __functionAddress = Functions.MakeContextCurrent; + invokePV(window, __functionAddress); + } + + public static void glfwSwapBuffers(@NativeType("GLFWwindow *") long window) { + long __functionAddress = Functions.SwapBuffers; + invokePV(window, __functionAddress); + } + + public static void glfwSwapInterval(int interval) { + long __functionAddress = Functions.SwapInterval; + invokeV(interval, __functionAddress); + } + + // private static double mTime = 0d; + public static double glfwGetTime() { + // Boardwalk: just use system timer + // System.out.println("glfwGetTime"); + return (System.nanoTime() - mGLFWInitialTime) / 1.e9; + } + + public static void glfwSetTime(double time) { + mGLFWInitialTime = System.nanoTime() - (long) time; + } + + public static long glfwGetTimerValue() { + return System.currentTimeMillis(); + } + + public static long glfwGetTimerFrequency() { + // FIXME set correct value!! + return 60; + } + + // GLFW Window functions + public static long nglfwCreateContext(long share) { + return invokePP(share, Functions.CreateContext); + } + public static long glfwCreateWindow(int width, int height, CharSequence title, long monitor, long share) { + // Create an ACTUAL EGL context + long ptr = nglfwCreateContext(share); + //nativeEglMakeCurrent(ptr); + GLFWWindowProperties win = new GLFWWindowProperties(); + // win.width = width; + // win.height = height; + + win.width = mGLFWWindowWidth; + win.height = mGLFWWindowHeight; + win.title = title; + + win.windowAttribs.put(GLFW_HOVERED, 1); + win.windowAttribs.put(GLFW_VISIBLE, 1); + + mGLFWWindowMap.put(ptr, win); + mainContext = ptr; + return ptr; + //Return our context + } + + public static void glfwDestroyWindow(long window) { + // Check window exists + try { + internalGetWindow(window); + mGLFWWindowMap.remove(window); + } catch (IllegalArgumentException e) { + System.out.println("GLFW: Warning: failed to remove window " + window); + e.printStackTrace(); + } + nglfwSetShowingWindow(mGLFWWindowMap.size() == 0 ? 0 : mGLFWWindowMap.keyAt(mGLFWWindowMap.size() - 1)); + } + + public static void glfwDefaultWindowHints() {} + + public static void glfwGetWindowSize(long window, IntBuffer width, IntBuffer height) { + if (width != null) width.put(internalGetWindow(window).width); + if (height != null) height.put(internalGetWindow(window).height); + } + + public static void glfwSetWindowSizeLimits(@NativeType("GLFWwindow *") long window, int minwidth, int minheight, int maxwidth, int maxheight) { + } + + public static void glfwSetWindowPos(long window, int x, int y) { + internalGetWindow(window).x = x; + internalGetWindow(window).y = y; + } + + public static void glfwSetWindowSize(long window, int width, int height) { + internalGetWindow(window).width = width; + internalGetWindow(window).height = height; + + System.out.println("GLFW: Set size for window " + window + ", width=" + width + ", height=" + height); + } + + public static void glfwShowWindow(long window) { + nglfwSetShowingWindow(window); + } + + public static void glfwWindowHint(int hint, int value) { + long __functionAddress = Functions.SetWindowHint; + invokeV(hint, value, __functionAddress); + } + + public static void glfwWindowHintString(int hint, @NativeType("const char *") ByteBuffer value) {} + public static void glfwWindowHintString(int hint, @NativeType("const char *") CharSequence value) {} + + public static boolean glfwWindowShouldClose(long window) { + return internalGetWindow(window).shouldClose; + } + + public static void glfwSetWindowShouldClose(long window, boolean close) { + internalGetWindow(window).shouldClose = close; + } + + + public static void glfwSetWindowTitle(@NativeType("GLFWwindow *") long window, @NativeType("char const *") ByteBuffer title) { + + } + public static void glfwSetWindowTitle(@NativeType("GLFWwindow *") long window, @NativeType("char const *") CharSequence title) { + internalGetWindow(window).title = title; + } + + public static void glfwSetWindowIcon(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWimage const *") GLFWImage.Buffer images) {} + + public static void glfwPollEvents() { + if (!mGLFWIsInputReady) { + mGLFWIsInputReady = true; + CallbackBridge.nativeSetInputReady(true); + } + callV(Functions.SetupEvents); + for (Long ptr : mGLFWWindowMap.keySet()) callJV(ptr, Functions.PumpEvents); + callV(Functions.RewindEvents); + } + + public static void internalWindowSizeChanged(long window, int w, int h) { + try { + internalChangeMonitorSize(w, h); + glfwSetWindowSize(window, mGLFWWindowWidth, mGLFWWindowHeight); + }catch (Exception e) { + e.printStackTrace(); + } + } + + public static void glfwWaitEvents() {} + + public static void glfwWaitEventsTimeout(double timeout) { + // Boardwalk: this isn't how you do a frame limiter, but oh well + // System.out.println("Frame limiter"); + /* + try { + Thread.sleep((long)(timeout * 1000)); + } catch (InterruptedException ie) { + } + */ + // System.out.println("Out of the frame limiter"); + + } + + public static void glfwPostEmptyEvent() {} + + public static int glfwGetInputMode(@NativeType("GLFWwindow *") long window, int mode) { + return internalGetWindow(window).inputModes.get(mode); + } + + public static void glfwSetInputMode(@NativeType("GLFWwindow *") long window, int mode, int value) { + if (mode == GLFW_CURSOR) { + switch (value) { + case GLFW_CURSOR_DISABLED: + CallbackBridge.nativeSetGrabbing(true); + break; + default: CallbackBridge.nativeSetGrabbing(false); + } + } + + internalGetWindow(window).inputModes.put(mode, value); + } + public static String glfwGetKeyName(int key, int scancode) { + // TODO keyname list from GLFW + return mGLFWKeyCodes.get(key); + } + + public static int glfwGetKeyScancode(int key) { + return 0; + } + + public static int glfwGetKey(@NativeType("GLFWwindow *") long window, int key) { + return keyDownBuffer.get(Math.max(0, key-31)); + } + + public static int glfwGetMouseButton(@NativeType("GLFWwindow *") long window, int button) { + return mouseDownBuffer.get(button); + } + public static void glfwGetCursorPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") DoubleBuffer xpos, @Nullable @NativeType("double *") DoubleBuffer ypos) { + if (CHECKS) { + checkSafe(xpos, 1); + checkSafe(ypos, 1); + } + nglfwGetCursorPos(window, xpos, ypos); + } + + + public static native void nglfwGetCursorPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") DoubleBuffer xpos, @Nullable @NativeType("double *") DoubleBuffer ypos); + public static native void nglfwGetCursorPosA(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") double[] xpos, @Nullable @NativeType("double *") double[] ypos); + + public static native void glfwSetCursorPos(@NativeType("GLFWwindow *") long window, double xpos, double ypos); /*{ + mGLFWCursorX = mGLFWCursorLastX = xpos; + mGLFWCursorY = mGLFWCursorLastY = ypos; + + CallbackBridge.sendGrabbing(mGLFWIsGrabbing, (int) xpos, (int) ypos); + }*/ + + public static long glfwCreateCursor(@NativeType("const GLFWimage *") GLFWImage image, int xhot, int yhot) { + return 4L; + } + public static long glfwCreateStandardCursor(int shape) { + return 4L; + } + public static void glfwDestroyCursor(@NativeType("GLFWcursor *") long cursor) {} + public static void glfwSetCursor(@NativeType("GLFWwindow *") long window, @NativeType("GLFWcursor *") long cursor) {} + + public static boolean glfwRawMouseMotionSupported() { + // Should be not supported? + return false; + } + + public static void glfwSetClipboardString(@NativeType("GLFWwindow *") long window, @NativeType("char const *") ByteBuffer string) { + byte[] arr = new byte[string.remaining()]; + string.get(arr); + CallbackBridge.nativeClipboard(CallbackBridge.CLIPBOARD_COPY, arr); + } + + public static void glfwSetClipboardString(@NativeType("GLFWwindow *") long window, @NativeType("char const *") CharSequence string) { + glfwSetClipboardString(window, memUTF8Safe(string)); + } + + public static String glfwGetClipboardString(@NativeType("GLFWwindow *") long window) { + return CallbackBridge.nativeClipboard(CallbackBridge.CLIPBOARD_PASTE, null); + } + + public static void glfwRequestWindowAttention(@NativeType("GLFWwindow *") long window) { + } + + public static boolean glfwJoystickPresent(int jid) { + if(jid == 0) { + return true; + }else return false; + } + public static String glfwGetJoystickName(int jid) { + if(jid == 0) { + return "AIC event bus controller"; + }else return null; + } + public static FloatBuffer glfwGetJoystickAxes(int jid) { + if(jid == 0) { + return joystickData; + }else return null; + } + public static ByteBuffer glfwGetJoystickButtons(int jid) { + if(jid == 0) { + return buttonData; + }else return null; + } + public static ByteBuffer glfwGetjoystickHats(int jid) { + return null; + } + public static boolean glfwJoystickIsGamepad(int jid) { + if(jid == 0) return true; + else return false; + } + public static String glfwGetJoystickGUID(int jid) { + if(jid == 0) return "aio0"; + else return null; + } + public static long glfwGetJoystickUserPointer(int jid) { + return 0; + } + public static void glfwSetJoystickUserPointer(int jid, long pointer) { + + } + public static boolean glfwUpdateGamepadMappings(ByteBuffer string) { + return false; + } + public static String glfwGetGamepadName(int jid) { + return null; + } + public static boolean glfwGetGamepadState(int jid, GLFWGamepadState state) { + return false; + } + + /** Array version of: {@link #glfwGetVersion GetVersion} */ + public static void glfwGetVersion(@Nullable @NativeType("int *") int[] major, @Nullable @NativeType("int *") int[] minor, @Nullable @NativeType("int *") int[] rev) { + if (CHECKS) { + checkSafe(major, 1); + checkSafe(minor, 1); + checkSafe(rev, 1); + } + major[0] = GLFW_VERSION_MAJOR; + minor[0] = GLFW_VERSION_MINOR; + rev[0] = GLFW_VERSION_REVISION; + } + + /** Array version of: {@link #glfwGetMonitorPos GetMonitorPos} */ + public static void glfwGetMonitorPos(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") int[] xpos, @Nullable @NativeType("int *") int[] ypos) { + if (CHECKS) { + // check(monitor); + checkSafe(xpos, 1); + checkSafe(ypos, 1); + } + xpos[0] = 0; + ypos[0] = 0; + } + + /** Array version of: {@link #glfwGetMonitorWorkarea GetMonitorWorkarea} */ + public static void glfwGetMonitorWorkarea(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") int[] xpos, @Nullable @NativeType("int *") int[] ypos, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height) { + if (CHECKS) { + // check(monitor); + checkSafe(xpos, 1); + checkSafe(ypos, 1); + checkSafe(width, 1); + checkSafe(height, 1); + } + + xpos[0] = 0; + ypos[0] = 0; + width[0] = mGLFWWindowWidth; + height[0] = mGLFWWindowHeight; + } + + /** Array version of: {@link #glfwGetMonitorPhysicalSize GetMonitorPhysicalSize} */ +/* + public static void glfwGetMonitorPhysicalSize(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") int[] widthMM, @Nullable @NativeType("int *") int[] heightMM) { + long __functionAddress = Functions.GetMonitorPhysicalSize; + if (CHECKS) { + // check(monitor); + checkSafe(widthMM, 1); + checkSafe(heightMM, 1); + } + invokePPPV(monitor, widthMM, heightMM, __functionAddress); + } +*/ + + /** Array version of: {@link #glfwGetMonitorContentScale GetMonitorContentScale} */ +/* + public static void glfwGetMonitorContentScale(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("float *") float[] xscale, @Nullable @NativeType("float *") float[] yscale) { + long __functionAddress = Functions.GetMonitorContentScale; + if (CHECKS) { + // check(monitor); + checkSafe(xscale, 1); + checkSafe(yscale, 1); + } + invokePPPV(monitor, xscale, yscale, __functionAddress); + } +*/ + + /** Array version of: {@link #glfwGetWindowPos GetWindowPos} */ + public static void glfwGetWindowPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] xpos, @Nullable @NativeType("int *") int[] ypos) { + if (CHECKS) { + // check(window); + checkSafe(xpos, 1); + checkSafe(ypos, 1); + } + xpos[0] = 0; + ypos[0] = 0; + } + + /** Array version of: {@link #glfwGetWindowSize GetWindowSize} */ + public static void glfwGetWindowSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height) { + if (CHECKS) { + // check(window); + checkSafe(width, 1); + checkSafe(height, 1); + } + width[0] = internalGetWindow(window).width; + height[0] = internalGetWindow(window).height; + } + + /** Array version of: {@link #glfwGetFramebufferSize GetFramebufferSize} */ + public static void glfwGetFramebufferSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height) { + if (CHECKS) { + // check(window); + checkSafe(width, 1); + checkSafe(height, 1); + } + width[0] = internalGetWindow(window).width; + height[0] = internalGetWindow(window).height; + } + + /** Array version of: {@link #glfwGetWindowFrameSize GetWindowFrameSize} */ + public static void glfwGetWindowFrameSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] left, @Nullable @NativeType("int *") int[] top, @Nullable @NativeType("int *") int[] right, @Nullable @NativeType("int *") int[] bottom) { + if (CHECKS) { + // check(window); + checkSafe(left, 1); + checkSafe(top, 1); + checkSafe(right, 1); + checkSafe(bottom, 1); + } + left[0] = top[0] = 0; + right[0] = internalGetWindow(window).width; + bottom[0] = internalGetWindow(window).height; + } + + /** Array version of: {@link #glfwGetWindowContentScale GetWindowContentScale} */ +/* + public static void glfwGetWindowContentScale(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("float *") float[] xscale, @Nullable @NativeType("float *") float[] yscale) { + long __functionAddress = Functions.GetWindowContentScale; + if (CHECKS) { + // check(window); + checkSafe(xscale, 1); + checkSafe(yscale, 1); + } + invokePPPV(window, xscale, yscale, __functionAddress); + } +*/ + + /** Array version of: {@link #glfwGetCursorPos GetCursorPos} */ + public static void glfwGetCursorPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") double[] xpos, @Nullable @NativeType("double *") double[] ypos) { + if (CHECKS) { + // check(window); + checkSafe(xpos, 1); + checkSafe(ypos, 1); + } + nglfwGetCursorPosA(window, xpos, ypos); + } + + @NativeType("int") + public static boolean glfwExtensionSupported(@NativeType("char const *") CharSequence ext) { + //return Arrays.stream(glGetString(GL_EXTENSIONS).split(" ")).anyMatch(ext::equals); + // Fast path, but will return true if one has the same prefix + return glGetString(GL_EXTENSIONS).contains(ext); + } +} diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeCocoa.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeCocoa.java new file mode 100644 index 00000000..1a6ffca7 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeCocoa.java @@ -0,0 +1,14 @@ +package org.lwjgl.glfw; + +import org.lwjgl.system.NativeType; + +public class GLFWNativeCocoa { + @NativeType("CGDirectDisplayID") + public static int glfwGetCocoaMonitor(@NativeType("GLFWmonitor *") long monitor) { + throw new UnsupportedOperationException("Not implemented"); + } + @NativeType("id") + public static long glfwGetCocoaWindow(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented"); + } +} diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeEGL.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeEGL.java new file mode 100644 index 00000000..a6af5913 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeEGL.java @@ -0,0 +1,25 @@ +package org.lwjgl.glfw; + +import org.lwjgl.system.NativeType; + +public class GLFWNativeEGL { + @NativeType("EGLDisplay") + public static long glfwGetEGLDisplay() { + throw new UnsupportedOperationException("Not implemented yet!"); + } + + @NativeType("EGLContext") + public static long glfwGetEGLContext(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented yet!"); + } + + @NativeType("EGLSurface") + public static long glfwGetEGLSurface(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented yet!"); + } + + @NativeType("EGLConfig") + public static long glfwGetEGLConfig(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented yet!"); + } +} diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeNSGL.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeNSGL.java new file mode 100644 index 00000000..a05a83ff --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeNSGL.java @@ -0,0 +1,10 @@ +package org.lwjgl.glfw; + +import org.lwjgl.system.NativeType; + +public class GLFWNativeNSGL { + @NativeType("id") + public static long glfwGetNSGLContext(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented"); + } +} diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeOSMesa.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeOSMesa.java new file mode 100644 index 00000000..29618e02 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeOSMesa.java @@ -0,0 +1,33 @@ +package org.lwjgl.glfw; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.system.NativeType; + +import java.nio.IntBuffer; + +import javax.annotation.Nullable; + +public class GLFWNativeOSMesa { + @NativeType("int") + public static boolean glfwGetOSMesaColorBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer format, @Nullable @NativeType("void **") PointerBuffer buffer) { + throw new UnsupportedOperationException("Not implemented yet!"); + } + + public static int glfwGetOSMesaDepthBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer bytesPerValue, @Nullable @NativeType("void **") PointerBuffer buffer) { + throw new UnsupportedOperationException("Not implemented yet!"); + } + + @NativeType("OSMesaContext") + public static long glfwGetOSMesaContext(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented yet!"); + } + + @NativeType("int") + public static boolean glfwGetOSMesaColorBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] format, @Nullable @NativeType("void **") PointerBuffer buffer) { + throw new UnsupportedOperationException("Not implemented yet!"); + } + + public static int glfwGetOSMesaDepthBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] bytesPerValue, @Nullable @NativeType("void **") PointerBuffer buffer) { + throw new UnsupportedOperationException("Not implemented yet!"); + } +} \ No newline at end of file diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWGL.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWGL.java new file mode 100644 index 00000000..296a2123 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWGL.java @@ -0,0 +1,10 @@ +package org.lwjgl.glfw; + +import org.lwjgl.system.NativeType; + +public class GLFWNativeWGL { + @NativeType("HGLRC") + public static long glfwGetWGLContext(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented"); + } +} diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWayland.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWayland.java new file mode 100644 index 00000000..b146d4bb --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWayland.java @@ -0,0 +1,20 @@ +package org.lwjgl.glfw; + +import org.lwjgl.system.NativeType; + +public class GLFWNativeWayland { + @NativeType("struct wl_display *") + public static long glfwGetWaylandDisplay() { + throw new UnsupportedOperationException("Not implemented"); + } + + @NativeType("struct wl_output *") + public static long glfwGetWaylandMonitor(@NativeType("GLFWmonitor *") long monitor) { + throw new UnsupportedOperationException("Not implemented"); + } + + @NativeType("struct wl_surface *") + public static long glfwGetWaylandWindow(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented"); + } +} \ No newline at end of file diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWin32.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWin32.java new file mode 100644 index 00000000..1ace242f --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeWin32.java @@ -0,0 +1,29 @@ +package org.lwjgl.glfw; + +import org.lwjgl.system.NativeType; + +import javax.annotation.Nullable; + +public class GLFWNativeWin32 { + @Nullable + @NativeType("char const *") + public static String glfwGetWin32Adapter(@NativeType("GLFWmonitor *") long monitor) { + throw new UnsupportedOperationException("Not implemented"); + } + + @Nullable + @NativeType("char const *") + public static String glfwGetWin32Monitor(@NativeType("GLFWmonitor *") long monitor) { + throw new UnsupportedOperationException("Not implemented"); + } + + @NativeType("HWND") + public static long glfwGetWin32Window(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented"); + } + + @NativeType("GLFWwindow *") + public static long glfwAttachWin32Window(@NativeType("HWND") long handle, @NativeType("GLFWwindow *") long share) { + throw new UnsupportedOperationException("Not implemented"); + } +} diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeX11.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeX11.java new file mode 100644 index 00000000..5a1eec3e --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWNativeX11.java @@ -0,0 +1,42 @@ +package org.lwjgl.glfw; + +import org.lwjgl.system.NativeType; + +import java.nio.ByteBuffer; + +import javax.annotation.Nullable; + +public class GLFWNativeX11 { + @NativeType("Display *") + public static long glfwGetX11Display() { + throw new UnsupportedOperationException("Not implemented"); + } + + @NativeType("RRCrtc") + public static long glfwGetX11Adapter(@NativeType("GLFWmonitor *") long monitor) { + throw new UnsupportedOperationException("Not implemented"); + } + + @NativeType("RROutput") + public static long glfwGetX11Monitor(@NativeType("GLFWmonitor *") long monitor) { + throw new UnsupportedOperationException("Not implemented"); + } + + @NativeType("Window") + public static long glfwGetX11Window(@NativeType("GLFWwindow *") long window) { + throw new UnsupportedOperationException("Not implemented"); + } + + public static void glfwSetX11SelectionString(@NativeType("char const *") ByteBuffer string) { + throw new UnsupportedOperationException("Not implemented"); + } + + public static void glfwSetX11SelectionString(@NativeType("char const *") CharSequence string) { + throw new UnsupportedOperationException("Not implemented"); + } + @Nullable + @NativeType("char const *") + public static String glfwGetX11SelectionString() { + throw new UnsupportedOperationException("Not implemented"); + } +} \ No newline at end of file diff --git a/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWWindowProperties.java b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWWindowProperties.java new file mode 100644 index 00000000..0596bad1 --- /dev/null +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/glfw/GLFWWindowProperties.java @@ -0,0 +1,13 @@ +package org.lwjgl.glfw; + +import java.util.*; + +public class GLFWWindowProperties { + public int width = GLFW.mGLFWWindowWidth; + public int height = GLFW.mGLFWWindowHeight; + public int x, y; + public CharSequence title; + public boolean shouldClose, isInitialSizeCalled, isCursorEntered; + public Map inputModes = new HashMap<>(); + public Map windowAttribs = new HashMap<>(); +} diff --git a/LWJGL/src/main/java/org/lwjgl/input/InfdevMouse.java b/LWJGL-Pojav/src/main/java/org/lwjgl/input/InfdevMouse.java similarity index 99% rename from LWJGL/src/main/java/org/lwjgl/input/InfdevMouse.java rename to LWJGL-Pojav/src/main/java/org/lwjgl/input/InfdevMouse.java index 5f9fb473..51ad9f7c 100644 --- a/LWJGL/src/main/java/org/lwjgl/input/InfdevMouse.java +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/input/InfdevMouse.java @@ -4,7 +4,6 @@ import net.java.openjdk.cacio.ctc.ExternalMouseReader; import net.java.openjdk.cacio.ctc.InfdevGrabHandler; public class InfdevMouse implements ExternalMouseReader, Mouse.EmptyCursorGrabListener { - static { InfdevGrabHandler.setMouseReader(new InfdevMouse()); } diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLCapabilities.java b/LWJGL-Pojav/src/main/java/org/lwjgl/opengl/GLCapabilities.java similarity index 56% rename from LWJGL/src/main/java/org/lwjgl/opengl/GLCapabilities.java rename to LWJGL-Pojav/src/main/java/org/lwjgl/opengl/GLCapabilities.java index 6ad0096a..861187a5 100644 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLCapabilities.java +++ b/LWJGL-Pojav/src/main/java/org/lwjgl/opengl/GLCapabilities.java @@ -17,2759 +17,2758 @@ import static org.lwjgl.system.MemoryUtil.*; /** Defines the capabilities of an OpenGL context. */ public final class GLCapabilities { - static final int ADDRESS_BUFFER_SIZE = 2227; + static final int ADDRESS_BUFFER_SIZE = 2226; // GL11 public final long - glEnable, - glDisable, - glAccum, - glAlphaFunc, - glAreTexturesResident, - glArrayElement, - glBegin, - glBindTexture, - glBitmap, - glBlendFunc, - glCallList, - glCallLists, - glClear, - glClearAccum, - glClearColor, - glClearDepth, - glClearIndex, - glClearStencil, - glClipPlane, - glColor3b, - glColor3s, - glColor3i, - glColor3f, - glColor3d, - glColor3ub, - glColor3us, - glColor3ui, - glColor3bv, - glColor3sv, - glColor3iv, - glColor3fv, - glColor3dv, - glColor3ubv, - glColor3usv, - glColor3uiv, - glColor4b, - glColor4s, - glColor4i, - glColor4f, - glColor4d, - glColor4ub, - glColor4us, - glColor4ui, - glColor4bv, - glColor4sv, - glColor4iv, - glColor4fv, - glColor4dv, - glColor4ubv, - glColor4usv, - glColor4uiv, - glColorMask, - glColorMaterial, - glColorPointer, - glCopyPixels, - glCullFace, - glDeleteLists, - glDepthFunc, - glDepthMask, - glDepthRange, - glDisableClientState, - glDrawArrays, - glDrawBuffer, - glDrawElements, - glDrawPixels, - glEdgeFlag, - glEdgeFlagv, - glEdgeFlagPointer, - glEnableClientState, - glEnd, - glEvalCoord1f, - glEvalCoord1fv, - glEvalCoord1d, - glEvalCoord1dv, - glEvalCoord2f, - glEvalCoord2fv, - glEvalCoord2d, - glEvalCoord2dv, - glEvalMesh1, - glEvalMesh2, - glEvalPoint1, - glEvalPoint2, - glFeedbackBuffer, - glFinish, - glFlush, - glFogi, - glFogiv, - glFogf, - glFogfv, - glFrontFace, - glGenLists, - glGenTextures, - glDeleteTextures, - glGetClipPlane, - glGetBooleanv, - glGetFloatv, - glGetIntegerv, - glGetDoublev, - glGetError, - glGetLightiv, - glGetLightfv, - glGetMapiv, - glGetMapfv, - glGetMapdv, - glGetMaterialiv, - glGetMaterialfv, - glGetPixelMapfv, - glGetPixelMapusv, - glGetPixelMapuiv, - glGetPointerv, - glGetPolygonStipple, - glGetString, - glGetTexEnviv, - glGetTexEnvfv, - glGetTexGeniv, - glGetTexGenfv, - glGetTexGendv, - glGetTexImage, - glGetTexLevelParameteriv, - glGetTexLevelParameterfv, - glGetTexParameteriv, - glGetTexParameterfv, - glHint, - glIndexi, - glIndexub, - glIndexs, - glIndexf, - glIndexd, - glIndexiv, - glIndexubv, - glIndexsv, - glIndexfv, - glIndexdv, - glIndexMask, - glIndexPointer, - glInitNames, - glInterleavedArrays, - glIsEnabled, - glIsList, - glIsTexture, - glLightModeli, - glLightModelf, - glLightModeliv, - glLightModelfv, - glLighti, - glLightf, - glLightiv, - glLightfv, - glLineStipple, - glLineWidth, - glListBase, - glLoadMatrixf, - glLoadMatrixd, - glLoadIdentity, - glLoadName, - glLogicOp, - glMap1f, - glMap1d, - glMap2f, - glMap2d, - glMapGrid1f, - glMapGrid1d, - glMapGrid2f, - glMapGrid2d, - glMateriali, - glMaterialf, - glMaterialiv, - glMaterialfv, - glMatrixMode, - glMultMatrixf, - glMultMatrixd, - glFrustum, - glNewList, - glEndList, - glNormal3f, - glNormal3b, - glNormal3s, - glNormal3i, - glNormal3d, - glNormal3fv, - glNormal3bv, - glNormal3sv, - glNormal3iv, - glNormal3dv, - glNormalPointer, - glOrtho, - glPassThrough, - glPixelMapfv, - glPixelMapusv, - glPixelMapuiv, - glPixelStorei, - glPixelStoref, - glPixelTransferi, - glPixelTransferf, - glPixelZoom, - glPointSize, - glPolygonMode, - glPolygonOffset, - glPolygonStipple, - glPushAttrib, - glPushClientAttrib, - glPopAttrib, - glPopClientAttrib, - glPopMatrix, - glPopName, - glPrioritizeTextures, - glPushMatrix, - glPushName, - glRasterPos2i, - glRasterPos2s, - glRasterPos2f, - glRasterPos2d, - glRasterPos2iv, - glRasterPos2sv, - glRasterPos2fv, - glRasterPos2dv, - glRasterPos3i, - glRasterPos3s, - glRasterPos3f, - glRasterPos3d, - glRasterPos3iv, - glRasterPos3sv, - glRasterPos3fv, - glRasterPos3dv, - glRasterPos4i, - glRasterPos4s, - glRasterPos4f, - glRasterPos4d, - glRasterPos4iv, - glRasterPos4sv, - glRasterPos4fv, - glRasterPos4dv, - glReadBuffer, - glReadPixels, - glRecti, - glRects, - glRectf, - glRectd, - glRectiv, - glRectsv, - glRectfv, - glRectdv, - glRenderMode, - glRotatef, - glRotated, - glScalef, - glScaled, - glScissor, - glSelectBuffer, - glShadeModel, - glStencilFunc, - glStencilMask, - glStencilOp, - glTexCoord1f, - glTexCoord1s, - glTexCoord1i, - glTexCoord1d, - glTexCoord1fv, - glTexCoord1sv, - glTexCoord1iv, - glTexCoord1dv, - glTexCoord2f, - glTexCoord2s, - glTexCoord2i, - glTexCoord2d, - glTexCoord2fv, - glTexCoord2sv, - glTexCoord2iv, - glTexCoord2dv, - glTexCoord3f, - glTexCoord3s, - glTexCoord3i, - glTexCoord3d, - glTexCoord3fv, - glTexCoord3sv, - glTexCoord3iv, - glTexCoord3dv, - glTexCoord4f, - glTexCoord4s, - glTexCoord4i, - glTexCoord4d, - glTexCoord4fv, - glTexCoord4sv, - glTexCoord4iv, - glTexCoord4dv, - glTexCoordPointer, - glTexEnvi, - glTexEnviv, - glTexEnvf, - glTexEnvfv, - glTexGeni, - glTexGeniv, - glTexGenf, - glTexGenfv, - glTexGend, - glTexGendv, - glTexImage1D, - glTexImage2D, - glCopyTexImage1D, - glCopyTexImage2D, - glCopyTexSubImage1D, - glCopyTexSubImage2D, - glTexParameteri, - glTexParameteriv, - glTexParameterf, - glTexParameterfv, - glTexSubImage1D, - glTexSubImage2D, - glTranslatef, - glTranslated, - glVertex2f, - glVertex2s, - glVertex2i, - glVertex2d, - glVertex2fv, - glVertex2sv, - glVertex2iv, - glVertex2dv, - glVertex3f, - glVertex3s, - glVertex3i, - glVertex3d, - glVertex3fv, - glVertex3sv, - glVertex3iv, - glVertex3dv, - glVertex4f, - glVertex4s, - glVertex4i, - glVertex4d, - glVertex4fv, - glVertex4sv, - glVertex4iv, - glVertex4dv, - glVertexPointer, - glViewport; + glEnable, + glDisable, + glAccum, + glAlphaFunc, + glAreTexturesResident, + glArrayElement, + glBegin, + glBindTexture, + glBitmap, + glBlendFunc, + glCallList, + glCallLists, + glClear, + glClearAccum, + glClearColor, + glClearDepth, + glClearIndex, + glClearStencil, + glClipPlane, + glColor3b, + glColor3s, + glColor3i, + glColor3f, + glColor3d, + glColor3ub, + glColor3us, + glColor3ui, + glColor3bv, + glColor3sv, + glColor3iv, + glColor3fv, + glColor3dv, + glColor3ubv, + glColor3usv, + glColor3uiv, + glColor4b, + glColor4s, + glColor4i, + glColor4f, + glColor4d, + glColor4ub, + glColor4us, + glColor4ui, + glColor4bv, + glColor4sv, + glColor4iv, + glColor4fv, + glColor4dv, + glColor4ubv, + glColor4usv, + glColor4uiv, + glColorMask, + glColorMaterial, + glColorPointer, + glCopyPixels, + glCullFace, + glDeleteLists, + glDepthFunc, + glDepthMask, + glDepthRange, + glDisableClientState, + glDrawArrays, + glDrawBuffer, + glDrawElements, + glDrawPixels, + glEdgeFlag, + glEdgeFlagv, + glEdgeFlagPointer, + glEnableClientState, + glEnd, + glEvalCoord1f, + glEvalCoord1fv, + glEvalCoord1d, + glEvalCoord1dv, + glEvalCoord2f, + glEvalCoord2fv, + glEvalCoord2d, + glEvalCoord2dv, + glEvalMesh1, + glEvalMesh2, + glEvalPoint1, + glEvalPoint2, + glFeedbackBuffer, + glFinish, + glFlush, + glFogi, + glFogiv, + glFogf, + glFogfv, + glFrontFace, + glGenLists, + glGenTextures, + glDeleteTextures, + glGetClipPlane, + glGetBooleanv, + glGetFloatv, + glGetIntegerv, + glGetDoublev, + glGetError, + glGetLightiv, + glGetLightfv, + glGetMapiv, + glGetMapfv, + glGetMapdv, + glGetMaterialiv, + glGetMaterialfv, + glGetPixelMapfv, + glGetPixelMapusv, + glGetPixelMapuiv, + glGetPointerv, + glGetPolygonStipple, + glGetString, + glGetTexEnviv, + glGetTexEnvfv, + glGetTexGeniv, + glGetTexGenfv, + glGetTexGendv, + glGetTexImage, + glGetTexLevelParameteriv, + glGetTexLevelParameterfv, + glGetTexParameteriv, + glGetTexParameterfv, + glHint, + glIndexi, + glIndexub, + glIndexs, + glIndexf, + glIndexd, + glIndexiv, + glIndexubv, + glIndexsv, + glIndexfv, + glIndexdv, + glIndexMask, + glIndexPointer, + glInitNames, + glInterleavedArrays, + glIsEnabled, + glIsList, + glIsTexture, + glLightModeli, + glLightModelf, + glLightModeliv, + glLightModelfv, + glLighti, + glLightf, + glLightiv, + glLightfv, + glLineStipple, + glLineWidth, + glListBase, + glLoadMatrixf, + glLoadMatrixd, + glLoadIdentity, + glLoadName, + glLogicOp, + glMap1f, + glMap1d, + glMap2f, + glMap2d, + glMapGrid1f, + glMapGrid1d, + glMapGrid2f, + glMapGrid2d, + glMateriali, + glMaterialf, + glMaterialiv, + glMaterialfv, + glMatrixMode, + glMultMatrixf, + glMultMatrixd, + glFrustum, + glNewList, + glEndList, + glNormal3f, + glNormal3b, + glNormal3s, + glNormal3i, + glNormal3d, + glNormal3fv, + glNormal3bv, + glNormal3sv, + glNormal3iv, + glNormal3dv, + glNormalPointer, + glOrtho, + glPassThrough, + glPixelMapfv, + glPixelMapusv, + glPixelMapuiv, + glPixelStorei, + glPixelStoref, + glPixelTransferi, + glPixelTransferf, + glPixelZoom, + glPointSize, + glPolygonMode, + glPolygonOffset, + glPolygonStipple, + glPushAttrib, + glPushClientAttrib, + glPopAttrib, + glPopClientAttrib, + glPopMatrix, + glPopName, + glPrioritizeTextures, + glPushMatrix, + glPushName, + glRasterPos2i, + glRasterPos2s, + glRasterPos2f, + glRasterPos2d, + glRasterPos2iv, + glRasterPos2sv, + glRasterPos2fv, + glRasterPos2dv, + glRasterPos3i, + glRasterPos3s, + glRasterPos3f, + glRasterPos3d, + glRasterPos3iv, + glRasterPos3sv, + glRasterPos3fv, + glRasterPos3dv, + glRasterPos4i, + glRasterPos4s, + glRasterPos4f, + glRasterPos4d, + glRasterPos4iv, + glRasterPos4sv, + glRasterPos4fv, + glRasterPos4dv, + glReadBuffer, + glReadPixels, + glRecti, + glRects, + glRectf, + glRectd, + glRectiv, + glRectsv, + glRectfv, + glRectdv, + glRenderMode, + glRotatef, + glRotated, + glScalef, + glScaled, + glScissor, + glSelectBuffer, + glShadeModel, + glStencilFunc, + glStencilMask, + glStencilOp, + glTexCoord1f, + glTexCoord1s, + glTexCoord1i, + glTexCoord1d, + glTexCoord1fv, + glTexCoord1sv, + glTexCoord1iv, + glTexCoord1dv, + glTexCoord2f, + glTexCoord2s, + glTexCoord2i, + glTexCoord2d, + glTexCoord2fv, + glTexCoord2sv, + glTexCoord2iv, + glTexCoord2dv, + glTexCoord3f, + glTexCoord3s, + glTexCoord3i, + glTexCoord3d, + glTexCoord3fv, + glTexCoord3sv, + glTexCoord3iv, + glTexCoord3dv, + glTexCoord4f, + glTexCoord4s, + glTexCoord4i, + glTexCoord4d, + glTexCoord4fv, + glTexCoord4sv, + glTexCoord4iv, + glTexCoord4dv, + glTexCoordPointer, + glTexEnvi, + glTexEnviv, + glTexEnvf, + glTexEnvfv, + glTexGeni, + glTexGeniv, + glTexGenf, + glTexGenfv, + glTexGend, + glTexGendv, + glTexImage1D, + glTexImage2D, + glCopyTexImage1D, + glCopyTexImage2D, + glCopyTexSubImage1D, + glCopyTexSubImage2D, + glTexParameteri, + glTexParameteriv, + glTexParameterf, + glTexParameterfv, + glTexSubImage1D, + glTexSubImage2D, + glTranslatef, + glTranslated, + glVertex2f, + glVertex2s, + glVertex2i, + glVertex2d, + glVertex2fv, + glVertex2sv, + glVertex2iv, + glVertex2dv, + glVertex3f, + glVertex3s, + glVertex3i, + glVertex3d, + glVertex3fv, + glVertex3sv, + glVertex3iv, + glVertex3dv, + glVertex4f, + glVertex4s, + glVertex4i, + glVertex4d, + glVertex4fv, + glVertex4sv, + glVertex4iv, + glVertex4dv, + glVertexPointer, + glViewport; // GL12 public final long - glTexImage3D, - glTexSubImage3D, - glCopyTexSubImage3D, - glDrawRangeElements; + glTexImage3D, + glTexSubImage3D, + glCopyTexSubImage3D, + glDrawRangeElements; // GL13 public final long - glCompressedTexImage3D, - glCompressedTexImage2D, - glCompressedTexImage1D, - glCompressedTexSubImage3D, - glCompressedTexSubImage2D, - glCompressedTexSubImage1D, - glGetCompressedTexImage, - glSampleCoverage, - glActiveTexture, - glClientActiveTexture, - glMultiTexCoord1f, - glMultiTexCoord1s, - glMultiTexCoord1i, - glMultiTexCoord1d, - glMultiTexCoord1fv, - glMultiTexCoord1sv, - glMultiTexCoord1iv, - glMultiTexCoord1dv, - glMultiTexCoord2f, - glMultiTexCoord2s, - glMultiTexCoord2i, - glMultiTexCoord2d, - glMultiTexCoord2fv, - glMultiTexCoord2sv, - glMultiTexCoord2iv, - glMultiTexCoord2dv, - glMultiTexCoord3f, - glMultiTexCoord3s, - glMultiTexCoord3i, - glMultiTexCoord3d, - glMultiTexCoord3fv, - glMultiTexCoord3sv, - glMultiTexCoord3iv, - glMultiTexCoord3dv, - glMultiTexCoord4f, - glMultiTexCoord4s, - glMultiTexCoord4i, - glMultiTexCoord4d, - glMultiTexCoord4fv, - glMultiTexCoord4sv, - glMultiTexCoord4iv, - glMultiTexCoord4dv, - glLoadTransposeMatrixf, - glLoadTransposeMatrixd, - glMultTransposeMatrixf, - glMultTransposeMatrixd; + glCompressedTexImage3D, + glCompressedTexImage2D, + glCompressedTexImage1D, + glCompressedTexSubImage3D, + glCompressedTexSubImage2D, + glCompressedTexSubImage1D, + glGetCompressedTexImage, + glSampleCoverage, + glActiveTexture, + glClientActiveTexture, + glMultiTexCoord1f, + glMultiTexCoord1s, + glMultiTexCoord1i, + glMultiTexCoord1d, + glMultiTexCoord1fv, + glMultiTexCoord1sv, + glMultiTexCoord1iv, + glMultiTexCoord1dv, + glMultiTexCoord2f, + glMultiTexCoord2s, + glMultiTexCoord2i, + glMultiTexCoord2d, + glMultiTexCoord2fv, + glMultiTexCoord2sv, + glMultiTexCoord2iv, + glMultiTexCoord2dv, + glMultiTexCoord3f, + glMultiTexCoord3s, + glMultiTexCoord3i, + glMultiTexCoord3d, + glMultiTexCoord3fv, + glMultiTexCoord3sv, + glMultiTexCoord3iv, + glMultiTexCoord3dv, + glMultiTexCoord4f, + glMultiTexCoord4s, + glMultiTexCoord4i, + glMultiTexCoord4d, + glMultiTexCoord4fv, + glMultiTexCoord4sv, + glMultiTexCoord4iv, + glMultiTexCoord4dv, + glLoadTransposeMatrixf, + glLoadTransposeMatrixd, + glMultTransposeMatrixf, + glMultTransposeMatrixd; // GL14 public final long - glBlendColor, - glBlendEquation, - glFogCoordf, - glFogCoordd, - glFogCoordfv, - glFogCoorddv, - glFogCoordPointer, - glMultiDrawArrays, - glMultiDrawElements, - glPointParameterf, - glPointParameteri, - glPointParameterfv, - glPointParameteriv, - glSecondaryColor3b, - glSecondaryColor3s, - glSecondaryColor3i, - glSecondaryColor3f, - glSecondaryColor3d, - glSecondaryColor3ub, - glSecondaryColor3us, - glSecondaryColor3ui, - glSecondaryColor3bv, - glSecondaryColor3sv, - glSecondaryColor3iv, - glSecondaryColor3fv, - glSecondaryColor3dv, - glSecondaryColor3ubv, - glSecondaryColor3usv, - glSecondaryColor3uiv, - glSecondaryColorPointer, - glBlendFuncSeparate, - glWindowPos2i, - glWindowPos2s, - glWindowPos2f, - glWindowPos2d, - glWindowPos2iv, - glWindowPos2sv, - glWindowPos2fv, - glWindowPos2dv, - glWindowPos3i, - glWindowPos3s, - glWindowPos3f, - glWindowPos3d, - glWindowPos3iv, - glWindowPos3sv, - glWindowPos3fv, - glWindowPos3dv; + glBlendColor, + glBlendEquation, + glFogCoordf, + glFogCoordd, + glFogCoordfv, + glFogCoorddv, + glFogCoordPointer, + glMultiDrawArrays, + glMultiDrawElements, + glPointParameterf, + glPointParameteri, + glPointParameterfv, + glPointParameteriv, + glSecondaryColor3b, + glSecondaryColor3s, + glSecondaryColor3i, + glSecondaryColor3f, + glSecondaryColor3d, + glSecondaryColor3ub, + glSecondaryColor3us, + glSecondaryColor3ui, + glSecondaryColor3bv, + glSecondaryColor3sv, + glSecondaryColor3iv, + glSecondaryColor3fv, + glSecondaryColor3dv, + glSecondaryColor3ubv, + glSecondaryColor3usv, + glSecondaryColor3uiv, + glSecondaryColorPointer, + glBlendFuncSeparate, + glWindowPos2i, + glWindowPos2s, + glWindowPos2f, + glWindowPos2d, + glWindowPos2iv, + glWindowPos2sv, + glWindowPos2fv, + glWindowPos2dv, + glWindowPos3i, + glWindowPos3s, + glWindowPos3f, + glWindowPos3d, + glWindowPos3iv, + glWindowPos3sv, + glWindowPos3fv, + glWindowPos3dv; // GL15 public final long - glBindBuffer, - glDeleteBuffers, - glGenBuffers, - glIsBuffer, - glBufferData, - glBufferSubData, - glGetBufferSubData, - glMapBuffer, - glUnmapBuffer, - glGetBufferParameteriv, - glGetBufferPointerv, - glGenQueries, - glDeleteQueries, - glIsQuery, - glBeginQuery, - glEndQuery, - glGetQueryiv, - glGetQueryObjectiv, - glGetQueryObjectuiv; + glBindBuffer, + glDeleteBuffers, + glGenBuffers, + glIsBuffer, + glBufferData, + glBufferSubData, + glGetBufferSubData, + glMapBuffer, + glUnmapBuffer, + glGetBufferParameteriv, + glGetBufferPointerv, + glGenQueries, + glDeleteQueries, + glIsQuery, + glBeginQuery, + glEndQuery, + glGetQueryiv, + glGetQueryObjectiv, + glGetQueryObjectuiv; // GL20 public final long - glCreateProgram, - glDeleteProgram, - glIsProgram, - glCreateShader, - glDeleteShader, - glIsShader, - glAttachShader, - glDetachShader, - glShaderSource, - glCompileShader, - glLinkProgram, - glUseProgram, - glValidateProgram, - glUniform1f, - glUniform2f, - glUniform3f, - glUniform4f, - glUniform1i, - glUniform2i, - glUniform3i, - glUniform4i, - glUniform1fv, - glUniform2fv, - glUniform3fv, - glUniform4fv, - glUniform1iv, - glUniform2iv, - glUniform3iv, - glUniform4iv, - glUniformMatrix2fv, - glUniformMatrix3fv, - glUniformMatrix4fv, - glGetShaderiv, - glGetProgramiv, - glGetShaderInfoLog, - glGetProgramInfoLog, - glGetAttachedShaders, - glGetUniformLocation, - glGetActiveUniform, - glGetUniformfv, - glGetUniformiv, - glGetShaderSource, - glVertexAttrib1f, - glVertexAttrib1s, - glVertexAttrib1d, - glVertexAttrib2f, - glVertexAttrib2s, - glVertexAttrib2d, - glVertexAttrib3f, - glVertexAttrib3s, - glVertexAttrib3d, - glVertexAttrib4f, - glVertexAttrib4s, - glVertexAttrib4d, - glVertexAttrib4Nub, - glVertexAttrib1fv, - glVertexAttrib1sv, - glVertexAttrib1dv, - glVertexAttrib2fv, - glVertexAttrib2sv, - glVertexAttrib2dv, - glVertexAttrib3fv, - glVertexAttrib3sv, - glVertexAttrib3dv, - glVertexAttrib4fv, - glVertexAttrib4sv, - glVertexAttrib4dv, - glVertexAttrib4iv, - glVertexAttrib4bv, - glVertexAttrib4ubv, - glVertexAttrib4usv, - glVertexAttrib4uiv, - glVertexAttrib4Nbv, - glVertexAttrib4Nsv, - glVertexAttrib4Niv, - glVertexAttrib4Nubv, - glVertexAttrib4Nusv, - glVertexAttrib4Nuiv, - glVertexAttribPointer, - glEnableVertexAttribArray, - glDisableVertexAttribArray, - glBindAttribLocation, - glGetActiveAttrib, - glGetAttribLocation, - glGetVertexAttribiv, - glGetVertexAttribfv, - glGetVertexAttribdv, - glGetVertexAttribPointerv, - glDrawBuffers, - glBlendEquationSeparate, - glStencilOpSeparate, - glStencilFuncSeparate, - glStencilMaskSeparate; + glCreateProgram, + glDeleteProgram, + glIsProgram, + glCreateShader, + glDeleteShader, + glIsShader, + glAttachShader, + glDetachShader, + glShaderSource, + glCompileShader, + glLinkProgram, + glUseProgram, + glValidateProgram, + glUniform1f, + glUniform2f, + glUniform3f, + glUniform4f, + glUniform1i, + glUniform2i, + glUniform3i, + glUniform4i, + glUniform1fv, + glUniform2fv, + glUniform3fv, + glUniform4fv, + glUniform1iv, + glUniform2iv, + glUniform3iv, + glUniform4iv, + glUniformMatrix2fv, + glUniformMatrix3fv, + glUniformMatrix4fv, + glGetShaderiv, + glGetProgramiv, + glGetShaderInfoLog, + glGetProgramInfoLog, + glGetAttachedShaders, + glGetUniformLocation, + glGetActiveUniform, + glGetUniformfv, + glGetUniformiv, + glGetShaderSource, + glVertexAttrib1f, + glVertexAttrib1s, + glVertexAttrib1d, + glVertexAttrib2f, + glVertexAttrib2s, + glVertexAttrib2d, + glVertexAttrib3f, + glVertexAttrib3s, + glVertexAttrib3d, + glVertexAttrib4f, + glVertexAttrib4s, + glVertexAttrib4d, + glVertexAttrib4Nub, + glVertexAttrib1fv, + glVertexAttrib1sv, + glVertexAttrib1dv, + glVertexAttrib2fv, + glVertexAttrib2sv, + glVertexAttrib2dv, + glVertexAttrib3fv, + glVertexAttrib3sv, + glVertexAttrib3dv, + glVertexAttrib4fv, + glVertexAttrib4sv, + glVertexAttrib4dv, + glVertexAttrib4iv, + glVertexAttrib4bv, + glVertexAttrib4ubv, + glVertexAttrib4usv, + glVertexAttrib4uiv, + glVertexAttrib4Nbv, + glVertexAttrib4Nsv, + glVertexAttrib4Niv, + glVertexAttrib4Nubv, + glVertexAttrib4Nusv, + glVertexAttrib4Nuiv, + glVertexAttribPointer, + glEnableVertexAttribArray, + glDisableVertexAttribArray, + glBindAttribLocation, + glGetActiveAttrib, + glGetAttribLocation, + glGetVertexAttribiv, + glGetVertexAttribfv, + glGetVertexAttribdv, + glGetVertexAttribPointerv, + glDrawBuffers, + glBlendEquationSeparate, + glStencilOpSeparate, + glStencilFuncSeparate, + glStencilMaskSeparate; // GL21 public final long - glUniformMatrix2x3fv, - glUniformMatrix3x2fv, - glUniformMatrix2x4fv, - glUniformMatrix4x2fv, - glUniformMatrix3x4fv, - glUniformMatrix4x3fv; + glUniformMatrix2x3fv, + glUniformMatrix3x2fv, + glUniformMatrix2x4fv, + glUniformMatrix4x2fv, + glUniformMatrix3x4fv, + glUniformMatrix4x3fv; // GL30 public final long - glGetStringi, - glClearBufferiv, - glClearBufferuiv, - glClearBufferfv, - glClearBufferfi, - glVertexAttribI1i, - glVertexAttribI2i, - glVertexAttribI3i, - glVertexAttribI4i, - glVertexAttribI1ui, - glVertexAttribI2ui, - glVertexAttribI3ui, - glVertexAttribI4ui, - glVertexAttribI1iv, - glVertexAttribI2iv, - glVertexAttribI3iv, - glVertexAttribI4iv, - glVertexAttribI1uiv, - glVertexAttribI2uiv, - glVertexAttribI3uiv, - glVertexAttribI4uiv, - glVertexAttribI4bv, - glVertexAttribI4sv, - glVertexAttribI4ubv, - glVertexAttribI4usv, - glVertexAttribIPointer, - glGetVertexAttribIiv, - glGetVertexAttribIuiv, - glUniform1ui, - glUniform2ui, - glUniform3ui, - glUniform4ui, - glUniform1uiv, - glUniform2uiv, - glUniform3uiv, - glUniform4uiv, - glGetUniformuiv, - glBindFragDataLocation, - glGetFragDataLocation, - glBeginConditionalRender, - glEndConditionalRender, - glMapBufferRange, - glFlushMappedBufferRange, - glClampColor, - glIsRenderbuffer, - glBindRenderbuffer, - glDeleteRenderbuffers, - glGenRenderbuffers, - glRenderbufferStorage, - glRenderbufferStorageMultisample, - glGetRenderbufferParameteriv, - glIsFramebuffer, - glBindFramebuffer, - glDeleteFramebuffers, - glGenFramebuffers, - glCheckFramebufferStatus, - glFramebufferTexture1D, - glFramebufferTexture2D, - glFramebufferTexture3D, - glFramebufferTextureLayer, - glFramebufferRenderbuffer, - glGetFramebufferAttachmentParameteriv, - glBlitFramebuffer, - glGenerateMipmap, - glTexParameterIiv, - glTexParameterIuiv, - glGetTexParameterIiv, - glGetTexParameterIuiv, - glColorMaski, - glGetBooleani_v, - glGetIntegeri_v, - glEnablei, - glDisablei, - glIsEnabledi, - glBindBufferRange, - glBindBufferBase, - glBeginTransformFeedback, - glEndTransformFeedback, - glTransformFeedbackVaryings, - glGetTransformFeedbackVarying, - glBindVertexArray, - glDeleteVertexArrays, - glGenVertexArrays, - glIsVertexArray; + glGetStringi, + glClearBufferiv, + glClearBufferuiv, + glClearBufferfv, + glClearBufferfi, + glVertexAttribI1i, + glVertexAttribI2i, + glVertexAttribI3i, + glVertexAttribI4i, + glVertexAttribI1ui, + glVertexAttribI2ui, + glVertexAttribI3ui, + glVertexAttribI4ui, + glVertexAttribI1iv, + glVertexAttribI2iv, + glVertexAttribI3iv, + glVertexAttribI4iv, + glVertexAttribI1uiv, + glVertexAttribI2uiv, + glVertexAttribI3uiv, + glVertexAttribI4uiv, + glVertexAttribI4bv, + glVertexAttribI4sv, + glVertexAttribI4ubv, + glVertexAttribI4usv, + glVertexAttribIPointer, + glGetVertexAttribIiv, + glGetVertexAttribIuiv, + glUniform1ui, + glUniform2ui, + glUniform3ui, + glUniform4ui, + glUniform1uiv, + glUniform2uiv, + glUniform3uiv, + glUniform4uiv, + glGetUniformuiv, + glBindFragDataLocation, + glGetFragDataLocation, + glBeginConditionalRender, + glEndConditionalRender, + glMapBufferRange, + glFlushMappedBufferRange, + glClampColor, + glIsRenderbuffer, + glBindRenderbuffer, + glDeleteRenderbuffers, + glGenRenderbuffers, + glRenderbufferStorage, + glRenderbufferStorageMultisample, + glGetRenderbufferParameteriv, + glIsFramebuffer, + glBindFramebuffer, + glDeleteFramebuffers, + glGenFramebuffers, + glCheckFramebufferStatus, + glFramebufferTexture1D, + glFramebufferTexture2D, + glFramebufferTexture3D, + glFramebufferTextureLayer, + glFramebufferRenderbuffer, + glGetFramebufferAttachmentParameteriv, + glBlitFramebuffer, + glGenerateMipmap, + glTexParameterIiv, + glTexParameterIuiv, + glGetTexParameterIiv, + glGetTexParameterIuiv, + glColorMaski, + glGetBooleani_v, + glGetIntegeri_v, + glEnablei, + glDisablei, + glIsEnabledi, + glBindBufferRange, + glBindBufferBase, + glBeginTransformFeedback, + glEndTransformFeedback, + glTransformFeedbackVaryings, + glGetTransformFeedbackVarying, + glBindVertexArray, + glDeleteVertexArrays, + glGenVertexArrays, + glIsVertexArray; // GL31 public final long - glDrawArraysInstanced, - glDrawElementsInstanced, - glCopyBufferSubData, - glPrimitiveRestartIndex, - glTexBuffer, - glGetUniformIndices, - glGetActiveUniformsiv, - glGetActiveUniformName, - glGetUniformBlockIndex, - glGetActiveUniformBlockiv, - glGetActiveUniformBlockName, - glUniformBlockBinding; + glDrawArraysInstanced, + glDrawElementsInstanced, + glCopyBufferSubData, + glPrimitiveRestartIndex, + glTexBuffer, + glGetUniformIndices, + glGetActiveUniformsiv, + glGetActiveUniformName, + glGetUniformBlockIndex, + glGetActiveUniformBlockiv, + glGetActiveUniformBlockName, + glUniformBlockBinding; // GL32 public final long - glGetBufferParameteri64v, - glDrawElementsBaseVertex, - glDrawRangeElementsBaseVertex, - glDrawElementsInstancedBaseVertex, - glMultiDrawElementsBaseVertex, - glProvokingVertex, - glTexImage2DMultisample, - glTexImage3DMultisample, - glGetMultisamplefv, - glSampleMaski, - glFramebufferTexture, - glFenceSync, - glIsSync, - glDeleteSync, - glClientWaitSync, - glWaitSync, - glGetInteger64v, - glGetInteger64i_v, - glGetSynciv; + glGetBufferParameteri64v, + glDrawElementsBaseVertex, + glDrawRangeElementsBaseVertex, + glDrawElementsInstancedBaseVertex, + glMultiDrawElementsBaseVertex, + glProvokingVertex, + glTexImage2DMultisample, + glTexImage3DMultisample, + glGetMultisamplefv, + glSampleMaski, + glFramebufferTexture, + glFenceSync, + glIsSync, + glDeleteSync, + glClientWaitSync, + glWaitSync, + glGetInteger64v, + glGetInteger64i_v, + glGetSynciv; // GL33 public final long - glBindFragDataLocationIndexed, - glGetFragDataIndex, - glGenSamplers, - glDeleteSamplers, - glIsSampler, - glBindSampler, - glSamplerParameteri, - glSamplerParameterf, - glSamplerParameteriv, - glSamplerParameterfv, - glSamplerParameterIiv, - glSamplerParameterIuiv, - glGetSamplerParameteriv, - glGetSamplerParameterfv, - glGetSamplerParameterIiv, - glGetSamplerParameterIuiv, - glQueryCounter, - glGetQueryObjecti64v, - glGetQueryObjectui64v, - glVertexAttribDivisor, - glVertexP2ui, - glVertexP3ui, - glVertexP4ui, - glVertexP2uiv, - glVertexP3uiv, - glVertexP4uiv, - glTexCoordP1ui, - glTexCoordP2ui, - glTexCoordP3ui, - glTexCoordP4ui, - glTexCoordP1uiv, - glTexCoordP2uiv, - glTexCoordP3uiv, - glTexCoordP4uiv, - glMultiTexCoordP1ui, - glMultiTexCoordP2ui, - glMultiTexCoordP3ui, - glMultiTexCoordP4ui, - glMultiTexCoordP1uiv, - glMultiTexCoordP2uiv, - glMultiTexCoordP3uiv, - glMultiTexCoordP4uiv, - glNormalP3ui, - glNormalP3uiv, - glColorP3ui, - glColorP4ui, - glColorP3uiv, - glColorP4uiv, - glSecondaryColorP3ui, - glSecondaryColorP3uiv, - glVertexAttribP1ui, - glVertexAttribP2ui, - glVertexAttribP3ui, - glVertexAttribP4ui, - glVertexAttribP1uiv, - glVertexAttribP2uiv, - glVertexAttribP3uiv, - glVertexAttribP4uiv; + glBindFragDataLocationIndexed, + glGetFragDataIndex, + glGenSamplers, + glDeleteSamplers, + glIsSampler, + glBindSampler, + glSamplerParameteri, + glSamplerParameterf, + glSamplerParameteriv, + glSamplerParameterfv, + glSamplerParameterIiv, + glSamplerParameterIuiv, + glGetSamplerParameteriv, + glGetSamplerParameterfv, + glGetSamplerParameterIiv, + glGetSamplerParameterIuiv, + glQueryCounter, + glGetQueryObjecti64v, + glGetQueryObjectui64v, + glVertexAttribDivisor, + glVertexP2ui, + glVertexP3ui, + glVertexP4ui, + glVertexP2uiv, + glVertexP3uiv, + glVertexP4uiv, + glTexCoordP1ui, + glTexCoordP2ui, + glTexCoordP3ui, + glTexCoordP4ui, + glTexCoordP1uiv, + glTexCoordP2uiv, + glTexCoordP3uiv, + glTexCoordP4uiv, + glMultiTexCoordP1ui, + glMultiTexCoordP2ui, + glMultiTexCoordP3ui, + glMultiTexCoordP4ui, + glMultiTexCoordP1uiv, + glMultiTexCoordP2uiv, + glMultiTexCoordP3uiv, + glMultiTexCoordP4uiv, + glNormalP3ui, + glNormalP3uiv, + glColorP3ui, + glColorP4ui, + glColorP3uiv, + glColorP4uiv, + glSecondaryColorP3ui, + glSecondaryColorP3uiv, + glVertexAttribP1ui, + glVertexAttribP2ui, + glVertexAttribP3ui, + glVertexAttribP4ui, + glVertexAttribP1uiv, + glVertexAttribP2uiv, + glVertexAttribP3uiv, + glVertexAttribP4uiv; // GL40 public final long - glBlendEquationi, - glBlendEquationSeparatei, - glBlendFunci, - glBlendFuncSeparatei, - glDrawArraysIndirect, - glDrawElementsIndirect, - glUniform1d, - glUniform2d, - glUniform3d, - glUniform4d, - glUniform1dv, - glUniform2dv, - glUniform3dv, - glUniform4dv, - glUniformMatrix2dv, - glUniformMatrix3dv, - glUniformMatrix4dv, - glUniformMatrix2x3dv, - glUniformMatrix2x4dv, - glUniformMatrix3x2dv, - glUniformMatrix3x4dv, - glUniformMatrix4x2dv, - glUniformMatrix4x3dv, - glGetUniformdv, - glMinSampleShading, - glGetSubroutineUniformLocation, - glGetSubroutineIndex, - glGetActiveSubroutineUniformiv, - glGetActiveSubroutineUniformName, - glGetActiveSubroutineName, - glUniformSubroutinesuiv, - glGetUniformSubroutineuiv, - glGetProgramStageiv, - glPatchParameteri, - glPatchParameterfv, - glBindTransformFeedback, - glDeleteTransformFeedbacks, - glGenTransformFeedbacks, - glIsTransformFeedback, - glPauseTransformFeedback, - glResumeTransformFeedback, - glDrawTransformFeedback, - glDrawTransformFeedbackStream, - glBeginQueryIndexed, - glEndQueryIndexed, - glGetQueryIndexediv; + glBlendEquationi, + glBlendEquationSeparatei, + glBlendFunci, + glBlendFuncSeparatei, + glDrawArraysIndirect, + glDrawElementsIndirect, + glUniform1d, + glUniform2d, + glUniform3d, + glUniform4d, + glUniform1dv, + glUniform2dv, + glUniform3dv, + glUniform4dv, + glUniformMatrix2dv, + glUniformMatrix3dv, + glUniformMatrix4dv, + glUniformMatrix2x3dv, + glUniformMatrix2x4dv, + glUniformMatrix3x2dv, + glUniformMatrix3x4dv, + glUniformMatrix4x2dv, + glUniformMatrix4x3dv, + glGetUniformdv, + glMinSampleShading, + glGetSubroutineUniformLocation, + glGetSubroutineIndex, + glGetActiveSubroutineUniformiv, + glGetActiveSubroutineUniformName, + glGetActiveSubroutineName, + glUniformSubroutinesuiv, + glGetUniformSubroutineuiv, + glGetProgramStageiv, + glPatchParameteri, + glPatchParameterfv, + glBindTransformFeedback, + glDeleteTransformFeedbacks, + glGenTransformFeedbacks, + glIsTransformFeedback, + glPauseTransformFeedback, + glResumeTransformFeedback, + glDrawTransformFeedback, + glDrawTransformFeedbackStream, + glBeginQueryIndexed, + glEndQueryIndexed, + glGetQueryIndexediv; // GL41 public final long - glReleaseShaderCompiler, - glShaderBinary, - glGetShaderPrecisionFormat, - glDepthRangef, - glClearDepthf, - glGetProgramBinary, - glProgramBinary, - glProgramParameteri, - glUseProgramStages, - glActiveShaderProgram, - glCreateShaderProgramv, - glBindProgramPipeline, - glDeleteProgramPipelines, - glGenProgramPipelines, - glIsProgramPipeline, - glGetProgramPipelineiv, - glProgramUniform1i, - glProgramUniform2i, - glProgramUniform3i, - glProgramUniform4i, - glProgramUniform1ui, - glProgramUniform2ui, - glProgramUniform3ui, - glProgramUniform4ui, - glProgramUniform1f, - glProgramUniform2f, - glProgramUniform3f, - glProgramUniform4f, - glProgramUniform1d, - glProgramUniform2d, - glProgramUniform3d, - glProgramUniform4d, - glProgramUniform1iv, - glProgramUniform2iv, - glProgramUniform3iv, - glProgramUniform4iv, - glProgramUniform1uiv, - glProgramUniform2uiv, - glProgramUniform3uiv, - glProgramUniform4uiv, - glProgramUniform1fv, - glProgramUniform2fv, - glProgramUniform3fv, - glProgramUniform4fv, - glProgramUniform1dv, - glProgramUniform2dv, - glProgramUniform3dv, - glProgramUniform4dv, - glProgramUniformMatrix2fv, - glProgramUniformMatrix3fv, - glProgramUniformMatrix4fv, - glProgramUniformMatrix2dv, - glProgramUniformMatrix3dv, - glProgramUniformMatrix4dv, - glProgramUniformMatrix2x3fv, - glProgramUniformMatrix3x2fv, - glProgramUniformMatrix2x4fv, - glProgramUniformMatrix4x2fv, - glProgramUniformMatrix3x4fv, - glProgramUniformMatrix4x3fv, - glProgramUniformMatrix2x3dv, - glProgramUniformMatrix3x2dv, - glProgramUniformMatrix2x4dv, - glProgramUniformMatrix4x2dv, - glProgramUniformMatrix3x4dv, - glProgramUniformMatrix4x3dv, - glValidateProgramPipeline, - glGetProgramPipelineInfoLog, - glVertexAttribL1d, - glVertexAttribL2d, - glVertexAttribL3d, - glVertexAttribL4d, - glVertexAttribL1dv, - glVertexAttribL2dv, - glVertexAttribL3dv, - glVertexAttribL4dv, - glVertexAttribLPointer, - glGetVertexAttribLdv, - glViewportArrayv, - glViewportIndexedf, - glViewportIndexedfv, - glScissorArrayv, - glScissorIndexed, - glScissorIndexedv, - glDepthRangeArrayv, - glDepthRangeIndexed, - glGetFloati_v, - glGetDoublei_v; + glReleaseShaderCompiler, + glShaderBinary, + glGetShaderPrecisionFormat, + glDepthRangef, + glClearDepthf, + glGetProgramBinary, + glProgramBinary, + glProgramParameteri, + glUseProgramStages, + glActiveShaderProgram, + glCreateShaderProgramv, + glBindProgramPipeline, + glDeleteProgramPipelines, + glGenProgramPipelines, + glIsProgramPipeline, + glGetProgramPipelineiv, + glProgramUniform1i, + glProgramUniform2i, + glProgramUniform3i, + glProgramUniform4i, + glProgramUniform1ui, + glProgramUniform2ui, + glProgramUniform3ui, + glProgramUniform4ui, + glProgramUniform1f, + glProgramUniform2f, + glProgramUniform3f, + glProgramUniform4f, + glProgramUniform1d, + glProgramUniform2d, + glProgramUniform3d, + glProgramUniform4d, + glProgramUniform1iv, + glProgramUniform2iv, + glProgramUniform3iv, + glProgramUniform4iv, + glProgramUniform1uiv, + glProgramUniform2uiv, + glProgramUniform3uiv, + glProgramUniform4uiv, + glProgramUniform1fv, + glProgramUniform2fv, + glProgramUniform3fv, + glProgramUniform4fv, + glProgramUniform1dv, + glProgramUniform2dv, + glProgramUniform3dv, + glProgramUniform4dv, + glProgramUniformMatrix2fv, + glProgramUniformMatrix3fv, + glProgramUniformMatrix4fv, + glProgramUniformMatrix2dv, + glProgramUniformMatrix3dv, + glProgramUniformMatrix4dv, + glProgramUniformMatrix2x3fv, + glProgramUniformMatrix3x2fv, + glProgramUniformMatrix2x4fv, + glProgramUniformMatrix4x2fv, + glProgramUniformMatrix3x4fv, + glProgramUniformMatrix4x3fv, + glProgramUniformMatrix2x3dv, + glProgramUniformMatrix3x2dv, + glProgramUniformMatrix2x4dv, + glProgramUniformMatrix4x2dv, + glProgramUniformMatrix3x4dv, + glProgramUniformMatrix4x3dv, + glValidateProgramPipeline, + glGetProgramPipelineInfoLog, + glVertexAttribL1d, + glVertexAttribL2d, + glVertexAttribL3d, + glVertexAttribL4d, + glVertexAttribL1dv, + glVertexAttribL2dv, + glVertexAttribL3dv, + glVertexAttribL4dv, + glVertexAttribLPointer, + glGetVertexAttribLdv, + glViewportArrayv, + glViewportIndexedf, + glViewportIndexedfv, + glScissorArrayv, + glScissorIndexed, + glScissorIndexedv, + glDepthRangeArrayv, + glDepthRangeIndexed, + glGetFloati_v, + glGetDoublei_v; // GL42 public final long - glGetActiveAtomicCounterBufferiv, - glTexStorage1D, - glTexStorage2D, - glTexStorage3D, - glDrawTransformFeedbackInstanced, - glDrawTransformFeedbackStreamInstanced, - glDrawArraysInstancedBaseInstance, - glDrawElementsInstancedBaseInstance, - glDrawElementsInstancedBaseVertexBaseInstance, - glBindImageTexture, - glMemoryBarrier, - glGetInternalformativ; + glGetActiveAtomicCounterBufferiv, + glTexStorage1D, + glTexStorage2D, + glTexStorage3D, + glDrawTransformFeedbackInstanced, + glDrawTransformFeedbackStreamInstanced, + glDrawArraysInstancedBaseInstance, + glDrawElementsInstancedBaseInstance, + glDrawElementsInstancedBaseVertexBaseInstance, + glBindImageTexture, + glMemoryBarrier, + glGetInternalformativ; // GL43 public final long - glClearBufferData, - glClearBufferSubData, - glDispatchCompute, - glDispatchComputeIndirect, - glCopyImageSubData, - glDebugMessageControl, - glDebugMessageInsert, - glDebugMessageCallback, - glGetDebugMessageLog, - glPushDebugGroup, - glPopDebugGroup, - glObjectLabel, - glGetObjectLabel, - glObjectPtrLabel, - glGetObjectPtrLabel, - glFramebufferParameteri, - glGetFramebufferParameteriv, - glGetInternalformati64v, - glInvalidateTexSubImage, - glInvalidateTexImage, - glInvalidateBufferSubData, - glInvalidateBufferData, - glInvalidateFramebuffer, - glInvalidateSubFramebuffer, - glMultiDrawArraysIndirect, - glMultiDrawElementsIndirect, - glGetProgramInterfaceiv, - glGetProgramResourceIndex, - glGetProgramResourceName, - glGetProgramResourceiv, - glGetProgramResourceLocation, - glGetProgramResourceLocationIndex, - glShaderStorageBlockBinding, - glTexBufferRange, - glTexStorage2DMultisample, - glTexStorage3DMultisample, - glTextureView, - glBindVertexBuffer, - glVertexAttribFormat, - glVertexAttribIFormat, - glVertexAttribLFormat, - glVertexAttribBinding, - glVertexBindingDivisor; + glClearBufferData, + glClearBufferSubData, + glDispatchCompute, + glDispatchComputeIndirect, + glCopyImageSubData, + glDebugMessageControl, + glDebugMessageInsert, + glDebugMessageCallback, + glGetDebugMessageLog, + glPushDebugGroup, + glPopDebugGroup, + glObjectLabel, + glGetObjectLabel, + glObjectPtrLabel, + glGetObjectPtrLabel, + glFramebufferParameteri, + glGetFramebufferParameteriv, + glGetInternalformati64v, + glInvalidateTexSubImage, + glInvalidateTexImage, + glInvalidateBufferSubData, + glInvalidateBufferData, + glInvalidateFramebuffer, + glInvalidateSubFramebuffer, + glMultiDrawArraysIndirect, + glMultiDrawElementsIndirect, + glGetProgramInterfaceiv, + glGetProgramResourceIndex, + glGetProgramResourceName, + glGetProgramResourceiv, + glGetProgramResourceLocation, + glGetProgramResourceLocationIndex, + glShaderStorageBlockBinding, + glTexBufferRange, + glTexStorage2DMultisample, + glTexStorage3DMultisample, + glTextureView, + glBindVertexBuffer, + glVertexAttribFormat, + glVertexAttribIFormat, + glVertexAttribLFormat, + glVertexAttribBinding, + glVertexBindingDivisor; // GL44 public final long - glBufferStorage, - glClearTexSubImage, - glClearTexImage, - glBindBuffersBase, - glBindBuffersRange, - glBindTextures, - glBindSamplers, - glBindImageTextures, - glBindVertexBuffers; + glBufferStorage, + glClearTexSubImage, + glClearTexImage, + glBindBuffersBase, + glBindBuffersRange, + glBindTextures, + glBindSamplers, + glBindImageTextures, + glBindVertexBuffers; // GL45 public final long - glClipControl, - glCreateTransformFeedbacks, - glTransformFeedbackBufferBase, - glTransformFeedbackBufferRange, - glGetTransformFeedbackiv, - glGetTransformFeedbacki_v, - glGetTransformFeedbacki64_v, - glCreateBuffers, - glNamedBufferStorage, - glNamedBufferData, - glNamedBufferSubData, - glCopyNamedBufferSubData, - glClearNamedBufferData, - glClearNamedBufferSubData, - glMapNamedBuffer, - glMapNamedBufferRange, - glUnmapNamedBuffer, - glFlushMappedNamedBufferRange, - glGetNamedBufferParameteriv, - glGetNamedBufferParameteri64v, - glGetNamedBufferPointerv, - glGetNamedBufferSubData, - glCreateFramebuffers, - glNamedFramebufferRenderbuffer, - glNamedFramebufferParameteri, - glNamedFramebufferTexture, - glNamedFramebufferTextureLayer, - glNamedFramebufferDrawBuffer, - glNamedFramebufferDrawBuffers, - glNamedFramebufferReadBuffer, - glInvalidateNamedFramebufferData, - glInvalidateNamedFramebufferSubData, - glClearNamedFramebufferiv, - glClearNamedFramebufferuiv, - glClearNamedFramebufferfv, - glClearNamedFramebufferfi, - glBlitNamedFramebuffer, - glCheckNamedFramebufferStatus, - glGetNamedFramebufferParameteriv, - glGetNamedFramebufferAttachmentParameteriv, - glCreateRenderbuffers, - glNamedRenderbufferStorage, - glNamedRenderbufferStorageMultisample, - glGetNamedRenderbufferParameteriv, - glCreateTextures, - glTextureBuffer, - glTextureBufferRange, - glTextureStorage1D, - glTextureStorage2D, - glTextureStorage3D, - glTextureStorage2DMultisample, - glTextureStorage3DMultisample, - glTextureSubImage1D, - glTextureSubImage2D, - glTextureSubImage3D, - glCompressedTextureSubImage1D, - glCompressedTextureSubImage2D, - glCompressedTextureSubImage3D, - glCopyTextureSubImage1D, - glCopyTextureSubImage2D, - glCopyTextureSubImage3D, - glTextureParameterf, - glTextureParameterfv, - glTextureParameteri, - glTextureParameterIiv, - glTextureParameterIuiv, - glTextureParameteriv, - glGenerateTextureMipmap, - glBindTextureUnit, - glGetTextureImage, - glGetCompressedTextureImage, - glGetTextureLevelParameterfv, - glGetTextureLevelParameteriv, - glGetTextureParameterfv, - glGetTextureParameterIiv, - glGetTextureParameterIuiv, - glGetTextureParameteriv, - glCreateVertexArrays, - glDisableVertexArrayAttrib, - glEnableVertexArrayAttrib, - glVertexArrayElementBuffer, - glVertexArrayVertexBuffer, - glVertexArrayVertexBuffers, - glVertexArrayAttribFormat, - glVertexArrayAttribIFormat, - glVertexArrayAttribLFormat, - glVertexArrayAttribBinding, - glVertexArrayBindingDivisor, - glGetVertexArrayiv, - glGetVertexArrayIndexediv, - glGetVertexArrayIndexed64iv, - glCreateSamplers, - glCreateProgramPipelines, - glCreateQueries, - glGetQueryBufferObjectiv, - glGetQueryBufferObjectuiv, - glGetQueryBufferObjecti64v, - glGetQueryBufferObjectui64v, - glMemoryBarrierByRegion, - glGetTextureSubImage, - glGetCompressedTextureSubImage, - glTextureBarrier, - glGetGraphicsResetStatus, - glGetnMapdv, - glGetnMapfv, - glGetnMapiv, - glGetnPixelMapfv, - glGetnPixelMapuiv, - glGetnPixelMapusv, - glGetnPolygonStipple, - glGetnTexImage, - glReadnPixels, - glGetnColorTable, - glGetnConvolutionFilter, - glGetnSeparableFilter, - glGetnHistogram, - glGetnMinmax, - glGetnCompressedTexImage, - glGetnUniformfv, - glGetnUniformdv, - glGetnUniformiv, - glGetnUniformuiv; + glClipControl, + glCreateTransformFeedbacks, + glTransformFeedbackBufferBase, + glTransformFeedbackBufferRange, + glGetTransformFeedbackiv, + glGetTransformFeedbacki_v, + glGetTransformFeedbacki64_v, + glCreateBuffers, + glNamedBufferStorage, + glNamedBufferData, + glNamedBufferSubData, + glCopyNamedBufferSubData, + glClearNamedBufferData, + glClearNamedBufferSubData, + glMapNamedBuffer, + glMapNamedBufferRange, + glUnmapNamedBuffer, + glFlushMappedNamedBufferRange, + glGetNamedBufferParameteriv, + glGetNamedBufferParameteri64v, + glGetNamedBufferPointerv, + glGetNamedBufferSubData, + glCreateFramebuffers, + glNamedFramebufferRenderbuffer, + glNamedFramebufferParameteri, + glNamedFramebufferTexture, + glNamedFramebufferTextureLayer, + glNamedFramebufferDrawBuffer, + glNamedFramebufferDrawBuffers, + glNamedFramebufferReadBuffer, + glInvalidateNamedFramebufferData, + glInvalidateNamedFramebufferSubData, + glClearNamedFramebufferiv, + glClearNamedFramebufferuiv, + glClearNamedFramebufferfv, + glClearNamedFramebufferfi, + glBlitNamedFramebuffer, + glCheckNamedFramebufferStatus, + glGetNamedFramebufferParameteriv, + glGetNamedFramebufferAttachmentParameteriv, + glCreateRenderbuffers, + glNamedRenderbufferStorage, + glNamedRenderbufferStorageMultisample, + glGetNamedRenderbufferParameteriv, + glCreateTextures, + glTextureBuffer, + glTextureBufferRange, + glTextureStorage1D, + glTextureStorage2D, + glTextureStorage3D, + glTextureStorage2DMultisample, + glTextureStorage3DMultisample, + glTextureSubImage1D, + glTextureSubImage2D, + glTextureSubImage3D, + glCompressedTextureSubImage1D, + glCompressedTextureSubImage2D, + glCompressedTextureSubImage3D, + glCopyTextureSubImage1D, + glCopyTextureSubImage2D, + glCopyTextureSubImage3D, + glTextureParameterf, + glTextureParameterfv, + glTextureParameteri, + glTextureParameterIiv, + glTextureParameterIuiv, + glTextureParameteriv, + glGenerateTextureMipmap, + glBindTextureUnit, + glGetTextureImage, + glGetCompressedTextureImage, + glGetTextureLevelParameterfv, + glGetTextureLevelParameteriv, + glGetTextureParameterfv, + glGetTextureParameterIiv, + glGetTextureParameterIuiv, + glGetTextureParameteriv, + glCreateVertexArrays, + glDisableVertexArrayAttrib, + glEnableVertexArrayAttrib, + glVertexArrayElementBuffer, + glVertexArrayVertexBuffer, + glVertexArrayVertexBuffers, + glVertexArrayAttribFormat, + glVertexArrayAttribIFormat, + glVertexArrayAttribLFormat, + glVertexArrayAttribBinding, + glVertexArrayBindingDivisor, + glGetVertexArrayiv, + glGetVertexArrayIndexediv, + glGetVertexArrayIndexed64iv, + glCreateSamplers, + glCreateProgramPipelines, + glCreateQueries, + glGetQueryBufferObjectiv, + glGetQueryBufferObjectuiv, + glGetQueryBufferObjecti64v, + glGetQueryBufferObjectui64v, + glMemoryBarrierByRegion, + glGetTextureSubImage, + glGetCompressedTextureSubImage, + glTextureBarrier, + glGetGraphicsResetStatus, + glGetnMapdv, + glGetnMapfv, + glGetnMapiv, + glGetnPixelMapfv, + glGetnPixelMapuiv, + glGetnPixelMapusv, + glGetnPolygonStipple, + glGetnTexImage, + glReadnPixels, + glGetnColorTable, + glGetnConvolutionFilter, + glGetnSeparableFilter, + glGetnHistogram, + glGetnMinmax, + glGetnCompressedTexImage, + glGetnUniformfv, + glGetnUniformdv, + glGetnUniformiv, + glGetnUniformuiv; // GL46 public final long - glMultiDrawArraysIndirectCount, - glMultiDrawElementsIndirectCount, - glPolygonOffsetClamp, - glSpecializeShader; + glMultiDrawArraysIndirectCount, + glMultiDrawElementsIndirectCount, + glPolygonOffsetClamp, + glSpecializeShader; // AMD_debug_output public final long - glDebugMessageEnableAMD, - glDebugMessageInsertAMD, - glDebugMessageCallbackAMD, - glGetDebugMessageLogAMD; + glDebugMessageEnableAMD, + glDebugMessageInsertAMD, + glDebugMessageCallbackAMD, + glGetDebugMessageLogAMD; // AMD_draw_buffers_blend public final long - glBlendFuncIndexedAMD, - glBlendFuncSeparateIndexedAMD, - glBlendEquationIndexedAMD, - glBlendEquationSeparateIndexedAMD; + glBlendFuncIndexedAMD, + glBlendFuncSeparateIndexedAMD, + glBlendEquationIndexedAMD, + glBlendEquationSeparateIndexedAMD; // AMD_framebuffer_multisample_advanced public final long - glRenderbufferStorageMultisampleAdvancedAMD, - glNamedRenderbufferStorageMultisampleAdvancedAMD; + glRenderbufferStorageMultisampleAdvancedAMD, + glNamedRenderbufferStorageMultisampleAdvancedAMD; // AMD_gpu_shader_int64 public final long - glUniform1i64NV, - glUniform2i64NV, - glUniform3i64NV, - glUniform4i64NV, - glUniform1i64vNV, - glUniform2i64vNV, - glUniform3i64vNV, - glUniform4i64vNV, - glUniform1ui64NV, - glUniform2ui64NV, - glUniform3ui64NV, - glUniform4ui64NV, - glUniform1ui64vNV, - glUniform2ui64vNV, - glUniform3ui64vNV, - glUniform4ui64vNV, - glGetUniformi64vNV, - glGetUniformui64vNV, - glProgramUniform1i64NV, - glProgramUniform2i64NV, - glProgramUniform3i64NV, - glProgramUniform4i64NV, - glProgramUniform1i64vNV, - glProgramUniform2i64vNV, - glProgramUniform3i64vNV, - glProgramUniform4i64vNV, - glProgramUniform1ui64NV, - glProgramUniform2ui64NV, - glProgramUniform3ui64NV, - glProgramUniform4ui64NV, - glProgramUniform1ui64vNV, - glProgramUniform2ui64vNV, - glProgramUniform3ui64vNV, - glProgramUniform4ui64vNV; + glUniform1i64NV, + glUniform2i64NV, + glUniform3i64NV, + glUniform4i64NV, + glUniform1i64vNV, + glUniform2i64vNV, + glUniform3i64vNV, + glUniform4i64vNV, + glUniform1ui64NV, + glUniform2ui64NV, + glUniform3ui64NV, + glUniform4ui64NV, + glUniform1ui64vNV, + glUniform2ui64vNV, + glUniform3ui64vNV, + glUniform4ui64vNV, + glGetUniformi64vNV, + glGetUniformui64vNV, + glProgramUniform1i64NV, + glProgramUniform2i64NV, + glProgramUniform3i64NV, + glProgramUniform4i64NV, + glProgramUniform1i64vNV, + glProgramUniform2i64vNV, + glProgramUniform3i64vNV, + glProgramUniform4i64vNV, + glProgramUniform1ui64NV, + glProgramUniform2ui64NV, + glProgramUniform3ui64NV, + glProgramUniform4ui64NV, + glProgramUniform1ui64vNV, + glProgramUniform2ui64vNV, + glProgramUniform3ui64vNV, + glProgramUniform4ui64vNV; // AMD_interleaved_elements public final long - glVertexAttribParameteriAMD; + glVertexAttribParameteriAMD; // AMD_occlusion_query_event public final long - glQueryObjectParameteruiAMD; + glQueryObjectParameteruiAMD; // AMD_performance_monitor public final long - glGetPerfMonitorGroupsAMD, - glGetPerfMonitorCountersAMD, - glGetPerfMonitorGroupStringAMD, - glGetPerfMonitorCounterStringAMD, - glGetPerfMonitorCounterInfoAMD, - glGenPerfMonitorsAMD, - glDeletePerfMonitorsAMD, - glSelectPerfMonitorCountersAMD, - glBeginPerfMonitorAMD, - glEndPerfMonitorAMD, - glGetPerfMonitorCounterDataAMD; + glGetPerfMonitorGroupsAMD, + glGetPerfMonitorCountersAMD, + glGetPerfMonitorGroupStringAMD, + glGetPerfMonitorCounterStringAMD, + glGetPerfMonitorCounterInfoAMD, + glGenPerfMonitorsAMD, + glDeletePerfMonitorsAMD, + glSelectPerfMonitorCountersAMD, + glBeginPerfMonitorAMD, + glEndPerfMonitorAMD, + glGetPerfMonitorCounterDataAMD; // AMD_sample_positions public final long - glSetMultisamplefvAMD; + glSetMultisamplefvAMD; // AMD_sparse_texture public final long - glTexStorageSparseAMD, - glTextureStorageSparseAMD; + glTexStorageSparseAMD, + glTextureStorageSparseAMD; // AMD_stencil_operation_extended public final long - glStencilOpValueAMD; + glStencilOpValueAMD; // AMD_vertex_shader_tessellator public final long - glTessellationFactorAMD, - glTessellationModeAMD; + glTessellationFactorAMD, + glTessellationModeAMD; // ARB_bindless_texture public final long - glGetTextureHandleARB, - glGetTextureSamplerHandleARB, - glMakeTextureHandleResidentARB, - glMakeTextureHandleNonResidentARB, - glGetImageHandleARB, - glMakeImageHandleResidentARB, - glMakeImageHandleNonResidentARB, - glUniformHandleui64ARB, - glUniformHandleui64vARB, - glProgramUniformHandleui64ARB, - glProgramUniformHandleui64vARB, - glIsTextureHandleResidentARB, - glIsImageHandleResidentARB, - glVertexAttribL1ui64ARB, - glVertexAttribL1ui64vARB, - glGetVertexAttribLui64vARB; + glGetTextureHandleARB, + glGetTextureSamplerHandleARB, + glMakeTextureHandleResidentARB, + glMakeTextureHandleNonResidentARB, + glGetImageHandleARB, + glMakeImageHandleResidentARB, + glMakeImageHandleNonResidentARB, + glUniformHandleui64ARB, + glUniformHandleui64vARB, + glProgramUniformHandleui64ARB, + glProgramUniformHandleui64vARB, + glIsTextureHandleResidentARB, + glIsImageHandleResidentARB, + glVertexAttribL1ui64ARB, + glVertexAttribL1ui64vARB, + glGetVertexAttribLui64vARB; // ARB_buffer_storage public final long - glNamedBufferStorageEXT; + glNamedBufferStorageEXT; + + // ARB_cl_event + public final long + glCreateSyncFromCLeventARB; // ARB_clear_buffer_object public final long - glClearNamedBufferDataEXT, - glClearNamedBufferSubDataEXT; + glClearNamedBufferDataEXT, + glClearNamedBufferSubDataEXT; // ARB_color_buffer_float public final long - glClampColorARB; + glClampColorARB; // ARB_compute_variable_group_size public final long - glDispatchComputeGroupSizeARB; + glDispatchComputeGroupSizeARB; // ARB_debug_output public final long - glDebugMessageControlARB, - glDebugMessageInsertARB, - glDebugMessageCallbackARB, - glGetDebugMessageLogARB; + glDebugMessageControlARB, + glDebugMessageInsertARB, + glDebugMessageCallbackARB, + glGetDebugMessageLogARB; // ARB_draw_buffers public final long - glDrawBuffersARB; + glDrawBuffersARB; // ARB_draw_buffers_blend public final long - glBlendEquationiARB, - glBlendEquationSeparateiARB, - glBlendFunciARB, - glBlendFuncSeparateiARB; + glBlendEquationiARB, + glBlendEquationSeparateiARB, + glBlendFunciARB, + glBlendFuncSeparateiARB; // ARB_draw_instanced public final long - glDrawArraysInstancedARB, - glDrawElementsInstancedARB; + glDrawArraysInstancedARB, + glDrawElementsInstancedARB; // ARB_ES3_2_compatibility public final long - glPrimitiveBoundingBoxARB; + glPrimitiveBoundingBoxARB; // ARB_framebuffer_no_attachments public final long - glNamedFramebufferParameteriEXT, - glGetNamedFramebufferParameterivEXT; + glNamedFramebufferParameteriEXT, + glGetNamedFramebufferParameterivEXT; // ARB_geometry_shader4 public final long - glProgramParameteriARB, - glFramebufferTextureARB, - glFramebufferTextureLayerARB, - glFramebufferTextureFaceARB; + glProgramParameteriARB, + glFramebufferTextureARB, + glFramebufferTextureLayerARB, + glFramebufferTextureFaceARB; // ARB_gl_spirv public final long - glSpecializeShaderARB; + glSpecializeShaderARB; // ARB_gpu_shader_fp64 public final long - glProgramUniform1dEXT, - glProgramUniform2dEXT, - glProgramUniform3dEXT, - glProgramUniform4dEXT, - glProgramUniform1dvEXT, - glProgramUniform2dvEXT, - glProgramUniform3dvEXT, - glProgramUniform4dvEXT, - glProgramUniformMatrix2dvEXT, - glProgramUniformMatrix3dvEXT, - glProgramUniformMatrix4dvEXT, - glProgramUniformMatrix2x3dvEXT, - glProgramUniformMatrix2x4dvEXT, - glProgramUniformMatrix3x2dvEXT, - glProgramUniformMatrix3x4dvEXT, - glProgramUniformMatrix4x2dvEXT, - glProgramUniformMatrix4x3dvEXT; + glProgramUniform1dEXT, + glProgramUniform2dEXT, + glProgramUniform3dEXT, + glProgramUniform4dEXT, + glProgramUniform1dvEXT, + glProgramUniform2dvEXT, + glProgramUniform3dvEXT, + glProgramUniform4dvEXT, + glProgramUniformMatrix2dvEXT, + glProgramUniformMatrix3dvEXT, + glProgramUniformMatrix4dvEXT, + glProgramUniformMatrix2x3dvEXT, + glProgramUniformMatrix2x4dvEXT, + glProgramUniformMatrix3x2dvEXT, + glProgramUniformMatrix3x4dvEXT, + glProgramUniformMatrix4x2dvEXT, + glProgramUniformMatrix4x3dvEXT; // ARB_gpu_shader_int64 public final long - glUniform1i64ARB, - glUniform1i64vARB, - glProgramUniform1i64ARB, - glProgramUniform1i64vARB, - glUniform2i64ARB, - glUniform2i64vARB, - glProgramUniform2i64ARB, - glProgramUniform2i64vARB, - glUniform3i64ARB, - glUniform3i64vARB, - glProgramUniform3i64ARB, - glProgramUniform3i64vARB, - glUniform4i64ARB, - glUniform4i64vARB, - glProgramUniform4i64ARB, - glProgramUniform4i64vARB, - glUniform1ui64ARB, - glUniform1ui64vARB, - glProgramUniform1ui64ARB, - glProgramUniform1ui64vARB, - glUniform2ui64ARB, - glUniform2ui64vARB, - glProgramUniform2ui64ARB, - glProgramUniform2ui64vARB, - glUniform3ui64ARB, - glUniform3ui64vARB, - glProgramUniform3ui64ARB, - glProgramUniform3ui64vARB, - glUniform4ui64ARB, - glUniform4ui64vARB, - glProgramUniform4ui64ARB, - glProgramUniform4ui64vARB, - glGetUniformi64vARB, - glGetUniformui64vARB, - glGetnUniformi64vARB, - glGetnUniformui64vARB; + glUniform1i64ARB, + glUniform1i64vARB, + glProgramUniform1i64ARB, + glProgramUniform1i64vARB, + glUniform2i64ARB, + glUniform2i64vARB, + glProgramUniform2i64ARB, + glProgramUniform2i64vARB, + glUniform3i64ARB, + glUniform3i64vARB, + glProgramUniform3i64ARB, + glProgramUniform3i64vARB, + glUniform4i64ARB, + glUniform4i64vARB, + glProgramUniform4i64ARB, + glProgramUniform4i64vARB, + glUniform1ui64ARB, + glUniform1ui64vARB, + glProgramUniform1ui64ARB, + glProgramUniform1ui64vARB, + glUniform2ui64ARB, + glUniform2ui64vARB, + glProgramUniform2ui64ARB, + glProgramUniform2ui64vARB, + glUniform3ui64ARB, + glUniform3ui64vARB, + glProgramUniform3ui64ARB, + glProgramUniform3ui64vARB, + glUniform4ui64ARB, + glUniform4ui64vARB, + glProgramUniform4ui64ARB, + glProgramUniform4ui64vARB, + glGetUniformi64vARB, + glGetUniformui64vARB, + glGetnUniformi64vARB, + glGetnUniformui64vARB; // ARB_imaging public final long - glColorTable, - glCopyColorTable, - glColorTableParameteriv, - glColorTableParameterfv, - glGetColorTable, - glGetColorTableParameteriv, - glGetColorTableParameterfv, - glColorSubTable, - glCopyColorSubTable, - glConvolutionFilter1D, - glConvolutionFilter2D, - glCopyConvolutionFilter1D, - glCopyConvolutionFilter2D, - glGetConvolutionFilter, - glSeparableFilter2D, - glGetSeparableFilter, - glConvolutionParameteri, - glConvolutionParameteriv, - glConvolutionParameterf, - glConvolutionParameterfv, - glGetConvolutionParameteriv, - glGetConvolutionParameterfv, - glHistogram, - glResetHistogram, - glGetHistogram, - glGetHistogramParameteriv, - glGetHistogramParameterfv, - glMinmax, - glResetMinmax, - glGetMinmax, - glGetMinmaxParameteriv, - glGetMinmaxParameterfv; + glColorTable, + glCopyColorTable, + glColorTableParameteriv, + glColorTableParameterfv, + glGetColorTable, + glGetColorTableParameteriv, + glGetColorTableParameterfv, + glColorSubTable, + glCopyColorSubTable, + glConvolutionFilter1D, + glConvolutionFilter2D, + glCopyConvolutionFilter1D, + glCopyConvolutionFilter2D, + glGetConvolutionFilter, + glSeparableFilter2D, + glGetSeparableFilter, + glConvolutionParameteri, + glConvolutionParameteriv, + glConvolutionParameterf, + glConvolutionParameterfv, + glGetConvolutionParameteriv, + glGetConvolutionParameterfv, + glHistogram, + glResetHistogram, + glGetHistogram, + glGetHistogramParameteriv, + glGetHistogramParameterfv, + glMinmax, + glResetMinmax, + glGetMinmax, + glGetMinmaxParameteriv, + glGetMinmaxParameterfv; // ARB_indirect_parameters public final long - glMultiDrawArraysIndirectCountARB, - glMultiDrawElementsIndirectCountARB; + glMultiDrawArraysIndirectCountARB, + glMultiDrawElementsIndirectCountARB; // ARB_instanced_arrays public final long - glVertexAttribDivisorARB, - glVertexArrayVertexAttribDivisorEXT; + glVertexAttribDivisorARB, + glVertexArrayVertexAttribDivisorEXT; // ARB_matrix_palette public final long - glCurrentPaletteMatrixARB, - glMatrixIndexuivARB, - glMatrixIndexubvARB, - glMatrixIndexusvARB, - glMatrixIndexPointerARB; + glCurrentPaletteMatrixARB, + glMatrixIndexuivARB, + glMatrixIndexubvARB, + glMatrixIndexusvARB, + glMatrixIndexPointerARB; // ARB_multisample public final long - glSampleCoverageARB; + glSampleCoverageARB; // ARB_multitexture public final long - glActiveTextureARB, - glClientActiveTextureARB, - glMultiTexCoord1fARB, - glMultiTexCoord1sARB, - glMultiTexCoord1iARB, - glMultiTexCoord1dARB, - glMultiTexCoord1fvARB, - glMultiTexCoord1svARB, - glMultiTexCoord1ivARB, - glMultiTexCoord1dvARB, - glMultiTexCoord2fARB, - glMultiTexCoord2sARB, - glMultiTexCoord2iARB, - glMultiTexCoord2dARB, - glMultiTexCoord2fvARB, - glMultiTexCoord2svARB, - glMultiTexCoord2ivARB, - glMultiTexCoord2dvARB, - glMultiTexCoord3fARB, - glMultiTexCoord3sARB, - glMultiTexCoord3iARB, - glMultiTexCoord3dARB, - glMultiTexCoord3fvARB, - glMultiTexCoord3svARB, - glMultiTexCoord3ivARB, - glMultiTexCoord3dvARB, - glMultiTexCoord4fARB, - glMultiTexCoord4sARB, - glMultiTexCoord4iARB, - glMultiTexCoord4dARB, - glMultiTexCoord4fvARB, - glMultiTexCoord4svARB, - glMultiTexCoord4ivARB, - glMultiTexCoord4dvARB; + glActiveTextureARB, + glClientActiveTextureARB, + glMultiTexCoord1fARB, + glMultiTexCoord1sARB, + glMultiTexCoord1iARB, + glMultiTexCoord1dARB, + glMultiTexCoord1fvARB, + glMultiTexCoord1svARB, + glMultiTexCoord1ivARB, + glMultiTexCoord1dvARB, + glMultiTexCoord2fARB, + glMultiTexCoord2sARB, + glMultiTexCoord2iARB, + glMultiTexCoord2dARB, + glMultiTexCoord2fvARB, + glMultiTexCoord2svARB, + glMultiTexCoord2ivARB, + glMultiTexCoord2dvARB, + glMultiTexCoord3fARB, + glMultiTexCoord3sARB, + glMultiTexCoord3iARB, + glMultiTexCoord3dARB, + glMultiTexCoord3fvARB, + glMultiTexCoord3svARB, + glMultiTexCoord3ivARB, + glMultiTexCoord3dvARB, + glMultiTexCoord4fARB, + glMultiTexCoord4sARB, + glMultiTexCoord4iARB, + glMultiTexCoord4dARB, + glMultiTexCoord4fvARB, + glMultiTexCoord4svARB, + glMultiTexCoord4ivARB, + glMultiTexCoord4dvARB; // ARB_occlusion_query public final long - glGenQueriesARB, - glDeleteQueriesARB, - glIsQueryARB, - glBeginQueryARB, - glEndQueryARB, - glGetQueryivARB, - glGetQueryObjectivARB, - glGetQueryObjectuivARB; + glGenQueriesARB, + glDeleteQueriesARB, + glIsQueryARB, + glBeginQueryARB, + glEndQueryARB, + glGetQueryivARB, + glGetQueryObjectivARB, + glGetQueryObjectuivARB; // ARB_parallel_shader_compile public final long - glMaxShaderCompilerThreadsARB; + glMaxShaderCompilerThreadsARB; // ARB_point_parameters public final long - glPointParameterfARB, - glPointParameterfvARB; + glPointParameterfARB, + glPointParameterfvARB; // ARB_robustness public final long - glGetGraphicsResetStatusARB, - glGetnMapdvARB, - glGetnMapfvARB, - glGetnMapivARB, - glGetnPixelMapfvARB, - glGetnPixelMapuivARB, - glGetnPixelMapusvARB, - glGetnPolygonStippleARB, - glGetnTexImageARB, - glReadnPixelsARB, - glGetnColorTableARB, - glGetnConvolutionFilterARB, - glGetnSeparableFilterARB, - glGetnHistogramARB, - glGetnMinmaxARB, - glGetnCompressedTexImageARB, - glGetnUniformfvARB, - glGetnUniformivARB, - glGetnUniformuivARB, - glGetnUniformdvARB; + glGetGraphicsResetStatusARB, + glGetnMapdvARB, + glGetnMapfvARB, + glGetnMapivARB, + glGetnPixelMapfvARB, + glGetnPixelMapuivARB, + glGetnPixelMapusvARB, + glGetnPolygonStippleARB, + glGetnTexImageARB, + glReadnPixelsARB, + glGetnColorTableARB, + glGetnConvolutionFilterARB, + glGetnSeparableFilterARB, + glGetnHistogramARB, + glGetnMinmaxARB, + glGetnCompressedTexImageARB, + glGetnUniformfvARB, + glGetnUniformivARB, + glGetnUniformuivARB, + glGetnUniformdvARB; // ARB_sample_locations public final long - glFramebufferSampleLocationsfvARB, - glNamedFramebufferSampleLocationsfvARB, - glEvaluateDepthValuesARB; + glFramebufferSampleLocationsfvARB, + glNamedFramebufferSampleLocationsfvARB, + glEvaluateDepthValuesARB; // ARB_sample_shading public final long - glMinSampleShadingARB; + glMinSampleShadingARB; // ARB_shader_objects public final long - glDeleteObjectARB, - glGetHandleARB, - glDetachObjectARB, - glCreateShaderObjectARB, - glShaderSourceARB, - glCompileShaderARB, - glCreateProgramObjectARB, - glAttachObjectARB, - glLinkProgramARB, - glUseProgramObjectARB, - glValidateProgramARB, - glUniform1fARB, - glUniform2fARB, - glUniform3fARB, - glUniform4fARB, - glUniform1iARB, - glUniform2iARB, - glUniform3iARB, - glUniform4iARB, - glUniform1fvARB, - glUniform2fvARB, - glUniform3fvARB, - glUniform4fvARB, - glUniform1ivARB, - glUniform2ivARB, - glUniform3ivARB, - glUniform4ivARB, - glUniformMatrix2fvARB, - glUniformMatrix3fvARB, - glUniformMatrix4fvARB, - glGetObjectParameterfvARB, - glGetObjectParameterivARB, - glGetInfoLogARB, - glGetAttachedObjectsARB, - glGetUniformLocationARB, - glGetActiveUniformARB, - glGetUniformfvARB, - glGetUniformivARB, - glGetShaderSourceARB; + glDeleteObjectARB, + glGetHandleARB, + glDetachObjectARB, + glCreateShaderObjectARB, + glShaderSourceARB, + glCompileShaderARB, + glCreateProgramObjectARB, + glAttachObjectARB, + glLinkProgramARB, + glUseProgramObjectARB, + glValidateProgramARB, + glUniform1fARB, + glUniform2fARB, + glUniform3fARB, + glUniform4fARB, + glUniform1iARB, + glUniform2iARB, + glUniform3iARB, + glUniform4iARB, + glUniform1fvARB, + glUniform2fvARB, + glUniform3fvARB, + glUniform4fvARB, + glUniform1ivARB, + glUniform2ivARB, + glUniform3ivARB, + glUniform4ivARB, + glUniformMatrix2fvARB, + glUniformMatrix3fvARB, + glUniformMatrix4fvARB, + glGetObjectParameterfvARB, + glGetObjectParameterivARB, + glGetInfoLogARB, + glGetAttachedObjectsARB, + glGetUniformLocationARB, + glGetActiveUniformARB, + glGetUniformfvARB, + glGetUniformivARB, + glGetShaderSourceARB; // ARB_shading_language_include public final long - glNamedStringARB, - glDeleteNamedStringARB, - glCompileShaderIncludeARB, - glIsNamedStringARB, - glGetNamedStringARB, - glGetNamedStringivARB; + glNamedStringARB, + glDeleteNamedStringARB, + glCompileShaderIncludeARB, + glIsNamedStringARB, + glGetNamedStringARB, + glGetNamedStringivARB; // ARB_sparse_buffer public final long - glBufferPageCommitmentARB, - glNamedBufferPageCommitmentEXT, - glNamedBufferPageCommitmentARB; + glBufferPageCommitmentARB, + glNamedBufferPageCommitmentEXT, + glNamedBufferPageCommitmentARB; // ARB_sparse_texture public final long - glTexPageCommitmentARB, - glTexturePageCommitmentEXT; + glTexPageCommitmentARB, + glTexturePageCommitmentEXT; // ARB_texture_buffer_object public final long - glTexBufferARB; + glTexBufferARB; // ARB_texture_buffer_range public final long - glTextureBufferRangeEXT; + glTextureBufferRangeEXT; // ARB_texture_compression public final long - glCompressedTexImage3DARB, - glCompressedTexImage2DARB, - glCompressedTexImage1DARB, - glCompressedTexSubImage3DARB, - glCompressedTexSubImage2DARB, - glCompressedTexSubImage1DARB, - glGetCompressedTexImageARB; + glCompressedTexImage3DARB, + glCompressedTexImage2DARB, + glCompressedTexImage1DARB, + glCompressedTexSubImage3DARB, + glCompressedTexSubImage2DARB, + glCompressedTexSubImage1DARB, + glGetCompressedTexImageARB; // ARB_texture_storage public final long - glTextureStorage1DEXT, - glTextureStorage2DEXT, - glTextureStorage3DEXT; + glTextureStorage1DEXT, + glTextureStorage2DEXT, + glTextureStorage3DEXT; // ARB_texture_storage_multisample public final long - glTextureStorage2DMultisampleEXT, - glTextureStorage3DMultisampleEXT; + glTextureStorage2DMultisampleEXT, + glTextureStorage3DMultisampleEXT; // ARB_transpose_matrix public final long - glLoadTransposeMatrixfARB, - glLoadTransposeMatrixdARB, - glMultTransposeMatrixfARB, - glMultTransposeMatrixdARB; + glLoadTransposeMatrixfARB, + glLoadTransposeMatrixdARB, + glMultTransposeMatrixfARB, + glMultTransposeMatrixdARB; // ARB_vertex_attrib_64bit public final long - glVertexArrayVertexAttribLOffsetEXT; + glVertexArrayVertexAttribLOffsetEXT; // ARB_vertex_attrib_binding public final long - glVertexArrayBindVertexBufferEXT, - glVertexArrayVertexAttribFormatEXT, - glVertexArrayVertexAttribIFormatEXT, - glVertexArrayVertexAttribLFormatEXT, - glVertexArrayVertexAttribBindingEXT, - glVertexArrayVertexBindingDivisorEXT; + glVertexArrayBindVertexBufferEXT, + glVertexArrayVertexAttribFormatEXT, + glVertexArrayVertexAttribIFormatEXT, + glVertexArrayVertexAttribLFormatEXT, + glVertexArrayVertexAttribBindingEXT, + glVertexArrayVertexBindingDivisorEXT; // ARB_vertex_blend public final long - glWeightfvARB, - glWeightbvARB, - glWeightubvARB, - glWeightsvARB, - glWeightusvARB, - glWeightivARB, - glWeightuivARB, - glWeightdvARB, - glWeightPointerARB, - glVertexBlendARB; + glWeightfvARB, + glWeightbvARB, + glWeightubvARB, + glWeightsvARB, + glWeightusvARB, + glWeightivARB, + glWeightuivARB, + glWeightdvARB, + glWeightPointerARB, + glVertexBlendARB; // ARB_vertex_buffer_object public final long - glBindBufferARB, - glDeleteBuffersARB, - glGenBuffersARB, - glIsBufferARB, - glBufferDataARB, - glBufferSubDataARB, - glGetBufferSubDataARB, - glMapBufferARB, - glUnmapBufferARB, - glGetBufferParameterivARB, - glGetBufferPointervARB; + glBindBufferARB, + glDeleteBuffersARB, + glGenBuffersARB, + glIsBufferARB, + glBufferDataARB, + glBufferSubDataARB, + glGetBufferSubDataARB, + glMapBufferARB, + glUnmapBufferARB, + glGetBufferParameterivARB, + glGetBufferPointervARB; // ARB_vertex_program public final long - glVertexAttrib1sARB, - glVertexAttrib1fARB, - glVertexAttrib1dARB, - glVertexAttrib2sARB, - glVertexAttrib2fARB, - glVertexAttrib2dARB, - glVertexAttrib3sARB, - glVertexAttrib3fARB, - glVertexAttrib3dARB, - glVertexAttrib4sARB, - glVertexAttrib4fARB, - glVertexAttrib4dARB, - glVertexAttrib4NubARB, - glVertexAttrib1svARB, - glVertexAttrib1fvARB, - glVertexAttrib1dvARB, - glVertexAttrib2svARB, - glVertexAttrib2fvARB, - glVertexAttrib2dvARB, - glVertexAttrib3svARB, - glVertexAttrib3fvARB, - glVertexAttrib3dvARB, - glVertexAttrib4fvARB, - glVertexAttrib4bvARB, - glVertexAttrib4svARB, - glVertexAttrib4ivARB, - glVertexAttrib4ubvARB, - glVertexAttrib4usvARB, - glVertexAttrib4uivARB, - glVertexAttrib4dvARB, - glVertexAttrib4NbvARB, - glVertexAttrib4NsvARB, - glVertexAttrib4NivARB, - glVertexAttrib4NubvARB, - glVertexAttrib4NusvARB, - glVertexAttrib4NuivARB, - glVertexAttribPointerARB, - glEnableVertexAttribArrayARB, - glDisableVertexAttribArrayARB, - glProgramStringARB, - glBindProgramARB, - glDeleteProgramsARB, - glGenProgramsARB, - glProgramEnvParameter4dARB, - glProgramEnvParameter4dvARB, - glProgramEnvParameter4fARB, - glProgramEnvParameter4fvARB, - glProgramLocalParameter4dARB, - glProgramLocalParameter4dvARB, - glProgramLocalParameter4fARB, - glProgramLocalParameter4fvARB, - glGetProgramEnvParameterfvARB, - glGetProgramEnvParameterdvARB, - glGetProgramLocalParameterfvARB, - glGetProgramLocalParameterdvARB, - glGetProgramivARB, - glGetProgramStringARB, - glGetVertexAttribfvARB, - glGetVertexAttribdvARB, - glGetVertexAttribivARB, - glGetVertexAttribPointervARB, - glIsProgramARB; + glVertexAttrib1sARB, + glVertexAttrib1fARB, + glVertexAttrib1dARB, + glVertexAttrib2sARB, + glVertexAttrib2fARB, + glVertexAttrib2dARB, + glVertexAttrib3sARB, + glVertexAttrib3fARB, + glVertexAttrib3dARB, + glVertexAttrib4sARB, + glVertexAttrib4fARB, + glVertexAttrib4dARB, + glVertexAttrib4NubARB, + glVertexAttrib1svARB, + glVertexAttrib1fvARB, + glVertexAttrib1dvARB, + glVertexAttrib2svARB, + glVertexAttrib2fvARB, + glVertexAttrib2dvARB, + glVertexAttrib3svARB, + glVertexAttrib3fvARB, + glVertexAttrib3dvARB, + glVertexAttrib4fvARB, + glVertexAttrib4bvARB, + glVertexAttrib4svARB, + glVertexAttrib4ivARB, + glVertexAttrib4ubvARB, + glVertexAttrib4usvARB, + glVertexAttrib4uivARB, + glVertexAttrib4dvARB, + glVertexAttrib4NbvARB, + glVertexAttrib4NsvARB, + glVertexAttrib4NivARB, + glVertexAttrib4NubvARB, + glVertexAttrib4NusvARB, + glVertexAttrib4NuivARB, + glVertexAttribPointerARB, + glEnableVertexAttribArrayARB, + glDisableVertexAttribArrayARB, + glProgramStringARB, + glBindProgramARB, + glDeleteProgramsARB, + glGenProgramsARB, + glProgramEnvParameter4dARB, + glProgramEnvParameter4dvARB, + glProgramEnvParameter4fARB, + glProgramEnvParameter4fvARB, + glProgramLocalParameter4dARB, + glProgramLocalParameter4dvARB, + glProgramLocalParameter4fARB, + glProgramLocalParameter4fvARB, + glGetProgramEnvParameterfvARB, + glGetProgramEnvParameterdvARB, + glGetProgramLocalParameterfvARB, + glGetProgramLocalParameterdvARB, + glGetProgramivARB, + glGetProgramStringARB, + glGetVertexAttribfvARB, + glGetVertexAttribdvARB, + glGetVertexAttribivARB, + glGetVertexAttribPointervARB, + glIsProgramARB; // ARB_vertex_shader public final long - glBindAttribLocationARB, - glGetActiveAttribARB, - glGetAttribLocationARB; + glBindAttribLocationARB, + glGetActiveAttribARB, + glGetAttribLocationARB; // ARB_window_pos public final long - glWindowPos2iARB, - glWindowPos2sARB, - glWindowPos2fARB, - glWindowPos2dARB, - glWindowPos2ivARB, - glWindowPos2svARB, - glWindowPos2fvARB, - glWindowPos2dvARB, - glWindowPos3iARB, - glWindowPos3sARB, - glWindowPos3fARB, - glWindowPos3dARB, - glWindowPos3ivARB, - glWindowPos3svARB, - glWindowPos3fvARB, - glWindowPos3dvARB; + glWindowPos2iARB, + glWindowPos2sARB, + glWindowPos2fARB, + glWindowPos2dARB, + glWindowPos2ivARB, + glWindowPos2svARB, + glWindowPos2fvARB, + glWindowPos2dvARB, + glWindowPos3iARB, + glWindowPos3sARB, + glWindowPos3fARB, + glWindowPos3dARB, + glWindowPos3ivARB, + glWindowPos3svARB, + glWindowPos3fvARB, + glWindowPos3dvARB; // EXT_bindable_uniform public final long - glUniformBufferEXT, - glGetUniformBufferSizeEXT, - glGetUniformOffsetEXT; + glUniformBufferEXT, + glGetUniformBufferSizeEXT, + glGetUniformOffsetEXT; // EXT_blend_color public final long - glBlendColorEXT; + glBlendColorEXT; // EXT_blend_equation_separate public final long - glBlendEquationSeparateEXT; + glBlendEquationSeparateEXT; // EXT_blend_func_separate public final long - glBlendFuncSeparateEXT; + glBlendFuncSeparateEXT; // EXT_blend_minmax public final long - glBlendEquationEXT; + glBlendEquationEXT; // EXT_compiled_vertex_array public final long - glLockArraysEXT, - glUnlockArraysEXT; + glLockArraysEXT, + glUnlockArraysEXT; // EXT_debug_label public final long - glLabelObjectEXT, - glGetObjectLabelEXT; + glLabelObjectEXT, + glGetObjectLabelEXT; // EXT_debug_marker public final long - glInsertEventMarkerEXT, - glPushGroupMarkerEXT, - glPopGroupMarkerEXT; + glInsertEventMarkerEXT, + glPushGroupMarkerEXT, + glPopGroupMarkerEXT; // EXT_depth_bounds_test public final long - glDepthBoundsEXT; + glDepthBoundsEXT; // EXT_direct_state_access public final long - glClientAttribDefaultEXT, - glPushClientAttribDefaultEXT, - glMatrixLoadfEXT, - glMatrixLoaddEXT, - glMatrixMultfEXT, - glMatrixMultdEXT, - glMatrixLoadIdentityEXT, - glMatrixRotatefEXT, - glMatrixRotatedEXT, - glMatrixScalefEXT, - glMatrixScaledEXT, - glMatrixTranslatefEXT, - glMatrixTranslatedEXT, - glMatrixOrthoEXT, - glMatrixFrustumEXT, - glMatrixPushEXT, - glMatrixPopEXT, - glTextureParameteriEXT, - glTextureParameterivEXT, - glTextureParameterfEXT, - glTextureParameterfvEXT, - glTextureImage1DEXT, - glTextureImage2DEXT, - glTextureSubImage1DEXT, - glTextureSubImage2DEXT, - glCopyTextureImage1DEXT, - glCopyTextureImage2DEXT, - glCopyTextureSubImage1DEXT, - glCopyTextureSubImage2DEXT, - glGetTextureImageEXT, - glGetTextureParameterfvEXT, - glGetTextureParameterivEXT, - glGetTextureLevelParameterfvEXT, - glGetTextureLevelParameterivEXT, - glTextureImage3DEXT, - glTextureSubImage3DEXT, - glCopyTextureSubImage3DEXT, - glBindMultiTextureEXT, - glMultiTexCoordPointerEXT, - glMultiTexEnvfEXT, - glMultiTexEnvfvEXT, - glMultiTexEnviEXT, - glMultiTexEnvivEXT, - glMultiTexGendEXT, - glMultiTexGendvEXT, - glMultiTexGenfEXT, - glMultiTexGenfvEXT, - glMultiTexGeniEXT, - glMultiTexGenivEXT, - glGetMultiTexEnvfvEXT, - glGetMultiTexEnvivEXT, - glGetMultiTexGendvEXT, - glGetMultiTexGenfvEXT, - glGetMultiTexGenivEXT, - glMultiTexParameteriEXT, - glMultiTexParameterivEXT, - glMultiTexParameterfEXT, - glMultiTexParameterfvEXT, - glMultiTexImage1DEXT, - glMultiTexImage2DEXT, - glMultiTexSubImage1DEXT, - glMultiTexSubImage2DEXT, - glCopyMultiTexImage1DEXT, - glCopyMultiTexImage2DEXT, - glCopyMultiTexSubImage1DEXT, - glCopyMultiTexSubImage2DEXT, - glGetMultiTexImageEXT, - glGetMultiTexParameterfvEXT, - glGetMultiTexParameterivEXT, - glGetMultiTexLevelParameterfvEXT, - glGetMultiTexLevelParameterivEXT, - glMultiTexImage3DEXT, - glMultiTexSubImage3DEXT, - glCopyMultiTexSubImage3DEXT, - glEnableClientStateIndexedEXT, - glDisableClientStateIndexedEXT, - glEnableClientStateiEXT, - glDisableClientStateiEXT, - glGetFloatIndexedvEXT, - glGetDoubleIndexedvEXT, - glGetPointerIndexedvEXT, - glGetFloati_vEXT, - glGetDoublei_vEXT, - glGetPointeri_vEXT, - glEnableIndexedEXT, - glDisableIndexedEXT, - glIsEnabledIndexedEXT, - glGetIntegerIndexedvEXT, - glGetBooleanIndexedvEXT, - glNamedProgramStringEXT, - glNamedProgramLocalParameter4dEXT, - glNamedProgramLocalParameter4dvEXT, - glNamedProgramLocalParameter4fEXT, - glNamedProgramLocalParameter4fvEXT, - glGetNamedProgramLocalParameterdvEXT, - glGetNamedProgramLocalParameterfvEXT, - glGetNamedProgramivEXT, - glGetNamedProgramStringEXT, - glCompressedTextureImage3DEXT, - glCompressedTextureImage2DEXT, - glCompressedTextureImage1DEXT, - glCompressedTextureSubImage3DEXT, - glCompressedTextureSubImage2DEXT, - glCompressedTextureSubImage1DEXT, - glGetCompressedTextureImageEXT, - glCompressedMultiTexImage3DEXT, - glCompressedMultiTexImage2DEXT, - glCompressedMultiTexImage1DEXT, - glCompressedMultiTexSubImage3DEXT, - glCompressedMultiTexSubImage2DEXT, - glCompressedMultiTexSubImage1DEXT, - glGetCompressedMultiTexImageEXT, - glMatrixLoadTransposefEXT, - glMatrixLoadTransposedEXT, - glMatrixMultTransposefEXT, - glMatrixMultTransposedEXT, - glNamedBufferDataEXT, - glNamedBufferSubDataEXT, - glMapNamedBufferEXT, - glUnmapNamedBufferEXT, - glGetNamedBufferParameterivEXT, - glGetNamedBufferSubDataEXT, - glProgramUniform1fEXT, - glProgramUniform2fEXT, - glProgramUniform3fEXT, - glProgramUniform4fEXT, - glProgramUniform1iEXT, - glProgramUniform2iEXT, - glProgramUniform3iEXT, - glProgramUniform4iEXT, - glProgramUniform1fvEXT, - glProgramUniform2fvEXT, - glProgramUniform3fvEXT, - glProgramUniform4fvEXT, - glProgramUniform1ivEXT, - glProgramUniform2ivEXT, - glProgramUniform3ivEXT, - glProgramUniform4ivEXT, - glProgramUniformMatrix2fvEXT, - glProgramUniformMatrix3fvEXT, - glProgramUniformMatrix4fvEXT, - glProgramUniformMatrix2x3fvEXT, - glProgramUniformMatrix3x2fvEXT, - glProgramUniformMatrix2x4fvEXT, - glProgramUniformMatrix4x2fvEXT, - glProgramUniformMatrix3x4fvEXT, - glProgramUniformMatrix4x3fvEXT, - glTextureBufferEXT, - glMultiTexBufferEXT, - glTextureParameterIivEXT, - glTextureParameterIuivEXT, - glGetTextureParameterIivEXT, - glGetTextureParameterIuivEXT, - glMultiTexParameterIivEXT, - glMultiTexParameterIuivEXT, - glGetMultiTexParameterIivEXT, - glGetMultiTexParameterIuivEXT, - glProgramUniform1uiEXT, - glProgramUniform2uiEXT, - glProgramUniform3uiEXT, - glProgramUniform4uiEXT, - glProgramUniform1uivEXT, - glProgramUniform2uivEXT, - glProgramUniform3uivEXT, - glProgramUniform4uivEXT, - glNamedProgramLocalParameters4fvEXT, - glNamedProgramLocalParameterI4iEXT, - glNamedProgramLocalParameterI4ivEXT, - glNamedProgramLocalParametersI4ivEXT, - glNamedProgramLocalParameterI4uiEXT, - glNamedProgramLocalParameterI4uivEXT, - glNamedProgramLocalParametersI4uivEXT, - glGetNamedProgramLocalParameterIivEXT, - glGetNamedProgramLocalParameterIuivEXT, - glNamedRenderbufferStorageEXT, - glGetNamedRenderbufferParameterivEXT, - glNamedRenderbufferStorageMultisampleEXT, - glNamedRenderbufferStorageMultisampleCoverageEXT, - glCheckNamedFramebufferStatusEXT, - glNamedFramebufferTexture1DEXT, - glNamedFramebufferTexture2DEXT, - glNamedFramebufferTexture3DEXT, - glNamedFramebufferRenderbufferEXT, - glGetNamedFramebufferAttachmentParameterivEXT, - glGenerateTextureMipmapEXT, - glGenerateMultiTexMipmapEXT, - glFramebufferDrawBufferEXT, - glFramebufferDrawBuffersEXT, - glFramebufferReadBufferEXT, - glGetFramebufferParameterivEXT, - glNamedCopyBufferSubDataEXT, - glNamedFramebufferTextureEXT, - glNamedFramebufferTextureLayerEXT, - glNamedFramebufferTextureFaceEXT, - glTextureRenderbufferEXT, - glMultiTexRenderbufferEXT, - glVertexArrayVertexOffsetEXT, - glVertexArrayColorOffsetEXT, - glVertexArrayEdgeFlagOffsetEXT, - glVertexArrayIndexOffsetEXT, - glVertexArrayNormalOffsetEXT, - glVertexArrayTexCoordOffsetEXT, - glVertexArrayMultiTexCoordOffsetEXT, - glVertexArrayFogCoordOffsetEXT, - glVertexArraySecondaryColorOffsetEXT, - glVertexArrayVertexAttribOffsetEXT, - glVertexArrayVertexAttribIOffsetEXT, - glEnableVertexArrayEXT, - glDisableVertexArrayEXT, - glEnableVertexArrayAttribEXT, - glDisableVertexArrayAttribEXT, - glGetVertexArrayIntegervEXT, - glGetVertexArrayPointervEXT, - glGetVertexArrayIntegeri_vEXT, - glGetVertexArrayPointeri_vEXT, - glMapNamedBufferRangeEXT, - glFlushMappedNamedBufferRangeEXT; + glClientAttribDefaultEXT, + glPushClientAttribDefaultEXT, + glMatrixLoadfEXT, + glMatrixLoaddEXT, + glMatrixMultfEXT, + glMatrixMultdEXT, + glMatrixLoadIdentityEXT, + glMatrixRotatefEXT, + glMatrixRotatedEXT, + glMatrixScalefEXT, + glMatrixScaledEXT, + glMatrixTranslatefEXT, + glMatrixTranslatedEXT, + glMatrixOrthoEXT, + glMatrixFrustumEXT, + glMatrixPushEXT, + glMatrixPopEXT, + glTextureParameteriEXT, + glTextureParameterivEXT, + glTextureParameterfEXT, + glTextureParameterfvEXT, + glTextureImage1DEXT, + glTextureImage2DEXT, + glTextureSubImage1DEXT, + glTextureSubImage2DEXT, + glCopyTextureImage1DEXT, + glCopyTextureImage2DEXT, + glCopyTextureSubImage1DEXT, + glCopyTextureSubImage2DEXT, + glGetTextureImageEXT, + glGetTextureParameterfvEXT, + glGetTextureParameterivEXT, + glGetTextureLevelParameterfvEXT, + glGetTextureLevelParameterivEXT, + glTextureImage3DEXT, + glTextureSubImage3DEXT, + glCopyTextureSubImage3DEXT, + glBindMultiTextureEXT, + glMultiTexCoordPointerEXT, + glMultiTexEnvfEXT, + glMultiTexEnvfvEXT, + glMultiTexEnviEXT, + glMultiTexEnvivEXT, + glMultiTexGendEXT, + glMultiTexGendvEXT, + glMultiTexGenfEXT, + glMultiTexGenfvEXT, + glMultiTexGeniEXT, + glMultiTexGenivEXT, + glGetMultiTexEnvfvEXT, + glGetMultiTexEnvivEXT, + glGetMultiTexGendvEXT, + glGetMultiTexGenfvEXT, + glGetMultiTexGenivEXT, + glMultiTexParameteriEXT, + glMultiTexParameterivEXT, + glMultiTexParameterfEXT, + glMultiTexParameterfvEXT, + glMultiTexImage1DEXT, + glMultiTexImage2DEXT, + glMultiTexSubImage1DEXT, + glMultiTexSubImage2DEXT, + glCopyMultiTexImage1DEXT, + glCopyMultiTexImage2DEXT, + glCopyMultiTexSubImage1DEXT, + glCopyMultiTexSubImage2DEXT, + glGetMultiTexImageEXT, + glGetMultiTexParameterfvEXT, + glGetMultiTexParameterivEXT, + glGetMultiTexLevelParameterfvEXT, + glGetMultiTexLevelParameterivEXT, + glMultiTexImage3DEXT, + glMultiTexSubImage3DEXT, + glCopyMultiTexSubImage3DEXT, + glEnableClientStateIndexedEXT, + glDisableClientStateIndexedEXT, + glEnableClientStateiEXT, + glDisableClientStateiEXT, + glGetFloatIndexedvEXT, + glGetDoubleIndexedvEXT, + glGetPointerIndexedvEXT, + glGetFloati_vEXT, + glGetDoublei_vEXT, + glGetPointeri_vEXT, + glEnableIndexedEXT, + glDisableIndexedEXT, + glIsEnabledIndexedEXT, + glGetIntegerIndexedvEXT, + glGetBooleanIndexedvEXT, + glNamedProgramStringEXT, + glNamedProgramLocalParameter4dEXT, + glNamedProgramLocalParameter4dvEXT, + glNamedProgramLocalParameter4fEXT, + glNamedProgramLocalParameter4fvEXT, + glGetNamedProgramLocalParameterdvEXT, + glGetNamedProgramLocalParameterfvEXT, + glGetNamedProgramivEXT, + glGetNamedProgramStringEXT, + glCompressedTextureImage3DEXT, + glCompressedTextureImage2DEXT, + glCompressedTextureImage1DEXT, + glCompressedTextureSubImage3DEXT, + glCompressedTextureSubImage2DEXT, + glCompressedTextureSubImage1DEXT, + glGetCompressedTextureImageEXT, + glCompressedMultiTexImage3DEXT, + glCompressedMultiTexImage2DEXT, + glCompressedMultiTexImage1DEXT, + glCompressedMultiTexSubImage3DEXT, + glCompressedMultiTexSubImage2DEXT, + glCompressedMultiTexSubImage1DEXT, + glGetCompressedMultiTexImageEXT, + glMatrixLoadTransposefEXT, + glMatrixLoadTransposedEXT, + glMatrixMultTransposefEXT, + glMatrixMultTransposedEXT, + glNamedBufferDataEXT, + glNamedBufferSubDataEXT, + glMapNamedBufferEXT, + glUnmapNamedBufferEXT, + glGetNamedBufferParameterivEXT, + glGetNamedBufferSubDataEXT, + glProgramUniform1fEXT, + glProgramUniform2fEXT, + glProgramUniform3fEXT, + glProgramUniform4fEXT, + glProgramUniform1iEXT, + glProgramUniform2iEXT, + glProgramUniform3iEXT, + glProgramUniform4iEXT, + glProgramUniform1fvEXT, + glProgramUniform2fvEXT, + glProgramUniform3fvEXT, + glProgramUniform4fvEXT, + glProgramUniform1ivEXT, + glProgramUniform2ivEXT, + glProgramUniform3ivEXT, + glProgramUniform4ivEXT, + glProgramUniformMatrix2fvEXT, + glProgramUniformMatrix3fvEXT, + glProgramUniformMatrix4fvEXT, + glProgramUniformMatrix2x3fvEXT, + glProgramUniformMatrix3x2fvEXT, + glProgramUniformMatrix2x4fvEXT, + glProgramUniformMatrix4x2fvEXT, + glProgramUniformMatrix3x4fvEXT, + glProgramUniformMatrix4x3fvEXT, + glTextureBufferEXT, + glMultiTexBufferEXT, + glTextureParameterIivEXT, + glTextureParameterIuivEXT, + glGetTextureParameterIivEXT, + glGetTextureParameterIuivEXT, + glMultiTexParameterIivEXT, + glMultiTexParameterIuivEXT, + glGetMultiTexParameterIivEXT, + glGetMultiTexParameterIuivEXT, + glProgramUniform1uiEXT, + glProgramUniform2uiEXT, + glProgramUniform3uiEXT, + glProgramUniform4uiEXT, + glProgramUniform1uivEXT, + glProgramUniform2uivEXT, + glProgramUniform3uivEXT, + glProgramUniform4uivEXT, + glNamedProgramLocalParameters4fvEXT, + glNamedProgramLocalParameterI4iEXT, + glNamedProgramLocalParameterI4ivEXT, + glNamedProgramLocalParametersI4ivEXT, + glNamedProgramLocalParameterI4uiEXT, + glNamedProgramLocalParameterI4uivEXT, + glNamedProgramLocalParametersI4uivEXT, + glGetNamedProgramLocalParameterIivEXT, + glGetNamedProgramLocalParameterIuivEXT, + glNamedRenderbufferStorageEXT, + glGetNamedRenderbufferParameterivEXT, + glNamedRenderbufferStorageMultisampleEXT, + glNamedRenderbufferStorageMultisampleCoverageEXT, + glCheckNamedFramebufferStatusEXT, + glNamedFramebufferTexture1DEXT, + glNamedFramebufferTexture2DEXT, + glNamedFramebufferTexture3DEXT, + glNamedFramebufferRenderbufferEXT, + glGetNamedFramebufferAttachmentParameterivEXT, + glGenerateTextureMipmapEXT, + glGenerateMultiTexMipmapEXT, + glFramebufferDrawBufferEXT, + glFramebufferDrawBuffersEXT, + glFramebufferReadBufferEXT, + glGetFramebufferParameterivEXT, + glNamedCopyBufferSubDataEXT, + glNamedFramebufferTextureEXT, + glNamedFramebufferTextureLayerEXT, + glNamedFramebufferTextureFaceEXT, + glTextureRenderbufferEXT, + glMultiTexRenderbufferEXT, + glVertexArrayVertexOffsetEXT, + glVertexArrayColorOffsetEXT, + glVertexArrayEdgeFlagOffsetEXT, + glVertexArrayIndexOffsetEXT, + glVertexArrayNormalOffsetEXT, + glVertexArrayTexCoordOffsetEXT, + glVertexArrayMultiTexCoordOffsetEXT, + glVertexArrayFogCoordOffsetEXT, + glVertexArraySecondaryColorOffsetEXT, + glVertexArrayVertexAttribOffsetEXT, + glVertexArrayVertexAttribIOffsetEXT, + glEnableVertexArrayEXT, + glDisableVertexArrayEXT, + glEnableVertexArrayAttribEXT, + glDisableVertexArrayAttribEXT, + glGetVertexArrayIntegervEXT, + glGetVertexArrayPointervEXT, + glGetVertexArrayIntegeri_vEXT, + glGetVertexArrayPointeri_vEXT, + glMapNamedBufferRangeEXT, + glFlushMappedNamedBufferRangeEXT; // EXT_draw_buffers2 public final long - glColorMaskIndexedEXT; + glColorMaskIndexedEXT; // EXT_draw_instanced public final long - glDrawArraysInstancedEXT, - glDrawElementsInstancedEXT; + glDrawArraysInstancedEXT, + glDrawElementsInstancedEXT; // EXT_EGL_image_storage public final long - glEGLImageTargetTexStorageEXT, - glEGLImageTargetTextureStorageEXT; + glEGLImageTargetTexStorageEXT, + glEGLImageTargetTextureStorageEXT; // EXT_external_buffer public final long - glBufferStorageExternalEXT, - glNamedBufferStorageExternalEXT; + glBufferStorageExternalEXT, + glNamedBufferStorageExternalEXT; // EXT_framebuffer_blit public final long - glBlitFramebufferEXT; - - // EXT_framebuffer_blit_layers - public final long - glBlitFramebufferLayersEXT, - glBlitFramebufferLayerEXT; + glBlitFramebufferEXT; // EXT_framebuffer_multisample public final long - glRenderbufferStorageMultisampleEXT; + glRenderbufferStorageMultisampleEXT; // EXT_framebuffer_object public final long - glIsRenderbufferEXT, - glBindRenderbufferEXT, - glDeleteRenderbuffersEXT, - glGenRenderbuffersEXT, - glRenderbufferStorageEXT, - glGetRenderbufferParameterivEXT, - glIsFramebufferEXT, - glBindFramebufferEXT, - glDeleteFramebuffersEXT, - glGenFramebuffersEXT, - glCheckFramebufferStatusEXT, - glFramebufferTexture1DEXT, - glFramebufferTexture2DEXT, - glFramebufferTexture3DEXT, - glFramebufferRenderbufferEXT, - glGetFramebufferAttachmentParameterivEXT, - glGenerateMipmapEXT; + glIsRenderbufferEXT, + glBindRenderbufferEXT, + glDeleteRenderbuffersEXT, + glGenRenderbuffersEXT, + glRenderbufferStorageEXT, + glGetRenderbufferParameterivEXT, + glIsFramebufferEXT, + glBindFramebufferEXT, + glDeleteFramebuffersEXT, + glGenFramebuffersEXT, + glCheckFramebufferStatusEXT, + glFramebufferTexture1DEXT, + glFramebufferTexture2DEXT, + glFramebufferTexture3DEXT, + glFramebufferRenderbufferEXT, + glGetFramebufferAttachmentParameterivEXT, + glGenerateMipmapEXT; // EXT_geometry_shader4 public final long - glProgramParameteriEXT, - glFramebufferTextureEXT, - glFramebufferTextureLayerEXT, - glFramebufferTextureFaceEXT; + glProgramParameteriEXT, + glFramebufferTextureEXT, + glFramebufferTextureLayerEXT, + glFramebufferTextureFaceEXT; // EXT_gpu_program_parameters public final long - glProgramEnvParameters4fvEXT, - glProgramLocalParameters4fvEXT; + glProgramEnvParameters4fvEXT, + glProgramLocalParameters4fvEXT; // EXT_gpu_shader4 public final long - glVertexAttribI1iEXT, - glVertexAttribI2iEXT, - glVertexAttribI3iEXT, - glVertexAttribI4iEXT, - glVertexAttribI1uiEXT, - glVertexAttribI2uiEXT, - glVertexAttribI3uiEXT, - glVertexAttribI4uiEXT, - glVertexAttribI1ivEXT, - glVertexAttribI2ivEXT, - glVertexAttribI3ivEXT, - glVertexAttribI4ivEXT, - glVertexAttribI1uivEXT, - glVertexAttribI2uivEXT, - glVertexAttribI3uivEXT, - glVertexAttribI4uivEXT, - glVertexAttribI4bvEXT, - glVertexAttribI4svEXT, - glVertexAttribI4ubvEXT, - glVertexAttribI4usvEXT, - glVertexAttribIPointerEXT, - glGetVertexAttribIivEXT, - glGetVertexAttribIuivEXT, - glGetUniformuivEXT, - glBindFragDataLocationEXT, - glGetFragDataLocationEXT, - glUniform1uiEXT, - glUniform2uiEXT, - glUniform3uiEXT, - glUniform4uiEXT, - glUniform1uivEXT, - glUniform2uivEXT, - glUniform3uivEXT, - glUniform4uivEXT; + glVertexAttribI1iEXT, + glVertexAttribI2iEXT, + glVertexAttribI3iEXT, + glVertexAttribI4iEXT, + glVertexAttribI1uiEXT, + glVertexAttribI2uiEXT, + glVertexAttribI3uiEXT, + glVertexAttribI4uiEXT, + glVertexAttribI1ivEXT, + glVertexAttribI2ivEXT, + glVertexAttribI3ivEXT, + glVertexAttribI4ivEXT, + glVertexAttribI1uivEXT, + glVertexAttribI2uivEXT, + glVertexAttribI3uivEXT, + glVertexAttribI4uivEXT, + glVertexAttribI4bvEXT, + glVertexAttribI4svEXT, + glVertexAttribI4ubvEXT, + glVertexAttribI4usvEXT, + glVertexAttribIPointerEXT, + glGetVertexAttribIivEXT, + glGetVertexAttribIuivEXT, + glGetUniformuivEXT, + glBindFragDataLocationEXT, + glGetFragDataLocationEXT, + glUniform1uiEXT, + glUniform2uiEXT, + glUniform3uiEXT, + glUniform4uiEXT, + glUniform1uivEXT, + glUniform2uivEXT, + glUniform3uivEXT, + glUniform4uivEXT; // EXT_memory_object public final long - glGetUnsignedBytevEXT, - glGetUnsignedBytei_vEXT, - glDeleteMemoryObjectsEXT, - glIsMemoryObjectEXT, - glCreateMemoryObjectsEXT, - glMemoryObjectParameterivEXT, - glGetMemoryObjectParameterivEXT, - glTexStorageMem2DEXT, - glTexStorageMem2DMultisampleEXT, - glTexStorageMem3DEXT, - glTexStorageMem3DMultisampleEXT, - glBufferStorageMemEXT, - glTextureStorageMem2DEXT, - glTextureStorageMem2DMultisampleEXT, - glTextureStorageMem3DEXT, - glTextureStorageMem3DMultisampleEXT, - glNamedBufferStorageMemEXT, - glTexStorageMem1DEXT, - glTextureStorageMem1DEXT; + glGetUnsignedBytevEXT, + glGetUnsignedBytei_vEXT, + glDeleteMemoryObjectsEXT, + glIsMemoryObjectEXT, + glCreateMemoryObjectsEXT, + glMemoryObjectParameterivEXT, + glGetMemoryObjectParameterivEXT, + glTexStorageMem2DEXT, + glTexStorageMem2DMultisampleEXT, + glTexStorageMem3DEXT, + glTexStorageMem3DMultisampleEXT, + glBufferStorageMemEXT, + glTextureStorageMem2DEXT, + glTextureStorageMem2DMultisampleEXT, + glTextureStorageMem3DEXT, + glTextureStorageMem3DMultisampleEXT, + glNamedBufferStorageMemEXT, + glTexStorageMem1DEXT, + glTextureStorageMem1DEXT; // EXT_memory_object_fd public final long - glImportMemoryFdEXT; + glImportMemoryFdEXT; // EXT_memory_object_win32 public final long - glImportMemoryWin32HandleEXT, - glImportMemoryWin32NameEXT; + glImportMemoryWin32HandleEXT, + glImportMemoryWin32NameEXT; // EXT_point_parameters public final long - glPointParameterfEXT, - glPointParameterfvEXT; + glPointParameterfEXT, + glPointParameterfvEXT; // EXT_polygon_offset_clamp public final long - glPolygonOffsetClampEXT; + glPolygonOffsetClampEXT; // EXT_provoking_vertex public final long - glProvokingVertexEXT; + glProvokingVertexEXT; // EXT_raster_multisample public final long - glRasterSamplesEXT; + glRasterSamplesEXT; // EXT_secondary_color public final long - glSecondaryColor3bEXT, - glSecondaryColor3sEXT, - glSecondaryColor3iEXT, - glSecondaryColor3fEXT, - glSecondaryColor3dEXT, - glSecondaryColor3ubEXT, - glSecondaryColor3usEXT, - glSecondaryColor3uiEXT, - glSecondaryColor3bvEXT, - glSecondaryColor3svEXT, - glSecondaryColor3ivEXT, - glSecondaryColor3fvEXT, - glSecondaryColor3dvEXT, - glSecondaryColor3ubvEXT, - glSecondaryColor3usvEXT, - glSecondaryColor3uivEXT, - glSecondaryColorPointerEXT; + glSecondaryColor3bEXT, + glSecondaryColor3sEXT, + glSecondaryColor3iEXT, + glSecondaryColor3fEXT, + glSecondaryColor3dEXT, + glSecondaryColor3ubEXT, + glSecondaryColor3usEXT, + glSecondaryColor3uiEXT, + glSecondaryColor3bvEXT, + glSecondaryColor3svEXT, + glSecondaryColor3ivEXT, + glSecondaryColor3fvEXT, + glSecondaryColor3dvEXT, + glSecondaryColor3ubvEXT, + glSecondaryColor3usvEXT, + glSecondaryColor3uivEXT, + glSecondaryColorPointerEXT; // EXT_semaphore public final long - glGenSemaphoresEXT, - glDeleteSemaphoresEXT, - glIsSemaphoreEXT, - glSemaphoreParameterui64vEXT, - glGetSemaphoreParameterui64vEXT, - glWaitSemaphoreEXT, - glSignalSemaphoreEXT; + glGenSemaphoresEXT, + glDeleteSemaphoresEXT, + glIsSemaphoreEXT, + glSemaphoreParameterui64vEXT, + glGetSemaphoreParameterui64vEXT, + glWaitSemaphoreEXT, + glSignalSemaphoreEXT; // EXT_semaphore_fd public final long - glImportSemaphoreFdEXT; + glImportSemaphoreFdEXT; // EXT_semaphore_win32 public final long - glImportSemaphoreWin32HandleEXT, - glImportSemaphoreWin32NameEXT; + glImportSemaphoreWin32HandleEXT, + glImportSemaphoreWin32NameEXT; // EXT_separate_shader_objects public final long - glUseShaderProgramEXT, - glActiveProgramEXT, - glCreateShaderProgramEXT; + glUseShaderProgramEXT, + glActiveProgramEXT, + glCreateShaderProgramEXT; // EXT_shader_framebuffer_fetch_non_coherent public final long - glFramebufferFetchBarrierEXT; + glFramebufferFetchBarrierEXT; // EXT_shader_image_load_store public final long - glBindImageTextureEXT, - glMemoryBarrierEXT; + glBindImageTextureEXT, + glMemoryBarrierEXT; // EXT_stencil_clear_tag public final long - glStencilClearTagEXT; + glStencilClearTagEXT; // EXT_stencil_two_side public final long - glActiveStencilFaceEXT; + glActiveStencilFaceEXT; // EXT_texture_buffer_object public final long - glTexBufferEXT; + glTexBufferEXT; // EXT_texture_integer public final long - glClearColorIiEXT, - glClearColorIuiEXT, - glTexParameterIivEXT, - glTexParameterIuivEXT, - glGetTexParameterIivEXT, - glGetTexParameterIuivEXT; + glClearColorIiEXT, + glClearColorIuiEXT, + glTexParameterIivEXT, + glTexParameterIuivEXT, + glGetTexParameterIivEXT, + glGetTexParameterIuivEXT; // EXT_texture_storage public final long - glTexStorage1DEXT, - glTexStorage2DEXT, - glTexStorage3DEXT; + glTexStorage1DEXT, + glTexStorage2DEXT, + glTexStorage3DEXT; // EXT_timer_query public final long - glGetQueryObjecti64vEXT, - glGetQueryObjectui64vEXT; + glGetQueryObjecti64vEXT, + glGetQueryObjectui64vEXT; // EXT_transform_feedback public final long - glBindBufferRangeEXT, - glBindBufferOffsetEXT, - glBindBufferBaseEXT, - glBeginTransformFeedbackEXT, - glEndTransformFeedbackEXT, - glTransformFeedbackVaryingsEXT, - glGetTransformFeedbackVaryingEXT; + glBindBufferRangeEXT, + glBindBufferOffsetEXT, + glBindBufferBaseEXT, + glBeginTransformFeedbackEXT, + glEndTransformFeedbackEXT, + glTransformFeedbackVaryingsEXT, + glGetTransformFeedbackVaryingEXT; // EXT_vertex_attrib_64bit public final long - glVertexAttribL1dEXT, - glVertexAttribL2dEXT, - glVertexAttribL3dEXT, - glVertexAttribL4dEXT, - glVertexAttribL1dvEXT, - glVertexAttribL2dvEXT, - glVertexAttribL3dvEXT, - glVertexAttribL4dvEXT, - glVertexAttribLPointerEXT, - glGetVertexAttribLdvEXT; + glVertexAttribL1dEXT, + glVertexAttribL2dEXT, + glVertexAttribL3dEXT, + glVertexAttribL4dEXT, + glVertexAttribL1dvEXT, + glVertexAttribL2dvEXT, + glVertexAttribL3dvEXT, + glVertexAttribL4dvEXT, + glVertexAttribLPointerEXT, + glGetVertexAttribLdvEXT; // EXT_win32_keyed_mutex public final long - glAcquireKeyedMutexWin32EXT, - glReleaseKeyedMutexWin32EXT; + glAcquireKeyedMutexWin32EXT, + glReleaseKeyedMutexWin32EXT; // EXT_window_rectangles public final long - glWindowRectanglesEXT; + glWindowRectanglesEXT; // EXT_x11_sync_object public final long - glImportSyncEXT; + glImportSyncEXT; // GREMEDY_frame_terminator public final long - glFrameTerminatorGREMEDY; + glFrameTerminatorGREMEDY; // GREMEDY_string_marker public final long - glStringMarkerGREMEDY; + glStringMarkerGREMEDY; // INTEL_framebuffer_CMAA public final long - glApplyFramebufferAttachmentCMAAINTEL; + glApplyFramebufferAttachmentCMAAINTEL; // INTEL_map_texture public final long - glSyncTextureINTEL, - glUnmapTexture2DINTEL, - glMapTexture2DINTEL; + glSyncTextureINTEL, + glUnmapTexture2DINTEL, + glMapTexture2DINTEL; // INTEL_performance_query public final long - glBeginPerfQueryINTEL, - glCreatePerfQueryINTEL, - glDeletePerfQueryINTEL, - glEndPerfQueryINTEL, - glGetFirstPerfQueryIdINTEL, - glGetNextPerfQueryIdINTEL, - glGetPerfCounterInfoINTEL, - glGetPerfQueryDataINTEL, - glGetPerfQueryIdByNameINTEL, - glGetPerfQueryInfoINTEL; + glBeginPerfQueryINTEL, + glCreatePerfQueryINTEL, + glDeletePerfQueryINTEL, + glEndPerfQueryINTEL, + glGetFirstPerfQueryIdINTEL, + glGetNextPerfQueryIdINTEL, + glGetPerfCounterInfoINTEL, + glGetPerfQueryDataINTEL, + glGetPerfQueryIdByNameINTEL, + glGetPerfQueryInfoINTEL; // KHR_blend_equation_advanced public final long - glBlendBarrierKHR; + glBlendBarrierKHR; // KHR_parallel_shader_compile public final long - glMaxShaderCompilerThreadsKHR; + glMaxShaderCompilerThreadsKHR; // MESA_framebuffer_flip_y public final long - glFramebufferParameteriMESA, - glGetFramebufferParameterivMESA; + glFramebufferParameteriMESA, + glGetFramebufferParameterivMESA; // NV_alpha_to_coverage_dither_control public final long - glAlphaToCoverageDitherControlNV; + glAlphaToCoverageDitherControlNV; // NV_bindless_multi_draw_indirect public final long - glMultiDrawArraysIndirectBindlessNV, - glMultiDrawElementsIndirectBindlessNV; + glMultiDrawArraysIndirectBindlessNV, + glMultiDrawElementsIndirectBindlessNV; // NV_bindless_multi_draw_indirect_count public final long - glMultiDrawArraysIndirectBindlessCountNV, - glMultiDrawElementsIndirectBindlessCountNV; + glMultiDrawArraysIndirectBindlessCountNV, + glMultiDrawElementsIndirectBindlessCountNV; // NV_bindless_texture public final long - glGetTextureHandleNV, - glGetTextureSamplerHandleNV, - glMakeTextureHandleResidentNV, - glMakeTextureHandleNonResidentNV, - glGetImageHandleNV, - glMakeImageHandleResidentNV, - glMakeImageHandleNonResidentNV, - glUniformHandleui64NV, - glUniformHandleui64vNV, - glProgramUniformHandleui64NV, - glProgramUniformHandleui64vNV, - glIsTextureHandleResidentNV, - glIsImageHandleResidentNV; + glGetTextureHandleNV, + glGetTextureSamplerHandleNV, + glMakeTextureHandleResidentNV, + glMakeTextureHandleNonResidentNV, + glGetImageHandleNV, + glMakeImageHandleResidentNV, + glMakeImageHandleNonResidentNV, + glUniformHandleui64NV, + glUniformHandleui64vNV, + glProgramUniformHandleui64NV, + glProgramUniformHandleui64vNV, + glIsTextureHandleResidentNV, + glIsImageHandleResidentNV; // NV_blend_equation_advanced public final long - glBlendParameteriNV, - glBlendBarrierNV; + glBlendParameteriNV, + glBlendBarrierNV; // NV_clip_space_w_scaling public final long - glViewportPositionWScaleNV; + glViewportPositionWScaleNV; // NV_command_list public final long - glCreateStatesNV, - glDeleteStatesNV, - glIsStateNV, - glStateCaptureNV, - glGetCommandHeaderNV, - glGetStageIndexNV, - glDrawCommandsNV, - glDrawCommandsAddressNV, - glDrawCommandsStatesNV, - glDrawCommandsStatesAddressNV, - glCreateCommandListsNV, - glDeleteCommandListsNV, - glIsCommandListNV, - glListDrawCommandsStatesClientNV, - glCommandListSegmentsNV, - glCompileCommandListNV, - glCallCommandListNV; + glCreateStatesNV, + glDeleteStatesNV, + glIsStateNV, + glStateCaptureNV, + glGetCommandHeaderNV, + glGetStageIndexNV, + glDrawCommandsNV, + glDrawCommandsAddressNV, + glDrawCommandsStatesNV, + glDrawCommandsStatesAddressNV, + glCreateCommandListsNV, + glDeleteCommandListsNV, + glIsCommandListNV, + glListDrawCommandsStatesClientNV, + glCommandListSegmentsNV, + glCompileCommandListNV, + glCallCommandListNV; // NV_conditional_render public final long - glBeginConditionalRenderNV, - glEndConditionalRenderNV; + glBeginConditionalRenderNV, + glEndConditionalRenderNV; // NV_conservative_raster public final long - glSubpixelPrecisionBiasNV; + glSubpixelPrecisionBiasNV; // NV_conservative_raster_dilate public final long - glConservativeRasterParameterfNV; + glConservativeRasterParameterfNV; // NV_conservative_raster_pre_snap_triangles public final long - glConservativeRasterParameteriNV; + glConservativeRasterParameteriNV; // NV_copy_image public final long - glCopyImageSubDataNV; + glCopyImageSubDataNV; // NV_depth_buffer_float public final long - glDepthRangedNV, - glClearDepthdNV, - glDepthBoundsdNV; + glDepthRangedNV, + glClearDepthdNV, + glDepthBoundsdNV; // NV_draw_texture public final long - glDrawTextureNV; + glDrawTextureNV; // NV_draw_vulkan_image public final long - glDrawVkImageNV, - glGetVkProcAddrNV, - glWaitVkSemaphoreNV, - glSignalVkSemaphoreNV, - glSignalVkFenceNV; + glDrawVkImageNV, + glGetVkProcAddrNV, + glWaitVkSemaphoreNV, + glSignalVkSemaphoreNV, + glSignalVkFenceNV; // NV_explicit_multisample public final long - glGetMultisamplefvNV, - glSampleMaskIndexedNV, - glTexRenderbufferNV; + glGetMultisamplefvNV, + glSampleMaskIndexedNV, + glTexRenderbufferNV; // NV_fence public final long - glDeleteFencesNV, - glGenFencesNV, - glIsFenceNV, - glTestFenceNV, - glGetFenceivNV, - glFinishFenceNV, - glSetFenceNV; + glDeleteFencesNV, + glGenFencesNV, + glIsFenceNV, + glTestFenceNV, + glGetFenceivNV, + glFinishFenceNV, + glSetFenceNV; // NV_fragment_coverage_to_color public final long - glFragmentCoverageColorNV; + glFragmentCoverageColorNV; // NV_framebuffer_mixed_samples public final long - glCoverageModulationTableNV, - glGetCoverageModulationTableNV, - glCoverageModulationNV; + glCoverageModulationTableNV, + glGetCoverageModulationTableNV, + glCoverageModulationNV; // NV_framebuffer_multisample_coverage public final long - glRenderbufferStorageMultisampleCoverageNV; + glRenderbufferStorageMultisampleCoverageNV; // NV_gpu_multicast public final long - glRenderGpuMaskNV, - glMulticastBufferSubDataNV, - glMulticastCopyBufferSubDataNV, - glMulticastCopyImageSubDataNV, - glMulticastBlitFramebufferNV, - glMulticastFramebufferSampleLocationsfvNV, - glMulticastBarrierNV, - glMulticastWaitSyncNV, - glMulticastGetQueryObjectivNV, - glMulticastGetQueryObjectuivNV, - glMulticastGetQueryObjecti64vNV, - glMulticastGetQueryObjectui64vNV; + glRenderGpuMaskNV, + glMulticastBufferSubDataNV, + glMulticastCopyBufferSubDataNV, + glMulticastCopyImageSubDataNV, + glMulticastBlitFramebufferNV, + glMulticastFramebufferSampleLocationsfvNV, + glMulticastBarrierNV, + glMulticastWaitSyncNV, + glMulticastGetQueryObjectivNV, + glMulticastGetQueryObjectuivNV, + glMulticastGetQueryObjecti64vNV, + glMulticastGetQueryObjectui64vNV; // NV_half_float public final long - glVertex2hNV, - glVertex2hvNV, - glVertex3hNV, - glVertex3hvNV, - glVertex4hNV, - glVertex4hvNV, - glNormal3hNV, - glNormal3hvNV, - glColor3hNV, - glColor3hvNV, - glColor4hNV, - glColor4hvNV, - glTexCoord1hNV, - glTexCoord1hvNV, - glTexCoord2hNV, - glTexCoord2hvNV, - glTexCoord3hNV, - glTexCoord3hvNV, - glTexCoord4hNV, - glTexCoord4hvNV, - glMultiTexCoord1hNV, - glMultiTexCoord1hvNV, - glMultiTexCoord2hNV, - glMultiTexCoord2hvNV, - glMultiTexCoord3hNV, - glMultiTexCoord3hvNV, - glMultiTexCoord4hNV, - glMultiTexCoord4hvNV, - glFogCoordhNV, - glFogCoordhvNV, - glSecondaryColor3hNV, - glSecondaryColor3hvNV, - glVertexWeighthNV, - glVertexWeighthvNV, - glVertexAttrib1hNV, - glVertexAttrib1hvNV, - glVertexAttrib2hNV, - glVertexAttrib2hvNV, - glVertexAttrib3hNV, - glVertexAttrib3hvNV, - glVertexAttrib4hNV, - glVertexAttrib4hvNV, - glVertexAttribs1hvNV, - glVertexAttribs2hvNV, - glVertexAttribs3hvNV, - glVertexAttribs4hvNV; + glVertex2hNV, + glVertex2hvNV, + glVertex3hNV, + glVertex3hvNV, + glVertex4hNV, + glVertex4hvNV, + glNormal3hNV, + glNormal3hvNV, + glColor3hNV, + glColor3hvNV, + glColor4hNV, + glColor4hvNV, + glTexCoord1hNV, + glTexCoord1hvNV, + glTexCoord2hNV, + glTexCoord2hvNV, + glTexCoord3hNV, + glTexCoord3hvNV, + glTexCoord4hNV, + glTexCoord4hvNV, + glMultiTexCoord1hNV, + glMultiTexCoord1hvNV, + glMultiTexCoord2hNV, + glMultiTexCoord2hvNV, + glMultiTexCoord3hNV, + glMultiTexCoord3hvNV, + glMultiTexCoord4hNV, + glMultiTexCoord4hvNV, + glFogCoordhNV, + glFogCoordhvNV, + glSecondaryColor3hNV, + glSecondaryColor3hvNV, + glVertexWeighthNV, + glVertexWeighthvNV, + glVertexAttrib1hNV, + glVertexAttrib1hvNV, + glVertexAttrib2hNV, + glVertexAttrib2hvNV, + glVertexAttrib3hNV, + glVertexAttrib3hvNV, + glVertexAttrib4hNV, + glVertexAttrib4hvNV, + glVertexAttribs1hvNV, + glVertexAttribs2hvNV, + glVertexAttribs3hvNV, + glVertexAttribs4hvNV; // NV_internalformat_sample_query public final long - glGetInternalformatSampleivNV; + glGetInternalformatSampleivNV; // NV_memory_attachment public final long - glGetMemoryObjectDetachedResourcesuivNV, - glResetMemoryObjectParameterNV, - glTexAttachMemoryNV, - glBufferAttachMemoryNV, - glTextureAttachMemoryNV, - glNamedBufferAttachMemoryNV; + glGetMemoryObjectDetachedResourcesuivNV, + glResetMemoryObjectParameterNV, + glTexAttachMemoryNV, + glBufferAttachMemoryNV, + glTextureAttachMemoryNV, + glNamedBufferAttachMemoryNV; // NV_memory_object_sparse public final long - glBufferPageCommitmentMemNV, - glNamedBufferPageCommitmentMemNV, - glTexPageCommitmentMemNV, - glTexturePageCommitmentMemNV; + glBufferPageCommitmentMemNV, + glNamedBufferPageCommitmentMemNV, + glTexPageCommitmentMemNV, + glTexturePageCommitmentMemNV; // NV_mesh_shader public final long - glDrawMeshTasksNV, - glDrawMeshTasksIndirectNV, - glMultiDrawMeshTasksIndirectNV, - glMultiDrawMeshTasksIndirectCountNV; + glDrawMeshTasksNV, + glDrawMeshTasksIndirectNV, + glMultiDrawMeshTasksIndirectNV, + glMultiDrawMeshTasksIndirectCountNV; // NV_path_rendering public final long - glPathCommandsNV, - glPathCoordsNV, - glPathSubCommandsNV, - glPathSubCoordsNV, - glPathStringNV, - glPathGlyphsNV, - glPathGlyphRangeNV, - glPathGlyphIndexArrayNV, - glPathMemoryGlyphIndexArrayNV, - glCopyPathNV, - glWeightPathsNV, - glInterpolatePathsNV, - glTransformPathNV, - glPathParameterivNV, - glPathParameteriNV, - glPathParameterfvNV, - glPathParameterfNV, - glPathDashArrayNV, - glGenPathsNV, - glDeletePathsNV, - glIsPathNV, - glPathStencilFuncNV, - glPathStencilDepthOffsetNV, - glStencilFillPathNV, - glStencilStrokePathNV, - glStencilFillPathInstancedNV, - glStencilStrokePathInstancedNV, - glPathCoverDepthFuncNV, - glPathColorGenNV, - glPathTexGenNV, - glPathFogGenNV, - glCoverFillPathNV, - glCoverStrokePathNV, - glCoverFillPathInstancedNV, - glCoverStrokePathInstancedNV, - glStencilThenCoverFillPathNV, - glStencilThenCoverStrokePathNV, - glStencilThenCoverFillPathInstancedNV, - glStencilThenCoverStrokePathInstancedNV, - glPathGlyphIndexRangeNV, - glProgramPathFragmentInputGenNV, - glGetPathParameterivNV, - glGetPathParameterfvNV, - glGetPathCommandsNV, - glGetPathCoordsNV, - glGetPathDashArrayNV, - glGetPathMetricsNV, - glGetPathMetricRangeNV, - glGetPathSpacingNV, - glGetPathColorGenivNV, - glGetPathColorGenfvNV, - glGetPathTexGenivNV, - glGetPathTexGenfvNV, - glIsPointInFillPathNV, - glIsPointInStrokePathNV, - glGetPathLengthNV, - glPointAlongPathNV, - glMatrixLoad3x2fNV, - glMatrixLoad3x3fNV, - glMatrixLoadTranspose3x3fNV, - glMatrixMult3x2fNV, - glMatrixMult3x3fNV, - glMatrixMultTranspose3x3fNV, - glGetProgramResourcefvNV; + glPathCommandsNV, + glPathCoordsNV, + glPathSubCommandsNV, + glPathSubCoordsNV, + glPathStringNV, + glPathGlyphsNV, + glPathGlyphRangeNV, + glPathGlyphIndexArrayNV, + glPathMemoryGlyphIndexArrayNV, + glCopyPathNV, + glWeightPathsNV, + glInterpolatePathsNV, + glTransformPathNV, + glPathParameterivNV, + glPathParameteriNV, + glPathParameterfvNV, + glPathParameterfNV, + glPathDashArrayNV, + glGenPathsNV, + glDeletePathsNV, + glIsPathNV, + glPathStencilFuncNV, + glPathStencilDepthOffsetNV, + glStencilFillPathNV, + glStencilStrokePathNV, + glStencilFillPathInstancedNV, + glStencilStrokePathInstancedNV, + glPathCoverDepthFuncNV, + glPathColorGenNV, + glPathTexGenNV, + glPathFogGenNV, + glCoverFillPathNV, + glCoverStrokePathNV, + glCoverFillPathInstancedNV, + glCoverStrokePathInstancedNV, + glStencilThenCoverFillPathNV, + glStencilThenCoverStrokePathNV, + glStencilThenCoverFillPathInstancedNV, + glStencilThenCoverStrokePathInstancedNV, + glPathGlyphIndexRangeNV, + glProgramPathFragmentInputGenNV, + glGetPathParameterivNV, + glGetPathParameterfvNV, + glGetPathCommandsNV, + glGetPathCoordsNV, + glGetPathDashArrayNV, + glGetPathMetricsNV, + glGetPathMetricRangeNV, + glGetPathSpacingNV, + glGetPathColorGenivNV, + glGetPathColorGenfvNV, + glGetPathTexGenivNV, + glGetPathTexGenfvNV, + glIsPointInFillPathNV, + glIsPointInStrokePathNV, + glGetPathLengthNV, + glPointAlongPathNV, + glMatrixLoad3x2fNV, + glMatrixLoad3x3fNV, + glMatrixLoadTranspose3x3fNV, + glMatrixMult3x2fNV, + glMatrixMult3x3fNV, + glMatrixMultTranspose3x3fNV, + glGetProgramResourcefvNV; // NV_pixel_data_range public final long - glPixelDataRangeNV, - glFlushPixelDataRangeNV; + glPixelDataRangeNV, + glFlushPixelDataRangeNV; // NV_point_sprite public final long - glPointParameteriNV, - glPointParameterivNV; + glPointParameteriNV, + glPointParameterivNV; // NV_primitive_restart public final long - glPrimitiveRestartNV, - glPrimitiveRestartIndexNV; + glPrimitiveRestartNV, + glPrimitiveRestartIndexNV; // NV_query_resource public final long - glQueryResourceNV; + glQueryResourceNV; // NV_query_resource_tag public final long - glGenQueryResourceTagNV, - glDeleteQueryResourceTagNV, - glQueryResourceTagNV; + glGenQueryResourceTagNV, + glDeleteQueryResourceTagNV, + glQueryResourceTagNV; // NV_sample_locations public final long - glFramebufferSampleLocationsfvNV, - glNamedFramebufferSampleLocationsfvNV, - glResolveDepthValuesNV; + glFramebufferSampleLocationsfvNV, + glNamedFramebufferSampleLocationsfvNV, + glResolveDepthValuesNV; // NV_scissor_exclusive public final long - glScissorExclusiveArrayvNV, - glScissorExclusiveNV; + glScissorExclusiveArrayvNV, + glScissorExclusiveNV; // NV_shader_buffer_load public final long - glMakeBufferResidentNV, - glMakeBufferNonResidentNV, - glIsBufferResidentNV, - glMakeNamedBufferResidentNV, - glMakeNamedBufferNonResidentNV, - glIsNamedBufferResidentNV, - glGetBufferParameterui64vNV, - glGetNamedBufferParameterui64vNV, - glGetIntegerui64vNV, - glUniformui64NV, - glUniformui64vNV, - glProgramUniformui64NV, - glProgramUniformui64vNV; + glMakeBufferResidentNV, + glMakeBufferNonResidentNV, + glIsBufferResidentNV, + glMakeNamedBufferResidentNV, + glMakeNamedBufferNonResidentNV, + glIsNamedBufferResidentNV, + glGetBufferParameterui64vNV, + glGetNamedBufferParameterui64vNV, + glGetIntegerui64vNV, + glUniformui64NV, + glUniformui64vNV, + glProgramUniformui64NV, + glProgramUniformui64vNV; // NV_shading_rate_image public final long - glBindShadingRateImageNV, - glShadingRateImagePaletteNV, - glGetShadingRateImagePaletteNV, - glShadingRateImageBarrierNV, - glShadingRateSampleOrderNV, - glShadingRateSampleOrderCustomNV, - glGetShadingRateSampleLocationivNV; + glBindShadingRateImageNV, + glShadingRateImagePaletteNV, + glGetShadingRateImagePaletteNV, + glShadingRateImageBarrierNV, + glShadingRateSampleOrderNV, + glShadingRateSampleOrderCustomNV, + glGetShadingRateSampleLocationivNV; // NV_texture_barrier public final long - glTextureBarrierNV; + glTextureBarrierNV; // NV_texture_multisample public final long - glTexImage2DMultisampleCoverageNV, - glTexImage3DMultisampleCoverageNV, - glTextureImage2DMultisampleNV, - glTextureImage3DMultisampleNV, - glTextureImage2DMultisampleCoverageNV, - glTextureImage3DMultisampleCoverageNV; + glTexImage2DMultisampleCoverageNV, + glTexImage3DMultisampleCoverageNV, + glTextureImage2DMultisampleNV, + glTextureImage3DMultisampleNV, + glTextureImage2DMultisampleCoverageNV, + glTextureImage3DMultisampleCoverageNV; // NV_timeline_semaphore public final long - glCreateSemaphoresNV, - glSemaphoreParameterivNV, - glGetSemaphoreParameterivNV; + glCreateSemaphoresNV, + glSemaphoreParameterivNV, + glGetSemaphoreParameterivNV; // NV_transform_feedback public final long - glBeginTransformFeedbackNV, - glEndTransformFeedbackNV, - glTransformFeedbackAttribsNV, - glBindBufferRangeNV, - glBindBufferOffsetNV, - glBindBufferBaseNV, - glTransformFeedbackVaryingsNV, - glActiveVaryingNV, - glGetVaryingLocationNV, - glGetActiveVaryingNV, - glGetTransformFeedbackVaryingNV, - glTransformFeedbackStreamAttribsNV; + glBeginTransformFeedbackNV, + glEndTransformFeedbackNV, + glTransformFeedbackAttribsNV, + glBindBufferRangeNV, + glBindBufferOffsetNV, + glBindBufferBaseNV, + glTransformFeedbackVaryingsNV, + glActiveVaryingNV, + glGetVaryingLocationNV, + glGetActiveVaryingNV, + glGetTransformFeedbackVaryingNV, + glTransformFeedbackStreamAttribsNV; // NV_transform_feedback2 public final long - glBindTransformFeedbackNV, - glDeleteTransformFeedbacksNV, - glGenTransformFeedbacksNV, - glIsTransformFeedbackNV, - glPauseTransformFeedbackNV, - glResumeTransformFeedbackNV, - glDrawTransformFeedbackNV; + glBindTransformFeedbackNV, + glDeleteTransformFeedbacksNV, + glGenTransformFeedbacksNV, + glIsTransformFeedbackNV, + glPauseTransformFeedbackNV, + glResumeTransformFeedbackNV, + glDrawTransformFeedbackNV; // NV_vertex_array_range public final long - glVertexArrayRangeNV, - glFlushVertexArrayRangeNV; + glVertexArrayRangeNV, + glFlushVertexArrayRangeNV; // NV_vertex_attrib_integer_64bit public final long - glVertexAttribL1i64NV, - glVertexAttribL2i64NV, - glVertexAttribL3i64NV, - glVertexAttribL4i64NV, - glVertexAttribL1i64vNV, - glVertexAttribL2i64vNV, - glVertexAttribL3i64vNV, - glVertexAttribL4i64vNV, - glVertexAttribL1ui64NV, - glVertexAttribL2ui64NV, - glVertexAttribL3ui64NV, - glVertexAttribL4ui64NV, - glVertexAttribL1ui64vNV, - glVertexAttribL2ui64vNV, - glVertexAttribL3ui64vNV, - glVertexAttribL4ui64vNV, - glGetVertexAttribLi64vNV, - glGetVertexAttribLui64vNV, - glVertexAttribLFormatNV; + glVertexAttribL1i64NV, + glVertexAttribL2i64NV, + glVertexAttribL3i64NV, + glVertexAttribL4i64NV, + glVertexAttribL1i64vNV, + glVertexAttribL2i64vNV, + glVertexAttribL3i64vNV, + glVertexAttribL4i64vNV, + glVertexAttribL1ui64NV, + glVertexAttribL2ui64NV, + glVertexAttribL3ui64NV, + glVertexAttribL4ui64NV, + glVertexAttribL1ui64vNV, + glVertexAttribL2ui64vNV, + glVertexAttribL3ui64vNV, + glVertexAttribL4ui64vNV, + glGetVertexAttribLi64vNV, + glGetVertexAttribLui64vNV, + glVertexAttribLFormatNV; // NV_vertex_buffer_unified_memory public final long - glBufferAddressRangeNV, - glVertexFormatNV, - glNormalFormatNV, - glColorFormatNV, - glIndexFormatNV, - glTexCoordFormatNV, - glEdgeFlagFormatNV, - glSecondaryColorFormatNV, - glFogCoordFormatNV, - glVertexAttribFormatNV, - glVertexAttribIFormatNV, - glGetIntegerui64i_vNV; + glBufferAddressRangeNV, + glVertexFormatNV, + glNormalFormatNV, + glColorFormatNV, + glIndexFormatNV, + glTexCoordFormatNV, + glEdgeFlagFormatNV, + glSecondaryColorFormatNV, + glFogCoordFormatNV, + glVertexAttribFormatNV, + glVertexAttribIFormatNV, + glGetIntegerui64i_vNV; // NV_viewport_swizzle public final long - glViewportSwizzleNV; + glViewportSwizzleNV; // NVX_conditional_render public final long - glBeginConditionalRenderNVX, - glEndConditionalRenderNVX; + glBeginConditionalRenderNVX, + glEndConditionalRenderNVX; // NVX_gpu_multicast2 public final long - glAsyncCopyImageSubDataNVX, - glAsyncCopyBufferSubDataNVX, - glUploadGpuMaskNVX, - glMulticastViewportArrayvNVX, - glMulticastScissorArrayvNVX, - glMulticastViewportPositionWScaleNVX; + glAsyncCopyImageSubDataNVX, + glAsyncCopyBufferSubDataNVX, + glUploadGpuMaskNVX, + glMulticastViewportArrayvNVX, + glMulticastScissorArrayvNVX, + glMulticastViewportPositionWScaleNVX; // NVX_progress_fence public final long - glCreateProgressFenceNVX, - glSignalSemaphoreui64NVX, - glWaitSemaphoreui64NVX, - glClientWaitSemaphoreui64NVX; + glCreateProgressFenceNVX, + glSignalSemaphoreui64NVX, + glWaitSemaphoreui64NVX, + glClientWaitSemaphoreui64NVX; // OVR_multiview public final long - glFramebufferTextureMultiviewOVR, - glNamedFramebufferTextureMultiviewOVR; + glFramebufferTextureMultiviewOVR, + glNamedFramebufferTextureMultiviewOVR; /** When true, {@link GL11} is supported. */ public final boolean OpenGL11; @@ -2812,17 +2811,17 @@ public final class GLCapabilities { /** When true, {@link AMDBlendMinmaxFactor} is supported. */ public final boolean GL_AMD_blend_minmax_factor; /** - * When true, the AMD_conservative_depth extension is supported. - * + * When true, the AMD_conservative_depth extension is supported. + * *

There is a common optimization for hardware accelerated implementation of OpenGL which relies on an early depth test to be run before the fragment * shader so that the shader evaluation can be skipped if the fragment ends up being discarded because it is occluded.

- * + * *

This optimization does not affect the final rendering, and is typically possible when the fragment does not change the depth programmatically. (i.e.: it * does not write to the built-in {@code gl_FragDepth} output). There are, however a class of operations on the depth in the shader which could still be * performed while allowing the early depth test to operate.

- * + * *

This extension allows the application to pass enough information to the GL implementation to activate such optimizations safely.

- * + * *

Requires {@link GL30 OpenGL 3.0}. Promoted to core in {@link GL42 OpenGL 4.2}.

*/ public final boolean GL_AMD_conservative_depth; @@ -2835,12 +2834,12 @@ public final class GLCapabilities { /** When true, {@link AMDFramebufferMultisampleAdvanced} is supported. */ public final boolean GL_AMD_framebuffer_multisample_advanced; /** - * When true, the AMD_gcn_shader extension is supported. - * + * When true, the AMD_gcn_shader extension is supported. + * *

This extension exposes miscellaneous features of the AMD "Graphics Core Next" shader architecture that do not cleanly fit into other extensions * and are not significant enough alone to warrant their own extensions. This includes cross-SIMD lane ballots, cube map query functions and a * functionality to query the elapsed shader core time.

- * + * *

Requires {@link #GL_AMD_gpu_shader_int64 AMD_gpu_shader_int64} or {@link #GL_NV_gpu_shader5 NV_gpu_shader5}.

*/ public final boolean GL_AMD_gcn_shader; @@ -2849,19 +2848,19 @@ public final class GLCapabilities { /** When true, {@link AMDGPUShaderHalfFloatFetch} is supported. */ public final boolean GL_AMD_gpu_shader_half_float_fetch; /** - * When true, the AMD_gpu_shader_int16 extension is supported. - * + * When true, the AMD_gpu_shader_int16 extension is supported. + * *

This extension was developed to allow implementations supporting 16-bit integers to expose the feature in GLSL.

- * + * *

The extension introduces the following features for all shader types:

- * + * *
    *
  • new built-in functions to pack and unpack 32-bit integer types into a two-component 16-bit integer vector;
  • *
  • new built-in functions to convert half-precision floating-point values to or from their 16-bit integer bit encodings;
  • *
  • vector relational functions supporting comparisons of vectors of 16-bit integer types; and
  • *
  • common functions abs, frexp, ldexp, sign, min, max, clamp, and mix supporting arguments of 16-bit integer types.
  • *
- * + * *

Requires GLSL 4.00.

*/ public final boolean GL_AMD_gpu_shader_int16; @@ -2882,66 +2881,66 @@ public final class GLCapabilities { /** When true, {@link AMDSeamlessCubemapPerTexture} is supported. */ public final boolean GL_AMD_seamless_cubemap_per_texture; /** - * When true, the AMD_shader_atomic_counter_ops extension is supported. - * + * When true, the AMD_shader_atomic_counter_ops extension is supported. + * *

This extension is written against the OpenGL 4.3 (core) specification and the GLSL 4.30.7 specification.

- * + * *

Requires {@link GL42 OpenGL 4.2} or {@link #GL_ARB_shader_atomic_counters ARB_shader_atomic_counters}.

*/ public final boolean GL_AMD_shader_atomic_counter_ops; /** - * When true, the AMD_shader_ballot extension is supported. - * + * When true, the AMD_shader_ballot extension is supported. + * *

The extensions {@code ARB_shader_group_vote} and {@code ARB_shader_ballot} introduced the concept of sub-groups and a set of operations that allow data * exchange across shader invocations within a sub-group.

- * + * *

This extension further extends the capabilities of these extensions with additional sub-group operations.

- * + * *

Requires {@link #GL_ARB_shader_group_vote ARB_shader_group_vote}, {@link #GL_ARB_shader_ballot ARB_shader_ballot} and {@link ARBGPUShaderInt64 ARB_gpu_shader_int64} or {@link AMDGPUShaderInt64 AMD_gpu_shader_int64}.

*/ public final boolean GL_AMD_shader_ballot; /** - * When true, the AMD_shader_explicit_vertex_parameter extension is supported. - * + * When true, the AMD_shader_explicit_vertex_parameter extension is supported. + * *

Unextended GLSL provides a set of fixed function interpolation modes and even those are limited to certain types of interpolants (for example, * interpolation of integer and double isn't supported).

- * + * *

This extension introduces new built-in functions allowing access to vertex parameters explicitly in the fragment shader. It also exposes barycentric * coordinates as new built-in variables, which can be used to implement custom interpolation algorithms using shader code.

- * + * *

Requires {@link GL20 OpenGL 2.0} or {@link ARBShaderObjects ARB_shader_objects}.

*/ public final boolean GL_AMD_shader_explicit_vertex_parameter; /** - * When true, the AMD_shader_image_load_store_lod extension is supported. - * + * When true, the AMD_shader_image_load_store_lod extension is supported. + * *

This extension was developed based on the {@link ARBShaderImageLoadStore ARB_shader_image_load_store} extension to allow implementations supporting loads and stores on mipmap * texture images.

- * + * *

Requires {@link GL40 OpenGL 4.0} and GLSL 4.00

*/ public final boolean GL_AMD_shader_image_load_store_lod; /** - * When true, the AMD_shader_stencil_export extension is supported. - * + * When true, the AMD_shader_stencil_export extension is supported. + * *

In OpenGL, the stencil test is a powerful mechanism to selectively discard fragments based on the content of the stencil buffer. However, facilites to * update the content of the stencil buffer are limited to operations such as incrementing the existing value, or overwriting with a fixed reference value.

- * + * *

This extension provides a mechanism whereby a shader may generate the stencil reference value per invocation. When stencil testing is enabled, this * allows the test to be performed against the value generated in the shader. When the stencil operation is set to {@link GL11#GL_REPLACE REPLACE}, this allows a value generated * in the shader to be written to the stencil buffer directly.

- * + * *

Requires {@link #GL_ARB_fragment_shader ARB_fragment_shader}.

*/ public final boolean GL_AMD_shader_stencil_export; /** - * When true, the AMD_shader_trinary_minmax extension is supported. - * + * When true, the AMD_shader_trinary_minmax extension is supported. + * *

This extension introduces three new trinary built-in functions to the OpenGL Shading Languages. These functions allow the minimum, maximum or median of * three inputs to be found with a single function call. These operations may be useful for sorting and filtering operations, for example. By explicitly * performing a trinary operation with a single built-in function, shader compilers and optimizers may be able to generate better instruction sequences for * perform sorting and other multi-input functions.

- * + * *

Requires {@link GL20 OpenGL 2.0} or {@link #GL_ARB_shader_objects ARB_shader_objects}.

*/ public final boolean GL_AMD_shader_trinary_minmax; @@ -2950,74 +2949,74 @@ public final class GLCapabilities { /** When true, {@link AMDStencilOperationExtended} is supported. */ public final boolean GL_AMD_stencil_operation_extended; /** - * When true, the AMD_texture_gather_bias_lod extension is supported. - * + * When true, the AMD_texture_gather_bias_lod extension is supported. + * *

This extension was developed based on existing built-in texture gather functions to allow implementations supporting bias of implicit level of detail * and explicit control of level of detail in texture gather operations.

*/ public final boolean GL_AMD_texture_gather_bias_lod; /** - * When true, the AMD_texture_texture4 extension is supported. - * + * When true, the AMD_texture_texture4 extension is supported. + * *

This extension adds new shading language built-in texture functions to the shading language.

- * + * *

These texture functions may be used to access one component textures.

- * + * *

The {@code texture4} built-in function returns a texture value derived from a 2x2 set of texels in the image array of level levelbase is selected. These * texels are selected in the same way as when the value of {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER} is {@link GL11#GL_LINEAR LINEAR}, but instead of these texels being filtered to generate the * texture value, the R, G, B and A texture values are derived directly from these four texels.

*/ public final boolean GL_AMD_texture_texture4; /** - * When true, the AMD_transform_feedback3_lines_triangles extension is supported. - * + * When true, the AMD_transform_feedback3_lines_triangles extension is supported. + * *

OpenGL 4.0 introduced the ability to record primitives into multiple output streams using transform feedback. However, the restriction that all streams * must output {@link GL11#GL_POINT POINT} primitives when more than one output stream is active was also introduced. This extension simply removes that restriction, allowing * the same set of primitives to be used with multiple transform feedback streams as with a single stream.

- * + * *

Requires {@link GL40 OpenGL 4.0} or {@link ARBTransformFeedback3 ARB_transform_feedback3}.

*/ public final boolean GL_AMD_transform_feedback3_lines_triangles; /** When true, {@link AMDTransformFeedback4} is supported. */ public final boolean GL_AMD_transform_feedback4; /** - * When true, the AMD_vertex_shader_layer extension is supported. - * + * When true, the AMD_vertex_shader_layer extension is supported. + * *

The {@code gl_Layer} built-in shading language variable was introduced with the {@link #GL_ARB_geometry_shader4 ARB_geometry_shader4} extension and subsequently promoted to core * OpenGL in version 3.2. This variable is an output from the geometry shader stage that allows rendering to be directed to a specific layer of an array * texture, slice of a 3D texture or face of a cube map or cube map array attachment of the framebuffer. Thus, this extremely useful functionality is only * available if a geometry shader is present - even if the geometry shader is not otherwise required by the application. This adds overhead to the graphics * processing pipeline, and complexity to applications. It also precludes implementations that cannot support geometry shaders from supporting rendering to * layered framebuffer attachments.

- * + * *

This extension exposes the {@code gl_Layer} built-in variable in the vertex shader, allowing rendering to be directed to layered framebuffer attachments * with only a vertex and fragment shader present. Combined with features such as instancing, or static vertex attributes and so on, this allows a wide * variety of techniques to be implemented without the requirement for a geometry shader to be present.

- * + * *

Requires {@link GL30 OpenGL 3.0} or {@link #GL_EXT_texture_array EXT_texture_array}.

*/ public final boolean GL_AMD_vertex_shader_layer; /** When true, {@link AMDVertexShaderTessellator} is supported. */ public final boolean GL_AMD_vertex_shader_tessellator; /** - * When true, the AMD_vertex_shader_viewport_index extension is supported. - * + * When true, the AMD_vertex_shader_viewport_index extension is supported. + * *

The {@code gl_ViewportIndex} built-in variable was introduced by the {@link #GL_ARB_viewport_array ARB_viewport_array} extension and {@link GL41 OpenGL 4.1}. This variable is available * in un-extended OpenGL only to the geometry shader. When written in the geometry shader, it causes geometry to be directed to one of an array of several * independent viewport rectangles.

- * + * *

In order to use any viewport other than zero, a geometry shader must be present. Geometry shaders introduce processing overhead and potential * performance issues. This extension exposes the {@code gl_ViewportIndex} built-in variable to the vertex shader, allowing the functionality introduced by * ARB_viewport_array to be accessed without requiring a geometry shader to be present.

- * + * *

Requires {@link GL41 OpenGL 4.1} or {@link #GL_ARB_viewport_array ARB_viewport_array}.

*/ public final boolean GL_AMD_vertex_shader_viewport_index; /** - * When true, the ARB_arrays_of_arrays extension is supported. - * + * When true, the ARB_arrays_of_arrays extension is supported. + * *

This extension removes the restriction that arrays cannot be formed into arrays, allowing arrays of arrays to be declared.

- * + * *

Requires GLSL 1.2. Promoted to core in {@link GL43 OpenGL 4.3}.

*/ public final boolean GL_ARB_arrays_of_arrays; @@ -3029,6 +3028,8 @@ public final class GLCapabilities { public final boolean GL_ARB_blend_func_extended; /** When true, {@link ARBBufferStorage} is supported. */ public final boolean GL_ARB_buffer_storage; + /** When true, {@link ARBCLEvent} is supported. */ + public final boolean GL_ARB_cl_event; /** When true, {@link ARBClearBufferObject} is supported. */ public final boolean GL_ARB_clear_buffer_object; /** When true, {@link ARBClearTexture} is supported. */ @@ -3038,8 +3039,8 @@ public final class GLCapabilities { /** When true, {@link ARBColorBufferFloat} is supported. */ public final boolean GL_ARB_color_buffer_float; /** - * When true, the ARB_compatibility extension is supported. - * + * When true, the ARB_compatibility extension is supported. + * *

This extension restores features deprecated by {@link GL30 OpenGL 3.0}.

*/ public final boolean GL_ARB_compatibility; @@ -3052,17 +3053,17 @@ public final class GLCapabilities { /** When true, {@link ARBConditionalRenderInverted} is supported. */ public final boolean GL_ARB_conditional_render_inverted; /** - * When true, the ARB_conservative_depth extension is supported. - * + * When true, the ARB_conservative_depth extension is supported. + * *

There is a common optimization for hardware accelerated implementation of OpenGL which relies on an early depth test to be run before the fragment * shader so that the shader evaluation can be skipped if the fragment ends up being discarded because it is occluded.

- * + * *

This optimization does not affect the final rendering, and is typically possible when the fragment does not change the depth programmatically. (i.e.: it * does not write to the built-in gl_FragDepth output). There are, however a class of operations on the depth in the shader which could still be performed * while allowing the early depth test to operate.

- * + * *

This extension allows the application to pass enough information to the GL implementation to activate such optimizations safely.

- * + * *

Requires {@link GL30 OpenGL 3.0}. Promoted to core in {@link GL42 OpenGL 4.2}.

*/ public final boolean GL_ARB_conservative_depth; @@ -3081,37 +3082,37 @@ public final class GLCapabilities { /** When true, {@link ARBDepthTexture} is supported. */ public final boolean GL_ARB_depth_texture; /** - * When true, the ARB_derivative_control extension is supported. - * + * When true, the ARB_derivative_control extension is supported. + * *

This extension provides control over the spacial granularity at which the underlying implementation computes derivatives.

- * + * *

For example, for the coarse-granularity derivative, a single x derivative could be computed for each 2x2 group of pixels, using that same derivative * value for all 4 pixels. For the fine-granularity derivative, two derivatives could be computed for each 2x2 group of pixels; one for the top row and one * for the bottom row. Implementations vary somewhat on how this is done.

- * + * *

To select the coarse derivative, use:

- * + * *

      * dFdxCoarse(p)
      * dFdyCoarse(p)
      * fwidthCoarse(p)
- * + * *

To select the fine derivative, use:

- * + * *

      * dFdxFine(p)
      * dFdyFine(p)
      * fwidthFine(p)
- * + * *

To select which ever is "better" (based on performance, API hints, or other factors), use:

- * + * *

      * dFdx(p)
      * dFdy(p)
      * fwidth(p)
- * + * *

This last set is the set of previously existing built-ins for derivatives, and continues to work in a backward compatible way.

- * + * *

Requires {@link GL40 OpenGL 4.0} and GLSL 4.00. Promoted to core in {@link GL45 OpenGL 4.5}.

*/ public final boolean GL_ARB_derivative_control; @@ -3138,117 +3139,117 @@ public final class GLCapabilities { /** When true, {@link ARBES3Compatibility} is supported. */ public final boolean GL_ARB_ES3_compatibility; /** - * When true, the ARB_explicit_attrib_location extension is supported. - * + * When true, the ARB_explicit_attrib_location extension is supported. + * *

This extension provides a method to pre-assign attribute locations to named vertex shader inputs and color numbers to named fragment shader outputs. * This allows applications to globally assign a particular semantic meaning, such as diffuse color or vertex normal, to a particular attribute location * without knowing how that attribute will be named in any particular shader.

- * + * *

Requires {@link GL20 OpenGL 2.0} or {@link #GL_ARB_vertex_shader ARB_vertex_shader}. Promoted to core in {@link GL33 OpenGL 3.3}.

*/ public final boolean GL_ARB_explicit_attrib_location; /** When true, {@link ARBExplicitUniformLocation} is supported. */ public final boolean GL_ARB_explicit_uniform_location; /** - * When true, the ARB_fragment_coord_conventions extension is supported. - * + * When true, the ARB_fragment_coord_conventions extension is supported. + * *

This extension provides alternative conventions for the fragment coordinate XY location available for programmable fragment processing.

- * + * *

The scope of this extension deals *only* with how the fragment coordinate XY location appears during programming fragment processing. Beyond the scope * of this extension are coordinate conventions used for rasterization or transformation.

- * + * *

In the case of the coordinate conventions for rasterization and transformation, some combination of the viewport, depth range, culling state, and * projection matrix state can be reconfigured to adopt other arbitrary clip-space and window-space coordinate space conventions. Adopting other clip-space * and window-space conventions involves adjusting existing OpenGL state. However it is non-trivial to massage an arbitrary fragment shader or program to * adopt a different window-space coordinate system because such shaders are encoded in various textual representations.

- * + * *

The dominant 2D and 3D rendering APIs make two basic choices of convention when locating fragments in window space. The two choices are:

- * + * *
    *
  1. Is the origin nearest the lower-left- or upper-left-most pixel of the window?
  2. *
  3. Is the (x,y) location of the pixel nearest the origin at (0,0) or (0.5,0.5)?
  4. *
- * + * *

OpenGL assumes a lower-left origin for window coordinates and assumes pixel centers are located at half-pixel coordinates. This means the XY location * (0.5,0.5) corresponds to the lower-left-most pixel in a window.

- * + * *

Other window coordinate conventions exist for other rendering APIs. X11, GDI, and Direct3D version through DirectX 9 assume an upper-left window origin * and locate pixel centers at integer XY values. By this alternative convention, the XY location (0,0) corresponds to the upper-left-most pixel in a window.

- * + * *

Direct3D for DirectX 10 assumes an upper-left origin (as do prior DirectX versions) yet assumes half-pixel coordinates (unlike prior DirectX versions). * By the DirectX 10 convention, the XY location (0.5,0.5) corresponds to the upper-left-most pixel in a window.

- * + * *

Fragment shaders can directly access the location of a given processed fragment in window space. We call this location the "fragment coordinate".

- * + * *

This extension provides a means for fragment shaders written in GLSL or OpenGL assembly extensions to specify alternative conventions for determining * the fragment coordinate value accessed during programmable fragment processing.

- * + * *

The motivation for this extension is to provide an easy, efficient means for fragment shaders accessing a fragment's window-space location to adopt the * fragment coordinate convention for which the shader was originally written.

- * + * *

Promoted to core in {@link GL32 OpenGL 3.2}.

*/ public final boolean GL_ARB_fragment_coord_conventions; /** - * When true, the ARB_fragment_layer_viewport extension is supported. - * + * When true, the ARB_fragment_layer_viewport extension is supported. + * *

The geometry shader has the special built-in variables gl_Layer and gl_ViewportIndex that specify which layer and viewport primitives are rendered to. * Currently the fragment shader does not know which layer or viewport the fragments are being written to without the application implementing their own * interface variables between the geometry and fragment shaders.

- * + * *

This extension specifies that the gl_Layer and gl_ViewportIndex built-in variables are also available to the fragment shader so the application doesn't * need to implement these manually.

- * + * *

Requires {@link GL30 OpenGL 3.0} and {@link #GL_ARB_geometry_shader4 ARB_geometry_shader4}, or {@link GL32 OpenGL 3.2}. Promoted to core in {@link GL43 OpenGL 4.3}.

*/ public final boolean GL_ARB_fragment_layer_viewport; /** When true, {@link ARBFragmentProgram} is supported. */ public final boolean GL_ARB_fragment_program; /** - * When true, the ARB_fragment_program_shadow extension is supported. - * + * When true, the ARB_fragment_program_shadow extension is supported. + * *

This extension extends ARB_fragment_program to remove the interaction with ARB_shadow and defines the program option "ARB_fragment_program_shadow".

- * + * *

Requires {@link #GL_ARB_fragment_program ARB_fragment_program} and {@link #GL_ARB_shadow ARB_shadow}.

*/ public final boolean GL_ARB_fragment_program_shadow; /** When true, {@link ARBFragmentShader} is supported. */ public final boolean GL_ARB_fragment_shader; /** - * When true, the ARB_fragment_shader_interlock extension is supported. - * + * When true, the ARB_fragment_shader_interlock extension is supported. + * *

In unextended OpenGL 4.5, applications may produce a large number of fragment shader invocations that perform loads and stores to memory using image * uniforms, atomic counter uniforms, buffer variables, or pointers. The order in which loads and stores to common addresses are performed by different * fragment shader invocations is largely undefined. For algorithms that use shader writes and touch the same pixels more than once, one or more of the * following techniques may be required to ensure proper execution ordering:

- * + * *
    *
  • inserting Finish or WaitSync commands to drain the pipeline between different "passes" or "layers";
  • *
  • using only atomic memory operations to write to shader memory (which may be relatively slow and limits how memory may be updated); or
  • *
  • injecting spin loops into shaders to prevent multiple shader invocations from touching the same memory concurrently.
  • *
- * + * *

This extension provides new GLSL built-in functions beginInvocationInterlockARB() and endInvocationInterlockARB() that delimit a critical section of * fragment shader code. For pairs of shader invocations with "overlapping" coverage in a given pixel, the OpenGL implementation will guarantee that the * critical section of the fragment shader will be executed for only one fragment at a time.

- * + * *

There are four different interlock modes supported by this extension, which are identified by layout qualifiers. The qualifiers * "pixel_interlock_ordered" and "pixel_interlock_unordered" provides mutual exclusion in the critical section for any pair of fragments corresponding to * the same pixel. When using multisampling, the qualifiers "sample_interlock_ordered" and "sample_interlock_unordered" only provide mutual exclusion for * pairs of fragments that both cover at least one common sample in the same pixel; these are recommended for performance if shaders use per-sample data * structures.

- * + * *

Additionally, when the "pixel_interlock_ordered" or "sample_interlock_ordered" layout qualifier is used, the interlock also guarantees that the * critical section for multiple shader invocations with "overlapping" coverage will be executed in the order in which the primitives were processed by * the GL. Such a guarantee is useful for applications like blending in the fragment shader, where an application requires that fragment values to be * composited in the framebuffer in primitive order.

- * + * *

This extension can be useful for algorithms that need to access per-pixel data structures via shader loads and stores. Such algorithms using this * extension can access such data structures in the critical section without worrying about other invocations for the same pixel accessing the data * structures concurrently. Additionally, the ordering guarantees are useful for cases where the API ordering of fragments is meaningful. For example, * applications may be able to execute programmable blending operations in the fragment shader, where the destination buffer is read via image loads and * the final value is written via image stores.

- * + * *

Requires {@link GL42 OpenGL 4.2} or {@link ARBShaderImageLoadStore ARB_shader_image_load_store}.

*/ public final boolean GL_ARB_fragment_shader_interlock; @@ -3319,14 +3320,14 @@ public final class GLCapabilities { /** When true, {@link ARBPolygonOffsetClamp} is supported. */ public final boolean GL_ARB_polygon_offset_clamp; /** - * When true, the ARB_post_depth_coverage extension is supported. - * + * When true, the ARB_post_depth_coverage extension is supported. + * *

This extension allows the fragment shader to control whether values in {@code gl_SampleMaskIn[]} reflect the coverage after application of the early * depth and stencil tests. This feature can be enabled with the following layout qualifier in the fragment shader:

- * + * *

      *         layout(post_depth_coverage) in;
- * + * *

Use of this feature implicitly enables early fragment tests.

*/ public final boolean GL_ARB_post_depth_coverage; @@ -3337,49 +3338,49 @@ public final class GLCapabilities { /** When true, {@link ARBQueryBufferObject} is supported. */ public final boolean GL_ARB_query_buffer_object; /** - * When true, the ARB_robust_buffer_access_behavior extension is supported. - * + * When true, the ARB_robust_buffer_access_behavior extension is supported. + * *

This extension specifies the behavior of out-of-bounds buffer and array accesses. This is an improvement over the existing ARB_robustness extension * which stated that the application should not crash, but the behavior is otherwise undefined. This extension specifies the access protection provided by * the GL to ensure that out-of-bounds accesses cannot read from or write to data not owned by the application. All accesses are contained within the * buffer object and program area they reference. These additional robustness guarantees apply to contexts created with the * {@code CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB} feature enabled.

- * + * *

Requires {@link ARBRobustness ARB_robustness}. Promoted to core in {@link GL43 OpenGL 4.3}.

*/ public final boolean GL_ARB_robust_buffer_access_behavior; /** When true, {@link ARBRobustness} is supported. */ public final boolean GL_ARB_robustness; /** - * When true, the ARB_robustness_application_isolation extension is supported. - * + * When true, the ARB_robustness_application_isolation extension is supported. + * *

{@link ARBRobustness ARB_robustness} and supporting window system extensions allow creating an OpenGL context supporting graphics reset notification behavior. This * extension provides stronger guarantees about the possible side-effects of a graphics reset.

- * + * *

It is expected that there may be a performance cost associated with isolating an application or share group from other contexts on the GPU. For this * reason, ARB_robustness_isolation is phrased as an opt-in mechanism, with a new context creation bit defined in the window system bindings. It is * expected that implementations might only advertise the strings in this extension if both the implementation supports the desired isolation properties, * and the context was created with the appropriate reset isolation bit.

- * + * *

If the graphics driver advertises the {@code GL_ARB_robustness_application_isolation} extension string, then the driver guarantees that if a particular * application causes a graphics reset to occur:

- * + * *
    *
  1. No other application on the system is affected by the graphics reset.
  2. *
  3. No other application on the system receives any notification that the graphics reset occurred.
  4. *
- * + * *

Requires {@link ARBRobustness ARB_robustness}. Promoted to core in {@link GL43 OpenGL 4.3}.

*/ public final boolean GL_ARB_robustness_application_isolation; /** - * When true, the ARB_robustness_share_group_isolation extension is supported. - * + * When true, the ARB_robustness_share_group_isolation extension is supported. + * *

See {@link #GL_ARB_robustness_application_isolation ARB_robustness_application_isolation}.

- * + * *

If the graphics driver advertises the {@code GL_ARB_robustness_share_group_isolation} extension string, then the driver guarantees that if a context in * a particular share group causes a graphics reset to occur:

- * + * *
    *
  1. No other share group within the application is affected by the graphics reset. Additionally, no other application on the system is affected by the * graphics reset.
  2. @@ -3401,143 +3402,143 @@ public final class GLCapabilities { /** When true, {@link ARBSeparateShaderObjects} is supported. */ public final boolean GL_ARB_separate_shader_objects; /** - * When true, the ARB_shader_atomic_counter_ops extension is supported. - * + * When true, the ARB_shader_atomic_counter_ops extension is supported. + * *

    The {@link ARBShaderAtomicCounters ARB_shader_atomic_counters} extension introduced atomic counters, but it limits list of potential operations that can be performed on them * to increment, decrement, and query. This extension extends the list of GLSL built-in functions that can operate on atomic counters. The list of new * operations include:

    - * + * *
      *
    • Addition and subtraction
    • *
    • Minimum and maximum
    • *
    • Bitwise operators (AND, OR, XOR, etc.)
    • *
    • Exchange, and compare and exchange operators
    • *
    - * + * *

    Requires {@link GL42 OpenGL 4.2} or {@link ARBShaderAtomicCounters ARB_shader_atomic_counters}.

    */ public final boolean GL_ARB_shader_atomic_counter_ops; /** When true, {@link ARBShaderAtomicCounters} is supported. */ public final boolean GL_ARB_shader_atomic_counters; /** - * When true, the ARB_shader_ballot extension is supported. - * + * When true, the ARB_shader_ballot extension is supported. + * *

    This extension provides the ability for a group of invocations which execute in lockstep to do limited forms of cross-invocation communication via a * group broadcast of a invocation value, or broadcast of a bitarray representing a predicate value from each invocation in the group.

    - * + * *

    Requires {@link ARBGPUShaderInt64 ARB_gpu_shader_int64}.

    */ public final boolean GL_ARB_shader_ballot; /** - * When true, the ARB_shader_bit_encoding extension is supported. - * + * When true, the ARB_shader_bit_encoding extension is supported. + * *

    This extension trivially adds built-in functions for getting/setting the bit encoding for floating-point values in the OpenGL Shading Language.

    - * + * *

    Promoted to core in {@link GL33 OpenGL 3.3}.

    */ public final boolean GL_ARB_shader_bit_encoding; /** - * When true, the ARB_shader_clock extension is supported. - * + * When true, the ARB_shader_clock extension is supported. + * *

    This extension exposes a 64-bit monotonically incrementing shader counter which may be used to derive local timing information within a single shader * invocation.

    */ public final boolean GL_ARB_shader_clock; /** - * When true, the ARB_shader_draw_parameters extension is supported. - * + * When true, the ARB_shader_draw_parameters extension is supported. + * *

    In unextended GL, vertex shaders have inputs named {@code gl_VertexID} and {@code gl_InstanceID}, which contain, respectively the index of the vertex * and instance. The value of {@code gl_VertexID} is the implicitly passed index of the vertex being processed, which includes the value of baseVertex, for * those commands that accept it. Meanwhile, {@code gl_InstanceID} is the integer index of the current instance being processed, but, even for commands * that accept a baseInstance parameter, it does not include the value of this argument. Furthermore, the equivalents to these variables in other graphics * APIs do not necessarily follow these conventions. The reason for this inconsistency is that there are legitimate use cases for both inclusion and * exclusion of the baseVertex or baseInstance parameters in {@code gl_VertexID} and {@code gl_InstanceID}, respectively.

    - * + * *

    Rather than change the semantics of either built-in variable, this extension adds two new built-in variables to the GL shading language, * {@code gl_BaseVertexARB} and {@code gl_BaseInstanceARB}, which contain the values passed in the baseVertex and baseInstance parameters, respectively. * Shaders provided by the application may use these variables to offset {@code gl_VertexID} or {@code gl_InstanceID} if desired, or use them for any other * purpose.

    - * + * *

    Additionally, this extension adds a further built-in variable, {@code gl_DrawID} to the shading language. This variable contains the index of the draw * currently being processed by a Multi* variant of a drawing command (such as {@link GL14C#glMultiDrawElements MultiDrawElements} or {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}).

    - * + * *

    Requires {@link GL31 OpenGL 3.1}. Promoted to core in {@link GL33 OpenGL 3.3}.

    */ public final boolean GL_ARB_shader_draw_parameters; /** - * When true, the ARB_shader_group_vote extension is supported. - * + * When true, the ARB_shader_group_vote extension is supported. + * *

    This extension provides new built-in functions to compute the composite of a set of boolean conditions across a group of shader invocations. These * composite results may be used to execute shaders more efficiently on a single-instruction multiple-data (SIMD) processor. The set of shader invocations * across which boolean conditions are evaluated is implementation-dependent, and this extension provides no guarantee over how individual shader * invocations are assigned to such sets. In particular, the set of shader invocations has no necessary relationship with the compute shader local work * group -- a pair of shader invocations in a single compute shader work group may end up in different sets used by these built-ins.

    - * + * *

    Compute shaders operate on an explicitly specified group of threads (a local work group), but many implementations of OpenGL 4.3 will even group * non-compute shader invocations and execute them in a SIMD fashion. When executing code like

    - * + * *
    
          * if (condition) {
          *     result = do_fast_path();
          * } else {
          *     result = do_general_path();
          * }
    - * + * *

    where {@code condition} diverges between invocations, a SIMD implementation might first call do_fast_path() for the invocations where {@code condition} * is true and leave the other invocations dormant. Once do_fast_path() returns, it might call do_general_path() for invocations where {@code condition} is * false and leave the other invocations dormant. In this case, the shader executes *both* the fast and the general path and might be better off just using * the general path for all invocations.

    - * + * *

    This extension provides the ability to avoid divergent execution by evaluting a condition across an entire SIMD invocation group using code like:

    - * + * *
    
          * if (allInvocationsARB(condition)) {
          *     result = do_fast_path();
          * } else {
          *     result = do_general_path();
          * }
    - * + * *

    The built-in function allInvocationsARB() will return the same value for all invocations in the group, so the group will either execute do_fast_path() * or do_general_path(), but never both. For example, shader code might want to evaluate a complex function iteratively by starting with an approximation * of the result and then refining the approximation. Some input values may require a small number of iterations to generate an accurate result * (do_fast_path) while others require a larger number (do_general_path). In another example, shader code might want to evaluate a complex function * (do_general_path) that can be greatly simplified when assuming a specific value for one of its inputs (do_fast_path).

    - * + * *

    Requires {@link GL43 OpenGL 4.3} or {@link ARBComputeShader ARB_compute_shader}.

    */ public final boolean GL_ARB_shader_group_vote; /** When true, {@link ARBShaderImageLoadStore} is supported. */ public final boolean GL_ARB_shader_image_load_store; /** - * When true, the ARB_shader_image_size extension is supported. - * + * When true, the ARB_shader_image_size extension is supported. + * *

    This extension provides GLSL built-in functions allowing shaders to query the size of an image.

    - * + * *

    Requires {@link GL42 OpenGL 4.2} and GLSL 4.20. Promoted to core in {@link GL43 OpenGL 4.3}.

    */ public final boolean GL_ARB_shader_image_size; /** When true, {@link ARBShaderObjects} is supported. */ public final boolean GL_ARB_shader_objects; /** - * When true, the ARB_shader_precision extension is supported. - * + * When true, the ARB_shader_precision extension is supported. + * *

    This extension more clearly restricts the precision requirements of implementations of the GLSL specification. These include precision of arithmetic * operations (operators '+', '/', ...), transcendentals (log, exp, pow, reciprocal sqrt, ...), when NaNs (not a number) and INFs (infinities) will be * supported and generated, and denorm flushing behavior. Trigonometric built-ins and some other categories of built-ins are not addressed.

    - * + * *

    Requires {@link GL40 OpenGL 4.0}. Promoted to core in {@link GL41 OpenGL 4.1}.

    */ public final boolean GL_ARB_shader_precision; /** - * When true, the ARB_shader_stencil_export extension is supported. - * + * When true, the ARB_shader_stencil_export extension is supported. + * *

    In OpenGL, the stencil test is a powerful mechanism to selectively discard fragments based on the content of the stencil buffer. However, facilites to * update the content of the stencil buffer are limited to operations such as incrementing the existing value, or overwriting with a fixed reference value.

    - * + * *

    This extension provides a mechanism whereby a shader may generate the stencil reference value per invocation. When stencil testing is enabled, this * allows the test to be performed against the value generated in the shader. When the stencil operation is set to {@link GL11#GL_REPLACE REPLACE}, this allows a value generated * in the shader to be written to the stencil buffer directly.

    - * + * *

    Requires {@link #GL_ARB_fragment_shader ARB_fragment_shader}.

    */ public final boolean GL_ARB_shader_stencil_export; @@ -3546,31 +3547,31 @@ public final class GLCapabilities { /** When true, {@link ARBShaderSubroutine} is supported. */ public final boolean GL_ARB_shader_subroutine; /** - * When true, the ARB_shader_texture_image_samples extension is supported. - * + * When true, the ARB_shader_texture_image_samples extension is supported. + * *

    This extension provides GLSL built-in functions allowing shaders to query the number of samples of a texture.

    - * + * *

    Requires GLSL 1.50 or {@link ARBTextureMultisample ARB_texture_multisample}.

    */ public final boolean GL_ARB_shader_texture_image_samples; /** - * When true, the ARB_shader_texture_lod extension is supported. - * + * When true, the ARB_shader_texture_lod extension is supported. + * *

    This extension adds additional texture functions to the OpenGL Shading Language which provide the shader writer with explicit control of LOD.

    - * + * *

    Mipmap texture fetches and anisotropic texture fetches require an implicit derivatives to calculate rho, lambda and/or the line of anisotropy. These * implicit derivatives will be undefined for texture fetches occurring inside non-uniform control flow or for vertex shader texture fetches, resulting in * undefined texels.

    - * + * *

    The additional texture functions introduced with this extension provide explict control of LOD (isotropic texture functions) or provide explicit * derivatives (anisotropic texture functions).

    - * + * *

    Anisotropic texture functions return defined texels for mipmap texture fetches or anisotropic texture fetches, even inside non-uniform control flow. * Isotropic texture functions return defined texels for mipmap texture fetches, even inside non-uniform control flow. However, isotropic texture functions * return undefined texels for anisotropic texture fetches.

    - * + * *

    The existing isotropic vertex texture functions:

    - * + * *
    
          * texture1DLod,   texture1DProjLod,
          * texture2DLod,   texture2DProjLod,
    @@ -3578,11 +3579,11 @@ public final class GLCapabilities {
          * textureCubeLod,
          * shadow1DLod,    shadow1DProjLod,
          * shadow2DLod,    shadow2DProjLod
    - * + * *

    are added to the built-in functions for fragment shaders.

    - * + * *

    New anisotropic texture functions, providing explicit derivatives:

    - * + * *
    
          * texture1DGradARB(
          *     sampler1D sampler,
    @@ -3611,7 +3612,7 @@ public final class GLCapabilities {
          * textureCubeGradARB(
          *     samplerCube sampler,
          *     vec3 P, vec3 dPdx, vec3 dPdy);
    -     * 
    +     *
          * shadow1DGradARB(
          *     sampler1DShadow sampler,
          *     vec3 P, float dPdx, float dPdy);
    @@ -3624,7 +3625,7 @@ public final class GLCapabilities {
          * shadow2DProjGradARB(
          *     sampler2DShadow sampler,
          *     vec4 P, vec2 dPdx, vec2 dPdy);
    -     * 
    +     *
          * texture2DRectGradARB(
          *     sampler2DRect sampler,
          *     vec2 P, vec2 dPdx, vec2 dPdy);
    @@ -3634,43 +3635,43 @@ public final class GLCapabilities {
          * texture2DRectProjGradARB(
          *     sampler2DRect sampler,
          *     vec4 P, vec2 dPdx, vec2 dPdy);
    -     * 
    +     *
          * shadow2DRectGradARB(
          *     sampler2DRectShadow sampler,
          *     vec3 P, vec2 dPdx, vec2 dPdy);
          * shadow2DRectProjGradARB(
          *     sampler2DRectShadow sampler,
          *     vec4 P, vec2 dPdx, vec2 dPdy);
    - * + * *

    are added to the built-in functions for vertex shaders and fragment shaders.

    - * + * *

    Requires {@link #GL_ARB_shader_objects ARB_shader_objects}. Promoted to core in {@link GL30 OpenGL 3.0}.

    */ public final boolean GL_ARB_shader_texture_lod; /** - * When true, the ARB_shader_viewport_layer_array extension is supported. - * + * When true, the ARB_shader_viewport_layer_array extension is supported. + * *

    The gl_ViewportIndex and gl_Layer built-in variables were introduced by the in OpenGL 4.1. These variables are available in un-extended OpenGL only to * the geometry shader. When written in the geometry shader, they cause geometry to be directed to one of an array of several independent viewport * rectangles or framebuffer attachment layers, respectively.

    - * + * *

    In order to use any viewport or attachment layer other than zero, a geometry shader must be present. Geometry shaders introduce processing overhead and * potential performance issues. The AMD_vertex_shader_layer and AMD_vertex_shader_viewport_index extensions allowed the gl_Layer and gl_ViewportIndex * outputs to be written directly from the vertex shader with no geometry shader present.

    - * + * *

    This extension effectively merges the AMD_vertex_shader_layer and AMD_vertex_shader_viewport_index extensions together and extends them further to * allow both outputs to be written from tessellation evaluation shaders.

    - * + * *

    Requires {@link GL41 OpenGL 4.1}.

    */ public final boolean GL_ARB_shader_viewport_layer_array; /** When true, {@link ARBShadingLanguage100} is supported. */ public final boolean GL_ARB_shading_language_100; /** - * When true, the ARB_shading_language_420pack extension is supported. - * + * When true, the ARB_shading_language_420pack extension is supported. + * *

    This is a language feature only extension formed from changes made to version 4.20 of GLSL. It includes:

    - * + * *
      *
    • Add line-continuation using '', as in C++.
    • *
    • Change from ASCII to UTF-8 for the language character set and also allow any characters inside comments.
    • @@ -3687,27 +3688,27 @@ public final class GLCapabilities { *
    • Allow swizzle operations on scalars.
    • *
    • Built-in constants for {@code gl_MinProgramTexelOffset} and {@code gl_MaxProgramTexelOffset}.
    • *
    - * + * *

    Requires GLSL 1.30. Requires GLSL 1.40 for uniform block bindings. Promoted to core in {@link GL42 OpenGL 4.2}.

    */ public final boolean GL_ARB_shading_language_420pack; /** When true, {@link ARBShadingLanguageInclude} is supported. */ public final boolean GL_ARB_shading_language_include; /** - * When true, the ARB_shading_language_packing extension is supported. - * + * When true, the ARB_shading_language_packing extension is supported. + * *

    This extension provides the GLSL built-in functions to convert a 32-bit unsigned integer holding a pair of 16-bit floating-point values to or from a * two-component floating-point vector (vec2).

    - * + * *

    This mechanism allows GLSL shaders to read and write 16-bit floating-point encodings (via 32-bit unsigned integers) without introducing a full set of * 16-bit floating-point data types.

    - * + * *

    This extension also adds the GLSL built-in packing functions included in GLSL version 4.00 and the ARB_gpu_shader5 extension which pack and unpack * vectors of small fixed-point data types into a larger scalar. By putting these packing functions in this separate extension it allows implementations to * provide these functions in hardware that supports them independent of the other {@link #GL_ARB_gpu_shader5 ARB_gpu_shader5} features.

    - * + * *

    In addition to the packing functions from ARB_gpu_shader5 this extension also adds the missing {@code [un]packSnorm2x16} for completeness.

    - * + * *

    Promoted to core in {@link GL42 OpenGL 4.2}.

    */ public final boolean GL_ARB_shading_language_packing; @@ -3720,10 +3721,10 @@ public final class GLCapabilities { /** When true, {@link ARBSparseTexture} is supported. */ public final boolean GL_ARB_sparse_texture; /** - * When true, the ARB_sparse_texture2 extension is supported. - * + * When true, the ARB_sparse_texture2 extension is supported. + * *

    This extension builds on the {@link ARBSparseTexture ARB_sparse_texture} extension, providing the following new functionality:

    - * + * *
      *
    • New built-in GLSL texture lookup and image load functions are provided that return information on whether the texels accessed for the texture * lookup accessed uncommitted texture memory.
    • @@ -3738,20 +3739,20 @@ public final class GLCapabilities { *
    • Support for creating sparse multisample and multisample array textures is added. However, the virtual page sizes for such textures remain fully * implementation-dependent.
    • *
    - * + * *

    Requires {@link ARBSparseTexture ARB_sparse_texture}

    */ public final boolean GL_ARB_sparse_texture2; /** - * When true, the ARB_sparse_texture_clamp extension is supported. - * + * When true, the ARB_sparse_texture_clamp extension is supported. + * *

    This extension builds on the {@link #GL_ARB_sparse_texture2 ARB_sparse_texture2} extension, providing the following new functionality:

    - * + * *

    New built-in GLSL texture lookup functions are provided that specify a minimum level of detail to use for lookups where the level of detail is * computed automatically. This allows shaders to avoid accessing unpopulated portions of high-resolution levels of detail when it knows that the memory * accessed is unpopulated, either from a priori knowledge or from feedback provided by the return value of previously executed "sparse" texture lookup * functions.

    - * + * *

    Requires {@link #GL_ARB_sparse_texture2 ARB_sparse_texture2}

    */ public final boolean GL_ARB_sparse_texture_clamp; @@ -3770,11 +3771,11 @@ public final class GLCapabilities { /** When true, {@link ARBTextureBufferObject} is supported. */ public final boolean GL_ARB_texture_buffer_object; /** - * When true, the ARB_texture_buffer_object_rgb32 extension is supported. - * + * When true, the ARB_texture_buffer_object_rgb32 extension is supported. + * *

    This extension adds three new buffer texture formats - RGB32F, RGB32I, and RGB32UI. This partially addresses one of the limitations of buffer textures * in the original {@link #GL_EXT_texture_buffer_object EXT_texture_buffer_object} extension and in {@link GL31 OpenGL 3.1}, which provide no support for three-component formats.

    - * + * *

    Promoted to core in {@link GL40 OpenGL 4.0}.

    */ public final boolean GL_ARB_texture_buffer_object_rgb32; @@ -3791,22 +3792,22 @@ public final class GLCapabilities { /** When true, {@link ARBTextureCubeMapArray} is supported. */ public final boolean GL_ARB_texture_cube_map_array; /** - * When true, the ARB_texture_env_add extension is supported. - * + * When true, the ARB_texture_env_add extension is supported. + * *

    This extension adds a new texture environment function: ADD.

    - * + * *

    Promoted to core in {@link GL13 OpenGL 1.3}.

    */ public final boolean GL_ARB_texture_env_add; /** When true, {@link ARBTextureEnvCombine} is supported. */ public final boolean GL_ARB_texture_env_combine; /** - * When true, the ARB_texture_env_crossbar extension is supported. - * + * When true, the ARB_texture_env_crossbar extension is supported. + * *

    This extension adds the capability to use the texture color from other texture units as sources to the {@link ARBTextureEnvCombine#GL_COMBINE_ARB COMBINE_ARB} environment * function. The {@link ARBTextureEnvCombine ARB_texture_env_combine} extension defined texture environment functions which could use the color from the current texture unit * as a source. This extension adds the ability to use the color from any texture unit as a source.

    - * + * *

    Requires {@link #GL_ARB_multitexture ARB_multitexture} and {@link ARBTextureEnvCombine ARB_texture_env_combine}. Promoted to core in {@link GL14 OpenGL 1.4}.

    */ public final boolean GL_ARB_texture_env_crossbar; @@ -3827,38 +3828,38 @@ public final class GLCapabilities { /** When true, {@link ARBTextureMultisample} is supported. */ public final boolean GL_ARB_texture_multisample; /** - * When true, the ARB_texture_non_power_of_two extension is supported. - * + * When true, the ARB_texture_non_power_of_two extension is supported. + * *

    Conventional OpenGL texturing is limited to images with power-of-two dimensions and an optional 1-texel border. This extension relaxes the size * restrictions for the 1D, 2D, cube map, and 3D texture targets.

    - * + * *

    Promoted to core in {@link GL20 OpenGL 2.0}.

    */ public final boolean GL_ARB_texture_non_power_of_two; /** - * When true, the ARB_texture_query_levels extension is supported. - * + * When true, the ARB_texture_query_levels extension is supported. + * *

    This extension provides a new set of texture functions ({@code textureQueryLevels}) in the OpenGL Shading Language that exposes the number of accessible * mipmap levels in the texture associated with a GLSL sampler variable. The set of accessible levels includes all the levels of the texture defined either * through TexImage*, TexStorage*, or TextureView* ({@link ARBTextureView ARB_texture_view}) APIs that are not below the {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL} or above the * {@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL} parameters. For textures defined with TexImage*, the set of resident levels is somewhat implementation-dependent. For fully * defined results, applications should use TexStorage*/TextureView unless the texture has a full mipmap chain and is used with a mipmapped minification * filter.

    - * + * *

    These functions means that shaders are not required to manually recompute, approximate, or maintain a uniform holding a pre-computed level count, since * the true level count is already available to the implementation. This value can be used to avoid black or leaking pixel artifacts for rendering methods * which are using texture images as memory pages (eg: virtual textures); methods that can't only rely on the fixed pipeline texture functions which take * advantage of {@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL} for their sampling.

    - * + * *

    Requires {@link GL30 OpenGL 3.0} and GLSL 1.30. Promoted to core in {@link GL43 OpenGL 4.3}.

    */ public final boolean GL_ARB_texture_query_levels; /** - * When true, the ARB_texture_query_lod extension is supported. - * + * When true, the ARB_texture_query_lod extension is supported. + * *

    This extension provides a new set of fragment shader texture functions ({@code textureLOD}) that return the results of automatic level-of-detail * computations that would be performed if a texture lookup were performed.

    - * + * *

    Requires {@link GL20 OpenGL 2.0}, {@link #GL_EXT_gpu_shader4 EXT_gpu_shader4}, {@link #GL_EXT_texture_array EXT_texture_array} and GLSL 1.30. Promoted to core in {@link GL40 OpenGL 4.0}.

    */ public final boolean GL_ARB_texture_query_lod; @@ -3869,11 +3870,11 @@ public final class GLCapabilities { /** When true, {@link ARBTextureRGB10_A2UI} is supported. */ public final boolean GL_ARB_texture_rgb10_a2ui; /** - * When true, the ARB_texture_stencil8 extension is supported. - * + * When true, the ARB_texture_stencil8 extension is supported. + * *

    This extension accepts {@link GL30#GL_STENCIL_INDEX8 STENCIL_INDEX8} as a texture internal format, and adds STENCIL_INDEX8 to the required internal format list. This removes the * need to use renderbuffers if a stencil-only format is desired.

    - * + * *

    Promoted to core in {@link GL44 OpenGL 4.4}.

    */ public final boolean GL_ARB_texture_stencil8; @@ -3916,13 +3917,13 @@ public final class GLCapabilities { /** When true, {@link ARBVertexShader} is supported. */ public final boolean GL_ARB_vertex_shader; /** - * When true, the ARB_vertex_type_10f_11f_11f_rev extension is supported. - * + * When true, the ARB_vertex_type_10f_11f_11f_rev extension is supported. + * *

    This extension a new vertex attribute data format: a packed 11.11.10 unsigned float vertex data format. This vertex data format can be used to describe * a compressed 3 component stream of values that can be represented by 10- or 11-bit unsigned floating point values.

    - * + * *

    The {@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV} vertex attribute type is equivalent to the {@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F} texture internal format.

    - * + * *

    Requires {@link GL30 OpenGL 3.0} and {@link ARBVertexType2_10_10_10_REV ARB_vertex_type_2_10_10_10_rev}. Promoted to core in {@link GL44 OpenGL 4.4}.

    */ public final boolean GL_ARB_vertex_type_10f_11f_11f_rev; @@ -3934,7 +3935,7 @@ public final class GLCapabilities { public final boolean GL_ARB_window_pos; /** When true, {@link ATIMeminfo} is supported. */ public final boolean GL_ATI_meminfo; - /** When true, the ATI_shader_texture_lod extension is supported. */ + /** When true, the ATI_shader_texture_lod extension is supported. */ public final boolean GL_ATI_shader_texture_lod; /** When true, {@link ATITextureCompression3DC} is supported. */ public final boolean GL_ATI_texture_compression_3dc; @@ -3975,10 +3976,10 @@ public final class GLCapabilities { /** When true, {@link EXTEGLImageStorage} is supported. */ public final boolean GL_EXT_EGL_image_storage; /** - * When true, the EXT_EGL_sync extension is supported. - * + * When true, the EXT_EGL_sync extension is supported. + * *

    This extension extends {@code EGL_KHR_fence_sync} with client API support for OpenGL (compatibility or core profiles) as an EXT extension.

    - * + * *

    The {@code "GL_EXT_EGL_sync"} string indicates that a fence sync object can be created in association with a fence command placed in the command stream * of a bound OpenGL context.

    */ @@ -3987,8 +3988,6 @@ public final class GLCapabilities { public final boolean GL_EXT_external_buffer; /** When true, {@link EXTFramebufferBlit} is supported. */ public final boolean GL_EXT_framebuffer_blit; - /** When true, {@link EXTFramebufferBlitLayers} is supported. */ - public final boolean GL_EXT_framebuffer_blit_layers; /** When true, {@link EXTFramebufferMultisample} is supported. */ public final boolean GL_EXT_framebuffer_multisample; /** When true, {@link EXTFramebufferMultisampleBlitScaled} is supported. */ @@ -4010,51 +4009,51 @@ public final class GLCapabilities { /** When true, {@link EXTMemoryObjectWin32} is supported. */ public final boolean GL_EXT_memory_object_win32; /** - * When true, the EXT_multiview_tessellation_geometry_shader extension is supported. - * + * When true, the EXT_multiview_tessellation_geometry_shader extension is supported. + * *

    This extension removes one of the limitations of the {@code OVR_multiview} extension by allowing the use of tessellation control, tessellation * evaluation, and geometry shaders during multiview rendering. {@code OVR_multiview} by itself forbids the use of any of these shader types.

    - * + * *

    When using tessellation control, tessellation evaluation, and geometry shaders during multiview rendering, any such shader must use the * "{@code num_views}" layout qualifier provided by the matching shading language extension to specify a view count. The view count specified in these * shaders must match the count specified in the vertex shader. Additionally, the shading language extension allows these shaders to use the * {@code gl_ViewID_OVR} built-in to handle tessellation or geometry shader processing differently for each view.

    - * + * *

    {@code OVR_multiview2} extends {@code OVR_multiview} by allowing view-dependent values for any vertex attributes instead of just the position. This new * extension does not imply the availability of {@code OVR_multiview2}, but if both are available, view-dependent values for any vertex attributes are * also allowed in tessellation control, tessellation evaluation, and geometry shaders.

    - * + * *

    Requires {@link GL40 OpenGL 4.0} and {@link OVRMultiview OVR_multiview}.

    */ public final boolean GL_EXT_multiview_tessellation_geometry_shader; /** - * When true, the EXT_multiview_texture_multisample extension is supported. - * + * When true, the EXT_multiview_texture_multisample extension is supported. + * *

    This extension removes one of the limitations of the {@code OVR_multiview} extension by allowing the use of multisample textures during multiview * rendering.

    - * + * *

    This is one of two extensions that allow multisampling when using {@code OVR_multiview}. Each supports one of the two different approaches to * multisampling in OpenGL:

    - * + * *

    Core OpenGL has explicit support for multisample texture types, such as {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}. Applications can access the values of individual * samples and can explicitly "resolve" the samples of each pixel down to a single color.

    - * + * *

    The extension {@code EXT_multisampled_render_to_texture} provides support for multisampled rendering to non-multisample texture types, such as * {@link GL11#GL_TEXTURE_2D TEXTURE_2D}. The individual samples for each pixel are maintained internally by the implementation and can not be accessed directly by applications. * These samples are eventually resolved implicitly to a single color for each pixel.

    - * + * *

    This extension supports the first multisampling style with multiview rendering; the {@code OVR_multiview_multisampled_render_to_texture} extension * supports the second style. Note that support for one of these multiview extensions does not imply support for the other.

    - * + * *

    Requires {@link GL40 OpenGL 4.0} and {@link OVRMultiview OVR_multiview}.

    */ public final boolean GL_EXT_multiview_texture_multisample; /** - * When true, the EXT_multiview_timer_query extension is supported. - * + * When true, the EXT_multiview_timer_query extension is supported. + * *

    This extension removes one of the limitations of the {@code OVR_multiview} extension by allowing the use of timer queries during multiview rendering. * {@code OVR_multiview} does not specify defined behavior for such usage.

    - * + * *

    Requires {@link GL40 OpenGL 4.0} and {@link OVRMultiview OVR_multiview}.

    */ public final boolean GL_EXT_multiview_timer_query; @@ -4069,16 +4068,16 @@ public final class GLCapabilities { /** When true, {@link EXTPolygonOffsetClamp} is supported. */ public final boolean GL_EXT_polygon_offset_clamp; /** - * When true, the EXT_post_depth_coverage extension is supported. - * + * When true, the EXT_post_depth_coverage extension is supported. + * *

    This extension allows the fragment shader to control whether values in {@code gl_SampleMaskIn[]} reflect the coverage after application of the early * depth and stencil tests. This feature can be enabled with the following layout qualifier in the fragment shader:

    - * + * *
    
          * layout(post_depth_coverage) in;
    - * + * *

    To use this feature, early fragment tests must also be enabled in the fragment shader via:

    - * + * *
    
          * layout(early_fragment_tests) in;
    */ @@ -4102,8 +4101,8 @@ public final class GLCapabilities { /** When true, {@link EXTShaderFramebufferFetchNonCoherent} is supported. */ public final boolean GL_EXT_shader_framebuffer_fetch_non_coherent; /** - * When true, the EXT_shader_image_load_formatted extension is supported. - * + * When true, the EXT_shader_image_load_formatted extension is supported. + * *

    {@link ARBShaderImageLoadStore ARB_shader_image_load_store} (and OpenGL 4.2) added support for random access load and store from/to texture images, but due to hardware * limitations, loads were required to declare the image format in the shader source. This extension relaxes that requirement, and the return values from * {@code imageLoad} can be format-converted based on the format of the image binding.

    @@ -4112,75 +4111,48 @@ public final class GLCapabilities { /** When true, {@link EXTShaderImageLoadStore} is supported. */ public final boolean GL_EXT_shader_image_load_store; /** - * When true, the EXT_shader_integer_mix extension is supported. - * + * When true, the EXT_shader_integer_mix extension is supported. + * *

    GLSL 1.30 (and GLSL ES 3.00) expanded the mix() built-in function to operate on a boolean third argument that does not interpolate but selects. This * extension extends mix() to select between int, uint, and bool components.

    - * + * *

    Requires {@link GL30 OpenGL 3.0}.

    */ public final boolean GL_EXT_shader_integer_mix; /** - * When true, the EXT_shader_samples_identical extension is supported. - * - *

    Multisampled antialiasing has become a common method for improving the quality of rendered images. Multisampling differs from supersampling in that the - * color of a primitive that covers all or part of a pixel is resolved once, regardless of the number of samples covered. If a large polygon is rendered, - * the colors of all samples in each interior pixel will be the same. This suggests a simple compression scheme that can reduce the necessary memory - * bandwidth requirements. In one such scheme, each sample is stored in a separate slice of the multisample surface. An additional multisample control - * surface (MCS) contains a mapping from pixel samples to slices.

    - * - *

    If all the values stored in the MCS for a particular pixel are the same, then all the samples have the same value. Applications can take advantage of - * this information to reduce the bandwidth of reading multisample textures. A custom multisample resolve filter could optimize resolving pixels where - * every sample is identical by reading the color once.

    - * - *
    
    -     * color = texelFetch(sampler, coordinate, 0);
    -     * if (!textureSamplesIdenticalEXT(sampler, coordinate)) {
    -     *     for (int i = 1; i < MAX_SAMPLES; i++) {
    -     *         vec4 c = texelFetch(sampler, coordinate, i);
    -     * 
    -     *         //... accumulate c into color
    -     * 
    -     *     }
    -     * }
    - * - *

    Requires {@link GL32 OpenGL 3.2} or {@link ARBTextureMultisample ARB_texture_multisample}.

    - */ - public final boolean GL_EXT_shader_samples_identical; - /** - * When true, the EXT_shadow_funcs extension is supported. - * + * When true, the EXT_shadow_funcs extension is supported. + * *

    This extension generalizes the {@link #GL_ARB_shadow ARB_shadow} extension to support all eight binary texture comparison functions rather than just {@link GL11#GL_LEQUAL LEQUAL} and * {@link GL11#GL_GEQUAL GEQUAL}.

    - * + * *

    Requires {@link #GL_ARB_depth_texture ARB_depth_texture} and {@link #GL_ARB_shadow ARB_shadow}.

    */ public final boolean GL_EXT_shadow_funcs; /** When true, {@link EXTSharedTexturePalette} is supported. */ public final boolean GL_EXT_shared_texture_palette; /** - * When true, the EXT_sparse_texture2 extension is supported. - * + * When true, the EXT_sparse_texture2 extension is supported. + * *

    This extension builds on the {@link ARBSparseTexture ARB_sparse_texture} extension, providing the following new functionality:

    - * + * *
      *
    • New built-in GLSL texture lookup and image load functions are provided that return information on whether the texels accessed for the texture * lookup accessed uncommitted texture memory. - * + * *

      New built-in GLSL texture lookup functions are provided that specify a minimum level of detail to use for lookups where the level of detail is * computed automatically. This allows shaders to avoid accessing unpopulated portions of high-resolution levels of detail when it knows that the * memory accessed is unpopulated, either from a priori knowledge or from feedback provided by the return value of previously executed "sparse" * texture lookup functions.

      - * + * *

      Reads of uncommitted texture memory will act as though such memory were filled with zeroes; previously, the values returned by reads were undefined.

      - * + * *

      Standard implementation-independent virtual page sizes for internal formats required to be supported with sparse textures. These standard sizes can * be requested by leaving {@link ARBSparseTexture#GL_VIRTUAL_PAGE_SIZE_INDEX_ARB VIRTUAL_PAGE_SIZE_INDEX_ARB} at its initial value (0).

      - * + * *

      Support for creating sparse multisample and multisample array textures is added. However, the virtual page sizes for such textures remain fully * implementation-dependent.

    • *
    - * + * *

    Requires {@link ARBSparseTexture ARB_sparse_texture}.

    */ public final boolean GL_EXT_sparse_texture2; @@ -4210,12 +4182,12 @@ public final class GLCapabilities { public final boolean GL_EXT_texture_mirror_clamp; /** * This extension adds support for various shadow sampler types with texture functions having interactions with the LOD of texture lookups. - * + * *

    Modern shading languages support LOD queries for shadow sampler types, but until now the OpenGL Shading Language Specification has excluded multiple * texture function overloads involving LOD calculations with various shadow samplers. Shading languages for other APIs do support the equivalent * LOD-based texture sampling functions for these types which has made porting between those shading languages to GLSL cumbersome and has required the * usage of sub-optimal workarounds.

    - * + * *

    Requires {@link GL20 OpenGL 2.0} and {@link EXTGPUShader4 EXT_gpu_shader4} or equivalent functionality.

    */ public final boolean GL_EXT_texture_shadow_lod; @@ -4240,42 +4212,42 @@ public final class GLCapabilities { /** When true, {@link EXTTransformFeedback} is supported. */ public final boolean GL_EXT_transform_feedback; /** - * When true, the EXT_vertex_array_bgra extension is supported. - * + * When true, the EXT_vertex_array_bgra extension is supported. + * *

    This extension provides a single new component format for vertex arrays to read 4-component unsigned byte vertex attributes with a BGRA component * ordering.

    - * + * *

    OpenGL expects vertex arrays containing 4 unsigned bytes per element to be in the RGBA, STRQ, or XYZW order (reading components left-to-right in their * lower address to higher address order). Essentially the order the components appear in memory is the order the components appear in the resulting * vertex attribute vector.

    - * + * *

    However Direct3D has color (diffuse and specular) vertex arrays containing 4 unsigned bytes per element that are in a BGRA order (again reading * components left-to-right in their lower address to higher address order). Direct3D calls this "ARGB" reading the components in the opposite order * (reading components left-to-right in their higher address to lower address order). This ordering is generalized in the DirectX 10 by the * DXGI_FORMAT_B8G8R8A8_UNORM format.

    - * + * *

    For an OpenGL application to source color data from a vertex buffer formatted for Direct3D's color array format conventions, the application is forced * to either:

    - * + * *
      *
    1. Rely on a vertex program or shader to swizzle the color components from the BGRA to conventional RGBA order.
    2. *
    3. Re-order the color data components in the vertex buffer from Direct3D's native BGRA order to OpenGL's native RGBA order.
    4. *
    - * + * *

    Neither option is entirely satisfactory.

    - * + * *

    Option 1 means vertex shaders have to be re-written to source colors differently. If the same vertex shader is used with vertex arrays configured to * source the color as 4 floating-point color components, the swizzle for BGRA colors stored as 4 unsigned bytes is no longer appropriate. The shader's * swizzling of colors becomes dependent on the type and number of color components. Ideally the vertex shader should be independent from the format and * component ordering of the data it sources.

    - * + * *

    Option 2 is expensive because vertex buffers may have to be reformatted prior to use. OpenGL treats the memory for vertex arrays (whether client-side * memory or buffer objects) as essentially untyped memory and vertex arrays can be stored separately, interleaved, or even interwoven (where multiple * arrays overlap with differing strides and formats).

    - * + * *

    Rather than force a re-ordering of either vertex array components in memory or a vertex array format-dependent re-ordering of vertex shader inputs, * OpenGL can simply provide a vertex array format that matches the Direct3D color component ordering.

    - * + * *

    This approach mimics that of the EXT_bgra extension for pixel and texel formats except for vertex instead of image data.

    */ public final boolean GL_EXT_vertex_array_bgra; @@ -4296,11 +4268,11 @@ public final class GLCapabilities { /** When true, {@link INTELConservativeRasterization} is supported. */ public final boolean GL_INTEL_conservative_rasterization; /** - * When true, the INTEL_fragment_shader_ordering extension is supported. - * + * When true, the INTEL_fragment_shader_ordering extension is supported. + * *

    Graphics devices may execute in parallel fragment shaders referring to the same window xy coordinates. Framebuffer writes are guaranteed to be * processed in primitive rasterization order, but there is no order guarantee for other instructions and image or buffer object accesses in particular.

    - * + * *

    The extension introduces a new GLSL built-in function, beginFragmentShaderOrderingINTEL(), which blocks execution of a fragment shader invocation until * invocations from previous primitives that map to the same xy window coordinates (and same sample when per-sample shading is active) complete their * execution. All memory transactions from previous fragment shader invocations are made visible to the fragment shader invocation that called @@ -4314,14 +4286,14 @@ public final class GLCapabilities { /** When true, {@link INTELPerformanceQuery} is supported. */ public final boolean GL_INTEL_performance_query; /** - * When true, the INTEL_shader_integer_functions2 extension is supported. - * + * When true, the INTEL_shader_integer_functions2 extension is supported. + * *

    OpenCL and other GPU programming environments provides a number of useful functions operating on integer data. Many of these functions are supported by * specialized instructions various GPUs. Correct GLSL implementations for some of these functions are non-trivial. Recognizing open-coded versions of * these functions is often impractical. As a result, potential performance improvements go unrealized.

    - * + * *

    This extension makes available a number of functions that have specialized instruction support on Intel GPUs.

    - * + * *

    Requires GLSL 1.30 or EXT_gpu_shader4.

    */ public final boolean GL_INTEL_shader_integer_functions2; @@ -4338,14 +4310,14 @@ public final class GLCapabilities { /** When true, {@link KHRParallelShaderCompile} is supported. */ public final boolean GL_KHR_parallel_shader_compile; /** - * When true, the KHR_robust_buffer_access_behavior extension is supported. - * + * When true, the KHR_robust_buffer_access_behavior extension is supported. + * *

    This extension specifies the behavior of out-of-bounds buffer and array accesses. This is an improvement over the existing {@link #GL_KHR_robustness KHR_robustness} * extension which states that the application should not crash, but that behavior is otherwise undefined. This extension specifies the access protection * provided by the GL to ensure that out-of-bounds accesses cannot read from or write to data not owned by the application. All accesses are contained * within the buffer object and program area they reference. These additional robustness guarantees apply to contexts created with the robust access flag * set.

    - * + * *

    Requires {@link GL32 OpenGL 3.2} and {@link #GL_KHR_robustness KHR_robustness}.

    */ public final boolean GL_KHR_robust_buffer_access_behavior; @@ -4354,23 +4326,23 @@ public final class GLCapabilities { /** When true, {@link KHRShaderSubgroup} is supported. */ public final boolean GL_KHR_shader_subgroup; /** - * When true, the KHR_texture_compression_astc_hdr extension is supported. - * + * When true, the KHR_texture_compression_astc_hdr extension is supported. + * *

    This extension corresponds to the ASTC HDR Profile, see {@link KHRTextureCompressionASTCLDR KHR_texture_compression_astc_ldr} for details.

    */ public final boolean GL_KHR_texture_compression_astc_hdr; /** When true, {@link KHRTextureCompressionASTCLDR} is supported. */ public final boolean GL_KHR_texture_compression_astc_ldr; /** - * When true, the KHR_texture_compression_astc_sliced_3d extension is supported. - * + * When true, the KHR_texture_compression_astc_sliced_3d extension is supported. + * *

    Adaptive Scalable Texture Compression (ASTC) is a new texture compression technology that offers unprecendented flexibility, while producing better or * comparable results than existing texture compressions at all bit rates. It includes support for 2D and slice-based 3D textures, with low and high * dynamic range, at bitrates from below 1 bit/pixel up to 8 bits/pixel in fine steps.

    - * + * *

    This extension extends the functionality of {@link KHRTextureCompressionASTCLDR KHR_texture_compression_astc_ldr} to include slice-based 3D textures for textures using the LDR * profile in the same way as the HDR profile allows slice-based 3D textures.

    - * + * *

    Requires {@link KHRTextureCompressionASTCLDR KHR_texture_compression_astc_ldr}.

    */ public final boolean GL_KHR_texture_compression_astc_sliced_3d; @@ -4381,12 +4353,12 @@ public final class GLCapabilities { /** When true, {@link MESAFramebufferSwapXY} is supported. */ public final boolean GL_MESA_framebuffer_swap_xy; /** - * When true, the MESA_tile_raster_order extension is supported. - * + * When true, the MESA_tile_raster_order extension is supported. + * *

    This extension extends the sampling-from-the-framebuffer behavior provided by {@code GL_ARB_texture_barrier} to allow setting the rasterization order * of the scene, so that overlapping blits can be implemented. This can be used for scrolling or window movement within in 2D scenes, without first * copying to a temporary.

    - * + * *

    Requires {@link ARBTextureBarrier ARB_texture_barrier} or {@link NVTextureBarrier NV_texture_barrier}.

    */ public final boolean GL_MESA_tile_raster_order; @@ -4404,22 +4376,22 @@ public final class GLCapabilities { public final boolean GL_NV_blend_equation_advanced_coherent; /** When true, {@link NVBlendMinmaxFactor} is supported. */ public final boolean GL_NV_blend_minmax_factor; - /** When true, the NV_blend_square extension is supported. */ + /** When true, the NV_blend_square extension is supported. */ public final boolean GL_NV_blend_square; /** When true, {@link NVClipSpaceWScaling} is supported. */ public final boolean GL_NV_clip_space_w_scaling; /** When true, {@link NVCommandList} is supported. */ public final boolean GL_NV_command_list; /** - * When true, the NV_compute_shader_derivatives extension is supported. - * + * When true, the NV_compute_shader_derivatives extension is supported. + * *

    This extension adds OpenGL API support for the OpenGL Shading Language (GLSL) extension {@code "NV_compute_shader_derivatives"}.

    - * + * *

    That extension, when enabled, allows applications to use derivatives in compute shaders. It adds compute shader support for explicit derivative * built-in functions like {@code dFdx()}, automatic derivative computation in texture lookup functions like {@code texture()}, use of the optional LOD * bias parameter to adjust the computed level of detail values in texture lookup functions, and the texture level of detail query function * {@code textureQueryLod()}.

    - * + * *

    Requires {@link GL45 OpenGL 4.5}.

    */ public final boolean GL_NV_compute_shader_derivatives; @@ -4434,12 +4406,12 @@ public final class GLCapabilities { /** When true, {@link NVConservativeRasterPreSnapTriangles} is supported. */ public final boolean GL_NV_conservative_raster_pre_snap_triangles; /** - * When true, the NV_conservative_raster_underestimation extension is supported. - * + * When true, the NV_conservative_raster_underestimation extension is supported. + * *

    The extension {@link NVConservativeRaster NV_conservative_raster} provides a new rasterization mode known as "Overestimated Conservative Rasterization", where any pixel * that is partially covered, even if no sample location is covered, is treated as fully covered and a corresponding fragment will be shaded. There is * also an "Underestimated Conservative Rasterization" variant, where only the pixels that are completely covered by the primitive are rasterized.

    - * + * *

    This extension provides the underestimated conservative rasterization information for each fragment in the fragment shader through a new built-in * {@code gl_FragFullyCoveredNV}.

    */ @@ -4458,7 +4430,7 @@ public final class GLCapabilities { public final boolean GL_NV_draw_texture; /** When true, {@link NVDrawVulkanImage} is supported. */ public final boolean GL_NV_draw_vulkan_image; - /** When true, the NV_ES3_1_compatibility extension is supported. */ + /** When true, the NV_ES3_1_compatibility extension is supported. */ public final boolean GL_NV_ES3_1_compatibility; /** When true, {@link NVExplicitMultisample} is supported. */ public final boolean GL_NV_explicit_multisample; @@ -4472,55 +4444,55 @@ public final class GLCapabilities { public final boolean GL_NV_fog_distance; /** When true, {@link NVFragmentCoverageToColor} is supported. */ public final boolean GL_NV_fragment_coverage_to_color; - /** When true, the NV_fragment_program4 extension is supported. */ + /** When true, the NV_fragment_program4 extension is supported. */ public final boolean GL_NV_fragment_program4; - /** When true, the NV_fragment_program_option extension is supported. */ + /** When true, the NV_fragment_program_option extension is supported. */ public final boolean GL_NV_fragment_program_option; /** - * When true, the NV_fragment_shader_barycentric extension is supported. - * + * When true, the NV_fragment_shader_barycentric extension is supported. + * *

    This extension advertises OpenGL support for the OpenGL Shading Language (GLSL) extension {@code "NV_fragment_shader_barycentric"}, which provides * fragment shader built-in variables holding barycentric weight vectors that identify the location of the fragment within its primitive. Additionally, * the GLSL extension allows fragment the ability to read raw attribute values for each of the vertices of the primitive that produced the fragment.

    - * + * *

    Requires {@link GL45 OpenGL 4.5}.

    */ public final boolean GL_NV_fragment_shader_barycentric; /** - * When true, the NV_fragment_shader_interlock extension is supported. - * + * When true, the NV_fragment_shader_interlock extension is supported. + * *

    In unextended OpenGL 4.3, applications may produce a large number of fragment shader invocations that perform loads and stores to memory using image * uniforms, atomic counter uniforms, buffer variables, or pointers. The order in which loads and stores to common addresses are performed by different * fragment shader invocations is largely undefined. For algorithms that use shader writes and touch the same pixels more than once, one or more of the * following techniques may be required to ensure proper execution ordering:

    - * + * *
      *
    • inserting Finish or WaitSync commands to drain the pipeline between different "passes" or "layers";
    • *
    • using only atomic memory operations to write to shader memory (which may be relatively slow and limits how memory may be updated); or
    • *
    • injecting spin loops into shaders to prevent multiple shader invocations from touching the same memory concurrently.
    • *
    - * + * *

    This extension provides new GLSL built-in functions beginInvocationInterlockNV() and endInvocationInterlockNV() that delimit a critical section of * fragment shader code. For pairs of shader invocations with "overlapping" coverage in a given pixel, the OpenGL implementation will guarantee that the * critical section of the fragment shader will be executed for only one fragment at a time.

    - * + * *

    There are four different interlock modes supported by this extension, which are identified by layout qualifiers. The qualifiers * "pixel_interlock_ordered" and "pixel_interlock_unordered" provides mutual exclusion in the critical section for any pair of fragments corresponding to * the same pixel. When using multisampling, the qualifiers "sample_interlock_ordered" and "sample_interlock_unordered" only provide mutual exclusion for * pairs of fragments that both cover at least one common sample in the same pixel; these are recommended for performance if shaders use per-sample data * structures.

    - * + * *

    Additionally, when the "pixel_interlock_ordered" or "sample_interlock_ordered" layout qualifier is used, the interlock also guarantees that the * critical section for multiple shader invocations with "overlapping" coverage will be executed in the order in which the primitives were processed by * the GL. Such a guarantee is useful for applications like blending in the fragment shader, where an application requires that fragment values to be * composited in the framebuffer in primitive order.

    - * + * *

    This extension can be useful for algorithms that need to access per-pixel data structures via shader loads and stores. Such algorithms using this * extension can access such data structures in the critical section without worrying about other invocations for the same pixel accessing the data * structures concurrently. Additionally, the ordering guarantees are useful for cases where the API ordering of fragments is meaningful. For example, * applications may be able to execute programmable blending operations in the fragment shader, where the destination buffer is read via image loads and * the final value is written via image stores.

    - * + * *

    Requires {@link GL43 OpenGL 4.3} and GLSL 4.30.

    */ public final boolean GL_NV_fragment_shader_interlock; @@ -4529,23 +4501,23 @@ public final class GLCapabilities { /** When true, {@link NVFramebufferMultisampleCoverage} is supported. */ public final boolean GL_NV_framebuffer_multisample_coverage; /** - * When true, the NV_geometry_shader4 extension is supported. - * + * When true, the NV_geometry_shader4 extension is supported. + * *

    This extension builds upon the {@link #GL_EXT_geometry_shader4 EXT_geometry_shader4} specification to provide two additional capabilities:

    - * + * *
      *
    • Support for QUADS, QUAD_STRIP, and POLYGON primitive types when geometry shaders are enabled. Such primitives will be tessellated into individual * triangles.
    • *
    • Setting the value of GEOMETRY_VERTICES_OUT_EXT will take effect immediately. It is not necessary to link the program object in order for this change * to take effect, as is the case in the EXT version of this extension.
    • *
    - * + * *

    Requires {@link #GL_EXT_geometry_shader4 EXT_geometry_shader4}.

    */ public final boolean GL_NV_geometry_shader4; /** - * When true, the NV_geometry_shader_passthrough extension is supported. - * + * When true, the NV_geometry_shader_passthrough extension is supported. + * *

    This extension provides a shading language abstraction to express such shaders without requiring explicit logic to manually copy attributes from input * vertices to output vertices.

    */ @@ -4595,8 +4567,8 @@ public final class GLCapabilities { /** When true, {@link NVSampleLocations} is supported. */ public final boolean GL_NV_sample_locations; /** - * When true, the NV_sample_mask_override_coverage extension is supported. - * + * When true, the NV_sample_mask_override_coverage extension is supported. + * *

    This extension allows the fragment shader to control whether the gl_SampleMask output can enable samples that were not covered by the original * primitive, or that failed the early depth/stencil tests.

    */ @@ -4604,44 +4576,44 @@ public final class GLCapabilities { /** When true, {@link NVScissorExclusive} is supported. */ public final boolean GL_NV_scissor_exclusive; /** - * When true, the NV_shader_atomic_float extension is supported. - * + * When true, the NV_shader_atomic_float extension is supported. + * *

    This extension provides GLSL built-in functions and assembly opcodes allowing shaders to perform atomic read-modify-write operations to buffer or * texture memory with floating-point components. The set of atomic operations provided by this extension is limited to adds and exchanges. Providing * atomic add support allows shaders to atomically accumulate the sum of floating-point values into buffer or texture memory across multiple (possibly * concurrent) shader invocations.

    - * + * *

    This extension provides GLSL support for atomics targeting image uniforms (if GLSL 4.20, {@link #GL_ARB_shader_image_load_store ARB_shader_image_load_store}, or * {@link #GL_EXT_shader_image_load_store EXT_shader_image_load_store} is supported) or floating-point pointers (if {@link #GL_NV_gpu_shader5 NV_gpu_shader5} is supported). Additionally, assembly opcodes - * for these operations is also provided if NV_gpu_program5 is supported.

    + * for these operations is also provided if NV_gpu_program5 is supported.

    */ public final boolean GL_NV_shader_atomic_float; /** - * When true, the NV_shader_atomic_float64 extension is supported. - * + * When true, the NV_shader_atomic_float64 extension is supported. + * *

    This extension provides GLSL built-in functions and assembly opcodes allowing shaders to perform atomic read-modify-write operations to buffer or * shared memory with double-precision floating-point components. The set of atomic operations provided by this extension is limited to adds and * exchanges. Providing atomic add support allows shaders to atomically accumulate the sum of double-precision floating-point values into buffer memory * across multiple (possibly concurrent) shader invocations.

    - * + * *

    This extension provides GLSL support for atomics targeting double-precision floating-point pointers (if {@link NVGPUShader5 NV_gpu_shader5} is supported). * Additionally, assembly opcodes for these operations are also provided if {@code NV_gpu_program5} is supported.

    - * + * *

    Requires {@link ARBGPUShaderFP64 ARB_gpu_shader_fp64} or {@code NV_gpu_program_fp64}.

    */ public final boolean GL_NV_shader_atomic_float64; /** - * When true, the NV_shader_atomic_fp16_vector extension is supported. - * + * When true, the NV_shader_atomic_fp16_vector extension is supported. + * *

    This extension provides GLSL built-in functions and assembly opcodes allowing shaders to perform a limited set of atomic read-modify-write operations * to buffer or texture memory with 16-bit floating point vector surface formats.

    - * + * *

    Requires {@link #GL_NV_gpu_shader5 NV_gpu_shader5}.

    */ public final boolean GL_NV_shader_atomic_fp16_vector; /** - * When true, the NV_shader_atomic_int64 extension is supported. - * + * When true, the NV_shader_atomic_int64 extension is supported. + * *

    This extension provides additional GLSL built-in functions and assembly opcodes allowing shaders to perform additional atomic read-modify-write * operations on 64-bit signed and unsigned integers stored in buffer object memory.

    */ @@ -4653,14 +4625,14 @@ public final class GLCapabilities { /** When true, {@link NVShaderSubgroupPartitioned} is supported. */ public final boolean GL_NV_shader_subgroup_partitioned; /** - * When true, the NV_shader_texture_footprint extension is supported. - * + * When true, the NV_shader_texture_footprint extension is supported. + * *

    This extension adds OpenGL API support for the OpenGL Shading Language (GLSL) extension {@code "NV_shader_texture_footprint"}. That extension adds a * new set of texture query functions ({@code "textureFootprint*NV"}) to GLSL. These built-in functions prepare to perform a filtered texture lookup based * on coordinates and other parameters passed in by the calling code. However, instead of returning data from the provided texture image, these query * functions instead return data identifying the texture footprint for an equivalent texture access. The texture footprint identifies a set of * texels that may be accessed in order to return a filtered result for the texture access.

    - * + * *

    The footprint itself is a structure that includes integer values that identify a small neighborhood of texels in the texture being accessed and a * bitfield that indicates which texels in that neighborhood would be used. Each bit in the returned bitfield identifies whether any texel in a small * aligned block of texels would be fetched by the texture lookup. The size of each block is specified by an access granularity provided by the @@ -4668,52 +4640,52 @@ public final class GLCapabilities { * (for 2D textures) or 64x32x32 (for 3D textures). Each footprint query returns the footprint from a single texture level. When using minification * filters that combine accesses from multiple mipmap levels, shaders must perform separate queries for the two levels accessed ("fine" and "coarse"). The * footprint query also returns a flag indicating if the texture lookup would access texels from only one mipmap level or from two neighboring levels.

    - * + * *

    This extension should be useful for multi-pass rendering operations that do an initial expensive rendering pass to produce a first image that is then * used as a texture for a second pass. If the second pass ends up accessing only portions of the first image (e.g., due to visibility), the work spent * rendering the non-accessed portion of the first image was wasted. With this feature, an application can limit this waste using an initial pass over the * geometry in the second image that performs a footprint query for each visible pixel to determine the set of pixels that it needs from the first image. * This pass would accumulate an aggregate footprint of all visible pixels into a separate "footprint texture" using shader atomics. Then, when rendering * the first image, the application can kill all shading work for pixels not in this aggregate footprint.

    - * + * *

    The implementation of this extension has a number of limitations. The texture footprint query functions are only supported for two- and * three-dimensional textures ({@link GL11#GL_TEXTURE_2D TEXTURE_2D}, {@link GL12#GL_TEXTURE_3D TEXTURE_3D}). Texture footprint evaluation only supports the {@link GL12#GL_CLAMP_TO_EDGE CLAMP_TO_EDGE} wrap mode; results are undefined * for all other wrap modes. The implementation supports only a limited set of granularity values and does not support separate coverage information for * each texel in the original texture.

    - * + * *

    Requires {@link GL45 OpenGL 4.5}.

    */ public final boolean GL_NV_shader_texture_footprint; /** When true, {@link NVShaderThreadGroup} is supported. */ public final boolean GL_NV_shader_thread_group; /** - * When true, the NV_shader_thread_shuffle extension is supported. - * + * When true, the NV_shader_thread_shuffle extension is supported. + * *

    Implementations of the OpenGL Shading Language may, but are not required, to run multiple shader threads for a single stage as a SIMD thread group, * where individual execution threads are assigned to thread groups in an undefined, implementation-dependent order. This extension provides a set of * new features to the OpenGL Shading Language to share data between multiple threads within a thread group.

    - * + * *

    Requires {@link GL43 OpenGL 4.3} and GLSL 4.3.

    */ public final boolean GL_NV_shader_thread_shuffle; /** When true, {@link NVShadingRateImage} is supported. */ public final boolean GL_NV_shading_rate_image; /** - * When true, the NV_stereo_view_rendering extension is supported. - * + * When true, the NV_stereo_view_rendering extension is supported. + * *

    Virtual reality (VR) applications often render a single logical scene from multiple views corresponding to a pair of eyes. The views (eyes) are * separated by a fixed offset in the X direction.

    - * + * *

    Traditionally, multiple views are rendered via multiple rendering passes. This is expensive for the GPU because the objects in the scene must be * transformed, rasterized, shaded, and fragment processed redundantly. This is expensive for the CPU because the scene graph needs to be visited multiple * times and driver validation happens for each view. Rendering N passes tends to take N times longer than a single pass.

    - * + * *

    This extension provides a mechanism to render binocular (stereo) views from a single stream of OpenGL rendering commands. Vertex, tessellation, and * geometry (VTG) shaders can output two positions for each vertex corresponding to the two eye views. A built-in "gl_SecondaryPositionNV" is added to * specify the second position. The positions from each view may be sent to different viewports and/or layers. A built-in "gl_SecondaryViewportMaskNV[]" * is also added to specify the viewport mask for the second view. A new layout-qualifier "secondary_view_offset" is added for built-in output "gl_Layer" * which allows for the geometry from each view to be sent to different layers for rendering.

    - * + * *

    Requires {@link #GL_NV_viewport_array2 NV_viewport_array2}.

    */ public final boolean GL_NV_stereo_view_rendering; @@ -4722,8 +4694,8 @@ public final class GLCapabilities { /** When true, {@link NVTextureBarrier} is supported. */ public final boolean GL_NV_texture_barrier; /** - * When true, the NV_texture_compression_vtc extension is supported. - * + * When true, the NV_texture_compression_vtc extension is supported. + * *

    This extension adds support for the VTC 3D texture compression formats, which are analogous to the S3TC texture compression formats, with the addition * of some retiling in the Z direction. VTC has the same compression ratio as S3TC and uses 4x4x1, 4x4x2, (4x4x3 when non-power-of-two textures are * supported), or 4x4x4 blocks.

    @@ -4732,8 +4704,8 @@ public final class GLCapabilities { /** When true, {@link NVTextureMultisample} is supported. */ public final boolean GL_NV_texture_multisample; /** - * When true, the NV_texture_rectangle_compressed extension is supported. - * + * When true, the NV_texture_rectangle_compressed extension is supported. + * *

    This extension allows applications to use compressed texture formats with the {@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE} texture target, removing an old limitation that * prohibited such usage globally for rectangle textures.

    */ @@ -4750,19 +4722,6 @@ public final class GLCapabilities { public final boolean GL_NV_transform_feedback; /** When true, {@link NVTransformFeedback2} is supported. */ public final boolean GL_NV_transform_feedback2; - /** - * When true, the NV_uniform_buffer_std430_layout extension is supported. - * - *

    OpenGL 4.3 (and {@code ARB_enhanced_layouts}) provide an enhanced layout qualifier syntax for aligning members of uniform and shader storage blocks. - * The std430 enhanced layout qualifier is advantageous, compared with std140, because it provides a more space-efficient layout of arrays that more - * easily matches the data layout in C/C++ structures stored in CPU memory.

    - * - *

    However OpenGL 4.3 precluded using the std430 layout qualifier for uniform blocks (by mandating a compilation error be generated).

    - * - *

    This extension makes std430 a legal layout qualifier for uniform blocks in GLSL when the extension's GLSL {@code #extension} functionality is enabled - * or required.

    - */ - public final boolean GL_NV_uniform_buffer_std430_layout; /** When true, {@link NVUniformBufferUnifiedMemory} is supported. */ public final boolean GL_NV_uniform_buffer_unified_memory; /** When true, {@link NVVertexArrayRange} is supported. */ @@ -4774,17 +4733,17 @@ public final class GLCapabilities { /** When true, {@link NVVertexBufferUnifiedMemory} is supported. */ public final boolean GL_NV_vertex_buffer_unified_memory; /** - * When true, the NV_viewport_array2 extension is supported. - * + * When true, the NV_viewport_array2 extension is supported. + * *

    This extension provides new support allowing a single primitive to be broadcast to multiple viewports and/or multiple layers. A shader output * gl_ViewportMask[] is provided, allowing a single primitive to be output to multiple viewports simultaneously. Also, a new shader option is provided to * control whether the effective viewport index is added into gl_Layer. These capabilities allow a single primitive to be output to multiple layers * simultaneously.

    - * + * *

    The gl_ViewportMask[] output is available in vertex, tessellation control, tessellation evaluation, and geometry shaders. gl_ViewportIndex and gl_Layer * are also made available in all these shader stages. The actual viewport index or mask and render target layer values are taken from the last active * shader stage from this set of stages.

    - * + * *

    This extension is a superset of the GL_AMD_vertex_shader_layer and GL_AMD_vertex_shader_viewport_index extensions, and thus those extension strings are * expected to be exported if GL_NV_viewport_array2 is supported.

    */ @@ -4792,13 +4751,13 @@ public final class GLCapabilities { /** When true, {@link NVViewportSwizzle} is supported. */ public final boolean GL_NV_viewport_swizzle; /** - * When true, the NVX_blend_equation_advanced_multi_draw_buffers extension is supported. - * + * When true, the NVX_blend_equation_advanced_multi_draw_buffers extension is supported. + * *

    This extension adds support for using advanced blend equations introduced with {@link NVBlendEquationAdvanced NV_blend_equation_advanced} (and standardized by * {@link KHRBlendEquationAdvanced KHR_blend_equation_advanced}) in conjunction with multiple draw buffers. The NV_blend_equation_advanced extension supports advanced blending * equations only when rending to a single color buffer using fragment color zero and throws and {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error when multiple draw buffers are * used. This extension removes this restriction.

    - * + * *

    Requires either {@link NVBlendEquationAdvanced NV_blend_equation_advanced} or {@link KHRBlendEquationAdvanced KHR_blend_equation_advanced}.

    */ public final boolean GL_NVX_blend_equation_advanced_multi_draw_buffers; @@ -4813,11 +4772,11 @@ public final class GLCapabilities { /** When true, {@link OVRMultiview} is supported. */ public final boolean GL_OVR_multiview; /** - * When true, the OVR_multiview2 extension is supported. - * + * When true, the OVR_multiview2 extension is supported. + * *

    This extension relaxes the restriction in OVR_multiview that only {@code gl_Position} can depend on {@code ViewID} in the vertex shader. With this * change, view-dependent outputs like reflection vectors and similar are allowed.

    - * + * *

    Requires {@link GL30 OpenGL 3.0} and {@link OVRMultiview OVR_multiview}.

    */ public final boolean GL_OVR_multiview2; @@ -4892,6 +4851,7 @@ public final class GLCapabilities { GL_ARB_bindless_texture = check_ARB_bindless_texture(provider, caps, ext); GL_ARB_blend_func_extended = check_ARB_blend_func_extended(provider, caps, ext); GL_ARB_buffer_storage = check_ARB_buffer_storage(provider, caps, ext); + GL_ARB_cl_event = check_ARB_cl_event(provider, caps, ext); GL_ARB_clear_buffer_object = check_ARB_clear_buffer_object(provider, caps, ext); GL_ARB_clear_texture = check_ARB_clear_texture(provider, caps, ext); GL_ARB_clip_control = check_ARB_clip_control(provider, caps, ext); @@ -5082,7 +5042,6 @@ public final class GLCapabilities { GL_EXT_EGL_sync = ext.contains("GL_EXT_EGL_sync"); GL_EXT_external_buffer = check_EXT_external_buffer(provider, caps, ext); GL_EXT_framebuffer_blit = check_EXT_framebuffer_blit(provider, caps, ext); - GL_EXT_framebuffer_blit_layers = check_EXT_framebuffer_blit_layers(provider, caps, ext); GL_EXT_framebuffer_multisample = check_EXT_framebuffer_multisample(provider, caps, ext); GL_EXT_framebuffer_multisample_blit_scaled = ext.contains("GL_EXT_framebuffer_multisample_blit_scaled"); GL_EXT_framebuffer_object = check_EXT_framebuffer_object(provider, caps, ext); @@ -5114,7 +5073,6 @@ public final class GLCapabilities { GL_EXT_shader_image_load_formatted = ext.contains("GL_EXT_shader_image_load_formatted"); GL_EXT_shader_image_load_store = check_EXT_shader_image_load_store(provider, caps, ext); GL_EXT_shader_integer_mix = ext.contains("GL_EXT_shader_integer_mix"); - GL_EXT_shader_samples_identical = ext.contains("GL_EXT_shader_samples_identical"); GL_EXT_shadow_funcs = ext.contains("GL_EXT_shadow_funcs"); GL_EXT_shared_texture_palette = ext.contains("GL_EXT_shared_texture_palette"); GL_EXT_sparse_texture2 = ext.contains("GL_EXT_sparse_texture2"); @@ -5257,7 +5215,6 @@ public final class GLCapabilities { GL_NV_timeline_semaphore = check_NV_timeline_semaphore(provider, caps, ext); GL_NV_transform_feedback = check_NV_transform_feedback(provider, caps, ext); GL_NV_transform_feedback2 = check_NV_transform_feedback2(provider, caps, ext); - GL_NV_uniform_buffer_std430_layout = ext.contains("GL_NV_uniform_buffer_std430_layout"); GL_NV_uniform_buffer_unified_memory = ext.contains("GL_NV_uniform_buffer_unified_memory"); GL_NV_vertex_array_range = check_NV_vertex_array_range(provider, caps, ext); GL_NV_vertex_array_range2 = ext.contains("GL_NV_vertex_array_range2"); @@ -6402,1102 +6359,1101 @@ public final class GLCapabilities { glVertexAttribL1ui64vARB = caps.get(1125); glGetVertexAttribLui64vARB = caps.get(1126); glNamedBufferStorageEXT = caps.get(1127); - glClearNamedBufferDataEXT = caps.get(1128); - glClearNamedBufferSubDataEXT = caps.get(1129); - glClampColorARB = caps.get(1130); - glDispatchComputeGroupSizeARB = caps.get(1131); - glDebugMessageControlARB = caps.get(1132); - glDebugMessageInsertARB = caps.get(1133); - glDebugMessageCallbackARB = caps.get(1134); - glGetDebugMessageLogARB = caps.get(1135); - glDrawBuffersARB = caps.get(1136); - glBlendEquationiARB = caps.get(1137); - glBlendEquationSeparateiARB = caps.get(1138); - glBlendFunciARB = caps.get(1139); - glBlendFuncSeparateiARB = caps.get(1140); - glDrawArraysInstancedARB = caps.get(1141); - glDrawElementsInstancedARB = caps.get(1142); - glPrimitiveBoundingBoxARB = caps.get(1143); - glNamedFramebufferParameteriEXT = caps.get(1144); - glGetNamedFramebufferParameterivEXT = caps.get(1145); - glProgramParameteriARB = caps.get(1146); - glFramebufferTextureARB = caps.get(1147); - glFramebufferTextureLayerARB = caps.get(1148); - glFramebufferTextureFaceARB = caps.get(1149); - glSpecializeShaderARB = caps.get(1150); - glProgramUniform1dEXT = caps.get(1151); - glProgramUniform2dEXT = caps.get(1152); - glProgramUniform3dEXT = caps.get(1153); - glProgramUniform4dEXT = caps.get(1154); - glProgramUniform1dvEXT = caps.get(1155); - glProgramUniform2dvEXT = caps.get(1156); - glProgramUniform3dvEXT = caps.get(1157); - glProgramUniform4dvEXT = caps.get(1158); - glProgramUniformMatrix2dvEXT = caps.get(1159); - glProgramUniformMatrix3dvEXT = caps.get(1160); - glProgramUniformMatrix4dvEXT = caps.get(1161); - glProgramUniformMatrix2x3dvEXT = caps.get(1162); - glProgramUniformMatrix2x4dvEXT = caps.get(1163); - glProgramUniformMatrix3x2dvEXT = caps.get(1164); - glProgramUniformMatrix3x4dvEXT = caps.get(1165); - glProgramUniformMatrix4x2dvEXT = caps.get(1166); - glProgramUniformMatrix4x3dvEXT = caps.get(1167); - glUniform1i64ARB = caps.get(1168); - glUniform1i64vARB = caps.get(1169); - glProgramUniform1i64ARB = caps.get(1170); - glProgramUniform1i64vARB = caps.get(1171); - glUniform2i64ARB = caps.get(1172); - glUniform2i64vARB = caps.get(1173); - glProgramUniform2i64ARB = caps.get(1174); - glProgramUniform2i64vARB = caps.get(1175); - glUniform3i64ARB = caps.get(1176); - glUniform3i64vARB = caps.get(1177); - glProgramUniform3i64ARB = caps.get(1178); - glProgramUniform3i64vARB = caps.get(1179); - glUniform4i64ARB = caps.get(1180); - glUniform4i64vARB = caps.get(1181); - glProgramUniform4i64ARB = caps.get(1182); - glProgramUniform4i64vARB = caps.get(1183); - glUniform1ui64ARB = caps.get(1184); - glUniform1ui64vARB = caps.get(1185); - glProgramUniform1ui64ARB = caps.get(1186); - glProgramUniform1ui64vARB = caps.get(1187); - glUniform2ui64ARB = caps.get(1188); - glUniform2ui64vARB = caps.get(1189); - glProgramUniform2ui64ARB = caps.get(1190); - glProgramUniform2ui64vARB = caps.get(1191); - glUniform3ui64ARB = caps.get(1192); - glUniform3ui64vARB = caps.get(1193); - glProgramUniform3ui64ARB = caps.get(1194); - glProgramUniform3ui64vARB = caps.get(1195); - glUniform4ui64ARB = caps.get(1196); - glUniform4ui64vARB = caps.get(1197); - glProgramUniform4ui64ARB = caps.get(1198); - glProgramUniform4ui64vARB = caps.get(1199); - glGetUniformi64vARB = caps.get(1200); - glGetUniformui64vARB = caps.get(1201); - glGetnUniformi64vARB = caps.get(1202); - glGetnUniformui64vARB = caps.get(1203); - glColorTable = caps.get(1204); - glCopyColorTable = caps.get(1205); - glColorTableParameteriv = caps.get(1206); - glColorTableParameterfv = caps.get(1207); - glGetColorTable = caps.get(1208); - glGetColorTableParameteriv = caps.get(1209); - glGetColorTableParameterfv = caps.get(1210); - glColorSubTable = caps.get(1211); - glCopyColorSubTable = caps.get(1212); - glConvolutionFilter1D = caps.get(1213); - glConvolutionFilter2D = caps.get(1214); - glCopyConvolutionFilter1D = caps.get(1215); - glCopyConvolutionFilter2D = caps.get(1216); - glGetConvolutionFilter = caps.get(1217); - glSeparableFilter2D = caps.get(1218); - glGetSeparableFilter = caps.get(1219); - glConvolutionParameteri = caps.get(1220); - glConvolutionParameteriv = caps.get(1221); - glConvolutionParameterf = caps.get(1222); - glConvolutionParameterfv = caps.get(1223); - glGetConvolutionParameteriv = caps.get(1224); - glGetConvolutionParameterfv = caps.get(1225); - glHistogram = caps.get(1226); - glResetHistogram = caps.get(1227); - glGetHistogram = caps.get(1228); - glGetHistogramParameteriv = caps.get(1229); - glGetHistogramParameterfv = caps.get(1230); - glMinmax = caps.get(1231); - glResetMinmax = caps.get(1232); - glGetMinmax = caps.get(1233); - glGetMinmaxParameteriv = caps.get(1234); - glGetMinmaxParameterfv = caps.get(1235); - glMultiDrawArraysIndirectCountARB = caps.get(1236); - glMultiDrawElementsIndirectCountARB = caps.get(1237); - glVertexAttribDivisorARB = caps.get(1238); - glVertexArrayVertexAttribDivisorEXT = caps.get(1239); - glCurrentPaletteMatrixARB = caps.get(1240); - glMatrixIndexuivARB = caps.get(1241); - glMatrixIndexubvARB = caps.get(1242); - glMatrixIndexusvARB = caps.get(1243); - glMatrixIndexPointerARB = caps.get(1244); - glSampleCoverageARB = caps.get(1245); - glActiveTextureARB = caps.get(1246); - glClientActiveTextureARB = caps.get(1247); - glMultiTexCoord1fARB = caps.get(1248); - glMultiTexCoord1sARB = caps.get(1249); - glMultiTexCoord1iARB = caps.get(1250); - glMultiTexCoord1dARB = caps.get(1251); - glMultiTexCoord1fvARB = caps.get(1252); - glMultiTexCoord1svARB = caps.get(1253); - glMultiTexCoord1ivARB = caps.get(1254); - glMultiTexCoord1dvARB = caps.get(1255); - glMultiTexCoord2fARB = caps.get(1256); - glMultiTexCoord2sARB = caps.get(1257); - glMultiTexCoord2iARB = caps.get(1258); - glMultiTexCoord2dARB = caps.get(1259); - glMultiTexCoord2fvARB = caps.get(1260); - glMultiTexCoord2svARB = caps.get(1261); - glMultiTexCoord2ivARB = caps.get(1262); - glMultiTexCoord2dvARB = caps.get(1263); - glMultiTexCoord3fARB = caps.get(1264); - glMultiTexCoord3sARB = caps.get(1265); - glMultiTexCoord3iARB = caps.get(1266); - glMultiTexCoord3dARB = caps.get(1267); - glMultiTexCoord3fvARB = caps.get(1268); - glMultiTexCoord3svARB = caps.get(1269); - glMultiTexCoord3ivARB = caps.get(1270); - glMultiTexCoord3dvARB = caps.get(1271); - glMultiTexCoord4fARB = caps.get(1272); - glMultiTexCoord4sARB = caps.get(1273); - glMultiTexCoord4iARB = caps.get(1274); - glMultiTexCoord4dARB = caps.get(1275); - glMultiTexCoord4fvARB = caps.get(1276); - glMultiTexCoord4svARB = caps.get(1277); - glMultiTexCoord4ivARB = caps.get(1278); - glMultiTexCoord4dvARB = caps.get(1279); - glGenQueriesARB = caps.get(1280); - glDeleteQueriesARB = caps.get(1281); - glIsQueryARB = caps.get(1282); - glBeginQueryARB = caps.get(1283); - glEndQueryARB = caps.get(1284); - glGetQueryivARB = caps.get(1285); - glGetQueryObjectivARB = caps.get(1286); - glGetQueryObjectuivARB = caps.get(1287); - glMaxShaderCompilerThreadsARB = caps.get(1288); - glPointParameterfARB = caps.get(1289); - glPointParameterfvARB = caps.get(1290); - glGetGraphicsResetStatusARB = caps.get(1291); - glGetnMapdvARB = caps.get(1292); - glGetnMapfvARB = caps.get(1293); - glGetnMapivARB = caps.get(1294); - glGetnPixelMapfvARB = caps.get(1295); - glGetnPixelMapuivARB = caps.get(1296); - glGetnPixelMapusvARB = caps.get(1297); - glGetnPolygonStippleARB = caps.get(1298); - glGetnTexImageARB = caps.get(1299); - glReadnPixelsARB = caps.get(1300); - glGetnColorTableARB = caps.get(1301); - glGetnConvolutionFilterARB = caps.get(1302); - glGetnSeparableFilterARB = caps.get(1303); - glGetnHistogramARB = caps.get(1304); - glGetnMinmaxARB = caps.get(1305); - glGetnCompressedTexImageARB = caps.get(1306); - glGetnUniformfvARB = caps.get(1307); - glGetnUniformivARB = caps.get(1308); - glGetnUniformuivARB = caps.get(1309); - glGetnUniformdvARB = caps.get(1310); - glFramebufferSampleLocationsfvARB = caps.get(1311); - glNamedFramebufferSampleLocationsfvARB = caps.get(1312); - glEvaluateDepthValuesARB = caps.get(1313); - glMinSampleShadingARB = caps.get(1314); - glDeleteObjectARB = caps.get(1315); - glGetHandleARB = caps.get(1316); - glDetachObjectARB = caps.get(1317); - glCreateShaderObjectARB = caps.get(1318); - glShaderSourceARB = caps.get(1319); - glCompileShaderARB = caps.get(1320); - glCreateProgramObjectARB = caps.get(1321); - glAttachObjectARB = caps.get(1322); - glLinkProgramARB = caps.get(1323); - glUseProgramObjectARB = caps.get(1324); - glValidateProgramARB = caps.get(1325); - glUniform1fARB = caps.get(1326); - glUniform2fARB = caps.get(1327); - glUniform3fARB = caps.get(1328); - glUniform4fARB = caps.get(1329); - glUniform1iARB = caps.get(1330); - glUniform2iARB = caps.get(1331); - glUniform3iARB = caps.get(1332); - glUniform4iARB = caps.get(1333); - glUniform1fvARB = caps.get(1334); - glUniform2fvARB = caps.get(1335); - glUniform3fvARB = caps.get(1336); - glUniform4fvARB = caps.get(1337); - glUniform1ivARB = caps.get(1338); - glUniform2ivARB = caps.get(1339); - glUniform3ivARB = caps.get(1340); - glUniform4ivARB = caps.get(1341); - glUniformMatrix2fvARB = caps.get(1342); - glUniformMatrix3fvARB = caps.get(1343); - glUniformMatrix4fvARB = caps.get(1344); - glGetObjectParameterfvARB = caps.get(1345); - glGetObjectParameterivARB = caps.get(1346); - glGetInfoLogARB = caps.get(1347); - glGetAttachedObjectsARB = caps.get(1348); - glGetUniformLocationARB = caps.get(1349); - glGetActiveUniformARB = caps.get(1350); - glGetUniformfvARB = caps.get(1351); - glGetUniformivARB = caps.get(1352); - glGetShaderSourceARB = caps.get(1353); - glNamedStringARB = caps.get(1354); - glDeleteNamedStringARB = caps.get(1355); - glCompileShaderIncludeARB = caps.get(1356); - glIsNamedStringARB = caps.get(1357); - glGetNamedStringARB = caps.get(1358); - glGetNamedStringivARB = caps.get(1359); - glBufferPageCommitmentARB = caps.get(1360); - glNamedBufferPageCommitmentEXT = caps.get(1361); - glNamedBufferPageCommitmentARB = caps.get(1362); - glTexPageCommitmentARB = caps.get(1363); - glTexturePageCommitmentEXT = caps.get(1364); - glTexBufferARB = caps.get(1365); - glTextureBufferRangeEXT = caps.get(1366); - glCompressedTexImage3DARB = caps.get(1367); - glCompressedTexImage2DARB = caps.get(1368); - glCompressedTexImage1DARB = caps.get(1369); - glCompressedTexSubImage3DARB = caps.get(1370); - glCompressedTexSubImage2DARB = caps.get(1371); - glCompressedTexSubImage1DARB = caps.get(1372); - glGetCompressedTexImageARB = caps.get(1373); - glTextureStorage1DEXT = caps.get(1374); - glTextureStorage2DEXT = caps.get(1375); - glTextureStorage3DEXT = caps.get(1376); - glTextureStorage2DMultisampleEXT = caps.get(1377); - glTextureStorage3DMultisampleEXT = caps.get(1378); - glLoadTransposeMatrixfARB = caps.get(1379); - glLoadTransposeMatrixdARB = caps.get(1380); - glMultTransposeMatrixfARB = caps.get(1381); - glMultTransposeMatrixdARB = caps.get(1382); - glVertexArrayVertexAttribLOffsetEXT = caps.get(1383); - glVertexArrayBindVertexBufferEXT = caps.get(1384); - glVertexArrayVertexAttribFormatEXT = caps.get(1385); - glVertexArrayVertexAttribIFormatEXT = caps.get(1386); - glVertexArrayVertexAttribLFormatEXT = caps.get(1387); - glVertexArrayVertexAttribBindingEXT = caps.get(1388); - glVertexArrayVertexBindingDivisorEXT = caps.get(1389); - glWeightfvARB = caps.get(1390); - glWeightbvARB = caps.get(1391); - glWeightubvARB = caps.get(1392); - glWeightsvARB = caps.get(1393); - glWeightusvARB = caps.get(1394); - glWeightivARB = caps.get(1395); - glWeightuivARB = caps.get(1396); - glWeightdvARB = caps.get(1397); - glWeightPointerARB = caps.get(1398); - glVertexBlendARB = caps.get(1399); - glBindBufferARB = caps.get(1400); - glDeleteBuffersARB = caps.get(1401); - glGenBuffersARB = caps.get(1402); - glIsBufferARB = caps.get(1403); - glBufferDataARB = caps.get(1404); - glBufferSubDataARB = caps.get(1405); - glGetBufferSubDataARB = caps.get(1406); - glMapBufferARB = caps.get(1407); - glUnmapBufferARB = caps.get(1408); - glGetBufferParameterivARB = caps.get(1409); - glGetBufferPointervARB = caps.get(1410); - glVertexAttrib1sARB = caps.get(1411); - glVertexAttrib1fARB = caps.get(1412); - glVertexAttrib1dARB = caps.get(1413); - glVertexAttrib2sARB = caps.get(1414); - glVertexAttrib2fARB = caps.get(1415); - glVertexAttrib2dARB = caps.get(1416); - glVertexAttrib3sARB = caps.get(1417); - glVertexAttrib3fARB = caps.get(1418); - glVertexAttrib3dARB = caps.get(1419); - glVertexAttrib4sARB = caps.get(1420); - glVertexAttrib4fARB = caps.get(1421); - glVertexAttrib4dARB = caps.get(1422); - glVertexAttrib4NubARB = caps.get(1423); - glVertexAttrib1svARB = caps.get(1424); - glVertexAttrib1fvARB = caps.get(1425); - glVertexAttrib1dvARB = caps.get(1426); - glVertexAttrib2svARB = caps.get(1427); - glVertexAttrib2fvARB = caps.get(1428); - glVertexAttrib2dvARB = caps.get(1429); - glVertexAttrib3svARB = caps.get(1430); - glVertexAttrib3fvARB = caps.get(1431); - glVertexAttrib3dvARB = caps.get(1432); - glVertexAttrib4fvARB = caps.get(1433); - glVertexAttrib4bvARB = caps.get(1434); - glVertexAttrib4svARB = caps.get(1435); - glVertexAttrib4ivARB = caps.get(1436); - glVertexAttrib4ubvARB = caps.get(1437); - glVertexAttrib4usvARB = caps.get(1438); - glVertexAttrib4uivARB = caps.get(1439); - glVertexAttrib4dvARB = caps.get(1440); - glVertexAttrib4NbvARB = caps.get(1441); - glVertexAttrib4NsvARB = caps.get(1442); - glVertexAttrib4NivARB = caps.get(1443); - glVertexAttrib4NubvARB = caps.get(1444); - glVertexAttrib4NusvARB = caps.get(1445); - glVertexAttrib4NuivARB = caps.get(1446); - glVertexAttribPointerARB = caps.get(1447); - glEnableVertexAttribArrayARB = caps.get(1448); - glDisableVertexAttribArrayARB = caps.get(1449); - glProgramStringARB = caps.get(1450); - glBindProgramARB = caps.get(1451); - glDeleteProgramsARB = caps.get(1452); - glGenProgramsARB = caps.get(1453); - glProgramEnvParameter4dARB = caps.get(1454); - glProgramEnvParameter4dvARB = caps.get(1455); - glProgramEnvParameter4fARB = caps.get(1456); - glProgramEnvParameter4fvARB = caps.get(1457); - glProgramLocalParameter4dARB = caps.get(1458); - glProgramLocalParameter4dvARB = caps.get(1459); - glProgramLocalParameter4fARB = caps.get(1460); - glProgramLocalParameter4fvARB = caps.get(1461); - glGetProgramEnvParameterfvARB = caps.get(1462); - glGetProgramEnvParameterdvARB = caps.get(1463); - glGetProgramLocalParameterfvARB = caps.get(1464); - glGetProgramLocalParameterdvARB = caps.get(1465); - glGetProgramivARB = caps.get(1466); - glGetProgramStringARB = caps.get(1467); - glGetVertexAttribfvARB = caps.get(1468); - glGetVertexAttribdvARB = caps.get(1469); - glGetVertexAttribivARB = caps.get(1470); - glGetVertexAttribPointervARB = caps.get(1471); - glIsProgramARB = caps.get(1472); - glBindAttribLocationARB = caps.get(1473); - glGetActiveAttribARB = caps.get(1474); - glGetAttribLocationARB = caps.get(1475); - glWindowPos2iARB = caps.get(1476); - glWindowPos2sARB = caps.get(1477); - glWindowPos2fARB = caps.get(1478); - glWindowPos2dARB = caps.get(1479); - glWindowPos2ivARB = caps.get(1480); - glWindowPos2svARB = caps.get(1481); - glWindowPos2fvARB = caps.get(1482); - glWindowPos2dvARB = caps.get(1483); - glWindowPos3iARB = caps.get(1484); - glWindowPos3sARB = caps.get(1485); - glWindowPos3fARB = caps.get(1486); - glWindowPos3dARB = caps.get(1487); - glWindowPos3ivARB = caps.get(1488); - glWindowPos3svARB = caps.get(1489); - glWindowPos3fvARB = caps.get(1490); - glWindowPos3dvARB = caps.get(1491); - glUniformBufferEXT = caps.get(1492); - glGetUniformBufferSizeEXT = caps.get(1493); - glGetUniformOffsetEXT = caps.get(1494); - glBlendColorEXT = caps.get(1495); - glBlendEquationSeparateEXT = caps.get(1496); - glBlendFuncSeparateEXT = caps.get(1497); - glBlendEquationEXT = caps.get(1498); - glLockArraysEXT = caps.get(1499); - glUnlockArraysEXT = caps.get(1500); - glLabelObjectEXT = caps.get(1501); - glGetObjectLabelEXT = caps.get(1502); - glInsertEventMarkerEXT = caps.get(1503); - glPushGroupMarkerEXT = caps.get(1504); - glPopGroupMarkerEXT = caps.get(1505); - glDepthBoundsEXT = caps.get(1506); - glClientAttribDefaultEXT = caps.get(1507); - glPushClientAttribDefaultEXT = caps.get(1508); - glMatrixLoadfEXT = caps.get(1509); - glMatrixLoaddEXT = caps.get(1510); - glMatrixMultfEXT = caps.get(1511); - glMatrixMultdEXT = caps.get(1512); - glMatrixLoadIdentityEXT = caps.get(1513); - glMatrixRotatefEXT = caps.get(1514); - glMatrixRotatedEXT = caps.get(1515); - glMatrixScalefEXT = caps.get(1516); - glMatrixScaledEXT = caps.get(1517); - glMatrixTranslatefEXT = caps.get(1518); - glMatrixTranslatedEXT = caps.get(1519); - glMatrixOrthoEXT = caps.get(1520); - glMatrixFrustumEXT = caps.get(1521); - glMatrixPushEXT = caps.get(1522); - glMatrixPopEXT = caps.get(1523); - glTextureParameteriEXT = caps.get(1524); - glTextureParameterivEXT = caps.get(1525); - glTextureParameterfEXT = caps.get(1526); - glTextureParameterfvEXT = caps.get(1527); - glTextureImage1DEXT = caps.get(1528); - glTextureImage2DEXT = caps.get(1529); - glTextureSubImage1DEXT = caps.get(1530); - glTextureSubImage2DEXT = caps.get(1531); - glCopyTextureImage1DEXT = caps.get(1532); - glCopyTextureImage2DEXT = caps.get(1533); - glCopyTextureSubImage1DEXT = caps.get(1534); - glCopyTextureSubImage2DEXT = caps.get(1535); - glGetTextureImageEXT = caps.get(1536); - glGetTextureParameterfvEXT = caps.get(1537); - glGetTextureParameterivEXT = caps.get(1538); - glGetTextureLevelParameterfvEXT = caps.get(1539); - glGetTextureLevelParameterivEXT = caps.get(1540); - glTextureImage3DEXT = caps.get(1541); - glTextureSubImage3DEXT = caps.get(1542); - glCopyTextureSubImage3DEXT = caps.get(1543); - glBindMultiTextureEXT = caps.get(1544); - glMultiTexCoordPointerEXT = caps.get(1545); - glMultiTexEnvfEXT = caps.get(1546); - glMultiTexEnvfvEXT = caps.get(1547); - glMultiTexEnviEXT = caps.get(1548); - glMultiTexEnvivEXT = caps.get(1549); - glMultiTexGendEXT = caps.get(1550); - glMultiTexGendvEXT = caps.get(1551); - glMultiTexGenfEXT = caps.get(1552); - glMultiTexGenfvEXT = caps.get(1553); - glMultiTexGeniEXT = caps.get(1554); - glMultiTexGenivEXT = caps.get(1555); - glGetMultiTexEnvfvEXT = caps.get(1556); - glGetMultiTexEnvivEXT = caps.get(1557); - glGetMultiTexGendvEXT = caps.get(1558); - glGetMultiTexGenfvEXT = caps.get(1559); - glGetMultiTexGenivEXT = caps.get(1560); - glMultiTexParameteriEXT = caps.get(1561); - glMultiTexParameterivEXT = caps.get(1562); - glMultiTexParameterfEXT = caps.get(1563); - glMultiTexParameterfvEXT = caps.get(1564); - glMultiTexImage1DEXT = caps.get(1565); - glMultiTexImage2DEXT = caps.get(1566); - glMultiTexSubImage1DEXT = caps.get(1567); - glMultiTexSubImage2DEXT = caps.get(1568); - glCopyMultiTexImage1DEXT = caps.get(1569); - glCopyMultiTexImage2DEXT = caps.get(1570); - glCopyMultiTexSubImage1DEXT = caps.get(1571); - glCopyMultiTexSubImage2DEXT = caps.get(1572); - glGetMultiTexImageEXT = caps.get(1573); - glGetMultiTexParameterfvEXT = caps.get(1574); - glGetMultiTexParameterivEXT = caps.get(1575); - glGetMultiTexLevelParameterfvEXT = caps.get(1576); - glGetMultiTexLevelParameterivEXT = caps.get(1577); - glMultiTexImage3DEXT = caps.get(1578); - glMultiTexSubImage3DEXT = caps.get(1579); - glCopyMultiTexSubImage3DEXT = caps.get(1580); - glEnableClientStateIndexedEXT = caps.get(1581); - glDisableClientStateIndexedEXT = caps.get(1582); - glEnableClientStateiEXT = caps.get(1583); - glDisableClientStateiEXT = caps.get(1584); - glGetFloatIndexedvEXT = caps.get(1585); - glGetDoubleIndexedvEXT = caps.get(1586); - glGetPointerIndexedvEXT = caps.get(1587); - glGetFloati_vEXT = caps.get(1588); - glGetDoublei_vEXT = caps.get(1589); - glGetPointeri_vEXT = caps.get(1590); - glEnableIndexedEXT = caps.get(1591); - glDisableIndexedEXT = caps.get(1592); - glIsEnabledIndexedEXT = caps.get(1593); - glGetIntegerIndexedvEXT = caps.get(1594); - glGetBooleanIndexedvEXT = caps.get(1595); - glNamedProgramStringEXT = caps.get(1596); - glNamedProgramLocalParameter4dEXT = caps.get(1597); - glNamedProgramLocalParameter4dvEXT = caps.get(1598); - glNamedProgramLocalParameter4fEXT = caps.get(1599); - glNamedProgramLocalParameter4fvEXT = caps.get(1600); - glGetNamedProgramLocalParameterdvEXT = caps.get(1601); - glGetNamedProgramLocalParameterfvEXT = caps.get(1602); - glGetNamedProgramivEXT = caps.get(1603); - glGetNamedProgramStringEXT = caps.get(1604); - glCompressedTextureImage3DEXT = caps.get(1605); - glCompressedTextureImage2DEXT = caps.get(1606); - glCompressedTextureImage1DEXT = caps.get(1607); - glCompressedTextureSubImage3DEXT = caps.get(1608); - glCompressedTextureSubImage2DEXT = caps.get(1609); - glCompressedTextureSubImage1DEXT = caps.get(1610); - glGetCompressedTextureImageEXT = caps.get(1611); - glCompressedMultiTexImage3DEXT = caps.get(1612); - glCompressedMultiTexImage2DEXT = caps.get(1613); - glCompressedMultiTexImage1DEXT = caps.get(1614); - glCompressedMultiTexSubImage3DEXT = caps.get(1615); - glCompressedMultiTexSubImage2DEXT = caps.get(1616); - glCompressedMultiTexSubImage1DEXT = caps.get(1617); - glGetCompressedMultiTexImageEXT = caps.get(1618); - glMatrixLoadTransposefEXT = caps.get(1619); - glMatrixLoadTransposedEXT = caps.get(1620); - glMatrixMultTransposefEXT = caps.get(1621); - glMatrixMultTransposedEXT = caps.get(1622); - glNamedBufferDataEXT = caps.get(1623); - glNamedBufferSubDataEXT = caps.get(1624); - glMapNamedBufferEXT = caps.get(1625); - glUnmapNamedBufferEXT = caps.get(1626); - glGetNamedBufferParameterivEXT = caps.get(1627); - glGetNamedBufferSubDataEXT = caps.get(1628); - glProgramUniform1fEXT = caps.get(1629); - glProgramUniform2fEXT = caps.get(1630); - glProgramUniform3fEXT = caps.get(1631); - glProgramUniform4fEXT = caps.get(1632); - glProgramUniform1iEXT = caps.get(1633); - glProgramUniform2iEXT = caps.get(1634); - glProgramUniform3iEXT = caps.get(1635); - glProgramUniform4iEXT = caps.get(1636); - glProgramUniform1fvEXT = caps.get(1637); - glProgramUniform2fvEXT = caps.get(1638); - glProgramUniform3fvEXT = caps.get(1639); - glProgramUniform4fvEXT = caps.get(1640); - glProgramUniform1ivEXT = caps.get(1641); - glProgramUniform2ivEXT = caps.get(1642); - glProgramUniform3ivEXT = caps.get(1643); - glProgramUniform4ivEXT = caps.get(1644); - glProgramUniformMatrix2fvEXT = caps.get(1645); - glProgramUniformMatrix3fvEXT = caps.get(1646); - glProgramUniformMatrix4fvEXT = caps.get(1647); - glProgramUniformMatrix2x3fvEXT = caps.get(1648); - glProgramUniformMatrix3x2fvEXT = caps.get(1649); - glProgramUniformMatrix2x4fvEXT = caps.get(1650); - glProgramUniformMatrix4x2fvEXT = caps.get(1651); - glProgramUniformMatrix3x4fvEXT = caps.get(1652); - glProgramUniformMatrix4x3fvEXT = caps.get(1653); - glTextureBufferEXT = caps.get(1654); - glMultiTexBufferEXT = caps.get(1655); - glTextureParameterIivEXT = caps.get(1656); - glTextureParameterIuivEXT = caps.get(1657); - glGetTextureParameterIivEXT = caps.get(1658); - glGetTextureParameterIuivEXT = caps.get(1659); - glMultiTexParameterIivEXT = caps.get(1660); - glMultiTexParameterIuivEXT = caps.get(1661); - glGetMultiTexParameterIivEXT = caps.get(1662); - glGetMultiTexParameterIuivEXT = caps.get(1663); - glProgramUniform1uiEXT = caps.get(1664); - glProgramUniform2uiEXT = caps.get(1665); - glProgramUniform3uiEXT = caps.get(1666); - glProgramUniform4uiEXT = caps.get(1667); - glProgramUniform1uivEXT = caps.get(1668); - glProgramUniform2uivEXT = caps.get(1669); - glProgramUniform3uivEXT = caps.get(1670); - glProgramUniform4uivEXT = caps.get(1671); - glNamedProgramLocalParameters4fvEXT = caps.get(1672); - glNamedProgramLocalParameterI4iEXT = caps.get(1673); - glNamedProgramLocalParameterI4ivEXT = caps.get(1674); - glNamedProgramLocalParametersI4ivEXT = caps.get(1675); - glNamedProgramLocalParameterI4uiEXT = caps.get(1676); - glNamedProgramLocalParameterI4uivEXT = caps.get(1677); - glNamedProgramLocalParametersI4uivEXT = caps.get(1678); - glGetNamedProgramLocalParameterIivEXT = caps.get(1679); - glGetNamedProgramLocalParameterIuivEXT = caps.get(1680); - glNamedRenderbufferStorageEXT = caps.get(1681); - glGetNamedRenderbufferParameterivEXT = caps.get(1682); - glNamedRenderbufferStorageMultisampleEXT = caps.get(1683); - glNamedRenderbufferStorageMultisampleCoverageEXT = caps.get(1684); - glCheckNamedFramebufferStatusEXT = caps.get(1685); - glNamedFramebufferTexture1DEXT = caps.get(1686); - glNamedFramebufferTexture2DEXT = caps.get(1687); - glNamedFramebufferTexture3DEXT = caps.get(1688); - glNamedFramebufferRenderbufferEXT = caps.get(1689); - glGetNamedFramebufferAttachmentParameterivEXT = caps.get(1690); - glGenerateTextureMipmapEXT = caps.get(1691); - glGenerateMultiTexMipmapEXT = caps.get(1692); - glFramebufferDrawBufferEXT = caps.get(1693); - glFramebufferDrawBuffersEXT = caps.get(1694); - glFramebufferReadBufferEXT = caps.get(1695); - glGetFramebufferParameterivEXT = caps.get(1696); - glNamedCopyBufferSubDataEXT = caps.get(1697); - glNamedFramebufferTextureEXT = caps.get(1698); - glNamedFramebufferTextureLayerEXT = caps.get(1699); - glNamedFramebufferTextureFaceEXT = caps.get(1700); - glTextureRenderbufferEXT = caps.get(1701); - glMultiTexRenderbufferEXT = caps.get(1702); - glVertexArrayVertexOffsetEXT = caps.get(1703); - glVertexArrayColorOffsetEXT = caps.get(1704); - glVertexArrayEdgeFlagOffsetEXT = caps.get(1705); - glVertexArrayIndexOffsetEXT = caps.get(1706); - glVertexArrayNormalOffsetEXT = caps.get(1707); - glVertexArrayTexCoordOffsetEXT = caps.get(1708); - glVertexArrayMultiTexCoordOffsetEXT = caps.get(1709); - glVertexArrayFogCoordOffsetEXT = caps.get(1710); - glVertexArraySecondaryColorOffsetEXT = caps.get(1711); - glVertexArrayVertexAttribOffsetEXT = caps.get(1712); - glVertexArrayVertexAttribIOffsetEXT = caps.get(1713); - glEnableVertexArrayEXT = caps.get(1714); - glDisableVertexArrayEXT = caps.get(1715); - glEnableVertexArrayAttribEXT = caps.get(1716); - glDisableVertexArrayAttribEXT = caps.get(1717); - glGetVertexArrayIntegervEXT = caps.get(1718); - glGetVertexArrayPointervEXT = caps.get(1719); - glGetVertexArrayIntegeri_vEXT = caps.get(1720); - glGetVertexArrayPointeri_vEXT = caps.get(1721); - glMapNamedBufferRangeEXT = caps.get(1722); - glFlushMappedNamedBufferRangeEXT = caps.get(1723); - glColorMaskIndexedEXT = caps.get(1724); - glDrawArraysInstancedEXT = caps.get(1725); - glDrawElementsInstancedEXT = caps.get(1726); - glEGLImageTargetTexStorageEXT = caps.get(1727); - glEGLImageTargetTextureStorageEXT = caps.get(1728); - glBufferStorageExternalEXT = caps.get(1729); - glNamedBufferStorageExternalEXT = caps.get(1730); - glBlitFramebufferEXT = caps.get(1731); - glBlitFramebufferLayersEXT = caps.get(1732); - glBlitFramebufferLayerEXT = caps.get(1733); - glRenderbufferStorageMultisampleEXT = caps.get(1734); - glIsRenderbufferEXT = caps.get(1735); - glBindRenderbufferEXT = caps.get(1736); - glDeleteRenderbuffersEXT = caps.get(1737); - glGenRenderbuffersEXT = caps.get(1738); - glRenderbufferStorageEXT = caps.get(1739); - glGetRenderbufferParameterivEXT = caps.get(1740); - glIsFramebufferEXT = caps.get(1741); - glBindFramebufferEXT = caps.get(1742); - glDeleteFramebuffersEXT = caps.get(1743); - glGenFramebuffersEXT = caps.get(1744); - glCheckFramebufferStatusEXT = caps.get(1745); - glFramebufferTexture1DEXT = caps.get(1746); - glFramebufferTexture2DEXT = caps.get(1747); - glFramebufferTexture3DEXT = caps.get(1748); - glFramebufferRenderbufferEXT = caps.get(1749); - glGetFramebufferAttachmentParameterivEXT = caps.get(1750); - glGenerateMipmapEXT = caps.get(1751); - glProgramParameteriEXT = caps.get(1752); - glFramebufferTextureEXT = caps.get(1753); - glFramebufferTextureLayerEXT = caps.get(1754); - glFramebufferTextureFaceEXT = caps.get(1755); - glProgramEnvParameters4fvEXT = caps.get(1756); - glProgramLocalParameters4fvEXT = caps.get(1757); - glVertexAttribI1iEXT = caps.get(1758); - glVertexAttribI2iEXT = caps.get(1759); - glVertexAttribI3iEXT = caps.get(1760); - glVertexAttribI4iEXT = caps.get(1761); - glVertexAttribI1uiEXT = caps.get(1762); - glVertexAttribI2uiEXT = caps.get(1763); - glVertexAttribI3uiEXT = caps.get(1764); - glVertexAttribI4uiEXT = caps.get(1765); - glVertexAttribI1ivEXT = caps.get(1766); - glVertexAttribI2ivEXT = caps.get(1767); - glVertexAttribI3ivEXT = caps.get(1768); - glVertexAttribI4ivEXT = caps.get(1769); - glVertexAttribI1uivEXT = caps.get(1770); - glVertexAttribI2uivEXT = caps.get(1771); - glVertexAttribI3uivEXT = caps.get(1772); - glVertexAttribI4uivEXT = caps.get(1773); - glVertexAttribI4bvEXT = caps.get(1774); - glVertexAttribI4svEXT = caps.get(1775); - glVertexAttribI4ubvEXT = caps.get(1776); - glVertexAttribI4usvEXT = caps.get(1777); - glVertexAttribIPointerEXT = caps.get(1778); - glGetVertexAttribIivEXT = caps.get(1779); - glGetVertexAttribIuivEXT = caps.get(1780); - glGetUniformuivEXT = caps.get(1781); - glBindFragDataLocationEXT = caps.get(1782); - glGetFragDataLocationEXT = caps.get(1783); - glUniform1uiEXT = caps.get(1784); - glUniform2uiEXT = caps.get(1785); - glUniform3uiEXT = caps.get(1786); - glUniform4uiEXT = caps.get(1787); - glUniform1uivEXT = caps.get(1788); - glUniform2uivEXT = caps.get(1789); - glUniform3uivEXT = caps.get(1790); - glUniform4uivEXT = caps.get(1791); - glGetUnsignedBytevEXT = caps.get(1792); - glGetUnsignedBytei_vEXT = caps.get(1793); - glDeleteMemoryObjectsEXT = caps.get(1794); - glIsMemoryObjectEXT = caps.get(1795); - glCreateMemoryObjectsEXT = caps.get(1796); - glMemoryObjectParameterivEXT = caps.get(1797); - glGetMemoryObjectParameterivEXT = caps.get(1798); - glTexStorageMem2DEXT = caps.get(1799); - glTexStorageMem2DMultisampleEXT = caps.get(1800); - glTexStorageMem3DEXT = caps.get(1801); - glTexStorageMem3DMultisampleEXT = caps.get(1802); - glBufferStorageMemEXT = caps.get(1803); - glTextureStorageMem2DEXT = caps.get(1804); - glTextureStorageMem2DMultisampleEXT = caps.get(1805); - glTextureStorageMem3DEXT = caps.get(1806); - glTextureStorageMem3DMultisampleEXT = caps.get(1807); - glNamedBufferStorageMemEXT = caps.get(1808); - glTexStorageMem1DEXT = caps.get(1809); - glTextureStorageMem1DEXT = caps.get(1810); - glImportMemoryFdEXT = caps.get(1811); - glImportMemoryWin32HandleEXT = caps.get(1812); - glImportMemoryWin32NameEXT = caps.get(1813); - glPointParameterfEXT = caps.get(1814); - glPointParameterfvEXT = caps.get(1815); - glPolygonOffsetClampEXT = caps.get(1816); - glProvokingVertexEXT = caps.get(1817); - glRasterSamplesEXT = caps.get(1818); - glSecondaryColor3bEXT = caps.get(1819); - glSecondaryColor3sEXT = caps.get(1820); - glSecondaryColor3iEXT = caps.get(1821); - glSecondaryColor3fEXT = caps.get(1822); - glSecondaryColor3dEXT = caps.get(1823); - glSecondaryColor3ubEXT = caps.get(1824); - glSecondaryColor3usEXT = caps.get(1825); - glSecondaryColor3uiEXT = caps.get(1826); - glSecondaryColor3bvEXT = caps.get(1827); - glSecondaryColor3svEXT = caps.get(1828); - glSecondaryColor3ivEXT = caps.get(1829); - glSecondaryColor3fvEXT = caps.get(1830); - glSecondaryColor3dvEXT = caps.get(1831); - glSecondaryColor3ubvEXT = caps.get(1832); - glSecondaryColor3usvEXT = caps.get(1833); - glSecondaryColor3uivEXT = caps.get(1834); - glSecondaryColorPointerEXT = caps.get(1835); - glGenSemaphoresEXT = caps.get(1836); - glDeleteSemaphoresEXT = caps.get(1837); - glIsSemaphoreEXT = caps.get(1838); - glSemaphoreParameterui64vEXT = caps.get(1839); - glGetSemaphoreParameterui64vEXT = caps.get(1840); - glWaitSemaphoreEXT = caps.get(1841); - glSignalSemaphoreEXT = caps.get(1842); - glImportSemaphoreFdEXT = caps.get(1843); - glImportSemaphoreWin32HandleEXT = caps.get(1844); - glImportSemaphoreWin32NameEXT = caps.get(1845); - glUseShaderProgramEXT = caps.get(1846); - glActiveProgramEXT = caps.get(1847); - glCreateShaderProgramEXT = caps.get(1848); - glFramebufferFetchBarrierEXT = caps.get(1849); - glBindImageTextureEXT = caps.get(1850); - glMemoryBarrierEXT = caps.get(1851); - glStencilClearTagEXT = caps.get(1852); - glActiveStencilFaceEXT = caps.get(1853); - glTexBufferEXT = caps.get(1854); - glClearColorIiEXT = caps.get(1855); - glClearColorIuiEXT = caps.get(1856); - glTexParameterIivEXT = caps.get(1857); - glTexParameterIuivEXT = caps.get(1858); - glGetTexParameterIivEXT = caps.get(1859); - glGetTexParameterIuivEXT = caps.get(1860); - glTexStorage1DEXT = caps.get(1861); - glTexStorage2DEXT = caps.get(1862); - glTexStorage3DEXT = caps.get(1863); - glGetQueryObjecti64vEXT = caps.get(1864); - glGetQueryObjectui64vEXT = caps.get(1865); - glBindBufferRangeEXT = caps.get(1866); - glBindBufferOffsetEXT = caps.get(1867); - glBindBufferBaseEXT = caps.get(1868); - glBeginTransformFeedbackEXT = caps.get(1869); - glEndTransformFeedbackEXT = caps.get(1870); - glTransformFeedbackVaryingsEXT = caps.get(1871); - glGetTransformFeedbackVaryingEXT = caps.get(1872); - glVertexAttribL1dEXT = caps.get(1873); - glVertexAttribL2dEXT = caps.get(1874); - glVertexAttribL3dEXT = caps.get(1875); - glVertexAttribL4dEXT = caps.get(1876); - glVertexAttribL1dvEXT = caps.get(1877); - glVertexAttribL2dvEXT = caps.get(1878); - glVertexAttribL3dvEXT = caps.get(1879); - glVertexAttribL4dvEXT = caps.get(1880); - glVertexAttribLPointerEXT = caps.get(1881); - glGetVertexAttribLdvEXT = caps.get(1882); - glAcquireKeyedMutexWin32EXT = caps.get(1883); - glReleaseKeyedMutexWin32EXT = caps.get(1884); - glWindowRectanglesEXT = caps.get(1885); - glImportSyncEXT = caps.get(1886); - glFrameTerminatorGREMEDY = caps.get(1887); - glStringMarkerGREMEDY = caps.get(1888); - glApplyFramebufferAttachmentCMAAINTEL = caps.get(1889); - glSyncTextureINTEL = caps.get(1890); - glUnmapTexture2DINTEL = caps.get(1891); - glMapTexture2DINTEL = caps.get(1892); - glBeginPerfQueryINTEL = caps.get(1893); - glCreatePerfQueryINTEL = caps.get(1894); - glDeletePerfQueryINTEL = caps.get(1895); - glEndPerfQueryINTEL = caps.get(1896); - glGetFirstPerfQueryIdINTEL = caps.get(1897); - glGetNextPerfQueryIdINTEL = caps.get(1898); - glGetPerfCounterInfoINTEL = caps.get(1899); - glGetPerfQueryDataINTEL = caps.get(1900); - glGetPerfQueryIdByNameINTEL = caps.get(1901); - glGetPerfQueryInfoINTEL = caps.get(1902); - glBlendBarrierKHR = caps.get(1903); - glMaxShaderCompilerThreadsKHR = caps.get(1904); - glFramebufferParameteriMESA = caps.get(1905); - glGetFramebufferParameterivMESA = caps.get(1906); - glAlphaToCoverageDitherControlNV = caps.get(1907); - glMultiDrawArraysIndirectBindlessNV = caps.get(1908); - glMultiDrawElementsIndirectBindlessNV = caps.get(1909); - glMultiDrawArraysIndirectBindlessCountNV = caps.get(1910); - glMultiDrawElementsIndirectBindlessCountNV = caps.get(1911); - glGetTextureHandleNV = caps.get(1912); - glGetTextureSamplerHandleNV = caps.get(1913); - glMakeTextureHandleResidentNV = caps.get(1914); - glMakeTextureHandleNonResidentNV = caps.get(1915); - glGetImageHandleNV = caps.get(1916); - glMakeImageHandleResidentNV = caps.get(1917); - glMakeImageHandleNonResidentNV = caps.get(1918); - glUniformHandleui64NV = caps.get(1919); - glUniformHandleui64vNV = caps.get(1920); - glProgramUniformHandleui64NV = caps.get(1921); - glProgramUniformHandleui64vNV = caps.get(1922); - glIsTextureHandleResidentNV = caps.get(1923); - glIsImageHandleResidentNV = caps.get(1924); - glBlendParameteriNV = caps.get(1925); - glBlendBarrierNV = caps.get(1926); - glViewportPositionWScaleNV = caps.get(1927); - glCreateStatesNV = caps.get(1928); - glDeleteStatesNV = caps.get(1929); - glIsStateNV = caps.get(1930); - glStateCaptureNV = caps.get(1931); - glGetCommandHeaderNV = caps.get(1932); - glGetStageIndexNV = caps.get(1933); - glDrawCommandsNV = caps.get(1934); - glDrawCommandsAddressNV = caps.get(1935); - glDrawCommandsStatesNV = caps.get(1936); - glDrawCommandsStatesAddressNV = caps.get(1937); - glCreateCommandListsNV = caps.get(1938); - glDeleteCommandListsNV = caps.get(1939); - glIsCommandListNV = caps.get(1940); - glListDrawCommandsStatesClientNV = caps.get(1941); - glCommandListSegmentsNV = caps.get(1942); - glCompileCommandListNV = caps.get(1943); - glCallCommandListNV = caps.get(1944); - glBeginConditionalRenderNV = caps.get(1945); - glEndConditionalRenderNV = caps.get(1946); - glSubpixelPrecisionBiasNV = caps.get(1947); - glConservativeRasterParameterfNV = caps.get(1948); - glConservativeRasterParameteriNV = caps.get(1949); - glCopyImageSubDataNV = caps.get(1950); - glDepthRangedNV = caps.get(1951); - glClearDepthdNV = caps.get(1952); - glDepthBoundsdNV = caps.get(1953); - glDrawTextureNV = caps.get(1954); - glDrawVkImageNV = caps.get(1955); - glGetVkProcAddrNV = caps.get(1956); - glWaitVkSemaphoreNV = caps.get(1957); - glSignalVkSemaphoreNV = caps.get(1958); - glSignalVkFenceNV = caps.get(1959); - glGetMultisamplefvNV = caps.get(1960); - glSampleMaskIndexedNV = caps.get(1961); - glTexRenderbufferNV = caps.get(1962); - glDeleteFencesNV = caps.get(1963); - glGenFencesNV = caps.get(1964); - glIsFenceNV = caps.get(1965); - glTestFenceNV = caps.get(1966); - glGetFenceivNV = caps.get(1967); - glFinishFenceNV = caps.get(1968); - glSetFenceNV = caps.get(1969); - glFragmentCoverageColorNV = caps.get(1970); - glCoverageModulationTableNV = caps.get(1971); - glGetCoverageModulationTableNV = caps.get(1972); - glCoverageModulationNV = caps.get(1973); - glRenderbufferStorageMultisampleCoverageNV = caps.get(1974); - glRenderGpuMaskNV = caps.get(1975); - glMulticastBufferSubDataNV = caps.get(1976); - glMulticastCopyBufferSubDataNV = caps.get(1977); - glMulticastCopyImageSubDataNV = caps.get(1978); - glMulticastBlitFramebufferNV = caps.get(1979); - glMulticastFramebufferSampleLocationsfvNV = caps.get(1980); - glMulticastBarrierNV = caps.get(1981); - glMulticastWaitSyncNV = caps.get(1982); - glMulticastGetQueryObjectivNV = caps.get(1983); - glMulticastGetQueryObjectuivNV = caps.get(1984); - glMulticastGetQueryObjecti64vNV = caps.get(1985); - glMulticastGetQueryObjectui64vNV = caps.get(1986); - glVertex2hNV = caps.get(1987); - glVertex2hvNV = caps.get(1988); - glVertex3hNV = caps.get(1989); - glVertex3hvNV = caps.get(1990); - glVertex4hNV = caps.get(1991); - glVertex4hvNV = caps.get(1992); - glNormal3hNV = caps.get(1993); - glNormal3hvNV = caps.get(1994); - glColor3hNV = caps.get(1995); - glColor3hvNV = caps.get(1996); - glColor4hNV = caps.get(1997); - glColor4hvNV = caps.get(1998); - glTexCoord1hNV = caps.get(1999); - glTexCoord1hvNV = caps.get(2000); - glTexCoord2hNV = caps.get(2001); - glTexCoord2hvNV = caps.get(2002); - glTexCoord3hNV = caps.get(2003); - glTexCoord3hvNV = caps.get(2004); - glTexCoord4hNV = caps.get(2005); - glTexCoord4hvNV = caps.get(2006); - glMultiTexCoord1hNV = caps.get(2007); - glMultiTexCoord1hvNV = caps.get(2008); - glMultiTexCoord2hNV = caps.get(2009); - glMultiTexCoord2hvNV = caps.get(2010); - glMultiTexCoord3hNV = caps.get(2011); - glMultiTexCoord3hvNV = caps.get(2012); - glMultiTexCoord4hNV = caps.get(2013); - glMultiTexCoord4hvNV = caps.get(2014); - glFogCoordhNV = caps.get(2015); - glFogCoordhvNV = caps.get(2016); - glSecondaryColor3hNV = caps.get(2017); - glSecondaryColor3hvNV = caps.get(2018); - glVertexWeighthNV = caps.get(2019); - glVertexWeighthvNV = caps.get(2020); - glVertexAttrib1hNV = caps.get(2021); - glVertexAttrib1hvNV = caps.get(2022); - glVertexAttrib2hNV = caps.get(2023); - glVertexAttrib2hvNV = caps.get(2024); - glVertexAttrib3hNV = caps.get(2025); - glVertexAttrib3hvNV = caps.get(2026); - glVertexAttrib4hNV = caps.get(2027); - glVertexAttrib4hvNV = caps.get(2028); - glVertexAttribs1hvNV = caps.get(2029); - glVertexAttribs2hvNV = caps.get(2030); - glVertexAttribs3hvNV = caps.get(2031); - glVertexAttribs4hvNV = caps.get(2032); - glGetInternalformatSampleivNV = caps.get(2033); - glGetMemoryObjectDetachedResourcesuivNV = caps.get(2034); - glResetMemoryObjectParameterNV = caps.get(2035); - glTexAttachMemoryNV = caps.get(2036); - glBufferAttachMemoryNV = caps.get(2037); - glTextureAttachMemoryNV = caps.get(2038); - glNamedBufferAttachMemoryNV = caps.get(2039); - glBufferPageCommitmentMemNV = caps.get(2040); - glNamedBufferPageCommitmentMemNV = caps.get(2041); - glTexPageCommitmentMemNV = caps.get(2042); - glTexturePageCommitmentMemNV = caps.get(2043); - glDrawMeshTasksNV = caps.get(2044); - glDrawMeshTasksIndirectNV = caps.get(2045); - glMultiDrawMeshTasksIndirectNV = caps.get(2046); - glMultiDrawMeshTasksIndirectCountNV = caps.get(2047); - glPathCommandsNV = caps.get(2048); - glPathCoordsNV = caps.get(2049); - glPathSubCommandsNV = caps.get(2050); - glPathSubCoordsNV = caps.get(2051); - glPathStringNV = caps.get(2052); - glPathGlyphsNV = caps.get(2053); - glPathGlyphRangeNV = caps.get(2054); - glPathGlyphIndexArrayNV = caps.get(2055); - glPathMemoryGlyphIndexArrayNV = caps.get(2056); - glCopyPathNV = caps.get(2057); - glWeightPathsNV = caps.get(2058); - glInterpolatePathsNV = caps.get(2059); - glTransformPathNV = caps.get(2060); - glPathParameterivNV = caps.get(2061); - glPathParameteriNV = caps.get(2062); - glPathParameterfvNV = caps.get(2063); - glPathParameterfNV = caps.get(2064); - glPathDashArrayNV = caps.get(2065); - glGenPathsNV = caps.get(2066); - glDeletePathsNV = caps.get(2067); - glIsPathNV = caps.get(2068); - glPathStencilFuncNV = caps.get(2069); - glPathStencilDepthOffsetNV = caps.get(2070); - glStencilFillPathNV = caps.get(2071); - glStencilStrokePathNV = caps.get(2072); - glStencilFillPathInstancedNV = caps.get(2073); - glStencilStrokePathInstancedNV = caps.get(2074); - glPathCoverDepthFuncNV = caps.get(2075); - glPathColorGenNV = caps.get(2076); - glPathTexGenNV = caps.get(2077); - glPathFogGenNV = caps.get(2078); - glCoverFillPathNV = caps.get(2079); - glCoverStrokePathNV = caps.get(2080); - glCoverFillPathInstancedNV = caps.get(2081); - glCoverStrokePathInstancedNV = caps.get(2082); - glStencilThenCoverFillPathNV = caps.get(2083); - glStencilThenCoverStrokePathNV = caps.get(2084); - glStencilThenCoverFillPathInstancedNV = caps.get(2085); - glStencilThenCoverStrokePathInstancedNV = caps.get(2086); - glPathGlyphIndexRangeNV = caps.get(2087); - glProgramPathFragmentInputGenNV = caps.get(2088); - glGetPathParameterivNV = caps.get(2089); - glGetPathParameterfvNV = caps.get(2090); - glGetPathCommandsNV = caps.get(2091); - glGetPathCoordsNV = caps.get(2092); - glGetPathDashArrayNV = caps.get(2093); - glGetPathMetricsNV = caps.get(2094); - glGetPathMetricRangeNV = caps.get(2095); - glGetPathSpacingNV = caps.get(2096); - glGetPathColorGenivNV = caps.get(2097); - glGetPathColorGenfvNV = caps.get(2098); - glGetPathTexGenivNV = caps.get(2099); - glGetPathTexGenfvNV = caps.get(2100); - glIsPointInFillPathNV = caps.get(2101); - glIsPointInStrokePathNV = caps.get(2102); - glGetPathLengthNV = caps.get(2103); - glPointAlongPathNV = caps.get(2104); - glMatrixLoad3x2fNV = caps.get(2105); - glMatrixLoad3x3fNV = caps.get(2106); - glMatrixLoadTranspose3x3fNV = caps.get(2107); - glMatrixMult3x2fNV = caps.get(2108); - glMatrixMult3x3fNV = caps.get(2109); - glMatrixMultTranspose3x3fNV = caps.get(2110); - glGetProgramResourcefvNV = caps.get(2111); - glPixelDataRangeNV = caps.get(2112); - glFlushPixelDataRangeNV = caps.get(2113); - glPointParameteriNV = caps.get(2114); - glPointParameterivNV = caps.get(2115); - glPrimitiveRestartNV = caps.get(2116); - glPrimitiveRestartIndexNV = caps.get(2117); - glQueryResourceNV = caps.get(2118); - glGenQueryResourceTagNV = caps.get(2119); - glDeleteQueryResourceTagNV = caps.get(2120); - glQueryResourceTagNV = caps.get(2121); - glFramebufferSampleLocationsfvNV = caps.get(2122); - glNamedFramebufferSampleLocationsfvNV = caps.get(2123); - glResolveDepthValuesNV = caps.get(2124); - glScissorExclusiveArrayvNV = caps.get(2125); - glScissorExclusiveNV = caps.get(2126); - glMakeBufferResidentNV = caps.get(2127); - glMakeBufferNonResidentNV = caps.get(2128); - glIsBufferResidentNV = caps.get(2129); - glMakeNamedBufferResidentNV = caps.get(2130); - glMakeNamedBufferNonResidentNV = caps.get(2131); - glIsNamedBufferResidentNV = caps.get(2132); - glGetBufferParameterui64vNV = caps.get(2133); - glGetNamedBufferParameterui64vNV = caps.get(2134); - glGetIntegerui64vNV = caps.get(2135); - glUniformui64NV = caps.get(2136); - glUniformui64vNV = caps.get(2137); - glProgramUniformui64NV = caps.get(2138); - glProgramUniformui64vNV = caps.get(2139); - glBindShadingRateImageNV = caps.get(2140); - glShadingRateImagePaletteNV = caps.get(2141); - glGetShadingRateImagePaletteNV = caps.get(2142); - glShadingRateImageBarrierNV = caps.get(2143); - glShadingRateSampleOrderNV = caps.get(2144); - glShadingRateSampleOrderCustomNV = caps.get(2145); - glGetShadingRateSampleLocationivNV = caps.get(2146); - glTextureBarrierNV = caps.get(2147); - glTexImage2DMultisampleCoverageNV = caps.get(2148); - glTexImage3DMultisampleCoverageNV = caps.get(2149); - glTextureImage2DMultisampleNV = caps.get(2150); - glTextureImage3DMultisampleNV = caps.get(2151); - glTextureImage2DMultisampleCoverageNV = caps.get(2152); - glTextureImage3DMultisampleCoverageNV = caps.get(2153); - glCreateSemaphoresNV = caps.get(2154); - glSemaphoreParameterivNV = caps.get(2155); - glGetSemaphoreParameterivNV = caps.get(2156); - glBeginTransformFeedbackNV = caps.get(2157); - glEndTransformFeedbackNV = caps.get(2158); - glTransformFeedbackAttribsNV = caps.get(2159); - glBindBufferRangeNV = caps.get(2160); - glBindBufferOffsetNV = caps.get(2161); - glBindBufferBaseNV = caps.get(2162); - glTransformFeedbackVaryingsNV = caps.get(2163); - glActiveVaryingNV = caps.get(2164); - glGetVaryingLocationNV = caps.get(2165); - glGetActiveVaryingNV = caps.get(2166); - glGetTransformFeedbackVaryingNV = caps.get(2167); - glTransformFeedbackStreamAttribsNV = caps.get(2168); - glBindTransformFeedbackNV = caps.get(2169); - glDeleteTransformFeedbacksNV = caps.get(2170); - glGenTransformFeedbacksNV = caps.get(2171); - glIsTransformFeedbackNV = caps.get(2172); - glPauseTransformFeedbackNV = caps.get(2173); - glResumeTransformFeedbackNV = caps.get(2174); - glDrawTransformFeedbackNV = caps.get(2175); - glVertexArrayRangeNV = caps.get(2176); - glFlushVertexArrayRangeNV = caps.get(2177); - glVertexAttribL1i64NV = caps.get(2178); - glVertexAttribL2i64NV = caps.get(2179); - glVertexAttribL3i64NV = caps.get(2180); - glVertexAttribL4i64NV = caps.get(2181); - glVertexAttribL1i64vNV = caps.get(2182); - glVertexAttribL2i64vNV = caps.get(2183); - glVertexAttribL3i64vNV = caps.get(2184); - glVertexAttribL4i64vNV = caps.get(2185); - glVertexAttribL1ui64NV = caps.get(2186); - glVertexAttribL2ui64NV = caps.get(2187); - glVertexAttribL3ui64NV = caps.get(2188); - glVertexAttribL4ui64NV = caps.get(2189); - glVertexAttribL1ui64vNV = caps.get(2190); - glVertexAttribL2ui64vNV = caps.get(2191); - glVertexAttribL3ui64vNV = caps.get(2192); - glVertexAttribL4ui64vNV = caps.get(2193); - glGetVertexAttribLi64vNV = caps.get(2194); - glGetVertexAttribLui64vNV = caps.get(2195); - glVertexAttribLFormatNV = caps.get(2196); - glBufferAddressRangeNV = caps.get(2197); - glVertexFormatNV = caps.get(2198); - glNormalFormatNV = caps.get(2199); - glColorFormatNV = caps.get(2200); - glIndexFormatNV = caps.get(2201); - glTexCoordFormatNV = caps.get(2202); - glEdgeFlagFormatNV = caps.get(2203); - glSecondaryColorFormatNV = caps.get(2204); - glFogCoordFormatNV = caps.get(2205); - glVertexAttribFormatNV = caps.get(2206); - glVertexAttribIFormatNV = caps.get(2207); - glGetIntegerui64i_vNV = caps.get(2208); - glViewportSwizzleNV = caps.get(2209); - glBeginConditionalRenderNVX = caps.get(2210); - glEndConditionalRenderNVX = caps.get(2211); - glAsyncCopyImageSubDataNVX = caps.get(2212); - glAsyncCopyBufferSubDataNVX = caps.get(2213); - glUploadGpuMaskNVX = caps.get(2214); - glMulticastViewportArrayvNVX = caps.get(2215); - glMulticastScissorArrayvNVX = caps.get(2216); - glMulticastViewportPositionWScaleNVX = caps.get(2217); - glCreateProgressFenceNVX = caps.get(2218); - glSignalSemaphoreui64NVX = caps.get(2219); - glWaitSemaphoreui64NVX = caps.get(2220); - glClientWaitSemaphoreui64NVX = caps.get(2221); - glFramebufferTextureMultiviewOVR = caps.get(2222); - glNamedFramebufferTextureMultiviewOVR = caps.get(2223); + glCreateSyncFromCLeventARB = caps.get(1128); + glClearNamedBufferDataEXT = caps.get(1129); + glClearNamedBufferSubDataEXT = caps.get(1130); + glClampColorARB = caps.get(1131); + glDispatchComputeGroupSizeARB = caps.get(1132); + glDebugMessageControlARB = caps.get(1133); + glDebugMessageInsertARB = caps.get(1134); + glDebugMessageCallbackARB = caps.get(1135); + glGetDebugMessageLogARB = caps.get(1136); + glDrawBuffersARB = caps.get(1137); + glBlendEquationiARB = caps.get(1138); + glBlendEquationSeparateiARB = caps.get(1139); + glBlendFunciARB = caps.get(1140); + glBlendFuncSeparateiARB = caps.get(1141); + glDrawArraysInstancedARB = caps.get(1142); + glDrawElementsInstancedARB = caps.get(1143); + glPrimitiveBoundingBoxARB = caps.get(1144); + glNamedFramebufferParameteriEXT = caps.get(1145); + glGetNamedFramebufferParameterivEXT = caps.get(1146); + glProgramParameteriARB = caps.get(1147); + glFramebufferTextureARB = caps.get(1148); + glFramebufferTextureLayerARB = caps.get(1149); + glFramebufferTextureFaceARB = caps.get(1150); + glSpecializeShaderARB = caps.get(1151); + glProgramUniform1dEXT = caps.get(1152); + glProgramUniform2dEXT = caps.get(1153); + glProgramUniform3dEXT = caps.get(1154); + glProgramUniform4dEXT = caps.get(1155); + glProgramUniform1dvEXT = caps.get(1156); + glProgramUniform2dvEXT = caps.get(1157); + glProgramUniform3dvEXT = caps.get(1158); + glProgramUniform4dvEXT = caps.get(1159); + glProgramUniformMatrix2dvEXT = caps.get(1160); + glProgramUniformMatrix3dvEXT = caps.get(1161); + glProgramUniformMatrix4dvEXT = caps.get(1162); + glProgramUniformMatrix2x3dvEXT = caps.get(1163); + glProgramUniformMatrix2x4dvEXT = caps.get(1164); + glProgramUniformMatrix3x2dvEXT = caps.get(1165); + glProgramUniformMatrix3x4dvEXT = caps.get(1166); + glProgramUniformMatrix4x2dvEXT = caps.get(1167); + glProgramUniformMatrix4x3dvEXT = caps.get(1168); + glUniform1i64ARB = caps.get(1169); + glUniform1i64vARB = caps.get(1170); + glProgramUniform1i64ARB = caps.get(1171); + glProgramUniform1i64vARB = caps.get(1172); + glUniform2i64ARB = caps.get(1173); + glUniform2i64vARB = caps.get(1174); + glProgramUniform2i64ARB = caps.get(1175); + glProgramUniform2i64vARB = caps.get(1176); + glUniform3i64ARB = caps.get(1177); + glUniform3i64vARB = caps.get(1178); + glProgramUniform3i64ARB = caps.get(1179); + glProgramUniform3i64vARB = caps.get(1180); + glUniform4i64ARB = caps.get(1181); + glUniform4i64vARB = caps.get(1182); + glProgramUniform4i64ARB = caps.get(1183); + glProgramUniform4i64vARB = caps.get(1184); + glUniform1ui64ARB = caps.get(1185); + glUniform1ui64vARB = caps.get(1186); + glProgramUniform1ui64ARB = caps.get(1187); + glProgramUniform1ui64vARB = caps.get(1188); + glUniform2ui64ARB = caps.get(1189); + glUniform2ui64vARB = caps.get(1190); + glProgramUniform2ui64ARB = caps.get(1191); + glProgramUniform2ui64vARB = caps.get(1192); + glUniform3ui64ARB = caps.get(1193); + glUniform3ui64vARB = caps.get(1194); + glProgramUniform3ui64ARB = caps.get(1195); + glProgramUniform3ui64vARB = caps.get(1196); + glUniform4ui64ARB = caps.get(1197); + glUniform4ui64vARB = caps.get(1198); + glProgramUniform4ui64ARB = caps.get(1199); + glProgramUniform4ui64vARB = caps.get(1200); + glGetUniformi64vARB = caps.get(1201); + glGetUniformui64vARB = caps.get(1202); + glGetnUniformi64vARB = caps.get(1203); + glGetnUniformui64vARB = caps.get(1204); + glColorTable = caps.get(1205); + glCopyColorTable = caps.get(1206); + glColorTableParameteriv = caps.get(1207); + glColorTableParameterfv = caps.get(1208); + glGetColorTable = caps.get(1209); + glGetColorTableParameteriv = caps.get(1210); + glGetColorTableParameterfv = caps.get(1211); + glColorSubTable = caps.get(1212); + glCopyColorSubTable = caps.get(1213); + glConvolutionFilter1D = caps.get(1214); + glConvolutionFilter2D = caps.get(1215); + glCopyConvolutionFilter1D = caps.get(1216); + glCopyConvolutionFilter2D = caps.get(1217); + glGetConvolutionFilter = caps.get(1218); + glSeparableFilter2D = caps.get(1219); + glGetSeparableFilter = caps.get(1220); + glConvolutionParameteri = caps.get(1221); + glConvolutionParameteriv = caps.get(1222); + glConvolutionParameterf = caps.get(1223); + glConvolutionParameterfv = caps.get(1224); + glGetConvolutionParameteriv = caps.get(1225); + glGetConvolutionParameterfv = caps.get(1226); + glHistogram = caps.get(1227); + glResetHistogram = caps.get(1228); + glGetHistogram = caps.get(1229); + glGetHistogramParameteriv = caps.get(1230); + glGetHistogramParameterfv = caps.get(1231); + glMinmax = caps.get(1232); + glResetMinmax = caps.get(1233); + glGetMinmax = caps.get(1234); + glGetMinmaxParameteriv = caps.get(1235); + glGetMinmaxParameterfv = caps.get(1236); + glMultiDrawArraysIndirectCountARB = caps.get(1237); + glMultiDrawElementsIndirectCountARB = caps.get(1238); + glVertexAttribDivisorARB = caps.get(1239); + glVertexArrayVertexAttribDivisorEXT = caps.get(1240); + glCurrentPaletteMatrixARB = caps.get(1241); + glMatrixIndexuivARB = caps.get(1242); + glMatrixIndexubvARB = caps.get(1243); + glMatrixIndexusvARB = caps.get(1244); + glMatrixIndexPointerARB = caps.get(1245); + glSampleCoverageARB = caps.get(1246); + glActiveTextureARB = caps.get(1247); + glClientActiveTextureARB = caps.get(1248); + glMultiTexCoord1fARB = caps.get(1249); + glMultiTexCoord1sARB = caps.get(1250); + glMultiTexCoord1iARB = caps.get(1251); + glMultiTexCoord1dARB = caps.get(1252); + glMultiTexCoord1fvARB = caps.get(1253); + glMultiTexCoord1svARB = caps.get(1254); + glMultiTexCoord1ivARB = caps.get(1255); + glMultiTexCoord1dvARB = caps.get(1256); + glMultiTexCoord2fARB = caps.get(1257); + glMultiTexCoord2sARB = caps.get(1258); + glMultiTexCoord2iARB = caps.get(1259); + glMultiTexCoord2dARB = caps.get(1260); + glMultiTexCoord2fvARB = caps.get(1261); + glMultiTexCoord2svARB = caps.get(1262); + glMultiTexCoord2ivARB = caps.get(1263); + glMultiTexCoord2dvARB = caps.get(1264); + glMultiTexCoord3fARB = caps.get(1265); + glMultiTexCoord3sARB = caps.get(1266); + glMultiTexCoord3iARB = caps.get(1267); + glMultiTexCoord3dARB = caps.get(1268); + glMultiTexCoord3fvARB = caps.get(1269); + glMultiTexCoord3svARB = caps.get(1270); + glMultiTexCoord3ivARB = caps.get(1271); + glMultiTexCoord3dvARB = caps.get(1272); + glMultiTexCoord4fARB = caps.get(1273); + glMultiTexCoord4sARB = caps.get(1274); + glMultiTexCoord4iARB = caps.get(1275); + glMultiTexCoord4dARB = caps.get(1276); + glMultiTexCoord4fvARB = caps.get(1277); + glMultiTexCoord4svARB = caps.get(1278); + glMultiTexCoord4ivARB = caps.get(1279); + glMultiTexCoord4dvARB = caps.get(1280); + glGenQueriesARB = caps.get(1281); + glDeleteQueriesARB = caps.get(1282); + glIsQueryARB = caps.get(1283); + glBeginQueryARB = caps.get(1284); + glEndQueryARB = caps.get(1285); + glGetQueryivARB = caps.get(1286); + glGetQueryObjectivARB = caps.get(1287); + glGetQueryObjectuivARB = caps.get(1288); + glMaxShaderCompilerThreadsARB = caps.get(1289); + glPointParameterfARB = caps.get(1290); + glPointParameterfvARB = caps.get(1291); + glGetGraphicsResetStatusARB = caps.get(1292); + glGetnMapdvARB = caps.get(1293); + glGetnMapfvARB = caps.get(1294); + glGetnMapivARB = caps.get(1295); + glGetnPixelMapfvARB = caps.get(1296); + glGetnPixelMapuivARB = caps.get(1297); + glGetnPixelMapusvARB = caps.get(1298); + glGetnPolygonStippleARB = caps.get(1299); + glGetnTexImageARB = caps.get(1300); + glReadnPixelsARB = caps.get(1301); + glGetnColorTableARB = caps.get(1302); + glGetnConvolutionFilterARB = caps.get(1303); + glGetnSeparableFilterARB = caps.get(1304); + glGetnHistogramARB = caps.get(1305); + glGetnMinmaxARB = caps.get(1306); + glGetnCompressedTexImageARB = caps.get(1307); + glGetnUniformfvARB = caps.get(1308); + glGetnUniformivARB = caps.get(1309); + glGetnUniformuivARB = caps.get(1310); + glGetnUniformdvARB = caps.get(1311); + glFramebufferSampleLocationsfvARB = caps.get(1312); + glNamedFramebufferSampleLocationsfvARB = caps.get(1313); + glEvaluateDepthValuesARB = caps.get(1314); + glMinSampleShadingARB = caps.get(1315); + glDeleteObjectARB = caps.get(1316); + glGetHandleARB = caps.get(1317); + glDetachObjectARB = caps.get(1318); + glCreateShaderObjectARB = caps.get(1319); + glShaderSourceARB = caps.get(1320); + glCompileShaderARB = caps.get(1321); + glCreateProgramObjectARB = caps.get(1322); + glAttachObjectARB = caps.get(1323); + glLinkProgramARB = caps.get(1324); + glUseProgramObjectARB = caps.get(1325); + glValidateProgramARB = caps.get(1326); + glUniform1fARB = caps.get(1327); + glUniform2fARB = caps.get(1328); + glUniform3fARB = caps.get(1329); + glUniform4fARB = caps.get(1330); + glUniform1iARB = caps.get(1331); + glUniform2iARB = caps.get(1332); + glUniform3iARB = caps.get(1333); + glUniform4iARB = caps.get(1334); + glUniform1fvARB = caps.get(1335); + glUniform2fvARB = caps.get(1336); + glUniform3fvARB = caps.get(1337); + glUniform4fvARB = caps.get(1338); + glUniform1ivARB = caps.get(1339); + glUniform2ivARB = caps.get(1340); + glUniform3ivARB = caps.get(1341); + glUniform4ivARB = caps.get(1342); + glUniformMatrix2fvARB = caps.get(1343); + glUniformMatrix3fvARB = caps.get(1344); + glUniformMatrix4fvARB = caps.get(1345); + glGetObjectParameterfvARB = caps.get(1346); + glGetObjectParameterivARB = caps.get(1347); + glGetInfoLogARB = caps.get(1348); + glGetAttachedObjectsARB = caps.get(1349); + glGetUniformLocationARB = caps.get(1350); + glGetActiveUniformARB = caps.get(1351); + glGetUniformfvARB = caps.get(1352); + glGetUniformivARB = caps.get(1353); + glGetShaderSourceARB = caps.get(1354); + glNamedStringARB = caps.get(1355); + glDeleteNamedStringARB = caps.get(1356); + glCompileShaderIncludeARB = caps.get(1357); + glIsNamedStringARB = caps.get(1358); + glGetNamedStringARB = caps.get(1359); + glGetNamedStringivARB = caps.get(1360); + glBufferPageCommitmentARB = caps.get(1361); + glNamedBufferPageCommitmentEXT = caps.get(1362); + glNamedBufferPageCommitmentARB = caps.get(1363); + glTexPageCommitmentARB = caps.get(1364); + glTexturePageCommitmentEXT = caps.get(1365); + glTexBufferARB = caps.get(1366); + glTextureBufferRangeEXT = caps.get(1367); + glCompressedTexImage3DARB = caps.get(1368); + glCompressedTexImage2DARB = caps.get(1369); + glCompressedTexImage1DARB = caps.get(1370); + glCompressedTexSubImage3DARB = caps.get(1371); + glCompressedTexSubImage2DARB = caps.get(1372); + glCompressedTexSubImage1DARB = caps.get(1373); + glGetCompressedTexImageARB = caps.get(1374); + glTextureStorage1DEXT = caps.get(1375); + glTextureStorage2DEXT = caps.get(1376); + glTextureStorage3DEXT = caps.get(1377); + glTextureStorage2DMultisampleEXT = caps.get(1378); + glTextureStorage3DMultisampleEXT = caps.get(1379); + glLoadTransposeMatrixfARB = caps.get(1380); + glLoadTransposeMatrixdARB = caps.get(1381); + glMultTransposeMatrixfARB = caps.get(1382); + glMultTransposeMatrixdARB = caps.get(1383); + glVertexArrayVertexAttribLOffsetEXT = caps.get(1384); + glVertexArrayBindVertexBufferEXT = caps.get(1385); + glVertexArrayVertexAttribFormatEXT = caps.get(1386); + glVertexArrayVertexAttribIFormatEXT = caps.get(1387); + glVertexArrayVertexAttribLFormatEXT = caps.get(1388); + glVertexArrayVertexAttribBindingEXT = caps.get(1389); + glVertexArrayVertexBindingDivisorEXT = caps.get(1390); + glWeightfvARB = caps.get(1391); + glWeightbvARB = caps.get(1392); + glWeightubvARB = caps.get(1393); + glWeightsvARB = caps.get(1394); + glWeightusvARB = caps.get(1395); + glWeightivARB = caps.get(1396); + glWeightuivARB = caps.get(1397); + glWeightdvARB = caps.get(1398); + glWeightPointerARB = caps.get(1399); + glVertexBlendARB = caps.get(1400); + glBindBufferARB = caps.get(1401); + glDeleteBuffersARB = caps.get(1402); + glGenBuffersARB = caps.get(1403); + glIsBufferARB = caps.get(1404); + glBufferDataARB = caps.get(1405); + glBufferSubDataARB = caps.get(1406); + glGetBufferSubDataARB = caps.get(1407); + glMapBufferARB = caps.get(1408); + glUnmapBufferARB = caps.get(1409); + glGetBufferParameterivARB = caps.get(1410); + glGetBufferPointervARB = caps.get(1411); + glVertexAttrib1sARB = caps.get(1412); + glVertexAttrib1fARB = caps.get(1413); + glVertexAttrib1dARB = caps.get(1414); + glVertexAttrib2sARB = caps.get(1415); + glVertexAttrib2fARB = caps.get(1416); + glVertexAttrib2dARB = caps.get(1417); + glVertexAttrib3sARB = caps.get(1418); + glVertexAttrib3fARB = caps.get(1419); + glVertexAttrib3dARB = caps.get(1420); + glVertexAttrib4sARB = caps.get(1421); + glVertexAttrib4fARB = caps.get(1422); + glVertexAttrib4dARB = caps.get(1423); + glVertexAttrib4NubARB = caps.get(1424); + glVertexAttrib1svARB = caps.get(1425); + glVertexAttrib1fvARB = caps.get(1426); + glVertexAttrib1dvARB = caps.get(1427); + glVertexAttrib2svARB = caps.get(1428); + glVertexAttrib2fvARB = caps.get(1429); + glVertexAttrib2dvARB = caps.get(1430); + glVertexAttrib3svARB = caps.get(1431); + glVertexAttrib3fvARB = caps.get(1432); + glVertexAttrib3dvARB = caps.get(1433); + glVertexAttrib4fvARB = caps.get(1434); + glVertexAttrib4bvARB = caps.get(1435); + glVertexAttrib4svARB = caps.get(1436); + glVertexAttrib4ivARB = caps.get(1437); + glVertexAttrib4ubvARB = caps.get(1438); + glVertexAttrib4usvARB = caps.get(1439); + glVertexAttrib4uivARB = caps.get(1440); + glVertexAttrib4dvARB = caps.get(1441); + glVertexAttrib4NbvARB = caps.get(1442); + glVertexAttrib4NsvARB = caps.get(1443); + glVertexAttrib4NivARB = caps.get(1444); + glVertexAttrib4NubvARB = caps.get(1445); + glVertexAttrib4NusvARB = caps.get(1446); + glVertexAttrib4NuivARB = caps.get(1447); + glVertexAttribPointerARB = caps.get(1448); + glEnableVertexAttribArrayARB = caps.get(1449); + glDisableVertexAttribArrayARB = caps.get(1450); + glProgramStringARB = caps.get(1451); + glBindProgramARB = caps.get(1452); + glDeleteProgramsARB = caps.get(1453); + glGenProgramsARB = caps.get(1454); + glProgramEnvParameter4dARB = caps.get(1455); + glProgramEnvParameter4dvARB = caps.get(1456); + glProgramEnvParameter4fARB = caps.get(1457); + glProgramEnvParameter4fvARB = caps.get(1458); + glProgramLocalParameter4dARB = caps.get(1459); + glProgramLocalParameter4dvARB = caps.get(1460); + glProgramLocalParameter4fARB = caps.get(1461); + glProgramLocalParameter4fvARB = caps.get(1462); + glGetProgramEnvParameterfvARB = caps.get(1463); + glGetProgramEnvParameterdvARB = caps.get(1464); + glGetProgramLocalParameterfvARB = caps.get(1465); + glGetProgramLocalParameterdvARB = caps.get(1466); + glGetProgramivARB = caps.get(1467); + glGetProgramStringARB = caps.get(1468); + glGetVertexAttribfvARB = caps.get(1469); + glGetVertexAttribdvARB = caps.get(1470); + glGetVertexAttribivARB = caps.get(1471); + glGetVertexAttribPointervARB = caps.get(1472); + glIsProgramARB = caps.get(1473); + glBindAttribLocationARB = caps.get(1474); + glGetActiveAttribARB = caps.get(1475); + glGetAttribLocationARB = caps.get(1476); + glWindowPos2iARB = caps.get(1477); + glWindowPos2sARB = caps.get(1478); + glWindowPos2fARB = caps.get(1479); + glWindowPos2dARB = caps.get(1480); + glWindowPos2ivARB = caps.get(1481); + glWindowPos2svARB = caps.get(1482); + glWindowPos2fvARB = caps.get(1483); + glWindowPos2dvARB = caps.get(1484); + glWindowPos3iARB = caps.get(1485); + glWindowPos3sARB = caps.get(1486); + glWindowPos3fARB = caps.get(1487); + glWindowPos3dARB = caps.get(1488); + glWindowPos3ivARB = caps.get(1489); + glWindowPos3svARB = caps.get(1490); + glWindowPos3fvARB = caps.get(1491); + glWindowPos3dvARB = caps.get(1492); + glUniformBufferEXT = caps.get(1493); + glGetUniformBufferSizeEXT = caps.get(1494); + glGetUniformOffsetEXT = caps.get(1495); + glBlendColorEXT = caps.get(1496); + glBlendEquationSeparateEXT = caps.get(1497); + glBlendFuncSeparateEXT = caps.get(1498); + glBlendEquationEXT = caps.get(1499); + glLockArraysEXT = caps.get(1500); + glUnlockArraysEXT = caps.get(1501); + glLabelObjectEXT = caps.get(1502); + glGetObjectLabelEXT = caps.get(1503); + glInsertEventMarkerEXT = caps.get(1504); + glPushGroupMarkerEXT = caps.get(1505); + glPopGroupMarkerEXT = caps.get(1506); + glDepthBoundsEXT = caps.get(1507); + glClientAttribDefaultEXT = caps.get(1508); + glPushClientAttribDefaultEXT = caps.get(1509); + glMatrixLoadfEXT = caps.get(1510); + glMatrixLoaddEXT = caps.get(1511); + glMatrixMultfEXT = caps.get(1512); + glMatrixMultdEXT = caps.get(1513); + glMatrixLoadIdentityEXT = caps.get(1514); + glMatrixRotatefEXT = caps.get(1515); + glMatrixRotatedEXT = caps.get(1516); + glMatrixScalefEXT = caps.get(1517); + glMatrixScaledEXT = caps.get(1518); + glMatrixTranslatefEXT = caps.get(1519); + glMatrixTranslatedEXT = caps.get(1520); + glMatrixOrthoEXT = caps.get(1521); + glMatrixFrustumEXT = caps.get(1522); + glMatrixPushEXT = caps.get(1523); + glMatrixPopEXT = caps.get(1524); + glTextureParameteriEXT = caps.get(1525); + glTextureParameterivEXT = caps.get(1526); + glTextureParameterfEXT = caps.get(1527); + glTextureParameterfvEXT = caps.get(1528); + glTextureImage1DEXT = caps.get(1529); + glTextureImage2DEXT = caps.get(1530); + glTextureSubImage1DEXT = caps.get(1531); + glTextureSubImage2DEXT = caps.get(1532); + glCopyTextureImage1DEXT = caps.get(1533); + glCopyTextureImage2DEXT = caps.get(1534); + glCopyTextureSubImage1DEXT = caps.get(1535); + glCopyTextureSubImage2DEXT = caps.get(1536); + glGetTextureImageEXT = caps.get(1537); + glGetTextureParameterfvEXT = caps.get(1538); + glGetTextureParameterivEXT = caps.get(1539); + glGetTextureLevelParameterfvEXT = caps.get(1540); + glGetTextureLevelParameterivEXT = caps.get(1541); + glTextureImage3DEXT = caps.get(1542); + glTextureSubImage3DEXT = caps.get(1543); + glCopyTextureSubImage3DEXT = caps.get(1544); + glBindMultiTextureEXT = caps.get(1545); + glMultiTexCoordPointerEXT = caps.get(1546); + glMultiTexEnvfEXT = caps.get(1547); + glMultiTexEnvfvEXT = caps.get(1548); + glMultiTexEnviEXT = caps.get(1549); + glMultiTexEnvivEXT = caps.get(1550); + glMultiTexGendEXT = caps.get(1551); + glMultiTexGendvEXT = caps.get(1552); + glMultiTexGenfEXT = caps.get(1553); + glMultiTexGenfvEXT = caps.get(1554); + glMultiTexGeniEXT = caps.get(1555); + glMultiTexGenivEXT = caps.get(1556); + glGetMultiTexEnvfvEXT = caps.get(1557); + glGetMultiTexEnvivEXT = caps.get(1558); + glGetMultiTexGendvEXT = caps.get(1559); + glGetMultiTexGenfvEXT = caps.get(1560); + glGetMultiTexGenivEXT = caps.get(1561); + glMultiTexParameteriEXT = caps.get(1562); + glMultiTexParameterivEXT = caps.get(1563); + glMultiTexParameterfEXT = caps.get(1564); + glMultiTexParameterfvEXT = caps.get(1565); + glMultiTexImage1DEXT = caps.get(1566); + glMultiTexImage2DEXT = caps.get(1567); + glMultiTexSubImage1DEXT = caps.get(1568); + glMultiTexSubImage2DEXT = caps.get(1569); + glCopyMultiTexImage1DEXT = caps.get(1570); + glCopyMultiTexImage2DEXT = caps.get(1571); + glCopyMultiTexSubImage1DEXT = caps.get(1572); + glCopyMultiTexSubImage2DEXT = caps.get(1573); + glGetMultiTexImageEXT = caps.get(1574); + glGetMultiTexParameterfvEXT = caps.get(1575); + glGetMultiTexParameterivEXT = caps.get(1576); + glGetMultiTexLevelParameterfvEXT = caps.get(1577); + glGetMultiTexLevelParameterivEXT = caps.get(1578); + glMultiTexImage3DEXT = caps.get(1579); + glMultiTexSubImage3DEXT = caps.get(1580); + glCopyMultiTexSubImage3DEXT = caps.get(1581); + glEnableClientStateIndexedEXT = caps.get(1582); + glDisableClientStateIndexedEXT = caps.get(1583); + glEnableClientStateiEXT = caps.get(1584); + glDisableClientStateiEXT = caps.get(1585); + glGetFloatIndexedvEXT = caps.get(1586); + glGetDoubleIndexedvEXT = caps.get(1587); + glGetPointerIndexedvEXT = caps.get(1588); + glGetFloati_vEXT = caps.get(1589); + glGetDoublei_vEXT = caps.get(1590); + glGetPointeri_vEXT = caps.get(1591); + glEnableIndexedEXT = caps.get(1592); + glDisableIndexedEXT = caps.get(1593); + glIsEnabledIndexedEXT = caps.get(1594); + glGetIntegerIndexedvEXT = caps.get(1595); + glGetBooleanIndexedvEXT = caps.get(1596); + glNamedProgramStringEXT = caps.get(1597); + glNamedProgramLocalParameter4dEXT = caps.get(1598); + glNamedProgramLocalParameter4dvEXT = caps.get(1599); + glNamedProgramLocalParameter4fEXT = caps.get(1600); + glNamedProgramLocalParameter4fvEXT = caps.get(1601); + glGetNamedProgramLocalParameterdvEXT = caps.get(1602); + glGetNamedProgramLocalParameterfvEXT = caps.get(1603); + glGetNamedProgramivEXT = caps.get(1604); + glGetNamedProgramStringEXT = caps.get(1605); + glCompressedTextureImage3DEXT = caps.get(1606); + glCompressedTextureImage2DEXT = caps.get(1607); + glCompressedTextureImage1DEXT = caps.get(1608); + glCompressedTextureSubImage3DEXT = caps.get(1609); + glCompressedTextureSubImage2DEXT = caps.get(1610); + glCompressedTextureSubImage1DEXT = caps.get(1611); + glGetCompressedTextureImageEXT = caps.get(1612); + glCompressedMultiTexImage3DEXT = caps.get(1613); + glCompressedMultiTexImage2DEXT = caps.get(1614); + glCompressedMultiTexImage1DEXT = caps.get(1615); + glCompressedMultiTexSubImage3DEXT = caps.get(1616); + glCompressedMultiTexSubImage2DEXT = caps.get(1617); + glCompressedMultiTexSubImage1DEXT = caps.get(1618); + glGetCompressedMultiTexImageEXT = caps.get(1619); + glMatrixLoadTransposefEXT = caps.get(1620); + glMatrixLoadTransposedEXT = caps.get(1621); + glMatrixMultTransposefEXT = caps.get(1622); + glMatrixMultTransposedEXT = caps.get(1623); + glNamedBufferDataEXT = caps.get(1624); + glNamedBufferSubDataEXT = caps.get(1625); + glMapNamedBufferEXT = caps.get(1626); + glUnmapNamedBufferEXT = caps.get(1627); + glGetNamedBufferParameterivEXT = caps.get(1628); + glGetNamedBufferSubDataEXT = caps.get(1629); + glProgramUniform1fEXT = caps.get(1630); + glProgramUniform2fEXT = caps.get(1631); + glProgramUniform3fEXT = caps.get(1632); + glProgramUniform4fEXT = caps.get(1633); + glProgramUniform1iEXT = caps.get(1634); + glProgramUniform2iEXT = caps.get(1635); + glProgramUniform3iEXT = caps.get(1636); + glProgramUniform4iEXT = caps.get(1637); + glProgramUniform1fvEXT = caps.get(1638); + glProgramUniform2fvEXT = caps.get(1639); + glProgramUniform3fvEXT = caps.get(1640); + glProgramUniform4fvEXT = caps.get(1641); + glProgramUniform1ivEXT = caps.get(1642); + glProgramUniform2ivEXT = caps.get(1643); + glProgramUniform3ivEXT = caps.get(1644); + glProgramUniform4ivEXT = caps.get(1645); + glProgramUniformMatrix2fvEXT = caps.get(1646); + glProgramUniformMatrix3fvEXT = caps.get(1647); + glProgramUniformMatrix4fvEXT = caps.get(1648); + glProgramUniformMatrix2x3fvEXT = caps.get(1649); + glProgramUniformMatrix3x2fvEXT = caps.get(1650); + glProgramUniformMatrix2x4fvEXT = caps.get(1651); + glProgramUniformMatrix4x2fvEXT = caps.get(1652); + glProgramUniformMatrix3x4fvEXT = caps.get(1653); + glProgramUniformMatrix4x3fvEXT = caps.get(1654); + glTextureBufferEXT = caps.get(1655); + glMultiTexBufferEXT = caps.get(1656); + glTextureParameterIivEXT = caps.get(1657); + glTextureParameterIuivEXT = caps.get(1658); + glGetTextureParameterIivEXT = caps.get(1659); + glGetTextureParameterIuivEXT = caps.get(1660); + glMultiTexParameterIivEXT = caps.get(1661); + glMultiTexParameterIuivEXT = caps.get(1662); + glGetMultiTexParameterIivEXT = caps.get(1663); + glGetMultiTexParameterIuivEXT = caps.get(1664); + glProgramUniform1uiEXT = caps.get(1665); + glProgramUniform2uiEXT = caps.get(1666); + glProgramUniform3uiEXT = caps.get(1667); + glProgramUniform4uiEXT = caps.get(1668); + glProgramUniform1uivEXT = caps.get(1669); + glProgramUniform2uivEXT = caps.get(1670); + glProgramUniform3uivEXT = caps.get(1671); + glProgramUniform4uivEXT = caps.get(1672); + glNamedProgramLocalParameters4fvEXT = caps.get(1673); + glNamedProgramLocalParameterI4iEXT = caps.get(1674); + glNamedProgramLocalParameterI4ivEXT = caps.get(1675); + glNamedProgramLocalParametersI4ivEXT = caps.get(1676); + glNamedProgramLocalParameterI4uiEXT = caps.get(1677); + glNamedProgramLocalParameterI4uivEXT = caps.get(1678); + glNamedProgramLocalParametersI4uivEXT = caps.get(1679); + glGetNamedProgramLocalParameterIivEXT = caps.get(1680); + glGetNamedProgramLocalParameterIuivEXT = caps.get(1681); + glNamedRenderbufferStorageEXT = caps.get(1682); + glGetNamedRenderbufferParameterivEXT = caps.get(1683); + glNamedRenderbufferStorageMultisampleEXT = caps.get(1684); + glNamedRenderbufferStorageMultisampleCoverageEXT = caps.get(1685); + glCheckNamedFramebufferStatusEXT = caps.get(1686); + glNamedFramebufferTexture1DEXT = caps.get(1687); + glNamedFramebufferTexture2DEXT = caps.get(1688); + glNamedFramebufferTexture3DEXT = caps.get(1689); + glNamedFramebufferRenderbufferEXT = caps.get(1690); + glGetNamedFramebufferAttachmentParameterivEXT = caps.get(1691); + glGenerateTextureMipmapEXT = caps.get(1692); + glGenerateMultiTexMipmapEXT = caps.get(1693); + glFramebufferDrawBufferEXT = caps.get(1694); + glFramebufferDrawBuffersEXT = caps.get(1695); + glFramebufferReadBufferEXT = caps.get(1696); + glGetFramebufferParameterivEXT = caps.get(1697); + glNamedCopyBufferSubDataEXT = caps.get(1698); + glNamedFramebufferTextureEXT = caps.get(1699); + glNamedFramebufferTextureLayerEXT = caps.get(1700); + glNamedFramebufferTextureFaceEXT = caps.get(1701); + glTextureRenderbufferEXT = caps.get(1702); + glMultiTexRenderbufferEXT = caps.get(1703); + glVertexArrayVertexOffsetEXT = caps.get(1704); + glVertexArrayColorOffsetEXT = caps.get(1705); + glVertexArrayEdgeFlagOffsetEXT = caps.get(1706); + glVertexArrayIndexOffsetEXT = caps.get(1707); + glVertexArrayNormalOffsetEXT = caps.get(1708); + glVertexArrayTexCoordOffsetEXT = caps.get(1709); + glVertexArrayMultiTexCoordOffsetEXT = caps.get(1710); + glVertexArrayFogCoordOffsetEXT = caps.get(1711); + glVertexArraySecondaryColorOffsetEXT = caps.get(1712); + glVertexArrayVertexAttribOffsetEXT = caps.get(1713); + glVertexArrayVertexAttribIOffsetEXT = caps.get(1714); + glEnableVertexArrayEXT = caps.get(1715); + glDisableVertexArrayEXT = caps.get(1716); + glEnableVertexArrayAttribEXT = caps.get(1717); + glDisableVertexArrayAttribEXT = caps.get(1718); + glGetVertexArrayIntegervEXT = caps.get(1719); + glGetVertexArrayPointervEXT = caps.get(1720); + glGetVertexArrayIntegeri_vEXT = caps.get(1721); + glGetVertexArrayPointeri_vEXT = caps.get(1722); + glMapNamedBufferRangeEXT = caps.get(1723); + glFlushMappedNamedBufferRangeEXT = caps.get(1724); + glColorMaskIndexedEXT = caps.get(1725); + glDrawArraysInstancedEXT = caps.get(1726); + glDrawElementsInstancedEXT = caps.get(1727); + glEGLImageTargetTexStorageEXT = caps.get(1728); + glEGLImageTargetTextureStorageEXT = caps.get(1729); + glBufferStorageExternalEXT = caps.get(1730); + glNamedBufferStorageExternalEXT = caps.get(1731); + glBlitFramebufferEXT = caps.get(1732); + glRenderbufferStorageMultisampleEXT = caps.get(1733); + glIsRenderbufferEXT = caps.get(1734); + glBindRenderbufferEXT = caps.get(1735); + glDeleteRenderbuffersEXT = caps.get(1736); + glGenRenderbuffersEXT = caps.get(1737); + glRenderbufferStorageEXT = caps.get(1738); + glGetRenderbufferParameterivEXT = caps.get(1739); + glIsFramebufferEXT = caps.get(1740); + glBindFramebufferEXT = caps.get(1741); + glDeleteFramebuffersEXT = caps.get(1742); + glGenFramebuffersEXT = caps.get(1743); + glCheckFramebufferStatusEXT = caps.get(1744); + glFramebufferTexture1DEXT = caps.get(1745); + glFramebufferTexture2DEXT = caps.get(1746); + glFramebufferTexture3DEXT = caps.get(1747); + glFramebufferRenderbufferEXT = caps.get(1748); + glGetFramebufferAttachmentParameterivEXT = caps.get(1749); + glGenerateMipmapEXT = caps.get(1750); + glProgramParameteriEXT = caps.get(1751); + glFramebufferTextureEXT = caps.get(1752); + glFramebufferTextureLayerEXT = caps.get(1753); + glFramebufferTextureFaceEXT = caps.get(1754); + glProgramEnvParameters4fvEXT = caps.get(1755); + glProgramLocalParameters4fvEXT = caps.get(1756); + glVertexAttribI1iEXT = caps.get(1757); + glVertexAttribI2iEXT = caps.get(1758); + glVertexAttribI3iEXT = caps.get(1759); + glVertexAttribI4iEXT = caps.get(1760); + glVertexAttribI1uiEXT = caps.get(1761); + glVertexAttribI2uiEXT = caps.get(1762); + glVertexAttribI3uiEXT = caps.get(1763); + glVertexAttribI4uiEXT = caps.get(1764); + glVertexAttribI1ivEXT = caps.get(1765); + glVertexAttribI2ivEXT = caps.get(1766); + glVertexAttribI3ivEXT = caps.get(1767); + glVertexAttribI4ivEXT = caps.get(1768); + glVertexAttribI1uivEXT = caps.get(1769); + glVertexAttribI2uivEXT = caps.get(1770); + glVertexAttribI3uivEXT = caps.get(1771); + glVertexAttribI4uivEXT = caps.get(1772); + glVertexAttribI4bvEXT = caps.get(1773); + glVertexAttribI4svEXT = caps.get(1774); + glVertexAttribI4ubvEXT = caps.get(1775); + glVertexAttribI4usvEXT = caps.get(1776); + glVertexAttribIPointerEXT = caps.get(1777); + glGetVertexAttribIivEXT = caps.get(1778); + glGetVertexAttribIuivEXT = caps.get(1779); + glGetUniformuivEXT = caps.get(1780); + glBindFragDataLocationEXT = caps.get(1781); + glGetFragDataLocationEXT = caps.get(1782); + glUniform1uiEXT = caps.get(1783); + glUniform2uiEXT = caps.get(1784); + glUniform3uiEXT = caps.get(1785); + glUniform4uiEXT = caps.get(1786); + glUniform1uivEXT = caps.get(1787); + glUniform2uivEXT = caps.get(1788); + glUniform3uivEXT = caps.get(1789); + glUniform4uivEXT = caps.get(1790); + glGetUnsignedBytevEXT = caps.get(1791); + glGetUnsignedBytei_vEXT = caps.get(1792); + glDeleteMemoryObjectsEXT = caps.get(1793); + glIsMemoryObjectEXT = caps.get(1794); + glCreateMemoryObjectsEXT = caps.get(1795); + glMemoryObjectParameterivEXT = caps.get(1796); + glGetMemoryObjectParameterivEXT = caps.get(1797); + glTexStorageMem2DEXT = caps.get(1798); + glTexStorageMem2DMultisampleEXT = caps.get(1799); + glTexStorageMem3DEXT = caps.get(1800); + glTexStorageMem3DMultisampleEXT = caps.get(1801); + glBufferStorageMemEXT = caps.get(1802); + glTextureStorageMem2DEXT = caps.get(1803); + glTextureStorageMem2DMultisampleEXT = caps.get(1804); + glTextureStorageMem3DEXT = caps.get(1805); + glTextureStorageMem3DMultisampleEXT = caps.get(1806); + glNamedBufferStorageMemEXT = caps.get(1807); + glTexStorageMem1DEXT = caps.get(1808); + glTextureStorageMem1DEXT = caps.get(1809); + glImportMemoryFdEXT = caps.get(1810); + glImportMemoryWin32HandleEXT = caps.get(1811); + glImportMemoryWin32NameEXT = caps.get(1812); + glPointParameterfEXT = caps.get(1813); + glPointParameterfvEXT = caps.get(1814); + glPolygonOffsetClampEXT = caps.get(1815); + glProvokingVertexEXT = caps.get(1816); + glRasterSamplesEXT = caps.get(1817); + glSecondaryColor3bEXT = caps.get(1818); + glSecondaryColor3sEXT = caps.get(1819); + glSecondaryColor3iEXT = caps.get(1820); + glSecondaryColor3fEXT = caps.get(1821); + glSecondaryColor3dEXT = caps.get(1822); + glSecondaryColor3ubEXT = caps.get(1823); + glSecondaryColor3usEXT = caps.get(1824); + glSecondaryColor3uiEXT = caps.get(1825); + glSecondaryColor3bvEXT = caps.get(1826); + glSecondaryColor3svEXT = caps.get(1827); + glSecondaryColor3ivEXT = caps.get(1828); + glSecondaryColor3fvEXT = caps.get(1829); + glSecondaryColor3dvEXT = caps.get(1830); + glSecondaryColor3ubvEXT = caps.get(1831); + glSecondaryColor3usvEXT = caps.get(1832); + glSecondaryColor3uivEXT = caps.get(1833); + glSecondaryColorPointerEXT = caps.get(1834); + glGenSemaphoresEXT = caps.get(1835); + glDeleteSemaphoresEXT = caps.get(1836); + glIsSemaphoreEXT = caps.get(1837); + glSemaphoreParameterui64vEXT = caps.get(1838); + glGetSemaphoreParameterui64vEXT = caps.get(1839); + glWaitSemaphoreEXT = caps.get(1840); + glSignalSemaphoreEXT = caps.get(1841); + glImportSemaphoreFdEXT = caps.get(1842); + glImportSemaphoreWin32HandleEXT = caps.get(1843); + glImportSemaphoreWin32NameEXT = caps.get(1844); + glUseShaderProgramEXT = caps.get(1845); + glActiveProgramEXT = caps.get(1846); + glCreateShaderProgramEXT = caps.get(1847); + glFramebufferFetchBarrierEXT = caps.get(1848); + glBindImageTextureEXT = caps.get(1849); + glMemoryBarrierEXT = caps.get(1850); + glStencilClearTagEXT = caps.get(1851); + glActiveStencilFaceEXT = caps.get(1852); + glTexBufferEXT = caps.get(1853); + glClearColorIiEXT = caps.get(1854); + glClearColorIuiEXT = caps.get(1855); + glTexParameterIivEXT = caps.get(1856); + glTexParameterIuivEXT = caps.get(1857); + glGetTexParameterIivEXT = caps.get(1858); + glGetTexParameterIuivEXT = caps.get(1859); + glTexStorage1DEXT = caps.get(1860); + glTexStorage2DEXT = caps.get(1861); + glTexStorage3DEXT = caps.get(1862); + glGetQueryObjecti64vEXT = caps.get(1863); + glGetQueryObjectui64vEXT = caps.get(1864); + glBindBufferRangeEXT = caps.get(1865); + glBindBufferOffsetEXT = caps.get(1866); + glBindBufferBaseEXT = caps.get(1867); + glBeginTransformFeedbackEXT = caps.get(1868); + glEndTransformFeedbackEXT = caps.get(1869); + glTransformFeedbackVaryingsEXT = caps.get(1870); + glGetTransformFeedbackVaryingEXT = caps.get(1871); + glVertexAttribL1dEXT = caps.get(1872); + glVertexAttribL2dEXT = caps.get(1873); + glVertexAttribL3dEXT = caps.get(1874); + glVertexAttribL4dEXT = caps.get(1875); + glVertexAttribL1dvEXT = caps.get(1876); + glVertexAttribL2dvEXT = caps.get(1877); + glVertexAttribL3dvEXT = caps.get(1878); + glVertexAttribL4dvEXT = caps.get(1879); + glVertexAttribLPointerEXT = caps.get(1880); + glGetVertexAttribLdvEXT = caps.get(1881); + glAcquireKeyedMutexWin32EXT = caps.get(1882); + glReleaseKeyedMutexWin32EXT = caps.get(1883); + glWindowRectanglesEXT = caps.get(1884); + glImportSyncEXT = caps.get(1885); + glFrameTerminatorGREMEDY = caps.get(1886); + glStringMarkerGREMEDY = caps.get(1887); + glApplyFramebufferAttachmentCMAAINTEL = caps.get(1888); + glSyncTextureINTEL = caps.get(1889); + glUnmapTexture2DINTEL = caps.get(1890); + glMapTexture2DINTEL = caps.get(1891); + glBeginPerfQueryINTEL = caps.get(1892); + glCreatePerfQueryINTEL = caps.get(1893); + glDeletePerfQueryINTEL = caps.get(1894); + glEndPerfQueryINTEL = caps.get(1895); + glGetFirstPerfQueryIdINTEL = caps.get(1896); + glGetNextPerfQueryIdINTEL = caps.get(1897); + glGetPerfCounterInfoINTEL = caps.get(1898); + glGetPerfQueryDataINTEL = caps.get(1899); + glGetPerfQueryIdByNameINTEL = caps.get(1900); + glGetPerfQueryInfoINTEL = caps.get(1901); + glBlendBarrierKHR = caps.get(1902); + glMaxShaderCompilerThreadsKHR = caps.get(1903); + glFramebufferParameteriMESA = caps.get(1904); + glGetFramebufferParameterivMESA = caps.get(1905); + glAlphaToCoverageDitherControlNV = caps.get(1906); + glMultiDrawArraysIndirectBindlessNV = caps.get(1907); + glMultiDrawElementsIndirectBindlessNV = caps.get(1908); + glMultiDrawArraysIndirectBindlessCountNV = caps.get(1909); + glMultiDrawElementsIndirectBindlessCountNV = caps.get(1910); + glGetTextureHandleNV = caps.get(1911); + glGetTextureSamplerHandleNV = caps.get(1912); + glMakeTextureHandleResidentNV = caps.get(1913); + glMakeTextureHandleNonResidentNV = caps.get(1914); + glGetImageHandleNV = caps.get(1915); + glMakeImageHandleResidentNV = caps.get(1916); + glMakeImageHandleNonResidentNV = caps.get(1917); + glUniformHandleui64NV = caps.get(1918); + glUniformHandleui64vNV = caps.get(1919); + glProgramUniformHandleui64NV = caps.get(1920); + glProgramUniformHandleui64vNV = caps.get(1921); + glIsTextureHandleResidentNV = caps.get(1922); + glIsImageHandleResidentNV = caps.get(1923); + glBlendParameteriNV = caps.get(1924); + glBlendBarrierNV = caps.get(1925); + glViewportPositionWScaleNV = caps.get(1926); + glCreateStatesNV = caps.get(1927); + glDeleteStatesNV = caps.get(1928); + glIsStateNV = caps.get(1929); + glStateCaptureNV = caps.get(1930); + glGetCommandHeaderNV = caps.get(1931); + glGetStageIndexNV = caps.get(1932); + glDrawCommandsNV = caps.get(1933); + glDrawCommandsAddressNV = caps.get(1934); + glDrawCommandsStatesNV = caps.get(1935); + glDrawCommandsStatesAddressNV = caps.get(1936); + glCreateCommandListsNV = caps.get(1937); + glDeleteCommandListsNV = caps.get(1938); + glIsCommandListNV = caps.get(1939); + glListDrawCommandsStatesClientNV = caps.get(1940); + glCommandListSegmentsNV = caps.get(1941); + glCompileCommandListNV = caps.get(1942); + glCallCommandListNV = caps.get(1943); + glBeginConditionalRenderNV = caps.get(1944); + glEndConditionalRenderNV = caps.get(1945); + glSubpixelPrecisionBiasNV = caps.get(1946); + glConservativeRasterParameterfNV = caps.get(1947); + glConservativeRasterParameteriNV = caps.get(1948); + glCopyImageSubDataNV = caps.get(1949); + glDepthRangedNV = caps.get(1950); + glClearDepthdNV = caps.get(1951); + glDepthBoundsdNV = caps.get(1952); + glDrawTextureNV = caps.get(1953); + glDrawVkImageNV = caps.get(1954); + glGetVkProcAddrNV = caps.get(1955); + glWaitVkSemaphoreNV = caps.get(1956); + glSignalVkSemaphoreNV = caps.get(1957); + glSignalVkFenceNV = caps.get(1958); + glGetMultisamplefvNV = caps.get(1959); + glSampleMaskIndexedNV = caps.get(1960); + glTexRenderbufferNV = caps.get(1961); + glDeleteFencesNV = caps.get(1962); + glGenFencesNV = caps.get(1963); + glIsFenceNV = caps.get(1964); + glTestFenceNV = caps.get(1965); + glGetFenceivNV = caps.get(1966); + glFinishFenceNV = caps.get(1967); + glSetFenceNV = caps.get(1968); + glFragmentCoverageColorNV = caps.get(1969); + glCoverageModulationTableNV = caps.get(1970); + glGetCoverageModulationTableNV = caps.get(1971); + glCoverageModulationNV = caps.get(1972); + glRenderbufferStorageMultisampleCoverageNV = caps.get(1973); + glRenderGpuMaskNV = caps.get(1974); + glMulticastBufferSubDataNV = caps.get(1975); + glMulticastCopyBufferSubDataNV = caps.get(1976); + glMulticastCopyImageSubDataNV = caps.get(1977); + glMulticastBlitFramebufferNV = caps.get(1978); + glMulticastFramebufferSampleLocationsfvNV = caps.get(1979); + glMulticastBarrierNV = caps.get(1980); + glMulticastWaitSyncNV = caps.get(1981); + glMulticastGetQueryObjectivNV = caps.get(1982); + glMulticastGetQueryObjectuivNV = caps.get(1983); + glMulticastGetQueryObjecti64vNV = caps.get(1984); + glMulticastGetQueryObjectui64vNV = caps.get(1985); + glVertex2hNV = caps.get(1986); + glVertex2hvNV = caps.get(1987); + glVertex3hNV = caps.get(1988); + glVertex3hvNV = caps.get(1989); + glVertex4hNV = caps.get(1990); + glVertex4hvNV = caps.get(1991); + glNormal3hNV = caps.get(1992); + glNormal3hvNV = caps.get(1993); + glColor3hNV = caps.get(1994); + glColor3hvNV = caps.get(1995); + glColor4hNV = caps.get(1996); + glColor4hvNV = caps.get(1997); + glTexCoord1hNV = caps.get(1998); + glTexCoord1hvNV = caps.get(1999); + glTexCoord2hNV = caps.get(2000); + glTexCoord2hvNV = caps.get(2001); + glTexCoord3hNV = caps.get(2002); + glTexCoord3hvNV = caps.get(2003); + glTexCoord4hNV = caps.get(2004); + glTexCoord4hvNV = caps.get(2005); + glMultiTexCoord1hNV = caps.get(2006); + glMultiTexCoord1hvNV = caps.get(2007); + glMultiTexCoord2hNV = caps.get(2008); + glMultiTexCoord2hvNV = caps.get(2009); + glMultiTexCoord3hNV = caps.get(2010); + glMultiTexCoord3hvNV = caps.get(2011); + glMultiTexCoord4hNV = caps.get(2012); + glMultiTexCoord4hvNV = caps.get(2013); + glFogCoordhNV = caps.get(2014); + glFogCoordhvNV = caps.get(2015); + glSecondaryColor3hNV = caps.get(2016); + glSecondaryColor3hvNV = caps.get(2017); + glVertexWeighthNV = caps.get(2018); + glVertexWeighthvNV = caps.get(2019); + glVertexAttrib1hNV = caps.get(2020); + glVertexAttrib1hvNV = caps.get(2021); + glVertexAttrib2hNV = caps.get(2022); + glVertexAttrib2hvNV = caps.get(2023); + glVertexAttrib3hNV = caps.get(2024); + glVertexAttrib3hvNV = caps.get(2025); + glVertexAttrib4hNV = caps.get(2026); + glVertexAttrib4hvNV = caps.get(2027); + glVertexAttribs1hvNV = caps.get(2028); + glVertexAttribs2hvNV = caps.get(2029); + glVertexAttribs3hvNV = caps.get(2030); + glVertexAttribs4hvNV = caps.get(2031); + glGetInternalformatSampleivNV = caps.get(2032); + glGetMemoryObjectDetachedResourcesuivNV = caps.get(2033); + glResetMemoryObjectParameterNV = caps.get(2034); + glTexAttachMemoryNV = caps.get(2035); + glBufferAttachMemoryNV = caps.get(2036); + glTextureAttachMemoryNV = caps.get(2037); + glNamedBufferAttachMemoryNV = caps.get(2038); + glBufferPageCommitmentMemNV = caps.get(2039); + glNamedBufferPageCommitmentMemNV = caps.get(2040); + glTexPageCommitmentMemNV = caps.get(2041); + glTexturePageCommitmentMemNV = caps.get(2042); + glDrawMeshTasksNV = caps.get(2043); + glDrawMeshTasksIndirectNV = caps.get(2044); + glMultiDrawMeshTasksIndirectNV = caps.get(2045); + glMultiDrawMeshTasksIndirectCountNV = caps.get(2046); + glPathCommandsNV = caps.get(2047); + glPathCoordsNV = caps.get(2048); + glPathSubCommandsNV = caps.get(2049); + glPathSubCoordsNV = caps.get(2050); + glPathStringNV = caps.get(2051); + glPathGlyphsNV = caps.get(2052); + glPathGlyphRangeNV = caps.get(2053); + glPathGlyphIndexArrayNV = caps.get(2054); + glPathMemoryGlyphIndexArrayNV = caps.get(2055); + glCopyPathNV = caps.get(2056); + glWeightPathsNV = caps.get(2057); + glInterpolatePathsNV = caps.get(2058); + glTransformPathNV = caps.get(2059); + glPathParameterivNV = caps.get(2060); + glPathParameteriNV = caps.get(2061); + glPathParameterfvNV = caps.get(2062); + glPathParameterfNV = caps.get(2063); + glPathDashArrayNV = caps.get(2064); + glGenPathsNV = caps.get(2065); + glDeletePathsNV = caps.get(2066); + glIsPathNV = caps.get(2067); + glPathStencilFuncNV = caps.get(2068); + glPathStencilDepthOffsetNV = caps.get(2069); + glStencilFillPathNV = caps.get(2070); + glStencilStrokePathNV = caps.get(2071); + glStencilFillPathInstancedNV = caps.get(2072); + glStencilStrokePathInstancedNV = caps.get(2073); + glPathCoverDepthFuncNV = caps.get(2074); + glPathColorGenNV = caps.get(2075); + glPathTexGenNV = caps.get(2076); + glPathFogGenNV = caps.get(2077); + glCoverFillPathNV = caps.get(2078); + glCoverStrokePathNV = caps.get(2079); + glCoverFillPathInstancedNV = caps.get(2080); + glCoverStrokePathInstancedNV = caps.get(2081); + glStencilThenCoverFillPathNV = caps.get(2082); + glStencilThenCoverStrokePathNV = caps.get(2083); + glStencilThenCoverFillPathInstancedNV = caps.get(2084); + glStencilThenCoverStrokePathInstancedNV = caps.get(2085); + glPathGlyphIndexRangeNV = caps.get(2086); + glProgramPathFragmentInputGenNV = caps.get(2087); + glGetPathParameterivNV = caps.get(2088); + glGetPathParameterfvNV = caps.get(2089); + glGetPathCommandsNV = caps.get(2090); + glGetPathCoordsNV = caps.get(2091); + glGetPathDashArrayNV = caps.get(2092); + glGetPathMetricsNV = caps.get(2093); + glGetPathMetricRangeNV = caps.get(2094); + glGetPathSpacingNV = caps.get(2095); + glGetPathColorGenivNV = caps.get(2096); + glGetPathColorGenfvNV = caps.get(2097); + glGetPathTexGenivNV = caps.get(2098); + glGetPathTexGenfvNV = caps.get(2099); + glIsPointInFillPathNV = caps.get(2100); + glIsPointInStrokePathNV = caps.get(2101); + glGetPathLengthNV = caps.get(2102); + glPointAlongPathNV = caps.get(2103); + glMatrixLoad3x2fNV = caps.get(2104); + glMatrixLoad3x3fNV = caps.get(2105); + glMatrixLoadTranspose3x3fNV = caps.get(2106); + glMatrixMult3x2fNV = caps.get(2107); + glMatrixMult3x3fNV = caps.get(2108); + glMatrixMultTranspose3x3fNV = caps.get(2109); + glGetProgramResourcefvNV = caps.get(2110); + glPixelDataRangeNV = caps.get(2111); + glFlushPixelDataRangeNV = caps.get(2112); + glPointParameteriNV = caps.get(2113); + glPointParameterivNV = caps.get(2114); + glPrimitiveRestartNV = caps.get(2115); + glPrimitiveRestartIndexNV = caps.get(2116); + glQueryResourceNV = caps.get(2117); + glGenQueryResourceTagNV = caps.get(2118); + glDeleteQueryResourceTagNV = caps.get(2119); + glQueryResourceTagNV = caps.get(2120); + glFramebufferSampleLocationsfvNV = caps.get(2121); + glNamedFramebufferSampleLocationsfvNV = caps.get(2122); + glResolveDepthValuesNV = caps.get(2123); + glScissorExclusiveArrayvNV = caps.get(2124); + glScissorExclusiveNV = caps.get(2125); + glMakeBufferResidentNV = caps.get(2126); + glMakeBufferNonResidentNV = caps.get(2127); + glIsBufferResidentNV = caps.get(2128); + glMakeNamedBufferResidentNV = caps.get(2129); + glMakeNamedBufferNonResidentNV = caps.get(2130); + glIsNamedBufferResidentNV = caps.get(2131); + glGetBufferParameterui64vNV = caps.get(2132); + glGetNamedBufferParameterui64vNV = caps.get(2133); + glGetIntegerui64vNV = caps.get(2134); + glUniformui64NV = caps.get(2135); + glUniformui64vNV = caps.get(2136); + glProgramUniformui64NV = caps.get(2137); + glProgramUniformui64vNV = caps.get(2138); + glBindShadingRateImageNV = caps.get(2139); + glShadingRateImagePaletteNV = caps.get(2140); + glGetShadingRateImagePaletteNV = caps.get(2141); + glShadingRateImageBarrierNV = caps.get(2142); + glShadingRateSampleOrderNV = caps.get(2143); + glShadingRateSampleOrderCustomNV = caps.get(2144); + glGetShadingRateSampleLocationivNV = caps.get(2145); + glTextureBarrierNV = caps.get(2146); + glTexImage2DMultisampleCoverageNV = caps.get(2147); + glTexImage3DMultisampleCoverageNV = caps.get(2148); + glTextureImage2DMultisampleNV = caps.get(2149); + glTextureImage3DMultisampleNV = caps.get(2150); + glTextureImage2DMultisampleCoverageNV = caps.get(2151); + glTextureImage3DMultisampleCoverageNV = caps.get(2152); + glCreateSemaphoresNV = caps.get(2153); + glSemaphoreParameterivNV = caps.get(2154); + glGetSemaphoreParameterivNV = caps.get(2155); + glBeginTransformFeedbackNV = caps.get(2156); + glEndTransformFeedbackNV = caps.get(2157); + glTransformFeedbackAttribsNV = caps.get(2158); + glBindBufferRangeNV = caps.get(2159); + glBindBufferOffsetNV = caps.get(2160); + glBindBufferBaseNV = caps.get(2161); + glTransformFeedbackVaryingsNV = caps.get(2162); + glActiveVaryingNV = caps.get(2163); + glGetVaryingLocationNV = caps.get(2164); + glGetActiveVaryingNV = caps.get(2165); + glGetTransformFeedbackVaryingNV = caps.get(2166); + glTransformFeedbackStreamAttribsNV = caps.get(2167); + glBindTransformFeedbackNV = caps.get(2168); + glDeleteTransformFeedbacksNV = caps.get(2169); + glGenTransformFeedbacksNV = caps.get(2170); + glIsTransformFeedbackNV = caps.get(2171); + glPauseTransformFeedbackNV = caps.get(2172); + glResumeTransformFeedbackNV = caps.get(2173); + glDrawTransformFeedbackNV = caps.get(2174); + glVertexArrayRangeNV = caps.get(2175); + glFlushVertexArrayRangeNV = caps.get(2176); + glVertexAttribL1i64NV = caps.get(2177); + glVertexAttribL2i64NV = caps.get(2178); + glVertexAttribL3i64NV = caps.get(2179); + glVertexAttribL4i64NV = caps.get(2180); + glVertexAttribL1i64vNV = caps.get(2181); + glVertexAttribL2i64vNV = caps.get(2182); + glVertexAttribL3i64vNV = caps.get(2183); + glVertexAttribL4i64vNV = caps.get(2184); + glVertexAttribL1ui64NV = caps.get(2185); + glVertexAttribL2ui64NV = caps.get(2186); + glVertexAttribL3ui64NV = caps.get(2187); + glVertexAttribL4ui64NV = caps.get(2188); + glVertexAttribL1ui64vNV = caps.get(2189); + glVertexAttribL2ui64vNV = caps.get(2190); + glVertexAttribL3ui64vNV = caps.get(2191); + glVertexAttribL4ui64vNV = caps.get(2192); + glGetVertexAttribLi64vNV = caps.get(2193); + glGetVertexAttribLui64vNV = caps.get(2194); + glVertexAttribLFormatNV = caps.get(2195); + glBufferAddressRangeNV = caps.get(2196); + glVertexFormatNV = caps.get(2197); + glNormalFormatNV = caps.get(2198); + glColorFormatNV = caps.get(2199); + glIndexFormatNV = caps.get(2200); + glTexCoordFormatNV = caps.get(2201); + glEdgeFlagFormatNV = caps.get(2202); + glSecondaryColorFormatNV = caps.get(2203); + glFogCoordFormatNV = caps.get(2204); + glVertexAttribFormatNV = caps.get(2205); + glVertexAttribIFormatNV = caps.get(2206); + glGetIntegerui64i_vNV = caps.get(2207); + glViewportSwizzleNV = caps.get(2208); + glBeginConditionalRenderNVX = caps.get(2209); + glEndConditionalRenderNVX = caps.get(2210); + glAsyncCopyImageSubDataNVX = caps.get(2211); + glAsyncCopyBufferSubDataNVX = caps.get(2212); + glUploadGpuMaskNVX = caps.get(2213); + glMulticastViewportArrayvNVX = caps.get(2214); + glMulticastScissorArrayvNVX = caps.get(2215); + glMulticastViewportPositionWScaleNVX = caps.get(2216); + glCreateProgressFenceNVX = caps.get(2217); + glSignalSemaphoreui64NVX = caps.get(2218); + glWaitSemaphoreui64NVX = caps.get(2219); + glClientWaitSemaphoreui64NVX = caps.get(2220); + glFramebufferTextureMultiviewOVR = caps.get(2221); + glNamedFramebufferTextureMultiviewOVR = caps.get(2222); addresses = ThreadLocalUtil.setupAddressBuffer(caps); } @@ -7513,249 +7469,227 @@ public final class GLCapabilities { } private static boolean check_GL11(FunctionProvider provider, PointerBuffer caps, Set ext, boolean fc) { - if (!ext.contains("OpenGL11")) { - return false; - } - int flag0 = !fc || ext.contains("GL_NV_vertex_buffer_unified_memory") ? 0 : Integer.MIN_VALUE; return ((fc || checkFunctions(provider, caps, new int[] { - 2, 3, 4, 5, 6, 8, 10, 11, 13, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 52, 53, 54, 56, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 85, 86, 87, 88, 90, 93, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 110, 112, 113, 114, 115, 116, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 192, 193, 194, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334 - }, - "glAccum", "glAlphaFunc", "glAreTexturesResident", "glArrayElement", "glBegin", "glBitmap", "glCallList", "glCallLists", "glClearAccum", - "glClearIndex", "glClipPlane", "glColor3b", "glColor3s", "glColor3i", "glColor3f", "glColor3d", "glColor3ub", "glColor3us", "glColor3ui", - "glColor3bv", "glColor3sv", "glColor3iv", "glColor3fv", "glColor3dv", "glColor3ubv", "glColor3usv", "glColor3uiv", "glColor4b", "glColor4s", - "glColor4i", "glColor4f", "glColor4d", "glColor4ub", "glColor4us", "glColor4ui", "glColor4bv", "glColor4sv", "glColor4iv", "glColor4fv", - "glColor4dv", "glColor4ubv", "glColor4usv", "glColor4uiv", "glColorMaterial", "glColorPointer", "glCopyPixels", "glDeleteLists", "glDrawPixels", - "glEdgeFlag", "glEdgeFlagv", "glEdgeFlagPointer", "glEnd", "glEvalCoord1f", "glEvalCoord1fv", "glEvalCoord1d", "glEvalCoord1dv", "glEvalCoord2f", - "glEvalCoord2fv", "glEvalCoord2d", "glEvalCoord2dv", "glEvalMesh1", "glEvalMesh2", "glEvalPoint1", "glEvalPoint2", "glFeedbackBuffer", "glFogi", - "glFogiv", "glFogf", "glFogfv", "glGenLists", "glGetClipPlane", "glGetLightiv", "glGetLightfv", "glGetMapiv", "glGetMapfv", "glGetMapdv", - "glGetMaterialiv", "glGetMaterialfv", "glGetPixelMapfv", "glGetPixelMapusv", "glGetPixelMapuiv", "glGetPolygonStipple", "glGetTexEnviv", - "glGetTexEnvfv", "glGetTexGeniv", "glGetTexGenfv", "glGetTexGendv", "glIndexi", "glIndexub", "glIndexs", "glIndexf", "glIndexd", "glIndexiv", - "glIndexubv", "glIndexsv", "glIndexfv", "glIndexdv", "glIndexMask", "glIndexPointer", "glInitNames", "glInterleavedArrays", "glIsList", - "glLightModeli", "glLightModelf", "glLightModeliv", "glLightModelfv", "glLighti", "glLightf", "glLightiv", "glLightfv", "glLineStipple", - "glListBase", "glLoadMatrixf", "glLoadMatrixd", "glLoadIdentity", "glLoadName", "glMap1f", "glMap1d", "glMap2f", "glMap2d", "glMapGrid1f", - "glMapGrid1d", "glMapGrid2f", "glMapGrid2d", "glMateriali", "glMaterialf", "glMaterialiv", "glMaterialfv", "glMatrixMode", "glMultMatrixf", - "glMultMatrixd", "glFrustum", "glNewList", "glEndList", "glNormal3f", "glNormal3b", "glNormal3s", "glNormal3i", "glNormal3d", "glNormal3fv", - "glNormal3bv", "glNormal3sv", "glNormal3iv", "glNormal3dv", "glNormalPointer", "glOrtho", "glPassThrough", "glPixelMapfv", "glPixelMapusv", - "glPixelMapuiv", "glPixelTransferi", "glPixelTransferf", "glPixelZoom", "glPolygonStipple", "glPushAttrib", "glPushClientAttrib", "glPopAttrib", - "glPopClientAttrib", "glPopMatrix", "glPopName", "glPrioritizeTextures", "glPushMatrix", "glPushName", "glRasterPos2i", "glRasterPos2s", - "glRasterPos2f", "glRasterPos2d", "glRasterPos2iv", "glRasterPos2sv", "glRasterPos2fv", "glRasterPos2dv", "glRasterPos3i", "glRasterPos3s", - "glRasterPos3f", "glRasterPos3d", "glRasterPos3iv", "glRasterPos3sv", "glRasterPos3fv", "glRasterPos3dv", "glRasterPos4i", "glRasterPos4s", - "glRasterPos4f", "glRasterPos4d", "glRasterPos4iv", "glRasterPos4sv", "glRasterPos4fv", "glRasterPos4dv", "glRecti", "glRects", "glRectf", - "glRectd", "glRectiv", "glRectsv", "glRectfv", "glRectdv", "glRenderMode", "glRotatef", "glRotated", "glScalef", "glScaled", "glSelectBuffer", - "glShadeModel", "glTexCoord1f", "glTexCoord1s", "glTexCoord1i", "glTexCoord1d", "glTexCoord1fv", "glTexCoord1sv", "glTexCoord1iv", "glTexCoord1dv", - "glTexCoord2f", "glTexCoord2s", "glTexCoord2i", "glTexCoord2d", "glTexCoord2fv", "glTexCoord2sv", "glTexCoord2iv", "glTexCoord2dv", "glTexCoord3f", - "glTexCoord3s", "glTexCoord3i", "glTexCoord3d", "glTexCoord3fv", "glTexCoord3sv", "glTexCoord3iv", "glTexCoord3dv", "glTexCoord4f", "glTexCoord4s", - "glTexCoord4i", "glTexCoord4d", "glTexCoord4fv", "glTexCoord4sv", "glTexCoord4iv", "glTexCoord4dv", "glTexCoordPointer", "glTexEnvi", "glTexEnviv", - "glTexEnvf", "glTexEnvfv", "glTexGeni", "glTexGeniv", "glTexGenf", "glTexGenfv", "glTexGend", "glTexGendv", "glTranslatef", "glTranslated", - "glVertex2f", "glVertex2s", "glVertex2i", "glVertex2d", "glVertex2fv", "glVertex2sv", "glVertex2iv", "glVertex2dv", "glVertex3f", "glVertex3s", - "glVertex3i", "glVertex3d", "glVertex3fv", "glVertex3sv", "glVertex3iv", "glVertex3dv", "glVertex4f", "glVertex4s", "glVertex4i", "glVertex4d", - "glVertex4fv", "glVertex4sv", "glVertex4iv", "glVertex4dv", "glVertexPointer" - )) && checkFunctions(provider, caps, new int[] { - 0, 1, 7, 9, 12, 14, 15, 17, 51, 55, 57, 58, 59, flag0 + 60, 61, 62, 63, flag0 + 68, 83, 84, 89, 91, 92, 94, 95, 96, 97, 98, 109, 111, 117, 118, 119, - 120, 121, 122, 137, 139, 149, 155, 190, 191, 195, 196, 197, 232, 233, 247, 250, 251, 252, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 335 - }, - "glEnable", "glDisable", "glBindTexture", "glBlendFunc", "glClear", "glClearColor", "glClearDepth", "glClearStencil", "glColorMask", "glCullFace", - "glDepthFunc", "glDepthMask", "glDepthRange", "glDisableClientState", "glDrawArrays", "glDrawBuffer", "glDrawElements", "glEnableClientState", - "glFinish", "glFlush", "glFrontFace", "glGenTextures", "glDeleteTextures", "glGetBooleanv", "glGetFloatv", "glGetIntegerv", "glGetDoublev", - "glGetError", "glGetPointerv", "glGetString", "glGetTexImage", "glGetTexLevelParameteriv", "glGetTexLevelParameterfv", "glGetTexParameteriv", - "glGetTexParameterfv", "glHint", "glIsEnabled", "glIsTexture", "glLineWidth", "glLogicOp", "glPixelStorei", "glPixelStoref", "glPointSize", - "glPolygonMode", "glPolygonOffset", "glReadBuffer", "glReadPixels", "glScissor", "glStencilFunc", "glStencilMask", "glStencilOp", "glTexImage1D", - "glTexImage2D", "glCopyTexImage1D", "glCopyTexImage2D", "glCopyTexSubImage1D", "glCopyTexSubImage2D", "glTexParameteri", "glTexParameteriv", - "glTexParameterf", "glTexParameterfv", "glTexSubImage1D", "glTexSubImage2D", "glViewport" - )) || reportMissing("GL", "OpenGL11"); + 2, 3, 4, 5, 6, 8, 10, 11, 13, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 52, 53, 54, 56, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 85, 86, 87, 88, 90, 93, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 110, 112, 113, 114, 115, 116, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 152, 153, 154, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 192, 193, 194, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 248, 249, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 308, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334 + }, + "glAccum", "glAlphaFunc", "glAreTexturesResident", "glArrayElement", "glBegin", "glBitmap", "glCallList", "glCallLists", "glClearAccum", + "glClearIndex", "glClipPlane", "glColor3b", "glColor3s", "glColor3i", "glColor3f", "glColor3d", "glColor3ub", "glColor3us", "glColor3ui", + "glColor3bv", "glColor3sv", "glColor3iv", "glColor3fv", "glColor3dv", "glColor3ubv", "glColor3usv", "glColor3uiv", "glColor4b", "glColor4s", + "glColor4i", "glColor4f", "glColor4d", "glColor4ub", "glColor4us", "glColor4ui", "glColor4bv", "glColor4sv", "glColor4iv", "glColor4fv", + "glColor4dv", "glColor4ubv", "glColor4usv", "glColor4uiv", "glColorMaterial", "glColorPointer", "glCopyPixels", "glDeleteLists", "glDrawPixels", + "glEdgeFlag", "glEdgeFlagv", "glEdgeFlagPointer", "glEnd", "glEvalCoord1f", "glEvalCoord1fv", "glEvalCoord1d", "glEvalCoord1dv", "glEvalCoord2f", + "glEvalCoord2fv", "glEvalCoord2d", "glEvalCoord2dv", "glEvalMesh1", "glEvalMesh2", "glEvalPoint1", "glEvalPoint2", "glFeedbackBuffer", "glFogi", + "glFogiv", "glFogf", "glFogfv", "glGenLists", "glGetClipPlane", "glGetLightiv", "glGetLightfv", "glGetMapiv", "glGetMapfv", "glGetMapdv", + "glGetMaterialiv", "glGetMaterialfv", "glGetPixelMapfv", "glGetPixelMapusv", "glGetPixelMapuiv", "glGetPolygonStipple", "glGetTexEnviv", + "glGetTexEnvfv", "glGetTexGeniv", "glGetTexGenfv", "glGetTexGendv", "glIndexi", "glIndexub", "glIndexs", "glIndexf", "glIndexd", "glIndexiv", + "glIndexubv", "glIndexsv", "glIndexfv", "glIndexdv", "glIndexMask", "glIndexPointer", "glInitNames", "glInterleavedArrays", "glIsList", + "glLightModeli", "glLightModelf", "glLightModeliv", "glLightModelfv", "glLighti", "glLightf", "glLightiv", "glLightfv", "glLineStipple", + "glListBase", "glLoadMatrixf", "glLoadMatrixd", "glLoadIdentity", "glLoadName", "glMap1f", "glMap1d", "glMap2f", "glMap2d", "glMapGrid1f", + "glMapGrid1d", "glMapGrid2f", "glMapGrid2d", "glMateriali", "glMaterialf", "glMaterialiv", "glMaterialfv", "glMatrixMode", "glMultMatrixf", + "glMultMatrixd", "glFrustum", "glNewList", "glEndList", "glNormal3f", "glNormal3b", "glNormal3s", "glNormal3i", "glNormal3d", "glNormal3fv", + "glNormal3bv", "glNormal3sv", "glNormal3iv", "glNormal3dv", "glNormalPointer", "glOrtho", "glPassThrough", "glPixelMapfv", "glPixelMapusv", + "glPixelMapuiv", "glPixelTransferi", "glPixelTransferf", "glPixelZoom", "glPolygonStipple", "glPushAttrib", "glPushClientAttrib", "glPopAttrib", + "glPopClientAttrib", "glPopMatrix", "glPopName", "glPrioritizeTextures", "glPushMatrix", "glPushName", "glRasterPos2i", "glRasterPos2s", + "glRasterPos2f", "glRasterPos2d", "glRasterPos2iv", "glRasterPos2sv", "glRasterPos2fv", "glRasterPos2dv", "glRasterPos3i", "glRasterPos3s", + "glRasterPos3f", "glRasterPos3d", "glRasterPos3iv", "glRasterPos3sv", "glRasterPos3fv", "glRasterPos3dv", "glRasterPos4i", "glRasterPos4s", + "glRasterPos4f", "glRasterPos4d", "glRasterPos4iv", "glRasterPos4sv", "glRasterPos4fv", "glRasterPos4dv", "glRecti", "glRects", "glRectf", + "glRectd", "glRectiv", "glRectsv", "glRectfv", "glRectdv", "glRenderMode", "glRotatef", "glRotated", "glScalef", "glScaled", "glSelectBuffer", + "glShadeModel", "glTexCoord1f", "glTexCoord1s", "glTexCoord1i", "glTexCoord1d", "glTexCoord1fv", "glTexCoord1sv", "glTexCoord1iv", "glTexCoord1dv", + "glTexCoord2f", "glTexCoord2s", "glTexCoord2i", "glTexCoord2d", "glTexCoord2fv", "glTexCoord2sv", "glTexCoord2iv", "glTexCoord2dv", "glTexCoord3f", + "glTexCoord3s", "glTexCoord3i", "glTexCoord3d", "glTexCoord3fv", "glTexCoord3sv", "glTexCoord3iv", "glTexCoord3dv", "glTexCoord4f", "glTexCoord4s", + "glTexCoord4i", "glTexCoord4d", "glTexCoord4fv", "glTexCoord4sv", "glTexCoord4iv", "glTexCoord4dv", "glTexCoordPointer", "glTexEnvi", "glTexEnviv", + "glTexEnvf", "glTexEnvfv", "glTexGeni", "glTexGeniv", "glTexGenf", "glTexGenfv", "glTexGend", "glTexGendv", "glTranslatef", "glTranslated", + "glVertex2f", "glVertex2s", "glVertex2i", "glVertex2d", "glVertex2fv", "glVertex2sv", "glVertex2iv", "glVertex2dv", "glVertex3f", "glVertex3s", + "glVertex3i", "glVertex3d", "glVertex3fv", "glVertex3sv", "glVertex3iv", "glVertex3dv", "glVertex4f", "glVertex4s", "glVertex4i", "glVertex4d", + "glVertex4fv", "glVertex4sv", "glVertex4iv", "glVertex4dv", "glVertexPointer" + )) & checkFunctions(provider, caps, new int[] { + 0, 1, 7, 9, 12, 14, 15, 17, 51, 55, 57, 58, 59, flag0 + 60, 61, 62, 63, flag0 + 68, 83, 84, 89, 91, 92, 94, 95, 96, 97, 98, 109, 111, 117, 118, 119, + 120, 121, 122, 137, 139, 149, 155, 190, 191, 195, 196, 197, 232, 233, 247, 250, 251, 252, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 335 + }, + "glEnable", "glDisable", "glBindTexture", "glBlendFunc", "glClear", "glClearColor", "glClearDepth", "glClearStencil", "glColorMask", "glCullFace", + "glDepthFunc", "glDepthMask", "glDepthRange", "glDisableClientState", "glDrawArrays", "glDrawBuffer", "glDrawElements", "glEnableClientState", + "glFinish", "glFlush", "glFrontFace", "glGenTextures", "glDeleteTextures", "glGetBooleanv", "glGetFloatv", "glGetIntegerv", "glGetDoublev", + "glGetError", "glGetPointerv", "glGetString", "glGetTexImage", "glGetTexLevelParameteriv", "glGetTexLevelParameterfv", "glGetTexParameteriv", + "glGetTexParameterfv", "glHint", "glIsEnabled", "glIsTexture", "glLineWidth", "glLogicOp", "glPixelStorei", "glPixelStoref", "glPointSize", + "glPolygonMode", "glPolygonOffset", "glReadBuffer", "glReadPixels", "glScissor", "glStencilFunc", "glStencilMask", "glStencilOp", "glTexImage1D", + "glTexImage2D", "glCopyTexImage1D", "glCopyTexImage2D", "glCopyTexSubImage1D", "glCopyTexSubImage2D", "glTexParameteri", "glTexParameteriv", + "glTexParameterf", "glTexParameterfv", "glTexSubImage1D", "glTexSubImage2D", "glViewport" + ) & ext.contains("OpenGL11")) || reportMissing("GL", "OpenGL11"); } private static boolean check_GL12(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenGL12")) { - return false; - } return (checkFunctions(provider, caps, new int[] { - 336, 337, 338, 339 - }, - "glTexImage3D", "glTexSubImage3D", "glCopyTexSubImage3D", "glDrawRangeElements" - )) || reportMissing("GL", "OpenGL12"); + 336, 337, 338, 339 + }, + "glTexImage3D", "glTexSubImage3D", "glCopyTexSubImage3D", "glDrawRangeElements" + ) & ext.contains("OpenGL12")) || reportMissing("GL", "OpenGL12"); } private static boolean check_GL13(FunctionProvider provider, PointerBuffer caps, Set ext, boolean fc) { - if (!ext.contains("OpenGL13")) { - return false; - } return ((fc || checkFunctions(provider, caps, new int[] { - 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 378, 379, 380, 381, 382, 383, 384, 385 - }, - "glClientActiveTexture", "glMultiTexCoord1f", "glMultiTexCoord1s", "glMultiTexCoord1i", "glMultiTexCoord1d", "glMultiTexCoord1fv", - "glMultiTexCoord1sv", "glMultiTexCoord1iv", "glMultiTexCoord1dv", "glMultiTexCoord2f", "glMultiTexCoord2s", "glMultiTexCoord2i", - "glMultiTexCoord2d", "glMultiTexCoord2fv", "glMultiTexCoord2sv", "glMultiTexCoord2iv", "glMultiTexCoord2dv", "glMultiTexCoord3f", - "glMultiTexCoord3s", "glMultiTexCoord3i", "glMultiTexCoord3d", "glMultiTexCoord3fv", "glMultiTexCoord3sv", "glMultiTexCoord3iv", - "glMultiTexCoord3dv", "glMultiTexCoord4f", "glMultiTexCoord4s", "glMultiTexCoord4i", "glMultiTexCoord4d", "glMultiTexCoord4fv", - "glMultiTexCoord4sv", "glMultiTexCoord4iv", "glMultiTexCoord4dv", "glLoadTransposeMatrixf", "glLoadTransposeMatrixd", "glMultTransposeMatrixf", - "glMultTransposeMatrixd" - )) && checkFunctions(provider, caps, new int[] { - 340, 341, 342, 343, 344, 345, 346, 347, 348 - }, - "glCompressedTexImage3D", "glCompressedTexImage2D", "glCompressedTexImage1D", "glCompressedTexSubImage3D", "glCompressedTexSubImage2D", - "glCompressedTexSubImage1D", "glGetCompressedTexImage", "glSampleCoverage", "glActiveTexture" - )) || reportMissing("GL", "OpenGL13"); + 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385 + }, + "glClientActiveTexture", "glMultiTexCoord1f", "glMultiTexCoord1s", "glMultiTexCoord1i", "glMultiTexCoord1d", "glMultiTexCoord1fv", + "glMultiTexCoord1sv", "glMultiTexCoord1iv", "glMultiTexCoord1dv", "glMultiTexCoord2f", "glMultiTexCoord2s", "glMultiTexCoord2i", + "glMultiTexCoord2d", "glMultiTexCoord2fv", "glMultiTexCoord2sv", "glMultiTexCoord2iv", "glMultiTexCoord2dv", "glMultiTexCoord3f", + "glMultiTexCoord3s", "glMultiTexCoord3i", "glMultiTexCoord3d", "glMultiTexCoord3fv", "glMultiTexCoord3sv", "glMultiTexCoord3iv", + "glMultiTexCoord3dv", "glMultiTexCoord4f", "glMultiTexCoord4s", "glMultiTexCoord4i", "glMultiTexCoord4d", "glMultiTexCoord4fv", + "glMultiTexCoord4sv", "glMultiTexCoord4iv", "glMultiTexCoord4dv", "glLoadTransposeMatrixf", "glLoadTransposeMatrixd", "glMultTransposeMatrixf", + "glMultTransposeMatrixd" + )) & checkFunctions(provider, caps, new int[] { + 340, 341, 342, 343, 344, 345, 346, 347, 348 + }, + "glCompressedTexImage3D", "glCompressedTexImage2D", "glCompressedTexImage1D", "glCompressedTexSubImage3D", "glCompressedTexSubImage2D", + "glCompressedTexSubImage1D", "glGetCompressedTexImage", "glSampleCoverage", "glActiveTexture" + ) & ext.contains("OpenGL13")) || reportMissing("GL", "OpenGL13"); } private static boolean check_GL14(FunctionProvider provider, PointerBuffer caps, Set ext, boolean fc) { - if (!ext.contains("OpenGL14")) { - return false; - } return ((fc || checkFunctions(provider, caps, new int[] { - 388, 389, 390, 391, 392, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 417, 418, 419, 420, 421, 422, 423, - 424, 425, 426, 427, 428, 429, 430, 431, 432 - }, - "glFogCoordf", "glFogCoordd", "glFogCoordfv", "glFogCoorddv", "glFogCoordPointer", "glSecondaryColor3b", "glSecondaryColor3s", "glSecondaryColor3i", - "glSecondaryColor3f", "glSecondaryColor3d", "glSecondaryColor3ub", "glSecondaryColor3us", "glSecondaryColor3ui", "glSecondaryColor3bv", - "glSecondaryColor3sv", "glSecondaryColor3iv", "glSecondaryColor3fv", "glSecondaryColor3dv", "glSecondaryColor3ubv", "glSecondaryColor3usv", - "glSecondaryColor3uiv", "glSecondaryColorPointer", "glWindowPos2i", "glWindowPos2s", "glWindowPos2f", "glWindowPos2d", "glWindowPos2iv", - "glWindowPos2sv", "glWindowPos2fv", "glWindowPos2dv", "glWindowPos3i", "glWindowPos3s", "glWindowPos3f", "glWindowPos3d", "glWindowPos3iv", - "glWindowPos3sv", "glWindowPos3fv", "glWindowPos3dv" - )) && checkFunctions(provider, caps, new int[] { - 386, 387, 393, 394, 395, 396, 397, 398, 416 - }, - "glBlendColor", "glBlendEquation", "glMultiDrawArrays", "glMultiDrawElements", "glPointParameterf", "glPointParameteri", "glPointParameterfv", - "glPointParameteriv", "glBlendFuncSeparate" - )) || reportMissing("GL", "OpenGL14"); + 388, 389, 390, 391, 392, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 417, 418, 419, 420, 421, 422, 423, + 424, 425, 426, 427, 428, 429, 430, 431, 432 + }, + "glFogCoordf", "glFogCoordd", "glFogCoordfv", "glFogCoorddv", "glFogCoordPointer", "glSecondaryColor3b", "glSecondaryColor3s", "glSecondaryColor3i", + "glSecondaryColor3f", "glSecondaryColor3d", "glSecondaryColor3ub", "glSecondaryColor3us", "glSecondaryColor3ui", "glSecondaryColor3bv", + "glSecondaryColor3sv", "glSecondaryColor3iv", "glSecondaryColor3fv", "glSecondaryColor3dv", "glSecondaryColor3ubv", "glSecondaryColor3usv", + "glSecondaryColor3uiv", "glSecondaryColorPointer", "glWindowPos2i", "glWindowPos2s", "glWindowPos2f", "glWindowPos2d", "glWindowPos2iv", + "glWindowPos2sv", "glWindowPos2fv", "glWindowPos2dv", "glWindowPos3i", "glWindowPos3s", "glWindowPos3f", "glWindowPos3d", "glWindowPos3iv", + "glWindowPos3sv", "glWindowPos3fv", "glWindowPos3dv" + )) & checkFunctions(provider, caps, new int[] { + 386, 387, 393, 394, 395, 396, 397, 398, 416 + }, + "glBlendColor", "glBlendEquation", "glMultiDrawArrays", "glMultiDrawElements", "glPointParameterf", "glPointParameteri", "glPointParameterfv", + "glPointParameteriv", "glBlendFuncSeparate" + ) & ext.contains("OpenGL14")) || reportMissing("GL", "OpenGL14"); } private static boolean check_GL15(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenGL15")) { - return false; - } return (checkFunctions(provider, caps, new int[] { - 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451 - }, - "glBindBuffer", "glDeleteBuffers", "glGenBuffers", "glIsBuffer", "glBufferData", "glBufferSubData", "glGetBufferSubData", "glMapBuffer", - "glUnmapBuffer", "glGetBufferParameteriv", "glGetBufferPointerv", "glGenQueries", "glDeleteQueries", "glIsQuery", "glBeginQuery", "glEndQuery", - "glGetQueryiv", "glGetQueryObjectiv", "glGetQueryObjectuiv" - )) || reportMissing("GL", "OpenGL15"); + 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451 + }, + "glBindBuffer", "glDeleteBuffers", "glGenBuffers", "glIsBuffer", "glBufferData", "glBufferSubData", "glGetBufferSubData", "glMapBuffer", + "glUnmapBuffer", "glGetBufferParameteriv", "glGetBufferPointerv", "glGenQueries", "glDeleteQueries", "glIsQuery", "glBeginQuery", "glEndQuery", + "glGetQueryiv", "glGetQueryObjectiv", "glGetQueryObjectuiv" + ) & ext.contains("OpenGL15")) || reportMissing("GL", "OpenGL15"); } private static boolean check_GL20(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenGL20")) { - return false; - } return (checkFunctions(provider, caps, new int[] { - 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, - 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, - 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, - 539, 540, 541, 542, 543, 544 - }, - "glCreateProgram", "glDeleteProgram", "glIsProgram", "glCreateShader", "glDeleteShader", "glIsShader", "glAttachShader", "glDetachShader", - "glShaderSource", "glCompileShader", "glLinkProgram", "glUseProgram", "glValidateProgram", "glUniform1f", "glUniform2f", "glUniform3f", - "glUniform4f", "glUniform1i", "glUniform2i", "glUniform3i", "glUniform4i", "glUniform1fv", "glUniform2fv", "glUniform3fv", "glUniform4fv", - "glUniform1iv", "glUniform2iv", "glUniform3iv", "glUniform4iv", "glUniformMatrix2fv", "glUniformMatrix3fv", "glUniformMatrix4fv", "glGetShaderiv", - "glGetProgramiv", "glGetShaderInfoLog", "glGetProgramInfoLog", "glGetAttachedShaders", "glGetUniformLocation", "glGetActiveUniform", - "glGetUniformfv", "glGetUniformiv", "glGetShaderSource", "glVertexAttrib1f", "glVertexAttrib1s", "glVertexAttrib1d", "glVertexAttrib2f", - "glVertexAttrib2s", "glVertexAttrib2d", "glVertexAttrib3f", "glVertexAttrib3s", "glVertexAttrib3d", "glVertexAttrib4f", "glVertexAttrib4s", - "glVertexAttrib4d", "glVertexAttrib4Nub", "glVertexAttrib1fv", "glVertexAttrib1sv", "glVertexAttrib1dv", "glVertexAttrib2fv", "glVertexAttrib2sv", - "glVertexAttrib2dv", "glVertexAttrib3fv", "glVertexAttrib3sv", "glVertexAttrib3dv", "glVertexAttrib4fv", "glVertexAttrib4sv", "glVertexAttrib4dv", - "glVertexAttrib4iv", "glVertexAttrib4bv", "glVertexAttrib4ubv", "glVertexAttrib4usv", "glVertexAttrib4uiv", "glVertexAttrib4Nbv", - "glVertexAttrib4Nsv", "glVertexAttrib4Niv", "glVertexAttrib4Nubv", "glVertexAttrib4Nusv", "glVertexAttrib4Nuiv", "glVertexAttribPointer", - "glEnableVertexAttribArray", "glDisableVertexAttribArray", "glBindAttribLocation", "glGetActiveAttrib", "glGetAttribLocation", - "glGetVertexAttribiv", "glGetVertexAttribfv", "glGetVertexAttribdv", "glGetVertexAttribPointerv", "glDrawBuffers", "glBlendEquationSeparate", - "glStencilOpSeparate", "glStencilFuncSeparate", "glStencilMaskSeparate" - )) || reportMissing("GL", "OpenGL20"); + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, + 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, + 539, 540, 541, 542, 543, 544 + }, + "glCreateProgram", "glDeleteProgram", "glIsProgram", "glCreateShader", "glDeleteShader", "glIsShader", "glAttachShader", "glDetachShader", + "glShaderSource", "glCompileShader", "glLinkProgram", "glUseProgram", "glValidateProgram", "glUniform1f", "glUniform2f", "glUniform3f", + "glUniform4f", "glUniform1i", "glUniform2i", "glUniform3i", "glUniform4i", "glUniform1fv", "glUniform2fv", "glUniform3fv", "glUniform4fv", + "glUniform1iv", "glUniform2iv", "glUniform3iv", "glUniform4iv", "glUniformMatrix2fv", "glUniformMatrix3fv", "glUniformMatrix4fv", "glGetShaderiv", + "glGetProgramiv", "glGetShaderInfoLog", "glGetProgramInfoLog", "glGetAttachedShaders", "glGetUniformLocation", "glGetActiveUniform", + "glGetUniformfv", "glGetUniformiv", "glGetShaderSource", "glVertexAttrib1f", "glVertexAttrib1s", "glVertexAttrib1d", "glVertexAttrib2f", + "glVertexAttrib2s", "glVertexAttrib2d", "glVertexAttrib3f", "glVertexAttrib3s", "glVertexAttrib3d", "glVertexAttrib4f", "glVertexAttrib4s", + "glVertexAttrib4d", "glVertexAttrib4Nub", "glVertexAttrib1fv", "glVertexAttrib1sv", "glVertexAttrib1dv", "glVertexAttrib2fv", "glVertexAttrib2sv", + "glVertexAttrib2dv", "glVertexAttrib3fv", "glVertexAttrib3sv", "glVertexAttrib3dv", "glVertexAttrib4fv", "glVertexAttrib4sv", "glVertexAttrib4dv", + "glVertexAttrib4iv", "glVertexAttrib4bv", "glVertexAttrib4ubv", "glVertexAttrib4usv", "glVertexAttrib4uiv", "glVertexAttrib4Nbv", + "glVertexAttrib4Nsv", "glVertexAttrib4Niv", "glVertexAttrib4Nubv", "glVertexAttrib4Nusv", "glVertexAttrib4Nuiv", "glVertexAttribPointer", + "glEnableVertexAttribArray", "glDisableVertexAttribArray", "glBindAttribLocation", "glGetActiveAttrib", "glGetAttribLocation", + "glGetVertexAttribiv", "glGetVertexAttribfv", "glGetVertexAttribdv", "glGetVertexAttribPointerv", "glDrawBuffers", "glBlendEquationSeparate", + "glStencilOpSeparate", "glStencilFuncSeparate", "glStencilMaskSeparate" + ) & ext.contains("OpenGL20")) || reportMissing("GL", "OpenGL20"); } private static boolean check_GL21(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenGL21")) { - return false; - } return (checkFunctions(provider, caps, new int[] { - 545, 546, 547, 548, 549, 550 - }, - "glUniformMatrix2x3fv", "glUniformMatrix3x2fv", "glUniformMatrix2x4fv", "glUniformMatrix4x2fv", "glUniformMatrix3x4fv", "glUniformMatrix4x3fv" - )) || reportMissing("GL", "OpenGL21"); + 545, 546, 547, 548, 549, 550 + }, + "glUniformMatrix2x3fv", "glUniformMatrix3x2fv", "glUniformMatrix2x4fv", "glUniformMatrix4x2fv", "glUniformMatrix3x4fv", "glUniformMatrix4x3fv" + ) & ext.contains("OpenGL21")) || reportMissing("GL", "OpenGL21"); } private static boolean check_GL30(FunctionProvider provider, PointerBuffer caps, Set ext) { return (checkFunctions(provider, caps, new int[] { - 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, - 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, - 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634 - }, - "glGetStringi", "glClearBufferiv", "glClearBufferuiv", "glClearBufferfv", "glClearBufferfi", "glVertexAttribI1i", "glVertexAttribI2i", - "glVertexAttribI3i", "glVertexAttribI4i", "glVertexAttribI1ui", "glVertexAttribI2ui", "glVertexAttribI3ui", "glVertexAttribI4ui", - "glVertexAttribI1iv", "glVertexAttribI2iv", "glVertexAttribI3iv", "glVertexAttribI4iv", "glVertexAttribI1uiv", "glVertexAttribI2uiv", - "glVertexAttribI3uiv", "glVertexAttribI4uiv", "glVertexAttribI4bv", "glVertexAttribI4sv", "glVertexAttribI4ubv", "glVertexAttribI4usv", - "glVertexAttribIPointer", "glGetVertexAttribIiv", "glGetVertexAttribIuiv", "glUniform1ui", "glUniform2ui", "glUniform3ui", "glUniform4ui", - "glUniform1uiv", "glUniform2uiv", "glUniform3uiv", "glUniform4uiv", "glGetUniformuiv", "glBindFragDataLocation", "glGetFragDataLocation", - "glBeginConditionalRender", "glEndConditionalRender", "glMapBufferRange", "glFlushMappedBufferRange", "glClampColor", "glIsRenderbuffer", - "glBindRenderbuffer", "glDeleteRenderbuffers", "glGenRenderbuffers", "glRenderbufferStorage", "glRenderbufferStorageMultisample", - "glGetRenderbufferParameteriv", "glIsFramebuffer", "glBindFramebuffer", "glDeleteFramebuffers", "glGenFramebuffers", "glCheckFramebufferStatus", - "glFramebufferTexture1D", "glFramebufferTexture2D", "glFramebufferTexture3D", "glFramebufferTextureLayer", "glFramebufferRenderbuffer", - "glGetFramebufferAttachmentParameteriv", "glBlitFramebuffer", "glGenerateMipmap", "glTexParameterIiv", "glTexParameterIuiv", "glGetTexParameterIiv", - "glGetTexParameterIuiv", "glColorMaski", "glGetBooleani_v", "glGetIntegeri_v", "glEnablei", "glDisablei", "glIsEnabledi", "glBindBufferRange", - "glBindBufferBase", "glBeginTransformFeedback", "glEndTransformFeedback", "glTransformFeedbackVaryings", "glGetTransformFeedbackVarying", - "glBindVertexArray", "glDeleteVertexArrays", "glGenVertexArrays", "glIsVertexArray" - )) && ext.contains("OpenGL30") || reportMissing("GL", "OpenGL30"); + 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, + 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634 + }, + "glGetStringi", "glClearBufferiv", "glClearBufferuiv", "glClearBufferfv", "glClearBufferfi", "glVertexAttribI1i", "glVertexAttribI2i", + "glVertexAttribI3i", "glVertexAttribI4i", "glVertexAttribI1ui", "glVertexAttribI2ui", "glVertexAttribI3ui", "glVertexAttribI4ui", + "glVertexAttribI1iv", "glVertexAttribI2iv", "glVertexAttribI3iv", "glVertexAttribI4iv", "glVertexAttribI1uiv", "glVertexAttribI2uiv", + "glVertexAttribI3uiv", "glVertexAttribI4uiv", "glVertexAttribI4bv", "glVertexAttribI4sv", "glVertexAttribI4ubv", "glVertexAttribI4usv", + "glVertexAttribIPointer", "glGetVertexAttribIiv", "glGetVertexAttribIuiv", "glUniform1ui", "glUniform2ui", "glUniform3ui", "glUniform4ui", + "glUniform1uiv", "glUniform2uiv", "glUniform3uiv", "glUniform4uiv", "glGetUniformuiv", "glBindFragDataLocation", "glGetFragDataLocation", + "glBeginConditionalRender", "glEndConditionalRender", "glMapBufferRange", "glFlushMappedBufferRange", "glClampColor", "glIsRenderbuffer", + "glBindRenderbuffer", "glDeleteRenderbuffers", "glGenRenderbuffers", "glRenderbufferStorage", "glRenderbufferStorageMultisample", + "glGetRenderbufferParameteriv", "glIsFramebuffer", "glBindFramebuffer", "glDeleteFramebuffers", "glGenFramebuffers", "glCheckFramebufferStatus", + "glFramebufferTexture1D", "glFramebufferTexture2D", "glFramebufferTexture3D", "glFramebufferTextureLayer", "glFramebufferRenderbuffer", + "glGetFramebufferAttachmentParameteriv", "glBlitFramebuffer", "glGenerateMipmap", "glTexParameterIiv", "glTexParameterIuiv", "glGetTexParameterIiv", + "glGetTexParameterIuiv", "glColorMaski", "glGetBooleani_v", "glGetIntegeri_v", "glEnablei", "glDisablei", "glIsEnabledi", "glBindBufferRange", + "glBindBufferBase", "glBeginTransformFeedback", "glEndTransformFeedback", "glTransformFeedbackVaryings", "glGetTransformFeedbackVarying", + "glBindVertexArray", "glDeleteVertexArrays", "glGenVertexArrays", "glIsVertexArray" + ) & ext.contains("OpenGL30")) || reportMissing("GL", "OpenGL30"); } private static boolean check_GL31(FunctionProvider provider, PointerBuffer caps, Set ext) { return (checkFunctions(provider, caps, new int[] { - 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646 - }, - "glDrawArraysInstanced", "glDrawElementsInstanced", "glCopyBufferSubData", "glPrimitiveRestartIndex", "glTexBuffer", "glGetUniformIndices", - "glGetActiveUniformsiv", "glGetActiveUniformName", "glGetUniformBlockIndex", "glGetActiveUniformBlockiv", "glGetActiveUniformBlockName", - "glUniformBlockBinding" - )) && ext.contains("OpenGL31") || reportMissing("GL", "OpenGL31"); + 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646 + }, + "glDrawArraysInstanced", "glDrawElementsInstanced", "glCopyBufferSubData", "glPrimitiveRestartIndex", "glTexBuffer", "glGetUniformIndices", + "glGetActiveUniformsiv", "glGetActiveUniformName", "glGetUniformBlockIndex", "glGetActiveUniformBlockiv", "glGetActiveUniformBlockName", + "glUniformBlockBinding" + ) & ext.contains("OpenGL31")) || reportMissing("GL", "OpenGL31"); } private static boolean check_GL32(FunctionProvider provider, PointerBuffer caps, Set ext) { return (checkFunctions(provider, caps, new int[] { - 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665 - }, - "glGetBufferParameteri64v", "glDrawElementsBaseVertex", "glDrawRangeElementsBaseVertex", "glDrawElementsInstancedBaseVertex", - "glMultiDrawElementsBaseVertex", "glProvokingVertex", "glTexImage2DMultisample", "glTexImage3DMultisample", "glGetMultisamplefv", "glSampleMaski", - "glFramebufferTexture", "glFenceSync", "glIsSync", "glDeleteSync", "glClientWaitSync", "glWaitSync", "glGetInteger64v", "glGetInteger64i_v", - "glGetSynciv" - )) && ext.contains("OpenGL32") || reportMissing("GL", "OpenGL32"); + 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665 + }, + "glGetBufferParameteri64v", "glDrawElementsBaseVertex", "glDrawRangeElementsBaseVertex", "glDrawElementsInstancedBaseVertex", + "glMultiDrawElementsBaseVertex", "glProvokingVertex", "glTexImage2DMultisample", "glTexImage3DMultisample", "glGetMultisamplefv", "glSampleMaski", + "glFramebufferTexture", "glFenceSync", "glIsSync", "glDeleteSync", "glClientWaitSync", "glWaitSync", "glGetInteger64v", "glGetInteger64i_v", + "glGetSynciv" + ) & ext.contains("OpenGL32")) || reportMissing("GL", "OpenGL32"); } private static boolean check_GL33(FunctionProvider provider, PointerBuffer caps, Set ext, boolean fc) { return ((fc || checkFunctions(provider, caps, new int[] { - 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, - 715 - }, - "glVertexP2ui", "glVertexP3ui", "glVertexP4ui", "glVertexP2uiv", "glVertexP3uiv", "glVertexP4uiv", "glTexCoordP1ui", "glTexCoordP2ui", - "glTexCoordP3ui", "glTexCoordP4ui", "glTexCoordP1uiv", "glTexCoordP2uiv", "glTexCoordP3uiv", "glTexCoordP4uiv", "glMultiTexCoordP1ui", - "glMultiTexCoordP2ui", "glMultiTexCoordP3ui", "glMultiTexCoordP4ui", "glMultiTexCoordP1uiv", "glMultiTexCoordP2uiv", "glMultiTexCoordP3uiv", - "glMultiTexCoordP4uiv", "glNormalP3ui", "glNormalP3uiv", "glColorP3ui", "glColorP4ui", "glColorP3uiv", "glColorP4uiv", "glSecondaryColorP3ui", - "glSecondaryColorP3uiv" - )) && checkFunctions(provider, caps, new int[] { - 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 716, 717, 718, 719, 720, 721, 722, 723 - }, - "glBindFragDataLocationIndexed", "glGetFragDataIndex", "glGenSamplers", "glDeleteSamplers", "glIsSampler", "glBindSampler", "glSamplerParameteri", - "glSamplerParameterf", "glSamplerParameteriv", "glSamplerParameterfv", "glSamplerParameterIiv", "glSamplerParameterIuiv", "glGetSamplerParameteriv", - "glGetSamplerParameterfv", "glGetSamplerParameterIiv", "glGetSamplerParameterIuiv", "glQueryCounter", "glGetQueryObjecti64v", - "glGetQueryObjectui64v", "glVertexAttribDivisor", "glVertexAttribP1ui", "glVertexAttribP2ui", "glVertexAttribP3ui", "glVertexAttribP4ui", - "glVertexAttribP1uiv", "glVertexAttribP2uiv", "glVertexAttribP3uiv", "glVertexAttribP4uiv" - )) && ext.contains("OpenGL33") || reportMissing("GL", "OpenGL33"); + 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, + 715 + }, + "glVertexP2ui", "glVertexP3ui", "glVertexP4ui", "glVertexP2uiv", "glVertexP3uiv", "glVertexP4uiv", "glTexCoordP1ui", "glTexCoordP2ui", + "glTexCoordP3ui", "glTexCoordP4ui", "glTexCoordP1uiv", "glTexCoordP2uiv", "glTexCoordP3uiv", "glTexCoordP4uiv", "glMultiTexCoordP1ui", + "glMultiTexCoordP2ui", "glMultiTexCoordP3ui", "glMultiTexCoordP4ui", "glMultiTexCoordP1uiv", "glMultiTexCoordP2uiv", "glMultiTexCoordP3uiv", + "glMultiTexCoordP4uiv", "glNormalP3ui", "glNormalP3uiv", "glColorP3ui", "glColorP4ui", "glColorP3uiv", "glColorP4uiv", "glSecondaryColorP3ui", + "glSecondaryColorP3uiv" + )) & checkFunctions(provider, caps, new int[] { + 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 716, 717, 718, 719, 720, 721, 722, 723 + }, + "glBindFragDataLocationIndexed", "glGetFragDataIndex", "glGenSamplers", "glDeleteSamplers", "glIsSampler", "glBindSampler", "glSamplerParameteri", + "glSamplerParameterf", "glSamplerParameteriv", "glSamplerParameterfv", "glSamplerParameterIiv", "glSamplerParameterIuiv", "glGetSamplerParameteriv", + "glGetSamplerParameterfv", "glGetSamplerParameterIiv", "glGetSamplerParameterIuiv", "glQueryCounter", "glGetQueryObjecti64v", + "glGetQueryObjectui64v", "glVertexAttribDivisor", "glVertexAttribP1ui", "glVertexAttribP2ui", "glVertexAttribP3ui", "glVertexAttribP4ui", + "glVertexAttribP1uiv", "glVertexAttribP2uiv", "glVertexAttribP3uiv", "glVertexAttribP4uiv" + ) & ext.contains("OpenGL33")) || reportMissing("GL", "OpenGL33"); } private static boolean check_GL40(FunctionProvider provider, PointerBuffer caps, Set ext) { @@ -7764,17 +7698,17 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, - 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769 - }, - "glBlendEquationi", "glBlendEquationSeparatei", "glBlendFunci", "glBlendFuncSeparatei", "glDrawArraysIndirect", "glDrawElementsIndirect", - "glUniform1d", "glUniform2d", "glUniform3d", "glUniform4d", "glUniform1dv", "glUniform2dv", "glUniform3dv", "glUniform4dv", "glUniformMatrix2dv", - "glUniformMatrix3dv", "glUniformMatrix4dv", "glUniformMatrix2x3dv", "glUniformMatrix2x4dv", "glUniformMatrix3x2dv", "glUniformMatrix3x4dv", - "glUniformMatrix4x2dv", "glUniformMatrix4x3dv", "glGetUniformdv", "glMinSampleShading", "glGetSubroutineUniformLocation", "glGetSubroutineIndex", - "glGetActiveSubroutineUniformiv", "glGetActiveSubroutineUniformName", "glGetActiveSubroutineName", "glUniformSubroutinesuiv", - "glGetUniformSubroutineuiv", "glGetProgramStageiv", "glPatchParameteri", "glPatchParameterfv", "glBindTransformFeedback", - "glDeleteTransformFeedbacks", "glGenTransformFeedbacks", "glIsTransformFeedback", "glPauseTransformFeedback", "glResumeTransformFeedback", - "glDrawTransformFeedback", "glDrawTransformFeedbackStream", "glBeginQueryIndexed", "glEndQueryIndexed", "glGetQueryIndexediv" + 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769 + }, + "glBlendEquationi", "glBlendEquationSeparatei", "glBlendFunci", "glBlendFuncSeparatei", "glDrawArraysIndirect", "glDrawElementsIndirect", + "glUniform1d", "glUniform2d", "glUniform3d", "glUniform4d", "glUniform1dv", "glUniform2dv", "glUniform3dv", "glUniform4dv", "glUniformMatrix2dv", + "glUniformMatrix3dv", "glUniformMatrix4dv", "glUniformMatrix2x3dv", "glUniformMatrix2x4dv", "glUniformMatrix3x2dv", "glUniformMatrix3x4dv", + "glUniformMatrix4x2dv", "glUniformMatrix4x3dv", "glGetUniformdv", "glMinSampleShading", "glGetSubroutineUniformLocation", "glGetSubroutineIndex", + "glGetActiveSubroutineUniformiv", "glGetActiveSubroutineUniformName", "glGetActiveSubroutineName", "glUniformSubroutinesuiv", + "glGetUniformSubroutineuiv", "glGetProgramStageiv", "glPatchParameteri", "glPatchParameterfv", "glBindTransformFeedback", + "glDeleteTransformFeedbacks", "glGenTransformFeedbacks", "glIsTransformFeedback", "glPauseTransformFeedback", "glResumeTransformFeedback", + "glDrawTransformFeedback", "glDrawTransformFeedbackStream", "glBeginQueryIndexed", "glEndQueryIndexed", "glGetQueryIndexediv" )) || reportMissing("GL", "OpenGL40"); } @@ -7784,27 +7718,27 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, - 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, - 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, - 857 - }, - "glReleaseShaderCompiler", "glShaderBinary", "glGetShaderPrecisionFormat", "glDepthRangef", "glClearDepthf", "glGetProgramBinary", - "glProgramBinary", "glProgramParameteri", "glUseProgramStages", "glActiveShaderProgram", "glCreateShaderProgramv", "glBindProgramPipeline", - "glDeleteProgramPipelines", "glGenProgramPipelines", "glIsProgramPipeline", "glGetProgramPipelineiv", "glProgramUniform1i", "glProgramUniform2i", - "glProgramUniform3i", "glProgramUniform4i", "glProgramUniform1ui", "glProgramUniform2ui", "glProgramUniform3ui", "glProgramUniform4ui", - "glProgramUniform1f", "glProgramUniform2f", "glProgramUniform3f", "glProgramUniform4f", "glProgramUniform1d", "glProgramUniform2d", - "glProgramUniform3d", "glProgramUniform4d", "glProgramUniform1iv", "glProgramUniform2iv", "glProgramUniform3iv", "glProgramUniform4iv", - "glProgramUniform1uiv", "glProgramUniform2uiv", "glProgramUniform3uiv", "glProgramUniform4uiv", "glProgramUniform1fv", "glProgramUniform2fv", - "glProgramUniform3fv", "glProgramUniform4fv", "glProgramUniform1dv", "glProgramUniform2dv", "glProgramUniform3dv", "glProgramUniform4dv", - "glProgramUniformMatrix2fv", "glProgramUniformMatrix3fv", "glProgramUniformMatrix4fv", "glProgramUniformMatrix2dv", "glProgramUniformMatrix3dv", - "glProgramUniformMatrix4dv", "glProgramUniformMatrix2x3fv", "glProgramUniformMatrix3x2fv", "glProgramUniformMatrix2x4fv", - "glProgramUniformMatrix4x2fv", "glProgramUniformMatrix3x4fv", "glProgramUniformMatrix4x3fv", "glProgramUniformMatrix2x3dv", - "glProgramUniformMatrix3x2dv", "glProgramUniformMatrix2x4dv", "glProgramUniformMatrix4x2dv", "glProgramUniformMatrix3x4dv", - "glProgramUniformMatrix4x3dv", "glValidateProgramPipeline", "glGetProgramPipelineInfoLog", "glVertexAttribL1d", "glVertexAttribL2d", - "glVertexAttribL3d", "glVertexAttribL4d", "glVertexAttribL1dv", "glVertexAttribL2dv", "glVertexAttribL3dv", "glVertexAttribL4dv", - "glVertexAttribLPointer", "glGetVertexAttribLdv", "glViewportArrayv", "glViewportIndexedf", "glViewportIndexedfv", "glScissorArrayv", - "glScissorIndexed", "glScissorIndexedv", "glDepthRangeArrayv", "glDepthRangeIndexed", "glGetFloati_v", "glGetDoublei_v" + 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, + 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, + 857 + }, + "glReleaseShaderCompiler", "glShaderBinary", "glGetShaderPrecisionFormat", "glDepthRangef", "glClearDepthf", "glGetProgramBinary", + "glProgramBinary", "glProgramParameteri", "glUseProgramStages", "glActiveShaderProgram", "glCreateShaderProgramv", "glBindProgramPipeline", + "glDeleteProgramPipelines", "glGenProgramPipelines", "glIsProgramPipeline", "glGetProgramPipelineiv", "glProgramUniform1i", "glProgramUniform2i", + "glProgramUniform3i", "glProgramUniform4i", "glProgramUniform1ui", "glProgramUniform2ui", "glProgramUniform3ui", "glProgramUniform4ui", + "glProgramUniform1f", "glProgramUniform2f", "glProgramUniform3f", "glProgramUniform4f", "glProgramUniform1d", "glProgramUniform2d", + "glProgramUniform3d", "glProgramUniform4d", "glProgramUniform1iv", "glProgramUniform2iv", "glProgramUniform3iv", "glProgramUniform4iv", + "glProgramUniform1uiv", "glProgramUniform2uiv", "glProgramUniform3uiv", "glProgramUniform4uiv", "glProgramUniform1fv", "glProgramUniform2fv", + "glProgramUniform3fv", "glProgramUniform4fv", "glProgramUniform1dv", "glProgramUniform2dv", "glProgramUniform3dv", "glProgramUniform4dv", + "glProgramUniformMatrix2fv", "glProgramUniformMatrix3fv", "glProgramUniformMatrix4fv", "glProgramUniformMatrix2dv", "glProgramUniformMatrix3dv", + "glProgramUniformMatrix4dv", "glProgramUniformMatrix2x3fv", "glProgramUniformMatrix3x2fv", "glProgramUniformMatrix2x4fv", + "glProgramUniformMatrix4x2fv", "glProgramUniformMatrix3x4fv", "glProgramUniformMatrix4x3fv", "glProgramUniformMatrix2x3dv", + "glProgramUniformMatrix3x2dv", "glProgramUniformMatrix2x4dv", "glProgramUniformMatrix4x2dv", "glProgramUniformMatrix3x4dv", + "glProgramUniformMatrix4x3dv", "glValidateProgramPipeline", "glGetProgramPipelineInfoLog", "glVertexAttribL1d", "glVertexAttribL2d", + "glVertexAttribL3d", "glVertexAttribL4d", "glVertexAttribL1dv", "glVertexAttribL2dv", "glVertexAttribL3dv", "glVertexAttribL4dv", + "glVertexAttribLPointer", "glGetVertexAttribLdv", "glViewportArrayv", "glViewportIndexedf", "glViewportIndexedfv", "glScissorArrayv", + "glScissorIndexed", "glScissorIndexedv", "glDepthRangeArrayv", "glDepthRangeIndexed", "glGetFloati_v", "glGetDoublei_v" )) || reportMissing("GL", "OpenGL41"); } @@ -7814,11 +7748,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869 - }, - "glGetActiveAtomicCounterBufferiv", "glTexStorage1D", "glTexStorage2D", "glTexStorage3D", "glDrawTransformFeedbackInstanced", - "glDrawTransformFeedbackStreamInstanced", "glDrawArraysInstancedBaseInstance", "glDrawElementsInstancedBaseInstance", - "glDrawElementsInstancedBaseVertexBaseInstance", "glBindImageTexture", "glMemoryBarrier", "glGetInternalformativ" + 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869 + }, + "glGetActiveAtomicCounterBufferiv", "glTexStorage1D", "glTexStorage2D", "glTexStorage3D", "glDrawTransformFeedbackInstanced", + "glDrawTransformFeedbackStreamInstanced", "glDrawArraysInstancedBaseInstance", "glDrawElementsInstancedBaseInstance", + "glDrawElementsInstancedBaseVertexBaseInstance", "glBindImageTexture", "glMemoryBarrier", "glGetInternalformativ" )) || reportMissing("GL", "OpenGL42"); } @@ -7828,17 +7762,17 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, - 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912 - }, - "glClearBufferData", "glClearBufferSubData", "glDispatchCompute", "glDispatchComputeIndirect", "glCopyImageSubData", "glDebugMessageControl", - "glDebugMessageInsert", "glDebugMessageCallback", "glGetDebugMessageLog", "glPushDebugGroup", "glPopDebugGroup", "glObjectLabel", - "glGetObjectLabel", "glObjectPtrLabel", "glGetObjectPtrLabel", "glFramebufferParameteri", "glGetFramebufferParameteriv", "glGetInternalformati64v", - "glInvalidateTexSubImage", "glInvalidateTexImage", "glInvalidateBufferSubData", "glInvalidateBufferData", "glInvalidateFramebuffer", - "glInvalidateSubFramebuffer", "glMultiDrawArraysIndirect", "glMultiDrawElementsIndirect", "glGetProgramInterfaceiv", "glGetProgramResourceIndex", - "glGetProgramResourceName", "glGetProgramResourceiv", "glGetProgramResourceLocation", "glGetProgramResourceLocationIndex", - "glShaderStorageBlockBinding", "glTexBufferRange", "glTexStorage2DMultisample", "glTexStorage3DMultisample", "glTextureView", "glBindVertexBuffer", - "glVertexAttribFormat", "glVertexAttribIFormat", "glVertexAttribLFormat", "glVertexAttribBinding", "glVertexBindingDivisor" + 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, + 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912 + }, + "glClearBufferData", "glClearBufferSubData", "glDispatchCompute", "glDispatchComputeIndirect", "glCopyImageSubData", "glDebugMessageControl", + "glDebugMessageInsert", "glDebugMessageCallback", "glGetDebugMessageLog", "glPushDebugGroup", "glPopDebugGroup", "glObjectLabel", + "glGetObjectLabel", "glObjectPtrLabel", "glGetObjectPtrLabel", "glFramebufferParameteri", "glGetFramebufferParameteriv", "glGetInternalformati64v", + "glInvalidateTexSubImage", "glInvalidateTexImage", "glInvalidateBufferSubData", "glInvalidateBufferData", "glInvalidateFramebuffer", + "glInvalidateSubFramebuffer", "glMultiDrawArraysIndirect", "glMultiDrawElementsIndirect", "glGetProgramInterfaceiv", "glGetProgramResourceIndex", + "glGetProgramResourceName", "glGetProgramResourceiv", "glGetProgramResourceLocation", "glGetProgramResourceLocationIndex", + "glShaderStorageBlockBinding", "glTexBufferRange", "glTexStorage2DMultisample", "glTexStorage3DMultisample", "glTextureView", "glBindVertexBuffer", + "glVertexAttribFormat", "glVertexAttribIFormat", "glVertexAttribLFormat", "glVertexAttribBinding", "glVertexBindingDivisor" )) || reportMissing("GL", "OpenGL43"); } @@ -7848,10 +7782,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 913, 914, 915, 916, 917, 918, 919, 920, 921 - }, - "glBufferStorage", "glClearTexSubImage", "glClearTexImage", "glBindBuffersBase", "glBindBuffersRange", "glBindTextures", "glBindSamplers", - "glBindImageTextures", "glBindVertexBuffers" + 913, 914, 915, 916, 917, 918, 919, 920, 921 + }, + "glBufferStorage", "glClearTexSubImage", "glClearTexImage", "glBindBuffersBase", "glBindBuffersRange", "glBindTextures", "glBindSamplers", + "glBindImageTextures", "glBindVertexBuffers" )) || reportMissing("GL", "OpenGL44"); } @@ -7867,40 +7801,40 @@ public final class GLCapabilities { int flag4 = provider.getFunctionAddress("glGetPixelMapuiv") != NULL ? 0 : Integer.MIN_VALUE; int flag5 = provider.getFunctionAddress("glGetPixelMapusv") != NULL ? 0 : Integer.MIN_VALUE; int flag6 = provider.getFunctionAddress("glGetPolygonStipple") != NULL ? 0 : Integer.MIN_VALUE; - int flag7 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE; - int flag8 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE; - int flag9 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE; - int flag10 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE; - int flag11 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE; + int flag7 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE; + int flag8 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE; + int flag9 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE; + int flag10 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE; + int flag11 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, - 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, - 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, - 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1033, 1040, 1042, 1043 - }, - "glClipControl", "glCreateTransformFeedbacks", "glTransformFeedbackBufferBase", "glTransformFeedbackBufferRange", "glGetTransformFeedbackiv", - "glGetTransformFeedbacki_v", "glGetTransformFeedbacki64_v", "glCreateBuffers", "glNamedBufferStorage", "glNamedBufferData", "glNamedBufferSubData", - "glCopyNamedBufferSubData", "glClearNamedBufferData", "glClearNamedBufferSubData", "glMapNamedBuffer", "glMapNamedBufferRange", - "glUnmapNamedBuffer", "glFlushMappedNamedBufferRange", "glGetNamedBufferParameteriv", "glGetNamedBufferParameteri64v", "glGetNamedBufferPointerv", - "glGetNamedBufferSubData", "glCreateFramebuffers", "glNamedFramebufferRenderbuffer", "glNamedFramebufferParameteri", "glNamedFramebufferTexture", - "glNamedFramebufferTextureLayer", "glNamedFramebufferDrawBuffer", "glNamedFramebufferDrawBuffers", "glNamedFramebufferReadBuffer", - "glInvalidateNamedFramebufferData", "glInvalidateNamedFramebufferSubData", "glClearNamedFramebufferiv", "glClearNamedFramebufferuiv", - "glClearNamedFramebufferfv", "glClearNamedFramebufferfi", "glBlitNamedFramebuffer", "glCheckNamedFramebufferStatus", - "glGetNamedFramebufferParameteriv", "glGetNamedFramebufferAttachmentParameteriv", "glCreateRenderbuffers", "glNamedRenderbufferStorage", - "glNamedRenderbufferStorageMultisample", "glGetNamedRenderbufferParameteriv", "glCreateTextures", "glTextureBuffer", "glTextureBufferRange", - "glTextureStorage1D", "glTextureStorage2D", "glTextureStorage3D", "glTextureStorage2DMultisample", "glTextureStorage3DMultisample", - "glTextureSubImage1D", "glTextureSubImage2D", "glTextureSubImage3D", "glCompressedTextureSubImage1D", "glCompressedTextureSubImage2D", - "glCompressedTextureSubImage3D", "glCopyTextureSubImage1D", "glCopyTextureSubImage2D", "glCopyTextureSubImage3D", "glTextureParameterf", - "glTextureParameterfv", "glTextureParameteri", "glTextureParameterIiv", "glTextureParameterIuiv", "glTextureParameteriv", "glGenerateTextureMipmap", - "glBindTextureUnit", "glGetTextureImage", "glGetCompressedTextureImage", "glGetTextureLevelParameterfv", "glGetTextureLevelParameteriv", - "glGetTextureParameterfv", "glGetTextureParameterIiv", "glGetTextureParameterIuiv", "glGetTextureParameteriv", "glCreateVertexArrays", - "glDisableVertexArrayAttrib", "glEnableVertexArrayAttrib", "glVertexArrayElementBuffer", "glVertexArrayVertexBuffer", "glVertexArrayVertexBuffers", - "glVertexArrayAttribFormat", "glVertexArrayAttribIFormat", "glVertexArrayAttribLFormat", "glVertexArrayAttribBinding", - "glVertexArrayBindingDivisor", "glGetVertexArrayiv", "glGetVertexArrayIndexediv", "glGetVertexArrayIndexed64iv", "glCreateSamplers", - "glCreateProgramPipelines", "glCreateQueries", "glGetQueryBufferObjectiv", "glGetQueryBufferObjectuiv", "glGetQueryBufferObjecti64v", - "glGetQueryBufferObjectui64v", "glMemoryBarrierByRegion", "glGetTextureSubImage", "glGetCompressedTextureSubImage", "glTextureBarrier", - "glGetGraphicsResetStatus", "glReadnPixels", "glGetnUniformfv", "glGetnUniformiv", "glGetnUniformuiv" + 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, + 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, + 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, + 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1033, 1040, 1042, 1043 + }, + "glClipControl", "glCreateTransformFeedbacks", "glTransformFeedbackBufferBase", "glTransformFeedbackBufferRange", "glGetTransformFeedbackiv", + "glGetTransformFeedbacki_v", "glGetTransformFeedbacki64_v", "glCreateBuffers", "glNamedBufferStorage", "glNamedBufferData", "glNamedBufferSubData", + "glCopyNamedBufferSubData", "glClearNamedBufferData", "glClearNamedBufferSubData", "glMapNamedBuffer", "glMapNamedBufferRange", + "glUnmapNamedBuffer", "glFlushMappedNamedBufferRange", "glGetNamedBufferParameteriv", "glGetNamedBufferParameteri64v", "glGetNamedBufferPointerv", + "glGetNamedBufferSubData", "glCreateFramebuffers", "glNamedFramebufferRenderbuffer", "glNamedFramebufferParameteri", "glNamedFramebufferTexture", + "glNamedFramebufferTextureLayer", "glNamedFramebufferDrawBuffer", "glNamedFramebufferDrawBuffers", "glNamedFramebufferReadBuffer", + "glInvalidateNamedFramebufferData", "glInvalidateNamedFramebufferSubData", "glClearNamedFramebufferiv", "glClearNamedFramebufferuiv", + "glClearNamedFramebufferfv", "glClearNamedFramebufferfi", "glBlitNamedFramebuffer", "glCheckNamedFramebufferStatus", + "glGetNamedFramebufferParameteriv", "glGetNamedFramebufferAttachmentParameteriv", "glCreateRenderbuffers", "glNamedRenderbufferStorage", + "glNamedRenderbufferStorageMultisample", "glGetNamedRenderbufferParameteriv", "glCreateTextures", "glTextureBuffer", "glTextureBufferRange", + "glTextureStorage1D", "glTextureStorage2D", "glTextureStorage3D", "glTextureStorage2DMultisample", "glTextureStorage3DMultisample", + "glTextureSubImage1D", "glTextureSubImage2D", "glTextureSubImage3D", "glCompressedTextureSubImage1D", "glCompressedTextureSubImage2D", + "glCompressedTextureSubImage3D", "glCopyTextureSubImage1D", "glCopyTextureSubImage2D", "glCopyTextureSubImage3D", "glTextureParameterf", + "glTextureParameterfv", "glTextureParameteri", "glTextureParameterIiv", "glTextureParameterIuiv", "glTextureParameteriv", "glGenerateTextureMipmap", + "glBindTextureUnit", "glGetTextureImage", "glGetCompressedTextureImage", "glGetTextureLevelParameterfv", "glGetTextureLevelParameteriv", + "glGetTextureParameterfv", "glGetTextureParameterIiv", "glGetTextureParameterIuiv", "glGetTextureParameteriv", "glCreateVertexArrays", + "glDisableVertexArrayAttrib", "glEnableVertexArrayAttrib", "glVertexArrayElementBuffer", "glVertexArrayVertexBuffer", "glVertexArrayVertexBuffers", + "glVertexArrayAttribFormat", "glVertexArrayAttribIFormat", "glVertexArrayAttribLFormat", "glVertexArrayAttribBinding", + "glVertexArrayBindingDivisor", "glGetVertexArrayiv", "glGetVertexArrayIndexediv", "glGetVertexArrayIndexed64iv", "glCreateSamplers", + "glCreateProgramPipelines", "glCreateQueries", "glGetQueryBufferObjectiv", "glGetQueryBufferObjectuiv", "glGetQueryBufferObjecti64v", + "glGetQueryBufferObjectui64v", "glMemoryBarrierByRegion", "glGetTextureSubImage", "glGetCompressedTextureSubImage", "glTextureBarrier", + "glGetGraphicsResetStatus", "glReadnPixels", "glGetnUniformfv", "glGetnUniformiv", "glGetnUniformuiv" )) || reportMissing("GL", "OpenGL45"); } @@ -7910,9 +7844,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1044, 1045, 1046, 1047 - }, - "glMultiDrawArraysIndirectCount", "glMultiDrawElementsIndirectCount", "glPolygonOffsetClamp", "glSpecializeShader" + 1044, 1045, 1046, 1047 + }, + "glMultiDrawArraysIndirectCount", "glMultiDrawElementsIndirectCount", "glPolygonOffsetClamp", "glSpecializeShader" )) || reportMissing("GL", "OpenGL46"); } @@ -7922,9 +7856,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1048, 1049, 1050, 1051 - }, - "glDebugMessageEnableAMD", "glDebugMessageInsertAMD", "glDebugMessageCallbackAMD", "glGetDebugMessageLogAMD" + 1048, 1049, 1050, 1051 + }, + "glDebugMessageEnableAMD", "glDebugMessageInsertAMD", "glDebugMessageCallbackAMD", "glGetDebugMessageLogAMD" )) || reportMissing("GL", "GL_AMD_debug_output"); } @@ -7934,9 +7868,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1052, 1053, 1054, 1055 - }, - "glBlendFuncIndexedAMD", "glBlendFuncSeparateIndexedAMD", "glBlendEquationIndexedAMD", "glBlendEquationSeparateIndexedAMD" + 1052, 1053, 1054, 1055 + }, + "glBlendFuncIndexedAMD", "glBlendFuncSeparateIndexedAMD", "glBlendEquationIndexedAMD", "glBlendEquationSeparateIndexedAMD" )) || reportMissing("GL", "GL_AMD_draw_buffers_blend"); } @@ -7946,9 +7880,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1056, 1057 - }, - "glRenderbufferStorageMultisampleAdvancedAMD", "glNamedRenderbufferStorageMultisampleAdvancedAMD" + 1056, 1057 + }, + "glRenderbufferStorageMultisampleAdvancedAMD", "glNamedRenderbufferStorageMultisampleAdvancedAMD" )) || reportMissing("GL", "GL_AMD_framebuffer_multisample_advanced"); } @@ -7960,16 +7894,16 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, flag0 + 1076, flag0 + 1077, - flag0 + 1078, flag0 + 1079, flag0 + 1080, flag0 + 1081, flag0 + 1082, flag0 + 1083, flag0 + 1084, flag0 + 1085, flag0 + 1086, flag0 + 1087, - flag0 + 1088, flag0 + 1089, flag0 + 1090, flag0 + 1091 - }, - "glUniform1i64NV", "glUniform2i64NV", "glUniform3i64NV", "glUniform4i64NV", "glUniform1i64vNV", "glUniform2i64vNV", "glUniform3i64vNV", - "glUniform4i64vNV", "glUniform1ui64NV", "glUniform2ui64NV", "glUniform3ui64NV", "glUniform4ui64NV", "glUniform1ui64vNV", "glUniform2ui64vNV", - "glUniform3ui64vNV", "glUniform4ui64vNV", "glGetUniformi64vNV", "glGetUniformui64vNV", "glProgramUniform1i64NV", "glProgramUniform2i64NV", - "glProgramUniform3i64NV", "glProgramUniform4i64NV", "glProgramUniform1i64vNV", "glProgramUniform2i64vNV", "glProgramUniform3i64vNV", - "glProgramUniform4i64vNV", "glProgramUniform1ui64NV", "glProgramUniform2ui64NV", "glProgramUniform3ui64NV", "glProgramUniform4ui64NV", - "glProgramUniform1ui64vNV", "glProgramUniform2ui64vNV", "glProgramUniform3ui64vNV", "glProgramUniform4ui64vNV" + 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, flag0 + 1076, flag0 + 1077, + flag0 + 1078, flag0 + 1079, flag0 + 1080, flag0 + 1081, flag0 + 1082, flag0 + 1083, flag0 + 1084, flag0 + 1085, flag0 + 1086, flag0 + 1087, + flag0 + 1088, flag0 + 1089, flag0 + 1090, flag0 + 1091 + }, + "glUniform1i64NV", "glUniform2i64NV", "glUniform3i64NV", "glUniform4i64NV", "glUniform1i64vNV", "glUniform2i64vNV", "glUniform3i64vNV", + "glUniform4i64vNV", "glUniform1ui64NV", "glUniform2ui64NV", "glUniform3ui64NV", "glUniform4ui64NV", "glUniform1ui64vNV", "glUniform2ui64vNV", + "glUniform3ui64vNV", "glUniform4ui64vNV", "glGetUniformi64vNV", "glGetUniformui64vNV", "glProgramUniform1i64NV", "glProgramUniform2i64NV", + "glProgramUniform3i64NV", "glProgramUniform4i64NV", "glProgramUniform1i64vNV", "glProgramUniform2i64vNV", "glProgramUniform3i64vNV", + "glProgramUniform4i64vNV", "glProgramUniform1ui64NV", "glProgramUniform2ui64NV", "glProgramUniform3ui64NV", "glProgramUniform4ui64NV", + "glProgramUniform1ui64vNV", "glProgramUniform2ui64vNV", "glProgramUniform3ui64vNV", "glProgramUniform4ui64vNV" )) || reportMissing("GL", "GL_AMD_gpu_shader_int64"); } @@ -7979,9 +7913,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1092 - }, - "glVertexAttribParameteriAMD" + 1092 + }, + "glVertexAttribParameteriAMD" )) || reportMissing("GL", "GL_AMD_interleaved_elements"); } @@ -7991,9 +7925,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1093 - }, - "glQueryObjectParameteruiAMD" + 1093 + }, + "glQueryObjectParameteruiAMD" )) || reportMissing("GL", "GL_AMD_occlusion_query_event"); } @@ -8003,11 +7937,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104 - }, - "glGetPerfMonitorGroupsAMD", "glGetPerfMonitorCountersAMD", "glGetPerfMonitorGroupStringAMD", "glGetPerfMonitorCounterStringAMD", - "glGetPerfMonitorCounterInfoAMD", "glGenPerfMonitorsAMD", "glDeletePerfMonitorsAMD", "glSelectPerfMonitorCountersAMD", "glBeginPerfMonitorAMD", - "glEndPerfMonitorAMD", "glGetPerfMonitorCounterDataAMD" + 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104 + }, + "glGetPerfMonitorGroupsAMD", "glGetPerfMonitorCountersAMD", "glGetPerfMonitorGroupStringAMD", "glGetPerfMonitorCounterStringAMD", + "glGetPerfMonitorCounterInfoAMD", "glGenPerfMonitorsAMD", "glDeletePerfMonitorsAMD", "glSelectPerfMonitorCountersAMD", "glBeginPerfMonitorAMD", + "glEndPerfMonitorAMD", "glGetPerfMonitorCounterDataAMD" )) || reportMissing("GL", "GL_AMD_performance_monitor"); } @@ -8017,9 +7951,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1105 - }, - "glSetMultisamplefvAMD" + 1105 + }, + "glSetMultisamplefvAMD" )) || reportMissing("GL", "GL_AMD_sample_positions"); } @@ -8029,9 +7963,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1106, 1107 - }, - "glTexStorageSparseAMD", "glTextureStorageSparseAMD" + 1106, 1107 + }, + "glTexStorageSparseAMD", "glTextureStorageSparseAMD" )) || reportMissing("GL", "GL_AMD_sparse_texture"); } @@ -8041,9 +7975,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1108 - }, - "glStencilOpValueAMD" + 1108 + }, + "glStencilOpValueAMD" )) || reportMissing("GL", "GL_AMD_stencil_operation_extended"); } @@ -8053,9 +7987,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1109, 1110 - }, - "glTessellationFactorAMD", "glTessellationModeAMD" + 1109, 1110 + }, + "glTessellationFactorAMD", "glTessellationModeAMD" )) || reportMissing("GL", "GL_AMD_vertex_shader_tessellator"); } @@ -8065,9 +7999,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 864, 865, 866 - }, - "glDrawArraysInstancedBaseInstance", "glDrawElementsInstancedBaseInstance", "glDrawElementsInstancedBaseVertexBaseInstance" + 864, 865, 866 + }, + "glDrawArraysInstancedBaseInstance", "glDrawElementsInstancedBaseInstance", "glDrawElementsInstancedBaseVertexBaseInstance" )) || reportMissing("GL", "GL_ARB_base_instance"); } @@ -8077,12 +8011,12 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126 - }, - "glGetTextureHandleARB", "glGetTextureSamplerHandleARB", "glMakeTextureHandleResidentARB", "glMakeTextureHandleNonResidentARB", - "glGetImageHandleARB", "glMakeImageHandleResidentARB", "glMakeImageHandleNonResidentARB", "glUniformHandleui64ARB", "glUniformHandleui64vARB", - "glProgramUniformHandleui64ARB", "glProgramUniformHandleui64vARB", "glIsTextureHandleResidentARB", "glIsImageHandleResidentARB", - "glVertexAttribL1ui64ARB", "glVertexAttribL1ui64vARB", "glGetVertexAttribLui64vARB" + 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126 + }, + "glGetTextureHandleARB", "glGetTextureSamplerHandleARB", "glMakeTextureHandleResidentARB", "glMakeTextureHandleNonResidentARB", + "glGetImageHandleARB", "glMakeImageHandleResidentARB", "glMakeImageHandleNonResidentARB", "glUniformHandleui64ARB", "glUniformHandleui64vARB", + "glProgramUniformHandleui64ARB", "glProgramUniformHandleui64vARB", "glIsTextureHandleResidentARB", "glIsImageHandleResidentARB", + "glVertexAttribL1ui64ARB", "glVertexAttribL1ui64vARB", "glGetVertexAttribLui64vARB" )) || reportMissing("GL", "GL_ARB_bindless_texture"); } @@ -8092,9 +8026,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 666, 667 - }, - "glBindFragDataLocationIndexed", "glGetFragDataIndex" + 666, 667 + }, + "glBindFragDataLocationIndexed", "glGetFragDataIndex" )) || reportMissing("GL", "GL_ARB_blend_func_extended"); } @@ -8106,12 +8040,24 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 913, flag0 + 1127 - }, - "glBufferStorage", "glNamedBufferStorageEXT" + 913, flag0 + 1127 + }, + "glBufferStorage", "glNamedBufferStorageEXT" )) || reportMissing("GL", "GL_ARB_buffer_storage"); } + private static boolean check_ARB_cl_event(FunctionProvider provider, PointerBuffer caps, Set ext) { + if (!ext.contains("GL_ARB_cl_event")) { + return false; + } + + return (checkFunctions(provider, caps, new int[] { + 1128 + }, + "glCreateSyncFromCLeventARB" + )) || reportMissing("GL", "GL_ARB_cl_event"); + } + private static boolean check_ARB_clear_buffer_object(FunctionProvider provider, PointerBuffer caps, Set ext) { if (!ext.contains("GL_ARB_clear_buffer_object")) { return false; @@ -8120,9 +8066,9 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 870, 871, flag0 + 1128, flag0 + 1129 - }, - "glClearBufferData", "glClearBufferSubData", "glClearNamedBufferDataEXT", "glClearNamedBufferSubDataEXT" + 870, 871, flag0 + 1129, flag0 + 1130 + }, + "glClearBufferData", "glClearBufferSubData", "glClearNamedBufferDataEXT", "glClearNamedBufferSubDataEXT" )) || reportMissing("GL", "GL_ARB_clear_buffer_object"); } @@ -8132,9 +8078,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 914, 915 - }, - "glClearTexSubImage", "glClearTexImage" + 914, 915 + }, + "glClearTexSubImage", "glClearTexImage" )) || reportMissing("GL", "GL_ARB_clear_texture"); } @@ -8144,9 +8090,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 922 - }, - "glClipControl" + 922 + }, + "glClipControl" )) || reportMissing("GL", "GL_ARB_clip_control"); } @@ -8156,9 +8102,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1130 - }, - "glClampColorARB" + 1131 + }, + "glClampColorARB" )) || reportMissing("GL", "GL_ARB_color_buffer_float"); } @@ -8168,9 +8114,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 872, 873 - }, - "glDispatchCompute", "glDispatchComputeIndirect" + 872, 873 + }, + "glDispatchCompute", "glDispatchComputeIndirect" )) || reportMissing("GL", "GL_ARB_compute_shader"); } @@ -8180,9 +8126,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1131 - }, - "glDispatchComputeGroupSizeARB" + 1132 + }, + "glDispatchComputeGroupSizeARB" )) || reportMissing("GL", "GL_ARB_compute_variable_group_size"); } @@ -8192,9 +8138,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 637 - }, - "glCopyBufferSubData" + 637 + }, + "glCopyBufferSubData" )) || reportMissing("GL", "GL_ARB_copy_buffer"); } @@ -8204,9 +8150,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 874 - }, - "glCopyImageSubData" + 874 + }, + "glCopyImageSubData" )) || reportMissing("GL", "GL_ARB_copy_image"); } @@ -8216,9 +8162,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1132, 1133, 1134, 1135 - }, - "glDebugMessageControlARB", "glDebugMessageInsertARB", "glDebugMessageCallbackARB", "glGetDebugMessageLogARB" + 1133, 1134, 1135, 1136 + }, + "glDebugMessageControlARB", "glDebugMessageInsertARB", "glDebugMessageCallbackARB", "glGetDebugMessageLogARB" )) || reportMissing("GL", "GL_ARB_debug_output"); } @@ -8248,36 +8194,36 @@ public final class GLCapabilities { int flag58 = ARB_query_buffer_object(ext) ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - flag0 + 923, flag1 + 924, flag1 + 925, flag0 + 926, flag0 + 927, flag0 + 928, 929, flag6 + 930, 931, 932, flag7 + 933, flag8 + 934, flag8 + 935, - 936, flag10 + 937, 938, flag10 + 939, 940, 941, 942, 943, flag12 + 944, flag12 + 945, flag14 + 946, flag12 + 947, flag12 + 948, flag12 + 949, - flag12 + 950, flag12 + 951, flag20 + 952, flag20 + 953, flag12 + 954, flag12 + 955, flag12 + 956, flag12 + 957, flag12 + 958, flag12 + 959, - flag14 + 960, flag12 + 961, flag12 + 962, flag12 + 963, flag12 + 964, flag12 + 965, 966, flag34 + 967, flag35 + 968, flag36 + 969, flag36 + 970, - flag36 + 971, flag39 + 972, flag39 + 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, flag12 + 989, 990, 991, 992, - 993, 994, 995, 996, 997, 998, flag42 + 999, flag42 + 1000, flag42 + 1001, flag42 + 1002, flag46 + 1003, flag47 + 1004, flag46 + 1005, flag46 + 1006, - flag46 + 1007, flag46 + 1008, flag46 + 1009, flag42 + 1010, flag42 + 1011, flag42 + 1012, flag56 + 1013, flag57 + 1014, 1015, flag58 + 1018, - flag58 + 1016, flag58 + 1019, flag58 + 1017 - }, - "glCreateTransformFeedbacks", "glTransformFeedbackBufferBase", "glTransformFeedbackBufferRange", "glGetTransformFeedbackiv", - "glGetTransformFeedbacki_v", "glGetTransformFeedbacki64_v", "glCreateBuffers", "glNamedBufferStorage", "glNamedBufferData", "glNamedBufferSubData", - "glCopyNamedBufferSubData", "glClearNamedBufferData", "glClearNamedBufferSubData", "glMapNamedBuffer", "glMapNamedBufferRange", - "glUnmapNamedBuffer", "glFlushMappedNamedBufferRange", "glGetNamedBufferParameteriv", "glGetNamedBufferParameteri64v", "glGetNamedBufferPointerv", - "glGetNamedBufferSubData", "glCreateFramebuffers", "glNamedFramebufferRenderbuffer", "glNamedFramebufferParameteri", "glNamedFramebufferTexture", - "glNamedFramebufferTextureLayer", "glNamedFramebufferDrawBuffer", "glNamedFramebufferDrawBuffers", "glNamedFramebufferReadBuffer", - "glInvalidateNamedFramebufferData", "glInvalidateNamedFramebufferSubData", "glClearNamedFramebufferiv", "glClearNamedFramebufferuiv", - "glClearNamedFramebufferfv", "glClearNamedFramebufferfi", "glBlitNamedFramebuffer", "glCheckNamedFramebufferStatus", - "glGetNamedFramebufferParameteriv", "glGetNamedFramebufferAttachmentParameteriv", "glCreateRenderbuffers", "glNamedRenderbufferStorage", - "glNamedRenderbufferStorageMultisample", "glGetNamedRenderbufferParameteriv", "glCreateTextures", "glTextureBuffer", "glTextureBufferRange", - "glTextureStorage1D", "glTextureStorage2D", "glTextureStorage3D", "glTextureStorage2DMultisample", "glTextureStorage3DMultisample", - "glTextureSubImage1D", "glTextureSubImage2D", "glTextureSubImage3D", "glCompressedTextureSubImage1D", "glCompressedTextureSubImage2D", - "glCompressedTextureSubImage3D", "glCopyTextureSubImage1D", "glCopyTextureSubImage2D", "glCopyTextureSubImage3D", "glTextureParameterf", - "glTextureParameterfv", "glTextureParameteri", "glTextureParameterIiv", "glTextureParameterIuiv", "glTextureParameteriv", "glGenerateTextureMipmap", - "glBindTextureUnit", "glGetTextureImage", "glGetCompressedTextureImage", "glGetTextureLevelParameterfv", "glGetTextureLevelParameteriv", - "glGetTextureParameterfv", "glGetTextureParameterIiv", "glGetTextureParameterIuiv", "glGetTextureParameteriv", "glCreateVertexArrays", - "glDisableVertexArrayAttrib", "glEnableVertexArrayAttrib", "glVertexArrayElementBuffer", "glVertexArrayVertexBuffer", "glVertexArrayVertexBuffers", - "glVertexArrayAttribFormat", "glVertexArrayAttribIFormat", "glVertexArrayAttribLFormat", "glVertexArrayAttribBinding", - "glVertexArrayBindingDivisor", "glGetVertexArrayiv", "glGetVertexArrayIndexediv", "glGetVertexArrayIndexed64iv", "glCreateSamplers", - "glCreateProgramPipelines", "glCreateQueries", "glGetQueryBufferObjecti64v", "glGetQueryBufferObjectiv", "glGetQueryBufferObjectui64v", - "glGetQueryBufferObjectuiv" + flag0 + 923, flag1 + 924, flag1 + 925, flag0 + 926, flag0 + 927, flag0 + 928, 929, flag6 + 930, 931, 932, flag7 + 933, flag8 + 934, flag8 + 935, + 936, flag10 + 937, 938, flag10 + 939, 940, 941, 942, 943, flag12 + 944, flag12 + 945, flag14 + 946, flag12 + 947, flag12 + 948, flag12 + 949, + flag12 + 950, flag12 + 951, flag20 + 952, flag20 + 953, flag12 + 954, flag12 + 955, flag12 + 956, flag12 + 957, flag12 + 958, flag12 + 959, + flag14 + 960, flag12 + 961, flag12 + 962, flag12 + 963, flag12 + 964, flag12 + 965, 966, flag34 + 967, flag35 + 968, flag36 + 969, flag36 + 970, + flag36 + 971, flag39 + 972, flag39 + 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, flag12 + 989, 990, 991, 992, + 993, 994, 995, 996, 997, 998, flag42 + 999, flag42 + 1000, flag42 + 1001, flag42 + 1002, flag46 + 1003, flag47 + 1004, flag46 + 1005, flag46 + 1006, + flag46 + 1007, flag46 + 1008, flag46 + 1009, flag42 + 1010, flag42 + 1011, flag42 + 1012, flag56 + 1013, flag57 + 1014, 1015, flag58 + 1018, + flag58 + 1016, flag58 + 1019, flag58 + 1017 + }, + "glCreateTransformFeedbacks", "glTransformFeedbackBufferBase", "glTransformFeedbackBufferRange", "glGetTransformFeedbackiv", + "glGetTransformFeedbacki_v", "glGetTransformFeedbacki64_v", "glCreateBuffers", "glNamedBufferStorage", "glNamedBufferData", "glNamedBufferSubData", + "glCopyNamedBufferSubData", "glClearNamedBufferData", "glClearNamedBufferSubData", "glMapNamedBuffer", "glMapNamedBufferRange", + "glUnmapNamedBuffer", "glFlushMappedNamedBufferRange", "glGetNamedBufferParameteriv", "glGetNamedBufferParameteri64v", "glGetNamedBufferPointerv", + "glGetNamedBufferSubData", "glCreateFramebuffers", "glNamedFramebufferRenderbuffer", "glNamedFramebufferParameteri", "glNamedFramebufferTexture", + "glNamedFramebufferTextureLayer", "glNamedFramebufferDrawBuffer", "glNamedFramebufferDrawBuffers", "glNamedFramebufferReadBuffer", + "glInvalidateNamedFramebufferData", "glInvalidateNamedFramebufferSubData", "glClearNamedFramebufferiv", "glClearNamedFramebufferuiv", + "glClearNamedFramebufferfv", "glClearNamedFramebufferfi", "glBlitNamedFramebuffer", "glCheckNamedFramebufferStatus", + "glGetNamedFramebufferParameteriv", "glGetNamedFramebufferAttachmentParameteriv", "glCreateRenderbuffers", "glNamedRenderbufferStorage", + "glNamedRenderbufferStorageMultisample", "glGetNamedRenderbufferParameteriv", "glCreateTextures", "glTextureBuffer", "glTextureBufferRange", + "glTextureStorage1D", "glTextureStorage2D", "glTextureStorage3D", "glTextureStorage2DMultisample", "glTextureStorage3DMultisample", + "glTextureSubImage1D", "glTextureSubImage2D", "glTextureSubImage3D", "glCompressedTextureSubImage1D", "glCompressedTextureSubImage2D", + "glCompressedTextureSubImage3D", "glCopyTextureSubImage1D", "glCopyTextureSubImage2D", "glCopyTextureSubImage3D", "glTextureParameterf", + "glTextureParameterfv", "glTextureParameteri", "glTextureParameterIiv", "glTextureParameterIuiv", "glTextureParameteriv", "glGenerateTextureMipmap", + "glBindTextureUnit", "glGetTextureImage", "glGetCompressedTextureImage", "glGetTextureLevelParameterfv", "glGetTextureLevelParameteriv", + "glGetTextureParameterfv", "glGetTextureParameterIiv", "glGetTextureParameterIuiv", "glGetTextureParameteriv", "glCreateVertexArrays", + "glDisableVertexArrayAttrib", "glEnableVertexArrayAttrib", "glVertexArrayElementBuffer", "glVertexArrayVertexBuffer", "glVertexArrayVertexBuffers", + "glVertexArrayAttribFormat", "glVertexArrayAttribIFormat", "glVertexArrayAttribLFormat", "glVertexArrayAttribBinding", + "glVertexArrayBindingDivisor", "glGetVertexArrayiv", "glGetVertexArrayIndexediv", "glGetVertexArrayIndexed64iv", "glCreateSamplers", + "glCreateProgramPipelines", "glCreateQueries", "glGetQueryBufferObjecti64v", "glGetQueryBufferObjectiv", "glGetQueryBufferObjectui64v", + "glGetQueryBufferObjectuiv" )) || reportMissing("GL", "GL_ARB_direct_state_access"); } @@ -8287,9 +8233,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1136 - }, - "glDrawBuffersARB" + 1137 + }, + "glDrawBuffersARB" )) || reportMissing("GL", "GL_ARB_draw_buffers"); } @@ -8299,9 +8245,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1137, 1138, 1139, 1140 - }, - "glBlendEquationiARB", "glBlendEquationSeparateiARB", "glBlendFunciARB", "glBlendFuncSeparateiARB" + 1138, 1139, 1140, 1141 + }, + "glBlendEquationiARB", "glBlendEquationSeparateiARB", "glBlendFunciARB", "glBlendFuncSeparateiARB" )) || reportMissing("GL", "GL_ARB_draw_buffers_blend"); } @@ -8311,9 +8257,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 648, 649, 650, 651 - }, - "glDrawElementsBaseVertex", "glDrawRangeElementsBaseVertex", "glDrawElementsInstancedBaseVertex", "glMultiDrawElementsBaseVertex" + 648, 649, 650, 651 + }, + "glDrawElementsBaseVertex", "glDrawRangeElementsBaseVertex", "glDrawElementsInstancedBaseVertex", "glMultiDrawElementsBaseVertex" )) || reportMissing("GL", "GL_ARB_draw_elements_base_vertex"); } @@ -8323,9 +8269,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 728, 729 - }, - "glDrawArraysIndirect", "glDrawElementsIndirect" + 728, 729 + }, + "glDrawArraysIndirect", "glDrawElementsIndirect" )) || reportMissing("GL", "GL_ARB_draw_indirect"); } @@ -8335,9 +8281,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1141, 1142 - }, - "glDrawArraysInstancedARB", "glDrawElementsInstancedARB" + 1142, 1143 + }, + "glDrawArraysInstancedARB", "glDrawElementsInstancedARB" )) || reportMissing("GL", "GL_ARB_draw_instanced"); } @@ -8347,9 +8293,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 770, 771, 772, 773, 774 - }, - "glReleaseShaderCompiler", "glShaderBinary", "glGetShaderPrecisionFormat", "glDepthRangef", "glClearDepthf" + 770, 771, 772, 773, 774 + }, + "glReleaseShaderCompiler", "glShaderBinary", "glGetShaderPrecisionFormat", "glDepthRangef", "glClearDepthf" )) || reportMissing("GL", "GL_ARB_ES2_compatibility"); } @@ -8359,9 +8305,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1020 - }, - "glMemoryBarrierByRegion" + 1020 + }, + "glMemoryBarrierByRegion" )) || reportMissing("GL", "GL_ARB_ES3_1_compatibility"); } @@ -8371,9 +8317,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1143 - }, - "glPrimitiveBoundingBoxARB" + 1144 + }, + "glPrimitiveBoundingBoxARB" )) || reportMissing("GL", "GL_ARB_ES3_2_compatibility"); } @@ -8385,9 +8331,9 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 885, 886, flag0 + 1144, flag0 + 1145 - }, - "glFramebufferParameteri", "glGetFramebufferParameteriv", "glNamedFramebufferParameteriEXT", "glGetNamedFramebufferParameterivEXT" + 885, 886, flag0 + 1145, flag0 + 1146 + }, + "glFramebufferParameteri", "glGetFramebufferParameteriv", "glNamedFramebufferParameteriEXT", "glGetNamedFramebufferParameterivEXT" )) || reportMissing("GL", "GL_ARB_framebuffer_no_attachments"); } @@ -8397,12 +8343,12 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614 - }, - "glIsRenderbuffer", "glBindRenderbuffer", "glDeleteRenderbuffers", "glGenRenderbuffers", "glRenderbufferStorage", - "glRenderbufferStorageMultisample", "glGetRenderbufferParameteriv", "glIsFramebuffer", "glBindFramebuffer", "glDeleteFramebuffers", - "glGenFramebuffers", "glCheckFramebufferStatus", "glFramebufferTexture1D", "glFramebufferTexture2D", "glFramebufferTexture3D", - "glFramebufferTextureLayer", "glFramebufferRenderbuffer", "glGetFramebufferAttachmentParameteriv", "glBlitFramebuffer", "glGenerateMipmap" + 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614 + }, + "glIsRenderbuffer", "glBindRenderbuffer", "glDeleteRenderbuffers", "glGenRenderbuffers", "glRenderbufferStorage", + "glRenderbufferStorageMultisample", "glGetRenderbufferParameteriv", "glIsFramebuffer", "glBindFramebuffer", "glDeleteFramebuffers", + "glGenFramebuffers", "glCheckFramebufferStatus", "glFramebufferTexture1D", "glFramebufferTexture2D", "glFramebufferTexture3D", + "glFramebufferTextureLayer", "glFramebufferRenderbuffer", "glGetFramebufferAttachmentParameteriv", "glBlitFramebuffer", "glGenerateMipmap" )) || reportMissing("GL", "GL_ARB_framebuffer_object"); } @@ -8412,9 +8358,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1146, 1147, 1148, 1149 - }, - "glProgramParameteriARB", "glFramebufferTextureARB", "glFramebufferTextureLayerARB", "glFramebufferTextureFaceARB" + 1147, 1148, 1149, 1150 + }, + "glProgramParameteriARB", "glFramebufferTextureARB", "glFramebufferTextureLayerARB", "glFramebufferTextureFaceARB" )) || reportMissing("GL", "GL_ARB_geometry_shader4"); } @@ -8424,9 +8370,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 775, 776, 777 - }, - "glGetProgramBinary", "glProgramBinary", "glProgramParameteri" + 775, 776, 777 + }, + "glGetProgramBinary", "glProgramBinary", "glProgramParameteri" )) || reportMissing("GL", "GL_ARB_get_program_binary"); } @@ -8436,9 +8382,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1021, 1022 - }, - "glGetTextureSubImage", "glGetCompressedTextureSubImage" + 1021, 1022 + }, + "glGetTextureSubImage", "glGetCompressedTextureSubImage" )) || reportMissing("GL", "GL_ARB_get_texture_sub_image"); } @@ -8448,9 +8394,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1150 - }, - "glSpecializeShaderARB" + 1151 + }, + "glSpecializeShaderARB" )) || reportMissing("GL", "GL_ARB_gl_spirv"); } @@ -8462,11 +8408,11 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747 - }, - "glUniform1d", "glUniform2d", "glUniform3d", "glUniform4d", "glUniform1dv", "glUniform2dv", "glUniform3dv", "glUniform4dv", "glUniformMatrix2dv", - "glUniformMatrix3dv", "glUniformMatrix4dv", "glUniformMatrix2x3dv", "glUniformMatrix2x4dv", "glUniformMatrix3x2dv", "glUniformMatrix3x4dv", - "glUniformMatrix4x2dv", "glUniformMatrix4x3dv", "glGetUniformdv" + 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747 + }, + "glUniform1d", "glUniform2d", "glUniform3d", "glUniform4d", "glUniform1dv", "glUniform2dv", "glUniform3dv", "glUniform4dv", "glUniformMatrix2dv", + "glUniformMatrix3dv", "glUniformMatrix4dv", "glUniformMatrix2x3dv", "glUniformMatrix2x4dv", "glUniformMatrix3x2dv", "glUniformMatrix3x4dv", + "glUniformMatrix4x2dv", "glUniformMatrix4x3dv", "glGetUniformdv" )) || reportMissing("GL", "GL_ARB_gpu_shader_fp64"); } @@ -8476,16 +8422,16 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, - 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203 - }, - "glUniform1i64ARB", "glUniform1i64vARB", "glProgramUniform1i64ARB", "glProgramUniform1i64vARB", "glUniform2i64ARB", "glUniform2i64vARB", - "glProgramUniform2i64ARB", "glProgramUniform2i64vARB", "glUniform3i64ARB", "glUniform3i64vARB", "glProgramUniform3i64ARB", - "glProgramUniform3i64vARB", "glUniform4i64ARB", "glUniform4i64vARB", "glProgramUniform4i64ARB", "glProgramUniform4i64vARB", "glUniform1ui64ARB", - "glUniform1ui64vARB", "glProgramUniform1ui64ARB", "glProgramUniform1ui64vARB", "glUniform2ui64ARB", "glUniform2ui64vARB", - "glProgramUniform2ui64ARB", "glProgramUniform2ui64vARB", "glUniform3ui64ARB", "glUniform3ui64vARB", "glProgramUniform3ui64ARB", - "glProgramUniform3ui64vARB", "glUniform4ui64ARB", "glUniform4ui64vARB", "glProgramUniform4ui64ARB", "glProgramUniform4ui64vARB", - "glGetUniformi64vARB", "glGetUniformui64vARB", "glGetnUniformi64vARB", "glGetnUniformui64vARB" + 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, + 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204 + }, + "glUniform1i64ARB", "glUniform1i64vARB", "glProgramUniform1i64ARB", "glProgramUniform1i64vARB", "glUniform2i64ARB", "glUniform2i64vARB", + "glProgramUniform2i64ARB", "glProgramUniform2i64vARB", "glUniform3i64ARB", "glUniform3i64vARB", "glProgramUniform3i64ARB", + "glProgramUniform3i64vARB", "glUniform4i64ARB", "glUniform4i64vARB", "glProgramUniform4i64ARB", "glProgramUniform4i64vARB", "glUniform1ui64ARB", + "glUniform1ui64vARB", "glProgramUniform1ui64ARB", "glProgramUniform1ui64vARB", "glUniform2ui64ARB", "glUniform2ui64vARB", + "glProgramUniform2ui64ARB", "glProgramUniform2ui64vARB", "glUniform3ui64ARB", "glUniform3ui64vARB", "glProgramUniform3ui64ARB", + "glProgramUniform3ui64vARB", "glUniform4ui64ARB", "glUniform4ui64vARB", "glProgramUniform4ui64ARB", "glProgramUniform4ui64vARB", + "glGetUniformi64vARB", "glGetUniformui64vARB", "glGetnUniformi64vARB", "glGetnUniformui64vARB" )) || reportMissing("GL", "GL_ARB_gpu_shader_int64"); } @@ -8495,19 +8441,19 @@ public final class GLCapabilities { } return ((fc || checkFunctions(provider, caps, new int[] { - 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, - 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235 - }, - "glColorTable", "glCopyColorTable", "glColorTableParameteriv", "glColorTableParameterfv", "glGetColorTable", "glGetColorTableParameteriv", - "glGetColorTableParameterfv", "glColorSubTable", "glCopyColorSubTable", "glConvolutionFilter1D", "glConvolutionFilter2D", - "glCopyConvolutionFilter1D", "glCopyConvolutionFilter2D", "glGetConvolutionFilter", "glSeparableFilter2D", "glGetSeparableFilter", - "glConvolutionParameteri", "glConvolutionParameteriv", "glConvolutionParameterf", "glConvolutionParameterfv", "glGetConvolutionParameteriv", - "glGetConvolutionParameterfv", "glHistogram", "glResetHistogram", "glGetHistogram", "glGetHistogramParameteriv", "glGetHistogramParameterfv", - "glMinmax", "glResetMinmax", "glGetMinmax", "glGetMinmaxParameteriv", "glGetMinmaxParameterfv" - )) && checkFunctions(provider, caps, new int[] { - 386, 387 - }, - "glBlendColor", "glBlendEquation" + 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, + 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236 + }, + "glColorTable", "glCopyColorTable", "glColorTableParameteriv", "glColorTableParameterfv", "glGetColorTable", "glGetColorTableParameteriv", + "glGetColorTableParameterfv", "glColorSubTable", "glCopyColorSubTable", "glConvolutionFilter1D", "glConvolutionFilter2D", + "glCopyConvolutionFilter1D", "glCopyConvolutionFilter2D", "glGetConvolutionFilter", "glSeparableFilter2D", "glGetSeparableFilter", + "glConvolutionParameteri", "glConvolutionParameteriv", "glConvolutionParameterf", "glConvolutionParameterfv", "glGetConvolutionParameteriv", + "glGetConvolutionParameterfv", "glHistogram", "glResetHistogram", "glGetHistogram", "glGetHistogramParameteriv", "glGetHistogramParameterfv", + "glMinmax", "glResetMinmax", "glGetMinmax", "glGetMinmaxParameteriv", "glGetMinmaxParameterfv" + )) & checkFunctions(provider, caps, new int[] { + 386, 387 + }, + "glBlendColor", "glBlendEquation" )) || reportMissing("GL", "GL_ARB_imaging"); } @@ -8517,9 +8463,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1236, 1237 - }, - "glMultiDrawArraysIndirectCountARB", "glMultiDrawElementsIndirectCountARB" + 1237, 1238 + }, + "glMultiDrawArraysIndirectCountARB", "glMultiDrawElementsIndirectCountARB" )) || reportMissing("GL", "GL_ARB_indirect_parameters"); } @@ -8531,9 +8477,9 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1238 - }, - "glVertexAttribDivisorARB" + 1239 + }, + "glVertexAttribDivisorARB" )) || reportMissing("GL", "GL_ARB_instanced_arrays"); } @@ -8543,9 +8489,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 869 - }, - "glGetInternalformativ" + 869 + }, + "glGetInternalformativ" )) || reportMissing("GL", "GL_ARB_internalformat_query"); } @@ -8555,9 +8501,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 887 - }, - "glGetInternalformati64v" + 887 + }, + "glGetInternalformati64v" )) || reportMissing("GL", "GL_ARB_internalformat_query2"); } @@ -8567,10 +8513,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 888, 889, 890, 891, 892, 893 - }, - "glInvalidateTexSubImage", "glInvalidateTexImage", "glInvalidateBufferSubData", "glInvalidateBufferData", "glInvalidateFramebuffer", - "glInvalidateSubFramebuffer" + 888, 889, 890, 891, 892, 893 + }, + "glInvalidateTexSubImage", "glInvalidateTexImage", "glInvalidateBufferSubData", "glInvalidateBufferData", "glInvalidateFramebuffer", + "glInvalidateSubFramebuffer" )) || reportMissing("GL", "GL_ARB_invalidate_subdata"); } @@ -8580,9 +8526,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 592, 593 - }, - "glMapBufferRange", "glFlushMappedBufferRange" + 592, 593 + }, + "glMapBufferRange", "glFlushMappedBufferRange" )) || reportMissing("GL", "GL_ARB_map_buffer_range"); } @@ -8592,9 +8538,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1240, 1241, 1242, 1243, 1244 - }, - "glCurrentPaletteMatrixARB", "glMatrixIndexuivARB", "glMatrixIndexubvARB", "glMatrixIndexusvARB", "glMatrixIndexPointerARB" + 1241, 1242, 1243, 1244, 1245 + }, + "glCurrentPaletteMatrixARB", "glMatrixIndexuivARB", "glMatrixIndexubvARB", "glMatrixIndexusvARB", "glMatrixIndexPointerARB" )) || reportMissing("GL", "GL_ARB_matrix_palette"); } @@ -8604,9 +8550,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 916, 917, 918, 919, 920, 921 - }, - "glBindBuffersBase", "glBindBuffersRange", "glBindTextures", "glBindSamplers", "glBindImageTextures", "glBindVertexBuffers" + 916, 917, 918, 919, 920, 921 + }, + "glBindBuffersBase", "glBindBuffersRange", "glBindTextures", "glBindSamplers", "glBindImageTextures", "glBindVertexBuffers" )) || reportMissing("GL", "GL_ARB_multi_bind"); } @@ -8616,9 +8562,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 894, 895 - }, - "glMultiDrawArraysIndirect", "glMultiDrawElementsIndirect" + 894, 895 + }, + "glMultiDrawArraysIndirect", "glMultiDrawElementsIndirect" )) || reportMissing("GL", "GL_ARB_multi_draw_indirect"); } @@ -8628,9 +8574,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1245 - }, - "glSampleCoverageARB" + 1246 + }, + "glSampleCoverageARB" )) || reportMissing("GL", "GL_ARB_multisample"); } @@ -8640,15 +8586,15 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, - 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279 - }, - "glActiveTextureARB", "glClientActiveTextureARB", "glMultiTexCoord1fARB", "glMultiTexCoord1sARB", "glMultiTexCoord1iARB", "glMultiTexCoord1dARB", - "glMultiTexCoord1fvARB", "glMultiTexCoord1svARB", "glMultiTexCoord1ivARB", "glMultiTexCoord1dvARB", "glMultiTexCoord2fARB", "glMultiTexCoord2sARB", - "glMultiTexCoord2iARB", "glMultiTexCoord2dARB", "glMultiTexCoord2fvARB", "glMultiTexCoord2svARB", "glMultiTexCoord2ivARB", "glMultiTexCoord2dvARB", - "glMultiTexCoord3fARB", "glMultiTexCoord3sARB", "glMultiTexCoord3iARB", "glMultiTexCoord3dARB", "glMultiTexCoord3fvARB", "glMultiTexCoord3svARB", - "glMultiTexCoord3ivARB", "glMultiTexCoord3dvARB", "glMultiTexCoord4fARB", "glMultiTexCoord4sARB", "glMultiTexCoord4iARB", "glMultiTexCoord4dARB", - "glMultiTexCoord4fvARB", "glMultiTexCoord4svARB", "glMultiTexCoord4ivARB", "glMultiTexCoord4dvARB" + 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, + 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280 + }, + "glActiveTextureARB", "glClientActiveTextureARB", "glMultiTexCoord1fARB", "glMultiTexCoord1sARB", "glMultiTexCoord1iARB", "glMultiTexCoord1dARB", + "glMultiTexCoord1fvARB", "glMultiTexCoord1svARB", "glMultiTexCoord1ivARB", "glMultiTexCoord1dvARB", "glMultiTexCoord2fARB", "glMultiTexCoord2sARB", + "glMultiTexCoord2iARB", "glMultiTexCoord2dARB", "glMultiTexCoord2fvARB", "glMultiTexCoord2svARB", "glMultiTexCoord2ivARB", "glMultiTexCoord2dvARB", + "glMultiTexCoord3fARB", "glMultiTexCoord3sARB", "glMultiTexCoord3iARB", "glMultiTexCoord3dARB", "glMultiTexCoord3fvARB", "glMultiTexCoord3svARB", + "glMultiTexCoord3ivARB", "glMultiTexCoord3dvARB", "glMultiTexCoord4fARB", "glMultiTexCoord4sARB", "glMultiTexCoord4iARB", "glMultiTexCoord4dARB", + "glMultiTexCoord4fvARB", "glMultiTexCoord4svARB", "glMultiTexCoord4ivARB", "glMultiTexCoord4dvARB" )) || reportMissing("GL", "GL_ARB_multitexture"); } @@ -8658,10 +8604,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287 - }, - "glGenQueriesARB", "glDeleteQueriesARB", "glIsQueryARB", "glBeginQueryARB", "glEndQueryARB", "glGetQueryivARB", "glGetQueryObjectivARB", - "glGetQueryObjectuivARB" + 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288 + }, + "glGenQueriesARB", "glDeleteQueriesARB", "glIsQueryARB", "glBeginQueryARB", "glEndQueryARB", "glGetQueryivARB", "glGetQueryObjectivARB", + "glGetQueryObjectuivARB" )) || reportMissing("GL", "GL_ARB_occlusion_query"); } @@ -8671,9 +8617,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1288 - }, - "glMaxShaderCompilerThreadsARB" + 1289 + }, + "glMaxShaderCompilerThreadsARB" )) || reportMissing("GL", "GL_ARB_parallel_shader_compile"); } @@ -8683,9 +8629,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1289, 1290 - }, - "glPointParameterfARB", "glPointParameterfvARB" + 1290, 1291 + }, + "glPointParameterfARB", "glPointParameterfvARB" )) || reportMissing("GL", "GL_ARB_point_parameters"); } @@ -8695,9 +8641,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1046 - }, - "glPolygonOffsetClamp" + 1046 + }, + "glPolygonOffsetClamp" )) || reportMissing("GL", "GL_ARB_polygon_offset_clamp"); } @@ -8707,10 +8653,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 896, 897, 898, 899, 900, 901 - }, - "glGetProgramInterfaceiv", "glGetProgramResourceIndex", "glGetProgramResourceName", "glGetProgramResourceiv", "glGetProgramResourceLocation", - "glGetProgramResourceLocationIndex" + 896, 897, 898, 899, 900, 901 + }, + "glGetProgramInterfaceiv", "glGetProgramResourceIndex", "glGetProgramResourceName", "glGetProgramResourceiv", "glGetProgramResourceLocation", + "glGetProgramResourceLocationIndex" )) || reportMissing("GL", "GL_ARB_program_interface_query"); } @@ -8720,9 +8666,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 652 - }, - "glProvokingVertex" + 652 + }, + "glProvokingVertex" )) || reportMissing("GL", "GL_ARB_provoking_vertex"); } @@ -8738,24 +8684,24 @@ public final class GLCapabilities { int flag4 = provider.getFunctionAddress("glGetPixelMapuiv") != NULL ? 0 : Integer.MIN_VALUE; int flag5 = provider.getFunctionAddress("glGetPixelMapusv") != NULL ? 0 : Integer.MIN_VALUE; int flag6 = provider.getFunctionAddress("glGetPolygonStipple") != NULL ? 0 : Integer.MIN_VALUE; - int flag7 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE; - int flag8 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE; - int flag9 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE; - int flag10 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE; - int flag11 = ext.contains("GL_ARB_imaging") && provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE; + int flag7 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetColorTable") != NULL ? 0 : Integer.MIN_VALUE; + int flag8 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetConvolutionFilter") != NULL ? 0 : Integer.MIN_VALUE; + int flag9 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetSeparableFilter") != NULL ? 0 : Integer.MIN_VALUE; + int flag10 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetHistogram") != NULL ? 0 : Integer.MIN_VALUE; + int flag11 = ext.contains("GL_ARB_imaging") & provider.getFunctionAddress("glGetMinmax") != NULL ? 0 : Integer.MIN_VALUE; int flag12 = ext.contains("OpenGL13") ? 0 : Integer.MIN_VALUE; int flag13 = ext.contains("OpenGL20") ? 0 : Integer.MIN_VALUE; int flag15 = ext.contains("OpenGL30") ? 0 : Integer.MIN_VALUE; int flag16 = ext.contains("OpenGL40") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1291, flag0 + 1292, flag1 + 1293, flag2 + 1294, flag3 + 1295, flag4 + 1296, flag5 + 1297, flag6 + 1298, 1299, 1300, flag7 + 1301, flag8 + 1302, - flag9 + 1303, flag10 + 1304, flag11 + 1305, flag12 + 1306, flag13 + 1307, flag13 + 1308, flag15 + 1309, flag16 + 1310 - }, - "glGetGraphicsResetStatusARB", "glGetnMapdvARB", "glGetnMapfvARB", "glGetnMapivARB", "glGetnPixelMapfvARB", "glGetnPixelMapuivARB", - "glGetnPixelMapusvARB", "glGetnPolygonStippleARB", "glGetnTexImageARB", "glReadnPixelsARB", "glGetnColorTableARB", "glGetnConvolutionFilterARB", - "glGetnSeparableFilterARB", "glGetnHistogramARB", "glGetnMinmaxARB", "glGetnCompressedTexImageARB", "glGetnUniformfvARB", "glGetnUniformivARB", - "glGetnUniformuivARB", "glGetnUniformdvARB" + 1292, flag0 + 1293, flag1 + 1294, flag2 + 1295, flag3 + 1296, flag4 + 1297, flag5 + 1298, flag6 + 1299, 1300, 1301, flag7 + 1302, flag8 + 1303, + flag9 + 1304, flag10 + 1305, flag11 + 1306, flag12 + 1307, flag13 + 1308, flag13 + 1309, flag15 + 1310, flag16 + 1311 + }, + "glGetGraphicsResetStatusARB", "glGetnMapdvARB", "glGetnMapfvARB", "glGetnMapivARB", "glGetnPixelMapfvARB", "glGetnPixelMapuivARB", + "glGetnPixelMapusvARB", "glGetnPolygonStippleARB", "glGetnTexImageARB", "glReadnPixelsARB", "glGetnColorTableARB", "glGetnConvolutionFilterARB", + "glGetnSeparableFilterARB", "glGetnHistogramARB", "glGetnMinmaxARB", "glGetnCompressedTexImageARB", "glGetnUniformfvARB", "glGetnUniformivARB", + "glGetnUniformuivARB", "glGetnUniformdvARB" )) || reportMissing("GL", "GL_ARB_robustness"); } @@ -8765,9 +8711,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1311, 1312, 1313 - }, - "glFramebufferSampleLocationsfvARB", "glNamedFramebufferSampleLocationsfvARB", "glEvaluateDepthValuesARB" + 1312, 1313, 1314 + }, + "glFramebufferSampleLocationsfvARB", "glNamedFramebufferSampleLocationsfvARB", "glEvaluateDepthValuesARB" )) || reportMissing("GL", "GL_ARB_sample_locations"); } @@ -8777,9 +8723,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1314 - }, - "glMinSampleShadingARB" + 1315 + }, + "glMinSampleShadingARB" )) || reportMissing("GL", "GL_ARB_sample_shading"); } @@ -8789,11 +8735,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681 - }, - "glGenSamplers", "glDeleteSamplers", "glIsSampler", "glBindSampler", "glSamplerParameteri", "glSamplerParameterf", "glSamplerParameteriv", - "glSamplerParameterfv", "glSamplerParameterIiv", "glSamplerParameterIuiv", "glGetSamplerParameteriv", "glGetSamplerParameterfv", - "glGetSamplerParameterIiv", "glGetSamplerParameterIuiv" + 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681 + }, + "glGenSamplers", "glDeleteSamplers", "glIsSampler", "glBindSampler", "glSamplerParameteri", "glSamplerParameterf", "glSamplerParameteriv", + "glSamplerParameterfv", "glSamplerParameterIiv", "glSamplerParameterIuiv", "glGetSamplerParameteriv", "glGetSamplerParameterfv", + "glGetSamplerParameterIiv", "glGetSamplerParameterIuiv" )) || reportMissing("GL", "GL_ARB_sampler_objects"); } @@ -8803,22 +8749,22 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 778, 779, 780, 781, 782, 783, 784, 777, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, - 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, - 835, 836, 837 - }, - "glUseProgramStages", "glActiveShaderProgram", "glCreateShaderProgramv", "glBindProgramPipeline", "glDeleteProgramPipelines", - "glGenProgramPipelines", "glIsProgramPipeline", "glProgramParameteri", "glGetProgramPipelineiv", "glProgramUniform1i", "glProgramUniform2i", - "glProgramUniform3i", "glProgramUniform4i", "glProgramUniform1ui", "glProgramUniform2ui", "glProgramUniform3ui", "glProgramUniform4ui", - "glProgramUniform1f", "glProgramUniform2f", "glProgramUniform3f", "glProgramUniform4f", "glProgramUniform1d", "glProgramUniform2d", - "glProgramUniform3d", "glProgramUniform4d", "glProgramUniform1iv", "glProgramUniform2iv", "glProgramUniform3iv", "glProgramUniform4iv", - "glProgramUniform1uiv", "glProgramUniform2uiv", "glProgramUniform3uiv", "glProgramUniform4uiv", "glProgramUniform1fv", "glProgramUniform2fv", - "glProgramUniform3fv", "glProgramUniform4fv", "glProgramUniform1dv", "glProgramUniform2dv", "glProgramUniform3dv", "glProgramUniform4dv", - "glProgramUniformMatrix2fv", "glProgramUniformMatrix3fv", "glProgramUniformMatrix4fv", "glProgramUniformMatrix2dv", "glProgramUniformMatrix3dv", - "glProgramUniformMatrix4dv", "glProgramUniformMatrix2x3fv", "glProgramUniformMatrix3x2fv", "glProgramUniformMatrix2x4fv", - "glProgramUniformMatrix4x2fv", "glProgramUniformMatrix3x4fv", "glProgramUniformMatrix4x3fv", "glProgramUniformMatrix2x3dv", - "glProgramUniformMatrix3x2dv", "glProgramUniformMatrix2x4dv", "glProgramUniformMatrix4x2dv", "glProgramUniformMatrix3x4dv", - "glProgramUniformMatrix4x3dv", "glValidateProgramPipeline", "glGetProgramPipelineInfoLog" + 778, 779, 780, 781, 782, 783, 784, 777, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, + 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, + 835, 836, 837 + }, + "glUseProgramStages", "glActiveShaderProgram", "glCreateShaderProgramv", "glBindProgramPipeline", "glDeleteProgramPipelines", + "glGenProgramPipelines", "glIsProgramPipeline", "glProgramParameteri", "glGetProgramPipelineiv", "glProgramUniform1i", "glProgramUniform2i", + "glProgramUniform3i", "glProgramUniform4i", "glProgramUniform1ui", "glProgramUniform2ui", "glProgramUniform3ui", "glProgramUniform4ui", + "glProgramUniform1f", "glProgramUniform2f", "glProgramUniform3f", "glProgramUniform4f", "glProgramUniform1d", "glProgramUniform2d", + "glProgramUniform3d", "glProgramUniform4d", "glProgramUniform1iv", "glProgramUniform2iv", "glProgramUniform3iv", "glProgramUniform4iv", + "glProgramUniform1uiv", "glProgramUniform2uiv", "glProgramUniform3uiv", "glProgramUniform4uiv", "glProgramUniform1fv", "glProgramUniform2fv", + "glProgramUniform3fv", "glProgramUniform4fv", "glProgramUniform1dv", "glProgramUniform2dv", "glProgramUniform3dv", "glProgramUniform4dv", + "glProgramUniformMatrix2fv", "glProgramUniformMatrix3fv", "glProgramUniformMatrix4fv", "glProgramUniformMatrix2dv", "glProgramUniformMatrix3dv", + "glProgramUniformMatrix4dv", "glProgramUniformMatrix2x3fv", "glProgramUniformMatrix3x2fv", "glProgramUniformMatrix2x4fv", + "glProgramUniformMatrix4x2fv", "glProgramUniformMatrix3x4fv", "glProgramUniformMatrix4x3fv", "glProgramUniformMatrix2x3dv", + "glProgramUniformMatrix3x2dv", "glProgramUniformMatrix2x4dv", "glProgramUniformMatrix4x2dv", "glProgramUniformMatrix3x4dv", + "glProgramUniformMatrix4x3dv", "glValidateProgramPipeline", "glGetProgramPipelineInfoLog" )) || reportMissing("GL", "GL_ARB_separate_shader_objects"); } @@ -8828,9 +8774,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 858 - }, - "glGetActiveAtomicCounterBufferiv" + 858 + }, + "glGetActiveAtomicCounterBufferiv" )) || reportMissing("GL", "GL_ARB_shader_atomic_counters"); } @@ -8840,9 +8786,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 867, 868 - }, - "glBindImageTexture", "glMemoryBarrier" + 867, 868 + }, + "glBindImageTexture", "glMemoryBarrier" )) || reportMissing("GL", "GL_ARB_shader_image_load_store"); } @@ -8852,16 +8798,16 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, - 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353 - }, - "glDeleteObjectARB", "glGetHandleARB", "glDetachObjectARB", "glCreateShaderObjectARB", "glShaderSourceARB", "glCompileShaderARB", - "glCreateProgramObjectARB", "glAttachObjectARB", "glLinkProgramARB", "glUseProgramObjectARB", "glValidateProgramARB", "glUniform1fARB", - "glUniform2fARB", "glUniform3fARB", "glUniform4fARB", "glUniform1iARB", "glUniform2iARB", "glUniform3iARB", "glUniform4iARB", "glUniform1fvARB", - "glUniform2fvARB", "glUniform3fvARB", "glUniform4fvARB", "glUniform1ivARB", "glUniform2ivARB", "glUniform3ivARB", "glUniform4ivARB", - "glUniformMatrix2fvARB", "glUniformMatrix3fvARB", "glUniformMatrix4fvARB", "glGetObjectParameterfvARB", "glGetObjectParameterivARB", - "glGetInfoLogARB", "glGetAttachedObjectsARB", "glGetUniformLocationARB", "glGetActiveUniformARB", "glGetUniformfvARB", "glGetUniformivARB", - "glGetShaderSourceARB" + 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, + 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354 + }, + "glDeleteObjectARB", "glGetHandleARB", "glDetachObjectARB", "glCreateShaderObjectARB", "glShaderSourceARB", "glCompileShaderARB", + "glCreateProgramObjectARB", "glAttachObjectARB", "glLinkProgramARB", "glUseProgramObjectARB", "glValidateProgramARB", "glUniform1fARB", + "glUniform2fARB", "glUniform3fARB", "glUniform4fARB", "glUniform1iARB", "glUniform2iARB", "glUniform3iARB", "glUniform4iARB", "glUniform1fvARB", + "glUniform2fvARB", "glUniform3fvARB", "glUniform4fvARB", "glUniform1ivARB", "glUniform2ivARB", "glUniform3ivARB", "glUniform4ivARB", + "glUniformMatrix2fvARB", "glUniformMatrix3fvARB", "glUniformMatrix4fvARB", "glGetObjectParameterfvARB", "glGetObjectParameterivARB", + "glGetInfoLogARB", "glGetAttachedObjectsARB", "glGetUniformLocationARB", "glGetActiveUniformARB", "glGetUniformfvARB", "glGetUniformivARB", + "glGetShaderSourceARB" )) || reportMissing("GL", "GL_ARB_shader_objects"); } @@ -8871,9 +8817,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 902 - }, - "glShaderStorageBlockBinding" + 902 + }, + "glShaderStorageBlockBinding" )) || reportMissing("GL", "GL_ARB_shader_storage_buffer_object"); } @@ -8883,10 +8829,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 749, 750, 751, 752, 753, 754, 755, 756 - }, - "glGetSubroutineUniformLocation", "glGetSubroutineIndex", "glGetActiveSubroutineUniformiv", "glGetActiveSubroutineUniformName", - "glGetActiveSubroutineName", "glUniformSubroutinesuiv", "glGetUniformSubroutineuiv", "glGetProgramStageiv" + 749, 750, 751, 752, 753, 754, 755, 756 + }, + "glGetSubroutineUniformLocation", "glGetSubroutineIndex", "glGetActiveSubroutineUniformiv", "glGetActiveSubroutineUniformName", + "glGetActiveSubroutineName", "glUniformSubroutinesuiv", "glGetUniformSubroutineuiv", "glGetProgramStageiv" )) || reportMissing("GL", "GL_ARB_shader_subroutine"); } @@ -8896,9 +8842,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1354, 1355, 1356, 1357, 1358, 1359 - }, - "glNamedStringARB", "glDeleteNamedStringARB", "glCompileShaderIncludeARB", "glIsNamedStringARB", "glGetNamedStringARB", "glGetNamedStringivARB" + 1355, 1356, 1357, 1358, 1359, 1360 + }, + "glNamedStringARB", "glDeleteNamedStringARB", "glCompileShaderIncludeARB", "glIsNamedStringARB", "glGetNamedStringARB", "glGetNamedStringivARB" )) || reportMissing("GL", "GL_ARB_shading_language_include"); } @@ -8911,9 +8857,9 @@ public final class GLCapabilities { int flag1 = ext.contains("GL_ARB_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1360 - }, - "glBufferPageCommitmentARB" + 1361 + }, + "glBufferPageCommitmentARB" )) || reportMissing("GL", "GL_ARB_sparse_buffer"); } @@ -8925,9 +8871,9 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1363, flag0 + 1364 - }, - "glTexPageCommitmentARB", "glTexturePageCommitmentEXT" + 1364, flag0 + 1365 + }, + "glTexPageCommitmentARB", "glTexturePageCommitmentEXT" )) || reportMissing("GL", "GL_ARB_sparse_texture"); } @@ -8937,9 +8883,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 658, 659, 660, 661, 662, 663, 665 - }, - "glFenceSync", "glIsSync", "glDeleteSync", "glClientWaitSync", "glWaitSync", "glGetInteger64v", "glGetSynciv" + 658, 659, 660, 661, 662, 663, 665 + }, + "glFenceSync", "glIsSync", "glDeleteSync", "glClientWaitSync", "glWaitSync", "glGetInteger64v", "glGetSynciv" )) || reportMissing("GL", "GL_ARB_sync"); } @@ -8949,9 +8895,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 757, 758 - }, - "glPatchParameteri", "glPatchParameterfv" + 757, 758 + }, + "glPatchParameteri", "glPatchParameterfv" )) || reportMissing("GL", "GL_ARB_tessellation_shader"); } @@ -8961,9 +8907,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1023 - }, - "glTextureBarrier" + 1023 + }, + "glTextureBarrier" )) || reportMissing("GL", "GL_ARB_texture_barrier"); } @@ -8973,9 +8919,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1365 - }, - "glTexBufferARB" + 1366 + }, + "glTexBufferARB" )) || reportMissing("GL", "GL_ARB_texture_buffer_object"); } @@ -8987,9 +8933,9 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 903, flag0 + 1366 - }, - "glTexBufferRange", "glTextureBufferRangeEXT" + 903, flag0 + 1367 + }, + "glTexBufferRange", "glTextureBufferRangeEXT" )) || reportMissing("GL", "GL_ARB_texture_buffer_range"); } @@ -8999,10 +8945,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1367, 1368, 1369, 1370, 1371, 1372, 1373 - }, - "glCompressedTexImage3DARB", "glCompressedTexImage2DARB", "glCompressedTexImage1DARB", "glCompressedTexSubImage3DARB", - "glCompressedTexSubImage2DARB", "glCompressedTexSubImage1DARB", "glGetCompressedTexImageARB" + 1368, 1369, 1370, 1371, 1372, 1373, 1374 + }, + "glCompressedTexImage3DARB", "glCompressedTexImage2DARB", "glCompressedTexImage1DARB", "glCompressedTexSubImage3DARB", + "glCompressedTexSubImage2DARB", "glCompressedTexSubImage1DARB", "glGetCompressedTexImageARB" )) || reportMissing("GL", "GL_ARB_texture_compression"); } @@ -9012,9 +8958,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 653, 654, 655, 656 - }, - "glTexImage2DMultisample", "glTexImage3DMultisample", "glGetMultisamplefv", "glSampleMaski" + 653, 654, 655, 656 + }, + "glTexImage2DMultisample", "glTexImage3DMultisample", "glGetMultisamplefv", "glSampleMaski" )) || reportMissing("GL", "GL_ARB_texture_multisample"); } @@ -9026,9 +8972,9 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 859, 860, 861, flag0 + 1374, flag0 + 1375, flag0 + 1376 - }, - "glTexStorage1D", "glTexStorage2D", "glTexStorage3D", "glTextureStorage1DEXT", "glTextureStorage2DEXT", "glTextureStorage3DEXT" + 859, 860, 861, flag0 + 1375, flag0 + 1376, flag0 + 1377 + }, + "glTexStorage1D", "glTexStorage2D", "glTexStorage3D", "glTextureStorage1DEXT", "glTextureStorage2DEXT", "glTextureStorage3DEXT" )) || reportMissing("GL", "GL_ARB_texture_storage"); } @@ -9040,9 +8986,9 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 904, 905, flag0 + 1377, flag0 + 1378 - }, - "glTexStorage2DMultisample", "glTexStorage3DMultisample", "glTextureStorage2DMultisampleEXT", "glTextureStorage3DMultisampleEXT" + 904, 905, flag0 + 1378, flag0 + 1379 + }, + "glTexStorage2DMultisample", "glTexStorage3DMultisample", "glTextureStorage2DMultisampleEXT", "glTextureStorage3DMultisampleEXT" )) || reportMissing("GL", "GL_ARB_texture_storage_multisample"); } @@ -9052,9 +8998,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 906 - }, - "glTextureView" + 906 + }, + "glTextureView" )) || reportMissing("GL", "GL_ARB_texture_view"); } @@ -9064,9 +9010,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 682, 683, 684 - }, - "glQueryCounter", "glGetQueryObjecti64v", "glGetQueryObjectui64v" + 682, 683, 684 + }, + "glQueryCounter", "glGetQueryObjecti64v", "glGetQueryObjectui64v" )) || reportMissing("GL", "GL_ARB_timer_query"); } @@ -9076,10 +9022,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 759, 760, 761, 762, 763, 764, 765 - }, - "glBindTransformFeedback", "glDeleteTransformFeedbacks", "glGenTransformFeedbacks", "glIsTransformFeedback", "glPauseTransformFeedback", - "glResumeTransformFeedback", "glDrawTransformFeedback" + 759, 760, 761, 762, 763, 764, 765 + }, + "glBindTransformFeedback", "glDeleteTransformFeedbacks", "glGenTransformFeedbacks", "glIsTransformFeedback", "glPauseTransformFeedback", + "glResumeTransformFeedback", "glDrawTransformFeedback" )) || reportMissing("GL", "GL_ARB_transform_feedback2"); } @@ -9089,9 +9035,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 766, 767, 768, 769 - }, - "glDrawTransformFeedbackStream", "glBeginQueryIndexed", "glEndQueryIndexed", "glGetQueryIndexediv" + 766, 767, 768, 769 + }, + "glDrawTransformFeedbackStream", "glBeginQueryIndexed", "glEndQueryIndexed", "glGetQueryIndexediv" )) || reportMissing("GL", "GL_ARB_transform_feedback3"); } @@ -9101,9 +9047,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 862, 863 - }, - "glDrawTransformFeedbackInstanced", "glDrawTransformFeedbackStreamInstanced" + 862, 863 + }, + "glDrawTransformFeedbackInstanced", "glDrawTransformFeedbackStreamInstanced" )) || reportMissing("GL", "GL_ARB_transform_feedback_instanced"); } @@ -9113,9 +9059,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1379, 1380, 1381, 1382 - }, - "glLoadTransposeMatrixfARB", "glLoadTransposeMatrixdARB", "glMultTransposeMatrixfARB", "glMultTransposeMatrixdARB" + 1380, 1381, 1382, 1383 + }, + "glLoadTransposeMatrixfARB", "glLoadTransposeMatrixdARB", "glMultTransposeMatrixfARB", "glMultTransposeMatrixdARB" )) || reportMissing("GL", "GL_ARB_transpose_matrix"); } @@ -9125,10 +9071,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 640, 641, 642, 643, 644, 645, 625, 626, 621, 646 - }, - "glGetUniformIndices", "glGetActiveUniformsiv", "glGetActiveUniformName", "glGetUniformBlockIndex", "glGetActiveUniformBlockiv", - "glGetActiveUniformBlockName", "glBindBufferRange", "glBindBufferBase", "glGetIntegeri_v", "glUniformBlockBinding" + 640, 641, 642, 643, 644, 645, 625, 626, 621, 646 + }, + "glGetUniformIndices", "glGetActiveUniformsiv", "glGetActiveUniformName", "glGetUniformBlockIndex", "glGetActiveUniformBlockiv", + "glGetActiveUniformBlockName", "glBindBufferRange", "glBindBufferBase", "glGetIntegeri_v", "glUniformBlockBinding" )) || reportMissing("GL", "GL_ARB_uniform_buffer_object"); } @@ -9138,9 +9084,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 631, 632, 633, 634 - }, - "glBindVertexArray", "glDeleteVertexArrays", "glGenVertexArrays", "glIsVertexArray" + 631, 632, 633, 634 + }, + "glBindVertexArray", "glDeleteVertexArrays", "glGenVertexArrays", "glIsVertexArray" )) || reportMissing("GL", "GL_ARB_vertex_array_object"); } @@ -9152,10 +9098,10 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, flag0 + 1383 - }, - "glVertexAttribL1d", "glVertexAttribL2d", "glVertexAttribL3d", "glVertexAttribL4d", "glVertexAttribL1dv", "glVertexAttribL2dv", - "glVertexAttribL3dv", "glVertexAttribL4dv", "glVertexAttribLPointer", "glGetVertexAttribLdv", "glVertexArrayVertexAttribLOffsetEXT" + 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, flag0 + 1384 + }, + "glVertexAttribL1d", "glVertexAttribL2d", "glVertexAttribL3d", "glVertexAttribL4d", "glVertexAttribL1dv", "glVertexAttribL2dv", + "glVertexAttribL3dv", "glVertexAttribL4dv", "glVertexAttribLPointer", "glGetVertexAttribLdv", "glVertexArrayVertexAttribLOffsetEXT" )) || reportMissing("GL", "GL_ARB_vertex_attrib_64bit"); } @@ -9167,11 +9113,11 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 907, 908, 909, 910, 911, 912, flag0 + 1384, flag0 + 1385, flag0 + 1386, flag0 + 1387, flag0 + 1388, flag0 + 1389 - }, - "glBindVertexBuffer", "glVertexAttribFormat", "glVertexAttribIFormat", "glVertexAttribLFormat", "glVertexAttribBinding", "glVertexBindingDivisor", - "glVertexArrayBindVertexBufferEXT", "glVertexArrayVertexAttribFormatEXT", "glVertexArrayVertexAttribIFormatEXT", - "glVertexArrayVertexAttribLFormatEXT", "glVertexArrayVertexAttribBindingEXT", "glVertexArrayVertexBindingDivisorEXT" + 907, 908, 909, 910, 911, 912, flag0 + 1385, flag0 + 1386, flag0 + 1387, flag0 + 1388, flag0 + 1389, flag0 + 1390 + }, + "glBindVertexBuffer", "glVertexAttribFormat", "glVertexAttribIFormat", "glVertexAttribLFormat", "glVertexAttribBinding", "glVertexBindingDivisor", + "glVertexArrayBindVertexBufferEXT", "glVertexArrayVertexAttribFormatEXT", "glVertexArrayVertexAttribIFormatEXT", + "glVertexArrayVertexAttribLFormatEXT", "glVertexArrayVertexAttribBindingEXT", "glVertexArrayVertexBindingDivisorEXT" )) || reportMissing("GL", "GL_ARB_vertex_attrib_binding"); } @@ -9181,10 +9127,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399 - }, - "glWeightfvARB", "glWeightbvARB", "glWeightubvARB", "glWeightsvARB", "glWeightusvARB", "glWeightivARB", "glWeightuivARB", "glWeightdvARB", - "glWeightPointerARB", "glVertexBlendARB" + 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400 + }, + "glWeightfvARB", "glWeightbvARB", "glWeightubvARB", "glWeightsvARB", "glWeightusvARB", "glWeightivARB", "glWeightuivARB", "glWeightdvARB", + "glWeightPointerARB", "glVertexBlendARB" )) || reportMissing("GL", "GL_ARB_vertex_blend"); } @@ -9194,10 +9140,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410 - }, - "glBindBufferARB", "glDeleteBuffersARB", "glGenBuffersARB", "glIsBufferARB", "glBufferDataARB", "glBufferSubDataARB", "glGetBufferSubDataARB", - "glMapBufferARB", "glUnmapBufferARB", "glGetBufferParameterivARB", "glGetBufferPointervARB" + 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411 + }, + "glBindBufferARB", "glDeleteBuffersARB", "glGenBuffersARB", "glIsBufferARB", "glBufferDataARB", "glBufferSubDataARB", "glGetBufferSubDataARB", + "glMapBufferARB", "glUnmapBufferARB", "glGetBufferParameterivARB", "glGetBufferPointervARB" )) || reportMissing("GL", "GL_ARB_vertex_buffer_object"); } @@ -9207,22 +9153,22 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, - 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, - 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472 - }, - "glVertexAttrib1sARB", "glVertexAttrib1fARB", "glVertexAttrib1dARB", "glVertexAttrib2sARB", "glVertexAttrib2fARB", "glVertexAttrib2dARB", - "glVertexAttrib3sARB", "glVertexAttrib3fARB", "glVertexAttrib3dARB", "glVertexAttrib4sARB", "glVertexAttrib4fARB", "glVertexAttrib4dARB", - "glVertexAttrib4NubARB", "glVertexAttrib1svARB", "glVertexAttrib1fvARB", "glVertexAttrib1dvARB", "glVertexAttrib2svARB", "glVertexAttrib2fvARB", - "glVertexAttrib2dvARB", "glVertexAttrib3svARB", "glVertexAttrib3fvARB", "glVertexAttrib3dvARB", "glVertexAttrib4fvARB", "glVertexAttrib4bvARB", - "glVertexAttrib4svARB", "glVertexAttrib4ivARB", "glVertexAttrib4ubvARB", "glVertexAttrib4usvARB", "glVertexAttrib4uivARB", "glVertexAttrib4dvARB", - "glVertexAttrib4NbvARB", "glVertexAttrib4NsvARB", "glVertexAttrib4NivARB", "glVertexAttrib4NubvARB", "glVertexAttrib4NusvARB", - "glVertexAttrib4NuivARB", "glVertexAttribPointerARB", "glEnableVertexAttribArrayARB", "glDisableVertexAttribArrayARB", "glProgramStringARB", - "glBindProgramARB", "glDeleteProgramsARB", "glGenProgramsARB", "glProgramEnvParameter4dARB", "glProgramEnvParameter4dvARB", - "glProgramEnvParameter4fARB", "glProgramEnvParameter4fvARB", "glProgramLocalParameter4dARB", "glProgramLocalParameter4dvARB", - "glProgramLocalParameter4fARB", "glProgramLocalParameter4fvARB", "glGetProgramEnvParameterfvARB", "glGetProgramEnvParameterdvARB", - "glGetProgramLocalParameterfvARB", "glGetProgramLocalParameterdvARB", "glGetProgramivARB", "glGetProgramStringARB", "glGetVertexAttribfvARB", - "glGetVertexAttribdvARB", "glGetVertexAttribivARB", "glGetVertexAttribPointervARB", "glIsProgramARB" + 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, + 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, + 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473 + }, + "glVertexAttrib1sARB", "glVertexAttrib1fARB", "glVertexAttrib1dARB", "glVertexAttrib2sARB", "glVertexAttrib2fARB", "glVertexAttrib2dARB", + "glVertexAttrib3sARB", "glVertexAttrib3fARB", "glVertexAttrib3dARB", "glVertexAttrib4sARB", "glVertexAttrib4fARB", "glVertexAttrib4dARB", + "glVertexAttrib4NubARB", "glVertexAttrib1svARB", "glVertexAttrib1fvARB", "glVertexAttrib1dvARB", "glVertexAttrib2svARB", "glVertexAttrib2fvARB", + "glVertexAttrib2dvARB", "glVertexAttrib3svARB", "glVertexAttrib3fvARB", "glVertexAttrib3dvARB", "glVertexAttrib4fvARB", "glVertexAttrib4bvARB", + "glVertexAttrib4svARB", "glVertexAttrib4ivARB", "glVertexAttrib4ubvARB", "glVertexAttrib4usvARB", "glVertexAttrib4uivARB", "glVertexAttrib4dvARB", + "glVertexAttrib4NbvARB", "glVertexAttrib4NsvARB", "glVertexAttrib4NivARB", "glVertexAttrib4NubvARB", "glVertexAttrib4NusvARB", + "glVertexAttrib4NuivARB", "glVertexAttribPointerARB", "glEnableVertexAttribArrayARB", "glDisableVertexAttribArrayARB", "glProgramStringARB", + "glBindProgramARB", "glDeleteProgramsARB", "glGenProgramsARB", "glProgramEnvParameter4dARB", "glProgramEnvParameter4dvARB", + "glProgramEnvParameter4fARB", "glProgramEnvParameter4fvARB", "glProgramLocalParameter4dARB", "glProgramLocalParameter4dvARB", + "glProgramLocalParameter4fARB", "glProgramLocalParameter4fvARB", "glGetProgramEnvParameterfvARB", "glGetProgramEnvParameterdvARB", + "glGetProgramLocalParameterfvARB", "glGetProgramLocalParameterdvARB", "glGetProgramivARB", "glGetProgramStringARB", "glGetVertexAttribfvARB", + "glGetVertexAttribdvARB", "glGetVertexAttribivARB", "glGetVertexAttribPointervARB", "glIsProgramARB" )) || reportMissing("GL", "GL_ARB_vertex_program"); } @@ -9232,18 +9178,18 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1412, 1411, 1413, 1415, 1414, 1416, 1418, 1417, 1419, 1421, 1420, 1422, 1423, 1425, 1424, 1426, 1428, 1427, 1429, 1431, 1430, 1432, 1433, 1435, - 1440, 1436, 1434, 1437, 1438, 1439, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1473, 1474, 1475, 1470, 1468, 1469, 1471 - }, - "glVertexAttrib1fARB", "glVertexAttrib1sARB", "glVertexAttrib1dARB", "glVertexAttrib2fARB", "glVertexAttrib2sARB", "glVertexAttrib2dARB", - "glVertexAttrib3fARB", "glVertexAttrib3sARB", "glVertexAttrib3dARB", "glVertexAttrib4fARB", "glVertexAttrib4sARB", "glVertexAttrib4dARB", - "glVertexAttrib4NubARB", "glVertexAttrib1fvARB", "glVertexAttrib1svARB", "glVertexAttrib1dvARB", "glVertexAttrib2fvARB", "glVertexAttrib2svARB", - "glVertexAttrib2dvARB", "glVertexAttrib3fvARB", "glVertexAttrib3svARB", "glVertexAttrib3dvARB", "glVertexAttrib4fvARB", "glVertexAttrib4svARB", - "glVertexAttrib4dvARB", "glVertexAttrib4ivARB", "glVertexAttrib4bvARB", "glVertexAttrib4ubvARB", "glVertexAttrib4usvARB", "glVertexAttrib4uivARB", - "glVertexAttrib4NbvARB", "glVertexAttrib4NsvARB", "glVertexAttrib4NivARB", "glVertexAttrib4NubvARB", "glVertexAttrib4NusvARB", - "glVertexAttrib4NuivARB", "glVertexAttribPointerARB", "glEnableVertexAttribArrayARB", "glDisableVertexAttribArrayARB", "glBindAttribLocationARB", - "glGetActiveAttribARB", "glGetAttribLocationARB", "glGetVertexAttribivARB", "glGetVertexAttribfvARB", "glGetVertexAttribdvARB", - "glGetVertexAttribPointervARB" + 1413, 1412, 1414, 1416, 1415, 1417, 1419, 1418, 1420, 1422, 1421, 1423, 1424, 1426, 1425, 1427, 1429, 1428, 1430, 1432, 1431, 1433, 1434, 1436, + 1441, 1437, 1435, 1438, 1439, 1440, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1474, 1475, 1476, 1471, 1469, 1470, 1472 + }, + "glVertexAttrib1fARB", "glVertexAttrib1sARB", "glVertexAttrib1dARB", "glVertexAttrib2fARB", "glVertexAttrib2sARB", "glVertexAttrib2dARB", + "glVertexAttrib3fARB", "glVertexAttrib3sARB", "glVertexAttrib3dARB", "glVertexAttrib4fARB", "glVertexAttrib4sARB", "glVertexAttrib4dARB", + "glVertexAttrib4NubARB", "glVertexAttrib1fvARB", "glVertexAttrib1svARB", "glVertexAttrib1dvARB", "glVertexAttrib2fvARB", "glVertexAttrib2svARB", + "glVertexAttrib2dvARB", "glVertexAttrib3fvARB", "glVertexAttrib3svARB", "glVertexAttrib3dvARB", "glVertexAttrib4fvARB", "glVertexAttrib4svARB", + "glVertexAttrib4dvARB", "glVertexAttrib4ivARB", "glVertexAttrib4bvARB", "glVertexAttrib4ubvARB", "glVertexAttrib4usvARB", "glVertexAttrib4uivARB", + "glVertexAttrib4NbvARB", "glVertexAttrib4NsvARB", "glVertexAttrib4NivARB", "glVertexAttrib4NubvARB", "glVertexAttrib4NusvARB", + "glVertexAttrib4NuivARB", "glVertexAttribPointerARB", "glEnableVertexAttribArrayARB", "glDisableVertexAttribArrayARB", "glBindAttribLocationARB", + "glGetActiveAttribARB", "glGetAttribLocationARB", "glGetVertexAttribivARB", "glGetVertexAttribfvARB", "glGetVertexAttribdvARB", + "glGetVertexAttribPointervARB" )) || reportMissing("GL", "GL_ARB_vertex_shader"); } @@ -9253,19 +9199,19 @@ public final class GLCapabilities { } return ((fc || checkFunctions(provider, caps, new int[] { - 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, - 715 - }, - "glVertexP2ui", "glVertexP3ui", "glVertexP4ui", "glVertexP2uiv", "glVertexP3uiv", "glVertexP4uiv", "glTexCoordP1ui", "glTexCoordP2ui", - "glTexCoordP3ui", "glTexCoordP4ui", "glTexCoordP1uiv", "glTexCoordP2uiv", "glTexCoordP3uiv", "glTexCoordP4uiv", "glMultiTexCoordP1ui", - "glMultiTexCoordP2ui", "glMultiTexCoordP3ui", "glMultiTexCoordP4ui", "glMultiTexCoordP1uiv", "glMultiTexCoordP2uiv", "glMultiTexCoordP3uiv", - "glMultiTexCoordP4uiv", "glNormalP3ui", "glNormalP3uiv", "glColorP3ui", "glColorP4ui", "glColorP3uiv", "glColorP4uiv", "glSecondaryColorP3ui", - "glSecondaryColorP3uiv" - )) && checkFunctions(provider, caps, new int[] { - 716, 717, 718, 719, 720, 721, 722, 723 - }, - "glVertexAttribP1ui", "glVertexAttribP2ui", "glVertexAttribP3ui", "glVertexAttribP4ui", "glVertexAttribP1uiv", "glVertexAttribP2uiv", - "glVertexAttribP3uiv", "glVertexAttribP4uiv" + 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, + 715 + }, + "glVertexP2ui", "glVertexP3ui", "glVertexP4ui", "glVertexP2uiv", "glVertexP3uiv", "glVertexP4uiv", "glTexCoordP1ui", "glTexCoordP2ui", + "glTexCoordP3ui", "glTexCoordP4ui", "glTexCoordP1uiv", "glTexCoordP2uiv", "glTexCoordP3uiv", "glTexCoordP4uiv", "glMultiTexCoordP1ui", + "glMultiTexCoordP2ui", "glMultiTexCoordP3ui", "glMultiTexCoordP4ui", "glMultiTexCoordP1uiv", "glMultiTexCoordP2uiv", "glMultiTexCoordP3uiv", + "glMultiTexCoordP4uiv", "glNormalP3ui", "glNormalP3uiv", "glColorP3ui", "glColorP4ui", "glColorP3uiv", "glColorP4uiv", "glSecondaryColorP3ui", + "glSecondaryColorP3uiv" + )) & checkFunctions(provider, caps, new int[] { + 716, 717, 718, 719, 720, 721, 722, 723 + }, + "glVertexAttribP1ui", "glVertexAttribP2ui", "glVertexAttribP3ui", "glVertexAttribP4ui", "glVertexAttribP1uiv", "glVertexAttribP2uiv", + "glVertexAttribP3uiv", "glVertexAttribP4uiv" )) || reportMissing("GL", "GL_ARB_vertex_type_2_10_10_10_rev"); } @@ -9275,10 +9221,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 848, 849, 850, 851, 852, 853, 854, 855, 856, 857 - }, - "glViewportArrayv", "glViewportIndexedf", "glViewportIndexedfv", "glScissorArrayv", "glScissorIndexed", "glScissorIndexedv", "glDepthRangeArrayv", - "glDepthRangeIndexed", "glGetFloati_v", "glGetDoublei_v" + 848, 849, 850, 851, 852, 853, 854, 855, 856, 857 + }, + "glViewportArrayv", "glViewportIndexedf", "glViewportIndexedfv", "glScissorArrayv", "glScissorIndexed", "glScissorIndexedv", "glDepthRangeArrayv", + "glDepthRangeIndexed", "glGetFloati_v", "glGetDoublei_v" )) || reportMissing("GL", "GL_ARB_viewport_array"); } @@ -9288,11 +9234,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491 - }, - "glWindowPos2iARB", "glWindowPos2sARB", "glWindowPos2fARB", "glWindowPos2dARB", "glWindowPos2ivARB", "glWindowPos2svARB", "glWindowPos2fvARB", - "glWindowPos2dvARB", "glWindowPos3iARB", "glWindowPos3sARB", "glWindowPos3fARB", "glWindowPos3dARB", "glWindowPos3ivARB", "glWindowPos3svARB", - "glWindowPos3fvARB", "glWindowPos3dvARB" + 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492 + }, + "glWindowPos2iARB", "glWindowPos2sARB", "glWindowPos2fARB", "glWindowPos2dARB", "glWindowPos2ivARB", "glWindowPos2svARB", "glWindowPos2fvARB", + "glWindowPos2dvARB", "glWindowPos3iARB", "glWindowPos3sARB", "glWindowPos3fARB", "glWindowPos3dARB", "glWindowPos3ivARB", "glWindowPos3svARB", + "glWindowPos3fvARB", "glWindowPos3dvARB" )) || reportMissing("GL", "GL_ARB_window_pos"); } @@ -9302,9 +9248,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1492, 1493, 1494 - }, - "glUniformBufferEXT", "glGetUniformBufferSizeEXT", "glGetUniformOffsetEXT" + 1493, 1494, 1495 + }, + "glUniformBufferEXT", "glGetUniformBufferSizeEXT", "glGetUniformOffsetEXT" )) || reportMissing("GL", "GL_EXT_bindable_uniform"); } @@ -9314,9 +9260,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1495 - }, - "glBlendColorEXT" + 1496 + }, + "glBlendColorEXT" )) || reportMissing("GL", "GL_EXT_blend_color"); } @@ -9326,9 +9272,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1496 - }, - "glBlendEquationSeparateEXT" + 1497 + }, + "glBlendEquationSeparateEXT" )) || reportMissing("GL", "GL_EXT_blend_equation_separate"); } @@ -9338,9 +9284,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1497 - }, - "glBlendFuncSeparateEXT" + 1498 + }, + "glBlendFuncSeparateEXT" )) || reportMissing("GL", "GL_EXT_blend_func_separate"); } @@ -9350,9 +9296,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1498 - }, - "glBlendEquationEXT" + 1499 + }, + "glBlendEquationEXT" )) || reportMissing("GL", "GL_EXT_blend_minmax"); } @@ -9362,9 +9308,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1499, 1500 - }, - "glLockArraysEXT", "glUnlockArraysEXT" + 1500, 1501 + }, + "glLockArraysEXT", "glUnlockArraysEXT" )) || reportMissing("GL", "GL_EXT_compiled_vertex_array"); } @@ -9374,9 +9320,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1501, 1502 - }, - "glLabelObjectEXT", "glGetObjectLabelEXT" + 1502, 1503 + }, + "glLabelObjectEXT", "glGetObjectLabelEXT" )) || reportMissing("GL", "GL_EXT_debug_label"); } @@ -9386,9 +9332,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1503, 1504, 1505 - }, - "glInsertEventMarkerEXT", "glPushGroupMarkerEXT", "glPopGroupMarkerEXT" + 1504, 1505, 1506 + }, + "glInsertEventMarkerEXT", "glPushGroupMarkerEXT", "glPopGroupMarkerEXT" )) || reportMissing("GL", "GL_EXT_debug_marker"); } @@ -9398,9 +9344,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1506 - }, - "glDepthBoundsEXT" + 1507 + }, + "glDepthBoundsEXT" )) || reportMissing("GL", "GL_EXT_depth_bounds_test"); } @@ -9426,76 +9372,76 @@ public final class GLCapabilities { int flag160 = ext.contains("GL_NV_explicit_multisample") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, - 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, flag0 + 1541, flag0 + 1542, flag0 + 1543, flag3 + 1544, flag3 + 1545, flag3 + 1546, - flag3 + 1547, flag3 + 1548, flag3 + 1549, flag3 + 1550, flag3 + 1551, flag3 + 1552, flag3 + 1553, flag3 + 1554, flag3 + 1555, flag3 + 1556, - flag3 + 1557, flag3 + 1558, flag3 + 1559, flag3 + 1560, flag3 + 1561, flag3 + 1562, flag3 + 1563, flag3 + 1564, flag3 + 1565, flag3 + 1566, - flag3 + 1567, flag3 + 1568, flag3 + 1569, flag3 + 1570, flag3 + 1571, flag3 + 1572, flag3 + 1573, flag3 + 1574, flag3 + 1575, flag3 + 1576, - flag3 + 1577, flag3 + 1578, flag3 + 1579, flag3 + 1580, flag3 + 1581, flag3 + 1582, flag3 + 1585, flag3 + 1586, flag3 + 1587, flag3 + 1591, - flag3 + 1592, flag3 + 1593, flag3 + 1594, flag3 + 1595, flag55 + 1596, flag55 + 1597, flag55 + 1598, flag55 + 1599, flag55 + 1600, flag55 + 1601, - flag55 + 1602, flag55 + 1603, flag55 + 1604, flag3 + 1605, flag3 + 1606, flag3 + 1607, flag3 + 1608, flag3 + 1609, flag3 + 1610, flag3 + 1611, - flag3 + 1612, flag3 + 1613, flag3 + 1614, flag3 + 1615, flag3 + 1616, flag3 + 1617, flag3 + 1618, flag3 + 1619, flag3 + 1620, flag3 + 1621, - flag3 + 1622, flag82 + 1623, flag82 + 1624, flag82 + 1625, flag82 + 1626, flag82 + 1627, flag82 + 1628, flag88 + 1629, flag88 + 1630, flag88 + 1631, - flag88 + 1632, flag88 + 1633, flag88 + 1634, flag88 + 1635, flag88 + 1636, flag88 + 1637, flag88 + 1638, flag88 + 1639, flag88 + 1640, - flag88 + 1641, flag88 + 1642, flag88 + 1643, flag88 + 1644, flag88 + 1645, flag88 + 1646, flag88 + 1647, flag107 + 1648, flag107 + 1649, - flag107 + 1650, flag107 + 1651, flag107 + 1652, flag107 + 1653, flag113 + 1654, flag113 + 1655, flag115 + 1656, flag115 + 1657, flag115 + 1658, - flag115 + 1659, flag115 + 1660, flag115 + 1661, flag115 + 1662, flag115 + 1663, flag123 + 1664, flag123 + 1665, flag123 + 1666, flag123 + 1667, - flag123 + 1668, flag123 + 1669, flag123 + 1670, flag123 + 1671, flag131 + 1672, flag132 + 1673, flag132 + 1674, flag132 + 1675, flag132 + 1676, - flag132 + 1677, flag132 + 1678, flag132 + 1679, flag132 + 1680, flag42 + 1681, flag42 + 1682, flag42 + 1683, flag143 + 1684, flag42 + 1685, - flag42 + 1686, flag42 + 1687, flag42 + 1688, flag42 + 1689, flag42 + 1690, flag42 + 1691, flag42 + 1692, flag42 + 1693, flag42 + 1694, - flag42 + 1695, flag42 + 1696, flag42 + 1697, flag157 + 1698, flag157 + 1699, flag157 + 1700, flag160 + 1701, flag160 + 1702, flag42 + 1703, - flag42 + 1704, flag42 + 1705, flag42 + 1706, flag42 + 1707, flag42 + 1708, flag42 + 1709, flag42 + 1710, flag42 + 1711, flag42 + 1712, - flag42 + 1713, flag42 + 1714, flag42 + 1715, flag42 + 1716, flag42 + 1717, flag42 + 1718, flag42 + 1719, flag42 + 1720, flag42 + 1721, - flag42 + 1722, flag42 + 1723 - }, - "glClientAttribDefaultEXT", "glPushClientAttribDefaultEXT", "glMatrixLoadfEXT", "glMatrixLoaddEXT", "glMatrixMultfEXT", "glMatrixMultdEXT", - "glMatrixLoadIdentityEXT", "glMatrixRotatefEXT", "glMatrixRotatedEXT", "glMatrixScalefEXT", "glMatrixScaledEXT", "glMatrixTranslatefEXT", - "glMatrixTranslatedEXT", "glMatrixOrthoEXT", "glMatrixFrustumEXT", "glMatrixPushEXT", "glMatrixPopEXT", "glTextureParameteriEXT", - "glTextureParameterivEXT", "glTextureParameterfEXT", "glTextureParameterfvEXT", "glTextureImage1DEXT", "glTextureImage2DEXT", - "glTextureSubImage1DEXT", "glTextureSubImage2DEXT", "glCopyTextureImage1DEXT", "glCopyTextureImage2DEXT", "glCopyTextureSubImage1DEXT", - "glCopyTextureSubImage2DEXT", "glGetTextureImageEXT", "glGetTextureParameterfvEXT", "glGetTextureParameterivEXT", "glGetTextureLevelParameterfvEXT", - "glGetTextureLevelParameterivEXT", "glTextureImage3DEXT", "glTextureSubImage3DEXT", "glCopyTextureSubImage3DEXT", "glBindMultiTextureEXT", - "glMultiTexCoordPointerEXT", "glMultiTexEnvfEXT", "glMultiTexEnvfvEXT", "glMultiTexEnviEXT", "glMultiTexEnvivEXT", "glMultiTexGendEXT", - "glMultiTexGendvEXT", "glMultiTexGenfEXT", "glMultiTexGenfvEXT", "glMultiTexGeniEXT", "glMultiTexGenivEXT", "glGetMultiTexEnvfvEXT", - "glGetMultiTexEnvivEXT", "glGetMultiTexGendvEXT", "glGetMultiTexGenfvEXT", "glGetMultiTexGenivEXT", "glMultiTexParameteriEXT", - "glMultiTexParameterivEXT", "glMultiTexParameterfEXT", "glMultiTexParameterfvEXT", "glMultiTexImage1DEXT", "glMultiTexImage2DEXT", - "glMultiTexSubImage1DEXT", "glMultiTexSubImage2DEXT", "glCopyMultiTexImage1DEXT", "glCopyMultiTexImage2DEXT", "glCopyMultiTexSubImage1DEXT", - "glCopyMultiTexSubImage2DEXT", "glGetMultiTexImageEXT", "glGetMultiTexParameterfvEXT", "glGetMultiTexParameterivEXT", - "glGetMultiTexLevelParameterfvEXT", "glGetMultiTexLevelParameterivEXT", "glMultiTexImage3DEXT", "glMultiTexSubImage3DEXT", - "glCopyMultiTexSubImage3DEXT", "glEnableClientStateIndexedEXT", "glDisableClientStateIndexedEXT", "glGetFloatIndexedvEXT", "glGetDoubleIndexedvEXT", - "glGetPointerIndexedvEXT", "glEnableIndexedEXT", "glDisableIndexedEXT", "glIsEnabledIndexedEXT", "glGetIntegerIndexedvEXT", - "glGetBooleanIndexedvEXT", "glNamedProgramStringEXT", "glNamedProgramLocalParameter4dEXT", "glNamedProgramLocalParameter4dvEXT", - "glNamedProgramLocalParameter4fEXT", "glNamedProgramLocalParameter4fvEXT", "glGetNamedProgramLocalParameterdvEXT", - "glGetNamedProgramLocalParameterfvEXT", "glGetNamedProgramivEXT", "glGetNamedProgramStringEXT", "glCompressedTextureImage3DEXT", - "glCompressedTextureImage2DEXT", "glCompressedTextureImage1DEXT", "glCompressedTextureSubImage3DEXT", "glCompressedTextureSubImage2DEXT", - "glCompressedTextureSubImage1DEXT", "glGetCompressedTextureImageEXT", "glCompressedMultiTexImage3DEXT", "glCompressedMultiTexImage2DEXT", - "glCompressedMultiTexImage1DEXT", "glCompressedMultiTexSubImage3DEXT", "glCompressedMultiTexSubImage2DEXT", "glCompressedMultiTexSubImage1DEXT", - "glGetCompressedMultiTexImageEXT", "glMatrixLoadTransposefEXT", "glMatrixLoadTransposedEXT", "glMatrixMultTransposefEXT", - "glMatrixMultTransposedEXT", "glNamedBufferDataEXT", "glNamedBufferSubDataEXT", "glMapNamedBufferEXT", "glUnmapNamedBufferEXT", - "glGetNamedBufferParameterivEXT", "glGetNamedBufferSubDataEXT", "glProgramUniform1fEXT", "glProgramUniform2fEXT", "glProgramUniform3fEXT", - "glProgramUniform4fEXT", "glProgramUniform1iEXT", "glProgramUniform2iEXT", "glProgramUniform3iEXT", "glProgramUniform4iEXT", - "glProgramUniform1fvEXT", "glProgramUniform2fvEXT", "glProgramUniform3fvEXT", "glProgramUniform4fvEXT", "glProgramUniform1ivEXT", - "glProgramUniform2ivEXT", "glProgramUniform3ivEXT", "glProgramUniform4ivEXT", "glProgramUniformMatrix2fvEXT", "glProgramUniformMatrix3fvEXT", - "glProgramUniformMatrix4fvEXT", "glProgramUniformMatrix2x3fvEXT", "glProgramUniformMatrix3x2fvEXT", "glProgramUniformMatrix2x4fvEXT", - "glProgramUniformMatrix4x2fvEXT", "glProgramUniformMatrix3x4fvEXT", "glProgramUniformMatrix4x3fvEXT", "glTextureBufferEXT", "glMultiTexBufferEXT", - "glTextureParameterIivEXT", "glTextureParameterIuivEXT", "glGetTextureParameterIivEXT", "glGetTextureParameterIuivEXT", "glMultiTexParameterIivEXT", - "glMultiTexParameterIuivEXT", "glGetMultiTexParameterIivEXT", "glGetMultiTexParameterIuivEXT", "glProgramUniform1uiEXT", "glProgramUniform2uiEXT", - "glProgramUniform3uiEXT", "glProgramUniform4uiEXT", "glProgramUniform1uivEXT", "glProgramUniform2uivEXT", "glProgramUniform3uivEXT", - "glProgramUniform4uivEXT", "glNamedProgramLocalParameters4fvEXT", "glNamedProgramLocalParameterI4iEXT", "glNamedProgramLocalParameterI4ivEXT", - "glNamedProgramLocalParametersI4ivEXT", "glNamedProgramLocalParameterI4uiEXT", "glNamedProgramLocalParameterI4uivEXT", - "glNamedProgramLocalParametersI4uivEXT", "glGetNamedProgramLocalParameterIivEXT", "glGetNamedProgramLocalParameterIuivEXT", - "glNamedRenderbufferStorageEXT", "glGetNamedRenderbufferParameterivEXT", "glNamedRenderbufferStorageMultisampleEXT", - "glNamedRenderbufferStorageMultisampleCoverageEXT", "glCheckNamedFramebufferStatusEXT", "glNamedFramebufferTexture1DEXT", - "glNamedFramebufferTexture2DEXT", "glNamedFramebufferTexture3DEXT", "glNamedFramebufferRenderbufferEXT", - "glGetNamedFramebufferAttachmentParameterivEXT", "glGenerateTextureMipmapEXT", "glGenerateMultiTexMipmapEXT", "glFramebufferDrawBufferEXT", - "glFramebufferDrawBuffersEXT", "glFramebufferReadBufferEXT", "glGetFramebufferParameterivEXT", "glNamedCopyBufferSubDataEXT", - "glNamedFramebufferTextureEXT", "glNamedFramebufferTextureLayerEXT", "glNamedFramebufferTextureFaceEXT", "glTextureRenderbufferEXT", - "glMultiTexRenderbufferEXT", "glVertexArrayVertexOffsetEXT", "glVertexArrayColorOffsetEXT", "glVertexArrayEdgeFlagOffsetEXT", - "glVertexArrayIndexOffsetEXT", "glVertexArrayNormalOffsetEXT", "glVertexArrayTexCoordOffsetEXT", "glVertexArrayMultiTexCoordOffsetEXT", - "glVertexArrayFogCoordOffsetEXT", "glVertexArraySecondaryColorOffsetEXT", "glVertexArrayVertexAttribOffsetEXT", - "glVertexArrayVertexAttribIOffsetEXT", "glEnableVertexArrayEXT", "glDisableVertexArrayEXT", "glEnableVertexArrayAttribEXT", - "glDisableVertexArrayAttribEXT", "glGetVertexArrayIntegervEXT", "glGetVertexArrayPointervEXT", "glGetVertexArrayIntegeri_vEXT", - "glGetVertexArrayPointeri_vEXT", "glMapNamedBufferRangeEXT", "glFlushMappedNamedBufferRangeEXT" + 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, + 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, flag0 + 1542, flag0 + 1543, flag0 + 1544, flag3 + 1545, flag3 + 1546, flag3 + 1547, + flag3 + 1548, flag3 + 1549, flag3 + 1550, flag3 + 1551, flag3 + 1552, flag3 + 1553, flag3 + 1554, flag3 + 1555, flag3 + 1556, flag3 + 1557, + flag3 + 1558, flag3 + 1559, flag3 + 1560, flag3 + 1561, flag3 + 1562, flag3 + 1563, flag3 + 1564, flag3 + 1565, flag3 + 1566, flag3 + 1567, + flag3 + 1568, flag3 + 1569, flag3 + 1570, flag3 + 1571, flag3 + 1572, flag3 + 1573, flag3 + 1574, flag3 + 1575, flag3 + 1576, flag3 + 1577, + flag3 + 1578, flag3 + 1579, flag3 + 1580, flag3 + 1581, flag3 + 1582, flag3 + 1583, flag3 + 1586, flag3 + 1587, flag3 + 1588, flag3 + 1592, + flag3 + 1593, flag3 + 1594, flag3 + 1595, flag3 + 1596, flag55 + 1597, flag55 + 1598, flag55 + 1599, flag55 + 1600, flag55 + 1601, flag55 + 1602, + flag55 + 1603, flag55 + 1604, flag55 + 1605, flag3 + 1606, flag3 + 1607, flag3 + 1608, flag3 + 1609, flag3 + 1610, flag3 + 1611, flag3 + 1612, + flag3 + 1613, flag3 + 1614, flag3 + 1615, flag3 + 1616, flag3 + 1617, flag3 + 1618, flag3 + 1619, flag3 + 1620, flag3 + 1621, flag3 + 1622, + flag3 + 1623, flag82 + 1624, flag82 + 1625, flag82 + 1626, flag82 + 1627, flag82 + 1628, flag82 + 1629, flag88 + 1630, flag88 + 1631, flag88 + 1632, + flag88 + 1633, flag88 + 1634, flag88 + 1635, flag88 + 1636, flag88 + 1637, flag88 + 1638, flag88 + 1639, flag88 + 1640, flag88 + 1641, + flag88 + 1642, flag88 + 1643, flag88 + 1644, flag88 + 1645, flag88 + 1646, flag88 + 1647, flag88 + 1648, flag107 + 1649, flag107 + 1650, + flag107 + 1651, flag107 + 1652, flag107 + 1653, flag107 + 1654, flag113 + 1655, flag113 + 1656, flag115 + 1657, flag115 + 1658, flag115 + 1659, + flag115 + 1660, flag115 + 1661, flag115 + 1662, flag115 + 1663, flag115 + 1664, flag123 + 1665, flag123 + 1666, flag123 + 1667, flag123 + 1668, + flag123 + 1669, flag123 + 1670, flag123 + 1671, flag123 + 1672, flag131 + 1673, flag132 + 1674, flag132 + 1675, flag132 + 1676, flag132 + 1677, + flag132 + 1678, flag132 + 1679, flag132 + 1680, flag132 + 1681, flag42 + 1682, flag42 + 1683, flag42 + 1684, flag143 + 1685, flag42 + 1686, + flag42 + 1687, flag42 + 1688, flag42 + 1689, flag42 + 1690, flag42 + 1691, flag42 + 1692, flag42 + 1693, flag42 + 1694, flag42 + 1695, + flag42 + 1696, flag42 + 1697, flag42 + 1698, flag157 + 1699, flag157 + 1700, flag157 + 1701, flag160 + 1702, flag160 + 1703, flag42 + 1704, + flag42 + 1705, flag42 + 1706, flag42 + 1707, flag42 + 1708, flag42 + 1709, flag42 + 1710, flag42 + 1711, flag42 + 1712, flag42 + 1713, + flag42 + 1714, flag42 + 1715, flag42 + 1716, flag42 + 1717, flag42 + 1718, flag42 + 1719, flag42 + 1720, flag42 + 1721, flag42 + 1722, + flag42 + 1723, flag42 + 1724 + }, + "glClientAttribDefaultEXT", "glPushClientAttribDefaultEXT", "glMatrixLoadfEXT", "glMatrixLoaddEXT", "glMatrixMultfEXT", "glMatrixMultdEXT", + "glMatrixLoadIdentityEXT", "glMatrixRotatefEXT", "glMatrixRotatedEXT", "glMatrixScalefEXT", "glMatrixScaledEXT", "glMatrixTranslatefEXT", + "glMatrixTranslatedEXT", "glMatrixOrthoEXT", "glMatrixFrustumEXT", "glMatrixPushEXT", "glMatrixPopEXT", "glTextureParameteriEXT", + "glTextureParameterivEXT", "glTextureParameterfEXT", "glTextureParameterfvEXT", "glTextureImage1DEXT", "glTextureImage2DEXT", + "glTextureSubImage1DEXT", "glTextureSubImage2DEXT", "glCopyTextureImage1DEXT", "glCopyTextureImage2DEXT", "glCopyTextureSubImage1DEXT", + "glCopyTextureSubImage2DEXT", "glGetTextureImageEXT", "glGetTextureParameterfvEXT", "glGetTextureParameterivEXT", "glGetTextureLevelParameterfvEXT", + "glGetTextureLevelParameterivEXT", "glTextureImage3DEXT", "glTextureSubImage3DEXT", "glCopyTextureSubImage3DEXT", "glBindMultiTextureEXT", + "glMultiTexCoordPointerEXT", "glMultiTexEnvfEXT", "glMultiTexEnvfvEXT", "glMultiTexEnviEXT", "glMultiTexEnvivEXT", "glMultiTexGendEXT", + "glMultiTexGendvEXT", "glMultiTexGenfEXT", "glMultiTexGenfvEXT", "glMultiTexGeniEXT", "glMultiTexGenivEXT", "glGetMultiTexEnvfvEXT", + "glGetMultiTexEnvivEXT", "glGetMultiTexGendvEXT", "glGetMultiTexGenfvEXT", "glGetMultiTexGenivEXT", "glMultiTexParameteriEXT", + "glMultiTexParameterivEXT", "glMultiTexParameterfEXT", "glMultiTexParameterfvEXT", "glMultiTexImage1DEXT", "glMultiTexImage2DEXT", + "glMultiTexSubImage1DEXT", "glMultiTexSubImage2DEXT", "glCopyMultiTexImage1DEXT", "glCopyMultiTexImage2DEXT", "glCopyMultiTexSubImage1DEXT", + "glCopyMultiTexSubImage2DEXT", "glGetMultiTexImageEXT", "glGetMultiTexParameterfvEXT", "glGetMultiTexParameterivEXT", + "glGetMultiTexLevelParameterfvEXT", "glGetMultiTexLevelParameterivEXT", "glMultiTexImage3DEXT", "glMultiTexSubImage3DEXT", + "glCopyMultiTexSubImage3DEXT", "glEnableClientStateIndexedEXT", "glDisableClientStateIndexedEXT", "glGetFloatIndexedvEXT", "glGetDoubleIndexedvEXT", + "glGetPointerIndexedvEXT", "glEnableIndexedEXT", "glDisableIndexedEXT", "glIsEnabledIndexedEXT", "glGetIntegerIndexedvEXT", + "glGetBooleanIndexedvEXT", "glNamedProgramStringEXT", "glNamedProgramLocalParameter4dEXT", "glNamedProgramLocalParameter4dvEXT", + "glNamedProgramLocalParameter4fEXT", "glNamedProgramLocalParameter4fvEXT", "glGetNamedProgramLocalParameterdvEXT", + "glGetNamedProgramLocalParameterfvEXT", "glGetNamedProgramivEXT", "glGetNamedProgramStringEXT", "glCompressedTextureImage3DEXT", + "glCompressedTextureImage2DEXT", "glCompressedTextureImage1DEXT", "glCompressedTextureSubImage3DEXT", "glCompressedTextureSubImage2DEXT", + "glCompressedTextureSubImage1DEXT", "glGetCompressedTextureImageEXT", "glCompressedMultiTexImage3DEXT", "glCompressedMultiTexImage2DEXT", + "glCompressedMultiTexImage1DEXT", "glCompressedMultiTexSubImage3DEXT", "glCompressedMultiTexSubImage2DEXT", "glCompressedMultiTexSubImage1DEXT", + "glGetCompressedMultiTexImageEXT", "glMatrixLoadTransposefEXT", "glMatrixLoadTransposedEXT", "glMatrixMultTransposefEXT", + "glMatrixMultTransposedEXT", "glNamedBufferDataEXT", "glNamedBufferSubDataEXT", "glMapNamedBufferEXT", "glUnmapNamedBufferEXT", + "glGetNamedBufferParameterivEXT", "glGetNamedBufferSubDataEXT", "glProgramUniform1fEXT", "glProgramUniform2fEXT", "glProgramUniform3fEXT", + "glProgramUniform4fEXT", "glProgramUniform1iEXT", "glProgramUniform2iEXT", "glProgramUniform3iEXT", "glProgramUniform4iEXT", + "glProgramUniform1fvEXT", "glProgramUniform2fvEXT", "glProgramUniform3fvEXT", "glProgramUniform4fvEXT", "glProgramUniform1ivEXT", + "glProgramUniform2ivEXT", "glProgramUniform3ivEXT", "glProgramUniform4ivEXT", "glProgramUniformMatrix2fvEXT", "glProgramUniformMatrix3fvEXT", + "glProgramUniformMatrix4fvEXT", "glProgramUniformMatrix2x3fvEXT", "glProgramUniformMatrix3x2fvEXT", "glProgramUniformMatrix2x4fvEXT", + "glProgramUniformMatrix4x2fvEXT", "glProgramUniformMatrix3x4fvEXT", "glProgramUniformMatrix4x3fvEXT", "glTextureBufferEXT", "glMultiTexBufferEXT", + "glTextureParameterIivEXT", "glTextureParameterIuivEXT", "glGetTextureParameterIivEXT", "glGetTextureParameterIuivEXT", "glMultiTexParameterIivEXT", + "glMultiTexParameterIuivEXT", "glGetMultiTexParameterIivEXT", "glGetMultiTexParameterIuivEXT", "glProgramUniform1uiEXT", "glProgramUniform2uiEXT", + "glProgramUniform3uiEXT", "glProgramUniform4uiEXT", "glProgramUniform1uivEXT", "glProgramUniform2uivEXT", "glProgramUniform3uivEXT", + "glProgramUniform4uivEXT", "glNamedProgramLocalParameters4fvEXT", "glNamedProgramLocalParameterI4iEXT", "glNamedProgramLocalParameterI4ivEXT", + "glNamedProgramLocalParametersI4ivEXT", "glNamedProgramLocalParameterI4uiEXT", "glNamedProgramLocalParameterI4uivEXT", + "glNamedProgramLocalParametersI4uivEXT", "glGetNamedProgramLocalParameterIivEXT", "glGetNamedProgramLocalParameterIuivEXT", + "glNamedRenderbufferStorageEXT", "glGetNamedRenderbufferParameterivEXT", "glNamedRenderbufferStorageMultisampleEXT", + "glNamedRenderbufferStorageMultisampleCoverageEXT", "glCheckNamedFramebufferStatusEXT", "glNamedFramebufferTexture1DEXT", + "glNamedFramebufferTexture2DEXT", "glNamedFramebufferTexture3DEXT", "glNamedFramebufferRenderbufferEXT", + "glGetNamedFramebufferAttachmentParameterivEXT", "glGenerateTextureMipmapEXT", "glGenerateMultiTexMipmapEXT", "glFramebufferDrawBufferEXT", + "glFramebufferDrawBuffersEXT", "glFramebufferReadBufferEXT", "glGetFramebufferParameterivEXT", "glNamedCopyBufferSubDataEXT", + "glNamedFramebufferTextureEXT", "glNamedFramebufferTextureLayerEXT", "glNamedFramebufferTextureFaceEXT", "glTextureRenderbufferEXT", + "glMultiTexRenderbufferEXT", "glVertexArrayVertexOffsetEXT", "glVertexArrayColorOffsetEXT", "glVertexArrayEdgeFlagOffsetEXT", + "glVertexArrayIndexOffsetEXT", "glVertexArrayNormalOffsetEXT", "glVertexArrayTexCoordOffsetEXT", "glVertexArrayMultiTexCoordOffsetEXT", + "glVertexArrayFogCoordOffsetEXT", "glVertexArraySecondaryColorOffsetEXT", "glVertexArrayVertexAttribOffsetEXT", + "glVertexArrayVertexAttribIOffsetEXT", "glEnableVertexArrayEXT", "glDisableVertexArrayEXT", "glEnableVertexArrayAttribEXT", + "glDisableVertexArrayAttribEXT", "glGetVertexArrayIntegervEXT", "glGetVertexArrayPointervEXT", "glGetVertexArrayIntegeri_vEXT", + "glGetVertexArrayPointeri_vEXT", "glMapNamedBufferRangeEXT", "glFlushMappedNamedBufferRangeEXT" )) || reportMissing("GL", "GL_EXT_direct_state_access"); } @@ -9505,9 +9451,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1724, 1595, 1594, 1591, 1592, 1593 - }, - "glColorMaskIndexedEXT", "glGetBooleanIndexedvEXT", "glGetIntegerIndexedvEXT", "glEnableIndexedEXT", "glDisableIndexedEXT", "glIsEnabledIndexedEXT" + 1725, 1596, 1595, 1592, 1593, 1594 + }, + "glColorMaskIndexedEXT", "glGetBooleanIndexedvEXT", "glGetIntegerIndexedvEXT", "glEnableIndexedEXT", "glDisableIndexedEXT", "glIsEnabledIndexedEXT" )) || reportMissing("GL", "GL_EXT_draw_buffers2"); } @@ -9517,9 +9463,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1725, 1726 - }, - "glDrawArraysInstancedEXT", "glDrawElementsInstancedEXT" + 1726, 1727 + }, + "glDrawArraysInstancedEXT", "glDrawElementsInstancedEXT" )) || reportMissing("GL", "GL_EXT_draw_instanced"); } @@ -9531,9 +9477,9 @@ public final class GLCapabilities { int flag0 = hasDSA(ext) ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1727, flag0 + 1728 - }, - "glEGLImageTargetTexStorageEXT", "glEGLImageTargetTextureStorageEXT" + 1728, flag0 + 1729 + }, + "glEGLImageTargetTexStorageEXT", "glEGLImageTargetTextureStorageEXT" )) || reportMissing("GL", "GL_EXT_EGL_image_storage"); } @@ -9545,9 +9491,9 @@ public final class GLCapabilities { int flag0 = hasDSA(ext) ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1729, flag0 + 1730 - }, - "glBufferStorageExternalEXT", "glNamedBufferStorageExternalEXT" + 1730, flag0 + 1731 + }, + "glBufferStorageExternalEXT", "glNamedBufferStorageExternalEXT" )) || reportMissing("GL", "GL_EXT_external_buffer"); } @@ -9557,33 +9503,21 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1731 - }, - "glBlitFramebufferEXT" + 1732 + }, + "glBlitFramebufferEXT" )) || reportMissing("GL", "GL_EXT_framebuffer_blit"); } - private static boolean check_EXT_framebuffer_blit_layers(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("GL_EXT_framebuffer_blit_layers")) { - return false; - } - - return (checkFunctions(provider, caps, new int[] { - 1732, 1733 - }, - "glBlitFramebufferLayersEXT", "glBlitFramebufferLayerEXT" - )) || reportMissing("GL", "GL_EXT_framebuffer_blit_layers"); - } - private static boolean check_EXT_framebuffer_multisample(FunctionProvider provider, PointerBuffer caps, Set ext) { if (!ext.contains("GL_EXT_framebuffer_multisample")) { return false; } return (checkFunctions(provider, caps, new int[] { - 1734 - }, - "glRenderbufferStorageMultisampleEXT" + 1733 + }, + "glRenderbufferStorageMultisampleEXT" )) || reportMissing("GL", "GL_EXT_framebuffer_multisample"); } @@ -9593,12 +9527,12 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751 - }, - "glIsRenderbufferEXT", "glBindRenderbufferEXT", "glDeleteRenderbuffersEXT", "glGenRenderbuffersEXT", "glRenderbufferStorageEXT", - "glGetRenderbufferParameterivEXT", "glIsFramebufferEXT", "glBindFramebufferEXT", "glDeleteFramebuffersEXT", "glGenFramebuffersEXT", - "glCheckFramebufferStatusEXT", "glFramebufferTexture1DEXT", "glFramebufferTexture2DEXT", "glFramebufferTexture3DEXT", - "glFramebufferRenderbufferEXT", "glGetFramebufferAttachmentParameterivEXT", "glGenerateMipmapEXT" + 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750 + }, + "glIsRenderbufferEXT", "glBindRenderbufferEXT", "glDeleteRenderbuffersEXT", "glGenRenderbuffersEXT", "glRenderbufferStorageEXT", + "glGetRenderbufferParameterivEXT", "glIsFramebufferEXT", "glBindFramebufferEXT", "glDeleteFramebuffersEXT", "glGenFramebuffersEXT", + "glCheckFramebufferStatusEXT", "glFramebufferTexture1DEXT", "glFramebufferTexture2DEXT", "glFramebufferTexture3DEXT", + "glFramebufferRenderbufferEXT", "glGetFramebufferAttachmentParameterivEXT", "glGenerateMipmapEXT" )) || reportMissing("GL", "GL_EXT_framebuffer_object"); } @@ -9608,9 +9542,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1752, 1753, 1754, 1755 - }, - "glProgramParameteriEXT", "glFramebufferTextureEXT", "glFramebufferTextureLayerEXT", "glFramebufferTextureFaceEXT" + 1751, 1752, 1753, 1754 + }, + "glProgramParameteriEXT", "glFramebufferTextureEXT", "glFramebufferTextureLayerEXT", "glFramebufferTextureFaceEXT" )) || reportMissing("GL", "GL_EXT_geometry_shader4"); } @@ -9620,9 +9554,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1756, 1757 - }, - "glProgramEnvParameters4fvEXT", "glProgramLocalParameters4fvEXT" + 1755, 1756 + }, + "glProgramEnvParameters4fvEXT", "glProgramLocalParameters4fvEXT" )) || reportMissing("GL", "GL_EXT_gpu_program_parameters"); } @@ -9632,16 +9566,16 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, - 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791 - }, - "glVertexAttribI1iEXT", "glVertexAttribI2iEXT", "glVertexAttribI3iEXT", "glVertexAttribI4iEXT", "glVertexAttribI1uiEXT", "glVertexAttribI2uiEXT", - "glVertexAttribI3uiEXT", "glVertexAttribI4uiEXT", "glVertexAttribI1ivEXT", "glVertexAttribI2ivEXT", "glVertexAttribI3ivEXT", - "glVertexAttribI4ivEXT", "glVertexAttribI1uivEXT", "glVertexAttribI2uivEXT", "glVertexAttribI3uivEXT", "glVertexAttribI4uivEXT", - "glVertexAttribI4bvEXT", "glVertexAttribI4svEXT", "glVertexAttribI4ubvEXT", "glVertexAttribI4usvEXT", "glVertexAttribIPointerEXT", - "glGetVertexAttribIivEXT", "glGetVertexAttribIuivEXT", "glGetUniformuivEXT", "glBindFragDataLocationEXT", "glGetFragDataLocationEXT", - "glUniform1uiEXT", "glUniform2uiEXT", "glUniform3uiEXT", "glUniform4uiEXT", "glUniform1uivEXT", "glUniform2uivEXT", "glUniform3uivEXT", - "glUniform4uivEXT" + 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, + 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790 + }, + "glVertexAttribI1iEXT", "glVertexAttribI2iEXT", "glVertexAttribI3iEXT", "glVertexAttribI4iEXT", "glVertexAttribI1uiEXT", "glVertexAttribI2uiEXT", + "glVertexAttribI3uiEXT", "glVertexAttribI4uiEXT", "glVertexAttribI1ivEXT", "glVertexAttribI2ivEXT", "glVertexAttribI3ivEXT", + "glVertexAttribI4ivEXT", "glVertexAttribI1uivEXT", "glVertexAttribI2uivEXT", "glVertexAttribI3uivEXT", "glVertexAttribI4uivEXT", + "glVertexAttribI4bvEXT", "glVertexAttribI4svEXT", "glVertexAttribI4ubvEXT", "glVertexAttribI4usvEXT", "glVertexAttribIPointerEXT", + "glGetVertexAttribIivEXT", "glGetVertexAttribIuivEXT", "glGetUniformuivEXT", "glBindFragDataLocationEXT", "glGetFragDataLocationEXT", + "glUniform1uiEXT", "glUniform2uiEXT", "glUniform3uiEXT", "glUniform4uiEXT", "glUniform1uivEXT", "glUniform2uivEXT", "glUniform3uivEXT", + "glUniform4uivEXT" )) || reportMissing("GL", "GL_EXT_gpu_shader4"); } @@ -9653,14 +9587,14 @@ public final class GLCapabilities { int flag0 = hasDSA(ext) ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, flag0 + 1804, flag0 + 1805, flag0 + 1806, flag0 + 1807, flag0 + 1808, 1809, - flag0 + 1810 - }, - "glGetUnsignedBytevEXT", "glGetUnsignedBytei_vEXT", "glDeleteMemoryObjectsEXT", "glIsMemoryObjectEXT", "glCreateMemoryObjectsEXT", - "glMemoryObjectParameterivEXT", "glGetMemoryObjectParameterivEXT", "glTexStorageMem2DEXT", "glTexStorageMem2DMultisampleEXT", - "glTexStorageMem3DEXT", "glTexStorageMem3DMultisampleEXT", "glBufferStorageMemEXT", "glTextureStorageMem2DEXT", - "glTextureStorageMem2DMultisampleEXT", "glTextureStorageMem3DEXT", "glTextureStorageMem3DMultisampleEXT", "glNamedBufferStorageMemEXT", - "glTexStorageMem1DEXT", "glTextureStorageMem1DEXT" + 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, flag0 + 1803, flag0 + 1804, flag0 + 1805, flag0 + 1806, flag0 + 1807, 1808, + flag0 + 1809 + }, + "glGetUnsignedBytevEXT", "glGetUnsignedBytei_vEXT", "glDeleteMemoryObjectsEXT", "glIsMemoryObjectEXT", "glCreateMemoryObjectsEXT", + "glMemoryObjectParameterivEXT", "glGetMemoryObjectParameterivEXT", "glTexStorageMem2DEXT", "glTexStorageMem2DMultisampleEXT", + "glTexStorageMem3DEXT", "glTexStorageMem3DMultisampleEXT", "glBufferStorageMemEXT", "glTextureStorageMem2DEXT", + "glTextureStorageMem2DMultisampleEXT", "glTextureStorageMem3DEXT", "glTextureStorageMem3DMultisampleEXT", "glNamedBufferStorageMemEXT", + "glTexStorageMem1DEXT", "glTextureStorageMem1DEXT" )) || reportMissing("GL", "GL_EXT_memory_object"); } @@ -9670,9 +9604,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1811 - }, - "glImportMemoryFdEXT" + 1810 + }, + "glImportMemoryFdEXT" )) || reportMissing("GL", "GL_EXT_memory_object_fd"); } @@ -9682,9 +9616,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1812, 1813 - }, - "glImportMemoryWin32HandleEXT", "glImportMemoryWin32NameEXT" + 1811, 1812 + }, + "glImportMemoryWin32HandleEXT", "glImportMemoryWin32NameEXT" )) || reportMissing("GL", "GL_EXT_memory_object_win32"); } @@ -9694,9 +9628,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1814, 1815 - }, - "glPointParameterfEXT", "glPointParameterfvEXT" + 1813, 1814 + }, + "glPointParameterfEXT", "glPointParameterfvEXT" )) || reportMissing("GL", "GL_EXT_point_parameters"); } @@ -9706,9 +9640,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1816 - }, - "glPolygonOffsetClampEXT" + 1815 + }, + "glPolygonOffsetClampEXT" )) || reportMissing("GL", "GL_EXT_polygon_offset_clamp"); } @@ -9718,9 +9652,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1817 - }, - "glProvokingVertexEXT" + 1816 + }, + "glProvokingVertexEXT" )) || reportMissing("GL", "GL_EXT_provoking_vertex"); } @@ -9730,9 +9664,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1818 - }, - "glRasterSamplesEXT" + 1817 + }, + "glRasterSamplesEXT" )) || reportMissing("GL", "GL_EXT_raster_multisample"); } @@ -9742,12 +9676,12 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835 - }, - "glSecondaryColor3bEXT", "glSecondaryColor3sEXT", "glSecondaryColor3iEXT", "glSecondaryColor3fEXT", "glSecondaryColor3dEXT", - "glSecondaryColor3ubEXT", "glSecondaryColor3usEXT", "glSecondaryColor3uiEXT", "glSecondaryColor3bvEXT", "glSecondaryColor3svEXT", - "glSecondaryColor3ivEXT", "glSecondaryColor3fvEXT", "glSecondaryColor3dvEXT", "glSecondaryColor3ubvEXT", "glSecondaryColor3usvEXT", - "glSecondaryColor3uivEXT", "glSecondaryColorPointerEXT" + 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834 + }, + "glSecondaryColor3bEXT", "glSecondaryColor3sEXT", "glSecondaryColor3iEXT", "glSecondaryColor3fEXT", "glSecondaryColor3dEXT", + "glSecondaryColor3ubEXT", "glSecondaryColor3usEXT", "glSecondaryColor3uiEXT", "glSecondaryColor3bvEXT", "glSecondaryColor3svEXT", + "glSecondaryColor3ivEXT", "glSecondaryColor3fvEXT", "glSecondaryColor3dvEXT", "glSecondaryColor3ubvEXT", "glSecondaryColor3usvEXT", + "glSecondaryColor3uivEXT", "glSecondaryColorPointerEXT" )) || reportMissing("GL", "GL_EXT_secondary_color"); } @@ -9757,10 +9691,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1792, 1793, 1836, 1837, 1838, 1839, 1840, 1841, 1842 - }, - "glGetUnsignedBytevEXT", "glGetUnsignedBytei_vEXT", "glGenSemaphoresEXT", "glDeleteSemaphoresEXT", "glIsSemaphoreEXT", - "glSemaphoreParameterui64vEXT", "glGetSemaphoreParameterui64vEXT", "glWaitSemaphoreEXT", "glSignalSemaphoreEXT" + 1791, 1792, 1835, 1836, 1837, 1838, 1839, 1840, 1841 + }, + "glGetUnsignedBytevEXT", "glGetUnsignedBytei_vEXT", "glGenSemaphoresEXT", "glDeleteSemaphoresEXT", "glIsSemaphoreEXT", + "glSemaphoreParameterui64vEXT", "glGetSemaphoreParameterui64vEXT", "glWaitSemaphoreEXT", "glSignalSemaphoreEXT" )) || reportMissing("GL", "GL_EXT_semaphore"); } @@ -9770,9 +9704,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1843 - }, - "glImportSemaphoreFdEXT" + 1842 + }, + "glImportSemaphoreFdEXT" )) || reportMissing("GL", "GL_EXT_semaphore_fd"); } @@ -9782,9 +9716,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1844, 1845 - }, - "glImportSemaphoreWin32HandleEXT", "glImportSemaphoreWin32NameEXT" + 1843, 1844 + }, + "glImportSemaphoreWin32HandleEXT", "glImportSemaphoreWin32NameEXT" )) || reportMissing("GL", "GL_EXT_semaphore_win32"); } @@ -9794,9 +9728,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1846, 1847, 1848 - }, - "glUseShaderProgramEXT", "glActiveProgramEXT", "glCreateShaderProgramEXT" + 1845, 1846, 1847 + }, + "glUseShaderProgramEXT", "glActiveProgramEXT", "glCreateShaderProgramEXT" )) || reportMissing("GL", "GL_EXT_separate_shader_objects"); } @@ -9806,9 +9740,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1849 - }, - "glFramebufferFetchBarrierEXT" + 1848 + }, + "glFramebufferFetchBarrierEXT" )) || reportMissing("GL", "GL_EXT_shader_framebuffer_fetch_non_coherent"); } @@ -9818,9 +9752,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1850, 1851 - }, - "glBindImageTextureEXT", "glMemoryBarrierEXT" + 1849, 1850 + }, + "glBindImageTextureEXT", "glMemoryBarrierEXT" )) || reportMissing("GL", "GL_EXT_shader_image_load_store"); } @@ -9830,9 +9764,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1852 - }, - "glStencilClearTagEXT" + 1851 + }, + "glStencilClearTagEXT" )) || reportMissing("GL", "GL_EXT_stencil_clear_tag"); } @@ -9842,9 +9776,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1853 - }, - "glActiveStencilFaceEXT" + 1852 + }, + "glActiveStencilFaceEXT" )) || reportMissing("GL", "GL_EXT_stencil_two_side"); } @@ -9854,9 +9788,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1754 - }, - "glFramebufferTextureLayerEXT" + 1753 + }, + "glFramebufferTextureLayerEXT" )) || reportMissing("GL", "GL_EXT_texture_array"); } @@ -9866,9 +9800,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1854 - }, - "glTexBufferEXT" + 1853 + }, + "glTexBufferEXT" )) || reportMissing("GL", "GL_EXT_texture_buffer_object"); } @@ -9878,9 +9812,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1855, 1856, 1857, 1858, 1859, 1860 - }, - "glClearColorIiEXT", "glClearColorIuiEXT", "glTexParameterIivEXT", "glTexParameterIuivEXT", "glGetTexParameterIivEXT", "glGetTexParameterIuivEXT" + 1854, 1855, 1856, 1857, 1858, 1859 + }, + "glClearColorIiEXT", "glClearColorIuiEXT", "glTexParameterIivEXT", "glTexParameterIuivEXT", "glGetTexParameterIivEXT", "glGetTexParameterIuivEXT" )) || reportMissing("GL", "GL_EXT_texture_integer"); } @@ -9892,9 +9826,9 @@ public final class GLCapabilities { int flag0 = hasDSA(ext) ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1861, 1862, 1863, flag0 + 1374, flag0 + 1375, flag0 + 1376 - }, - "glTexStorage1DEXT", "glTexStorage2DEXT", "glTexStorage3DEXT", "glTextureStorage1DEXT", "glTextureStorage2DEXT", "glTextureStorage3DEXT" + 1860, 1861, 1862, flag0 + 1375, flag0 + 1376, flag0 + 1377 + }, + "glTexStorage1DEXT", "glTexStorage2DEXT", "glTexStorage3DEXT", "glTextureStorage1DEXT", "glTextureStorage2DEXT", "glTextureStorage3DEXT" )) || reportMissing("GL", "GL_EXT_texture_storage"); } @@ -9904,9 +9838,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1864, 1865 - }, - "glGetQueryObjecti64vEXT", "glGetQueryObjectui64vEXT" + 1863, 1864 + }, + "glGetQueryObjecti64vEXT", "glGetQueryObjectui64vEXT" )) || reportMissing("GL", "GL_EXT_timer_query"); } @@ -9916,10 +9850,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1594, 1595 - }, - "glBindBufferRangeEXT", "glBindBufferOffsetEXT", "glBindBufferBaseEXT", "glBeginTransformFeedbackEXT", "glEndTransformFeedbackEXT", - "glTransformFeedbackVaryingsEXT", "glGetTransformFeedbackVaryingEXT", "glGetIntegerIndexedvEXT", "glGetBooleanIndexedvEXT" + 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1595, 1596 + }, + "glBindBufferRangeEXT", "glBindBufferOffsetEXT", "glBindBufferBaseEXT", "glBeginTransformFeedbackEXT", "glEndTransformFeedbackEXT", + "glTransformFeedbackVaryingsEXT", "glGetTransformFeedbackVaryingEXT", "glGetIntegerIndexedvEXT", "glGetBooleanIndexedvEXT" )) || reportMissing("GL", "GL_EXT_transform_feedback"); } @@ -9931,10 +9865,10 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, flag0 + 1383 - }, - "glVertexAttribL1dEXT", "glVertexAttribL2dEXT", "glVertexAttribL3dEXT", "glVertexAttribL4dEXT", "glVertexAttribL1dvEXT", "glVertexAttribL2dvEXT", - "glVertexAttribL3dvEXT", "glVertexAttribL4dvEXT", "glVertexAttribLPointerEXT", "glGetVertexAttribLdvEXT", "glVertexArrayVertexAttribLOffsetEXT" + 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, flag0 + 1384 + }, + "glVertexAttribL1dEXT", "glVertexAttribL2dEXT", "glVertexAttribL3dEXT", "glVertexAttribL4dEXT", "glVertexAttribL1dvEXT", "glVertexAttribL2dvEXT", + "glVertexAttribL3dvEXT", "glVertexAttribL4dvEXT", "glVertexAttribLPointerEXT", "glGetVertexAttribLdvEXT", "glVertexArrayVertexAttribLOffsetEXT" )) || reportMissing("GL", "GL_EXT_vertex_attrib_64bit"); } @@ -9944,9 +9878,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1883, 1884 - }, - "glAcquireKeyedMutexWin32EXT", "glReleaseKeyedMutexWin32EXT" + 1882, 1883 + }, + "glAcquireKeyedMutexWin32EXT", "glReleaseKeyedMutexWin32EXT" )) || reportMissing("GL", "GL_EXT_win32_keyed_mutex"); } @@ -9956,9 +9890,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1885 - }, - "glWindowRectanglesEXT" + 1884 + }, + "glWindowRectanglesEXT" )) || reportMissing("GL", "GL_EXT_window_rectangles"); } @@ -9968,9 +9902,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1886 - }, - "glImportSyncEXT" + 1885 + }, + "glImportSyncEXT" )) || reportMissing("GL", "GL_EXT_x11_sync_object"); } @@ -9980,9 +9914,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1887 - }, - "glFrameTerminatorGREMEDY" + 1886 + }, + "glFrameTerminatorGREMEDY" )) || reportMissing("GL", "GL_GREMEDY_frame_terminator"); } @@ -9992,9 +9926,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1888 - }, - "glStringMarkerGREMEDY" + 1887 + }, + "glStringMarkerGREMEDY" )) || reportMissing("GL", "GL_GREMEDY_string_marker"); } @@ -10004,9 +9938,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1889 - }, - "glApplyFramebufferAttachmentCMAAINTEL" + 1888 + }, + "glApplyFramebufferAttachmentCMAAINTEL" )) || reportMissing("GL", "GL_INTEL_framebuffer_CMAA"); } @@ -10016,9 +9950,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1890, 1891, 1892 - }, - "glSyncTextureINTEL", "glUnmapTexture2DINTEL", "glMapTexture2DINTEL" + 1889, 1890, 1891 + }, + "glSyncTextureINTEL", "glUnmapTexture2DINTEL", "glMapTexture2DINTEL" )) || reportMissing("GL", "GL_INTEL_map_texture"); } @@ -10028,10 +9962,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902 - }, - "glBeginPerfQueryINTEL", "glCreatePerfQueryINTEL", "glDeletePerfQueryINTEL", "glEndPerfQueryINTEL", "glGetFirstPerfQueryIdINTEL", - "glGetNextPerfQueryIdINTEL", "glGetPerfCounterInfoINTEL", "glGetPerfQueryDataINTEL", "glGetPerfQueryIdByNameINTEL", "glGetPerfQueryInfoINTEL" + 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901 + }, + "glBeginPerfQueryINTEL", "glCreatePerfQueryINTEL", "glDeletePerfQueryINTEL", "glEndPerfQueryINTEL", "glGetFirstPerfQueryIdINTEL", + "glGetNextPerfQueryIdINTEL", "glGetPerfCounterInfoINTEL", "glGetPerfQueryDataINTEL", "glGetPerfQueryIdByNameINTEL", "glGetPerfQueryInfoINTEL" )) || reportMissing("GL", "GL_INTEL_performance_query"); } @@ -10041,9 +9975,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1903 - }, - "glBlendBarrierKHR" + 1902 + }, + "glBlendBarrierKHR" )) || reportMissing("GL", "GL_KHR_blend_equation_advanced"); } @@ -10053,10 +9987,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 875, 876, 877, 878, 879, 880, 881, 882, 883, 884 - }, - "glDebugMessageControl", "glDebugMessageInsert", "glDebugMessageCallback", "glGetDebugMessageLog", "glPushDebugGroup", "glPopDebugGroup", - "glObjectLabel", "glGetObjectLabel", "glObjectPtrLabel", "glGetObjectPtrLabel" + 875, 876, 877, 878, 879, 880, 881, 882, 883, 884 + }, + "glDebugMessageControl", "glDebugMessageInsert", "glDebugMessageCallback", "glGetDebugMessageLog", "glPushDebugGroup", "glPopDebugGroup", + "glObjectLabel", "glGetObjectLabel", "glObjectPtrLabel", "glGetObjectPtrLabel" )) || reportMissing("GL", "GL_KHR_debug"); } @@ -10066,9 +10000,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1904 - }, - "glMaxShaderCompilerThreadsKHR" + 1903 + }, + "glMaxShaderCompilerThreadsKHR" )) || reportMissing("GL", "GL_KHR_parallel_shader_compile"); } @@ -10078,9 +10012,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1024, 1033, 1040, 1042, 1043 - }, - "glGetGraphicsResetStatus", "glReadnPixels", "glGetnUniformfv", "glGetnUniformiv", "glGetnUniformuiv" + 1024, 1033, 1040, 1042, 1043 + }, + "glGetGraphicsResetStatus", "glReadnPixels", "glGetnUniformfv", "glGetnUniformiv", "glGetnUniformuiv" )) || reportMissing("GL", "GL_KHR_robustness"); } @@ -10090,9 +10024,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1905, 1906 - }, - "glFramebufferParameteriMESA", "glGetFramebufferParameterivMESA" + 1904, 1905 + }, + "glFramebufferParameteriMESA", "glGetFramebufferParameterivMESA" )) || reportMissing("GL", "GL_MESA_framebuffer_flip_y"); } @@ -10102,9 +10036,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1907 - }, - "glAlphaToCoverageDitherControlNV" + 1906 + }, + "glAlphaToCoverageDitherControlNV" )) || reportMissing("GL", "GL_NV_alpha_to_coverage_dither_control"); } @@ -10114,9 +10048,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1908, 1909 - }, - "glMultiDrawArraysIndirectBindlessNV", "glMultiDrawElementsIndirectBindlessNV" + 1907, 1908 + }, + "glMultiDrawArraysIndirectBindlessNV", "glMultiDrawElementsIndirectBindlessNV" )) || reportMissing("GL", "GL_NV_bindless_multi_draw_indirect"); } @@ -10126,9 +10060,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1910, 1911 - }, - "glMultiDrawArraysIndirectBindlessCountNV", "glMultiDrawElementsIndirectBindlessCountNV" + 1909, 1910 + }, + "glMultiDrawArraysIndirectBindlessCountNV", "glMultiDrawElementsIndirectBindlessCountNV" )) || reportMissing("GL", "GL_NV_bindless_multi_draw_indirect_count"); } @@ -10138,11 +10072,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924 - }, - "glGetTextureHandleNV", "glGetTextureSamplerHandleNV", "glMakeTextureHandleResidentNV", "glMakeTextureHandleNonResidentNV", "glGetImageHandleNV", - "glMakeImageHandleResidentNV", "glMakeImageHandleNonResidentNV", "glUniformHandleui64NV", "glUniformHandleui64vNV", "glProgramUniformHandleui64NV", - "glProgramUniformHandleui64vNV", "glIsTextureHandleResidentNV", "glIsImageHandleResidentNV" + 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923 + }, + "glGetTextureHandleNV", "glGetTextureSamplerHandleNV", "glMakeTextureHandleResidentNV", "glMakeTextureHandleNonResidentNV", "glGetImageHandleNV", + "glMakeImageHandleResidentNV", "glMakeImageHandleNonResidentNV", "glUniformHandleui64NV", "glUniformHandleui64vNV", "glProgramUniformHandleui64NV", + "glProgramUniformHandleui64vNV", "glIsTextureHandleResidentNV", "glIsImageHandleResidentNV" )) || reportMissing("GL", "GL_NV_bindless_texture"); } @@ -10152,9 +10086,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1925, 1926 - }, - "glBlendParameteriNV", "glBlendBarrierNV" + 1924, 1925 + }, + "glBlendParameteriNV", "glBlendBarrierNV" )) || reportMissing("GL", "GL_NV_blend_equation_advanced"); } @@ -10164,9 +10098,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1927 - }, - "glViewportPositionWScaleNV" + 1926 + }, + "glViewportPositionWScaleNV" )) || reportMissing("GL", "GL_NV_clip_space_w_scaling"); } @@ -10176,11 +10110,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944 - }, - "glCreateStatesNV", "glDeleteStatesNV", "glIsStateNV", "glStateCaptureNV", "glGetCommandHeaderNV", "glGetStageIndexNV", "glDrawCommandsNV", - "glDrawCommandsAddressNV", "glDrawCommandsStatesNV", "glDrawCommandsStatesAddressNV", "glCreateCommandListsNV", "glDeleteCommandListsNV", - "glIsCommandListNV", "glListDrawCommandsStatesClientNV", "glCommandListSegmentsNV", "glCompileCommandListNV", "glCallCommandListNV" + 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943 + }, + "glCreateStatesNV", "glDeleteStatesNV", "glIsStateNV", "glStateCaptureNV", "glGetCommandHeaderNV", "glGetStageIndexNV", "glDrawCommandsNV", + "glDrawCommandsAddressNV", "glDrawCommandsStatesNV", "glDrawCommandsStatesAddressNV", "glCreateCommandListsNV", "glDeleteCommandListsNV", + "glIsCommandListNV", "glListDrawCommandsStatesClientNV", "glCommandListSegmentsNV", "glCompileCommandListNV", "glCallCommandListNV" )) || reportMissing("GL", "GL_NV_command_list"); } @@ -10190,9 +10124,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1945, 1946 - }, - "glBeginConditionalRenderNV", "glEndConditionalRenderNV" + 1944, 1945 + }, + "glBeginConditionalRenderNV", "glEndConditionalRenderNV" )) || reportMissing("GL", "GL_NV_conditional_render"); } @@ -10202,9 +10136,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1947 - }, - "glSubpixelPrecisionBiasNV" + 1946 + }, + "glSubpixelPrecisionBiasNV" )) || reportMissing("GL", "GL_NV_conservative_raster"); } @@ -10214,9 +10148,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1948 - }, - "glConservativeRasterParameterfNV" + 1947 + }, + "glConservativeRasterParameterfNV" )) || reportMissing("GL", "GL_NV_conservative_raster_dilate"); } @@ -10226,9 +10160,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1949 - }, - "glConservativeRasterParameteriNV" + 1948 + }, + "glConservativeRasterParameteriNV" )) || reportMissing("GL", "GL_NV_conservative_raster_pre_snap_triangles"); } @@ -10238,9 +10172,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1950 - }, - "glCopyImageSubDataNV" + 1949 + }, + "glCopyImageSubDataNV" )) || reportMissing("GL", "GL_NV_copy_image"); } @@ -10250,9 +10184,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1951, 1952, 1953 - }, - "glDepthRangedNV", "glClearDepthdNV", "glDepthBoundsdNV" + 1950, 1951, 1952 + }, + "glDepthRangedNV", "glClearDepthdNV", "glDepthBoundsdNV" )) || reportMissing("GL", "GL_NV_depth_buffer_float"); } @@ -10262,9 +10196,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1954 - }, - "glDrawTextureNV" + 1953 + }, + "glDrawTextureNV" )) || reportMissing("GL", "GL_NV_draw_texture"); } @@ -10274,9 +10208,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1955, 1956, 1957, 1958, 1959 - }, - "glDrawVkImageNV", "glGetVkProcAddrNV", "glWaitVkSemaphoreNV", "glSignalVkSemaphoreNV", "glSignalVkFenceNV" + 1954, 1955, 1956, 1957, 1958 + }, + "glDrawVkImageNV", "glGetVkProcAddrNV", "glWaitVkSemaphoreNV", "glSignalVkSemaphoreNV", "glSignalVkFenceNV" )) || reportMissing("GL", "GL_NV_draw_vulkan_image"); } @@ -10286,9 +10220,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1960, 1961, 1962 - }, - "glGetMultisamplefvNV", "glSampleMaskIndexedNV", "glTexRenderbufferNV" + 1959, 1960, 1961 + }, + "glGetMultisamplefvNV", "glSampleMaskIndexedNV", "glTexRenderbufferNV" )) || reportMissing("GL", "GL_NV_explicit_multisample"); } @@ -10298,9 +10232,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1963, 1964, 1965, 1966, 1967, 1968, 1969 - }, - "glDeleteFencesNV", "glGenFencesNV", "glIsFenceNV", "glTestFenceNV", "glGetFenceivNV", "glFinishFenceNV", "glSetFenceNV" + 1962, 1963, 1964, 1965, 1966, 1967, 1968 + }, + "glDeleteFencesNV", "glGenFencesNV", "glIsFenceNV", "glTestFenceNV", "glGetFenceivNV", "glFinishFenceNV", "glSetFenceNV" )) || reportMissing("GL", "GL_NV_fence"); } @@ -10310,9 +10244,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1970 - }, - "glFragmentCoverageColorNV" + 1969 + }, + "glFragmentCoverageColorNV" )) || reportMissing("GL", "GL_NV_fragment_coverage_to_color"); } @@ -10322,9 +10256,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1818, 1971, 1972, 1973 - }, - "glRasterSamplesEXT", "glCoverageModulationTableNV", "glGetCoverageModulationTableNV", "glCoverageModulationNV" + 1817, 1970, 1971, 1972 + }, + "glRasterSamplesEXT", "glCoverageModulationTableNV", "glGetCoverageModulationTableNV", "glCoverageModulationNV" )) || reportMissing("GL", "GL_NV_framebuffer_mixed_samples"); } @@ -10334,9 +10268,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1974 - }, - "glRenderbufferStorageMultisampleCoverageNV" + 1973 + }, + "glRenderbufferStorageMultisampleCoverageNV" )) || reportMissing("GL", "GL_NV_framebuffer_multisample_coverage"); } @@ -10346,11 +10280,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986 - }, - "glRenderGpuMaskNV", "glMulticastBufferSubDataNV", "glMulticastCopyBufferSubDataNV", "glMulticastCopyImageSubDataNV", - "glMulticastBlitFramebufferNV", "glMulticastFramebufferSampleLocationsfvNV", "glMulticastBarrierNV", "glMulticastWaitSyncNV", - "glMulticastGetQueryObjectivNV", "glMulticastGetQueryObjectuivNV", "glMulticastGetQueryObjecti64vNV", "glMulticastGetQueryObjectui64vNV" + 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985 + }, + "glRenderGpuMaskNV", "glMulticastBufferSubDataNV", "glMulticastCopyBufferSubDataNV", "glMulticastCopyImageSubDataNV", + "glMulticastBlitFramebufferNV", "glMulticastFramebufferSampleLocationsfvNV", "glMulticastBarrierNV", "glMulticastWaitSyncNV", + "glMulticastGetQueryObjectivNV", "glMulticastGetQueryObjectuivNV", "glMulticastGetQueryObjecti64vNV", "glMulticastGetQueryObjectui64vNV" )) || reportMissing("GL", "GL_NV_gpu_multicast"); } @@ -10362,16 +10296,16 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_EXT_direct_state_access") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, flag0 + 1076, flag0 + 1077, - flag0 + 1078, flag0 + 1079, flag0 + 1080, flag0 + 1081, flag0 + 1082, flag0 + 1083, flag0 + 1084, flag0 + 1085, flag0 + 1086, flag0 + 1087, - flag0 + 1088, flag0 + 1089, flag0 + 1090, flag0 + 1091 - }, - "glUniform1i64NV", "glUniform2i64NV", "glUniform3i64NV", "glUniform4i64NV", "glUniform1i64vNV", "glUniform2i64vNV", "glUniform3i64vNV", - "glUniform4i64vNV", "glUniform1ui64NV", "glUniform2ui64NV", "glUniform3ui64NV", "glUniform4ui64NV", "glUniform1ui64vNV", "glUniform2ui64vNV", - "glUniform3ui64vNV", "glUniform4ui64vNV", "glGetUniformi64vNV", "glGetUniformui64vNV", "glProgramUniform1i64NV", "glProgramUniform2i64NV", - "glProgramUniform3i64NV", "glProgramUniform4i64NV", "glProgramUniform1i64vNV", "glProgramUniform2i64vNV", "glProgramUniform3i64vNV", - "glProgramUniform4i64vNV", "glProgramUniform1ui64NV", "glProgramUniform2ui64NV", "glProgramUniform3ui64NV", "glProgramUniform4ui64NV", - "glProgramUniform1ui64vNV", "glProgramUniform2ui64vNV", "glProgramUniform3ui64vNV", "glProgramUniform4ui64vNV" + 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, flag0 + 1076, flag0 + 1077, + flag0 + 1078, flag0 + 1079, flag0 + 1080, flag0 + 1081, flag0 + 1082, flag0 + 1083, flag0 + 1084, flag0 + 1085, flag0 + 1086, flag0 + 1087, + flag0 + 1088, flag0 + 1089, flag0 + 1090, flag0 + 1091 + }, + "glUniform1i64NV", "glUniform2i64NV", "glUniform3i64NV", "glUniform4i64NV", "glUniform1i64vNV", "glUniform2i64vNV", "glUniform3i64vNV", + "glUniform4i64vNV", "glUniform1ui64NV", "glUniform2ui64NV", "glUniform3ui64NV", "glUniform4ui64NV", "glUniform1ui64vNV", "glUniform2ui64vNV", + "glUniform3ui64vNV", "glUniform4ui64vNV", "glGetUniformi64vNV", "glGetUniformui64vNV", "glProgramUniform1i64NV", "glProgramUniform2i64NV", + "glProgramUniform3i64NV", "glProgramUniform4i64NV", "glProgramUniform1i64vNV", "glProgramUniform2i64vNV", "glProgramUniform3i64vNV", + "glProgramUniform4i64vNV", "glProgramUniform1ui64NV", "glProgramUniform2ui64NV", "glProgramUniform3ui64NV", "glProgramUniform4ui64NV", + "glProgramUniform1ui64vNV", "glProgramUniform2ui64vNV", "glProgramUniform3ui64vNV", "glProgramUniform4ui64vNV" )) || reportMissing("GL", "GL_NV_gpu_shader5"); } @@ -10386,17 +10320,17 @@ public final class GLCapabilities { int flag6 = ext.contains("GL_NV_vertex_program") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - 2011, 2012, 2013, 2014, flag0 + 2015, flag0 + 2016, flag2 + 2017, flag2 + 2018, flag4 + 2019, flag4 + 2020, flag6 + 2021, flag6 + 2022, - flag6 + 2023, flag6 + 2024, flag6 + 2025, flag6 + 2026, flag6 + 2027, flag6 + 2028, flag6 + 2029, flag6 + 2030, flag6 + 2031, flag6 + 2032 - }, - "glVertex2hNV", "glVertex2hvNV", "glVertex3hNV", "glVertex3hvNV", "glVertex4hNV", "glVertex4hvNV", "glNormal3hNV", "glNormal3hvNV", "glColor3hNV", - "glColor3hvNV", "glColor4hNV", "glColor4hvNV", "glTexCoord1hNV", "glTexCoord1hvNV", "glTexCoord2hNV", "glTexCoord2hvNV", "glTexCoord3hNV", - "glTexCoord3hvNV", "glTexCoord4hNV", "glTexCoord4hvNV", "glMultiTexCoord1hNV", "glMultiTexCoord1hvNV", "glMultiTexCoord2hNV", - "glMultiTexCoord2hvNV", "glMultiTexCoord3hNV", "glMultiTexCoord3hvNV", "glMultiTexCoord4hNV", "glMultiTexCoord4hvNV", "glFogCoordhNV", - "glFogCoordhvNV", "glSecondaryColor3hNV", "glSecondaryColor3hvNV", "glVertexWeighthNV", "glVertexWeighthvNV", "glVertexAttrib1hNV", - "glVertexAttrib1hvNV", "glVertexAttrib2hNV", "glVertexAttrib2hvNV", "glVertexAttrib3hNV", "glVertexAttrib3hvNV", "glVertexAttrib4hNV", - "glVertexAttrib4hvNV", "glVertexAttribs1hvNV", "glVertexAttribs2hvNV", "glVertexAttribs3hvNV", "glVertexAttribs4hvNV" + 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010, 2011, 2012, 2013, flag0 + 2014, flag0 + 2015, flag2 + 2016, flag2 + 2017, flag4 + 2018, flag4 + 2019, flag6 + 2020, flag6 + 2021, + flag6 + 2022, flag6 + 2023, flag6 + 2024, flag6 + 2025, flag6 + 2026, flag6 + 2027, flag6 + 2028, flag6 + 2029, flag6 + 2030, flag6 + 2031 + }, + "glVertex2hNV", "glVertex2hvNV", "glVertex3hNV", "glVertex3hvNV", "glVertex4hNV", "glVertex4hvNV", "glNormal3hNV", "glNormal3hvNV", "glColor3hNV", + "glColor3hvNV", "glColor4hNV", "glColor4hvNV", "glTexCoord1hNV", "glTexCoord1hvNV", "glTexCoord2hNV", "glTexCoord2hvNV", "glTexCoord3hNV", + "glTexCoord3hvNV", "glTexCoord4hNV", "glTexCoord4hvNV", "glMultiTexCoord1hNV", "glMultiTexCoord1hvNV", "glMultiTexCoord2hNV", + "glMultiTexCoord2hvNV", "glMultiTexCoord3hNV", "glMultiTexCoord3hvNV", "glMultiTexCoord4hNV", "glMultiTexCoord4hvNV", "glFogCoordhNV", + "glFogCoordhvNV", "glSecondaryColor3hNV", "glSecondaryColor3hvNV", "glVertexWeighthNV", "glVertexWeighthvNV", "glVertexAttrib1hNV", + "glVertexAttrib1hvNV", "glVertexAttrib2hNV", "glVertexAttrib2hvNV", "glVertexAttrib3hNV", "glVertexAttrib3hvNV", "glVertexAttrib4hNV", + "glVertexAttrib4hvNV", "glVertexAttribs1hvNV", "glVertexAttribs2hvNV", "glVertexAttribs3hvNV", "glVertexAttribs4hvNV" )) || reportMissing("GL", "GL_NV_half_float"); } @@ -10406,9 +10340,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2033 - }, - "glGetInternalformatSampleivNV" + 2032 + }, + "glGetInternalformatSampleivNV" )) || reportMissing("GL", "GL_NV_internalformat_sample_query"); } @@ -10420,10 +10354,10 @@ public final class GLCapabilities { int flag0 = hasDSA(ext) ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 2034, 2035, 2036, 2037, flag0 + 2038, flag0 + 2039 - }, - "glGetMemoryObjectDetachedResourcesuivNV", "glResetMemoryObjectParameterNV", "glTexAttachMemoryNV", "glBufferAttachMemoryNV", - "glTextureAttachMemoryNV", "glNamedBufferAttachMemoryNV" + 2033, 2034, 2035, 2036, flag0 + 2037, flag0 + 2038 + }, + "glGetMemoryObjectDetachedResourcesuivNV", "glResetMemoryObjectParameterNV", "glTexAttachMemoryNV", "glBufferAttachMemoryNV", + "glTextureAttachMemoryNV", "glNamedBufferAttachMemoryNV" )) || reportMissing("GL", "GL_NV_memory_attachment"); } @@ -10433,9 +10367,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2040, 2041, 2042, 2043 - }, - "glBufferPageCommitmentMemNV", "glNamedBufferPageCommitmentMemNV", "glTexPageCommitmentMemNV", "glTexturePageCommitmentMemNV" + 2039, 2040, 2041, 2042 + }, + "glBufferPageCommitmentMemNV", "glNamedBufferPageCommitmentMemNV", "glTexPageCommitmentMemNV", "glTexturePageCommitmentMemNV" )) || reportMissing("GL", "GL_NV_memory_object_sparse"); } @@ -10445,9 +10379,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2044, 2045, 2046, 2047 - }, - "glDrawMeshTasksNV", "glDrawMeshTasksIndirectNV", "glMultiDrawMeshTasksIndirectNV", "glMultiDrawMeshTasksIndirectCountNV" + 2043, 2044, 2045, 2046 + }, + "glDrawMeshTasksNV", "glDrawMeshTasksIndirectNV", "glMultiDrawMeshTasksIndirectNV", "glMultiDrawMeshTasksIndirectCountNV" )) || reportMissing("GL", "GL_NV_mesh_shader"); } @@ -10457,16 +10391,16 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2057, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, - 2075, 2079, 2080, 2081, 2082, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2101, 2102, 2103, 2104 - }, - "glPathCommandsNV", "glPathCoordsNV", "glPathSubCommandsNV", "glPathSubCoordsNV", "glPathStringNV", "glPathGlyphsNV", "glPathGlyphRangeNV", - "glCopyPathNV", "glInterpolatePathsNV", "glTransformPathNV", "glPathParameterivNV", "glPathParameteriNV", "glPathParameterfvNV", - "glPathParameterfNV", "glPathDashArrayNV", "glGenPathsNV", "glDeletePathsNV", "glIsPathNV", "glPathStencilFuncNV", "glPathStencilDepthOffsetNV", - "glStencilFillPathNV", "glStencilStrokePathNV", "glStencilFillPathInstancedNV", "glStencilStrokePathInstancedNV", "glPathCoverDepthFuncNV", - "glCoverFillPathNV", "glCoverStrokePathNV", "glCoverFillPathInstancedNV", "glCoverStrokePathInstancedNV", "glGetPathParameterivNV", - "glGetPathParameterfvNV", "glGetPathCommandsNV", "glGetPathCoordsNV", "glGetPathDashArrayNV", "glGetPathMetricsNV", "glGetPathMetricRangeNV", - "glGetPathSpacingNV", "glIsPointInFillPathNV", "glIsPointInStrokePathNV", "glGetPathLengthNV", "glPointAlongPathNV" + 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2056, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, + 2074, 2078, 2079, 2080, 2081, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2100, 2101, 2102, 2103 + }, + "glPathCommandsNV", "glPathCoordsNV", "glPathSubCommandsNV", "glPathSubCoordsNV", "glPathStringNV", "glPathGlyphsNV", "glPathGlyphRangeNV", + "glCopyPathNV", "glInterpolatePathsNV", "glTransformPathNV", "glPathParameterivNV", "glPathParameteriNV", "glPathParameterfvNV", + "glPathParameterfNV", "glPathDashArrayNV", "glGenPathsNV", "glDeletePathsNV", "glIsPathNV", "glPathStencilFuncNV", "glPathStencilDepthOffsetNV", + "glStencilFillPathNV", "glStencilStrokePathNV", "glStencilFillPathInstancedNV", "glStencilStrokePathInstancedNV", "glPathCoverDepthFuncNV", + "glCoverFillPathNV", "glCoverStrokePathNV", "glCoverFillPathInstancedNV", "glCoverStrokePathInstancedNV", "glGetPathParameterivNV", + "glGetPathParameterfvNV", "glGetPathCommandsNV", "glGetPathCoordsNV", "glGetPathDashArrayNV", "glGetPathMetricsNV", "glGetPathMetricRangeNV", + "glGetPathSpacingNV", "glIsPointInFillPathNV", "glIsPointInStrokePathNV", "glGetPathLengthNV", "glPointAlongPathNV" )) || reportMissing("GL", "GL_NV_path_rendering"); } @@ -10476,9 +10410,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2112, 2113 - }, - "glPixelDataRangeNV", "glFlushPixelDataRangeNV" + 2111, 2112 + }, + "glPixelDataRangeNV", "glFlushPixelDataRangeNV" )) || reportMissing("GL", "GL_NV_pixel_data_range"); } @@ -10488,9 +10422,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2114, 2115 - }, - "glPointParameteriNV", "glPointParameterivNV" + 2113, 2114 + }, + "glPointParameteriNV", "glPointParameterivNV" )) || reportMissing("GL", "GL_NV_point_sprite"); } @@ -10500,9 +10434,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2116, 2117 - }, - "glPrimitiveRestartNV", "glPrimitiveRestartIndexNV" + 2115, 2116 + }, + "glPrimitiveRestartNV", "glPrimitiveRestartIndexNV" )) || reportMissing("GL", "GL_NV_primitive_restart"); } @@ -10512,9 +10446,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2118 - }, - "glQueryResourceNV" + 2117 + }, + "glQueryResourceNV" )) || reportMissing("GL", "GL_NV_query_resource"); } @@ -10524,9 +10458,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2119, 2120, 2121 - }, - "glGenQueryResourceTagNV", "glDeleteQueryResourceTagNV", "glQueryResourceTagNV" + 2118, 2119, 2120 + }, + "glGenQueryResourceTagNV", "glDeleteQueryResourceTagNV", "glQueryResourceTagNV" )) || reportMissing("GL", "GL_NV_query_resource_tag"); } @@ -10536,9 +10470,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2122, 2123, 2124 - }, - "glFramebufferSampleLocationsfvNV", "glNamedFramebufferSampleLocationsfvNV", "glResolveDepthValuesNV" + 2121, 2122, 2123 + }, + "glFramebufferSampleLocationsfvNV", "glNamedFramebufferSampleLocationsfvNV", "glResolveDepthValuesNV" )) || reportMissing("GL", "GL_NV_sample_locations"); } @@ -10548,9 +10482,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2125, 2126 - }, - "glScissorExclusiveArrayvNV", "glScissorExclusiveNV" + 2124, 2125 + }, + "glScissorExclusiveArrayvNV", "glScissorExclusiveNV" )) || reportMissing("GL", "GL_NV_scissor_exclusive"); } @@ -10560,11 +10494,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 1075, 2138, 2139 - }, - "glMakeBufferResidentNV", "glMakeBufferNonResidentNV", "glIsBufferResidentNV", "glMakeNamedBufferResidentNV", "glMakeNamedBufferNonResidentNV", - "glIsNamedBufferResidentNV", "glGetBufferParameterui64vNV", "glGetNamedBufferParameterui64vNV", "glGetIntegerui64vNV", "glUniformui64NV", - "glUniformui64vNV", "glGetUniformui64vNV", "glProgramUniformui64NV", "glProgramUniformui64vNV" + 2126, 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 1075, 2137, 2138 + }, + "glMakeBufferResidentNV", "glMakeBufferNonResidentNV", "glIsBufferResidentNV", "glMakeNamedBufferResidentNV", "glMakeNamedBufferNonResidentNV", + "glIsNamedBufferResidentNV", "glGetBufferParameterui64vNV", "glGetNamedBufferParameterui64vNV", "glGetIntegerui64vNV", "glUniformui64NV", + "glUniformui64vNV", "glGetUniformui64vNV", "glProgramUniformui64NV", "glProgramUniformui64vNV" )) || reportMissing("GL", "GL_NV_shader_buffer_load"); } @@ -10574,10 +10508,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2140, 2141, 2142, 2143, 2144, 2145, 2146 - }, - "glBindShadingRateImageNV", "glShadingRateImagePaletteNV", "glGetShadingRateImagePaletteNV", "glShadingRateImageBarrierNV", - "glShadingRateSampleOrderNV", "glShadingRateSampleOrderCustomNV", "glGetShadingRateSampleLocationivNV" + 2139, 2140, 2141, 2142, 2143, 2144, 2145 + }, + "glBindShadingRateImageNV", "glShadingRateImagePaletteNV", "glGetShadingRateImagePaletteNV", "glShadingRateImageBarrierNV", + "glShadingRateSampleOrderNV", "glShadingRateSampleOrderCustomNV", "glGetShadingRateSampleLocationivNV" )) || reportMissing("GL", "GL_NV_shading_rate_image"); } @@ -10587,9 +10521,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2147 - }, - "glTextureBarrierNV" + 2146 + }, + "glTextureBarrierNV" )) || reportMissing("GL", "GL_NV_texture_barrier"); } @@ -10599,10 +10533,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2148, 2149, 2150, 2151, 2152, 2153 - }, - "glTexImage2DMultisampleCoverageNV", "glTexImage3DMultisampleCoverageNV", "glTextureImage2DMultisampleNV", "glTextureImage3DMultisampleNV", - "glTextureImage2DMultisampleCoverageNV", "glTextureImage3DMultisampleCoverageNV" + 2147, 2148, 2149, 2150, 2151, 2152 + }, + "glTexImage2DMultisampleCoverageNV", "glTexImage3DMultisampleCoverageNV", "glTextureImage2DMultisampleNV", "glTextureImage3DMultisampleNV", + "glTextureImage2DMultisampleCoverageNV", "glTextureImage3DMultisampleCoverageNV" )) || reportMissing("GL", "GL_NV_texture_multisample"); } @@ -10612,9 +10546,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2154, 2155, 2156 - }, - "glCreateSemaphoresNV", "glSemaphoreParameterivNV", "glGetSemaphoreParameterivNV" + 2153, 2154, 2155 + }, + "glCreateSemaphoresNV", "glSemaphoreParameterivNV", "glGetSemaphoreParameterivNV" )) || reportMissing("GL", "GL_NV_timeline_semaphore"); } @@ -10624,11 +10558,11 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168 - }, - "glBeginTransformFeedbackNV", "glEndTransformFeedbackNV", "glTransformFeedbackAttribsNV", "glBindBufferRangeNV", "glBindBufferOffsetNV", - "glBindBufferBaseNV", "glTransformFeedbackVaryingsNV", "glActiveVaryingNV", "glGetVaryingLocationNV", "glGetActiveVaryingNV", - "glGetTransformFeedbackVaryingNV", "glTransformFeedbackStreamAttribsNV" + 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167 + }, + "glBeginTransformFeedbackNV", "glEndTransformFeedbackNV", "glTransformFeedbackAttribsNV", "glBindBufferRangeNV", "glBindBufferOffsetNV", + "glBindBufferBaseNV", "glTransformFeedbackVaryingsNV", "glActiveVaryingNV", "glGetVaryingLocationNV", "glGetActiveVaryingNV", + "glGetTransformFeedbackVaryingNV", "glTransformFeedbackStreamAttribsNV" )) || reportMissing("GL", "GL_NV_transform_feedback"); } @@ -10638,10 +10572,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2169, 2170, 2171, 2172, 2173, 2174, 2175 - }, - "glBindTransformFeedbackNV", "glDeleteTransformFeedbacksNV", "glGenTransformFeedbacksNV", "glIsTransformFeedbackNV", "glPauseTransformFeedbackNV", - "glResumeTransformFeedbackNV", "glDrawTransformFeedbackNV" + 2168, 2169, 2170, 2171, 2172, 2173, 2174 + }, + "glBindTransformFeedbackNV", "glDeleteTransformFeedbacksNV", "glGenTransformFeedbacksNV", "glIsTransformFeedbackNV", "glPauseTransformFeedbackNV", + "glResumeTransformFeedbackNV", "glDrawTransformFeedbackNV" )) || reportMissing("GL", "GL_NV_transform_feedback2"); } @@ -10651,9 +10585,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2176, 2177 - }, - "glVertexArrayRangeNV", "glFlushVertexArrayRangeNV" + 2175, 2176 + }, + "glVertexArrayRangeNV", "glFlushVertexArrayRangeNV" )) || reportMissing("GL", "GL_NV_vertex_array_range"); } @@ -10665,12 +10599,12 @@ public final class GLCapabilities { int flag0 = ext.contains("GL_NV_vertex_buffer_unified_memory") ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, flag0 + 2196 - }, - "glVertexAttribL1i64NV", "glVertexAttribL2i64NV", "glVertexAttribL3i64NV", "glVertexAttribL4i64NV", "glVertexAttribL1i64vNV", - "glVertexAttribL2i64vNV", "glVertexAttribL3i64vNV", "glVertexAttribL4i64vNV", "glVertexAttribL1ui64NV", "glVertexAttribL2ui64NV", - "glVertexAttribL3ui64NV", "glVertexAttribL4ui64NV", "glVertexAttribL1ui64vNV", "glVertexAttribL2ui64vNV", "glVertexAttribL3ui64vNV", - "glVertexAttribL4ui64vNV", "glGetVertexAttribLi64vNV", "glGetVertexAttribLui64vNV", "glVertexAttribLFormatNV" + 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, flag0 + 2195 + }, + "glVertexAttribL1i64NV", "glVertexAttribL2i64NV", "glVertexAttribL3i64NV", "glVertexAttribL4i64NV", "glVertexAttribL1i64vNV", + "glVertexAttribL2i64vNV", "glVertexAttribL3i64vNV", "glVertexAttribL4i64vNV", "glVertexAttribL1ui64NV", "glVertexAttribL2ui64NV", + "glVertexAttribL3ui64NV", "glVertexAttribL4ui64NV", "glVertexAttribL1ui64vNV", "glVertexAttribL2ui64vNV", "glVertexAttribL3ui64vNV", + "glVertexAttribL4ui64vNV", "glGetVertexAttribLi64vNV", "glGetVertexAttribLui64vNV", "glVertexAttribLFormatNV" )) || reportMissing("GL", "GL_NV_vertex_attrib_integer_64bit"); } @@ -10680,10 +10614,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208 - }, - "glBufferAddressRangeNV", "glVertexFormatNV", "glNormalFormatNV", "glColorFormatNV", "glIndexFormatNV", "glTexCoordFormatNV", "glEdgeFlagFormatNV", - "glSecondaryColorFormatNV", "glFogCoordFormatNV", "glVertexAttribFormatNV", "glVertexAttribIFormatNV", "glGetIntegerui64i_vNV" + 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207 + }, + "glBufferAddressRangeNV", "glVertexFormatNV", "glNormalFormatNV", "glColorFormatNV", "glIndexFormatNV", "glTexCoordFormatNV", "glEdgeFlagFormatNV", + "glSecondaryColorFormatNV", "glFogCoordFormatNV", "glVertexAttribFormatNV", "glVertexAttribIFormatNV", "glGetIntegerui64i_vNV" )) || reportMissing("GL", "GL_NV_vertex_buffer_unified_memory"); } @@ -10693,9 +10627,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2209 - }, - "glViewportSwizzleNV" + 2208 + }, + "glViewportSwizzleNV" )) || reportMissing("GL", "GL_NV_viewport_swizzle"); } @@ -10705,9 +10639,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2210, 2211 - }, - "glBeginConditionalRenderNVX", "glEndConditionalRenderNVX" + 2209, 2210 + }, + "glBeginConditionalRenderNVX", "glEndConditionalRenderNVX" )) || reportMissing("GL", "GL_NVX_conditional_render"); } @@ -10717,10 +10651,10 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2212, 2213, 2214, 2215, 2216, 2217 - }, - "glAsyncCopyImageSubDataNVX", "glAsyncCopyBufferSubDataNVX", "glUploadGpuMaskNVX", "glMulticastViewportArrayvNVX", "glMulticastScissorArrayvNVX", - "glMulticastViewportPositionWScaleNVX" + 2211, 2212, 2213, 2214, 2215, 2216 + }, + "glAsyncCopyImageSubDataNVX", "glAsyncCopyBufferSubDataNVX", "glUploadGpuMaskNVX", "glMulticastViewportArrayvNVX", "glMulticastScissorArrayvNVX", + "glMulticastViewportPositionWScaleNVX" )) || reportMissing("GL", "GL_NVX_gpu_multicast2"); } @@ -10730,9 +10664,9 @@ public final class GLCapabilities { } return (checkFunctions(provider, caps, new int[] { - 2218, 2219, 2220, 2221 - }, - "glCreateProgressFenceNVX", "glSignalSemaphoreui64NVX", "glWaitSemaphoreui64NVX", "glClientWaitSemaphoreui64NVX" + 2217, 2218, 2219, 2220 + }, + "glCreateProgressFenceNVX", "glSignalSemaphoreui64NVX", "glWaitSemaphoreui64NVX", "glClientWaitSemaphoreui64NVX" )) || reportMissing("GL", "GL_NVX_progress_fence"); } @@ -10744,9 +10678,9 @@ public final class GLCapabilities { int flag0 = hasDSA(ext) ? 0 : Integer.MIN_VALUE; return (checkFunctions(provider, caps, new int[] { - 2222, flag0 + 2223 - }, - "glFramebufferTextureMultiviewOVR", "glNamedFramebufferTextureMultiviewOVR" + 2221, flag0 + 2222 + }, + "glFramebufferTextureMultiviewOVR", "glNamedFramebufferTextureMultiviewOVR" )) || reportMissing("GL", "GL_OVR_multiview"); } @@ -10777,4 +10711,4 @@ public final class GLCapabilities { private static boolean ARB_multi_bind(Set ext) { return ext.contains("OpenGL44") || ext.contains("GL_ARB_multi_bind"); } private static boolean ARB_query_buffer_object(Set ext) { return ext.contains("OpenGL44") || ext.contains("GL_ARB_query_buffer_object"); } -} +} \ No newline at end of file diff --git a/LWJGL/libs/asm-debug-all.jar b/LWJGL/libs/asm-debug-all.jar deleted file mode 100644 index d5aa15e0..00000000 Binary files a/LWJGL/libs/asm-debug-all.jar and /dev/null differ diff --git a/LWJGL/libs/cacio.jar b/LWJGL/libs/cacio.jar deleted file mode 100644 index ddb85761..00000000 Binary files a/LWJGL/libs/cacio.jar and /dev/null differ diff --git a/LWJGL/libs/fake-vulkan-module.jar b/LWJGL/libs/fake-vulkan-module.jar deleted file mode 100644 index f9eaecfd..00000000 Binary files a/LWJGL/libs/fake-vulkan-module.jar and /dev/null differ diff --git a/LWJGL/libs/jinput.jar b/LWJGL/libs/jinput.jar deleted file mode 100644 index 7c2b6b06..00000000 Binary files a/LWJGL/libs/jinput.jar and /dev/null differ diff --git a/LWJGL/src/main/java/org/lwjgl/BufferChecks.java b/LWJGL/src/main/java/org/lwjgl/BufferChecks.java deleted file mode 100644 index a0707f18..00000000 --- a/LWJGL/src/main/java/org/lwjgl/BufferChecks.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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; - -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.LongBuffer; -import java.nio.ShortBuffer; - -/** - *

    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$ - */ -public class BufferChecks { - /** Static methods only! */ - private BufferChecks() { - } - - /** - * Helper methods to ensure a function pointer is not-null (0) - */ - public static void checkFunctionAddress(long pointer) { - if (LWJGLUtil.CHECKS && pointer == 0) { - throw new IllegalStateException("Function is not supported"); - } - } - - /** - * Helper methods to ensure a ByteBuffer is null-terminated - */ - public static void checkNullTerminated(ByteBuffer buf) { - if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - public static void checkNullTerminated(ByteBuffer buf, int count) { - if ( LWJGLUtil.CHECKS ) { - int nullFound = 0; - for ( int i = buf.position(); i < buf.limit(); i++ ) { - if ( buf.get(i) == 0 ) - nullFound++; - } - - if ( nullFound < count ) - throw new IllegalArgumentException("Missing null termination"); - } - } - - /** Helper method to ensure an IntBuffer is null-terminated */ - public static void checkNullTerminated(IntBuffer buf) { - if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0 ) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - /** Helper method to ensure a LongBuffer is null-terminated */ - public static void checkNullTerminated(LongBuffer buf) { - if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0 ) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - /** Helper method to ensure a PointerBuffer is null-terminated */ - public static void checkNullTerminated(PointerBuffer buf) { - if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0 ) { - throw new IllegalArgumentException("Missing null termination"); - } - } - - public static void checkNotNull(Object o) { - if ( LWJGLUtil.CHECKS && o == null) - throw new IllegalArgumentException("Null argument"); - } - - /** - * Helper methods to ensure a buffer is direct (and, implicitly, non-null). - */ - public static void checkDirect(ByteBuffer buf) { - if ( LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("ByteBuffer is not direct"); - } - } - - public static void checkDirect(ShortBuffer buf) { - if ( LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("ShortBuffer is not direct"); - } - } - - public static void checkDirect(IntBuffer buf) { - if ( LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("IntBuffer is not direct"); - } - } - - public static void checkDirect(LongBuffer buf) { - if ( LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("LongBuffer is not direct"); - } - } - - public static void checkDirect(FloatBuffer buf) { - if ( LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("FloatBuffer is not direct"); - } - } - - public static void checkDirect(DoubleBuffer buf) { - if ( LWJGLUtil.CHECKS && !buf.isDirect()) { - throw new IllegalArgumentException("DoubleBuffer is not direct"); - } - } - - public static void checkDirect(PointerBuffer buf) { - // NO-OP, PointerBuffer is always direct. - } - - public static void checkArray(Object[] array) { - if ( LWJGLUtil.CHECKS && (array == null || array.length == 0) ) - throw new IllegalArgumentException("Invalid array"); - } - - /** - * This is a separate call to help inline checkBufferSize. - */ - 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 + " elements is required, regardless of actual returned element count"); - } - - private static void throwBufferSizeException(PointerBuffer buf, int size) { - throw new IllegalArgumentException("Number of remaining pointer buffer elements is " + buf.remaining() + ", must be at least " + size); - } - - private static void throwArraySizeException(Object[] array, int size) { - throw new IllegalArgumentException("Number of array elements is " + array.length + ", must be at least " + size); - } - - private static void throwArraySizeException(long[] array, int size) { - throw new IllegalArgumentException("Number of array elements is " + array.length + ", must be at least " + size); - } - - /** - * 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 - * @throws IllegalArgumentException - */ - public static void checkBufferSize(Buffer buf, int size) { - if ( LWJGLUtil.CHECKS && buf.remaining() < size) { - throwBufferSizeException(buf, size); - } - } - - /** - * 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 - * - * @return the buffer position in bytes - */ - public static int checkBuffer(final Buffer buffer, final int size) { - final int posShift; - if ( buffer instanceof ByteBuffer ) { - BufferChecks.checkBuffer((ByteBuffer)buffer, size); - posShift = 0; - } else if ( buffer instanceof ShortBuffer ) { - BufferChecks.checkBuffer((ShortBuffer)buffer, size); - posShift = 1; - } else if ( buffer instanceof IntBuffer ) { - BufferChecks.checkBuffer((IntBuffer)buffer, size); - posShift = 2; - } else if ( buffer instanceof LongBuffer ) { - BufferChecks.checkBuffer((LongBuffer)buffer, size); - posShift = 4; - } else if ( buffer instanceof FloatBuffer ) { - BufferChecks.checkBuffer((FloatBuffer)buffer, size); - posShift = 2; - } else if ( buffer instanceof DoubleBuffer ) { - BufferChecks.checkBuffer((DoubleBuffer)buffer, size); - posShift = 4; - } else - throw new IllegalArgumentException("Unsupported Buffer type specified: " + buffer.getClass()); - - return buffer.position() << posShift; - } - - public static void checkBuffer(ByteBuffer buf, int size) { - if ( LWJGLUtil.CHECKS ) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(ShortBuffer buf, int size) { - if ( LWJGLUtil.CHECKS ) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(IntBuffer buf, int size) { - if ( LWJGLUtil.CHECKS ) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(LongBuffer buf, int size) { - if ( LWJGLUtil.CHECKS ) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(FloatBuffer buf, int size) { - if ( LWJGLUtil.CHECKS ) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(DoubleBuffer buf, int size) { - if ( LWJGLUtil.CHECKS ) { - checkBufferSize(buf, size); - checkDirect(buf); - } - } - - public static void checkBuffer(PointerBuffer buf, int size) { - if ( LWJGLUtil.CHECKS && buf.remaining() < size ) { - throwBufferSizeException(buf, size); - } - } - - public static void checkArray(Object[] array, int size) { - if ( LWJGLUtil.CHECKS && array.length < size ) - throwArraySizeException(array, size); - } - - public static void checkArray(long[] array, int size) { - if ( LWJGLUtil.CHECKS && array.length < size ) - throwArraySizeException(array, size); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/BufferUtils.java b/LWJGL/src/main/java/org/lwjgl/BufferUtils.java deleted file mode 100644 index 52421530..00000000 --- a/LWJGL/src/main/java/org/lwjgl/BufferUtils.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl; - -import org.lwjgl.system.*; - -import java.nio.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    This class makes it easy and safe to work with direct buffers. It is the recommended way to allocate memory to use with LWJGL.

    - * - *

    Direct buffers

    - * - *

    LWJGL requires that all NIO buffers passed to it are direct buffers. Direct buffers essentially wrap an address that points to off-heap memory, i.e. a - * native pointer. This is the only way LWJGL can safely pass data from Java code to native code, and vice-versa, without a performance penalty. It does not - * support on-heap Java arrays (or plain NIO buffers, which wrap them) because arrays may be moved around in memory by the JVM's garbage collector while native - * code is accessing them. In addition, Java arrays have an unspecified layout, i.e. they are not necessarily contiguous in memory.

    - * - *

    Usage

    - * - *

    When a direct buffer is passed as an argument to an LWJGL method, no data is copied. Instead, the current buffer position is added to the buffer's memory - * address and the resulting value is passed to native code. The native code interprets that value as a pointer and reads or copies from it as necessary. LWJGL - * will often also use the current buffer limit (via {@link Buffer#remaining()}) to automatically pass length/maxlength arguments. This means that, just like - * other APIs that use NIO buffers, the current {@link Buffer#position()} and {@link Buffer#limit()} at the time of the call is very important. Contrary to - * other APIs, LWJGL never modifies the current position, it will be the same value before and after the call.

    - * - *

    Arrays of pointers

    - * - *

    In addition to the standard NIO buffer classes, LWJGL provides a {@link PointerBuffer} class for storing pointer data in an architecture independent way. - * It is used in bindings for pointer-to-pointers arguments, usually to provide arrays of data (input parameter) or to store returned pointer values (output - * parameter). Also, there's the {@link CLongBuffer} class which is similar to {@code PointerBuffer}, but for C {@code long} data.

    - * - *

    Memory management

    - * - *

    Using NIO buffers for off-heap memory has some drawbacks:

    - *
      - *
    • Memory blocks bigger than {@link Integer#MAX_VALUE} bytes cannot be allocated.
    • - *
    • Memory blocks are zeroed-out on allocation, for safety. This has (sometimes unwanted) performance implications.
    • - *
    • There is no way to free a buffer explicitly (without JVM specific reflection). Buffer objects are subject to GC and it usually takes two GC cycles to - * free the off-heap memory after the buffer object becomes unreachable.
    • - *
    - * - *

    An alternative API for allocating off-heap memory can be found in the {@link org.lwjgl.system.MemoryUtil} class. This has none of the above drawbacks, - * but requires allocated memory to be explictly freed when not used anymore.

    - * - *

    Memory alignment

    - * - *

    Allocations done via this class have a guaranteed alignment of 8 bytes. If higher alignment values are required, use the explicit memory management API - * or pad the requested memory with extra bytes and align manually.

    - * - *

    Structs and arrays of structs

    - * - *

    Java does not support struct value types, so LWJGL requires struct values that are backed by off-heap memory. Each struct type defined in a binding - * has a corresponding class in LWJGL that can be used to access its members. Each struct class also has a {@code Buffer} inner class that can be used to - * access (packed) arrays of struct values. Both struct and struct buffer classes may be backed by direct {@link ByteBuffer}s allocated from this class, but it - * is highly recommended to use explicit memory management for performance.

    - */ -public final class BufferUtils { - - private BufferUtils() {} - - /** - * @return n, where buffer_element_size=2^n. - */ - public static int getElementSizeExponent(Buffer buf) { - if (buf instanceof ByteBuffer) - return 0; - else if (buf instanceof ShortBuffer || buf instanceof CharBuffer) - return 1; - else if (buf instanceof FloatBuffer || buf instanceof IntBuffer) - return 2; - else if (buf instanceof LongBuffer || buf instanceof DoubleBuffer) - return 3; - else - throw new IllegalStateException("Unsupported buffer type: " + buf); - } - - /** - * 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) { - return buffer.position() << getElementSizeExponent(buffer); - } - - /** - * Returns the memory address of the specified buffer. - * - * @param buffer - * the buffer - * - * @return the memory address - */ - static long getBufferAddress(Buffer buffer) { - // Should be below or memAddress0() ? - return memAddress(buffer); - } - - /** - * Allocates a direct native-ordered {@code ByteBuffer} with the specified capacity. - * - * @param capacity the capacity, in bytes - * - * @return a {@code ByteBuffer} - */ - public static ByteBuffer createByteBuffer(int capacity) { - return ByteBuffer.allocateDirect(capacity).order(ByteOrder.nativeOrder()); - } - - static int getAllocationSize(int elements, int elementShift) { - apiCheckAllocation(elements, apiGetBytes(elements, elementShift), 0x7FFF_FFFFL); - return elements << elementShift; - } - - /** - * Allocates a direct native-order {@code ShortBuffer} with the specified number of elements. - * - * @param capacity the capacity, in shorts - * - * @return a {@code ShortBuffer} - */ - public static ShortBuffer createShortBuffer(int capacity) { - return createByteBuffer(getAllocationSize(capacity, 1)).asShortBuffer(); - } - - /** - * Allocates a direct native-order {@code CharBuffer} with the specified number of elements. - * - * @param capacity the capacity, in chars - * - * @return a {@code CharBuffer} - */ - public static CharBuffer createCharBuffer(int capacity) { - return createByteBuffer(getAllocationSize(capacity, 1)).asCharBuffer(); - } - - /** - * Allocates a direct native-order {@code IntBuffer} with the specified number of elements. - * - * @param capacity the capacity, in ints - * - * @return an {@code IntBuffer} - */ - public static IntBuffer createIntBuffer(int capacity) { - return createByteBuffer(getAllocationSize(capacity, 2)).asIntBuffer(); - } - - /** - * Allocates a direct native-order {@code LongBuffer} with the specified number of elements. - * - * @param capacity the capacity, in longs - * - * @return a {@code LongBuffer} - */ - public static LongBuffer createLongBuffer(int capacity) { - return createByteBuffer(getAllocationSize(capacity, 3)).asLongBuffer(); - } - - /** - * Allocates a {@code CLongBuffer} with the specified number of elements. - * - * @param capacity the capacity, in memory addresses - * - * @return a {@code CLongBuffer} - */ - public static CLongBuffer createCLongBuffer(int capacity) { - return CLongBuffer.allocateDirect(capacity); - } - - /** - * Allocates a direct native-order {@code FloatBuffer} with the specified number of elements. - * - * @param capacity the capacity, in floats - * - * @return a FloatBuffer - */ - public static FloatBuffer createFloatBuffer(int capacity) { - return createByteBuffer(getAllocationSize(capacity, 2)).asFloatBuffer(); - } - - /** - * Allocates a direct native-order {@code DoubleBuffer} with the specified number of elements. - * - * @param capacity the capacity, in doubles - * - * @return a {@code DoubleBuffer} - */ - public static DoubleBuffer createDoubleBuffer(int capacity) { - return createByteBuffer(getAllocationSize(capacity, 3)).asDoubleBuffer(); - } - - /** - * Allocates a {@code PointerBuffer} with the specified number of elements. - * - * @param capacity the capacity, in memory addresses - * - * @return a {@code PointerBuffer} - */ - public static PointerBuffer createPointerBuffer(int capacity) { - return PointerBuffer.allocateDirect(capacity); - } - - // memsets - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static void zeroBuffer(ByteBuffer buffer) { memSet(buffer, 0); } - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static void zeroBuffer(ShortBuffer buffer) { memSet(buffer, 0); } - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static void zeroBuffer(CharBuffer buffer) { memSet(buffer, 0); } - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static void zeroBuffer(IntBuffer buffer) { memSet(buffer, 0); } - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static void zeroBuffer(FloatBuffer buffer) { memSet(buffer, 0); } - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static void zeroBuffer(LongBuffer buffer) { memSet(buffer, 0); } - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static void zeroBuffer(DoubleBuffer buffer) { memSet(buffer, 0); } - - /** - * Fills the specified buffer with zeros from the current position to the current limit. - * - * @param buffer the buffer to fill with zeros - */ - public static > void zeroBuffer(T buffer) { memSet(buffer, 0); } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/CLongBuffer.java b/LWJGL/src/main/java/org/lwjgl/CLongBuffer.java deleted file mode 100644 index 4c8ff803..00000000 --- a/LWJGL/src/main/java/org/lwjgl/CLongBuffer.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl; - -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.CheckIntrinsics.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * This class is a container for C {@code long} data. Its interface mirrors the {@link LongBuffer} API for convenience. - * - *

    The size of the C {@code long} type depends on the platform and CPU architecture. On Windows it is always 32-bit. On other platforms, it is 32-bit on - * 32-bit architectures and 64-bit on 64-bit architectures. Most APIs prefer portable sizes, so this class is rarely needed.

    - */ -public class CLongBuffer extends CustomBuffer implements Comparable { - - protected CLongBuffer(long address, @Nullable ByteBuffer container, int mark, int position, int limit, int capacity) { - super(address, container, mark, position, limit, capacity); - } - - /** - * Allocates a new long buffer. - * - *

    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 longs - * - * @return the new long buffer - * - * @throws IllegalArgumentException If the {@code capacity} is a negative integer - */ - public static CLongBuffer allocateDirect(int capacity) { - ByteBuffer source = BufferUtils.createByteBuffer(BufferUtils.getAllocationSize(capacity, CLONG_SHIFT)); - return new CLongBuffer(memAddress(source), source, -1, 0, capacity, capacity); - } - - /** - * Creates a new {@code CLongBuffer} that starts at the specified memory address and has the specified capacity. - * - * @param address the starting memory address - * @param capacity the buffer capacity, in number of longs - */ - public static CLongBuffer create(long address, int capacity) { - return new CLongBuffer(address, null, -1, 0, capacity, capacity); - } - - /** - * Creates a new {@code CLongBuffer} using the specified ByteBuffer as its long data source. - * - * @param source the source buffer - */ - public static CLongBuffer create(ByteBuffer source) { - int capacity = source.remaining() >> CLONG_SHIFT; - return new CLongBuffer(memAddress(source), source, -1, 0, capacity, capacity); - } - - @Override - protected CLongBuffer self() { - return this; - } - - @Override - public int sizeof() { - return CLONG_SIZE; - } - - /** - * Relative get method. Reads the long at this buffer's current position, and then increments the position. - * - * @return the long at the buffer's current position - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public long get() { - return memGetCLong(address + Integer.toUnsignedLong(nextGetIndex()) * CLONG_SIZE); - } - - /** - * Convenience relative get from a source ByteBuffer. - * - * @param source the source ByteBuffer - */ - public static long get(ByteBuffer source) { - if (source.remaining() < CLONG_SIZE) { - throw new BufferUnderflowException(); - } - - try { - return memGetCLong(memAddress(source)); - } finally { - source.position(source.position() + CLONG_SIZE); - } - } - - /** - * Relative put method  (optional operation). - * - *

    Writes the specified long into this buffer at the current position, and then increments the position.

    - * - * @param p the long to be written - * - * @return This buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public CLongBuffer put(long p) { - memPutCLong(address + Integer.toUnsignedLong(nextPutIndex()) * CLONG_SIZE, p); - return this; - } - - /** - * Convenience relative put on a target ByteBuffer. - * - * @param target the target ByteBuffer - * @param p the long value to be written - */ - public static void put(ByteBuffer target, long p) { - if (target.remaining() < CLONG_SIZE) { - throw new BufferOverflowException(); - } - - try { - memPutCLong(memAddress(target), p); - } finally { - target.position(target.position() + CLONG_SIZE); - } - } - - /** - * Absolute get method. Reads the long at the specified {@code index}. - * - * @param index the index from which the long will be read - * - * @return the long at the specified {@code index} - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - */ - public long get(int index) { - return memGetCLong(address + check(index, limit) * CLONG_SIZE); - } - - /** - * Convenience absolute get from a source ByteBuffer. - * - * @param source the source ByteBuffer - * @param index the index at which the long will be read - */ - public static long get(ByteBuffer source, int index) { - checkFromIndexSize(index, CLONG_SIZE, source.limit()); - return memGetCLong(memAddress0(source) + index); - } - - /** - * Absolute put method  (optional operation). - * - *

    Writes the specified long into this buffer at the specified {@code index}.

    - * - * @param index the index at which the long will be written - * @param p the long value to be written - * - * @return This buffer - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - */ - public CLongBuffer put(int index, long p) { - memPutCLong(address + check(index, limit) * CLONG_SIZE, p); - return this; - } - - /** - * Convenience absolute put on a target ByteBuffer. - * - * @param target the target ByteBuffer - * @param index the index at which the long will be written - * @param p the long value to be written - */ - public static void put(ByteBuffer target, int index, long p) { - checkFromIndexSize(index, CLONG_SIZE, target.limit()); - memPutCLong(memAddress0(target) + index, p); - } - - // -- Bulk get operations -- - - /** - * Relative bulk get method. - * - *

    This method transfers longs from this buffer into the specified destination array. An invocation of this method of the form {@code src.get(a)} - * behaves in exactly the same way as the invocation - * - *

    -     *     src.get(a, 0, a.length) 
    - * - * @return This buffer - * - * @throws BufferUnderflowException If there are fewer than {@code length} longs remaining in this buffer - */ - public CLongBuffer get(long[] dst) { - return get(dst, 0, dst.length); - } - - /** - * Relative bulk get method. - * - *

    This method transfers longs from this buffer into the specified destination array. If there are fewer longs remaining in the buffer than are - * required to satisfy the request, that is, if {@code length} {@code >} {@code remaining()}, then no longs are transferred and a - * {@link BufferUnderflowException} is thrown. - * - *

    Otherwise, this method copies {@code length} longs from this buffer into the specified array, starting at the current position of this buffer and - * at the specified offset in the array. The position of this buffer is then incremented by {@code length}. - * - *

    In other words, an invocation of this method of the form {@code src.get(dst, off, len)} has exactly the same effect as the loop

    - * - *
    -     *     for (int i = off; i < off + len; i++)
    -     *         dst[i] = src.get(); 
    - * - *

    except that it first checks that there are sufficient longs in this buffer and it is potentially much more efficient.

    - * - * @param dst the array into which longs are to be written - * @param offset the offset within the array of the first long to be written; must be non-negative and no larger than {@code dst.length} - * @param length the maximum number of longs to be written to the specified array; must be non-negative and no larger than {@code dst.length - offset} - * - * @return This buffer - * - * @throws BufferUnderflowException If there are fewer than {@code length} longs remaining in this buffer - * @throws IndexOutOfBoundsException If the preconditions on the {@code offset} and {@code length} parameters do not hold - */ - public CLongBuffer get(long[] dst, int offset, int length) { - if (CLONG_SIZE == 8) { - memLongBuffer(address(), remaining()).get(dst, offset, length); - position(position() + length); - } else { - get32(dst, offset, length); - } - - return this; - } - - private void get32(long[] dst, int offset, int length) { - checkFromIndexSize(offset, length, dst.length); - if (remaining() < length) { - throw new BufferUnderflowException(); - } - for (int i = offset, end = offset + length; i < end; i++) { - dst[i] = get(); - } - } - - /** - * Relative bulk put method  (optional operation). - * - *

    This method transfers the entire content of the specified source long array into this buffer. An invocation of this method of the form - * {@code dst.put(a)} behaves in exactly the same way as the invocation

    - * - *
    -     *     dst.put(a, 0, a.length) 
    - * - * @return This buffer - * - * @throws BufferOverflowException If there is insufficient space in this buffer - */ - public CLongBuffer put(long[] src) { - return put(src, 0, src.length); - } - - /** - * Relative bulk put method  (optional operation). - * - *

    This method transfers longs into this buffer from the specified source array. If there are more longs to be copied from the array than remain - * in this buffer, that is, if {@code length} {@code >} {@code remaining()}, then no longs are transferred and a - * {@link BufferOverflowException} is thrown. - * - *

    Otherwise, this method copies {@code length} longs from the specified array into this buffer, starting at the specified offset in the array and - * at the current position of this buffer. The position of this buffer is then incremented by {@code length}.

    - * - *

    In other words, an invocation of this method of the form {@code dst.put(src, off, len)} has exactly the same effect as the loop

    - * - *
    -     *     for (int i = off; i < off + len; i++)
    -     *         dst.put(a[i]); 
    - * - *

    except that it first checks that there is sufficient space in this buffer and it is potentially much more efficient.

    - * - * @param src the array from which longs are to be read - * @param offset the offset within the array of the first long to be read; must be non-negative and no larger than {@code array.length} - * @param length the number of longs to be read from the specified array; must be non-negative and no larger than {@code array.length - offset} - * - * @return This buffer - * - * @throws BufferOverflowException If there is insufficient space in this buffer - * @throws IndexOutOfBoundsException If the preconditions on the {@code offset} and {@code length} parameters do not hold - */ - public CLongBuffer put(long[] src, int offset, int length) { - if (CLONG_SIZE == 8) { - memLongBuffer(address(), remaining()).put(src, offset, length); - position(position() + length); - } else { - put32(src, offset, length); - } - - return this; - } - - private void put32(long[] src, int offset, int length) { - checkFromIndexSize(offset, length, src.length); - if (remaining() < length) { - throw new BufferOverflowException(); - } - int end = offset + length; - for (int i = offset; i < end; i++) { - put(src[i]); - } - } - - /** - * Returns the current hash code of this buffer. - * - *

    The hash code of a long buffer depends only upon its remaining elements; that is, upon the elements from {@code position()} up to, and including, - * the element at {@code limit()} - {@code 1}.

    - * - *

    Because buffer hash codes are content-dependent, it is inadvisable to use buffers as keys in hash maps or similar data structures unless it is known - * that their contents will not change.

    - * - * @return the current hash code of this buffer - */ - public int hashCode() { - int h = 1; - int p = position(); - for (int i = limit() - 1; i >= p; i--) { - h = 31 * h + (int)get(i); - } - return h; - } - - /** - * Tells whether or not this buffer is equal to another object. - * - *

    Two long buffers are equal if, and only if,

    - * - *
      - *
    1. They have the same element type,
    2. - *
    3. They have the same number of remaining elements, and
    4. - *
    5. The two sequences of remaining elements, considered - * independently of their starting positions, are pointwise equal.
    6. - *
    - * - *

    A long buffer is not equal to any other type of object.

    - * - * @param ob the object to which this buffer is to be compared - * - * @return {@code true} if, and only if, this buffer is equal to the - * given object - */ - public boolean equals(Object ob) { - if (!(ob instanceof CLongBuffer)) { - return false; - } - CLongBuffer that = (CLongBuffer)ob; - if (this.remaining() != that.remaining()) { - return false; - } - int p = this.position(); - for (int i = this.limit() - 1, j = that.limit() - 1; i >= p; i--, j--) { - long v1 = this.get(i); - long v2 = that.get(j); - if (v1 != v2) { - return false; - } - } - return true; - } - - /** - * Compares this buffer to another. - * - *

    Two long buffers are compared by comparing their sequences of remaining elements lexicographically, without regard to the starting position of - * each sequence within its corresponding buffer.

    - * - *

    A long buffer is not comparable to any other type of object.

    - * - * @return A negative integer, zero, or a positive integer as this buffer is less than, equal to, or greater than the specified buffer - */ - @Override - public int compareTo(CLongBuffer that) { - int n = this.position() + Math.min(this.remaining(), that.remaining()); - for (int i = this.position(), j = that.position(); i < n; i++, j++) { - long v1 = this.get(i); - long v2 = that.get(j); - if (v1 == v2) { - continue; - } - if (v1 < v2) { - return -1; - } - return +1; - } - return this.remaining() - that.remaining(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/LWJGLException.java b/LWJGL/src/main/java/org/lwjgl/LWJGLException.java deleted file mode 100644 index 79ef96bc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/LWJGLException.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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; - -/** - *

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

    - * - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public class LWJGLException extends Exception { - - private static final long serialVersionUID = 1L; - - /** - * Plain c'tor - */ - public LWJGLException() { - super(); - } - - /** - * Creates a new LWJGLException - * - * @param msg - * String identifier for exception - */ - public LWJGLException(String msg) { - super(msg); - } - - /** - * @param message - * @param cause - */ - public LWJGLException(String message, Throwable cause) { - super(message, cause); - } - - /** - * @param cause - */ - public LWJGLException(Throwable cause) { - super(cause); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/LWJGLUtil.java b/LWJGL/src/main/java/org/lwjgl/LWJGLUtil.java deleted file mode 100644 index 04f1f297..00000000 --- a/LWJGL/src/main/java/org/lwjgl/LWJGLUtil.java +++ /dev/null @@ -1,632 +0,0 @@ -/* - * 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; - -import java.io.File; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.nio.ByteBuffer; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.StringTokenizer; - -/** - *

    - * Internal library methods - *

    - * - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public class LWJGLUtil { - public static final int PLATFORM_LINUX = 1; - public static final int PLATFORM_MACOSX = 2; - public static final int PLATFORM_WINDOWS = 3; - public static final String PLATFORM_LINUX_NAME = "linux"; - 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_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); - - /** LWJGL Logo - 32 by 32 pixels */ - public static final ByteBuffer LWJGLIcon32x32 = loadIcon(LWJGL_ICON_DATA_32x32); - - /** Debug flag. */ - public static final boolean DEBUG = getPrivilegedBoolean("org.lwjgl.util.Debug"); - - public static final boolean CHECKS = !getPrivilegedBoolean("org.lwjgl.util.NoChecks"); - - private static final int PLATFORM; - - static { - final String osName = getPrivilegedProperty("os.name"); - if ( osName.startsWith("Windows") ) - PLATFORM = PLATFORM_WINDOWS; - else if ( osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("OpenBSD") || osName.startsWith("SunOS") || osName.startsWith("Unix") ) - PLATFORM = PLATFORM_LINUX; - else if ( osName.startsWith("Mac OS X") || osName.startsWith("Darwin") ) - PLATFORM = PLATFORM_MACOSX; - else - throw new LinkageError("Unknown platform: " + osName); - } - - private static ByteBuffer loadIcon(String data) { - int len = data.length(); - ByteBuffer bb = BufferUtils.createByteBuffer(len); - for(int i=0 ; i possible_paths = new ArrayList(); - - String classloader_path = getPathFromClassLoader(libname, classloader); - if (classloader_path != null) { - log("getPathFromClassLoader: Path found: " + classloader_path); - possible_paths.add(classloader_path); - } - - for ( String platform_lib_name : platform_lib_names ) { - String lwjgl_classloader_path = getPathFromClassLoader("lwjgl", classloader); - if ( lwjgl_classloader_path != null ) { - log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); - possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) - + File.separator + platform_lib_name); - } - - // add Installer path - String alternative_path = getPrivilegedProperty("org.lwjgl.librarypath"); - if ( alternative_path != null ) { - possible_paths.add(alternative_path + File.separator + platform_lib_name); - } - - // Add all possible paths from java.library.path - String java_library_path = getPrivilegedProperty("java.library.path"); - - StringTokenizer st = new StringTokenizer(java_library_path, File.pathSeparator); - while ( st.hasMoreTokens() ) { - String path = st.nextToken(); - possible_paths.add(path + File.separator + platform_lib_name); - } - - //add current path - String current_dir = getPrivilegedProperty("user.dir"); - possible_paths.add(current_dir + File.separator + platform_lib_name); - - //add pure library (no path, let OS search) - possible_paths.add(platform_lib_name); - } - - //create needed string array - return possible_paths.toArray(new String[possible_paths.size()]); - } - - static void execPrivileged(final String[] cmd_array) throws Exception { - try { - Process process = AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Process run() throws Exception { - return Runtime.getRuntime().exec(cmd_array); - } - }); - // Close unused streams to make sure the child process won't hang - process.getInputStream().close(); - process.getOutputStream().close(); - process.getErrorStream().close(); - } catch (PrivilegedActionException e) { - throw (Exception)e.getCause(); - } - } - - private static String getPrivilegedProperty(final String property_name) { - return AccessController.doPrivileged(new PrivilegedAction() { - public String run() { - return System.getProperty(property_name); - } - }); - } - - /** - * 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 classloader Classloader to use - * @return Absolute path to library if found, otherwise null - */ - private static String getPathFromClassLoader(final String libname, final ClassLoader classloader) { - Class c = null; - - try { - log("getPathFromClassLoader: searching for: " + libname); - c = classloader.getClass(); - while (c != null) { - final Class clazz = c; - try { - return AccessController.doPrivileged(new PrivilegedExceptionAction() { - public String run() throws Exception { - Method findLibrary = clazz.getDeclaredMethod("findLibrary", String.class); - findLibrary.setAccessible(true); - String path = (String)findLibrary.invoke(classloader, libname); - return path; - } - }); - } catch (PrivilegedActionException e) { - log("Failed to locate findLibrary method: " + e.getCause()); - c = c.getSuperclass(); - } - } - } catch (Exception e) { - log("Failure locating " + e + " using classloader:" + c); - } - return null; - } - - /** - * Gets a boolean property as a privileged action. - */ - public static boolean getPrivilegedBoolean(final String property_name) { - return AccessController.doPrivileged(new PrivilegedAction() { - public Boolean run() { - return Boolean.getBoolean(property_name); - } - }); - } - - /** - * Gets an integer property as a privileged action. - * - * @param property_name the integer property name - * - * @return the property value - */ - public static Integer getPrivilegedInteger(final String property_name) { - return AccessController.doPrivileged(new PrivilegedAction() { - public Integer run() { - return Integer.getInteger(property_name); - } - }); - } - - /** - * Gets an integer property as a privileged action. - * - * @param property_name the integer property name - * @param default_val the default value to use if the property is not defined - * - * @return the property value - */ - public static Integer getPrivilegedInteger(final String property_name, final int default_val) { - return AccessController.doPrivileged(new PrivilegedAction() { - public Integer run() { - return Integer.getInteger(property_name, default_val); - } - }); - } - - /** - * @param msg Message to print - */ - public static void log(CharSequence msg) { - if (DEBUG) { - System.err.println("[LWJGL] " + msg); - } - } - - /** - * 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"); - StringTokenizer version_tokenizer = new StringTokenizer(os_version, "."); - int major; - int minor; - try { - String major_str = version_tokenizer.nextToken(); - String minor_str = version_tokenizer.nextToken(); - major = Integer.parseInt(major_str); - minor = Integer.parseInt(minor_str); - } catch (Exception e) { - LWJGLUtil.log("Exception occurred while trying to determine OS version: " + e); - // Best guess, no - return false; - } - return major > major_required || (major == major_required && minor >= minor_required); - } - - /** - * 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. - * - * @param filter the filter to use (optional) - * @param target the target map (optional) - * @param tokenClasses an array of classes to get tokens from - * - * @return the token map - */ - - 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. - *

    - * This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs. - * - * @param filter the filter to use (optional) - * @param target the target map (optional) - * @param tokenClasses the classes to get tokens from - * - * @return the token map - */ - 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; - - for ( final Class tokenClass : tokenClasses ) { - for ( final Field field : tokenClass.getDeclaredFields() ) { - // Get only fields. - if ( (field.getModifiers() & TOKEN_MODIFIERS) == TOKEN_MODIFIERS && field.getType() == int.class ) { - try { - final int value = field.getInt(null); - if ( filter != null && !filter.accept(field, value) ) - continue; - - if ( target.containsKey(value) ) // Print colliding tokens in their hex representation. - target.put(value, toHexString(value)); - else - target.put(value, field.getName()); - } catch (IllegalAccessException e) { - // Ignore - } - } - } - } - - return target; - } - - /** - * 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 - * - * @return the hex string representation - */ - public static String toHexString(final int value) { - return "0x" + Integer.toHexString(value).toUpperCase(); - } - - /** Simple interface for Field filtering. */ - public interface TokenFilter { - - /** - * Should return true if the specified Field passes the filter. - * - * @param field the Field to test - * @param value the integer value of the field - * - * @return true if the Field is accepted - */ - boolean accept(Field field, int value); - - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/MemoryUtil.java b/LWJGL/src/main/java/org/lwjgl/MemoryUtil.java deleted file mode 100644 index f54dcf5b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/MemoryUtil.java +++ /dev/null @@ -1,441 +0,0 @@ -/* - * 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.lwjgl; - -import java.lang.reflect.Field; -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.LongBuffer; -import java.nio.ShortBuffer; -import java.nio.charset.CharacterCodingException; -import java.nio.charset.Charset; -import java.nio.charset.CharsetDecoder; -import java.nio.charset.CharsetEncoder; -import java.nio.charset.CoderResult; - -/** - * [INTERNAL USE ONLY] - *

    - * This class provides utility methods for passing buffers to JNI API calls. - * - * @author Spasi - */ -public final class MemoryUtil { - - private static final Charset ascii; - private static final Charset utf8; - private static final Charset utf16; - - static { - ascii = Charset.forName("ISO-8859-1"); - utf8 = Charset.forName("UTF-8"); - utf16 = Charset.forName("UTF-16LE"); - } - - private static final Accessor memUtil; - - static { - Accessor util; - try { - // Depends on java.nio.Buffer#address and sun.misc.Unsafe - util = loadAccessor("org.lwjgl.MemoryUtilSun$AccessorUnsafe"); - } catch (Exception e0) { - try { - // Depends on java.nio.Buffer#address and sun.reflect.FieldAccessor - util = loadAccessor("org.lwjgl.MemoryUtilSun$AccessorReflectFast"); - } catch (Exception e1) { - try { - // Depends on java.nio.Buffer#address - util = new AccessorReflect(); - } catch (Exception e2) { - LWJGLUtil.log("Unsupported JVM detected, this will likely result in low performance. Please inform LWJGL developers."); - util = new AccessorJNI(); - } - } - } - - LWJGLUtil.log("MemoryUtil Accessor: " + util.getClass().getSimpleName()); - memUtil = util; - - /* - BENCHMARK RESULTS - Oracle Server VM: - - Unsafe: 4ns - ReflectFast: 8ns - Reflect: 10ns - JNI: 82ns - - BENCHMARK RESULTS - Oracle Client VM: - - Unsafe: 5ns - ReflectFast: 81ns - Reflect: 85ns - JNI: 87ns - - On non-Oracle VMs, Unsafe should be the fastest implementation as well. In the absence - of Unsafe, performance will depend on how reflection and JNI are implemented. For now - we'll go with what we see on the Oracle VM (that is, we'll prefer reflection over JNI). - */ - } - - private MemoryUtil() { - } - - /** - * Returns the memory address of the specified buffer. [INTERNAL USE ONLY] - * - * @param buffer the buffer - * - * @return the memory address - */ - public static long getAddress0(Buffer buffer) { return memUtil.getAddress(buffer); } - - public static long getAddress0Safe(Buffer buffer) { return buffer == null ? 0L : memUtil.getAddress(buffer); } - - public static long getAddress0(PointerBuffer buffer) { return memUtil.getAddress(buffer.getBuffer()); } - - public static long getAddress0Safe(PointerBuffer buffer) { return buffer == null ? 0L : memUtil.getAddress(buffer.getBuffer()); } - - // --- [ API utilities ] --- - - public static long getAddress(ByteBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(ByteBuffer buffer, int position) { return getAddress0(buffer) + position; } - - public static long getAddress(ShortBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(ShortBuffer buffer, int position) { return getAddress0(buffer) + (position << 1); } - - public static long getAddress(CharBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(CharBuffer buffer, int position) { return getAddress0(buffer) + (position << 1); } - - public static long getAddress(IntBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(IntBuffer buffer, int position) { return getAddress0(buffer) + (position << 2); } - - public static long getAddress(FloatBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(FloatBuffer buffer, int position) { return getAddress0(buffer) + (position << 2); } - - public static long getAddress(LongBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(LongBuffer buffer, int position) { return getAddress0(buffer) + (position << 3); } - - public static long getAddress(DoubleBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(DoubleBuffer buffer, int position) { return getAddress0(buffer) + (position << 3); } - - public static long getAddress(PointerBuffer buffer) { return getAddress(buffer, buffer.position()); } - - public static long getAddress(PointerBuffer buffer, int position) { return getAddress0(buffer) + (position * PointerBuffer.getPointerSize()); } - - // --- [ API utilities - Safe ] --- - - public static long getAddressSafe(ByteBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(ByteBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - public static long getAddressSafe(ShortBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(ShortBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - public static long getAddressSafe(CharBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(CharBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - public static long getAddressSafe(IntBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(IntBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - public static long getAddressSafe(FloatBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(FloatBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - public static long getAddressSafe(LongBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(LongBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - public static long getAddressSafe(DoubleBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(DoubleBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - public static long getAddressSafe(PointerBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } - - public static long getAddressSafe(PointerBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } - - // --- [ String utilities ] --- - - /** - * 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 - * - * @return the encoded text or null - * - * @see String#getBytes() - */ - public static ByteBuffer encodeASCII(final CharSequence text) { - return encode(text, ascii); - } - - /** - * 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 - * - * @return the encoded text or null - * - * @see String#getBytes() - */ - public static ByteBuffer encodeUTF8(final CharSequence text) { - return encode(text, utf8); - } - - /** - * 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 - * - * @return the encoded text - */ - public static ByteBuffer encodeUTF16(final CharSequence text) { - return encode(text, utf16); - } - - /** - * Wraps the specified text in a null-terminated CharBuffer and encodes it using the specified Charset. - * - * @param text the text to encode - * @param charset the charset to use for encoding - * - * @return the encoded text - */ - private static ByteBuffer encode(final CharSequence text, final Charset charset) { - if ( text == null ) - return null; - - return encode(CharBuffer.wrap(new CharSequenceNT(text)), charset); - } - - /** - * A {@link CharsetEncoder#encode(CharBuffer)} implementation that uses {@link BufferUtils#createByteBuffer(int)} - * instead of {@link ByteBuffer#allocate(int)}. - * - * @see CharsetEncoder#encode(CharBuffer) - */ - private static ByteBuffer encode(final CharBuffer in, final Charset charset) { - final CharsetEncoder encoder = charset.newEncoder(); // encoders are not thread-safe, create a new one on every call - - int n = (int)(in.remaining() * encoder.averageBytesPerChar()); - ByteBuffer out = BufferUtils.createByteBuffer(n); - - if ( n == 0 && in.remaining() == 0 ) - return out; - - encoder.reset(); - while ( true ) { - CoderResult cr = in.hasRemaining() ? encoder.encode(in, out, true) : CoderResult.UNDERFLOW; - if ( cr.isUnderflow() ) - cr = encoder.flush(out); - - if ( cr.isUnderflow() ) - break; - - if ( cr.isOverflow() ) { - n = 2 * n + 1; // Ensure progress; n might be 0! - ByteBuffer o = BufferUtils.createByteBuffer(n); - out.flip(); - o.put(out); - out = o; - continue; - } - - try { - cr.throwException(); - } catch (CharacterCodingException e) { - throw new RuntimeException(e); - } - } - out.flip(); - return out; - } - - public static String decodeASCII(final ByteBuffer buffer) { - return decode(buffer, ascii); - } - - public static String decodeUTF8(final ByteBuffer buffer) { - return decode(buffer, utf8); - } - - public static String decodeUTF16(final ByteBuffer buffer) { - return decode(buffer, utf16); - } - - private static String decode(final ByteBuffer buffer, final Charset charset) { - if ( buffer == null ) - return null; - - return decodeImpl(buffer, charset); - } - - private static String decodeImpl(final ByteBuffer in, final Charset charset) { - final CharsetDecoder decoder = charset.newDecoder(); // decoders are not thread-safe, create a new one on every call - - int n = (int)(in.remaining() * decoder.averageCharsPerByte()); - CharBuffer out = BufferUtils.createCharBuffer(n); - - if ( (n == 0) && (in.remaining() == 0) ) - return ""; - - decoder.reset(); - for (; ; ) { - CoderResult cr = in.hasRemaining() ? decoder.decode(in, out, true) : CoderResult.UNDERFLOW; - if ( cr.isUnderflow() ) - cr = decoder.flush(out); - - if ( cr.isUnderflow() ) - break; - if ( cr.isOverflow() ) { - n = 2 * n + 1; // Ensure progress; n might be 0! - CharBuffer o = BufferUtils.createCharBuffer(n); - out.flip(); - o.put(out); - out = o; - continue; - } - try { - cr.throwException(); - } catch (CharacterCodingException e) { - throw new RuntimeException(e); - } - } - out.flip(); - return out.toString(); - } - - /** A null-terminated CharSequence. */ - private static class CharSequenceNT implements CharSequence { - - final CharSequence source; - - CharSequenceNT(CharSequence source) { - this.source = source; - } - - public int length() { - return source.length() + 1; - - } - - public char charAt(final int index) { - return index == source.length() ? '\0' : source.charAt(index); - - } - - public CharSequence subSequence(final int start, final int end) { - return new CharSequenceNT(source.subSequence(start, Math.min(end, source.length()))); - } - - } - - interface Accessor { - - long getAddress(Buffer buffer); - - } - - private static Accessor loadAccessor(final String className) throws Exception { - return (Accessor)Class.forName(className).newInstance(); - } - - /** Default implementation. */ - private static class AccessorJNI implements Accessor { - - public long getAddress(final Buffer buffer) { - return BufferUtils.getBufferAddress(buffer); - } - - } - - /** Implementation using reflection on ByteBuffer. */ - private static class AccessorReflect implements Accessor { - - private final Field address; - - AccessorReflect() { - try { - address = getAddressField(); - } catch (NoSuchFieldException e) { - throw new UnsupportedOperationException(e); - } - address.setAccessible(true); - } - - public long getAddress(final Buffer buffer) { - try { - return address.getLong(buffer); - } catch (IllegalAccessException e) { - // cannot happen - return 0L; - } - } - - } - - static Field getAddressField() throws NoSuchFieldException { - return getDeclaredFieldRecursive(ByteBuffer.class, "address"); - } - - private static Field getDeclaredFieldRecursive(final Class root, final String fieldName) throws NoSuchFieldException { - Class type = root; - - do { - try { - return type.getDeclaredField(fieldName); - } catch (NoSuchFieldException e) { - type = type.getSuperclass(); - } - } while ( type != null ); - - throw new NoSuchFieldException(fieldName + " does not exist in " + root.getSimpleName() + " or any of its superclasses."); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/PointerBuffer.java b/LWJGL/src/main/java/org/lwjgl/PointerBuffer.java deleted file mode 100644 index e95d333b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/PointerBuffer.java +++ /dev/null @@ -1,804 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl; - -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.CheckIntrinsics.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** This class is a container for architecture-independent pointer data. Its interface mirrors the {@link LongBuffer} API for convenience. */ -public class PointerBuffer extends CustomBuffer implements Comparable { - - public PointerBuffer(final int capacity) { - this(allocateDirect(capacity)); - } - - public PointerBuffer(final ByteBuffer source) { - this(create(source)); - } - - protected PointerBuffer(PointerBuffer copy) { - this(copy.address0(), copy.container, copy.mark, copy.position, copy.limit, copy.capacity); - } - - /** - * Returns the ByteBuffer that backs this PointerBuffer. - * - * @return the pointer ByteBuffer - */ - public ByteBuffer getBuffer() { - return container; - } - - /** Returns true if the underlying architecture is 64bit. */ - public static boolean is64Bit() { - return POINTER_SIZE == 8; - } - - /** - * Returns the pointer size in bytes, based on the underlying architecture. - * - * @return The pointer size in bytes - */ - public static int getPointerSize() { - return POINTER_SIZE; - } - - /** - * Returns this buffer's position, in bytes.

    - * - * @return The position of this buffer in bytes. - */ - public final int positionByte() { - return position() * getPointerSize(); - } - - /** - * Returns the number of bytes between the current position and the - * limit.

    - * - * @return The number of bytes remaining in this buffer - */ - public final int remainingByte() { - return remaining() * getPointerSize(); - } - - /** - * Creates a new, read-only pointer buffer that shares this buffer's - * content. - *

    - *

    The content of the new buffer will be that of this buffer. Changes - * to this buffer's content will be visible in the new buffer; the new - * buffer itself, however, will be read-only and will not allow the shared - * content to be modified. The two buffers' position, limit, and mark - * values will be independent. - *

    - *

    The new buffer's capacity, limit and position will be - * identical to those of this buffer. - *

    - *

    If this buffer is itself read-only then this method behaves in - * exactly the same way as the {@link #duplicate duplicate} method.

    - * - * @return The new, read-only pointer buffer - */ - public PointerBuffer asReadOnlyBuffer() { - final PointerBuffer buffer = new PointerBufferR(container); - - buffer.position(position()); - buffer.limit(limit()); - - return buffer; - } - - public boolean isReadOnly() { - return false; - } - - /** - * Read-only version of PointerBuffer. - * - * @author Spasi - */ - private static final class PointerBufferR extends PointerBuffer { - - PointerBufferR(final ByteBuffer source) { - super(source); - } - - public boolean isReadOnly() { - return true; - } - - protected PointerBuffer newInstance(final ByteBuffer source) { - return new PointerBufferR(source); - } - - public PointerBuffer asReadOnlyBuffer() { - return duplicate(); - } - - public PointerBuffer put(final long l) { - throw new ReadOnlyBufferException(); - } - - public PointerBuffer put(final int index, final long l) { - throw new ReadOnlyBufferException(); - } - - public PointerBuffer put(final PointerBuffer src) { - throw new ReadOnlyBufferException(); - } - - public PointerBuffer put(final long[] src, final int offset, final int length) { - throw new ReadOnlyBufferException(); - } - - public PointerBuffer compact() { - throw new ReadOnlyBufferException(); - } - - } - - protected PointerBuffer(long address, @Nullable ByteBuffer container, int mark, int position, int limit, int capacity) { - super(address, container, mark, position, limit, capacity); - } - - /** - * 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.

    - * - * @param capacity the new buffer's capacity, in pointers - * - * @return the new pointer buffer - * - * @throws IllegalArgumentException If the {@code capacity} is a negative integer - */ - public static PointerBuffer allocateDirect(int capacity) { - ByteBuffer source = BufferUtils.createByteBuffer(BufferUtils.getAllocationSize(capacity, POINTER_SHIFT)); - return new PointerBuffer(memAddress(source), source, -1, 0, capacity, capacity); - } - - /** - * Creates a new PointerBuffer that starts at the specified memory address and has the specified capacity. - * - * @param address the starting memory address - * @param capacity the buffer capacity, in number of pointers - */ - public static PointerBuffer create(long address, int capacity) { - return new PointerBuffer(address, null, -1, 0, capacity, capacity); - } - - /** - * Creates a new PointerBuffer using the specified ByteBuffer as its pointer data source. - * - * @param source the source buffer - */ - public static PointerBuffer create(ByteBuffer source) { - int capacity = source.remaining() >> POINTER_SHIFT; - return new PointerBuffer(memAddress(source), source, -1, 0, capacity, capacity); - } - - @Override - protected PointerBuffer self() { - return this; - } - - @Override - public int sizeof() { - return POINTER_SIZE; - } - - /** - * Relative get method. Reads the pointer at this buffer's current position, and then increments the position. - * - * @return the pointer at the buffer's current position - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public long get() { - return memGetAddress(address + Integer.toUnsignedLong(nextGetIndex()) * POINTER_SIZE); - } - - /** - * Convenience relative get from a source ByteBuffer. - * - * @param source the source ByteBuffer - */ - public static long get(ByteBuffer source) { - if (source.remaining() < POINTER_SIZE) { - throw new BufferUnderflowException(); - } - - try { - return memGetAddress(memAddress(source)); - } finally { - source.position(source.position() + POINTER_SIZE); - } - } - - /** - * Relative put method  (optional operation). - * - *

    Writes the specified pointer into this buffer at the current position, and then increments the position.

    - * - * @param p the pointer to be written - * - * @return This buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer put(long p) { - memPutAddress(address + Integer.toUnsignedLong(nextPutIndex()) * POINTER_SIZE, p); - return this; - } - - /** - * Convenience relative put on a target ByteBuffer. - * - * @param target the target ByteBuffer - * @param p the pointer value to be written - */ - public static void put(ByteBuffer target, long p) { - if (target.remaining() < POINTER_SIZE) { - throw new BufferOverflowException(); - } - - try { - memPutAddress(memAddress(target), p); - } finally { - target.position(target.position() + POINTER_SIZE); - } - } - - /** - * Absolute get method. Reads the pointer at the specified {@code index}. - * - * @param index the index from which the pointer will be read - * - * @return the pointer at the specified {@code index} - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - */ - public long get(int index) { - return memGetAddress(address + check(index, limit) * POINTER_SIZE); - } - - /** - * Convenience absolute get from a source ByteBuffer. - * - * @param source the source ByteBuffer - * @param index the index at which the pointer will be read - */ - public static long get(ByteBuffer source, int index) { - checkFromIndexSize(index, POINTER_SIZE, source.limit()); - return memGetAddress(memAddress0(source) + index); - } - - /** - * Absolute put method  (optional operation). - * - *

    Writes the specified pointer into this buffer at the specified {@code index}.

    - * - * @param index the index at which the pointer will be written - * @param p the pointer value to be written - * - * @return This buffer - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - */ - public PointerBuffer put(int index, long p) { - memPutAddress(address + check(index, limit) * POINTER_SIZE, p); - return this; - } - - /** - * Convenience absolute put on a target ByteBuffer. - * - * @param target the target ByteBuffer - * @param index the index at which the pointer will be written - * @param p the pointer value to be written - */ - public static void put(ByteBuffer target, int index, long p) { - checkFromIndexSize(index, POINTER_SIZE, target.limit()); - memPutAddress(memAddress0(target) + index, p); - } - - // -- PointerWrapper operations -- - - /** Puts the pointer value of the specified {@link Pointer} at the current position and then increments the position. */ - public PointerBuffer put(Pointer pointer) { - put(pointer.address()); - return this; - } - - /** Puts the pointer value of the specified {@link Pointer} at the specified {@code index}. */ - public PointerBuffer put(int index, Pointer pointer) { - put(index, pointer.address()); - return this; - } - - // -- Buffer address operations -- - - /** - *

    Writes the address of the specified {@code buffer} into this buffer at the current position, and then increments the position.

    - * - * @param buffer the pointer to be written - * - * @return this buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer put(ByteBuffer buffer) { - put(memAddress(buffer)); - return this; - } - - /** - *

    Writes the address of the specified {@code buffer} into this buffer at the current position, and then increments the position.

    - * - * @param buffer the pointer to be written - * - * @return this buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer put(ShortBuffer buffer) { - put(memAddress(buffer)); - return this; - } - - /** - *

    Writes the address of the specified {@code buffer} into this buffer at the current position, and then increments the position.

    - * - * @param buffer the pointer to be written - * - * @return this buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer put(IntBuffer buffer) { - put(memAddress(buffer)); - return this; - } - - /** - *

    Writes the address of the specified {@code buffer} into this buffer at the current position, and then increments the position.

    - * - * @param buffer the pointer to be written - * - * @return this buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer put(LongBuffer buffer) { - put(memAddress(buffer)); - return this; - } - - /** - *

    Writes the address of the specified {@code buffer} into this buffer at the current position, and then increments the position.

    - * - * @param buffer the pointer to be written - * - * @return this buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer put(FloatBuffer buffer) { - put(memAddress(buffer)); - return this; - } - - /** - *

    Writes the address of the specified {@code buffer} into this buffer at the current position, and then increments the position.

    - * - * @param buffer the pointer to be written - * - * @return this buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer put(DoubleBuffer buffer) { - put(memAddress(buffer)); - return this; - } - - /** - *

    Writes the address of the specified {@code buffer} into this buffer at the current position, and then increments the position.

    - * - * @param buffer the pointer to be written - * - * @return this buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - */ - public PointerBuffer putAddressOf(CustomBuffer buffer) { - put(memAddress(buffer)); - return this; - } - - // --- - - /** Puts the address of the specified {@code buffer} at the specified {@code index}. */ - public PointerBuffer put(int index, ByteBuffer buffer) { - put(index, memAddress(buffer)); - return this; - } - - /** Puts the address of the specified {@code buffer} at the specified {@code index}. */ - public PointerBuffer put(int index, ShortBuffer buffer) { - put(index, memAddress(buffer)); - return this; - } - - /** Puts the address of the specified {@code buffer} at the specified {@code index}. */ - public PointerBuffer put(int index, IntBuffer buffer) { - put(index, memAddress(buffer)); - return this; - } - - /** Puts the address of the specified {@code buffer} at the specified {@code index}. */ - public PointerBuffer put(int index, LongBuffer buffer) { - put(index, memAddress(buffer)); - return this; - } - - /** Puts the address of the specified {@code buffer} at the specified {@code index}. */ - public PointerBuffer put(int index, FloatBuffer buffer) { - put(index, memAddress(buffer)); - return this; - } - - /** Puts the address of the specified {@code buffer} at the specified {@code index}. */ - public PointerBuffer put(int index, DoubleBuffer buffer) { - put(index, memAddress(buffer)); - return this; - } - - /** Puts the address of the specified {@code buffer} at the specified {@code index}. */ - public PointerBuffer putAddressOf(int index, CustomBuffer buffer) { - put(index, memAddress(buffer)); - return this; - } - - // --- - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a {@link ByteBuffer} instance that - * starts at the pointer address and has capacity equal to the specified {@code size}. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public ByteBuffer getByteBuffer(int size) { return memByteBuffer(get(), size); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a {@link ShortBuffer} instance that - * starts at the pointer address and has capacity equal to the specified {@code size}. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public ShortBuffer getShortBuffer(int size) { return memShortBuffer(get(), size); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a {@link IntBuffer} instance that - * starts at the pointer address and has capacity equal to the specified {@code size}. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public IntBuffer getIntBuffer(int size) { return memIntBuffer(get(), size); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a {@link LongBuffer} instance that - * starts at the pointer address and has capacity equal to the specified {@code size}. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public LongBuffer getLongBuffer(int size) { return memLongBuffer(get(), size); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a {@link FloatBuffer} instance that - * starts at the pointer address and has capacity equal to the specified {@code size}. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public FloatBuffer getFloatBuffer(int size) { return memFloatBuffer(get(), size); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a {@link DoubleBuffer} instance that - * starts at the pointer address and has capacity equal to the specified {@code size}. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public DoubleBuffer getDoubleBuffer(int size) { return memDoubleBuffer(get(), size); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is returned as a {@code PointerBuffer} instance that - * starts at the pointer address and has capacity equal to the specified {@code size}. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public PointerBuffer getPointerBuffer(int size) { return memPointerBuffer(get(), size); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is evaluated as a null-terminated ASCII string, which - * is decoded and returned as a {@link String} instance. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public String getStringASCII() { return memASCII(get()); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is evaluated as a null-terminated UTF-8 string, which - * is decoded and returned as a {@link String} instance. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public String getStringUTF8() { return memUTF8(get()); } - - /** - * Reads the pointer at this buffer's current position, and then increments the position. The pointer is evaluated as a null-terminated UTF-16 string, - * which is decoded and returned as a {@link String} instance. - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public String getStringUTF16() { return memUTF16(get()); } - - // --- - - /** Returns a {@link ByteBuffer} instance that starts at the address found at the specified {@code index} and has capacity equal to the specified size. */ - public ByteBuffer getByteBuffer(int index, int size) { return memByteBuffer(get(index), size); } - - /** Returns a {@link ShortBuffer} instance that starts at the address found at the specified {@code index} and has capacity equal to the specified size. */ - public ShortBuffer getShortBuffer(int index, int size) { return memShortBuffer(get(index), size); } - - /** Returns a {@link IntBuffer} instance that starts at the address found at the specified {@code index} and has capacity equal to the specified size. */ - public IntBuffer getIntBuffer(int index, int size) { return memIntBuffer(get(index), size); } - - /** Returns a {@link LongBuffer} instance that starts at the address found at the specified {@code index} and has capacity equal to the specified size. */ - public LongBuffer getLongBuffer(int index, int size) { return memLongBuffer(get(index), size); } - - /** Returns a {@link FloatBuffer} instance that starts at the address found at the specified {@code index} and has capacity equal to the specified size. */ - public FloatBuffer getFloatBuffer(int index, int size) { return memFloatBuffer(get(index), size); } - - /** Returns a {@link DoubleBuffer} instance that starts at the address found at the specified {@code index} and has capacity equal to the specified size. */ - public DoubleBuffer getDoubleBuffer(int index, int size) { return memDoubleBuffer(get(index), size); } - - /** Returns a {@code PointerBuffer} instance that starts at the address found at the specified {@code index} and has capacity equal to the specified size. */ - public PointerBuffer getPointerBuffer(int index, int size) { return memPointerBuffer(get(index), size); } - - /** Decodes the ASCII string that starts at the address found at the specified {@code index}. */ - public String getStringASCII(int index) { return memASCII(get(index)); } - - /** Decodes the UTF-8 string that starts at the address found at the specified {@code index}. */ - public String getStringUTF8(int index) { return memUTF8(get(index)); } - - /** Decodes the UTF-16 string that starts at the address found at the specified {@code index}. */ - public String getStringUTF16(int index) { return memUTF16(get(index)); } - - // -- Bulk get operations -- - - /** - * Relative bulk get method. - * - *

    This method transfers pointers from this buffer into the specified destination array. An invocation of this method of the form {@code src.get(a)} - * behaves in exactly the same way as the invocation - * - *

    -     *     src.get(a, 0, a.length) 
    - * - * @return This buffer - * - * @throws BufferUnderflowException If there are fewer than {@code length} pointers remaining in this buffer - */ - public PointerBuffer get(long[] dst) { - return get(dst, 0, dst.length); - } - - /** - * Relative bulk get method. - * - *

    This method transfers pointers from this buffer into the specified destination array. If there are fewer pointers remaining in the buffer than are - * required to satisfy the request, that is, if {@code length} {@code >} {@code remaining()}, then no pointers are transferred and a - * {@link BufferUnderflowException} is thrown. - * - *

    Otherwise, this method copies {@code length} pointers from this buffer into the specified array, starting at the current position of this buffer and - * at the specified offset in the array. The position of this buffer is then incremented by {@code length}. - * - *

    In other words, an invocation of this method of the form {@code src.get(dst, off, len)} has exactly the same effect as the loop

    - * - *
    -     *     for (int i = off; i < off + len; i++)
    -     *         dst[i] = src.get(); 
    - * - *

    except that it first checks that there are sufficient pointers in this buffer and it is potentially much more efficient.

    - * - * @param dst the array into which pointers are to be written - * @param offset the offset within the array of the first pointer to be written; must be non-negative and no larger than {@code dst.length} - * @param length the maximum number of pointers to be written to the specified array; must be non-negative and no larger than {@code dst.length - offset} - * - * @return This buffer - * - * @throws BufferUnderflowException If there are fewer than {@code length} pointers remaining in this buffer - * @throws IndexOutOfBoundsException If the preconditions on the {@code offset} and {@code length} parameters do not hold - */ - public PointerBuffer get(long[] dst, int offset, int length) { - if (BITS64) { - memLongBuffer(address(), remaining()).get(dst, offset, length); - position(position() + length); - } else { - get32(dst, offset, length); - } - - return this; - } - - private void get32(long[] dst, int offset, int length) { - checkFromIndexSize(offset, length, dst.length); - if (remaining() < length) { - throw new BufferUnderflowException(); - } - for (int i = offset, end = offset + length; i < end; i++) { - dst[i] = get(); - } - } - - /** - * Relative bulk put method  (optional operation). - * - *

    This method transfers the entire content of the specified source pointer array into this buffer. An invocation of this method of the form - * {@code dst.put(a)} behaves in exactly the same way as the invocation

    - * - *
    -     *     dst.put(a, 0, a.length) 
    - * - * @return This buffer - * - * @throws BufferOverflowException If there is insufficient space in this buffer - */ - public PointerBuffer put(long[] src) { - return put(src, 0, src.length); - } - - /** - * Relative bulk put method  (optional operation). - * - *

    This method transfers pointers into this buffer from the specified source array. If there are more pointers to be copied from the array than remain - * in this buffer, that is, if {@code length} {@code >} {@code remaining()}, then no pointers are transferred and a - * {@link BufferOverflowException} is thrown. - * - *

    Otherwise, this method copies {@code length} pointers from the specified array into this buffer, starting at the specified offset in the array and - * at the current position of this buffer. The position of this buffer is then incremented by {@code length}.

    - * - *

    In other words, an invocation of this method of the form {@code dst.put(src, off, len)} has exactly the same effect as the loop

    - * - *
    -     *     for (int i = off; i < off + len; i++)
    -     *         dst.put(a[i]); 
    - * - *

    except that it first checks that there is sufficient space in this buffer and it is potentially much more efficient.

    - * - * @param src the array from which pointers are to be read - * @param offset the offset within the array of the first pointer to be read; must be non-negative and no larger than {@code array.length} - * @param length the number of pointers to be read from the specified array; must be non-negative and no larger than {@code array.length - offset} - * - * @return This buffer - * - * @throws BufferOverflowException If there is insufficient space in this buffer - * @throws IndexOutOfBoundsException If the preconditions on the {@code offset} and {@code length} parameters do not hold - */ - public PointerBuffer put(long[] src, int offset, int length) { - if (BITS64) { - memLongBuffer(address(), remaining()).put(src, offset, length); - position(position() + length); - } else { - put32(src, offset, length); - } - - return this; - } - - private void put32(long[] src, int offset, int length) { - checkFromIndexSize(offset, length, src.length); - if (remaining() < length) { - throw new BufferOverflowException(); - } - int end = offset + length; - for (int i = offset; i < end; i++) { - put(src[i]); - } - } - - /** - * Returns the current hash code of this buffer. - * - *

    The hash code of a pointer buffer depends only upon its remaining elements; that is, upon the elements from {@code position()} up to, and including, - * the element at {@code limit()} - {@code 1}.

    - * - *

    Because buffer hash codes are content-dependent, it is inadvisable to use buffers as keys in hash maps or similar data structures unless it is known - * that their contents will not change.

    - * - * @return the current hash code of this buffer - */ - public int hashCode() { - int h = 1; - int p = position(); - for (int i = limit() - 1; i >= p; i--) { - h = 31 * h + (int)get(i); - } - return h; - } - - /** - * Tells whether or not this buffer is equal to another object. - * - *

    Two pointer buffers are equal if, and only if,

    - * - *
      - *
    1. They have the same element type,
    2. - *
    3. They have the same number of remaining elements, and
    4. - *
    5. The two sequences of remaining elements, considered - * independently of their starting positions, are pointwise equal.
    6. - *
    - * - *

    A pointer buffer is not equal to any other type of object.

    - * - * @param ob the object to which this buffer is to be compared - * - * @return {@code true} if, and only if, this buffer is equal to the - * given object - */ - public boolean equals(Object ob) { - if (!(ob instanceof PointerBuffer)) { - return false; - } - PointerBuffer that = (PointerBuffer)ob; - if (this.remaining() != that.remaining()) { - return false; - } - int p = this.position(); - for (int i = this.limit() - 1, j = that.limit() - 1; i >= p; i--, j--) { - long v1 = this.get(i); - long v2 = that.get(j); - if (v1 != v2) { - return false; - } - } - return true; - } - - /** - * Compares this buffer to another. - * - *

    Two pointer buffers are compared by comparing their sequences of remaining elements lexicographically, without regard to the starting position of - * each sequence within its corresponding buffer.

    - * - *

    A pointer buffer is not comparable to any other type of object.

    - * - * @return A negative integer, zero, or a positive integer as this buffer is less than, equal to, or greater than the specified buffer - */ - @Override - public int compareTo(PointerBuffer that) { - int n = this.position() + Math.min(this.remaining(), that.remaining()); - for (int i = this.position(), j = that.position(); i < n; i++, j++) { - long v1 = this.get(i); - long v2 = that.get(j); - if (v1 == v2) { - continue; - } - if (v1 < v2) { - return -1; - } - return +1; - } - return this.remaining() - that.remaining(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/PointerWrapper.java b/LWJGL/src/main/java/org/lwjgl/PointerWrapper.java deleted file mode 100644 index 25bad96c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/PointerWrapper.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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; - -/** - * A common interface for classes that wrap pointer addresses. - * - * @author Spasi - */ -public interface PointerWrapper { - - long getPointer(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/PointerWrapperAbstract.java b/LWJGL/src/main/java/org/lwjgl/PointerWrapperAbstract.java deleted file mode 100644 index 972fb49f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/PointerWrapperAbstract.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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.lwjgl; - -/** - * Base PointerWrapper implementation. - * - * @author Spasi - */ -public abstract class PointerWrapperAbstract implements PointerWrapper { - - protected final long pointer; - - protected PointerWrapperAbstract(final long pointer) { - this.pointer = pointer; - } - - /** - * 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 - */ - public boolean isValid() { - return pointer != 0; - } - - /** - * 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() ) - throw new IllegalStateException("This " + getClass().getSimpleName() + " pointer is not valid."); - } - - public final long getPointer() { - checkValid(); - return pointer; - } - - public boolean equals(final Object o) { - if ( this == o ) return true; - if ( !(o instanceof PointerWrapperAbstract) ) return false; - - final PointerWrapperAbstract that = (PointerWrapperAbstract)o; - - if ( pointer != that.pointer ) return false; - - return true; - } - - public int hashCode() { - return (int)(pointer ^ (pointer >>> 32)); - } - - public String toString() { - return getClass().getSimpleName() + " pointer (0x" + Long.toHexString(pointer).toUpperCase() + ")"; - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/Sys.java b/LWJGL/src/main/java/org/lwjgl/Sys.java deleted file mode 100644 index c21b46db..00000000 --- a/LWJGL/src/main/java/org/lwjgl/Sys.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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; - -import org.lwjgl.glfw.GLFW; - -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedExceptionAction; - -import javax.swing.JOptionPane; -import javax.swing.UIManager; - -/** - *

    - * System class (named Sys so as not to conflict with java.lang.System) - *

    - * @author cix_foo - * @version $Revision$ - * $Id$ - */ -public final class Sys { - - /** - * No constructor for Sys. - */ - private Sys() { - } - - /** - * Return the version of the core LWJGL libraries as a String. - */ - public static String getVersion() { - return Version.getVersion(); - } - - /** - * Initialization. This is just a dummy method to trigger the static constructor. - */ - public static void initialize() { - if (!GLFW.glfwInit()) - throw new IllegalStateException("Unable to initialize GLFW"); - } - - /** - * 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. - */ - public static long getTimerResolution() { - return 1000; - } - - /** - * 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) - */ - public static long getTime() { - return GLFW.glfwGetTimerValue(); - } - - public static long getNanoTime() { - return System.nanoTime(); - } - - /** - * Attempt to display a modal alert to the user. This method should be used - * when a game fails to initialize properly or crashes out losing its display - * in the process. It is provided because AWT may not be available on the target - * platform, although on Mac and Linux and other platforms supporting AWT we - * delegate the task to AWT instead of doing it ourselves. - *

    - * The alert should display the title and the message and then the current - * thread should block until the user dismisses the alert - typically with an - * OK button click. - *

    - * It may be that the user's system has no windowing system installed for some - * reason, in which case this method may do nothing at all, or attempt to provide - * some console output. - * - * @param title The title of the alert. We suggest using the title of your game. - * @param message The message text for the alert. - */ - public static void alert(String title, String message) { - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e) { - LWJGLUtil.log("Caught exception while setting Look-and-Feel: " + e); - } - JOptionPane.showMessageDialog(null, message, title, JOptionPane.WARNING_MESSAGE); - } - - /** - * Open the system web browser and point it at the specified URL. It is recommended - * that this not be called whilst your game is running, but on application exit in - * a shutdown hook, as the screen resolution will not be reset when the browser is - * brought into view. - *

    - * There is no guarantee that this will work, nor that we can detect if it has - * failed - hence we don't return success code or throw an Exception. This is just a - * best attempt at opening the URL given - don't rely on it to work! - *

    - * @param url The URL. Ensure that the URL is properly encoded. - * @return false if we are CERTAIN the call has failed - */ - public static boolean openURL(String url) { - // Attempt to use Webstart if we have it available - try { - // Lookup the javax.jnlp.BasicService object - final Class serviceManagerClass = Class.forName("javax.jnlp.ServiceManager"); - Method lookupMethod = AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Method run() throws Exception { - return serviceManagerClass.getMethod("lookup", String.class); - } - }); - Object basicService = lookupMethod.invoke(serviceManagerClass, new Object[] {"javax.jnlp.BasicService"}); - final Class basicServiceClass = Class.forName("javax.jnlp.BasicService"); - Method showDocumentMethod = AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Method run() throws Exception { - return basicServiceClass.getMethod("showDocument", URL.class); - } - }); - try { - Boolean ret = (Boolean) showDocumentMethod.invoke(basicService, new URL(url)); - return ret; - } catch (MalformedURLException e) { - e.printStackTrace(System.err); - return false; - } - } catch (Exception ue) { - return false; - } - } - - /** - * Get the contents of the system clipboard. The system might not have a - * clipboard (particularly if it doesn't even have a keyboard) in which case - * we return null. Otherwise we return a String, which may be the empty - * string "". - * - * @return a String, or null if there is no system clipboard. - */ - public static String getClipboard() { - return GLFW.glfwGetClipboardString(GLFW.glfwGetPrimaryMonitor()); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/Version.java b/LWJGL/src/main/java/org/lwjgl/Version.java deleted file mode 100644 index 47916287..00000000 --- a/LWJGL/src/main/java/org/lwjgl/Version.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl; - -import javax.annotation.*; -import java.io.*; -import java.net.*; -import java.util.*; -import java.util.jar.*; - -/** This class can be used to query the LWJGL version. */ -public final class Version { - - /** Current version of library. */ - public static final int - VERSION_MAJOR = 3, - VERSION_MINOR = 3, - VERSION_REVISION = 3; - - /** The development state of the current build. */ - public static final BuildType BUILD_TYPE = BuildType.STABLE; - - private static final String versionPlain = - String.valueOf(VERSION_MAJOR) + - '.' + VERSION_MINOR + - '.' + VERSION_REVISION + BUILD_TYPE.postfix; - - private static final String version = versionPlain + VersionImpl.find(); - - private Version() { - } - - public static void main(String[] args) { - System.out.println(version); - System.err.println(versionPlain); - } - - /** Returns the LWJGL version. */ - public static String getVersion() { - return version; - } - - /** The development state of the current build. */ - public enum BuildType { - /** Work in progress, unstable. */ - ALPHA("a"), - /** Feature complete, unstable. */ - BETA("b"), - /** Feature complete, stable, official release. */ - STABLE(""); - - public final String postfix; - - BuildType(String postfix) { - this.postfix = postfix; - } - } - - static String createImplementation(String specVersion, String implVersion) { - String build = "+" + (implVersion.startsWith("build ") && 6 < implVersion.length() ? implVersion.substring(6) : implVersion); - - if (specVersion.contains("SNAPSHOT") || specVersion.contains("snapshot")) { - return "-snapshot" + build; - } - - return build; - } - - @Nullable - static String findImplementationFromManifest() { - ClassLoader classLoader = Version.class.getClassLoader(); - - URL url = classLoader.getResource("org/lwjgl/Version.class"); - if (url != null) { - String classURL = url.toString(); - try { - if (classURL.startsWith("jar:")) { // running on standard JDK - URL manifest = Version.class.getResource("/" + JarFile.MANIFEST_NAME); - - String version = readImplementationFromManifest(Objects.requireNonNull(manifest)); - if (version != null) { - return version; - } - } else if (classURL.startsWith("resource:")) { // running on GraalVM native image - Enumeration e = classLoader.getResources(JarFile.MANIFEST_NAME); - while (e.hasMoreElements()) { - String version = readImplementationFromManifest(e.nextElement()); - if (version != null) { - return version; - } - } - } - } catch (Exception ignored) { - } - } - - return null; - } - - @Nullable - private static String readImplementationFromManifest(URL url) { - try (InputStream stream = url.openStream()) { - Attributes attribs = new Manifest(stream).getMainAttributes(); - - // make sure this is the manifest from lwjgl.jar - if (!"lwjgl".equals(attribs.getValue(Attributes.Name.IMPLEMENTATION_TITLE))) { - return null; - } - if (!"lwjgl.org".equals(attribs.getValue(Attributes.Name.IMPLEMENTATION_VENDOR))) { - return null; - } - - String specVersion = attribs.getValue(Attributes.Name.SPECIFICATION_VERSION); - String implVersion = attribs.getValue(Attributes.Name.IMPLEMENTATION_VERSION); - if (specVersion == null || implVersion == null) { - return null; - } - - return createImplementation(specVersion, implVersion); - } catch (Exception ignored) { - return null; - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/VersionImpl.java b/LWJGL/src/main/java/org/lwjgl/VersionImpl.java deleted file mode 100644 index 82154a06..00000000 --- a/LWJGL/src/main/java/org/lwjgl/VersionImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl; - -/** - * Finds the LWJGL implementation version (build type/number). - * - *

    Base implementation for Java 8. When run in the module path, it cannot find the implementation version without reading the JAR manifest. See the - * {@code lwjgl.core9} module for the module-aware implementation.

    - */ -final class VersionImpl { - - static String find() { - Package org_lwjgl = Version.class.getPackage(); - - String specVersion = org_lwjgl.getSpecificationVersion(); - String implVersion = org_lwjgl.getImplementationVersion(); - if (specVersion != null && implVersion != null) { - return Version.createImplementation(specVersion, implVersion); - } - - String version = Version.findImplementationFromManifest(); - if (version != null) { - return version; - } - - return "-snapshot"; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/EventLoop.java b/LWJGL/src/main/java/org/lwjgl/glfw/EventLoop.java deleted file mode 100644 index cca6be2e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/EventLoop.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.macosx.*; - -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.macosx.LibC.*; -import static org.lwjgl.system.macosx.ObjCRuntime.*; - -/** - * Contains checks for the event loop issues on OS X. - * - *

    GLFW can only be used on the main thread and only if that thread is the first thread in the process. This requires running the JVM with - * {@code -XstartOnFirstThread}, which means that other window toolkits (AWT/Swing, JavaFX, etc.) cannot be used at the same time.

    - * - *

    Another window toolkit can be used if GLFW windows are never shown (created with {@link GLFW#GLFW_VISIBLE GLFW_VISIBLE} equal to - * {@link GLFW#GLFW_FALSE GLFW_FALSE}) and only used as contexts for offscreen rendering. This is possible if the window toolkit has initialized and created - * the shared application (NSApp) before GLFW is initialized.

    - */ -final class EventLoop { - - private EventLoop() { - } - - static void check() { - if (Platform.get() == Platform.MACOSX && !isMainThread()) { - // The only way to avoid a crash is if the shared application (NSApp) has been created by something else - throw new IllegalStateException( - isJavaStartedOnFirstThread() - ? "GLFW may only be used on the main thread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0." - : "GLFW may only be used on the main thread and that thread must be the first thread in the process. Please run " + - "the JVM with -XstartOnFirstThread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0." - ); - } - } - - private static boolean isMainThread() { - if (!Configuration.GLFW_CHECK_THREAD0.get(true) || Configuration.GLFW_LIBRARY_NAME.get("").contains("glfw_async")) { - return true; - } - - long objc_msgSend = ObjCRuntime.getLibrary().getFunctionAddress("objc_msgSend"); - - long NSThread = objc_getClass("NSThread"); - long currentThread = invokePPP(NSThread, sel_getUid("currentThread"), objc_msgSend); - - return invokePPZ(currentThread, sel_getUid("isMainThread"), objc_msgSend); - } - - private static boolean isJavaStartedOnFirstThread() { - return "1".equals(System.getenv().get("JAVA_STARTED_ON_FIRST_THREAD_" + getpid())); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFW.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFW.java deleted file mode 100644 index 20924295..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFW.java +++ /dev/null @@ -1,5176 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLFW library. - * - *

    GLFW is a free, Open Source, multi-platform library for opening a window, creating an OpenGL context and managing input. It is easy to integrate into - * existing applications and does not lay claim to the main loop.

    - */ -public class GLFW { - - public static final SharedLibrary GLFW = Library.loadNative(GLFW.class, "org.lwjgl.glfw", Configuration.GLFW_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("glfw")), true); - - /** Contains the function pointers loaded from the glfw {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - Init = apiGetFunctionAddress(GLFW, "glfwInit"), - Terminate = apiGetFunctionAddress(GLFW, "glfwTerminate"), - InitHint = apiGetFunctionAddress(GLFW, "glfwInitHint"), - InitAllocator = apiGetFunctionAddress(GLFW, "glfwInitAllocator"), - GetVersion = apiGetFunctionAddress(GLFW, "glfwGetVersion"), - GetVersionString = apiGetFunctionAddress(GLFW, "glfwGetVersionString"), - GetError = apiGetFunctionAddress(GLFW, "glfwGetError"), - SetErrorCallback = apiGetFunctionAddress(GLFW, "glfwSetErrorCallback"), - GetPlatform = apiGetFunctionAddress(GLFW, "glfwGetPlatform"), - PlatformSupported = apiGetFunctionAddress(GLFW, "glfwPlatformSupported"), - GetMonitors = apiGetFunctionAddress(GLFW, "glfwGetMonitors"), - GetPrimaryMonitor = apiGetFunctionAddress(GLFW, "glfwGetPrimaryMonitor"), - GetMonitorPos = apiGetFunctionAddress(GLFW, "glfwGetMonitorPos"), - GetMonitorWorkarea = apiGetFunctionAddress(GLFW, "glfwGetMonitorWorkarea"), - GetMonitorPhysicalSize = apiGetFunctionAddress(GLFW, "glfwGetMonitorPhysicalSize"), - GetMonitorContentScale = apiGetFunctionAddress(GLFW, "glfwGetMonitorContentScale"), - GetMonitorName = apiGetFunctionAddress(GLFW, "glfwGetMonitorName"), - SetMonitorUserPointer = apiGetFunctionAddress(GLFW, "glfwSetMonitorUserPointer"), - GetMonitorUserPointer = apiGetFunctionAddress(GLFW, "glfwGetMonitorUserPointer"), - SetMonitorCallback = apiGetFunctionAddress(GLFW, "glfwSetMonitorCallback"), - GetVideoModes = apiGetFunctionAddress(GLFW, "glfwGetVideoModes"), - GetVideoMode = apiGetFunctionAddress(GLFW, "glfwGetVideoMode"), - SetGamma = apiGetFunctionAddress(GLFW, "glfwSetGamma"), - GetGammaRamp = apiGetFunctionAddress(GLFW, "glfwGetGammaRamp"), - SetGammaRamp = apiGetFunctionAddress(GLFW, "glfwSetGammaRamp"), - DefaultWindowHints = apiGetFunctionAddress(GLFW, "glfwDefaultWindowHints"), - WindowHint = apiGetFunctionAddress(GLFW, "glfwWindowHint"), - WindowHintString = apiGetFunctionAddress(GLFW, "glfwWindowHintString"), - CreateWindow = apiGetFunctionAddress(GLFW, "glfwCreateWindow"), - DestroyWindow = apiGetFunctionAddress(GLFW, "glfwDestroyWindow"), - WindowShouldClose = apiGetFunctionAddress(GLFW, "glfwWindowShouldClose"), - SetWindowShouldClose = apiGetFunctionAddress(GLFW, "glfwSetWindowShouldClose"), - SetWindowTitle = apiGetFunctionAddress(GLFW, "glfwSetWindowTitle"), - SetWindowIcon = apiGetFunctionAddress(GLFW, "glfwSetWindowIcon"), - GetWindowPos = apiGetFunctionAddress(GLFW, "glfwGetWindowPos"), - SetWindowPos = apiGetFunctionAddress(GLFW, "glfwSetWindowPos"), - GetWindowSize = apiGetFunctionAddress(GLFW, "glfwGetWindowSize"), - SetWindowSizeLimits = apiGetFunctionAddress(GLFW, "glfwSetWindowSizeLimits"), - SetWindowAspectRatio = apiGetFunctionAddress(GLFW, "glfwSetWindowAspectRatio"), - SetWindowSize = apiGetFunctionAddress(GLFW, "glfwSetWindowSize"), - GetFramebufferSize = apiGetFunctionAddress(GLFW, "glfwGetFramebufferSize"), - GetWindowFrameSize = apiGetFunctionAddress(GLFW, "glfwGetWindowFrameSize"), - GetWindowContentScale = apiGetFunctionAddress(GLFW, "glfwGetWindowContentScale"), - GetWindowOpacity = apiGetFunctionAddress(GLFW, "glfwGetWindowOpacity"), - SetWindowOpacity = apiGetFunctionAddress(GLFW, "glfwSetWindowOpacity"), - IconifyWindow = apiGetFunctionAddress(GLFW, "glfwIconifyWindow"), - RestoreWindow = apiGetFunctionAddress(GLFW, "glfwRestoreWindow"), - MaximizeWindow = apiGetFunctionAddress(GLFW, "glfwMaximizeWindow"), - ShowWindow = apiGetFunctionAddress(GLFW, "glfwShowWindow"), - HideWindow = apiGetFunctionAddress(GLFW, "glfwHideWindow"), - FocusWindow = apiGetFunctionAddress(GLFW, "glfwFocusWindow"), - RequestWindowAttention = apiGetFunctionAddress(GLFW, "glfwRequestWindowAttention"), - GetWindowMonitor = apiGetFunctionAddress(GLFW, "glfwGetWindowMonitor"), - SetWindowMonitor = apiGetFunctionAddress(GLFW, "glfwSetWindowMonitor"), - GetWindowAttrib = apiGetFunctionAddress(GLFW, "glfwGetWindowAttrib"), - SetWindowAttrib = apiGetFunctionAddress(GLFW, "glfwSetWindowAttrib"), - SetWindowUserPointer = apiGetFunctionAddress(GLFW, "glfwSetWindowUserPointer"), - GetWindowUserPointer = apiGetFunctionAddress(GLFW, "glfwGetWindowUserPointer"), - SetWindowPosCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowPosCallback"), - SetWindowSizeCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowSizeCallback"), - SetWindowCloseCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowCloseCallback"), - SetWindowRefreshCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowRefreshCallback"), - SetWindowFocusCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowFocusCallback"), - SetWindowIconifyCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowIconifyCallback"), - SetWindowMaximizeCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowMaximizeCallback"), - SetFramebufferSizeCallback = apiGetFunctionAddress(GLFW, "glfwSetFramebufferSizeCallback"), - SetWindowContentScaleCallback = apiGetFunctionAddress(GLFW, "glfwSetWindowContentScaleCallback"), - PollEvents = apiGetFunctionAddress(GLFW, "glfwPollEvents"), - WaitEvents = apiGetFunctionAddress(GLFW, "glfwWaitEvents"), - WaitEventsTimeout = apiGetFunctionAddress(GLFW, "glfwWaitEventsTimeout"), - PostEmptyEvent = apiGetFunctionAddress(GLFW, "glfwPostEmptyEvent"), - GetInputMode = apiGetFunctionAddress(GLFW, "glfwGetInputMode"), - SetInputMode = apiGetFunctionAddress(GLFW, "glfwSetInputMode"), - RawMouseMotionSupported = apiGetFunctionAddress(GLFW, "glfwRawMouseMotionSupported"), - GetKeyName = apiGetFunctionAddress(GLFW, "glfwGetKeyName"), - GetKeyScancode = apiGetFunctionAddress(GLFW, "glfwGetKeyScancode"), - GetKey = apiGetFunctionAddress(GLFW, "glfwGetKey"), - GetMouseButton = apiGetFunctionAddress(GLFW, "glfwGetMouseButton"), - GetCursorPos = apiGetFunctionAddress(GLFW, "glfwGetCursorPos"), - SetCursorPos = apiGetFunctionAddress(GLFW, "glfwSetCursorPos"), - CreateCursor = apiGetFunctionAddress(GLFW, "glfwCreateCursor"), - CreateStandardCursor = apiGetFunctionAddress(GLFW, "glfwCreateStandardCursor"), - DestroyCursor = apiGetFunctionAddress(GLFW, "glfwDestroyCursor"), - SetCursor = apiGetFunctionAddress(GLFW, "glfwSetCursor"), - SetKeyCallback = apiGetFunctionAddress(GLFW, "glfwSetKeyCallback"), - SetCharCallback = apiGetFunctionAddress(GLFW, "glfwSetCharCallback"), - SetCharModsCallback = apiGetFunctionAddress(GLFW, "glfwSetCharModsCallback"), - SetMouseButtonCallback = apiGetFunctionAddress(GLFW, "glfwSetMouseButtonCallback"), - SetCursorPosCallback = apiGetFunctionAddress(GLFW, "glfwSetCursorPosCallback"), - SetCursorEnterCallback = apiGetFunctionAddress(GLFW, "glfwSetCursorEnterCallback"), - SetScrollCallback = apiGetFunctionAddress(GLFW, "glfwSetScrollCallback"), - SetDropCallback = apiGetFunctionAddress(GLFW, "glfwSetDropCallback"), - SetClipboardString = apiGetFunctionAddress(GLFW, "glfwSetClipboardString"), - GetClipboardString = apiGetFunctionAddress(GLFW, "glfwGetClipboardString"), - GetTime = apiGetFunctionAddress(GLFW, "glfwGetTime"), - SetTime = apiGetFunctionAddress(GLFW, "glfwSetTime"), - GetTimerValue = apiGetFunctionAddress(GLFW, "glfwGetTimerValue"), - GetTimerFrequency = apiGetFunctionAddress(GLFW, "glfwGetTimerFrequency"), - GetOSMesaWidth = apiGetFunctionAddress(GLFW, "glfwGetOSMesaWidth"), - GetOSMesaHeight = apiGetFunctionAddress(GLFW, "glfwGetOSMesaHeight"), - GetOSMesaCurrentContext = apiGetFunctionAddress(GLFW, "glfwGetOSMesaCurrentContext"), - GetGraphicBuffersAddr = apiGetFunctionAddress(GLFW, "glfwGetGraphicBuffersAddr"), - MakeContextCurrent = apiGetFunctionAddress(GLFW, "glfwMakeContextCurrent"), - GetCurrentContext = apiGetFunctionAddress(GLFW, "glfwGetCurrentContext"), - SwapBuffers = apiGetFunctionAddress(GLFW, "glfwSwapBuffers"), - SwapInterval = apiGetFunctionAddress(GLFW, "glfwSwapInterval"), - ExtensionSupported = apiGetFunctionAddress(GLFW, "glfwExtensionSupported"), - GetProcAddress = apiGetFunctionAddress(GLFW, "glfwGetProcAddress"); - - } - - /** Returns the glfw {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return GLFW; - } - - /** - * The major version number of the GLFW header. - * - *

    This is incremented when the API is changed in non-compatible ways.

    - */ - public static final int GLFW_VERSION_MAJOR = 3; - - /** - * The minor version number of the GLFW header. - * - *

    This is incremented when features are added to the API but it remains backward-compatible.

    - */ - public static final int GLFW_VERSION_MINOR = 4; - - /** - * The revision number of the GLFW header. - * - *

    This is incremented when a bug fix release is made that does not contain any API changes.

    - */ - public static final int GLFW_VERSION_REVISION = 0; - - /** Boolean values. */ - public static final int - GLFW_TRUE = 1, - GLFW_FALSE = 0; - - /** The key or button was released. */ - public static final int GLFW_RELEASE = 0; - - /** The key or button was pressed. */ - public static final int GLFW_PRESS = 1; - - /** The key was held down until it repeated. */ - public static final int GLFW_REPEAT = 2; - - /** Joystick hat states. */ - public static final int - GLFW_HAT_CENTERED = 0, - GLFW_HAT_UP = 1, - GLFW_HAT_RIGHT = 2, - GLFW_HAT_DOWN = 4, - GLFW_HAT_LEFT = 8, - GLFW_HAT_RIGHT_UP = (GLFW_HAT_RIGHT | GLFW_HAT_UP), - GLFW_HAT_RIGHT_DOWN = (GLFW_HAT_RIGHT | GLFW_HAT_DOWN), - GLFW_HAT_LEFT_UP = (GLFW_HAT_LEFT | GLFW_HAT_UP), - GLFW_HAT_LEFT_DOWN = (GLFW_HAT_LEFT | GLFW_HAT_DOWN); - - /** The unknown key. */ - public static final int GLFW_KEY_UNKNOWN = -1; - - /** Printable keys. */ - public static final int - GLFW_KEY_SPACE = 32, - GLFW_KEY_APOSTROPHE = 39, - GLFW_KEY_COMMA = 44, - GLFW_KEY_MINUS = 45, - GLFW_KEY_PERIOD = 46, - GLFW_KEY_SLASH = 47, - GLFW_KEY_0 = 48, - GLFW_KEY_1 = 49, - GLFW_KEY_2 = 50, - GLFW_KEY_3 = 51, - GLFW_KEY_4 = 52, - GLFW_KEY_5 = 53, - GLFW_KEY_6 = 54, - GLFW_KEY_7 = 55, - GLFW_KEY_8 = 56, - GLFW_KEY_9 = 57, - GLFW_KEY_SEMICOLON = 59, - GLFW_KEY_EQUAL = 61, - GLFW_KEY_A = 65, - GLFW_KEY_B = 66, - GLFW_KEY_C = 67, - GLFW_KEY_D = 68, - GLFW_KEY_E = 69, - GLFW_KEY_F = 70, - GLFW_KEY_G = 71, - GLFW_KEY_H = 72, - GLFW_KEY_I = 73, - GLFW_KEY_J = 74, - GLFW_KEY_K = 75, - GLFW_KEY_L = 76, - GLFW_KEY_M = 77, - GLFW_KEY_N = 78, - GLFW_KEY_O = 79, - GLFW_KEY_P = 80, - GLFW_KEY_Q = 81, - GLFW_KEY_R = 82, - GLFW_KEY_S = 83, - GLFW_KEY_T = 84, - GLFW_KEY_U = 85, - GLFW_KEY_V = 86, - GLFW_KEY_W = 87, - GLFW_KEY_X = 88, - GLFW_KEY_Y = 89, - GLFW_KEY_Z = 90, - GLFW_KEY_LEFT_BRACKET = 91, - GLFW_KEY_BACKSLASH = 92, - GLFW_KEY_RIGHT_BRACKET = 93, - GLFW_KEY_GRAVE_ACCENT = 96, - GLFW_KEY_WORLD_1 = 161, - GLFW_KEY_WORLD_2 = 162; - - /** Function keys. */ - public static final int - GLFW_KEY_ESCAPE = 256, - GLFW_KEY_ENTER = 257, - GLFW_KEY_TAB = 258, - GLFW_KEY_BACKSPACE = 259, - GLFW_KEY_INSERT = 260, - GLFW_KEY_DELETE = 261, - GLFW_KEY_RIGHT = 262, - GLFW_KEY_LEFT = 263, - GLFW_KEY_DOWN = 264, - GLFW_KEY_UP = 265, - GLFW_KEY_PAGE_UP = 266, - GLFW_KEY_PAGE_DOWN = 267, - GLFW_KEY_HOME = 268, - GLFW_KEY_END = 269, - GLFW_KEY_CAPS_LOCK = 280, - GLFW_KEY_SCROLL_LOCK = 281, - GLFW_KEY_NUM_LOCK = 282, - GLFW_KEY_PRINT_SCREEN = 283, - GLFW_KEY_PAUSE = 284, - GLFW_KEY_F1 = 290, - GLFW_KEY_F2 = 291, - GLFW_KEY_F3 = 292, - GLFW_KEY_F4 = 293, - GLFW_KEY_F5 = 294, - GLFW_KEY_F6 = 295, - GLFW_KEY_F7 = 296, - GLFW_KEY_F8 = 297, - GLFW_KEY_F9 = 298, - GLFW_KEY_F10 = 299, - GLFW_KEY_F11 = 300, - GLFW_KEY_F12 = 301, - GLFW_KEY_F13 = 302, - GLFW_KEY_F14 = 303, - GLFW_KEY_F15 = 304, - GLFW_KEY_F16 = 305, - GLFW_KEY_F17 = 306, - GLFW_KEY_F18 = 307, - GLFW_KEY_F19 = 308, - GLFW_KEY_F20 = 309, - GLFW_KEY_F21 = 310, - GLFW_KEY_F22 = 311, - GLFW_KEY_F23 = 312, - GLFW_KEY_F24 = 313, - GLFW_KEY_F25 = 314, - GLFW_KEY_KP_0 = 320, - GLFW_KEY_KP_1 = 321, - GLFW_KEY_KP_2 = 322, - GLFW_KEY_KP_3 = 323, - GLFW_KEY_KP_4 = 324, - GLFW_KEY_KP_5 = 325, - GLFW_KEY_KP_6 = 326, - GLFW_KEY_KP_7 = 327, - GLFW_KEY_KP_8 = 328, - GLFW_KEY_KP_9 = 329, - GLFW_KEY_KP_DECIMAL = 330, - GLFW_KEY_KP_DIVIDE = 331, - GLFW_KEY_KP_MULTIPLY = 332, - GLFW_KEY_KP_SUBTRACT = 333, - GLFW_KEY_KP_ADD = 334, - GLFW_KEY_KP_ENTER = 335, - GLFW_KEY_KP_EQUAL = 336, - GLFW_KEY_LEFT_SHIFT = 340, - GLFW_KEY_LEFT_CONTROL = 341, - GLFW_KEY_LEFT_ALT = 342, - GLFW_KEY_LEFT_SUPER = 343, - GLFW_KEY_RIGHT_SHIFT = 344, - GLFW_KEY_RIGHT_CONTROL = 345, - GLFW_KEY_RIGHT_ALT = 346, - GLFW_KEY_RIGHT_SUPER = 347, - GLFW_KEY_MENU = 348, - GLFW_KEY_LAST = GLFW_KEY_MENU; - - /** If this bit is set one or more Shift keys were held down. */ - public static final int GLFW_MOD_SHIFT = 0x1; - - /** If this bit is set one or more Control keys were held down. */ - public static final int GLFW_MOD_CONTROL = 0x2; - - /** If this bit is set one or more Alt keys were held down. */ - public static final int GLFW_MOD_ALT = 0x4; - - /** If this bit is set one or more Super keys were held down. */ - public static final int GLFW_MOD_SUPER = 0x8; - - /** If this bit is set the Caps Lock key is enabled and the {@link #GLFW_LOCK_KEY_MODS LOCK_KEY_MODS} input mode is set. */ - public static final int GLFW_MOD_CAPS_LOCK = 0x10; - - /** If this bit is set the Num Lock key is enabled and the {@link #GLFW_LOCK_KEY_MODS LOCK_KEY_MODS} input mode is set. */ - public static final int GLFW_MOD_NUM_LOCK = 0x20; - - /** Mouse buttons. See mouse button input for how these are used. */ - public static final int - GLFW_MOUSE_BUTTON_1 = 0, - GLFW_MOUSE_BUTTON_2 = 1, - GLFW_MOUSE_BUTTON_3 = 2, - GLFW_MOUSE_BUTTON_4 = 3, - GLFW_MOUSE_BUTTON_5 = 4, - GLFW_MOUSE_BUTTON_6 = 5, - GLFW_MOUSE_BUTTON_7 = 6, - GLFW_MOUSE_BUTTON_8 = 7, - GLFW_MOUSE_BUTTON_LAST = GLFW_MOUSE_BUTTON_8, - GLFW_MOUSE_BUTTON_LEFT = GLFW_MOUSE_BUTTON_1, - GLFW_MOUSE_BUTTON_RIGHT = GLFW_MOUSE_BUTTON_2, - GLFW_MOUSE_BUTTON_MIDDLE = GLFW_MOUSE_BUTTON_3; - - /** Joysticks. See joystick input for how these are used. */ - public static final int - GLFW_JOYSTICK_1 = 0, - GLFW_JOYSTICK_2 = 1, - GLFW_JOYSTICK_3 = 2, - GLFW_JOYSTICK_4 = 3, - GLFW_JOYSTICK_5 = 4, - GLFW_JOYSTICK_6 = 5, - GLFW_JOYSTICK_7 = 6, - GLFW_JOYSTICK_8 = 7, - GLFW_JOYSTICK_9 = 8, - GLFW_JOYSTICK_10 = 9, - GLFW_JOYSTICK_11 = 10, - GLFW_JOYSTICK_12 = 11, - GLFW_JOYSTICK_13 = 12, - GLFW_JOYSTICK_14 = 13, - GLFW_JOYSTICK_15 = 14, - GLFW_JOYSTICK_16 = 15, - GLFW_JOYSTICK_LAST = GLFW_JOYSTICK_16; - - /** Gamepad buttons. See gamepad for how these are used. */ - public static final int - GLFW_GAMEPAD_BUTTON_A = 0, - GLFW_GAMEPAD_BUTTON_B = 1, - GLFW_GAMEPAD_BUTTON_X = 2, - GLFW_GAMEPAD_BUTTON_Y = 3, - GLFW_GAMEPAD_BUTTON_LEFT_BUMPER = 4, - GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER = 5, - GLFW_GAMEPAD_BUTTON_BACK = 6, - GLFW_GAMEPAD_BUTTON_START = 7, - GLFW_GAMEPAD_BUTTON_GUIDE = 8, - GLFW_GAMEPAD_BUTTON_LEFT_THUMB = 9, - GLFW_GAMEPAD_BUTTON_RIGHT_THUMB = 10, - GLFW_GAMEPAD_BUTTON_DPAD_UP = 11, - GLFW_GAMEPAD_BUTTON_DPAD_RIGHT = 12, - GLFW_GAMEPAD_BUTTON_DPAD_DOWN = 13, - GLFW_GAMEPAD_BUTTON_DPAD_LEFT = 14, - GLFW_GAMEPAD_BUTTON_LAST = GLFW_GAMEPAD_BUTTON_DPAD_LEFT, - GLFW_GAMEPAD_BUTTON_CROSS = GLFW_GAMEPAD_BUTTON_A, - GLFW_GAMEPAD_BUTTON_CIRCLE = GLFW_GAMEPAD_BUTTON_B, - GLFW_GAMEPAD_BUTTON_SQUARE = GLFW_GAMEPAD_BUTTON_X, - GLFW_GAMEPAD_BUTTON_TRIANGLE = GLFW_GAMEPAD_BUTTON_Y; - - /** Gamepad axes. See gamepad for how these are used. */ - public static final int - GLFW_GAMEPAD_AXIS_LEFT_X = 0, - GLFW_GAMEPAD_AXIS_LEFT_Y = 1, - GLFW_GAMEPAD_AXIS_RIGHT_X = 2, - GLFW_GAMEPAD_AXIS_RIGHT_Y = 3, - GLFW_GAMEPAD_AXIS_LEFT_TRIGGER = 4, - GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER = 5, - GLFW_GAMEPAD_AXIS_LAST = GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER; - - /** - * Error codes. - * - *
    Enum values:
    - * - *
      - *
    • {@link #GLFW_NO_ERROR NO_ERROR} - No error has occurred.
    • - *
    • {@link #GLFW_NOT_INITIALIZED NOT_INITIALIZED} - - * GLFW has not been initialized. - * - *

      This occurs if a GLFW function was called that may not be called unless the library is initialized.

      - *
    • - *
    • {@link #GLFW_NO_CURRENT_CONTEXT NO_CURRENT_CONTEXT} - - * No context is current for this thread. - * - *

      This occurs if a GLFW function was called that needs and operates on the current OpenGL or OpenGL ES context but no context is current on the - * calling thread. One such function is {@link #glfwSwapInterval SwapInterval}.

      - *
    • - *
    • {@link #GLFW_INVALID_ENUM INVALID_ENUM} - - * One of the arguments to the function was an invalid enum value. - * - *

      One of the arguments to the function was an invalid enum value, for example requesting {@link #GLFW_RED_BITS RED_BITS} with {@link #glfwGetWindowAttrib GetWindowAttrib}.

      - *
    • - *
    • {@link #GLFW_INVALID_VALUE INVALID_VALUE} - - * One of the arguments to the function was an invalid value. - * - *

      One of the arguments to the function was an invalid value, for example requesting a non-existent OpenGL or OpenGL ES version like 2.7.

      - * - *

      Requesting a valid but unavailable OpenGL or OpenGL ES version will instead result in a {@link #GLFW_VERSION_UNAVAILABLE VERSION_UNAVAILABLE} error.

      - *
    • - *
    • {@link #GLFW_OUT_OF_MEMORY OUT_OF_MEMORY} - - * A memory allocation failed. - * - *

      A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.

      - *
    • - *
    • {@link #GLFW_API_UNAVAILABLE API_UNAVAILABLE} - - * GLFW could not find support for the requested API on the system. - * - *

      The installed graphics driver does not support the requested API, or does not support it via the chosen context creation API. Below are a few - * examples:

      - * - *

      Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via - * a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia - * binary driver. Older graphics drivers do not support Vulkan.

      - *
    • - *
    • {@link #GLFW_VERSION_UNAVAILABLE VERSION_UNAVAILABLE} - - * The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine. - * - *

      The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, - * inform the user that their machine does not match your requirements.

      - * - *

      Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this - * error and not {@link #GLFW_INVALID_VALUE INVALID_VALUE}, because GLFW cannot know what future versions will exist.

      - *
    • - *
    • {@link #GLFW_PLATFORM_ERROR PLATFORM_ERROR} - - * A platform-specific error occurred that does not match any of the more specific categories. - * - *

      A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our - * issue tracker.

      - *
    • - *
    • {@link #GLFW_FORMAT_UNAVAILABLE FORMAT_UNAVAILABLE} - - * The requested format is not supported or available. - * - *

      If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is - * sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.

      - * - *

      If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.

      - *
    • - *
    • {@link #GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} - - * The specified window does not have an OpenGL or OpenGL ES context. - * - *

      A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.

      - * - *

      Application programmer error. Fix the offending call.

      - *
    • - *
    • {@link #GLFW_CURSOR_UNAVAILABLE CURSOR_UNAVAILABLE} - - * The specified cursor shape is not available. - * - *

      The specified standard cursor shape is not available, either because the current platform cursor theme does not provide it or because it is not - * available on the platform.

      - * - *

      Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.

      - *
    • - *
    • {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE} - - * The requested feature is not provided by the platform. - * - *

      The requested feature is not provided by the platform, so GLFW is unable to implement it. The documentation for each function notes if it could - * emit this error.

      - * - *

      Platform or platform version limitation. The error can be ignored unless the feature is critical to the application.

      - * - *

      A function call that emits this error has no effect other than the error and updating any existing out parameters.

      - *
    • - *
    • {@link #GLFW_FEATURE_UNIMPLEMENTED FEATURE_UNIMPLEMENTED} - - * The requested feature has not yet been implemented in GLFW for this platform. - * - *

      An incomplete implementation of GLFW for this platform, hopefully fixed in a future release. The error can be ignored unless the feature is - * critical to the application.

      - * - *

      A function call that emits this error has no effect other than the error and updating any existing out parameters.

      - *
    • - *
    • {@link #GLFW_PLATFORM_UNAVAILABLE PLATFORM_UNAVAILABLE} - - * Platform unavailable or no matching platform was found. - * - *

      If emitted during initialization, no matching platform was found. If {@link #GLFW_PLATFORM PLATFORM} is set to {@link #GLFW_ANY_PLATFORM ANY_PLATFORM}, GLFW could not detect any of the platforms - * supported by this library binary, except for the {@code Null} platform. If set to a specific platform, it is either not supported by this library - * binary or GLFW was not able to detect it.

      - * - *

      If emitted by a native access function, GLFW was initialized for a different platform than the function is for.

      - * - *

      Failure to detect any platform usually only happens on non-macOS Unix systems, either when no window system is running or the program was run from - * a terminal that does not have the necessary environment variables. Fall back to a different platform if possible or notify the user that no usable - * platform was detected.

      - * - *

      Failure to detect a specific platform may have the same cause as above or because support for that platform was not compiled in. Call - * {@link #glfwPlatformSupported PlatformSupported} to check whether a specific platform is supported by a library binary.

      - *
    • - *
    - */ - public static final int - GLFW_NO_ERROR = 0, - GLFW_NOT_INITIALIZED = 0x10001, - GLFW_NO_CURRENT_CONTEXT = 0x10002, - GLFW_INVALID_ENUM = 0x10003, - GLFW_INVALID_VALUE = 0x10004, - GLFW_OUT_OF_MEMORY = 0x10005, - GLFW_API_UNAVAILABLE = 0x10006, - GLFW_VERSION_UNAVAILABLE = 0x10007, - GLFW_PLATFORM_ERROR = 0x10008, - GLFW_FORMAT_UNAVAILABLE = 0x10009, - GLFW_NO_WINDOW_CONTEXT = 0x1000A, - GLFW_CURSOR_UNAVAILABLE = 0x1000B, - GLFW_FEATURE_UNAVAILABLE = 0x1000C, - GLFW_FEATURE_UNIMPLEMENTED = 0x1000D, - GLFW_PLATFORM_UNAVAILABLE = 0x1000E; - - /** - * Window attributes. - * - *
    Enum values:
    - * - *
      - *
    • {@link #GLFW_FOCUSED FOCUSED} - - * {@code WindowHint}: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and - * initially hidden windows. - * - *

      {@code GetWindowAttrib}: Indicates whether the specified window has input focus.

      - *
    • - *
    • {@link #GLFW_ICONIFIED ICONIFIED} - {@code GetWindowAttrib}: Indicates whether the specified window is iconified, whether by the user or with {@link #glfwIconifyWindow IconifyWindow}.
    • - *
    • {@link #GLFW_RESIZABLE RESIZABLE} - - * {@code WindowHint}: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the - * {@link #glfwSetWindowSize SetWindowSize} function. This hint is ignored for full screen windows. - * - *

      {@code GetWindowAttrib}: Indicates whether the specified window is resizable by the user.

      - *
    • - *
    • {@link #GLFW_VISIBLE VISIBLE} - - * {@code WindowHint}: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created - * hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for - * example moving it to a specific location. - * - *

      {@code GetWindowAttrib}: Indicates whether the specified window is visible. Window visibility can be controlled with {@link #glfwShowWindow ShowWindow} and {@link #glfwHideWindow HideWindow}.

      - *
    • - *
    • {@link #GLFW_DECORATED DECORATED} - - * {@code WindowHint}: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window - * may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows. - * - *

      {@code GetWindowAttrib}: Indicates whether the specified window has decorations such as a border, a close widget, etc.

      - *
    • - *
    • {@link #GLFW_AUTO_ICONIFY AUTO_ICONIFY} - - * {@code WindowHint}: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This - * hint is ignored for windowed mode windows. - *
    • - *
    • {@link #GLFW_FLOATING FLOATING} - - * {@code WindowHint}: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This - * is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen - * windows. - * - *

      {@code GetWindowAttrib}: Indicates whether the specified window is floating, also called topmost or always-on-top.

      - *
    • - *
    • {@link #GLFW_MAXIMIZED MAXIMIZED} - - * {@code WindowHint}: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows. - * - *

      {@code GetWindowAttrib}: Indicates whether the specified window is maximized, whether by the user or {@link #glfwMaximizeWindow MaximizeWindow}.

      - *
    • - *
    • {@link #GLFW_CENTER_CURSOR CENTER_CURSOR} - - * {@code WindowHint}: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode - * windows. - *
    • - *
    • {@link #GLFW_TRANSPARENT_FRAMEBUFFER TRANSPARENT_FRAMEBUFFER} - - * {@code WindowHint}: Specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer - * alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations. - *
    • - *
    • {@link #GLFW_HOVERED HOVERED} - {@code GetWindowAttrib}: Indicates whether the cursor is currently directly over the content area of the window, with no other windows between.
    • - *
    • {@link #GLFW_FOCUS_ON_SHOW FOCUS_ON_SHOW} - - * {@code WindowHint}: Specifies whether input focuses on calling show window. - * - *

      {@code GetWindowAttrib}: Indicates whether input focuses on calling show window.

      - *
    • - *
    • {@link #GLFW_MOUSE_PASSTHROUGH MOUSE_PASSTHROUGH} - - * {@code WindowHint}: Specifies whether the window is transparent to mouse input, letting any mouse events pass through to whatever window is behind - * it. This is only supported for undecorated windows. Decorated windows with this enabled will behave differently between platforms. - * - *

      {@code GetWindowAttrib}: Indicates whether the window is transparent to mouse input.

      - *
    • - *
    • {@link #GLFW_POSITION_X POSITION_X} - {@code WindowHint}: Initial position x-coordinate window hint.
    • - *
    • {@link #GLFW_POSITION_Y POSITION_Y} - {@code WindowHint}: Initial position y-coordinate window hint.
    • - *
    - */ - public static final int - GLFW_FOCUSED = 0x20001, - GLFW_ICONIFIED = 0x20002, - GLFW_RESIZABLE = 0x20003, - GLFW_VISIBLE = 0x20004, - GLFW_DECORATED = 0x20005, - GLFW_AUTO_ICONIFY = 0x20006, - GLFW_FLOATING = 0x20007, - GLFW_MAXIMIZED = 0x20008, - GLFW_CENTER_CURSOR = 0x20009, - GLFW_TRANSPARENT_FRAMEBUFFER = 0x2000A, - GLFW_HOVERED = 0x2000B, - GLFW_FOCUS_ON_SHOW = 0x2000C, - GLFW_MOUSE_PASSTHROUGH = 0x2000D, - GLFW_POSITION_X = 0x2000E, - GLFW_POSITION_Y = 0x2000F; - - /** Input options. */ - public static final int - GLFW_CURSOR = 0x33001, - GLFW_STICKY_KEYS = 0x33002, - GLFW_STICKY_MOUSE_BUTTONS = 0x33003, - GLFW_LOCK_KEY_MODS = 0x33004, - GLFW_RAW_MOUSE_MOTION = 0x33005; - - /** Cursor state. */ - public static final int - GLFW_CURSOR_NORMAL = 0x34001, - GLFW_CURSOR_HIDDEN = 0x34002, - GLFW_CURSOR_DISABLED = 0x34003, - GLFW_CURSOR_CAPTURED = 0x34004; - - /** The regular arrow cursor shape. */ - public static final int GLFW_ARROW_CURSOR = 0x36001; - - /** The text input I-beam cursor shape. */ - public static final int GLFW_IBEAM_CURSOR = 0x36002; - - /** The crosshair cursor shape. */ - public static final int GLFW_CROSSHAIR_CURSOR = 0x36003; - - /** The pointing hand cursor shape. */ - public static final int GLFW_POINTING_HAND_CURSOR = 0x36004; - - /** - * The horizontal resize/move arrow shape. - * - *

    This is usually a horizontal double-headed arrow.

    - */ - public static final int GLFW_RESIZE_EW_CURSOR = 0x36005; - - /** - * The vertical resize/move shape. - * - *

    This is usually a vertical double-headed arrow.

    - */ - public static final int GLFW_RESIZE_NS_CURSOR = 0x36006; - - /** - * The top-left to bottom-right diagonal resize/move shape. - * - *

    This is usually a diagonal double-headed arrow.

    - * - *
    Note
    - * - *
      - *
    • macOS: This shape is provided by a private system API and may fail with {@link #GLFW_CURSOR_UNAVAILABLE CURSOR_UNAVAILABLE} in the future.
    • - *
    • X11: This shape is provided by a newer standard not supported by all cursor themes.
    • - *
    • Wayland: This shape is provided by a newer standard not supported by all cursor themes.
    • - *
    - */ - public static final int GLFW_RESIZE_NWSE_CURSOR = 0x36007; - - /** - * The top-right to bottom-left diagonal resize/move shape. - * - *

    This is usually a diagonal double-headed arrow.

    - * - *
    Note
    - * - *
      - *
    • macOS: This shape is provided by a private system API and may fail with {@link #GLFW_CURSOR_UNAVAILABLE CURSOR_UNAVAILABLE} in the future.
    • - *
    • X11: This shape is provided by a newer standard not supported by all cursor themes.
    • - *
    • Wayland: This shape is provided by a newer standard not supported by all cursor themes.
    • - *
    - */ - public static final int GLFW_RESIZE_NESW_CURSOR = 0x36008; - - /** - * The omni-directional resize cursor/move shape. - * - *

    This is usually either a combined horizontal and vertical double-headed arrow or a grabbing hand.

    - */ - public static final int GLFW_RESIZE_ALL_CURSOR = 0x36009; - - /** - * The operation-not-allowed shape. - * - *

    This is usually a circle with a diagonal line through it.

    - * - *
    Note
    - * - *
      - *
    • X11: This shape is provided by a newer standard not supported by all cursor themes.
    • - *
    • Wayland: This shape is provided by a newer standard not supported by all cursor themes.
    • - *
    - */ - public static final int GLFW_NOT_ALLOWED_CURSOR = 0x3600A; - - /** Legacy name for compatibility. */ - public static final int GLFW_HRESIZE_CURSOR = GLFW_RESIZE_EW_CURSOR; - - /** Legacy name for compatibility. */ - public static final int GLFW_VRESIZE_CURSOR = GLFW_RESIZE_NS_CURSOR; - - /** Legacy name for compatibility. */ - public static final int GLFW_HAND_CURSOR = GLFW_POINTING_HAND_CURSOR; - - /** Monitor events. */ - public static final int - GLFW_CONNECTED = 0x40001, - GLFW_DISCONNECTED = 0x40002; - - /** - * Joystick hat buttons init hint. - * - *

    Specifies whether to also expose joystick hats as buttons, for compatibility with earlier versions of GLFW that did not have {@link #glfwGetJoystickHats GetJoystickHats}. - * Possible values are {@link #GLFW_TRUE TRUE} and {@link #GLFW_FALSE FALSE}.

    - */ - public static final int GLFW_JOYSTICK_HAT_BUTTONS = 0x50001; - - /** - * ANGLE rendering backend init hint. - * - *

    Specifies the platform type (rendering backend) to request when using OpenGL ES and EGL via ANGLE. If the requested platform type is unavailable, ANGLE will use its default. Possible values are one of {@link #GLFW_ANGLE_PLATFORM_TYPE_NONE ANGLE_PLATFORM_TYPE_NONE}, - * {@link #GLFW_ANGLE_PLATFORM_TYPE_OPENGL ANGLE_PLATFORM_TYPE_OPENGL}, {@link #GLFW_ANGLE_PLATFORM_TYPE_OPENGLES ANGLE_PLATFORM_TYPE_OPENGLES}, {@link #GLFW_ANGLE_PLATFORM_TYPE_D3D9 ANGLE_PLATFORM_TYPE_D3D9}, {@link #GLFW_ANGLE_PLATFORM_TYPE_D3D11 ANGLE_PLATFORM_TYPE_D3D11}, {@link #GLFW_ANGLE_PLATFORM_TYPE_VULKAN ANGLE_PLATFORM_TYPE_VULKAN} and - * {@link #GLFW_ANGLE_PLATFORM_TYPE_METAL ANGLE_PLATFORM_TYPE_METAL}.

    - */ - public static final int GLFW_ANGLE_PLATFORM_TYPE = 0x50002; - - public static final int GLFW_ANY_POSITION = 0x80000000; - - /** Platform selection init hint. */ - public static final int GLFW_PLATFORM = 0x50003; - - /** - * macOS specific init hint. - * - *

    Specifies whether to set the current directory to the application to the {@code Contents/Resources} subdirectory of the application's bundle, if - * present. Possible values are {@link #GLFW_TRUE TRUE}` and {@link #GLFW_FALSE FALSE}`. This is ignored on other platforms.

    - */ - public static final int GLFW_COCOA_CHDIR_RESOURCES = 0x51001; - - /** - * macOS specific init hint. - * - *

    Specifies whether to create the menu bar and dock icon when GLFW is initialized. This applies whether the menu bar is created from a nib or manually by - * GLFW. Possible values are {@link #GLFW_TRUE TRUE} and {@link #GLFW_FALSE FALSE}. This is ignored on other platforms.

    - */ - public static final int GLFW_COCOA_MENUBAR = 0x51002; - - /** X11 specific init hint. */ - public static final int GLFW_X11_XCB_VULKAN_SURFACE = 0x52001; - - /** Wayland specific init hint. */ - public static final int GLFW_WAYLAND_LIBDECOR = 0x53001; - - /** Hint value for {@link #GLFW_PLATFORM PLATFORM} that enables automatic platform selection. */ - public static final int - GLFW_ANY_PLATFORM = 0x60000, - GLFW_PLATFORM_WIN32 = 0x60001, - GLFW_PLATFORM_COCOA = 0x60002, - GLFW_PLATFORM_WAYLAND = 0x60003, - GLFW_PLATFORM_X11 = 0x60004, - GLFW_PLATFORM_NULL = 0x60005; - - /** Don't care value. */ - public static final int GLFW_DONT_CARE = -1; - - /** PixelFormat hints. */ - public static final int - GLFW_RED_BITS = 0x21001, - GLFW_GREEN_BITS = 0x21002, - GLFW_BLUE_BITS = 0x21003, - GLFW_ALPHA_BITS = 0x21004, - GLFW_DEPTH_BITS = 0x21005, - GLFW_STENCIL_BITS = 0x21006, - GLFW_ACCUM_RED_BITS = 0x21007, - GLFW_ACCUM_GREEN_BITS = 0x21008, - GLFW_ACCUM_BLUE_BITS = 0x21009, - GLFW_ACCUM_ALPHA_BITS = 0x2100A, - GLFW_AUX_BUFFERS = 0x2100B, - GLFW_STEREO = 0x2100C, - GLFW_SAMPLES = 0x2100D, - GLFW_SRGB_CAPABLE = 0x2100E, - GLFW_REFRESH_RATE = 0x2100F, - GLFW_DOUBLEBUFFER = 0x21010; - - /** - * Client API hints. - * - *
    Enum values:
    - * - *
      - *
    • {@link #GLFW_CLIENT_API CLIENT_API} - - * {@code WindowHint}: Specifies which client API to create the context for. Possible values are {@link #GLFW_OPENGL_API OPENGL_API}, {@link #GLFW_OPENGL_ES_API OPENGL_ES_API} and {@link #GLFW_NO_API NO_API}. This is a hard - * constraint. - * - *

      {@code GetWindowAttrib}: Indicates the client API provided by the window's context; either {@link #GLFW_OPENGL_API OPENGL_API}, {@link #GLFW_OPENGL_ES_API OPENGL_ES_API} or {@link #GLFW_NO_API NO_API}.

      - *
    • - *
    • {@link #GLFW_CONTEXT_VERSION_MAJOR CONTEXT_VERSION_MAJOR} - - * {@code WindowHint}: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on - * the requested client API. - * - *
      Note
      - * - *
        - *
      • While there is no way to ask the driver for a context of the highest supported version, GLFW will attempt to provide this when you ask for a - * version 1.0 context, which is the default for these hints.
      • - *
      • OpenGL: {@link #GLFW_CONTEXT_VERSION_MAJOR CONTEXT_VERSION_MAJOR} and {@link #GLFW_CONTEXT_VERSION_MINOR CONTEXT_VERSION_MINOR} are not hard constraints, but creation will fail if the OpenGL version of the - * created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will - * still get backwards-compatible contexts of version 3.0 and above when available.
      • - *
      • OpenGL ES: {@link #GLFW_CONTEXT_VERSION_MAJOR CONTEXT_VERSION_MAJOR} and {@link #GLFW_CONTEXT_VERSION_MINOR CONTEXT_VERSION_MINOR} are not hard constraints, but creation will fail if the OpenGL ES version - * of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice - * versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.
      • - *
      - * - *

      {@code GetWindowAttrib}: Indicate the client API major version of the window's context.

      - *
    • - *
    • {@link #GLFW_CONTEXT_VERSION_MINOR CONTEXT_VERSION_MINOR} - - * {@code WindowHint}: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on - * the requested client API. - * - *

      {@code GetWindowAttrib}: Indicate the client API minor version of the window's context.

      - *
    • - *
    • {@link #GLFW_CONTEXT_REVISION CONTEXT_REVISION} - {@code GetWindowAttrib}: Indicates the client API version of the window's context.
    • - *
    • {@link #GLFW_CONTEXT_ROBUSTNESS CONTEXT_ROBUSTNESS} - - * {@code WindowHint}: Specifies the robustness strategy to be used by the context. This can be one of {@link #GLFW_NO_RESET_NOTIFICATION NO_RESET_NOTIFICATION} or {@link #GLFW_LOSE_CONTEXT_ON_RESET LOSE_CONTEXT_ON_RESET}, or - * {@link #GLFW_NO_ROBUSTNESS NO_ROBUSTNESS} to not request a robustness strategy. - * - *

      {@code GetWindowAttrib}: Indicates the robustness strategy used by the context. This is {@link #GLFW_LOSE_CONTEXT_ON_RESET LOSE_CONTEXT_ON_RESET} or {@link #GLFW_NO_RESET_NOTIFICATION NO_RESET_NOTIFICATION} if the window's - * context supports robustness, or {@link #GLFW_NO_ROBUSTNESS NO_ROBUSTNESS} otherwise.

      - *
    • - *
    • {@link #GLFW_OPENGL_FORWARD_COMPAT OPENGL_FORWARD_COMPAT} - - * {@code WindowHint}: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested - * version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is - * ignored. - * - *

      {@code GetWindowAttrib}: Indicates if the window's context is an OpenGL forward-compatible one.

      - *
    • - *
    • {@link #GLFW_CONTEXT_DEBUG CONTEXT_DEBUG} - - * {@code WindowHint}: Specifies whether to create a debug context, which may have additional error and performance issue reporting functionality. - * - *

      {@code GetWindowAttrib}: Indicates if the window's context is a debug context.

      - *
    • - *
    • {@link #GLFW_OPENGL_DEBUG_CONTEXT OPENGL_DEBUG_CONTEXT} - Alias of {@link #GLFW_CONTEXT_DEBUG CONTEXT_DEBUG} for compatibility with earlier versions.
    • - *
    • {@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE} - - * {@code WindowHint}: Specifies which OpenGL profile to create the context for. Possible values are one of {@link #GLFW_OPENGL_CORE_PROFILE OPENGL_CORE_PROFILE} or {@link #GLFW_OPENGL_COMPAT_PROFILE OPENGL_COMPAT_PROFILE}, - * or {@link #GLFW_OPENGL_ANY_PROFILE OPENGL_ANY_PROFILE} to not request a specific profile. If requesting an OpenGL version below 3.2, {@link #GLFW_OPENGL_ANY_PROFILE OPENGL_ANY_PROFILE} must be used. If OpenGL ES - * is requested, this hint is ignored. - * - *

      {@code GetWindowAttrib}: Indicates the OpenGL profile used by the context. This is {@link #GLFW_OPENGL_CORE_PROFILE OPENGL_CORE_PROFILE} or {@link #GLFW_OPENGL_COMPAT_PROFILE OPENGL_COMPAT_PROFILE} if the context uses a - * known profile, or {@link #GLFW_OPENGL_ANY_PROFILE OPENGL_ANY_PROFILE} if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may - * not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.

      - *
    • - *
    • {@link #GLFW_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR} - - * {@code WindowHint}: Specifies the release behavior to be used by the context. If the behavior is {@link #GLFW_ANY_RELEASE_BEHAVIOR ANY_RELEASE_BEHAVIOR}, the default behavior of the - * context creation API will be used. If the behavior is {@link #GLFW_RELEASE_BEHAVIOR_FLUSH RELEASE_BEHAVIOR_FLUSH}, the pipeline will be flushed whenever the context is released from - * being the current one. If the behavior is {@link #GLFW_RELEASE_BEHAVIOR_NONE RELEASE_BEHAVIOR_NONE}, the pipeline will not be flushed on release. - *
    • - *
    • {@link #GLFW_CONTEXT_NO_ERROR CONTEXT_NO_ERROR} - - * {@code WindowHint}: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause - * undefined behavior. - *
    • - *
    • {@link #GLFW_CONTEXT_CREATION_API CONTEXT_CREATION_API} - - * {@code WindowHint}: Specifies which context creation API to use to create the context. Possible values are {@link #GLFW_NATIVE_CONTEXT_API NATIVE_CONTEXT_API}, {@link #GLFW_EGL_CONTEXT_API EGL_CONTEXT_API} - * and {@link #GLFW_OSMESA_CONTEXT_API OSMESA_CONTEXT_API}. This is a hard constraint. If no client API is requested, this hint is ignored. - * - *
      Note
      - * - *
        - *
      • macOS: The EGL API is not available on this platform and requests to use it will fail.
      • - *
      • Wayland, Mir: The EGL API is the native context creation API, so this hint will have no effect.
      • - *
      • An OpenGL extension loader library that assumes it knows which context creation API is used on a given platform may fail if you change this - * hint. This can be resolved by having it load via {@link #glfwGetProcAddress GetProcAddress}, which always uses the selected API.
      • - *
      - * - *

      {@code GetWindowAttrib}: Indicates the context creation API used to create the window's context; either {@link #GLFW_NATIVE_CONTEXT_API NATIVE_CONTEXT_API} or {@link #GLFW_EGL_CONTEXT_API EGL_CONTEXT_API}.

      - *
    • - *
    • {@link #GLFW_SCALE_TO_MONITOR SCALE_TO_MONITOR} - - * {@code WindowHint}: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on. - * This includes the initial placement when the window is created. Possible values are {@link #GLFW_TRUE TRUE} and {@link #GLFW_FALSE FALSE}. - * - *

      This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the - * resolution of the framebuffer is changed independently of the window size.

      - *
    • - *
    - */ - public static final int - GLFW_CLIENT_API = 0x22001, - GLFW_CONTEXT_VERSION_MAJOR = 0x22002, - GLFW_CONTEXT_VERSION_MINOR = 0x22003, - GLFW_CONTEXT_REVISION = 0x22004, - GLFW_CONTEXT_ROBUSTNESS = 0x22005, - GLFW_OPENGL_FORWARD_COMPAT = 0x22006, - GLFW_CONTEXT_DEBUG = 0x22007, - GLFW_OPENGL_DEBUG_CONTEXT = GLFW_CONTEXT_DEBUG, - GLFW_OPENGL_PROFILE = 0x22008, - GLFW_CONTEXT_RELEASE_BEHAVIOR = 0x22009, - GLFW_CONTEXT_NO_ERROR = 0x2200A, - GLFW_CONTEXT_CREATION_API = 0x2200B, - GLFW_SCALE_TO_MONITOR = 0x2200C; - - /** - * Specifies whether to use full resolution framebuffers on Retina displays. - * - *

    This is ignored on other platforms.

    - */ - public static final int GLFW_COCOA_RETINA_FRAMEBUFFER = 0x23001; - - /** - * Specifies the UTF-8 encoded name to use for autosaving the window frame, or if empty disables frame autosaving for the window. - * - *

    This is ignored on other platforms.

    - */ - public static final int GLFW_COCOA_FRAME_NAME = 0x23002; - - /** - * Specifies whether to enable Automatic Graphics Switching, i.e. to allow the system to choose the integrated GPU for the OpenGL context and move it - * between GPUs if necessary or whether to force it to always run on the discrete GPU. This only affects systems with both integrated and discrete GPUs. - * - *

    This is ignored on other platforms.

    - */ - public static final int GLFW_COCOA_GRAPHICS_SWITCHING = 0x23003; - - /** - * The desired ASCII encoded class and instance parts of the ICCCM {@code WM_CLASS} window property. - * - *

    These are ignored on other platforms.

    - */ - public static final int - GLFW_X11_CLASS_NAME = 0x24001, - GLFW_X11_INSTANCE_NAME = 0x24002; - - /** - * Specifies whether to allow access to the window menu via the Alt+Space and Alt-and-then-Space keyboard shortcuts. - * - *

    This is ignored on other platforms.

    - */ - public static final int GLFW_WIN32_KEYBOARD_MENU = 0x25001; - - /** - * Allows specification of the Wayland {@code app_id}. - * - *

    This is ignored on other platforms.

    - */ - public static final int GLFW_WAYLAND_APP_ID = 0x26001; - - /** Values for the {@link #GLFW_CLIENT_API CLIENT_API} hint. */ - public static final int - GLFW_NO_API = 0, - GLFW_OPENGL_API = 0x30001, - GLFW_OPENGL_ES_API = 0x30002; - - /** Values for the {@link #GLFW_CONTEXT_ROBUSTNESS CONTEXT_ROBUSTNESS} hint. */ - public static final int - GLFW_NO_ROBUSTNESS = 0, - GLFW_NO_RESET_NOTIFICATION = 0x31001, - GLFW_LOSE_CONTEXT_ON_RESET = 0x31002; - - /** Values for the {@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE} hint. */ - public static final int - GLFW_OPENGL_ANY_PROFILE = 0, - GLFW_OPENGL_CORE_PROFILE = 0x32001, - GLFW_OPENGL_COMPAT_PROFILE = 0x32002; - - /** Values for the {@link #GLFW_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR} hint. */ - public static final int - GLFW_ANY_RELEASE_BEHAVIOR = 0, - GLFW_RELEASE_BEHAVIOR_FLUSH = 0x35001, - GLFW_RELEASE_BEHAVIOR_NONE = 0x35002; - - /** Values for the {@link #GLFW_CONTEXT_CREATION_API CONTEXT_CREATION_API} hint. */ - public static final int - GLFW_NATIVE_CONTEXT_API = 0x36001, - GLFW_EGL_CONTEXT_API = 0x36002, - GLFW_OSMESA_CONTEXT_API = 0x36003; - - /** Values for the {@link #GLFW_ANGLE_PLATFORM_TYPE ANGLE_PLATFORM_TYPE} hint. */ - public static final int - GLFW_ANGLE_PLATFORM_TYPE_NONE = 0x37001, - GLFW_ANGLE_PLATFORM_TYPE_OPENGL = 0x37002, - GLFW_ANGLE_PLATFORM_TYPE_OPENGLES = 0x37003, - GLFW_ANGLE_PLATFORM_TYPE_D3D9 = 0x37004, - GLFW_ANGLE_PLATFORM_TYPE_D3D11 = 0x37005, - GLFW_ANGLE_PLATFORM_TYPE_VULKAN = 0x37007, - GLFW_ANGLE_PLATFORM_TYPE_METAL = 0x37008; - - /** Values for the {@link #GLFW_WAYLAND_LIBDECOR WAYLAND_LIBDECOR} hint. */ - public static final int - GLFW_WAYLAND_PREFER_LIBDECOR = 0x38001, - GLFW_WAYLAND_DISABLE_LIBDECOR = 0x38002; - - private static double glfwInitialTime; - private static final GLFWVidMode glfwVidMode; - public static int glfwWindowWidth; - public static int glfwWindowHeight; - - protected GLFW() { - throw new UnsupportedOperationException(); - } - - static { - glfwWindowWidth = Integer.parseInt(System.getProperty("window.width")); - glfwWindowHeight = Integer.parseInt(System.getProperty("window.height")); - glfwVidMode = new GLFWVidMode(ByteBuffer.allocateDirect(GLFWVidMode.SIZEOF)); - memPutInt(glfwVidMode.address() + GLFWVidMode.WIDTH, glfwWindowWidth); - memPutInt(glfwVidMode.address() + GLFWVidMode.HEIGHT, glfwWindowHeight); - memPutInt(glfwVidMode.address() + GLFWVidMode.REDBITS, 8); - memPutInt(glfwVidMode.address() + GLFWVidMode.GREENBITS, 8); - memPutInt(glfwVidMode.address() + GLFWVidMode.BLUEBITS, 8); - memPutInt(glfwVidMode.address() + GLFWVidMode.REFRESHRATE, 60); - } - - // --- [ glfwInit ] --- - - /** - * Initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before an application terminates GLFW should be - * terminated in order to free any resources allocated during or after initialization. - * - *

    If this function fails, it calls {@link #glfwTerminate Terminate} before returning. If it succeeds, you should call {@link #glfwTerminate Terminate} before the application exits.

    - * - *

    Additional calls to this function after successful initialization but before termination will return {@link #GLFW_TRUE TRUE} immediately.

    - * - *

    The {@link #GLFW_PLATFORM PLATFORM} init hint controls which platforms are considered during initialization. This also depends on which platforms the library was compiled to - * support.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • macOS: This function will change the current directory of the application to the `Contents/Resources` subdirectory of the application's - * bundle, if present. This can be disabled with the {@link #GLFW_COCOA_CHDIR_RESOURCES COCOA_CHDIR_RESOURCES} init hint.
    • - *
    • macOS: This function will create the main menu and dock icon for the application. If GLFW finds a {@code MainMenu.nib} it is loaded and - * assumed to contain a menu bar. Otherwise a minimal menu bar is created manually with common commands like Hide, Quit and About. The About entry - * opens a minimal about dialog with information from the application's bundle. The menu bar and dock icon can be disabled entirely with the - * {@link #GLFW_COCOA_MENUBAR COCOA_MENUBAR} init hint.
    • - *
    • x11: This function will set the {@code LC_CTYPE} category of the application locale according to the current environment if that category is - * still "C". This is because the "C" locale breaks Unicode text input.
    • - *
    - * - * @return {@link #GLFW_TRUE TRUE} if successful, or {@link #GLFW_FALSE FALSE} if an error occurred. - * - *

    Possible errors include {@link #GLFW_PLATFORM_UNAVAILABLE PLATFORM_UNAVAILABLE} and {@link #GLFW_PLATFORM_ERROR PLATFORM_ERROR}.

    - * - * @since version 1.0 - */ - @NativeType("int") - public static boolean glfwInit() { - glfwInitialTime = (double) System.nanoTime(); - long __functionAddress = Functions.Init; - EventLoop.check(); - return invokeI(__functionAddress) != 0; - } - - // --- [ glfwTerminate ] --- - - /** - * Terminates the GLFW library. - * - *

    This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources. Once this function - * is called, you must again call {@link #glfwInit Init} successfully before you will be able to use most GLFW functions.

    - * - *

    If GLFW has been successfully initialized, this function should be called before the application exits. If initialization fails, there is no need to - * call this function, as it is called by {@link #glfwInit Init} before it returns failure.

    - * - *

    This function has no effect if GLFW is not initialized.

    - * - *
    Note
    - * - *
      - *
    • This function may be called before {@link #glfwInit Init}.
    • - *
    • This function must only be called from the main thread.
    • - *
    • This function must not be called from a callback.
    • - *
    • No window's context may be current on another thread when this function is called.
    • - *
    - * - * @since version 1.0 - */ - public static void glfwTerminate() { - long __functionAddress = Functions.Terminate; - invokeV(__functionAddress); - } - - // --- [ glfwInitHint ] --- - - /** - * Sets hints for the next initialization of GLFW. - * - *

    The values you set hints to are never reset by GLFW, but they only take effect during initialization. Once GLFW has been initialized, any values you - * set will be ignored until the library is terminated and initialized again.

    - * - *

    Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will simply - * ignore them. Setting these hints requires no platform specific headers or functions.

    - * - *
    Note
    - * - *
      - *
    • This function may be called before {@link #glfwInit Init}.
    • - *
    • This function must only be called from the main thread.
    • - *
    - * - * @param hint the init hint to set. One of:
    {@link #GLFW_JOYSTICK_HAT_BUTTONS JOYSTICK_HAT_BUTTONS}{@link #GLFW_ANGLE_PLATFORM_TYPE ANGLE_PLATFORM_TYPE}{@link #GLFW_COCOA_CHDIR_RESOURCES COCOA_CHDIR_RESOURCES}{@link #GLFW_COCOA_MENUBAR COCOA_MENUBAR}
    {@link #GLFW_PLATFORM PLATFORM}{@link #GLFW_X11_XCB_VULKAN_SURFACE X11_XCB_VULKAN_SURFACE}
    - * @param value the new value of the init hint - * - * @since version 3.3 - */ - public static void glfwInitHint(int hint, int value) {} - - // --- [ glfwInitAllocator ] --- - - /** Unsafe version of: {@link #glfwInitAllocator InitAllocator} */ - public static void nglfwInitAllocator(long allocator) { - long __functionAddress = Functions.InitAllocator; - if (CHECKS) { - if (allocator != NULL) { GLFWAllocator.validate(allocator); } - } - invokePV(allocator, __functionAddress); - } - - /** - * Sets the init allocator to the desired value. - * - *

    To use the default allocator, call this function with a {@code NULL} argument.

    - * - *

    If you specify an allocator struct, every member must be a valid function pointer. If any member is {@code NULL}, this function emits {@link #GLFW_INVALID_VALUE INVALID_VALUE} and the - * init allocator is unchanged.

    - * - *
    Note
    - * - *
      - *
    • Possible errors include {@link #GLFW_INVALID_VALUE INVALID_VALUE}.
    • - *
    • The specified allocator is copied before this function returns.
    • - *
    • This function must only be called from the main thread.
    • - *
    - * - * @param allocator the allocator to use at the next initialization, or {@code NULL} to use the default one - * - * @since version 3.4 - */ - public static void glfwInitAllocator(@Nullable @NativeType("GLFWallocator const *") GLFWAllocator allocator) { - nglfwInitAllocator(memAddressSafe(allocator)); - } - - // --- [ glfwGetVersion ] --- - - /** Unsafe version of: {@link #glfwGetVersion GetVersion} */ - public static void nglfwGetVersion(long major, long minor, long rev) { - long __functionAddress = Functions.GetVersion; - invokePPPV(major, minor, rev, __functionAddress); - } - - /** - * Retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure - * that you are using the minimum required version. - * - *
    Note
    - * - *
      - *
    • Any or all of the version arguments may be {@code NULL}.
    • - *
    • This function always succeeds.
    • - *
    • This function may be called before {@link #glfwInit Init}.
    • - *
    • This function may be called from any thread.
    • - *
    - * - * @param major where to store the major version number, or {@code NULL} - * @param minor where to store the minor version number, or {@code NULL} - * @param rev where to store the revision number, or {@code NULL} - * - * @since version 1.0 - */ - public static void glfwGetVersion(@Nullable @NativeType("int *") IntBuffer major, @Nullable @NativeType("int *") IntBuffer minor, @Nullable @NativeType("int *") IntBuffer rev) { - if (CHECKS) { - checkSafe(major, 1); - checkSafe(minor, 1); - checkSafe(rev, 1); - } - nglfwGetVersion(memAddressSafe(major), memAddressSafe(minor), memAddressSafe(rev)); - } - - // --- [ glfwGetVersionString ] --- - - /** Unsafe version of: {@link #glfwGetVersionString GetVersionString} */ - public static long nglfwGetVersionString() { - long __functionAddress = Functions.GetVersionString; - return invokeP(__functionAddress); - } - - /** - * Returns the compile-time generated version string of the GLFW library binary. It describes the version, platforms, compiler and any platform or - * operating system specific compile-time options. It should not be confused with the OpenGL or OpenGL ES version string, queried with - * {@code glGetString}. - * - *

    Do not use the version string to parse the GLFW library version. The {@link #glfwGetVersion GetVersion} function already provides the version of the library binary - * in numerical format.

    - * - *

    Do not use the version string to parse what platforms are supported. The {@link #glfwPlatformSupported PlatformSupported} function lets you query platform support.

    - * - *
    Note
    - * - *
      - *
    • This function always succeeds.
    • - *
    • This function may be called before {@link #glfwInit Init}.
    • - *
    • This function may be called from any thread.
    • - *
    • The returned string is static and compile-time generated.
    • - *
    - * - * @return the ASCII encoded GLFW version string - * - * @since version 3.0 - */ - @NativeType("char const *") - public static String glfwGetVersionString() { - long __result = nglfwGetVersionString(); - return memASCII(__result); - } - - // --- [ glfwGetError ] --- - - /** Unsafe version of: {@link #glfwGetError GetError} */ - public static int nglfwGetError(long description) { - long __functionAddress = Functions.GetError; - return invokePI(description, __functionAddress); - } - - /** - * Returns and clears the last error for the calling thread. - * - *

    This function returns and clears the error code of the last error that occurred on the calling thread and optionally a UTF-8 encoded human-readable - * description of it. If no error has occurred since the last call, it returns {@link #GLFW_NO_ERROR NO_ERROR} (zero), and the description pointer is set to {@code NULL}.

    - * - *
    Note
    - * - *
      - *
    • This function may be called before {@link #glfwInit Init}.
    • - *
    • This function may be called from any thread.
    • - *
    • The returned string is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the next error occurs - * or the library is terminated.
    • - *
    - * - * @param description where to store the error description pointer, or {@code NULL} - * - * @return the last error code for the calling thread, or {@link #GLFW_NO_ERROR NO_ERROR} (zero) - * - * @since version 3.3 - */ - public static int glfwGetError(@Nullable @NativeType("char const **") PointerBuffer description) { - if (CHECKS) { - checkSafe(description, 1); - } - return nglfwGetError(memAddressSafe(description)); - } - - // --- [ glfwSetErrorCallback ] --- - - /** Unsafe version of: {@link #glfwSetErrorCallback SetErrorCallback} */ - public static long nglfwSetErrorCallback(long cbfun) { - long __functionAddress = Functions.SetErrorCallback; - return invokePP(cbfun, __functionAddress); - } - - /** - * Sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs. - * - *

    The error code is set before the callback is called. Calling {@link #glfwGetError GetError} from the error callback will return the same value as the error code argument.

    - * - *

    The error callback is called on the thread where the error occurred. If you are using GLFW from multiple threads, your error callback needs to be - * written accordingly.

    - * - *

    Because the description string may have been generated specifically for that error, it is not guaranteed to be valid after the callback has returned. If - * you wish to use it after the callback returns, you need to make a copy.

    - * - *

    Once set, the error callback remains set even after the library has been terminated.

    - * - *
    Note
    - * - *
      - *
    • This function may be called before {@link #glfwInit Init}.
    • - *
    • This function must only be called from the main thread.
    • - *
    - * - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWerrorfun") - public static GLFWErrorCallback glfwSetErrorCallback(@Nullable @NativeType("GLFWerrorfun") GLFWErrorCallbackI cbfun) { - return GLFWErrorCallback.createSafe(nglfwSetErrorCallback(memAddressSafe(cbfun))); - } - - // --- [ glfwGetPlatform ] --- - - /** - * Returns the currently selected platform. - * - *

    This function returns the platform that was selected during initialization. The returned value will be one of {@link #GLFW_PLATFORM_WIN32 PLATFORM_WIN32}, {@link #GLFW_PLATFORM_COCOA PLATFORM_COCOA}, - * {@link #GLFW_PLATFORM_WAYLAND PLATFORM_WAYLAND}, {@link #GLFW_PLATFORM_X11 PLATFORM_X11} or {@link #GLFW_PLATFORM_NULL PLATFORM_NULL}.

    - * - *

    This function may be called from any thread.

    - * - * @return the currently selected platform, or zero if an error occurred. - * - *

    Possible errors include {@link #GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.4 - */ - public static int glfwGetPlatform() { - long __functionAddress = Functions.GetPlatform; - return invokeI(__functionAddress); - } - - // --- [ glfwPlatformSupported ] --- - - /** - * Returns whether the library includes support for the specified platform. - * - *

    This function returns whether the library was compiled with support for the specified platform.

    - * - *

    This function may be called before {@link #glfwInit Init}.

    - * - *

    This function may be called from any thread.

    - * - * @param platform the platform to query. One of:
    {@link #GLFW_PLATFORM_WIN32 PLATFORM_WIN32}{@link #GLFW_PLATFORM_COCOA PLATFORM_COCOA}{@link #GLFW_PLATFORM_WAYLAND PLATFORM_WAYLAND}{@link #GLFW_PLATFORM_X11 PLATFORM_X11}{@link #GLFW_PLATFORM_NULL PLATFORM_NULL}
    - * - * @return {@link #GLFW_TRUE TRUE} if the platform is supported, or {@link #GLFW_FALSE FALSE} otherwise. - * - *

    Possible errors include {@link #GLFW_INVALID_ENUM INVALID_ENUM}.

    - * - * @since version 3.4 - */ - @NativeType("int") - public static boolean glfwPlatformSupported(int platform) { - long __functionAddress = Functions.PlatformSupported; - return invokeI(platform, __functionAddress) != 0; - } - - // --- [ glfwGetMonitors ] --- - - /** - * Unsafe version of: {@link #glfwGetMonitors GetMonitors} - * - * @param count where to store the number of monitors in the returned array. This is set to zero if an error occurred. - */ - public static long nglfwGetMonitors(long count) { - long __functionAddress = Functions.GetMonitors; - return invokePP(count, __functionAddress); - } - - /** - * Returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, - * this function returns {@code NULL}. - * - *

    The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration - * changes or the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @return an array of monitor handlers, or {@code NULL} if no monitors were found or if an error occurred - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWmonitor **") - public static PointerBuffer glfwGetMonitors() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer count = stack.callocInt(1); - try { - long __result = nglfwGetMonitors(memAddress(count)); - return memPointerBufferSafe(__result, count.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwGetPrimaryMonitor ] --- - - /** - * Returns the primary monitor. This is usually the monitor where elements like the task bar or global menu bar are located. - * - *

    This function must only be called from the main thread.

    - * - *

    The primary monitor is always first in the array returned by {@link #glfwGetMonitors GetMonitors}.

    - * - * @return the primary monitor, or {@code NULL} if no monitors were found or if an error occurred - * - * @since version 3.0 - */ - @NativeType("GLFWmonitor *") - public static long glfwGetPrimaryMonitor() { - long __functionAddress = Functions.GetPrimaryMonitor; - return invokeP(__functionAddress); - } - - // --- [ glfwGetMonitorPos ] --- - - /** Unsafe version of: {@link #glfwGetMonitorPos GetMonitorPos} */ - public static void nglfwGetMonitorPos(long monitor, long xpos, long ypos) { - long __functionAddress = Functions.GetMonitorPos; - if (CHECKS) { - check(monitor); - } - invokePPPV(monitor, xpos, ypos, __functionAddress); - } - - /** - * Returns the position, in screen coordinates, of the upper-left corner of the specified monitor. - * - *

    Any or all of the position arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} position arguments will be set to zero.

    - * - *

    This function must only be called from the main thread.

    - * - * @param monitor the monitor to query - * @param xpos where to store the monitor x-coordinate, or {@code NULL} - * @param ypos where to store the monitor y-coordinate, or {@code NULL} - * - * @since version 3.0 - */ - public static void glfwGetMonitorPos(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") IntBuffer xpos, @Nullable @NativeType("int *") IntBuffer ypos) { - if (CHECKS) { - checkSafe(xpos, 1); - checkSafe(ypos, 1); - } - nglfwGetMonitorPos(monitor, memAddressSafe(xpos), memAddressSafe(ypos)); - } - - // --- [ glfwGetMonitorWorkarea ] --- - - /** Unsafe version of: {@link #glfwGetMonitorWorkarea GetMonitorWorkarea} */ - public static void nglfwGetMonitorWorkarea(long monitor, long xpos, long ypos, long width, long height) { - long __functionAddress = Functions.GetMonitorWorkarea; - if (CHECKS) { - check(monitor); - } - invokePPPPPV(monitor, xpos, ypos, width, height, __functionAddress); - } - - /** - * Retrieves the work area of the monitor. - * - *

    This function returns the position, in screen coordinates, of the upper-left corner of the work area of the specified monitor along with the work area - * size in screen coordinates. The work area is defined as the area of the monitor not occluded by the window system task bar where present. If no task - * bar exists then the work area is the monitor resolution in screen coordinates.

    - * - *

    Any or all of the position and size arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} position and size arguments will be set to zero.

    - * - *

    This function must only be called from the main thread.

    - * - * @param monitor the monitor to query - * @param xpos where to store the working area x-coordinate, or {@code NULL} - * @param ypos where to store the working area y-coordinate, or {@code NULL} - * @param width where to store the working area width, or {@code NULL} - * @param height where to store the working area height, or {@code NULL} - * - * @since version 3.3 - */ - public static void glfwGetMonitorWorkarea(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") IntBuffer xpos, @Nullable @NativeType("int *") IntBuffer ypos, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height) { - if (CHECKS) { - checkSafe(xpos, 1); - checkSafe(ypos, 1); - checkSafe(width, 1); - checkSafe(height, 1); - } - nglfwGetMonitorWorkarea(monitor, memAddressSafe(xpos), memAddressSafe(ypos), memAddressSafe(width), memAddressSafe(height)); - } - - // --- [ glfwGetMonitorPhysicalSize ] --- - - /** Unsafe version of: {@link #glfwGetMonitorPhysicalSize GetMonitorPhysicalSize} */ - public static void nglfwGetMonitorPhysicalSize(long monitor, long widthMM, long heightMM) { - long __functionAddress = Functions.GetMonitorPhysicalSize; - if (CHECKS) { - check(monitor); - } - invokePPPV(monitor, widthMM, heightMM, __functionAddress); - } - - /** - * Returns the size, in millimetres, of the display area of the specified monitor. - * - *

    Some platforms do not provide accurate monitor size information, either because the monitor - * EDID data is incorrect or because the driver does not report it - * accurately.

    - * - *

    Any or all of the size arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} size arguments will be set to zero.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Windows: On Windows 8 and earlier the physical size is calculated from the current resolution and system DPI instead of querying the monitor - * EDID data.
    • - *
    - * - * @param monitor the monitor to query - * @param widthMM where to store the width, in millimetres, of the monitor's display area, or {@code NULL} - * @param heightMM where to store the height, in millimetres, of the monitor's display area, or {@code NULL} - * - * @since version 3.0 - */ - public static void glfwGetMonitorPhysicalSize(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") IntBuffer widthMM, @Nullable @NativeType("int *") IntBuffer heightMM) { - if (CHECKS) { - checkSafe(widthMM, 1); - checkSafe(heightMM, 1); - } - nglfwGetMonitorPhysicalSize(monitor, memAddressSafe(widthMM), memAddressSafe(heightMM)); - } - - // --- [ glfwGetMonitorContentScale ] --- - - /** Unsafe version of: {@link #glfwGetMonitorContentScale GetMonitorContentScale} */ - public static void nglfwGetMonitorContentScale(long monitor, long xscale, long yscale) { - long __functionAddress = Functions.GetMonitorContentScale; - if (CHECKS) { - check(monitor); - } - invokePPPV(monitor, xscale, yscale, __functionAddress); - } - - /** - * Retrieves the content scale for the specified monitor. - * - *

    This function retrieves the content scale for the specified monitor. The content scale is the ratio between the current DPI and the platform's default - * DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then - * it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling - * settings being somewhat correct.

    - * - *

    The content scale may depend on both the monitor resolution and pixel density and on user settings. It may be very different from the raw DPI - * calculated from the physical size and current resolution.

    - * - *

    This function must only be called from the main thread.

    - * - * @param monitor the monitor to query - * @param xscale where to store the x-axis content scale, or {@code NULL} - * @param yscale where to store the y-axis content scale, or {@code NULL} - * - * @since version 3.3 - */ - public static void glfwGetMonitorContentScale(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("float *") FloatBuffer xscale, @Nullable @NativeType("float *") FloatBuffer yscale) { - if (CHECKS) { - checkSafe(xscale, 1); - checkSafe(yscale, 1); - } - nglfwGetMonitorContentScale(monitor, memAddressSafe(xscale), memAddressSafe(yscale)); - } - - // --- [ glfwGetMonitorName ] --- - - /** Unsafe version of: {@link #glfwGetMonitorName GetMonitorName} */ - public static long nglfwGetMonitorName(long monitor) { - long __functionAddress = Functions.GetMonitorName; - if (CHECKS) { - check(monitor); - } - return invokePP(monitor, __functionAddress); - } - - /** - * Returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically reflects the make and model of the monitor and is not - * guaranteed to be unique among the connected monitors. - * - *

    The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the - * library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param monitor the monitor to query - * - * @return the UTF-8 encoded name of the monitor, or {@code NULL} if an error occurred - * - * @since version 3.0 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetMonitorName(@NativeType("GLFWmonitor *") long monitor) { - long __result = nglfwGetMonitorName(monitor); - return memUTF8Safe(__result); - } - - // --- [ glfwSetMonitorUserPointer ] --- - - /** - * Sets the user pointer of the specified monitor. - * - *

    This function sets the user-defined pointer of the specified monitor. The current value is retained until the monitor is disconnected. The initial - * value is {@code NULL}.

    - * - *

    This function may be called from the monitor callback, even for a monitor that is being disconnected.

    - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param monitor the monitor whose pointer to set - * @param pointer the new value - * - * @since version 3.3 - */ - public static void glfwSetMonitorUserPointer(@NativeType("GLFWmonitor *") long monitor, @NativeType("void *") long pointer) { - long __functionAddress = Functions.SetMonitorUserPointer; - if (CHECKS) { - check(monitor); - check(pointer); - } - invokePPV(monitor, pointer, __functionAddress); - } - - // --- [ glfwGetMonitorUserPointer ] --- - - /** - * Returns the user pointer of the specified monitor. - * - *

    This function returns the current value of the user-defined pointer of the specified monitor. The initial value is {@code NULL}.

    - * - *

    This function may be called from the monitor callback, even for a monitor that is being disconnected.

    - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param monitor the monitor whose pointer to return - * - * @since version 3.3 - */ - @NativeType("void *") - public static long glfwGetMonitorUserPointer(@NativeType("GLFWmonitor *") long monitor) { - long __functionAddress = Functions.GetMonitorUserPointer; - if (CHECKS) { - check(monitor); - } - return invokePP(monitor, __functionAddress); - } - - // --- [ glfwSetMonitorCallback ] --- - - /** Unsafe version of: {@link #glfwSetMonitorCallback SetMonitorCallback} */ - public static long nglfwSetMonitorCallback(long cbfun) { - long __functionAddress = Functions.SetMonitorCallback; - return invokePP(cbfun, __functionAddress); - } - - /** - * Sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the - * system. - * - *

    This function must only be called from the main thread.

    - * - * @param cbfun the new callback, or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been initialized - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWmonitorfun") - public static GLFWMonitorCallback glfwSetMonitorCallback(@Nullable @NativeType("GLFWmonitorfun") GLFWMonitorCallbackI cbfun) { - return GLFWMonitorCallback.createSafe(nglfwSetMonitorCallback(memAddressSafe(cbfun))); - } - - // --- [ glfwGetVideoModes ] --- - - /** - * Unsafe version of: {@link #glfwGetVideoModes GetVideoModes} - * - * @param count where to store the number of video modes in the returned array. This is set to zero if an error occurred. - */ - public static long nglfwGetVideoModes(long monitor, long count) { - long __functionAddress = Functions.GetVideoModes; - if (CHECKS) { - check(monitor); - } - return invokePPP(monitor, count, __functionAddress); - } - - /** - * Returns an array of all video modes supported by the specified monitor. - * - *

    The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths), then by resolution area (the product of - * width and height), then resolution width and finally by refresh rate.

    - * - *

    The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this - * function is called again for that monitor or the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param monitor the monitor to query - * - * @return an array of video modes, or {@code NULL} if an error occurred - * - * @since version 1.0 - */ - @Nullable - @NativeType("GLFWvidmode const *") - public static GLFWVidMode.Buffer glfwGetVideoModes(@NativeType("GLFWmonitor *") long monitor) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer count = stack.callocInt(1); - try { - long __result = nglfwGetVideoModes(monitor, memAddress(count)); - return GLFWVidMode.createSafe(__result, count.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwGetVideoMode ] --- - - /** Unsafe version of: {@link #glfwGetVideoMode GetVideoMode} */ - public static long nglfwGetVideoMode(long monitor) { - long __functionAddress = Functions.GetVideoMode; - if (CHECKS) { - check(monitor); - } - return invokePP(monitor, __functionAddress); - } - - /** - * Returns the current video mode of the specified monitor. If you have created a full screen window for that monitor, the return value will depend on - * whether that window is iconified. - * - *

    The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the - * library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param monitor the monitor to query - * - * @return the current mode of the monitor, or {@code NULL} if an error occurred - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWvidmode const *") - public static GLFWVidMode glfwGetVideoMode(@NativeType("GLFWmonitor *") long monitor) { - return glfwVidMode; - } - - // --- [ glfwSetGamma ] --- - - /** - * Generates a gamma ramp and sets it for the specified monitor. - * - *

    This function generates an appropriately sized gamma ramp from the specified exponent and then calls {@link #glfwSetGammaRamp SetGammaRamp} with it. The value must be a - * finite number greater than zero.

    - * - *

    The software controlled gamma ramp is applied in addition to the hardware gamma correction, which today is usually an approximation of sRGB - * gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.

    - * - *

    For gamma correct rendering with OpenGL or OpenGL ES, see the {@link #GLFW_SRGB_CAPABLE SRGB_CAPABLE} hint.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: Gamma handling is a privileged protocol, this function will thus never be implemented and emits {@link #GLFW_PLATFORM_ERROR PLATFORM_ERROR}.
    • - *
    - * - * @param monitor the monitor whose gamma ramp to set - * @param gamma the desired exponent - * - * @since version 3.0 - */ - public static void glfwSetGamma(@NativeType("GLFWmonitor *") long monitor, float gamma) { - long __functionAddress = Functions.SetGamma; - if (CHECKS) { - check(monitor); - } - invokePV(monitor, gamma, __functionAddress); - } - - // --- [ glfwGetGammaRamp ] --- - - /** Unsafe version of: {@link #glfwGetGammaRamp GetGammaRamp} */ - public static long nglfwGetGammaRamp(long monitor) { - long __functionAddress = Functions.GetGammaRamp; - if (CHECKS) { - check(monitor); - } - return invokePP(monitor, __functionAddress); - } - - /** - * Returns the current gamma ramp of the specified monitor. - * - *

    The returned structure and its arrays are allocated and freed by GLFW. You should not free them yourself. They are valid until the specified monitor is - * disconnected, this function is called again for that monitor or the library is terminated.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: Gamma handling is a privileged protocol, this function will thus never be implemented and emits {@link #GLFW_PLATFORM_ERROR PLATFORM_ERROR} while returning - * {@code NULL}.
    • - *
    - * - * @param monitor the monitor to query - * - * @return the current gamma ramp, or {@code NULL} if an error occurred - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWgammaramp const *") - public static GLFWGammaRamp glfwGetGammaRamp(@NativeType("GLFWmonitor *") long monitor) { - long __result = nglfwGetGammaRamp(monitor); - return GLFWGammaRamp.createSafe(__result); - } - - // --- [ glfwSetGammaRamp ] --- - - /** Unsafe version of: {@link #glfwSetGammaRamp SetGammaRamp} */ - public static void nglfwSetGammaRamp(long monitor, long ramp) { - long __functionAddress = Functions.SetGammaRamp; - if (CHECKS) { - check(monitor); - GLFWGammaRamp.validate(ramp); - } - invokePPV(monitor, ramp, __functionAddress); - } - - /** - * Sets the current gamma ramp for the specified monitor. - * - *

    This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this - * function is called and is restored by {@link #glfwTerminate Terminate}.

    - * - *

    The software controlled gamma ramp is applied in addition to the hardware gamma correction, which today is usually an approximation of sRGB - * gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.

    - * - *

    For gamma correct rendering with OpenGL or OpenGL ES, see the {@link #GLFW_SRGB_CAPABLE SRGB_CAPABLE} hint.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • The size of the specified gamma ramp should match the size of the current ramp for that monitor.
    • - *
    • Windows: The gamma ramp size must be 256.
    • - *
    • Wayland: Gamma handling is a privileged protocol, this function will thus never be implemented and emits {@link #GLFW_PLATFORM_ERROR PLATFORM_ERROR}.
    • - *
    • The specified gamma ramp is copied before this function returns.
    • - *
    - * - * @param monitor the monitor whose gamma ramp to set - * @param ramp the gamma ramp to use - * - * @since version 3.0 - */ - public static void glfwSetGammaRamp(@NativeType("GLFWmonitor *") long monitor, @NativeType("GLFWgammaramp const *") GLFWGammaRamp ramp) { - nglfwSetGammaRamp(monitor, ramp.address()); - } - - // --- [ glfwDefaultWindowHints ] --- - - /** - * Resets all window hints to their default values. See {@link #glfwWindowHint WindowHint} for details. - * - *

    This function must only be called from the main thread.

    - * - * @since version 3.0 - */ - public static void glfwDefaultWindowHints() { - long __functionAddress = Functions.DefaultWindowHints; - invokeV(__functionAddress); - } - - // --- [ glfwWindowHint ] --- - - /** - * Sets hints for the next call to {@link #glfwCreateWindow CreateWindow}. The hints, once set, retain their values until changed by a call to this function or - * {@link #glfwDefaultWindowHints DefaultWindowHints}, or until the library is terminated. - * - *

    Only integer value hints can be set with this function. String value hints are set with {@link #glfwWindowHintString WindowHintString}.

    - * - *

    This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next - * call to {@link #glfwCreateWindow CreateWindow}.

    - * - *

    Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions.

    - * - *
    Supported and default values
    - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
    NameDefault valueSupported values
    {@link #GLFW_RESIZABLE RESIZABLE}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_VISIBLE VISIBLE}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_DECORATED DECORATED}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_FOCUSED FOCUSED}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_AUTO_ICONIFY AUTO_ICONIFY}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_FLOATING FLOATING}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_MAXIMIZED MAXIMIZED}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_CENTER_CURSOR CENTER_CURSOR}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_TRANSPARENT_FRAMEBUFFER TRANSPARENT_FRAMEBUFFER}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_FOCUS_ON_SHOW FOCUS_ON_SHOW}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_SCALE_TO_MONITOR SCALE_TO_MONITOR}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_MOUSE_PASSTHROUGH MOUSE_PASSTHROUGH}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_RED_BITS RED_BITS}80 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_GREEN_BITS GREEN_BITS}80 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_BLUE_BITS BLUE_BITS}80 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_ALPHA_BITS ALPHA_BITS}80 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_DEPTH_BITS DEPTH_BITS}240 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_STENCIL_BITS STENCIL_BITS}80 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_ACCUM_RED_BITS ACCUM_RED_BITS}00 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_ACCUM_GREEN_BITS ACCUM_GREEN_BITS}00 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_ACCUM_BLUE_BITS ACCUM_BLUE_BITS}00 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_ACCUM_ALPHA_BITS ACCUM_ALPHA_BITS}00 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_AUX_BUFFERS AUX_BUFFERS}00 to {@link Integer#MAX_VALUE}
    {@link #GLFW_SAMPLES SAMPLES}00 to {@link Integer#MAX_VALUE}
    {@link #GLFW_REFRESH_RATE REFRESH_RATE}{@link #GLFW_DONT_CARE DONT_CARE}0 to {@link Integer#MAX_VALUE} or {@link #GLFW_DONT_CARE DONT_CARE}
    {@link #GLFW_STEREO STEREO}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_SRGB_CAPABLE SRGB_CAPABLE}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_DOUBLEBUFFER DOUBLEBUFFER}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_CLIENT_API CLIENT_API}{@link #GLFW_OPENGL_API OPENGL_API}{@link #GLFW_NO_API NO_API} {@link #GLFW_OPENGL_API OPENGL_API} {@link #GLFW_OPENGL_ES_API OPENGL_ES_API}
    {@link #GLFW_CONTEXT_CREATION_API CONTEXT_CREATION_API}{@link #GLFW_NATIVE_CONTEXT_API NATIVE_CONTEXT_API}{@link #GLFW_NATIVE_CONTEXT_API NATIVE_CONTEXT_API} {@link #GLFW_EGL_CONTEXT_API EGL_CONTEXT_API} {@link #GLFW_OSMESA_CONTEXT_API OSMESA_CONTEXT_API}
    {@link #GLFW_CONTEXT_VERSION_MAJOR CONTEXT_VERSION_MAJOR}1Any valid major version number of the chosen client API
    {@link #GLFW_CONTEXT_VERSION_MINOR CONTEXT_VERSION_MINOR}0Any valid minor version number of the chosen client API
    {@link #GLFW_CONTEXT_ROBUSTNESS CONTEXT_ROBUSTNESS}{@link #GLFW_NO_ROBUSTNESS NO_ROBUSTNESS}{@link #GLFW_NO_ROBUSTNESS NO_ROBUSTNESS} {@link #GLFW_NO_RESET_NOTIFICATION NO_RESET_NOTIFICATION} {@link #GLFW_LOSE_CONTEXT_ON_RESET LOSE_CONTEXT_ON_RESET}
    {@link #GLFW_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR}{@link #GLFW_ANY_RELEASE_BEHAVIOR ANY_RELEASE_BEHAVIOR}{@link #GLFW_ANY_RELEASE_BEHAVIOR ANY_RELEASE_BEHAVIOR} {@link #GLFW_RELEASE_BEHAVIOR_FLUSH RELEASE_BEHAVIOR_FLUSH} {@link #GLFW_RELEASE_BEHAVIOR_NONE RELEASE_BEHAVIOR_NONE}
    {@link #GLFW_CONTEXT_NO_ERROR CONTEXT_NO_ERROR}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_OPENGL_FORWARD_COMPAT OPENGL_FORWARD_COMPAT}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_OPENGL_DEBUG_CONTEXT OPENGL_DEBUG_CONTEXT}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE}{@link #GLFW_OPENGL_ANY_PROFILE OPENGL_ANY_PROFILE}{@link #GLFW_OPENGL_ANY_PROFILE OPENGL_ANY_PROFILE} {@link #GLFW_OPENGL_CORE_PROFILE OPENGL_CORE_PROFILE} {@link #GLFW_OPENGL_COMPAT_PROFILE OPENGL_COMPAT_PROFILE}
    {@link #GLFW_WIN32_KEYBOARD_MENU WIN32_KEYBOARD_MENU}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_COCOA_RETINA_FRAMEBUFFER COCOA_RETINA_FRAMEBUFFER}{@link #GLFW_TRUE TRUE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    {@link #GLFW_COCOA_GRAPHICS_SWITCHING COCOA_GRAPHICS_SWITCHING}{@link #GLFW_FALSE FALSE}{@link #GLFW_TRUE TRUE} or {@link #GLFW_FALSE FALSE}
    - * - *

    This function must only be called from the main thread.

    - * - * @param hint the window hint to set. One of:
    {@link #GLFW_FOCUSED FOCUSED}{@link #GLFW_RESIZABLE RESIZABLE}{@link #GLFW_VISIBLE VISIBLE}{@link #GLFW_DECORATED DECORATED}{@link #GLFW_AUTO_ICONIFY AUTO_ICONIFY}
    {@link #GLFW_FLOATING FLOATING}{@link #GLFW_MAXIMIZED MAXIMIZED}{@link #GLFW_CENTER_CURSOR CENTER_CURSOR}{@link #GLFW_TRANSPARENT_FRAMEBUFFER TRANSPARENT_FRAMEBUFFER}{@link #GLFW_FOCUS_ON_SHOW FOCUS_ON_SHOW}
    {@link #GLFW_MOUSE_PASSTHROUGH MOUSE_PASSTHROUGH}{@link #GLFW_POSITION_X POSITION_X}{@link #GLFW_POSITION_Y POSITION_Y}{@link #GLFW_CLIENT_API CLIENT_API}{@link #GLFW_CONTEXT_VERSION_MAJOR CONTEXT_VERSION_MAJOR}
    {@link #GLFW_CONTEXT_VERSION_MINOR CONTEXT_VERSION_MINOR}{@link #GLFW_CONTEXT_ROBUSTNESS CONTEXT_ROBUSTNESS}{@link #GLFW_OPENGL_FORWARD_COMPAT OPENGL_FORWARD_COMPAT}{@link #GLFW_CONTEXT_DEBUG CONTEXT_DEBUG}{@link #GLFW_OPENGL_DEBUG_CONTEXT OPENGL_DEBUG_CONTEXT}
    {@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE}{@link #GLFW_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR}{@link #GLFW_CONTEXT_NO_ERROR CONTEXT_NO_ERROR}{@link #GLFW_CONTEXT_CREATION_API CONTEXT_CREATION_API}{@link #GLFW_SCALE_TO_MONITOR SCALE_TO_MONITOR}
    {@link #GLFW_RED_BITS RED_BITS}{@link #GLFW_GREEN_BITS GREEN_BITS}{@link #GLFW_BLUE_BITS BLUE_BITS}{@link #GLFW_ALPHA_BITS ALPHA_BITS}{@link #GLFW_DEPTH_BITS DEPTH_BITS}
    {@link #GLFW_STENCIL_BITS STENCIL_BITS}{@link #GLFW_ACCUM_RED_BITS ACCUM_RED_BITS}{@link #GLFW_ACCUM_GREEN_BITS ACCUM_GREEN_BITS}{@link #GLFW_ACCUM_BLUE_BITS ACCUM_BLUE_BITS}{@link #GLFW_ACCUM_ALPHA_BITS ACCUM_ALPHA_BITS}
    {@link #GLFW_AUX_BUFFERS AUX_BUFFERS}{@link #GLFW_STEREO STEREO}{@link #GLFW_SAMPLES SAMPLES}{@link #GLFW_SRGB_CAPABLE SRGB_CAPABLE}{@link #GLFW_REFRESH_RATE REFRESH_RATE}
    {@link #GLFW_DOUBLEBUFFER DOUBLEBUFFER}{@link #GLFW_COCOA_RETINA_FRAMEBUFFER COCOA_RETINA_FRAMEBUFFER}{@link #GLFW_COCOA_GRAPHICS_SWITCHING COCOA_GRAPHICS_SWITCHING}
    - * @param value the new value of the window hint - * - * @since version 2.2 - */ - public static void glfwWindowHint(int hint, int value) { - long __functionAddress = Functions.WindowHint; - invokeV(hint, value, __functionAddress); - } - - // --- [ glfwWindowHintString ] --- - - /** Unsafe version of: {@link #glfwWindowHintString WindowHintString} */ - public static void nglfwWindowHintString(int hint, long value) { - long __functionAddress = Functions.WindowHintString; - invokePV(hint, value, __functionAddress); - } - - /** - * Sets the specified window hint to the desired value. - * - *

    This function sets hints for the next call to {@link #glfwCreateWindow CreateWindow}. The hints, once set, retain their values until changed by a call to this function or - * {@link #glfwDefaultWindowHints DefaultWindowHints}, or until the library is terminated.

    - * - *

    Only string type hints can be set with this function. Integer value hints are set with {@link #glfwWindowHint WindowHint}.

    - * - *

    This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next - * call to {@link #glfwCreateWindow CreateWindow}.

    - * - *

    Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions.

    - * - *
    Supported and default values
    - * - * - * - * - * - * - * - *
    NameDefault valueSupported values
    {@link #GLFW_COCOA_FRAME_NAME COCOA_FRAME_NAME}""A UTF-8 encoded frame autosave name
    {@link #GLFW_X11_CLASS_NAME X11_CLASS_NAME}""An ASCII encoded {@code WM_CLASS} class name
    {@link #GLFW_X11_INSTANCE_NAME X11_INSTANCE_NAME}""An ASCII encoded {@code WM_CLASS} instance name
    {@link #GLFW_WAYLAND_APP_ID WAYLAND_APP_ID}""An ASCII encoded Wayland {@code app_id} name
    - * - *

    This function must only be called from the main thread.

    - * - * @param hint the window hint to set. One of:
    {@link #GLFW_COCOA_FRAME_NAME COCOA_FRAME_NAME}{@link #GLFW_X11_CLASS_NAME X11_CLASS_NAME}{@link #GLFW_X11_INSTANCE_NAME X11_INSTANCE_NAME}{@link #GLFW_WAYLAND_APP_ID WAYLAND_APP_ID}
    - * @param value the new value of the window hint. The specified string is copied before this function returns. - * - * @since version 3.3 - */ - public static void glfwWindowHintString(int hint, @NativeType("char const *") ByteBuffer value) { - if (CHECKS) { - checkNT1(value); - } - nglfwWindowHintString(hint, memAddress(value)); - } - - /** - * Sets the specified window hint to the desired value. - * - *

    This function sets hints for the next call to {@link #glfwCreateWindow CreateWindow}. The hints, once set, retain their values until changed by a call to this function or - * {@link #glfwDefaultWindowHints DefaultWindowHints}, or until the library is terminated.

    - * - *

    Only string type hints can be set with this function. Integer value hints are set with {@link #glfwWindowHint WindowHint}.

    - * - *

    This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next - * call to {@link #glfwCreateWindow CreateWindow}.

    - * - *

    Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. - * Setting these hints requires no platform specific headers or functions.

    - * - *
    Supported and default values
    - * - * - * - * - * - * - * - *
    NameDefault valueSupported values
    {@link #GLFW_COCOA_FRAME_NAME COCOA_FRAME_NAME}""A UTF-8 encoded frame autosave name
    {@link #GLFW_X11_CLASS_NAME X11_CLASS_NAME}""An ASCII encoded {@code WM_CLASS} class name
    {@link #GLFW_X11_INSTANCE_NAME X11_INSTANCE_NAME}""An ASCII encoded {@code WM_CLASS} instance name
    {@link #GLFW_WAYLAND_APP_ID WAYLAND_APP_ID}""An ASCII encoded Wayland {@code app_id} name
    - * - *

    This function must only be called from the main thread.

    - * - * @param hint the window hint to set. One of:
    {@link #GLFW_COCOA_FRAME_NAME COCOA_FRAME_NAME}{@link #GLFW_X11_CLASS_NAME X11_CLASS_NAME}{@link #GLFW_X11_INSTANCE_NAME X11_INSTANCE_NAME}{@link #GLFW_WAYLAND_APP_ID WAYLAND_APP_ID}
    - * @param value the new value of the window hint. The specified string is copied before this function returns. - * - * @since version 3.3 - */ - public static void glfwWindowHintString(int hint, @NativeType("char const *") CharSequence value) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(value, true); - long valueEncoded = stack.getPointerAddress(); - nglfwWindowHintString(hint, valueEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwCreateWindow ] --- - - /** Unsafe version of: {@link #glfwCreateWindow CreateWindow} */ - public static long nglfwCreateWindow(int width, int height, long title, long monitor, long share) { - long __functionAddress = Functions.CreateWindow; - return invokePPPP(width, height, title, monitor, share, __functionAddress); - } - - /** - * Creates a window and its associated OpenGL or OpenGL ES context. Most of the options controlling how the window and its context should be created are - * specified with window hints. - * - *

    Successful creation does not change which context is current. Before you can use the newly created context, you need to make it current. For information - * about the {@code share} parameter, see context sharing.

    - * - *

    The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are hard constraints. This includes the - * size of the window, especially for full screen windows. To query the actual attributes of the created window, framebuffer and context, use queries like - * {@link #glfwGetWindowAttrib GetWindowAttrib} and {@link #glfwGetWindowSize GetWindowSize} and {@link #glfwGetFramebufferSize GetFramebufferSize}.

    - * - *

    To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, the window will be windowed mode. - * Unless you have a way for the user to choose a specific monitor, it is recommended that you pick the primary monitor. For more information on how to - * query connected monitors, see monitors.

    - * - *

    For full screen windows, the specified size becomes the resolution of the window's desired video mode. As long as a full screen window is not - * iconified, the supported video mode most closely matching the desired video mode is set for the specified monitor. For more information about full - * screen windows, including the creation of so called windowed full screen or borderless full screen windows, see - * full screen.

    - * - *

    Once you have created the window, you can switch it between windowed and full screen mode with {@link #glfwSetWindowMonitor SetWindowMonitor}. If the window has an OpenGL or - * OpenGL ES context, it will be unaffected.

    - * - *

    By default, newly created windows use the placement recommended by the window system. To create the window at a specific position, set the {@link #GLFW_POSITION_X POSITION_X} - * and {@link #GLFW_POSITION_Y POSITION_Y} window hints before creation. To restore the default behavior, set either or both hints back to {@link #GLFW_ANY_POSITION ANY_POSITION}.

    - * - *

    As long as at least one full screen window is not iconified, the screensaver is prohibited from starting.

    - * - *

    Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the window system on creation. Check the - * actual size after creation.

    - * - *

    The swap interval is not set during window creation and the initial value may vary - * depending on driver settings and defaults.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Windows: Window creation will fail if the Microsoft GDI software OpenGL implementation is the only one available.
    • - *
    • Windows: If the executable has an icon resource named {@code GLFW_ICON}, it will be set as the initial icon for the window. If no such icon - * is present, the {@code IDI_APPLICATION} icon will be used instead. To set a different icon, see {@link #glfwSetWindowIcon SetWindowIcon}.
    • - *
    • Windows: The context to share resources with may not be current on any other thread.
    • - *
    • The OS only supports core profile contexts for OpenGL versions 3.2 and later. Before creating an OpenGL context of version 3.2 or later you must - * set the {@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE} hint accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.
    • - *
    • macOS: The GLFW window has no icon, as it is not a document window, but the dock icon will be the same as the application bundle's icon. For - * more information on bundles, see the - * Bundle Programming Guide in the Mac - * Developer Library.
    • - *
    • macOS: On macOS 10.10 and later the window frame will not be rendered at full resolution on Retina displays unless the - * {@link #GLFW_COCOA_RETINA_FRAMEBUFFER COCOA_RETINA_FRAMEBUFFER} hint is {@link #GLFW_TRUE TRUE} and the {@code NSHighResolutionCapable} key is enabled in the application bundle's {@code Info.plist}. For - * more information, see High Resolution Guidelines for macOS in the Mac Developer Library.
    • - *
    • macOS: When activating frame autosaving with {@link #GLFW_COCOA_FRAME_NAME COCOA_FRAME_NAME}, the specified window size and position may be overridden by previously saved - * values.
    • - *
    • X11: Some window managers will not respect the placement of initially hidden windows.
    • - *
    • X11: Due to the asynchronous nature of X11, it may take a moment for a window to reach its requested state. This means you may not be able - * to query the final size, position or other attributes directly after window creation.
    • - *
    • X11: The class part of the {@code WM_CLASS} window property will by default be set to the window title passed to this function. The instance - * part will use the contents of the {@code RESOURCE_NAME} environment variable, if present and not empty, or fall back to the window title. Set the - * {@link #GLFW_X11_CLASS_NAME X11_CLASS_NAME} and {@link #GLFW_X11_INSTANCE_NAME X11_INSTANCE_NAME} window hints to override this.
    • - *
    • Wayland: Compositors should implement the xdg-decoration protocol for GLFW to decorate the window properly. If this protocol isn't - * supported, or if the compositor prefers client-side decorations, a very simple fallback frame will be drawn using the {@code wp_viewporter} - * protocol. A compositor can still emit close, maximize or fullscreen events, using for instance a keybind mechanism. If neither of these protocols - * is supported, the window won't be decorated.
    • - *
    • Wayland: A full screen window will not attempt to change the mode, no matter what the requested size or refresh rate.
    • - *
    • Wayland: Screensaver inhibition requires the idle-inhibit protocol to be implemented in the user's compositor.
    • - *
    - * - * @param width the desired width, in screen coordinates, of the window - * @param height the desired height, in screen coordinates, of the window - * @param title initial, UTF-8 encoded window title - * @param monitor the monitor to use for fullscreen mode, or {@code NULL} for windowed mode - * @param share the window whose context to share resources with, or {@code NULL} to not share resources - * - * @return the handle of the created window, or {@code NULL} if an error occurred - * - * @since version 1.0 - */ - @NativeType("GLFWwindow *") - public static long glfwCreateWindow(int width, int height, @NativeType("char const *") ByteBuffer title, @NativeType("GLFWmonitor *") long monitor, @NativeType("GLFWwindow *") long share) { - if (CHECKS) { - checkNT1(title); - } - return nglfwCreateWindow(width, height, memAddress(title), monitor, share); - } - - /** - * Creates a window and its associated OpenGL or OpenGL ES context. Most of the options controlling how the window and its context should be created are - * specified with window hints. - * - *

    Successful creation does not change which context is current. Before you can use the newly created context, you need to make it current. For information - * about the {@code share} parameter, see context sharing.

    - * - *

    The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are hard constraints. This includes the - * size of the window, especially for full screen windows. To query the actual attributes of the created window, framebuffer and context, use queries like - * {@link #glfwGetWindowAttrib GetWindowAttrib} and {@link #glfwGetWindowSize GetWindowSize} and {@link #glfwGetFramebufferSize GetFramebufferSize}.

    - * - *

    To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, the window will be windowed mode. - * Unless you have a way for the user to choose a specific monitor, it is recommended that you pick the primary monitor. For more information on how to - * query connected monitors, see monitors.

    - * - *

    For full screen windows, the specified size becomes the resolution of the window's desired video mode. As long as a full screen window is not - * iconified, the supported video mode most closely matching the desired video mode is set for the specified monitor. For more information about full - * screen windows, including the creation of so called windowed full screen or borderless full screen windows, see - * full screen.

    - * - *

    Once you have created the window, you can switch it between windowed and full screen mode with {@link #glfwSetWindowMonitor SetWindowMonitor}. If the window has an OpenGL or - * OpenGL ES context, it will be unaffected.

    - * - *

    By default, newly created windows use the placement recommended by the window system. To create the window at a specific position, set the {@link #GLFW_POSITION_X POSITION_X} - * and {@link #GLFW_POSITION_Y POSITION_Y} window hints before creation. To restore the default behavior, set either or both hints back to {@link #GLFW_ANY_POSITION ANY_POSITION}.

    - * - *

    As long as at least one full screen window is not iconified, the screensaver is prohibited from starting.

    - * - *

    Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the window system on creation. Check the - * actual size after creation.

    - * - *

    The swap interval is not set during window creation and the initial value may vary - * depending on driver settings and defaults.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Windows: Window creation will fail if the Microsoft GDI software OpenGL implementation is the only one available.
    • - *
    • Windows: If the executable has an icon resource named {@code GLFW_ICON}, it will be set as the initial icon for the window. If no such icon - * is present, the {@code IDI_APPLICATION} icon will be used instead. To set a different icon, see {@link #glfwSetWindowIcon SetWindowIcon}.
    • - *
    • Windows: The context to share resources with may not be current on any other thread.
    • - *
    • The OS only supports core profile contexts for OpenGL versions 3.2 and later. Before creating an OpenGL context of version 3.2 or later you must - * set the {@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE} hint accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.
    • - *
    • macOS: The GLFW window has no icon, as it is not a document window, but the dock icon will be the same as the application bundle's icon. For - * more information on bundles, see the - * Bundle Programming Guide in the Mac - * Developer Library.
    • - *
    • macOS: On macOS 10.10 and later the window frame will not be rendered at full resolution on Retina displays unless the - * {@link #GLFW_COCOA_RETINA_FRAMEBUFFER COCOA_RETINA_FRAMEBUFFER} hint is {@link #GLFW_TRUE TRUE} and the {@code NSHighResolutionCapable} key is enabled in the application bundle's {@code Info.plist}. For - * more information, see High Resolution Guidelines for macOS in the Mac Developer Library.
    • - *
    • macOS: When activating frame autosaving with {@link #GLFW_COCOA_FRAME_NAME COCOA_FRAME_NAME}, the specified window size and position may be overridden by previously saved - * values.
    • - *
    • X11: Some window managers will not respect the placement of initially hidden windows.
    • - *
    • X11: Due to the asynchronous nature of X11, it may take a moment for a window to reach its requested state. This means you may not be able - * to query the final size, position or other attributes directly after window creation.
    • - *
    • X11: The class part of the {@code WM_CLASS} window property will by default be set to the window title passed to this function. The instance - * part will use the contents of the {@code RESOURCE_NAME} environment variable, if present and not empty, or fall back to the window title. Set the - * {@link #GLFW_X11_CLASS_NAME X11_CLASS_NAME} and {@link #GLFW_X11_INSTANCE_NAME X11_INSTANCE_NAME} window hints to override this.
    • - *
    • Wayland: Compositors should implement the xdg-decoration protocol for GLFW to decorate the window properly. If this protocol isn't - * supported, or if the compositor prefers client-side decorations, a very simple fallback frame will be drawn using the {@code wp_viewporter} - * protocol. A compositor can still emit close, maximize or fullscreen events, using for instance a keybind mechanism. If neither of these protocols - * is supported, the window won't be decorated.
    • - *
    • Wayland: A full screen window will not attempt to change the mode, no matter what the requested size or refresh rate.
    • - *
    • Wayland: Screensaver inhibition requires the idle-inhibit protocol to be implemented in the user's compositor.
    • - *
    - * - * @param width the desired width, in screen coordinates, of the window - * @param height the desired height, in screen coordinates, of the window - * @param title initial, UTF-8 encoded window title - * @param monitor the monitor to use for fullscreen mode, or {@code NULL} for windowed mode - * @param share the window whose context to share resources with, or {@code NULL} to not share resources - * - * @return the handle of the created window, or {@code NULL} if an error occurred - * - * @since version 1.0 - */ - @NativeType("GLFWwindow *") - public static long glfwCreateWindow(int width, int height, @NativeType("char const *") CharSequence title, @NativeType("GLFWmonitor *") long monitor, @NativeType("GLFWwindow *") long share) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(title, true); - long titleEncoded = stack.getPointerAddress(); - return nglfwCreateWindow(width, height, titleEncoded, monitor, share); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwDestroyWindow ] --- - - /** - * Destroys the specified window and its context. On calling this function, no further callbacks will be called for that window. - * - *

    If the context of the specified window is current on the main thread, it is detached before being destroyed.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • This function must not be called from a callback.
    • - *
    • The context of the specified window must not be current on any other thread when this function is called.
    • - *
    - * - * @param window the window to destroy - * - * @since version 1.0 - */ - public static void glfwDestroyWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.DestroyWindow; - invokePV(window, __functionAddress); - } - - // --- [ glfwWindowShouldClose ] --- - - /** - * Returns the value of the close flag of the specified window. - * - *

    This function may be called from any thread.

    - * - * @param window the window to query - * - * @return the value of the close flag - * - * @since version 3.0 - */ - @NativeType("int") - public static boolean glfwWindowShouldClose(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.WindowShouldClose; - if (CHECKS) { - check(window); - } - return invokePI(window, __functionAddress) != 0; - } - - // --- [ glfwSetWindowShouldClose ] --- - - /** - * Sets the value of the close flag of the specified window. This can be used to override the user's attempt to close the window, or to signal that it - * should be closed. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window the window whose flag to change - * @param value the new value - * - * @since version 3.0 - */ - public static void glfwSetWindowShouldClose(@NativeType("GLFWwindow *") long window, @NativeType("int") boolean value) { - long __functionAddress = Functions.SetWindowShouldClose; - if (CHECKS) { - check(window); - } - invokePV(window, value ? 1 : 0, __functionAddress); - } - - // --- [ glfwSetWindowTitle ] --- - - /** Unsafe version of: {@link #glfwSetWindowTitle SetWindowTitle} */ - public static void nglfwSetWindowTitle(long window, long title) { - long __functionAddress = Functions.SetWindowTitle; - if (CHECKS) { - check(window); - } - invokePPV(window, title, __functionAddress); - } - - /** - * Sets the window title, encoded as UTF-8, of the specified window. - * - *

    This function must only be called from the main thread.

    - * - *

    macOS: The window title will not be updated until the next time you process events.

    - * - * @param window the window whose title to change - * @param title the UTF-8 encoded window title - * - * @since version 1.0 - */ - public static void glfwSetWindowTitle(@NativeType("GLFWwindow *") long window, @NativeType("char const *") ByteBuffer title) { - if (CHECKS) { - checkNT1(title); - } - nglfwSetWindowTitle(window, memAddress(title)); - } - - /** - * Sets the window title, encoded as UTF-8, of the specified window. - * - *

    This function must only be called from the main thread.

    - * - *

    macOS: The window title will not be updated until the next time you process events.

    - * - * @param window the window whose title to change - * @param title the UTF-8 encoded window title - * - * @since version 1.0 - */ - public static void glfwSetWindowTitle(@NativeType("GLFWwindow *") long window, @NativeType("char const *") CharSequence title) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(title, true); - long titleEncoded = stack.getPointerAddress(); - nglfwSetWindowTitle(window, titleEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwSetWindowIcon ] --- - - /** - * Unsafe version of: {@link #glfwSetWindowIcon SetWindowIcon} - * - * @param count the number of images in the specified array, or zero to revert to the default window icon - */ - public static void nglfwSetWindowIcon(long window, int count, long images) { - long __functionAddress = Functions.SetWindowIcon; - if (CHECKS) { - check(window); - if (images != NULL) { Struct.validate(images, count, GLFWImage.SIZEOF, GLFWImage::validate); } - } - invokePPV(window, count, images, __functionAddress); - } - - /** - * Sets the icon for the specified window. - * - *

    This function sets the icon of the specified window. If passed an array of candidate images, those of or closest to the sizes desired by the system are - * selected. If no images are specified, the window reverts to its default icon.

    - * - *

    The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as - * packed sequential rows, starting from the top-left corner.

    - * - *

    The desired image sizes varies depending on platform and system settings. The selected images will be rescaled as needed. Good sizes include 16x16, - * 32x32 and 48x48.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • The specified image data is copied before this function returns.
    • - *
    • macOS: Regular windows do not have icons on macOS. This function will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}. The dock icon will be the same as the - * application bundle's icon. For more information on bundles, see the Bundle Programming Guide in the Mac Developer Library.
    • - *
    • Wayland: There is no existing protocol to change an icon, the window will thus inherit the one defined in the application's desktop file. - * This function will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}.
    • - *
    - * - * @param window the window whose icon to set - * @param images the images to create the icon from. This is ignored if count is zero. - * - * @since version 3.2 - */ - public static void glfwSetWindowIcon(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWimage const *") GLFWImage.Buffer images) { - nglfwSetWindowIcon(window, remainingSafe(images), memAddressSafe(images)); - } - - // --- [ glfwGetWindowPos ] --- - - /** Unsafe version of: {@link #glfwGetWindowPos GetWindowPos} */ - public static void nglfwGetWindowPos(long window, long xpos, long ypos) { - long __functionAddress = Functions.GetWindowPos; - if (CHECKS) { - check(window); - } - invokePPPV(window, xpos, ypos, __functionAddress); - } - - /** - * Retrieves the position, in screen coordinates, of the upper-left corner of the content area of the specified window. - * - *

    Any or all of the position arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} position arguments will be set to zero.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: There is no way for an application to retrieve the global position of its windows. This function will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}.
    • - *
    - * - * @param window the window to query - * @param xpos where to store the x-coordinate of the upper-left corner of the content area, or {@code NULL} - * @param ypos where to store the y-coordinate of the upper-left corner of the content area, or {@code NULL} - * - * @since version 3.0 - */ - public static void glfwGetWindowPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer xpos, @Nullable @NativeType("int *") IntBuffer ypos) { - if (CHECKS) { - checkSafe(xpos, 1); - checkSafe(ypos, 1); - } - nglfwGetWindowPos(window, memAddressSafe(xpos), memAddressSafe(ypos)); - } - - // --- [ glfwSetWindowPos ] --- - - /** - * Sets the position, in screen coordinates, of the upper-left corner of the content area of the specified windowed mode window. If the window is a full - * screen window, this function does nothing. - * - *

    Do not use this function to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the - * user.

    - * - *

    The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: There is no way for an application to set the global position of its windows. This function will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}.
    • - *
    - * - * @param window the window to query - * @param xpos the x-coordinate of the upper-left corner of the content area - * @param ypos the y-coordinate of the upper-left corner of the content area - * - * @since version 1.0 - */ - public static void glfwSetWindowPos(@NativeType("GLFWwindow *") long window, int xpos, int ypos) { - long __functionAddress = Functions.SetWindowPos; - if (CHECKS) { - check(window); - } - invokePV(window, xpos, ypos, __functionAddress); - } - - // --- [ glfwGetWindowSize ] --- - - /** Unsafe version of: {@link #glfwGetWindowSize GetWindowSize} */ - public static void nglfwGetWindowSize(long window, long width, long height) { - long __functionAddress = Functions.GetWindowSize; - if (CHECKS) { - check(window); - } - invokePPPV(window, width, height, __functionAddress); - } - - /** - * Retrieves the size, in screen coordinates, of the content area of the specified window. If you wish to retrieve the size of the framebuffer of the - * window in pixels, see {@link #glfwGetFramebufferSize GetFramebufferSize}. - * - *

    Any or all of the size arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} size arguments will be set to zero.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose size to retrieve - * @param width where to store the width, in screen coordinates, of the content area, or {@code NULL} - * @param height where to store the height, in screen coordinates, of the content area, or {@code NULL} - * - * @since version 1.0 - */ - public static void glfwGetWindowSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height) { - if (CHECKS) { - checkSafe(width, 1); - checkSafe(height, 1); - } - nglfwGetWindowSize(window, memAddressSafe(width), memAddressSafe(height)); - } - - // --- [ glfwSetWindowSizeLimits ] --- - - /** - * Sets the size limits of the content area of the specified window. If the window is full screen, the size limits only take effect if once it is made - * windowed. If the window is not resizable, this function does nothing. - * - *

    The size limits are applied immediately to a windowed mode window and may cause it to be resized.

    - * - *

    The maximum dimensions must be greater than or equal to the minimum dimensions and all must be greater than or equal to zero.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: The size limits will not be applied until the window is actually resized, either by the user or by the compositor.
    • - *
    - * - * @param window the window to set limits for - * @param minwidth the minimum width, in screen coordinates, of the content area, or {@link #GLFW_DONT_CARE DONT_CARE} - * @param minheight the minimum height, in screen coordinates, of the content area, or {@link #GLFW_DONT_CARE DONT_CARE} - * @param maxwidth the maximum width, in screen coordinates, of the content area, or {@link #GLFW_DONT_CARE DONT_CARE} - * @param maxheight the maximum height, in screen coordinates, of the content area, or {@link #GLFW_DONT_CARE DONT_CARE} - * - * @since version 3.2 - */ - public static void glfwSetWindowSizeLimits(@NativeType("GLFWwindow *") long window, int minwidth, int minheight, int maxwidth, int maxheight) { - long __functionAddress = Functions.SetWindowSizeLimits; - if (CHECKS) { - check(window); - } - invokePV(window, minwidth, minheight, maxwidth, maxheight, __functionAddress); - } - - // --- [ glfwSetWindowAspectRatio ] --- - - /** - * Sets the required aspect ratio of the content area of the specified window. If the window is full screen, the aspect ratio only takes effect once it is - * made windowed. If the window is not resizable, this function does nothing. - * - *

    The aspect ratio is specified as a numerator and a denominator and both values must be greater than zero. For example, the common 16:9 aspect ratio is - * specified as 16 and 9, respectively.

    - * - *

    If the numerator and denominator is set to {@link #GLFW_DONT_CARE DONT_CARE} then the aspect ratio limit is disabled.

    - * - *

    The aspect ratio is applied immediately to a windowed mode window and may cause it to be resized.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: The aspect ratio will not be applied until the window is actually resized, either by the user or by the compositor.
    • - *
    - * - * @param window the window to set limits for - * @param numer the numerator of the desired aspect ratio, or {@link #GLFW_DONT_CARE DONT_CARE} - * @param denom the denominator of the desired aspect ratio, or {@link #GLFW_DONT_CARE DONT_CARE} - * - * @since version 3.2 - */ - public static void glfwSetWindowAspectRatio(@NativeType("GLFWwindow *") long window, int numer, int denom) { - long __functionAddress = Functions.SetWindowAspectRatio; - if (CHECKS) { - check(window); - } - invokePV(window, numer, denom, __functionAddress); - } - - // --- [ glfwSetWindowSize ] --- - - /** - * Sets the size, in pixels, of the content area of the specified window. - * - *

    For full screen windows, this function updates the resolution of its desired video mode and switches to the video mode closest to it, without affecting - * the window's context. As the context is unaffected, the bit depths of the framebuffer remain unchanged.

    - * - *

    If you wish to update the refresh rate of the desired video mode in addition to its resolution, see {@link #glfwSetWindowMonitor SetWindowMonitor}.

    - * - *

    The window manager may put limits on what sizes are allowed. GLFW cannot and should not override these limits.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: A full screen window will not attempt to change the mode, no matter what the requested size.
    • - *
    - * - * @param window the window to resize - * @param width the desired width, in screen coordinates, of the window content area - * @param height the desired height, in screen coordinates, of the window content area - * - * @since version 1.0 - */ - public static void glfwSetWindowSize(@NativeType("GLFWwindow *") long window, int width, int height) { - long __functionAddress = Functions.SetWindowSize; - if (CHECKS) { - check(window); - } - invokePV(window, width, height, __functionAddress); - } - - // --- [ glfwGetFramebufferSize ] --- - - /** Unsafe version of: {@link #glfwGetFramebufferSize GetFramebufferSize} */ - public static void nglfwGetFramebufferSize(long window, long width, long height) { - long __functionAddress = Functions.GetFramebufferSize; - if (CHECKS) { - check(window); - } - invokePPPV(window, width, height, __functionAddress); - } - - /** - * Retrieves the size, in pixels, of the framebuffer of the specified window. If you wish to retrieve the size of the window in screen coordinates, see - * {@link #glfwGetWindowSize GetWindowSize}. - * - *

    Any or all of the size arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} size arguments will be set to zero.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose framebuffer to query - * @param width where to store the width, in pixels, of the framebuffer, or {@code NULL} - * @param height where to store the height, in pixels, of the framebuffer, or {@code NULL} - * - * @since version 3.0 - */ - public static void glfwGetFramebufferSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height) { - if (CHECKS) { - checkSafe(width, 1); - checkSafe(height, 1); - } - nglfwGetFramebufferSize(window, memAddressSafe(width), memAddressSafe(height)); - } - - // --- [ glfwGetWindowFrameSize ] --- - - /** Unsafe version of: {@link #glfwGetWindowFrameSize GetWindowFrameSize} */ - public static void nglfwGetWindowFrameSize(long window, long left, long top, long right, long bottom) { - long __functionAddress = Functions.GetWindowFrameSize; - if (CHECKS) { - check(window); - } - invokePPPPPV(window, left, top, right, bottom, __functionAddress); - } - - /** - * Retrieves the size, in screen coordinates, of each edge of the frame of the specified window. This size includes the title bar, if the window has one. - * The size of the frame may vary depending on the window-related hints used to - * create it. - * - *

    Because this function retrieves the size of each window frame edge and not the offset along a particular coordinate axis, the retrieved values will - * always be zero or positive.

    - * - *

    Any or all of the size arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} size arguments will be set to zero.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose frame size to query - * @param left where to store the size, in screen coordinates, of the left edge of the window frame, or {@code NULL} - * @param top where to store the size, in screen coordinates, of the top edge of the window frame, or {@code NULL} - * @param right where to store the size, in screen coordinates, of the right edge of the window frame, or {@code NULL} - * @param bottom where to store the size, in screen coordinates, of the bottom edge of the window frame, or {@code NULL} - * - * @since version 3.1 - */ - public static void glfwGetWindowFrameSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer left, @Nullable @NativeType("int *") IntBuffer top, @Nullable @NativeType("int *") IntBuffer right, @Nullable @NativeType("int *") IntBuffer bottom) { - if (CHECKS) { - checkSafe(left, 1); - checkSafe(top, 1); - checkSafe(right, 1); - checkSafe(bottom, 1); - } - nglfwGetWindowFrameSize(window, memAddressSafe(left), memAddressSafe(top), memAddressSafe(right), memAddressSafe(bottom)); - } - - // --- [ glfwGetWindowContentScale ] --- - - /** Unsafe version of: {@link #glfwGetWindowContentScale GetWindowContentScale} */ - public static void nglfwGetWindowContentScale(long window, long xscale, long yscale) { - long __functionAddress = Functions.GetWindowContentScale; - if (CHECKS) { - check(window); - } - invokePPPV(window, xscale, yscale, __functionAddress); - } - - /** - * Retrieves the content scale for the specified window. - * - *

    This function retrieves the content scale for the specified window. The content scale is the ratio between the current DPI and the platform's default - * DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then - * it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling - * settings being somewhat correct.

    - * - *

    On platforms where each monitor can have its own content scale, the window content scale will depend on which monitor the system considers the window - * to be on.

    - * - * @param window the window to query - * @param xscale where to store the x-axis content scale, or {@code NULL} - * @param yscale where to store the y-axis content scale, or {@code NULL} - * - * @since version 3.3 - */ - public static void glfwGetWindowContentScale(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("float *") FloatBuffer xscale, @Nullable @NativeType("float *") FloatBuffer yscale) { - if (CHECKS) { - checkSafe(xscale, 1); - checkSafe(yscale, 1); - } - nglfwGetWindowContentScale(window, memAddressSafe(xscale), memAddressSafe(yscale)); - } - - // --- [ glfwGetWindowOpacity ] --- - - /** - * Returns the opacity of the whole window. - * - *

    This function returns the opacity of the window, including any decorations.

    - * - *

    The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque. If the system - * does not support whole window transparency, this function always returns one.

    - * - *

    The initial opacity value for newly created windows is one.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window to query - * - * @return the opacity value of the specified window - * - * @since version 3.3 - */ - public static float glfwGetWindowOpacity(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetWindowOpacity; - if (CHECKS) { - check(window); - } - return invokePF(window, __functionAddress); - } - - // --- [ glfwSetWindowOpacity ] --- - - /** - * Sets the opacity of the whole window. - * - *

    This function sets the opacity of the window, including any decorations.

    - * - *

    The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque.

    - * - *

    The initial opacity value for newly created windows is one.

    - * - *

    A window created with framebuffer transparency may not use whole window transparency. The results of doing this are undefined.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: There is no way to set an opacity factor for a window. This function will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}.
    • - *
    - * - * @param window the window to set the opacity for - * @param opacity the desired opacity of the specified window - * - * @since version 3.3 - */ - public static void glfwSetWindowOpacity(@NativeType("GLFWwindow *") long window, float opacity) { - long __functionAddress = Functions.SetWindowOpacity; - if (CHECKS) { - check(window); - } - invokePV(window, opacity, __functionAddress); - } - - // --- [ glfwIconifyWindow ] --- - - /** - * Iconifies (minimizes) the specified window if it was previously restored. If the window is already iconified, this function does nothing. - * - *

    If the specified window is a full screen window, GLFW restores the original video mode of the monitor. The window's desired video mode is set again - * when the window is restored.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: Once a window is iconified, {@link #glfwRestoreWindow RestoreWindow} won’t be able to restore it. This is a design decision of the {@code xdg-shell}.
    • - *
    - * - * @param window the window to iconify - * - * @since version 2.1 - */ - public static void glfwIconifyWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.IconifyWindow; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwRestoreWindow ] --- - - /** - * Restores the specified window if it was previously iconified (minimized) or maximized. If the window is already restored, this function does nothing. - * - *

    If the specified window is an iconified full screen window, its desired video mode is set again for its monitor when the window is restored.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window to restore - * - * @since version 2.1 - */ - public static void glfwRestoreWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.RestoreWindow; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwMaximizeWindow ] --- - - /** - * Maximizes the specified window if it was previously not maximized. If the window is already maximized, this function does nothing. - * - *

    If the specified window is a full screen window, this function does nothing.

    - * - *

    This function may only be called from the main thread.

    - * - * @param window the window to maximize - * - * @since version 3.2 - */ - public static void glfwMaximizeWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.MaximizeWindow; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwShowWindow ] --- - - /** - * Makes the specified window visible if it was previously hidden. If the window is already visible or is in full screen mode, this function does nothing. - * - *

    By default, windowed mode windows are focused when shown. Set the {@link #GLFW_FOCUS_ON_SHOW FOCUS_ON_SHOW} window hint to change this behavior for all newly created windows, or - * change the behavior for an existing window with {@link #glfwSetWindowAttrib SetWindowAttrib}.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: Because Wayland wants every frame of the desktop to be complete, this function does not immediately make the window visible. - * Instead it will become visible the next time the window framebuffer is updated after this call.
    • - *
    - * - * @param window the window to make visible - * - * @since version 3.0 - */ - public static void glfwShowWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.ShowWindow; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwHideWindow ] --- - - /** - * Hides the specified window, if it was previously visible. If the window is already hidden or is in full screen mode, this function does nothing. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window to hide - * - * @since version 3.0 - */ - public static void glfwHideWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.HideWindow; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwFocusWindow ] --- - - /** - * Brings the specified window to front and sets input focus. The window should already be visible and not iconified. - * - *

    By default, both windowed and full screen mode windows are focused when initially created. Set the {@link #GLFW_FOCUSED FOCUSED} hint to disable this behavior.

    - * - *

    Also by default, windowed mode windows are focused when shown with {@link #glfwShowWindow ShowWindow}. Set the {@link #GLFW_FOCUS_ON_SHOW FOCUS_ON_SHOW} window hint to disable this behavior.

    - * - *

    Do not use this function to steal focus from other applications unless you are certain that is what the user wants. Focus stealing can be - * extremely disruptive.

    - * - *

    For a less disruptive way of getting the user's attention, see {@link #glfwRequestWindowAttention RequestWindowAttention}.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: It is not possible for an application to set the input focus. This function will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}.
    • - *
    - * - * @param window the window to give input focus - * - * @since version 3.2 - */ - public static void glfwFocusWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.FocusWindow; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwRequestWindowAttention ] --- - - /** - * Requests user attention to the specified window. - * - *

    This function requests user attention to the specified window. On platforms where this is not supported, attention is requested to the application as - * a whole.

    - * - *

    Once the user has given attention, usually by focusing the window or application, the system will end the request automatically.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • macOS: Attention is requested to the application as a whole, not the specific window.
    • - *
    - * - * @param window the window to request attention to - * - * @since version 3.3 - */ - public static void glfwRequestWindowAttention(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.RequestWindowAttention; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwGetWindowMonitor ] --- - - /** - * Returns the handle of the monitor that the specified window is in full screen on. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window to query - * - * @return the monitor, or {@code NULL} if the window is in windowed mode or an error occurred - * - * @since version 3.0 - */ - @NativeType("GLFWmonitor *") - public static long glfwGetWindowMonitor(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetWindowMonitor; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - // --- [ glfwSetWindowMonitor ] --- - - /** - * Sets the mode, monitor, video mode and placement of a window. - * - *

    This function sets the monitor that the window uses for full screen mode or, if the monitor is {@code NULL}, makes it windowed mode.

    - * - *

    When setting a monitor, this function updates the width, height and refresh rate of the desired video mode and switches to the video mode closest to - * it. The window position is ignored when setting a monitor.

    - * - *

    When the monitor is {@code NULL}, the position, width and height are used to place the window content area. The refresh rate is ignored when no monitor is - * specified.

    - * - *

    If you only wish to update the resolution of a full screen window or the size of a windowed mode window, see {@link #glfwSetWindowSize SetWindowSize}.

    - * - *

    When a window transitions from full screen to windowed mode, this function restores any previous window settings such as whether it is decorated, - * floating, resizable, has size or aspect ratio limits, etc.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: The desired window position is ignored, as there is no way for an application to set this property.
    • - *
    • Wayland: Setting the window to full screen will not attempt to change the mode, no matter what the requested size or refresh rate.
    • - *
    - * - * @param window the window whose monitor, size or video mode to set - * @param monitor the desired monitor, or {@code NULL} to set windowed mode - * @param xpos the desired x-coordinate of the upper-left corner of the content area - * @param ypos the desired y-coordinate of the upper-left corner of the content area - * @param width the desired with, in screen coordinates, of the content area or video mode - * @param height the desired height, in screen coordinates, of the content area or video mode - * @param refreshRate the desired refresh rate, in Hz, of the video mode, or {@link #GLFW_DONT_CARE DONT_CARE} - * - * @since version 3.2 - */ - public static void glfwSetWindowMonitor(@NativeType("GLFWwindow *") long window, @NativeType("GLFWmonitor *") long monitor, int xpos, int ypos, int width, int height, int refreshRate) { - long __functionAddress = Functions.SetWindowMonitor; - if (CHECKS) { - check(window); - } - invokePPV(window, monitor, xpos, ypos, width, height, refreshRate, __functionAddress); - } - - // --- [ glfwGetWindowAttrib ] --- - - /** - * Returns the value of an attribute of the specified window or its OpenGL or OpenGL ES context. - * - *

    This function must only be called from the main thread.

    - * - *

    Framebuffer related hints are not window attributes.

    - * - *

    Zero is a valid value for many window and context related attributes so you cannot use a return value of zero as an indication of errors. However, this - * function should not fail as long as it is passed valid arguments and the library has been initialized.

    - * - *

    Wayland: The Wayland protocol provides no way to check whether a window is iconfied, so {@link #GLFW_ICONIFIED ICONIFIED} always returns {@link #GLFW_FALSE FALSE}.

    - * - * @param window the window to query - * @param attrib the window attribute whose value to return. One of:
    {@link #GLFW_FOCUSED FOCUSED}{@link #GLFW_ICONIFIED ICONIFIED}{@link #GLFW_RESIZABLE RESIZABLE}{@link #GLFW_VISIBLE VISIBLE}{@link #GLFW_DECORATED DECORATED}
    {@link #GLFW_FLOATING FLOATING}{@link #GLFW_MAXIMIZED MAXIMIZED}{@link #GLFW_CENTER_CURSOR CENTER_CURSOR}{@link #GLFW_TRANSPARENT_FRAMEBUFFER TRANSPARENT_FRAMEBUFFER}{@link #GLFW_HOVERED HOVERED}
    {@link #GLFW_FOCUS_ON_SHOW FOCUS_ON_SHOW}{@link #GLFW_MOUSE_PASSTHROUGH MOUSE_PASSTHROUGH}{@link #GLFW_POSITION_X POSITION_X}{@link #GLFW_POSITION_Y POSITION_Y}{@link #GLFW_CLIENT_API CLIENT_API}
    {@link #GLFW_CONTEXT_VERSION_MAJOR CONTEXT_VERSION_MAJOR}{@link #GLFW_CONTEXT_VERSION_MINOR CONTEXT_VERSION_MINOR}{@link #GLFW_CONTEXT_REVISION CONTEXT_REVISION}{@link #GLFW_CONTEXT_ROBUSTNESS CONTEXT_ROBUSTNESS}{@link #GLFW_OPENGL_FORWARD_COMPAT OPENGL_FORWARD_COMPAT}
    {@link #GLFW_CONTEXT_DEBUG CONTEXT_DEBUG}{@link #GLFW_OPENGL_DEBUG_CONTEXT OPENGL_DEBUG_CONTEXT}{@link #GLFW_OPENGL_PROFILE OPENGL_PROFILE}{@link #GLFW_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR}{@link #GLFW_CONTEXT_NO_ERROR CONTEXT_NO_ERROR}
    {@link #GLFW_CONTEXT_CREATION_API CONTEXT_CREATION_API}{@link #GLFW_SCALE_TO_MONITOR SCALE_TO_MONITOR}
    - * - * @return the value of the attribute, or zero if an error occurred - * - * @since version 3.0 - */ - public static int glfwGetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib) { - long __functionAddress = Functions.GetWindowAttrib; - if (CHECKS) { - check(window); - } - return invokePI(window, attrib, __functionAddress); - } - - // --- [ glfwSetWindowAttrib ] --- - - /** - * Sets an attribute of the specified window. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window to set the attribute for - * @param attrib the attribute to set. - * - *

    Some of these attributes are ignored for full screen windows. The new value will take effect if the window is later made windowed.

    - * - *

    Some of these attributes are ignored for windowed mode windows. The new value will take effect if the window is later made full screen.

    - * - *

    Calling {@link #glfwGetWindowAttrib GetWindowAttrib} will always return the latest value, even if that value is ignored by the current mode of the window. One of:

    {@link #GLFW_DECORATED DECORATED}{@link #GLFW_RESIZABLE RESIZABLE}{@link #GLFW_FLOATING FLOATING}{@link #GLFW_AUTO_ICONIFY AUTO_ICONIFY}{@link #GLFW_FOCUS_ON_SHOW FOCUS_ON_SHOW}{@link #GLFW_MOUSE_PASSTHROUGH MOUSE_PASSTHROUGH}
    - * @param value the value to set - * - * @since version 3.3 - */ - public static void glfwSetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib, int value) { - long __functionAddress = Functions.SetWindowAttrib; - if (CHECKS) { - check(window); - } - invokePV(window, attrib, value, __functionAddress); - } - - // --- [ glfwSetWindowUserPointer ] --- - - /** - * Sets the user-defined pointer of the specified window. The current value is retained until the window is destroyed. The initial value is {@code NULL}. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window the window whose pointer to set - * @param pointer the new value - * - * @since version 3.0 - */ - public static void glfwSetWindowUserPointer(@NativeType("GLFWwindow *") long window, @NativeType("void *") long pointer) { - long __functionAddress = Functions.SetWindowUserPointer; - if (CHECKS) { - check(window); - } - invokePPV(window, pointer, __functionAddress); - } - - // --- [ glfwGetWindowUserPointer ] --- - - /** - * Returns the current value of the user-defined pointer of the specified window. The initial value is {@code NULL}. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window the window whose pointer to return - * - * @since version 3.0 - */ - @NativeType("void *") - public static long glfwGetWindowUserPointer(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetWindowUserPointer; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - // --- [ glfwSetWindowPosCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowPosCallback SetWindowPosCallback} */ - public static long nglfwSetWindowPosCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowPosCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the position callback of the specified window, which is called when the window is moved. The callback is provided with the position, in screen - * coordinates, of the upper-left corner of the content area of the window. - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: This callback will never be called, as there is no way for an application to know its global position.
    • - *
    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 1.0 - */ - @Nullable - @NativeType("GLFWwindowposfun") - public static GLFWWindowPosCallback glfwSetWindowPosCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowposfun") GLFWWindowPosCallbackI cbfun) { - return GLFWWindowPosCallback.createSafe(nglfwSetWindowPosCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetWindowSizeCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowSizeCallback SetWindowSizeCallback} */ - public static long nglfwSetWindowSizeCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowSizeCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the size callback of the specified window, which is called when the window is resized. The callback is provided with the size, in screen - * coordinates, of the content area of the window. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 1.0 - */ - @Nullable - @NativeType("GLFWwindowsizefun") - public static GLFWWindowSizeCallback glfwSetWindowSizeCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowsizefun") GLFWWindowSizeCallbackI cbfun) { - return GLFWWindowSizeCallback.createSafe(nglfwSetWindowSizeCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetWindowCloseCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowCloseCallback SetWindowCloseCallback} */ - public static long nglfwSetWindowCloseCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowCloseCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the close callback of the specified window, which is called when the user attempts to close the window, for example by clicking the close widget in - * the title bar. - * - *

    The close flag is set before this callback is called, but you can modify it at any time with {@link #glfwSetWindowShouldClose SetWindowShouldClose}.

    - * - *

    The close callback is not triggered by {@link #glfwDestroyWindow DestroyWindow}.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • macOS: Selecting Quit from the application menu will trigger the close callback for all windows.
    • - *
    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 2.5 - */ - @Nullable - @NativeType("GLFWwindowclosefun") - public static GLFWWindowCloseCallback glfwSetWindowCloseCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowclosefun") GLFWWindowCloseCallbackI cbfun) { - return GLFWWindowCloseCallback.createSafe(nglfwSetWindowCloseCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetWindowRefreshCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowRefreshCallback SetWindowRefreshCallback} */ - public static long nglfwSetWindowRefreshCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowRefreshCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the refresh callback of the specified window, which is called when the content area of the window needs to be redrawn, for example if the window has - * been exposed after having been covered by another window. - * - *

    On compositing window systems such as Aero, Compiz or Aqua, where the window contents are saved off-screen, this callback may be called only very - * infrequently or never at all.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 2.5 - */ - @Nullable - @NativeType("GLFWwindowrefreshfun") - public static GLFWWindowRefreshCallback glfwSetWindowRefreshCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowrefreshfun") GLFWWindowRefreshCallbackI cbfun) { - return GLFWWindowRefreshCallback.createSafe(nglfwSetWindowRefreshCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetWindowFocusCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowFocusCallback SetWindowFocusCallback} */ - public static long nglfwSetWindowFocusCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowFocusCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the focus callback of the specified window, which is called when the window gains or loses input focus. - * - *

    After the focus callback is called for a window that lost input focus, synthetic key and mouse button release events will be generated for all such - * that had been pressed. For more information, see {@link #glfwSetKeyCallback SetKeyCallback} and {@link #glfwSetMouseButtonCallback SetMouseButtonCallback}.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWwindowfocusfun") - public static GLFWWindowFocusCallback glfwSetWindowFocusCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowfocusfun") GLFWWindowFocusCallbackI cbfun) { - return GLFWWindowFocusCallback.createSafe(nglfwSetWindowFocusCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetWindowIconifyCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowIconifyCallback SetWindowIconifyCallback} */ - public static long nglfwSetWindowIconifyCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowIconifyCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the iconification callback of the specified window, which is called when the window is iconified or restored. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWwindowiconifyfun") - public static GLFWWindowIconifyCallback glfwSetWindowIconifyCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowiconifyfun") GLFWWindowIconifyCallbackI cbfun) { - return GLFWWindowIconifyCallback.createSafe(nglfwSetWindowIconifyCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetWindowMaximizeCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowMaximizeCallback SetWindowMaximizeCallback} */ - public static long nglfwSetWindowMaximizeCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowMaximizeCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the maximization callback of the specified window, which is called when the window is maximized or restored. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 3.3 - */ - @Nullable - @NativeType("GLFWwindowmaximizefun") - public static GLFWWindowMaximizeCallback glfwSetWindowMaximizeCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowmaximizefun") GLFWWindowMaximizeCallbackI cbfun) { - return GLFWWindowMaximizeCallback.createSafe(nglfwSetWindowMaximizeCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetFramebufferSizeCallback ] --- - - /** Unsafe version of: {@link #glfwSetFramebufferSizeCallback SetFramebufferSizeCallback} */ - public static long nglfwSetFramebufferSizeCallback(long window, long cbfun) { - long __functionAddress = Functions.SetFramebufferSizeCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWframebuffersizefun") - public static GLFWFramebufferSizeCallback glfwSetFramebufferSizeCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWframebuffersizefun") GLFWFramebufferSizeCallbackI cbfun) { - return GLFWFramebufferSizeCallback.createSafe(nglfwSetFramebufferSizeCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetWindowContentScaleCallback ] --- - - /** Unsafe version of: {@link #glfwSetWindowContentScaleCallback SetWindowContentScaleCallback} */ - public static long nglfwSetWindowContentScaleCallback(long window, long cbfun) { - long __functionAddress = Functions.SetWindowContentScaleCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the window content scale callback for the specified window, which is called when the content scale of the specified window changes. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been - * initialized - * - * @since version 3.3 - */ - @Nullable - @NativeType("GLFWwindowcontentscalefun") - public static GLFWWindowContentScaleCallback glfwSetWindowContentScaleCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWwindowcontentscalefun") GLFWWindowContentScaleCallbackI cbfun) { - return GLFWWindowContentScaleCallback.createSafe(nglfwSetWindowContentScaleCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwPollEvents ] --- - - /** - * Processes all pending events. - * - *

    This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and - * input callbacks associated with those events to be called.

    - * - *

    On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on - * those platforms. You can use the window refresh callback to redraw the - * contents of your window when necessary during such operations.

    - * - *

    On some platforms, certain events are sent directly to the application without going through the event queue, causing callbacks to be called outside of - * a call to one of the event processing functions.

    - * - *

    Event processing is not required for joystick input to work.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • This function must not be called from a callback.
    • - *
    - * - * @since version 1.0 - */ - public static void glfwPollEvents() { - long __functionAddress = Functions.PollEvents; - invokeV(__functionAddress); - } - - // --- [ glfwWaitEvents ] --- - - /** - * Waits until events are queued and processes them. - * - *

    This function puts the calling thread to sleep until at least one event is available in the event queue. Once one or more events are available, it - * behaves exactly like {@link #glfwPollEvents PollEvents}, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause - * the window and input callbacks associated with those events to be called.

    - * - *

    Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all - * callbacks.

    - * - *

    On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on - * those platforms. You can use the window refresh callback to redraw the - * contents of your window when necessary during such operations.

    - * - *

    On some platforms, certain callbacks may be called outside of a call to one of the event processing functions.

    - * - *

    Event processing is not required for joystick input to work.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • This function must not be called from a callback.
    • - *
    - * - * @since version 2.5 - */ - public static void glfwWaitEvents() { - long __functionAddress = Functions.WaitEvents; - invokeV(__functionAddress); - } - - // --- [ glfwWaitEventsTimeout ] --- - - /** - * Waits with timeout until events are queued and processes them. - * - *

    This function puts the calling thread to sleep until at least one event is available in the event queue, or until the specified timeout is reached. If - * one or more events are available, it behaves exactly like {@link #glfwPollEvents PollEvents}, i.e. the events in the queue are processed and the function then returns - * immediately. Processing events will cause the window and input callbacks associated with those events to be called.

    - * - *

    The timeout value must be a positive finite number.

    - * - *

    Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all - * callbacks.

    - * - *

    On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on - * those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.

    - * - *

    On some platforms, certain callbacks may be called outside of a call to one of the event processing functions.

    - * - *

    Event processing is not required for joystick input to work.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • This function must not be called from a callback.
    • - *
    - * - * @param timeout the maximum amount of time, in seconds, to wait - * - * @since version 3.2 - */ - public static void glfwWaitEventsTimeout(double timeout) { - long __functionAddress = Functions.WaitEventsTimeout; - invokeV(timeout, __functionAddress); - } - - // --- [ glfwPostEmptyEvent ] --- - - /** - * Posts an empty event from the current thread to the main thread event queue, causing {@link #glfwWaitEvents WaitEvents} or {@link #glfwWaitEventsTimeout WaitEventsTimeout} to return. - * - *

    This function may be called from any thread.

    - * - * @since version 3.1 - */ - public static void glfwPostEmptyEvent() { - long __functionAddress = Functions.PostEmptyEvent; - invokeV(__functionAddress); - } - - // --- [ glfwGetInputMode ] --- - - /** - * Returns the value of an input option for the specified window. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window to query - * @param mode the input mode whose value to return. One of:
    {@link #GLFW_CURSOR CURSOR}{@link #GLFW_STICKY_KEYS STICKY_KEYS}{@link #GLFW_STICKY_MOUSE_BUTTONS STICKY_MOUSE_BUTTONS}{@link #GLFW_LOCK_KEY_MODS LOCK_KEY_MODS}{@link #GLFW_RAW_MOUSE_MOTION RAW_MOUSE_MOTION}
    - * - * @return the input mode value - * - * @since version 3.0 - */ - public static int glfwGetInputMode(@NativeType("GLFWwindow *") long window, int mode) { - long __functionAddress = Functions.GetInputMode; - if (CHECKS) { - check(window); - } - return invokePI(window, mode, __functionAddress); - } - - // --- [ glfwSetInputMode ] --- - - /** - * Sets an input option for the specified window. - * - *

    If {@code mode} is {@link #GLFW_CURSOR CURSOR}, the value must be one of the following cursor modes:

    - * - *
      - *
    • {@link #GLFW_CURSOR_NORMAL CURSOR_NORMAL} makes the cursor visible and behaving normally.
    • - *
    • {@link #GLFW_CURSOR_HIDDEN CURSOR_HIDDEN} makes the cursor invisible when it is over the content area of the window but does not restrict the cursor from leaving.
    • - *
    • {@link #GLFW_CURSOR_DISABLED CURSOR_DISABLED} hides and grabs the cursor, providing virtual and unlimited cursor movement. This is useful for implementing for example 3D camera - * controls.
    • - *
    • {@link #GLFW_CURSOR_CAPTURED CURSOR_CAPTURED} makes the cursor visible and confines it to the content area of the window.
    • - *
    - * - *

    If the {@code mode} is {@link #GLFW_STICKY_KEYS STICKY_KEYS}, the value must be either {@link #GLFW_TRUE TRUE} to enable sticky keys, or {@link #GLFW_FALSE FALSE} to disable it. If sticky keys are enabled, a key - * press will ensure that {@link #glfwGetKey GetKey} returns {@link #GLFW_PRESS PRESS} the next time it is called even if the key had been released before the call. This is useful when you - * are only interested in whether keys have been pressed but not when or in which order.

    - * - *

    If the {@code mode} is {@link #GLFW_STICKY_MOUSE_BUTTONS STICKY_MOUSE_BUTTONS}, the value must be either {@link #GLFW_TRUE TRUE} to enable sticky mouse buttons, or {@link #GLFW_FALSE FALSE} to disable it. If sticky mouse - * buttons are enabled, a mouse button press will ensure that {@link #glfwGetMouseButton GetMouseButton} returns {@link #GLFW_PRESS PRESS} the next time it is called even if the mouse button had - * been released before the call. This is useful when you are only interested in whether mouse buttons have been pressed but not when or in which order.

    - * - *

    If the {@code mode} is {@link #GLFW_LOCK_KEY_MODS LOCK_KEY_MODS}, the value must be either {@link #GLFW_TRUE TRUE} to enable lock key modifier bits, or {@link #GLFW_FALSE FALSE} to disable them. If enabled, - * callbacks that receive modifier bits will also have the {@link #GLFW_MOD_CAPS_LOCK MOD_CAPS_LOCK} bit set when the event was generated with Caps Lock on, and the {@link #GLFW_MOD_NUM_LOCK MOD_NUM_LOCK} - * bit when Num Lock was on.

    - * - *

    If the mode is {@link #GLFW_RAW_MOUSE_MOTION RAW_MOUSE_MOTION}, the value must be either {@link #GLFW_TRUE TRUE} to enable raw (unscaled and unaccelerated) mouse motion when the cursor is disabled, - * or {@link #GLFW_FALSE FALSE} to disable it. If raw motion is not supported, attempting to set this will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}. Call {@link #glfwRawMouseMotionSupported RawMouseMotionSupported} to - * check for support.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose input mode to set - * @param mode the input mode to set. One of:
    {@link #GLFW_CURSOR CURSOR}{@link #GLFW_STICKY_KEYS STICKY_KEYS}{@link #GLFW_STICKY_MOUSE_BUTTONS STICKY_MOUSE_BUTTONS}
    - * @param value the new value of the specified input mode - * - * @since GFLW 3.0 - */ - public static void glfwSetInputMode(@NativeType("GLFWwindow *") long window, int mode, int value) { - long __functionAddress = Functions.SetInputMode; - if (CHECKS) { - check(window); - } - invokePV(window, mode, value, __functionAddress); - FCLInjector.setClassLoader(Thread.currentThread().getContextClassLoader()); - } - - // --- [ glfwRawMouseMotionSupported ] --- - - /** - * Returns whether raw mouse motion is supported. - * - *

    This function returns whether raw mouse motion is supported on the current system. This status does not change after GLFW has been initialized so you - * only need to check this once. If you attempt to enable raw motion on a system that does not support it, {@link #GLFW_PLATFORM_ERROR PLATFORM_ERROR} will be emitted.

    - * - *

    Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the scaling and acceleration applied to the motion - * of the desktop cursor. That processing is suitable for a cursor while raw motion is better for controlling for example a 3D camera. Because of this, - * raw mouse motion is only provided when the cursor is disabled.

    - * - *

    This function must only be called from the main thread.

    - * - * @return {@link #GLFW_TRUE TRUE} if raw mouse motion is supported on the current machine, or {@link #GLFW_FALSE FALSE} otherwise - * - * @since version 3.3 - */ - @NativeType("int") - public static boolean glfwRawMouseMotionSupported() { - long __functionAddress = Functions.RawMouseMotionSupported; - return invokeI(__functionAddress) != 0; - } - - // --- [ glfwGetKeyName ] --- - - /** Unsafe version of: {@link #glfwGetKeyName GetKeyName} */ - public static long nglfwGetKeyName(int key, int scancode) { - long __functionAddress = Functions.GetKeyName; - return invokeP(key, scancode, __functionAddress); - } - - /** - * Returns the layout-specific name of the specified printable key. - * - *

    This function returns the name of the specified printable key, encoded as UTF-8. This is typically the character that key would produce without any - * modifier keys, intended for displaying key bindings to the user. For dead keys, it is typically the diacritic it would add to a character.

    - * - *

    Do not use this function for text input. You will break text input for many languages even if it happens to work for yours.

    - * - *

    If the key is {@link #GLFW_KEY_UNKNOWN KEY_UNKNOWN}, the scancode is used to identify the key, otherwise the scancode is ignored. If you specify a non-printable key, or - * {@link #GLFW_KEY_UNKNOWN KEY_UNKNOWN} and a scancode that maps to a non-printable key, this function returns {@code NULL} but does not emit an error.

    - * - *

    This behavior allows you to always pass in the arguments in the key callback without modification.

    - * - *

    The printable keys are:

    - * - *
      - *
    • {@link #GLFW_KEY_APOSTROPHE KEY_APOSTROPHE}
    • - *
    • {@link #GLFW_KEY_COMMA KEY_COMMA}
    • - *
    • {@link #GLFW_KEY_MINUS KEY_MINUS}
    • - *
    • {@link #GLFW_KEY_PERIOD KEY_PERIOD}
    • - *
    • {@link #GLFW_KEY_SLASH KEY_SLASH}
    • - *
    • {@link #GLFW_KEY_SEMICOLON KEY_SEMICOLON}
    • - *
    • {@link #GLFW_KEY_EQUAL KEY_EQUAL}
    • - *
    • {@link #GLFW_KEY_LEFT_BRACKET KEY_LEFT_BRACKET}
    • - *
    • {@link #GLFW_KEY_RIGHT_BRACKET KEY_RIGHT_BRACKET}
    • - *
    • {@link #GLFW_KEY_BACKSLASH KEY_BACKSLASH}
    • - *
    • {@link #GLFW_KEY_WORLD_1 KEY_WORLD_1}
    • - *
    • {@link #GLFW_KEY_WORLD_2 KEY_WORLD_2}
    • - *
    • {@link #GLFW_KEY_0 KEY_0} to {@link #GLFW_KEY_9 KEY_9}
    • - *
    • {@link #GLFW_KEY_A KEY_A} to {@link #GLFW_KEY_Z KEY_Z}
    • - *
    • {@link #GLFW_KEY_KP_0 KEY_KP_0} to {@link #GLFW_KEY_KP_9 KEY_KP_9}
    • - *
    • {@link #GLFW_KEY_KP_DECIMAL KEY_KP_DECIMAL}
    • - *
    • {@link #GLFW_KEY_KP_DIVIDE KEY_KP_DIVIDE}
    • - *
    • {@link #GLFW_KEY_KP_MULTIPLY KEY_KP_MULTIPLY}
    • - *
    • {@link #GLFW_KEY_KP_SUBTRACT KEY_KP_SUBTRACT}
    • - *
    • {@link #GLFW_KEY_KP_ADD KEY_KP_ADD}
    • - *
    • {@link #GLFW_KEY_KP_EQUAL KEY_KP_EQUAL}
    • - *
    - * - *

    Names for printable keys depend on keyboard layout, while names for non-printable keys are the same across layouts but depend on the application - * language and should be localized along with other user interface text.

    - * - *

    The contents of the returned string may change when a keyboard layout change event is received.

    - * - *

    The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param key the key to query, or {@link #GLFW_KEY_UNKNOWN KEY_UNKNOWN} - * @param scancode the scancode of the key to query - * - * @return the UTF-8 encoded, layout-specific name of the key, or {@code NULL} - * - * @since version 3.2 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetKeyName(int key, int scancode) { - long __result = nglfwGetKeyName(key, scancode); - return memUTF8Safe(__result); - } - - // --- [ glfwGetKeyScancode ] --- - - /** - * Returns the platform dependent scancode of the specified key. - * - *

    This function returns the platform dependent scancode of the specified key. This is intended for platform specific default keybindings.

    - * - *

    If the key is {@link #GLFW_KEY_UNKNOWN KEY_UNKNOWN} or does not exist on the keyboard this method will return {@code -1}.

    - * - *

    This function may be called from any thread.

    - * - * @param key the key to query, or {@link #GLFW_KEY_UNKNOWN KEY_UNKNOWN} - * - * @return the platform dependent scancode for the key, or {@code -1} if an errror occurred - * - * @since version 3.3 - */ - public static int glfwGetKeyScancode(int key) { - long __functionAddress = Functions.GetKeyScancode; - return invokeI(key, __functionAddress); - } - - // --- [ glfwGetKey ] --- - - /** - * Returns the last state reported for the specified key to the specified window. The returned state is one of {@link #GLFW_PRESS PRESS} or {@link #GLFW_RELEASE RELEASE}. The action {@link #GLFW_REPEAT REPEAT} is - * only reported to the key callback. - * - *

    If the {@link #GLFW_STICKY_KEYS STICKY_KEYS} input mode is enabled, this function returns {@link #GLFW_PRESS PRESS} the first time you call it for a key that was pressed, even if that - * key has already been released.

    - * - *

    The key functions deal with physical keys, with key tokens named after their use on the standard US keyboard layout. If you want to input text, use the - * Unicode character callback instead.

    - * - *

    The modifier key bit masks are not key tokens and cannot be used with this function.

    - * - *

    Do not use this function to implement text input.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • {@link #GLFW_KEY_UNKNOWN KEY_UNKNOWN} is not a valid key for this function.
    • - *
    - * - * @param window the desired window - * @param key the desired keyboard key - * - * @return one of {@link #GLFW_PRESS PRESS} or {@link #GLFW_RELEASE RELEASE} - * - * @since version 1.0 - */ - public static int glfwGetKey(@NativeType("GLFWwindow *") long window, int key) { - long __functionAddress = Functions.GetKey; - if (CHECKS) { - check(window); - } - return invokePI(window, key, __functionAddress); - } - - // --- [ glfwGetMouseButton ] --- - - /** - * Returns the last state reported for the specified mouse button to the specified window. The returned state is one of {@link #GLFW_PRESS PRESS} or {@link #GLFW_RELEASE RELEASE}. The - * higher-level action {@link #GLFW_REPEAT REPEAT} is only reported to the mouse button callback. - * - *

    If the {@link #GLFW_STICKY_MOUSE_BUTTONS STICKY_MOUSE_BUTTONS} input mode is enabled, this function returns {@link #GLFW_PRESS PRESS} the first time you call it for a mouse button that was pressed, even - * if that mouse button has already been released.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the desired window - * @param button the desired mouse button - * - * @return one of {@link #GLFW_PRESS PRESS} or {@link #GLFW_RELEASE RELEASE} - * - * @since version 1.0 - */ - public static int glfwGetMouseButton(@NativeType("GLFWwindow *") long window, int button) { - long __functionAddress = Functions.GetMouseButton; - if (CHECKS) { - check(window); - } - return invokePI(window, button, __functionAddress); - } - - // --- [ glfwGetCursorPos ] --- - - /** Unsafe version of: {@link #glfwGetCursorPos GetCursorPos} */ - public static void nglfwGetCursorPos(long window, long xpos, long ypos) { - long __functionAddress = Functions.GetCursorPos; - if (CHECKS) { - check(window); - } - invokePPPV(window, xpos, ypos, __functionAddress); - } - - /** - * Returns the position of the cursor, in screen coordinates, relative to the upper-left corner of the content area of the specified window. - * - *

    If the cursor is disabled (with {@link #GLFW_CURSOR_DISABLED CURSOR_DISABLED}) then the cursor position is unbounded and limited only by the minimum and maximum values of a - * double.

    - * - *

    The coordinates can be converted to their integer equivalents with the {@link Math#floor} function. Casting directly to an integer type works for positive - * coordinates, but fails for negative ones.

    - * - *

    Any or all of the position arguments may be {@code NULL}. If an error occurs, all non-{@code NULL} position arguments will be set to zero.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the desired window - * @param xpos where to store the cursor x-coordinate, relative to the left edge of the content area, or {@code NULL} - * @param ypos where to store the cursor y-coordinate, relative to the to top edge of the content area, or {@code NULL}. - * - * @since version 1.0 - */ - public static void glfwGetCursorPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") DoubleBuffer xpos, @Nullable @NativeType("double *") DoubleBuffer ypos) { - if (CHECKS) { - checkSafe(xpos, 1); - checkSafe(ypos, 1); - } - nglfwGetCursorPos(window, memAddressSafe(xpos), memAddressSafe(ypos)); - } - - // --- [ glfwSetCursorPos ] --- - - /** - * Sets the position, in screen coordinates, of the cursor relative to the upper-left corner of the content area of the specified window. The window must - * have input focus. If the window does not have input focus when this function is called, it fails silently. - * - *

    Do not use this function to implement things like camera controls. GLFW already provides the {@link #GLFW_CURSOR_DISABLED CURSOR_DISABLED} cursor mode that hides the cursor, - * transparently re-centers it and provides unconstrained cursor motion. See {@link #glfwSetInputMode SetInputMode} for more information.

    - * - *

    If the cursor mode is {@link #GLFW_CURSOR_DISABLED CURSOR_DISABLED} then the cursor position is unconstrained and limited only by the minimum and maximum values of double.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: This function will only work when the cursor mode is {@link #GLFW_CURSOR_DISABLED CURSOR_DISABLED}, otherwise it will emit {@link #GLFW_FEATURE_UNAVAILABLE FEATURE_UNAVAILABLE}.
    • - *
    - * - * @param window the desired window - * @param xpos the desired x-coordinate, relative to the left edge of the content area - * @param ypos the desired y-coordinate, relative to the top edge of the content area - * - * @since version 1.0 - */ - public static void glfwSetCursorPos(@NativeType("GLFWwindow *") long window, double xpos, double ypos) { - long __functionAddress = Functions.SetCursorPos; - if (CHECKS) { - check(window); - } - invokePV(window, xpos, ypos, __functionAddress); - } - - // --- [ glfwCreateCursor ] --- - - /** Unsafe version of: {@link #glfwCreateCursor CreateCursor} */ - public static long nglfwCreateCursor(long image, int xhot, int yhot) { - long __functionAddress = Functions.CreateCursor; - if (CHECKS) { - GLFWImage.validate(image); - } - return invokePP(image, xhot, yhot, __functionAddress); - } - - /** - * Creates a new custom cursor image that can be set for a window with {@link #glfwSetCursor SetCursor}. The cursor can be destroyed with {@link #glfwDestroyCursor DestroyCursor}. Any remaining - * cursors are destroyed by {@link #glfwTerminate Terminate}. - * - *

    The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as - * packed sequential rows, starting from the top-left corner.

    - * - *

    The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other coordinate systems in GLFW, the X-axis - * points to the right and the Y-axis points down.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • The specified image data is copied before this function returns.
    • - *
    - * - * @param image the desired cursor image - * @param xhot the desired x-coordinate, in pixels, of the cursor hotspot - * @param yhot the desired y-coordinate, in pixels, of the cursor hotspot - * - * @return the handle of the created cursor, or {@code NULL} if an error occurred - * - * @since version 3.1 - */ - @NativeType("GLFWcursor *") - public static long glfwCreateCursor(@NativeType("GLFWimage const *") GLFWImage image, int xhot, int yhot) { - return nglfwCreateCursor(image.address(), xhot, yhot); - } - - // --- [ glfwCreateStandardCursor ] --- - - /** - * Returns a cursor with a standard shape, that can be set for a window with {@link #glfwSetCursor SetCursor}. - * - *

    The images for these cursors come from the system cursor theme and their exact appearance will vary between platforms.

    - * - *

    Most of these shapes are guaranteed to exist on every supported platform but a few may not be present. See the table below for details.

    - * - * - * - * - * - * - * - * - * - * - * - * - * - *
    Cursor shapeWindowsmacOSX11Wayland
    {@link #GLFW_ARROW_CURSOR ARROW_CURSOR}YesYesYesYes
    {@link #GLFW_IBEAM_CURSOR IBEAM_CURSOR}YesYesYesYes
    {@link #GLFW_CROSSHAIR_CURSOR CROSSHAIR_CURSOR}YesYesYesYes
    {@link #GLFW_POINTING_HAND_CURSOR POINTING_HAND_CURSOR}YesYesYesYes
    {@link #GLFW_RESIZE_EW_CURSOR RESIZE_EW_CURSOR}YesYesYesYes
    {@link #GLFW_RESIZE_NS_CURSOR RESIZE_NS_CURSOR}YesYesYesYes
    {@link #GLFW_RESIZE_NWSE_CURSOR RESIZE_NWSE_CURSOR}YesYes1Maybe2Maybe2
    {@link #GLFW_RESIZE_NESW_CURSOR RESIZE_NESW_CURSOR}YesYes1Maybe2Maybe2
    {@link #GLFW_RESIZE_ALL_CURSOR RESIZE_ALL_CURSOR}YesYesYesYes
    {@link #GLFW_NOT_ALLOWED_CURSOR NOT_ALLOWED_CURSOR}YesYesMaybe2Maybe2
    - * - *
    Note
    - * - *
      - *
    1. This uses a private system API and may fail in the future.
    2. - *
    3. This uses a newer standard that not all cursor themes support.
    4. - *
    - * - *

    If the requested shape is not available, this function emits a {@link #GLFW_CURSOR_UNAVAILABLE CURSOR_UNAVAILABLE} error and returns {@code NULL}.

    - * - *

    This function must only be called from the main thread.

    - * - * @param shape one of the standard shapes. One of:
    {@link #GLFW_ARROW_CURSOR ARROW_CURSOR}{@link #GLFW_IBEAM_CURSOR IBEAM_CURSOR}{@link #GLFW_CROSSHAIR_CURSOR CROSSHAIR_CURSOR}{@link #GLFW_POINTING_HAND_CURSOR POINTING_HAND_CURSOR}{@link #GLFW_RESIZE_EW_CURSOR RESIZE_EW_CURSOR}
    {@link #GLFW_RESIZE_NS_CURSOR RESIZE_NS_CURSOR}{@link #GLFW_RESIZE_NWSE_CURSOR RESIZE_NWSE_CURSOR}{@link #GLFW_RESIZE_NESW_CURSOR RESIZE_NESW_CURSOR}{@link #GLFW_RESIZE_ALL_CURSOR RESIZE_ALL_CURSOR}{@link #GLFW_NOT_ALLOWED_CURSOR NOT_ALLOWED_CURSOR}
    - * - * @return a new cursor ready to use or {@code NULL} if an error occurred. Possible errors include {@link #GLFW_NOT_INITIALIZED NOT_INITIALIZED}, {@link #GLFW_INVALID_ENUM INVALID_ENUM}, {@link #GLFW_CURSOR_UNAVAILABLE CURSOR_UNAVAILABLE} and - * {@link #GLFW_PLATFORM_ERROR PLATFORM_ERROR}. - * - * @since version 3.1 - */ - @NativeType("GLFWcursor *") - public static long glfwCreateStandardCursor(int shape) { - long __functionAddress = Functions.CreateStandardCursor; - return invokeP(shape, __functionAddress); - } - - // --- [ glfwDestroyCursor ] --- - - /** - * Destroys a cursor previously created with {@link #glfwCreateCursor CreateCursor}. Any remaining cursors will be destroyed by {@link #glfwTerminate Terminate}. - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • This function must not be called from a callback.
    • - *
    - * - * @param cursor the cursor object to destroy - * - * @since version 3.1 - */ - public static void glfwDestroyCursor(@NativeType("GLFWcursor *") long cursor) {} - - // --- [ glfwSetCursor ] --- - - /** - * Sets the cursor image to be used when the cursor is over the content area of the specified window. The set cursor will only be visible when the - * cursor mode of the window is {@link #GLFW_CURSOR_NORMAL CURSOR_NORMAL}. - * - *

    On some platforms, the set cursor may not be visible unless the window also has input focus.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window to set the system cursor for - * @param cursor the cursor to set, or {@code NULL} to switch back to the default arrow cursor - * - * @since version 3.1 - */ - public static void glfwSetCursor(@NativeType("GLFWwindow *") long window, @NativeType("GLFWcursor *") long cursor) {} - - // --- [ glfwSetKeyCallback ] --- - - /** Unsafe version of: {@link #glfwSetKeyCallback SetKeyCallback} */ - public static long nglfwSetKeyCallback(long window, long cbfun) { - long __functionAddress = Functions.SetKeyCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the key callback of the specified window, which is called when a key is pressed, repeated or released. - * - *

    The key functions deal with physical keys, with layout independent key tokens named after their values in the standard US keyboard layout. If you want - * to input text, use {@link #glfwSetCharCallback SetCharCallback} instead.

    - * - *

    When a window loses input focus, it will generate synthetic key release events for all pressed keys. You can tell these events from user-generated - * events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the window focus callback has been - * called.

    - * - *

    The scancode of a key is specific to that platform or sometimes even to that machine. Scancodes are intended to allow users to bind keys that don't have - * a GLFW key token. Such keys have {@code key} set to {@link #GLFW_KEY_UNKNOWN KEY_UNKNOWN}, their state is not saved and so it cannot be queried with {@link #glfwGetKey GetKey}.

    - * - *

    Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 1.0 - */ - @Nullable - @NativeType("GLFWkeyfun") - public static GLFWKeyCallback glfwSetKeyCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWkeyfun") GLFWKeyCallbackI cbfun) { - return GLFWKeyCallback.createSafe(nglfwSetKeyCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetCharCallback ] --- - - /** Unsafe version of: {@link #glfwSetCharCallback SetCharCallback} */ - public static long nglfwSetCharCallback(long window, long cbfun) { - long __functionAddress = Functions.SetCharCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the character callback of the specified window, which is called when a Unicode character is input. - * - *

    The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout dependent, whereas {@link #glfwSetKeyCallback SetKeyCallback} is - * not. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key - * was pressed or released, see the key callback instead.

    - * - *

    The character callback behaves as system text input normally does and will not be called if modifier keys are held down that would prevent normal text - * input on that platform, for example a Super (Command) key on macOS or Alt key on Windows.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 2.4 - */ - @Nullable - @NativeType("GLFWcharfun") - public static GLFWCharCallback glfwSetCharCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcharfun") GLFWCharCallbackI cbfun) { - return GLFWCharCallback.createSafe(nglfwSetCharCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetCharModsCallback ] --- - - /** Unsafe version of: {@link #glfwSetCharModsCallback SetCharModsCallback} */ - public static long nglfwSetCharModsCallback(long window, long cbfun) { - long __functionAddress = Functions.SetCharModsCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys - * are used. - * - *

    The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see - * {@link #glfwSetCharCallback SetCharCallback}. Like the character callback, the character with modifiers callback deals with characters and is keyboard layout dependent. - * Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was - * pressed or released, see {@link #glfwSetKeyCallback SetKeyCallback} instead.

    - * - *

    This function must only be called from the main thread.

    - * - *

    Deprecated: scheduled for removal in version 4.0.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 3.1 - */ - @Nullable - @NativeType("GLFWcharmodsfun") - public static GLFWCharModsCallback glfwSetCharModsCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcharmodsfun") GLFWCharModsCallbackI cbfun) { - return GLFWCharModsCallback.createSafe(nglfwSetCharModsCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetMouseButtonCallback ] --- - - /** Unsafe version of: {@link #glfwSetMouseButtonCallback SetMouseButtonCallback} */ - public static long nglfwSetMouseButtonCallback(long window, long cbfun) { - long __functionAddress = Functions.SetMouseButtonCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the mouse button callback of the specified window, which is called when a mouse button is pressed or released. - * - *

    When a window loses input focus, it will generate synthetic mouse button release events for all pressed mouse buttons. You can tell these events from - * user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the window focus - * callback has been called.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 1.0 - */ - @Nullable - @NativeType("GLFWmousebuttonfun") - public static GLFWMouseButtonCallback glfwSetMouseButtonCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWmousebuttonfun") GLFWMouseButtonCallbackI cbfun) { - return GLFWMouseButtonCallback.createSafe(nglfwSetMouseButtonCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetCursorPosCallback ] --- - - /** Unsafe version of: {@link #glfwSetCursorPosCallback SetCursorPosCallback} */ - public static long nglfwSetCursorPosCallback(long window, long cbfun) { - long __functionAddress = Functions.SetCursorPosCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the cursor position callback of the specified window, which is called when the cursor is moved. The callback is provided with the position, in - * screen coordinates, relative to the upper-left corner of the content area of the window. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 1.0 - */ - @Nullable - @NativeType("GLFWcursorposfun") - public static GLFWCursorPosCallback glfwSetCursorPosCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcursorposfun") GLFWCursorPosCallbackI cbfun) { - return GLFWCursorPosCallback.createSafe(nglfwSetCursorPosCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetCursorEnterCallback ] --- - - /** Unsafe version of: {@link #glfwSetCursorEnterCallback SetCursorEnterCallback} */ - public static long nglfwSetCursorEnterCallback(long window, long cbfun) { - long __functionAddress = Functions.SetCursorEnterCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the content area of the window. - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 3.0 - */ - @Nullable - @NativeType("GLFWcursorenterfun") - public static GLFWCursorEnterCallback glfwSetCursorEnterCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWcursorenterfun") GLFWCursorEnterCallbackI cbfun) { - return GLFWCursorEnterCallback.createSafe(nglfwSetCursorEnterCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetScrollCallback ] --- - - /** Unsafe version of: {@link #glfwSetScrollCallback SetScrollCallback} */ - public static long nglfwSetScrollCallback(long window, long cbfun) { - long __functionAddress = Functions.SetScrollCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the scroll callback of the specified window, which is called when a scrolling device is used. - * - *

    The scroll callback receives all scrolling input, like that from a mouse wheel or a touchpad scrolling area.

    - * - *

    This function must only be called from the main thread.

    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 2.1 - */ - @Nullable - @NativeType("GLFWscrollfun") - public static GLFWScrollCallback glfwSetScrollCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWscrollfun") GLFWScrollCallbackI cbfun) { - return GLFWScrollCallback.createSafe(nglfwSetScrollCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwSetDropCallback ] --- - - /** Unsafe version of: {@link #glfwSetDropCallback SetDropCallback} */ - public static long nglfwSetDropCallback(long window, long cbfun) { - long __functionAddress = Functions.SetDropCallback; - if (CHECKS) { - check(window); - } - return invokePPP(window, cbfun, __functionAddress); - } - - /** - * Sets the file drop callback of the specified window, which is called when one or more dragged files are dropped on the window. - * - *

    Because the path array and its strings may have been generated specifically for that event, they are not guaranteed to be valid after the callback has - * returned. If you wish to use them after the callback returns, you need to make a deep copy.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • Wayland: File drop is currently unimplemented.
    • - *
    - * - * @param window the window whose callback to set - * @param cbfun the new callback or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set - * - * @since version 3.1 - */ - @Nullable - @NativeType("GLFWdropfun") - public static GLFWDropCallback glfwSetDropCallback(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("GLFWdropfun") GLFWDropCallbackI cbfun) { - return GLFWDropCallback.createSafe(nglfwSetDropCallback(window, memAddressSafe(cbfun))); - } - - // --- [ glfwJoystickPresent ] --- - - /** - * Returns whether the specified joystick is present. - * - *

    This function must only be called from the main thread.

    - * - * @param jid joystick to query - * - * @return {@link #GLFW_TRUE TRUE} if the joystick is present, or {@link #GLFW_FALSE FALSE} otherwise - * - * @since version 3.0 - */ - @NativeType("int") - public static boolean glfwJoystickPresent(int jid) { - return false; - } - - // --- [ glfwGetJoystickAxes ] --- - - /** - * Returns the values of all axes of the specified joystick. Each element in the array is a value between -1.0 and 1.0. - * - *

    If the specified joystick is not present this function will return {@code NULL} but will not generate an error. This can be used instead of first calling - * {@link #glfwJoystickPresent JoystickPresent}.

    - * - *

    The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this - * function is called again for that joystick or the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param jid the joystick to query - * - * @return an array of axis values, or {@code NULL} if the joystick is not present - * - * @since version 2.2 - */ - @Nullable - @NativeType("float const *") - public static FloatBuffer glfwGetJoystickAxes(int jid) { - return null; - } - - // --- [ glfwGetJoystickButtons ] --- - - /** - * Returns the state of all buttons of the specified joystick. Each element in the array is either {@link #GLFW_PRESS PRESS} or {@link #GLFW_RELEASE RELEASE}. - * - *

    For backward compatibility with earlier versions that did not have {@link #glfwGetJoystickHats GetJoystickHats}, the button array also includes all hats, each represented as four - * buttons. The hats are in the same order as returned by {@link #glfwGetJoystickHats GetJoystickHats} and are in the order up, right, down and left. To disable these extra - * buttons, set the {@link #GLFW_JOYSTICK_HAT_BUTTONS JOYSTICK_HAT_BUTTONS} init hint before initialization.

    - * - *

    If the specified joystick is not present this function will return {@code NULL} but will not generate an error. This can be used instead of first calling - * {@link #glfwJoystickPresent JoystickPresent}.

    - * - *

    The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this - * function is called again for that joystick or the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param jid the joystick to query - * - * @return an array of button states, or {@code NULL} if the joystick is not present - * - * @since version 2.2 - */ - @Nullable - @NativeType("unsigned char const *") - public static ByteBuffer glfwGetJoystickButtons(int jid) { - return null; - } - - // --- [ glfwGetJoystickHats ] --- - - /** - * Returns the state of all hats of the specified joystick. - * - *

    This function returns the state of all hats of the specified joystick. Each element in the array is one of the following values:

    - * - *
    
    -     * Name                | Value
    -     * ------------------- | ------------------------------
    -     * GLFW_HAT_CENTERED   | 0
    -     * GLFW_HAT_UP         | 1
    -     * GLFW_HAT_RIGHT      | 2
    -     * GLFW_HAT_DOWN       | 4
    -     * GLFW_HAT_LEFT       | 8
    -     * GLFW_HAT_RIGHT_UP   | GLFW_HAT_RIGHT | GLFW_HAT_UP
    -     * GLFW_HAT_RIGHT_DOWN | GLFW_HAT_RIGHT | GLFW_HAT_DOWN
    -     * GLFW_HAT_LEFT_UP    | GLFW_HAT_LEFT  | GLFW_HAT_UP
    -     * GLFW_HAT_LEFT_DOWN  | GLFW_HAT_LEFT  | GLFW_HAT_DOWN
    - * - *

    The diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can test for these individually by ANDing - * it with the corresponding direction.

    - * - *
    
    -     * if (hats[2] & GLFW_HAT_RIGHT)
    -     * {
    -     *     // State of hat 2 could be right-up, right or right-down
    -     * }
    - * - *

    If the specified joystick is not present this function will return {@code NULL} but will not generate an error. This can be used instead of first calling - * {@link #glfwJoystickPresent JoystickPresent}.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this - * function is called again for that joystick or the library is terminated.
    • - *
    - * - * @param jid the joystick to query - * - * @return an array of hat states, or {@code NULL} if the joystick is not present or an error occurred - * - * @since version 3.3 - */ - @Nullable - @NativeType("unsigned char const *") - public static ByteBuffer glfwGetJoystickHats(int jid) { - return null; - } - - // --- [ glfwGetJoystickName ] --- - - /** - * Returns the name, encoded as UTF-8, of the specified joystick. - * - *

    If the specified joystick is not present this function will return {@code NULL} but will not generate an error. This can be used instead of first calling - * {@link #glfwJoystickPresent JoystickPresent}.

    - * - *

    The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this - * function is called again for that joystick or the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param jid the joystick to query - * - * @return the UTF-8 encoded name of the joystick, or {@code NULL} if the joystick is not present - * - * @since version 3.0 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetJoystickName(int jid) { - return null; - } - - // --- [ glfwGetJoystickGUID ] --- - - /** - * Returns the SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified joystick. - * - *

    The GUID is what connects a joystick to a gamepad mapping. A connected joystick will always have a GUID even if there is no gamepad mapping assigned to - * it.

    - * - *

    The GUID uses the format introduced in SDL 2.0.5. This GUID tries to uniquely identify the make and model of a joystick but does not identify a - * specific unit, e.g. all wired Xbox 360 controllers will have the same GUID on that platform. The GUID for a unit may vary between platforms depending - * on what hardware information the platform specific APIs provide.

    - * - *

    If the specified joystick is not present this function will return {@code NULL} but will not generate an error. This can be used instead of first calling - * {@link #glfwJoystickPresent JoystickPresent}.

    - * - *

    The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected or the - * library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param jid the joystick to query - * - * @return the UTF-8 encoded GUID of the joystick, or {@code NULL} if the joystick is not present or an error occurred - * - * @since version 3.3 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetJoystickGUID(int jid) { - return null; - } - - // --- [ glfwSetJoystickUserPointer ] --- - - /** - * Sets the user pointer of the specified joystick. - * - *

    This function sets the user-defined pointer of the specified joystick. The current value is retained until the joystick is disconnected. The initial - * value is {@code NULL}.

    - * - *

    This function may be called from the joystick callback, even for a joystick that is being disconnected.

    - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param jid the joystick whose pointer to set - * @param pointer the new value - * - * @since version 3.3 - */ - public static void glfwSetJoystickUserPointer(int jid, @NativeType("void *") long pointer) { - - } - - // --- [ glfwGetJoystickUserPointer ] --- - - /** - * Returns the user pointer of the specified joystick. - * - *

    This function returns the current value of the user-defined pointer of the specified joystick. The initial value is {@code NULL}.

    - * - *

    This function may be called from the joystick callback, even for a joystick that is being disconnected.

    - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param jid the joystick whose pointer to set - * - * @since version 3.3 - */ - @NativeType("void *") - public static long glfwGetJoystickUserPointer(int jid) { - return 0; - } - - // --- [ glfwJoystickIsGamepad ] --- - - /** - * Returns whether the specified joystick is both present and has a gamepad mapping. - * - *

    If the specified joystick is present but does not have a gamepad mapping this function will return {@code false} but will not generate an error. Call - * {@link #glfwJoystickPresent JoystickPresent} to check if a joystick is present regardless of whether it has a mapping.

    - * - *

    This function must only be called from the main thread.

    - * - * @param jid the joystick id to query - * - * @return {@code true} if a joystick is both present and has a gamepad mapping or {@code false} otherwise - * - * @since version 3.3 - */ - @NativeType("int") - public static boolean glfwJoystickIsGamepad(int jid) { - return false; - } - - // --- [ glfwSetJoystickCallback ] --- - - /** - * Sets the joystick configuration callback, or removes the currently set callback. This is called when a joystick is connected to or disconnected from - * the system. - * - *

    For joystick connection and disconnection events to be delivered on all platforms, you need to call one of the event processing functions. Joystick - * disconnection may also be detected and the callback called by joystick functions. The function will then return whatever it returns if the joystick is - * not present.

    - * - *

    This function must only be called from the main thread.

    - * - * @param cbfun the new callback, or {@code NULL} to remove the currently set callback - * - * @return the previously set callback, or {@code NULL} if no callback was set or the library had not been initialized - * - * @since version 3.2 - */ - @Nullable - @NativeType("GLFWjoystickfun") - public static GLFWJoystickCallback glfwSetJoystickCallback(@Nullable @NativeType("GLFWjoystickfun") GLFWJoystickCallbackI cbfun) { - return null; - } - - // --- [ glfwUpdateGamepadMappings ] --- - - /** - * Adds the specified SDL_GameControllerDB gamepad mappings. - * - *

    This function parses the specified ASCII encoded string and updates the internal list with any gamepad mappings it finds. This string may contain either - * a single gamepad mapping or many mappings separated by newlines. The parser supports the full format of the {@code gamecontrollerdb.txt} source file - * including empty lines and comments.

    - * - *

    See gamepad_mapping for a description of the format.

    - * - *

    If there is already a gamepad mapping for a given GUID in the internal list, it will be replaced by the one passed to this function. If the library is - * terminated and re-initialized the internal list will revert to the built-in default.

    - * - *

    This function must only be called from the main thread.

    - * - * @param string the string containing the gamepad mappings - * - * @return {@code true}, or {@code false} if an error occurred - * - * @since version 3.3 - */ - @NativeType("int") - public static boolean glfwUpdateGamepadMappings(@NativeType("char const *") ByteBuffer string) { - return false; - } - - // --- [ glfwGetGamepadName ] --- - - /** - * Returns the human-readable name of the gamepad from the gamepad mapping assigned to the specified joystick. - * - *

    If the specified joystick is not present or does not have a gamepad mapping this function will return {@code NULL} but will not generate an error. Call - * {@link #glfwJoystickIsGamepad JoystickIsGamepad} to check if a joystick is present regardless of whether it has a mapping.

    - * - *

    The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, the - * gamepad mappings are updated or the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @param jid the joystick to query - * - * @return the UTF-8 encoded name of the gamepad, or {@code NULL} if the joystick is not present, does not have a mapping or an error occurred - * - * @since version 3.3 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetGamepadName(int jid) { - return null; - } - - // --- [ glfwGetGamepadState ] --- - - /** - * Retrieves the state of the specified joystick remapped to an Xbox-like gamepad. - * - *

    If the specified joystick is not present or does not have a gamepad mapping this function will return {@link #GLFW_FALSE FALSE} but will not generate an error. Call - * {@link #glfwJoystickPresent JoystickPresent} to check whether it is present regardless of whether it has a mapping.

    - * - *

    The Guide button may not be available for input as it is often hooked by the system or the Steam client.

    - * - *

    Not all devices have all the buttons or axes provided by {@link GLFWGamepadState}. Unavailable buttons and axes will always report {@link #GLFW_RELEASE RELEASE} and 0.0 - * respectively.

    - * - *

    This function must only be called from the main thread.

    - * - * @param jid the joystick to query - * @param state the gamepad input state of the joystick - * - * @return {@code true} if successful, or {@code false} if no joystick is connected, it has no gamepad mapping or an error occurred - * - * @since version 3.3 - */ - @NativeType("int") - public static boolean glfwGetGamepadState(int jid, @NativeType("GLFWgamepadstate *") GLFWGamepadState state) { - return false; - } - - // --- [ glfwSetClipboardString ] --- - - /** Unsafe version of: {@link #glfwSetClipboardString SetClipboardString} */ - public static void nglfwSetClipboardString(long window, long string) { - long __functionAddress = Functions.SetClipboardString; - invokePPV(window, string, __functionAddress); - } - - /** - * Sets the system clipboard to the specified, UTF-8 encoded string. - * - *

    The specified string is copied before this function returns.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    - * - * @param window deprecated, any valid window or {@code NULL}. - * @param string a UTF-8 encoded string - * - * @since version 3.0 - */ - public static void glfwSetClipboardString(@NativeType("GLFWwindow *") long window, @NativeType("char const *") ByteBuffer string) { - if (CHECKS) { - checkNT1(string); - } - nglfwSetClipboardString(window, memAddress(string)); - } - - /** - * Sets the system clipboard to the specified, UTF-8 encoded string. - * - *

    The specified string is copied before this function returns.

    - * - *

    Notes:

    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    - * - * @param window deprecated, any valid window or {@code NULL}. - * @param string a UTF-8 encoded string - * - * @since version 3.0 - */ - public static void glfwSetClipboardString(@NativeType("GLFWwindow *") long window, @NativeType("char const *") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(string, true); - long stringEncoded = stack.getPointerAddress(); - nglfwSetClipboardString(window, stringEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwGetClipboardString ] --- - - /** Unsafe version of: {@link #glfwGetClipboardString GetClipboardString} */ - public static long nglfwGetClipboardString(long window) { - long __functionAddress = Functions.GetClipboardString; - return invokePP(window, __functionAddress); - } - - /** - * Returns the contents of the system clipboard, if it contains or is convertible to a UTF-8 encoded string. If the clipboard is empty or if its contents - * cannot be converted, {@code NULL} is returned and a {@link #GLFW_FORMAT_UNAVAILABLE FORMAT_UNAVAILABLE} error is generated. - * - *

    The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to {@link #glfwGetClipboardString GetClipboardString} or - * {@link #glfwSetClipboardString SetClipboardString}, or until the library is terminated.

    - * - *
    Note
    - * - *
      - *
    • This function must only be called from the main thread.
    • - *
    • The returned string is allocated and freed by GLFW. You should not free it yourself.
    • - *
    • The returned string is valid only until the next call to {@link #glfwGetClipboardString GetClipboardString} or {@link #glfwSetClipboardString SetClipboardString}.
    • - *
    - * - * @param window deprecated, any valid window or {@code NULL}. - * - * @return the contents of the clipboard as a UTF-8 encoded string, or {@code NULL} if an error occurred - * - * @since version 3.0 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetClipboardString(@NativeType("GLFWwindow *") long window) { - long __result = nglfwGetClipboardString(window); - return memUTF8Safe(__result); - } - - // --- [ glfwGetTime ] --- - - /** - * Returns the value of the GLFW timer. Unless the timer has been set using {@link #glfwSetTime SetTime}, the timer measures time elapsed since GLFW was initialized. - * - *

    The resolution of the timer is system dependent, but is usually on the order of a few micro- or nanoseconds. It uses the highest-resolution monotonic - * time source on each operating system.

    - * - *

    This function may be called from any thread. Reading and writing of the internal timer offset is not atomic, so it needs to be externally synchronized - * with calls to {@link #glfwSetTime SetTime}.

    - * - * @return the current value, in seconds, or zero if an error occurred - * - * @since version 1.0 - */ - public static double glfwGetTime() { - return (System.nanoTime() - glfwInitialTime) / 1.e9; - } - - // --- [ glfwSetTime ] --- - - /** - * Sets the value of the GLFW timer. It then continues to count up from that value. The value must be a positive finite number less than or equal to - * 18446744073.0, which is approximately 584.5 years. - * - *

    The upper limit of the timer is calculated as floor((264 - 1) / 109) and is due to implementations storing nanoseconds - * in 64 bits. The limit may be increased in the future.

    - * - *

    This function may be called from any thread. Reading and writing of the internal timer offset is not atomic, so it needs to be externally synchronized - * with calls to {@link #glfwGetTime GetTime}.

    - * - * @param time the new value, in seconds - * - * @since version 2.2 - */ - public static void glfwSetTime(double time) { - glfwInitialTime = System.nanoTime() - (long) time; - } - - // --- [ glfwGetTimerValue ] --- - - /** - * Returns the current value of the raw timer. - * - *

    This function returns the current value of the raw timer, measured in {@code 1 / frequency} seconds. To get the frequency, call {@link #glfwGetTimerFrequency GetTimerFrequency}.

    - * - *

    This function may be called from any thread.

    - * - * @return the value of the timer, or zero if an error occurred - * - * @since version 3.2 - */ - @NativeType("uint64_t") - public static long glfwGetTimerValue() { - return System.currentTimeMillis(); - } - - // --- [ glfwGetTimerFrequency ] --- - - /** - * Returns the frequency, in Hz, of the raw timer. - * - *

    This function may be called from any thread.

    - * - * @return the frequency of the timer, in Hz, or zero if an error occurred - * - * @since version 3.2 - */ - @NativeType("uint64_t") - public static long glfwGetTimerFrequency() { - long __functionAddress = Functions.GetTimerFrequency; - return invokeJ(__functionAddress); - } - - // --- [ glfwGetOSMesaWidth ] --- - - /** - * Get OSMesa width - */ - public static int glfwGetOSMesaWidth() { - long __functionAddress = Functions.GetOSMesaWidth; - return invokeI(__functionAddress); - } - - // --- [ glfwGetOSMesaHeight ] --- - - /** - * Get OSMesa height - */ - public static int glfwGetOSMesaHeight() { - long __functionAddress = Functions.GetOSMesaHeight; - return invokeI(__functionAddress); - } - - // --- [ glfwGetOSMesaContext ] --- - - /** - * Get OSMesa Context - */ - public static long glfwGetOSMesaCurrentContext() { - long __functionAddress = Functions.GetOSMesaCurrentContext; - return invokeJ(__functionAddress); - } - - // --- [ glfwGetGraphicBuffersAddr ] --- - - /** - * Get Graphic Buffers Addr - */ - public static long glfwGetGraphicBuffersAddr(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetGraphicBuffersAddr; - return invokePJ(window, __functionAddress); - } - - // --- [ glfwMakeContextCurrent ] --- - - /** - * Makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. A context must only be made current on a single thread at - * a time and each thread can have only a single current context at a time. - * - *

    When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.

    - * - *

    By default, making a context non-current implicitly forces a pipeline flush. On machines that support - * GL_KHR_context_flush_control, you can control whether - * a context performs this flush by setting the {@link #GLFW_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR} - * window hint.

    - * - *

    The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a {@link #GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} error.

    - * - *

    This function may be called from any thread.

    - * - * @param window the window whose context to make current, or {@code NULL} to detach the current context - * - * @since version 3.0 - */ - public static void glfwMakeContextCurrent(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.MakeContextCurrent; - invokePV(window, __functionAddress); - } - - // --- [ glfwGetCurrentContext ] --- - - /** - * Returns the window whose OpenGL or OpenGL ES context is current on the calling thread. - * - *

    This function may be called from any thread.

    - * - * @return the window whose context is current, or {@code NULL} if no window's context is current - * - * @since version 3.0 - */ - @NativeType("GLFWwindow *") - public static long glfwGetCurrentContext() { - long __functionAddress = Functions.GetCurrentContext; - return invokeP(__functionAddress); - } - - // --- [ glfwSwapBuffers ] --- - - /** - * Swaps the front and back buffers of the specified window when rendering with OpenGL or OpenGL ES. If the swap interval is greater than zero, the GPU - * driver waits the specified number of screen updates before swapping the buffers. - * - *

    The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a {@link #GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} error.

    - * - *

    This function does not apply to Vulkan. If you are rendering with Vulkan, {@code vkQueuePresentKHR} instead.

    - * - *

    EGL: The context of the specified window must be current on the calling thread.

    - * - *

    This function may be called from any thread.

    - * - * @param window the window whose buffers to swap - * - * @since version 1.0 - */ - public static void glfwSwapBuffers(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.SwapBuffers; - if (CHECKS) { - check(window); - } - invokePV(window, __functionAddress); - } - - // --- [ glfwSwapInterval ] --- - - /** - * Sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time {@link #glfwSwapBuffers SwapBuffers} was called - * before swapping the buffers and returning. This is sometimes called vertical synchronization, vertical retrace synchronization or just - * vsync. - * - *

    A context that supports either of the - * WGL_EXT_swap_control_tear and - * GLX_EXT_swap_control_tear extensions also accepts - * negative swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. You can check for these - * extensions with {@link #glfwExtensionSupported ExtensionSupported}. For more information about swap tearing, see the extension specifications.

    - * - *

    A context must be current on the calling thread. Calling this function without a current context will cause a {@link #GLFW_NO_CURRENT_CONTEXT NO_CURRENT_CONTEXT} error.

    - * - *

    This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.

    - * - *
    Note
    - * - *
      - *
    • This function may be called from any thread.
    • - *
    • This function is not called during window creation, leaving the swap interval set to whatever is the default for that API. This is done because - * some swap interval extensions used by GLFW do not allow the swap interval to be reset to zero once it has been set to a non-zero value.
    • - *
    • Some GPU drivers do not honor the requested swap interval, either because of a user setting that overrides the application's request or due to bugs - * in the driver.
    • - *
    - * - * @param interval the minimum number of screen updates to wait for until the buffers are swapped by {@link #glfwSwapBuffers SwapBuffers} - * - * @since version 1.0 - */ - public static void glfwSwapInterval(int interval) { - long __functionAddress = Functions.SwapInterval; - invokeV(interval, __functionAddress); - } - - // --- [ glfwExtensionSupported ] --- - - /** Unsafe version of: {@link #glfwExtensionSupported ExtensionSupported} */ - public static int nglfwExtensionSupported(long extension) { - long __functionAddress = Functions.ExtensionSupported; - return invokePI(extension, __functionAddress); - } - - /** - * Returns whether the specified API extension is supported by the current - * OpenGL or OpenGL ES context. It searches both for client API extension and context creation API extensions. - * - *

    A context must be current on the calling thread. Calling this function without a current context will cause a {@link #GLFW_NO_CURRENT_CONTEXT NO_CURRENT_CONTEXT} error.

    - * - *

    As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used - * frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.

    - * - *

    This function does not apply to Vulkan. If you are using Vulkan, see {@code glfwGetRequiredInstanceExtensions}, - * {@code vkEnumerateInstanceExtensionProperties} and {@code vkEnumerateDeviceExtensionProperties} instead.

    - * - *

    This function may be called from any thread.

    - * - * @param extension the ASCII encoded name of the extension - * - * @return {@link #GLFW_TRUE TRUE} if the extension is available, or {@link #GLFW_FALSE FALSE} otherwise - * - * @since version 1.0 - */ - @NativeType("int") - public static boolean glfwExtensionSupported(@NativeType("char const *") ByteBuffer extension) { - if (CHECKS) { - checkNT1(extension); - } - return nglfwExtensionSupported(memAddress(extension)) != 0; - } - - /** - * Returns whether the specified API extension is supported by the current - * OpenGL or OpenGL ES context. It searches both for client API extension and context creation API extensions. - * - *

    A context must be current on the calling thread. Calling this function without a current context will cause a {@link #GLFW_NO_CURRENT_CONTEXT NO_CURRENT_CONTEXT} error.

    - * - *

    As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used - * frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.

    - * - *

    This function does not apply to Vulkan. If you are using Vulkan, see {@code glfwGetRequiredInstanceExtensions}, - * {@code vkEnumerateInstanceExtensionProperties} and {@code vkEnumerateDeviceExtensionProperties} instead.

    - * - *

    This function may be called from any thread.

    - * - * @param extension the ASCII encoded name of the extension - * - * @return {@link #GLFW_TRUE TRUE} if the extension is available, or {@link #GLFW_FALSE FALSE} otherwise - * - * @since version 1.0 - */ - @NativeType("int") - public static boolean glfwExtensionSupported(@NativeType("char const *") CharSequence extension) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(extension, true); - long extensionEncoded = stack.getPointerAddress(); - return nglfwExtensionSupported(extensionEncoded) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwGetProcAddress ] --- - - /** Unsafe version of: {@link #glfwGetProcAddress GetProcAddress} */ - public static long nglfwGetProcAddress(long procname) { - long __functionAddress = Functions.GetProcAddress; - return invokePP(procname, __functionAddress); - } - - /** - * Returns the address of the specified OpenGL or OpenGL ES core or extension function, if it is supported by the current context. - * - *

    A context must be current on the calling thread. Calling this function without a current context will cause a {@link #GLFW_NO_CURRENT_CONTEXT NO_CURRENT_CONTEXT} error.

    - * - *

    This function does not apply to Vulkan. If you are rendering with Vulkan, {@code glfwGetInstanceProcAddress}, {@code vkGetInstanceProcAddr} and - * {@code vkGetDeviceProcAddr} instead.

    - * - *
    Note
    - * - *
      - *
    • The address of a given function is not guaranteed to be the same between contexts.
    • - *
    • This function may return a non-{@code NULL} address despite the associated version or extension not being available. Always check the context version or - * extension string first.
    • - *
    • The returned function pointer is valid until the context is destroyed or the library is terminated.
    • - *
    • This function may be called from any thread.
    • - *
    - * - * @param procname the ASCII encoded name of the function - * - * @return the address of the function, or {@code NULL} if an error occurred - * - * @since version 1.0 - */ - @NativeType("GLFWglproc") - public static long glfwGetProcAddress(@NativeType("char const *") ByteBuffer procname) { - if (CHECKS) { - checkNT1(procname); - } - return nglfwGetProcAddress(memAddress(procname)); - } - - /** - * Returns the address of the specified OpenGL or OpenGL ES core or extension function, if it is supported by the current context. - * - *

    A context must be current on the calling thread. Calling this function without a current context will cause a {@link #GLFW_NO_CURRENT_CONTEXT NO_CURRENT_CONTEXT} error.

    - * - *

    This function does not apply to Vulkan. If you are rendering with Vulkan, {@code glfwGetInstanceProcAddress}, {@code vkGetInstanceProcAddr} and - * {@code vkGetDeviceProcAddr} instead.

    - * - *
    Note
    - * - *
      - *
    • The address of a given function is not guaranteed to be the same between contexts.
    • - *
    • This function may return a non-{@code NULL} address despite the associated version or extension not being available. Always check the context version or - * extension string first.
    • - *
    • The returned function pointer is valid until the context is destroyed or the library is terminated.
    • - *
    • This function may be called from any thread.
    • - *
    - * - * @param procname the ASCII encoded name of the function - * - * @return the address of the function, or {@code NULL} if an error occurred - * - * @since version 1.0 - */ - @NativeType("GLFWglproc") - public static long glfwGetProcAddress(@NativeType("char const *") CharSequence procname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(procname, true); - long procnameEncoded = stack.getPointerAddress(); - return nglfwGetProcAddress(procnameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glfwGetVersion GetVersion} */ - public static void glfwGetVersion(@Nullable @NativeType("int *") int[] major, @Nullable @NativeType("int *") int[] minor, @Nullable @NativeType("int *") int[] rev) { - long __functionAddress = Functions.GetVersion; - if (CHECKS) { - checkSafe(major, 1); - checkSafe(minor, 1); - checkSafe(rev, 1); - } - invokePPPV(major, minor, rev, __functionAddress); - } - - /** Array version of: {@link #glfwGetMonitorPos GetMonitorPos} */ - public static void glfwGetMonitorPos(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") int[] xpos, @Nullable @NativeType("int *") int[] ypos) { - long __functionAddress = Functions.GetMonitorPos; - if (CHECKS) { - check(monitor); - checkSafe(xpos, 1); - checkSafe(ypos, 1); - } - invokePPPV(monitor, xpos, ypos, __functionAddress); - } - - /** Array version of: {@link #glfwGetMonitorWorkarea GetMonitorWorkarea} */ - public static void glfwGetMonitorWorkarea(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") int[] xpos, @Nullable @NativeType("int *") int[] ypos, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height) { - long __functionAddress = Functions.GetMonitorWorkarea; - if (CHECKS) { - check(monitor); - checkSafe(xpos, 1); - checkSafe(ypos, 1); - checkSafe(width, 1); - checkSafe(height, 1); - } - invokePPPPPV(monitor, xpos, ypos, width, height, __functionAddress); - } - - /** Array version of: {@link #glfwGetMonitorPhysicalSize GetMonitorPhysicalSize} */ - public static void glfwGetMonitorPhysicalSize(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("int *") int[] widthMM, @Nullable @NativeType("int *") int[] heightMM) { - long __functionAddress = Functions.GetMonitorPhysicalSize; - if (CHECKS) { - check(monitor); - checkSafe(widthMM, 1); - checkSafe(heightMM, 1); - } - invokePPPV(monitor, widthMM, heightMM, __functionAddress); - } - - /** Array version of: {@link #glfwGetMonitorContentScale GetMonitorContentScale} */ - public static void glfwGetMonitorContentScale(@NativeType("GLFWmonitor *") long monitor, @Nullable @NativeType("float *") float[] xscale, @Nullable @NativeType("float *") float[] yscale) { - long __functionAddress = Functions.GetMonitorContentScale; - if (CHECKS) { - check(monitor); - checkSafe(xscale, 1); - checkSafe(yscale, 1); - } - invokePPPV(monitor, xscale, yscale, __functionAddress); - } - - /** Array version of: {@link #glfwGetWindowPos GetWindowPos} */ - public static void glfwGetWindowPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] xpos, @Nullable @NativeType("int *") int[] ypos) { - long __functionAddress = Functions.GetWindowPos; - if (CHECKS) { - check(window); - checkSafe(xpos, 1); - checkSafe(ypos, 1); - } - invokePPPV(window, xpos, ypos, __functionAddress); - } - - /** Array version of: {@link #glfwGetWindowSize GetWindowSize} */ - public static void glfwGetWindowSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height) { - long __functionAddress = Functions.GetWindowSize; - if (CHECKS) { - check(window); - checkSafe(width, 1); - checkSafe(height, 1); - } - invokePPPV(window, width, height, __functionAddress); - } - - /** Array version of: {@link #glfwGetFramebufferSize GetFramebufferSize} */ - public static void glfwGetFramebufferSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height) { - long __functionAddress = Functions.GetFramebufferSize; - if (CHECKS) { - check(window); - checkSafe(width, 1); - checkSafe(height, 1); - } - invokePPPV(window, width, height, __functionAddress); - } - - /** Array version of: {@link #glfwGetWindowFrameSize GetWindowFrameSize} */ - public static void glfwGetWindowFrameSize(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] left, @Nullable @NativeType("int *") int[] top, @Nullable @NativeType("int *") int[] right, @Nullable @NativeType("int *") int[] bottom) { - long __functionAddress = Functions.GetWindowFrameSize; - if (CHECKS) { - check(window); - checkSafe(left, 1); - checkSafe(top, 1); - checkSafe(right, 1); - checkSafe(bottom, 1); - } - invokePPPPPV(window, left, top, right, bottom, __functionAddress); - } - - /** Array version of: {@link #glfwGetWindowContentScale GetWindowContentScale} */ - public static void glfwGetWindowContentScale(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("float *") float[] xscale, @Nullable @NativeType("float *") float[] yscale) { - long __functionAddress = Functions.GetWindowContentScale; - if (CHECKS) { - check(window); - checkSafe(xscale, 1); - checkSafe(yscale, 1); - } - invokePPPV(window, xscale, yscale, __functionAddress); - } - - /** Array version of: {@link #glfwGetCursorPos GetCursorPos} */ - public static void glfwGetCursorPos(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("double *") double[] xpos, @Nullable @NativeType("double *") double[] ypos) { - long __functionAddress = Functions.GetCursorPos; - if (CHECKS) { - check(window); - checkSafe(xpos, 1); - checkSafe(ypos, 1); - } - invokePPPV(window, xpos, ypos, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocateCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocateCallback.java deleted file mode 100644 index 694b128a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocateCallback.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The function pointer type for memory allocation callbacks. - * - *

    This is the function pointer type for memory allocation callbacks. A memory allocation callback function has the following signature:

    - * - *
    
    - * void* function_name(size_t size, void* user)
    - * - *

    This function must return either a memory block at least {@code size} bytes long, or {@code NULL} if allocation failed. Note that not all parts of GLFW - * handle allocation failures gracefully yet.

    - * - *

    This function may be called during {@link GLFW#glfwInit Init} but before the library is flagged as initialized, as well as during {@link GLFW#glfwTerminate Terminate} after the library is no - * longer flagged as initialized.

    - * - *

    Any memory allocated by this function will be deallocated during library termination or earlier.

    - * - *

    The size will always be greater than zero. Allocations of size zero are filtered out before reaching the custom allocator.

    - * - *
    Note
    - * - *
      - *
    • The returned memory block must be valid at least until it is deallocated.
    • - *
    • This function should not call any GLFW function.
    • - *
    • This function may be called from any thread that calls GLFW functions.
    • - *
    - * - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     size_t size,
    - *     void *user
    - * )
    - * - * @since version 3.4 - */ -public abstract class GLFWAllocateCallback extends Callback implements GLFWAllocateCallbackI { - - /** - * Creates a {@code GLFWAllocateCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWAllocateCallback} - */ - public static GLFWAllocateCallback create(long functionPointer) { - GLFWAllocateCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWAllocateCallback - ? (GLFWAllocateCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWAllocateCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWAllocateCallback} instance that delegates to the specified {@code GLFWAllocateCallbackI} instance. */ - public static GLFWAllocateCallback create(GLFWAllocateCallbackI instance) { - return instance instanceof GLFWAllocateCallback - ? (GLFWAllocateCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWAllocateCallback() { - super(CIF); - } - - GLFWAllocateCallback(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends GLFWAllocateCallback { - - private final GLFWAllocateCallbackI delegate; - - Container(long functionPointer, GLFWAllocateCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long size, long user) { - return delegate.invoke(size, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocateCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocateCallbackI.java deleted file mode 100644 index 72200f0b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocateCallbackI.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * The function pointer type for memory allocation callbacks. - * - *

    This is the function pointer type for memory allocation callbacks. A memory allocation callback function has the following signature:

    - * - *
    
    - * void* function_name(size_t size, void* user)
    - * - *

    This function must return either a memory block at least {@code size} bytes long, or {@code NULL} if allocation failed. Note that not all parts of GLFW - * handle allocation failures gracefully yet.

    - * - *

    This function may be called during {@link GLFW#glfwInit Init} but before the library is flagged as initialized, as well as during {@link GLFW#glfwTerminate Terminate} after the library is no - * longer flagged as initialized.

    - * - *

    Any memory allocated by this function will be deallocated during library termination or earlier.

    - * - *

    The size will always be greater than zero. Allocations of size zero are filtered out before reaching the custom allocator.

    - * - *
    Note
    - * - *
      - *
    • The returned memory block must be valid at least until it is deallocated.
    • - *
    • This function should not call any GLFW function.
    • - *
    • This function may be called from any thread that calls GLFW functions.
    • - *
    - * - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     size_t size,
    - *     void *user
    - * )
    - * - * @since version 3.4 - */ -@FunctionalInterface -@NativeType("GLFWallocatefun") -public interface GLFWAllocateCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** - * Will be called for memory allocation requests. - * - * @param size the minimum size, in bytes, of the memory block - * @param user the user-defined pointer from the allocator - * - * @return the address of the newly allocated memory block, or {@code NULL} if an error occurred - */ - @NativeType("void *") long invoke(@NativeType("size_t") long size, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocator.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocator.java deleted file mode 100644 index 6df18907..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWAllocator.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A custom memory allocator that can be set with {@link GLFW#glfwInitAllocator InitAllocator}. - * - *

    Layout

    - * - *
    
    - * struct GLFWallocator {
    - *     {@link GLFWAllocateCallbackI GLFWallocatefun} {@link #allocate};
    - *     {@link GLFWReallocateCallbackI GLFWreallocatefun} {@link #reallocate};
    - *     {@link GLFWDeallocateCallbackI GLFWdeallocatefun} {@link #deallocate};
    - *     void * {@link #user};
    - * }
    - * - * @since version 3.4 - */ -@NativeType("struct GLFWallocator") -public class GLFWAllocator extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ALLOCATE, - REALLOCATE, - DEALLOCATE, - USER; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ALLOCATE = layout.offsetof(0); - REALLOCATE = layout.offsetof(1); - DEALLOCATE = layout.offsetof(2); - USER = layout.offsetof(3); - } - - protected GLFWAllocator(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected GLFWAllocator create(long address, @Nullable ByteBuffer container) { - return new GLFWAllocator(address, container); - } - - /** - * Creates a {@code GLFWAllocator} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public GLFWAllocator(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the memory allocation callback */ - @NativeType("GLFWallocatefun") - public GLFWAllocateCallback allocate() { return nallocate(address()); } - /** the memory reallocation callback */ - @NativeType("GLFWreallocatefun") - public GLFWReallocateCallback reallocate() { return nreallocate(address()); } - /** the memory deallocation callback */ - @NativeType("GLFWdeallocatefun") - public GLFWDeallocateCallback deallocate() { return ndeallocate(address()); } - /** a user-defined pointer that will be passed to the callbacks */ - @NativeType("void *") - public long user() { return nuser(address()); } - - /** Sets the specified value to the {@link #allocate} field. */ - public GLFWAllocator allocate(@NativeType("GLFWallocatefun") GLFWAllocateCallbackI value) { nallocate(address(), value); return this; } - /** Sets the specified value to the {@link #reallocate} field. */ - public GLFWAllocator reallocate(@NativeType("GLFWreallocatefun") GLFWReallocateCallbackI value) { nreallocate(address(), value); return this; } - /** Sets the specified value to the {@link #deallocate} field. */ - public GLFWAllocator deallocate(@NativeType("GLFWdeallocatefun") GLFWDeallocateCallbackI value) { ndeallocate(address(), value); return this; } - /** Sets the specified value to the {@link #user} field. */ - public GLFWAllocator user(@NativeType("void *") long value) { nuser(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public GLFWAllocator set( - GLFWAllocateCallbackI allocate, - GLFWReallocateCallbackI reallocate, - GLFWDeallocateCallbackI deallocate, - long user - ) { - allocate(allocate); - reallocate(reallocate); - deallocate(deallocate); - user(user); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public GLFWAllocator set(GLFWAllocator src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code GLFWAllocator} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static GLFWAllocator malloc() { - return new GLFWAllocator(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code GLFWAllocator} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static GLFWAllocator calloc() { - return new GLFWAllocator(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code GLFWAllocator} instance allocated with {@link BufferUtils}. */ - public static GLFWAllocator create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new GLFWAllocator(memAddress(container), container); - } - - /** Returns a new {@code GLFWAllocator} instance for the specified memory address. */ - public static GLFWAllocator create(long address) { - return new GLFWAllocator(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static GLFWAllocator createSafe(long address) { - return address == NULL ? null : new GLFWAllocator(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code GLFWAllocator} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static GLFWAllocator malloc(MemoryStack stack) { - return new GLFWAllocator(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code GLFWAllocator} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static GLFWAllocator calloc(MemoryStack stack) { - return new GLFWAllocator(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #allocate}. */ - public static GLFWAllocateCallback nallocate(long struct) { return GLFWAllocateCallback.create(memGetAddress(struct + GLFWAllocator.ALLOCATE)); } - /** Unsafe version of {@link #reallocate}. */ - public static GLFWReallocateCallback nreallocate(long struct) { return GLFWReallocateCallback.create(memGetAddress(struct + GLFWAllocator.REALLOCATE)); } - /** Unsafe version of {@link #deallocate}. */ - public static GLFWDeallocateCallback ndeallocate(long struct) { return GLFWDeallocateCallback.create(memGetAddress(struct + GLFWAllocator.DEALLOCATE)); } - /** Unsafe version of {@link #user}. */ - public static long nuser(long struct) { return memGetAddress(struct + GLFWAllocator.USER); } - - /** Unsafe version of {@link #allocate(GLFWAllocateCallbackI) allocate}. */ - public static void nallocate(long struct, GLFWAllocateCallbackI value) { memPutAddress(struct + GLFWAllocator.ALLOCATE, value.address()); } - /** Unsafe version of {@link #reallocate(GLFWReallocateCallbackI) reallocate}. */ - public static void nreallocate(long struct, GLFWReallocateCallbackI value) { memPutAddress(struct + GLFWAllocator.REALLOCATE, value.address()); } - /** Unsafe version of {@link #deallocate(GLFWDeallocateCallbackI) deallocate}. */ - public static void ndeallocate(long struct, GLFWDeallocateCallbackI value) { memPutAddress(struct + GLFWAllocator.DEALLOCATE, value.address()); } - /** Unsafe version of {@link #user(long) user}. */ - public static void nuser(long struct, long value) { memPutAddress(struct + GLFWAllocator.USER, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + GLFWAllocator.ALLOCATE)); - check(memGetAddress(struct + GLFWAllocator.REALLOCATE)); - check(memGetAddress(struct + GLFWAllocator.DEALLOCATE)); - } - - // ----------------------------------- - - /** An array of {@link GLFWAllocator} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final GLFWAllocator ELEMENT_FACTORY = GLFWAllocator.create(-1L); - - /** - * Creates a new {@code GLFWAllocator.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link GLFWAllocator#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected GLFWAllocator getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link GLFWAllocator#allocate} field. */ - @NativeType("GLFWallocatefun") - public GLFWAllocateCallback allocate() { return GLFWAllocator.nallocate(address()); } - /** @return the value of the {@link GLFWAllocator#reallocate} field. */ - @NativeType("GLFWreallocatefun") - public GLFWReallocateCallback reallocate() { return GLFWAllocator.nreallocate(address()); } - /** @return the value of the {@link GLFWAllocator#deallocate} field. */ - @NativeType("GLFWdeallocatefun") - public GLFWDeallocateCallback deallocate() { return GLFWAllocator.ndeallocate(address()); } - /** @return the value of the {@link GLFWAllocator#user} field. */ - @NativeType("void *") - public long user() { return GLFWAllocator.nuser(address()); } - - /** Sets the specified value to the {@link GLFWAllocator#allocate} field. */ - public Buffer allocate(@NativeType("GLFWallocatefun") GLFWAllocateCallbackI value) { GLFWAllocator.nallocate(address(), value); return this; } - /** Sets the specified value to the {@link GLFWAllocator#reallocate} field. */ - public Buffer reallocate(@NativeType("GLFWreallocatefun") GLFWReallocateCallbackI value) { GLFWAllocator.nreallocate(address(), value); return this; } - /** Sets the specified value to the {@link GLFWAllocator#deallocate} field. */ - public Buffer deallocate(@NativeType("GLFWdeallocatefun") GLFWDeallocateCallbackI value) { GLFWAllocator.ndeallocate(address(), value); return this; } - /** Sets the specified value to the {@link GLFWAllocator#user} field. */ - public Buffer user(@NativeType("void *") long value) { GLFWAllocator.nuser(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharCallback.java deleted file mode 100644 index 3f55e29c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetCharCallback SetCharCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     unsigned int codepoint
    - * )
    - * - * @since version 2.4 - */ -public abstract class GLFWCharCallback extends Callback implements GLFWCharCallbackI { - - /** - * Creates a {@code GLFWCharCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWCharCallback} - */ - public static GLFWCharCallback create(long functionPointer) { - GLFWCharCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWCharCallback - ? (GLFWCharCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWCharCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWCharCallback} instance that delegates to the specified {@code GLFWCharCallbackI} instance. */ - public static GLFWCharCallback create(GLFWCharCallbackI instance) { - return instance instanceof GLFWCharCallback - ? (GLFWCharCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWCharCallback() { - super(CIF); - } - - GLFWCharCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetCharCallback SetCharCallback}. */ - public GLFWCharCallback set(long window) { - glfwSetCharCallback(window, this); - return this; - } - - private static final class Container extends GLFWCharCallback { - - private final GLFWCharCallbackI delegate; - - Container(long functionPointer, GLFWCharCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int codepoint) { - delegate.invoke(window, codepoint); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharCallbackI.java deleted file mode 100644 index 96dd526f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetCharCallback SetCharCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     unsigned int codepoint
    - * )
    - * - * @since version 2.4 - */ -@FunctionalInterface -@NativeType("GLFWcharfun") -public interface GLFWCharCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** - * Will be called when a Unicode character is input. - * - * @param window the window that received the event - * @param codepoint the Unicode code point of the character - */ - void invoke(@NativeType("GLFWwindow *") long window, @NativeType("unsigned int") int codepoint); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharModsCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharModsCallback.java deleted file mode 100644 index 423f7897..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharModsCallback.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetCharModsCallback SetCharModsCallback} method. - * - *

    Deprecared: scheduled for removal in version 4.0.

    - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     unsigned int codepoint,
    - *     int mods
    - * )
    - * - * @since version 3.1 - */ -public abstract class GLFWCharModsCallback extends Callback implements GLFWCharModsCallbackI { - - /** - * Creates a {@code GLFWCharModsCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWCharModsCallback} - */ - public static GLFWCharModsCallback create(long functionPointer) { - GLFWCharModsCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWCharModsCallback - ? (GLFWCharModsCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWCharModsCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWCharModsCallback} instance that delegates to the specified {@code GLFWCharModsCallbackI} instance. */ - public static GLFWCharModsCallback create(GLFWCharModsCallbackI instance) { - return instance instanceof GLFWCharModsCallback - ? (GLFWCharModsCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWCharModsCallback() { - super(CIF); - } - - GLFWCharModsCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetCharModsCallback SetCharModsCallback}. */ - public GLFWCharModsCallback set(long window) { - glfwSetCharModsCallback(window, this); - return this; - } - - private static final class Container extends GLFWCharModsCallback { - - private final GLFWCharModsCallbackI delegate; - - Container(long functionPointer, GLFWCharModsCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int codepoint, int mods) { - delegate.invoke(window, codepoint, mods); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharModsCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharModsCallbackI.java deleted file mode 100644 index 828674f1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCharModsCallbackI.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetCharModsCallback SetCharModsCallback} method. - * - *

    Deprecared: scheduled for removal in version 4.0.

    - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     unsigned int codepoint,
    - *     int mods
    - * )
    - * - * @since version 3.1 - */ -@FunctionalInterface -@NativeType("GLFWcharmodsfun") -public interface GLFWCharModsCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_uint32, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when a Unicode character is input regardless of what modifier keys are used. - * - * @param window the window that received the event - * @param codepoint the Unicode code point of the character - * @param mods bitfield describing which modifier keys were held down - */ - void invoke(@NativeType("GLFWwindow *") long window, @NativeType("unsigned int") int codepoint, int mods); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorEnterCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorEnterCallback.java deleted file mode 100644 index de4bf5ea..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorEnterCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetCursorEnterCallback SetCursorEnterCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int entered
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWCursorEnterCallback extends Callback implements GLFWCursorEnterCallbackI { - - /** - * Creates a {@code GLFWCursorEnterCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWCursorEnterCallback} - */ - public static GLFWCursorEnterCallback create(long functionPointer) { - GLFWCursorEnterCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWCursorEnterCallback - ? (GLFWCursorEnterCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWCursorEnterCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWCursorEnterCallback} instance that delegates to the specified {@code GLFWCursorEnterCallbackI} instance. */ - public static GLFWCursorEnterCallback create(GLFWCursorEnterCallbackI instance) { - return instance instanceof GLFWCursorEnterCallback - ? (GLFWCursorEnterCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWCursorEnterCallback() { - super(CIF); - } - - GLFWCursorEnterCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetCursorEnterCallback SetCursorEnterCallback}. */ - public GLFWCursorEnterCallback set(long window) { - glfwSetCursorEnterCallback(window, this); - return this; - } - - private static final class Container extends GLFWCursorEnterCallback { - - private final GLFWCursorEnterCallbackI delegate; - - Container(long functionPointer, GLFWCursorEnterCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, boolean entered) { - delegate.invoke(window, entered); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorEnterCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorEnterCallbackI.java deleted file mode 100644 index c67e75c0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorEnterCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetCursorEnterCallback SetCursorEnterCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int entered
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWcursorenterfun") -public interface GLFWCursorEnterCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) != 0 - ); - } - - /** - * Will be called when the cursor enters or leaves the client area of the window. - * - * @param window the window that received the event - * @param entered {@link GLFW#GLFW_TRUE TRUE} if the cursor entered the window's content area, or {@link GLFW#GLFW_FALSE FALSE} if it left it - */ - void invoke(@NativeType("GLFWwindow *") long window, @NativeType("int") boolean entered); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorPosCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorPosCallback.java deleted file mode 100644 index 07c58c7c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorPosCallback.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetCursorPosCallback SetCursorPosCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     double xpos,
    - *     double ypos
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWCursorPosCallback extends Callback implements GLFWCursorPosCallbackI { - - /** - * Creates a {@code GLFWCursorPosCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWCursorPosCallback} - */ - public static GLFWCursorPosCallback create(long functionPointer) { - GLFWCursorPosCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWCursorPosCallback - ? (GLFWCursorPosCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWCursorPosCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWCursorPosCallback} instance that delegates to the specified {@code GLFWCursorPosCallbackI} instance. */ - public static GLFWCursorPosCallback create(GLFWCursorPosCallbackI instance) { - return instance instanceof GLFWCursorPosCallback - ? (GLFWCursorPosCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWCursorPosCallback() { - super(CIF); - } - - GLFWCursorPosCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetCursorPosCallback SetCursorPosCallback}. */ - public GLFWCursorPosCallback set(long window) { - glfwSetCursorPosCallback(window, this); - return this; - } - - private static final class Container extends GLFWCursorPosCallback { - - private final GLFWCursorPosCallbackI delegate; - - Container(long functionPointer, GLFWCursorPosCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, double xpos, double ypos) { - delegate.invoke(window, xpos, ypos); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorPosCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorPosCallbackI.java deleted file mode 100644 index 0800672d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWCursorPosCallbackI.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetCursorPosCallback SetCursorPosCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     double xpos,
    - *     double ypos
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWcursorposfun") -public interface GLFWCursorPosCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_double, ffi_type_double - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetDouble(memGetAddress(args + POINTER_SIZE)), - memGetDouble(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when the cursor is moved. - * - *

    The callback function receives the cursor position, measured in screen coordinates but relative to the top-left corner of the window client area. On - * platforms that provide it, the full sub-pixel cursor position is passed on.

    - * - * @param window the window that received the event - * @param xpos the new cursor x-coordinate, relative to the left edge of the content area - * @param ypos the new cursor y-coordinate, relative to the top edge of the content area - */ - void invoke(@NativeType("GLFWwindow *") long window, double xpos, double ypos); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDeallocateCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDeallocateCallback.java deleted file mode 100644 index 67e1f747..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDeallocateCallback.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The function pointer type for memory deallocation callbacks. - * - *

    This is the function pointer type for memory deallocation callbacks. A memory deallocation callback function has the following signature:

    - * - *
    
    - * void function_name(void* block, void* user)
    - * - *

    This function may deallocate the specified memory block. This memory block will have been allocated with the same allocator.

    - * - *

    This function may be called during {@link GLFW#glfwInit Init} but before the library is flagged as initialized, as well as during {@link GLFW#glfwTerminate Terminate} after the library is no - * longer flagged as initialized.

    - * - *

    The block address will never be {@code NULL}. Deallocations of {@code NULL} are filtered out before reaching the custom allocator.

    - * - *
    Note
    - * - *
      - *
    • The specified memory block will not be accessed by GLFW after this function is called.
    • - *
    • This function should not call any GLFW function.
    • - *
    • This function may be called from any thread that calls GLFW functions.
    • - *
    - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *block,
    - *     void *user
    - * )
    - * - * @since version 3.4 - */ -public abstract class GLFWDeallocateCallback extends Callback implements GLFWDeallocateCallbackI { - - /** - * Creates a {@code GLFWDeallocateCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWDeallocateCallback} - */ - public static GLFWDeallocateCallback create(long functionPointer) { - GLFWDeallocateCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWDeallocateCallback - ? (GLFWDeallocateCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWDeallocateCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWDeallocateCallback} instance that delegates to the specified {@code GLFWDeallocateCallbackI} instance. */ - public static GLFWDeallocateCallback create(GLFWDeallocateCallbackI instance) { - return instance instanceof GLFWDeallocateCallback - ? (GLFWDeallocateCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWDeallocateCallback() { - super(CIF); - } - - GLFWDeallocateCallback(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends GLFWDeallocateCallback { - - private final GLFWDeallocateCallbackI delegate; - - Container(long functionPointer, GLFWDeallocateCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long block, long user) { - delegate.invoke(block, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDeallocateCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDeallocateCallbackI.java deleted file mode 100644 index 1d456fd5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDeallocateCallbackI.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * The function pointer type for memory deallocation callbacks. - * - *

    This is the function pointer type for memory deallocation callbacks. A memory deallocation callback function has the following signature:

    - * - *
    
    - * void function_name(void* block, void* user)
    - * - *

    This function may deallocate the specified memory block. This memory block will have been allocated with the same allocator.

    - * - *

    This function may be called during {@link GLFW#glfwInit Init} but before the library is flagged as initialized, as well as during {@link GLFW#glfwTerminate Terminate} after the library is no - * longer flagged as initialized.

    - * - *

    The block address will never be {@code NULL}. Deallocations of {@code NULL} are filtered out before reaching the custom allocator.

    - * - *
    Note
    - * - *
      - *
    • The specified memory block will not be accessed by GLFW after this function is called.
    • - *
    • This function should not call any GLFW function.
    • - *
    • This function may be called from any thread that calls GLFW functions.
    • - *
    - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *block,
    - *     void *user
    - * )
    - * - * @since version 3.4 - */ -@FunctionalInterface -@NativeType("GLFWdeallocatefun") -public interface GLFWDeallocateCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** - * Will be called for memory deallocation requests. - * - * @param block the address of the memory block to deallocate - * @param user the user-defined pointer from the allocator - */ - void invoke(@NativeType("void *") long block, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDropCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDropCallback.java deleted file mode 100644 index 88d038c4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDropCallback.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetDropCallback SetDropCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int count,
    - *     char const **names
    - * )
    - * - * @since version 3.1 - */ -public abstract class GLFWDropCallback extends Callback implements GLFWDropCallbackI { - - /** - * Creates a {@code GLFWDropCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWDropCallback} - */ - public static GLFWDropCallback create(long functionPointer) { - GLFWDropCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWDropCallback - ? (GLFWDropCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWDropCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWDropCallback} instance that delegates to the specified {@code GLFWDropCallbackI} instance. */ - public static GLFWDropCallback create(GLFWDropCallbackI instance) { - return instance instanceof GLFWDropCallback - ? (GLFWDropCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWDropCallback() { - super(CIF); - } - - GLFWDropCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Decodes the specified {@link GLFWDropCallback} arguments to a String. - * - *

    This method may only be used inside a {@code GLFWDropCallback} invocation.

    - * - * @param names pointer to the array of UTF-8 encoded path names of the dropped files - * @param index the index to decode - * - * @return the name at the specified index as a String - */ - public static String getName(long names, int index) { - return memUTF8(memGetAddress(names + Pointer.POINTER_SIZE * index)); - } - - /** See {@link GLFW#glfwSetDropCallback SetDropCallback}. */ - public GLFWDropCallback set(long window) { - glfwSetDropCallback(window, this); - return this; - } - - private static final class Container extends GLFWDropCallback { - - private final GLFWDropCallbackI delegate; - - Container(long functionPointer, GLFWDropCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int count, long names) { - delegate.invoke(window, count, names); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDropCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDropCallbackI.java deleted file mode 100644 index 757011ca..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWDropCallbackI.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetDropCallback SetDropCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int count,
    - *     char const **names
    - * )
    - * - * @since version 3.1 - */ -@FunctionalInterface -@NativeType("GLFWdropfun") -public interface GLFWDropCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when one or more dragged files are dropped on the window. - * - * @param window the window that received the event - * @param count the number of dropped files - * @param names pointer to the array of UTF-8 encoded path names of the dropped files - */ - void invoke(@NativeType("GLFWwindow *") long window, int count, @NativeType("char const **") long names); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWErrorCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWErrorCallback.java deleted file mode 100644 index a68a8bce..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWErrorCallback.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import java.io.PrintStream; -import java.util.Map; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetErrorCallback SetErrorCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int error,
    - *     char *description
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWErrorCallback extends Callback implements GLFWErrorCallbackI { - - /** - * Creates a {@code GLFWErrorCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWErrorCallback} - */ - public static GLFWErrorCallback create(long functionPointer) { - GLFWErrorCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWErrorCallback - ? (GLFWErrorCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWErrorCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWErrorCallback} instance that delegates to the specified {@code GLFWErrorCallbackI} instance. */ - public static GLFWErrorCallback create(GLFWErrorCallbackI instance) { - return instance instanceof GLFWErrorCallback - ? (GLFWErrorCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWErrorCallback() { - super(CIF); - } - - GLFWErrorCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Converts the specified {@code GLFWErrorCallback} argument to a String. - * - *

    This method may only be used inside a GLFWErrorCallback invocation.

    - * - * @param description pointer to the UTF-8 encoded description string - * - * @return the description as a String - */ - public static String getDescription(long description) { - return memUTF8(description); - } - - /** - * Returns a {@code GLFWErrorCallback} instance that prints the error to the {@link APIUtil#DEBUG_STREAM}. - * - * @return the GLFWerrorCallback - */ - public static GLFWErrorCallback createPrint() { - return createPrint(APIUtil.DEBUG_STREAM); - } - - /** - * Returns a {@code GLFWErrorCallback} instance that prints the error in the specified {@link PrintStream}. - * - * @param stream the PrintStream to use - * - * @return the GLFWerrorCallback - */ - public static GLFWErrorCallback createPrint(PrintStream stream) { - return new GLFWErrorCallback() { - private Map ERROR_CODES = APIUtil.apiClassTokens((field, value) -> 0x10000 < value && value < 0x20000, null, GLFW.class); - - @Override - public void invoke(int error, long description) { - String msg = getDescription(description); - - StringBuilder sb = new StringBuilder(512); - sb - .append("[LWJGL] ") - .append(ERROR_CODES.get(error)) - .append(" error\n") - .append("\tDescription : ") - .append(msg) - .append("\n") - .append("\tStacktrace :\n"); - - StackTraceElement[] stack = Thread.currentThread().getStackTrace(); - for (int i = 4; i < stack.length; i++) { - sb.append("\t\t"); - sb.append(stack[i]); - sb.append("\n"); - } - - stream.print(sb); - } - }; - } - - /** - * Returns a {@code GLFWErrorCallback} instance that throws an {@link IllegalStateException} when an error occurs. - * - * @return the GLFWerrorCallback - */ - public static GLFWErrorCallback createThrow() { - return new GLFWErrorCallback() { - @Override - public void invoke(int error, long description) { - throw new IllegalStateException(String.format("GLFW error [0x%X]: %s", error, getDescription(description))); - } - }; - } - - /** See {@link GLFW#glfwSetErrorCallback SetErrorCallback}. */ - public GLFWErrorCallback set() { - glfwSetErrorCallback(this); - return this; - } - - private static final class Container extends GLFWErrorCallback { - - private final GLFWErrorCallbackI delegate; - - Container(long functionPointer, GLFWErrorCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int error, long description) { - delegate.invoke(error, description); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWErrorCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWErrorCallbackI.java deleted file mode 100644 index 4a6404de..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWErrorCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetErrorCallback SetErrorCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int error,
    - *     char *description
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWerrorfun") -public interface GLFWErrorCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_sint32, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** - * Will be called with an error code and a human-readable description when a GLFW error occurs. - * - * @param error the error code - * @param description a pointer to a UTF-8 encoded string describing the error - */ - void invoke(int error, @NativeType("char *") long description); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWFramebufferSizeCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWFramebufferSizeCallback.java deleted file mode 100644 index bf416a66..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWFramebufferSizeCallback.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetFramebufferSizeCallback SetFramebufferSizeCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int width,
    - *     int height
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWFramebufferSizeCallback extends Callback implements GLFWFramebufferSizeCallbackI { - - /** - * Creates a {@code GLFWFramebufferSizeCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWFramebufferSizeCallback} - */ - public static GLFWFramebufferSizeCallback create(long functionPointer) { - GLFWFramebufferSizeCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWFramebufferSizeCallback - ? (GLFWFramebufferSizeCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWFramebufferSizeCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWFramebufferSizeCallback} instance that delegates to the specified {@code GLFWFramebufferSizeCallbackI} instance. */ - public static GLFWFramebufferSizeCallback create(GLFWFramebufferSizeCallbackI instance) { - return instance instanceof GLFWFramebufferSizeCallback - ? (GLFWFramebufferSizeCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWFramebufferSizeCallback() { - super(CIF); - } - - GLFWFramebufferSizeCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetFramebufferSizeCallback SetFramebufferSizeCallback}. */ - public GLFWFramebufferSizeCallback set(long window) { - glfwSetFramebufferSizeCallback(window, this); - return this; - } - - private static final class Container extends GLFWFramebufferSizeCallback { - - private final GLFWFramebufferSizeCallbackI delegate; - - Container(long functionPointer, GLFWFramebufferSizeCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int width, int height) { - delegate.invoke(window, width, height); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWFramebufferSizeCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWFramebufferSizeCallbackI.java deleted file mode 100644 index 4489f34b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWFramebufferSizeCallbackI.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetFramebufferSizeCallback SetFramebufferSizeCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int width,
    - *     int height
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWframebuffersizefun") -public interface GLFWFramebufferSizeCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when the framebuffer of the specified window is resized. - * - * @param window the window whose framebuffer was resized - * @param width the new width, in pixels, of the framebuffer - * @param height the new height, in pixels, of the framebuffer - */ - void invoke(@NativeType("GLFWwindow *") long window, int width, int height); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWGamepadState.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWGamepadState.java deleted file mode 100644 index 5004984a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWGamepadState.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Describes the input state of a gamepad. - * - *

    Layout

    - * - *
    
    - * struct GLFWgamepadstate {
    - *     unsigned char {@link #buttons}[15];
    - *     float {@link #axes}[6];
    - * }
    - * - * @since version 3.3 - */ -@NativeType("struct GLFWgamepadstate") -public class GLFWGamepadState extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BUTTONS, - AXES; - - static { - Layout layout = __struct( - __array(1, 15), - __array(4, 6) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BUTTONS = layout.offsetof(0); - AXES = layout.offsetof(1); - } - - protected GLFWGamepadState(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected GLFWGamepadState create(long address, @Nullable ByteBuffer container) { - return new GLFWGamepadState(address, container); - } - - /** - * Creates a {@code GLFWGamepadState} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public GLFWGamepadState(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the states of each gamepad button, {@link GLFW#GLFW_PRESS PRESS} or {@link GLFW#GLFW_RELEASE RELEASE} */ - @NativeType("unsigned char[15]") - public ByteBuffer buttons() { return nbuttons(address()); } - /** the states of each gamepad button, {@link GLFW#GLFW_PRESS PRESS} or {@link GLFW#GLFW_RELEASE RELEASE} */ - @NativeType("unsigned char") - public byte buttons(int index) { return nbuttons(address(), index); } - /** the states of each gamepad axis, in the range -1.0 to 1.0 inclusive */ - @NativeType("float[6]") - public FloatBuffer axes() { return naxes(address()); } - /** the states of each gamepad axis, in the range -1.0 to 1.0 inclusive */ - public float axes(int index) { return naxes(address(), index); } - - /** Copies the specified {@link ByteBuffer} to the {@link #buttons} field. */ - public GLFWGamepadState buttons(@NativeType("unsigned char[15]") ByteBuffer value) { nbuttons(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #buttons} field. */ - public GLFWGamepadState buttons(int index, @NativeType("unsigned char") byte value) { nbuttons(address(), index, value); return this; } - /** Copies the specified {@link FloatBuffer} to the {@link #axes} field. */ - public GLFWGamepadState axes(@NativeType("float[6]") FloatBuffer value) { naxes(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #axes} field. */ - public GLFWGamepadState axes(int index, float value) { naxes(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public GLFWGamepadState set( - ByteBuffer buttons, - FloatBuffer axes - ) { - buttons(buttons); - axes(axes); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public GLFWGamepadState set(GLFWGamepadState src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code GLFWGamepadState} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static GLFWGamepadState malloc() { - return new GLFWGamepadState(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code GLFWGamepadState} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static GLFWGamepadState calloc() { - return new GLFWGamepadState(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code GLFWGamepadState} instance allocated with {@link BufferUtils}. */ - public static GLFWGamepadState create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new GLFWGamepadState(memAddress(container), container); - } - - /** Returns a new {@code GLFWGamepadState} instance for the specified memory address. */ - public static GLFWGamepadState create(long address) { - return new GLFWGamepadState(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static GLFWGamepadState createSafe(long address) { - return address == NULL ? null : new GLFWGamepadState(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGamepadState mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGamepadState callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGamepadState mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGamepadState callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code GLFWGamepadState} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static GLFWGamepadState malloc(MemoryStack stack) { - return new GLFWGamepadState(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code GLFWGamepadState} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static GLFWGamepadState calloc(MemoryStack stack) { - return new GLFWGamepadState(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #buttons}. */ - public static ByteBuffer nbuttons(long struct) { return memByteBuffer(struct + GLFWGamepadState.BUTTONS, 15); } - /** Unsafe version of {@link #buttons(int) buttons}. */ - public static byte nbuttons(long struct, int index) { - return UNSAFE.getByte(null, struct + GLFWGamepadState.BUTTONS + check(index, 15) * 1); - } - /** Unsafe version of {@link #axes}. */ - public static FloatBuffer naxes(long struct) { return memFloatBuffer(struct + GLFWGamepadState.AXES, 6); } - /** Unsafe version of {@link #axes(int) axes}. */ - public static float naxes(long struct, int index) { - return UNSAFE.getFloat(null, struct + GLFWGamepadState.AXES + check(index, 6) * 4); - } - - /** Unsafe version of {@link #buttons(ByteBuffer) buttons}. */ - public static void nbuttons(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 15); } - memCopy(memAddress(value), struct + GLFWGamepadState.BUTTONS, value.remaining() * 1); - } - /** Unsafe version of {@link #buttons(int, byte) buttons}. */ - public static void nbuttons(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + GLFWGamepadState.BUTTONS + check(index, 15) * 1, value); - } - /** Unsafe version of {@link #axes(FloatBuffer) axes}. */ - public static void naxes(long struct, FloatBuffer value) { - if (CHECKS) { checkGT(value, 6); } - memCopy(memAddress(value), struct + GLFWGamepadState.AXES, value.remaining() * 4); - } - /** Unsafe version of {@link #axes(int, float) axes}. */ - public static void naxes(long struct, int index, float value) { - UNSAFE.putFloat(null, struct + GLFWGamepadState.AXES + check(index, 6) * 4, value); - } - - // ----------------------------------- - - /** An array of {@link GLFWGamepadState} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final GLFWGamepadState ELEMENT_FACTORY = GLFWGamepadState.create(-1L); - - /** - * Creates a new {@code GLFWGamepadState.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link GLFWGamepadState#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected GLFWGamepadState getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the {@link GLFWGamepadState#buttons} field. */ - @NativeType("unsigned char[15]") - public ByteBuffer buttons() { return GLFWGamepadState.nbuttons(address()); } - /** @return the value at the specified index of the {@link GLFWGamepadState#buttons} field. */ - @NativeType("unsigned char") - public byte buttons(int index) { return GLFWGamepadState.nbuttons(address(), index); } - /** @return a {@link FloatBuffer} view of the {@link GLFWGamepadState#axes} field. */ - @NativeType("float[6]") - public FloatBuffer axes() { return GLFWGamepadState.naxes(address()); } - /** @return the value at the specified index of the {@link GLFWGamepadState#axes} field. */ - public float axes(int index) { return GLFWGamepadState.naxes(address(), index); } - - /** Copies the specified {@link ByteBuffer} to the {@link GLFWGamepadState#buttons} field. */ - public Buffer buttons(@NativeType("unsigned char[15]") ByteBuffer value) { GLFWGamepadState.nbuttons(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link GLFWGamepadState#buttons} field. */ - public Buffer buttons(int index, @NativeType("unsigned char") byte value) { GLFWGamepadState.nbuttons(address(), index, value); return this; } - /** Copies the specified {@link FloatBuffer} to the {@link GLFWGamepadState#axes} field. */ - public Buffer axes(@NativeType("float[6]") FloatBuffer value) { GLFWGamepadState.naxes(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link GLFWGamepadState#axes} field. */ - public Buffer axes(int index, float value) { GLFWGamepadState.naxes(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWGammaRamp.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWGammaRamp.java deleted file mode 100644 index c70e722b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWGammaRamp.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Describes the gamma ramp for a monitor. - * - *

    Layout

    - * - *
    
    - * struct GLFWgammaramp {
    - *     unsigned short * {@link #red};
    - *     unsigned short * {@link #green};
    - *     unsigned short * {@link #blue};
    - *     unsigned int {@link #size};
    - * }
    - * - * @since version 3.0 - */ -@NativeType("struct GLFWgammaramp") -public class GLFWGammaRamp extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - RED, - GREEN, - BLUE, - SIZE; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - RED = layout.offsetof(0); - GREEN = layout.offsetof(1); - BLUE = layout.offsetof(2); - SIZE = layout.offsetof(3); - } - - protected GLFWGammaRamp(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected GLFWGammaRamp create(long address, @Nullable ByteBuffer container) { - return new GLFWGammaRamp(address, container); - } - - /** - * Creates a {@code GLFWGammaRamp} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public GLFWGammaRamp(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** an array of values describing the response of the red channel */ - @NativeType("unsigned short *") - public ShortBuffer red() { return nred(address()); } - /** an array of values describing the response of the green channel */ - @NativeType("unsigned short *") - public ShortBuffer green() { return ngreen(address()); } - /** an array of values describing the response of the blue channel */ - @NativeType("unsigned short *") - public ShortBuffer blue() { return nblue(address()); } - /** the number of elements in each array */ - @NativeType("unsigned int") - public int size() { return nsize(address()); } - - /** Sets the address of the specified {@link ShortBuffer} to the {@link #red} field. */ - public GLFWGammaRamp red(@NativeType("unsigned short *") ShortBuffer value) { nred(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@link #green} field. */ - public GLFWGammaRamp green(@NativeType("unsigned short *") ShortBuffer value) { ngreen(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@link #blue} field. */ - public GLFWGammaRamp blue(@NativeType("unsigned short *") ShortBuffer value) { nblue(address(), value); return this; } - /** Sets the specified value to the {@link #size} field. */ - public GLFWGammaRamp size(@NativeType("unsigned int") int value) { nsize(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public GLFWGammaRamp set( - ShortBuffer red, - ShortBuffer green, - ShortBuffer blue, - int size - ) { - red(red); - green(green); - blue(blue); - size(size); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public GLFWGammaRamp set(GLFWGammaRamp src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code GLFWGammaRamp} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static GLFWGammaRamp malloc() { - return new GLFWGammaRamp(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code GLFWGammaRamp} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static GLFWGammaRamp calloc() { - return new GLFWGammaRamp(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code GLFWGammaRamp} instance allocated with {@link BufferUtils}. */ - public static GLFWGammaRamp create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new GLFWGammaRamp(memAddress(container), container); - } - - /** Returns a new {@code GLFWGammaRamp} instance for the specified memory address. */ - public static GLFWGammaRamp create(long address) { - return new GLFWGammaRamp(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static GLFWGammaRamp createSafe(long address) { - return address == NULL ? null : new GLFWGammaRamp(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGammaRamp mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGammaRamp callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGammaRamp mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GLFWGammaRamp callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code GLFWGammaRamp} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static GLFWGammaRamp malloc(MemoryStack stack) { - return new GLFWGammaRamp(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code GLFWGammaRamp} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static GLFWGammaRamp calloc(MemoryStack stack) { - return new GLFWGammaRamp(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #red() red}. */ - public static ShortBuffer nred(long struct) { return memShortBuffer(memGetAddress(struct + GLFWGammaRamp.RED), nsize(struct)); } - /** Unsafe version of {@link #green() green}. */ - public static ShortBuffer ngreen(long struct) { return memShortBuffer(memGetAddress(struct + GLFWGammaRamp.GREEN), nsize(struct)); } - /** Unsafe version of {@link #blue() blue}. */ - public static ShortBuffer nblue(long struct) { return memShortBuffer(memGetAddress(struct + GLFWGammaRamp.BLUE), nsize(struct)); } - /** Unsafe version of {@link #size}. */ - public static int nsize(long struct) { return UNSAFE.getInt(null, struct + GLFWGammaRamp.SIZE); } - - /** Unsafe version of {@link #red(ShortBuffer) red}. */ - public static void nred(long struct, ShortBuffer value) { memPutAddress(struct + GLFWGammaRamp.RED, memAddress(value)); } - /** Unsafe version of {@link #green(ShortBuffer) green}. */ - public static void ngreen(long struct, ShortBuffer value) { memPutAddress(struct + GLFWGammaRamp.GREEN, memAddress(value)); } - /** Unsafe version of {@link #blue(ShortBuffer) blue}. */ - public static void nblue(long struct, ShortBuffer value) { memPutAddress(struct + GLFWGammaRamp.BLUE, memAddress(value)); } - /** Sets the specified value to the {@code size} field of the specified {@code struct}. */ - public static void nsize(long struct, int value) { UNSAFE.putInt(null, struct + GLFWGammaRamp.SIZE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + GLFWGammaRamp.RED)); - check(memGetAddress(struct + GLFWGammaRamp.GREEN)); - check(memGetAddress(struct + GLFWGammaRamp.BLUE)); - } - - // ----------------------------------- - - /** An array of {@link GLFWGammaRamp} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final GLFWGammaRamp ELEMENT_FACTORY = GLFWGammaRamp.create(-1L); - - /** - * Creates a new {@code GLFWGammaRamp.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link GLFWGammaRamp#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected GLFWGammaRamp getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ShortBuffer} view of the data pointed to by the {@link GLFWGammaRamp#red} field. */ - @NativeType("unsigned short *") - public ShortBuffer red() { return GLFWGammaRamp.nred(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@link GLFWGammaRamp#green} field. */ - @NativeType("unsigned short *") - public ShortBuffer green() { return GLFWGammaRamp.ngreen(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@link GLFWGammaRamp#blue} field. */ - @NativeType("unsigned short *") - public ShortBuffer blue() { return GLFWGammaRamp.nblue(address()); } - /** @return the value of the {@link GLFWGammaRamp#size} field. */ - @NativeType("unsigned int") - public int size() { return GLFWGammaRamp.nsize(address()); } - - /** Sets the address of the specified {@link ShortBuffer} to the {@link GLFWGammaRamp#red} field. */ - public Buffer red(@NativeType("unsigned short *") ShortBuffer value) { GLFWGammaRamp.nred(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@link GLFWGammaRamp#green} field. */ - public Buffer green(@NativeType("unsigned short *") ShortBuffer value) { GLFWGammaRamp.ngreen(address(), value); return this; } - /** Sets the address of the specified {@link ShortBuffer} to the {@link GLFWGammaRamp#blue} field. */ - public Buffer blue(@NativeType("unsigned short *") ShortBuffer value) { GLFWGammaRamp.nblue(address(), value); return this; } - /** Sets the specified value to the {@link GLFWGammaRamp#size} field. */ - public Buffer size(@NativeType("unsigned int") int value) { GLFWGammaRamp.nsize(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWImage.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWImage.java deleted file mode 100644 index 262a1672..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWImage.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Image data. - * - *

    This describes a single 2D image. See the documentation for each related function to see what the expected pixel format is.

    - * - *

    Layout

    - * - *
    
    - * struct GLFWimage {
    - *     int {@link #width};
    - *     int {@link #height};
    - *     unsigned char * {@link #pixels};
    - * }
    - * - * @since version 2.1 - */ -@NativeType("struct GLFWimage") -public class GLFWImage extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT, - PIXELS; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - PIXELS = layout.offsetof(2); - } - - protected GLFWImage(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected GLFWImage create(long address, @Nullable ByteBuffer container) { - return new GLFWImage(address, container); - } - - /** - * Creates a {@code GLFWImage} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public GLFWImage(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the width, in pixels, of this image */ - public int width() { return nwidth(address()); } - /** the height, in pixels, of this image */ - public int height() { return nheight(address()); } - /** - * @param capacity the number of elements in the returned buffer - * - * @return the pixel data of this image, arranged left-to-right, top-to-bottom - */ - @NativeType("unsigned char *") - public ByteBuffer pixels(int capacity) { return npixels(address(), capacity); } - - /** Sets the specified value to the {@link #width} field. */ - public GLFWImage width(int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@link #height} field. */ - public GLFWImage height(int value) { nheight(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@link #pixels} field. */ - public GLFWImage pixels(@NativeType("unsigned char *") ByteBuffer value) { npixels(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public GLFWImage set( - int width, - int height, - ByteBuffer pixels - ) { - width(width); - height(height); - pixels(pixels); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public GLFWImage set(GLFWImage src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code GLFWImage} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static GLFWImage malloc() { - return new GLFWImage(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code GLFWImage} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static GLFWImage calloc() { - return new GLFWImage(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code GLFWImage} instance allocated with {@link BufferUtils}. */ - public static GLFWImage create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new GLFWImage(memAddress(container), container); - } - - /** Returns a new {@code GLFWImage} instance for the specified memory address. */ - public static GLFWImage create(long address) { - return new GLFWImage(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static GLFWImage createSafe(long address) { - return address == NULL ? null : new GLFWImage(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GLFWImage mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GLFWImage callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GLFWImage mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GLFWImage callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code GLFWImage} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static GLFWImage malloc(MemoryStack stack) { - return new GLFWImage(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code GLFWImage} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static GLFWImage calloc(MemoryStack stack) { - return new GLFWImage(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + GLFWImage.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + GLFWImage.HEIGHT); } - /** Unsafe version of {@link #pixels(int) pixels}. */ - public static ByteBuffer npixels(long struct, int capacity) { return memByteBuffer(memGetAddress(struct + GLFWImage.PIXELS), capacity); } - - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + GLFWImage.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + GLFWImage.HEIGHT, value); } - /** Unsafe version of {@link #pixels(ByteBuffer) pixels}. */ - public static void npixels(long struct, ByteBuffer value) { memPutAddress(struct + GLFWImage.PIXELS, memAddress(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + GLFWImage.PIXELS)); - } - - // ----------------------------------- - - /** An array of {@link GLFWImage} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final GLFWImage ELEMENT_FACTORY = GLFWImage.create(-1L); - - /** - * Creates a new {@code GLFWImage.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link GLFWImage#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected GLFWImage getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link GLFWImage#width} field. */ - public int width() { return GLFWImage.nwidth(address()); } - /** @return the value of the {@link GLFWImage#height} field. */ - public int height() { return GLFWImage.nheight(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@link GLFWImage#pixels} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned char *") - public ByteBuffer pixels(int capacity) { return GLFWImage.npixels(address(), capacity); } - - /** Sets the specified value to the {@link GLFWImage#width} field. */ - public Buffer width(int value) { GLFWImage.nwidth(address(), value); return this; } - /** Sets the specified value to the {@link GLFWImage#height} field. */ - public Buffer height(int value) { GLFWImage.nheight(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@link GLFWImage#pixels} field. */ - public Buffer pixels(@NativeType("unsigned char *") ByteBuffer value) { GLFWImage.npixels(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWJoystickCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWJoystickCallback.java deleted file mode 100644 index 72423449..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWJoystickCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetJoystickCallback SetJoystickCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int jid,
    - *     int event
    - * )
    - * - * @since version 3.2 - */ -public abstract class GLFWJoystickCallback extends Callback implements GLFWJoystickCallbackI { - - /** - * Creates a {@code GLFWJoystickCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWJoystickCallback} - */ - public static GLFWJoystickCallback create(long functionPointer) { - GLFWJoystickCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWJoystickCallback - ? (GLFWJoystickCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWJoystickCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWJoystickCallback} instance that delegates to the specified {@code GLFWJoystickCallbackI} instance. */ - public static GLFWJoystickCallback create(GLFWJoystickCallbackI instance) { - return instance instanceof GLFWJoystickCallback - ? (GLFWJoystickCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWJoystickCallback() { - super(CIF); - } - - GLFWJoystickCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetJoystickCallback SetJoystickCallback}. */ - public GLFWJoystickCallback set() { - glfwSetJoystickCallback(this); - return this; - } - - private static final class Container extends GLFWJoystickCallback { - - private final GLFWJoystickCallbackI delegate; - - Container(long functionPointer, GLFWJoystickCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int jid, int event) { - delegate.invoke(jid, event); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWJoystickCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWJoystickCallbackI.java deleted file mode 100644 index cdc696ea..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWJoystickCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetJoystickCallback SetJoystickCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int jid,
    - *     int event
    - * )
    - * - * @since version 3.2 - */ -@FunctionalInterface -@NativeType("GLFWjoystickfun") -public interface GLFWJoystickCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_sint32, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** - * Will be called when a joystick is connected to or disconnected from the system. - * - * @param jid the joystick that was connected or disconnected - * @param event one of {@link GLFW#GLFW_CONNECTED CONNECTED} or {@link GLFW#GLFW_DISCONNECTED DISCONNECTED}. Remaining values reserved for future use. - */ - void invoke(int jid, int event); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWKeyCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWKeyCallback.java deleted file mode 100644 index aaa1e27a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWKeyCallback.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetKeyCallback SetKeyCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int key,
    - *     int scancode,
    - *     int action,
    - *     int mods
    - * )
    - */ -public abstract class GLFWKeyCallback extends Callback implements GLFWKeyCallbackI { - - /** - * Creates a {@code GLFWKeyCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWKeyCallback} - */ - public static GLFWKeyCallback create(long functionPointer) { - GLFWKeyCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWKeyCallback - ? (GLFWKeyCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWKeyCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWKeyCallback} instance that delegates to the specified {@code GLFWKeyCallbackI} instance. */ - public static GLFWKeyCallback create(GLFWKeyCallbackI instance) { - return instance instanceof GLFWKeyCallback - ? (GLFWKeyCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWKeyCallback() { - super(CIF); - } - - GLFWKeyCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetKeyCallback SetKeyCallback}. */ - public GLFWKeyCallback set(long window) { - glfwSetKeyCallback(window, this); - return this; - } - - private static final class Container extends GLFWKeyCallback { - - private final GLFWKeyCallbackI delegate; - - Container(long functionPointer, GLFWKeyCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int key, int scancode, int action, int mods) { - delegate.invoke(window, key, scancode, action, mods); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWKeyCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWKeyCallbackI.java deleted file mode 100644 index 75bc538e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWKeyCallbackI.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetKeyCallback SetKeyCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int key,
    - *     int scancode,
    - *     int action,
    - *     int mods
    - * )
    - */ -@FunctionalInterface -@NativeType("GLFWkeyfun") -public interface GLFWKeyCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32, ffi_type_sint32, ffi_type_sint32, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 3 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 4 * POINTER_SIZE)) - ); - } - - /** - * Will be called when a key is pressed, repeated or released. - * - * @param window the window that received the event - * @param key the keyboard key that was pressed or released - * @param scancode the platform-specific scancode of the key - * @param action the key action. One of:
    {@link GLFW#GLFW_PRESS PRESS}{@link GLFW#GLFW_RELEASE RELEASE}{@link GLFW#GLFW_REPEAT REPEAT}
    - * @param mods bitfield describing which modifiers keys were held down - */ - void invoke(@NativeType("GLFWwindow *") long window, int key, int scancode, int action, int mods); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMonitorCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMonitorCallback.java deleted file mode 100644 index c44c5e6c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMonitorCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetMonitorCallback SetMonitorCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWmonitor *monitor,
    - *     int event
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWMonitorCallback extends Callback implements GLFWMonitorCallbackI { - - /** - * Creates a {@code GLFWMonitorCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWMonitorCallback} - */ - public static GLFWMonitorCallback create(long functionPointer) { - GLFWMonitorCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWMonitorCallback - ? (GLFWMonitorCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWMonitorCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWMonitorCallback} instance that delegates to the specified {@code GLFWMonitorCallbackI} instance. */ - public static GLFWMonitorCallback create(GLFWMonitorCallbackI instance) { - return instance instanceof GLFWMonitorCallback - ? (GLFWMonitorCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWMonitorCallback() { - super(CIF); - } - - GLFWMonitorCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetMonitorCallback SetMonitorCallback}. */ - public GLFWMonitorCallback set() { - glfwSetMonitorCallback(this); - return this; - } - - private static final class Container extends GLFWMonitorCallback { - - private final GLFWMonitorCallbackI delegate; - - Container(long functionPointer, GLFWMonitorCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long monitor, int event) { - delegate.invoke(monitor, event); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMonitorCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMonitorCallbackI.java deleted file mode 100644 index 99a5dafa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMonitorCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetMonitorCallback SetMonitorCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWmonitor *monitor,
    - *     int event
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWmonitorfun") -public interface GLFWMonitorCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** - * Will be called when a monitor is connected to or disconnected from the system. - * - * @param monitor the monitor that was connected or disconnected - * @param event one of {@link GLFW#GLFW_CONNECTED CONNECTED} or {@link GLFW#GLFW_DISCONNECTED DISCONNECTED}. Remaining values reserved for future use. - */ - void invoke(@NativeType("GLFWmonitor *") long monitor, int event); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMouseButtonCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMouseButtonCallback.java deleted file mode 100644 index 59bd1c32..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMouseButtonCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetMouseButtonCallback SetMouseButtonCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int button,
    - *     int action,
    - *     int mods
    - * )
    - */ -public abstract class GLFWMouseButtonCallback extends Callback implements GLFWMouseButtonCallbackI { - - /** - * Creates a {@code GLFWMouseButtonCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWMouseButtonCallback} - */ - public static GLFWMouseButtonCallback create(long functionPointer) { - GLFWMouseButtonCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWMouseButtonCallback - ? (GLFWMouseButtonCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWMouseButtonCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWMouseButtonCallback} instance that delegates to the specified {@code GLFWMouseButtonCallbackI} instance. */ - public static GLFWMouseButtonCallback create(GLFWMouseButtonCallbackI instance) { - return instance instanceof GLFWMouseButtonCallback - ? (GLFWMouseButtonCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWMouseButtonCallback() { - super(CIF); - } - - GLFWMouseButtonCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetMouseButtonCallback SetMouseButtonCallback}. */ - public GLFWMouseButtonCallback set(long window) { - glfwSetMouseButtonCallback(window, this); - return this; - } - - private static final class Container extends GLFWMouseButtonCallback { - - private final GLFWMouseButtonCallbackI delegate; - - Container(long functionPointer, GLFWMouseButtonCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int button, int action, int mods) { - delegate.invoke(window, button, action, mods); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMouseButtonCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMouseButtonCallbackI.java deleted file mode 100644 index d457fd26..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWMouseButtonCallbackI.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetMouseButtonCallback SetMouseButtonCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int button,
    - *     int action,
    - *     int mods
    - * )
    - */ -@FunctionalInterface -@NativeType("GLFWmousebuttonfun") -public interface GLFWMouseButtonCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32, ffi_type_sint32, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 3 * POINTER_SIZE)) - ); - } - - /** - * Will be called when a mouse button is pressed or released. - * - * @param window the window that received the event - * @param button the mouse button that was pressed or released - * @param action the button action. One of:
    {@link GLFW#GLFW_PRESS PRESS}{@link GLFW#GLFW_RELEASE RELEASE}
    - * @param mods bitfield describing which modifiers keys were held down - */ - void invoke(@NativeType("GLFWwindow *") long window, int button, int action, int mods); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeCocoa.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeCocoa.java deleted file mode 100644 index 9ac2825f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeCocoa.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** Native bindings to the GLFW library's Cocoa native access functions. */ -public class GLFWNativeCocoa { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetCocoaMonitor = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetCocoaMonitor"), - GetCocoaWindow = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetCocoaWindow"); - - } - - protected GLFWNativeCocoa() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetCocoaMonitor ] --- - - /** - * Returns the {@code CGDirectDisplayID} of the specified monitor. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param monitor the GLFW monitor - * - * @return the {@code CGDirectDisplayID} of the specified monitor, or {@code kCGNullDirectDisplay} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.1 - */ - @NativeType("CGDirectDisplayID") - public static int glfwGetCocoaMonitor(@NativeType("GLFWmonitor *") long monitor) { - long __functionAddress = Functions.GetCocoaMonitor; - if (CHECKS) { - check(monitor); - } - return invokePI(monitor, __functionAddress); - } - - // --- [ glfwGetCocoaWindow ] --- - - /** - * Returns the {@code NSWindow} of the specified GLFW window. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param window the GLFW window - * - * @return the {@code NSWindow} of the specified window, or nil if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("id") - public static long glfwGetCocoaWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetCocoaWindow; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeEGL.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeEGL.java deleted file mode 100644 index 85aa0cdd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeEGL.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -import javax.annotation.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the GLFW library's EGL native access functions. */ -public class GLFWNativeEGL { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetEGLDisplay = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetEGLDisplay"), - GetEGLContext = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetEGLContext"), - GetEGLSurface = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetEGLSurface"), - GetEGLConfig = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetEGLConfig"); - - } - - protected GLFWNativeEGL() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetEGLDisplay ] --- - - /** - * Returns the {@code EGLDisplay} used by GLFW. - * - *

    Because EGL is initialized on demand, this function will return {@link EGL10#EGL_NO_DISPLAY} until the first context has been created via EGL.

    - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @return the {@code EGLDisplay} used by GLFW, or {@link EGL10#EGL_NO_DISPLAY} if an error occured. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("EGLDisplay") - public static long glfwGetEGLDisplay() { - long __functionAddress = Functions.GetEGLDisplay; - return invokeP(__functionAddress); - } - - // --- [ glfwGetEGLContext ] --- - - /** - * Returns the {@code EGLContext} of the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window a GLFW window - * - * @return the {@code EGLContext} of the specified window, or {@link EGL10#EGL_NO_CONTEXT} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("EGLContext") - public static long glfwGetEGLContext(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetEGLContext; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - // --- [ glfwGetEGLSurface ] --- - - /** - * Returns the {@code EGLSurface} of the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @return the {@code EGLSurface} of the specified window, or {@link EGL10#EGL_NO_SURFACE} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("EGLSurface") - public static long glfwGetEGLSurface(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetEGLSurface; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - // --- [ glfwGetEGLConfig ] --- - - /** - * Returns the {@code EGLConfig} of the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @return the {@code EGLConfig} of the specified window, or {@link EGL10#EGL_NO_SURFACE} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.4 - */ - @NativeType("EGLConfig") - public static long glfwGetEGLConfig(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetEGLConfig; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - /** - * Calls {@link #setEGLPath(String)} with the path of the specified {@link SharedLibrary}. - * - *

    Example usage: GLFWNativeEGL.setEGLPath(EGL.getFunctionProvider());

    - * - * @param sharedLibrary a {@code FunctionProvider} instance that will be cast to {@code SharedLibrary} - */ - public static void setEGLPath(FunctionProvider sharedLibrary) { - if (!(sharedLibrary instanceof SharedLibrary)) { - apiLog("GLFW EGL path override not set: Function provider is not a shared library."); - return; - } - - String path = ((SharedLibrary)sharedLibrary).getPath(); - if (path == null) { - apiLog("GLFW EGL path override not set: Could not resolve the shared library path."); - return; - - } - - setEGLPath(path); - } - - /** - * Overrides the EGL shared library that GLFW loads internally. - * - *

    This is useful when there's a mismatch between the shared libraries loaded by LWJGL and GLFW.

    - * - *

    This method must be called before GLFW initializes EGL. The override is available only in the default GLFW build bundled with LWJGL. Using the - * override with a custom GLFW build will produce a warning in {@code DEBUG} mode (but not an error).

    - * - * @param path the EGL shared library path, or {@code null} to remove the override. - */ - public static void setEGLPath(@Nullable String path) { - if (!override("_glfw_egl_library", path)) { - apiLog("GLFW EGL path override not set: Could not resolve override symbol."); - } - } - - /** - * Calls {@link #setGLESPath(String)} with the path of the specified {@link SharedLibrary}. - * - *

    Example usage: GLFWNativeEGL.setGLESPath(GLES.getFunctionProvider());

    - * - * @param sharedLibrary a {@code FunctionProvider} instance that will be cast to {@code SharedLibrary} - */ - public static void setGLESPath(FunctionProvider sharedLibrary) { - if (!(sharedLibrary instanceof SharedLibrary)) { - apiLog("GLFW OpenGL ES path override not set: Function provider is not a shared library."); - return; - } - - String path = ((SharedLibrary)sharedLibrary).getPath(); - if (path == null) { - apiLog("GLFW OpenGL ES path override not set: Could not resolve the shared library path."); - return; - - } - - setGLESPath(path); - } - - /** - * Overrides the OpenGL ES shared library that GLFW loads internally. - * - *

    This is useful when there's a mismatch between the shared libraries loaded by LWJGL and GLFW.

    - * - *

    This method must be called before GLFW initializes OpenGL ES. The override is available only in the default GLFW build bundled with LWJGL. Using the - * override with a custom GLFW build will produce a warning in {@code DEBUG} mode (but not an error).

    - * - * @param path the OpenGL ES shared library path, or {@code null} to remove the override. - */ - public static void setGLESPath(@Nullable String path) { - if (!override("_glfw_opengles_library", path)) { - apiLog("GLFW OpenGL ES path override not set: Could not resolve override symbol."); - } - } - - private static boolean override(String symbol, @Nullable String path) { - long override = GLFW.getLibrary().getFunctionAddress(symbol); - if (override == NULL) { - return false; - } - - long a = memGetAddress(override); - if (a != NULL) { - nmemFree(a); - } - memPutAddress(override, path == null ? NULL : memAddress(memUTF8(path))); - return true; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeGLX.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeGLX.java deleted file mode 100644 index d8155fbe..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeGLX.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -import javax.annotation.*; -import org.lwjgl.opengl.GL; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the GLFW library's GLX native access functions. */ -public class GLFWNativeGLX { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetGLXContext = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetGLXContext"), - GetGLXWindow = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetGLXWindow"), - GetGLXFBConfig = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetGLXFBConfig"); - - } - - protected GLFWNativeGLX() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetGLXContext ] --- - - /** - * Returns the {@code GLXContext} of the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window a GLFW window - * - * @return the {@code GLXContext} of the specified window, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("GLXContext") - public static long glfwGetGLXContext(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetGLXContext; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - // --- [ glfwGetGLXWindow ] --- - - /** - * Returns the {@code GLXWindow} of the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window a GLFW window - * - * @return the {@code GLXWindow} of the specified window, or {@code None} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.2 - */ - @NativeType("GLXWindow") - public static long glfwGetGLXWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetGLXWindow; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - // --- [ glfwGetGLXFBConfig ] --- - - /** - * Returns the {@code GLXFBConfig} that was chosen to create the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window a GLFW window - * - * @return the {@code GLXFBConfig} that was chosen to create the specified window, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.4 - */ - @NativeType("GLXWindow") - public static long glfwGetGLXFBConfig(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetGLXFBConfig; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - /** - * Calls {@link #setPath(String)} with the path of the specified {@link SharedLibrary}. - * - *

    Example usage: GLFWNativeGLX.setPath(GL.getFunctionProvider());

    - * - * @param sharedLibrary a {@code FunctionProvider} instance that will be cast to {@code SharedLibrary} - */ - public static void setPath(FunctionProvider sharedLibrary) { - if (!(sharedLibrary instanceof SharedLibrary)) { - apiLog("GLFW OpenGL path override not set: Function provider is not a shared library."); - return; - } - - String path = ((SharedLibrary)sharedLibrary).getPath(); - if (path == null) { - apiLog("GLFW OpenGL path override not set: Could not resolve the shared library path."); - return; - - } - - setPath(path); - } - - /** - * Overrides the OpenGL shared library that GLFW loads internally. - * - *

    This is useful when there's a mismatch between the shared libraries loaded by LWJGL and GLFW.

    - * - *

    This method must be called before GLFW initializes OpenGL. The override is available only in the default GLFW build bundled with LWJGL. Using the - * override with a custom GLFW build will produce a warning in {@code DEBUG} mode (but not an error).

    - * - * @param path the OpenGL shared library path, or {@code null} to remove the override. - */ - public static void setPath(@Nullable String path) { - long override = GLFW.getLibrary().getFunctionAddress("_glfw_opengl_library"); - if (override == NULL) { - apiLog("GLFW OpenGL path override not set: Could not resolve override symbol."); - return; - } - - long a = memGetAddress(override); - if (a != NULL) { - nmemFree(a); - } - memPutAddress(override, path == null ? NULL : memAddress(memUTF8(path))); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeNSGL.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeNSGL.java deleted file mode 100644 index 1299eb80..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeNSGL.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -import javax.annotation.*; -import org.lwjgl.opengl.GL; -import org.lwjgl.system.macosx.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the GLFW library's NSGL native access functions. */ -public class GLFWNativeNSGL { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetNSGLContext = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetNSGLContext"); - - } - - protected GLFWNativeNSGL() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetNSGLContext ] --- - - /** - * Returns the {@code NSOpenGLContext} of the specified GLFW window. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param window the GLFW window - * - * @return the {@code NSOpenGLContext} of the specified window, or nil if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("id") - public static long glfwGetNSGLContext(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetNSGLContext; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeOSMesa.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeOSMesa.java deleted file mode 100644 index b29d7973..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeOSMesa.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -import javax.annotation.*; -import org.lwjgl.opengl.GL; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the GLFW library's GLX native access functions. */ -public class GLFWNativeOSMesa { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetOSMesaColorBuffer = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetOSMesaColorBuffer"), - GetOSMesaDepthBuffer = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetOSMesaDepthBuffer"), - GetOSMesaContext = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetOSMesaContext"); - - } - - protected GLFWNativeOSMesa() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetOSMesaColorBuffer ] --- - - /** Unsafe version of: {@link #glfwGetOSMesaColorBuffer GetOSMesaColorBuffer} */ - public static int nglfwGetOSMesaColorBuffer(long window, long width, long height, long format, long buffer) { - long __functionAddress = Functions.GetOSMesaColorBuffer; - if (CHECKS) { - check(window); - } - return invokePPPPPI(window, width, height, format, buffer, __functionAddress); - } - - /** - * Retrieves the color buffer associated with the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window the window whose color buffer to retrieve - * @param width where to store the width of the color buffer, or {@code NULL} - * @param height where to store the height of the color buffer, or {@code NULL} - * @param format where to store the OSMesa pixel format of the color buffer, or {@code NULL} - * @param buffer where to store the address of the color buffer, or {@code NULL} - * - * @return {@link GLFW#GLFW_TRUE TRUE} if successful, or {@link GLFW#GLFW_FALSE FALSE} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.3 - */ - @NativeType("int") - public static boolean glfwGetOSMesaColorBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer format, @Nullable @NativeType("void **") PointerBuffer buffer) { - if (CHECKS) { - checkSafe(width, 1); - checkSafe(height, 1); - checkSafe(format, 1); - checkSafe(buffer, 1); - } - return nglfwGetOSMesaColorBuffer(window, memAddressSafe(width), memAddressSafe(height), memAddressSafe(format), memAddressSafe(buffer)) != 0; - } - - // --- [ glfwGetOSMesaDepthBuffer ] --- - - /** Unsafe version of: {@link #glfwGetOSMesaDepthBuffer GetOSMesaDepthBuffer} */ - public static int nglfwGetOSMesaDepthBuffer(long window, long width, long height, long bytesPerValue, long buffer) { - long __functionAddress = Functions.GetOSMesaDepthBuffer; - if (CHECKS) { - check(window); - } - return invokePPPPPI(window, width, height, bytesPerValue, buffer, __functionAddress); - } - - /** - * Retrieves the depth buffer associated with the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window the window whose depth buffer to retrieve - * @param width where to store the width of the depth buffer, or {@code NULL} - * @param height where to store the height of the depth buffer, or {@code NULL} - * @param bytesPerValue where to store the number of bytes per depth buffer element, or {@code NULL} - * @param buffer where to store the address of the depth buffer, or {@code NULL} - * - * @return {@link GLFW#GLFW_TRUE TRUE} if successful, or {@link GLFW#GLFW_FALSE FALSE} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.3 - */ - public static int glfwGetOSMesaDepthBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") IntBuffer width, @Nullable @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer bytesPerValue, @Nullable @NativeType("void **") PointerBuffer buffer) { - if (CHECKS) { - checkSafe(width, 1); - checkSafe(height, 1); - checkSafe(bytesPerValue, 1); - checkSafe(buffer, 1); - } - return nglfwGetOSMesaDepthBuffer(window, memAddressSafe(width), memAddressSafe(height), memAddressSafe(bytesPerValue), memAddressSafe(buffer)); - } - - // --- [ glfwGetOSMesaContext ] --- - - /** - * Returns the {@code OSMesaContext} of the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @param window the window whose context to retrieve - * - * @return the {@code OSMesaContext} of the specified window, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.3 - */ - @NativeType("OSMesaContext") - public static long glfwGetOSMesaContext(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetOSMesaContext; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - /** Array version of: {@link #glfwGetOSMesaColorBuffer GetOSMesaColorBuffer} */ - @NativeType("int") - public static boolean glfwGetOSMesaColorBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] format, @Nullable @NativeType("void **") PointerBuffer buffer) { - long __functionAddress = Functions.GetOSMesaColorBuffer; - if (CHECKS) { - check(window); - checkSafe(width, 1); - checkSafe(height, 1); - checkSafe(format, 1); - checkSafe(buffer, 1); - } - return invokePPPPPI(window, width, height, format, memAddressSafe(buffer), __functionAddress) != 0; - } - - /** Array version of: {@link #glfwGetOSMesaDepthBuffer GetOSMesaDepthBuffer} */ - public static int glfwGetOSMesaDepthBuffer(@NativeType("GLFWwindow *") long window, @Nullable @NativeType("int *") int[] width, @Nullable @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] bytesPerValue, @Nullable @NativeType("void **") PointerBuffer buffer) { - long __functionAddress = Functions.GetOSMesaDepthBuffer; - if (CHECKS) { - check(window); - checkSafe(width, 1); - checkSafe(height, 1); - checkSafe(bytesPerValue, 1); - checkSafe(buffer, 1); - } - return invokePPPPPI(window, width, height, bytesPerValue, memAddressSafe(buffer), __functionAddress); - } - - /** - * Calls {@link #setPath(String)} with the path of the specified {@link SharedLibrary}. - * - *

    Example usage: GLFWNativeOSMesa.setPath(GL.getFunctionProvider());

    - * - * @param sharedLibrary a {@code FunctionProvider} instance that will be cast to {@code SharedLibrary} - */ - public static void setPath(FunctionProvider sharedLibrary) { - if (!(sharedLibrary instanceof SharedLibrary)) { - apiLog("GLFW OSMesa path override not set: Function provider is not a shared library."); - return; - } - - String path = ((SharedLibrary)sharedLibrary).getPath(); - if (path == null) { - apiLog("GLFW OSMesa path override not set: Could not resolve the OSMesa shared library path."); - return; - } - - setPath(path); - } - - /** - * Overrides the OSMesa shared library that GLFW loads internally. - * - *

    This is useful when there's a mismatch between the shared libraries loaded by LWJGL and GLFW.

    - * - *

    This method must be called before GLFW initializes OpenGL. The override is available only in the default GLFW build bundled with LWJGL. Using the - * override with a custom GLFW build will produce a warning in {@code DEBUG} mode (but not an error).

    - * - * @param path the OSMesa shared library path, or {@code null} to remove the override. - */ - public static void setPath(@Nullable String path) { - long override = GLFW.getLibrary().getFunctionAddress("_glfw_mesa_library"); - if (override == NULL) { - apiLog("GLFW OSMesa path override not set: Could not resolve override symbol."); - return; - } - - long a = memGetAddress(override); - if (a != NULL) { - nmemFree(a); - } - memPutAddress(override, path == null ? NULL : memAddress(memUTF8(path))); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWGL.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWGL.java deleted file mode 100644 index 5ce2e750..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWGL.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -import javax.annotation.*; -import org.lwjgl.opengl.GL; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the GLFW library's WGL native access functions. */ -public class GLFWNativeWGL { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetWGLContext = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetWGLContext"); - - } - - protected GLFWNativeWGL() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetWGLContext ] --- - - /** - * Returns the {@code HGLRC} of the specified window. - * - *

    The {@code HDC} associated with the window can be queried with the - * GetDC function. - * - * HDC dc = GetDC(glfwGetWin32Window(window)); - * This DC is private and does not need to be released.

    - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param window the GLFW window - * - * @return the {@code HGLRC} of the specified window, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NO_WINDOW_CONTEXT NO_WINDOW_CONTEXT} and {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("HGLRC") - public static long glfwGetWGLContext(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetWGLContext; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - /** - * Calls {@link #setPath(String)} with the path of the specified {@link SharedLibrary}. - * - *

    Example usage: GLFWNativeWGL.setPath(GL.getFunctionProvider());

    - * - * @param sharedLibrary a {@code FunctionProvider} instance that will be cast to {@code SharedLibrary} - */ - public static void setPath(FunctionProvider sharedLibrary) { - if (!(sharedLibrary instanceof SharedLibrary)) { - apiLog("GLFW OpenGL path override not set: Function provider is not a shared library."); - return; - } - - String path = ((SharedLibrary)sharedLibrary).getPath(); - if (path == null) { - apiLog("GLFW OpenGL path override not set: Could not resolve the shared library path."); - return; - } - - setPath(path); - } - - /** - * Overrides the OpenGL shared library that GLFW loads internally. - * - *

    This is useful when there's a mismatch between the shared libraries loaded by LWJGL and GLFW.

    - * - *

    This method must be called before GLFW initializes OpenGL. The override is available only in the default GLFW build bundled with LWJGL. Using the - * override with a custom GLFW build will produce a warning in {@code DEBUG} mode (but not an error).

    - * - * @param path the OpenGL shared library path, or {@code null} to remove the override. - */ - public static void setPath(@Nullable String path) { - long override = GLFW.getLibrary().getFunctionAddress("_glfw_opengl_library"); - if (override == NULL) { - apiLog("GLFW OpenGL path override not set: Could not resolve override symbol."); - return; - } - - long a = memGetAddress(override); - if (a != NULL) { - nmemFree(a); - } - memPutAddress(override, path == null ? NULL : memAddress(memUTF16(path))); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWayland.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWayland.java deleted file mode 100644 index 99f4d013..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWayland.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** Native bindings to the GLFW library's Wayland native access functions. */ -public class GLFWNativeWayland { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetWaylandDisplay = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetWaylandDisplay"), - GetWaylandMonitor = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetWaylandMonitor"), - GetWaylandWindow = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetWaylandWindow"); - - } - - protected GLFWNativeWayland() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetWaylandDisplay ] --- - - /** - * Returns the {@code struct wl_display*} used by GLFW. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @return the {@code struct wl_display*} used by GLFW, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.2 - */ - @NativeType("struct wl_display *") - public static long glfwGetWaylandDisplay() { - long __functionAddress = Functions.GetWaylandDisplay; - return invokeP(__functionAddress); - } - - // --- [ glfwGetWaylandMonitor ] --- - - /** - * Returns the {@code struct wl_output*} of the specified monitor. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @return the {@code struct wl_output*} of the specified monitor, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.2 - */ - @NativeType("struct wl_output *") - public static long glfwGetWaylandMonitor(@NativeType("GLFWmonitor *") long monitor) { - long __functionAddress = Functions.GetWaylandMonitor; - if (CHECKS) { - check(monitor); - } - return invokePP(monitor, __functionAddress); - } - - // --- [ glfwGetWaylandWindow ] --- - - /** - * Returns the main {@code struct wl_surface*} of the specified window. - * - *

    This function may be called from any thread. Access is not synchronized.

    - * - * @return the main {@code struct wl_surface*} of the specified window, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.2 - */ - @NativeType("struct wl_surface *") - public static long glfwGetWaylandWindow(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetWaylandWindow; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWin32.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWin32.java deleted file mode 100644 index 1b74c968..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeWin32.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the GLFW library's Win32 native access functions. */ -public class GLFWNativeWin32 { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetWin32Adapter = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetWin32Adapter"), - GetWin32Monitor = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetWin32Monitor"), - GetWin32Window = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetWin32Window"), - AttachWin32Window = apiGetFunctionAddress(GLFW.getLibrary(), "glfwAttachWin32Window"); - - } - - protected GLFWNativeWin32() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetWin32Adapter ] --- - - /** Unsafe version of: {@link #glfwGetWin32Adapter GetWin32Adapter} */ - public static long nglfwGetWin32Adapter(long monitor) { - long __functionAddress = Functions.GetWin32Adapter; - if (CHECKS) { - check(monitor); - } - return invokePP(monitor, __functionAddress); - } - - /** - * Returns the adapter device name of the specified monitor. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param monitor the GLFW monitor - * - * @return the UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`) of the specified monitor, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.1 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetWin32Adapter(@NativeType("GLFWmonitor *") long monitor) { - long __result = nglfwGetWin32Adapter(monitor); - return memUTF8Safe(__result); - } - - // --- [ glfwGetWin32Monitor ] --- - - /** Unsafe version of: {@link #glfwGetWin32Monitor GetWin32Monitor} */ - public static long nglfwGetWin32Monitor(long monitor) { - long __functionAddress = Functions.GetWin32Monitor; - if (CHECKS) { - check(monitor); - } - return invokePP(monitor, __functionAddress); - } - - /** - * Returns the display device name of the specified monitor. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param monitor the GLFW monitor - * - * @return the UTF-8 encoded display device name (for example `\\.\DISPLAY1\Monitor0`) of the specified monitor, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.1 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetWin32Monitor(@NativeType("GLFWmonitor *") long monitor) { - long __result = nglfwGetWin32Monitor(monitor); - return memUTF8Safe(__result); - } - - // --- [ glfwGetWin32Window ] --- - - /** - * Returns the {@code HWND} of the specified window. - * - *

    The {@code HDC} associated with the window can be queried with the - * GetDC function. - * - * HDC dc = GetDC(glfwGetWin32Window(window)); - * This DC is private and does not need to be released.

    - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param window the GLFW window - * - * @return the {@code HWND} of the specified window, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("HWND") - public static long glfwGetWin32Window(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetWin32Window; - if (CHECKS) { - check(window); - } - return invokePP(window, __functionAddress); - } - - // --- [ glfwAttachWin32Window ] --- - - /** - * Wraps an existing {@code HWND} in a new GLFW window object. - * - *

    This function creates a GLFW window object and its associated OpenGL or OpenGL ES context for an existing {@code HWND}. The {@code HWND} is not - * destroyed by GLFW.

    - * - *

    This function may be called from any thread.

    - * - *

    LWJGL: This functionality is experimental and not officially supported by GLFW yet.

    - * - * @param handle the {@code HWND} to attach to the window object - * @param share the window whose context to share resources with, or {@code NULL} to not share resources - * - * @return the handle of the created window, or {@code NULL} if an error occurred - * - * @since version 3.3 - */ - @NativeType("GLFWwindow *") - public static long glfwAttachWin32Window(@NativeType("HWND") long handle, @NativeType("GLFWwindow *") long share) { - long __functionAddress = Functions.AttachWin32Window; - if (CHECKS) { - check(handle); - } - return invokePPP(handle, share, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeX11.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeX11.java deleted file mode 100644 index b838271e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWNativeX11.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the GLFW library's X11 native access functions. */ -public class GLFWNativeX11 { - - /** Contains the function pointers loaded from {@code GLFW.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetX11Display = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetX11Display"), - GetX11Adapter = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetX11Adapter"), - GetX11Monitor = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetX11Monitor"), - GetX11Window = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetX11Window"), - SetX11SelectionString = apiGetFunctionAddress(GLFW.getLibrary(), "glfwSetX11SelectionString"), - GetX11SelectionString = apiGetFunctionAddress(GLFW.getLibrary(), "glfwGetX11SelectionString"); - - } - - protected GLFWNativeX11() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwGetX11Display ] --- - - /** - * Returns the {@code Display} used by GLFW. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @return the {@code Display} used by GLFW, or {@code NULL} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("Display *") - public static long glfwGetX11Display() { - long __functionAddress = Functions.GetX11Display; - return invokeP(__functionAddress); - } - - // --- [ glfwGetX11Adapter ] --- - - /** - * Returns the {@code RRCrtc} of the specified monitor. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param monitor the GLFW monitor - * - * @return the {@code RRCrtc} of the specified monitor, or {@code None} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.1 - */ - @NativeType("RRCrtc") - public static long glfwGetX11Adapter(@NativeType("GLFWmonitor *") long monitor) { - long __functionAddress = Functions.GetX11Adapter; - if (CHECKS) { - check(monitor); - } - return invokePN(monitor, __functionAddress); - } - - // --- [ glfwGetX11Monitor ] --- - - /** - * Returns the {@code RROutput} of the specified monitor. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param monitor the GLFW monitor - * - * @return the {@code RROutput} of the specified monitor, or {@code None} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.1 - */ - @NativeType("RROutput") - public static long glfwGetX11Monitor(@NativeType("GLFWmonitor *") long monitor) { - long __functionAddress = Functions.GetX11Monitor; - if (CHECKS) { - check(monitor); - } - return invokePN(monitor, __functionAddress); - } - - // --- [ glfwGetX11Window ] --- - - /** - * Returns the {@code Window} of the specified window. - * - *

    Note: This function may be called from any thread. Access is not synchronized.

    - * - * @param window a GLFW window - * - * @return the {@code Window} of the specified window, or {@code None} if an error occurred. - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - * @since version 3.0 - */ - @NativeType("Window") - public static long glfwGetX11Window(@NativeType("GLFWwindow *") long window) { - long __functionAddress = Functions.GetX11Window; - if (CHECKS) { - check(window); - } - return invokePN(window, __functionAddress); - } - - // --- [ glfwSetX11SelectionString ] --- - - /** Unsafe version of: {@link #glfwSetX11SelectionString SetX11SelectionString} */ - public static void nglfwSetX11SelectionString(long string) { - long __functionAddress = Functions.SetX11SelectionString; - invokePV(string, __functionAddress); - } - - /** - * Sets the current primary selection to the specified string. - * - *

    This function must only be called from the main thread.

    - * - * @param string a UTF-8 encoded string. The specified string is copied before this function returns. - * - * @since version 3.3 - */ - public static void glfwSetX11SelectionString(@NativeType("char const *") ByteBuffer string) { - if (CHECKS) { - checkNT1(string); - } - nglfwSetX11SelectionString(memAddress(string)); - } - - /** - * Sets the current primary selection to the specified string. - * - *

    This function must only be called from the main thread.

    - * - * @param string a UTF-8 encoded string. The specified string is copied before this function returns. - * - * @since version 3.3 - */ - public static void glfwSetX11SelectionString(@NativeType("char const *") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(string, true); - long stringEncoded = stack.getPointerAddress(); - nglfwSetX11SelectionString(stringEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glfwGetX11SelectionString ] --- - - /** Unsafe version of: {@link #glfwGetX11SelectionString GetX11SelectionString} */ - public static long nglfwGetX11SelectionString() { - long __functionAddress = Functions.GetX11SelectionString; - return invokeP(__functionAddress); - } - - /** - * Returns the contents of the current primary selection as a string. - * - *

    If the selection is empty or if its contents cannot be converted, {@code NULL} is returned and a {@link GLFW#GLFW_FORMAT_UNAVAILABLE FORMAT_UNAVAILABLE} error is generated.

    - * - *

    The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to {@link #glfwGetX11SelectionString GetX11SelectionString} or - * {@link #glfwSetX11SelectionString SetX11SelectionString}, or until the library is terminated.

    - * - *

    This function must only be called from the main thread.

    - * - * @return the contents of the selection as a UTF-8 encoded string, or {@code NULL} if an error occurred - * - * @since version 3.3 - */ - @Nullable - @NativeType("char const *") - public static String glfwGetX11SelectionString() { - long __result = nglfwGetX11SelectionString(); - return memUTF8Safe(__result); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWReallocateCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWReallocateCallback.java deleted file mode 100644 index 3a839c43..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWReallocateCallback.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The function pointer type for memory reallocation callbacks. - * - *

    This is the function pointer type for memory reallocation callbacks. A memory reallocation callback function has the following signature:

    - * - *
    
    - * void* function_name(void* block, size_t size, void* user)            
    - * - *

    This function must return a memory block at least {@code size} bytes long, or {@code NULL} if allocation failed. Note that not all parts of GLFW handle - * allocation failures gracefully yet.

    - * - *

    This function may be called during {@link GLFW#glfwInit Init} but before the library is flagged as initialized, as well as during {@link GLFW#glfwTerminate Terminate} after the library is no - * longer flagged as initialized.

    - * - *

    Any memory allocated by this function will be deallocated during library termination or earlier.

    - * - *

    The block address will never be {@code NULL} and the size will always be greater than zero. Reallocations of a block to size zero are converted into - * deallocations. Reallocations of {@code NULL} to a non-zero size are converted into regular allocations.

    - * - *
    Note
    - * - *
      - *
    • The returned memory block must be valid at least until it is deallocated.
    • - *
    • This function should not call any GLFW function.
    • - *
    • This function may be called from any thread that calls GLFW functions.
    • - *
    - * - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     void *block,
    - *     size_t size,
    - *     void *user
    - * )
    - * - * @since version 3.4 - */ -public abstract class GLFWReallocateCallback extends Callback implements GLFWReallocateCallbackI { - - /** - * Creates a {@code GLFWReallocateCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWReallocateCallback} - */ - public static GLFWReallocateCallback create(long functionPointer) { - GLFWReallocateCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWReallocateCallback - ? (GLFWReallocateCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWReallocateCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWReallocateCallback} instance that delegates to the specified {@code GLFWReallocateCallbackI} instance. */ - public static GLFWReallocateCallback create(GLFWReallocateCallbackI instance) { - return instance instanceof GLFWReallocateCallback - ? (GLFWReallocateCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWReallocateCallback() { - super(CIF); - } - - GLFWReallocateCallback(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends GLFWReallocateCallback { - - private final GLFWReallocateCallbackI delegate; - - Container(long functionPointer, GLFWReallocateCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long block, long size, long user) { - return delegate.invoke(block, size, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWReallocateCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWReallocateCallbackI.java deleted file mode 100644 index fc9e07e7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWReallocateCallbackI.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * The function pointer type for memory reallocation callbacks. - * - *

    This is the function pointer type for memory reallocation callbacks. A memory reallocation callback function has the following signature:

    - * - *
    
    - * void* function_name(void* block, size_t size, void* user)            
    - * - *

    This function must return a memory block at least {@code size} bytes long, or {@code NULL} if allocation failed. Note that not all parts of GLFW handle - * allocation failures gracefully yet.

    - * - *

    This function may be called during {@link GLFW#glfwInit Init} but before the library is flagged as initialized, as well as during {@link GLFW#glfwTerminate Terminate} after the library is no - * longer flagged as initialized.

    - * - *

    Any memory allocated by this function will be deallocated during library termination or earlier.

    - * - *

    The block address will never be {@code NULL} and the size will always be greater than zero. Reallocations of a block to size zero are converted into - * deallocations. Reallocations of {@code NULL} to a non-zero size are converted into regular allocations.

    - * - *
    Note
    - * - *
      - *
    • The returned memory block must be valid at least until it is deallocated.
    • - *
    • This function should not call any GLFW function.
    • - *
    • This function may be called from any thread that calls GLFW functions.
    • - *
    - * - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     void *block,
    - *     size_t size,
    - *     void *user
    - * )
    - * - * @since version 3.4 - */ -@FunctionalInterface -@NativeType("GLFWreallocatefun") -public interface GLFWReallocateCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** - * Will be called for memory reallocation requests. - * - * @param block the address of the memory block to reallocate - * @param size the new minimum size, in bytes, of the memory block - * @param user the user-defined pointer from the allocator - * - * @return the address of the newly allocated or resized memory block, or {@code NULL} if an error occurred - */ - @NativeType("void *") long invoke(@NativeType("void *") long block, @NativeType("size_t") long size, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWScrollCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWScrollCallback.java deleted file mode 100644 index ec3a3ff9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWScrollCallback.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetScrollCallback SetScrollCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     double xoffset,
    - *     double yoffset
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWScrollCallback extends Callback implements GLFWScrollCallbackI { - - /** - * Creates a {@code GLFWScrollCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWScrollCallback} - */ - public static GLFWScrollCallback create(long functionPointer) { - GLFWScrollCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWScrollCallback - ? (GLFWScrollCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWScrollCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWScrollCallback} instance that delegates to the specified {@code GLFWScrollCallbackI} instance. */ - public static GLFWScrollCallback create(GLFWScrollCallbackI instance) { - return instance instanceof GLFWScrollCallback - ? (GLFWScrollCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWScrollCallback() { - super(CIF); - } - - GLFWScrollCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetScrollCallback SetScrollCallback}. */ - public GLFWScrollCallback set(long window) { - glfwSetScrollCallback(window, this); - return this; - } - - private static final class Container extends GLFWScrollCallback { - - private final GLFWScrollCallbackI delegate; - - Container(long functionPointer, GLFWScrollCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, double xoffset, double yoffset) { - delegate.invoke(window, xoffset, yoffset); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWScrollCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWScrollCallbackI.java deleted file mode 100644 index 3f0f0914..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWScrollCallbackI.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetScrollCallback SetScrollCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     double xoffset,
    - *     double yoffset
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWscrollfun") -public interface GLFWScrollCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_double, ffi_type_double - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetDouble(memGetAddress(args + POINTER_SIZE)), - memGetDouble(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad. - * - * @param window the window that received the event - * @param xoffset the scroll offset along the x-axis - * @param yoffset the scroll offset along the y-axis - */ - void invoke(@NativeType("GLFWwindow *") long window, double xoffset, double yoffset); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWVidMode.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWVidMode.java deleted file mode 100644 index c0745ac5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWVidMode.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Describes a single video mode. - * - *

    Layout

    - * - *
    
    - * struct GLFWvidmode {
    - *     int {@link #width};
    - *     int {@link #height};
    - *     int {@link #redBits};
    - *     int {@link #greenBits};
    - *     int {@link #blueBits};
    - *     int {@link #refreshRate};
    - * }
    - */ -@NativeType("struct GLFWvidmode") -public class GLFWVidMode extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT, - REDBITS, - GREENBITS, - BLUEBITS, - REFRESHRATE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - REDBITS = layout.offsetof(2); - GREENBITS = layout.offsetof(3); - BLUEBITS = layout.offsetof(4); - REFRESHRATE = layout.offsetof(5); - } - - protected GLFWVidMode(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected GLFWVidMode create(long address, @Nullable ByteBuffer container) { - return new GLFWVidMode(address, container); - } - - /** - * Creates a {@code GLFWVidMode} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public GLFWVidMode(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the width, in screen coordinates, of the video mode */ - public int width() { return nwidth(address()); } - /** the height, in screen coordinates, of the video mode */ - public int height() { return nheight(address()); } - /** the bit depth of the red channel of the video mode */ - public int redBits() { return nredBits(address()); } - /** the bit depth of the green channel of the video mode */ - public int greenBits() { return ngreenBits(address()); } - /** the bit depth of the blue channel of the video mode */ - public int blueBits() { return nblueBits(address()); } - /** the refresh rate, in Hz, of the video mode */ - public int refreshRate() { return nrefreshRate(address()); } - - // ----------------------------------- - - /** Returns a new {@code GLFWVidMode} instance for the specified memory address. */ - public static GLFWVidMode create(long address) { - return new GLFWVidMode(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static GLFWVidMode createSafe(long address) { - return address == NULL ? null : new GLFWVidMode(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + GLFWVidMode.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + GLFWVidMode.HEIGHT); } - /** Unsafe version of {@link #redBits}. */ - public static int nredBits(long struct) { return UNSAFE.getInt(null, struct + GLFWVidMode.REDBITS); } - /** Unsafe version of {@link #greenBits}. */ - public static int ngreenBits(long struct) { return UNSAFE.getInt(null, struct + GLFWVidMode.GREENBITS); } - /** Unsafe version of {@link #blueBits}. */ - public static int nblueBits(long struct) { return UNSAFE.getInt(null, struct + GLFWVidMode.BLUEBITS); } - /** Unsafe version of {@link #refreshRate}. */ - public static int nrefreshRate(long struct) { return UNSAFE.getInt(null, struct + GLFWVidMode.REFRESHRATE); } - - // ----------------------------------- - - /** An array of {@link GLFWVidMode} structs. */ - public static class Buffer extends StructBuffer { - - private static final GLFWVidMode ELEMENT_FACTORY = GLFWVidMode.create(-1L); - - /** - * Creates a new {@code GLFWVidMode.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link GLFWVidMode#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected GLFWVidMode getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link GLFWVidMode#width} field. */ - public int width() { return GLFWVidMode.nwidth(address()); } - /** @return the value of the {@link GLFWVidMode#height} field. */ - public int height() { return GLFWVidMode.nheight(address()); } - /** @return the value of the {@link GLFWVidMode#redBits} field. */ - public int redBits() { return GLFWVidMode.nredBits(address()); } - /** @return the value of the {@link GLFWVidMode#greenBits} field. */ - public int greenBits() { return GLFWVidMode.ngreenBits(address()); } - /** @return the value of the {@link GLFWVidMode#blueBits} field. */ - public int blueBits() { return GLFWVidMode.nblueBits(address()); } - /** @return the value of the {@link GLFWVidMode#refreshRate} field. */ - public int refreshRate() { return GLFWVidMode.nrefreshRate(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWVulkan.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWVulkan.java deleted file mode 100644 index 889436b4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWVulkan.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.vulkan.EXTMetalSurface.VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT; -import static org.lwjgl.vulkan.EXTMetalSurface.vkCreateMetalSurfaceEXT; -import static org.lwjgl.vulkan.KHRAndroidSurface.VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; -import static org.lwjgl.vulkan.KHRAndroidSurface.vkCreateAndroidSurfaceKHR; - -import org.lwjgl.vulkan.*; - -/** Native bindings to the GLFW library's Vulkan functions. */ -public class GLFWVulkan { - - static { - if (Platform.get() == Platform.MACOSX) { - setPath(VK.getFunctionProvider()); - } - } - - protected GLFWVulkan() { - throw new UnsupportedOperationException(); - } - - // --- [ glfwInitVulkanLoader ] --- - - /** - * Sets the desired Vulkan {@code vkGetInstanceProcAddr} function. - * - *

    This function sets the {@code vkGetInstanceProcAddr} function that GLFW will use for all Vulkan related entry point queries.

    - * - *

    This feature is mostly useful on macOS, if your copy of the Vulkan loader is in a location where GLFW cannot find it through dynamic loading, or if you - * are still using the static library version of the loader.

    - * - *

    If set to {@code NULL}, GLFW will try to load the Vulkan loader dynamically by its standard name and get this function from there. This is the default - * behavior.

    - * - *

    The standard name of the loader is {@code vulkan-1.dll} on Windows, {@code libvulkan.so.1} on Linux and other Unix-like systems and - * {@code libvulkan.1.dylib} on macOS. If your code is also loading it via these names then you probably don't need to use this function.

    - * - *

    The function address you set is never reset by GLFW, but it only takes effect during initialization. Once GLFW has been initialized, any updates will - * be ignored until the library is terminated and initialized again.

    - * - *

    This function may be called before {@link GLFW#glfwInit Init}.

    - * - *

    This function must only be called from the main thread.

    - * - * @param loader the address of the function to use, or {@code NULL} - * - * @since version 3.4 - */ - public static void glfwInitVulkanLoader(@NativeType("PFN_vkGetInstanceProcAddr") long loader) { - //long __functionAddress = Functions.InitVulkanLoader; - //invokePV(loader, __functionAddress); - } - - // --- [ glfwVulkanSupported ] --- - - /** - * Returns whether the Vulkan loader has been found. This check is performed by {@link GLFW#glfwInit Init}. - * - *

    The availability of a Vulkan loader and even an ICD does not by itself guarantee that surface creation or even instance creation is possible. Call - * {@link #glfwGetRequiredInstanceExtensions GetRequiredInstanceExtensions} to check whether the extensions necessary for Vulkan surface creation are available and - * {@link #glfwGetPhysicalDevicePresentationSupport GetPhysicalDevicePresentationSupport} to check whether a queue family of a physical device supports image presentation.

    - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}.

    - * - *

    This function may be called from any thread.

    - * - * @return {@link GLFW#GLFW_TRUE TRUE} if Vulkan is available, or {@link GLFW#GLFW_FALSE FALSE} otherwise - * - * @since version 3.2 - */ - @NativeType("int") - public static boolean glfwVulkanSupported() { - //long __functionAddress = Functions.VulkanSupported; - //return invokeI(__functionAddress) != 0; - return true; - } - - // --- [ glfwGetRequiredInstanceExtensions ] --- - - /** - * Returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the list will - * always contain {@code VK_KHR_surface}, so if you don't require any additional extensions you can pass this list directly to the {@link VkInstanceCreateInfo} - * struct. - * - *

    If Vulkan is not available on the machine, this function returns {@code NULL} and generates a {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE} error. Call {@link #glfwVulkanSupported VulkanSupported} to check whether - * Vulkan is available.

    - * - *

    If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns {@code NULL}. You may still use Vulkan for - * off-screen rendering and compute work.

    - * - *

    Additional extensions may be required by future versions of GLFW. You should check if any extensions you wish to enable are already in the returned - * array, as it is an error to specify an extension more than once in the {@code VkInstanceCreateInfo} struct.

    - * - *

    The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the library is terminated.

    - * - *

    This function may be called from any thread.

    - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED} and {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE}.

    - * - * @return an array of ASCII encoded extension names, or {@code NULL} if an error occurred - * - * @since version 3.2 - */ - @Nullable - @NativeType("char const **") - public static PointerBuffer glfwGetRequiredInstanceExtensions() { - MemoryStack stack = MemoryStack.stackPush(); - String platformSurface; - if (Platform.get() == Platform.MACOSX) { - platformSurface = "VK_EXT_metal_surface"; - } else { - platformSurface = "VK_KHR_android_surface"; - } - return stack.pointers(stack.UTF8(KHRSurface.VK_KHR_SURFACE_EXTENSION_NAME), stack.UTF8(platformSurface)); - } - - /** - * Returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to {@code NULL} it can return any - * function exported from the Vulkan loader, including at least the following functions: - * - *
      - *
    • {@link VK10#vkEnumerateInstanceExtensionProperties}
    • - *
    • {@link VK10#vkEnumerateInstanceLayerProperties}
    • - *
    • {@link VK10#vkCreateInstance}
    • - *
    • {@link VK10#vkGetInstanceProcAddr}
    • - *
    - * - *

    If Vulkan is not available on the machine, this function returns {@code NULL} and generates a {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE} error. Call {@link #glfwVulkanSupported VulkanSupported} to check whether - * Vulkan is available.

    - * - *

    This function is equivalent to calling {@link VK10#vkGetInstanceProcAddr} with a platform-specific query of the Vulkan loader as a fallback.

    - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED} and {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE}.

    - * - *

    The returned function pointer is valid until the library is terminated.

    - * - *

    This function may be called from any thread.

    - * - * @param instance the Vulkan instance to query, or {@code NULL} to retrieve functions related to instance creation - * @param procname the ASCII encoded name of the function - * - * @return the address of the function, or {@code NULL} if an error occurred - * - * @since version 3.2 - */ - @NativeType("GLFWvkproc") - public static long glfwGetInstanceProcAddress(@Nullable VkInstance instance, @NativeType("char const *") ByteBuffer procname) { - if (CHECKS) { - checkNT1(procname); - } - return VK10.vkGetInstanceProcAddr(instance, procname); - } - - /** - * Returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to {@code NULL} it can return any - * function exported from the Vulkan loader, including at least the following functions: - * - *
      - *
    • {@link VK10#vkEnumerateInstanceExtensionProperties}
    • - *
    • {@link VK10#vkEnumerateInstanceLayerProperties}
    • - *
    • {@link VK10#vkCreateInstance}
    • - *
    • {@link VK10#vkGetInstanceProcAddr}
    • - *
    - * - *

    If Vulkan is not available on the machine, this function returns {@code NULL} and generates a {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE} error. Call {@link #glfwVulkanSupported VulkanSupported} to check whether - * Vulkan is available.

    - * - *

    This function is equivalent to calling {@link VK10#vkGetInstanceProcAddr} with a platform-specific query of the Vulkan loader as a fallback.

    - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED} and {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE}.

    - * - *

    The returned function pointer is valid until the library is terminated.

    - * - *

    This function may be called from any thread.

    - * - * @param instance the Vulkan instance to query, or {@code NULL} to retrieve functions related to instance creation - * @param procname the ASCII encoded name of the function - * - * @return the address of the function, or {@code NULL} if an error occurred - * - * @since version 3.2 - */ - @NativeType("GLFWvkproc") - public static long glfwGetInstanceProcAddress(@Nullable VkInstance instance, @NativeType("char const *") CharSequence procname) { - return VK10.vkGetInstanceProcAddr(instance, procname); - } - - // --- [ glfwGetPhysicalDevicePresentationSupport ] --- - - /** - * Returns whether the specified queue family of the specified physical device supports presentation to the platform GLFW was built for. - * - *

    If Vulkan or the required window surface creation instance extensions are not available on the machine, or if the specified instance was not created - * with the required extensions, this function returns {@link GLFW#GLFW_FALSE FALSE} and generates a {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE} error. Call {@link #glfwVulkanSupported VulkanSupported} to check whether Vulkan is - * available and {@link #glfwGetRequiredInstanceExtensions GetRequiredInstanceExtensions} to check what instance extensions are required.

    - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}, {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE} and {@link GLFW#GLFW_PLATFORM_ERROR PLATFORM_ERROR}.

    - * - *

    macOS: This function currently always returns {@link GLFW#GLFW_TRUE TRUE}, as the {@code VK_MVK_macos_surface} and {@code VK_EXT_metal_surface} extensions do not provide a - * {@code vkGetPhysicalDevice*PresentationSupport} type function.

    - * - *

    This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.

    - * - * @param instance the instance that the physical device belongs to - * @param device the physical device that the queue family belongs to - * @param queuefamily the index of the queue family to query - * - * @return {@link GLFW#GLFW_TRUE TRUE} if the queue family supports presentation, or {@link GLFW#GLFW_FALSE FALSE} otherwise - * - * @since version 3.2 - */ - @NativeType("int") - public static boolean glfwGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, @NativeType("uint32_t") int queuefamily) { - return true; - } - - // --- [ glfwCreateWindowSurface ] --- - - /** - * Creates a Vulkan surface for the specified window. - * - *

    If the Vulkan loader was not found at initialization, this function returns {@link VK10#VK_ERROR_INITIALIZATION_FAILED} and generates a {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE} error. - * Call {@link #glfwVulkanSupported VulkanSupported} to check whether the Vulkan loader was found.

    - * - *

    If the required window surface creation instance extensions are not available or if the specified instance was not created with these extensions - * enabled, this function returns {@link VK10#VK_ERROR_EXTENSION_NOT_PRESENT} and generates a {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE} error. Call {@link #glfwGetRequiredInstanceExtensions GetRequiredInstanceExtensions} to - * check what instance extensions are required.

    - * - *

    The window surface cannot be shared with another API so the window must have been created with the client api hint set to {@link GLFW#GLFW_NO_API NO_API} otherwise it - * generates a {@link GLFW#GLFW_INVALID_VALUE INVALID_VALUE} error and returns {@link KHRSurface#VK_ERROR_NATIVE_WINDOW_IN_USE_KHR}.

    - * - *

    The window surface must be destroyed before the specified Vulkan instance. It is the responsibility of the caller to destroy the window surface. GLFW - * does not destroy it for you. Call {@link KHRSurface#vkDestroySurfaceKHR} to destroy the surface.

    - * - *

    Possible errors include {@link GLFW#GLFW_NOT_INITIALIZED NOT_INITIALIZED}, {@link GLFW#GLFW_API_UNAVAILABLE API_UNAVAILABLE}, {@link GLFW#GLFW_PLATFORM_ERROR PLATFORM_ERROR} and {@link GLFW#GLFW_INVALID_VALUE INVALID_VALUE}.

    - * - *

    If an error occurs before the creation call is made, GLFW returns the Vulkan error code most appropriate for the error. Appropriate use of - * {@link #glfwVulkanSupported VulkanSupported} and {@code glfwGetRequiredInstanceExtensions} should eliminate almost all occurrences of these errors.

    - * - *

    Notes:

    - * - *
      - *
    • This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.
    • - *
    • macOS: GLFW prefers the {@code VK_EXT_metal_surface} extension, with the {@code VK_MVK_macos_surface} extension as a fallback. The name of - * the selected extension, if any, is included in the array returned by {@code glfwGetRequiredInstanceExtensions}.
    • - *
    • macOS: This function creates and sets a {@code CAMetalLayer} instance for the window content view, which is required for MoltenVK to - * function.
    • - *
    • x11: By default GLFW prefers the {@code VK_KHR_xcb_surface} extension, with the {@code VK_KHR_xlib_surface} extension as a fallback. You can - * make {@code VK_KHR_xlib_surface} the preferred extension by setting the {@link GLFW#GLFW_X11_XCB_VULKAN_SURFACE X11_XCB_VULKAN_SURFACE} init hint. The name of the selected extension, if - * any, is included in the array returned by {@code glfwGetRequiredInstanceExtensions}.
    • - *
    - * - * @param instance the Vulkan instance to create the surface in - * @param window the window to create the surface for - * @param allocator the allocator to use, or {@code NULL} to use the default allocator. - * @param surface where to store the handle of the surface. This is set to {@link VK10#VK_NULL_HANDLE} if an error occurred. - * - * @return {@link VK10#VK_SUCCESS} if successful, or a Vulkan error code if an error occurred - * - * @since version 3.2 - */ - @NativeType("VkResult") - public static int glfwCreateWindowSurface(VkInstance instance, @NativeType("GLFWwindow *") long window, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks allocator, @NativeType("VkSurfaceKHR *") LongBuffer surface) { - if (CHECKS) { - check(surface, 1); - } - if (Platform.get() == Platform.LINUX) { - VkAndroidSurfaceCreateInfoKHR pCreateInfo = VkAndroidSurfaceCreateInfoKHR - .calloc() - .sType(VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR) - .window(window); - return vkCreateAndroidSurfaceKHR(instance, pCreateInfo, null, surface); - } - return VK10.VK_ERROR_EXTENSION_NOT_PRESENT; - } - - /** Array version of: {@link #glfwCreateWindowSurface CreateWindowSurface} */ - @NativeType("VkResult") - public static int glfwCreateWindowSurface(VkInstance instance, @NativeType("GLFWwindow *") long window, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks allocator, @NativeType("VkSurfaceKHR *") long[] surface) { - MemoryStack stack = stackGet(); - LongBuffer pSurface = stack.mallocLong(1); - int result = glfwCreateWindowSurface(instance, window, allocator, pSurface); - surface[0] = pSurface.get(0); - return result; - } - - /** - * Calls {@link #setPath(String)} with the path of the specified {@link SharedLibrary}. - * - *

    Example usage: GLFWVulkan.setPath(VK.getFunctionProvider());

    - * - * @param sharedLibrary a {@code FunctionProvider} instance that will be cast to {@code SharedLibrary} - */ - public static void setPath(FunctionProvider sharedLibrary) { - if (!(sharedLibrary instanceof SharedLibrary)) { - apiLog("GLFW Vulkan path override not set: function provider is not a shared library."); - return; - } - - String path = ((SharedLibrary)sharedLibrary).getPath(); - if (path == null) { - apiLog("GLFW Vulkan path override not set: Could not resolve the shared library path."); - return; - } - - setPath(path); - } - - /** - * Overrides the Vulkan shared library that GLFW loads internally. - * - *

    This is useful when there's a mismatch between the shared libraries loaded by LWJGL and GLFW.

    - * - *

    This method must be called before GLFW initializes Vulkan. The override is available only in the default GLFW build bundled with LWJGL. Using the - * override with a custom GLFW build will produce a warning in {@code DEBUG} mode (but not an error).

    - * - * @param path the Vulkan shared library path, or {@code null} to remove the override. - */ - public static void setPath(@Nullable String path) { - long override = GLFW.getLibrary().getFunctionAddress("_glfw_vulkan_library"); - if (override == NULL) { - apiLog("GLFW Vulkan path override not set: Could not resolve override symbol."); - return; - } - - long a = memGetAddress(override); - if (a != NULL) { - nmemFree(a); - } - memPutAddress(override, path == null ? NULL : memAddress(memUTF8(path))); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowCloseCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowCloseCallback.java deleted file mode 100644 index 0111ca90..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowCloseCallback.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowCloseCallback SetWindowCloseCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window
    - * )
    - * - * @since version 2.5 - */ -public abstract class GLFWWindowCloseCallback extends Callback implements GLFWWindowCloseCallbackI { - - /** - * Creates a {@code GLFWWindowCloseCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowCloseCallback} - */ - public static GLFWWindowCloseCallback create(long functionPointer) { - GLFWWindowCloseCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowCloseCallback - ? (GLFWWindowCloseCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowCloseCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowCloseCallback} instance that delegates to the specified {@code GLFWWindowCloseCallbackI} instance. */ - public static GLFWWindowCloseCallback create(GLFWWindowCloseCallbackI instance) { - return instance instanceof GLFWWindowCloseCallback - ? (GLFWWindowCloseCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowCloseCallback() { - super(CIF); - } - - GLFWWindowCloseCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowCloseCallback SetWindowCloseCallback}. */ - public GLFWWindowCloseCallback set(long window) { - glfwSetWindowCloseCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowCloseCallback { - - private final GLFWWindowCloseCallbackI delegate; - - Container(long functionPointer, GLFWWindowCloseCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window) { - delegate.invoke(window); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowCloseCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowCloseCallbackI.java deleted file mode 100644 index ebf9993d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowCloseCallbackI.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowCloseCallback SetWindowCloseCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window
    - * )
    - * - * @since version 2.5 - */ -@FunctionalInterface -@NativeType("GLFWwindowclosefun") -public interface GLFWWindowCloseCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - /** - * Will be called when the user attempts to close the specified window, for example by clicking the close widget in the title bar. - * - * @param window the window that the user attempted to close - */ - void invoke(@NativeType("GLFWwindow *") long window); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowContentScaleCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowContentScaleCallback.java deleted file mode 100644 index fbc8a2da..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowContentScaleCallback.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowContentScaleCallback SetWindowContentScaleCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     float xscale,
    - *     float yscale
    - * )
    - * - * @since version 3.3 - */ -public abstract class GLFWWindowContentScaleCallback extends Callback implements GLFWWindowContentScaleCallbackI { - - /** - * Creates a {@code GLFWWindowContentScaleCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowContentScaleCallback} - */ - public static GLFWWindowContentScaleCallback create(long functionPointer) { - GLFWWindowContentScaleCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowContentScaleCallback - ? (GLFWWindowContentScaleCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowContentScaleCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowContentScaleCallback} instance that delegates to the specified {@code GLFWWindowContentScaleCallbackI} instance. */ - public static GLFWWindowContentScaleCallback create(GLFWWindowContentScaleCallbackI instance) { - return instance instanceof GLFWWindowContentScaleCallback - ? (GLFWWindowContentScaleCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowContentScaleCallback() { - super(CIF); - } - - GLFWWindowContentScaleCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowContentScaleCallback SetWindowContentScaleCallback}. */ - public GLFWWindowContentScaleCallback set(long window) { - glfwSetWindowContentScaleCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowContentScaleCallback { - - private final GLFWWindowContentScaleCallbackI delegate; - - Container(long functionPointer, GLFWWindowContentScaleCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, float xscale, float yscale) { - delegate.invoke(window, xscale, yscale); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowContentScaleCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowContentScaleCallbackI.java deleted file mode 100644 index 584bc9af..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowContentScaleCallbackI.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowContentScaleCallback SetWindowContentScaleCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     float xscale,
    - *     float yscale
    - * )
    - * - * @since version 3.3 - */ -@FunctionalInterface -@NativeType("GLFWwindowcontentscalefun") -public interface GLFWWindowContentScaleCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_float, ffi_type_float - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetFloat(memGetAddress(args + POINTER_SIZE)), - memGetFloat(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when the window content scale changes. - * - * @param window the window whose content scale changed - * @param xscale the new x-axis content scale of the window - * @param yscale the new y-axis content scale of the window - */ - void invoke(@NativeType("GLFWwindow *") long window, float xscale, float yscale); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowFocusCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowFocusCallback.java deleted file mode 100644 index 1836c8f3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowFocusCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowFocusCallback SetWindowFocusCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int focused
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWWindowFocusCallback extends Callback implements GLFWWindowFocusCallbackI { - - /** - * Creates a {@code GLFWWindowFocusCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowFocusCallback} - */ - public static GLFWWindowFocusCallback create(long functionPointer) { - GLFWWindowFocusCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowFocusCallback - ? (GLFWWindowFocusCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowFocusCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowFocusCallback} instance that delegates to the specified {@code GLFWWindowFocusCallbackI} instance. */ - public static GLFWWindowFocusCallback create(GLFWWindowFocusCallbackI instance) { - return instance instanceof GLFWWindowFocusCallback - ? (GLFWWindowFocusCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowFocusCallback() { - super(CIF); - } - - GLFWWindowFocusCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowFocusCallback SetWindowFocusCallback}. */ - public GLFWWindowFocusCallback set(long window) { - glfwSetWindowFocusCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowFocusCallback { - - private final GLFWWindowFocusCallbackI delegate; - - Container(long functionPointer, GLFWWindowFocusCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, boolean focused) { - delegate.invoke(window, focused); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowFocusCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowFocusCallbackI.java deleted file mode 100644 index 152173ae..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowFocusCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowFocusCallback SetWindowFocusCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int focused
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWwindowfocusfun") -public interface GLFWWindowFocusCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) != 0 - ); - } - - /** - * Will be called when the specified window gains or loses focus. - * - * @param window the window that was focused or defocused - * @param focused {@link GLFW#GLFW_TRUE TRUE} if the window was focused, or {@link GLFW#GLFW_FALSE FALSE} if it was defocused - */ - void invoke(@NativeType("GLFWwindow *") long window, @NativeType("int") boolean focused); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowIconifyCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowIconifyCallback.java deleted file mode 100644 index cec3accf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowIconifyCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowIconifyCallback SetWindowIconifyCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int iconified
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWWindowIconifyCallback extends Callback implements GLFWWindowIconifyCallbackI { - - /** - * Creates a {@code GLFWWindowIconifyCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowIconifyCallback} - */ - public static GLFWWindowIconifyCallback create(long functionPointer) { - GLFWWindowIconifyCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowIconifyCallback - ? (GLFWWindowIconifyCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowIconifyCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowIconifyCallback} instance that delegates to the specified {@code GLFWWindowIconifyCallbackI} instance. */ - public static GLFWWindowIconifyCallback create(GLFWWindowIconifyCallbackI instance) { - return instance instanceof GLFWWindowIconifyCallback - ? (GLFWWindowIconifyCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowIconifyCallback() { - super(CIF); - } - - GLFWWindowIconifyCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowIconifyCallback SetWindowIconifyCallback}. */ - public GLFWWindowIconifyCallback set(long window) { - glfwSetWindowIconifyCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowIconifyCallback { - - private final GLFWWindowIconifyCallbackI delegate; - - Container(long functionPointer, GLFWWindowIconifyCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, boolean iconified) { - delegate.invoke(window, iconified); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowIconifyCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowIconifyCallbackI.java deleted file mode 100644 index a73de492..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowIconifyCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowIconifyCallback SetWindowIconifyCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int iconified
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWwindowiconifyfun") -public interface GLFWWindowIconifyCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) != 0 - ); - } - - /** - * Will be called when the specified window is iconified or restored. - * - * @param window the window that was iconified or restored. - * @param iconified {@link GLFW#GLFW_TRUE TRUE} if the window was iconified, or {@link GLFW#GLFW_FALSE FALSE} if it was restored - */ - void invoke(@NativeType("GLFWwindow *") long window, @NativeType("int") boolean iconified); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowMaximizeCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowMaximizeCallback.java deleted file mode 100644 index 25942693..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowMaximizeCallback.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowMaximizeCallback SetWindowMaximizeCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int maximized
    - * )
    - * - * @since version 3.3 - */ -public abstract class GLFWWindowMaximizeCallback extends Callback implements GLFWWindowMaximizeCallbackI { - - /** - * Creates a {@code GLFWWindowMaximizeCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowMaximizeCallback} - */ - public static GLFWWindowMaximizeCallback create(long functionPointer) { - GLFWWindowMaximizeCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowMaximizeCallback - ? (GLFWWindowMaximizeCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowMaximizeCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowMaximizeCallback} instance that delegates to the specified {@code GLFWWindowMaximizeCallbackI} instance. */ - public static GLFWWindowMaximizeCallback create(GLFWWindowMaximizeCallbackI instance) { - return instance instanceof GLFWWindowMaximizeCallback - ? (GLFWWindowMaximizeCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowMaximizeCallback() { - super(CIF); - } - - GLFWWindowMaximizeCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowMaximizeCallback SetWindowMaximizeCallback}. */ - public GLFWWindowMaximizeCallback set(long window) { - glfwSetWindowMaximizeCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowMaximizeCallback { - - private final GLFWWindowMaximizeCallbackI delegate; - - Container(long functionPointer, GLFWWindowMaximizeCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, boolean maximized) { - delegate.invoke(window, maximized); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowMaximizeCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowMaximizeCallbackI.java deleted file mode 100644 index 0525f7c2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowMaximizeCallbackI.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowMaximizeCallback SetWindowMaximizeCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int maximized
    - * )
    - * - * @since version 3.3 - */ -@FunctionalInterface -@NativeType("GLFWwindowmaximizefun") -public interface GLFWWindowMaximizeCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) != 0 - ); - } - - /** - * Will be called when the specified window is maximized or restored. - * - * @param window the window that was maximized or restored. - * @param maximized {@link GLFW#GLFW_TRUE TRUE} if the window was maximized, or {@link GLFW#GLFW_FALSE FALSE} if it was restored - */ - void invoke(@NativeType("GLFWwindow *") long window, @NativeType("int") boolean maximized); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowPosCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowPosCallback.java deleted file mode 100644 index 1a88793f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowPosCallback.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowPosCallback SetWindowPosCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int xpos,
    - *     int ypos
    - * )
    - * - * @since version 3.0 - */ -public abstract class GLFWWindowPosCallback extends Callback implements GLFWWindowPosCallbackI { - - /** - * Creates a {@code GLFWWindowPosCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowPosCallback} - */ - public static GLFWWindowPosCallback create(long functionPointer) { - GLFWWindowPosCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowPosCallback - ? (GLFWWindowPosCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowPosCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowPosCallback} instance that delegates to the specified {@code GLFWWindowPosCallbackI} instance. */ - public static GLFWWindowPosCallback create(GLFWWindowPosCallbackI instance) { - return instance instanceof GLFWWindowPosCallback - ? (GLFWWindowPosCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowPosCallback() { - super(CIF); - } - - GLFWWindowPosCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowPosCallback SetWindowPosCallback}. */ - public GLFWWindowPosCallback set(long window) { - glfwSetWindowPosCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowPosCallback { - - private final GLFWWindowPosCallbackI delegate; - - Container(long functionPointer, GLFWWindowPosCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int xpos, int ypos) { - delegate.invoke(window, xpos, ypos); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowPosCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowPosCallbackI.java deleted file mode 100644 index c796f8bd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowPosCallbackI.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowPosCallback SetWindowPosCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int xpos,
    - *     int ypos
    - * )
    - * - * @since version 3.0 - */ -@FunctionalInterface -@NativeType("GLFWwindowposfun") -public interface GLFWWindowPosCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when the specified window moves. - * - * @param window the window that was moved - * @param xpos the new x-coordinate, in screen coordinates, of the upper-left corner of the content area of the window - * @param ypos the new y-coordinate, in screen coordinates, of the upper-left corner of the content area of the window - */ - void invoke(@NativeType("GLFWwindow *") long window, int xpos, int ypos); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowRefreshCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowRefreshCallback.java deleted file mode 100644 index 55492813..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowRefreshCallback.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowRefreshCallback SetWindowRefreshCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window
    - * )
    - * - * @since version 2.5 - */ -public abstract class GLFWWindowRefreshCallback extends Callback implements GLFWWindowRefreshCallbackI { - - /** - * Creates a {@code GLFWWindowRefreshCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowRefreshCallback} - */ - public static GLFWWindowRefreshCallback create(long functionPointer) { - GLFWWindowRefreshCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowRefreshCallback - ? (GLFWWindowRefreshCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowRefreshCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowRefreshCallback} instance that delegates to the specified {@code GLFWWindowRefreshCallbackI} instance. */ - public static GLFWWindowRefreshCallback create(GLFWWindowRefreshCallbackI instance) { - return instance instanceof GLFWWindowRefreshCallback - ? (GLFWWindowRefreshCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowRefreshCallback() { - super(CIF); - } - - GLFWWindowRefreshCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowRefreshCallback SetWindowRefreshCallback}. */ - public GLFWWindowRefreshCallback set(long window) { - glfwSetWindowRefreshCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowRefreshCallback { - - private final GLFWWindowRefreshCallbackI delegate; - - Container(long functionPointer, GLFWWindowRefreshCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window) { - delegate.invoke(window); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowRefreshCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowRefreshCallbackI.java deleted file mode 100644 index 278ed39c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowRefreshCallbackI.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowRefreshCallback SetWindowRefreshCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window
    - * )
    - * - * @since version 2.5 - */ -@FunctionalInterface -@NativeType("GLFWwindowrefreshfun") -public interface GLFWWindowRefreshCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - /** - * Will be called when the client area of the specified window needs to be redrawn, for example if the window has been exposed after having been covered by - * another window. - * - * @param window the window whose content needs to be refreshed - */ - void invoke(@NativeType("GLFWwindow *") long window); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowSizeCallback.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowSizeCallback.java deleted file mode 100644 index 31a6f3a1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowSizeCallback.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.glfw.GLFW.*; - -/** - * Instances of this class may be passed to the {@link GLFW#glfwSetWindowSizeCallback SetWindowSizeCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int width,
    - *     int height
    - * )
    - */ -public abstract class GLFWWindowSizeCallback extends Callback implements GLFWWindowSizeCallbackI { - - /** - * Creates a {@code GLFWWindowSizeCallback} instance from the specified function pointer. - * - * @return the new {@code GLFWWindowSizeCallback} - */ - public static GLFWWindowSizeCallback create(long functionPointer) { - GLFWWindowSizeCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLFWWindowSizeCallback - ? (GLFWWindowSizeCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLFWWindowSizeCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLFWWindowSizeCallback} instance that delegates to the specified {@code GLFWWindowSizeCallbackI} instance. */ - public static GLFWWindowSizeCallback create(GLFWWindowSizeCallbackI instance) { - return instance instanceof GLFWWindowSizeCallback - ? (GLFWWindowSizeCallback)instance - : new Container(instance.address(), instance); - } - - protected GLFWWindowSizeCallback() { - super(CIF); - } - - GLFWWindowSizeCallback(long functionPointer) { - super(functionPointer); - } - - /** See {@link GLFW#glfwSetWindowSizeCallback SetWindowSizeCallback}. */ - public GLFWWindowSizeCallback set(long window) { - glfwSetWindowSizeCallback(window, this); - return this; - } - - private static final class Container extends GLFWWindowSizeCallback { - - private final GLFWWindowSizeCallbackI delegate; - - Container(long functionPointer, GLFWWindowSizeCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long window, int width, int height) { - delegate.invoke(window, width, height); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowSizeCallbackI.java b/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowSizeCallbackI.java deleted file mode 100644 index d593b109..00000000 --- a/LWJGL/src/main/java/org/lwjgl/glfw/GLFWWindowSizeCallbackI.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.glfw; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GLFW#glfwSetWindowSizeCallback SetWindowSizeCallback} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLFWwindow *window,
    - *     int width,
    - *     int height
    - * )
    - */ -@FunctionalInterface -@NativeType("GLFWwindowsizefun") -public interface GLFWWindowSizeCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * Will be called when the specified window is resized. - * - * @param window the window that was resized - * @param width the new width, in screen coordinates, of the window - * @param height the new height, in screen coordinates, of the window - */ - void invoke(@NativeType("GLFWwindow *") long window, int width, int height); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/input/Controller.java b/LWJGL/src/main/java/org/lwjgl/input/Controller.java deleted file mode 100644 index 0e62b40f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/Controller.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * 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.input; - -/** - * A game controller of some sort that will provide input. The controller - * presents buttons and axes. Buttons are either pressed or not pressed. Axis - * provide analogue values. - * - * @author Kevin Glass - */ -public interface Controller { - /** - * Get the name assigned to this controller. - * - * @return The name assigned to this controller - */ - String getName(); - - /** - * Get the index of this controller in the collection - * - * @return The index of this controller in the collection - */ - int getIndex(); - - /** - * Retrieve the number of buttons available on this controller - * - * @return The number of butotns available on this controller - */ - int getButtonCount(); - - /** - * Get the name of the specified button. Be warned, often this is - * as exciting as "Button X" - * - * @param index The index of the button whose name should be retrieved - * @return The name of the button requested - */ - String getButtonName(int index); - - /** - * Check if a button is currently pressed - * - * @param index The button to check - * @return True if the button is currently pressed - */ - boolean isButtonPressed(int index); - - /** - * Poll the controller for new data. This will also update - * events - */ - void poll(); - - /** - * Get the X-Axis value of the POV on this controller - * - * @return The X-Axis value of the POV on this controller - */ - float getPovX(); - - /** - * Get the Y-Axis value of the POV on this controller - * - * @return The Y-Axis value of the POV on this controller - */ - float getPovY(); - - /** - * Get the dead zone for a specified axis - * - * @param index The index of the axis for which to retrieve the dead zone - * @return The dead zone for the specified axis - */ - float getDeadZone(int index); - - /** - * Set the dead zone for the specified axis - * - * @param index The index of hte axis for which to set the dead zone - * @param zone The dead zone to use for the specified axis - */ - void setDeadZone(int index,float zone); - - /** - * Retrieve the number of axes available on this controller. - * - * @return The number of axes available on this controller. - */ - int getAxisCount(); - - /** - * Get the name that's given to the specified axis - * - * @param index The index of the axis whose name should be retrieved - * @return The name of the specified axis. - */ - String getAxisName(int index); - - /** - * Retrieve the value thats currently available on a specified axis. The - * value will always be between 1.0 and -1.0 and will calibrate as values - * are passed read. It may be useful to get the player to wiggle the joystick - * from side to side to get the calibration right. - * - * @param index The index of axis to be read - * @return The value from the specified axis. - */ - float getAxisValue(int index); - - /** - * Get the value from the X axis if there is one. If no X axis is - * defined a zero value will be returned. - * - * @return The value from the X axis - */ - float getXAxisValue(); - - /** - * Get the dead zone for the X axis. - * - * @return The dead zone for the X axis - */ - float getXAxisDeadZone(); - - /** - * Set the dead zone for the X axis - * - * @param zone The dead zone to use for the X axis - */ - void setXAxisDeadZone(float zone); - - /** - * Get the value from the Y axis if there is one. If no Y axis is - * defined a zero value will be returned. - * - * @return The value from the Y axis - */ - float getYAxisValue(); - - /** - * Get the dead zone for the Y axis. - * - * @return The dead zone for the Y axis - */ - float getYAxisDeadZone(); - - /** - * Set the dead zone for the Y axis - * - * @param zone The dead zone to use for the Y axis - */ - void setYAxisDeadZone(float zone); - - /** - * Get the value from the Z axis if there is one. If no Z axis is - * defined a zero value will be returned. - * - * @return The value from the Z axis - */ - float getZAxisValue(); - - /** - * Get the dead zone for the Z axis. - * - * @return The dead zone for the Z axis - */ - float getZAxisDeadZone(); - - /** - * Set the dead zone for the Z axis - * - * @param zone The dead zone to use for the Z axis - */ - void setZAxisDeadZone(float zone); - - /** - * Get the value from the RX axis if there is one. If no RX axis is - * defined a zero value will be returned. - * - * @return The value from the RX axis - */ - float getRXAxisValue(); - - /** - * Get the dead zone for the RX axis. - * - * @return The dead zone for the RX axis - */ - float getRXAxisDeadZone(); - - /** - * Set the dead zone for the RX axis - * - * @param zone The dead zone to use for the RX axis - */ - void setRXAxisDeadZone(float zone); - - /** - * Get the value from the RY axis if there is one. If no RY axis is - * defined a zero value will be returned. - * - * @return The value from the RY axis - */ - float getRYAxisValue(); - - /** - * Get the dead zone for the RY axis. - * - * @return The dead zone for the RY axis - */ - float getRYAxisDeadZone(); - - /** - * Set the dead zone for the RY axis - * - * @param zone The dead zone to use for the RY axis - */ - void setRYAxisDeadZone(float zone); - - /** - * Get the value from the RZ axis if there is one. If no RZ axis is - * defined a zero value will be returned. - * - * @return The value from the RZ axis - */ - float getRZAxisValue(); - - /** - * Get the dead zone for the RZ axis. - * - * @return The dead zone for the RZ axis - */ - float getRZAxisDeadZone(); - - /** - * Set the dead zone for the RZ axis - * - * @param zone The dead zone to use for the RZ axis - */ - void setRZAxisDeadZone(float zone); - - - /** Returns the number of rumblers this controller supports */ - int getRumblerCount(); - - /** Returns the name of the specified rumbler - * - * @param index The rumbler index - */ - String getRumblerName(int index); - - /** Sets the vibration strength of the specified rumbler - * - * @param index The index of the rumbler - * @param strength The strength to vibrate at - */ - void setRumblerStrength(int index, float strength); -} diff --git a/LWJGL/src/main/java/org/lwjgl/input/ControllerEvent.java b/LWJGL/src/main/java/org/lwjgl/input/ControllerEvent.java deleted file mode 100644 index 04eccd51..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/ControllerEvent.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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.input; - -/** - * An event occuring on a controller. - * - * @author Kevin Glass - */ -class ControllerEvent { - /** Indicates the event was caused by a button */ - public static final int BUTTON = 1; - /** Indicates the event was caused by a axis */ - public static final int AXIS = 2; - /** Indicates the event was caused by a pov X */ - public static final int POVX = 3; - /** Indicates the event was caused by a pov Y */ - public static final int POVY = 4; - - /** The controller generating the event */ - private Controller source; - /** The index of the input (axis or button) that generated the event */ - private int index; - /** Type of control that generated the event */ - private int type; - /** True when a button is pressed, if this event was caused by the button */ - private boolean buttonState; - /** True if this event was caused by the x axis */ - private boolean xaxis; - /** True if this event was caused by the y axis */ - private boolean yaxis; - /** The time stamp of this event */ - private long timeStamp; - /** The value on a specified axis, if this event was caused by the x-axis */ - private float xaxisValue; - /** The value on a specified axis, if this event was caused by the y-axis */ - private float yaxisValue; - - /** - * Create a new event - * - * @param source The source of the event - * @param timeStamp The time stamp given for this event - * @param type The type of control generating this event - * @param index The index of the input that generated the event - * @param xaxis True if this event was caused by the x-axis - * @param yaxis True if this event was caused by the y-axis - */ - ControllerEvent(Controller source,long timeStamp, int type,int index,boolean xaxis,boolean yaxis) { - this(source, timeStamp, type, index, false, xaxis, yaxis, 0, 0); - } - - /** - * Create a new event - * - * @param source The source of the event - * @param timeStamp The time stamp given for this event - * @param type The type of control generating this event - * @param index The index of the input that generated the event - * @param buttonState True when a button is pressed, if this event was caused by the button - * @param xaxis True if this event was caused by the x-axis - * @param yaxis True if this event was caused by the y-axis - * @param xaxisValue The value on a specified axis, if this event was caused by the x-axis - * @param yaxisValue The value on a specified axis, if this event was caused by the y-axis - */ - ControllerEvent(Controller source,long timeStamp, int type,int index,boolean buttonState,boolean xaxis,boolean yaxis,float xaxisValue,float yaxisValue) { - this.source = source; - this.timeStamp = timeStamp; - this.type = type; - this.index = index; - this.buttonState = buttonState; - this.xaxis = xaxis; - this.yaxis = yaxis; - this.xaxisValue = xaxisValue; - this.yaxisValue = yaxisValue; - } - - /** - * Get the time stamp given for this event. As with nanoTime() - * this value means nothing other than giving ordering - * - * @return The time stamp given for this event - */ - public long getTimeStamp() { - return timeStamp; - } - - /** - * Get the controller that generated this event - * - * @return The controller that generated this event - */ - public Controller getSource() { - return source; - } - - /** - * Get the index of the control generating this event - * - * @return The index of the control generating this event - */ - public int getControlIndex() { - return index; - } - - /** - * Check if this event was generated by a button - * - * @return True if this event was generated by a button - */ - public boolean isButton() { - return type == BUTTON; - } - - /** - * Check the button is pressed or not, when this event was caused - * - * @return True when a button is pressed, if this event was caused by the button - */ - public boolean getButtonState() { - return buttonState; - } - - /** - * Check if this event was generated by a axis - * - * @return True if this event was generated by a axis - */ - public boolean isAxis() { - return type == AXIS; - } - - /** - * Check if this event was generated by a pov - * - * @return True if this event was generated by a pov - */ - public boolean isPovY() { - return type == POVY; - } - /** - * - * Check if this event was generated by a pov - * - * @return True if this event was generated by a pov - */ - public boolean isPovX() { - return type == POVX; - } - - /** - * Check if this event was caused by the X axis - * - * @return True if this event was caused by the X axis - */ - public boolean isXAxis() { - return xaxis; - } - - /** - * Check if this event was caused by the Y axis - * - * @return True if this event was caused by the Y axis - */ - public boolean isYAxis() { - return yaxis; - } - - /** - * Get the value on an X axis when this event was caused - * - * @return The value on a specified axis, if this event was caused by the x-axis - */ - public float getXAxisValue() { - return xaxisValue; - } - - /** - * Get the value on an Y axis when this event was caused - * - * @return The value on a specified axis, if this event was caused by the y-axis - */ - public float getYAxisValue() { - return yaxisValue; - } - - /* - * @see java.lang.Object#toString() - */ - public String toString() { - return "["+source+" type="+type+" xaxis="+xaxis+" yaxis="+yaxis+"]"; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/input/Controllers.java b/LWJGL/src/main/java/org/lwjgl/input/Controllers.java deleted file mode 100644 index 80a507a5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/Controllers.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * 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.input; - -import net.java.games.input.ControllerEnvironment; - -import org.lwjgl.LWJGLException; - -import java.util.ArrayList; - -/** - * The collection of controllers currently connected. - * - * @author Kevin Glass - */ -public class Controllers { - /** The controllers available */ - private static ArrayList controllers = new ArrayList(); - /** The number of controllers */ - private static int controllerCount; - - /** The current list of events */ - private static ArrayList events = new ArrayList(); - /** The current event */ - private static ControllerEvent event; - - /** Whether controllers were created */ - private static boolean created; - - /** - * Initialise the controllers collection - * - * @throws LWJGLException Indicates a failure to initialise the controller library. - */ - public static void create() throws LWJGLException { - if (created) - return; - - try { - ControllerEnvironment env = ControllerEnvironment.getDefaultEnvironment(); - - net.java.games.input.Controller[] found = env.getControllers(); - ArrayList lollers = new ArrayList(); - for ( net.java.games.input.Controller c : found ) { - if ( (!c.getType().equals(net.java.games.input.Controller.Type.KEYBOARD)) && - (!c.getType().equals(net.java.games.input.Controller.Type.MOUSE)) ) { - lollers.add(c); - } - } - - for ( net.java.games.input.Controller c : lollers ) { - createController(c); - } - - created = true; - } catch (Throwable e) { - throw new LWJGLException("Failed to initialise controllers",e); - } - } - - /** - * Utility to create a controller based on its potential sub-controllers - * - * @param c The controller to add - */ - private static void createController(net.java.games.input.Controller c) { - net.java.games.input.Controller[] subControllers = c.getControllers(); - if (subControllers.length == 0) { - JInputController controller = new JInputController(controllerCount,c); - - controllers.add(controller); - controllerCount++; - } else { - for ( net.java.games.input.Controller sub : subControllers ) { - createController(sub); - } - } - } - - /** - * Get a controller from the collection - * - * @param index The index of the controller to retrieve - * @return The controller requested - */ - public static Controller getController(int index) { - return controllers.get(index); - } - - /** - * Retrieve a count of the number of controllers - * - * @return The number of controllers available - */ - public static int getControllerCount() { - return controllers.size(); - } - - /** - * Poll the controllers available. This will both update their state - * and generate events that must be cleared. - */ - public static void poll() { - for (int i=0;i>> 24); - byte blue = (byte) (argbColor >>> 16); - byte green = (byte) (argbColor >>> 8); - byte red = (byte) argbColor; - - pixels.put(red); - pixels.put(green); - pixels.put(blue); - pixels.put(alpha); - } - - pixels.flip(); - - return pixels; - } - - /** - * 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 minimum size of a native cursor - */ - public static int getMinCursorSize() { - return 1; - } - - /** - * Gets the maximum size of a native cursor. Can only be called if the - * cursor caps includes at least {@link #CURSOR_ONE_BIT_TRANSPARENCY}. - * - * @return the maximum size of a native cursor - */ - public static int getMaxCursorSize() { - return 512; - } - - /** - * Get the capabilities of the native cursor. Return a bit mask of the - * native cursor capabilities. - *
      - *
    • CURSOR_ONE_BIT_TRANSPARENCY indicates support for - * cursors with one bit transparency.
    • - * - *
    • CURSOR_8_BIT_ALPHA indicates support for 8 bit - * alpha.
    • - * - *
    • CURSOR_ANIMATION indicates support for cursor - * animations.
    • - *
    - * - * @return A bit mask with native cursor capabilities. - */ - public static int getCapabilities() { - return CURSOR_8_BIT_ALPHA | CURSOR_ANIMATION; - } - - /** - * 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 images_copy - * Destination images - */ - private static void flipImages(int width, int height, int numImages, IntBuffer images, IntBuffer images_copy) { - for (int i = 0; i < numImages; i++) { - int start_index = i * width * height; - flipImage(width, height, start_index, images, images_copy); - } - } - - /** - * @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_copy - * Destination images - */ - private static void flipImage(int width, int height, int start_index, IntBuffer images, IntBuffer images_copy) { - for (int y = 0; y < height >> 1; y++) { - int index_y_1 = y * width + start_index; - int index_y_2 = (height - y - 1) * width + start_index; - for (int x = 0; x < width; x++) { - int index1 = index_y_1 + x; - int index2 = index_y_2 + x; - int temp_pixel = images.get(index1 + images.position()); - images_copy.put(index1, images.get(index2 + images.position())); - images_copy.put(index2, temp_pixel); - } - } - } - - /** - * Gets the native handle associated with the cursor object. - */ - long getHandle() { - checkValid(); - return cursors[index].cursorHandle; - } - - /** - * Checks whether the cursor is still active and not yet destroyed. - */ - private void checkValid() { - if (destroyed) - throw new IllegalStateException("The cursor is already destroyed"); - } - - /** - * Destroy the current cursor. If the cursor is current, the current native - * cursor is set to null (the default OS cursor) - */ - public void destroy() { - for (CursorElement cursor : cursors) - GLFW.glfwDestroyCursor(cursor.cursorHandle); - - destroyed = true; - } - - /** - * Sets the timout property to the time it should be changed - */ - - protected void setTimeout() { - checkValid(); - cursors[index].timeout = GLFW.glfwGetTimerValue() + cursors[index].delay; - } - - /** - * Determines whether this cursor has timed out - * - * @return true if the this cursor has timed out, false if not - */ - - protected boolean hasTimedOut() { - checkValid(); - return cursors.length > 1 && cursors[index].timeout < GLFW.glfwGetTimerValue(); - } - - /** - * Changes to the next cursor - */ - protected void nextCursor() { - checkValid(); - index = ++index % cursors.length; - } - - /** - /* Returns wheteher the cursor image is empty or not - */ - - /*package-private*/ boolean isEmpty() { - return isEmpty; - } - - /** - * A single cursor element, used when animating - */ - private static class CursorElement { - - final long cursorHandle; - long delay; - long timeout; - - CursorElement(int xHotspot, int yHotspot, long delay, long timeout, GLFWImage image) { - this.delay = delay; - this.timeout = timeout; - - this.cursorHandle = GLFW.glfwCreateCursor(image, xHotspot, yHotspot); - if (cursorHandle == MemoryUtil.NULL) - throw new RuntimeException("Error creating GLFW cursor"); - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/input/EventQueue.java b/LWJGL/src/main/java/org/lwjgl/input/EventQueue.java deleted file mode 100644 index 72cc4a7d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/EventQueue.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.input; - -/** - * A java implementation of a LWJGL compatible event queue. - * @author elias_naur - */ - -import java.nio.ByteBuffer; - -class EventQueue { - private static final int QUEUE_SIZE = 200; - - private final int event_size; - - private final ByteBuffer queue; - - protected EventQueue(int event_size) { - this.event_size = event_size; - this.queue = ByteBuffer.allocate(QUEUE_SIZE*event_size); - } - - protected synchronized void clearEvents() { - queue.clear(); - } - - /** - * Copy available events into the specified buffer. - */ - public synchronized void copyEvents(ByteBuffer dest) { - queue.flip(); - int old_limit = queue.limit(); - if (dest.remaining() < queue.remaining()) - queue.limit(dest.remaining() + queue.position()); - dest.put(queue); - queue.limit(old_limit); - queue.compact(); - } - - /** - * Put an event into the queue. - * @return true if the event fitted into the queue, false otherwise - */ - public synchronized boolean putEvent(ByteBuffer event) { - if (event.remaining() != event_size) - throw new IllegalArgumentException("Internal error: event size " + event_size + " does not equal the given event size " + event.remaining()); - if (queue.remaining() >= event.remaining()) { - queue.put(event); - return true; - } else - return false; - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/input/GLFWInputImplementation.java b/LWJGL/src/main/java/org/lwjgl/input/GLFWInputImplementation.java deleted file mode 100644 index 6918a1a0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/GLFWInputImplementation.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.lwjgl.input; - -import org.lwjgl.LWJGLException; -import org.lwjgl.glfw.GLFW; -import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.InputImplementation; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -public class GLFWInputImplementation implements InputImplementation { - - public static final GLFWInputImplementation singleton = new GLFWInputImplementation(); - private final ByteBuffer eventBuffer = ByteBuffer.allocate(Mouse.EVENT_SIZE); - private final EventQueue eventQueue = new EventQueue(Mouse.EVENT_SIZE); - private final EventQueue keyboardEventQueue = new EventQueue(Keyboard.EVENT_SIZE); - private final ByteBuffer keyboardEvent = ByteBuffer.allocate(Keyboard.EVENT_SIZE); - public final byte[] keyDownBuffer = new byte[Keyboard.KEYBOARD_SIZE]; - public final byte[] mouseBuffer = new byte[3]; - public int mouseX = 0; - public int mouseY = 0; - public int mouseLastX = 0; - public int mouseLastY = 0; - public boolean grab; - public boolean correctCursor; - - @Override - public boolean hasWheel() { - return true; - } - - @Override - public int getButtonCount() { - return 3; - } - - @Override - public void createMouse() throws LWJGLException { - - } - - @Override - public void destroyMouse() { - - } - - @Override - public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) { - coord_buffer.put(0, grab ? mouseX - mouseLastX : mouseX); - coord_buffer.put(1, grab ? mouseY - mouseLastY : mouseY); - buttons.rewind(); - buttons.put(mouseBuffer); - mouseLastX = mouseX; - mouseLastY = mouseY; - } - - @Override - public void readMouse(ByteBuffer buffer) { - eventQueue.copyEvents(buffer); - } - - @Override - public void grabMouse(boolean newGrab) { - grab = newGrab; - correctCursor = newGrab; - GLFW.glfwSetInputMode(Display.getWindow(), GLFW.GLFW_CURSOR, grab ? GLFW.GLFW_CURSOR_DISABLED : GLFW.GLFW_CURSOR_NORMAL); - } - - @Override - public int getNativeCursorCapabilities() { - return 0; - } - - @Override - public void setCursorPosition(int x, int y) { - - } - - @Override - public void setNativeCursor(Object handle) throws LWJGLException { - - } - - @Override - public int getMinCursorSize() { - return 0; - } - - @Override - public int getMaxCursorSize() { - return 0; - } - - @Override - public void createKeyboard() throws LWJGLException { - - } - - @Override - public void destroyKeyboard() { - - } - - @Override - public void pollKeyboard(ByteBuffer keyDownBuffer) { - int oldPosition = keyDownBuffer.position(); - keyDownBuffer.put(this.keyDownBuffer); - keyDownBuffer.position(oldPosition); - } - - public void readKeyboard(ByteBuffer buffer) { - keyboardEventQueue.copyEvents(buffer); - } - - @Override - public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { - return null; - } - - @Override - public void destroyCursor(Object cursor_handle) { - - } - - @Override - public int getWidth() { - return Display.getWidth(); - } - - @Override - public int getHeight() { - return Display.getHeight(); - } - - @Override - public boolean isInsideWindow() { - return true; - } - - public void putMouseEventWithCoords(byte button, byte state, int x, int y, int dz, long nanos) { - int rebaseX; - int rebaseY; - if (x == -1 && y == -1) { - rebaseX = mouseX; - rebaseY = mouseY; - } else { - rebaseX = x; - rebaseY = y; - if (correctCursor) { - mouseX = x; - mouseY = y; - mouseLastX = mouseX; - mouseLastY = mouseY; - correctCursor = false; - return; - } - } - eventBuffer.clear(); - eventBuffer.put(button).put(state); - if (grab) { - eventBuffer.putInt(rebaseX - mouseX).putInt(rebaseY - mouseY); - } else { - eventBuffer.putInt(rebaseX).putInt(rebaseY); - } - if (button != -1) { - mouseBuffer[button] = state; - } - eventBuffer.putInt(dz).putLong(nanos); - eventBuffer.flip(); - eventQueue.putEvent(eventBuffer); - mouseX = rebaseX; - mouseY = rebaseY; - } - - public void putKeyboardEvent(int keycode, byte state, int ch, long nanos, boolean repeat) { - keyDownBuffer[keycode] = state; - keyboardEvent.clear(); - keyboardEvent.putInt(keycode).put(state).putInt(ch).putLong(nanos).put(repeat ? (byte) 1 : (byte) 0); - keyboardEvent.flip(); - keyboardEventQueue.putEvent(keyboardEvent); - } -} - diff --git a/LWJGL/src/main/java/org/lwjgl/input/JInputController.java b/LWJGL/src/main/java/org/lwjgl/input/JInputController.java deleted file mode 100644 index a12c0476..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/JInputController.java +++ /dev/null @@ -1,537 +0,0 @@ -/* - * 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.input; - -import net.java.games.input.Component; -import net.java.games.input.Component.Identifier.Axis; -import net.java.games.input.Component.Identifier.Button; -import net.java.games.input.Event; -import net.java.games.input.EventQueue; -import net.java.games.input.Rumbler; - -import java.util.ArrayList; - -/** - * A wrapper round a JInput controller that attempts to make the interface - * more useable. - * - * @author Kevin Glass - */ -class JInputController implements Controller { - /** The JInput controller this class is wrapping */ - private net.java.games.input.Controller target; - /** The index that has been assigned to this controller */ - private int index; - /** The Buttons that have been detected on the JInput controller */ - private ArrayList buttons = new ArrayList(); - /** The Axes that have been detected on the JInput controller */ - private ArrayList axes = new ArrayList(); - /** The POVs that have been detected on the JInput controller */ - private ArrayList pov = new ArrayList(); - /** The rumblers exposed by the controller */ - private Rumbler[] rumblers; - /** The state of the buttons last check */ - private boolean[] buttonState; - /** The values that were read from the pov last check */ - private float[] povValues; - /** The values that were read from the axes last check */ - private float[] axesValue; - /** The maximum values read for each axis */ - private float[] axesMax; - /** The dead zones for each axis */ - private float[] deadZones; - /** The index of the X axis or -1 if no X axis is defined */ - private int xaxis = -1; - /** The index of the Y axis or -1 if no Y axis is defined */ - private int yaxis = -1; - /** The index of the X axis or -1 if no Z axis is defined */ - private int zaxis = -1; - /** The index of the RX axis or -1 if no RX axis is defined */ - private int rxaxis = -1; - /** The index of the RY axis or -1 if no RY axis is defined */ - private int ryaxis = -1; - /** The index of the RZ axis or -1 if no RZ axis is defined */ - private int rzaxis = -1; - - /** - * Create a new controller that wraps round a JInput controller and hopefully - * makes it easier to use. - * - * @param index The index this controller has been assigned to - * @param target The target JInput controller this class is wrapping - */ - JInputController(int index, net.java.games.input.Controller target) { - this.target = target; - this.index = index; - - Component[] sourceAxes = target.getComponents(); - - for ( Component sourceAxis : sourceAxes ) { - if ( sourceAxis.getIdentifier() instanceof Button ) { - buttons.add(sourceAxis); - } else if ( sourceAxis.getIdentifier().equals(Axis.POV) ) { - pov.add(sourceAxis); - } else { - axes.add(sourceAxis); - } - } - - buttonState = new boolean[buttons.size()]; - povValues = new float[pov.size()]; - axesValue = new float[axes.size()]; - int buttonsCount = 0; - int axesCount = 0; - - // initialise the state - for ( Component sourceAxis : sourceAxes ) { - if ( sourceAxis.getIdentifier() instanceof Button ) { - buttonState[buttonsCount] = sourceAxis.getPollData() != 0; - buttonsCount++; - } else if ( sourceAxis.getIdentifier().equals(Axis.POV) ) { - // no account for POV yet - // pov.add(sourceAxes[i]); - } else { - axesValue[axesCount] = sourceAxis.getPollData(); - if ( sourceAxis.getIdentifier().equals(Axis.X) ) { - xaxis = axesCount; - } - if ( sourceAxis.getIdentifier().equals(Axis.Y) ) { - yaxis = axesCount; - } - if ( sourceAxis.getIdentifier().equals(Axis.Z) ) { - zaxis = axesCount; - } - if ( sourceAxis.getIdentifier().equals(Axis.RX) ) { - rxaxis = axesCount; - } - if ( sourceAxis.getIdentifier().equals(Axis.RY) ) { - ryaxis = axesCount; - } - if ( sourceAxis.getIdentifier().equals(Axis.RZ) ) { - rzaxis = axesCount; - } - - axesCount++; - } - } - - axesMax = new float[axes.size()]; - deadZones = new float[axes.size()]; - - for (int i=0;i axesMax[axisIndex]) { - axesMax[axisIndex] = Math.abs(value); - } - - // normalize the value based on maximum value read in the past - value /= axesMax[axisIndex]; - - if (axisIndex == xaxis) { - xaxisValue = value; - } - if (axisIndex == yaxis) { - yaxisValue = value; - } - - // fire event - Controllers.addEvent(new ControllerEvent(this,event.getNanos(),ControllerEvent.AXIS,axisIndex,false, - axisIndex == xaxis,axisIndex == yaxis,xaxisValue,yaxisValue)); - axesValue[axisIndex] = value; - } - } - } - - /* - * @see org.lwjgl.input.Controller#getAxisCount() - */ - public int getAxisCount() { - return axes.size(); - } - - /* - * @see org.lwjgl.input.Controller#getAxisName(int) - */ - public String getAxisName(int index) { - return axes.get(index).getName(); - } - - /* - * @see org.lwjgl.input.Controller#getAxisValue(int) - */ - public float getAxisValue(int index) { - return axesValue[index]; - } - - /* - * @see org.lwjgl.input.Controller#getXAxisValue() - */ - public float getXAxisValue() { - if (xaxis == -1) { - return 0; - } - - return getAxisValue(xaxis); - } - - /* - * @see org.lwjgl.input.Controller#getYAxisValue() - */ - public float getYAxisValue() { - if (yaxis == -1) { - return 0; - } - - return getAxisValue(yaxis); - } - - /* - * @see org.lwjgl.input.Controller#getXAxisDeadZone() - */ - public float getXAxisDeadZone() { - if (xaxis == -1) { - return 0; - } - - return getDeadZone(xaxis); - } - - /* - * @see org.lwjgl.input.Controller#getYAxisDeadZone() - */ - public float getYAxisDeadZone() { - if (yaxis == -1) { - return 0; - } - - return getDeadZone(yaxis); - } - - /* - * @see org.lwjgl.input.Controller#setXAxisDeadZone(float) - */ - public void setXAxisDeadZone(float zone) { - setDeadZone(xaxis,zone); - } - - /* - * @see org.lwjgl.input.Controller#setYAxisDeadZone(float) - */ - public void setYAxisDeadZone(float zone) { - setDeadZone(yaxis,zone); - } - - /* - * @see org.lwjgl.input.Controller#getDeadZone(int) - */ - public float getDeadZone(int index) { - return deadZones[index]; - } - - /* - * @see org.lwjgl.input.Controller#setDeadZone(int, float) - */ - public void setDeadZone(int index, float zone) { - deadZones[index] = zone; - } - - /* - * @see org.lwjgl.input.Controller#getZAxisValue() - */ - public float getZAxisValue() { - if (zaxis == -1) { - return 0; - } - - return getAxisValue(zaxis); - } - - /* - * @see org.lwjgl.input.Controller#getZAxisDeadZone() - */ - public float getZAxisDeadZone() { - if (zaxis == -1) { - return 0; - } - - return getDeadZone(zaxis); - } - - /* - * @see org.lwjgl.input.Controller#setZAxisDeadZone(float) - */ - public void setZAxisDeadZone(float zone) { - setDeadZone(zaxis,zone); - } - - /* - * @see org.lwjgl.input.Controller#getRXAxisValue() - */ - public float getRXAxisValue() { - if (rxaxis == -1) { - return 0; - } - - return getAxisValue(rxaxis); - } - - /* - * @see org.lwjgl.input.Controller#getRXAxisDeadZone() - */ - public float getRXAxisDeadZone() { - if (rxaxis == -1) { - return 0; - } - - return getDeadZone(rxaxis); - } - - /* - * @see org.lwjgl.input.Controller#setRXAxisDeadZone(float) - */ - public void setRXAxisDeadZone(float zone) { - setDeadZone(rxaxis,zone); - } - - /* - * @see org.lwjgl.input.Controller#getRYAxisValue() - */ - public float getRYAxisValue() { - if (ryaxis == -1) { - return 0; - } - - return getAxisValue(ryaxis); - } - - /* - * @see org.lwjgl.input.Controller#getRYAxisDeadZone() - */ - public float getRYAxisDeadZone() { - if (ryaxis == -1) { - return 0; - } - - return getDeadZone(ryaxis); - } - - /* - * @see org.lwjgl.input.Controller#setRYAxisDeadZone(float) - */ - public void setRYAxisDeadZone(float zone) { - setDeadZone(ryaxis,zone); - } - - /* - * @see org.lwjgl.input.Controller#getRZAxisValue() - */ - public float getRZAxisValue() { - if (rzaxis == -1) { - return 0; - } - - return getAxisValue(rzaxis); - } - - /* - * @see org.lwjgl.input.Controller#getRZAxisDeadZone() - */ - public float getRZAxisDeadZone() { - if (rzaxis == -1) { - return 0; - } - - return getDeadZone(rzaxis); - } - - /* - * @see org.lwjgl.input.Controller#setRZAxisDeadZone(float) - */ - public void setRZAxisDeadZone(float zone) { - setDeadZone(rzaxis,zone); - } - - /* - * @see org.lwjgl.input.Controller#getPovX() - */ - public float getPovX() { - if (pov.size() == 0) { - return 0; - } - - float value = povValues[0]; - - if ((value == Component.POV.DOWN_LEFT) || - (value == Component.POV.UP_LEFT) || - (value == Component.POV.LEFT)) { - return -1; - } - if ((value == Component.POV.DOWN_RIGHT) || - (value == Component.POV.UP_RIGHT) || - (value == Component.POV.RIGHT)) { - return 1; - } - - return 0; - } - - /* - * @see org.lwjgl.input.Controller#getPovY() - */ - public float getPovY() { - if (pov.size() == 0) { - return 0; - } - - float value = povValues[0]; - - if ((value == Component.POV.DOWN_LEFT) || - (value == Component.POV.DOWN_RIGHT) || - (value == Component.POV.DOWN)) { - return 1; - } - if ((value == Component.POV.UP_LEFT) || - (value == Component.POV.UP_RIGHT) || - (value == Component.POV.UP)) { - return -1; - } - - return 0; - } - - public int getRumblerCount() { - return rumblers.length; - } - - public String getRumblerName(int index) { - return rumblers[index].getAxisName(); - } - - public void setRumblerStrength(int index, float strength) { - rumblers[index].rumble(strength); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/input/KeyCodes.java b/LWJGL/src/main/java/org/lwjgl/input/KeyCodes.java deleted file mode 100644 index b6cd8f97..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/KeyCodes.java +++ /dev/null @@ -1,276 +0,0 @@ -package org.lwjgl.input; - -import org.lwjgl.glfw.GLFW; - -public class KeyCodes { - - public static int toLwjglKey(int glfwKeyCode) { - - switch (glfwKeyCode) { - case GLFW.GLFW_KEY_ESCAPE : return Keyboard.KEY_ESCAPE; - case GLFW.GLFW_KEY_BACKSPACE : return Keyboard.KEY_BACK; - case GLFW.GLFW_KEY_TAB : return Keyboard.KEY_TAB; - case GLFW.GLFW_KEY_ENTER : return Keyboard.KEY_RETURN; - case GLFW.GLFW_KEY_SPACE : return Keyboard.KEY_SPACE; - - case GLFW.GLFW_KEY_LEFT_CONTROL : return Keyboard.KEY_LCONTROL; - case GLFW.GLFW_KEY_LEFT_SHIFT : return Keyboard.KEY_LSHIFT; - case GLFW.GLFW_KEY_LEFT_ALT : return Keyboard.KEY_LMENU; - case GLFW.GLFW_KEY_LEFT_SUPER : return Keyboard.KEY_LMETA; - - case GLFW.GLFW_KEY_RIGHT_CONTROL: return Keyboard.KEY_RCONTROL; - case GLFW.GLFW_KEY_RIGHT_SHIFT : return Keyboard.KEY_RSHIFT; - case GLFW.GLFW_KEY_RIGHT_ALT : return Keyboard.KEY_RMENU; - case GLFW.GLFW_KEY_RIGHT_SUPER : return Keyboard.KEY_RMETA; - - case GLFW.GLFW_KEY_1 : return Keyboard.KEY_1; - case GLFW.GLFW_KEY_2 : return Keyboard.KEY_2; - case GLFW.GLFW_KEY_3 : return Keyboard.KEY_3; - case GLFW.GLFW_KEY_4 : return Keyboard.KEY_4; - case GLFW.GLFW_KEY_5 : return Keyboard.KEY_5; - case GLFW.GLFW_KEY_6 : return Keyboard.KEY_6; - case GLFW.GLFW_KEY_7 : return Keyboard.KEY_7; - case GLFW.GLFW_KEY_8 : return Keyboard.KEY_8; - case GLFW.GLFW_KEY_9 : return Keyboard.KEY_9; - case GLFW.GLFW_KEY_0 : return Keyboard.KEY_0; - - case GLFW.GLFW_KEY_A : return Keyboard.KEY_A; - case GLFW.GLFW_KEY_B : return Keyboard.KEY_B; - case GLFW.GLFW_KEY_C : return Keyboard.KEY_C; - case GLFW.GLFW_KEY_D : return Keyboard.KEY_D; - case GLFW.GLFW_KEY_E : return Keyboard.KEY_E; - case GLFW.GLFW_KEY_F : return Keyboard.KEY_F; - case GLFW.GLFW_KEY_G : return Keyboard.KEY_G; - case GLFW.GLFW_KEY_H : return Keyboard.KEY_H; - case GLFW.GLFW_KEY_I : return Keyboard.KEY_I; - case GLFW.GLFW_KEY_J : return Keyboard.KEY_J; - case GLFW.GLFW_KEY_K : return Keyboard.KEY_K; - case GLFW.GLFW_KEY_L : return Keyboard.KEY_L; - case GLFW.GLFW_KEY_M : return Keyboard.KEY_M; - case GLFW.GLFW_KEY_N : return Keyboard.KEY_N; - case GLFW.GLFW_KEY_O : return Keyboard.KEY_O; - case GLFW.GLFW_KEY_P : return Keyboard.KEY_P; - case GLFW.GLFW_KEY_Q : return Keyboard.KEY_Q; - case GLFW.GLFW_KEY_R : return Keyboard.KEY_R; - case GLFW.GLFW_KEY_S : return Keyboard.KEY_S; - case GLFW.GLFW_KEY_T : return Keyboard.KEY_T; - case GLFW.GLFW_KEY_U : return Keyboard.KEY_U; - case GLFW.GLFW_KEY_V : return Keyboard.KEY_V; - case GLFW.GLFW_KEY_W : return Keyboard.KEY_W; - case GLFW.GLFW_KEY_X : return Keyboard.KEY_X; - case GLFW.GLFW_KEY_Y : return Keyboard.KEY_Y; - case GLFW.GLFW_KEY_Z : return Keyboard.KEY_Z; - - case GLFW.GLFW_KEY_UP : return Keyboard.KEY_UP; - case GLFW.GLFW_KEY_DOWN : return Keyboard.KEY_DOWN; - case GLFW.GLFW_KEY_LEFT : return Keyboard.KEY_LEFT; - case GLFW.GLFW_KEY_RIGHT : return Keyboard.KEY_RIGHT; - - case GLFW.GLFW_KEY_INSERT : return Keyboard.KEY_INSERT; - case GLFW.GLFW_KEY_DELETE : return Keyboard.KEY_DELETE; - case GLFW.GLFW_KEY_HOME : return Keyboard.KEY_HOME; - case GLFW.GLFW_KEY_END : return Keyboard.KEY_END; - case GLFW.GLFW_KEY_PAGE_UP : return Keyboard.KEY_PRIOR; - case GLFW.GLFW_KEY_PAGE_DOWN : return Keyboard.KEY_NEXT; - - case GLFW.GLFW_KEY_F1 : return Keyboard.KEY_F1; - case GLFW.GLFW_KEY_F2 : return Keyboard.KEY_F2; - case GLFW.GLFW_KEY_F3 : return Keyboard.KEY_F3; - case GLFW.GLFW_KEY_F4 : return Keyboard.KEY_F4; - case GLFW.GLFW_KEY_F5 : return Keyboard.KEY_F5; - case GLFW.GLFW_KEY_F6 : return Keyboard.KEY_F6; - case GLFW.GLFW_KEY_F7 : return Keyboard.KEY_F7; - case GLFW.GLFW_KEY_F8 : return Keyboard.KEY_F8; - case GLFW.GLFW_KEY_F9 : return Keyboard.KEY_F9; - case GLFW.GLFW_KEY_F10 : return Keyboard.KEY_F10; - case GLFW.GLFW_KEY_F11 : return Keyboard.KEY_F11; - case GLFW.GLFW_KEY_F12 : return Keyboard.KEY_F12; - case GLFW.GLFW_KEY_F13 : return Keyboard.KEY_F13; - case GLFW.GLFW_KEY_F14 : return Keyboard.KEY_F14; - case GLFW.GLFW_KEY_F15 : return Keyboard.KEY_F15; - case GLFW.GLFW_KEY_F16 : return Keyboard.KEY_F16; - case GLFW.GLFW_KEY_F17 : return Keyboard.KEY_F17; - case GLFW.GLFW_KEY_F18 : return Keyboard.KEY_F18; - case GLFW.GLFW_KEY_F19 : return Keyboard.KEY_F19; - - case GLFW.GLFW_KEY_KP_1 : return Keyboard.KEY_NUMPAD1; - case GLFW.GLFW_KEY_KP_2 : return Keyboard.KEY_NUMPAD2; - case GLFW.GLFW_KEY_KP_3 : return Keyboard.KEY_NUMPAD3; - case GLFW.GLFW_KEY_KP_4 : return Keyboard.KEY_NUMPAD4; - case GLFW.GLFW_KEY_KP_5 : return Keyboard.KEY_NUMPAD5; - case GLFW.GLFW_KEY_KP_6 : return Keyboard.KEY_NUMPAD6; - case GLFW.GLFW_KEY_KP_7 : return Keyboard.KEY_NUMPAD7; - case GLFW.GLFW_KEY_KP_8 : return Keyboard.KEY_NUMPAD8; - case GLFW.GLFW_KEY_KP_9 : return Keyboard.KEY_NUMPAD9; - case GLFW.GLFW_KEY_KP_0 : return Keyboard.KEY_NUMPAD0; - - case GLFW.GLFW_KEY_KP_ADD : return Keyboard.KEY_ADD; - case GLFW.GLFW_KEY_KP_SUBTRACT : return Keyboard.KEY_SUBTRACT; - case GLFW.GLFW_KEY_KP_MULTIPLY : return Keyboard.KEY_MULTIPLY; - case GLFW.GLFW_KEY_KP_DIVIDE : return Keyboard.KEY_DIVIDE; - case GLFW.GLFW_KEY_KP_DECIMAL : return Keyboard.KEY_DECIMAL; - case GLFW.GLFW_KEY_KP_EQUAL : return Keyboard.KEY_NUMPADEQUALS; - case GLFW.GLFW_KEY_KP_ENTER : return Keyboard.KEY_NUMPADENTER; - case GLFW.GLFW_KEY_NUM_LOCK : return Keyboard.KEY_NUMLOCK; - - case GLFW.GLFW_KEY_SEMICOLON : return Keyboard.KEY_SEMICOLON; - case GLFW.GLFW_KEY_BACKSLASH : return Keyboard.KEY_BACKSLASH; - case GLFW.GLFW_KEY_COMMA : return Keyboard.KEY_COMMA; - case GLFW.GLFW_KEY_PERIOD : return Keyboard.KEY_PERIOD; - case GLFW.GLFW_KEY_SLASH : return Keyboard.KEY_SLASH; - case GLFW.GLFW_KEY_GRAVE_ACCENT : return Keyboard.KEY_GRAVE; - - case GLFW.GLFW_KEY_CAPS_LOCK : return Keyboard.KEY_CAPITAL; - case GLFW.GLFW_KEY_SCROLL_LOCK : return Keyboard.KEY_SCROLL; - - case GLFW.GLFW_KEY_WORLD_1 : return Keyboard.KEY_CIRCUMFLEX; // TODO not sure if correct - case GLFW.GLFW_KEY_PAUSE : return Keyboard.KEY_PAUSE; - - case GLFW.GLFW_KEY_MINUS : return Keyboard.KEY_MINUS; - case GLFW.GLFW_KEY_EQUAL : return Keyboard.KEY_EQUALS; - case GLFW.GLFW_KEY_LEFT_BRACKET : return Keyboard.KEY_LBRACKET; - case GLFW.GLFW_KEY_RIGHT_BRACKET: return Keyboard.KEY_RBRACKET; - case GLFW.GLFW_KEY_APOSTROPHE : return Keyboard.KEY_APOSTROPHE; - default: - if (glfwKeyCode != -1) - System.out.println("UNKNOWN GLFW KEY CODE: " + glfwKeyCode); - return Keyboard.KEY_NONE; - } - } - - public static int toGlfwKey(int lwjglKeyCode) { - - switch (lwjglKeyCode) { - case Keyboard.KEY_ESCAPE : return GLFW.GLFW_KEY_ESCAPE; - case Keyboard.KEY_BACK : return GLFW.GLFW_KEY_BACKSPACE; - case Keyboard.KEY_TAB : return GLFW.GLFW_KEY_TAB; - case Keyboard.KEY_RETURN : return GLFW.GLFW_KEY_ENTER; - case Keyboard.KEY_SPACE : return GLFW.GLFW_KEY_SPACE; - - case Keyboard.KEY_LCONTROL : return GLFW.GLFW_KEY_LEFT_CONTROL; - case Keyboard.KEY_LSHIFT : return GLFW.GLFW_KEY_LEFT_SHIFT; - case Keyboard.KEY_LMENU : return GLFW.GLFW_KEY_LEFT_ALT; - case Keyboard.KEY_LMETA : return GLFW.GLFW_KEY_LEFT_SUPER; - - case Keyboard.KEY_RCONTROL : return GLFW.GLFW_KEY_RIGHT_CONTROL; - case Keyboard.KEY_RSHIFT : return GLFW.GLFW_KEY_RIGHT_SHIFT; - case Keyboard.KEY_RMENU : return GLFW.GLFW_KEY_RIGHT_ALT; - case Keyboard.KEY_RMETA : return GLFW.GLFW_KEY_RIGHT_SUPER; - - case Keyboard.KEY_1 : return GLFW.GLFW_KEY_1; - case Keyboard.KEY_2 : return GLFW.GLFW_KEY_2; - case Keyboard.KEY_3 : return GLFW.GLFW_KEY_3; - case Keyboard.KEY_4 : return GLFW.GLFW_KEY_4; - case Keyboard.KEY_5 : return GLFW.GLFW_KEY_5; - case Keyboard.KEY_6 : return GLFW.GLFW_KEY_6; - case Keyboard.KEY_7 : return GLFW.GLFW_KEY_7; - case Keyboard.KEY_8 : return GLFW.GLFW_KEY_8; - case Keyboard.KEY_9 : return GLFW.GLFW_KEY_9; - case Keyboard.KEY_0 : return GLFW.GLFW_KEY_0; - - case Keyboard.KEY_A : return GLFW.GLFW_KEY_A; - case Keyboard.KEY_B : return GLFW.GLFW_KEY_B; - case Keyboard.KEY_C : return GLFW.GLFW_KEY_C; - case Keyboard.KEY_D : return GLFW.GLFW_KEY_D; - case Keyboard.KEY_E : return GLFW.GLFW_KEY_E; - case Keyboard.KEY_F : return GLFW.GLFW_KEY_F; - case Keyboard.KEY_G : return GLFW.GLFW_KEY_G; - case Keyboard.KEY_H : return GLFW.GLFW_KEY_H; - case Keyboard.KEY_I : return GLFW.GLFW_KEY_I; - case Keyboard.KEY_J : return GLFW.GLFW_KEY_J; - case Keyboard.KEY_K : return GLFW.GLFW_KEY_K; - case Keyboard.KEY_L : return GLFW.GLFW_KEY_L; - case Keyboard.KEY_M : return GLFW.GLFW_KEY_M; - case Keyboard.KEY_N : return GLFW.GLFW_KEY_N; - case Keyboard.KEY_O : return GLFW.GLFW_KEY_O; - case Keyboard.KEY_P : return GLFW.GLFW_KEY_P; - case Keyboard.KEY_Q : return GLFW.GLFW_KEY_Q; - case Keyboard.KEY_R : return GLFW.GLFW_KEY_R; - case Keyboard.KEY_S : return GLFW.GLFW_KEY_S; - case Keyboard.KEY_T : return GLFW.GLFW_KEY_T; - case Keyboard.KEY_U : return GLFW.GLFW_KEY_U; - case Keyboard.KEY_V : return GLFW.GLFW_KEY_V; - case Keyboard.KEY_W : return GLFW.GLFW_KEY_W; - case Keyboard.KEY_X : return GLFW.GLFW_KEY_X; - case Keyboard.KEY_Y : return GLFW.GLFW_KEY_Y; - case Keyboard.KEY_Z : return GLFW.GLFW_KEY_Z; - - case Keyboard.KEY_UP : return GLFW.GLFW_KEY_UP; - case Keyboard.KEY_DOWN : return GLFW.GLFW_KEY_DOWN; - case Keyboard.KEY_LEFT : return GLFW.GLFW_KEY_LEFT; - case Keyboard.KEY_RIGHT : return GLFW.GLFW_KEY_RIGHT; - - case Keyboard.KEY_INSERT : return GLFW.GLFW_KEY_INSERT; - case Keyboard.KEY_DELETE : return GLFW.GLFW_KEY_DELETE; - case Keyboard.KEY_HOME : return GLFW.GLFW_KEY_HOME; - case Keyboard.KEY_END : return GLFW.GLFW_KEY_END; - case Keyboard.KEY_PRIOR : return GLFW.GLFW_KEY_PAGE_UP; - case Keyboard.KEY_NEXT : return GLFW.GLFW_KEY_PAGE_DOWN; - - case Keyboard.KEY_F1 : return GLFW.GLFW_KEY_F1; - case Keyboard.KEY_F2 : return GLFW.GLFW_KEY_F2; - case Keyboard.KEY_F3 : return GLFW.GLFW_KEY_F3; - case Keyboard.KEY_F4 : return GLFW.GLFW_KEY_F4; - case Keyboard.KEY_F5 : return GLFW.GLFW_KEY_F5; - case Keyboard.KEY_F6 : return GLFW.GLFW_KEY_F6; - case Keyboard.KEY_F7 : return GLFW.GLFW_KEY_F7; - case Keyboard.KEY_F8 : return GLFW.GLFW_KEY_F8; - case Keyboard.KEY_F9 : return GLFW.GLFW_KEY_F9; - case Keyboard.KEY_F10 : return GLFW.GLFW_KEY_F10; - case Keyboard.KEY_F11 : return GLFW.GLFW_KEY_F11; - case Keyboard.KEY_F12 : return GLFW.GLFW_KEY_F12; - case Keyboard.KEY_F13 : return GLFW.GLFW_KEY_F13; - case Keyboard.KEY_F14 : return GLFW.GLFW_KEY_F14; - case Keyboard.KEY_F15 : return GLFW.GLFW_KEY_F15; - case Keyboard.KEY_F16 : return GLFW.GLFW_KEY_F16; - case Keyboard.KEY_F17 : return GLFW.GLFW_KEY_F17; - case Keyboard.KEY_F18 : return GLFW.GLFW_KEY_F18; - case Keyboard.KEY_F19 : return GLFW.GLFW_KEY_F19; - - case Keyboard.KEY_NUMPAD1 : return GLFW.GLFW_KEY_KP_1; - case Keyboard.KEY_NUMPAD2 : return GLFW.GLFW_KEY_KP_2; - case Keyboard.KEY_NUMPAD3 : return GLFW.GLFW_KEY_KP_3; - case Keyboard.KEY_NUMPAD4 : return GLFW.GLFW_KEY_KP_4; - case Keyboard.KEY_NUMPAD5 : return GLFW.GLFW_KEY_KP_5; - case Keyboard.KEY_NUMPAD6 : return GLFW.GLFW_KEY_KP_6; - case Keyboard.KEY_NUMPAD7 : return GLFW.GLFW_KEY_KP_7; - case Keyboard.KEY_NUMPAD8 : return GLFW.GLFW_KEY_KP_8; - case Keyboard.KEY_NUMPAD9 : return GLFW.GLFW_KEY_KP_9; - case Keyboard.KEY_NUMPAD0 : return GLFW.GLFW_KEY_KP_0; - - case Keyboard.KEY_ADD : return GLFW.GLFW_KEY_KP_ADD; - case Keyboard.KEY_SUBTRACT : return GLFW.GLFW_KEY_KP_SUBTRACT; - case Keyboard.KEY_MULTIPLY : return GLFW.GLFW_KEY_KP_MULTIPLY; - case Keyboard.KEY_DIVIDE : return GLFW.GLFW_KEY_KP_DIVIDE; - case Keyboard.KEY_DECIMAL : return GLFW.GLFW_KEY_KP_DECIMAL; - case Keyboard.KEY_NUMPADEQUALS : return GLFW.GLFW_KEY_KP_EQUAL; - case Keyboard.KEY_NUMPADENTER : return GLFW.GLFW_KEY_KP_ENTER; - case Keyboard.KEY_NUMLOCK : return GLFW.GLFW_KEY_NUM_LOCK; - - case Keyboard.KEY_SEMICOLON : return GLFW.GLFW_KEY_SEMICOLON; - case Keyboard.KEY_BACKSLASH : return GLFW.GLFW_KEY_BACKSLASH; - case Keyboard.KEY_COMMA : return GLFW.GLFW_KEY_COMMA; - case Keyboard.KEY_PERIOD : return GLFW.GLFW_KEY_PERIOD; - case Keyboard.KEY_SLASH : return GLFW.GLFW_KEY_SLASH; - case Keyboard.KEY_GRAVE : return GLFW.GLFW_KEY_GRAVE_ACCENT; - - case Keyboard.KEY_CAPITAL : return GLFW.GLFW_KEY_CAPS_LOCK; - case Keyboard.KEY_SCROLL : return GLFW.GLFW_KEY_SCROLL_LOCK; - - case Keyboard.KEY_PAUSE : return GLFW.GLFW_KEY_PAUSE; - case Keyboard.KEY_CIRCUMFLEX : return GLFW.GLFW_KEY_WORLD_1; // TODO not sure if correct - - case Keyboard.KEY_MINUS : return GLFW.GLFW_KEY_MINUS; - case Keyboard.KEY_EQUALS : return GLFW.GLFW_KEY_EQUAL; - case Keyboard.KEY_LBRACKET : return GLFW.GLFW_KEY_LEFT_BRACKET; - case Keyboard.KEY_RBRACKET : return GLFW.GLFW_KEY_RIGHT_BRACKET; - case Keyboard.KEY_APOSTROPHE : return GLFW.GLFW_KEY_APOSTROPHE; - - default: - if (lwjglKeyCode != -1) - System.out.println("UNKNOWN LWJGL KEY CODE: " + lwjglKeyCode); - return GLFW.GLFW_KEY_UNKNOWN; - } - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/input/Keyboard.java b/LWJGL/src/main/java/org/lwjgl/input/Keyboard.java deleted file mode 100644 index 2835b969..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/Keyboard.java +++ /dev/null @@ -1,582 +0,0 @@ -/* - * 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.input; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; -import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.InputImplementation; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.nio.ByteBuffer; -import java.util.HashMap; -import java.util.Map; - -/** - *
    - * A raw Keyboard interface. This can be used to poll the current state of the - * keys, or read all the keyboard presses / releases since the last read. - * - * @author cix_foo - * @author elias_naur - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public class Keyboard { - /** Internal use - event size in bytes */ - public static final int EVENT_SIZE = 4 + 1 + 4 + 8 + 1; - - /** - * 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. - */ - public static final int KEY_NONE = 0x00; - - public static final int KEY_ESCAPE = 0x01; - public static final int KEY_1 = 0x02; - public static final int KEY_2 = 0x03; - public static final int KEY_3 = 0x04; - public static final int KEY_4 = 0x05; - public static final int KEY_5 = 0x06; - public static final int KEY_6 = 0x07; - public static final int KEY_7 = 0x08; - public static final int KEY_8 = 0x09; - public static final int KEY_9 = 0x0A; - public static final int KEY_0 = 0x0B; - public static final int KEY_MINUS = 0x0C; /* - on main keyboard */ - public static final int KEY_EQUALS = 0x0D; - public static final int KEY_BACK = 0x0E; /* backspace */ - public static final int KEY_TAB = 0x0F; - public static final int KEY_Q = 0x10; - public static final int KEY_W = 0x11; - public static final int KEY_E = 0x12; - public static final int KEY_R = 0x13; - public static final int KEY_T = 0x14; - public static final int KEY_Y = 0x15; - public static final int KEY_U = 0x16; - public static final int KEY_I = 0x17; - public static final int KEY_O = 0x18; - public static final int KEY_P = 0x19; - public static final int KEY_LBRACKET = 0x1A; - public static final int KEY_RBRACKET = 0x1B; - public static final int KEY_RETURN = 0x1C; /* Enter on main keyboard */ - public static final int KEY_LCONTROL = 0x1D; - public static final int KEY_A = 0x1E; - public static final int KEY_S = 0x1F; - public static final int KEY_D = 0x20; - public static final int KEY_F = 0x21; - public static final int KEY_G = 0x22; - public static final int KEY_H = 0x23; - public static final int KEY_J = 0x24; - public static final int KEY_K = 0x25; - public static final int KEY_L = 0x26; - public static final int KEY_SEMICOLON = 0x27; - public static final int KEY_APOSTROPHE = 0x28; - public static final int KEY_GRAVE = 0x29; /* accent grave */ - public static final int KEY_LSHIFT = 0x2A; - public static final int KEY_BACKSLASH = 0x2B; - public static final int KEY_Z = 0x2C; - public static final int KEY_X = 0x2D; - public static final int KEY_C = 0x2E; - public static final int KEY_V = 0x2F; - public static final int KEY_B = 0x30; - public static final int KEY_N = 0x31; - public static final int KEY_M = 0x32; - public static final int KEY_COMMA = 0x33; - public static final int KEY_PERIOD = 0x34; /* . on main keyboard */ - public static final int KEY_SLASH = 0x35; /* / on main keyboard */ - public static final int KEY_RSHIFT = 0x36; - public static final int KEY_MULTIPLY = 0x37; /* * on numeric keypad */ - public static final int KEY_LMENU = 0x38; /* left Alt */ - public static final int KEY_SPACE = 0x39; - public static final int KEY_CAPITAL = 0x3A; - public static final int KEY_F1 = 0x3B; - public static final int KEY_F2 = 0x3C; - public static final int KEY_F3 = 0x3D; - public static final int KEY_F4 = 0x3E; - public static final int KEY_F5 = 0x3F; - public static final int KEY_F6 = 0x40; - public static final int KEY_F7 = 0x41; - public static final int KEY_F8 = 0x42; - public static final int KEY_F9 = 0x43; - public static final int KEY_F10 = 0x44; - public static final int KEY_NUMLOCK = 0x45; - public static final int KEY_SCROLL = 0x46; /* Scroll Lock */ - public static final int KEY_NUMPAD7 = 0x47; - public static final int KEY_NUMPAD8 = 0x48; - public static final int KEY_NUMPAD9 = 0x49; - public static final int KEY_SUBTRACT = 0x4A; /* - on numeric keypad */ - public static final int KEY_NUMPAD4 = 0x4B; - public static final int KEY_NUMPAD5 = 0x4C; - public static final int KEY_NUMPAD6 = 0x4D; - public static final int KEY_ADD = 0x4E; /* + on numeric keypad */ - public static final int KEY_NUMPAD1 = 0x4F; - public static final int KEY_NUMPAD2 = 0x50; - public static final int KEY_NUMPAD3 = 0x51; - public static final int KEY_NUMPAD0 = 0x52; - 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_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_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_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_NUMPADENTER = 0x9C; /* Enter on numeric keypad */ - public static final int KEY_RCONTROL = 0x9D; - 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_DIVIDE = 0xB5; /* / on numeric keypad */ - public static final int KEY_SYSRQ = 0xB7; - public static final int KEY_RMENU = 0xB8; /* right Alt */ - public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ - public static final int KEY_PAUSE = 0xC5; /* Pause */ - public static final int KEY_HOME = 0xC7; /* Home on arrow keypad */ - public static final int KEY_UP = 0xC8; /* UpArrow on arrow keypad */ - public static final int KEY_PRIOR = 0xC9; /* PgUp on arrow keypad */ - public static final int KEY_LEFT = 0xCB; /* LeftArrow on arrow keypad */ - public static final int KEY_RIGHT = 0xCD; /* RightArrow on arrow keypad */ - public static final int KEY_END = 0xCF; /* End on arrow keypad */ - public static final int KEY_DOWN = 0xD0; /* DownArrow on arrow keypad */ - public static final int KEY_NEXT = 0xD1; /* PgDn on arrow keypad */ - public static final int KEY_INSERT = 0xD2; /* Insert on arrow keypad */ - public static final int KEY_DELETE = 0xD3; /* Delete on arrow keypad */ - public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ - public static final int KEY_LMETA = 0xDB; /* Left Windows/Option key */ - /** - * The left windows key, mapped to KEY_LMETA - * - * @deprecated Use KEY_LMETA instead - */ - public static final int KEY_LWIN = KEY_LMETA; /* Left Windows key */ - public static final int KEY_RMETA = 0xDC; /* Right Windows/Option key */ - /** - * The right windows key, mapped to KEY_RMETA - * - * @deprecated Use KEY_RMETA instead - */ - public static final int KEY_RWIN = KEY_RMETA; /* Right Windows key */ - 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 STATE_ON = 0; - public static final int STATE_OFF = 1; - public static final int STATE_UNKNOWN = 2; - */ - public static final int KEYBOARD_SIZE = 256; - - /** Buffer size in events */ - private static final int BUFFER_SIZE = 50; - - /** Key names */ - private static final String[] keyName = new String[KEYBOARD_SIZE]; - private static final Map keyMap = new HashMap(253); - private static int counter; - - static { - // Use reflection to find out key names - Field[] fields = Keyboard.class.getFields(); - try { - for ( Field field : fields ) { - if ( Modifier.isStatic(field.getModifiers()) - && Modifier.isPublic(field.getModifiers()) - && Modifier.isFinal(field.getModifiers()) - && field.getType().equals(int.class) - && field.getName().startsWith("KEY_") - && !field.getName().endsWith("WIN") ) { /* Don't use deprecated names */ - - int key = field.getInt(null); - String name = field.getName().substring(4); - keyName[key] = name; - keyMap.put(name, key); - counter++; - } - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** The number of keys supported */ - private static final int keyCount = counter; - - /** Has the keyboard been created? */ - private static boolean created; - - /** Are repeat events enabled? */ - private static boolean repeat_enabled; - - /** The keys status from the last poll */ - private static final ByteBuffer keyDownBuffer = BufferUtils.createByteBuffer(KEYBOARD_SIZE); - - /** - * The key events from the last read: a sequence of pairs of key number, - * followed by state. The state is followed by - * a 4 byte code point representing the translated character. - */ - private static ByteBuffer readBuffer; - - /** current event */ - private static KeyEvent current_event = new KeyEvent(); - - /** scratch event */ - private static KeyEvent tmp_event = new KeyEvent(); - - /** One time initialization */ - private static boolean initialized; - - private static InputImplementation implementation; - - /** - * Keyboard cannot be constructed. - */ - private Keyboard() { - } - - /** - * Static initialization - */ - private static void initialize() { - if (initialized) - return; - Sys.initialize(); - initialized = true; - } - - /** - * "Create" the keyboard with the given implementation. This is used - * reflectively from AWTInputAdapter. - * - * @throws LWJGLException if the keyboard could not be created for any reason - */ - private static void create(InputImplementation impl) throws LWJGLException { - if (created) - return; - if (!initialized) - initialize(); - implementation = impl; - implementation.createKeyboard(); - created = true; - readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE); - reset(); - } - - /** - * "Create" the keyboard. The display must first have been created. The - * reason for this is so the keyboard has a window to "focus" in. - * - * @throws LWJGLException if the keyboard could not be created for any reason - */ - public static void create() throws LWJGLException { - if (!Display.isCreated()) throw new IllegalStateException("Display must be created."); - - create((InputImplementation) GLFWInputImplementation.singleton); - } - - private static void reset() { - readBuffer.limit(0); - for (int i = 0; i < keyDownBuffer.remaining(); i++) - keyDownBuffer.put(i, (byte)0); - current_event.reset(); - } - - /** - * @return true if the keyboard has been created - */ - public static boolean isCreated() { - return created; - } - - /** - * "Destroy" the keyboard - */ - public static void destroy() { - if (!created) - return; - created = false; - implementation.destroyKeyboard(); - reset(); - } - - /** - * Polls the keyboard for its current state. Access the polled values using the - * isKeyDown method. - * By using this method, it is possible to "miss" keyboard keys if you don't - * poll fast enough. - * - * To use buffered values, you have to call next for each event you - * want to read. You can query which key caused the event by using - * getEventKey. To get the state of that key, for that event, use - * getEventKeyState - finally use getEventCharacter to get the - * character for that event. - * - * NOTE: This method does not query the operating system for new events. To do that, - * Display.processMessages() (or Display.update()) must be called first. - * - * @see Keyboard#isKeyDown(int key) - * @see Keyboard#next() - * @see Keyboard#getEventKey() - * @see Keyboard#getEventKeyState() - * @see Keyboard#getEventCharacter() - */ - public static void poll() { - if (!created) - throw new IllegalStateException("Keyboard must be created before you can poll the device"); - implementation.pollKeyboard(keyDownBuffer); - read(); - } - - private static void read() { - readBuffer.compact(); - implementation.readKeyboard(readBuffer); - readBuffer.flip(); - } - - /** - * Checks to see if a key is down. - * @param key Keycode to check - * @return true if the key is down according to the last poll() - */ - public static boolean isKeyDown(int key) { - if (!created) - throw new IllegalStateException("Keyboard must be created before you can query key state"); - if(key >= KEYBOARD_SIZE) return false; - return keyDownBuffer.get(key) != 0; - } - - /** - * Checks whether one of the state keys are "active" - * - * @param key State key to test (KEY_CAPITAL | KEY_NUMLOCK | KEY_SYSRQ) - * @return STATE_ON if on, STATE_OFF if off and STATE_UNKNOWN if the state is unknown - */ -/* public static int isStateKeySet(int key) { - if (!created) - throw new IllegalStateException("Keyboard must be created before you can query key state"); - return implementation.isStateKeySet(key); - } -*/ - /** - * Gets a key's name - * @param key The key - * @return a String with the key's human readable name in it or null if the key is unnamed - */ - public static synchronized String getKeyName(int key) { - return keyName[key]; - } - - /** - * Get's a key's index. If the key is unrecognised then KEY_NONE is returned. - * @param keyName The key name - */ - public static synchronized int getKeyIndex(String keyName) { - Integer ret = keyMap.get(keyName); - if (ret == null) - return KEY_NONE; - else - return ret; - } - - /** - * Gets the number of keyboard events waiting after doing a buffer enabled poll(). - * @return the number of keyboard events - */ - public static int getNumKeyboardEvents() { - if (!created) - throw new IllegalStateException("Keyboard must be created before you can read events"); - int old_position = readBuffer.position(); - int num_events = 0; - while (readNext(tmp_event) && (!tmp_event.repeat || repeat_enabled)) - num_events++; - readBuffer.position(old_position); - return num_events; - } - - /** - * Gets the next keyboard event. You can query which key caused the event by using - * getEventKey. To get the state of that key, for that event, use - * getEventKeyState - finally use getEventCharacter to get the - * character for that event. - * - * @see Keyboard#getEventKey() - * @see Keyboard#getEventKeyState() - * @see Keyboard#getEventCharacter() - * @return true if a keyboard event was read, false otherwise - */ - public static boolean next() { - if (!created) - throw new IllegalStateException("Keyboard must be created before you can read events"); - - boolean result; - while ((result = readNext(current_event)) && current_event.repeat && !repeat_enabled) - ; - return result; - } - - /** - * Controls whether repeat events are reported or not. If repeat events - * are enabled, key down events are reported when a key is pressed and held for - * a OS dependent amount of time. To distinguish a repeat event from a normal event, - * use isRepeatEvent(). - * - * @see Keyboard#getEventKey() - */ - public static void enableRepeatEvents(boolean enable) { - repeat_enabled = enable; - } - - /** - * Check whether repeat events are currently reported or not. - * - * @return true is repeat events are reported, false if not. - * @see Keyboard#getEventKey() - */ - public static boolean areRepeatEventsEnabled() { - return repeat_enabled; - } - - private static boolean readNext(KeyEvent event) { - if (readBuffer.hasRemaining()) { - event.key = readBuffer.getInt() & 0xFF; - event.state = readBuffer.get() != 0; - event.character = readBuffer.getInt(); - event.nanos = readBuffer.getLong(); - event.repeat = readBuffer.get() == 1; - return true; - } else - return false; - } - - /** - * @return Number of keys on this keyboard - */ - public static int getKeyCount() { - return keyCount; - } - - /** - * @return The character from the current event - */ - public static char getEventCharacter() { - return (char)current_event.character; - } - - /** - * Please note that the key code returned is NOT valid against the - * current keyboard layout. To get the actual character pressed call - * getEventCharacter - * - * @return The key from the current event - */ - public static int getEventKey() { - return current_event.key; - } - - /** - * Gets the state of the key that generated the - * current event - * - * @return True if key was down, or false if released - */ - public static boolean getEventKeyState() { - return current_event.state; - } - - /** - * Gets the time in nanoseconds of the current event. - * Only useful for relative comparisons with other - * Keyboard events, as the absolute time has no defined - * origin. - * @return The time in nanoseconds of the current event - */ - public static long getEventNanoseconds() { - return current_event.nanos; - } - - /** - * @see Keyboard#enableRepeatEvents(boolean) - * @return true if the current event is a repeat event, false if - * the current event is not a repeat even or if repeat events are disabled. - */ - public static boolean isRepeatEvent() { - return current_event.repeat; - } - - private static final class KeyEvent { - /** The current keyboard character being examined */ - private int character; - - /** The current keyboard event key being examined */ - private int key; - - /** The current state of the key being examined in the event queue */ - private boolean state; - - /** The current event time */ - private long nanos; - - /** Is the current event a repeated event? */ - private boolean repeat; - - private void reset() { - character = 0; - key = 0; - state = false; - repeat = false; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/input/Mouse.java b/LWJGL/src/main/java/org/lwjgl/input/Mouse.java deleted file mode 100644 index 1383482d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/input/Mouse.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * 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.input; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.Sys; -import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.InputImplementation; - -import java.lang.reflect.Constructor; -import java.nio.ByteBuffer; -import java.nio.IntBuffer; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.HashMap; -import java.util.Map; - - -/** - *
    - * A raw Mouse interface. This can be used to poll the current state of the - * mouse buttons, and determine the mouse movement delta since the last poll. - * - * n buttons supported, n being a native limit. A scrolly wheel is also - * supported, if one such is available. Movement is reported as delta from - * last position or as an absolute position. If the window has been created - * the absolute position will be clamped to 0 - width | height. - * - * @author cix_foo - * @author elias_naur - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public class Mouse { - /** Internal use - event size in bytes */ - public static final int EVENT_SIZE = 1 + 1 + 4 + 4 + 4 + 8; - - /** Has the mouse been created? */ - private static boolean created; - - /** The mouse buttons status from the last poll */ - private static ByteBuffer buttons; - - /** Mouse absolute X position in pixels */ - private static int x; - - /** Mouse absolute Y position in pixels */ - private static int y; - - /** Mouse absolute X position in pixels without any clipping */ - private static int absolute_x; - - /** Mouse absolute Y position in pixels without any clipping */ - private static int absolute_y; - - /** Buffer to hold the deltas dx, dy and dwheel */ - private static IntBuffer coord_buffer; - - /** Delta X */ - private static int dx; - - /** Delta Y */ - private static int dy; - - /** Delta Z */ - private static int dwheel; - - /** Number of buttons supported by the mouse */ - private static int buttonCount = -1; - - /** Does this mouse support a scroll wheel */ - private static boolean hasWheel; - - /** The current native cursor, if any */ - private static Cursor currentCursor; - - /** Button names. These are set upon create(), to names like BUTTON0, BUTTON1, etc. */ - private static String[] buttonName; - - /** hashmap of button names, for fast lookup */ - private static final Map buttonMap = new HashMap(16); - - /** Lazy initialization */ - private static boolean initialized; - - /** The mouse button events from the last read */ - private static ByteBuffer readBuffer; - - /** The current mouse event button being examined */ - private static int eventButton; - - /** The current state of the button being examined in the event queue */ - private static boolean eventState; - - /** The current delta of the mouse in the event queue */ - private static int event_dx; - private static int event_dy; - private static int event_dwheel; - /** The current absolute position of the mouse in the event queue */ - private static int event_x; - private static int event_y; - private static long event_nanos; - /** The position of the mouse it was grabbed at */ - private static int grab_x; - private static int grab_y; - /** The last absolute mouse event position (before clipping) for delta computation */ - private static int last_event_raw_x; - private static int last_event_raw_y; - - /** Buffer size in events */ - private static final int BUFFER_SIZE = 50; - - private static boolean isGrabbed; - - private static InputImplementation implementation; - private static EmptyCursorGrabListener grabListener = null; - - private static boolean clipMouseCoordinatesToWindow = !getPrivilegedBoolean("org.lwjgl.input.Mouse.allowNegativeMouseCoords"); - - static { - try { - Class infdevMouse = Class.forName("org.lwjgl.input.InfdevMouse"); - Constructor constructor = infdevMouse.getConstructor(); - grabListener = (EmptyCursorGrabListener) constructor.newInstance(); - } catch (Throwable e) { - e.printStackTrace(); - } - } - - /** - * Mouse cannot be constructed. - */ - private Mouse() { - } - - /** - * Gets the currently bound native cursor, if any. - * - * @return the currently bound native cursor, if any. - */ - public static Cursor getNativeCursor() { - return currentCursor; - } - - /** - * Binds a native cursor. If the cursor argument is null, any - * currently bound native cursor is disabled, and the cursor reverts - * to the default operating system supplied cursor. - * - * NOTE: The native cursor is not constrained to the window, but - * relative events will not be generated if the cursor is outside. - * - * @param cursor the native cursor object to bind. May be null. - * @return The previous Cursor object set, or null. - * @throws LWJGLException if the cursor could not be set for any reason - */ - public static Cursor setNativeCursor(Cursor cursor) throws LWJGLException { - //dummy - if (cursor == null && currentCursor.isEmpty()) { - Mouse.setGrabbed(false); - if (grabListener != null) grabListener.onGrab(false); - } - if (cursor != null && cursor.isEmpty()) { - Mouse.setGrabbed(true); - if (grabListener != null) grabListener.onGrab(true); - } - currentCursor = cursor; - return currentCursor; - } - - public static boolean isClipMouseCoordinatesToWindow() { - return clipMouseCoordinatesToWindow; - } - - public static void setClipMouseCoordinatesToWindow(boolean clip) { - clipMouseCoordinatesToWindow = clip; - } - - /** - * Set the position of the cursor. If the cursor is not grabbed, - * the native cursor is moved to the new position. - * - * @param new_x The x coordinate of the new cursor position in OpenGL coordinates relative - * to the window origin. - * @param new_y The y coordinate of the new cursor position in OpenGL coordinates relative - * to the window origin. - */ - public static void setCursorPosition(int new_x, int new_y) { - //dummy - LWJGLUtil.log("setCursorPosition"); - } - - /** - * Static initialization - */ - private static void initialize() { - Sys.initialize(); - - // Assign names to all the buttons - buttonName = new String[16]; - for (int i = 0; i < 16; i++) { - buttonName[i] = "BUTTON" + i; - buttonMap.put(buttonName[i], i); - } - - initialized = true; - } - - private static void resetMouse() { - dx = dy = dwheel = 0; - readBuffer.position(readBuffer.limit()); - } - - static InputImplementation getImplementation() { - return implementation; - } - - /** - * "Create" the mouse with the given custom implementation. This is used - * reflectively by AWTInputAdapter. - * - * @throws LWJGLException if the mouse could not be created for any reason - */ - private static void create(InputImplementation impl) throws LWJGLException { - if (created) - return; - if (!initialized) - initialize(); - implementation = impl; - implementation.createMouse(); - hasWheel = implementation.hasWheel(); - created = true; - - // set mouse buttons - buttonCount = implementation.getButtonCount(); - buttons = BufferUtils.createByteBuffer(buttonCount); - coord_buffer = BufferUtils.createIntBuffer(3); - if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0) - setNativeCursor(currentCursor); - readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE); - readBuffer.limit(0); - setGrabbed(isGrabbed); - } - - /** - * "Create" the mouse. The display must first have been created. - * Initially, the mouse is not grabbed and the delta values are reported - * with respect to the center of the display. - * - * @throws LWJGLException if the mouse could not be created for any reason - */ - public static void create() throws LWJGLException { - if (!Display.isCreated()) throw new IllegalStateException("Display must be created."); - - create((InputImplementation) GLFWInputImplementation.singleton); - } - - /** - * @return true if the mouse has been created - */ - public static boolean isCreated() { - return created; - } - - /** - * "Destroy" the mouse. - */ - public static void destroy() { - if (!created) return; - created = false; - buttons = null; - coord_buffer = null; - - implementation.destroyMouse(); - } - - /** - * Polls the mouse for its current state. Access the polled values using the - * get methods. - * By using this method, it is possible to "miss" mouse click events if you don't - * poll fast enough. - * - * To use buffered values, you have to call next for each event you - * want to read. You can query which button caused the event by using - * getEventButton. To get the state of that button, for that event, use - * getEventButtonState. - * - * NOTE: This method does not query the operating system for new events. To do that, - * Display.processMessages() (or Display.update()) must be called first. - * - * @see Mouse#next() - * @see Mouse#getEventButton() - * @see Mouse#getEventButtonState() - * @see Mouse#isButtonDown(int button) - * @see Mouse#getX() - * @see Mouse#getY() - * @see Mouse#getDX() - * @see Mouse#getDY() - * @see Mouse#getDWheel() - */ - public static void poll() { - if (!created) throw new IllegalStateException("Mouse must be created before you can poll it"); - implementation.pollMouse(coord_buffer, buttons); - - /* If we're grabbed, poll returns mouse deltas, if not it returns absolute coordinates */ - int poll_coord1 = coord_buffer.get(0); - int poll_coord2 = coord_buffer.get(1); - /* The wheel is always relative */ - int poll_dwheel = coord_buffer.get(2); - - if (isGrabbed()) { - dx += poll_coord1; - dy += poll_coord2; - x += poll_coord1; - y += poll_coord2; - absolute_x += poll_coord1; - absolute_y += poll_coord2; - } else { - dx = poll_coord1 - absolute_x; - dy = poll_coord2 - absolute_y; - absolute_x = x = poll_coord1; - absolute_y = y = poll_coord2; - } - - if (clipMouseCoordinatesToWindow) { - x = Math.min(Display.getWidth() - 1, Math.max(0, x)); - y = Math.min(Display.getHeight() - 1, Math.max(0, y)); - } - - dwheel += poll_dwheel; - read(); - } - - private static void read() { - readBuffer.compact(); - implementation.readMouse(readBuffer); - readBuffer.flip(); - } - - /** - * See if a particular mouse button is down. - * - * @param button The index of the button you wish to test (0..getButtonCount-1) - * @return true if the specified button is down - */ - public static boolean isButtonDown(int button) { - if (!created) throw new IllegalStateException("Mouse must be created before you can poll the button state"); - if (button >= buttonCount || button < 0) - return false; - else - return buttons.get(button) == 1; - } - - /** - * Gets a button's name - * @param button The button - * @return a String with the button's human readable name in it or null if the button is unnamed - */ - public static String getButtonName(int button) { - if (button >= buttonName.length || button < 0) - return null; - else - return buttonName[button]; - } - - /** - * Get's a button's index. If the button is unrecognised then -1 is returned. - * @param buttonName The button name - */ - public static int getButtonIndex(String buttonName) { - Integer ret = buttonMap.get(buttonName); - if (ret == null) - return -1; - else - return ret; - } - - /** - * Gets the next mouse event. You can query which button caused the event by using - * getEventButton() (if any). To get the state of that key, for that event, use - * getEventButtonState. To get the current mouse delta values use getEventDX() - * and getEventDY(). - * @see Mouse#getEventButton() - * @see Mouse#getEventButtonState() - * @return true if a mouse event was read, false otherwise - */ - public static boolean next() { - if (!created) throw new IllegalStateException("Mouse must be created before you can read events"); - if (readBuffer.hasRemaining()) { - - eventButton = readBuffer.get(); - eventState = readBuffer.get() != 0; - if (isGrabbed()) { - event_dx = readBuffer.getInt(); - event_dy = readBuffer.getInt(); - event_x += event_dx; - event_y += event_dy; - last_event_raw_x = event_x; - last_event_raw_y = event_y; - } else { - int new_event_x = readBuffer.getInt(); - int new_event_y = readBuffer.getInt(); - event_dx = new_event_x - last_event_raw_x; - event_dy = new_event_y - last_event_raw_y; - event_x = new_event_x; - event_y = new_event_y; - last_event_raw_x = new_event_x; - last_event_raw_y = new_event_y; - } - if(clipMouseCoordinatesToWindow) { - event_x = Math.min(Display.getWidth() - 1, Math.max(0, event_x)); - event_y = Math.min(Display.getHeight() - 1, Math.max(0, event_y)); - } - event_dwheel = readBuffer.getInt(); - event_nanos = readBuffer.getLong(); - return true; - } else - return false; - } - - /** - * @return Current events button. Returns -1 if no button state was changed - */ - public static int getEventButton() { - return eventButton; - } - - /** - * Get the current events button state. - * @return Current events button state. - */ - public static boolean getEventButtonState() { - return eventState; - } - - /** - * @return Current events delta x. - */ - public static int getEventDX() { - return event_dx; - } - - /** - * @return Current events delta y. - */ - public static int getEventDY() { - return event_dy; - } - - /** - * @return Current events absolute x. - */ - public static int getEventX() { - return event_x; - } - - /** - * @return Current events absolute y. - */ - public static int getEventY() { - return event_y; - } - - /** - * @return Current events delta z - */ - public static int getEventDWheel() { - return event_dwheel; - } - - /** - * Gets the time in nanoseconds of the current event. - * Only useful for relative comparisons with other - * Mouse events, as the absolute time has no defined - * origin. - * - * @return The time in nanoseconds of the current event - */ - public static long getEventNanoseconds() { - return event_nanos; - } - - /** - * Retrieves the absolute position. It will be clamped to - * 0...width-1. - * - * @return Absolute x axis position of mouse - */ - public static int getX() { - return x; - } - - /** - * Retrieves the absolute position. It will be clamped to - * 0...height-1. - * - * @return Absolute y axis position of mouse - */ - public static int getY() { - return y; - } - - /** - * @return Movement on the x axis since last time getDX() was called. - */ - public static int getDX() { - int result = dx; - dx = 0; - return result; - } - - /** - * @return Movement on the y axis since last time getDY() was called. - */ - public static int getDY() { - int result = dy; - dy = 0; - return result; - } - - /** - * @return Movement of the wheel since last time getDWheel() was called - */ - public static int getDWheel() { - int result = dwheel; - dwheel = 0; - return result; - } - - /** - * @return Number of buttons on this mouse - */ - public static int getButtonCount() { - return buttonCount; - } - - /** - * @return Whether or not this mouse has wheel support - */ - public static boolean hasWheel() { - return hasWheel; - } - - /** - * @return whether or not the mouse has grabbed the cursor - */ - public static boolean isGrabbed() { - return isGrabbed; - } - - /** - * Sets whether or not the mouse has grabbed the cursor - * (and thus hidden). If grab is false, the getX() and getY() - * will return delta movement in pixels clamped to the display - * dimensions, from the center of the display. - * - * @param grab whether the mouse should be grabbed - */ - public static void setGrabbed(boolean grab) { - boolean grabbed = isGrabbed; - isGrabbed = grab; - if (isCreated()) { - if (grab && !grabbed) { - // store location mouse was grabbed - grab_x = x; - grab_y = y; - } - else if (!grab && grabbed) { - // move mouse back to location it was grabbed before ungrabbing - if ((Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) != 0) - implementation.setCursorPosition(grab_x, grab_y); - } - - implementation.grabMouse(grab); - // Get latest values from native side - poll(); - event_x = x; - event_y = y; - last_event_raw_x = x; - last_event_raw_y = y; - resetMouse(); - } - } - - /** - * Updates the cursor, so that animation can be changed if needed. - * This method is called automatically by the window on its update, and - * shouldn't be called otherwise - */ - public static void updateCursor() { - //dummy - } - - /** Gets a boolean property as a privileged action. */ - static boolean getPrivilegedBoolean(final String property_name) { - Boolean value = AccessController.doPrivileged(new PrivilegedAction() { - public Boolean run() { - return Boolean.getBoolean(property_name); - } - }); - return value; - } - - /** - * Retrieves whether or not the mouse cursor is within the bounds of the window. - * If the mouse cursor was moved outside the display during a drag, then the result of calling - * this method will be true until the button is released. - * @return true if mouse is inside display, false otherwise. - */ - public static boolean isInsideWindow() { - return implementation.isInsideWindow(); - } - - /* - * Package private methods to get the absolute unclipped X/Y coordiates - */ - /*package-private*/ static int getAbsoluteX() { - return absolute_x; - } - /*package-private*/ static int getAbsoluteY() { - return absolute_y; - } - - interface EmptyCursorGrabListener { - void onGrab(boolean grabbing); - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/BNDnodeTheme.java b/LWJGL/src/main/java/org/lwjgl/nanovg/BNDnodeTheme.java deleted file mode 100644 index f344774d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/BNDnodeTheme.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Describes the theme used to draw nodes. - * - *

    Layout

    - * - *
    
    - * struct BNDnodeTheme {
    - *     {@link NVGColor NVGcolor} {@link #nodeSelectedColor};
    - *     {@link NVGColor NVGcolor} {@link #wiresColor};
    - *     {@link NVGColor NVGcolor} {@link #textSelectedColor};
    - *     {@link NVGColor NVGcolor} {@link #activeNodeColor};
    - *     {@link NVGColor NVGcolor} {@link #wireSelectColor};
    - *     {@link NVGColor NVGcolor} {@link #nodeBackdropColor};
    - *     int {@link #noodleCurving};
    - * }
    - */ -public class BNDnodeTheme extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NODESELECTEDCOLOR, - WIRESCOLOR, - TEXTSELECTEDCOLOR, - ACTIVENODECOLOR, - WIRESELECTCOLOR, - NODEBACKDROPCOLOR, - NOODLECURVING; - - static { - Layout layout = __struct( - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NODESELECTEDCOLOR = layout.offsetof(0); - WIRESCOLOR = layout.offsetof(1); - TEXTSELECTEDCOLOR = layout.offsetof(2); - ACTIVENODECOLOR = layout.offsetof(3); - WIRESELECTCOLOR = layout.offsetof(4); - NODEBACKDROPCOLOR = layout.offsetof(5); - NOODLECURVING = layout.offsetof(6); - } - - protected BNDnodeTheme(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected BNDnodeTheme create(long address, @Nullable ByteBuffer container) { - return new BNDnodeTheme(address, container); - } - - /** - * Creates a {@code BNDnodeTheme} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public BNDnodeTheme(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** inner color of selected node (and downarrow) */ - @NativeType("NVGcolor") - public NVGColor nodeSelectedColor() { return nnodeSelectedColor(address()); } - /** outline of wires */ - @NativeType("NVGcolor") - public NVGColor wiresColor() { return nwiresColor(address()); } - /** color of text label when active */ - @NativeType("NVGcolor") - public NVGColor textSelectedColor() { return ntextSelectedColor(address()); } - /** inner color of active node (and dragged wire) */ - @NativeType("NVGcolor") - public NVGColor activeNodeColor() { return nactiveNodeColor(address()); } - /** color of selected wire */ - @NativeType("NVGcolor") - public NVGColor wireSelectColor() { return nwireSelectColor(address()); } - /** color of background of node */ - @NativeType("NVGcolor") - public NVGColor nodeBackdropColor() { return nnodeBackdropColor(address()); } - /** how much a noodle curves (0 to 10) */ - public int noodleCurving() { return nnoodleCurving(address()); } - - /** Copies the specified {@link NVGColor} to the {@link #nodeSelectedColor} field. */ - public BNDnodeTheme nodeSelectedColor(@NativeType("NVGcolor") NVGColor value) { nnodeSelectedColor(address(), value); return this; } - /** Passes the {@link #nodeSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDnodeTheme nodeSelectedColor(java.util.function.Consumer consumer) { consumer.accept(nodeSelectedColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #wiresColor} field. */ - public BNDnodeTheme wiresColor(@NativeType("NVGcolor") NVGColor value) { nwiresColor(address(), value); return this; } - /** Passes the {@link #wiresColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDnodeTheme wiresColor(java.util.function.Consumer consumer) { consumer.accept(wiresColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #textSelectedColor} field. */ - public BNDnodeTheme textSelectedColor(@NativeType("NVGcolor") NVGColor value) { ntextSelectedColor(address(), value); return this; } - /** Passes the {@link #textSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDnodeTheme textSelectedColor(java.util.function.Consumer consumer) { consumer.accept(textSelectedColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #activeNodeColor} field. */ - public BNDnodeTheme activeNodeColor(@NativeType("NVGcolor") NVGColor value) { nactiveNodeColor(address(), value); return this; } - /** Passes the {@link #activeNodeColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDnodeTheme activeNodeColor(java.util.function.Consumer consumer) { consumer.accept(activeNodeColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #wireSelectColor} field. */ - public BNDnodeTheme wireSelectColor(@NativeType("NVGcolor") NVGColor value) { nwireSelectColor(address(), value); return this; } - /** Passes the {@link #wireSelectColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDnodeTheme wireSelectColor(java.util.function.Consumer consumer) { consumer.accept(wireSelectColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #nodeBackdropColor} field. */ - public BNDnodeTheme nodeBackdropColor(@NativeType("NVGcolor") NVGColor value) { nnodeBackdropColor(address(), value); return this; } - /** Passes the {@link #nodeBackdropColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDnodeTheme nodeBackdropColor(java.util.function.Consumer consumer) { consumer.accept(nodeBackdropColor()); return this; } - /** Sets the specified value to the {@link #noodleCurving} field. */ - public BNDnodeTheme noodleCurving(int value) { nnoodleCurving(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public BNDnodeTheme set( - NVGColor nodeSelectedColor, - NVGColor wiresColor, - NVGColor textSelectedColor, - NVGColor activeNodeColor, - NVGColor wireSelectColor, - NVGColor nodeBackdropColor, - int noodleCurving - ) { - nodeSelectedColor(nodeSelectedColor); - wiresColor(wiresColor); - textSelectedColor(textSelectedColor); - activeNodeColor(activeNodeColor); - wireSelectColor(wireSelectColor); - nodeBackdropColor(nodeBackdropColor); - noodleCurving(noodleCurving); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public BNDnodeTheme set(BNDnodeTheme src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code BNDnodeTheme} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static BNDnodeTheme malloc() { - return new BNDnodeTheme(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code BNDnodeTheme} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static BNDnodeTheme calloc() { - return new BNDnodeTheme(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code BNDnodeTheme} instance allocated with {@link BufferUtils}. */ - public static BNDnodeTheme create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new BNDnodeTheme(memAddress(container), container); - } - - /** Returns a new {@code BNDnodeTheme} instance for the specified memory address. */ - public static BNDnodeTheme create(long address) { - return new BNDnodeTheme(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static BNDnodeTheme createSafe(long address) { - return address == NULL ? null : new BNDnodeTheme(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static BNDnodeTheme mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static BNDnodeTheme callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static BNDnodeTheme mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static BNDnodeTheme callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code BNDnodeTheme} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static BNDnodeTheme malloc(MemoryStack stack) { - return new BNDnodeTheme(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code BNDnodeTheme} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static BNDnodeTheme calloc(MemoryStack stack) { - return new BNDnodeTheme(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #nodeSelectedColor}. */ - public static NVGColor nnodeSelectedColor(long struct) { return NVGColor.create(struct + BNDnodeTheme.NODESELECTEDCOLOR); } - /** Unsafe version of {@link #wiresColor}. */ - public static NVGColor nwiresColor(long struct) { return NVGColor.create(struct + BNDnodeTheme.WIRESCOLOR); } - /** Unsafe version of {@link #textSelectedColor}. */ - public static NVGColor ntextSelectedColor(long struct) { return NVGColor.create(struct + BNDnodeTheme.TEXTSELECTEDCOLOR); } - /** Unsafe version of {@link #activeNodeColor}. */ - public static NVGColor nactiveNodeColor(long struct) { return NVGColor.create(struct + BNDnodeTheme.ACTIVENODECOLOR); } - /** Unsafe version of {@link #wireSelectColor}. */ - public static NVGColor nwireSelectColor(long struct) { return NVGColor.create(struct + BNDnodeTheme.WIRESELECTCOLOR); } - /** Unsafe version of {@link #nodeBackdropColor}. */ - public static NVGColor nnodeBackdropColor(long struct) { return NVGColor.create(struct + BNDnodeTheme.NODEBACKDROPCOLOR); } - /** Unsafe version of {@link #noodleCurving}. */ - public static int nnoodleCurving(long struct) { return UNSAFE.getInt(null, struct + BNDnodeTheme.NOODLECURVING); } - - /** Unsafe version of {@link #nodeSelectedColor(NVGColor) nodeSelectedColor}. */ - public static void nnodeSelectedColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDnodeTheme.NODESELECTEDCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #wiresColor(NVGColor) wiresColor}. */ - public static void nwiresColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDnodeTheme.WIRESCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #textSelectedColor(NVGColor) textSelectedColor}. */ - public static void ntextSelectedColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDnodeTheme.TEXTSELECTEDCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #activeNodeColor(NVGColor) activeNodeColor}. */ - public static void nactiveNodeColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDnodeTheme.ACTIVENODECOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #wireSelectColor(NVGColor) wireSelectColor}. */ - public static void nwireSelectColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDnodeTheme.WIRESELECTCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #nodeBackdropColor(NVGColor) nodeBackdropColor}. */ - public static void nnodeBackdropColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDnodeTheme.NODEBACKDROPCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #noodleCurving(int) noodleCurving}. */ - public static void nnoodleCurving(long struct, int value) { UNSAFE.putInt(null, struct + BNDnodeTheme.NOODLECURVING, value); } - - // ----------------------------------- - - /** An array of {@link BNDnodeTheme} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final BNDnodeTheme ELEMENT_FACTORY = BNDnodeTheme.create(-1L); - - /** - * Creates a new {@code BNDnodeTheme.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link BNDnodeTheme#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected BNDnodeTheme getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link NVGColor} view of the {@link BNDnodeTheme#nodeSelectedColor} field. */ - @NativeType("NVGcolor") - public NVGColor nodeSelectedColor() { return BNDnodeTheme.nnodeSelectedColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDnodeTheme#wiresColor} field. */ - @NativeType("NVGcolor") - public NVGColor wiresColor() { return BNDnodeTheme.nwiresColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDnodeTheme#textSelectedColor} field. */ - @NativeType("NVGcolor") - public NVGColor textSelectedColor() { return BNDnodeTheme.ntextSelectedColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDnodeTheme#activeNodeColor} field. */ - @NativeType("NVGcolor") - public NVGColor activeNodeColor() { return BNDnodeTheme.nactiveNodeColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDnodeTheme#wireSelectColor} field. */ - @NativeType("NVGcolor") - public NVGColor wireSelectColor() { return BNDnodeTheme.nwireSelectColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDnodeTheme#nodeBackdropColor} field. */ - @NativeType("NVGcolor") - public NVGColor nodeBackdropColor() { return BNDnodeTheme.nnodeBackdropColor(address()); } - /** @return the value of the {@link BNDnodeTheme#noodleCurving} field. */ - public int noodleCurving() { return BNDnodeTheme.nnoodleCurving(address()); } - - /** Copies the specified {@link NVGColor} to the {@link BNDnodeTheme#nodeSelectedColor} field. */ - public Buffer nodeSelectedColor(@NativeType("NVGcolor") NVGColor value) { BNDnodeTheme.nnodeSelectedColor(address(), value); return this; } - /** Passes the {@link BNDnodeTheme#nodeSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer nodeSelectedColor(java.util.function.Consumer consumer) { consumer.accept(nodeSelectedColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDnodeTheme#wiresColor} field. */ - public Buffer wiresColor(@NativeType("NVGcolor") NVGColor value) { BNDnodeTheme.nwiresColor(address(), value); return this; } - /** Passes the {@link BNDnodeTheme#wiresColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer wiresColor(java.util.function.Consumer consumer) { consumer.accept(wiresColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDnodeTheme#textSelectedColor} field. */ - public Buffer textSelectedColor(@NativeType("NVGcolor") NVGColor value) { BNDnodeTheme.ntextSelectedColor(address(), value); return this; } - /** Passes the {@link BNDnodeTheme#textSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer textSelectedColor(java.util.function.Consumer consumer) { consumer.accept(textSelectedColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDnodeTheme#activeNodeColor} field. */ - public Buffer activeNodeColor(@NativeType("NVGcolor") NVGColor value) { BNDnodeTheme.nactiveNodeColor(address(), value); return this; } - /** Passes the {@link BNDnodeTheme#activeNodeColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer activeNodeColor(java.util.function.Consumer consumer) { consumer.accept(activeNodeColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDnodeTheme#wireSelectColor} field. */ - public Buffer wireSelectColor(@NativeType("NVGcolor") NVGColor value) { BNDnodeTheme.nwireSelectColor(address(), value); return this; } - /** Passes the {@link BNDnodeTheme#wireSelectColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer wireSelectColor(java.util.function.Consumer consumer) { consumer.accept(wireSelectColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDnodeTheme#nodeBackdropColor} field. */ - public Buffer nodeBackdropColor(@NativeType("NVGcolor") NVGColor value) { BNDnodeTheme.nnodeBackdropColor(address(), value); return this; } - /** Passes the {@link BNDnodeTheme#nodeBackdropColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer nodeBackdropColor(java.util.function.Consumer consumer) { consumer.accept(nodeBackdropColor()); return this; } - /** Sets the specified value to the {@link BNDnodeTheme#noodleCurving} field. */ - public Buffer noodleCurving(int value) { BNDnodeTheme.nnoodleCurving(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/BNDtheme.java b/LWJGL/src/main/java/org/lwjgl/nanovg/BNDtheme.java deleted file mode 100644 index 7f53cc38..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/BNDtheme.java +++ /dev/null @@ -1,576 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Describes the theme used to draw widgets. - * - *

    Layout

    - * - *
    
    - * struct BNDtheme {
    - *     {@link NVGColor NVGcolor} {@link #backgroundColor};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #regularTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #toolTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #radioTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #textFieldTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #optionTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #choiceTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #numberFieldTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #sliderTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #scrollBarTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #tooltipTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #menuTheme};
    - *     {@link BNDwidgetTheme BNDwidgetTheme} {@link #menuItemTheme};
    - *     {@link BNDnodeTheme BNDnodeTheme} {@link #nodeTheme};
    - * }
    - */ -public class BNDtheme extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BACKGROUNDCOLOR, - REGULARTHEME, - TOOLTHEME, - RADIOTHEME, - TEXTFIELDTHEME, - OPTIONTHEME, - CHOICETHEME, - NUMBERFIELDTHEME, - SLIDERTHEME, - SCROLLBARTHEME, - TOOLTIPTHEME, - MENUTHEME, - MENUITEMTHEME, - NODETHEME; - - static { - Layout layout = __struct( - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDwidgetTheme.SIZEOF, BNDwidgetTheme.ALIGNOF), - __member(BNDnodeTheme.SIZEOF, BNDnodeTheme.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BACKGROUNDCOLOR = layout.offsetof(0); - REGULARTHEME = layout.offsetof(1); - TOOLTHEME = layout.offsetof(2); - RADIOTHEME = layout.offsetof(3); - TEXTFIELDTHEME = layout.offsetof(4); - OPTIONTHEME = layout.offsetof(5); - CHOICETHEME = layout.offsetof(6); - NUMBERFIELDTHEME = layout.offsetof(7); - SLIDERTHEME = layout.offsetof(8); - SCROLLBARTHEME = layout.offsetof(9); - TOOLTIPTHEME = layout.offsetof(10); - MENUTHEME = layout.offsetof(11); - MENUITEMTHEME = layout.offsetof(12); - NODETHEME = layout.offsetof(13); - } - - protected BNDtheme(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected BNDtheme create(long address, @Nullable ByteBuffer container) { - return new BNDtheme(address, container); - } - - /** - * Creates a {@code BNDtheme} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public BNDtheme(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the background color of panels and windows */ - @NativeType("NVGcolor") - public NVGColor backgroundColor() { return nbackgroundColor(address()); } - /** theme for labels */ - public BNDwidgetTheme regularTheme() { return nregularTheme(address()); } - /** theme for tool buttons */ - public BNDwidgetTheme toolTheme() { return ntoolTheme(address()); } - /** theme for radio buttons */ - public BNDwidgetTheme radioTheme() { return nradioTheme(address()); } - /** theme for text fields */ - public BNDwidgetTheme textFieldTheme() { return ntextFieldTheme(address()); } - /** theme for option buttons (checkboxes) */ - public BNDwidgetTheme optionTheme() { return noptionTheme(address()); } - /** theme for choice buttons (comboboxes) Blender calls them "menu buttons" */ - public BNDwidgetTheme choiceTheme() { return nchoiceTheme(address()); } - /** theme for number fields */ - public BNDwidgetTheme numberFieldTheme() { return nnumberFieldTheme(address()); } - /** theme for slider controls */ - public BNDwidgetTheme sliderTheme() { return nsliderTheme(address()); } - /** theme for scrollbars */ - public BNDwidgetTheme scrollBarTheme() { return nscrollBarTheme(address()); } - /** theme for tooltips */ - public BNDwidgetTheme tooltipTheme() { return ntooltipTheme(address()); } - /** theme for menu backgrounds */ - public BNDwidgetTheme menuTheme() { return nmenuTheme(address()); } - /** theme for menu items */ - public BNDwidgetTheme menuItemTheme() { return nmenuItemTheme(address()); } - /** theme for nodes */ - public BNDnodeTheme nodeTheme() { return nnodeTheme(address()); } - - /** Copies the specified {@link NVGColor} to the {@link #backgroundColor} field. */ - public BNDtheme backgroundColor(@NativeType("NVGcolor") NVGColor value) { nbackgroundColor(address(), value); return this; } - /** Passes the {@link #backgroundColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme backgroundColor(java.util.function.Consumer consumer) { consumer.accept(backgroundColor()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #regularTheme} field. */ - public BNDtheme regularTheme(BNDwidgetTheme value) { nregularTheme(address(), value); return this; } - /** Passes the {@link #regularTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme regularTheme(java.util.function.Consumer consumer) { consumer.accept(regularTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #toolTheme} field. */ - public BNDtheme toolTheme(BNDwidgetTheme value) { ntoolTheme(address(), value); return this; } - /** Passes the {@link #toolTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme toolTheme(java.util.function.Consumer consumer) { consumer.accept(toolTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #radioTheme} field. */ - public BNDtheme radioTheme(BNDwidgetTheme value) { nradioTheme(address(), value); return this; } - /** Passes the {@link #radioTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme radioTheme(java.util.function.Consumer consumer) { consumer.accept(radioTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #textFieldTheme} field. */ - public BNDtheme textFieldTheme(BNDwidgetTheme value) { ntextFieldTheme(address(), value); return this; } - /** Passes the {@link #textFieldTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme textFieldTheme(java.util.function.Consumer consumer) { consumer.accept(textFieldTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #optionTheme} field. */ - public BNDtheme optionTheme(BNDwidgetTheme value) { noptionTheme(address(), value); return this; } - /** Passes the {@link #optionTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme optionTheme(java.util.function.Consumer consumer) { consumer.accept(optionTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #choiceTheme} field. */ - public BNDtheme choiceTheme(BNDwidgetTheme value) { nchoiceTheme(address(), value); return this; } - /** Passes the {@link #choiceTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme choiceTheme(java.util.function.Consumer consumer) { consumer.accept(choiceTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #numberFieldTheme} field. */ - public BNDtheme numberFieldTheme(BNDwidgetTheme value) { nnumberFieldTheme(address(), value); return this; } - /** Passes the {@link #numberFieldTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme numberFieldTheme(java.util.function.Consumer consumer) { consumer.accept(numberFieldTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #sliderTheme} field. */ - public BNDtheme sliderTheme(BNDwidgetTheme value) { nsliderTheme(address(), value); return this; } - /** Passes the {@link #sliderTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme sliderTheme(java.util.function.Consumer consumer) { consumer.accept(sliderTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #scrollBarTheme} field. */ - public BNDtheme scrollBarTheme(BNDwidgetTheme value) { nscrollBarTheme(address(), value); return this; } - /** Passes the {@link #scrollBarTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme scrollBarTheme(java.util.function.Consumer consumer) { consumer.accept(scrollBarTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #tooltipTheme} field. */ - public BNDtheme tooltipTheme(BNDwidgetTheme value) { ntooltipTheme(address(), value); return this; } - /** Passes the {@link #tooltipTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme tooltipTheme(java.util.function.Consumer consumer) { consumer.accept(tooltipTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #menuTheme} field. */ - public BNDtheme menuTheme(BNDwidgetTheme value) { nmenuTheme(address(), value); return this; } - /** Passes the {@link #menuTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme menuTheme(java.util.function.Consumer consumer) { consumer.accept(menuTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link #menuItemTheme} field. */ - public BNDtheme menuItemTheme(BNDwidgetTheme value) { nmenuItemTheme(address(), value); return this; } - /** Passes the {@link #menuItemTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme menuItemTheme(java.util.function.Consumer consumer) { consumer.accept(menuItemTheme()); return this; } - /** Copies the specified {@link BNDnodeTheme} to the {@link #nodeTheme} field. */ - public BNDtheme nodeTheme(BNDnodeTheme value) { nnodeTheme(address(), value); return this; } - /** Passes the {@link #nodeTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDtheme nodeTheme(java.util.function.Consumer consumer) { consumer.accept(nodeTheme()); return this; } - - /** Initializes this struct with the specified values. */ - public BNDtheme set( - NVGColor backgroundColor, - BNDwidgetTheme regularTheme, - BNDwidgetTheme toolTheme, - BNDwidgetTheme radioTheme, - BNDwidgetTheme textFieldTheme, - BNDwidgetTheme optionTheme, - BNDwidgetTheme choiceTheme, - BNDwidgetTheme numberFieldTheme, - BNDwidgetTheme sliderTheme, - BNDwidgetTheme scrollBarTheme, - BNDwidgetTheme tooltipTheme, - BNDwidgetTheme menuTheme, - BNDwidgetTheme menuItemTheme, - BNDnodeTheme nodeTheme - ) { - backgroundColor(backgroundColor); - regularTheme(regularTheme); - toolTheme(toolTheme); - radioTheme(radioTheme); - textFieldTheme(textFieldTheme); - optionTheme(optionTheme); - choiceTheme(choiceTheme); - numberFieldTheme(numberFieldTheme); - sliderTheme(sliderTheme); - scrollBarTheme(scrollBarTheme); - tooltipTheme(tooltipTheme); - menuTheme(menuTheme); - menuItemTheme(menuItemTheme); - nodeTheme(nodeTheme); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public BNDtheme set(BNDtheme src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code BNDtheme} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static BNDtheme malloc() { - return new BNDtheme(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code BNDtheme} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static BNDtheme calloc() { - return new BNDtheme(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code BNDtheme} instance allocated with {@link BufferUtils}. */ - public static BNDtheme create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new BNDtheme(memAddress(container), container); - } - - /** Returns a new {@code BNDtheme} instance for the specified memory address. */ - public static BNDtheme create(long address) { - return new BNDtheme(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static BNDtheme createSafe(long address) { - return address == NULL ? null : new BNDtheme(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static BNDtheme mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static BNDtheme callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static BNDtheme mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static BNDtheme callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code BNDtheme} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static BNDtheme malloc(MemoryStack stack) { - return new BNDtheme(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code BNDtheme} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static BNDtheme calloc(MemoryStack stack) { - return new BNDtheme(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #backgroundColor}. */ - public static NVGColor nbackgroundColor(long struct) { return NVGColor.create(struct + BNDtheme.BACKGROUNDCOLOR); } - /** Unsafe version of {@link #regularTheme}. */ - public static BNDwidgetTheme nregularTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.REGULARTHEME); } - /** Unsafe version of {@link #toolTheme}. */ - public static BNDwidgetTheme ntoolTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.TOOLTHEME); } - /** Unsafe version of {@link #radioTheme}. */ - public static BNDwidgetTheme nradioTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.RADIOTHEME); } - /** Unsafe version of {@link #textFieldTheme}. */ - public static BNDwidgetTheme ntextFieldTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.TEXTFIELDTHEME); } - /** Unsafe version of {@link #optionTheme}. */ - public static BNDwidgetTheme noptionTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.OPTIONTHEME); } - /** Unsafe version of {@link #choiceTheme}. */ - public static BNDwidgetTheme nchoiceTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.CHOICETHEME); } - /** Unsafe version of {@link #numberFieldTheme}. */ - public static BNDwidgetTheme nnumberFieldTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.NUMBERFIELDTHEME); } - /** Unsafe version of {@link #sliderTheme}. */ - public static BNDwidgetTheme nsliderTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.SLIDERTHEME); } - /** Unsafe version of {@link #scrollBarTheme}. */ - public static BNDwidgetTheme nscrollBarTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.SCROLLBARTHEME); } - /** Unsafe version of {@link #tooltipTheme}. */ - public static BNDwidgetTheme ntooltipTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.TOOLTIPTHEME); } - /** Unsafe version of {@link #menuTheme}. */ - public static BNDwidgetTheme nmenuTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.MENUTHEME); } - /** Unsafe version of {@link #menuItemTheme}. */ - public static BNDwidgetTheme nmenuItemTheme(long struct) { return BNDwidgetTheme.create(struct + BNDtheme.MENUITEMTHEME); } - /** Unsafe version of {@link #nodeTheme}. */ - public static BNDnodeTheme nnodeTheme(long struct) { return BNDnodeTheme.create(struct + BNDtheme.NODETHEME); } - - /** Unsafe version of {@link #backgroundColor(NVGColor) backgroundColor}. */ - public static void nbackgroundColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDtheme.BACKGROUNDCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #regularTheme(BNDwidgetTheme) regularTheme}. */ - public static void nregularTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.REGULARTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #toolTheme(BNDwidgetTheme) toolTheme}. */ - public static void ntoolTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.TOOLTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #radioTheme(BNDwidgetTheme) radioTheme}. */ - public static void nradioTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.RADIOTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #textFieldTheme(BNDwidgetTheme) textFieldTheme}. */ - public static void ntextFieldTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.TEXTFIELDTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #optionTheme(BNDwidgetTheme) optionTheme}. */ - public static void noptionTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.OPTIONTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #choiceTheme(BNDwidgetTheme) choiceTheme}. */ - public static void nchoiceTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.CHOICETHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #numberFieldTheme(BNDwidgetTheme) numberFieldTheme}. */ - public static void nnumberFieldTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.NUMBERFIELDTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #sliderTheme(BNDwidgetTheme) sliderTheme}. */ - public static void nsliderTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.SLIDERTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #scrollBarTheme(BNDwidgetTheme) scrollBarTheme}. */ - public static void nscrollBarTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.SCROLLBARTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #tooltipTheme(BNDwidgetTheme) tooltipTheme}. */ - public static void ntooltipTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.TOOLTIPTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #menuTheme(BNDwidgetTheme) menuTheme}. */ - public static void nmenuTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.MENUTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #menuItemTheme(BNDwidgetTheme) menuItemTheme}. */ - public static void nmenuItemTheme(long struct, BNDwidgetTheme value) { memCopy(value.address(), struct + BNDtheme.MENUITEMTHEME, BNDwidgetTheme.SIZEOF); } - /** Unsafe version of {@link #nodeTheme(BNDnodeTheme) nodeTheme}. */ - public static void nnodeTheme(long struct, BNDnodeTheme value) { memCopy(value.address(), struct + BNDtheme.NODETHEME, BNDnodeTheme.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link BNDtheme} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final BNDtheme ELEMENT_FACTORY = BNDtheme.create(-1L); - - /** - * Creates a new {@code BNDtheme.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link BNDtheme#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected BNDtheme getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link NVGColor} view of the {@link BNDtheme#backgroundColor} field. */ - @NativeType("NVGcolor") - public NVGColor backgroundColor() { return BNDtheme.nbackgroundColor(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#regularTheme} field. */ - public BNDwidgetTheme regularTheme() { return BNDtheme.nregularTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#toolTheme} field. */ - public BNDwidgetTheme toolTheme() { return BNDtheme.ntoolTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#radioTheme} field. */ - public BNDwidgetTheme radioTheme() { return BNDtheme.nradioTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#textFieldTheme} field. */ - public BNDwidgetTheme textFieldTheme() { return BNDtheme.ntextFieldTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#optionTheme} field. */ - public BNDwidgetTheme optionTheme() { return BNDtheme.noptionTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#choiceTheme} field. */ - public BNDwidgetTheme choiceTheme() { return BNDtheme.nchoiceTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#numberFieldTheme} field. */ - public BNDwidgetTheme numberFieldTheme() { return BNDtheme.nnumberFieldTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#sliderTheme} field. */ - public BNDwidgetTheme sliderTheme() { return BNDtheme.nsliderTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#scrollBarTheme} field. */ - public BNDwidgetTheme scrollBarTheme() { return BNDtheme.nscrollBarTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#tooltipTheme} field. */ - public BNDwidgetTheme tooltipTheme() { return BNDtheme.ntooltipTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#menuTheme} field. */ - public BNDwidgetTheme menuTheme() { return BNDtheme.nmenuTheme(address()); } - /** @return a {@link BNDwidgetTheme} view of the {@link BNDtheme#menuItemTheme} field. */ - public BNDwidgetTheme menuItemTheme() { return BNDtheme.nmenuItemTheme(address()); } - /** @return a {@link BNDnodeTheme} view of the {@link BNDtheme#nodeTheme} field. */ - public BNDnodeTheme nodeTheme() { return BNDtheme.nnodeTheme(address()); } - - /** Copies the specified {@link NVGColor} to the {@link BNDtheme#backgroundColor} field. */ - public Buffer backgroundColor(@NativeType("NVGcolor") NVGColor value) { BNDtheme.nbackgroundColor(address(), value); return this; } - /** Passes the {@link BNDtheme#backgroundColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer backgroundColor(java.util.function.Consumer consumer) { consumer.accept(backgroundColor()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#regularTheme} field. */ - public Buffer regularTheme(BNDwidgetTheme value) { BNDtheme.nregularTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#regularTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer regularTheme(java.util.function.Consumer consumer) { consumer.accept(regularTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#toolTheme} field. */ - public Buffer toolTheme(BNDwidgetTheme value) { BNDtheme.ntoolTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#toolTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer toolTheme(java.util.function.Consumer consumer) { consumer.accept(toolTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#radioTheme} field. */ - public Buffer radioTheme(BNDwidgetTheme value) { BNDtheme.nradioTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#radioTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer radioTheme(java.util.function.Consumer consumer) { consumer.accept(radioTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#textFieldTheme} field. */ - public Buffer textFieldTheme(BNDwidgetTheme value) { BNDtheme.ntextFieldTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#textFieldTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer textFieldTheme(java.util.function.Consumer consumer) { consumer.accept(textFieldTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#optionTheme} field. */ - public Buffer optionTheme(BNDwidgetTheme value) { BNDtheme.noptionTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#optionTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer optionTheme(java.util.function.Consumer consumer) { consumer.accept(optionTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#choiceTheme} field. */ - public Buffer choiceTheme(BNDwidgetTheme value) { BNDtheme.nchoiceTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#choiceTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer choiceTheme(java.util.function.Consumer consumer) { consumer.accept(choiceTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#numberFieldTheme} field. */ - public Buffer numberFieldTheme(BNDwidgetTheme value) { BNDtheme.nnumberFieldTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#numberFieldTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer numberFieldTheme(java.util.function.Consumer consumer) { consumer.accept(numberFieldTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#sliderTheme} field. */ - public Buffer sliderTheme(BNDwidgetTheme value) { BNDtheme.nsliderTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#sliderTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer sliderTheme(java.util.function.Consumer consumer) { consumer.accept(sliderTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#scrollBarTheme} field. */ - public Buffer scrollBarTheme(BNDwidgetTheme value) { BNDtheme.nscrollBarTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#scrollBarTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer scrollBarTheme(java.util.function.Consumer consumer) { consumer.accept(scrollBarTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#tooltipTheme} field. */ - public Buffer tooltipTheme(BNDwidgetTheme value) { BNDtheme.ntooltipTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#tooltipTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer tooltipTheme(java.util.function.Consumer consumer) { consumer.accept(tooltipTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#menuTheme} field. */ - public Buffer menuTheme(BNDwidgetTheme value) { BNDtheme.nmenuTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#menuTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer menuTheme(java.util.function.Consumer consumer) { consumer.accept(menuTheme()); return this; } - /** Copies the specified {@link BNDwidgetTheme} to the {@link BNDtheme#menuItemTheme} field. */ - public Buffer menuItemTheme(BNDwidgetTheme value) { BNDtheme.nmenuItemTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#menuItemTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer menuItemTheme(java.util.function.Consumer consumer) { consumer.accept(menuItemTheme()); return this; } - /** Copies the specified {@link BNDnodeTheme} to the {@link BNDtheme#nodeTheme} field. */ - public Buffer nodeTheme(BNDnodeTheme value) { BNDtheme.nnodeTheme(address(), value); return this; } - /** Passes the {@link BNDtheme#nodeTheme} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer nodeTheme(java.util.function.Consumer consumer) { consumer.accept(nodeTheme()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/BNDwidgetTheme.java b/LWJGL/src/main/java/org/lwjgl/nanovg/BNDwidgetTheme.java deleted file mode 100644 index f96e63b4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/BNDwidgetTheme.java +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Describes the theme used to draw a single widget or widget box; these values correspond to the same values that can be retrieved from the Theme panel - * in the Blender preferences. - * - *

    Layout

    - * - *
    
    - * struct BNDwidgetTheme {
    - *     {@link NVGColor NVGcolor} {@link #outlineColor};
    - *     {@link NVGColor NVGcolor} {@link #itemColor};
    - *     {@link NVGColor NVGcolor} {@link #innerColor};
    - *     {@link NVGColor NVGcolor} {@link #innerSelectedColor};
    - *     {@link NVGColor NVGcolor} {@link #textColor};
    - *     {@link NVGColor NVGcolor} {@link #textSelectedColor};
    - *     int {@link #shadeTop};
    - *     int {@link #shadeDown};
    - * }
    - */ -public class BNDwidgetTheme extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OUTLINECOLOR, - ITEMCOLOR, - INNERCOLOR, - INNERSELECTEDCOLOR, - TEXTCOLOR, - TEXTSELECTEDCOLOR, - SHADETOP, - SHADEDOWN; - - static { - Layout layout = __struct( - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OUTLINECOLOR = layout.offsetof(0); - ITEMCOLOR = layout.offsetof(1); - INNERCOLOR = layout.offsetof(2); - INNERSELECTEDCOLOR = layout.offsetof(3); - TEXTCOLOR = layout.offsetof(4); - TEXTSELECTEDCOLOR = layout.offsetof(5); - SHADETOP = layout.offsetof(6); - SHADEDOWN = layout.offsetof(7); - } - - protected BNDwidgetTheme(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected BNDwidgetTheme create(long address, @Nullable ByteBuffer container) { - return new BNDwidgetTheme(address, container); - } - - /** - * Creates a {@code BNDwidgetTheme} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public BNDwidgetTheme(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** color of widget box outline */ - @NativeType("NVGcolor") - public NVGColor outlineColor() { return noutlineColor(address()); } - /** color of widget item (meaning changes depending on class) */ - @NativeType("NVGcolor") - public NVGColor itemColor() { return nitemColor(address()); } - /** fill color of widget box */ - @NativeType("NVGcolor") - public NVGColor innerColor() { return ninnerColor(address()); } - /** fill color of widget box when active */ - @NativeType("NVGcolor") - public NVGColor innerSelectedColor() { return ninnerSelectedColor(address()); } - /** color of text label */ - @NativeType("NVGcolor") - public NVGColor textColor() { return ntextColor(address()); } - /** color of text label when active */ - @NativeType("NVGcolor") - public NVGColor textSelectedColor() { return ntextSelectedColor(address()); } - /** delta modifier for upper part of gradient (-100 to 100) */ - public int shadeTop() { return nshadeTop(address()); } - /** delta modifier for lower part of gradient (-100 to 100) */ - public int shadeDown() { return nshadeDown(address()); } - - /** Copies the specified {@link NVGColor} to the {@link #outlineColor} field. */ - public BNDwidgetTheme outlineColor(@NativeType("NVGcolor") NVGColor value) { noutlineColor(address(), value); return this; } - /** Passes the {@link #outlineColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDwidgetTheme outlineColor(java.util.function.Consumer consumer) { consumer.accept(outlineColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #itemColor} field. */ - public BNDwidgetTheme itemColor(@NativeType("NVGcolor") NVGColor value) { nitemColor(address(), value); return this; } - /** Passes the {@link #itemColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDwidgetTheme itemColor(java.util.function.Consumer consumer) { consumer.accept(itemColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #innerColor} field. */ - public BNDwidgetTheme innerColor(@NativeType("NVGcolor") NVGColor value) { ninnerColor(address(), value); return this; } - /** Passes the {@link #innerColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDwidgetTheme innerColor(java.util.function.Consumer consumer) { consumer.accept(innerColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #innerSelectedColor} field. */ - public BNDwidgetTheme innerSelectedColor(@NativeType("NVGcolor") NVGColor value) { ninnerSelectedColor(address(), value); return this; } - /** Passes the {@link #innerSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDwidgetTheme innerSelectedColor(java.util.function.Consumer consumer) { consumer.accept(innerSelectedColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #textColor} field. */ - public BNDwidgetTheme textColor(@NativeType("NVGcolor") NVGColor value) { ntextColor(address(), value); return this; } - /** Passes the {@link #textColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDwidgetTheme textColor(java.util.function.Consumer consumer) { consumer.accept(textColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #textSelectedColor} field. */ - public BNDwidgetTheme textSelectedColor(@NativeType("NVGcolor") NVGColor value) { ntextSelectedColor(address(), value); return this; } - /** Passes the {@link #textSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public BNDwidgetTheme textSelectedColor(java.util.function.Consumer consumer) { consumer.accept(textSelectedColor()); return this; } - /** Sets the specified value to the {@link #shadeTop} field. */ - public BNDwidgetTheme shadeTop(int value) { nshadeTop(address(), value); return this; } - /** Sets the specified value to the {@link #shadeDown} field. */ - public BNDwidgetTheme shadeDown(int value) { nshadeDown(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public BNDwidgetTheme set( - NVGColor outlineColor, - NVGColor itemColor, - NVGColor innerColor, - NVGColor innerSelectedColor, - NVGColor textColor, - NVGColor textSelectedColor, - int shadeTop, - int shadeDown - ) { - outlineColor(outlineColor); - itemColor(itemColor); - innerColor(innerColor); - innerSelectedColor(innerSelectedColor); - textColor(textColor); - textSelectedColor(textSelectedColor); - shadeTop(shadeTop); - shadeDown(shadeDown); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public BNDwidgetTheme set(BNDwidgetTheme src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code BNDwidgetTheme} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static BNDwidgetTheme malloc() { - return new BNDwidgetTheme(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code BNDwidgetTheme} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static BNDwidgetTheme calloc() { - return new BNDwidgetTheme(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code BNDwidgetTheme} instance allocated with {@link BufferUtils}. */ - public static BNDwidgetTheme create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new BNDwidgetTheme(memAddress(container), container); - } - - /** Returns a new {@code BNDwidgetTheme} instance for the specified memory address. */ - public static BNDwidgetTheme create(long address) { - return new BNDwidgetTheme(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static BNDwidgetTheme createSafe(long address) { - return address == NULL ? null : new BNDwidgetTheme(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static BNDwidgetTheme mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static BNDwidgetTheme callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static BNDwidgetTheme mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static BNDwidgetTheme callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code BNDwidgetTheme} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static BNDwidgetTheme malloc(MemoryStack stack) { - return new BNDwidgetTheme(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code BNDwidgetTheme} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static BNDwidgetTheme calloc(MemoryStack stack) { - return new BNDwidgetTheme(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #outlineColor}. */ - public static NVGColor noutlineColor(long struct) { return NVGColor.create(struct + BNDwidgetTheme.OUTLINECOLOR); } - /** Unsafe version of {@link #itemColor}. */ - public static NVGColor nitemColor(long struct) { return NVGColor.create(struct + BNDwidgetTheme.ITEMCOLOR); } - /** Unsafe version of {@link #innerColor}. */ - public static NVGColor ninnerColor(long struct) { return NVGColor.create(struct + BNDwidgetTheme.INNERCOLOR); } - /** Unsafe version of {@link #innerSelectedColor}. */ - public static NVGColor ninnerSelectedColor(long struct) { return NVGColor.create(struct + BNDwidgetTheme.INNERSELECTEDCOLOR); } - /** Unsafe version of {@link #textColor}. */ - public static NVGColor ntextColor(long struct) { return NVGColor.create(struct + BNDwidgetTheme.TEXTCOLOR); } - /** Unsafe version of {@link #textSelectedColor}. */ - public static NVGColor ntextSelectedColor(long struct) { return NVGColor.create(struct + BNDwidgetTheme.TEXTSELECTEDCOLOR); } - /** Unsafe version of {@link #shadeTop}. */ - public static int nshadeTop(long struct) { return UNSAFE.getInt(null, struct + BNDwidgetTheme.SHADETOP); } - /** Unsafe version of {@link #shadeDown}. */ - public static int nshadeDown(long struct) { return UNSAFE.getInt(null, struct + BNDwidgetTheme.SHADEDOWN); } - - /** Unsafe version of {@link #outlineColor(NVGColor) outlineColor}. */ - public static void noutlineColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDwidgetTheme.OUTLINECOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #itemColor(NVGColor) itemColor}. */ - public static void nitemColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDwidgetTheme.ITEMCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #innerColor(NVGColor) innerColor}. */ - public static void ninnerColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDwidgetTheme.INNERCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #innerSelectedColor(NVGColor) innerSelectedColor}. */ - public static void ninnerSelectedColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDwidgetTheme.INNERSELECTEDCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #textColor(NVGColor) textColor}. */ - public static void ntextColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDwidgetTheme.TEXTCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #textSelectedColor(NVGColor) textSelectedColor}. */ - public static void ntextSelectedColor(long struct, NVGColor value) { memCopy(value.address(), struct + BNDwidgetTheme.TEXTSELECTEDCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #shadeTop(int) shadeTop}. */ - public static void nshadeTop(long struct, int value) { UNSAFE.putInt(null, struct + BNDwidgetTheme.SHADETOP, value); } - /** Unsafe version of {@link #shadeDown(int) shadeDown}. */ - public static void nshadeDown(long struct, int value) { UNSAFE.putInt(null, struct + BNDwidgetTheme.SHADEDOWN, value); } - - // ----------------------------------- - - /** An array of {@link BNDwidgetTheme} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final BNDwidgetTheme ELEMENT_FACTORY = BNDwidgetTheme.create(-1L); - - /** - * Creates a new {@code BNDwidgetTheme.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link BNDwidgetTheme#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected BNDwidgetTheme getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link NVGColor} view of the {@link BNDwidgetTheme#outlineColor} field. */ - @NativeType("NVGcolor") - public NVGColor outlineColor() { return BNDwidgetTheme.noutlineColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDwidgetTheme#itemColor} field. */ - @NativeType("NVGcolor") - public NVGColor itemColor() { return BNDwidgetTheme.nitemColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDwidgetTheme#innerColor} field. */ - @NativeType("NVGcolor") - public NVGColor innerColor() { return BNDwidgetTheme.ninnerColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDwidgetTheme#innerSelectedColor} field. */ - @NativeType("NVGcolor") - public NVGColor innerSelectedColor() { return BNDwidgetTheme.ninnerSelectedColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDwidgetTheme#textColor} field. */ - @NativeType("NVGcolor") - public NVGColor textColor() { return BNDwidgetTheme.ntextColor(address()); } - /** @return a {@link NVGColor} view of the {@link BNDwidgetTheme#textSelectedColor} field. */ - @NativeType("NVGcolor") - public NVGColor textSelectedColor() { return BNDwidgetTheme.ntextSelectedColor(address()); } - /** @return the value of the {@link BNDwidgetTheme#shadeTop} field. */ - public int shadeTop() { return BNDwidgetTheme.nshadeTop(address()); } - /** @return the value of the {@link BNDwidgetTheme#shadeDown} field. */ - public int shadeDown() { return BNDwidgetTheme.nshadeDown(address()); } - - /** Copies the specified {@link NVGColor} to the {@link BNDwidgetTheme#outlineColor} field. */ - public Buffer outlineColor(@NativeType("NVGcolor") NVGColor value) { BNDwidgetTheme.noutlineColor(address(), value); return this; } - /** Passes the {@link BNDwidgetTheme#outlineColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer outlineColor(java.util.function.Consumer consumer) { consumer.accept(outlineColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDwidgetTheme#itemColor} field. */ - public Buffer itemColor(@NativeType("NVGcolor") NVGColor value) { BNDwidgetTheme.nitemColor(address(), value); return this; } - /** Passes the {@link BNDwidgetTheme#itemColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer itemColor(java.util.function.Consumer consumer) { consumer.accept(itemColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDwidgetTheme#innerColor} field. */ - public Buffer innerColor(@NativeType("NVGcolor") NVGColor value) { BNDwidgetTheme.ninnerColor(address(), value); return this; } - /** Passes the {@link BNDwidgetTheme#innerColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer innerColor(java.util.function.Consumer consumer) { consumer.accept(innerColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDwidgetTheme#innerSelectedColor} field. */ - public Buffer innerSelectedColor(@NativeType("NVGcolor") NVGColor value) { BNDwidgetTheme.ninnerSelectedColor(address(), value); return this; } - /** Passes the {@link BNDwidgetTheme#innerSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer innerSelectedColor(java.util.function.Consumer consumer) { consumer.accept(innerSelectedColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDwidgetTheme#textColor} field. */ - public Buffer textColor(@NativeType("NVGcolor") NVGColor value) { BNDwidgetTheme.ntextColor(address(), value); return this; } - /** Passes the {@link BNDwidgetTheme#textColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer textColor(java.util.function.Consumer consumer) { consumer.accept(textColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link BNDwidgetTheme#textSelectedColor} field. */ - public Buffer textSelectedColor(@NativeType("NVGcolor") NVGColor value) { BNDwidgetTheme.ntextSelectedColor(address(), value); return this; } - /** Passes the {@link BNDwidgetTheme#textSelectedColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer textSelectedColor(java.util.function.Consumer consumer) { consumer.accept(textSelectedColor()); return this; } - /** Sets the specified value to the {@link BNDwidgetTheme#shadeTop} field. */ - public Buffer shadeTop(int value) { BNDwidgetTheme.nshadeTop(address(), value); return this; } - /** Sets the specified value to the {@link BNDwidgetTheme#shadeDown} field. */ - public Buffer shadeDown(int value) { BNDwidgetTheme.nshadeDown(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/Blendish.java b/LWJGL/src/main/java/org/lwjgl/nanovg/Blendish.java deleted file mode 100644 index ac54ccf0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/Blendish.java +++ /dev/null @@ -1,2472 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Blendish is a small collection of drawing functions for NanoVG, designed to replicate the look of the Blender 2.5+ User Interface. You can use these - * functions to theme your UI library. Several metric constants for faithful reproduction are also included. - * - *

    Blendish supports the original Blender icon sheet; As the licensing of Blender's icons is unclear, they are not included in Blendish'es repository, but - * an SVG template, "icons_template.svg" is provided, which you can use to build your own icon sheet.

    - * - *

    To use icons, you must first load the icon sheet using one of the {@code nvgCreateImage*()} functions and then pass the image handle to - * {@link #bndSetIconImage SetIconImage}; otherwise, no icons will be drawn. See {@code bndSetIconImage()} for more information.

    - * - *

    Blendish will not render text until a suitable UI font has been passed to {@link #bndSetFont SetFont} has been called. See {@code bndSetFont()} for more information.

    - * - *

    Drawbacks

    - * - *

    There is no support for varying dpi resolutions yet. The library is hardcoded to the equivalent of 72 dpi in the Blender system settings.

    - * - *

    Support for label truncation is missing. Text rendering breaks when widgets are too short to contain their labels.

    - */ -public class Blendish { - - static { LibNanoVG.initialize(); } - - /** Alpha of disabled widget groups. Can be used in conjunction with {@link NanoVG#nvgGlobalAlpha GlobalAlpha}. */ - public static final float BND_DISABLED_ALPHA = 0.5f; - - /** - * How text on a control is aligned. ({@code BNDtextAlignment}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #BND_LEFT LEFT}
    • - *
    • {@link #BND_CENTER CENTER}
    • - *
    - */ - public static final int - BND_LEFT = 0, - BND_CENTER = 1; - - /** - * States altering the styling of a widget. ({@code BNDwidgetState}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #BND_DEFAULT DEFAULT} - not interacting
    • - *
    • {@link #BND_HOVER HOVER} - the mouse is hovering over the control
    • - *
    • {@link #BND_ACTIVE ACTIVE} - the widget is activated (pressed) or in an active state (toggled)
    • - *
    - */ - public static final int - BND_DEFAULT = 0, - BND_HOVER = 1, - BND_ACTIVE = 2; - - /** - * Flags indicating which corners are sharp (for grouping widgets). ({@code BNDcornerFlags}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #BND_CORNER_NONE CORNER_NONE} - all corners are round
    • - *
    • {@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT} - sharp top left corner
    • - *
    • {@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT} - sharp top right corner
    • - *
    • {@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT} - sharp bottom right corner
    • - *
    • {@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT} - sharp bottom left corner
    • - *
    • {@link #BND_CORNER_ALL CORNER_ALL} - all corners are sharp; you can invert a set of flags using ^= BND_CORNER_ALL
    • - *
    • {@link #BND_CORNER_TOP CORNER_TOP} - top border is sharp
    • - *
    • {@link #BND_CORNER_DOWN CORNER_DOWN} - bottom border is sharp
    • - *
    • {@link #BND_CORNER_LEFT CORNER_LEFT} - left border is sharp
    • - *
    • {@link #BND_CORNER_RIGHT CORNER_RIGHT} - right border is sharp
    • - *
    - */ - public static final int - BND_CORNER_NONE = 0, - BND_CORNER_TOP_LEFT = 1, - BND_CORNER_TOP_RIGHT = 2, - BND_CORNER_DOWN_RIGHT = 4, - BND_CORNER_DOWN_LEFT = 8, - BND_CORNER_ALL = 0xF, - BND_CORNER_TOP = 3, - BND_CORNER_DOWN = 0xC, - BND_CORNER_LEFT = 9, - BND_CORNER_RIGHT = 6; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - default widget height
    • - *
    • {@link #BND_TOOL_WIDTH TOOL_WIDTH} - default toolbutton width (if icon only)
    • - *
    • {@link #BND_NODE_PORT_RADIUS NODE_PORT_RADIUS} - default radius of node ports
    • - *
    • {@link #BND_NODE_MARGIN_TOP NODE_MARGIN_TOP} - top margin of node content
    • - *
    • {@link #BND_NODE_MARGIN_DOWN NODE_MARGIN_DOWN} - bottom margin of node content
    • - *
    • {@link #BND_NODE_MARGIN_SIDE NODE_MARGIN_SIDE} - left and right margin of node content
    • - *
    • {@link #BND_NODE_TITLE_HEIGHT NODE_TITLE_HEIGHT} - height of node title bar
    • - *
    • {@link #BND_NODE_ARROW_AREA_WIDTH NODE_ARROW_AREA_WIDTH} - width of node title arrow click area
    • - *
    • {@link #BND_SPLITTER_AREA_SIZE SPLITTER_AREA_SIZE} - size of splitter corner click area
    • - *
    • {@link #BND_SCROLLBAR_WIDTH SCROLLBAR_WIDTH} - width of vertical scrollbar
    • - *
    • {@link #BND_SCROLLBAR_HEIGHT SCROLLBAR_HEIGHT} - height of horizontal scrollbar
    • - *
    • {@link #BND_VSPACING VSPACING} - default vertical spacing
    • - *
    • {@link #BND_VSPACING_GROUP VSPACING_GROUP} - default vertical spacing between groups
    • - *
    • {@link #BND_HSPACING HSPACING} - default horizontal spacing
    • - *
    - */ - public static final int - BND_WIDGET_HEIGHT = 21, - BND_TOOL_WIDTH = 20, - BND_NODE_PORT_RADIUS = 5, - BND_NODE_MARGIN_TOP = 25, - BND_NODE_MARGIN_DOWN = 5, - BND_NODE_MARGIN_SIDE = 10, - BND_NODE_TITLE_HEIGHT = 20, - BND_NODE_ARROW_AREA_WIDTH = 20, - BND_SPLITTER_AREA_SIZE = 12, - BND_SCROLLBAR_WIDTH = 13, - BND_SCROLLBAR_HEIGHT = 14, - BND_VSPACING = 1, - BND_VSPACING_GROUP = 8, - BND_HSPACING = 8; - - /** - * {@code BNDicon} - * - *
    Enum values:
    - * - *
      - *
    • {@link #BND_ICON_NONE ICON_NONE}
    • - *
    • {@link #BND_ICON_QUESTION ICON_QUESTION}
    • - *
    • {@link #BND_ICON_ERROR ICON_ERROR}
    • - *
    • {@link #BND_ICON_CANCEL ICON_CANCEL}
    • - *
    • {@link #BND_ICON_TRIA_RIGHT ICON_TRIA_RIGHT}
    • - *
    • {@link #BND_ICON_TRIA_DOWN ICON_TRIA_DOWN}
    • - *
    • {@link #BND_ICON_TRIA_LEFT ICON_TRIA_LEFT}
    • - *
    • {@link #BND_ICON_TRIA_UP ICON_TRIA_UP}
    • - *
    • {@link #BND_ICON_ARROW_LEFTRIGHT ICON_ARROW_LEFTRIGHT}
    • - *
    • {@link #BND_ICON_PLUS ICON_PLUS}
    • - *
    • {@link #BND_ICON_DISCLOSURE_TRI_DOWN ICON_DISCLOSURE_TRI_DOWN}
    • - *
    • {@link #BND_ICON_DISCLOSURE_TRI_RIGHT ICON_DISCLOSURE_TRI_RIGHT}
    • - *
    • {@link #BND_ICON_RADIOBUT_OFF ICON_RADIOBUT_OFF}
    • - *
    • {@link #BND_ICON_RADIOBUT_ON ICON_RADIOBUT_ON}
    • - *
    • {@link #BND_ICON_MENU_PANEL ICON_MENU_PANEL}
    • - *
    • {@link #BND_ICON_BLENDER ICON_BLENDER}
    • - *
    • {@link #BND_ICON_GRIP ICON_GRIP}
    • - *
    • {@link #BND_ICON_DOT ICON_DOT}
    • - *
    • {@link #BND_ICON_COLLAPSEMENU ICON_COLLAPSEMENU}
    • - *
    • {@link #BND_ICON_X ICON_X}
    • - *
    • {@link #BND_ICON_GO_LEFT ICON_GO_LEFT}
    • - *
    • {@link #BND_ICON_PLUG ICON_PLUG}
    • - *
    • {@link #BND_ICON_UI ICON_UI}
    • - *
    • {@link #BND_ICON_NODE ICON_NODE}
    • - *
    • {@link #BND_ICON_NODE_SEL ICON_NODE_SEL}
    • - *
    • {@link #BND_ICON_FULLSCREEN ICON_FULLSCREEN}
    • - *
    • {@link #BND_ICON_SPLITSCREEN ICON_SPLITSCREEN}
    • - *
    • {@link #BND_ICON_RIGHTARROW_THIN ICON_RIGHTARROW_THIN}
    • - *
    • {@link #BND_ICON_BORDERMOVE ICON_BORDERMOVE}
    • - *
    • {@link #BND_ICON_VIEWZOOM ICON_VIEWZOOM}
    • - *
    • {@link #BND_ICON_ZOOMIN ICON_ZOOMIN}
    • - *
    • {@link #BND_ICON_ZOOMOUT ICON_ZOOMOUT}
    • - *
    • {@link #BND_ICON_PANEL_CLOSE ICON_PANEL_CLOSE}
    • - *
    • {@link #BND_ICON_COPY_ID ICON_COPY_ID}
    • - *
    • {@link #BND_ICON_EYEDROPPER ICON_EYEDROPPER}
    • - *
    • {@link #BND_ICON_LINK_AREA ICON_LINK_AREA}
    • - *
    • {@link #BND_ICON_AUTO ICON_AUTO}
    • - *
    • {@link #BND_ICON_CHECKBOX_DEHLT ICON_CHECKBOX_DEHLT}
    • - *
    • {@link #BND_ICON_CHECKBOX_HLT ICON_CHECKBOX_HLT}
    • - *
    • {@link #BND_ICON_UNLOCKED ICON_UNLOCKED}
    • - *
    • {@link #BND_ICON_LOCKED ICON_LOCKED}
    • - *
    • {@link #BND_ICON_UNPINNED ICON_UNPINNED}
    • - *
    • {@link #BND_ICON_PINNED ICON_PINNED}
    • - *
    • {@link #BND_ICON_SCREEN_BACK ICON_SCREEN_BACK}
    • - *
    • {@link #BND_ICON_RIGHTARROW ICON_RIGHTARROW}
    • - *
    • {@link #BND_ICON_DOWNARROW_HLT ICON_DOWNARROW_HLT}
    • - *
    • {@link #BND_ICON_DOTSUP ICON_DOTSUP}
    • - *
    • {@link #BND_ICON_DOTSDOWN ICON_DOTSDOWN}
    • - *
    • {@link #BND_ICON_LINK ICON_LINK}
    • - *
    • {@link #BND_ICON_INLINK ICON_INLINK}
    • - *
    • {@link #BND_ICON_PLUGIN ICON_PLUGIN}
    • - *
    • {@link #BND_ICON_HELP ICON_HELP}
    • - *
    • {@link #BND_ICON_GHOST_ENABLED ICON_GHOST_ENABLED}
    • - *
    • {@link #BND_ICON_COLOR ICON_COLOR}
    • - *
    • {@link #BND_ICON_LINKED ICON_LINKED}
    • - *
    • {@link #BND_ICON_UNLINKED ICON_UNLINKED}
    • - *
    • {@link #BND_ICON_HAND ICON_HAND}
    • - *
    • {@link #BND_ICON_ZOOM_ALL ICON_ZOOM_ALL}
    • - *
    • {@link #BND_ICON_ZOOM_SELECTED ICON_ZOOM_SELECTED}
    • - *
    • {@link #BND_ICON_ZOOM_PREVIOUS ICON_ZOOM_PREVIOUS}
    • - *
    • {@link #BND_ICON_ZOOM_IN ICON_ZOOM_IN}
    • - *
    • {@link #BND_ICON_ZOOM_OUT ICON_ZOOM_OUT}
    • - *
    • {@link #BND_ICON_RENDER_REGION ICON_RENDER_REGION}
    • - *
    • {@link #BND_ICON_BORDER_RECT ICON_BORDER_RECT}
    • - *
    • {@link #BND_ICON_BORDER_LASSO ICON_BORDER_LASSO}
    • - *
    • {@link #BND_ICON_FREEZE ICON_FREEZE}
    • - *
    • {@link #BND_ICON_STYLUS_PRESSURE ICON_STYLUS_PRESSURE}
    • - *
    • {@link #BND_ICON_GHOST_DISABLED ICON_GHOST_DISABLED}
    • - *
    • {@link #BND_ICON_NEW ICON_NEW}
    • - *
    • {@link #BND_ICON_FILE_TICK ICON_FILE_TICK}
    • - *
    • {@link #BND_ICON_QUIT ICON_QUIT}
    • - *
    • {@link #BND_ICON_URL ICON_URL}
    • - *
    • {@link #BND_ICON_RECOVER_LAST ICON_RECOVER_LAST}
    • - *
    • {@link #BND_ICON_FULLSCREEN_ENTER ICON_FULLSCREEN_ENTER}
    • - *
    • {@link #BND_ICON_FULLSCREEN_EXIT ICON_FULLSCREEN_EXIT}
    • - *
    • {@link #BND_ICON_BLANK1 ICON_BLANK1}
    • - *
    • {@link #BND_ICON_LAMP ICON_LAMP}
    • - *
    • {@link #BND_ICON_MATERIAL ICON_MATERIAL}
    • - *
    • {@link #BND_ICON_TEXTURE ICON_TEXTURE}
    • - *
    • {@link #BND_ICON_ANIM ICON_ANIM}
    • - *
    • {@link #BND_ICON_WORLD ICON_WORLD}
    • - *
    • {@link #BND_ICON_SCENE ICON_SCENE}
    • - *
    • {@link #BND_ICON_EDIT ICON_EDIT}
    • - *
    • {@link #BND_ICON_GAME ICON_GAME}
    • - *
    • {@link #BND_ICON_RADIO ICON_RADIO}
    • - *
    • {@link #BND_ICON_SCRIPT ICON_SCRIPT}
    • - *
    • {@link #BND_ICON_PARTICLES ICON_PARTICLES}
    • - *
    • {@link #BND_ICON_PHYSICS ICON_PHYSICS}
    • - *
    • {@link #BND_ICON_SPEAKER ICON_SPEAKER}
    • - *
    • {@link #BND_ICON_TEXTURE_SHADED ICON_TEXTURE_SHADED}
    • - *
    • {@link #BND_ICON_VIEW3D ICON_VIEW3D}
    • - *
    • {@link #BND_ICON_IPO ICON_IPO}
    • - *
    • {@link #BND_ICON_OOPS ICON_OOPS}
    • - *
    • {@link #BND_ICON_BUTS ICON_BUTS}
    • - *
    • {@link #BND_ICON_FILESEL ICON_FILESEL}
    • - *
    • {@link #BND_ICON_IMAGE_COL ICON_IMAGE_COL}
    • - *
    • {@link #BND_ICON_INFO ICON_INFO}
    • - *
    • {@link #BND_ICON_SEQUENCE ICON_SEQUENCE}
    • - *
    • {@link #BND_ICON_TEXT ICON_TEXT}
    • - *
    • {@link #BND_ICON_IMASEL ICON_IMASEL}
    • - *
    • {@link #BND_ICON_SOUND ICON_SOUND}
    • - *
    • {@link #BND_ICON_ACTION ICON_ACTION}
    • - *
    • {@link #BND_ICON_NLA ICON_NLA}
    • - *
    • {@link #BND_ICON_SCRIPTWIN ICON_SCRIPTWIN}
    • - *
    • {@link #BND_ICON_TIME ICON_TIME}
    • - *
    • {@link #BND_ICON_NODETREE ICON_NODETREE}
    • - *
    • {@link #BND_ICON_LOGIC ICON_LOGIC}
    • - *
    • {@link #BND_ICON_CONSOLE ICON_CONSOLE}
    • - *
    • {@link #BND_ICON_PREFERENCES ICON_PREFERENCES}
    • - *
    • {@link #BND_ICON_CLIP ICON_CLIP}
    • - *
    • {@link #BND_ICON_ASSET_MANAGER ICON_ASSET_MANAGER}
    • - *
    • {@link #BND_ICON_OBJECT_DATAMODE ICON_OBJECT_DATAMODE}
    • - *
    • {@link #BND_ICON_EDITMODE_HLT ICON_EDITMODE_HLT}
    • - *
    • {@link #BND_ICON_FACESEL_HLT ICON_FACESEL_HLT}
    • - *
    • {@link #BND_ICON_VPAINT_HLT ICON_VPAINT_HLT}
    • - *
    • {@link #BND_ICON_TPAINT_HLT ICON_TPAINT_HLT}
    • - *
    • {@link #BND_ICON_WPAINT_HLT ICON_WPAINT_HLT}
    • - *
    • {@link #BND_ICON_SCULPTMODE_HLT ICON_SCULPTMODE_HLT}
    • - *
    • {@link #BND_ICON_POSE_HLT ICON_POSE_HLT}
    • - *
    • {@link #BND_ICON_PARTICLEMODE ICON_PARTICLEMODE}
    • - *
    • {@link #BND_ICON_LIGHTPAINT ICON_LIGHTPAINT}
    • - *
    • {@link #BND_ICON_SCENE_DATA ICON_SCENE_DATA}
    • - *
    • {@link #BND_ICON_RENDERLAYERS ICON_RENDERLAYERS}
    • - *
    • {@link #BND_ICON_WORLD_DATA ICON_WORLD_DATA}
    • - *
    • {@link #BND_ICON_OBJECT_DATA ICON_OBJECT_DATA}
    • - *
    • {@link #BND_ICON_MESH_DATA ICON_MESH_DATA}
    • - *
    • {@link #BND_ICON_CURVE_DATA ICON_CURVE_DATA}
    • - *
    • {@link #BND_ICON_META_DATA ICON_META_DATA}
    • - *
    • {@link #BND_ICON_LATTICE_DATA ICON_LATTICE_DATA}
    • - *
    • {@link #BND_ICON_LAMP_DATA ICON_LAMP_DATA}
    • - *
    • {@link #BND_ICON_MATERIAL_DATA ICON_MATERIAL_DATA}
    • - *
    • {@link #BND_ICON_TEXTURE_DATA ICON_TEXTURE_DATA}
    • - *
    • {@link #BND_ICON_ANIM_DATA ICON_ANIM_DATA}
    • - *
    • {@link #BND_ICON_CAMERA_DATA ICON_CAMERA_DATA}
    • - *
    • {@link #BND_ICON_PARTICLE_DATA ICON_PARTICLE_DATA}
    • - *
    • {@link #BND_ICON_LIBRARY_DATA_DIRECT ICON_LIBRARY_DATA_DIRECT}
    • - *
    • {@link #BND_ICON_GROUP ICON_GROUP}
    • - *
    • {@link #BND_ICON_ARMATURE_DATA ICON_ARMATURE_DATA}
    • - *
    • {@link #BND_ICON_POSE_DATA ICON_POSE_DATA}
    • - *
    • {@link #BND_ICON_BONE_DATA ICON_BONE_DATA}
    • - *
    • {@link #BND_ICON_CONSTRAINT ICON_CONSTRAINT}
    • - *
    • {@link #BND_ICON_SHAPEKEY_DATA ICON_SHAPEKEY_DATA}
    • - *
    • {@link #BND_ICON_CONSTRAINT_BONE ICON_CONSTRAINT_BONE}
    • - *
    • {@link #BND_ICON_CAMERA_STEREO ICON_CAMERA_STEREO}
    • - *
    • {@link #BND_ICON_PACKAGE ICON_PACKAGE}
    • - *
    • {@link #BND_ICON_UGLYPACKAGE ICON_UGLYPACKAGE}
    • - *
    • {@link #BND_ICON_BRUSH_DATA ICON_BRUSH_DATA}
    • - *
    • {@link #BND_ICON_IMAGE_DATA ICON_IMAGE_DATA}
    • - *
    • {@link #BND_ICON_FILE ICON_FILE}
    • - *
    • {@link #BND_ICON_FCURVE ICON_FCURVE}
    • - *
    • {@link #BND_ICON_FONT_DATA ICON_FONT_DATA}
    • - *
    • {@link #BND_ICON_RENDER_RESULT ICON_RENDER_RESULT}
    • - *
    • {@link #BND_ICON_SURFACE_DATA ICON_SURFACE_DATA}
    • - *
    • {@link #BND_ICON_EMPTY_DATA ICON_EMPTY_DATA}
    • - *
    • {@link #BND_ICON_SETTINGS ICON_SETTINGS}
    • - *
    • {@link #BND_ICON_RENDER_ANIMATION ICON_RENDER_ANIMATION}
    • - *
    • {@link #BND_ICON_RENDER_STILL ICON_RENDER_STILL}
    • - *
    • {@link #BND_ICON_BOIDS ICON_BOIDS}
    • - *
    • {@link #BND_ICON_STRANDS ICON_STRANDS}
    • - *
    • {@link #BND_ICON_LIBRARY_DATA_INDIRECT ICON_LIBRARY_DATA_INDIRECT}
    • - *
    • {@link #BND_ICON_GREASEPENCIL ICON_GREASEPENCIL}
    • - *
    • {@link #BND_ICON_LINE_DATA ICON_LINE_DATA}
    • - *
    • {@link #BND_ICON_GROUP_BONE ICON_GROUP_BONE}
    • - *
    • {@link #BND_ICON_GROUP_VERTEX ICON_GROUP_VERTEX}
    • - *
    • {@link #BND_ICON_GROUP_VCOL ICON_GROUP_VCOL}
    • - *
    • {@link #BND_ICON_GROUP_UVS ICON_GROUP_UVS}
    • - *
    • {@link #BND_ICON_RNA ICON_RNA}
    • - *
    • {@link #BND_ICON_RNA_ADD ICON_RNA_ADD}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_EMPTY ICON_OUTLINER_OB_EMPTY}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_MESH ICON_OUTLINER_OB_MESH}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_CURVE ICON_OUTLINER_OB_CURVE}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_LATTICE ICON_OUTLINER_OB_LATTICE}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_META ICON_OUTLINER_OB_META}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_LAMP ICON_OUTLINER_OB_LAMP}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_CAMERA ICON_OUTLINER_OB_CAMERA}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_ARMATURE ICON_OUTLINER_OB_ARMATURE}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_FONT ICON_OUTLINER_OB_FONT}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_SURFACE ICON_OUTLINER_OB_SURFACE}
    • - *
    • {@link #BND_ICON_OUTLINER_OB_SPEAKER ICON_OUTLINER_OB_SPEAKER}
    • - *
    • {@link #BND_ICON_RESTRICT_VIEW_OFF ICON_RESTRICT_VIEW_OFF}
    • - *
    • {@link #BND_ICON_RESTRICT_VIEW_ON ICON_RESTRICT_VIEW_ON}
    • - *
    • {@link #BND_ICON_RESTRICT_SELECT_OFF ICON_RESTRICT_SELECT_OFF}
    • - *
    • {@link #BND_ICON_RESTRICT_SELECT_ON ICON_RESTRICT_SELECT_ON}
    • - *
    • {@link #BND_ICON_RESTRICT_RENDER_OFF ICON_RESTRICT_RENDER_OFF}
    • - *
    • {@link #BND_ICON_RESTRICT_RENDER_ON ICON_RESTRICT_RENDER_ON}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_EMPTY ICON_OUTLINER_DATA_EMPTY}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_MESH ICON_OUTLINER_DATA_MESH}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_CURVE ICON_OUTLINER_DATA_CURVE}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_LATTICE ICON_OUTLINER_DATA_LATTICE}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_META ICON_OUTLINER_DATA_META}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_LAMP ICON_OUTLINER_DATA_LAMP}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_CAMERA ICON_OUTLINER_DATA_CAMERA}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_ARMATURE ICON_OUTLINER_DATA_ARMATURE}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_FONT ICON_OUTLINER_DATA_FONT}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_SURFACE ICON_OUTLINER_DATA_SURFACE}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_SPEAKER ICON_OUTLINER_DATA_SPEAKER}
    • - *
    • {@link #BND_ICON_OUTLINER_DATA_POSE ICON_OUTLINER_DATA_POSE}
    • - *
    • {@link #BND_ICON_MESH_PLANE ICON_MESH_PLANE}
    • - *
    • {@link #BND_ICON_MESH_CUBE ICON_MESH_CUBE}
    • - *
    • {@link #BND_ICON_MESH_CIRCLE ICON_MESH_CIRCLE}
    • - *
    • {@link #BND_ICON_MESH_UVSPHERE ICON_MESH_UVSPHERE}
    • - *
    • {@link #BND_ICON_MESH_ICOSPHERE ICON_MESH_ICOSPHERE}
    • - *
    • {@link #BND_ICON_MESH_GRID ICON_MESH_GRID}
    • - *
    • {@link #BND_ICON_MESH_MONKEY ICON_MESH_MONKEY}
    • - *
    • {@link #BND_ICON_MESH_CYLINDER ICON_MESH_CYLINDER}
    • - *
    • {@link #BND_ICON_MESH_TORUS ICON_MESH_TORUS}
    • - *
    • {@link #BND_ICON_MESH_CONE ICON_MESH_CONE}
    • - *
    • {@link #BND_ICON_LAMP_POINT ICON_LAMP_POINT}
    • - *
    • {@link #BND_ICON_LAMP_SUN ICON_LAMP_SUN}
    • - *
    • {@link #BND_ICON_LAMP_SPOT ICON_LAMP_SPOT}
    • - *
    • {@link #BND_ICON_LAMP_HEMI ICON_LAMP_HEMI}
    • - *
    • {@link #BND_ICON_LAMP_AREA ICON_LAMP_AREA}
    • - *
    • {@link #BND_ICON_META_EMPTY ICON_META_EMPTY}
    • - *
    • {@link #BND_ICON_META_PLANE ICON_META_PLANE}
    • - *
    • {@link #BND_ICON_META_CUBE ICON_META_CUBE}
    • - *
    • {@link #BND_ICON_META_BALL ICON_META_BALL}
    • - *
    • {@link #BND_ICON_META_ELLIPSOID ICON_META_ELLIPSOID}
    • - *
    • {@link #BND_ICON_META_CAPSULE ICON_META_CAPSULE}
    • - *
    • {@link #BND_ICON_SURFACE_NCURVE ICON_SURFACE_NCURVE}
    • - *
    • {@link #BND_ICON_SURFACE_NCIRCLE ICON_SURFACE_NCIRCLE}
    • - *
    • {@link #BND_ICON_SURFACE_NSURFACE ICON_SURFACE_NSURFACE}
    • - *
    • {@link #BND_ICON_SURFACE_NCYLINDER ICON_SURFACE_NCYLINDER}
    • - *
    • {@link #BND_ICON_SURFACE_NSPHERE ICON_SURFACE_NSPHERE}
    • - *
    • {@link #BND_ICON_SURFACE_NTORUS ICON_SURFACE_NTORUS}
    • - *
    • {@link #BND_ICON_CURVE_BEZCURVE ICON_CURVE_BEZCURVE}
    • - *
    • {@link #BND_ICON_CURVE_BEZCIRCLE ICON_CURVE_BEZCIRCLE}
    • - *
    • {@link #BND_ICON_CURVE_NCURVE ICON_CURVE_NCURVE}
    • - *
    • {@link #BND_ICON_CURVE_NCIRCLE ICON_CURVE_NCIRCLE}
    • - *
    • {@link #BND_ICON_CURVE_PATH ICON_CURVE_PATH}
    • - *
    • {@link #BND_ICON_COLOR_RED ICON_COLOR_RED}
    • - *
    • {@link #BND_ICON_COLOR_GREEN ICON_COLOR_GREEN}
    • - *
    • {@link #BND_ICON_COLOR_BLUE ICON_COLOR_BLUE}
    • - *
    • {@link #BND_ICON_FORCE_FORCE ICON_FORCE_FORCE}
    • - *
    • {@link #BND_ICON_FORCE_WIND ICON_FORCE_WIND}
    • - *
    • {@link #BND_ICON_FORCE_VORTEX ICON_FORCE_VORTEX}
    • - *
    • {@link #BND_ICON_FORCE_MAGNETIC ICON_FORCE_MAGNETIC}
    • - *
    • {@link #BND_ICON_FORCE_HARMONIC ICON_FORCE_HARMONIC}
    • - *
    • {@link #BND_ICON_FORCE_CHARGE ICON_FORCE_CHARGE}
    • - *
    • {@link #BND_ICON_FORCE_LENNARDJONES ICON_FORCE_LENNARDJONES}
    • - *
    • {@link #BND_ICON_FORCE_TEXTURE ICON_FORCE_TEXTURE}
    • - *
    • {@link #BND_ICON_FORCE_CURVE ICON_FORCE_CURVE}
    • - *
    • {@link #BND_ICON_FORCE_BOID ICON_FORCE_BOID}
    • - *
    • {@link #BND_ICON_FORCE_TURBULENCE ICON_FORCE_TURBULENCE}
    • - *
    • {@link #BND_ICON_FORCE_DRAG ICON_FORCE_DRAG}
    • - *
    • {@link #BND_ICON_FORCE_SMOKEFLOW ICON_FORCE_SMOKEFLOW}
    • - *
    • {@link #BND_ICON_MODIFIER ICON_MODIFIER}
    • - *
    • {@link #BND_ICON_MOD_WAVE ICON_MOD_WAVE}
    • - *
    • {@link #BND_ICON_MOD_BUILD ICON_MOD_BUILD}
    • - *
    • {@link #BND_ICON_MOD_DECIM ICON_MOD_DECIM}
    • - *
    • {@link #BND_ICON_MOD_MIRROR ICON_MOD_MIRROR}
    • - *
    • {@link #BND_ICON_MOD_SOFT ICON_MOD_SOFT}
    • - *
    • {@link #BND_ICON_MOD_SUBSURF ICON_MOD_SUBSURF}
    • - *
    • {@link #BND_ICON_HOOK ICON_HOOK}
    • - *
    • {@link #BND_ICON_MOD_PHYSICS ICON_MOD_PHYSICS}
    • - *
    • {@link #BND_ICON_MOD_PARTICLES ICON_MOD_PARTICLES}
    • - *
    • {@link #BND_ICON_MOD_BOOLEAN ICON_MOD_BOOLEAN}
    • - *
    • {@link #BND_ICON_MOD_EDGESPLIT ICON_MOD_EDGESPLIT}
    • - *
    • {@link #BND_ICON_MOD_ARRAY ICON_MOD_ARRAY}
    • - *
    • {@link #BND_ICON_MOD_UVPROJECT ICON_MOD_UVPROJECT}
    • - *
    • {@link #BND_ICON_MOD_DISPLACE ICON_MOD_DISPLACE}
    • - *
    • {@link #BND_ICON_MOD_CURVE ICON_MOD_CURVE}
    • - *
    • {@link #BND_ICON_MOD_LATTICE ICON_MOD_LATTICE}
    • - *
    • {@link #BND_ICON_CONSTRAINT_DATA ICON_CONSTRAINT_DATA}
    • - *
    • {@link #BND_ICON_MOD_ARMATURE ICON_MOD_ARMATURE}
    • - *
    • {@link #BND_ICON_MOD_SHRINKWRAP ICON_MOD_SHRINKWRAP}
    • - *
    • {@link #BND_ICON_MOD_CAST ICON_MOD_CAST}
    • - *
    • {@link #BND_ICON_MOD_MESHDEFORM ICON_MOD_MESHDEFORM}
    • - *
    • {@link #BND_ICON_MOD_BEVEL ICON_MOD_BEVEL}
    • - *
    • {@link #BND_ICON_MOD_SMOOTH ICON_MOD_SMOOTH}
    • - *
    • {@link #BND_ICON_MOD_SIMPLEDEFORM ICON_MOD_SIMPLEDEFORM}
    • - *
    • {@link #BND_ICON_MOD_MASK ICON_MOD_MASK}
    • - *
    • {@link #BND_ICON_MOD_CLOTH ICON_MOD_CLOTH}
    • - *
    • {@link #BND_ICON_MOD_EXPLODE ICON_MOD_EXPLODE}
    • - *
    • {@link #BND_ICON_MOD_FLUIDSIM ICON_MOD_FLUIDSIM}
    • - *
    • {@link #BND_ICON_MOD_MULTIRES ICON_MOD_MULTIRES}
    • - *
    • {@link #BND_ICON_MOD_SMOKE ICON_MOD_SMOKE}
    • - *
    • {@link #BND_ICON_MOD_SOLIDIFY ICON_MOD_SOLIDIFY}
    • - *
    • {@link #BND_ICON_MOD_SCREW ICON_MOD_SCREW}
    • - *
    • {@link #BND_ICON_MOD_VERTEX_WEIGHT ICON_MOD_VERTEX_WEIGHT}
    • - *
    • {@link #BND_ICON_MOD_DYNAMICPAINT ICON_MOD_DYNAMICPAINT}
    • - *
    • {@link #BND_ICON_MOD_REMESH ICON_MOD_REMESH}
    • - *
    • {@link #BND_ICON_MOD_OCEAN ICON_MOD_OCEAN}
    • - *
    • {@link #BND_ICON_MOD_WARP ICON_MOD_WARP}
    • - *
    • {@link #BND_ICON_MOD_SKIN ICON_MOD_SKIN}
    • - *
    • {@link #BND_ICON_MOD_TRIANGULATE ICON_MOD_TRIANGULATE}
    • - *
    • {@link #BND_ICON_MOD_WIREFRAME ICON_MOD_WIREFRAME}
    • - *
    • {@link #BND_ICON_REC ICON_REC}
    • - *
    • {@link #BND_ICON_PLAY ICON_PLAY}
    • - *
    • {@link #BND_ICON_FF ICON_FF}
    • - *
    • {@link #BND_ICON_REW ICON_REW}
    • - *
    • {@link #BND_ICON_PAUSE ICON_PAUSE}
    • - *
    • {@link #BND_ICON_PREV_KEYFRAME ICON_PREV_KEYFRAME}
    • - *
    • {@link #BND_ICON_NEXT_KEYFRAME ICON_NEXT_KEYFRAME}
    • - *
    • {@link #BND_ICON_PLAY_AUDIO ICON_PLAY_AUDIO}
    • - *
    • {@link #BND_ICON_PLAY_REVERSE ICON_PLAY_REVERSE}
    • - *
    • {@link #BND_ICON_PREVIEW_RANGE ICON_PREVIEW_RANGE}
    • - *
    • {@link #BND_ICON_ACTION_TWEAK ICON_ACTION_TWEAK}
    • - *
    • {@link #BND_ICON_PMARKER_ACT ICON_PMARKER_ACT}
    • - *
    • {@link #BND_ICON_PMARKER_SEL ICON_PMARKER_SEL}
    • - *
    • {@link #BND_ICON_PMARKER ICON_PMARKER}
    • - *
    • {@link #BND_ICON_MARKER_HLT ICON_MARKER_HLT}
    • - *
    • {@link #BND_ICON_MARKER ICON_MARKER}
    • - *
    • {@link #BND_ICON_SPACE2 ICON_SPACE2}
    • - *
    • {@link #BND_ICON_SPACE3 ICON_SPACE3}
    • - *
    • {@link #BND_ICON_KEYINGSET ICON_KEYINGSET}
    • - *
    • {@link #BND_ICON_KEY_DEHLT ICON_KEY_DEHLT}
    • - *
    • {@link #BND_ICON_KEY_HLT ICON_KEY_HLT}
    • - *
    • {@link #BND_ICON_MUTE_IPO_OFF ICON_MUTE_IPO_OFF}
    • - *
    • {@link #BND_ICON_MUTE_IPO_ON ICON_MUTE_IPO_ON}
    • - *
    • {@link #BND_ICON_VISIBLE_IPO_OFF ICON_VISIBLE_IPO_OFF}
    • - *
    • {@link #BND_ICON_VISIBLE_IPO_ON ICON_VISIBLE_IPO_ON}
    • - *
    • {@link #BND_ICON_DRIVER ICON_DRIVER}
    • - *
    • {@link #BND_ICON_SOLO_OFF ICON_SOLO_OFF}
    • - *
    • {@link #BND_ICON_SOLO_ON ICON_SOLO_ON}
    • - *
    • {@link #BND_ICON_FRAME_PREV ICON_FRAME_PREV}
    • - *
    • {@link #BND_ICON_FRAME_NEXT ICON_FRAME_NEXT}
    • - *
    • {@link #BND_ICON_NLA_PUSHDOWN ICON_NLA_PUSHDOWN}
    • - *
    • {@link #BND_ICON_IPO_CONSTANT ICON_IPO_CONSTANT}
    • - *
    • {@link #BND_ICON_IPO_LINEAR ICON_IPO_LINEAR}
    • - *
    • {@link #BND_ICON_IPO_BEZIER ICON_IPO_BEZIER}
    • - *
    • {@link #BND_ICON_IPO_SINE ICON_IPO_SINE}
    • - *
    • {@link #BND_ICON_IPO_QUAD ICON_IPO_QUAD}
    • - *
    • {@link #BND_ICON_IPO_CUBIC ICON_IPO_CUBIC}
    • - *
    • {@link #BND_ICON_IPO_QUART ICON_IPO_QUART}
    • - *
    • {@link #BND_ICON_IPO_QUINT ICON_IPO_QUINT}
    • - *
    • {@link #BND_ICON_IPO_EXPO ICON_IPO_EXPO}
    • - *
    • {@link #BND_ICON_IPO_CIRC ICON_IPO_CIRC}
    • - *
    • {@link #BND_ICON_IPO_BOUNCE ICON_IPO_BOUNCE}
    • - *
    • {@link #BND_ICON_IPO_ELASTIC ICON_IPO_ELASTIC}
    • - *
    • {@link #BND_ICON_IPO_BACK ICON_IPO_BACK}
    • - *
    • {@link #BND_ICON_IPO_EASE_IN ICON_IPO_EASE_IN}
    • - *
    • {@link #BND_ICON_IPO_EASE_OUT ICON_IPO_EASE_OUT}
    • - *
    • {@link #BND_ICON_IPO_EASE_IN_OUT ICON_IPO_EASE_IN_OUT}
    • - *
    • {@link #BND_ICON_VERTEXSEL ICON_VERTEXSEL}
    • - *
    • {@link #BND_ICON_EDGESEL ICON_EDGESEL}
    • - *
    • {@link #BND_ICON_FACESEL ICON_FACESEL}
    • - *
    • {@link #BND_ICON_LOOPSEL ICON_LOOPSEL}
    • - *
    • {@link #BND_ICON_ROTATE ICON_ROTATE}
    • - *
    • {@link #BND_ICON_CURSOR ICON_CURSOR}
    • - *
    • {@link #BND_ICON_ROTATECOLLECTION ICON_ROTATECOLLECTION}
    • - *
    • {@link #BND_ICON_ROTATECENTER ICON_ROTATECENTER}
    • - *
    • {@link #BND_ICON_ROTACTIVE ICON_ROTACTIVE}
    • - *
    • {@link #BND_ICON_ALIGN ICON_ALIGN}
    • - *
    • {@link #BND_ICON_SMOOTHCURVE ICON_SMOOTHCURVE}
    • - *
    • {@link #BND_ICON_SPHERECURVE ICON_SPHERECURVE}
    • - *
    • {@link #BND_ICON_ROOTCURVE ICON_ROOTCURVE}
    • - *
    • {@link #BND_ICON_SHARPCURVE ICON_SHARPCURVE}
    • - *
    • {@link #BND_ICON_LINCURVE ICON_LINCURVE}
    • - *
    • {@link #BND_ICON_NOCURVE ICON_NOCURVE}
    • - *
    • {@link #BND_ICON_RNDCURVE ICON_RNDCURVE}
    • - *
    • {@link #BND_ICON_PROP_OFF ICON_PROP_OFF}
    • - *
    • {@link #BND_ICON_PROP_ON ICON_PROP_ON}
    • - *
    • {@link #BND_ICON_PROP_CON ICON_PROP_CON}
    • - *
    • {@link #BND_ICON_SCULPT_DYNTOPO ICON_SCULPT_DYNTOPO}
    • - *
    • {@link #BND_ICON_PARTICLE_POINT ICON_PARTICLE_POINT}
    • - *
    • {@link #BND_ICON_PARTICLE_TIP ICON_PARTICLE_TIP}
    • - *
    • {@link #BND_ICON_PARTICLE_PATH ICON_PARTICLE_PATH}
    • - *
    • {@link #BND_ICON_MAN_TRANS ICON_MAN_TRANS}
    • - *
    • {@link #BND_ICON_MAN_ROT ICON_MAN_ROT}
    • - *
    • {@link #BND_ICON_MAN_SCALE ICON_MAN_SCALE}
    • - *
    • {@link #BND_ICON_MANIPUL ICON_MANIPUL}
    • - *
    • {@link #BND_ICON_SNAP_OFF ICON_SNAP_OFF}
    • - *
    • {@link #BND_ICON_SNAP_ON ICON_SNAP_ON}
    • - *
    • {@link #BND_ICON_SNAP_NORMAL ICON_SNAP_NORMAL}
    • - *
    • {@link #BND_ICON_SNAP_INCREMENT ICON_SNAP_INCREMENT}
    • - *
    • {@link #BND_ICON_SNAP_VERTEX ICON_SNAP_VERTEX}
    • - *
    • {@link #BND_ICON_SNAP_EDGE ICON_SNAP_EDGE}
    • - *
    • {@link #BND_ICON_SNAP_FACE ICON_SNAP_FACE}
    • - *
    • {@link #BND_ICON_SNAP_VOLUME ICON_SNAP_VOLUME}
    • - *
    • {@link #BND_ICON_STICKY_UVS_LOC ICON_STICKY_UVS_LOC}
    • - *
    • {@link #BND_ICON_STICKY_UVS_DISABLE ICON_STICKY_UVS_DISABLE}
    • - *
    • {@link #BND_ICON_STICKY_UVS_VERT ICON_STICKY_UVS_VERT}
    • - *
    • {@link #BND_ICON_CLIPUV_DEHLT ICON_CLIPUV_DEHLT}
    • - *
    • {@link #BND_ICON_CLIPUV_HLT ICON_CLIPUV_HLT}
    • - *
    • {@link #BND_ICON_SNAP_PEEL_OBJECT ICON_SNAP_PEEL_OBJECT}
    • - *
    • {@link #BND_ICON_GRID ICON_GRID}
    • - *
    • {@link #BND_ICON_PASTEDOWN ICON_PASTEDOWN}
    • - *
    • {@link #BND_ICON_COPYDOWN ICON_COPYDOWN}
    • - *
    • {@link #BND_ICON_PASTEFLIPUP ICON_PASTEFLIPUP}
    • - *
    • {@link #BND_ICON_PASTEFLIPDOWN ICON_PASTEFLIPDOWN}
    • - *
    • {@link #BND_ICON_SNAP_SURFACE ICON_SNAP_SURFACE}
    • - *
    • {@link #BND_ICON_AUTOMERGE_ON ICON_AUTOMERGE_ON}
    • - *
    • {@link #BND_ICON_AUTOMERGE_OFF ICON_AUTOMERGE_OFF}
    • - *
    • {@link #BND_ICON_RETOPO ICON_RETOPO}
    • - *
    • {@link #BND_ICON_UV_VERTEXSEL ICON_UV_VERTEXSEL}
    • - *
    • {@link #BND_ICON_UV_EDGESEL ICON_UV_EDGESEL}
    • - *
    • {@link #BND_ICON_UV_FACESEL ICON_UV_FACESEL}
    • - *
    • {@link #BND_ICON_UV_ISLANDSEL ICON_UV_ISLANDSEL}
    • - *
    • {@link #BND_ICON_UV_SYNC_SELECT ICON_UV_SYNC_SELECT}
    • - *
    • {@link #BND_ICON_BBOX ICON_BBOX}
    • - *
    • {@link #BND_ICON_WIRE ICON_WIRE}
    • - *
    • {@link #BND_ICON_SOLID ICON_SOLID}
    • - *
    • {@link #BND_ICON_SMOOTH ICON_SMOOTH}
    • - *
    • {@link #BND_ICON_POTATO ICON_POTATO}
    • - *
    • {@link #BND_ICON_ORTHO ICON_ORTHO}
    • - *
    • {@link #BND_ICON_LOCKVIEW_OFF ICON_LOCKVIEW_OFF}
    • - *
    • {@link #BND_ICON_LOCKVIEW_ON ICON_LOCKVIEW_ON}
    • - *
    • {@link #BND_ICON_AXIS_SIDE ICON_AXIS_SIDE}
    • - *
    • {@link #BND_ICON_AXIS_FRONT ICON_AXIS_FRONT}
    • - *
    • {@link #BND_ICON_AXIS_TOP ICON_AXIS_TOP}
    • - *
    • {@link #BND_ICON_NDOF_DOM ICON_NDOF_DOM}
    • - *
    • {@link #BND_ICON_NDOF_TURN ICON_NDOF_TURN}
    • - *
    • {@link #BND_ICON_NDOF_FLY ICON_NDOF_FLY}
    • - *
    • {@link #BND_ICON_NDOF_TRANS ICON_NDOF_TRANS}
    • - *
    • {@link #BND_ICON_LAYER_USED ICON_LAYER_USED}
    • - *
    • {@link #BND_ICON_LAYER_ACTIVE ICON_LAYER_ACTIVE}
    • - *
    • {@link #BND_ICON_SORTALPHA ICON_SORTALPHA}
    • - *
    • {@link #BND_ICON_SORTBYEXT ICON_SORTBYEXT}
    • - *
    • {@link #BND_ICON_SORTTIME ICON_SORTTIME}
    • - *
    • {@link #BND_ICON_SORTSIZE ICON_SORTSIZE}
    • - *
    • {@link #BND_ICON_LONGDISPLAY ICON_LONGDISPLAY}
    • - *
    • {@link #BND_ICON_SHORTDISPLAY ICON_SHORTDISPLAY}
    • - *
    • {@link #BND_ICON_GHOST ICON_GHOST}
    • - *
    • {@link #BND_ICON_IMGDISPLAY ICON_IMGDISPLAY}
    • - *
    • {@link #BND_ICON_SAVE_AS ICON_SAVE_AS}
    • - *
    • {@link #BND_ICON_SAVE_COPY ICON_SAVE_COPY}
    • - *
    • {@link #BND_ICON_BOOKMARKS ICON_BOOKMARKS}
    • - *
    • {@link #BND_ICON_FONTPREVIEW ICON_FONTPREVIEW}
    • - *
    • {@link #BND_ICON_FILTER ICON_FILTER}
    • - *
    • {@link #BND_ICON_NEWFOLDER ICON_NEWFOLDER}
    • - *
    • {@link #BND_ICON_OPEN_RECENT ICON_OPEN_RECENT}
    • - *
    • {@link #BND_ICON_FILE_PARENT ICON_FILE_PARENT}
    • - *
    • {@link #BND_ICON_FILE_REFRESH ICON_FILE_REFRESH}
    • - *
    • {@link #BND_ICON_FILE_FOLDER ICON_FILE_FOLDER}
    • - *
    • {@link #BND_ICON_FILE_BLANK ICON_FILE_BLANK}
    • - *
    • {@link #BND_ICON_FILE_BLEND ICON_FILE_BLEND}
    • - *
    • {@link #BND_ICON_FILE_IMAGE ICON_FILE_IMAGE}
    • - *
    • {@link #BND_ICON_FILE_MOVIE ICON_FILE_MOVIE}
    • - *
    • {@link #BND_ICON_FILE_SCRIPT ICON_FILE_SCRIPT}
    • - *
    • {@link #BND_ICON_FILE_SOUND ICON_FILE_SOUND}
    • - *
    • {@link #BND_ICON_FILE_FONT ICON_FILE_FONT}
    • - *
    • {@link #BND_ICON_FILE_TEXT ICON_FILE_TEXT}
    • - *
    • {@link #BND_ICON_RECOVER_AUTO ICON_RECOVER_AUTO}
    • - *
    • {@link #BND_ICON_SAVE_PREFS ICON_SAVE_PREFS}
    • - *
    • {@link #BND_ICON_LINK_BLEND ICON_LINK_BLEND}
    • - *
    • {@link #BND_ICON_APPEND_BLEND ICON_APPEND_BLEND}
    • - *
    • {@link #BND_ICON_IMPORT ICON_IMPORT}
    • - *
    • {@link #BND_ICON_EXPORT ICON_EXPORT}
    • - *
    • {@link #BND_ICON_EXTERNAL_DATA ICON_EXTERNAL_DATA}
    • - *
    • {@link #BND_ICON_LOAD_FACTORY ICON_LOAD_FACTORY}
    • - *
    • {@link #BND_ICON_LOOP_BACK ICON_LOOP_BACK}
    • - *
    • {@link #BND_ICON_LOOP_FORWARDS ICON_LOOP_FORWARDS}
    • - *
    • {@link #BND_ICON_BACK ICON_BACK}
    • - *
    • {@link #BND_ICON_FORWARD ICON_FORWARD}
    • - *
    • {@link #BND_ICON_FILE_BACKUP ICON_FILE_BACKUP}
    • - *
    • {@link #BND_ICON_DISK_DRIVE ICON_DISK_DRIVE}
    • - *
    • {@link #BND_ICON_MATPLANE ICON_MATPLANE}
    • - *
    • {@link #BND_ICON_MATSPHERE ICON_MATSPHERE}
    • - *
    • {@link #BND_ICON_MATCUBE ICON_MATCUBE}
    • - *
    • {@link #BND_ICON_MONKEY ICON_MONKEY}
    • - *
    • {@link #BND_ICON_HAIR ICON_HAIR}
    • - *
    • {@link #BND_ICON_ALIASED ICON_ALIASED}
    • - *
    • {@link #BND_ICON_ANTIALIASED ICON_ANTIALIASED}
    • - *
    • {@link #BND_ICON_MAT_SPHERE_SKY ICON_MAT_SPHERE_SKY}
    • - *
    • {@link #BND_ICON_WORDWRAP_OFF ICON_WORDWRAP_OFF}
    • - *
    • {@link #BND_ICON_WORDWRAP_ON ICON_WORDWRAP_ON}
    • - *
    • {@link #BND_ICON_SYNTAX_OFF ICON_SYNTAX_OFF}
    • - *
    • {@link #BND_ICON_SYNTAX_ON ICON_SYNTAX_ON}
    • - *
    • {@link #BND_ICON_LINENUMBERS_OFF ICON_LINENUMBERS_OFF}
    • - *
    • {@link #BND_ICON_LINENUMBERS_ON ICON_LINENUMBERS_ON}
    • - *
    • {@link #BND_ICON_SCRIPTPLUGINS ICON_SCRIPTPLUGINS}
    • - *
    • {@link #BND_ICON_SEQ_SEQUENCER ICON_SEQ_SEQUENCER}
    • - *
    • {@link #BND_ICON_SEQ_PREVIEW ICON_SEQ_PREVIEW}
    • - *
    • {@link #BND_ICON_SEQ_LUMA_WAVEFORM ICON_SEQ_LUMA_WAVEFORM}
    • - *
    • {@link #BND_ICON_SEQ_CHROMA_SCOPE ICON_SEQ_CHROMA_SCOPE}
    • - *
    • {@link #BND_ICON_SEQ_HISTOGRAM ICON_SEQ_HISTOGRAM}
    • - *
    • {@link #BND_ICON_SEQ_SPLITVIEW ICON_SEQ_SPLITVIEW}
    • - *
    • {@link #BND_ICON_IMAGE_RGB ICON_IMAGE_RGB}
    • - *
    • {@link #BND_ICON_IMAGE_RGB_ALPHA ICON_IMAGE_RGB_ALPHA}
    • - *
    • {@link #BND_ICON_IMAGE_ALPHA ICON_IMAGE_ALPHA}
    • - *
    • {@link #BND_ICON_IMAGE_ZDEPTH ICON_IMAGE_ZDEPTH}
    • - *
    • {@link #BND_ICON_IMAGEFILE ICON_IMAGEFILE}
    • - *
    - */ - public static final int - BND_ICON_NONE = BND_ICONID(0,29), - BND_ICON_QUESTION = BND_ICONID(1,29), - BND_ICON_ERROR = BND_ICONID(2,29), - BND_ICON_CANCEL = BND_ICONID(3,29), - BND_ICON_TRIA_RIGHT = BND_ICONID(4,29), - BND_ICON_TRIA_DOWN = BND_ICONID(5,29), - BND_ICON_TRIA_LEFT = BND_ICONID(6,29), - BND_ICON_TRIA_UP = BND_ICONID(7,29), - BND_ICON_ARROW_LEFTRIGHT = BND_ICONID(8,29), - BND_ICON_PLUS = BND_ICONID(9,29), - BND_ICON_DISCLOSURE_TRI_DOWN = BND_ICONID(10,29), - BND_ICON_DISCLOSURE_TRI_RIGHT = BND_ICONID(11,29), - BND_ICON_RADIOBUT_OFF = BND_ICONID(12,29), - BND_ICON_RADIOBUT_ON = BND_ICONID(13,29), - BND_ICON_MENU_PANEL = BND_ICONID(14,29), - BND_ICON_BLENDER = BND_ICONID(15,29), - BND_ICON_GRIP = BND_ICONID(16,29), - BND_ICON_DOT = BND_ICONID(17,29), - BND_ICON_COLLAPSEMENU = BND_ICONID(18,29), - BND_ICON_X = BND_ICONID(19,29), - BND_ICON_GO_LEFT = BND_ICONID(21,29), - BND_ICON_PLUG = BND_ICONID(22,29), - BND_ICON_UI = BND_ICONID(23,29), - BND_ICON_NODE = BND_ICONID(24,29), - BND_ICON_NODE_SEL = BND_ICONID(25,29), - BND_ICON_FULLSCREEN = BND_ICONID(0,28), - BND_ICON_SPLITSCREEN = BND_ICONID(1,28), - BND_ICON_RIGHTARROW_THIN = BND_ICONID(2,28), - BND_ICON_BORDERMOVE = BND_ICONID(3,28), - BND_ICON_VIEWZOOM = BND_ICONID(4,28), - BND_ICON_ZOOMIN = BND_ICONID(5,28), - BND_ICON_ZOOMOUT = BND_ICONID(6,28), - BND_ICON_PANEL_CLOSE = BND_ICONID(7,28), - BND_ICON_COPY_ID = BND_ICONID(8,28), - BND_ICON_EYEDROPPER = BND_ICONID(9,28), - BND_ICON_LINK_AREA = BND_ICONID(10,28), - BND_ICON_AUTO = BND_ICONID(11,28), - BND_ICON_CHECKBOX_DEHLT = BND_ICONID(12,28), - BND_ICON_CHECKBOX_HLT = BND_ICONID(13,28), - BND_ICON_UNLOCKED = BND_ICONID(14,28), - BND_ICON_LOCKED = BND_ICONID(15,28), - BND_ICON_UNPINNED = BND_ICONID(16,28), - BND_ICON_PINNED = BND_ICONID(17,28), - BND_ICON_SCREEN_BACK = BND_ICONID(18,28), - BND_ICON_RIGHTARROW = BND_ICONID(19,28), - BND_ICON_DOWNARROW_HLT = BND_ICONID(20,28), - BND_ICON_DOTSUP = BND_ICONID(21,28), - BND_ICON_DOTSDOWN = BND_ICONID(22,28), - BND_ICON_LINK = BND_ICONID(23,28), - BND_ICON_INLINK = BND_ICONID(24,28), - BND_ICON_PLUGIN = BND_ICONID(25,28), - BND_ICON_HELP = BND_ICONID(0,27), - BND_ICON_GHOST_ENABLED = BND_ICONID(1,27), - BND_ICON_COLOR = BND_ICONID(2,27), - BND_ICON_LINKED = BND_ICONID(3,27), - BND_ICON_UNLINKED = BND_ICONID(4,27), - BND_ICON_HAND = BND_ICONID(5,27), - BND_ICON_ZOOM_ALL = BND_ICONID(6,27), - BND_ICON_ZOOM_SELECTED = BND_ICONID(7,27), - BND_ICON_ZOOM_PREVIOUS = BND_ICONID(8,27), - BND_ICON_ZOOM_IN = BND_ICONID(9,27), - BND_ICON_ZOOM_OUT = BND_ICONID(10,27), - BND_ICON_RENDER_REGION = BND_ICONID(11,27), - BND_ICON_BORDER_RECT = BND_ICONID(12,27), - BND_ICON_BORDER_LASSO = BND_ICONID(13,27), - BND_ICON_FREEZE = BND_ICONID(14,27), - BND_ICON_STYLUS_PRESSURE = BND_ICONID(15,27), - BND_ICON_GHOST_DISABLED = BND_ICONID(16,27), - BND_ICON_NEW = BND_ICONID(17,27), - BND_ICON_FILE_TICK = BND_ICONID(18,27), - BND_ICON_QUIT = BND_ICONID(19,27), - BND_ICON_URL = BND_ICONID(20,27), - BND_ICON_RECOVER_LAST = BND_ICONID(21,27), - BND_ICON_FULLSCREEN_ENTER = BND_ICONID(23,27), - BND_ICON_FULLSCREEN_EXIT = BND_ICONID(24,27), - BND_ICON_BLANK1 = BND_ICONID(25,27), - BND_ICON_LAMP = BND_ICONID(0,26), - BND_ICON_MATERIAL = BND_ICONID(1,26), - BND_ICON_TEXTURE = BND_ICONID(2,26), - BND_ICON_ANIM = BND_ICONID(3,26), - BND_ICON_WORLD = BND_ICONID(4,26), - BND_ICON_SCENE = BND_ICONID(5,26), - BND_ICON_EDIT = BND_ICONID(6,26), - BND_ICON_GAME = BND_ICONID(7,26), - BND_ICON_RADIO = BND_ICONID(8,26), - BND_ICON_SCRIPT = BND_ICONID(9,26), - BND_ICON_PARTICLES = BND_ICONID(10,26), - BND_ICON_PHYSICS = BND_ICONID(11,26), - BND_ICON_SPEAKER = BND_ICONID(12,26), - BND_ICON_TEXTURE_SHADED = BND_ICONID(13,26), - BND_ICON_VIEW3D = BND_ICONID(0,25), - BND_ICON_IPO = BND_ICONID(1,25), - BND_ICON_OOPS = BND_ICONID(2,25), - BND_ICON_BUTS = BND_ICONID(3,25), - BND_ICON_FILESEL = BND_ICONID(4,25), - BND_ICON_IMAGE_COL = BND_ICONID(5,25), - BND_ICON_INFO = BND_ICONID(6,25), - BND_ICON_SEQUENCE = BND_ICONID(7,25), - BND_ICON_TEXT = BND_ICONID(8,25), - BND_ICON_IMASEL = BND_ICONID(9,25), - BND_ICON_SOUND = BND_ICONID(10,25), - BND_ICON_ACTION = BND_ICONID(11,25), - BND_ICON_NLA = BND_ICONID(12,25), - BND_ICON_SCRIPTWIN = BND_ICONID(13,25), - BND_ICON_TIME = BND_ICONID(14,25), - BND_ICON_NODETREE = BND_ICONID(15,25), - BND_ICON_LOGIC = BND_ICONID(16,25), - BND_ICON_CONSOLE = BND_ICONID(17,25), - BND_ICON_PREFERENCES = BND_ICONID(18,25), - BND_ICON_CLIP = BND_ICONID(19,25), - BND_ICON_ASSET_MANAGER = BND_ICONID(20,25), - BND_ICON_OBJECT_DATAMODE = BND_ICONID(0,24), - BND_ICON_EDITMODE_HLT = BND_ICONID(1,24), - BND_ICON_FACESEL_HLT = BND_ICONID(2,24), - BND_ICON_VPAINT_HLT = BND_ICONID(3,24), - BND_ICON_TPAINT_HLT = BND_ICONID(4,24), - BND_ICON_WPAINT_HLT = BND_ICONID(5,24), - BND_ICON_SCULPTMODE_HLT = BND_ICONID(6,24), - BND_ICON_POSE_HLT = BND_ICONID(7,24), - BND_ICON_PARTICLEMODE = BND_ICONID(8,24), - BND_ICON_LIGHTPAINT = BND_ICONID(9,24), - BND_ICON_SCENE_DATA = BND_ICONID(0,23), - BND_ICON_RENDERLAYERS = BND_ICONID(1,23), - BND_ICON_WORLD_DATA = BND_ICONID(2,23), - BND_ICON_OBJECT_DATA = BND_ICONID(3,23), - BND_ICON_MESH_DATA = BND_ICONID(4,23), - BND_ICON_CURVE_DATA = BND_ICONID(5,23), - BND_ICON_META_DATA = BND_ICONID(6,23), - BND_ICON_LATTICE_DATA = BND_ICONID(7,23), - BND_ICON_LAMP_DATA = BND_ICONID(8,23), - BND_ICON_MATERIAL_DATA = BND_ICONID(9,23), - BND_ICON_TEXTURE_DATA = BND_ICONID(10,23), - BND_ICON_ANIM_DATA = BND_ICONID(11,23), - BND_ICON_CAMERA_DATA = BND_ICONID(12,23), - BND_ICON_PARTICLE_DATA = BND_ICONID(13,23), - BND_ICON_LIBRARY_DATA_DIRECT = BND_ICONID(14,23), - BND_ICON_GROUP = BND_ICONID(15,23), - BND_ICON_ARMATURE_DATA = BND_ICONID(16,23), - BND_ICON_POSE_DATA = BND_ICONID(17,23), - BND_ICON_BONE_DATA = BND_ICONID(18,23), - BND_ICON_CONSTRAINT = BND_ICONID(19,23), - BND_ICON_SHAPEKEY_DATA = BND_ICONID(20,23), - BND_ICON_CONSTRAINT_BONE = BND_ICONID(21,23), - BND_ICON_CAMERA_STEREO = BND_ICONID(22,23), - BND_ICON_PACKAGE = BND_ICONID(23,23), - BND_ICON_UGLYPACKAGE = BND_ICONID(24,23), - BND_ICON_BRUSH_DATA = BND_ICONID(0,22), - BND_ICON_IMAGE_DATA = BND_ICONID(1,22), - BND_ICON_FILE = BND_ICONID(2,22), - BND_ICON_FCURVE = BND_ICONID(3,22), - BND_ICON_FONT_DATA = BND_ICONID(4,22), - BND_ICON_RENDER_RESULT = BND_ICONID(5,22), - BND_ICON_SURFACE_DATA = BND_ICONID(6,22), - BND_ICON_EMPTY_DATA = BND_ICONID(7,22), - BND_ICON_SETTINGS = BND_ICONID(8,22), - BND_ICON_RENDER_ANIMATION = BND_ICONID(9,22), - BND_ICON_RENDER_STILL = BND_ICONID(10,22), - BND_ICON_BOIDS = BND_ICONID(12,22), - BND_ICON_STRANDS = BND_ICONID(13,22), - BND_ICON_LIBRARY_DATA_INDIRECT = BND_ICONID(14,22), - BND_ICON_GREASEPENCIL = BND_ICONID(15,22), - BND_ICON_LINE_DATA = BND_ICONID(16,22), - BND_ICON_GROUP_BONE = BND_ICONID(18,22), - BND_ICON_GROUP_VERTEX = BND_ICONID(19,22), - BND_ICON_GROUP_VCOL = BND_ICONID(20,22), - BND_ICON_GROUP_UVS = BND_ICONID(21,22), - BND_ICON_RNA = BND_ICONID(24,22), - BND_ICON_RNA_ADD = BND_ICONID(25,22), - BND_ICON_OUTLINER_OB_EMPTY = BND_ICONID(0,20), - BND_ICON_OUTLINER_OB_MESH = BND_ICONID(1,20), - BND_ICON_OUTLINER_OB_CURVE = BND_ICONID(2,20), - BND_ICON_OUTLINER_OB_LATTICE = BND_ICONID(3,20), - BND_ICON_OUTLINER_OB_META = BND_ICONID(4,20), - BND_ICON_OUTLINER_OB_LAMP = BND_ICONID(5,20), - BND_ICON_OUTLINER_OB_CAMERA = BND_ICONID(6,20), - BND_ICON_OUTLINER_OB_ARMATURE = BND_ICONID(7,20), - BND_ICON_OUTLINER_OB_FONT = BND_ICONID(8,20), - BND_ICON_OUTLINER_OB_SURFACE = BND_ICONID(9,20), - BND_ICON_OUTLINER_OB_SPEAKER = BND_ICONID(10,20), - BND_ICON_RESTRICT_VIEW_OFF = BND_ICONID(19,20), - BND_ICON_RESTRICT_VIEW_ON = BND_ICONID(20,20), - BND_ICON_RESTRICT_SELECT_OFF = BND_ICONID(21,20), - BND_ICON_RESTRICT_SELECT_ON = BND_ICONID(22,20), - BND_ICON_RESTRICT_RENDER_OFF = BND_ICONID(23,20), - BND_ICON_RESTRICT_RENDER_ON = BND_ICONID(24,20), - BND_ICON_OUTLINER_DATA_EMPTY = BND_ICONID(0,19), - BND_ICON_OUTLINER_DATA_MESH = BND_ICONID(1,19), - BND_ICON_OUTLINER_DATA_CURVE = BND_ICONID(2,19), - BND_ICON_OUTLINER_DATA_LATTICE = BND_ICONID(3,19), - BND_ICON_OUTLINER_DATA_META = BND_ICONID(4,19), - BND_ICON_OUTLINER_DATA_LAMP = BND_ICONID(5,19), - BND_ICON_OUTLINER_DATA_CAMERA = BND_ICONID(6,19), - BND_ICON_OUTLINER_DATA_ARMATURE = BND_ICONID(7,19), - BND_ICON_OUTLINER_DATA_FONT = BND_ICONID(8,19), - BND_ICON_OUTLINER_DATA_SURFACE = BND_ICONID(9,19), - BND_ICON_OUTLINER_DATA_SPEAKER = BND_ICONID(10,19), - BND_ICON_OUTLINER_DATA_POSE = BND_ICONID(11,19), - BND_ICON_MESH_PLANE = BND_ICONID(0,18), - BND_ICON_MESH_CUBE = BND_ICONID(1,18), - BND_ICON_MESH_CIRCLE = BND_ICONID(2,18), - BND_ICON_MESH_UVSPHERE = BND_ICONID(3,18), - BND_ICON_MESH_ICOSPHERE = BND_ICONID(4,18), - BND_ICON_MESH_GRID = BND_ICONID(5,18), - BND_ICON_MESH_MONKEY = BND_ICONID(6,18), - BND_ICON_MESH_CYLINDER = BND_ICONID(7,18), - BND_ICON_MESH_TORUS = BND_ICONID(8,18), - BND_ICON_MESH_CONE = BND_ICONID(9,18), - BND_ICON_LAMP_POINT = BND_ICONID(12,18), - BND_ICON_LAMP_SUN = BND_ICONID(13,18), - BND_ICON_LAMP_SPOT = BND_ICONID(14,18), - BND_ICON_LAMP_HEMI = BND_ICONID(15,18), - BND_ICON_LAMP_AREA = BND_ICONID(16,18), - BND_ICON_META_EMPTY = BND_ICONID(19,18), - BND_ICON_META_PLANE = BND_ICONID(20,18), - BND_ICON_META_CUBE = BND_ICONID(21,18), - BND_ICON_META_BALL = BND_ICONID(22,18), - BND_ICON_META_ELLIPSOID = BND_ICONID(23,18), - BND_ICON_META_CAPSULE = BND_ICONID(24,18), - BND_ICON_SURFACE_NCURVE = BND_ICONID(0,17), - BND_ICON_SURFACE_NCIRCLE = BND_ICONID(1,17), - BND_ICON_SURFACE_NSURFACE = BND_ICONID(2,17), - BND_ICON_SURFACE_NCYLINDER = BND_ICONID(3,17), - BND_ICON_SURFACE_NSPHERE = BND_ICONID(4,17), - BND_ICON_SURFACE_NTORUS = BND_ICONID(5,17), - BND_ICON_CURVE_BEZCURVE = BND_ICONID(9,17), - BND_ICON_CURVE_BEZCIRCLE = BND_ICONID(10,17), - BND_ICON_CURVE_NCURVE = BND_ICONID(11,17), - BND_ICON_CURVE_NCIRCLE = BND_ICONID(12,17), - BND_ICON_CURVE_PATH = BND_ICONID(13,17), - BND_ICON_COLOR_RED = BND_ICONID(19,17), - BND_ICON_COLOR_GREEN = BND_ICONID(20,17), - BND_ICON_COLOR_BLUE = BND_ICONID(21,17), - BND_ICON_FORCE_FORCE = BND_ICONID(0,16), - BND_ICON_FORCE_WIND = BND_ICONID(1,16), - BND_ICON_FORCE_VORTEX = BND_ICONID(2,16), - BND_ICON_FORCE_MAGNETIC = BND_ICONID(3,16), - BND_ICON_FORCE_HARMONIC = BND_ICONID(4,16), - BND_ICON_FORCE_CHARGE = BND_ICONID(5,16), - BND_ICON_FORCE_LENNARDJONES = BND_ICONID(6,16), - BND_ICON_FORCE_TEXTURE = BND_ICONID(7,16), - BND_ICON_FORCE_CURVE = BND_ICONID(8,16), - BND_ICON_FORCE_BOID = BND_ICONID(9,16), - BND_ICON_FORCE_TURBULENCE = BND_ICONID(10,16), - BND_ICON_FORCE_DRAG = BND_ICONID(11,16), - BND_ICON_FORCE_SMOKEFLOW = BND_ICONID(12,16), - BND_ICON_MODIFIER = BND_ICONID(0,12), - BND_ICON_MOD_WAVE = BND_ICONID(1,12), - BND_ICON_MOD_BUILD = BND_ICONID(2,12), - BND_ICON_MOD_DECIM = BND_ICONID(3,12), - BND_ICON_MOD_MIRROR = BND_ICONID(4,12), - BND_ICON_MOD_SOFT = BND_ICONID(5,12), - BND_ICON_MOD_SUBSURF = BND_ICONID(6,12), - BND_ICON_HOOK = BND_ICONID(7,12), - BND_ICON_MOD_PHYSICS = BND_ICONID(8,12), - BND_ICON_MOD_PARTICLES = BND_ICONID(9,12), - BND_ICON_MOD_BOOLEAN = BND_ICONID(10,12), - BND_ICON_MOD_EDGESPLIT = BND_ICONID(11,12), - BND_ICON_MOD_ARRAY = BND_ICONID(12,12), - BND_ICON_MOD_UVPROJECT = BND_ICONID(13,12), - BND_ICON_MOD_DISPLACE = BND_ICONID(14,12), - BND_ICON_MOD_CURVE = BND_ICONID(15,12), - BND_ICON_MOD_LATTICE = BND_ICONID(16,12), - BND_ICON_CONSTRAINT_DATA = BND_ICONID(17,12), - BND_ICON_MOD_ARMATURE = BND_ICONID(18,12), - BND_ICON_MOD_SHRINKWRAP = BND_ICONID(19,12), - BND_ICON_MOD_CAST = BND_ICONID(20,12), - BND_ICON_MOD_MESHDEFORM = BND_ICONID(21,12), - BND_ICON_MOD_BEVEL = BND_ICONID(22,12), - BND_ICON_MOD_SMOOTH = BND_ICONID(23,12), - BND_ICON_MOD_SIMPLEDEFORM = BND_ICONID(24,12), - BND_ICON_MOD_MASK = BND_ICONID(25,12), - BND_ICON_MOD_CLOTH = BND_ICONID(0,11), - BND_ICON_MOD_EXPLODE = BND_ICONID(1,11), - BND_ICON_MOD_FLUIDSIM = BND_ICONID(2,11), - BND_ICON_MOD_MULTIRES = BND_ICONID(3,11), - BND_ICON_MOD_SMOKE = BND_ICONID(4,11), - BND_ICON_MOD_SOLIDIFY = BND_ICONID(5,11), - BND_ICON_MOD_SCREW = BND_ICONID(6,11), - BND_ICON_MOD_VERTEX_WEIGHT = BND_ICONID(7,11), - BND_ICON_MOD_DYNAMICPAINT = BND_ICONID(8,11), - BND_ICON_MOD_REMESH = BND_ICONID(9,11), - BND_ICON_MOD_OCEAN = BND_ICONID(10,11), - BND_ICON_MOD_WARP = BND_ICONID(11,11), - BND_ICON_MOD_SKIN = BND_ICONID(12,11), - BND_ICON_MOD_TRIANGULATE = BND_ICONID(13,11), - BND_ICON_MOD_WIREFRAME = BND_ICONID(14,11), - BND_ICON_REC = BND_ICONID(0,10), - BND_ICON_PLAY = BND_ICONID(1,10), - BND_ICON_FF = BND_ICONID(2,10), - BND_ICON_REW = BND_ICONID(3,10), - BND_ICON_PAUSE = BND_ICONID(4,10), - BND_ICON_PREV_KEYFRAME = BND_ICONID(5,10), - BND_ICON_NEXT_KEYFRAME = BND_ICONID(6,10), - BND_ICON_PLAY_AUDIO = BND_ICONID(7,10), - BND_ICON_PLAY_REVERSE = BND_ICONID(8,10), - BND_ICON_PREVIEW_RANGE = BND_ICONID(9,10), - BND_ICON_ACTION_TWEAK = BND_ICONID(10,10), - BND_ICON_PMARKER_ACT = BND_ICONID(11,10), - BND_ICON_PMARKER_SEL = BND_ICONID(12,10), - BND_ICON_PMARKER = BND_ICONID(13,10), - BND_ICON_MARKER_HLT = BND_ICONID(14,10), - BND_ICON_MARKER = BND_ICONID(15,10), - BND_ICON_SPACE2 = BND_ICONID(16,10), - BND_ICON_SPACE3 = BND_ICONID(17,10), - BND_ICON_KEYINGSET = BND_ICONID(18,10), - BND_ICON_KEY_DEHLT = BND_ICONID(19,10), - BND_ICON_KEY_HLT = BND_ICONID(20,10), - BND_ICON_MUTE_IPO_OFF = BND_ICONID(21,10), - BND_ICON_MUTE_IPO_ON = BND_ICONID(22,10), - BND_ICON_VISIBLE_IPO_OFF = BND_ICONID(23,10), - BND_ICON_VISIBLE_IPO_ON = BND_ICONID(24,10), - BND_ICON_DRIVER = BND_ICONID(25,10), - BND_ICON_SOLO_OFF = BND_ICONID(0,9), - BND_ICON_SOLO_ON = BND_ICONID(1,9), - BND_ICON_FRAME_PREV = BND_ICONID(2,9), - BND_ICON_FRAME_NEXT = BND_ICONID(3,9), - BND_ICON_NLA_PUSHDOWN = BND_ICONID(4,9), - BND_ICON_IPO_CONSTANT = BND_ICONID(5,9), - BND_ICON_IPO_LINEAR = BND_ICONID(6,9), - BND_ICON_IPO_BEZIER = BND_ICONID(7,9), - BND_ICON_IPO_SINE = BND_ICONID(8,9), - BND_ICON_IPO_QUAD = BND_ICONID(9,9), - BND_ICON_IPO_CUBIC = BND_ICONID(10,9), - BND_ICON_IPO_QUART = BND_ICONID(11,9), - BND_ICON_IPO_QUINT = BND_ICONID(12,9), - BND_ICON_IPO_EXPO = BND_ICONID(13,9), - BND_ICON_IPO_CIRC = BND_ICONID(14,9), - BND_ICON_IPO_BOUNCE = BND_ICONID(15,9), - BND_ICON_IPO_ELASTIC = BND_ICONID(16,9), - BND_ICON_IPO_BACK = BND_ICONID(17,9), - BND_ICON_IPO_EASE_IN = BND_ICONID(18,9), - BND_ICON_IPO_EASE_OUT = BND_ICONID(19,9), - BND_ICON_IPO_EASE_IN_OUT = BND_ICONID(20,9), - BND_ICON_VERTEXSEL = BND_ICONID(0,8), - BND_ICON_EDGESEL = BND_ICONID(1,8), - BND_ICON_FACESEL = BND_ICONID(2,8), - BND_ICON_LOOPSEL = BND_ICONID(3,8), - BND_ICON_ROTATE = BND_ICONID(5,8), - BND_ICON_CURSOR = BND_ICONID(6,8), - BND_ICON_ROTATECOLLECTION = BND_ICONID(7,8), - BND_ICON_ROTATECENTER = BND_ICONID(8,8), - BND_ICON_ROTACTIVE = BND_ICONID(9,8), - BND_ICON_ALIGN = BND_ICONID(10,8), - BND_ICON_SMOOTHCURVE = BND_ICONID(12,8), - BND_ICON_SPHERECURVE = BND_ICONID(13,8), - BND_ICON_ROOTCURVE = BND_ICONID(14,8), - BND_ICON_SHARPCURVE = BND_ICONID(15,8), - BND_ICON_LINCURVE = BND_ICONID(16,8), - BND_ICON_NOCURVE = BND_ICONID(17,8), - BND_ICON_RNDCURVE = BND_ICONID(18,8), - BND_ICON_PROP_OFF = BND_ICONID(19,8), - BND_ICON_PROP_ON = BND_ICONID(20,8), - BND_ICON_PROP_CON = BND_ICONID(21,8), - BND_ICON_SCULPT_DYNTOPO = BND_ICONID(22,8), - BND_ICON_PARTICLE_POINT = BND_ICONID(23,8), - BND_ICON_PARTICLE_TIP = BND_ICONID(24,8), - BND_ICON_PARTICLE_PATH = BND_ICONID(25,8), - BND_ICON_MAN_TRANS = BND_ICONID(0,7), - BND_ICON_MAN_ROT = BND_ICONID(1,7), - BND_ICON_MAN_SCALE = BND_ICONID(2,7), - BND_ICON_MANIPUL = BND_ICONID(3,7), - BND_ICON_SNAP_OFF = BND_ICONID(4,7), - BND_ICON_SNAP_ON = BND_ICONID(5,7), - BND_ICON_SNAP_NORMAL = BND_ICONID(6,7), - BND_ICON_SNAP_INCREMENT = BND_ICONID(7,7), - BND_ICON_SNAP_VERTEX = BND_ICONID(8,7), - BND_ICON_SNAP_EDGE = BND_ICONID(9,7), - BND_ICON_SNAP_FACE = BND_ICONID(10,7), - BND_ICON_SNAP_VOLUME = BND_ICONID(11,7), - BND_ICON_STICKY_UVS_LOC = BND_ICONID(13,7), - BND_ICON_STICKY_UVS_DISABLE = BND_ICONID(14,7), - BND_ICON_STICKY_UVS_VERT = BND_ICONID(15,7), - BND_ICON_CLIPUV_DEHLT = BND_ICONID(16,7), - BND_ICON_CLIPUV_HLT = BND_ICONID(17,7), - BND_ICON_SNAP_PEEL_OBJECT = BND_ICONID(18,7), - BND_ICON_GRID = BND_ICONID(19,7), - BND_ICON_PASTEDOWN = BND_ICONID(0,6), - BND_ICON_COPYDOWN = BND_ICONID(1,6), - BND_ICON_PASTEFLIPUP = BND_ICONID(2,6), - BND_ICON_PASTEFLIPDOWN = BND_ICONID(3,6), - BND_ICON_SNAP_SURFACE = BND_ICONID(8,6), - BND_ICON_AUTOMERGE_ON = BND_ICONID(9,6), - BND_ICON_AUTOMERGE_OFF = BND_ICONID(10,6), - BND_ICON_RETOPO = BND_ICONID(11,6), - BND_ICON_UV_VERTEXSEL = BND_ICONID(12,6), - BND_ICON_UV_EDGESEL = BND_ICONID(13,6), - BND_ICON_UV_FACESEL = BND_ICONID(14,6), - BND_ICON_UV_ISLANDSEL = BND_ICONID(15,6), - BND_ICON_UV_SYNC_SELECT = BND_ICONID(16,6), - BND_ICON_BBOX = BND_ICONID(0,5), - BND_ICON_WIRE = BND_ICONID(1,5), - BND_ICON_SOLID = BND_ICONID(2,5), - BND_ICON_SMOOTH = BND_ICONID(3,5), - BND_ICON_POTATO = BND_ICONID(4,5), - BND_ICON_ORTHO = BND_ICONID(6,5), - BND_ICON_LOCKVIEW_OFF = BND_ICONID(9,5), - BND_ICON_LOCKVIEW_ON = BND_ICONID(10,5), - BND_ICON_AXIS_SIDE = BND_ICONID(12,5), - BND_ICON_AXIS_FRONT = BND_ICONID(13,5), - BND_ICON_AXIS_TOP = BND_ICONID(14,5), - BND_ICON_NDOF_DOM = BND_ICONID(15,5), - BND_ICON_NDOF_TURN = BND_ICONID(16,5), - BND_ICON_NDOF_FLY = BND_ICONID(17,5), - BND_ICON_NDOF_TRANS = BND_ICONID(18,5), - BND_ICON_LAYER_USED = BND_ICONID(19,5), - BND_ICON_LAYER_ACTIVE = BND_ICONID(20,5), - BND_ICON_SORTALPHA = BND_ICONID(0,3), - BND_ICON_SORTBYEXT = BND_ICONID(1,3), - BND_ICON_SORTTIME = BND_ICONID(2,3), - BND_ICON_SORTSIZE = BND_ICONID(3,3), - BND_ICON_LONGDISPLAY = BND_ICONID(4,3), - BND_ICON_SHORTDISPLAY = BND_ICONID(5,3), - BND_ICON_GHOST = BND_ICONID(6,3), - BND_ICON_IMGDISPLAY = BND_ICONID(7,3), - BND_ICON_SAVE_AS = BND_ICONID(8,3), - BND_ICON_SAVE_COPY = BND_ICONID(9,3), - BND_ICON_BOOKMARKS = BND_ICONID(10,3), - BND_ICON_FONTPREVIEW = BND_ICONID(11,3), - BND_ICON_FILTER = BND_ICONID(12,3), - BND_ICON_NEWFOLDER = BND_ICONID(13,3), - BND_ICON_OPEN_RECENT = BND_ICONID(14,3), - BND_ICON_FILE_PARENT = BND_ICONID(15,3), - BND_ICON_FILE_REFRESH = BND_ICONID(16,3), - BND_ICON_FILE_FOLDER = BND_ICONID(17,3), - BND_ICON_FILE_BLANK = BND_ICONID(18,3), - BND_ICON_FILE_BLEND = BND_ICONID(19,3), - BND_ICON_FILE_IMAGE = BND_ICONID(20,3), - BND_ICON_FILE_MOVIE = BND_ICONID(21,3), - BND_ICON_FILE_SCRIPT = BND_ICONID(22,3), - BND_ICON_FILE_SOUND = BND_ICONID(23,3), - BND_ICON_FILE_FONT = BND_ICONID(24,3), - BND_ICON_FILE_TEXT = BND_ICONID(25,3), - BND_ICON_RECOVER_AUTO = BND_ICONID(0,2), - BND_ICON_SAVE_PREFS = BND_ICONID(1,2), - BND_ICON_LINK_BLEND = BND_ICONID(2,2), - BND_ICON_APPEND_BLEND = BND_ICONID(3,2), - BND_ICON_IMPORT = BND_ICONID(4,2), - BND_ICON_EXPORT = BND_ICONID(5,2), - BND_ICON_EXTERNAL_DATA = BND_ICONID(6,2), - BND_ICON_LOAD_FACTORY = BND_ICONID(7,2), - BND_ICON_LOOP_BACK = BND_ICONID(13,2), - BND_ICON_LOOP_FORWARDS = BND_ICONID(14,2), - BND_ICON_BACK = BND_ICONID(15,2), - BND_ICON_FORWARD = BND_ICONID(16,2), - BND_ICON_FILE_BACKUP = BND_ICONID(24,2), - BND_ICON_DISK_DRIVE = BND_ICONID(25,2), - BND_ICON_MATPLANE = BND_ICONID(0,1), - BND_ICON_MATSPHERE = BND_ICONID(1,1), - BND_ICON_MATCUBE = BND_ICONID(2,1), - BND_ICON_MONKEY = BND_ICONID(3,1), - BND_ICON_HAIR = BND_ICONID(4,1), - BND_ICON_ALIASED = BND_ICONID(5,1), - BND_ICON_ANTIALIASED = BND_ICONID(6,1), - BND_ICON_MAT_SPHERE_SKY = BND_ICONID(7,1), - BND_ICON_WORDWRAP_OFF = BND_ICONID(12,1), - BND_ICON_WORDWRAP_ON = BND_ICONID(13,1), - BND_ICON_SYNTAX_OFF = BND_ICONID(14,1), - BND_ICON_SYNTAX_ON = BND_ICONID(15,1), - BND_ICON_LINENUMBERS_OFF = BND_ICONID(16,1), - BND_ICON_LINENUMBERS_ON = BND_ICONID(17,1), - BND_ICON_SCRIPTPLUGINS = BND_ICONID(18,1), - BND_ICON_SEQ_SEQUENCER = BND_ICONID(0,0), - BND_ICON_SEQ_PREVIEW = BND_ICONID(1,0), - BND_ICON_SEQ_LUMA_WAVEFORM = BND_ICONID(2,0), - BND_ICON_SEQ_CHROMA_SCOPE = BND_ICONID(3,0), - BND_ICON_SEQ_HISTOGRAM = BND_ICONID(4,0), - BND_ICON_SEQ_SPLITVIEW = BND_ICONID(5,0), - BND_ICON_IMAGE_RGB = BND_ICONID(9,0), - BND_ICON_IMAGE_RGB_ALPHA = BND_ICONID(10,0), - BND_ICON_IMAGE_ALPHA = BND_ICONID(11,0), - BND_ICON_IMAGE_ZDEPTH = BND_ICONID(12,0), - BND_ICON_IMAGEFILE = BND_ICONID(13,0); - - protected Blendish() { - throw new UnsupportedOperationException(); - } - - // --- [ bndSetTheme ] --- - - /** Unsafe version of: {@link #bndSetTheme SetTheme} */ - public static native void nbndSetTheme(long theme); - - /** Sets the current theme all widgets will be drawn with. The default Blender 2.6 theme is set by default. */ - public static void bndSetTheme(BNDtheme theme) { - nbndSetTheme(theme.address()); - } - - // --- [ bndGetTheme ] --- - - /** Unsafe version of: {@link #bndGetTheme GetTheme} */ - public static native long nbndGetTheme(); - - /** Returns the currently set theme. */ - @Nullable - @NativeType("BNDtheme const *") - public static BNDtheme bndGetTheme() { - long __result = nbndGetTheme(); - return BNDtheme.createSafe(__result); - } - - // --- [ bndSetIconImage ] --- - - /** - * Designates an image handle as returned by {@code nvgCreateImage*()} as the themes' icon sheet. - * - *

    The icon sheet format must be compatible to Blender 2.6's icon sheet; the order of icons does not matter. A valid icon sheet is e.g. shown at how to add an icon.

    - */ - public static native void bndSetIconImage(int image); - - // --- [ bndSetFont ] --- - - /** - * Designates an image handle as returned by {@code nvgCreateFont*()} as the themes' UI font. - * - *

    Blender's original UI font Droid Sans is perfectly suited and available here.

    - */ - public static native void bndSetFont(int font); - - // --- [ bndLabel ] --- - - /** Unsafe version of: {@link #bndLabel Label} */ - public static native void nbndLabel(long ctx, float x, float y, float w, float h, int iconid, long label); - - /** - * Draws a label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndLabel(ctx, x, y, w, h, iconid, memAddressSafe(label)); - } - - /** - * Draws a label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndLabel(ctx, x, y, w, h, iconid, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndToolButton ] --- - - /** Unsafe version of: {@link #bndToolButton ToolButton} */ - public static native void nbndToolButton(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long label); - - /** - * Draws a tool button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndToolButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndToolButton(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(label)); - } - - /** - * Draws a tool button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndToolButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndToolButton(ctx, x, y, w, h, flags, state, iconid, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndRadioButton ] --- - - /** Unsafe version of: {@link #bndRadioButton RadioButton} */ - public static native void nbndRadioButton(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long label); - - /** - * Draws a radio button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndRadioButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndRadioButton(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(label)); - } - - /** - * Draws a radio button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndRadioButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndRadioButton(ctx, x, y, w, h, flags, state, iconid, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndTextFieldTextPosition ] --- - - /** Unsafe version of: {@link #bndTextFieldTextPosition TextFieldTextPosition} */ - public static native int nbndTextFieldTextPosition(long ctx, float x, float y, float w, float h, int iconid, long text, int px, int py); - - /** - * Calculates the corresponding text position for given coordinates {@code px/py} in a text field. See {@link #bndTextField TextField} for more info. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be added to the widget - * @param text if not {@code NULL}, text will be printed to the widget - */ - public static int bndTextFieldTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") ByteBuffer text, int px, int py) { - if (CHECKS) { - check(ctx); - checkNT1Safe(text); - } - return nbndTextFieldTextPosition(ctx, x, y, w, h, iconid, memAddressSafe(text), px, py); - } - - /** - * Calculates the corresponding text position for given coordinates {@code px/py} in a text field. See {@link #bndTextField TextField} for more info. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be added to the widget - * @param text if not {@code NULL}, text will be printed to the widget - */ - public static int bndTextFieldTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") CharSequence text, int px, int py) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(text, true); - long textEncoded = text == null ? NULL : stack.getPointerAddress(); - return nbndTextFieldTextPosition(ctx, x, y, w, h, iconid, textEncoded, px, py); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndTextField ] --- - - /** Unsafe version of: {@link #bndTextField TextField} */ - public static native void nbndTextField(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long text, int cbegin, int cend); - - /** - * Draws a text field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param text if not {@code NULL}, text will be printed to the widget - * @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret - * @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will - * be drawn. - */ - public static void bndTextField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer text, int cbegin, int cend) { - if (CHECKS) { - check(ctx); - checkNT1Safe(text); - } - nbndTextField(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(text), cbegin, cend); - } - - /** - * Draws a text field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param text if not {@code NULL}, text will be printed to the widget - * @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret - * @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will - * be drawn. - */ - public static void bndTextField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence text, int cbegin, int cend) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(text, true); - long textEncoded = text == null ? NULL : stack.getPointerAddress(); - nbndTextField(ctx, x, y, w, h, flags, state, iconid, textEncoded, cbegin, cend); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndOptionButton ] --- - - /** Unsafe version of: {@link #bndOptionButton OptionButton} */ - public static native void nbndOptionButton(long ctx, float x, float y, float w, float h, int state, long label); - - /** - * Draws an option button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndOptionButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndOptionButton(ctx, x, y, w, h, state, memAddressSafe(label)); - } - - /** - * Draws an option button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndOptionButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndOptionButton(ctx, x, y, w, h, state, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndChoiceButton ] --- - - /** Unsafe version of: {@link #bndChoiceButton ChoiceButton} */ - public static native void nbndChoiceButton(long ctx, float x, float y, float w, float h, int flags, int state, int iconid, long label); - - /** - * Draws a choice button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndChoiceButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndChoiceButton(ctx, x, y, w, h, flags, state, iconid, memAddressSafe(label)); - } - - /** - * Draws a choice button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndChoiceButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndChoiceButton(ctx, x, y, w, h, flags, state, iconid, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndColorButton ] --- - - /** Unsafe version of: {@link #bndColorButton ColorButton} */ - public static native void nbndColorButton(long ctx, float x, float y, float w, float h, int flags, long color); - - /** - * Draws a color button with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - */ - public static void bndColorButton(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nbndColorButton(ctx, x, y, w, h, flags, color.address()); - } - - // --- [ bndNumberField ] --- - - /** Unsafe version of: {@link #bndNumberField NumberField} */ - public static native void nbndNumberField(long ctx, float x, float y, float w, float h, int flags, int state, long label, long value); - - /** - * Draws a number field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param label if not {@code NULL}, a label will be added to the widget - * @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator - */ - public static void bndNumberField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") ByteBuffer label, @Nullable @NativeType("char const *") ByteBuffer value) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - checkNT1Safe(value); - } - nbndNumberField(ctx, x, y, w, h, flags, state, memAddressSafe(label), memAddressSafe(value)); - } - - /** - * Draws a number field with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param label if not {@code NULL}, a label will be added to the widget - * @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator - */ - public static void bndNumberField(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, @Nullable @NativeType("char const *") CharSequence label, @Nullable @NativeType("char const *") CharSequence value) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(value, true); - long valueEncoded = value == null ? NULL : stack.getPointerAddress(); - nbndNumberField(ctx, x, y, w, h, flags, state, labelEncoded, valueEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndSlider ] --- - - /** Unsafe version of: {@link #bndSlider Slider} */ - public static native void nbndSlider(long ctx, float x, float y, float w, float h, int flags, int state, float progress, long label, long value); - - /** - * Draws slider control with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param progress must be in the range {@code 0..1} and controls the size of the slider bar - * @param label if not {@code NULL}, a label will be added to the widget - * @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator - */ - public static void bndSlider(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, float progress, @Nullable @NativeType("char const *") ByteBuffer label, @Nullable @NativeType("char const *") ByteBuffer value) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - checkNT1Safe(value); - } - nbndSlider(ctx, x, y, w, h, flags, state, progress, memAddressSafe(label), memAddressSafe(value)); - } - - /** - * Draws slider control with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param progress must be in the range {@code 0..1} and controls the size of the slider bar - * @param label if not {@code NULL}, a label will be added to the widget - * @param value if not {@code NULL}, a value will be added to the widget along with a ":" separator - */ - public static void bndSlider(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags, @NativeType("BNDwidgetState") int state, float progress, @Nullable @NativeType("char const *") CharSequence label, @Nullable @NativeType("char const *") CharSequence value) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(value, true); - long valueEncoded = value == null ? NULL : stack.getPointerAddress(); - nbndSlider(ctx, x, y, w, h, flags, state, progress, labelEncoded, valueEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndScrollBar ] --- - - /** Unsafe version of: {@link #bndScrollBar ScrollBar} */ - public static native void nbndScrollBar(long ctx, float x, float y, float w, float h, int state, float offset, float size); - - /** - * Draws scrollbar with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param w vertical widget looks best when width is {@link #BND_SCROLLBAR_WIDTH SCROLLBAR_WIDTH} - * @param h horizontal widget looks best when height is {@link #BND_SCROLLBAR_HEIGHT SCROLLBAR_HEIGHT} - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param offset is in the range {@code 0..1} and controls the position of the scroll handle - * @param size is in the range {@code 0..1} and controls the size of the scroll handle - */ - public static void bndScrollBar(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, float offset, float size) { - if (CHECKS) { - check(ctx); - } - nbndScrollBar(ctx, x, y, w, h, state, offset, size); - } - - // --- [ bndMenuBackground ] --- - - /** Unsafe version of: {@link #bndMenuBackground MenuBackground} */ - public static native void nbndMenuBackground(long ctx, float x, float y, float w, float h, int flags); - - /** - * Draws a menu background with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - */ - public static void bndMenuBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int flags) { - if (CHECKS) { - check(ctx); - } - nbndMenuBackground(ctx, x, y, w, h, flags); - } - - // --- [ bndMenuLabel ] --- - - /** Unsafe version of: {@link #bndMenuLabel MenuLabel} */ - public static native void nbndMenuLabel(long ctx, float x, float y, float w, float h, int iconid, long label); - - /** - * Draws a menu label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndMenuLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndMenuLabel(ctx, x, y, w, h, iconid, memAddressSafe(label)); - } - - /** - * Draws a menu label with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndMenuLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndMenuLabel(ctx, x, y, w, h, iconid, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndMenuItem ] --- - - /** Unsafe version of: {@link #bndMenuItem MenuItem} */ - public static native void nbndMenuItem(long ctx, float x, float y, float w, float h, int state, int iconid, long label); - - /** - * Draws a menu item with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndMenuItem(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndMenuItem(ctx, x, y, w, h, state, iconid, memAddressSafe(label)); - } - - /** - * Draws a menu item with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param h widget looks best when height is {@link #BND_WIDGET_HEIGHT WIDGET_HEIGHT} - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - */ - public static void bndMenuItem(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndMenuItem(ctx, x, y, w, h, state, iconid, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndTooltipBackground ] --- - - /** Unsafe version of: {@link #bndTooltipBackground TooltipBackground} */ - public static native void nbndTooltipBackground(long ctx, float x, float y, float w, float h); - - /** - * Draws a tooltip background with its lower left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - */ - public static void bndTooltipBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) { - if (CHECKS) { - check(ctx); - } - nbndTooltipBackground(ctx, x, y, w, h); - } - - // --- [ bndNodePort ] --- - - /** Unsafe version of: {@link #bndNodePort NodePort} */ - public static native void nbndNodePort(long ctx, float x, float y, int state, long color); - - /** - * Draws a node port at the given position filled with the given color. - * - * @param ctx the NanoVG context - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - */ - public static void bndNodePort(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("BNDwidgetState") int state, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nbndNodePort(ctx, x, y, state, color.address()); - } - - // --- [ bndNodeWire ] --- - - /** Unsafe version of: {@link #bndNodeWire NodeWire} */ - public static native void nbndNodeWire(long ctx, float x0, float y0, float x1, float y1, int state0, int state1); - - /** - * Draws a node wire originating at {@code (x0,y0)} and floating to {@code (x1,y1)}, with a colored gradient based on the states {@code state0} and - * {@code state1}: - * - *
      - *
    • {@link #BND_DEFAULT DEFAULT}: default wire color
    • - *
    • {@link #BND_HOVER HOVER}: selected wire color
    • - *
    • {@link #BND_ACTIVE ACTIVE}: dragged wire color
    • - *
    - * - * @param ctx the NanoVG context - * @param state0 origin wire color. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param state1 ending wire color. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - */ - public static void bndNodeWire(@NativeType("NVGcontext *") long ctx, float x0, float y0, float x1, float y1, @NativeType("BNDwidgetState") int state0, @NativeType("BNDwidgetState") int state1) { - if (CHECKS) { - check(ctx); - } - nbndNodeWire(ctx, x0, y0, x1, y1, state0, state1); - } - - // --- [ bndColoredNodeWire ] --- - - /** Unsafe version of: {@link #bndColoredNodeWire ColoredNodeWire} */ - public static native void nbndColoredNodeWire(long ctx, float x0, float y0, float x1, float y1, long color0, long color1); - - /** - * Draws a node wire originating at {@code (x0,y0)} and floating to {@code (x1,y1)}, with a colored gradient based on the two colors {@code color0} and - * {@code color1}. - * - * @param ctx the NanoVG context - */ - public static void bndColoredNodeWire(@NativeType("NVGcontext *") long ctx, float x0, float y0, float x1, float y1, @NativeType("NVGcolor") NVGColor color0, @NativeType("NVGcolor") NVGColor color1) { - if (CHECKS) { - check(ctx); - } - nbndColoredNodeWire(ctx, x0, y0, x1, y1, color0.address(), color1.address()); - } - - // --- [ bndNodeBackground ] --- - - /** Unsafe version of: {@link #bndNodeBackground NodeBackground} */ - public static native void nbndNodeBackground(long ctx, float x, float y, float w, float h, int state, int iconid, long label, long titleColor); - - /** - * Draws a node background with its upper left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - * @param titleColor provides the base color for the title bar - */ - public static void bndNodeBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") ByteBuffer label, @NativeType("NVGcolor") NVGColor titleColor) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndNodeBackground(ctx, x, y, w, h, state, iconid, memAddressSafe(label), titleColor.address()); - } - - /** - * Draws a node background with its upper left origin at {@code (x,y)} and size of {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param iconid if ≥ 0, an icon will be added to the widget - * @param label if not {@code NULL}, a label will be added to the widget - * @param titleColor provides the base color for the title bar - */ - public static void bndNodeBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("BNDwidgetState") int state, int iconid, @Nullable @NativeType("char const *") CharSequence label, @NativeType("NVGcolor") NVGColor titleColor) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndNodeBackground(ctx, x, y, w, h, state, iconid, labelEncoded, titleColor.address()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndSplitterWidgets ] --- - - /** Unsafe version of: {@link #bndSplitterWidgets SplitterWidgets} */ - public static native void nbndSplitterWidgets(long ctx, float x, float y, float w, float h); - - /** - * Draws a window with the upper right and lower left splitter widgets into the rectangle at origin {@code (x,y)} and size {@code (w, h)}. - * - * @param ctx the NanoVG context - */ - public static void bndSplitterWidgets(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) { - if (CHECKS) { - check(ctx); - } - nbndSplitterWidgets(ctx, x, y, w, h); - } - - // --- [ bndJoinAreaOverlay ] --- - - /** Unsafe version of: {@link #bndJoinAreaOverlay JoinAreaOverlay} */ - public static native void nbndJoinAreaOverlay(long ctx, float x, float y, float w, float h, int vertical, int mirror); - - /** - * Draws the join area overlay stencil into the rectangle at origin {@code (x,y)} and size {@code (w,h)}. - * - * @param ctx the NanoVG context - * @param vertical is 0 or 1 and designates the arrow orientation - * @param mirror is 0 or 1 and flips the arrow side - */ - public static void bndJoinAreaOverlay(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, @NativeType("int") boolean vertical, @NativeType("int") boolean mirror) { - if (CHECKS) { - check(ctx); - } - nbndJoinAreaOverlay(ctx, x, y, w, h, vertical ? 1 : 0, mirror ? 1 : 0); - } - - // --- [ bndLabelWidth ] --- - - /** Unsafe version of: {@link #bndLabelWidth LabelWidth} */ - public static native float nbndLabelWidth(long ctx, int iconid, long label); - - /** - * Returns the ideal width for a label with given icon and text - * - * @param ctx the NanoVG context - */ - public static float bndLabelWidth(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - return nbndLabelWidth(ctx, iconid, memAddressSafe(label)); - } - - /** - * Returns the ideal width for a label with given icon and text - * - * @param ctx the NanoVG context - */ - public static float bndLabelWidth(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - return nbndLabelWidth(ctx, iconid, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndLabelHeight ] --- - - /** Unsafe version of: {@link #bndLabelHeight LabelHeight} */ - public static native float nbndLabelHeight(long ctx, int iconid, long label, float width); - - /** - * Returns the height for a label with given icon, text and width; this function is primarily useful in conjunction with multiline labels and textboxes. - * - * @param ctx the NanoVG context - */ - public static float bndLabelHeight(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") ByteBuffer label, float width) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - return nbndLabelHeight(ctx, iconid, memAddressSafe(label), width); - } - - /** - * Returns the height for a label with given icon, text and width; this function is primarily useful in conjunction with multiline labels and textboxes. - * - * @param ctx the NanoVG context - */ - public static float bndLabelHeight(@NativeType("NVGcontext *") long ctx, int iconid, @Nullable @NativeType("char const *") CharSequence label, float width) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - return nbndLabelHeight(ctx, iconid, labelEncoded, width); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndTransparent ] --- - - /** Unsafe version of: {@link #bndTransparent Transparent} */ - public static native void nbndTransparent(long color, long __result); - - /** Makes color transparent using the default alpha value. */ - @NativeType("NVGcolor") - public static NVGColor bndTransparent(@NativeType("NVGcolor") NVGColor color, @NativeType("NVGcolor") NVGColor __result) { - nbndTransparent(color.address(), __result.address()); - return __result; - } - - // --- [ bndOffsetColor ] --- - - /** Unsafe version of: {@link #bndOffsetColor OffsetColor} */ - public static native void nbndOffsetColor(long color, int delta, long __result); - - /** - * Offsets a color by a given integer delta. - * - * @param delta in the range -100 to 100 - */ - @NativeType("NVGcolor") - public static NVGColor bndOffsetColor(@NativeType("NVGcolor") NVGColor color, int delta, @NativeType("NVGcolor") NVGColor __result) { - nbndOffsetColor(color.address(), delta, __result.address()); - return __result; - } - - // --- [ bndSelectCorners ] --- - - /** Unsafe version of: {@link #bndSelectCorners SelectCorners} */ - public static native void nbndSelectCorners(long radiuses, float r, int flags); - - /** - * Assigns radius {@code r} to the four entries of array {@code radiuses} depending on whether the corner is marked as sharp or not. - * - * @param flags the corner flags. One of:
    {@link #BND_CORNER_NONE CORNER_NONE}{@link #BND_CORNER_TOP_LEFT CORNER_TOP_LEFT}{@link #BND_CORNER_TOP_RIGHT CORNER_TOP_RIGHT}{@link #BND_CORNER_DOWN_RIGHT CORNER_DOWN_RIGHT}{@link #BND_CORNER_DOWN_LEFT CORNER_DOWN_LEFT}{@link #BND_CORNER_ALL CORNER_ALL}
    {@link #BND_CORNER_TOP CORNER_TOP}{@link #BND_CORNER_DOWN CORNER_DOWN}{@link #BND_CORNER_LEFT CORNER_LEFT}{@link #BND_CORNER_RIGHT CORNER_RIGHT}
    - */ - public static void bndSelectCorners(@NativeType("float *") FloatBuffer radiuses, float r, int flags) { - if (CHECKS) { - check(radiuses, 4); - } - nbndSelectCorners(memAddress(radiuses), r, flags); - } - - // --- [ bndInnerColors ] --- - - /** Unsafe version of: {@link #bndInnerColors InnerColors} */ - public static native void nbndInnerColors(long shade_top, long shade_down, long theme, int state, int flipActive); - - /** - * Computes the upper and lower gradient colors for the inner box from a widget theme and the widgets state. - * - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - * @param flipActive if set and the {@code state} is {@link #BND_ACTIVE ACTIVE}, the upper and lower colors will be swapped - */ - public static void bndInnerColors(@NativeType("NVGcolor *") NVGColor shade_top, @NativeType("NVGcolor *") NVGColor shade_down, @NativeType("BNDwidgetTheme const *") BNDwidgetTheme theme, @NativeType("BNDwidgetState") int state, @NativeType("int") boolean flipActive) { - nbndInnerColors(shade_top.address(), shade_down.address(), theme.address(), state, flipActive ? 1 : 0); - } - - // --- [ bndTextColor ] --- - - /** Unsafe version of: {@link #bndTextColor TextColor} */ - public static native void nbndTextColor(long theme, int state, long __result); - - /** - * Computes the text color for a widget label from a widget theme and the widgets state. - * - * @param state the current UI state. One of:
    {@link #BND_DEFAULT DEFAULT}{@link #BND_HOVER HOVER}{@link #BND_ACTIVE ACTIVE}
    - */ - @NativeType("NVGcolor") - public static NVGColor bndTextColor(@NativeType("BNDwidgetTheme const *") BNDwidgetTheme theme, @NativeType("BNDwidgetState") int state, @NativeType("NVGcolor") NVGColor __result) { - nbndTextColor(theme.address(), state, __result.address()); - return __result; - } - - // --- [ bndScrollHandleRect ] --- - - /** Unsafe version of: {@link #bndScrollHandleRect ScrollHandleRect} */ - public static native void nbndScrollHandleRect(long x, long y, long w, long h, float offset, float size); - - /** - * Computes the bounds of the scrollbar handle from the scrollbar size and the handle's offset and size. - * - * @param offset is in the range {@code 0..1} and defines the position of the scroll handle - * @param size is in the range {@code 0..1} and defines the size of the scroll handle - */ - public static void bndScrollHandleRect(@NativeType("float *") FloatBuffer x, @NativeType("float *") FloatBuffer y, @NativeType("float *") FloatBuffer w, @NativeType("float *") FloatBuffer h, float offset, float size) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(w, 1); - check(h, 1); - } - nbndScrollHandleRect(memAddress(x), memAddress(y), memAddress(w), memAddress(h), offset, size); - } - - // --- [ bndRoundedBox ] --- - - /** Unsafe version of: {@link #bndRoundedBox RoundedBox} */ - public static native void nbndRoundedBox(long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3); - - /** - * Adds a rounded box path at position {@code (x,y)} with size {@code (w,h)} and a separate radius for each corner listed in clockwise order, so that - * {@code cr0} = top left, {@code cr1} = top right, {@code cr2} = bottom right, {@code cr3} = bottom left; this is a low level drawing function: the path - * must be stroked or filled to become visible. - * - * @param ctx the NanoVG context - */ - public static void bndRoundedBox(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3) { - if (CHECKS) { - check(ctx); - } - nbndRoundedBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3); - } - - // --- [ bndBackground ] --- - - /** Unsafe version of: {@link #bndBackground Background} */ - public static native void nbndBackground(long ctx, float x, float y, float w, float h); - - /** - * Draws a flat panel without any decorations at position {@code (x,y)} with size {@code (w,h)} and fills it with {@code backgroundColor}. - * - * @param ctx the NanoVG context - */ - public static void bndBackground(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) { - if (CHECKS) { - check(ctx); - } - nbndBackground(ctx, x, y, w, h); - } - - // --- [ bndBevel ] --- - - /** Unsafe version of: {@link #bndBevel Bevel} */ - public static native void nbndBevel(long ctx, float x, float y, float w, float h); - - /** - * Draws a beveled border at position {@code (x,y)} with size {@code (w,h)} shaded with lighter and darker versions of {@code backgroundColor}. - * - * @param ctx the NanoVG context - */ - public static void bndBevel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) { - if (CHECKS) { - check(ctx); - } - nbndBevel(ctx, x, y, w, h); - } - - // --- [ bndBevelInset ] --- - - /** Unsafe version of: {@link #bndBevelInset BevelInset} */ - public static native void nbndBevelInset(long ctx, float x, float y, float w, float h, float cr2, float cr3); - - /** - * Draws a lower inset for a rounded box at position {@code (x,y)} with size {@code (w,h)} that gives the impression the surface has been pushed in. - * {@code cr2} and {@code cr3} contain the radiuses of the bottom right and bottom left corners of the rounded box. - * - * @param ctx the NanoVG context - */ - public static void bndBevelInset(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr2, float cr3) { - if (CHECKS) { - check(ctx); - } - nbndBevelInset(ctx, x, y, w, h, cr2, cr3); - } - - // --- [ bndIcon ] --- - - /** Unsafe version of: {@link #bndIcon Icon} */ - public static native void nbndIcon(long ctx, float x, float y, int iconid); - - /** - * Draws an icon with {@code (x,y)} as its upper left coordinate. - * - * @param ctx the NanoVG context - * @param iconid selects the icon from the sheet. One of:
    {@link #BND_ICON_NONE ICON_NONE}{@link #BND_ICON_QUESTION ICON_QUESTION}{@link #BND_ICON_ERROR ICON_ERROR}{@link #BND_ICON_CANCEL ICON_CANCEL}{@link #BND_ICON_TRIA_RIGHT ICON_TRIA_RIGHT}
    {@link #BND_ICON_TRIA_DOWN ICON_TRIA_DOWN}{@link #BND_ICON_TRIA_LEFT ICON_TRIA_LEFT}{@link #BND_ICON_TRIA_UP ICON_TRIA_UP}{@link #BND_ICON_ARROW_LEFTRIGHT ICON_ARROW_LEFTRIGHT}{@link #BND_ICON_PLUS ICON_PLUS}
    {@link #BND_ICON_DISCLOSURE_TRI_DOWN ICON_DISCLOSURE_TRI_DOWN}{@link #BND_ICON_DISCLOSURE_TRI_RIGHT ICON_DISCLOSURE_TRI_RIGHT}{@link #BND_ICON_RADIOBUT_OFF ICON_RADIOBUT_OFF}{@link #BND_ICON_RADIOBUT_ON ICON_RADIOBUT_ON}{@link #BND_ICON_MENU_PANEL ICON_MENU_PANEL}
    {@link #BND_ICON_BLENDER ICON_BLENDER}{@link #BND_ICON_GRIP ICON_GRIP}{@link #BND_ICON_DOT ICON_DOT}{@link #BND_ICON_COLLAPSEMENU ICON_COLLAPSEMENU}{@link #BND_ICON_X ICON_X}
    {@link #BND_ICON_GO_LEFT ICON_GO_LEFT}{@link #BND_ICON_PLUG ICON_PLUG}{@link #BND_ICON_UI ICON_UI}{@link #BND_ICON_NODE ICON_NODE}{@link #BND_ICON_NODE_SEL ICON_NODE_SEL}
    {@link #BND_ICON_FULLSCREEN ICON_FULLSCREEN}{@link #BND_ICON_SPLITSCREEN ICON_SPLITSCREEN}{@link #BND_ICON_RIGHTARROW_THIN ICON_RIGHTARROW_THIN}{@link #BND_ICON_BORDERMOVE ICON_BORDERMOVE}{@link #BND_ICON_VIEWZOOM ICON_VIEWZOOM}
    {@link #BND_ICON_ZOOMIN ICON_ZOOMIN}{@link #BND_ICON_ZOOMOUT ICON_ZOOMOUT}{@link #BND_ICON_PANEL_CLOSE ICON_PANEL_CLOSE}{@link #BND_ICON_COPY_ID ICON_COPY_ID}{@link #BND_ICON_EYEDROPPER ICON_EYEDROPPER}
    {@link #BND_ICON_LINK_AREA ICON_LINK_AREA}{@link #BND_ICON_AUTO ICON_AUTO}{@link #BND_ICON_CHECKBOX_DEHLT ICON_CHECKBOX_DEHLT}{@link #BND_ICON_CHECKBOX_HLT ICON_CHECKBOX_HLT}{@link #BND_ICON_UNLOCKED ICON_UNLOCKED}
    {@link #BND_ICON_LOCKED ICON_LOCKED}{@link #BND_ICON_UNPINNED ICON_UNPINNED}{@link #BND_ICON_PINNED ICON_PINNED}{@link #BND_ICON_SCREEN_BACK ICON_SCREEN_BACK}{@link #BND_ICON_RIGHTARROW ICON_RIGHTARROW}
    {@link #BND_ICON_DOWNARROW_HLT ICON_DOWNARROW_HLT}{@link #BND_ICON_DOTSUP ICON_DOTSUP}{@link #BND_ICON_DOTSDOWN ICON_DOTSDOWN}{@link #BND_ICON_LINK ICON_LINK}{@link #BND_ICON_INLINK ICON_INLINK}
    {@link #BND_ICON_PLUGIN ICON_PLUGIN}{@link #BND_ICON_HELP ICON_HELP}{@link #BND_ICON_GHOST_ENABLED ICON_GHOST_ENABLED}{@link #BND_ICON_COLOR ICON_COLOR}{@link #BND_ICON_LINKED ICON_LINKED}
    {@link #BND_ICON_UNLINKED ICON_UNLINKED}{@link #BND_ICON_HAND ICON_HAND}{@link #BND_ICON_ZOOM_ALL ICON_ZOOM_ALL}{@link #BND_ICON_ZOOM_SELECTED ICON_ZOOM_SELECTED}{@link #BND_ICON_ZOOM_PREVIOUS ICON_ZOOM_PREVIOUS}
    {@link #BND_ICON_ZOOM_IN ICON_ZOOM_IN}{@link #BND_ICON_ZOOM_OUT ICON_ZOOM_OUT}{@link #BND_ICON_RENDER_REGION ICON_RENDER_REGION}{@link #BND_ICON_BORDER_RECT ICON_BORDER_RECT}{@link #BND_ICON_BORDER_LASSO ICON_BORDER_LASSO}
    {@link #BND_ICON_FREEZE ICON_FREEZE}{@link #BND_ICON_STYLUS_PRESSURE ICON_STYLUS_PRESSURE}{@link #BND_ICON_GHOST_DISABLED ICON_GHOST_DISABLED}{@link #BND_ICON_NEW ICON_NEW}{@link #BND_ICON_FILE_TICK ICON_FILE_TICK}
    {@link #BND_ICON_QUIT ICON_QUIT}{@link #BND_ICON_URL ICON_URL}{@link #BND_ICON_RECOVER_LAST ICON_RECOVER_LAST}{@link #BND_ICON_FULLSCREEN_ENTER ICON_FULLSCREEN_ENTER}{@link #BND_ICON_FULLSCREEN_EXIT ICON_FULLSCREEN_EXIT}
    {@link #BND_ICON_BLANK1 ICON_BLANK1}{@link #BND_ICON_LAMP ICON_LAMP}{@link #BND_ICON_MATERIAL ICON_MATERIAL}{@link #BND_ICON_TEXTURE ICON_TEXTURE}{@link #BND_ICON_ANIM ICON_ANIM}
    {@link #BND_ICON_WORLD ICON_WORLD}{@link #BND_ICON_SCENE ICON_SCENE}{@link #BND_ICON_EDIT ICON_EDIT}{@link #BND_ICON_GAME ICON_GAME}{@link #BND_ICON_RADIO ICON_RADIO}
    {@link #BND_ICON_SCRIPT ICON_SCRIPT}{@link #BND_ICON_PARTICLES ICON_PARTICLES}{@link #BND_ICON_PHYSICS ICON_PHYSICS}{@link #BND_ICON_SPEAKER ICON_SPEAKER}{@link #BND_ICON_TEXTURE_SHADED ICON_TEXTURE_SHADED}
    {@link #BND_ICON_VIEW3D ICON_VIEW3D}{@link #BND_ICON_IPO ICON_IPO}{@link #BND_ICON_OOPS ICON_OOPS}{@link #BND_ICON_BUTS ICON_BUTS}{@link #BND_ICON_FILESEL ICON_FILESEL}
    {@link #BND_ICON_IMAGE_COL ICON_IMAGE_COL}{@link #BND_ICON_INFO ICON_INFO}{@link #BND_ICON_SEQUENCE ICON_SEQUENCE}{@link #BND_ICON_TEXT ICON_TEXT}{@link #BND_ICON_IMASEL ICON_IMASEL}
    {@link #BND_ICON_SOUND ICON_SOUND}{@link #BND_ICON_ACTION ICON_ACTION}{@link #BND_ICON_NLA ICON_NLA}{@link #BND_ICON_SCRIPTWIN ICON_SCRIPTWIN}{@link #BND_ICON_TIME ICON_TIME}
    {@link #BND_ICON_NODETREE ICON_NODETREE}{@link #BND_ICON_LOGIC ICON_LOGIC}{@link #BND_ICON_CONSOLE ICON_CONSOLE}{@link #BND_ICON_PREFERENCES ICON_PREFERENCES}{@link #BND_ICON_CLIP ICON_CLIP}
    {@link #BND_ICON_ASSET_MANAGER ICON_ASSET_MANAGER}{@link #BND_ICON_OBJECT_DATAMODE ICON_OBJECT_DATAMODE}{@link #BND_ICON_EDITMODE_HLT ICON_EDITMODE_HLT}{@link #BND_ICON_FACESEL_HLT ICON_FACESEL_HLT}{@link #BND_ICON_VPAINT_HLT ICON_VPAINT_HLT}
    {@link #BND_ICON_TPAINT_HLT ICON_TPAINT_HLT}{@link #BND_ICON_WPAINT_HLT ICON_WPAINT_HLT}{@link #BND_ICON_SCULPTMODE_HLT ICON_SCULPTMODE_HLT}{@link #BND_ICON_POSE_HLT ICON_POSE_HLT}{@link #BND_ICON_PARTICLEMODE ICON_PARTICLEMODE}
    {@link #BND_ICON_LIGHTPAINT ICON_LIGHTPAINT}{@link #BND_ICON_SCENE_DATA ICON_SCENE_DATA}{@link #BND_ICON_RENDERLAYERS ICON_RENDERLAYERS}{@link #BND_ICON_WORLD_DATA ICON_WORLD_DATA}{@link #BND_ICON_OBJECT_DATA ICON_OBJECT_DATA}
    {@link #BND_ICON_MESH_DATA ICON_MESH_DATA}{@link #BND_ICON_CURVE_DATA ICON_CURVE_DATA}{@link #BND_ICON_META_DATA ICON_META_DATA}{@link #BND_ICON_LATTICE_DATA ICON_LATTICE_DATA}{@link #BND_ICON_LAMP_DATA ICON_LAMP_DATA}
    {@link #BND_ICON_MATERIAL_DATA ICON_MATERIAL_DATA}{@link #BND_ICON_TEXTURE_DATA ICON_TEXTURE_DATA}{@link #BND_ICON_ANIM_DATA ICON_ANIM_DATA}{@link #BND_ICON_CAMERA_DATA ICON_CAMERA_DATA}{@link #BND_ICON_PARTICLE_DATA ICON_PARTICLE_DATA}
    {@link #BND_ICON_LIBRARY_DATA_DIRECT ICON_LIBRARY_DATA_DIRECT}{@link #BND_ICON_GROUP ICON_GROUP}{@link #BND_ICON_ARMATURE_DATA ICON_ARMATURE_DATA}{@link #BND_ICON_POSE_DATA ICON_POSE_DATA}{@link #BND_ICON_BONE_DATA ICON_BONE_DATA}
    {@link #BND_ICON_CONSTRAINT ICON_CONSTRAINT}{@link #BND_ICON_SHAPEKEY_DATA ICON_SHAPEKEY_DATA}{@link #BND_ICON_CONSTRAINT_BONE ICON_CONSTRAINT_BONE}{@link #BND_ICON_CAMERA_STEREO ICON_CAMERA_STEREO}{@link #BND_ICON_PACKAGE ICON_PACKAGE}
    {@link #BND_ICON_UGLYPACKAGE ICON_UGLYPACKAGE}{@link #BND_ICON_BRUSH_DATA ICON_BRUSH_DATA}{@link #BND_ICON_IMAGE_DATA ICON_IMAGE_DATA}{@link #BND_ICON_FILE ICON_FILE}{@link #BND_ICON_FCURVE ICON_FCURVE}
    {@link #BND_ICON_FONT_DATA ICON_FONT_DATA}{@link #BND_ICON_RENDER_RESULT ICON_RENDER_RESULT}{@link #BND_ICON_SURFACE_DATA ICON_SURFACE_DATA}{@link #BND_ICON_EMPTY_DATA ICON_EMPTY_DATA}{@link #BND_ICON_SETTINGS ICON_SETTINGS}
    {@link #BND_ICON_RENDER_ANIMATION ICON_RENDER_ANIMATION}{@link #BND_ICON_RENDER_STILL ICON_RENDER_STILL}{@link #BND_ICON_BOIDS ICON_BOIDS}{@link #BND_ICON_STRANDS ICON_STRANDS}{@link #BND_ICON_LIBRARY_DATA_INDIRECT ICON_LIBRARY_DATA_INDIRECT}
    {@link #BND_ICON_GREASEPENCIL ICON_GREASEPENCIL}{@link #BND_ICON_LINE_DATA ICON_LINE_DATA}{@link #BND_ICON_GROUP_BONE ICON_GROUP_BONE}{@link #BND_ICON_GROUP_VERTEX ICON_GROUP_VERTEX}{@link #BND_ICON_GROUP_VCOL ICON_GROUP_VCOL}
    {@link #BND_ICON_GROUP_UVS ICON_GROUP_UVS}{@link #BND_ICON_RNA ICON_RNA}{@link #BND_ICON_RNA_ADD ICON_RNA_ADD}{@link #BND_ICON_OUTLINER_OB_EMPTY ICON_OUTLINER_OB_EMPTY}{@link #BND_ICON_OUTLINER_OB_MESH ICON_OUTLINER_OB_MESH}
    {@link #BND_ICON_OUTLINER_OB_CURVE ICON_OUTLINER_OB_CURVE}{@link #BND_ICON_OUTLINER_OB_LATTICE ICON_OUTLINER_OB_LATTICE}{@link #BND_ICON_OUTLINER_OB_META ICON_OUTLINER_OB_META}{@link #BND_ICON_OUTLINER_OB_LAMP ICON_OUTLINER_OB_LAMP}{@link #BND_ICON_OUTLINER_OB_CAMERA ICON_OUTLINER_OB_CAMERA}
    {@link #BND_ICON_OUTLINER_OB_ARMATURE ICON_OUTLINER_OB_ARMATURE}{@link #BND_ICON_OUTLINER_OB_FONT ICON_OUTLINER_OB_FONT}{@link #BND_ICON_OUTLINER_OB_SURFACE ICON_OUTLINER_OB_SURFACE}{@link #BND_ICON_OUTLINER_OB_SPEAKER ICON_OUTLINER_OB_SPEAKER}{@link #BND_ICON_RESTRICT_VIEW_OFF ICON_RESTRICT_VIEW_OFF}
    {@link #BND_ICON_RESTRICT_VIEW_ON ICON_RESTRICT_VIEW_ON}{@link #BND_ICON_RESTRICT_SELECT_OFF ICON_RESTRICT_SELECT_OFF}{@link #BND_ICON_RESTRICT_SELECT_ON ICON_RESTRICT_SELECT_ON}{@link #BND_ICON_RESTRICT_RENDER_OFF ICON_RESTRICT_RENDER_OFF}{@link #BND_ICON_RESTRICT_RENDER_ON ICON_RESTRICT_RENDER_ON}
    {@link #BND_ICON_OUTLINER_DATA_EMPTY ICON_OUTLINER_DATA_EMPTY}{@link #BND_ICON_OUTLINER_DATA_MESH ICON_OUTLINER_DATA_MESH}{@link #BND_ICON_OUTLINER_DATA_CURVE ICON_OUTLINER_DATA_CURVE}{@link #BND_ICON_OUTLINER_DATA_LATTICE ICON_OUTLINER_DATA_LATTICE}{@link #BND_ICON_OUTLINER_DATA_META ICON_OUTLINER_DATA_META}
    {@link #BND_ICON_OUTLINER_DATA_LAMP ICON_OUTLINER_DATA_LAMP}{@link #BND_ICON_OUTLINER_DATA_CAMERA ICON_OUTLINER_DATA_CAMERA}{@link #BND_ICON_OUTLINER_DATA_ARMATURE ICON_OUTLINER_DATA_ARMATURE}{@link #BND_ICON_OUTLINER_DATA_FONT ICON_OUTLINER_DATA_FONT}{@link #BND_ICON_OUTLINER_DATA_SURFACE ICON_OUTLINER_DATA_SURFACE}
    {@link #BND_ICON_OUTLINER_DATA_SPEAKER ICON_OUTLINER_DATA_SPEAKER}{@link #BND_ICON_OUTLINER_DATA_POSE ICON_OUTLINER_DATA_POSE}{@link #BND_ICON_MESH_PLANE ICON_MESH_PLANE}{@link #BND_ICON_MESH_CUBE ICON_MESH_CUBE}{@link #BND_ICON_MESH_CIRCLE ICON_MESH_CIRCLE}
    {@link #BND_ICON_MESH_UVSPHERE ICON_MESH_UVSPHERE}{@link #BND_ICON_MESH_ICOSPHERE ICON_MESH_ICOSPHERE}{@link #BND_ICON_MESH_GRID ICON_MESH_GRID}{@link #BND_ICON_MESH_MONKEY ICON_MESH_MONKEY}{@link #BND_ICON_MESH_CYLINDER ICON_MESH_CYLINDER}
    {@link #BND_ICON_MESH_TORUS ICON_MESH_TORUS}{@link #BND_ICON_MESH_CONE ICON_MESH_CONE}{@link #BND_ICON_LAMP_POINT ICON_LAMP_POINT}{@link #BND_ICON_LAMP_SUN ICON_LAMP_SUN}{@link #BND_ICON_LAMP_SPOT ICON_LAMP_SPOT}
    {@link #BND_ICON_LAMP_HEMI ICON_LAMP_HEMI}{@link #BND_ICON_LAMP_AREA ICON_LAMP_AREA}{@link #BND_ICON_META_EMPTY ICON_META_EMPTY}{@link #BND_ICON_META_PLANE ICON_META_PLANE}{@link #BND_ICON_META_CUBE ICON_META_CUBE}
    {@link #BND_ICON_META_BALL ICON_META_BALL}{@link #BND_ICON_META_ELLIPSOID ICON_META_ELLIPSOID}{@link #BND_ICON_META_CAPSULE ICON_META_CAPSULE}{@link #BND_ICON_SURFACE_NCURVE ICON_SURFACE_NCURVE}{@link #BND_ICON_SURFACE_NCIRCLE ICON_SURFACE_NCIRCLE}
    {@link #BND_ICON_SURFACE_NSURFACE ICON_SURFACE_NSURFACE}{@link #BND_ICON_SURFACE_NCYLINDER ICON_SURFACE_NCYLINDER}{@link #BND_ICON_SURFACE_NSPHERE ICON_SURFACE_NSPHERE}{@link #BND_ICON_SURFACE_NTORUS ICON_SURFACE_NTORUS}{@link #BND_ICON_CURVE_BEZCURVE ICON_CURVE_BEZCURVE}
    {@link #BND_ICON_CURVE_BEZCIRCLE ICON_CURVE_BEZCIRCLE}{@link #BND_ICON_CURVE_NCURVE ICON_CURVE_NCURVE}{@link #BND_ICON_CURVE_NCIRCLE ICON_CURVE_NCIRCLE}{@link #BND_ICON_CURVE_PATH ICON_CURVE_PATH}{@link #BND_ICON_COLOR_RED ICON_COLOR_RED}
    {@link #BND_ICON_COLOR_GREEN ICON_COLOR_GREEN}{@link #BND_ICON_COLOR_BLUE ICON_COLOR_BLUE}{@link #BND_ICON_FORCE_FORCE ICON_FORCE_FORCE}{@link #BND_ICON_FORCE_WIND ICON_FORCE_WIND}{@link #BND_ICON_FORCE_VORTEX ICON_FORCE_VORTEX}
    {@link #BND_ICON_FORCE_MAGNETIC ICON_FORCE_MAGNETIC}{@link #BND_ICON_FORCE_HARMONIC ICON_FORCE_HARMONIC}{@link #BND_ICON_FORCE_CHARGE ICON_FORCE_CHARGE}{@link #BND_ICON_FORCE_LENNARDJONES ICON_FORCE_LENNARDJONES}{@link #BND_ICON_FORCE_TEXTURE ICON_FORCE_TEXTURE}
    {@link #BND_ICON_FORCE_CURVE ICON_FORCE_CURVE}{@link #BND_ICON_FORCE_BOID ICON_FORCE_BOID}{@link #BND_ICON_FORCE_TURBULENCE ICON_FORCE_TURBULENCE}{@link #BND_ICON_FORCE_DRAG ICON_FORCE_DRAG}{@link #BND_ICON_FORCE_SMOKEFLOW ICON_FORCE_SMOKEFLOW}
    {@link #BND_ICON_MODIFIER ICON_MODIFIER}{@link #BND_ICON_MOD_WAVE ICON_MOD_WAVE}{@link #BND_ICON_MOD_BUILD ICON_MOD_BUILD}{@link #BND_ICON_MOD_DECIM ICON_MOD_DECIM}{@link #BND_ICON_MOD_MIRROR ICON_MOD_MIRROR}
    {@link #BND_ICON_MOD_SOFT ICON_MOD_SOFT}{@link #BND_ICON_MOD_SUBSURF ICON_MOD_SUBSURF}{@link #BND_ICON_HOOK ICON_HOOK}{@link #BND_ICON_MOD_PHYSICS ICON_MOD_PHYSICS}{@link #BND_ICON_MOD_PARTICLES ICON_MOD_PARTICLES}
    {@link #BND_ICON_MOD_BOOLEAN ICON_MOD_BOOLEAN}{@link #BND_ICON_MOD_EDGESPLIT ICON_MOD_EDGESPLIT}{@link #BND_ICON_MOD_ARRAY ICON_MOD_ARRAY}{@link #BND_ICON_MOD_UVPROJECT ICON_MOD_UVPROJECT}{@link #BND_ICON_MOD_DISPLACE ICON_MOD_DISPLACE}
    {@link #BND_ICON_MOD_CURVE ICON_MOD_CURVE}{@link #BND_ICON_MOD_LATTICE ICON_MOD_LATTICE}{@link #BND_ICON_CONSTRAINT_DATA ICON_CONSTRAINT_DATA}{@link #BND_ICON_MOD_ARMATURE ICON_MOD_ARMATURE}{@link #BND_ICON_MOD_SHRINKWRAP ICON_MOD_SHRINKWRAP}
    {@link #BND_ICON_MOD_CAST ICON_MOD_CAST}{@link #BND_ICON_MOD_MESHDEFORM ICON_MOD_MESHDEFORM}{@link #BND_ICON_MOD_BEVEL ICON_MOD_BEVEL}{@link #BND_ICON_MOD_SMOOTH ICON_MOD_SMOOTH}{@link #BND_ICON_MOD_SIMPLEDEFORM ICON_MOD_SIMPLEDEFORM}
    {@link #BND_ICON_MOD_MASK ICON_MOD_MASK}{@link #BND_ICON_MOD_CLOTH ICON_MOD_CLOTH}{@link #BND_ICON_MOD_EXPLODE ICON_MOD_EXPLODE}{@link #BND_ICON_MOD_FLUIDSIM ICON_MOD_FLUIDSIM}{@link #BND_ICON_MOD_MULTIRES ICON_MOD_MULTIRES}
    {@link #BND_ICON_MOD_SMOKE ICON_MOD_SMOKE}{@link #BND_ICON_MOD_SOLIDIFY ICON_MOD_SOLIDIFY}{@link #BND_ICON_MOD_SCREW ICON_MOD_SCREW}{@link #BND_ICON_MOD_VERTEX_WEIGHT ICON_MOD_VERTEX_WEIGHT}{@link #BND_ICON_MOD_DYNAMICPAINT ICON_MOD_DYNAMICPAINT}
    {@link #BND_ICON_MOD_REMESH ICON_MOD_REMESH}{@link #BND_ICON_MOD_OCEAN ICON_MOD_OCEAN}{@link #BND_ICON_MOD_WARP ICON_MOD_WARP}{@link #BND_ICON_MOD_SKIN ICON_MOD_SKIN}{@link #BND_ICON_MOD_TRIANGULATE ICON_MOD_TRIANGULATE}
    {@link #BND_ICON_MOD_WIREFRAME ICON_MOD_WIREFRAME}{@link #BND_ICON_REC ICON_REC}{@link #BND_ICON_PLAY ICON_PLAY}{@link #BND_ICON_FF ICON_FF}{@link #BND_ICON_REW ICON_REW}
    {@link #BND_ICON_PAUSE ICON_PAUSE}{@link #BND_ICON_PREV_KEYFRAME ICON_PREV_KEYFRAME}{@link #BND_ICON_NEXT_KEYFRAME ICON_NEXT_KEYFRAME}{@link #BND_ICON_PLAY_AUDIO ICON_PLAY_AUDIO}{@link #BND_ICON_PLAY_REVERSE ICON_PLAY_REVERSE}
    {@link #BND_ICON_PREVIEW_RANGE ICON_PREVIEW_RANGE}{@link #BND_ICON_ACTION_TWEAK ICON_ACTION_TWEAK}{@link #BND_ICON_PMARKER_ACT ICON_PMARKER_ACT}{@link #BND_ICON_PMARKER_SEL ICON_PMARKER_SEL}{@link #BND_ICON_PMARKER ICON_PMARKER}
    {@link #BND_ICON_MARKER_HLT ICON_MARKER_HLT}{@link #BND_ICON_MARKER ICON_MARKER}{@link #BND_ICON_SPACE2 ICON_SPACE2}{@link #BND_ICON_SPACE3 ICON_SPACE3}{@link #BND_ICON_KEYINGSET ICON_KEYINGSET}
    {@link #BND_ICON_KEY_DEHLT ICON_KEY_DEHLT}{@link #BND_ICON_KEY_HLT ICON_KEY_HLT}{@link #BND_ICON_MUTE_IPO_OFF ICON_MUTE_IPO_OFF}{@link #BND_ICON_MUTE_IPO_ON ICON_MUTE_IPO_ON}{@link #BND_ICON_VISIBLE_IPO_OFF ICON_VISIBLE_IPO_OFF}
    {@link #BND_ICON_VISIBLE_IPO_ON ICON_VISIBLE_IPO_ON}{@link #BND_ICON_DRIVER ICON_DRIVER}{@link #BND_ICON_SOLO_OFF ICON_SOLO_OFF}{@link #BND_ICON_SOLO_ON ICON_SOLO_ON}{@link #BND_ICON_FRAME_PREV ICON_FRAME_PREV}
    {@link #BND_ICON_FRAME_NEXT ICON_FRAME_NEXT}{@link #BND_ICON_NLA_PUSHDOWN ICON_NLA_PUSHDOWN}{@link #BND_ICON_IPO_CONSTANT ICON_IPO_CONSTANT}{@link #BND_ICON_IPO_LINEAR ICON_IPO_LINEAR}{@link #BND_ICON_IPO_BEZIER ICON_IPO_BEZIER}
    {@link #BND_ICON_IPO_SINE ICON_IPO_SINE}{@link #BND_ICON_IPO_QUAD ICON_IPO_QUAD}{@link #BND_ICON_IPO_CUBIC ICON_IPO_CUBIC}{@link #BND_ICON_IPO_QUART ICON_IPO_QUART}{@link #BND_ICON_IPO_QUINT ICON_IPO_QUINT}
    {@link #BND_ICON_IPO_EXPO ICON_IPO_EXPO}{@link #BND_ICON_IPO_CIRC ICON_IPO_CIRC}{@link #BND_ICON_IPO_BOUNCE ICON_IPO_BOUNCE}{@link #BND_ICON_IPO_ELASTIC ICON_IPO_ELASTIC}{@link #BND_ICON_IPO_BACK ICON_IPO_BACK}
    {@link #BND_ICON_IPO_EASE_IN ICON_IPO_EASE_IN}{@link #BND_ICON_IPO_EASE_OUT ICON_IPO_EASE_OUT}{@link #BND_ICON_IPO_EASE_IN_OUT ICON_IPO_EASE_IN_OUT}{@link #BND_ICON_VERTEXSEL ICON_VERTEXSEL}{@link #BND_ICON_EDGESEL ICON_EDGESEL}
    {@link #BND_ICON_FACESEL ICON_FACESEL}{@link #BND_ICON_LOOPSEL ICON_LOOPSEL}{@link #BND_ICON_ROTATE ICON_ROTATE}{@link #BND_ICON_CURSOR ICON_CURSOR}{@link #BND_ICON_ROTATECOLLECTION ICON_ROTATECOLLECTION}
    {@link #BND_ICON_ROTATECENTER ICON_ROTATECENTER}{@link #BND_ICON_ROTACTIVE ICON_ROTACTIVE}{@link #BND_ICON_ALIGN ICON_ALIGN}{@link #BND_ICON_SMOOTHCURVE ICON_SMOOTHCURVE}{@link #BND_ICON_SPHERECURVE ICON_SPHERECURVE}
    {@link #BND_ICON_ROOTCURVE ICON_ROOTCURVE}{@link #BND_ICON_SHARPCURVE ICON_SHARPCURVE}{@link #BND_ICON_LINCURVE ICON_LINCURVE}{@link #BND_ICON_NOCURVE ICON_NOCURVE}{@link #BND_ICON_RNDCURVE ICON_RNDCURVE}
    {@link #BND_ICON_PROP_OFF ICON_PROP_OFF}{@link #BND_ICON_PROP_ON ICON_PROP_ON}{@link #BND_ICON_PROP_CON ICON_PROP_CON}{@link #BND_ICON_SCULPT_DYNTOPO ICON_SCULPT_DYNTOPO}{@link #BND_ICON_PARTICLE_POINT ICON_PARTICLE_POINT}
    {@link #BND_ICON_PARTICLE_TIP ICON_PARTICLE_TIP}{@link #BND_ICON_PARTICLE_PATH ICON_PARTICLE_PATH}{@link #BND_ICON_MAN_TRANS ICON_MAN_TRANS}{@link #BND_ICON_MAN_ROT ICON_MAN_ROT}{@link #BND_ICON_MAN_SCALE ICON_MAN_SCALE}
    {@link #BND_ICON_MANIPUL ICON_MANIPUL}{@link #BND_ICON_SNAP_OFF ICON_SNAP_OFF}{@link #BND_ICON_SNAP_ON ICON_SNAP_ON}{@link #BND_ICON_SNAP_NORMAL ICON_SNAP_NORMAL}{@link #BND_ICON_SNAP_INCREMENT ICON_SNAP_INCREMENT}
    {@link #BND_ICON_SNAP_VERTEX ICON_SNAP_VERTEX}{@link #BND_ICON_SNAP_EDGE ICON_SNAP_EDGE}{@link #BND_ICON_SNAP_FACE ICON_SNAP_FACE}{@link #BND_ICON_SNAP_VOLUME ICON_SNAP_VOLUME}{@link #BND_ICON_STICKY_UVS_LOC ICON_STICKY_UVS_LOC}
    {@link #BND_ICON_STICKY_UVS_DISABLE ICON_STICKY_UVS_DISABLE}{@link #BND_ICON_STICKY_UVS_VERT ICON_STICKY_UVS_VERT}{@link #BND_ICON_CLIPUV_DEHLT ICON_CLIPUV_DEHLT}{@link #BND_ICON_CLIPUV_HLT ICON_CLIPUV_HLT}{@link #BND_ICON_SNAP_PEEL_OBJECT ICON_SNAP_PEEL_OBJECT}
    {@link #BND_ICON_GRID ICON_GRID}{@link #BND_ICON_PASTEDOWN ICON_PASTEDOWN}{@link #BND_ICON_COPYDOWN ICON_COPYDOWN}{@link #BND_ICON_PASTEFLIPUP ICON_PASTEFLIPUP}{@link #BND_ICON_PASTEFLIPDOWN ICON_PASTEFLIPDOWN}
    {@link #BND_ICON_SNAP_SURFACE ICON_SNAP_SURFACE}{@link #BND_ICON_AUTOMERGE_ON ICON_AUTOMERGE_ON}{@link #BND_ICON_AUTOMERGE_OFF ICON_AUTOMERGE_OFF}{@link #BND_ICON_RETOPO ICON_RETOPO}{@link #BND_ICON_UV_VERTEXSEL ICON_UV_VERTEXSEL}
    {@link #BND_ICON_UV_EDGESEL ICON_UV_EDGESEL}{@link #BND_ICON_UV_FACESEL ICON_UV_FACESEL}{@link #BND_ICON_UV_ISLANDSEL ICON_UV_ISLANDSEL}{@link #BND_ICON_UV_SYNC_SELECT ICON_UV_SYNC_SELECT}{@link #BND_ICON_BBOX ICON_BBOX}
    {@link #BND_ICON_WIRE ICON_WIRE}{@link #BND_ICON_SOLID ICON_SOLID}{@link #BND_ICON_SMOOTH ICON_SMOOTH}{@link #BND_ICON_POTATO ICON_POTATO}{@link #BND_ICON_ORTHO ICON_ORTHO}
    {@link #BND_ICON_LOCKVIEW_OFF ICON_LOCKVIEW_OFF}{@link #BND_ICON_LOCKVIEW_ON ICON_LOCKVIEW_ON}{@link #BND_ICON_AXIS_SIDE ICON_AXIS_SIDE}{@link #BND_ICON_AXIS_FRONT ICON_AXIS_FRONT}{@link #BND_ICON_AXIS_TOP ICON_AXIS_TOP}
    {@link #BND_ICON_NDOF_DOM ICON_NDOF_DOM}{@link #BND_ICON_NDOF_TURN ICON_NDOF_TURN}{@link #BND_ICON_NDOF_FLY ICON_NDOF_FLY}{@link #BND_ICON_NDOF_TRANS ICON_NDOF_TRANS}{@link #BND_ICON_LAYER_USED ICON_LAYER_USED}
    {@link #BND_ICON_LAYER_ACTIVE ICON_LAYER_ACTIVE}{@link #BND_ICON_SORTALPHA ICON_SORTALPHA}{@link #BND_ICON_SORTBYEXT ICON_SORTBYEXT}{@link #BND_ICON_SORTTIME ICON_SORTTIME}{@link #BND_ICON_SORTSIZE ICON_SORTSIZE}
    {@link #BND_ICON_LONGDISPLAY ICON_LONGDISPLAY}{@link #BND_ICON_SHORTDISPLAY ICON_SHORTDISPLAY}{@link #BND_ICON_GHOST ICON_GHOST}{@link #BND_ICON_IMGDISPLAY ICON_IMGDISPLAY}{@link #BND_ICON_SAVE_AS ICON_SAVE_AS}
    {@link #BND_ICON_SAVE_COPY ICON_SAVE_COPY}{@link #BND_ICON_BOOKMARKS ICON_BOOKMARKS}{@link #BND_ICON_FONTPREVIEW ICON_FONTPREVIEW}{@link #BND_ICON_FILTER ICON_FILTER}{@link #BND_ICON_NEWFOLDER ICON_NEWFOLDER}
    {@link #BND_ICON_OPEN_RECENT ICON_OPEN_RECENT}{@link #BND_ICON_FILE_PARENT ICON_FILE_PARENT}{@link #BND_ICON_FILE_REFRESH ICON_FILE_REFRESH}{@link #BND_ICON_FILE_FOLDER ICON_FILE_FOLDER}{@link #BND_ICON_FILE_BLANK ICON_FILE_BLANK}
    {@link #BND_ICON_FILE_BLEND ICON_FILE_BLEND}{@link #BND_ICON_FILE_IMAGE ICON_FILE_IMAGE}{@link #BND_ICON_FILE_MOVIE ICON_FILE_MOVIE}{@link #BND_ICON_FILE_SCRIPT ICON_FILE_SCRIPT}{@link #BND_ICON_FILE_SOUND ICON_FILE_SOUND}
    {@link #BND_ICON_FILE_FONT ICON_FILE_FONT}{@link #BND_ICON_FILE_TEXT ICON_FILE_TEXT}{@link #BND_ICON_RECOVER_AUTO ICON_RECOVER_AUTO}{@link #BND_ICON_SAVE_PREFS ICON_SAVE_PREFS}{@link #BND_ICON_LINK_BLEND ICON_LINK_BLEND}
    {@link #BND_ICON_APPEND_BLEND ICON_APPEND_BLEND}{@link #BND_ICON_IMPORT ICON_IMPORT}{@link #BND_ICON_EXPORT ICON_EXPORT}{@link #BND_ICON_EXTERNAL_DATA ICON_EXTERNAL_DATA}{@link #BND_ICON_LOAD_FACTORY ICON_LOAD_FACTORY}
    {@link #BND_ICON_LOOP_BACK ICON_LOOP_BACK}{@link #BND_ICON_LOOP_FORWARDS ICON_LOOP_FORWARDS}{@link #BND_ICON_BACK ICON_BACK}{@link #BND_ICON_FORWARD ICON_FORWARD}{@link #BND_ICON_FILE_BACKUP ICON_FILE_BACKUP}
    {@link #BND_ICON_DISK_DRIVE ICON_DISK_DRIVE}{@link #BND_ICON_MATPLANE ICON_MATPLANE}{@link #BND_ICON_MATSPHERE ICON_MATSPHERE}{@link #BND_ICON_MATCUBE ICON_MATCUBE}{@link #BND_ICON_MONKEY ICON_MONKEY}
    {@link #BND_ICON_HAIR ICON_HAIR}{@link #BND_ICON_ALIASED ICON_ALIASED}{@link #BND_ICON_ANTIALIASED ICON_ANTIALIASED}{@link #BND_ICON_MAT_SPHERE_SKY ICON_MAT_SPHERE_SKY}{@link #BND_ICON_WORDWRAP_OFF ICON_WORDWRAP_OFF}
    {@link #BND_ICON_WORDWRAP_ON ICON_WORDWRAP_ON}{@link #BND_ICON_SYNTAX_OFF ICON_SYNTAX_OFF}{@link #BND_ICON_SYNTAX_ON ICON_SYNTAX_ON}{@link #BND_ICON_LINENUMBERS_OFF ICON_LINENUMBERS_OFF}{@link #BND_ICON_LINENUMBERS_ON ICON_LINENUMBERS_ON}
    {@link #BND_ICON_SCRIPTPLUGINS ICON_SCRIPTPLUGINS}{@link #BND_ICON_SEQ_SEQUENCER ICON_SEQ_SEQUENCER}{@link #BND_ICON_SEQ_PREVIEW ICON_SEQ_PREVIEW}{@link #BND_ICON_SEQ_LUMA_WAVEFORM ICON_SEQ_LUMA_WAVEFORM}{@link #BND_ICON_SEQ_CHROMA_SCOPE ICON_SEQ_CHROMA_SCOPE}
    {@link #BND_ICON_SEQ_HISTOGRAM ICON_SEQ_HISTOGRAM}{@link #BND_ICON_SEQ_SPLITVIEW ICON_SEQ_SPLITVIEW}{@link #BND_ICON_IMAGE_RGB ICON_IMAGE_RGB}{@link #BND_ICON_IMAGE_RGB_ALPHA ICON_IMAGE_RGB_ALPHA}{@link #BND_ICON_IMAGE_ALPHA ICON_IMAGE_ALPHA}
    {@link #BND_ICON_IMAGE_ZDEPTH ICON_IMAGE_ZDEPTH}{@link #BND_ICON_IMAGEFILE ICON_IMAGEFILE}
    - */ - public static void bndIcon(@NativeType("NVGcontext *") long ctx, float x, float y, int iconid) { - if (CHECKS) { - check(ctx); - } - nbndIcon(ctx, x, y, iconid); - } - - // --- [ bndDropShadow ] --- - - /** Unsafe version of: {@link #bndDropShadow DropShadow} */ - public static native void nbndDropShadow(long ctx, float x, float y, float w, float h, float r, float feather, float alpha); - - /** - * Draws a drop shadow around the rounded box at {@code (x,y)} with size {@code (w,h)} and radius {@code r}, with {@code feather} as its maximum range in - * pixels. No shadow will be painted inside the rounded box. - * - * @param ctx the NanoVG context - */ - public static void bndDropShadow(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float r, float feather, float alpha) { - if (CHECKS) { - check(ctx); - } - nbndDropShadow(ctx, x, y, w, h, r, feather, alpha); - } - - // --- [ bndInnerBox ] --- - - /** Unsafe version of: {@link #bndInnerBox InnerBox} */ - public static native void nbndInnerBox(long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, long shade_top, long shade_down); - - /** - * Draws the inner part of a widget box, with a gradient from {@code shade_top} to {@code shade_down}. If {@code h>w}, the gradient will be horizontal - * instead of vertical. - * - * @param ctx the NanoVG context - */ - public static void bndInnerBox(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, @NativeType("NVGcolor") NVGColor shade_top, @NativeType("NVGcolor") NVGColor shade_down) { - if (CHECKS) { - check(ctx); - } - nbndInnerBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3, shade_top.address(), shade_down.address()); - } - - // --- [ bndOutlineBox ] --- - - /** Unsafe version of: {@link #bndOutlineBox OutlineBox} */ - public static native void nbndOutlineBox(long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, long color); - - /** - * Draws the outline part of a widget box with the given color. - * - * @param ctx the NanoVG context - */ - public static void bndOutlineBox(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float cr0, float cr1, float cr2, float cr3, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nbndOutlineBox(ctx, x, y, w, h, cr0, cr1, cr2, cr3, color.address()); - } - - // --- [ bndIconLabelValue ] --- - - /** Unsafe version of: {@link #bndIconLabelValue IconLabelValue} */ - public static native void nbndIconLabelValue(long ctx, float x, float y, float w, float h, int iconid, long color, int align, float fontsize, long label, long value); - - /** - * Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a - * widget box. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted - * @param align one of:
    {@link #BND_LEFT LEFT}{@link #BND_CENTER CENTER}
    - * @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color} - * @param value if not {@code NULL}, {@code label} and {@code value} will be drawn with a ":" separator inbetween - */ - public static void bndIconLabelValue(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, int align, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label, @Nullable @NativeType("char const *") ByteBuffer value) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - checkNT1Safe(value); - } - nbndIconLabelValue(ctx, x, y, w, h, iconid, color.address(), align, fontsize, memAddressSafe(label), memAddressSafe(value)); - } - - /** - * Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a - * widget box. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted - * @param align one of:
    {@link #BND_LEFT LEFT}{@link #BND_CENTER CENTER}
    - * @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color} - * @param value if not {@code NULL}, {@code label} and {@code value} will be drawn with a ":" separator inbetween - */ - public static void bndIconLabelValue(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, int align, float fontsize, @Nullable @NativeType("char const *") CharSequence label, @Nullable @NativeType("char const *") CharSequence value) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(value, true); - long valueEncoded = value == null ? NULL : stack.getPointerAddress(); - nbndIconLabelValue(ctx, x, y, w, h, iconid, color.address(), align, fontsize, labelEncoded, valueEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndNodeIconLabel ] --- - - /** Unsafe version of: {@link #bndNodeIconLabel NodeIconLabel} */ - public static native void nbndNodeIconLabel(long ctx, float x, float y, float w, float h, int iconid, long color, long shadowColor, int align, float fontsize, long label); - - /** - * Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a node - * title bar. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be drawn - * @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color} - */ - public static void bndNodeIconLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, @NativeType("NVGcolor") NVGColor shadowColor, int align, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndNodeIconLabel(ctx, x, y, w, h, iconid, color.address(), shadowColor.address(), align, fontsize, memAddressSafe(label)); - } - - /** - * Draws an optional icon specified by {@code iconid} and an optional label with given {@code alignment}, {@code fontsize} and {@code color} within a node - * title bar. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be drawn - * @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color} - */ - public static void bndNodeIconLabel(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, @NativeType("NVGcolor") NVGColor shadowColor, int align, float fontsize, @Nullable @NativeType("char const *") CharSequence label) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndNodeIconLabel(ctx, x, y, w, h, iconid, color.address(), shadowColor.address(), align, fontsize, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndIconLabelTextPosition ] --- - - /** Unsafe version of: {@link #bndIconLabelTextPosition IconLabelTextPosition} */ - public static native int nbndIconLabelTextPosition(long ctx, float x, float y, float w, float h, int iconid, float fontsize, long label, int px, int py); - - /** - * Calculates the corresponding text position for given coordinates {@code px/py} in an {@code iconLabel}. See {@link #bndIconLabelCaret IconLabelCaret} for more info. - * - * @param ctx the NanoVG context - */ - public static int bndIconLabelTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label, int px, int py) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - return nbndIconLabelTextPosition(ctx, x, y, w, h, iconid, fontsize, memAddressSafe(label), px, py); - } - - /** - * Calculates the corresponding text position for given coordinates {@code px/py} in an {@code iconLabel}. See {@link #bndIconLabelCaret IconLabelCaret} for more info. - * - * @param ctx the NanoVG context - */ - public static int bndIconLabelTextPosition(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, float fontsize, @Nullable @NativeType("char const *") CharSequence label, int px, int py) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - return nbndIconLabelTextPosition(ctx, x, y, w, h, iconid, fontsize, labelEncoded, px, py); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndIconLabelCaret ] --- - - /** Unsafe version of: {@link #bndIconLabelCaret IconLabelCaret} */ - public static native void nbndIconLabelCaret(long ctx, float x, float y, float w, float h, int iconid, long color, float fontsize, long label, long caretcolor, int cbegin, int cend); - - /** - * Draws an optional icon specified by {@code iconid}, an optional label and a caret with given {@code fontsize} and {@code color} within a widget box. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted - * @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color} - * @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret - * @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will - * be drawn. - */ - public static void bndIconLabelCaret(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, float fontsize, @Nullable @NativeType("char const *") ByteBuffer label, @NativeType("NVGcolor") NVGColor caretcolor, int cbegin, int cend) { - if (CHECKS) { - check(ctx); - checkNT1Safe(label); - } - nbndIconLabelCaret(ctx, x, y, w, h, iconid, color.address(), fontsize, memAddressSafe(label), caretcolor.address(), cbegin, cend); - } - - /** - * Draws an optional icon specified by {@code iconid}, an optional label and a caret with given {@code fontsize} and {@code color} within a widget box. - * - * @param ctx the NanoVG context - * @param iconid if ≥ 0, an icon will be drawn and the labels remaining space will be adjusted - * @param label if not {@code NULL}, it will be drawn with the specified {@code alignment}, {@code fontsize} and {@code color} - * @param cbegin must be ≥ 0 and ≤ {@code strlen(text)} and denotes the beginning of the caret - * @param cend must be ≥ {@code cbegin} and ≤ {@code strlen(text)} and denotes the end of the caret. If {@code cend} < {@code cbegin}, then no caret will - * be drawn. - */ - public static void bndIconLabelCaret(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, int iconid, @NativeType("NVGcolor") NVGColor color, float fontsize, @Nullable @NativeType("char const *") CharSequence label, @NativeType("NVGcolor") NVGColor caretcolor, int cbegin, int cend) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(label, true); - long labelEncoded = label == null ? NULL : stack.getPointerAddress(); - nbndIconLabelCaret(ctx, x, y, w, h, iconid, color.address(), fontsize, labelEncoded, caretcolor.address(), cbegin, cend); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ bndCheck ] --- - - /** Unsafe version of: {@link #bndCheck Check} */ - public static native void nbndCheck(long ctx, float ox, float oy, long color); - - /** - * Draws a checkmark for an option box with the given upper left coordinates {@code (ox,oy)} with the specified {@code color}. - * - * @param ctx the NanoVG context - */ - public static void bndCheck(@NativeType("NVGcontext *") long ctx, float ox, float oy, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nbndCheck(ctx, ox, oy, color.address()); - } - - // --- [ bndArrow ] --- - - /** Unsafe version of: {@link #bndArrow Arrow} */ - public static native void nbndArrow(long ctx, float x, float y, float s, long color); - - /** - * Draws a horizontal arrow for a number field with its center at {@code (x,y)} and size {@code s}. - * - * @param ctx the NanoVG context - * @param s if negative, the arrow points to the left - */ - public static void bndArrow(@NativeType("NVGcontext *") long ctx, float x, float y, float s, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nbndArrow(ctx, x, y, s, color.address()); - } - - // --- [ bndUpDownArrow ] --- - - /** Unsafe version of: {@link #bndUpDownArrow UpDownArrow} */ - public static native void nbndUpDownArrow(long ctx, float x, float y, float s, long color); - - /** - * Draws an up/down arrow for a choice box with its center at {@code (x,y)} and size {@code s}. - * - * @param ctx the NanoVG context - */ - public static void bndUpDownArrow(@NativeType("NVGcontext *") long ctx, float x, float y, float s, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nbndUpDownArrow(ctx, x, y, s, color.address()); - } - - // --- [ bndNodeArrowDown ] --- - - /** Unsafe version of: {@link #bndNodeArrowDown NodeArrowDown} */ - public static native void nbndNodeArrowDown(long ctx, float x, float y, float s, long color); - - /** - * Draws a node down-arrow with its tip at {@code (x,y)} and size {@code s} - * - * @param ctx the NanoVG context - */ - public static void bndNodeArrowDown(@NativeType("NVGcontext *") long ctx, float x, float y, float s, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nbndNodeArrowDown(ctx, x, y, s, color.address()); - } - - // --- [ bndNodeWireColor ] --- - - /** Unsafe version of: {@link #bndNodeWireColor NodeWireColor} */ - public static native void nbndNodeWireColor(long theme, int state, long __result); - - /** - * Returns the color of a node wire based on state. - * - * @param state {@link #BND_HOVER HOVER} indicates selected state, {@link #BND_ACTIVE ACTIVE} indicates dragged state - */ - @NativeType("NVGcolor") - public static NVGColor bndNodeWireColor(@NativeType("BNDnodeTheme const *") BNDnodeTheme theme, @NativeType("BNDwidgetState") int state, @NativeType("NVGcolor") NVGColor __result) { - nbndNodeWireColor(theme.address(), state, __result.address()); - return __result; - } - - /** Array version of: {@link #nbndSelectCorners} */ - public static native void nbndSelectCorners(float[] radiuses, float r, int flags); - - /** Array version of: {@link #bndSelectCorners SelectCorners} */ - public static void bndSelectCorners(@NativeType("float *") float[] radiuses, float r, int flags) { - if (CHECKS) { - check(radiuses, 4); - } - nbndSelectCorners(radiuses, r, flags); - } - - /** Array version of: {@link #nbndScrollHandleRect} */ - public static native void nbndScrollHandleRect(float[] x, float[] y, float[] w, float[] h, float offset, float size); - - /** Array version of: {@link #bndScrollHandleRect ScrollHandleRect} */ - public static void bndScrollHandleRect(@NativeType("float *") float[] x, @NativeType("float *") float[] y, @NativeType("float *") float[] w, @NativeType("float *") float[] h, float offset, float size) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(w, 1); - check(h, 1); - } - nbndScrollHandleRect(x, y, w, h, offset, size); - } - - public static int BND_ICONID(int x, int y) { - return x | (y << 8); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/LibNanoVG.java b/LWJGL/src/main/java/org/lwjgl/nanovg/LibNanoVG.java deleted file mode 100644 index bb4e76f5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/LibNanoVG.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Initializes the nanovg shared library. */ -final class LibNanoVG { - - static { - String libName = Platform.mapLibraryNameBundled("lwjgl_nanovg"); - Library.loadSystem(System::load, System::loadLibrary, LibNanoVG.class, "org.lwjgl.nanovg", libName); - - MemoryAllocator allocator = getAllocator(Configuration.DEBUG_MEMORY_ALLOCATOR_INTERNAL.get(true)); - setupMalloc( - allocator.getMalloc(), - allocator.getCalloc(), - allocator.getRealloc(), - allocator.getFree(), - allocator.getAlignedAlloc(), - allocator.getAlignedFree() - ); - } - - private LibNanoVG() { - } - - static void initialize() { - // intentionally empty to trigger static initializer - } - - private static native void setupMalloc( - long malloc, - long calloc, - long realloc, - long free, - long aligned_alloc, - long aligned_free - ); - -} diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGGradient.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGGradient.java deleted file mode 100644 index ea063684..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGGradient.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct NSVGgradient {
    - *     float xform[6];
    - *     char spread;
    - *     float fx;
    - *     float fy;
    - *     int nstops;
    - *     {@link NSVGGradientStop NSVGgradientStop} pstops[1];
    - * }
    - */ -@NativeType("struct NSVGgradient") -public class NSVGGradient extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - XFORM, - SPREAD, - FX, - FY, - NSTOPS, - PSTOPS; - - static { - Layout layout = __struct( - __array(4, 6), - __member(1), - __member(4), - __member(4), - __member(4), - __array(NSVGGradientStop.SIZEOF, NSVGGradientStop.ALIGNOF, 1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - XFORM = layout.offsetof(0); - SPREAD = layout.offsetof(1); - FX = layout.offsetof(2); - FY = layout.offsetof(3); - NSTOPS = layout.offsetof(4); - PSTOPS = layout.offsetof(5); - } - - protected NSVGGradient(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NSVGGradient create(long address, @Nullable ByteBuffer container) { - return new NSVGGradient(address, container); - } - - /** - * Creates a {@code NSVGGradient} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NSVGGradient(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FloatBuffer} view of the {@code xform} field. */ - @NativeType("float[6]") - public FloatBuffer xform() { return nxform(address()); } - /** @return the value at the specified index of the {@code xform} field. */ - public float xform(int index) { return nxform(address(), index); } - /** @return the value of the {@code spread} field. */ - @NativeType("char") - public byte spread() { return nspread(address()); } - /** @return the value of the {@code fx} field. */ - public float fx() { return nfx(address()); } - /** @return the value of the {@code fy} field. */ - public float fy() { return nfy(address()); } - /** @return the value of the {@code nstops} field. */ - public int nstops() { return nnstops(address()); } - /** @return a {@link NSVGGradientStop}.Buffer view of the {@code pstops} field. */ - @NativeType("NSVGgradientStop[1]") - public NSVGGradientStop.Buffer pstops() { return npstops(address()); } - /** @return a {@link NSVGGradientStop} view of the struct at the specified index of the {@code pstops} field. */ - @NativeType("NSVGgradientStop") - public NSVGGradientStop pstops(int index) { return npstops(address(), index); } - - // ----------------------------------- - - /** Returns a new {@code NSVGGradient} instance for the specified memory address. */ - public static NSVGGradient create(long address) { - return new NSVGGradient(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NSVGGradient createSafe(long address) { - return address == NULL ? null : new NSVGGradient(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #xform}. */ - public static FloatBuffer nxform(long struct) { return memFloatBuffer(struct + NSVGGradient.XFORM, 6); } - /** Unsafe version of {@link #xform(int) xform}. */ - public static float nxform(long struct, int index) { - return UNSAFE.getFloat(null, struct + NSVGGradient.XFORM + check(index, 6) * 4); - } - /** Unsafe version of {@link #spread}. */ - public static byte nspread(long struct) { return UNSAFE.getByte(null, struct + NSVGGradient.SPREAD); } - /** Unsafe version of {@link #fx}. */ - public static float nfx(long struct) { return UNSAFE.getFloat(null, struct + NSVGGradient.FX); } - /** Unsafe version of {@link #fy}. */ - public static float nfy(long struct) { return UNSAFE.getFloat(null, struct + NSVGGradient.FY); } - /** Unsafe version of {@link #nstops}. */ - public static int nnstops(long struct) { return UNSAFE.getInt(null, struct + NSVGGradient.NSTOPS); } - /** Unsafe version of {@link #pstops}. */ - public static NSVGGradientStop.Buffer npstops(long struct) { return NSVGGradientStop.create(struct + NSVGGradient.PSTOPS, nnstops(struct)); } - /** Unsafe version of {@link #pstops(int) pstops}. */ - public static NSVGGradientStop npstops(long struct, int index) { - return NSVGGradientStop.create(struct + NSVGGradient.PSTOPS + check(index, nnstops(struct)) * NSVGGradientStop.SIZEOF); - } - - // ----------------------------------- - - /** An array of {@link NSVGGradient} structs. */ - public static class Buffer extends StructBuffer { - - private static final NSVGGradient ELEMENT_FACTORY = NSVGGradient.create(-1L); - - /** - * Creates a new {@code NSVGGradient.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NSVGGradient#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NSVGGradient getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FloatBuffer} view of the {@code xform} field. */ - @NativeType("float[6]") - public FloatBuffer xform() { return NSVGGradient.nxform(address()); } - /** @return the value at the specified index of the {@code xform} field. */ - public float xform(int index) { return NSVGGradient.nxform(address(), index); } - /** @return the value of the {@code spread} field. */ - @NativeType("char") - public byte spread() { return NSVGGradient.nspread(address()); } - /** @return the value of the {@code fx} field. */ - public float fx() { return NSVGGradient.nfx(address()); } - /** @return the value of the {@code fy} field. */ - public float fy() { return NSVGGradient.nfy(address()); } - /** @return the value of the {@code nstops} field. */ - public int nstops() { return NSVGGradient.nnstops(address()); } - /** @return a {@link NSVGGradientStop}.Buffer view of the {@code pstops} field. */ - @NativeType("NSVGgradientStop[1]") - public NSVGGradientStop.Buffer pstops() { return NSVGGradient.npstops(address()); } - /** @return a {@link NSVGGradientStop} view of the struct at the specified index of the {@code pstops} field. */ - @NativeType("NSVGgradientStop") - public NSVGGradientStop pstops(int index) { return NSVGGradient.npstops(address(), index); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGGradientStop.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGGradientStop.java deleted file mode 100644 index 1e39ab97..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGGradientStop.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct NSVGgradientStop {
    - *     unsigned int color;
    - *     float offset;
    - * }
    - */ -@NativeType("struct NSVGgradientStop") -public class NSVGGradientStop extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - COLOR, - OFFSET; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - COLOR = layout.offsetof(0); - OFFSET = layout.offsetof(1); - } - - protected NSVGGradientStop(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NSVGGradientStop create(long address, @Nullable ByteBuffer container) { - return new NSVGGradientStop(address, container); - } - - /** - * Creates a {@code NSVGGradientStop} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NSVGGradientStop(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code color} field. */ - @NativeType("unsigned int") - public int color() { return ncolor(address()); } - /** @return the value of the {@code offset} field. */ - public float offset() { return noffset(address()); } - - // ----------------------------------- - - /** Returns a new {@code NSVGGradientStop} instance for the specified memory address. */ - public static NSVGGradientStop create(long address) { - return new NSVGGradientStop(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NSVGGradientStop createSafe(long address) { - return address == NULL ? null : new NSVGGradientStop(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #color}. */ - public static int ncolor(long struct) { return UNSAFE.getInt(null, struct + NSVGGradientStop.COLOR); } - /** Unsafe version of {@link #offset}. */ - public static float noffset(long struct) { return UNSAFE.getFloat(null, struct + NSVGGradientStop.OFFSET); } - - // ----------------------------------- - - /** An array of {@link NSVGGradientStop} structs. */ - public static class Buffer extends StructBuffer { - - private static final NSVGGradientStop ELEMENT_FACTORY = NSVGGradientStop.create(-1L); - - /** - * Creates a new {@code NSVGGradientStop.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NSVGGradientStop#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NSVGGradientStop getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code color} field. */ - @NativeType("unsigned int") - public int color() { return NSVGGradientStop.ncolor(address()); } - /** @return the value of the {@code offset} field. */ - public float offset() { return NSVGGradientStop.noffset(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGImage.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGImage.java deleted file mode 100644 index 7a9bbcf2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGImage.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct NSVGimage {
    - *     float {@link #width};
    - *     float {@link #height};
    - *     {@link NSVGShape NSVGshape} * {@link #shapes};
    - * }
    - */ -@NativeType("struct NSVGimage") -public class NSVGImage extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT, - SHAPES; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - SHAPES = layout.offsetof(2); - } - - protected NSVGImage(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NSVGImage create(long address, @Nullable ByteBuffer container) { - return new NSVGImage(address, container); - } - - /** - * Creates a {@code NSVGImage} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NSVGImage(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** Width of the image. */ - public float width() { return nwidth(address()); } - /** Height of the image. */ - public float height() { return nheight(address()); } - /** lLinked list of shapes in the image */ - @NativeType("NSVGshape *") - public NSVGShape shapes() { return nshapes(address()); } - - // ----------------------------------- - - /** Returns a new {@code NSVGImage} instance for the specified memory address. */ - public static NSVGImage create(long address) { - return new NSVGImage(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NSVGImage createSafe(long address) { - return address == NULL ? null : new NSVGImage(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static float nwidth(long struct) { return UNSAFE.getFloat(null, struct + NSVGImage.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static float nheight(long struct) { return UNSAFE.getFloat(null, struct + NSVGImage.HEIGHT); } - /** Unsafe version of {@link #shapes}. */ - public static NSVGShape nshapes(long struct) { return NSVGShape.create(memGetAddress(struct + NSVGImage.SHAPES)); } - - // ----------------------------------- - - /** An array of {@link NSVGImage} structs. */ - public static class Buffer extends StructBuffer { - - private static final NSVGImage ELEMENT_FACTORY = NSVGImage.create(-1L); - - /** - * Creates a new {@code NSVGImage.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NSVGImage#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NSVGImage getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link NSVGImage#width} field. */ - public float width() { return NSVGImage.nwidth(address()); } - /** @return the value of the {@link NSVGImage#height} field. */ - public float height() { return NSVGImage.nheight(address()); } - /** @return a {@link NSVGShape} view of the struct pointed to by the {@link NSVGImage#shapes} field. */ - @NativeType("NSVGshape *") - public NSVGShape shapes() { return NSVGImage.nshapes(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGPaint.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGPaint.java deleted file mode 100644 index 8fb89c3a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGPaint.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct NSVGpaint {
    - *     signed char type;
    - *     union {
    - *         unsigned int color;
    - *         {@link NSVGGradient NSVGgradient} * gradient;
    - *     };
    - * }
    - */ -@NativeType("struct NSVGpaint") -public class NSVGPaint extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - COLOR, - GRADIENT; - - static { - Layout layout = __struct( - __member(1), - __union( - __member(4), - __member(POINTER_SIZE) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - COLOR = layout.offsetof(2); - GRADIENT = layout.offsetof(3); - } - - protected NSVGPaint(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NSVGPaint create(long address, @Nullable ByteBuffer container) { - return new NSVGPaint(address, container); - } - - /** - * Creates a {@code NSVGPaint} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NSVGPaint(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("signed char") - public byte type() { return ntype(address()); } - /** @return the value of the {@code color} field. */ - @NativeType("unsigned int") - public int color() { return ncolor(address()); } - /** @return a {@link NSVGGradient} view of the struct pointed to by the {@code gradient} field. */ - @NativeType("NSVGgradient *") - public NSVGGradient gradient() { return ngradient(address()); } - - // ----------------------------------- - - /** Returns a new {@code NSVGPaint} instance for the specified memory address. */ - public static NSVGPaint create(long address) { - return new NSVGPaint(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NSVGPaint createSafe(long address) { - return address == NULL ? null : new NSVGPaint(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static byte ntype(long struct) { return UNSAFE.getByte(null, struct + NSVGPaint.TYPE); } - /** Unsafe version of {@link #color}. */ - public static int ncolor(long struct) { return UNSAFE.getInt(null, struct + NSVGPaint.COLOR); } - /** Unsafe version of {@link #gradient}. */ - public static NSVGGradient ngradient(long struct) { return NSVGGradient.create(memGetAddress(struct + NSVGPaint.GRADIENT)); } - - // ----------------------------------- - - /** An array of {@link NSVGPaint} structs. */ - public static class Buffer extends StructBuffer { - - private static final NSVGPaint ELEMENT_FACTORY = NSVGPaint.create(-1L); - - /** - * Creates a new {@code NSVGPaint.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NSVGPaint#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NSVGPaint getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("signed char") - public byte type() { return NSVGPaint.ntype(address()); } - /** @return the value of the {@code color} field. */ - @NativeType("unsigned int") - public int color() { return NSVGPaint.ncolor(address()); } - /** @return a {@link NSVGGradient} view of the struct pointed to by the {@code gradient} field. */ - @NativeType("NSVGgradient *") - public NSVGGradient gradient() { return NSVGPaint.ngradient(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGPath.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGPath.java deleted file mode 100644 index 05f499ce..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGPath.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct NSVGpath {
    - *     float * {@link #pts};
    - *     int {@link #npts};
    - *     char {@link #closed};
    - *     float {@link #bounds}[4];
    - *     {@link NSVGPath NSVGpath} * {@link #next};
    - * }
    - */ -@NativeType("struct NSVGpath") -public class NSVGPath extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PTS, - NPTS, - CLOSED, - BOUNDS, - NEXT; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(1), - __array(4, 4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PTS = layout.offsetof(0); - NPTS = layout.offsetof(1); - CLOSED = layout.offsetof(2); - BOUNDS = layout.offsetof(3); - NEXT = layout.offsetof(4); - } - - protected NSVGPath(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NSVGPath create(long address, @Nullable ByteBuffer container) { - return new NSVGPath(address, container); - } - - /** - * Creates a {@code NSVGPath} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NSVGPath(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** cubic bezier points: {@code x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...} */ - @NativeType("float *") - public FloatBuffer pts() { return npts(address()); } - /** total number of bezier points */ - public int npts() { return nnpts(address()); } - /** flag indicating if shapes should be treated as closed */ - @NativeType("char") - public byte closed() { return nclosed(address()); } - /** tight bounding box of the shape {@code [minx,miny,maxx,maxy]} */ - @NativeType("float[4]") - public FloatBuffer bounds() { return nbounds(address()); } - /** tight bounding box of the shape {@code [minx,miny,maxx,maxy]} */ - public float bounds(int index) { return nbounds(address(), index); } - /** pointer to next path, or {@code NULL} if last element */ - @NativeType("NSVGpath *") - public NSVGPath next() { return nnext(address()); } - - // ----------------------------------- - - /** Returns a new {@code NSVGPath} instance for the specified memory address. */ - public static NSVGPath create(long address) { - return new NSVGPath(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NSVGPath createSafe(long address) { - return address == NULL ? null : new NSVGPath(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #pts() pts}. */ - public static FloatBuffer npts(long struct) { return memFloatBuffer(memGetAddress(struct + NSVGPath.PTS), (nnpts(struct) << 1)); } - /** Unsafe version of {@link #npts}. */ - public static int nnpts(long struct) { return UNSAFE.getInt(null, struct + NSVGPath.NPTS); } - /** Unsafe version of {@link #closed}. */ - public static byte nclosed(long struct) { return UNSAFE.getByte(null, struct + NSVGPath.CLOSED); } - /** Unsafe version of {@link #bounds}. */ - public static FloatBuffer nbounds(long struct) { return memFloatBuffer(struct + NSVGPath.BOUNDS, 4); } - /** Unsafe version of {@link #bounds(int) bounds}. */ - public static float nbounds(long struct, int index) { - return UNSAFE.getFloat(null, struct + NSVGPath.BOUNDS + check(index, 4) * 4); - } - /** Unsafe version of {@link #next}. */ - public static NSVGPath nnext(long struct) { return NSVGPath.create(memGetAddress(struct + NSVGPath.NEXT)); } - - // ----------------------------------- - - /** An array of {@link NSVGPath} structs. */ - public static class Buffer extends StructBuffer { - - private static final NSVGPath ELEMENT_FACTORY = NSVGPath.create(-1L); - - /** - * Creates a new {@code NSVGPath.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NSVGPath#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NSVGPath getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FloatBuffer} view of the data pointed to by the {@link NSVGPath#pts} field. */ - @NativeType("float *") - public FloatBuffer pts() { return NSVGPath.npts(address()); } - /** @return the value of the {@link NSVGPath#npts} field. */ - public int npts() { return NSVGPath.nnpts(address()); } - /** @return the value of the {@link NSVGPath#closed} field. */ - @NativeType("char") - public byte closed() { return NSVGPath.nclosed(address()); } - /** @return a {@link FloatBuffer} view of the {@link NSVGPath#bounds} field. */ - @NativeType("float[4]") - public FloatBuffer bounds() { return NSVGPath.nbounds(address()); } - /** @return the value at the specified index of the {@link NSVGPath#bounds} field. */ - public float bounds(int index) { return NSVGPath.nbounds(address(), index); } - /** @return a {@link NSVGPath} view of the struct pointed to by the {@link NSVGPath#next} field. */ - @NativeType("NSVGpath *") - public NSVGPath next() { return NSVGPath.nnext(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGShape.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGShape.java deleted file mode 100644 index 3c18d244..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NSVGShape.java +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct NSVGshape {
    - *     char {@link #id}[64];
    - *     {@link NSVGPaint NSVGpaint} {@link #fill};
    - *     {@link NSVGPaint NSVGpaint} {@link #stroke};
    - *     float {@link #opacity};
    - *     float {@link #strokeWidth};
    - *     float {@link #strokeDashOffset};
    - *     float {@link #strokeDashArray}[8];
    - *     char {@link #strokeDashCount};
    - *     char {@link #strokeLineJoin};
    - *     char {@link #strokeLineCap};
    - *     float {@link #miterLimit};
    - *     char {@link #fillRule};
    - *     unsigned char {@link #flags};
    - *     float {@link #bounds}[4];
    - *     char {@link #fillGradient}[64];
    - *     char {@link #strokeGradient}[64];
    - *     float {@link #xform}[6];
    - *     {@link NSVGPath NSVGpath} * {@link #paths};
    - *     {@link NSVGShape NSVGshape} * {@link #next};
    - * }
    - */ -@NativeType("struct NSVGshape") -public class NSVGShape extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ID, - FILL, - STROKE, - OPACITY, - STROKEWIDTH, - STROKEDASHOFFSET, - STROKEDASHARRAY, - STROKEDASHCOUNT, - STROKELINEJOIN, - STROKELINECAP, - MITERLIMIT, - FILLRULE, - FLAGS, - BOUNDS, - FILLGRADIENT, - STROKEGRADIENT, - XFORM, - PATHS, - NEXT; - - static { - Layout layout = __struct( - __array(1, 64), - __member(NSVGPaint.SIZEOF, NSVGPaint.ALIGNOF), - __member(NSVGPaint.SIZEOF, NSVGPaint.ALIGNOF), - __member(4), - __member(4), - __member(4), - __array(4, 8), - __member(1), - __member(1), - __member(1), - __member(4), - __member(1), - __member(1), - __array(4, 4), - __array(1, 64), - __array(1, 64), - __array(4, 6), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ID = layout.offsetof(0); - FILL = layout.offsetof(1); - STROKE = layout.offsetof(2); - OPACITY = layout.offsetof(3); - STROKEWIDTH = layout.offsetof(4); - STROKEDASHOFFSET = layout.offsetof(5); - STROKEDASHARRAY = layout.offsetof(6); - STROKEDASHCOUNT = layout.offsetof(7); - STROKELINEJOIN = layout.offsetof(8); - STROKELINECAP = layout.offsetof(9); - MITERLIMIT = layout.offsetof(10); - FILLRULE = layout.offsetof(11); - FLAGS = layout.offsetof(12); - BOUNDS = layout.offsetof(13); - FILLGRADIENT = layout.offsetof(14); - STROKEGRADIENT = layout.offsetof(15); - XFORM = layout.offsetof(16); - PATHS = layout.offsetof(17); - NEXT = layout.offsetof(18); - } - - protected NSVGShape(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NSVGShape create(long address, @Nullable ByteBuffer container) { - return new NSVGShape(address, container); - } - - /** - * Creates a {@code NSVGShape} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NSVGShape(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** optional 'id' attr of the shape or its group */ - @NativeType("char[64]") - public ByteBuffer id() { return nid(address()); } - /** optional 'id' attr of the shape or its group */ - @NativeType("char[64]") - public String idString() { return nidString(address()); } - /** fill paint */ - @NativeType("NSVGpaint") - public NSVGPaint fill() { return nfill(address()); } - /** stroke paint */ - @NativeType("NSVGpaint") - public NSVGPaint stroke() { return nstroke(address()); } - /** opacity of the shape */ - public float opacity() { return nopacity(address()); } - /** stroke width (scaled) */ - public float strokeWidth() { return nstrokeWidth(address()); } - /** stroke dash offset (scaled) */ - public float strokeDashOffset() { return nstrokeDashOffset(address()); } - /** stroke dash array (scaled) */ - @NativeType("float[8]") - public FloatBuffer strokeDashArray() { return nstrokeDashArray(address()); } - /** stroke dash array (scaled) */ - public float strokeDashArray(int index) { return nstrokeDashArray(address(), index); } - /** number of dash values in dash array */ - @NativeType("char") - public byte strokeDashCount() { return nstrokeDashCount(address()); } - /** stroke join type */ - @NativeType("char") - public byte strokeLineJoin() { return nstrokeLineJoin(address()); } - /** stroke cap type */ - @NativeType("char") - public byte strokeLineCap() { return nstrokeLineCap(address()); } - /** miter limit */ - public float miterLimit() { return nmiterLimit(address()); } - /** fill rule, see NSVGfillRule */ - @NativeType("char") - public byte fillRule() { return nfillRule(address()); } - /** logical or of NSVG_FLAGS_* flags */ - @NativeType("unsigned char") - public byte flags() { return nflags(address()); } - /** tight bounding box of the shape {@code [minx,miny,maxx,maxy]} */ - @NativeType("float[4]") - public FloatBuffer bounds() { return nbounds(address()); } - /** tight bounding box of the shape {@code [minx,miny,maxx,maxy]} */ - public float bounds(int index) { return nbounds(address(), index); } - /** optional 'id' of fill gradient */ - @NativeType("char[64]") - public ByteBuffer fillGradient() { return nfillGradient(address()); } - /** optional 'id' of fill gradient */ - @NativeType("char[64]") - public String fillGradientString() { return nfillGradientString(address()); } - /** optional 'id' of stroke gradient */ - @NativeType("char[64]") - public ByteBuffer strokeGradient() { return nstrokeGradient(address()); } - /** optional 'id' of stroke gradient */ - @NativeType("char[64]") - public String strokeGradientString() { return nstrokeGradientString(address()); } - /** root transformation for fill/stroke gradient */ - @NativeType("float[6]") - public FloatBuffer xform() { return nxform(address()); } - /** root transformation for fill/stroke gradient */ - public float xform(int index) { return nxform(address(), index); } - /** linked list of paths in the image */ - @NativeType("NSVGpath *") - public NSVGPath paths() { return npaths(address()); } - /** pointer to next shape, or {@code NULL} if last element */ - @NativeType("NSVGshape *") - public NSVGShape next() { return nnext(address()); } - - // ----------------------------------- - - /** Returns a new {@code NSVGShape} instance for the specified memory address. */ - public static NSVGShape create(long address) { - return new NSVGShape(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NSVGShape createSafe(long address) { - return address == NULL ? null : new NSVGShape(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #id}. */ - public static ByteBuffer nid(long struct) { return memByteBuffer(struct + NSVGShape.ID, 64); } - /** Unsafe version of {@link #idString}. */ - public static String nidString(long struct) { return memASCII(struct + NSVGShape.ID); } - /** Unsafe version of {@link #fill}. */ - public static NSVGPaint nfill(long struct) { return NSVGPaint.create(struct + NSVGShape.FILL); } - /** Unsafe version of {@link #stroke}. */ - public static NSVGPaint nstroke(long struct) { return NSVGPaint.create(struct + NSVGShape.STROKE); } - /** Unsafe version of {@link #opacity}. */ - public static float nopacity(long struct) { return UNSAFE.getFloat(null, struct + NSVGShape.OPACITY); } - /** Unsafe version of {@link #strokeWidth}. */ - public static float nstrokeWidth(long struct) { return UNSAFE.getFloat(null, struct + NSVGShape.STROKEWIDTH); } - /** Unsafe version of {@link #strokeDashOffset}. */ - public static float nstrokeDashOffset(long struct) { return UNSAFE.getFloat(null, struct + NSVGShape.STROKEDASHOFFSET); } - /** Unsafe version of {@link #strokeDashArray}. */ - public static FloatBuffer nstrokeDashArray(long struct) { return memFloatBuffer(struct + NSVGShape.STROKEDASHARRAY, 8); } - /** Unsafe version of {@link #strokeDashArray(int) strokeDashArray}. */ - public static float nstrokeDashArray(long struct, int index) { - return UNSAFE.getFloat(null, struct + NSVGShape.STROKEDASHARRAY + check(index, 8) * 4); - } - /** Unsafe version of {@link #strokeDashCount}. */ - public static byte nstrokeDashCount(long struct) { return UNSAFE.getByte(null, struct + NSVGShape.STROKEDASHCOUNT); } - /** Unsafe version of {@link #strokeLineJoin}. */ - public static byte nstrokeLineJoin(long struct) { return UNSAFE.getByte(null, struct + NSVGShape.STROKELINEJOIN); } - /** Unsafe version of {@link #strokeLineCap}. */ - public static byte nstrokeLineCap(long struct) { return UNSAFE.getByte(null, struct + NSVGShape.STROKELINECAP); } - /** Unsafe version of {@link #miterLimit}. */ - public static float nmiterLimit(long struct) { return UNSAFE.getFloat(null, struct + NSVGShape.MITERLIMIT); } - /** Unsafe version of {@link #fillRule}. */ - public static byte nfillRule(long struct) { return UNSAFE.getByte(null, struct + NSVGShape.FILLRULE); } - /** Unsafe version of {@link #flags}. */ - public static byte nflags(long struct) { return UNSAFE.getByte(null, struct + NSVGShape.FLAGS); } - /** Unsafe version of {@link #bounds}. */ - public static FloatBuffer nbounds(long struct) { return memFloatBuffer(struct + NSVGShape.BOUNDS, 4); } - /** Unsafe version of {@link #bounds(int) bounds}. */ - public static float nbounds(long struct, int index) { - return UNSAFE.getFloat(null, struct + NSVGShape.BOUNDS + check(index, 4) * 4); - } - /** Unsafe version of {@link #fillGradient}. */ - public static ByteBuffer nfillGradient(long struct) { return memByteBuffer(struct + NSVGShape.FILLGRADIENT, 64); } - /** Unsafe version of {@link #fillGradientString}. */ - public static String nfillGradientString(long struct) { return memASCII(struct + NSVGShape.FILLGRADIENT); } - /** Unsafe version of {@link #strokeGradient}. */ - public static ByteBuffer nstrokeGradient(long struct) { return memByteBuffer(struct + NSVGShape.STROKEGRADIENT, 64); } - /** Unsafe version of {@link #strokeGradientString}. */ - public static String nstrokeGradientString(long struct) { return memASCII(struct + NSVGShape.STROKEGRADIENT); } - /** Unsafe version of {@link #xform}. */ - public static FloatBuffer nxform(long struct) { return memFloatBuffer(struct + NSVGShape.XFORM, 6); } - /** Unsafe version of {@link #xform(int) xform}. */ - public static float nxform(long struct, int index) { - return UNSAFE.getFloat(null, struct + NSVGShape.XFORM + check(index, 6) * 4); - } - /** Unsafe version of {@link #paths}. */ - public static NSVGPath npaths(long struct) { return NSVGPath.create(memGetAddress(struct + NSVGShape.PATHS)); } - /** Unsafe version of {@link #next}. */ - public static NSVGShape nnext(long struct) { return NSVGShape.create(memGetAddress(struct + NSVGShape.NEXT)); } - - // ----------------------------------- - - /** An array of {@link NSVGShape} structs. */ - public static class Buffer extends StructBuffer { - - private static final NSVGShape ELEMENT_FACTORY = NSVGShape.create(-1L); - - /** - * Creates a new {@code NSVGShape.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NSVGShape#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NSVGShape getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the {@link NSVGShape#id} field. */ - @NativeType("char[64]") - public ByteBuffer id() { return NSVGShape.nid(address()); } - /** @return the null-terminated string stored in the {@link NSVGShape#id} field. */ - @NativeType("char[64]") - public String idString() { return NSVGShape.nidString(address()); } - /** @return a {@link NSVGPaint} view of the {@link NSVGShape#fill} field. */ - @NativeType("NSVGpaint") - public NSVGPaint fill() { return NSVGShape.nfill(address()); } - /** @return a {@link NSVGPaint} view of the {@link NSVGShape#stroke} field. */ - @NativeType("NSVGpaint") - public NSVGPaint stroke() { return NSVGShape.nstroke(address()); } - /** @return the value of the {@link NSVGShape#opacity} field. */ - public float opacity() { return NSVGShape.nopacity(address()); } - /** @return the value of the {@link NSVGShape#strokeWidth} field. */ - public float strokeWidth() { return NSVGShape.nstrokeWidth(address()); } - /** @return the value of the {@link NSVGShape#strokeDashOffset} field. */ - public float strokeDashOffset() { return NSVGShape.nstrokeDashOffset(address()); } - /** @return a {@link FloatBuffer} view of the {@link NSVGShape#strokeDashArray} field. */ - @NativeType("float[8]") - public FloatBuffer strokeDashArray() { return NSVGShape.nstrokeDashArray(address()); } - /** @return the value at the specified index of the {@link NSVGShape#strokeDashArray} field. */ - public float strokeDashArray(int index) { return NSVGShape.nstrokeDashArray(address(), index); } - /** @return the value of the {@link NSVGShape#strokeDashCount} field. */ - @NativeType("char") - public byte strokeDashCount() { return NSVGShape.nstrokeDashCount(address()); } - /** @return the value of the {@link NSVGShape#strokeLineJoin} field. */ - @NativeType("char") - public byte strokeLineJoin() { return NSVGShape.nstrokeLineJoin(address()); } - /** @return the value of the {@link NSVGShape#strokeLineCap} field. */ - @NativeType("char") - public byte strokeLineCap() { return NSVGShape.nstrokeLineCap(address()); } - /** @return the value of the {@link NSVGShape#miterLimit} field. */ - public float miterLimit() { return NSVGShape.nmiterLimit(address()); } - /** @return the value of the {@link NSVGShape#fillRule} field. */ - @NativeType("char") - public byte fillRule() { return NSVGShape.nfillRule(address()); } - /** @return the value of the {@link NSVGShape#flags} field. */ - @NativeType("unsigned char") - public byte flags() { return NSVGShape.nflags(address()); } - /** @return a {@link FloatBuffer} view of the {@link NSVGShape#bounds} field. */ - @NativeType("float[4]") - public FloatBuffer bounds() { return NSVGShape.nbounds(address()); } - /** @return the value at the specified index of the {@link NSVGShape#bounds} field. */ - public float bounds(int index) { return NSVGShape.nbounds(address(), index); } - /** @return a {@link ByteBuffer} view of the {@link NSVGShape#fillGradient} field. */ - @NativeType("char[64]") - public ByteBuffer fillGradient() { return NSVGShape.nfillGradient(address()); } - /** @return the null-terminated string stored in the {@link NSVGShape#fillGradient} field. */ - @NativeType("char[64]") - public String fillGradientString() { return NSVGShape.nfillGradientString(address()); } - /** @return a {@link ByteBuffer} view of the {@link NSVGShape#strokeGradient} field. */ - @NativeType("char[64]") - public ByteBuffer strokeGradient() { return NSVGShape.nstrokeGradient(address()); } - /** @return the null-terminated string stored in the {@link NSVGShape#strokeGradient} field. */ - @NativeType("char[64]") - public String strokeGradientString() { return NSVGShape.nstrokeGradientString(address()); } - /** @return a {@link FloatBuffer} view of the {@link NSVGShape#xform} field. */ - @NativeType("float[6]") - public FloatBuffer xform() { return NSVGShape.nxform(address()); } - /** @return the value at the specified index of the {@link NSVGShape#xform} field. */ - public float xform(int index) { return NSVGShape.nxform(address(), index); } - /** @return a {@link NSVGPath} view of the struct pointed to by the {@link NSVGShape#paths} field. */ - @NativeType("NSVGpath *") - public NSVGPath paths() { return NSVGShape.npaths(address()); } - /** @return a {@link NSVGShape} view of the struct pointed to by the {@link NSVGShape#next} field. */ - @NativeType("NSVGshape *") - public NSVGShape next() { return NSVGShape.nnext(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGColor.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NVGColor.java deleted file mode 100644 index 6e20f998..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGColor.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A NanoVG color. - * - *

    Layout

    - * - *
    
    - * struct NVGcolor {
    - *     union {
    - *         float {@link #rgba}[4];
    - *         struct {
    - *             float {@link #r};
    - *             float {@link #g};
    - *             float {@link #b};
    - *             float {@link #a};
    - *         };
    - *     };
    - * }
    - */ -@NativeType("struct NVGcolor") -public class NVGColor extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - RGBA, - R, - G, - B, - A; - - static { - Layout layout = __struct( - __union( - __array(4, 4), - __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - RGBA = layout.offsetof(1); - R = layout.offsetof(3); - G = layout.offsetof(4); - B = layout.offsetof(5); - A = layout.offsetof(6); - } - - protected NVGColor(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NVGColor create(long address, @Nullable ByteBuffer container) { - return new NVGColor(address, container); - } - - /** - * Creates a {@code NVGColor} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NVGColor(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** an array of 4 color components */ - @NativeType("float[4]") - public FloatBuffer rgba() { return nrgba(address()); } - /** an array of 4 color components */ - public float rgba(int index) { return nrgba(address(), index); } - /** the color red component */ - public float r() { return nr(address()); } - /** the color green component */ - public float g() { return ng(address()); } - /** the color blue component */ - public float b() { return nb(address()); } - /** the color alpha component */ - public float a() { return na(address()); } - - /** Copies the specified {@link FloatBuffer} to the {@link #rgba} field. */ - public NVGColor rgba(@NativeType("float[4]") FloatBuffer value) { nrgba(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #rgba} field. */ - public NVGColor rgba(int index, float value) { nrgba(address(), index, value); return this; } - /** Sets the specified value to the {@link #r} field. */ - public NVGColor r(float value) { nr(address(), value); return this; } - /** Sets the specified value to the {@link #g} field. */ - public NVGColor g(float value) { ng(address(), value); return this; } - /** Sets the specified value to the {@link #b} field. */ - public NVGColor b(float value) { nb(address(), value); return this; } - /** Sets the specified value to the {@link #a} field. */ - public NVGColor a(float value) { na(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public NVGColor set(NVGColor src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code NVGColor} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static NVGColor malloc() { - return new NVGColor(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code NVGColor} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static NVGColor calloc() { - return new NVGColor(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code NVGColor} instance allocated with {@link BufferUtils}. */ - public static NVGColor create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new NVGColor(memAddress(container), container); - } - - /** Returns a new {@code NVGColor} instance for the specified memory address. */ - public static NVGColor create(long address) { - return new NVGColor(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NVGColor createSafe(long address) { - return address == NULL ? null : new NVGColor(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGColor mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGColor callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGColor mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGColor callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code NVGColor} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static NVGColor malloc(MemoryStack stack) { - return new NVGColor(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code NVGColor} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static NVGColor calloc(MemoryStack stack) { - return new NVGColor(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #rgba}. */ - public static FloatBuffer nrgba(long struct) { return memFloatBuffer(struct + NVGColor.RGBA, 4); } - /** Unsafe version of {@link #rgba(int) rgba}. */ - public static float nrgba(long struct, int index) { - return UNSAFE.getFloat(null, struct + NVGColor.RGBA + check(index, 4) * 4); - } - /** Unsafe version of {@link #r}. */ - public static float nr(long struct) { return UNSAFE.getFloat(null, struct + NVGColor.R); } - /** Unsafe version of {@link #g}. */ - public static float ng(long struct) { return UNSAFE.getFloat(null, struct + NVGColor.G); } - /** Unsafe version of {@link #b}. */ - public static float nb(long struct) { return UNSAFE.getFloat(null, struct + NVGColor.B); } - /** Unsafe version of {@link #a}. */ - public static float na(long struct) { return UNSAFE.getFloat(null, struct + NVGColor.A); } - - /** Unsafe version of {@link #rgba(FloatBuffer) rgba}. */ - public static void nrgba(long struct, FloatBuffer value) { - if (CHECKS) { checkGT(value, 4); } - memCopy(memAddress(value), struct + NVGColor.RGBA, value.remaining() * 4); - } - /** Unsafe version of {@link #rgba(int, float) rgba}. */ - public static void nrgba(long struct, int index, float value) { - UNSAFE.putFloat(null, struct + NVGColor.RGBA + check(index, 4) * 4, value); - } - /** Unsafe version of {@link #r(float) r}. */ - public static void nr(long struct, float value) { UNSAFE.putFloat(null, struct + NVGColor.R, value); } - /** Unsafe version of {@link #g(float) g}. */ - public static void ng(long struct, float value) { UNSAFE.putFloat(null, struct + NVGColor.G, value); } - /** Unsafe version of {@link #b(float) b}. */ - public static void nb(long struct, float value) { UNSAFE.putFloat(null, struct + NVGColor.B, value); } - /** Unsafe version of {@link #a(float) a}. */ - public static void na(long struct, float value) { UNSAFE.putFloat(null, struct + NVGColor.A, value); } - - // ----------------------------------- - - /** An array of {@link NVGColor} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final NVGColor ELEMENT_FACTORY = NVGColor.create(-1L); - - /** - * Creates a new {@code NVGColor.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NVGColor#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NVGColor getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FloatBuffer} view of the {@link NVGColor#rgba} field. */ - @NativeType("float[4]") - public FloatBuffer rgba() { return NVGColor.nrgba(address()); } - /** @return the value at the specified index of the {@link NVGColor#rgba} field. */ - public float rgba(int index) { return NVGColor.nrgba(address(), index); } - /** @return the value of the {@link NVGColor#r} field. */ - public float r() { return NVGColor.nr(address()); } - /** @return the value of the {@link NVGColor#g} field. */ - public float g() { return NVGColor.ng(address()); } - /** @return the value of the {@link NVGColor#b} field. */ - public float b() { return NVGColor.nb(address()); } - /** @return the value of the {@link NVGColor#a} field. */ - public float a() { return NVGColor.na(address()); } - - /** Copies the specified {@link FloatBuffer} to the {@link NVGColor#rgba} field. */ - public Buffer rgba(@NativeType("float[4]") FloatBuffer value) { NVGColor.nrgba(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link NVGColor#rgba} field. */ - public Buffer rgba(int index, float value) { NVGColor.nrgba(address(), index, value); return this; } - /** Sets the specified value to the {@link NVGColor#r} field. */ - public Buffer r(float value) { NVGColor.nr(address(), value); return this; } - /** Sets the specified value to the {@link NVGColor#g} field. */ - public Buffer g(float value) { NVGColor.ng(address(), value); return this; } - /** Sets the specified value to the {@link NVGColor#b} field. */ - public Buffer b(float value) { NVGColor.nb(address(), value); return this; } - /** Sets the specified value to the {@link NVGColor#a} field. */ - public Buffer a(float value) { NVGColor.na(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGGlyphPosition.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NVGGlyphPosition.java deleted file mode 100644 index 5ad94960..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGGlyphPosition.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A glyph position. - * - *

    Layout

    - * - *
    
    - * struct NVGglyphPosition {
    - *     char * {@link #str};
    - *     float {@link #x};
    - *     float {@link #minx};
    - *     float {@link #maxx};
    - * }
    - */ -@NativeType("struct NVGglyphPosition") -public class NVGGlyphPosition extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - STR, - X, - MINX, - MAXX; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - STR = layout.offsetof(0); - X = layout.offsetof(1); - MINX = layout.offsetof(2); - MAXX = layout.offsetof(3); - } - - protected NVGGlyphPosition(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NVGGlyphPosition create(long address, @Nullable ByteBuffer container) { - return new NVGGlyphPosition(address, container); - } - - /** - * Creates a {@code NVGGlyphPosition} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NVGGlyphPosition(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** position of the glyph in the input string */ - @NativeType("char *") - public long str() { return nstr(address()); } - /** the x-coordinate of the logical glyph position */ - public float x() { return nx(address()); } - /** the left bound of the glyph shape */ - public float minx() { return nminx(address()); } - /** the right bound of the glyph shape */ - public float maxx() { return nmaxx(address()); } - - // ----------------------------------- - - /** Returns a new {@code NVGGlyphPosition} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static NVGGlyphPosition malloc() { - return new NVGGlyphPosition(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code NVGGlyphPosition} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static NVGGlyphPosition calloc() { - return new NVGGlyphPosition(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code NVGGlyphPosition} instance allocated with {@link BufferUtils}. */ - public static NVGGlyphPosition create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new NVGGlyphPosition(memAddress(container), container); - } - - /** Returns a new {@code NVGGlyphPosition} instance for the specified memory address. */ - public static NVGGlyphPosition create(long address) { - return new NVGGlyphPosition(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NVGGlyphPosition createSafe(long address) { - return address == NULL ? null : new NVGGlyphPosition(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGGlyphPosition mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGGlyphPosition callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGGlyphPosition mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGGlyphPosition callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code NVGGlyphPosition} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static NVGGlyphPosition malloc(MemoryStack stack) { - return new NVGGlyphPosition(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code NVGGlyphPosition} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static NVGGlyphPosition calloc(MemoryStack stack) { - return new NVGGlyphPosition(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #str}. */ - public static long nstr(long struct) { return memGetAddress(struct + NVGGlyphPosition.STR); } - /** Unsafe version of {@link #x}. */ - public static float nx(long struct) { return UNSAFE.getFloat(null, struct + NVGGlyphPosition.X); } - /** Unsafe version of {@link #minx}. */ - public static float nminx(long struct) { return UNSAFE.getFloat(null, struct + NVGGlyphPosition.MINX); } - /** Unsafe version of {@link #maxx}. */ - public static float nmaxx(long struct) { return UNSAFE.getFloat(null, struct + NVGGlyphPosition.MAXX); } - - // ----------------------------------- - - /** An array of {@link NVGGlyphPosition} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final NVGGlyphPosition ELEMENT_FACTORY = NVGGlyphPosition.create(-1L); - - /** - * Creates a new {@code NVGGlyphPosition.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NVGGlyphPosition#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NVGGlyphPosition getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link NVGGlyphPosition#str} field. */ - @NativeType("char *") - public long str() { return NVGGlyphPosition.nstr(address()); } - /** @return the value of the {@link NVGGlyphPosition#x} field. */ - public float x() { return NVGGlyphPosition.nx(address()); } - /** @return the value of the {@link NVGGlyphPosition#minx} field. */ - public float minx() { return NVGGlyphPosition.nminx(address()); } - /** @return the value of the {@link NVGGlyphPosition#maxx} field. */ - public float maxx() { return NVGGlyphPosition.nmaxx(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGLUFramebuffer.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NVGLUFramebuffer.java deleted file mode 100644 index 03a14b03..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGLUFramebuffer.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A framebuffer object. - * - *

    Layout

    - * - *
    
    - * struct NVGLUframebuffer {
    - *     GLuint {@link #fbo};
    - *     GLuint {@link #rbo};
    - *     GLuint {@link #texture};
    - *     int {@link #image};
    - * }
    - */ -@NativeType("struct NVGLUframebuffer") -public class NVGLUFramebuffer extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FBO, - RBO, - TEXTURE, - IMAGE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FBO = layout.offsetof(0); - RBO = layout.offsetof(1); - TEXTURE = layout.offsetof(2); - IMAGE = layout.offsetof(3); - } - - protected NVGLUFramebuffer(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NVGLUFramebuffer create(long address, @Nullable ByteBuffer container) { - return new NVGLUFramebuffer(address, container); - } - - /** - * Creates a {@code NVGLUFramebuffer} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NVGLUFramebuffer(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the OpenGL framebuffer object handle */ - @NativeType("GLuint") - public int fbo() { return nfbo(address()); } - /** the OpenGL renderbuffer handle */ - @NativeType("GLuint") - public int rbo() { return nrbo(address()); } - /** the OpenGL texture handle */ - @NativeType("GLuint") - public int texture() { return ntexture(address()); } - /** the NanoVG image handle */ - public int image() { return nimage(address()); } - - // ----------------------------------- - - /** Returns a new {@code NVGLUFramebuffer} instance for the specified memory address. */ - public static NVGLUFramebuffer create(long address) { - return new NVGLUFramebuffer(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NVGLUFramebuffer createSafe(long address) { - return address == NULL ? null : new NVGLUFramebuffer(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #fbo}. */ - public static int nfbo(long struct) { return UNSAFE.getInt(null, struct + NVGLUFramebuffer.FBO); } - /** Unsafe version of {@link #rbo}. */ - public static int nrbo(long struct) { return UNSAFE.getInt(null, struct + NVGLUFramebuffer.RBO); } - /** Unsafe version of {@link #texture}. */ - public static int ntexture(long struct) { return UNSAFE.getInt(null, struct + NVGLUFramebuffer.TEXTURE); } - /** Unsafe version of {@link #image}. */ - public static int nimage(long struct) { return UNSAFE.getInt(null, struct + NVGLUFramebuffer.IMAGE); } - - // ----------------------------------- - - /** An array of {@link NVGLUFramebuffer} structs. */ - public static class Buffer extends StructBuffer { - - private static final NVGLUFramebuffer ELEMENT_FACTORY = NVGLUFramebuffer.create(-1L); - - /** - * Creates a new {@code NVGLUFramebuffer.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NVGLUFramebuffer#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NVGLUFramebuffer getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link NVGLUFramebuffer#fbo} field. */ - @NativeType("GLuint") - public int fbo() { return NVGLUFramebuffer.nfbo(address()); } - /** @return the value of the {@link NVGLUFramebuffer#rbo} field. */ - @NativeType("GLuint") - public int rbo() { return NVGLUFramebuffer.nrbo(address()); } - /** @return the value of the {@link NVGLUFramebuffer#texture} field. */ - @NativeType("GLuint") - public int texture() { return NVGLUFramebuffer.ntexture(address()); } - /** @return the value of the {@link NVGLUFramebuffer#image} field. */ - public int image() { return NVGLUFramebuffer.nimage(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGLUFramebufferBGFX.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NVGLUFramebufferBGFX.java deleted file mode 100644 index 6de267e1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGLUFramebufferBGFX.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A framebuffer object. - * - *

    Layout

    - * - *
    
    - * struct NVGLUframebuffer {
    - *     NVGcontext * ctx;
    - *     bgfx_frame_buffer_handle_t handle;
    - *     int image;
    - *     bgfx_view_id_t viewId;
    - * }
    - */ -@NativeType("struct NVGLUframebuffer") -public class NVGLUFramebufferBGFX extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CTX, - HANDLE, - IMAGE, - VIEWID; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(2), - __member(4), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CTX = layout.offsetof(0); - HANDLE = layout.offsetof(1); - IMAGE = layout.offsetof(2); - VIEWID = layout.offsetof(3); - } - - protected NVGLUFramebufferBGFX(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NVGLUFramebufferBGFX create(long address, @Nullable ByteBuffer container) { - return new NVGLUFramebufferBGFX(address, container); - } - - /** - * Creates a {@code NVGLUFramebufferBGFX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NVGLUFramebufferBGFX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code ctx} field. */ - @NativeType("NVGcontext *") - public long ctx() { return nctx(address()); } - /** @return the value of the {@code handle} field. */ - @NativeType("bgfx_frame_buffer_handle_t") - public short handle() { return nhandle(address()); } - /** @return the value of the {@code image} field. */ - public int image() { return nimage(address()); } - /** @return the value of the {@code viewId} field. */ - @NativeType("bgfx_view_id_t") - public short viewId() { return nviewId(address()); } - - // ----------------------------------- - - /** Returns a new {@code NVGLUFramebufferBGFX} instance for the specified memory address. */ - public static NVGLUFramebufferBGFX create(long address) { - return new NVGLUFramebufferBGFX(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NVGLUFramebufferBGFX createSafe(long address) { - return address == NULL ? null : new NVGLUFramebufferBGFX(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #ctx}. */ - public static long nctx(long struct) { return memGetAddress(struct + NVGLUFramebufferBGFX.CTX); } - /** Unsafe version of {@link #handle}. */ - public static short nhandle(long struct) { return UNSAFE.getShort(null, struct + NVGLUFramebufferBGFX.HANDLE); } - /** Unsafe version of {@link #image}. */ - public static int nimage(long struct) { return UNSAFE.getInt(null, struct + NVGLUFramebufferBGFX.IMAGE); } - /** Unsafe version of {@link #viewId}. */ - public static short nviewId(long struct) { return UNSAFE.getShort(null, struct + NVGLUFramebufferBGFX.VIEWID); } - - // ----------------------------------- - - /** An array of {@link NVGLUFramebufferBGFX} structs. */ - public static class Buffer extends StructBuffer { - - private static final NVGLUFramebufferBGFX ELEMENT_FACTORY = NVGLUFramebufferBGFX.create(-1L); - - /** - * Creates a new {@code NVGLUFramebufferBGFX.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NVGLUFramebufferBGFX#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NVGLUFramebufferBGFX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code ctx} field. */ - @NativeType("NVGcontext *") - public long ctx() { return NVGLUFramebufferBGFX.nctx(address()); } - /** @return the value of the {@code handle} field. */ - @NativeType("bgfx_frame_buffer_handle_t") - public short handle() { return NVGLUFramebufferBGFX.nhandle(address()); } - /** @return the value of the {@code image} field. */ - public int image() { return NVGLUFramebufferBGFX.nimage(address()); } - /** @return the value of the {@code viewId} field. */ - @NativeType("bgfx_view_id_t") - public short viewId() { return NVGLUFramebufferBGFX.nviewId(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGPaint.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NVGPaint.java deleted file mode 100644 index f5c64651..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGPaint.java +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A NanoVG paint. - * - *

    Layout

    - * - *
    
    - * struct NVGpaint {
    - *     float {@link #xform}[6];
    - *     float {@link #extent}[2];
    - *     float {@link #radius};
    - *     float {@link #feather};
    - *     {@link NVGColor NVGcolor} {@link #innerColor};
    - *     {@link NVGColor NVGcolor} {@link #outerColor};
    - *     int {@link #image};
    - * }
    - */ -@NativeType("struct NVGpaint") -public class NVGPaint extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - XFORM, - EXTENT, - RADIUS, - FEATHER, - INNERCOLOR, - OUTERCOLOR, - IMAGE; - - static { - Layout layout = __struct( - __array(4, 6), - __array(4, 2), - __member(4), - __member(4), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(NVGColor.SIZEOF, NVGColor.ALIGNOF), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - XFORM = layout.offsetof(0); - EXTENT = layout.offsetof(1); - RADIUS = layout.offsetof(2); - FEATHER = layout.offsetof(3); - INNERCOLOR = layout.offsetof(4); - OUTERCOLOR = layout.offsetof(5); - IMAGE = layout.offsetof(6); - } - - protected NVGPaint(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NVGPaint create(long address, @Nullable ByteBuffer container) { - return new NVGPaint(address, container); - } - - /** - * Creates a {@code NVGPaint} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NVGPaint(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the transformation matrix */ - @NativeType("float[6]") - public FloatBuffer xform() { return nxform(address()); } - /** the transformation matrix */ - public float xform(int index) { return nxform(address(), index); } - /** the extent */ - @NativeType("float[2]") - public FloatBuffer extent() { return nextent(address()); } - /** the extent */ - public float extent(int index) { return nextent(address(), index); } - /** the radius */ - public float radius() { return nradius(address()); } - /** the feather amount */ - public float feather() { return nfeather(address()); } - /** the inner color */ - @NativeType("NVGcolor") - public NVGColor innerColor() { return ninnerColor(address()); } - /** the outer color */ - @NativeType("NVGcolor") - public NVGColor outerColor() { return nouterColor(address()); } - /** the image handle */ - public int image() { return nimage(address()); } - - /** Copies the specified {@link FloatBuffer} to the {@link #xform} field. */ - public NVGPaint xform(@NativeType("float[6]") FloatBuffer value) { nxform(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #xform} field. */ - public NVGPaint xform(int index, float value) { nxform(address(), index, value); return this; } - /** Copies the specified {@link FloatBuffer} to the {@link #extent} field. */ - public NVGPaint extent(@NativeType("float[2]") FloatBuffer value) { nextent(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #extent} field. */ - public NVGPaint extent(int index, float value) { nextent(address(), index, value); return this; } - /** Sets the specified value to the {@link #radius} field. */ - public NVGPaint radius(float value) { nradius(address(), value); return this; } - /** Sets the specified value to the {@link #feather} field. */ - public NVGPaint feather(float value) { nfeather(address(), value); return this; } - /** Copies the specified {@link NVGColor} to the {@link #innerColor} field. */ - public NVGPaint innerColor(@NativeType("NVGcolor") NVGColor value) { ninnerColor(address(), value); return this; } - /** Passes the {@link #innerColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public NVGPaint innerColor(java.util.function.Consumer consumer) { consumer.accept(innerColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link #outerColor} field. */ - public NVGPaint outerColor(@NativeType("NVGcolor") NVGColor value) { nouterColor(address(), value); return this; } - /** Passes the {@link #outerColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public NVGPaint outerColor(java.util.function.Consumer consumer) { consumer.accept(outerColor()); return this; } - /** Sets the specified value to the {@link #image} field. */ - public NVGPaint image(int value) { nimage(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public NVGPaint set( - FloatBuffer xform, - FloatBuffer extent, - float radius, - float feather, - NVGColor innerColor, - NVGColor outerColor, - int image - ) { - xform(xform); - extent(extent); - radius(radius); - feather(feather); - innerColor(innerColor); - outerColor(outerColor); - image(image); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public NVGPaint set(NVGPaint src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code NVGPaint} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static NVGPaint malloc() { - return new NVGPaint(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code NVGPaint} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static NVGPaint calloc() { - return new NVGPaint(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code NVGPaint} instance allocated with {@link BufferUtils}. */ - public static NVGPaint create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new NVGPaint(memAddress(container), container); - } - - /** Returns a new {@code NVGPaint} instance for the specified memory address. */ - public static NVGPaint create(long address) { - return new NVGPaint(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NVGPaint createSafe(long address) { - return address == NULL ? null : new NVGPaint(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGPaint mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGPaint callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGPaint mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGPaint callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code NVGPaint} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static NVGPaint malloc(MemoryStack stack) { - return new NVGPaint(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code NVGPaint} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static NVGPaint calloc(MemoryStack stack) { - return new NVGPaint(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #xform}. */ - public static FloatBuffer nxform(long struct) { return memFloatBuffer(struct + NVGPaint.XFORM, 6); } - /** Unsafe version of {@link #xform(int) xform}. */ - public static float nxform(long struct, int index) { - return UNSAFE.getFloat(null, struct + NVGPaint.XFORM + check(index, 6) * 4); - } - /** Unsafe version of {@link #extent}. */ - public static FloatBuffer nextent(long struct) { return memFloatBuffer(struct + NVGPaint.EXTENT, 2); } - /** Unsafe version of {@link #extent(int) extent}. */ - public static float nextent(long struct, int index) { - return UNSAFE.getFloat(null, struct + NVGPaint.EXTENT + check(index, 2) * 4); - } - /** Unsafe version of {@link #radius}. */ - public static float nradius(long struct) { return UNSAFE.getFloat(null, struct + NVGPaint.RADIUS); } - /** Unsafe version of {@link #feather}. */ - public static float nfeather(long struct) { return UNSAFE.getFloat(null, struct + NVGPaint.FEATHER); } - /** Unsafe version of {@link #innerColor}. */ - public static NVGColor ninnerColor(long struct) { return NVGColor.create(struct + NVGPaint.INNERCOLOR); } - /** Unsafe version of {@link #outerColor}. */ - public static NVGColor nouterColor(long struct) { return NVGColor.create(struct + NVGPaint.OUTERCOLOR); } - /** Unsafe version of {@link #image}. */ - public static int nimage(long struct) { return UNSAFE.getInt(null, struct + NVGPaint.IMAGE); } - - /** Unsafe version of {@link #xform(FloatBuffer) xform}. */ - public static void nxform(long struct, FloatBuffer value) { - if (CHECKS) { checkGT(value, 6); } - memCopy(memAddress(value), struct + NVGPaint.XFORM, value.remaining() * 4); - } - /** Unsafe version of {@link #xform(int, float) xform}. */ - public static void nxform(long struct, int index, float value) { - UNSAFE.putFloat(null, struct + NVGPaint.XFORM + check(index, 6) * 4, value); - } - /** Unsafe version of {@link #extent(FloatBuffer) extent}. */ - public static void nextent(long struct, FloatBuffer value) { - if (CHECKS) { checkGT(value, 2); } - memCopy(memAddress(value), struct + NVGPaint.EXTENT, value.remaining() * 4); - } - /** Unsafe version of {@link #extent(int, float) extent}. */ - public static void nextent(long struct, int index, float value) { - UNSAFE.putFloat(null, struct + NVGPaint.EXTENT + check(index, 2) * 4, value); - } - /** Unsafe version of {@link #radius(float) radius}. */ - public static void nradius(long struct, float value) { UNSAFE.putFloat(null, struct + NVGPaint.RADIUS, value); } - /** Unsafe version of {@link #feather(float) feather}. */ - public static void nfeather(long struct, float value) { UNSAFE.putFloat(null, struct + NVGPaint.FEATHER, value); } - /** Unsafe version of {@link #innerColor(NVGColor) innerColor}. */ - public static void ninnerColor(long struct, NVGColor value) { memCopy(value.address(), struct + NVGPaint.INNERCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #outerColor(NVGColor) outerColor}. */ - public static void nouterColor(long struct, NVGColor value) { memCopy(value.address(), struct + NVGPaint.OUTERCOLOR, NVGColor.SIZEOF); } - /** Unsafe version of {@link #image(int) image}. */ - public static void nimage(long struct, int value) { UNSAFE.putInt(null, struct + NVGPaint.IMAGE, value); } - - // ----------------------------------- - - /** An array of {@link NVGPaint} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final NVGPaint ELEMENT_FACTORY = NVGPaint.create(-1L); - - /** - * Creates a new {@code NVGPaint.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NVGPaint#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NVGPaint getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FloatBuffer} view of the {@link NVGPaint#xform} field. */ - @NativeType("float[6]") - public FloatBuffer xform() { return NVGPaint.nxform(address()); } - /** @return the value at the specified index of the {@link NVGPaint#xform} field. */ - public float xform(int index) { return NVGPaint.nxform(address(), index); } - /** @return a {@link FloatBuffer} view of the {@link NVGPaint#extent} field. */ - @NativeType("float[2]") - public FloatBuffer extent() { return NVGPaint.nextent(address()); } - /** @return the value at the specified index of the {@link NVGPaint#extent} field. */ - public float extent(int index) { return NVGPaint.nextent(address(), index); } - /** @return the value of the {@link NVGPaint#radius} field. */ - public float radius() { return NVGPaint.nradius(address()); } - /** @return the value of the {@link NVGPaint#feather} field. */ - public float feather() { return NVGPaint.nfeather(address()); } - /** @return a {@link NVGColor} view of the {@link NVGPaint#innerColor} field. */ - @NativeType("NVGcolor") - public NVGColor innerColor() { return NVGPaint.ninnerColor(address()); } - /** @return a {@link NVGColor} view of the {@link NVGPaint#outerColor} field. */ - @NativeType("NVGcolor") - public NVGColor outerColor() { return NVGPaint.nouterColor(address()); } - /** @return the value of the {@link NVGPaint#image} field. */ - public int image() { return NVGPaint.nimage(address()); } - - /** Copies the specified {@link FloatBuffer} to the {@link NVGPaint#xform} field. */ - public Buffer xform(@NativeType("float[6]") FloatBuffer value) { NVGPaint.nxform(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link NVGPaint#xform} field. */ - public Buffer xform(int index, float value) { NVGPaint.nxform(address(), index, value); return this; } - /** Copies the specified {@link FloatBuffer} to the {@link NVGPaint#extent} field. */ - public Buffer extent(@NativeType("float[2]") FloatBuffer value) { NVGPaint.nextent(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link NVGPaint#extent} field. */ - public Buffer extent(int index, float value) { NVGPaint.nextent(address(), index, value); return this; } - /** Sets the specified value to the {@link NVGPaint#radius} field. */ - public Buffer radius(float value) { NVGPaint.nradius(address(), value); return this; } - /** Sets the specified value to the {@link NVGPaint#feather} field. */ - public Buffer feather(float value) { NVGPaint.nfeather(address(), value); return this; } - /** Copies the specified {@link NVGColor} to the {@link NVGPaint#innerColor} field. */ - public Buffer innerColor(@NativeType("NVGcolor") NVGColor value) { NVGPaint.ninnerColor(address(), value); return this; } - /** Passes the {@link NVGPaint#innerColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer innerColor(java.util.function.Consumer consumer) { consumer.accept(innerColor()); return this; } - /** Copies the specified {@link NVGColor} to the {@link NVGPaint#outerColor} field. */ - public Buffer outerColor(@NativeType("NVGcolor") NVGColor value) { NVGPaint.nouterColor(address(), value); return this; } - /** Passes the {@link NVGPaint#outerColor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer outerColor(java.util.function.Consumer consumer) { consumer.accept(outerColor()); return this; } - /** Sets the specified value to the {@link NVGPaint#image} field. */ - public Buffer image(int value) { NVGPaint.nimage(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGTextRow.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NVGTextRow.java deleted file mode 100644 index 1ae51e87..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NVGTextRow.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A text row. - * - *

    Layout

    - * - *
    
    - * struct NVGtextRow {
    - *     char * {@link #start};
    - *     char * {@link #end};
    - *     char * {@link #next};
    - *     float {@link #width};
    - *     float {@link #minx};
    - *     float {@link #maxx};
    - * }
    - */ -@NativeType("struct NVGtextRow") -public class NVGTextRow extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - START, - END, - NEXT, - WIDTH, - MINX, - MAXX; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - START = layout.offsetof(0); - END = layout.offsetof(1); - NEXT = layout.offsetof(2); - WIDTH = layout.offsetof(3); - MINX = layout.offsetof(4); - MAXX = layout.offsetof(5); - } - - protected NVGTextRow(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected NVGTextRow create(long address, @Nullable ByteBuffer container) { - return new NVGTextRow(address, container); - } - - /** - * Creates a {@code NVGTextRow} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public NVGTextRow(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** pointer to the input text where the row starts */ - @NativeType("char *") - public long start() { return nstart(address()); } - /** pointer to the input text where the row ends (one past the last character */ - @NativeType("char *") - public long end() { return nend(address()); } - /** pointer to the beginning of the next row */ - @NativeType("char *") - public long next() { return nnext(address()); } - /** logical width of the row */ - public float width() { return nwidth(address()); } - /** actual left bound of the row. Logical width and bounds can differ because of kerning and some parts over extending. */ - public float minx() { return nminx(address()); } - /** actual right bound of the row. Logical width and bounds can differ because of kerning and some parts over extending. */ - public float maxx() { return nmaxx(address()); } - - // ----------------------------------- - - /** Returns a new {@code NVGTextRow} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static NVGTextRow malloc() { - return new NVGTextRow(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code NVGTextRow} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static NVGTextRow calloc() { - return new NVGTextRow(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code NVGTextRow} instance allocated with {@link BufferUtils}. */ - public static NVGTextRow create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new NVGTextRow(memAddress(container), container); - } - - /** Returns a new {@code NVGTextRow} instance for the specified memory address. */ - public static NVGTextRow create(long address) { - return new NVGTextRow(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static NVGTextRow createSafe(long address) { - return address == NULL ? null : new NVGTextRow(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGTextRow mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGTextRow callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static NVGTextRow mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static NVGTextRow callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code NVGTextRow} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static NVGTextRow malloc(MemoryStack stack) { - return new NVGTextRow(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code NVGTextRow} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static NVGTextRow calloc(MemoryStack stack) { - return new NVGTextRow(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #start}. */ - public static long nstart(long struct) { return memGetAddress(struct + NVGTextRow.START); } - /** Unsafe version of {@link #end}. */ - public static long nend(long struct) { return memGetAddress(struct + NVGTextRow.END); } - /** Unsafe version of {@link #next}. */ - public static long nnext(long struct) { return memGetAddress(struct + NVGTextRow.NEXT); } - /** Unsafe version of {@link #width}. */ - public static float nwidth(long struct) { return UNSAFE.getFloat(null, struct + NVGTextRow.WIDTH); } - /** Unsafe version of {@link #minx}. */ - public static float nminx(long struct) { return UNSAFE.getFloat(null, struct + NVGTextRow.MINX); } - /** Unsafe version of {@link #maxx}. */ - public static float nmaxx(long struct) { return UNSAFE.getFloat(null, struct + NVGTextRow.MAXX); } - - // ----------------------------------- - - /** An array of {@link NVGTextRow} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final NVGTextRow ELEMENT_FACTORY = NVGTextRow.create(-1L); - - /** - * Creates a new {@code NVGTextRow.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link NVGTextRow#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected NVGTextRow getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link NVGTextRow#start} field. */ - @NativeType("char *") - public long start() { return NVGTextRow.nstart(address()); } - /** @return the value of the {@link NVGTextRow#end} field. */ - @NativeType("char *") - public long end() { return NVGTextRow.nend(address()); } - /** @return the value of the {@link NVGTextRow#next} field. */ - @NativeType("char *") - public long next() { return NVGTextRow.nnext(address()); } - /** @return the value of the {@link NVGTextRow#width} field. */ - public float width() { return NVGTextRow.nwidth(address()); } - /** @return the value of the {@link NVGTextRow#minx} field. */ - public float minx() { return NVGTextRow.nminx(address()); } - /** @return the value of the {@link NVGTextRow#maxx} field. */ - public float maxx() { return NVGTextRow.nmaxx(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoSVG.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoSVG.java deleted file mode 100644 index a44b85bb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoSVG.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes. - * - *

    The library suits well for anything from rendering scalable icons in your editor application to prototyping a game.

    - * - *

    NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request!

    - * - *

    The shapes in the SVG images are transformed by the viewBox and converted to specified units. That is, you should get the same looking data as your - * designed in your favorite app.

    - * - *

    NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose to get the paths in pixels, or if you - * are feeding the data into a CNC-cutter, you may want to use millimeters.

    - * - *

    The units passed to NanoSVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'. DPI (dots-per-inch) controls how the unit conversion is done.

    - * - *

    If you don't know or care about the units stuff, "px" and 96 should get you going.

    - */ -public class NanoSVG { - - static { LibNanoVG.initialize(); } - - /** - * NSVGpaintType - * - *
    Enum values:
    - * - *
      - *
    • {@link #NSVG_PAINT_UNDEF PAINT_UNDEF}
    • - *
    • {@link #NSVG_PAINT_NONE PAINT_NONE}
    • - *
    • {@link #NSVG_PAINT_COLOR PAINT_COLOR}
    • - *
    • {@link #NSVG_PAINT_LINEAR_GRADIENT PAINT_LINEAR_GRADIENT}
    • - *
    • {@link #NSVG_PAINT_RADIAL_GRADIENT PAINT_RADIAL_GRADIENT}
    • - *
    - */ - public static final int - NSVG_PAINT_UNDEF = -1, - NSVG_PAINT_NONE = 0, - NSVG_PAINT_COLOR = 1, - NSVG_PAINT_LINEAR_GRADIENT = 2, - NSVG_PAINT_RADIAL_GRADIENT = 3; - - /** - * NSVGspreadType - * - *
    Enum values:
    - * - *
      - *
    • {@link #NSVG_SPREAD_PAD SPREAD_PAD}
    • - *
    • {@link #NSVG_SPREAD_REFLECT SPREAD_REFLECT}
    • - *
    • {@link #NSVG_SPREAD_REPEAT SPREAD_REPEAT}
    • - *
    - */ - public static final int - NSVG_SPREAD_PAD = 0, - NSVG_SPREAD_REFLECT = 1, - NSVG_SPREAD_REPEAT = 2; - - /** - * NSVGlineJoin - * - *
    Enum values:
    - * - *
      - *
    • {@link #NSVG_JOIN_MITER JOIN_MITER}
    • - *
    • {@link #NSVG_JOIN_ROUND JOIN_ROUND}
    • - *
    • {@link #NSVG_JOIN_BEVEL JOIN_BEVEL}
    • - *
    - */ - public static final int - NSVG_JOIN_MITER = 0, - NSVG_JOIN_ROUND = 1, - NSVG_JOIN_BEVEL = 2; - - /** - * NSVGlineCap - * - *
    Enum values:
    - * - *
      - *
    • {@link #NSVG_CAP_BUTT CAP_BUTT}
    • - *
    • {@link #NSVG_CAP_ROUND CAP_ROUND}
    • - *
    • {@link #NSVG_CAP_SQUARE CAP_SQUARE}
    • - *
    - */ - public static final int - NSVG_CAP_BUTT = 0, - NSVG_CAP_ROUND = 1, - NSVG_CAP_SQUARE = 2; - - /** - * NSVGfillRule - * - *
    Enum values:
    - * - *
      - *
    • {@link #NSVG_FILLRULE_NONZERO FILLRULE_NONZERO}
    • - *
    • {@link #NSVG_FILLRULE_EVENODD FILLRULE_EVENODD}
    • - *
    - */ - public static final int - NSVG_FILLRULE_NONZERO = 0, - NSVG_FILLRULE_EVENODD = 1; - - /** NSVGflags */ - public static final int NSVG_FLAGS_VISIBLE = 0x01; - - protected NanoSVG() { - throw new UnsupportedOperationException(); - } - - // --- [ nsvgParseFromFile ] --- - - /** Unsafe version of: {@link #nsvgParseFromFile ParseFromFile} */ - public static native long nnsvgParseFromFile(long filename, long units, float dpi); - - /** Parses SVG file from a file, returns SVG image as paths. */ - @Nullable - @NativeType("NSVGimage *") - public static NSVGImage nsvgParseFromFile(@NativeType("char const *") ByteBuffer filename, @NativeType("char const *") ByteBuffer units, float dpi) { - if (CHECKS) { - checkNT1(filename); - checkNT1(units); - } - long __result = nnsvgParseFromFile(memAddress(filename), memAddress(units), dpi); - return NSVGImage.createSafe(__result); - } - - /** Parses SVG file from a file, returns SVG image as paths. */ - @Nullable - @NativeType("NSVGimage *") - public static NSVGImage nsvgParseFromFile(@NativeType("char const *") CharSequence filename, @NativeType("char const *") CharSequence units, float dpi) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - stack.nASCII(units, true); - long unitsEncoded = stack.getPointerAddress(); - long __result = nnsvgParseFromFile(filenameEncoded, unitsEncoded, dpi); - return NSVGImage.createSafe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nsvgParse ] --- - - /** Unsafe version of: {@link #nsvgParse Parse} */ - public static native long nnsvgParse(long input, long units, float dpi); - - /** - * Parses SVG file from a null terminated string, returns SVG image as paths. - * - *

    Important note: changes the string.

    - */ - @Nullable - @NativeType("NSVGimage *") - public static NSVGImage nsvgParse(@NativeType("char *") ByteBuffer input, @NativeType("char const *") ByteBuffer units, float dpi) { - if (CHECKS) { - checkNT1(input); - checkNT1(units); - } - long __result = nnsvgParse(memAddress(input), memAddress(units), dpi); - return NSVGImage.createSafe(__result); - } - - /** - * Parses SVG file from a null terminated string, returns SVG image as paths. - * - *

    Important note: changes the string.

    - */ - @Nullable - @NativeType("NSVGimage *") - public static NSVGImage nsvgParse(@NativeType("char *") CharSequence input, @NativeType("char const *") CharSequence units, float dpi) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(input, true); - long inputEncoded = stack.getPointerAddress(); - stack.nASCII(units, true); - long unitsEncoded = stack.getPointerAddress(); - long __result = nnsvgParse(inputEncoded, unitsEncoded, dpi); - return NSVGImage.createSafe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nsvgDuplicatePath ] --- - - /** Unsafe version of: {@link #nsvgDuplicatePath DuplicatePath} */ - public static native long nnsvgDuplicatePath(long p); - - /** Duplicates a path. */ - @Nullable - @NativeType("NSVGpath *") - public static NSVGPath nsvgDuplicatePath(@NativeType("NSVGpath *") NSVGPath p) { - long __result = nnsvgDuplicatePath(p.address()); - return NSVGPath.createSafe(__result); - } - - // --- [ nsvgDelete ] --- - - /** Unsafe version of: {@link #nsvgDelete Delete} */ - public static native void nnsvgDelete(long image); - - /** Deletes an image. */ - public static void nsvgDelete(@NativeType("NSVGimage *") NSVGImage image) { - nnsvgDelete(image.address()); - } - - // --- [ nsvgCreateRasterizer ] --- - - /** Allocates rasterizer context. */ - @NativeType("NSVGrasterizer *") - public static native long nsvgCreateRasterizer(); - - // --- [ nsvgRasterize ] --- - - /** Unsafe version of: {@link #nsvgRasterize Rasterize} */ - public static native void nnsvgRasterize(long r, long image, float tx, float ty, float scale, long dst, int w, int h, int stride); - - /** - * Rasterizes SVG image, returns RGBA image (non-premultiplied alpha). - * - * @param r pointer to rasterizer context - * @param image pointer to image to rasterize - * @param tx image x offset (applied after scaling) - * @param ty image y offset (applied after scaling) - * @param scale image scale - * @param dst pointer to destination image data, 4 bytes per pixel (RGBA) - * @param w width of the image to render - * @param h height of the image to render - * @param stride number of bytes per scaleline in the destination buffer - */ - public static void nsvgRasterize(@NativeType("NSVGrasterizer *") long r, @NativeType("NSVGimage *") NSVGImage image, float tx, float ty, float scale, @NativeType("unsigned char *") ByteBuffer dst, int w, int h, int stride) { - if (CHECKS) { - check(r); - check(dst, h * stride); - } - nnsvgRasterize(r, image.address(), tx, ty, scale, memAddress(dst), w, h, stride); - } - - // --- [ nsvgDeleteRasterizer ] --- - - /** Unsafe version of: {@link #nsvgDeleteRasterizer DeleteRasterizer} */ - public static native void nnsvgDeleteRasterizer(long rasterizer); - - /** - * Deletes rasterizer context. - * - * @param rasterizer the rasterizer context to delete - */ - public static void nsvgDeleteRasterizer(@NativeType("NSVGrasterizer *") long rasterizer) { - if (CHECKS) { - check(rasterizer); - } - nnsvgDeleteRasterizer(rasterizer); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVG.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVG.java deleted file mode 100644 index 9f69d959..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVG.java +++ /dev/null @@ -1,2923 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * NanoVG is a small antialiased vector graphics rendering library for OpenGL. It has lean API modeled after HTML5 canvas API. It is aimed to be a - * practical and fun toolset for building scalable user interfaces and visualizations. - * - *

    Color utils

    - * - *

    Colors in NanoVG are stored as unsigned ints in ABGR format.

    - * - *

    State Handling

    - * - *

    NanoVG contains state which represents how paths will be rendered. The state contains transform, fill and stroke styles, text and font styles, and - * scissor clipping.

    - * - *

    Render styles

    - * - *

    Fill and stroke render style can be either a solid color or a paint which is a gradient or a pattern. Solid color is simply defined as a color value, - * different kinds of paints can be created using {@link #nvgLinearGradient LinearGradient}, {@link #nvgBoxGradient BoxGradient}, {@link #nvgRadialGradient RadialGradient} and {@link #nvgImagePattern ImagePattern}.

    - * - *

    Current render style can be saved and restored using {@link #nvgSave Save} and {@link #nvgRestore Restore}.

    - * - *

    Transforms

    - * - *

    The paths, gradients, patterns and scissor region are transformed by an transformation matrix at the time when they are passed to the API. The current - * transformation matrix is a affine matrix:

    - * - *
    
    - * [sx kx tx]
    - * [ky sy ty]
    - * [ 0  0  1]
    - * - *

    Where: {@code sx,sy} define scaling, {@code kx,ky} skewing, and {@code tx,ty} translation. The last row is assumed to be {@code 0,0,1} and is not - * stored.

    - * - *

    Apart from {@link #nvgResetTransform ResetTransform}, each transformation function first creates specific transformation matrix and pre-multiplies the current transformation - * by it.

    - * - *

    Current coordinate system (transformation) can be saved and restored using {@link #nvgSave Save} and {@link #nvgRestore Restore}.

    - * - *

    Images

    - * - *

    NanoVG allows you to load jpg, png, psd, tga, pic and gif files to be used for rendering. In addition you can upload your own image. The image loading - * is provided by {@code stb_image}.

    - * - *

    Paints

    - * - *

    NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern. These can be used as paints for strokes and - * fills.

    - * - *

    Scissoring

    - * - *

    Scissoring allows you to clip the rendering into a rectangle. This is useful for various user interface cases like rendering a text edit or a timeline.

    - * - *

    Paths

    - * - *

    Drawing a new shape starts with {@link #nvgBeginPath BeginPath}, it clears all the currently defined paths. Then you define one or more paths and sub-paths which describe - * the shape. The are functions to draw common shapes like rectangles and circles, and lower level step-by-step functions, which allow to define a path - * curve by curve.

    - * - *

    NanoVG uses even-odd fill rule to draw the shapes. Solid shapes should have counter clockwise winding and holes should have counter clockwise order. To - * specify winding of a path you can call {@link #nvgPathWinding PathWinding}. This is useful especially for the common shapes, which are drawn {@link #NVG_CCW CCW}.

    - * - *

    Finally you can fill the path using current fill style by calling {@link #nvgFill Fill}, and stroke it with current stroke style by calling {@link #nvgStroke Stroke}.

    - * - *

    The curve segments and sub-paths are transformed by the current transform.

    - * - *

    Text

    - * - *

    NanoVG allows you to load .ttf files and use the font to render text.

    - * - *

    The appearance of the text can be defined by setting the current text style and by specifying the fill color. Common text and font settings such as - * font size, letter spacing and text align are supported. Font blur allows you to create simple text effects such as drop shadows.

    - * - *

    At render time the font face can be set based on the font handles or name.

    - * - *

    Font measure functions return values in local space, the calculations are carried in the same resolution as the final rendering. This is done because - * the text glyph positions are snapped to the nearest pixels sharp rendering.

    - * - *

    The local space means that values are not rotated or scale as per the current transformation. For example if you set font size to 12, which would mean - * that line height is 16, then regardless of the current scaling and rotation, the returned line height is always 16. Some measures may vary because of - * the scaling since aforementioned pixel snapping.

    - * - *

    While this may sound a little odd, the setup allows you to always render the same way regardless of scaling. I.e. following works regardless of scaling:

    - * - *
    
    - * const char* txt = "Text me up.";
    - * nvgTextBounds(vg, x,y, txt, NULL, bounds);
    - * nvgBeginPath(vg);
    - * nvgRoundedRect(vg, bounds[0],bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]);
    - * nvgFill(vg);
    - * - *

    Note: currently only solid color fill is supported for text.

    - */ -public class NanoVG { - - static { LibNanoVG.initialize(); } - - /** PI */ - public static final float NVG_PI = 3.1415927f; - - /** - * Winding order. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_CCW CCW} - Winding for solid shapes
    • - *
    • {@link #NVG_CW CW} - Winding for holes
    • - *
    - */ - public static final int - NVG_CCW = 0x1, - NVG_CW = 0x2; - - /** - * Solidity. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_SOLID SOLID} - CCW
    • - *
    • {@link #NVG_HOLE HOLE} - CW
    • - *
    - */ - public static final int - NVG_SOLID = 0x1, - NVG_HOLE = 0x2; - - /** - * Line caps and joins. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_BUTT BUTT}
    • - *
    • {@link #NVG_ROUND ROUND}
    • - *
    • {@link #NVG_SQUARE SQUARE}
    • - *
    • {@link #NVG_BEVEL BEVEL}
    • - *
    • {@link #NVG_MITER MITER}
    • - *
    - */ - public static final int - NVG_BUTT = 0, - NVG_ROUND = 1, - NVG_SQUARE = 2, - NVG_BEVEL = 3, - NVG_MITER = 4; - - /** - * Alignments. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_ALIGN_LEFT ALIGN_LEFT} - Default, align text horizontally to left.
    • - *
    • {@link #NVG_ALIGN_CENTER ALIGN_CENTER} - Align text horizontally to center.
    • - *
    • {@link #NVG_ALIGN_RIGHT ALIGN_RIGHT} - Align text horizontally to right.
    • - *
    • {@link #NVG_ALIGN_TOP ALIGN_TOP} - Align text vertically to top.
    • - *
    • {@link #NVG_ALIGN_MIDDLE ALIGN_MIDDLE} - Align text vertically to middle.
    • - *
    • {@link #NVG_ALIGN_BOTTOM ALIGN_BOTTOM} - Align text vertically to bottom.
    • - *
    • {@link #NVG_ALIGN_BASELINE ALIGN_BASELINE} - Default, align text vertically to baseline.
    • - *
    - */ - public static final int - NVG_ALIGN_LEFT = 1<<0, - NVG_ALIGN_CENTER = 1<<1, - NVG_ALIGN_RIGHT = 1<<2, - NVG_ALIGN_TOP = 1<<3, - NVG_ALIGN_MIDDLE = 1<<4, - NVG_ALIGN_BOTTOM = 1<<5, - NVG_ALIGN_BASELINE = 1<<6; - - /** - * Blend factors. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_ZERO ZERO}
    • - *
    • {@link #NVG_ONE ONE}
    • - *
    • {@link #NVG_SRC_COLOR SRC_COLOR}
    • - *
    • {@link #NVG_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}
    • - *
    • {@link #NVG_DST_COLOR DST_COLOR}
    • - *
    • {@link #NVG_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}
    • - *
    • {@link #NVG_SRC_ALPHA SRC_ALPHA}
    • - *
    • {@link #NVG_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}
    • - *
    • {@link #NVG_DST_ALPHA DST_ALPHA}
    • - *
    • {@link #NVG_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}
    • - *
    • {@link #NVG_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    • - *
    - */ - public static final int - NVG_ZERO = 1<<0, - NVG_ONE = 1<<1, - NVG_SRC_COLOR = 1<<2, - NVG_ONE_MINUS_SRC_COLOR = 1<<3, - NVG_DST_COLOR = 1<<4, - NVG_ONE_MINUS_DST_COLOR = 1<<5, - NVG_SRC_ALPHA = 1<<6, - NVG_ONE_MINUS_SRC_ALPHA = 1<<7, - NVG_DST_ALPHA = 1<<8, - NVG_ONE_MINUS_DST_ALPHA = 1<<9, - NVG_SRC_ALPHA_SATURATE = 1<<10; - - /** - * Composite operations. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_SOURCE_OVER SOURCE_OVER}
    • - *
    • {@link #NVG_SOURCE_IN SOURCE_IN}
    • - *
    • {@link #NVG_SOURCE_OUT SOURCE_OUT}
    • - *
    • {@link #NVG_ATOP ATOP}
    • - *
    • {@link #NVG_DESTINATION_OVER DESTINATION_OVER}
    • - *
    • {@link #NVG_DESTINATION_IN DESTINATION_IN}
    • - *
    • {@link #NVG_DESTINATION_OUT DESTINATION_OUT}
    • - *
    • {@link #NVG_DESTINATION_ATOP DESTINATION_ATOP}
    • - *
    • {@link #NVG_LIGHTER LIGHTER}
    • - *
    • {@link #NVG_COPY COPY}
    • - *
    • {@link #NVG_XOR XOR}
    • - *
    - */ - public static final int - NVG_SOURCE_OVER = 0, - NVG_SOURCE_IN = 1, - NVG_SOURCE_OUT = 2, - NVG_ATOP = 3, - NVG_DESTINATION_OVER = 4, - NVG_DESTINATION_IN = 5, - NVG_DESTINATION_OUT = 6, - NVG_DESTINATION_ATOP = 7, - NVG_LIGHTER = 8, - NVG_COPY = 9, - NVG_XOR = 10; - - /** - * Image flags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_IMAGE_GENERATE_MIPMAPS IMAGE_GENERATE_MIPMAPS} - Generate mipmaps during creation of the image.
    • - *
    • {@link #NVG_IMAGE_REPEATX IMAGE_REPEATX} - Repeat image in X direction.
    • - *
    • {@link #NVG_IMAGE_REPEATY IMAGE_REPEATY} - Repeat image in Y direction.
    • - *
    • {@link #NVG_IMAGE_FLIPY IMAGE_FLIPY} - Flips (inverses) image in Y direction when rendered.
    • - *
    • {@link #NVG_IMAGE_PREMULTIPLIED IMAGE_PREMULTIPLIED} - Image data has premultiplied alpha.
    • - *
    • {@link #NVG_IMAGE_NEAREST IMAGE_NEAREST} - Image interpolation is Nearest instead Linear.
    • - *
    - */ - public static final int - NVG_IMAGE_GENERATE_MIPMAPS = 1<<0, - NVG_IMAGE_REPEATX = 1<<1, - NVG_IMAGE_REPEATY = 1<<2, - NVG_IMAGE_FLIPY = 1<<3, - NVG_IMAGE_PREMULTIPLIED = 1<<4, - NVG_IMAGE_NEAREST = 1<<5; - - protected NanoVG() { - throw new UnsupportedOperationException(); - } - - // --- [ nvgBeginFrame ] --- - - /** Unsafe version of: {@link #nvgBeginFrame BeginFrame} */ - public static native void nnvgBeginFrame(long ctx, float windowWidth, float windowHeight, float devicePixelRatio); - - /** - * Begins drawing a new frame. - * - *

    Calls to nanovg drawing API should be wrapped in {@link #nvgBeginFrame BeginFrame} & {@link #nvgEndFrame EndFrame}. {@link #nvgBeginFrame BeginFrame} defines the size of the window to render to in relation - * currently set viewport (i.e. {@code glViewport} on GL backends). Device pixel ration allows to control the rendering on Hi-DPI devices. For example, - * GLFW returns two dimension for an opened window: window size and frame buffer size. In that case you would set {@code windowWidth/Height} to the window - * size {@code devicePixelRatio} to: {@code frameBufferWidth / windowWidth}.

    - * - * @param ctx the NanoVG context - * @param windowWidth the window width - * @param windowHeight the window height - * @param devicePixelRatio the device pixel ratio - */ - public static void nvgBeginFrame(@NativeType("NVGcontext *") long ctx, float windowWidth, float windowHeight, float devicePixelRatio) { - if (CHECKS) { - check(ctx); - } - nnvgBeginFrame(ctx, windowWidth, windowHeight, devicePixelRatio); - } - - // --- [ nvgCancelFrame ] --- - - /** Unsafe version of: {@link #nvgCancelFrame CancelFrame} */ - public static native void nnvgCancelFrame(long ctx); - - /** - * Cancels drawing the current frame. - * - * @param ctx the NanoVG context - */ - public static void nvgCancelFrame(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgCancelFrame(ctx); - } - - // --- [ nvgEndFrame ] --- - - /** Unsafe version of: {@link #nvgEndFrame EndFrame} */ - public static native void nnvgEndFrame(long ctx); - - /** - * Ends drawing flushing remaining render state. - * - * @param ctx the NanoVG context - */ - public static void nvgEndFrame(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgEndFrame(ctx); - } - - // --- [ nvgGlobalCompositeOperation ] --- - - /** Unsafe version of: {@link #nvgGlobalCompositeOperation GlobalCompositeOperation} */ - public static native void nnvgGlobalCompositeOperation(long ctx, int op); - - /** - * Sets the composite operation. - * - * @param ctx the NanoVG context - * @param op the composite operation. One of:
    {@link #NVG_SOURCE_OVER SOURCE_OVER}{@link #NVG_SOURCE_IN SOURCE_IN}{@link #NVG_SOURCE_OUT SOURCE_OUT}{@link #NVG_ATOP ATOP}{@link #NVG_DESTINATION_OVER DESTINATION_OVER}{@link #NVG_DESTINATION_IN DESTINATION_IN}{@link #NVG_DESTINATION_OUT DESTINATION_OUT}{@link #NVG_DESTINATION_ATOP DESTINATION_ATOP}
    {@link #NVG_LIGHTER LIGHTER}{@link #NVG_COPY COPY}{@link #NVG_XOR XOR}
    - */ - public static void nvgGlobalCompositeOperation(@NativeType("NVGcontext *") long ctx, int op) { - if (CHECKS) { - check(ctx); - } - nnvgGlobalCompositeOperation(ctx, op); - } - - // --- [ nvgGlobalCompositeBlendFunc ] --- - - /** Unsafe version of: {@link #nvgGlobalCompositeBlendFunc GlobalCompositeBlendFunc} */ - public static native void nnvgGlobalCompositeBlendFunc(long ctx, int sfactor, int dfactor); - - /** - * Sets the composite operation with custom pixel arithmetic. - * - * @param ctx the NanoVG context - * @param sfactor the source blend factor. One of:
    {@link #NVG_ZERO ZERO}{@link #NVG_ONE ONE}{@link #NVG_SRC_COLOR SRC_COLOR}{@link #NVG_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link #NVG_DST_COLOR DST_COLOR}{@link #NVG_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}
    {@link #NVG_SRC_ALPHA SRC_ALPHA}{@link #NVG_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link #NVG_DST_ALPHA DST_ALPHA}{@link #NVG_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}{@link #NVG_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    - * @param dfactor the destination blend factor. One of:
    {@link #NVG_ZERO ZERO}{@link #NVG_ONE ONE}{@link #NVG_SRC_COLOR SRC_COLOR}{@link #NVG_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link #NVG_DST_COLOR DST_COLOR}{@link #NVG_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}
    {@link #NVG_SRC_ALPHA SRC_ALPHA}{@link #NVG_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link #NVG_DST_ALPHA DST_ALPHA}{@link #NVG_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}{@link #NVG_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    - */ - public static void nvgGlobalCompositeBlendFunc(@NativeType("NVGcontext *") long ctx, int sfactor, int dfactor) { - if (CHECKS) { - check(ctx); - } - nnvgGlobalCompositeBlendFunc(ctx, sfactor, dfactor); - } - - // --- [ nvgGlobalCompositeBlendFuncSeparate ] --- - - /** Unsafe version of: {@link #nvgGlobalCompositeBlendFuncSeparate GlobalCompositeBlendFuncSeparate} */ - public static native void nnvgGlobalCompositeBlendFuncSeparate(long ctx, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha); - - /** - * Sets the composite operation with custom pixel arithmetic for RGB and alpha components separately. - * - * @param ctx the NanoVG context - * @param srcRGB the source RGB blend factor. One of:
    {@link #NVG_ZERO ZERO}{@link #NVG_ONE ONE}{@link #NVG_SRC_COLOR SRC_COLOR}{@link #NVG_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link #NVG_DST_COLOR DST_COLOR}{@link #NVG_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}
    {@link #NVG_SRC_ALPHA SRC_ALPHA}{@link #NVG_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link #NVG_DST_ALPHA DST_ALPHA}{@link #NVG_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}{@link #NVG_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    - * @param dstRGB the destination RGB blend factor. One of:
    {@link #NVG_ZERO ZERO}{@link #NVG_ONE ONE}{@link #NVG_SRC_COLOR SRC_COLOR}{@link #NVG_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link #NVG_DST_COLOR DST_COLOR}{@link #NVG_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}
    {@link #NVG_SRC_ALPHA SRC_ALPHA}{@link #NVG_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link #NVG_DST_ALPHA DST_ALPHA}{@link #NVG_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}{@link #NVG_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    - * @param srcAlpha the source alpha blend factor. One of:
    {@link #NVG_ZERO ZERO}{@link #NVG_ONE ONE}{@link #NVG_SRC_COLOR SRC_COLOR}{@link #NVG_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link #NVG_DST_COLOR DST_COLOR}{@link #NVG_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}
    {@link #NVG_SRC_ALPHA SRC_ALPHA}{@link #NVG_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link #NVG_DST_ALPHA DST_ALPHA}{@link #NVG_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}{@link #NVG_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    - * @param dstAlpha the destination alpha blend factor. One of:
    {@link #NVG_ZERO ZERO}{@link #NVG_ONE ONE}{@link #NVG_SRC_COLOR SRC_COLOR}{@link #NVG_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link #NVG_DST_COLOR DST_COLOR}{@link #NVG_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}
    {@link #NVG_SRC_ALPHA SRC_ALPHA}{@link #NVG_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link #NVG_DST_ALPHA DST_ALPHA}{@link #NVG_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}{@link #NVG_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    - */ - public static void nvgGlobalCompositeBlendFuncSeparate(@NativeType("NVGcontext *") long ctx, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { - if (CHECKS) { - check(ctx); - } - nnvgGlobalCompositeBlendFuncSeparate(ctx, srcRGB, dstRGB, srcAlpha, dstAlpha); - } - - // --- [ nvgRGB ] --- - - /** Unsafe version of: {@link #nvgRGB RGB} */ - public static native void nnvgRGB(byte r, byte g, byte b, long __result); - - /** - * Returns a color value from red, green, blue values. Alpha will be set to 255 (1.0f). - * - * @param r the red value - * @param g the green value - * @param b the blue value - */ - @NativeType("NVGcolor") - public static NVGColor nvgRGB(@NativeType("unsigned char") byte r, @NativeType("unsigned char") byte g, @NativeType("unsigned char") byte b, @NativeType("NVGcolor") NVGColor __result) { - nnvgRGB(r, g, b, __result.address()); - return __result; - } - - // --- [ nvgRGBf ] --- - - /** Unsafe version of: {@link #nvgRGBf RGBf} */ - public static native void nnvgRGBf(float r, float g, float b, long __result); - - /** - * Returns a color value from red, green, blue values. Alpha will be set to 1.0f. - * - * @param r the red value - * @param g the green value - * @param b the blue value - */ - @NativeType("NVGcolor") - public static NVGColor nvgRGBf(float r, float g, float b, @NativeType("NVGcolor") NVGColor __result) { - nnvgRGBf(r, g, b, __result.address()); - return __result; - } - - // --- [ nvgRGBA ] --- - - /** Unsafe version of: {@link #nvgRGBA RGBA} */ - public static native void nnvgRGBA(byte r, byte g, byte b, byte a, long __result); - - /** - * Returns a color value from red, green, blue and alpha values. - * - * @param r the red value - * @param g the green value - * @param b the blue value - * @param a the alpha value - */ - @NativeType("NVGcolor") - public static NVGColor nvgRGBA(@NativeType("unsigned char") byte r, @NativeType("unsigned char") byte g, @NativeType("unsigned char") byte b, @NativeType("unsigned char") byte a, @NativeType("NVGcolor") NVGColor __result) { - nnvgRGBA(r, g, b, a, __result.address()); - return __result; - } - - // --- [ nvgRGBAf ] --- - - /** Unsafe version of: {@link #nvgRGBAf RGBAf} */ - public static native void nnvgRGBAf(float r, float g, float b, float a, long __result); - - /** - * Returns a color value from red, green, blue and alpha values. - * - * @param r the red value - * @param g the green value - * @param b the blue value - * @param a the alpha value - */ - @NativeType("NVGcolor") - public static NVGColor nvgRGBAf(float r, float g, float b, float a, @NativeType("NVGcolor") NVGColor __result) { - nnvgRGBAf(r, g, b, a, __result.address()); - return __result; - } - - // --- [ nvgLerpRGBA ] --- - - /** Unsafe version of: {@link #nvgLerpRGBA LerpRGBA} */ - public static native void nnvgLerpRGBA(long c0, long c1, float u, long __result); - - /** - * Linearly interpolates from color {@code c0} to {@code c1}, and returns resulting color value. - * - * @param c0 the first color - * @param c1 the second color - * @param u the interpolation factor - */ - @NativeType("NVGcolor") - public static NVGColor nvgLerpRGBA(@NativeType("NVGcolor") NVGColor c0, @NativeType("NVGcolor") NVGColor c1, float u, @NativeType("NVGcolor") NVGColor __result) { - nnvgLerpRGBA(c0.address(), c1.address(), u, __result.address()); - return __result; - } - - // --- [ nvgTransRGBA ] --- - - /** Unsafe version of: {@link #nvgTransRGBA TransRGBA} */ - public static native void nnvgTransRGBA(long c0, byte a, long __result); - - /** - * Sets transparency of a color value. - * - * @param c0 the color - * @param a the alpha value - */ - @NativeType("NVGcolor") - public static NVGColor nvgTransRGBA(@NativeType("NVGcolor") NVGColor c0, @NativeType("unsigned char") byte a, @NativeType("NVGcolor") NVGColor __result) { - nnvgTransRGBA(c0.address(), a, __result.address()); - return __result; - } - - // --- [ nvgTransRGBAf ] --- - - /** Unsafe version of: {@link #nvgTransRGBAf TransRGBAf} */ - public static native void nnvgTransRGBAf(long c0, float a, long __result); - - /** - * Sets transparency of a color value. - * - * @param c0 the color - * @param a the alpha value - */ - @NativeType("NVGcolor") - public static NVGColor nvgTransRGBAf(@NativeType("NVGcolor") NVGColor c0, float a, @NativeType("NVGcolor") NVGColor __result) { - nnvgTransRGBAf(c0.address(), a, __result.address()); - return __result; - } - - // --- [ nvgHSL ] --- - - /** Unsafe version of: {@link #nvgHSL HSL} */ - public static native void nnvgHSL(float h, float s, float l, long __result); - - /** - * Returns color value specified by hue, saturation and lightness. - * - *

    HSL values are all in range {@code [0..1]}, alpha will be set to 255.

    - * - * @param h the hue value - * @param s the saturation value - * @param l the lightness value - */ - @NativeType("NVGcolor") - public static NVGColor nvgHSL(float h, float s, float l, @NativeType("NVGcolor") NVGColor __result) { - nnvgHSL(h, s, l, __result.address()); - return __result; - } - - // --- [ nvgHSLA ] --- - - /** Unsafe version of: {@link #nvgHSLA HSLA} */ - public static native void nnvgHSLA(float h, float s, float l, byte a, long __result); - - /** - * Returns color value specified by hue, saturation and lightness and alpha. - * - *

    HSL values are all in range {@code [0..1]}, alpha in range {@code [0..255]}

    - * - * @param h the hue value - * @param s the saturation value - * @param l the lightness value - * @param a the alpha value - */ - @NativeType("NVGcolor") - public static NVGColor nvgHSLA(float h, float s, float l, @NativeType("unsigned char") byte a, @NativeType("NVGcolor") NVGColor __result) { - nnvgHSLA(h, s, l, a, __result.address()); - return __result; - } - - // --- [ nvgSave ] --- - - /** Unsafe version of: {@link #nvgSave Save} */ - public static native void nnvgSave(long ctx); - - /** - * Pushes and saves the current render state into a state stack. A matching {@link #nvgRestore Restore} must be used to restore the state. - * - * @param ctx the NanoVG context - */ - public static void nvgSave(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgSave(ctx); - } - - // --- [ nvgRestore ] --- - - /** Unsafe version of: {@link #nvgRestore Restore} */ - public static native void nnvgRestore(long ctx); - - /** - * Pops and restores current render state. - * - * @param ctx the NanoVG context - */ - public static void nvgRestore(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgRestore(ctx); - } - - // --- [ nvgReset ] --- - - /** Unsafe version of: {@link #nvgReset Reset} */ - public static native void nnvgReset(long ctx); - - /** - * Resets current render state to default values. Does not affect the render state stack. - * - * @param ctx the NanoVG context - */ - public static void nvgReset(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgReset(ctx); - } - - // --- [ nvgShapeAntiAlias ] --- - - /** Unsafe version of: {@link #nvgShapeAntiAlias ShapeAntiAlias} */ - public static native void nnvgShapeAntiAlias(long ctx, int enabled); - - /** - * Sets whether to draw antialias for {@link #nvgStroke Stroke} and {@link #nvgFill Fill}. It's enabled by default. - * - * @param ctx the NanoVG context - * @param enabled the flag to set - */ - public static void nvgShapeAntiAlias(@NativeType("NVGcontext *") long ctx, @NativeType("int") boolean enabled) { - if (CHECKS) { - check(ctx); - } - nnvgShapeAntiAlias(ctx, enabled ? 1 : 0); - } - - // --- [ nvgStrokeColor ] --- - - /** Unsafe version of: {@link #nvgStrokeColor StrokeColor} */ - public static native void nnvgStrokeColor(long ctx, long color); - - /** - * Sets current stroke style to a solid color. - * - * @param ctx the NanoVG context - * @param color the color to set - */ - public static void nvgStrokeColor(@NativeType("NVGcontext *") long ctx, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nnvgStrokeColor(ctx, color.address()); - } - - // --- [ nvgStrokePaint ] --- - - /** Unsafe version of: {@link #nvgStrokePaint StrokePaint} */ - public static native void nnvgStrokePaint(long ctx, long paint); - - /** - * Sets current stroke style to a paint, which can be a one of the gradients or a pattern. - * - * @param ctx the NanoVG context - * @param paint the paint to set - */ - public static void nvgStrokePaint(@NativeType("NVGcontext *") long ctx, @NativeType("NVGpaint") NVGPaint paint) { - if (CHECKS) { - check(ctx); - } - nnvgStrokePaint(ctx, paint.address()); - } - - // --- [ nvgFillColor ] --- - - /** Unsafe version of: {@link #nvgFillColor FillColor} */ - public static native void nnvgFillColor(long ctx, long color); - - /** - * Sets current fill style to a solid color. - * - * @param ctx the NanoVG context - * @param color the color to set - */ - public static void nvgFillColor(@NativeType("NVGcontext *") long ctx, @NativeType("NVGcolor") NVGColor color) { - if (CHECKS) { - check(ctx); - } - nnvgFillColor(ctx, color.address()); - } - - // --- [ nvgFillPaint ] --- - - /** Unsafe version of: {@link #nvgFillPaint FillPaint} */ - public static native void nnvgFillPaint(long ctx, long paint); - - /** - * Sets current fill style to a paint, which can be a one of the gradients or a pattern. - * - * @param ctx the NanoVG context - * @param paint the paint to set - */ - public static void nvgFillPaint(@NativeType("NVGcontext *") long ctx, @NativeType("NVGpaint") NVGPaint paint) { - if (CHECKS) { - check(ctx); - } - nnvgFillPaint(ctx, paint.address()); - } - - // --- [ nvgMiterLimit ] --- - - /** Unsafe version of: {@link #nvgMiterLimit MiterLimit} */ - public static native void nnvgMiterLimit(long ctx, float limit); - - /** - * Sets the miter limit of the stroke style. Miter limit controls when a sharp corner is beveled. - * - * @param ctx the NanoVG context - * @param limit the miter limit to set - */ - public static void nvgMiterLimit(@NativeType("NVGcontext *") long ctx, float limit) { - if (CHECKS) { - check(ctx); - } - nnvgMiterLimit(ctx, limit); - } - - // --- [ nvgStrokeWidth ] --- - - /** Unsafe version of: {@link #nvgStrokeWidth StrokeWidth} */ - public static native void nnvgStrokeWidth(long ctx, float size); - - /** - * Sets the stroke width of the stroke style. - * - * @param ctx the NanoVG context - * @param size the stroke width to set - */ - public static void nvgStrokeWidth(@NativeType("NVGcontext *") long ctx, float size) { - if (CHECKS) { - check(ctx); - } - nnvgStrokeWidth(ctx, size); - } - - // --- [ nvgLineCap ] --- - - /** Unsafe version of: {@link #nvgLineCap LineCap} */ - public static native void nnvgLineCap(long ctx, int cap); - - /** - * Sets how the end of the line (cap) is drawn. - * - *

    The default line cap is {@link #NVG_BUTT BUTT}.

    - * - * @param ctx the NanoVG context - * @param cap the line cap to set. One of:
    {@link #NVG_BUTT BUTT}{@link #NVG_ROUND ROUND}{@link #NVG_SQUARE SQUARE}
    - */ - public static void nvgLineCap(@NativeType("NVGcontext *") long ctx, int cap) { - if (CHECKS) { - check(ctx); - } - nnvgLineCap(ctx, cap); - } - - // --- [ nvgLineJoin ] --- - - /** Unsafe version of: {@link #nvgLineJoin LineJoin} */ - public static native void nnvgLineJoin(long ctx, int join); - - /** - * Sets how sharp path corners are drawn. - * - *

    The default line join is {@link #NVG_MITER MITER}.

    - * - * @param ctx the NanoVG context - * @param join the line join to set. One of:
    {@link #NVG_MITER MITER}{@link #NVG_ROUND ROUND}{@link #NVG_BEVEL BEVEL}
    - */ - public static void nvgLineJoin(@NativeType("NVGcontext *") long ctx, int join) { - if (CHECKS) { - check(ctx); - } - nnvgLineJoin(ctx, join); - } - - // --- [ nvgGlobalAlpha ] --- - - /** Unsafe version of: {@link #nvgGlobalAlpha GlobalAlpha} */ - public static native void nnvgGlobalAlpha(long ctx, float alpha); - - /** - * Sets the transparency applied to all rendered shapes. - * - *

    Already transparent paths will get proportionally more transparent as well.

    - * - * @param ctx the NanoVG context - * @param alpha the alpha value to set - */ - public static void nvgGlobalAlpha(@NativeType("NVGcontext *") long ctx, float alpha) { - if (CHECKS) { - check(ctx); - } - nnvgGlobalAlpha(ctx, alpha); - } - - // --- [ nvgResetTransform ] --- - - /** Unsafe version of: {@link #nvgResetTransform ResetTransform} */ - public static native void nnvgResetTransform(long ctx); - - /** - * Resets current transform to an identity matrix. - * - * @param ctx the NanoVG context - */ - public static void nvgResetTransform(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgResetTransform(ctx); - } - - // --- [ nvgTransform ] --- - - /** Unsafe version of: {@link #nvgTransform Transform} */ - public static native void nnvgTransform(long ctx, float a, float b, float c, float d, float e, float f); - - /** - * Premultiplies current coordinate system by specified matrix. The parameters are interpreted as matrix as follows: - * - *
    
    -     * [a c e]
    -     * [b d f]
    -     * [0 0 1]
    - * - * @param ctx the NanoVG context - * @param a the a value - * @param b the b value - * @param c the c value - * @param d the d value - * @param e the e value - * @param f the f value - */ - public static void nvgTransform(@NativeType("NVGcontext *") long ctx, float a, float b, float c, float d, float e, float f) { - if (CHECKS) { - check(ctx); - } - nnvgTransform(ctx, a, b, c, d, e, f); - } - - // --- [ nvgTranslate ] --- - - /** Unsafe version of: {@link #nvgTranslate Translate} */ - public static native void nnvgTranslate(long ctx, float x, float y); - - /** - * Translates current coordinate system. - * - * @param ctx the NanoVG context - * @param x the X axis translation amount - * @param y the Y axis translation amount - */ - public static void nvgTranslate(@NativeType("NVGcontext *") long ctx, float x, float y) { - if (CHECKS) { - check(ctx); - } - nnvgTranslate(ctx, x, y); - } - - // --- [ nvgRotate ] --- - - /** Unsafe version of: {@link #nvgRotate Rotate} */ - public static native void nnvgRotate(long ctx, float angle); - - /** - * Rotates current coordinate system. - * - * @param ctx the NanoVG context - * @param angle the rotation angle, in radians - */ - public static void nvgRotate(@NativeType("NVGcontext *") long ctx, float angle) { - if (CHECKS) { - check(ctx); - } - nnvgRotate(ctx, angle); - } - - // --- [ nvgSkewX ] --- - - /** Unsafe version of: {@link #nvgSkewX SkewX} */ - public static native void nnvgSkewX(long ctx, float angle); - - /** - * Skews the current coordinate system along X axis. - * - * @param ctx the NanoVG context - * @param angle the skew angle, in radians - */ - public static void nvgSkewX(@NativeType("NVGcontext *") long ctx, float angle) { - if (CHECKS) { - check(ctx); - } - nnvgSkewX(ctx, angle); - } - - // --- [ nvgSkewY ] --- - - /** Unsafe version of: {@link #nvgSkewY SkewY} */ - public static native void nnvgSkewY(long ctx, float angle); - - /** - * Skews the current coordinate system along Y axis. - * - * @param ctx the NanoVG context - * @param angle the skew angle, in radians - */ - public static void nvgSkewY(@NativeType("NVGcontext *") long ctx, float angle) { - if (CHECKS) { - check(ctx); - } - nnvgSkewY(ctx, angle); - } - - // --- [ nvgScale ] --- - - /** Unsafe version of: {@link #nvgScale Scale} */ - public static native void nnvgScale(long ctx, float x, float y); - - /** - * Scales the current coordinate system. - * - * @param ctx the NanoVG context - * @param x the X axis scale factor - * @param y the Y axis scale factor - */ - public static void nvgScale(@NativeType("NVGcontext *") long ctx, float x, float y) { - if (CHECKS) { - check(ctx); - } - nnvgScale(ctx, x, y); - } - - // --- [ nvgCurrentTransform ] --- - - /** Unsafe version of: {@link #nvgCurrentTransform CurrentTransform} */ - public static native void nnvgCurrentTransform(long ctx, long xform); - - /** - * Stores the top part (a-f) of the current transformation matrix in to the specified buffer. - * - *
    
    -     * [a c e]
    -     * [b d f]
    -     * [0 0 1]
    - * - *

    There should be space for 6 floats in the return buffer for the values {@code a-f}.

    - * - * @param ctx the NanoVG context - * @param xform the destination buffer - */ - public static void nvgCurrentTransform(@NativeType("NVGcontext *") long ctx, @NativeType("float *") FloatBuffer xform) { - if (CHECKS) { - check(ctx); - check(xform, 6); - } - nnvgCurrentTransform(ctx, memAddress(xform)); - } - - // --- [ nvgTransformIdentity ] --- - - /** Unsafe version of: {@link #nvgTransformIdentity TransformIdentity} */ - public static native void nnvgTransformIdentity(long dst); - - /** - * Sets the transform to identity matrix. - * - * @param dst the destination buffer - */ - public static void nvgTransformIdentity(@NativeType("float *") FloatBuffer dst) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformIdentity(memAddress(dst)); - } - - // --- [ nvgTransformTranslate ] --- - - /** Unsafe version of: {@link #nvgTransformTranslate TransformTranslate} */ - public static native void nnvgTransformTranslate(long dst, float tx, float ty); - - /** - * Sets the transform to translation matrix matrix. - * - * @param dst the destination buffer - * @param tx the X axis translation amount - * @param ty the Y axis translation amount - */ - public static void nvgTransformTranslate(@NativeType("float *") FloatBuffer dst, float tx, float ty) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformTranslate(memAddress(dst), tx, ty); - } - - // --- [ nvgTransformScale ] --- - - /** Unsafe version of: {@link #nvgTransformScale TransformScale} */ - public static native void nnvgTransformScale(long dst, float sx, float sy); - - /** - * Sets the transform to scale matrix. - * - * @param dst the destination buffer - * @param sx the X axis scale factor - * @param sy the Y axis scale factor - */ - public static void nvgTransformScale(@NativeType("float *") FloatBuffer dst, float sx, float sy) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformScale(memAddress(dst), sx, sy); - } - - // --- [ nvgTransformRotate ] --- - - /** Unsafe version of: {@link #nvgTransformRotate TransformRotate} */ - public static native void nnvgTransformRotate(long dst, float a); - - /** - * Sets the transform to rotate matrix. - * - * @param dst the destination buffer - * @param a the rotation angle, in radians - */ - public static void nvgTransformRotate(@NativeType("float *") FloatBuffer dst, float a) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformRotate(memAddress(dst), a); - } - - // --- [ nvgTransformSkewX ] --- - - /** Unsafe version of: {@link #nvgTransformSkewX TransformSkewX} */ - public static native void nnvgTransformSkewX(long dst, float a); - - /** - * Sets the transform to skew-x matrix. - * - * @param dst the destination buffer - * @param a the skew angle, in radians - */ - public static void nvgTransformSkewX(@NativeType("float *") FloatBuffer dst, float a) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformSkewX(memAddress(dst), a); - } - - // --- [ nvgTransformSkewY ] --- - - /** Unsafe version of: {@link #nvgTransformSkewY TransformSkewY} */ - public static native void nnvgTransformSkewY(long dst, float a); - - /** - * Sets the transform to skew-y matrix. - * - * @param dst the destination buffer - * @param a the skew angle, in radians - */ - public static void nvgTransformSkewY(@NativeType("float *") FloatBuffer dst, float a) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformSkewY(memAddress(dst), a); - } - - // --- [ nvgTransformMultiply ] --- - - /** Unsafe version of: {@link #nvgTransformMultiply TransformMultiply} */ - public static native void nnvgTransformMultiply(long dst, long src); - - /** - * Sets the transform to the result of multiplication of two transforms, of {@code A = A*B}. - * - * @param dst the destination buffer - * @param src the {@code B} transformation matrix - */ - public static void nvgTransformMultiply(@NativeType("float *") FloatBuffer dst, @NativeType("float const *") FloatBuffer src) { - if (CHECKS) { - check(dst, 6); - check(src, 6); - } - nnvgTransformMultiply(memAddress(dst), memAddress(src)); - } - - // --- [ nvgTransformPremultiply ] --- - - /** Unsafe version of: {@link #nvgTransformPremultiply TransformPremultiply} */ - public static native void nnvgTransformPremultiply(long dst, long src); - - /** - * Sets the transform to the result of multiplication of two transforms, of {@code A = B*A}. - * - * @param dst the destination buffer - * @param src the {@code B} transformation matrix - */ - public static void nvgTransformPremultiply(@NativeType("float *") FloatBuffer dst, @NativeType("float const *") FloatBuffer src) { - if (CHECKS) { - check(dst, 6); - check(src, 6); - } - nnvgTransformPremultiply(memAddress(dst), memAddress(src)); - } - - // --- [ nvgTransformInverse ] --- - - /** Unsafe version of: {@link #nvgTransformInverse TransformInverse} */ - public static native int nnvgTransformInverse(long dst, long src); - - /** - * Sets the destination to inverse of specified transform. - * - * @param dst the destination buffer - * @param src the transformation matrix to inverse - * - * @return 1 if the inverse could be calculated, else 0 - */ - @NativeType("int") - public static boolean nvgTransformInverse(@NativeType("float *") FloatBuffer dst, @NativeType("float const *") FloatBuffer src) { - if (CHECKS) { - check(dst, 6); - check(src, 6); - } - return nnvgTransformInverse(memAddress(dst), memAddress(src)) != 0; - } - - // --- [ nvgTransformPoint ] --- - - /** Unsafe version of: {@link #nvgTransformPoint TransformPoint} */ - public static native void nnvgTransformPoint(long dstx, long dsty, long xform, float srcx, float srcy); - - /** - * Transform a point by given transform. - * - * @param dstx returns the transformed X axis coordinate - * @param dsty returns the transformed Y axis coordinate - * @param xform the transformation matrix - * @param srcx the point X axis coordinate - * @param srcy the point Y axis coordinate - */ - public static void nvgTransformPoint(@NativeType("float *") FloatBuffer dstx, @NativeType("float *") FloatBuffer dsty, @NativeType("float const *") FloatBuffer xform, float srcx, float srcy) { - if (CHECKS) { - check(dstx, 1); - check(dsty, 1); - check(xform, 6); - } - nnvgTransformPoint(memAddress(dstx), memAddress(dsty), memAddress(xform), srcx, srcy); - } - - // --- [ nvgDegToRad ] --- - - /** - * Converts degrees to radians. - * - * @param deg the rotation value, in degrees - */ - public static native float nvgDegToRad(float deg); - - // --- [ nvgRadToDeg ] --- - - /** - * Converts radians to degrees. - * - * @param rad the rotation value, in radians - */ - public static native float nvgRadToDeg(float rad); - - // --- [ nvgCreateImage ] --- - - /** Unsafe version of: {@link #nvgCreateImage CreateImage} */ - public static native int nnvgCreateImage(long ctx, long filename, int imageFlags); - - /** - * Creates image by loading it from the disk from specified file name. - * - * @param ctx the NanoVG context - * @param filename the image file name - * @param imageFlags the image flags. One of:
    {@link #NVG_IMAGE_GENERATE_MIPMAPS IMAGE_GENERATE_MIPMAPS}{@link #NVG_IMAGE_REPEATX IMAGE_REPEATX}{@link #NVG_IMAGE_REPEATY IMAGE_REPEATY}{@link #NVG_IMAGE_FLIPY IMAGE_FLIPY}{@link #NVG_IMAGE_PREMULTIPLIED IMAGE_PREMULTIPLIED}
    {@link #NVG_IMAGE_NEAREST IMAGE_NEAREST}
    - * - * @return a handle to the image - */ - public static int nvgCreateImage(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer filename, int imageFlags) { - if (CHECKS) { - check(ctx); - checkNT1(filename); - } - return nnvgCreateImage(ctx, memAddress(filename), imageFlags); - } - - /** - * Creates image by loading it from the disk from specified file name. - * - * @param ctx the NanoVG context - * @param filename the image file name - * @param imageFlags the image flags. One of:
    {@link #NVG_IMAGE_GENERATE_MIPMAPS IMAGE_GENERATE_MIPMAPS}{@link #NVG_IMAGE_REPEATX IMAGE_REPEATX}{@link #NVG_IMAGE_REPEATY IMAGE_REPEATY}{@link #NVG_IMAGE_FLIPY IMAGE_FLIPY}{@link #NVG_IMAGE_PREMULTIPLIED IMAGE_PREMULTIPLIED}
    {@link #NVG_IMAGE_NEAREST IMAGE_NEAREST}
    - * - * @return a handle to the image - */ - public static int nvgCreateImage(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence filename, int imageFlags) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nnvgCreateImage(ctx, filenameEncoded, imageFlags); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgCreateImageMem ] --- - - /** - * Unsafe version of: {@link #nvgCreateImageMem CreateImageMem} - * - * @param ndata the image data size, in bytes - */ - public static native int nnvgCreateImageMem(long ctx, int imageFlags, long data, int ndata); - - /** - * Creates image by loading it from the specified chunk of memory. - * - * @param ctx the NanoVG context - * @param imageFlags the image flags. One of:
    {@link #NVG_IMAGE_GENERATE_MIPMAPS IMAGE_GENERATE_MIPMAPS}{@link #NVG_IMAGE_REPEATX IMAGE_REPEATX}{@link #NVG_IMAGE_REPEATY IMAGE_REPEATY}{@link #NVG_IMAGE_FLIPY IMAGE_FLIPY}{@link #NVG_IMAGE_PREMULTIPLIED IMAGE_PREMULTIPLIED}
    {@link #NVG_IMAGE_NEAREST IMAGE_NEAREST}
    - * @param data the image data - * - * @return a handle to the image - */ - public static int nvgCreateImageMem(@NativeType("NVGcontext *") long ctx, int imageFlags, @NativeType("unsigned char *") ByteBuffer data) { - if (CHECKS) { - check(ctx); - } - return nnvgCreateImageMem(ctx, imageFlags, memAddress(data), data.remaining()); - } - - // --- [ nvgCreateImageRGBA ] --- - - /** Unsafe version of: {@link #nvgCreateImageRGBA CreateImageRGBA} */ - public static native int nnvgCreateImageRGBA(long ctx, int w, int h, int imageFlags, long data); - - /** - * Creates image from specified image data. - * - * @param ctx the NanoVG context - * @param w the image width - * @param h the image height - * @param imageFlags the image flags. One of:
    {@link #NVG_IMAGE_GENERATE_MIPMAPS IMAGE_GENERATE_MIPMAPS}{@link #NVG_IMAGE_REPEATX IMAGE_REPEATX}{@link #NVG_IMAGE_REPEATY IMAGE_REPEATY}{@link #NVG_IMAGE_FLIPY IMAGE_FLIPY}{@link #NVG_IMAGE_PREMULTIPLIED IMAGE_PREMULTIPLIED}
    {@link #NVG_IMAGE_NEAREST IMAGE_NEAREST}
    - * @param data the image data - * - * @return a handle to the image - */ - public static int nvgCreateImageRGBA(@NativeType("NVGcontext *") long ctx, int w, int h, int imageFlags, @NativeType("unsigned char const *") ByteBuffer data) { - if (CHECKS) { - check(ctx); - check(data, w * h * 4); - } - return nnvgCreateImageRGBA(ctx, w, h, imageFlags, memAddress(data)); - } - - // --- [ nvgUpdateImage ] --- - - /** Unsafe version of: {@link #nvgUpdateImage UpdateImage} */ - public static native void nnvgUpdateImage(long ctx, int image, long data); - - /** - * Updates image data specified by image handle. - * - * @param ctx the NanoVG context - * @param image the image handle - * @param data the image data - */ - public static void nvgUpdateImage(@NativeType("NVGcontext *") long ctx, int image, @NativeType("unsigned char const *") ByteBuffer data) { - if (CHECKS) { - check(ctx); - } - nnvgUpdateImage(ctx, image, memAddress(data)); - } - - // --- [ nvgImageSize ] --- - - /** Unsafe version of: {@link #nvgImageSize ImageSize} */ - public static native void nnvgImageSize(long ctx, int image, long w, long h); - - /** - * Returns the dimensions of a created image. - * - * @param ctx the NanoVG context - * @param image the image handle - * @param w returns the image width - * @param h returns the image height - */ - public static void nvgImageSize(@NativeType("NVGcontext *") long ctx, int image, @NativeType("int *") IntBuffer w, @NativeType("int *") IntBuffer h) { - if (CHECKS) { - check(ctx); - check(w, 1); - check(h, 1); - } - nnvgImageSize(ctx, image, memAddress(w), memAddress(h)); - } - - // --- [ nvgDeleteImage ] --- - - /** Unsafe version of: {@link #nvgDeleteImage DeleteImage} */ - public static native void nnvgDeleteImage(long ctx, int image); - - /** - * Deletes created image. - * - * @param ctx the NanoVG context - * @param image the image handle to delete - */ - public static void nvgDeleteImage(@NativeType("NVGcontext *") long ctx, int image) { - if (CHECKS) { - check(ctx); - } - nnvgDeleteImage(ctx, image); - } - - // --- [ nvgLinearGradient ] --- - - /** Unsafe version of: {@link #nvgLinearGradient LinearGradient} */ - public static native void nnvgLinearGradient(long ctx, float sx, float sy, float ex, float ey, long icol, long ocol, long __result); - - /** - * Creates and returns a linear gradient. - * - *

    The gradient is transformed by the current transform when it is passed to {@link #nvgFillPaint FillPaint} or {@link #nvgStrokePaint StrokePaint}.

    - * - * @param ctx the NanoVG context - * @param sx the X axis start coordinate - * @param sy the Y axis start coordinate - * @param ex the X axis end coordinate - * @param ey the Y axis end coordinate - * @param icol the start color - * @param ocol the end color - */ - @NativeType("NVGpaint") - public static NVGPaint nvgLinearGradient(@NativeType("NVGcontext *") long ctx, float sx, float sy, float ex, float ey, @NativeType("NVGcolor") NVGColor icol, @NativeType("NVGcolor") NVGColor ocol, @NativeType("NVGpaint") NVGPaint __result) { - if (CHECKS) { - check(ctx); - } - nnvgLinearGradient(ctx, sx, sy, ex, ey, icol.address(), ocol.address(), __result.address()); - return __result; - } - - // --- [ nvgBoxGradient ] --- - - /** Unsafe version of: {@link #nvgBoxGradient BoxGradient} */ - public static native void nnvgBoxGradient(long ctx, float x, float y, float w, float h, float r, float f, long icol, long ocol, long __result); - - /** - * Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering drop shadows or highlights for boxes. - * - *

    The gradient is transformed by the current transform when it is passed to {@link #nvgFillPaint FillPaint} or {@link #nvgStrokePaint StrokePaint}.

    - * - * @param ctx the NanoVG context - * @param x the rectangle left coordinate - * @param y the rectangle top coordinate - * @param w the rectangle width - * @param h the rectangle height - * @param r the corner radius - * @param f the feather value. Feather defines how blurry the border of the rectangle is. - * @param icol the inner color - * @param ocol the outer color - */ - @NativeType("NVGpaint") - public static NVGPaint nvgBoxGradient(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float r, float f, @NativeType("NVGcolor") NVGColor icol, @NativeType("NVGcolor") NVGColor ocol, @NativeType("NVGpaint") NVGPaint __result) { - if (CHECKS) { - check(ctx); - } - nnvgBoxGradient(ctx, x, y, w, h, r, f, icol.address(), ocol.address(), __result.address()); - return __result; - } - - // --- [ nvgRadialGradient ] --- - - /** Unsafe version of: {@link #nvgRadialGradient RadialGradient} */ - public static native void nnvgRadialGradient(long ctx, float cx, float cy, float inr, float outr, long icol, long ocol, long __result); - - /** - * Creates and returns a radial gradient. - * - *

    The gradient is transformed by the current transform when it is passed to {@link #nvgFillPaint FillPaint} or {@link #nvgStrokePaint StrokePaint}.

    - * - * @param ctx the NanoVG context - * @param cx the X axis center coordinate - * @param cy the Y axis center coordinate - * @param inr the inner radius - * @param outr the outer radius - * @param icol the start color - * @param ocol the end color - */ - @NativeType("NVGpaint") - public static NVGPaint nvgRadialGradient(@NativeType("NVGcontext *") long ctx, float cx, float cy, float inr, float outr, @NativeType("NVGcolor") NVGColor icol, @NativeType("NVGcolor") NVGColor ocol, @NativeType("NVGpaint") NVGPaint __result) { - if (CHECKS) { - check(ctx); - } - nnvgRadialGradient(ctx, cx, cy, inr, outr, icol.address(), ocol.address(), __result.address()); - return __result; - } - - // --- [ nvgImagePattern ] --- - - /** Unsafe version of: {@link #nvgImagePattern ImagePattern} */ - public static native void nnvgImagePattern(long ctx, float ox, float oy, float ex, float ey, float angle, int image, float alpha, long __result); - - /** - * Creates and returns an image patter. - * - *

    The gradient is transformed by the current transform when it is passed to {@link #nvgFillPaint FillPaint} or {@link #nvgStrokePaint StrokePaint}.

    - * - * @param ctx the NanoVG context - * @param ox the image pattern left coordinate - * @param oy the image pattern top coordinate - * @param ex the image width - * @param ey the image height - * @param angle the rotation angle around the top-left corner - * @param image the image to render - * @param alpha the alpha value - */ - @NativeType("NVGpaint") - public static NVGPaint nvgImagePattern(@NativeType("NVGcontext *") long ctx, float ox, float oy, float ex, float ey, float angle, int image, float alpha, @NativeType("NVGpaint") NVGPaint __result) { - if (CHECKS) { - check(ctx); - } - nnvgImagePattern(ctx, ox, oy, ex, ey, angle, image, alpha, __result.address()); - return __result; - } - - // --- [ nvgScissor ] --- - - /** Unsafe version of: {@link #nvgScissor Scissor} */ - public static native void nnvgScissor(long ctx, float x, float y, float w, float h); - - /** - * Sets the current scissor rectangle. - * - *

    The scissor rectangle is transformed by the current transform.

    - * - * @param ctx the NanoVG context - * @param x the rectangle X axis coordinate - * @param y the rectangle Y axis coordinate - * @param w the rectangle width - * @param h the rectangle height - */ - public static void nvgScissor(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) { - if (CHECKS) { - check(ctx); - } - nnvgScissor(ctx, x, y, w, h); - } - - // --- [ nvgIntersectScissor ] --- - - /** Unsafe version of: {@link #nvgIntersectScissor IntersectScissor} */ - public static native void nnvgIntersectScissor(long ctx, float x, float y, float w, float h); - - /** - * Intersects current scissor rectangle with the specified rectangle. - * - *

    The scissor rectangle is transformed by the current transform.

    - * - *

    Note: in case the rotation of previous scissor rect differs from the current one, the intersection will be done between the specified rectangle and the - * previous scissor rectangle transformed in the current transform space. The resulting shape is always rectangle.

    - * - * @param ctx the NanoVG context - * @param x the rectangle X axis coordinate - * @param y the rectangle Y axis coordinate - * @param w the rectangle width - * @param h the rectangle height - */ - public static void nvgIntersectScissor(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) { - if (CHECKS) { - check(ctx); - } - nnvgIntersectScissor(ctx, x, y, w, h); - } - - // --- [ nvgResetScissor ] --- - - /** Unsafe version of: {@link #nvgResetScissor ResetScissor} */ - public static native void nnvgResetScissor(long ctx); - - /** - * Resets and disables scissoring. - * - * @param ctx the NanoVG context - */ - public static void nvgResetScissor(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgResetScissor(ctx); - } - - // --- [ nvgBeginPath ] --- - - /** Unsafe version of: {@link #nvgBeginPath BeginPath} */ - public static native void nnvgBeginPath(long ctx); - - /** - * Clears the current path and sub-paths. - * - * @param ctx the NanoVG context - */ - public static void nvgBeginPath(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgBeginPath(ctx); - } - - // --- [ nvgMoveTo ] --- - - /** Unsafe version of: {@link #nvgMoveTo MoveTo} */ - public static native void nnvgMoveTo(long ctx, float x, float y); - - /** - * Starts new sub-path with specified point as first point. - * - * @param ctx the NanoVG context - * @param x the point X axis coordinate - * @param y the point Y axis coordinate - */ - public static void nvgMoveTo(@NativeType("NVGcontext *") long ctx, float x, float y) { - if (CHECKS) { - check(ctx); - } - nnvgMoveTo(ctx, x, y); - } - - // --- [ nvgLineTo ] --- - - /** Unsafe version of: {@link #nvgLineTo LineTo} */ - public static native void nnvgLineTo(long ctx, float x, float y); - - /** - * Adds line segment from the last point in the path to the specified point. - * - * @param ctx the NanoVG context - * @param x the point X axis coordinate - * @param y the point Y axis coordinate - */ - public static void nvgLineTo(@NativeType("NVGcontext *") long ctx, float x, float y) { - if (CHECKS) { - check(ctx); - } - nnvgLineTo(ctx, x, y); - } - - // --- [ nvgBezierTo ] --- - - /** Unsafe version of: {@link #nvgBezierTo BezierTo} */ - public static native void nnvgBezierTo(long ctx, float c1x, float c1y, float c2x, float c2y, float x, float y); - - /** - * Adds cubic bezier segment from last point in the path via two control points to the specified point. - * - * @param ctx the NanoVG context - * @param c1x the first control point X axis coordinate - * @param c1y the first control point Y axis coordinate - * @param c2x the second control point X axis coordinate - * @param c2y the second control point Y axis coordinate - * @param x the point X axis coordinate - * @param y the point Y axis coordinate - */ - public static void nvgBezierTo(@NativeType("NVGcontext *") long ctx, float c1x, float c1y, float c2x, float c2y, float x, float y) { - if (CHECKS) { - check(ctx); - } - nnvgBezierTo(ctx, c1x, c1y, c2x, c2y, x, y); - } - - // --- [ nvgQuadTo ] --- - - /** Unsafe version of: {@link #nvgQuadTo QuadTo} */ - public static native void nnvgQuadTo(long ctx, float cx, float cy, float x, float y); - - /** - * Adds quadratic bezier segment from last point in the path via a control point to the specified point. - * - * @param ctx the NanoVG context - * @param cx the control point X axis coordinate - * @param cy the control point Y axis coordinate - * @param x the point X axis coordinate - * @param y the point Y axis coordinate - */ - public static void nvgQuadTo(@NativeType("NVGcontext *") long ctx, float cx, float cy, float x, float y) { - if (CHECKS) { - check(ctx); - } - nnvgQuadTo(ctx, cx, cy, x, y); - } - - // --- [ nvgArcTo ] --- - - /** Unsafe version of: {@link #nvgArcTo ArcTo} */ - public static native void nnvgArcTo(long ctx, float x1, float y1, float x2, float y2, float radius); - - /** - * Adds an arc segment at the corner defined by the last path point, and two specified points. - * - * @param ctx the NanoVG context - * @param x1 the first point X axis coordinate - * @param y1 the first point Y axis coordinate - * @param x2 the second point X axis coordinate - * @param y2 the second point Y axis coordinate - * @param radius the arc radius, in radians - */ - public static void nvgArcTo(@NativeType("NVGcontext *") long ctx, float x1, float y1, float x2, float y2, float radius) { - if (CHECKS) { - check(ctx); - } - nnvgArcTo(ctx, x1, y1, x2, y2, radius); - } - - // --- [ nvgClosePath ] --- - - /** Unsafe version of: {@link #nvgClosePath ClosePath} */ - public static native void nnvgClosePath(long ctx); - - /** - * Closes current sub-path with a line segment. - * - * @param ctx the NanoVG context - */ - public static void nvgClosePath(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgClosePath(ctx); - } - - // --- [ nvgPathWinding ] --- - - /** Unsafe version of: {@link #nvgPathWinding PathWinding} */ - public static native void nnvgPathWinding(long ctx, int dir); - - /** - * Sets the current sub-path winding. - * - * @param ctx the NanoVG context - * @param dir the sub-path winding. One of:
    {@link #NVG_CCW CCW}{@link #NVG_CW CW}
    - */ - public static void nvgPathWinding(@NativeType("NVGcontext *") long ctx, int dir) { - if (CHECKS) { - check(ctx); - } - nnvgPathWinding(ctx, dir); - } - - // --- [ nvgArc ] --- - - /** Unsafe version of: {@link #nvgArc Arc} */ - public static native void nnvgArc(long ctx, float cx, float cy, float r, float a0, float a1, int dir); - - /** - * Creates new circle arc shaped sub-path. - * - * @param ctx the NanoVG context - * @param cx the arc center X axis coordinate - * @param cy the arc center Y axis coordinate - * @param r the arc radius - * @param a0 the arc starting angle, in radians - * @param a1 the arc ending angle, in radians - * @param dir the arc direction. One of:
    {@link #NVG_CCW CCW}{@link #NVG_CW CW}
    - */ - public static void nvgArc(@NativeType("NVGcontext *") long ctx, float cx, float cy, float r, float a0, float a1, int dir) { - if (CHECKS) { - check(ctx); - } - nnvgArc(ctx, cx, cy, r, a0, a1, dir); - } - - // --- [ nvgRect ] --- - - /** Unsafe version of: {@link #nvgRect Rect} */ - public static native void nnvgRect(long ctx, float x, float y, float w, float h); - - /** - * Creates new rectangle shaped sub-path. - * - * @param ctx the NanoVG context - * @param x the rectangle X axis coordinate - * @param y the rectangle Y axis coordinate - * @param w the rectangle width - * @param h the rectangle height - */ - public static void nvgRect(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h) { - if (CHECKS) { - check(ctx); - } - nnvgRect(ctx, x, y, w, h); - } - - // --- [ nvgRoundedRect ] --- - - /** Unsafe version of: {@link #nvgRoundedRect RoundedRect} */ - public static native void nnvgRoundedRect(long ctx, float x, float y, float w, float h, float r); - - /** - * Creates new rounded rectangle shaped sub-path. - * - * @param ctx the NanoVG context - * @param x the rectangle X axis coordinate - * @param y the rectangle Y axis coordinate - * @param w the rectangle width - * @param h the rectangle height - * @param r the corner radius - */ - public static void nvgRoundedRect(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float r) { - if (CHECKS) { - check(ctx); - } - nnvgRoundedRect(ctx, x, y, w, h, r); - } - - // --- [ nvgRoundedRectVarying ] --- - - /** Unsafe version of: {@link #nvgRoundedRectVarying RoundedRectVarying} */ - public static native void nnvgRoundedRectVarying(long ctx, float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft); - - /** - * Creates new rounded rectangle shaped sub-path with varying radii for each corner. - * - * @param ctx the NanoVG context - * @param x the rectangle X axis coordinate - * @param y the rectangle Y axis coordinate - * @param w the rectangle width - * @param h the rectangle height - * @param radTopLeft the top-left corner radius - * @param radTopRight the top-right corner radius - * @param radBottomRight the bottom-right corner radius - * @param radBottomLeft the bottom-left corner radius - */ - public static void nvgRoundedRectVarying(@NativeType("NVGcontext *") long ctx, float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft) { - if (CHECKS) { - check(ctx); - } - nnvgRoundedRectVarying(ctx, x, y, w, h, radTopLeft, radTopRight, radBottomRight, radBottomLeft); - } - - // --- [ nvgEllipse ] --- - - /** Unsafe version of: {@link #nvgEllipse Ellipse} */ - public static native void nnvgEllipse(long ctx, float cx, float cy, float rx, float ry); - - /** - * Creates new ellipse shaped sub-path. - * - * @param ctx the NanoVG context - * @param cx the ellipse center X axis coordinate - * @param cy the ellipse center Y axis coordinate - * @param rx the ellipse X axis radius - * @param ry the ellipse Y axis radius - */ - public static void nvgEllipse(@NativeType("NVGcontext *") long ctx, float cx, float cy, float rx, float ry) { - if (CHECKS) { - check(ctx); - } - nnvgEllipse(ctx, cx, cy, rx, ry); - } - - // --- [ nvgCircle ] --- - - /** Unsafe version of: {@link #nvgCircle Circle} */ - public static native void nnvgCircle(long ctx, float cx, float cy, float r); - - /** - * Creates new circle shaped sub-path. - * - * @param ctx the NanoVG context - * @param cx the circle center X axis coordinate - * @param cy the circle center Y axis coordinate - * @param r the circle radius - */ - public static void nvgCircle(@NativeType("NVGcontext *") long ctx, float cx, float cy, float r) { - if (CHECKS) { - check(ctx); - } - nnvgCircle(ctx, cx, cy, r); - } - - // --- [ nvgFill ] --- - - /** Unsafe version of: {@link #nvgFill Fill} */ - public static native void nnvgFill(long ctx); - - /** - * Fills the current path with current fill style. - * - * @param ctx the NanoVG context - */ - public static void nvgFill(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgFill(ctx); - } - - // --- [ nvgStroke ] --- - - /** Unsafe version of: {@link #nvgStroke Stroke} */ - public static native void nnvgStroke(long ctx); - - /** - * Fills the current path with current stroke style. - * - * @param ctx the NanoVG context - */ - public static void nvgStroke(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgStroke(ctx); - } - - // --- [ nvgCreateFont ] --- - - /** Unsafe version of: {@link #nvgCreateFont CreateFont} */ - public static native int nnvgCreateFont(long ctx, long name, long filename); - - /** - * Creates font by loading it from the disk from specified file name. - * - * @param ctx the NanoVG context - * @param name the font name - * @param filename the font file name - * - * @return a handle to the font - */ - public static int nvgCreateFont(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer name, @NativeType("char const *") ByteBuffer filename) { - if (CHECKS) { - check(ctx); - checkNT1(name); - checkNT1(filename); - } - return nnvgCreateFont(ctx, memAddress(name), memAddress(filename)); - } - - /** - * Creates font by loading it from the disk from specified file name. - * - * @param ctx the NanoVG context - * @param name the font name - * @param filename the font file name - * - * @return a handle to the font - */ - public static int nvgCreateFont(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence name, @NativeType("char const *") CharSequence filename) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nnvgCreateFont(ctx, nameEncoded, filenameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgCreateFontAtIndex ] --- - - /** Unsafe version of: {@link #nvgCreateFontAtIndex CreateFontAtIndex} */ - public static native int nnvgCreateFontAtIndex(long ctx, long name, long filename, int fontIndex); - - /** - * Creates font by loading it from the disk from specified file name. - * - * @param ctx the NanoVG context - * @param name the font name - * @param filename the font file name - * @param fontIndex specifies which font face to load from a .ttf/.ttc file - * - * @return a handle to the font - */ - public static int nvgCreateFontAtIndex(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer name, @NativeType("char const *") ByteBuffer filename, int fontIndex) { - if (CHECKS) { - check(ctx); - checkNT1(name); - checkNT1(filename); - } - return nnvgCreateFontAtIndex(ctx, memAddress(name), memAddress(filename), fontIndex); - } - - /** - * Creates font by loading it from the disk from specified file name. - * - * @param ctx the NanoVG context - * @param name the font name - * @param filename the font file name - * @param fontIndex specifies which font face to load from a .ttf/.ttc file - * - * @return a handle to the font - */ - public static int nvgCreateFontAtIndex(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence name, @NativeType("char const *") CharSequence filename, int fontIndex) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nnvgCreateFontAtIndex(ctx, nameEncoded, filenameEncoded, fontIndex); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgCreateFontMem ] --- - - /** - * Unsafe version of: {@link #nvgCreateFontMem CreateFontMem} - * - * @param ndata the font data size, in bytes - */ - public static native int nnvgCreateFontMem(long ctx, long name, long data, int ndata, int freeData); - - /** - * Creates font by loading it from the specified memory chunk. - * - *

    The memory chunk must remain valid for as long as the font is used by NanoVG.

    - * - * @param ctx the NanoVG context - * @param name the font name - * @param data the font data - * @param freeData 1 if the font data should be freed automatically, 0 otherwise - * - * @return a handle to the font - */ - public static int nvgCreateFontMem(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer name, @NativeType("unsigned char *") ByteBuffer data, @NativeType("int") boolean freeData) { - if (CHECKS) { - check(ctx); - checkNT1(name); - } - return nnvgCreateFontMem(ctx, memAddress(name), memAddress(data), data.remaining(), freeData ? 1 : 0); - } - - /** - * Creates font by loading it from the specified memory chunk. - * - *

    The memory chunk must remain valid for as long as the font is used by NanoVG.

    - * - * @param ctx the NanoVG context - * @param name the font name - * @param data the font data - * @param freeData 1 if the font data should be freed automatically, 0 otherwise - * - * @return a handle to the font - */ - public static int nvgCreateFontMem(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence name, @NativeType("unsigned char *") ByteBuffer data, @NativeType("int") boolean freeData) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nnvgCreateFontMem(ctx, nameEncoded, memAddress(data), data.remaining(), freeData ? 1 : 0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgCreateFontMemAtIndex ] --- - - /** - * Unsafe version of: {@link #nvgCreateFontMemAtIndex CreateFontMemAtIndex} - * - * @param ndata the font data size, in bytes - */ - public static native int nnvgCreateFontMemAtIndex(long ctx, long name, long data, int ndata, int freeData, int fontIndex); - - /** - * Creates font by loading it from the specified memory chunk. - * - *

    The memory chunk must remain valid for as long as the font is used by NanoVG.

    - * - * @param ctx the NanoVG context - * @param name the font name - * @param data the font data - * @param freeData 1 if the font data should be freed automatically, 0 otherwise - * @param fontIndex specifies which font face to load from a .ttf/.ttc file - * - * @return a handle to the font - */ - public static int nvgCreateFontMemAtIndex(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer name, @NativeType("unsigned char *") ByteBuffer data, @NativeType("int") boolean freeData, int fontIndex) { - if (CHECKS) { - check(ctx); - checkNT1(name); - } - return nnvgCreateFontMemAtIndex(ctx, memAddress(name), memAddress(data), data.remaining(), freeData ? 1 : 0, fontIndex); - } - - /** - * Creates font by loading it from the specified memory chunk. - * - *

    The memory chunk must remain valid for as long as the font is used by NanoVG.

    - * - * @param ctx the NanoVG context - * @param name the font name - * @param data the font data - * @param freeData 1 if the font data should be freed automatically, 0 otherwise - * @param fontIndex specifies which font face to load from a .ttf/.ttc file - * - * @return a handle to the font - */ - public static int nvgCreateFontMemAtIndex(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence name, @NativeType("unsigned char *") ByteBuffer data, @NativeType("int") boolean freeData, int fontIndex) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nnvgCreateFontMemAtIndex(ctx, nameEncoded, memAddress(data), data.remaining(), freeData ? 1 : 0, fontIndex); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgFindFont ] --- - - /** Unsafe version of: {@link #nvgFindFont FindFont} */ - public static native int nnvgFindFont(long ctx, long name); - - /** - * Finds a loaded font of specified name, and returns handle to it, or -1 if the font is not found. - * - * @param ctx the NanoVG context - * @param name the font name - */ - public static int nvgFindFont(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - check(ctx); - checkNT1(name); - } - return nnvgFindFont(ctx, memAddress(name)); - } - - /** - * Finds a loaded font of specified name, and returns handle to it, or -1 if the font is not found. - * - * @param ctx the NanoVG context - * @param name the font name - */ - public static int nvgFindFont(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence name) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nnvgFindFont(ctx, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgAddFallbackFontId ] --- - - /** Unsafe version of: {@link #nvgAddFallbackFontId AddFallbackFontId} */ - public static native int nnvgAddFallbackFontId(long ctx, int baseFont, int fallbackFont); - - /** - * Adds fallback font by handle. - * - * @param ctx the NanoVG context - */ - public static int nvgAddFallbackFontId(@NativeType("NVGcontext *") long ctx, int baseFont, int fallbackFont) { - if (CHECKS) { - check(ctx); - } - return nnvgAddFallbackFontId(ctx, baseFont, fallbackFont); - } - - // --- [ nvgAddFallbackFont ] --- - - /** Unsafe version of: {@link #nvgAddFallbackFont AddFallbackFont} */ - public static native int nnvgAddFallbackFont(long ctx, long baseFont, long fallbackFont); - - /** - * Adds fallback font by name. - * - * @param ctx the NanoVG context - */ - public static int nvgAddFallbackFont(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer baseFont, @NativeType("char const *") ByteBuffer fallbackFont) { - if (CHECKS) { - check(ctx); - checkNT1(baseFont); - checkNT1(fallbackFont); - } - return nnvgAddFallbackFont(ctx, memAddress(baseFont), memAddress(fallbackFont)); - } - - /** - * Adds fallback font by name. - * - * @param ctx the NanoVG context - */ - public static int nvgAddFallbackFont(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence baseFont, @NativeType("char const *") CharSequence fallbackFont) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(baseFont, true); - long baseFontEncoded = stack.getPointerAddress(); - stack.nASCII(fallbackFont, true); - long fallbackFontEncoded = stack.getPointerAddress(); - return nnvgAddFallbackFont(ctx, baseFontEncoded, fallbackFontEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgResetFallbackFontsId ] --- - - /** Unsafe version of: {@link #nvgResetFallbackFontsId ResetFallbackFontsId} */ - public static native void nnvgResetFallbackFontsId(long ctx, int baseFont); - - /** - * Resets fallback fonts by handle. - * - * @param ctx the NanoVG context - */ - public static void nvgResetFallbackFontsId(@NativeType("NVGcontext *") long ctx, int baseFont) { - if (CHECKS) { - check(ctx); - } - nnvgResetFallbackFontsId(ctx, baseFont); - } - - // --- [ nvgResetFallbackFonts ] --- - - /** Unsafe version of: {@link #nvgResetFallbackFonts ResetFallbackFonts} */ - public static native void nnvgResetFallbackFonts(long ctx, long baseFont); - - /** - * Resets fallback fonts by name. - * - * @param ctx the NanoVG context - */ - public static void nvgResetFallbackFonts(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer baseFont) { - if (CHECKS) { - check(ctx); - checkNT1(baseFont); - } - nnvgResetFallbackFonts(ctx, memAddress(baseFont)); - } - - /** - * Resets fallback fonts by name. - * - * @param ctx the NanoVG context - */ - public static void nvgResetFallbackFonts(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence baseFont) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(baseFont, true); - long baseFontEncoded = stack.getPointerAddress(); - nnvgResetFallbackFonts(ctx, baseFontEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgFontSize ] --- - - /** Unsafe version of: {@link #nvgFontSize FontSize} */ - public static native void nnvgFontSize(long ctx, float size); - - /** - * Sets the font size of current text style. - * - * @param ctx the NanoVG context - * @param size the font size to set - */ - public static void nvgFontSize(@NativeType("NVGcontext *") long ctx, float size) { - if (CHECKS) { - check(ctx); - } - nnvgFontSize(ctx, size); - } - - // --- [ nvgFontBlur ] --- - - /** Unsafe version of: {@link #nvgFontBlur FontBlur} */ - public static native void nnvgFontBlur(long ctx, float blur); - - /** - * Sets the blur of current text style. - * - * @param ctx the NanoVG context - * @param blur the blur amount to set - */ - public static void nvgFontBlur(@NativeType("NVGcontext *") long ctx, float blur) { - if (CHECKS) { - check(ctx); - } - nnvgFontBlur(ctx, blur); - } - - // --- [ nvgTextLetterSpacing ] --- - - /** Unsafe version of: {@link #nvgTextLetterSpacing TextLetterSpacing} */ - public static native void nnvgTextLetterSpacing(long ctx, float spacing); - - /** - * Sets the letter spacing of current text style. - * - * @param ctx the NanoVG context - * @param spacing the letter spacing amount to set - */ - public static void nvgTextLetterSpacing(@NativeType("NVGcontext *") long ctx, float spacing) { - if (CHECKS) { - check(ctx); - } - nnvgTextLetterSpacing(ctx, spacing); - } - - // --- [ nvgTextLineHeight ] --- - - /** Unsafe version of: {@link #nvgTextLineHeight TextLineHeight} */ - public static native void nnvgTextLineHeight(long ctx, float lineHeight); - - /** - * Sets the proportional line height of current text style. The line height is specified as multiple of font size. - * - * @param ctx the NanoVG context - * @param lineHeight the line height to set - */ - public static void nvgTextLineHeight(@NativeType("NVGcontext *") long ctx, float lineHeight) { - if (CHECKS) { - check(ctx); - } - nnvgTextLineHeight(ctx, lineHeight); - } - - // --- [ nvgTextAlign ] --- - - /** Unsafe version of: {@link #nvgTextAlign TextAlign} */ - public static native void nnvgTextAlign(long ctx, int align); - - /** - * Sets the text align of current text style. - * - * @param ctx the NanoVG context - * @param align the text align to set. One of:
    {@link #NVG_ALIGN_LEFT ALIGN_LEFT}{@link #NVG_ALIGN_CENTER ALIGN_CENTER}{@link #NVG_ALIGN_RIGHT ALIGN_RIGHT}{@link #NVG_ALIGN_TOP ALIGN_TOP}{@link #NVG_ALIGN_MIDDLE ALIGN_MIDDLE}{@link #NVG_ALIGN_BOTTOM ALIGN_BOTTOM}{@link #NVG_ALIGN_BASELINE ALIGN_BASELINE}
    - */ - public static void nvgTextAlign(@NativeType("NVGcontext *") long ctx, int align) { - if (CHECKS) { - check(ctx); - } - nnvgTextAlign(ctx, align); - } - - // --- [ nvgFontFaceId ] --- - - /** Unsafe version of: {@link #nvgFontFaceId FontFaceId} */ - public static native void nnvgFontFaceId(long ctx, int font); - - /** - * Sets the font face based on specified id of current text style. - * - * @param ctx the NanoVG context - * @param font the font id - */ - public static void nvgFontFaceId(@NativeType("NVGcontext *") long ctx, int font) { - if (CHECKS) { - check(ctx); - } - nnvgFontFaceId(ctx, font); - } - - // --- [ nvgFontFace ] --- - - /** Unsafe version of: {@link #nvgFontFace FontFace} */ - public static native void nnvgFontFace(long ctx, long font); - - /** - * Sets the font face based on specified name of current text style. - * - * @param ctx the NanoVG context - * @param font the font name - */ - public static void nvgFontFace(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer font) { - if (CHECKS) { - check(ctx); - checkNT1(font); - } - nnvgFontFace(ctx, memAddress(font)); - } - - /** - * Sets the font face based on specified name of current text style. - * - * @param ctx the NanoVG context - * @param font the font name - */ - public static void nvgFontFace(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence font) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(font, true); - long fontEncoded = stack.getPointerAddress(); - nnvgFontFace(ctx, fontEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgText ] --- - - /** - * Unsafe version of: {@link #nvgText Text} - * - * @param end a pointer to the end of the sub-string to draw, or {@code NULL} - */ - public static native float nnvgText(long ctx, float x, float y, long string, long end); - - /** - * Draws text string at specified location. If {@code end} is specified only the sub-string up to the {@code end} is drawn. - * - * @param ctx the NanoVG context - * @param x the text X axis coordinate - * @param y the text Y axis coordinate - * @param string the text string to draw - */ - public static float nvgText(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") ByteBuffer string) { - if (CHECKS) { - check(ctx); - } - return nnvgText(ctx, x, y, memAddress(string), memAddress(string) + string.remaining()); - } - - /** - * Draws text string at specified location. If {@code end} is specified only the sub-string up to the {@code end} is drawn. - * - * @param ctx the NanoVG context - * @param x the text X axis coordinate - * @param y the text Y axis coordinate - * @param string the text string to draw - */ - public static float nvgText(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") CharSequence string) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - return nnvgText(ctx, x, y, stringEncoded, stringEncoded + stringEncodedLength); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgTextBox ] --- - - /** - * Unsafe version of: {@link #nvgTextBox TextBox} - * - * @param end a pointer to the end of the sub-string to draw, or {@code NULL} - */ - public static native void nnvgTextBox(long ctx, float x, float y, float breakRowWidth, long string, long end); - - /** - * Draws multi-line text string at specified location wrapped at the specified width. If {@code end} is specified only the sub-string up to the - * {@code end} is drawn. - * - *

    White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered. Words longer - * than the max width are slit at nearest character (i.e. no hyphenation).

    - * - * @param ctx the NanoVG context - * @param x the text box X axis coordinate - * @param y the text box Y axis coordinate - * @param breakRowWidth the maximum row width - * @param string the text string to draw - */ - public static void nvgTextBox(@NativeType("NVGcontext *") long ctx, float x, float y, float breakRowWidth, @NativeType("char const *") ByteBuffer string) { - if (CHECKS) { - check(ctx); - } - nnvgTextBox(ctx, x, y, breakRowWidth, memAddress(string), memAddress(string) + string.remaining()); - } - - /** - * Draws multi-line text string at specified location wrapped at the specified width. If {@code end} is specified only the sub-string up to the - * {@code end} is drawn. - * - *

    White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered. Words longer - * than the max width are slit at nearest character (i.e. no hyphenation).

    - * - * @param ctx the NanoVG context - * @param x the text box X axis coordinate - * @param y the text box Y axis coordinate - * @param breakRowWidth the maximum row width - * @param string the text string to draw - */ - public static void nvgTextBox(@NativeType("NVGcontext *") long ctx, float x, float y, float breakRowWidth, @NativeType("char const *") CharSequence string) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - nnvgTextBox(ctx, x, y, breakRowWidth, stringEncoded, stringEncoded + stringEncodedLength); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgTextBounds ] --- - - /** - * Unsafe version of: {@link #nvgTextBounds TextBounds} - * - * @param end a pointer to the end of the sub-string to measure, or {@code NULL} - */ - public static native float nnvgTextBounds(long ctx, float x, float y, long string, long end, long bounds); - - /** - * Measures the specified text string. - * - *

    Parameter {@code bounds} should be a pointer to {@code float[4]}, if the bounding box of the text should be returned. The bounds value are - * {@code [xmin,ymin, xmax,ymax]}.

    - * - *

    Measured values are returned in local coordinate space.

    - * - * @param ctx the NanoVG context - * @param x the text X axis coordinate - * @param y the text Y axis coordinate - * @param string the text string to measure - * @param bounds returns the bounding box of the text - * - * @return the horizontal advance of the measured text (i.e. where the next character should drawn) - */ - public static float nvgTextBounds(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") ByteBuffer string, @Nullable @NativeType("float *") FloatBuffer bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - return nnvgTextBounds(ctx, x, y, memAddress(string), memAddress(string) + string.remaining(), memAddressSafe(bounds)); - } - - /** - * Measures the specified text string. - * - *

    Parameter {@code bounds} should be a pointer to {@code float[4]}, if the bounding box of the text should be returned. The bounds value are - * {@code [xmin,ymin, xmax,ymax]}.

    - * - *

    Measured values are returned in local coordinate space.

    - * - * @param ctx the NanoVG context - * @param x the text X axis coordinate - * @param y the text Y axis coordinate - * @param string the text string to measure - * @param bounds returns the bounding box of the text - * - * @return the horizontal advance of the measured text (i.e. where the next character should drawn) - */ - public static float nvgTextBounds(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") CharSequence string, @Nullable @NativeType("float *") FloatBuffer bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - return nnvgTextBounds(ctx, x, y, stringEncoded, stringEncoded + stringEncodedLength, memAddressSafe(bounds)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgTextBoxBounds ] --- - - /** - * Unsafe version of: {@link #nvgTextBoxBounds TextBoxBounds} - * - * @param end a pointer to the end of the sub-string to measure, or {@code NULL} - */ - public static native void nnvgTextBoxBounds(long ctx, float x, float y, float breakRowWidth, long string, long end, long bounds); - - /** - * Measures the specified multi-text string. - * - *

    Parameter {@code bounds} should be a pointer to {@code float[4]}, if the bounding box of the text should be returned. The bounds value are - * {@code [xmin,ymin, xmax,ymax]}.

    - * - *

    Measured values are returned in local coordinate space.

    - * - * @param ctx the NanoVG context - * @param x the text box X axis coordinate - * @param y the text box Y axis coordinate - * @param breakRowWidth the maximum row width - * @param string the text string to measure - * @param bounds returns the bounding box of the text box - */ - public static void nvgTextBoxBounds(@NativeType("NVGcontext *") long ctx, float x, float y, float breakRowWidth, @NativeType("char const *") ByteBuffer string, @Nullable @NativeType("float *") FloatBuffer bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - nnvgTextBoxBounds(ctx, x, y, breakRowWidth, memAddress(string), memAddress(string) + string.remaining(), memAddressSafe(bounds)); - } - - /** - * Measures the specified multi-text string. - * - *

    Parameter {@code bounds} should be a pointer to {@code float[4]}, if the bounding box of the text should be returned. The bounds value are - * {@code [xmin,ymin, xmax,ymax]}.

    - * - *

    Measured values are returned in local coordinate space.

    - * - * @param ctx the NanoVG context - * @param x the text box X axis coordinate - * @param y the text box Y axis coordinate - * @param breakRowWidth the maximum row width - * @param string the text string to measure - * @param bounds returns the bounding box of the text box - */ - public static void nvgTextBoxBounds(@NativeType("NVGcontext *") long ctx, float x, float y, float breakRowWidth, @NativeType("char const *") CharSequence string, @Nullable @NativeType("float *") FloatBuffer bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - nnvgTextBoxBounds(ctx, x, y, breakRowWidth, stringEncoded, stringEncoded + stringEncodedLength, memAddressSafe(bounds)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgTextGlyphPositions ] --- - - /** - * Unsafe version of: {@link #nvgTextGlyphPositions TextGlyphPositions} - * - * @param end a pointer to the end of the sub-string to measure, or {@code NULL} - * @param maxPositions the maximum number of glyph positions to return - */ - public static native int nnvgTextGlyphPositions(long ctx, float x, float y, long string, long end, long positions, int maxPositions); - - /** - * Calculates the glyph x positions of the specified text. If {@code end} is specified only the sub-string will be used. - * - *

    Measured values are returned in local coordinate space.

    - * - * @param ctx the NanoVG context - * @param x the text X axis coordinate - * @param y the text Y axis coordinate - * @param string the text string to measure - * @param positions returns the glyph x positions - */ - public static int nvgTextGlyphPositions(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") ByteBuffer string, @NativeType("NVGglyphPosition *") NVGGlyphPosition.Buffer positions) { - if (CHECKS) { - check(ctx); - } - return nnvgTextGlyphPositions(ctx, x, y, memAddress(string), memAddress(string) + string.remaining(), positions.address(), positions.remaining()); - } - - /** - * Calculates the glyph x positions of the specified text. If {@code end} is specified only the sub-string will be used. - * - *

    Measured values are returned in local coordinate space.

    - * - * @param ctx the NanoVG context - * @param x the text X axis coordinate - * @param y the text Y axis coordinate - * @param string the text string to measure - * @param positions returns the glyph x positions - */ - public static int nvgTextGlyphPositions(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") CharSequence string, @NativeType("NVGglyphPosition *") NVGGlyphPosition.Buffer positions) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - return nnvgTextGlyphPositions(ctx, x, y, stringEncoded, stringEncoded + stringEncodedLength, positions.address(), positions.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgTextMetrics ] --- - - /** Unsafe version of: {@link #nvgTextMetrics TextMetrics} */ - public static native void nnvgTextMetrics(long ctx, long ascender, long descender, long lineh); - - /** - * Returns the vertical metrics based on the current text style. - * - *

    Measured values are returned in local coordinate space.

    - * - * @param ctx the NanoVG context - * @param ascender the line ascend - * @param descender the line descend - * @param lineh the line height - */ - public static void nvgTextMetrics(@NativeType("NVGcontext *") long ctx, @Nullable @NativeType("float *") FloatBuffer ascender, @Nullable @NativeType("float *") FloatBuffer descender, @Nullable @NativeType("float *") FloatBuffer lineh) { - if (CHECKS) { - check(ctx); - checkSafe(ascender, 1); - checkSafe(descender, 1); - checkSafe(lineh, 1); - } - nnvgTextMetrics(ctx, memAddressSafe(ascender), memAddressSafe(descender), memAddressSafe(lineh)); - } - - // --- [ nvgTextBreakLines ] --- - - /** - * Unsafe version of: {@link #nvgTextBreakLines TextBreakLines} - * - * @param end a pointer to the end of the sub-string to measure, or {@code NULL} - * @param maxRows the maximum number of text rows to return - */ - public static native int nnvgTextBreakLines(long ctx, long string, long end, float breakRowWidth, long rows, int maxRows); - - /** - * Breaks the specified text into lines. If {@code end} is specified only the sub-string will be used. - * - *

    White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered. Words longer - * than the max width are slit at nearest character (i.e. no hyphenation).

    - * - * @param ctx the NanoVG context - * @param string the text string to measure - * @param breakRowWidth the maximum row width - * @param rows returns the text rows - */ - public static int nvgTextBreakLines(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") ByteBuffer string, float breakRowWidth, @NativeType("NVGtextRow *") NVGTextRow.Buffer rows) { - if (CHECKS) { - check(ctx); - } - return nnvgTextBreakLines(ctx, memAddress(string), memAddress(string) + string.remaining(), breakRowWidth, rows.address(), rows.remaining()); - } - - /** - * Breaks the specified text into lines. If {@code end} is specified only the sub-string will be used. - * - *

    White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered. Words longer - * than the max width are slit at nearest character (i.e. no hyphenation).

    - * - * @param ctx the NanoVG context - * @param string the text string to measure - * @param breakRowWidth the maximum row width - * @param rows returns the text rows - */ - public static int nvgTextBreakLines(@NativeType("NVGcontext *") long ctx, @NativeType("char const *") CharSequence string, float breakRowWidth, @NativeType("NVGtextRow *") NVGTextRow.Buffer rows) { - if (CHECKS) { - check(ctx); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - return nnvgTextBreakLines(ctx, stringEncoded, stringEncoded + stringEncodedLength, breakRowWidth, rows.address(), rows.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ nvgCreateInternal ] --- - - @NativeType("void *") - private static native long nvgCreateInternal(); - - static final long nvgCreateInternal = nvgCreateInternal(); - - // --- [ nvgInternalParams ] --- - - @NativeType("void *") - private static native long nvgInternalParams(); - - static final long nvgInternalParams = nvgInternalParams(); - - // --- [ nvgDeleteInternal ] --- - - @NativeType("void *") - private static native long nvgDeleteInternal(); - - static final long nvgDeleteInternal = nvgDeleteInternal(); - - /** Array version of: {@link #nnvgCurrentTransform} */ - public static native void nnvgCurrentTransform(long ctx, float[] xform); - - /** Array version of: {@link #nvgCurrentTransform CurrentTransform} */ - public static void nvgCurrentTransform(@NativeType("NVGcontext *") long ctx, @NativeType("float *") float[] xform) { - if (CHECKS) { - check(ctx); - check(xform, 6); - } - nnvgCurrentTransform(ctx, xform); - } - - /** Array version of: {@link #nnvgTransformIdentity} */ - public static native void nnvgTransformIdentity(float[] dst); - - /** Array version of: {@link #nvgTransformIdentity TransformIdentity} */ - public static void nvgTransformIdentity(@NativeType("float *") float[] dst) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformIdentity(dst); - } - - /** Array version of: {@link #nnvgTransformTranslate} */ - public static native void nnvgTransformTranslate(float[] dst, float tx, float ty); - - /** Array version of: {@link #nvgTransformTranslate TransformTranslate} */ - public static void nvgTransformTranslate(@NativeType("float *") float[] dst, float tx, float ty) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformTranslate(dst, tx, ty); - } - - /** Array version of: {@link #nnvgTransformScale} */ - public static native void nnvgTransformScale(float[] dst, float sx, float sy); - - /** Array version of: {@link #nvgTransformScale TransformScale} */ - public static void nvgTransformScale(@NativeType("float *") float[] dst, float sx, float sy) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformScale(dst, sx, sy); - } - - /** Array version of: {@link #nnvgTransformRotate} */ - public static native void nnvgTransformRotate(float[] dst, float a); - - /** Array version of: {@link #nvgTransformRotate TransformRotate} */ - public static void nvgTransformRotate(@NativeType("float *") float[] dst, float a) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformRotate(dst, a); - } - - /** Array version of: {@link #nnvgTransformSkewX} */ - public static native void nnvgTransformSkewX(float[] dst, float a); - - /** Array version of: {@link #nvgTransformSkewX TransformSkewX} */ - public static void nvgTransformSkewX(@NativeType("float *") float[] dst, float a) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformSkewX(dst, a); - } - - /** Array version of: {@link #nnvgTransformSkewY} */ - public static native void nnvgTransformSkewY(float[] dst, float a); - - /** Array version of: {@link #nvgTransformSkewY TransformSkewY} */ - public static void nvgTransformSkewY(@NativeType("float *") float[] dst, float a) { - if (CHECKS) { - check(dst, 6); - } - nnvgTransformSkewY(dst, a); - } - - /** Array version of: {@link #nnvgTransformMultiply} */ - public static native void nnvgTransformMultiply(float[] dst, float[] src); - - /** Array version of: {@link #nvgTransformMultiply TransformMultiply} */ - public static void nvgTransformMultiply(@NativeType("float *") float[] dst, @NativeType("float const *") float[] src) { - if (CHECKS) { - check(dst, 6); - check(src, 6); - } - nnvgTransformMultiply(dst, src); - } - - /** Array version of: {@link #nnvgTransformPremultiply} */ - public static native void nnvgTransformPremultiply(float[] dst, float[] src); - - /** Array version of: {@link #nvgTransformPremultiply TransformPremultiply} */ - public static void nvgTransformPremultiply(@NativeType("float *") float[] dst, @NativeType("float const *") float[] src) { - if (CHECKS) { - check(dst, 6); - check(src, 6); - } - nnvgTransformPremultiply(dst, src); - } - - /** Array version of: {@link #nnvgTransformInverse} */ - public static native int nnvgTransformInverse(float[] dst, float[] src); - - /** Array version of: {@link #nvgTransformInverse TransformInverse} */ - @NativeType("int") - public static boolean nvgTransformInverse(@NativeType("float *") float[] dst, @NativeType("float const *") float[] src) { - if (CHECKS) { - check(dst, 6); - check(src, 6); - } - return nnvgTransformInverse(dst, src) != 0; - } - - /** Array version of: {@link #nnvgTransformPoint} */ - public static native void nnvgTransformPoint(float[] dstx, float[] dsty, float[] xform, float srcx, float srcy); - - /** Array version of: {@link #nvgTransformPoint TransformPoint} */ - public static void nvgTransformPoint(@NativeType("float *") float[] dstx, @NativeType("float *") float[] dsty, @NativeType("float const *") float[] xform, float srcx, float srcy) { - if (CHECKS) { - check(dstx, 1); - check(dsty, 1); - check(xform, 6); - } - nnvgTransformPoint(dstx, dsty, xform, srcx, srcy); - } - - /** Array version of: {@link #nnvgImageSize} */ - public static native void nnvgImageSize(long ctx, int image, int[] w, int[] h); - - /** Array version of: {@link #nvgImageSize ImageSize} */ - public static void nvgImageSize(@NativeType("NVGcontext *") long ctx, int image, @NativeType("int *") int[] w, @NativeType("int *") int[] h) { - if (CHECKS) { - check(ctx); - check(w, 1); - check(h, 1); - } - nnvgImageSize(ctx, image, w, h); - } - - /** Array version of: {@link #nnvgTextBounds} */ - public static native float nnvgTextBounds(long ctx, float x, float y, long string, long end, float[] bounds); - - /** Array version of: {@link #nvgTextBounds TextBounds} */ - public static float nvgTextBounds(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") ByteBuffer string, @Nullable @NativeType("float *") float[] bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - return nnvgTextBounds(ctx, x, y, memAddress(string), memAddress(string) + string.remaining(), bounds); - } - - /** Array version of: {@link #nvgTextBounds TextBounds} */ - public static float nvgTextBounds(@NativeType("NVGcontext *") long ctx, float x, float y, @NativeType("char const *") CharSequence string, @Nullable @NativeType("float *") float[] bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - return nnvgTextBounds(ctx, x, y, stringEncoded, stringEncoded + stringEncodedLength, bounds); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nnvgTextBoxBounds} */ - public static native void nnvgTextBoxBounds(long ctx, float x, float y, float breakRowWidth, long string, long end, float[] bounds); - - /** Array version of: {@link #nvgTextBoxBounds TextBoxBounds} */ - public static void nvgTextBoxBounds(@NativeType("NVGcontext *") long ctx, float x, float y, float breakRowWidth, @NativeType("char const *") ByteBuffer string, @Nullable @NativeType("float *") float[] bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - nnvgTextBoxBounds(ctx, x, y, breakRowWidth, memAddress(string), memAddress(string) + string.remaining(), bounds); - } - - /** Array version of: {@link #nvgTextBoxBounds TextBoxBounds} */ - public static void nvgTextBoxBounds(@NativeType("NVGcontext *") long ctx, float x, float y, float breakRowWidth, @NativeType("char const *") CharSequence string, @Nullable @NativeType("float *") float[] bounds) { - if (CHECKS) { - check(ctx); - checkSafe(bounds, 4); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - nnvgTextBoxBounds(ctx, x, y, breakRowWidth, stringEncoded, stringEncoded + stringEncodedLength, bounds); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nnvgTextMetrics} */ - public static native void nnvgTextMetrics(long ctx, float[] ascender, float[] descender, float[] lineh); - - /** Array version of: {@link #nvgTextMetrics TextMetrics} */ - public static void nvgTextMetrics(@NativeType("NVGcontext *") long ctx, @Nullable @NativeType("float *") float[] ascender, @Nullable @NativeType("float *") float[] descender, @Nullable @NativeType("float *") float[] lineh) { - if (CHECKS) { - check(ctx); - checkSafe(ascender, 1); - checkSafe(descender, 1); - checkSafe(lineh, 1); - } - nnvgTextMetrics(ctx, ascender, descender, lineh); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGBGFX.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGBGFX.java deleted file mode 100644 index 6c351bac..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGBGFX.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.nanovg.NanoVG.*; - -/** Implementation of the NanoVG API using bgfx. */ -public class NanoVGBGFX { - - /** Contains the function pointers loaded from bgfx. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - Create = apiGetFunctionAddress(BGFX.getLibrary(), "nvgCreate"), - Delete = apiGetFunctionAddress(BGFX.getLibrary(), "nvgDelete"), - SetViewId = apiGetFunctionAddress(BGFX.getLibrary(), "nvgSetViewId"), - GetViewId = apiGetFunctionAddress(BGFX.getLibrary(), "nvgGetViewId"), - luCreateFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluCreateFramebuffer"), - luBindFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluBindFramebuffer"), - luDeleteFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluDeleteFramebuffer"), - luSetViewFramebuffer = apiGetFunctionAddress(BGFX.getLibrary(), "nvgluSetViewFramebuffer"), - CreateBgfxTexture = apiGetFunctionAddress(BGFX.getLibrary(), "nvgCreateBgfxTexture"), - org_lwjgl_nanovg_setup = apiGetFunctionAddress(BGFX.getLibrary(), "org_lwjgl_nanovg_setup"); - - } - - /** - * These are additional flags on top of NVGimageFlags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_IMAGE_NODELETE IMAGE_NODELETE} - Do not delete GL texture handle.
    • - *
    - */ - public static final int NVG_IMAGE_NODELETE = 1<<16; - - static { - MemoryAllocator allocator = getAllocator(Configuration.DEBUG_MEMORY_ALLOCATOR_INTERNAL.get(true)); - org_lwjgl_nanovg_setup( - allocator.getRealloc(), - allocator.getFree(), - nvgCreateInternal, - nvgInternalParams, - nvgDeleteInternal - ); - } - - protected NanoVGBGFX() { - throw new UnsupportedOperationException(); - } - - // --- [ nvgCreate ] --- - - public static long nnvgCreate(int _edgeaa, short _viewId, long _allocator) { - long __functionAddress = Functions.Create; - return invokePP(_edgeaa, _viewId, _allocator, __functionAddress); - } - - @NativeType("NVGcontext *") - public static long nvgCreate(@NativeType("int32_t") boolean _edgeaa, @NativeType("bgfx_view_id_t") int _viewId, @NativeType("bgfx_allocator_interface_t *") long _allocator) { - return nnvgCreate(_edgeaa ? 1 : 0, (short)_viewId, _allocator); - } - - // --- [ nvgDelete ] --- - - public static void nvgDelete(@NativeType("NVGcontext *") long _ctx) { - long __functionAddress = Functions.Delete; - if (CHECKS) { - check(_ctx); - } - invokePV(_ctx, __functionAddress); - } - - // --- [ nvgSetViewId ] --- - - public static void nnvgSetViewId(long _ctx, short _viewId) { - long __functionAddress = Functions.SetViewId; - if (CHECKS) { - check(_ctx); - } - invokePV(_ctx, _viewId, __functionAddress); - } - - public static void nvgSetViewId(@NativeType("NVGcontext *") long _ctx, @NativeType("bgfx_view_id_t") int _viewId) { - nnvgSetViewId(_ctx, (short)_viewId); - } - - // --- [ nvgGetViewId ] --- - - @NativeType("uint16_t") - public static short nvgGetViewId(@NativeType("NVGcontext *") long _ctx) { - long __functionAddress = Functions.GetViewId; - if (CHECKS) { - check(_ctx); - } - return invokePC(_ctx, __functionAddress); - } - - // --- [ nvgluCreateFramebuffer ] --- - - public static long nnvgluCreateFramebuffer(long _ctx, int _width, int _height, int imageFlags) { - long __functionAddress = Functions.luCreateFramebuffer; - if (CHECKS) { - check(_ctx); - } - return invokePP(_ctx, _width, _height, imageFlags, __functionAddress); - } - - @Nullable - @NativeType("NVGLUframebuffer *") - public static NVGLUFramebufferBGFX nvgluCreateFramebuffer(@NativeType("NVGcontext *") long _ctx, @NativeType("int32_t") int _width, @NativeType("int32_t") int _height, @NativeType("int32_t") int imageFlags) { - long __result = nnvgluCreateFramebuffer(_ctx, _width, _height, imageFlags); - return NVGLUFramebufferBGFX.createSafe(__result); - } - - // --- [ nvgluBindFramebuffer ] --- - - public static void nnvgluBindFramebuffer(long _framebuffer) { - long __functionAddress = Functions.luBindFramebuffer; - invokePV(_framebuffer, __functionAddress); - } - - public static void nvgluBindFramebuffer(@Nullable @NativeType("NVGLUframebuffer *") NVGLUFramebufferBGFX _framebuffer) { - nnvgluBindFramebuffer(memAddressSafe(_framebuffer)); - } - - // --- [ nvgluDeleteFramebuffer ] --- - - public static void nnvgluDeleteFramebuffer(long _framebuffer) { - long __functionAddress = Functions.luDeleteFramebuffer; - invokePV(_framebuffer, __functionAddress); - } - - public static void nvgluDeleteFramebuffer(@NativeType("NVGLUframebuffer *") NVGLUFramebufferBGFX _framebuffer) { - nnvgluDeleteFramebuffer(_framebuffer.address()); - } - - // --- [ nvgluSetViewFramebuffer ] --- - - public static void nnvgluSetViewFramebuffer(short _view_id, long _framebuffer) { - long __functionAddress = Functions.luSetViewFramebuffer; - invokePV(_view_id, _framebuffer, __functionAddress); - } - - public static void nvgluSetViewFramebuffer(@NativeType("bgfx_view_id_t") int _view_id, @NativeType("NVGLUframebuffer *") NVGLUFramebufferBGFX _framebuffer) { - nnvgluSetViewFramebuffer((short)_view_id, _framebuffer.address()); - } - - // --- [ nvgCreateBgfxTexture ] --- - - public static void nvgCreateBgfxTexture(@NativeType("NVGcontext *") long _ctx, @NativeType("bgfx_texture_handle_t") short _id, int _width, int _height, int flags) { - long __functionAddress = Functions.CreateBgfxTexture; - if (CHECKS) { - check(_ctx); - } - invokePV(_ctx, _id, _width, _height, flags, __functionAddress); - } - - // --- [ org_lwjgl_nanovg_setup ] --- - - private static void org_lwjgl_nanovg_setup(@NativeType("void *") long realloc, @NativeType("void *") long free, @NativeType("void *") long nvgCreateInternal, @NativeType("void *") long nvgInternalParams, @NativeType("void *") long nvgDeleteInternal) { - long __functionAddress = Functions.org_lwjgl_nanovg_setup; - if (CHECKS) { - check(realloc); - check(free); - check(nvgCreateInternal); - check(nvgInternalParams); - check(nvgDeleteInternal); - } - invokePPPPPV(realloc, free, nvgCreateInternal, nvgInternalParams, nvgDeleteInternal, __functionAddress); - } - - private static class BGFX { - private static final SharedLibrary library; - - static { - try { - library = (SharedLibrary)Class.forName("org.lwjgl.bgfx.BGFX").getMethod("getLibrary").invoke(null); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - static SharedLibrary getLibrary() { - return library; - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGL2.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGL2.java deleted file mode 100644 index 09071184..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGL2.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Implementation of the NanoVG API using OpenGL 2.0. */ -public class NanoVGGL2 { - - static { LibNanoVG.initialize(); } - - /** - * Create flags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_ANTIALIAS ANTIALIAS} - Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).
    • - *
    • {@link #NVG_STENCIL_STROKES STENCIL_STROKES} - - * Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little slower, but path overlaps (i.e. self-intersecting - * or sharp turns) will be drawn just once. - *
    • - *
    • {@link #NVG_DEBUG DEBUG} - Flag indicating that additional debug checks are done.
    • - *
    - */ - public static final int - NVG_ANTIALIAS = 1<<0, - NVG_STENCIL_STROKES = 1<<1, - NVG_DEBUG = 1<<2; - - /** - * These are additional flags on top of NVGimageFlags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_IMAGE_NODELETE IMAGE_NODELETE} - Do not delete GL texture handle.
    • - *
    - */ - public static final int NVG_IMAGE_NODELETE = 1<<16; - - protected NanoVGGL2() { - throw new UnsupportedOperationException(); - } - - // --- [ nvglCreateImageFromHandle ] --- - - /** Unsafe version of: {@link #nvglCreateImageFromHandle lCreateImageFromHandle} */ - public static native int nnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags); - - /** - * Creates a NanoVG image from an OpenGL texture. - * - * @param ctx the NanoVG context - * @param textureId the OpenGL texture id - * @param w the image width - * @param h the image height - * @param flags the image flags - * - * @return a handle to the image - */ - public static int nvglCreateImageFromHandle(@NativeType("NVGcontext *") long ctx, @NativeType("GLuint") int textureId, int w, int h, int flags) { - if (CHECKS) { - check(ctx); - } - return nnvglCreateImageFromHandle(ctx, textureId, w, h, flags); - } - - // --- [ nvglImageHandle ] --- - - /** Unsafe version of: {@link #nvglImageHandle lImageHandle} */ - public static native int nnvglImageHandle(long ctx, int image); - - /** - * Returns the OpenGL texture id associated with a NanoVG image. - * - * @param ctx the NanoVG context - * @param image the image handle - */ - @NativeType("GLuint") - public static int nvglImageHandle(@NativeType("NVGcontext *") long ctx, int image) { - if (CHECKS) { - check(ctx); - } - return nnvglImageHandle(ctx, image); - } - - // --- [ nvgCreate ] --- - - /** Unsafe version of: {@link #nvgCreate Create} */ - public static native long nnvgCreate(int flags); - - /** - * Creates a NanoVG context with an OpenGL 2.0 rendering back-end. - * - *

    An OpenGL 2.0+ context must be current in the current thread when this function is called and the returned NanoVG context may only be used in the - * thread in which that OpenGL context is current.

    - * - * @param flags the context flags. One of:
    {@link #NVG_ANTIALIAS ANTIALIAS}{@link #NVG_STENCIL_STROKES STENCIL_STROKES}{@link #NVG_DEBUG DEBUG}
    - */ - @NativeType("NVGcontext *") - public static long nvgCreate(int flags) { - return nnvgCreate(flags); - } - - // --- [ nvgDelete ] --- - - /** Unsafe version of: {@link #nvgDelete Delete} */ - public static native void nnvgDelete(long ctx); - - /** - * Deletes a NanoVG context created with {@link #nvgCreate Create}. - * - * @param ctx the NanoVG context - */ - public static void nvgDelete(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgDelete(ctx); - } - - // --- [ nvgluCreateFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluCreateFramebuffer luCreateFramebuffer} */ - public static native long nnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags); - - /** - * Creates a framebuffer object to render to. - * - * @param ctx the NanoVG context - * @param w the framebuffer width - * @param h the framebuffer height - * @param imageFlags the image flags - */ - @Nullable - @NativeType("NVGLUframebuffer *") - public static NVGLUFramebuffer nvgluCreateFramebuffer(@NativeType("NVGcontext *") long ctx, int w, int h, int imageFlags) { - if (CHECKS) { - check(ctx); - } - long __result = nnvgluCreateFramebuffer(ctx, w, h, imageFlags); - return NVGLUFramebuffer.createSafe(__result); - } - - // --- [ nvgluBindFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluBindFramebuffer luBindFramebuffer} */ - public static native void nnvgluBindFramebuffer(long ctx, long fb); - - /** - * Binds the framebuffer object associated with the specified {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to bind - */ - public static void nvgluBindFramebuffer(@NativeType("NVGcontext *") long ctx, @Nullable @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluBindFramebuffer(ctx, memAddressSafe(fb)); - } - - // --- [ nvgluDeleteFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluDeleteFramebuffer luDeleteFramebuffer} */ - public static native void nnvgluDeleteFramebuffer(long ctx, long fb); - - /** - * Deletes an {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to delete - */ - public static void nvgluDeleteFramebuffer(@NativeType("NVGcontext *") long ctx, @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluDeleteFramebuffer(ctx, fb.address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGL3.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGL3.java deleted file mode 100644 index 7b9928c8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGL3.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Implementation of the NanoVG API using OpenGL 3.0. */ -public class NanoVGGL3 { - - static { LibNanoVG.initialize(); } - - /** - * Create flags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_ANTIALIAS ANTIALIAS} - Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).
    • - *
    • {@link #NVG_STENCIL_STROKES STENCIL_STROKES} - - * Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little slower, but path overlaps (i.e. self-intersecting - * or sharp turns) will be drawn just once. - *
    • - *
    • {@link #NVG_DEBUG DEBUG} - Flag indicating that additional debug checks are done.
    • - *
    - */ - public static final int - NVG_ANTIALIAS = 1<<0, - NVG_STENCIL_STROKES = 1<<1, - NVG_DEBUG = 1<<2; - - /** - * These are additional flags on top of NVGimageFlags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_IMAGE_NODELETE IMAGE_NODELETE} - Do not delete GL texture handle.
    • - *
    - */ - public static final int NVG_IMAGE_NODELETE = 1<<16; - - protected NanoVGGL3() { - throw new UnsupportedOperationException(); - } - - // --- [ nvglCreateImageFromHandle ] --- - - /** Unsafe version of: {@link #nvglCreateImageFromHandle lCreateImageFromHandle} */ - public static native int nnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags); - - /** - * Creates a NanoVG image from an OpenGL texture. - * - * @param ctx the NanoVG context - * @param textureId the OpenGL texture id - * @param w the image width - * @param h the image height - * @param flags the image flags - * - * @return a handle to the image - */ - public static int nvglCreateImageFromHandle(@NativeType("NVGcontext *") long ctx, @NativeType("GLuint") int textureId, int w, int h, int flags) { - if (CHECKS) { - check(ctx); - } - return nnvglCreateImageFromHandle(ctx, textureId, w, h, flags); - } - - // --- [ nvglImageHandle ] --- - - /** Unsafe version of: {@link #nvglImageHandle lImageHandle} */ - public static native int nnvglImageHandle(long ctx, int image); - - /** - * Returns the OpenGL texture id associated with a NanoVG image. - * - * @param ctx the NanoVG context - * @param image the image handle - */ - @NativeType("GLuint") - public static int nvglImageHandle(@NativeType("NVGcontext *") long ctx, int image) { - if (CHECKS) { - check(ctx); - } - return nnvglImageHandle(ctx, image); - } - - // --- [ nvgCreate ] --- - - /** Unsafe version of: {@link #nvgCreate Create} */ - public static native long nnvgCreate(int flags); - - /** - * Creates a NanoVG context with an OpenGL 3.0 rendering back-end. - * - *

    An OpenGL 3.0+ context must be current in the current thread when this function is called and the returned NanoVG context may only be used in the - * thread in which that OpenGL context is current.

    - * - * @param flags the context flags. One of:
    {@link #NVG_ANTIALIAS ANTIALIAS}{@link #NVG_STENCIL_STROKES STENCIL_STROKES}{@link #NVG_DEBUG DEBUG}
    - */ - @NativeType("NVGcontext *") - public static long nvgCreate(int flags) { - return nnvgCreate(flags); - } - - // --- [ nvgDelete ] --- - - /** Unsafe version of: {@link #nvgDelete Delete} */ - public static native void nnvgDelete(long ctx); - - /** - * Deletes a NanoVG context created with {@link #nvgCreate Create}. - * - * @param ctx the NanoVG context - */ - public static void nvgDelete(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgDelete(ctx); - } - - // --- [ nvgluCreateFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluCreateFramebuffer luCreateFramebuffer} */ - public static native long nnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags); - - /** - * Creates a framebuffer object to render to. - * - * @param ctx the NanoVG context - * @param w the framebuffer width - * @param h the framebuffer height - * @param imageFlags the image flags - */ - @Nullable - @NativeType("NVGLUframebuffer *") - public static NVGLUFramebuffer nvgluCreateFramebuffer(@NativeType("NVGcontext *") long ctx, int w, int h, int imageFlags) { - if (CHECKS) { - check(ctx); - } - long __result = nnvgluCreateFramebuffer(ctx, w, h, imageFlags); - return NVGLUFramebuffer.createSafe(__result); - } - - // --- [ nvgluBindFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluBindFramebuffer luBindFramebuffer} */ - public static native void nnvgluBindFramebuffer(long ctx, long fb); - - /** - * Binds the framebuffer object associated with the specified {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to bind - */ - public static void nvgluBindFramebuffer(@NativeType("NVGcontext *") long ctx, @Nullable @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluBindFramebuffer(ctx, memAddressSafe(fb)); - } - - // --- [ nvgluDeleteFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluDeleteFramebuffer luDeleteFramebuffer} */ - public static native void nnvgluDeleteFramebuffer(long ctx, long fb); - - /** - * Deletes an {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to delete - */ - public static void nvgluDeleteFramebuffer(@NativeType("NVGcontext *") long ctx, @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluDeleteFramebuffer(ctx, fb.address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLConfig.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLConfig.java deleted file mode 100644 index dcb2e230..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLConfig.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.nanovg; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import java.lang.reflect.*; - -import static org.lwjgl.system.MemoryUtil.*; - -final class NanoVGGLConfig { - - private NanoVGGLConfig() { - } - - // Use reflection to be able to compile without GL or GLES. - - static void configGL(long pointersAddress) { - config(pointersAddress, getFunctionProvider("org.lwjgl.opengl.GL")); - } - - static void configGLES(long pointersAddress) { - config(pointersAddress, getFunctionProvider("org.lwjgl.opengles.GLES")); - } - - private static FunctionProvider getFunctionProvider(String className) { - try { - Class c = Class.forName(className); - - // verify context is current - Method getCapabilities = c.getMethod("getCapabilities"); - getCapabilities.invoke(null); - - Method getFunctionProvider = c.getMethod("getFunctionProvider"); - return (FunctionProvider)getFunctionProvider.invoke(null); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private static void config(long pointersAddress, FunctionProvider fp) { - String[] functions = new String[] { - "glActiveTexture", - "glAttachShader", - "glBindAttribLocation", - "glBindBuffer", - "glBindBufferRange", - "glBindFramebuffer", - "glBindRenderbuffer", - "glBindTexture", - "glBindVertexArray", - "glBlendFunc", - "glBlendFuncSeparate", - "glBufferData", - "glCheckFramebufferStatus", - "glColorMask", - "glCompileShader", - "glCreateProgram", - "glCreateShader", - "glCullFace", - "glDeleteBuffers", - "glDeleteFramebuffers", - "glDeleteProgram", - "glDeleteRenderbuffers", - "glDeleteShader", - "glDeleteTextures", - "glDeleteVertexArrays", - "glDetachShader", - "glDisable", - "glDisableVertexAttribArray", - "glDrawArrays", - "glEnable", - "glEnableVertexAttribArray", - "glFinish", - "glFlush", - "glFramebufferRenderbuffer", - "glFramebufferTexture2D", - "glFrontFace", - "glGenBuffers", - "glGenFramebuffers", - "glGenRenderbuffers", - "glGenTextures", - "glGenVertexArrays", - "glGenerateMipmap", - "glGetError", - "glGetIntegerv", - "glGetProgramiv", - "glGetProgramInfoLog", - "glGetShaderiv", - "glGetShaderInfoLog", - "glGetUniformBlockIndex", - "glGetUniformLocation", - "glLinkProgram", - "glPixelStorei", - "glRenderbufferStorage", - "glShaderSource", - "glStencilFunc", - "glStencilMask", - "glStencilOp", - "glStencilOpSeparate", - "glTexImage2D", - "glTexParameteri", - "glTexSubImage2D", - "glUniform1i", - "glUniform2fv", - "glUniform4fv", - "glUniformBlockBinding", - "glUseProgram", - "glVertexAttribPointer" - }; - - PointerBuffer pointers = memPointerBuffer(pointersAddress, functions.length); - for (int i = 0; i < functions.length; i++) { - pointers.put(i, fp.getFunctionAddress(functions[i])); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLES2.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLES2.java deleted file mode 100644 index fcb177a0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLES2.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Implementation of the NanoVG API using OpenGL ES 2.0. */ -public class NanoVGGLES2 { - - static { LibNanoVG.initialize(); } - - /** - * Create flags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_ANTIALIAS ANTIALIAS} - Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).
    • - *
    • {@link #NVG_STENCIL_STROKES STENCIL_STROKES} - - * Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little slower, but path overlaps (i.e. self-intersecting - * or sharp turns) will be drawn just once. - *
    • - *
    • {@link #NVG_DEBUG DEBUG} - Flag indicating that additional debug checks are done.
    • - *
    - */ - public static final int - NVG_ANTIALIAS = 1<<0, - NVG_STENCIL_STROKES = 1<<1, - NVG_DEBUG = 1<<2; - - /** - * These are additional flags on top of NVGimageFlags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_IMAGE_NODELETE IMAGE_NODELETE} - Do not delete GL texture handle.
    • - *
    - */ - public static final int NVG_IMAGE_NODELETE = 1<<16; - - protected NanoVGGLES2() { - throw new UnsupportedOperationException(); - } - - // --- [ nvglCreateImageFromHandle ] --- - - /** Unsafe version of: {@link #nvglCreateImageFromHandle lCreateImageFromHandle} */ - public static native int nnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags); - - /** - * Creates a NanoVG image from an OpenGL texture. - * - * @param ctx the NanoVG context - * @param textureId the OpenGL texture id - * @param w the image width - * @param h the image height - * @param flags the image flags - * - * @return a handle to the image - */ - public static int nvglCreateImageFromHandle(@NativeType("NVGcontext *") long ctx, @NativeType("GLuint") int textureId, int w, int h, int flags) { - if (CHECKS) { - check(ctx); - } - return nnvglCreateImageFromHandle(ctx, textureId, w, h, flags); - } - - // --- [ nvglImageHandle ] --- - - /** Unsafe version of: {@link #nvglImageHandle lImageHandle} */ - public static native int nnvglImageHandle(long ctx, int image); - - /** - * Returns the OpenGL texture id associated with a NanoVG image. - * - * @param ctx the NanoVG context - * @param image the image handle - */ - @NativeType("GLuint") - public static int nvglImageHandle(@NativeType("NVGcontext *") long ctx, int image) { - if (CHECKS) { - check(ctx); - } - return nnvglImageHandle(ctx, image); - } - - // --- [ nvgCreate ] --- - - /** Unsafe version of: {@link #nvgCreate Create} */ - public static native long nnvgCreate(int flags); - - /** - * Creates a NanoVG context with an OpenGL ES 2.0 rendering back-end. - * - *

    An OpenGL ES 2.0+ context must be current in the current thread when this function is called and the returned NanoVG context may only be used in - * the thread in which that OpenGL context is current.

    - * - * @param flags the context flags. One of:
    {@link #NVG_ANTIALIAS ANTIALIAS}{@link #NVG_STENCIL_STROKES STENCIL_STROKES}{@link #NVG_DEBUG DEBUG}
    - */ - @NativeType("NVGcontext *") - public static long nvgCreate(int flags) { - return nnvgCreate(flags); - } - - // --- [ nvgDelete ] --- - - /** Unsafe version of: {@link #nvgDelete Delete} */ - public static native void nnvgDelete(long ctx); - - /** - * Deletes a NanoVG context created with {@link #nvgCreate Create}. - * - * @param ctx the NanoVG context - */ - public static void nvgDelete(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgDelete(ctx); - } - - // --- [ nvgluCreateFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluCreateFramebuffer luCreateFramebuffer} */ - public static native long nnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags); - - /** - * Creates a framebuffer object to render to. - * - * @param ctx the NanoVG context - * @param w the framebuffer width - * @param h the framebuffer height - * @param imageFlags the image flags - */ - @Nullable - @NativeType("NVGLUframebuffer *") - public static NVGLUFramebuffer nvgluCreateFramebuffer(@NativeType("NVGcontext *") long ctx, int w, int h, int imageFlags) { - if (CHECKS) { - check(ctx); - } - long __result = nnvgluCreateFramebuffer(ctx, w, h, imageFlags); - return NVGLUFramebuffer.createSafe(__result); - } - - // --- [ nvgluBindFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluBindFramebuffer luBindFramebuffer} */ - public static native void nnvgluBindFramebuffer(long ctx, long fb); - - /** - * Binds the framebuffer object associated with the specified {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to bind - */ - public static void nvgluBindFramebuffer(@NativeType("NVGcontext *") long ctx, @Nullable @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluBindFramebuffer(ctx, memAddressSafe(fb)); - } - - // --- [ nvgluDeleteFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluDeleteFramebuffer luDeleteFramebuffer} */ - public static native void nnvgluDeleteFramebuffer(long ctx, long fb); - - /** - * Deletes an {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to delete - */ - public static void nvgluDeleteFramebuffer(@NativeType("NVGcontext *") long ctx, @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluDeleteFramebuffer(ctx, fb.address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLES3.java b/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLES3.java deleted file mode 100644 index e2be6ecf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/NanoVGGLES3.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Implementation of the NanoVG API using OpenGL ES 3.0. */ -public class NanoVGGLES3 { - - static { LibNanoVG.initialize(); } - - /** - * Create flags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_ANTIALIAS ANTIALIAS} - Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).
    • - *
    • {@link #NVG_STENCIL_STROKES STENCIL_STROKES} - - * Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little slower, but path overlaps (i.e. self-intersecting - * or sharp turns) will be drawn just once. - *
    • - *
    • {@link #NVG_DEBUG DEBUG} - Flag indicating that additional debug checks are done.
    • - *
    - */ - public static final int - NVG_ANTIALIAS = 1<<0, - NVG_STENCIL_STROKES = 1<<1, - NVG_DEBUG = 1<<2; - - /** - * These are additional flags on top of NVGimageFlags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #NVG_IMAGE_NODELETE IMAGE_NODELETE} - Do not delete GL texture handle.
    • - *
    - */ - public static final int NVG_IMAGE_NODELETE = 1<<16; - - protected NanoVGGLES3() { - throw new UnsupportedOperationException(); - } - - // --- [ nvglCreateImageFromHandle ] --- - - /** Unsafe version of: {@link #nvglCreateImageFromHandle lCreateImageFromHandle} */ - public static native int nnvglCreateImageFromHandle(long ctx, int textureId, int w, int h, int flags); - - /** - * Creates a NanoVG image from an OpenGL texture. - * - * @param ctx the NanoVG context - * @param textureId the OpenGL texture id - * @param w the image width - * @param h the image height - * @param flags the image flags - * - * @return a handle to the image - */ - public static int nvglCreateImageFromHandle(@NativeType("NVGcontext *") long ctx, @NativeType("GLuint") int textureId, int w, int h, int flags) { - if (CHECKS) { - check(ctx); - } - return nnvglCreateImageFromHandle(ctx, textureId, w, h, flags); - } - - // --- [ nvglImageHandle ] --- - - /** Unsafe version of: {@link #nvglImageHandle lImageHandle} */ - public static native int nnvglImageHandle(long ctx, int image); - - /** - * Returns the OpenGL texture id associated with a NanoVG image. - * - * @param ctx the NanoVG context - * @param image the image handle - */ - @NativeType("GLuint") - public static int nvglImageHandle(@NativeType("NVGcontext *") long ctx, int image) { - if (CHECKS) { - check(ctx); - } - return nnvglImageHandle(ctx, image); - } - - // --- [ nvgCreate ] --- - - /** Unsafe version of: {@link #nvgCreate Create} */ - public static native long nnvgCreate(int flags); - - /** - * Creates a NanoVG context with an OpenGL ES 3.0 rendering back-end. - * - *

    An OpenGL ES 3.0+ context must be current in the current thread when this function is called and the returned NanoVG context may only be used in - * the thread in which that OpenGL context is current.

    - * - * @param flags the context flags. One of:
    {@link #NVG_ANTIALIAS ANTIALIAS}{@link #NVG_STENCIL_STROKES STENCIL_STROKES}{@link #NVG_DEBUG DEBUG}
    - */ - @NativeType("NVGcontext *") - public static long nvgCreate(int flags) { - return nnvgCreate(flags); - } - - // --- [ nvgDelete ] --- - - /** Unsafe version of: {@link #nvgDelete Delete} */ - public static native void nnvgDelete(long ctx); - - /** - * Deletes a NanoVG context created with {@link #nvgCreate Create}. - * - * @param ctx the NanoVG context - */ - public static void nvgDelete(@NativeType("NVGcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nnvgDelete(ctx); - } - - // --- [ nvgluCreateFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluCreateFramebuffer luCreateFramebuffer} */ - public static native long nnvgluCreateFramebuffer(long ctx, int w, int h, int imageFlags); - - /** - * Creates a framebuffer object to render to. - * - * @param ctx the NanoVG context - * @param w the framebuffer width - * @param h the framebuffer height - * @param imageFlags the image flags - */ - @Nullable - @NativeType("NVGLUframebuffer *") - public static NVGLUFramebuffer nvgluCreateFramebuffer(@NativeType("NVGcontext *") long ctx, int w, int h, int imageFlags) { - if (CHECKS) { - check(ctx); - } - long __result = nnvgluCreateFramebuffer(ctx, w, h, imageFlags); - return NVGLUFramebuffer.createSafe(__result); - } - - // --- [ nvgluBindFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluBindFramebuffer luBindFramebuffer} */ - public static native void nnvgluBindFramebuffer(long ctx, long fb); - - /** - * Binds the framebuffer object associated with the specified {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to bind - */ - public static void nvgluBindFramebuffer(@NativeType("NVGcontext *") long ctx, @Nullable @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluBindFramebuffer(ctx, memAddressSafe(fb)); - } - - // --- [ nvgluDeleteFramebuffer ] --- - - /** Unsafe version of: {@link #nvgluDeleteFramebuffer luDeleteFramebuffer} */ - public static native void nnvgluDeleteFramebuffer(long ctx, long fb); - - /** - * Deletes an {@link NVGLUFramebuffer}. - * - * @param ctx the NanoVG context - * @param fb the framebuffer to delete - */ - public static void nvgluDeleteFramebuffer(@NativeType("NVGcontext *") long ctx, @NativeType("NVGLUframebuffer *") NVGLUFramebuffer fb) { - if (CHECKS) { - check(ctx); - } - nnvgluDeleteFramebuffer(ctx, fb.address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/OUI.java b/LWJGL/src/main/java/org/lwjgl/nanovg/OUI.java deleted file mode 100644 index 9363664e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/OUI.java +++ /dev/null @@ -1,735 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -public class OUI { - - static { LibNanoVG.initialize(); } - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #UI_USERMASK USERMASK} - - * these bits, starting at bit 24, can be safely assigned by the application, e.g. as item types, other event types, drop targets, etc. - * - *

      They can be set and queried using {@link #uiSetFlags SetFlags} and {@link #uiGetFlags GetFlags}.

      - *
    • - *
    • {@link #UI_ANY ANY} - a special mask passed to {@link #uiFindItem FindItem}
    • - *
    - */ - public static final int - UI_USERMASK = 0xFF000000, - UI_ANY = 0xFFFFFFFF; - - /** - * Item states as returned by {@link #uiGetState GetState}. ({@code UIitemState}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #UI_COLD COLD} - the item is inactive
    • - *
    • {@link #UI_HOT HOT} - the item is inactive, but the cursor is hovering over this item
    • - *
    • {@link #UI_ACTIVE ACTIVE} - the item is toggled, activated, focused (depends on item kind)
    • - *
    • {@link #UI_FROZEN FROZEN} - the item is unresponsive
    • - *
    - */ - public static final int - UI_COLD = 0, - UI_HOT = 1, - UI_ACTIVE = 2, - UI_FROZEN = 3; - - /** - * Container flags to pass to {@link #uiSetBox SetBox}. ({@code UIboxFlags}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #UI_ROW ROW} - left to right
    • - *
    • {@link #UI_COLUMN COLUMN} - top to bottom
    • - *
    • {@link #UI_LAYOUT LAYOUT} - free layout
    • - *
    • {@link #UI_FLEX FLEX} - flex model
    • - *
    • {@link #UI_NOWRAP NOWRAP} - single-line
    • - *
    • {@link #UI_WRAP WRAP} - multi-line, wrap left to right
    • - *
    • {@link #UI_START START} - justify-content (start, end, center, space-between) at start of row/column
    • - *
    • {@link #UI_MIDDLE MIDDLE} - at center of row/column
    • - *
    • {@link #UI_END END} - at end of row/column
    • - *
    • {@link #UI_JUSTIFY JUSTIFY} - insert spacing to stretch across whole row/column
    • - *
    - */ - public static final int - UI_ROW = 0x002, - UI_COLUMN = 0x003, - UI_LAYOUT = 0x000, - UI_FLEX = 0x002, - UI_NOWRAP = 0x000, - UI_WRAP = 0x004, - UI_START = 0x008, - UI_MIDDLE = 0x000, - UI_END = 0x010, - UI_JUSTIFY = 0x018; - - /** - * Child layout flags to pass to {@link #uiSetLayout SetLayout}. ({@code UIlayoutFlags}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #UI_LEFT LEFT} - anchor to left item or left side of parent
    • - *
    • {@link #UI_TOP TOP} - anchor to top item or top side of parent
    • - *
    • {@link #UI_RIGHT RIGHT} - anchor to right item or right side of parent
    • - *
    • {@link #UI_DOWN DOWN} - anchor to bottom item or bottom side of parent
    • - *
    • {@link #UI_HFILL HFILL} - anchor to both left and right item or parent borders
    • - *
    • {@link #UI_VFILL VFILL} - anchor to both top and bottom item or parent borders
    • - *
    • {@link #UI_HCENTER HCENTER} - center horizontally, with left margin as offset
    • - *
    • {@link #UI_VCENTER VCENTER} - center vertically, with top margin as offset
    • - *
    • {@link #UI_CENTER CENTER} - center in both directions, with left/top margin as offset
    • - *
    • {@link #UI_FILL FILL} - anchor to all four directions
    • - *
    • {@link #UI_BREAK BREAK} - - * when wrapping, put this element on a new line. - * - *

      Wrapping layout code auto-inserts {@code UI_BREAK} flags, drawing routines can read them with {@link #uiGetLayout GetLayout}.

      - *
    • - *
    - */ - public static final int - UI_LEFT = 0x020, - UI_TOP = 0x040, - UI_RIGHT = 0x080, - UI_DOWN = 0x100, - UI_HFILL = 0x0a0, - UI_VFILL = 0x140, - UI_HCENTER = 0x000, - UI_VCENTER = 0x000, - UI_CENTER = 0x000, - UI_FILL = 0x1e0, - UI_BREAK = 0x200; - - /** - * Event flags. ({@code UIevent}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #UI_BUTTON0_DOWN BUTTON0_DOWN} - on button 0 down
    • - *
    • {@link #UI_BUTTON0_UP BUTTON0_UP} - on button 0 up when this event has a handler, {@link #uiGetState GetState} will return {@link #UI_ACTIVE ACTIVE} as long as button 0 is down
    • - *
    • {@link #UI_BUTTON0_HOT_UP BUTTON0_HOT_UP} - - * on button 0 up while item is hovered when this event has a handler, {@link #uiGetState GetState} will return {@link #UI_ACTIVE ACTIVE} when the cursor is hovering the items - * rectangle; this is the behavior expected for buttons - *
    • - *
    • {@link #UI_BUTTON0_CAPTURE BUTTON0_CAPTURE} - item is being captured (button 0 constantly pressed); when this event has a handler, {@link #uiGetState GetState} will return {@link #UI_ACTIVE ACTIVE} as long as button 0 is down
    • - *
    • {@link #UI_BUTTON2_DOWN BUTTON2_DOWN} - on button 2 down (right mouse button, usually triggers context menu)
    • - *
    • {@link #UI_SCROLL SCROLL} - item has received a scrollwheel event the accumulated wheel offset can be queried with {@link #uiGetScroll GetScroll}
    • - *
    • {@link #UI_KEY_DOWN KEY_DOWN} - item is focused and has received a key-down event the respective key can be queried using {@link #uiGetKey GetKey} and {@link #uiGetModifier GetModifier}
    • - *
    • {@link #UI_KEY_UP KEY_UP} - item is focused and has received a key-up event the respective key can be queried using {@link #uiGetKey GetKey} and {@link #uiGetModifier GetModifier}
    • - *
    • {@link #UI_CHAR CHAR} - item is focused and has received a character event the respective character can be queried using {@link #uiGetKey GetKey}
    • - *
    - */ - public static final int - UI_BUTTON0_DOWN = 0x0400, - UI_BUTTON0_UP = 0x0800, - UI_BUTTON0_HOT_UP = 0x1000, - UI_BUTTON0_CAPTURE = 0x2000, - UI_BUTTON2_DOWN = 0x4000, - UI_SCROLL = 0x8000, - UI_KEY_DOWN = 0x10000, - UI_KEY_UP = 0x20000, - UI_CHAR = 0x40000; - - protected OUI() { - throw new UnsupportedOperationException(); - } - - // --- [ uiCreateContext ] --- - - /** - * Creates a new UI context; call {@link #uiMakeCurrent MakeCurrent} to make this context the current context. - * - *

    The context is managed by the client and must be released using {@link #uiDestroyContext DestroyContext}.

    - * - * @param item_capacity the maximum number of items that can be declared. 4096 is a good starting value. - * @param buffer_capacity the maximum total size of bytes that can be allocated using {@link #uiAllocHandle AllocHandle}; you may pass 0 if you don't need to allocate handles. {@code (1<<20)} - * is a good starting value. - */ - @NativeType("UIcontext *") - public static native long uiCreateContext(@NativeType("unsigned int") int item_capacity, @NativeType("unsigned int") int buffer_capacity); - - // --- [ uiMakeCurrent ] --- - - /** Selects an UI context as the current context; a context must always be selected before using any of the other UI functions. */ - public static native void uiMakeCurrent(@NativeType("UIcontext *") long ctx); - - // --- [ uiDestroyContext ] --- - - /** Unsafe version of: {@link #uiDestroyContext DestroyContext} */ - public static native void nuiDestroyContext(long ctx); - - /** Releases the memory of an UI context created with {@link #uiCreateContext CreateContext}; if the context is the current context, the current context will be set to {@code NULL}. */ - public static void uiDestroyContext(@NativeType("UIcontext *") long ctx) { - if (CHECKS) { - check(ctx); - } - nuiDestroyContext(ctx); - } - - // --- [ uiGetContext ] --- - - /** Returns the currently selected context or {@code NULL}. */ - @NativeType("UIcontext *") - public static native long uiGetContext(); - - // --- [ uiSetCursor ] --- - - /** Sets the current cursor position (usually belonging to a mouse) to the screen coordinates at {@code (x,y)}. */ - public static native void uiSetCursor(int x, int y); - - // --- [ uiGetCursor ] --- - - /** Unsafe version of: {@link #uiGetCursor GetCursor} */ - public static native void nuiGetCursor(long __result); - - /** Returns the current cursor position in screen coordinates as set by {@link #uiSetCursor SetCursor}. */ - @NativeType("UIvec2") - public static UIVec2 uiGetCursor(@NativeType("UIvec2") UIVec2 __result) { - nuiGetCursor(__result.address()); - return __result; - } - - // --- [ uiGetCursorDelta ] --- - - /** Unsafe version of: {@link #uiGetCursorDelta GetCursorDelta} */ - public static native void nuiGetCursorDelta(long __result); - - /** Returns the offset of the cursor relative to the last call to {@link #uiProcess Process}. */ - @NativeType("UIvec2") - public static UIVec2 uiGetCursorDelta(@NativeType("UIvec2") UIVec2 __result) { - nuiGetCursorDelta(__result.address()); - return __result; - } - - // --- [ uiGetCursorStart ] --- - - /** Unsafe version of: {@link #uiGetCursorStart GetCursorStart} */ - public static native void nuiGetCursorStart(long __result); - - /** Returns the beginning point of a drag operation. */ - @NativeType("UIvec2") - public static UIVec2 uiGetCursorStart(@NativeType("UIvec2") UIVec2 __result) { - nuiGetCursorStart(__result.address()); - return __result; - } - - // --- [ uiGetCursorStartDelta ] --- - - /** Unsafe version of: {@link #uiGetCursorStartDelta GetCursorStartDelta} */ - public static native void nuiGetCursorStartDelta(long __result); - - /** Returns the offset of the cursor relative to the beginning point of a drag operation. */ - @NativeType("UIvec2") - public static UIVec2 uiGetCursorStartDelta(@NativeType("UIvec2") UIVec2 __result) { - nuiGetCursorStartDelta(__result.address()); - return __result; - } - - // --- [ uiSetButton ] --- - - /** Unsafe version of: {@link #uiSetButton SetButton} */ - public static native void nuiSetButton(int button, int mod, int enabled); - - /** - * Sets a mouse or gamepad button as pressed/released button is in the range {@code 0..63} and maps to an application defined input source. - * - * @param mod an application defined set of flags for modifier keys - * @param enabled is 1 for pressed, 0 for released - */ - public static void uiSetButton(@NativeType("unsigned int") int button, @NativeType("unsigned int") int mod, @NativeType("int") boolean enabled) { - nuiSetButton(button, mod, enabled ? 1 : 0); - } - - // --- [ uiGetButton ] --- - - /** Unsafe version of: {@link #uiGetButton GetButton} */ - public static native int nuiGetButton(int button); - - /** - * Returns the current state of an application dependent input button as set by {@link #uiSetButton SetButton}. - * - * @return 1 if the button has been set to pressed, 0 for released - */ - @NativeType("int") - public static boolean uiGetButton(@NativeType("unsigned int") int button) { - return nuiGetButton(button) != 0; - } - - // --- [ uiGetClicks ] --- - - /** Returns the number of chained clicks; 1 is a single click, 2 is a double click, etc. */ - public static native int uiGetClicks(); - - // --- [ uiSetKey ] --- - - /** Unsafe version of: {@link #uiSetKey SetKey} */ - public static native void nuiSetKey(int key, int mod, int enabled); - - /** - * Sets a key as down/up; the key can be any application defined {@code keycode}. - * - *

    All key events are being buffered until the next call to {@link #uiProcess Process}.

    - * - * @param mod an application defined set of flags for modifier keys - * @param enabled 1 for key down, 0 for key up - */ - public static void uiSetKey(@NativeType("unsigned int") int key, @NativeType("unsigned int") int mod, @NativeType("int") boolean enabled) { - nuiSetKey(key, mod, enabled ? 1 : 0); - } - - // --- [ uiSetChar ] --- - - /** - * Sends a single character for text input; the character is usually in the unicode range, but can be application defined. - * - *

    All char events are being buffered until the next call to {@link #uiProcess Process}.

    - */ - public static native void uiSetChar(@NativeType("unsigned int") int value); - - // --- [ uiSetScroll ] --- - - /** - * Accumulates scroll wheel offsets for the current frame. - * - *

    All offsets are being accumulated until the next call to {@link #uiProcess Process}.

    - */ - public static native void uiSetScroll(int x, int y); - - // --- [ uiGetScroll ] --- - - /** Unsafe version of: {@link #uiGetScroll GetScroll} */ - public static native void nuiGetScroll(long __result); - - /** Returns the currently accumulated scroll wheel offsets for this frame */ - @NativeType("UIvec2") - public static UIVec2 uiGetScroll(@NativeType("UIvec2") UIVec2 __result) { - nuiGetScroll(__result.address()); - return __result; - } - - // --- [ uiBeginLayout ] --- - - /** - * Clears the item buffer. - * - *

    {@code uiBeginLayout()} should be called before the first UI declaration for this frame to avoid concatenation of the same UI multiple times. After the - * call, all previously declared item IDs are invalid, and all application dependent context data has been freed.

    - * - *

    {@code uiBeginLayout()} must be followed by {@link #uiEndLayout EndLayout}.

    - */ - public static native void uiBeginLayout(); - - // --- [ uiEndLayout ] --- - - /** - * Layout all added items starting from the root item 0. - * - *

    After calling {@code uiEndLayout()}, no further modifications to the item tree should be done until the next call to {@link #uiBeginLayout BeginLayout}. It is safe to - * immediately draw the items after a call to {@code uiEndLayout()}.

    - * - *

    This is an {@code O(N)} operation for {@code N = number of declared items}.

    - */ - public static native void uiEndLayout(); - - // --- [ uiUpdateHotItem ] --- - - /** Updates the current hot item; this only needs to be called if items are kept for more than one frame and {@link #uiEndLayout EndLayout} is not called. */ - public static native void uiUpdateHotItem(); - - // --- [ uiProcess ] --- - - /** - * Updates the internal state according to the current cursor position and button states, and call all registered handlers. - * - *

    No further modifications to the item tree should be done until the next call to {@link #uiBeginLayout BeginLayout}. Items should be drawn before a call to - * {@code uiProcess()}.

    - * - *

    This is an {@code O(N)} operation for {@code N = number of declared items}.

    - * - * @param timestamp the time in milliseconds relative to the last call to {@code uiProcess()} and is used to estimate the threshold for double-clicks after calling - * {@code uiProcess()}. - */ - public static native void uiProcess(int timestamp); - - // --- [ uiClearState ] --- - - /** - * Resets the currently stored hot/active etc. handles. - * - *

    This should be called when a re-declaration of the UI changes the item indices, to avoid state related glitches because item identities have changed.

    - */ - public static native void uiClearState(); - - // --- [ uiItem ] --- - - /** Creates a new UI item and return the new item's ID. */ - public static native int uiItem(); - - // --- [ uiSetFrozen ] --- - - /** Unsafe version of: {@link #uiSetFrozen SetFrozen} */ - public static native void nuiSetFrozen(int item, int enable); - - /** - * Sets an items state to frozen. - * - *

    The UI will not recurse into frozen items when searching for hot or active items; subsequently, frozen items and their child items will not cause mouse - * event notifications. The frozen state is not applied recursively; {@link #uiGetState GetState} will report {@link #UI_COLD COLD} for child items. Upon encountering a frozen item, the - * drawing routine needs to handle rendering of child items appropriately.

    - */ - public static void uiSetFrozen(int item, @NativeType("int") boolean enable) { - nuiSetFrozen(item, enable ? 1 : 0); - } - - // --- [ uiSetHandle ] --- - - /** - * Sets the application-dependent handle of an item. - * - * @param handle an application defined 64-bit handle. If {@code NULL}, the item will not be interactive. - */ - public static native void uiSetHandle(int item, @NativeType("void *") long handle); - - // --- [ uiAllocHandle ] --- - - /** Unsafe version of: {@link #uiAllocHandle AllocHandle} */ - public static native long nuiAllocHandle(int item, int size); - - /** - * Allocates space for application-dependent context data and assign it as the handle to the item. - * - *

    The memory of the pointer is managed by the UI context and released upon the next call to {@link #uiBeginLayout BeginLayout}.

    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer uiAllocHandle(int item, @NativeType("unsigned int") int size) { - long __result = nuiAllocHandle(item, size); - return memByteBufferSafe(__result, size); - } - - // --- [ uiSetHandler ] --- - - /** Unsafe version of: {@link #uiSetHandler SetHandler} */ - public static native void nuiSetHandler(long handler); - - /** - * Sets the global handler callback for interactive items. - * - *

    The handler will be called for each item whose event flags are set using {@link #uiSetEvents SetEvents}.

    - */ - public static void uiSetHandler(@NativeType("UIhandler") UIHandlerI handler) { - nuiSetHandler(handler.address()); - } - - // --- [ uiSetEvents ] --- - - /** @param flags designates for which events the handler should be called. One or more of:
    {@link #UI_BUTTON0_DOWN BUTTON0_DOWN}{@link #UI_BUTTON0_UP BUTTON0_UP}{@link #UI_BUTTON0_HOT_UP BUTTON0_HOT_UP}{@link #UI_BUTTON0_CAPTURE BUTTON0_CAPTURE}{@link #UI_BUTTON2_DOWN BUTTON2_DOWN}{@link #UI_SCROLL SCROLL}{@link #UI_KEY_DOWN KEY_DOWN}{@link #UI_KEY_UP KEY_UP}
    {@link #UI_CHAR CHAR}
    */ - public static native void uiSetEvents(int item, @NativeType("unsigned int") int flags); - - // --- [ uiSetFlags ] --- - - /** @param flags a user-defined set of flags defined by {@link #UI_USERMASK USERMASK} */ - public static native void uiSetFlags(int item, @NativeType("unsigned int") int flags); - - // --- [ uiInsert ] --- - - /** - * Assigns an item to a container. - * - *

    An item ID of 0 refers to the root item. The function searches for the last item and calls {@link #uiAppend Append} on it, which is an {@code O(N)} operation for - * {@code N} siblings. It is usually more efficient to call {@code uiInser}t() for the first child, then chain additional siblings using - * {@code uiAppend()}.

    - * - * @return the child item ID if the container has already added items - */ - public static native int uiInsert(int item, int child); - - // --- [ uiAppend ] --- - - /** - * Assigns an item to the same container as another item. - * - * @param sibling inserted after {@code item} - */ - public static native int uiAppend(int item, int sibling); - - // --- [ uiInsertBack ] --- - - /** - * Inserts child into container item like {@link #uiInsert Insert}, but prepend it to the first child item, effectively putting it in the background. - * - *

    It is efficient to call {@code uiInsertBack()} repeatedly in cases where drawing or layout order doesn't matter.

    - */ - public static native int uiInsertBack(int item, int child); - - // --- [ uiInsertFront ] --- - - /** Same as {@link #uiInsert Insert}. */ - public static native int uiInsertFront(int item, int child); - - // --- [ uiSetSize ] --- - - /** - * Sets the size of the item. - * - *

    A size of 0 indicates the dimension to be dynamic; if the size is set, the item can not expand beyond that size.

    - */ - public static native void uiSetSize(int item, int w, int h); - - // --- [ uiSetLayout ] --- - - /** - * Sets the anchoring behavior of the item to one or multiple {@code UIlayoutFlags}. - * - * @param flags one or more of:
    {@link #UI_LEFT LEFT}{@link #UI_TOP TOP}{@link #UI_RIGHT RIGHT}{@link #UI_DOWN DOWN}{@link #UI_HFILL HFILL}{@link #UI_VFILL VFILL}{@link #UI_HCENTER HCENTER}{@link #UI_VCENTER VCENTER}{@link #UI_CENTER CENTER}{@link #UI_FILL FILL}{@link #UI_BREAK BREAK}
    - */ - public static native void uiSetLayout(int item, @NativeType("unsigned int") int flags); - - // --- [ uiSetBox ] --- - - /** - * Sets the box model behavior of the item to one or multiple {@code UIboxFlags}. - * - * @param flags one or more of:
    {@link #UI_ROW ROW}{@link #UI_COLUMN COLUMN}{@link #UI_LAYOUT LAYOUT}{@link #UI_FLEX FLEX}{@link #UI_NOWRAP NOWRAP}{@link #UI_WRAP WRAP}{@link #UI_START START}{@link #UI_MIDDLE MIDDLE}{@link #UI_END END}{@link #UI_JUSTIFY JUSTIFY}
    - */ - public static native void uiSetBox(int item, @NativeType("unsigned int") int flags); - - // --- [ uiSetMargins ] --- - - /** Unsafe version of: {@link #uiSetMargins SetMargins} */ - public static native void nuiSetMargins(int item, short l, short t, short r, short b); - - /** - * Sets the left, top, right and bottom margins of an item. - * - *

    When the item is anchored to the parent or another item, the margin controls the distance from the neighboring element.

    - */ - public static void uiSetMargins(int item, @NativeType("short") int l, @NativeType("short") int t, @NativeType("short") int r, @NativeType("short") int b) { - nuiSetMargins(item, (short)l, (short)t, (short)r, (short)b); - } - - // --- [ uiFocus ] --- - - /** - * Sets item as recipient of all keyboard events. - * - * @param item if -1, no item will be focused - */ - public static native void uiFocus(int item); - - // --- [ uiFirstChild ] --- - - /** - * Returns the first child item of a container item. - * - *

    If the item is not a container or does not contain any items, -1 is returned.

    - * - * @param item if 0, the first child item of the root item will be returned - */ - public static native int uiFirstChild(int item); - - // --- [ uiNextSibling ] --- - - /** - * Returns an items next sibling in the list of the parent containers children. - * - *

    If {@code item} is 0 or the item is the last child item, -1 will be returned.

    - */ - public static native int uiNextSibling(int item); - - // --- [ uiGetItemCount ] --- - - /** Returns the total number of allocated items */ - public static native int uiGetItemCount(); - - // --- [ uiGetAllocSize ] --- - - /** Returns the total bytes that have been allocated by {@link #uiAllocHandle AllocHandle} */ - @NativeType("unsigned int") - public static native int uiGetAllocSize(); - - // --- [ uiGetState ] --- - - /** - * Returns the current state of the item. - * - *

    This state is only valid after a call to {@link #uiProcess Process}. The returned value is one of {@link #UI_COLD COLD}, {@link #UI_HOT HOT}, {@link #UI_ACTIVE ACTIVE}, {@link #UI_FROZEN FROZEN}.

    - */ - @NativeType("UIitemState") - public static native int uiGetState(int item); - - // --- [ uiGetHandle ] --- - - /** Returns the application-dependent handle of the item as passed to {@link #uiSetHandle SetHandle} or {@link #uiAllocHandle AllocHandle}. */ - @NativeType("void *") - public static native long uiGetHandle(int item); - - // --- [ uiGetHotItem ] --- - - /** Returns the item that is currently under the cursor or -1 for none. */ - public static native int uiGetHotItem(); - - // --- [ uiGetFocusedItem ] --- - - /** Returns the item that is currently focused or -1 for none. */ - public static native int uiGetFocusedItem(); - - // --- [ uiFindItem ] --- - - /** - * Returns the topmost item containing absolute location {@code (x,y)}, starting with {@code item} as parent, using a set of flags and masks as filter. - * - *

    If both {@code flags} and {@code mask} are {@link #UI_ANY ANY}, the first topmost item is returned. If {@code mask} is {@link #UI_ANY ANY}, the first topmost item matching - * any of flags is returned. otherwise the first item matching {@code (item.flags & flags) == mask} is returned. You may combine box, layout, - * event and user flags. Frozen items will always be ignored.

    - */ - public static native int uiFindItem(int item, int x, int y, @NativeType("unsigned int") int flags, @NativeType("unsigned int") int mask); - - // --- [ uiGetHandler ] --- - - /** Unsafe version of: {@link #uiGetHandler GetHandler} */ - public static native long nuiGetHandler(); - - /** Returns the handler callback as passed to {@link #uiSetHandler SetHandler} */ - @Nullable - @NativeType("UIhandler") - public static UIHandler uiGetHandler() { - return UIHandler.createSafe(nuiGetHandler()); - } - - // --- [ uiGetEvents ] --- - - /** Returns the event flags for an item as passed to {@link #uiSetEvents SetEvents} */ - @NativeType("unsigned int") - public static native int uiGetEvents(int item); - - // --- [ uiGetFlags ] --- - - /** Returns the user-defined flags for an item as passed to {@link #uiSetFlags SetFlags} */ - @NativeType("unsigned int") - public static native int uiGetFlags(int item); - - // --- [ uiGetKey ] --- - - /** When handling a {@code KEY_DOWN/KEY_UP} event: the key that triggered this event. */ - @NativeType("unsigned int") - public static native int uiGetKey(); - - // --- [ uiGetModifier ] --- - - /** When handling a keyboard or mouse event: the active modifier keys. */ - @NativeType("unsigned int") - public static native int uiGetModifier(); - - // --- [ uiGetRect ] --- - - /** Unsafe version of: {@link #uiGetRect GetRect} */ - public static native void nuiGetRect(int item, long __result); - - /** - * Returns the items layout rectangle in absolute coordinates. - * - *

    If {@code uiGetRect()} is called before {@link #uiEndLayout EndLayout}, the values of the returned rectangle are undefined.

    - */ - @NativeType("UIrect") - public static UIRect uiGetRect(int item, @NativeType("UIrect") UIRect __result) { - nuiGetRect(item, __result.address()); - return __result; - } - - // --- [ uiContains ] --- - - /** Unsafe version of: {@link #uiContains Contains} */ - public static native int nuiContains(int item, int x, int y); - - /** Returns 1 if an items absolute rectangle contains a given coordinate, otherwise 0. */ - @NativeType("int") - public static boolean uiContains(int item, int x, int y) { - return nuiContains(item, x, y) != 0; - } - - // --- [ uiGetWidth ] --- - - /** Returns the width of the item as set by {@link #uiSetSize SetSize}. */ - public static native int uiGetWidth(int item); - - // --- [ uiGetHeight ] --- - - /** Return the height of the item as set by {@link #uiSetSize SetSize}. */ - public static native int uiGetHeight(int item); - - // --- [ uiGetLayout ] --- - - /** Returns the anchoring behavior as set by {@link #uiSetLayout SetLayout}. */ - @NativeType("unsigned int") - public static native int uiGetLayout(int item); - - // --- [ uiGetBox ] --- - - /** Returns the box model as set by {@link #uiSetBox SetBox}. */ - @NativeType("unsigned int") - public static native int uiGetBox(int item); - - // --- [ uiGetMarginLeft ] --- - - /** Returns the left margin of the item as set with {@link #uiSetMargins SetMargins}. */ - public static native short uiGetMarginLeft(int item); - - // --- [ uiGetMarginTop ] --- - - /** Returns the top margin of the item as set with {@link #uiSetMargins SetMargins}. */ - public static native short uiGetMarginTop(int item); - - // --- [ uiGetMarginRight ] --- - - /** Returns the right margin of the item as set with {@link #uiSetMargins SetMargins}. */ - public static native short uiGetMarginRight(int item); - - // --- [ uiGetMarginDown ] --- - - /** Returns the bottom margin of the item as set with {@link #uiSetMargins SetMargins}. */ - public static native short uiGetMarginDown(int item); - - // --- [ uiRecoverItem ] --- - - /** - * When {@link #uiBeginLayout BeginLayout} is called, the most recently declared items are retained. When {@link #uiEndLayout EndLayout} completes, it matches the old item hierarchy to the new - * one and attempts to map old items to new items as well as possible. When passed an item Id from the previous frame, {@code uiRecoverItem()} returns the - * item's new assumed Id, or -1 if the item could not be mapped. It is valid to pass -1 as item. - */ - public static native int uiRecoverItem(int olditem); - - // --- [ uiRemapItem ] --- - - /** - * In cases where it is important to recover old state over changes in the view, and the built-in remapping fails, the UI declaration can manually remap - * old items to new IDs in cases where e.g. the previous item ID has been temporarily saved; {@code uiRemapItem()} would then be called after creating the - * new item using {@link #uiItem Item}. - */ - public static native void uiRemapItem(int olditem, int newitem); - - // --- [ uiGetLastItemCount ] --- - - /** Returns the number if items that have been allocated in the last frame. */ - public static native int uiGetLastItemCount(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/UIHandler.java b/LWJGL/src/main/java/org/lwjgl/nanovg/UIHandler.java deleted file mode 100644 index 7b511ca5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/UIHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be passed to the {@link OUI#uiSetHandler SetHandler} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int item,
    - *     UIevent event
    - * )
    - */ -public abstract class UIHandler extends Callback implements UIHandlerI { - - /** - * Creates a {@code UIHandler} instance from the specified function pointer. - * - * @return the new {@code UIHandler} - */ - public static UIHandler create(long functionPointer) { - UIHandlerI instance = Callback.get(functionPointer); - return instance instanceof UIHandler - ? (UIHandler)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static UIHandler createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code UIHandler} instance that delegates to the specified {@code UIHandlerI} instance. */ - public static UIHandler create(UIHandlerI instance) { - return instance instanceof UIHandler - ? (UIHandler)instance - : new Container(instance.address(), instance); - } - - protected UIHandler() { - super(CIF); - } - - UIHandler(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends UIHandler { - - private final UIHandlerI delegate; - - Container(long functionPointer, UIHandlerI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int item, int event) { - delegate.invoke(item, event); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/UIHandlerI.java b/LWJGL/src/main/java/org/lwjgl/nanovg/UIHandlerI.java deleted file mode 100644 index 221df3ce..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/UIHandlerI.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link OUI#uiSetHandler SetHandler} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int item,
    - *     UIevent event
    - * )
    - */ -@FunctionalInterface -@NativeType("UIhandler") -public interface UIHandlerI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_sint32, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** handler callback; event is one of UI_EVENT_* */ - void invoke(int item, @NativeType("UIevent") int event); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/UIRect.java b/LWJGL/src/main/java/org/lwjgl/nanovg/UIRect.java deleted file mode 100644 index 832476ef..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/UIRect.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * layout rectangle - * - *

    Layout

    - * - *
    
    - * struct UIrect {
    - *     union {
    - *         int v[4];
    - *         struct {
    - *             int x;
    - *             int y;
    - *             int w;
    - *             int h;
    - *         };
    - *     };
    - * }
    - */ -@NativeType("struct UIrect") -public class UIRect extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - V, - X, - Y, - W, - H; - - static { - Layout layout = __struct( - __union( - __array(4, 4), - __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - V = layout.offsetof(1); - X = layout.offsetof(3); - Y = layout.offsetof(4); - W = layout.offsetof(5); - H = layout.offsetof(6); - } - - protected UIRect(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected UIRect create(long address, @Nullable ByteBuffer container) { - return new UIRect(address, container); - } - - /** - * Creates a {@code UIRect} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public UIRect(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link IntBuffer} view of the {@code v} field. */ - @NativeType("int[4]") - public IntBuffer v() { return nv(address()); } - /** @return the value at the specified index of the {@code v} field. */ - public int v(int index) { return nv(address(), index); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - /** @return the value of the {@code w} field. */ - public int w() { return nw(address()); } - /** @return the value of the {@code h} field. */ - public int h() { return nh(address()); } - - /** Copies the specified {@link IntBuffer} to the {@code v} field. */ - public UIRect v(@NativeType("int[4]") IntBuffer value) { nv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code v} field. */ - public UIRect v(int index, int value) { nv(address(), index, value); return this; } - /** Sets the specified value to the {@code x} field. */ - public UIRect x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public UIRect y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public UIRect w(int value) { nw(address(), value); return this; } - /** Sets the specified value to the {@code h} field. */ - public UIRect h(int value) { nh(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public UIRect set(UIRect src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code UIRect} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static UIRect malloc() { - return new UIRect(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code UIRect} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static UIRect calloc() { - return new UIRect(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code UIRect} instance allocated with {@link BufferUtils}. */ - public static UIRect create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new UIRect(memAddress(container), container); - } - - /** Returns a new {@code UIRect} instance for the specified memory address. */ - public static UIRect create(long address) { - return new UIRect(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static UIRect createSafe(long address) { - return address == NULL ? null : new UIRect(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static UIRect mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static UIRect callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static UIRect mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static UIRect callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code UIRect} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static UIRect malloc(MemoryStack stack) { - return new UIRect(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code UIRect} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static UIRect calloc(MemoryStack stack) { - return new UIRect(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #v}. */ - public static IntBuffer nv(long struct) { return memIntBuffer(struct + UIRect.V, 4); } - /** Unsafe version of {@link #v(int) v}. */ - public static int nv(long struct, int index) { - return UNSAFE.getInt(null, struct + UIRect.V + check(index, 4) * 4); - } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + UIRect.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + UIRect.Y); } - /** Unsafe version of {@link #w}. */ - public static int nw(long struct) { return UNSAFE.getInt(null, struct + UIRect.W); } - /** Unsafe version of {@link #h}. */ - public static int nh(long struct) { return UNSAFE.getInt(null, struct + UIRect.H); } - - /** Unsafe version of {@link #v(IntBuffer) v}. */ - public static void nv(long struct, IntBuffer value) { - if (CHECKS) { checkGT(value, 4); } - memCopy(memAddress(value), struct + UIRect.V, value.remaining() * 4); - } - /** Unsafe version of {@link #v(int, int) v}. */ - public static void nv(long struct, int index, int value) { - UNSAFE.putInt(null, struct + UIRect.V + check(index, 4) * 4, value); - } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + UIRect.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + UIRect.Y, value); } - /** Unsafe version of {@link #w(int) w}. */ - public static void nw(long struct, int value) { UNSAFE.putInt(null, struct + UIRect.W, value); } - /** Unsafe version of {@link #h(int) h}. */ - public static void nh(long struct, int value) { UNSAFE.putInt(null, struct + UIRect.H, value); } - - // ----------------------------------- - - /** An array of {@link UIRect} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final UIRect ELEMENT_FACTORY = UIRect.create(-1L); - - /** - * Creates a new {@code UIRect.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link UIRect#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected UIRect getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link IntBuffer} view of the {@code v} field. */ - @NativeType("int[4]") - public IntBuffer v() { return UIRect.nv(address()); } - /** @return the value at the specified index of the {@code v} field. */ - public int v(int index) { return UIRect.nv(address(), index); } - /** @return the value of the {@code x} field. */ - public int x() { return UIRect.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return UIRect.ny(address()); } - /** @return the value of the {@code w} field. */ - public int w() { return UIRect.nw(address()); } - /** @return the value of the {@code h} field. */ - public int h() { return UIRect.nh(address()); } - - /** Copies the specified {@link IntBuffer} to the {@code v} field. */ - public Buffer v(@NativeType("int[4]") IntBuffer value) { UIRect.nv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code v} field. */ - public Buffer v(int index, int value) { UIRect.nv(address(), index, value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { UIRect.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { UIRect.ny(address(), value); return this; } - /** Sets the specified value to the {@code w} field. */ - public Buffer w(int value) { UIRect.nw(address(), value); return this; } - /** Sets the specified value to the {@code h} field. */ - public Buffer h(int value) { UIRect.nh(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/nanovg/UIVec2.java b/LWJGL/src/main/java/org/lwjgl/nanovg/UIVec2.java deleted file mode 100644 index c3f0426a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/nanovg/UIVec2.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.nanovg; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * for cursor positions, mainly - * - *

    Layout

    - * - *
    
    - * struct UIvec2 {
    - *     union {
    - *         int v[2];
    - *         struct {
    - *             int x;
    - *             int y;
    - *         };
    - *     };
    - * }
    - */ -@NativeType("struct UIvec2") -public class UIVec2 extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - V, - X, - Y; - - static { - Layout layout = __struct( - __union( - __array(4, 2), - __struct( - __member(4), - __member(4) - ) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - V = layout.offsetof(1); - X = layout.offsetof(3); - Y = layout.offsetof(4); - } - - protected UIVec2(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected UIVec2 create(long address, @Nullable ByteBuffer container) { - return new UIVec2(address, container); - } - - /** - * Creates a {@code UIVec2} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public UIVec2(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link IntBuffer} view of the {@code v} field. */ - @NativeType("int[2]") - public IntBuffer v() { return nv(address()); } - /** @return the value at the specified index of the {@code v} field. */ - public int v(int index) { return nv(address(), index); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - - /** Copies the specified {@link IntBuffer} to the {@code v} field. */ - public UIVec2 v(@NativeType("int[2]") IntBuffer value) { nv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code v} field. */ - public UIVec2 v(int index, int value) { nv(address(), index, value); return this; } - /** Sets the specified value to the {@code x} field. */ - public UIVec2 x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public UIVec2 y(int value) { ny(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public UIVec2 set(UIVec2 src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code UIVec2} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static UIVec2 malloc() { - return new UIVec2(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code UIVec2} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static UIVec2 calloc() { - return new UIVec2(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code UIVec2} instance allocated with {@link BufferUtils}. */ - public static UIVec2 create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new UIVec2(memAddress(container), container); - } - - /** Returns a new {@code UIVec2} instance for the specified memory address. */ - public static UIVec2 create(long address) { - return new UIVec2(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static UIVec2 createSafe(long address) { - return address == NULL ? null : new UIVec2(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static UIVec2 mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static UIVec2 callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static UIVec2 mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static UIVec2 callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code UIVec2} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static UIVec2 malloc(MemoryStack stack) { - return new UIVec2(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code UIVec2} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static UIVec2 calloc(MemoryStack stack) { - return new UIVec2(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #v}. */ - public static IntBuffer nv(long struct) { return memIntBuffer(struct + UIVec2.V, 2); } - /** Unsafe version of {@link #v(int) v}. */ - public static int nv(long struct, int index) { - return UNSAFE.getInt(null, struct + UIVec2.V + check(index, 2) * 4); - } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + UIVec2.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + UIVec2.Y); } - - /** Unsafe version of {@link #v(IntBuffer) v}. */ - public static void nv(long struct, IntBuffer value) { - if (CHECKS) { checkGT(value, 2); } - memCopy(memAddress(value), struct + UIVec2.V, value.remaining() * 4); - } - /** Unsafe version of {@link #v(int, int) v}. */ - public static void nv(long struct, int index, int value) { - UNSAFE.putInt(null, struct + UIVec2.V + check(index, 2) * 4, value); - } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + UIVec2.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + UIVec2.Y, value); } - - // ----------------------------------- - - /** An array of {@link UIVec2} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final UIVec2 ELEMENT_FACTORY = UIVec2.create(-1L); - - /** - * Creates a new {@code UIVec2.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link UIVec2#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected UIVec2 getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link IntBuffer} view of the {@code v} field. */ - @NativeType("int[2]") - public IntBuffer v() { return UIVec2.nv(address()); } - /** @return the value at the specified index of the {@code v} field. */ - public int v(int index) { return UIVec2.nv(address(), index); } - /** @return the value of the {@code x} field. */ - public int x() { return UIVec2.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return UIVec2.ny(address()); } - - /** Copies the specified {@link IntBuffer} to the {@code v} field. */ - public Buffer v(@NativeType("int[2]") IntBuffer value) { UIVec2.nv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code v} field. */ - public Buffer v(int index, int value) { UIVec2.nv(address(), index, value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { UIVec2.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { UIVec2.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/AL.java b/LWJGL/src/main/java/org/lwjgl/openal/AL.java deleted file mode 100644 index d88a9d96..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/AL.java +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openal; - -import org.lwjgl.*; -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -import javax.annotation.*; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; -import java.util.*; -import java.util.function.*; - -import static org.lwjgl.openal.AL10.*; -import static org.lwjgl.openal.EXTThreadLocalContext.*; -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * This class must be used before any OpenAL function is called. It has the following responsibilities: - *
      - *
    • Creates instances of {@link ALCapabilities} classes. An {@code ALCapabilities} instance contains flags for functionality that is available in an OpenAL - * context. Internally, it also contains function pointers that are only valid in that specific OpenAL context.
    • - *
    • Maintains thread-local and global state for {@code ALCapabilities} instances, corresponding to OpenAL contexts that are current in those threads and the - * entire process, respectively.
    • - *
    - * - *

    ALCapabilities creation

    - *

    Instances of {@code ALCapabilities} can be created with the {@link #createCapabilities} method. An OpenAL context must be current in the current thread - * or process before it is called. Calling this method is expensive, so {@code ALCapabilities} instances should be cached in user code.

    - * - *

    Thread-local state

    - *

    Before a function for a given OpenAL context can be called, the corresponding {@code ALCapabilities} instance must be made current in the current - * thread or process. The user is also responsible for clearing the current {@code ALCapabilities} instance when the context is destroyed or made current in - * another thread.

    - * - *

    Note that OpenAL contexts are made current process-wide by default. Current thread-local contexts are only available if the - * {@link EXTThreadLocalContext ALC_EXT_thread_local_context} extension is supported by the OpenAL implementation. OpenAL Soft, the implementation - * that LWJGL ships with, supports this extension and performs better when it is used.

    - * - * @see ALC - */ -public final class AL { - - static long alContext; - static ALCdevice alcDevice; - static ALCCapabilities alContextCaps; - static ALCapabilities alCaps; - - private static boolean created_lwjgl2 = false; - - /** - * Creates an OpenAL instance. Using this constructor will cause OpenAL to - * open the device using supplied device argument, and create a context using the context values - * supplied. - * - * @param deviceArguments Arguments supplied to native device - * @param contextFrequency Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100). - * @param contextRefresh Refresh intervalls, in units of Hz. - * @param contextSynchronized Flag, indicating a synchronous context.* - */ - public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) - throws LWJGLException { - create(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, true); - } - - /** - * @param openDevice Whether to automatically open the device - * @see #create(String, int, int, boolean) - */ - public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice) - throws LWJGLException { - if (alContext == MemoryUtil.NULL && openDevice) { - //ALDevice alDevice = ALDevice.create(); - long alDevice = ALC10.alcOpenDevice(deviceArguments); - if (alDevice == MemoryUtil.NULL) { - throw new LWJGLException("Cannot open the device"); - } - - IntBuffer attribs = BufferUtils.createIntBuffer(16); - - attribs.put(ALC10.ALC_FREQUENCY); - attribs.put(contextFrequency); - - attribs.put(ALC10.ALC_REFRESH); - attribs.put(contextRefresh); - - attribs.put(ALC10.ALC_SYNC); - attribs.put(contextSynchronized ? ALC10.ALC_TRUE : ALC10.ALC_FALSE); - - attribs.put(0); - attribs.flip(); - - long contextHandle = ALC10.alcCreateContext(alDevice, attribs); - ALC10.alcMakeContextCurrent(contextHandle); - //alContext = new ALContext(alDevice, contextHandle); - alContext = ALC10.alcCreateContext(contextHandle, (IntBuffer)null); - alContextCaps = ALC.createCapabilities(alContext); - - alCaps = AL.createCapabilities(alContextCaps); - - alcDevice = new ALCdevice(alDevice); - created_lwjgl2 = true; - } - } - - public static void create() throws LWJGLException { - if (alContext == MemoryUtil.NULL) { - //ALDevice alDevice = ALDevice.create(); - long alDevice = ALC10.alcOpenDevice((ByteBuffer) null); - if (alDevice == MemoryUtil.NULL) { - throw new LWJGLException("Cannot open the device"); - } - - IntBuffer attribs = BufferUtils.createIntBuffer(16); - - attribs.put(ALC10.ALC_FREQUENCY); - attribs.put(44100); - - attribs.put(ALC10.ALC_REFRESH); - attribs.put(60); - - attribs.put(ALC10.ALC_SYNC); - attribs.put(ALC10.ALC_FALSE); - - attribs.put(0); - attribs.flip(); - - long contextHandle = ALC10.alcCreateContext(alDevice, attribs); - ALC10.alcMakeContextCurrent(contextHandle); - alContext = ALC10.alcCreateContext(contextHandle, (IntBuffer)null); - alContextCaps = ALC.createCapabilities(alContext); - - alCaps = AL.createCapabilities(alContextCaps); - - alcDevice = new ALCdevice(alDevice); - created_lwjgl2 = true; - } - } - - public static boolean isCreated() { - return created_lwjgl2; - } - - public static ALCdevice getDevice() { - return alcDevice; - } - - @Nullable - private static ALCapabilities processCaps; - - private static final ThreadLocal capabilitiesTLS = new ThreadLocal<>(); - - private static ICD icd = new ICDStatic(); - - private AL() {} - - static void init() { - } - - public static void destroy() { - if (created_lwjgl2) { - ALC10.alcMakeContextCurrent(MemoryUtil.NULL); - ALC10.alcDestroyContext(alContext); - ALC10.alcCloseDevice(alcDevice.device); - alContext = -1; - alcDevice = null; - created_lwjgl2 = false; - } - setCurrentProcess(null); - } - - /** - * Sets the specified {@link ALCapabilities} for the current process-wide OpenAL context. - * - *

    If the current thread had a context current (see {@link #setCurrentThread}), those {@code ALCapabilities} are cleared. Any OpenAL functions called in - * the current thread, or any threads that have no context current, will use the specified {@code ALCapabilities}.

    - * - * @param caps the {@link ALCapabilities} to make current, or null - */ - public static void setCurrentProcess(@Nullable ALCapabilities caps) { - processCaps = caps; - capabilitiesTLS.set(null); // See EXT_thread_local_context, second Q. - icd.set(caps); - } - - /** - * Sets the specified {@link ALCapabilities} for the current OpenAL context in the current thread. - * - *

    Any OpenAL functions called in the current thread will use the specified {@code ALCapabilities}.

    - * - * @param caps the {@link ALCapabilities} to make current, or null - */ - public static void setCurrentThread(@Nullable ALCapabilities caps) { - capabilitiesTLS.set(caps); - icd.set(caps); - } - - /** - * Returns the {@link ALCapabilities} for the OpenAL context that is current in the current thread or process. - * - * @throws IllegalStateException if no OpenAL context is current in the current thread or process - */ - public static ALCapabilities getCapabilities() { - ALCapabilities caps = capabilitiesTLS.get(); - if (caps == null) { - caps = processCaps; - } - - return checkCapabilities(caps); - } - - private static ALCapabilities checkCapabilities(@Nullable ALCapabilities caps) { - if (caps == null) { - throw new IllegalStateException( - "No ALCapabilities instance set for the current thread or process. Possible solutions:\n" + - "\ta) Call AL.createCapabilities() after making a context current.\n" + - "\tb) Call AL.setCurrentProcess() or AL.setCurrentThread() if an ALCapabilities instance already exists." - ); - } - return caps; - } - - /** - * Creates a new {@link ALCapabilities} instance for the OpenAL context that is current in the current thread or process. - * - *

    This method calls {@link #setCurrentProcess} (or {@link #setCurrentThread} if applicable) with the new instance before returning.

    - * - * @param alcCaps the {@link ALCCapabilities} of the device associated with the current context - * - * @return the ALCapabilities instance - */ - public static ALCapabilities createCapabilities(ALCCapabilities alcCaps) { - return createCapabilities(alcCaps, null); - } - - /** - * Creates a new {@link ALCapabilities} instance for the OpenAL context that is current in the current thread or process. - * - * @param alcCaps the {@link ALCCapabilities} of the device associated with the current context - * @param bufferFactory a function that allocates a {@link PointerBuffer} given a size. The buffer must be filled with zeroes. If {@code null}, LWJGL will - * allocate a GC-managed buffer internally. - * - * @return the ALCapabilities instance - */ - public static ALCapabilities createCapabilities(ALCCapabilities alcCaps, @Nullable IntFunction bufferFactory) { - // We'll use alGetProcAddress for both core and extension entry points. - // To do that, we need to first grab the alGetProcAddress function from - // the OpenAL native library. - long alGetProcAddress = ALC.getFunctionProvider().getFunctionAddress(NULL, "alGetProcAddress"); - if (alGetProcAddress == NULL) { - throw new RuntimeException("A core AL function is missing. Make sure that the OpenAL library has been loaded correctly."); - } - - FunctionProvider functionProvider = functionName -> { - long address = invokePP(memAddress(functionName), alGetProcAddress); - if (address == NULL && Checks.DEBUG_FUNCTIONS) { - apiLogMissing("AL", functionName); - } - return address; - }; - - long GetString = functionProvider.getFunctionAddress("alGetString"); - long GetError = functionProvider.getFunctionAddress("alGetError"); - long IsExtensionPresent = functionProvider.getFunctionAddress("alIsExtensionPresent"); - if (GetString == NULL || GetError == NULL || IsExtensionPresent == NULL) { - throw new IllegalStateException("Core OpenAL functions could not be found. Make sure that the OpenAL library has been loaded correctly."); - } - - String versionString = memASCIISafe(invokeP(AL_VERSION, GetString)); - if (versionString == null || invokeI(GetError) != AL_NO_ERROR) { - throw new IllegalStateException("There is no OpenAL context current in the current thread or process."); - } - - APIVersion apiVersion = apiParseVersion(versionString); - - int majorVersion = apiVersion.major; - int minorVersion = apiVersion.minor; - - int[][] AL_VERSIONS = { - {0, 1} // OpenAL 1 - }; - - Set supportedExtensions = new HashSet<>(32); - - for (int major = 1; major <= AL_VERSIONS.length; major++) { - int[] minors = AL_VERSIONS[major - 1]; - for (int minor : minors) { - if (major < majorVersion || (major == majorVersion && minor <= minorVersion)) { - supportedExtensions.add("OpenAL" + major + minor); - } - } - } - - // Parse EXTENSIONS string - String extensionsString = memASCIISafe(invokeP(AL_EXTENSIONS, GetString)); - if (extensionsString != null) { - MemoryStack stack = stackGet(); - - StringTokenizer tokenizer = new StringTokenizer(extensionsString); - while (tokenizer.hasMoreTokens()) { - String extName = tokenizer.nextToken(); - try (MemoryStack frame = stack.push()) { - if (invokePZ(memAddress(frame.ASCII(extName, true)), IsExtensionPresent)) { - supportedExtensions.add(extName); - } - } - } - } - - if (alcCaps.ALC_EXT_EFX) { - supportedExtensions.add("ALC_EXT_EFX"); - } - apiFilterExtensions(supportedExtensions, Configuration.OPENAL_EXTENSION_FILTER); - - ALCapabilities caps = new ALCapabilities(functionProvider, supportedExtensions, bufferFactory == null ? BufferUtils::createPointerBuffer : bufferFactory); - - if (alcCaps.ALC_EXT_thread_local_context && alcGetThreadContext() != NULL) { - setCurrentThread(caps); - } else { - setCurrentProcess(caps); - } - - return caps; - } - - static ALCapabilities getICD() { - return ALC.check(icd.get()); - } - - /** Function pointer provider. */ - private interface ICD { - default void set(@Nullable ALCapabilities caps) {} - @Nullable ALCapabilities get(); - } - - /** - * Write-once {@link ICD}. - * - *

    This is the default implementation that skips the thread/process lookup. When a new ALCapabilities is set, we compare it to the write-once - * capabilities. If different function pointers are found, we fall back to the expensive lookup. This will never happen with the OpenAL-Soft - * implementation.

    - */ - private static class ICDStatic implements ICD { - - @Nullable - private static ALCapabilities tempCaps; - - @SuppressWarnings("AssignmentToStaticFieldFromInstanceMethod") - @Override - public void set(@Nullable ALCapabilities caps) { - if (tempCaps == null) { - tempCaps = caps; - } else if (caps != null && caps != tempCaps && ThreadLocalUtil.areCapabilitiesDifferent(tempCaps.addresses, caps.addresses)) { - apiLog("[WARNING] Incompatible context detected. Falling back to thread/process lookup for AL contexts."); - icd = AL::getCapabilities; // fall back to thread/process lookup - } - } - - @Override - public ALCapabilities get() { - return WriteOnce.caps; - } - - private static final class WriteOnce { - // This will be initialized the first time get() above is called - static final ALCapabilities caps; - - static { - ALCapabilities tempCaps = ICDStatic.tempCaps; - if (tempCaps == null) { - throw new IllegalStateException("No ALCapabilities instance has been set"); - } - caps = tempCaps; - } - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/AL10.java b/LWJGL/src/main/java/org/lwjgl/openal/AL10.java deleted file mode 100644 index 9776ee6d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/AL10.java +++ /dev/null @@ -1,1909 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to AL 1.0 functionality. */ -public class AL10 { - - public static void alGetDouble(int p1, DoubleBuffer p2) { - alGetDoublev(p1, p2); - } - - public static void alGetFloat(int p1, FloatBuffer p2) { - alGetFloatv(p1, p2); - } - - public static void alGetInteger(int p1, IntBuffer p2) { - alGetIntegerv(p1, p2); - } - - public static void alGetListener(int p1, FloatBuffer p2) { - alGetListenerfv(p1, p2); - } - - public static void alGetSource(int p1, int p2, FloatBuffer p3) { - alGetSourcefv(p1, p2, p3); - } - - public static void alListener(int pname, FloatBuffer value) { - alListenerfv(pname, value); - } - - public static void alSource(int p1, int p2, FloatBuffer p3) { - alSourcefv(p1, p2, p3); - } - - public static void alSourcePause(IntBuffer p1) { - alSourcePausev(p1); - } - - public static void alSourcePlay(IntBuffer p1) { - alSourcePlayv(p1); - } - - public static void alSourceRewind(IntBuffer p1) { - alSourceRewindv(p1); - } - - public static void alSourceStop(IntBuffer p1) { - alSourceStopv(p1); - } - - /** General tokens. */ - public static final int - AL_INVALID = 0xFFFFFFFF, - AL_NONE = 0x0, - AL_FALSE = 0x0, - AL_TRUE = 0x1; - - /** Error conditions. */ - public static final int - AL_NO_ERROR = 0x0, - AL_INVALID_NAME = 0xA001, - AL_INVALID_ENUM = 0xA002, - AL_INVALID_VALUE = 0xA003, - AL_INVALID_OPERATION = 0xA004, - AL_OUT_OF_MEMORY = 0xA005; - - /** Numerical queries. */ - public static final int - AL_DOPPLER_FACTOR = 0xC000, - AL_DISTANCE_MODEL = 0xD000; - - /** String queries. */ - public static final int - AL_VENDOR = 0xB001, - AL_VERSION = 0xB002, - AL_RENDERER = 0xB003, - AL_EXTENSIONS = 0xB004; - - /** Distance attenuation models. */ - public static final int - AL_INVERSE_DISTANCE = 0xD001, - AL_INVERSE_DISTANCE_CLAMPED = 0xD002; - - /** Source types. */ - public static final int - AL_SOURCE_ABSOLUTE = 0x201, - AL_SOURCE_RELATIVE = 0x202; - - /** Listener and Source attributes. */ - public static final int - AL_POSITION = 0x1004, - AL_VELOCITY = 0x1006, - AL_GAIN = 0x100A; - - /** Source attributes. */ - public static final int - AL_CONE_INNER_ANGLE = 0x1001, - AL_CONE_OUTER_ANGLE = 0x1002, - AL_PITCH = 0x1003, - AL_DIRECTION = 0x1005, - AL_LOOPING = 0x1007, - AL_BUFFER = 0x1009, - AL_SOURCE_STATE = 0x1010, - AL_CONE_OUTER_GAIN = 0x1022, - AL_SOURCE_TYPE = 0x1027; - - /** Source state. */ - public static final int - AL_INITIAL = 0x1011, - AL_PLAYING = 0x1012, - AL_PAUSED = 0x1013, - AL_STOPPED = 0x1014; - - /** Listener attributes. */ - public static final int AL_ORIENTATION = 0x100F; - - /** Queue state. */ - public static final int - AL_BUFFERS_QUEUED = 0x1015, - AL_BUFFERS_PROCESSED = 0x1016; - - /** Gain bounds. */ - public static final int - AL_MIN_GAIN = 0x100D, - AL_MAX_GAIN = 0x100E; - - /** Distance model attributes, */ - public static final int - AL_REFERENCE_DISTANCE = 0x1020, - AL_ROLLOFF_FACTOR = 0x1021, - AL_MAX_DISTANCE = 0x1023; - - /** Buffer attributes, */ - public static final int - AL_FREQUENCY = 0x2001, - AL_BITS = 0x2002, - AL_CHANNELS = 0x2003, - AL_SIZE = 0x2004; - - /** Buffer formats. */ - public static final int - AL_FORMAT_MONO8 = 0x1100, - AL_FORMAT_MONO16 = 0x1101, - AL_FORMAT_STEREO8 = 0x1102, - AL_FORMAT_STEREO16 = 0x1103; - - /** Buffer state. */ - public static final int - AL_UNUSED = 0x2010, - AL_PENDING = 0x2011, - AL_PROCESSED = 0x2012; - - protected AL10() { - throw new UnsupportedOperationException(); - } - - // --- [ alGetError ] --- - - /** - * Obtains error information. - * - *

    Each detectable error is assigned a numeric code. When an error is detected by AL, a flag is set and the error code is recorded. Further errors, if they - * occur, do not affect this recorded code. When alGetError is called, the code is returned and the flag is cleared, so that a further error will again - * record its code. If a call to alGetError returns AL_NO_ERROR then there has been no detectable error since the last call to alGetError (or since the AL - * was initialized).

    - * - *

    Error codes can be mapped to strings. The alGetString function returns a pointer to a constant (literal) string that is identical to the identifier used - * for the enumeration value, as defined in the specification.

    - */ - @NativeType("ALenum") - public static int alGetError() { - long __functionAddress = AL.getICD().alGetError; - return invokeI(__functionAddress); - } - - // --- [ alEnable ] --- - - /** - * Enables AL capabilities. - * - * @param target the capability to enable - */ - @NativeType("ALvoid") - public static void alEnable(@NativeType("ALenum") int target) { - long __functionAddress = AL.getICD().alEnable; - invokeV(target, __functionAddress); - } - - // --- [ alDisable ] --- - - /** - * Disables AL capabilities. - * - * @param target the capability to disable - */ - @NativeType("ALvoid") - public static void alDisable(@NativeType("ALenum") int target) { - long __functionAddress = AL.getICD().alDisable; - invokeV(target, __functionAddress); - } - - // --- [ alIsEnabled ] --- - - /** - * Queries whether a given capability is currently enabled or not. - * - * @param target the capability to query - */ - @NativeType("ALboolean") - public static boolean alIsEnabled(@NativeType("ALenum") int target) { - long __functionAddress = AL.getICD().alIsEnabled; - return invokeZ(target, __functionAddress); - } - - // --- [ alGetBoolean ] --- - - /** - * Returns the boolean value of the specified parameter. - * - * @param paramName the parameter to query - */ - @NativeType("ALboolean") - public static boolean alGetBoolean(@NativeType("ALenum") int paramName) { - long __functionAddress = AL.getICD().alGetBoolean; - return invokeZ(paramName, __functionAddress); - } - - // --- [ alGetInteger ] --- - - /** - * Returns the integer value of the specified parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_DOPPLER_FACTOR DOPPLER_FACTOR}{@link #AL_DISTANCE_MODEL DISTANCE_MODEL}{@link AL11#AL_SPEED_OF_SOUND SPEED_OF_SOUND}
    - */ - @NativeType("ALint") - public static int alGetInteger(@NativeType("ALenum") int paramName) { - long __functionAddress = AL.getICD().alGetInteger; - return invokeI(paramName, __functionAddress); - } - - // --- [ alGetFloat ] --- - - /** - * Returns the float value of the specified parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_DOPPLER_FACTOR DOPPLER_FACTOR}{@link #AL_DISTANCE_MODEL DISTANCE_MODEL}{@link AL11#AL_SPEED_OF_SOUND SPEED_OF_SOUND}
    - */ - @NativeType("ALfloat") - public static float alGetFloat(@NativeType("ALenum") int paramName) { - long __functionAddress = AL.getICD().alGetFloat; - return invokeF(paramName, __functionAddress); - } - - // --- [ alGetDouble ] --- - - /** - * Returns the double value of the specified parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_DOPPLER_FACTOR DOPPLER_FACTOR}{@link #AL_DISTANCE_MODEL DISTANCE_MODEL}{@link AL11#AL_SPEED_OF_SOUND SPEED_OF_SOUND}
    - */ - @NativeType("ALdouble") - public static double alGetDouble(@NativeType("ALenum") int paramName) { - long __functionAddress = AL.getICD().alGetDouble; - return invokeD(paramName, __functionAddress); - } - - // --- [ alGetBooleanv ] --- - - /** Unsafe version of: {@link #alGetBooleanv GetBooleanv} */ - public static void nalGetBooleanv(int paramName, long dest) { - long __functionAddress = AL.getICD().alGetBooleanv; - invokePV(paramName, dest, __functionAddress); - } - - /** - * Pointer version of {@link #alGetBoolean GetBoolean}. - * - * @param paramName the parameter to query - * @param dest a buffer that will receive the parameter values - */ - @NativeType("ALvoid") - public static void alGetBooleanv(@NativeType("ALenum") int paramName, @NativeType("ALboolean *") ByteBuffer dest) { - if (CHECKS) { - check(dest, 1); - } - nalGetBooleanv(paramName, memAddress(dest)); - } - - // --- [ alGetIntegerv ] --- - - /** Unsafe version of: {@link #alGetIntegerv GetIntegerv} */ - public static void nalGetIntegerv(int paramName, long dest) { - long __functionAddress = AL.getICD().alGetIntegerv; - invokePV(paramName, dest, __functionAddress); - } - - /** - * Pointer version of {@link #alGetInteger GetInteger}. - * - * @param paramName the parameter to query - * @param dest a buffer that will receive the parameter values - */ - @NativeType("ALvoid") - public static void alGetIntegerv(@NativeType("ALenum") int paramName, @NativeType("ALint *") IntBuffer dest) { - if (CHECKS) { - check(dest, 1); - } - nalGetIntegerv(paramName, memAddress(dest)); - } - - // --- [ alGetFloatv ] --- - - /** Unsafe version of: {@link #alGetFloatv GetFloatv} */ - public static void nalGetFloatv(int paramName, long dest) { - long __functionAddress = AL.getICD().alGetFloatv; - invokePV(paramName, dest, __functionAddress); - } - - /** - * Pointer version of {@link #alGetFloat GetFloat}. - * - * @param paramName the parameter to query - * @param dest a buffer that will receive the parameter values - */ - @NativeType("ALvoid") - public static void alGetFloatv(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") FloatBuffer dest) { - if (CHECKS) { - check(dest, 1); - } - nalGetFloatv(paramName, memAddress(dest)); - } - - // --- [ alGetDoublev ] --- - - /** Unsafe version of: {@link #alGetDoublev GetDoublev} */ - public static void nalGetDoublev(int paramName, long dest) { - long __functionAddress = AL.getICD().alGetDoublev; - invokePV(paramName, dest, __functionAddress); - } - - /** - * Pointer version of {@link #alGetDouble GetDouble}. - * - * @param paramName the parameter to query - * @param dest a buffer that will receive the parameter values - */ - @NativeType("ALvoid") - public static void alGetDoublev(@NativeType("ALenum") int paramName, @NativeType("ALdouble *") DoubleBuffer dest) { - if (CHECKS) { - check(dest, 1); - } - nalGetDoublev(paramName, memAddress(dest)); - } - - // --- [ alGetString ] --- - - /** Unsafe version of: {@link #alGetString GetString} */ - public static long nalGetString(int paramName) { - long __functionAddress = AL.getICD().alGetString; - return invokeP(paramName, __functionAddress); - } - - /** - * Returns the string value of the specified parameter - * - * @param paramName the parameter to query. One of:
    {@link #AL_VENDOR VENDOR}{@link #AL_VERSION VERSION}{@link #AL_RENDERER RENDERER}{@link #AL_EXTENSIONS EXTENSIONS}
    - */ - @Nullable - @NativeType("ALchar const *") - public static String alGetString(@NativeType("ALenum") int paramName) { - long __result = nalGetString(paramName); - return memUTF8Safe(__result); - } - - // --- [ alDistanceModel ] --- - - /** - * Sets the distance attenuation model. - * - *

    Samples usually use the entire dynamic range of the chosen format/encoding, independent of their real world intensity. For example, a jet engine and a - * clockwork both will have samples with full amplitude. The application will then have to adjust source gain accordingly to account for relative differences.

    - * - *

    Source gain is then attenuated by distance. The effective attenuation of a source depends on many factors, among which distance attenuation and source - * and listener gain are only some of the contributing factors. Even if the source and listener gain exceed 1.0 (amplification beyond the guaranteed - * dynamic range), distance and other attenuation might ultimately limit the overall gain to a value below 1.0.

    - * - *

    OpenAL currently supports three modes of operation with respect to distance attenuation, including one that is similar to the IASIG I3DL2 model. The - * application can choose one of these models (or chooses to disable distance-dependent attenuation) on a per-context basis.

    - * - * @param modelName the distance attenuation model to set. One of:
    {@link #AL_INVERSE_DISTANCE INVERSE_DISTANCE}{@link #AL_INVERSE_DISTANCE_CLAMPED INVERSE_DISTANCE_CLAMPED}{@link AL11#AL_LINEAR_DISTANCE LINEAR_DISTANCE}{@link AL11#AL_LINEAR_DISTANCE_CLAMPED LINEAR_DISTANCE_CLAMPED}
    {@link AL11#AL_EXPONENT_DISTANCE EXPONENT_DISTANCE}{@link AL11#AL_EXPONENT_DISTANCE_CLAMPED EXPONENT_DISTANCE_CLAMPED}{@link #AL_NONE NONE}
    - */ - @NativeType("ALvoid") - public static void alDistanceModel(@NativeType("ALenum") int modelName) { - long __functionAddress = AL.getICD().alDistanceModel; - invokeV(modelName, __functionAddress); - } - - // --- [ alDopplerFactor ] --- - - /** - * Sets the doppler effect factor. - * - *

    The Doppler Effect depends on the velocities of source and listener relative to the medium, and the propagation speed of sound in that medium. The - * application might want to emphasize or de-emphasize the Doppler Effect as physically accurate calculation might not give the desired results. The amount - * of frequency shift (pitch change) is proportional to the speed of listener and source along their line of sight. The Doppler Effect as implemented by - * OpenAL is described by the formula below. Effects of the medium (air, water) moving with respect to listener and source are ignored.

    - * - *
    
    -     * SS: AL_SPEED_OF_SOUND = speed of sound (default value 343.3)
    -     * DF: AL_DOPPLER_FACTOR = Doppler factor (default 1.0)
    -     * vls: Listener velocity scalar (scalar, projected on source-to-listener vector)
    -     * vss: Source velocity scalar (scalar, projected on source-to-listener vector)
    -     * f: Frequency of sample
    -     * f': effective Doppler shifted frequency
    -     * 
    -     * 3D Mathematical representation of vls and vss:
    -     * 
    -     * Mag(vector) = sqrt(vector.x * vector.x + vector.y * vector.y + vector.z * vector.z)
    -     * DotProduct(v1, v2) = (v1.x * v2.x + v1.y * v2.y + v1.z * v2.z)
    -     * 
    -     * SL = source to listener vector
    -     * SV = Source velocity vector
    -     * LV = Listener velocity vector
    -     * 
    -     * vls = DotProduct(SL, LV) / Mag(SL)
    -     * vss = DotProduct(SL, SV) / Mag(SL)
    -     * 
    -     * Dopper Calculation:
    -     * 
    -     * vss = min(vss, SS / DF)
    -     * vls = min(vls, SS / DF)
    -     * 
    -     * f' = f * (SS - DF * vls) / (SS - DF * vss)
    - * - *

    The {@code dopplerFactor} is a simple scaling of source and listener velocities to exaggerate or deemphasize the Doppler (pitch) shift resulting from - * the calculation.

    - * - * @param dopplerFactor the doppler factor - */ - @NativeType("ALvoid") - public static void alDopplerFactor(@NativeType("ALfloat") float dopplerFactor) { - long __functionAddress = AL.getICD().alDopplerFactor; - invokeV(dopplerFactor, __functionAddress); - } - - // --- [ alDopplerVelocity ] --- - - /** - * Sets the doppler effect propagation velocity. - * - *

    The OpenAL 1.1 Doppler implementation is different than that of OpenAL 1.0, because the older implementation was confusing and not implemented - * consistently. The new "speed of sound" property makes the 1.1 implementation more intuitive than the old implementation. If your implementation wants to - * support the AL_DOPPLER_VELOCITY parameter (the alDopplerVelocity call will remain as an entry point so that 1.0 applications can link with a 1.1 - * library), the above formula can be changed to the following:

    - * - *
    
    -     * vss = min(vss, (SS * DV)/DF)
    -     * vls = min(vls, (SS * DV)/DF)
    -     * 
    -     * f' = f * (SS * DV - DF*vls) / (SS * DV - DF * vss)
    - * - *

    OpenAL 1.1 programmers would never use AL_DOPPLER_VELOCITY (which defaults to 1.0).

    - * - * @param dopplerVelocity the doppler velocity - */ - @NativeType("ALvoid") - public static void alDopplerVelocity(@NativeType("ALfloat") float dopplerVelocity) { - long __functionAddress = AL.getICD().alDopplerVelocity; - invokeV(dopplerVelocity, __functionAddress); - } - - // --- [ alListenerf ] --- - - /** - * Sets the float value of a listener parameter. - * - * @param paramName the parameter to modify. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alListenerf(@NativeType("ALenum") int paramName, @NativeType("ALfloat") float value) { - long __functionAddress = AL.getICD().alListenerf; - invokeV(paramName, value, __functionAddress); - } - - // --- [ alListeneri ] --- - - /** - * Integer version of {@link #alListenerf Listenerf}. - * - * @param paramName the parameter to modify. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - * @param values the parameter value - */ - @NativeType("ALvoid") - public static void alListeneri(@NativeType("ALenum") int paramName, @NativeType("ALint") int values) { - long __functionAddress = AL.getICD().alListeneri; - invokeV(paramName, values, __functionAddress); - } - - // --- [ alListener3f ] --- - - /** - * Sets the 3 dimensional float values of a listener parameter. - * - * @param paramName the parameter to modify. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alListener3f(@NativeType("ALenum") int paramName, @NativeType("ALfloat") float value1, @NativeType("ALfloat") float value2, @NativeType("ALfloat") float value3) { - long __functionAddress = AL.getICD().alListener3f; - invokeV(paramName, value1, value2, value3, __functionAddress); - } - - // --- [ alListenerfv ] --- - - /** Unsafe version of: {@link #alListenerfv Listenerfv} */ - public static void nalListenerfv(int paramName, long values) { - long __functionAddress = AL.getICD().alListenerfv; - invokePV(paramName, values, __functionAddress); - } - - /** - * Pointer version of {@link #alListenerf Listenerf}. - * - * @param paramName the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alListenerfv(@NativeType("ALenum") int paramName, @NativeType("ALfloat const *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalListenerfv(paramName, memAddress(values)); - } - - // --- [ alGetListenerf ] --- - - /** Unsafe version of: {@link #alGetListenerf GetListenerf} */ - public static void nalGetListenerf(int paramName, long value) { - long __functionAddress = AL.getICD().alGetListenerf; - invokePV(paramName, value, __functionAddress); - } - - /** - * Returns the float value of a listener parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetListenerf(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetListenerf(paramName, memAddress(value)); - } - - /** - * Returns the float value of a listener parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - */ - @NativeType("ALvoid") - public static float alGetListenerf(@NativeType("ALenum") int paramName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nalGetListenerf(paramName, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetListeneri ] --- - - /** Unsafe version of: {@link #alGetListeneri GetListeneri} */ - public static void nalGetListeneri(int paramName, long value) { - long __functionAddress = AL.getICD().alGetListeneri; - invokePV(paramName, value, __functionAddress); - } - - /** - * Returns the integer value of a listener parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetListeneri(@NativeType("ALenum") int paramName, @NativeType("ALint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetListeneri(paramName, memAddress(value)); - } - - /** - * Returns the integer value of a listener parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - */ - @NativeType("ALvoid") - public static int alGetListeneri(@NativeType("ALenum") int paramName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nalGetListeneri(paramName, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetListener3f ] --- - - /** Unsafe version of: {@link #alGetListener3f GetListener3f} */ - public static void nalGetListener3f(int paramName, long value1, long value2, long value3) { - long __functionAddress = AL.getICD().alGetListener3f; - invokePPPV(paramName, value1, value2, value3, __functionAddress); - } - - /** - * Returns the 3 dimensional values of a listener parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - * @param value1 the first parameter value - * @param value2 the second parameter value - * @param value3 the third parameter value - */ - @NativeType("ALvoid") - public static void alGetListener3f(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") FloatBuffer value1, @NativeType("ALfloat *") FloatBuffer value2, @NativeType("ALfloat *") FloatBuffer value3) { - if (CHECKS) { - check(value1, 1); - check(value2, 1); - check(value3, 1); - } - nalGetListener3f(paramName, memAddress(value1), memAddress(value2), memAddress(value3)); - } - - // --- [ alGetListenerfv ] --- - - /** Unsafe version of: {@link #alGetListenerfv GetListenerfv} */ - public static void nalGetListenerfv(int paramName, long values) { - long __functionAddress = AL.getICD().alGetListenerfv; - invokePV(paramName, values, __functionAddress); - } - - /** - * Returns float values of a listener parameter. - * - * @param paramName the parameter to query. One of:
    {@link #AL_ORIENTATION ORIENTATION}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}
    - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetListenerfv(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetListenerfv(paramName, memAddress(values)); - } - - // --- [ alGenSources ] --- - - /** - * Unsafe version of: {@link #alGenSources GenSources} - * - * @param n the number of source names to generated - */ - public static void nalGenSources(int n, long srcNames) { - long __functionAddress = AL.getICD().alGenSources; - invokePV(n, srcNames, __functionAddress); - } - - /** - * Requests a number of source names. - * - * @param srcNames the buffer that will receive the source names - */ - @NativeType("ALvoid") - public static void alGenSources(@NativeType("ALuint *") IntBuffer srcNames) { - nalGenSources(srcNames.remaining(), memAddress(srcNames)); - } - - /** Requests a number of source names. */ - @NativeType("ALvoid") - public static int alGenSources() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer srcNames = stack.callocInt(1); - nalGenSources(1, memAddress(srcNames)); - return srcNames.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alDeleteSources ] --- - - /** - * Unsafe version of: {@link #alDeleteSources DeleteSources} - * - * @param n the number of sources to delete - */ - public static void nalDeleteSources(int n, long sources) { - long __functionAddress = AL.getICD().alDeleteSources; - invokePV(n, sources, __functionAddress); - } - - /** - * Requests the deletion of a number of sources. - * - * @param sources the sources to delete - */ - @NativeType("ALvoid") - public static void alDeleteSources(@NativeType("ALuint *") IntBuffer sources) { - nalDeleteSources(sources.remaining(), memAddress(sources)); - } - - /** Requests the deletion of a number of sources. */ - @NativeType("ALvoid") - public static void alDeleteSources(@NativeType("ALuint *") int source) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer sources = stack.ints(source); - nalDeleteSources(1, memAddress(sources)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alIsSource ] --- - - /** - * Verifies whether the specified object name is a source name. - * - * @param sourceName a value that may be a source name - */ - @NativeType("ALboolean") - public static boolean alIsSource(@NativeType("ALuint") int sourceName) { - long __functionAddress = AL.getICD().alIsSource; - return invokeZ(sourceName, __functionAddress); - } - - // --- [ alSourcef ] --- - - /** - * Sets the float value of a source parameter. - * - * @param source the source to modify - * @param param the parameter to modify. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alSourcef(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat") float value) { - long __functionAddress = AL.getICD().alSourcef; - invokeV(source, param, value, __functionAddress); - } - - // --- [ alSource3f ] --- - - /** - * Sets the 3 dimensional values of a source parameter. - * - * @param source the source to modify - * @param param the parameter to modify. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - * @param v1 the first parameter value - * @param v2 the second parameter value - * @param v3 the third parameter value - */ - @NativeType("ALvoid") - public static void alSource3f(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat") float v1, @NativeType("ALfloat") float v2, @NativeType("ALfloat") float v3) { - long __functionAddress = AL.getICD().alSource3f; - invokeV(source, param, v1, v2, v3, __functionAddress); - } - - // --- [ alSourcefv ] --- - - /** Unsafe version of: {@link #alSourcefv Sourcefv} */ - public static void nalSourcefv(int source, int param, long values) { - long __functionAddress = AL.getICD().alSourcefv; - invokePV(source, param, values, __functionAddress); - } - - /** - * Pointer version of {@link #alSourcef Sourcef}. - * - * @param source the source to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alSourcefv(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat const *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalSourcefv(source, param, memAddress(values)); - } - - // --- [ alSourcei ] --- - - /** - * Integer version of {@link #alSourcef Sourcef}. - * - * @param source the source to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alSourcei(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint") int value) { - long __functionAddress = AL.getICD().alSourcei; - invokeV(source, param, value, __functionAddress); - } - - // --- [ alGetSourcef ] --- - - /** Unsafe version of: {@link #alGetSourcef GetSourcef} */ - public static void nalGetSourcef(int source, int param, long value) { - long __functionAddress = AL.getICD().alGetSourcef; - invokePV(source, param, value, __functionAddress); - } - - /** - * Returns the float value of the specified source parameter. - * - * @param source the source to query - * @param param the parameter to query. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetSourcef(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetSourcef(source, param, memAddress(value)); - } - - /** - * Returns the float value of the specified source parameter. - * - * @param source the source to query - * @param param the parameter to query. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - */ - @NativeType("ALvoid") - public static float alGetSourcef(@NativeType("ALuint") int source, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nalGetSourcef(source, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetSource3f ] --- - - /** Unsafe version of: {@link #alGetSource3f GetSource3f} */ - public static void nalGetSource3f(int source, int param, long v1, long v2, long v3) { - long __functionAddress = AL.getICD().alGetSource3f; - invokePPPV(source, param, v1, v2, v3, __functionAddress); - } - - /** - * Returns the 3 dimensional values of the specified source parameter. - * - * @param source the source to query - * @param param the parameter to query. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - * @param v1 the first parameter value - * @param v2 the second parameter value - * @param v3 the third parameter value - */ - @NativeType("ALvoid") - public static void alGetSource3f(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer v1, @NativeType("ALfloat *") FloatBuffer v2, @NativeType("ALfloat *") FloatBuffer v3) { - if (CHECKS) { - check(v1, 1); - check(v2, 1); - check(v3, 1); - } - nalGetSource3f(source, param, memAddress(v1), memAddress(v2), memAddress(v3)); - } - - // --- [ alGetSourcefv ] --- - - /** Unsafe version of: {@link #alGetSourcefv GetSourcefv} */ - public static void nalGetSourcefv(int source, int param, long values) { - long __functionAddress = AL.getICD().alGetSourcefv; - invokePV(source, param, values, __functionAddress); - } - - /** - * Returns the float values of the specified source parameter. - * - * @param source the source to query - * @param param the parameter to query. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetSourcefv(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetSourcefv(source, param, memAddress(values)); - } - - // --- [ alGetSourcei ] --- - - /** Unsafe version of: {@link #alGetSourcei GetSourcei} */ - public static void nalGetSourcei(int source, int param, long value) { - long __functionAddress = AL.getICD().alGetSourcei; - invokePV(source, param, value, __functionAddress); - } - - /** - * Returns the integer value of the specified source parameter. - * - * @param source the source to query - * @param param the parameter to query. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetSourcei(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetSourcei(source, param, memAddress(value)); - } - - /** - * Returns the integer value of the specified source parameter. - * - * @param source the source to query - * @param param the parameter to query. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - */ - @NativeType("ALvoid") - public static int alGetSourcei(@NativeType("ALuint") int source, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nalGetSourcei(source, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetSourceiv ] --- - - /** Unsafe version of: {@link #alGetSourceiv GetSourceiv} */ - public static void nalGetSourceiv(int source, int param, long values) { - long __functionAddress = AL.getICD().alGetSourceiv; - invokePV(source, param, values, __functionAddress); - } - - /** - * Returns the integer values of the specified source parameter. - * - * @param source the source to query - * @param param the parameter to query. One of:
    {@link #AL_CONE_INNER_ANGLE CONE_INNER_ANGLE}{@link #AL_CONE_OUTER_ANGLE CONE_OUTER_ANGLE}{@link #AL_PITCH PITCH}{@link #AL_DIRECTION DIRECTION}{@link #AL_LOOPING LOOPING}{@link #AL_BUFFER BUFFER}{@link #AL_SOURCE_STATE SOURCE_STATE}
    {@link #AL_CONE_OUTER_GAIN CONE_OUTER_GAIN}{@link #AL_SOURCE_TYPE SOURCE_TYPE}{@link #AL_POSITION POSITION}{@link #AL_VELOCITY VELOCITY}{@link #AL_GAIN GAIN}{@link #AL_REFERENCE_DISTANCE REFERENCE_DISTANCE}{@link #AL_ROLLOFF_FACTOR ROLLOFF_FACTOR}
    {@link #AL_MAX_DISTANCE MAX_DISTANCE}
    - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetSourceiv(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetSourceiv(source, param, memAddress(values)); - } - - // --- [ alSourceQueueBuffers ] --- - - /** - * Unsafe version of: {@link #alSourceQueueBuffers SourceQueueBuffers} - * - * @param numBuffers the number of buffers to queue - */ - public static void nalSourceQueueBuffers(int sourceName, int numBuffers, long bufferNames) { - long __functionAddress = AL.getICD().alSourceQueueBuffers; - invokePV(sourceName, numBuffers, bufferNames, __functionAddress); - } - - /** - * Queues up one or multiple buffer names to the specified source. - * - *

    The buffers will be queued in the sequence in which they appear in the array. This command is legal on a source in any playback state (to allow for - * streaming, queuing has to be possible on a AL_PLAYING source). All buffers in a queue must have the same format and attributes, with the exception of - * the {@code NULL} buffer (i.e., 0) which can always be queued.

    - * - * @param sourceName the target source - * @param bufferNames the buffer names - */ - @NativeType("ALvoid") - public static void alSourceQueueBuffers(@NativeType("ALuint") int sourceName, @NativeType("ALuint *") IntBuffer bufferNames) { - nalSourceQueueBuffers(sourceName, bufferNames.remaining(), memAddress(bufferNames)); - } - - /** - * Queues up one or multiple buffer names to the specified source. - * - *

    The buffers will be queued in the sequence in which they appear in the array. This command is legal on a source in any playback state (to allow for - * streaming, queuing has to be possible on a AL_PLAYING source). All buffers in a queue must have the same format and attributes, with the exception of - * the {@code NULL} buffer (i.e., 0) which can always be queued.

    - * - * @param sourceName the target source - */ - @NativeType("ALvoid") - public static void alSourceQueueBuffers(@NativeType("ALuint") int sourceName, @NativeType("ALuint *") int bufferName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer bufferNames = stack.ints(bufferName); - nalSourceQueueBuffers(sourceName, 1, memAddress(bufferNames)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alSourceUnqueueBuffers ] --- - - /** - * Unsafe version of: {@link #alSourceUnqueueBuffers SourceUnqueueBuffers} - * - * @param numEntries the number of buffers to unqueue - */ - public static void nalSourceUnqueueBuffers(int sourceName, int numEntries, long bufferNames) { - long __functionAddress = AL.getICD().alSourceUnqueueBuffers; - invokePV(sourceName, numEntries, bufferNames, __functionAddress); - } - - /** - * Removes a number of buffer entries that have finished processing, in the order of apperance, from the queue of the specified source. - * - *

    Once a queue entry for a buffer has been appended to a queue and is pending processing, it should not be changed. Removal of a given queue entry is not - * possible unless either the source is stopped (in which case then entire queue is considered processed), or if the queue entry has already been processed - * (AL_PLAYING or AL_PAUSED source). A playing source will enter the AL_STOPPED state if it completes playback of the last buffer in its queue (the same - * behavior as when a single buffer has been attached to a source and has finished playback).

    - * - * @param sourceName the target source - * @param bufferNames the buffer names - */ - @NativeType("ALvoid") - public static void alSourceUnqueueBuffers(@NativeType("ALuint") int sourceName, @NativeType("ALuint *") IntBuffer bufferNames) { - nalSourceUnqueueBuffers(sourceName, bufferNames.remaining(), memAddress(bufferNames)); - } - - /** - * Removes a number of buffer entries that have finished processing, in the order of apperance, from the queue of the specified source. - * - *

    Once a queue entry for a buffer has been appended to a queue and is pending processing, it should not be changed. Removal of a given queue entry is not - * possible unless either the source is stopped (in which case then entire queue is considered processed), or if the queue entry has already been processed - * (AL_PLAYING or AL_PAUSED source). A playing source will enter the AL_STOPPED state if it completes playback of the last buffer in its queue (the same - * behavior as when a single buffer has been attached to a source and has finished playback).

    - * - * @param sourceName the target source - */ - @NativeType("ALvoid") - public static int alSourceUnqueueBuffers(@NativeType("ALuint") int sourceName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer bufferNames = stack.callocInt(1); - nalSourceUnqueueBuffers(sourceName, 1, memAddress(bufferNames)); - return bufferNames.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alSourcePlay ] --- - - /** - * Sets the source state to AL_PLAYING. - * - *

    alSourcePlay applied to an AL_INITIAL source will promote the source to AL_PLAYING, thus the data found in the buffer will be fed into the processing, - * starting at the beginning. alSourcePlay applied to a AL_PLAYING source will restart the source from the beginning. It will not affect the configuration, - * and will leave the source in AL_PLAYING state, but reset the sampling offset to the beginning. alSourcePlay applied to a AL_PAUSED source will resume - * processing using the source state as preserved at the alSourcePause operation. alSourcePlay applied to a AL_STOPPED source will propagate it to - * AL_INITIAL then to AL_PLAYING immediately.

    - * - * @param source the source to play - */ - @NativeType("ALvoid") - public static void alSourcePlay(@NativeType("ALuint") int source) { - long __functionAddress = AL.getICD().alSourcePlay; - invokeV(source, __functionAddress); - } - - // --- [ alSourcePause ] --- - - /** - * Sets the source state to AL_PAUSED. - * - *

    alSourcePause applied to an AL_INITIAL source is a legal NOP. alSourcePause applied to a AL_PLAYING source will change its state to AL_PAUSED. The - * source is exempt from processing, its current state is preserved. alSourcePause applied to a AL_PAUSED source is a legal NOP. alSourcePause applied to a - * AL_STOPPED source is a legal NOP.

    - * - * @param source the source to pause - */ - @NativeType("ALvoid") - public static void alSourcePause(@NativeType("ALuint") int source) { - long __functionAddress = AL.getICD().alSourcePause; - invokeV(source, __functionAddress); - } - - // --- [ alSourceStop ] --- - - /** - * Sets the source state to AL_STOPPED. - * - *

    alSourceStop applied to an AL_INITIAL source is a legal NOP. alSourceStop applied to a AL_PLAYING source will change its state to AL_STOPPED. The source - * is exempt from processing, its current state is preserved. alSourceStop applied to a AL_PAUSED source will change its state to AL_STOPPED, with the same - * consequences as on a AL_PLAYING source. alSourceStop applied to a AL_STOPPED source is a legal NOP.

    - * - * @param source the source to stop - */ - @NativeType("ALvoid") - public static void alSourceStop(@NativeType("ALuint") int source) { - long __functionAddress = AL.getICD().alSourceStop; - invokeV(source, __functionAddress); - } - - // --- [ alSourceRewind ] --- - - /** - * Sets the source state to AL_INITIAL. - * - *

    alSourceRewind applied to an AL_INITIAL source is a legal NOP. alSourceRewind applied to a AL_PLAYING source will change its state to AL_STOPPED then - * AL_INITIAL. The source is exempt from processing: its current state is preserved, with the exception of the sampling offset, which is reset to the - * beginning. alSourceRewind applied to a AL_PAUSED source will change its state to AL_INITIAL, with the same consequences as on a AL_PLAYING source. - * alSourceRewind applied to an AL_STOPPED source promotes the source to AL_INITIAL, resetting the sampling offset to the beginning.

    - * - * @param source the source to rewind - */ - @NativeType("ALvoid") - public static void alSourceRewind(@NativeType("ALuint") int source) { - long __functionAddress = AL.getICD().alSourceRewind; - invokeV(source, __functionAddress); - } - - // --- [ alSourcePlayv ] --- - - /** - * Unsafe version of: {@link #alSourcePlayv SourcePlayv} - * - * @param n the number of sources to play - */ - public static void nalSourcePlayv(int n, long sources) { - long __functionAddress = AL.getICD().alSourcePlayv; - invokePV(n, sources, __functionAddress); - } - - /** - * Pointer version of {@link #alSourcePlay SourcePlay}. - * - * @param sources the sources to play - */ - @NativeType("ALvoid") - public static void alSourcePlayv(@NativeType("ALuint const *") IntBuffer sources) { - nalSourcePlayv(sources.remaining(), memAddress(sources)); - } - - // --- [ alSourcePausev ] --- - - /** - * Unsafe version of: {@link #alSourcePausev SourcePausev} - * - * @param n the number of sources to pause - */ - public static void nalSourcePausev(int n, long sources) { - long __functionAddress = AL.getICD().alSourcePausev; - invokePV(n, sources, __functionAddress); - } - - /** - * Pointer version of {@link #alSourcePause SourcePause}. - * - * @param sources the sources to pause - */ - @NativeType("ALvoid") - public static void alSourcePausev(@NativeType("ALuint const *") IntBuffer sources) { - nalSourcePausev(sources.remaining(), memAddress(sources)); - } - - // --- [ alSourceStopv ] --- - - /** - * Unsafe version of: {@link #alSourceStopv SourceStopv} - * - * @param n the number of sources to stop - */ - public static void nalSourceStopv(int n, long sources) { - long __functionAddress = AL.getICD().alSourceStopv; - invokePV(n, sources, __functionAddress); - } - - /** - * Pointer version of {@link #alSourceStop SourceStop}. - * - * @param sources the sources to stop - */ - @NativeType("ALvoid") - public static void alSourceStopv(@NativeType("ALuint const *") IntBuffer sources) { - nalSourceStopv(sources.remaining(), memAddress(sources)); - } - - // --- [ alSourceRewindv ] --- - - /** - * Unsafe version of: {@link #alSourceRewindv SourceRewindv} - * - * @param n the number of sources to rewind - */ - public static void nalSourceRewindv(int n, long sources) { - long __functionAddress = AL.getICD().alSourceRewindv; - invokePV(n, sources, __functionAddress); - } - - /** - * Pointer version of {@link #alSourceRewind SourceRewind}. - * - * @param sources the sources to rewind - */ - @NativeType("ALvoid") - public static void alSourceRewindv(@NativeType("ALuint const *") IntBuffer sources) { - nalSourceRewindv(sources.remaining(), memAddress(sources)); - } - - // --- [ alGenBuffers ] --- - - /** - * Unsafe version of: {@link #alGenBuffers GenBuffers} - * - * @param n the number of buffer names to generate - */ - public static void nalGenBuffers(int n, long bufferNames) { - long __functionAddress = AL.getICD().alGenBuffers; - invokePV(n, bufferNames, __functionAddress); - } - - /** - * Requests a number of buffer names. - * - * @param bufferNames the buffer that will receive the buffer names - */ - @NativeType("ALvoid") - public static void alGenBuffers(@NativeType("ALuint *") IntBuffer bufferNames) { - nalGenBuffers(bufferNames.remaining(), memAddress(bufferNames)); - } - - /** Requests a number of buffer names. */ - @NativeType("ALvoid") - public static int alGenBuffers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer bufferNames = stack.callocInt(1); - nalGenBuffers(1, memAddress(bufferNames)); - return bufferNames.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alDeleteBuffers ] --- - - /** - * Unsafe version of: {@link #alDeleteBuffers DeleteBuffers} - * - * @param n the number of buffers to delete - */ - public static void nalDeleteBuffers(int n, long bufferNames) { - long __functionAddress = AL.getICD().alDeleteBuffers; - invokePV(n, bufferNames, __functionAddress); - } - - /** - * Requests the deletion of a number of buffers. - * - * @param bufferNames the buffers to delete - */ - @NativeType("ALvoid") - public static void alDeleteBuffers(@NativeType("ALuint const *") IntBuffer bufferNames) { - nalDeleteBuffers(bufferNames.remaining(), memAddress(bufferNames)); - } - - /** Requests the deletion of a number of buffers. */ - @NativeType("ALvoid") - public static void alDeleteBuffers(@NativeType("ALuint const *") int bufferName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer bufferNames = stack.ints(bufferName); - nalDeleteBuffers(1, memAddress(bufferNames)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alIsBuffer ] --- - - /** - * Verifies whether the specified object name is a buffer name. - * - * @param bufferName a value that may be a buffer name - */ - @NativeType("ALboolean") - public static boolean alIsBuffer(@NativeType("ALuint") int bufferName) { - long __functionAddress = AL.getICD().alIsBuffer; - return invokeZ(bufferName, __functionAddress); - } - - // --- [ alGetBufferf ] --- - - /** Unsafe version of: {@link #alGetBufferf GetBufferf} */ - public static void nalGetBufferf(int bufferName, int paramName, long value) { - long __functionAddress = AL.getICD().alGetBufferf; - invokePV(bufferName, paramName, value, __functionAddress); - } - - /** - * Returns the float value of the specified buffer parameter. - * - * @param bufferName the buffer to query - * @param paramName the parameter to query. One of:
    {@link #AL_FREQUENCY FREQUENCY}{@link #AL_BITS BITS}{@link #AL_CHANNELS CHANNELS}{@link #AL_SIZE SIZE}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetBufferf(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int paramName, @NativeType("ALfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetBufferf(bufferName, paramName, memAddress(value)); - } - - /** - * Returns the float value of the specified buffer parameter. - * - * @param bufferName the buffer to query - * @param paramName the parameter to query. One of:
    {@link #AL_FREQUENCY FREQUENCY}{@link #AL_BITS BITS}{@link #AL_CHANNELS CHANNELS}{@link #AL_SIZE SIZE}
    - */ - @NativeType("ALvoid") - public static float alGetBufferf(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int paramName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nalGetBufferf(bufferName, paramName, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetBufferi ] --- - - /** Unsafe version of: {@link #alGetBufferi GetBufferi} */ - public static void nalGetBufferi(int bufferName, int paramName, long value) { - long __functionAddress = AL.getICD().alGetBufferi; - invokePV(bufferName, paramName, value, __functionAddress); - } - - /** - * Returns the integer value of the specified buffer parameter. - * - * @param bufferName the buffer to query - * @param paramName the parameter to query. One of:
    {@link #AL_FREQUENCY FREQUENCY}{@link #AL_BITS BITS}{@link #AL_CHANNELS CHANNELS}{@link #AL_SIZE SIZE}
    - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetBufferi(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int paramName, @NativeType("ALint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetBufferi(bufferName, paramName, memAddress(value)); - } - - /** - * Returns the integer value of the specified buffer parameter. - * - * @param bufferName the buffer to query - * @param paramName the parameter to query. One of:
    {@link #AL_FREQUENCY FREQUENCY}{@link #AL_BITS BITS}{@link #AL_CHANNELS CHANNELS}{@link #AL_SIZE SIZE}
    - */ - @NativeType("ALvoid") - public static int alGetBufferi(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int paramName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nalGetBufferi(bufferName, paramName, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alBufferData ] --- - - /** - * Unsafe version of: {@link #alBufferData BufferData} - * - * @param size the data buffer size, in bytes - */ - public static void nalBufferData(int bufferName, int format, long data, int size, int frequency) { - long __functionAddress = AL.getICD().alBufferData; - invokePV(bufferName, format, data, size, frequency, __functionAddress); - } - - /** - * Sets the sample data of the specified buffer. - * - *

    The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, - * resampling, and filtering as needed.

    - * - *

    8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.

    - * - *

    16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is - * determined by the native format of the CPU.

    - * - *

    Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.

    - * - *

    Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for - * background music.

    - * - * @param bufferName the buffer to modify - * @param format the data format. One of:
    {@link #AL_FORMAT_MONO8 FORMAT_MONO8}{@link #AL_FORMAT_MONO16 FORMAT_MONO16}{@link #AL_FORMAT_STEREO8 FORMAT_STEREO8}{@link #AL_FORMAT_STEREO16 FORMAT_STEREO16}
    - * @param data the sample data - * @param frequency the data frequency - */ - @NativeType("ALvoid") - public static void alBufferData(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int format, @NativeType("ALvoid const *") ByteBuffer data, @NativeType("ALsizei") int frequency) { - nalBufferData(bufferName, format, memAddress(data), data.remaining(), frequency); - } - - /** - * Sets the sample data of the specified buffer. - * - *

    The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, - * resampling, and filtering as needed.

    - * - *

    8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.

    - * - *

    16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is - * determined by the native format of the CPU.

    - * - *

    Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.

    - * - *

    Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for - * background music.

    - * - * @param bufferName the buffer to modify - * @param format the data format. One of:
    {@link #AL_FORMAT_MONO8 FORMAT_MONO8}{@link #AL_FORMAT_MONO16 FORMAT_MONO16}{@link #AL_FORMAT_STEREO8 FORMAT_STEREO8}{@link #AL_FORMAT_STEREO16 FORMAT_STEREO16}
    - * @param data the sample data - * @param frequency the data frequency - */ - @NativeType("ALvoid") - public static void alBufferData(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int format, @NativeType("ALvoid const *") ShortBuffer data, @NativeType("ALsizei") int frequency) { - nalBufferData(bufferName, format, memAddress(data), data.remaining() << 1, frequency); - } - - /** - * Sets the sample data of the specified buffer. - * - *

    The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, - * resampling, and filtering as needed.

    - * - *

    8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.

    - * - *

    16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is - * determined by the native format of the CPU.

    - * - *

    Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.

    - * - *

    Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for - * background music.

    - * - * @param bufferName the buffer to modify - * @param format the data format. One of:
    {@link #AL_FORMAT_MONO8 FORMAT_MONO8}{@link #AL_FORMAT_MONO16 FORMAT_MONO16}{@link #AL_FORMAT_STEREO8 FORMAT_STEREO8}{@link #AL_FORMAT_STEREO16 FORMAT_STEREO16}
    - * @param data the sample data - * @param frequency the data frequency - */ - @NativeType("ALvoid") - public static void alBufferData(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int format, @NativeType("ALvoid const *") IntBuffer data, @NativeType("ALsizei") int frequency) { - nalBufferData(bufferName, format, memAddress(data), data.remaining() << 2, frequency); - } - - /** - * Sets the sample data of the specified buffer. - * - *

    The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, - * resampling, and filtering as needed.

    - * - *

    8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.

    - * - *

    16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is - * determined by the native format of the CPU.

    - * - *

    Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.

    - * - *

    Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for - * background music.

    - * - * @param bufferName the buffer to modify - * @param format the data format. One of:
    {@link #AL_FORMAT_MONO8 FORMAT_MONO8}{@link #AL_FORMAT_MONO16 FORMAT_MONO16}{@link #AL_FORMAT_STEREO8 FORMAT_STEREO8}{@link #AL_FORMAT_STEREO16 FORMAT_STEREO16}
    - * @param data the sample data - * @param frequency the data frequency - */ - @NativeType("ALvoid") - public static void alBufferData(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int format, @NativeType("ALvoid const *") FloatBuffer data, @NativeType("ALsizei") int frequency) { - nalBufferData(bufferName, format, memAddress(data), data.remaining() << 2, frequency); - } - - // --- [ alGetEnumValue ] --- - - /** Unsafe version of: {@link #alGetEnumValue GetEnumValue} */ - public static int nalGetEnumValue(long enumName) { - long __functionAddress = AL.getICD().alGetEnumValue; - return invokePI(enumName, __functionAddress); - } - - /** - * Returns the enumeration value of the specified enum. - * - * @param enumName the enum name - */ - @NativeType("ALuint") - public static int alGetEnumValue(@NativeType("ALchar const *") ByteBuffer enumName) { - if (CHECKS) { - checkNT1(enumName); - } - return nalGetEnumValue(memAddress(enumName)); - } - - /** - * Returns the enumeration value of the specified enum. - * - * @param enumName the enum name - */ - @NativeType("ALuint") - public static int alGetEnumValue(@NativeType("ALchar const *") CharSequence enumName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(enumName, true); - long enumNameEncoded = stack.getPointerAddress(); - return nalGetEnumValue(enumNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetProcAddress ] --- - - /** Unsafe version of: {@link #alGetProcAddress GetProcAddress} */ - public static long nalGetProcAddress(long funcName) { - long __functionAddress = AL.getICD().alGetProcAddress; - return invokePP(funcName, __functionAddress); - } - - /** - * Retrieves extension entry points. - * - *

    Returns {@code NULL} if no entry point with the name funcName can be found. Implementations are free to return {@code NULL} if an entry point is present, but not - * applicable for the current context. However the specification does not guarantee this behavior.

    - * - *

    Applications can use alGetProcAddress to obtain core API entry points, not just extensions. This is the recommended way to dynamically load and unload - * OpenAL DLL's as sound drivers.

    - * - * @param funcName the function name - */ - @NativeType("void *") - public static long alGetProcAddress(@NativeType("ALchar const *") ByteBuffer funcName) { - if (CHECKS) { - checkNT1(funcName); - } - return nalGetProcAddress(memAddress(funcName)); - } - - /** - * Retrieves extension entry points. - * - *

    Returns {@code NULL} if no entry point with the name funcName can be found. Implementations are free to return {@code NULL} if an entry point is present, but not - * applicable for the current context. However the specification does not guarantee this behavior.

    - * - *

    Applications can use alGetProcAddress to obtain core API entry points, not just extensions. This is the recommended way to dynamically load and unload - * OpenAL DLL's as sound drivers.

    - * - * @param funcName the function name - */ - @NativeType("void *") - public static long alGetProcAddress(@NativeType("ALchar const *") CharSequence funcName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(funcName, true); - long funcNameEncoded = stack.getPointerAddress(); - return nalGetProcAddress(funcNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alIsExtensionPresent ] --- - - /** Unsafe version of: {@link #alIsExtensionPresent IsExtensionPresent} */ - public static boolean nalIsExtensionPresent(long extName) { - long __functionAddress = AL.getICD().alIsExtensionPresent; - return invokePZ(extName, __functionAddress); - } - - /** - * Verifies that a given extension is available for the current context and the device it is associated with. - * - *

    Invalid and unsupported string tokens return ALC_FALSE. {@code extName} is not case sensitive – the implementation will convert the name to all - * upper-case internally (and will express extension names in upper-case).

    - * - * @param extName the extension name - */ - @NativeType("ALCboolean") - public static boolean alIsExtensionPresent(@NativeType("ALchar const *") ByteBuffer extName) { - if (CHECKS) { - checkNT1(extName); - } - return nalIsExtensionPresent(memAddress(extName)); - } - - /** - * Verifies that a given extension is available for the current context and the device it is associated with. - * - *

    Invalid and unsupported string tokens return ALC_FALSE. {@code extName} is not case sensitive – the implementation will convert the name to all - * upper-case internally (and will express extension names in upper-case).

    - * - * @param extName the extension name - */ - @NativeType("ALCboolean") - public static boolean alIsExtensionPresent(@NativeType("ALchar const *") CharSequence extName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(extName, true); - long extNameEncoded = stack.getPointerAddress(); - return nalIsExtensionPresent(extNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #alGetIntegerv GetIntegerv} */ - @NativeType("ALvoid") - public static void alGetIntegerv(@NativeType("ALenum") int paramName, @NativeType("ALint *") int[] dest) { - long __functionAddress = AL.getICD().alGetIntegerv; - if (CHECKS) { - check(dest, 1); - } - invokePV(paramName, dest, __functionAddress); - } - - /** Array version of: {@link #alGetFloatv GetFloatv} */ - @NativeType("ALvoid") - public static void alGetFloatv(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") float[] dest) { - long __functionAddress = AL.getICD().alGetFloatv; - if (CHECKS) { - check(dest, 1); - } - invokePV(paramName, dest, __functionAddress); - } - - /** Array version of: {@link #alGetDoublev GetDoublev} */ - @NativeType("ALvoid") - public static void alGetDoublev(@NativeType("ALenum") int paramName, @NativeType("ALdouble *") double[] dest) { - long __functionAddress = AL.getICD().alGetDoublev; - if (CHECKS) { - check(dest, 1); - } - invokePV(paramName, dest, __functionAddress); - } - - /** Array version of: {@link #alListenerfv Listenerfv} */ - @NativeType("ALvoid") - public static void alListenerfv(@NativeType("ALenum") int paramName, @NativeType("ALfloat const *") float[] values) { - long __functionAddress = AL.getICD().alListenerfv; - if (CHECKS) { - check(values, 1); - } - invokePV(paramName, values, __functionAddress); - } - - /** Array version of: {@link #alGetListenerf GetListenerf} */ - @NativeType("ALvoid") - public static void alGetListenerf(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") float[] value) { - long __functionAddress = AL.getICD().alGetListenerf; - if (CHECKS) { - check(value, 1); - } - invokePV(paramName, value, __functionAddress); - } - - /** Array version of: {@link #alGetListeneri GetListeneri} */ - @NativeType("ALvoid") - public static void alGetListeneri(@NativeType("ALenum") int paramName, @NativeType("ALint *") int[] value) { - long __functionAddress = AL.getICD().alGetListeneri; - if (CHECKS) { - check(value, 1); - } - invokePV(paramName, value, __functionAddress); - } - - /** Array version of: {@link #alGetListener3f GetListener3f} */ - @NativeType("ALvoid") - public static void alGetListener3f(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") float[] value1, @NativeType("ALfloat *") float[] value2, @NativeType("ALfloat *") float[] value3) { - long __functionAddress = AL.getICD().alGetListener3f; - if (CHECKS) { - check(value1, 1); - check(value2, 1); - check(value3, 1); - } - invokePPPV(paramName, value1, value2, value3, __functionAddress); - } - - /** Array version of: {@link #alGetListenerfv GetListenerfv} */ - @NativeType("ALvoid") - public static void alGetListenerfv(@NativeType("ALenum") int paramName, @NativeType("ALfloat *") float[] values) { - long __functionAddress = AL.getICD().alGetListenerfv; - if (CHECKS) { - check(values, 1); - } - invokePV(paramName, values, __functionAddress); - } - - /** Array version of: {@link #alGenSources GenSources} */ - @NativeType("ALvoid") - public static void alGenSources(@NativeType("ALuint *") int[] srcNames) { - long __functionAddress = AL.getICD().alGenSources; - invokePV(srcNames.length, srcNames, __functionAddress); - } - - /** Array version of: {@link #alDeleteSources DeleteSources} */ - @NativeType("ALvoid") - public static void alDeleteSources(@NativeType("ALuint *") int[] sources) { - long __functionAddress = AL.getICD().alDeleteSources; - invokePV(sources.length, sources, __functionAddress); - } - - /** Array version of: {@link #alSourcefv Sourcefv} */ - @NativeType("ALvoid") - public static void alSourcefv(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat const *") float[] values) { - long __functionAddress = AL.getICD().alSourcefv; - if (CHECKS) { - check(values, 1); - } - invokePV(source, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetSourcef GetSourcef} */ - @NativeType("ALvoid") - public static void alGetSourcef(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] value) { - long __functionAddress = AL.getICD().alGetSourcef; - if (CHECKS) { - check(value, 1); - } - invokePV(source, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetSource3f GetSource3f} */ - @NativeType("ALvoid") - public static void alGetSource3f(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] v1, @NativeType("ALfloat *") float[] v2, @NativeType("ALfloat *") float[] v3) { - long __functionAddress = AL.getICD().alGetSource3f; - if (CHECKS) { - check(v1, 1); - check(v2, 1); - check(v3, 1); - } - invokePPPV(source, param, v1, v2, v3, __functionAddress); - } - - /** Array version of: {@link #alGetSourcefv GetSourcefv} */ - @NativeType("ALvoid") - public static void alGetSourcefv(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] values) { - long __functionAddress = AL.getICD().alGetSourcefv; - if (CHECKS) { - check(values, 1); - } - invokePV(source, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetSourcei GetSourcei} */ - @NativeType("ALvoid") - public static void alGetSourcei(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint *") int[] value) { - long __functionAddress = AL.getICD().alGetSourcei; - if (CHECKS) { - check(value, 1); - } - invokePV(source, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetSourceiv GetSourceiv} */ - @NativeType("ALvoid") - public static void alGetSourceiv(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint *") int[] values) { - long __functionAddress = AL.getICD().alGetSourceiv; - if (CHECKS) { - check(values, 1); - } - invokePV(source, param, values, __functionAddress); - } - - /** Array version of: {@link #alSourceQueueBuffers SourceQueueBuffers} */ - @NativeType("ALvoid") - public static void alSourceQueueBuffers(@NativeType("ALuint") int sourceName, @NativeType("ALuint *") int[] bufferNames) { - long __functionAddress = AL.getICD().alSourceQueueBuffers; - invokePV(sourceName, bufferNames.length, bufferNames, __functionAddress); - } - - /** Array version of: {@link #alSourceUnqueueBuffers SourceUnqueueBuffers} */ - @NativeType("ALvoid") - public static void alSourceUnqueueBuffers(@NativeType("ALuint") int sourceName, @NativeType("ALuint *") int[] bufferNames) { - long __functionAddress = AL.getICD().alSourceUnqueueBuffers; - invokePV(sourceName, bufferNames.length, bufferNames, __functionAddress); - } - - /** Array version of: {@link #alSourcePlayv SourcePlayv} */ - @NativeType("ALvoid") - public static void alSourcePlayv(@NativeType("ALuint const *") int[] sources) { - long __functionAddress = AL.getICD().alSourcePlayv; - invokePV(sources.length, sources, __functionAddress); - } - - /** Array version of: {@link #alSourcePausev SourcePausev} */ - @NativeType("ALvoid") - public static void alSourcePausev(@NativeType("ALuint const *") int[] sources) { - long __functionAddress = AL.getICD().alSourcePausev; - invokePV(sources.length, sources, __functionAddress); - } - - /** Array version of: {@link #alSourceStopv SourceStopv} */ - @NativeType("ALvoid") - public static void alSourceStopv(@NativeType("ALuint const *") int[] sources) { - long __functionAddress = AL.getICD().alSourceStopv; - invokePV(sources.length, sources, __functionAddress); - } - - /** Array version of: {@link #alSourceRewindv SourceRewindv} */ - @NativeType("ALvoid") - public static void alSourceRewindv(@NativeType("ALuint const *") int[] sources) { - long __functionAddress = AL.getICD().alSourceRewindv; - invokePV(sources.length, sources, __functionAddress); - } - - /** Array version of: {@link #alGenBuffers GenBuffers} */ - @NativeType("ALvoid") - public static void alGenBuffers(@NativeType("ALuint *") int[] bufferNames) { - long __functionAddress = AL.getICD().alGenBuffers; - invokePV(bufferNames.length, bufferNames, __functionAddress); - } - - /** Array version of: {@link #alDeleteBuffers DeleteBuffers} */ - @NativeType("ALvoid") - public static void alDeleteBuffers(@NativeType("ALuint const *") int[] bufferNames) { - long __functionAddress = AL.getICD().alDeleteBuffers; - invokePV(bufferNames.length, bufferNames, __functionAddress); - } - - /** Array version of: {@link #alGetBufferf GetBufferf} */ - @NativeType("ALvoid") - public static void alGetBufferf(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int paramName, @NativeType("ALfloat *") float[] value) { - long __functionAddress = AL.getICD().alGetBufferf; - if (CHECKS) { - check(value, 1); - } - invokePV(bufferName, paramName, value, __functionAddress); - } - - /** Array version of: {@link #alGetBufferi GetBufferi} */ - @NativeType("ALvoid") - public static void alGetBufferi(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int paramName, @NativeType("ALint *") int[] value) { - long __functionAddress = AL.getICD().alGetBufferi; - if (CHECKS) { - check(value, 1); - } - invokePV(bufferName, paramName, value, __functionAddress); - } - - /** Array version of: {@link #alBufferData BufferData} */ - @NativeType("ALvoid") - public static void alBufferData(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int format, @NativeType("ALvoid const *") short[] data, @NativeType("ALsizei") int frequency) { - long __functionAddress = AL.getICD().alBufferData; - invokePV(bufferName, format, data, data.length << 1, frequency, __functionAddress); - } - - /** Array version of: {@link #alBufferData BufferData} */ - @NativeType("ALvoid") - public static void alBufferData(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int format, @NativeType("ALvoid const *") int[] data, @NativeType("ALsizei") int frequency) { - long __functionAddress = AL.getICD().alBufferData; - invokePV(bufferName, format, data, data.length << 2, frequency, __functionAddress); - } - - /** Array version of: {@link #alBufferData BufferData} */ - @NativeType("ALvoid") - public static void alBufferData(@NativeType("ALuint") int bufferName, @NativeType("ALenum") int format, @NativeType("ALvoid const *") float[] data, @NativeType("ALsizei") int frequency) { - long __functionAddress = AL.getICD().alBufferData; - invokePV(bufferName, format, data, data.length << 2, frequency, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/AL11.java b/LWJGL/src/main/java/org/lwjgl/openal/AL11.java deleted file mode 100644 index 58bf9303..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/AL11.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to AL 1.1 functionality. */ -public class AL11 extends AL10 { - - /** General tokens. */ - public static final int - AL_SEC_OFFSET = 0x1024, - AL_SAMPLE_OFFSET = 0x1025, - AL_BYTE_OFFSET = 0x1026, - AL_STATIC = 0x1028, - AL_STREAMING = 0x1029, - AL_UNDETERMINED = 0x1030, - AL_ILLEGAL_COMMAND = 0xA004, - AL_SPEED_OF_SOUND = 0xC003, - AL_LINEAR_DISTANCE = 0xD003, - AL_LINEAR_DISTANCE_CLAMPED = 0xD004, - AL_EXPONENT_DISTANCE = 0xD005, - AL_EXPONENT_DISTANCE_CLAMPED = 0xD006; - - protected AL11() { - throw new UnsupportedOperationException(); - } - - // --- [ alListener3i ] --- - - /** - * Sets the 3 dimensional integer values of a listener parameter. - * - * @param paramName the parameter to modify - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alListener3i(@NativeType("ALenum") int paramName, @NativeType("ALint") int value1, @NativeType("ALint") int value2, @NativeType("ALint") int value3) { - long __functionAddress = AL.getICD().alListener3i; - if (CHECKS) { - check(__functionAddress); - } - invokeV(paramName, value1, value2, value3, __functionAddress); - } - - // --- [ alGetListeneriv ] --- - - /** Unsafe version of: {@link #alGetListeneriv GetListeneriv} */ - public static void nalGetListeneriv(int param, long values) { - long __functionAddress = AL.getICD().alGetListeneriv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(param, values, __functionAddress); - } - - /** - * Returns the integer values of the specified listener parameter. - * - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetListeneriv(@NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetListeneriv(param, memAddress(values)); - } - - // --- [ alSource3i ] --- - - /** - * Sets the 3 dimensional integer values of a source parameter. - * - * @param source the source to modify - * @param paramName the parameter to modify - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alSource3i(@NativeType("ALuint") int source, @NativeType("ALenum") int paramName, @NativeType("ALint") int value1, @NativeType("ALint") int value2, @NativeType("ALint") int value3) { - long __functionAddress = AL.getICD().alSource3i; - if (CHECKS) { - check(__functionAddress); - } - invokeV(source, paramName, value1, value2, value3, __functionAddress); - } - - // --- [ alListeneriv ] --- - - /** Unsafe version of: {@link #alListeneriv Listeneriv} */ - public static void nalListeneriv(int listener, long value) { - long __functionAddress = AL.getICD().alListeneriv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(listener, value, __functionAddress); - } - - /** - * Pointer version. - * - * @param listener the parameter to modify - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alListeneriv(@NativeType("ALenum") int listener, @NativeType("ALint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalListeneriv(listener, memAddress(value)); - } - - // --- [ alSourceiv ] --- - - /** Unsafe version of: {@link #alSourceiv Sourceiv} */ - public static void nalSourceiv(int source, int paramName, long value) { - long __functionAddress = AL.getICD().alSourceiv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(source, paramName, value, __functionAddress); - } - - /** - * Pointer version. - * - * @param source the source to modify - * @param paramName the parameter to modify - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alSourceiv(@NativeType("ALuint") int source, @NativeType("ALenum") int paramName, @NativeType("ALint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalSourceiv(source, paramName, memAddress(value)); - } - - // --- [ alBufferf ] --- - - /** - * Sets the float value of a buffer parameter. - * - * @param buffer the buffer to modify - * @param paramName the parameter to modify - * @param value the value - */ - @NativeType("ALvoid") - public static void alBufferf(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALfloat") float value) { - long __functionAddress = AL.getICD().alBufferf; - if (CHECKS) { - check(__functionAddress); - } - invokeV(buffer, paramName, value, __functionAddress); - } - - // --- [ alBuffer3f ] --- - - /** - * Sets the dimensional value of a buffer parameter. - * - * @param buffer the buffer to modify - * @param paramName the parameter to modify - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alBuffer3f(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALfloat") float value1, @NativeType("ALfloat") float value2, @NativeType("ALfloat") float value3) { - long __functionAddress = AL.getICD().alBuffer3f; - if (CHECKS) { - check(__functionAddress); - } - invokeV(buffer, paramName, value1, value2, value3, __functionAddress); - } - - // --- [ alBufferfv ] --- - - /** Unsafe version of: {@link #alBufferfv Bufferfv} */ - public static void nalBufferfv(int buffer, int paramName, long value) { - long __functionAddress = AL.getICD().alBufferfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, paramName, value, __functionAddress); - } - - /** - * the pointer version of {@link #alBufferf Bufferf} - * - * @param buffer the buffer to modify - * @param paramName the parameter to modify - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alBufferfv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALfloat const *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalBufferfv(buffer, paramName, memAddress(value)); - } - - // --- [ alBufferi ] --- - - /** - * Sets the integer value of a buffer parameter. - * - * @param buffer the buffer to modify - * @param paramName the parameter to modify - * @param value the value - */ - @NativeType("ALvoid") - public static void alBufferi(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALint") int value) { - long __functionAddress = AL.getICD().alBufferi; - if (CHECKS) { - check(__functionAddress); - } - invokeV(buffer, paramName, value, __functionAddress); - } - - // --- [ alBuffer3i ] --- - - /** - * Sets the integer 3 dimensional value of a buffer parameter. - * - * @param buffer the buffer to modify - * @param paramName the parameter to modify - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alBuffer3i(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALint") int value1, @NativeType("ALint") int value2, @NativeType("ALint") int value3) { - long __functionAddress = AL.getICD().alBuffer3i; - if (CHECKS) { - check(__functionAddress); - } - invokeV(buffer, paramName, value1, value2, value3, __functionAddress); - } - - // --- [ alBufferiv ] --- - - /** Unsafe version of: {@link #alBufferiv Bufferiv} */ - public static void nalBufferiv(int buffer, int paramName, long value) { - long __functionAddress = AL.getICD().alBufferiv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, paramName, value, __functionAddress); - } - - /** - * the pointer version of {@link #alBufferi Bufferi} - * - * @param buffer the buffer to modify - * @param paramName the parameter to modify - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alBufferiv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalBufferiv(buffer, paramName, memAddress(value)); - } - - // --- [ alGetBufferiv ] --- - - /** Unsafe version of: {@link #alGetBufferiv GetBufferiv} */ - public static void nalGetBufferiv(int buffer, int param, long values) { - long __functionAddress = AL.getICD().alGetBufferiv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, param, values, __functionAddress); - } - - /** - * Returns the integer values of the specified buffer parameter. - * - * @param buffer the buffer to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetBufferiv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetBufferiv(buffer, param, memAddress(values)); - } - - // --- [ alGetBufferfv ] --- - - /** Unsafe version of: {@link #alGetBufferfv GetBufferfv} */ - public static void nalGetBufferfv(int buffer, int param, long values) { - long __functionAddress = AL.getICD().alGetBufferfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, param, values, __functionAddress); - } - - /** - * Returns the float values of the specified buffer parameter. - * - * @param buffer the buffer to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetBufferfv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetBufferfv(buffer, param, memAddress(values)); - } - - // --- [ alSpeedOfSound ] --- - - /** - * Sets the speed of sound. - * - * @param value the speed of sound - */ - @NativeType("ALvoid") - public static void alSpeedOfSound(@NativeType("ALfloat") float value) { - long __functionAddress = AL.getICD().alSpeedOfSound; - if (CHECKS) { - check(__functionAddress); - } - invokeV(value, __functionAddress); - } - - /** Array version of: {@link #alGetListeneriv GetListeneriv} */ - @NativeType("ALvoid") - public static void alGetListeneriv(@NativeType("ALenum") int param, @NativeType("ALint *") int[] values) { - long __functionAddress = AL.getICD().alGetListeneriv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(param, values, __functionAddress); - } - - /** Array version of: {@link #alListeneriv Listeneriv} */ - @NativeType("ALvoid") - public static void alListeneriv(@NativeType("ALenum") int listener, @NativeType("ALint const *") int[] value) { - long __functionAddress = AL.getICD().alListeneriv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(listener, value, __functionAddress); - } - - /** Array version of: {@link #alSourceiv Sourceiv} */ - @NativeType("ALvoid") - public static void alSourceiv(@NativeType("ALuint") int source, @NativeType("ALenum") int paramName, @NativeType("ALint const *") int[] value) { - long __functionAddress = AL.getICD().alSourceiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(source, paramName, value, __functionAddress); - } - - /** Array version of: {@link #alBufferfv Bufferfv} */ - @NativeType("ALvoid") - public static void alBufferfv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALfloat const *") float[] value) { - long __functionAddress = AL.getICD().alBufferfv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(buffer, paramName, value, __functionAddress); - } - - /** Array version of: {@link #alBufferiv Bufferiv} */ - @NativeType("ALvoid") - public static void alBufferiv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int paramName, @NativeType("ALint const *") int[] value) { - long __functionAddress = AL.getICD().alBufferiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(buffer, paramName, value, __functionAddress); - } - - /** Array version of: {@link #alGetBufferiv GetBufferiv} */ - @NativeType("ALvoid") - public static void alGetBufferiv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param, @NativeType("ALint *") int[] values) { - long __functionAddress = AL.getICD().alGetBufferiv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(buffer, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetBufferfv GetBufferfv} */ - @NativeType("ALvoid") - public static void alGetBufferfv(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] values) { - long __functionAddress = AL.getICD().alGetBufferfv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(buffer, param, values, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALC.java b/LWJGL/src/main/java/org/lwjgl/openal/ALC.java deleted file mode 100644 index b9981864..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALC.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openal; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; -import java.util.*; -import java.util.function.*; - -import static org.lwjgl.openal.ALC10.*; -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * This class must be used before any OpenAL function is called. It has the following responsibilities: - *
      - *
    • Loads the OpenAL native library into the JVM process.
    • - *
    • Creates instances of {@link ALCCapabilities} classes. An {@code ALCCapabilities} instance contains flags for functionality that is available for an - * OpenAL device. Internally, it also contains function pointers that are only valid for that specific OpenAL device.
    • - *
    - * - *

    Library lifecycle

    - *

    The OpenAL library is loaded automatically when this class is initialized. Set the {@link Configuration#OPENAL_EXPLICIT_INIT} option to override this - * behavior. Manual loading/unloading can be achieved with the {@link #create} and {@link #destroy} functions. The name of the library loaded can be overridden - * with the {@link Configuration#OPENAL_LIBRARY_NAME} option.

    - * - *

    ALCCapabilities creation

    - *

    Instances of {@code ALCCapabilities} can be created with the {@link #createCapabilities} method. Calling this method is expensive, so - * {@code ALCCapabilities} instances should be cached in user code.

    - * - * @see AL - */ -public final class ALC { - - @Nullable - private static FunctionProviderLocal functionProvider; - - @Nullable - private static ALCCapabilities router; - - private static final ThreadLocal capabilitiesTLS = new ThreadLocal<>(); - - @Nullable - private static ICD icd; - - static { - if (!Configuration.OPENAL_EXPLICIT_INIT.get(false)) { - create(); - } - } - - private ALC() {} - - /** Loads the OpenAL native library, using the default library name. */ - public static void create() { - String libName; - switch (Platform.get()) { - case LINUX: - create("libopenal.so"); - return; - case MACOSX: - libName = "openal"; - break; - case WINDOWS: - libName = "OpenAL"; - break; - default: - throw new IllegalStateException(); - } - - create(Configuration.OPENAL_LIBRARY_NAME.get(Platform.mapLibraryNameBundled(libName))); - } - - private static class SharedLibraryAL extends SharedLibrary.Delegate implements FunctionProviderLocal { - - private final long alcGetProcAddress = getFunctionAddress("alcGetProcAddress"); - - protected SharedLibraryAL(SharedLibrary library) { - super(library); - if (alcGetProcAddress == NULL) { - throw new RuntimeException("A core ALC function is missing. Make sure that the OpenAL library has been loaded correctly."); - } - } - - @Override - public long getFunctionAddress(ByteBuffer functionName) { - long address = library.getFunctionAddress(functionName); - if (address == NULL && Checks.DEBUG_FUNCTIONS) { - apiLogMissing("ALC core", functionName); - } - return address; - } - - @Override - public long getFunctionAddress(long handle, ByteBuffer functionName) { - long address = library.getFunctionAddress(functionName); - if (address == NULL && handle != NULL) { - address = invokePPP(handle, memAddress(functionName), alcGetProcAddress); - } - if (address == NULL && Checks.DEBUG_FUNCTIONS) { - apiLogMissing("ALC", functionName); - } - return address; - } - - } - - /** - * Loads the OpenAL native library, using the specified library name. - * - * @param libName the native library name - */ - public static void create(String libName) { - SharedLibrary OPENAL = Library.loadNative(ALC.class, "org.lwjgl.openal", libName, true); - try { - create(new SharedLibraryAL(OPENAL)); - } catch (RuntimeException e) { - OPENAL.free(); - throw e; - } - } - - /** - * Initializes ALC with the specified {@link FunctionProviderLocal}. This method can be used to implement custom ALC library loading. - * - * @param functionProvider the provider of ALC function addresses - */ - public static void create(FunctionProviderLocal functionProvider) { - if (ALC.functionProvider != null) { - throw new IllegalStateException("ALC has already been created."); - } - - ALC.functionProvider = functionProvider; - - router = createCapabilities(NULL); - - AL.init(); - } - - /** Unloads the OpenAL native library. */ - public static void destroy() { - if (functionProvider == null) { - return; - } - - AL.destroy(); - - router = null; - - if (functionProvider instanceof NativeResource) { - ((NativeResource)functionProvider).free(); - } - functionProvider = null; - } - - static T check(@Nullable T t) { - if (t == null) { - throw new IllegalStateException("OpenAL library has not been loaded."); - } - return t; - } - - /** Returns the {@link FunctionProviderLocal} for the OpenAL native library. */ - public static FunctionProviderLocal getFunctionProvider() { - return check(ALC.functionProvider); - } - - /** - * Sets the specified {@link ALCCapabilities} for the current thread. - * - *

    Any ALC functions called in the current thread will use the specified {@code ALCCapabilities}.

    - * - * @param caps the {@link ALCCapabilities} to make current, or null - */ - public static void setCapabilities(@Nullable ALCCapabilities caps) { - capabilitiesTLS.set(caps); - if (icd == null) { - icd = new ICDStatic(); - } - icd.set(caps); - } - - /** - * Returns the {@link ALCCapabilities} for the current thread. - * - * @throws IllegalStateException if OpenAL has not been loaded. - */ - public static ALCCapabilities getCapabilities() { - ALCCapabilities caps = capabilitiesTLS.get(); - if (caps == null) { - caps = router; - } - - return checkCapabilities(caps); - } - - private static ALCCapabilities checkCapabilities(@Nullable ALCCapabilities caps) { - if (caps == null) { - throw new IllegalStateException("No ALCCapabilities instance set"); - } - return caps; - } - - /** - * Creates a new {@link ALCCapabilities} instance for the specified OpenAL device. - * - *

    This method calls {@link #setCapabilities} with the new instance before returning.

    - * - * @param device the {@code ALCdevice} for which to create the capabilities instance - * - * @return the {@code ALCCapabilities} instance - */ - public static ALCCapabilities createCapabilities(long device) { - return createCapabilities(device, null); - } - - /** - * Creates a new {@link ALCCapabilities} instance for the specified OpenAL device. - * - *

    This method calls {@link #setCapabilities} with the new instance before returning.

    - * - * @param device the {@code ALCdevice} for which to create the capabilities instance - * @param bufferFactory a function that allocates a {@link PointerBuffer} given a size. The buffer must be filled with zeroes. If {@code null}, LWJGL will - * allocate a GC-managed buffer internally. - * - * @return the {@code ALCCapabilities} instance - */ - public static ALCCapabilities createCapabilities(long device, @Nullable IntFunction bufferFactory) { - FunctionProviderLocal functionProvider = getFunctionProvider(); - - // We don't have an ALCCapabilities instance when this method is called - // so we have to use the native bindings directly. - long GetIntegerv = functionProvider.getFunctionAddress("alcGetIntegerv"); - long GetString = functionProvider.getFunctionAddress("alcGetString"); - long IsExtensionPresent = functionProvider.getFunctionAddress("alcIsExtensionPresent"); - - if (GetIntegerv == NULL || GetString == NULL || IsExtensionPresent == NULL) { - throw new IllegalStateException("Core ALC functions could not be found. Make sure that OpenAL has been loaded."); - } - - int majorVersion; - int minorVersion; - - try (MemoryStack stack = stackPush()) { - IntBuffer version = stack.mallocInt(1); - - invokePPV(device, ALC_MAJOR_VERSION, 1, memAddress(version), GetIntegerv); - majorVersion = version.get(0); - - invokePPV(device, ALC_MINOR_VERSION, 1, memAddress(version), GetIntegerv); - minorVersion = version.get(0); - } - - int[][] ALC_VERSIONS = { - {0, 1}, // ALC 1 - }; - - Set supportedExtensions = new HashSet<>(16); - - for (int major = 1; major <= ALC_VERSIONS.length; major++) { - int[] minors = ALC_VERSIONS[major - 1]; - for (int minor : minors) { - if (major < majorVersion || (major == majorVersion && minor <= minorVersion)) { - supportedExtensions.add("OpenALC" + major + minor); - } - } - } - - // Parse EXTENSIONS string - String extensionsString = memASCIISafe(invokePP(device, ALC_EXTENSIONS, GetString)); - if (extensionsString != null) { - StringTokenizer tokenizer = new StringTokenizer(extensionsString); - while (tokenizer.hasMoreTokens()) { - String extName = tokenizer.nextToken(); - try (MemoryStack stack = stackPush()) { - if (invokePPZ(device, memAddress(stack.ASCII(extName, true)), IsExtensionPresent)) { - supportedExtensions.add(extName); - } - } - } - } - apiFilterExtensions(supportedExtensions, Configuration.OPENAL_EXTENSION_FILTER); - - ALCCapabilities caps = new ALCCapabilities(functionProvider, device, supportedExtensions, bufferFactory == null ? BufferUtils::createPointerBuffer : bufferFactory); - if (device != NULL) { - setCapabilities(caps); - } - - return caps; - } - - static ALCCapabilities getICD() { - ALCCapabilities caps = icd == null ? null : icd.get(); - if (caps == null) { - caps = router; - } - return check(caps); - } - - /** Function pointer provider. */ - private interface ICD { - default void set(@Nullable ALCCapabilities caps) {} - @Nullable ALCCapabilities get(); - } - - /** - * Write-once {@link ICD}. - * - *

    This is the default implementation that skips the thread/process lookup. When a new ALCCapabilities is set, we compare it to the write-once - * capabilities. If different function pointers are found, we fall back to the expensive lookup.

    - */ - private static class ICDStatic implements ICD { - - @Nullable - private static ALCCapabilities tempCaps; - - @SuppressWarnings("AssignmentToStaticFieldFromInstanceMethod") - @Override - public void set(@Nullable ALCCapabilities caps) { - if (tempCaps == null) { - tempCaps = caps; - } else if (caps != null && caps != tempCaps && ThreadLocalUtil.areCapabilitiesDifferent(tempCaps.addresses, caps.addresses)) { - apiLog("[WARNING] Incompatible context detected. Falling back to thread/process lookup for AL contexts."); - icd = ALC::getCapabilities; // fall back to thread/process lookup - } - } - - @Override - public ALCCapabilities get() { - return WriteOnce.caps; - } - - private static final class WriteOnce { - // This will be initialized the first time get() above is called - static final ALCCapabilities caps; - - static { - ALCCapabilities tempCaps = ICDStatic.tempCaps; - if (tempCaps == null) { - throw new IllegalStateException("No ALCCapabilities instance has been set"); - } - caps = tempCaps; - } - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALC10.java b/LWJGL/src/main/java/org/lwjgl/openal/ALC10.java deleted file mode 100644 index 7853f51a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALC10.java +++ /dev/null @@ -1,531 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to ALC 1.0 functionality. */ -public class ALC10 { - - /** General tokens. */ - public static final int - ALC_INVALID = 0xFFFFFFFF, - ALC_FALSE = 0x0, - ALC_TRUE = 0x1; - - /** Context creation attributes. */ - public static final int - ALC_FREQUENCY = 0x1007, - ALC_REFRESH = 0x1008, - ALC_SYNC = 0x1009; - - /** Error conditions. */ - public static final int - ALC_NO_ERROR = 0x0, - ALC_INVALID_DEVICE = 0xA001, - ALC_INVALID_CONTEXT = 0xA002, - ALC_INVALID_ENUM = 0xA003, - ALC_INVALID_VALUE = 0xA004, - ALC_OUT_OF_MEMORY = 0xA005; - - /** String queries. */ - public static final int - ALC_DEFAULT_DEVICE_SPECIFIER = 0x1004, - ALC_DEVICE_SPECIFIER = 0x1005, - ALC_EXTENSIONS = 0x1006; - - /** Integer queries. */ - public static final int - ALC_MAJOR_VERSION = 0x1000, - ALC_MINOR_VERSION = 0x1001, - ALC_ATTRIBUTES_SIZE = 0x1002, - ALC_ALL_ATTRIBUTES = 0x1003; - - protected ALC10() { - throw new UnsupportedOperationException(); - } - - static ALCcontext alcContext; - - public static ALCcontext alcCreateContext(ALCdevice device, java.nio.IntBuffer attrList) { - long alContextHandle = alcCreateContext(device.device, attrList); - alcContext = new ALCcontext(alContextHandle); - return alcContext; - } - - public static ALCdevice alcGetContextsDevice(ALCcontext context) { - return AL.alcDevice; - } - - public static void alcGetInteger(ALCdevice device, int pname, java.nio.IntBuffer integerdata) { - int res = alcGetInteger(device.device, pname); - integerdata.put(0, res); - } - - public static String alcGetString(ALCdevice device, int pname) { - return alcGetString(device.device, pname); - } - - // --- [ alcOpenDevice ] --- - - /** Unsafe version of: {@link #alcOpenDevice OpenDevice} */ - public static long nalcOpenDevice(long deviceSpecifier) { - long __functionAddress = ALC.getICD().alcOpenDevice; - return invokePP(deviceSpecifier, __functionAddress); - } - - /** - * Allows the application to connect to a device. - * - *

    If the function returns {@code NULL}, then no sound driver/device has been found. The argument is a null terminated string that requests a certain device or - * device configuration. If {@code NULL} is specified, the implementation will provide an implementation specific default.

    - * - * @param deviceSpecifier the requested device or device configuration - */ - @NativeType("ALCdevice *") - public static long alcOpenDevice(@Nullable @NativeType("ALCchar const *") ByteBuffer deviceSpecifier) { - if (CHECKS) { - checkNT1Safe(deviceSpecifier); - } - return nalcOpenDevice(memAddressSafe(deviceSpecifier)); - } - - /** - * Allows the application to connect to a device. - * - *

    If the function returns {@code NULL}, then no sound driver/device has been found. The argument is a null terminated string that requests a certain device or - * device configuration. If {@code NULL} is specified, the implementation will provide an implementation specific default.

    - * - * @param deviceSpecifier the requested device or device configuration - */ - @NativeType("ALCdevice *") - public static long alcOpenDevice(@Nullable @NativeType("ALCchar const *") CharSequence deviceSpecifier) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(deviceSpecifier, true); - long deviceSpecifierEncoded = deviceSpecifier == null ? NULL : stack.getPointerAddress(); - return nalcOpenDevice(deviceSpecifierEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alcCloseDevice ] --- - - /** - * Allows the application to disconnect from a device. - * - *

    The return code will be ALC_TRUE or ALC_FALSE, indicating success or failure. Failure will occur if all the device's contexts and buffers have not been - * destroyed. Once closed, the {@code deviceHandle} is invalid.

    - * - * @param deviceHandle the device to close - */ - @NativeType("ALCboolean") - public static boolean alcCloseDevice(@NativeType("ALCdevice const *") long deviceHandle) { - long __functionAddress = ALC.getICD().alcCloseDevice; - if (CHECKS) { - check(deviceHandle); - } - return invokePZ(deviceHandle, __functionAddress); - } - - // --- [ alcCreateContext ] --- - - /** Unsafe version of: {@link #alcCreateContext CreateContext} */ - public static long nalcCreateContext(long deviceHandle, long attrList) { - long __functionAddress = ALC.getICD().alcCreateContext; - if (CHECKS) { - check(deviceHandle); - } - return invokePPP(deviceHandle, attrList, __functionAddress); - } - - /** - * Creates an AL context. - * - * @param deviceHandle a valid device - * @param attrList null or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values. One of:
    {@link #ALC_FREQUENCY FREQUENCY}{@link #ALC_REFRESH REFRESH}{@link #ALC_SYNC SYNC}{@link ALC11#ALC_MONO_SOURCES MONO_SOURCES}{@link ALC11#ALC_STEREO_SOURCES STEREO_SOURCES}
    - */ - @NativeType("ALCcontext *") - public static long alcCreateContext(@NativeType("ALCdevice const *") long deviceHandle, @Nullable @NativeType("ALCint const *") IntBuffer attrList) { - if (CHECKS) { - checkNTSafe(attrList); - } - return nalcCreateContext(deviceHandle, memAddressSafe(attrList)); - } - - // --- [ alcMakeContextCurrent ] --- - - /** - * Makes a context current with respect to OpenAL operation. - * - *

    The context parameter can be {@code NULL} or a valid context pointer. Using {@code NULL} results in no context being current, which is useful when shutting OpenAL down. - * The operation will apply to the device that the context was created for.

    - * - *

    For each OS process (usually this means for each application), only one context can be current at any given time. All AL commands apply to the current - * context. Commands that affect objects shared among contexts (e.g. buffers) have side effects on other contexts.

    - * - * @param context the context to make current - */ - @NativeType("ALCboolean") - public static boolean alcMakeContextCurrent(@NativeType("ALCcontext *") long context) { - long __functionAddress = ALC.getICD().alcMakeContextCurrent; - return invokePZ(context, __functionAddress); - } - - // --- [ alcProcessContext ] --- - - /** - * The current context is the only context accessible to state changes by AL commands (aside from state changes affecting shared objects). However, - * multiple contexts can be processed at the same time. To indicate that a context should be processed (i.e. that internal execution state such as the - * offset increments are to be performed), the application uses {@code alcProcessContext}. - * - *

    Repeated calls to alcProcessContext are legal, and do not affect a context that is already marked as processing. The default state of a context created - * by alcCreateContext is that it is processing.

    - * - * @param context the context to mark for processing - */ - @NativeType("ALCvoid") - public static void alcProcessContext(@NativeType("ALCcontext *") long context) { - long __functionAddress = ALC.getICD().alcProcessContext; - if (CHECKS) { - check(context); - } - invokePV(context, __functionAddress); - } - - // --- [ alcSuspendContext ] --- - - /** - * The application can suspend any context from processing (including the current one). To indicate that a context should be suspended from processing - * (i.e. that internal execution state such as offset increments are not to be changed), the application uses {@code alcSuspendContext}. - * - *

    Repeated calls to alcSuspendContext are legal, and do not affect a context that is already marked as suspended.

    - * - * @param context the context to mark as suspended - */ - @NativeType("ALCvoid") - public static void alcSuspendContext(@NativeType("ALCcontext *") long context) { - long __functionAddress = ALC.getICD().alcSuspendContext; - if (CHECKS) { - check(context); - } - invokePV(context, __functionAddress); - } - - // --- [ alcDestroyContext ] --- - - /** - * Destroys a context. - * - *

    The correct way to destroy a context is to first release it using alcMakeCurrent with a {@code NULL} context. Applications should not attempt to destroy a - * current context – doing so will not work and will result in an ALC_INVALID_OPERATION error. All sources within a context will automatically be deleted - * during context destruction.

    - * - * @param context the context to destroy - */ - @NativeType("ALCvoid") - public static void alcDestroyContext(@NativeType("ALCcontext *") long context) { - long __functionAddress = ALC.getICD().alcDestroyContext; - if (CHECKS) { - check(context); - } - invokePV(context, __functionAddress); - } - - // --- [ alcGetCurrentContext ] --- - - /** Queries for, and obtains a handle to, the current context for the application. If there is no current context, {@code NULL} is returned. */ - @NativeType("ALCcontext *") - public static long alcGetCurrentContext() { - long __functionAddress = ALC.getICD().alcGetCurrentContext; - return invokeP(__functionAddress); - } - - // --- [ alcGetContextsDevice ] --- - - /** - * Queries for, and obtains a handle to, the device of a given context. - * - * @param context the context to query - */ - @NativeType("ALCdevice *") - public static long alcGetContextsDevice(@NativeType("ALCcontext *") long context) { - long __functionAddress = ALC.getICD().alcGetContextsDevice; - if (CHECKS) { - check(context); - } - return invokePP(context, __functionAddress); - } - - // --- [ alcIsExtensionPresent ] --- - - /** Unsafe version of: {@link #alcIsExtensionPresent IsExtensionPresent} */ - public static boolean nalcIsExtensionPresent(long deviceHandle, long extName) { - long __functionAddress = ALC.getICD().alcIsExtensionPresent; - return invokePPZ(deviceHandle, extName, __functionAddress); - } - - /** - * Verify that a given extension is available for the current context and the device it - * is associated with. - * A null name argument returns ALC_FALSE, as do invalid and unsupported string - * tokens. - * - * @param extName name of extension to find - * @return true if extension is available, false if not - */ - public static boolean alcIsExtensionPresent(ALCdevice device, String extName) { - return alcIsExtensionPresent(device.device, extName); - } - - /** - * Verifies that a given extension is available for the current context and the device it is associated with. - * - *

    Invalid and unsupported string tokens return ALC_FALSE. A {@code NULL} deviceHandle is acceptable. {@code extName} is not case sensitive – the implementation - * will convert the name to all upper-case internally (and will express extension names in upper-case).

    - * - * @param deviceHandle the device to query - * @param extName the extension name - */ - @NativeType("ALCboolean") - public static boolean alcIsExtensionPresent(@NativeType("ALCdevice const *") long deviceHandle, @NativeType("ALCchar const *") ByteBuffer extName) { - if (CHECKS) { - checkNT1(extName); - } - return nalcIsExtensionPresent(deviceHandle, memAddress(extName)); - } - - /** - * Verifies that a given extension is available for the current context and the device it is associated with. - * - *

    Invalid and unsupported string tokens return ALC_FALSE. A {@code NULL} deviceHandle is acceptable. {@code extName} is not case sensitive – the implementation - * will convert the name to all upper-case internally (and will express extension names in upper-case).

    - * - * @param deviceHandle the device to query - * @param extName the extension name - */ - @NativeType("ALCboolean") - public static boolean alcIsExtensionPresent(@NativeType("ALCdevice const *") long deviceHandle, @NativeType("ALCchar const *") CharSequence extName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(extName, true); - long extNameEncoded = stack.getPointerAddress(); - return nalcIsExtensionPresent(deviceHandle, extNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alcGetProcAddress ] --- - - /** Unsafe version of: {@link #alcGetProcAddress GetProcAddress} */ - public static long nalcGetProcAddress(long deviceHandle, long funcName) { - long __functionAddress = ALC.getICD().alcGetProcAddress; - return invokePPP(deviceHandle, funcName, __functionAddress); - } - - /** - * Retrieves extension entry points. - * - *

    The application is expected to verify the applicability of an extension or core function entry point before requesting it by name, by use of - * {@link #alcIsExtensionPresent IsExtensionPresent}.

    - * - *

    Entry points can be device specific, but are not context specific. Using a {@code NULL} device handle does not guarantee that the entry point is returned, - * even if available for one of the available devices.

    - * - * @param deviceHandle the device to query - * @param funcName the function name - */ - @NativeType("void *") - public static long alcGetProcAddress(@NativeType("ALCdevice const *") long deviceHandle, @NativeType("ALchar const *") ByteBuffer funcName) { - if (CHECKS) { - checkNT1(funcName); - } - return nalcGetProcAddress(deviceHandle, memAddress(funcName)); - } - - /** - * Retrieves extension entry points. - * - *

    The application is expected to verify the applicability of an extension or core function entry point before requesting it by name, by use of - * {@link #alcIsExtensionPresent IsExtensionPresent}.

    - * - *

    Entry points can be device specific, but are not context specific. Using a {@code NULL} device handle does not guarantee that the entry point is returned, - * even if available for one of the available devices.

    - * - * @param deviceHandle the device to query - * @param funcName the function name - */ - @NativeType("void *") - public static long alcGetProcAddress(@NativeType("ALCdevice const *") long deviceHandle, @NativeType("ALchar const *") CharSequence funcName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(funcName, true); - long funcNameEncoded = stack.getPointerAddress(); - return nalcGetProcAddress(deviceHandle, funcNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alcGetEnumValue ] --- - - /** Unsafe version of: {@link #alcGetEnumValue GetEnumValue} */ - public static int nalcGetEnumValue(long deviceHandle, long enumName) { - long __functionAddress = ALC.getICD().alcGetEnumValue; - return invokePPI(deviceHandle, enumName, __functionAddress); - } - - /** - * Returns extension enum values. - * - *

    Enumeration/token values are device independent, but tokens defined for extensions might not be present for a given device. Using a {@code NULL} handle is - * legal, but only the tokens defined by the AL core are guaranteed. Availability of extension tokens depends on the ALC extension.

    - * - * @param deviceHandle the device to query - * @param enumName the enum name - */ - @NativeType("ALCenum") - public static int alcGetEnumValue(@NativeType("ALCdevice const *") long deviceHandle, @NativeType("ALCchar const *") ByteBuffer enumName) { - if (CHECKS) { - checkNT1(enumName); - } - return nalcGetEnumValue(deviceHandle, memAddress(enumName)); - } - - /** - * Returns extension enum values. - * - *

    Enumeration/token values are device independent, but tokens defined for extensions might not be present for a given device. Using a {@code NULL} handle is - * legal, but only the tokens defined by the AL core are guaranteed. Availability of extension tokens depends on the ALC extension.

    - * - * @param deviceHandle the device to query - * @param enumName the enum name - */ - @NativeType("ALCenum") - public static int alcGetEnumValue(@NativeType("ALCdevice const *") long deviceHandle, @NativeType("ALCchar const *") CharSequence enumName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(enumName, true); - long enumNameEncoded = stack.getPointerAddress(); - return nalcGetEnumValue(deviceHandle, enumNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alcGetError ] --- - - /** - * Queries ALC errors. - * - *

    ALC uses the same conventions and mechanisms as AL for error handling. In particular, ALC does not use conventions derived from X11 (GLX) or Windows - * (WGL).

    - * - *

    Error conditions are specific to the device, and (like AL) a call to alcGetError resets the error state.

    - * - * @param deviceHandle the device to query - */ - @NativeType("ALCenum") - public static int alcGetError(@NativeType("ALCdevice *") long deviceHandle) { - long __functionAddress = ALC.getICD().alcGetError; - return invokePI(deviceHandle, __functionAddress); - } - - // --- [ alcGetString ] --- - - /** Unsafe version of: {@link #alcGetString GetString} */ - public static long nalcGetString(long deviceHandle, int token) { - long __functionAddress = ALC.getICD().alcGetString; - return invokePP(deviceHandle, token, __functionAddress); - } - - /** - * Obtains string value(s) from ALC. - * - *

    LWJGL note: Use {@link ALUtil#getStringList} for those tokens that return multiple values.

    - * - * @param deviceHandle the device to query - * @param token the information to query. One of:
    {@link #ALC_DEFAULT_DEVICE_SPECIFIER DEFAULT_DEVICE_SPECIFIER}{@link #ALC_DEVICE_SPECIFIER DEVICE_SPECIFIER}{@link #ALC_EXTENSIONS EXTENSIONS}
    {@link ALC11#ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER CAPTURE_DEFAULT_DEVICE_SPECIFIER}{@link ALC11#ALC_CAPTURE_DEVICE_SPECIFIER CAPTURE_DEVICE_SPECIFIER}
    - */ - @Nullable - @NativeType("ALCchar const *") - public static String alcGetString(@NativeType("ALCdevice *") long deviceHandle, @NativeType("ALCenum") int token) { - long __result = nalcGetString(deviceHandle, token); - return memUTF8Safe(__result); - } - - // --- [ alcGetIntegerv ] --- - - /** - * Unsafe version of: {@link #alcGetIntegerv GetIntegerv} - * - * @param size the size of the {@code dest} buffer - */ - public static void nalcGetIntegerv(long deviceHandle, int token, int size, long dest) { - long __functionAddress = ALC.getICD().alcGetIntegerv; - invokePPV(deviceHandle, token, size, dest, __functionAddress); - } - - /** - * Obtains integer value(s) from ALC. - * - * @param deviceHandle the device to query - * @param token the information to query. One of:
    {@link #ALC_MAJOR_VERSION MAJOR_VERSION}{@link #ALC_MINOR_VERSION MINOR_VERSION}{@link #ALC_ATTRIBUTES_SIZE ATTRIBUTES_SIZE}{@link #ALC_ALL_ATTRIBUTES ALL_ATTRIBUTES}{@link ALC11#ALC_CAPTURE_SAMPLES CAPTURE_SAMPLES}
    - * @param dest the destination buffer - */ - @NativeType("ALCvoid") - public static void alcGetIntegerv(@NativeType("ALCdevice *") long deviceHandle, @NativeType("ALCenum") int token, @NativeType("ALCint *") IntBuffer dest) { - nalcGetIntegerv(deviceHandle, token, dest.remaining(), memAddress(dest)); - } - - /** - * Obtains integer value(s) from ALC. - * - * @param deviceHandle the device to query - * @param token the information to query. One of:
    {@link #ALC_MAJOR_VERSION MAJOR_VERSION}{@link #ALC_MINOR_VERSION MINOR_VERSION}{@link #ALC_ATTRIBUTES_SIZE ATTRIBUTES_SIZE}{@link #ALC_ALL_ATTRIBUTES ALL_ATTRIBUTES}{@link ALC11#ALC_CAPTURE_SAMPLES CAPTURE_SAMPLES}
    - */ - @NativeType("ALCvoid") - public static int alcGetInteger(@NativeType("ALCdevice *") long deviceHandle, @NativeType("ALCenum") int token) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer dest = stack.callocInt(1); - nalcGetIntegerv(deviceHandle, token, 1, memAddress(dest)); - return dest.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #alcCreateContext CreateContext} */ - @NativeType("ALCcontext *") - public static long alcCreateContext(@NativeType("ALCdevice const *") long deviceHandle, @Nullable @NativeType("ALCint const *") int[] attrList) { - long __functionAddress = ALC.getICD().alcCreateContext; - if (CHECKS) { - check(deviceHandle); - checkNTSafe(attrList); - } - return invokePPP(deviceHandle, attrList, __functionAddress); - } - - /** Array version of: {@link #alcGetIntegerv GetIntegerv} */ - @NativeType("ALCvoid") - public static void alcGetIntegerv(@NativeType("ALCdevice *") long deviceHandle, @NativeType("ALCenum") int token, @NativeType("ALCint *") int[] dest) { - long __functionAddress = ALC.getICD().alcGetIntegerv; - invokePPV(deviceHandle, token, dest.length, dest, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALC11.java b/LWJGL/src/main/java/org/lwjgl/openal/ALC11.java deleted file mode 100644 index e0b1fcfe..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALC11.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to ALC 1.1 functionality. */ -public class ALC11 extends ALC10 { - - /** Context creation attributes. */ - public static final int - ALC_MONO_SOURCES = 0x1010, - ALC_STEREO_SOURCES = 0x1011; - - /** String queries. */ - public static final int - ALC_DEFAULT_ALL_DEVICES_SPECIFIER = 0x1012, - ALC_ALL_DEVICES_SPECIFIER = 0x1013, - ALC_CAPTURE_DEVICE_SPECIFIER = 0x310, - ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311; - - /** Integer queries. */ - public static final int ALC_CAPTURE_SAMPLES = 0x312; - - protected ALC11() { - throw new UnsupportedOperationException(); - } - - // --- [ alcCaptureOpenDevice ] --- - - /** Unsafe version of: {@link #alcCaptureOpenDevice CaptureOpenDevice} */ - public static long nalcCaptureOpenDevice(long deviceName, int frequency, int format, int samples) { - long __functionAddress = ALC.getICD().alcCaptureOpenDevice; - if (CHECKS) { - check(__functionAddress); - } - return invokePP(deviceName, frequency, format, samples, __functionAddress); - } - - /** - * Allows the application to connect to a capture device. - * - *

    The {@code deviceName} argument is a null terminated string that requests a certain device or device configuration. If {@code NULL} is specified, the implementation - * will provide an implementation specific default.

    - * - * @param deviceName the device or device configuration - * @param frequency the audio frequency - * @param format the audio format - * @param samples the number of sample frames to buffer in the AL - */ - @NativeType("ALCdevice *") - public static long alcCaptureOpenDevice(@Nullable @NativeType("ALCchar const *") ByteBuffer deviceName, @NativeType("ALCuint") int frequency, @NativeType("ALCenum") int format, @NativeType("ALCsizei") int samples) { - if (CHECKS) { - checkNT1Safe(deviceName); - } - return nalcCaptureOpenDevice(memAddressSafe(deviceName), frequency, format, samples); - } - - /** - * Allows the application to connect to a capture device. - * - *

    The {@code deviceName} argument is a null terminated string that requests a certain device or device configuration. If {@code NULL} is specified, the implementation - * will provide an implementation specific default.

    - * - * @param deviceName the device or device configuration - * @param frequency the audio frequency - * @param format the audio format - * @param samples the number of sample frames to buffer in the AL - */ - @NativeType("ALCdevice *") - public static long alcCaptureOpenDevice(@Nullable @NativeType("ALCchar const *") CharSequence deviceName, @NativeType("ALCuint") int frequency, @NativeType("ALCenum") int format, @NativeType("ALCsizei") int samples) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(deviceName, true); - long deviceNameEncoded = deviceName == null ? NULL : stack.getPointerAddress(); - return nalcCaptureOpenDevice(deviceNameEncoded, frequency, format, samples); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alcCaptureCloseDevice ] --- - - /** - * Allows the application to disconnect from a capture device. - * - * @param device the capture device to close - */ - @NativeType("ALCboolean") - public static boolean alcCaptureCloseDevice(@NativeType("ALCdevice *") long device) { - long __functionAddress = ALC.getICD().alcCaptureCloseDevice; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return invokePZ(device, __functionAddress); - } - - // --- [ alcCaptureStart ] --- - - /** - * Starts recording audio on the specific capture device. - * - *

    Once started, the device will record audio to an internal ring buffer, the size of which was specified when opening the device. The application may - * query the capture device to discover how much data is currently available via the alcGetInteger with the ALC_CAPTURE_SAMPLES token. This will report the - * number of sample frames currently available.

    - * - * @param device the capture device - */ - @NativeType("ALCvoid") - public static void alcCaptureStart(@NativeType("ALCdevice *") long device) { - long __functionAddress = ALC.getICD().alcCaptureStart; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePV(device, __functionAddress); - } - - // --- [ alcCaptureStop ] --- - - /** - * Halts audio capturing without closing the capture device. - * - *

    The implementation is encouraged to optimize for this case. The amount of audio samples available after restarting a stopped capture device is reset to - * zero. The application does not need to stop the capture device to read from it.

    - * - * @param device the capture device - */ - @NativeType("ALCvoid") - public static void alcCaptureStop(@NativeType("ALCdevice *") long device) { - long __functionAddress = ALC.getICD().alcCaptureStop; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePV(device, __functionAddress); - } - - // --- [ alcCaptureSamples ] --- - - /** Unsafe version of: {@link #alcCaptureSamples CaptureSamples} */ - public static void nalcCaptureSamples(long device, long buffer, int samples) { - long __functionAddress = ALC.getICD().alcCaptureSamples; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") ByteBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcCaptureSamples(device, memAddress(buffer), samples); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") ShortBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcCaptureSamples(device, memAddress(buffer), samples); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") IntBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcCaptureSamples(device, memAddress(buffer), samples); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") FloatBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcCaptureSamples(device, memAddress(buffer), samples); - } - - /** Array version of: {@link #alcCaptureSamples CaptureSamples} */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") short[] buffer, @NativeType("ALCsizei") int samples) { - long __functionAddress = ALC.getICD().alcCaptureSamples; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - - /** Array version of: {@link #alcCaptureSamples CaptureSamples} */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") int[] buffer, @NativeType("ALCsizei") int samples) { - long __functionAddress = ALC.getICD().alcCaptureSamples; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - - /** Array version of: {@link #alcCaptureSamples CaptureSamples} */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") float[] buffer, @NativeType("ALCsizei") int samples) { - long __functionAddress = ALC.getICD().alcCaptureSamples; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALCCapabilities.java b/LWJGL/src/main/java/org/lwjgl/openal/ALCCapabilities.java deleted file mode 100644 index 37cc53f5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALCCapabilities.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.system.*; -import java.util.Set; -import org.lwjgl.*; -import java.util.function.IntFunction; - -import static org.lwjgl.system.Checks.*; - -/** Defines the capabilities of the OpenAL Context API. */ -public final class ALCCapabilities { - - // ALC10 - public final long - alcOpenDevice, - alcCloseDevice, - alcCreateContext, - alcMakeContextCurrent, - alcProcessContext, - alcSuspendContext, - alcDestroyContext, - alcGetCurrentContext, - alcGetContextsDevice, - alcIsExtensionPresent, - alcGetProcAddress, - alcGetEnumValue, - alcGetError, - alcGetString, - alcGetIntegerv; - - // ALC11 - public final long - alcCaptureOpenDevice, - alcCaptureCloseDevice, - alcCaptureStart, - alcCaptureStop, - alcCaptureSamples; - - // EXT_thread_local_context - public final long - alcSetThreadContext, - alcGetThreadContext; - - // SOFT_device_clock - public final long - alcGetInteger64vSOFT; - - // SOFT_HRTF - public final long - alcGetStringiSOFT, - alcResetDeviceSOFT; - - // SOFT_loopback - public final long - alcLoopbackOpenDeviceSOFT, - alcIsRenderFormatSupportedSOFT, - alcRenderSamplesSOFT; - - // SOFT_pause_device - public final long - alcDevicePauseSOFT, - alcDeviceResumeSOFT; - - // SOFT_reopen_device - public final long - alcReopenDeviceSOFT; - - /** When true, {@link ALC10} is supported. */ - public final boolean OpenALC10; - /** When true, {@link ALC11} is supported. */ - public final boolean OpenALC11; - /** When true, {@link SOFTLoopbackBformat} is supported. */ - public final boolean OpenALC_SOFT_loopback_bformat; - /** When true, {@link EnumerateAllExt} is supported. */ - public final boolean ALC_ENUMERATE_ALL_EXT; - /** - * An OpenAL 1.1 implementation will always support the {@code ALC_ENUMERATION_EXT} extension. This extension provides for enumeration of the available OpenAL devices - * through {@link ALC10#alcGetString GetString}. An {@link ALC10#alcGetString GetString} query of {@link ALC10#ALC_DEVICE_SPECIFIER DEVICE_SPECIFIER} with a {@code NULL} device passed in will return a list of devices. Each - * device name will be separated by a single {@code NULL} character and the list will be terminated with two {@code NULL} characters. - */ - public final boolean ALC_ENUMERATION_EXT; - /** When true, {@link EXTCapture} is supported. */ - public final boolean ALC_EXT_CAPTURE; - /** When true, {@link EXTDedicated} is supported. */ - public final boolean ALC_EXT_DEDICATED; - /** When true, {@link EXTDefaultFilterOrder} is supported. */ - public final boolean ALC_EXT_DEFAULT_FILTER_ORDER; - /** When true, {@link EXTDisconnect} is supported. */ - public final boolean ALC_EXT_disconnect; - /** When true, {@link EXTEfx} is supported. */ - public final boolean ALC_EXT_EFX; - /** When true, {@link EXTThreadLocalContext} is supported. */ - public final boolean ALC_EXT_thread_local_context; - /** When true, {@link LOKIAudioChannel} is supported. */ - public final boolean ALC_LOKI_audio_channel; - /** When true, {@link SOFTDeviceClock} is supported. */ - public final boolean ALC_SOFT_device_clock; - /** When true, {@link SOFTHRTF} is supported. */ - public final boolean ALC_SOFT_HRTF; - /** When true, {@link SOFTLoopback} is supported. */ - public final boolean ALC_SOFT_loopback; - /** When true, {@link SOFTOutputLimiter} is supported. */ - public final boolean ALC_SOFT_output_limiter; - /** When true, {@link SOFTOutputMode} is supported. */ - public final boolean ALC_SOFT_output_mode; - /** When true, {@link SOFTPauseDevice} is supported. */ - public final boolean ALC_SOFT_pause_device; - /** When true, {@link SOFTReopenDevice} is supported. */ - public final boolean ALC_SOFT_reopen_device; - - /** Device handle. */ - final long device; - - /** Off-heap array of the above function addresses. */ - final PointerBuffer addresses; - - ALCCapabilities(FunctionProviderLocal provider, long device, Set ext, IntFunction bufferFactory) { - this.device = device; - - PointerBuffer caps = bufferFactory.apply(31); - - OpenALC10 = check_ALC10(provider, device, caps, ext); - OpenALC11 = check_ALC11(provider, device, caps, ext); - OpenALC_SOFT_loopback_bformat = ext.contains("OpenALC_SOFT_loopback_bformat"); - ALC_ENUMERATE_ALL_EXT = ext.contains("ALC_ENUMERATE_ALL_EXT"); - ALC_ENUMERATION_EXT = ext.contains("ALC_ENUMERATION_EXT"); - ALC_EXT_CAPTURE = check_EXT_CAPTURE(provider, device, caps, ext); - ALC_EXT_DEDICATED = ext.contains("ALC_EXT_DEDICATED"); - ALC_EXT_DEFAULT_FILTER_ORDER = ext.contains("ALC_EXT_DEFAULT_FILTER_ORDER"); - ALC_EXT_disconnect = ext.contains("ALC_EXT_disconnect"); - ALC_EXT_EFX = ext.contains("ALC_EXT_EFX"); - ALC_EXT_thread_local_context = check_EXT_thread_local_context(provider, device, caps, ext); - ALC_LOKI_audio_channel = ext.contains("ALC_LOKI_audio_channel"); - ALC_SOFT_device_clock = check_SOFT_device_clock(provider, device, caps, ext); - ALC_SOFT_HRTF = check_SOFT_HRTF(provider, device, caps, ext); - ALC_SOFT_loopback = check_SOFT_loopback(provider, device, caps, ext); - ALC_SOFT_output_limiter = ext.contains("ALC_SOFT_output_limiter"); - ALC_SOFT_output_mode = ext.contains("ALC_SOFT_output_mode"); - ALC_SOFT_pause_device = check_SOFT_pause_device(provider, device, caps, ext); - ALC_SOFT_reopen_device = check_SOFT_reopen_device(provider, device, caps, ext); - - alcOpenDevice = caps.get(0); - alcCloseDevice = caps.get(1); - alcCreateContext = caps.get(2); - alcMakeContextCurrent = caps.get(3); - alcProcessContext = caps.get(4); - alcSuspendContext = caps.get(5); - alcDestroyContext = caps.get(6); - alcGetCurrentContext = caps.get(7); - alcGetContextsDevice = caps.get(8); - alcIsExtensionPresent = caps.get(9); - alcGetProcAddress = caps.get(10); - alcGetEnumValue = caps.get(11); - alcGetError = caps.get(12); - alcGetString = caps.get(13); - alcGetIntegerv = caps.get(14); - alcCaptureOpenDevice = caps.get(15); - alcCaptureCloseDevice = caps.get(16); - alcCaptureStart = caps.get(17); - alcCaptureStop = caps.get(18); - alcCaptureSamples = caps.get(19); - alcSetThreadContext = caps.get(20); - alcGetThreadContext = caps.get(21); - alcGetInteger64vSOFT = caps.get(22); - alcGetStringiSOFT = caps.get(23); - alcResetDeviceSOFT = caps.get(24); - alcLoopbackOpenDeviceSOFT = caps.get(25); - alcIsRenderFormatSupportedSOFT = caps.get(26); - alcRenderSamplesSOFT = caps.get(27); - alcDevicePauseSOFT = caps.get(28); - alcDeviceResumeSOFT = caps.get(29); - alcReopenDeviceSOFT = caps.get(30); - - addresses = ThreadLocalUtil.setupAddressBuffer(caps); - } - - /** Returns the buffer of OpenAL function pointers. */ - public PointerBuffer getAddressBuffer() { - return addresses; - } - - private static boolean check_ALC10(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenALC10")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 - }, - "alcOpenDevice", "alcCloseDevice", "alcCreateContext", "alcMakeContextCurrent", "alcProcessContext", "alcSuspendContext", "alcDestroyContext", - "alcGetCurrentContext", "alcGetContextsDevice", "alcIsExtensionPresent", "alcGetProcAddress", "alcGetEnumValue", "alcGetError", "alcGetString", - "alcGetIntegerv" - ) || reportMissing("ALC", "OpenALC10"); - } - - private static boolean check_ALC11(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenALC11")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 15, 16, 17, 18, 19 - }, - "alcCaptureOpenDevice", "alcCaptureCloseDevice", "alcCaptureStart", "alcCaptureStop", "alcCaptureSamples" - ) || reportMissing("ALC", "OpenALC11"); - } - - private static boolean check_EXT_CAPTURE(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_EXT_CAPTURE")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 15, 16, 17, 18, 19 - }, - "alcCaptureOpenDevice", "alcCaptureCloseDevice", "alcCaptureStart", "alcCaptureStop", "alcCaptureSamples" - ) || reportMissing("ALC", "ALC_EXT_CAPTURE"); - } - - private static boolean check_EXT_thread_local_context(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_EXT_thread_local_context")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 20, 21 - }, - "alcSetThreadContext", "alcGetThreadContext" - ) || reportMissing("ALC", "ALC_EXT_thread_local_context"); - } - - private static boolean check_SOFT_device_clock(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_SOFT_device_clock")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 22 - }, - "alcGetInteger64vSOFT" - ) || reportMissing("ALC", "ALC_SOFT_device_clock"); - } - - private static boolean check_SOFT_HRTF(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_SOFT_HRTF")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 23, 24 - }, - "alcGetStringiSOFT", "alcResetDeviceSOFT" - ) || reportMissing("ALC", "ALC_SOFT_HRTF"); - } - - private static boolean check_SOFT_loopback(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_SOFT_loopback")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 25, 26, 27 - }, - "alcLoopbackOpenDeviceSOFT", "alcIsRenderFormatSupportedSOFT", "alcRenderSamplesSOFT" - ) || reportMissing("ALC", "ALC_SOFT_loopback"); - } - - private static boolean check_SOFT_pause_device(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_SOFT_pause_device")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 28, 29 - }, - "alcDevicePauseSOFT", "alcDeviceResumeSOFT" - ) || reportMissing("ALC", "ALC_SOFT_pause_device"); - } - - private static boolean check_SOFT_reopen_device(FunctionProviderLocal provider, long device, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_SOFT_reopen_device")) { - return false; - } - - return checkFunctions(provider, device, caps, new int[] { - 30 - }, - "alcReopenDeviceSOFT" - ) || reportMissing("ALC", "ALC_SOFT_reopen_device"); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALCapabilities.java b/LWJGL/src/main/java/org/lwjgl/openal/ALCapabilities.java deleted file mode 100644 index c4440360..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALCapabilities.java +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.system.*; -import java.util.Set; -import org.lwjgl.*; -import java.util.function.IntFunction; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; - -/** Defines the capabilities of an OpenAL context. */ -public final class ALCapabilities { - - // AL10 - public final long - alGetError, - alEnable, - alDisable, - alIsEnabled, - alGetBoolean, - alGetInteger, - alGetFloat, - alGetDouble, - alGetBooleanv, - alGetIntegerv, - alGetFloatv, - alGetDoublev, - alGetString, - alDistanceModel, - alDopplerFactor, - alDopplerVelocity, - alListenerf, - alListeneri, - alListener3f, - alListenerfv, - alGetListenerf, - alGetListeneri, - alGetListener3f, - alGetListenerfv, - alGenSources, - alDeleteSources, - alIsSource, - alSourcef, - alSource3f, - alSourcefv, - alSourcei, - alGetSourcef, - alGetSource3f, - alGetSourcefv, - alGetSourcei, - alGetSourceiv, - alSourceQueueBuffers, - alSourceUnqueueBuffers, - alSourcePlay, - alSourcePause, - alSourceStop, - alSourceRewind, - alSourcePlayv, - alSourcePausev, - alSourceStopv, - alSourceRewindv, - alGenBuffers, - alDeleteBuffers, - alIsBuffer, - alGetBufferf, - alGetBufferi, - alBufferData, - alGetEnumValue, - alGetProcAddress, - alIsExtensionPresent; - - // AL11 - public final long - alListener3i, - alGetListeneriv, - alSource3i, - alListeneriv, - alSourceiv, - alBufferf, - alBuffer3f, - alBufferfv, - alBufferi, - alBuffer3i, - alBufferiv, - alGetBufferiv, - alGetBufferfv, - alSpeedOfSound; - - // EXT_EFX - public final long - alGenEffects, - alDeleteEffects, - alIsEffect, - alEffecti, - alEffectiv, - alEffectf, - alEffectfv, - alGetEffecti, - alGetEffectiv, - alGetEffectf, - alGetEffectfv, - alGenFilters, - alDeleteFilters, - alIsFilter, - alFilteri, - alFilteriv, - alFilterf, - alFilterfv, - alGetFilteri, - alGetFilteriv, - alGetFilterf, - alGetFilterfv, - alGenAuxiliaryEffectSlots, - alDeleteAuxiliaryEffectSlots, - alIsAuxiliaryEffectSlot, - alAuxiliaryEffectSloti, - alAuxiliaryEffectSlotiv, - alAuxiliaryEffectSlotf, - alAuxiliaryEffectSlotfv, - alGetAuxiliaryEffectSloti, - alGetAuxiliaryEffectSlotiv, - alGetAuxiliaryEffectSlotf, - alGetAuxiliaryEffectSlotfv; - - // EXT_STATIC_BUFFER - public final long - alBufferDataStatic; - - // SOFT_buffer_samples - public final long - alBufferSamplesSOFT, - alBufferSubSamplesSOFT, - alGetBufferSamplesSOFT, - alIsBufferFormatSupportedSOFT; - - // SOFT_buffer_sub_data - public final long - alBufferSubDataSOFT; - - // SOFT_callback_buffer - public final long - alBufferCallbackSOFT, - alGetBufferPtrSOFT, - alGetBuffer3PtrSOFT, - alGetBufferPtrvSOFT; - - // SOFT_deferred_updates - public final long - alDeferUpdatesSOFT, - alProcessUpdatesSOFT; - - // SOFT_events - public final long - alEventControlSOFT, - alEventCallbackSOFT, - alGetPointerSOFT, - alGetPointervSOFT; - - // SOFT_source_latency - public final long - alSourcedSOFT, - alSource3dSOFT, - alSourcedvSOFT, - alGetSourcedSOFT, - alGetSource3dSOFT, - alGetSourcedvSOFT, - alSourcei64SOFT, - alSource3i64SOFT, - alSourcei64vSOFT, - alGetSourcei64SOFT, - alGetSource3i64SOFT, - alGetSourcei64vSOFT; - - // SOFT_source_resampler - public final long - alGetStringiSOFT; - - // SOFT_source_start_delay - public final long - alSourcePlayAtTimeSOFT, - alSourcePlayAtTimevSOFT; - - /** When true, {@link AL10} is supported. */ - public final boolean OpenAL10; - /** When true, {@link AL11} is supported. */ - public final boolean OpenAL11; - /** When true, {@link EXTAlaw} is supported. */ - public final boolean AL_EXT_ALAW; - /** When true, {@link EXTBFormat} is supported. */ - public final boolean AL_EXT_BFORMAT; - /** When true, {@link EXTDouble} is supported. */ - public final boolean AL_EXT_DOUBLE; - /** When true, {@link EXTEfx} is supported. */ - public final boolean ALC_EXT_EFX; - /** When true, {@link EXTExponentDistance} is supported. */ - public final boolean AL_EXT_EXPONENT_DISTANCE; - /** When true, {@link EXTFloat32} is supported. */ - public final boolean AL_EXT_FLOAT32; - /** When true, {@link EXTIma4} is supported. */ - public final boolean AL_EXT_IMA4; - /** When true, {@link EXTLinearDistance} is supported. */ - public final boolean AL_EXT_LINEAR_DISTANCE; - /** When true, {@link EXTMCFormats} is supported. */ - public final boolean AL_EXT_MCFORMATS; - /** When true, {@link EXTMulaw} is supported. */ - public final boolean AL_EXT_MULAW; - /** When true, {@link EXTMulawBFormat} is supported. */ - public final boolean AL_EXT_MULAW_BFORMAT; - /** When true, {@link EXTMulawMCFormats} is supported. */ - public final boolean AL_EXT_MULAW_MCFORMATS; - /** When true, {@link EXTOffset} is supported. */ - public final boolean AL_EXT_OFFSET; - /** When true, {@link EXTSourceDistanceModel} is supported. */ - public final boolean AL_EXT_source_distance_model; - /** When true, {@link EXTSourceRadius} is supported. */ - public final boolean AL_EXT_SOURCE_RADIUS; - /** When true, {@link EXTStaticBuffer} is supported. */ - public final boolean AL_EXT_STATIC_BUFFER; - /** When true, {@link EXTStereoAngles} is supported. */ - public final boolean AL_EXT_STEREO_ANGLES; - /** When true, {@link EXTVorbis} is supported. */ - public final boolean AL_EXT_vorbis; - /** When true, {@link LOKIIMAADPCM} is supported. */ - public final boolean AL_LOKI_IMA_ADPCM; - /** When true, {@link LOKIQuadriphonic} is supported. */ - public final boolean AL_LOKI_quadriphonic; - /** When true, {@link LOKIWAVEFormat} is supported. */ - public final boolean AL_LOKI_WAVE_format; - /** When true, {@link SOFTBformatEx} is supported. */ - public final boolean AL_SOFT_bformat_ex; - /** When true, {@link SOFTBlockAlignment} is supported. */ - public final boolean AL_SOFT_block_alignment; - /** When true, {@link SOFTBufferLengthQuery} is supported. */ - public final boolean AL_SOFT_buffer_length_query; - /** When true, {@link SOFTBufferSamples} is supported. */ - public final boolean AL_SOFT_buffer_samples; - /** When true, {@link SOFTBufferSubData} is supported. */ - public final boolean AL_SOFT_buffer_sub_data; - /** When true, {@link SOFTCallbackBuffer} is supported. */ - public final boolean AL_SOFT_callback_buffer; - /** When true, {@link SOFTDeferredUpdates} is supported. */ - public final boolean AL_SOFT_deferred_updates; - /** When true, {@link SOFTDirectChannels} is supported. */ - public final boolean AL_SOFT_direct_channels; - /** When true, {@link SOFTDirectChannelsRemix} is supported. */ - public final boolean AL_SOFT_direct_channels_remix; - /** When true, {@link SOFTEffectTarget} is supported. */ - public final boolean AL_SOFT_effect_target; - /** When true, {@link SOFTEvents} is supported. */ - public final boolean AL_SOFT_events; - /** When true, {@link SOFTGainClampEx} is supported. */ - public final boolean AL_SOFT_gain_clamp_ex; - /** When true, {@link SOFTLoopPoints} is supported. */ - public final boolean AL_SOFT_loop_points; - /** When true, {@link SOFTMSADPCM} is supported. */ - public final boolean AL_SOFT_MSADPCM; - /** When true, {@link SOFTSourceLatency} is supported. */ - public final boolean AL_SOFT_source_latency; - /** When true, {@link SOFTSourceLength} is supported. */ - public final boolean AL_SOFT_source_length; - /** When true, {@link SOFTSourceResampler} is supported. */ - public final boolean AL_SOFT_source_resampler; - /** When true, {@link SOFTSourceSpatialize} is supported. */ - public final boolean AL_SOFT_source_spatialize; - /** When true, {@link SOFTSourceStartDelay} is supported. */ - public final boolean AL_SOFT_source_start_delay; - /** When true, {@link SOFTUHJ} is supported. */ - public final boolean AL_SOFT_UHJ; - /** When true, {@link SOFTUHJEx} is supported. */ - public final boolean AL_SOFT_UHJ_ex; - /** When true, {@link SOFTXHoldOnDisconnect} is supported. */ - public final boolean AL_SOFTX_hold_on_disconnect; - - /** Off-heap array of the above function addresses. */ - final PointerBuffer addresses; - - ALCapabilities(FunctionProvider provider, Set ext, IntFunction bufferFactory) { - PointerBuffer caps = bufferFactory.apply(133); - - OpenAL10 = check_AL10(provider, caps, ext); - OpenAL11 = check_AL11(provider, caps, ext); - AL_EXT_ALAW = ext.contains("AL_EXT_ALAW"); - AL_EXT_BFORMAT = ext.contains("AL_EXT_BFORMAT"); - AL_EXT_DOUBLE = ext.contains("AL_EXT_DOUBLE"); - ALC_EXT_EFX = check_EXT_EFX(provider, caps, ext); - AL_EXT_EXPONENT_DISTANCE = ext.contains("AL_EXT_EXPONENT_DISTANCE"); - AL_EXT_FLOAT32 = ext.contains("AL_EXT_FLOAT32"); - AL_EXT_IMA4 = ext.contains("AL_EXT_IMA4"); - AL_EXT_LINEAR_DISTANCE = ext.contains("AL_EXT_LINEAR_DISTANCE"); - AL_EXT_MCFORMATS = ext.contains("AL_EXT_MCFORMATS"); - AL_EXT_MULAW = ext.contains("AL_EXT_MULAW"); - AL_EXT_MULAW_BFORMAT = ext.contains("AL_EXT_MULAW_BFORMAT"); - AL_EXT_MULAW_MCFORMATS = ext.contains("AL_EXT_MULAW_MCFORMATS"); - AL_EXT_OFFSET = ext.contains("AL_EXT_OFFSET"); - AL_EXT_source_distance_model = ext.contains("AL_EXT_source_distance_model"); - AL_EXT_SOURCE_RADIUS = ext.contains("AL_EXT_SOURCE_RADIUS"); - AL_EXT_STATIC_BUFFER = check_EXT_STATIC_BUFFER(provider, caps, ext); - AL_EXT_STEREO_ANGLES = ext.contains("AL_EXT_STEREO_ANGLES"); - AL_EXT_vorbis = ext.contains("AL_EXT_vorbis"); - AL_LOKI_IMA_ADPCM = ext.contains("AL_LOKI_IMA_ADPCM"); - AL_LOKI_quadriphonic = ext.contains("AL_LOKI_quadriphonic"); - AL_LOKI_WAVE_format = ext.contains("AL_LOKI_WAVE_format"); - AL_SOFT_bformat_ex = ext.contains("AL_SOFT_bformat_ex"); - AL_SOFT_block_alignment = ext.contains("AL_SOFT_block_alignment"); - AL_SOFT_buffer_length_query = ext.contains("AL_SOFT_buffer_length_query"); - AL_SOFT_buffer_samples = check_SOFT_buffer_samples(provider, caps, ext); - AL_SOFT_buffer_sub_data = check_SOFT_buffer_sub_data(provider, caps, ext); - AL_SOFT_callback_buffer = check_SOFT_callback_buffer(provider, caps, ext); - AL_SOFT_deferred_updates = check_SOFT_deferred_updates(provider, caps, ext); - AL_SOFT_direct_channels = ext.contains("AL_SOFT_direct_channels"); - AL_SOFT_direct_channels_remix = ext.contains("AL_SOFT_direct_channels_remix"); - AL_SOFT_effect_target = ext.contains("AL_SOFT_effect_target"); - AL_SOFT_events = check_SOFT_events(provider, caps, ext); - AL_SOFT_gain_clamp_ex = ext.contains("AL_SOFT_gain_clamp_ex"); - AL_SOFT_loop_points = ext.contains("AL_SOFT_loop_points"); - AL_SOFT_MSADPCM = ext.contains("AL_SOFT_MSADPCM"); - AL_SOFT_source_latency = check_SOFT_source_latency(provider, caps, ext); - AL_SOFT_source_length = ext.contains("AL_SOFT_source_length"); - AL_SOFT_source_resampler = check_SOFT_source_resampler(provider, caps, ext); - AL_SOFT_source_spatialize = ext.contains("AL_SOFT_source_spatialize"); - AL_SOFT_source_start_delay = check_SOFT_source_start_delay(provider, caps, ext); - AL_SOFT_UHJ = ext.contains("AL_SOFT_UHJ"); - AL_SOFT_UHJ_ex = ext.contains("AL_SOFT_UHJ_ex"); - AL_SOFTX_hold_on_disconnect = ext.contains("AL_SOFTX_hold_on_disconnect"); - - alGetError = caps.get(0); - alEnable = caps.get(1); - alDisable = caps.get(2); - alIsEnabled = caps.get(3); - alGetBoolean = caps.get(4); - alGetInteger = caps.get(5); - alGetFloat = caps.get(6); - alGetDouble = caps.get(7); - alGetBooleanv = caps.get(8); - alGetIntegerv = caps.get(9); - alGetFloatv = caps.get(10); - alGetDoublev = caps.get(11); - alGetString = caps.get(12); - alDistanceModel = caps.get(13); - alDopplerFactor = caps.get(14); - alDopplerVelocity = caps.get(15); - alListenerf = caps.get(16); - alListeneri = caps.get(17); - alListener3f = caps.get(18); - alListenerfv = caps.get(19); - alGetListenerf = caps.get(20); - alGetListeneri = caps.get(21); - alGetListener3f = caps.get(22); - alGetListenerfv = caps.get(23); - alGenSources = caps.get(24); - alDeleteSources = caps.get(25); - alIsSource = caps.get(26); - alSourcef = caps.get(27); - alSource3f = caps.get(28); - alSourcefv = caps.get(29); - alSourcei = caps.get(30); - alGetSourcef = caps.get(31); - alGetSource3f = caps.get(32); - alGetSourcefv = caps.get(33); - alGetSourcei = caps.get(34); - alGetSourceiv = caps.get(35); - alSourceQueueBuffers = caps.get(36); - alSourceUnqueueBuffers = caps.get(37); - alSourcePlay = caps.get(38); - alSourcePause = caps.get(39); - alSourceStop = caps.get(40); - alSourceRewind = caps.get(41); - alSourcePlayv = caps.get(42); - alSourcePausev = caps.get(43); - alSourceStopv = caps.get(44); - alSourceRewindv = caps.get(45); - alGenBuffers = caps.get(46); - alDeleteBuffers = caps.get(47); - alIsBuffer = caps.get(48); - alGetBufferf = caps.get(49); - alGetBufferi = caps.get(50); - alBufferData = caps.get(51); - alGetEnumValue = caps.get(52); - alGetProcAddress = caps.get(53); - alIsExtensionPresent = caps.get(54); - alListener3i = caps.get(55); - alGetListeneriv = caps.get(56); - alSource3i = caps.get(57); - alListeneriv = caps.get(58); - alSourceiv = caps.get(59); - alBufferf = caps.get(60); - alBuffer3f = caps.get(61); - alBufferfv = caps.get(62); - alBufferi = caps.get(63); - alBuffer3i = caps.get(64); - alBufferiv = caps.get(65); - alGetBufferiv = caps.get(66); - alGetBufferfv = caps.get(67); - alSpeedOfSound = caps.get(68); - alGenEffects = caps.get(69); - alDeleteEffects = caps.get(70); - alIsEffect = caps.get(71); - alEffecti = caps.get(72); - alEffectiv = caps.get(73); - alEffectf = caps.get(74); - alEffectfv = caps.get(75); - alGetEffecti = caps.get(76); - alGetEffectiv = caps.get(77); - alGetEffectf = caps.get(78); - alGetEffectfv = caps.get(79); - alGenFilters = caps.get(80); - alDeleteFilters = caps.get(81); - alIsFilter = caps.get(82); - alFilteri = caps.get(83); - alFilteriv = caps.get(84); - alFilterf = caps.get(85); - alFilterfv = caps.get(86); - alGetFilteri = caps.get(87); - alGetFilteriv = caps.get(88); - alGetFilterf = caps.get(89); - alGetFilterfv = caps.get(90); - alGenAuxiliaryEffectSlots = caps.get(91); - alDeleteAuxiliaryEffectSlots = caps.get(92); - alIsAuxiliaryEffectSlot = caps.get(93); - alAuxiliaryEffectSloti = caps.get(94); - alAuxiliaryEffectSlotiv = caps.get(95); - alAuxiliaryEffectSlotf = caps.get(96); - alAuxiliaryEffectSlotfv = caps.get(97); - alGetAuxiliaryEffectSloti = caps.get(98); - alGetAuxiliaryEffectSlotiv = caps.get(99); - alGetAuxiliaryEffectSlotf = caps.get(100); - alGetAuxiliaryEffectSlotfv = caps.get(101); - alBufferDataStatic = caps.get(102); - alBufferSamplesSOFT = caps.get(103); - alBufferSubSamplesSOFT = caps.get(104); - alGetBufferSamplesSOFT = caps.get(105); - alIsBufferFormatSupportedSOFT = caps.get(106); - alBufferSubDataSOFT = caps.get(107); - alBufferCallbackSOFT = caps.get(108); - alGetBufferPtrSOFT = caps.get(109); - alGetBuffer3PtrSOFT = caps.get(110); - alGetBufferPtrvSOFT = caps.get(111); - alDeferUpdatesSOFT = caps.get(112); - alProcessUpdatesSOFT = caps.get(113); - alEventControlSOFT = caps.get(114); - alEventCallbackSOFT = caps.get(115); - alGetPointerSOFT = caps.get(116); - alGetPointervSOFT = caps.get(117); - alSourcedSOFT = caps.get(118); - alSource3dSOFT = caps.get(119); - alSourcedvSOFT = caps.get(120); - alGetSourcedSOFT = caps.get(121); - alGetSource3dSOFT = caps.get(122); - alGetSourcedvSOFT = caps.get(123); - alSourcei64SOFT = caps.get(124); - alSource3i64SOFT = caps.get(125); - alSourcei64vSOFT = caps.get(126); - alGetSourcei64SOFT = caps.get(127); - alGetSource3i64SOFT = caps.get(128); - alGetSourcei64vSOFT = caps.get(129); - alGetStringiSOFT = caps.get(130); - alSourcePlayAtTimeSOFT = caps.get(131); - alSourcePlayAtTimevSOFT = caps.get(132); - - addresses = ThreadLocalUtil.setupAddressBuffer(caps); - } - - /** Returns the buffer of OpenAL function pointers. */ - public PointerBuffer getAddressBuffer() { - return addresses; - } - - private static boolean check_AL10(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenAL10")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 - }, - "alGetError", "alEnable", "alDisable", "alIsEnabled", "alGetBoolean", "alGetInteger", "alGetFloat", "alGetDouble", "alGetBooleanv", "alGetIntegerv", - "alGetFloatv", "alGetDoublev", "alGetString", "alDistanceModel", "alDopplerFactor", "alDopplerVelocity", "alListenerf", "alListeneri", - "alListener3f", "alListenerfv", "alGetListenerf", "alGetListeneri", "alGetListener3f", "alGetListenerfv", "alGenSources", "alDeleteSources", - "alIsSource", "alSourcef", "alSource3f", "alSourcefv", "alSourcei", "alGetSourcef", "alGetSource3f", "alGetSourcefv", "alGetSourcei", - "alGetSourceiv", "alSourceQueueBuffers", "alSourceUnqueueBuffers", "alSourcePlay", "alSourcePause", "alSourceStop", "alSourceRewind", - "alSourcePlayv", "alSourcePausev", "alSourceStopv", "alSourceRewindv", "alGenBuffers", "alDeleteBuffers", "alIsBuffer", "alGetBufferf", - "alGetBufferi", "alBufferData", "alGetEnumValue", "alGetProcAddress", "alIsExtensionPresent" - ) || reportMissing("AL", "OpenAL10"); - } - - private static boolean check_AL11(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("OpenAL11")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 - }, - "alListener3i", "alGetListeneriv", "alSource3i", "alListeneriv", "alSourceiv", "alBufferf", "alBuffer3f", "alBufferfv", "alBufferi", "alBuffer3i", - "alBufferiv", "alGetBufferiv", "alGetBufferfv", "alSpeedOfSound" - ) || reportMissing("AL", "OpenAL11"); - } - - private static boolean check_EXT_EFX(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("ALC_EXT_EFX")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101 - }, - "alGenEffects", "alDeleteEffects", "alIsEffect", "alEffecti", "alEffectiv", "alEffectf", "alEffectfv", "alGetEffecti", "alGetEffectiv", - "alGetEffectf", "alGetEffectfv", "alGenFilters", "alDeleteFilters", "alIsFilter", "alFilteri", "alFilteriv", "alFilterf", "alFilterfv", - "alGetFilteri", "alGetFilteriv", "alGetFilterf", "alGetFilterfv", "alGenAuxiliaryEffectSlots", "alDeleteAuxiliaryEffectSlots", - "alIsAuxiliaryEffectSlot", "alAuxiliaryEffectSloti", "alAuxiliaryEffectSlotiv", "alAuxiliaryEffectSlotf", "alAuxiliaryEffectSlotfv", - "alGetAuxiliaryEffectSloti", "alGetAuxiliaryEffectSlotiv", "alGetAuxiliaryEffectSlotf", "alGetAuxiliaryEffectSlotfv" - ) || reportMissing("AL", "ALC_EXT_EFX"); - } - - private static boolean check_EXT_STATIC_BUFFER(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_EXT_STATIC_BUFFER")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 102 - }, - "alBufferDataStatic" - ) || reportMissing("AL", "AL_EXT_STATIC_BUFFER"); - } - - private static boolean check_SOFT_buffer_samples(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_buffer_samples")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 103, 104, 105, 106 - }, - "alBufferSamplesSOFT", "alBufferSubSamplesSOFT", "alGetBufferSamplesSOFT", "alIsBufferFormatSupportedSOFT" - ) || reportMissing("AL", "AL_SOFT_buffer_samples"); - } - - private static boolean check_SOFT_buffer_sub_data(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_buffer_sub_data")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 107 - }, - "alBufferSubDataSOFT" - ) || reportMissing("AL", "AL_SOFT_buffer_sub_data"); - } - - private static boolean check_SOFT_callback_buffer(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_callback_buffer")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 108, 109, 110, 111 - }, - "alBufferCallbackSOFT", "alGetBufferPtrSOFT", "alGetBuffer3PtrSOFT", "alGetBufferPtrvSOFT" - ) || reportMissing("AL", "AL_SOFT_callback_buffer"); - } - - private static boolean check_SOFT_deferred_updates(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_deferred_updates")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 112, 113 - }, - "alDeferUpdatesSOFT", "alProcessUpdatesSOFT" - ) || reportMissing("AL", "AL_SOFT_deferred_updates"); - } - - private static boolean check_SOFT_events(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_events")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 114, 115, 116, 117 - }, - "alEventControlSOFT", "alEventCallbackSOFT", "alGetPointerSOFT", "alGetPointervSOFT" - ) || reportMissing("AL", "AL_SOFT_events"); - } - - private static boolean check_SOFT_source_latency(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_source_latency")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129 - }, - "alSourcedSOFT", "alSource3dSOFT", "alSourcedvSOFT", "alGetSourcedSOFT", "alGetSource3dSOFT", "alGetSourcedvSOFT", "alSourcei64SOFT", - "alSource3i64SOFT", "alSourcei64vSOFT", "alGetSourcei64SOFT", "alGetSource3i64SOFT", "alGetSourcei64vSOFT" - ) || reportMissing("AL", "AL_SOFT_source_latency"); - } - - private static boolean check_SOFT_source_resampler(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_source_resampler")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 130 - }, - "alGetStringiSOFT" - ) || reportMissing("AL", "AL_SOFT_source_resampler"); - } - - private static boolean check_SOFT_source_start_delay(FunctionProvider provider, PointerBuffer caps, Set ext) { - if (!ext.contains("AL_SOFT_source_start_delay")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 131, 132 - }, - "alSourcePlayAtTimeSOFT", "alSourcePlayAtTimevSOFT" - ) || reportMissing("AL", "AL_SOFT_source_start_delay"); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALCcontext.java b/LWJGL/src/main/java/org/lwjgl/openal/ALCcontext.java deleted file mode 100644 index 3bf66dbe..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALCcontext.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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.openal; - -import org.lwjgl.BufferUtils; - -import java.nio.IntBuffer; - -/** - * 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. - * - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public final class ALCcontext { - - /** Address of actual context */ - final long context; - - /** Whether this context is valid */ - private boolean valid; - - /** - * Creates a new instance of ALCcontext - * - * @param context address of actual context - */ - ALCcontext(long context) { - this.context = context; - this.valid = true; - } - - /* - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object context) { - if(context instanceof ALCcontext) { - return ((ALCcontext)context).context == this.context; - } - return super.equals(context); - } - - /** - * Creates an attribute list in a ByteBuffer - * @param contextFrequency Frequency to add - * @param contextRefresh Refresh rate to add - * @param contextSynchronized Whether to synchronize the context - * @return attribute list - */ - static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) { - IntBuffer attribList = BufferUtils.createIntBuffer(7); - - attribList.put(ALC10.ALC_FREQUENCY); - attribList.put(contextFrequency); - attribList.put(ALC10.ALC_REFRESH); - attribList.put(contextRefresh); - attribList.put(ALC10.ALC_SYNC); - attribList.put(contextSynchronized); - attribList.put(0); //terminating int - - return attribList; - } - - /** - * Marks this context as invalid - * - */ - void setInvalid() { - valid = false; - } - - /** - * @return true if this context is still valid - */ - public boolean isValid() { - return valid; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALCdevice.java b/LWJGL/src/main/java/org/lwjgl/openal/ALCdevice.java deleted file mode 100644 index 9cc06a97..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALCdevice.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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.openal; - -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. - * - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public final class ALCdevice { - - /** Address of actual device */ - final long device; - - /** Whether this device is valid */ - private boolean valid; - - /** List of contexts belonging to the device */ - private final HashMap contexts = new HashMap(); - - /** - * Creates a new instance of ALCdevice - * - * @param device address of actual device - */ - ALCdevice(long device) { - this.device = device; - this.valid = true; - } - - /* - * @see java.lang.Object#equals(java.lang.Object) - */ - public boolean equals(Object device) { - if(device instanceof ALCdevice) { - return ((ALCdevice)device).device == this.device; - } - return super.equals(device); - } - - /** - * Adds a context to the device - * - * @param context context to add to the list of contexts for this device - */ - void addContext(ALCcontext context) { - synchronized (contexts) { - contexts.put(context.context, context); - } - } - - /** - * Remove context associated with device - * - * @param context Context to disassociate with device - */ - void removeContext(ALCcontext context) { - synchronized (contexts) { - contexts.remove(context.context); - } - } - - /** - * Marks this device and all of its contexts invalid - */ - void setInvalid() { - valid = false; - synchronized (contexts) { - for ( ALCcontext context : contexts.values() ) - context.setInvalid(); - } - contexts.clear(); - } - - /** - * @return true if this device is still valid - */ - public boolean isValid() { - return valid; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/ALUtil.java b/LWJGL/src/main/java/org/lwjgl/openal/ALUtil.java deleted file mode 100644 index 4306ec98..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/ALUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.openal; - -import javax.annotation.*; -import java.nio.*; -import java.util.*; - -import static org.lwjgl.openal.ALC10.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** OpenAL utilities. */ -public final class ALUtil { - - private ALUtil() { - } - - /** - * Obtains string values from ALC. This is a custom implementation for those tokens that return a list of strings instead of a single string. - * - * @param deviceHandle the device to query - * @param token the information to query. One of:
    {@link ALC11#ALC_ALL_DEVICES_SPECIFIER}, {@link ALC11#ALC_CAPTURE_DEVICE_SPECIFIER} - */ - @Nullable - public static List getStringList(long deviceHandle, int token) { - long __result = nalcGetString(deviceHandle, token); - if (__result == NULL) { - return null; - } - - ByteBuffer buffer = memByteBuffer(__result, Integer.MAX_VALUE); - - List strings = new ArrayList<>(); - - int offset = 0; - while (true) { - if (buffer.get() == 0) { - int limit = buffer.position() - 1; - if (limit == offset) { // Previous char was also a \0 == end of list. - break; - } - - strings.add(memUTF8(buffer, limit - offset, offset)); - offset = buffer.position(); - } - } - - return strings; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EFX10.java b/LWJGL/src/main/java/org/lwjgl/openal/EFX10.java deleted file mode 100644 index 8ade79a7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EFX10.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.lwjgl.openal; - -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -public class EFX10 { - - public static final int AL_EFFECT_TYPE = EXTEfx.AL_EFFECT_TYPE; - public static final int AL_EFFECTSLOT_EFFECT = EXTEfx.AL_EFFECTSLOT_EFFECT; - public static final int AL_EFFECT_ECHO = EXTEfx.AL_EFFECT_ECHO; - public static final float AL_ECHO_MIN_DAMPING = EXTEfx.AL_ECHO_MIN_DAMPING; - public static final int AL_ECHO_DAMPING = EXTEfx.AL_ECHO_DAMPING; - public static final float AL_ECHO_MAX_DAMPING = EXTEfx.AL_ECHO_MAX_DAMPING; - public static final float AL_ECHO_MIN_DELAY = EXTEfx.AL_ECHO_MIN_DELAY; - public static final int AL_ECHO_DELAY = EXTEfx.AL_ECHO_DELAY; - public static final float AL_ECHO_MAX_DELAY = EXTEfx.AL_ECHO_MAX_DELAY; - public static final float AL_ECHO_MIN_FEEDBACK = EXTEfx.AL_ECHO_MIN_FEEDBACK; - public static final int AL_ECHO_FEEDBACK = EXTEfx.AL_ECHO_FEEDBACK; - public static final float AL_ECHO_MAX_FEEDBACK = EXTEfx.AL_ECHO_MAX_FEEDBACK; - public static final float AL_ECHO_MIN_LRDELAY = EXTEfx.AL_ECHO_MIN_LRDELAY; - public static final int AL_ECHO_LRDELAY = EXTEfx.AL_ECHO_LRDELAY; - public static final float AL_ECHO_MAX_LRDELAY = EXTEfx.AL_ECHO_MAX_LRDELAY; - public static final float AL_ECHO_MIN_SPREAD = EXTEfx.AL_ECHO_MIN_SPREAD; - public static final int AL_ECHO_SPREAD = EXTEfx.AL_ECHO_SPREAD; - public static final float AL_ECHO_MAX_SPREAD = EXTEfx.AL_ECHO_MAX_SPREAD; - public static final int AL_EFFECT_REVERB = EXTEfx.AL_EFFECT_REVERB; - public static final int AL_RING_MODULATOR_SINUSOID = EXTEfx.AL_RING_MODULATOR_SINUSOID; - public static final int AL_RING_MODULATOR_SAWTOOTH = EXTEfx.AL_RING_MODULATOR_SAWTOOTH; - public static final int AL_RING_MODULATOR_SQUARE = EXTEfx.AL_RING_MODULATOR_SQUARE; - public static final int AL_EFFECT_RING_MODULATOR = EXTEfx.AL_EFFECT_RING_MODULATOR; - public static final float AL_RING_MODULATOR_MAX_FREQUENCY = EXTEfx.AL_RING_MODULATOR_MAX_FREQUENCY; - public static final int AL_RING_MODULATOR_FREQUENCY = EXTEfx.AL_RING_MODULATOR_FREQUENCY; - public static final float AL_RING_MODULATOR_MIN_FREQUENCY = EXTEfx.AL_RING_MODULATOR_MIN_FREQUENCY; - public static final float AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = EXTEfx.AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF; - public static final int AL_RING_MODULATOR_HIGHPASS_CUTOFF = EXTEfx.AL_RING_MODULATOR_HIGHPASS_CUTOFF; - public static final float AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = EXTEfx.AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF; - public static final int AL_RING_MODULATOR_WAVEFORM = EXTEfx.AL_RING_MODULATOR_WAVEFORM; - public static final int AL_FILTER_TYPE = EXTEfx.AL_FILTER_TYPE; - public static final int AL_FILTER_LOWPASS = EXTEfx.AL_FILTER_LOWPASS; - public static final int AL_LOWPASS_GAIN = EXTEfx.AL_LOWPASS_GAIN; - public static final int AL_LOWPASS_GAINHF = EXTEfx.AL_LOWPASS_GAINHF; - public static final int AL_EFFECTSLOT_NULL = EXTEfx.AL_EFFECTSLOT_NULL; - public static final int AL_FILTER_NULL = EXTEfx.AL_FILTER_NULL; - public static final int AL_AUXILIARY_SEND_FILTER = EXTEfx.AL_AUXILIARY_SEND_FILTER; - public static final int AL_DIRECT_FILTER = EXTEfx.AL_DIRECT_FILTER; - public static final int ALC_MAX_AUXILIARY_SENDS = EXTEfx.ALC_MAX_AUXILIARY_SENDS; - public static final int ALC_EFX_MAJOR_VERSION = EXTEfx.ALC_EFX_MAJOR_VERSION; - public static final int AL_REVERB_DECAY_TIME = EXTEfx.AL_REVERB_DECAY_TIME; - public static final int AL_FILTER_HIGHPASS = EXTEfx.AL_FILTER_HIGHPASS; - public static final int AL_FILTER_BANDPASS = EXTEfx.AL_FILTER_BANDPASS; - public static final int AL_EFFECT_NULL = EXTEfx.AL_EFFECT_NULL; - public static final int AL_EFFECT_EAXREVERB = EXTEfx.AL_EFFECT_EAXREVERB; - public static final int AL_EFFECT_CHORUS = EXTEfx.AL_EFFECT_CHORUS; - public static final int AL_EFFECT_DISTORTION = EXTEfx.AL_EFFECT_DISTORTION; - public static final int AL_EFFECT_FLANGER = EXTEfx.AL_EFFECT_FLANGER; - public static final int AL_EFFECT_FREQUENCY_SHIFTER = EXTEfx.AL_EFFECT_FREQUENCY_SHIFTER; - public static final int AL_EFFECT_VOCAL_MORPHER = EXTEfx.AL_EFFECT_VOCAL_MORPHER; - public static final int AL_EFFECT_PITCH_SHIFTER = EXTEfx.AL_EFFECT_PITCH_SHIFTER; - public static final int AL_EFFECT_AUTOWAH = EXTEfx.AL_EFFECT_AUTOWAH; - public static final int AL_EFFECT_COMPRESSOR = EXTEfx.AL_EFFECT_COMPRESSOR; - public static final int AL_EFFECT_EQUALIZER = EXTEfx.AL_EFFECT_EQUALIZER; - - public static int alGenAuxiliaryEffectSlots() { - return EXTEfx.alGenAuxiliaryEffectSlots(); - } - - public static int alGenFilters() { - return EXTEfx.alGenFilters(); - } - - public static void alDeleteFilters(int filter) { - EXTEfx.alDeleteFilters(filter); - } - - public static void alFilteri(int filter, int param, int value) { - EXTEfx.alFilteri(filter, param, value); - } - - public static void alFilterf(int filter, int param, float value) { - EXTEfx.alFilterf(filter, param, value); - } - - public static float alGetFilterf(int filter, int param) { - return EXTEfx.alGetFilterf(filter, param); - } - - public static int alGenEffects() { - return EXTEfx.alGenEffects(); - } - - public static void alDeleteEffects(int effect) { - EXTEfx.alDeleteAuxiliaryEffectSlots(effect); - } - - public static void alDeleteAuxiliaryEffectSlots(int effectSlot) { - EXTEfx.alDeleteAuxiliaryEffectSlots(effectSlot); - } - - public static void alEffecti(int effect, int param, int value) { - EXTEfx.alEffecti(effect, param, value); - } - - public static float alGetEffectf(int effect, int param) { - return EXTEfx.alGetEffectf(effect, param); - } - - public static int alGetEffecti(int effect, int param) { - return EXTEfx.alGetEffecti(effect, param); - } - - public static void alEffectf(int effect, int param, float value) { - EXTEfx.alEffectf(effect, param, value); - } - - public static void alAuxiliaryEffectSloti(int effectSlot, int param, int value) { - EXTEfx.alAuxiliaryEffectSloti(effectSlot, param, value); - } - - public static void alGenAuxiliaryEffectSlots(IntBuffer effectSlots) { - EXTEfx.alGenAuxiliaryEffectSlots(effectSlots); - } - - public static void alGenEffects(IntBuffer effects) { - EXTEfx.alGenEffects(effects); - } - - public static void alDeleteEffects(IntBuffer effects) { - EXTEfx.alDeleteEffects(effects); - } - - public static void alDeleteAuxiliaryEffectSlots(IntBuffer effectSlots) { - EXTEfx.alDeleteAuxiliaryEffectSlots(effectSlots); - } - - public static void alGenFilters(IntBuffer filters) { - EXTEfx.alGenFilters(filters); - } - - public static void alDeleteFilters(IntBuffer filters) { - EXTEfx.alDeleteFilters(filters); - } - - - - - - - - public static void alGetAuxiliaryEffectSlot(int var0, int var1, FloatBuffer var2) { - EXTEfx.alGetAuxiliaryEffectSlotfv(var0, var1, var2); - } - - public static void alGetAuxiliaryEffectSlot(int var0, int var1, IntBuffer var2) { - EXTEfx.alGetAuxiliaryEffectSlotiv(var0, var1, var2); - } - - public static float alGetAuxiliaryEffectSlotf(int var0, int var1) { - return EXTEfx.alGetAuxiliaryEffectSlotf(var0, var1); - } - - public static int alGetAuxiliaryEffectSloti(int var0, int var1) { - return EXTEfx.alGetAuxiliaryEffectSloti(var0, var1); - } - - public static void alEffect(int var0, int var1, FloatBuffer var2) { - EXTEfx.alEffectfv(var0, var1, var2); - } - - public static void alEffect(int var0, int var1, IntBuffer var2) { - EXTEfx.alEffectiv(var0, var1, var2); - } - - public static void alFilter(int var0, int var1, FloatBuffer var2) { - EXTEfx.alFilterfv(var0, var1, var2); - } - - public static void alFilter(int var0, int var1, IntBuffer var2) { - EXTEfx.alFilteriv(var0, var1, var2); - } - - public static void alAuxiliaryEffectSlot(int var0, int var1, FloatBuffer var2) { - EXTEfx.alAuxiliaryEffectSlotfv(var0, var1, var2); - } - - public static void alAuxiliaryEffectSlot(int var0, int var1, IntBuffer var2) { - EXTEfx.alAuxiliaryEffectSlotiv(var0, var1, var2); - } - - public static void alAuxiliaryEffectSlotf(int var0, int var1, float var2) { - EXTEfx.alAuxiliaryEffectSlotf(var0, var1, var2); - } - - public static void alGetEffect(int var0, int var1, FloatBuffer var2) { - EXTEfx.alGetEffectfv(var0, var1, var2); - } - - public static void alGetEffect(int var0, int var1, IntBuffer var2) { - EXTEfx.alGetEffectiv(var0, var1, var2); - } - - public static void alGetFilter(int var0, int var1, FloatBuffer var2) { - EXTEfx.alGetFilterfv(var0, var1, var2); - } - - public static void alGetFilter(int var0, int var1, IntBuffer var2) { - EXTEfx.alGetFilteriv(var0, var1, var2); - } - - public static int alGetFilteri(int var0, int var1) { - return EXTEfx.alGetFilteri(var0, var1); - } - - public static boolean alIsAuxiliaryEffectSlot(int var0) { - return EXTEfx.alIsAuxiliaryEffectSlot(var0); - } - - public static boolean alIsEffect(int var0) { - return EXTEfx.alIsEffect(var0); - } - - public static boolean alIsFilter(int var0) { - return EXTEfx.alIsFilter(var0); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EFXUtil.java b/LWJGL/src/main/java/org/lwjgl/openal/EFXUtil.java deleted file mode 100644 index 6b811ce7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EFXUtil.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * 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.lwjgl.openal; - -import static org.lwjgl.openal.AL10.AL_INVALID_OPERATION; -import static org.lwjgl.openal.AL10.AL_INVALID_VALUE; -import static org.lwjgl.openal.AL10.AL_NO_ERROR; -import static org.lwjgl.openal.AL10.AL_OUT_OF_MEMORY; -import static org.lwjgl.openal.AL10.alGetError; -import static org.lwjgl.openal.EFX10.AL_EFFECT_AUTOWAH; -import static org.lwjgl.openal.EFX10.AL_EFFECT_CHORUS; -import static org.lwjgl.openal.EFX10.AL_EFFECT_COMPRESSOR; -import static org.lwjgl.openal.EFX10.AL_EFFECT_DISTORTION; -import static org.lwjgl.openal.EFX10.AL_EFFECT_EAXREVERB; -import static org.lwjgl.openal.EFX10.AL_EFFECT_ECHO; -import static org.lwjgl.openal.EFX10.AL_EFFECT_EQUALIZER; -import static org.lwjgl.openal.EFX10.AL_EFFECT_FLANGER; -import static org.lwjgl.openal.EFX10.AL_EFFECT_FREQUENCY_SHIFTER; -import static org.lwjgl.openal.EFX10.AL_EFFECT_NULL; -import static org.lwjgl.openal.EFX10.AL_EFFECT_PITCH_SHIFTER; -import static org.lwjgl.openal.EFX10.AL_EFFECT_REVERB; -import static org.lwjgl.openal.EFX10.AL_EFFECT_RING_MODULATOR; -import static org.lwjgl.openal.EFX10.AL_EFFECT_TYPE; -import static org.lwjgl.openal.EFX10.AL_EFFECT_VOCAL_MORPHER; -import static org.lwjgl.openal.EFX10.AL_FILTER_BANDPASS; -import static org.lwjgl.openal.EFX10.AL_FILTER_HIGHPASS; -import static org.lwjgl.openal.EFX10.AL_FILTER_LOWPASS; -import static org.lwjgl.openal.EFX10.AL_FILTER_NULL; -import static org.lwjgl.openal.EFX10.AL_FILTER_TYPE; -import static org.lwjgl.openal.EFX10.alDeleteEffects; -import static org.lwjgl.openal.EFX10.alDeleteFilters; -import static org.lwjgl.openal.EFX10.alEffecti; -import static org.lwjgl.openal.EFX10.alFilteri; -import static org.lwjgl.openal.EFX10.alGenEffects; -import static org.lwjgl.openal.EFX10.alGenFilters; - -/** - * Utility class for the OpenAL extension ALC_EXT_EFX. Provides functions to check for the extension - * and support of various effects and filters. - *

    - * Currently supports ALC_EXT_EFX version 1.0 effects and filters. - * - * @author Ciardhubh - * @version $Revision$ - * $Id$ - */ -public final class EFXUtil { - - /** Constant for testSupportGeneric to check an effect. */ - private static final int EFFECT = 1111; - /** Constant for testSupportGeneric to check a filter. */ - private static final int FILTER = 2222; - - /** Utility class, hidden contructor. */ - private EFXUtil() { - } - - /** - * Checks if OpenAL implementation is loaded and supports ALC_EXT_EFX. - * - * @return True if ALC_EXT_EFX is supported, false if not. - * @throws OpenALException If OpenAL has not been created yet. - */ - public static boolean isEfxSupported() { - return ALC.createCapabilities(AL.alcDevice.device).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. - * - * @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 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(final int effectType) { - // Make sure type is a real effect. - switch (effectType) { - case AL_EFFECT_NULL: - case AL_EFFECT_EAXREVERB: - case AL_EFFECT_REVERB: - case AL_EFFECT_CHORUS: - case AL_EFFECT_DISTORTION: - case AL_EFFECT_ECHO: - case AL_EFFECT_FLANGER: - case AL_EFFECT_FREQUENCY_SHIFTER: - case AL_EFFECT_VOCAL_MORPHER: - case AL_EFFECT_PITCH_SHIFTER: - case AL_EFFECT_RING_MODULATOR: - case AL_EFFECT_AUTOWAH: - case AL_EFFECT_COMPRESSOR: - case AL_EFFECT_EQUALIZER: - break; - default: - throw new IllegalArgumentException("Unknown or invalid effect type: " + effectType); - } - - return testSupportGeneric(EFFECT, effectType); - } - - /** - * 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 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(final int filterType) { - // Make sure type is a real filter. - switch (filterType) { - case AL_FILTER_NULL: - case AL_FILTER_LOWPASS: - case AL_FILTER_HIGHPASS: - case AL_FILTER_BANDPASS: - break; - default: - throw new IllegalArgumentException("Unknown or invalid filter type: " + filterType); - } - - return testSupportGeneric(FILTER, filterType); - } - - /** - * 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. - * @return True if object supports typeValue, false else. - */ - private static boolean testSupportGeneric(final int objectType, final int typeValue) { - // Check for supported objectType. - switch (objectType) { - case EFFECT: - case FILTER: - break; - default: - throw new IllegalArgumentException("Invalid objectType: " + objectType); - } - - boolean supported = false; - if (isEfxSupported()) { - - // Try to create object in order to check AL's response. - alGetError(); - int genError; - int testObject = 0; - try { - switch (objectType) { // Create object based on type - case EFFECT: - testObject = alGenEffects(); - break; - case FILTER: - testObject = alGenFilters(); - break; - default: - throw new IllegalArgumentException("Invalid objectType: " + objectType); - } - genError = alGetError(); - } catch (final OpenALException debugBuildException) { - // Hack because OpenALException hides the original error code (short of parsing the - // error message String which would break if it gets changed). - if (debugBuildException.getMessage().contains("AL_OUT_OF_MEMORY")) { - genError = AL_OUT_OF_MEMORY; - } else { - genError = AL_INVALID_OPERATION; - } - } - - if (genError == AL_NO_ERROR) { - // Successfully created, now try to set type. - alGetError(); - int setError; - try { - switch (objectType) { // Set based on object type - case EFFECT: - alEffecti(testObject, AL_EFFECT_TYPE, typeValue); - break; - case FILTER: - alFilteri(testObject, AL_FILTER_TYPE, typeValue); - break; - default: - throw new IllegalArgumentException("Invalid objectType: " + objectType); - } - setError = alGetError(); - } catch (final OpenALException debugBuildException) { - // Hack because OpenALException hides the original error code (short of parsing - // the error message String which would break when it gets changed). - setError = AL_INVALID_VALUE; - } - - if (setError == AL_NO_ERROR) { - supported = true; - } - - // Cleanup - try { - switch (objectType) { // Set based on object type - case EFFECT: - alDeleteEffects(testObject); - break; - case FILTER: - alDeleteFilters(testObject); - break; - default: - throw new IllegalArgumentException("Invalid objectType: " + objectType); - } - } catch (final OpenALException debugBuildException) { - // Don't care about cleanup errors. - } - - } else if (genError == AL_OUT_OF_MEMORY) { - throw new OpenALException(genError); - } - } - - return supported; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTAlaw.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTAlaw.java deleted file mode 100644 index 0946edfa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTAlaw.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_ALAW} extension. */ -public final class EXTAlaw { - - /** Buffer formats. */ - public static final int - AL_FORMAT_MONO_ALAW_EXT = 0x10016, - AL_FORMAT_STEREO_ALAW_EXT = 0x10017; - - private EXTAlaw() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTBFormat.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTBFormat.java deleted file mode 100644 index 627109c9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTBFormat.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code AL_EXT_BFORMAT} extension. - * - *

    This extension indicates support for the {@link #AL_FORMAT_BFORMAT2D_8 FORMAT_BFORMAT2D_8}, {@link #AL_FORMAT_BFORMAT2D_16 FORMAT_BFORMAT2D_16}, {@link #AL_FORMAT_BFORMAT2D_FLOAT32 FORMAT_BFORMAT2D_FLOAT32}, {@link #AL_FORMAT_BFORMAT3D_8 FORMAT_BFORMAT3D_8}, - * {@link #AL_FORMAT_BFORMAT3D_16 FORMAT_BFORMAT3D_16} and {@link #AL_FORMAT_BFORMAT3D_FLOAT32 FORMAT_BFORMAT3D_FLOAT32} buffer formats. These provide 2D (WXY) and 3D (WXYZ) 8bit int, 16bit int and ALfloat support for - * Ambisonic three- or four-channel B-Format (using W X Y Z channel ordering, encoded as the first three or four channels of Furse-Malham higher order - * Ambisonics). Use of these formats indicate that sources are Ambisonic sources. Such sources can be oriented via {@link AL10#alSourcefv Sourcefv} using the - * {@link AL10#AL_ORIENTATION ORIENTATION} tag, which takes the same parameters as {@code alListenerfv(AL_ORIENTATION,...)}. Such sources DO support {@link AL10#AL_SOURCE_RELATIVE SOURCE_RELATIVE} and the - * soundfield will rotate to reflect the listener's orientation if this is off (the default). Other behaviour is as for stereo or multichannel assets.

    - * - *

    Note that Ambisonics orients X, Y and Z axes in a different way to OpenAL. For clarity, we ignore the Ambisonic coordinate system in the API and stick - * to the OpenAL one, making sure that the Front of the Ambisonic soundfield (actually Ambisonic +X) matches the Front of the OpenAL coordinate system (-Z - * by default) etc. For instance, if the orientation of the source is set so that the "at" vector is to the left, then the front of the B-Format - * soundfield will be presented to the left.

    - */ -public final class EXTBFormat { - - /** Ambisonic formats. */ - public static final int - AL_FORMAT_BFORMAT2D_16 = 0x20022, - AL_FORMAT_BFORMAT2D_8 = 0x20021, - AL_FORMAT_BFORMAT2D_FLOAT32 = 0x20023, - AL_FORMAT_BFORMAT3D_16 = 0x20032, - AL_FORMAT_BFORMAT3D_8 = 0x20031, - AL_FORMAT_BFORMAT3D_FLOAT32 = 0x20033; - - private EXTBFormat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTCapture.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTCapture.java deleted file mode 100644 index 836415e2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTCapture.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; - -/** - * Native bindings to the {@code ALC_EXT_CAPTURE} extension. - * - *

    An OpenAL 1.1 implementation will always support the {@code ALC_EXT_CAPTURE} extension. This allows an application written to the OpenAL 1.0 specification to - * access the capture abilities.

    - */ -public class EXTCapture { - - /** String queries. */ - public static final int - ALC_CAPTURE_DEVICE_SPECIFIER = 0x310, - ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311; - - /** Integer queries. */ - public static final int ALC_CAPTURE_SAMPLES = 0x312; - - protected EXTCapture() { - throw new UnsupportedOperationException(); - } - - // --- [ alcCaptureOpenDevice ] --- - - /** Unsafe version of: {@link #alcCaptureOpenDevice CaptureOpenDevice} */ - public static long nalcCaptureOpenDevice(long deviceName, int frequency, int format, int samples) { - return ALC11.nalcCaptureOpenDevice(deviceName, frequency, format, samples); - } - - /** - * Allows the application to connect to a capture device. - * - *

    The {@code deviceName} argument is a null terminated string that requests a certain device or device configuration. If {@code NULL} is specified, the implementation - * will provide an implementation specific default.

    - * - * @param deviceName the device or device configuration - * @param frequency the audio frequency - * @param format the audio format - * @param samples the number of sample frames to buffer in the AL - */ - @NativeType("ALCdevice *") - public static long alcCaptureOpenDevice(@Nullable @NativeType("ALCchar const *") ByteBuffer deviceName, @NativeType("ALCuint") int frequency, @NativeType("ALCenum") int format, @NativeType("ALCsizei") int samples) { - return ALC11.alcCaptureOpenDevice(deviceName, frequency, format, samples); - } - - /** - * Allows the application to connect to a capture device. - * - *

    The {@code deviceName} argument is a null terminated string that requests a certain device or device configuration. If {@code NULL} is specified, the implementation - * will provide an implementation specific default.

    - * - * @param deviceName the device or device configuration - * @param frequency the audio frequency - * @param format the audio format - * @param samples the number of sample frames to buffer in the AL - */ - @NativeType("ALCdevice *") - public static long alcCaptureOpenDevice(@Nullable @NativeType("ALCchar const *") CharSequence deviceName, @NativeType("ALCuint") int frequency, @NativeType("ALCenum") int format, @NativeType("ALCsizei") int samples) { - return ALC11.alcCaptureOpenDevice(deviceName, frequency, format, samples); - } - - // --- [ alcCaptureCloseDevice ] --- - - /** - * Allows the application to disconnect from a capture device. - * - * @param device the capture device to close - */ - @NativeType("ALCboolean") - public static boolean alcCaptureCloseDevice(@NativeType("ALCdevice *") long device) { - return ALC11.alcCaptureCloseDevice(device); - } - - // --- [ alcCaptureStart ] --- - - /** - * Starts recording audio on the specific capture device. - * - *

    Once started, the device will record audio to an internal ring buffer, the size of which was specified when opening the device. The application may - * query the capture device to discover how much data is currently available via the alcGetInteger with the ALC_CAPTURE_SAMPLES token. This will report the - * number of sample frames currently available.

    - * - * @param device the capture device - */ - @NativeType("ALCvoid") - public static void alcCaptureStart(@NativeType("ALCdevice *") long device) { - ALC11.alcCaptureStart(device); - } - - // --- [ alcCaptureStop ] --- - - /** - * Halts audio capturing without closing the capture device. - * - *

    The implementation is encouraged to optimize for this case. The amount of audio samples available after restarting a stopped capture device is reset to - * zero. The application does not need to stop the capture device to read from it.

    - * - * @param device the capture device - */ - @NativeType("ALCvoid") - public static void alcCaptureStop(@NativeType("ALCdevice *") long device) { - ALC11.alcCaptureStop(device); - } - - // --- [ alcCaptureSamples ] --- - - /** Unsafe version of: {@link #alcCaptureSamples CaptureSamples} */ - public static void nalcCaptureSamples(long device, long buffer, int samples) { - ALC11.nalcCaptureSamples(device, buffer, samples); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") ByteBuffer buffer, @NativeType("ALCsizei") int samples) { - ALC11.alcCaptureSamples(device, buffer, samples); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") ShortBuffer buffer, @NativeType("ALCsizei") int samples) { - ALC11.alcCaptureSamples(device, buffer, samples); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") IntBuffer buffer, @NativeType("ALCsizei") int samples) { - ALC11.alcCaptureSamples(device, buffer, samples); - } - - /** - * Obtains captured audio samples from the AL. - * - *

    The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

    - * - * @param device the capture device - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to obtain - */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") FloatBuffer buffer, @NativeType("ALCsizei") int samples) { - ALC11.alcCaptureSamples(device, buffer, samples); - } - - /** Array version of: {@link #alcCaptureSamples CaptureSamples} */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") short[] buffer, @NativeType("ALCsizei") int samples) { - ALC11.alcCaptureSamples(device, buffer, samples); - } - - /** Array version of: {@link #alcCaptureSamples CaptureSamples} */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") int[] buffer, @NativeType("ALCsizei") int samples) { - ALC11.alcCaptureSamples(device, buffer, samples); - } - - /** Array version of: {@link #alcCaptureSamples CaptureSamples} */ - @NativeType("ALCvoid") - public static void alcCaptureSamples(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") float[] buffer, @NativeType("ALCsizei") int samples) { - ALC11.alcCaptureSamples(device, buffer, samples); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTDedicated.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTDedicated.java deleted file mode 100644 index c4a76a0a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTDedicated.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code ALC_EXT_DEDICATED} extension. - * - *

    This extension provides two "routing" EFX effects that allow sounds to be sent to dedicated speaker channels. Audio rendered to the dedicated low - * frequency effect ({@link #AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT}) is routed to a subwoofer if one is present. Otherwise, it is discarded.

    - * - *

    Audio rendered to the dedicated dialogue effect ({@link #AL_EFFECT_DEDICATED_DIALOGUE EFFECT_DEDICATED_DIALOGUE}) is routed to a front centre speaker if one is present. Otherwise, it is - * rendered to the front centre using the normal spatialisation logic.

    - * - *

    Both effects support a gain control parameter {@link #AL_DEDICATED_GAIN DEDICATED_GAIN}, which defaults to 1.

    - */ -public final class EXTDedicated { - - /** {@code ALC_EXT_DEDICATED} tokens. */ - public static final int - AL_DEDICATED_GAIN = 0x1, - AL_EFFECT_DEDICATED_DIALOGUE = 0x9001, - AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT = 0x9000; - - private EXTDedicated() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTDefaultFilterOrder.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTDefaultFilterOrder.java deleted file mode 100644 index 1c1e4821..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTDefaultFilterOrder.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code ALC_EXT_DEFAULT_FILTER_ORDER} extension. - * - *

    This extension allows the default filter order (i.e. slope) to be selected at context creation time. Attibute {@link #ALC_DEFAULT_FILTER_ORDER DEFAULT_FILTER_ORDER} can be used with a - * value of 1 (for -6dB/oct) or 2 (for -12dB/oct).

    - * - *

    {@link #ALC_DEFAULT_FILTER_ORDER DEFAULT_FILTER_ORDER} can also be used with {@link ALC10#alcGetIntegerv GetIntegerv} to find out the current default filter order.

    - */ -public final class EXTDefaultFilterOrder { - - /** {@code ALC_EXT_DEFAULT_FILTER_ORDER} tokens. */ - public static final int ALC_DEFAULT_FILTER_ORDER = 0x1100; - - private EXTDefaultFilterOrder() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTDisconnect.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTDisconnect.java deleted file mode 100644 index 4cb48da3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTDisconnect.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code ALC_EXT_disconnect} extension. - * - *

    In OpenAL, there is no way to know if a device has been lost, nor is there a spec-approved means to deal with this properly. While most people are - * using either PCI audio cards or a chip welded to their motherboard, there are many devices that are more dynamic in nature, such as USB and Firewire - * based-units. Such units may lose external power seperate from the system, or may have their cables unplugged at runtime. The OS may reassign the - * hardware to a higher-priority process. If nothing else, a user may unplug the hardware without a proper shutdown (or properly shut them down at the OS - * level and not within the application).

    - * - *

    Other audio "devices" may vanish, too, such as the network connection that hosts a remote audio device like esound, nas, or arts.

    - * - *

    In these cases, the OpenAL spec says nothing, which we must assume means that all resulting behaviour is totally undefined, including everything from - * continued function without audio output to a crash within the AL.

    - * - *

    This extension, ALC_EXT_disconnect, strives to define AL behaviour in these cases and give the application a means to discover and deal with total - * device failure.

    - * - *

    Device disconnect

    - * - *

    If a device is unplugged, lost or otherwise damaged beyond functioning, the device is flagged as "disconnected" and the ALCdevice handle is considered - * a "zombie" device.

    - * - *

    When a device is disconnected, the implementation will, in most respects, keep processing as normal. For example, even though there is no longer any - * output when a USB audio device is removed, setting and querying state on the Listener should keep functioning as expected.

    - * - *

    All sources in the {@link AL10#AL_PLAYING PLAYING} state will immediately progress to {@link AL10#AL_STOPPED STOPPED} upon disconnect of their containing device. Any source started after the - * disconnect will immediately progress to {@link AL10#AL_STOPPED STOPPED}. As in any stopped source, this also means that queued buffers all go to {@link AL10#AL_PROCESSED PROCESSED} as well. Sources - * that are in the {@link AL10#AL_PAUSED PAUSED} or {@link AL10#AL_INITIAL INITIAL} state do not change on disconnect, but will follow this behaviour if the application later tries to promote them to - * the {@link AL10#AL_PLAYING PLAYING} state.

    - * - *

    Zombie devices may not have new contexts created on them; {@link ALC10#alcCreateContext CreateContext} will fail, returning a {@code NULL} pointer, if the specified device has been - * disconnected.

    - * - *

    The application may determine if a device has been disconnected by using the {@link #ALC_CONNECTED CONNECTED} token with {@link ALC10#alcGetIntegerv GetIntegerv}. When a device has been - * disconnected, the application is permitted to close the zombie device's handle in the normal way, and may choose to open a new device.

    - * - *

    Applications that use {@link #ALC_CONNECTED CONNECTED} are encouraged to query it with relative frequency. A game, for example, should call it once per rendering frame, per - * device. A device may become disconnected at any time without warning.

    - * - *

    Once a device is disconnected, it will never become reconnected. Even if the user plugs the device back in, the application must close the existing - * zombie device handle and reopen it with {@code alc*OpenDevice()}.

    - * - *

    If device enumeration is available via ALC_ENUMERATION_EXT, ALC_ENUMERATE_ALL_EXT, or AL 1.1, the list of devices may change between calls as devices - * become disconnected and reconnected. To prevent race conditions, the pointer to device list strings provided to the application will remain valid until - * the next call to {@link ALC10#alcGetString GetString}. The implementation may either cache the result of the previous request or perform a complete device redetection - * during the {@link ALC10#alcGetString GetString} call. As such, enumeration may not be a "fast call" and should not be called in time-sensitive code. If capture devices - * are available via ALC_EXT_capture or AL 1.1, disconnection management can be used with both output and capture devices. A disconnected capture device - * will continue to function, but will not report a larger number in the {@link ALC11#ALC_CAPTURE_SAMPLES CAPTURE_SAMPLES} query. If the capture device had reported some number of - * samples were available but the samples were not transferred from the device to the AL at the time of disconnect, the AL should feed the application - * that amount of silence in the {@link ALC11#alcCaptureSamples CaptureSamples} call. Future queries of {@link ALC11#ALC_CAPTURE_SAMPLES CAPTURE_SAMPLES} should report zero samples available.

    - */ -public final class EXTDisconnect { - - /** {@code ALC_EXT_disconnect} tokens. */ - public static final int ALC_CONNECTED = 0x313; - - private EXTDisconnect() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTDouble.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTDouble.java deleted file mode 100644 index a7db63ff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTDouble.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_DOUBLE} extension. */ -public final class EXTDouble { - - /** Buffer formats. */ - public static final int - AL_FORMAT_MONO_DOUBLE_EXT = 0x10012, - AL_FORMAT_STEREO_DOUBLE_EXT = 0x10013; - - private EXTDouble() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTEfx.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTEfx.java deleted file mode 100644 index b59ce79e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTEfx.java +++ /dev/null @@ -1,1867 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the {@code ALC_EXT_EFX} extension. - * - *

    The Effects Extension is designed to provide a generic, cross-platform framework for adding advanced DSP effects to OpenAL.

    - */ -public class EXTEfx { - - /** ALC tokens. */ - public static final int - ALC_EFX_MAJOR_VERSION = 0x20001, - ALC_EFX_MINOR_VERSION = 0x20002, - ALC_MAX_AUXILIARY_SENDS = 0x20003; - - /** Listener properties. */ - public static final int AL_METERS_PER_UNIT = 0x20004; - - /** Source properties. */ - public static final int - AL_DIRECT_FILTER = 0x20005, - AL_AUXILIARY_SEND_FILTER = 0x20006, - AL_AIR_ABSORPTION_FACTOR = 0x20007, - AL_ROOM_ROLLOFF_FACTOR = 0x20008, - AL_CONE_OUTER_GAINHF = 0x20009, - AL_DIRECT_FILTER_GAINHF_AUTO = 0x2000A, - AL_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x2000B, - AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x2000C; - - /** Auxiliary effect slot properties. */ - public static final int - AL_EFFECTSLOT_NULL = 0x0, - AL_EFFECTSLOT_EFFECT = 0x1, - AL_EFFECTSLOT_GAIN = 0x2, - AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = 0x3; - - /** Reverb effect parameters. */ - public static final int - AL_REVERB_DENSITY = 0x1, - AL_REVERB_DIFFUSION = 0x2, - AL_REVERB_GAIN = 0x3, - AL_REVERB_GAINHF = 0x4, - AL_REVERB_DECAY_TIME = 0x5, - AL_REVERB_DECAY_HFRATIO = 0x6, - AL_REVERB_REFLECTIONS_GAIN = 0x7, - AL_REVERB_REFLECTIONS_DELAY = 0x8, - AL_REVERB_LATE_REVERB_GAIN = 0x9, - AL_REVERB_LATE_REVERB_DELAY = 0xA, - AL_REVERB_AIR_ABSORPTION_GAINHF = 0xB, - AL_REVERB_ROOM_ROLLOFF_FACTOR = 0xC, - AL_REVERB_DECAY_HFLIMIT = 0xD; - - /** EAX Reverb effect parameters. */ - public static final int - AL_EAXREVERB_DENSITY = 0x1, - AL_EAXREVERB_DIFFUSION = 0x2, - AL_EAXREVERB_GAIN = 0x3, - AL_EAXREVERB_GAINHF = 0x4, - AL_EAXREVERB_GAINLF = 0x5, - AL_EAXREVERB_DECAY_TIME = 0x6, - AL_EAXREVERB_DECAY_HFRATIO = 0x7, - AL_EAXREVERB_DECAY_LFRATIO = 0x8, - AL_EAXREVERB_REFLECTIONS_GAIN = 0x9, - AL_EAXREVERB_REFLECTIONS_DELAY = 0xA, - AL_EAXREVERB_REFLECTIONS_PAN = 0xB, - AL_EAXREVERB_LATE_REVERB_GAIN = 0xC, - AL_EAXREVERB_LATE_REVERB_DELAY = 0xD, - AL_EAXREVERB_LATE_REVERB_PAN = 0xE, - AL_EAXREVERB_ECHO_TIME = 0xF, - AL_EAXREVERB_ECHO_DEPTH = 0x10, - AL_EAXREVERB_MODULATION_TIME = 0x11, - AL_EAXREVERB_MODULATION_DEPTH = 0x12, - AL_EAXREVERB_AIR_ABSORPTION_GAINHF = 0x13, - AL_EAXREVERB_HFREFERENCE = 0x14, - AL_EAXREVERB_LFREFERENCE = 0x15, - AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = 0x16, - AL_EAXREVERB_DECAY_HFLIMIT = 0x17; - - /** Chorus effect parameters. */ - public static final int - AL_CHORUS_WAVEFORM = 0x1, - AL_CHORUS_PHASE = 0x2, - AL_CHORUS_RATE = 0x3, - AL_CHORUS_DEPTH = 0x4, - AL_CHORUS_FEEDBACK = 0x5, - AL_CHORUS_DELAY = 0x6; - - /** Distortion effect parameters. */ - public static final int - AL_DISTORTION_EDGE = 0x1, - AL_DISTORTION_GAIN = 0x2, - AL_DISTORTION_LOWPASS_CUTOFF = 0x3, - AL_DISTORTION_EQCENTER = 0x4, - AL_DISTORTION_EQBANDWIDTH = 0x5; - - /** Echo effect parameters. */ - public static final int - AL_ECHO_DELAY = 0x1, - AL_ECHO_LRDELAY = 0x2, - AL_ECHO_DAMPING = 0x3, - AL_ECHO_FEEDBACK = 0x4, - AL_ECHO_SPREAD = 0x5; - - /** Flanger effect parameters. */ - public static final int - AL_FLANGER_WAVEFORM = 0x1, - AL_FLANGER_PHASE = 0x2, - AL_FLANGER_RATE = 0x3, - AL_FLANGER_DEPTH = 0x4, - AL_FLANGER_FEEDBACK = 0x5, - AL_FLANGER_DELAY = 0x6; - - /** Frequency shifter effect parameters. */ - public static final int - AL_FREQUENCY_SHIFTER_FREQUENCY = 0x1, - AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = 0x2, - AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = 0x3; - - /** Vocal morpher effect parameters. */ - public static final int - AL_VOCMORPHER_PHONEMEA = 0x1, - AL_VOCMORPHER_PHONEMEA_COARSE_TUNING = 0x2, - AL_VOCMORPHER_PHONEMEB = 0x3, - AL_VOCMORPHER_PHONEMEB_COARSE_TUNING = 0x4, - AL_VOCMORPHER_WAVEFORM = 0x5, - AL_VOCMORPHER_RATE = 0x6; - - /** Pitch shifter effect parameters. */ - public static final int - AL_PITCH_SHIFTER_COARSE_TUNE = 0x1, - AL_PITCH_SHIFTER_FINE_TUNE = 0x2; - - /** Ring modulator effect parameters. */ - public static final int - AL_RING_MODULATOR_FREQUENCY = 0x1, - AL_RING_MODULATOR_HIGHPASS_CUTOFF = 0x2, - AL_RING_MODULATOR_WAVEFORM = 0x3; - - /** Autowah effect parameters. */ - public static final int - AL_AUTOWAH_ATTACK_TIME = 0x1, - AL_AUTOWAH_RELEASE_TIME = 0x2, - AL_AUTOWAH_RESONANCE = 0x3, - AL_AUTOWAH_PEAK_GAIN = 0x4; - - /** Compressor effect parameters. */ - public static final int AL_COMPRESSOR_ONOFF = 0x1; - - /** Equalizer effect parameters. */ - public static final int - AL_EQUALIZER_LOW_GAIN = 0x1, - AL_EQUALIZER_LOW_CUTOFF = 0x2, - AL_EQUALIZER_MID1_GAIN = 0x3, - AL_EQUALIZER_MID1_CENTER = 0x4, - AL_EQUALIZER_MID1_WIDTH = 0x5, - AL_EQUALIZER_MID2_GAIN = 0x6, - AL_EQUALIZER_MID2_CENTER = 0x7, - AL_EQUALIZER_MID2_WIDTH = 0x8, - AL_EQUALIZER_HIGH_GAIN = 0x9, - AL_EQUALIZER_HIGH_CUTOFF = 0xA; - - /** Effect type effect parameters. */ - public static final int - AL_EFFECT_FIRST_PARAMETER = 0x0, - AL_EFFECT_LAST_PARAMETER = 0x8000, - AL_EFFECT_TYPE = 0x8001; - - /** Effect types */ - public static final int - AL_EFFECT_NULL = 0x0, - AL_EFFECT_REVERB = 0x1, - AL_EFFECT_CHORUS = 0x2, - AL_EFFECT_DISTORTION = 0x3, - AL_EFFECT_ECHO = 0x4, - AL_EFFECT_FLANGER = 0x5, - AL_EFFECT_FREQUENCY_SHIFTER = 0x6, - AL_EFFECT_VOCAL_MORPHER = 0x7, - AL_EFFECT_PITCH_SHIFTER = 0x8, - AL_EFFECT_RING_MODULATOR = 0x9, - AL_EFFECT_AUTOWAH = 0xA, - AL_EFFECT_COMPRESSOR = 0xB, - AL_EFFECT_EQUALIZER = 0xC, - AL_EFFECT_EAXREVERB = 0x8000; - - /** Lowpass filter properties */ - public static final int - AL_LOWPASS_GAIN = 0x1, - AL_LOWPASS_GAINHF = 0x2; - - /** Highpass filter properties */ - public static final int - AL_HIGHPASS_GAIN = 0x1, - AL_HIGHPASS_GAINLF = 0x2; - - /** Bandpass filter properties */ - public static final int - AL_BANDPASS_GAIN = 0x1, - AL_BANDPASS_GAINLF = 0x2, - AL_BANDPASS_GAINHF = 0x3; - - /** Filter type */ - public static final int - AL_FILTER_FIRST_PARAMETER = 0x0, - AL_FILTER_LAST_PARAMETER = 0x8000, - AL_FILTER_TYPE = 0x8001; - - /** Filter types. */ - public static final int - AL_FILTER_NULL = 0x0, - AL_FILTER_LOWPASS = 0x1, - AL_FILTER_HIGHPASS = 0x2, - AL_FILTER_BANDPASS = 0x3; - - /** Source property value ranges and defaults */ - public static final float - AL_MIN_AIR_ABSORPTION_FACTOR = 0.0f, - AL_MAX_AIR_ABSORPTION_FACTOR = 10.0f, - AL_DEFAULT_AIR_ABSORPTION_FACTOR = 0.0f, - AL_MIN_ROOM_ROLLOFF_FACTOR = 0.0f, - AL_MAX_ROOM_ROLLOFF_FACTOR = 10.0f, - AL_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f, - AL_MIN_CONE_OUTER_GAINHF = 0.0f, - AL_MAX_CONE_OUTER_GAINHF = 1.0f, - AL_DEFAULT_CONE_OUTER_GAINHF = 1.0f; - - /** Source property value ranges and defaults */ - public static final int - AL_MIN_DIRECT_FILTER_GAINHF_AUTO = 0x0, - AL_MAX_DIRECT_FILTER_GAINHF_AUTO = 0x1, - AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO = 0x1, - AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x0, - AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x1, - AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x1, - AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x0, - AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x1, - AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x1; - - /** Listener property value ranges and defaults. */ - public static final float - AL_MIN_METERS_PER_UNIT = 0x0.000002P-126f, - AL_MAX_METERS_PER_UNIT = 0x1.fffffeP+127f, - AL_DEFAULT_METERS_PER_UNIT = 1.0f; - - /** Reverb effect parameter ranges and defaults */ - public static final float - AL_REVERB_MIN_DENSITY = 0.0f, - AL_REVERB_MAX_DENSITY = 1.0f, - AL_REVERB_DEFAULT_DENSITY = 1.0f, - AL_REVERB_MIN_DIFFUSION = 0.0f, - AL_REVERB_MAX_DIFFUSION = 1.0f, - AL_REVERB_DEFAULT_DIFFUSION = 1.0f, - AL_REVERB_MIN_GAIN = 0.0f, - AL_REVERB_MAX_GAIN = 1.0f, - AL_REVERB_DEFAULT_GAIN = 0.32f, - AL_REVERB_MIN_GAINHF = 0.0f, - AL_REVERB_MAX_GAINHF = 1.0f, - AL_REVERB_DEFAULT_GAINHF = 0.89f, - AL_REVERB_MIN_DECAY_TIME = 0.1f, - AL_REVERB_MAX_DECAY_TIME = 20.0f, - AL_REVERB_DEFAULT_DECAY_TIME = 1.49f, - AL_REVERB_MIN_DECAY_HFRATIO = 0.1f, - AL_REVERB_MAX_DECAY_HFRATIO = 2.0f, - AL_REVERB_DEFAULT_DECAY_HFRATIO = 0.83f, - AL_REVERB_MIN_REFLECTIONS_GAIN = 0.0f, - AL_REVERB_MAX_REFLECTIONS_GAIN = 3.16f, - AL_REVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f, - AL_REVERB_MIN_REFLECTIONS_DELAY = 0.0f, - AL_REVERB_MAX_REFLECTIONS_DELAY = 0.3f, - AL_REVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f, - AL_REVERB_MIN_LATE_REVERB_GAIN = 0.0f, - AL_REVERB_MAX_LATE_REVERB_GAIN = 10.0f, - AL_REVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f, - AL_REVERB_MIN_LATE_REVERB_DELAY = 0.0f, - AL_REVERB_MAX_LATE_REVERB_DELAY = 0.1f, - AL_REVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f, - AL_REVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f, - AL_REVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f, - AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f, - AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f, - AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f, - AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; - - /** Reverb effect parameter ranges and defaults */ - public static final int - AL_REVERB_MIN_DECAY_HFLIMIT = 0x0, - AL_REVERB_MAX_DECAY_HFLIMIT = 0x1, - AL_REVERB_DEFAULT_DECAY_HFLIMIT = 0x1; - - /** EAX reverb effect parameter ranges and defaults */ - public static final float - AL_EAXREVERB_MIN_DENSITY = 0.0f, - AL_EAXREVERB_MAX_DENSITY = 1.0f, - AL_EAXREVERB_DEFAULT_DENSITY = 1.0f, - AL_EAXREVERB_MIN_DIFFUSION = 0.0f, - AL_EAXREVERB_MAX_DIFFUSION = 1.0f, - AL_EAXREVERB_DEFAULT_DIFFUSION = 1.0f, - AL_EAXREVERB_MIN_GAIN = 0.0f, - AL_EAXREVERB_MAX_GAIN = 1.0f, - AL_EAXREVERB_DEFAULT_GAIN = 0.32f, - AL_EAXREVERB_MIN_GAINHF = 0.0f, - AL_EAXREVERB_MAX_GAINHF = 1.0f, - AL_EAXREVERB_DEFAULT_GAINHF = 0.89f, - AL_EAXREVERB_MIN_GAINLF = 0.0f, - AL_EAXREVERB_MAX_GAINLF = 1.0f, - AL_EAXREVERB_DEFAULT_GAINLF = 1.0f, - AL_EAXREVERB_MIN_DECAY_TIME = 0.1f, - AL_EAXREVERB_MAX_DECAY_TIME = 20.0f, - AL_EAXREVERB_DEFAULT_DECAY_TIME = 1.49f, - AL_EAXREVERB_MIN_DECAY_HFRATIO = 0.1f, - AL_EAXREVERB_MAX_DECAY_HFRATIO = 2.0f, - AL_EAXREVERB_DEFAULT_DECAY_HFRATIO = 0.83f, - AL_EAXREVERB_MIN_DECAY_LFRATIO = 0.1f, - AL_EAXREVERB_MAX_DECAY_LFRATIO = 2.0f, - AL_EAXREVERB_DEFAULT_DECAY_LFRATIO = 1.0f, - AL_EAXREVERB_MIN_REFLECTIONS_GAIN = 0.0f, - AL_EAXREVERB_MAX_REFLECTIONS_GAIN = 3.16f, - AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f, - AL_EAXREVERB_MIN_REFLECTIONS_DELAY = 0.0f, - AL_EAXREVERB_MAX_REFLECTIONS_DELAY = 0.3f, - AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f, - AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ = 0.0f, - AL_EAXREVERB_MIN_LATE_REVERB_GAIN = 0.0f, - AL_EAXREVERB_MAX_LATE_REVERB_GAIN = 10.0f, - AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f, - AL_EAXREVERB_MIN_LATE_REVERB_DELAY = 0.0f, - AL_EAXREVERB_MAX_LATE_REVERB_DELAY = 0.1f, - AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f, - AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ = 0.0f, - AL_EAXREVERB_MIN_ECHO_TIME = 0.075f, - AL_EAXREVERB_MAX_ECHO_TIME = 0.25f, - AL_EAXREVERB_DEFAULT_ECHO_TIME = 0.25f, - AL_EAXREVERB_MIN_ECHO_DEPTH = 0.0f, - AL_EAXREVERB_MAX_ECHO_DEPTH = 1.0f, - AL_EAXREVERB_DEFAULT_ECHO_DEPTH = 0.0f, - AL_EAXREVERB_MIN_MODULATION_TIME = 0.04f, - AL_EAXREVERB_MAX_MODULATION_TIME = 4.0f, - AL_EAXREVERB_DEFAULT_MODULATION_TIME = 0.25f, - AL_EAXREVERB_MIN_MODULATION_DEPTH = 0.0f, - AL_EAXREVERB_MAX_MODULATION_DEPTH = 1.0f, - AL_EAXREVERB_DEFAULT_MODULATION_DEPTH = 0.0f, - AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f, - AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f, - AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f, - AL_EAXREVERB_MIN_HFREFERENCE = 1000.0f, - AL_EAXREVERB_MAX_HFREFERENCE = 20000.0f, - AL_EAXREVERB_DEFAULT_HFREFERENCE = 5000.0f, - AL_EAXREVERB_MIN_LFREFERENCE = 20.0f, - AL_EAXREVERB_MAX_LFREFERENCE = 1000.0f, - AL_EAXREVERB_DEFAULT_LFREFERENCE = 250.0f, - AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f, - AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f, - AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; - - /** EAX reverb effect parameter ranges and defaults */ - public static final int - AL_EAXREVERB_MIN_DECAY_HFLIMIT = 0x0, - AL_EAXREVERB_MAX_DECAY_HFLIMIT = 0x1, - AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT = 0x1; - - /** Chorus effect parameter ranges and defaults */ - public static final int - AL_CHORUS_WAVEFORM_SINUSOID = 0, - AL_CHORUS_WAVEFORM_TRIANGLE = 1, - AL_CHORUS_MIN_WAVEFORM = 0, - AL_CHORUS_MAX_WAVEFORM = 1, - AL_CHORUS_DEFAULT_WAVEFORM = 1, - AL_CHORUS_MIN_PHASE = -180, - AL_CHORUS_MAX_PHASE = 180, - AL_CHORUS_DEFAULT_PHASE = 90; - - /** Chorus effect parameter ranges and defaults */ - public static final float - AL_CHORUS_MIN_RATE = 0.0f, - AL_CHORUS_MAX_RATE = 10.0f, - AL_CHORUS_DEFAULT_RATE = 1.1f, - AL_CHORUS_MIN_DEPTH = 0.0f, - AL_CHORUS_MAX_DEPTH = 1.0f, - AL_CHORUS_DEFAULT_DEPTH = 0.1f, - AL_CHORUS_MIN_FEEDBACK = -1.0f, - AL_CHORUS_MAX_FEEDBACK = 1.0f, - AL_CHORUS_DEFAULT_FEEDBACK = 0.25f, - AL_CHORUS_MIN_DELAY = 0.0f, - AL_CHORUS_MAX_DELAY = 0.016f, - AL_CHORUS_DEFAULT_DELAY = 0.016f; - - /** Distortion effect parameter ranges and defaults */ - public static final float - AL_DISTORTION_MIN_EDGE = 0.0f, - AL_DISTORTION_MAX_EDGE = 1.0f, - AL_DISTORTION_DEFAULT_EDGE = 0.2f, - AL_DISTORTION_MIN_GAIN = 0.01f, - AL_DISTORTION_MAX_GAIN = 1.0f, - AL_DISTORTION_DEFAULT_GAIN = 0.05f, - AL_DISTORTION_MIN_LOWPASS_CUTOFF = 80.0f, - AL_DISTORTION_MAX_LOWPASS_CUTOFF = 24000.0f, - AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF = 8000.0f, - AL_DISTORTION_MIN_EQCENTER = 80.0f, - AL_DISTORTION_MAX_EQCENTER = 24000.0f, - AL_DISTORTION_DEFAULT_EQCENTER = 3600.0f, - AL_DISTORTION_MIN_EQBANDWIDTH = 80.0f, - AL_DISTORTION_MAX_EQBANDWIDTH = 24000.0f, - AL_DISTORTION_DEFAULT_EQBANDWIDTH = 3600.0f; - - /** Echo effect parameter ranges and defaults */ - public static final float - AL_ECHO_MIN_DELAY = 0.0f, - AL_ECHO_MAX_DELAY = 0.207f, - AL_ECHO_DEFAULT_DELAY = 0.1f, - AL_ECHO_MIN_LRDELAY = 0.0f, - AL_ECHO_MAX_LRDELAY = 0.404f, - AL_ECHO_DEFAULT_LRDELAY = 0.1f, - AL_ECHO_MIN_DAMPING = 0.0f, - AL_ECHO_MAX_DAMPING = 0.99f, - AL_ECHO_DEFAULT_DAMPING = 0.5f, - AL_ECHO_MIN_FEEDBACK = 0.0f, - AL_ECHO_MAX_FEEDBACK = 1.0f, - AL_ECHO_DEFAULT_FEEDBACK = 0.5f, - AL_ECHO_MIN_SPREAD = -1.0f, - AL_ECHO_MAX_SPREAD = 1.0f, - AL_ECHO_DEFAULT_SPREAD = -1.0f; - - /** Flanger effect parameter ranges and defaults */ - public static final int - AL_FLANGER_WAVEFORM_SINUSOID = 0, - AL_FLANGER_WAVEFORM_TRIANGLE = 1, - AL_FLANGER_MIN_WAVEFORM = 0, - AL_FLANGER_MAX_WAVEFORM = 1, - AL_FLANGER_DEFAULT_WAVEFORM = 1, - AL_FLANGER_MIN_PHASE = -180, - AL_FLANGER_MAX_PHASE = 180, - AL_FLANGER_DEFAULT_PHASE = 0; - - /** Flanger effect parameter ranges and defaults */ - public static final float - AL_FLANGER_MIN_RATE = 0.0f, - AL_FLANGER_MAX_RATE = 10.0f, - AL_FLANGER_DEFAULT_RATE = 0.27f, - AL_FLANGER_MIN_DEPTH = 0.0f, - AL_FLANGER_MAX_DEPTH = 1.0f, - AL_FLANGER_DEFAULT_DEPTH = 1.0f, - AL_FLANGER_MIN_FEEDBACK = -1.0f, - AL_FLANGER_MAX_FEEDBACK = 1.0f, - AL_FLANGER_DEFAULT_FEEDBACK = -0.5f, - AL_FLANGER_MIN_DELAY = 0.0f, - AL_FLANGER_MAX_DELAY = 0.004f, - AL_FLANGER_DEFAULT_DELAY = 0.002f; - - /** Frequency shifter effect parameter ranges and defaults */ - public static final float - AL_FREQUENCY_SHIFTER_MIN_FREQUENCY = 0.0f, - AL_FREQUENCY_SHIFTER_MAX_FREQUENCY = 24000.0f, - AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY = 0.0f; - - /** Frequency shifter effect parameter ranges and defaults */ - public static final int - AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION = 0, - AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION = 2, - AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION = 0, - AL_FREQUENCY_SHIFTER_DIRECTION_DOWN = 0, - AL_FREQUENCY_SHIFTER_DIRECTION_UP = 1, - AL_FREQUENCY_SHIFTER_DIRECTION_OFF = 2, - AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION = 0, - AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION = 2, - AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION = 0; - - /** Vocal morpher effect parameter ranges and defaults */ - public static final int - AL_VOCAL_MORPHER_MIN_PHONEMEA = 0, - AL_VOCAL_MORPHER_MAX_PHONEMEA = 29, - AL_VOCAL_MORPHER_DEFAULT_PHONEMEA = 0, - AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING = -24, - AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING = 24, - AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING = 0, - AL_VOCAL_MORPHER_MIN_PHONEMEB = 0, - AL_VOCAL_MORPHER_MAX_PHONEMEB = 29, - AL_VOCAL_MORPHER_DEFAULT_PHONEMEB = 10, - AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING = -24, - AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING = 24, - AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING = 0, - AL_VOCAL_MORPHER_PHONEME_A = 0, - AL_VOCAL_MORPHER_PHONEME_E = 1, - AL_VOCAL_MORPHER_PHONEME_I = 2, - AL_VOCAL_MORPHER_PHONEME_O = 3, - AL_VOCAL_MORPHER_PHONEME_U = 4, - AL_VOCAL_MORPHER_PHONEME_AA = 5, - AL_VOCAL_MORPHER_PHONEME_AE = 6, - AL_VOCAL_MORPHER_PHONEME_AH = 7, - AL_VOCAL_MORPHER_PHONEME_AO = 8, - AL_VOCAL_MORPHER_PHONEME_EH = 9, - AL_VOCAL_MORPHER_PHONEME_ER = 10, - AL_VOCAL_MORPHER_PHONEME_IH = 11, - AL_VOCAL_MORPHER_PHONEME_IY = 12, - AL_VOCAL_MORPHER_PHONEME_UH = 13, - AL_VOCAL_MORPHER_PHONEME_UW = 14, - AL_VOCAL_MORPHER_PHONEME_B = 15, - AL_VOCAL_MORPHER_PHONEME_D = 16, - AL_VOCAL_MORPHER_PHONEME_F = 17, - AL_VOCAL_MORPHER_PHONEME_G = 18, - AL_VOCAL_MORPHER_PHONEME_J = 19, - AL_VOCAL_MORPHER_PHONEME_K = 20, - AL_VOCAL_MORPHER_PHONEME_L = 21, - AL_VOCAL_MORPHER_PHONEME_M = 22, - AL_VOCAL_MORPHER_PHONEME_N = 23, - AL_VOCAL_MORPHER_PHONEME_P = 24, - AL_VOCAL_MORPHER_PHONEME_R = 25, - AL_VOCAL_MORPHER_PHONEME_S = 26, - AL_VOCAL_MORPHER_PHONEME_T = 27, - AL_VOCAL_MORPHER_PHONEME_V = 28, - AL_VOCAL_MORPHER_PHONEME_Z = 29, - AL_VOCAL_MORPHER_WAVEFORM_SINUSOID = 0, - AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE = 1, - AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH = 2, - AL_VOCAL_MORPHER_MIN_WAVEFORM = 0, - AL_VOCAL_MORPHER_MAX_WAVEFORM = 2, - AL_VOCAL_MORPHER_DEFAULT_WAVEFORM = 0; - - /** Vocal morpher effect parameter ranges and defaults */ - public static final float - AL_VOCAL_MORPHER_MIN_RATE = 0.0f, - AL_VOCAL_MORPHER_MAX_RATE = 10.0f, - AL_VOCAL_MORPHER_DEFAULT_RATE = 1.41f; - - /** Pitch shifter effect parameter ranges and defaults */ - public static final int - AL_PITCH_SHIFTER_MIN_COARSE_TUNE = -12, - AL_PITCH_SHIFTER_MAX_COARSE_TUNE = 12, - AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE = 12, - AL_PITCH_SHIFTER_MIN_FINE_TUNE = -50, - AL_PITCH_SHIFTER_MAX_FINE_TUNE = 50, - AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE = 0; - - /** Ring modulator effect parameter ranges and defaults */ - public static final float - AL_RING_MODULATOR_MIN_FREQUENCY = 0.0f, - AL_RING_MODULATOR_MAX_FREQUENCY = 8000.0f, - AL_RING_MODULATOR_DEFAULT_FREQUENCY = 440.0f, - AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = 0.0f, - AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = 24000.0f, - AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF = 800.0f; - - /** Ring modulator effect parameter ranges and defaults */ - public static final int - AL_RING_MODULATOR_SINUSOID = 0, - AL_RING_MODULATOR_SAWTOOTH = 1, - AL_RING_MODULATOR_SQUARE = 2, - AL_RING_MODULATOR_MIN_WAVEFORM = 0, - AL_RING_MODULATOR_MAX_WAVEFORM = 2, - AL_RING_MODULATOR_DEFAULT_WAVEFORM = 0; - - /** Autowah effect parameter ranges and defaults */ - public static final float - AL_AUTOWAH_MIN_ATTACK_TIME = 1.0E-4f, - AL_AUTOWAH_MAX_ATTACK_TIME = 1.0f, - AL_AUTOWAH_DEFAULT_ATTACK_TIME = 0.06f, - AL_AUTOWAH_MIN_RELEASE_TIME = 1.0E-4f, - AL_AUTOWAH_MAX_RELEASE_TIME = 1.0f, - AL_AUTOWAH_DEFAULT_RELEASE_TIME = 0.06f, - AL_AUTOWAH_MIN_RESONANCE = 2.0f, - AL_AUTOWAH_MAX_RESONANCE = 1000.0f, - AL_AUTOWAH_DEFAULT_RESONANCE = 1000.0f, - AL_AUTOWAH_MIN_PEAK_GAIN = 3.0E-5f, - AL_AUTOWAH_MAX_PEAK_GAIN = 31621.0f, - AL_AUTOWAH_DEFAULT_PEAK_GAIN = 11.22f; - - /** Compressor effect parameter ranges and defaults */ - public static final int - AL_COMPRESSOR_MIN_ONOFF = 0, - AL_COMPRESSOR_MAX_ONOFF = 1, - AL_COMPRESSOR_DEFAULT_ONOFF = 1; - - /** Equalizer effect parameter ranges and defaults */ - public static final float - AL_EQUALIZER_MIN_LOW_GAIN = 0.126f, - AL_EQUALIZER_MAX_LOW_GAIN = 7.943f, - AL_EQUALIZER_DEFAULT_LOW_GAIN = 1.0f, - AL_EQUALIZER_MIN_LOW_CUTOFF = 50.0f, - AL_EQUALIZER_MAX_LOW_CUTOFF = 800.0f, - AL_EQUALIZER_DEFAULT_LOW_CUTOFF = 200.0f, - AL_EQUALIZER_MIN_MID1_GAIN = 0.126f, - AL_EQUALIZER_MAX_MID1_GAIN = 7.943f, - AL_EQUALIZER_DEFAULT_MID1_GAIN = 1.0f, - AL_EQUALIZER_MIN_MID1_CENTER = 200.0f, - AL_EQUALIZER_MAX_MID1_CENTER = 3000.0f, - AL_EQUALIZER_DEFAULT_MID1_CENTER = 500.0f, - AL_EQUALIZER_MIN_MID1_WIDTH = 0.01f, - AL_EQUALIZER_MAX_MID1_WIDTH = 1.0f, - AL_EQUALIZER_DEFAULT_MID1_WIDTH = 1.0f, - AL_EQUALIZER_MIN_MID2_GAIN = 0.126f, - AL_EQUALIZER_MAX_MID2_GAIN = 7.943f, - AL_EQUALIZER_DEFAULT_MID2_GAIN = 1.0f, - AL_EQUALIZER_MIN_MID2_CENTER = 1000.0f, - AL_EQUALIZER_MAX_MID2_CENTER = 8000.0f, - AL_EQUALIZER_DEFAULT_MID2_CENTER = 3000.0f, - AL_EQUALIZER_MIN_MID2_WIDTH = 0.01f, - AL_EQUALIZER_MAX_MID2_WIDTH = 1.0f, - AL_EQUALIZER_DEFAULT_MID2_WIDTH = 1.0f, - AL_EQUALIZER_MIN_HIGH_GAIN = 0.126f, - AL_EQUALIZER_MAX_HIGH_GAIN = 7.943f, - AL_EQUALIZER_DEFAULT_HIGH_GAIN = 1.0f, - AL_EQUALIZER_MIN_HIGH_CUTOFF = 4000.0f, - AL_EQUALIZER_MAX_HIGH_CUTOFF = 16000.0f, - AL_EQUALIZER_DEFAULT_HIGH_CUTOFF = 6000.0f; - - /** Lowpass filter parameter ranges and defaults */ - public static final float - AL_LOWPASS_MIN_GAIN = 0.0f, - AL_LOWPASS_MAX_GAIN = 1.0f, - AL_LOWPASS_DEFAULT_GAIN = 1.0f, - AL_LOWPASS_MIN_GAINHF = 0.0f, - AL_LOWPASS_MAX_GAINHF = 1.0f, - AL_LOWPASS_DEFAULT_GAINHF = 1.0f; - - /** Highpass filter parameter ranges and defaults */ - public static final float - AL_HIGHPASS_MIN_GAIN = 0.0f, - AL_HIGHPASS_MAX_GAIN = 1.0f, - AL_HIGHPASS_DEFAULT_GAIN = 1.0f, - AL_HIGHPASS_MIN_GAINLF = 0.0f, - AL_HIGHPASS_MAX_GAINLF = 1.0f, - AL_HIGHPASS_DEFAULT_GAINLF = 1.0f; - - /** Bandpass filter parameter ranges and defaults */ - public static final float - AL_BANDPASS_MIN_GAIN = 0.0f, - AL_BANDPASS_MAX_GAIN = 1.0f, - AL_BANDPASS_DEFAULT_GAIN = 1.0f, - AL_BANDPASS_MIN_GAINHF = 0.0f, - AL_BANDPASS_MAX_GAINHF = 1.0f, - AL_BANDPASS_DEFAULT_GAINHF = 1.0f, - AL_BANDPASS_MIN_GAINLF = 0.0f, - AL_BANDPASS_MAX_GAINLF = 1.0f, - AL_BANDPASS_DEFAULT_GAINLF = 1.0f; - - protected EXTEfx() { - throw new UnsupportedOperationException(); - } - - // --- [ alGenEffects ] --- - - /** - * Unsafe version of: {@link #alGenEffects GenEffects} - * - * @param n the number of effects be to generated - */ - public static void nalGenEffects(int n, long effects) { - long __functionAddress = AL.getICD().alGenEffects; - if (CHECKS) { - check(__functionAddress); - } - invokePV(n, effects, __functionAddress); - } - - /** - * Requests a number of effects. - * - * @param effects the buffer that will receive the effects - */ - @NativeType("ALvoid") - public static void alGenEffects(@NativeType("ALuint *") IntBuffer effects) { - nalGenEffects(effects.remaining(), memAddress(effects)); - } - - /** Requests a number of effects. */ - @NativeType("ALvoid") - public static int alGenEffects() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer effects = stack.callocInt(1); - nalGenEffects(1, memAddress(effects)); - return effects.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alDeleteEffects ] --- - - /** - * Unsafe version of: {@link #alDeleteEffects DeleteEffects} - * - * @param n the number of effects be to deleted - */ - public static void nalDeleteEffects(int n, long effects) { - long __functionAddress = AL.getICD().alDeleteEffects; - if (CHECKS) { - check(__functionAddress); - } - invokePV(n, effects, __functionAddress); - } - - /** - * Deletes a number of effects. - * - * @param effects the effect to delete - */ - @NativeType("ALvoid") - public static void alDeleteEffects(@NativeType("ALuint *") IntBuffer effects) { - nalDeleteEffects(effects.remaining(), memAddress(effects)); - } - - /** Deletes a number of effects. */ - @NativeType("ALvoid") - public static void alDeleteEffects(@NativeType("ALuint *") int effect) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer effects = stack.ints(effect); - nalDeleteEffects(1, memAddress(effects)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alIsEffect ] --- - - /** - * Verifies whether the given object name is an effect. - * - * @param effect a value that may be a effect name - */ - @NativeType("ALboolean") - public static boolean alIsEffect(@NativeType("ALuint") int effect) { - long __functionAddress = AL.getICD().alIsEffect; - if (CHECKS) { - check(__functionAddress); - } - return invokeZ(effect, __functionAddress); - } - - // --- [ alEffecti ] --- - - /** - * Sets the integer value of an effect parameter. - * - * @param effect the effect to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alEffecti(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALint") int value) { - long __functionAddress = AL.getICD().alEffecti; - if (CHECKS) { - check(__functionAddress); - } - invokeV(effect, param, value, __functionAddress); - } - - // --- [ alEffectiv ] --- - - /** Unsafe version of: {@link #alEffectiv Effectiv} */ - public static void nalEffectiv(int effect, int param, long values) { - long __functionAddress = AL.getICD().alEffectiv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effect, param, values, __functionAddress); - } - - /** - * Pointer version of {@link #alEffecti Effecti}. - * - * @param effect the effect to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alEffectiv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALint const *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalEffectiv(effect, param, memAddress(values)); - } - - // --- [ alEffectf ] --- - - /** - * Sets the float value of an effect parameter. - * - * @param effect the effect to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alEffectf(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALfloat") float value) { - long __functionAddress = AL.getICD().alEffectf; - if (CHECKS) { - check(__functionAddress); - } - invokeV(effect, param, value, __functionAddress); - } - - // --- [ alEffectfv ] --- - - /** Unsafe version of: {@link #alEffectfv Effectfv} */ - public static void nalEffectfv(int effect, int param, long values) { - long __functionAddress = AL.getICD().alEffectfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effect, param, values, __functionAddress); - } - - /** - * Pointer version of {@link #alEffectf Effectf}. - * - * @param effect the effect to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alEffectfv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALfloat const *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalEffectfv(effect, param, memAddress(values)); - } - - // --- [ alGetEffecti ] --- - - /** Unsafe version of: {@link #alGetEffecti GetEffecti} */ - public static void nalGetEffecti(int effect, int param, long value) { - long __functionAddress = AL.getICD().alGetEffecti; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effect, param, value, __functionAddress); - } - - /** - * Returns the integer value of the specified effect parameter. - * - * @param effect the effect to query - * @param param the parameter to query - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetEffecti(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetEffecti(effect, param, memAddress(value)); - } - - /** - * Returns the integer value of the specified effect parameter. - * - * @param effect the effect to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static int alGetEffecti(@NativeType("ALuint") int effect, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nalGetEffecti(effect, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetEffectiv ] --- - - /** Unsafe version of: {@link #alGetEffectiv GetEffectiv} */ - public static void nalGetEffectiv(int effect, int param, long values) { - long __functionAddress = AL.getICD().alGetEffectiv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effect, param, values, __functionAddress); - } - - /** - * Returns the integer values of the specified effect parameter. - * - * @param effect the effect to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetEffectiv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetEffectiv(effect, param, memAddress(values)); - } - - // --- [ alGetEffectf ] --- - - /** Unsafe version of: {@link #alGetEffectf GetEffectf} */ - public static void nalGetEffectf(int effect, int param, long value) { - long __functionAddress = AL.getICD().alGetEffectf; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effect, param, value, __functionAddress); - } - - /** - * Returns the float value of the specified effect parameter. - * - * @param effect the effect to query - * @param param the parameter to query - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetEffectf(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetEffectf(effect, param, memAddress(value)); - } - - /** - * Returns the float value of the specified effect parameter. - * - * @param effect the effect to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static float alGetEffectf(@NativeType("ALuint") int effect, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nalGetEffectf(effect, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetEffectfv ] --- - - /** Unsafe version of: {@link #alGetEffectfv GetEffectfv} */ - public static void nalGetEffectfv(int effect, int param, long values) { - long __functionAddress = AL.getICD().alGetEffectfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effect, param, values, __functionAddress); - } - - /** - * Returns the float values of the specified effect parameter. - * - * @param effect the effect to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetEffectfv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetEffectfv(effect, param, memAddress(values)); - } - - // --- [ alGenFilters ] --- - - /** - * Unsafe version of: {@link #alGenFilters GenFilters} - * - * @param n the number of filters be to generated - */ - public static void nalGenFilters(int n, long filters) { - long __functionAddress = AL.getICD().alGenFilters; - if (CHECKS) { - check(__functionAddress); - } - invokePV(n, filters, __functionAddress); - } - - /** - * Requests a number of filters. - * - * @param filters the buffer that will receive the filters - */ - @NativeType("ALvoid") - public static void alGenFilters(@NativeType("ALuint *") IntBuffer filters) { - nalGenFilters(filters.remaining(), memAddress(filters)); - } - - /** Requests a number of filters. */ - @NativeType("ALvoid") - public static int alGenFilters() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer filters = stack.callocInt(1); - nalGenFilters(1, memAddress(filters)); - return filters.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alDeleteFilters ] --- - - /** - * Unsafe version of: {@link #alDeleteFilters DeleteFilters} - * - * @param n the number of filters be to deleted - */ - public static void nalDeleteFilters(int n, long filters) { - long __functionAddress = AL.getICD().alDeleteFilters; - if (CHECKS) { - check(__functionAddress); - } - invokePV(n, filters, __functionAddress); - } - - /** - * Deletes a number of filters. - * - * @param filters the filter to delete - */ - @NativeType("ALvoid") - public static void alDeleteFilters(@NativeType("ALuint *") IntBuffer filters) { - nalDeleteFilters(filters.remaining(), memAddress(filters)); - } - - /** Deletes a number of filters. */ - @NativeType("ALvoid") - public static void alDeleteFilters(@NativeType("ALuint *") int filter) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer filters = stack.ints(filter); - nalDeleteFilters(1, memAddress(filters)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alIsFilter ] --- - - /** - * Verifies whether the given object name is a filter. - * - * @param filter a value that may be a filter name - */ - @NativeType("ALboolean") - public static boolean alIsFilter(@NativeType("ALuint") int filter) { - long __functionAddress = AL.getICD().alIsFilter; - if (CHECKS) { - check(__functionAddress); - } - return invokeZ(filter, __functionAddress); - } - - // --- [ alFilteri ] --- - - /** - * Sets the integer value of a filter parameter. - * - * @param filter the filter to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alFilteri(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALint") int value) { - long __functionAddress = AL.getICD().alFilteri; - if (CHECKS) { - check(__functionAddress); - } - invokeV(filter, param, value, __functionAddress); - } - - // --- [ alFilteriv ] --- - - /** Unsafe version of: {@link #alFilteriv Filteriv} */ - public static void nalFilteriv(int filter, int param, long values) { - long __functionAddress = AL.getICD().alFilteriv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filter, param, values, __functionAddress); - } - - /** - * Pointer version of {@link #alFilteri Filteri}. - * - * @param filter the filter to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alFilteriv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALint const *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalFilteriv(filter, param, memAddress(values)); - } - - // --- [ alFilterf ] --- - - /** - * Sets the float value of a filter parameter. - * - * @param filter the filter to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alFilterf(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALfloat") float value) { - long __functionAddress = AL.getICD().alFilterf; - if (CHECKS) { - check(__functionAddress); - } - invokeV(filter, param, value, __functionAddress); - } - - // --- [ alFilterfv ] --- - - /** Unsafe version of: {@link #alFilterfv Filterfv} */ - public static void nalFilterfv(int filter, int param, long values) { - long __functionAddress = AL.getICD().alFilterfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filter, param, values, __functionAddress); - } - - /** - * Pointer version of {@link #alFilterf Filterf}. - * - * @param filter the filter to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alFilterfv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALfloat const *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalFilterfv(filter, param, memAddress(values)); - } - - // --- [ alGetFilteri ] --- - - /** Unsafe version of: {@link #alGetFilteri GetFilteri} */ - public static void nalGetFilteri(int filter, int param, long value) { - long __functionAddress = AL.getICD().alGetFilteri; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filter, param, value, __functionAddress); - } - - /** - * Returns the integer value of the specified filter parameter. - * - * @param filter the filter to query - * @param param the parameter to query - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetFilteri(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetFilteri(filter, param, memAddress(value)); - } - - /** - * Returns the integer value of the specified filter parameter. - * - * @param filter the filter to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static int alGetFilteri(@NativeType("ALuint") int filter, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nalGetFilteri(filter, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetFilteriv ] --- - - /** Unsafe version of: {@link #alGetFilteriv GetFilteriv} */ - public static void nalGetFilteriv(int filter, int param, long values) { - long __functionAddress = AL.getICD().alGetFilteriv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filter, param, values, __functionAddress); - } - - /** - * Returns the integer values of the specified filter parameter. - * - * @param filter the filter to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetFilteriv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetFilteriv(filter, param, memAddress(values)); - } - - // --- [ alGetFilterf ] --- - - /** Unsafe version of: {@link #alGetFilterf GetFilterf} */ - public static void nalGetFilterf(int filter, int param, long value) { - long __functionAddress = AL.getICD().alGetFilterf; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filter, param, value, __functionAddress); - } - - /** - * Returns the float value of the specified filter parameter. - * - * @param filter the effect to query - * @param param the parameter to query - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetFilterf(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetFilterf(filter, param, memAddress(value)); - } - - /** - * Returns the float value of the specified filter parameter. - * - * @param filter the effect to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static float alGetFilterf(@NativeType("ALuint") int filter, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nalGetFilterf(filter, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetFilterfv ] --- - - /** Unsafe version of: {@link #alGetFilterfv GetFilterfv} */ - public static void nalGetFilterfv(int filter, int param, long values) { - long __functionAddress = AL.getICD().alGetFilterfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filter, param, values, __functionAddress); - } - - /** - * Returns the float values of the specified filter parameter. - * - * @param filter the effect to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetFilterfv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetFilterfv(filter, param, memAddress(values)); - } - - // --- [ alGenAuxiliaryEffectSlots ] --- - - /** - * Unsafe version of: {@link #alGenAuxiliaryEffectSlots GenAuxiliaryEffectSlots} - * - * @param n the number of effect slots be to generated - */ - public static void nalGenAuxiliaryEffectSlots(int n, long effectSlots) { - long __functionAddress = AL.getICD().alGenAuxiliaryEffectSlots; - if (CHECKS) { - check(__functionAddress); - } - invokePV(n, effectSlots, __functionAddress); - } - - /** - * Requests a number of effect slots. - * - * @param effectSlots the buffer that will receive the effect slots - */ - @NativeType("ALvoid") - public static void alGenAuxiliaryEffectSlots(@NativeType("ALuint *") IntBuffer effectSlots) { - nalGenAuxiliaryEffectSlots(effectSlots.remaining(), memAddress(effectSlots)); - } - - /** Requests a number of effect slots. */ - @NativeType("ALvoid") - public static int alGenAuxiliaryEffectSlots() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer effectSlots = stack.callocInt(1); - nalGenAuxiliaryEffectSlots(1, memAddress(effectSlots)); - return effectSlots.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alDeleteAuxiliaryEffectSlots ] --- - - /** - * Unsafe version of: {@link #alDeleteAuxiliaryEffectSlots DeleteAuxiliaryEffectSlots} - * - * @param n the number of effect slots be to deleted - */ - public static void nalDeleteAuxiliaryEffectSlots(int n, long effectSlots) { - long __functionAddress = AL.getICD().alDeleteAuxiliaryEffectSlots; - if (CHECKS) { - check(__functionAddress); - } - invokePV(n, effectSlots, __functionAddress); - } - - /** - * Deletes a number of effect slots. - * - * @param effectSlots the effectSlot to delete - */ - @NativeType("ALvoid") - public static void alDeleteAuxiliaryEffectSlots(@NativeType("ALuint *") IntBuffer effectSlots) { - nalDeleteAuxiliaryEffectSlots(effectSlots.remaining(), memAddress(effectSlots)); - } - - /** Deletes a number of effect slots. */ - @NativeType("ALvoid") - public static void alDeleteAuxiliaryEffectSlots(@NativeType("ALuint *") int effectSlot) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer effectSlots = stack.ints(effectSlot); - nalDeleteAuxiliaryEffectSlots(1, memAddress(effectSlots)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alIsAuxiliaryEffectSlot ] --- - - /** - * Verifies whether the given object name is an effect slot. - * - * @param effectSlot a value that may be an effect slot name - */ - @NativeType("ALboolean") - public static boolean alIsAuxiliaryEffectSlot(@NativeType("ALuint") int effectSlot) { - long __functionAddress = AL.getICD().alIsAuxiliaryEffectSlot; - if (CHECKS) { - check(__functionAddress); - } - return invokeZ(effectSlot, __functionAddress); - } - - // --- [ alAuxiliaryEffectSloti ] --- - - /** - * Sets the integer value of an effect slot parameter. - * - * @param effectSlot the effect slot to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alAuxiliaryEffectSloti(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALint") int value) { - long __functionAddress = AL.getICD().alAuxiliaryEffectSloti; - if (CHECKS) { - check(__functionAddress); - } - invokeV(effectSlot, param, value, __functionAddress); - } - - // --- [ alAuxiliaryEffectSlotiv ] --- - - /** Unsafe version of: {@link #alAuxiliaryEffectSlotiv AuxiliaryEffectSlotiv} */ - public static void nalAuxiliaryEffectSlotiv(int effectSlot, int param, long values) { - long __functionAddress = AL.getICD().alAuxiliaryEffectSlotiv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlot, param, values, __functionAddress); - } - - /** - * Pointer version of {@link #alAuxiliaryEffectSloti AuxiliaryEffectSloti}. - * - * @param effectSlot the effect slot to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alAuxiliaryEffectSlotiv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALint const *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalAuxiliaryEffectSlotiv(effectSlot, param, memAddress(values)); - } - - // --- [ alAuxiliaryEffectSlotf ] --- - - /** - * Sets the float value of an effect slot parameter. - * - * @param effectSlot the effect slot to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alAuxiliaryEffectSlotf(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALfloat") float value) { - long __functionAddress = AL.getICD().alAuxiliaryEffectSlotf; - if (CHECKS) { - check(__functionAddress); - } - invokeV(effectSlot, param, value, __functionAddress); - } - - // --- [ alAuxiliaryEffectSlotfv ] --- - - /** Unsafe version of: {@link #alAuxiliaryEffectSlotfv AuxiliaryEffectSlotfv} */ - public static void nalAuxiliaryEffectSlotfv(int effectSlot, int param, long values) { - long __functionAddress = AL.getICD().alAuxiliaryEffectSlotfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlot, param, values, __functionAddress); - } - - /** - * Pointer version of {@link #alAuxiliaryEffectSlotf AuxiliaryEffectSlotf}. - * - * @param effectSlot the effect slot to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alAuxiliaryEffectSlotfv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALfloat const *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalAuxiliaryEffectSlotfv(effectSlot, param, memAddress(values)); - } - - // --- [ alGetAuxiliaryEffectSloti ] --- - - /** Unsafe version of: {@link #alGetAuxiliaryEffectSloti GetAuxiliaryEffectSloti} */ - public static void nalGetAuxiliaryEffectSloti(int effectSlot, int param, long value) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSloti; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlot, param, value, __functionAddress); - } - - /** - * Returns the integer value of the specified effect slot parameter. - * - * @param effectSlot the effect slot to query - * @param param the parameter to query - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSloti(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetAuxiliaryEffectSloti(effectSlot, param, memAddress(value)); - } - - /** - * Returns the integer value of the specified effect slot parameter. - * - * @param effectSlot the effect slot to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static int alGetAuxiliaryEffectSloti(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nalGetAuxiliaryEffectSloti(effectSlot, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetAuxiliaryEffectSlotiv ] --- - - /** Unsafe version of: {@link #alGetAuxiliaryEffectSlotiv GetAuxiliaryEffectSlotiv} */ - public static void nalGetAuxiliaryEffectSlotiv(int effectSlot, int param, long values) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSlotiv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlot, param, values, __functionAddress); - } - - /** - * Returns the integer values of the specified effect slot parameter. - * - * @param effectSlot the effect slot to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSlotiv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetAuxiliaryEffectSlotiv(effectSlot, param, memAddress(values)); - } - - // --- [ alGetAuxiliaryEffectSlotf ] --- - - /** Unsafe version of: {@link #alGetAuxiliaryEffectSlotf GetAuxiliaryEffectSlotf} */ - public static void nalGetAuxiliaryEffectSlotf(int effectSlot, int param, long value) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSlotf; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlot, param, value, __functionAddress); - } - - /** - * Returns the float value of the specified filter parameter. - * - * @param effectSlot the effect slot to query - * @param param the parameter to query - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSlotf(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetAuxiliaryEffectSlotf(effectSlot, param, memAddress(value)); - } - - /** - * Returns the float value of the specified filter parameter. - * - * @param effectSlot the effect slot to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static float alGetAuxiliaryEffectSlotf(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nalGetAuxiliaryEffectSlotf(effectSlot, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetAuxiliaryEffectSlotfv ] --- - - /** Unsafe version of: {@link #alGetAuxiliaryEffectSlotfv GetAuxiliaryEffectSlotfv} */ - public static void nalGetAuxiliaryEffectSlotfv(int effectSlot, int param, long values) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSlotfv; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlot, param, values, __functionAddress); - } - - /** - * Returns the float values of the specified effect slot parameter. - * - * @param effectSlot the effect to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSlotfv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALfloat *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetAuxiliaryEffectSlotfv(effectSlot, param, memAddress(values)); - } - - /** Array version of: {@link #alGenEffects GenEffects} */ - @NativeType("ALvoid") - public static void alGenEffects(@NativeType("ALuint *") int[] effects) { - long __functionAddress = AL.getICD().alGenEffects; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effects.length, effects, __functionAddress); - } - - /** Array version of: {@link #alDeleteEffects DeleteEffects} */ - @NativeType("ALvoid") - public static void alDeleteEffects(@NativeType("ALuint *") int[] effects) { - long __functionAddress = AL.getICD().alDeleteEffects; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effects.length, effects, __functionAddress); - } - - /** Array version of: {@link #alEffectiv Effectiv} */ - @NativeType("ALvoid") - public static void alEffectiv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALint const *") int[] values) { - long __functionAddress = AL.getICD().alEffectiv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effect, param, values, __functionAddress); - } - - /** Array version of: {@link #alEffectfv Effectfv} */ - @NativeType("ALvoid") - public static void alEffectfv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALfloat const *") float[] values) { - long __functionAddress = AL.getICD().alEffectfv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effect, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetEffecti GetEffecti} */ - @NativeType("ALvoid") - public static void alGetEffecti(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALint *") int[] value) { - long __functionAddress = AL.getICD().alGetEffecti; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(effect, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetEffectiv GetEffectiv} */ - @NativeType("ALvoid") - public static void alGetEffectiv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALint *") int[] values) { - long __functionAddress = AL.getICD().alGetEffectiv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effect, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetEffectf GetEffectf} */ - @NativeType("ALvoid") - public static void alGetEffectf(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] value) { - long __functionAddress = AL.getICD().alGetEffectf; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(effect, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetEffectfv GetEffectfv} */ - @NativeType("ALvoid") - public static void alGetEffectfv(@NativeType("ALuint") int effect, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] values) { - long __functionAddress = AL.getICD().alGetEffectfv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effect, param, values, __functionAddress); - } - - /** Array version of: {@link #alGenFilters GenFilters} */ - @NativeType("ALvoid") - public static void alGenFilters(@NativeType("ALuint *") int[] filters) { - long __functionAddress = AL.getICD().alGenFilters; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filters.length, filters, __functionAddress); - } - - /** Array version of: {@link #alDeleteFilters DeleteFilters} */ - @NativeType("ALvoid") - public static void alDeleteFilters(@NativeType("ALuint *") int[] filters) { - long __functionAddress = AL.getICD().alDeleteFilters; - if (CHECKS) { - check(__functionAddress); - } - invokePV(filters.length, filters, __functionAddress); - } - - /** Array version of: {@link #alFilteriv Filteriv} */ - @NativeType("ALvoid") - public static void alFilteriv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALint const *") int[] values) { - long __functionAddress = AL.getICD().alFilteriv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(filter, param, values, __functionAddress); - } - - /** Array version of: {@link #alFilterfv Filterfv} */ - @NativeType("ALvoid") - public static void alFilterfv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALfloat const *") float[] values) { - long __functionAddress = AL.getICD().alFilterfv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(filter, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetFilteri GetFilteri} */ - @NativeType("ALvoid") - public static void alGetFilteri(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALint *") int[] value) { - long __functionAddress = AL.getICD().alGetFilteri; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(filter, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetFilteriv GetFilteriv} */ - @NativeType("ALvoid") - public static void alGetFilteriv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALint *") int[] values) { - long __functionAddress = AL.getICD().alGetFilteriv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(filter, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetFilterf GetFilterf} */ - @NativeType("ALvoid") - public static void alGetFilterf(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] value) { - long __functionAddress = AL.getICD().alGetFilterf; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(filter, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetFilterfv GetFilterfv} */ - @NativeType("ALvoid") - public static void alGetFilterfv(@NativeType("ALuint") int filter, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] values) { - long __functionAddress = AL.getICD().alGetFilterfv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(filter, param, values, __functionAddress); - } - - /** Array version of: {@link #alGenAuxiliaryEffectSlots GenAuxiliaryEffectSlots} */ - @NativeType("ALvoid") - public static void alGenAuxiliaryEffectSlots(@NativeType("ALuint *") int[] effectSlots) { - long __functionAddress = AL.getICD().alGenAuxiliaryEffectSlots; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlots.length, effectSlots, __functionAddress); - } - - /** Array version of: {@link #alDeleteAuxiliaryEffectSlots DeleteAuxiliaryEffectSlots} */ - @NativeType("ALvoid") - public static void alDeleteAuxiliaryEffectSlots(@NativeType("ALuint *") int[] effectSlots) { - long __functionAddress = AL.getICD().alDeleteAuxiliaryEffectSlots; - if (CHECKS) { - check(__functionAddress); - } - invokePV(effectSlots.length, effectSlots, __functionAddress); - } - - /** Array version of: {@link #alAuxiliaryEffectSlotiv AuxiliaryEffectSlotiv} */ - @NativeType("ALvoid") - public static void alAuxiliaryEffectSlotiv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALint const *") int[] values) { - long __functionAddress = AL.getICD().alAuxiliaryEffectSlotiv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effectSlot, param, values, __functionAddress); - } - - /** Array version of: {@link #alAuxiliaryEffectSlotfv AuxiliaryEffectSlotfv} */ - @NativeType("ALvoid") - public static void alAuxiliaryEffectSlotfv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALfloat const *") float[] values) { - long __functionAddress = AL.getICD().alAuxiliaryEffectSlotfv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effectSlot, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetAuxiliaryEffectSloti GetAuxiliaryEffectSloti} */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSloti(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALint *") int[] value) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSloti; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(effectSlot, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetAuxiliaryEffectSlotiv GetAuxiliaryEffectSlotiv} */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSlotiv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALint *") int[] values) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSlotiv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effectSlot, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetAuxiliaryEffectSlotf GetAuxiliaryEffectSlotf} */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSlotf(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] value) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSlotf; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(effectSlot, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetAuxiliaryEffectSlotfv GetAuxiliaryEffectSlotfv} */ - @NativeType("ALvoid") - public static void alGetAuxiliaryEffectSlotfv(@NativeType("ALuint") int effectSlot, @NativeType("ALenum") int param, @NativeType("ALfloat *") float[] values) { - long __functionAddress = AL.getICD().alGetAuxiliaryEffectSlotfv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(effectSlot, param, values, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTExponentDistance.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTExponentDistance.java deleted file mode 100644 index d7a09e1f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTExponentDistance.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code AL_EXT_EXPONENT_DISTANCE} extension. - * - *

    An OpenAL 1.1 implementation will always support the {@code AL_EXT_EXPONENT_DISTANCE} extension. This allows an application written to the OpenAL 1.0 specification to - * access the exponent distance abilities.

    - */ -public final class EXTExponentDistance { - - /** {@code AL_EXT_EXPONENT_DISTANCE} tokens. */ - public static final int - AL_EXPONENT_DISTANCE = 0xD005, - AL_EXPONENT_DISTANCE_CLAMPED = 0xD006; - - private EXTExponentDistance() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTFloat32.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTFloat32.java deleted file mode 100644 index 655388e3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTFloat32.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_FLOAT32} extension. */ -public final class EXTFloat32 { - - /** Buffer formats. */ - public static final int - AL_FORMAT_MONO_FLOAT32 = 0x10010, - AL_FORMAT_STEREO_FLOAT32 = 0x10011; - - private EXTFloat32() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTIma4.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTIma4.java deleted file mode 100644 index 291ae714..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTIma4.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_IMA4} extension. */ -public final class EXTIma4 { - - /** Buffer formats. */ - public static final int - AL_FORMAT_MONO_IMA4 = 0x1300, - AL_FORMAT_STEREO_IMA4 = 0x1301; - - private EXTIma4() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTLinearDistance.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTLinearDistance.java deleted file mode 100644 index 84ee13aa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTLinearDistance.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code AL_EXT_LINEAR_DISTANCE} extension. - * - *

    An OpenAL 1.1 implementation will always support the {@code AL_EXT_LINEAR_DISTANCE} extension. This allows an application written to the OpenAL 1.0 specification to - * access the offset abilities.

    - */ -public final class EXTLinearDistance { - - /** {@code AL_EXT_LINEAR_DISTANCE} tokens. */ - public static final int - AL_LINEAR_DISTANCE = 0xD003, - AL_LINEAR_DISTANCE_CLAMPED = 0xD004; - - private EXTLinearDistance() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTMCFormats.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTMCFormats.java deleted file mode 100644 index 13fd2475..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTMCFormats.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_MCFORMATS} extension. */ -public final class EXTMCFormats { - - /** Buffer formats. */ - public static final int - AL_FORMAT_QUAD8 = 0x1204, - AL_FORMAT_QUAD16 = 0x1205, - AL_FORMAT_QUAD32 = 0x1206, - AL_FORMAT_REAR8 = 0x1207, - AL_FORMAT_REAR16 = 0x1208, - AL_FORMAT_REAR32 = 0x1209, - AL_FORMAT_51CHN8 = 0x120A, - AL_FORMAT_51CHN16 = 0x120B, - AL_FORMAT_51CHN32 = 0x120C, - AL_FORMAT_61CHN8 = 0x120D, - AL_FORMAT_61CHN16 = 0x120E, - AL_FORMAT_61CHN32 = 0x120F, - AL_FORMAT_71CHN8 = 0x1210, - AL_FORMAT_71CHN16 = 0x1211, - AL_FORMAT_71CHN32 = 0x1212; - - private EXTMCFormats() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTMulaw.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTMulaw.java deleted file mode 100644 index 711272e7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTMulaw.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_MULAW} extension. */ -public final class EXTMulaw { - - /** Buffer formats. */ - public static final int - AL_FORMAT_MONO_MULAW_EXT = 0x10014, - AL_FORMAT_STEREO_MULAW_EXT = 0x10015; - - private EXTMulaw() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTMulawBFormat.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTMulawBFormat.java deleted file mode 100644 index 9600ba63..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTMulawBFormat.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code AL_EXT_MULAW_BFORMAT} extension. - * - *

    This extension implies two MULAW formats are available, based on 2D and 3D Ambisonic B-Format.

    - * - *

    See {@link EXTBFormat EXT_BFORMAT} for a discussion of the channel numberings and meanings.

    - */ -public final class EXTMulawBFormat { - - /** Buffer formats. */ - public static final int - AL_FORMAT_BFORMAT2D_MULAW = 0x10031, - AL_FORMAT_BFORMAT3D_MULAW = 0x10032; - - private EXTMulawBFormat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTMulawMCFormats.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTMulawMCFormats.java deleted file mode 100644 index d336a35b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTMulawMCFormats.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_MULAW_MCFORMATS} extension. */ -public final class EXTMulawMCFormats { - - /** Buffer formats. */ - public static final int - AL_FORMAT_MONO_MULAW = 0x10014, - AL_FORMAT_STEREO_MULAW = 0x10015, - AL_FORMAT_QUAD_MULAW = 0x10021, - AL_FORMAT_REAR_MULAW = 0x10022, - AL_FORMAT_51CHN_MULAW = 0x10023, - AL_FORMAT_61CHN_MULAW = 0x10024, - AL_FORMAT_71CHN_MULAW = 0x10025; - - private EXTMulawMCFormats() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTOffset.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTOffset.java deleted file mode 100644 index 43a3a73d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTOffset.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code AL_EXT_OFFSET} extension. - * - *

    An OpenAL 1.1 implementation will always support the {@code AL_EXT_OFFSET} extension. This allows an application written to the OpenAL 1.0 specification to - * access the offset abilities.

    - */ -public final class EXTOffset { - - /** {@code AL_EXT_OFFSET} tokens. */ - public static final int - AL_SEC_OFFSET = 0x1024, - AL_SAMPLE_OFFSET = 0x1025, - AL_BYTE_OFFSET = 0x1026; - - private EXTOffset() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTSourceDistanceModel.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTSourceDistanceModel.java deleted file mode 100644 index 0eb4e6e2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTSourceDistanceModel.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the EXT_source_distance_model extension. - * - *

    This extension allows each source to specify a distance model, instead of being restricted to one distance model for every source in the context. It - * provides a mechanism for applications to apply different models to each source, without the burden of manually applying the attenuation through the - * source gain.

    - */ -public final class EXTSourceDistanceModel { - - /** Accepted by the {@code target} parameter of {@link AL10#alEnable Enable}, {@link AL10#alDisable Disable}, and {@link AL10#alIsEnabled IsEnabled}. */ - public static final int AL_SOURCE_DISTANCE_MODEL = 0x200; - - private EXTSourceDistanceModel() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTSourceRadius.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTSourceRadius.java deleted file mode 100644 index 66dd2879..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTSourceRadius.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code AL_EXT_SOURCE_RADIUS} extension. - * - *

    This extension allows any mono source to be changed to be a "large" source with a radius. The source has a raised cosine shape.

    - */ -public final class EXTSourceRadius { - - /** - * Can be used with {@link AL10#alSourcef Sourcef} to set the source radius. Units are consistent with the coordinate system in use. The value must be at least zero. Use - * a value of zero to reset to a point source. - */ - public static final int AL_SOURCE_RADIUS = 0x1031; - - private EXTSourceRadius() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTStaticBuffer.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTStaticBuffer.java deleted file mode 100644 index 072e90c6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTStaticBuffer.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the {@code AL_EXT_STATIC_BUFFER} extension. - * - *

    This extension provides a means for the caller to avoid the overhead associated with the {@link AL10#alBufferData BufferData} call which performs a physical copy of the - * data provided by the caller to internal buffers. When using the {@code AL_EXT_STATIC_BUFFER} extension, OpenAL's internal buffers use the data pointer provided by - * the caller for all data access.

    - */ -public class EXTStaticBuffer { - - protected EXTStaticBuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ alBufferDataStatic ] --- - - /** - * Unsafe version of: {@link #alBufferDataStatic BufferDataStatic} - * - * @param len the data buffer size, in bytes - */ - public static void nalBufferDataStatic(int buffer, int format, long data, int len, int freq) { - long __functionAddress = AL.getICD().alBufferDataStatic; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, len, freq, __functionAddress); - } - - /** - * Sets the sample data of the specified buffer. - * - * @param buffer the buffer handle - * @param format the data format - * @param data the sample data - * @param freq the data frequency - */ - @NativeType("ALvoid") - public static void alBufferDataStatic(@NativeType("ALint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid *") ByteBuffer data, @NativeType("ALsizei") int freq) { - nalBufferDataStatic(buffer, format, memAddress(data), data.remaining(), freq); - } - - /** - * Sets the sample data of the specified buffer. - * - * @param buffer the buffer handle - * @param format the data format - * @param data the sample data - * @param freq the data frequency - */ - @NativeType("ALvoid") - public static void alBufferDataStatic(@NativeType("ALint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid *") ShortBuffer data, @NativeType("ALsizei") int freq) { - nalBufferDataStatic(buffer, format, memAddress(data), data.remaining() << 1, freq); - } - - /** - * Sets the sample data of the specified buffer. - * - * @param buffer the buffer handle - * @param format the data format - * @param data the sample data - * @param freq the data frequency - */ - @NativeType("ALvoid") - public static void alBufferDataStatic(@NativeType("ALint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid *") IntBuffer data, @NativeType("ALsizei") int freq) { - nalBufferDataStatic(buffer, format, memAddress(data), data.remaining() << 2, freq); - } - - /** - * Sets the sample data of the specified buffer. - * - * @param buffer the buffer handle - * @param format the data format - * @param data the sample data - * @param freq the data frequency - */ - @NativeType("ALvoid") - public static void alBufferDataStatic(@NativeType("ALint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid *") FloatBuffer data, @NativeType("ALsizei") int freq) { - nalBufferDataStatic(buffer, format, memAddress(data), data.remaining() << 2, freq); - } - - /** Array version of: {@link #alBufferDataStatic BufferDataStatic} */ - @NativeType("ALvoid") - public static void alBufferDataStatic(@NativeType("ALint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid *") short[] data, @NativeType("ALsizei") int freq) { - long __functionAddress = AL.getICD().alBufferDataStatic; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, data.length << 1, freq, __functionAddress); - } - - /** Array version of: {@link #alBufferDataStatic BufferDataStatic} */ - @NativeType("ALvoid") - public static void alBufferDataStatic(@NativeType("ALint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid *") int[] data, @NativeType("ALsizei") int freq) { - long __functionAddress = AL.getICD().alBufferDataStatic; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, data.length << 2, freq, __functionAddress); - } - - /** Array version of: {@link #alBufferDataStatic BufferDataStatic} */ - @NativeType("ALvoid") - public static void alBufferDataStatic(@NativeType("ALint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid *") float[] data, @NativeType("ALsizei") int freq) { - long __functionAddress = AL.getICD().alBufferDataStatic; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, data.length << 2, freq, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTStereoAngles.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTStereoAngles.java deleted file mode 100644 index e32bb93f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTStereoAngles.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code AL_EXT_STEREO_ANGLES} extension. - * - *

    This extension allows any stereo source to be "steered" by setting the angles at which the left and right channels should play.

    - */ -public final class EXTStereoAngles { - - /** - * Can be used with {@link AL10#alSourcefv Sourcefv} and two angles. The angles are specified anticlockwise relative to the real front, so a normal 60degree front stage is - * specified with {@code alSourcefv(sid,AL_STEREO_ANGLES,+M_PI/6,-M_PI/6)}. - * - *

    Angles are always specified in radians, anticlockwise relative to the real front ({@link AL10#AL_SOURCE_RELATIVE SOURCE_RELATIVE} is not supported).

    - */ - public static final int AL_STEREO_ANGLES = 0x1030; - - private EXTStereoAngles() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTThreadLocalContext.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTThreadLocalContext.java deleted file mode 100644 index c5d6448e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTThreadLocalContext.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the EXT_thread_local_context extension. - * - *

    This extension introduces the concept of a current thread-local context, with each thread able to have its own current context. The current context is - * what the al- functions work on, effectively allowing multiple threads to independently drive separate OpenAL playback contexts.

    - */ -public class EXTThreadLocalContext { - - protected EXTThreadLocalContext() { - throw new UnsupportedOperationException(); - } - - // --- [ alcSetThreadContext ] --- - - /** - * Makes a context current with respect to OpenAL operation on the current thread. The context parameter can be {@code NULL} or a valid context pointer. Using - * {@code NULL} results in no thread-specific context being current in the calling thread, which is useful when shutting OpenAL down. - * - * @param context the context to make current - */ - @NativeType("ALCboolean") - public static boolean alcSetThreadContext(@NativeType("ALCcontext *") long context) { - long __functionAddress = ALC.getICD().alcSetThreadContext; - if (CHECKS) { - check(__functionAddress); - } - return invokePZ(context, __functionAddress); - } - - // --- [ alcGetThreadContext ] --- - - /** Retrieves a handle to the thread-specific context of the calling thread. This function will return {@code NULL} if no thread-specific context is set. */ - @NativeType("ALCcontext *") - public static long alcGetThreadContext() { - long __functionAddress = ALC.getICD().alcGetThreadContext; - if (CHECKS) { - check(__functionAddress); - } - return invokeP(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EXTVorbis.java b/LWJGL/src/main/java/org/lwjgl/openal/EXTVorbis.java deleted file mode 100644 index 9bbe98a4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EXTVorbis.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_EXT_vorbis} extension. */ -public final class EXTVorbis { - - /** {@code AL_EXT_vorbis} tokens. */ - public static final int AL_FORMAT_VORBIS_EXT = 0x10003; - - private EXTVorbis() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/EnumerateAllExt.java b/LWJGL/src/main/java/org/lwjgl/openal/EnumerateAllExt.java deleted file mode 100644 index 94adfe0e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/EnumerateAllExt.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the {@code ALC_ENUMERATE_ALL_EXT} extension. - * - *

    The Enumerate All Extension enables the application developer to retrieve a complete list of device strings identifying all the available OpenAL - * rendering devices and paths present on the user's PC. It works in exactly the same manner as the Enumeration Extension, but it detects additional audio - * paths that the standard extension will ignore. For instance, it will return all the possible outputs in situations where the user has more than one - * audio device installed, or under Windows Vista where the audio system specifies different “endpoints” for sound such as Speakers, S/PDIF, etc... If you - * don’t require such complete control over the choice of output path, then use the standard Enumeration Extension.

    - */ -public final class EnumerateAllExt { - - /** {@code ALC_ENUMERATE_ALL_EXT} tokens. */ - public static final int - ALC_DEFAULT_ALL_DEVICES_SPECIFIER = 0x1012, - ALC_ALL_DEVICES_SPECIFIER = 0x1013; - - private EnumerateAllExt() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/LOKIAudioChannel.java b/LWJGL/src/main/java/org/lwjgl/openal/LOKIAudioChannel.java deleted file mode 100644 index f21ab013..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/LOKIAudioChannel.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code ALC_LOKI_audio_channel} extension. */ -public final class LOKIAudioChannel { - - /** {@code ALC_LOKI_audio_channel} tokens. */ - public static final int - ALC_CHAN_MAIN_LOKI = 0x500001, - ALC_CHAN_PCM_LOKI = 0x500002, - ALC_CHAN_CD_LOKI = 0x500003; - - private LOKIAudioChannel() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/LOKIIMAADPCM.java b/LWJGL/src/main/java/org/lwjgl/openal/LOKIIMAADPCM.java deleted file mode 100644 index bc0b5d4f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/LOKIIMAADPCM.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_LOKI_IMA_ADPCM} extension. */ -public final class LOKIIMAADPCM { - - /** Buffer formats. */ - public static final int - AL_FORMAT_IMA_ADPCM_MONO16_EXT = 0x10000, - AL_FORMAT_IMA_ADPCM_STEREO16_EXT = 0x10001; - - private LOKIIMAADPCM() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/LOKIQuadriphonic.java b/LWJGL/src/main/java/org/lwjgl/openal/LOKIQuadriphonic.java deleted file mode 100644 index 39c3b7d1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/LOKIQuadriphonic.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_LOKI_quadriphonic} extension. */ -public final class LOKIQuadriphonic { - - /** Buffer formats. */ - public static final int - AL_FORMAT_QUAD8_LOKI = 0x10004, - AL_FORMAT_QUAD16_LOKI = 0x10005; - - private LOKIQuadriphonic() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/LOKIWAVEFormat.java b/LWJGL/src/main/java/org/lwjgl/openal/LOKIWAVEFormat.java deleted file mode 100644 index 5f5728af..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/LOKIWAVEFormat.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** Native bindings to the {@code AL_LOKI_WAVE_format} extension. */ -public final class LOKIWAVEFormat { - - /** Buffer formats. */ - public static final int AL_FORMAT_WAVE_EXT = 0x10002; - - private LOKIWAVEFormat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/OpenALException.java b/LWJGL/src/main/java/org/lwjgl/openal/OpenALException.java deleted file mode 100644 index 59b88e73..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/OpenALException.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.openal; - -/** - *
    - * Thrown by the debug build library of the LWJGL if any OpenAL operation - * causes an error. - * - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public class OpenALException extends RuntimeException { - - private static final long serialVersionUID = 1L; - - /** - * Constructor for OpenALException. - */ - public OpenALException() { - super(); - } - - /** - * Constructor that takes an AL error number - */ - public OpenALException(int error_code) { - super("OpenAL error: " + AL10.alGetString(error_code) + " (" + error_code + ")"); - } - - /** - * Constructor for OpenALException. - * @param message - */ - public OpenALException(String message) { - super(message); - } - - /** - * Constructor for OpenALException. - * @param message - * @param cause - */ - public OpenALException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructor for OpenALException. - * @param cause - */ - public OpenALException(Throwable cause) { - super(cause); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBformatEx.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTBformatEx.java deleted file mode 100644 index 4351e926..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBformatEx.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_bformat_ex extension. - * - *

    This extension allows B-Format buffers to be interpreted according to the ACN (Ambisonic Channel Number), SN3D (Semi-Normalized), and N3D (fully - * Normalized) standards. The AL_EXT_BFORMAT extension provides support for B-Format buffers using the FuMa standard for channel ordering and scaling, - * however much of the ambisonic content being produced today is using a more formalized ACN ordering and SN3D scaling, some even using N3D scaling. The - * option to interpret B-Format buffers using these standards makes them easier to use since an application won't need to manually convert them before - * loading.

    - */ -public final class SOFTBformatEx { - - /** Accepted as the {@code paramName} parameter of {@link AL11#alBufferi Bufferi}, {@link AL11#alBufferiv Bufferiv}, {@link AL10#alGetBufferi GetBufferi}, and {@link AL11#alGetBufferiv GetBufferiv}. */ - public static final int - AL_AMBISONIC_LAYOUT_SOFT = 0x1997, - AL_AMBISONIC_SCALING_SOFT = 0x1998; - - /** Accepted as the {@code value} parameter of {@link AL11#alBufferi Bufferi} and {@link AL11#alBufferiv Bufferiv} for the {@link #AL_AMBISONIC_LAYOUT_SOFT AMBISONIC_LAYOUT_SOFT} and {@link #AL_AMBISONIC_SCALING_SOFT AMBISONIC_SCALING_SOFT} properties. */ - public static final int AL_FUMA_SOFT = 0x0; - - /** Accepted as the {@code value} parameter of {@link AL11#alBufferi Bufferi} and {@link AL11#alBufferiv Bufferiv} for the {@link #AL_AMBISONIC_LAYOUT_SOFT AMBISONIC_LAYOUT_SOFT} property. */ - public static final int AL_ACN_SOFT = 0x1; - - /** Accepted as the {@code value} parameter of {@link AL11#alBufferi Bufferi} and {@link AL11#alBufferiv Bufferiv} for the {@link #AL_AMBISONIC_SCALING_SOFT AMBISONIC_SCALING_SOFT} property. */ - public static final int - AL_SN3D_SOFT = 0x1, - AL_N3D_SOFT = 0x2; - - private SOFTBformatEx() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBlockAlignment.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTBlockAlignment.java deleted file mode 100644 index 7e56fbe4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBlockAlignment.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_block_alignment extension. - * - *

    This extension provides a mechanism for specifying block alignment properties for sample data. This is useful for, though not strictly limited to, - * ADPCM compression where the block alignment is specified in the media file header instead of the data stream, and controls the decoding process.

    - */ -public final class SOFTBlockAlignment { - - /** Accepted by the {@code paramName} parameter of {@link AL11#alBufferi Bufferi}, {@link AL11#alBufferiv Bufferiv}, {@link AL10#alGetBufferi GetBufferi}, and {@link AL11#alGetBufferiv GetBufferiv}. */ - public static final int - AL_UNPACK_BLOCK_ALIGNMENT_SOFT = 0x200C, - AL_PACK_BLOCK_ALIGNMENT_SOFT = 0x200D; - - private SOFTBlockAlignment() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferLengthQuery.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferLengthQuery.java deleted file mode 100644 index 1d4dec58..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferLengthQuery.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_buffer_length_query extension. - * - *

    This extension adds buffer queries to get the length in bytes, samples, and seconds.

    - * - *

    Standard OpenAL only has queries for a buffer's storage size, the bits per sample, channel count, and sample rate, where the application needs to - * calculate what it wants from those. While this works alright for standard formats and most extension formats, it won't work for certain compressed - * formats like ADPCM. These extra queries ensure the application can get information about the buffer it may need.

    - */ -public final class SOFTBufferLengthQuery { - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetBufferi GetBufferi} and {@link AL11#alGetBufferiv GetBufferiv}. */ - public static final int - AL_BYTE_LENGTH_SOFT = 0x2009, - AL_SAMPLE_LENGTH_SOFT = 0x200A; - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetBufferf GetBufferf} and {@link AL11#alGetBufferfv GetBufferfv}. */ - public static final int AL_SEC_LENGTH_SOFT = 0x200B; - - private SOFTBufferLengthQuery() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferSamples.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferSamples.java deleted file mode 100644 index 216c475e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferSamples.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_buffer_samples extension. - * - *

    This extension provides a more flexible mechanism for loading buffer data, as well as a method to retrieve buffer data. Unextended OpenAL only provides - * a method to specify a single buffer format when loading data, which defines the data given by the application. The AL is given leeway in converting the - * data, so that it is possible or more efficient to use internally. However, there are some drawbacks to this approach:

    - * - *
      - *
    • The conversion done by the implementation is hidden from the app. This makes it difficult for the app to know what kind of precision it will have, - * and impossible to request a storage precision.
    • - *
    • Conversion is not guaranteed, so the application can be restricted in the formats that can be loaded depending on the implementation.
    • - *
    - * - *

    If the application could specify the internal storage format, as well as use a separate format to specify the incoming data's format, it would allow to - * add more input formats (signed 8-bit, 32-bit int, and float, for example), with no undue burden placed on the implementation beyond needing some - * conversion routines. The application can then be assured that many different formats can be loaded, even if storage is restricted to a comparatively - * small subset.

    - * - *

    In addition, unextended OpenAL does not have any methods for updating only a portion of a buffer, nor a method to retrieve the data from a buffer.

    - */ -public class SOFTBufferSamples { - - /** - * Accepted by the {@code internalformat} parameter of {@link #alBufferSamplesSOFT BufferSamplesSOFT} (values are shared with standard OpenAL, {@link EXTFloat32 EXT_FLOAT32}, and - * {@link EXTMCFormats EXT_MCFORMATS}). - */ - public static final int - AL_MONO8_SOFT = 0x1100, - AL_MONO16_SOFT = 0x1101, - AL_MONO32F_SOFT = 0x10010, - AL_STEREO8_SOFT = 0x1102, - AL_STEREO16_SOFT = 0x1103, - AL_STEREO32F_SOFT = 0x10011, - AL_QUAD8_SOFT = 0x1204, - AL_QUAD16_SOFT = 0x1205, - AL_QUAD32F_SOFT = 0x1206, - AL_REAR8_SOFT = 0x1207, - AL_REAR16_SOFT = 0x1208, - AL_REAR32F_SOFT = 0x1209, - AL_5POINT1_8_SOFT = 0x120A, - AL_5POINT1_16_SOFT = 0x120B, - AL_5POINT1_32F_SOFT = 0x120C, - AL_6POINT1_8_SOFT = 0x120D, - AL_6POINT1_16_SOFT = 0x120E, - AL_6POINT1_32F_SOFT = 0x120F, - AL_7POINT1_8_SOFT = 0x1210, - AL_7POINT1_16_SOFT = 0x1211, - AL_7POINT1_32F_SOFT = 0x1212; - - /** Accepted by the {@code channels} parameter of {@link #alBufferSamplesSOFT BufferSamplesSOFT}, {@link #alBufferSubSamplesSOFT BufferSubSamplesSOFT}, and {@link #alGetBufferSamplesSOFT GetBufferSamplesSOFT}. */ - public static final int - AL_MONO_SOFT = 0x1500, - AL_STEREO_SOFT = 0x1501, - AL_QUAD_SOFT = 0x1502, - AL_REAR_SOFT = 0x1503, - AL_5POINT1_SOFT = 0x1504, - AL_6POINT1_SOFT = 0x1505, - AL_7POINT1_SOFT = 0x1506; - - /** Accepted by the {@code type} parameter of {@link #alBufferSamplesSOFT BufferSamplesSOFT}, {@link #alBufferSubSamplesSOFT BufferSubSamplesSOFT}, and {@link #alGetBufferSamplesSOFT GetBufferSamplesSOFT}. */ - public static final int - AL_BYTE_SOFT = 0x1400, - AL_UNSIGNED_BYTE_SOFT = 0x1401, - AL_SHORT_SOFT = 0x1402, - AL_UNSIGNED_SHORT_SOFT = 0x1403, - AL_INT_SOFT = 0x1404, - AL_UNSIGNED_INT_SOFT = 0x1405, - AL_FLOAT_SOFT = 0x1406, - AL_DOUBLE_SOFT = 0x1407, - AL_BYTE3_SOFT = 0x1408, - AL_UNSIGNED_BYTE3_SOFT = 0x1409; - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetBufferi GetBufferi} and {@link AL11#alGetBufferiv GetBufferiv}. */ - public static final int - AL_INTERNAL_FORMAT_SOFT = 0x2008, - AL_BYTE_LENGTH_SOFT = 0x2009, - AL_SAMPLE_LENGTH_SOFT = 0x200A; - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetBufferf GetBufferf} and {@link AL11#alGetBufferfv GetBufferfv}. */ - public static final int AL_SEC_LENGTH_SOFT = 0x200B; - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetSourceiv GetSourceiv} and {@link AL10#alGetSourcefv GetSourcefv} (these are the same as in {@link SOFTBufferSubData SOFT_buffer_sub_data}). */ - public static final int - AL_BYTE_RW_OFFSETS_SOFT = 0x1031, - AL_SAMPLE_RW_OFFSETS_SOFT = 0x1032; - - protected SOFTBufferSamples() { - throw new UnsupportedOperationException(); - } - - // --- [ alBufferSamplesSOFT ] --- - - /** Unsafe version of: {@link #alBufferSamplesSOFT BufferSamplesSOFT} */ - public static void nalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, long data) { - long __functionAddress = AL.getICD().alBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, samplerate, internalformat, samples, channels, type, data, __functionAddress); - } - - /** - * @param internalformat one of:
    {@link #AL_MONO8_SOFT MONO8_SOFT}{@link #AL_MONO16_SOFT MONO16_SOFT}{@link #AL_MONO32F_SOFT MONO32F_SOFT}{@link #AL_STEREO8_SOFT STEREO8_SOFT}{@link #AL_STEREO16_SOFT STEREO16_SOFT}{@link #AL_STEREO32F_SOFT STEREO32F_SOFT}
    {@link #AL_QUAD8_SOFT QUAD8_SOFT}{@link #AL_QUAD16_SOFT QUAD16_SOFT}{@link #AL_QUAD32F_SOFT QUAD32F_SOFT}{@link #AL_REAR8_SOFT REAR8_SOFT}{@link #AL_REAR16_SOFT REAR16_SOFT}{@link #AL_REAR32F_SOFT REAR32F_SOFT}
    {@link #AL_5POINT1_8_SOFT 5POINT1_8_SOFT}{@link #AL_5POINT1_16_SOFT 5POINT1_16_SOFT}{@link #AL_5POINT1_32F_SOFT 5POINT1_32F_SOFT}{@link #AL_6POINT1_8_SOFT 6POINT1_8_SOFT}{@link #AL_6POINT1_16_SOFT 6POINT1_16_SOFT}{@link #AL_6POINT1_32F_SOFT 6POINT1_32F_SOFT}
    {@link #AL_7POINT1_8_SOFT 7POINT1_8_SOFT}{@link #AL_7POINT1_16_SOFT 7POINT1_16_SOFT}{@link #AL_7POINT1_32F_SOFT 7POINT1_32F_SOFT}
    - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") ByteBuffer data) { - nalBufferSamplesSOFT(buffer, samplerate, internalformat, samples, channels, type, memAddress(data)); - } - - /** - * @param internalformat one of:
    {@link #AL_MONO8_SOFT MONO8_SOFT}{@link #AL_MONO16_SOFT MONO16_SOFT}{@link #AL_MONO32F_SOFT MONO32F_SOFT}{@link #AL_STEREO8_SOFT STEREO8_SOFT}{@link #AL_STEREO16_SOFT STEREO16_SOFT}{@link #AL_STEREO32F_SOFT STEREO32F_SOFT}
    {@link #AL_QUAD8_SOFT QUAD8_SOFT}{@link #AL_QUAD16_SOFT QUAD16_SOFT}{@link #AL_QUAD32F_SOFT QUAD32F_SOFT}{@link #AL_REAR8_SOFT REAR8_SOFT}{@link #AL_REAR16_SOFT REAR16_SOFT}{@link #AL_REAR32F_SOFT REAR32F_SOFT}
    {@link #AL_5POINT1_8_SOFT 5POINT1_8_SOFT}{@link #AL_5POINT1_16_SOFT 5POINT1_16_SOFT}{@link #AL_5POINT1_32F_SOFT 5POINT1_32F_SOFT}{@link #AL_6POINT1_8_SOFT 6POINT1_8_SOFT}{@link #AL_6POINT1_16_SOFT 6POINT1_16_SOFT}{@link #AL_6POINT1_32F_SOFT 6POINT1_32F_SOFT}
    {@link #AL_7POINT1_8_SOFT 7POINT1_8_SOFT}{@link #AL_7POINT1_16_SOFT 7POINT1_16_SOFT}{@link #AL_7POINT1_32F_SOFT 7POINT1_32F_SOFT}
    - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") ShortBuffer data) { - nalBufferSamplesSOFT(buffer, samplerate, internalformat, samples, channels, type, memAddress(data)); - } - - /** - * @param internalformat one of:
    {@link #AL_MONO8_SOFT MONO8_SOFT}{@link #AL_MONO16_SOFT MONO16_SOFT}{@link #AL_MONO32F_SOFT MONO32F_SOFT}{@link #AL_STEREO8_SOFT STEREO8_SOFT}{@link #AL_STEREO16_SOFT STEREO16_SOFT}{@link #AL_STEREO32F_SOFT STEREO32F_SOFT}
    {@link #AL_QUAD8_SOFT QUAD8_SOFT}{@link #AL_QUAD16_SOFT QUAD16_SOFT}{@link #AL_QUAD32F_SOFT QUAD32F_SOFT}{@link #AL_REAR8_SOFT REAR8_SOFT}{@link #AL_REAR16_SOFT REAR16_SOFT}{@link #AL_REAR32F_SOFT REAR32F_SOFT}
    {@link #AL_5POINT1_8_SOFT 5POINT1_8_SOFT}{@link #AL_5POINT1_16_SOFT 5POINT1_16_SOFT}{@link #AL_5POINT1_32F_SOFT 5POINT1_32F_SOFT}{@link #AL_6POINT1_8_SOFT 6POINT1_8_SOFT}{@link #AL_6POINT1_16_SOFT 6POINT1_16_SOFT}{@link #AL_6POINT1_32F_SOFT 6POINT1_32F_SOFT}
    {@link #AL_7POINT1_8_SOFT 7POINT1_8_SOFT}{@link #AL_7POINT1_16_SOFT 7POINT1_16_SOFT}{@link #AL_7POINT1_32F_SOFT 7POINT1_32F_SOFT}
    - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") IntBuffer data) { - nalBufferSamplesSOFT(buffer, samplerate, internalformat, samples, channels, type, memAddress(data)); - } - - /** - * @param internalformat one of:
    {@link #AL_MONO8_SOFT MONO8_SOFT}{@link #AL_MONO16_SOFT MONO16_SOFT}{@link #AL_MONO32F_SOFT MONO32F_SOFT}{@link #AL_STEREO8_SOFT STEREO8_SOFT}{@link #AL_STEREO16_SOFT STEREO16_SOFT}{@link #AL_STEREO32F_SOFT STEREO32F_SOFT}
    {@link #AL_QUAD8_SOFT QUAD8_SOFT}{@link #AL_QUAD16_SOFT QUAD16_SOFT}{@link #AL_QUAD32F_SOFT QUAD32F_SOFT}{@link #AL_REAR8_SOFT REAR8_SOFT}{@link #AL_REAR16_SOFT REAR16_SOFT}{@link #AL_REAR32F_SOFT REAR32F_SOFT}
    {@link #AL_5POINT1_8_SOFT 5POINT1_8_SOFT}{@link #AL_5POINT1_16_SOFT 5POINT1_16_SOFT}{@link #AL_5POINT1_32F_SOFT 5POINT1_32F_SOFT}{@link #AL_6POINT1_8_SOFT 6POINT1_8_SOFT}{@link #AL_6POINT1_16_SOFT 6POINT1_16_SOFT}{@link #AL_6POINT1_32F_SOFT 6POINT1_32F_SOFT}
    {@link #AL_7POINT1_8_SOFT 7POINT1_8_SOFT}{@link #AL_7POINT1_16_SOFT 7POINT1_16_SOFT}{@link #AL_7POINT1_32F_SOFT 7POINT1_32F_SOFT}
    - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") FloatBuffer data) { - nalBufferSamplesSOFT(buffer, samplerate, internalformat, samples, channels, type, memAddress(data)); - } - - /** - * @param internalformat one of:
    {@link #AL_MONO8_SOFT MONO8_SOFT}{@link #AL_MONO16_SOFT MONO16_SOFT}{@link #AL_MONO32F_SOFT MONO32F_SOFT}{@link #AL_STEREO8_SOFT STEREO8_SOFT}{@link #AL_STEREO16_SOFT STEREO16_SOFT}{@link #AL_STEREO32F_SOFT STEREO32F_SOFT}
    {@link #AL_QUAD8_SOFT QUAD8_SOFT}{@link #AL_QUAD16_SOFT QUAD16_SOFT}{@link #AL_QUAD32F_SOFT QUAD32F_SOFT}{@link #AL_REAR8_SOFT REAR8_SOFT}{@link #AL_REAR16_SOFT REAR16_SOFT}{@link #AL_REAR32F_SOFT REAR32F_SOFT}
    {@link #AL_5POINT1_8_SOFT 5POINT1_8_SOFT}{@link #AL_5POINT1_16_SOFT 5POINT1_16_SOFT}{@link #AL_5POINT1_32F_SOFT 5POINT1_32F_SOFT}{@link #AL_6POINT1_8_SOFT 6POINT1_8_SOFT}{@link #AL_6POINT1_16_SOFT 6POINT1_16_SOFT}{@link #AL_6POINT1_32F_SOFT 6POINT1_32F_SOFT}
    {@link #AL_7POINT1_8_SOFT 7POINT1_8_SOFT}{@link #AL_7POINT1_16_SOFT 7POINT1_16_SOFT}{@link #AL_7POINT1_32F_SOFT 7POINT1_32F_SOFT}
    - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") DoubleBuffer data) { - nalBufferSamplesSOFT(buffer, samplerate, internalformat, samples, channels, type, memAddress(data)); - } - - // --- [ alBufferSubSamplesSOFT ] --- - - /** Unsafe version of: {@link #alBufferSubSamplesSOFT BufferSubSamplesSOFT} */ - public static void nalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, long data) { - long __functionAddress = AL.getICD().alBufferSubSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") ByteBuffer data) { - nalBufferSubSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") ShortBuffer data) { - nalBufferSubSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") IntBuffer data) { - nalBufferSubSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") FloatBuffer data) { - nalBufferSubSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") DoubleBuffer data) { - nalBufferSubSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - // --- [ alGetBufferSamplesSOFT ] --- - - /** Unsafe version of: {@link #alGetBufferSamplesSOFT GetBufferSamplesSOFT} */ - public static void nalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, long data) { - long __functionAddress = AL.getICD().alGetBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") ByteBuffer data) { - nalGetBufferSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") ShortBuffer data) { - nalGetBufferSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") IntBuffer data) { - nalGetBufferSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") FloatBuffer data) { - nalGetBufferSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - /** - * @param channels one of:
    {@link #AL_MONO_SOFT MONO_SOFT}{@link #AL_STEREO_SOFT STEREO_SOFT}{@link #AL_QUAD_SOFT QUAD_SOFT}{@link #AL_REAR_SOFT REAR_SOFT}{@link #AL_5POINT1_SOFT 5POINT1_SOFT}{@link #AL_6POINT1_SOFT 6POINT1_SOFT}{@link #AL_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type one of:
    {@link #AL_BYTE_SOFT BYTE_SOFT}{@link #AL_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #AL_SHORT_SOFT SHORT_SOFT}{@link #AL_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #AL_INT_SOFT INT_SOFT}{@link #AL_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #AL_FLOAT_SOFT FLOAT_SOFT}{@link #AL_DOUBLE_SOFT DOUBLE_SOFT}{@link #AL_BYTE3_SOFT BYTE3_SOFT}{@link #AL_UNSIGNED_BYTE3_SOFT UNSIGNED_BYTE3_SOFT}
    - */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") DoubleBuffer data) { - nalGetBufferSamplesSOFT(buffer, offset, samples, channels, type, memAddress(data)); - } - - // --- [ alIsBufferFormatSupportedSOFT ] --- - - @NativeType("ALboolean") - public static boolean alIsBufferFormatSupportedSOFT(@NativeType("ALenum") int format) { - long __functionAddress = AL.getICD().alIsBufferFormatSupportedSOFT; - if (CHECKS) { - check(__functionAddress); - } - return invokeZ(format, __functionAddress); - } - - /** Array version of: {@link #alBufferSamplesSOFT BufferSamplesSOFT} */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") short[] data) { - long __functionAddress = AL.getICD().alBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, samplerate, internalformat, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alBufferSamplesSOFT BufferSamplesSOFT} */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") int[] data) { - long __functionAddress = AL.getICD().alBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, samplerate, internalformat, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alBufferSamplesSOFT BufferSamplesSOFT} */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") float[] data) { - long __functionAddress = AL.getICD().alBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, samplerate, internalformat, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alBufferSamplesSOFT BufferSamplesSOFT} */ - public static void alBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALuint") int samplerate, @NativeType("ALenum") int internalformat, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") double[] data) { - long __functionAddress = AL.getICD().alBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, samplerate, internalformat, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alBufferSubSamplesSOFT BufferSubSamplesSOFT} */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") short[] data) { - long __functionAddress = AL.getICD().alBufferSubSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alBufferSubSamplesSOFT BufferSubSamplesSOFT} */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") int[] data) { - long __functionAddress = AL.getICD().alBufferSubSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alBufferSubSamplesSOFT BufferSubSamplesSOFT} */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") float[] data) { - long __functionAddress = AL.getICD().alBufferSubSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alBufferSubSamplesSOFT BufferSubSamplesSOFT} */ - public static void alBufferSubSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid const *") double[] data) { - long __functionAddress = AL.getICD().alBufferSubSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alGetBufferSamplesSOFT GetBufferSamplesSOFT} */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") short[] data) { - long __functionAddress = AL.getICD().alGetBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alGetBufferSamplesSOFT GetBufferSamplesSOFT} */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") int[] data) { - long __functionAddress = AL.getICD().alGetBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alGetBufferSamplesSOFT GetBufferSamplesSOFT} */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") float[] data) { - long __functionAddress = AL.getICD().alGetBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - - /** Array version of: {@link #alGetBufferSamplesSOFT GetBufferSamplesSOFT} */ - public static void alGetBufferSamplesSOFT(@NativeType("ALuint") int buffer, @NativeType("ALsizei") int offset, @NativeType("ALsizei") int samples, @NativeType("ALenum") int channels, @NativeType("ALenum") int type, @NativeType("ALvoid *") double[] data) { - long __functionAddress = AL.getICD().alGetBufferSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, offset, samples, channels, type, data, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferSubData.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferSubData.java deleted file mode 100644 index eea95b86..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTBufferSubData.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_buffer_sub_data extension. - * - *

    This extension allows an application to modify a section of buffered sample data while the buffer is in use.

    - */ -public class SOFTBufferSubData { - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetSourceiv GetSourceiv} and {@link AL10#alGetSourcefv GetSourcefv}. */ - public static final int - AL_BYTE_RW_OFFSETS_SOFT = 0x1031, - AL_SAMPLE_RW_OFFSETS_SOFT = 0x1032; - - protected SOFTBufferSubData() { - throw new UnsupportedOperationException(); - } - - // --- [ alBufferSubDataSOFT ] --- - - public static void nalBufferSubDataSOFT(int buffer, int format, long data, int offset, int length) { - long __functionAddress = AL.getICD().alBufferSubDataSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, offset, length, __functionAddress); - } - - public static void alBufferSubDataSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid const *") ByteBuffer data, @NativeType("ALsizei") int offset) { - nalBufferSubDataSOFT(buffer, format, memAddress(data), offset, data.remaining()); - } - - public static void alBufferSubDataSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid const *") ShortBuffer data, @NativeType("ALsizei") int offset) { - nalBufferSubDataSOFT(buffer, format, memAddress(data), offset, data.remaining() << 1); - } - - public static void alBufferSubDataSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid const *") IntBuffer data, @NativeType("ALsizei") int offset) { - nalBufferSubDataSOFT(buffer, format, memAddress(data), offset, data.remaining() << 2); - } - - public static void alBufferSubDataSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid const *") FloatBuffer data, @NativeType("ALsizei") int offset) { - nalBufferSubDataSOFT(buffer, format, memAddress(data), offset, data.remaining() << 2); - } - - /** Array version of: {@link #alBufferSubDataSOFT BufferSubDataSOFT} */ - public static void alBufferSubDataSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid const *") short[] data, @NativeType("ALsizei") int offset) { - long __functionAddress = AL.getICD().alBufferSubDataSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, offset, data.length << 1, __functionAddress); - } - - /** Array version of: {@link #alBufferSubDataSOFT BufferSubDataSOFT} */ - public static void alBufferSubDataSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid const *") int[] data, @NativeType("ALsizei") int offset) { - long __functionAddress = AL.getICD().alBufferSubDataSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, offset, data.length << 2, __functionAddress); - } - - /** Array version of: {@link #alBufferSubDataSOFT BufferSubDataSOFT} */ - public static void alBufferSubDataSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALvoid const *") float[] data, @NativeType("ALsizei") int offset) { - long __functionAddress = AL.getICD().alBufferSubDataSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, format, data, offset, data.length << 2, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBuffer.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBuffer.java deleted file mode 100644 index 5b423e18..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBuffer.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_callback_buffer extension. - * - *

    This extension provides a mechanism for applications to provide sample data to the audio device in real-time.

    - * - *

    Standard OpenAL sources can read samples from a pre-loaded static buffer, or from a queue of prepared buffers that can be fed in over time. In both - * cases, an application needs to prepare all or some of the audio samples ahead of time to ensure proper continuous playback. A callback mechanism allows - * applications to generate audio as needed, without having to prepare samples ahead of time, and to implement their own streaming interface instead of - * having to fill, queue, and manage multiple OpenAL buffers per stream.

    - */ -public class SOFTCallbackBuffer { - - /** Accepted as the {@code param} parameter of {@link #alGetBufferPtrSOFT GetBufferPtrSOFT} and {@link #alGetBufferPtrvSOFT GetBufferPtrvSOFT}. */ - public static final int - AL_BUFFER_CALLBACK_FUNCTION_SOFT = 0x19A0, - AL_BUFFER_CALLBACK_USER_PARAM_SOFT = 0x19A1; - - protected SOFTCallbackBuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ alBufferCallbackSOFT ] --- - - /** Unsafe version of: {@link #alBufferCallbackSOFT BufferCallbackSOFT} */ - public static void nalBufferCallbackSOFT(int buffer, int format, int freq, long callback, long userptr) { - long __functionAddress = AL.getICD().alBufferCallbackSOFT; - if (CHECKS) { - check(__functionAddress); - check(userptr); - } - invokePPV(buffer, format, freq, callback, userptr, __functionAddress); - } - - /** - * Instead of storing sample data, a buffer may be given a callback function which will be invoked when the source it's attached to needs more samples to - * mix. To specify a callback for a buffer, use {@code alBufferCallbackSOFT}. - * - *

    After a successful call, any sample data that was stored in the buffer is removed.

    - * - *

    A buffer with a callback cannot be queued onto a streaming source, and it can only be set on one static source at a time. Attempting to queue such a - * buffer on a source, or attempting to set it on a source while it's already on one, will generate an {@link AL10#AL_INVALID_OPERATION INVALID_OPERATION} error.

    - * - *

    A subsequent successful call to {@link AL10#alBufferData BufferData} will remove the callback from the buffer, and make it a normal non-callback buffer.

    - * - * @param format the sample format that will be expected from the callback - * @param freq the base sample rate the samples will play at - * @param userptr stored with the {@code callback} pointer. Any data it references is not copied - */ - @NativeType("ALvoid") - public static void alBufferCallbackSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int format, @NativeType("ALsizei") int freq, @NativeType("ALBUFFERCALLBACKTYPESOFT") SOFTCallbackBufferTypeI callback, @NativeType("ALvoid *") long userptr) { - nalBufferCallbackSOFT(buffer, format, freq, callback.address(), userptr); - } - - // --- [ alGetBufferPtrSOFT ] --- - - public static void nalGetBufferPtrSOFT(int buffer, int param, long ptr) { - long __functionAddress = AL.getICD().alGetBufferPtrSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, param, ptr, __functionAddress); - } - - @NativeType("ALvoid") - public static void alGetBufferPtrSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param, @NativeType("ALvoid **") PointerBuffer ptr) { - if (CHECKS) { - check(ptr, 1); - } - nalGetBufferPtrSOFT(buffer, param, memAddress(ptr)); - } - - @NativeType("ALvoid") - public static long alGetBufferPtrSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer ptr = stack.callocPointer(1); - nalGetBufferPtrSOFT(buffer, param, memAddress(ptr)); - return ptr.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetBuffer3PtrSOFT ] --- - - public static void nalGetBuffer3PtrSOFT(int buffer, int param, long ptr0, long ptr1, long ptr2) { - long __functionAddress = AL.getICD().alGetBuffer3PtrSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePPPV(buffer, param, ptr0, ptr1, ptr2, __functionAddress); - } - - @NativeType("ALvoid") - public static void alGetBuffer3PtrSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param, @NativeType("ALvoid **") PointerBuffer ptr0, @NativeType("ALvoid **") PointerBuffer ptr1, @NativeType("ALvoid **") PointerBuffer ptr2) { - if (CHECKS) { - check(ptr0, 1); - check(ptr1, 1); - check(ptr2, 1); - } - nalGetBuffer3PtrSOFT(buffer, param, memAddress(ptr0), memAddress(ptr1), memAddress(ptr2)); - } - - // --- [ alGetBufferPtrvSOFT ] --- - - public static void nalGetBufferPtrvSOFT(int buffer, int param, long ptr) { - long __functionAddress = AL.getICD().alGetBufferPtrvSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(buffer, param, ptr, __functionAddress); - } - - @NativeType("ALvoid") - public static void alGetBufferPtrvSOFT(@NativeType("ALuint") int buffer, @NativeType("ALenum") int param, @NativeType("ALvoid **") PointerBuffer ptr) { - if (CHECKS) { - check(ptr, 1); - } - nalGetBufferPtrvSOFT(buffer, param, memAddress(ptr)); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBufferType.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBufferType.java deleted file mode 100644 index d133b4a5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBufferType.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     ALvoid *userptr,
    - *     ALvoid *sampledata,
    - *     ALsizei numbytes
    - * )
    - */ -public abstract class SOFTCallbackBufferType extends Callback implements SOFTCallbackBufferTypeI { - - /** - * Creates a {@code SOFTCallbackBufferType} instance from the specified function pointer. - * - * @return the new {@code SOFTCallbackBufferType} - */ - public static SOFTCallbackBufferType create(long functionPointer) { - SOFTCallbackBufferTypeI instance = Callback.get(functionPointer); - return instance instanceof SOFTCallbackBufferType - ? (SOFTCallbackBufferType)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static SOFTCallbackBufferType createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code SOFTCallbackBufferType} instance that delegates to the specified {@code SOFTCallbackBufferTypeI} instance. */ - public static SOFTCallbackBufferType create(SOFTCallbackBufferTypeI instance) { - return instance instanceof SOFTCallbackBufferType - ? (SOFTCallbackBufferType)instance - : new Container(instance.address(), instance); - } - - protected SOFTCallbackBufferType() { - super(CIF); - } - - SOFTCallbackBufferType(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends SOFTCallbackBufferType { - - private final SOFTCallbackBufferTypeI delegate; - - Container(long functionPointer, SOFTCallbackBufferTypeI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long userptr, long sampledata, int numbytes) { - return delegate.invoke(userptr, sampledata, numbytes); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBufferTypeI.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBufferTypeI.java deleted file mode 100644 index a37bd7e9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTCallbackBufferTypeI.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     ALvoid *userptr,
    - *     ALvoid *sampledata,
    - *     ALsizei numbytes
    - * )
    - */ -@FunctionalInterface -@NativeType("ALBUFFERCALLBACKTYPESOFT") -public interface SOFTCallbackBufferTypeI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_pointer, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** - * @param userptr the same pointer provided to {@link SOFTCallbackBuffer#alBufferCallbackSOFT BufferCallbackSOFT} - * @param sampledata a pointer to the sample data buffer that should be filled in by the function - * @param numbytes the number of bytes needed to fill the sample data buffer for this invocation. - * - *

    Guaranteed to be greater than 0 and a multiple of the frame size for the format.

    - * - * @return the number of bytes actually written, which must be equal to or less than {@code numbytes}. - * - *

    If the return value is less than {@code numbytes}, it's treated as the end of the buffer and the source will play any complete samples before stopping.

    - */ - @NativeType("void *") long invoke(@NativeType("ALvoid *") long userptr, @NativeType("ALvoid *") long sampledata, @NativeType("ALsizei") int numbytes); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDeferredUpdates.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTDeferredUpdates.java deleted file mode 100644 index d3498c7b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDeferredUpdates.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the SOFT_deferred_updates extension. - * - *

    This extension allows applications to defer playback state updates. With unextended OpenAL, the playback state would respond to changes as soon as it - * could handle them, which makes it effectively impossible to ensure multiple changes occur at the same time without the potential of a "partial" update - * (where one change is heard without the other). This extension provides a way to prevent state updates from occuring until they've all been done, where - * they will all apply at once.

    - */ -public class SOFTDeferredUpdates { - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetBoolean GetBoolean}, {@link AL10#alGetBooleanv GetBooleanv} (as well as the Integer, Float, and Double variants). */ - public static final int AL_DEFERRED_UPDATES_SOFT = 0xC002; - - protected SOFTDeferredUpdates() { - throw new UnsupportedOperationException(); - } - - // --- [ alDeferUpdatesSOFT ] --- - - /** - * Sometimes it is desirable to ensure multiple state changes take effect at the same time. Normally this isn't possible due to the AL processing updates - * asychronously, so the playback state can be updated with only part of the changes having been specified. An application can prevent these updates by - * calling this function. - * - *

    When called, samples will continue to render and be sent to the output device, but the effects of changing playback properties, such as the source or - * listener gain, or auxiliary slot gain or effect if EFX is supported, among others, will be deferred. Multiple changes can be batched so that they all - * apply at once at a later time.

    - */ - @NativeType("ALvoid") - public static void alDeferUpdatesSOFT() { - long __functionAddress = AL.getICD().alDeferUpdatesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokeV(__functionAddress); - } - - // --- [ alProcessUpdatesSOFT ] --- - - /** - * Resumes updates. - * - *

    Once called, all pending deferred updates will be processed. Any following state changes will also apply as normal.

    - */ - @NativeType("ALvoid") - public static void alProcessUpdatesSOFT() { - long __functionAddress = AL.getICD().alProcessUpdatesSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokeV(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDeviceClock.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTDeviceClock.java deleted file mode 100644 index 713fbf31..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDeviceClock.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_device_clock extension. - * - *

    This extension allows applications to query the timing clock from the audio device. This clock lets applications measure the passage of time as the - * audio device sees it, which may be slightly different than the system clock's tick rate (the infamous timer drift).

    - * - *

    If the {@link SOFTPauseDevice SOFT_pause_device} extension is available, the device clock does not increment while the device playback is paused. It is - * implementation-defined whether or not the device clock increments while no contexts are allocated. The initial clock time value of an opened device is - * also implementation-defined, except that it must not be negative and should be low enough to avoid wrapping during program execution.

    - * - *

    Requires {@link SOFTSourceLatency SOFT_source_latency}

    - */ -public class SOFTDeviceClock { - - /** Accepted as the {@code pname} parameter of {@link #alcGetInteger64vSOFT GetInteger64vSOFT}. */ - public static final int - ALC_DEVICE_CLOCK_SOFT = 0x1600, - ALC_DEVICE_LATENCY_SOFT = 0x1601, - ALC_DEVICE_CLOCK_LATENCY_SOFT = 0x1602; - - /** - * Accepted as the {@code param} parameter of {@link SOFTSourceLatency#alGetSourcei64vSOFT GetSourcei64vSOFT}. - * - *

    Returns the playback position, expressed in fixed-point samples, along with the device clock, expressed in nanoseconds. This attribute is read-only.

    - * - *

    The first value in the returned vector is the sample offset, which is a 32.32 fixed-point value. The whole number is stored in the upper 32 bits and - * the fractional component is in the lower 32 bits. The value is similar to that returned by {@link AL11#AL_SAMPLE_OFFSET SAMPLE_OFFSET}, just with more precision.

    - * - *

    The second value is the device clock, in nanoseconds. This updates at the same rate as the offset, and both are measured atomically with respect to one - * another.

    - */ - public static final int AL_SAMPLE_OFFSET_CLOCK_SOFT = 0x1202; - - /** - * Accepted as the {@code param} parameter of {@link SOFTSourceLatency#alGetSourcedvSOFT GetSourcedvSOFT}. - * - *

    Returns the playback position, along with the device clock, both expressed in seconds. This attribute is read-only.

    - * - *

    The first value in the returned vector is the offset in seconds. The value is similar to that returned by {@link AL11#AL_SEC_OFFSET SEC_OFFSET}, just with more precision.

    - * - *

    The second value is the device clock, in seconds. This updates at the same rate as the offset, and both are measured atomically with respect to one - * another. Be aware that this value may be subtly different from the other device clock queries due to the variable precision of floating-point values.

    - */ - public static final int AL_SEC_OFFSET_CLOCK_SOFT = 0x1203; - - protected SOFTDeviceClock() { - throw new UnsupportedOperationException(); - } - - // --- [ alcGetInteger64vSOFT ] --- - - /** Unsafe version of: {@link #alcGetInteger64vSOFT GetInteger64vSOFT} */ - public static void nalcGetInteger64vSOFT(long device, int pname, int size, long values) { - long __functionAddress = ALC.getICD().alcGetInteger64vSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePPV(device, pname, size, values, __functionAddress); - } - - /** - * Accepts all the same {@link AL10#alGetIntegerv GetIntegerv} queries, in addition to some new ones. - * - *

    Note that the size parameter is the number of {@code ALCint64SOFT} elements in the buffer provided, not the number of bytes.

    - * - * @param pname - * - * - * - *
    {@link #ALC_DEVICE_CLOCK_SOFT DEVICE_CLOCK_SOFT}The audio device clock time, expressed in nanoseconds. {@code NULL} is an invalid device.
    {@link #ALC_DEVICE_LATENCY_SOFT DEVICE_LATENCY_SOFT}The current audio device latency, in nanoseconds. This is effectively the delay for the samples rendered at the the device's current - * clock time fromreaching the physical output. {@code NULL} is an invalid device.
    {@link #ALC_DEVICE_CLOCK_LATENCY_SOFT DEVICE_CLOCK_LATENCY_SOFT}Expects a destination size of 2, and provides both the audio device clock time and latency, both in nanoseconds. The two values are - * measured atomically with respect to one another (i.e. the latency value was measured at the same time the device clock value was - * retrieved). {@code NULL} is an invalid device.
    - */ - @NativeType("ALCvoid") - public static void alcGetInteger64vSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCenum") int pname, @NativeType("ALCint64SOFT *") LongBuffer values) { - nalcGetInteger64vSOFT(device, pname, values.remaining(), memAddress(values)); - } - - /** - * Accepts all the same {@link AL10#alGetIntegerv GetIntegerv} queries, in addition to some new ones. - * - *

    Note that the size parameter is the number of {@code ALCint64SOFT} elements in the buffer provided, not the number of bytes.

    - * - * @param pname - * - * - * - *
    {@link #ALC_DEVICE_CLOCK_SOFT DEVICE_CLOCK_SOFT}The audio device clock time, expressed in nanoseconds. {@code NULL} is an invalid device.
    {@link #ALC_DEVICE_LATENCY_SOFT DEVICE_LATENCY_SOFT}The current audio device latency, in nanoseconds. This is effectively the delay for the samples rendered at the the device's current - * clock time fromreaching the physical output. {@code NULL} is an invalid device.
    {@link #ALC_DEVICE_CLOCK_LATENCY_SOFT DEVICE_CLOCK_LATENCY_SOFT}Expects a destination size of 2, and provides both the audio device clock time and latency, both in nanoseconds. The two values are - * measured atomically with respect to one another (i.e. the latency value was measured at the same time the device clock value was - * retrieved). {@code NULL} is an invalid device.
    - */ - @NativeType("ALCvoid") - public static long alcGetInteger64vSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer values = stack.callocLong(1); - nalcGetInteger64vSOFT(device, pname, 1, memAddress(values)); - return values.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #alcGetInteger64vSOFT GetInteger64vSOFT} */ - @NativeType("ALCvoid") - public static void alcGetInteger64vSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCenum") int pname, @NativeType("ALCint64SOFT *") long[] values) { - long __functionAddress = ALC.getICD().alcGetInteger64vSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePPV(device, pname, values.length, values, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDirectChannels.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTDirectChannels.java deleted file mode 100644 index 47280c29..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDirectChannels.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_direct_channels extension. - * - *

    This extension allows a multi-channel source to play without virtualized output speakers. By default, OpenAL requires buffer channels to be down-mixed - * to the output channel configuration, possibly using HRTF or other virtualization techniques to give a sense of speakers that may not be physically - * present. Sometimes audio tracks are authored with their own spatialization effects, where the AL's virtualization methods can cause a notable decrease - * in audio quality.

    - * - *

    This extension provides a mechanism for applications to specify whether audio should be filtered according to the AL's channel virtualization rules for - * multi-channel buffers.

    - */ -public final class SOFTDirectChannels { - - /** Accepted by the {@code paramName} parameter of {@link AL10#alSourcei Sourcei}, {@link AL11#alSourceiv Sourceiv}, {@link AL10#alGetSourcei GetSourcei}, and {@link AL10#alGetSourceiv GetSourceiv}. */ - public static final int AL_DIRECT_CHANNELS_SOFT = 0x1033; - - private SOFTDirectChannels() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDirectChannelsRemix.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTDirectChannelsRemix.java deleted file mode 100644 index 753bdd08..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTDirectChannelsRemix.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_direct_channels_remix extension. - * - *

    This extension adds the ability to remix channels to the {@link SOFTDirectChannels SOFT_direct_channels} extension. By default, that extension drops input buffer - * channels that don't have a matching output channel. This really only works well for controlled setups where the input and output are known, but - * problems arise when these become variable. An option to remix input channels to the closest output channels will ensure the sound will still be audible - * with as little virtualization as possible.

    - */ -public final class SOFTDirectChannelsRemix { - - /** Accepted as the {@code value} parameter of {@link AL10#alSourcei Sourcei} and {@link AL11#alSourceiv Sourceiv} for the {@link SOFTDirectChannels#AL_DIRECT_CHANNELS_SOFT DIRECT_CHANNELS_SOFT} property. */ - public static final int - AL_DROP_UNMATCHED_SOFT = 0x1, - AL_REMIX_UNMATCHED_SOFT = 0x2; - - private SOFTDirectChannelsRemix() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEffectTarget.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTEffectTarget.java deleted file mode 100644 index 107ac447..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEffectTarget.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_effect_target extension. - * - *

    This extension provides a method to reroute the output of an auxiliary effect slot to the input of another auxiliary effect slot. By default, an effect - * slot's output is added to the main output along side other effect slots and each source's direct path. This makes it impossible to, for example, apply - * an equalizer effect to the output of a chorus effect since the chorus and equalizer effects are processed separately.

    - * - *

    Retargeting an effect slot's output to another effect slot allows chaining multiple effects to create results that aren't possible with standard EFX.

    - */ -public final class SOFTEffectTarget { - - /** - * Specifies the target effect slot for this effect slot's output. - * - *

    The rendered output of this effect slot is added to the input of the specified target effect slot, which will be subsequently processed by the target - * effect slot's effect. Specifying {@link EXTEfx#AL_EFFECTSLOT_NULL EFFECTSLOT_NULL} for the ID reverts the effect slot's output back to the main output.

    - * - *

    An effect slot that is the target of another effect slot cannot be deleted or an {@link AL10#AL_INVALID_OPERATION INVALID_OPERATION} error will be generated. An effect slot cannot be - * set as a target if it would feed its own input through 0 or more other effect slots, or an {@code AL_INVALID_OPERATION} error will be generated.

    - */ - public static final int AL_EFFECTSLOT_TARGET_SOFT = 0x199C; - - private SOFTEffectTarget() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEventProc.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTEventProc.java deleted file mode 100644 index 39f2a6a5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEventProc.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     ALenum eventType,
    - *     ALuint object,
    - *     ALuint param,
    - *     ALsizei length,
    - *     ALchar const *message,
    - *     ALvoid *userParam
    - * )
    - */ -public abstract class SOFTEventProc extends Callback implements SOFTEventProcI { - - /** - * Creates a {@code SOFTEventProc} instance from the specified function pointer. - * - * @return the new {@code SOFTEventProc} - */ - public static SOFTEventProc create(long functionPointer) { - SOFTEventProcI instance = Callback.get(functionPointer); - return instance instanceof SOFTEventProc - ? (SOFTEventProc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static SOFTEventProc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code SOFTEventProc} instance that delegates to the specified {@code SOFTEventProcI} instance. */ - public static SOFTEventProc create(SOFTEventProcI instance) { - return instance instanceof SOFTEventProc - ? (SOFTEventProc)instance - : new Container(instance.address(), instance); - } - - protected SOFTEventProc() { - super(CIF); - } - - SOFTEventProc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends SOFTEventProc { - - private final SOFTEventProcI delegate; - - Container(long functionPointer, SOFTEventProcI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int eventType, int object, int param, int length, long message, long userParam) { - delegate.invoke(eventType, object, param, length, message, userParam); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEventProcI.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTEventProcI.java deleted file mode 100644 index d7797385..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEventProcI.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     ALenum eventType,
    - *     ALuint object,
    - *     ALuint param,
    - *     ALsizei length,
    - *     ALchar const *message,
    - *     ALvoid *userParam
    - * )
    - */ -@FunctionalInterface -@NativeType("ALEVENTPROCSOFT") -public interface SOFTEventProcI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_sint32, ffi_type_uint32, ffi_type_uint32, ffi_type_sint32, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 5 * POINTER_SIZE)) - ); - } - - void invoke(@NativeType("ALenum") int eventType, @NativeType("ALuint") int object, @NativeType("ALuint") int param, @NativeType("ALsizei") int length, @NativeType("ALchar const *") long message, @NativeType("ALvoid *") long userParam); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEvents.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTEvents.java deleted file mode 100644 index e983f524..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTEvents.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_events extension. - * - *

    This extension provides a method for applications to receive notifications about audio events via an asynchronous callback. This can help alleviate the - * need for applications to continually poll the AL to check if an event happened, and instead allow them to respond when events happen. Such events can - * include a source changing state or a device becoming disconnected.

    - */ -public class SOFTEvents { - - /** Accepted as the {@code pname} parameter of {@link #alGetPointerSOFT GetPointerSOFT} and {@link #alGetPointervSOFT GetPointervSOFT}. */ - public static final int - AL_EVENT_CALLBACK_FUNCTION_SOFT = 0x19A2, - AL_EVENT_CALLBACK_USER_PARAM_SOFT = 0x19A3; - - /** - * Accepted as an element in the {@code types} parameter of {@link #alEventControlSOFT EventControlSOFT}, and provided as the {@code eventType} parameter of - * {@code ALEVENTPROCSOFT} callback functions. - */ - public static final int - AL_EVENT_TYPE_BUFFER_COMPLETED_SOFT = 0x19A4, - AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT = 0x19A5, - AL_EVENT_TYPE_DISCONNECTED_SOFT = 0x19A6; - - protected SOFTEvents() { - throw new UnsupportedOperationException(); - } - - // --- [ alEventControlSOFT ] --- - - public static void nalEventControlSOFT(int count, long types, boolean enable) { - long __functionAddress = AL.getICD().alEventControlSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(count, types, enable, __functionAddress); - } - - public static void alEventControlSOFT(@NativeType("ALenum const *") IntBuffer types, @NativeType("ALboolean") boolean enable) { - nalEventControlSOFT(types.remaining(), memAddress(types), enable); - } - - // --- [ alEventCallbackSOFT ] --- - - public static void nalEventCallbackSOFT(long callback, long userParam) { - long __functionAddress = AL.getICD().alEventCallbackSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePPV(callback, userParam, __functionAddress); - } - - public static void alEventCallbackSOFT(@NativeType("ALEVENTPROCSOFT") SOFTEventProcI callback, @Nullable @NativeType("ALvoid *") ByteBuffer userParam) { - nalEventCallbackSOFT(callback.address(), memAddressSafe(userParam)); - } - - // --- [ alGetPointerSOFT ] --- - - @NativeType("ALvoid *") - public static long alGetPointerSOFT(@NativeType("ALenum") int pname) { - long __functionAddress = AL.getICD().alGetPointerSOFT; - if (CHECKS) { - check(__functionAddress); - } - return invokeP(pname, __functionAddress); - } - - // --- [ alGetPointervSOFT ] --- - - public static void nalGetPointervSOFT(int pname, long values) { - long __functionAddress = AL.getICD().alGetPointervSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(pname, values, __functionAddress); - } - - public static void alGetPointervSOFT(@NativeType("ALenum") int pname, @NativeType("ALvoid **") PointerBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetPointervSOFT(pname, memAddress(values)); - } - - /** Array version of: {@link #alEventControlSOFT EventControlSOFT} */ - public static void alEventControlSOFT(@NativeType("ALenum const *") int[] types, @NativeType("ALboolean") boolean enable) { - long __functionAddress = AL.getICD().alEventControlSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(types.length, types, enable, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTGainClampEx.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTGainClampEx.java deleted file mode 100644 index aee9cc83..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTGainClampEx.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_gain_clamp_ex extension. - * - *

    This extension extends the gain clamping mechanism in standard AL. By default, OpenAL allows the source's and listener's {@link AL10#AL_GAIN GAIN} property to be set to - * any value that's greater-than or equal-to 0. The calculated source gain is clamped between its {@link AL10#AL_MIN_GAIN MIN_GAIN} and {@link AL10#AL_MAX_GAIN MAX_GAIN} properties after distance - * attenuation and the directional cone is applied, and before the listener gain is applied, however these two clamping properties are themselves - * restricted to being between 0 and 1 (inclusive).

    - * - *

    That behavior effectively nullifies any purpose of setting a source's gain being above 1, as the source's distance- and cone-related properties can be - * modified for the same effect. Oddly, the listener gain is applied to the source gain *after* the clamping, so it is still possible for the final - * calculated gain to exceed 1. On top of this, the spec allows an implementation the option to implicitly clamp the final calculated gain for the source - * as needed, but provides no means for applications to detect such behavior.

    - * - *

    This extension aims to fix those problems by removing the maximum limit for {@link AL10#AL_MIN_GAIN MIN_GAIN} and {@link AL10#AL_MAX_GAIN MAX_GAIN}, allowing applications to increase the effective - * source gain above 1. Additionally, it provides a query for the application to retrieve the implicit clamp level an implementation may put on the final - * calculated gain.

    - */ -public final class SOFTGainClampEx { - - /** An implementation-defined maximum per-source gain limit (guaranteed to be at least 1). */ - public static final int AL_GAIN_LIMIT_SOFT = 0x200E; - - private SOFTGainClampEx() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTHRTF.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTHRTF.java deleted file mode 100644 index 97b69798..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTHRTF.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_HRTF extension. - * - *

    This extension allows an application to request and determine the status of HRTF mixing. HRTF, or Head-Related Transfer Function, is a method of mixing - * 3D audio for "true" 3D panning, typically using filters designed to simulate how sound is affected by a listener's head as the sound waves travel - * between the ears.

    - * - *

    As a 3D sound API, OpenAL's design allows implementations to transparently render audio using HRTF. However, the OpenAL API currently has no concept of - * HRTF so there's no way to query if it's being used, and no way for an application to request it on behalf of the user. This aims to fix that.

    - */ -public class SOFTHRTF { - - /** - * Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext} and {@link #alcResetDeviceSOFT ResetDeviceSOFT}, and as the {@code paramName} parameter of - * {@link ALC10#alcGetIntegerv GetIntegerv}. - */ - public static final int ALC_HRTF_SOFT = 0x1992; - - /** Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext} and {@link #alcResetDeviceSOFT ResetDeviceSOFT}. */ - public static final int ALC_HRTF_ID_SOFT = 0x1996; - - /** Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext} and {@link #alcResetDeviceSOFT ResetDeviceSOFT}, for the {@link #ALC_HRTF_SOFT HRTF_SOFT} attribute. */ - public static final int ALC_DONT_CARE_SOFT = 0x2; - - /** Accepted as the {@code paramName} parameter of {@link ALC10#alcGetIntegerv GetIntegerv}. */ - public static final int - ALC_HRTF_STATUS_SOFT = 0x1993, - ALC_NUM_HRTF_SPECIFIERS_SOFT = 0x1994; - - /** Accepted as the {@code paramName} parameter of {@link ALC10#alcGetString GetString} and {@link #alcGetStringiSOFT GetStringiSOFT}. */ - public static final int ALC_HRTF_SPECIFIER_SOFT = 0x1995; - - /** Possible results from a {@link #ALC_HRTF_STATUS_SOFT HRTF_STATUS_SOFT} query. */ - public static final int - ALC_HRTF_DISABLED_SOFT = 0x0, - ALC_HRTF_ENABLED_SOFT = 0x1, - ALC_HRTF_DENIED_SOFT = 0x2, - ALC_HRTF_REQUIRED_SOFT = 0x3, - ALC_HRTF_HEADPHONES_DETECTED_SOFT = 0x4, - ALC_HRTF_UNSUPPORTED_FORMAT_SOFT = 0x5; - - protected SOFTHRTF() { - throw new UnsupportedOperationException(); - } - - // --- [ alcGetStringiSOFT ] --- - - /** Unsafe version of: {@link #alcGetStringiSOFT GetStringiSOFT} */ - public static long nalcGetStringiSOFT(long device, int paramName, int index) { - long __functionAddress = ALC.getICD().alcGetStringiSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return invokePP(device, paramName, index, __functionAddress); - } - - /** - * Returns a human-readable string for an HRTF. - * - *

    The returned string will be an implementation-defined UTF-8 encoded specifier for the given HRTF index, designed for display to the user. The returned - * strings are valid until the next enumeration point or the device is closed.

    - * - * @param device he same one that previously queried the number of HRTF specifiers - * @param paramName the parameter to query. Must be:
    {@link #ALC_HRTF_SPECIFIER_SOFT HRTF_SPECIFIER_SOFT}
    - * @param index an index between 0 (inclusive) and the previously-queried HRTF count (exclusive) - */ - @Nullable - @NativeType("ALCchar const *") - public static String alcGetStringiSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCenum") int paramName, @NativeType("ALCsizei") int index) { - long __result = nalcGetStringiSOFT(device, paramName, index); - return memUTF8Safe(__result); - } - - // --- [ alcResetDeviceSOFT ] --- - - /** Unsafe version of: {@link #alcResetDeviceSOFT ResetDeviceSOFT} */ - public static boolean nalcResetDeviceSOFT(long device, long attrList) { - long __functionAddress = ALC.getICD().alcResetDeviceSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return invokePPZ(device, attrList, __functionAddress); - } - - /** - * Resets a device after it is opened for playback, to attempt changing the playback properties. - * - * @param device a handle to a valid playback device as returned by {@link ALC10#alcOpenDevice OpenDevice}, otherwise the call fails and an {@link ALC10#ALC_INVALID_DEVICE INVALID_DEVICE} error is generated - * @param attrList the same as what could be passed to {@link ALC10#alcCreateContext CreateContext}. The AL is allowed to ignore attributes and attribute value combinations the device - * cannot support, for example if the device doesn't support the requested {@link ALC10#ALC_FREQUENCY FREQUENCY} value, another value it does support may be set. - * - * @return on success the function returns {@link ALC10#ALC_TRUE TRUE}, and on failure the function returns {@link ALC10#ALC_FALSE FALSE}. Note that a return of {@link ALC10#ALC_TRUE TRUE} does not - * indicate any attributes were honored, just that the device was successfully reset. If you need to know what the attributes are after a reset, query the - * device using {@link ALC10#alcGetIntegerv GetIntegerv} with the relevant attributes. - */ - @NativeType("ALCboolean") - public static boolean alcResetDeviceSOFT(@NativeType("ALCdevice *") long device, @Nullable @NativeType("ALCint const *") IntBuffer attrList) { - if (CHECKS) { - checkNTSafe(attrList); - } - return nalcResetDeviceSOFT(device, memAddressSafe(attrList)); - } - - /** Array version of: {@link #alcResetDeviceSOFT ResetDeviceSOFT} */ - @NativeType("ALCboolean") - public static boolean alcResetDeviceSOFT(@NativeType("ALCdevice *") long device, @Nullable @NativeType("ALCint const *") int[] attrList) { - long __functionAddress = ALC.getICD().alcResetDeviceSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - checkNTSafe(attrList); - } - return invokePPZ(device, attrList, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopPoints.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopPoints.java deleted file mode 100644 index 1c5146d1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopPoints.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_loop_points extension. - * - *

    This extension allows an application to specify the offsets at which a buffer loops. Unextended OpenAL only allows for a source to loop a whole buffer, - * or all buffers of a queue, which is not desirable for sounds that may want a lead-in or lead-out along with the looping portion.

    - */ -public final class SOFTLoopPoints { - - /** Accepted by the {@code paramName} parameter of {@link AL11#alBufferiv Bufferiv} and {@link AL11#alGetBufferiv GetBufferiv}. */ - public static final int AL_LOOP_POINTS_SOFT = 0x2015; - - private SOFTLoopPoints() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopback.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopback.java deleted file mode 100644 index bcc993fa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopback.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_loopback extension. - * - *

    This extension allows an application to read back OpenAL's rendered audio instead of having it output to an audio device on the system. Unextended - * OpenAL will output audio to an audio device, with no mechanism to allow an application to divert the audio somewhere else.

    - */ -public class SOFTLoopback { - - /** Accepted by the {@code type} parameter of {@link #alcIsRenderFormatSupportedSOFT IsRenderFormatSupportedSOFT}. */ - public static final int - ALC_BYTE_SOFT = 0x1400, - ALC_UNSIGNED_BYTE_SOFT = 0x1401, - ALC_SHORT_SOFT = 0x1402, - ALC_UNSIGNED_SHORT_SOFT = 0x1403, - ALC_INT_SOFT = 0x1404, - ALC_UNSIGNED_INT_SOFT = 0x1405, - ALC_FLOAT_SOFT = 0x1406; - - /** Accepted by the {@code channels} parameter of {@link #alcIsRenderFormatSupportedSOFT IsRenderFormatSupportedSOFT}. */ - public static final int - ALC_MONO_SOFT = 0x1500, - ALC_STEREO_SOFT = 0x1501, - ALC_QUAD_SOFT = 0x1503, - ALC_5POINT1_SOFT = 0x1504, - ALC_6POINT1_SOFT = 0x1505, - ALC_7POINT1_SOFT = 0x1506; - - /** Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext}. */ - public static final int - ALC_FORMAT_CHANNELS_SOFT = 0x1990, - ALC_FORMAT_TYPE_SOFT = 0x1991; - - protected SOFTLoopback() { - throw new UnsupportedOperationException(); - } - - // --- [ alcLoopbackOpenDeviceSOFT ] --- - - /** Unsafe version of: {@link #alcLoopbackOpenDeviceSOFT LoopbackOpenDeviceSOFT} */ - public static long nalcLoopbackOpenDeviceSOFT(long deviceName) { - long __functionAddress = ALC.getICD().alcLoopbackOpenDeviceSOFT; - if (CHECKS) { - check(__functionAddress); - } - return invokePP(deviceName, __functionAddress); - } - - /** - * Loopback devices provide a way for applications to "read back" rendered audio without it being sent to an actual audio device. It allows applications to - * render audio as fast or slow as it needs, making it suitable for non-real-time rendering, and so it can be passed to an audio codec or something for - * further processing. - * - *

    To open a loopback device, use this function.

    - * - *

    A loopback device behaves largely the same as a playback device. You may query playback state and error codes, and create contexts, which can then be - * set as current to generate sources and buffers like normal.

    - * - *

    Note that loopback devices do not have either the {@link ALC10#ALC_SYNC SYNC} or {@link ALC10#ALC_REFRESH REFRESH} attributes. Attempting to query them will result in an {@link ALC10#ALC_INVALID_ENUM INVALID_ENUM} - * error.

    - * - * @param deviceName which device or device driver to use for subsequent rendering. This may be {@code NULL} for an implementation-defined default, otherwise it must be a - * valid name returned by enumeration (and further must be a device capable of loopback rendering). - */ - @NativeType("ALCdevice *") - public static long alcLoopbackOpenDeviceSOFT(@Nullable @NativeType("ALCchar const *") ByteBuffer deviceName) { - if (CHECKS) { - checkNT1Safe(deviceName); - } - return nalcLoopbackOpenDeviceSOFT(memAddressSafe(deviceName)); - } - - /** - * Loopback devices provide a way for applications to "read back" rendered audio without it being sent to an actual audio device. It allows applications to - * render audio as fast or slow as it needs, making it suitable for non-real-time rendering, and so it can be passed to an audio codec or something for - * further processing. - * - *

    To open a loopback device, use this function.

    - * - *

    A loopback device behaves largely the same as a playback device. You may query playback state and error codes, and create contexts, which can then be - * set as current to generate sources and buffers like normal.

    - * - *

    Note that loopback devices do not have either the {@link ALC10#ALC_SYNC SYNC} or {@link ALC10#ALC_REFRESH REFRESH} attributes. Attempting to query them will result in an {@link ALC10#ALC_INVALID_ENUM INVALID_ENUM} - * error.

    - * - * @param deviceName which device or device driver to use for subsequent rendering. This may be {@code NULL} for an implementation-defined default, otherwise it must be a - * valid name returned by enumeration (and further must be a device capable of loopback rendering). - */ - @NativeType("ALCdevice *") - public static long alcLoopbackOpenDeviceSOFT(@Nullable @NativeType("ALCchar const *") CharSequence deviceName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(deviceName, true); - long deviceNameEncoded = deviceName == null ? NULL : stack.getPointerAddress(); - return nalcLoopbackOpenDeviceSOFT(deviceNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alcIsRenderFormatSupportedSOFT ] --- - - /** - * When creating contexts, the attribute list must specify the format used for rendering. This is done with the {@link #ALC_FORMAT_CHANNELS_SOFT FORMAT_CHANNELS_SOFT}, {@link #ALC_FORMAT_TYPE_SOFT FORMAT_TYPE_SOFT}, - * and {@link ALC10#ALC_FREQUENCY FREQUENCY} attributes. This controls the format of the audio subsequently rendered by the device. - * - *

    To check if a particular rendering format is available, use this function.

    - * - * @param device the loopback device to query - * @param frequency the sample rate of the rendered audio - * @param channels the channel configuration used for rendering. One of:
    {@link #ALC_MONO_SOFT MONO_SOFT}{@link #ALC_STEREO_SOFT STEREO_SOFT}{@link #ALC_QUAD_SOFT QUAD_SOFT}{@link #ALC_5POINT1_SOFT 5POINT1_SOFT}{@link #ALC_6POINT1_SOFT 6POINT1_SOFT}{@link #ALC_7POINT1_SOFT 7POINT1_SOFT}
    - * @param type sample type of the written audio. One of:
    {@link #ALC_BYTE_SOFT BYTE_SOFT}{@link #ALC_UNSIGNED_BYTE_SOFT UNSIGNED_BYTE_SOFT}{@link #ALC_SHORT_SOFT SHORT_SOFT}{@link #ALC_UNSIGNED_SHORT_SOFT UNSIGNED_SHORT_SOFT}{@link #ALC_INT_SOFT INT_SOFT}{@link #ALC_UNSIGNED_INT_SOFT UNSIGNED_INT_SOFT}
    {@link #ALC_FLOAT_SOFT FLOAT_SOFT}
    - */ - @NativeType("ALCboolean") - public static boolean alcIsRenderFormatSupportedSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCsizei") int frequency, @NativeType("ALCenum") int channels, @NativeType("ALCenum") int type) { - long __functionAddress = ALC.getICD().alcIsRenderFormatSupportedSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return invokePZ(device, frequency, channels, type, __functionAddress); - } - - // --- [ alcRenderSamplesSOFT ] --- - - /** Unsafe version of: {@link #alcRenderSamplesSOFT RenderSamplesSOFT} */ - public static void nalcRenderSamplesSOFT(long device, long buffer, int samples) { - long __functionAddress = ALC.getICD().alcRenderSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - - /** - * The state of various objects on loopback devices (including processed buffers and source offsets) is processed only when new samples are rendered. To - * render samples, use this function. - * - * @param device the loopback device which samples are rendered from, using its contexts and associated buffers and sources - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to render - */ - @NativeType("ALCvoid") - public static void alcRenderSamplesSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") ByteBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcRenderSamplesSOFT(device, memAddress(buffer), samples); - } - - /** - * The state of various objects on loopback devices (including processed buffers and source offsets) is processed only when new samples are rendered. To - * render samples, use this function. - * - * @param device the loopback device which samples are rendered from, using its contexts and associated buffers and sources - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to render - */ - @NativeType("ALCvoid") - public static void alcRenderSamplesSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") ShortBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcRenderSamplesSOFT(device, memAddress(buffer), samples); - } - - /** - * The state of various objects on loopback devices (including processed buffers and source offsets) is processed only when new samples are rendered. To - * render samples, use this function. - * - * @param device the loopback device which samples are rendered from, using its contexts and associated buffers and sources - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to render - */ - @NativeType("ALCvoid") - public static void alcRenderSamplesSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") IntBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcRenderSamplesSOFT(device, memAddress(buffer), samples); - } - - /** - * The state of various objects on loopback devices (including processed buffers and source offsets) is processed only when new samples are rendered. To - * render samples, use this function. - * - * @param device the loopback device which samples are rendered from, using its contexts and associated buffers and sources - * @param buffer the buffer that will receive the samples. It must be big enough to contain at least {@code samples} sample frames. - * @param samples the number of sample frames to render - */ - @NativeType("ALCvoid") - public static void alcRenderSamplesSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") FloatBuffer buffer, @NativeType("ALCsizei") int samples) { - nalcRenderSamplesSOFT(device, memAddress(buffer), samples); - } - - /** Array version of: {@link #alcRenderSamplesSOFT RenderSamplesSOFT} */ - @NativeType("ALCvoid") - public static void alcRenderSamplesSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") short[] buffer, @NativeType("ALCsizei") int samples) { - long __functionAddress = ALC.getICD().alcRenderSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - - /** Array version of: {@link #alcRenderSamplesSOFT RenderSamplesSOFT} */ - @NativeType("ALCvoid") - public static void alcRenderSamplesSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") int[] buffer, @NativeType("ALCsizei") int samples) { - long __functionAddress = ALC.getICD().alcRenderSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - - /** Array version of: {@link #alcRenderSamplesSOFT RenderSamplesSOFT} */ - @NativeType("ALCvoid") - public static void alcRenderSamplesSOFT(@NativeType("ALCdevice *") long device, @NativeType("ALCvoid *") float[] buffer, @NativeType("ALCsizei") int samples) { - long __functionAddress = ALC.getICD().alcRenderSamplesSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePPV(device, buffer, samples, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopbackBformat.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopbackBformat.java deleted file mode 100644 index c69501dd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTLoopbackBformat.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the ALC_SOFT_loopback_bformat extension. - * - *

    This extension allows a loopback device to render B-Format audio channels. The base loopback extension provides for discrete channel mixes, while - * sometimes a non-discrete soundfield mix may be desirable, for instance if recording a 3D video or passing the output to an external ambisonic decoder.

    - */ -public final class SOFTLoopbackBformat { - - /** - * Accepted as parameters for {@link SOFTLoopback#ALC_FORMAT_CHANNELS_SOFT FORMAT_CHANNELS_SOFT} in the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext}, and by the {@code channels} parameter of - * {@link SOFTLoopback#alcIsRenderFormatSupportedSOFT IsRenderFormatSupportedSOFT}. - */ - public static final int ALC_BFORMAT3D_SOFT = 0x1507; - - /** Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext}. */ - public static final int - ALC_AMBISONIC_LAYOUT_SOFT = 0x1997, - ALC_AMBISONIC_SCALING_SOFT = 0x1998, - ALC_AMBISONIC_ORDER_SOFT = 0x1999; - - /** Accepted as parameters for {@link #ALC_AMBISONIC_LAYOUT_SOFT AMBISONIC_LAYOUT_SOFT} in the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext}. */ - public static final int - ALC_FUMA_SOFT = 0x0, - ALC_ACN_SOFT = 0x1; - - /** Accepted as parameters for {@link #ALC_AMBISONIC_SCALING_SOFT AMBISONIC_SCALING_SOFT} in the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext}. */ - public static final int - ALC_SN3D_SOFT = 0x1, - ALC_N3D_SOFT = 0x2; - - /** Accepted as the {@code paramName} parameter of {@link AL10#alGetIntegerv GetIntegerv}. */ - public static final int ALC_MAX_AMBISONIC_ORDER_SOFT = 0x199B; - - private SOFTLoopbackBformat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTMSADPCM.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTMSADPCM.java deleted file mode 100644 index fa355c02..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTMSADPCM.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_MSADPCM extension. - * - *

    This extension adds support for MSADPCM compressed sample formats.

    - */ -public final class SOFTMSADPCM { - - /** Accepted by the {@code format} parameter of {@link AL10#alBufferData BufferData}. */ - public static final int - AL_FORMAT_MONO_MSADPCM_SOFT = 0x1302, - AL_FORMAT_STEREO_MSADPCM_SOFT = 0x1303; - - private SOFTMSADPCM() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTOutputLimiter.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTOutputLimiter.java deleted file mode 100644 index cc50136e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTOutputLimiter.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_output_limiter extension. - * - *

    This extension allows an application to control OpenAL Soft's output limiter. OpenAL Soft 1.18 adds an output limiter to prevent excessive clipping on - * the output, and this extension allows applications to turn it off or on.

    - */ -public final class SOFTOutputLimiter { - - /** Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext} and {@link SOFTHRTF#alcResetDeviceSOFT ResetDeviceSOFT}, and as the {@code paramName} parameter of {@link AL10#alGetIntegerv GetIntegerv}. */ - public static final int ALC_OUTPUT_LIMITER_SOFT = 0x199A; - - private SOFTOutputLimiter() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTOutputMode.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTOutputMode.java deleted file mode 100644 index 18d0a6ab..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTOutputMode.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_output_mode extension. - * - *

    This extension provides a method for applications to request a particular output mode for playback devices, and query what's in use. With standard - * OpenAL, the output mode is at the sole discretion of the library, with the application having no way to know what's being used. While this works fine - * most of the time (typically the library will be able to query the system configuration and auto-select a mode to match, and the app handles sounds as - * being in 3D space), this is sometimes not possible or the most ideal option for all use-cases. There are also cases where a desirable output mode isn't - * distinguishable by the device configuration, for example with stereo vs UHJ vs HRTF.

    - */ -public final class SOFTOutputMode { - - /** Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext} and as the {@code paramName} parameter of {@link AL10#alGetIntegerv GetIntegerv}. */ - public static final int ALC_OUTPUT_MODE_SOFT = 0x19AC; - - /** Accepted as part of the {@code attrList} parameter of {@link ALC10#alcCreateContext CreateContext}, for the {@link #ALC_OUTPUT_MODE_SOFT OUTPUT_MODE_SOFT} attribute. */ - public static final int - ALC_ANY_SOFT = 0x19AD, - ALC_MONO_SOFT = 0x1500, - ALC_STEREO_SOFT = 0x1501, - ALC_STEREO_BASIC_SOFT = 0x19AE, - ALC_STEREO_UHJ_SOFT = 0x19AF, - ALC_STEREO_HRTF_SOFT = 0x19B2, - ALC_QUAD_SOFT = 0x1503, - ALC_SURROUND_5_1_SOFT = 0x1504, - ALC_SURROUND_6_1_SOFT = 0x1505, - ALC_SURROUND_7_1_SOFT = 0x1506; - - private SOFTOutputMode() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTPauseDevice.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTPauseDevice.java deleted file mode 100644 index 7683dce4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTPauseDevice.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the SOFT_pause_device extension. - * - *

    This extension allows applications to pause a playback device. The main purpose of this is to silence output, stop processing, and allow the audio - * hardware to go into a low-power mode. On a mobile device, for instance, apps may want to silence output and not waste battery life with unneeded - * processing when in the background.

    - */ -public class SOFTPauseDevice { - - protected SOFTPauseDevice() { - throw new UnsupportedOperationException(); - } - - // --- [ alcDevicePauseSOFT ] --- - - /** - * Pauses a playback device. - * - *

    When paused, no contexts associated with the device will be processed or updated. Playing sources will not produce sound, have their offsets - * incremented, or process any more buffers, until the device is resumed. Pausing a device that is already paused is a legal no-op.

    - * - * @param device the device to pause - */ - @NativeType("ALCvoid") - public static void alcDevicePauseSOFT(@NativeType("ALCdevice *") long device) { - long __functionAddress = ALC.getICD().alcDevicePauseSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePV(device, __functionAddress); - } - - // --- [ alcDeviceResumeSOFT ] --- - - /** - * Resumes playback of a paused device. - * - *

    This will restart processing on the device -- sources will resume playing sound as normal. Resuming playback on a device that is not paused is a legal - * no-op.

    - * - *

    These functions are not reference counted. alcDeviceResumeSOFT only needs to be called once to resume playback, regardless of how many times - * {@link #alcDevicePauseSOFT DevicePauseSOFT} was called.

    - * - * @param device the device to resume - */ - @NativeType("ALCvoid") - public static void alcDeviceResumeSOFT(@NativeType("ALCdevice *") long device) { - long __functionAddress = ALC.getICD().alcDeviceResumeSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - invokePV(device, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTReopenDevice.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTReopenDevice.java deleted file mode 100644 index 9b0c95f2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTReopenDevice.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_reopen_device extension. - * - *

    This extension provides a mechanism for applications to move the output of a device from one endpoint to another. Standard OpenAL devices are - * associated with an output on the system upon being opened, but if the endpoint should no longer be the desired output, there is no method for the - * application to easily change it. The only option for the application is to delete all AL objects, destroy the context, close the device handle, open a - * new device, and reload/recreate the necessary resources. A method to more simply move the device with its existing resources to a different output is - * easier, requiring less management from the application.

    - */ -public class SOFTReopenDevice { - - protected SOFTReopenDevice() { - throw new UnsupportedOperationException(); - } - - // --- [ alcReopenDeviceSOFT ] --- - - /** Unsafe version of: {@link #alcReopenDeviceSOFT ReopenDeviceSOFT} */ - public static boolean nalcReopenDeviceSOFT(long device, long deviceName, long attribs) { - long __functionAddress = ALC.getICD().alcReopenDeviceSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return invokePPPZ(device, deviceName, attribs, __functionAddress); - } - - /** - * Once a playback device is opened, it becomes associated with a particular output endpoint. When this output is no longer the desired output, the - * playback device can be reopened to re-associate it with a potentially different output endpoint using {@code alcReopenDeviceSOFT}. - * - * @param device a non-{@code NULL} handle for an existing device - * @param deviceName the device name to open, or {@code NULL} for the default (same as would be passed to {@link ALC10#alcOpenDevice OpenDevice}) - * @param attribs an attribute list to configure the device with, with the same attribute list that would be passed to {@link ALC10#alcCreateContext CreateContext}. - */ - @NativeType("ALCboolean") - public static boolean alcReopenDeviceSOFT(@NativeType("ALCdevice *") long device, @Nullable @NativeType("ALCchar const *") ByteBuffer deviceName, @Nullable @NativeType("ALCint const *") IntBuffer attribs) { - if (CHECKS) { - checkNT1Safe(deviceName); - checkNTSafe(attribs); - } - return nalcReopenDeviceSOFT(device, memAddressSafe(deviceName), memAddressSafe(attribs)); - } - - /** - * Once a playback device is opened, it becomes associated with a particular output endpoint. When this output is no longer the desired output, the - * playback device can be reopened to re-associate it with a potentially different output endpoint using {@code alcReopenDeviceSOFT}. - * - * @param device a non-{@code NULL} handle for an existing device - * @param deviceName the device name to open, or {@code NULL} for the default (same as would be passed to {@link ALC10#alcOpenDevice OpenDevice}) - * @param attribs an attribute list to configure the device with, with the same attribute list that would be passed to {@link ALC10#alcCreateContext CreateContext}. - */ - @NativeType("ALCboolean") - public static boolean alcReopenDeviceSOFT(@NativeType("ALCdevice *") long device, @Nullable @NativeType("ALCchar const *") CharSequence deviceName, @Nullable @NativeType("ALCint const *") IntBuffer attribs) { - if (CHECKS) { - checkNTSafe(attribs); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(deviceName, true); - long deviceNameEncoded = deviceName == null ? NULL : stack.getPointerAddress(); - return nalcReopenDeviceSOFT(device, deviceNameEncoded, memAddressSafe(attribs)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #alcReopenDeviceSOFT ReopenDeviceSOFT} */ - @NativeType("ALCboolean") - public static boolean alcReopenDeviceSOFT(@NativeType("ALCdevice *") long device, @Nullable @NativeType("ALCchar const *") ByteBuffer deviceName, @Nullable @NativeType("ALCint const *") int[] attribs) { - long __functionAddress = ALC.getICD().alcReopenDeviceSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - checkNT1Safe(deviceName); - checkNTSafe(attribs); - } - return invokePPPZ(device, memAddressSafe(deviceName), attribs, __functionAddress); - } - - /** Array version of: {@link #alcReopenDeviceSOFT ReopenDeviceSOFT} */ - @NativeType("ALCboolean") - public static boolean alcReopenDeviceSOFT(@NativeType("ALCdevice *") long device, @Nullable @NativeType("ALCchar const *") CharSequence deviceName, @Nullable @NativeType("ALCint const *") int[] attribs) { - long __functionAddress = ALC.getICD().alcReopenDeviceSOFT; - if (CHECKS) { - check(__functionAddress); - check(device); - checkNTSafe(attribs); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(deviceName, true); - long deviceNameEncoded = deviceName == null ? NULL : stack.getPointerAddress(); - return invokePPPZ(device, deviceNameEncoded, attribs, __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceLatency.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceLatency.java deleted file mode 100644 index b195f1e6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceLatency.java +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_source_latency extension. - * - *

    This extension provides a method for applications to more accurately measure the playback latency of sources. Unextended OpenAL allows apps to retrieve - * a source's playback offset in bytes, samples, or seconds, but this is (typically) where the AL is processing the audio data.

    - * - *

    Often, more processing is done outside of the AL. Audio servers are common and they can introduce a bit of latency, increasing the time between when the - * AL is done with a piece of audio data until it gets heard by the user. If the OpenAL implementation uses its own mixer, that can also add to the - * latency. This can ultimately cause a not-insignificant delay between where the AL is processing and what is actually being heard.

    - * - *

    Although this delay may not be very noticeable for general gaming, if the app is trying to keep a video or animation syncronized with the playback of an - * OpenAL source this extra delay can cause the audio and video to appear of out sync.

    - * - *

    Luckily, most audio systems have a way of measuring the latency it takes for sound to actually get to the physical output device (the DAC or speakers). - * By providing this information through the AL, an application can more accurately tell what a user is hearing and thus synchronize better with the audio - * output.

    - */ -public class SOFTSourceLatency { - - /** - * The playback position, expressed in fixed-point samples, along with the playback latency, expressed in nanoseconds (1/1000000000ths of a second). This - * attribute is read-only. - * - *

    The first value in the returned vector is the sample offset, which is a 32.32 fixed-point value. The whole number is stored in the upper 32 bits and - * the fractional component is in the lower 32 bits. The value is similar to that returned by {@link AL11#AL_SAMPLE_OFFSET SAMPLE_OFFSET}, just with more precision.

    - * - *

    The second value is the latency, in nanoseconds. It represents the length of time it will take for the audio at the current offset to actually reach - * the speakers or DAC. This value should be considered volatile, as it may change very often during playback (it can depend on a number of factors, - * including how full the mixing buffer OpenAL may be using is timer jitter, or other changes deeper in the audio pipeline).

    - * - *

    The retrieved offset and latency should be considered atomic, with respect to one another. This means the returned latency was measured exactly when - * the source was at the returned offset.

    - */ - public static final int AL_SAMPLE_OFFSET_LATENCY_SOFT = 0x1200; - - /** - * The playback position, along with the playback latency, both expressed in seconds. This attribute is read-only. - * - *

    The first value in the returned vector is the offset in seconds. The value is similar to that returned by {@link AL11#AL_SEC_OFFSET SEC_OFFSET}, just with more precision.

    - * - *

    The second value is the latency, in seconds. It represents the length of time it will take for the audio at the current offset to actually reach the - * speakers or DAC. This value should be considered volatile, as it may change very often during playback (it can depend on a number of factors, including - * how full the mixing buffer OpenAL may be using is, timer jitter, or other changes deeper in the audio pipeline).

    - * - *

    The retrieved offset and latency should be considered atomic with respect to one another. This means the returned latency was measured exactly when the - * source was at the returned offset.

    - */ - public static final int AL_SEC_OFFSET_LATENCY_SOFT = 0x1201; - - protected SOFTSourceLatency() { - throw new UnsupportedOperationException(); - } - - // --- [ alSourcedSOFT ] --- - - /** - * Sets the double value of a source parameter. - * - * @param source the source to modify - * @param param the parameter to modify - * @param value the parameter value - */ - @NativeType("ALvoid") - public static void alSourcedSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble") double value) { - long __functionAddress = AL.getICD().alSourcedSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokeV(source, param, value, __functionAddress); - } - - // --- [ alSource3dSOFT ] --- - - /** - * Sets the 3 dimensional double values of a source parameter. - * - * @param source the source to modify - * @param param the parameter to modify - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alSource3dSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble") double value1, @NativeType("ALdouble") double value2, @NativeType("ALdouble") double value3) { - long __functionAddress = AL.getICD().alSource3dSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokeV(source, param, value1, value2, value3, __functionAddress); - } - - // --- [ alSourcedvSOFT ] --- - - /** Unsafe version of: {@link #alSourcedvSOFT SourcedvSOFT} */ - public static void nalSourcedvSOFT(int source, int param, long value) { - long __functionAddress = AL.getICD().alSourcedvSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(source, param, value, __functionAddress); - } - - /** - * pointer version of {@link #alSourcedSOFT SourcedSOFT} - * - * @param source the source to modify - * @param param the parameter to modify - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alSourcedvSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble const *") DoubleBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalSourcedvSOFT(source, param, memAddress(value)); - } - - // --- [ alGetSourcedSOFT ] --- - - /** Unsafe version of: {@link #alGetSourcedSOFT GetSourcedSOFT} */ - public static void nalGetSourcedSOFT(int source, int param, long value) { - long __functionAddress = AL.getICD().alGetSourcedSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(source, param, value, __functionAddress); - } - - /** - * Gets the double value of a source parameter. - * - * @param source the source to query - * @param param the parameter to query - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alGetSourcedSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble *") DoubleBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetSourcedSOFT(source, param, memAddress(value)); - } - - /** - * Gets the double value of a source parameter. - * - * @param source the source to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static double alGetSourcedSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer value = stack.callocDouble(1); - nalGetSourcedSOFT(source, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetSource3dSOFT ] --- - - /** Unsafe version of: {@link #alGetSource3dSOFT GetSource3dSOFT} */ - public static void nalGetSource3dSOFT(int source, int param, long value1, long value2, long value3) { - long __functionAddress = AL.getICD().alGetSource3dSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePPPV(source, param, value1, value2, value3, __functionAddress); - } - - /** - * Gets the 3 dimensional double values of a source parameter. - * - * @param source the source to query - * @param param the parameter to query - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alGetSource3dSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble *") DoubleBuffer value1, @NativeType("ALdouble *") DoubleBuffer value2, @NativeType("ALdouble *") DoubleBuffer value3) { - if (CHECKS) { - check(value1, 1); - check(value2, 1); - check(value3, 1); - } - nalGetSource3dSOFT(source, param, memAddress(value1), memAddress(value2), memAddress(value3)); - } - - // --- [ alGetSourcedvSOFT ] --- - - /** Unsafe version of: {@link #alGetSourcedvSOFT GetSourcedvSOFT} */ - public static void nalGetSourcedvSOFT(int source, int param, long values) { - long __functionAddress = AL.getICD().alGetSourcedvSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(source, param, values, __functionAddress); - } - - /** - * Array version of {@link #alGetSourcedSOFT GetSourcedSOFT} - * - * @param source the source to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetSourcedvSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble *") DoubleBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetSourcedvSOFT(source, param, memAddress(values)); - } - - // --- [ alSourcei64SOFT ] --- - - /** - * Sets the 64 bit integer value of a source parameter. - * - * @param source the source to modify - * @param param the parameter to modify - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alSourcei64SOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT") long value) { - long __functionAddress = AL.getICD().alSourcei64SOFT; - if (CHECKS) { - check(__functionAddress); - } - invokeJV(source, param, value, __functionAddress); - } - - // --- [ alSource3i64SOFT ] --- - - /** - * Sets the 3 dimensional 64 bit integer values of a source parameter. - * - * @param source the source to modify - * @param param the parameter to modify - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alSource3i64SOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT") long value1, @NativeType("ALint64SOFT") long value2, @NativeType("ALint64SOFT") long value3) { - long __functionAddress = AL.getICD().alSource3i64SOFT; - if (CHECKS) { - check(__functionAddress); - } - invokeJJJV(source, param, value1, value2, value3, __functionAddress); - } - - // --- [ alSourcei64vSOFT ] --- - - /** Unsafe version of: {@link #alSourcei64vSOFT Sourcei64vSOFT} */ - public static void nalSourcei64vSOFT(int source, int param, long values) { - long __functionAddress = AL.getICD().alSourcei64vSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(source, param, values, __functionAddress); - } - - /** - * Array version of {@link #alSourcei64SOFT Sourcei64SOFT} - * - * @param source the source to modify - * @param param the parameter to modify - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alSourcei64vSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT const *") LongBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalSourcei64vSOFT(source, param, memAddress(values)); - } - - // --- [ alGetSourcei64SOFT ] --- - - /** Unsafe version of: {@link #alGetSourcei64SOFT GetSourcei64SOFT} */ - public static void nalGetSourcei64SOFT(int source, int param, long value) { - long __functionAddress = AL.getICD().alGetSourcei64SOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(source, param, value, __functionAddress); - } - - /** - * Gets the 64 bit integer value of a source parameter. - * - * @param source the source to query - * @param param the parameter to query - * @param value the parameter values - */ - @NativeType("ALvoid") - public static void alGetSourcei64SOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT *") LongBuffer value) { - if (CHECKS) { - check(value, 1); - } - nalGetSourcei64SOFT(source, param, memAddress(value)); - } - - /** - * Gets the 64 bit integer value of a source parameter. - * - * @param source the source to query - * @param param the parameter to query - */ - @NativeType("ALvoid") - public static long alGetSourcei64SOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer value = stack.callocLong(1); - nalGetSourcei64SOFT(source, param, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ alGetSource3i64SOFT ] --- - - /** Unsafe version of: {@link #alGetSource3i64SOFT GetSource3i64SOFT} */ - public static void nalGetSource3i64SOFT(int source, int param, long value1, long value2, long value3) { - long __functionAddress = AL.getICD().alGetSource3i64SOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePPPV(source, param, value1, value2, value3, __functionAddress); - } - - /** - * Gets the 3 dimensional 64 bit integer values of a source parameter. - * - * @param source the source to query - * @param param the parameter to query - * @param value1 the first value - * @param value2 the second value - * @param value3 the third value - */ - @NativeType("ALvoid") - public static void alGetSource3i64SOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT *") LongBuffer value1, @NativeType("ALint64SOFT *") LongBuffer value2, @NativeType("ALint64SOFT *") LongBuffer value3) { - if (CHECKS) { - check(value1, 1); - check(value2, 1); - check(value3, 1); - } - nalGetSource3i64SOFT(source, param, memAddress(value1), memAddress(value2), memAddress(value3)); - } - - // --- [ alGetSourcei64vSOFT ] --- - - /** Unsafe version of: {@link #alGetSourcei64vSOFT GetSourcei64vSOFT} */ - public static void nalGetSourcei64vSOFT(int source, int param, long values) { - long __functionAddress = AL.getICD().alGetSourcei64vSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePV(source, param, values, __functionAddress); - } - - /** - * Array version of {@link #alGetSourcei64SOFT GetSourcei64SOFT} - * - * @param source the source to query - * @param param the parameter to query - * @param values the parameter values - */ - @NativeType("ALvoid") - public static void alGetSourcei64vSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT *") LongBuffer values) { - if (CHECKS) { - check(values, 1); - } - nalGetSourcei64vSOFT(source, param, memAddress(values)); - } - - /** Array version of: {@link #alSourcedvSOFT SourcedvSOFT} */ - @NativeType("ALvoid") - public static void alSourcedvSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble const *") double[] value) { - long __functionAddress = AL.getICD().alSourcedvSOFT; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(source, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetSourcedSOFT GetSourcedSOFT} */ - @NativeType("ALvoid") - public static void alGetSourcedSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble *") double[] value) { - long __functionAddress = AL.getICD().alGetSourcedSOFT; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(source, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetSource3dSOFT GetSource3dSOFT} */ - @NativeType("ALvoid") - public static void alGetSource3dSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble *") double[] value1, @NativeType("ALdouble *") double[] value2, @NativeType("ALdouble *") double[] value3) { - long __functionAddress = AL.getICD().alGetSource3dSOFT; - if (CHECKS) { - check(__functionAddress); - check(value1, 1); - check(value2, 1); - check(value3, 1); - } - invokePPPV(source, param, value1, value2, value3, __functionAddress); - } - - /** Array version of: {@link #alGetSourcedvSOFT GetSourcedvSOFT} */ - @NativeType("ALvoid") - public static void alGetSourcedvSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALdouble *") double[] values) { - long __functionAddress = AL.getICD().alGetSourcedvSOFT; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(source, param, values, __functionAddress); - } - - /** Array version of: {@link #alSourcei64vSOFT Sourcei64vSOFT} */ - @NativeType("ALvoid") - public static void alSourcei64vSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT const *") long[] values) { - long __functionAddress = AL.getICD().alSourcei64vSOFT; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(source, param, values, __functionAddress); - } - - /** Array version of: {@link #alGetSourcei64SOFT GetSourcei64SOFT} */ - @NativeType("ALvoid") - public static void alGetSourcei64SOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT *") long[] value) { - long __functionAddress = AL.getICD().alGetSourcei64SOFT; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - invokePV(source, param, value, __functionAddress); - } - - /** Array version of: {@link #alGetSource3i64SOFT GetSource3i64SOFT} */ - @NativeType("ALvoid") - public static void alGetSource3i64SOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT *") long[] value1, @NativeType("ALint64SOFT *") long[] value2, @NativeType("ALint64SOFT *") long[] value3) { - long __functionAddress = AL.getICD().alGetSource3i64SOFT; - if (CHECKS) { - check(__functionAddress); - check(value1, 1); - check(value2, 1); - check(value3, 1); - } - invokePPPV(source, param, value1, value2, value3, __functionAddress); - } - - /** Array version of: {@link #alGetSourcei64vSOFT GetSourcei64vSOFT} */ - @NativeType("ALvoid") - public static void alGetSourcei64vSOFT(@NativeType("ALuint") int source, @NativeType("ALenum") int param, @NativeType("ALint64SOFT *") long[] values) { - long __functionAddress = AL.getICD().alGetSourcei64vSOFT; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - invokePV(source, param, values, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceLength.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceLength.java deleted file mode 100644 index 14186ca9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceLength.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_source_length extension. - * - *

    This extension adds a method to retrieve the total length of a source's buffer data in bytes, samples, and seconds, which correspond to the byte, - * sample, and seconds offset extents. By default, OpenAL only provides a way to retrieve a buffer's storage size in bytes, which does not necessarily - * represent the data size given to alBufferData nor the byte offset extent for the source's {@link AL11#AL_BYTE_OFFSET BYTE_OFFSET} property. The - * {@code AL_SOFT_buffer_samples} extension allows an application to query a buffer for its length in bytes, samples, and seconds, but this is only for a - * single buffer; a buffer queue on a source still requires additional bookkeeping by the application to keep track of the length of each buffer being - * queued and unqueued on a given source. This extension aims to ease that and provide a simple query.

    - */ -public final class SOFTSourceLength { - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetSourcei GetSourcei} and {@link AL10#alGetSourceiv GetSourceiv} (these are the same as in AL_SOFT_buffer_samples). */ - public static final int - AL_BYTE_LENGTH_SOFT = 0x2009, - AL_SAMPLE_LENGTH_SOFT = 0x200A; - - /** Accepted by the {@code paramName} parameter of {@link AL10#alGetSourcef GetSourcef} and {@link AL10#alGetSourcefv GetSourcefv} (these are the same as in AL_SOFT_buffer_samples). */ - public static final int AL_SEC_LENGTH_SOFT = 0x200B; - - private SOFTSourceLength() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceResampler.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceResampler.java deleted file mode 100644 index 388f4e10..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceResampler.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_source_resampler extension. - * - *

    This extension provides a method for applications to use different resamplers for sources. OpenAL automatically resamples when playing a source at a - * sample rate that don't match the device's sample rate, but the resampling method is left unspecified. One could assume it would use the "best" resample - * method available, but this gives no clear information about what's used nor any way to choose between quality or performance. Further, some - * applications may prefer lower quality resamplers for its spectral properties.

    - */ -public class SOFTSourceResampler { - - /** Accepted as the {@code pname} parameter of {@link AL10#alGetInteger GetInteger} and {@link AL10#alGetIntegerv GetIntegerv}. */ - public static final int - AL_NUM_RESAMPLERS_SOFT = 0x1210, - AL_DEFAULT_RESAMPLER_SOFT = 0x1211; - - /** Accepted as the {@code param} parameter of {@link AL10#alSourcei Sourcei}, {@link AL11#alSourceiv Sourceiv}, {@link AL10#alGetSourcei GetSourcei}, and {@link AL10#alGetSourceiv GetSourceiv}. */ - public static final int AL_SOURCE_RESAMPLER_SOFT = 0x1212; - - /** Accepted as the {@code pname} parameter of {@link #alGetStringiSOFT GetStringiSOFT}. */ - public static final int AL_RESAMPLER_NAME_SOFT = 0x1213; - - protected SOFTSourceResampler() { - throw new UnsupportedOperationException(); - } - - // --- [ alGetStringiSOFT ] --- - - public static long nalGetStringiSOFT(int pname, int index) { - long __functionAddress = AL.getICD().alGetStringiSOFT; - if (CHECKS) { - check(__functionAddress); - } - return invokeP(pname, index, __functionAddress); - } - - @Nullable - @NativeType("ALchar const *") - public static String alGetStringiSOFT(@NativeType("ALenum") int pname, @NativeType("ALsizei") int index) { - long __result = nalGetStringiSOFT(pname, index); - return memUTF8Safe(__result); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceSpatialize.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceSpatialize.java deleted file mode 100644 index 39de1b86..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceSpatialize.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_source_spatialize extension. - * - *

    This extension provides more control over the spatialization behavior of sources. By default, OpenAL will spatialize sources playing a mono buffer and - * not spatialize sources playing a multi-channel buffer. Spatialization features include positional panning, distance attenuation, cone-related - * attenuation, and doppler effects. This extension allows such features to be enabled and disabled per-source independently of the buffer format.

    - * - *

    Controlling Source Spatialization

    - * - *

    A source may have spatialization features applied depending on its {@link #AL_SOURCE_SPATIALIZE_SOFT SOURCE_SPATIALIZE_SOFT} property. Valid values for the property are {@link AL10#AL_FALSE FALSE}, {@link AL10#AL_TRUE TRUE}, - * and {@link #AL_AUTO_SOFT AUTO_SOFT}. When set to {@code AL_FALSE}, spatialization features are never applied to the source. When set to {@code AL_TRUE}, they are always - * applied. When set to {@code AL_AUTO_SOFT}, they are applied if playing a buffer with one channel, and not if the buffer has more than one channel. - * The default is {@code AL_AUTO_SOFT}.

    - * - *

    When spatialization features are applied on a source playing a non-mono buffer, if the source occupies the same 3D position as the listener the - * buffer's channels are placed around the listener according to the format (e.g. a stereo buffer has the left channel 30 degrees left of front, and the - * right channel 30 degrees right of front). This panning is NOT effected by the source direction or listener orientation.

    - * - *

    If the source does not occupy the same 3D position as the listener, the proper panning direction is calculated and all channels of the buffer will be - * panned to that direction (effectively down-mixing the buffer to mono dynamically). The buffer's channels will also receive a gain correction of - * {@code 1/num_channels} when panned, to preserve peak amplitude of the mixed channels. An exception is the LFE channel in buffer formats that include - * one. The LFE channel may be sent to the LFE output as normal and not be part of the panned mix, however it is still attenuated according to the source - * distance and cone.

    - */ -public final class SOFTSourceSpatialize { - - /** Accepted as the {@code param} parameter of {@link AL10#alSourcei Sourcei}, {@link AL11#alSourceiv Sourceiv}, {@link AL10#alGetSourcei GetSourcei}, and {@link AL10#alGetSourceiv GetSourceiv}. */ - public static final int AL_SOURCE_SPATIALIZE_SOFT = 0x1214; - - /** Accepted as the {@code value} of the {@link #AL_SOURCE_SPATIALIZE_SOFT SOURCE_SPATIALIZE_SOFT} property. */ - public static final int AL_AUTO_SOFT = 0x2; - - private SOFTSourceSpatialize() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceStartDelay.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceStartDelay.java deleted file mode 100644 index 1a6db1e8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTSourceStartDelay.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the SOFT_source_start_delay extension. - * - *

    This extension allows applications to play a source at a particular future time.

    - * - *

    With standard OpenAL, an application can play a source with the {@link AL10#alSourcePlay SourcePlay} or {@link AL10#alSourcePlayv SourcePlayv} functions which causes sources to start playing as soon - * as possible, but the actual start time is left to the implementation to deal with (which could be on the next 10ms or 20ms boundary, or whenever the - * mixer can start processing the source).

    - * - *

    Aside from {@code alSourcePlayv} starting all given sources in sync, there is no way to start playing sources at particular times relative to each - * other, or synchronized to some specific time point.

    - * - *

    This extension adds functionality to start source playback at an absolute device clock time, as well as to start with a relative delay.

    - * - *

    Requires {@link SOFTDeviceClock SOFT_device_clock}.

    - */ -public class SOFTSourceStartDelay { - - protected SOFTSourceStartDelay() { - throw new UnsupportedOperationException(); - } - - // --- [ alSourcePlayAtTimeSOFT ] --- - - @NativeType("ALvoid") - public static void alSourcePlayAtTimeSOFT(@NativeType("ALuint") int source, @NativeType("ALint64SOFT") long start_time) { - long __functionAddress = AL.getICD().alSourcePlayAtTimeSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokeJV(source, start_time, __functionAddress); - } - - // --- [ alSourcePlayAtTimevSOFT ] --- - - public static void nalSourcePlayAtTimevSOFT(int n, long sources, long start_time) { - long __functionAddress = AL.getICD().alSourcePlayAtTimevSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePJV(n, sources, start_time, __functionAddress); - } - - @NativeType("ALvoid") - public static void alSourcePlayAtTimevSOFT(@NativeType("ALuint const *") IntBuffer sources, @NativeType("ALint64SOFT") long start_time) { - nalSourcePlayAtTimevSOFT(sources.remaining(), memAddress(sources), start_time); - } - - /** Array version of: {@link #alSourcePlayAtTimevSOFT SourcePlayAtTimevSOFT} */ - @NativeType("ALvoid") - public static void alSourcePlayAtTimevSOFT(@NativeType("ALuint const *") int[] sources, @NativeType("ALint64SOFT") long start_time) { - long __functionAddress = AL.getICD().alSourcePlayAtTimevSOFT; - if (CHECKS) { - check(__functionAddress); - } - invokePJV(sources.length, sources, start_time, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTUHJ.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTUHJ.java deleted file mode 100644 index a93ac584..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTUHJ.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_UHJ extension. - * - *

    This extension adds support for UHJ channel formats and a Super Stereo (a.k.a. Stereo Enhance) processor.

    - * - *

    UHJ is a method of encoding surround sound from a first-order B-Format signal into a stereo-compatible signal. Such signals can be played as normal - * stereo (with more stable and wider stereo imaging than pan-pot mixing) or decoded back to surround sound, which makes it a decent choice where 3+ - * channel surround sound isn't available or desirable. When decoded, a UHJ signal behaves like B-Format, which allows it to be rotated through - * AL_EXT_BFORMAT's source orientation property as with B-Format formats.

    - * - *

    The standard equation[1] for decoding UHJ to B-Format is:

    - * - *
    
    - * S = Left + Right
    - * D = Left - Right
    - * 
    - * W = 0.981532*S + 0.197484*j(0.828331*D + 0.767820*T)
    - * X = 0.418496*S - j(0.828331*D + 0.767820*T)
    - * Y = 0.795968*D - 0.676392*T + j(0.186633*S)
    - * Z = 1.023332*Q
    - * - *

    where {@code j} is a wide-band +90 degree phase shift. 2-channel UHJ excludes the T and Q input channels, and 3-channel excludes the Q input channel. - * Be aware that the resulting W, X, Y, and Z signals are 3dB louder than their FuMa counterparts, and the implementation should account for that to - * properly balance it against other sounds.

    - * - *

    An alternative equation for decoding 2-channel-only UHJ is:

    - * - *
    
    - * S = Left + Right
    - * D = Left - Right
    - * 
    - * W = 0.981532*S + j(0.163582*D)
    - * X = 0.418496*S - j(0.828331*D)
    - * Y = 0.762956*D + j(0.384230*S)
    - * - *

    Which equation to use depends on the implementation and user preferences. It's relevant to note that the standard decoding equation is reversible with - * the encoding equation, meaning decoding UHJ to B-Format with the standard equation and then encoding B-Format to UHJ results in the original UHJ - * signal, even for 2-channel. The alternative 2-channel decoding equation does not result in the original UHJ signal when re- encoded.

    - * - *

    One additional note for decoding 2-channel UHJ is the resulting B-Format signal should pass through alternate shelf filters for frequency-dependent - * processing. For the standard equation, suitable shelf filters are given as:

    - * - *
    
    - * W:   LF = 0.661, HF = 1.000
    - * X/Y: LF = 1.293, HF = 1.000
    - * - *

    And for the alternative equation, suitable shelf filters are given as:

    - * - *
    
    - * W:   LF = 0.646, HF = 1.000
    - * X/Y: LF = 1.263, HF = 1.000
    - * - *

    3- and 4-channel UHJ should use the normal shelf filters for B-Format.

    - * - *

    Super Stereo (occasionally called Stereo Enhance) is a technique for processing a plain (non-UHJ) stereo signal to derive a B-Format signal. It's - * backed by the same functionality as UHJ decoding, making it an easy addition on top of UHJ support. Super Stereo has a variable width control, allowing - * the stereo soundfield to "wrap around" the listener while maintaining a stable center image (a more naive virtual speaker approach would cause the - * center image to collapse as the soundfield widens). Since this derives a B-Format signal like UHJ, it also allows such sources to be rotated through - * the source orientation property.

    - * - *

    There are various forms of Super Stereo, with varying equations, but a good suggested option is:

    - * - *
    
    - * S = Left + Right
    - * D = Left - Right
    - * 
    - * W = 0.6098637*S - j(0.6896511*w*D)
    - * X = 0.8624776*S + j(0.7626955*w*D)
    - * Y = 1.6822415*w*D - j(0.2156194*S)
    - * - *

    where {@code w} is a variable width factor, in the range {@code [0...0.7]}. As with UHJ, the resulting W, X, Y, and Z signals are 3dB louder than their - * FuMa counterparts. The normal shelf filters for playing B-Format should apply.

    - */ -public final class SOFTUHJ { - - /** Accepted by the {@code format} parameter of {@link AL10#alBufferData BufferData}. */ - public static final int - AL_FORMAT_UHJ2CHN8_SOFT = 0x19A2, - AL_FORMAT_UHJ2CHN16_SOFT = 0x19A3, - AL_FORMAT_UHJ2CHN_FLOAT32_SOFT = 0x19A4, - AL_FORMAT_UHJ3CHN8_SOFT = 0x19A5, - AL_FORMAT_UHJ3CHN16_SOFT = 0x19A6, - AL_FORMAT_UHJ3CHN_FLOAT32_SOFT = 0x19A7, - AL_FORMAT_UHJ4CHN8_SOFT = 0x19A8, - AL_FORMAT_UHJ4CHN16_SOFT = 0x19A9, - AL_FORMAT_UHJ4CHN_FLOAT32_SOFT = 0x19AA; - - /** Accepted by the {@code param} parameter of {@link AL10#alSourcei Sourcei}, {@link AL11#alSourceiv Sourceiv}, {@link AL10#alGetSourcei GetSourcei}, and {@link AL10#alGetSourceiv GetSourceiv}. */ - public static final int AL_STEREO_MODE_SOFT = 0x19B0; - - /** Accepted by the {@code param} parameter of {@link AL10#alSourcef Sourcef}, {@link AL10#alSourcefv Sourcefv}, {@link AL10#alGetSourcef GetSourcef}, and {@link AL10#alGetSourcefv GetSourcefv}. */ - public static final int AL_SUPER_STEREO_WIDTH_SOFT = 0x19B1; - - /** Accepted by the {@code value} parameter of {@link AL10#alSourcei Sourcei} and {@link AL11#alSourceiv Sourceiv} for {@link #AL_STEREO_MODE_SOFT STEREO_MODE_SOFT}. */ - public static final int - AL_NORMAL_SOFT = 0x0, - AL_SUPER_STEREO_SOFT = 0x1; - - private SOFTUHJ() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTUHJEx.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTUHJEx.java deleted file mode 100644 index cd0ce4e6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTUHJEx.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFT_UHJ_ex extension. - * - *

    This extension supplements {@code AL_SOFT_UHJ} by adding {@code muLaw}, {@code aLaw}, {@code IMA4}, and {@code MSADPCM} sample types to UHJ formats. - * The base {@code AL_SOFT_UHJ} extension could already use these formats (when available) for Super Stereo processing, and this extension allows them to - * be used for UHJ itself too.

    - * - *

    Requires {@link SOFTUHJ SOFT_UHJ} and one or more of {@link EXTMulaw EXT_MULAW}, {@link EXTAlaw EXT_ALAW}, {@link EXTIma4 EXT_IMA4}, and {@link SOFTMSADPCM SOFT_MSADPCM}.

    - */ -public final class SOFTUHJEx { - - /** Accepted by the {@code format} parameter of {@link AL10#alBufferData BufferData} if {@link EXTMulaw EXT_MULAW} is also supported. */ - public static final int - AL_FORMAT_UHJ2CHN_MULAW_SOFT = 0x19B3, - AL_FORMAT_UHJ3CHN_MULAW_SOFT = 0x19B7, - AL_FORMAT_UHJ4CHN_MULAW_SOFT = 0x19B9; - - /** Accepted by the {@code format} parameter of {@link AL10#alBufferData BufferData} if {@link EXTAlaw EXT_ALAW} is also supported. */ - public static final int - AL_FORMAT_UHJ2CHN_ALAW_SOFT = 0x19B4, - AL_FORMAT_UHJ3CHN_ALAW_SOFT = 0x19B8, - AL_FORMAT_UHJ4CHN_ALAW_SOFT = 0x19BA; - - /** Accepted by the {@code format} parameter of {@link AL10#alBufferData BufferData} if {@link EXTIma4 EXT_IMA4} is also supported. */ - public static final int AL_FORMAT_UHJ2CHN_IMA4_SOFT = 0x19B5; - - /** Accepted by the {@code format} parameter of {@link AL10#alBufferData BufferData} if {@link SOFTMSADPCM SOFT_MSADPCM} is also supported. */ - public static final int AL_FORMAT_UHJ2CHN_MSADPCM_SOFT = 0x19B6; - - private SOFTUHJEx() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/SOFTXHoldOnDisconnect.java b/LWJGL/src/main/java/org/lwjgl/openal/SOFTXHoldOnDisconnect.java deleted file mode 100644 index a82adcac..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/SOFTXHoldOnDisconnect.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.openal; - -/** - * Native bindings to the SOFTX_hold_on_disconnect extension. - * - *

    LWJGL: This extension is experimental.

    - */ -public final class SOFTXHoldOnDisconnect { - - /** Accepted by the {@code target} parameter of {@link AL10#alEnable Enable}, {@link AL10#alDisable Disable}, and {@link AL10#alIsEnabled IsEnabled}. */ - public static final int AL_STOP_SOURCES_ON_DISCONNECT_SOFT = 0x19AB; - - private SOFTXHoldOnDisconnect() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/openal/Util.java b/LWJGL/src/main/java/org/lwjgl/openal/Util.java deleted file mode 100644 index 0930c2a7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/Util.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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.openal; - - -/** - * Simple utility class for checking AL/ALC errors - * - * @author cix_foo - * @author Brian Matzon - * @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) { - int err = ALC10.alcGetError(device.device); - if (err != ALC10.ALC_NO_ERROR) - throw new OpenALException(ALC10.alcGetString(AL.getDevice().device, err)); - } - - /** - * Checks for any AL errors and throws an unchecked exception on errors - */ - public static void checkALError() { - int err = AL10.alGetError(); - if (err != AL10.AL_NO_ERROR) - throw new OpenALException(err); - } - - /** - * Checks for a valid device - * @param device ALCdevice to check the validity of - */ - public static void checkALCValidDevice(ALCdevice device) { - if(!device.isValid()) { - throw new OpenALException("Invalid device: " + device); - } - } - - /** - * Checks for a valid context - * @param context ALCcontext to check the validity of - */ - public static void checkALCValidContext(ALCcontext context) { - if(!context.isValid()) { - throw new OpenALException("Invalid context: " + context); - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/openal/package-info.java b/LWJGL/src/main/java/org/lwjgl/openal/package-info.java deleted file mode 100644 index fcb1c336..00000000 --- a/LWJGL/src/main/java/org/lwjgl/openal/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ - -/** - * Contains bindings to the OpenAL cross-platform 3D audio API. - * - *

    LWJGL comes with a software OpenAL implementation, OpenAL Soft.

    - * - *

    OpenAL Soft can be dynamically configured with environment variables. A - * very useful option for debugging is {@code ALSOFT_LOGLEVEL}; it can be set to values 0 through 4, with higher values producing more information.

    - * - *

    In addition to standard OpenAL features, OpenAL Soft supports HRTF, - * Ambisonics and 3D7.1. - * Documentation for these features is available in the OpenAL Soft repository.

    - */ -@org.lwjgl.system.NonnullDefault -package org.lwjgl.openal; - diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDBlendMinmaxFactor.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDBlendMinmaxFactor.java deleted file mode 100644 index fa2f8611..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDBlendMinmaxFactor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_blend_minmax_factor extension. - * - *

    The {@link EXTBlendMinmax EXT_blend_minmax} extension extended the GL's blending functionality to allow the blending equation to be specified by the application. That - * extension introduced the {@link EXTBlendMinmax#GL_MIN_EXT MIN_EXT} and {@link EXTBlendMinmax#GL_MAX_EXT MAX_EXT} blend equations, which caused the result of the blend equation to become the minimum or maximum of the - * source color and destination color, respectively.

    - * - *

    The {@link EXTBlendMinmax#GL_MIN_EXT MIN_EXT} and {@link EXTBlendMinmax#GL_MAX_EXT MAX_EXT} blend equations, however, do not include the source or destination blend factors in the arguments to the min and max - * functions. This extension provides two new blend equations that produce the minimum or maximum of the products of the source color and source factor, - * and the destination color and destination factor.

    - */ -public final class AMDBlendMinmaxFactor { - - /** - * Accepted by the {@code mode} parameter of BlendEquation and BlendEquationi, and by the {@code modeRGB} and {@code modeAlpha} parameters of - * BlendEquationSeparate and BlendEquationSeparatei. - */ - public static final int - GL_FACTOR_MIN_AMD = 0x901C, - GL_FACTOR_MAX_AMD = 0x901D; - - private AMDBlendMinmaxFactor() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDDebugOutput.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDDebugOutput.java deleted file mode 100644 index 02228142..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDDebugOutput.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the AMD_debug_output extension. - * - *

    This extension allows the GL to notify applications when various debug events occur in contexts that have been created with the debug flag, as provided - * by {@link WGLARBCreateContext WGL_ARB_create_context} and {@link GLXARBCreateContext GLX_ARB_create_context}.

    - * - *

    These events are represented in the form of enumerable messages with an included human-readable translation. Examples of debug events include incorrect - * use of the GL, warnings of undefined behavior, and performance warnings.

    - * - *

    A message is uniquely identified by a category and an implementation-dependent ID within that category. Message categories are general and are used to - * organize large groups of similar messages together. Examples of categories include GL errors, performance warnings, and deprecated functionality - * warnings. Each message is also assigned a severity level that denotes roughly how "important" that message is in comparison to other messages across all - * categories. For example, notification of a GL error would have a higher severity than a performance warning due to redundant state changes.

    - * - *

    Messages are communicated to the application through an application-defined callback function that is called by the GL implementation on each debug - * message. The motivation for the callback routine is to free application developers from actively having to query whether any GL error or other - * debuggable event has happened after each call to a GL function. With a callback, developers can keep their code free of debug checks, and only have to - * react to messages as they occur. In order to support indirect rendering, a message log is also provided that stores copies of recent messages until they - * are actively queried.

    - * - *

    To control the volume of debug output, messages can be disabled either individually by ID, or entire groups of messages can be turned off based on - * category or severity.

    - * - *

    The only requirement on the minimum quantity and type of messages that implementations of this extension must support is that a message must be sent - * notifying the application whenever any GL error occurs. Any further messages are left to the implementation. Implementations do not have to output - * messages from all categories listed by this extension in order to support this extension, and new categories can be added by other extensions.

    - * - *

    This extension places no restrictions or requirements on any additional functionality provided by the debug context flag through other extensions.

    - * - *

    Requires {@link WGLARBCreateContext WGL_ARB_create_context} or {@link GLXARBCreateContext GLX_ARB_create_context}.

    - */ -public class AMDDebugOutput { - - static { GL.initialize(); } - - /** Tokens accepted by GetIntegerv. */ - public static final int - GL_MAX_DEBUG_MESSAGE_LENGTH_AMD = 0x9143, - GL_MAX_DEBUG_LOGGED_MESSAGES_AMD = 0x9144, - GL_DEBUG_LOGGED_MESSAGES_AMD = 0x9145; - - /** - * Tokens accepted by {@link #glDebugMessageEnableAMD DebugMessageEnableAMD}, {@link #glGetDebugMessageLogAMD GetDebugMessageLogAMD}, {@link #glDebugMessageInsertAMD DebugMessageInsertAMD}, and {@code DEBUGPROCAMD} callback function for - * {@code severity}. - */ - public static final int - GL_DEBUG_SEVERITY_HIGH_AMD = 0x9146, - GL_DEBUG_SEVERITY_MEDIUM_AMD = 0x9147, - GL_DEBUG_SEVERITY_LOW_AMD = 0x9148; - - /** Tokens accepted by {@link #glDebugMessageEnableAMD DebugMessageEnableAMD}, {@link #glGetDebugMessageLogAMD GetDebugMessageLogAMD}, and {@code DEBUGPROCAMD} callback function for {@code category}. */ - public static final int - GL_DEBUG_CATEGORY_API_ERROR_AMD = 0x9149, - GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A, - GL_DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B, - GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C, - GL_DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D, - GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E, - GL_DEBUG_CATEGORY_APPLICATION_AMD = 0x914F, - GL_DEBUG_CATEGORY_OTHER_AMD = 0x9150; - - protected AMDDebugOutput() { - throw new UnsupportedOperationException(); - } - - // --- [ glDebugMessageEnableAMD ] --- - - /** - * Unsafe version of: {@link #glDebugMessageEnableAMD DebugMessageEnableAMD} - * - * @param count the number of values in the {@code ids} array - */ - public static native void nglDebugMessageEnableAMD(int category, int severity, int count, long ids, boolean enabled); - - /** - * Allows disabling or enabling generation of subsets of messages. If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages is enabled. If - * {@link GL11#GL_FALSE FALSE}, then those messages are disabled. This command can reference different subsets of messages by varying its parameter values in the following - * ways: - * - *
      - *
    1. To reference all messages, let {@code category}, {@code severity}, and {@code count} all be zero. The value of {@code ids} is ignored in this case.
    2. - *
    3. To reference all messages across all categories with a specific severity level, let {@code category} and {@code count} be zero and let - * {@code severity} identify the severity level. The value of {@code ids} is ignored in this case.
    4. - *
    5. To reference all messages within a single category, let {@code category} identify the referenced category and let {@code severity} and {@code count} - * be zero. The value of {@code ids} is ignored in this case.
    6. - *
    7. To reference all messages within a single category and at a specific severity level, let {@code category} identify the category and {@code severity} - * identify the severity level, and let {@code count} be zero. The value of {@code ids} is ignored in this case.
    8. - *
    9. To reference specific messages by ID within a single category, let {@code category} identify the category, let {@code severity} be zero, let - * {@code count} be greater than zero and let {@code ids} identify the IDs of {@code count} messages within the identified category. Operations on - * message IDs that are not valid within the category are silently ignored.
    10. - *
    - * - *

    In all of the above cases, if {@code category} is non-zero and specifies an invalid category, the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated. Similarly if - * {@code severity} is non-zero and is an invalid severity level, the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated. If {@code count} is less than zero, the error - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated. If the parameters do not fall into one of the cases defined above, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated. The error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if this command is called in a non-debug context.

    - * - *

    Although messages are grouped into categories and severities, and entire groups of messages can be turned off with a single call, there is no explicit - * per-category or per-severity enabled state. Instead the enabled state is stored individually for each message. There is no difference between disabling - * a category of messages with a single call, and enumerating all messages of that category and individually disabling each of them by their ID.

    - * - *

    All messages of severity level {@link #GL_DEBUG_SEVERITY_MEDIUM_AMD DEBUG_SEVERITY_MEDIUM_AMD} and {@link #GL_DEBUG_SEVERITY_HIGH_AMD DEBUG_SEVERITY_HIGH_AMD} in all categories are initially enabled, and all messages at - * {@link #GL_DEBUG_SEVERITY_LOW_AMD DEBUG_SEVERITY_LOW_AMD} are initially disabled.

    - * - * @param category the message category. One of:
    {@link #GL_DEBUG_CATEGORY_API_ERROR_AMD DEBUG_CATEGORY_API_ERROR_AMD}{@link #GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD DEBUG_CATEGORY_WINDOW_SYSTEM_AMD}
    {@link #GL_DEBUG_CATEGORY_DEPRECATION_AMD DEBUG_CATEGORY_DEPRECATION_AMD}{@link #GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD}
    {@link #GL_DEBUG_CATEGORY_PERFORMANCE_AMD DEBUG_CATEGORY_PERFORMANCE_AMD}{@link #GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD DEBUG_CATEGORY_SHADER_COMPILER_AMD}
    {@link #GL_DEBUG_CATEGORY_APPLICATION_AMD DEBUG_CATEGORY_APPLICATION_AMD}{@link #GL_DEBUG_CATEGORY_OTHER_AMD DEBUG_CATEGORY_OTHER_AMD}
    - * @param severity the message severity. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_AMD DEBUG_SEVERITY_HIGH_AMD}{@link #GL_DEBUG_SEVERITY_MEDIUM_AMD DEBUG_SEVERITY_MEDIUM_AMD}{@link #GL_DEBUG_SEVERITY_LOW_AMD DEBUG_SEVERITY_LOW_AMD}
    - * @param ids an array of message ids - * @param enabled whether to enable or disable the referenced subset of messages - */ - public static void glDebugMessageEnableAMD(@NativeType("GLenum") int category, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") IntBuffer ids, @NativeType("GLboolean") boolean enabled) { - nglDebugMessageEnableAMD(category, severity, remainingSafe(ids), memAddressSafe(ids), enabled); - } - - /** - * Allows disabling or enabling generation of subsets of messages. If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages is enabled. If - * {@link GL11#GL_FALSE FALSE}, then those messages are disabled. This command can reference different subsets of messages by varying its parameter values in the following - * ways: - * - *
      - *
    1. To reference all messages, let {@code category}, {@code severity}, and {@code count} all be zero. The value of {@code ids} is ignored in this case.
    2. - *
    3. To reference all messages across all categories with a specific severity level, let {@code category} and {@code count} be zero and let - * {@code severity} identify the severity level. The value of {@code ids} is ignored in this case.
    4. - *
    5. To reference all messages within a single category, let {@code category} identify the referenced category and let {@code severity} and {@code count} - * be zero. The value of {@code ids} is ignored in this case.
    6. - *
    7. To reference all messages within a single category and at a specific severity level, let {@code category} identify the category and {@code severity} - * identify the severity level, and let {@code count} be zero. The value of {@code ids} is ignored in this case.
    8. - *
    9. To reference specific messages by ID within a single category, let {@code category} identify the category, let {@code severity} be zero, let - * {@code count} be greater than zero and let {@code ids} identify the IDs of {@code count} messages within the identified category. Operations on - * message IDs that are not valid within the category are silently ignored.
    10. - *
    - * - *

    In all of the above cases, if {@code category} is non-zero and specifies an invalid category, the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated. Similarly if - * {@code severity} is non-zero and is an invalid severity level, the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated. If {@code count} is less than zero, the error - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated. If the parameters do not fall into one of the cases defined above, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated. The error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if this command is called in a non-debug context.

    - * - *

    Although messages are grouped into categories and severities, and entire groups of messages can be turned off with a single call, there is no explicit - * per-category or per-severity enabled state. Instead the enabled state is stored individually for each message. There is no difference between disabling - * a category of messages with a single call, and enumerating all messages of that category and individually disabling each of them by their ID.

    - * - *

    All messages of severity level {@link #GL_DEBUG_SEVERITY_MEDIUM_AMD DEBUG_SEVERITY_MEDIUM_AMD} and {@link #GL_DEBUG_SEVERITY_HIGH_AMD DEBUG_SEVERITY_HIGH_AMD} in all categories are initially enabled, and all messages at - * {@link #GL_DEBUG_SEVERITY_LOW_AMD DEBUG_SEVERITY_LOW_AMD} are initially disabled.

    - * - * @param category the message category. One of:
    {@link #GL_DEBUG_CATEGORY_API_ERROR_AMD DEBUG_CATEGORY_API_ERROR_AMD}{@link #GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD DEBUG_CATEGORY_WINDOW_SYSTEM_AMD}
    {@link #GL_DEBUG_CATEGORY_DEPRECATION_AMD DEBUG_CATEGORY_DEPRECATION_AMD}{@link #GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD}
    {@link #GL_DEBUG_CATEGORY_PERFORMANCE_AMD DEBUG_CATEGORY_PERFORMANCE_AMD}{@link #GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD DEBUG_CATEGORY_SHADER_COMPILER_AMD}
    {@link #GL_DEBUG_CATEGORY_APPLICATION_AMD DEBUG_CATEGORY_APPLICATION_AMD}{@link #GL_DEBUG_CATEGORY_OTHER_AMD DEBUG_CATEGORY_OTHER_AMD}
    - * @param severity the message severity. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_AMD DEBUG_SEVERITY_HIGH_AMD}{@link #GL_DEBUG_SEVERITY_MEDIUM_AMD DEBUG_SEVERITY_MEDIUM_AMD}{@link #GL_DEBUG_SEVERITY_LOW_AMD DEBUG_SEVERITY_LOW_AMD}
    - * @param enabled whether to enable or disable the referenced subset of messages - */ - public static void glDebugMessageEnableAMD(@NativeType("GLenum") int category, @NativeType("GLenum") int severity, @NativeType("GLuint const *") int id, @NativeType("GLboolean") boolean enabled) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.ints(id); - nglDebugMessageEnableAMD(category, severity, 1, memAddress(ids), enabled); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDebugMessageInsertAMD ] --- - - /** - * Unsafe version of: {@link #glDebugMessageInsertAMD DebugMessageInsertAMD} - * - * @param length the number of character in the message - */ - public static native void nglDebugMessageInsertAMD(int category, int severity, int id, int length, long buf); - - /** - * Injects an application-supplied message into the debug message stream. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the application. If - * {@code severity} is not a valid severity level, the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} will be generated. The value of {@code category} must be - * {@link #GL_DEBUG_CATEGORY_APPLICATION_AMD DEBUG_CATEGORY_APPLICATION_AMD}, or the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} will be generated. The string {@code buf} contains the string representation of the - * message. The parameter {@code length} contains the size of the message's string representation, excluding the null-terminator. If {@code length} is - * zero, then its value is derived from the string-length of {@code buf} and {@code buf} must contain a null-terminated string. The error - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if {@code length} is less than zero or its derived value is larger than or equal to {@link #GL_MAX_DEBUG_MESSAGE_LENGTH_AMD MAX_DEBUG_MESSAGE_LENGTH_AMD}. - * The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} will be generated if this function is called in a non-debug context.

    - * - * @param category the message category. Must be:
    {@link #GL_DEBUG_CATEGORY_APPLICATION_AMD DEBUG_CATEGORY_APPLICATION_AMD}
    - * @param severity the message severity. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_AMD DEBUG_SEVERITY_HIGH_AMD}{@link #GL_DEBUG_SEVERITY_MEDIUM_AMD DEBUG_SEVERITY_MEDIUM_AMD}{@link #GL_DEBUG_SEVERITY_LOW_AMD DEBUG_SEVERITY_LOW_AMD}
    - * @param id the message id - * @param buf the message characters - */ - public static void glDebugMessageInsertAMD(@NativeType("GLenum") int category, @NativeType("GLenum") int severity, @NativeType("GLuint") int id, @NativeType("GLchar const *") ByteBuffer buf) { - nglDebugMessageInsertAMD(category, severity, id, buf.remaining(), memAddress(buf)); - } - - /** - * Injects an application-supplied message into the debug message stream. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the application. If - * {@code severity} is not a valid severity level, the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} will be generated. The value of {@code category} must be - * {@link #GL_DEBUG_CATEGORY_APPLICATION_AMD DEBUG_CATEGORY_APPLICATION_AMD}, or the error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} will be generated. The string {@code buf} contains the string representation of the - * message. The parameter {@code length} contains the size of the message's string representation, excluding the null-terminator. If {@code length} is - * zero, then its value is derived from the string-length of {@code buf} and {@code buf} must contain a null-terminated string. The error - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if {@code length} is less than zero or its derived value is larger than or equal to {@link #GL_MAX_DEBUG_MESSAGE_LENGTH_AMD MAX_DEBUG_MESSAGE_LENGTH_AMD}. - * The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} will be generated if this function is called in a non-debug context.

    - * - * @param category the message category. Must be:
    {@link #GL_DEBUG_CATEGORY_APPLICATION_AMD DEBUG_CATEGORY_APPLICATION_AMD}
    - * @param severity the message severity. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_AMD DEBUG_SEVERITY_HIGH_AMD}{@link #GL_DEBUG_SEVERITY_MEDIUM_AMD DEBUG_SEVERITY_MEDIUM_AMD}{@link #GL_DEBUG_SEVERITY_LOW_AMD DEBUG_SEVERITY_LOW_AMD}
    - * @param id the message id - * @param buf the message characters - */ - public static void glDebugMessageInsertAMD(@NativeType("GLenum") int category, @NativeType("GLenum") int severity, @NativeType("GLuint") int id, @NativeType("GLchar const *") CharSequence buf) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int bufEncodedLength = stack.nUTF8(buf, false); - long bufEncoded = stack.getPointerAddress(); - nglDebugMessageInsertAMD(category, severity, id, bufEncodedLength, bufEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDebugMessageCallbackAMD ] --- - - /** Unsafe version of: {@link #glDebugMessageCallbackAMD DebugMessageCallbackAMD} */ - public static native void nglDebugMessageCallbackAMD(long callback, long userParam); - - /** - * Specifies a callback to receive debugging messages from the GL. - * - *

    With {@code callback} storing the address of the callback function. This function's signature must follow the type definition of DEBUGPROCAMD, and its - * calling convention must be the same as the calling convention of GL functions. Anything else will result in undefined behavior. Only one debug callback - * can be specified for the current context, and further calls overwrite the previous callback. Specifying zero as the value of {@code callback} clears the - * current callback and disables message output through callbacks. Applications can specify user-specified data through the pointer {@code userParam}. The - * context will store this pointer and will include it as one of the parameters of each call to the callback function. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} - * will be generated if this function is called for contexts created without the debug flag.

    - * - *

    If the application has specified a callback function in a debug context, the implementation will call that function whenever any unfiltered message is - * generated. The ID, category, and severity of the message are specified by the callback parameters {@code id}, {@code category} and {@code severity}, - * respectively. The string representation of the message is stored in {@code message} and its length (excluding the null-terminator) is stored in - * {@code length}. The parameter {@code userParam} is the user-specified value that was passed when calling DebugMessageCallbackAMD. The memory for - * {@code message} is allocated, owned and released by the implementation, and should only be considered valid for the duration of the callback function - * call. While it is allowed to concurrently use multiple debug contexts with the same debug callback function, note that it is the application's - * responsibility to ensure that any work that occurs inside the debug callback function is thread-safe. Furthermore, calling any GL or window layer - * function from within the callback function results in undefined behavior.

    - * - *

    If no callback is set, then messages are instead stored in an internal message log up to some maximum number of strings as defined by the - * implementation-dependent constant {@link #GL_MAX_DEBUG_LOGGED_MESSAGES_AMD MAX_DEBUG_LOGGED_MESSAGES_AMD}. Each context stores its own message log and will only store messages generated by - * commands operating in that context. If the message log is full, then the oldest messages will be removed from the log to make room for newer ones. The - * application can query the number of messages currently in the log by obtaining the value of {@link #GL_DEBUG_LOGGED_MESSAGES_AMD DEBUG_LOGGED_MESSAGES_AMD}.

    - * - * @param callback a callback function that will be called when a debug message is generated - * @param userParam a user supplied pointer that will be passed on each invocation of {@code callback} - */ - public static void glDebugMessageCallbackAMD(@Nullable @NativeType("GLDEBUGPROCAMD") GLDebugMessageAMDCallbackI callback, @NativeType("void *") long userParam) { - nglDebugMessageCallbackAMD(memAddressSafe(callback), userParam); - } - - // --- [ glGetDebugMessageLogAMD ] --- - - /** - * Unsafe version of: {@link #glGetDebugMessageLogAMD GetDebugMessageLogAMD} - * - * @param bufsize the maximum number of characters that can be written in the {@code message} array - */ - public static native int nglGetDebugMessageLogAMD(int count, int bufsize, long categories, long severities, long ids, long lengths, long messageLog); - - /** - * Retrieves messages from the debug message log. - * - *

    This function will fetch as many messages as possible from the message log up to {@code count} in order from oldest to newest, and will return the - * number of messages fetched. Those messages that were fetched will be removed from the log. The value of {@code count} must be greater than zero and less - * than {@link #GL_MAX_DEBUG_LOGGED_MESSAGES_AMD MAX_DEBUG_LOGGED_MESSAGES_AMD} or otherwise the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated. The value of {@code count} can be larger than the - * actual number of messages currently in the log. If {@code messageLog} is not a null pointer, then the string representations of all fetched messages - * will be stored in the buffer {@code messageLog} and will be separated by null-terminators. The maximum size of the buffer (including all - * null-terminators) is denoted by {@code bufSize}, and strings of messages within {@code count} that do not fit in the buffer will not be fetched. If - * {@code bufSize} is less than zero, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated. If {@code messageLog} is a null pointer, then the value of - * {@code bufSize} is ignored. The categories, severity levels, IDs, and string representation lengths of all (up to {@code count}) removed messages will - * be stored in the arrays {@code categories}, {@code severities}, {@code ids}, and {@code lengths}, respectively. The counts stored in the array - * {@code lengths} include the null-terminator of each string. Any and all of the output arrays, including {@code messageLog}, are optional, and no data is - * returned for those arrays that are specified with a null pointer. To simply delete up to {@code count} messages from the message log and ignoring, the - * application can call the function with null pointers for all output arrays. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} will be generated by GetDebugMessageLogAMD - * if it is called in a non-debug context.

    - * - * @param count the number of debug messages to retrieve from the log - * @param categories an array of variables to receive the categories of the retrieved messages - * @param severities an array of variables to receive the severities of the retrieved messages - * @param ids an array of variables to receive the ids of the retrieved messages - * @param lengths an array of variables to receive the lengths of the retrieved messages - * @param messageLog an array of characters that will receive the messages - */ - @NativeType("GLuint") - public static int glGetDebugMessageLogAMD(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") IntBuffer categories, @Nullable @NativeType("GLenum *") IntBuffer severities, @Nullable @NativeType("GLuint *") IntBuffer ids, @Nullable @NativeType("GLsizei *") IntBuffer lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - if (CHECKS) { - checkSafe(categories, count); - checkSafe(severities, count); - checkSafe(ids, count); - checkSafe(lengths, count); - } - return nglGetDebugMessageLogAMD(count, remainingSafe(messageLog), memAddressSafe(categories), memAddressSafe(severities), memAddressSafe(ids), memAddressSafe(lengths), memAddressSafe(messageLog)); - } - - /** Array version of: {@link #glDebugMessageEnableAMD DebugMessageEnableAMD} */ - public static void glDebugMessageEnableAMD(@NativeType("GLenum") int category, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") int[] ids, @NativeType("GLboolean") boolean enabled) { - long __functionAddress = GL.getICD().glDebugMessageEnableAMD; - if (CHECKS) { - check(__functionAddress); - } - callPV(category, severity, lengthSafe(ids), ids, enabled, __functionAddress); - } - - /** Array version of: {@link #glGetDebugMessageLogAMD GetDebugMessageLogAMD} */ - @NativeType("GLuint") - public static int glGetDebugMessageLogAMD(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") int[] categories, @Nullable @NativeType("GLenum *") int[] severities, @Nullable @NativeType("GLuint *") int[] ids, @Nullable @NativeType("GLsizei *") int[] lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - long __functionAddress = GL.getICD().glGetDebugMessageLogAMD; - if (CHECKS) { - check(__functionAddress); - checkSafe(categories, count); - checkSafe(severities, count); - checkSafe(ids, count); - checkSafe(lengths, count); - } - return callPPPPPI(count, remainingSafe(messageLog), categories, severities, ids, lengths, memAddressSafe(messageLog), __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDDepthClampSeparate.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDDepthClampSeparate.java deleted file mode 100644 index d9481375..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDDepthClampSeparate.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_depth_clamp_separate extension. - * - *

    The extension {@link ARBDepthClamp ARB_depth_clamp} introduced the ability to control the clamping of the depth value for both the near and far plane. One limitation - * is that the control was for both planes at the same time; some applications can benefit from having clamping enabled for only one of the two planes, in - * order to save fillrate for the other plane by clipping the geometry.

    - * - *

    This extension provides exactly such functionality.

    - */ -public final class AMDDepthClampSeparate { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_DEPTH_CLAMP_NEAR_AMD = 0x901E, - GL_DEPTH_CLAMP_FAR_AMD = 0x901F; - - private AMDDepthClampSeparate() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDDrawBuffersBlend.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDDrawBuffersBlend.java deleted file mode 100644 index e5c631e7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDDrawBuffersBlend.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_draw_buffers_blend extension. - * - *

    This extension builds upon the ARB_draw_buffers and EXT_draw_buffers2 extensions. In ARB_draw_buffers (part of OpenGL 2.0), separate values could be - * written to each color buffer. This was further enhanced by EXT_draw_buffers2 by adding in the ability to enable blending and to set color write masks - * independently per color output.

    - * - *

    This extension provides the ability to set individual blend equations and blend functions for each color output.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link EXTDrawBuffers2 EXT_draw_buffers2}.

    - */ -public class AMDDrawBuffersBlend { - - static { GL.initialize(); } - - protected AMDDrawBuffersBlend() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendFuncIndexedAMD ] --- - - public static native void glBlendFuncIndexedAMD(@NativeType("GLuint") int buf, @NativeType("GLenum") int src, @NativeType("GLenum") int dst); - - // --- [ glBlendFuncSeparateIndexedAMD ] --- - - public static native void glBlendFuncSeparateIndexedAMD(@NativeType("GLuint") int buf, @NativeType("GLenum") int srcRGB, @NativeType("GLenum") int dstRGB, @NativeType("GLenum") int srcAlpha, @NativeType("GLenum") int dstAlpha); - - // --- [ glBlendEquationIndexedAMD ] --- - - public static native void glBlendEquationIndexedAMD(@NativeType("GLuint") int buf, @NativeType("GLenum") int mode); - - // --- [ glBlendEquationSeparateIndexedAMD ] --- - - public static native void glBlendEquationSeparateIndexedAMD(@NativeType("GLuint") int buf, @NativeType("GLenum") int modeRGB, @NativeType("GLenum") int modeAlpha); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDFramebufferMultisampleAdvanced.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDFramebufferMultisampleAdvanced.java deleted file mode 100644 index eff1cfb8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDFramebufferMultisampleAdvanced.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_framebuffer_multisample_advanced extension. - * - *

    This extension extends {@link ARBFramebufferObject ARB_framebuffer_object} by allowing compromises between image quality and memory footprint of multisample antialiasing.

    - * - *

    {@code ARB_framebuffer_object} introduced {@link GL30C#glRenderbufferStorageMultisample RenderbufferStorageMultisample} as a method of defining the parameters for a multisample render buffer. - * This function takes a {@code samples} parameter that has strict requirements on behavior such that no compromises in the final image quality are - * allowed. Additionally, {@code ARB_framebuffer_object} requires that all framebuffer attachments have the same number of samples.

    - * - *

    This extension extends {@code ARB_framebuffer_object} by providing a new function, {@link #glRenderbufferStorageMultisampleAdvancedAMD RenderbufferStorageMultisampleAdvancedAMD}, that distinguishes - * between samples and storage samples for color renderbuffers where the number of storage samples can be less than the number of samples. This extension - * also allows non-matching sample counts between color and depth/stencil renderbuffers.

    - * - *

    This extension does not require any specific combination of sample counts to be supported.

    - * - *

    Requires {@link ARBFramebufferObject ARB_framebuffer_object}.

    - */ -public class AMDFramebufferMultisampleAdvanced { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of {@link GL30C#glGetRenderbufferParameteriv GetRenderbufferParameteriv}. */ - public static final int GL_RENDERBUFFER_STORAGE_SAMPLES_AMD = 0x91B2; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, GetDoublev. */ - public static final int - GL_MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD = 0x91B3, - GL_MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD = 0x91B4, - GL_MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD = 0x91B5, - GL_NUM_SUPPORTED_MULTISAMPLE_MODES_AMD = 0x91B6, - GL_SUPPORTED_MULTISAMPLE_MODES_AMD = 0x91B7; - - protected AMDFramebufferMultisampleAdvanced() { - throw new UnsupportedOperationException(); - } - - // --- [ glRenderbufferStorageMultisampleAdvancedAMD ] --- - - public static native void glRenderbufferStorageMultisampleAdvancedAMD(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLsizei") int storageSamples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glNamedRenderbufferStorageMultisampleAdvancedAMD ] --- - - public static native void glNamedRenderbufferStorageMultisampleAdvancedAMD(@NativeType("GLuint") int renderbuffer, @NativeType("GLsizei") int samples, @NativeType("GLsizei") int storageSamples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderHalfFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderHalfFloat.java deleted file mode 100644 index 2a52ee3c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderHalfFloat.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_gpu_shader_half_float extension. - * - *

    This extension was developed based on the {@link NVGPUShader5 NV_gpu_shader5} extension to allow implementations supporting half float in shader and expose the - * feature without the additional requirements that are present in {@code NV_gpu_shader5}.

    - * - *

    The extension introduces the following features for all shader types:

    - * - *
      - *
    • support for half float scalar, vector and matrix data types in shader;
    • - *
    • new built-in functions to pack and unpack half float types into a 32-bit integer vector;
    • - *
    • half float support for all existing single float built-in functions, including angle functions, exponential functions, common functions, geometric - * functions, matrix functions and etc.;
    • - *
    - * - *

    This extension is designed to be a functional superset of the half-precision floating-point support from NV_gpu_shader5 and to keep source code - * compatible with that, thus the new procedures, functions, and tokens are identical to those found in that extension.

    - * - *

    Requires {@link GL40 OpenGL 4.0} and GLSL 4.00.

    - */ -public final class AMDGPUShaderHalfFloat { - - /** Returned by the {@code type} parameter of GetActiveAttrib, GetActiveUniform, and GetTransformFeedbackVarying. */ - public static final int - GL_FLOAT16_MAT2_AMD = 0x91C5, - GL_FLOAT16_MAT3_AMD = 0x91C6, - GL_FLOAT16_MAT4_AMD = 0x91C7, - GL_FLOAT16_MAT2x3_AMD = 0x91C8, - GL_FLOAT16_MAT2x4_AMD = 0x91C9, - GL_FLOAT16_MAT3x2_AMD = 0x91CA, - GL_FLOAT16_MAT3x4_AMD = 0x91CB, - GL_FLOAT16_MAT4x2_AMD = 0x91CC, - GL_FLOAT16_MAT4x3_AMD = 0x91CD; - - private AMDGPUShaderHalfFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderHalfFloatFetch.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderHalfFloatFetch.java deleted file mode 100644 index 7e341544..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderHalfFloatFetch.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_gpu_shader_half_float_fetch extension. - * - *

    This extension was developed based on the {@code AMD_gpu_shader_half_float} extension to allow implementations supporting half-precision floating-point - * both in shader texture functions and in shader image memory functions.

    - * - *

    Requires {@link GL40 OpenGL 4.0}, GLSL 4.00 and {@link AMDGPUShaderHalfFloat AMD_gpu_shader_half_float}.

    - */ -public final class AMDGPUShaderHalfFloatFetch { - - /** Returned by the {@code type} parameter of {@link GL20C#glGetActiveUniform GetActiveUniform} and {@link GL43C#glGetProgramResourceiv GetProgramResourceiv}. */ - public static final int - GL_FLOAT16_SAMPLER_1D_AMD = 0x91CE, - GL_FLOAT16_SAMPLER_2D_AMD = 0x91CF, - GL_FLOAT16_SAMPLER_3D_AMD = 0x91D0, - GL_FLOAT16_SAMPLER_CUBE_AMD = 0x91D1, - GL_FLOAT16_SAMPLER_2D_RECT_AMD = 0x91D2, - GL_FLOAT16_SAMPLER_1D_ARRAY_AMD = 0x91D3, - GL_FLOAT16_SAMPLER_2D_ARRAY_AMD = 0x91D4, - GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD = 0x91D5, - GL_FLOAT16_SAMPLER_BUFFER_AMD = 0x91D6, - GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD = 0x91D7, - GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD = 0x91D8, - GL_FLOAT16_SAMPLER_1D_SHADOW_AMD = 0x91D9, - GL_FLOAT16_SAMPLER_2D_SHADOW_AMD = 0x91DA, - GL_FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD = 0x91DB, - GL_FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD = 0x91DC, - GL_FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD = 0x91DD, - GL_FLOAT16_SAMPLER_CUBE_SHADOW_AMD = 0x91DE, - GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD = 0x91DF, - GL_FLOAT16_IMAGE_1D_AMD = 0x91E0, - GL_FLOAT16_IMAGE_2D_AMD = 0x91E1, - GL_FLOAT16_IMAGE_3D_AMD = 0x91E2, - GL_FLOAT16_IMAGE_2D_RECT_AMD = 0x91E3, - GL_FLOAT16_IMAGE_CUBE_AMD = 0x91E4, - GL_FLOAT16_IMAGE_1D_ARRAY_AMD = 0x91E5, - GL_FLOAT16_IMAGE_2D_ARRAY_AMD = 0x91E6, - GL_FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD = 0x91E7, - GL_FLOAT16_IMAGE_BUFFER_AMD = 0x91E8, - GL_FLOAT16_IMAGE_2D_MULTISAMPLE_AMD = 0x91E9, - GL_FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD = 0x91EA; - - private AMDGPUShaderHalfFloatFetch() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderInt64.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderInt64.java deleted file mode 100644 index a42c2c5c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDGPUShaderInt64.java +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_gpu_shader_int64 extension. - * - *

    This extension was developed based on the NV_gpu_shader5 extension to allow implementations supporting 64-bit integers to expose the feature without - * the additional requirements that are present in NV_gpu_shader5.

    - * - *

    The extension introduces the following features for all shader types:

    - * - *
      - *
    • support for 64-bit scalar and vector integer data types, including uniform API, uniform buffer object, transform feedback, and shader input and - * output support;
    • - *
    • new built-in functions to pack and unpack 64-bit integer types into a two-component 32-bit integer vector;
    • - *
    • new built-in functions to convert double-precision floating-point values to or from their 64-bit integer bit encodings;
    • - *
    • vector relational functions supporting comparisons of vectors of 64-bit integer types; and
    • - *
    • common functions abs, sign, min, max, clamp, and mix supporting arguments of 64-bit integer types.
    • - *
    - * - *

    This extension is designed to be a functional superset of the 64-bit integer support introduced by NV_gpu_shader5 and to be source code compatible with - * that, thus the new procedures, functions, and tokens are identical to those found in that extension.

    - * - *

    Requires {@link GL40 OpenGL 4.0} and GLSL 4.00.

    - */ -public class AMDGPUShaderInt64 { - - static { GL.initialize(); } - - /** Returned by the {@code type} parameter of GetActiveAttrib, GetActiveUniform, and GetTransformFeedbackVarying. */ - public static final int - GL_INT64_NV = 0x140E, - GL_UNSIGNED_INT64_NV = 0x140F, - GL_INT8_NV = 0x8FE0, - GL_INT8_VEC2_NV = 0x8FE1, - GL_INT8_VEC3_NV = 0x8FE2, - GL_INT8_VEC4_NV = 0x8FE3, - GL_INT16_NV = 0x8FE4, - GL_INT16_VEC2_NV = 0x8FE5, - GL_INT16_VEC3_NV = 0x8FE6, - GL_INT16_VEC4_NV = 0x8FE7, - GL_INT64_VEC2_NV = 0x8FE9, - GL_INT64_VEC3_NV = 0x8FEA, - GL_INT64_VEC4_NV = 0x8FEB, - GL_UNSIGNED_INT8_NV = 0x8FEC, - GL_UNSIGNED_INT8_VEC2_NV = 0x8FED, - GL_UNSIGNED_INT8_VEC3_NV = 0x8FEE, - GL_UNSIGNED_INT8_VEC4_NV = 0x8FEF, - GL_UNSIGNED_INT16_NV = 0x8FF0, - GL_UNSIGNED_INT16_VEC2_NV = 0x8FF1, - GL_UNSIGNED_INT16_VEC3_NV = 0x8FF2, - GL_UNSIGNED_INT16_VEC4_NV = 0x8FF3, - GL_UNSIGNED_INT64_VEC2_NV = 0x8FF5, - GL_UNSIGNED_INT64_VEC3_NV = 0x8FF6, - GL_UNSIGNED_INT64_VEC4_NV = 0x8FF7, - GL_FLOAT16_NV = 0x8FF8, - GL_FLOAT16_VEC2_NV = 0x8FF9, - GL_FLOAT16_VEC3_NV = 0x8FFA, - GL_FLOAT16_VEC4_NV = 0x8FFB; - - protected AMDGPUShaderInt64() { - throw new UnsupportedOperationException(); - } - - // --- [ glUniform1i64NV ] --- - - public static void glUniform1i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x) { - NVGPUShader5.glUniform1i64NV(location, x); - } - - // --- [ glUniform2i64NV ] --- - - public static void glUniform2i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y) { - NVGPUShader5.glUniform2i64NV(location, x, y); - } - - // --- [ glUniform3i64NV ] --- - - public static void glUniform3i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z) { - NVGPUShader5.glUniform3i64NV(location, x, y, z); - } - - // --- [ glUniform4i64NV ] --- - - public static void glUniform4i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z, @NativeType("GLint64EXT") long w) { - NVGPUShader5.glUniform4i64NV(location, x, y, z, w); - } - - // --- [ glUniform1i64vNV ] --- - - public static void nglUniform1i64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform1i64vNV(location, count, value); - } - - public static void glUniform1i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glUniform1i64vNV(location, value); - } - - // --- [ glUniform2i64vNV ] --- - - public static void nglUniform2i64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform2i64vNV(location, count, value); - } - - public static void glUniform2i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glUniform2i64vNV(location, value); - } - - // --- [ glUniform3i64vNV ] --- - - public static void nglUniform3i64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform3i64vNV(location, count, value); - } - - public static void glUniform3i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glUniform3i64vNV(location, value); - } - - // --- [ glUniform4i64vNV ] --- - - public static void nglUniform4i64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform4i64vNV(location, count, value); - } - - public static void glUniform4i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glUniform4i64vNV(location, value); - } - - // --- [ glUniform1ui64NV ] --- - - public static void glUniform1ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x) { - NVGPUShader5.glUniform1ui64NV(location, x); - } - - // --- [ glUniform2ui64NV ] --- - - public static void glUniform2ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y) { - NVGPUShader5.glUniform2ui64NV(location, x, y); - } - - // --- [ glUniform3ui64NV ] --- - - public static void glUniform3ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z) { - NVGPUShader5.glUniform3ui64NV(location, x, y, z); - } - - // --- [ glUniform4ui64NV ] --- - - public static void glUniform4ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z, @NativeType("GLuint64EXT") long w) { - NVGPUShader5.glUniform4ui64NV(location, x, y, z, w); - } - - // --- [ glUniform1ui64vNV ] --- - - public static void nglUniform1ui64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform1ui64vNV(location, count, value); - } - - public static void glUniform1ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - NVGPUShader5.glUniform1ui64vNV(location, value); - } - - // --- [ glUniform2ui64vNV ] --- - - public static void nglUniform2ui64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform2ui64vNV(location, count, value); - } - - public static void glUniform2ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT *") LongBuffer value) { - NVGPUShader5.glUniform2ui64vNV(location, value); - } - - // --- [ glUniform3ui64vNV ] --- - - public static void nglUniform3ui64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform3ui64vNV(location, count, value); - } - - public static void glUniform3ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - NVGPUShader5.glUniform3ui64vNV(location, value); - } - - // --- [ glUniform4ui64vNV ] --- - - public static void nglUniform4ui64vNV(int location, int count, long value) { - NVGPUShader5.nglUniform4ui64vNV(location, count, value); - } - - public static void glUniform4ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - NVGPUShader5.glUniform4ui64vNV(location, value); - } - - // --- [ glGetUniformi64vNV ] --- - - public static void nglGetUniformi64vNV(int program, int location, long params) { - NVGPUShader5.nglGetUniformi64vNV(program, location, params); - } - - public static void glGetUniformi64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT *") LongBuffer params) { - NVGPUShader5.glGetUniformi64vNV(program, location, params); - } - - @NativeType("void") - public static long glGetUniformi64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return NVGPUShader5.glGetUniformi64NV(program, location); - } - - // --- [ glGetUniformui64vNV ] --- - - public static void nglGetUniformui64vNV(int program, int location, long params) { - NVShaderBufferLoad.nglGetUniformui64vNV(program, location, params); - } - - public static void glGetUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT *") LongBuffer params) { - NVShaderBufferLoad.glGetUniformui64vNV(program, location, params); - } - - @NativeType("void") - public static long glGetUniformui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return NVShaderBufferLoad.glGetUniformui64NV(program, location); - } - - // --- [ glProgramUniform1i64NV ] --- - - public static void glProgramUniform1i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x) { - NVGPUShader5.glProgramUniform1i64NV(program, location, x); - } - - // --- [ glProgramUniform2i64NV ] --- - - public static void glProgramUniform2i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y) { - NVGPUShader5.glProgramUniform2i64NV(program, location, x, y); - } - - // --- [ glProgramUniform3i64NV ] --- - - public static void glProgramUniform3i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z) { - NVGPUShader5.glProgramUniform3i64NV(program, location, x, y, z); - } - - // --- [ glProgramUniform4i64NV ] --- - - public static void glProgramUniform4i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z, @NativeType("GLint64EXT") long w) { - NVGPUShader5.glProgramUniform4i64NV(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1i64vNV ] --- - - public static void nglProgramUniform1i64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform1i64vNV(program, location, count, value); - } - - public static void glProgramUniform1i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform1i64vNV(program, location, value); - } - - // --- [ glProgramUniform2i64vNV ] --- - - public static void nglProgramUniform2i64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform2i64vNV(program, location, count, value); - } - - public static void glProgramUniform2i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform2i64vNV(program, location, value); - } - - // --- [ glProgramUniform3i64vNV ] --- - - public static void nglProgramUniform3i64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform3i64vNV(program, location, count, value); - } - - public static void glProgramUniform3i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform3i64vNV(program, location, value); - } - - // --- [ glProgramUniform4i64vNV ] --- - - public static void nglProgramUniform4i64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform4i64vNV(program, location, count, value); - } - - public static void glProgramUniform4i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform4i64vNV(program, location, value); - } - - // --- [ glProgramUniform1ui64NV ] --- - - public static void glProgramUniform1ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x) { - NVGPUShader5.glProgramUniform1ui64NV(program, location, x); - } - - // --- [ glProgramUniform2ui64NV ] --- - - public static void glProgramUniform2ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y) { - NVGPUShader5.glProgramUniform2ui64NV(program, location, x, y); - } - - // --- [ glProgramUniform3ui64NV ] --- - - public static void glProgramUniform3ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z) { - NVGPUShader5.glProgramUniform3ui64NV(program, location, x, y, z); - } - - // --- [ glProgramUniform4ui64NV ] --- - - public static void glProgramUniform4ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z, @NativeType("GLuint64EXT") long w) { - NVGPUShader5.glProgramUniform4ui64NV(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1ui64vNV ] --- - - public static void nglProgramUniform1ui64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform1ui64vNV(program, location, count, value); - } - - public static void glProgramUniform1ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform1ui64vNV(program, location, value); - } - - // --- [ glProgramUniform2ui64vNV ] --- - - public static void nglProgramUniform2ui64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform2ui64vNV(program, location, count, value); - } - - public static void glProgramUniform2ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform2ui64vNV(program, location, value); - } - - // --- [ glProgramUniform3ui64vNV ] --- - - public static void nglProgramUniform3ui64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform3ui64vNV(program, location, count, value); - } - - public static void glProgramUniform3ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform3ui64vNV(program, location, value); - } - - // --- [ glProgramUniform4ui64vNV ] --- - - public static void nglProgramUniform4ui64vNV(int program, int location, int count, long value) { - NVGPUShader5.nglProgramUniform4ui64vNV(program, location, count, value); - } - - public static void glProgramUniform4ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - NVGPUShader5.glProgramUniform4ui64vNV(program, location, value); - } - - /** Array version of: {@link #glUniform1i64vNV Uniform1i64vNV} */ - public static void glUniform1i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glUniform1i64vNV(location, value); - } - - /** Array version of: {@link #glUniform2i64vNV Uniform2i64vNV} */ - public static void glUniform2i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glUniform2i64vNV(location, value); - } - - /** Array version of: {@link #glUniform3i64vNV Uniform3i64vNV} */ - public static void glUniform3i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glUniform3i64vNV(location, value); - } - - /** Array version of: {@link #glUniform4i64vNV Uniform4i64vNV} */ - public static void glUniform4i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glUniform4i64vNV(location, value); - } - - /** Array version of: {@link #glUniform1ui64vNV Uniform1ui64vNV} */ - public static void glUniform1ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - NVGPUShader5.glUniform1ui64vNV(location, value); - } - - /** Array version of: {@link #glUniform2ui64vNV Uniform2ui64vNV} */ - public static void glUniform2ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT *") long[] value) { - NVGPUShader5.glUniform2ui64vNV(location, value); - } - - /** Array version of: {@link #glUniform3ui64vNV Uniform3ui64vNV} */ - public static void glUniform3ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - NVGPUShader5.glUniform3ui64vNV(location, value); - } - - /** Array version of: {@link #glUniform4ui64vNV Uniform4ui64vNV} */ - public static void glUniform4ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - NVGPUShader5.glUniform4ui64vNV(location, value); - } - - /** Array version of: {@link #glGetUniformi64vNV GetUniformi64vNV} */ - public static void glGetUniformi64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT *") long[] params) { - NVGPUShader5.glGetUniformi64vNV(program, location, params); - } - - /** Array version of: {@link #glGetUniformui64vNV GetUniformui64vNV} */ - public static void glGetUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT *") long[] params) { - NVShaderBufferLoad.glGetUniformui64vNV(program, location, params); - } - - /** Array version of: {@link #glProgramUniform1i64vNV ProgramUniform1i64vNV} */ - public static void glProgramUniform1i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform1i64vNV(program, location, value); - } - - /** Array version of: {@link #glProgramUniform2i64vNV ProgramUniform2i64vNV} */ - public static void glProgramUniform2i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform2i64vNV(program, location, value); - } - - /** Array version of: {@link #glProgramUniform3i64vNV ProgramUniform3i64vNV} */ - public static void glProgramUniform3i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform3i64vNV(program, location, value); - } - - /** Array version of: {@link #glProgramUniform4i64vNV ProgramUniform4i64vNV} */ - public static void glProgramUniform4i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform4i64vNV(program, location, value); - } - - /** Array version of: {@link #glProgramUniform1ui64vNV ProgramUniform1ui64vNV} */ - public static void glProgramUniform1ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform1ui64vNV(program, location, value); - } - - /** Array version of: {@link #glProgramUniform2ui64vNV ProgramUniform2ui64vNV} */ - public static void glProgramUniform2ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform2ui64vNV(program, location, value); - } - - /** Array version of: {@link #glProgramUniform3ui64vNV ProgramUniform3ui64vNV} */ - public static void glProgramUniform3ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform3ui64vNV(program, location, value); - } - - /** Array version of: {@link #glProgramUniform4ui64vNV ProgramUniform4ui64vNV} */ - public static void glProgramUniform4ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - NVGPUShader5.glProgramUniform4ui64vNV(program, location, value); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDInterleavedElements.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDInterleavedElements.java deleted file mode 100644 index 33e83ffd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDInterleavedElements.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_interleaved_elements extension. - * - *

    The glDrawElements function and its variants (instanced and indirect, for example) allow OpenGL to draw indexed arrays of vertices. Since its - * inception, OpenGL has supported unsigned bytes, unsigned shorts and unsigned integers as index types. However, all enabled vertex arrays may be - * represented by at most one shared index.

    - * - *

    A common scenario in graphics rendering is that several faces share a vertex where, for each face some properties of a vertex (position and texture - * coordinates, for example) should be common but others must be unique (colors, normals, and so on). Consider a mesh of a cube with per-face normals, for - * example. There are 8 vertices and 6 normals, and 12 triangles (where each face of the cube is represented as two triangles). To render this cube, we - * must compute the 24 unique permutations of position and normal and build a new element list to index into it. In fact, any advantage of indexed draw is - * lost here as the number of required permutations is equal to the final vertex count required to draw the object.

    - * - *

    This extension allows OpenGL to process multi-component packed element data. The maximum size of a vertex's index data is not increased, but the - * facility to store 2 16-bit or 2 or 4 8-bit indices per vertex is introduced. Each vertex attribute is given a swizzle property to allow its index to be - * sourced from one of up to 4 channels of index data. This effectively allows an application to supply multiple interleaved streams of index data to - * OpenGL. Each vertex attribute is given a 'channel selector' to select one of the up to 4 channels of vertex index information presented to OpenGL. This - * enables the use-case described above and many more. The swizzle parameter is also applied to vertex indices passed to shaders, and updates to the - * definition of base vertex parameters and primitive restart are applied.

    - */ -public class AMDInterleavedElements { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of VertexAttribParameteriAMD and GetVertexAttrib{iv|dv|fv|Iiv|Iuiv|Ldv}. */ - public static final int GL_VERTEX_ELEMENT_SWIZZLE_AMD = 0x91A4; - - /** Selected by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int GL_VERTEX_ID_SWIZZLE_AMD = 0x91A5; - - protected AMDInterleavedElements() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttribParameteriAMD ] --- - - public static native void glVertexAttribParameteriAMD(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDOcclusionQueryEvent.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDOcclusionQueryEvent.java deleted file mode 100644 index f8876baf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDOcclusionQueryEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_occlusion_query_event extension. - * - *

    This extension introduces the concept of occlusion query events and changes the concept of an occlusion query from counting passed fragments to counting - * fragments that generate any of a user-selectable set of events. Provided events include passing the depth test, and passing or failing the stencil test. - * For a given occlusion query object, counting of these events may be enabled or disabled, allowing any combination to be counted.

    - * - *

    Requires {@link GL15 OpenGL 1.5}.

    - */ -public class AMDOcclusionQueryEvent { - - static { GL.initialize(); } - - /** - * Accepted by the {@code pname} argument to {@link #glQueryObjectParameteruiAMD QueryObjectParameteruiAMD}, {@link GL15C#glGetQueryObjectiv GetQueryObjectiv}, {@link GL15C#glGetQueryObjectuiv GetQueryObjectuiv}, - * {@link GL33C#glGetQueryObjecti64v GetQueryObjecti64v}, and {@link GL33C#glGetQueryObjectui64v GetQueryObjectui64v}. - */ - public static final int GL_OCCLUSION_QUERY_EVENT_MASK_AMD = 0x874F; - - /** Accepted by the {@code param} argument to {@link #glQueryObjectParameteruiAMD QueryObjectParameteruiAMD}. */ - public static final int - GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD = 0x1, - GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD = 0x2, - GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD = 0x4, - GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD = 0x8, - GL_QUERY_ALL_EVENT_BITS_AMD = 0xFFFFFFFF; - - protected AMDOcclusionQueryEvent() { - throw new UnsupportedOperationException(); - } - - // --- [ glQueryObjectParameteruiAMD ] --- - - /** - * Changes the value of a query object parameter. - * - * @param target a valid query target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param id a value returned from a previous call to {@link GL15C#glGenQueries GenQueries} - * @param pname the parameter to modify. Must be:
    {@link #GL_OCCLUSION_QUERY_EVENT_MASK_AMD OCCLUSION_QUERY_EVENT_MASK_AMD}
    - * @param param the new value. One of:
    {@link #GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD QUERY_DEPTH_PASS_EVENT_BIT_AMD}{@link #GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD QUERY_DEPTH_FAIL_EVENT_BIT_AMD}
    {@link #GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD QUERY_STENCIL_FAIL_EVENT_BIT_AMD}{@link #GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD}
    {@link #GL_QUERY_ALL_EVENT_BITS_AMD QUERY_ALL_EVENT_BITS_AMD}
    - */ - public static native void glQueryObjectParameteruiAMD(@NativeType("GLenum") int target, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint") int param); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDPerformanceMonitor.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDPerformanceMonitor.java deleted file mode 100644 index 4c5a992f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDPerformanceMonitor.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the AMD_performance_monitor extension. - * - *

    This extension enables the capture and reporting of performance monitors. Performance monitors contain groups of counters which hold arbitrary counted - * data. Typically, the counters hold information on performance-related counters in the underlying hardware. The extension is general enough to allow the - * implementation to choose which counters to expose and pick the data type and range of the counters. The extension also allows counting to start and end - * on arbitrary boundaries during rendering.

    - */ -public class AMDPerformanceMonitor { - - static { GL.initialize(); } - - /** Accepted by the {@code pame} parameter of GetPerfMonitorCounterInfoAMD. */ - public static final int - GL_COUNTER_TYPE_AMD = 0x8BC0, - GL_COUNTER_RANGE_AMD = 0x8BC1; - - /** Returned as a valid value in {@code data} parameter of GetPerfMonitorCounterInfoAMD if {@code pname} = COUNTER_TYPE_AMD. */ - public static final int - GL_UNSIGNED_INT64_AMD = 0x8BC2, - GL_PERCENTAGE_AMD = 0x8BC3; - - /** Accepted by the {@code pname} parameter of GetPerfMonitorCounterDataAMD. */ - public static final int - GL_PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4, - GL_PERFMON_RESULT_SIZE_AMD = 0x8BC5, - GL_PERFMON_RESULT_AMD = 0x8BC6; - - protected AMDPerformanceMonitor() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetPerfMonitorGroupsAMD ] --- - - public static native void nglGetPerfMonitorGroupsAMD(long numGroups, int groupsSize, long groups); - - public static void glGetPerfMonitorGroupsAMD(@Nullable @NativeType("GLint *") IntBuffer numGroups, @Nullable @NativeType("GLuint *") IntBuffer groups) { - if (CHECKS) { - checkSafe(numGroups, 1); - } - nglGetPerfMonitorGroupsAMD(memAddressSafe(numGroups), remainingSafe(groups), memAddressSafe(groups)); - } - - // --- [ glGetPerfMonitorCountersAMD ] --- - - public static native void nglGetPerfMonitorCountersAMD(int group, long numCounters, long maxActiveCounters, int counterSize, long counters); - - public static void glGetPerfMonitorCountersAMD(@NativeType("GLuint") int group, @NativeType("GLint *") IntBuffer numCounters, @NativeType("GLint *") IntBuffer maxActiveCounters, @NativeType("GLuint *") IntBuffer counters) { - if (CHECKS) { - check(numCounters, 1); - check(maxActiveCounters, 1); - } - nglGetPerfMonitorCountersAMD(group, memAddress(numCounters), memAddress(maxActiveCounters), counters.remaining(), memAddress(counters)); - } - - // --- [ glGetPerfMonitorGroupStringAMD ] --- - - public static native void nglGetPerfMonitorGroupStringAMD(int group, int bufSize, long length, long groupString); - - public static void glGetPerfMonitorGroupStringAMD(@NativeType("GLuint") int group, @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer groupString) { - if (CHECKS) { - check(length, 1); - } - nglGetPerfMonitorGroupStringAMD(group, groupString.remaining(), memAddress(length), memAddress(groupString)); - } - - // --- [ glGetPerfMonitorCounterStringAMD ] --- - - public static native void nglGetPerfMonitorCounterStringAMD(int group, int counter, int bufSize, long length, long counterString); - - public static void glGetPerfMonitorCounterStringAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @Nullable @NativeType("GLsizei *") IntBuffer length, @Nullable @NativeType("GLchar *") ByteBuffer counterString) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetPerfMonitorCounterStringAMD(group, counter, remainingSafe(counterString), memAddressSafe(length), memAddressSafe(counterString)); - } - - // --- [ glGetPerfMonitorCounterInfoAMD ] --- - - public static native void nglGetPerfMonitorCounterInfoAMD(int group, int counter, int pname, long data); - - public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") ByteBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetPerfMonitorCounterInfoAMD(group, counter, pname, memAddress(data)); - } - - public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") IntBuffer data) { - if (CHECKS) { - check(data, 4 >> 2); - } - nglGetPerfMonitorCounterInfoAMD(group, counter, pname, memAddress(data)); - } - - public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") FloatBuffer data) { - if (CHECKS) { - check(data, 4 >> 2); - } - nglGetPerfMonitorCounterInfoAMD(group, counter, pname, memAddress(data)); - } - - // --- [ glGenPerfMonitorsAMD ] --- - - public static native void nglGenPerfMonitorsAMD(int n, long monitors); - - public static void glGenPerfMonitorsAMD(@NativeType("GLuint *") IntBuffer monitors) { - nglGenPerfMonitorsAMD(monitors.remaining(), memAddress(monitors)); - } - - @NativeType("void") - public static int glGenPerfMonitorsAMD() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer monitors = stack.callocInt(1); - nglGenPerfMonitorsAMD(1, memAddress(monitors)); - return monitors.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeletePerfMonitorsAMD ] --- - - public static native void nglDeletePerfMonitorsAMD(int n, long monitors); - - public static void glDeletePerfMonitorsAMD(@NativeType("GLuint *") IntBuffer monitors) { - nglDeletePerfMonitorsAMD(monitors.remaining(), memAddress(monitors)); - } - - public static void glDeletePerfMonitorsAMD(@NativeType("GLuint *") int monitor) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer monitors = stack.ints(monitor); - nglDeletePerfMonitorsAMD(1, memAddress(monitors)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glSelectPerfMonitorCountersAMD ] --- - - public static native void nglSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int numCounters, long counterList); - - public static void glSelectPerfMonitorCountersAMD(@NativeType("GLuint") int monitor, @NativeType("GLboolean") boolean enable, @NativeType("GLuint") int group, @NativeType("GLuint *") IntBuffer counterList) { - nglSelectPerfMonitorCountersAMD(monitor, enable, group, counterList.remaining(), memAddress(counterList)); - } - - // --- [ glBeginPerfMonitorAMD ] --- - - public static native void glBeginPerfMonitorAMD(@NativeType("GLuint") int monitor); - - // --- [ glEndPerfMonitorAMD ] --- - - public static native void glEndPerfMonitorAMD(@NativeType("GLuint") int monitor); - - // --- [ glGetPerfMonitorCounterDataAMD ] --- - - public static native void nglGetPerfMonitorCounterDataAMD(int monitor, int pname, int dataSize, long data, long bytesWritten); - - public static void glGetPerfMonitorCounterDataAMD(@NativeType("GLuint") int monitor, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer data, @Nullable @NativeType("GLint *") IntBuffer bytesWritten) { - if (CHECKS) { - checkSafe(bytesWritten, 1); - } - nglGetPerfMonitorCounterDataAMD(monitor, pname, data.remaining(), memAddress(data), memAddressSafe(bytesWritten)); - } - - /** Array version of: {@link #glGetPerfMonitorGroupsAMD GetPerfMonitorGroupsAMD} */ - public static void glGetPerfMonitorGroupsAMD(@Nullable @NativeType("GLint *") int[] numGroups, @Nullable @NativeType("GLuint *") int[] groups) { - long __functionAddress = GL.getICD().glGetPerfMonitorGroupsAMD; - if (CHECKS) { - check(__functionAddress); - checkSafe(numGroups, 1); - } - callPPV(numGroups, lengthSafe(groups), groups, __functionAddress); - } - - /** Array version of: {@link #glGetPerfMonitorCountersAMD GetPerfMonitorCountersAMD} */ - public static void glGetPerfMonitorCountersAMD(@NativeType("GLuint") int group, @NativeType("GLint *") int[] numCounters, @NativeType("GLint *") int[] maxActiveCounters, @NativeType("GLuint *") int[] counters) { - long __functionAddress = GL.getICD().glGetPerfMonitorCountersAMD; - if (CHECKS) { - check(__functionAddress); - check(numCounters, 1); - check(maxActiveCounters, 1); - } - callPPPV(group, numCounters, maxActiveCounters, counters.length, counters, __functionAddress); - } - - /** Array version of: {@link #glGetPerfMonitorGroupStringAMD GetPerfMonitorGroupStringAMD} */ - public static void glGetPerfMonitorGroupStringAMD(@NativeType("GLuint") int group, @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer groupString) { - long __functionAddress = GL.getICD().glGetPerfMonitorGroupStringAMD; - if (CHECKS) { - check(__functionAddress); - check(length, 1); - } - callPPV(group, groupString.remaining(), length, memAddress(groupString), __functionAddress); - } - - /** Array version of: {@link #glGetPerfMonitorCounterStringAMD GetPerfMonitorCounterStringAMD} */ - public static void glGetPerfMonitorCounterStringAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @Nullable @NativeType("GLsizei *") int[] length, @Nullable @NativeType("GLchar *") ByteBuffer counterString) { - long __functionAddress = GL.getICD().glGetPerfMonitorCounterStringAMD; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(group, counter, remainingSafe(counterString), length, memAddressSafe(counterString), __functionAddress); - } - - /** Array version of: {@link #glGetPerfMonitorCounterInfoAMD GetPerfMonitorCounterInfoAMD} */ - public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") int[] data) { - long __functionAddress = GL.getICD().glGetPerfMonitorCounterInfoAMD; - if (CHECKS) { - check(__functionAddress); - check(data, 4 >> 2); - } - callPV(group, counter, pname, data, __functionAddress); - } - - /** Array version of: {@link #glGetPerfMonitorCounterInfoAMD GetPerfMonitorCounterInfoAMD} */ - public static void glGetPerfMonitorCounterInfoAMD(@NativeType("GLuint") int group, @NativeType("GLuint") int counter, @NativeType("GLenum") int pname, @NativeType("void *") float[] data) { - long __functionAddress = GL.getICD().glGetPerfMonitorCounterInfoAMD; - if (CHECKS) { - check(__functionAddress); - check(data, 4 >> 2); - } - callPV(group, counter, pname, data, __functionAddress); - } - - /** Array version of: {@link #glGenPerfMonitorsAMD GenPerfMonitorsAMD} */ - public static void glGenPerfMonitorsAMD(@NativeType("GLuint *") int[] monitors) { - long __functionAddress = GL.getICD().glGenPerfMonitorsAMD; - if (CHECKS) { - check(__functionAddress); - } - callPV(monitors.length, monitors, __functionAddress); - } - - /** Array version of: {@link #glDeletePerfMonitorsAMD DeletePerfMonitorsAMD} */ - public static void glDeletePerfMonitorsAMD(@NativeType("GLuint *") int[] monitors) { - long __functionAddress = GL.getICD().glDeletePerfMonitorsAMD; - if (CHECKS) { - check(__functionAddress); - } - callPV(monitors.length, monitors, __functionAddress); - } - - /** Array version of: {@link #glSelectPerfMonitorCountersAMD SelectPerfMonitorCountersAMD} */ - public static void glSelectPerfMonitorCountersAMD(@NativeType("GLuint") int monitor, @NativeType("GLboolean") boolean enable, @NativeType("GLuint") int group, @NativeType("GLuint *") int[] counterList) { - long __functionAddress = GL.getICD().glSelectPerfMonitorCountersAMD; - if (CHECKS) { - check(__functionAddress); - } - callPV(monitor, enable, group, counterList.length, counterList, __functionAddress); - } - - /** Array version of: {@link #glGetPerfMonitorCounterDataAMD GetPerfMonitorCounterDataAMD} */ - public static void glGetPerfMonitorCounterDataAMD(@NativeType("GLuint") int monitor, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] data, @Nullable @NativeType("GLint *") int[] bytesWritten) { - long __functionAddress = GL.getICD().glGetPerfMonitorCounterDataAMD; - if (CHECKS) { - check(__functionAddress); - checkSafe(bytesWritten, 1); - } - callPPV(monitor, pname, data.length, data, bytesWritten, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDPinnedMemory.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDPinnedMemory.java deleted file mode 100644 index 709be682..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDPinnedMemory.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_pinned_memory extension. - * - *

    This extension defines an interface that allows improved control of the physical memory used by the graphics device.

    - * - *

    It allows an existing page of system memory allocated by the application to be used as memory directly accessible to the graphics processor. One - * example application of this functionality would be to be able to avoid an explicit synchronous copy with sub-system of the application; for instance it - * is possible to directly draw from a system memory copy of a video image.

    - */ -public final class AMDPinnedMemory { - - public static final int GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = 0x9160; - - private AMDPinnedMemory() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDQueryBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDQueryBufferObject.java deleted file mode 100644 index 876c94f7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDQueryBufferObject.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_query_buffer_object extension. - * - *

    Statistics about the operation of the OpenGL pipeline, such as the number of samples that passed the depth test, the elapsed time between two events or - * the number of vertices written to a transform feedback buffer may be retrieved from the GL through query objects. The current value of a query object - * may be retrieved by the application through the OpenGL API. Should the result returned by the API be required for use in a shader, it must be passed - * back to the GL via a program uniform or some other mechanism. This requires a round-trip from the GPU to the CPU and back.

    - * - *

    This extension introduces a mechanism whereby the current value of a query result may be retrieved into a buffer object instead of client memory. This - * allows the query result to be made available to a shader without a round-trip to the CPU for example by subsequently using the buffer object as a - * uniform buffer, texture buffer or other data store visible to the shader. This functionality may also be used to place the results of many query - * objects into a single, large buffer and then map or otherwise read back the entire buffer at a later point in time, avoiding a per-query CPU-GPU - * synchronization event.

    - * - *

    The result of any query object type supported by the GL implementation may be retrieved into a buffer object. The implementation will determine the - * most efficient method of copying the query result to the buffer.

    - * - *

    Requires {@link GL15 OpenGL 1.5}.

    - */ -public final class AMDQueryBufferObject { - - /** Accepted by the {@code pname} parameter of GetQueryObjectiv, GetQueryObjectuiv, GetQueryObjecti64v and GetQueryObjectui64v. */ - public static final int GL_QUERY_RESULT_NO_WAIT_AMD = 0x9194; - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, - * GetBufferParameteriv and GetBufferPointerv. - */ - public static final int GL_QUERY_BUFFER_AMD = 0x9192; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_QUERY_BUFFER_BINDING_AMD = 0x9193; - - private AMDQueryBufferObject() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDSamplePositions.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDSamplePositions.java deleted file mode 100644 index cc4ea204..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDSamplePositions.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the AMD_sample_positions extension. - * - *

    This extension provides a mechanism to explicitly set sample positions for a FBO with multi-sampled attachments. The FBO will use identical sample - * locations for all pixels in each attachment. This forces TEXTURE_FIXED_SAMPLE_LOCATIONS to TRUE if a multi-sampled texture is specified using - * TexImage2DMultisample or TexImage3DMultisample. That is, using GetTexLevelParameter to query TEXTURE_FIXED_SAMPLE_LOCATIONS will always return TRUE if - * the mechanism is explicitly used to set the sample positions.

    - * - *

    Requires {@link GL32 OpenGL 3.2} or {@link EXTFramebufferMultisample EXT_framebuffer_multisample}.

    - */ -public class AMDSamplePositions { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetFloatv. */ - public static final int GL_SUBSAMPLE_DISTANCE_AMD = 0x883F; - - protected AMDSamplePositions() { - throw new UnsupportedOperationException(); - } - - // --- [ glSetMultisamplefvAMD ] --- - - public static native void nglSetMultisamplefvAMD(int pname, int index, long val); - - public static void glSetMultisamplefvAMD(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer val) { - if (CHECKS) { - check(val, 2); - } - nglSetMultisamplefvAMD(pname, index, memAddress(val)); - } - - /** Array version of: {@link #glSetMultisamplefvAMD SetMultisamplefvAMD} */ - public static void glSetMultisamplefvAMD(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] val) { - long __functionAddress = GL.getICD().glSetMultisamplefvAMD; - if (CHECKS) { - check(__functionAddress); - check(val, 2); - } - callPV(pname, index, val, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java deleted file mode 100644 index 5191f735..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_seamless_cubemap_per_texture extension. - * - *

    In unextended OpenGL, cube maps are treated as sets of six, independent texture images. Once a face is selected from the set, it is treated exactly as - * any other two-dimensional texture would be. When sampling linearly from the texture, all of the individual texels that would be used to to create the - * final, bilinear sample values are taken from the same cube face. The normal, two-dimensional texture coordinate wrapping modes are honored. This - * sometimes causes seams to appear in cube maps.

    - * - *

    ARB_seamless_cube_map addresses this issue by providing a mechanism whereby an implementation could take each of the taps of a bilinear sample from a - * different face, spanning face boundaries and providing seamless filtering from cube map textures. However, in ARB_seamless_cube_map, this feature was - * exposed as a global state, affecting all bound cube map textures. It was not possible to mix seamless and per-face cube map sampling modes during - * multisampling. Furthermore, if an application included cube maps that were meant to be sampled seamlessly and non-seamlessly, it would have to track - * this state and enable or disable seamless cube map sampling as needed.

    - * - *

    This extension addresses this issue and provides an orthogonal method for allowing an implementation to provide a per-texture setting for enabling - * seamless sampling from cube maps.

    - * - *

    Requires {@link ARBTextureCubeMap ARB_texture_cube_map}.

    - */ -public final class AMDSeamlessCubemapPerTexture { - - /** Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; - - private AMDSeamlessCubemapPerTexture() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDSparseTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDSparseTexture.java deleted file mode 100644 index 0a553ca7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDSparseTexture.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_sparse_texture extension. - * - *

    Recent advances in application complexity and a desire for higher resolutions have pushed texture sizes up considerably. Often, the amount of physical - * memory available to a graphics processor is a limiting factor in the performance of texture-heavy applications. Once the available physical memory is - * exhausted, paging may occur bringing performance down considerably - or worse, the application may fail. Nevertheless, the amount of address space - * available to the graphics processor has increased to the point where many gigabytes - or even terabytes of address space may be usable even though that - * amount of physical memory is not present.

    - * - *

    This extension allows the separation of the graphics processor's address space (reservation) from the requirement that all textures must be physically - * backed (commitment). This exposes a limited form of virtualization for textures. Use cases include sparse (or partially resident) textures, texture - * paging, on-demand and delayed loading of texture assets and application controlled level of detail.

    - * - *

    Requires {@link GL20 OpenGL 2.0} or {@link ARBFragmentShader ARB_fragment_shader}.

    - */ -public class AMDSparseTexture { - - static { GL.initialize(); } - - /** Accepted by the {@code flags} parameter to TexStorageSparseAMD and TextureStorageSparseAMD. */ - public static final int GL_TEXTURE_STORAGE_SPARSE_BIT_AMD = 0x1; - - /** Accepted by the {@code pname} parameter to GetInternalformativ. */ - public static final int - GL_VIRTUAL_PAGE_SIZE_X_AMD = 0x9195, - GL_VIRTUAL_PAGE_SIZE_Y_AMD = 0x9196, - GL_VIRTUAL_PAGE_SIZE_Z_AMD = 0x9197; - - /** Accepted by the {@code pname} parameter to GetIntegerv, GetFloatv, GetDoublev, GetInteger64v, and GetBooleanv. */ - public static final int - GL_MAX_SPARSE_TEXTURE_SIZE_AMD = 0x9198, - GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD = 0x9199, - GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS = 0x919A; - - /** Accepted by the {@code pname} parameter of GetTexParameter{if}v. */ - public static final int GL_MIN_SPARSE_LEVEL_AMD = 0x919B; - - /** Accepted by the {@code pname} parameter of TexParameter{if}{v} and GetTexParameter{if}v. */ - public static final int GL_MIN_LOD_WARNING_AMD = 0x919C; - - protected AMDSparseTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexStorageSparseAMD ] --- - - public static native void glTexStorageSparseAMD(@NativeType("GLenum") int target, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLsizei") int layers, @NativeType("GLbitfield") int flags); - - // --- [ glTextureStorageSparseAMD ] --- - - public static native void glTextureStorageSparseAMD(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLsizei") int layers, @NativeType("GLbitfield") int flags); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDStencilOperationExtended.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDStencilOperationExtended.java deleted file mode 100644 index 97262c0c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDStencilOperationExtended.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_stencil_operation_extended extension. - * - *

    Stencil buffers are special buffers that allow tests to be made against an incoming value and action taken based on that value. The stencil buffer is - * updated during rasterization, and the operation used to update the stencil buffer is chosen based on whether the fragment passes the stencil test, and - * if it does, whether it passes the depth test. Traditional OpenGL includes support for several primitive operations, such as incrementing, or clearing - * the content of the stencil buffer, or replacing it with a specified reference value.

    - * - *

    This extension adds support for an additional set of operations that may be performed on the stencil buffer under each circumstance. Additionally, this - * extension separates the value used as the source for stencil operations from the reference value, allowing different values to be used in the stencil - * test, and in the update of the stencil buffer.

    - */ -public class AMDStencilOperationExtended { - - static { GL.initialize(); } - - /** Accepted by the {@code sfail}, {@code dpfail} and {@code dppass} parameters of StencilOp and StencilOpSeparate. */ - public static final int - GL_SET_AMD = 0x874A, - GL_REPLACE_VALUE_AMD = 0x874B; - - /** Accepted by the {@code param} parameter of GetIntegerv, GetFloatv, GetBooleanv GetDoublev and GetInteger64v. */ - public static final int - GL_STENCIL_OP_VALUE_AMD = 0x874C, - GL_STENCIL_BACK_OP_VALUE_AMD = 0x874D; - - protected AMDStencilOperationExtended() { - throw new UnsupportedOperationException(); - } - - // --- [ glStencilOpValueAMD ] --- - - public static native void glStencilOpValueAMD(@NativeType("GLenum") int face, @NativeType("GLuint") int value); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDTransformFeedback4.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDTransformFeedback4.java deleted file mode 100644 index 4ed1a99b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDTransformFeedback4.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the AMD_transform_feedback4 extension. - * - *

    This extension enhances transform feedback in two significant ways. First, it allows multiple transform feedback streams to be captured, each with its - * own, independent primitve type. Second, it allows any combination of streams to be rasterized.

    - * - *

    Requires {@link GL40 OpenGL 4.0} or {@link ARBTransformFeedback3 ARB_transform_feedback3}.

    - */ -public final class AMDTransformFeedback4 { - - /** Accepted by the {@code pname} argument to Enablei. Disablei and IsEnabledi. */ - public static final int GL_STREAM_RASTERIZATION_AMD = 0x91A0; - - private AMDTransformFeedback4() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AMDVertexShaderTessellator.java b/LWJGL/src/main/java/org/lwjgl/opengl/AMDVertexShaderTessellator.java deleted file mode 100644 index 68373c2a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AMDVertexShaderTessellator.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the AMD_vertex_shader_tessellator extension. - * - *

    The vertex shader tessellator gives new flexibility to the shader author to shade at a tessellated vertex, rather than just at a provided vertex.

    - * - *

    In unextended vertex shading, the built-in attributes such as gl_Vertex, gl_Normal, and gl_MultiTexcoord0, together with the user defined attributes, - * are system provided values which are initialized prior to vertex shader invocation.

    - * - *

    With vertex shading tessellation, additional vertex shader special values are available:

    - * - *
    
    - *         ivec3 gl_VertexTriangleIndex; // indices of the three control
    - *                                       // points for the vertex
    - *         vec3 gl_BarycentricCoord;     // barycentric coordinates
    - *                                       // of the vertex
    - * 
    - *     i o
    - *       |\
    - *       | \
    - *       *--*
    - *       |\ |\
    - *       | \| \
    - *       *--*--*
    - *       |\ |\ |\
    - *       | \| \| \
    - *     j o--*--*--o k
    - * 
    - *     Figure 1  A Tessellated Triangle
    - *     o = control point (and tessellated vertex)
    - *     * = tessellated vertex
    - * 
    - *         ivec4 gl_VertexQuadIndex;   // indices for the four control
    - *                                     // points for the vertex
    - *         vec2 gl_UVCoord;            // UV coordinates of the vertex
    - * 
    - *     i o--*--*--o k
    - *       |\ |\ |\ |
    - *       | \| \| \|
    - *       *--*--*--*
    - *       |\ |\ |\ |
    - *       | \| \| \|
    - *       *--*--*--*
    - *       |\ |\ |\ |
    - *       | \| \| \|
    - *     j o--*--*--o l
    - * 
    - *     Figure 2  A Tessellated Quad
    - *     o = control point (and tessellated vertex)
    - *     * = tessellated vertex
    - * - *

    When this extension is enabled, conventional built-in attributes and user defined attributes are uninitialized. The shader writer is responsible for - * explicitly fetching all other vertex data either from textures, uniform buffers, or vertex buffers.

    - * - *

    The shader writer is further responsible for interpolating the vertex data at the given barycentric coordinates or uv coordinates of the vertex.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public class AMDVertexShaderTessellator { - - static { GL.initialize(); } - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_BUFFER_AMD = 0x9001, - GL_INT_SAMPLER_BUFFER_AMD = 0x9002, - GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003; - - /** Accepted by TessellationModeAMD. */ - public static final int - GL_DISCRETE_AMD = 0x9006, - GL_CONTINUOUS_AMD = 0x9007; - - /** Accepted by GetIntegerv. */ - public static final int GL_TESSELLATION_MODE_AMD = 0x9004; - - /** Accepted by GetFloatv. */ - public static final int GL_TESSELLATION_FACTOR_AMD = 0x9005; - - protected AMDVertexShaderTessellator() { - throw new UnsupportedOperationException(); - } - - // --- [ glTessellationFactorAMD ] --- - - public static native void glTessellationFactorAMD(@NativeType("GLfloat") float factor); - - // --- [ glTessellationModeAMD ] --- - - public static native void glTessellationModeAMD(@NativeType("GLenum") int mode); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBaseInstance.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBBaseInstance.java deleted file mode 100644 index 2a81a851..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBaseInstance.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_base_instance extension. - * - *

    This extension allows the offset within buffer objects used for instanced rendering to be specified. This is congruent with the {@code first} parameter - * in {@link GL11C#glDrawArrays DrawArrays} and the {@code basevertex} parameter in {@link GL11C#glDrawElements DrawElements}. When instanced rendering is performed (for example, through - * {@link GL31C#glDrawArraysInstanced DrawArraysInstanced}), instanced vertex attributes whose vertex attribute divisors are non-zero are fetched from enabled vertex arrays - * per-instance rather than per-vertex. However, in unextended OpenGL, there is no way to define the offset into those arrays from which the attributes are - * fetched. This extension adds that offset in the form of a {@code } parameter to several new procedures.

    - * - *

    The {@code baseinstance} parameter is added to the index of the array element, after division by the vertex attribute divisor. This allows several sets - * of instanced vertex attribute data to be stored in a single vertex array, and the base offset of that data to be specified for each draw. Further, this - * extension exposes the {@code } parameter as the final and previously undefined structure member of the draw-indirect data structure.

    - * - *

    Requires {@link GL31 OpenGL 3.1} or {@link ARBDrawInstanced ARB_draw_instanced}. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public class ARBBaseInstance { - - static { GL.initialize(); } - - protected ARBBaseInstance() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawArraysInstancedBaseInstance ] --- - - /** - * Draws multiple instances of a range of elements with an offset applied to instanced attributes. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param first the starting index in the enabled arrays - * @param count the number of indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawArraysInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); - } - - // --- [ glDrawElementsInstancedBaseInstance ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseInstance DrawElementsInstancedBaseInstance} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsInstancedBaseInstance(int mode, int count, int type, long indices, int primcount, int baseinstance) { - GL42C.nglDrawElementsInstancedBaseInstance(mode, count, type, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, count, type, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, type, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - // --- [ glDrawElementsInstancedBaseVertexBaseInstance ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsInstancedBaseVertexBaseInstance(int mode, int count, int type, long indices, int primcount, int basevertex, int baseinstance) { - GL42C.nglDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, type, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBindlessTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBBindlessTexture.java deleted file mode 100644 index 3b6247d0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBindlessTexture.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_bindless_texture extension. - * - *

    This extension allows OpenGL applications to access texture objects in shaders without first binding each texture to one of a limited number of texture - * image units. Using this extension, an application can query a 64-bit unsigned integer texture handle for each texture that it wants to access and then - * use that handle directly in GLSL or assembly-based shaders. The ability to access textures without having to bind and/or re-bind them is similar to the - * capability provided by the {@link NVShaderBufferLoad NV_shader_buffer_load} extension that allows shaders to access buffer objects without binding them. In both cases, - * these extensions significantly reduce the amount of API and internal GL driver overhead needed to manage resource bindings.

    - * - *

    This extension also provides similar capability for the image load, store, and atomic functionality provided by OpenGL 4.2 and the - * {@link ARBShaderImageLoadStore ARB_shader_image_load_store} and {@link EXTShaderImageLoadStore EXT_shader_image_load_store} extensions, where a texture can be accessed without first binding it to an - * image unit. An image handle can be extracted from a texture object using an API with a set of parameters similar to those for - * {@link EXTShaderImageLoadStore#glBindImageTextureEXT BindImageTextureEXT}.

    - * - *

    This extension adds no new data types to GLSL. Instead, it uses existing sampler and image data types and allows them to be populated with texture and - * image handles. This extension does permit sampler and image data types to be used in more contexts than in unextended GLSL 4.00. In particular, sampler - * and image types may be used as shader inputs/outputs, temporary variables, and uniform block members, and may be assigned to by shader code. - * Constructors are provided to convert unsigned integer values to and from sampler and image data types. Additionally, new APIs are provided to load - * values for sampler and image uniforms with 64-bit handle inputs. The use of existing integer-based Uniform* APIs is still permitted, in which case the - * integer specified will identify a texture image or image unit. For samplers and images with values specified as texture image or image units, the GL - * implemenation will translate the unit number to an internal handle as required.

    - * - *

    To access texture or image resources using handles, the handles must first be made resident. Accessing a texture or image by handle without first - * making it resident can result in undefined results, including program termination. Since the amount of texture memory required by an application may - * exceed the amount of memory available to the system, this extension provides API calls allowing applications to manage overall texture memory - * consumption by making a texture resident and non-resident as required.

    - * - *

    Requires {@link GL40 OpenGL 4.0}.

    - */ -public class ARBBindlessTexture { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of VertexAttribLPointer. */ - public static final int GL_UNSIGNED_INT64_ARB = 0x140F; - - protected ARBBindlessTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetTextureHandleARB ] --- - - /** - * Creates a texture handle using the current state of the texture named {@code texture}, including any embedded sampler state. See - * {@link #glGetTextureSamplerHandleARB GetTextureSamplerHandleARB} for details. - * - * @param texture the texture object - */ - @NativeType("GLuint64") - public static native long glGetTextureHandleARB(@NativeType("GLuint") int texture); - - // --- [ glGetTextureSamplerHandleARB ] --- - - /** - * Creates a texture handle using the current non-sampler state from the texture named {@code texture} and the sampler state from the sampler object - * {@code sampler}. In both cases, a 64-bit unsigned integer handle is returned. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code texture} is zero or is - * not the name of an existing texture object or if {@code sampler} is zero or is not the name of an existing sampler object. The error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if the texture object {@code texture} is not complete. If an error occurs, a handle of zero is returned. - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if the border color (taken from the embedded sampler for GetTextureHandleARB or from the {@code sampler} - * for GetTextureSamplerHandleARB) is not one of the following allowed values. If the texture's base internal format is signed or unsigned integer, allowed - * values are (0,0,0,0), (0,0,0,1), (1,1,1,0), and (1,1,1,1). If the base internal format is not integer, allowed values are (0.0,0.0,0.0,0.0), - * (0.0,0.0,0.0,1.0), (1.0,1.0,1.0,0.0), and (1.0,1.0,1.0,1.0).

    - * - *

    The handle for each texture or texture/sampler pair is unique; the same handle will be returned if GetTextureHandleARB is called multiple times for the - * same texture or if GetTextureSamplerHandleARB is called multiple times for the same texture/sampler pair.

    - * - *

    When a texture object is referenced by one or more texture handles, the texture parameters of the object may not be changed, and the size and format of - * the images in the texture object may not be re-specified. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if the functions TexImage*, CopyTexImage*, - * CompressedTexImage*, TexBuffer*, or TexParameter* are called to modify a texture object referenced by one or more texture handles. The contents of the - * images in a texture object may still be updated via commands such as TexSubImage*, CopyTexSubImage*, and CompressedTexSubImage*, and by rendering to a - * framebuffer object, even if the texture object is referenced by one or more texture handles.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link GL15C#glBufferData BufferData} if it is called to modify a buffer object bound to a buffer texture while that - * texture object is referenced by one or more texture handles. The contents of the buffer object may still be updated via buffer update commands such as - * {@link GL15C#glBufferSubData BufferSubData} and MapBuffer*, or via the texture update commands, even if the buffer is bound to a texture while that buffer texture object is - * referenced by one or more texture handles.

    - * - *

    When a sampler object is referenced by one or more texture handles, the sampler parameters of the object may not be changed. The error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated when calling SamplerParameter* functions to modify a sampler object referenced by one or more texture handles.

    - * - * @param texture the texture object - * @param sampler the sampler object - */ - @NativeType("GLuint64") - public static native long glGetTextureSamplerHandleARB(@NativeType("GLuint") int texture, @NativeType("GLuint") int sampler); - - // --- [ glMakeTextureHandleResidentARB ] --- - - /** - * Make a texture handle resident, so that it is accessible to shaders for texture mapping operations. - * - *

    While the texture handle is resident, it may be used in texture mapping operations. If a shader attempts to perform a texture mapping operation using a - * handle that is not resident, the results of that operation are undefined and may lead to application termination. When a texture handle is resident, the - * texture it references is also considered resident for the purposes of the {@link GL11#glAreTexturesResident AreTexturesResident} command. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is - * generated if {@code handle} is not a valid texture handle, or if {@code handle} is already resident in the current GL context.

    - * - * @param handle the texture handle - */ - public static native void glMakeTextureHandleResidentARB(@NativeType("GLuint64") long handle); - - // --- [ glMakeTextureHandleNonResidentARB ] --- - - /** - * Makes a texture handle inaccessible to shaders. - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if {@code handle} is not a valid texture handle, or if {@code handle} is not resident in the current GL - * context.

    - * - * @param handle the texture handle - */ - public static native void glMakeTextureHandleNonResidentARB(@NativeType("GLuint64") long handle); - - // --- [ glGetImageHandleARB ] --- - - /** - * Creates and returns an image handle for level {@code level} of the texture named {@code texture}. If {@code layered} is {@link GL11#GL_TRUE TRUE}, a handle is created - * for the entire texture level. If {@code layered} is {@link GL11#GL_FALSE FALSE}, a handle is created for only the layer {@code layer} of the texture level. - * {@code format} specifies a format used to interpret the texels of the image when used for image loads, stores, and atomics, and has the same meaning as - * the {@code format} parameter of {@link EXTShaderImageLoadStore#glBindImageTextureEXT BindImageTextureEXT}. A 64-bit unsigned integer handle is returned if the command succeeds; otherwise, zero is - * returned. - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated by GetImageHandleARB if:

    - * - *
      - *
    • {@code texture} is zero or not the name of an existing texture object;
    • - *
    • the image for the texture level {@code level} doesn't exist (i.e., has a size of zero in {@code texture}); or
    • - *
    • {@code layered} is FALSE and {@code layer} is greater than or equal to the number of layers in the image at level {@code level}.
    • - *
    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by GetImageHandleARB if:

    - * - *
      - *
    • the texture object {@code texture} is not complete (section 3.9.14);
    • - *
    • {@code layered} is TRUE and the texture is not a three-dimensional, one-dimensional array, two dimensional array, cube map, or cube map array - * texture.
    • - *
    - * - *

    When a texture object is referenced by one or more image handles, the texture parameters of the object may not be changed, and the size and format of - * the images in the texture object may not be re-specified. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated when calling TexImage*, CopyTexImage*, - * CompressedTexImage*, TexBuffer*, or TexParameter* functions while a texture object is referenced by one or more image handles. The contents of the - * images in a texture object may still be updated via commands such as TexSubImage*, CopyTexSubImage*, and CompressedTexSubImage*, and by rendering to a - * framebuffer object, even if the texture object is referenced by one or more image handles.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link GL15C#glBufferData BufferData} if it is called to modify a buffer object bound to a buffer texture while that texture - * object is referenced by one or more image handles. The contents of the buffer object may still be updated via buffer update commands such as - * {@link GL15C#glBufferSubData BufferSubData} and MapBuffer*, or via the texture update commands, even if the buffer is bound to a texture while that buffer texture object is - * referenced by one or more image handles.

    - * - *

    The handle returned for each combination of {@code texture}, {@code level}, {@code layered}, {@code layer}, and {@code format} is unique; the same - * handle will be returned if GetImageHandleARB is called multiple times with the same parameters.

    - * - * @param texture the texture object - * @param level the texture level - * @param layered the layered flag - * @param layer the texture layer - * @param format the texture format - */ - @NativeType("GLuint64") - public static native long glGetImageHandleARB(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLboolean") boolean layered, @NativeType("GLint") int layer, @NativeType("GLenum") int format); - - // --- [ glMakeImageHandleResidentARB ] --- - - /** - * Makes an image handle resident, so that it is accessible to shaders for image loads, stores, and atomic operations. - * - *

    {@code access} specifies whether the texture bound to the image handle will be treated as {@link GL15#GL_READ_ONLY READ_ONLY}, {@link GL15#GL_WRITE_ONLY WRITE_ONLY}, or {@link GL15#GL_READ_WRITE READ_WRITE}. If a - * shader reads from an image handle made resident as {@link GL15#GL_WRITE_ONLY WRITE_ONLY}, or writes to an image handle made resident as {@link GL15#GL_READ_ONLY READ_ONLY}, the results of that - * shader operation are undefined and may lead to application termination. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if {@code handle} is not a valid - * image handle, or if {@code handle} is already resident in the current GL context.

    - * - *

    While the image handle is resident, it may be used in image load, store, and atomic operations. If a shader attempts to perform an image operation using - * a handle that is not resident, the results of that operation are undefined and may lead to application termination. When an image handle is resident, - * the texture it references is not necessarily considered resident for the purposes of the {@link GL11#glAreTexturesResident AreTexturesResident} command.

    - * - * @param handle the image handle - * @param access the access type. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - */ - public static native void glMakeImageHandleResidentARB(@NativeType("GLuint64") long handle, @NativeType("GLenum") int access); - - // --- [ glMakeImageHandleNonResidentARB ] --- - - /** - * Makes an image handle inaccessible to shaders. - * - * @param handle the image handle - */ - public static native void glMakeImageHandleNonResidentARB(@NativeType("GLuint64") long handle); - - // --- [ glUniformHandleui64ARB ] --- - - /** - * Loads a 64-bit unsigned integer handle into a uniform location corresponding to sampler or image variable types. - * - * @param location the uniform location - * @param value the handle value - */ - public static native void glUniformHandleui64ARB(@NativeType("GLint") int location, @NativeType("GLuint64") long value); - - // --- [ glUniformHandleui64vARB ] --- - - /** - * Unsafe version of: {@link #glUniformHandleui64vARB UniformHandleui64vARB} - * - * @param count the number of handles to load - */ - public static native void nglUniformHandleui64vARB(int location, int count, long values); - - /** - * Loads {@code count} 64-bit unsigned integer handles into a uniform location corresponding to sampler or image variable types. - * - * @param location the uniform location - * @param values a buffer from which to load the handles - */ - public static void glUniformHandleui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer values) { - nglUniformHandleui64vARB(location, values.remaining(), memAddress(values)); - } - - // --- [ glProgramUniformHandleui64ARB ] --- - - /** - * DSA version of {@link #glUniformHandleui64ARB UniformHandleui64ARB}. - * - * @param program the program object - * @param location the uniform location - * @param value the handle value - */ - public static native void glProgramUniformHandleui64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64") long value); - - // --- [ glProgramUniformHandleui64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniformHandleui64vARB ProgramUniformHandleui64vARB} - * - * @param count the number of handles to load - */ - public static native void nglProgramUniformHandleui64vARB(int program, int location, int count, long values); - - /** - * DSA version of {@link #glUniformHandleui64vARB UniformHandleui64vARB}. - * - * @param program the program object - * @param location the uniform location - * @param values a buffer from which to load the handles - */ - public static void glProgramUniformHandleui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer values) { - nglProgramUniformHandleui64vARB(program, location, values.remaining(), memAddress(values)); - } - - // --- [ glIsTextureHandleResidentARB ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if the specified texture handle is resident in the current context. - * - * @param handle the texture handle - */ - @NativeType("GLboolean") - public static native boolean glIsTextureHandleResidentARB(@NativeType("GLuint64") long handle); - - // --- [ glIsImageHandleResidentARB ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if the specified image handle is resident in the current context. - * - * @param handle the image handle - */ - @NativeType("GLboolean") - public static native boolean glIsImageHandleResidentARB(@NativeType("GLuint64") long handle); - - // --- [ glVertexAttribL1ui64ARB ] --- - - /** - * Specifies the 64-bit unsigned integer handle value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the handle value - */ - public static native void glVertexAttribL1ui64ARB(@NativeType("GLuint") int index, @NativeType("GLuint64") long x); - - // --- [ glVertexAttribL1ui64vARB ] --- - - /** Unsafe version of: {@link #glVertexAttribL1ui64vARB VertexAttribL1ui64vARB} */ - public static native void nglVertexAttribL1ui64vARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribL1ui64ARB VertexAttribL1ui64ARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttribL1ui64vARB(@NativeType("GLuint") int index, @NativeType("GLuint64 const *") LongBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribL1ui64vARB(index, memAddress(v)); - } - - // --- [ glGetVertexAttribLui64vARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribLui64vARB GetVertexAttribLui64vARB} */ - public static native void nglGetVertexAttribLui64vARB(int index, int pname, long params); - - /** - * Returns the 64-bit unsigned integer handle value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute index - * @param pname the parameter to query - * @param params a buffer in which to place the returned data - */ - public static void glGetVertexAttribLui64vARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetVertexAttribLui64vARB(index, pname, memAddress(params)); - } - - /** - * Returns the 64-bit unsigned integer handle value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute index - * @param pname the parameter to query - */ - @NativeType("void") - public static long glGetVertexAttribLui64ARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetVertexAttribLui64vARB(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glUniformHandleui64vARB UniformHandleui64vARB} */ - public static void glUniformHandleui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] values) { - long __functionAddress = GL.getICD().glUniformHandleui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, values.length, values, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformHandleui64vARB ProgramUniformHandleui64vARB} */ - public static void glProgramUniformHandleui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] values) { - long __functionAddress = GL.getICD().glProgramUniformHandleui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, values.length, values, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL1ui64vARB VertexAttribL1ui64vARB} */ - public static void glVertexAttribL1ui64vARB(@NativeType("GLuint") int index, @NativeType("GLuint64 const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL1ui64vARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribLui64vARB GetVertexAttribLui64vARB} */ - public static void glGetVertexAttribLui64vARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribLui64vARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(index, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBlendFuncExtended.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBBlendFuncExtended.java deleted file mode 100644 index 9833f788..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBlendFuncExtended.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_blend_func_extended extension. - * - *

    Traditional OpenGL includes fixed-function blending that combines source colors with the existing content of a render buffer in a variety of ways. A - * number of extensions have enhanced this functionality by adding further sources of blending weights and methods to combine them. However, the inputs to - * the fixed-function blending units are constrained to a source color (as output from fragment shading), destination color (as the current content of the - * frame buffer) or constants that may be used in their place.

    - * - *

    This extension adds new blending functions whereby a fragment shader may output two colors, one of which is treated as the source color, and the other - * used as a blending factor for either source or destination colors. Furthermore, this extension increases orthogonality by allowing the - * {@link GL11#GL_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE} function to be used as the destination weight.

    - * - *

    Requires {@link ARBFragmentShader ARB_fragment_shader} and {@link EXTGPUShader4 EXT_gpu_shader4}. Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public class ARBBlendFuncExtended { - - static { GL.initialize(); } - - /** - * Accepted by the {@code src} and {@code dst} parameters of BlendFunc and BlendFunci, and by the {@code srcRGB}, {@code dstRGB}, {@code srcAlpha} and - * {@code dstAlpha} parameters of BlendFuncSeparate and BlendFuncSeparatei. - */ - public static final int - GL_SRC1_COLOR = 0x88F9, - GL_ONE_MINUS_SRC1_COLOR = 0x88FA, - GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and GetDoublev. */ - public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; - - protected ARBBlendFuncExtended() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindFragDataLocationIndexed ] --- - - /** Unsafe version of: {@link #glBindFragDataLocationIndexed BindFragDataLocationIndexed} */ - public static void nglBindFragDataLocationIndexed(int program, int colorNumber, int index, long name) { - GL33C.nglBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number and index. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param index the index of the color input to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - */ - public static void glBindFragDataLocationIndexed(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLuint") int index, @NativeType("GLchar const *") ByteBuffer name) { - GL33C.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number and index. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param index the index of the color input to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - */ - public static void glBindFragDataLocationIndexed(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLuint") int index, @NativeType("GLchar const *") CharSequence name) { - GL33C.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - // --- [ glGetFragDataIndex ] --- - - /** Unsafe version of: {@link #glGetFragDataIndex GetFragDataIndex} */ - public static int nglGetFragDataIndex(int program, long name) { - return GL33C.nglGetFragDataIndex(program, name); - } - - /** - * Queries the bindings of color indices to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose index to query - */ - @NativeType("GLint") - public static int glGetFragDataIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - return GL33C.glGetFragDataIndex(program, name); - } - - /** - * Queries the bindings of color indices to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose index to query - */ - @NativeType("GLint") - public static int glGetFragDataIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - return GL33C.glGetFragDataIndex(program, name); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBBufferObject.java deleted file mode 100644 index c8312037..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBufferObject.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.lwjgl.opengl; - -public class ARBBufferObject extends ARBVertexBufferObject -{ -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBufferStorage.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBBufferStorage.java deleted file mode 100644 index 70fc6130..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBBufferStorage.java +++ /dev/null @@ -1,742 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_buffer_storage extension. - * - *

    OpenGL has long supported buffer objects as a means of storing data that may be used to source vertex attributes, pixel data for textures, uniforms and - * other elements. In un-extended GL, buffer data stores are mutable - that is, they may be de-allocated or resized while they are in use. The - * {@link ARBTextureStorage ARB_texture_storage} extension added immutable storage for texture object (and was subsequently incorporated into OpenGL 4.2). This extension - * further applies the concept of immutable storage to buffer objects. If an implementation is aware of a buffer's immutability, it may be able to make - * certain assumptions or apply particular optimizations in order to increase performance or reliability.

    - * - *

    Furthermore, this extension allows applications to pass additional information about a requested allocation to the implementation which it may use to - * select memory heaps, caching behavior or allocation strategies.

    - * - *

    Finally, this extension introduces the concept of persistent client mappings of buffer objects, which allow clients to retain pointers to a buffer's - * data store returned as the result of a mapping, and to issue drawing commands while those mappings are in place.

    - * - *

    Promoted to core in {@link GL44 OpenGL 4.4}.

    - */ -public class ARBBufferStorage { - - static { GL.initialize(); } - - /** Accepted in the {@code flags} parameter of {@link #glBufferStorage BufferStorage} and {@link #glNamedBufferStorageEXT NamedBufferStorageEXT}. */ - public static final int - GL_MAP_PERSISTENT_BIT = 0x40, - GL_MAP_COHERENT_BIT = 0x80, - GL_DYNAMIC_STORAGE_BIT = 0x100, - GL_CLIENT_STORAGE_BIT = 0x200; - - /** Accepted by the {@code pname} parameter of {@code GetBufferParameter{i|i64}v}. */ - public static final int - GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, - GL_BUFFER_STORAGE_FLAGS = 0x8220; - - /** Accepted by the {@code barriers} parameter of {@link GL42C#glMemoryBarrier MemoryBarrier}. */ - public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x4000; - - protected ARBBufferStorage() { - throw new UnsupportedOperationException(); - } - - // --- [ glBufferStorage ] --- - - /** - * Unsafe version of: {@link #glBufferStorage BufferStorage} - * - * @param size the size of the data store in basic machine units - */ - public static void nglBufferStorage(int target, long size, long data, int flags) { - GL44C.nglBufferStorage(target, size, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param size the size of the data store in basic machine units - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("GLsizeiptr") long size, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, size, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") ByteBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") ShortBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") IntBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") FloatBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") DoubleBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - // --- [ glNamedBufferStorageEXT ] --- - - /** - * Unsafe version of: {@link #glNamedBufferStorageEXT NamedBufferStorageEXT} - * - * @param size the size of the data store in basic machine units - */ - public static native void nglNamedBufferStorageEXT(int buffer, long size, long data, int flags); - - /** - * Behaves similarly to {@link #glBufferStorage BufferStorage}, except that the buffer whose storage is to be defined is specified by {@code buffer} rather than by the current - * binding to {@code target}. - * - * @param buffer the buffer object - * @param size the size of the data store in basic machine units - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorageEXT(buffer, size, NULL, flags); - } - - /** - * Behaves similarly to {@link #glBufferStorage BufferStorage}, except that the buffer whose storage is to be defined is specified by {@code buffer} rather than by the current - * binding to {@code target}. - * - * @param buffer the buffer object - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorageEXT(buffer, data.remaining(), memAddress(data), flags); - } - - /** - * Behaves similarly to {@link #glBufferStorage BufferStorage}, except that the buffer whose storage is to be defined is specified by {@code buffer} rather than by the current - * binding to {@code target}. - * - * @param buffer the buffer object - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorageEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data), flags); - } - - /** - * Behaves similarly to {@link #glBufferStorage BufferStorage}, except that the buffer whose storage is to be defined is specified by {@code buffer} rather than by the current - * binding to {@code target}. - * - * @param buffer the buffer object - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorageEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), flags); - } - - /** - * Behaves similarly to {@link #glBufferStorage BufferStorage}, except that the buffer whose storage is to be defined is specified by {@code buffer} rather than by the current - * binding to {@code target}. - * - * @param buffer the buffer object - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorageEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), flags); - } - - /** - * Behaves similarly to {@link #glBufferStorage BufferStorage}, except that the buffer whose storage is to be defined is specified by {@code buffer} rather than by the current - * binding to {@code target}. - * - * @param buffer the buffer object - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorageEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), flags); - } - - /** Array version of: {@link #glBufferStorage BufferStorage} */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") short[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** Array version of: {@link #glBufferStorage BufferStorage} */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") int[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** Array version of: {@link #glBufferStorage BufferStorage} */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") float[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** Array version of: {@link #glBufferStorage BufferStorage} */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") double[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** Array version of: {@link #glNamedBufferStorageEXT NamedBufferStorageEXT} */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 1, data, flags, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferStorageEXT NamedBufferStorageEXT} */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, flags, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferStorageEXT NamedBufferStorageEXT} */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, flags, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferStorageEXT NamedBufferStorageEXT} */ - public static void glNamedBufferStorageEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 3, data, flags, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCLEvent.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBCLEvent.java deleted file mode 100644 index cdd00d23..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCLEvent.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; - -/** - * Native bindings to the ARB_cl_event extension. - * - *

    This extension allows creating OpenGL sync objects linked to OpenCL event objects, potentially improving efficiency of sharing images and buffers - * between the two APIs. The companion {@code cl_khr_gl_event} OpenCL extension provides the complementary functionality of creating an OpenCL event - * object from an OpenGL fence sync object.

    - * - *

    Requires {@link GL32 OpenGL 3.2} or {@link ARBSync ARB_sync}. Requires an OpenCL implementation supporting sharing event objects with OpenGL.

    - */ -public class ARBCLEvent { - - static { GL.initialize(); } - - /** Returned in {@code values} for {@link GL32C#glGetSynciv GetSynciv} {@code pname} {@link GL32#GL_OBJECT_TYPE OBJECT_TYPE}. */ - public static final int GL_SYNC_CL_EVENT_ARB = 0x8240; - - /** Returned in {@code values} for {@link GL32C#glGetSynciv GetSynciv} {@code pname} {@link GL32#GL_SYNC_CONDITION SYNC_CONDITION}. */ - public static final int GL_SYNC_CL_EVENT_COMPLETE_ARB = 0x8241; - - protected ARBCLEvent() { - throw new UnsupportedOperationException(); - } - - // --- [ glCreateSyncFromCLeventARB ] --- - - /** Unsafe version of: {@link #glCreateSyncFromCLeventARB CreateSyncFromCLeventARB} */ - public static native long nglCreateSyncFromCLeventARB(long context, long event, int flags); - - /** - * Creates a linked sync object. {@code context} and {@code event} must be handles to a valid OpenCL context and a valid event in that context, - * respectively. {@code context} must support sharing with GL, and must have been created with respect to the current GL context, or to a share group - * including the current GL context. - * - *

    The status of such a sync object depends on {@code event}. When the status of {@code event} is {@code CL_QUEUED}, {@code CL_SUBMITTED}, or - * {@code CL_RUNNING}, the status of the linked sync object will be {@link GL32#GL_UNSIGNALED UNSIGNALED}. When the status of {@code event} changes to {@code CL_COMPLETE}, the - * status of the linked sync object will become {@link GL32#GL_SIGNALED SIGNALED}.

    - * - *

    Creating a linked sync object places a reference on the linked OpenCL event object. When the sync object is deleted, the reference will be removed from - * the event object.

    - * - * @param context a valid OpenCL context - * @param event a valid OpenCL event - * @param flags must be 0 (placeholder for anticipated future extensions of sync object capabilities) - */ - @NativeType("GLsync") - public static long glCreateSyncFromCLeventARB(@NativeType("cl_context") long context, @NativeType("cl_event") long event, @NativeType("GLbitfield") int flags) { - if (CHECKS) { - check(context); - check(event); - } - return nglCreateSyncFromCLeventARB(context, event, flags); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBClearBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBClearBufferObject.java deleted file mode 100644 index 56591a63..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBClearBufferObject.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_clear_buffer_object extension. - * - *

    Buffer objects are fundamental to the operation of OpenGL. Buffers are used as a source of data for vertices and indices, read through buffer textures - * in shaders, used to transfer texture and image data into and out of textures and framebuffers, and may be written to by operations such as transform - * feedback. OpenGL contains mechanisms to copy sections of buffers from one to another, but it has no mechanism to initialize the content of a buffer to a - * known value. In effect, it has {@code memcpy}, but not {@code memset}.

    - * - *

    This extension adds such a mechanism and has several use cases. Examples include clearing a pixel unpack buffer before transferring data to a texture or - * resetting buffer data to a known value before sparse updates through shader image stores or transform feedback.

    - * - *

    Requires {@link GL15 OpenGL 1.5}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBClearBufferObject { - - static { GL.initialize(); } - - protected ARBClearBufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glClearBufferData ] --- - - /** Unsafe version of: {@link #glClearBufferData ClearBufferData} */ - public static void nglClearBufferData(int target, int internalformat, int format, int type, long data) { - GL43C.nglClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - // --- [ glClearBufferSubData ] --- - - /** Unsafe version of: {@link #glClearBufferSubData ClearBufferSubData} */ - public static void nglClearBufferSubData(int target, int internalformat, long offset, long size, int format, int type, long data) { - GL43C.nglClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - // --- [ glClearNamedBufferDataEXT ] --- - - /** Unsafe version of: {@link #glClearNamedBufferDataEXT ClearNamedBufferDataEXT} */ - public static native void nglClearNamedBufferDataEXT(int buffer, int internalformat, int format, int type, long data); - - /** - * DSA version of {@link #glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearNamedBufferDataEXT(buffer, internalformat, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link #glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearNamedBufferDataEXT(buffer, internalformat, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link #glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearNamedBufferDataEXT(buffer, internalformat, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link #glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearNamedBufferDataEXT(buffer, internalformat, format, type, memAddressSafe(data)); - } - - // --- [ glClearNamedBufferSubDataEXT ] --- - - /** Unsafe version of: {@link #glClearNamedBufferSubDataEXT ClearNamedBufferSubDataEXT} */ - public static native void nglClearNamedBufferSubDataEXT(int buffer, int internalformat, long offset, long size, int format, int type, long data); - - /** - * DSA version of {@link #glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link #glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link #glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link #glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object to clear - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** Array version of: {@link #glClearBufferData ClearBufferData} */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** Array version of: {@link #glClearBufferData ClearBufferData} */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** Array version of: {@link #glClearBufferData ClearBufferData} */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** Array version of: {@link #glClearBufferSubData ClearBufferSubData} */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** Array version of: {@link #glClearBufferSubData ClearBufferSubData} */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** Array version of: {@link #glClearBufferSubData ClearBufferSubData} */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** Array version of: {@link #glClearNamedBufferDataEXT ClearNamedBufferDataEXT} */ - public static void glClearNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer, internalformat, format, type, data, __functionAddress); - } - - /** Array version of: {@link #glClearNamedBufferDataEXT ClearNamedBufferDataEXT} */ - public static void glClearNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer, internalformat, format, type, data, __functionAddress); - } - - /** Array version of: {@link #glClearNamedBufferDataEXT ClearNamedBufferDataEXT} */ - public static void glClearNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer, internalformat, format, type, data, __functionAddress); - } - - /** Array version of: {@link #glClearNamedBufferSubDataEXT ClearNamedBufferSubDataEXT} */ - public static void glClearNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** Array version of: {@link #glClearNamedBufferSubDataEXT ClearNamedBufferSubDataEXT} */ - public static void glClearNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** Array version of: {@link #glClearNamedBufferSubDataEXT ClearNamedBufferSubDataEXT} */ - public static void glClearNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, internalformat, offset, size, format, type, data, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBClearTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBClearTexture.java deleted file mode 100644 index 9e12b386..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBClearTexture.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_clear_texture extension. - * - *

    Texture objects are fundamental to the operation of OpenGL. They are used as a source for texture sampling and destination for rendering as well as - * being accessed in shaders for image load/store operations. It is also possible to invalidate the contents of a texture. It is currently only possible to - * set texture image data to known values by uploading some or all of a image array from application memory or by attaching it to a framebuffer object and - * using {@link GL11C#glClear Clear} or the {@link GL30 OpenGL 3.0} ClearBuffer commands.

    - * - *

    Both uploading initial texture data and clearing by attaching to a framebuffer have potential disadvantages when one simply wants to initialize texture - * data to a known value. Uploading initial data requires the application to allocate a (potentially large) chunk of memory and transferring that to the - * GL. This can be a costly operation both in terms of memory bandwidth and power usage. Alternatively, attaching a texture level to a framebuffer to clear - * it may not be possible if the texture format isn't supported for rendering, or even if it is, attaching the image to a framebuffer object may cause the - * texture to be allocated in certain types of memory, which it may otherwise not need to be placed in.

    - * - *

    This extension solves these problems by providing a mechanism whereby the contents of a texture image array can be set to known values by using the - * {@link #glClearTexImage ClearTexImage} or {@link #glClearTexSubImage ClearTexSubImage} commands. These commands can also be useful for initializing an image that will be used for atomic shader - * operations.

    - * - *

    Requires {@link GL13 OpenGL 1.3}. Promoted to core in {@link GL44 OpenGL 4.4}.

    - */ -public class ARBClearTexture { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter for {@link GL42C#glGetInternalformativ GetInternalformativ} and {@link GL43C#glGetInternalformati64v GetInternalformati64v}. */ - public static final int GL_CLEAR_TEXTURE = 0x9365; - - protected ARBClearTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glClearTexSubImage ] --- - - /** Unsafe version of: {@link #glClearTexSubImage ClearTexSubImage} */ - public static void nglClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long data) { - GL44C.nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - // --- [ glClearTexImage ] --- - - /** Unsafe version of: {@link #glClearTexImage ClearTexImage} */ - public static void nglClearTexImage(int texture, int level, int format, int type, long data) { - GL44C.nglClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** Array version of: {@link #glClearTexSubImage ClearTexSubImage} */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** Array version of: {@link #glClearTexSubImage ClearTexSubImage} */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** Array version of: {@link #glClearTexSubImage ClearTexSubImage} */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** Array version of: {@link #glClearTexSubImage ClearTexSubImage} */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** Array version of: {@link #glClearTexImage ClearTexImage} */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** Array version of: {@link #glClearTexImage ClearTexImage} */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** Array version of: {@link #glClearTexImage ClearTexImage} */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** Array version of: {@link #glClearTexImage ClearTexImage} */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBClipControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBClipControl.java deleted file mode 100644 index d1a8e8ea..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBClipControl.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_clip_control extension. - * - *

    This extension provides additional clip control modes to configure how clip space is mapped to window space. This extension's goal is to 1) allow - * OpenGL to effectively match Direct3D's coordinate system conventions, and 2) potentially improve the numerical precision of the Z coordinate mapping.

    - * - *

    Promoted to core in {@link GL45 OpenGL 4.5}.

    - */ -public class ARBClipControl { - - static { GL.initialize(); } - - /** Accepted by the {@code origin} parameter of {@link #glClipControl ClipControl}. */ - public static final int - GL_LOWER_LEFT = 0x8CA1, - GL_UPPER_LEFT = 0x8CA2; - - /** Accepted by the {@code depth} parameter of {@link #glClipControl ClipControl}. */ - public static final int - GL_NEGATIVE_ONE_TO_ONE = 0x935E, - GL_ZERO_TO_ONE = 0x935F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CLIP_ORIGIN = 0x935C, - GL_CLIP_DEPTH_MODE = 0x935D; - - protected ARBClipControl() { - throw new UnsupportedOperationException(); - } - - // --- [ glClipControl ] --- - - /** - * Controls the clipping volume behavior. - * - *

    These parameters update the clip control origin and depth mode respectively. The initial value of the clip control origin is {@link GL20#GL_LOWER_LEFT LOWER_LEFT} and the - * initial value of the depth mode is {@link GL45C#GL_NEGATIVE_ONE_TO_ONE NEGATIVE_ONE_TO_ONE}.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if ClipControl is executed between the execution of {@link GL11#glBegin Begin} and the corresponding - * execution of {@link GL11#glEnd End}.

    - * - * @param origin the clip origin. One of:
    {@link GL20#GL_LOWER_LEFT LOWER_LEFT}{@link GL20#GL_UPPER_LEFT UPPER_LEFT}
    - * @param depth the clip depth mode. One of:
    {@link GL45C#GL_NEGATIVE_ONE_TO_ONE NEGATIVE_ONE_TO_ONE}{@link GL45C#GL_ZERO_TO_ONE ZERO_TO_ONE}
    - */ - public static void glClipControl(@NativeType("GLenum") int origin, @NativeType("GLenum") int depth) { - GL45C.glClipControl(origin, depth); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBColorBufferFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBColorBufferFloat.java deleted file mode 100644 index 5e9add4a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBColorBufferFloat.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_color_buffer_float extension. - * - *

    The standard OpenGL pipeline is based on a fixed-point pipeline. While color components are nominally floating-point values in the pipeline, components - * are frequently clamped to the range [0,1] to accomodate the fixed-point color buffer representation and allow for fixed-point computational hardware.

    - * - *

    This extension adds pixel formats or visuals with floating-point RGBA color components and controls for clamping of color components within the pipeline.

    - * - *

    For a floating-point RGBA pixel format, the size of each float components is specified using the same attributes that are used for defining the size of - * fixed-point components. 32-bit floating-point components are in the standard IEEE float format. 16-bit floating-point components have 1 sign bit, 5 - * exponent bits, and 10 mantissa bits.

    - * - *

    Clamping control provides a way to disable certain color clamps and allow programs, and the fixed-function pipeline, to deal in unclamped colors. There - * are controls to modify clamping of vertex colors, clamping of fragment colors throughout the pipeline, and for pixel return data.

    - * - *

    The default state for fragment clamping is {@link #GL_FIXED_ONLY_ARB FIXED_ONLY_ARB}, which has the behavior of clamping colors for fixed-point color buffers and not clamping - * colors for floating-pont color buffers.

    - * - *

    Vertex colors are clamped by default.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class ARBColorBufferFloat { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_RGBA_FLOAT_MODE_ARB = 0x8820; - - /** Accepted by the {@code target} parameter of ClampColorARB and the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CLAMP_VERTEX_COLOR_ARB = 0x891A, - GL_CLAMP_FRAGMENT_COLOR_ARB = 0x891B, - GL_CLAMP_READ_COLOR_ARB = 0x891C; - - /** Accepted by the {@code clamp} parameter of ClampColorARB. */ - public static final int GL_FIXED_ONLY_ARB = 0x891D; - - protected ARBColorBufferFloat() { - throw new UnsupportedOperationException(); - } - - // --- [ glClampColorARB ] --- - - /** - * Controls color clamping. - * - * @param target the color target. One of:
    {@link #GL_CLAMP_VERTEX_COLOR_ARB CLAMP_VERTEX_COLOR_ARB}{@link #GL_CLAMP_FRAGMENT_COLOR_ARB CLAMP_FRAGMENT_COLOR_ARB}{@link #GL_CLAMP_READ_COLOR_ARB CLAMP_READ_COLOR_ARB}
    - * @param clamp the new clamping state. One of:
    {@link GL11#GL_TRUE TRUE}{@link GL11#GL_FALSE FALSE}{@link #GL_FIXED_ONLY_ARB FIXED_ONLY_ARB}
    - */ - public static native void glClampColorARB(@NativeType("GLenum") int target, @NativeType("GLenum") int clamp); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java deleted file mode 100644 index 1dfe261f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_compressed_texture_pixel_storage extension. - * - *

    This extension expands the functionality of the {@link GL11C#glPixelStorei PixelStorei} modes to allow {@link GL11#GL_UNPACK_ROW_LENGTH UNPACK_ROW_LENGTH}, {@link GL11#GL_UNPACK_SKIP_ROWS UNPACK_SKIP_ROWS}, - * {@link GL11#GL_UNPACK_SKIP_PIXELS UNPACK_SKIP_PIXELS}, {@link GL12#GL_UNPACK_IMAGE_HEIGHT UNPACK_IMAGE_HEIGHT} and {@link GL12#GL_UNPACK_SKIP_IMAGES UNPACK_SKIP_IMAGES} to affect the operation of CompressedTexImage*D and - * CompressedTexSubImage*D. Similarly, it also allows {@link GL11#GL_PACK_ROW_LENGTH PACK_ROW_LENGTH}, {@link GL11#GL_PACK_SKIP_ROWS PACK_SKIP_ROWS}, {@link GL11#GL_PACK_SKIP_PIXELS PACK_SKIP_PIXELS}, {@link GL12#GL_PACK_IMAGE_HEIGHT PACK_IMAGE_HEIGHT} and - * {@link GL12#GL_PACK_SKIP_IMAGES PACK_SKIP_IMAGES} to affect the operation of GetCompressedTexImage*D. This allows data to be transferred to or from a specified sub-rectangle of a - * larger compressed image.

    - * - *

    This extension is designed primarily to support compressed image formats with fixed-size blocks. To use this new mechanism, an application should - * program new parameters UNPACK_COMPRESSED_BLOCK_{WIDTH,HEIGHT,DEPTH,SIZE} to indicate the number of texels in each dimension of the fixed-size block as - * well as the number of bytes consumed by each block. These parameters, in addition to the existing PixelStore parameters, are used to identify a - * collection of bytes in client memory or a buffer object's data store to use as compressed texture data. This operation is unlikely to have the desired - * results if the client programs a block size inconsistent with the underlying compressed image format, or if the compressed image format has - * variable-sized blocks.

    - * - *

    Requires {@link GL21 OpenGL 2.1}. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public final class ARBCompressedTexturePixelStorage { - - /** Accepted by the {@code pname} parameter of PixelStore[fi], GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, - GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, - GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, - GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, - GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, - GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, - GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, - GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; - - private ARBCompressedTexturePixelStorage() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBComputeShader.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBComputeShader.java deleted file mode 100644 index 2da985a5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBComputeShader.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_compute_shader extension. - * - *

    Recent graphics hardware has become extremely powerful and a strong desire to harness this power for work (both graphics and non-graphics) that does not - * fit the traditional graphics pipeline well has emerged. To address this, this extension adds a new single-stage program type known as a compute program. - * This program may contain one or more compute shaders which may be launched in a manner that is essentially stateless. This allows arbitrary workloads to - * be sent to the graphics hardware with minimal disturbance to the GL state machine.

    - * - *

    In most respects, a compute program is identical to a traditional OpenGL program object, with similar status, uniforms, and other such properties. It - * has access to many of the same resources as fragment and other shader types, such as textures, image variables, atomic counters, and so on. However, it - * has no predefined inputs nor any fixed-function outputs. It cannot be part of a pipeline and its visible side effects are through its actions on images - * and atomic counters.

    - * - *

    OpenCL is another solution for using graphics processors as generalized compute devices. This extension addresses a different need. For example, OpenCL - * is designed to be usable on a wide range of devices ranging from CPUs, GPUs, and DSPs through to FPGAs. While one could implement GL on these types of - * devices, the target here is clearly GPUs. Another difference is that OpenCL is more full featured and includes features such as multiple devices, - * asynchronous queues and strict IEEE semantics for floating point operations. This extension follows the semantics of OpenGL - implicitly synchronous, - * in-order operation with single-device, single queue logical architecture and somewhat more relaxed numerical precision requirements. Although not as - * feature rich, this extension offers several advantages for applications that can tolerate the omission of these features. Compute shaders are written in - * GLSL, for example and so code may be shared between compute and other shader types. Objects are created and owned by the same context as the rest of the - * GL, and therefore no interoperability API is required and objects may be freely used by both compute and graphics simultaneously without acquire-release - * semantics or object type translation.

    - * - *

    Requires {@link GL42 OpenGL 4.2}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBComputeShader { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of CreateShader and returned in the {@code params} parameter by GetShaderiv. */ - public static final int GL_COMPUTE_SHADER = 0x91B9; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, - GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, - GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, - GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, - GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, - GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, - GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, - GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, - GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleani_v, GetFloati_v, GetDoublei_v and GetInteger64i_v. */ - public static final int - GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, - GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; - - /** Accepted by the {@code pname} parameter of GetActiveAtomicCounterBufferiv. */ - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; - - /** Accepted by the {@code stages} parameter of UseProgramStages. */ - public static final int GL_COMPUTE_SHADER_BIT = 0x20; - - protected ARBComputeShader() { - throw new UnsupportedOperationException(); - } - - // --- [ glDispatchCompute ] --- - - /** - * Launches one or more compute work groups. - * - * @param num_groups_x the number of work groups to be launched in the X dimension - * @param num_groups_y the number of work groups to be launched in the Y dimension - * @param num_groups_z the number of work groups to be launched in the Z dimension - */ - public static void glDispatchCompute(@NativeType("GLuint") int num_groups_x, @NativeType("GLuint") int num_groups_y, @NativeType("GLuint") int num_groups_z) { - GL43C.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); - } - - // --- [ glDispatchComputeIndirect ] --- - - /** - * Launches one or more compute work groups using parameters stored in a buffer. - * - *

    The parameters addressed by indirect are packed a structure, which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint num_groups_x;
    -     *     uint num_groups_y;
    -     *     uint num_groups_z;
    -     * } DispatchIndirectCommand;
    - * - *

    A call to {@code glDispatchComputeIndirect} is equivalent, assuming no errors are generated, to:

    - * - *
    
    -     * cmd = (const DispatchIndirectCommand *)indirect;
    -     * glDispatchCompute(cmd->num_groups_x, cmd->num_groups_y, cmd->num_groups_z);
    - * - * @param indirect the offset into the buffer object currently bound to the {@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER} buffer target at which the dispatch parameters are - * stored. - */ - public static void glDispatchComputeIndirect(@NativeType("GLintptr") long indirect) { - GL43C.glDispatchComputeIndirect(indirect); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBComputeVariableGroupSize.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBComputeVariableGroupSize.java deleted file mode 100644 index a29312c6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBComputeVariableGroupSize.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_compute_variable_group_size extension. - * - *

    This extension allows applications to write generic compute shaders that operate on work groups with arbitrary dimensions. Instead of specifying a fixed - * work group size in the compute shader, an application can use a compute shader using the {@code local_size_variable} layout qualifer to indicate a - * variable work group size. When using such compute shaders, the new command DispatchComputeGroupSizeARB should be used to specify both a work group size - * and work group count.

    - * - *

    In this extension, compute shaders with fixed group sizes must be dispatched by {@link GL43C#glDispatchCompute DispatchCompute} and {@link GL43C#glDispatchComputeIndirect DispatchComputeIndirect}. Compute - * shaders with variable group sizes must be dispatched via {@link #glDispatchComputeGroupSizeARB DispatchComputeGroupSizeARB}. No support is provided in this extension for indirect dispatch - * of compute shaders with a variable group size.

    - * - *

    Requires {@link GL43 OpenGL 4.3} or {@link ARBComputeShader ARB_compute_shader}.

    - */ -public class ARBComputeVariableGroupSize { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = 0x9344, - GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = 0x90EB; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleani_v, GetFloati_v, GetDoublei_v and GetInteger64i_v. */ - public static final int - GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = 0x9345, - GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = 0x91BF; - - protected ARBComputeVariableGroupSize() { - throw new UnsupportedOperationException(); - } - - // --- [ glDispatchComputeGroupSizeARB ] --- - - /** - * Launches one or more compute work groups, with arbitrary dimensions. - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated by DispatchComputeGroupSizeARB if the active program for the compute shader stage has a fixed work group - * size.

    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated by DispatchComputeGroupSizeARB if any of {@code group_size_x}, {@code group_size_y}, or {@code group_size_z} is - * less than or equal to zero or greater than the maximum local work group size for compute shaders with variable group size - * ({@link #GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB}) in the corresponding dimension.

    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated by DispatchComputeGroupSizeARB if the product of {@code group_size_x}, {@code group_size_y}, and - * {@code group_size_z} exceeds the implementation-dependent maximum local work group invocation count for compute shaders with variable group size - * ({@link #GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB}).

    - * - * @param num_groups_x the number of work groups to be launched in the X dimension - * @param num_groups_y the number of work groups to be launched in the Y dimension - * @param num_groups_z the number of work groups to be launched in the Z dimension - * @param group_size_x the group size in the X dimension - * @param group_size_y the group size in the Y dimension - * @param group_size_z the group size in the Z dimension - */ - public static native void glDispatchComputeGroupSizeARB(@NativeType("GLuint") int num_groups_x, @NativeType("GLuint") int num_groups_y, @NativeType("GLuint") int num_groups_z, @NativeType("GLuint") int group_size_x, @NativeType("GLuint") int group_size_y, @NativeType("GLuint") int group_size_z); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBConditionalRenderInverted.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBConditionalRenderInverted.java deleted file mode 100644 index 153257da..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBConditionalRenderInverted.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_conditional_render_inverted extension. - * - *

    This extension adds new modes to {@link GL30C#glBeginConditionalRender BeginConditionalRender} which invert the condition used to determine whether to draw or not.

    - * - *

    Requires {@link GL30 OpenGL 3.0}. Promoted to core in {@link GL45 OpenGL 4.5}.

    - */ -public final class ARBConditionalRenderInverted { - - /** Accepted by the {@code mode} parameter of {@link GL30C#glBeginConditionalRender BeginConditionalRender}. */ - public static final int - GL_QUERY_WAIT_INVERTED = 0x8E17, - GL_QUERY_NO_WAIT_INVERTED = 0x8E18, - GL_QUERY_BY_REGION_WAIT_INVERTED = 0x8E19, - GL_QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A; - - private ARBConditionalRenderInverted() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCopyBuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBCopyBuffer.java deleted file mode 100644 index d2d78511..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCopyBuffer.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_copy_buffer extension. - * - *

    This extension provides a mechanism to do an accelerated copy from one buffer object to another. This may be useful to load buffer objects in a "loading - * thread" while minimizing cost and synchronization effort in the "rendering thread."

    - * - *

    Promoted to core in {@link GL31 OpenGL 3.1}.

    - */ -public class ARBCopyBuffer { - - static { GL.initialize(); } - - /** - * Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, MapBufferRange, - * FlushMappedBufferRange, GetBufferParameteriv, BindBufferRange, BindBufferBase, and CopyBufferSubData. - */ - public static final int - GL_COPY_READ_BUFFER = 0x8F36, - GL_COPY_WRITE_BUFFER = 0x8F37; - - protected ARBCopyBuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ glCopyBufferSubData ] --- - - /** - * Copies all or part of one buffer object's data store to the data store of another buffer object. - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if any of readoffset, writeoffset, or size are negative, if readoffset+size exceeds the size of the buffer object - * bound to readtarget, or if writeoffset+size exceeds the size of the buffer object bound to writetarget.

    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if the same buffer object is bound to both readtarget and writetarget, and the ranges [readoffset, readoffset+size) - * and [writeoffset, writeoffset+size) overlap.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if zero is bound to readtarget or writetarget.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if the buffer objects bound to either readtarget or writetarget are mapped.

    - * - * @param readTarget the source buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL31C#GL_COPY_READ_BUFFER COPY_READ_BUFFER}{@link GL31C#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}
    {@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31C#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL31C#GL_UNIFORM_BUFFER UNIFORM_BUFFER}
    - * @param writeTarget the destination buffer object target - * @param readOffset the source buffer object offset, in bytes - * @param writeOffset the destination buffer object offset, in bytes - * @param size the number of bytes to copy - */ - public static void glCopyBufferSubData(@NativeType("GLenum") int readTarget, @NativeType("GLenum") int writeTarget, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size) { - GL31C.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCopyImage.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBCopyImage.java deleted file mode 100644 index 0feb0090..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCopyImage.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_copy_image extension. - * - *

    This extension enables efficient image data transfer between image objects (i.e. textures and renderbuffers) without the need to bind the objects or - * otherwise configure the rendering pipeline.

    - * - *

    This is accomplised by adding a new entry-point {@link #glCopyImageSubData CopyImageSubData}, which takes a named source and destination.

    - * - *

    CopyImageSubData does not perform general-purpose conversions such as scaling, resizing, blending, color-space, or format conversions. It should be - * considered to operate in a manner similar to a CPU {@code memcpy}, but using the GPU for the copy.

    - * - *

    CopyImageSubData supports copies between images with different internal formats, if the formats are compatible for TextureViews.

    - * - *

    CopyImageSubData also supports copying between compressed and uncompressed images if the compressed block / uncompressed texel sizes are the same.

    - * - *

    Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBCopyImage { - - static { GL.initialize(); } - - protected ARBCopyImage() { - throw new UnsupportedOperationException(); - } - - // --- [ glCopyImageSubData ] --- - - /** - * Performs a raw data copy between two images. - * - * @param srcName the name of a texture or renderbuffer object from which to copy - * @param srcTarget the target representing the namespace of the source name {@code srcName} - * @param srcLevel the mipmap level to read from the source - * @param srcX the X coordinate of the left edge of the souce region to copy - * @param srcY the Y coordinate of the top edge of the souce region to copy - * @param srcZ the Z coordinate of the near edge of the souce region to copy - * @param dstName the name of a texture or renderbuffer object to which to copy - * @param dstTarget the target representing the namespace of the destination name {@code dstName} - * @param dstLevel the mipmap level to write to the source - * @param dstX the X coordinate of the left edge of the destination region - * @param dstY the Y coordinate of the top edge of the destination region - * @param dstZ the Z coordinate of the near edge of the destination region - * @param srcWidth the width of the region to be copied - * @param srcHeight the height of the region to be copied - * @param srcDepth the depth of the region to be copied - */ - public static void glCopyImageSubData(@NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int srcWidth, @NativeType("GLsizei") int srcHeight, @NativeType("GLsizei") int srcDepth) { - GL43C.glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCullDistance.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBCullDistance.java deleted file mode 100644 index 8faf013f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBCullDistance.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_cull_distance extension. - * - *

    This extension adds a new GLSL {@code gl_CullDistance} shader output, similar to {@code gl_ClipDistance}, but used for whole primitive culling.

    - * - *

    This new stage in the pipeline is added as part of the primitive clipping stage.

    - * - *

    Requires {@link GL30 OpenGL 3.0}. Promoted to core in {@link GL45 OpenGL 4.5}.

    - */ -public final class ARBCullDistance { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int - GL_MAX_CULL_DISTANCES = 0x82F9, - GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA; - - private ARBCullDistance() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDebugOutput.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDebugOutput.java deleted file mode 100644 index 2e491003..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDebugOutput.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_debug_output extension. - * - *

    This extension allows the GL to notify applications when various events occur that may be useful during application development and debugging.

    - * - *

    These events are represented in the form of enumerable messages with a human-readable string representation. Examples of debug events include incorrect - * use of the GL, warnings of undefined behavior, and performance warnings.

    - * - *

    A message is uniquely identified by a source, a type and an implementation-dependent ID within the source and type pair.

    - * - *

    A message's source identifies the origin of the message and can either describe components of the GL, the window system, third-party external sources - * such as external debuggers, or even the application itself.

    - * - *

    The type of the message roughly identifies the nature of the event that caused the message. Examples include errors, performance warnings, or warnings - * about undefined behavior.

    - * - *

    A message's ID for a given source and type further distinguishes messages within those groups. For example, an error caused by a negative parameter - * value or an invalid internal texture format are both errors generated by the API, but would likely have different message IDs.

    - * - *

    Each message is also assigned to a severity level that denotes roughly how "important" that message is in comparison to other messages across all - * sources and types. For example, notification of a GL error would likely have a higher severity than a performance warning due to redundant state - * changes.

    - * - *

    Finally, every message contains an implementation-dependent string representation that provides a useful description of the event.

    - * - *

    Messages are communicated to the application through an application-defined callback function that is called by the GL implementation on each debug - * message. The motivation for the callback routine is to free application developers from actively having to query whether a GL error, or any other - * debuggable event has happened after each call to a GL function. With a callback, developers can keep their code free of debug checks, and only have to - * react to messages as they occur. In situations where using a callback is not possible, a message log is also provided that stores copies of recent - * messages until they are actively queried.

    - * - *

    To control the volume of debug output, messages can be disabled either individually by ID, or entire groups of messages can be turned off based on - * combination of source and type.

    - * - *

    The only requirement on the minimum quantity and type of messages that implementations of this extension must support is that some sort of message must - * be sent notifying the application whenever any GL error occurs. Any further messages are left to the implementation. Implementations do not have to - * output messages from all sources nor do they have to use all types of messages listed by this extension, and both new sources and types can be added by - * other extensions.

    - * - *

    For performance reasons it is recommended, but not required, that implementations restrict supporting this extension only to contexts created using the - * debug flag as provided by {@link WGLARBCreateContext WGL_ARB_create_context} or {@link GLXARBCreateContext GLX_ARB_create_context}. This extension places no limits on any other functionality - * provided by debug contexts through other extensions.

    - */ -public class ARBDebugOutput { - - static { GL.initialize(); } - - /** - * Tokens accepted by the {@code target} parameters of Enable, Disable, and IsEnabled. - * - *

    The behavior of how and when the GL driver is allowed to generate debug messages, and subsequently either call back to the application or place the - * message in the debug message log, is affected by the state DEBUG_OUTPUT_SYNCHRONOUS_ARB. This state can be modified by the {@link GL11#glEnable Enable} and - * {@link GL11#glDisable Disable} commands. Its initial value is {@link GL11#GL_FALSE FALSE}.

    - * - *

    When DEBUG_OUTPUT_SYNCHRONOUS_ARB is disabled, the driver is optionally allowed to concurrently call the debug callback routine from potentially - * multiple threads, including threads that the context that generated the message is not currently bound to. The implementation may also call the callback - * routine asynchronously after the GL command that generated the message has already returned. The application is fully responsible for ensuring thread - * safety due to debug callbacks under these circumstances. In this situation the {@code userParam} value may be helpful in identifying which application - * thread's command originally generated the debug callback.

    - * - *

    When DEBUG_OUTPUT_SYNCHRONOUS_ARB is enabled, the driver guarantees synchronous calls to the callback routine by the context. When synchronous callbacks - * are enabled, all calls to the callback routine will be made by the thread that owns the current context; all such calls will be made serially by the - * current context; and each call will be made before the GL command that generated the debug message is allowed to return.

    - * - *

    When no callback is specified and DEBUG_OUTPUT_SYNCHRONOUS_ARB is disabled, the driver can still asynchronously place messages in the debug message log, - * even after the context thread has returned from the GL function that generated those messages. When DEBUG_OUTPUT_SYNCHRONOUS_ARB is enabled, the driver - * guarantees that all messages are added to the log before the GL function returns.

    - * - *

    Enabling synchronous debug output greatly simplifies the responsibilities of the application for making its callback functions thread-safe, but may - * potentially result in drastically reduced driver performance.

    - * - *

    The DEBUG_OUTPUT_SYNCHRONOUS_ARB only guarantees intra-context synchronization for the callbacks of messages generated by that context, and does not - * guarantee synchronization across multiple contexts. If multiple contexts are concurrently used by the application, it is allowed for those contexts to - * also concurrently call their designated callbacks, and the application is responsible for handling thread safety in that situation even if - * DEBUG_OUTPUT_SYNCHRONOUS_ARB is enabled in all contexts.

    - */ - public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242; - - /** Tokens accepted by the {@code value} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143, - GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144, - GL_DEBUG_LOGGED_MESSAGES_ARB = 0x9145, - GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243; - - /** Tokens accepted by the {@code pname} parameter of GetPointerv. */ - public static final int - GL_DEBUG_CALLBACK_FUNCTION_ARB = 0x8244, - GL_DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245; - - /** - * Tokens accepted or provided by the {@code source} parameters of DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, and the {@code sources} - * parameter of GetDebugMessageLogARB. - */ - public static final int - GL_DEBUG_SOURCE_API_ARB = 0x8246, - GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247, - GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248, - GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249, - GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A, - GL_DEBUG_SOURCE_OTHER_ARB = 0x824B; - - /** - * Tokens accepted or provided by the {@code type} parameters of DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, and the {@code types} - * parameter of GetDebugMessageLogARB. - */ - public static final int - GL_DEBUG_TYPE_ERROR_ARB = 0x824C, - GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D, - GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E, - GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F, - GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250, - GL_DEBUG_TYPE_OTHER_ARB = 0x8251; - - /** - * Tokens accepted or provided by the {@code severity} parameters of DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB callback functions, and - * the {@code severities} parameter of GetDebugMessageLogARB. - */ - public static final int - GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146, - GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147, - GL_DEBUG_SEVERITY_LOW_ARB = 0x9148; - - protected ARBDebugOutput() { - throw new UnsupportedOperationException(); - } - - // --- [ glDebugMessageControlARB ] --- - - /** - * Unsafe version of: {@link #glDebugMessageControlARB DebugMessageControlARB} - * - * @param count the number of message IDs in {@code ids} - */ - public static native void nglDebugMessageControlARB(int source, int type, int severity, int count, long ids, boolean enabled); - - /** - * Controls the volume of debug output by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source} is not {@link GL11#GL_DONT_CARE DONT_CARE}, then all messages whose source does not match {@code source} will not be referenced.
    • - *
    • If {@code type} is not {@link GL11#GL_DONT_CARE DONT_CARE}, then all messages whose type does not match {@code type} will not be referenced.
    • - *
    • If {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, then all messages whose severity level does not match {@code severity} will not be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If {@code count} is zero, the value if {@code ids} is ignored.
    • - *
    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - * @param source the message source. One of:
    {@link #GL_DEBUG_SOURCE_API_ARB DEBUG_SOURCE_API_ARB}{@link #GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB DEBUG_SOURCE_WINDOW_SYSTEM_ARB}
    {@link #GL_DEBUG_SOURCE_SHADER_COMPILER_ARB DEBUG_SOURCE_SHADER_COMPILER_ARB}{@link #GL_DEBUG_SOURCE_THIRD_PARTY_ARB DEBUG_SOURCE_THIRD_PARTY_ARB}
    {@link #GL_DEBUG_SOURCE_APPLICATION_ARB DEBUG_SOURCE_APPLICATION_ARB}{@link #GL_DEBUG_SOURCE_OTHER_ARB DEBUG_SOURCE_OTHER_ARB}
    - * @param type the message type. One of:
    {@link #GL_DEBUG_TYPE_ERROR_ARB DEBUG_TYPE_ERROR_ARB}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB}
    {@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB}{@link #GL_DEBUG_TYPE_PORTABILITY_ARB DEBUG_TYPE_PORTABILITY_ARB}
    {@link #GL_DEBUG_TYPE_PERFORMANCE_ARB DEBUG_TYPE_PERFORMANCE_ARB}{@link #GL_DEBUG_TYPE_OTHER_ARB DEBUG_TYPE_OTHER_ARB}
    - * @param severity the message severity level. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_ARB DEBUG_SEVERITY_HIGH_ARB}{@link #GL_DEBUG_SEVERITY_MEDIUM_ARB DEBUG_SEVERITY_MEDIUM_ARB}{@link #GL_DEBUG_SEVERITY_LOW_ARB DEBUG_SEVERITY_LOW_ARB}
    - * @param ids the message IDs to enable or disable - * @param enabled whether to enable or disable the references subset of messages - */ - public static void glDebugMessageControlARB(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") IntBuffer ids, @NativeType("GLboolean") boolean enabled) { - nglDebugMessageControlARB(source, type, severity, remainingSafe(ids), memAddressSafe(ids), enabled); - } - - /** - * Controls the volume of debug output by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source} is not {@link GL11#GL_DONT_CARE DONT_CARE}, then all messages whose source does not match {@code source} will not be referenced.
    • - *
    • If {@code type} is not {@link GL11#GL_DONT_CARE DONT_CARE}, then all messages whose type does not match {@code type} will not be referenced.
    • - *
    • If {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, then all messages whose severity level does not match {@code severity} will not be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If {@code count} is zero, the value if {@code ids} is ignored.
    • - *
    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - * @param source the message source. One of:
    {@link #GL_DEBUG_SOURCE_API_ARB DEBUG_SOURCE_API_ARB}{@link #GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB DEBUG_SOURCE_WINDOW_SYSTEM_ARB}
    {@link #GL_DEBUG_SOURCE_SHADER_COMPILER_ARB DEBUG_SOURCE_SHADER_COMPILER_ARB}{@link #GL_DEBUG_SOURCE_THIRD_PARTY_ARB DEBUG_SOURCE_THIRD_PARTY_ARB}
    {@link #GL_DEBUG_SOURCE_APPLICATION_ARB DEBUG_SOURCE_APPLICATION_ARB}{@link #GL_DEBUG_SOURCE_OTHER_ARB DEBUG_SOURCE_OTHER_ARB}
    - * @param type the message type. One of:
    {@link #GL_DEBUG_TYPE_ERROR_ARB DEBUG_TYPE_ERROR_ARB}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB}
    {@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB}{@link #GL_DEBUG_TYPE_PORTABILITY_ARB DEBUG_TYPE_PORTABILITY_ARB}
    {@link #GL_DEBUG_TYPE_PERFORMANCE_ARB DEBUG_TYPE_PERFORMANCE_ARB}{@link #GL_DEBUG_TYPE_OTHER_ARB DEBUG_TYPE_OTHER_ARB}
    - * @param severity the message severity level. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_ARB DEBUG_SEVERITY_HIGH_ARB}{@link #GL_DEBUG_SEVERITY_MEDIUM_ARB DEBUG_SEVERITY_MEDIUM_ARB}{@link #GL_DEBUG_SEVERITY_LOW_ARB DEBUG_SEVERITY_LOW_ARB}
    - * @param enabled whether to enable or disable the references subset of messages - */ - public static void glDebugMessageControlARB(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @NativeType("GLuint const *") int id, @NativeType("GLboolean") boolean enabled) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.ints(id); - nglDebugMessageControlARB(source, type, severity, 1, memAddress(ids), enabled); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDebugMessageInsertARB ] --- - - /** - * Unsafe version of: {@link #glDebugMessageInsertARB DebugMessageInsertARB} - * - * @param length the number of characters in {@code buf}. If negative, it is implied that {@code buf} contains a null terminated string. - */ - public static native void nglDebugMessageInsertARB(int source, int type, int id, int severity, int length, long buf); - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the number of characters in {@code buf}, excluding the null terminator when {@code length} is - * negative, is not less than {@link #GL_MAX_DEBUG_MESSAGE_LENGTH_ARB MAX_DEBUG_MESSAGE_LENGTH_ARB}.

    - * - * @param source the message source. One of:
    {@link #GL_DEBUG_SOURCE_THIRD_PARTY_ARB DEBUG_SOURCE_THIRD_PARTY_ARB}{@link #GL_DEBUG_SOURCE_APPLICATION_ARB DEBUG_SOURCE_APPLICATION_ARB}
    - * @param type the message type. One of:
    {@link #GL_DEBUG_TYPE_ERROR_ARB DEBUG_TYPE_ERROR_ARB}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB}
    {@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB}{@link #GL_DEBUG_TYPE_PORTABILITY_ARB DEBUG_TYPE_PORTABILITY_ARB}
    {@link #GL_DEBUG_TYPE_PERFORMANCE_ARB DEBUG_TYPE_PERFORMANCE_ARB}{@link #GL_DEBUG_TYPE_OTHER_ARB DEBUG_TYPE_OTHER_ARB}
    - * @param id the message ID - * @param severity the message severity level. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_ARB DEBUG_SEVERITY_HIGH_ARB}{@link #GL_DEBUG_SEVERITY_MEDIUM_ARB DEBUG_SEVERITY_MEDIUM_ARB}{@link #GL_DEBUG_SEVERITY_LOW_ARB DEBUG_SEVERITY_LOW_ARB}
    - * @param buf the string representation of the message - */ - public static void glDebugMessageInsertARB(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") ByteBuffer buf) { - nglDebugMessageInsertARB(source, type, id, severity, buf.remaining(), memAddress(buf)); - } - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the number of characters in {@code buf}, excluding the null terminator when {@code length} is - * negative, is not less than {@link #GL_MAX_DEBUG_MESSAGE_LENGTH_ARB MAX_DEBUG_MESSAGE_LENGTH_ARB}.

    - * - * @param source the message source. One of:
    {@link #GL_DEBUG_SOURCE_THIRD_PARTY_ARB DEBUG_SOURCE_THIRD_PARTY_ARB}{@link #GL_DEBUG_SOURCE_APPLICATION_ARB DEBUG_SOURCE_APPLICATION_ARB}
    - * @param type the message type. One of:
    {@link #GL_DEBUG_TYPE_ERROR_ARB DEBUG_TYPE_ERROR_ARB}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB}
    {@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB}{@link #GL_DEBUG_TYPE_PORTABILITY_ARB DEBUG_TYPE_PORTABILITY_ARB}
    {@link #GL_DEBUG_TYPE_PERFORMANCE_ARB DEBUG_TYPE_PERFORMANCE_ARB}{@link #GL_DEBUG_TYPE_OTHER_ARB DEBUG_TYPE_OTHER_ARB}
    - * @param id the message ID - * @param severity the message severity level. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH_ARB DEBUG_SEVERITY_HIGH_ARB}{@link #GL_DEBUG_SEVERITY_MEDIUM_ARB DEBUG_SEVERITY_MEDIUM_ARB}{@link #GL_DEBUG_SEVERITY_LOW_ARB DEBUG_SEVERITY_LOW_ARB}
    - * @param buf the string representation of the message - */ - public static void glDebugMessageInsertARB(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") CharSequence buf) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int bufEncodedLength = stack.nUTF8(buf, false); - long bufEncoded = stack.getPointerAddress(); - nglDebugMessageInsertARB(source, type, id, severity, bufEncodedLength, bufEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDebugMessageCallbackARB ] --- - - /** Unsafe version of: {@link #glDebugMessageCallbackARB DebugMessageCallbackARB} */ - public static native void nglDebugMessageCallbackARB(long callback, long userParam); - - /** - * Specifies a callback function for receiving debug messages. - * - *

    This function's prototype must follow the type definition of DEBUGPROCARB including its platform-dependent calling convention. Anything else will result - * in undefined behavior. Only one debug callback can be specified for the current context, and further calls overwrite the previous callback. Specifying - * {@code NULL} as the value of {@code callback} clears the current callback and disables message output through callbacks. Applications can provide - * user-specified data through the pointer {@code userParam}. The context will store this pointer and will include it as one of the parameters in each call - * to the callback function.

    - * - *

    If the application has specified a callback function for receiving debug output, the implementation will call that function whenever any enabled message - * is generated. The source, type, ID, and severity of the message are specified by the DEBUGPROCARB parameters {@code source}, {@code type}, {@code id}, - * and {@code severity}, respectively. The string representation of the message is stored in {@code message} and its length (excluding the null-terminator) - * is stored in {@code length}. The parameter {@code userParam} is the user-specified parameter that was given when calling DebugMessageCallbackARB.

    - * - *

    Applications can query the current callback function and the current user-specified parameter by obtaining the values of {@link #GL_DEBUG_CALLBACK_FUNCTION_ARB DEBUG_CALLBACK_FUNCTION_ARB} - * and {@link #GL_DEBUG_CALLBACK_USER_PARAM_ARB DEBUG_CALLBACK_USER_PARAM_ARB}, respectively.

    - * - *

    Applications that specify a callback function must be aware of certain special conditions when executing code inside a callback when it is called by the - * GL, regardless of the debug source.

    - * - *

    The memory for {@code message} is owned and managed by the GL, and should only be considered valid for the duration of the function call.

    - * - *

    The behavior of calling any GL or window system function from within the callback function is undefined and may lead to program termination.

    - * - *

    Care must also be taken in securing debug callbacks for use with asynchronous debug output by multi-threaded GL implementations.

    - * - *

    If {@link #GL_DEBUG_CALLBACK_FUNCTION_ARB DEBUG_CALLBACK_FUNCTION_ARB} is {@code NULL}, then debug messages are instead stored in an internal message log up to some maximum number of messages as - * defined by the value of {@link #GL_MAX_DEBUG_LOGGED_MESSAGES_ARB MAX_DEBUG_LOGGED_MESSAGES_ARB}.

    - * - *

    Each context stores its own message log and will only store messages generated by commands operating in that context. If the message log fills up, then - * any subsequently generated messages will not be placed in the log until the message log is cleared, and will instead be discarded.

    - * - *

    Applications can query the number of messages currently in the log by obtaining the value of {@link #GL_DEBUG_LOGGED_MESSAGES_ARB DEBUG_LOGGED_MESSAGES_ARB}, and the string length - * (including its null terminator) of the oldest message in the log through the value of {@link #GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB}.

    - * - * @param callback a callback function that will be called when a debug message is generated - * @param userParam a user supplied pointer that will be passed on each invocation of {@code callback} - */ - public static void glDebugMessageCallbackARB(@Nullable @NativeType("GLDEBUGPROCARB") GLDebugMessageARBCallbackI callback, @NativeType("void const *") long userParam) { - nglDebugMessageCallbackARB(memAddressSafe(callback), userParam); - } - - // --- [ glGetDebugMessageLogARB ] --- - - /** - * Unsafe version of: {@link #glGetDebugMessageLogARB GetDebugMessageLogARB} - * - * @param bufSize the maximum number of characters that can be written in the {@code messageLog} array - */ - public static native int nglGetDebugMessageLogARB(int count, int bufSize, long sources, long types, long ids, long severities, long lengths, long messageLog); - - /** - * When no debug callback is set, debug messages are stored in a debug message log. Messages can be queried from the log by calling this function. - * - *

    This function fetches a maximum of {@code count} messages from the message log, and will return the number of messages successfully fetched.

    - * - *

    Messages will be fetched from the log in order of oldest to newest. Those messages that were fetched will be removed from the log.

    - * - *

    The sources, types, severities, IDs, and string lengths of fetched messages will be stored in the application-provided arrays {@code sources}, - * {@code types}, {@code severities}, {@code ids}, and {@code lengths}, respectively. The application is responsible for allocating enough space for each - * array to hold up to {@code count} elements. The string representations of all fetched messages are stored in the {@code messageLog} array. If multiple - * messages are fetched, their strings are concatenated into the same {@code messageLog} array and will be separated by single null terminators. The last - * string in the array will also be null-terminated. The maximum size of {@code messageLog}, including the space used by all null terminators, is given by - * {@code bufSize}. If {@code bufSize} is less than zero, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated. If a message's string, including its null - * terminator, can not fully fit within the {@code messageLog} array's remaining space, then that message and any subsequent messages will not be fetched - * and will remain in the log. The string lengths stored in the array {@code lengths} include the space for the null terminator of each string.

    - * - *

    Any or all of the arrays {@code sources}, {@code types}, {@code ids}, {@code severities}, {@code lengths} and {@code messageLog} can also be null - * pointers, which causes the attributes for such arrays to be discarded when messages are fetched, however those messages will still be removed from the - * log. Thus to simply delete up to {@code count} messages from the message log while ignoring their attributes, the application can call the function with - * null pointers for all attribute arrays. If {@code messageLog} is {@code NULL}, the value of {@code bufSize} is ignored.

    - * - * @param count the number of debug messages to retrieve from the log - * @param sources a buffer in which to place the returned message sources - * @param types a buffer in which to place the returned message typesd - * @param ids a buffer in which to place the returned message IDs - * @param severities a buffer in which to place the returned message severity levels - * @param lengths a buffer in which to place the returned message lengths - * @param messageLog a buffer in which to place the returned messages - */ - @NativeType("GLuint") - public static int glGetDebugMessageLogARB(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") IntBuffer sources, @Nullable @NativeType("GLenum *") IntBuffer types, @Nullable @NativeType("GLuint *") IntBuffer ids, @Nullable @NativeType("GLenum *") IntBuffer severities, @Nullable @NativeType("GLsizei *") IntBuffer lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - if (CHECKS) { - checkSafe(sources, count); - checkSafe(types, count); - checkSafe(ids, count); - checkSafe(severities, count); - checkSafe(lengths, count); - } - return nglGetDebugMessageLogARB(count, remainingSafe(messageLog), memAddressSafe(sources), memAddressSafe(types), memAddressSafe(ids), memAddressSafe(severities), memAddressSafe(lengths), memAddressSafe(messageLog)); - } - - /** Array version of: {@link #glDebugMessageControlARB DebugMessageControlARB} */ - public static void glDebugMessageControlARB(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") int[] ids, @NativeType("GLboolean") boolean enabled) { - long __functionAddress = GL.getICD().glDebugMessageControlARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(source, type, severity, lengthSafe(ids), ids, enabled, __functionAddress); - } - - /** Array version of: {@link #glGetDebugMessageLogARB GetDebugMessageLogARB} */ - @NativeType("GLuint") - public static int glGetDebugMessageLogARB(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") int[] sources, @Nullable @NativeType("GLenum *") int[] types, @Nullable @NativeType("GLuint *") int[] ids, @Nullable @NativeType("GLenum *") int[] severities, @Nullable @NativeType("GLsizei *") int[] lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - long __functionAddress = GL.getICD().glGetDebugMessageLogARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(sources, count); - checkSafe(types, count); - checkSafe(ids, count); - checkSafe(severities, count); - checkSafe(lengths, count); - } - return callPPPPPPI(count, remainingSafe(messageLog), sources, types, ids, severities, lengths, memAddressSafe(messageLog), __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthBufferFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthBufferFloat.java deleted file mode 100644 index 8bda5e28..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthBufferFloat.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_depth_buffer_float extension. - * - *

    This extension provides new texture internal formats whose depth components are stored as 32-bit floating-point values, rather than the normalized - * unsigned integers used in existing depth formats. Floating-point depth textures support all the functionality supported for fixed-point depth textures, - * including shadow mapping and rendering support via {@link EXTFramebufferObject EXT_framebuffer_object}. Floating-point depth textures can store values outside the range - * {@code [0,1]}.

    - * - *

    Additionally, this extension provides new packed depth/stencil pixel formats (see {@link EXTPackedDepthStencil EXT_packed_depth_stencil}) that have 64-bit pixels consisting - * of a 32-bit floating-point depth value, 8 bits of stencil, and 24 unused bites. A packed depth/stencil texture internal format is also provided.

    - * - *

    Requires {@link GL20 OpenGL 2.0}, {@link ARBColorBufferFloat ARB_color_buffer_float}, {@link EXTPackedDepthStencil EXT_packed_depth_stencil} and {@link ARBFramebufferObject ARB_framebuffer_object}. - * Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBDepthBufferFloat { - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameterivEXT. - */ - public static final int - GL_DEPTH_COMPONENT32F = 0x8CAC, - GL_DEPTH32F_STENCIL8 = 0x8CAD; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; - - private ARBDepthBufferFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthClamp.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthClamp.java deleted file mode 100644 index f3f6b518..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthClamp.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_depth_clamp extension. - * - *

    Conventional OpenGL clips geometric primitives to a clip volume with six faces, two of which are the near and far clip planes. Clipping to the near and - * far planes of the clip volume ensures that interpolated depth values (after the depth range transform) must be in the [0,1] range.

    - * - *

    In some rendering applications such as shadow volumes, it is useful to allow line and polygon primitives to be rasterized without clipping the primitive - * to the near or far clip volume planes (side clip volume planes clip normally). Without the near and far clip planes, rasterization (pixel coverage - * determination) in X and Y can proceed normally if we ignore the near and far clip planes. The one major issue is that fragments of a primitive may - * extend beyond the conventional window space depth range for depth values (typically the range [0,1]). Rather than discarding fragments that defy the - * window space depth range (effectively what near and far plane clipping accomplish), the depth values can be clamped to the current depth range.

    - * - *

    This extension provides exactly such functionality. This functionality is useful to obviate the need for near plane capping of stenciled shadow volumes. - * The functionality may also be useful for rendering geometry "beyond" the far plane if an alternative algorithm (rather than depth testing) for hidden - * surface removal is applied to such geometry (specifically, the painter's algorithm). Similar situations at the near clip plane can be avoided at the - * near clip plane where apparently solid objects can be "seen through" if they intersect the near clip plane.

    - * - *

    Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public final class ARBDepthClamp { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_DEPTH_CLAMP = 0x864F; - - private ARBDepthClamp() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthTexture.java deleted file mode 100644 index 534a7300..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDepthTexture.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_depth_texture extension. - * - *

    This extension defines a new depth texture format. An important application of depth texture images is shadow casting, but separating this from the - * shadow extension allows for the potential use of depth textures in other applications such as image-based rendering or displacement mapping. This - * extension does not define new depth-texture environment functions, such as filtering or applying the depth values computed from a texture but leaves - * this to other extensions, such as the shadow extension.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public final class ARBDepthTexture { - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, CopyTexImage1D and CopyTexImage2D. */ - public static final int - GL_DEPTH_COMPONENT16_ARB = 0x81A5, - GL_DEPTH_COMPONENT24_ARB = 0x81A6, - GL_DEPTH_COMPONENT32_ARB = 0x81A7; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int GL_TEXTURE_DEPTH_SIZE_ARB = 0x884A; - - /** Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_DEPTH_TEXTURE_MODE_ARB = 0x884B; - - private ARBDepthTexture() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDirectStateAccess.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDirectStateAccess.java deleted file mode 100644 index bfacab5f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDirectStateAccess.java +++ /dev/null @@ -1,3433 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_direct_state_access extension. - * - *

    In unextended OpenGL, most mutation of state contained in objects is through an indirection known as a binding. Objects are attached to a context - * (either directly or indirectly via a container) and then commands to modify or query their state are issued on that context, indirecting through its - * attachments and into the underlying object. This is known as `bind-to-edit'.

    - * - *

    This extension derives from the GL_EXT_direct_state_access extension, which added accessors for most state on most objects, allowing it to be queried - * and modified without the object needing to be bound to a context. In cases where a single property of an object is to be modified, directly accessing - * its state can be more efficient than binding the object to the context and then indirecting through it. Further, directly accessing the state of objects - * through their names rather than by bind-to-edit does not disturb the bindings of the current context, which is useful for tools, middleware and other - * applications that are unaware of the outer state but it can also avoid cases of redundant state changes.

    - * - *

    Requires {@link GL20 OpenGL 2.0}. Promoted to core in {@link GL45C OpenGL 4.5}.

    - */ -public class ARBDirectStateAccess { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetTextureParameter{if}v and GetTextureParameterI{i ui}v. */ - public static final int GL_TEXTURE_TARGET = 0x1006; - - /** Accepted by the {@code pname} parameter of GetQueryObjectiv. */ - public static final int GL_QUERY_TARGET = 0x82EA; - - protected ARBDirectStateAccess() { - throw new UnsupportedOperationException(); - } - - // --- [ glCreateTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glCreateTransformFeedbacks CreateTransformFeedbacks} - * - * @param n the number of transform feedback object names to create - */ - public static void nglCreateTransformFeedbacks(int n, long ids) { - GL45C.nglCreateTransformFeedbacks(n, ids); - } - - /** - * Returns {@code n} previously unused transform feedback object names in {@code ids}, each representing a new state vector. - * - * @param ids the buffer in which to return the names - */ - public static void glCreateTransformFeedbacks(@NativeType("GLuint *") IntBuffer ids) { - GL45C.glCreateTransformFeedbacks(ids); - } - - /** Returns {@code n} previously unused transform feedback object names in {@code ids}, each representing a new state vector. */ - @NativeType("void") - public static int glCreateTransformFeedbacks() { - return GL45C.glCreateTransformFeedbacks(); - } - - // --- [ glTransformFeedbackBufferBase ] --- - - /** - * Binds a buffer object to a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param index the transform feedback stream index - * @param buffer the name of an existing buffer object - */ - public static void glTransformFeedbackBufferBase(@NativeType("GLuint") int xfb, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer) { - GL45C.glTransformFeedbackBufferBase(xfb, index, buffer); - } - - // --- [ glTransformFeedbackBufferRange ] --- - - /** - * Binds a region of a buffer object to a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param index the transform feedback stream index - * @param buffer the name of an existing buffer object - * @param offset the starting offset in basic machine units into the buffer object - * @param size the amount of data in machine units - */ - public static void glTransformFeedbackBufferRange(@NativeType("GLuint") int xfb, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL45C.glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); - } - - // --- [ glGetTransformFeedbackiv ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbackiv GetTransformFeedbackiv} */ - public static void nglGetTransformFeedbackiv(int xfb, int pname, long param) { - GL45C.nglGetTransformFeedbackiv(xfb, pname, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL42#GL_TRANSFORM_FEEDBACK_PAUSED TRANSFORM_FEEDBACK_PAUSED}{@link GL42#GL_TRANSFORM_FEEDBACK_ACTIVE TRANSFORM_FEEDBACK_ACTIVE}
    - * @param param the buffer in which to return the parameter value - */ - public static void glGetTransformFeedbackiv(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetTransformFeedbackiv(xfb, pname, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL42#GL_TRANSFORM_FEEDBACK_PAUSED TRANSFORM_FEEDBACK_PAUSED}{@link GL42#GL_TRANSFORM_FEEDBACK_ACTIVE TRANSFORM_FEEDBACK_ACTIVE}
    - */ - @NativeType("void") - public static int glGetTransformFeedbacki(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname) { - return GL45C.glGetTransformFeedbacki(xfb, pname); - } - - // --- [ glGetTransformFeedbacki_v ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbacki_v GetTransformFeedbacki_v} */ - public static void nglGetTransformFeedbacki_v(int xfb, int pname, int index, long param) { - GL45C.nglGetTransformFeedbacki_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. Must be:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_BINDING TRANSFORM_FEEDBACK_BUFFER_BINDING}
    - * @param index the transform feedback stream index - * @param param the buffer in which to return the parameter value - */ - public static void glGetTransformFeedbacki_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetTransformFeedbacki_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. Must be:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_BINDING TRANSFORM_FEEDBACK_BUFFER_BINDING}
    - * @param index the transform feedback stream index - */ - @NativeType("void") - public static int glGetTransformFeedbacki(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - return GL45C.glGetTransformFeedbacki(xfb, pname, index); - } - - // --- [ glGetTransformFeedbacki64_v ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbacki64_v GetTransformFeedbacki64_v} */ - public static void nglGetTransformFeedbacki64_v(int xfb, int pname, int index, long param) { - GL45C.nglGetTransformFeedbacki64_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_START TRANSFORM_FEEDBACK_BUFFER_START}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_SIZE TRANSFORM_FEEDBACK_BUFFER_SIZE}
    - * @param index the transform feedback stream index - * @param param the buffer in which to return the parameter value - */ - public static void glGetTransformFeedbacki64_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") LongBuffer param) { - GL45C.glGetTransformFeedbacki64_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_START TRANSFORM_FEEDBACK_BUFFER_START}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_SIZE TRANSFORM_FEEDBACK_BUFFER_SIZE}
    - * @param index the transform feedback stream index - */ - @NativeType("void") - public static long glGetTransformFeedbacki64(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - return GL45C.glGetTransformFeedbacki64(xfb, pname, index); - } - - // --- [ glCreateBuffers ] --- - - /** - * Unsafe version of: {@link #glCreateBuffers CreateBuffers} - * - * @param n the number of buffer names to create - */ - public static void nglCreateBuffers(int n, long buffers) { - GL45C.nglCreateBuffers(n, buffers); - } - - /** - * Returns {@code n} previously unused buffer names in {@code buffers}, each representing a new buffer object initialized as if it had been bound to an - * unspecified target. - * - * @param buffers the buffer in which to return the names - */ - public static void glCreateBuffers(@NativeType("GLuint *") IntBuffer buffers) { - GL45C.glCreateBuffers(buffers); - } - - /** - * Returns {@code n} previously unused buffer names in {@code buffers}, each representing a new buffer object initialized as if it had been bound to an - * unspecified target. - */ - @NativeType("void") - public static int glCreateBuffers() { - return GL45C.glCreateBuffers(); - } - - // --- [ glNamedBufferStorage ] --- - - /** - * Unsafe version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @param size the size of the data store in basic machine units - */ - public static void nglNamedBufferStorage(int buffer, long size, long data, int flags) { - GL45C.nglNamedBufferStorage(buffer, size, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param size the size of the data store in basic machine units - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, size, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - // --- [ glNamedBufferData ] --- - - /** - * Unsafe version of: {@link #glNamedBufferData NamedBufferData} - * - * @param size the size in bytes of the buffer object's new data store - */ - public static void nglNamedBufferData(int buffer, long size, long data, int usage) { - GL45C.nglNamedBufferData(buffer, size, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param size the size in bytes of the buffer object's new data store - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, size, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") LongBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - // --- [ glNamedBufferSubData ] --- - - /** - * Unsafe version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @param size the size in bytes of the data store region being replaced - */ - public static void nglNamedBufferSubData(int buffer, long offset, long size, long data) { - GL45C.nglNamedBufferSubData(buffer, offset, size, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ByteBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ShortBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") IntBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") LongBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") FloatBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") DoubleBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - // --- [ glCopyNamedBufferSubData ] --- - - /** - * DSA version of {@link GL31C#glCopyBufferSubData CopyBufferSubData}. - * - * @param readBuffer the source buffer object name - * @param writeBuffer the destination buffer object name - * @param readOffset the source buffer object offset, in bytes - * @param writeOffset the destination buffer object offset, in bytes - * @param size the number of bytes to copy - */ - public static void glCopyNamedBufferSubData(@NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size) { - GL45C.glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); - } - - // --- [ glClearNamedBufferData ] --- - - /** Unsafe version of: {@link #glClearNamedBufferData ClearNamedBufferData} */ - public static void nglClearNamedBufferData(int buffer, int internalformat, int format, int type, long data) { - GL45C.nglClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - // --- [ glClearNamedBufferSubData ] --- - - /** Unsafe version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} */ - public static void nglClearNamedBufferSubData(int buffer, int internalformat, long offset, long size, int format, int type, long data) { - GL45C.nglClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - // --- [ glMapNamedBuffer ] --- - - /** Unsafe version of: {@link #glMapNamedBuffer MapNamedBuffer} */ - public static long nglMapNamedBuffer(int buffer, int access) { - return GL45C.nglMapNamedBuffer(buffer, access); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access) { - return GL45C.glMapNamedBuffer(buffer, access); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, @Nullable ByteBuffer old_buffer) { - return GL45C.glMapNamedBuffer(buffer, access, old_buffer); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, long length, @Nullable ByteBuffer old_buffer) { - return GL45C.glMapNamedBuffer(buffer, access, length, old_buffer); - } - - // --- [ glMapNamedBufferRange ] --- - - /** Unsafe version of: {@link #glMapNamedBufferRange MapNamedBufferRange} */ - public static long nglMapNamedBufferRange(int buffer, long offset, long length, int access) { - return GL45C.nglMapNamedBufferRange(buffer, offset, length, access); - } - - /** - * DSA version of {@link GL30C#glMapBufferRange MapBufferRange}. - * - * @param buffer the buffer object name - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access) { - return GL45C.glMapNamedBufferRange(buffer, offset, length, access); - } - - /** - * DSA version of {@link GL30C#glMapBufferRange MapBufferRange}. - * - * @param buffer the buffer object name - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access, @Nullable ByteBuffer old_buffer) { - return GL45C.glMapNamedBufferRange(buffer, offset, length, access, old_buffer); - } - - // --- [ glUnmapNamedBuffer ] --- - - /** - * DSA version of {@link GL15C#glUnmapBuffer UnmapBuffer}. - * - * @param buffer the buffer object name - */ - @NativeType("GLboolean") - public static boolean glUnmapNamedBuffer(@NativeType("GLuint") int buffer) { - return GL45C.glUnmapNamedBuffer(buffer); - } - - // --- [ glFlushMappedNamedBufferRange ] --- - - /** - * DSA version of {@link GL30C#glFlushMappedBufferRange FlushMappedBufferRange}. - * - * @param buffer the buffer object name - * @param offset the start of the buffer subrange, in basic machine units - * @param length the length of the buffer subrange, in basic machine units - */ - public static void glFlushMappedNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length) { - GL45C.glFlushMappedNamedBufferRange(buffer, offset, length); - } - - // --- [ glGetNamedBufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedBufferParameteriv GetNamedBufferParameteriv} */ - public static void nglGetNamedBufferParameteriv(int buffer, int pname, long params) { - GL45C.nglGetNamedBufferParameteriv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - */ - public static void glGetNamedBufferParameteriv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedBufferParameteriv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - */ - @NativeType("void") - public static int glGetNamedBufferParameteri(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedBufferParameteri(buffer, pname); - } - - // --- [ glGetNamedBufferParameteri64v ] --- - - /** Unsafe version of: {@link #glGetNamedBufferParameteri64v GetNamedBufferParameteri64v} */ - public static void nglGetNamedBufferParameteri64v(int buffer, int pname, long params) { - GL45C.nglGetNamedBufferParameteri64v(buffer, pname, params); - } - - /** - * DSA version of {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - */ - public static void glGetNamedBufferParameteri64v(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL45C.glGetNamedBufferParameteri64v(buffer, pname, params); - } - - /** - * DSA version of {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - */ - @NativeType("void") - public static long glGetNamedBufferParameteri64(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedBufferParameteri64(buffer, pname); - } - - // --- [ glGetNamedBufferPointerv ] --- - - /** Unsafe version of: {@link #glGetNamedBufferPointerv GetNamedBufferPointerv} */ - public static void nglGetNamedBufferPointerv(int buffer, int pname, long params) { - GL45C.nglGetNamedBufferPointerv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferPointerv GetBufferPointerv}. - * - * @param buffer the buffer object name - * @param pname the pointer to be returned. Must be:
    {@link GL15#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * @param params the pointer value specified by {@code pname} - */ - public static void glGetNamedBufferPointerv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - GL45C.glGetNamedBufferPointerv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferPointerv GetBufferPointerv}. - * - * @param buffer the buffer object name - * @param pname the pointer to be returned. Must be:
    {@link GL15#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - */ - @NativeType("void") - public static long glGetNamedBufferPointer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedBufferPointer(buffer, pname); - } - - // --- [ glGetNamedBufferSubData ] --- - - /** - * Unsafe version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @param size the size in bytes of the data store region being returned - */ - public static void nglGetNamedBufferSubData(int buffer, long offset, long size, long data) { - GL45C.nglGetNamedBufferSubData(buffer, offset, size, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ByteBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ShortBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") IntBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") LongBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") FloatBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") DoubleBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - // --- [ glCreateFramebuffers ] --- - - /** - * Unsafe version of: {@link #glCreateFramebuffers CreateFramebuffers} - * - * @param n the number of framebuffer names to create - */ - public static void nglCreateFramebuffers(int n, long framebuffers) { - GL45C.nglCreateFramebuffers(n, framebuffers); - } - - /** - * Returns {@code n} previously unused framebuffer names in {@code framebuffers}, each representing a new framebuffer object. - * - * @param framebuffers the buffer in which to store the framebuffer names - */ - public static void glCreateFramebuffers(@NativeType("GLuint *") IntBuffer framebuffers) { - GL45C.glCreateFramebuffers(framebuffers); - } - - /** Returns {@code n} previously unused framebuffer names in {@code framebuffers}, each representing a new framebuffer object. */ - @NativeType("void") - public static int glCreateFramebuffers() { - return GL45C.glCreateFramebuffers(); - } - - // --- [ glNamedFramebufferRenderbuffer ] --- - - /** - * DSA version of {@link GL30C#glFramebufferRenderbuffer FramebufferRenderbuffer}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param renderbuffertarget the renderbuffer target. Must be:
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of an existing renderbuffer object of type {@code renderbuffertarget} to attach - */ - public static void glNamedFramebufferRenderbuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer) { - GL45C.glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); - } - - // --- [ glNamedFramebufferParameteri ] --- - - /** - * DSA version of {@link GL43C#glFramebufferParameteri FramebufferParameteri}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be modified. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param param the new value for the parameter named {@code pname} - */ - public static void glNamedFramebufferParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL45C.glNamedFramebufferParameteri(framebuffer, pname, param); - } - - // --- [ glNamedFramebufferTexture ] --- - - /** - * DSA version of {@link GL32C#glFramebufferTexture FramebufferTexture}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - */ - public static void glNamedFramebufferTexture(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL45C.glNamedFramebufferTexture(framebuffer, attachment, texture, level); - } - - // --- [ glNamedFramebufferTextureLayer ] --- - - /** - * DSA version of {@link GL30C#glFramebufferTextureLayer FramebufferTextureLayer}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of {@code texture} to attach. - */ - public static void glNamedFramebufferTextureLayer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer) { - GL45C.glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); - } - - // --- [ glNamedFramebufferDrawBuffer ] --- - - /** - * DSA version of {@link GL11C#glDrawBuffer DrawBuffer}. - * - * @param framebuffer the framebuffer name - * @param buf the color buffer to draw to. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_LEFT LEFT}
    {@link GL11#GL_RIGHT RIGHT}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - */ - public static void glNamedFramebufferDrawBuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buf) { - GL45C.glNamedFramebufferDrawBuffer(framebuffer, buf); - } - - // --- [ glNamedFramebufferDrawBuffers ] --- - - /** - * Unsafe version of: {@link #glNamedFramebufferDrawBuffers NamedFramebufferDrawBuffers} - * - * @param n the number of buffers in {@code bufs} - */ - public static void nglNamedFramebufferDrawBuffers(int framebuffer, int n, long bufs) { - GL45C.nglNamedFramebufferDrawBuffers(framebuffer, n, bufs); - } - - /** - * DSA version of {@link GL20C#glDrawBuffers DrawBuffers}. - * - * @param framebuffer the framebuffer name - * @param bufs an array of symbolic constants specifying the buffers into which fragment colors or data values will be written. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}
    GL30.GL_COLOR_ATTACHMENT[1-15]
    - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer bufs) { - GL45C.glNamedFramebufferDrawBuffers(framebuffer, bufs); - } - - /** - * DSA version of {@link GL20C#glDrawBuffers DrawBuffers}. - * - * @param framebuffer the framebuffer name - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int buf) { - GL45C.glNamedFramebufferDrawBuffers(framebuffer, buf); - } - - // --- [ glNamedFramebufferReadBuffer ] --- - - /** - * DSA version of {@link GL11C#glReadBuffer ReadBuffer}. - * - * @param framebuffer the framebuffer name - * @param src the color buffer to read from. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_LEFT LEFT}
    {@link GL11#GL_RIGHT RIGHT}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - */ - public static void glNamedFramebufferReadBuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int src) { - GL45C.glNamedFramebufferReadBuffer(framebuffer, src); - } - - // --- [ glInvalidateNamedFramebufferData ] --- - - /** - * Unsafe version of: {@link #glInvalidateNamedFramebufferData InvalidateNamedFramebufferData} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateNamedFramebufferData(int framebuffer, int numAttachments, long attachments) { - GL45C.nglInvalidateNamedFramebufferData(framebuffer, numAttachments, attachments); - } - - /** - * DSA version of {@link GL43C#glInvalidateFramebuffer InvalidateFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param attachments the address of an array identifying the attachments to be invalidated - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer attachments) { - GL45C.glInvalidateNamedFramebufferData(framebuffer, attachments); - } - - /** - * DSA version of {@link GL43C#glInvalidateFramebuffer InvalidateFramebuffer}. - * - * @param framebuffer the framebuffer name - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int attachment) { - GL45C.glInvalidateNamedFramebufferData(framebuffer, attachment); - } - - // --- [ glInvalidateNamedFramebufferSubData ] --- - - /** - * Unsafe version of: {@link #glInvalidateNamedFramebufferSubData InvalidateNamedFramebufferSubData} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateNamedFramebufferSubData(int framebuffer, int numAttachments, long attachments, int x, int y, int width, int height) { - GL45C.nglInvalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x, y, width, height); - } - - /** - * DSA version of {@link GL43C#glInvalidateSubFramebuffer InvalidateSubFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param attachments an array identifying the attachments to be invalidated - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); - } - - /** - * DSA version of {@link GL43C#glInvalidateSubFramebuffer InvalidateSubFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int attachment, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glInvalidateNamedFramebufferSubData(framebuffer, attachment, x, y, width, height); - } - - // --- [ glClearNamedFramebufferiv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferiv ClearNamedFramebufferiv} */ - public static void nglClearNamedFramebufferiv(int framebuffer, int buffer, int drawbuffer, long value) { - GL45C.nglClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); - } - - /** - * DSA version of {@link GL30C#glClearBufferiv ClearBufferiv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_STENCIL STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For stencil buffers, a pointer to a - * single stencil value to clear the buffer to. - */ - public static void glClearNamedFramebufferiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - GL45C.glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); - } - - // --- [ glClearNamedFramebufferuiv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferuiv ClearNamedFramebufferuiv} */ - public static void nglClearNamedFramebufferuiv(int framebuffer, int buffer, int drawbuffer, long value) { - GL45C.nglClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); - } - - /** - * DSA version of {@link GL30C#glClearBufferuiv ClearBufferuiv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. Must be:
    {@link GL11#GL_COLOR COLOR}
    - * @param drawbuffer the draw buffer to clear - * @param value a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to - */ - public static void glClearNamedFramebufferuiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - GL45C.glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); - } - - // --- [ glClearNamedFramebufferfv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferfv ClearNamedFramebufferfv} */ - public static void nglClearNamedFramebufferfv(int framebuffer, int buffer, int drawbuffer, long value) { - GL45C.nglClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); - } - - /** - * DSA version of {@link GL30C#glClearBufferfv ClearBufferfv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_DEPTH DEPTH}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For depth buffers, a pointer to a - * single depth value to clear the buffer to. - */ - public static void glClearNamedFramebufferfv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") FloatBuffer value) { - GL45C.glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); - } - - // --- [ glClearNamedFramebufferfi ] --- - - /** - * DSA version of {@link GL30C#glClearBufferfi ClearBufferfi}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. Must be:
    {@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param depth the depth value to clear the buffer to - * @param stencil the stencil value to clear the buffer to - */ - public static void glClearNamedFramebufferfi(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat") float depth, @NativeType("GLint") int stencil) { - GL45C.glClearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil); - } - - // --- [ glBlitNamedFramebuffer ] --- - - /** - * DSA version of {@link GL30C#glBlitFramebuffer BlitFramebuffer}. - * - * @param readFramebuffer the source framebuffer name - * @param drawFramebuffer the destination framebuffer name - * @param srcX0 the lower-left coordinate of the source rectangle within the read buffer - * @param srcY0 the upper-left coordinate of the source rectangle within the read buffer - * @param srcX1 the lower-right coordinate of the source rectangle within the read buffer - * @param srcY1 the upper-right coordinate of the source rectangle within the read buffer - * @param dstX0 the lower-left coordinate of the destination rectangle within the write buffer - * @param dstY0 the upper-left coordinate of the destination rectangle within the write buffer - * @param dstX1 the lower-right coordinate of the destination rectangle within the write buffer - * @param dstY1 the upper-right coordinate of the destination rectangle within the write buffer - * @param mask the bitwise OR of the flags indicating which buffers are to be copied. One of:
    {@link GL11#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * @param filter the interpolation to be applied if the image is stretched. One of:
    {@link GL11#GL_NEAREST NEAREST}{@link GL11#GL_LINEAR LINEAR}
    - */ - public static void glBlitNamedFramebuffer(@NativeType("GLuint") int readFramebuffer, @NativeType("GLuint") int drawFramebuffer, @NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter) { - GL45C.glBlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); - } - - // --- [ glCheckNamedFramebufferStatus ] --- - - /** - * DSA version of {@link GL30C#glCheckFramebufferStatus CheckFramebufferStatus}. - * - * @param framebuffer the framebuffer name - * @param target the target of the framebuffer completeness check. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - */ - @NativeType("GLenum") - public static int glCheckNamedFramebufferStatus(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int target) { - return GL45C.glCheckNamedFramebufferStatus(framebuffer, target); - } - - // --- [ glGetNamedFramebufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedFramebufferParameteriv GetNamedFramebufferParameteriv} */ - public static void nglGetNamedFramebufferParameteriv(int framebuffer, int pname, long params) { - GL45C.nglGetNamedFramebufferParameteriv(framebuffer, pname, params); - } - - /** - * DSA version of {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param params a variable to receive the value of the parameter named {@code pname} - */ - public static void glGetNamedFramebufferParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedFramebufferParameteriv(framebuffer, pname, params); - } - - /** - * DSA version of {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - */ - @NativeType("void") - public static int glGetNamedFramebufferParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedFramebufferParameteri(framebuffer, pname); - } - - // --- [ glGetNamedFramebufferAttachmentParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedFramebufferAttachmentParameteriv GetNamedFramebufferAttachmentParameteriv} */ - public static void nglGetNamedFramebufferAttachmentParameteriv(int framebuffer, int attachment, int pname, long params) { - GL45C.nglGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment within {@code target}. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * @param params an array to receive the value of the queried parameter - */ - public static void glGetNamedFramebufferAttachmentParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment within {@code target}. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - */ - @NativeType("void") - public static int glGetNamedFramebufferAttachmentParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedFramebufferAttachmentParameteri(framebuffer, attachment, pname); - } - - // --- [ glCreateRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glCreateRenderbuffers CreateRenderbuffers} - * - * @param n the number of renderbuffer names to create - */ - public static void nglCreateRenderbuffers(int n, long renderbuffers) { - GL45C.nglCreateRenderbuffers(n, renderbuffers); - } - - /** - * Returns {@code n} previously unused renderbuffer names in {@code renderbuffers}, each representing a new renderbuffer object. - * - * @param renderbuffers the buffer in which to store the created renderbuffer names - */ - public static void glCreateRenderbuffers(@NativeType("GLuint *") IntBuffer renderbuffers) { - GL45C.glCreateRenderbuffers(renderbuffers); - } - - /** Returns {@code n} previously unused renderbuffer names in {@code renderbuffers}, each representing a new renderbuffer object. */ - @NativeType("void") - public static int glCreateRenderbuffers() { - return GL45C.glCreateRenderbuffers(); - } - - // --- [ glNamedRenderbufferStorage ] --- - - /** - * DSA version of {@link GL30C#glRenderbufferStorage RenderbufferStorage}. - * - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - */ - public static void glNamedRenderbufferStorage(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); - } - - // --- [ glNamedRenderbufferStorageMultisample ] --- - - /** - * DSA version of {@link GL30C#glRenderbufferStorageMultisample RenderbufferStorageMultisample}. - * - * @param samples the number of samples to be used for the renderbuffer object's storage - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - */ - public static void glNamedRenderbufferStorageMultisample(@NativeType("GLuint") int renderbuffer, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); - } - - // --- [ glGetNamedRenderbufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedRenderbufferParameteriv GetNamedRenderbufferParameteriv} */ - public static void nglGetNamedRenderbufferParameteriv(int renderbuffer, int pname, long params) { - GL45C.nglGetNamedRenderbufferParameteriv(renderbuffer, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetRenderbufferParameteriv GetRenderbufferParameteriv}. - * - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * @param params an array to receive the value of the queried parameter - */ - public static void glGetNamedRenderbufferParameteriv(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetRenderbufferParameteriv GetRenderbufferParameteriv}. - * - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - */ - @NativeType("void") - public static int glGetNamedRenderbufferParameteri(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedRenderbufferParameteri(renderbuffer, pname); - } - - // --- [ glCreateTextures ] --- - - /** - * Unsafe version of: {@link #glCreateTextures CreateTextures} - * - * @param n the number of texture names to create - */ - public static void nglCreateTextures(int target, int n, long textures) { - GL45C.nglCreateTextures(target, n, textures); - } - - /** - * Returns {@code n} previously unused texture names in {@code textures}, each representing a new texture object. - * - * @param target the texture target. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param textures the buffer in which to store the created texture names - */ - public static void glCreateTextures(@NativeType("GLenum") int target, @NativeType("GLuint *") IntBuffer textures) { - GL45C.glCreateTextures(target, textures); - } - - /** - * Returns {@code n} previously unused texture names in {@code textures}, each representing a new texture object. - * - * @param target the texture target. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - */ - @NativeType("void") - public static int glCreateTextures(@NativeType("GLenum") int target) { - return GL45C.glCreateTextures(target); - } - - // --- [ glTextureBuffer ] --- - - /** - * DSA version of {@link GL31C#glTexBuffer TexBuffer}. - * - * @param texture the texture name - * @param internalformat the sized internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - */ - public static void glTextureBuffer(@NativeType("GLuint") int texture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer) { - GL45C.glTextureBuffer(texture, internalformat, buffer); - } - - // --- [ glTextureBufferRange ] --- - - /** - * DSA version of {@link GL43C#glTexBufferRange TexBufferRange}. - * - * @param texture the texture name - * @param internalformat the internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * @param offset the offset of the start of the range of the buffer's data store to attach - * @param size the size of the range of the buffer's data store to attach - */ - public static void glTextureBufferRange(@NativeType("GLuint") int texture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL45C.glTextureBufferRange(texture, internalformat, buffer, offset, size); - } - - // --- [ glTextureStorage1D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage1D TexStorage1D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - */ - public static void glTextureStorage1D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width) { - GL45C.glTextureStorage1D(texture, levels, internalformat, width); - } - - // --- [ glTextureStorage2D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage2D TexStorage2D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - */ - public static void glTextureStorage2D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glTextureStorage2D(texture, levels, internalformat, width, height); - } - - // --- [ glTextureStorage3D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage3D TexStorage3D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - */ - public static void glTextureStorage3D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - GL45C.glTextureStorage3D(texture, levels, internalformat, width, height, depth); - } - - // --- [ glTextureStorage2DMultisample ] --- - - /** - * DSA version of {@link GL43C#glTexStorage2DMultisample TexStorage2DMultisample}. - * - * @param texture the texture name - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static void glTextureStorage2DMultisample(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL45C.glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); - } - - // --- [ glTextureStorage3DMultisample ] --- - - /** - * DSA version of {@link GL43C#glTexStorage3DMultisample TexStorage3DMultisample}. - * - * @param texture the texture name - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static void glTextureStorage3DMultisample(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL45C.glTextureStorage3DMultisample(texture, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - // --- [ glTextureSubImage1D ] --- - - /** Unsafe version of: {@link #glTextureSubImage1D TextureSubImage1D} */ - public static void nglTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, long pixels) { - GL45C.nglTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - // --- [ glTextureSubImage2D ] --- - - /** Unsafe version of: {@link #glTextureSubImage2D TextureSubImage2D} */ - public static void nglTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels) { - GL45C.nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - // --- [ glTextureSubImage3D ] --- - - /** Unsafe version of: {@link #glTextureSubImage3D TextureSubImage3D} */ - public static void nglTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels) { - GL45C.nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - // --- [ glCompressedTextureSubImage1D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage1D CompressedTextureSubImage1D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int imageSize, long data) { - GL45C.nglCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage1D CompressedTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL45C.glCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage1D CompressedTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - */ - public static void glCompressedTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL45C.glCompressedTextureSubImage1D(texture, level, xoffset, width, format, data); - } - - // --- [ glCompressedTextureSubImage2D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage2D CompressedTextureSubImage2D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data) { - GL45C.nglCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage2D CompressedTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL45C.glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage2D CompressedTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - */ - public static void glCompressedTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL45C.glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, data); - } - - // --- [ glCompressedTextureSubImage3D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage3D CompressedTextureSubImage3D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data) { - GL45C.nglCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage3D CompressedTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL45C.glCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage3D CompressedTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - */ - public static void glCompressedTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL45C.glCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, data); - } - - // --- [ glCopyTextureSubImage1D ] --- - - /** - * DSA version of {@link GL11C#glCopyTexSubImage1D CopyTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - */ - public static void glCopyTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width) { - GL45C.glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); - } - - // --- [ glCopyTextureSubImage2D ] --- - - /** - * DSA version of {@link GL11C#glCopyTexSubImage2D CopyTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param yoffset the lower texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - */ - public static void glCopyTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); - } - - // --- [ glCopyTextureSubImage3D ] --- - - /** - * DSA version of {@link GL12C#glCopyTexSubImage3D CopyTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the x coordinate of the texture subregion to update - * @param yoffset the y coordinate of the texture subregion to update - * @param zoffset the z coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - */ - public static void glCopyTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - // --- [ glTextureParameterf ] --- - - /** - * DSA version of {@link GL11C#glTexParameterf TexParameterf}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param param the parameter value - */ - public static void glTextureParameterf(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param) { - GL45C.glTextureParameterf(texture, pname, param); - } - - // --- [ glTextureParameterfv ] --- - - /** Unsafe version of: {@link #glTextureParameterfv TextureParameterfv} */ - public static void nglTextureParameterfv(int texture, int pname, long params) { - GL45C.nglTextureParameterfv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glTexParameterfv TexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param params the parameter value - */ - public static void glTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - GL45C.glTextureParameterfv(texture, pname, params); - } - - // --- [ glTextureParameteri ] --- - - /** - * DSA version of {@link GL11C#glTexParameteri TexParameteri}. - * - * @param texture the texture name - * @param pname the parameter to set. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    - * @param param the parameter value - */ - public static void glTextureParameteri(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL45C.glTextureParameteri(texture, pname, param); - } - - // --- [ glTextureParameterIiv ] --- - - /** Unsafe version of: {@link #glTextureParameterIiv TextureParameterIiv} */ - public static void nglTextureParameterIiv(int texture, int pname, long params) { - GL45C.nglTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIiv TexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - */ - public static void glTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL45C.glTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIiv TexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - */ - public static void glTextureParameterIi(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int param) { - GL45C.glTextureParameterIi(texture, pname, param); - } - - // --- [ glTextureParameterIuiv ] --- - - /** Unsafe version of: {@link #glTextureParameterIuiv TextureParameterIuiv} */ - public static void nglTextureParameterIuiv(int texture, int pname, long params) { - GL45C.nglTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIuiv TexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - */ - public static void glTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - GL45C.glTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIuiv TexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - */ - public static void glTextureParameterIui(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int param) { - GL45C.glTextureParameterIui(texture, pname, param); - } - - // --- [ glTextureParameteriv ] --- - - /** Unsafe version of: {@link #glTextureParameteriv TextureParameteriv} */ - public static void nglTextureParameteriv(int texture, int pname, long params) { - GL45C.nglTextureParameteriv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glTexParameteriv TexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param params the parameter value - */ - public static void glTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL45C.glTextureParameteriv(texture, pname, params); - } - - // --- [ glGenerateTextureMipmap ] --- - - /** - * DSA version of {@link GL30C#glGenerateMipmap GenerateMipmap}. - * - * @param texture the texture name - */ - public static void glGenerateTextureMipmap(@NativeType("GLuint") int texture) { - GL45C.glGenerateTextureMipmap(texture); - } - - // --- [ glBindTextureUnit ] --- - - /** - * Binds an existing texture object to the texture unit numbered {@code unit}. - * - *

    {@code texture} must be zero or the name of an existing texture object. When {@code texture} is the name of an existing texture object, that object is - * bound to the target, in the corresponding texture unit, that was specified when the object was created. When {@code texture} is zero, each of the targets - * enumerated at the beginning of this section is reset to its default texture for the corresponding texture image unit.

    - * - * @param unit the texture unit number - * @param texture the texture name - */ - public static void glBindTextureUnit(@NativeType("GLuint") int unit, @NativeType("GLuint") int texture) { - GL45C.glBindTextureUnit(unit, texture); - } - - // --- [ glGetTextureImage ] --- - - /** - * Unsafe version of: {@link #glGetTextureImage GetTextureImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetTextureImage(int texture, int level, int format, int type, int bufSize, long pixels) { - GL45C.nglGetTextureImage(texture, level, format, type, bufSize, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetTextureImage(texture, level, format, type, bufSize, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - // --- [ glGetCompressedTextureImage ] --- - - /** - * Unsafe version of: {@link #glGetCompressedTextureImage GetCompressedTextureImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetCompressedTextureImage(int texture, int level, int bufSize, long pixels) { - GL45C.nglGetCompressedTextureImage(texture, level, bufSize, pixels); - } - - /** - * DSA version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels a buffer in which to return the compressed texture image - */ - public static void glGetCompressedTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetCompressedTextureImage(texture, level, bufSize, pixels); - } - - /** - * DSA version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - */ - public static void glGetCompressedTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetCompressedTextureImage(texture, level, pixels); - } - - // --- [ glGetTextureLevelParameterfv ] --- - - /** Unsafe version of: {@link #glGetTextureLevelParameterfv GetTextureLevelParameterfv} */ - public static void nglGetTextureLevelParameterfv(int texture, int level, int pname, long params) { - GL45C.nglGetTextureLevelParameterfv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameterfv GetTexLevelParameterfv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - */ - public static void glGetTextureLevelParameterfv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL45C.glGetTextureLevelParameterfv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameterfv GetTexLevelParameterfv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query - */ - @NativeType("void") - public static float glGetTextureLevelParameterf(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureLevelParameterf(texture, level, pname); - } - - // --- [ glGetTextureLevelParameteriv ] --- - - /** Unsafe version of: {@link #glGetTextureLevelParameteriv GetTextureLevelParameteriv} */ - public static void nglGetTextureLevelParameteriv(int texture, int level, int pname, long params) { - GL45C.nglGetTextureLevelParameteriv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * @param params a scalar or buffer in which to place the returned data - */ - public static void glGetTextureLevelParameteriv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetTextureLevelParameteriv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - */ - @NativeType("void") - public static int glGetTextureLevelParameteri(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureLevelParameteri(texture, level, pname); - } - - // --- [ glGetTextureParameterfv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterfv GetTextureParameterfv} */ - public static void nglGetTextureParameterfv(int texture, int pname, long params) { - GL45C.nglGetTextureParameterfv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameterfv GetTexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - */ - public static void glGetTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL45C.glGetTextureParameterfv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameterfv GetTexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to query - */ - @NativeType("void") - public static float glGetTextureParameterf(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameterf(texture, pname); - } - - // --- [ glGetTextureParameterIiv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterIiv GetTextureParameterIiv} */ - public static void nglGetTextureParameterIiv(int texture, int pname, long params) { - GL45C.nglGetTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIiv GetTexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - */ - public static void glGetTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIiv GetTexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - */ - @NativeType("void") - public static int glGetTextureParameterIi(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameterIi(texture, pname); - } - - // --- [ glGetTextureParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterIuiv GetTextureParameterIuiv} */ - public static void nglGetTextureParameterIuiv(int texture, int pname, long params) { - GL45C.nglGetTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIuiv GetTexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - */ - public static void glGetTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - GL45C.glGetTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIuiv GetTexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - */ - @NativeType("void") - public static int glGetTextureParameterIui(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameterIui(texture, pname); - } - - // --- [ glGetTextureParameteriv ] --- - - /** Unsafe version of: {@link #glGetTextureParameteriv GetTextureParameteriv} */ - public static void nglGetTextureParameteriv(int texture, int pname, long params) { - GL45C.nglGetTextureParameteriv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameteriv GetTexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * @param params a scalar or buffer in which to place the returned data - */ - public static void glGetTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetTextureParameteriv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameteriv GetTexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - */ - @NativeType("void") - public static int glGetTextureParameteri(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameteri(texture, pname); - } - - // --- [ glCreateVertexArrays ] --- - - /** - * Unsafe version of: {@link #glCreateVertexArrays CreateVertexArrays} - * - * @param n the number of vertex array object names to create - */ - public static void nglCreateVertexArrays(int n, long arrays) { - GL45C.nglCreateVertexArrays(n, arrays); - } - - /** - * Returns {@code n} previously unused vertex array object names in {@code arrays}. - * - * @param arrays the buffer in which to return the created vertex array object names - */ - public static void glCreateVertexArrays(@NativeType("GLuint *") IntBuffer arrays) { - GL45C.glCreateVertexArrays(arrays); - } - - /** Returns {@code n} previously unused vertex array object names in {@code arrays}. */ - @NativeType("void") - public static int glCreateVertexArrays() { - return GL45C.glCreateVertexArrays(); - } - - // --- [ glDisableVertexArrayAttrib ] --- - - /** - * DSA version of {@link GL20C#glDisableVertexAttribArray DisableVertexAttribArray}. - * - * @param vaobj the vertex array object name - * @param index the index of the generic vertex attribute to be disabled - */ - public static void glDisableVertexArrayAttrib(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index) { - GL45C.glDisableVertexArrayAttrib(vaobj, index); - } - - // --- [ glEnableVertexArrayAttrib ] --- - - /** - * DSA version of {@link GL20C#glEnableVertexAttribArray EnableVertexAttribArray}. - * - * @param vaobj the vertex array object name - * @param index the index of the generic vertex attribute to be enabled - */ - public static void glEnableVertexArrayAttrib(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index) { - GL45C.glEnableVertexArrayAttrib(vaobj, index); - } - - // --- [ glVertexArrayElementBuffer ] --- - - /** - * Binds a buffer object to the element array buffer bind point of a vertex array object. - * - * @param vaobj the vertex array object name - * @param buffer the buffer object name. If {@code buffer} is zero, any existing element array buffer binding to {@code vaobj} is removed. - */ - public static void glVertexArrayElementBuffer(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer) { - GL45C.glVertexArrayElementBuffer(vaobj, buffer); - } - - // --- [ glVertexArrayVertexBuffer ] --- - - /** - * DSA version of {@link GL43C#glBindVertexBuffer BindVertexBuffer}. - * - * @param vaobj the vertex array object name - * @param bindingindex the index of the vertex buffer binding point to which to bind the buffer - * @param buffer the name of an existing buffer to bind to the vertex buffer binding point - * @param offset the offset of the first element of the buffer - * @param stride the distance between elements within the buffer - */ - public static void glVertexArrayVertexBuffer(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizei") int stride) { - GL45C.glVertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride); - } - - // --- [ glVertexArrayVertexBuffers ] --- - - /** - * Unsafe version of: {@link #glVertexArrayVertexBuffers VertexArrayVertexBuffers} - * - * @param count the number of vertex buffer binding points - */ - public static void nglVertexArrayVertexBuffers(int vaobj, int first, int count, long buffers, long offsets, long strides) { - GL45C.nglVertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, strides); - } - - /** - * DSA version of {@link GL44C#glBindVertexBuffers BindVertexBuffers}. - * - * @param vaobj the vertex array object name - * @param first the first vertex buffer binding point - * @param buffers an array of zeros or names of existing buffers objects - * @param offsets an array of offses - * @param strides an array of stride values - */ - public static void glVertexArrayVertexBuffers(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") IntBuffer strides) { - GL45C.glVertexArrayVertexBuffers(vaobj, first, buffers, offsets, strides); - } - - // --- [ glVertexArrayAttribFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribFormat VertexAttribFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param normalized if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is - * directly converted to floating point. - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static void glVertexArrayAttribFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int relativeoffset) { - GL45C.glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); - } - - // --- [ glVertexArrayAttribIFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribIFormat VertexAttribIFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static void glVertexArrayAttribIFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL45C.glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); - } - - // --- [ glVertexArrayAttribLFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribLFormat VertexAttribLFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static void glVertexArrayAttribLFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL45C.glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); - } - - // --- [ glVertexArrayAttribBinding ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribBinding VertexAttribBinding}. - * - * @param vaobj the vertex array object name - * @param attribindex the index of the attribute to associate with a vertex buffer binding - * @param bindingindex the index of the vertex buffer binding with which to associate the generic vertex attribute - */ - public static void glVertexArrayAttribBinding(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLuint") int bindingindex) { - GL45C.glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); - } - - // --- [ glVertexArrayBindingDivisor ] --- - - /** - * DSA version of {@link GL43C#glVertexBindingDivisor VertexBindingDivisor}. - * - * @param vaobj the vertex array object name - * @param bindingindex the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - */ - public static void glVertexArrayBindingDivisor(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int divisor) { - GL45C.glVertexArrayBindingDivisor(vaobj, bindingindex, divisor); - } - - // --- [ glGetVertexArrayiv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayiv GetVertexArrayiv} */ - public static void nglGetVertexArrayiv(int vaobj, int pname, long param) { - GL45C.nglGetVertexArrayiv(vaobj, pname, param); - } - - /** - * Queries parameters of a vertex array object. - * - * @param vaobj the vertex array object name - * @param pname the parameter to query. Must be:
    {@link GL15#GL_ELEMENT_ARRAY_BUFFER_BINDING ELEMENT_ARRAY_BUFFER_BINDING}
    - * @param param the buffer in which to return the parameter values - */ - public static void glGetVertexArrayiv(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetVertexArrayiv(vaobj, pname, param); - } - - /** - * Queries parameters of a vertex array object. - * - * @param vaobj the vertex array object name - * @param pname the parameter to query. Must be:
    {@link GL15#GL_ELEMENT_ARRAY_BUFFER_BINDING ELEMENT_ARRAY_BUFFER_BINDING}
    - */ - @NativeType("void") - public static int glGetVertexArrayi(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname) { - return GL45C.glGetVertexArrayi(vaobj, pname); - } - - // --- [ glGetVertexArrayIndexediv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayIndexediv GetVertexArrayIndexediv} */ - public static void nglGetVertexArrayIndexediv(int vaobj, int index, int pname, long param) { - GL45C.nglGetVertexArrayIndexediv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. One of:
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE},
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}{@link GL43#GL_VERTEX_ATTRIB_ARRAY_LONG VERTEX_ATTRIB_ARRAY_LONG}
    {@link GL43#GL_VERTEX_ATTRIB_RELATIVE_OFFSET VERTEX_ATTRIB_RELATIVE_OFFSET}
    - * @param param the buffer in which to return the parameter values - */ - public static void glGetVertexArrayIndexediv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetVertexArrayIndexediv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. One of:
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE},
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}{@link GL43#GL_VERTEX_ATTRIB_ARRAY_LONG VERTEX_ATTRIB_ARRAY_LONG}
    {@link GL43#GL_VERTEX_ATTRIB_RELATIVE_OFFSET VERTEX_ATTRIB_RELATIVE_OFFSET}
    - */ - @NativeType("void") - public static int glGetVertexArrayIndexedi(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL45C.glGetVertexArrayIndexedi(vaobj, index, pname); - } - - // --- [ glGetVertexArrayIndexed64iv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayIndexed64iv GetVertexArrayIndexed64iv} */ - public static void nglGetVertexArrayIndexed64iv(int vaobj, int index, int pname, long param) { - GL45C.nglGetVertexArrayIndexed64iv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. Must be:
    {@link GL43#GL_VERTEX_BINDING_OFFSET VERTEX_BINDING_OFFSET}
    - * @param param the buffer in which to return the parameter values - */ - public static void glGetVertexArrayIndexed64iv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer param) { - GL45C.glGetVertexArrayIndexed64iv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. Must be:
    {@link GL43#GL_VERTEX_BINDING_OFFSET VERTEX_BINDING_OFFSET}
    - */ - @NativeType("void") - public static long glGetVertexArrayIndexed64i(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL45C.glGetVertexArrayIndexed64i(vaobj, index, pname); - } - - // --- [ glCreateSamplers ] --- - - /** - * Unsafe version of: {@link #glCreateSamplers CreateSamplers} - * - * @param n the number of sampler object names to create - */ - public static void nglCreateSamplers(int n, long samplers) { - GL45C.nglCreateSamplers(n, samplers); - } - - /** - * Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object. - * - * @param samplers the buffer in which to return the created sampler object names - */ - public static void glCreateSamplers(@NativeType("GLuint *") IntBuffer samplers) { - GL45C.glCreateSamplers(samplers); - } - - /** Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object. */ - @NativeType("void") - public static int glCreateSamplers() { - return GL45C.glCreateSamplers(); - } - - // --- [ glCreateProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glCreateProgramPipelines CreateProgramPipelines} - * - * @param n the number of program pipeline names to create - */ - public static void nglCreateProgramPipelines(int n, long pipelines) { - GL45C.nglCreateProgramPipelines(n, pipelines); - } - - /** - * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object. - * - * @param pipelines the buffer in which to return the created program pipeline names - */ - public static void glCreateProgramPipelines(@NativeType("GLuint *") IntBuffer pipelines) { - GL45C.glCreateProgramPipelines(pipelines); - } - - /** Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object. */ - @NativeType("void") - public static int glCreateProgramPipelines() { - return GL45C.glCreateProgramPipelines(); - } - - // --- [ glCreateQueries ] --- - - /** - * Unsafe version of: {@link #glCreateQueries CreateQueries} - * - * @param n the number of query object names to create - */ - public static void nglCreateQueries(int target, int n, long ids) { - GL45C.nglCreateQueries(target, n, ids); - } - - /** - * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}. - * - * @param target the query target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param ids the buffer in which to return the created query object names - */ - public static void glCreateQueries(@NativeType("GLenum") int target, @NativeType("GLuint *") IntBuffer ids) { - GL45C.glCreateQueries(target, ids); - } - - /** - * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}. - * - * @param target the query target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - */ - @NativeType("void") - public static int glCreateQueries(@NativeType("GLenum") int target) { - return GL45C.glCreateQueries(target); - } - - // --- [ glGetQueryBufferObjecti64v ] --- - - /** - * 64bit version of {@link #glGetQueryBufferObjectiv GetQueryBufferObjectiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - */ - public static void glGetQueryBufferObjecti64v(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjecti64v(id, buffer, pname, offset); - } - - // --- [ glGetQueryBufferObjectiv ] --- - - /** - * Queries the state of a query object. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - */ - public static void glGetQueryBufferObjectiv(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjectiv(id, buffer, pname, offset); - } - - // --- [ glGetQueryBufferObjectui64v ] --- - - /** - * 64bit version of {@link #glGetQueryBufferObjectuiv GetQueryBufferObjectuiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - */ - public static void glGetQueryBufferObjectui64v(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjectui64v(id, buffer, pname, offset); - } - - // --- [ glGetQueryBufferObjectuiv ] --- - - /** - * Unsigned version of {@link #glGetQueryBufferObjectiv GetQueryBufferObjectiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - */ - public static void glGetQueryBufferObjectuiv(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjectuiv(id, buffer, pname, offset); - } - - /** Array version of: {@link #glCreateTransformFeedbacks CreateTransformFeedbacks} */ - public static void glCreateTransformFeedbacks(@NativeType("GLuint *") int[] ids) { - GL45C.glCreateTransformFeedbacks(ids); - } - - /** Array version of: {@link #glGetTransformFeedbackiv GetTransformFeedbackiv} */ - public static void glGetTransformFeedbackiv(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - GL45C.glGetTransformFeedbackiv(xfb, pname, param); - } - - /** Array version of: {@link #glGetTransformFeedbacki_v GetTransformFeedbacki_v} */ - public static void glGetTransformFeedbacki_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint *") int[] param) { - GL45C.glGetTransformFeedbacki_v(xfb, pname, index, param); - } - - /** Array version of: {@link #glGetTransformFeedbacki64_v GetTransformFeedbacki64_v} */ - public static void glGetTransformFeedbacki64_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") long[] param) { - GL45C.glGetTransformFeedbacki64_v(xfb, pname, index, param); - } - - /** Array version of: {@link #glCreateBuffers CreateBuffers} */ - public static void glCreateBuffers(@NativeType("GLuint *") int[] buffers) { - GL45C.glCreateBuffers(buffers); - } - - /** Array version of: {@link #glNamedBufferStorage NamedBufferStorage} */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** Array version of: {@link #glNamedBufferStorage NamedBufferStorage} */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** Array version of: {@link #glNamedBufferStorage NamedBufferStorage} */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** Array version of: {@link #glNamedBufferStorage NamedBufferStorage} */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** Array version of: {@link #glNamedBufferData NamedBufferData} */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** Array version of: {@link #glNamedBufferData NamedBufferData} */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** Array version of: {@link #glNamedBufferData NamedBufferData} */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") long[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** Array version of: {@link #glNamedBufferData NamedBufferData} */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** Array version of: {@link #glNamedBufferData NamedBufferData} */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** Array version of: {@link #glNamedBufferSubData NamedBufferSubData} */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") short[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glNamedBufferSubData NamedBufferSubData} */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") int[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glNamedBufferSubData NamedBufferSubData} */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") long[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glNamedBufferSubData NamedBufferSubData} */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") float[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glNamedBufferSubData NamedBufferSubData} */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") double[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** Array version of: {@link #glGetNamedBufferParameteriv GetNamedBufferParameteriv} */ - public static void glGetNamedBufferParameteriv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedBufferParameteriv(buffer, pname, params); - } - - /** Array version of: {@link #glGetNamedBufferParameteri64v GetNamedBufferParameteri64v} */ - public static void glGetNamedBufferParameteri64v(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL45C.glGetNamedBufferParameteri64v(buffer, pname, params); - } - - /** Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") short[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") int[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") long[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") float[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") double[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** Array version of: {@link #glCreateFramebuffers CreateFramebuffers} */ - public static void glCreateFramebuffers(@NativeType("GLuint *") int[] framebuffers) { - GL45C.glCreateFramebuffers(framebuffers); - } - - /** Array version of: {@link #glNamedFramebufferDrawBuffers NamedFramebufferDrawBuffers} */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] bufs) { - GL45C.glNamedFramebufferDrawBuffers(framebuffer, bufs); - } - - /** Array version of: {@link #glInvalidateNamedFramebufferData InvalidateNamedFramebufferData} */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] attachments) { - GL45C.glInvalidateNamedFramebufferData(framebuffer, attachments); - } - - /** Array version of: {@link #glInvalidateNamedFramebufferSubData InvalidateNamedFramebufferSubData} */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); - } - - /** Array version of: {@link #glClearNamedFramebufferiv ClearNamedFramebufferiv} */ - public static void glClearNamedFramebufferiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - GL45C.glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); - } - - /** Array version of: {@link #glClearNamedFramebufferuiv ClearNamedFramebufferuiv} */ - public static void glClearNamedFramebufferuiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - GL45C.glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); - } - - /** Array version of: {@link #glClearNamedFramebufferfv ClearNamedFramebufferfv} */ - public static void glClearNamedFramebufferfv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") float[] value) { - GL45C.glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); - } - - /** Array version of: {@link #glGetNamedFramebufferParameteriv GetNamedFramebufferParameteriv} */ - public static void glGetNamedFramebufferParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedFramebufferParameteriv(framebuffer, pname, params); - } - - /** Array version of: {@link #glGetNamedFramebufferAttachmentParameteriv GetNamedFramebufferAttachmentParameteriv} */ - public static void glGetNamedFramebufferAttachmentParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } - - /** Array version of: {@link #glCreateRenderbuffers CreateRenderbuffers} */ - public static void glCreateRenderbuffers(@NativeType("GLuint *") int[] renderbuffers) { - GL45C.glCreateRenderbuffers(renderbuffers); - } - - /** Array version of: {@link #glGetNamedRenderbufferParameteriv GetNamedRenderbufferParameteriv} */ - public static void glGetNamedRenderbufferParameteriv(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); - } - - /** Array version of: {@link #glCreateTextures CreateTextures} */ - public static void glCreateTextures(@NativeType("GLenum") int target, @NativeType("GLuint *") int[] textures) { - GL45C.glCreateTextures(target, textures); - } - - /** Array version of: {@link #glTextureSubImage1D TextureSubImage1D} */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage1D TextureSubImage1D} */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage1D TextureSubImage1D} */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage1D TextureSubImage1D} */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage2D TextureSubImage2D} */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage2D TextureSubImage2D} */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage2D TextureSubImage2D} */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage2D TextureSubImage2D} */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage3D TextureSubImage3D} */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage3D TextureSubImage3D} */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage3D TextureSubImage3D} */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glTextureSubImage3D TextureSubImage3D} */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glTextureParameterfv TextureParameterfv} */ - public static void glTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - GL45C.glTextureParameterfv(texture, pname, params); - } - - /** Array version of: {@link #glTextureParameterIiv TextureParameterIiv} */ - public static void glTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL45C.glTextureParameterIiv(texture, pname, params); - } - - /** Array version of: {@link #glTextureParameterIuiv TextureParameterIuiv} */ - public static void glTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - GL45C.glTextureParameterIuiv(texture, pname, params); - } - - /** Array version of: {@link #glTextureParameteriv TextureParameteriv} */ - public static void glTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL45C.glTextureParameteriv(texture, pname, params); - } - - /** Array version of: {@link #glGetTextureImage GetTextureImage} */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** Array version of: {@link #glGetTextureImage GetTextureImage} */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** Array version of: {@link #glGetTextureImage GetTextureImage} */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** Array version of: {@link #glGetTextureImage GetTextureImage} */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** Array version of: {@link #glGetTextureLevelParameterfv GetTextureLevelParameterfv} */ - public static void glGetTextureLevelParameterfv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL45C.glGetTextureLevelParameterfv(texture, level, pname, params); - } - - /** Array version of: {@link #glGetTextureLevelParameteriv GetTextureLevelParameteriv} */ - public static void glGetTextureLevelParameteriv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetTextureLevelParameteriv(texture, level, pname, params); - } - - /** Array version of: {@link #glGetTextureParameterfv GetTextureParameterfv} */ - public static void glGetTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL45C.glGetTextureParameterfv(texture, pname, params); - } - - /** Array version of: {@link #glGetTextureParameterIiv GetTextureParameterIiv} */ - public static void glGetTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetTextureParameterIiv(texture, pname, params); - } - - /** Array version of: {@link #glGetTextureParameterIuiv GetTextureParameterIuiv} */ - public static void glGetTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - GL45C.glGetTextureParameterIuiv(texture, pname, params); - } - - /** Array version of: {@link #glGetTextureParameteriv GetTextureParameteriv} */ - public static void glGetTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetTextureParameteriv(texture, pname, params); - } - - /** Array version of: {@link #glCreateVertexArrays CreateVertexArrays} */ - public static void glCreateVertexArrays(@NativeType("GLuint *") int[] arrays) { - GL45C.glCreateVertexArrays(arrays); - } - - /** Array version of: {@link #glVertexArrayVertexBuffers VertexArrayVertexBuffers} */ - public static void glVertexArrayVertexBuffers(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") int[] strides) { - GL45C.glVertexArrayVertexBuffers(vaobj, first, buffers, offsets, strides); - } - - /** Array version of: {@link #glGetVertexArrayiv GetVertexArrayiv} */ - public static void glGetVertexArrayiv(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - GL45C.glGetVertexArrayiv(vaobj, pname, param); - } - - /** Array version of: {@link #glGetVertexArrayIndexediv GetVertexArrayIndexediv} */ - public static void glGetVertexArrayIndexediv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - GL45C.glGetVertexArrayIndexediv(vaobj, index, pname, param); - } - - /** Array version of: {@link #glGetVertexArrayIndexed64iv GetVertexArrayIndexed64iv} */ - public static void glGetVertexArrayIndexed64iv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] param) { - GL45C.glGetVertexArrayIndexed64iv(vaobj, index, pname, param); - } - - /** Array version of: {@link #glCreateSamplers CreateSamplers} */ - public static void glCreateSamplers(@NativeType("GLuint *") int[] samplers) { - GL45C.glCreateSamplers(samplers); - } - - /** Array version of: {@link #glCreateProgramPipelines CreateProgramPipelines} */ - public static void glCreateProgramPipelines(@NativeType("GLuint *") int[] pipelines) { - GL45C.glCreateProgramPipelines(pipelines); - } - - /** Array version of: {@link #glCreateQueries CreateQueries} */ - public static void glCreateQueries(@NativeType("GLenum") int target, @NativeType("GLuint *") int[] ids) { - GL45C.glCreateQueries(target, ids); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawBuffers.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawBuffers.java deleted file mode 100644 index bd98b39f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawBuffers.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_draw_buffers extension. - * - *

    This extension extends {@link ARBFragmentProgram ARB_fragment_program} and {@link ARBFragmentShader ARB_fragment_shader} to allow multiple output colors, and provides a mechanism for - * directing those outputs to multiple color buffers.

    - * - *

    Requires {@link GL13 OpenGL 1.3}. Promoted to core in {@link GL20 OpenGL 2.0}.

    - */ -public class ARBDrawBuffers { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_DRAW_BUFFERS_ARB = 0x8824, - GL_DRAW_BUFFER0_ARB = 0x8825, - GL_DRAW_BUFFER1_ARB = 0x8826, - GL_DRAW_BUFFER2_ARB = 0x8827, - GL_DRAW_BUFFER3_ARB = 0x8828, - GL_DRAW_BUFFER4_ARB = 0x8829, - GL_DRAW_BUFFER5_ARB = 0x882A, - GL_DRAW_BUFFER6_ARB = 0x882B, - GL_DRAW_BUFFER7_ARB = 0x882C, - GL_DRAW_BUFFER8_ARB = 0x882D, - GL_DRAW_BUFFER9_ARB = 0x882E, - GL_DRAW_BUFFER10_ARB = 0x882F, - GL_DRAW_BUFFER11_ARB = 0x8830, - GL_DRAW_BUFFER12_ARB = 0x8831, - GL_DRAW_BUFFER13_ARB = 0x8832, - GL_DRAW_BUFFER14_ARB = 0x8833, - GL_DRAW_BUFFER15_ARB = 0x8834; - - protected ARBDrawBuffers() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawBuffersARB ] --- - - /** - * Unsafe version of: {@link #glDrawBuffersARB DrawBuffersARB} - * - * @param n the number of buffers in {@code bufs} - */ - public static native void nglDrawBuffersARB(int n, long bufs); - - /** - * Defines the draw buffers to which all output colors are written. - * - * @param bufs a buffer of symbolic constants specifying the buffer to which each output color is written. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL11#GL_AUX0 AUX0}{@link GL11#GL_AUX1 AUX1}{@link GL11#GL_AUX2 AUX2}
    {@link GL11#GL_AUX3 AUX3}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - */ - public static void glDrawBuffersARB(@NativeType("GLenum const *") IntBuffer bufs) { - nglDrawBuffersARB(bufs.remaining(), memAddress(bufs)); - } - - /** Array version of: {@link #glDrawBuffersARB DrawBuffersARB} */ - public static void glDrawBuffersARB(@NativeType("GLenum const *") int[] bufs) { - long __functionAddress = GL.getICD().glDrawBuffersARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(bufs.length, bufs, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawBuffersBlend.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawBuffersBlend.java deleted file mode 100644 index bdceb8b3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawBuffersBlend.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_draw_buffers_blend extension. - * - *

    This extension builds upon the {@link ARBDrawBuffers ARB_draw_buffers} and {@link EXTDrawBuffers2 EXT_draw_buffers2} extensions. In ARB_draw_buffers (part of OpenGL 2.0), separate - * values could be written to each color buffer. This was further enhanced by EXT_draw_buffers2 by adding in the ability to enable blending and to set - * color write masks independently per color output.

    - * - *

    This extension provides the ability to set individual blend equations and blend functions for each color output.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link EXTDrawBuffers2 EXT_draw_buffers2}. Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public class ARBDrawBuffersBlend { - - static { GL.initialize(); } - - protected ARBDrawBuffersBlend() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendEquationiARB ] --- - - /** - * Provides a way to enable blending and set color write masks independently per color output. - * - *

    This call modifies the blend equations associated with an individual draw buffer.

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if the {@code buf} parameter is outside the range [0, {@link GL20#GL_MAX_DRAW_BUFFERS MAX_DRAW_BUFFERS} – 1].

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if {@code mode} is not one of {@link GL14#GL_FUNC_ADD FUNC_ADD}, {@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}, - * {@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}, {@link GL14#GL_MAX MAX}, or {@link GL14#GL_MIN MIN}.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if this method is executed between the execution of {@link GL11#glBegin Begin} and the corresponding execution - * of {@link GL11#glEnd End}.

    - * - * @param buf an integer that indicates the {@link GL11#GL_DRAW_BUFFER DRAW_BUFFER} to modify. - * @param mode determines both the RGB and alpha blend equations. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - */ - public static native void glBlendEquationiARB(@NativeType("GLuint") int buf, @NativeType("GLenum") int mode); - - // --- [ glBlendEquationSeparateiARB ] --- - - /** - * Provides a way to enable blending and set color write masks independently per color output. - * - *

    This call modifies the blend equations associated with an individual draw buffer.

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if the {@code buf} parameter is outside the range [0, {@link GL20#GL_MAX_DRAW_BUFFERS MAX_DRAW_BUFFERS} – 1].

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if either {@code modeRGB} or {@code modeAlpha} are not one of {@link GL14#GL_FUNC_ADD FUNC_ADD}, - * {@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}, {@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}, {@link GL14#GL_MAX MAX}, or {@link GL14#GL_MIN MIN}.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if this method is executed between the execution of {@link GL11#glBegin Begin} and the corresponding execution - * of {@link GL11#glEnd End}.

    - * - * @param buf an integer that indicates the {@link GL11#GL_DRAW_BUFFER DRAW_BUFFER} to modify. - * @param modeRGB the RGB blend equation. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * @param modeAlpha the alpha blend equation. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - */ - public static native void glBlendEquationSeparateiARB(@NativeType("GLuint") int buf, @NativeType("GLenum") int modeRGB, @NativeType("GLenum") int modeAlpha); - - // --- [ glBlendFunciARB ] --- - - /** - * Provides a way to enable blending and set color write masks independently per color output. - * - *

    This call modifies the blend functions associated with an individual draw buffer.

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if the {@code buf} parameter is outside the range [0, {@link GL20#GL_MAX_DRAW_BUFFERS MAX_DRAW_BUFFERS} – 1].

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if either {@code src}, or {@code dst} is not an accepted value.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if this method is executed between the execution of {@link GL11#glBegin Begin} and the corresponding execution - * of {@link GL11#glEnd End}.

    - * - * @param buf an integer that indicates the {@link GL11#GL_DRAW_BUFFER DRAW_BUFFER} to modify. - * @param src determines both RGB and alpha source functions - * @param dst determines both RGB and alpha destination functions - */ - public static native void glBlendFunciARB(@NativeType("GLuint") int buf, @NativeType("GLenum") int src, @NativeType("GLenum") int dst); - - // --- [ glBlendFuncSeparateiARB ] --- - - /** - * Provides a way to enable blending and set color write masks independently per color output. - * - *

    This call modifies the blend functions associated with an individual draw buffer.

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if the {@code buf} parameter is outside the range [0, {@link GL20#GL_MAX_DRAW_BUFFERS MAX_DRAW_BUFFERS} – 1].

    - * - *

    The error {@link GL11#GL_INVALID_ENUM INVALID_ENUM} is generated if either {@code srcRGB}, {@code dstRGB}, {@code srcAlpha}, or {@code dstAlpha} is not an accepted value.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if this method is executed between the execution of {@link GL11#glBegin Begin} and the corresponding execution - * of {@link GL11#glEnd End}.

    - * - * @param buf an integer that indicates the {@link GL11#GL_DRAW_BUFFER DRAW_BUFFER} to modify. - * @param srcRGB the source RGB blend function - * @param dstRGB the destination RGB blend function - * @param srcAlpha the source alpha blend function - * @param dstAlpha the destination alpha blend function - */ - public static native void glBlendFuncSeparateiARB(@NativeType("GLuint") int buf, @NativeType("GLenum") int srcRGB, @NativeType("GLenum") int dstRGB, @NativeType("GLenum") int srcAlpha, @NativeType("GLenum") int dstAlpha); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java deleted file mode 100644 index 175c13cf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_draw_elements_base_vertex extension. - * - *

    This extension provides a method to specify a "base vertex offset" value which is effectively added to every vertex index that is transferred through - * {@link GL11C#glDrawElements DrawElements}.

    - * - *

    This mechanism can be used to decouple a set of indices from the actual vertex array that it is referencing. This is useful if an application stores - * multiple indexed models in a single vertex array. The same index array can be used to draw the model no matter where it ends up in a larger vertex array - * simply by changing the base vertex value. Without this functionality, it would be necessary to rebind all the vertex attributes every time geometry is - * switched and this can have larger performance penalty.

    - * - *

    For example consider the (very contrived and simple) example of drawing two triangles to form a quad. In the typical example you have the following - * setup:

    - * - *
    
    - *     vertices         indices
    - *    ----------        -----
    - * 0 | (-1,  1) |    0 |  0  |
    - * 1 | (-1, -1) |    1 |  1  |
    - * 2 | ( 1, -1) |    2 |  2  |
    - * 3 | ( 1,  1) |    3 |  3  |
    - *    ----------     4 |  0  |
    - *                   5 |  2  |
    - *                      -----
    - * - *

    which is normally rendered with the call

    - * - *
    
    - * DrawElements(TRIANGLES, 6, UNSIGNED_BYTE, &indices).
    - * - *

    Now consider the case where the vertices you want to draw are not at the start of a vertex array but are instead located at offset 100 into a larger - * array:

    - * - *
    
    - *      vertices2         indices2
    - *      ----------        -----
    - *         ....        0 | 100 |
    - * 100 | (-1,  1) |    1 | 101 |
    - * 101 | (-1, -1) |    2 | 102 |
    - * 102 | ( 1, -1) |    3 | 103 |
    - * 103 | ( 1,  1) |    4 | 100 |
    - *         ....        5 | 102 |
    - *      ----------        -----
    - * - *

    The typical choices for rendering this are to rebind your vertex attributes with an additional offset of 100*stride, or to create an new array of - * indices (as indices2 in the example). However both rebinding vertex attributes and rebuilding index arrays can be quite costly activities.

    - * - *

    With the new drawing commands introduced by this extension you can instead draw using vertices2 and the new draw call:

    - * - *
    
    - * DrawElementsBaseVertex(TRIANGLES, 6, UNSIGNED_BYTE, &indices, 100)
    - * - *

    Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public class ARBDrawElementsBaseVertex { - - static { GL.initialize(); } - - protected ARBDrawElementsBaseVertex() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawElementsBaseVertex DrawElementsBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsBaseVertex(int mode, int count, int type, long indices, int basevertex) { - GL32C.nglDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - // --- [ glDrawRangeElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawRangeElementsBaseVertex DrawRangeElementsBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawRangeElementsBaseVertex(int mode, int start, int end, int count, int type, long indices, int basevertex) { - GL32C.nglDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ShortBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") IntBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - // --- [ glDrawElementsInstancedBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseVertex DrawElementsInstancedBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsInstancedBaseVertex(int mode, int count, int type, long indices, int primcount, int basevertex) { - GL32C.nglDrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, type, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - // --- [ glMultiDrawElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glMultiDrawElementsBaseVertex MultiDrawElementsBaseVertex} - * - * @param drawcount the size of the {@code count} array - */ - public static void nglMultiDrawElementsBaseVertex(int mode, long count, int type, long indices, int drawcount, long basevertex) { - GL32C.nglMultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex); - } - - /** - * Renders multiple sets of primitives by specifying indices of array data elements and an offset to apply to each index. - * - *

    LWJGL note: Use {@link org.lwjgl.system.MemoryUtil#memAddress} to retrieve pointers to the index buffers.

    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count an array of the elements counts - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a pointer to the location where the base vertices are stored - */ - public static void glMultiDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei const *") IntBuffer count, @NativeType("GLenum") int type, @NativeType("void const * const *") PointerBuffer indices, @NativeType("GLint *") IntBuffer basevertex) { - GL32C.glMultiDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - /** Array version of: {@link #glMultiDrawElementsBaseVertex MultiDrawElementsBaseVertex} */ - public static void glMultiDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei const *") int[] count, @NativeType("GLenum") int type, @NativeType("void const * const *") PointerBuffer indices, @NativeType("GLint *") int[] basevertex) { - GL32C.glMultiDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawIndirect.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawIndirect.java deleted file mode 100644 index 0a3f78cd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawIndirect.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_draw_indirect extension. - * - *

    This extension provides a mechanism for supplying the arguments to a - * DrawArraysInstanced or DrawElementsInstancedBaseVertex from buffer object - * memory. This is not particularly useful for applications where the CPU - * knows the values of the arguments beforehand, but is helpful when the - * values will be generated on the GPU through any mechanism that can write - * to a buffer object including image stores, atomic counters, or compute - * interop. This allows the GPU to consume these arguments without a round- - * trip to the CPU or the expensive synchronization that would involve. This - * is similar to the DrawTransformFeedbackEXT command from - * EXT_transform_feedback2, but offers much more flexibility in both - * generating the arguments and in the type of Draws that can be accomplished.

    - * - *

    Requires {@link GL31 OpenGL 3.1}. Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public class ARBDrawIndirect { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * MapBufferRange, FlushMappedBufferRange, GetBufferParameteriv, and CopyBufferSubData. - */ - public static final int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; - - protected ARBDrawIndirect() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawArraysIndirect ] --- - - /** Unsafe version of: {@link #glDrawArraysIndirect DrawArraysIndirect} */ - public static void nglDrawArraysIndirect(int mode, long indirect) { - GL40C.nglDrawArraysIndirect(mode, indirect); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - // --- [ glDrawElementsIndirect ] --- - - /** Unsafe version of: {@link #glDrawElementsIndirect DrawElementsIndirect} */ - public static void nglDrawElementsIndirect(int mode, int type, long indirect) { - GL40C.nglDrawElementsIndirect(mode, type, indirect); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - - /** Array version of: {@link #glDrawArraysIndirect DrawArraysIndirect} */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - /** Array version of: {@link #glDrawElementsIndirect DrawElementsIndirect} */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawInstanced.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawInstanced.java deleted file mode 100644 index 760a5aae..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBDrawInstanced.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_draw_instanced extension. - * - *

    A common use case in GL for some applications is to be able to draw the same object, or groups of similar objects that share vertex data, primitive - * count and type, multiple times. This extension provides a means of accelerating such use cases while restricting the number of API calls, and keeping - * the amount of duplicate data to a minimum.

    - * - *

    This extension introduces two draw calls which are conceptually equivalent to a series of draw calls. Each conceptual call in this series is considered - * an "instance" of the actual draw call.

    - * - *

    This extension also introduces a read-only built-in variable to GLSL which contains the "instance ID." This variable initially contains 0, but increases - * by one after each conceptual draw call.

    - * - *

    By using the instance ID or multiples thereof as an index into a uniform array containing transform data, vertex shaders can draw multiple instances of - * an object with a single draw call.

    - * - *

    Requires {@link GL30 OpenGL 3.0} or {@link EXTGPUShader4 EXT_gpu_shader4} or NV_vertex_program4. Promoted to core in {@link GL31 OpenGL 3.1}.

    - */ -public class ARBDrawInstanced { - - static { GL.initialize(); } - - protected ARBDrawInstanced() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawArraysInstancedARB ] --- - - /** - * Draw multiple instances of a range of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param first the starting index in the enabled arrays - * @param count the number of indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - */ - public static native void glDrawArraysInstancedARB(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count, @NativeType("GLsizei") int primcount); - - // --- [ glDrawElementsInstancedARB ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedARB DrawElementsInstancedARB} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawElementsInstancedARB(int mode, int count, int type, long indices, int primcount); - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - */ - public static void glDrawElementsInstancedARB(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedARB(mode, count, type, indices, primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - */ - public static void glDrawElementsInstancedARB(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedARB(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - */ - public static void glDrawElementsInstancedARB(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedARB(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - */ - public static void glDrawElementsInstancedARB(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedARB(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - */ - public static void glDrawElementsInstancedARB(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedARB(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), primcount); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES2Compatibility.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBES2Compatibility.java deleted file mode 100644 index 39193da9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES2Compatibility.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_ES2_compatibility extension. - * - *

    This extension adds support for features of OpenGL ES 2.0 that are missing from OpenGL 3.x. Enabling these features will ease the process of porting - * applications from OpenGL ES 2.0 to OpenGL.

    - * - *

    Promoted to core in {@link GL41 OpenGL 4.1}.

    - */ -public class ARBES2Compatibility { - - static { GL.initialize(); } - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_SHADER_COMPILER = 0x8DFA, - GL_SHADER_BINARY_FORMATS = 0x8DF8, - GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, - GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, - GL_MAX_VARYING_VECTORS = 0x8DFC, - GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, - GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, - GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; - - /** Accepted by the {@code type} parameter of VertexAttribPointer. */ - public static final int GL_FIXED = 0x140C; - - /** Accepted by the {@code precisiontype} parameter of GetShaderPrecisionFormat. */ - public static final int - GL_LOW_FLOAT = 0x8DF0, - GL_MEDIUM_FLOAT = 0x8DF1, - GL_HIGH_FLOAT = 0x8DF2, - GL_LOW_INT = 0x8DF3, - GL_MEDIUM_INT = 0x8DF4, - GL_HIGH_INT = 0x8DF5; - - /** Accepted by the {@code format} parameter of most commands taking sized internal formats. */ - public static final int GL_RGB565 = 0x8D62; - - protected ARBES2Compatibility() { - throw new UnsupportedOperationException(); - } - - // --- [ glReleaseShaderCompiler ] --- - - /** Releases resources allocated by the shader compiler. This is a hint from the application, and does not prevent later use of the shader compiler. */ - public static void glReleaseShaderCompiler() { - GL41C.glReleaseShaderCompiler(); - } - - // --- [ glShaderBinary ] --- - - /** - * Unsafe version of: {@link #glShaderBinary ShaderBinary} - * - * @param count the number of shader object handles contained in {@code shaders} - * @param length the length of the array whose address is given in binary - */ - public static void nglShaderBinary(int count, long shaders, int binaryformat, long binary, int length) { - GL41C.nglShaderBinary(count, shaders, binaryformat, binary, length); - } - - /** - * Loads pre-compiled shader binaries. - * - * @param shaders an array of shader handles into which to load pre-compiled shader binaries - * @param binaryformat the format of the shader binaries contained in {@code binary} - * @param binary an array of bytes containing pre-compiled binary shader code - */ - public static void glShaderBinary(@NativeType("GLuint const *") IntBuffer shaders, @NativeType("GLenum") int binaryformat, @NativeType("void const *") ByteBuffer binary) { - GL41C.glShaderBinary(shaders, binaryformat, binary); - } - - // --- [ glGetShaderPrecisionFormat ] --- - - /** Unsafe version of: {@link #glGetShaderPrecisionFormat GetShaderPrecisionFormat} */ - public static void nglGetShaderPrecisionFormat(int shadertype, int precisiontype, long range, long precision) { - GL41C.nglGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - - /** - * Retrieves the range and precision for numeric formats supported by the shader compiler. - * - * @param shadertype the type of shader whose precision to query. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}
    - * @param precisiontype the numeric format whose precision and range to query - * @param range the address of array of two integers into which encodings of the implementation's numeric range are returned - * @param precision the address of an integer into which the numeric precision of the implementation is written - */ - public static void glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") IntBuffer range, @NativeType("GLint *") IntBuffer precision) { - GL41C.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - - /** - * Retrieves the range and precision for numeric formats supported by the shader compiler. - * - * @param shadertype the type of shader whose precision to query. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}
    - * @param precisiontype the numeric format whose precision and range to query - * @param range the address of array of two integers into which encodings of the implementation's numeric range are returned - */ - @NativeType("void") - public static int glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") IntBuffer range) { - return GL41C.glGetShaderPrecisionFormat(shadertype, precisiontype, range); - } - - // --- [ glDepthRangef ] --- - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates - * - * @param zNear the mapping of the near clipping plane to window coordinates. The initial value is 0.0f. - * @param zFar the mapping of the far clipping plane to window coordinates. The initial value is 1.0f. - */ - public static void glDepthRangef(@NativeType("GLfloat") float zNear, @NativeType("GLfloat") float zFar) { - GL41C.glDepthRangef(zNear, zFar); - } - - // --- [ glClearDepthf ] --- - - /** - * Specifies the clear value for the depth buffer - * - * @param depth the depth value used when the depth buffer is cleared. The initial value is 1.0f. - */ - public static void glClearDepthf(@NativeType("GLfloat") float depth) { - GL41C.glClearDepthf(depth); - } - - /** Array version of: {@link #glShaderBinary ShaderBinary} */ - public static void glShaderBinary(@NativeType("GLuint const *") int[] shaders, @NativeType("GLenum") int binaryformat, @NativeType("void const *") ByteBuffer binary) { - GL41C.glShaderBinary(shaders, binaryformat, binary); - } - - /** Array version of: {@link #glGetShaderPrecisionFormat GetShaderPrecisionFormat} */ - public static void glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") int[] range, @NativeType("GLint *") int[] precision) { - GL41C.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES31Compatibility.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBES31Compatibility.java deleted file mode 100644 index 61c31f47..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES31Compatibility.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_ES3_1_compatibility extension. - * - *

    This extension adds support for features of OpenGL ES 3.1 that are missing from OpenGL 4.4. Enabling these features will ease the process of porting - * applications from OpenGL ES 3.1 to OpenGL. Enabling these features will ease the process of porting applications from OpenGL ES 3.1 to OpenGL.

    - * - *

    In particular this adds the following features:

    - * - *
      - *
    • a new {@link #glMemoryBarrierByRegion MemoryBarrierByRegion} API which is potentially more efficient for specific localized memory access patterns.
    • - *
    • increases the minimum required size of SSBOs to 2^27 (128 MB).
    • - *
    • support for GLSL ES version 310.
    • - *
    • a new GLSL built-in function, {@code imageAtomicExchange}, which performs atomic exchanges on {@code r32f} floating point images.
    • - *
    • a new GLSL built-in fragment shader input, {@code gl_HelperInvocation}, that identifies whether the current fragment shader input is a helper - * invocation. Fragment shader code can use this variable to skip performing operations that are useless or potentially dangerous for helper - * invocations.
    • - *
    • a new GLSL built-in constant for the maximum supported samples: {@code gl_MaxSamples}.
    • - *
    • a number of new GLSL built-in constants mirroring the API limits for image uniforms: {@code gl_Max * ImageUniforms}, - * {@code gl_MaxCombinedShaderOutputResources}.
    • - *
    • new GLSL built-in functions which extend {@code mix()} to select between int, uint, and bool components.
    • - *
    • add the "coherent" qualifier to all memory variables taken by the GLSL built-in {@code atomic*} and {@code imageAtomic*} functions.
    • - *
    • - *
    • - *
    - * - *

    Requires {@link GL44 OpenGL 4.4}, {@link ARBES2Compatibility ARB_ES2_compatibility}, {@link ARBES3Compatibility ARB_ES3_compatibility}. Promoted to core in {@link GL45 OpenGL 4.5}.

    - */ -public class ARBES31Compatibility { - - static { GL.initialize(); } - - protected ARBES31Compatibility() { - throw new UnsupportedOperationException(); - } - - // --- [ glMemoryBarrierByRegion ] --- - - /** - * Behaves like {@link GL42C#glMemoryBarrier MemoryBarrier}, with two differences: - * - *

    First, it narrows the region under consideration so that only reads/writes of prior fragment shaders that are invoked for a smaller region of the - * framebuffer will be completed/reflected prior to subsequent reads/write of following fragment shaders. The size of the region is implementation - * dependent and may be as small as one framebuffer pixel.

    - * - *

    Second, it only applies to memory transactions that may be read by or written by a fragment shader.

    - * - *

    When barriers is {@link GL42#GL_ALL_BARRIER_BITS ALL_BARRIER_BITS}, shader memory accesses will be synchronized relative to all these barrier bits, but not to other - * barrier bits specific to {@link GL42C#glMemoryBarrier MemoryBarrier}. This implies that reads/writes for scatter/gather-like algorithms may or may not be - * completed/reflected after a MemoryBarrierByRegion command. However, for uses such as deferred shading, where a linked list of visible - * surfaces with the head at a framebuffer address may be constructed, and the entirety of the list is only dependent on previous executions at that - * framebuffer address, MemoryBarrierByRegion may be significantly more efficient than {@link GL42C#glMemoryBarrier MemoryBarrier}.

    - * - * @param barriers the barriers to insert. One or more of:
    {@link GL42#GL_ATOMIC_COUNTER_BARRIER_BIT ATOMIC_COUNTER_BARRIER_BIT}{@link GL42#GL_FRAMEBUFFER_BARRIER_BIT FRAMEBUFFER_BARRIER_BIT}{@link GL42#GL_SHADER_IMAGE_ACCESS_BARRIER_BIT SHADER_IMAGE_ACCESS_BARRIER_BIT}
    {@link GL43#GL_SHADER_STORAGE_BARRIER_BIT SHADER_STORAGE_BARRIER_BIT}{@link GL42#GL_TEXTURE_FETCH_BARRIER_BIT TEXTURE_FETCH_BARRIER_BIT}{@link GL42#GL_UNIFORM_BARRIER_BIT UNIFORM_BARRIER_BIT}
    - */ - public static void glMemoryBarrierByRegion(@NativeType("GLbitfield") int barriers) { - GL45C.glMemoryBarrierByRegion(barriers); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES32Compatibility.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBES32Compatibility.java deleted file mode 100644 index bca5891d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES32Compatibility.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_ES3_2_compatibility extension. - * - *

    This extension adds support for features of OpenGL ES 3.2 that are missing from OpenGL 4.5. Enabling these features will ease the process of porting - * applications from OpenGL ES 3.2 to OpenGL.

    - * - *

    In particular this adds the following features:

    - * - *
      - *
    • Bounding box used to optimization tessellation processing (OES_primitive_bounding_box)
    • - *
    • query for {@link #GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB MULTISAMPLE_LINE_WIDTH_RANGE_ARB}
    • - *
    • support for the OpenGL ES 3.20 shading language
    • - *
    - * - *

    For full OpenGL ES 3.2 compatibility the implementation must support {@link KHRBlendEquationAdvanced KHR_blend_equation_advanced} and {@link KHRTextureCompressionASTCLDR KHR_texture_compression_astc_ldr}. - * Those features are not defined in this extension spec since they are already defined at the KHR level.

    - * - *

    Requires {@link GL45 OpenGL 4.5}, {@link ARBES2Compatibility ARB_ES2_compatibility}, {@link ARBES3Compatibility ARB_ES3_compatibility} and {@link ARBES31Compatibility ARB_ES3_1_compatibility}.

    - */ -public class ARBES32Compatibility { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int - GL_PRIMITIVE_BOUNDING_BOX_ARB = 0x92BE, - GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB = 0x9381, - GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB = 0x9382; - - protected ARBES32Compatibility() { - throw new UnsupportedOperationException(); - } - - // --- [ glPrimitiveBoundingBoxARB ] --- - - /** - * Specifies the primitive bounding box. - * - *

    Implementations may be able to optimize performance if the application provides bounds of primitives that will be generated by the tessellation - * primitive generator or the geometry shader prior to executing those stages. If the provided bounds are incorrect and primitives extend beyond them, the - * rasterizer may or may not generate fragments for the portions of primitives outside the bounds.

    - * - * @param minX the minimum x clip space coordinate - * @param minY the minimum y clip space coordinate - * @param minZ the minimum z clip space coordinate - * @param minW the minimum w clip space coordinate - * @param maxX the maximum x clip space coordinate - * @param maxY the maximum y clip space coordinate - * @param maxZ the maximum z clip space coordinate - * @param maxW the maximum w clip space coordinate - */ - public static native void glPrimitiveBoundingBoxARB(@NativeType("GLfloat") float minX, @NativeType("GLfloat") float minY, @NativeType("GLfloat") float minZ, @NativeType("GLfloat") float minW, @NativeType("GLfloat") float maxX, @NativeType("GLfloat") float maxY, @NativeType("GLfloat") float maxZ, @NativeType("GLfloat") float maxW); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES3Compatibility.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBES3Compatibility.java deleted file mode 100644 index 75a38e9c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBES3Compatibility.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_ES3_compatibility extension. - * - *

    This extension adds support for features of OpenGL ES 3.0 that are missing from OpenGL 3.x. Enabling these features will ease the process of porting - * applications from OpenGL ES 3.0 to OpenGL. These features include conservative boolean occlusion queries, primitive restart with a fixed index, the - * OpenGL ES Shading Language 3.00 specification, and the dependencies stated below.

    - * - *

    Requires {@link GL33 OpenGL 3.3}, {@link ARBES2Compatibility ARB_ES2_compatibility}, {@link ARBInvalidateSubdata ARB_invalidate_subdata} and {@link ARBTextureStorage ARB_texture_storage}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public final class ARBES3Compatibility { - - /** Accepted by the {@code internalformat} parameter of CompressedTexImage2D. */ - public static final int - GL_COMPRESSED_RGB8_ETC2 = 0x9274, - GL_COMPRESSED_SRGB8_ETC2 = 0x9275, - GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, - GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, - GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, - GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, - GL_COMPRESSED_R11_EAC = 0x9270, - GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, - GL_COMPRESSED_RG11_EAC = 0x9272, - GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; - - /** Accepted by the {@code target} parameter of Enable and Disable. */ - public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, GetQueryIndexediv and GetQueryiv. */ - public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; - - /** Accepted by the {@code value} parameter of the GetInteger functions. */ - public static final int GL_MAX_ELEMENT_INDEX = 0x8D6B; - - private ARBES3Compatibility() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBEnhancedLayouts.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBEnhancedLayouts.java deleted file mode 100644 index 7ca97b70..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBEnhancedLayouts.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_enhanced_layouts extension. - * - *

    This extension adds the following functionality to layout qualifiers, including broadening the API where this functionality is reflected. The following - * are added:

    - * - *
      - *
    1. Use compile-time constant expressions.
    2. - *
    3. Specify explicit byte offsets within a uniform or shader storage block.
    4. - *
    5. Force alignment within a uniform or shader storage block.
    6. - *
    7. Specify component numbers to more fully utilize the vec4-slot interfaces between shader outputs and shader inputs.
    8. - *
    9. Specify transform/feedback buffers, locations, and widths.
    10. - *
    11. Allow locations on input and output blocks for SSO interface matching.
    12. - *
    - * - *

    Requires {@link GL31 OpenGL 3.1} and GLSL 1.40. Promoted to core in {@link GL44 OpenGL 4.4}.

    - */ -public final class ARBEnhancedLayouts { - - /** Accepted in the {@code props} array of {@link GL43C#glGetProgramResourceiv GetProgramResourceiv}. */ - public static final int - GL_LOCATION_COMPONENT = 0x934A, - GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, - GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; - - private ARBEnhancedLayouts() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBExplicitUniformLocation.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBExplicitUniformLocation.java deleted file mode 100644 index 8d733e4b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBExplicitUniformLocation.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_explicit_uniform_location extension. - * - *

    This extension provides a method to pre-assign uniform locations to uniform variables in the default uniform block, including subroutine uniforms. This - * allows an application to modify the uniform values without requiring a GL query like {@link GL20C#glGetUniformLocation GetUniformLocation}, {@link GL40C#glGetSubroutineUniformLocation GetSubroutineUniformLocation} and - * {@link GL40C#glGetSubroutineIndex GetSubroutineIndex}.

    - * - *

    Requires {@link GL33 OpenGL 3.3} or ARB_explicit_attrib_location. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public final class ARBExplicitUniformLocation { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int GL_MAX_UNIFORM_LOCATIONS = 0x826E; - - private ARBExplicitUniformLocation() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFragmentProgram.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBFragmentProgram.java deleted file mode 100644 index ab20a281..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFragmentProgram.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_fragment_program extension. - * - *

    Unextended OpenGL mandates a certain set of configurable per- fragment computations defining texture application, texture environment, color sum, and - * fog operations. Several extensions have added further per-fragment computations to OpenGL. For example, extensions have defined new texture environment - * capabilities (ARB_texture_env_add, {@link ARBTextureEnvCombine ARB_texture_env_combine}, {@link ARBTextureEnvDot3 ARB_texture_env_dot3}, ARB_texture_env_crossbar), per-fragment depth - * comparisons ({@link ARBDepthTexture ARB_depth_texture}, {@link ARBShadow ARB_shadow}, {@link ARBShadowAmbient ARB_shadow_ambient}, EXT_shadow_funcs), per-fragment lighting - * (EXT_fragment_lighting, EXT_light_texture), and environment mapped bump mapping - * (ATI_envmap_bumpmap).

    - * - *

    Each such extension adds a small set of relatively inflexible per-fragment computations.

    - * - *

    This inflexibility is in contrast to the typical flexibility provided by the underlying programmable floating point engines (whether micro-coded - * fragment engines, DSPs, or CPUs) that are traditionally used to implement OpenGL's texturing computations. The purpose of this extension is to expose to - * the OpenGL application writer a significant degree of per-fragment programmability for computing fragment parameters.

    - * - *

    For the purposes of discussing this extension, a fragment program is a sequence of floating-point 4-component vector operations that determines how a - * set of program parameters (not specific to an individual fragment) and an input set of per-fragment parameters are transformed to a set of per-fragment - * result parameters.

    - * - *

    The per-fragment computations for standard OpenGL given a particular set of texture and fog application modes (along with any state for extensions - * defining per-fragment computations) is, in essence, a fragment program. However, the sequence of operations is defined implicitly by the current OpenGL - * state settings rather than defined explicitly as a sequence of instructions.

    - * - *

    This extension provides an explicit mechanism for defining fragment program instruction sequences for application-defined fragment programs. In order to - * define such fragment programs, this extension defines a fragment programming model including a floating-point 4-component vector instruction set and a - * relatively large set of floating-point 4-component registers.

    - * - *

    The extension's fragment programming model is designed for efficient hardware implementation and to support a wide variety of fragment programs. By - * design, the entire set of existing fragment programs defined by existing OpenGL per-fragment computation extensions can be implemented using the - * extension's fragment programming model.

    - * - *

    LWJGL: This extension defines many functions and tokens that are also defined in {@link ARBVertexProgram ARB_vertex_program}. Since these two extensions are often - * used together, the common functionality has only been exposed by {@link ARBVertexProgram ARB_vertex_program}, to avoid static import conflicts.

    - */ -public final class ARBFragmentProgram { - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of ProgramStringARB, BindProgramARB, ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, - * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, GetProgramivARB and GetProgramStringARB. - */ - public static final int GL_FRAGMENT_PROGRAM_ARB = 0x8804; - - /** Accepted by the {@code pname} parameter of GetProgramivARB. */ - public static final int - GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805, - GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806, - GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807, - GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808, - GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809, - GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A, - GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B, - GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C, - GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D, - GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E, - GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F, - GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_TEXTURE_COORDS_ARB = 0x8871, - GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; - - private ARBFragmentProgram() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFragmentShader.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBFragmentShader.java deleted file mode 100644 index e3853b3e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFragmentShader.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_fragment_shader extension. - * - *

    This extension adds functionality to define fragment shader objects. A fragment shader object is a shader object (see the ARB_shader_objects extension) - * that, when attached to a program object, can be compiled and linked to produce an executable that runs on the fragment processor in OpenGL. The fragment - * processor is a programmable unit that replaces the OpenGL 1.4 fixed-function texturing, color sum and fog stages. This extension also defines how such - * an executable interacts with the fixed functionality fragment processing of OpenGL 1.4. The language is defined in the OpenGL Shading Language - * specification as the Fragment Shading Language.

    - * - *

    Promoted to core in {@link GL20 OpenGL 2.0}.

    - */ -public final class ARBFragmentShader { - - /** Accepted by the {@code shaderType} argument of CreateShaderObjectARB and returned by the {@code params} parameter of GetObjectParameter{fi}vARB. */ - public static final int GL_FRAGMENT_SHADER_ARB = 0x8B30; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49; - - /** Accepted by the {@code target} parameter of Hint and the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B; - - private ARBFragmentShader() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferNoAttachments.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferNoAttachments.java deleted file mode 100644 index f5396e58..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferNoAttachments.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_framebuffer_no_attachments extension. - * - *

    Framebuffer objects as introduced by {@link ARBFramebufferObject ARB_framebuffer_object} and OpenGL 3.0 provide a generalized mechanism for rendering to off-screen surfaces. - * Each framebuffer object may have depth, stencil and zero or more color attachments that can be written to by the GL. The size of the framebuffer (width, - * height, layer count, sample count) is derived from the attachments of that framebuffer. In unextended OpenGL 4.2, it is not legal to render into a - * framebuffer object that has no attachments. Such a framebuffer would be considered incomplete with the {@link GL30#GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT} - * status.

    - * - *

    With OpenGL 4.2 and {@link ARBShaderImageLoadStore ARB_shader_image_load_store}, fragment shaders are capable of doing random access writes to buffer and texture memory via - * image loads, stores, and atomics. This ability enables algorithms using the conventional rasterizer to generate a collection of fragments, where each - * fragment shader invocation will write its outputs to buffer or texture memory using image stores or atomics. Such algorithms may have no need to write - * color or depth values to a conventional framebuffer. However, a framebuffer with no attachments will be considered incomplete and no rasterization or - * fragment shader exectuion will occur. To avoid such errors, an application may be required to create an otherwise unnecessary "dummy" texture and attach - * it to the framebuffer (possibly with color writes masked off). If the algorithm requires the rasterizer to operate over a large number of pixels, this - * dummy texture will needlessly consume a significant amount of memory.

    - * - *

    This extension enables the algorithms described above to work even with a framebuffer with no attachments. Applications can specify default width, - * height, layer count, and sample count parameters for a framebuffer object. When a framebuffer with no attachments is bound, it will be considered - * complete as long as the application has specified non-zero default width and height parameters. For the purposes of rasterization, the framebuffer will - * be considered to have a width, height, layer count, and sample count derived from its default parameters. Framebuffers with one or more attachments are - * not affected by these default parameters; the size of the framebuffer will still be derived from the sizes of the attachments in that case.

    - * - *

    Additionally, this extension provides queryable implementation-dependent maximums for framebuffer width, height, layer count, and sample count, which - * may differ from similar limits on textures and renderbuffers. These maximums will be used to error-check the default framebuffer parameters and also - * permit implementations to expose the ability to rasterize to an attachment-less framebuffer larger than the maximum supported texture size.

    - * - *

    Requires {@link GL30 OpenGL 3.0} or {@link ARBFramebufferObject ARB_framebuffer_object}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBFramebufferNoAttachments { - - static { GL.initialize(); } - - /** - * Accepted by the {@code pname} parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and - * GetNamedFramebufferParameterivEXT. - */ - public static final int - GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, - GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, - GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, - GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, - GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, - GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, - GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, - GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; - - protected ARBFramebufferNoAttachments() { - throw new UnsupportedOperationException(); - } - - // --- [ glFramebufferParameteri ] --- - - /** - * Sets a named parameter of a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be modified. One of:
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param param the new value for the parameter named {@code pname} - */ - public static void glFramebufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL43C.glFramebufferParameteri(target, pname, param); - } - - // --- [ glGetFramebufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetFramebufferParameteriv GetFramebufferParameteriv} */ - public static void nglGetFramebufferParameteriv(int target, int pname, long params) { - GL43C.nglGetFramebufferParameteriv(target, pname, params); - } - - /** - * Retrieves a named parameter from a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param params a variable to receive the value of the parameter named {@code pname} - */ - public static void glGetFramebufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL43C.glGetFramebufferParameteriv(target, pname, params); - } - - /** - * Retrieves a named parameter from a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - */ - @NativeType("void") - public static int glGetFramebufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL43C.glGetFramebufferParameteri(target, pname); - } - - // --- [ glNamedFramebufferParameteriEXT ] --- - - /** - * DSA version of {@link #glFramebufferParameteri FramebufferParameteri}. - * - * @param framebuffer the framebuffer object - * @param pname a token indicating the parameter to be modified. One of:
    {@link #GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link #GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link #GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link #GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link #GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param param the new value for the parameter named {@code pname} - */ - public static native void glNamedFramebufferParameteriEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glGetNamedFramebufferParameterivEXT ] --- - - /** Unsafe version of: {@link #glGetNamedFramebufferParameterivEXT GetNamedFramebufferParameterivEXT} */ - public static native void nglGetNamedFramebufferParameterivEXT(int framebuffer, int pname, long params); - - /** - * DSA version of {@link #glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer object - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link #GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link #GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link #GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link #GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link #GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param params a variable to receive the value of the parameter named {@code pname} - */ - public static void glGetNamedFramebufferParameterivEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedFramebufferParameterivEXT(framebuffer, pname, memAddress(params)); - } - - /** - * DSA version of {@link #glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer object - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link #GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link #GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link #GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link #GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link #GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - */ - @NativeType("void") - public static int glGetNamedFramebufferParameteriEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedFramebufferParameterivEXT(framebuffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGetFramebufferParameteriv GetFramebufferParameteriv} */ - public static void glGetFramebufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL43C.glGetFramebufferParameteriv(target, pname, params); - } - - /** Array version of: {@link #glGetNamedFramebufferParameterivEXT GetNamedFramebufferParameterivEXT} */ - public static void glGetNamedFramebufferParameterivEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedFramebufferParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(framebuffer, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferObject.java deleted file mode 100644 index 2907a07e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferObject.java +++ /dev/null @@ -1,719 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_framebuffer_object extension. - * - *

    ARB_framebuffer_object is an extension intended to address the following goals:

    - * - *
      - *
    • Reflect FBO-related functionality found in the OpenGL 3.0 specification.
    • - *
    • Integrate multiple disjoint extensions into a single ARB extension. These extensions are: - * - *
        - *
      • {@link EXTFramebufferObject EXT_framebuffer_object}
      • - *
      • {@link EXTFramebufferBlit EXT_framebuffer_blit}
      • - *
      • {@link EXTFramebufferMultisample EXT_framebuffer_multisample}
      • - *
      • {@link EXTPackedDepthStencil EXT_packed_depth_stencil}
      • - *
    • - *
    • Where appropriate, relax some of the constraints expressed by previous FBO-related extensions. In particular the requirement of matching attachment - * dimensions and component sizes has been relaxed, to allow implementations the freedom to support more flexible usages where possible.
    • - *
    - * - *

    ARB_framebuffer_object defines an interface for drawing to rendering destinations other than the buffers provided to the GL by the window-system.

    - * - *

    In this extension, these newly defined rendering destinations are known collectively as "framebuffer-attachable images". This extension provides a - * mechanism for attaching framebuffer-attachable images to the GL framebuffer as one of the standard GL logical buffers: color, depth, and stencil. - * (Attaching a framebuffer-attachable image to the accum logical buffer is left for a future extension to define). When a framebuffer-attachable image is - * attached to the framebuffer, it is used as the source and destination of fragment operations as described in Chapter 4.

    - * - *

    By allowing the use of a framebuffer-attachable image as a rendering destination, this extension enables a form of "offscreen" rendering. Furthermore, - * "render to texture" is supported by allowing the images of a texture to be used as framebuffer-attachable images. A particular image of a texture object - * is selected for use as a framebuffer-attachable image by specifying the mipmap level, cube map face (for a cube map texture), and layer (for a 3D - * texture) that identifies the image. The "render to texture" semantics of this extension are similar to performing traditional rendering to the - * framebuffer, followed immediately by a call to CopyTexSubImage. However, by using this extension instead, an application can achieve the same - * effect, but with the advantage that the GL can usually eliminate the data copy that would have been incurred by calling CopyTexSubImage.

    - * - *

    This extension also defines a new GL object type, called a "renderbuffer", which encapsulates a single 2D pixel image. The image of renderbuffer can be - * used as a framebuffer-attachable image for generalized offscreen rendering and it also provides a means to support rendering to GL logical buffer types - * which have no corresponding texture format (stencil, accum, etc). A renderbuffer is similar to a texture in that both renderbuffers and textures can be - * independently allocated and shared among multiple contexts. The framework defined by this extension is general enough that support for attaching images - * from GL objects other than textures and renderbuffers could be added by layered extensions.

    - * - *

    To facilitate efficient switching between collections of framebuffer-attachable images, this extension introduces another new GL object, called a - * framebuffer object. A framebuffer object contains the state that defines the traditional GL framebuffer, including its set of images. Prior to this - * extension, it was the window-system which defined and managed this collection of images, traditionally by grouping them into a "drawable". The - * window-system API's would also provide a function (i.e., {@link WGL#wglMakeCurrent}, {@link GLX#glXMakeCurrent}, aglSetDrawable, etc.) to bind a drawable with a GL - * context (as is done in the {@link WGLARBPbuffer WGL_ARB_pbuffer} extension). In this extension however, this functionality is subsumed by the GL and the GL provides - * the function BindFramebuffer to bind a framebuffer object to the current context. Later, the context can bind back to the window-system-provided - * framebuffer in order to display rendered content.

    - * - *

    Previous extensions that enabled rendering to a texture have been much more complicated. One example is the combination of {@code ARB_pbuffer} and - * {@code ARB_render_texture}, both of which are window-system extensions. This combination requires calling {@code MakeCurrent}, an operation that may be - * expensive, to switch between the window and the pbuffer drawables. An application must create one pbuffer per renderable texture in order to portably - * use {@code ARB_render_texture}. An application must maintain at least one GL context per texture format, because each context can only operate on a - * single pixelformat or {@code FBConfig}. All of these characteristics make {@code ARB_render_texture} both inefficient and cumbersome to use.

    - * - *

    ARB_framebuffer_object, on the other hand, is both simpler to use and more efficient than ARB_render_texture. The ARB_framebuffer_object API is - * contained wholly within the GL API and has no (non-portable) window-system components. Under ARB_framebuffer_object, it is not necessary to create a - * second GL context when rendering to a texture image whose format differs from that of the window. Finally, unlike the pbuffers of - * {@code ARB_render_texture}, a single framebuffer object can facilitate rendering to an unlimited number of texture objects.

    - * - *

    This extension differs from EXT_framebuffer_object by splitting the framebuffer object binding point into separate DRAW and READ bindings (incorporating - * functionality introduced by EXT_framebuffer_blit). This allows copying directly from one framebuffer to another. In addition, a new high performance - * blit function is added to facilitate these blits and perform some data conversion where allowed.

    - * - *

    This extension also enables usage of multisampling in conjunction with renderbuffers (incorporating functionality from EXT_packed_depth_stencil), as - * follows:

    - * - *

    The new operation RenderbufferStorageMultisample() allocates storage for a renderbuffer object that can be used as a multisample buffer. A multisample - * render buffer image differs from a single-sample render buffer image in that a multisample image has a number of {@link GL13#GL_SAMPLES SAMPLES} that is greater than zero. - * No method is provided for creating multisample texture images.

    - * - *

    All of the framebuffer-attachable images attached to a framebuffer object must have the same number of {@link GL13#GL_SAMPLES SAMPLES} or else the framebuffer object is - * not "framebuffer complete". If a framebuffer object with multisample attachments is "framebuffer complete", then the framebuffer object behaves as if - * {@link GL13#GL_SAMPLE_BUFFERS SAMPLE_BUFFERS} is one.

    - * - *

    In traditional multisample rendering, where {@link #GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is zero and {@link GL13#GL_SAMPLE_BUFFERS SAMPLE_BUFFERS} is one, the GL spec states that "the color sample - * values are resolved to a single, displayable color each time a pixel is updated." There are, however, several modern hardware implementations that do - * not actually resolve for each sample update, but instead postpones the resolve operation to a later time and resolve a batch of sample updates at a - * time. This is OK as long as the implementation behaves "as if" it had resolved a sample-at-a-time. Unfortunately, however, honoring the "as if" rule can - * sometimes degrade performance.

    - * - *

    In contrast, when {@link #GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is an application-created framebuffer object, {@link GL13#GL_MULTISAMPLE MULTISAMPLE} is enabled, and {@link GL13#GL_SAMPLE_BUFFERS SAMPLE_BUFFERS} is one, - * there is no implicit per-sample-update resolve. Instead, the application explicitly controls when the resolve operation is performed. The resolve - * operation is affected by calling BlitFramebuffer where the source is a multisample application-created framebuffer object and the destination is a - * single-sample framebuffer object (either application-created or window-system provided).

    - * - *

    This design for multisample resolve more closely matches current hardware, but still permits implementations which choose to resolve a single sample at - * a time. If hardware that implements the multisample resolution "one sample at a time" exposes ARB_framebuffer_object, it could perform the implicit - * resolve to a driver-managed hidden surface, then read from that surface when the application calls BlitFramebuffer.

    - * - *

    Another motivation for granting the application explicit control over the multisample resolve operation has to do with the flexibility afforded by - * ARB_framebuffer_object. Previously, a drawable (window or pbuffer) had exclusive access to all of its buffers. There was no mechanism for sharing a - * buffer across multiple drawables. Under ARB_framebuffer_object, however, a mechanism exists for sharing a framebuffer-attachable image across several - * framebuffer objects, as well as sharing an image between a framebuffer object and a texture. If we had retained the "implicit" resolve from traditional - * multisampled rendering, and allowed the creation of "multisample" format renderbuffers, then this type of sharing would have lead to two problematic - * situations:

    - * - *
      - *
    • Two contexts, which shared renderbuffers, might perform competing resolve operations into the same single-sample buffer with ambiguous results.
    • - *
    • It would have introduced the unfortunate ability to use the single-sample buffer as a texture while {@link GL13#GL_MULTISAMPLE MULTISAMPLE} is enabled.
    • - *
    - * - *

    Using {@link #glBlitFramebuffer BlitFramebuffer} as an explicit resolve to serialize access to the multisampled contents and eliminate the implicit per-sample resolve operation, we avoid both of these problems.

    - * - *

    This extension also enables usage of packed depth-stencil formats in renderbuffers (incorporating functionality from EXT_packed_depth_stencil), as - * follows:

    - * - *

    Many OpenGL implementations have chosen to interleave the depth and stencil buffers into one buffer, often with 24 bits of depth precision and 8 bits of - * stencil data. 32 bits is more than is needed for the depth buffer much of the time; a 24-bit depth buffer, on the other hand, requires that reads and - * writes of depth data be unaligned with respect to power-of-two boundaries. On the other hand, 8 bits of stencil data is more than sufficient for most - * applications, so it is only natural to pack the two buffers into a single buffer with both depth and stencil data. OpenGL never provides direct access - * to the buffers, so the OpenGL implementation can provide an interface to applications where it appears the one merged buffer is composed of two logical buffers.

    - * - *

    One disadvantage of this scheme is that OpenGL lacks any means by which this packed data can be handled efficiently. For example, when an application - * reads from the 24-bit depth buffer, using the type {@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT} will lose 8 bits of data, while {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT} has 8 too many. Both require - * expensive format conversion operations. A 24-bit format would be no more suitable, because it would also suffer from the unaligned memory accesses that - * made the standalone 24-bit depth buffer an unattractive proposition in the first place.

    - * - *

    Many applications, such as parallel rendering applications, may also wish to draw to or read back from both the depth and stencil buffers at the same - * time. Currently this requires two separate operations, reducing performance. Since the buffers are interleaved, drawing to or reading from both should - * be no more expensive than using just one; in some cases, it may even be cheaper.

    - * - *

    This extension provides a new data format, {@link #GL_DEPTH_STENCIL DEPTH_STENCIL}, that can be used with the {@link GL11#glDrawPixels DrawPixels}, {@link GL11C#glReadPixels ReadPixels}, and {@link GL11#glCopyPixels CopyPixels} - * commands, as well as a packed data type, {@link #GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}, that is meant to be used with {@link #GL_DEPTH_STENCIL DEPTH_STENCIL}. No other data types are supported with - * {@link #GL_DEPTH_STENCIL DEPTH_STENCIL}. If {@link ARBDepthTexture ARB_depth_texture} or SGIX_depth_texture is supported, {@link #GL_DEPTH_STENCIL DEPTH_STENCIL}/{@link #GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8} data can also be used for textures; - * this provides a more efficient way to supply data for a 24-bit depth texture.

    - * - *

    {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} data, when passed through the pixel path, undergoes both depth and stencil operations. The depth data is scaled and biased by the current - * {@link GL11#GL_DEPTH_SCALE DEPTH_SCALE} and {@link GL11#GL_DEPTH_BIAS DEPTH_BIAS}, while the stencil data is shifted and offset by the current {@link GL11#GL_INDEX_SHIFT INDEX_SHIFT} and {@link GL11#GL_INDEX_OFFSET INDEX_OFFSET}. The stencil - * data is also put through the stencil-to-stencil pixel map.

    - * - *

    {@link GL11#glDrawPixels DrawPixels} of {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} data operates similarly to that of {@link GL11#GL_STENCIL_INDEX STENCIL_INDEX} data, bypassing the OpenGL fragment pipeline entirely, unlike - * the treatment of {@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT} data. The stencil and depth masks are applied, as are the pixel ownership and scissor tests, but all other - * operations are skipped.

    - * - *

    {@link GL11C#glReadPixels ReadPixels} of {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} data reads back a rectangle from both the depth and stencil buffers.

    - * - *

    {@link GL11#glCopyPixels CopyPixels} of {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} data copies a rectangle from both the depth and stencil buffers. Like glDrawPixels, it applies both the stencil and - * depth masks but skips the remainder of the OpenGL fragment pipeline.

    - * - *

    glTex[Sub]Image[1,2,3]D of {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} data loads depth and stencil data into a depth_stencil texture. {@link GL11C#glGetTexImage GetTexImage} of {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} data can be - * used to retrieve depth and stencil data from a depth/stencil texture.

    - * - *

    In addition, a new base internal format, {@link #GL_DEPTH_STENCIL DEPTH_STENCIL}, can be used by both texture images and renderbuffer storage. When an image with a - * {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} internal format is attached to both the depth and stencil attachment points of a framebuffer object, then it becomes both the depth and - * stencil buffers of the framebuffer. This fits nicely with hardware that interleaves both depth and stencil data into a single buffer. When a texture - * with {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} data is bound for texturing, only the depth component is accessible through the texture fetcher. The stencil data can be written - * with TexImage or CopyTexImage, and can be read with {@link GL11C#glGetTexImage GetTexImage}. When a {@link #GL_DEPTH_STENCIL DEPTH_STENCIL} image is attached to the stencil attachment of the bound - * framebuffer object, the stencil data can be accessed through any operation that reads from or writes to the framebuffer's stencil buffer.

    - * - *

    Glossary of Helpful Terms

    - * - *
      - *
    • logical buffer – One of the color, depth, or stencil buffers of the framebuffer.
    • - *
    • framebuffer: The collection of logical buffers and associated state defining where the output of GL rendering is directed.
    • - *
    • texture: an object which consists of one or more 2D arrays of pixel images and associated state that can be used as a source of data during the texture-mapping process.
    • - *
    • texture image – one of the 2D arrays of pixels that are part of a texture object. Texture images contain and define the texels of the - * texture object.
    • - *
    • renderbuffer – A new type of storage object which contains a single 2D array of pixels and associated state that can be used as a - * destination for pixel data written during the rendering process.
    • - *
    • renderbuffer image – The 2D array of pixels that is part of a renderbuffer object. A renderbuffer image contains and defines the pixels - * of the renderbuffer object.
    • - *
    • framebuffer-attachable image – A 2D pixel image that can be attached to one of the logical buffer attachment points of a framebuffer - * object. Texture images and renderbuffer images are two examples of framebuffer-attachable images.
    • - *
    • attachment point – The set of state which references a specific framebuffer-attachable image, and allows that framebuffer-attachable - * image to be used to store the contents of a logical buffer of a framebuffer object. There is an attachment point state vector for each color, depth, - * and stencil buffer of a framebuffer.
    • - *
    • attach – The act of connecting one object to another object. - * - *

      An "attach" operation is similar to a "bind" operation in that both represent a reference to the attached or bound object for the purpose of - * managing object lifetimes and both enable manipulation of the state of the attached or bound object.

      - * - *

      However, an "attach" is also different from a "bind" in that "binding" an unused object creates a new object, while "attaching" does not. - * Additionally, "bind" establishes a connection between a context and an object, while "attach" establishes a connection between two objects.

      - * - *

      Finally, if object "A" is attached to object "B" and object "B" is bound to context "C", then in most respects, we treat "A" as if it is - * implicitly bound to "C".

    • - *
    • framebuffer attachment completeness – Similar to texture "mipmap" or "cube" completeness, defines a minimum set of criteria for - * framebuffer attachment points.
    • - *
    • framebuffer completeness – Similar to texture "mipmap cube completeness", defines a composite set of "completeness" requirements and - * relationships among the attached framebuffer-attachable images.
    • - *
    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class ARBFramebufferObject { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameter of BindFramebuffer, CheckFramebufferStatus, FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and - * GetFramebufferAttachmentParameteriv. - */ - public static final int - GL_FRAMEBUFFER = 0x8D40, - GL_READ_FRAMEBUFFER = 0x8CA8, - GL_DRAW_FRAMEBUFFER = 0x8CA9; - - /** - * Accepted by the {@code target} parameter of BindRenderbuffer, RenderbufferStorage, and GetRenderbufferParameteriv, and returned by - * GetFramebufferAttachmentParameteriv. - */ - public static final int GL_RENDERBUFFER = 0x8D41; - - /** Accepted by the {@code internalformat} parameter of RenderbufferStorage. */ - public static final int - GL_STENCIL_INDEX1 = 0x8D46, - GL_STENCIL_INDEX4 = 0x8D47, - GL_STENCIL_INDEX8 = 0x8D48, - GL_STENCIL_INDEX16 = 0x8D49; - - /** Accepted by the {@code pname} parameter of GetRenderbufferParameteriv. */ - public static final int - GL_RENDERBUFFER_WIDTH = 0x8D42, - GL_RENDERBUFFER_HEIGHT = 0x8D43, - GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, - GL_RENDERBUFFER_RED_SIZE = 0x8D50, - GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, - GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, - GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, - GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, - GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, - GL_RENDERBUFFER_SAMPLES = 0x8CAB; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachmentParameteriv. */ - public static final int - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, - GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, - GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, - GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, - GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, - GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, - GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, - GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, - GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; - - /** Returned in {@code params} by GetFramebufferAttachmentParameteriv. */ - public static final int - GL_UNSIGNED_NORMALIZED = 0x8C17, - GL_FRAMEBUFFER_DEFAULT = 0x8218, - GL_INDEX = 0x8222; - - /** Accepted by the {@code attachment} parameter of FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv. */ - public static final int - GL_COLOR_ATTACHMENT0 = 0x8CE0, - GL_COLOR_ATTACHMENT1 = 0x8CE1, - GL_COLOR_ATTACHMENT2 = 0x8CE2, - GL_COLOR_ATTACHMENT3 = 0x8CE3, - GL_COLOR_ATTACHMENT4 = 0x8CE4, - GL_COLOR_ATTACHMENT5 = 0x8CE5, - GL_COLOR_ATTACHMENT6 = 0x8CE6, - GL_COLOR_ATTACHMENT7 = 0x8CE7, - GL_COLOR_ATTACHMENT8 = 0x8CE8, - GL_COLOR_ATTACHMENT9 = 0x8CE9, - GL_COLOR_ATTACHMENT10 = 0x8CEA, - GL_COLOR_ATTACHMENT11 = 0x8CEB, - GL_COLOR_ATTACHMENT12 = 0x8CEC, - GL_COLOR_ATTACHMENT13 = 0x8CED, - GL_COLOR_ATTACHMENT14 = 0x8CEE, - GL_COLOR_ATTACHMENT15 = 0x8CEF, - GL_DEPTH_ATTACHMENT = 0x8D00, - GL_STENCIL_ATTACHMENT = 0x8D20, - GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_SAMPLES = 0x8D57; - - /** Returned by CheckFramebufferStatus(). */ - public static final int - GL_FRAMEBUFFER_COMPLETE = 0x8CD5, - GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, - GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, - GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, - GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, - GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, - GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, - GL_FRAMEBUFFER_UNDEFINED = 0x8219; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_FRAMEBUFFER_BINDING = 0x8CA6, - GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6, - GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, - GL_RENDERBUFFER_BINDING = 0x8CA7, - GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, - GL_MAX_RENDERBUFFER_SIZE = 0x84E8; - - /** Returned by GetError(). */ - public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x506; - - /** - * Accepted by the {@code format} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage, by the {@code type} parameter of CopyPixels, by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, - * CopyTexImage2D, and RenderbufferStorage, and returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int GL_DEPTH_STENCIL = 0x84F9; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_UNSIGNED_INT_24_8 = 0x84FA; - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int GL_DEPTH24_STENCIL8 = 0x88F0; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int GL_TEXTURE_STENCIL_SIZE = 0x88F1; - - protected ARBFramebufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glIsRenderbuffer ] --- - - /** - * Determines if a name corresponds to a renderbuffer object. - * - * @param renderbuffer a value that may be the name of a renderbuffer object - */ - @NativeType("GLboolean") - public static boolean glIsRenderbuffer(@NativeType("GLuint") int renderbuffer) { - return GL30C.glIsRenderbuffer(renderbuffer); - } - - // --- [ glBindRenderbuffer ] --- - - /** - * Binds a renderbuffer to a renderbuffer target. - * - * @param target the renderbuffer target of the binding operation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of the renderbuffer object to bind - */ - public static void glBindRenderbuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int renderbuffer) { - GL30C.glBindRenderbuffer(target, renderbuffer); - } - - // --- [ glDeleteRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteRenderbuffers DeleteRenderbuffers} - * - * @param n the number of renderbuffer objects to be deleted - */ - public static void nglDeleteRenderbuffers(int n, long renderbuffers) { - GL30C.nglDeleteRenderbuffers(n, renderbuffers); - } - - /** - * Deletes renderbuffer objects. - * - * @param renderbuffers an array containing {@code n} renderbuffer objects to be deleted - */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") IntBuffer renderbuffers) { - GL30C.glDeleteRenderbuffers(renderbuffers); - } - - /** Deletes renderbuffer objects. */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") int renderbuffer) { - GL30C.glDeleteRenderbuffers(renderbuffer); - } - - // --- [ glGenRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glGenRenderbuffers GenRenderbuffers} - * - * @param n the number of renderbuffer object names to generate - */ - public static void nglGenRenderbuffers(int n, long renderbuffers) { - GL30C.nglGenRenderbuffers(n, renderbuffers); - } - - /** - * Generates renderbuffer object names. - * - * @param renderbuffers a buffer in which the generated renderbuffer object names are stored - */ - public static void glGenRenderbuffers(@NativeType("GLuint *") IntBuffer renderbuffers) { - GL30C.glGenRenderbuffers(renderbuffers); - } - - /** Generates renderbuffer object names. */ - @NativeType("void") - public static int glGenRenderbuffers() { - return GL30C.glGenRenderbuffers(); - } - - // --- [ glRenderbufferStorage ] --- - - /** - * Establishes data storage, format and dimensions of a renderbuffer object's image. - * - * @param target the target of the allocation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - */ - public static void glRenderbufferStorage(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL30C.glRenderbufferStorage(target, internalformat, width, height); - } - - // --- [ glRenderbufferStorageMultisample ] --- - - /** - * Establishes data storage, format, dimensions and sample count of a renderbuffer object's image. - * - *

    {@link #glRenderbufferStorage RenderbufferStorage} is equivalent to calling this method with the samples set to zero.

    - * - * @param target the target of the allocation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param samples the number of samples to be used for the renderbuffer object's storage - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - */ - public static void glRenderbufferStorageMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL30C.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); - } - - // --- [ glGetRenderbufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetRenderbufferParameteriv GetRenderbufferParameteriv} */ - public static void nglGetRenderbufferParameteriv(int target, int pname, long params) { - GL30C.nglGetRenderbufferParameteriv(target, pname, params); - } - - /** - * Retrieves information about a bound renderbuffer object. - * - * @param target the target of the query operation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30C#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30C#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30C#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30C#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30C#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30C#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30C#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30C#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30C#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30C#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * @param params an array to receive the value of the queried parameter - */ - public static void glGetRenderbufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL30C.glGetRenderbufferParameteriv(target, pname, params); - } - - /** - * Retrieves information about a bound renderbuffer object. - * - * @param target the target of the query operation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30C#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30C#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30C#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30C#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30C#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30C#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30C#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30C#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30C#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30C#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - */ - @NativeType("void") - public static int glGetRenderbufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL30C.glGetRenderbufferParameteri(target, pname); - } - - // --- [ glIsFramebuffer ] --- - - /** - * Determines if a name corresponds to a framebuffer object. - * - * @param framebuffer a value that may be the name of a framebuffer object - */ - @NativeType("GLboolean") - public static boolean glIsFramebuffer(@NativeType("GLuint") int framebuffer) { - return GL30C.glIsFramebuffer(framebuffer); - } - - // --- [ glBindFramebuffer ] --- - - /** - * Binds a framebuffer to a framebuffer target. - * - * @param target the framebuffer target of the binding operation. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param framebuffer the name of the framebuffer object to bind - */ - public static void glBindFramebuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int framebuffer) { - GL30C.glBindFramebuffer(target, framebuffer); - } - - // --- [ glDeleteFramebuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteFramebuffers DeleteFramebuffers} - * - * @param n the number of framebuffer objects to be deleted - */ - public static void nglDeleteFramebuffers(int n, long framebuffers) { - GL30C.nglDeleteFramebuffers(n, framebuffers); - } - - /** - * Deletes framebuffer objects. - * - * @param framebuffers an array containing {@code n} framebuffer objects to be deleted - */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") IntBuffer framebuffers) { - GL30C.glDeleteFramebuffers(framebuffers); - } - - /** Deletes framebuffer objects. */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") int framebuffer) { - GL30C.glDeleteFramebuffers(framebuffer); - } - - // --- [ glGenFramebuffers ] --- - - /** - * Unsafe version of: {@link #glGenFramebuffers GenFramebuffers} - * - * @param n the number of framebuffer object names to generate - */ - public static void nglGenFramebuffers(int n, long framebuffers) { - GL30C.nglGenFramebuffers(n, framebuffers); - } - - /** - * Generates framebuffer object names. - * - * @param framebuffers a buffer in which the generated framebuffer object names are stored - */ - public static void glGenFramebuffers(@NativeType("GLuint *") IntBuffer framebuffers) { - GL30C.glGenFramebuffers(framebuffers); - } - - /** Generates framebuffer object names. */ - @NativeType("void") - public static int glGenFramebuffers() { - return GL30C.glGenFramebuffers(); - } - - // --- [ glCheckFramebufferStatus ] --- - - /** - * Checks the completeness status of a framebuffer. - * - * @param target the target of the framebuffer completeness check. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - */ - @NativeType("GLenum") - public static int glCheckFramebufferStatus(@NativeType("GLenum") int target) { - return GL30C.glCheckFramebufferStatus(target); - } - - // --- [ glFramebufferTexture1D ] --- - - /** - * Attaches a level of a 1D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - */ - public static void glFramebufferTexture1D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL30C.glFramebufferTexture1D(target, attachment, textarget, texture, level); - } - - // --- [ glFramebufferTexture2D ] --- - - /** - * Attaches a level of a 2D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - */ - public static void glFramebufferTexture2D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL30C.glFramebufferTexture2D(target, attachment, textarget, texture, level); - } - - // --- [ glFramebufferTexture3D ] --- - - /** - * Attaches a layer of a 3D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of a 2-dimensional image within the 3-dimensional texture. - */ - public static void glFramebufferTexture3D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer) { - GL30C.glFramebufferTexture3D(target, attachment, textarget, texture, level, layer); - } - - // --- [ glFramebufferTextureLayer ] --- - - /** - * Attaches a single layer of a texture to a framebuffer - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of {@code texture} to attach. - */ - public static void glFramebufferTextureLayer(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer) { - GL30C.glFramebufferTextureLayer(target, attachment, texture, level, layer); - } - - // --- [ glFramebufferRenderbuffer ] --- - - /** - * Attaches a renderbuffer as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param renderbuffertarget the renderbuffer target. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of an existing renderbuffer object of type {@code renderbuffertarget} to attach - */ - public static void glFramebufferRenderbuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer) { - GL30C.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); - } - - // --- [ glGetFramebufferAttachmentParameteriv ] --- - - /** Unsafe version of: {@link #glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv} */ - public static void nglGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, long params) { - GL30C.nglGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - } - - /** - * Retrievees information about attachments of a bound framebuffer object. - * - * @param target the target of the query operation. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment within {@code target}. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * @param params an array to receive the value of the queried parameter - */ - public static void glGetFramebufferAttachmentParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL30C.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - } - - /** - * Retrievees information about attachments of a bound framebuffer object. - * - * @param target the target of the query operation. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment within {@code target}. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - */ - @NativeType("void") - public static int glGetFramebufferAttachmentParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - return GL30C.glGetFramebufferAttachmentParameteri(target, attachment, pname); - } - - // --- [ glBlitFramebuffer ] --- - - /** - * Copies a block of pixels from the read framebuffer to the draw framebuffer. - * - * @param srcX0 the lower-left coordinate of the source rectangle within the read buffer - * @param srcY0 the upper-left coordinate of the source rectangle within the read buffer - * @param srcX1 the lower-right coordinate of the source rectangle within the read buffer - * @param srcY1 the upper-right coordinate of the source rectangle within the read buffer - * @param dstX0 the lower-left coordinate of the destination rectangle within the write buffer - * @param dstY0 the upper-left coordinate of the destination rectangle within the write buffer - * @param dstX1 the lower-right coordinate of the destination rectangle within the write buffer - * @param dstY1 the upper-right coordinate of the destination rectangle within the write buffer - * @param mask the bitwise OR of the flags indicating which buffers are to be copied. One of:
    {@link GL11#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * @param filter the interpolation to be applied if the image is stretched. One of:
    {@link GL11#GL_NEAREST NEAREST}{@link GL11#GL_LINEAR LINEAR}
    - */ - public static void glBlitFramebuffer(@NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter) { - GL30C.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); - } - - // --- [ glGenerateMipmap ] --- - - /** - * Generate mipmaps for a specified texture target. - * - * @param target the target to which the texture whose mimaps to generate is bound. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30C#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL30C#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - */ - public static void glGenerateMipmap(@NativeType("GLenum") int target) { - GL30C.glGenerateMipmap(target); - } - - /** Array version of: {@link #glDeleteRenderbuffers DeleteRenderbuffers} */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") int[] renderbuffers) { - GL30C.glDeleteRenderbuffers(renderbuffers); - } - - /** Array version of: {@link #glGenRenderbuffers GenRenderbuffers} */ - public static void glGenRenderbuffers(@NativeType("GLuint *") int[] renderbuffers) { - GL30C.glGenRenderbuffers(renderbuffers); - } - - /** Array version of: {@link #glGetRenderbufferParameteriv GetRenderbufferParameteriv} */ - public static void glGetRenderbufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL30C.glGetRenderbufferParameteriv(target, pname, params); - } - - /** Array version of: {@link #glDeleteFramebuffers DeleteFramebuffers} */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") int[] framebuffers) { - GL30C.glDeleteFramebuffers(framebuffers); - } - - /** Array version of: {@link #glGenFramebuffers GenFramebuffers} */ - public static void glGenFramebuffers(@NativeType("GLuint *") int[] framebuffers) { - GL30C.glGenFramebuffers(framebuffers); - } - - /** Array version of: {@link #glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv} */ - public static void glGetFramebufferAttachmentParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL30C.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferSRGB.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferSRGB.java deleted file mode 100644 index 3f088467..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBFramebufferSRGB.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_framebuffer_sRGB extension. - * - *

    Conventionally, OpenGL assumes framebuffer color components are stored in a linear color space. In particular, framebuffer blending is a linear - * operation.

    - * - *

    The sRGB color space is based on typical (non-linear) monitor characteristics expected in a dimly lit office. It has been standardized by the - * International Electrotechnical Commission (IEC) as IEC 61966-2-1. The sRGB color space roughly corresponds to 2.2 gamma correction.

    - * - *

    This extension adds a framebuffer capability for sRGB framebuffer update and blending. When blending is disabled but the new sRGB updated mode is - * enabled (assume the framebuffer supports the capability), high-precision linear color component values for red, green, and blue generated by fragment - * coloring are encoded for sRGB prior to being written into the framebuffer. When blending is enabled along with the new sRGB update mode, red, green, and - * blue framebuffer color components are treated as sRGB values that are converted to linear color values, blended with the high-precision color values - * generated by fragment coloring, and then the blend result is encoded for sRGB just prior to being written into the framebuffer.

    - * - *

    The primary motivation for this extension is that it allows OpenGL applications to render into a framebuffer that is scanned to a monitor configured to - * assume framebuffer color values are sRGB encoded. This assumption is roughly true of most PC monitors with default gamma correction. This allows - * applications to achieve faithful color reproduction for OpenGL rendering without adjusting the monitor's gamma correction.

    - * - *

    Requires {@link ARBFramebufferObject ARB_framebuffer_object}. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBFramebufferSRGB { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_FRAMEBUFFER_SRGB = 0x8DB9; - - private ARBFramebufferSRGB() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGLSPIRV.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBGLSPIRV.java deleted file mode 100644 index 550cfb5e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGLSPIRV.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_gl_spirv extension. - * - *

    This is version 100 of the GL_ARB_gl_spirv extension.

    - * - *

    This extension does two things:

    - * - *
      - *
    1. Allows a SPIR-V module to be specified as containing a programmable shader stage, rather than using GLSL, whatever the source language was used to - * create the SPIR-V module.
    2. - *
    3. Modifies GLSL to be a source language for creating SPIR-V modules for OpenGL consumption. Such GLSL can be used to create such SPIR-V modules, - * outside of the OpenGL runtime.
    4. - *
    - * - *

    Requires {@link GL33 OpenGL 3.3}.

    - */ -public class ARBGLSPIRV { - - static { GL.initialize(); } - - /** Accepted by the {@code binaryformat} parameter of {@link GL41C#glShaderBinary ShaderBinary}. */ - public static final int GL_SHADER_BINARY_FORMAT_SPIR_V_ARB = 0x9551; - - /** Accepted by the {@code pname} parameter of {@link GL20C#glGetShaderiv GetShaderiv}. */ - public static final int GL_SPIR_V_BINARY_ARB = 0x9552; - - protected ARBGLSPIRV() { - throw new UnsupportedOperationException(); - } - - // --- [ glSpecializeShaderARB ] --- - - /** - * Unsafe version of: {@link #glSpecializeShaderARB SpecializeShaderARB} - * - * @param numSpecializationConstants the number of specialization constants whose values to set in this call - */ - public static native void nglSpecializeShaderARB(int shader, long pEntryPoint, int numSpecializationConstants, long pConstantIndex, long pConstantValue); - - /** - * Specializes a shader created from a SPIR-V module. - * - *

    Shaders associated with SPIR-V modules must be specialized before they can be linked into a program object. It is not necessary to specialize the - * shader before it is attached to a program object. Once specialized, a shader may not be specialized again without first re-associating the original - * SPIR-V module with it, through {@link GL41C#glShaderBinary ShaderBinary}.

    - * - *

    Specialization does two things:

    - * - *
      - *
    • Selects the name of the entry point, for that shader’s stage, from the SPIR-V module.
    • - *
    • Sets the values of all, or a subset of, the specialization constants in the SPIRV module.
    • - *
    - * - *

    On successful shader specialization, the compile status for shader is set to {@link GL11#GL_TRUE TRUE}. On failure, the compile status for shader is set to {@link GL11#GL_FALSE FALSE} and - * additional information about the cause of the failure may be available in the shader compilation log.

    - * - * @param shader the name of a shader object containing unspecialized SPIR-V as created from a successful call to {@link GL41C#glShaderBinary ShaderBinary} to which a SPIR-V module was - * passed - * @param pEntryPoint a pointer to a null-terminated UTF-8 string specifying the name of the entry point in the SPIR-V module to use for this shader - * @param pConstantIndex is a pointer to an array of {@code numSpecializationConstants} unsigned integers, each holding the index of a specialization constant in the SPIR-V - * module whose value to set. - * - *

    Specialization constants not referenced by {@code pConstantIndex} retain their default values as specified in the SPIR-V module.

    - * @param pConstantValue an entry in {@code pConstantValue} is used to set the value of the specialization constant indexed by the corresponding entry in - * {@code pConstantIndex}. - * - *

    Although this array is of unsigned integer, each entry is bitcast to the appropriate type for the module, and therefore, floating-point constants - * may be set by including their IEEE-754 bit representation in the {@code pConstantValue} array.

    - */ - public static void glSpecializeShaderARB(@NativeType("GLuint") int shader, @NativeType("GLchar const *") ByteBuffer pEntryPoint, @NativeType("GLuint const *") IntBuffer pConstantIndex, @NativeType("GLuint const *") IntBuffer pConstantValue) { - if (CHECKS) { - checkNT1(pEntryPoint); - check(pConstantValue, pConstantIndex.remaining()); - } - nglSpecializeShaderARB(shader, memAddress(pEntryPoint), pConstantIndex.remaining(), memAddress(pConstantIndex), memAddress(pConstantValue)); - } - - /** - * Specializes a shader created from a SPIR-V module. - * - *

    Shaders associated with SPIR-V modules must be specialized before they can be linked into a program object. It is not necessary to specialize the - * shader before it is attached to a program object. Once specialized, a shader may not be specialized again without first re-associating the original - * SPIR-V module with it, through {@link GL41C#glShaderBinary ShaderBinary}.

    - * - *

    Specialization does two things:

    - * - *
      - *
    • Selects the name of the entry point, for that shader’s stage, from the SPIR-V module.
    • - *
    • Sets the values of all, or a subset of, the specialization constants in the SPIRV module.
    • - *
    - * - *

    On successful shader specialization, the compile status for shader is set to {@link GL11#GL_TRUE TRUE}. On failure, the compile status for shader is set to {@link GL11#GL_FALSE FALSE} and - * additional information about the cause of the failure may be available in the shader compilation log.

    - * - * @param shader the name of a shader object containing unspecialized SPIR-V as created from a successful call to {@link GL41C#glShaderBinary ShaderBinary} to which a SPIR-V module was - * passed - * @param pEntryPoint a pointer to a null-terminated UTF-8 string specifying the name of the entry point in the SPIR-V module to use for this shader - * @param pConstantIndex is a pointer to an array of {@code numSpecializationConstants} unsigned integers, each holding the index of a specialization constant in the SPIR-V - * module whose value to set. - * - *

    Specialization constants not referenced by {@code pConstantIndex} retain their default values as specified in the SPIR-V module.

    - * @param pConstantValue an entry in {@code pConstantValue} is used to set the value of the specialization constant indexed by the corresponding entry in - * {@code pConstantIndex}. - * - *

    Although this array is of unsigned integer, each entry is bitcast to the appropriate type for the module, and therefore, floating-point constants - * may be set by including their IEEE-754 bit representation in the {@code pConstantValue} array.

    - */ - public static void glSpecializeShaderARB(@NativeType("GLuint") int shader, @NativeType("GLchar const *") CharSequence pEntryPoint, @NativeType("GLuint const *") IntBuffer pConstantIndex, @NativeType("GLuint const *") IntBuffer pConstantValue) { - if (CHECKS) { - check(pConstantValue, pConstantIndex.remaining()); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pEntryPoint, true); - long pEntryPointEncoded = stack.getPointerAddress(); - nglSpecializeShaderARB(shader, pEntryPointEncoded, pConstantIndex.remaining(), memAddress(pConstantIndex), memAddress(pConstantValue)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glSpecializeShaderARB SpecializeShaderARB} */ - public static void glSpecializeShaderARB(@NativeType("GLuint") int shader, @NativeType("GLchar const *") ByteBuffer pEntryPoint, @NativeType("GLuint const *") int[] pConstantIndex, @NativeType("GLuint const *") int[] pConstantValue) { - long __functionAddress = GL.getICD().glSpecializeShaderARB; - if (CHECKS) { - check(__functionAddress); - checkNT1(pEntryPoint); - check(pConstantValue, pConstantIndex.length); - } - callPPPV(shader, memAddress(pEntryPoint), pConstantIndex.length, pConstantIndex, pConstantValue, __functionAddress); - } - - /** Array version of: {@link #glSpecializeShaderARB SpecializeShaderARB} */ - public static void glSpecializeShaderARB(@NativeType("GLuint") int shader, @NativeType("GLchar const *") CharSequence pEntryPoint, @NativeType("GLuint const *") int[] pConstantIndex, @NativeType("GLuint const *") int[] pConstantValue) { - long __functionAddress = GL.getICD().glSpecializeShaderARB; - if (CHECKS) { - check(__functionAddress); - check(pConstantValue, pConstantIndex.length); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pEntryPoint, true); - long pEntryPointEncoded = stack.getPointerAddress(); - callPPPV(shader, pEntryPointEncoded, pConstantIndex.length, pConstantIndex, pConstantValue, __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShader5.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShader5.java deleted file mode 100644 index c1798f02..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShader5.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_gpu_shader5 extension. - * - *

    This extension provides a set of new features to the OpenGL Shading Language and related APIs to support capabilities of new GPUs, extending the - * capabilities of version 1.50 of the OpenGL Shading Language. Shaders using the new functionality provided by this extension should enable this - * functionality via the construct:

    - * - *
    
    - * #extension GL_ARB_gpu_shader5 : require     (or enable)
    - * - *

    This extension provides a variety of new features for all shader types, including:

    - * - *
      - *
    • support for indexing into arrays of samplers using non-constant indices, as long as the index doesn't diverge if multiple shader invocations are run - * in lockstep;
    • - *
    • extending the uniform block capability of OpenGL 3.1 and 3.2 to allow shaders to index into an array of uniform blocks;
    • - *
    • support for implicitly converting signed integer types to unsigned types, as well as more general implicit conversion and function overloading - * infrastructure to support new data types introduced by other extensions;
    • - *
    • a "precise" qualifier allowing computations to be carried out exactly as specified in the shader source to avoid optimization-induced invariance - * issues (which might cause cracking in tessellation);
    • - *
    • new built-in functions supporting: - * - *
        - *
      • fused floating-point multiply-add operations;
      • - *
      • splitting a floating-point number into a significand and exponent (frexp), or building a floating-point number from a significand and exponent - * (ldexp);
      • - *
      • integer bitfield manipulation, including functions to find the position of the most or least significant set bit, count the number of one bits, - * and bitfield insertion, extraction, and reversal;
      • - *
      • packing and unpacking vectors of small fixed-point data types into a larger scalar; and
      • - *
      • convert floating-point values to or from their integer bit encodings;
      • - *
    • - *
    • extending the textureGather() built-in functions provided by {@link ARBTextureGather ARB_texture_gather}: - * - *
        - *
      • allowing shaders to select any single component of a multi-component texture to produce the gathered 2x2 footprint;
      • - *
      • allowing shaders to perform a per-sample depth comparison when gathering the 2x2 footprint using for shadow sampler types;
      • - *
      • allowing shaders to use arbitrary offsets computed at run-time to select a 2x2 footprint to gather from; and
      • - *
      • allowing shaders to use separate independent offsets for each of the four texels returned, instead of requiring a fixed 2x2 footprint.
      • - *
    • - *
    - * - *

    This extension also provides some new capabilities for individual shader types, including:

    - * - *
      - *
    • support for instanced geometry shaders, where a geometry shader may be run multiple times for each primitive, including a built-in - * {@code gl_InvocationID} to identify the invocation number;
    • - *
    • support for emitting vertices in a geometry program where each vertex emitted may be directed independently at a specified vertex stream (as - * provided by ARB_transform_feedback3), and where each shader output is associated with a stream;
    • - *
    • support for reading a mask of covered samples in a fragment shader; and
    • - *
    • support for interpolating a fragment shader input at a programmable offset relative to the pixel center, a programmable sample number, or at the - * centroid.
    • - *
    - * - *

    Requires {@link GL32 GL32} and GLSL 1.50. Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public final class ARBGPUShader5 { - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, - GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, - GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, - GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D, - GL_MAX_VERTEX_STREAMS = 0x8E71; - - private ARBGPUShader5() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShaderFP64.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShaderFP64.java deleted file mode 100644 index fa3f411e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShaderFP64.java +++ /dev/null @@ -1,949 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_gpu_shader_fp64 extension. - * - *

    This extension allows GLSL shaders to use double-precision floating-point data types, including vectors and matrices of doubles. Doubles may be used as - * inputs, outputs, and uniforms.

    - * - *

    The shading language supports various arithmetic and comparison operators on double-precision scalar, vector, and matrix types, and provides a set of - * built-in functions including:

    - * - *
      - *
    • square roots and inverse square roots;
    • - *
    • fused floating-point multiply-add operations;
    • - *
    • splitting a floating-point number into a significand and exponent (frexp), or building a floating-point number from a significand and exponent - * (ldexp);
    • - *
    • absolute value, sign tests, various functions to round to an integer value, modulus, minimum, maximum, clamping, blending two values, step - * functions, and testing for infinity and NaN values;
    • - *
    • packing and unpacking doubles into a pair of 32-bit unsigned integers;
    • - *
    • matrix component-wise multiplication, and computation of outer products, transposes, determinants, and inverses; and
    • - *
    • vector relational functions.
    • - *
    - * - *

    Double-precision versions of angle, trigonometry, and exponential functions are not supported.

    - * - *

    Implicit conversions are supported from integer and single-precision floating-point values to doubles, and this extension uses the relaxed function - * overloading rules specified by the ARB_gpu_shader5 extension to resolve ambiguities.

    - * - *

    This extension provides API functions for specifying double-precision uniforms in the default uniform block, including functions similar to the uniform - * functions added by {@link EXTDirectStateAccess EXT_direct_state_access} (if supported).

    - * - *

    This extension provides an "LF" suffix for specifying double-precision constants. Floating-point constants without a suffix in GLSL are treated as - * single-precision values for backward compatibility with versions not supporting doubles; similar constants are treated as double-precision values in the - * "C" programming language.

    - * - *

    This extension does not support interpolation of double-precision values; doubles used as fragment shader inputs must be qualified as "flat". - * Additionally, this extension does not allow vertex attributes with 64-bit components. That support is added separately by - * EXT_vertex_attrib_64bit.

    - * - *

    Requires {@link GL32 GL32} and GLSL 1.50. Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public class ARBGPUShaderFP64 { - - static { GL.initialize(); } - - /** Returned in the {@code type} parameter of GetActiveUniform, and GetTransformFeedbackVarying. */ - public static final int - GL_DOUBLE_VEC2 = 0x8FFC, - GL_DOUBLE_VEC3 = 0x8FFD, - GL_DOUBLE_VEC4 = 0x8FFE, - GL_DOUBLE_MAT2 = 0x8F46, - GL_DOUBLE_MAT3 = 0x8F47, - GL_DOUBLE_MAT4 = 0x8F48, - GL_DOUBLE_MAT2x3 = 0x8F49, - GL_DOUBLE_MAT2x4 = 0x8F4A, - GL_DOUBLE_MAT3x2 = 0x8F4B, - GL_DOUBLE_MAT3x4 = 0x8F4C, - GL_DOUBLE_MAT4x2 = 0x8F4D, - GL_DOUBLE_MAT4x3 = 0x8F4E; - - protected ARBGPUShaderFP64() { - throw new UnsupportedOperationException(); - } - - // --- [ glUniform1d ] --- - - /** - * Specifies the value of a double uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static void glUniform1d(@NativeType("GLint") int location, @NativeType("GLdouble") double x) { - GL40C.glUniform1d(location, x); - } - - // --- [ glUniform2d ] --- - - /** - * Specifies the value of a dvec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static void glUniform2d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y) { - GL40C.glUniform2d(location, x, y); - } - - // --- [ glUniform3d ] --- - - /** - * Specifies the value of a dvec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static void glUniform3d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z) { - GL40C.glUniform3d(location, x, y, z); - } - - // --- [ glUniform4d ] --- - - /** - * Specifies the value of a dvec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static void glUniform4d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w) { - GL40C.glUniform4d(location, x, y, z, w); - } - - // --- [ glUniform1dv ] --- - - /** - * Unsafe version of: {@link #glUniform1dv Uniform1dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform1dv(int location, int count, long value) { - GL40C.nglUniform1dv(location, count, value); - } - - /** - * Specifies the value of a single double uniform variable or a double uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glUniform1dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform1dv(location, value); - } - - // --- [ glUniform2dv ] --- - - /** - * Unsafe version of: {@link #glUniform2dv Uniform2dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform2dv(int location, int count, long value) { - GL40C.nglUniform2dv(location, count, value); - } - - /** - * Specifies the value of a single dvec2 uniform variable or a dvec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glUniform2dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform2dv(location, value); - } - - // --- [ glUniform3dv ] --- - - /** - * Unsafe version of: {@link #glUniform3dv Uniform3dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform3dv(int location, int count, long value) { - GL40C.nglUniform3dv(location, count, value); - } - - /** - * Specifies the value of a single dvec3 uniform variable or a dvec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glUniform3dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform3dv(location, value); - } - - // --- [ glUniform4dv ] --- - - /** - * Unsafe version of: {@link #glUniform4dv Uniform4dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform4dv(int location, int count, long value) { - GL40C.nglUniform4dv(location, count, value); - } - - /** - * Specifies the value of a single dvec4 uniform variable or a dvec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glUniform4dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform4dv(location, value); - } - - // --- [ glUniformMatrix2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2dv UniformMatrix2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix2dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2 uniform variable or a dmat2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix2dv(location, transpose, value); - } - - // --- [ glUniformMatrix3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3dv UniformMatrix3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix3dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3 uniform variable or a dmat3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix3dv(location, transpose, value); - } - - // --- [ glUniformMatrix4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4dv UniformMatrix4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix4dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4 uniform variable or a dmat4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix4dv(location, transpose, value); - } - - // --- [ glUniformMatrix2x3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x3dv UniformMatrix2x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2x3dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix2x3dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x3 uniform variable or a dmat2x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix2x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix2x3dv(location, transpose, value); - } - - // --- [ glUniformMatrix2x4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x4dv UniformMatrix2x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2x4dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix2x4dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x4 uniform variable or a dmat2x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix2x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix2x4dv(location, transpose, value); - } - - // --- [ glUniformMatrix3x2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x2dv UniformMatrix3x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3x2dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix3x2dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x2 uniform variable or a dmat3x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix3x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix3x2dv(location, transpose, value); - } - - // --- [ glUniformMatrix3x4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x4dv UniformMatrix3x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3x4dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix3x4dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x4 uniform variable or a dmat3x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix3x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix3x4dv(location, transpose, value); - } - - // --- [ glUniformMatrix4x2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x2dv UniformMatrix4x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4x2dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix4x2dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x2 uniform variable or a dmat4x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix4x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix4x2dv(location, transpose, value); - } - - // --- [ glUniformMatrix4x3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x3dv UniformMatrix4x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4x3dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix4x3dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x3 uniform variable or a dmat4x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glUniformMatrix4x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix4x3dv(location, transpose, value); - } - - // --- [ glGetUniformdv ] --- - - /** Unsafe version of: {@link #glGetUniformdv GetUniformdv} */ - public static void nglGetUniformdv(int program, int location, long params) { - GL40C.nglGetUniformdv(program, location, params); - } - - /** - * Returns the double value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - */ - public static void glGetUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") DoubleBuffer params) { - GL40C.glGetUniformdv(program, location, params); - } - - /** - * Returns the double value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static double glGetUniformd(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL40C.glGetUniformd(program, location); - } - - // --- [ glProgramUniform1dEXT ] --- - - /** - * DSA version of {@link #glUniform1d Uniform1d}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static native void glProgramUniform1dEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x); - - // --- [ glProgramUniform2dEXT ] --- - - /** - * DSA version of {@link #glUniform2d Uniform2d}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static native void glProgramUniform2dEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glProgramUniform3dEXT ] --- - - /** - * DSA version of {@link #glUniform3d Uniform3d}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static native void glProgramUniform3dEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glProgramUniform4dEXT ] --- - - /** - * DSA version of {@link #glUniform4d Uniform4d}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static native void glProgramUniform4dEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glProgramUniform1dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1dvEXT ProgramUniform1dvEXT} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform1dvEXT(int program, int location, int count, long value); - - /** - * DSA version of {@link #glUniform1dv Uniform1dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform1dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform1dvEXT(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2dvEXT ProgramUniform2dvEXT} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform2dvEXT(int program, int location, int count, long value); - - /** - * DSA version of {@link #glUniform2dv Uniform2dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform2dvEXT(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3dvEXT ProgramUniform3dvEXT} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform3dvEXT(int program, int location, int count, long value); - - /** - * DSA version of {@link #glUniform3dv Uniform3dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform3dvEXT(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4dvEXT ProgramUniform4dvEXT} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform4dvEXT(int program, int location, int count, long value); - - /** - * DSA version of {@link #glUniform4dv Uniform4dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform4dvEXT(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2dvEXT ProgramUniformMatrix2dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix2dv UniformMatrix2dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix2dvEXT(program, location, value.remaining() >> 2, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3dvEXT ProgramUniformMatrix3dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix3dv UniformMatrix3dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix3dvEXT(program, location, value.remaining() / 9, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4dvEXT ProgramUniformMatrix4dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix4dv UniformMatrix4dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix4dvEXT(program, location, value.remaining() >> 4, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x3dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x3dvEXT ProgramUniformMatrix2x3dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2x3dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix2x3dv UniformMatrix2x3dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2x3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix2x3dvEXT(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x4dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x4dvEXT ProgramUniformMatrix2x4dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2x4dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix2x4dv UniformMatrix2x4dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2x4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix2x4dvEXT(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x2dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x2dvEXT ProgramUniformMatrix3x2dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3x2dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix3x2dv UniformMatrix3x2dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3x2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix3x2dvEXT(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x4dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x4dvEXT ProgramUniformMatrix3x4dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3x4dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix3x4dv UniformMatrix3x4dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3x4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix3x4dvEXT(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x2dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x2dvEXT ProgramUniformMatrix4x2dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4x2dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix4x2dv UniformMatrix4x2dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4x2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix4x2dvEXT(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x3dvEXT ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x3dvEXT ProgramUniformMatrix4x3dvEXT} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4x3dvEXT(int program, int location, int count, boolean transpose, long value); - - /** - * DSA version of {@link #glUniformMatrix4x3dv UniformMatrix4x3dv}. - * - * @param program the program object to update - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4x3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix4x3dvEXT(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - /** Array version of: {@link #glUniform1dv Uniform1dv} */ - public static void glUniform1dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform1dv(location, value); - } - - /** Array version of: {@link #glUniform2dv Uniform2dv} */ - public static void glUniform2dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform2dv(location, value); - } - - /** Array version of: {@link #glUniform3dv Uniform3dv} */ - public static void glUniform3dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform3dv(location, value); - } - - /** Array version of: {@link #glUniform4dv Uniform4dv} */ - public static void glUniform4dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform4dv(location, value); - } - - /** Array version of: {@link #glUniformMatrix2dv UniformMatrix2dv} */ - public static void glUniformMatrix2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix2dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix3dv UniformMatrix3dv} */ - public static void glUniformMatrix3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix3dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix4dv UniformMatrix4dv} */ - public static void glUniformMatrix4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix4dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix2x3dv UniformMatrix2x3dv} */ - public static void glUniformMatrix2x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix2x3dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix2x4dv UniformMatrix2x4dv} */ - public static void glUniformMatrix2x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix2x4dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix3x2dv UniformMatrix3x2dv} */ - public static void glUniformMatrix3x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix3x2dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix3x4dv UniformMatrix3x4dv} */ - public static void glUniformMatrix3x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix3x4dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix4x2dv UniformMatrix4x2dv} */ - public static void glUniformMatrix4x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix4x2dv(location, transpose, value); - } - - /** Array version of: {@link #glUniformMatrix4x3dv UniformMatrix4x3dv} */ - public static void glUniformMatrix4x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix4x3dv(location, transpose, value); - } - - /** Array version of: {@link #glGetUniformdv GetUniformdv} */ - public static void glGetUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") double[] params) { - GL40C.glGetUniformdv(program, location, params); - } - - /** Array version of: {@link #glProgramUniform1dvEXT ProgramUniform1dvEXT} */ - public static void glProgramUniform1dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform1dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2dvEXT ProgramUniform2dvEXT} */ - public static void glProgramUniform2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform2dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3dvEXT ProgramUniform3dvEXT} */ - public static void glProgramUniform3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform3dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4dvEXT ProgramUniform4dvEXT} */ - public static void glProgramUniform4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform4dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix2dvEXT ProgramUniformMatrix2dvEXT} */ - public static void glProgramUniformMatrix2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix3dvEXT ProgramUniformMatrix3dvEXT} */ - public static void glProgramUniformMatrix3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 9, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix4dvEXT ProgramUniformMatrix4dvEXT} */ - public static void glProgramUniformMatrix4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 4, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix2x3dvEXT ProgramUniformMatrix2x3dvEXT} */ - public static void glProgramUniformMatrix2x3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x3dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix2x4dvEXT ProgramUniformMatrix2x4dvEXT} */ - public static void glProgramUniformMatrix2x4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x4dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix3x2dvEXT ProgramUniformMatrix3x2dvEXT} */ - public static void glProgramUniformMatrix3x2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x2dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix3x4dvEXT ProgramUniformMatrix3x4dvEXT} */ - public static void glProgramUniformMatrix3x4dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x4dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix4x2dvEXT ProgramUniformMatrix4x2dvEXT} */ - public static void glProgramUniformMatrix4x2dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x2dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix4x3dvEXT ProgramUniformMatrix4x3dvEXT} */ - public static void glProgramUniformMatrix4x3dvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x3dvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShaderInt64.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShaderInt64.java deleted file mode 100644 index 657d3d96..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGPUShaderInt64.java +++ /dev/null @@ -1,888 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_gpu_shader_int64 extension. - * - *

    The extension introduces the following features for all shader types:

    - * - *
      - *
    • support for 64-bit scalar and vector integer data types, including uniform API, uniform buffer object, transform feedback, and shader input and - * output support;
    • - *
    • new built-in functions to pack and unpack 64-bit integer types into a two-component 32-bit integer vector;
    • - *
    • new built-in functions to convert double-precision floating-point values to or from their 64-bit integer bit encodings;
    • - *
    • vector relational functions supporting comparisons of vectors of 64-bit integer types; and
    • - *
    • common functions abs, sign, min, max, clamp, and mix supporting arguments of 64-bit integer types.
    • - *
    - * - *

    Requires {@link GL40 GL40} and GLSL 4.00.

    - */ -public class ARBGPUShaderInt64 { - - static { GL.initialize(); } - - /** Returned by the {@code type} parameter of GetActiveAttrib, GetActiveUniform, and GetTransformFeedbackVarying. */ - public static final int - GL_INT64_ARB = 0x140E, - GL_UNSIGNED_INT64_ARB = 0x140F, - GL_INT64_VEC2_ARB = 0x8FE9, - GL_INT64_VEC3_ARB = 0x8FEA, - GL_INT64_VEC4_ARB = 0x8FEB, - GL_UNSIGNED_INT64_VEC2_ARB = 0x8FF5, - GL_UNSIGNED_INT64_VEC3_ARB = 0x8FF6, - GL_UNSIGNED_INT64_VEC4_ARB = 0x8FF7; - - protected ARBGPUShaderInt64() { - throw new UnsupportedOperationException(); - } - - // --- [ glUniform1i64ARB ] --- - - /** - * Specifies the value of an int64_t uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static native void glUniform1i64ARB(@NativeType("GLint") int location, @NativeType("GLint64") long x); - - // --- [ glUniform1i64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform1i64vARB Uniform1i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform1i64vARB(int location, int count, long value); - - /** - * Specifies the value of a single int64_t uniform variable or a int64_t uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified int64_t variable - */ - public static void glUniform1i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglUniform1i64vARB(location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform1i64ARB ] --- - - /** - * Specifies the value of an int64_t uniform variable for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static native void glProgramUniform1i64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64") long x); - - // --- [ glProgramUniform1i64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1i64vARB ProgramUniform1i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform1i64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single int64_t uniform variable or a int64_t uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified int64_t variable - */ - public static void glProgramUniform1i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglProgramUniform1i64vARB(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2i64ARB ] --- - - /** - * Specifies the value of an i64vec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static native void glUniform2i64ARB(@NativeType("GLint") int location, @NativeType("GLint64") long x, @NativeType("GLint64") long y); - - // --- [ glUniform2i64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform2i64vARB Uniform2i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform2i64vARB(int location, int count, long value); - - /** - * Specifies the value of a single i64vec2 uniform variable or a i64vec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified i64vec2 variable - */ - public static void glUniform2i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglUniform2i64vARB(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform2i64ARB ] --- - - /** - * Specifies the value of an i64vec2 uniform variable for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static native void glProgramUniform2i64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64") long x, @NativeType("GLint64") long y); - - // --- [ glProgramUniform2i64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2i64vARB ProgramUniform2i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform2i64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single i64vec2 uniform variable or a i64vec2 uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified i64vec2 variable - */ - public static void glProgramUniform2i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglProgramUniform2i64vARB(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3i64ARB ] --- - - /** - * Specifies the value of an i64vec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static native void glUniform3i64ARB(@NativeType("GLint") int location, @NativeType("GLint64") long x, @NativeType("GLint64") long y, @NativeType("GLint64") long z); - - // --- [ glUniform3i64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform3i64vARB Uniform3i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform3i64vARB(int location, int count, long value); - - /** - * Specifies the value of a single i64vec3 uniform variable or a i64vec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified i64vec3 variable - */ - public static void glUniform3i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglUniform3i64vARB(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform3i64ARB ] --- - - /** - * Specifies the value of an i64vec3 uniform variable for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static native void glProgramUniform3i64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64") long x, @NativeType("GLint64") long y, @NativeType("GLint64") long z); - - // --- [ glProgramUniform3i64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3i64vARB ProgramUniform3i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform3i64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single i64vec3 uniform variable or a i64vec3 uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified i64vec3 variable - */ - public static void glProgramUniform3i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglProgramUniform3i64vARB(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4i64ARB ] --- - - /** - * Specifies the value of an i64vec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static native void glUniform4i64ARB(@NativeType("GLint") int location, @NativeType("GLint64") long x, @NativeType("GLint64") long y, @NativeType("GLint64") long z, @NativeType("GLint64") long w); - - // --- [ glUniform4i64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform4i64vARB Uniform4i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform4i64vARB(int location, int count, long value); - - /** - * Specifies the value of a single i64vec4 uniform variable or a i64vec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified i64vec4 variable - */ - public static void glUniform4i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglUniform4i64vARB(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniform4i64ARB ] --- - - /** - * Specifies the value of an i64vec4 uniform variable for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static native void glProgramUniform4i64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64") long x, @NativeType("GLint64") long y, @NativeType("GLint64") long z, @NativeType("GLint64") long w); - - // --- [ glProgramUniform4i64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4i64vARB ProgramUniform4i64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform4i64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single i64vec4 uniform variable or a i64vec4 uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified i64vec4 variable - */ - public static void glProgramUniform4i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer value) { - nglProgramUniform4i64vARB(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glUniform1ui64ARB ] --- - - /** - * Specifies the value of an uint64_t uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static native void glUniform1ui64ARB(@NativeType("GLint") int location, @NativeType("GLuint64") long x); - - // --- [ glUniform1ui64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform1ui64vARB Uniform1ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform1ui64vARB(int location, int count, long value); - - /** - * Specifies the value of a single uint64_t uniform variable or a uint64_t uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uint64_t variable - */ - public static void glUniform1ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglUniform1ui64vARB(location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform1ui64ARB ] --- - - /** - * Specifies the value of an uint64_t uniform variable for the current program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static native void glProgramUniform1ui64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64") long x); - - // --- [ glProgramUniform1ui64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1ui64vARB ProgramUniform1ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform1ui64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single uint64_t uniform variable or a uint64_t uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uint64_t variable - */ - public static void glProgramUniform1ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglProgramUniform1ui64vARB(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2ui64ARB ] --- - - /** - * Specifies the value of an u64vec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static native void glUniform2ui64ARB(@NativeType("GLint") int location, @NativeType("GLuint64") long x, @NativeType("GLuint64") long y); - - // --- [ glUniform2ui64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform2ui64vARB Uniform2ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform2ui64vARB(int location, int count, long value); - - /** - * Specifies the value of a single u64vec2 uniform variable or a u64vec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified u64vec2 variable - */ - public static void glUniform2ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglUniform2ui64vARB(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform2ui64ARB ] --- - - /** - * Specifies the value of an u64vec2 uniform variable for the current program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static native void glProgramUniform2ui64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64") long x, @NativeType("GLuint64") long y); - - // --- [ glProgramUniform2ui64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2ui64vARB ProgramUniform2ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform2ui64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single u64vec2 uniform variable or a u64vec2 uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified u64vec2 variable - */ - public static void glProgramUniform2ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglProgramUniform2ui64vARB(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3ui64ARB ] --- - - /** - * Specifies the value of an u64vec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static native void glUniform3ui64ARB(@NativeType("GLint") int location, @NativeType("GLuint64") long x, @NativeType("GLuint64") long y, @NativeType("GLuint64") long z); - - // --- [ glUniform3ui64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform3ui64vARB Uniform3ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform3ui64vARB(int location, int count, long value); - - /** - * Specifies the value of a single u64vec3 uniform variable or a u64vec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified u64vec3 variable - */ - public static void glUniform3ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglUniform3ui64vARB(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform3ui64ARB ] --- - - /** - * Specifies the value of an u64vec3 uniform variable for the current program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static native void glProgramUniform3ui64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64") long x, @NativeType("GLuint64") long y, @NativeType("GLuint64") long z); - - // --- [ glProgramUniform3ui64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3ui64vARB ProgramUniform3ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform3ui64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single u64vec3 uniform variable or a u64vec3 uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified u64vec3 variable - */ - public static void glProgramUniform3ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglProgramUniform3ui64vARB(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4ui64ARB ] --- - - /** - * Specifies the value of an u64vec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static native void glUniform4ui64ARB(@NativeType("GLint") int location, @NativeType("GLuint64") long x, @NativeType("GLuint64") long y, @NativeType("GLuint64") long z, @NativeType("GLuint64") long w); - - // --- [ glUniform4ui64vARB ] --- - - /** - * Unsafe version of: {@link #glUniform4ui64vARB Uniform4ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform4ui64vARB(int location, int count, long value); - - /** - * Specifies the value of a single u64vec4 uniform variable or a u64vec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified u64vec4 variable - */ - public static void glUniform4ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglUniform4ui64vARB(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniform4ui64ARB ] --- - - /** - * Specifies the value of an u64vec4 uniform variable for the current program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static native void glProgramUniform4ui64ARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64") long x, @NativeType("GLuint64") long y, @NativeType("GLuint64") long z, @NativeType("GLuint64") long w); - - // --- [ glProgramUniform4ui64vARB ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4ui64vARB ProgramUniform4ui64vARB} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform4ui64vARB(int program, int location, int count, long value); - - /** - * Specifies the value of a single u64vec4 uniform variable or a u64vec4 uniform variable array for the specified program object. - * - * @param program the program object - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified u64vec4 variable - */ - public static void glProgramUniform4ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer value) { - nglProgramUniform4ui64vARB(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glGetUniformi64vARB ] --- - - /** Unsafe version of: {@link #glGetUniformi64vARB GetUniformi64vARB} */ - public static native void nglGetUniformi64vARB(int program, int location, long params); - - /** - * Returns the int64_t value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - */ - public static void glGetUniformi64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformi64vARB(program, location, memAddress(params)); - } - - /** - * Returns the int64_t value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static long glGetUniformi64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetUniformi64vARB(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetUniformui64vARB ] --- - - /** Unsafe version of: {@link #glGetUniformui64vARB GetUniformui64vARB} */ - public static native void nglGetUniformui64vARB(int program, int location, long params); - - /** - * Returns the uint64_t value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - */ - public static void glGetUniformui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformui64vARB(program, location, memAddress(params)); - } - - /** - * Returns the uint64_t value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static long glGetUniformui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetUniformui64vARB(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformi64vARB ] --- - - /** - * Unsafe version of: {@link #glGetnUniformi64vARB GetnUniformi64vARB} - * - * @param bufSize the maximum number of values to write in {@code params} - */ - public static native void nglGetnUniformi64vARB(int program, int location, int bufSize, long params); - - /** - * Robust version of {@link #glGetUniformi64vARB GetUniformi64vARB}. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - */ - public static void glGetnUniformi64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") LongBuffer params) { - nglGetnUniformi64vARB(program, location, params.remaining(), memAddress(params)); - } - - /** - * Robust version of {@link #glGetUniformi64vARB GetUniformi64vARB}. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static long glGetnUniformi64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetnUniformi64vARB(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformui64vARB ] --- - - /** - * Unsafe version of: {@link #glGetnUniformui64vARB GetnUniformui64vARB} - * - * @param bufSize the maximum number of values to write in {@code params} - */ - public static native void nglGetnUniformui64vARB(int program, int location, int bufSize, long params); - - /** - * Robust version of {@link #glGetUniformui64vARB GetUniformui64vARB}. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - */ - public static void glGetnUniformui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 *") LongBuffer params) { - nglGetnUniformui64vARB(program, location, params.remaining(), memAddress(params)); - } - - /** - * Robust version of {@link #glGetUniformui64vARB GetUniformui64vARB}. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static long glGetnUniformui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetnUniformui64vARB(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glUniform1i64vARB Uniform1i64vARB} */ - public static void glUniform1i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glUniform1i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform1i64vARB ProgramUniform1i64vARB} */ - public static void glProgramUniform1i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform1i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glUniform2i64vARB Uniform2i64vARB} */ - public static void glUniform2i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glUniform2i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2i64vARB ProgramUniform2i64vARB} */ - public static void glProgramUniform2i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform2i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glUniform3i64vARB Uniform3i64vARB} */ - public static void glUniform3i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glUniform3i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3i64vARB ProgramUniform3i64vARB} */ - public static void glProgramUniform3i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform3i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glUniform4i64vARB Uniform4i64vARB} */ - public static void glUniform4i64vARB(@NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glUniform4i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4i64vARB ProgramUniform4i64vARB} */ - public static void glProgramUniform4i64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform4i64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glUniform1ui64vARB Uniform1ui64vARB} */ - public static void glUniform1ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glUniform1ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform1ui64vARB ProgramUniform1ui64vARB} */ - public static void glProgramUniform1ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform1ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glUniform2ui64vARB Uniform2ui64vARB} */ - public static void glUniform2ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glUniform2ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2ui64vARB ProgramUniform2ui64vARB} */ - public static void glProgramUniform2ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform2ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glUniform3ui64vARB Uniform3ui64vARB} */ - public static void glUniform3ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glUniform3ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3ui64vARB ProgramUniform3ui64vARB} */ - public static void glProgramUniform3ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform3ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glUniform4ui64vARB Uniform4ui64vARB} */ - public static void glUniform4ui64vARB(@NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glUniform4ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4ui64vARB ProgramUniform4ui64vARB} */ - public static void glProgramUniform4ui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform4ui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glGetUniformi64vARB GetUniformi64vARB} */ - public static void glGetUniformi64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetUniformi64vARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** Array version of: {@link #glGetUniformui64vARB GetUniformui64vARB} */ - public static void glGetUniformui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetUniformui64vARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** Array version of: {@link #glGetnUniformi64vARB GetnUniformi64vARB} */ - public static void glGetnUniformi64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetnUniformi64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - - /** Array version of: {@link #glGetnUniformui64vARB GetnUniformui64vARB} */ - public static void glGetnUniformui64vARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetnUniformui64vARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGeometryShader4.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBGeometryShader4.java deleted file mode 100644 index 81d5366f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGeometryShader4.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_geometry_shader4 extension. - * - *

    ARB_geometry_shader4 defines a new shader type available to be run on the GPU, called a geometry shader. Geometry shaders are run after vertices are - * transformed, but prior to color clamping, flat shading and clipping.

    - * - *

    A geometry shader begins with a single primitive (point, line, triangle). It can read the attributes of any of the vertices in the primitive and use - * them to generate new primitives. A geometry shader has a fixed output primitive type (point, line strip, or triangle strip) and emits vertices to define - * a new primitive. A geometry shader can emit multiple disconnected primitives. The primitives emitted by the geometry shader are clipped and then - * processed like an equivalent OpenGL primitive specified by the application.

    - * - *

    Furthermore, ARB_geometry_shader4 provides four additional primitive types: lines with adjacency, line strips with adjacency, separate triangles with - * adjacency, and triangle strips with adjacency. Some of the vertices specified in these new primitive types are not part of the ordinary primitives, - * instead they represent neighboring vertices that are adjacent to the two line segment end points (lines/strips) or the three triangle edges - * (triangles/tstrips). These vertices can be accessed by geometry shaders and used to match up the vertices emitted by the geometry shader with those of - * neighboring primitives.

    - * - *

    Since geometry shaders expect a specific input primitive type, an error will occur if the application presents primitives of a different type. For - * example, if a geometry shader expects points, an error will occur at {@link GL11#glBegin Begin} time, if a primitive mode of {@link GL11#GL_TRIANGLES TRIANGLES} is specified.

    - * - *

    Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public class ARBGeometryShader4 { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_GEOMETRY_SHADER_ARB = 0x8DD9; - - /** Accepted by the {@code pname} parameter of ProgramParameteriARB and GetProgramiv. */ - public static final int - GL_GEOMETRY_VERTICES_OUT_ARB = 0x8DDA, - GL_GEOMETRY_INPUT_TYPE_ARB = 0x8DDB, - GL_GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29, - GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD, - GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE, - GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF, - GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0, - GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1; - - /** Accepted by the {@code mode} parameter of Begin, DrawArrays, MultiDrawArrays, DrawElements, MultiDrawElements, and DrawRangeElements. */ - public static final int - GL_LINES_ADJACENCY_ARB = 0xA, - GL_LINE_STRIP_ADJACENCY_ARB = 0xB, - GL_TRIANGLES_ADJACENCY_ARB = 0xC, - GL_TRIANGLE_STRIP_ADJACENCY_ARB = 0xD; - - /** Returned by CheckFramebufferStatusARB. */ - public static final int - GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8, - GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachment- ParameterivARB. */ - public static final int - GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetIntegerv, GetFloatv, GetDoublev, and - * GetBooleanv. - */ - public static final int GL_PROGRAM_POINT_SIZE_ARB = 0x8642; - - protected ARBGeometryShader4() { - throw new UnsupportedOperationException(); - } - - // --- [ glProgramParameteriARB ] --- - - /** - * Sets a program object parameter. - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code pname} is {@link #GL_GEOMETRY_INPUT_TYPE_ARB GEOMETRY_INPUT_TYPE_ARB} and {@code value} is not one of {@link GL11#GL_POINTS POINTS}, {@link GL11#GL_LINES LINES}, - * {@link #GL_LINES_ADJACENCY_ARB LINES_ADJACENCY_ARB}, {@link GL11#GL_TRIANGLES TRIANGLES} or {@link #GL_TRIANGLES_ADJACENCY_ARB TRIANGLES_ADJACENCY_ARB}.

    - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code pname} is {@link #GL_GEOMETRY_OUTPUT_TYPE_ARB GEOMETRY_OUTPUT_TYPE_ARB} and {@code value} is not one of {@link GL11#GL_POINTS POINTS}, {@link GL11#GL_LINE_STRIP LINE_STRIP} or - * {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}.

    - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code pname} is {@link #GL_GEOMETRY_VERTICES_OUT_ARB GEOMETRY_VERTICES_OUT_ARB} and {@code value} is negative.

    - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code pname} is {@link #GL_GEOMETRY_VERTICES_OUT_ARB GEOMETRY_VERTICES_OUT_ARB} and {@code value} exceeds {@link #GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB MAX_GEOMETRY_OUTPUT_VERTICES_ARB}.

    - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code pname} is set to {@link #GL_GEOMETRY_VERTICES_OUT_ARB GEOMETRY_VERTICES_OUT_ARB} and the product of {@code value} and the sum of all - * components of all active varying variables exceeds {@link #GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB}.

    - * - * @param program the program object - * @param pname the parameter to set. One of:
    {@link #GL_GEOMETRY_VERTICES_OUT_ARB GEOMETRY_VERTICES_OUT_ARB}{@link #GL_GEOMETRY_INPUT_TYPE_ARB GEOMETRY_INPUT_TYPE_ARB}{@link #GL_GEOMETRY_OUTPUT_TYPE_ARB GEOMETRY_OUTPUT_TYPE_ARB}
    - * @param value the value being set - */ - public static native void glProgramParameteriARB(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint") int value); - - // --- [ glFramebufferTextureARB ] --- - - /** - * Attaches a specified level of a texture object as one of the logical buffers of the currently bound framebuffer object, to render directly into the - * texture image. - * - *

    If {@code texture} is zero, any image or array of images attached to the attachment point named by {@code attachment} is detached, and the state of the - * attachment point is reset to its initial values. {@code level} is ignored if {@code texture} is zero.

    - * - *

    If {@code texture} is non-zero, FramebufferTextureARB attaches level {@code level} of the texture object named {@code texture} to the framebuffer - * attachment point named by {@code attachment}. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code texture} is not the name of a texture object, or if - * {@code level} is not a supported texture level number for textures of the type corresponding to {@code target}. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is - * generated if {@code texture} is the name of a buffer texture.

    - * - *

    If {@code texture} is the name of a three-dimensional texture, cube map texture, or one- or two-dimensional array texture, the texture level attached to - * the framebuffer attachment point is an array of images, and the framebuffer attachment is considered layered.

    - * - * @param target the render target. Must be:
    {@link ARBFramebufferObject#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param attachment must be one of the attachments points of the framebuffer - * @param texture the texture object name - * @param level the texture level - */ - public static native void glFramebufferTextureARB(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glFramebufferTextureLayerARB ] --- - - /** - * Operates like {@link #glFramebufferTextureARB FramebufferTextureARB}, except that only a single layer of the texture level, numbered {@code layer}, is attached to the attachment - * point. - * - *

    If {@code texture} is non-zero, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code layer} is negative, or if {@code texture} is not the name of a - * texture object. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated unless {@code texture} is zero or the name of a three-dimensional or one- or - * two-dimensional array texture.

    - * - * @param target the render target. Must be:
    {@link ARBFramebufferObject#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param attachment must be one of the attachments points of the framebuffer - * @param texture the texture object name - * @param level the texture level - * @param layer the texture layer - */ - public static native void glFramebufferTextureLayerARB(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer); - - // --- [ glFramebufferTextureFaceARB ] --- - - /** - * Operates like {@link #glFramebufferTextureARB FramebufferTextureARB}, except that only a single face of a cube map texture, given by {@code face}, is attached to the attachment - * point. - * - *

    If {@code texture} is non-zero, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code texture} is not the name of a texture object. The error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated unless {@code texture} is zero or the name of a cube map texture.

    - * - * @param target the render target. Must be:
    {@link ARBFramebufferObject#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param attachment must be one of the attachments points of the framebuffer - * @param texture the texture object name - * @param level the texture level - * @param face the cube map face. One of:
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - */ - public static native void glFramebufferTextureFaceARB(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int face); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGetProgramBinary.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBGetProgramBinary.java deleted file mode 100644 index 3148c5d3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGetProgramBinary.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_get_program_binary extension. - * - *

    This extension introduces new commands to retrieve and set the binary representation of a program object. {@link #glGetProgramBinary GetProgramBinary} allows an application to - * cache compiled and linked programs to avoid compiling and linking when used again. This may even allow the GL itself to act as an offline compiler. The - * resulting program binary can be reloaded into the GL via {@link #glProgramBinary ProgramBinary}. This is a very useful path for applications that wish to remain portable by - * shipping pure GLSL source shaders, yet would like to avoid the cost of compiling their shaders at runtime. Instead an application can supply its GLSL - * source shaders during first application run, or even during installation. The application then compiles and links its shaders and reads back the program - * binaries. On subsequent runs, only the program binaries need be supplied.

    - * - *

    {@link #glProgramBinary ProgramBinary} may also accept binaries in vendor-specific formats produced by specialized offline compilation tools. This extension does not add any - * such formats, but allows for them in further extensions. Though the level of optimization may not be identical -- the offline shader compiler may have - * the luxury of more aggressive optimization at its disposal -- program binaries generated online by the GL are interchangeable with those generated - * offline by an SDK tool.

    - * - *

    Requires {@link GL30 OpenGL 3.0}. Promoted to core in {@link GL41 OpenGL 4.1}.

    - */ -public class ARBGetProgramBinary { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_PROGRAM_BINARY_LENGTH = 0x8741; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv and GetDoublev. */ - public static final int - GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, - GL_PROGRAM_BINARY_FORMATS = 0x87FF; - - protected ARBGetProgramBinary() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetProgramBinary ] --- - - /** - * Unsafe version of: {@link #glGetProgramBinary GetProgramBinary} - * - * @param bufSize the size of the buffer whose address is given by {@code binary} - */ - public static void nglGetProgramBinary(int program, int bufSize, long length, long binaryFormat, long binary) { - GL41C.nglGetProgramBinary(program, bufSize, length, binaryFormat, binary); - } - - /** - * Returns a binary representation of a program object's compiled and linked executable source. - * - * @param program the name of a program object whose binary representation to retrieve - * @param length the address of a variable to receive the number of bytes written into {@code binary} - * @param binaryFormat a variable to receive a token indicating the format of the binary data returned by the GL - * @param binary an array into which the GL will return {@code program}'s binary representation - */ - public static void glGetProgramBinary(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLenum *") IntBuffer binaryFormat, @NativeType("void *") ByteBuffer binary) { - GL41C.glGetProgramBinary(program, length, binaryFormat, binary); - } - - // --- [ glProgramBinary ] --- - - /** - * Unsafe version of: {@link #glProgramBinary ProgramBinary} - * - * @param length the number of bytes contained in {@code binary} - */ - public static void nglProgramBinary(int program, int binaryFormat, long binary, int length) { - GL41C.nglProgramBinary(program, binaryFormat, binary, length); - } - - /** - * Loads a program object with a program binary. - * - * @param program the name of a program object into which to load a program binary - * @param binaryFormat the format of the binary data in binary - * @param binary an array containing the binary to be loaded into {@code program} - */ - public static void glProgramBinary(@NativeType("GLuint") int program, @NativeType("GLenum") int binaryFormat, @NativeType("void const *") ByteBuffer binary) { - GL41C.glProgramBinary(program, binaryFormat, binary); - } - - // --- [ glProgramParameteri ] --- - - /** - * Specifies the integer value of a program object parameter. - * - * @param program the name of a program object whose parameter to modify - * @param pname the name of the parameter to modify. One of:
    {@link GL41C#GL_PROGRAM_BINARY_RETRIEVABLE_HINT PROGRAM_BINARY_RETRIEVABLE_HINT}{@link GL41C#GL_PROGRAM_SEPARABLE PROGRAM_SEPARABLE}
    - * @param value the new value of the parameter specified by {@code pname} for {@code program} - */ - public static void glProgramParameteri(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint") int value) { - GL41C.glProgramParameteri(program, pname, value); - } - - /** Array version of: {@link #glGetProgramBinary GetProgramBinary} */ - public static void glGetProgramBinary(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLenum *") int[] binaryFormat, @NativeType("void *") ByteBuffer binary) { - GL41C.glGetProgramBinary(program, length, binaryFormat, binary); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGetTextureSubImage.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBGetTextureSubImage.java deleted file mode 100644 index 70388a12..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBGetTextureSubImage.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_get_texture_sub_image extension. - * - *

    This extension adds a new function to get sub-regions of texture images.

    - * - *

    Requires {@link GL20 OpenGL 2.0}. Promoted to core in {@link GL45 OpenGL 4.5}.

    - */ -public class ARBGetTextureSubImage { - - static { GL.initialize(); } - - protected ARBGetTextureSubImage() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetTextureSubImage ] --- - - /** - * Unsafe version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int bufSize, long pixels) { - GL45C.nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - // --- [ glGetCompressedTextureSubImage ] --- - - /** - * Unsafe version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int bufSize, long pixels) { - GL45C.nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") ShortBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") IntBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") FloatBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") DoubleBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** Array version of: {@link #glGetTextureSubImage GetTextureSubImage} */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glGetTextureSubImage GetTextureSubImage} */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glGetTextureSubImage GetTextureSubImage} */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glGetTextureSubImage GetTextureSubImage} */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") short[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") int[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") float[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") double[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBHalfFloatPixel.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBHalfFloatPixel.java deleted file mode 100644 index 600ad0b0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBHalfFloatPixel.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_half_float_pixel extension. - * - *

    This extension introduces a new data type for half-precision (16-bit) floating-point quantities. The floating-point format is very similar to the IEEE - * single-precision floating-point standard, except that it has only 5 exponent bits and 10 mantissa bits. Half-precision floats are smaller than full - * precision floats and provide a larger dynamic range than similarly sized normalized scalar data types.

    - * - *

    This extension allows applications to use half-precision floating-point data when specifying pixel data. It extends the existing image specification - * commands to accept the new data type.

    - * - *

    Floating-point data is clamped to [0, 1] at various places in the GL unless clamping is disabled with the ARB_color_buffer_float extension.

    - * - *

    Requires {@link GL15 OpenGL 1.5}. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBHalfFloatPixel { - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, - * ColorTable, ColorSubTable, and GetColorTable. - */ - public static final int GL_HALF_FLOAT_ARB = 0x140B; - - private ARBHalfFloatPixel() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBHalfFloatVertex.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBHalfFloatVertex.java deleted file mode 100644 index 454ea6fe..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBHalfFloatVertex.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_half_float_vertex extension. - * - *

    This extension extends the usage of the half-precision (16-bit) floating-point quantities introduced in {@link ARBHalfFloatPixel ARB_half_float_pixel} for usage in - * specifying vertex array data.

    - * - *

    This extension allows applications to use half-precision floating point data when specifying vertices. This can allow applications to reduce their - * memory footprint, as well as the memory bandwidth required for vertex data.

    - * - *

    This extension extends the existing vertex array commands to accept the new data type.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBHalfFloatVertex { - - /** - * Accepted by the {@code type} argument of VertexPointer, NormalPointer, ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, and - * VertexAttribPointer. - */ - public static final int GL_HALF_FLOAT = 0x140B; - - private ARBHalfFloatVertex() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBImaging.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBImaging.java deleted file mode 100644 index 4518c6cc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBImaging.java +++ /dev/null @@ -1,1303 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the OpenGL 1.2 optional imaging subset. */ -public class ARBImaging { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of ColorTable, CopyColorTable, ColorTableParameteriv, ColorTableParameterfv, - * GetColorTable, GetColorTableParameteriv, and GetColorTableParameterfv. - */ - public static final int - GL_COLOR_TABLE = 0x80D0, - GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1, - GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2; - - /** Accepted by the {@code target} parameter of ColorTable, GetColorTableParameteriv, and GetColorTableParameterfv. */ - public static final int - GL_PROXY_COLOR_TABLE = 0x80D3, - GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4, - GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5; - - /** - * Accepted by the {@code pname} parameter of ColorTableParameteriv, ColorTableParameterfv, GetColorTableParameteriv, and - * GetColorTableParameterfv. - */ - public static final int - GL_COLOR_TABLE_SCALE = 0x80D6, - GL_COLOR_TABLE_BIAS = 0x80D7; - - /** Accepted by the {@code pname} parameter of GetColorTableParameteriv and GetColorTableParameterfv. */ - public static final int - GL_COLOR_TABLE_FORMAT = 0x80D8, - GL_COLOR_TABLE_WIDTH = 0x80D9, - GL_COLOR_TABLE_RED_SIZE = 0x80DA, - GL_COLOR_TABLE_GREEN_SIZE = 0x80DB, - GL_COLOR_TABLE_BLUE_SIZE = 0x80DC, - GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD, - GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE, - GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF; - - /** ErrorCode */ - public static final int GL_TABLE_TOO_LARGE = 0x8031; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of ConvolutionFilter1D, CopyConvolutionFilter1D, GetConvolutionFilter, ConvolutionParameteri, - * ConvolutionParameterf, ConvolutionParameteriv, ConvolutionParameterfv, GetConvolutionParameteriv, and GetConvolutionParameterfv. - */ - public static final int GL_CONVOLUTION_1D = 0x8010; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of ConvolutionFilter2D, CopyConvolutionFilter2D, GetConvolutionFilter, ConvolutionParameteri, - * ConvolutionParameterf, ConvolutionParameteriv, ConvolutionParameterfv, GetConvolutionParameteriv, and GetConvolutionParameterfv. - */ - public static final int GL_CONVOLUTION_2D = 0x8011; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of SeparableFilter2D, SeparableFilter2D, GetSeparableFilter, ConvolutionParameteri, - * ConvolutionParameterf, ConvolutionParameteriv, ConvolutionParameterfv, GetConvolutionParameteriv, and GetConvolutionParameterfv. - */ - public static final int GL_SEPARABLE_2D = 0x8012; - - /** - * Accepted by the {@code pname} parameter of ConvolutionParameteri, ConvolutionParameterf, ConvolutionParameteriv, ConvolutionParameterfv, - * GetConvolutionParameteriv, and GetConvolutionParameterfv. - */ - public static final int GL_CONVOLUTION_BORDER_MODE = 0x8013; - - /** Accepted by the {@code pname} parameter of ConvolutionParameteriv, ConvolutionParameterfv, GetConvolutionParameteriv, and GetConvolutionParameterfv. */ - public static final int - GL_CONVOLUTION_FILTER_SCALE = 0x8014, - GL_CONVOLUTION_FILTER_BIAS = 0x8015; - - /** - * Accepted by the {@code param} parameter of ConvolutionParameteri, and ConvolutionParameterf, and by the {@code params} parameter of - * ConvolutionParameteriv and ConvolutionParameterfv, when the {@code pname} parameter is CONVOLUTION_BORDER_MODE. - */ - public static final int GL_REDUCE = 0x8016; - - /** Accepted by the {@code pname} parameter of GetConvolutionParameteriv and GetConvolutionParameterfv. */ - public static final int - GL_CONVOLUTION_FORMAT = 0x8017, - GL_CONVOLUTION_WIDTH = 0x8018, - GL_CONVOLUTION_HEIGHT = 0x8019, - GL_MAX_CONVOLUTION_WIDTH = 0x801A, - GL_MAX_CONVOLUTION_HEIGHT = 0x801B; - - /** - * Accepted by the {@code pname} parameter of PixelTransferi, PixelTransferf, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, - * and GetDoublev. - */ - public static final int - GL_POST_CONVOLUTION_RED_SCALE = 0x801C, - GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D, - GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E, - GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F, - GL_POST_CONVOLUTION_RED_BIAS = 0x8020, - GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021, - GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022, - GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023; - - /** - * Accepted by the {@code param} parameter of ConvolutionParameteri, and ConvolutionParameterf, and by the {@code params} parameter of - * ConvolutionParameteriv and ConvolutionParameterfv, when the {@code pname} parameter is CONVOLUTION_BORDER_MODE. - */ - public static final int - GL_CONSTANT_BORDER = 0x8151, - GL_REPLICATE_BORDER = 0x8153; - - /** Accepted by the {@code pname} parameter of ConvolutionParameteriv, ConvolutionParameterfv, GetConvolutionParameteriv, and GetConvolutionParameterfv. */ - public static final int GL_CONVOLUTION_BORDER_COLOR = 0x8154; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_COLOR_MATRIX = 0x80B1, - GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2, - GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3; - - /** Accepted by the {@code pname} parameter of PixelTransfer*, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4, - GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5, - GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6, - GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7, - GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8, - GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9, - GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA, - GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of Histogram, ResetHistogram, GetHistogram, GetHistogramParameteriv, and - * GetHistogramParameterfv. - */ - public static final int GL_HISTOGRAM = 0x8024; - - /** Accepted by the {@code target} parameter of Histogram, GetHistogramParameteriv, and GetHistogramParameterfv. */ - public static final int GL_PROXY_HISTOGRAM = 0x8025; - - /** Accepted by the {@code pname} parameter of GetHistogramParameteriv and GetHistogramParameterfv. */ - public static final int - GL_HISTOGRAM_WIDTH = 0x8026, - GL_HISTOGRAM_FORMAT = 0x8027, - GL_HISTOGRAM_RED_SIZE = 0x8028, - GL_HISTOGRAM_GREEN_SIZE = 0x8029, - GL_HISTOGRAM_BLUE_SIZE = 0x802A, - GL_HISTOGRAM_ALPHA_SIZE = 0x802B, - GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C, - GL_HISTOGRAM_SINK = 0x802D; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of Minmax, ResetMinmax, GetMinmax, GetMinmaxParameteriv, and GetMinmaxParameterfv. - */ - public static final int GL_MINMAX = 0x802E; - - /** Accepted by the {@code pname} parameter of GetMinmaxParameteriv and GetMinmaxParameterfv. */ - public static final int - GL_MINMAX_FORMAT = 0x802F, - GL_MINMAX_SINK = 0x8030; - - /** Accepted by the {@code sfactor} and {@code dfactor} parameters of BlendFunc. */ - public static final int - GL_CONSTANT_COLOR = 0x8001, - GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, - GL_CONSTANT_ALPHA = 0x8003, - GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_BLEND_COLOR = 0x8005; - - /** Accepted by the {@code mode} parameter of BlendEquation. */ - public static final int - GL_FUNC_ADD = 0x8006, - GL_MIN = 0x8007, - GL_MAX = 0x8008; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_BLEND_EQUATION = 0x8009; - - /** Accepted by the {@code mode} parameter of BlendEquation. */ - public static final int - GL_FUNC_SUBTRACT = 0x800A, - GL_FUNC_REVERSE_SUBTRACT = 0x800B; - - protected ARBImaging() { - throw new UnsupportedOperationException(); - } - - // --- [ glColorTable ] --- - - /** Unsafe version of: {@link #glColorTable ColorTable} */ - public static native void nglColorTable(int target, int internalformat, int width, int format, int type, long table); - - /** - * Specifies a color lookup table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    {@link #GL_PROXY_COLOR_TABLE PROXY_COLOR_TABLE}{@link #GL_PROXY_POST_CONVOLUTION_COLOR_TABLE PROXY_POST_CONVOLUTION_COLOR_TABLE}{@link #GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE PROXY_POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param internalformat the color table internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the color table width - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer table) { - nglColorTable(target, internalformat, width, format, type, memAddress(table)); - } - - /** - * Specifies a color lookup table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    {@link #GL_PROXY_COLOR_TABLE PROXY_COLOR_TABLE}{@link #GL_PROXY_POST_CONVOLUTION_COLOR_TABLE PROXY_POST_CONVOLUTION_COLOR_TABLE}{@link #GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE PROXY_POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param internalformat the color table internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the color table width - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long table) { - nglColorTable(target, internalformat, width, format, type, table); - } - - /** - * Specifies a color lookup table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    {@link #GL_PROXY_COLOR_TABLE PROXY_COLOR_TABLE}{@link #GL_PROXY_POST_CONVOLUTION_COLOR_TABLE PROXY_POST_CONVOLUTION_COLOR_TABLE}{@link #GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE PROXY_POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param internalformat the color table internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the color table width - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer table) { - nglColorTable(target, internalformat, width, format, type, memAddress(table)); - } - - /** - * Specifies a color lookup table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    {@link #GL_PROXY_COLOR_TABLE PROXY_COLOR_TABLE}{@link #GL_PROXY_POST_CONVOLUTION_COLOR_TABLE PROXY_POST_CONVOLUTION_COLOR_TABLE}{@link #GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE PROXY_POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param internalformat the color table internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the color table width - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer table) { - nglColorTable(target, internalformat, width, format, type, memAddress(table)); - } - - /** - * Specifies a color lookup table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    {@link #GL_PROXY_COLOR_TABLE PROXY_COLOR_TABLE}{@link #GL_PROXY_POST_CONVOLUTION_COLOR_TABLE PROXY_POST_CONVOLUTION_COLOR_TABLE}{@link #GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE PROXY_POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param internalformat the color table internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the color table width - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer table) { - nglColorTable(target, internalformat, width, format, type, memAddress(table)); - } - - // --- [ glCopyColorTable ] --- - - /** - * Defines a color table in exactly the manner of {@link #glColorTable ColorTable}, except that the image data are taken from the framebuffer rather than from client memory. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param internalformat the color table internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the color table width - */ - public static native void glCopyColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width); - - // --- [ glColorTableParameteriv ] --- - - /** Unsafe version of: {@link #glColorTableParameteriv ColorTableParameteriv} */ - public static native void nglColorTableParameteriv(int target, int pname, long params); - - /** - * Specifies the scale and bias parameters for a color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param pname the parameter to set. One of:
    {@link #GL_COLOR_TABLE_SCALE COLOR_TABLE_SCALE}{@link #GL_COLOR_TABLE_BIAS COLOR_TABLE_BIAS}
    - * @param params the parameter value - */ - public static void glColorTableParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglColorTableParameteriv(target, pname, memAddress(params)); - } - - // --- [ glColorTableParameterfv ] --- - - /** Unsafe version of: {@link #glColorTableParameterfv ColorTableParameterfv} */ - public static native void nglColorTableParameterfv(int target, int pname, long params); - - /** - * Float version of {@link #glColorTableParameteriv ColorTableParameteriv}. - * - * @param target the color table target - * @param pname the parameter to set - * @param params the parameter value - */ - public static void glColorTableParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglColorTableParameterfv(target, pname, memAddress(params)); - } - - // --- [ glGetColorTable ] --- - - /** Unsafe version of: {@link #glGetColorTable GetColorTable} */ - public static native void nglGetColorTable(int target, int format, int type, long table); - - /** - * Returns the current contents of a color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer table) { - nglGetColorTable(target, format, type, memAddress(table)); - } - - /** - * Returns the current contents of a color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long table) { - nglGetColorTable(target, format, type, table); - } - - /** - * Returns the current contents of a color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer table) { - nglGetColorTable(target, format, type, memAddress(table)); - } - - /** - * Returns the current contents of a color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer table) { - nglGetColorTable(target, format, type, memAddress(table)); - } - - /** - * Returns the current contents of a color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table the color table data - */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer table) { - nglGetColorTable(target, format, type, memAddress(table)); - } - - // --- [ glGetColorTableParameteriv ] --- - - /** Unsafe version of: {@link #glGetColorTableParameteriv GetColorTableParameteriv} */ - public static native void nglGetColorTableParameteriv(int target, int pname, long params); - - /** - * Returns the integer value of the specified color table parameter. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    {@link #GL_PROXY_COLOR_TABLE PROXY_COLOR_TABLE}{@link #GL_PROXY_POST_CONVOLUTION_COLOR_TABLE PROXY_POST_CONVOLUTION_COLOR_TABLE}{@link #GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE PROXY_POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param pname the parameter to query. One of:
    {@link #GL_COLOR_TABLE_SCALE COLOR_TABLE_SCALE}{@link #GL_COLOR_TABLE_BIAS COLOR_TABLE_BIAS}{@link #GL_COLOR_TABLE_FORMAT COLOR_TABLE_FORMAT}
    {@link #GL_COLOR_TABLE_WIDTH COLOR_TABLE_WIDTH}{@link #GL_COLOR_TABLE_RED_SIZE COLOR_TABLE_RED_SIZE}{@link #GL_COLOR_TABLE_GREEN_SIZE COLOR_TABLE_GREEN_SIZE}
    {@link #GL_COLOR_TABLE_BLUE_SIZE COLOR_TABLE_BLUE_SIZE}{@link #GL_COLOR_TABLE_ALPHA_SIZE COLOR_TABLE_ALPHA_SIZE}{@link #GL_COLOR_TABLE_LUMINANCE_SIZE COLOR_TABLE_LUMINANCE_SIZE}
    {@link #GL_COLOR_TABLE_INTENSITY_SIZE COLOR_TABLE_INTENSITY_SIZE}
    - * @param params a buffer in which to place the returned value - */ - public static void glGetColorTableParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetColorTableParameteriv(target, pname, memAddress(params)); - } - - /** - * Returns the integer value of the specified color table parameter. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    {@link #GL_PROXY_COLOR_TABLE PROXY_COLOR_TABLE}{@link #GL_PROXY_POST_CONVOLUTION_COLOR_TABLE PROXY_POST_CONVOLUTION_COLOR_TABLE}{@link #GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE PROXY_POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param pname the parameter to query. One of:
    {@link #GL_COLOR_TABLE_SCALE COLOR_TABLE_SCALE}{@link #GL_COLOR_TABLE_BIAS COLOR_TABLE_BIAS}{@link #GL_COLOR_TABLE_FORMAT COLOR_TABLE_FORMAT}
    {@link #GL_COLOR_TABLE_WIDTH COLOR_TABLE_WIDTH}{@link #GL_COLOR_TABLE_RED_SIZE COLOR_TABLE_RED_SIZE}{@link #GL_COLOR_TABLE_GREEN_SIZE COLOR_TABLE_GREEN_SIZE}
    {@link #GL_COLOR_TABLE_BLUE_SIZE COLOR_TABLE_BLUE_SIZE}{@link #GL_COLOR_TABLE_ALPHA_SIZE COLOR_TABLE_ALPHA_SIZE}{@link #GL_COLOR_TABLE_LUMINANCE_SIZE COLOR_TABLE_LUMINANCE_SIZE}
    {@link #GL_COLOR_TABLE_INTENSITY_SIZE COLOR_TABLE_INTENSITY_SIZE}
    - */ - @NativeType("void") - public static int glGetColorTableParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetColorTableParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetColorTableParameterfv ] --- - - /** Unsafe version of: {@link #glGetColorTableParameterfv GetColorTableParameterfv} */ - public static native void nglGetColorTableParameterfv(int target, int pname, long params); - - /** - * Float version of {@link #glGetColorTableParameteriv GetColorTableParameteriv}. - * - * @param target the color table target - * @param pname the parameter to query - * @param params a buffer in which to place the returned value - */ - public static void glGetColorTableParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetColorTableParameterfv(target, pname, memAddress(params)); - } - - /** - * Float version of {@link #glGetColorTableParameteriv GetColorTableParameteriv}. - * - * @param target the color table target - * @param pname the parameter to query - */ - @NativeType("void") - public static float glGetColorTableParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetColorTableParameterfv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glColorSubTable ] --- - - /** Unsafe version of: {@link #glColorSubTable ColorSubTable} */ - public static native void nglColorSubTable(int target, int start, int count, int format, int type, long data); - - /** - * Respecifies a portion of an existing color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param start the starting index of the subregion to respecify - * @param count the number of colors in the subregion to respecify - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param data the color table data - */ - public static void glColorSubTable(@NativeType("GLenum") int target, @NativeType("GLsizei") int start, @NativeType("GLsizei") int count, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer data) { - nglColorSubTable(target, start, count, format, type, memAddress(data)); - } - - /** - * Respecifies a portion of an existing color table. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param start the starting index of the subregion to respecify - * @param count the number of colors in the subregion to respecify - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param data the color table data - */ - public static void glColorSubTable(@NativeType("GLenum") int target, @NativeType("GLsizei") int start, @NativeType("GLsizei") int count, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long data) { - nglColorSubTable(target, start, count, format, type, data); - } - - // --- [ glCopyColorSubTable ] --- - - /** - * Respecifies a portion of an existing color table using image taken from the framebuffer. - * - * @param target the color table target. One of:
    {@link #GL_COLOR_TABLE COLOR_TABLE}{@link #GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link #GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param start the start index of the subregion to respecify - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the number of colors in the subregion to respecify - */ - public static native void glCopyColorSubTable(@NativeType("GLenum") int target, @NativeType("GLsizei") int start, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width); - - // --- [ glConvolutionFilter1D ] --- - - /** Unsafe version of: {@link #glConvolutionFilter1D ConvolutionFilter1D} */ - public static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, long data); - - /** - * Defines a one-dimensional convolution filter. - * - * @param target the convolution target. Must be:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the filter width - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param data the filter data - */ - public static void glConvolutionFilter1D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer data) { - nglConvolutionFilter1D(target, internalformat, width, format, type, memAddress(data)); - } - - /** - * Defines a one-dimensional convolution filter. - * - * @param target the convolution target. Must be:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the filter width - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param data the filter data - */ - public static void glConvolutionFilter1D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long data) { - nglConvolutionFilter1D(target, internalformat, width, format, type, data); - } - - // --- [ glConvolutionFilter2D ] --- - - /** Unsafe version of: {@link #glConvolutionFilter2D ConvolutionFilter2D} */ - public static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, long data); - - /** - * Defines a two-dimensional convolution filter. - * - * @param target the convolution target. Must be:
    {@link #GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the filter width - * @param height the filter height - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param data the filter data - */ - public static void glConvolutionFilter2D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer data) { - nglConvolutionFilter2D(target, internalformat, width, height, format, type, memAddress(data)); - } - - /** - * Defines a two-dimensional convolution filter. - * - * @param target the convolution target. Must be:
    {@link #GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the filter width - * @param height the filter height - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param data the filter data - */ - public static void glConvolutionFilter2D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long data) { - nglConvolutionFilter2D(target, internalformat, width, height, format, type, data); - } - - // --- [ glCopyConvolutionFilter1D ] --- - - /** - * Defines a one-dimensional filter in exactly the manner of {@link #glConvolutionFilter1D ConvolutionFilter1D}, except that image data are taken from the framebuffer, rather than from - * client memory. - * - * @param target the convolution target. Must be:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the filter width - */ - public static native void glCopyConvolutionFilter1D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width); - - // --- [ glCopyConvolutionFilter2D ] --- - - /** - * Defines a two-dimensional filter in exactly the manner of {@link #glConvolutionFilter1D ConvolutionFilter1D}, except that image data are taken from the framebuffer, rather than from - * client memory. - * - * @param target the convolution target. Must be:
    {@link #GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the filter width - * @param height the filter height - */ - public static native void glCopyConvolutionFilter2D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glGetConvolutionFilter ] --- - - /** Unsafe version of: {@link #glGetConvolutionFilter GetConvolutionFilter} */ - public static native void nglGetConvolutionFilter(int target, int format, int type, long image); - - /** - * Returns the contents of a convolution filter. - * - * @param target the convolution target. One of:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}{@link #GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param image the filter data - */ - public static void glGetConvolutionFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer image) { - nglGetConvolutionFilter(target, format, type, memAddress(image)); - } - - /** - * Returns the contents of a convolution filter. - * - * @param target the convolution target. One of:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}{@link #GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param image the filter data - */ - public static void glGetConvolutionFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long image) { - nglGetConvolutionFilter(target, format, type, image); - } - - // --- [ glSeparableFilter2D ] --- - - /** Unsafe version of: {@link #glSeparableFilter2D SeparableFilter2D} */ - public static native void nglSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, long row, long column); - - /** - * Specifies a two-dimensional separable convolution filter. - * - * @param target the filter target. Must be:
    {@link #GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the filter width - * @param height the filter height - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param row the horizontal filter data - * @param column the vertical filter data - */ - public static void glSeparableFilter2D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer row, @NativeType("void const *") ByteBuffer column) { - nglSeparableFilter2D(target, internalformat, width, height, format, type, memAddress(row), memAddress(column)); - } - - /** - * Specifies a two-dimensional separable convolution filter. - * - * @param target the filter target. Must be:
    {@link #GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param internalformat the filter internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param width the filter width - * @param height the filter height - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param row the horizontal filter data - * @param column the vertical filter data - */ - public static void glSeparableFilter2D(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long row, @NativeType("void const *") long column) { - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, column); - } - - // --- [ glGetSeparableFilter ] --- - - /** Unsafe version of: {@link #glGetSeparableFilter GetSeparableFilter} */ - public static native void nglGetSeparableFilter(int target, int format, int type, long row, long column, long span); - - /** - * Returns the current contents of a separable convolution filter. - * - * @param target the filter target. Must be:
    {@link #GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param row a buffer in which to return the filter row - * @param column a buffer in which to return the filter column - * @param span unused - */ - public static void glGetSeparableFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer row, @NativeType("void *") ByteBuffer column, @Nullable @NativeType("void *") ByteBuffer span) { - nglGetSeparableFilter(target, format, type, memAddress(row), memAddress(column), memAddressSafe(span)); - } - - /** - * Returns the current contents of a separable convolution filter. - * - * @param target the filter target. Must be:
    {@link #GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param row a buffer in which to return the filter row - * @param column a buffer in which to return the filter column - * @param span unused - */ - public static void glGetSeparableFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long row, @NativeType("void *") long column, @Nullable @NativeType("void *") ByteBuffer span) { - nglGetSeparableFilter(target, format, type, row, column, memAddressSafe(span)); - } - - // --- [ glConvolutionParameteri ] --- - - /** - * Specifies the scale and bias of a convolution filter. - * - * @param target the filter target. One of:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}{@link #GL_CONVOLUTION_2D CONVOLUTION_2D}{@link #GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param pname the parameter to set. Must be:
    {@link #GL_CONVOLUTION_BORDER_MODE CONVOLUTION_BORDER_MODE}
    - * @param param the parameter value - */ - public static native void glConvolutionParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glConvolutionParameteriv ] --- - - /** Unsafe version of: {@link #glConvolutionParameteriv ConvolutionParameteriv} */ - public static native void nglConvolutionParameteriv(int target, int pname, long params); - - /** - * Pointer version of {@link #glConvolutionParameteri ConvolutionParameteri}. - * - * @param target the filter target - * @param pname the parameter to set. One of:
    {@link #GL_CONVOLUTION_FILTER_SCALE CONVOLUTION_FILTER_SCALE}{@link #GL_CONVOLUTION_FILTER_BIAS CONVOLUTION_FILTER_BIAS}{@link #GL_CONVOLUTION_BORDER_COLOR CONVOLUTION_BORDER_COLOR}
    - * @param params the parameter value - */ - public static void glConvolutionParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglConvolutionParameteriv(target, pname, memAddress(params)); - } - - // --- [ glConvolutionParameterf ] --- - - /** - * Float version of {@link #glConvolutionParameteri ConvolutionParameteri} - * - * @param target the filter target - * @param pname the parameter to set - * @param param the parameter value - */ - public static native void glConvolutionParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glConvolutionParameterfv ] --- - - /** Unsafe version of: {@link #glConvolutionParameterfv ConvolutionParameterfv} */ - public static native void nglConvolutionParameterfv(int target, int pname, long params); - - /** - * Pointer version of {@link #glConvolutionParameterf ConvolutionParameterf}. - * - * @param target the filter target - * @param pname the parameter to set. One of:
    {@link #GL_CONVOLUTION_FILTER_SCALE CONVOLUTION_FILTER_SCALE}{@link #GL_CONVOLUTION_FILTER_BIAS CONVOLUTION_FILTER_BIAS}{@link #GL_CONVOLUTION_BORDER_COLOR CONVOLUTION_BORDER_COLOR}
    - * @param params the parameter value - */ - public static void glConvolutionParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglConvolutionParameterfv(target, pname, memAddress(params)); - } - - // --- [ glGetConvolutionParameteriv ] --- - - /** Unsafe version of: {@link #glGetConvolutionParameteriv GetConvolutionParameteriv} */ - public static native void nglGetConvolutionParameteriv(int target, int pname, long params); - - /** - * Returns the value of a convolution filter parameter. - * - * @param target the filter target. One of:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}{@link #GL_CONVOLUTION_2D CONVOLUTION_2D}{@link #GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param pname the parameter to query. One of:
    {@link #GL_CONVOLUTION_FORMAT CONVOLUTION_FORMAT}{@link #GL_CONVOLUTION_WIDTH CONVOLUTION_WIDTH}{@link #GL_CONVOLUTION_HEIGHT CONVOLUTION_HEIGHT}{@link #GL_MAX_CONVOLUTION_WIDTH MAX_CONVOLUTION_WIDTH}
    {@link #GL_MAX_CONVOLUTION_HEIGHT MAX_CONVOLUTION_HEIGHT}
    - * @param params a buffer in which to return the parameter value - */ - public static void glGetConvolutionParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetConvolutionParameteriv(target, pname, memAddress(params)); - } - - /** - * Returns the value of a convolution filter parameter. - * - * @param target the filter target. One of:
    {@link #GL_CONVOLUTION_1D CONVOLUTION_1D}{@link #GL_CONVOLUTION_2D CONVOLUTION_2D}{@link #GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param pname the parameter to query. One of:
    {@link #GL_CONVOLUTION_FORMAT CONVOLUTION_FORMAT}{@link #GL_CONVOLUTION_WIDTH CONVOLUTION_WIDTH}{@link #GL_CONVOLUTION_HEIGHT CONVOLUTION_HEIGHT}{@link #GL_MAX_CONVOLUTION_WIDTH MAX_CONVOLUTION_WIDTH}
    {@link #GL_MAX_CONVOLUTION_HEIGHT MAX_CONVOLUTION_HEIGHT}
    - */ - @NativeType("void") - public static int glGetConvolutionParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetConvolutionParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetConvolutionParameterfv ] --- - - /** Unsafe version of: {@link #glGetConvolutionParameterfv GetConvolutionParameterfv} */ - public static native void nglGetConvolutionParameterfv(int target, int pname, long params); - - /** - * Float version of {@link #glGetConvolutionParameteriv GetConvolutionParameteriv}. - * - * @param target the filter target - * @param pname the parameter to query - * @param params a buffer in which to return the parameter value - */ - public static void glGetConvolutionParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetConvolutionParameterfv(target, pname, memAddress(params)); - } - - /** - * Float version of {@link #glGetConvolutionParameteriv GetConvolutionParameteriv}. - * - * @param target the filter target - * @param pname the parameter to query - */ - @NativeType("void") - public static float glGetConvolutionParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetConvolutionParameterfv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glHistogram ] --- - - /** - * Specifies the histogram table. - * - * @param target the histogram target. One of:
    {@link #GL_HISTOGRAM HISTOGRAM}{@link #GL_PROXY_HISTOGRAM PROXY_HISTOGRAM}
    - * @param width the histogram width - * @param internalformat the histogram internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param sink whether pixel groups will be consumed by the histogram operation ({@link GL11#GL_TRUE TRUE}) or passed on to the minmax operation ({@link GL11#GL_FALSE FALSE}) - */ - public static native void glHistogram(@NativeType("GLenum") int target, @NativeType("GLsizei") int width, @NativeType("GLenum") int internalformat, @NativeType("GLboolean") boolean sink); - - // --- [ glResetHistogram ] --- - - /** - * Resets all counters of all elements of the histogram table to zero. - * - * @param target the histogram target. Must be:
    {@link #GL_HISTOGRAM HISTOGRAM}
    - */ - public static native void glResetHistogram(@NativeType("GLenum") int target); - - // --- [ glGetHistogram ] --- - - /** Unsafe version of: {@link #glGetHistogram GetHistogram} */ - public static native void nglGetHistogram(int target, boolean reset, int format, int type, long values); - - /** - * Returns the current contents of the histogram table. - * - * @param target the histogram target. Must be:
    {@link #GL_HISTOGRAM HISTOGRAM}
    - * @param reset if {@link GL11#GL_TRUE TRUE}, then all counters of all elements of the histogram are reset to zero. Counters are reset whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data types. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values the pixel data - */ - public static void glGetHistogram(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer values) { - nglGetHistogram(target, reset, format, type, memAddress(values)); - } - - /** - * Returns the current contents of the histogram table. - * - * @param target the histogram target. Must be:
    {@link #GL_HISTOGRAM HISTOGRAM}
    - * @param reset if {@link GL11#GL_TRUE TRUE}, then all counters of all elements of the histogram are reset to zero. Counters are reset whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data types. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values the pixel data - */ - public static void glGetHistogram(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long values) { - nglGetHistogram(target, reset, format, type, values); - } - - // --- [ glGetHistogramParameteriv ] --- - - /** Unsafe version of: {@link #glGetHistogramParameteriv GetHistogramParameteriv} */ - public static native void nglGetHistogramParameteriv(int target, int pname, long params); - - /** - * Returns the integer values of the specified histogram parameter - * - * @param target the histogram target. Must be:
    {@link #GL_HISTOGRAM HISTOGRAM}
    - * @param pname the parameter to query. One of:
    {@link #GL_HISTOGRAM_WIDTH HISTOGRAM_WIDTH}{@link #GL_HISTOGRAM_FORMAT HISTOGRAM_FORMAT}{@link #GL_HISTOGRAM_RED_SIZE HISTOGRAM_RED_SIZE}{@link #GL_HISTOGRAM_GREEN_SIZE HISTOGRAM_GREEN_SIZE}
    {@link #GL_HISTOGRAM_BLUE_SIZE HISTOGRAM_BLUE_SIZE}{@link #GL_HISTOGRAM_ALPHA_SIZE HISTOGRAM_ALPHA_SIZE}{@link #GL_HISTOGRAM_LUMINANCE_SIZE HISTOGRAM_LUMINANCE_SIZE}{@link #GL_HISTOGRAM_SINK HISTOGRAM_SINK}
    - * @param params a buffer in which to return the parameter values - */ - public static void glGetHistogramParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetHistogramParameteriv(target, pname, memAddress(params)); - } - - /** - * Returns the integer values of the specified histogram parameter - * - * @param target the histogram target. Must be:
    {@link #GL_HISTOGRAM HISTOGRAM}
    - * @param pname the parameter to query. One of:
    {@link #GL_HISTOGRAM_WIDTH HISTOGRAM_WIDTH}{@link #GL_HISTOGRAM_FORMAT HISTOGRAM_FORMAT}{@link #GL_HISTOGRAM_RED_SIZE HISTOGRAM_RED_SIZE}{@link #GL_HISTOGRAM_GREEN_SIZE HISTOGRAM_GREEN_SIZE}
    {@link #GL_HISTOGRAM_BLUE_SIZE HISTOGRAM_BLUE_SIZE}{@link #GL_HISTOGRAM_ALPHA_SIZE HISTOGRAM_ALPHA_SIZE}{@link #GL_HISTOGRAM_LUMINANCE_SIZE HISTOGRAM_LUMINANCE_SIZE}{@link #GL_HISTOGRAM_SINK HISTOGRAM_SINK}
    - */ - @NativeType("void") - public static int glGetHistogramParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetHistogramParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetHistogramParameterfv ] --- - - /** Unsafe version of: {@link #glGetHistogramParameterfv GetHistogramParameterfv} */ - public static native void nglGetHistogramParameterfv(int target, int pname, long params); - - /** - * Float version of {@link #glGetHistogramParameteriv GetHistogramParameteriv}. - * - * @param target the histogram target - * @param pname the parameter to query - * @param params a buffer in which to place the returned value - */ - public static void glGetHistogramParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetHistogramParameterfv(target, pname, memAddress(params)); - } - - /** - * Float version of {@link #glGetHistogramParameteriv GetHistogramParameteriv}. - * - * @param target the histogram target - * @param pname the parameter to query - */ - @NativeType("void") - public static float glGetHistogramParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetHistogramParameterfv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMinmax ] --- - - /** - * Specifies the minmax table. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - * @param internalformat the minmax table internal format. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}{@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}
    {@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}
    {@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_LUMINANCE LUMINANCE}
    {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}{@link GL11#GL_INTENSITY INTENSITY}{@link GL11#GL_ALPHA4 ALPHA4}{@link GL11#GL_ALPHA8 ALPHA8}{@link GL11#GL_ALPHA12 ALPHA12}{@link GL11#GL_ALPHA16 ALPHA16}{@link GL11#GL_LUMINANCE4 LUMINANCE4}{@link GL11#GL_LUMINANCE8 LUMINANCE8}
    {@link GL11#GL_LUMINANCE12 LUMINANCE12}{@link GL11#GL_LUMINANCE16 LUMINANCE16}{@link GL11#GL_LUMINANCE4_ALPHA4 LUMINANCE4_ALPHA4}{@link GL11#GL_LUMINANCE6_ALPHA2 LUMINANCE6_ALPHA2}{@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}{@link GL11#GL_LUMINANCE12_ALPHA4 LUMINANCE12_ALPHA4}{@link GL11#GL_LUMINANCE12_ALPHA12 LUMINANCE12_ALPHA12}{@link GL11#GL_LUMINANCE16_ALPHA16 LUMINANCE16_ALPHA16}
    {@link GL11#GL_INTENSITY4 INTENSITY4}{@link GL11#GL_INTENSITY8 INTENSITY8}{@link GL11#GL_INTENSITY12 INTENSITY12}{@link GL11#GL_INTENSITY16 INTENSITY16}{@link GL21#GL_SLUMINANCE SLUMINANCE}{@link GL21#GL_SLUMINANCE8_ALPHA8 SLUMINANCE8_ALPHA8}
    - * @param sink whether pixel groups will be consumed by the minmax operation ({@link GL11#GL_TRUE TRUE}) or passed on to final conversion ({@link GL11#GL_FALSE FALSE}) - */ - public static native void glMinmax(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLboolean") boolean sink); - - // --- [ glResetMinmax ] --- - - /** - * Resets all minimum and maximum values of {@code target} to to their maximum and minimum representable values, respectively. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - */ - public static native void glResetMinmax(@NativeType("GLenum") int target); - - // --- [ glGetMinmax ] --- - - /** Unsafe version of: {@link #glGetMinmax GetMinmax} */ - public static native void nglGetMinmax(int target, boolean reset, int format, int type, long values); - - /** - * Returns the current contents of the minmax table. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - * @param reset If {@link GL11#GL_TRUE TRUE}, then each minimum value is reset to the maximum representable value, and each maximum value is reset to the minimum - * representable value. All values are reset, whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values a buffer in which to place the minmax values - */ - public static void glGetMinmax(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer values) { - nglGetMinmax(target, reset, format, type, memAddress(values)); - } - - /** - * Returns the current contents of the minmax table. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - * @param reset If {@link GL11#GL_TRUE TRUE}, then each minimum value is reset to the maximum representable value, and each maximum value is reset to the minimum - * representable value. All values are reset, whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values a buffer in which to place the minmax values - */ - public static void glGetMinmax(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long values) { - nglGetMinmax(target, reset, format, type, values); - } - - // --- [ glGetMinmaxParameteriv ] --- - - /** Unsafe version of: {@link #glGetMinmaxParameteriv GetMinmaxParameteriv} */ - public static native void nglGetMinmaxParameteriv(int target, int pname, long params); - - /** - * Returns the integer value of the specified minmax parameter. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - * @param pname the parameter to query - * @param params a buffer in which to place the returned value - */ - public static void glGetMinmaxParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMinmaxParameteriv(target, pname, memAddress(params)); - } - - /** - * Returns the integer value of the specified minmax parameter. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - * @param pname the parameter to query - */ - @NativeType("void") - public static int glGetMinmaxParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMinmaxParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMinmaxParameterfv ] --- - - /** Unsafe version of: {@link #glGetMinmaxParameterfv GetMinmaxParameterfv} */ - public static native void nglGetMinmaxParameterfv(int target, int pname, long params); - - /** - * Float version of {@link #glGetMinmaxParameteriv GetMinmaxParameteriv}. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - * @param pname the parameter to query - * @param params a buffer in which to place the returned value - */ - public static void glGetMinmaxParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMinmaxParameterfv(target, pname, memAddress(params)); - } - - /** - * Float version of {@link #glGetMinmaxParameteriv GetMinmaxParameteriv}. - * - * @param target the minmax target. Must be:
    {@link #GL_MINMAX MINMAX}
    - * @param pname the parameter to query - */ - @NativeType("void") - public static float glGetMinmaxParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetMinmaxParameterfv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glBlendColor ] --- - - /** - * Specifies the constant color Cc to be used in blending. - * - * @param red the red color component - * @param green the green color component - * @param blue the blue color component - * @param alpha the alpha color component - */ - public static void glBlendColor(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha) { - GL14C.glBlendColor(red, green, blue, alpha); - } - - // --- [ glBlendEquation ] --- - - /** - * Controls the blend equations used for per-fragment blending. - * - * @param mode the blend equation. One of:
    {@link GL14C#GL_FUNC_ADD FUNC_ADD}{@link GL14C#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14C#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14C#GL_MIN MIN}{@link GL14C#GL_MAX MAX}
    - */ - public static void glBlendEquation(@NativeType("GLenum") int mode) { - GL14C.glBlendEquation(mode); - } - - /** Array version of: {@link #glColorTable ColorTable} */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] table) { - long __functionAddress = GL.getICD().glColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, width, format, type, table, __functionAddress); - } - - /** Array version of: {@link #glColorTable ColorTable} */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] table) { - long __functionAddress = GL.getICD().glColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, width, format, type, table, __functionAddress); - } - - /** Array version of: {@link #glColorTable ColorTable} */ - public static void glColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] table) { - long __functionAddress = GL.getICD().glColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, width, format, type, table, __functionAddress); - } - - /** Array version of: {@link #glColorTableParameteriv ColorTableParameteriv} */ - public static void glColorTableParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glColorTableParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glColorTableParameterfv ColorTableParameterfv} */ - public static void glColorTableParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glColorTableParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetColorTable GetColorTable} */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] table) { - long __functionAddress = GL.getICD().glGetColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table, __functionAddress); - } - - /** Array version of: {@link #glGetColorTable GetColorTable} */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] table) { - long __functionAddress = GL.getICD().glGetColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table, __functionAddress); - } - - /** Array version of: {@link #glGetColorTable GetColorTable} */ - public static void glGetColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] table) { - long __functionAddress = GL.getICD().glGetColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table, __functionAddress); - } - - /** Array version of: {@link #glGetColorTableParameteriv GetColorTableParameteriv} */ - public static void glGetColorTableParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetColorTableParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetColorTableParameterfv GetColorTableParameterfv} */ - public static void glGetColorTableParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetColorTableParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glConvolutionParameteriv ConvolutionParameteriv} */ - public static void glConvolutionParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glConvolutionParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glConvolutionParameterfv ConvolutionParameterfv} */ - public static void glConvolutionParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glConvolutionParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetConvolutionParameteriv GetConvolutionParameteriv} */ - public static void glGetConvolutionParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetConvolutionParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetConvolutionParameterfv GetConvolutionParameterfv} */ - public static void glGetConvolutionParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetConvolutionParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetHistogramParameteriv GetHistogramParameteriv} */ - public static void glGetHistogramParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetHistogramParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetHistogramParameterfv GetHistogramParameterfv} */ - public static void glGetHistogramParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetHistogramParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMinmaxParameteriv GetMinmaxParameteriv} */ - public static void glGetMinmaxParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetMinmaxParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMinmaxParameterfv GetMinmaxParameterfv} */ - public static void glGetMinmaxParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetMinmaxParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBIndirectParameters.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBIndirectParameters.java deleted file mode 100644 index 277418e8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBIndirectParameters.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_indirect_parameters extension. - * - *

    OpenGL 4.3 (with the introduction of the {@link ARBMultiDrawIndirect ARB_multi_draw_indirect} extension) enhanced the ability of OpenGL to allow a large sets of parameters - * for indirect draws (introduced with OpenGL 4.0) into a buffer object and dispatch the entire list with one API call. This allows, for example, a shader - * (such as a compute shader via shader storage buffers, or a geometry shader via transform feedback) to produce lists of draw commands that can then be - * consumed by OpenGL without a server-client round trip. However, when a variable and potentially unknown number of draws are produced by such a shader, - * it becomes difficult to know how many draws are in the output array(s). Applications must resort to techniques such as transform feedback primitive - * queries, or mapping buffers containing the content of atomic counters, which can cause stalls or bubbles in the OpenGL pipeline.

    - * - *

    This extension introduces the concept of the "parameter buffer", which is a target allowing buffers to store parameters for certain drawing commands. - * Also in this extension, new variants of {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect} and {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect} are introduced that source some of their - * parameters from this buffer. Further commands could potentially be introduced that source other parameters from a buffer.

    - * - *

    Requires {@link GL42 OpenGL 4.2}.

    - */ -public class ARBIndirectParameters { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * MapBufferRange, FlushMappedBufferRange, GetBufferParameteriv, and CopyBufferSubData. - */ - public static final int GL_PARAMETER_BUFFER_ARB = 0x80EE; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_PARAMETER_BUFFER_BINDING_ARB = 0x80EF; - - protected ARBIndirectParameters() { - throw new UnsupportedOperationException(); - } - - // --- [ glMultiDrawArraysIndirectCountARB ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirectCountARB MultiDrawArraysIndirectCountARB} */ - public static native void nglMultiDrawArraysIndirectCountARB(int mode, long indirect, long drawcount, int maxdrawcount, int stride); - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawArraysIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, maxdrawcount * (stride == 0 ? (4 * 4) : stride)); - } - nglMultiDrawArraysIndirectCountARB(mode, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawArraysIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - nglMultiDrawArraysIndirectCountARB(mode, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawArraysIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, (maxdrawcount * (stride == 0 ? (4 * 4) : stride)) >> 2); - } - nglMultiDrawArraysIndirectCountARB(mode, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - // --- [ glMultiDrawElementsIndirectCountARB ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirectCountARB MultiDrawElementsIndirectCountARB} */ - public static native void nglMultiDrawElementsIndirectCountARB(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride); - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawElementsIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, maxdrawcount * (stride == 0 ? (5 * 4) : stride)); - } - nglMultiDrawElementsIndirectCountARB(mode, type, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawElementsIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - nglMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, an implementation stop processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawElementsIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, (maxdrawcount * (stride == 0 ? (5 * 4) : stride)) >> 2); - } - nglMultiDrawElementsIndirectCountARB(mode, type, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - /** Array version of: {@link #glMultiDrawArraysIndirectCountARB MultiDrawArraysIndirectCountARB} */ - public static void glMultiDrawArraysIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - long __functionAddress = GL.getICD().glMultiDrawArraysIndirectCountARB; - if (CHECKS) { - check(__functionAddress); - check(indirect, (maxdrawcount * (stride == 0 ? (4 * 4) : stride)) >> 2); - } - callPPV(mode, indirect, drawcount, maxdrawcount, stride, __functionAddress); - } - - /** Array version of: {@link #glMultiDrawElementsIndirectCountARB MultiDrawElementsIndirectCountARB} */ - public static void glMultiDrawElementsIndirectCountARB(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - long __functionAddress = GL.getICD().glMultiDrawElementsIndirectCountARB; - if (CHECKS) { - check(__functionAddress); - check(indirect, (maxdrawcount * (stride == 0 ? (5 * 4) : stride)) >> 2); - } - callPPV(mode, type, indirect, drawcount, maxdrawcount, stride, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInstancedArrays.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBInstancedArrays.java deleted file mode 100644 index ac4065d0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInstancedArrays.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_instanced_arrays extension. - * - *

    A common use case in GL for some applications is to be able to draw the same object, or groups of similar objects that share vertex data, primitive - * count and type, multiple times. This extension provides a means of accelerating such use cases while restricting the number of API calls, and keeping - * the amount of duplicate data to a minimum.

    - * - *

    In particular, this extension specifies an alternative to the read-only shader variable introduced by ARB_draw_instanced. It uses the same draw calls - * introduced by that extension, but redefines them so that a vertex shader can instead use vertex array attributes as a source of instance data.

    - * - *

    This extension introduces an array "divisor" for generic vertex array attributes, which when non-zero specifies that the attribute is "instanced". An - * instanced attribute does not advance per-vertex as usual, but rather after every {@code divisor} conceptual draw calls.

    - * - *

    (Attributes which aren't instanced are repeated in their entirety for every conceptual draw call.)

    - * - *

    By specifying transform data in an instanced attribute or series of instanced attributes, vertex shaders can, in concert with the instancing draw calls, - * draw multiple instances of an object with one draw call.

    - * - *

    Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public class ARBInstancedArrays { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetVertexAttribdv, GetVertexAttribfv, and GetVertexAttribiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE; - - protected ARBInstancedArrays() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttribDivisorARB ] --- - - /** - * Modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives in a single draw call. If {@code divisor} - * is zero, the attribute at slot {@code index} advances once per vertex. If {@code divisor} is non-zero, the attribute advances once per {@code divisor} - * instances of the set(s) of vertices being rendered. An attribute is referred to as {@code instanced} if its {@code divisor} value is non-zero. - * - * @param index the attribute index - * @param divisor the divisor value - */ - public static native void glVertexAttribDivisorARB(@NativeType("GLuint") int index, @NativeType("GLuint") int divisor); - - // --- [ glVertexArrayVertexAttribDivisorEXT ] --- - - /** - * {@link EXTDirectStateAccess EXT_direct_state_access} version of {@link #glVertexAttribDivisorARB VertexAttribDivisorARB}. - * - *

    This function was added to the extension specification in July 2013. Implemenations are allowed to expose ARB_instanced_arrays without providing this - * function. The correct way to test its availability is:

    - * - *
    
    -     * GLCapabilities caps = GL.getCapabilities();
    -     * if (caps.GL_ARB_instanced_arrays && ARBInstancedArrays.getInstance().VertexArrayVertexAttribDivisorEXT != NULL) {
    -     *     glVertexArrayVertexAttribDivisorEXT(...); // the DSA function can now be used
    -     * }
    - * - * @param vaobj the vertex array object - * @param index the attribute index - * @param divisor the divisor value - */ - public static native void glVertexArrayVertexAttribDivisorEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLuint") int divisor); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery.java deleted file mode 100644 index f764effe..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_internalformat_query extension. - * - *

    OpenGL 4.1 has a number of queries to indicate the maximum number of samples available for different formats. These give a coarse-grained query - * mechanism e.g. an implementation can expose different sample counts for integer and floating-point formats, but not for different floating-point - * formats. There is also no convenient way for the user to determine the granularity of sample counts available, only the maximum.

    - * - *

    This extension adds a query mechanism that allows the user to determine which sample counts are available for a specific internal format.

    - * - *

    Requires {@link GL30 OpenGL 3.0} or {@link ARBFramebufferObject ARB_framebuffer_object}. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public class ARBInternalformatQuery { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetInternalformativ. */ - public static final int GL_NUM_SAMPLE_COUNTS = 0x9380; - - protected ARBInternalformatQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetInternalformativ ] --- - - /** - * Unsafe version of: {@link #glGetInternalformativ GetInternalformativ} - * - * @param bufSize the maximum number of values that may be written to params by the function - */ - public static void nglGetInternalformativ(int target, int internalformat, int pname, int bufSize, long params) { - GL42C.nglGetInternalformativ(target, internalformat, pname, bufSize, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * @param params a variable into which to write the retrieved information - */ - public static void glGetInternalformativ(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL42C.glGetInternalformativ(target, internalformat, pname, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - */ - @NativeType("void") - public static int glGetInternalformati(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname) { - return GL42C.glGetInternalformati(target, internalformat, pname); - } - - /** Array version of: {@link #glGetInternalformativ GetInternalformativ} */ - public static void glGetInternalformativ(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL42C.glGetInternalformativ(target, internalformat, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery2.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery2.java deleted file mode 100644 index 00e2a163..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInternalformatQuery2.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_internalformat_query2 extension. - * - *

    This extension extends the {@link ARBInternalformatQuery#glGetInternalformativ GetInternalformativ} query that was added in the {@link ARBInternalformatQuery ARB_internalformat_query} extension to - * provide applications with more granular per-format capability information.

    - * - *

    This extension allows the remainder of the texture-style targets to be specified along with any possible internal format. We add queries for additional - * properties supported for an internal format in addition to the multisample-related information that was added in ARB_internalformat_query.

    - * - *

    The goals of this extension are to:

    - * - *
      - *
    1. provide a mechanism for implementations to declare support *above* the minimum required by the specification
    2. - *
    3. provide API to allow universally constant information to be queried
    4. - *
    5. provide a user-friendly way of finding out about version- or implementation-specific limitations.
    6. - *
    - * - *

    While much of this information can be determined for a single GL version by careful examination of the specification, support for many of these - * properties has been gradually introduced over a number of API revisions. This can observed when considering the range in functionality between the - * various versions of GL 2, 3, and 4, as well as GL ES 2 and 3.

    - * - *

    In the case of an application which wishes to be scalable and able to run on a variety of possible GL or GL ES versions without being specifically - * tailored for each version, it must either have knowledge of the specifications built up into either the code or tables, or it must do a number of tests - * on startup to determine which capabilities are present.

    - * - *

    In OpenGL, other than the course-grained extension mechanism, many limitations of, or limited support for, an internalformat can only be signaled by - * failing an operation or by operating at reduced performance. Thus, such tests often involve attempts to create resources, using them in specific ways - * and benchmarking the operations to find out if it is supported in the desired form, and at a required performance level. The extension provides a way - * for these properties and caveats to be directly queried from the implementation.

    - * - *

    This extension is NOT intended to allow implementations to only support a subset of features that are required by a specific GL version, nor is it - * intended to replace the proper use of extension checks for optional functionality.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link ARBInternalformatQuery ARB_internalformat_query}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBInternalformatQuery2 { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of GetInternalformativ and GetInternalformati64v. */ - public static final int - GL_TEXTURE_1D = 0xDE0, - GL_TEXTURE_1D_ARRAY = 0x8C18, - GL_TEXTURE_2D = 0xDE1, - GL_TEXTURE_2D_ARRAY = 0x8C1A, - GL_TEXTURE_3D = 0x806F, - GL_TEXTURE_CUBE_MAP = 0x8513, - GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, - GL_TEXTURE_RECTANGLE = 0x84F5, - GL_TEXTURE_BUFFER = 0x8C2A, - GL_RENDERBUFFER = 0x8D41, - GL_TEXTURE_2D_MULTISAMPLE = 0x9100, - GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; - - /** Accepted by the {@code pname} parameter of GetInternalformativ and GetInternalformati64v. */ - public static final int - GL_SAMPLES = 0x80A9, - GL_NUM_SAMPLE_COUNTS = 0x9380, - GL_INTERNALFORMAT_SUPPORTED = 0x826F, - GL_INTERNALFORMAT_PREFERRED = 0x8270, - GL_INTERNALFORMAT_RED_SIZE = 0x8271, - GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, - GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, - GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, - GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, - GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, - GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, - GL_INTERNALFORMAT_RED_TYPE = 0x8278, - GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, - GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, - GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, - GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, - GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, - GL_MAX_WIDTH = 0x827E, - GL_MAX_HEIGHT = 0x827F, - GL_MAX_DEPTH = 0x8280, - GL_MAX_LAYERS = 0x8281, - GL_MAX_COMBINED_DIMENSIONS = 0x8282, - GL_COLOR_COMPONENTS = 0x8283, - GL_DEPTH_COMPONENTS = 0x8284, - GL_STENCIL_COMPONENTS = 0x8285, - GL_COLOR_RENDERABLE = 0x8286, - GL_DEPTH_RENDERABLE = 0x8287, - GL_STENCIL_RENDERABLE = 0x8288, - GL_FRAMEBUFFER_RENDERABLE = 0x8289, - GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, - GL_FRAMEBUFFER_BLEND = 0x828B, - GL_READ_PIXELS = 0x828C, - GL_READ_PIXELS_FORMAT = 0x828D, - GL_READ_PIXELS_TYPE = 0x828E, - GL_TEXTURE_IMAGE_FORMAT = 0x828F, - GL_TEXTURE_IMAGE_TYPE = 0x8290, - GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, - GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, - GL_MIPMAP = 0x8293, - GL_MANUAL_GENERATE_MIPMAP = 0x8294, - GL_AUTO_GENERATE_MIPMAP = 0x8295, - GL_COLOR_ENCODING = 0x8296, - GL_SRGB_READ = 0x8297, - GL_SRGB_WRITE = 0x8298, - GL_SRGB_DECODE_ARB = 0x8299, - GL_FILTER = 0x829A, - GL_VERTEX_TEXTURE = 0x829B, - GL_TESS_CONTROL_TEXTURE = 0x829C, - GL_TESS_EVALUATION_TEXTURE = 0x829D, - GL_GEOMETRY_TEXTURE = 0x829E, - GL_FRAGMENT_TEXTURE = 0x829F, - GL_COMPUTE_TEXTURE = 0x82A0, - GL_TEXTURE_SHADOW = 0x82A1, - GL_TEXTURE_GATHER = 0x82A2, - GL_TEXTURE_GATHER_SHADOW = 0x82A3, - GL_SHADER_IMAGE_LOAD = 0x82A4, - GL_SHADER_IMAGE_STORE = 0x82A5, - GL_SHADER_IMAGE_ATOMIC = 0x82A6, - GL_IMAGE_TEXEL_SIZE = 0x82A7, - GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, - GL_IMAGE_PIXEL_FORMAT = 0x82A9, - GL_IMAGE_PIXEL_TYPE = 0x82AA, - GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7, - GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, - GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, - GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, - GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, - GL_TEXTURE_COMPRESSED = 0x86A1, - GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, - GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, - GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, - GL_CLEAR_BUFFER = 0x82B4, - GL_TEXTURE_VIEW = 0x82B5, - GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; - - /** Returned as possible responses for various {@code pname} queries to GetInternalformativ and GetInternalformati64v. */ - public static final int - GL_FULL_SUPPORT = 0x82B7, - GL_CAVEAT_SUPPORT = 0x82B8, - GL_IMAGE_CLASS_4_X_32 = 0x82B9, - GL_IMAGE_CLASS_2_X_32 = 0x82BA, - GL_IMAGE_CLASS_1_X_32 = 0x82BB, - GL_IMAGE_CLASS_4_X_16 = 0x82BC, - GL_IMAGE_CLASS_2_X_16 = 0x82BD, - GL_IMAGE_CLASS_1_X_16 = 0x82BE, - GL_IMAGE_CLASS_4_X_8 = 0x82BF, - GL_IMAGE_CLASS_2_X_8 = 0x82C0, - GL_IMAGE_CLASS_1_X_8 = 0x82C1, - GL_IMAGE_CLASS_11_11_10 = 0x82C2, - GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, - GL_VIEW_CLASS_128_BITS = 0x82C4, - GL_VIEW_CLASS_96_BITS = 0x82C5, - GL_VIEW_CLASS_64_BITS = 0x82C6, - GL_VIEW_CLASS_48_BITS = 0x82C7, - GL_VIEW_CLASS_32_BITS = 0x82C8, - GL_VIEW_CLASS_24_BITS = 0x82C9, - GL_VIEW_CLASS_16_BITS = 0x82CA, - GL_VIEW_CLASS_8_BITS = 0x82CB, - GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, - GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, - GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, - GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, - GL_VIEW_CLASS_RGTC1_RED = 0x82D0, - GL_VIEW_CLASS_RGTC2_RG = 0x82D1, - GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, - GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; - - protected ARBInternalformatQuery2() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetInternalformati64v ] --- - - /** - * Unsafe version of: {@link #glGetInternalformati64v GetInternalformati64v} - * - * @param bufSize the maximum number of values that may be written to params by the function - */ - public static void nglGetInternalformati64v(int target, int internalformat, int pname, int bufSize, long params) { - GL43C.nglGetInternalformati64v(target, internalformat, pname, bufSize, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * @param params a variable into which to write the retrieved information - */ - public static void glGetInternalformati64v(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL43C.glGetInternalformati64v(target, internalformat, pname, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - */ - @NativeType("void") - public static long glGetInternalformati64(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname) { - return GL43C.glGetInternalformati64(target, internalformat, pname); - } - - /** Array version of: {@link #glGetInternalformati64v GetInternalformati64v} */ - public static void glGetInternalformati64v(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL43C.glGetInternalformati64v(target, internalformat, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInvalidateSubdata.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBInvalidateSubdata.java deleted file mode 100644 index c68e9f20..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBInvalidateSubdata.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_invalidate_subdata extension. - * - *

    This extension adds a mechanism for an application to tell the GL that the previous contents of a subregion of an image or a range of a buffer may be - * invalidated.

    - * - *

    GL implementations often include several memory spaces, each with distinct performance characteristics, and the implementations transparently move - * allocations between memory spaces. With this extension, an application can tell the GL that the contents of a texture or buffer are no longer needed, - * and the implementation can avoid transferring the data unnecessarily.

    - * - *

    Examples of when this may be useful include:

    - * - *
      - *
    1. invalidating a multisample texture after resolving it into a non-multisample texture.
    2. - *
    3. invalidating depth/stencil buffers after using them to generate a color buffer.
    4. - *
    5. invalidating a subregion of a framebuffer rather than clearing it before rendering to it, when the whole subregion will be overwritten.
    6. - *
    7. invalidating dynamically generated data (e.g. textures written by FBO rendering or CopyTexSubImage, buffers written by transform feedback, etc.) - * after it is no longer needed but before the end of the frame.
    8. - *
    - * - *

    It is expected that the situations in which the GL will take advantage of this knowledge and achieve increased performance as a result of its use will - * be implementation-dependent. The first three examples may show benefit on tiled renderers where some data won't need to be copied into or out of on-chip - * memory. The fourth example may show a benefit in multi-GPU systems where some data won't need to be copied between GPUs.

    - * - *

    This extension is a superset of the EXT_discard_framebuffer extension with the following additions:

    - * - *
      - *
    • The parameters to InvalidateFramebufferEXT are extended for MRT support and Desktop-GL-only buffer enums.
    • - *
    • New functions to invalidate a region of a texture image or buffer object data store.
    • - *
    - * - *

    Requires {@link GL20 OpenGL 2.0}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBInvalidateSubdata { - - static { GL.initialize(); } - - protected ARBInvalidateSubdata() { - throw new UnsupportedOperationException(); - } - - // --- [ glInvalidateTexSubImage ] --- - - /** - * Invalidates a region of a texture image. - * - * @param texture the name of a texture object a subregion of which to invalidate - * @param level the level of detail of the texture object within which the region resides - * @param xoffset the X offset of the region to be invalidated - * @param yoffset the Y offset of the region to be invalidated - * @param zoffset the Z offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * @param depth the depth of the region to be invalidated - */ - public static void glInvalidateTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - GL43C.glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); - } - - // --- [ glInvalidateTexImage ] --- - - /** - * Invalidates the entirety of a texture image. - * - * @param texture the name of a texture object to invalidate - * @param level the level of detail of the texture object to invalidate - */ - public static void glInvalidateTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL43C.glInvalidateTexImage(texture, level); - } - - // --- [ glInvalidateBufferSubData ] --- - - /** - * Invalidates a region of a buffer object's data store. - * - * @param buffer the name of a buffer object, a subrange of whose data store to invalidate - * @param offset the offset within the buffer's data store of the start of the range to be invalidated - * @param length the length of the range within the buffer's data store to be invalidated - */ - public static void glInvalidateBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length) { - GL43C.glInvalidateBufferSubData(buffer, offset, length); - } - - // --- [ glInvalidateBufferData ] --- - - /** - * Invalidates the content of a buffer object's data store. - * - * @param buffer the name of a buffer object whose data store to invalidate - */ - public static void glInvalidateBufferData(@NativeType("GLuint") int buffer) { - GL43C.glInvalidateBufferData(buffer); - } - - // --- [ glInvalidateFramebuffer ] --- - - /** - * Unsafe version of: {@link #glInvalidateFramebuffer InvalidateFramebuffer} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateFramebuffer(int target, int numAttachments, long attachments) { - GL43C.nglInvalidateFramebuffer(target, numAttachments, attachments); - } - - /** - * Invalidate the content some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param attachments the address of an array identifying the attachments to be invalidated - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") IntBuffer attachments) { - GL43C.glInvalidateFramebuffer(target, attachments); - } - - /** - * Invalidate the content some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int attachment) { - GL43C.glInvalidateFramebuffer(target, attachment); - } - - // --- [ glInvalidateSubFramebuffer ] --- - - /** - * Unsafe version of: {@link #glInvalidateSubFramebuffer InvalidateSubFramebuffer} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateSubFramebuffer(int target, int numAttachments, long attachments, int x, int y, int width, int height) { - GL43C.nglInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); - } - - /** - * Invalidates the content of a region of some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param attachments an array identifying the attachments to be invalidated - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") IntBuffer attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL43C.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); - } - - /** - * Invalidates the content of a region of some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int attachment, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL43C.glInvalidateSubFramebuffer(target, attachment, x, y, width, height); - } - - /** Array version of: {@link #glInvalidateFramebuffer InvalidateFramebuffer} */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int[] attachments) { - GL43C.glInvalidateFramebuffer(target, attachments); - } - - /** Array version of: {@link #glInvalidateSubFramebuffer InvalidateSubFramebuffer} */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int[] attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL43C.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMapBufferAlignment.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBMapBufferAlignment.java deleted file mode 100644 index 2753a786..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMapBufferAlignment.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_map_buffer_alignment extension. - * - *

    This extension adds a requirement to the pointer returned by {@link GL15C#glMapBuffer MapBuffer} and {@link GL30C#glMapBufferRange MapBufferRange} that they provide a minimum of 64 byte alignment - * to support processing of the data directly with special CPU instructions like SSE and AVX.

    - * - *

    Requires {@link GL21 OpenGL 2.1}. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public final class ARBMapBufferAlignment { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; - - private ARBMapBufferAlignment() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMapBufferRange.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBMapBufferRange.java deleted file mode 100644 index d332ad7f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMapBufferRange.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_map_buffer_range extension. - * - *

    ARB_map_buffer_range expands the buffer object API to allow greater performance when a client application only needs to write to a sub-range of a buffer - * object. To that end, this extension introduces two new buffer object features: non-serialized buffer modification and explicit sub-range flushing for - * mapped buffer objects.

    - * - *

    OpenGL requires that commands occur in a FIFO manner meaning that any changes to buffer objects either block until the data has been processed by the - * OpenGL pipeline or else create extra copies to avoid such a block. By providing a method to asynchronously modify buffer object data, an application is - * then able to manage the synchronization points themselves and modify ranges of data contained by a buffer object even though OpenGL might still be using - * other parts of it.

    - * - *

    This extension also provides a method for explicitly flushing ranges of a mapped buffer object so OpenGL does not have to assume that the entire range - * may have been modified. Further, it allows the application to more precisely specify its intent with respect to reading, writing, and whether the - * previous contents of a mapped range of interest need be preserved prior to modification.

    - * - *

    Requires {@link GL21 OpenGL 2.1}. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class ARBMapBufferRange { - - static { GL.initialize(); } - - /** Accepted by the {@code access} parameter of MapBufferRange. */ - public static final int - GL_MAP_READ_BIT = 0x1, - GL_MAP_WRITE_BIT = 0x2, - GL_MAP_INVALIDATE_RANGE_BIT = 0x4, - GL_MAP_INVALIDATE_BUFFER_BIT = 0x8, - GL_MAP_FLUSH_EXPLICIT_BIT = 0x10, - GL_MAP_UNSYNCHRONIZED_BIT = 0x20; - - protected ARBMapBufferRange() { - throw new UnsupportedOperationException(); - } - - // --- [ glMapBufferRange ] --- - - /** Unsafe version of: {@link #glMapBufferRange MapBufferRange} */ - public static long nglMapBufferRange(int target, long offset, long length, int access) { - return GL30C.nglMapBufferRange(target, offset, length, access); - } - - /** - * Maps a section of a buffer object's data store. - * - *

    LWJGL note: This method comes in 2 flavors:

    - * - *
      - *
    1. {@link #glMapBufferRange(int, long, long, int)} - Always returns a new ByteBuffer instance.
    2. - *
    3. {@link #glMapBufferRange(int, long, long, int, ByteBuffer)} - The {@code old_buffer} parameter is reused if not null.
    4. - *
    - * - * @param target a binding to which the target buffer is bound. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30C#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30C#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30C#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30C#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30C#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30C#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access) { - return GL30C.glMapBufferRange(target, offset, length, access); - } - - /** - * Maps a section of a buffer object's data store. - * - *

    LWJGL note: This method comes in 2 flavors:

    - * - *
      - *
    1. {@link #glMapBufferRange(int, long, long, int)} - Always returns a new ByteBuffer instance.
    2. - *
    3. {@link #glMapBufferRange(int, long, long, int, ByteBuffer)} - The {@code old_buffer} parameter is reused if not null.
    4. - *
    - * - * @param target a binding to which the target buffer is bound. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30C#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30C#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30C#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30C#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30C#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30C#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access, @Nullable ByteBuffer old_buffer) { - return GL30C.glMapBufferRange(target, offset, length, access, old_buffer); - } - - // --- [ glFlushMappedBufferRange ] --- - - /** - * Indicates modifications to a range of a mapped buffer. - * - * @param target the target of the flush operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the start of the buffer subrange, in basic machine units - * @param length the length of the buffer subrange, in basic machine units - */ - public static void glFlushMappedBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length) { - GL30C.glFlushMappedBufferRange(target, offset, length); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMatrixPalette.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBMatrixPalette.java deleted file mode 100644 index b6e01c84..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMatrixPalette.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_matrix_palette extension. - * - *

    This extension extends the abilities of {@link ARBVertexBlend} to include a palette of modelview matrices. The n vertex units use a palette of m modelview - * matrices. (Where n and m are constrained to implementation defined maxima.) Each vertex has a set of n indices into the palette, and a corresponding set - * of n weights. Matrix indices can be changed for each vertex (between {@link GL11#glBegin Begin} and {@link GL11#glEnd End}).

    - * - *

    When this extension is utilized, the enabled units transform each vertex by the modelview matrices specified by the vertices' respective indices. These - * results are subsequently scaled by the weights of the respective units and then summed to create the eyespace vertex.

    - * - *

    A similar procedure is followed for normals. Normals, however, are transformed by the inverse transpose of the modelview matrix.

    - */ -public class ARBMatrixPalette { - - static { GL.initialize(); } - - /** - * Accepted by the {@code pname} parameters of GetFloatv, GetDoublev, and IsEnabled, by the {@code mode} parameter of MatrixMode, and by the {@code cap} - * parameters of Enable and Disable. - */ - public static final int GL_MATRIX_PALETTE_ARB = 0x8840; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841, - GL_MAX_PALETTE_MATRICES_ARB = 0x8842, - GL_CURRENT_PALETTE_MATRIX_ARB = 0x8843; - - /** Accepted by the {@code cap} parameters of EnableClientState and DisableClientState and by the {@code pname} parameter of IsEnabled. */ - public static final int GL_MATRIX_INDEX_ARRAY_ARB = 0x8844; - - /** Accepted by the {@code pname} parameter of GetFloatv. */ - public static final int GL_CURRENT_MATRIX_INDEX_ARB = 0x8845; - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int - GL_MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846, - GL_MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847, - GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848; - - /** Accepted by the {@code pname} parameter of GetPointerv. */ - public static final int GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849; - - protected ARBMatrixPalette() { - throw new UnsupportedOperationException(); - } - - // --- [ glCurrentPaletteMatrixARB ] --- - - /** - * Defines which of the palette's matrices is affected by subsequent matrix operations when the current matrix mode is {@link #GL_MATRIX_PALETTE_ARB MATRIX_PALETTE_ARB}, - * - * @param index the current matrix index. Must be a value between 0 and {@link #GL_MAX_PALETTE_MATRICES_ARB MAX_PALETTE_MATRICES_ARB}. - */ - public static native void glCurrentPaletteMatrixARB(@NativeType("GLint") int index); - - // --- [ glMatrixIndexuivARB ] --- - - /** - * Unsafe version of: {@link #glMatrixIndexuivARB MatrixIndexuivARB} - * - * @param size the number of index values to set. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglMatrixIndexuivARB(int size, long indices); - - /** - * Sets the current matrix indices. - * - * @param indices the matrix index values - */ - public static void glMatrixIndexuivARB(@NativeType("GLuint *") IntBuffer indices) { - nglMatrixIndexuivARB(indices.remaining(), memAddress(indices)); - } - - // --- [ glMatrixIndexubvARB ] --- - - /** - * Unsafe version of: {@link #glMatrixIndexubvARB MatrixIndexubvARB} - * - * @param size the number of index values to set. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglMatrixIndexubvARB(int size, long indices); - - /** - * Byte version of {@link #glMatrixIndexuivARB MatrixIndexuivARB}. - * - * @param indices the matrix index values - */ - public static void glMatrixIndexubvARB(@NativeType("GLubyte *") ByteBuffer indices) { - nglMatrixIndexubvARB(indices.remaining(), memAddress(indices)); - } - - // --- [ glMatrixIndexusvARB ] --- - - /** - * Unsafe version of: {@link #glMatrixIndexusvARB MatrixIndexusvARB} - * - * @param size the number of index values to set. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglMatrixIndexusvARB(int size, long indices); - - /** - * Short version of {@link #glMatrixIndexuivARB MatrixIndexuivARB}. - * - * @param indices the matrix index values - */ - public static void glMatrixIndexusvARB(@NativeType("GLushort *") ShortBuffer indices) { - nglMatrixIndexusvARB(indices.remaining(), memAddress(indices)); - } - - // --- [ glMatrixIndexPointerARB ] --- - - /** - * Unsafe version of: {@link #glMatrixIndexPointerARB MatrixIndexPointerARB} - * - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglMatrixIndexPointerARB(int size, int type, int stride, long pointer); - - /** - * @param size the number of index values per vertex that are stored in the array. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the matrix index data - */ - public static void glMatrixIndexPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglMatrixIndexPointerARB(size, type, stride, memAddress(pointer)); - } - - /** - * @param size the number of index values per vertex that are stored in the array. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the matrix index data - */ - public static void glMatrixIndexPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglMatrixIndexPointerARB(size, type, stride, pointer); - } - - /** - * @param size the number of index values per vertex that are stored in the array. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the matrix index data - */ - public static void glMatrixIndexPointerARB(@NativeType("GLint") int size, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_BYTE, stride, memAddress(pointer)); - } - - /** - * @param size the number of index values per vertex that are stored in the array. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the matrix index data - */ - public static void glMatrixIndexPointerARB(@NativeType("GLint") int size, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_SHORT, stride, memAddress(pointer)); - } - - /** - * @param size the number of index values per vertex that are stored in the array. Must be a value between 1 and {@link ARBVertexBlend#GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the matrix index data - */ - public static void glMatrixIndexPointerARB(@NativeType("GLint") int size, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, memAddress(pointer)); - } - - /** Array version of: {@link #glMatrixIndexuivARB MatrixIndexuivARB} */ - public static void glMatrixIndexuivARB(@NativeType("GLuint *") int[] indices) { - long __functionAddress = GL.getICD().glMatrixIndexuivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(indices.length, indices, __functionAddress); - } - - /** Array version of: {@link #glMatrixIndexusvARB MatrixIndexusvARB} */ - public static void glMatrixIndexusvARB(@NativeType("GLushort *") short[] indices) { - long __functionAddress = GL.getICD().glMatrixIndexusvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(indices.length, indices, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultiBind.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultiBind.java deleted file mode 100644 index 18ebeaf8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultiBind.java +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_multi_bind extension. - * - *

    This extension provides a new set of commands allowing applications to bind or unbind a set of objects in a single call, instead of requiring a separate - * call for each bind or unbind operation. Using a single command allows OpenGL implementations to amortize function call, name space lookup, and - * potential locking overhead over multiple bind or unbind operations. The rendering loops of graphics applications frequently switch between different - * states, binding different sets of resources, including texture objects, sampler objects, textures for image loads and stores, uniform buffers, and - * vertex buffers; this extension provides "multi-bind" entry points for all of these object types.

    - * - *

    Each command in this extension includes a <first> and <count> parameter, specifying a continguous range of binding points to update, as well - * as an array of <count> object names specifying the objects to bind. Unlike single bind commands, multi-bind commands can be used only to bind or - * unbind existing objects. Passing a previously unused object name (generated or not) results in an error and does not create a new object. For binding - * points with associated data (e.g., ranges of a buffer), separate arrays are used to pass the associated data for each binding point. Passing zero values - * in the array of object names removes the object bound to the current bounding point. Additionally, if {@code NULL} is passed as the array of objects, objects - * bound to the entire range of binding points are unbound, as though the caller passed an array of zeroes.

    - * - *

    Requires {@link GL30 OpenGL 3.0}. Promoted to core in {@link GL44 OpenGL 4.4}.

    - */ -public class ARBMultiBind { - - static { GL.initialize(); } - - protected ARBMultiBind() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindBuffersBase ] --- - - /** - * Unsafe version of: {@link #glBindBuffersBase BindBuffersBase} - * - * @param count the number of bindings - */ - public static void nglBindBuffersBase(int target, int first, int count, long buffers) { - GL44C.nglBindBuffersBase(target, first, count, buffers); - } - - /** - * Binds {@code count} existing buffer objects to bindings numbered {@code first} through {@code first+count-1} in the array of buffer binding points - * corresponding to {@code target}. If {@code buffers} is not {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name - * of an existing buffer object. It is equivalent to: - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindBufferBase(target, first + i, 0);
    -     *     } else {
    -     *         glBindBufferBase(target, first + i, buffers[i]);
    -     *     }
    -     * }
    - * - *

    except that the single general buffer binding corresponding to {@code target} is unmodified, and that buffers will not be created if they do not exist.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param first the first binding - * @param buffers an array of zeros or names of existing buffers objects - */ - public static void glBindBuffersBase(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers) { - GL44C.glBindBuffersBase(target, first, buffers); - } - - // --- [ glBindBuffersRange ] --- - - /** - * Unsafe version of: {@link #glBindBuffersRange BindBuffersRange} - * - * @param count the number of bindings - */ - public static void nglBindBuffersRange(int target, int first, int count, long buffers, long offsets, long sizes) { - GL44C.nglBindBuffersRange(target, first, count, buffers, offsets, sizes); - } - - /** - * Binds {@code count} existing buffer objects to bindings numbered {@code first} through {@code first+count-1} in the array of buffer binding points - * corresponding to {@code target}. {@code offsets} and {@code sizes} specify arrays of {@code count} values indicating the range of each buffer to bind. - * If {@code buffers} is {@code NULL}, all bindings from {@code first} through {@code first+count-1} are reset to their unbound (zero) state. In this - * case, the offsets and sizes associated with the binding points are set to default values, ignoring {@code offsets} and {@code sizes}. It is equivalent - * to: - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindBufferRange(target, first + i, 0, 0, 0);
    -     *     } else {
    -     *         glBindBufferRange(target, first + i, buffers[i], offsets[i], sizes[i]);
    -     *     }
    -     * }
    - * - *

    except that the single general buffer binding corresponding to {@code target} is unmodified, and that buffers will not be created if they do not exist.

    - * - *

    The values specified in {@code buffers}, {@code offsets}, and {@code sizes} will be checked separately for each binding point. When values for a - * specific binding point are invalid, the state for that binding point will be unchanged and an error will be generated. However, state for other binding - * points will still be changed if their corresponding values are valid.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param first the first binding - * @param buffers an array of names of existing buffers objects - * @param offsets an array of offsets - * @param sizes an array of sizes - */ - public static void glBindBuffersRange(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizeiptr const *") PointerBuffer sizes) { - GL44C.glBindBuffersRange(target, first, buffers, offsets, sizes); - } - - // --- [ glBindTextures ] --- - - /** - * Unsafe version of: {@link #glBindTextures BindTextures} - * - * @param count the number of texture objects - */ - public static void nglBindTextures(int first, int count, long textures) { - GL44C.nglBindTextures(first, count, textures); - } - - /** - * Binds {@code count} existing texture objects to texture image units numbered {@code first} through {@code first+count-1}. If {@code textures} is not - * {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing texture object. When an entry in - * {@code textures} is the name of an existing texture object, that object is bound to corresponding texture unit for the target specified when the texture - * object was created. When an entry in {@code textures} is zero, each of the targets enumerated at the beginning of this section is reset to its default - * texture for the corresponding texture image unit. If {@code textures} is {@code NULL}, each target of each affected texture image unit from {@code first} - * through {@code first+count-1} is reset to its default texture. - * - *

    {@code BindTextures} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     uint texture;
    -     *     if ( textures == NULL ) {
    -     *         texture = 0;
    -     *     } else {
    -     *         texture = textures[i];
    -     *     }
    -     *     ActiveTexture(TEXTURE0 + first + i);
    -     *     if ( texture != 0 ) {
    -     *         enum target; // target of texture object textures[i]
    -     *         BindTexture(target, textures[i]);
    -     *     } else {
    -     *         for ( target in all supported targets ) {
    -     *             BindTexture(target, 0);
    -     *         }
    -     *     }
    -     * }
    - * - *

    except that the active texture selector retains its original value upon completion of the command, and that textures will not be created if they do not - * exist.

    - * - *

    The values specified in {@code textures} will be checked separately for each texture image unit. When a value for a specific texture image unit is - * invalid, the state for that texture image unit will be unchanged and an error will be generated. However, state for other texture image units will still - * be changed if their corresponding values are valid.

    - * - * @param first the first texture objects - * @param textures an array of zeros or names of existing texture objects - */ - public static void glBindTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer textures) { - GL44C.glBindTextures(first, textures); - } - - // --- [ glBindSamplers ] --- - - /** - * Unsafe version of: {@link #glBindSamplers BindSamplers} - * - * @param count the number of sampler objects - */ - public static void nglBindSamplers(int first, int count, long samplers) { - GL44C.nglBindSamplers(first, count, samplers); - } - - /** - * Binds {@code count} existing sampler objects to texture image units numbered {@code first} through {@code first+count-1}. If {@code samplers} is not - * {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing sampler object. If {@code samplers} is {@code NULL}, - * each affected texture image unit from {@code first} through {@code first+count-1} will be reset to have no bound sampler object. - * - *

    {@code BindSamplers} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( samplers == NULL ) {
    -     *         glBindSampler(first + i, 0);
    -     *     } else {
    -     *         glBindSampler(first + i, samplers[i]);
    -     *     }
    -     * }
    - * - *

    The values specified in {@code samplers} will be checked separately for each texture image unit. When a value for a specific texture image unit is - * invalid, the state for that texture image unit will be unchanged and an error will be generated. However, state for other texture image units will still - * be changed if their corresponding values are valid.

    - * - * @param first the first sampler object - * @param samplers an array of zeros or names of existing sampler objects - */ - public static void glBindSamplers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer samplers) { - GL44C.glBindSamplers(first, samplers); - } - - // --- [ glBindImageTextures ] --- - - /** - * Unsafe version of: {@link #glBindImageTextures BindImageTextures} - * - * @param count the number of image units - */ - public static void nglBindImageTextures(int first, int count, long textures) { - GL44C.nglBindImageTextures(first, count, textures); - } - - /** - * Binds {@code count} existing texture objects to image units numbered {@code first} through {@code first+count-1}. If {@code textures} is not {@code NULL}, it - * specifies an array of {@code count} values, each of which must be zero or the name of an existing texture object. If {@code textures} is {@code NULL}, each - * affected image unit from {@code first} through {@code first+count-1} will be reset to have no bound texture object. - * - *

    When binding a non-zero texture object to an image unit, the image unit {@code level}, {@code layered}, {@code layer}, and {@code access} parameters are - * set to zero, {@link GL11#GL_TRUE TRUE}, zero, and {@link GL15#GL_READ_WRITE READ_WRITE}, respectively. The image unit {@code format} parameter is taken from the internal - * format of the texture image at level zero of the texture object identified by {@code textures}. For cube map textures, the internal format of the - * {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X} image of level zero is used. For multisample, multisample array, buffer, and rectangle textures, the internal - * format of the single texture level is used.

    - * - *

    When unbinding a texture object from an image unit, the image unit parameters {@code level}, {@code layered}, {@code layer}, and {@code format} will be - * reset to their default values of zero, {@link GL11#GL_FALSE FALSE}, 0, and {@link GL30#GL_R8 R8}, respectively.

    - * - *

    {@code BindImageTextures} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( textures == NULL || textures[i] = 0 ) {
    -     *         glBindImageTexture(first + i, 0, 0, FALSE, 0, READ_ONLY, R8);
    -     *     } else {
    -     *         glBindImageTexture(first + i, textures[i], 0, TRUE, 0, READ_WRITE, lookupInternalFormat(textures[i]));
    -     *     }
    -     * }
    - * - *

    where {@code lookupInternalFormat} returns the internal format of the specified texture object.

    - * - *

    The values specified in {@code textures} will be checked separately for each image unit. When a value for a specific image unit is invalid, the state - * for that image unit will be unchanged and an error will be generated. However, state for other image units will still be changed if their corresponding - * values are valid.

    - * - * @param first the first image unit - * @param textures an array of zeros or names of existing texture objects - */ - public static void glBindImageTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer textures) { - GL44C.glBindImageTextures(first, textures); - } - - // --- [ glBindVertexBuffers ] --- - - /** - * Unsafe version of: {@link #glBindVertexBuffers BindVertexBuffers} - * - * @param count the number of vertex buffer binding points - */ - public static void nglBindVertexBuffers(int first, int count, long buffers, long offsets, long strides) { - GL44C.nglBindVertexBuffers(first, count, buffers, offsets, strides); - } - - /** - * Binds {@code count} existing buffer objects to vertex buffer binding points numbered {@code first} through {@code first+count-1}. If {@code buffers} is - * not {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing buffer object. {@code offsets} and - * {@code strides} specify arrays of {@code count} values indicating the offset of the first element and stride between elements in each buffer, - * respectively. If {@code buffers} is {@code NULL}, each affected vertex buffer binding point from {@code first} through {@code first+count-1} will be reset to - * have no bound buffer object. In this case, the offsets and strides associated with the binding points are set to default values, ignoring - * {@code offsets} and {@code strides}. - * - *

    {@code BindVertexBuffers} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindVertexBuffer(first + i, 0, 0, 16);
    -     *     } else {
    -     *         glBindVertexBuffer(first + i, buffers[i], offsets[i], strides[i]);
    -     *     }
    -     * }
    - * - *

    except that buffers will not be created if they do not exist.

    - * - *

    The values specified in {@code buffers}, {@code offsets}, and {@code strides} will be checked separately for each vertex buffer binding point. When a - * value for a specific binding point is invalid, the state for that binding point will be unchanged and an error will be generated. However, state for - * other binding points will still be changed if their corresponding values are valid.

    - * - * @param first the first vertex buffer binding point - * @param buffers an array of zeros or names of existing buffers objects - * @param offsets an array of offses - * @param strides an array of stride values - */ - public static void glBindVertexBuffers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") IntBuffer strides) { - GL44C.glBindVertexBuffers(first, buffers, offsets, strides); - } - - /** Array version of: {@link #glBindBuffersBase BindBuffersBase} */ - public static void glBindBuffersBase(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers) { - GL44C.glBindBuffersBase(target, first, buffers); - } - - /** Array version of: {@link #glBindBuffersRange BindBuffersRange} */ - public static void glBindBuffersRange(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizeiptr const *") PointerBuffer sizes) { - GL44C.glBindBuffersRange(target, first, buffers, offsets, sizes); - } - - /** Array version of: {@link #glBindTextures BindTextures} */ - public static void glBindTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] textures) { - GL44C.glBindTextures(first, textures); - } - - /** Array version of: {@link #glBindSamplers BindSamplers} */ - public static void glBindSamplers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] samplers) { - GL44C.glBindSamplers(first, samplers); - } - - /** Array version of: {@link #glBindImageTextures BindImageTextures} */ - public static void glBindImageTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] textures) { - GL44C.glBindImageTextures(first, textures); - } - - /** Array version of: {@link #glBindVertexBuffers BindVertexBuffers} */ - public static void glBindVertexBuffers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") int[] strides) { - GL44C.glBindVertexBuffers(first, buffers, offsets, strides); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultiDrawIndirect.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultiDrawIndirect.java deleted file mode 100644 index 2dd36793..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultiDrawIndirect.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_multi_draw_indirect extension. - * - *

    The {@link ARBDrawIndirect ARB_draw_indirect} extension (included in OpenGL 4.0) introduced mechanisms whereby the parameters for a draw function may be provided in a - * structure contained in a buffer object rather than as parameters to the drawing procedure. This is known as an indirect draw and is exposed as two new - * functions, {@link ARBDrawIndirect#glDrawArraysIndirect DrawArraysIndirect} and {@link ARBDrawIndirect#glDrawElementsIndirect DrawElementsIndirect}. Each of these functions generates a single batch of - * primitives.

    - * - *

    This extension builds on this functionality by providing procedures to invoke multiple draws from a single procedure call. This allows large batches of - * drawing commands to be assembled in server memory (via a buffer object) which may then be dispatched through a single function call.

    - * - *

    Requires {@link GL40 OpenGL 4.0} or {@link ARBDrawIndirect ARB_draw_indirect}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBMultiDrawIndirect { - - static { GL.initialize(); } - - protected ARBMultiDrawIndirect() { - throw new UnsupportedOperationException(); - } - - // --- [ glMultiDrawArraysIndirect ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirect MultiDrawArraysIndirect} */ - public static void nglMultiDrawArraysIndirect(int mode, long indirect, int drawcount, int stride) { - GL43C.nglMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - // --- [ glMultiDrawElementsIndirect ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirect MultiDrawElementsIndirect} */ - public static void nglMultiDrawElementsIndirect(int mode, int type, long indirect, int drawcount, int stride) { - GL43C.nglMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** Array version of: {@link #glMultiDrawArraysIndirect MultiDrawArraysIndirect} */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** Array version of: {@link #glMultiDrawElementsIndirect MultiDrawElementsIndirect} */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultisample.java deleted file mode 100644 index ecec4b3e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultisample.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_multisample extension. - * - *

    This extension provides a mechanism to antialias all GL primitives: points, lines, polygons, bitmaps, and images. The technique is to sample all - * primitives multiple times at each pixel. The color sample values are resolved to a single, displayable color each time a pixel is updated, so the - * antialiasing appears to be automatic at the application level. Because each sample includes depth and stencil information, the depth and stencil - * functions perform equivalently to the single-sample mode.

    - * - *

    An additional buffer, called the multisample buffer, is added to the framebuffer. Pixel sample values, including color, depth, and stencil values, are - * stored in this buffer. When the framebuffer includes a multisample buffer, it does not also include separate depth or stencil buffers, even if the - * multisample buffer does not store depth or stencil values. Color buffers (left/right, front/back, and aux) do coexist with the multisample buffer, - * however.

    - * - *

    Multisample antialiasing is most valuable for rendering polygons, because it requires no sorting for hidden surface elimination, and it correctly - * handles adjacent polygons, object silhouettes, and even intersecting polygons. If only points or lines are being rendered, the "smooth" antialiasing - * mechanism provided by the base GL may result in a higher quality image. This extension is designed to allow multisample and smooth antialiasing - * techniques to be alternated during the rendering of a single scene.

    - */ -public class ARBMultisample { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_MULTISAMPLE_ARB = 0x809D, - GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E, - GL_SAMPLE_ALPHA_TO_ONE_ARB = 0x809F, - GL_SAMPLE_COVERAGE_ARB = 0x80A0; - - /** Accepted by the {@code mask} parameter of PushAttrib. */ - public static final int GL_MULTISAMPLE_BIT_ARB = 0x20000000; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_SAMPLE_BUFFERS_ARB = 0x80A8, - GL_SAMPLES_ARB = 0x80A9, - GL_SAMPLE_COVERAGE_VALUE_ARB = 0x80AA, - GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB; - - protected ARBMultisample() { - throw new UnsupportedOperationException(); - } - - // --- [ glSampleCoverageARB ] --- - - /** - * Specifies simultaneously the values of {@link #GL_SAMPLE_COVERAGE_VALUE_ARB SAMPLE_COVERAGE_VALUE_ARB} and {@link #GL_SAMPLE_COVERAGE_INVERT_ARB SAMPLE_COVERAGE_INVERT_ARB}. - * - *

    If {@link #GL_SAMPLE_COVERAGE_ARB SAMPLE_COVERAGE_ARB} is enabled, the fragment coverage is ANDed with another temporary coverage. This temporary coverage is a function of the value - * of {@link #GL_SAMPLE_COVERAGE_VALUE_ARB SAMPLE_COVERAGE_VALUE_ARB}. If {@link #GL_SAMPLE_COVERAGE_INVERT_ARB SAMPLE_COVERAGE_INVERT_ARB} is {@link GL11#GL_TRUE TRUE}, the temporary coverage is inverted (all bit values are inverted) before it - * is ANDed with the fragment coverage.

    - * - * @param value the desired coverage value - * @param invert if true, the temporary coverage is inverted. One of:
    {@link GL11#GL_TRUE TRUE}{@link GL11#GL_FALSE FALSE}
    - */ - public static native void glSampleCoverageARB(@NativeType("GLfloat") float value, @NativeType("GLboolean") boolean invert); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultitexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultitexture.java deleted file mode 100644 index 691fedbb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBMultitexture.java +++ /dev/null @@ -1,724 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_multitexture extension. - * - *

    This extension allows application of multiple textures to a fragment in one rendering pass.

    - * - *

    Promoted to core in {@link GL13 OpenGL 1.3}.

    - */ -public class ARBMultitexture { - - static { GL.initialize(); } - - /** Accepted by the {@code texture} parameter of ActiveTexture and MultiTexCoord. */ - public static final int - GL_TEXTURE0_ARB = 0x84C0, - GL_TEXTURE1_ARB = 0x84C1, - GL_TEXTURE2_ARB = 0x84C2, - GL_TEXTURE3_ARB = 0x84C3, - GL_TEXTURE4_ARB = 0x84C4, - GL_TEXTURE5_ARB = 0x84C5, - GL_TEXTURE6_ARB = 0x84C6, - GL_TEXTURE7_ARB = 0x84C7, - GL_TEXTURE8_ARB = 0x84C8, - GL_TEXTURE9_ARB = 0x84C9, - GL_TEXTURE10_ARB = 0x84CA, - GL_TEXTURE11_ARB = 0x84CB, - GL_TEXTURE12_ARB = 0x84CC, - GL_TEXTURE13_ARB = 0x84CD, - GL_TEXTURE14_ARB = 0x84CE, - GL_TEXTURE15_ARB = 0x84CF, - GL_TEXTURE16_ARB = 0x84D0, - GL_TEXTURE17_ARB = 0x84D1, - GL_TEXTURE18_ARB = 0x84D2, - GL_TEXTURE19_ARB = 0x84D3, - GL_TEXTURE20_ARB = 0x84D4, - GL_TEXTURE21_ARB = 0x84D5, - GL_TEXTURE22_ARB = 0x84D6, - GL_TEXTURE23_ARB = 0x84D7, - GL_TEXTURE24_ARB = 0x84D8, - GL_TEXTURE25_ARB = 0x84D9, - GL_TEXTURE26_ARB = 0x84DA, - GL_TEXTURE27_ARB = 0x84DB, - GL_TEXTURE28_ARB = 0x84DC, - GL_TEXTURE29_ARB = 0x84DD, - GL_TEXTURE30_ARB = 0x84DE, - GL_TEXTURE31_ARB = 0x84DF; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_ACTIVE_TEXTURE_ARB = 0x84E0, - GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1, - GL_MAX_TEXTURE_UNITS_ARB = 0x84E2; - - protected ARBMultitexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glActiveTextureARB ] --- - - /** - * Selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation - * dependent. - * - * @param texture which texture unit to make active. One of:
    {@link #GL_TEXTURE0_ARB TEXTURE0_ARB}GL_TEXTURE[1-31]
    - */ - public static native void glActiveTextureARB(@NativeType("GLenum") int texture); - - // --- [ glClientActiveTextureARB ] --- - - /** - * Selects the vertex array client state parameters to be modified by the TexCoordPointer command and the array affected by EnableClientState and - * DisableClientState with parameter TEXTURE_COORD_ARRAY. - * - * @param texture which texture coordinate array to make active. One of:
    {@link #GL_TEXTURE0_ARB TEXTURE0_ARB}GL_TEXTURE[1-31]
    - */ - public static native void glClientActiveTextureARB(@NativeType("GLenum") int texture); - - // --- [ glMultiTexCoord1fARB ] --- - - /** - * Sets the current one-dimensional texture coordinate for the specified texture coordinate set. {@code t} and {@code r} are implicitly set to 0 and {@code q} to 1. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - */ - public static native void glMultiTexCoord1fARB(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s); - - // --- [ glMultiTexCoord1sARB ] --- - - /** - * Short version of {@link #glMultiTexCoord1fARB MultiTexCoord1fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - */ - public static native void glMultiTexCoord1sARB(@NativeType("GLenum") int texture, @NativeType("GLshort") short s); - - // --- [ glMultiTexCoord1iARB ] --- - - /** - * Integer version of {@link #glMultiTexCoord1fARB MultiTexCoord1fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - */ - public static native void glMultiTexCoord1iARB(@NativeType("GLenum") int texture, @NativeType("GLint") int s); - - // --- [ glMultiTexCoord1dARB ] --- - - /** - * Double version of {@link #glMultiTexCoord1fARB MultiTexCoord1fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - */ - public static native void glMultiTexCoord1dARB(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s); - - // --- [ glMultiTexCoord1fvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1fvARB MultiTexCoord1fvARB} */ - public static native void nglMultiTexCoord1fvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1fARB MultiTexCoord1fARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord1fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1fvARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord1svARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1svARB MultiTexCoord1svARB} */ - public static native void nglMultiTexCoord1svARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1sARB MultiTexCoord1sARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord1svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1svARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord1ivARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1ivARB MultiTexCoord1ivARB} */ - public static native void nglMultiTexCoord1ivARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1iARB MultiTexCoord1iARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord1ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1ivARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord1dvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1dvARB MultiTexCoord1dvARB} */ - public static native void nglMultiTexCoord1dvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1dARB MultiTexCoord1dARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord1dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1dvARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2fARB ] --- - - /** - * Sets the current two-dimensional texture coordinate for the specified texture coordinate set. {@code r} is implicitly set to 0 and {@code q} to 1. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - */ - public static native void glMultiTexCoord2fARB(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s, @NativeType("GLfloat") float t); - - // --- [ glMultiTexCoord2sARB ] --- - - /** - * Short version of {@link #glMultiTexCoord2fARB MultiTexCoord2fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - */ - public static native void glMultiTexCoord2sARB(@NativeType("GLenum") int texture, @NativeType("GLshort") short s, @NativeType("GLshort") short t); - - // --- [ glMultiTexCoord2iARB ] --- - - /** - * Integer version of {@link #glMultiTexCoord2fARB MultiTexCoord2fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - */ - public static native void glMultiTexCoord2iARB(@NativeType("GLenum") int texture, @NativeType("GLint") int s, @NativeType("GLint") int t); - - // --- [ glMultiTexCoord2dARB ] --- - - /** - * Double version of {@link #glMultiTexCoord2fARB MultiTexCoord2fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - */ - public static native void glMultiTexCoord2dARB(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s, @NativeType("GLdouble") double t); - - // --- [ glMultiTexCoord2fvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2fvARB MultiTexCoord2fvARB} */ - public static native void nglMultiTexCoord2fvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2fARB MultiTexCoord2fARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord2fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2fvARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2svARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2svARB MultiTexCoord2svARB} */ - public static native void nglMultiTexCoord2svARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2sARB MultiTexCoord2sARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord2svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2svARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2ivARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2ivARB MultiTexCoord2ivARB} */ - public static native void nglMultiTexCoord2ivARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2iARB MultiTexCoord2iARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord2ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2ivARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2dvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2dvARB MultiTexCoord2dvARB} */ - public static native void nglMultiTexCoord2dvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2dARB MultiTexCoord2dARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord2dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2dvARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3fARB ] --- - - /** - * Sets the current three-dimensional texture coordinate for the specified texture coordinate set. {@code q} is implicitly set to 1. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - */ - public static native void glMultiTexCoord3fARB(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s, @NativeType("GLfloat") float t, @NativeType("GLfloat") float r); - - // --- [ glMultiTexCoord3sARB ] --- - - /** - * Short version of {@link #glMultiTexCoord3fARB MultiTexCoord3fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - */ - public static native void glMultiTexCoord3sARB(@NativeType("GLenum") int texture, @NativeType("GLshort") short s, @NativeType("GLshort") short t, @NativeType("GLshort") short r); - - // --- [ glMultiTexCoord3iARB ] --- - - /** - * Integer version of {@link #glMultiTexCoord3fARB MultiTexCoord3fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - */ - public static native void glMultiTexCoord3iARB(@NativeType("GLenum") int texture, @NativeType("GLint") int s, @NativeType("GLint") int t, @NativeType("GLint") int r); - - // --- [ glMultiTexCoord3dARB ] --- - - /** - * Double version of {@link #glMultiTexCoord3fARB MultiTexCoord3fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - */ - public static native void glMultiTexCoord3dARB(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s, @NativeType("GLdouble") double t, @NativeType("GLdouble") double r); - - // --- [ glMultiTexCoord3fvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3fvARB MultiTexCoord3fvARB} */ - public static native void nglMultiTexCoord3fvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3fARB MultiTexCoord3fARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord3fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3fvARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3svARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3svARB MultiTexCoord3svARB} */ - public static native void nglMultiTexCoord3svARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3sARB MultiTexCoord3sARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord3svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3svARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3ivARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3ivARB MultiTexCoord3ivARB} */ - public static native void nglMultiTexCoord3ivARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3iARB MultiTexCoord3iARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord3ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3ivARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3dvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3dvARB MultiTexCoord3dvARB} */ - public static native void nglMultiTexCoord3dvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3dARB MultiTexCoord3dARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord3dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3dvARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4fARB ] --- - - /** - * Sets the current four-dimensional texture coordinate for the specified texture coordinate set. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - */ - public static native void glMultiTexCoord4fARB(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s, @NativeType("GLfloat") float t, @NativeType("GLfloat") float r, @NativeType("GLfloat") float q); - - // --- [ glMultiTexCoord4sARB ] --- - - /** - * Short version of {@link #glMultiTexCoord4fARB MultiTexCoord4fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - */ - public static native void glMultiTexCoord4sARB(@NativeType("GLenum") int texture, @NativeType("GLshort") short s, @NativeType("GLshort") short t, @NativeType("GLshort") short r, @NativeType("GLshort") short q); - - // --- [ glMultiTexCoord4iARB ] --- - - /** - * Integer version of {@link #glMultiTexCoord4fARB MultiTexCoord4fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - */ - public static native void glMultiTexCoord4iARB(@NativeType("GLenum") int texture, @NativeType("GLint") int s, @NativeType("GLint") int t, @NativeType("GLint") int r, @NativeType("GLint") int q); - - // --- [ glMultiTexCoord4dARB ] --- - - /** - * Double version of {@link #glMultiTexCoord4fARB MultiTexCoord4fARB}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - */ - public static native void glMultiTexCoord4dARB(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s, @NativeType("GLdouble") double t, @NativeType("GLdouble") double r, @NativeType("GLdouble") double q); - - // --- [ glMultiTexCoord4fvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4fvARB MultiTexCoord4fvARB} */ - public static native void nglMultiTexCoord4fvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4fARB MultiTexCoord4fARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord4fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4fvARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4svARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4svARB MultiTexCoord4svARB} */ - public static native void nglMultiTexCoord4svARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4sARB MultiTexCoord4sARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord4svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4svARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4ivARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4ivARB MultiTexCoord4ivARB} */ - public static native void nglMultiTexCoord4ivARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4iARB MultiTexCoord4iARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord4ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4ivARB(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4dvARB ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4dvARB MultiTexCoord4dvARB} */ - public static native void nglMultiTexCoord4dvARB(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4dARB MultiTexCoord4dARB}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - */ - public static void glMultiTexCoord4dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4dvARB(texture, memAddress(v)); - } - - /** Array version of: {@link #glMultiTexCoord1fvARB MultiTexCoord1fvARB} */ - public static void glMultiTexCoord1fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord1svARB MultiTexCoord1svARB} */ - public static void glMultiTexCoord1svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord1ivARB MultiTexCoord1ivARB} */ - public static void glMultiTexCoord1ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1ivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord1dvARB MultiTexCoord1dvARB} */ - public static void glMultiTexCoord1dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord2fvARB MultiTexCoord2fvARB} */ - public static void glMultiTexCoord2fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord2svARB MultiTexCoord2svARB} */ - public static void glMultiTexCoord2svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord2ivARB MultiTexCoord2ivARB} */ - public static void glMultiTexCoord2ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2ivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord2dvARB MultiTexCoord2dvARB} */ - public static void glMultiTexCoord2dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord3fvARB MultiTexCoord3fvARB} */ - public static void glMultiTexCoord3fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord3svARB MultiTexCoord3svARB} */ - public static void glMultiTexCoord3svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord3ivARB MultiTexCoord3ivARB} */ - public static void glMultiTexCoord3ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3ivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord3dvARB MultiTexCoord3dvARB} */ - public static void glMultiTexCoord3dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord4fvARB MultiTexCoord4fvARB} */ - public static void glMultiTexCoord4fvARB(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord4svARB MultiTexCoord4svARB} */ - public static void glMultiTexCoord4svARB(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord4ivARB MultiTexCoord4ivARB} */ - public static void glMultiTexCoord4ivARB(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4ivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord4dvARB MultiTexCoord4dvARB} */ - public static void glMultiTexCoord4dvARB(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery.java deleted file mode 100644 index 0ea0f2f1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_occlusion_query extension. - * - *

    This extension defines a mechanism whereby an application can query the number of pixels (or, more precisely, samples) drawn by a primitive or group of - * primitives.

    - * - *

    The primary purpose of such a query (hereafter referred to as an "occlusion query") is to determine the visibility of an object. Typically, the - * application will render the major occluders in the scene, then perform an occlusion query for the bounding box of each detail object in the scene. Only - * if said bounding box is visible, i.e., if at least one sample is drawn, should the corresponding object be drawn.

    - * - *

    The earlier HP_occlusion_test extension defined a similar mechanism, but it had two major shortcomings.

    - * - *
      - *
    • It returned the result as a simple {@link GL11#GL_TRUE TRUE}/{@link GL11#GL_FALSE FALSE} result, when in fact it is often useful to know exactly how many samples were drawn.
    • - *
    • It provided only a simple "stop-and-wait" model for using multiple queries. The application begins an occlusion test and ends it; then, at some - * later point, it asks for the result, at which point the driver must stop and wait until the result from the previous test is back before the - * application can even begin the next one. This is a very simple model, but its performance is mediocre when an application wishes to perform many - * queries, and it eliminates most of the opportunities for parallelism between the CPU and GPU.
    • - *
    - * - *

    This extension solves both of those problems. It returns as its result the number of samples that pass the depth and stencil tests, and it encapsulates - * occlusion queries in "query objects" that allow applications to issue many queries before asking for the result of any one. As a result, they can - * overlap the time it takes for the occlusion query results to be returned with other, more useful work, such as rendering other parts of the scene or - * performing other computations on the CPU.

    - * - *

    There are many situations where a pixel/sample count, rather than a boolean result, is useful.

    - * - *
      - *
    • Objects that are visible but cover only a very small number of pixels can be skipped at a minimal reduction of image quality.
    • - *
    • Knowing exactly how many pixels an object might cover may help the application decide which level-of-detail model should be used. If only a few - * pixels are visible, a low-detail model may be acceptable.
    • - *
    • "Depth peeling" techniques, such as order-independent transparency, need to know when to stop rendering more layers; it is difficult to determine a - * priori how many layers are needed. A boolean result allows applications to stop when more layers will not affect the image at all, but this will - * likely result in unacceptable performance. Instead, it makes more sense to stop rendering when the number of pixels in each layer falls below a - * given threshold.
    • - *
    • Occlusion queries can replace glReadPixels of the depth buffer to determine whether (for example) a light source is visible for the purposes of a - * lens flare effect or a halo to simulate glare. Pixel counts allow you to compute the percentage of the light source that is visible, and the - * brightness of these effects can be modulated accordingly.
    • - *
    - * - *

    Promoted to core in {@link GL15 OpenGL 1.5}.

    - */ -public class ARBOcclusionQuery { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of BeginQueryARB, EndQueryARB, and GetQueryivARB. */ - public static final int GL_SAMPLES_PASSED_ARB = 0x8914; - - /** Accepted by the {@code pname} parameter of GetQueryivARB. */ - public static final int - GL_QUERY_COUNTER_BITS_ARB = 0x8864, - GL_CURRENT_QUERY_ARB = 0x8865; - - /** Accepted by the {@code pname} parameter of GetQueryObjectivARB and GetQueryObjectuivARB. */ - public static final int - GL_QUERY_RESULT_ARB = 0x8866, - GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867; - - protected ARBOcclusionQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ glGenQueriesARB ] --- - - /** - * Unsafe version of: {@link #glGenQueriesARB GenQueriesARB} - * - * @param n the number of query object names to be generated - */ - public static native void nglGenQueriesARB(int n, long ids); - - /** - * Generates query object names. - * - * @param ids a buffer in which the generated query object names are stored - */ - public static void glGenQueriesARB(@NativeType("GLuint *") IntBuffer ids) { - nglGenQueriesARB(ids.remaining(), memAddress(ids)); - } - - /** Generates query object names. */ - @NativeType("void") - public static int glGenQueriesARB() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.callocInt(1); - nglGenQueriesARB(1, memAddress(ids)); - return ids.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteQueriesARB ] --- - - /** - * Unsafe version of: {@link #glDeleteQueriesARB DeleteQueriesARB} - * - * @param n the number of query objects to be deleted - */ - public static native void nglDeleteQueriesARB(int n, long ids); - - /** - * Deletes named query objects. - * - * @param ids an array of query objects to be deleted - */ - public static void glDeleteQueriesARB(@NativeType("GLuint const *") IntBuffer ids) { - nglDeleteQueriesARB(ids.remaining(), memAddress(ids)); - } - - /** Deletes named query objects. */ - public static void glDeleteQueriesARB(@NativeType("GLuint const *") int id) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.ints(id); - nglDeleteQueriesARB(1, memAddress(ids)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsQueryARB ] --- - - /** - * Determine if a name corresponds to a query object. - * - * @param id a value that may be the name of a query object - */ - @NativeType("GLboolean") - public static native boolean glIsQueryARB(@NativeType("GLuint") int id); - - // --- [ glBeginQueryARB ] --- - - /** - * Creates a query object and makes it active. - * - * @param target the target type of query object established. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param id the name of a query object - */ - public static native void glBeginQueryARB(@NativeType("GLenum") int target, @NativeType("GLuint") int id); - - // --- [ glEndQueryARB ] --- - - /** - * Marks the end of the sequence of commands to be tracked for the active query specified by {@code target}. - * - * @param target the query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - */ - public static native void glEndQueryARB(@NativeType("GLenum") int target); - - // --- [ glGetQueryivARB ] --- - - /** Unsafe version of: {@link #glGetQueryivARB GetQueryivARB} */ - public static native void nglGetQueryivARB(int target, int pname, long params); - - /** - * Returns parameters of a query object target. - * - * @param target the query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param pname the symbolic name of a query object target parameter. One of:
    {@link #GL_QUERY_COUNTER_BITS_ARB QUERY_COUNTER_BITS_ARB}{@link #GL_CURRENT_QUERY_ARB CURRENT_QUERY_ARB}
    - * @param params the requested data - */ - public static void glGetQueryivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryivARB(target, pname, memAddress(params)); - } - - /** - * Returns parameters of a query object target. - * - * @param target the query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param pname the symbolic name of a query object target parameter. One of:
    {@link #GL_QUERY_COUNTER_BITS_ARB QUERY_COUNTER_BITS_ARB}{@link #GL_CURRENT_QUERY_ARB CURRENT_QUERY_ARB}
    - */ - @NativeType("void") - public static int glGetQueryiARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetQueryivARB(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetQueryObjectivARB ] --- - - /** Unsafe version of: {@link #glGetQueryObjectivARB GetQueryObjectivARB} */ - public static native void nglGetQueryObjectivARB(int id, int pname, long params); - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT_ARB QUERY_RESULT_ARB}{@link #GL_QUERY_RESULT_AVAILABLE_ARB QUERY_RESULT_AVAILABLE_ARB}
    - * @param params the requested data - */ - public static void glGetQueryObjectivARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjectivARB(id, pname, memAddress(params)); - } - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT_ARB QUERY_RESULT_ARB}{@link #GL_QUERY_RESULT_AVAILABLE_ARB QUERY_RESULT_AVAILABLE_ARB}
    - * @param params the requested data - */ - public static void glGetQueryObjectivARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") long params) { - nglGetQueryObjectivARB(id, pname, params); - } - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT_ARB QUERY_RESULT_ARB}{@link #GL_QUERY_RESULT_AVAILABLE_ARB QUERY_RESULT_AVAILABLE_ARB}
    - */ - @NativeType("void") - public static int glGetQueryObjectiARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetQueryObjectivARB(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetQueryObjectuivARB ] --- - - /** Unsafe version of: {@link #glGetQueryObjectuivARB GetQueryObjectuivARB} */ - public static native void nglGetQueryObjectuivARB(int id, int pname, long params); - - /** - * Unsigned version of {@link #glGetQueryObjectivARB GetQueryObjectivARB}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT_ARB QUERY_RESULT_ARB}{@link #GL_QUERY_RESULT_AVAILABLE_ARB QUERY_RESULT_AVAILABLE_ARB}
    - * @param params the requested data - */ - public static void glGetQueryObjectuivARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjectuivARB(id, pname, memAddress(params)); - } - - /** - * Unsigned version of {@link #glGetQueryObjectivARB GetQueryObjectivARB}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT_ARB QUERY_RESULT_ARB}{@link #GL_QUERY_RESULT_AVAILABLE_ARB QUERY_RESULT_AVAILABLE_ARB}
    - * @param params the requested data - */ - public static void glGetQueryObjectuivARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") long params) { - nglGetQueryObjectuivARB(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjectivARB GetQueryObjectivARB}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT_ARB QUERY_RESULT_ARB}{@link #GL_QUERY_RESULT_AVAILABLE_ARB QUERY_RESULT_AVAILABLE_ARB}
    - */ - @NativeType("void") - public static int glGetQueryObjectuiARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetQueryObjectuivARB(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGenQueriesARB GenQueriesARB} */ - public static void glGenQueriesARB(@NativeType("GLuint *") int[] ids) { - long __functionAddress = GL.getICD().glGenQueriesARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** Array version of: {@link #glDeleteQueriesARB DeleteQueriesARB} */ - public static void glDeleteQueriesARB(@NativeType("GLuint const *") int[] ids) { - long __functionAddress = GL.getICD().glDeleteQueriesARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** Array version of: {@link #glGetQueryivARB GetQueryivARB} */ - public static void glGetQueryivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetQueryivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetQueryObjectivARB GetQueryObjectivARB} */ - public static void glGetQueryObjectivARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetQueryObjectivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetQueryObjectuivARB GetQueryObjectuivARB} */ - public static void glGetQueryObjectuivARB(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetQueryObjectuivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery2.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery2.java deleted file mode 100644 index 325b7440..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBOcclusionQuery2.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_occlusion_query2 extension. - * - *

    This extension trivially adds a boolean occlusion query to {@link ARBOcclusionQuery ARB_occlusion_query}.

    - * - *

    While the counter-based occlusion query provided by ARB_occlusion_query is flexible, there is still value to a simple boolean, which is often sufficient - * for applications.

    - * - *

    Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public final class ARBOcclusionQuery2 { - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_ANY_SAMPLES_PASSED = 0x8C2F; - - private ARBOcclusionQuery2() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBParallelShaderCompile.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBParallelShaderCompile.java deleted file mode 100644 index fb3e86cd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBParallelShaderCompile.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_parallel_shader_compile extension. - * - *

    Compiling GLSL into implementation-specific code can be a time consuming process, so a GL implementation may wish to perform the compilation in a - * separate CPU thread. This extension provides a mechanism for the application to provide a hint to limit the number of threads it wants to be used to - * compile shaders, as well as a query to determine if the compilation process is complete.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public class ARBParallelShaderCompile { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_SHADER_COMPILER_THREADS_ARB = 0x91B0; - - /** Accepted as part of the {@code pname} parameter to GetShaderiv() and accepted as part of the {@code pname} parameter to GetProgramiv(). */ - public static final int GL_COMPLETION_STATUS_ARB = 0x91B1; - - protected ARBParallelShaderCompile() { - throw new UnsupportedOperationException(); - } - - // --- [ glMaxShaderCompilerThreadsARB ] --- - - /** - * Application may use the following to hint to the driver the maximum number background threads it would like to be used in the process of compiling - * shaders or linking programs. - * - *

    An implementation may combine the maximum compiler thread request from multiple contexts in a share group in an implementation-specific way.

    - * - *

    An application can query the current MaxShaderCompilerThreads() {@code count} by calling {@link GL11C#glGetIntegerv GetIntegerv} with {@code pname} set to - * {@link #GL_MAX_SHADER_COMPILER_THREADS_ARB MAX_SHADER_COMPILER_THREADS_ARB}.

    - * - * @param count the number of background threads. A {@code count} of zero specifies a request for no parallel compiling or linking and a {@code count} of - * {@code 0xFFFFFFFF} requests an implementation-specific maximum. - */ - public static native void glMaxShaderCompilerThreadsARB(@NativeType("GLuint") int count); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPipelineStatisticsQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBPipelineStatisticsQuery.java deleted file mode 100644 index 38fa8584..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPipelineStatisticsQuery.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_pipeline_statistics_query extension. - * - *

    This extension introduces new query types that allow applications to get statistics information about different parts of the pipeline:

    - * - *
      - *
    • Number of vertices and primitives issued to the GL.
    • - *
    • Number of times a vertex shader, tessellation evaluation shader, geometry shader, fragment shader, and compute shader was invoked.
    • - *
    • Number of patches processed by the tessellation control shader stage.
    • - *
    • Number of primitives emitted by a geometry shader.
    • - *
    • Number of primitives that entered the primitive clipping stage.
    • - *
    • Number of primitives that are output by the primitive clipping stage.
    • - *
    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBPipelineStatisticsQuery { - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBeginQuery BeginQuery}, {@link GL15C#glEndQuery EndQuery}, {@link GL15C#glGetQueryiv GetQueryiv}, - * {@link GL40C#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40C#glEndQueryIndexed EndQueryIndexed} and {@link GL40C#glGetQueryIndexediv GetQueryIndexediv}. - */ - public static final int - GL_VERTICES_SUBMITTED_ARB = 0x82EE, - GL_PRIMITIVES_SUBMITTED_ARB = 0x82EF, - GL_VERTEX_SHADER_INVOCATIONS_ARB = 0x82F0, - GL_TESS_CONTROL_SHADER_PATCHES_ARB = 0x82F1, - GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB = 0x82F2, - GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F, - GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB = 0x82F3, - GL_FRAGMENT_SHADER_INVOCATIONS_ARB = 0x82F4, - GL_COMPUTE_SHADER_INVOCATIONS_ARB = 0x82F5, - GL_CLIPPING_INPUT_PRIMITIVES_ARB = 0x82F6, - GL_CLIPPING_OUTPUT_PRIMITIVES_ARB = 0x82F7; - - private ARBPipelineStatisticsQuery() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPixelBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBPixelBufferObject.java deleted file mode 100644 index 2fc510d7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPixelBufferObject.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_pixel_buffer_object extension. - * - *

    This extension expands on the interface provided by the {@link ARBVertexBufferObject ARB_vertex_buffer_object} extension (and later integrated into {@link GL15 OpenGL 1.5}) in order to - * permit buffer objects to be used not only with vertex array data, but also with pixel data. The intent is to provide more acceleration opportunities - * for OpenGL pixel commands.

    - * - *

    While a single buffer object can be bound for both vertex arrays and pixel commands, we use the designations vertex buffer object (VBO) and pixel buffer - * object (PBO) to indicate their particular usage in a given situation.

    - * - *

    Recall that buffer objects conceptually are nothing more than arrays of bytes, just like any chunk of memory. {@link ARBVertexBufferObject ARB_vertex_buffer_object} allows GL - * commands to source data from a buffer object by binding the buffer object to a given target and then overloading a certain set of GL commands' pointer - * arguments to refer to offsets inside the buffer, rather than pointers to user memory. An offset is encoded in a pointer by adding the offset to a null - * pointer.

    - * - *

    This extension does not add any new functionality to buffer objects themselves. It simply adds two new targets to which buffer objects can be bound: - * {@link #GL_PIXEL_PACK_BUFFER_ARB PIXEL_PACK_BUFFER_ARB} and {@link #GL_PIXEL_UNPACK_BUFFER_ARB PIXEL_UNPACK_BUFFER_ARB}. When a buffer object is bound to the {@link #GL_PIXEL_PACK_BUFFER_ARB PIXEL_PACK_BUFFER_ARB} target, commands such as - * {@link GL11C#glReadPixels ReadPixels} pack (write) their data into a buffer object. When a buffer object is bound to the {@link #GL_PIXEL_UNPACK_BUFFER_ARB PIXEL_UNPACK_BUFFER_ARB} target, commands such as - * {@link GL11#glDrawPixels DrawPixels} and {@link GL11C#glTexImage2D TexImage2D} unpack (read) their data from a buffer object.

    - * - *

    There are a several approaches to improve graphics performance with PBOs. Some of the most interesting approaches are:

    - * - *
      - *
    • Streaming texture updates: If the application uses {@link GL15C#glMapBuffer MapBuffer}/{@link GL15C#glUnmapBuffer UnmapBuffer} to write its data for glTexSubImage into a buffer object, at - * least one of the data copies usually required to download a texture can be eliminated, significantly increasing texture download performance.
    • - *
    • Streaming draw pixels: When {@link GL11#glDrawPixels DrawPixels} sources client memory, OpenGL says the client memory can be modified immediately after the - * glDrawPixels command returns without disturbing the drawn image. This typically necessitates unpacking and copying the image prior to glDrawPixels - * returning. However, when using glDrawPixels with a pixel pack buffer object, glDrawPixels may return prior to image unpacking because future - * modification of the buffer data requires explicit commands ({@link GL15C#glMapBuffer MapBuffer}, {@link GL15C#glBufferData BufferData}, or {@link GL15C#glBufferSubData BufferSubData}).
    • - *
    • Asynchronous {@link GL11C#glReadPixels ReadPixels}: If an application needs to read back a number of images and process them with the CPU, the existing GL interface - * makes it nearly impossible to pipeline this operation. The driver will typically send the hardware a readback command when glReadPixels is called, - * and then wait for all of the data to be available before returning control to the application. Then, the application can either process the data - * immediately or call glReadPixels again; in neither case will the readback overlap with the processing. If the application issues several readbacks - * into several buffer objects, however, and then maps each one to process its data, then the readbacks can proceed in parallel with the data processing.
    • - *
    • Render to vertex array: The application can use a fragment program to render some image into one of its buffers, then read this image out into a - * buffer object via {@link GL11C#glReadPixels ReadPixels}. Then, it can use this buffer object as a source of vertex data.
    • - *
    - * - *

    Requires {@link GL15 OpenGL 1.5} or {@link ARBVertexBufferObject ARB_vertex_buffer_object}. Promoted to core in {@link GL21 OpenGL 2.1}.

    - */ -public final class ARBPixelBufferObject { - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferParameteriv, and - * GetBufferPointerv. - */ - public static final int - GL_PIXEL_PACK_BUFFER_ARB = 0x88EB, - GL_PIXEL_UNPACK_BUFFER_ARB = 0x88EC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED, - GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF; - - private ARBPixelBufferObject() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPointParameters.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBPointParameters.java deleted file mode 100644 index d5c8d952..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPointParameters.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_point_parameters extension. - * - *

    This extension supports additional geometric characteristics of points. It can be used to render particles or tiny light sources, commonly referred to - * as "Light points".

    - * - *

    The raster brightness of a point is a function of the point area, point color, point transparency, and the response of the display's electron gun and - * phosphor. The point area and the point transparency are derived from the point size, currently provided with the {@code size} parameter of - * {@link GL11C#glPointSize PointSize}.

    - * - *

    The primary motivation is to allow the size of a point to be affected by distance attenuation. When distance attenuation has an effect, the final point - * size decreases as the distance of the point from the eye increases.

    - * - *

    The secondary motivation is a mean to control the mapping from the point size to the raster point area and point transparency. This is done in order to - * increase the dynamic range of the raster brightness of points. In other words, the alpha component of a point may be decreased (and its transparency - * increased) as its area shrinks below a defined threshold.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public class ARBPointParameters { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of PointParameterfvARB, and the {@code pname} of Get. */ - public static final int - GL_POINT_SIZE_MIN_ARB = 0x8126, - GL_POINT_SIZE_MAX_ARB = 0x8127, - GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128, - GL_POINT_DISTANCE_ATTENUATION_ARB = 0x8129; - - protected ARBPointParameters() { - throw new UnsupportedOperationException(); - } - - // --- [ glPointParameterfARB ] --- - - /** - * Sets the float value of a pointer parameter. - * - * @param pname the parameter to set. One of:
    {@link #GL_POINT_SIZE_MIN_ARB POINT_SIZE_MIN_ARB}{@link #GL_POINT_SIZE_MAX_ARB POINT_SIZE_MAX_ARB}{@link #GL_POINT_FADE_THRESHOLD_SIZE_ARB POINT_FADE_THRESHOLD_SIZE_ARB}
    - * @param param the parameter value - */ - public static native void glPointParameterfARB(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glPointParameterfvARB ] --- - - /** Unsafe version of: {@link #glPointParameterfvARB PointParameterfvARB} */ - public static native void nglPointParameterfvARB(int pname, long params); - - /** - * Pointer version of {@link #glPointParameterfARB PointParameterfARB}. - * - * @param pname the parameter to set. Must be:
    {@link #GL_POINT_DISTANCE_ATTENUATION_ARB POINT_DISTANCE_ATTENUATION_ARB}
    - * @param params the parameter value - */ - public static void glPointParameterfvARB(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 3); - } - nglPointParameterfvARB(pname, memAddress(params)); - } - - /** Array version of: {@link #glPointParameterfvARB PointParameterfvARB} */ - public static void glPointParameterfvARB(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glPointParameterfvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 3); - } - callPV(pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPointSprite.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBPointSprite.java deleted file mode 100644 index 20150ad8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPointSprite.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_point_sprite extension. - * - *

    Applications such as particle systems have tended to use OpenGL quads rather than points to render their geometry, since they would like to use a - * custom-drawn texture for each particle, rather than the traditional OpenGL round antialiased points, and each fragment in a point has the same texture - * coordinates as every other fragment.

    - * - *

    Unfortunately, specifying the geometry for these quads can be expensive, since it quadruples the amount of geometry required, and may also require the - * application to do extra processing to compute the location of each vertex.

    - * - *

    The purpose of this extension is to allow such applications to use points rather than quads. When {@link #GL_POINT_SPRITE_ARB POINT_SPRITE_ARB} is enabled, the state of point - * antialiasing is ignored. For each texture unit, the app can then specify whether to replace the existing texture coordinates with point sprite texture - * coordinates, which are interpolated across the point.

    - * - *

    Promoted to core in {@link GL20 OpenGL 2.0}.

    - */ -public final class ARBPointSprite { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of TexEnvi, TexEnviv, TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv. - */ - public static final int GL_POINT_SPRITE_ARB = 0x8861; - - /** - * When the {@code target} parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, or GetTexEnviv is POINT_SPRITE_ARB, then the value of - * {@code pname} may be. - */ - public static final int GL_COORD_REPLACE_ARB = 0x8862; - - private ARBPointSprite() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPolygonOffsetClamp.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBPolygonOffsetClamp.java deleted file mode 100644 index 37e85d29..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBPolygonOffsetClamp.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_polygon_offset_clamp extension. - * - *

    This extension adds a new parameter to the polygon offset function that clamps the calculated offset to a minimum or maximum value. The clamping - * functionality is useful when polygons are nearly parallel to the view direction because their high slopes can result in arbitrarily large polygon - * offsets. In the particular case of shadow mapping, the lack of clamping can produce the appearance of unwanted holes when the shadow casting polygons - * are offset beyond the shadow receiving polygons, and this problem can be alleviated by enforcing a maximum offset value.

    - * - *

    Requires {@link GL33 OpenGL 3.3}.

    - */ -public class ARBPolygonOffsetClamp { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_POLYGON_OFFSET_CLAMP = 0x8E1B; - - protected ARBPolygonOffsetClamp() { - throw new UnsupportedOperationException(); - } - - // --- [ glPolygonOffsetClamp ] --- - - /** - * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This - * function determines this value. - * - *

    {@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable - * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value, which may then be clamped to a minimum or maximum - * value specified by {@code clamp}.

    - * - *

    The values {@code factor}, {@code units}, and {@code clamp} may each be positive, negative, or zero. Calling the command {@link GL11C#glPolygonOffset PolygonOffset} is equivalent - * to calling the command {@code PolygonOffsetClamp} with clamp equal to zero.

    - * - * @param factor scales the maximum depth slope of the polygon - * @param units scales an implementation-dependent constant that relates to the usable resolution of the depth buffer - * @param clamp the minimum or maximum polygon offset value - */ - public static void glPolygonOffsetClamp(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units, @NativeType("GLfloat") float clamp) { - GL46C.glPolygonOffsetClamp(factor, units, clamp); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBProgramInterfaceQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBProgramInterfaceQuery.java deleted file mode 100644 index 11da8858..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBProgramInterfaceQuery.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_program_interface_query extension. - * - *

    This extension provides a single unified set of query commands that can be used by applications to determine properties of various interfaces and - * resources used by program objects to communicate with application code, fixed-function OpenGL pipeline stages, and other programs. In unextended OpenGL - * 4.2, there is a separate set of query commands for each different type of interface or resource used by the program. These different sets of queries are - * structured nearly identically, but the queries for some interfaces have limited capability (e.g., there is no ability to enumerate fragment shader - * outputs).

    - * - *

    With the single set of query commands provided by this extension, a consistent set of queries is available for all interfaces, and a new interface can - * be added without having to introduce a completely new set of query commands. These queries are intended to provide a superset of the capabilities - * provided by similar queries in OpenGL 4.2, and should allow for the deprecation of the existing queries.

    - * - *

    This extension defines two terms: interfaces and active resources. Each interface of a program object provides a way for the program to communicate with - * application code, fixed-function OpenGL pipeline stages, and other programs. Examples of interfaces for a program object include inputs (receiving - * values from vertex attributes or outputs of other programs), outputs (sending values to other programs or per-fragment operations), uniforms (receiving - * values from API calls), uniform blocks (receiving values from bound buffer objects), subroutines and subroutine uniforms (receiving API calls to - * indicate functions to call during program execution), and atomic counter buffers (holding values to be manipulated by atomic counter shader functions). - * Each interface of a program has a set of active resources used by the program. For example, the resources of a program's input interface includes all - * active input variables used by the first stage of the program. The resources of a program's uniform block interface consists of the set of uniform - * blocks with at least one member used by any shader in the program.

    - * - *

    Requires {@link GL20 OpenGL 2.0}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBProgramInterfaceQuery { - - static { GL.initialize(); } - - /** - * Accepted by the {@code programInterface} parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, - * GetProgramResourceLocation, and GetProgramResourceLocationIndex. - */ - public static final int - GL_UNIFORM = 0x92E1, - GL_UNIFORM_BLOCK = 0x92E2, - GL_PROGRAM_INPUT = 0x92E3, - GL_PROGRAM_OUTPUT = 0x92E4, - GL_BUFFER_VARIABLE = 0x92E5, - GL_SHADER_STORAGE_BLOCK = 0x92E6, - GL_VERTEX_SUBROUTINE = 0x92E8, - GL_TESS_CONTROL_SUBROUTINE = 0x92E9, - GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, - GL_GEOMETRY_SUBROUTINE = 0x92EB, - GL_FRAGMENT_SUBROUTINE = 0x92EC, - GL_COMPUTE_SUBROUTINE = 0x92ED, - GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, - GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, - GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, - GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, - GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, - GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, - GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; - - /** Accepted by the {@code pname} parameter of GetProgramInterfaceiv. */ - public static final int - GL_ACTIVE_RESOURCES = 0x92F5, - GL_MAX_NAME_LENGTH = 0x92F6, - GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, - GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; - - /** Accepted in the {@code props} array of GetProgramResourceiv. */ - public static final int - GL_NAME_LENGTH = 0x92F9, - GL_TYPE = 0x92FA, - GL_ARRAY_SIZE = 0x92FB, - GL_OFFSET = 0x92FC, - GL_BLOCK_INDEX = 0x92FD, - GL_ARRAY_STRIDE = 0x92FE, - GL_MATRIX_STRIDE = 0x92FF, - GL_IS_ROW_MAJOR = 0x9300, - GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, - GL_BUFFER_BINDING = 0x9302, - GL_BUFFER_DATA_SIZE = 0x9303, - GL_NUM_ACTIVE_VARIABLES = 0x9304, - GL_ACTIVE_VARIABLES = 0x9305, - GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, - GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, - GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, - GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, - GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, - GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, - GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, - GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, - GL_LOCATION = 0x930E, - GL_LOCATION_INDEX = 0x930F, - GL_IS_PER_PATCH = 0x92E7; - - protected ARBProgramInterfaceQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetProgramInterfaceiv ] --- - - /** Unsafe version of: {@link #glGetProgramInterfaceiv GetProgramInterfaceiv} */ - public static void nglGetProgramInterfaceiv(int program, int programInterface, int pname, long params) { - GL43C.nglGetProgramInterfaceiv(program, programInterface, pname, params); - } - - /** - * Queries a property of an interface in a program. - * - * @param program the name of a program object whose interface to query - * @param programInterface a token identifying the interface within {@code program} to query. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param pname the name of the parameter within {@code programInterface} to query. One of:
    {@link GL43C#GL_ACTIVE_RESOURCES ACTIVE_RESOURCES}{@link GL43C#GL_MAX_NAME_LENGTH MAX_NAME_LENGTH}{@link GL43C#GL_MAX_NUM_ACTIVE_VARIABLES MAX_NUM_ACTIVE_VARIABLES}
    {@link GL43C#GL_MAX_NUM_COMPATIBLE_SUBROUTINES MAX_NUM_COMPATIBLE_SUBROUTINES}
    - * @param params a variable to retrieve the value of {@code pname} for the program interface - */ - public static void glGetProgramInterfaceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL43C.glGetProgramInterfaceiv(program, programInterface, pname, params); - } - - /** - * Queries a property of an interface in a program. - * - * @param program the name of a program object whose interface to query - * @param programInterface a token identifying the interface within {@code program} to query. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param pname the name of the parameter within {@code programInterface} to query. One of:
    {@link GL43C#GL_ACTIVE_RESOURCES ACTIVE_RESOURCES}{@link GL43C#GL_MAX_NAME_LENGTH MAX_NAME_LENGTH}{@link GL43C#GL_MAX_NUM_ACTIVE_VARIABLES MAX_NUM_ACTIVE_VARIABLES}
    {@link GL43C#GL_MAX_NUM_COMPATIBLE_SUBROUTINES MAX_NUM_COMPATIBLE_SUBROUTINES}
    - */ - @NativeType("void") - public static int glGetProgramInterfacei(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname) { - return GL43C.glGetProgramInterfacei(program, programInterface, pname); - } - - // --- [ glGetProgramResourceIndex ] --- - - /** Unsafe version of: {@link #glGetProgramResourceIndex GetProgramResourceIndex} */ - public static int nglGetProgramResourceIndex(int program, int programInterface, long name) { - return GL43C.nglGetProgramResourceIndex(program, programInterface, name); - } - - /** - * Queries the index of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {Wcode name}. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param name the name of the resource to query the index of - */ - @NativeType("GLuint") - public static int glGetProgramResourceIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - return GL43C.glGetProgramResourceIndex(program, programInterface, name); - } - - /** - * Queries the index of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {Wcode name}. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param name the name of the resource to query the index of - */ - @NativeType("GLuint") - public static int glGetProgramResourceIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - return GL43C.glGetProgramResourceIndex(program, programInterface, name); - } - - // --- [ glGetProgramResourceName ] --- - - /** - * Unsafe version of: {@link #glGetProgramResourceName GetProgramResourceName} - * - * @param bufSize the size of the character array whose address is given by {@code name} - */ - public static void nglGetProgramResourceName(int program, int programInterface, int index, int bufSize, long length, long name) { - GL43C.nglGetProgramResourceName(program, programInterface, index, bufSize, length, name); - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * @param length a variable which will receive the length of the resource name - * @param name a character array into which will be written the name of the resource - */ - public static void glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - GL43C.glGetProgramResourceName(program, programInterface, index, length, name); - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * @param bufSize the size of the character array whose address is given by {@code name} - */ - @NativeType("void") - public static String glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufSize) { - return GL43C.glGetProgramResourceName(program, programInterface, index, bufSize); - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - */ - @NativeType("void") - public static String glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index) { - return glGetProgramResourceName(program, programInterface, index, glGetProgramInterfacei(program, programInterface, GL_MAX_NAME_LENGTH)); - } - - // --- [ glGetProgramResourceiv ] --- - - /** - * Unsafe version of: {@link #glGetProgramResourceiv GetProgramResourceiv} - * - * @param propCount the number of properties in {@code props} - * @param bufSize the size of the integer array whose address is given by {@code params} - */ - public static void nglGetProgramResourceiv(int program, int programInterface, int index, int propCount, long props, int bufSize, long length, long params) { - GL43C.nglGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); - } - - /** - * Retrieves values for multiple properties of a single active resource within a program object. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the active resource index - * @param props an array that will receive the active resource properties - * @param length a variable which will receive the number of values returned - * @param params an array that will receive the property values - */ - public static void glGetProgramResourceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") IntBuffer props, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer params) { - GL43C.glGetProgramResourceiv(program, programInterface, index, props, length, params); - } - - // --- [ glGetProgramResourceLocation ] --- - - /** Unsafe version of: {@link #glGetProgramResourceLocation GetProgramResourceLocation} */ - public static int nglGetProgramResourceLocation(int program, int programInterface, long name) { - return GL43C.nglGetProgramResourceLocation(program, programInterface, name); - } - - /** - * Queries the location of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name} - * @param name the name of the resource to query the location of - */ - @NativeType("GLint") - public static int glGetProgramResourceLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - return GL43C.glGetProgramResourceLocation(program, programInterface, name); - } - - /** - * Queries the location of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name} - * @param name the name of the resource to query the location of - */ - @NativeType("GLint") - public static int glGetProgramResourceLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - return GL43C.glGetProgramResourceLocation(program, programInterface, name); - } - - // --- [ glGetProgramResourceLocationIndex ] --- - - /** Unsafe version of: {@link #glGetProgramResourceLocationIndex GetProgramResourceLocationIndex} */ - public static int nglGetProgramResourceLocationIndex(int program, int programInterface, long name) { - return GL43C.nglGetProgramResourceLocationIndex(program, programInterface, name); - } - - /** - * Queries the fragment color index of a named variable within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. Must be:
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}
    - * @param name the name of the resource to query the location of - */ - @NativeType("GLint") - public static int glGetProgramResourceLocationIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - return GL43C.glGetProgramResourceLocationIndex(program, programInterface, name); - } - - /** - * Queries the fragment color index of a named variable within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. Must be:
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}
    - * @param name the name of the resource to query the location of - */ - @NativeType("GLint") - public static int glGetProgramResourceLocationIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - return GL43C.glGetProgramResourceLocationIndex(program, programInterface, name); - } - - /** Array version of: {@link #glGetProgramInterfaceiv GetProgramInterfaceiv} */ - public static void glGetProgramInterfaceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL43C.glGetProgramInterfaceiv(program, programInterface, pname, params); - } - - /** Array version of: {@link #glGetProgramResourceName GetProgramResourceName} */ - public static void glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - GL43C.glGetProgramResourceName(program, programInterface, index, length, name); - } - - /** Array version of: {@link #glGetProgramResourceiv GetProgramResourceiv} */ - public static void glGetProgramResourceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") int[] props, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] params) { - GL43C.glGetProgramResourceiv(program, programInterface, index, props, length, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBProvokingVertex.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBProvokingVertex.java deleted file mode 100644 index 31da8d81..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBProvokingVertex.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_provoking_vertex extension. - * - *

    This extension provides an alternative provoking vertex convention for rendering lines, triangles, and (optionally depending on the implementation) - * quads.

    - * - *

    The provoking vertex of a primitive is the vertex that determines the constant primary and secondary colors when flat shading is enabled.

    - * - *

    In OpenGL, the provoking vertex for triangle, quad, line, and (trivially) point primitives is the last vertex used to assemble the primitive. The - * polygon primitive is an exception in OpenGL where the first vertex of a polygon primitive determines the color of the polygon, even if actually broken - * into triangles and/or quads.

    - * - *

    Alternatively the provoking vertex could be the first vertex of the primitive. Other APIs with flat-shading functionality such as Reality Lab and - * Direct3D have adopted the "first vertex of the primitive" convention to determine the provoking vertex. However, these APIs lack quads so do not have a - * defined provoking vertex convention for quads.

    - * - *

    The motivation for this extension is to allow applications developed for APIs with a "first vertex of the primitive" provoking vertex to be easily - * converted to OpenGL.

    - * - *

    Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public class ARBProvokingVertex { - - static { GL.initialize(); } - - /** Accepted by the {@code mode} parameter of ProvokingVertex. */ - public static final int - GL_FIRST_VERTEX_CONVENTION = 0x8E4D, - GL_LAST_VERTEX_CONVENTION = 0x8E4E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PROVOKING_VERTEX = 0x8E4F, - GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; - - protected ARBProvokingVertex() { - throw new UnsupportedOperationException(); - } - - // --- [ glProvokingVertex ] --- - - /** - * Specifies the vertex to be used as the source of data for flat shaded varyings. - * - * @param mode the provoking vertex mode. One of:
    {@link GL32C#GL_FIRST_VERTEX_CONVENTION FIRST_VERTEX_CONVENTION}{@link GL32C#GL_LAST_VERTEX_CONVENTION LAST_VERTEX_CONVENTION}
    - */ - public static void glProvokingVertex(@NativeType("GLenum") int mode) { - GL32C.glProvokingVertex(mode); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBQueryBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBQueryBufferObject.java deleted file mode 100644 index 180f70db..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBQueryBufferObject.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_query_buffer_object extension. - * - *

    Statistics about the operation of the OpenGL pipeline, such as the number of samples that passed the depth test, the elapsed time between two events or - * the number of vertices written by transform feedback can be retrieved from the GL through query objects. The result of a query object is acquired by the - * application through the OpenGL API into a client provided memory location. Should the result returned by the API be required for use in a shader, it - * must be passed back to the GL via a program uniform or some other mechanism. This requires a round-trip from the GPU to the CPU and back.

    - * - *

    This extension introduces a mechanism whereby the result of a query object may be retrieved into a buffer object instead of client memory. This allows - * the query rsult to be made available to a shader without a round-trip to the CPU for example by subsequently using the buffer object as a uniform - * buffer, texture buffer or other data store visible to the shader. This functionality may also be used to place the results of many query objects into a - * single, large buffer and then map or otherwise read back the entire buffer at a later point in time, avoiding a per-query object CPU-GPU synchronization - * event.

    - * - *

    The extension allows acquiring the result of any query object type supported by the GL implementation into a buffer object. The implementation will - * determine the most efficient method of copying the query result to the buffer.

    - * - *

    Requires {@link GL15 OpenGL 1.5}.

    - */ -public final class ARBQueryBufferObject { - - /** Accepted by the {@code pname} parameter of {@link GL15C#glGetQueryObjectiv GetQueryObjectiv}, {@link GL15C#glGetQueryObjectuiv GetQueryObjectuiv}, {@link GL33C#glGetQueryObjecti64v GetQueryObjecti64v} and {@link GL33C#glGetQueryObjectui64v GetQueryObjectui64v}. */ - public static final int GL_QUERY_RESULT_NO_WAIT = 0x9194; - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBindBuffer BindBuffer}, {@link GL15C#glBufferData BufferData}, {@link GL15C#glBufferSubData BufferSubData}, {@link GL15C#glMapBuffer MapBuffer}, {@link GL15C#glUnmapBuffer UnmapBuffer}, {@link GL30C#glMapBufferRange MapBufferRange}, - * {@link GL15C#glGetBufferSubData GetBufferSubData}, {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}, {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}, {@link GL15C#glGetBufferPointerv GetBufferPointerv}, {@link GL43C#glClearBufferSubData ClearBufferSubData}, and the {@code readtarget} and - * {@code writetarget} parameters of {@link GL31C#glCopyBufferSubData CopyBufferSubData}. - */ - public static final int GL_QUERY_BUFFER = 0x9192; - - /** Accepted by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetIntegerv GetIntegerv}, {@link GL11C#glGetFloatv GetFloatv}, and {@link GL11C#glGetDoublev GetDoublev}. */ - public static final int GL_QUERY_BUFFER_BINDING = 0x9193; - - /** Accepted in the {@code barriers} bitfield in {@link GL42C#glMemoryBarrier MemoryBarrier}. */ - public static final int GL_QUERY_BUFFER_BARRIER_BIT = 0x8000; - - private ARBQueryBufferObject() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBRobustness.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBRobustness.java deleted file mode 100644 index 0abf6e46..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBRobustness.java +++ /dev/null @@ -1,1083 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_robustness extension. - * - *

    Several recent trends in how OpenGL integrates into modern computer systems have created new requirements for robustness and security for OpenGL - * rendering contexts.

    - * - *

    Additionally GPU architectures now support hardware fault detection; for example, video memory supporting ECC (error correcting codes) and error - * detection. OpenGL contexts should be capable of recovering from hardware faults such as uncorrectable memory errors. Along with recovery from such - * hardware faults, the recovery mechanism can also allow recovery from video memory access exceptions and system software failures. System software - * failures can be due to device changes or driver failures.

    - * - *

    Demands for increased software robustness and concerns about malware exploiting buffer overflows have lead API designers to provide additional "safe" - * APIs that bound the amount of data returned by an API query. For example, the safer "snprintf" or "_snprintf" routines are prefered over "sprintf".

    - * - *

    The OpenGL API has many such robustness perils. OpenGL queries return (write) some number of bytes to a buffer indicated by a pointer parameter. The - * exact number of bytes written by existing OpenGL queries is not expressed directly by any specific parameter; instead the number of bytes returned is a - * complex function of one or more query arguments, sometimes context state such as pixel store modes or the active texture selector, and the current state - * of an object (such as a texture level's number of total texels). By the standards of modern API design, such queries are not "safe". Making these - * queries safer involves introducing a new query API with an additional parameter that specifies the number of bytes in the buffer and never writing bytes - * beyond that limit.

    - * - *

    Multi-threaded use of OpenGL contexts in a "share group" allow sharing of objects such as textures and programs. Such sharing in conjunction with - * concurrent OpenGL commands stream execution by two or more contexts introduces hazards whereby one context can change objects in ways that can cause - * buffer overflows for another context's OpenGL queries.

    - * - *

    The original {@link ARBVertexBufferObject ARB_vertex_buffer_object} extension includes an issue that explicitly states program termination is allowed when out-of-bounds - * vertex buffer object fetches occur. Modern GPUs capable of DirectX 10 enforce the well-defined behavior of always returning zero values for indices or - * non-fixed components in this case. Older GPUs may require extra checks to enforce well-defined (and termination free) behavior, but this expense is - * warranted when processing potentially untrusted content.

    - * - *

    The intent of this extension is to address some specific robustness goals:

    - * - *
      - *
    • For all existing OpenGL queries, provide additional "safe" APIs that limit data written to user pointers to a buffer size in bytes that is an - * explicit additional parameter of the query.
    • - *
    • Provide a mechanism for an OpenGL application to learn about graphics resets that affect the context. When a graphics reset occurs, the OpenGL - * context becomes unusable and the application must create a new context to continue operation. Detecting a graphics reset happens through an - * inexpensive query.
    • - *
    • Provide an enable to guarantee that out-of-bounds buffer object accesses by the GPU will have deterministic behavior and preclude application - * instability or termination due to an incorrect buffer access. Such accesses include vertex buffer fetches of attributes and indices, and indexed - * reads of uniforms or parameters from buffers.
    • - *
    - * - *

    In one anticipated usage model, WebGL contexts may make use of these robust features to grant greater stability when using untrusted code. WebGL - * contexts cannot call OpenGL commands directly but rather must route all OpenGL API calls through the web browser. It is then the web browser that - * configures the context, using the commands in this extension, to enforce safe behavior. In this scenario, the WebGL content cannot specify or change the - * use of this extension's features itself; the web browser enforces this policy.

    - * - *

    There are other well-known robustness issues with the OpenGL API which this extension does not address. For example, selector-based OpenGL commands are - * a well-known source of programming errors. Code to manipulate texture state may assume the active texture selector is set appropriately when an - * intervening function call obscures a change to the active texture state resulting in incorrectly updated or queried state. The - * {@link EXTDirectStateAccess EXT_direct_state_access} extension introduces selector-free OpenGL commands and queries to address that particular issue so this extension does - * not.

    - * - *

    The intent of this extension is NOT to deprecate any existing API and thereby introduce compatibility issues and coding burdens on existing code, but - * rather to provide new APIs to ensure a level of robustness commensurate with the expectations of modern applications of OpenGL.

    - */ -public class ARBRobustness { - - static { GL.initialize(); } - - /** Returned by GetGraphicsResetStatusARB. */ - public static final int - GL_GUILTY_CONTEXT_RESET_ARB = 0x8253, - GL_INNOCENT_CONTEXT_RESET_ARB = 0x8254, - GL_UNKNOWN_CONTEXT_RESET_ARB = 0x8255; - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; - - /** Returned by GetIntegerv and related simple queries when {@code value} is RESET_NOTIFICATION_STRATEGY_ARB. */ - public static final int - GL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252, - GL_NO_RESET_NOTIFICATION_ARB = 0x8261; - - /** Returned by GetIntegerv when {@code pname} is CONTEXT_FLAGS. */ - public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x4; - - protected ARBRobustness() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetGraphicsResetStatusARB ] --- - - /** - * The symbolic constant returned indicates if the GL context has been in a reset state at any point since the last call to {@code GetGraphicsResetStatusARB}. - * {@link GL11#GL_NO_ERROR NO_ERROR} indicates that the GL context has not been in a reset state since the last call. {@link #GL_GUILTY_CONTEXT_RESET_ARB GUILTY_CONTEXT_RESET_ARB} indicates that a reset has - * been detected that is attributable to the current GL context. {@link #GL_INNOCENT_CONTEXT_RESET_ARB INNOCENT_CONTEXT_RESET_ARB} indicates a reset has been detected that is not attributable - * to the current GL context. {@link #GL_UNKNOWN_CONTEXT_RESET_ARB UNKNOWN_CONTEXT_RESET_ARB} indicates a detected graphics reset whose cause is unknown. - * - *

    If a reset status other than NO_ERROR is returned and subsequent calls return NO_ERROR, the context reset was encountered and completed. If a reset - * status is repeatedly returned, the context may be in the process of resetting.

    - * - *

    Reset notification behavior is determined at context creation time, and may be queried by calling {@link GL11C#glGetIntegerv GetIntegerv} with the symbolic constant - * {@link #GL_RESET_NOTIFICATION_STRATEGY_ARB RESET_NOTIFICATION_STRATEGY_ARB}.

    - * - *

    If the reset notification behavior is {@link #GL_NO_RESET_NOTIFICATION_ARB NO_RESET_NOTIFICATION_ARB}, then the implementation will never deliver notification of reset events, and - * {@code GetGraphicsResetStatusARB} will always return NO_ERROR.

    - * - *

    If the behavior is {@link #GL_LOSE_CONTEXT_ON_RESET_ARB LOSE_CONTEXT_ON_RESET_ARB}, a graphics reset will result in the loss of all context state, requiring the recreation of all associated - * objects. In this case {@code GetGraphicsResetStatusARB}. may return any of the values described above.

    - * - *

    If a graphics reset notification occurs in a context, a notification must also occur in all other contexts which share objects with that context.

    - */ - @NativeType("GLenum") - public static native int glGetGraphicsResetStatusARB(); - - // --- [ glGetnMapdvARB ] --- - - /** - * Unsafe version of: {@link #glGetnMapdvARB GetnMapdvARB} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnMapdvARB(int target, int query, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetMapdv GetMapdv} - * - * @param target the evaluator map - * @param query the information to query - * @param data a buffer in which to place the returned data - */ - public static void glGetnMapdvARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLdouble *") DoubleBuffer data) { - nglGetnMapdvARB(target, query, data.remaining(), memAddress(data)); - } - - /** - * Robust version of {@link GL11#glGetMapdv GetMapdv} - * - * @param target the evaluator map - * @param query the information to query - */ - @NativeType("void") - public static double glGetnMapdARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer data = stack.callocDouble(1); - nglGetnMapdvARB(target, query, 1, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnMapfvARB ] --- - - /** - * Unsafe version of: {@link #glGetnMapfvARB GetnMapfvARB} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnMapfvARB(int target, int query, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetMapfv GetMapfv} - * - * @param target the evaluator map - * @param query the information to query - * @param data a buffer in which to place the returned data - */ - public static void glGetnMapfvARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLfloat *") FloatBuffer data) { - nglGetnMapfvARB(target, query, data.remaining(), memAddress(data)); - } - - /** - * Robust version of {@link GL11#glGetMapfv GetMapfv} - * - * @param target the evaluator map - * @param query the information to query - */ - @NativeType("void") - public static float glGetnMapfARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer data = stack.callocFloat(1); - nglGetnMapfvARB(target, query, 1, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnMapivARB ] --- - - /** - * Unsafe version of: {@link #glGetnMapivARB GetnMapivARB} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnMapivARB(int target, int query, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetMapiv GetMapiv} - * - * @param target the evaluator target. One of:
    {@link GL11#GL_MAP1_VERTEX_3 MAP1_VERTEX_3}{@link GL11#GL_MAP1_VERTEX_4 MAP1_VERTEX_4}{@link GL11#GL_MAP1_COLOR_4 MAP1_COLOR_4}{@link GL11#GL_MAP1_NORMAL MAP1_NORMAL}{@link GL11#GL_MAP1_TEXTURE_COORD_1 MAP1_TEXTURE_COORD_1}
    {@link GL11#GL_MAP1_TEXTURE_COORD_2 MAP1_TEXTURE_COORD_2}{@link GL11#GL_MAP1_TEXTURE_COORD_3 MAP1_TEXTURE_COORD_3}{@link GL11#GL_MAP1_TEXTURE_COORD_4 MAP1_TEXTURE_COORD_4}{@link GL11#GL_MAP2_VERTEX_3 MAP2_VERTEX_3}{@link GL11#GL_MAP2_VERTEX_4 MAP2_VERTEX_4}
    {@link GL11#GL_MAP2_COLOR_4 MAP2_COLOR_4}{@link GL11#GL_MAP2_NORMAL MAP2_NORMAL}{@link GL11#GL_MAP2_TEXTURE_COORD_1 MAP2_TEXTURE_COORD_1}{@link GL11#GL_MAP2_TEXTURE_COORD_2 MAP2_TEXTURE_COORD_2}{@link GL11#GL_MAP2_TEXTURE_COORD_3 MAP2_TEXTURE_COORD_3}
    {@link GL11#GL_MAP2_TEXTURE_COORD_4 MAP2_TEXTURE_COORD_4}
    - * @param query the information to query. One of:
    {@link GL11#GL_ORDER ORDER}{@link GL11#GL_COEFF COEFF}{@link GL11#GL_DOMAIN DOMAIN}
    - * @param data a buffer in which to place the returned data - */ - public static void glGetnMapivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLint *") IntBuffer data) { - nglGetnMapivARB(target, query, data.remaining(), memAddress(data)); - } - - /** - * Robust version of {@link GL11#glGetMapiv GetMapiv} - * - * @param target the evaluator target. One of:
    {@link GL11#GL_MAP1_VERTEX_3 MAP1_VERTEX_3}{@link GL11#GL_MAP1_VERTEX_4 MAP1_VERTEX_4}{@link GL11#GL_MAP1_COLOR_4 MAP1_COLOR_4}{@link GL11#GL_MAP1_NORMAL MAP1_NORMAL}{@link GL11#GL_MAP1_TEXTURE_COORD_1 MAP1_TEXTURE_COORD_1}
    {@link GL11#GL_MAP1_TEXTURE_COORD_2 MAP1_TEXTURE_COORD_2}{@link GL11#GL_MAP1_TEXTURE_COORD_3 MAP1_TEXTURE_COORD_3}{@link GL11#GL_MAP1_TEXTURE_COORD_4 MAP1_TEXTURE_COORD_4}{@link GL11#GL_MAP2_VERTEX_3 MAP2_VERTEX_3}{@link GL11#GL_MAP2_VERTEX_4 MAP2_VERTEX_4}
    {@link GL11#GL_MAP2_COLOR_4 MAP2_COLOR_4}{@link GL11#GL_MAP2_NORMAL MAP2_NORMAL}{@link GL11#GL_MAP2_TEXTURE_COORD_1 MAP2_TEXTURE_COORD_1}{@link GL11#GL_MAP2_TEXTURE_COORD_2 MAP2_TEXTURE_COORD_2}{@link GL11#GL_MAP2_TEXTURE_COORD_3 MAP2_TEXTURE_COORD_3}
    {@link GL11#GL_MAP2_TEXTURE_COORD_4 MAP2_TEXTURE_COORD_4}
    - * @param query the information to query. One of:
    {@link GL11#GL_ORDER ORDER}{@link GL11#GL_COEFF COEFF}{@link GL11#GL_DOMAIN DOMAIN}
    - */ - @NativeType("void") - public static int glGetnMapiARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetnMapivARB(target, query, 1, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnPixelMapfvARB ] --- - - /** - * Unsafe version of: {@link #glGetnPixelMapfvARB GetnPixelMapfvARB} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnPixelMapfvARB(int map, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetPixelMapfv GetPixelMapfv} - * - * @param map the pixel map parameter to query. One of:
    {@link GL11#GL_PIXEL_MAP_I_TO_I PIXEL_MAP_I_TO_I}{@link GL11#GL_PIXEL_MAP_S_TO_S PIXEL_MAP_S_TO_S}{@link GL11#GL_PIXEL_MAP_I_TO_R PIXEL_MAP_I_TO_R}{@link GL11#GL_PIXEL_MAP_I_TO_G PIXEL_MAP_I_TO_G}{@link GL11#GL_PIXEL_MAP_I_TO_B PIXEL_MAP_I_TO_B}
    {@link GL11#GL_PIXEL_MAP_I_TO_A PIXEL_MAP_I_TO_A}{@link GL11#GL_PIXEL_MAP_R_TO_R PIXEL_MAP_R_TO_R}{@link GL11#GL_PIXEL_MAP_G_TO_G PIXEL_MAP_G_TO_G}{@link GL11#GL_PIXEL_MAP_B_TO_B PIXEL_MAP_B_TO_B}{@link GL11#GL_PIXEL_MAP_A_TO_A PIXEL_MAP_A_TO_A}
    - * @param data a buffer in which to place the returned data - */ - public static void glGetnPixelMapfvARB(@NativeType("GLenum") int map, @NativeType("GLfloat *") FloatBuffer data) { - nglGetnPixelMapfvARB(map, data.remaining(), memAddress(data)); - } - - // --- [ glGetnPixelMapuivARB ] --- - - /** - * Unsafe version of: {@link #glGetnPixelMapuivARB GetnPixelMapuivARB} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnPixelMapuivARB(int map, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetPixelMapuiv GetPixelMapuiv} - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - */ - public static void glGetnPixelMapuivARB(@NativeType("GLenum") int map, @NativeType("GLuint *") IntBuffer data) { - nglGetnPixelMapuivARB(map, data.remaining(), memAddress(data)); - } - - // --- [ glGetnPixelMapusvARB ] --- - - /** - * Unsafe version of: {@link #glGetnPixelMapusvARB GetnPixelMapusvARB} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnPixelMapusvARB(int map, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetPixelMapusv GetPixelMapusv} - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - */ - public static void glGetnPixelMapusvARB(@NativeType("GLenum") int map, @NativeType("GLushort *") ShortBuffer data) { - nglGetnPixelMapusvARB(map, data.remaining(), memAddress(data)); - } - - // --- [ glGetnPolygonStippleARB ] --- - - /** - * Unsafe version of: {@link #glGetnPolygonStippleARB GetnPolygonStippleARB} - * - * @param bufSize the maximum number of bytes to write into {@code pattern} - */ - public static native void nglGetnPolygonStippleARB(int bufSize, long pattern); - - /** - * Robust version of {@link GL11#glGetPolygonStipple GetPolygonStipple} - * - * @param bufSize the maximum number of bytes to write into {@code pattern} - * @param pattern a buffer in which to place the returned pattern - */ - public static void glGetnPolygonStippleARB(@NativeType("GLsizei") int bufSize, @NativeType("GLubyte *") long pattern) { - nglGetnPolygonStippleARB(bufSize, pattern); - } - - /** - * Robust version of {@link GL11#glGetPolygonStipple GetPolygonStipple} - * - * @param pattern a buffer in which to place the returned pattern - */ - public static void glGetnPolygonStippleARB(@NativeType("GLubyte *") ByteBuffer pattern) { - nglGetnPolygonStippleARB(pattern.remaining(), memAddress(pattern)); - } - - // --- [ glGetnTexImageARB ] --- - - /** - * Unsafe version of: {@link #glGetnTexImageARB GetnTexImageARB} - * - * @param bufSize the maximum number of bytes to write into {@code img} - */ - public static native void nglGetnTexImageARB(int tex, int level, int format, int type, int bufSize, long img); - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param bufSize the maximum number of bytes to write into {@code img} - * @param img a buffer in which to place the returned data - */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long img) { - nglGetnTexImageARB(tex, level, format, type, bufSize, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer img) { - nglGetnTexImageARB(tex, level, format, type, img.remaining(), memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer img) { - nglGetnTexImageARB(tex, level, format, type, img.remaining() << 1, memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer img) { - nglGetnTexImageARB(tex, level, format, type, img.remaining() << 2, memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer img) { - nglGetnTexImageARB(tex, level, format, type, img.remaining() << 2, memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer img) { - nglGetnTexImageARB(tex, level, format, type, img.remaining() << 3, memAddress(img)); - } - - // --- [ glReadnPixelsARB ] --- - - /** - * Unsafe version of: {@link #glReadnPixelsARB ReadnPixelsARB} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglReadnPixelsARB(int x, int y, int width, int height, int format, int type, int bufSize, long data); - - /** - * Robust version of {@link GL11C#glReadPixels ReadPixels} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param bufSize the maximum number of bytes to write into {@code data} - * @param data a buffer in which to place the returned data - */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long data) { - nglReadnPixelsARB(x, y, width, height, format, type, bufSize, data); - } - - /** - * Robust version of {@link GL11C#glReadPixels ReadPixels} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param data a buffer in which to place the returned data - */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer data) { - nglReadnPixelsARB(x, y, width, height, format, type, data.remaining(), memAddress(data)); - } - - /** - * Robust version of {@link GL11C#glReadPixels ReadPixels} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param data a buffer in which to place the returned data - */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer data) { - nglReadnPixelsARB(x, y, width, height, format, type, data.remaining() << 1, memAddress(data)); - } - - /** - * Robust version of {@link GL11C#glReadPixels ReadPixels} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param data a buffer in which to place the returned data - */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer data) { - nglReadnPixelsARB(x, y, width, height, format, type, data.remaining() << 2, memAddress(data)); - } - - /** - * Robust version of {@link GL11C#glReadPixels ReadPixels} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param data a buffer in which to place the returned data - */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer data) { - nglReadnPixelsARB(x, y, width, height, format, type, data.remaining() << 2, memAddress(data)); - } - - // --- [ glGetnColorTableARB ] --- - - /** - * Unsafe version of: {@link #glGetnColorTableARB GetnColorTableARB} - * - * @param bufSize the maximum number of bytes to write into {@code table} - */ - public static native void nglGetnColorTableARB(int target, int format, int type, int bufSize, long table); - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code table} - * @param table a buffer in which to place the returned data - */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long table) { - nglGetnColorTableARB(target, format, type, bufSize, table); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer table) { - nglGetnColorTableARB(target, format, type, table.remaining(), memAddress(table)); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer table) { - nglGetnColorTableARB(target, format, type, table.remaining() << 1, memAddress(table)); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer table) { - nglGetnColorTableARB(target, format, type, table.remaining() << 2, memAddress(table)); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer table) { - nglGetnColorTableARB(target, format, type, table.remaining() << 2, memAddress(table)); - } - - // --- [ glGetnConvolutionFilterARB ] --- - - /** - * Unsafe version of: {@link #glGetnConvolutionFilterARB GetnConvolutionFilterARB} - * - * @param bufSize the maximum number of bytes to write into {@code image} - */ - public static native void nglGetnConvolutionFilterARB(int target, int format, int type, int bufSize, long image); - - /** - * Robust version of {@link ARBImaging#glGetConvolutionFilter GetConvolutionFilter} - * - * @param target the convolution target. One of:
    {@link ARBImaging#GL_CONVOLUTION_1D CONVOLUTION_1D}{@link ARBImaging#GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code image} - * @param image a buffer in which to place the returned data - */ - public static void glGetnConvolutionFilterARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long image) { - nglGetnConvolutionFilterARB(target, format, type, bufSize, image); - } - - /** - * Robust version of {@link ARBImaging#glGetConvolutionFilter GetConvolutionFilter} - * - * @param target the convolution target. One of:
    {@link ARBImaging#GL_CONVOLUTION_1D CONVOLUTION_1D}{@link ARBImaging#GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param image a buffer in which to place the returned data - */ - public static void glGetnConvolutionFilterARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer image) { - nglGetnConvolutionFilterARB(target, format, type, image.remaining(), memAddress(image)); - } - - // --- [ glGetnSeparableFilterARB ] --- - - /** - * Unsafe version of: {@link #glGetnSeparableFilterARB GetnSeparableFilterARB} - * - * @param rowBufSize the maximum number of bytes to write into {@code row} - * @param columnBufSize the maximum number of bytes to write into {@code column} - */ - public static native void nglGetnSeparableFilterARB(int target, int format, int type, int rowBufSize, long row, int columnBufSize, long column, long span); - - /** - * Robust version of {@link ARBImaging#glGetSeparableFilter GetSeparableFilter} - * - * @param target the filter target. Must be:
    {@link ARBImaging#GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param rowBufSize the maximum number of bytes to write into {@code row} - * @param row a buffer in which to return the filter row - * @param columnBufSize the maximum number of bytes to write into {@code column} - * @param column a buffer in which to return the filter column - */ - public static void glGetnSeparableFilterARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int rowBufSize, @NativeType("void *") long row, @NativeType("GLsizei") int columnBufSize, @NativeType("void *") long column, @Nullable @NativeType("void *") ByteBuffer span) { - nglGetnSeparableFilterARB(target, format, type, rowBufSize, row, columnBufSize, column, memAddressSafe(span)); - } - - /** - * Robust version of {@link ARBImaging#glGetSeparableFilter GetSeparableFilter} - * - * @param target the filter target. Must be:
    {@link ARBImaging#GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param row a buffer in which to return the filter row - * @param column a buffer in which to return the filter column - */ - public static void glGetnSeparableFilterARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer row, @NativeType("void *") ByteBuffer column, @Nullable @NativeType("void *") ByteBuffer span) { - nglGetnSeparableFilterARB(target, format, type, row.remaining(), memAddress(row), column.remaining(), memAddress(column), memAddressSafe(span)); - } - - // --- [ glGetnHistogramARB ] --- - - /** - * Unsafe version of: {@link #glGetnHistogramARB GetnHistogramARB} - * - * @param bufSize the maximum number of bytes to write into {@code values} - */ - public static native void nglGetnHistogramARB(int target, boolean reset, int format, int type, int bufSize, long values); - - /** - * Robust version of {@link ARBImaging#glGetHistogram GetHistogram} - * - * @param target the histogram target. Must be:
    {@link ARBImaging#GL_HISTOGRAM HISTOGRAM}
    - * @param reset if {@link GL11#GL_TRUE TRUE}, then all counters of all elements of the histogram are reset to zero. Counters are reset whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data types. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code values} - * @param values a buffer in which to place the returned data - */ - public static void glGetnHistogramARB(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long values) { - nglGetnHistogramARB(target, reset, format, type, bufSize, values); - } - - /** - * Robust version of {@link ARBImaging#glGetHistogram GetHistogram} - * - * @param target the histogram target. Must be:
    {@link ARBImaging#GL_HISTOGRAM HISTOGRAM}
    - * @param reset if {@link GL11#GL_TRUE TRUE}, then all counters of all elements of the histogram are reset to zero. Counters are reset whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data types. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values a buffer in which to place the returned data - */ - public static void glGetnHistogramARB(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer values) { - nglGetnHistogramARB(target, reset, format, type, values.remaining(), memAddress(values)); - } - - // --- [ glGetnMinmaxARB ] --- - - /** - * Unsafe version of: {@link #glGetnMinmaxARB GetnMinmaxARB} - * - * @param bufSize the maximum number of bytes to write into {@code values} - */ - public static native void nglGetnMinmaxARB(int target, boolean reset, int format, int type, int bufSize, long values); - - /** - * Robust version of {@link ARBImaging#glGetMinmax GetMinmax} - * - * @param target the minmax target. Must be:
    {@link ARBImaging#GL_MINMAX MINMAX}
    - * @param reset If {@link GL11#GL_TRUE TRUE}, then each minimum value is reset to the maximum representable value, and each maximum value is reset to the minimum - * representable value. All values are reset, whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code values} - * @param values a buffer in which to place the returned data - */ - public static void glGetnMinmaxARB(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long values) { - nglGetnMinmaxARB(target, reset, format, type, bufSize, values); - } - - /** - * Robust version of {@link ARBImaging#glGetMinmax GetMinmax} - * - * @param target the minmax target. Must be:
    {@link ARBImaging#GL_MINMAX MINMAX}
    - * @param reset If {@link GL11#GL_TRUE TRUE}, then each minimum value is reset to the maximum representable value, and each maximum value is reset to the minimum - * representable value. All values are reset, whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values a buffer in which to place the returned data - */ - public static void glGetnMinmaxARB(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer values) { - nglGetnMinmaxARB(target, reset, format, type, values.remaining(), memAddress(values)); - } - - // --- [ glGetnCompressedTexImageARB ] --- - - /** - * Unsafe version of: {@link #glGetnCompressedTexImageARB GetnCompressedTexImageARB} - * - * @param bufSize the maximum number of bytes to write into {@code img} - */ - public static native void nglGetnCompressedTexImageARB(int target, int level, int bufSize, long img); - - /** - * Robust version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage} - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param bufSize the maximum number of bytes to write into {@code img} - * @param img a buffer in which to place the returned data - */ - public static void glGetnCompressedTexImageARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLsizei") int bufSize, @NativeType("void *") long img) { - nglGetnCompressedTexImageARB(target, level, bufSize, img); - } - - /** - * Robust version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage} - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param img a buffer in which to place the returned data - */ - public static void glGetnCompressedTexImageARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer img) { - if (CHECKS) { - if (DEBUG) { - check(img, GL11.glGetTexLevelParameteri(target, level, GL13.GL_TEXTURE_COMPRESSED_IMAGE_SIZE)); - } - } - nglGetnCompressedTexImageARB(target, level, img.remaining(), memAddress(img)); - } - - // --- [ glGetnUniformfvARB ] --- - - /** - * Unsafe version of: {@link #glGetnUniformfvARB GetnUniformfvARB} - * - * @param bufSize the maximum number of bytes to write into {@code params} - */ - public static native void nglGetnUniformfvARB(int program, int location, int bufSize, long params); - - /** - * Robust version of {@link GL20C#glGetUniformfv GetUniformfv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params a buffer in which to place the returned data - */ - public static void glGetnUniformfvARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - nglGetnUniformfvARB(program, location, params.remaining(), memAddress(params)); - } - - /** - * Robust version of {@link GL20C#glGetUniformfv GetUniformfv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static float glGetnUniformfARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetnUniformfvARB(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformivARB ] --- - - /** - * Unsafe version of: {@link #glGetnUniformivARB GetnUniformivARB} - * - * @param bufSize the maximum number of bytes to write into {@code params} - */ - public static native void nglGetnUniformivARB(int program, int location, int bufSize, long params); - - /** - * Robust version of {@link GL20C#glGetUniformiv GetUniformiv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params a buffer in which to place the returned data - */ - public static void glGetnUniformivARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - nglGetnUniformivARB(program, location, params.remaining(), memAddress(params)); - } - - /** - * Robust version of {@link GL20C#glGetUniformiv GetUniformiv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static int glGetnUniformiARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetnUniformivARB(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformuivARB ] --- - - /** - * Unsafe version of: {@link #glGetnUniformuivARB GetnUniformuivARB} - * - * @param bufSize the maximum number of bytes to write into {@code params} - */ - public static native void nglGetnUniformuivARB(int program, int location, int bufSize, long params); - - /** - * Robust version of {@link GL30C#glGetUniformuiv GetUniformuiv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params a buffer in which to place the returned data - */ - public static void glGetnUniformuivARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - nglGetnUniformuivARB(program, location, params.remaining(), memAddress(params)); - } - - /** - * Robust version of {@link GL30C#glGetUniformuiv GetUniformuiv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static int glGetnUniformuiARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetnUniformuivARB(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformdvARB ] --- - - /** - * Unsafe version of: {@link #glGetnUniformdvARB GetnUniformdvARB} - * - * @param bufSize the maximum number of bytes to write into {@code params} - */ - public static native void nglGetnUniformdvARB(int program, int location, int bufSize, long params); - - /** - * Robust version of {@link GL40C#glGetUniformdv GetUniformdv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params a buffer in which to place the returned data - */ - public static void glGetnUniformdvARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") DoubleBuffer params) { - nglGetnUniformdvARB(program, location, params.remaining(), memAddress(params)); - } - - /** - * Robust version of {@link GL40C#glGetUniformdv GetUniformdv} - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - */ - @NativeType("void") - public static double glGetnUniformdARB(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer params = stack.callocDouble(1); - nglGetnUniformdvARB(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGetnMapdvARB GetnMapdvARB} */ - public static void glGetnMapdvARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLdouble *") double[] data) { - long __functionAddress = GL.getICD().glGetnMapdvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, query, data.length, data, __functionAddress); - } - - /** Array version of: {@link #glGetnMapfvARB GetnMapfvARB} */ - public static void glGetnMapfvARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetnMapfvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, query, data.length, data, __functionAddress); - } - - /** Array version of: {@link #glGetnMapivARB GetnMapivARB} */ - public static void glGetnMapivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetnMapivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, query, data.length, data, __functionAddress); - } - - /** Array version of: {@link #glGetnPixelMapfvARB GetnPixelMapfvARB} */ - public static void glGetnPixelMapfvARB(@NativeType("GLenum") int map, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetnPixelMapfvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, data.length, data, __functionAddress); - } - - /** Array version of: {@link #glGetnPixelMapuivARB GetnPixelMapuivARB} */ - public static void glGetnPixelMapuivARB(@NativeType("GLenum") int map, @NativeType("GLuint *") int[] data) { - long __functionAddress = GL.getICD().glGetnPixelMapuivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, data.length, data, __functionAddress); - } - - /** Array version of: {@link #glGetnPixelMapusvARB GetnPixelMapusvARB} */ - public static void glGetnPixelMapusvARB(@NativeType("GLenum") int map, @NativeType("GLushort *") short[] data) { - long __functionAddress = GL.getICD().glGetnPixelMapusvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, data.length, data, __functionAddress); - } - - /** Array version of: {@link #glGetnTexImageARB GetnTexImageARB} */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] img) { - long __functionAddress = GL.getICD().glGetnTexImageARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 1, img, __functionAddress); - } - - /** Array version of: {@link #glGetnTexImageARB GetnTexImageARB} */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] img) { - long __functionAddress = GL.getICD().glGetnTexImageARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 2, img, __functionAddress); - } - - /** Array version of: {@link #glGetnTexImageARB GetnTexImageARB} */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] img) { - long __functionAddress = GL.getICD().glGetnTexImageARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 2, img, __functionAddress); - } - - /** Array version of: {@link #glGetnTexImageARB GetnTexImageARB} */ - public static void glGetnTexImageARB(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] img) { - long __functionAddress = GL.getICD().glGetnTexImageARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 3, img, __functionAddress); - } - - /** Array version of: {@link #glReadnPixelsARB ReadnPixelsARB} */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] data) { - long __functionAddress = GL.getICD().glReadnPixelsARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, data.length << 1, data, __functionAddress); - } - - /** Array version of: {@link #glReadnPixelsARB ReadnPixelsARB} */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] data) { - long __functionAddress = GL.getICD().glReadnPixelsARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, data.length << 2, data, __functionAddress); - } - - /** Array version of: {@link #glReadnPixelsARB ReadnPixelsARB} */ - public static void glReadnPixelsARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] data) { - long __functionAddress = GL.getICD().glReadnPixelsARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, data.length << 2, data, __functionAddress); - } - - /** Array version of: {@link #glGetnColorTableARB GetnColorTableARB} */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] table) { - long __functionAddress = GL.getICD().glGetnColorTableARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table.length << 1, table, __functionAddress); - } - - /** Array version of: {@link #glGetnColorTableARB GetnColorTableARB} */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] table) { - long __functionAddress = GL.getICD().glGetnColorTableARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table.length << 2, table, __functionAddress); - } - - /** Array version of: {@link #glGetnColorTableARB GetnColorTableARB} */ - public static void glGetnColorTableARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] table) { - long __functionAddress = GL.getICD().glGetnColorTableARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table.length << 2, table, __functionAddress); - } - - /** Array version of: {@link #glGetnUniformfvARB GetnUniformfvARB} */ - public static void glGetnUniformfvARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetnUniformfvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - - /** Array version of: {@link #glGetnUniformivARB GetnUniformivARB} */ - public static void glGetnUniformivARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetnUniformivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - - /** Array version of: {@link #glGetnUniformuivARB GetnUniformuivARB} */ - public static void glGetnUniformuivARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetnUniformuivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - - /** Array version of: {@link #glGetnUniformdvARB GetnUniformdvARB} */ - public static void glGetnUniformdvARB(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetnUniformdvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSPIRVExtensions.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSPIRVExtensions.java deleted file mode 100644 index c25bc3fd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSPIRVExtensions.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_spirv_extensions extension. - * - *

    {@code ARB_gl_spirv} added support for using SPIR-V modules in OpenGL. However it only added support for SPIR-V 1.0 concepts that were part of the - * OpenGL 4.5 Core Profile.

    - * - *

    There are a great number of additional OpenGL ARB and vendor extensions which add shading language concepts and since they were defined prior to the - * existence of SPIR-V support in OpenGL they don't add SPIR-V support for their additional features. Ideally {@code GL_ARB_gl_spirv} would have added - * support for them, but as noted in Issue 27 of that extension, support for them was left as a future exercise.

    - * - *

    Now that at least some of that functionality has been defined via SPIR-V extensions, there is currently no way for an OpenGL implementation to - * advertise that is supports additional SPIR-V extensions.

    - * - *

    This extension provides a mechanism for an implementation to advertise which SPIR-V extensions it supports, and further provides a place where the - * SPIR-V environment for those extensions can be documented for OpenGL.

    - * - *

    It is expected that this document can be extended over time as SPIR-V support for additional extensions is added. The mapping between GLSL and SPIR-V - * concepts and any other pertinent information can be provided here as interactions with the corresponding OpenGL and SPIR-V extensions.

    - * - *

    Requires {@link ARBGLSPIRV OpenGL B.G}.

    - */ -public final class ARBSPIRVExtensions { - - /** Accepted by the {@code name} parameter of {@link GL30C#glGetStringi GetStringi}. */ - public static final int GL_SPIR_V_EXTENSIONS = 0x9553; - - /** Accepted by the {@code pname} parameter of {@link GL11C#glGetIntegerv GetIntegerv}. */ - public static final int GL_NUM_SPIR_V_EXTENSIONS = 0x9554; - - private ARBSPIRVExtensions() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSampleLocations.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSampleLocations.java deleted file mode 100644 index cbd2bc40..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSampleLocations.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_sample_locations extension. - * - *

    This extension allows an application to modify the locations of samples within a pixel used in multisample rasterization. Additionally, it allows - * applications to specify different sample locations for each pixel in a group of adjacent pixels, which may increase antialiasing quality (particularly - * if a custom resolve shader is used that takes advantage of these different locations).

    - * - *

    It is common for implementations to optimize the storage of depth values by storing values that can be used to reconstruct depth at each sample - * location, rather than storing separate depth values for each sample. For example, the depth values from a single triangle can be represented using - * plane equations. When the depth value for a sample is needed, it is automatically evaluated at the sample location. Modifying the sample locations - * causes the reconstruction to no longer evaluate the same depth values as when the samples were originally generated. This extension provides a command - * to "evaluate" and store per-sample depth values using the currently programmed sample locations, which allows the application to manage this issue - * if/when necessary.

    - * - *

    The programmable sample locations are used during rasterization and for evaluation of depth functions during normal geometric rendering. The - * programmable locations are associated with a framebuffer object rather than an individual depth buffer, so if the depth buffer is used as a texture the - * texture sampling may be done at the standard sample locations. Additionally, commands that do not render geometric primitives (e.g. ReadPixels, - * BlitFramebuffer, CopyTexSubImage2D, etc.) may use the standard sample locations to evaluate depth functions rather than the programmable locations. If - * a single depth buffer is used at different times with different sample locations, the depth functions may be interpreted using the current sample - * locations.

    - */ -public class ARBSampleLocations { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB = 0x933D, - GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB = 0x933E, - GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB = 0x933F, - GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB = 0x9340; - - /** - * // Alias of SAMPLE_POSITION. Before NV_expms, the spec used "location". SAMPLE_LOCATION_ARB 0x8E50 PROGRAMMABLE_SAMPLE_LOCATION_ARB 0x9341 Accepted by - * the {@code pname} parameter of FramebufferParameteri, GetFramebufferParameteriv. - */ - public static final int - GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB = 0x9342, - GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB = 0x9343; - - protected ARBSampleLocations() { - throw new UnsupportedOperationException(); - } - - // --- [ glFramebufferSampleLocationsfvARB ] --- - - /** - * Unsafe version of: {@link #glFramebufferSampleLocationsfvARB FramebufferSampleLocationsfvARB} - * - * @param count the number of sample locations to update - */ - public static native void nglFramebufferSampleLocationsfvARB(int target, int start, int count, long v); - - /** - * Controls the programmable sample locations for the framebuffer bound to the specified {@code target}. - * - *

    There are {@code N} pairs of programmable sample locations values in a framebuffer, where {@code N} is the value of - * {@link #GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB}. Each programmable sample location is specified as a pair of floating point values in the range - * {@code [0,1]}, corresponding to the x and y locations respectively in GL pixel space. {@code (0.5, 0.5)} thus corresponds to the pixel center. Sample - * locations outside of {@code [0,1]} result in undefined behavior.

    - * - * @param target the framebuffer target. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param start the first sample location to update - * @param v a pair of values for each sample location to update - */ - public static void glFramebufferSampleLocationsfvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int start, @NativeType("GLfloat const *") FloatBuffer v) { - nglFramebufferSampleLocationsfvARB(target, start, v.remaining() >> 1, memAddress(v)); - } - - // --- [ glNamedFramebufferSampleLocationsfvARB ] --- - - /** - * Unsafe version of: {@link #glNamedFramebufferSampleLocationsfvARB NamedFramebufferSampleLocationsfvARB} - * - * @param count the number of sample locations to update - */ - public static native void nglNamedFramebufferSampleLocationsfvARB(int framebuffer, int start, int count, long v); - - /** - * DSA version of {@link #glFramebufferSampleLocationsfvARB FramebufferSampleLocationsfvARB}. - * - * @param framebuffer the framebuffer object to update - * @param start the first sample location to update - * @param v a pair of values for each sample location to update - */ - public static void glNamedFramebufferSampleLocationsfvARB(@NativeType("GLuint") int framebuffer, @NativeType("GLuint") int start, @NativeType("GLfloat const *") FloatBuffer v) { - nglNamedFramebufferSampleLocationsfvARB(framebuffer, start, v.remaining() >> 1, memAddress(v)); - } - - // --- [ glEvaluateDepthValuesARB ] --- - - /** - * Evaluates depth values for all samples in the current depth buffer (subject to the pixel ownership and scissor tests) and stores each value in the - * depth buffer. This can be used to ensure that later accesses will use depth values consistent with the sample locations used when the samples were - * generated. If the current framebuffer has no depth buffer, EvaluateDepthValuesARB will have no effect. - */ - public static native void glEvaluateDepthValuesARB(); - - /** Array version of: {@link #glFramebufferSampleLocationsfvARB FramebufferSampleLocationsfvARB} */ - public static void glFramebufferSampleLocationsfvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int start, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glFramebufferSampleLocationsfvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, start, v.length >> 1, v, __functionAddress); - } - - /** Array version of: {@link #glNamedFramebufferSampleLocationsfvARB NamedFramebufferSampleLocationsfvARB} */ - public static void glNamedFramebufferSampleLocationsfvARB(@NativeType("GLuint") int framebuffer, @NativeType("GLuint") int start, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glNamedFramebufferSampleLocationsfvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffer, start, v.length >> 1, v, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSampleShading.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSampleShading.java deleted file mode 100644 index 7552050a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSampleShading.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_sample_shading extension. - * - *

    In standard multisample rendering, an implementation is allowed to assign the same color and texture coordinate values to each sample, which then allows - * the optimization where the shader is only evaluated once and then distributed to the samples that have been determined to be covered by the primitive - * currently being rasterized. This can cause aliasing where the input color and texture coordinates are used to generate a result that doesn't antialias - * itself, for example with alpha-tested transparency.

    - * - *

    This extension adds the ability to explicitly request that an implementation use a minimum number of unique set of fragment computation inputs when - * multisampling a pixel. Specifying such a requirement can reduce aliasing that results from evaluating the fragment computations too few times per pixel.

    - * - *

    This extension adds new global state that controls the minimum number of samples for which attribute data is independently interpolated. When enabled, - * all operations that were traditionally executed per-fragment operate independently on each sample.

    - * - *

    This also extends the shading language to allow control over the sample being processed. This includes built-in fragment input variables identifying the - * sample number and position being processed when executing fragment shaders per sample.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and GLSL 1.30. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class ARBSampleShading { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_SAMPLE_SHADING_ARB = 0x8C36; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37; - - protected ARBSampleShading() { - throw new UnsupportedOperationException(); - } - - // --- [ glMinSampleShadingARB ] --- - - /** - * Sets the minimum sample shading fraction. {@code value} is clamped to [0,1] when specified. - * - * @param value the minimum sample shading fraction - */ - public static native void glMinSampleShadingARB(@NativeType("GLfloat") float value); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSamplerObjects.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSamplerObjects.java deleted file mode 100644 index 16c804ea..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSamplerObjects.java +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_sampler_objects extension. - * - *

    In unextended OpenGL textures are considered to be sets of image data (mip-chains, arrays, cube-map face sets, etc.) and sampling state (sampling mode, - * mip-mapping state, coordinate wrapping and clamping rules, etc.) combined into a single object. It is typical for an application to use many textures - * with a limited set of sampling states that are the same between them. In order to use textures in this way, an application must generate and configure - * many texture names, adding overhead both to applications and to implementations. Furthermore, should an application wish to sample from a texture in - * more than one way (with and without mip-mapping, for example) it must either modify the state of the texture or create two textures, each with a copy of - * the same image data. This can introduce runtime and memory costs to the application.

    - * - *

    This extension separates sampler state from texture image data. A new object type is introduced, the sampler (representing generic sampling parameters). - * The new sampler objects are represented by a new named type encapsulating the sampling parameters of a traditional texture object. Sampler objects may - * be bound to texture units to supplant the bound texture's sampling state. A single sampler may be bound to more than one texture unit simultaneously, - * allowing different textures to be accessed with a single set of shared sampling parameters. Also, by binding different sampler objects to texture units - * to which the same texture has been bound, the same texture image data may be sampled with different sampling parameters.

    - * - *

    Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public class ARBSamplerObjects { - - static { GL.initialize(); } - - /** Accepted by the {@code value} parameter of the GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv and GetDoublev functions. */ - public static final int GL_SAMPLER_BINDING = 0x8919; - - protected ARBSamplerObjects() { - throw new UnsupportedOperationException(); - } - - // --- [ glGenSamplers ] --- - - /** - * Unsafe version of: {@link #glGenSamplers GenSamplers} - * - * @param count the number of sampler object names to generate - */ - public static void nglGenSamplers(int count, long samplers) { - GL33C.nglGenSamplers(count, samplers); - } - - /** - * Generates sampler object names. - * - * @param samplers a buffer in which the generated sampler object names are stored - */ - public static void glGenSamplers(@NativeType("GLuint *") IntBuffer samplers) { - GL33C.glGenSamplers(samplers); - } - - /** Generates sampler object names. */ - @NativeType("void") - public static int glGenSamplers() { - return GL33C.glGenSamplers(); - } - - // --- [ glDeleteSamplers ] --- - - /** - * Unsafe version of: {@link #glDeleteSamplers DeleteSamplers} - * - * @param count the number of sampler objects to be deleted - */ - public static void nglDeleteSamplers(int count, long samplers) { - GL33C.nglDeleteSamplers(count, samplers); - } - - /** - * Deletes named sampler objects. - * - * @param samplers an array of sampler objects to be deleted - */ - public static void glDeleteSamplers(@NativeType("GLuint const *") IntBuffer samplers) { - GL33C.glDeleteSamplers(samplers); - } - - /** Deletes named sampler objects. */ - public static void glDeleteSamplers(@NativeType("GLuint const *") int sampler) { - GL33C.glDeleteSamplers(sampler); - } - - // --- [ glIsSampler ] --- - - /** - * Determines if a name corresponds to a sampler object. - * - * @param sampler a value that may be the name of a sampler object - */ - @NativeType("GLboolean") - public static boolean glIsSampler(@NativeType("GLuint") int sampler) { - return GL33C.glIsSampler(sampler); - } - - // --- [ glBindSampler ] --- - - /** - * Binds a named sampler to a texturing target. - * - * @param unit the index of the texture unit to which the sampler is bound - * @param sampler the name of a sampler - */ - public static void glBindSampler(@NativeType("GLuint") int unit, @NativeType("GLuint") int sampler) { - GL33C.glBindSampler(unit, sampler); - } - - // --- [ glSamplerParameteri ] --- - - /** - * Set the integer value of a sampler parameter. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a single-valued sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    - * @param param the value of {@code pname} - */ - public static void glSamplerParameteri(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL33C.glSamplerParameteri(sampler, pname, param); - } - - // --- [ glSamplerParameterf ] --- - - /** - * Float version of {@link #glSamplerParameteri SamplerParameteri}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a single-valued sampler parameter - * @param param the value of {@code pname} - */ - public static void glSamplerParameterf(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param) { - GL33C.glSamplerParameterf(sampler, pname, param); - } - - // --- [ glSamplerParameteriv ] --- - - /** Unsafe version of: {@link #glSamplerParameteriv SamplerParameteriv} */ - public static void nglSamplerParameteriv(int sampler, int pname, long params) { - GL33C.nglSamplerParameteriv(sampler, pname, params); - } - - /** - * Pointer version of {@link #glSamplerParameteri SamplerParameteri}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    - * @param params an array where the value or values of {@code pname} are stored - */ - public static void glSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL33C.glSamplerParameteriv(sampler, pname, params); - } - - // --- [ glSamplerParameterfv ] --- - - /** Unsafe version of: {@link #glSamplerParameterfv SamplerParameterfv} */ - public static void nglSamplerParameterfv(int sampler, int pname, long params) { - GL33C.nglSamplerParameterfv(sampler, pname, params); - } - - /** - * Float version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - */ - public static void glSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - GL33C.glSamplerParameterfv(sampler, pname, params); - } - - // --- [ glSamplerParameterIiv ] --- - - /** Unsafe version of: {@link #glSamplerParameterIiv SamplerParameterIiv} */ - public static void nglSamplerParameterIiv(int sampler, int pname, long params) { - GL33C.nglSamplerParameterIiv(sampler, pname, params); - } - - /** - * Pure integer version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - */ - public static void glSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL33C.glSamplerParameterIiv(sampler, pname, params); - } - - // --- [ glSamplerParameterIuiv ] --- - - /** Unsafe version of: {@link #glSamplerParameterIuiv SamplerParameterIuiv} */ - public static void nglSamplerParameterIuiv(int sampler, int pname, long params) { - GL33C.nglSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Unsigned pure integer version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - */ - public static void glSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - GL33C.glSamplerParameterIuiv(sampler, pname, params); - } - - // --- [ glGetSamplerParameteriv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameteriv GetSamplerParameteriv} */ - public static void nglGetSamplerParameteriv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameteriv(sampler, pname, params); - } - - /** - * Return the integer value(s) of a sampler parameter. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    ,{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}
    - * @param params the sampler parameters - */ - public static void glGetSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL33C.glGetSamplerParameteriv(sampler, pname, params); - } - - /** - * Return the integer value(s) of a sampler parameter. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    ,{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}
    - */ - @NativeType("void") - public static int glGetSamplerParameteri(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameteri(sampler, pname); - } - - // --- [ glGetSamplerParameterfv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterfv GetSamplerParameterfv} */ - public static void nglGetSamplerParameterfv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameterfv(sampler, pname, params); - } - - /** - * Float version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - */ - public static void glGetSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL33C.glGetSamplerParameterfv(sampler, pname, params); - } - - /** - * Float version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - */ - @NativeType("void") - public static float glGetSamplerParameterf(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameterf(sampler, pname); - } - - // --- [ glGetSamplerParameterIiv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterIiv GetSamplerParameterIiv} */ - public static void nglGetSamplerParameterIiv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameterIiv(sampler, pname, params); - } - - /** - * Pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - */ - public static void glGetSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL33C.glGetSamplerParameterIiv(sampler, pname, params); - } - - /** - * Pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - */ - @NativeType("void") - public static int glGetSamplerParameterIi(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameterIi(sampler, pname); - } - - // --- [ glGetSamplerParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterIuiv GetSamplerParameterIuiv} */ - public static void nglGetSamplerParameterIuiv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Unsigned pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - */ - public static void glGetSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - GL33C.glGetSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Unsigned pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - */ - @NativeType("void") - public static int glGetSamplerParameterIui(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameterIui(sampler, pname); - } - - /** Array version of: {@link #glGenSamplers GenSamplers} */ - public static void glGenSamplers(@NativeType("GLuint *") int[] samplers) { - GL33C.glGenSamplers(samplers); - } - - /** Array version of: {@link #glDeleteSamplers DeleteSamplers} */ - public static void glDeleteSamplers(@NativeType("GLuint const *") int[] samplers) { - GL33C.glDeleteSamplers(samplers); - } - - /** Array version of: {@link #glSamplerParameteriv SamplerParameteriv} */ - public static void glSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL33C.glSamplerParameteriv(sampler, pname, params); - } - - /** Array version of: {@link #glSamplerParameterfv SamplerParameterfv} */ - public static void glSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - GL33C.glSamplerParameterfv(sampler, pname, params); - } - - /** Array version of: {@link #glSamplerParameterIiv SamplerParameterIiv} */ - public static void glSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL33C.glSamplerParameterIiv(sampler, pname, params); - } - - /** Array version of: {@link #glSamplerParameterIuiv SamplerParameterIuiv} */ - public static void glSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - GL33C.glSamplerParameterIuiv(sampler, pname, params); - } - - /** Array version of: {@link #glGetSamplerParameteriv GetSamplerParameteriv} */ - public static void glGetSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL33C.glGetSamplerParameteriv(sampler, pname, params); - } - - /** Array version of: {@link #glGetSamplerParameterfv GetSamplerParameterfv} */ - public static void glGetSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL33C.glGetSamplerParameterfv(sampler, pname, params); - } - - /** Array version of: {@link #glGetSamplerParameterIiv GetSamplerParameterIiv} */ - public static void glGetSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL33C.glGetSamplerParameterIiv(sampler, pname, params); - } - - /** Array version of: {@link #glGetSamplerParameterIuiv GetSamplerParameterIuiv} */ - public static void glGetSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - GL33C.glGetSamplerParameterIuiv(sampler, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeamlessCubeMap.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeamlessCubeMap.java deleted file mode 100644 index b02fff02..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeamlessCubeMap.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_seamless_cube_map extension. - * - *

    When sampling from cube map textures, a three-dimensional texture coordinate is used to select one of the cube map faces and generate a two dimensional - * texture coordinate ( s t ), at which a texel is sampled from the determined face of the cube map texture. Each face of the texture is treated as an - * independent two-dimensional texture, and the generated ( s t ) coordinate is subjected to the same clamping and wrapping rules as for any other two - * dimensional texture fetch.

    - * - *

    Although it is unlikely that the generated ( s t ) coordinate lies significantly outside the determined cube map face, it is often the case that the - * locations of the individual elements required during a linear sampling do not lie within the determined face, and their coordinates will therefore be - * modified by the selected clamping and wrapping rules. This often has the effect of producing seams or other discontinuities in the sampled texture.

    - * - *

    This extension allows implementations to take samples from adjacent cube map faces, providing the ability to create seamless cube maps.

    - * - *

    Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public final class ARBSeamlessCubeMap { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and - * GetDoublev. - */ - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; - - private ARBSeamlessCubeMap() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java deleted file mode 100644 index a9927e34..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_seamless_cubemap_per_texture extension. - * - *

    In unextended OpenGL, cube maps are treated as sets of six, independent texture images. Once a face is selected from the set, it is treated exactly as - * any other two-dimensional texture would be. When sampling linearly from the texture, all of the individual texels that would be used to to create the - * final, bilinear sample values are taken from the same cube face. The normal, two-dimensional texture coordinate wrapping modes are honored. This - * sometimes causes seams to appear in cube maps.

    - * - *

    {@link ARBSeamlessCubeMap ARB_seamless_cube_map} (and subsequently, OpenGL 3.2) addresses this issue by providing a mechanism whereby an implementation could take each of - * the taps of a bilinear sample from a different face, spanning face boundaries and providing seamless filtering from cube map textures. However, in - * ARB_seamless_cube_map, this feature was exposed as a global state, affecting all bound cube map textures. It was not possible to mix seamless and - * per-face cube map sampling modes during sampling. Furthermore, if an application included cube maps that were meant to be sampled seamlessly and - * non-seamlessly, it would have to track this state and enable or disable seamless cube map sampling as needed.

    - * - *

    This extension addresses this issue and provides an orthogonal method for allowing an implementation to provide a per-texture setting for enabling - * seamless sampling from cube maps.

    - * - *

    Requires {@link GL32 OpenGL 3.2}.

    - */ -public final class ARBSeamlessCubemapPerTexture { - - /** - * Accepted by the {@code pname} parameter of TexParameter{if}, TexParameter{if}v, GetTexParameter{if}v, SamplerParameter{if}, SamplerParameter{if}v, and - * GetSamplerParameter{if}v. - */ - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; - - private ARBSeamlessCubemapPerTexture() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeparateShaderObjects.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeparateShaderObjects.java deleted file mode 100644 index 9f9476f0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSeparateShaderObjects.java +++ /dev/null @@ -1,1597 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_separate_shader_objects extension. - * - *

    Conventional GLSL requires multiple shader stages (vertex, fragment, geometry, tessellation control, and tessellation evaluation) to be linked into a - * single monolithic program object to specify a GLSL shader for each stage.

    - * - *

    While GLSL's monolithic approach has some advantages for optimizing shaders as a unit that span multiple stages, all existing GPU hardware supports the - * more flexible mix-and-match approach.

    - * - *

    Shaders written for HLSL9, Cg, the prior OpenGL assembly program extensions, and game console favor a more flexible "mix-and-match" approach to - * specifying shaders independently for these different shader stages. Many developers build their shader content around the mix-and-match approach where - * they can use a single vertex shader with multiple fragment shaders (or vice versa).

    - * - *

    This extension adopts a "mix-and-match" shader stage model for GLSL allowing multiple different GLSL program objects to be bound at once each to an - * individual rendering pipeline stage independently of other stage bindings. This allows program objects to contain only the shader stages that best suit - * the applications needs.

    - * - *

    This extension introduces the program pipeline object that serves as a container for the program bound to any particular rendering stage. It can be - * bound, unbound, and rebound to simply save and restore the complete shader stage to program object bindings. Like framebuffer and vertex array objects, - * program pipeline objects are "container" objects that are not shared between contexts.

    - * - *

    To bind a program object to a specific shader stage or set of stages, {@link #glUseProgramStages UseProgramStages} is used. The {@link #GL_VERTEX_SHADER_BIT VERTEX_SHADER_BIT}, {@link #GL_GEOMETRY_SHADER_BIT GEOMETRY_SHADER_BIT}, - * {@link #GL_FRAGMENT_SHADER_BIT FRAGMENT_SHADER_BIT}, {@link #GL_TESS_CONTROL_SHADER_BIT TESS_CONTROL_SHADER_BIT}, and {@link #GL_TESS_EVALUATION_SHADER_BIT TESS_EVALUATION_SHADER_BIT} tokens refer to the conventional vertex, geometry, fragment, - * tessellation control and tessellation evaluation stages respectively. {@link #glActiveShaderProgram ActiveShaderProgram} specifies the program that Uniform* commands will update.

    - * - *

    While {@link #glActiveShaderProgram ActiveShaderProgram} allows the use of conventional Uniform* commands to update uniform variable values for separable program objects, this - * extension provides a preferrable interface in a set of ProgramUniform* commands that update the same uniform variables but take a parameter indicating - * the program object to be updated, rather than updating the currently active program object. These commands mirror those introduced in - * {@link EXTDirectStateAccess EXT_direct_state_access}.

    - * - *

    While {@link #glActiveShaderProgram ActiveShaderProgram} provides a selector for setting and querying uniform values of a program object, the glProgramUniform* commands provide a - * selector-free way to modify uniforms of a GLSL program object without an explicit bind. This selector-free model reduces API overhead and provides a - * cleaner interface for applications.

    - * - *

    Separate linking creates the possibility that certain output varyings of a shader may go unread by the subsequent shader inputting varyings. In this - * case, the output varyings are simply ignored. It is also possible input varyings from a shader may not be written as output varyings of a preceding - * shader. In this case, the unwritten input varying values are undefined.

    - * - *

    This extension builds on the proof-of-concept provided by {@link EXTSeparateShaderObjects EXT_separate_shader_objects} which demonstrated that separate shader objects can work - * for GLSL. {@code EXT_separate_shader_objects} was a response to repeated requests for this functionality from 3D developers.

    - * - *

    This ARB version addresses several "loose ends" in the prior EXT extension. In particular, it allows user-defined varyings with explicitly defined - * locations or implicitly assigned locations.

    - * - *

    This ARB extension extends the GLSL language's use of layout qualifiers to provide cross-stage interfacing.

    - * - *

    Requires {@link GL20 OpenGL 2.0} or {@link ARBShaderObjects ARB_shader_objects}. Promoted to core in {@link GL41 OpenGL 4.1}.

    - */ -public class ARBSeparateShaderObjects { - - static { GL.initialize(); } - - /** Accepted by {@code stages} parameter to UseProgramStages. */ - public static final int - GL_VERTEX_SHADER_BIT = 0x1, - GL_FRAGMENT_SHADER_BIT = 0x2, - GL_GEOMETRY_SHADER_BIT = 0x4, - GL_TESS_CONTROL_SHADER_BIT = 0x8, - GL_TESS_EVALUATION_SHADER_BIT = 0x10, - GL_ALL_SHADER_BITS = 0xFFFFFFFF; - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int GL_PROGRAM_SEPARABLE = 0x8258; - - /** Accepted by {@code type} parameter to GetProgramPipelineiv. */ - public static final int GL_ACTIVE_PROGRAM = 0x8259; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_PROGRAM_PIPELINE_BINDING = 0x825A; - - protected ARBSeparateShaderObjects() { - throw new UnsupportedOperationException(); - } - - // --- [ glUseProgramStages ] --- - - /** - * Binds stages of a program object to a program pipeline. - * - * @param pipeline the program pipeline object to which to bind stages from {@code program} - * @param stages a set of program stages to bind to the program pipeline object - * @param program the program object containing the shader executables to use in {@code pipeline} - */ - public static void glUseProgramStages(@NativeType("GLuint") int pipeline, @NativeType("GLbitfield") int stages, @NativeType("GLuint") int program) { - GL41C.glUseProgramStages(pipeline, stages, program); - } - - // --- [ glActiveShaderProgram ] --- - - /** - * Sets the active program object for a program pipeline object. - * - * @param pipeline the program pipeline object to set the active program object for - * @param program the program object to set as the active program pipeline object {@code pipeline} - */ - public static void glActiveShaderProgram(@NativeType("GLuint") int pipeline, @NativeType("GLuint") int program) { - GL41C.glActiveShaderProgram(pipeline, program); - } - - // --- [ glCreateShaderProgramv ] --- - - /** - * Unsafe version of: {@link #glCreateShaderProgramv CreateShaderProgramv} - * - * @param count the number of source code strings in the array {@code strings} - */ - public static int nglCreateShaderProgramv(int type, int count, long strings) { - return GL41C.nglCreateShaderProgramv(type, count, strings); - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * @param strings an array of pointers to source code strings from which to create the program object - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") PointerBuffer strings) { - return GL41C.glCreateShaderProgramv(type, strings); - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * @param strings an array of pointers to source code strings from which to create the program object - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") CharSequence... strings) { - return GL41C.glCreateShaderProgramv(type, strings); - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") CharSequence string) { - return GL41C.glCreateShaderProgramv(type, string); - } - - // --- [ glBindProgramPipeline ] --- - - /** - * Binds a program pipeline to the current context. - * - * @param pipeline the name of the pipeline object to bind to the context - */ - public static void glBindProgramPipeline(@NativeType("GLuint") int pipeline) { - GL41C.glBindProgramPipeline(pipeline); - } - - // --- [ glDeleteProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glDeleteProgramPipelines DeleteProgramPipelines} - * - * @param n the number of program pipeline objects to delete - */ - public static void nglDeleteProgramPipelines(int n, long pipelines) { - GL41C.nglDeleteProgramPipelines(n, pipelines); - } - - /** - * Deletes program pipeline objects. - * - * @param pipelines an array of names of program pipeline objects to delete - */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") IntBuffer pipelines) { - GL41C.glDeleteProgramPipelines(pipelines); - } - - /** Deletes program pipeline objects. */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") int pipeline) { - GL41C.glDeleteProgramPipelines(pipeline); - } - - // --- [ glGenProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glGenProgramPipelines GenProgramPipelines} - * - * @param n the number of program pipeline object names to reserve - */ - public static void nglGenProgramPipelines(int n, long pipelines) { - GL41C.nglGenProgramPipelines(n, pipelines); - } - - /** - * Reserves program pipeline object names. - * - * @param pipelines an array of into which the reserved names will be written - */ - public static void glGenProgramPipelines(@NativeType("GLuint *") IntBuffer pipelines) { - GL41C.glGenProgramPipelines(pipelines); - } - - /** Reserves program pipeline object names. */ - @NativeType("void") - public static int glGenProgramPipelines() { - return GL41C.glGenProgramPipelines(); - } - - // --- [ glIsProgramPipeline ] --- - - /** - * Determines if a name corresponds to a program pipeline object. - * - * @param pipeline a value that may be the name of a program pipeline object - */ - @NativeType("GLboolean") - public static boolean glIsProgramPipeline(@NativeType("GLuint") int pipeline) { - return GL41C.glIsProgramPipeline(pipeline); - } - - // --- [ glProgramParameteri ] --- - - /** - * Specifies the integer value of a program object parameter. - * - * @param program the name of a program object whose parameter to modify - * @param pname the name of the parameter to modify. One of:
    {@link GL41C#GL_PROGRAM_BINARY_RETRIEVABLE_HINT PROGRAM_BINARY_RETRIEVABLE_HINT}{@link GL41C#GL_PROGRAM_SEPARABLE PROGRAM_SEPARABLE}
    - * @param value the new value of the parameter specified by {@code pname} for {@code program} - */ - public static void glProgramParameteri(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint") int value) { - GL41C.glProgramParameteri(program, pname, value); - } - - // --- [ glGetProgramPipelineiv ] --- - - /** Unsafe version of: {@link #glGetProgramPipelineiv GetProgramPipelineiv} */ - public static void nglGetProgramPipelineiv(int pipeline, int pname, long params) { - GL41C.nglGetProgramPipelineiv(pipeline, pname, params); - } - - /** - * Retrieves properties of a program pipeline object. - * - * @param pipeline the name of a program pipeline object whose parameter retrieve - * @param pname the name of the parameter to retrieve. One of:
    {@link GL41C#GL_ACTIVE_PROGRAM ACTIVE_PROGRAM}{@link GL20#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}
    {@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}{@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param params a variable into which will be written the value or values of {@code pname} for {@code pipeline} - */ - public static void glGetProgramPipelineiv(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL41C.glGetProgramPipelineiv(pipeline, pname, params); - } - - /** - * Retrieves properties of a program pipeline object. - * - * @param pipeline the name of a program pipeline object whose parameter retrieve - * @param pname the name of the parameter to retrieve. One of:
    {@link GL41C#GL_ACTIVE_PROGRAM ACTIVE_PROGRAM}{@link GL20#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}
    {@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}{@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - */ - @NativeType("void") - public static int glGetProgramPipelinei(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname) { - return GL41C.glGetProgramPipelinei(pipeline, pname); - } - - // --- [ glProgramUniform1i ] --- - - /** - * Specifies the value of an int uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static void glProgramUniform1i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x) { - GL41C.glProgramUniform1i(program, location, x); - } - - // --- [ glProgramUniform2i ] --- - - /** - * Specifies the value of an ivec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static void glProgramUniform2i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y) { - GL41C.glProgramUniform2i(program, location, x, y); - } - - // --- [ glProgramUniform3i ] --- - - /** - * Specifies the value of an ivec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static void glProgramUniform3i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z) { - GL41C.glProgramUniform3i(program, location, x, y, z); - } - - // --- [ glProgramUniform4i ] --- - - /** - * Specifies the value of an ivec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static void glProgramUniform4i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w) { - GL41C.glProgramUniform4i(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1ui ] --- - - /** - * Specifies the value of a uint uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static void glProgramUniform1ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x) { - GL41C.glProgramUniform1ui(program, location, x); - } - - // --- [ glProgramUniform2ui ] --- - - /** - * Specifies the value of a uvec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static void glProgramUniform2ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y) { - GL41C.glProgramUniform2ui(program, location, x, y); - } - - // --- [ glProgramUniform3ui ] --- - - /** - * Specifies the value of a uvec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static void glProgramUniform3ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y, @NativeType("GLuint") int z) { - GL41C.glProgramUniform3ui(program, location, x, y, z); - } - - // --- [ glProgramUniform4ui ] --- - - /** - * Specifies the value of a uvec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static void glProgramUniform4ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y, @NativeType("GLuint") int z, @NativeType("GLuint") int w) { - GL41C.glProgramUniform4ui(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1f ] --- - - /** - * Specifies the value of a float uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static void glProgramUniform1f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x) { - GL41C.glProgramUniform1f(program, location, x); - } - - // --- [ glProgramUniform2f ] --- - - /** - * Specifies the value of a vec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static void glProgramUniform2f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y) { - GL41C.glProgramUniform2f(program, location, x, y); - } - - // --- [ glProgramUniform3f ] --- - - /** - * Specifies the value of a vec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static void glProgramUniform3f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z) { - GL41C.glProgramUniform3f(program, location, x, y, z); - } - - // --- [ glProgramUniform4f ] --- - - /** - * Specifies the value of a vec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static void glProgramUniform4f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w) { - GL41C.glProgramUniform4f(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1d ] --- - - /** - * Specifies the value of a double uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - */ - public static void glProgramUniform1d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x) { - GL41C.glProgramUniform1d(program, location, x); - } - - // --- [ glProgramUniform2d ] --- - - /** - * Specifies the value of a dvec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - */ - public static void glProgramUniform2d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y) { - GL41C.glProgramUniform2d(program, location, x, y); - } - - // --- [ glProgramUniform3d ] --- - - /** - * Specifies the value of a dvec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - */ - public static void glProgramUniform3d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z) { - GL41C.glProgramUniform3d(program, location, x, y, z); - } - - // --- [ glProgramUniform4d ] --- - - /** - * Specifies the value of a dvec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - */ - public static void glProgramUniform4d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w) { - GL41C.glProgramUniform4d(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1iv ProgramUniform1iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1iv(program, location, count, value); - } - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform1iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform1iv(program, location, value); - } - - // --- [ glProgramUniform2iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2iv ProgramUniform2iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2iv(program, location, count, value); - } - - /** - * Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform2iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform2iv(program, location, value); - } - - // --- [ glProgramUniform3iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3iv ProgramUniform3iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3iv(program, location, count, value); - } - - /** - * Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform3iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform3iv(program, location, value); - } - - // --- [ glProgramUniform4iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4iv ProgramUniform4iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4iv(program, location, count, value); - } - - /** - * Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform4iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform4iv(program, location, value); - } - - // --- [ glProgramUniform1uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1uiv ProgramUniform1uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uint uniform variable or a uint uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform1uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform1uiv(program, location, value); - } - - // --- [ glProgramUniform2uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2uiv ProgramUniform2uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uvec2 uniform variable or a uvec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform2uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform2uiv(program, location, value); - } - - // --- [ glProgramUniform3uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3uiv ProgramUniform3uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uvec3 uniform variable or a uvec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform3uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform3uiv(program, location, value); - } - - // --- [ glProgramUniform4uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4uiv ProgramUniform4uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uvec4 uniform variable or a uvec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform4uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform4uiv(program, location, value); - } - - // --- [ glProgramUniform1fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1fv ProgramUniform1fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1fv(program, location, count, value); - } - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform1fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform1fv(program, location, value); - } - - // --- [ glProgramUniform2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2fv ProgramUniform2fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2fv(program, location, count, value); - } - - /** - * Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform2fv(program, location, value); - } - - // --- [ glProgramUniform3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3fv ProgramUniform3fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3fv(program, location, count, value); - } - - /** - * Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform3fv(program, location, value); - } - - // --- [ glProgramUniform4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4fv ProgramUniform4fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4fv(program, location, count, value); - } - - /** - * Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform4fv(program, location, value); - } - - // --- [ glProgramUniform1dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1dv ProgramUniform1dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1dv(program, location, count, value); - } - - /** - * Specifies the value of a single double uniform variable or a double uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform1dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform1dv(program, location, value); - } - - // --- [ glProgramUniform2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2dv ProgramUniform2dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2dv(program, location, count, value); - } - - /** - * Specifies the value of a single dvec2 uniform variable or a dvec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform2dv(program, location, value); - } - - // --- [ glProgramUniform3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3dv ProgramUniform3dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3dv(program, location, count, value); - } - - /** - * Specifies the value of a single dvec3 uniform variable or a dvec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform3dv(program, location, value); - } - - // --- [ glProgramUniform4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4dv ProgramUniform4dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4dv(program, location, count, value); - } - - /** - * Specifies the value of a single dvec4 uniform variable or a dvec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - */ - public static void glProgramUniform4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform4dv(program, location, value); - } - - // --- [ glProgramUniformMatrix2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2fv ProgramUniformMatrix2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2 uniform variable or a mat2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix2fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3fv ProgramUniformMatrix3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix3fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4fv ProgramUniformMatrix4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix4fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2dv ProgramUniformMatrix2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2 uniform variable or a dmat2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix2dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3dv ProgramUniformMatrix3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3 uniform variable or a dmat3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix3dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4dv ProgramUniformMatrix4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4 uniform variable or a dmat4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix4dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x3fv ProgramUniformMatrix2x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x3fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x3fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2x3 uniform variable or a mat2x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix2x3fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x2fv ProgramUniformMatrix3x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x2fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x2fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3x2 uniform variable or a mat3x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix3x2fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x4fv ProgramUniformMatrix2x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x4fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x4fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2x4 uniform variable or a mat2x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix2x4fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x2fv ProgramUniformMatrix4x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x2fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x2fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4x2 uniform variable or a mat4x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix4x2fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x4fv ProgramUniformMatrix3x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x4fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x4fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3x4 uniform variable or a mat3x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix3x4fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x3fv ProgramUniformMatrix4x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x3fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x3fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4x3 uniform variable or a mat4x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix4x3fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x3dv ProgramUniformMatrix2x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x3dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x3dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x3 uniform variable or a dmat2x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix2x3dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x2dv ProgramUniformMatrix3x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x2dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x2dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x2 uniform variable or a dmat3x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix3x2dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x4dv ProgramUniformMatrix2x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x4dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x4dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x4 uniform variable or a dmat2x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix2x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix2x4dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x2dv ProgramUniformMatrix4x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x2dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x2dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x2 uniform variable or a dmat4x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix4x2dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x4dv ProgramUniformMatrix3x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x4dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x4dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x4 uniform variable or a dmat3x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix3x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix3x4dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x3dv ProgramUniformMatrix4x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x3dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x3dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x3 uniform variable or a dmat4x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - */ - public static void glProgramUniformMatrix4x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix4x3dv(program, location, transpose, value); - } - - // --- [ glValidateProgramPipeline ] --- - - /** - * Validates a program pipeline object against current GL state. - * - * @param pipeline the name of a program pipeline object to validate - */ - public static void glValidateProgramPipeline(@NativeType("GLuint") int pipeline) { - GL41C.glValidateProgramPipeline(pipeline); - } - - // --- [ glGetProgramPipelineInfoLog ] --- - - /** - * Unsafe version of: {@link #glGetProgramPipelineInfoLog GetProgramPipelineInfoLog} - * - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code infoLog} - */ - public static void nglGetProgramPipelineInfoLog(int pipeline, int bufSize, long length, long infoLog) { - GL41C.nglGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * @param length a variable into which will be written the number of characters written into {@code infoLog} - * @param infoLog an array of characters into which will be written the info log for {@code pipeline} - */ - public static void glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL41C.glGetProgramPipelineInfoLog(pipeline, length, infoLog); - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code infoLog} - */ - @NativeType("void") - public static String glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @NativeType("GLsizei") int bufSize) { - return GL41C.glGetProgramPipelineInfoLog(pipeline, bufSize); - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - */ - @NativeType("void") - public static String glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline) { - return glGetProgramPipelineInfoLog(pipeline, glGetProgramPipelinei(pipeline, GL20.GL_INFO_LOG_LENGTH)); - } - - /** Array version of: {@link #glDeleteProgramPipelines DeleteProgramPipelines} */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") int[] pipelines) { - GL41C.glDeleteProgramPipelines(pipelines); - } - - /** Array version of: {@link #glGenProgramPipelines GenProgramPipelines} */ - public static void glGenProgramPipelines(@NativeType("GLuint *") int[] pipelines) { - GL41C.glGenProgramPipelines(pipelines); - } - - /** Array version of: {@link #glGetProgramPipelineiv GetProgramPipelineiv} */ - public static void glGetProgramPipelineiv(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL41C.glGetProgramPipelineiv(pipeline, pname, params); - } - - /** Array version of: {@link #glProgramUniform1iv ProgramUniform1iv} */ - public static void glProgramUniform1iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform1iv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform2iv ProgramUniform2iv} */ - public static void glProgramUniform2iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform2iv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform3iv ProgramUniform3iv} */ - public static void glProgramUniform3iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform3iv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform4iv ProgramUniform4iv} */ - public static void glProgramUniform4iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform4iv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform1uiv ProgramUniform1uiv} */ - public static void glProgramUniform1uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform1uiv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform2uiv ProgramUniform2uiv} */ - public static void glProgramUniform2uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform2uiv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform3uiv ProgramUniform3uiv} */ - public static void glProgramUniform3uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform3uiv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform4uiv ProgramUniform4uiv} */ - public static void glProgramUniform4uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform4uiv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform1fv ProgramUniform1fv} */ - public static void glProgramUniform1fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform1fv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform2fv ProgramUniform2fv} */ - public static void glProgramUniform2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform2fv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform3fv ProgramUniform3fv} */ - public static void glProgramUniform3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform3fv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform4fv ProgramUniform4fv} */ - public static void glProgramUniform4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform4fv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform1dv ProgramUniform1dv} */ - public static void glProgramUniform1dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform1dv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform2dv ProgramUniform2dv} */ - public static void glProgramUniform2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform2dv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform3dv ProgramUniform3dv} */ - public static void glProgramUniform3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform3dv(program, location, value); - } - - /** Array version of: {@link #glProgramUniform4dv ProgramUniform4dv} */ - public static void glProgramUniform4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform4dv(program, location, value); - } - - /** Array version of: {@link #glProgramUniformMatrix2fv ProgramUniformMatrix2fv} */ - public static void glProgramUniformMatrix2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix2fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix3fv ProgramUniformMatrix3fv} */ - public static void glProgramUniformMatrix3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix3fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix4fv ProgramUniformMatrix4fv} */ - public static void glProgramUniformMatrix4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix4fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix2dv ProgramUniformMatrix2dv} */ - public static void glProgramUniformMatrix2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix2dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix3dv ProgramUniformMatrix3dv} */ - public static void glProgramUniformMatrix3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix3dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix4dv ProgramUniformMatrix4dv} */ - public static void glProgramUniformMatrix4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix4dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix2x3fv ProgramUniformMatrix2x3fv} */ - public static void glProgramUniformMatrix2x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix2x3fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix3x2fv ProgramUniformMatrix3x2fv} */ - public static void glProgramUniformMatrix3x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix3x2fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix2x4fv ProgramUniformMatrix2x4fv} */ - public static void glProgramUniformMatrix2x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix2x4fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix4x2fv ProgramUniformMatrix4x2fv} */ - public static void glProgramUniformMatrix4x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix4x2fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix3x4fv ProgramUniformMatrix3x4fv} */ - public static void glProgramUniformMatrix3x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix3x4fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix4x3fv ProgramUniformMatrix4x3fv} */ - public static void glProgramUniformMatrix4x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix4x3fv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix2x3dv ProgramUniformMatrix2x3dv} */ - public static void glProgramUniformMatrix2x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix2x3dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix3x2dv ProgramUniformMatrix3x2dv} */ - public static void glProgramUniformMatrix3x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix3x2dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix2x4dv ProgramUniformMatrix2x4dv} */ - public static void glProgramUniformMatrix2x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix2x4dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix4x2dv ProgramUniformMatrix4x2dv} */ - public static void glProgramUniformMatrix4x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix4x2dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix3x4dv ProgramUniformMatrix3x4dv} */ - public static void glProgramUniformMatrix3x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix3x4dv(program, location, transpose, value); - } - - /** Array version of: {@link #glProgramUniformMatrix4x3dv ProgramUniformMatrix4x3dv} */ - public static void glProgramUniformMatrix4x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix4x3dv(program, location, transpose, value); - } - - /** Array version of: {@link #glGetProgramPipelineInfoLog GetProgramPipelineInfoLog} */ - public static void glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL41C.glGetProgramPipelineInfoLog(pipeline, length, infoLog); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderAtomicCounters.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderAtomicCounters.java deleted file mode 100644 index 2d3292a3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderAtomicCounters.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_shader_atomic_counters extension. - * - *

    This extension provides a set of atomic counters.

    - * - *

    This extension provides GLSL built-in functions to query and increment/decrement these atomic counters.

    - * - *

    This enables a shader to write to unique offsets (append to a buffer object) or read from unique offsets (consume from a buffer object).

    - * - *

    Opaque handles to atomic counters are declared at global scope and are qualified with the uniform qualifier.

    - * - *

    Unlike other user-defined uniforms declared at global scope, they take NO storage from the default partition, they have NO location, and they may NOT be - * set with the Uniform* commands. Atomic counters may also NOT be grouped into uniform blocks.

    - * - *

    Active atomic counters can be discovered by the commands {@link GL31C#glGetUniformIndices GetUniformIndices}, {@link GL31C#glGetActiveUniformName GetActiveUniformName}, {@link GL20C#glGetActiveUniform GetActiveUniform} and - * {@link GL31C#glGetActiveUniformsiv GetActiveUniformsiv}.

    - * - *

    Like samplers, the opaque handles of the atomic counters and are ONLY used in some GLSL built-in functions.

    - * - *

    The atomic counters pointed to by the opaque handles are bound to buffer binding points and buffer offsets through the layout qualifiers in the shading - * language, or they are implicitly assigned by the compiler.

    - * - *

    Through the OpenGL API, buffer objects may be bound to these binding points with {@link GL30C#glBindBufferBase BindBufferBase} or {@link GL30C#glBindBufferRange BindBufferRange}.

    - * - *

    The contents of the atomic counters are stored in the buffer objects. The contents of atomic counters may be set and queried with buffer object - * manipulation functions (e.g. BufferData, BufferSubData, MapBuffer or MapBufferRange).

    - * - *

    Requires {@link GL30 OpenGL 3.0}. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public class ARBShaderAtomicCounters { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of BindBufferBase and BindBufferRange. */ - public static final int GL_ATOMIC_COUNTER_BUFFER = 0x92C0; - - /** - * Accepted by the {@code pname} parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, - * GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv. - */ - public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; - - /** Accepted by the {@code pname} parameter of GetIntegeri_64v. */ - public static final int - GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, - GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; - - /** Accepted by the {@code pname} parameter of GetActiveAtomicCounterBufferiv. */ - public static final int - GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, - GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, - GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, - GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, - GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, - GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, - GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, - GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, - GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, - GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, - GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, - GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, - GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, - GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, - GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, - GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; - - /** Accepted by the {@code pname} parameter of GetActiveUniformsiv. */ - public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; - - /** Returned in {@code params} by GetActiveUniform and GetActiveUniformsiv. */ - public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; - - protected ARBShaderAtomicCounters() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetActiveAtomicCounterBufferiv ] --- - - /** Unsafe version of: {@link #glGetActiveAtomicCounterBufferiv GetActiveAtomicCounterBufferiv} */ - public static void nglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, long params) { - GL42C.nglGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); - } - - /** - * Obtains information about the set of active atomic counter buffers for a program. - * - * @param program the name of a program object for which the command {@link GL20C#glLinkProgram LinkProgram} has been issued in the past - * @param bufferIndex the index of an active atomic counter buffer - * @param pname the parameter to query. One of:
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE ATOMIC_COUNTER_BUFFER_DATA_SIZE}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}
    - * @param params a buffer in which to place the returned value - */ - public static void glGetActiveAtomicCounterBufferiv(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL42C.glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); - } - - /** - * Obtains information about the set of active atomic counter buffers for a program. - * - * @param program the name of a program object for which the command {@link GL20C#glLinkProgram LinkProgram} has been issued in the past - * @param bufferIndex the index of an active atomic counter buffer - * @param pname the parameter to query. One of:
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE ATOMIC_COUNTER_BUFFER_DATA_SIZE}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}
    - */ - @NativeType("void") - public static int glGetActiveAtomicCounterBufferi(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname) { - return GL42C.glGetActiveAtomicCounterBufferi(program, bufferIndex, pname); - } - - /** Array version of: {@link #glGetActiveAtomicCounterBufferiv GetActiveAtomicCounterBufferiv} */ - public static void glGetActiveAtomicCounterBufferiv(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL42C.glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderImageLoadStore.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderImageLoadStore.java deleted file mode 100644 index 6a184087..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderImageLoadStore.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_shader_image_load_store extension. - * - *

    This extension provides GLSL built-in functions allowing shaders to load from, store to, and perform atomic read-modify-write operations to a single - * level of a texture object from any shader stage. These built-in functions are named imageLoad(), imageStore(), and imageAtomic*(), respectively, and - * accept integer texel coordinates to identify the texel accessed. The extension adds the notion of "image units" to the OpenGL API, to which texture - * levels are bound for access by the GLSL built-in functions. To allow shaders to specify the image unit to access, GLSL provides a new set of data types - * ("image*") similar to samplers. Each image variable is assigned an integer value to identify an image unit to access, which is specified using - * Uniform*() APIs in a manner similar to samplers.

    - * - *

    This extension also provides the capability to explicitly enable "early" per-fragment tests, where operations like depth and stencil testing are - * performed prior to fragment shader execution. In unextended OpenGL, fragment shaders never have any side effects and implementations can sometimes - * perform per-fragment tests and discard some fragments prior to executing the fragment shader. Since this extension allows fragment shaders to write to - * texture and buffer object memory using the built-in image functions, such optimizations could lead to non-deterministic results. To avoid this, - * implementations supporting this extension may not perform such optimizations on shaders having such side effects. However, enabling early per-fragment - * tests guarantees that such tests will be performed prior to fragment shader execution, and ensures that image stores and atomics will not be performed - * by fragment shader invocations where these per-fragment tests fail.

    - * - *

    Finally, this extension provides both a GLSL built-in function and an OpenGL API function allowing applications some control over the ordering of image - * loads, stores, and atomics relative to other OpenGL pipeline operations accessing the same memory. Because the extension provides the ability to perform - * random accesses to texture or buffer object memory, such accesses are not easily tracked by the OpenGL driver. To avoid the need for heavy-handed - * synchronization at the driver level, this extension requires manual synchronization. The MemoryBarrier() OpenGL API function allows applications to - * specify a bitfield indicating the set of OpenGL API operations to synchronize relative to shader memory access. The memoryBarrier() GLSL built-in - * function provides a synchronization point within a given shader invocation to ensure that all memory accesses performed prior to the synchronization - * point complete prior to any started after the synchronization point.

    - * - *

    Requires {@link GL30 OpenGL 3.0} and GLSL 1.30. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public class ARBShaderImageLoadStore { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_IMAGE_UNITS = 0x8F38, - GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, - GL_MAX_IMAGE_SAMPLES = 0x906D, - GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, - GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, - GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, - GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, - GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, - GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; - - /** Accepted by the {@code target} parameter of GetIntegeri_v and GetBooleani_v. */ - public static final int - GL_IMAGE_BINDING_NAME = 0x8F3A, - GL_IMAGE_BINDING_LEVEL = 0x8F3B, - GL_IMAGE_BINDING_LAYERED = 0x8F3C, - GL_IMAGE_BINDING_LAYER = 0x8F3D, - GL_IMAGE_BINDING_ACCESS = 0x8F3E, - GL_IMAGE_BINDING_FORMAT = 0x906E; - - /** Accepted by the {@code barriers} parameter of MemoryBarrier. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x1, - GL_ELEMENT_ARRAY_BARRIER_BIT = 0x2, - GL_UNIFORM_BARRIER_BIT = 0x4, - GL_TEXTURE_FETCH_BARRIER_BIT = 0x8, - GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x20, - GL_COMMAND_BARRIER_BIT = 0x40, - GL_PIXEL_BUFFER_BARRIER_BIT = 0x80, - GL_TEXTURE_UPDATE_BARRIER_BIT = 0x100, - GL_BUFFER_UPDATE_BARRIER_BIT = 0x200, - GL_FRAMEBUFFER_BARRIER_BIT = 0x400, - GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x800, - GL_ATOMIC_COUNTER_BARRIER_BIT = 0x1000, - GL_ALL_BARRIER_BITS = 0xFFFFFFFF; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_IMAGE_1D = 0x904C, - GL_IMAGE_2D = 0x904D, - GL_IMAGE_3D = 0x904E, - GL_IMAGE_2D_RECT = 0x904F, - GL_IMAGE_CUBE = 0x9050, - GL_IMAGE_BUFFER = 0x9051, - GL_IMAGE_1D_ARRAY = 0x9052, - GL_IMAGE_2D_ARRAY = 0x9053, - GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, - GL_IMAGE_2D_MULTISAMPLE = 0x9055, - GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, - GL_INT_IMAGE_1D = 0x9057, - GL_INT_IMAGE_2D = 0x9058, - GL_INT_IMAGE_3D = 0x9059, - GL_INT_IMAGE_2D_RECT = 0x905A, - GL_INT_IMAGE_CUBE = 0x905B, - GL_INT_IMAGE_BUFFER = 0x905C, - GL_INT_IMAGE_1D_ARRAY = 0x905D, - GL_INT_IMAGE_2D_ARRAY = 0x905E, - GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, - GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, - GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, - GL_UNSIGNED_INT_IMAGE_1D = 0x9062, - GL_UNSIGNED_INT_IMAGE_2D = 0x9063, - GL_UNSIGNED_INT_IMAGE_3D = 0x9064, - GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, - GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, - GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, - GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, - GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, - GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; - - /** Accepted by the {@code value} parameter of GetTexParameteriv, GetTexParameterfv, GetTexParameterIiv, and GetTexParameterIuiv. */ - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; - - /** - * Returned in the {@code data} parameter of GetTexParameteriv, GetTexParameterfv, GetTexParameterIiv, and GetTexParameterIuiv when {@code value} is - * IMAGE_FORMAT_COMPATIBILITY_TYPE. - */ - public static final int - GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, - GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; - - protected ARBShaderImageLoadStore() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindImageTexture ] --- - - /** - * Binds a level of a texture to an image unit. - * - * @param unit the index of the image unit to which to bind the texture - * @param texture the name of the texture to bind to the image unit - * @param level the level of the texture that is to be bound - * @param layered whether a layered texture binding is to be established - * @param layer if {@code layered} is false, specifies the layer of texture to be bound to the image unit. Ignored otherwise. - * @param access a token indicating the type of access that will be performed on the image - * @param format the format that the elements of the image will be treated as for the purposes of formatted stores - */ - public static void glBindImageTexture(@NativeType("GLuint") int unit, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLboolean") boolean layered, @NativeType("GLint") int layer, @NativeType("GLenum") int access, @NativeType("GLenum") int format) { - GL42C.glBindImageTexture(unit, texture, level, layered, layer, access, format); - } - - // --- [ glMemoryBarrier ] --- - - /** - * Defines a barrier ordering memory transactions. - * - * @param barriers the barriers to insert (bitwise combination). One or more of:
    {@link GL42C#GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT VERTEX_ATTRIB_ARRAY_BARRIER_BIT}{@link GL42C#GL_ELEMENT_ARRAY_BARRIER_BIT ELEMENT_ARRAY_BARRIER_BIT}{@link GL42C#GL_UNIFORM_BARRIER_BIT UNIFORM_BARRIER_BIT}
    {@link GL42C#GL_TEXTURE_FETCH_BARRIER_BIT TEXTURE_FETCH_BARRIER_BIT}{@link GL42C#GL_SHADER_IMAGE_ACCESS_BARRIER_BIT SHADER_IMAGE_ACCESS_BARRIER_BIT}{@link GL42C#GL_COMMAND_BARRIER_BIT COMMAND_BARRIER_BIT}
    {@link GL42C#GL_PIXEL_BUFFER_BARRIER_BIT PIXEL_BUFFER_BARRIER_BIT}{@link GL42C#GL_TEXTURE_UPDATE_BARRIER_BIT TEXTURE_UPDATE_BARRIER_BIT}{@link GL42C#GL_BUFFER_UPDATE_BARRIER_BIT BUFFER_UPDATE_BARRIER_BIT}
    {@link GL42C#GL_FRAMEBUFFER_BARRIER_BIT FRAMEBUFFER_BARRIER_BIT}{@link GL42C#GL_TRANSFORM_FEEDBACK_BARRIER_BIT TRANSFORM_FEEDBACK_BARRIER_BIT}{@link GL42C#GL_ATOMIC_COUNTER_BARRIER_BIT ATOMIC_COUNTER_BARRIER_BIT}
    {@link GL42C#GL_ALL_BARRIER_BITS ALL_BARRIER_BITS}{@link GL43#GL_SHADER_STORAGE_BARRIER_BIT SHADER_STORAGE_BARRIER_BIT}
    - */ - public static void glMemoryBarrier(@NativeType("GLbitfield") int barriers) { - GL42C.glMemoryBarrier(barriers); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderObjects.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderObjects.java deleted file mode 100644 index 8ea38d3b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderObjects.java +++ /dev/null @@ -1,1374 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_shader_objects extension. - * - *

    This extension adds API calls that are necessary to manage shader objects and program objects as defined in the OpenGL 2.0 white papers by 3Dlabs.

    - * - *

    The generation of an executable that runs on one of OpenGL's programmable units is modeled to that of developing a typical C/C++ application. There are - * one or more source files, each of which are stored by OpenGL in a shader object. Each shader object (source file) needs to be compiled and attached to a - * program object. Once all shader objects are compiled successfully, the program object needs to be linked to produce an executable. This executable is - * part of the program object, and can now be loaded onto the programmable units to make it part of the current OpenGL state. Both the compile and link - * stages generate a text string that can be queried to get more information. This information could be, but is not limited to, compile errors, link errors, - * optimization hints, etc. Values for uniform variables, declared in a shader, can be set by the application and used to control a shader's behavior.

    - * - *

    This extension defines functions for creating shader objects and program objects, for compiling shader objects, for linking program objects, for - * attaching shader objects to program objects, and for using a program object as part of current state. Functions to load uniform values are also defined. - * Some house keeping functions, like deleting an object and querying object state, are also provided.

    - * - *

    Although this extension defines the API for creating shader objects, it does not define any specific types of shader objects. It is assumed that this - * extension will be implemented along with at least one such additional extension for creating a specific type of OpenGL 2.0 shader (e.g., the - * {@link ARBFragmentShader ARB_fragment_shader} extension or the {@link ARBVertexShader ARB_vertex_shader} extension).

    - * - *

    Promoted to core in {@link GL20 OpenGL 2.0}.

    - */ -public class ARBShaderObjects { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} argument of GetHandleARB. */ - public static final int GL_PROGRAM_OBJECT_ARB = 0x8B40; - - /** Accepted by the {@code pname} parameter of GetObjectParameter{fi}vARB. */ - public static final int - GL_OBJECT_TYPE_ARB = 0x8B4E, - GL_OBJECT_SUBTYPE_ARB = 0x8B4F, - GL_OBJECT_DELETE_STATUS_ARB = 0x8B80, - GL_OBJECT_COMPILE_STATUS_ARB = 0x8B81, - GL_OBJECT_LINK_STATUS_ARB = 0x8B82, - GL_OBJECT_VALIDATE_STATUS_ARB = 0x8B83, - GL_OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84, - GL_OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85, - GL_OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86, - GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87, - GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88; - - /** Returned by the {@code params} parameter of GetObjectParameter{fi}vARB. */ - public static final int GL_SHADER_OBJECT_ARB = 0x8B48; - - /** Returned by the {@code type} parameter of GetActiveUniformARB. */ - public static final int - GL_FLOAT_VEC2_ARB = 0x8B50, - GL_FLOAT_VEC3_ARB = 0x8B51, - GL_FLOAT_VEC4_ARB = 0x8B52, - GL_INT_VEC2_ARB = 0x8B53, - GL_INT_VEC3_ARB = 0x8B54, - GL_INT_VEC4_ARB = 0x8B55, - GL_BOOL_ARB = 0x8B56, - GL_BOOL_VEC2_ARB = 0x8B57, - GL_BOOL_VEC3_ARB = 0x8B58, - GL_BOOL_VEC4_ARB = 0x8B59, - GL_FLOAT_MAT2_ARB = 0x8B5A, - GL_FLOAT_MAT3_ARB = 0x8B5B, - GL_FLOAT_MAT4_ARB = 0x8B5C, - GL_SAMPLER_1D_ARB = 0x8B5D, - GL_SAMPLER_2D_ARB = 0x8B5E, - GL_SAMPLER_3D_ARB = 0x8B5F, - GL_SAMPLER_CUBE_ARB = 0x8B60, - GL_SAMPLER_1D_SHADOW_ARB = 0x8B61, - GL_SAMPLER_2D_SHADOW_ARB = 0x8B62, - GL_SAMPLER_2D_RECT_ARB = 0x8B63, - GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; - - protected ARBShaderObjects() { - throw new UnsupportedOperationException(); - } - - public static void glShaderSourceARB(int shader, java.nio.ByteBuffer string) { - byte[] b = new byte[string.remaining()]; - string.get(b); - org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB(shader, new String(b)); - } - - public static void glUniform1ARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - glUniform1fvARB(location, value); - } - - public static void glUniform2ARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - glUniform2fvARB(location, value); - } - - public static void glUniform3ARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - glUniform3fvARB(location, value); - } - - public static void glUniform4ARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - glUniform4fvARB(location, value); - } - - public static void glUniform1ARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - glUniform1ivARB(location, value); - } - - public static void glUniform2ARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - glUniform2ivARB(location, value); - } - - public static void glUniform3ARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - glUniform3ivARB(location, value); - } - - public static void glUniform4ARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - glUniform4ivARB(location, value); - } - - public static void glUniformMatrix2ARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - glUniformMatrix2fvARB(location, transpose, value); - } - - public static void glUniformMatrix3ARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - glUniformMatrix3fvARB(location, transpose, value); - } - - public static void glUniformMatrix4ARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - glUniformMatrix4fvARB(location, transpose, value); - } - - public static void glGetObjectParameterARB(@NativeType("GLhandleARB") int obj, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - glGetObjectParameterfvARB(obj, pname, params); - } - - public static void glGetObjectParameterARB(@NativeType("GLhandleARB") int obj, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - glGetObjectParameterivARB(obj, pname, params); - } - - public static void glGetUniformARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - glGetUniformfvARB(programObj, location, params); - } - - public static void glGetUniformARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - glGetUniformivARB(programObj, location, params); - } - - // --- [ glDeleteObjectARB ] --- - - /** - * Either deletes the object, or flags it for deletion. An object that is attached to a container object is not deleted until it is no longer attached to - * any container object, for any context. If it is still attached to at least one container object, the object is flagged for deletion. If the object is - * part of the current rendering state, it is not deleted until it is no longer part of the current rendering state for any context. If the object is still - * part of the rendering state of at least one context, it is flagged for deletion. - * - *

    If an object is flagged for deletion, its Boolean status bit {@link #GL_OBJECT_DELETE_STATUS_ARB OBJECT_DELETE_STATUS_ARB} is set to true.

    - * - *

    DeleteObjectARB will silently ignore the value zero.

    - * - *

    When a container object is deleted, it will detach each attached object as part of the deletion process. When an object is deleted, all information for - * the object referenced is lost. The data for the object is also deleted.

    - * - * @param obj the shader object to delete - */ - public static native void glDeleteObjectARB(@NativeType("GLhandleARB") int obj); - - // --- [ glGetHandleARB ] --- - - /** - * Returns the handle to an object that is in use as part of current state. - * - * @param pname the state item for which the current object is to be returned. Must be:
    {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB}
    - */ - @NativeType("GLhandleARB") - public static native int glGetHandleARB(@NativeType("GLenum") int pname); - - // --- [ glDetachObjectARB ] --- - - /** - * Detaches an object from the container object it is attached to. - * - * @param containerObj the container object - * @param attachedObj the object to detach - */ - public static native void glDetachObjectARB(@NativeType("GLhandleARB") int containerObj, @NativeType("GLhandleARB") int attachedObj); - - // --- [ glCreateShaderObjectARB ] --- - - /** - * Creates a shader object. - * - * @param shaderType the type of the shader object to be created. One of:
    {@link ARBVertexShader#GL_VERTEX_SHADER_ARB VERTEX_SHADER_ARB}{@link ARBFragmentShader#GL_FRAGMENT_SHADER_ARB FRAGMENT_SHADER_ARB}
    - */ - @NativeType("GLhandleARB") - public static native int glCreateShaderObjectARB(@NativeType("GLenum") int shaderType); - - // --- [ glShaderSourceARB ] --- - - /** - * Unsafe version of: {@link #glShaderSourceARB ShaderSourceARB} - * - * @param count the number of strings in the array - */ - public static native void nglShaderSourceARB(int shaderObj, int count, long string, long length); - - /** - * Sets the source code for the specified shader object {@code shaderObj} to the text strings in the {@code string} array. If the object previously had - * source code loaded into it, it is completely replaced. - * - *

    The strings that are loaded into a shader object are expected to form the source code for a valid shader as defined in the OpenGL Shading Language - * Specification.

    - * - * @param shaderObj the shader object - * @param string an array of pointers to one or more, optionally null terminated, character strings that make up the source code - * @param length an array with the number of charARBs in each string (the string length). Each element in this array can be set to negative one (or smaller), - * indicating that its accompanying string is null terminated. If {@code length} is set to {@code NULL}, all strings in the {@code string} argument are - * considered null terminated. - */ - public static void glShaderSourceARB(@NativeType("GLhandleARB") int shaderObj, @NativeType("GLcharARB const **") PointerBuffer string, @Nullable @NativeType("GLint const *") IntBuffer length) { - if (CHECKS) { - checkSafe(length, string.remaining()); - } - nglShaderSourceARB(shaderObj, string.remaining(), memAddress(string), memAddressSafe(length)); - } - - /** - * Sets the source code for the specified shader object {@code shaderObj} to the text strings in the {@code string} array. If the object previously had - * source code loaded into it, it is completely replaced. - * - *

    The strings that are loaded into a shader object are expected to form the source code for a valid shader as defined in the OpenGL Shading Language - * Specification.

    - * - * @param shaderObj the shader object - * @param string an array of pointers to one or more, optionally null terminated, character strings that make up the source code - */ - public static void glShaderSourceARB(@NativeType("GLhandleARB") int shaderObj, @NativeType("GLcharARB const **") CharSequence... string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long stringAddress = APIUtil.apiArrayi(stack, MemoryUtil::memUTF8, string); - nglShaderSourceARB(shaderObj, string.length, stringAddress, stringAddress - (string.length << 2)); - APIUtil.apiArrayFree(stringAddress, string.length); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Sets the source code for the specified shader object {@code shaderObj} to the text strings in the {@code string} array. If the object previously had - * source code loaded into it, it is completely replaced. - * - *

    The strings that are loaded into a shader object are expected to form the source code for a valid shader as defined in the OpenGL Shading Language - * Specification.

    - * - * @param shaderObj the shader object - * @param string an array of pointers to one or more, optionally null terminated, character strings that make up the source code - */ - public static void glShaderSourceARB(@NativeType("GLhandleARB") int shaderObj, @NativeType("GLcharARB const **") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long stringAddress = APIUtil.apiArrayi(stack, MemoryUtil::memUTF8, string); - nglShaderSourceARB(shaderObj, 1, stringAddress, stringAddress - 4); - APIUtil.apiArrayFree(stringAddress, 1); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCompileShaderARB ] --- - - /** - * Compiles a shader object. Each shader object has a Boolean status, {@link #GL_OBJECT_COMPILE_STATUS_ARB OBJECT_COMPILE_STATUS_ARB}, that is modified as a result of compilation. This status - * can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}. This status will be set to {@link GL11#GL_TRUE TRUE} if the shader {@code shaderObj} was compiled without errors and is - * ready for use, and {@link GL11#GL_FALSE FALSE} otherwise. Compilation can fail for a variety of reasons as listed in the OpenGL Shading Language Specification. If - * CompileShaderARB failed, any information about a previous compile is lost and is not restored. Thus a failed compile does not restore the old state of - * {@code shaderObj}. If {@code shaderObj} does not reference a shader object, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. - * - *

    Note that changing the source code of a shader object, through ShaderSourceARB, does not change its compile status {@link #GL_OBJECT_COMPILE_STATUS_ARB OBJECT_COMPILE_STATUS_ARB}.

    - * - *

    Each shader object has an information log that is modified as a result of compilation. This information log can be queried with {@link #glGetInfoLogARB GetInfoLogARB} to - * obtain more information about the compilation attempt.

    - * - * @param shaderObj the shader object to compile - */ - public static native void glCompileShaderARB(@NativeType("GLhandleARB") int shaderObj); - - // --- [ glCreateProgramObjectARB ] --- - - /** - * Creates a program object. - * - *

    A program object is a container object. Shader objects are attached to a program object with the command AttachObjectARB. It is permissible to attach - * shader objects to program objects before source code has been loaded into the shader object, or before the shader object has been compiled. It is - * permissible to attach multiple shader objects of the same type to a single program object, and it is permissible to attach a shader object to more than - * one program object.

    - */ - @NativeType("GLhandleARB") - public static native int glCreateProgramObjectARB(); - - // --- [ glAttachObjectARB ] --- - - /** - * Attaches an object to a container object. - * - * @param containerObj the container object - * @param obj the object to attach - */ - public static native void glAttachObjectARB(@NativeType("GLhandleARB") int containerObj, @NativeType("GLhandleARB") int obj); - - // --- [ glLinkProgramARB ] --- - - /** - * Links a program object. - * - *

    Each program object has a Boolean status, {@link #GL_OBJECT_LINK_STATUS_ARB OBJECT_LINK_STATUS_ARB}, that is modified as a result of linking. This status can be queried with - * {@link #glGetObjectParameterivARB GetObjectParameterivARB}. This status will be set to {@link GL11#GL_TRUE TRUE} if a valid executable is created, and {@link GL11#GL_FALSE FALSE} otherwise. Linking can fail for a - * variety of reasons as specified in the OpenGL Shading Language Specification. Linking will also fail if one or more of the shader objects, attached to - * {@code programObj}, are not compiled successfully, or if more active uniform or active sampler variables are used in {@code programObj} than allowed. - * If LinkProgramARB failed, any information about a previous link is lost and is not restored. Thus a failed link does not restore the old state of - * {@code programObj}. If {@code programObj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB}, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated.

    - * - *

    Each program object has an information log that is modified as a result of a link operation. This information log can be queried with {@link #glGetInfoLogARB GetInfoLogARB} - * to obtain more information about the link operation.

    - * - * @param programObj the program object to link - */ - public static native void glLinkProgramARB(@NativeType("GLhandleARB") int programObj); - - // --- [ glUseProgramObjectARB ] --- - - /** - * Installs the executable code as part of current rendering state if the program object {@code programObj} contains valid executable code, i.e. has been - * linked successfully. If UseProgramObjectARB is called with the handle set to 0, it is as if the GL had no programmable stages and the fixed - * functionality paths will be used instead. If {@code programObj} cannot be made part of the current rendering state, an {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error will - * be generated and the current rendering state left unmodified. This error will be set, for example, if {@code programObj} has not been linked - * successfully. If {@code programObj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB}, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. - * - *

    While a program object is in use, applications are free to modify attached shader objects, compile attached shader objects, attach additional shader - * objects, and detach shader objects. This does not affect the link status {@link #GL_OBJECT_LINK_STATUS_ARB OBJECT_LINK_STATUS_ARB} of the program object. This does not affect the - * executable code that is part of the current state either. That executable code is only affected when the program object has been re-linked successfully. - * After such a successful re-link, the {@link #glLinkProgramARB LinkProgramARB} command will install the generated executable code as part of the current rendering state if the - * specified program object was already in use as a result of a previous call to UseProgramObjectARB. If this re-link failed, then the executable code part - * of the current state does not change.

    - * - * @param programObj the program object to use - */ - public static native void glUseProgramObjectARB(@NativeType("GLhandleARB") int programObj); - - // --- [ glValidateProgramARB ] --- - - /** - * Validates the program object {@code programObj} against the GL state at that moment. Each program object has a Boolean status, - * {@link #GL_OBJECT_VALIDATE_STATUS_ARB OBJECT_VALIDATE_STATUS_ARB}, that is modified as a result of validation. This status can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If validation - * succeeded this status will be set to {@link GL11#GL_TRUE TRUE}, otherwise it will be set to {@link GL11#GL_FALSE FALSE}. If validation succeeded the program object is guaranteed to - * execute, given the current GL state. If validation failed, the program object is guaranteed to not execute, given the current GL state. If - * {@code programObj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB}, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. - * - *

    ValidateProgramARB will validate at least as much as is done when a rendering command is issued, and it could validate more. For example, it could give - * a hint on how to optimize some piece of shader code.

    - * - *

    ValidateProgramARB will store its information in the info log. This information will either be an empty string or it will contain validation information.

    - * - *

    ValidateProgramARB is typically only useful during application development. An application should not expect different OpenGL implementations to produce - * identical information.

    - * - * @param programObj the program object to validate - */ - public static native void glValidateProgramARB(@NativeType("GLhandleARB") int programObj); - - // --- [ glUniform1fARB ] --- - - /** - * float version of {@link #glUniform4fARB Uniform4fARB}. - * - * @param location the uniform variable location - * @param v0 the uniform x value - */ - public static native void glUniform1fARB(@NativeType("GLint") int location, @NativeType("GLfloat") float v0); - - // --- [ glUniform2fARB ] --- - - /** - * vec2 version of {@link #glUniform4fARB Uniform4fARB}. - * - * @param location the uniform variable location - * @param v0 the uniform x value - * @param v1 the uniform y value - */ - public static native void glUniform2fARB(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1); - - // --- [ glUniform3fARB ] --- - - /** - * vec3 version of {@link #glUniform4fARB Uniform4fARB}. - * - * @param location the uniform variable location - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - */ - public static native void glUniform3fARB(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2); - - // --- [ glUniform4fARB ] --- - - /** - * Loads a vec4 value into a uniform variable of the program object that is currently in use. - * - * @param location the uniform variable location - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - */ - public static native void glUniform4fARB(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3); - - // --- [ glUniform1iARB ] --- - - /** - * int version of {@link #glUniform1fARB Uniform1fARB}. - * - * @param location the uniform variable location - * @param v0 the uniform x value - */ - public static native void glUniform1iARB(@NativeType("GLint") int location, @NativeType("GLint") int v0); - - // --- [ glUniform2iARB ] --- - - /** - * ivec2 version of {@link #glUniform2fARB Uniform2fARB}. - * - * @param location the uniform variable location - * @param v0 the uniform x value - * @param v1 the uniform y value - */ - public static native void glUniform2iARB(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1); - - // --- [ glUniform3iARB ] --- - - /** - * ivec3 version of {@link #glUniform3fARB Uniform3fARB}. - * - * @param location the uniform variable location - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - */ - public static native void glUniform3iARB(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2); - - // --- [ glUniform4iARB ] --- - - /** - * ivec4 version of {@link #glUniform4fARB Uniform4fARB}. - * - * @param location the uniform variable location - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - */ - public static native void glUniform4iARB(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2, @NativeType("GLint") int v3); - - // --- [ glUniform1fvARB ] --- - - /** - * Unsafe version of: {@link #glUniform1fvARB Uniform1fvARB} - * - * @param count the number of float values to load - */ - public static native void nglUniform1fvARB(int location, int count, long value); - - /** - * Loads floating-point values {@code count} times into a uniform location defined as an array of float values. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform1fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform1fvARB(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2fvARB ] --- - - /** - * Unsafe version of: {@link #glUniform2fvARB Uniform2fvARB} - * - * @param count the number of vec2 vectors to load - */ - public static native void nglUniform2fvARB(int location, int count, long value); - - /** - * Loads floating-point values {@code count} times into a uniform location defined as an array of vec2 vectors. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform2fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform2fvARB(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3fvARB ] --- - - /** - * Unsafe version of: {@link #glUniform3fvARB Uniform3fvARB} - * - * @param count the number of vec3 vectors to load - */ - public static native void nglUniform3fvARB(int location, int count, long value); - - /** - * Loads floating-point values {@code count} times into a uniform location defined as an array of vec3 vectors. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform3fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform3fvARB(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4fvARB ] --- - - /** - * Unsafe version of: {@link #glUniform4fvARB Uniform4fvARB} - * - * @param count the number of vec4 vectors to load - */ - public static native void nglUniform4fvARB(int location, int count, long value); - - /** - * Loads floating-point values {@code count} times into a uniform location defined as an array of vec4 vectors. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform4fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform4fvARB(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glUniform1ivARB ] --- - - /** - * Unsafe version of: {@link #glUniform1ivARB Uniform1ivARB} - * - * @param count the number of integer values to load - */ - public static native void nglUniform1ivARB(int location, int count, long value); - - /** - * Loads integer values {@code count} times into a uniform location defined as an array of integer values. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform1ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform1ivARB(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2ivARB ] --- - - /** - * Unsafe version of: {@link #glUniform2ivARB Uniform2ivARB} - * - * @param count the number of ivec2 vectors to load - */ - public static native void nglUniform2ivARB(int location, int count, long value); - - /** - * Loads integer values {@code count} times into a uniform location defined as an array of ivec2 vectors. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform2ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform2ivARB(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3ivARB ] --- - - /** - * Unsafe version of: {@link #glUniform3ivARB Uniform3ivARB} - * - * @param count the number of ivec3 vectors to load - */ - public static native void nglUniform3ivARB(int location, int count, long value); - - /** - * Loads integer values {@code count} times into a uniform location defined as an array of ivec3 vectors. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform3ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform3ivARB(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4ivARB ] --- - - /** - * Unsafe version of: {@link #glUniform4ivARB Uniform4ivARB} - * - * @param count the number of ivec4 vectors to load - */ - public static native void nglUniform4ivARB(int location, int count, long value); - - /** - * Loads integer values {@code count} times into a uniform location defined as an array of ivec4 vectors. - * - * @param location the uniform variable location - * @param value the values to load - */ - public static void glUniform4ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform4ivARB(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glUniformMatrix2fvARB ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2fvARB UniformMatrix2fvARB} - * - * @param count the number of 2x2 matrices to load - */ - public static native void nglUniformMatrix2fvARB(int location, int count, boolean transpose, long value); - - /** - * Loads a 2x2 matrix of floating-point values {@code count} times into a uniform location defined as a matrix or an array of matrices. - * - * @param location the uniform variable location - * @param transpose if {@link GL11#GL_FALSE FALSE}, the matrix is specified in column major order, otherwise in row major order - * @param value the matrix values to load - */ - public static void glUniformMatrix2fvARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix2fvARB(location, value.remaining() >> 2, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix3fvARB ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3fvARB UniformMatrix3fvARB} - * - * @param count the number of 3x3 matrices to load - */ - public static native void nglUniformMatrix3fvARB(int location, int count, boolean transpose, long value); - - /** - * Loads a 3x3 matrix of floating-point values {@code count} times into a uniform location defined as a matrix or an array of matrices. - * - * @param location the uniform variable location - * @param transpose if {@link GL11#GL_FALSE FALSE}, the matrix is specified in column major order, otherwise in row major order - * @param value the matrix values to load - */ - public static void glUniformMatrix3fvARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix3fvARB(location, value.remaining() / 9, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix4fvARB ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4fvARB UniformMatrix4fvARB} - * - * @param count the number of 4x4 matrices to load - */ - public static native void nglUniformMatrix4fvARB(int location, int count, boolean transpose, long value); - - /** - * Loads a 4x4 matrix of floating-point values {@code count} times into a uniform location defined as a matrix or an array of matrices. - * - * @param location the uniform variable location - * @param transpose if {@link GL11#GL_FALSE FALSE}, the matrix is specified in column major order, otherwise in row major order - * @param value the matrix values to load - */ - public static void glUniformMatrix4fvARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix4fvARB(location, value.remaining() >> 4, transpose, memAddress(value)); - } - - // --- [ glGetObjectParameterfvARB ] --- - - /** Unsafe version of: {@link #glGetObjectParameterfvARB GetObjectParameterfvARB} */ - public static native void nglGetObjectParameterfvARB(int obj, int pname, long params); - - /** - * Returns object specific parameter values. - * - * @param obj the object to query - * @param pname the parameter to query - * @param params a buffer in which to return the parameter value - */ - public static void glGetObjectParameterfvARB(@NativeType("GLhandleARB") int obj, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetObjectParameterfvARB(obj, pname, memAddress(params)); - } - - // --- [ glGetObjectParameterivARB ] --- - - /** Unsafe version of: {@link #glGetObjectParameterivARB GetObjectParameterivARB} */ - public static native void nglGetObjectParameterivARB(int obj, int pname, long params); - - /** - * Returns object specific parameter values. - * - * @param obj the object to query - * @param pname the parameter to query. One of:
    {@link #GL_OBJECT_TYPE_ARB OBJECT_TYPE_ARB}{@link #GL_OBJECT_SUBTYPE_ARB OBJECT_SUBTYPE_ARB}{@link #GL_OBJECT_DELETE_STATUS_ARB OBJECT_DELETE_STATUS_ARB}
    {@link #GL_OBJECT_COMPILE_STATUS_ARB OBJECT_COMPILE_STATUS_ARB}{@link #GL_OBJECT_LINK_STATUS_ARB OBJECT_LINK_STATUS_ARB}{@link #GL_OBJECT_VALIDATE_STATUS_ARB OBJECT_VALIDATE_STATUS_ARB}
    {@link #GL_OBJECT_INFO_LOG_LENGTH_ARB OBJECT_INFO_LOG_LENGTH_ARB}{@link #GL_OBJECT_ATTACHED_OBJECTS_ARB OBJECT_ATTACHED_OBJECTS_ARB}{@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB}
    {@link #GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB}{@link #GL_OBJECT_SHADER_SOURCE_LENGTH_ARB OBJECT_SHADER_SOURCE_LENGTH_ARB}
    - * @param params a buffer in which to return the parameter value - */ - public static void glGetObjectParameterivARB(@NativeType("GLhandleARB") int obj, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetObjectParameterivARB(obj, pname, memAddress(params)); - } - - /** - * Returns object specific parameter values. - * - * @param obj the object to query - * @param pname the parameter to query. One of:
    {@link #GL_OBJECT_TYPE_ARB OBJECT_TYPE_ARB}{@link #GL_OBJECT_SUBTYPE_ARB OBJECT_SUBTYPE_ARB}{@link #GL_OBJECT_DELETE_STATUS_ARB OBJECT_DELETE_STATUS_ARB}
    {@link #GL_OBJECT_COMPILE_STATUS_ARB OBJECT_COMPILE_STATUS_ARB}{@link #GL_OBJECT_LINK_STATUS_ARB OBJECT_LINK_STATUS_ARB}{@link #GL_OBJECT_VALIDATE_STATUS_ARB OBJECT_VALIDATE_STATUS_ARB}
    {@link #GL_OBJECT_INFO_LOG_LENGTH_ARB OBJECT_INFO_LOG_LENGTH_ARB}{@link #GL_OBJECT_ATTACHED_OBJECTS_ARB OBJECT_ATTACHED_OBJECTS_ARB}{@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB}
    {@link #GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB}{@link #GL_OBJECT_SHADER_SOURCE_LENGTH_ARB OBJECT_SHADER_SOURCE_LENGTH_ARB}
    - */ - @NativeType("void") - public static int glGetObjectParameteriARB(@NativeType("GLhandleARB") int obj, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetObjectParameterivARB(obj, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetInfoLogARB ] --- - - /** - * Unsafe version of: {@link #glGetInfoLogARB GetInfoLogARB} - * - * @param maxLength the maximum number of characters the GL is allowed to write into {@code infoLog} - */ - public static native void nglGetInfoLogARB(int obj, int maxLength, long length, long infoLog); - - /** - * A string that contains information about the last link or validation attempt and last compilation attempt are kept per program or shader object. This - * string is called the info log and can be obtained with this command. - * - *

    This string will be null terminated. The number of characters in the info log is given by {@link #GL_OBJECT_INFO_LOG_LENGTH_ARB OBJECT_INFO_LOG_LENGTH_ARB}, which can be queried with - * {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code obj} is a shader object, the returned info log will either be an empty string or it will contain - * information about the last compilation attempt for that object. If {@code obj} is a program object, the returned info log will either be an empty string - * or it will contain information about the last link attempt or last validation attempt for that object. If {@code obj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB} - * or {@link #GL_SHADER_OBJECT_ARB SHADER_OBJECT_ARB}, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If an error occurred, the return parameters {@code length} and {@code infoLog} - * will be unmodified.

    - * - *

    The info log is typically only useful during application development and an application should not expect different OpenGL implementations to produce - * identical info logs.

    - * - * @param obj the shader object to query - * @param length the actual number of characters written by the GL into {@code infoLog} is returned in {@code length}, excluding the null termination. If - * {@code length} is {@code NULL} then the GL ignores this parameter. - * @param infoLog a buffer in which to return the info log - */ - public static void glGetInfoLogARB(@NativeType("GLhandleARB") int obj, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLcharARB *") ByteBuffer infoLog) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetInfoLogARB(obj, infoLog.remaining(), memAddressSafe(length), memAddress(infoLog)); - } - - /** - * A string that contains information about the last link or validation attempt and last compilation attempt are kept per program or shader object. This - * string is called the info log and can be obtained with this command. - * - *

    This string will be null terminated. The number of characters in the info log is given by {@link #GL_OBJECT_INFO_LOG_LENGTH_ARB OBJECT_INFO_LOG_LENGTH_ARB}, which can be queried with - * {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code obj} is a shader object, the returned info log will either be an empty string or it will contain - * information about the last compilation attempt for that object. If {@code obj} is a program object, the returned info log will either be an empty string - * or it will contain information about the last link attempt or last validation attempt for that object. If {@code obj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB} - * or {@link #GL_SHADER_OBJECT_ARB SHADER_OBJECT_ARB}, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If an error occurred, the return parameters {@code length} and {@code infoLog} - * will be unmodified.

    - * - *

    The info log is typically only useful during application development and an application should not expect different OpenGL implementations to produce - * identical info logs.

    - * - * @param obj the shader object to query - * @param maxLength the maximum number of characters the GL is allowed to write into {@code infoLog} - */ - @NativeType("void") - public static String glGetInfoLogARB(@NativeType("GLhandleARB") int obj, @NativeType("GLsizei") int maxLength) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - ByteBuffer infoLog = memAlloc(maxLength); - try { - IntBuffer length = stack.ints(0); - nglGetInfoLogARB(obj, maxLength, memAddress(length), memAddress(infoLog)); - return memUTF8(infoLog, length.get(0)); - } finally { - memFree(infoLog); - stack.setPointer(stackPointer); - } - } - - /** - * A string that contains information about the last link or validation attempt and last compilation attempt are kept per program or shader object. This - * string is called the info log and can be obtained with this command. - * - *

    This string will be null terminated. The number of characters in the info log is given by {@link #GL_OBJECT_INFO_LOG_LENGTH_ARB OBJECT_INFO_LOG_LENGTH_ARB}, which can be queried with - * {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code obj} is a shader object, the returned info log will either be an empty string or it will contain - * information about the last compilation attempt for that object. If {@code obj} is a program object, the returned info log will either be an empty string - * or it will contain information about the last link attempt or last validation attempt for that object. If {@code obj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB} - * or {@link #GL_SHADER_OBJECT_ARB SHADER_OBJECT_ARB}, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If an error occurred, the return parameters {@code length} and {@code infoLog} - * will be unmodified.

    - * - *

    The info log is typically only useful during application development and an application should not expect different OpenGL implementations to produce - * identical info logs.

    - * - * @param obj the shader object to query - */ - @NativeType("void") - public static String glGetInfoLogARB(@NativeType("GLhandleARB") int obj) { - return glGetInfoLogARB(obj, glGetObjectParameteriARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB)); - } - - // --- [ glGetAttachedObjectsARB ] --- - - /** - * Unsafe version of: {@link #glGetAttachedObjectsARB GetAttachedObjectsARB} - * - * @param maxCount the maximum number of handles the GL is allowed to write into {@code obj} - */ - public static native void nglGetAttachedObjectsARB(int containerObj, int maxCount, long count, long obj); - - /** - * Returns the handles of objects attached to {@code containerObj} in {@code obj}. . The number of objects attached to {@code containerObj} is given by - * {@link #GL_OBJECT_ATTACHED_OBJECTS_ARB OBJECT_ATTACHED_OBJECTS_ARB}, which can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code containerObj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB}, the - * error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If an error occurred, the return parameters {@code count} and {@code obj} will be unmodified. - * - * @param containerObj the container object to query - * @param count a buffer in which to return the actual number of object handles written by the GL into {@code obj}. If {@code NULL} then the GL ignores this parameter. - * @param obj a buffer in which to return the attached object handles - */ - public static void glGetAttachedObjectsARB(@NativeType("GLhandleARB") int containerObj, @Nullable @NativeType("GLsizei *") IntBuffer count, @NativeType("GLhandleARB *") IntBuffer obj) { - if (CHECKS) { - checkSafe(count, 1); - } - nglGetAttachedObjectsARB(containerObj, obj.remaining(), memAddressSafe(count), memAddress(obj)); - } - - // --- [ glGetUniformLocationARB ] --- - - /** Unsafe version of: {@link #glGetUniformLocationARB GetUniformLocationARB} */ - public static native int nglGetUniformLocationARB(int programObj, long name); - - /** - * Returns the location of uniform variable {@code name}. {@code name} has to be a null terminated string, without white space. The value of -1 will be - * returned if {@code name} does not correspond to an active uniform variable name in {@code programObj} or if {@code name} starts with the reserved prefix - * "gl_". If {@code programObj} has not been successfully linked, or if {@code programObj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. The location of a uniform variable does not change until the next link command is issued. - * - *

    A valid {@code name} cannot be a structure, an array of structures, or a subcomponent of a vector or a matrix. In order to identify a valid {@code name}, - * the "." (dot) and "[]" operators can be used in {@code name} to operate on a structure or to operate on an array.

    - * - *

    The first element of a uniform array is identified using the name of the uniform array appended with "[0]". Except if the last part of the string - * {@code name} indicates a uniform array, then the location of the first element of that array can be retrieved by either using the name of the uniform - * array, or the name of the uniform array appended with "[0]".

    - * - * @param programObj the program object to query - * @param name the name of the uniform variable whose location is to be queried - */ - @NativeType("GLint") - public static int glGetUniformLocationARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLcharARB const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetUniformLocationARB(programObj, memAddress(name)); - } - - /** - * Returns the location of uniform variable {@code name}. {@code name} has to be a null terminated string, without white space. The value of -1 will be - * returned if {@code name} does not correspond to an active uniform variable name in {@code programObj} or if {@code name} starts with the reserved prefix - * "gl_". If {@code programObj} has not been successfully linked, or if {@code programObj} is not of type {@link #GL_PROGRAM_OBJECT_ARB PROGRAM_OBJECT_ARB}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. The location of a uniform variable does not change until the next link command is issued. - * - *

    A valid {@code name} cannot be a structure, an array of structures, or a subcomponent of a vector or a matrix. In order to identify a valid {@code name}, - * the "." (dot) and "[]" operators can be used in {@code name} to operate on a structure or to operate on an array.

    - * - *

    The first element of a uniform array is identified using the name of the uniform array appended with "[0]". Except if the last part of the string - * {@code name} indicates a uniform array, then the location of the first element of that array can be retrieved by either using the name of the uniform - * array, or the name of the uniform array appended with "[0]".

    - * - * @param programObj the program object to query - * @param name the name of the uniform variable whose location is to be queried - */ - @NativeType("GLint") - public static int glGetUniformLocationARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLcharARB const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetUniformLocationARB(programObj, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveUniformARB ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformARB GetActiveUniformARB} - * - * @param maxLength the maximum number of characters the GL is allowed to write into {@code name}. - */ - public static native void nglGetActiveUniformARB(int programObj, int index, int maxLength, long length, long size, long type, long name); - - /** - * Determines which of the declared uniform variables are active and their sizes and types. - * - *

    This command provides information about the uniform selected by {@code index}. The {@code index} of 0 selects the first active uniform, and - * {@code index} of {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB} - 1 selects the last active uniform. The value of {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB} can be queried with - * {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code index} is greater than or equal to {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB}, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated.

    - * - *

    If an error occurred, the return parameters {@code length}, {@code size}, {@code type} and {@code name} will be unmodified.

    - * - *

    The returned uniform name can be the name of built-in uniform state as well. The length of the longest uniform name in {@code programObj} is given by - * {@link #GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB}, which can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}.

    - * - *

    Each uniform variable, declared in a shader, is broken down into one or more strings using the "." (dot) and "[]" operators, if necessary, to the point - * that it is legal to pass each string back into {@link #glGetUniformLocationARB GetUniformLocationARB}. Each of these strings constitutes one active uniform, and each string is - * assigned an index.

    - * - *

    If one or more elements of an array are active, GetActiveUniformARB will return the name of the array in {@code name}, subject to the restrictions - * listed above. The type of the array is returned in {@code type}. The {@code size} parameter contains the highest array element index used, plus one. The - * compiler or linker determines the highest index used. There will be only one active uniform reported by the GL per uniform array.

    - * - *

    This command will return as much information about active uniforms as possible. If no information is available, {@code length} will be set to zero and - * {@code name} will be an empty string. This situation could arise if GetActiveUniformARB is issued after a failed link.

    - * - * @param programObj a handle to a program object for which the command {@link #glLinkProgramARB LinkProgramARB} has been issued in the past. It is not necessary for {@code programObj} to have - * been linked successfully. The link could have failed because the number of active uniforms exceeded the limit. - * @param index the uniform index - * @param length a buffer in which to return the actual number of characters written by the GL into {@code name}. This count excludes the null termination. If - * {@code length} is {@code NULL} then the GL ignores this parameter. - * @param size a buffer in which to return the uniform size. The size is in units of the type returned in {@code type}. - * @param type a buffer in which to return the uniform type - * @param name a buffer in which to return the uniform name - */ - public static void glGetActiveUniformARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLcharARB *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - nglGetActiveUniformARB(programObj, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); - } - - /** - * Determines which of the declared uniform variables are active and their sizes and types. - * - *

    This command provides information about the uniform selected by {@code index}. The {@code index} of 0 selects the first active uniform, and - * {@code index} of {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB} - 1 selects the last active uniform. The value of {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB} can be queried with - * {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code index} is greater than or equal to {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB}, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated.

    - * - *

    If an error occurred, the return parameters {@code length}, {@code size}, {@code type} and {@code name} will be unmodified.

    - * - *

    The returned uniform name can be the name of built-in uniform state as well. The length of the longest uniform name in {@code programObj} is given by - * {@link #GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB}, which can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}.

    - * - *

    Each uniform variable, declared in a shader, is broken down into one or more strings using the "." (dot) and "[]" operators, if necessary, to the point - * that it is legal to pass each string back into {@link #glGetUniformLocationARB GetUniformLocationARB}. Each of these strings constitutes one active uniform, and each string is - * assigned an index.

    - * - *

    If one or more elements of an array are active, GetActiveUniformARB will return the name of the array in {@code name}, subject to the restrictions - * listed above. The type of the array is returned in {@code type}. The {@code size} parameter contains the highest array element index used, plus one. The - * compiler or linker determines the highest index used. There will be only one active uniform reported by the GL per uniform array.

    - * - *

    This command will return as much information about active uniforms as possible. If no information is available, {@code length} will be set to zero and - * {@code name} will be an empty string. This situation could arise if GetActiveUniformARB is issued after a failed link.

    - * - * @param programObj a handle to a program object for which the command {@link #glLinkProgramARB LinkProgramARB} has been issued in the past. It is not necessary for {@code programObj} to have - * been linked successfully. The link could have failed because the number of active uniforms exceeded the limit. - * @param index the uniform index - * @param maxLength the maximum number of characters the GL is allowed to write into {@code name}. - * @param size a buffer in which to return the uniform size. The size is in units of the type returned in {@code type}. - * @param type a buffer in which to return the uniform type - */ - @NativeType("void") - public static String glGetActiveUniformARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @NativeType("GLsizei") int maxLength, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - if (CHECKS) { - check(size, 1); - check(type, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(maxLength); - nglGetActiveUniformARB(programObj, index, maxLength, memAddress(length), memAddress(size), memAddress(type), memAddress(name)); - return memUTF8(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Determines which of the declared uniform variables are active and their sizes and types. - * - *

    This command provides information about the uniform selected by {@code index}. The {@code index} of 0 selects the first active uniform, and - * {@code index} of {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB} - 1 selects the last active uniform. The value of {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB} can be queried with - * {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code index} is greater than or equal to {@link #GL_OBJECT_ACTIVE_UNIFORMS_ARB OBJECT_ACTIVE_UNIFORMS_ARB}, the error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated.

    - * - *

    If an error occurred, the return parameters {@code length}, {@code size}, {@code type} and {@code name} will be unmodified.

    - * - *

    The returned uniform name can be the name of built-in uniform state as well. The length of the longest uniform name in {@code programObj} is given by - * {@link #GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB}, which can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}.

    - * - *

    Each uniform variable, declared in a shader, is broken down into one or more strings using the "." (dot) and "[]" operators, if necessary, to the point - * that it is legal to pass each string back into {@link #glGetUniformLocationARB GetUniformLocationARB}. Each of these strings constitutes one active uniform, and each string is - * assigned an index.

    - * - *

    If one or more elements of an array are active, GetActiveUniformARB will return the name of the array in {@code name}, subject to the restrictions - * listed above. The type of the array is returned in {@code type}. The {@code size} parameter contains the highest array element index used, plus one. The - * compiler or linker determines the highest index used. There will be only one active uniform reported by the GL per uniform array.

    - * - *

    This command will return as much information about active uniforms as possible. If no information is available, {@code length} will be set to zero and - * {@code name} will be an empty string. This situation could arise if GetActiveUniformARB is issued after a failed link.

    - * - * @param programObj a handle to a program object for which the command {@link #glLinkProgramARB LinkProgramARB} has been issued in the past. It is not necessary for {@code programObj} to have - * been linked successfully. The link could have failed because the number of active uniforms exceeded the limit. - * @param index the uniform index - * @param size a buffer in which to return the uniform size. The size is in units of the type returned in {@code type}. - * @param type a buffer in which to return the uniform type - */ - @NativeType("void") - public static String glGetActiveUniformARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetActiveUniformARB(programObj, index, glGetObjectParameteriARB(programObj, GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB), size, type); - } - - // --- [ glGetUniformfvARB ] --- - - /** Unsafe version of: {@link #glGetUniformfvARB GetUniformfvARB} */ - public static native void nglGetUniformfvARB(int programObj, int location, long params); - - /** - * Returns the floating-point value or values of a uniform. - * - * @param programObj the program object to query - * @param location the uniform variable location - * @param params a buffer in which to return the uniform values - */ - public static void glGetUniformfvARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformfvARB(programObj, location, memAddress(params)); - } - - /** - * Returns the floating-point value or values of a uniform. - * - * @param programObj the program object to query - * @param location the uniform variable location - */ - @NativeType("void") - public static float glGetUniformfARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetUniformfvARB(programObj, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetUniformivARB ] --- - - /** Unsafe version of: {@link #glGetUniformivARB GetUniformivARB} */ - public static native void nglGetUniformivARB(int programObj, int location, long params); - - /** - * Returns the integer value or values of a uniform. - * - * @param programObj the program object to query - * @param location the uniform variable location - * @param params a buffer in which to return the uniform values - */ - public static void glGetUniformivARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformivARB(programObj, location, memAddress(params)); - } - - /** - * Returns the integer value or values of a uniform. - * - * @param programObj the program object to query - * @param location the uniform variable location - */ - @NativeType("void") - public static int glGetUniformiARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetUniformivARB(programObj, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetShaderSourceARB ] --- - - /** - * Unsafe version of: {@link #glGetShaderSourceARB GetShaderSourceARB} - * - * @param maxLength the maximum number of characters the GL is allowed to write into {@code source} - */ - public static native void nglGetShaderSourceARB(int obj, int maxLength, long length, long source); - - /** - * Returns the string making up the source code for a shader object. - * - *

    The string {@code source} is a concatenation of the strings passed to OpenGL using {@link #glShaderSourceARB ShaderSourceARB}. The length of this concatenation is given by - * {@link #GL_OBJECT_SHADER_SOURCE_LENGTH_ARB OBJECT_SHADER_SOURCE_LENGTH_ARB}, which can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code obj} is not of type {@link #GL_SHADER_OBJECT_ARB SHADER_OBJECT_ARB}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If an error occurred, the return parameters {@code length} and {@code source} will be unmodified.

    - * - * @param obj the shader object to query - * @param length a buffer in which to return the actual number of characters written by the GL into {@code source}, excluding the null termination. If - * {@code length} is {@code NULL} then the GL ignores this parameter. - * @param source a buffer in which to return the shader object source - */ - public static void glGetShaderSourceARB(@NativeType("GLhandleARB") int obj, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLcharARB *") ByteBuffer source) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetShaderSourceARB(obj, source.remaining(), memAddressSafe(length), memAddress(source)); - } - - /** - * Returns the string making up the source code for a shader object. - * - *

    The string {@code source} is a concatenation of the strings passed to OpenGL using {@link #glShaderSourceARB ShaderSourceARB}. The length of this concatenation is given by - * {@link #GL_OBJECT_SHADER_SOURCE_LENGTH_ARB OBJECT_SHADER_SOURCE_LENGTH_ARB}, which can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code obj} is not of type {@link #GL_SHADER_OBJECT_ARB SHADER_OBJECT_ARB}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If an error occurred, the return parameters {@code length} and {@code source} will be unmodified.

    - * - * @param obj the shader object to query - * @param maxLength the maximum number of characters the GL is allowed to write into {@code source} - */ - @NativeType("void") - public static String glGetShaderSourceARB(@NativeType("GLhandleARB") int obj, @NativeType("GLsizei") int maxLength) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - ByteBuffer source = memAlloc(maxLength); - try { - IntBuffer length = stack.ints(0); - nglGetShaderSourceARB(obj, maxLength, memAddress(length), memAddress(source)); - return memUTF8(source, length.get(0)); - } finally { - memFree(source); - stack.setPointer(stackPointer); - } - } - - /** - * Returns the string making up the source code for a shader object. - * - *

    The string {@code source} is a concatenation of the strings passed to OpenGL using {@link #glShaderSourceARB ShaderSourceARB}. The length of this concatenation is given by - * {@link #GL_OBJECT_SHADER_SOURCE_LENGTH_ARB OBJECT_SHADER_SOURCE_LENGTH_ARB}, which can be queried with {@link #glGetObjectParameterivARB GetObjectParameterivARB}. If {@code obj} is not of type {@link #GL_SHADER_OBJECT_ARB SHADER_OBJECT_ARB}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. If an error occurred, the return parameters {@code length} and {@code source} will be unmodified.

    - * - * @param obj the shader object to query - */ - @NativeType("void") - public static String glGetShaderSourceARB(@NativeType("GLhandleARB") int obj) { - return glGetShaderSourceARB(obj, glGetObjectParameteriARB(obj, GL_OBJECT_SHADER_SOURCE_LENGTH_ARB)); - } - - /** Array version of: {@link #glShaderSourceARB ShaderSourceARB} */ - public static void glShaderSourceARB(@NativeType("GLhandleARB") int shaderObj, @NativeType("GLcharARB const **") PointerBuffer string, @Nullable @NativeType("GLint const *") int[] length) { - long __functionAddress = GL.getICD().glShaderSourceARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, string.remaining()); - } - callPPV(shaderObj, string.remaining(), memAddress(string), length, __functionAddress); - } - - /** Array version of: {@link #glUniform1fvARB Uniform1fvARB} */ - public static void glUniform1fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform1fvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glUniform2fvARB Uniform2fvARB} */ - public static void glUniform2fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform2fvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glUniform3fvARB Uniform3fvARB} */ - public static void glUniform3fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform3fvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glUniform4fvARB Uniform4fvARB} */ - public static void glUniform4fvARB(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform4fvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glUniform1ivARB Uniform1ivARB} */ - public static void glUniform1ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform1ivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glUniform2ivARB Uniform2ivARB} */ - public static void glUniform2ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform2ivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glUniform3ivARB Uniform3ivARB} */ - public static void glUniform3ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform3ivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glUniform4ivARB Uniform4ivARB} */ - public static void glUniform4ivARB(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform4ivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glUniformMatrix2fvARB UniformMatrix2fvARB} */ - public static void glUniformMatrix2fvARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix2fvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glUniformMatrix3fvARB UniformMatrix3fvARB} */ - public static void glUniformMatrix3fvARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix3fvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 9, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glUniformMatrix4fvARB UniformMatrix4fvARB} */ - public static void glUniformMatrix4fvARB(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix4fvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 4, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glGetObjectParameterfvARB GetObjectParameterfvARB} */ - public static void glGetObjectParameterfvARB(@NativeType("GLhandleARB") int obj, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetObjectParameterfvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(obj, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetObjectParameterivARB GetObjectParameterivARB} */ - public static void glGetObjectParameterivARB(@NativeType("GLhandleARB") int obj, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetObjectParameterivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(obj, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetInfoLogARB GetInfoLogARB} */ - public static void glGetInfoLogARB(@NativeType("GLhandleARB") int obj, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLcharARB *") ByteBuffer infoLog) { - long __functionAddress = GL.getICD().glGetInfoLogARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(obj, infoLog.remaining(), length, memAddress(infoLog), __functionAddress); - } - - /** Array version of: {@link #glGetAttachedObjectsARB GetAttachedObjectsARB} */ - public static void glGetAttachedObjectsARB(@NativeType("GLhandleARB") int containerObj, @Nullable @NativeType("GLsizei *") int[] count, @NativeType("GLhandleARB *") int[] obj) { - long __functionAddress = GL.getICD().glGetAttachedObjectsARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(count, 1); - } - callPPV(containerObj, obj.length, count, obj, __functionAddress); - } - - /** Array version of: {@link #glGetActiveUniformARB GetActiveUniformARB} */ - public static void glGetActiveUniformARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLcharARB *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetActiveUniformARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - callPPPPV(programObj, index, name.remaining(), length, size, type, memAddress(name), __functionAddress); - } - - /** Array version of: {@link #glGetUniformfvARB GetUniformfvARB} */ - public static void glGetUniformfvARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetUniformfvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(programObj, location, params, __functionAddress); - } - - /** Array version of: {@link #glGetUniformivARB GetUniformivARB} */ - public static void glGetUniformivARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetUniformivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(programObj, location, params, __functionAddress); - } - - /** Array version of: {@link #glGetShaderSourceARB GetShaderSourceARB} */ - public static void glGetShaderSourceARB(@NativeType("GLhandleARB") int obj, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLcharARB *") ByteBuffer source) { - long __functionAddress = GL.getICD().glGetShaderSourceARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(obj, source.remaining(), length, memAddress(source), __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderStorageBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderStorageBufferObject.java deleted file mode 100644 index 0b3961a8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderStorageBufferObject.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_shader_storage_buffer_object extension. - * - *

    This extension provides the ability for OpenGL shaders to perform random access reads, writes, and atomic memory operations on variables stored in a - * buffer object. Application shader code can declare sets of variables (referred to as "buffer variables") arranged into interface blocks in a manner - * similar to that done with uniform blocks in OpenGL 3.1. In both cases, the values of the variables declared in a given interface block are taken from a - * buffer object bound to a binding point associated with the block. Buffer objects used in this extension are referred to as "shader storage buffers".

    - * - *

    While the capability provided by this extension is similar to that provided by OpenGL 3.1 and {@link ARBUniformBufferObject ARB_uniform_buffer_object}, there are several - * significant differences. Most importantly, shader code is allowed to write to shader storage buffers, while uniform buffers are always read-only. Shader - * storage buffers have a separate set of binding points, with different counts and size limits. The maximum usable size for shader storage buffers is - * implementation-dependent, but its minimum value is substantially larger than the minimum for uniform buffers.

    - * - *

    The ability to write to buffer objects creates the potential for multiple independent shader invocations to read and write the same underlying memory. - * The same issue exists with the {@link ARBShaderImageLoadStore ARB_shader_image_load_store} extension provided in OpenGL 4.2, which can write to texture objects and buffers. In - * both cases, the specification makes few guarantees related to the relative order of memory reads and writes performed by the shader invocations. For - * ARB_shader_image_load_store, the OpenGL API and shading language do provide some control over memory transactions; those mechanisms also affect reads - * and writes of shader storage buffers. In the OpenGL API, the {@link GL42C#glMemoryBarrier MemoryBarrier} call can be used to ensure that certain memory operations related to - * commands issued prior the barrier complete before other operations related to commands issued after the barrier. Additionally, the shading language - * provides the {@code memoryBarrier()} function to control the relative order of memory accesses within individual shader invocations and provides - * various memory qualifiers controlling how the memory corresponding to individual variables is accessed.

    - * - *

    Requires {@link GL40 OpenGL 4.0} and {@link GL43 OpenGL 4.3} or {@link ARBProgramInterfaceQuery ARB_program_interface_query}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBShaderStorageBufferObject { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_SHADER_STORAGE_BUFFER = 0x90D2; - - /** - * Accepted by the {@code pname} parameter of GetIntegerv, GetIntegeri_v, GetBooleanv, GetInteger64v, GetFloatv, GetDoublev, GetBooleani_v, GetIntegeri_v, - * GetFloati_v, GetDoublei_v, and GetInteger64i_v. - */ - public static final int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. */ - public static final int - GL_SHADER_STORAGE_BUFFER_START = 0x90D4, - GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, - GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, - GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, - GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, - GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, - GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, - GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, - GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, - GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, - GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; - - /** Accepted in the {@code barriers} bitfield in glMemoryBarrier. */ - public static final int GL_SHADER_STORAGE_BARRIER_BIT = 0x2000; - - /** Also, add a new alias for the existing token MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS. */ - public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; - - protected ARBShaderStorageBufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glShaderStorageBlockBinding ] --- - - /** - * Changes an active shader storage block binding. - * - * @param program the name of the program containing the block whose binding to change - * @param storageBlockIndex the index storage block within the program - * @param storageBlockBinding the index storage block binding to associate with the specified storage block - */ - public static void glShaderStorageBlockBinding(@NativeType("GLuint") int program, @NativeType("GLuint") int storageBlockIndex, @NativeType("GLuint") int storageBlockBinding) { - GL43C.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderSubroutine.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderSubroutine.java deleted file mode 100644 index a9b44b55..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShaderSubroutine.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_shader_subroutine extension. - * - *

    This extension adds support to shaders for "indirect subroutine calls", where a single shader can include many subroutines and dynamically select - * through the API which subroutine is called from each call site. Switching subroutines dynamically in this fashion can avoid the cost of recompiling and - * managing multiple shaders, while still retaining most of the performance of specialized shaders.

    - * - *

    Requires {@link ARBGPUShader5 ARB_gpu_shader5}. Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public class ARBShaderSubroutine { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetProgramStageiv. */ - public static final int - GL_ACTIVE_SUBROUTINES = 0x8DE5, - GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6, - GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47, - GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48, - GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_SUBROUTINES = 0x8DE7, - GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; - - /** Accepted by the {@code pname} parameter of GetActiveSubroutineUniformiv. */ - public static final int - GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A, - GL_COMPATIBLE_SUBROUTINES = 0x8E4B; - - protected ARBShaderSubroutine() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetSubroutineUniformLocation ] --- - - /** Unsafe version of: {@link #glGetSubroutineUniformLocation GetSubroutineUniformLocation} */ - public static int nglGetSubroutineUniformLocation(int program, int shadertype, long name) { - return GL40C.nglGetSubroutineUniformLocation(program, shadertype, name); - } - - /** - * Retrieves the location of a subroutine uniform of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine uniform whose index to query. - */ - @NativeType("GLint") - public static int glGetSubroutineUniformLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") ByteBuffer name) { - return GL40C.glGetSubroutineUniformLocation(program, shadertype, name); - } - - /** - * Retrieves the location of a subroutine uniform of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine uniform whose index to query. - */ - @NativeType("GLint") - public static int glGetSubroutineUniformLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") CharSequence name) { - return GL40C.glGetSubroutineUniformLocation(program, shadertype, name); - } - - // --- [ glGetSubroutineIndex ] --- - - /** Unsafe version of: {@link #glGetSubroutineIndex GetSubroutineIndex} */ - public static int nglGetSubroutineIndex(int program, int shadertype, long name) { - return GL40C.nglGetSubroutineIndex(program, shadertype, name); - } - - /** - * Retrieves the index of a subroutine function of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine function index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine function whose index to query - */ - @NativeType("GLuint") - public static int glGetSubroutineIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") ByteBuffer name) { - return GL40C.glGetSubroutineIndex(program, shadertype, name); - } - - /** - * Retrieves the index of a subroutine function of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine function index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine function whose index to query - */ - @NativeType("GLuint") - public static int glGetSubroutineIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") CharSequence name) { - return GL40C.glGetSubroutineIndex(program, shadertype, name); - } - - // --- [ glGetActiveSubroutineUniformiv ] --- - - /** Unsafe version of: {@link #glGetActiveSubroutineUniformiv GetActiveSubroutineUniformiv} */ - public static void nglGetActiveSubroutineUniformiv(int program, int shadertype, int index, int pname, long values) { - GL40C.nglGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); - } - - /** - * Queries a property of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param pname the parameter of the shader subroutine uniform to query. One of:
    {@link GL40C#GL_NUM_COMPATIBLE_SUBROUTINES NUM_COMPATIBLE_SUBROUTINES}{@link GL40C#GL_COMPATIBLE_SUBROUTINES COMPATIBLE_SUBROUTINES}{@link GL31#GL_UNIFORM_SIZE UNIFORM_SIZE}{@link GL31#GL_UNIFORM_NAME_LENGTH UNIFORM_NAME_LENGTH}
    - * @param values the address of a buffer into which the queried value or values will be placed - */ - public static void glGetActiveSubroutineUniformiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer values) { - GL40C.glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); - } - - /** - * Queries a property of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param pname the parameter of the shader subroutine uniform to query. One of:
    {@link GL40C#GL_NUM_COMPATIBLE_SUBROUTINES NUM_COMPATIBLE_SUBROUTINES}{@link GL40C#GL_COMPATIBLE_SUBROUTINES COMPATIBLE_SUBROUTINES}{@link GL31#GL_UNIFORM_SIZE UNIFORM_SIZE}{@link GL31#GL_UNIFORM_NAME_LENGTH UNIFORM_NAME_LENGTH}
    - */ - @NativeType("void") - public static int glGetActiveSubroutineUniformi(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL40C.glGetActiveSubroutineUniformi(program, shadertype, index, pname); - } - - // --- [ glGetActiveSubroutineUniformName ] --- - - /** - * Unsafe version of: {@link #glGetActiveSubroutineUniformName GetActiveSubroutineUniformName} - * - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - public static void nglGetActiveSubroutineUniformName(int program, int shadertype, int index, int bufsize, long length, long name) { - GL40C.nglGetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name); - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param length the address of a variable into which is written the number of characters copied into {@code name} - * @param name the address of a buffer that will receive the name of the specified shader subroutine uniform - */ - public static void glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - @NativeType("void") - public static String glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufsize) { - return GL40C.glGetActiveSubroutineUniformName(program, shadertype, index, bufsize); - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - */ - @NativeType("void") - public static String glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index) { - return glGetActiveSubroutineUniformName(program, shadertype, index, glGetActiveSubroutineUniformi(program, shadertype, index, GL31.GL_UNIFORM_NAME_LENGTH)); - } - - // --- [ glGetActiveSubroutineName ] --- - - /** - * Unsafe version of: {@link #glGetActiveSubroutineName GetActiveSubroutineName} - * - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - public static void nglGetActiveSubroutineName(int program, int shadertype, int index, int bufsize, long length, long name) { - GL40C.nglGetActiveSubroutineName(program, shadertype, index, bufsize, length, name); - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param length a variable which is to receive the length of the shader subroutine uniform name - * @param name an array into which the name of the shader subroutine uniform will be written - */ - public static void glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineName(program, shadertype, index, length, name); - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - @NativeType("void") - public static String glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufsize) { - return GL40C.glGetActiveSubroutineName(program, shadertype, index, bufsize); - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - */ - @NativeType("void") - public static String glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index) { - return glGetActiveSubroutineName(program, shadertype, index, glGetProgramStagei(program, shadertype, GL_ACTIVE_SUBROUTINE_MAX_LENGTH)); - } - - // --- [ glUniformSubroutinesuiv ] --- - - /** - * Unsafe version of: {@link #glUniformSubroutinesuiv UniformSubroutinesuiv} - * - * @param count the number of uniform indices stored in {@code indices} - */ - public static void nglUniformSubroutinesuiv(int shadertype, int count, long indices) { - GL40C.nglUniformSubroutinesuiv(shadertype, count, indices); - } - - /** - * Loads active subroutine uniforms. - * - * @param shadertype the shader stage to update. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param indices an array holding the indices to load into the shader subroutine variables - */ - public static void glUniformSubroutinesuiv(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") IntBuffer indices) { - GL40C.glUniformSubroutinesuiv(shadertype, indices); - } - - /** - * Loads active subroutine uniforms. - * - * @param shadertype the shader stage to update. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - */ - public static void glUniformSubroutinesui(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") int index) { - GL40C.glUniformSubroutinesui(shadertype, index); - } - - // --- [ glGetUniformSubroutineuiv ] --- - - /** Unsafe version of: {@link #glGetUniformSubroutineuiv GetUniformSubroutineuiv} */ - public static void nglGetUniformSubroutineuiv(int shadertype, int location, long params) { - GL40C.nglGetUniformSubroutineuiv(shadertype, location, params); - } - - /** - * Retrieves the value of a subroutine uniform of a given shader stage of the current program. - * - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param location the location of the subroutine uniform - * @param params a variable to receive the value or values of the subroutine uniform - */ - public static void glGetUniformSubroutineuiv(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - GL40C.glGetUniformSubroutineuiv(shadertype, location, params); - } - - /** - * Retrieves the value of a subroutine uniform of a given shader stage of the current program. - * - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param location the location of the subroutine uniform - */ - @NativeType("void") - public static int glGetUniformSubroutineui(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location) { - return GL40C.glGetUniformSubroutineui(shadertype, location); - } - - // --- [ glGetProgramStageiv ] --- - - /** Unsafe version of: {@link #glGetProgramStageiv GetProgramStageiv} */ - public static void nglGetProgramStageiv(int program, int shadertype, int pname, long values) { - GL40C.nglGetProgramStageiv(program, shadertype, pname, values); - } - - /** - * Retrieves properties of a program object corresponding to a specified shader stage. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param pname the parameter of the shader to query. One of:
    {@link GL40C#GL_ACTIVE_SUBROUTINES ACTIVE_SUBROUTINES}{@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORMS ACTIVE_SUBROUTINE_UNIFORMS}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS}{@link GL40C#GL_ACTIVE_SUBROUTINE_MAX_LENGTH ACTIVE_SUBROUTINE_MAX_LENGTH}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH}
    - * @param values a variable into which the queried value or values will be placed - */ - public static void glGetProgramStageiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer values) { - GL40C.glGetProgramStageiv(program, shadertype, pname, values); - } - - /** - * Retrieves properties of a program object corresponding to a specified shader stage. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param pname the parameter of the shader to query. One of:
    {@link GL40C#GL_ACTIVE_SUBROUTINES ACTIVE_SUBROUTINES}{@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORMS ACTIVE_SUBROUTINE_UNIFORMS}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS}{@link GL40C#GL_ACTIVE_SUBROUTINE_MAX_LENGTH ACTIVE_SUBROUTINE_MAX_LENGTH}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH}
    - */ - @NativeType("void") - public static int glGetProgramStagei(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname) { - return GL40C.glGetProgramStagei(program, shadertype, pname); - } - - /** Array version of: {@link #glGetActiveSubroutineUniformiv GetActiveSubroutineUniformiv} */ - public static void glGetActiveSubroutineUniformiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] values) { - GL40C.glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); - } - - /** Array version of: {@link #glGetActiveSubroutineUniformName GetActiveSubroutineUniformName} */ - public static void glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); - } - - /** Array version of: {@link #glGetActiveSubroutineName GetActiveSubroutineName} */ - public static void glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineName(program, shadertype, index, length, name); - } - - /** Array version of: {@link #glUniformSubroutinesuiv UniformSubroutinesuiv} */ - public static void glUniformSubroutinesuiv(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") int[] indices) { - GL40C.glUniformSubroutinesuiv(shadertype, indices); - } - - /** Array version of: {@link #glGetUniformSubroutineuiv GetUniformSubroutineuiv} */ - public static void glGetUniformSubroutineuiv(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - GL40C.glGetUniformSubroutineuiv(shadertype, location, params); - } - - /** Array version of: {@link #glGetProgramStageiv GetProgramStageiv} */ - public static void glGetProgramStageiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] values) { - GL40C.glGetProgramStageiv(program, shadertype, pname, values); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadingLanguage100.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadingLanguage100.java deleted file mode 100644 index 42710207..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadingLanguage100.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_shading_language_100 extension. - * - *

    This extension indicates that the OpenGL Shading Language is supported.

    - * - *

    Requires {@link ARBShaderObjects ARB_shader_objects}, {@link ARBFragmentShader ARB_fragment_shader} and {@link ARBVertexShader ARB_vertex_shader}. Promoted to core in {@link GL20 OpenGL 2.0}.

    - */ -public final class ARBShadingLanguage100 { - - /** Accepted by the {@code name} parameter of GetString. */ - public static final int GL_SHADING_LANGUAGE_VERSION_ARB = 0x8B8C; - - private ARBShadingLanguage100() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadingLanguageInclude.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadingLanguageInclude.java deleted file mode 100644 index bc823ef9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadingLanguageInclude.java +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_shading_language_include extension. - * - *

    This extension introduces a {@code #include} GLSL directive to allow reusing the same shader text in multiple shaders and defines the semantics and syntax of - * the names allowed in {@code #include} directives. It also defines API mechanisms to define the named string backing a {@code #include}.

    - * - *

    Introduction

    - * - *

    The GLSL {@code #include} mechanism looks up paths in a tree built through the OpenGL API. This appendix describes the syntax and semantic model of the tree and - * paths into the tree. How the tree is used is up to users of the tree, like the OpenGL API or GLSL.

    - * - *

    The Tree

    - * - *

    The tree is a singly rooted hierarchy of tree locations. The root may have one or more child locations, and any location may in turn have its own - * children. Except for the root, each location has exactly one parent; the root has no parent.

    - * - *

    Paths into the Tree

    - * - *

    The locations in the tree are created or looked up by path strings. The path string "/" locates the root of the tree. The path "/foo" locates the child - * "foo" of the root. Formally, a valid path is a sequence of tokens delimited by the beginning of the string, by the path-separator forward slash ( / ), - * and by the end of the string. The string "foo/bar" has two tokens; "foo" and "bar". The string "/foo/./bar" has 3 tokens; "foo", ".", and "bar". The - * string "/foo/.." has two tokens; "foo" and "..". The string "/foo/.bar" has two tokens; "foo" and ".bar". A path is invalid if

    - * - *
      - *
    • {@code path} contains any characters not listed in Section 3.1 "Character Set", or the double quote character, or angled brackets, or any white - * space characters other than the space character.
    • - *
    • {@code path} has consecutive forward slashes ( // ); "/foo//bar" is not valid (zero length tokens are not allowed).
    • - *
    • {@code path} ends with a forward slash ( / )
    • - *
    • {@code path} contains no characters.
    • - *
    - * - *

    There are no path escape characters, so there is no way to get the forward slash delimiter within a single token.

    - * - *

    When using a path to lookup a tree location, the path tokens are used to walk the tree. The initial location to start the walk is specified by the user - * of the tree and is updated as follows by the tokens in the path. (Paths starting with "/" will start at the root.) Taken left to right:

    - * - *

    The token ".." walks to the parent. Or, if already at the root, then the location remains at the root.

    - * - *

    The token "." leaves the location unchanged.

    - * - *

    Any other token is considered the name of a child of the current location, and walks to that child. (If there is no child of that name, this may result - * in a failed lookup or in the child being created, as specified by the user of the tree for the operation being performed.)

    - * - *

    Associated Strings

    - * - *

    Each location in the tree can have an additional string associated with it (that a user like the {@code #include} mechanism can use as an included string). This - * is true even for locations that have children: "/foo/bar" can exist in the tree at the same time that "/foo" has an additional string associated with - * it. Typically, when a path is used to find a location in the tree, it is for the purpose of returning this associated string.

    - * - *

    Hence, the tree can be built from a collection of (path,string) pairs, where path is a string establishing the existence of a location in the tree and - * string is the string associated with the node. Details of how to do this are specified by the user of the tree.

    - * - *

    Requires GLSL 1.10.

    - */ -public class ARBShadingLanguageInclude { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of NamedStringARB. */ - public static final int GL_SHADER_INCLUDE_ARB = 0x8DAE; - - /** Accepted by the {@code pname} parameter of GetNamedStringivARB. */ - public static final int - GL_NAMED_STRING_LENGTH_ARB = 0x8DE9, - GL_NAMED_STRING_TYPE_ARB = 0x8DEA; - - protected ARBShadingLanguageInclude() { - throw new UnsupportedOperationException(); - } - - // --- [ glNamedStringARB ] --- - - /** - * Unsafe version of: {@link #glNamedStringARB NamedStringARB} - * - * @param namelen the number of characters in {@code name}. If negative, {@code name} is considered to be a null-terminated string. - * @param stringlen the number of characters in {@code string}. If negative, {@code string} is considered to be a null-terminated string. - */ - public static native void nglNamedStringARB(int type, int namelen, long name, int stringlen, long string); - - /** - * Specifies a string and its name. Such strings can be included by name in shaders during compilation, allowing reuse of the same code segments. - * - *

    After calling NamedStringARB, the contents of {@code string} are associated with the tree location corresponding to {@code name}. If a string is already - * associated with that tree location, it will be replaced with the new {@code string}.

    - * - * @param type the string type. Must be:
    {@link #GL_SHADER_INCLUDE_ARB SHADER_INCLUDE_ARB}
    - * @param name the name associated with the string - * @param string an arbitrary string of characters - */ - public static void glNamedStringARB(@NativeType("GLenum") int type, @NativeType("GLchar const *") ByteBuffer name, @NativeType("GLchar const *") ByteBuffer string) { - nglNamedStringARB(type, name.remaining(), memAddress(name), string.remaining(), memAddress(string)); - } - - /** - * Specifies a string and its name. Such strings can be included by name in shaders during compilation, allowing reuse of the same code segments. - * - *

    After calling NamedStringARB, the contents of {@code string} are associated with the tree location corresponding to {@code name}. If a string is already - * associated with that tree location, it will be replaced with the new {@code string}.

    - * - * @param type the string type. Must be:
    {@link #GL_SHADER_INCLUDE_ARB SHADER_INCLUDE_ARB}
    - * @param name the name associated with the string - * @param string an arbitrary string of characters - */ - public static void glNamedStringARB(@NativeType("GLenum") int type, @NativeType("GLchar const *") CharSequence name, @NativeType("GLchar const *") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - nglNamedStringARB(type, nameEncodedLength, nameEncoded, stringEncodedLength, stringEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteNamedStringARB ] --- - - /** - * Unsafe version of: {@link #glDeleteNamedStringARB DeleteNamedStringARB} - * - * @param namelen the number of characters in {@code name}. If negative, {@code name} is considered to be a null-terminated string. - */ - public static native void nglDeleteNamedStringARB(int namelen, long name); - - /** - * Deletes a named string. - * - * @param name the name associated with the string - */ - public static void glDeleteNamedStringARB(@NativeType("GLchar const *") ByteBuffer name) { - nglDeleteNamedStringARB(name.remaining(), memAddress(name)); - } - - /** - * Deletes a named string. - * - * @param name the name associated with the string - */ - public static void glDeleteNamedStringARB(@NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - nglDeleteNamedStringARB(nameEncodedLength, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCompileShaderIncludeARB ] --- - - /** Unsafe version of: {@link #glCompileShaderIncludeARB CompileShaderIncludeARB} */ - public static native void nglCompileShaderIncludeARB(int shader, int count, long path, long length); - - /** - * Compiles a shader object. - * - *

    The ordered list of {@code path}s is used during compilation, together with the arguments of {@code #include} directives in the shader source, to search for - * named strings corresponding to the {@code #include} directives. If a {@code #include} directive does not correspond to a valid named string, compilation will fail.

    - * - * @param shader the shader object compile - * @param path an ordered array of {@code count} pointers to optionally null-terminated character strings defining search paths - * @param length an array {@code count} values with the number of characters in each string (the string length). If an element in {@code length} is negative, its - * accompanying string is null-terminated. If {@code length} is {@code NULL}, all strings in the {@code path} argument are considered null-terminated. - */ - public static void glCompileShaderIncludeARB(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") PointerBuffer path, @Nullable @NativeType("GLint const *") IntBuffer length) { - if (CHECKS) { - checkSafe(length, path.remaining()); - } - nglCompileShaderIncludeARB(shader, path.remaining(), memAddress(path), memAddressSafe(length)); - } - - // --- [ glIsNamedStringARB ] --- - - /** - * Unsafe version of: {@link #glIsNamedStringARB IsNamedStringARB} - * - * @param namelen the number of characters in {@code name}. If negative, {@code name} is considered to be a null-terminated string. - */ - public static native boolean nglIsNamedStringARB(int namelen, long name); - - /** - * Returns {@link GL11#GL_TRUE TRUE} if the tree location corresponding to {@code name} has a string associated with it, and {@link GL11#GL_FALSE FALSE} if the tree location has no string - * associated with it. - * - * @param name the name associated with the string - */ - @NativeType("GLboolean") - public static boolean glIsNamedStringARB(@NativeType("GLchar const *") ByteBuffer name) { - return nglIsNamedStringARB(name.remaining(), memAddress(name)); - } - - /** - * Returns {@link GL11#GL_TRUE TRUE} if the tree location corresponding to {@code name} has a string associated with it, and {@link GL11#GL_FALSE FALSE} if the tree location has no string - * associated with it. - * - * @param name the name associated with the string - */ - @NativeType("GLboolean") - public static boolean glIsNamedStringARB(@NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - return nglIsNamedStringARB(nameEncodedLength, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedStringARB ] --- - - /** - * Unsafe version of: {@link #glGetNamedStringARB GetNamedStringARB} - * - * @param namelen the number of characters in {@code name}. If negative, {@code name} is considered to be a null-terminated string. - * @param bufSize the maximum number of characters that may be written into {@code string}, including the null terminator - */ - public static native void nglGetNamedStringARB(int namelen, long name, int bufSize, long stringlen, long string); - - /** - * Returns in {@code string} the string corresponding to the specified {@code name}. The returned string will be null-terminated. - * - * @param name the name associated with the string - * @param stringlen a buffer in which to place the actual number of characters written into {@code string}, excluding the null terminator. If {@code NULL}, no length is - * returned. - * @param string a buffer in which to place the returned string - */ - public static void glGetNamedStringARB(@NativeType("GLchar const *") ByteBuffer name, @Nullable @NativeType("GLint *") IntBuffer stringlen, @NativeType("GLchar *") ByteBuffer string) { - if (CHECKS) { - checkSafe(stringlen, 1); - } - nglGetNamedStringARB(name.remaining(), memAddress(name), string.remaining(), memAddressSafe(stringlen), memAddress(string)); - } - - /** - * Returns in {@code string} the string corresponding to the specified {@code name}. The returned string will be null-terminated. - * - * @param name the name associated with the string - * @param stringlen a buffer in which to place the actual number of characters written into {@code string}, excluding the null terminator. If {@code NULL}, no length is - * returned. - * @param string a buffer in which to place the returned string - */ - public static void glGetNamedStringARB(@NativeType("GLchar const *") CharSequence name, @Nullable @NativeType("GLint *") IntBuffer stringlen, @NativeType("GLchar *") ByteBuffer string) { - if (CHECKS) { - checkSafe(stringlen, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - nglGetNamedStringARB(nameEncodedLength, nameEncoded, string.remaining(), memAddressSafe(stringlen), memAddress(string)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Returns in {@code string} the string corresponding to the specified {@code name}. The returned string will be null-terminated. - * - * @param name the name associated with the string - * @param bufSize the maximum number of characters that may be written into {@code string}, including the null terminator - */ - @NativeType("void") - public static String glGetNamedStringARB(@NativeType("GLchar const *") CharSequence name, @NativeType("GLsizei") int bufSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - IntBuffer stringlen = stack.ints(0); - ByteBuffer string = stack.malloc(bufSize); - nglGetNamedStringARB(nameEncodedLength, nameEncoded, bufSize, memAddress(stringlen), memAddress(string)); - return memUTF8(string, stringlen.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Returns in {@code string} the string corresponding to the specified {@code name}. The returned string will be null-terminated. - * - * @param name the name associated with the string - */ - @NativeType("void") - public static String glGetNamedStringARB(@NativeType("GLchar const *") CharSequence name) { - return glGetNamedStringARB(name, glGetNamedStringiARB(name, GL_NAMED_STRING_LENGTH_ARB)); - } - - // --- [ glGetNamedStringivARB ] --- - - /** - * Unsafe version of: {@link #glGetNamedStringivARB GetNamedStringivARB} - * - * @param namelen the number of characters in {@code name}. If negative, {@code name} is considered to be a null-terminated string. - */ - public static native void nglGetNamedStringivARB(int namelen, long name, int pname, long params); - - /** - * Returns properties of the named string whose tree location corresponds to {@code name}. - * - * @param name the name associated with the string - * @param pname the parameter to query. One of:
    {@link #GL_NAMED_STRING_LENGTH_ARB NAMED_STRING_LENGTH_ARB}{@link #GL_NAMED_STRING_TYPE_ARB NAMED_STRING_TYPE_ARB}
    - * @param params a buffer in which to place the returned value - */ - public static void glGetNamedStringivARB(@NativeType("GLchar const *") ByteBuffer name, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedStringivARB(name.remaining(), memAddress(name), pname, memAddress(params)); - } - - /** - * Returns properties of the named string whose tree location corresponds to {@code name}. - * - * @param name the name associated with the string - * @param pname the parameter to query. One of:
    {@link #GL_NAMED_STRING_LENGTH_ARB NAMED_STRING_LENGTH_ARB}{@link #GL_NAMED_STRING_TYPE_ARB NAMED_STRING_TYPE_ARB}
    - * @param params a buffer in which to place the returned value - */ - public static void glGetNamedStringivARB(@NativeType("GLchar const *") CharSequence name, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - nglGetNamedStringivARB(nameEncodedLength, nameEncoded, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Returns properties of the named string whose tree location corresponds to {@code name}. - * - * @param name the name associated with the string - * @param pname the parameter to query. One of:
    {@link #GL_NAMED_STRING_LENGTH_ARB NAMED_STRING_LENGTH_ARB}{@link #GL_NAMED_STRING_TYPE_ARB NAMED_STRING_TYPE_ARB}
    - */ - @NativeType("void") - public static int glGetNamedStringiARB(@NativeType("GLchar const *") CharSequence name, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - IntBuffer params = stack.callocInt(1); - nglGetNamedStringivARB(nameEncodedLength, nameEncoded, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glCompileShaderIncludeARB CompileShaderIncludeARB} */ - public static void glCompileShaderIncludeARB(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") PointerBuffer path, @Nullable @NativeType("GLint const *") int[] length) { - long __functionAddress = GL.getICD().glCompileShaderIncludeARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, path.remaining()); - } - callPPV(shader, path.remaining(), memAddress(path), length, __functionAddress); - } - - /** Array version of: {@link #glGetNamedStringARB GetNamedStringARB} */ - public static void glGetNamedStringARB(@NativeType("GLchar const *") ByteBuffer name, @Nullable @NativeType("GLint *") int[] stringlen, @NativeType("GLchar *") ByteBuffer string) { - long __functionAddress = GL.getICD().glGetNamedStringARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(stringlen, 1); - } - callPPPV(name.remaining(), memAddress(name), string.remaining(), stringlen, memAddress(string), __functionAddress); - } - - /** Array version of: {@link #glGetNamedStringARB GetNamedStringARB} */ - public static void glGetNamedStringARB(@NativeType("GLchar const *") CharSequence name, @Nullable @NativeType("GLint *") int[] stringlen, @NativeType("GLchar *") ByteBuffer string) { - long __functionAddress = GL.getICD().glGetNamedStringARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(stringlen, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - callPPPV(nameEncodedLength, nameEncoded, string.remaining(), stringlen, memAddress(string), __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGetNamedStringivARB GetNamedStringivARB} */ - public static void glGetNamedStringivARB(@NativeType("GLchar const *") ByteBuffer name, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedStringivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPPV(name.remaining(), memAddress(name), pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedStringivARB GetNamedStringivARB} */ - public static void glGetNamedStringivARB(@NativeType("GLchar const *") CharSequence name, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedStringivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int nameEncodedLength = stack.nASCII(name, false); - long nameEncoded = stack.getPointerAddress(); - callPPV(nameEncodedLength, nameEncoded, pname, params, __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadow.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadow.java deleted file mode 100644 index a22c431f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadow.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_shadow extension. - * - *

    This extension supports comparing the texture R coordinate to a depth texture value in order to produce a boolean texture value. This can be used to - * implement shadow maps.

    - * - *

    The extension is written in generic terms such that other texture comparison modes can be accommodated in the future.

    - * - *

    Requires {@link ARBDepthTexture ARB_depth_texture}. Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public final class ARBShadow { - - /** Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int - GL_TEXTURE_COMPARE_MODE_ARB = 0x884C, - GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D; - - /** - * Accepted by the {@code param} parameter of TexParameterf, TexParameteri, TexParameterfv, and TexParameteriv when the {@code pname} parameter is - * TEXTURE_COMPARE_MODE_ARB. - */ - public static final int GL_COMPARE_R_TO_TEXTURE_ARB = 0x884E; - - private ARBShadow() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadowAmbient.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadowAmbient.java deleted file mode 100644 index b8700ff6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBShadowAmbient.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_shadow_ambient extension. - * - *

    This extension allows the user to specify the texture value to use when the texture compare function fails. Normally this value is zero. By allowing an - * arbitrary value we can get functionality which otherwise requires an advanced texture combine extension (such as - * NV_register_combiners) and multiple texture units.

    - * - *

    Requires {@link ARBShadow ARB_shadow} and {@link ARBDepthTexture ARB_depth_texture}.

    - */ -public final class ARBShadowAmbient { - - /** Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF; - - private ARBShadowAmbient() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSparseBuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSparseBuffer.java deleted file mode 100644 index a841e6e2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSparseBuffer.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_sparse_buffer extension. - * - *

    This extension adds to GL a mechanism to decouple the virtual and physical storage requirements of textures and allows an application - * to create partially populated textures that would over-subscribe available graphics memory if made fully resident. This extension provides like - * functionality for buffer objects, allowing applications to manage buffer object storage in a similar manner.

    - * - *

    Requires {@link GL15 OpenGL 1.5} or {@link ARBVertexBufferObject ARB_vertex_buffer_object}.

    - */ -public class ARBSparseBuffer { - - static { GL.initialize(); } - - /** Accepted as part of the {@code flags} parameter to {@link GL44C#glBufferStorage BufferStorage}. */ - public static final int GL_SPARSE_STORAGE_BIT_ARB = 0x400; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int GL_SPARSE_BUFFER_PAGE_SIZE_ARB = 0x82F8; - - protected ARBSparseBuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ glBufferPageCommitmentARB ] --- - - /** - * Commit and de-commits regions of sparse buffer storage. - * - * @param target buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the region offset. Must be an integer multiple of the implementation dependent constant {@link #GL_SPARSE_BUFFER_PAGE_SIZE_ARB SPARSE_BUFFER_PAGE_SIZE_ARB}. - * @param size the data size. must either be a multiple of {@link #GL_SPARSE_BUFFER_PAGE_SIZE_ARB SPARSE_BUFFER_PAGE_SIZE_ARB}, or extend to the end of the buffer's data store. - * @param commit If true, then pages contained in the specified range become committed and become physically backed. If false, then physical storage associated with - * the data store in the specified region may be freed and those pages become uncommitted. Newly committed pages have undefined content. However, - * redundantly committing pages does not alter their content. - */ - public static native void glBufferPageCommitmentARB(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLboolean") boolean commit); - - // --- [ glNamedBufferPageCommitmentEXT ] --- - - /** - * Direct-state-access version of {@link #glBufferPageCommitmentARB BufferPageCommitmentARB}. - * - * @param buffer the buffer object - * @param offset the region offset. Must be an integer multiple of the implementation dependent constant {@link #GL_SPARSE_BUFFER_PAGE_SIZE_ARB SPARSE_BUFFER_PAGE_SIZE_ARB}. - * @param size the data size. must either be a multiple of {@link #GL_SPARSE_BUFFER_PAGE_SIZE_ARB SPARSE_BUFFER_PAGE_SIZE_ARB}, or extend to the end of the buffer's data store. - * @param commit the commit state - */ - public static native void glNamedBufferPageCommitmentEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLboolean") boolean commit); - - // --- [ glNamedBufferPageCommitmentARB ] --- - - /** - * Direct-state-access version of {@link #glBufferPageCommitmentARB BufferPageCommitmentARB}. - * - * @param buffer the buffer object - * @param offset the region offset. Must be an integer multiple of the implementation dependent constant {@link #GL_SPARSE_BUFFER_PAGE_SIZE_ARB SPARSE_BUFFER_PAGE_SIZE_ARB}. - * @param size the data size. must either be a multiple of {@link #GL_SPARSE_BUFFER_PAGE_SIZE_ARB SPARSE_BUFFER_PAGE_SIZE_ARB}, or extend to the end of the buffer's data store. - * @param commit the commit state - */ - public static native void glNamedBufferPageCommitmentARB(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLboolean") boolean commit); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSparseTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSparseTexture.java deleted file mode 100644 index 6dd74177..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSparseTexture.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_sparse_texture extension. - * - *

    Recent advances in application complexity and a desire for higher resolutions have pushed texture sizes up considerably. Often, the amount of physical - * memory available to a graphics processor is a limiting factor in the performance of texture-heavy applications. Once the available physical memory is - * exhausted, paging may occur bringing performance down considerably - or worse, the application may fail. Nevertheless, the amount of address space - * available to the graphics processor has increased to the point where many gigabytes - or even terabytes of address space may be usable even though that - * amount of physical memory is not present.

    - * - *

    This extension allows the separation of the graphics processor's address space (reservation) from the requirement that all textures must be physically - * backed (commitment). This exposes a limited form of virtualization for textures. Use cases include sparse (or partially resident) textures, texture - * paging, on-demand and delayed loading of texture assets and application controlled level of detail.

    - */ -public class ARBSparseTexture { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter to TexParameter{i f}{v}, TexParameterI{u}v, GetTexParameter{if}v and GetTexParameterIi{u}v. */ - public static final int - GL_TEXTURE_SPARSE_ARB = 0x91A6, - GL_VIRTUAL_PAGE_SIZE_INDEX_ARB = 0x91A7; - - /** Accepted by the {@code pname} parameter of GetTexParameter{if}v and GetTexParameterIi{u}v. */ - public static final int GL_NUM_SPARSE_LEVELS_ARB = 0x91AA; - - /** Accepted by the {@code pname} parameter to GetInternalformativ. */ - public static final int - GL_NUM_VIRTUAL_PAGE_SIZES_ARB = 0x91A8, - GL_VIRTUAL_PAGE_SIZE_X_ARB = 0x9195, - GL_VIRTUAL_PAGE_SIZE_Y_ARB = 0x9196, - GL_VIRTUAL_PAGE_SIZE_Z_ARB = 0x9197; - - /** Accepted by the {@code pname} parameter to GetIntegerv, GetFloatv, GetDoublev, GetInteger64v, and GetBooleanv. */ - public static final int - GL_MAX_SPARSE_TEXTURE_SIZE_ARB = 0x9198, - GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB = 0x9199, - GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = 0x919A, - GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB = 0x91A9; - - protected ARBSparseTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexPageCommitmentARB ] --- - - /** - * Makes individual pages of a sparse texture resident or non resident. - * - *

    If the value of {@code commit} is {@link GL11#GL_TRUE TRUE}, then the texture pages contained in the region defined by the values of {@code xoffset}, {@code yoffset}, - * {@code zoffset}, {@code width}, {@code height} and {@code depth} are committed. If they were not committed before the call, then new physical backing - * store is allocated and associated with the sparse pages and their initial content is undefined. If the pages were already committed, then they remain - * committed, no error is generated, and the content of those pages remains unmodified. If the value of {@code committed} is {@link GL11#GL_FALSE FALSE}, then the texture - * pages contained in the region are made de-committed. Their physical store is de-allocated, and their contents again become undefined.

    - * - *

    For the purposes of commitment, a cube map texture is treated as a 2D array texture with a depth of six and cube map array textures are treated as 2D - * array textures with a depth equal to six times the number of layers in the cube map array.

    - * - *

    For levels of a sparse texture where each dimension is a multiple of the virtual page size, the residency of individual page-size regions is controlled - * by TexPageCommitmentARB and such levels may be partially populated. When the mipmap chain reaches a level that is not an integer multiple of the virtual - * page size in any dimension, padding and memory layout considerations may make it impossible to treat that level and subsequent smaller ones as partially - * populated. The set of levels that can be partially populated is implementation-dependent. The total number of levels that may be partially populated may - * be queried by calling {@link GL11C#glGetTexParameteriv GetTexParameteriv} with the {@code pname} {@link #GL_NUM_SPARSE_LEVELS_ARB NUM_SPARSE_LEVELS_ARB}.

    - * - *

    The collection of texture levels that may not be partially populated, if any, consists of levels {@link #GL_NUM_SPARSE_LEVELS_ARB NUM_SPARSE_LEVELS_ARB} and higher, and is referred to - * as the mipmap 'tail'. The levels comprising the tail are made resident or non-resident as a unit. The tail is resident if and only if - * TexPageCommitmentARB has been called successfully with {@code level} greater than or equal to {@link #GL_NUM_SPARSE_LEVELS_ARB NUM_SPARSE_LEVELS_ARB} and the value of {@code commit} was - * {@link GL11#GL_TRUE TRUE} for the last such call.

    - * - *

    Views of sparse textures are also considered sparse. Modifications to commitment of a texture via a view of it affect the parent texture and any other - * views containing the modified pages. If a view of a sparse texture references its tail (or is entirely contained within it), modifications to commitment - * of the tail via the view will affect the entire tail of the parent, even for parts of the tail that are not referenced by the view. Furthermore, - * modifications to tail commitment may affect views referencing other parts of the tail.

    - * - *
    Errors
    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if {@code xoffset} + {@code width} or {@code yoffset} + {@code height} is greater than the width or height, - * respectively, of level {@code level} of the texture bound to {@code target}.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if {@code zoffset} + {@code depth} is greater than

    - * - *
      - *
    • the depth of level {@code level} of the texture bound to {@code target}, if {@code target} is {@link GL12#GL_TEXTURE_3D TEXTURE_3D};
    • - *
    • the number of layers of level {@code level} of the texture bound to {@code target}, if {@code target} is {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY};
    • - *
    • six times the number of layers of level {@code level} of the texture bound to {@code target}, if {@code target} is {@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}; or
    • - *
    • one, for all other targets.
    • - *
    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code xoffset}, {@code yoffset}, or {@code zoffset} is not a multiple of {@link #GL_VIRTUAL_PAGE_SIZE_X_ARB VIRTUAL_PAGE_SIZE_X_ARB}, - * {@link #GL_VIRTUAL_PAGE_SIZE_Y_ARB VIRTUAL_PAGE_SIZE_Y_ARB}, or {@link #GL_VIRTUAL_PAGE_SIZE_Z_ARB VIRTUAL_PAGE_SIZE_Z_ARB}, respectively, of the texture bound to {@code target}.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if {@code width} is not an integer multiple of {@link #GL_VIRTUAL_PAGE_SIZE_X_ARB VIRTUAL_PAGE_SIZE_X_ARB} and {@code width} plus - * {@code xoffset} is not equal to the width of level {@code level} of the texture bound to {@code target}.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if {@code height} is not an integer multiple of {@link #GL_VIRTUAL_PAGE_SIZE_Y_ARB VIRTUAL_PAGE_SIZE_Y_ARB} and {@code height} plus - * {@code yoffset} is not equal to the height of level {@code level} of the texture bound to {@code target}.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if {@code depth} is not an integer multiple of {@link #GL_VIRTUAL_PAGE_SIZE_Z_ARB VIRTUAL_PAGE_SIZE_Z_ARB} and {@code depth} plus - * {@code zoffset} is not equal to

    - * - *
      - *
    • the depth of level {@code level} of the texture bound to {@code target}, if {@code target} is TEXTURE_3D;
    • - *
    • the number of layers of level {@code level} of the texture bound to {@code target}, if {@code target} is TEXTURE_2D_ARRAY;
    • - *
    • six times the number of layers of level {@code level} of the texture bound to {@code target}, if {@code target} is TEXTURE_CUBE_MAP_ARRAY; or
    • - *
    • one, for all other targets.
    • - *
    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if the value of {@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT} or {@link #GL_TEXTURE_SPARSE_ARB TEXTURE_SPARSE_ARB} for the texture bound to - * {@code target} is {@link GL11#GL_FALSE FALSE}.

    - * - * @param target the texture target. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param commit the commit flag - */ - public static native void glTexPageCommitmentARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean commit); - - // --- [ glTexturePageCommitmentEXT ] --- - - /** - * DSA version of {@link #glTexPageCommitmentARB TexPageCommitmentARB}. - * - * @param texture the texture object - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param commit the commit flag - */ - public static native void glTexturePageCommitmentEXT(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean commit); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBStencilTexturing.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBStencilTexturing.java deleted file mode 100644 index efc4b67f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBStencilTexturing.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_stencil_texturing extension. - * - *

    This extension allows texturing of the stencil component of a packed depth stencil texture. Stencil values are returned as unsigned integers. It is not - * possible to sample both depth and stencil values from the same texture, and this extension allows the app to select which is sampled for the bound - * texture.

    - * - *

    Requires {@link ARBDepthTexture ARB_depth_texture} and {@link EXTPackedDepthStencil EXT_packed_depth_stencil}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public final class ARBStencilTexturing { - - /** Accepted by the {@code pname} parameter of TexParameter and GetTexParameter*. */ - public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; - - private ARBStencilTexturing() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSync.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBSync.java deleted file mode 100644 index 52544b3c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBSync.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_sync extension. - * - *

    This extension introduces the concept of "sync objects". Sync objects are a synchronization primitive - a representation of events whose completion - * status can be tested or waited upon. One specific type of sync object, the "fence sync object", is supported in this extension, and additional types can - * easily be added in the future.

    - * - *

    Fence sync objects have corresponding fences, which are inserted into the OpenGL command stream at the time the sync object is created. A sync object - * can be queried for a given condition. The only condition supported for fence sync objects is completion of the corresponding fence command. Fence - * completion allows applications to request a partial Finish, wherein all commands prior to the fence will be forced to complete before control is - * returned to the calling process.

    - * - *

    These new mechanisms allow for synchronization between the host CPU and the GPU, which may be accessing the same resources (typically memory), as well - * as between multiple GL contexts bound to multiple threads in the host CPU.

    - * - *

    Requires {@link GL31 OpenGL 3.1}. Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public class ARBSync { - - static { GL.initialize(); } - - /** Accepted as the {@code pname} parameter of GetInteger64v. */ - public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; - - /** Accepted as the {@code pname} parameter of GetSynciv. */ - public static final int - GL_OBJECT_TYPE = 0x9112, - GL_SYNC_CONDITION = 0x9113, - GL_SYNC_STATUS = 0x9114, - GL_SYNC_FLAGS = 0x9115; - - /** Returned in {@code values} for GetSynciv {@code pname} OBJECT_TYPE. */ - public static final int GL_SYNC_FENCE = 0x9116; - - /** Returned in {@code values} for GetSynciv {@code pname} SYNC_CONDITION. */ - public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; - - /** Returned in {@code values} for GetSynciv {@code pname} SYNC_STATUS. */ - public static final int - GL_UNSIGNALED = 0x9118, - GL_SIGNALED = 0x9119; - - /** Accepted in the {@code flags} parameter of ClientWaitSync. */ - public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; - - /** Accepted in the {@code timeout} parameter of WaitSync. */ - public static final long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFL; - - /** Returned by ClientWaitSync. */ - public static final int - GL_ALREADY_SIGNALED = 0x911A, - GL_TIMEOUT_EXPIRED = 0x911B, - GL_CONDITION_SATISFIED = 0x911C, - GL_WAIT_FAILED = 0x911D; - - protected ARBSync() { - throw new UnsupportedOperationException(); - } - - // --- [ glFenceSync ] --- - - /** - * Creates a new sync object and inserts it into the GL command stream. - * - * @param condition the condition that must be met to set the sync object's state to signaled. Must be:
    {@link GL32C#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE}
    - * @param flags a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and {@code flags} must - * be zero. - */ - @NativeType("GLsync") - public static long glFenceSync(@NativeType("GLenum") int condition, @NativeType("GLbitfield") int flags) { - return GL32C.glFenceSync(condition, flags); - } - - // --- [ glIsSync ] --- - - /** Unsafe version of: {@link #glIsSync IsSync} */ - public static boolean nglIsSync(long sync) { - return GL32C.nglIsSync(sync); - } - - /** - * Determines if a name corresponds to a sync object. - * - * @param sync a value that may be the name of a sync object - */ - @NativeType("GLboolean") - public static boolean glIsSync(@NativeType("GLsync") long sync) { - return GL32C.glIsSync(sync); - } - - // --- [ glDeleteSync ] --- - - /** Unsafe version of: {@link #glDeleteSync DeleteSync} */ - public static void nglDeleteSync(long sync) { - GL32C.nglDeleteSync(sync); - } - - /** - * Deletes a sync object. - * - * @param sync the sync object to be deleted - */ - public static void glDeleteSync(@NativeType("GLsync") long sync) { - GL32C.glDeleteSync(sync); - } - - // --- [ glClientWaitSync ] --- - - /** Unsafe version of: {@link #glClientWaitSync ClientWaitSync} */ - public static int nglClientWaitSync(long sync, int flags, long timeout) { - return GL32C.nglClientWaitSync(sync, flags, timeout); - } - - /** - * Causes the client to block and wait for a sync object to become signaled. If {@code sync} is signaled when {@code glClientWaitSync} is called, - * {@code glClientWaitSync} returns immediately, otherwise it will block and wait for up to timeout nanoseconds for {@code sync} to become signaled. - * - *

    The return value is one of four status values:

    - * - *
      - *
    • {@link GL32C#GL_ALREADY_SIGNALED ALREADY_SIGNALED} indicates that sync was signaled at the time that glClientWaitSync was called.
    • - *
    • {@link GL32C#GL_TIMEOUT_EXPIRED TIMEOUT_EXPIRED} indicates that at least timeout nanoseconds passed and sync did not become signaled.
    • - *
    • {@link GL32C#GL_CONDITION_SATISFIED CONDITION_SATISFIED} indicates that sync was signaled before the timeout expired.
    • - *
    • {@link GL32C#GL_WAIT_FAILED WAIT_FAILED} indicates that an error occurred. Additionally, an OpenGL error will be generated.
    • - *
    - * - * @param sync the sync object whose status to wait on - * @param flags a bitfield controlling the command flushing behavior. One or more of:
    0{@link GL32C#GL_SYNC_FLUSH_COMMANDS_BIT SYNC_FLUSH_COMMANDS_BIT}
    - * @param timeout the timeout, specified in nanoseconds, for which the implementation should wait for {@code sync} to become signaled - */ - @NativeType("GLenum") - public static int glClientWaitSync(@NativeType("GLsync") long sync, @NativeType("GLbitfield") int flags, @NativeType("GLuint64") long timeout) { - return GL32C.glClientWaitSync(sync, flags, timeout); - } - - // --- [ glWaitSync ] --- - - /** Unsafe version of: {@link #glWaitSync WaitSync} */ - public static void nglWaitSync(long sync, int flags, long timeout) { - GL32C.nglWaitSync(sync, flags, timeout); - } - - /** - * Causes the GL server to block and wait for a sync object to become signaled. - * - *

    {@code glWaitSync} will always wait no longer than an implementation-dependent timeout. The duration of this timeout in nanoseconds may be queried by - * with {@link GL32C#GL_MAX_SERVER_WAIT_TIMEOUT MAX_SERVER_WAIT_TIMEOUT}. There is currently no way to determine whether glWaitSync unblocked because the timeout expired or because the - * sync object being waited on was signaled.

    - * - *

    If an error occurs, {@code glWaitSync} does not cause the GL server to block.

    - * - * @param sync the sync object whose status to wait on - * @param flags a bitfield controlling the command flushing behavior. Must be:
    0
    - * @param timeout the timeout that the server should wait before continuing. Must be:
    {@link GL32C#GL_TIMEOUT_IGNORED TIMEOUT_IGNORED}
    - */ - public static void glWaitSync(@NativeType("GLsync") long sync, @NativeType("GLbitfield") int flags, @NativeType("GLuint64") long timeout) { - GL32C.glWaitSync(sync, flags, timeout); - } - - // --- [ glGetInteger64v ] --- - - /** Unsafe version of: {@link #glGetInteger64v GetInteger64v} */ - public static void nglGetInteger64v(int pname, long params) { - GL32C.nglGetInteger64v(pname, params); - } - - /** - * Returns the 64bit integer value or values of a selected parameter. - * - * @param pname the parameter value to be returned - * @param params the value or values of the specified parameter - */ - public static void glGetInteger64v(@NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL32C.glGetInteger64v(pname, params); - } - - /** - * Returns the 64bit integer value or values of a selected parameter. - * - * @param pname the parameter value to be returned - */ - @NativeType("void") - public static long glGetInteger64(@NativeType("GLenum") int pname) { - return GL32C.glGetInteger64(pname); - } - - // --- [ glGetSynciv ] --- - - /** - * Unsafe version of: {@link #glGetSynciv GetSynciv} - * - * @param bufSize the size of the buffer whose address is given in {@code values} - */ - public static void nglGetSynciv(long sync, int pname, int bufSize, long length, long values) { - GL32C.nglGetSynciv(sync, pname, bufSize, length, values); - } - - /** - * Queries the properties of a sync object. - * - * @param sync the sync object whose properties to query - * @param pname the parameter whose value to retrieve from the sync object specified in {@code sync}. One of:
    {@link GL32C#GL_OBJECT_TYPE OBJECT_TYPE}{@link GL32C#GL_SYNC_CONDITION SYNC_CONDITION}{@link GL32C#GL_SYNC_STATUS SYNC_STATUS}{@link GL32C#GL_SYNC_FLAGS SYNC_FLAGS}
    - * @param length the address of an variable to receive the number of integers placed in {@code values} - * @param values the address of an array to receive the values of the queried parameter - */ - public static void glGetSynciv(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer values) { - GL32C.glGetSynciv(sync, pname, length, values); - } - - /** - * Queries the properties of a sync object. - * - * @param sync the sync object whose properties to query - * @param pname the parameter whose value to retrieve from the sync object specified in {@code sync}. One of:
    {@link GL32C#GL_OBJECT_TYPE OBJECT_TYPE}{@link GL32C#GL_SYNC_CONDITION SYNC_CONDITION}{@link GL32C#GL_SYNC_STATUS SYNC_STATUS}{@link GL32C#GL_SYNC_FLAGS SYNC_FLAGS}
    - * @param length the address of an variable to receive the number of integers placed in {@code values} - */ - @NativeType("void") - public static int glGetSynci(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") IntBuffer length) { - return GL32C.glGetSynci(sync, pname, length); - } - - /** Array version of: {@link #glGetInteger64v GetInteger64v} */ - public static void glGetInteger64v(@NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL32C.glGetInteger64v(pname, params); - } - - /** Array version of: {@link #glGetSynciv GetSynciv} */ - public static void glGetSynciv(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] values) { - GL32C.glGetSynciv(sync, pname, length, values); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTessellationShader.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTessellationShader.java deleted file mode 100644 index 86a50990..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTessellationShader.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_tessellation_shader extension. - * - *

    This extension introduces new tessellation stages and two new shader types to the OpenGL primitive processing pipeline. These pipeline stages operate on - * a new basic primitive type, called a patch. A patch consists of a fixed-size collection of vertices, each with per-vertex attributes, plus a number of - * associated per-patch attributes. Tessellation control shaders transform an input patch specified by the application, computing per-vertex and per-patch - * attributes for a new output patch. A fixed-function tessellation primitive generator subdivides the patch, and tessellation evaluation shaders are used - * to compute the position and attributes of each vertex produced by the tessellator.

    - * - *

    When tessellation is active, it begins by running the optional tessellation control shader. This shader consumes an input patch and produces a new - * fixed-size output patch. The output patch consists of an array of vertices, and a set of per-patch attributes. The per-patch attributes include - * tessellation levels that control how finely the patch will be tessellated. For each patch processed, multiple tessellation control shader invocations - * are performed -- one per output patch vertex. Each tessellation control shader invocation writes all the attributes of its corresponding output patch - * vertex. A tessellation control shader may also read the per-vertex outputs of other tessellation control shader invocations, as well as read and write - * shared per-patch outputs. The tessellation control shader invocations for a single patch effectively run as a group. A built-in {@code barrier()} - * function is provided to allow synchronization points where no shader invocation will continue until all shader invocations have reached the barrier.

    - * - *

    The tessellation primitive generator then decomposes a patch into a new set of primitives using the tessellation levels to determine how finely - * tessellated the output should be. The primitive generator begins with either a triangle or a quad, and splits each outer edge of the primitive into a - * number of segments approximately equal to the corresponding element of the outer tessellation level array. The interior of the primitive is tessellated - * according to elements of the inner tessellation level array. The primitive generator has three modes: "triangles" and "quads" split a triangular or - * quad-shaped patch into a set of triangles that cover the original patch; "isolines" splits a quad-shaped patch into a set of line strips running across - * the patch horizontally. Each vertex generated by the tessellation primitive generator is assigned a (u,v) or (u,v,w) coordinate indicating its relative - * location in the subdivided triangle or quad.

    - * - *

    For each vertex produced by the tessellation primitive generator, the tessellation evaluation shader is run to compute its position and other attributes - * of the vertex, using its (u,v) or (u,v,w) coordinate. When computing final vertex attributes, the tessellation evaluation shader can also read the - * attributes of any of the vertices of the patch written by the tessellation control shader. Tessellation evaluation shader invocations are completely - * independent, although all invocations for a single patch share the same collection of input vertices and per-patch attributes.

    - * - *

    The tessellator operates on vertices after they have been transformed by a vertex shader. The primitives generated by the tessellator are passed further - * down the OpenGL pipeline, where they can be used as inputs to geometry shaders, transform feedback, and the rasterizer.

    - * - *

    The tessellation control and evaluation shaders are both optional. If neither shader type is present, the tessellation stage has no effect. If no - * tessellation control shader is present, the input patch provided by the application is passed directly to the tessellation primitive generator, and a - * set of default tessellation level parameters is used to control primitive generation. In this extension, patches may not be passed beyond the - * tessellation evaluation shader, and an error is generated if an application provides patches and the current program object contains no tessellation - * evaluation shader.

    - * - *

    Requires {@link GL32 GL32} and GLSL 1.50. Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public class ARBTessellationShader { - - static { GL.initialize(); } - - /** Accepted by the {@code mode} parameter of Begin and all vertex array functions that implicitly call Begin. */ - public static final int GL_PATCHES = 0xE; - - /** Accepted by the {@code pname} parameter of PatchParameteri, GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int GL_PATCH_VERTICES = 0x8E72; - - /** Accepted by the {@code pname} parameter of PatchParameterfv, GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv, and GetInteger64v. */ - public static final int - GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73, - GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75, - GL_TESS_GEN_MODE = 0x8E76, - GL_TESS_GEN_SPACING = 0x8E77, - GL_TESS_GEN_VERTEX_ORDER = 0x8E78, - GL_TESS_GEN_POINT_MODE = 0x8E79; - - /** Returned by GetProgramiv when {@code pname} is TESS_GEN_MODE. */ - public static final int GL_ISOLINES = 0x8E7A; - - /** Returned by GetProgramiv when {@code pname} is TESS_GEN_SPACING. */ - public static final int - GL_FRACTIONAL_ODD = 0x8E7B, - GL_FRACTIONAL_EVEN = 0x8E7C; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int - GL_MAX_PATCH_VERTICES = 0x8E7D, - GL_MAX_TESS_GEN_LEVEL = 0x8E7E, - GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F, - GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80, - GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81, - GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82, - GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83, - GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84, - GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85, - GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86, - GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89, - GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A, - GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C, - GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D, - GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E, - GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int - GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0, - GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; - - /** Accepted by the {@code type} parameter of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int - GL_TESS_EVALUATION_SHADER = 0x8E87, - GL_TESS_CONTROL_SHADER = 0x8E88; - - protected ARBTessellationShader() { - throw new UnsupportedOperationException(); - } - - // --- [ glPatchParameteri ] --- - - /** - * Specifies the integer value of the specified parameter for patch primitives. - * - * @param pname the name of the parameter to set. Must be:
    {@link GL40C#GL_PATCH_VERTICES PATCH_VERTICES}
    - * @param value the new value for the parameter given by {@code pname} - */ - public static void glPatchParameteri(@NativeType("GLenum") int pname, @NativeType("GLint") int value) { - GL40C.glPatchParameteri(pname, value); - } - - // --- [ glPatchParameterfv ] --- - - /** Unsafe version of: {@link #glPatchParameterfv PatchParameterfv} */ - public static void nglPatchParameterfv(int pname, long values) { - GL40C.nglPatchParameterfv(pname, values); - } - - /** - * Specifies an array of float values for the specified parameter for patch primitives. - * - * @param pname the name of the parameter to set. One of:
    {@link GL40C#GL_PATCH_DEFAULT_OUTER_LEVEL PATCH_DEFAULT_OUTER_LEVEL}{@link GL40C#GL_PATCH_DEFAULT_INNER_LEVEL PATCH_DEFAULT_INNER_LEVEL}
    - * @param values an array containing the new values for the parameter given by {@code pname} - */ - public static void glPatchParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer values) { - GL40C.glPatchParameterfv(pname, values); - } - - /** Array version of: {@link #glPatchParameterfv PatchParameterfv} */ - public static void glPatchParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] values) { - GL40C.glPatchParameterfv(pname, values); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBarrier.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBarrier.java deleted file mode 100644 index f3525645..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBarrier.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_texture_barrier extension. - * - *

    This extension relaxes the restrictions on rendering to a currently bound texture and provides a mechanism to avoid read-after-write hazards.

    - * - *

    Promoted to core in {@link GL45 OpenGL 4.5}.

    - */ -public class ARBTextureBarrier { - - static { GL.initialize(); } - - protected ARBTextureBarrier() { - throw new UnsupportedOperationException(); - } - - // --- [ glTextureBarrier ] --- - - /** Guarantees that writes have completed and caches have been invalidated before subsequent Draws are executed. */ - public static void glTextureBarrier() { - GL45C.glTextureBarrier(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBorderClamp.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBorderClamp.java deleted file mode 100644 index 26dc1e73..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBorderClamp.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_border_clamp extension. - * - *

    The base OpenGL provides clamping such that the texture coordinates are limited to exactly the range [0,1]. When a texture coordinate is clamped using - * this algorithm, the texture sampling filter straddles the edge of the texture image, taking 1/2 its sample values from within the texture image, and the - * other 1/2 from the texture border. It is sometimes desirable for a texture to be clamped to the border color, rather than to an average of the border - * and edge colors.

    - * - *

    This extension defines an additional texture clamping algorithm. {@link #GL_CLAMP_TO_BORDER_ARB CLAMP_TO_BORDER_ARB} clamps texture coordinates at all mipmap levels such that - * {@link GL11#GL_NEAREST NEAREST} and {@link GL11#GL_LINEAR LINEAR} filters return only the color of the border texels.

    - * - *

    Promoted to core in {@link GL13 OpenGL 1.3}.

    - */ -public final class ARBTextureBorderClamp { - - /** - * Accepted by the {@code param} parameter of {@link GL11C#glTexParameteri TexParameteri} and {@link GL11C#glTexParameterf TexParameterf}, and by the {@code params} parameter of {@link GL11C#glTexParameteriv TexParameteriv} - * and {@link GL11C#glTexParameterfv TexParameterfv}, when their {@code pname} parameter is {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}, {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}, or {@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}. - */ - public static final int GL_CLAMP_TO_BORDER_ARB = 0x812D; - - private ARBTextureBorderClamp() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBufferObject.java deleted file mode 100644 index c04f0fa2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBufferObject.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_texture_buffer_object extension. - * - *

    This extension provides a new texture type, called a buffer texture. Buffer textures are one-dimensional arrays of texels whose storage comes from an - * attached buffer object. When a buffer object is bound to a buffer texture, a format is specified, and the data in the buffer object is treated as an - * array of texels of the specified format.

    - * - *

    The use of a buffer object to provide storage allows the texture data to be specified in a number of different ways: via buffer object loads - * ({@link GL15C#glBufferData BufferData}), direct CPU writes ({@link GL15C#glMapBuffer MapBuffer}), framebuffer readbacks (EXT_pixel_buffer_object extension). A buffer object can also be loaded - * by transform feedback (NV_transform_feedback extension), which captures selected transformed attributes of vertices processed by the GL. Several of - * these mechanisms do not require an extra data copy, which would be required when using conventional TexImage-like entry points.

    - * - *

    Buffer textures do not support mipmapping, texture lookups with normalized floating-point texture coordinates, and texture filtering of any sort, and - * may not be used in fixed-function fragment processing. They can be accessed via single texel fetch operations in programmable shaders. For assembly - * shaders (NV_gpu_program4), the TXF instruction is used. For GLSL (EXT_gpu_shader4), a new sampler type and texel fetch function are used.

    - * - *

    While buffer textures can be substantially larger than equivalent one-dimensional textures; the maximum texture size supported for buffer textures in - * the initial implementation of this extension is 2^27 texels, versus 2^13 (8192) texels for otherwise equivalent one-dimensional textures. When a buffer - * object is attached to a buffer texture, a size is not specified; rather, the number of texels in the texture is taken by dividing the size of the buffer - * object by the size of each texel.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and NV_gpu_program4 or {@link EXTGPUShader4 EXT_gpu_shader4}. Promoted to core in {@link GL31 OpenGL 3.1}.

    - */ -public class ARBTextureBufferObject { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameter of BindBuffer, BufferData, BufferSubData, MapBuffer, MapBufferRangeARB, BindTexture, UnmapBuffer, - * GetBufferSubData, GetBufferParameteriv, GetBufferPointerv, and TexBufferARB, and the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, and - * GetIntegerv. - */ - public static final int GL_TEXTURE_BUFFER_ARB = 0x8C2A; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int - GL_MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B, - GL_TEXTURE_BINDING_BUFFER_ARB = 0x8C2C, - GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D, - GL_TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E; - - protected ARBTextureBufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexBufferARB ] --- - - /** - * Attaches the storage for the buffer object named {@code buffer} to the active buffer texture, and specifies an internal format for the texel array found - * in the attached buffer object. If {@code buffer} is zero, any buffer object attached to the buffer texture is detached, and no new buffer object is - * attached. If {@code buffer} is non-zero, but is not the name of an existing buffer object, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. - * - *

    When a buffer object is attached to a buffer texture, the buffer object's data store is taken as the texture's texel array. The number of texels in the - * buffer texture's texel array is given by

    - * - *

    {@code floor(buffer_size / (components * sizeof(base_type))},

    - * - *

    where {@code buffer_size} is the size of the buffer object, in basic machine units and {@code components} and {@code base_type} are the element count - * and base data type for elements. The number of texels in the texel array is then clamped to the implementation-dependent limit - * {@link #GL_MAX_TEXTURE_BUFFER_SIZE_ARB MAX_TEXTURE_BUFFER_SIZE_ARB}. When a buffer texture is accessed in a shader, the results of a texel fetch are undefined if the specified texel number is - * greater than or equal to the clamped number of texels in the texel array.

    - * - *

    When a buffer texture is accessed in a shader, an integer is provided to indicate the texel number being accessed. If no buffer object is bound to the - * buffer texture, the results of the texel access are undefined. Otherwise, the attached buffer object's data store is interpreted as an array of elements - * of the GL data type corresponding to {@code internalformat}. Each texel consists of one to four elements that are mapped to texture components - * (R, G, B, A, L, and I). Element {@code m} of the texel numbered {@code n} is taken from element {@code n} * {@code components} + {@code m} of the - * attached buffer object's data store. Elements and texels are both numbered starting with zero. For texture formats with normalized components, the - * extracted values are converted to floating-point values. The components of the texture are then converted to an (R,G,B,A) vector, and returned to the - * shader as a four-component result vector with components of the appropriate data type for the texture's internal format.

    - * - * @param target the target of the operation. Must be:
    {@link #GL_TEXTURE_BUFFER_ARB TEXTURE_BUFFER_ARB}
    - * @param internalformat the sized internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - */ - public static native void glTexBufferARB(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBufferRange.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBufferRange.java deleted file mode 100644 index 36e4d301..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureBufferRange.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_texture_buffer_range extension. - * - *

    {@link ARBTextureBufferObject ARB_texture_buffer_object} (which was promoted to core in OpenGL 3.1) introduced the ability to attach the data store of a buffer object to a buffer - * texture and access it from shaders. The extension only allows the entire store of the buffer object to the texture. This extension expands on this and - * allows a sub-range of the buffer's data store to be attached to a texture. This can be used, for example, to allow multiple buffer textures to be backed - * by independent sub-ranges of the same buffer object, or for different sub-ranges of a single buffer object to be used for different purposes.

    - * - *

    Requires {@link GL15 OpenGL 1.5}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBTextureBufferRange { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_BUFFER_OFFSET = 0x919D, - GL_TEXTURE_BUFFER_SIZE = 0x919E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; - - protected ARBTextureBufferRange() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexBufferRange ] --- - - /** - * Binds a range of a buffer's data store to a buffer texture. - * - * @param target the target of the operation. Must be:
    {@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    - * @param internalformat the internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * @param offset the offset of the start of the range of the buffer's data store to attach - * @param size the size of the range of the buffer's data store to attach - */ - public static void glTexBufferRange(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL43C.glTexBufferRange(target, internalformat, buffer, offset, size); - } - - // --- [ glTextureBufferRangeEXT ] --- - - /** - * DSA version of {@link #glTexBufferRange TexBufferRange}. - * - * @param texture the texture object - * @param target the target of the operation. Must be:
    {@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    - * @param internalformat the internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * @param offset the offset of the start of the range of the buffer's data store to attach - * @param size the size of the range of the buffer's data store to attach - */ - public static native void glTextureBufferRangeEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompression.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompression.java deleted file mode 100644 index 6b62731a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompression.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_texture_compression extension. - * - *

    Compressing texture images can reduce texture memory utilization and improve performance when rendering textured primitives. This extension allows - * OpenGL applications to use compressed texture images by providing:

    - * - *
      - *
    1. A framework upon which extensions providing specific compressed image formats can be built.
    2. - *
    3. A set of generic compressed internal formats that allow applications to specify that texture images should be stored in compressed form without - * needing to code for specific compression formats.
    4. - *
    - * - *

    An application can define compressed texture images by providing a texture image stored in a specific compressed image format. This extension does not - * define any specific compressed image formats, but it does provide the mechanisms necessary to enable other extensions that do.

    - * - *

    An application can also define compressed texture images by providing an uncompressed texture image but specifying a compressed internal format. In this - * case, the GL will automatically compress the texture image using the appropriate image format. Compressed internal formats can either be specific (as - * above) or generic. Generic compressed internal formats are not actual image formats, but are instead mapped into one of the specific compressed formats - * provided by the GL (or to an uncompressed base internal format if no appropriate compressed format is available). Generic compressed internal formats - * allow applications to use texture compression without needing to code to any particular compression algorithm. Generic compressed formats allow the use - * of texture compression across a wide range of platforms with differing compression algorithms and also allow future GL implementations to substitute - * improved compression methods transparently.

    - * - *

    Promoted to core in {@link GL13 OpenGL 1.3}.

    - */ -public class ARBTextureCompression { - - static { GL.initialize(); } - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D. */ - public static final int - GL_COMPRESSED_ALPHA_ARB = 0x84E9, - GL_COMPRESSED_LUMINANCE_ARB = 0x84EA, - GL_COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB, - GL_COMPRESSED_INTENSITY_ARB = 0x84EC, - GL_COMPRESSED_RGB_ARB = 0x84ED, - GL_COMPRESSED_RGBA_ARB = 0x84EE; - - /** Accepted by the {@code target} parameter of Hint and the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_COMPRESSION_HINT_ARB = 0x84EF; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0, - GL_TEXTURE_COMPRESSED_ARB = 0x86A1; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int - GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2, - GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3; - - protected ARBTextureCompression() { - throw new UnsupportedOperationException(); - } - - // --- [ glCompressedTexImage3DARB ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage3DARB CompressedTexImage3DARB} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, long data); - - /** - * Specifies a three-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param depth the depth of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexImage3DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, data); - } - - /** - * Specifies a three-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param depth the depth of the texture image - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexImage3DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, 0, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTexImage2DARB ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage2DARB CompressedTexImage2DARB} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, long data); - - /** - * Specifies a two-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexImage2DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, data); - } - - /** - * Specifies a two-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexImage2DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexImage2DARB(target, level, internalformat, width, height, 0, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTexImage1DARB ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage1DARB CompressedTexImage1DARB} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, long data); - - /** - * Specifies a one-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexImage1DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, data); - } - - /** - * Specifies a one-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexImage1DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexImage1DARB(target, level, internalformat, width, 0, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTexSubImage3DARB ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage3DARB CompressedTexSubImage3DARB} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data); - - /** - * Respecifies only a cubic subregion of an existing 3D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexSubImage3DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * Respecifies only a cubic subregion of an existing 3D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexSubImage3DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTexSubImage2DARB ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage2DARB CompressedTexSubImage2DARB} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data); - - /** - * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexSubImage2DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexSubImage2DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTexSubImage1DARB ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage1DARB CompressedTexSubImage1DARB} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, long data); - - /** - * Respecifies only a subregion of an existing 1D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. Must be:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexSubImage1DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, data); - } - - /** - * Respecifies only a subregion of an existing 1D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. Must be:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - */ - public static void glCompressedTexSubImage1DARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, data.remaining(), memAddress(data)); - } - - // --- [ glGetCompressedTexImageARB ] --- - - /** Unsafe version of: {@link #glGetCompressedTexImageARB GetCompressedTexImageARB} */ - public static native void nglGetCompressedTexImageARB(int target, int level, long pixels); - - /** - * Returns a compressed texture image. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - */ - public static void glGetCompressedTexImageARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer pixels) { - if (CHECKS) { - if (DEBUG) { - check(pixels, GL11.glGetTexLevelParameteri(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB)); - } - } - nglGetCompressedTexImageARB(target, level, memAddress(pixels)); - } - - /** - * Returns a compressed texture image. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - */ - public static void glGetCompressedTexImageARB(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") long pixels) { - nglGetCompressedTexImageARB(target, level, pixels); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompressionBPTC.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompressionBPTC.java deleted file mode 100644 index 852bddf9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompressionBPTC.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_compression_bptc extension. - * - *

    This extension provides additional texture compression functionality specific to the BPTC and BPTC_FLOAT compressed texture formats (called BC7 and BC6H - * respectively in Microsoft's DirectX API), subject to all the requirements and limitations described by the extension {@link ARBTextureCompression ARB_texture_compression}.

    - * - *

    Traditional block compression methods as typified by s3tc and latc compress a block of pixels into indicies along a gradient. This works well for smooth - * images, but can have quality issues along sharp edges and strong chrominance transitions. To improve quality in these problematic cases, the BPTC - * formats can divide each block into multiple partitions, each of which are compressed using an independent gradient.

    - * - *

    In addition, it is desirable to directly support high dynamic range imagery in compressed formats, which is accomplished by the BPTC_FLOAT formats.

    - * - *

    Requires {@link GL31 OpenGL 3.1} and {@link ARBTextureCompression ARB_texture_compression}.

    - */ -public final class ARBTextureCompressionBPTC { - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, TexImage3D, CopyTexImage2D, CopyTexImage3D, CompressedTexImage2DARB, and - * CompressedTexImage3DARB and the {@code format} parameter of CompressedTexSubImage2DARB and CompressedTexSubImage3DARB. - */ - public static final int - GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C, - GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D, - GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E, - GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F; - - private ARBTextureCompressionBPTC() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompressionRGTC.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompressionRGTC.java deleted file mode 100644 index 4fd35af4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCompressionRGTC.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_compression_rgtc extension. - * - *

    This extension introduces four new block-based texture compression formats suited for unsigned and signed red and red-green textures (hence the name - * "rgtc" for Red-Green Texture Compression).

    - * - *

    These formats are designed to reduce the storage requirements and memory bandwidth required for red and red-green textures by a factor of 2-to-1 over - * conventional uncompressed luminance and luminance-alpha textures with 8-bit components ({@link GL11#GL_LUMINANCE8 LUMINANCE8} and {@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}).

    - * - *

    The compressed signed red-green format is reasonably suited for storing compressed normal maps.

    - * - *

    This extension uses the same compression format as the {@link EXTTextureCompressionLATC EXT_texture_compression_latc} extension except the color data is stored in the red and - * green components rather than luminance and alpha. Representing compressed red and green components is consistent with the BC4 and BC5 compressed - * formats supported by DirectX 10.

    - * - *

    Requires {@link GL13 OpenGL 1.3} or {@link ARBTextureCompression ARB_texture_compression}. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBTextureCompressionRGTC { - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2D and the {@code format} parameter of - * CompressedTexSubImage2D. - */ - public static final int - GL_COMPRESSED_RED_RGTC1 = 0x8DBB, - GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, - GL_COMPRESSED_RG_RGTC2 = 0x8DBD, - GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; - - private ARBTextureCompressionRGTC() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCubeMap.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCubeMap.java deleted file mode 100644 index eee24f35..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCubeMap.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_cube_map extension. - * - *

    This extension provides a new texture generation scheme for cube map textures. Instead of the current texture providing a 1D, 2D, or 3D lookup into a - * 1D, 2D, or 3D texture image, the texture is a set of six 2D images representing the faces of a cube. The (s,t,r) texture coordinates are treated as a - * direction vector emanating from the center of a cube. At texture generation time, the interpolated per-fragment (s,t,r) selects one cube face 2D image - * based on the largest magnitude coordinate (the major axis). A new 2D (s,t) is calculated by dividing the two other coordinates (the minor axes values) - * by the major axis value. Then the new (s,t) is used to lookup into the selected 2D texture image face of the cube map.

    - * - *

    Unlike a standard 1D, 2D, or 3D texture that have just one target, a cube map texture has six targets, one for each of its six 2D texture image cube - * faces. All these targets must be consistent, complete, and have equal width and height (ie, square dimensions).

    - * - *

    This extension also provides two new texture coordinate generation modes for use in conjunction with cube map texturing. The reflection map mode - * generates texture coordinates (s,t,r) matching the vertex's eye-space reflection vector. The reflection map mode is useful for environment mapping - * without the singularity inherent in sphere mapping. The normal map mode generates texture coordinates (s,t,r) matching the vertex's transformed - * eye-space normal. The normal map mode is useful for sophisticated cube map texturing-based diffuse lighting models.

    - * - *

    The intent of the new texgen functionality is that an application using cube map texturing can use the new texgen modes to automatically generate the - * reflection or normal vectors used to look up into the cube map texture.

    - * - *

    Promoted to core in {@link GL13 OpenGL 1.3}.

    - */ -public final class ARBTextureCubeMap { - - /** Accepted by the {@code param} parameters of TexGend, TexGenf, and TexGeni when {@code pname} parameter is TEXTURE_GEN_MODE. */ - public static final int - GL_NORMAL_MAP_ARB = 0x8511, - GL_REFLECTION_MAP_ARB = 0x8512; - - /** - * When the {@code pname} parameter of TexGendv, TexGenfv, and TexGeniv is TEXTURE_GEN_MODE, then the array {@code params} may also contain NORMAL_MAP_ARB - * or REFLECTION_MAP_ARB. Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled, and by the {@code pname} parameter of GetBooleanv, - * GetIntegerv, GetFloatv, and GetDoublev, and by the {@code target} parameter of BindTexture, GetTexParameterfv, GetTexParameteriv, TexParameterf, - * TexParameteri, TexParameterfv, and TexParameteriv. - */ - public static final int GL_TEXTURE_CUBE_MAP_ARB = 0x8513; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514; - - /** - * Accepted by the {@code target} parameter of GetTexImage, GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, CopyTexImage2D, TexSubImage2D, and - * CopySubTexImage2D. - */ - public static final int - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A; - - /** Accepted by the {@code target} parameter of GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and TexImage2D. */ - public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C; - - private ARBTextureCubeMap() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCubeMapArray.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCubeMapArray.java deleted file mode 100644 index b26a3f16..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureCubeMapArray.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_cube_map_array extension. - * - *

    The {@link EXTTextureArray EXT_texture_array} extension, and subsequently OpenGL 3.0 have introduced the concept of one- and two-dimensional array textures. An array - * texture is an ordered set of images with the same size and format. Each image in an array texture has a unique level. This extension expands texture - * array support to include cube map textures.

    - * - *

    A cube map array texture is a 2-dimensional array texture that may contain many cube map layers. Each cube map layer is a unique cube map image set. - * Images in a cube map array have the same size and format limitations as one- and two-dimensional array textures. A cube map array texture is specified - * using {@link GL12C#glTexImage3D TexImage3D} in a similar manner to two-dimensional arrays. Cube map array textures can be bound to a render targets of a frame buffer object - * as two-dimensional arrays are using FramebufferTextureLayer.

    - * - *

    When accessed by a programmable shader, a cube map array texture acts as a single unit. The "s", "t", "r" texture coordinates are treated as a regular - * cube map texture fetch. The "q" texture is treated as an unnormalized floating-point value identifying the layer of the cube map array texture. Cube map - * array texture lookups do not filter between layers.

    - * - *

    This extension does not provide for the use of cube map array textures with fixed-function fragment processing.

    - * - *

    Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public final class ARBTextureCubeMapArray { - - /** Accepted by the {@code target} parameter of TexParameteri, TexParameteriv, TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap. */ - public static final int GL_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A; - - /** Accepted by the {@code target} parameter of TexImage3D, TexSubImage3D, CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D. */ - public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B; - - /** TEXTURE_CUBE_MAP_ARRAY_ARB Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C, - GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D, - GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E, - GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F; - - private ARBTextureCubeMapArray() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureEnvCombine.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureEnvCombine.java deleted file mode 100644 index c9f8e4fd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureEnvCombine.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_env_combine extension. - * - *

    New texture environment function COMBINE_ARB allows programmable texture combiner operations.

    - * - *

    Requires {@link ARBMultitexture ARB_multitexture}. Promoted to core in {@link GL13 OpenGL 1.3}.

    - */ -public final class ARBTextureEnvCombine { - - /** Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is TEXTURE_ENV_MODE. */ - public static final int GL_COMBINE_ARB = 0x8570; - - /** Accepted by the {@code pname} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code target} parameter value is TEXTURE_ENV. */ - public static final int - GL_COMBINE_RGB_ARB = 0x8571, - GL_COMBINE_ALPHA_ARB = 0x8572, - GL_SOURCE0_RGB_ARB = 0x8580, - GL_SOURCE1_RGB_ARB = 0x8581, - GL_SOURCE2_RGB_ARB = 0x8582, - GL_SOURCE0_ALPHA_ARB = 0x8588, - GL_SOURCE1_ALPHA_ARB = 0x8589, - GL_SOURCE2_ALPHA_ARB = 0x858A, - GL_OPERAND0_RGB_ARB = 0x8590, - GL_OPERAND1_RGB_ARB = 0x8591, - GL_OPERAND2_RGB_ARB = 0x8592, - GL_OPERAND0_ALPHA_ARB = 0x8598, - GL_OPERAND1_ALPHA_ARB = 0x8599, - GL_OPERAND2_ALPHA_ARB = 0x859A, - GL_RGB_SCALE_ARB = 0x8573; - - /** - * Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is COMBINE_RGB_ARB or - * COMBINE_ALPHA_ARB. - */ - public static final int - GL_ADD_SIGNED_ARB = 0x8574, - GL_INTERPOLATE_ARB = 0x8575, - GL_SUBTRACT_ARB = 0x84E7; - - /** - * Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is SOURCE0_RGB_ARB, - * SOURCE1_RGB_ARB, SOURCE2_RGB_ARB, SOURCE0_ALPHA_ARB, SOURCE1_ALPHA_ARB, or SOURCE2_ALPHA_ARB. - */ - public static final int - GL_CONSTANT_ARB = 0x8576, - GL_PRIMARY_COLOR_ARB = 0x8577, - GL_PREVIOUS_ARB = 0x8578; - - private ARBTextureEnvCombine() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureEnvDot3.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureEnvDot3.java deleted file mode 100644 index d00c6a33..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureEnvDot3.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_env_dot3 extension. - * - *

    Adds new dot product operation to the texture combiner operations.

    - * - *

    Requires {@link ARBMultitexture ARB_multitexture} and {@link ARBTextureEnvCombine ARB_texture_env_combine}. Promoted to core in {@link GL13 OpenGL 1.3}.

    - */ -public final class ARBTextureEnvDot3 { - - /** Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is COMBINE_RGB_ARB. */ - public static final int - GL_DOT3_RGB_ARB = 0x86AE, - GL_DOT3_RGBA_ARB = 0x86AF; - - private ARBTextureEnvDot3() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFilterAnisotropic.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFilterAnisotropic.java deleted file mode 100644 index 94bdc146..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFilterAnisotropic.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_filter_anisotropic extension. - * - *

    Texture mapping using OpenGL's existing mipmap texture filtering modes assumes that the projection of the pixel filter footprint into texture space is - * a square (ie, isotropic). In practice however, the footprint may be long and narrow (ie, anisotropic). Consequently, mipmap filtering severely blurs - * images on surfaces angled obliquely away from the viewer.

    - * - *

    Several approaches exist for improving texture sampling by accounting for the anisotropic nature of the pixel filter footprint into texture space. This - * extension provides a general mechanism for supporting anisotropic texturing filtering schemes without specifying a particular formulation of - * anisotropic filtering.

    - * - *

    The extension permits the OpenGL application to specify on a per-texture or -sampler object basis the maximum degree of anisotropy to account for in - * texture filtering.

    - * - *

    Increasing the maximum degree of anisotropy may improve texture filtering, but may also significantly reduce the implementation's texture filtering - * rate. Implementations are free to clamp the specified degree of anisotropy to the implementation's maximum supported degree of anisotropy.

    - * - *

    A sampler or texture's maximum degree of anisotropy is specified independently from its minification and magnification filter (as opposed to being - * supported as an entirely new filtering mode). Implementations are free to use the specified minification and magnification filter to select a - * particular anisotropic texture filtering scheme. For example, a NEAREST filter with a maximum degree of anisotropy of two could be treated as a 2-tap - * filter that accounts for the direction of anisotropy. Implementations are also permitted to ignore the minification or magnification filter and - * implement the highest quality of anisotropic filtering possible.

    - * - *

    Applications seeking the highest quality anisotropic filtering available are advised to request a {@link GL11#GL_LINEAR_MIPMAP_LINEAR LINEAR_MIPMAP_LINEAR} minification filter, a {@link GL11#GL_LINEAR LINEAR} - * magnification filter, and a large maximum degree of anisotropy.

    - * - *

    Requires {@link GL12 OpenGL 1.2}.

    - */ -public final class ARBTextureFilterAnisotropic { - - /** Accepted by the {@code pname} parameters of GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameterfv, TexParameteri, and TexParameteriv. */ - public static final int GL_TEXTURE_MAX_ANISOTROPY = 0x84FE; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF; - - private ARBTextureFilterAnisotropic() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFilterMinmax.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFilterMinmax.java deleted file mode 100644 index 84682b91..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFilterMinmax.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_filter_minmax extension. - * - *

    In unextended OpenGL, minification and magnification filters such as {@link GL11#GL_LINEAR LINEAR} allow texture lookups to returned a filtered texel value produced by - * computing an weighted average of a collection of texels in the neighborhood of the texture coordinate provided.

    - * - *

    This extension provides a new texture and sampler parameter ({@link #GL_TEXTURE_REDUCTION_MODE_ARB TEXTURE_REDUCTION_MODE_ARB}) which allows applications to produce a filtered texel value - * by computing a component-wise minimum ({@link GL14#GL_MIN MIN}) or maximum ({@link GL14#GL_MAX MAX}) of the texels that would normally be averaged. The reduction mode is orthogonal - * to the minification and magnification filter parameters. The filter parameters are used to identify the set of texels used to produce a final filtered - * value; the reduction mode identifies how these texels are combined.

    - * - *

    Requires {@link GL33 OpenGL 3.3}.

    - */ -public final class ARBTextureFilterMinmax { - - /** - * Accepted by the {@code pname} parameter to SamplerParameter{i f}{v}, SamplerParameterI{u}iv, GetSamplerParameter{i f}v, GetSamplerParameterI{u}iv, - * TexParameter{i f}{v}, TexParameterI{u}iv, GetTexParameter{i f}v, GetTexParameterI{u}iv, TextureParameter{i f}{v}, TextureParameterI{u}iv, - * GetTextureParameter{i f}v, and GetTextureParameterI{u}iv. - */ - public static final int GL_TEXTURE_REDUCTION_MODE_ARB = 0x9366; - - /** - * Accepted by the {@code param} or {@code params} parameter to SamplerParameter{i f}{v}, SamplerParameterI{u}iv, TexParameter{i f}{v}, TexParameterI{u}iv, - * TextureParameter{i f}{v}, and TextureParameterI{u}iv when {@code pname} is TEXTURE_REDUCTION_MODE_ARB. - */ - public static final int GL_WEIGHTED_AVERAGE_ARB = 0x9367; - - private ARBTextureFilterMinmax() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFloat.java deleted file mode 100644 index cd317dc5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureFloat.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_float extension. - * - *

    This extension adds texture internal formats with 16- and 32-bit floating-point components. The 32-bit floating-point components are in the standard - * IEEE float format. The 16-bit floating-point components have 1 sign bit, 5 exponent bits, and 10 mantissa bits. Floating-point components are clamped to - * the limits of the range representable by their format.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBTextureFloat { - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_RED_TYPE_ARB = 0x8C10, - GL_TEXTURE_GREEN_TYPE_ARB = 0x8C11, - GL_TEXTURE_BLUE_TYPE_ARB = 0x8C12, - GL_TEXTURE_ALPHA_TYPE_ARB = 0x8C13, - GL_TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14, - GL_TEXTURE_INTENSITY_TYPE_ARB = 0x8C15, - GL_TEXTURE_DEPTH_TYPE_ARB = 0x8C16; - - /** Returned by the {@code params} parameter of GetTexLevelParameter. */ - public static final int GL_UNSIGNED_NORMALIZED_ARB = 0x8C17; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_RGBA32F_ARB = 0x8814, - GL_RGB32F_ARB = 0x8815, - GL_ALPHA32F_ARB = 0x8816, - GL_INTENSITY32F_ARB = 0x8817, - GL_LUMINANCE32F_ARB = 0x8818, - GL_LUMINANCE_ALPHA32F_ARB = 0x8819, - GL_RGBA16F_ARB = 0x881A, - GL_RGB16F_ARB = 0x881B, - GL_ALPHA16F_ARB = 0x881C, - GL_INTENSITY16F_ARB = 0x881D, - GL_LUMINANCE16F_ARB = 0x881E, - GL_LUMINANCE_ALPHA16F_ARB = 0x881F; - - private ARBTextureFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureGather.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureGather.java deleted file mode 100644 index 1188df59..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureGather.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_gather extension. - * - *

    This extension provides a new set of texture functions (textureGather) to the shading language that determine 2x2 footprint that are used for linear - * filtering in a texture lookup, and return a vector consisting of the first component from each of the four texels in the footprint.

    - * - *

    Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public final class ARBTextureGather { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E, - GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F, - GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F; - - private ARBTextureGather() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java deleted file mode 100644 index ff640732..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_mirror_clamp_to_edge extension. - * - *

    ARB_texture_mirror_clamp_to_edge extends the set of texture wrap modes to include an additional mode ({@link #GL_MIRROR_CLAMP_TO_EDGE MIRROR_CLAMP_TO_EDGE}) that effectively uses a - * texture map twice as large as the original image in which the additional half of the new image is a mirror image of the original image.

    - * - *

    This new mode relaxes the need to generate images whose opposite edges match by using the original image to generate a matching "mirror image". This - * mode allows the texture to be mirrored only once in the negative s, t, and r directions.

    - * - *

    Requires {@link GL14 OpenGL 1.4}. Promoted to core in {@link GL44 OpenGL 4.4}.

    - */ -public final class ARBTextureMirrorClampToEdge { - - /** - * Accepted by the {@code param} parameter of TexParameter{if}, SamplerParameter{if} and SamplerParameter{if}v, and by the {@code params} parameter of - * TexParameter{if}v, TexParameterI{i ui}v and SamplerParameterI{i ui}v when their {@code pname} parameter is {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}, {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}, or - * {@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}. - */ - public static final int GL_MIRROR_CLAMP_TO_EDGE = 0x8743; - - private ARBTextureMirrorClampToEdge() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMirroredRepeat.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMirroredRepeat.java deleted file mode 100644 index 802ec53b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMirroredRepeat.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_mirrored_repeat extension. - * - *

    ARB_texture_mirrored_repeat extends the set of texture wrap modes to include a mode ({@link #GL_MIRRORED_REPEAT_ARB MIRRORED_REPEAT_ARB}) that effectively uses a texture map twice - * as large at the original image in which the additional half, for each coordinate, of the new image is a mirror image of the original image.

    - * - *

    This new mode relaxes the need to generate images whose opposite edges match by using the original image to generate a matching "mirror image".

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public final class ARBTextureMirroredRepeat { - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int GL_MIRRORED_REPEAT_ARB = 0x8370; - - private ARBTextureMirroredRepeat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMultisample.java deleted file mode 100644 index 2ad80c1c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureMultisample.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_texture_multisample extension. - * - *

    This extension provides support for two new types of "multisample textures" - two-dimensional and two-dimensional array - as well as mechanisms to - * fetch a specific sample from such a texture in a shader, and to attach such textures to FBOs for rendering.

    - * - *

    This extension also includes the following functionality, first described in {@link NVExplicitMultisample NV_explicit_multisample}:

    - * - *
      - *
    • A query in the API to query the location of samples within the pixel
    • - *
    • An explicit control for the multisample sample mask to augment the control provided by SampleCoverage
    • - *
    - * - *

    Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public class ARBTextureMultisample { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetMultisamplefv. */ - public static final int GL_SAMPLE_POSITION = 0x8E50; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_SAMPLE_MASK = 0x8E51; - - /** Accepted by the {@code target} parameter of GetBooleani_v and GetIntegeri_v. */ - public static final int GL_SAMPLE_MASK_VALUE = 0x8E52; - - /** Accepted by the {@code target} parameter of BindTexture and TexImage2DMultisample. */ - public static final int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; - - /** Accepted by the {@code target} parameter of TexImage2DMultisample. */ - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; - - /** Accepted by the {@code target} parameter of BindTexture and TexImage3DMultisample. */ - public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; - - /** Accepted by the {@code target} parameter of TexImage3DMultisample. */ - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, - GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, - GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, - GL_MAX_INTEGER_SAMPLES = 0x9110, - GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104, - GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_SAMPLES = 0x9106, - GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_2D_MULTISAMPLE = 0x9108, - GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A, - GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B, - GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; - - protected ARBTextureMultisample() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexImage2DMultisample ] --- - - /** - * Establishes the data storage, format, dimensions, and number of samples of a 2D multisample texture's image. - * - * @param target the target of the operation. One of:
    {@link GL32C#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32C#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the multisample texture's image - * @param internalformat the internal format to be used to store the multisample texture's image. {@code internalformat} must specify a color-renderable, depth-renderable, - * or stencil-renderable format. - * @param width the width of the multisample texture's image, in texels - * @param height the height of the multisample texture's image, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static void glTexImage2DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL32C.glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - // --- [ glTexImage3DMultisample ] --- - - /** - * Establishes the data storage, format, dimensions, and number of samples of a 3D multisample texture's image. - * - * @param target the target of the operation. One of:
    {@link GL32C#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL32C#GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param samples the number of samples in the multisample texture's image - * @param internalformat the internal format to be used to store the multisample texture's image. {@code internalformat} must specify a color-renderable, depth-renderable, - * or stencil-renderable format. - * @param width the width of the multisample texture's image, in texels - * @param height the height of the multisample texture's image, in texels - * @param depth the depth of the multisample texture's image, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static void glTexImage3DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL32C.glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - // --- [ glGetMultisamplefv ] --- - - /** Unsafe version of: {@link #glGetMultisamplefv GetMultisamplefv} */ - public static void nglGetMultisamplefv(int pname, int index, long val) { - GL32C.nglGetMultisamplefv(pname, index, val); - } - - /** - * Retrieves the location of a sample. - * - * @param pname the sample parameter name. Must be:
    {@link GL32C#GL_SAMPLE_POSITION SAMPLE_POSITION}
    - * @param index the index of the sample whose position to query - * @param val an array to receive the position of the sample - */ - public static void glGetMultisamplefv(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer val) { - GL32C.glGetMultisamplefv(pname, index, val); - } - - /** - * Retrieves the location of a sample. - * - * @param pname the sample parameter name. Must be:
    {@link GL32C#GL_SAMPLE_POSITION SAMPLE_POSITION}
    - * @param index the index of the sample whose position to query - */ - @NativeType("void") - public static float glGetMultisamplef(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - return GL32C.glGetMultisamplef(pname, index); - } - - // --- [ glSampleMaski ] --- - - /** - * Sets the value of a sub-word of the sample mask. - * - * @param index which 32-bit sub-word of the sample mask to update - * @param mask the new value of the mask sub-word - */ - public static void glSampleMaski(@NativeType("GLuint") int index, @NativeType("GLbitfield") int mask) { - GL32C.glSampleMaski(index, mask); - } - - /** Array version of: {@link #glGetMultisamplefv GetMultisamplefv} */ - public static void glGetMultisamplefv(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] val) { - GL32C.glGetMultisamplefv(pname, index, val); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRG.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRG.java deleted file mode 100644 index b19541ec..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRG.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_rg extension. - * - *

    Historically one- and two- component textures have been specified in OpenGL using the intensity, luminance or luminance-alpha (I/L/LA) formats. With the - * advent of programmable shaders and render-to-texture capabilites these legacy formats carry some historical artifacts which are no longer useful.

    - * - *

    For example, when sampling from such textures, the luminance values are replicated across the color components, and the intensity values are replicated - * across both the color and alpha components. This is no longer necessary with programmable shaders.

    - * - *

    It is also desirable to be able to render to one- and two- component format textures using capabilities such as framebuffer objects (FBO), but rendering - * to I/L/LA formats is under-specified (specifically how to map R/G/B/A values to I/L/A texture channels).

    - * - *

    This extension adds new base internal formats for the one-component {@link GL11#GL_RED RED} and two-component {@link #GL_RG RG} (red green) texture formats as well as sized - * internal formats for fixed-point, floating-point and pure integer texture formats. The new texure formats can be used for texturing as well as for - * rendering into with framebuffer objects.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBTextureRG { - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D. */ - public static final int - GL_R8 = 0x8229, - GL_R16 = 0x822A, - GL_RG8 = 0x822B, - GL_RG16 = 0x822C, - GL_R16F = 0x822D, - GL_R32F = 0x822E, - GL_RG16F = 0x822F, - GL_RG32F = 0x8230, - GL_R8I = 0x8231, - GL_R8UI = 0x8232, - GL_R16I = 0x8233, - GL_R16UI = 0x8234, - GL_R32I = 0x8235, - GL_R32UI = 0x8236, - GL_RG8I = 0x8237, - GL_RG8UI = 0x8238, - GL_RG16I = 0x8239, - GL_RG16UI = 0x823A, - GL_RG32I = 0x823B, - GL_RG32UI = 0x823C, - GL_RG = 0x8227, - GL_COMPRESSED_RED = 0x8225, - GL_COMPRESSED_RG = 0x8226; - - /** Accepted by the {@code format} parameter of TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and ReadPixels. */ - public static final int GL_RG_INTEGER = 0x8228; - - private ARBTextureRG() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java deleted file mode 100644 index a25caecd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_rgb10_a2ui extension. - * - *

    This extension adds support for a new texturing format for unsigned 10.10.10.2 integer textures.

    - * - *

    OpenGL has supported {@link GL11#GL_RGB10 RGB10} and {@link GL11#GL_RGB10_A2 RGB10_A2} formats for a very long time. This extension provides a variant of RGB10_A2 which supports unsigned - * integer data (in contrast to the above "unsigned normalized integer" formats).

    - * - *

    Requires {@link GL30 OpenGL 3.0} or {@link EXTTextureInteger EXT_texture_integer}. Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public final class ARBTextureRGB10_A2UI { - - /** - * Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, RenderbufferStorage and - * RenderbufferStorageMultisample. - */ - public static final int GL_RGB10_A2UI = 0x906F; - - private ARBTextureRGB10_A2UI() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRectangle.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRectangle.java deleted file mode 100644 index dc8d109d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureRectangle.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_rectangle extension. - * - *

    OpenGL texturing is limited to images with power-of-two dimensions and an optional 1-texel border. The ARB_texture_rectangle extension adds a new - * texture target that supports 2D textures without requiring power-of-two dimensions.

    - * - *

    Non-power-of-two sized (NPOTS) textures are useful for storing video images that do not have power-of-two sized (POTS). Re-sampling artifacts are - * avoided and less texture memory may be required by using non-power-of-two sized textures. Non-power-of-two sized textures are also useful for shadow - * maps and window-space texturing.

    - * - *

    However, non-power-of-two sized textures have limitations that do not apply to power-of-two sized textures. NPOTS textures may not use mipmap filtering; - * POTS textures support both mipmapped and non-mipmapped filtering. NPOTS textures support only the {@link GL11#GL_CLAMP CLAMP}, {@link GL12#GL_CLAMP_TO_EDGE CLAMP_TO_EDGE}, and - * {@link GL13#GL_CLAMP_TO_BORDER CLAMP_TO_BORDER} wrap modes; POTS textures support {@link GL12#GL_CLAMP_TO_EDGE CLAMP_TO_EDGE}, {@link GL11#GL_REPEAT REPEAT}, {@link GL11#GL_CLAMP CLAMP}, {@link GL14#GL_MIRRORED_REPEAT MIRRORED_REPEAT}, and {@link GL13#GL_CLAMP_TO_BORDER CLAMP_TO_BORDER} - * (and GL_MIRROR_CLAMP_ATI and GL_MIRROR_CLAMP_TO_EDGE_ATI if ATI_texture_mirror_once is supported). NPOTS textures do not - * support an optional 1-texel border; POTS textures do support an optional 1-texel border.

    - * - *

    NPOTS textures are accessed by dimension-dependent (aka non-normalized) texture coordinates. So instead of thinking of the texture image lying in a - * [0..1]x[0..1] range, the NPOTS texture image lies in a [0..w]x[0..h] range.

    - * - *

    This extension adds a new texture target and related state (proxy, binding, max texture size).

    - */ -public final class ARBTextureRectangle { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled; by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and - * GetDoublev; and by the {@code target} parameter of BindTexture, GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, TexParameterfv and - * TexParameteriv. - */ - public static final int GL_TEXTURE_RECTANGLE_ARB = 0x84F5; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6; - - /** Accepted by the {@code target} parameter of GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv and TexImage2D. */ - public static final int GL_PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8; - - /** - * TEXTURE_RECTANGLE_ARB Returned by {@code type} parameter of GetActiveUniform when the location {@code index} for program object {@code program} is of - * type sampler2DRect. - */ - public static final int GL_SAMPLER_2D_RECT_ARB = 0x8B63; - - /** - * Returned by {@code type} parameter of GetActiveUniform when the location {@code index} for program object {@code program} is of type - * sampler2DRectShadow. - */ - public static final int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; - - private ARBTextureRectangle() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureStorage.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureStorage.java deleted file mode 100644 index eb987c89..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureStorage.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_texture_storage extension. - * - *

    The texture image specification commands in OpenGL allow each level to be separately specified with different sizes, formats, types and so on, and only - * imposes consistency checks at draw time. This adds overhead for implementations.

    - * - *

    This extension provides a mechanism for specifying the entire structure of a texture in a single call, allowing certain consistency checks and memory - * allocations to be done up front. Once specified, the format and dimensions of the image array become immutable, to simplify completeness checks in the - * implementation.

    - * - *

    When using this extension, it is no longer possible to supply texture data using TexImage*. Instead, data can be uploaded using TexSubImage*, or - * produced by other means (such as render-to-texture, mipmap generation, or rendering to a sibling EGLImage).

    - * - *

    This extension has complicated interactions with other extensions. The goal of most of these interactions is to ensure that a texture is always mipmap - * complete (and cube complete for cubemap textures).

    - * - *

    Requires {@link GL12 OpenGL 1.2}. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public class ARBTextureStorage { - - static { GL.initialize(); } - - /** Accepted by the {@code value} parameter of GetTexParameter{if}v. */ - public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; - - protected ARBTextureStorage() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexStorage1D ] --- - - /** - * Simultaneously specifies storage for all levels of a one-dimensional texture. - * - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - */ - public static void glTexStorage1D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width) { - GL42C.glTexStorage1D(target, levels, internalformat, width); - } - - // --- [ glTexStorage2D ] --- - - /** - * Simultaneously specifies storage for all levels of a two-dimensional or one-dimensional array texture. - * - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - */ - public static void glTexStorage2D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL42C.glTexStorage2D(target, levels, internalformat, width, height); - } - - // --- [ glTexStorage3D ] --- - - /** - * Simultaneously specifies storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture. - * - * @param target the target of the operation. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - */ - public static void glTexStorage3D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - GL42C.glTexStorage3D(target, levels, internalformat, width, height, depth); - } - - // --- [ glTextureStorage1DEXT ] --- - - /** - * DSA version of {@link #glTexStorage1D TexStorage1D}. - * - * @param texture the texture object to update - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - */ - public static native void glTextureStorage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width); - - // --- [ glTextureStorage2DEXT ] --- - - /** - * DSA version of {@link #glTexStorage2D TexStorage2D}. - * - * @param texture the texture object to update - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - */ - public static native void glTextureStorage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glTextureStorage3DEXT ] --- - - /** - * DSA version of {@link #glTexStorage3D TexStorage3D}. - * - * @param texture the texture object to update - * @param target the target of the operation. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - */ - public static native void glTextureStorage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureStorageMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureStorageMultisample.java deleted file mode 100644 index 07d865c8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureStorageMultisample.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_texture_storage_multisample extension. - * - *

    The {@link ARBTextureStorage ARB_texture_storage} extension and OpenGL 4.2 introduced the concept of immutable texture objects. With these objects, once their data store - * has been sized and allocated, it could not be resized for the lifetime of the objects (although its content could be updated). OpenGL implementations - * may be able to take advantage of the knowledge that the underlying data store of certain objects cannot be deleted or otherwise reallocated without - * destruction of the whole object (normally, a much heavier weight and less frequent operation). Immutable storage for all types of textures besides - * multisample and buffer textures was introduced by ARB_texture_storage. For completeness, this extension introduces immutable storage for multisampled - * textures.

    - * - *

    Requires {@link GL42 OpenGL 4.2} or {@link ARBTextureStorage ARB_texture_storage}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBTextureStorageMultisample { - - static { GL.initialize(); } - - protected ARBTextureStorageMultisample() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexStorage2DMultisample ] --- - - /** - * Specifies storage for a two-dimensional multisample texture. - * - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static void glTexStorage2DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL43C.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - // --- [ glTexStorage3DMultisample ] --- - - /** - * Specifies storage for a two-dimensional multisample array texture. - * - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static void glTexStorage3DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL43C.glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - // --- [ glTextureStorage2DMultisampleEXT ] --- - - /** - * DSA version of {@link #glTexStorage2DMultisample TexStorage2DMultisample}. - * - * @param texture the texture object - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static native void glTextureStorage2DMultisampleEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations); - - // --- [ glTextureStorage3DMultisampleEXT ] --- - - /** - * DSA version of {@link #glTexStorage3DMultisample TexStorage3DMultisample}. - * - * @param texture the texture object - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - */ - public static native void glTextureStorage3DMultisampleEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureSwizzle.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureSwizzle.java deleted file mode 100644 index 8b26387a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureSwizzle.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_texture_swizzle extension. - * - *

    Classic OpenGL texture formats conflate texture storage and interpretation, and assume that textures represent color. In modern applications, a - * significant quantity of textures don't represent color, but rather data like shadow maps, normal maps, page tables, occlusion data, etc. For the latter - * class of data, calling the data "RGBA" is just a convenient mapping of what the data is onto the current model, but isn't an accurate reflection of the - * reality of the data.

    - * - *

    The existing texture formats provide an almost orthogonal set of data types, sizes, and number of components, but the mappings of this storage into what - * the shader or fixed-function pipeline fetches is very much non-orthogonal. Previous extensions have added some of the most demanded missing formats, but - * the problem has not been solved once and for all.

    - * - *

    This extension provides a mechanism to swizzle the components of a texture before they are applied according to the texture environment in - * fixed-function or as they are returned to the shader.

    - * - *

    Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public final class ARBTextureSwizzle { - - /** Accepted by the {@code pname} parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int - GL_TEXTURE_SWIZZLE_R = 0x8E42, - GL_TEXTURE_SWIZZLE_G = 0x8E43, - GL_TEXTURE_SWIZZLE_B = 0x8E44, - GL_TEXTURE_SWIZZLE_A = 0x8E45; - - /** Accepted by the {@code pname} parameters of TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; - - private ARBTextureSwizzle() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureView.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureView.java deleted file mode 100644 index f385e825..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTextureView.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_texture_view extension. - * - *

    This extension allows a texture's data store to be "viewed" in multiple ways, either reinterpreting the data format/type as a different format/type with - * the same element size, or by clamping the mipmap level range or array slice range.

    - * - *

    The goals of this extension are to avoid having these alternate views become shared mutable containers of shared mutable objects, and to add the views - * to the API in a minimally invasive way.

    - * - *

    No new object types are added. Conceptually, a texture object is split into the following parts:

    - * - *
      - *
    • A data store holding texel data.
    • - *
    • State describing which portions of the data store to use, and how to interpret the data elements.
    • - *
    • An embedded sampler object.
    • - *
    • Various other texture parameters.
    • - *
    - * - *

    With this extension, multiple textures can share a data store and have different state describing which portions of the data store to use and how to - * interpret the data elements. The data store is refcounted and not destroyed until the last texture sharing it is deleted.

    - * - *

    This extension leverages the {@link ARBTextureStorage ARB_texture_storage} concept of an "immutable texture". Views can only be created of textures created with TexStorage.

    - * - *

    Requires {@link GL42 OpenGL 4.2} or {@link ARBTextureStorage ARB_texture_storage}. Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBTextureView { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetTexParameterfv and GetTexParameteriv. */ - public static final int - GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, - GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, - GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, - GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE, - GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; - - protected ARBTextureView() { - throw new UnsupportedOperationException(); - } - - // --- [ glTextureView ] --- - - /** - * Initializes a texture as a data alias of another texture's data store. - * - * @param texture the texture object to be initialized as a view - * @param target the target to be used for the newly initialized texture - * @param origtexture the name of a texture object of which to make a view - * @param internalformat the internal format for the newly created view - * @param minlevel the lowest level of detail of the view - * @param numlevels the number of levels of detail to include in the view - * @param minlayer the index of the first layer to include in the view - * @param numlayers the number of layers to include in the view - */ - public static void glTextureView(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLuint") int origtexture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int minlevel, @NativeType("GLuint") int numlevels, @NativeType("GLuint") int minlayer, @NativeType("GLuint") int numlayers) { - GL43C.glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTimerQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTimerQuery.java deleted file mode 100644 index e16103db..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTimerQuery.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_timer_query extension. - * - *

    Applications can benefit from accurate timing information in a number of different ways. During application development, timing information can help - * identify application or driver bottlenecks. At run time, applications can use timing information to dynamically adjust the amount of detail in a scene - * to achieve constant frame rates. OpenGL implementations have historically provided little to no useful timing information. Applications can get some - * idea of timing by reading timers on the CPU, but these timers are not synchronized with the graphics rendering pipeline. Reading a CPU timer does not - * guarantee the completion of a potentially large amount of graphics work accumulated before the timer is read, and will thus produce wildly inaccurate - * results. {@link GL11C#glFinish Finish} can be used to determine when previous rendering commands have been completed, but will idle the graphics pipeline and adversely - * affect application performance.

    - * - *

    This extension provides a query mechanism that can be used to determine the amount of time it takes to fully complete a set of GL commands, and without - * stalling the rendering pipeline. It uses the query object mechanisms first introduced in the occlusion query extension, which allow time intervals to be - * polled asynchronously by the application.

    - * - *

    Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public class ARBTimerQuery { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_TIME_ELAPSED = 0x88BF; - - /** - * Accepted by the {@code target} parameter of GetQueryiv and QueryCounter. Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, - * GetInteger64v, GetFloatv, and GetDoublev. - */ - public static final int GL_TIMESTAMP = 0x8E28; - - protected ARBTimerQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ glQueryCounter ] --- - - /** - * Records the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed. - * - * @param id the name of a query object into which to record the GL time - * @param target the counter to query. Must be:
    {@link GL33C#GL_TIMESTAMP TIMESTAMP}
    - */ - public static void glQueryCounter(@NativeType("GLuint") int id, @NativeType("GLenum") int target) { - GL33C.glQueryCounter(id, target); - } - - // --- [ glGetQueryObjecti64v ] --- - - /** Unsafe version of: {@link #glGetQueryObjecti64v GetQueryObjecti64v} */ - public static void nglGetQueryObjecti64v(int id, int pname, long params) { - GL33C.nglGetQueryObjecti64v(id, pname, params); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL33C.glGetQueryObjecti64v(id, pname, params); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long params) { - GL33C.glGetQueryObjecti64v(id, pname, params); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - */ - @NativeType("void") - public static long glGetQueryObjecti64(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - return GL33C.glGetQueryObjecti64(id, pname); - } - - // --- [ glGetQueryObjectui64v ] --- - - /** Unsafe version of: {@link #glGetQueryObjectui64v GetQueryObjectui64v} */ - public static void nglGetQueryObjectui64v(int id, int pname, long params) { - GL33C.nglGetQueryObjectui64v(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * @param params the requested data - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") LongBuffer params) { - GL33C.glGetQueryObjectui64v(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * @param params the requested data - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long params) { - GL33C.glGetQueryObjectui64v(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - */ - @NativeType("void") - public static long glGetQueryObjectui64(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - return GL33C.glGetQueryObjectui64(id, pname); - } - - /** Array version of: {@link #glGetQueryObjecti64v GetQueryObjecti64v} */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL33C.glGetQueryObjecti64v(id, pname, params); - } - - /** Array version of: {@link #glGetQueryObjectui64v GetQueryObjectui64v} */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long[] params) { - GL33C.glGetQueryObjectui64v(id, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedback2.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedback2.java deleted file mode 100644 index 6935226f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedback2.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_transform_feedback2 extension. - * - *

    The {@link EXTTransformFeedback EXT_transform_feedback} extension allows applications to capture primitives to one or more buffer objects when transformed by the GL. This - * extension provides a few additional capabilities to these extensions, making transform feedback mode more useful.

    - * - *

    First, it provides transform feedback objects which encapsulate transform feedback-related state, allowing applications to replace the entire transform - * feedback configuration in a single bind call. Second, it provides the ability to pause and resume transform feedback operations. When transform feedback - * is paused, applications may render without transform feedback or may use transform feedback with different state and a different transform feedback - * object. When transform feedback is resumed, additional primitives are captured and appended to previously captured primitives for the object.

    - * - *

    Additionally, this extension provides the ability to draw primitives captured in transform feedback mode without querying the captured primitive count. - * The command {@link #glDrawTransformFeedback DrawTransformFeedback} is equivalent to {@code glDrawArrays(, 0, )}, where {@code count} is the number of - * vertices captured to buffer objects during the last transform feedback capture operation on the transform feedback object used. This draw operation - * only provides a vertex count -- it does not automatically set up vertex array state or vertex buffer object bindings, which must be done separately by - * the application.

    - * - *

    Requires {@link GL20 GL20} or {@link ARBShaderObjects ARB_shader_objects} and {@link NVTransformFeedback NV_transform_feedback} or {@link EXTTransformFeedback EXT_transform_feedback}. - * Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public class ARBTransformFeedback2 { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of BindTransformFeedback. */ - public static final int GL_TRANSFORM_FEEDBACK = 0x8E22; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23, - GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24, - GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; - - protected ARBTransformFeedback2() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindTransformFeedback ] --- - - /** - * Binds a transform feedback object. - * - * @param target the target to which to bind the transform feedback object {@code id}. Must be:
    {@link GL40C#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param id the name of a transform feedback object - */ - public static void glBindTransformFeedback(@NativeType("GLenum") int target, @NativeType("GLuint") int id) { - GL40C.glBindTransformFeedback(target, id); - } - - // --- [ glDeleteTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glDeleteTransformFeedbacks DeleteTransformFeedbacks} - * - * @param n the number of transform feedback objects to delete - */ - public static void nglDeleteTransformFeedbacks(int n, long ids) { - GL40C.nglDeleteTransformFeedbacks(n, ids); - } - - /** - * Deletes transform feedback objects. - * - * @param ids an array of names of transform feedback objects to delete - */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") IntBuffer ids) { - GL40C.glDeleteTransformFeedbacks(ids); - } - - /** Deletes transform feedback objects. */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") int id) { - GL40C.glDeleteTransformFeedbacks(id); - } - - // --- [ glGenTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glGenTransformFeedbacks GenTransformFeedbacks} - * - * @param n the number of transform feedback object names to reserve - */ - public static void nglGenTransformFeedbacks(int n, long ids) { - GL40C.nglGenTransformFeedbacks(n, ids); - } - - /** - * Reserves transform feedback object names. - * - * @param ids an array of into which the reserved names will be written - */ - public static void glGenTransformFeedbacks(@NativeType("GLuint *") IntBuffer ids) { - GL40C.glGenTransformFeedbacks(ids); - } - - /** Reserves transform feedback object names. */ - @NativeType("void") - public static int glGenTransformFeedbacks() { - return GL40C.glGenTransformFeedbacks(); - } - - // --- [ glIsTransformFeedback ] --- - - /** - * Determines if a name corresponds to a transform feedback object. - * - * @param id a value that may be the name of a transform feedback object - */ - @NativeType("GLboolean") - public static boolean glIsTransformFeedback(@NativeType("GLuint") int id) { - return GL40C.glIsTransformFeedback(id); - } - - // --- [ glPauseTransformFeedback ] --- - - /** - * Pauses transform feedback operations for the currently bound transform feedback object. - * - *

    When transform feedback operations are paused, transform feedback is still considered active and changing most transform feedback state related to the - * object results in an error. However, a new transform feedback object may be bound while transform feedback is paused. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} - * is generated by PauseTransformFeedback if the currently bound transform feedback is not active or is paused.

    - * - *

    When transform feedback is active and not paused, all geometric primitives generated must be compatible with the value of {@code primitiveMode} passed - * to {@link GL30C#glBeginTransformFeedback BeginTransformFeedback}. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link GL11#glBegin Begin} or any operation that implicitly calls {@link GL11#glBegin Begin} - * (such as {@link GL11C#glDrawElements DrawElements}) if {@code mode} is not one of the allowed modes. If a geometry shader is active, its output primitive type is used instead - * of the {@code mode} parameter passed to {@link GL11#glBegin Begin} for the purposes of this error check. Any primitive type may be used while transform feedback is - * paused.

    - */ - public static void glPauseTransformFeedback() { - GL40C.glPauseTransformFeedback(); - } - - // --- [ glResumeTransformFeedback ] --- - - /** - * Resumes transform feedback operations for the currently bound transform feedback object. - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link #glResumeTransformFeedback ResumeTransformFeedback} if the currently bound transform feedback is not active or is not paused.

    - */ - public static void glResumeTransformFeedback() { - GL40C.glResumeTransformFeedback(); - } - - // --- [ glDrawTransformFeedback ] --- - - /** - * Render primitives using a count derived from a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - */ - public static void glDrawTransformFeedback(@NativeType("GLenum") int mode, @NativeType("GLuint") int id) { - GL40C.glDrawTransformFeedback(mode, id); - } - - /** Array version of: {@link #glDeleteTransformFeedbacks DeleteTransformFeedbacks} */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") int[] ids) { - GL40C.glDeleteTransformFeedbacks(ids); - } - - /** Array version of: {@link #glGenTransformFeedbacks GenTransformFeedbacks} */ - public static void glGenTransformFeedbacks(@NativeType("GLuint *") int[] ids) { - GL40C.glGenTransformFeedbacks(ids); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedback3.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedback3.java deleted file mode 100644 index cde7eb34..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedback3.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_transform_feedback3 extension. - * - *

    This extension further extends the transform feedback capabilities provided by the {@link EXTTransformFeedback EXT_transform_feedback}, {@link NVTransformFeedback NV_transform_feedback}, and - * {@link NVTransformFeedback2 NV_transform_feedback2} extensions. Those extensions provided a new transform feedback mode, where selected vertex attributes can be recorded to - * a buffer object for each primitive processed by the GL.

    - * - *

    This extension provides increased flexibility in how vertex attributes can be written to buffer objects. Previous extensions allowed applications to - * record a set of attributes interleaved into a single buffer object (interleaved mode) or to record into multiple objects, but with only a single - * attribute per buffer (separate mode). This extension extends interleaved mode to write into multiple buffers, with multiple attributes per buffer. This - * capability is supported for all three styles of transform feedback:

    - * - *
      - *
    • "EXT"-style GLSL transform feedback ({@link EXTTransformFeedback EXT_transform_feedback}), where a list of varyings is provided prior to linking a program object and is - * used whenever that program object is used.
    • - *
    • "NV"-style GLSL transform feedback ({@link NVTransformFeedback2 NV_transform_feedback2}), where "locations" of active varyings are queried after linking - * and are then passed to a function that sets the active transform feedback varyings for the program object. Unlike the "EXT"-style mode, the set of - * varyings to capture can be changed without relinking.
    • - *
    • Transform feedback for fixed-function or assembly vertex/geometry shaders ({@link NVTransformFeedback2 NV_transform_feedback2}), where applications specify a set of - * canonical attribute enums/numbers to capture.
    • - *
    - * - *

    Additionally, this extension adds new support for multiple separate vertex streams. New geometry shader functionality provided by the - * {@link ARBGPUShader5 ARB_gpu_shader5} and NV_gpu_program5 extensions allows geometry shaders to direct each vertex arbitrarily at a specified - * vertex stream. For example, a geometry program might write each "regular" vertex it emits to one vertex stream while writing some per-primitive data it - * computes to a second vertex stream. This extension allows applications to choose a vertex stream for each buffer object it writes to, and allows the - * vertices written to each vertex stream to be recorded in separate buffer objects. Only one stream may be selected for rasterization, and in the initial - * implementation, the geometry shader output topology must be {@link GL11#GL_POINTS POINTS} if multiple streams are used. When geometry shaders are not used, or when an old - * geometry shader not writing multiple streams is used, all vertices produced by the GL are directed at the stream numbered zero. The set of transform - * feedback-related query targets is extended to accommodate multiple vertex streams, so it is possible to count the number of processed and recorded - * primitives for each stream separately.

    - * - *

    Requires {@link GL30 OpenGL 3.0} or {@link EXTTransformFeedback EXT_transform_feedback} or {@link NVTransformFeedback NV_transform_feedback}. Promoted to core in {@link GL40 OpenGL 4.0}.

    - */ -public class ARBTransformFeedback3 { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70, - GL_MAX_VERTEX_STREAMS = 0x8E71; - - protected ARBTransformFeedback3() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawTransformFeedbackStream ] --- - - /** - * Renders primitives using a count derived from a specifed stream of a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param stream the index of the transform feedback stream from which to retrieve a primitive count - */ - public static void glDrawTransformFeedbackStream(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLuint") int stream) { - GL40C.glDrawTransformFeedbackStream(mode, id, stream); - } - - // --- [ glBeginQueryIndexed ] --- - - /** - * Begins a query object on an indexed target - * - * @param target the target type of query object established between {@code glBeginQueryIndexed} and the subsequent {@link #glEndQueryIndexed EndQueryIndexed}. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query target upon which to begin the query - * @param id the name of a query object - */ - public static void glBeginQueryIndexed(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int id) { - GL40C.glBeginQueryIndexed(target, index, id); - } - - // --- [ glEndQueryIndexed ] --- - - /** - * Ends a query object on an indexed target - * - * @param target the target type of query object to be concluded. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query target upon which to end the query - */ - public static void glEndQueryIndexed(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - GL40C.glEndQueryIndexed(target, index); - } - - // --- [ glGetQueryIndexediv ] --- - - /** Unsafe version of: {@link #glGetQueryIndexediv GetQueryIndexediv} */ - public static void nglGetQueryIndexediv(int target, int index, int pname, long params) { - GL40C.nglGetQueryIndexediv(target, index, pname, params); - } - - /** - * Returns parameters of an indexed query object target. - * - * @param target a query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query object target - * @param pname the symbolic name of a query object target parameter - * @param params the requested data - */ - public static void glGetQueryIndexediv(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL40C.glGetQueryIndexediv(target, index, pname, params); - } - - /** - * Returns parameters of an indexed query object target. - * - * @param target a query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query object target - * @param pname the symbolic name of a query object target parameter - */ - @NativeType("void") - public static int glGetQueryIndexedi(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL40C.glGetQueryIndexedi(target, index, pname); - } - - /** Array version of: {@link #glGetQueryIndexediv GetQueryIndexediv} */ - public static void glGetQueryIndexediv(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL40C.glGetQueryIndexediv(target, index, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java deleted file mode 100644 index 538ce79d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_transform_feedback_instanced extension. - * - *

    Multiple instances of geometry may be specified to the GL by calling functions such as {@link GL31C#glDrawArraysInstanced DrawArraysInstanced} and {@link GL31C#glDrawElementsInstanced DrawElementsInstanced}. - * Further, the results of a transform feedback operation may be returned to the GL by calling {@link GL40C#glDrawTransformFeedback DrawTransformFeedback}, or - * {@link GL40C#glDrawTransformFeedbackStream DrawTransformFeedbackStream}. However, it is not presently possible to draw multiple instances of data transform feedback without using a query - * and the resulting round trip from server to client.

    - * - *

    This extension adds functionality to draw multiple instances of the result of a transform feedback operation.

    - * - *

    Requires {@link GL40 OpenGL 4.0} or {@link ARBTransformFeedback2 ARB_transform_feedback2}. Requires {@link GL31 OpenGL 3.1} or {@link ARBDrawInstanced ARB_draw_instanced}. Promoted to core in {@link GL42 OpenGL 4.2}.

    - */ -public class ARBTransformFeedbackInstanced { - - static { GL.initialize(); } - - protected ARBTransformFeedbackInstanced() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawTransformFeedbackInstanced ] --- - - /** - * Renders multiple instances of primitives using a count derived from a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param primcount the number of instances of the geometry to render - */ - public static void glDrawTransformFeedbackInstanced(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLsizei") int primcount) { - GL42C.glDrawTransformFeedbackInstanced(mode, id, primcount); - } - - // --- [ glDrawTransformFeedbackStreamInstanced ] --- - - /** - * Renders multiple instances of primitives using a count derived from a specifed stream of a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param stream the index of the transform feedback stream from which to retrieve a primitive count - * @param primcount the number of instances of the geometry to render - */ - public static void glDrawTransformFeedbackStreamInstanced(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLuint") int stream, @NativeType("GLsizei") int primcount) { - GL42C.glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackOverflowQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackOverflowQuery.java deleted file mode 100644 index 47915f88..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransformFeedbackOverflowQuery.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_transform_feedback_overflow_query extension. - * - *

    This extension adds new query types which can be used to detect overflow of transform feedback buffers. The new query types are also accepted by - * conditional rendering commands.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public final class ARBTransformFeedbackOverflowQuery { - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBeginQuery BeginQuery}, {@link GL15C#glEndQuery EndQuery}, {@link GL15C#glGetQueryiv GetQueryiv}, - * {@link GL40C#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40C#glEndQueryIndexed EndQueryIndexed} and {@link GL40C#glGetQueryIndexediv GetQueryIndexediv}. - */ - public static final int - GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB = 0x82EC, - GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB = 0x82ED; - - private ARBTransformFeedbackOverflowQuery() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransposeMatrix.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransposeMatrix.java deleted file mode 100644 index 3a2bde7d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBTransposeMatrix.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_transpose_matrix extension. - * - *

    New functions and tokens are added allowing application matrices stored in row major order rather than column major order to be transferred to the - * OpenGL implementation. This allows an application to use standard C-language 2-dimensional arrays ({@code m[row][col]}) and have the array indices match the - * expected matrix row and column indexes. These arrays are referred to as transpose matrices since they are the transpose of the standard matrices passed - * to OpenGL.

    - * - *

    This extension adds an interface for transfering data to and from the OpenGL pipeline, it does not change any OpenGL processing or imply any changes in - * state representation.

    - * - *

    Promoted to core in {@link GL13 OpenGL 1.3}.

    - */ -public class ARBTransposeMatrix { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3, - GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4, - GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5, - GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6; - - protected ARBTransposeMatrix() { - throw new UnsupportedOperationException(); - } - - // --- [ glLoadTransposeMatrixfARB ] --- - - /** Unsafe version of: {@link #glLoadTransposeMatrixfARB LoadTransposeMatrixfARB} */ - public static native void nglLoadTransposeMatrixfARB(long m); - - /** - * Sets the current matrix to a 4 × 4 matrix in row-major order. - * - *

    The matrix is stored as 16 consecutive values, i.e. as:

    - * - * - * - * - * - * - *
    a1a2a3a4
    a5a6a7a8
    a9a10a11a12
    a13a14a15a16
    - * - * @param m the matrix data - */ - public static void glLoadTransposeMatrixfARB(@NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglLoadTransposeMatrixfARB(memAddress(m)); - } - - // --- [ glLoadTransposeMatrixdARB ] --- - - /** Unsafe version of: {@link #glLoadTransposeMatrixdARB LoadTransposeMatrixdARB} */ - public static native void nglLoadTransposeMatrixdARB(long m); - - /** - * Double version of {@link #glLoadTransposeMatrixfARB LoadTransposeMatrixfARB}. - * - * @param m the matrix data - */ - public static void glLoadTransposeMatrixdARB(@NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglLoadTransposeMatrixdARB(memAddress(m)); - } - - // --- [ glMultTransposeMatrixfARB ] --- - - /** Unsafe version of: {@link #glMultTransposeMatrixfARB MultTransposeMatrixfARB} */ - public static native void nglMultTransposeMatrixfARB(long m); - - /** - * Multiplies the current matrix with a 4 × 4 matrix in row-major order. See {@link #glLoadTransposeMatrixfARB LoadTransposeMatrixfARB} for details. - * - * @param m the matrix data - */ - public static void glMultTransposeMatrixfARB(@NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMultTransposeMatrixfARB(memAddress(m)); - } - - // --- [ glMultTransposeMatrixdARB ] --- - - /** Unsafe version of: {@link #glMultTransposeMatrixdARB MultTransposeMatrixdARB} */ - public static native void nglMultTransposeMatrixdARB(long m); - - /** - * Double version of {@link #glMultTransposeMatrixfARB MultTransposeMatrixfARB}. - * - * @param m the matrix data - */ - public static void glMultTransposeMatrixdARB(@NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMultTransposeMatrixdARB(memAddress(m)); - } - - /** Array version of: {@link #glLoadTransposeMatrixfARB LoadTransposeMatrixfARB} */ - public static void glLoadTransposeMatrixfARB(@NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glLoadTransposeMatrixfARB; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** Array version of: {@link #glLoadTransposeMatrixdARB LoadTransposeMatrixdARB} */ - public static void glLoadTransposeMatrixdARB(@NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glLoadTransposeMatrixdARB; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** Array version of: {@link #glMultTransposeMatrixfARB MultTransposeMatrixfARB} */ - public static void glMultTransposeMatrixfARB(@NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMultTransposeMatrixfARB; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** Array version of: {@link #glMultTransposeMatrixdARB MultTransposeMatrixdARB} */ - public static void glMultTransposeMatrixdARB(@NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glMultTransposeMatrixdARB; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBUniformBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBUniformBufferObject.java deleted file mode 100644 index 918c2844..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBUniformBufferObject.java +++ /dev/null @@ -1,481 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_uniform_buffer_object extension. - * - *

    This extension introduces the concept of a group of GLSL uniforms known as a "uniform block", and the API mechanisms to store "uniform blocks" in GL - * buffer objects.

    - * - *

    The extension also defines both a standard cross-platform layout in memory for uniform block data, as well as mechanisms to allow the GL to optimize the - * data layout in an implementation-defined manner.

    - * - *

    Prior to this extension, the existing interface for modification of uniform values allowed modification of large numbers of values using glUniform* - * calls, but only for a single uniform name (or a uniform array) at a time. However, updating uniforms in this manner may not map well to heterogenous - * uniform data structures defined for a GL application and in these cases, the application is forced to either:

    - * - *
      - *
    1. restructure their uniform data definitions into arrays or
    2. - *
    3. make an excessive number of calls through the GL interface to one of the Uniform* variants.
    4. - *
    - * - *

    These solutions have their disadvantages. Solution A imposes considerable development overhead on the application developer. Solution B may impose - * considerable run-time overhead on the application if the number of uniforms modified in a given frame of rendering is sufficiently large.

    - * - *

    This extension provides a better alternative to either (A) or (B) by allowing buffer object backing for the storage associated with all uniforms of a - * given GLSL program.

    - * - *

    Storing uniform blocks in buffer objects enables several key use cases:

    - * - *
      - *
    • sharing of uniform data storage between program objects and between program stages
    • - *
    • rapid swapping of sets of previously defined uniforms by storing sets of uniform data on the GL server
    • - *
    • rapid updates of uniform data from both the client and the server
    • - *
    - * - *

    The data storage for a uniform block can be declared to use one of three layouts in memory: packed, shared, or std140.

    - * - *
      - *
    • "packed" uniform blocks have an implementation-dependent data layout for efficiency, and unused uniforms may be eliminated by the compiler to save - * space.
    • - *
    • "shared" uniform blocks, the default layout, have an implementation-dependent data layout for efficiency, but the layout will be uniquely determined - * by the structure of the block, allowing data storage to be shared across programs.
    • - *
    • "std140" uniform blocks have a standard cross-platform cross-vendor layout (see below). Unused uniforms will not be eliminated.
    • - *
    - * - *

    Any uniforms not declared in a named uniform block are said to be part of the "default uniform block".

    - * - *

    While uniforms in the default uniform block are updated with glUniform* entry points and can have static initializers, uniforms in named uniform blocks - * are not. Instead, uniform block data is updated using the routines that update buffer objects and can not use static initializers.

    - * - *

    Rules and Concepts Guiding this Specification:

    - * - *

    For reference, a uniform has a "uniform index" (subsequently referred to as "u_index) and also a "uniform location" to efficiently identify it in the - * uniform data store of the implementation. We subsequently refer to this uniform data store of the implementation as the "uniform database".

    - * - *

    A "uniform block" only has a "uniform block index" used for queries and connecting the "uniform block" to a buffer object. A "uniform block" has no - * "location" because "uniform blocks" are not updated directly. The buffer object APIs are used instead.

    - * - *

    Properties of Uniforms and uniform blocks:

    - * - *
      - *
    1. A uniform is "active" if it exists in the database and has a valid u_index.
    2. - *
    3. A "uniform block" is "active" if it exists in the database and has a valid ub_index.
    4. - *
    5. Uniforms and "uniform blocks" can be inactive because they don't exist in the source, or because they have been removed by dead code elimination.
    6. - *
    7. An inactive uniform has u_index == {@link #GL_INVALID_INDEX INVALID_INDEX}.
    8. - *
    9. An inactive uniform block has ub_index == {@link #GL_INVALID_INDEX INVALID_INDEX}.
    10. - *
    11. A u_index or ub_index of {@link #GL_INVALID_INDEX INVALID_INDEX} generates the {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error if given as a function argument.
    12. - *
    13. The default uniform block, which is not assigned any ub_index, uses a private, internal data storage, and does not have any buffer object associated - * with it.
    14. - *
    15. An active uniform that is a member of the default uniform block has location ≥ 0 and it has offset == stride == -1.
    16. - *
    17. An active uniform that is a member of a named uniform block has location == -1.
    18. - *
    19. A uniform location of -1 is silently ignored if given as a function argument.
    20. - *
    21. Uniform block declarations may not be nested
    22. - *
    - * - *

    Requires {@link GL20 OpenGL 2.0} or {@link ARBShaderObjects ARB_shader_objects} and {@link GL15 OpenGL 1.5} or {@link ARBVertexBufferObject ARB_vertex_buffer_object}. Promoted to core in {@link GL31 OpenGL 3.1}.

    - */ -public class ARBUniformBufferObject { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_UNIFORM_BUFFER = 0x8A11; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_UNIFORM_BUFFER_BINDING = 0x8A28; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v. */ - public static final int - GL_UNIFORM_BUFFER_START = 0x8A29, - GL_UNIFORM_BUFFER_SIZE = 0x8A2A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, - GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, - GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, - GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, - GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, - GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, - GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, - GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, - GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, - GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, - GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; - - /** Accepted by the {@code pname} parameter of GetActiveUniformsiv. */ - public static final int - GL_UNIFORM_TYPE = 0x8A37, - GL_UNIFORM_SIZE = 0x8A38, - GL_UNIFORM_NAME_LENGTH = 0x8A39, - GL_UNIFORM_BLOCK_INDEX = 0x8A3A, - GL_UNIFORM_OFFSET = 0x8A3B, - GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, - GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, - GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int - GL_UNIFORM_BLOCK_BINDING = 0x8A3F, - GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, - GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, - GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, - GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, - GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; - - /** Returned by GetActiveUniformsiv and GetUniformBlockIndex. */ - public static final int GL_INVALID_INDEX = 0xFFFFFFFF; - - protected ARBUniformBufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetUniformIndices ] --- - - /** - * Unsafe version of: {@link #glGetUniformIndices GetUniformIndices} - * - * @param uniformCount the number of uniforms whose indices to query - */ - public static void nglGetUniformIndices(int program, int uniformCount, long uniformNames, long uniformIndices) { - GL31C.nglGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * @param uniformNames an array of pointers to buffers containing the names of the queried uniforms - * @param uniformIndices an array that will receive the indices of the uniforms - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer uniformNames, @NativeType("GLuint *") IntBuffer uniformIndices) { - GL31C.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * @param uniformNames an array of pointers to buffers containing the names of the queried uniforms - * @param uniformIndices an array that will receive the indices of the uniforms - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence[] uniformNames, @NativeType("GLuint *") IntBuffer uniformIndices) { - GL31C.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - */ - @NativeType("void") - public static int glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence uniformName) { - return GL31C.glGetUniformIndices(program, uniformName); - } - - // --- [ glGetActiveUniformsiv ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformsiv GetActiveUniformsiv} - * - * @param uniformCount the number of elements in the array of indices {@code uniformIndices} and the number of parameters written to {@code params} upon successful return - */ - public static void nglGetActiveUniformsiv(int program, int uniformCount, long uniformIndices, int pname, long params) { - GL31C.nglGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); - } - - /** - * Returns information about several active uniform variables for the specified program object. - * - * @param program the program object to be queried - * @param uniformIndices an array of {@code uniformCount} integers containing the indices of uniforms within {@code program} - * @param pname the property of the each uniform in {@code uniformIndices} that should be written into the corresponding element of {@code params} - * @param params an array of {@code uniformCount} integers which are to receive the value of {@code pname} for each uniform in {@code uniformIndices} - */ - public static void glGetActiveUniformsiv(@NativeType("GLuint") int program, @NativeType("GLuint const *") IntBuffer uniformIndices, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL31C.glGetActiveUniformsiv(program, uniformIndices, pname, params); - } - - /** - * Returns information about several active uniform variables for the specified program object. - * - * @param program the program object to be queried - * @param pname the property of the each uniform in {@code uniformIndices} that should be written into the corresponding element of {@code params} - */ - @NativeType("void") - public static int glGetActiveUniformsi(@NativeType("GLuint") int program, @NativeType("GLuint const *") int uniformIndex, @NativeType("GLenum") int pname) { - return GL31C.glGetActiveUniformsi(program, uniformIndex, pname); - } - - // --- [ glGetActiveUniformName ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformName GetActiveUniformName} - * - * @param bufSize the size of the buffer, in units of {@code GLchar}, of the buffer whose address is specified in {@code uniformName} - */ - public static void nglGetActiveUniformName(int program, int uniformIndex, int bufSize, long length, long uniformName) { - GL31C.nglGetActiveUniformName(program, uniformIndex, bufSize, length, uniformName); - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * @param length the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by {@code uniformName} - * @param uniformName the address of a buffer into which the GL will place the name of the active uniform at {@code uniformIndex} within {@code program} - */ - public static void glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer uniformName) { - GL31C.glGetActiveUniformName(program, uniformIndex, length, uniformName); - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * @param bufSize the size of the buffer, in units of {@code GLchar}, of the buffer whose address is specified in {@code uniformName} - */ - @NativeType("void") - public static String glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @NativeType("GLsizei") int bufSize) { - return GL31C.glGetActiveUniformName(program, uniformIndex, bufSize); - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - */ - @NativeType("void") - public static String glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex) { - return glGetActiveUniformName(program, uniformIndex, glGetActiveUniformsi(program, uniformIndex, GL_UNIFORM_NAME_LENGTH)); - } - - // --- [ glGetUniformBlockIndex ] --- - - /** Unsafe version of: {@link #glGetUniformBlockIndex GetUniformBlockIndex} */ - public static int nglGetUniformBlockIndex(int program, long uniformBlockName) { - return GL31C.nglGetUniformBlockIndex(program, uniformBlockName); - } - - /** - * Retrieves the index of a named uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockName an array of characters to containing the name of the uniform block whose index to retrieve - */ - @NativeType("GLuint") - public static int glGetUniformBlockIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer uniformBlockName) { - return GL31C.glGetUniformBlockIndex(program, uniformBlockName); - } - - /** - * Retrieves the index of a named uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockName an array of characters to containing the name of the uniform block whose index to retrieve - */ - @NativeType("GLuint") - public static int glGetUniformBlockIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence uniformBlockName) { - return GL31C.glGetUniformBlockIndex(program, uniformBlockName); - } - - // --- [ glGetActiveUniformBlockiv ] --- - - /** Unsafe version of: {@link #glGetActiveUniformBlockiv GetActiveUniformBlockiv} */ - public static void nglGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, long params) { - GL31C.nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); - } - - /** - * Queries information about an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param pname the name of the parameter to query. One of:
    {@link GL31C#GL_UNIFORM_BLOCK_BINDING UNIFORM_BLOCK_BINDING}{@link GL31C#GL_UNIFORM_BLOCK_DATA_SIZE UNIFORM_BLOCK_DATA_SIZE}
    {@link GL31C#GL_UNIFORM_BLOCK_NAME_LENGTH UNIFORM_BLOCK_NAME_LENGTH}{@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS UNIFORM_BLOCK_ACTIVE_UNIFORMS}
    {@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER}
    {@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER}
    - * @param params the address of a variable to receive the result of the query - */ - public static void glGetActiveUniformBlockiv(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL31C.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); - } - - /** - * Queries information about an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param pname the name of the parameter to query. One of:
    {@link GL31C#GL_UNIFORM_BLOCK_BINDING UNIFORM_BLOCK_BINDING}{@link GL31C#GL_UNIFORM_BLOCK_DATA_SIZE UNIFORM_BLOCK_DATA_SIZE}
    {@link GL31C#GL_UNIFORM_BLOCK_NAME_LENGTH UNIFORM_BLOCK_NAME_LENGTH}{@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS UNIFORM_BLOCK_ACTIVE_UNIFORMS}
    {@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER}
    {@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER}
    - */ - @NativeType("void") - public static int glGetActiveUniformBlocki(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname) { - return GL31C.glGetActiveUniformBlocki(program, uniformBlockIndex, pname); - } - - // --- [ glGetActiveUniformBlockName ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformBlockName GetActiveUniformBlockName} - * - * @param bufSize the size of the buffer addressed by {@code uniformBlockName} - */ - public static void nglGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize, long length, long uniformBlockName) { - GL31C.nglGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param length the address of a variable to receive the number of characters that were written to {@code uniformBlockName} - * @param uniformBlockName an array of characters to receive the name of the uniform block at {@code uniformBlockIndex} - */ - public static void glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer uniformBlockName) { - GL31C.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param bufSize the size of the buffer addressed by {@code uniformBlockName} - */ - @NativeType("void") - public static String glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLsizei") int bufSize) { - return GL31C.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize); - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - */ - @NativeType("void") - public static String glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex) { - return glGetActiveUniformBlockName(program, uniformBlockIndex, glGetActiveUniformBlocki(program, uniformBlockIndex, GL_UNIFORM_BLOCK_NAME_LENGTH)); - } - - // --- [ glBindBufferRange ] --- - - /** - * Binds a range within a buffer object to an indexed buffer target. - * - * @param target the target of the bind operation. One of:
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}
    - * @param index the index of the binding point within the array specified by {@code target} - * @param buffer a buffer object to bind to the specified binding point - * @param offset the starting offset in basic machine units into the buffer object {@code buffer} - * @param size the amount of data in machine units that can be read from the buffer object while used as an indexed target - */ - public static void glBindBufferRange(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL30C.glBindBufferRange(target, index, buffer, offset, size); - } - - // --- [ glBindBufferBase ] --- - - /** - * Binds a buffer object to an indexed buffer target. - * - * @param target the target of the bind operation. One of:
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}
    - * @param index the index of the binding point within the array specified by {@code target} - * @param buffer a buffer object to bind to the specified binding point - */ - public static void glBindBufferBase(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer) { - GL30C.glBindBufferBase(target, index, buffer); - } - - // --- [ glGetIntegeri_v ] --- - - /** Unsafe version of: {@link #glGetIntegeri_v GetIntegeri_v} */ - public static void nglGetIntegeri_v(int target, int index, long data) { - GL30C.nglGetIntegeri_v(target, index, data); - } - - /** - * Queries the integer value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - */ - public static void glGetIntegeri_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer data) { - GL30C.glGetIntegeri_v(target, index, data); - } - - /** - * Queries the integer value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - */ - @NativeType("void") - public static int glGetIntegeri(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL30C.glGetIntegeri(target, index); - } - - // --- [ glUniformBlockBinding ] --- - - /** - * Assigns a binding point to an active uniform block. - * - * @param program the name of a program object containing the active uniform block whose binding to assign - * @param uniformBlockIndex the index of the active uniform block within {@code program} whose binding to assign - * @param uniformBlockBinding the binding point to which to bind the uniform block with index {@code uniformBlockIndex} within {@code program} - */ - public static void glUniformBlockBinding(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLuint") int uniformBlockBinding) { - GL31C.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); - } - - /** Array version of: {@link #glGetUniformIndices GetUniformIndices} */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer uniformNames, @NativeType("GLuint *") int[] uniformIndices) { - GL31C.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - /** Array version of: {@link #glGetActiveUniformsiv GetActiveUniformsiv} */ - public static void glGetActiveUniformsiv(@NativeType("GLuint") int program, @NativeType("GLuint const *") int[] uniformIndices, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL31C.glGetActiveUniformsiv(program, uniformIndices, pname, params); - } - - /** Array version of: {@link #glGetActiveUniformName GetActiveUniformName} */ - public static void glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer uniformName) { - GL31C.glGetActiveUniformName(program, uniformIndex, length, uniformName); - } - - /** Array version of: {@link #glGetActiveUniformBlockiv GetActiveUniformBlockiv} */ - public static void glGetActiveUniformBlockiv(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL31C.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); - } - - /** Array version of: {@link #glGetActiveUniformBlockName GetActiveUniformBlockName} */ - public static void glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer uniformBlockName) { - GL31C.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); - } - - /** Array version of: {@link #glGetIntegeri_v GetIntegeri_v} */ - public static void glGetIntegeri_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") int[] data) { - GL30C.glGetIntegeri_v(target, index, data); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexArrayBGRA.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexArrayBGRA.java deleted file mode 100644 index 06b9cb6d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexArrayBGRA.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ARB_vertex_array_bgra extension. - * - *

    This extension provides a single new component format for vertex arrays to read 4-component unsigned byte vertex attributes with a BGRA component - * ordering.

    - * - *

    OpenGL expects vertex arrays containing 4 unsigned bytes per element to be in the RGBA, STRQ, or XYZW order (reading components left-to-right in their - * lower address to higher address order). Essentially the order the components appear in memory is the order the components appear in the resulting vertex - * attribute vector.

    - * - *

    However Direct3D has color (diffuse and specular) vertex arrays containing 4 unsigned bytes per element that are in a BGRA order (again reading - * components left-to-right in their lower address to higher address order). Direct3D calls this "ARGB" reading the components in the opposite order - * (reading components left-to-right in their higher address to lower address order). This ordering is generalized in the DirectX 10 by the - * DXGI_FORMAT_B8G8R8A8_UNORM format.

    - * - *

    For an OpenGL application to source color data from a vertex buffer formatted for Direct3D's color array format conventions, the application is forced - * to either:

    - * - *
      - *
    1. Rely on a vertex program or shader to swizzle the color components from the BGRA to conventional RGBA order.
    2. - *
    3. Re-order the color data components in the vertex buffer from Direct3D's native BGRA order to OpenGL's native RGBA order.
    4. - *
    - * - *

    Neither option is entirely satisfactory.

    - * - *

    Option 1 means vertex shaders have to be re-written to source colors differently. If the same vertex shader is used with vertex arrays configured to - * source the color as 4 floating-point color components, the swizzle for BGRA colors stored as 4 unsigned bytes is no longer appropriate. The shader's - * swizzling of colors becomes dependent on the type and number of color components. Ideally the vertex shader should be independent from the format and - * component ordering of the data it sources.

    - * - *

    Option 2 is expensive because vertex buffers may have to be reformatted prior to use. OpenGL treats the memory for vertex arrays (whether client-side - * memory or buffer objects) as essentially untyped memory and vertex arrays can be stored separately, interleaved, or even interwoven (where multiple - * arrays overlap with differing strides and formats).

    - * - *

    Rather than force a re-ordering of either vertex array components in memory or a vertex array format-dependent re-ordering of vertex shader inputs, - * OpenGL can simply provide a vertex array format that matches the Direct3D color component ordering.

    - * - *

    This approach mimics that of the {@link EXTBGRA EXT_bgra} extension for pixel and texel formats except for vertex instead of image data.

    - * - *

    Promoted to core in {@link GL32 OpenGL 3.2}.

    - */ -public final class ARBVertexArrayBGRA { - - /** Accepted by the {@code size} parameter of ColorPointer, SecondaryColorPointer, and VertexAttribPointer. */ - public static final int GL_BGRA = 0x80E1; - - private ARBVertexArrayBGRA() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexArrayObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexArrayObject.java deleted file mode 100644 index b634ee21..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexArrayObject.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_vertex_array_object extension. - * - *

    This extension introduces named vertex array objects which encapsulate vertex array state on the client side. These objects allow applications to - * rapidly switch between large sets of array state. In addition, layered libraries can return to the default array state by simply creating and binding a - * new vertex array object.

    - * - *

    This extension differs from GL_APPLE_vertex_array_object in that client memory cannot be accessed through a non-zero vertex array object. It also - * differs in that vertex array objects are explicitly not sharable between contexts.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class ARBVertexArrayObject { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_VERTEX_ARRAY_BINDING = 0x85B5; - - protected ARBVertexArrayObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindVertexArray ] --- - - /** - * Binds a vertex array object - * - * @param array the name of the vertex array to bind - */ - public static void glBindVertexArray(@NativeType("GLuint") int array) { - GL30C.glBindVertexArray(array); - } - - // --- [ glDeleteVertexArrays ] --- - - /** - * Unsafe version of: {@link #glDeleteVertexArrays DeleteVertexArrays} - * - * @param n the number of vertex array objects to be deleted - */ - public static void nglDeleteVertexArrays(int n, long arrays) { - GL30C.nglDeleteVertexArrays(n, arrays); - } - - /** - * Deletes vertex array objects. - * - * @param arrays an array containing the n names of the objects to be deleted - */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") IntBuffer arrays) { - GL30C.glDeleteVertexArrays(arrays); - } - - /** Deletes vertex array objects. */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") int array) { - GL30C.glDeleteVertexArrays(array); - } - - // --- [ glGenVertexArrays ] --- - - /** - * Unsafe version of: {@link #glGenVertexArrays GenVertexArrays} - * - * @param n the number of vertex array object names to generate - */ - public static void nglGenVertexArrays(int n, long arrays) { - GL30C.nglGenVertexArrays(n, arrays); - } - - /** - * Generates vertex array object names. - * - * @param arrays a buffer in which the generated vertex array object names are stored - */ - public static void glGenVertexArrays(@NativeType("GLuint *") IntBuffer arrays) { - GL30C.glGenVertexArrays(arrays); - } - - /** Generates vertex array object names. */ - @NativeType("void") - public static int glGenVertexArrays() { - return GL30C.glGenVertexArrays(); - } - - // --- [ glIsVertexArray ] --- - - /** - * Determines if a name corresponds to a vertex array object. - * - * @param array a value that may be the name of a vertex array object - */ - @NativeType("GLboolean") - public static boolean glIsVertexArray(@NativeType("GLuint") int array) { - return GL30C.glIsVertexArray(array); - } - - /** Array version of: {@link #glDeleteVertexArrays DeleteVertexArrays} */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") int[] arrays) { - GL30C.glDeleteVertexArrays(arrays); - } - - /** Array version of: {@link #glGenVertexArrays GenVertexArrays} */ - public static void glGenVertexArrays(@NativeType("GLuint *") int[] arrays) { - GL30C.glGenVertexArrays(arrays); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexAttrib64Bit.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexAttrib64Bit.java deleted file mode 100644 index 857a450f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexAttrib64Bit.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_vertex_attrib_64bit extension. - * - *

    This extension provides OpenGL shading language support for vertex shader inputs with 64-bit floating-point components and OpenGL API support for - * specifying the value of those inputs using vertex array or immediate mode entry points. This builds on the support for general-purpose support for - * 64-bit floating-point values in the ARB_gpu_shader_fp64 extension.

    - * - *

    This extension provides a new class of vertex attribute functions, beginning with "VertexAttribL" ("L" for "long"), that can be used to specify - * attributes with 64-bit floating-point components. This extension provides no automatic type conversion between attribute and shader variables; - * single-precision attributes are not automatically converted to double-precision or vice versa. For shader variables with 64-bit component types, the - * "VertexAttribL" functions must be used to specify attribute values. For other shader variables, the "VertexAttribL" functions must not be used. If a - * vertex attribute is specified using the wrong attribute function, the values of the corresponding shader input are undefined. This approach requiring - * matching types is identical to that used for the "VertexAttribI" functions provided by OpenGL 3.0 and the {@link EXTGPUShader4 EXT_gpu_shader4} extension.

    - * - *

    Additionally, some vertex shader inputs using the wider 64-bit components may count double against the implementation-dependent limit on the number of - * vertex shader attribute vectors. A 64-bit scalar or a two-component vector consumes only a single generic vertex attribute; three- and four-component - * "long" may count as two. This approach is similar to the one used in the current GL where matrix attributes consume multiple attributes.

    - * - *

    Note that 64-bit generic vertex attributes were nominally supported beginning with the introduction of vertex shaders in OpenGL 2.0. However, the OpenGL - * Shading Language at the time had no support for 64-bit data types, so any such values were automatically converted to 32-bit.

    - * - *

    Support for 64-bit floating-point vertex attributes in this extension can be combined with other extensions. In particular, this extension provides an - * entry point that can be used with EXT_direct_state_access to directly set state for any vertex array object. Also, the related - * {@link NVVertexAttribInteger64bit NV_vertex_attrib_integer_64bit} extension provides an entry point to specify bindless vertex attribute arrays with 64-bit - * components, integer or floating-point.

    - * - *

    Requires {@link GL30 OpenGL 3.0}, GLSL 1.30 and {@link ARBGPUShaderFP64 ARB_gpu_shader_fp64}. Promoted to core in {@link GL41 OpenGL 4.1}.

    - */ -public class ARBVertexAttrib64Bit { - - static { GL.initialize(); } - - /** Returned in the {@code type} parameter of GetActiveAttrib. */ - public static final int - GL_DOUBLE_VEC2 = 0x8FFC, - GL_DOUBLE_VEC3 = 0x8FFD, - GL_DOUBLE_VEC4 = 0x8FFE, - GL_DOUBLE_MAT2 = 0x8F46, - GL_DOUBLE_MAT3 = 0x8F47, - GL_DOUBLE_MAT4 = 0x8F48, - GL_DOUBLE_MAT2x3 = 0x8F49, - GL_DOUBLE_MAT2x4 = 0x8F4A, - GL_DOUBLE_MAT3x2 = 0x8F4B, - GL_DOUBLE_MAT3x4 = 0x8F4C, - GL_DOUBLE_MAT4x2 = 0x8F4D, - GL_DOUBLE_MAT4x3 = 0x8F4E; - - protected ARBVertexAttrib64Bit() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttribL1d ] --- - - /** - * Specifies the value of a generic vertex attribute. The y and z components are implicitly set to 0.0 and w to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - */ - public static void glVertexAttribL1d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x) { - GL41C.glVertexAttribL1d(index, x); - } - - // --- [ glVertexAttribL2d ] --- - - /** - * Specifies the value of a generic vertex attribute. The y component is implicitly set to 0.0 and w to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - */ - public static void glVertexAttribL2d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y) { - GL41C.glVertexAttribL2d(index, x, y); - } - - // --- [ glVertexAttribL3d ] --- - - /** - * Specifies the value of a generic vertex attribute. The w is implicitly set to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - */ - public static void glVertexAttribL3d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z) { - GL41C.glVertexAttribL3d(index, x, y, z); - } - - // --- [ glVertexAttribL4d ] --- - - /** - * Specifies the value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - */ - public static void glVertexAttribL4d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w) { - GL41C.glVertexAttribL4d(index, x, y, z, w); - } - - // --- [ glVertexAttribL1dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL1dv VertexAttribL1dv} */ - public static void nglVertexAttribL1dv(int index, long v) { - GL41C.nglVertexAttribL1dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL1d VertexAttribL1d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttribL1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL1dv(index, v); - } - - // --- [ glVertexAttribL2dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL2dv VertexAttribL2dv} */ - public static void nglVertexAttribL2dv(int index, long v) { - GL41C.nglVertexAttribL2dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL2d VertexAttribL2d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttribL2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL2dv(index, v); - } - - // --- [ glVertexAttribL3dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL3dv VertexAttribL3dv} */ - public static void nglVertexAttribL3dv(int index, long v) { - GL41C.nglVertexAttribL3dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL3d VertexAttribL3d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttribL3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL3dv(index, v); - } - - // --- [ glVertexAttribL4dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL4dv VertexAttribL4dv} */ - public static void nglVertexAttribL4dv(int index, long v) { - GL41C.nglVertexAttribL4dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL4d VertexAttribL4d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttribL4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL4dv(index, v); - } - - // --- [ glVertexAttribLPointer ] --- - - /** - * Unsafe version of: {@link #glVertexAttribLPointer VertexAttribLPointer} - * - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - */ - public static void nglVertexAttribLPointer(int index, int size, int type, int stride, long pointer) { - GL41C.nglVertexAttribLPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - GL41C.glVertexAttribLPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - GL41C.glVertexAttribLPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLsizei") int stride, @NativeType("void const *") DoubleBuffer pointer) { - GL41C.glVertexAttribLPointer(index, size, stride, pointer); - } - - // --- [ glGetVertexAttribLdv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribLdv GetVertexAttribLdv} */ - public static void nglGetVertexAttribLdv(int index, int pname, long params) { - GL41C.nglGetVertexAttribLdv(index, pname, params); - } - - /** - * Double version of {@link GL20C#glGetVertexAttribiv GetVertexAttribiv}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params the requested data - */ - public static void glGetVertexAttribLdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - GL41C.glGetVertexAttribLdv(index, pname, params); - } - - // --- [ glVertexArrayVertexAttribLOffsetEXT ] --- - - /** - * DSA version of {@link #glVertexAttribLPointer VertexAttribLPointer}. - * - * @param vaobj the vertex array object - * @param buffer the buffer object - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param offset the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer. The initial value is 0. - */ - public static native void glVertexArrayVertexAttribLOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - /** Array version of: {@link #glVertexAttribL1dv VertexAttribL1dv} */ - public static void glVertexAttribL1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL1dv(index, v); - } - - /** Array version of: {@link #glVertexAttribL2dv VertexAttribL2dv} */ - public static void glVertexAttribL2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL2dv(index, v); - } - - /** Array version of: {@link #glVertexAttribL3dv VertexAttribL3dv} */ - public static void glVertexAttribL3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL3dv(index, v); - } - - /** Array version of: {@link #glVertexAttribL4dv VertexAttribL4dv} */ - public static void glVertexAttribL4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL4dv(index, v); - } - - /** Array version of: {@link #glGetVertexAttribLdv GetVertexAttribLdv} */ - public static void glGetVertexAttribLdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - GL41C.glGetVertexAttribLdv(index, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexAttribBinding.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexAttribBinding.java deleted file mode 100644 index a19d7850..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexAttribBinding.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_vertex_attrib_binding extension. - * - *

    OpenGL currently supports (at least) 16 vertex attributes and 16 vertex buffer bindings, with a fixed mapping between vertex attributes and vertex - * buffer bindings. This extension allows the application to change the mapping between attributes and bindings, which can make it more efficient to update - * vertex buffer bindings for interleaved vertex formats where many attributes share the same buffer.

    - * - *

    This extension also separates the vertex binding update from the vertex attribute format update, which saves applications the effort of redundantly - * specifying the same format state over and over.

    - * - *

    Conceptually, this extension splits the state for generic vertex attribute arrays into:

    - * - *
      - *
    • An array of vertex buffer binding points, each of which specifies: - * - *
        - *
      • a bound buffer object
      • - *
      • a starting offset for the vertex attribute data in that buffer object
      • - *
      • a stride used by all attributes using that binding point, and
      • - *
      • a frequency divisor used by all attributes using that binding point.
      • - *
    • - *
    • An array of generic vertex attribute format information records, each of which specifies: - * - *
        - *
      • a reference to one of the new buffer binding points above
      • - *
      • a component count and format, and a normalization flag for the attribute data, and
      • - *
      • the offset of the attribute data relative to the base offset of each vertex found at the associated binding point.
      • - *
    • - *
    - * - *

    Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class ARBVertexAttribBinding { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetVertexAttrib*v. */ - public static final int - GL_VERTEX_ATTRIB_BINDING = 0x82D4, - GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; - - /** Accepted by the {@code target} parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. */ - public static final int - GL_VERTEX_BINDING_DIVISOR = 0x82D6, - GL_VERTEX_BINDING_OFFSET = 0x82D7, - GL_VERTEX_BINDING_STRIDE = 0x82D8, - GL_VERTEX_BINDING_BUFFER = 0x8F4F; - - /** Accepted by the {@code pname} parameter of GetIntegerv, .... */ - public static final int - GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, - GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; - - protected ARBVertexAttribBinding() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindVertexBuffer ] --- - - /** - * Binds a buffer to a vertex buffer bind point. - * - * @param bindingindex the index of the vertex buffer binding point to which to bind the buffer - * @param buffer the name of an existing buffer to bind to the vertex buffer binding point - * @param offset the offset of the first element of the buffer - * @param stride the distance between elements within the buffer - */ - public static void glBindVertexBuffer(@NativeType("GLuint") int bindingindex, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizei") int stride) { - GL43C.glBindVertexBuffer(bindingindex, buffer, offset, stride); - } - - // --- [ glVertexAttribFormat ] --- - - /** - * Specifies the organization of data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param normalized if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is - * directly converted to floating point. - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static void glVertexAttribFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int relativeoffset) { - GL43C.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); - } - - // --- [ glVertexAttribIFormat ] --- - - /** - * Specifies the organization of pure integer data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static void glVertexAttribIFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL43C.glVertexAttribIFormat(attribindex, size, type, relativeoffset); - } - - // --- [ glVertexAttribLFormat ] --- - - /** - * Specifies the organization of 64-bit double data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static void glVertexAttribLFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL43C.glVertexAttribLFormat(attribindex, size, type, relativeoffset); - } - - // --- [ glVertexAttribBinding ] --- - - /** - * Associate a vertex attribute and a vertex buffer binding. - * - * @param attribindex the index of the attribute to associate with a vertex buffer binding - * @param bindingindex the index of the vertex buffer binding with which to associate the generic vertex attribute - */ - public static void glVertexAttribBinding(@NativeType("GLuint") int attribindex, @NativeType("GLuint") int bindingindex) { - GL43C.glVertexAttribBinding(attribindex, bindingindex); - } - - // --- [ glVertexBindingDivisor ] --- - - /** - * Modifies the rate at which generic vertex attributes advance during instanced rendering. - * - * @param bindingindex the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - */ - public static void glVertexBindingDivisor(@NativeType("GLuint") int bindingindex, @NativeType("GLuint") int divisor) { - GL43C.glVertexBindingDivisor(bindingindex, divisor); - } - - // --- [ glVertexArrayBindVertexBufferEXT ] --- - - /** - * DSA version of {@link #glBindVertexBuffer BindVertexBuffer}. - * - * @param vaobj the vertex array object - * @param bindingindex the index of the vertex buffer binding point to which to bind the buffer - * @param buffer the name of an existing buffer to bind to the vertex buffer binding point - * @param offset the offset of the first element of the buffer - * @param stride the distance between elements within the buffer - */ - public static native void glVertexArrayBindVertexBufferEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizei") int stride); - - // --- [ glVertexArrayVertexAttribFormatEXT ] --- - - /** - * DSA version of {@link #glVertexAttribFormat VertexAttribFormat}. - * - * @param vaobj the vertex array object - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param normalized if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is - * directly converted to floating point. - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static native void glVertexArrayVertexAttribFormatEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexArrayVertexAttribIFormatEXT ] --- - - /** - * DSA version of {@link #glVertexAttribIFormat VertexAttribIFormat}. - * - * @param vaobj the vertex array object - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static native void glVertexArrayVertexAttribIFormatEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexArrayVertexAttribLFormatEXT ] --- - - /** - * DSA version of {@link #glVertexAttribLFormat VertexAttribLFormat}. - * - * @param vaobj the vertex array object - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - */ - public static native void glVertexArrayVertexAttribLFormatEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexArrayVertexAttribBindingEXT ] --- - - /** - * DSA version of {@link #glVertexAttribBinding VertexAttribBinding}. - * - * @param vaobj the vertex array object - * @param attribindex the index of the attribute to associate with a vertex buffer binding - * @param bindingindex the index of the vertex buffer binding with which to associate the generic vertex attribute - */ - public static native void glVertexArrayVertexAttribBindingEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLuint") int bindingindex); - - // --- [ glVertexArrayVertexBindingDivisorEXT ] --- - - /** - * DSA version of {@link #glVertexBindingDivisor VertexBindingDivisor}. - * - * @param vaobj the vertex array object - * @param bindingindex the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - */ - public static native void glVertexArrayVertexBindingDivisorEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int divisor); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexBlend.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexBlend.java deleted file mode 100644 index c6fbb78b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexBlend.java +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_vertex_blend extension. - * - *

    This extension provides the ability to replace the single modelview transformation with a set of n vertex units. (Where n is constrained to an - * implementation defined maximum.) Each unit has its own modelview transform matrix. For each unit, there is a current weight associated with the vertex. - * When this extension is enabled the vertices are transformed by the modelview matrices of all of the enabled units. Afterward, these results are scaled - * by the weights for the respective units and then summed to create the eye-space vertex. A similar procedure is followed for the normals, except they are - * transformed by the inverse transpose of the modelview matrices.

    - */ -public class ARBVertexBlend { - - static { GL.initialize(); } - - /** Accepted by the {@code value} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_UNITS_ARB = 0x86A4, - GL_ACTIVE_VERTEX_UNITS_ARB = 0x86A5; - - /** - * Accepted by the {@code cap} parameters of Enable and Disable, by the {@code value} parameter of IsEnabled, GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_WEIGHT_SUM_UNITY_ARB = 0x86A6, - GL_VERTEX_BLEND_ARB = 0x86A7; - - /** Accepted by the {@code mode} parameter of MatrixMode and by the {@code value} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MODELVIEW0_ARB = 0x1700, - GL_MODELVIEW1_ARB = 0x850A, - GL_MODELVIEW2_ARB = 0x8722, - GL_MODELVIEW3_ARB = 0x8723, - GL_MODELVIEW4_ARB = 0x8724, - GL_MODELVIEW5_ARB = 0x8725, - GL_MODELVIEW6_ARB = 0x8726, - GL_MODELVIEW7_ARB = 0x8727, - GL_MODELVIEW8_ARB = 0x8728, - GL_MODELVIEW9_ARB = 0x8729, - GL_MODELVIEW10_ARB = 0x872A, - GL_MODELVIEW11_ARB = 0x872B, - GL_MODELVIEW12_ARB = 0x872C, - GL_MODELVIEW13_ARB = 0x872D, - GL_MODELVIEW14_ARB = 0x872E, - GL_MODELVIEW15_ARB = 0x872F, - GL_MODELVIEW16_ARB = 0x8730, - GL_MODELVIEW17_ARB = 0x8731, - GL_MODELVIEW18_ARB = 0x8732, - GL_MODELVIEW19_ARB = 0x8733, - GL_MODELVIEW20_ARB = 0x8734, - GL_MODELVIEW21_ARB = 0x8735, - GL_MODELVIEW22_ARB = 0x8736, - GL_MODELVIEW23_ARB = 0x8737, - GL_MODELVIEW24_ARB = 0x8738, - GL_MODELVIEW25_ARB = 0x8739, - GL_MODELVIEW26_ARB = 0x873A, - GL_MODELVIEW27_ARB = 0x873B, - GL_MODELVIEW28_ARB = 0x873C, - GL_MODELVIEW29_ARB = 0x873D, - GL_MODELVIEW30_ARB = 0x873E, - GL_MODELVIEW31_ARB = 0x873F; - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_CURRENT_WEIGHT_ARB = 0x86A8; - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_WEIGHT_ARRAY_TYPE_ARB = 0x86A9, - GL_WEIGHT_ARRAY_STRIDE_ARB = 0x86AA, - GL_WEIGHT_ARRAY_SIZE_ARB = 0x86AB; - - /** Accepted by the {@code pname} parameter of GetPointerv. */ - public static final int GL_WEIGHT_ARRAY_POINTER_ARB = 0x86AC; - - /** - * Accepted by the {@code cap} parameters of EnableClientState and DisableClientState, by the {@code value} parameter of IsEnabled, GetBooleanv, - * GetIntegerv, GetFloatv, and GetDoublev. - */ - public static final int GL_WEIGHT_ARRAY_ARB = 0x86AD; - - protected ARBVertexBlend() { - throw new UnsupportedOperationException(); - } - - // --- [ glWeightfvARB ] --- - - /** - * Unsafe version of: {@link #glWeightfvARB WeightfvARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightfvARB(int size, long weights); - - /** - * Sets the current vertex weights. - * - * @param weights the vertex weights - */ - public static void glWeightfvARB(@NativeType("GLfloat *") FloatBuffer weights) { - nglWeightfvARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightbvARB ] --- - - /** - * Unsafe version of: {@link #glWeightbvARB WeightbvARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightbvARB(int size, long weights); - - /** - * Byte version of {@link #glWeightfvARB WeightfvARB}. - * - * @param weights the vertex weights - */ - public static void glWeightbvARB(@NativeType("GLbyte *") ByteBuffer weights) { - nglWeightbvARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightubvARB ] --- - - /** - * Unsafe version of: {@link #glWeightubvARB WeightubvARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightubvARB(int size, long weights); - - /** - * Unsigned byte version of {@link #glWeightfvARB WeightfvARB}. - * - * @param weights the vertex weights - */ - public static void glWeightubvARB(@NativeType("GLubyte *") ByteBuffer weights) { - nglWeightubvARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightsvARB ] --- - - /** - * Unsafe version of: {@link #glWeightsvARB WeightsvARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightsvARB(int size, long weights); - - /** - * Short version of {@link #glWeightfvARB WeightfvARB}. - * - * @param weights the vertex weights - */ - public static void glWeightsvARB(@NativeType("GLshort *") ShortBuffer weights) { - nglWeightsvARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightusvARB ] --- - - /** - * Unsafe version of: {@link #glWeightusvARB WeightusvARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightusvARB(int size, long weights); - - /** - * Unsigned short version of {@link #glWeightfvARB WeightfvARB}. - * - * @param weights the vertex weights - */ - public static void glWeightusvARB(@NativeType("GLushort *") ShortBuffer weights) { - nglWeightusvARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightivARB ] --- - - /** - * Unsafe version of: {@link #glWeightivARB WeightivARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightivARB(int size, long weights); - - /** - * Integer version of {@link #glWeightfvARB WeightfvARB}. - * - * @param weights the vertex weights - */ - public static void glWeightivARB(@NativeType("GLint *") IntBuffer weights) { - nglWeightivARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightuivARB ] --- - - /** - * Unsafe version of: {@link #glWeightuivARB WeightuivARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightuivARB(int size, long weights); - - /** - * Unsigned integer version of {@link #glWeightfvARB WeightfvARB}. - * - * @param weights the vertex weights - */ - public static void glWeightuivARB(@NativeType("GLuint *") IntBuffer weights) { - nglWeightuivARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightdvARB ] --- - - /** - * Unsafe version of: {@link #glWeightdvARB WeightdvARB} - * - * @param size the number of weights to set. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - */ - public static native void nglWeightdvARB(int size, long weights); - - /** - * Double version of {@link #glWeightfvARB WeightfvARB}. - * - * @param weights the vertex weights - */ - public static void glWeightdvARB(@NativeType("GLdouble *") DoubleBuffer weights) { - nglWeightdvARB(weights.remaining(), memAddress(weights)); - } - - // --- [ glWeightPointerARB ] --- - - /** Unsafe version of: {@link #glWeightPointerARB WeightPointerARB} */ - public static native void nglWeightPointerARB(int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a weight array. - * - * @param size the number of values per vertex that are stored in the array. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the weight data - */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglWeightPointerARB(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a weight array. - * - * @param size the number of values per vertex that are stored in the array. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the weight data - */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglWeightPointerARB(size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a weight array. - * - * @param size the number of values per vertex that are stored in the array. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the weight data - */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglWeightPointerARB(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a weight array. - * - * @param size the number of values per vertex that are stored in the array. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the weight data - */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglWeightPointerARB(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a weight array. - * - * @param size the number of values per vertex that are stored in the array. Must be a value between 1 and {@link #GL_MAX_VERTEX_UNITS_ARB MAX_VERTEX_UNITS_ARB}. - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the weight data - */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglWeightPointerARB(size, type, stride, memAddress(pointer)); - } - - // --- [ glVertexBlendARB ] --- - - /** - * Sets the number of active transformations applied. - * - * @param count the number of transformations to blend - */ - public static native void glVertexBlendARB(@NativeType("GLint") int count); - - /** Array version of: {@link #glWeightfvARB WeightfvARB} */ - public static void glWeightfvARB(@NativeType("GLfloat *") float[] weights) { - long __functionAddress = GL.getICD().glWeightfvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(weights.length, weights, __functionAddress); - } - - /** Array version of: {@link #glWeightsvARB WeightsvARB} */ - public static void glWeightsvARB(@NativeType("GLshort *") short[] weights) { - long __functionAddress = GL.getICD().glWeightsvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(weights.length, weights, __functionAddress); - } - - /** Array version of: {@link #glWeightusvARB WeightusvARB} */ - public static void glWeightusvARB(@NativeType("GLushort *") short[] weights) { - long __functionAddress = GL.getICD().glWeightusvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(weights.length, weights, __functionAddress); - } - - /** Array version of: {@link #glWeightivARB WeightivARB} */ - public static void glWeightivARB(@NativeType("GLint *") int[] weights) { - long __functionAddress = GL.getICD().glWeightivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(weights.length, weights, __functionAddress); - } - - /** Array version of: {@link #glWeightuivARB WeightuivARB} */ - public static void glWeightuivARB(@NativeType("GLuint *") int[] weights) { - long __functionAddress = GL.getICD().glWeightuivARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(weights.length, weights, __functionAddress); - } - - /** Array version of: {@link #glWeightdvARB WeightdvARB} */ - public static void glWeightdvARB(@NativeType("GLdouble *") double[] weights) { - long __functionAddress = GL.getICD().glWeightdvARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(weights.length, weights, __functionAddress); - } - - /** Array version of: {@link #glWeightPointerARB WeightPointerARB} */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") short[] pointer) { - long __functionAddress = GL.getICD().glWeightPointerARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glWeightPointerARB WeightPointerARB} */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") int[] pointer) { - long __functionAddress = GL.getICD().glWeightPointerARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glWeightPointerARB WeightPointerARB} */ - public static void glWeightPointerARB(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") float[] pointer) { - long __functionAddress = GL.getICD().glWeightPointerARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(size, type, stride, pointer, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexBufferObject.java deleted file mode 100644 index fcb58b07..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexBufferObject.java +++ /dev/null @@ -1,811 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_vertex_buffer_object extension. - * - *

    This extension defines an interface that allows various types of data (especially vertex array data) to be cached in high-performance graphics memory on - * the server, thereby increasing the rate of data transfers.

    - * - *

    Chunks of data are encapsulated within "buffer objects", which conceptually are nothing more than arrays of bytes, just like any chunk of memory. An API - * is provided whereby applications can read from or write to buffers, either via the GL itself ({@link #glBufferDataARB BufferDataARB}, {@link #glBufferSubDataARB BufferSubDataARB}, - * {@link #glGetBufferSubDataARB GetBufferSubDataARB}) or via a pointer to the memory.

    - * - *

    The latter technique is known as "mapping" a buffer. When an application maps a buffer, it is given a pointer to the memory. When the application - * finishes reading from or writing to the memory, it is required to "unmap" the buffer before it is once again permitted to use that buffer as a GL data - * source or sink. Mapping often allows applications to eliminate an extra data copy otherwise required to access the buffer, thereby enhancing - * performance. In addition, requiring that applications unmap the buffer to use it as a data source or sink ensures that certain classes of latent - * synchronization bugs cannot occur.

    - * - *

    Although this extension only defines hooks for buffer objects to be used with OpenGL's vertex array APIs, the API defined in this extension permits - * buffer objects to be used as either data sources or sinks for any GL command that takes a pointer as an argument. Normally, in the absence of this - * extension, a pointer passed into the GL is simply a pointer to the user's data. This extension defines a mechanism whereby this pointer is used not as a - * pointer to the data itself, but as an offset into a currently bound buffer object. The buffer object ID zero is reserved, and when buffer object zero is - * bound to a given target, the commands affected by that buffer binding behave normally. When a nonzero buffer ID is bound, then the pointer represents an - * offset.

    - * - *

    In the case of vertex arrays, this extension defines not merely one binding for all attributes, but a separate binding for each individual attribute. As - * a result, applications can source their attributes from multiple buffers. An application might, for example, have a model with constant texture - * coordinates and variable geometry. The texture coordinates might be retrieved from a buffer object with the usage mode "STATIC_DRAW", indicating to the - * GL that the application does not expect to update the contents of the buffer frequently or even at all, while the vertices might be retrieved from a - * buffer object with the usage mode "STREAM_DRAW", indicating that the vertices will be updated on a regular basis.

    - * - *

    In addition, a binding is defined by which applications can source index data (as used by {@link GL11C#glDrawElements DrawElements}, {@link GL12C#glDrawRangeElements DrawRangeElements}, and - * {@link GL14C#glMultiDrawElements MultiDrawElements}) from a buffer object. On some platforms, this enables very large models to be rendered with no more than a few small commands - * to the graphics device.

    - * - *

    It is expected that a future extension will allow sourcing pixel data from and writing pixel data to a buffer object.

    - * - *

    Promoted to core in {@link GL15 OpenGL 1.5}.

    - */ -public class ARBVertexBufferObject { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBufferARB, BufferDataARB, BufferSubDataARB, MapBufferARB, UnmapBufferARB, GetBufferSubDataARB, - * GetBufferParameterivARB, and GetBufferPointervARB. - */ - public static final int - GL_ARRAY_BUFFER_ARB = 0x8892, - GL_ELEMENT_ARRAY_BUFFER_ARB = 0x8893; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_ARRAY_BUFFER_BINDING_ARB = 0x8894, - GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895, - GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896, - GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897, - GL_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898, - GL_INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899, - GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A, - GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B, - GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C, - GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D, - GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E; - - /** Accepted by the {@code pname} parameter of GetVertexAttribivARB. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F; - - /** Accepted by the {@code usage} parameter of BufferDataARB. */ - public static final int - GL_STREAM_DRAW_ARB = 0x88E0, - GL_STREAM_READ_ARB = 0x88E1, - GL_STREAM_COPY_ARB = 0x88E2, - GL_STATIC_DRAW_ARB = 0x88E4, - GL_STATIC_READ_ARB = 0x88E5, - GL_STATIC_COPY_ARB = 0x88E6, - GL_DYNAMIC_DRAW_ARB = 0x88E8, - GL_DYNAMIC_READ_ARB = 0x88E9, - GL_DYNAMIC_COPY_ARB = 0x88EA; - - /** Accepted by the {@code access} parameter of MapBufferARB. */ - public static final int - GL_READ_ONLY_ARB = 0x88B8, - GL_WRITE_ONLY_ARB = 0x88B9, - GL_READ_WRITE_ARB = 0x88BA; - - /** Accepted by the {@code pname} parameter of GetBufferParameterivARB. */ - public static final int - GL_BUFFER_SIZE_ARB = 0x8764, - GL_BUFFER_USAGE_ARB = 0x8765, - GL_BUFFER_ACCESS_ARB = 0x88BB, - GL_BUFFER_MAPPED_ARB = 0x88BC; - - /** Accepted by the {@code pname} parameter of GetBufferPointervARB. */ - public static final int GL_BUFFER_MAP_POINTER_ARB = 0x88BD; - - protected ARBVertexBufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindBufferARB ] --- - - /** - * Binds a named buffer object. - * - * @param target the target to which the buffer object is bound. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param buffer the name of a buffer object - */ - public static native void glBindBufferARB(@NativeType("GLenum") int target, @NativeType("GLuint") int buffer); - - // --- [ glDeleteBuffersARB ] --- - - /** - * Unsafe version of: {@link #glDeleteBuffersARB DeleteBuffersARB} - * - * @param n the number of buffer objects to be deleted - */ - public static native void nglDeleteBuffersARB(int n, long buffers); - - /** - * Deletes named buffer objects. - * - * @param buffers an array of buffer objects to be deleted - */ - public static void glDeleteBuffersARB(@NativeType("GLuint const *") IntBuffer buffers) { - nglDeleteBuffersARB(buffers.remaining(), memAddress(buffers)); - } - - /** Deletes named buffer objects. */ - public static void glDeleteBuffersARB(@NativeType("GLuint const *") int buffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer buffers = stack.ints(buffer); - nglDeleteBuffersARB(1, memAddress(buffers)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenBuffersARB ] --- - - /** - * Unsafe version of: {@link #glGenBuffersARB GenBuffersARB} - * - * @param n the number of buffer object names to be generated - */ - public static native void nglGenBuffersARB(int n, long buffers); - - /** - * Generates buffer object names. - * - * @param buffers a buffer in which the generated buffer object names are stored - */ - public static void glGenBuffersARB(@NativeType("GLuint *") IntBuffer buffers) { - nglGenBuffersARB(buffers.remaining(), memAddress(buffers)); - } - - /** Generates buffer object names. */ - @NativeType("void") - public static int glGenBuffersARB() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer buffers = stack.callocInt(1); - nglGenBuffersARB(1, memAddress(buffers)); - return buffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsBufferARB ] --- - - /** - * Determines if a name corresponds to a buffer object. - * - * @param buffer a value that may be the name of a buffer object - */ - @NativeType("GLboolean") - public static native boolean glIsBufferARB(@NativeType("GLuint") int buffer); - - // --- [ glBufferDataARB ] --- - - /** - * Unsafe version of: {@link #glBufferDataARB BufferDataARB} - * - * @param size the size in bytes of the buffer object's new data store - */ - public static native void nglBufferDataARB(int target, long size, long data, int usage); - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param size the size in bytes of the buffer object's new data store - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW_ARB STREAM_DRAW_ARB}{@link #GL_STREAM_READ_ARB STREAM_READ_ARB}{@link #GL_STREAM_COPY_ARB STREAM_COPY_ARB}{@link #GL_STATIC_DRAW_ARB STATIC_DRAW_ARB}{@link #GL_STATIC_READ_ARB STATIC_READ_ARB}
    {@link #GL_STATIC_COPY_ARB STATIC_COPY_ARB}{@link #GL_DYNAMIC_DRAW_ARB DYNAMIC_DRAW_ARB}{@link #GL_DYNAMIC_READ_ARB DYNAMIC_READ_ARB}{@link #GL_DYNAMIC_COPY_ARB DYNAMIC_COPY_ARB}
    - */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("GLsizeiptrARB") long size, @NativeType("GLenum") int usage) { - nglBufferDataARB(target, size, NULL, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW_ARB STREAM_DRAW_ARB}{@link #GL_STREAM_READ_ARB STREAM_READ_ARB}{@link #GL_STREAM_COPY_ARB STREAM_COPY_ARB}{@link #GL_STATIC_DRAW_ARB STATIC_DRAW_ARB}{@link #GL_STATIC_READ_ARB STATIC_READ_ARB}
    {@link #GL_STATIC_COPY_ARB STATIC_COPY_ARB}{@link #GL_DYNAMIC_DRAW_ARB DYNAMIC_DRAW_ARB}{@link #GL_DYNAMIC_READ_ARB DYNAMIC_READ_ARB}{@link #GL_DYNAMIC_COPY_ARB DYNAMIC_COPY_ARB}
    - */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") ByteBuffer data, @NativeType("GLenum") int usage) { - nglBufferDataARB(target, data.remaining(), memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW_ARB STREAM_DRAW_ARB}{@link #GL_STREAM_READ_ARB STREAM_READ_ARB}{@link #GL_STREAM_COPY_ARB STREAM_COPY_ARB}{@link #GL_STATIC_DRAW_ARB STATIC_DRAW_ARB}{@link #GL_STATIC_READ_ARB STATIC_READ_ARB}
    {@link #GL_STATIC_COPY_ARB STATIC_COPY_ARB}{@link #GL_DYNAMIC_DRAW_ARB DYNAMIC_DRAW_ARB}{@link #GL_DYNAMIC_READ_ARB DYNAMIC_READ_ARB}{@link #GL_DYNAMIC_COPY_ARB DYNAMIC_COPY_ARB}
    - */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") ShortBuffer data, @NativeType("GLenum") int usage) { - nglBufferDataARB(target, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW_ARB STREAM_DRAW_ARB}{@link #GL_STREAM_READ_ARB STREAM_READ_ARB}{@link #GL_STREAM_COPY_ARB STREAM_COPY_ARB}{@link #GL_STATIC_DRAW_ARB STATIC_DRAW_ARB}{@link #GL_STATIC_READ_ARB STATIC_READ_ARB}
    {@link #GL_STATIC_COPY_ARB STATIC_COPY_ARB}{@link #GL_DYNAMIC_DRAW_ARB DYNAMIC_DRAW_ARB}{@link #GL_DYNAMIC_READ_ARB DYNAMIC_READ_ARB}{@link #GL_DYNAMIC_COPY_ARB DYNAMIC_COPY_ARB}
    - */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") IntBuffer data, @NativeType("GLenum") int usage) { - nglBufferDataARB(target, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW_ARB STREAM_DRAW_ARB}{@link #GL_STREAM_READ_ARB STREAM_READ_ARB}{@link #GL_STREAM_COPY_ARB STREAM_COPY_ARB}{@link #GL_STATIC_DRAW_ARB STATIC_DRAW_ARB}{@link #GL_STATIC_READ_ARB STATIC_READ_ARB}
    {@link #GL_STATIC_COPY_ARB STATIC_COPY_ARB}{@link #GL_DYNAMIC_DRAW_ARB DYNAMIC_DRAW_ARB}{@link #GL_DYNAMIC_READ_ARB DYNAMIC_READ_ARB}{@link #GL_DYNAMIC_COPY_ARB DYNAMIC_COPY_ARB}
    - */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") FloatBuffer data, @NativeType("GLenum") int usage) { - nglBufferDataARB(target, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW_ARB STREAM_DRAW_ARB}{@link #GL_STREAM_READ_ARB STREAM_READ_ARB}{@link #GL_STREAM_COPY_ARB STREAM_COPY_ARB}{@link #GL_STATIC_DRAW_ARB STATIC_DRAW_ARB}{@link #GL_STATIC_READ_ARB STATIC_READ_ARB}
    {@link #GL_STATIC_COPY_ARB STATIC_COPY_ARB}{@link #GL_DYNAMIC_DRAW_ARB DYNAMIC_DRAW_ARB}{@link #GL_DYNAMIC_READ_ARB DYNAMIC_READ_ARB}{@link #GL_DYNAMIC_COPY_ARB DYNAMIC_COPY_ARB}
    - */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") DoubleBuffer data, @NativeType("GLenum") int usage) { - nglBufferDataARB(target, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), usage); - } - - // --- [ glBufferSubDataARB ] --- - - /** - * Unsafe version of: {@link #glBufferSubDataARB BufferSubDataARB} - * - * @param size the size in bytes of the data store region being replaced - */ - public static native void nglBufferSubDataARB(int target, long offset, long size, long data); - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") ByteBuffer data) { - nglBufferSubDataARB(target, offset, data.remaining(), memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") ShortBuffer data) { - nglBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") IntBuffer data) { - nglBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") FloatBuffer data) { - nglBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") DoubleBuffer data) { - nglBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glGetBufferSubDataARB ] --- - - /** - * Unsafe version of: {@link #glGetBufferSubDataARB GetBufferSubDataARB} - * - * @param size the size in bytes of the data store region being returned - */ - public static native void nglGetBufferSubDataARB(int target, long offset, long size, long data); - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") ByteBuffer data) { - nglGetBufferSubDataARB(target, offset, data.remaining(), memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") ShortBuffer data) { - nglGetBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") IntBuffer data) { - nglGetBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") FloatBuffer data) { - nglGetBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") DoubleBuffer data) { - nglGetBufferSubDataARB(target, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glMapBufferARB ] --- - - /** Unsafe version of: {@link #glMapBufferARB MapBufferARB} */ - public static native long nglMapBufferARB(int target, int access); - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBufferARB(int, int)} - Calls {@link #glGetBufferParameterivARB GetBufferParameterivARB} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBufferARB(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameterivARB GetBufferParameterivARB} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBufferARB(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link #GL_READ_ONLY_ARB READ_ONLY_ARB}{@link #GL_WRITE_ONLY_ARB WRITE_ONLY_ARB}{@link #GL_READ_WRITE_ARB READ_WRITE_ARB}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferARB(@NativeType("GLenum") int target, @NativeType("GLenum") int access) { - long __result = nglMapBufferARB(target, access); - return memByteBufferSafe(__result, glGetBufferParameteriARB(target, GL_BUFFER_SIZE_ARB)); - } - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBufferARB(int, int)} - Calls {@link #glGetBufferParameterivARB GetBufferParameterivARB} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBufferARB(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameterivARB GetBufferParameterivARB} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBufferARB(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link #GL_READ_ONLY_ARB READ_ONLY_ARB}{@link #GL_WRITE_ONLY_ARB WRITE_ONLY_ARB}{@link #GL_READ_WRITE_ARB READ_WRITE_ARB}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferARB(@NativeType("GLenum") int target, @NativeType("GLenum") int access, @Nullable ByteBuffer old_buffer) { - long __result = nglMapBufferARB(target, access); - int length = glGetBufferParameteriARB(target, GL_BUFFER_SIZE_ARB); - return apiGetMappedBuffer(old_buffer, __result, length); - } - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBufferARB(int, int)} - Calls {@link #glGetBufferParameterivARB GetBufferParameterivARB} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBufferARB(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameterivARB GetBufferParameterivARB} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBufferARB(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link #GL_READ_ONLY_ARB READ_ONLY_ARB}{@link #GL_WRITE_ONLY_ARB WRITE_ONLY_ARB}{@link #GL_READ_WRITE_ARB READ_WRITE_ARB}
    - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferARB(@NativeType("GLenum") int target, @NativeType("GLenum") int access, long length, @Nullable ByteBuffer old_buffer) { - long __result = nglMapBufferARB(target, access); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - // --- [ glUnmapBufferARB ] --- - - /** - * Relinquishes the mapping of a buffer object and invalidates the pointer to its data store. - * - *

    Returns TRUE unless data values in the buffer’s data store have become corrupted during the period that the buffer was mapped. Such corruption can be - * the result of a screen resolution change or other window system-dependent event that causes system heaps such as those for high-performance graphics - * memory to be discarded. GL implementations must guarantee that such corruption can occur only during the periods that a buffer’s data store is mapped. - * If such corruption has occurred, UnmapBuffer returns FALSE, and the contents of the buffer’s data store become undefined.

    - * - * @param target the target buffer object being unmapped. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - */ - @NativeType("GLboolean") - public static native boolean glUnmapBufferARB(@NativeType("GLenum") int target); - - // --- [ glGetBufferParameterivARB ] --- - - /** Unsafe version of: {@link #glGetBufferParameterivARB GetBufferParameterivARB} */ - public static native void nglGetBufferParameterivARB(int target, int pname, long params); - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - */ - public static void glGetBufferParameterivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetBufferParameterivARB(target, pname, memAddress(params)); - } - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - */ - @NativeType("void") - public static int glGetBufferParameteriARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetBufferParameterivARB(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetBufferPointervARB ] --- - - /** Unsafe version of: {@link #glGetBufferPointervARB GetBufferPointervARB} */ - public static native void nglGetBufferPointervARB(int target, int pname, long params); - - /** - * Returns the pointer to a mapped buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the pointer to be returned. Must be:
    {@link #GL_BUFFER_MAP_POINTER_ARB BUFFER_MAP_POINTER_ARB}
    - * @param params the pointer value specified by {@code pname} - */ - public static void glGetBufferPointervARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetBufferPointervARB(target, pname, memAddress(params)); - } - - /** - * Returns the pointer to a mapped buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the pointer to be returned. Must be:
    {@link #GL_BUFFER_MAP_POINTER_ARB BUFFER_MAP_POINTER_ARB}
    - */ - @NativeType("void") - public static long glGetBufferPointerARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer params = stack.callocPointer(1); - nglGetBufferPointervARB(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glDeleteBuffersARB DeleteBuffersARB} */ - public static void glDeleteBuffersARB(@NativeType("GLuint const *") int[] buffers) { - long __functionAddress = GL.getICD().glDeleteBuffersARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffers.length, buffers, __functionAddress); - } - - /** Array version of: {@link #glGenBuffersARB GenBuffersARB} */ - public static void glGenBuffersARB(@NativeType("GLuint *") int[] buffers) { - long __functionAddress = GL.getICD().glGenBuffersARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffers.length, buffers, __functionAddress); - } - - /** Array version of: {@link #glBufferDataARB BufferDataARB} */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") short[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 1, data, usage, __functionAddress); - } - - /** Array version of: {@link #glBufferDataARB BufferDataARB} */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") int[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** Array version of: {@link #glBufferDataARB BufferDataARB} */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") float[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** Array version of: {@link #glBufferDataARB BufferDataARB} */ - public static void glBufferDataARB(@NativeType("GLenum") int target, @NativeType("void const *") double[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 3, data, usage, __functionAddress); - } - - /** Array version of: {@link #glBufferSubDataARB BufferSubDataARB} */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** Array version of: {@link #glBufferSubDataARB BufferSubDataARB} */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glBufferSubDataARB BufferSubDataARB} */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glBufferSubDataARB BufferSubDataARB} */ - public static void glBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void const *") double[] data) { - long __functionAddress = GL.getICD().glBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** Array version of: {@link #glGetBufferSubDataARB GetBufferSubDataARB} */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") short[] data) { - long __functionAddress = GL.getICD().glGetBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** Array version of: {@link #glGetBufferSubDataARB GetBufferSubDataARB} */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") int[] data) { - long __functionAddress = GL.getICD().glGetBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glGetBufferSubDataARB GetBufferSubDataARB} */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") float[] data) { - long __functionAddress = GL.getICD().glGetBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glGetBufferSubDataARB GetBufferSubDataARB} */ - public static void glGetBufferSubDataARB(@NativeType("GLenum") int target, @NativeType("GLintptrARB") long offset, @NativeType("void *") double[] data) { - long __functionAddress = GL.getICD().glGetBufferSubDataARB; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** Array version of: {@link #glGetBufferParameterivARB GetBufferParameterivARB} */ - public static void glGetBufferParameterivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetBufferParameterivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexProgram.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexProgram.java deleted file mode 100644 index c6fad7fc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexProgram.java +++ /dev/null @@ -1,1555 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_vertex_program extension. - * - *

    Unextended OpenGL mandates a certain set of configurable per-vertex computations defining vertex transformation, texture coordinate generation and - * transformation, and lighting. Several extensions have added further per-vertex computations to OpenGL. For example, extensions have defined new texture - * coordinate generation modes ({@link ARBTextureCubeMap ARB_texture_cube_map}, {@link NVTexgenReflection NV_texgen_reflection}, NV_texgen_emboss), new vertex - * transformation modes ({@link ARBVertexBlend ARB_vertex_blend}, EXT_vertex_weighting), new lighting modes (OpenGL 1.2's separate specular and - * rescale normal functionality), several modes for fog distance generation ({@link NVFogDistance NV_fog_distance}), and eye-distance point size attenuation - * ({@link ARBPointParameters ARB_point_parameters}).

    - * - *

    Each such extension adds a small set of relatively inflexible per-vertex computations.

    - * - *

    This inflexibility is in contrast to the typical flexibility provided by the underlying programmable floating point engines (whether micro-coded vertex - * engines, DSPs, or CPUs) that are traditionally used to implement OpenGL's per-vertex computations. The purpose of this extension is to expose to the - * OpenGL application writer a significant degree of per-vertex programmability for computing vertex parameters.

    - * - *

    For the purposes of discussing this extension, a vertex program is a sequence of floating-point 4-component vector operations that determines how a set - * of program parameters (defined outside of OpenGL's {@link GL11#glBegin Begin}/{@link GL11#glEnd End} pair) and an input set of per-vertex parameters are transformed to a set of - * per-vertex result parameters.

    - * - *

    The per-vertex computations for standard OpenGL given a particular set of lighting and texture coordinate generation modes (along with any state for - * extensions defining per-vertex computations) is, in essence, a vertex program. However, the sequence of operations is defined implicitly by the current - * OpenGL state settings rather than defined explicitly as a sequence of instructions.

    - * - *

    This extension provides an explicit mechanism for defining vertex program instruction sequences for application-defined vertex programs. In order to - * define such vertex programs, this extension defines a vertex programming model including a floating-point 4-component vector instruction set and a - * relatively large set of floating-point 4-component registers.

    - * - *

    The extension's vertex programming model is designed for efficient hardware implementation and to support a wide variety of vertex programs. By design, - * the entire set of existing vertex programs defined by existing OpenGL per-vertex computation extensions can be implemented using the extension's vertex - * programming model.

    - */ -public class ARBVertexProgram { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of ProgramStringARB, BindProgramARB, ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, - * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, GetProgramivARB, and GetProgramStringARB. - */ - public static final int GL_VERTEX_PROGRAM_ARB = 0x8620; - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642, - GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643, - GL_COLOR_SUM_ARB = 0x8458; - - /** Accepted by the {@code format} parameter of ProgramStringARB. */ - public static final int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875; - - /** Accepted by the {@code pname} parameter of GetVertexAttrib[dfi]vARB. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622, - GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623, - GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624, - GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625, - GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A, - GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626; - - /** Accepted by the {@code pname} parameter of GetVertexAttribPointervARB. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645; - - /** Accepted by the {@code pname} parameter of GetProgramivARB. */ - public static final int - GL_PROGRAM_LENGTH_ARB = 0x8627, - GL_PROGRAM_FORMAT_ARB = 0x8876, - GL_PROGRAM_BINDING_ARB = 0x8677, - GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0, - GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1, - GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2, - GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3, - GL_PROGRAM_TEMPORARIES_ARB = 0x88A4, - GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5, - GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6, - GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7, - GL_PROGRAM_PARAMETERS_ARB = 0x88A8, - GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9, - GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA, - GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB, - GL_PROGRAM_ATTRIBS_ARB = 0x88AC, - GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD, - GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE, - GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF, - GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0, - GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1, - GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2, - GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3, - GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4, - GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5, - GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6; - - /** Accepted by the {@code pname} parameter of GetProgramStringARB. */ - public static final int GL_PROGRAM_STRING_ARB = 0x8628; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PROGRAM_ERROR_POSITION_ARB = 0x864B, - GL_CURRENT_MATRIX_ARB = 0x8641, - GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7, - GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640, - GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869, - GL_MAX_PROGRAM_MATRICES_ARB = 0x862F, - GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E; - - /** Accepted by the {@code name} parameter of GetString. */ - public static final int GL_PROGRAM_ERROR_STRING_ARB = 0x8874; - - /** Accepted by the {@code mode} parameter of MatrixMode. */ - public static final int - GL_MATRIX0_ARB = 0x88C0, - GL_MATRIX1_ARB = 0x88C1, - GL_MATRIX2_ARB = 0x88C2, - GL_MATRIX3_ARB = 0x88C3, - GL_MATRIX4_ARB = 0x88C4, - GL_MATRIX5_ARB = 0x88C5, - GL_MATRIX6_ARB = 0x88C6, - GL_MATRIX7_ARB = 0x88C7, - GL_MATRIX8_ARB = 0x88C8, - GL_MATRIX9_ARB = 0x88C9, - GL_MATRIX10_ARB = 0x88CA, - GL_MATRIX11_ARB = 0x88CB, - GL_MATRIX12_ARB = 0x88CC, - GL_MATRIX13_ARB = 0x88CD, - GL_MATRIX14_ARB = 0x88CE, - GL_MATRIX15_ARB = 0x88CF, - GL_MATRIX16_ARB = 0x88D0, - GL_MATRIX17_ARB = 0x88D1, - GL_MATRIX18_ARB = 0x88D2, - GL_MATRIX19_ARB = 0x88D3, - GL_MATRIX20_ARB = 0x88D4, - GL_MATRIX21_ARB = 0x88D5, - GL_MATRIX22_ARB = 0x88D6, - GL_MATRIX23_ARB = 0x88D7, - GL_MATRIX24_ARB = 0x88D8, - GL_MATRIX25_ARB = 0x88D9, - GL_MATRIX26_ARB = 0x88DA, - GL_MATRIX27_ARB = 0x88DB, - GL_MATRIX28_ARB = 0x88DC, - GL_MATRIX29_ARB = 0x88DD, - GL_MATRIX30_ARB = 0x88DE, - GL_MATRIX31_ARB = 0x88DF; - - protected ARBVertexProgram() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttrib1sARB ] --- - - /** - * Short version of {@link #glVertexAttrib1fARB VertexAttrib1fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - */ - public static void glVertexAttrib1sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0) { - ARBVertexShader.glVertexAttrib1sARB(index, v0); - } - - // --- [ glVertexAttrib1fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. The y and z components are implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - */ - public static void glVertexAttrib1fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0) { - ARBVertexShader.glVertexAttrib1fARB(index, v0); - } - - // --- [ glVertexAttrib1dARB ] --- - - /** - * Double version of {@link #glVertexAttrib1fARB VertexAttrib1fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - */ - public static void glVertexAttrib1dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0) { - ARBVertexShader.glVertexAttrib1dARB(index, v0); - } - - // --- [ glVertexAttrib2sARB ] --- - - /** - * Short version of {@link #glVertexAttrib2fARB VertexAttrib2fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - */ - public static void glVertexAttrib2sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1) { - ARBVertexShader.glVertexAttrib2sARB(index, v0, v1); - } - - // --- [ glVertexAttrib2fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. The y component is implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - */ - public static void glVertexAttrib2fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1) { - ARBVertexShader.glVertexAttrib2fARB(index, v0, v1); - } - - // --- [ glVertexAttrib2dARB ] --- - - /** - * Double version of {@link #glVertexAttrib2fARB VertexAttrib2fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - */ - public static void glVertexAttrib2dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1) { - ARBVertexShader.glVertexAttrib2dARB(index, v0, v1); - } - - // --- [ glVertexAttrib3sARB ] --- - - /** - * Short version of {@link #glVertexAttrib3fARB VertexAttrib3fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - */ - public static void glVertexAttrib3sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2) { - ARBVertexShader.glVertexAttrib3sARB(index, v0, v1, v2); - } - - // --- [ glVertexAttrib3fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. The w is implicitly set to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - */ - public static void glVertexAttrib3fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2) { - ARBVertexShader.glVertexAttrib3fARB(index, v0, v1, v2); - } - - // --- [ glVertexAttrib3dARB ] --- - - /** - * Double version of {@link #glVertexAttrib3fARB VertexAttrib3fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - */ - public static void glVertexAttrib3dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2) { - ARBVertexShader.glVertexAttrib3dARB(index, v0, v1, v2); - } - - // --- [ glVertexAttrib4sARB ] --- - - /** - * Short version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - */ - public static void glVertexAttrib4sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2, @NativeType("GLshort") short v3) { - ARBVertexShader.glVertexAttrib4sARB(index, v0, v1, v2, v3); - } - - // --- [ glVertexAttrib4fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - */ - public static void glVertexAttrib4fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3) { - ARBVertexShader.glVertexAttrib4fARB(index, v0, v1, v2, v3); - } - - // --- [ glVertexAttrib4dARB ] --- - - /** - * Double version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - */ - public static void glVertexAttrib4dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2, @NativeType("GLdouble") double v3) { - ARBVertexShader.glVertexAttrib4dARB(index, v0, v1, v2, v3); - } - - // --- [ glVertexAttrib4NubARB ] --- - - /** - * Normalized unsigned byte version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - */ - public static void glVertexAttrib4NubARB(@NativeType("GLuint") int index, @NativeType("GLubyte") byte x, @NativeType("GLubyte") byte y, @NativeType("GLubyte") byte z, @NativeType("GLubyte") byte w) { - ARBVertexShader.glVertexAttrib4NubARB(index, x, y, z, w); - } - - // --- [ glVertexAttrib1svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib1svARB VertexAttrib1svARB} */ - public static void nglVertexAttrib1svARB(int index, long v) { - ARBVertexShader.nglVertexAttrib1svARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib1sARB VertexAttrib1sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib1svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - ARBVertexShader.glVertexAttrib1svARB(index, v); - } - - // --- [ glVertexAttrib1fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib1fvARB VertexAttrib1fvARB} */ - public static void nglVertexAttrib1fvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib1fvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib1fARB VertexAttrib1fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib1fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - ARBVertexShader.glVertexAttrib1fvARB(index, v); - } - - // --- [ glVertexAttrib1dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib1dvARB VertexAttrib1dvARB} */ - public static void nglVertexAttrib1dvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib1dvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib1dARB VertexAttrib1dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib1dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - ARBVertexShader.glVertexAttrib1dvARB(index, v); - } - - // --- [ glVertexAttrib2svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib2svARB VertexAttrib2svARB} */ - public static void nglVertexAttrib2svARB(int index, long v) { - ARBVertexShader.nglVertexAttrib2svARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib2sARB VertexAttrib2sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib2svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - ARBVertexShader.glVertexAttrib2svARB(index, v); - } - - // --- [ glVertexAttrib2fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib2fvARB VertexAttrib2fvARB} */ - public static void nglVertexAttrib2fvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib2fvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib2fARB VertexAttrib2fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib2fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - ARBVertexShader.glVertexAttrib2fvARB(index, v); - } - - // --- [ glVertexAttrib2dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib2dvARB VertexAttrib2dvARB} */ - public static void nglVertexAttrib2dvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib2dvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib2dARB VertexAttrib2dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib2dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - ARBVertexShader.glVertexAttrib2dvARB(index, v); - } - - // --- [ glVertexAttrib3svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib3svARB VertexAttrib3svARB} */ - public static void nglVertexAttrib3svARB(int index, long v) { - ARBVertexShader.nglVertexAttrib3svARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib3sARB VertexAttrib3sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib3svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - ARBVertexShader.glVertexAttrib3svARB(index, v); - } - - // --- [ glVertexAttrib3fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib3fvARB VertexAttrib3fvARB} */ - public static void nglVertexAttrib3fvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib3fvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib3fARB VertexAttrib3fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib3fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - ARBVertexShader.glVertexAttrib3fvARB(index, v); - } - - // --- [ glVertexAttrib3dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib3dvARB VertexAttrib3dvARB} */ - public static void nglVertexAttrib3dvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib3dvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib3dARB VertexAttrib3dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib3dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - ARBVertexShader.glVertexAttrib3dvARB(index, v); - } - - // --- [ glVertexAttrib4fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4fvARB VertexAttrib4fvARB} */ - public static void nglVertexAttrib4fvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4fvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - ARBVertexShader.glVertexAttrib4fvARB(index, v); - } - - // --- [ glVertexAttrib4bvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4bvARB VertexAttrib4bvARB} */ - public static void nglVertexAttrib4bvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4bvARB(index, v); - } - - /** - * Byte pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4bvARB(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - ARBVertexShader.glVertexAttrib4bvARB(index, v); - } - - // --- [ glVertexAttrib4svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4svARB VertexAttrib4svARB} */ - public static void nglVertexAttrib4svARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4svARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4sARB VertexAttrib4sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - ARBVertexShader.glVertexAttrib4svARB(index, v); - } - - // --- [ glVertexAttrib4ivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4ivARB VertexAttrib4ivARB} */ - public static void nglVertexAttrib4ivARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4ivARB(index, v); - } - - /** - * Integer pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4ivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - ARBVertexShader.glVertexAttrib4ivARB(index, v); - } - - // --- [ glVertexAttrib4ubvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4ubvARB VertexAttrib4ubvARB} */ - public static void nglVertexAttrib4ubvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4ubvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4NubARB VertexAttrib4NubARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4ubvARB(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - ARBVertexShader.glVertexAttrib4ubvARB(index, v); - } - - // --- [ glVertexAttrib4usvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4usvARB VertexAttrib4usvARB} */ - public static void nglVertexAttrib4usvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4usvARB(index, v); - } - - /** - * Unsigned short pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4usvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - ARBVertexShader.glVertexAttrib4usvARB(index, v); - } - - // --- [ glVertexAttrib4uivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4uivARB VertexAttrib4uivARB} */ - public static void nglVertexAttrib4uivARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4uivARB(index, v); - } - - /** - * Unsigned int pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4uivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - ARBVertexShader.glVertexAttrib4uivARB(index, v); - } - - // --- [ glVertexAttrib4dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4dvARB VertexAttrib4dvARB} */ - public static void nglVertexAttrib4dvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4dvARB(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4dARB VertexAttrib4dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - ARBVertexShader.glVertexAttrib4dvARB(index, v); - } - - // --- [ glVertexAttrib4NbvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NbvARB VertexAttrib4NbvARB} */ - public static void nglVertexAttrib4NbvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4NbvARB(index, v); - } - - /** - * Normalized byte pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NbvARB(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - ARBVertexShader.glVertexAttrib4NbvARB(index, v); - } - - // --- [ glVertexAttrib4NsvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NsvARB VertexAttrib4NsvARB} */ - public static void nglVertexAttrib4NsvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4NsvARB(index, v); - } - - /** - * Normalized short pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NsvARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - ARBVertexShader.glVertexAttrib4NsvARB(index, v); - } - - // --- [ glVertexAttrib4NivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NivARB VertexAttrib4NivARB} */ - public static void nglVertexAttrib4NivARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4NivARB(index, v); - } - - /** - * Normalized int pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - ARBVertexShader.glVertexAttrib4NivARB(index, v); - } - - // --- [ glVertexAttrib4NubvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NubvARB VertexAttrib4NubvARB} */ - public static void nglVertexAttrib4NubvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4NubvARB(index, v); - } - - /** - * Normalized unsigned byte pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NubvARB(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - ARBVertexShader.glVertexAttrib4NubvARB(index, v); - } - - // --- [ glVertexAttrib4NusvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NusvARB VertexAttrib4NusvARB} */ - public static void nglVertexAttrib4NusvARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4NusvARB(index, v); - } - - /** - * Normalized unsigned short pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NusvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - ARBVertexShader.glVertexAttrib4NusvARB(index, v); - } - - // --- [ glVertexAttrib4NuivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NuivARB VertexAttrib4NuivARB} */ - public static void nglVertexAttrib4NuivARB(int index, long v) { - ARBVertexShader.nglVertexAttrib4NuivARB(index, v); - } - - /** - * Normalized unsigned int pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NuivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - ARBVertexShader.glVertexAttrib4NuivARB(index, v); - } - - // --- [ glVertexAttribPointerARB ] --- - - /** Unsafe version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static void nglVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, long pointer) { - ARBVertexShader.nglVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - // --- [ glEnableVertexAttribArrayARB ] --- - - /** - * Enables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be enabled - */ - public static void glEnableVertexAttribArrayARB(@NativeType("GLuint") int index) { - ARBVertexShader.glEnableVertexAttribArrayARB(index); - } - - // --- [ glDisableVertexAttribArrayARB ] --- - - /** - * Disables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be disabled - */ - public static void glDisableVertexAttribArrayARB(@NativeType("GLuint") int index) { - ARBVertexShader.glDisableVertexAttribArrayARB(index); - } - - // --- [ glProgramStringARB ] --- - - /** - * Unsafe version of: {@link #glProgramStringARB ProgramStringARB} - * - * @param len the length of the program string, excluding the null-terminator - */ - public static native void nglProgramStringARB(int target, int format, int len, long string); - - /** - * Updates the program string for the current program object for {@code target}. - * - *

    When a program string is loaded, it is interpreted according to syntactic and semantic rules corresponding to the program target specified by - * {@code target}. If a program violates the syntactic or semantic restrictions of the program target, ProgramStringARB generates the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION}.

    - * - *

    Additionally, ProgramString will update the program error position ({@link #GL_PROGRAM_ERROR_POSITION_ARB PROGRAM_ERROR_POSITION_ARB}) and error string ({@link #GL_PROGRAM_ERROR_STRING_ARB PROGRAM_ERROR_STRING_ARB}). If a - * program fails to load, the value of the program error position is set to the ubyte offset into the specified program string indicating where the first - * program error was detected. If the program fails to load because of a semantic restriction that is not detected until the program is fully scanned, the - * error position is set to the value of {@code len}. If a program loads successfully, the error position is set to the value negative one. The - * implementation-dependent program error string contains one or more error or warning messages. If a program loads succesfully, the error string may - * either contain warning messages or be empty.

    - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param format the format of the program string. Must be:
    {@link #GL_PROGRAM_FORMAT_ASCII_ARB PROGRAM_FORMAT_ASCII_ARB}
    - * @param string an array of bytes representing the program string being loaded - */ - public static void glProgramStringARB(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer string) { - nglProgramStringARB(target, format, string.remaining(), memAddress(string)); - } - - // --- [ glBindProgramARB ] --- - - /** - * Creates a named program object by binding an unused program object name to a valid program target. Also can be used to bind an existing program object - * to a program target. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param program the program object to bind. If {@code program} is zero, the default program object for {@code target} is bound. If {@code program} is the name of - * an existing program object whose associated program target is {@code target}, the named program object is bound. - */ - public static native void glBindProgramARB(@NativeType("GLenum") int target, @NativeType("GLuint") int program); - - // --- [ glDeleteProgramsARB ] --- - - /** - * Unsafe version of: {@link #glDeleteProgramsARB DeleteProgramsARB} - * - * @param n the number of program object to delete - */ - public static native void nglDeleteProgramsARB(int n, long programs); - - /** - * Deletes program objects. - * - * @param programs an array of {@code n} program objects to be deleted - */ - public static void glDeleteProgramsARB(@NativeType("GLuint const *") IntBuffer programs) { - nglDeleteProgramsARB(programs.remaining(), memAddress(programs)); - } - - // --- [ glGenProgramsARB ] --- - - /** - * Unsafe version of: {@link #glGenProgramsARB GenProgramsARB} - * - * @param n the number of program names to genereate - */ - public static native void nglGenProgramsARB(int n, long programs); - - /** - * Returns {@code n} currently unused program names in {@code programs}. These names are marked as used, for the purposes of GenProgramsARB only, but - * objects are created only when they are first bound using {@link #glBindProgramARB BindProgramARB}. - * - * @param programs an array in which to return the generated program names - */ - public static void glGenProgramsARB(@NativeType("GLuint *") IntBuffer programs) { - nglGenProgramsARB(programs.remaining(), memAddress(programs)); - } - - /** - * Returns {@code n} currently unused program names in {@code programs}. These names are marked as used, for the purposes of GenProgramsARB only, but - * objects are created only when they are first bound using {@link #glBindProgramARB BindProgramARB}. - */ - @NativeType("void") - public static int glGenProgramsARB() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer programs = stack.callocInt(1); - nglGenProgramsARB(1, memAddress(programs)); - return programs.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glProgramEnvParameter4dARB ] --- - - /** - * Double version of {@link #glProgramEnvParameter4fARB ProgramEnvParameter4fARB}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param x the {@code x} parameter component - * @param y the {@code y} parameter component - * @param z the {@code z} parameter component - * @param w the {@code w} parameter component - */ - public static native void glProgramEnvParameter4dARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glProgramEnvParameter4dvARB ] --- - - /** Unsafe version of: {@link #glProgramEnvParameter4dvARB ProgramEnvParameter4dvARB} */ - public static native void nglProgramEnvParameter4dvARB(int target, int index, long params); - - /** - * Pointer version of {@link #glProgramEnvParameter4dARB ProgramEnvParameter4dARB} - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer from which to read the parameter value - */ - public static void glProgramEnvParameter4dvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglProgramEnvParameter4dvARB(target, index, memAddress(params)); - } - - // --- [ glProgramEnvParameter4fARB ] --- - - /** - * Updates the values of the program environment parameter numbered {@code index} for the specified program target {@code target}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param x the {@code x} parameter component - * @param y the {@code y} parameter component - * @param z the {@code z} parameter component - * @param w the {@code w} parameter component - */ - public static native void glProgramEnvParameter4fARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w); - - // --- [ glProgramEnvParameter4fvARB ] --- - - /** Unsafe version of: {@link #glProgramEnvParameter4fvARB ProgramEnvParameter4fvARB} */ - public static native void nglProgramEnvParameter4fvARB(int target, int index, long params); - - /** - * Pointer version of {@link #glProgramEnvParameter4fARB ProgramEnvParameter4fARB}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer from which to read the parameter value - */ - public static void glProgramEnvParameter4fvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglProgramEnvParameter4fvARB(target, index, memAddress(params)); - } - - // --- [ glProgramLocalParameter4dARB ] --- - - /** - * Double version of {@link #glProgramLocalParameter4fARB ProgramLocalParameter4fARB}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param x the {@code x} parameter component - * @param y the {@code y} parameter component - * @param z the {@code z} parameter component - * @param w the {@code w} parameter component - */ - public static native void glProgramLocalParameter4dARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glProgramLocalParameter4dvARB ] --- - - /** Unsafe version of: {@link #glProgramLocalParameter4dvARB ProgramLocalParameter4dvARB} */ - public static native void nglProgramLocalParameter4dvARB(int target, int index, long params); - - /** - * Pointer version of {@link #glProgramLocalParameter4dARB ProgramLocalParameter4dARB}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer from which to read the parameter value - */ - public static void glProgramLocalParameter4dvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglProgramLocalParameter4dvARB(target, index, memAddress(params)); - } - - // --- [ glProgramLocalParameter4fARB ] --- - - /** - * Updates the values of the program local parameter numbered {@code index} for the specified program target {@code target}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param x the {@code x} parameter component - * @param y the {@code y} parameter component - * @param z the {@code z} parameter component - * @param w the {@code w} parameter component - */ - public static native void glProgramLocalParameter4fARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w); - - // --- [ glProgramLocalParameter4fvARB ] --- - - /** Unsafe version of: {@link #glProgramLocalParameter4fvARB ProgramLocalParameter4fvARB} */ - public static native void nglProgramLocalParameter4fvARB(int target, int index, long params); - - /** - * Pointer version of {@link #glProgramLocalParameter4fARB ProgramLocalParameter4fARB}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer from which to read the parameter value - */ - public static void glProgramLocalParameter4fvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglProgramLocalParameter4fvARB(target, index, memAddress(params)); - } - - // --- [ glGetProgramEnvParameterfvARB ] --- - - /** Unsafe version of: {@link #glGetProgramEnvParameterfvARB GetProgramEnvParameterfvARB} */ - public static native void nglGetProgramEnvParameterfvARB(int target, int index, long params); - - /** - * Obtain the current value for the program environment parameter numbered {@code index} for the specified program target {@code target}, and places the - * information in the array {@code params}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer in which to place the current parameter value - */ - public static void glGetProgramEnvParameterfvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetProgramEnvParameterfvARB(target, index, memAddress(params)); - } - - // --- [ glGetProgramEnvParameterdvARB ] --- - - /** Unsafe version of: {@link #glGetProgramEnvParameterdvARB GetProgramEnvParameterdvARB} */ - public static native void nglGetProgramEnvParameterdvARB(int target, int index, long params); - - /** - * Double version of {@link #glGetProgramEnvParameterfvARB GetProgramEnvParameterfvARB}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer in which to place the current parameter value - */ - public static void glGetProgramEnvParameterdvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetProgramEnvParameterdvARB(target, index, memAddress(params)); - } - - // --- [ glGetProgramLocalParameterfvARB ] --- - - /** Unsafe version of: {@link #glGetProgramLocalParameterfvARB GetProgramLocalParameterfvARB} */ - public static native void nglGetProgramLocalParameterfvARB(int target, int index, long params); - - /** - * Obtain the current value for the program local parameter numbered {@code index} for the specified program target {@code target}, and places the - * information in the array {@code params}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer in which to place the current parameter value - */ - public static void glGetProgramLocalParameterfvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetProgramLocalParameterfvARB(target, index, memAddress(params)); - } - - // --- [ glGetProgramLocalParameterdvARB ] --- - - /** Unsafe version of: {@link #glGetProgramLocalParameterdvARB GetProgramLocalParameterdvARB} */ - public static native void nglGetProgramLocalParameterdvARB(int target, int index, long params); - - /** - * Double version of {@link #glGetProgramLocalParameterfvARB GetProgramLocalParameterfvARB}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param index the environment parameter index - * @param params a buffer in which to place the current parameter value - */ - public static void glGetProgramLocalParameterdvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetProgramLocalParameterdvARB(target, index, memAddress(params)); - } - - // --- [ glGetProgramivARB ] --- - - /** Unsafe version of: {@link #glGetProgramivARB GetProgramivARB} */ - public static native void nglGetProgramivARB(int target, int pname, long params); - - /** - * Obtains program state for the program target {@code target}, writing the state into the array given by {@code params}. GetProgramivARB can be used to - * determine the properties of the currently bound program object or implementation limits for {@code target}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param pname the parameter to query. One of:
    {@link #GL_PROGRAM_LENGTH_ARB PROGRAM_LENGTH_ARB}{@link #GL_PROGRAM_FORMAT_ARB PROGRAM_FORMAT_ARB}
    {@link #GL_PROGRAM_BINDING_ARB PROGRAM_BINDING_ARB}{@link #GL_PROGRAM_INSTRUCTIONS_ARB PROGRAM_INSTRUCTIONS_ARB}
    {@link #GL_MAX_PROGRAM_INSTRUCTIONS_ARB MAX_PROGRAM_INSTRUCTIONS_ARB}{@link #GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB PROGRAM_NATIVE_INSTRUCTIONS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB}{@link #GL_PROGRAM_TEMPORARIES_ARB PROGRAM_TEMPORARIES_ARB}
    {@link #GL_MAX_PROGRAM_TEMPORARIES_ARB MAX_PROGRAM_TEMPORARIES_ARB}{@link #GL_PROGRAM_NATIVE_TEMPORARIES_ARB PROGRAM_NATIVE_TEMPORARIES_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB MAX_PROGRAM_NATIVE_TEMPORARIES_ARB}{@link #GL_PROGRAM_PARAMETERS_ARB PROGRAM_PARAMETERS_ARB}
    {@link #GL_MAX_PROGRAM_PARAMETERS_ARB MAX_PROGRAM_PARAMETERS_ARB}{@link #GL_PROGRAM_NATIVE_PARAMETERS_ARB PROGRAM_NATIVE_PARAMETERS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB MAX_PROGRAM_NATIVE_PARAMETERS_ARB}{@link #GL_PROGRAM_ATTRIBS_ARB PROGRAM_ATTRIBS_ARB}
    {@link #GL_MAX_PROGRAM_ATTRIBS_ARB MAX_PROGRAM_ATTRIBS_ARB}{@link #GL_PROGRAM_NATIVE_ATTRIBS_ARB PROGRAM_NATIVE_ATTRIBS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB MAX_PROGRAM_NATIVE_ATTRIBS_ARB}{@link #GL_PROGRAM_ADDRESS_REGISTERS_ARB PROGRAM_ADDRESS_REGISTERS_ARB}
    {@link #GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB MAX_PROGRAM_ADDRESS_REGISTERS_ARB}{@link #GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB}{@link #GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB MAX_PROGRAM_LOCAL_PARAMETERS_ARB}
    {@link #GL_MAX_PROGRAM_ENV_PARAMETERS_ARB MAX_PROGRAM_ENV_PARAMETERS_ARB}{@link #GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB PROGRAM_UNDER_NATIVE_LIMITS_ARB}
    - * @param params an array in which to place the parameter value - */ - public static void glGetProgramivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetProgramivARB(target, pname, memAddress(params)); - } - - /** - * Obtains program state for the program target {@code target}, writing the state into the array given by {@code params}. GetProgramivARB can be used to - * determine the properties of the currently bound program object or implementation limits for {@code target}. - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param pname the parameter to query. One of:
    {@link #GL_PROGRAM_LENGTH_ARB PROGRAM_LENGTH_ARB}{@link #GL_PROGRAM_FORMAT_ARB PROGRAM_FORMAT_ARB}
    {@link #GL_PROGRAM_BINDING_ARB PROGRAM_BINDING_ARB}{@link #GL_PROGRAM_INSTRUCTIONS_ARB PROGRAM_INSTRUCTIONS_ARB}
    {@link #GL_MAX_PROGRAM_INSTRUCTIONS_ARB MAX_PROGRAM_INSTRUCTIONS_ARB}{@link #GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB PROGRAM_NATIVE_INSTRUCTIONS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB}{@link #GL_PROGRAM_TEMPORARIES_ARB PROGRAM_TEMPORARIES_ARB}
    {@link #GL_MAX_PROGRAM_TEMPORARIES_ARB MAX_PROGRAM_TEMPORARIES_ARB}{@link #GL_PROGRAM_NATIVE_TEMPORARIES_ARB PROGRAM_NATIVE_TEMPORARIES_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB MAX_PROGRAM_NATIVE_TEMPORARIES_ARB}{@link #GL_PROGRAM_PARAMETERS_ARB PROGRAM_PARAMETERS_ARB}
    {@link #GL_MAX_PROGRAM_PARAMETERS_ARB MAX_PROGRAM_PARAMETERS_ARB}{@link #GL_PROGRAM_NATIVE_PARAMETERS_ARB PROGRAM_NATIVE_PARAMETERS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB MAX_PROGRAM_NATIVE_PARAMETERS_ARB}{@link #GL_PROGRAM_ATTRIBS_ARB PROGRAM_ATTRIBS_ARB}
    {@link #GL_MAX_PROGRAM_ATTRIBS_ARB MAX_PROGRAM_ATTRIBS_ARB}{@link #GL_PROGRAM_NATIVE_ATTRIBS_ARB PROGRAM_NATIVE_ATTRIBS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB MAX_PROGRAM_NATIVE_ATTRIBS_ARB}{@link #GL_PROGRAM_ADDRESS_REGISTERS_ARB PROGRAM_ADDRESS_REGISTERS_ARB}
    {@link #GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB MAX_PROGRAM_ADDRESS_REGISTERS_ARB}{@link #GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB}
    {@link #GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB}{@link #GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB MAX_PROGRAM_LOCAL_PARAMETERS_ARB}
    {@link #GL_MAX_PROGRAM_ENV_PARAMETERS_ARB MAX_PROGRAM_ENV_PARAMETERS_ARB}{@link #GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB PROGRAM_UNDER_NATIVE_LIMITS_ARB}
    - */ - @NativeType("void") - public static int glGetProgramiARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetProgramivARB(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetProgramStringARB ] --- - - /** Unsafe version of: {@link #glGetProgramStringARB GetProgramStringARB} */ - public static native void nglGetProgramStringARB(int target, int pname, long string); - - /** - * Obtains the program string for the program object bound to {@code target} and places the information in the array {@code string}. - * - *

    {@code n} ubytes are returned into the array program where {@code n} is the length of the program in ubytes, as returned by {@link #glGetProgramivARB GetProgramivARB} when - * {@code pname} is {@link #GL_PROGRAM_LENGTH_ARB PROGRAM_LENGTH_ARB}. The program string is always returned using the format given when the program string was specified.

    - * - * @param target the program target. One of:
    {@link #GL_VERTEX_PROGRAM_ARB VERTEX_PROGRAM_ARB}{@link ARBFragmentProgram#GL_FRAGMENT_PROGRAM_ARB FRAGMENT_PROGRAM_ARB}
    - * @param pname the parameter to query. Must be:
    {@link #GL_PROGRAM_STRING_ARB PROGRAM_STRING_ARB}
    - * @param string an array in which to place the program string - */ - public static void glGetProgramStringARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("void *") ByteBuffer string) { - if (CHECKS) { - if (DEBUG) { - check(string, glGetProgramiARB(target, GL_PROGRAM_LENGTH_ARB)); - } - } - nglGetProgramStringARB(target, pname, memAddress(string)); - } - - // --- [ glGetVertexAttribfvARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribfvARB GetVertexAttribfvARB} */ - public static void nglGetVertexAttribfvARB(int index, int pname, long params) { - ARBVertexShader.nglGetVertexAttribfvARB(index, pname, params); - } - - /** - * Float version of {@link #glGetVertexAttribivARB GetVertexAttribivARB}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - */ - public static void glGetVertexAttribfvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - ARBVertexShader.glGetVertexAttribfvARB(index, pname, params); - } - - // --- [ glGetVertexAttribdvARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribdvARB GetVertexAttribdvARB} */ - public static void nglGetVertexAttribdvARB(int index, int pname, long params) { - ARBVertexShader.nglGetVertexAttribdvARB(index, pname, params); - } - - /** - * Double version of {@link #glGetVertexAttribivARB GetVertexAttribivARB}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - */ - public static void glGetVertexAttribdvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - ARBVertexShader.glGetVertexAttribdvARB(index, pname, params); - } - - // --- [ glGetVertexAttribivARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribivARB GetVertexAttribivARB} */ - public static void nglGetVertexAttribivARB(int index, int pname, long params) { - ARBVertexShader.nglGetVertexAttribivARB(index, pname, params); - } - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB VERTEX_ATTRIB_ARRAY_ENABLED_ARB}
    {@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB VERTEX_ATTRIB_ARRAY_SIZE_ARB}{@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB VERTEX_ATTRIB_ARRAY_STRIDE_ARB}
    {@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB VERTEX_ATTRIB_ARRAY_TYPE_ARB}{@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB}
    {@link ARBVertexShader#GL_CURRENT_VERTEX_ATTRIB_ARB CURRENT_VERTEX_ATTRIB_ARB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - * @param params returns the requested data - */ - public static void glGetVertexAttribivARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - ARBVertexShader.glGetVertexAttribivARB(index, pname, params); - } - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB VERTEX_ATTRIB_ARRAY_ENABLED_ARB}
    {@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB VERTEX_ATTRIB_ARRAY_SIZE_ARB}{@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB VERTEX_ATTRIB_ARRAY_STRIDE_ARB}
    {@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB VERTEX_ATTRIB_ARRAY_TYPE_ARB}{@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB}
    {@link ARBVertexShader#GL_CURRENT_VERTEX_ATTRIB_ARB CURRENT_VERTEX_ATTRIB_ARB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - */ - @NativeType("void") - public static int glGetVertexAttribiARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return ARBVertexShader.glGetVertexAttribiARB(index, pname); - } - - // --- [ glGetVertexAttribPointervARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribPointervARB GetVertexAttribPointervARB} */ - public static void nglGetVertexAttribPointervARB(int index, int pname, long pointer) { - ARBVertexShader.nglGetVertexAttribPointervARB(index, pname, pointer); - } - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB VERTEX_ATTRIB_ARRAY_POINTER_ARB}
    - * @param pointer the pointer value - */ - public static void glGetVertexAttribPointervARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer pointer) { - ARBVertexShader.glGetVertexAttribPointervARB(index, pname, pointer); - } - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link ARBVertexShader#GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB VERTEX_ATTRIB_ARRAY_POINTER_ARB}
    - */ - @NativeType("void") - public static long glGetVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return ARBVertexShader.glGetVertexAttribPointerARB(index, pname); - } - - // --- [ glIsProgramARB ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if {@code program} is the name of a program object. If {@code program} is zero or is a non-zero value that is not the name of a - * program object, or if an error condition occurs, IsProgramARB returns {@link GL11#GL_FALSE FALSE}. A name returned by {@link #glGenProgramsARB GenProgramsARB}, but not yet bound, is not the - * name of a program object. - * - * @param program the program name - */ - @NativeType("GLboolean") - public static native boolean glIsProgramARB(@NativeType("GLuint") int program); - - /** Array version of: {@link #glVertexAttrib1svARB VertexAttrib1svARB} */ - public static void glVertexAttrib1svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - ARBVertexShader.glVertexAttrib1svARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib1fvARB VertexAttrib1fvARB} */ - public static void glVertexAttrib1fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - ARBVertexShader.glVertexAttrib1fvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib1dvARB VertexAttrib1dvARB} */ - public static void glVertexAttrib1dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - ARBVertexShader.glVertexAttrib1dvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib2svARB VertexAttrib2svARB} */ - public static void glVertexAttrib2svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - ARBVertexShader.glVertexAttrib2svARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib2fvARB VertexAttrib2fvARB} */ - public static void glVertexAttrib2fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - ARBVertexShader.glVertexAttrib2fvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib2dvARB VertexAttrib2dvARB} */ - public static void glVertexAttrib2dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - ARBVertexShader.glVertexAttrib2dvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib3svARB VertexAttrib3svARB} */ - public static void glVertexAttrib3svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - ARBVertexShader.glVertexAttrib3svARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib3fvARB VertexAttrib3fvARB} */ - public static void glVertexAttrib3fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - ARBVertexShader.glVertexAttrib3fvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib3dvARB VertexAttrib3dvARB} */ - public static void glVertexAttrib3dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - ARBVertexShader.glVertexAttrib3dvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4fvARB VertexAttrib4fvARB} */ - public static void glVertexAttrib4fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - ARBVertexShader.glVertexAttrib4fvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4svARB VertexAttrib4svARB} */ - public static void glVertexAttrib4svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - ARBVertexShader.glVertexAttrib4svARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4ivARB VertexAttrib4ivARB} */ - public static void glVertexAttrib4ivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - ARBVertexShader.glVertexAttrib4ivARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4usvARB VertexAttrib4usvARB} */ - public static void glVertexAttrib4usvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - ARBVertexShader.glVertexAttrib4usvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4uivARB VertexAttrib4uivARB} */ - public static void glVertexAttrib4uivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - ARBVertexShader.glVertexAttrib4uivARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4dvARB VertexAttrib4dvARB} */ - public static void glVertexAttrib4dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - ARBVertexShader.glVertexAttrib4dvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4NsvARB VertexAttrib4NsvARB} */ - public static void glVertexAttrib4NsvARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - ARBVertexShader.glVertexAttrib4NsvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4NivARB VertexAttrib4NivARB} */ - public static void glVertexAttrib4NivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - ARBVertexShader.glVertexAttrib4NivARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4NusvARB VertexAttrib4NusvARB} */ - public static void glVertexAttrib4NusvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - ARBVertexShader.glVertexAttrib4NusvARB(index, v); - } - - /** Array version of: {@link #glVertexAttrib4NuivARB VertexAttrib4NuivARB} */ - public static void glVertexAttrib4NuivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - ARBVertexShader.glVertexAttrib4NuivARB(index, v); - } - - /** Array version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") short[] pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** Array version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") int[] pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** Array version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") float[] pointer) { - ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** Array version of: {@link #glDeleteProgramsARB DeleteProgramsARB} */ - public static void glDeleteProgramsARB(@NativeType("GLuint const *") int[] programs) { - long __functionAddress = GL.getICD().glDeleteProgramsARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(programs.length, programs, __functionAddress); - } - - /** Array version of: {@link #glGenProgramsARB GenProgramsARB} */ - public static void glGenProgramsARB(@NativeType("GLuint *") int[] programs) { - long __functionAddress = GL.getICD().glGenProgramsARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(programs.length, programs, __functionAddress); - } - - /** Array version of: {@link #glProgramEnvParameter4dvARB ProgramEnvParameter4dvARB} */ - public static void glProgramEnvParameter4dvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] params) { - long __functionAddress = GL.getICD().glProgramEnvParameter4dvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glProgramEnvParameter4fvARB ProgramEnvParameter4fvARB} */ - public static void glProgramEnvParameter4fvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glProgramEnvParameter4fvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glProgramLocalParameter4dvARB ProgramLocalParameter4dvARB} */ - public static void glProgramLocalParameter4dvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] params) { - long __functionAddress = GL.getICD().glProgramLocalParameter4dvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glProgramLocalParameter4fvARB ProgramLocalParameter4fvARB} */ - public static void glProgramLocalParameter4fvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glProgramLocalParameter4fvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetProgramEnvParameterfvARB GetProgramEnvParameterfvARB} */ - public static void glGetProgramEnvParameterfvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetProgramEnvParameterfvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetProgramEnvParameterdvARB GetProgramEnvParameterdvARB} */ - public static void glGetProgramEnvParameterdvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetProgramEnvParameterdvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetProgramLocalParameterfvARB GetProgramLocalParameterfvARB} */ - public static void glGetProgramLocalParameterfvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetProgramLocalParameterfvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetProgramLocalParameterdvARB GetProgramLocalParameterdvARB} */ - public static void glGetProgramLocalParameterdvARB(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetProgramLocalParameterdvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetProgramivARB GetProgramivARB} */ - public static void glGetProgramivARB(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetProgramivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribfvARB GetVertexAttribfvARB} */ - public static void glGetVertexAttribfvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - ARBVertexShader.glGetVertexAttribfvARB(index, pname, params); - } - - /** Array version of: {@link #glGetVertexAttribdvARB GetVertexAttribdvARB} */ - public static void glGetVertexAttribdvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - ARBVertexShader.glGetVertexAttribdvARB(index, pname, params); - } - - /** Array version of: {@link #glGetVertexAttribivARB GetVertexAttribivARB} */ - public static void glGetVertexAttribivARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - ARBVertexShader.glGetVertexAttribivARB(index, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexShader.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexShader.java deleted file mode 100644 index b0d27e5b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexShader.java +++ /dev/null @@ -1,1268 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_vertex_shader extension. - * - *

    This extension adds programmable vertex level processing to OpenGL. The application can write vertex shaders in a high level language as defined in the - * OpenGL Shading Language specification. A vertex shader replaces the transformation, texture coordinate generation and lighting parts of OpenGL, and it - * also adds texture access at the vertex level. Furthermore, management of vertex shader objects and loading generic attributes are discussed. A vertex - * shader object, attached to a program object, can be compiled and linked to produce an executable that runs on the vertex processor in OpenGL. - * This extension also defines how such an executable interacts with the fixed functionality vertex processing of OpenGL 1.4.

    - * - *

    Promoted to core in {@link GL20 OpenGL 2.0}.

    - */ -public class ARBVertexShader { - - static { GL.initialize(); } - - /** Accepted by the {@code shaderType} argument of CreateShaderObjectARB and returned by the {@code params} parameter of GetObjectParameter{if}vARB. */ - public static final int GL_VERTEX_SHADER_ARB = 0x8B31; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A, - GL_MAX_VARYING_FLOATS_ARB = 0x8B4B, - GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869, - GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872, - GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C, - GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D, - GL_MAX_TEXTURE_COORDS_ARB = 0x8871; - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642, - GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643; - - /** Accepted by the {@code pname} parameter GetObjectParameter{if}vARB. */ - public static final int - GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89, - GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A; - - /** Accepted by the {@code pname} parameter of GetVertexAttrib{dfi}vARB. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622, - GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623, - GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624, - GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625, - GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A, - GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626; - - /** Accepted by the {@code pname} parameter of GetVertexAttribPointervARB. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645; - - /** Returned by the {@code type} parameter of GetActiveAttribARB. */ - public static final int - GL_FLOAT_VEC2_ARB = 0x8B50, - GL_FLOAT_VEC3_ARB = 0x8B51, - GL_FLOAT_VEC4_ARB = 0x8B52, - GL_FLOAT_MAT2_ARB = 0x8B5A, - GL_FLOAT_MAT3_ARB = 0x8B5B, - GL_FLOAT_MAT4_ARB = 0x8B5C; - - protected ARBVertexShader() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttrib1fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. The y and z components are implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - */ - public static native void glVertexAttrib1fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0); - - // --- [ glVertexAttrib1sARB ] --- - - /** - * Short version of {@link #glVertexAttrib1fARB VertexAttrib1fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - */ - public static native void glVertexAttrib1sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0); - - // --- [ glVertexAttrib1dARB ] --- - - /** - * Double version of {@link #glVertexAttrib1fARB VertexAttrib1fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - */ - public static native void glVertexAttrib1dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0); - - // --- [ glVertexAttrib2fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. The y component is implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - */ - public static native void glVertexAttrib2fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1); - - // --- [ glVertexAttrib2sARB ] --- - - /** - * Short version of {@link #glVertexAttrib2fARB VertexAttrib2fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - */ - public static native void glVertexAttrib2sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1); - - // --- [ glVertexAttrib2dARB ] --- - - /** - * Double version of {@link #glVertexAttrib2fARB VertexAttrib2fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - */ - public static native void glVertexAttrib2dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1); - - // --- [ glVertexAttrib3fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. The w is implicitly set to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - */ - public static native void glVertexAttrib3fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2); - - // --- [ glVertexAttrib3sARB ] --- - - /** - * Short version of {@link #glVertexAttrib3fARB VertexAttrib3fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - */ - public static native void glVertexAttrib3sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2); - - // --- [ glVertexAttrib3dARB ] --- - - /** - * Double version of {@link #glVertexAttrib3fARB VertexAttrib3fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - */ - public static native void glVertexAttrib3dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2); - - // --- [ glVertexAttrib4fARB ] --- - - /** - * Specifies the value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - */ - public static native void glVertexAttrib4fARB(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3); - - // --- [ glVertexAttrib4sARB ] --- - - /** - * Short version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - */ - public static native void glVertexAttrib4sARB(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2, @NativeType("GLshort") short v3); - - // --- [ glVertexAttrib4dARB ] --- - - /** - * Double version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - */ - public static native void glVertexAttrib4dARB(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2, @NativeType("GLdouble") double v3); - - // --- [ glVertexAttrib4NubARB ] --- - - /** - * Normalized unsigned byte version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - */ - public static native void glVertexAttrib4NubARB(@NativeType("GLuint") int index, @NativeType("GLubyte") byte x, @NativeType("GLubyte") byte y, @NativeType("GLubyte") byte z, @NativeType("GLubyte") byte w); - - // --- [ glVertexAttrib1fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib1fvARB VertexAttrib1fvARB} */ - public static native void nglVertexAttrib1fvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib1fARB VertexAttrib1fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib1fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttrib1fvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib1svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib1svARB VertexAttrib1svARB} */ - public static native void nglVertexAttrib1svARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib1sARB VertexAttrib1sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib1svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttrib1svARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib1dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib1dvARB VertexAttrib1dvARB} */ - public static native void nglVertexAttrib1dvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib1dARB VertexAttrib1dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib1dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttrib1dvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib2fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib2fvARB VertexAttrib2fvARB} */ - public static native void nglVertexAttrib2fvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib2fARB VertexAttrib2fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib2fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttrib2fvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib2svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib2svARB VertexAttrib2svARB} */ - public static native void nglVertexAttrib2svARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib2sARB VertexAttrib2sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib2svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttrib2svARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib2dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib2dvARB VertexAttrib2dvARB} */ - public static native void nglVertexAttrib2dvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib2dARB VertexAttrib2dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib2dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttrib2dvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib3fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib3fvARB VertexAttrib3fvARB} */ - public static native void nglVertexAttrib3fvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib3fARB VertexAttrib3fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib3fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttrib3fvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib3svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib3svARB VertexAttrib3svARB} */ - public static native void nglVertexAttrib3svARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib3sARB VertexAttrib3sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib3svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttrib3svARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib3dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib3dvARB VertexAttrib3dvARB} */ - public static native void nglVertexAttrib3dvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib3dARB VertexAttrib3dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib3dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttrib3dvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4fvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4fvARB VertexAttrib4fvARB} */ - public static native void nglVertexAttrib4fvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4fvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4svARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4svARB VertexAttrib4svARB} */ - public static native void nglVertexAttrib4svARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4sARB VertexAttrib4sARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4svARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4dvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4dvARB VertexAttrib4dvARB} */ - public static native void nglVertexAttrib4dvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4dARB VertexAttrib4dARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4dvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4ivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4ivARB VertexAttrib4ivARB} */ - public static native void nglVertexAttrib4ivARB(int index, long v); - - /** - * Integer pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4ivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4ivARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4bvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4bvARB VertexAttrib4bvARB} */ - public static native void nglVertexAttrib4bvARB(int index, long v); - - /** - * Byte pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4bvARB(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4bvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4ubvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4ubvARB VertexAttrib4ubvARB} */ - public static native void nglVertexAttrib4ubvARB(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4NubARB VertexAttrib4NubARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4ubvARB(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4ubvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4usvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4usvARB VertexAttrib4usvARB} */ - public static native void nglVertexAttrib4usvARB(int index, long v); - - /** - * Unsigned short pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4usvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4usvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4uivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4uivARB VertexAttrib4uivARB} */ - public static native void nglVertexAttrib4uivARB(int index, long v); - - /** - * Unsigned int pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4uivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4uivARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4NbvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NbvARB VertexAttrib4NbvARB} */ - public static native void nglVertexAttrib4NbvARB(int index, long v); - - /** - * Normalized byte pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NbvARB(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4NbvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4NsvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NsvARB VertexAttrib4NsvARB} */ - public static native void nglVertexAttrib4NsvARB(int index, long v); - - /** - * Normalized short pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NsvARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4NsvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4NivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NivARB VertexAttrib4NivARB} */ - public static native void nglVertexAttrib4NivARB(int index, long v); - - /** - * Normalized int pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4NivARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4NubvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NubvARB VertexAttrib4NubvARB} */ - public static native void nglVertexAttrib4NubvARB(int index, long v); - - /** - * Normalized unsigned byte pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NubvARB(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4NubvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4NusvARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NusvARB VertexAttrib4NusvARB} */ - public static native void nglVertexAttrib4NusvARB(int index, long v); - - /** - * Normalized unsigned short pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NusvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4NusvARB(index, memAddress(v)); - } - - // --- [ glVertexAttrib4NuivARB ] --- - - /** Unsafe version of: {@link #glVertexAttrib4NuivARB VertexAttrib4NuivARB} */ - public static native void nglVertexAttrib4NuivARB(int index, long v); - - /** - * Normalized unsigned int pointer version of {@link #glVertexAttrib4fARB VertexAttrib4fARB}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - */ - public static void glVertexAttrib4NuivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4NuivARB(index, memAddress(v)); - } - - // --- [ glVertexAttribPointerARB ] --- - - /** Unsafe version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static native void nglVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, long pointer); - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglVertexAttribPointerARB(index, size, type, normalized, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglVertexAttribPointerARB(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglVertexAttribPointerARB(index, size, type, normalized, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglVertexAttribPointerARB(index, size, type, normalized, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglVertexAttribPointerARB(index, size, type, normalized, stride, memAddress(pointer)); - } - - // --- [ glEnableVertexAttribArrayARB ] --- - - /** - * Enables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be enabled - */ - public static native void glEnableVertexAttribArrayARB(@NativeType("GLuint") int index); - - // --- [ glDisableVertexAttribArrayARB ] --- - - /** - * Disables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be disabled - */ - public static native void glDisableVertexAttribArrayARB(@NativeType("GLuint") int index); - - // --- [ glBindAttribLocationARB ] --- - - /** Unsafe version of: {@link #glBindAttribLocationARB BindAttribLocationARB} */ - public static native void nglBindAttribLocationARB(int programObj, int index, long name); - - /** - * Associates a generic vertex attribute index with a named attribute variable. - * - * @param programObj the handle of the program object in which the association is to be made - * @param index the index of the generic vertex attribute to be bound - * @param name a null terminated string containing the name of the vertex shader attribute variable to which {@code index} is to be bound - */ - public static void glBindAttribLocationARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - nglBindAttribLocationARB(programObj, index, memAddress(name)); - } - - /** - * Associates a generic vertex attribute index with a named attribute variable. - * - * @param programObj the handle of the program object in which the association is to be made - * @param index the index of the generic vertex attribute to be bound - * @param name a null terminated string containing the name of the vertex shader attribute variable to which {@code index} is to be bound - */ - public static void glBindAttribLocationARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - nglBindAttribLocationARB(programObj, index, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveAttribARB ] --- - - /** - * Unsafe version of: {@link #glGetActiveAttribARB GetActiveAttribARB} - * - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - */ - public static native void nglGetActiveAttribARB(int programObj, int index, int maxLength, long length, long size, long type, long name); - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param programObj the program object to be queried - * @param index the index of the attribute variable to be queried - * @param length the number of characters actually written by OpenGL in the string indicated by {@code name} (excluding the null terminator) if a value other than - * {@code NULL} is passed - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - * @param name a null terminated string containing the name of the attribute variable - */ - public static void glGetActiveAttribARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - nglGetActiveAttribARB(programObj, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); - } - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param programObj the program object to be queried - * @param index the index of the attribute variable to be queried - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - */ - @NativeType("void") - public static String glGetActiveAttribARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @NativeType("GLsizei") int maxLength, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - if (CHECKS) { - check(size, 1); - check(type, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(maxLength); - nglGetActiveAttribARB(programObj, index, maxLength, memAddress(length), memAddress(size), memAddress(type), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param programObj the program object to be queried - * @param index the index of the attribute variable to be queried - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - */ - @NativeType("void") - public static String glGetActiveAttribARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetActiveAttribARB(programObj, index, ARBShaderObjects.glGetObjectParameteriARB(programObj, GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB), size, type); - } - - // --- [ glGetAttribLocationARB ] --- - - /** Unsafe version of: {@link #glGetAttribLocationARB GetAttribLocationARB} */ - public static native int nglGetAttribLocationARB(int programObj, long name); - - /** - * Returns the location of an attribute variable. - * - * @param programObj the program object to be queried - * @param name a null terminated string containing the name of the attribute variable whose location is to be queried - */ - @NativeType("GLint") - public static int glGetAttribLocationARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetAttribLocationARB(programObj, memAddress(name)); - } - - /** - * Returns the location of an attribute variable. - * - * @param programObj the program object to be queried - * @param name a null terminated string containing the name of the attribute variable whose location is to be queried - */ - @NativeType("GLint") - public static int glGetAttribLocationARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetAttribLocationARB(programObj, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexAttribivARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribivARB GetVertexAttribivARB} */ - public static native void nglGetVertexAttribivARB(int index, int pname, long params); - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link #GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB VERTEX_ATTRIB_ARRAY_ENABLED_ARB}
    {@link #GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB VERTEX_ATTRIB_ARRAY_SIZE_ARB}{@link #GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB VERTEX_ATTRIB_ARRAY_STRIDE_ARB}
    {@link #GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB VERTEX_ATTRIB_ARRAY_TYPE_ARB}{@link #GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB}
    {@link #GL_CURRENT_VERTEX_ATTRIB_ARB CURRENT_VERTEX_ATTRIB_ARB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - * @param params returns the requested data - */ - public static void glGetVertexAttribivARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetVertexAttribivARB(index, pname, memAddress(params)); - } - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link #GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB VERTEX_ATTRIB_ARRAY_ENABLED_ARB}
    {@link #GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB VERTEX_ATTRIB_ARRAY_SIZE_ARB}{@link #GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB VERTEX_ATTRIB_ARRAY_STRIDE_ARB}
    {@link #GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB VERTEX_ATTRIB_ARRAY_TYPE_ARB}{@link #GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB}
    {@link #GL_CURRENT_VERTEX_ATTRIB_ARB CURRENT_VERTEX_ATTRIB_ARB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - */ - @NativeType("void") - public static int glGetVertexAttribiARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetVertexAttribivARB(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexAttribfvARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribfvARB GetVertexAttribfvARB} */ - public static native void nglGetVertexAttribfvARB(int index, int pname, long params); - - /** - * Float version of {@link #glGetVertexAttribivARB GetVertexAttribivARB}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - */ - public static void glGetVertexAttribfvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribfvARB(index, pname, memAddress(params)); - } - - // --- [ glGetVertexAttribdvARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribdvARB GetVertexAttribdvARB} */ - public static native void nglGetVertexAttribdvARB(int index, int pname, long params); - - /** - * Double version of {@link #glGetVertexAttribivARB GetVertexAttribivARB}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - */ - public static void glGetVertexAttribdvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribdvARB(index, pname, memAddress(params)); - } - - // --- [ glGetVertexAttribPointervARB ] --- - - /** Unsafe version of: {@link #glGetVertexAttribPointervARB GetVertexAttribPointervARB} */ - public static native void nglGetVertexAttribPointervARB(int index, int pname, long pointer); - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link #GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB VERTEX_ATTRIB_ARRAY_POINTER_ARB}
    - * @param pointer the pointer value - */ - public static void glGetVertexAttribPointervARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer pointer) { - if (CHECKS) { - check(pointer, 1); - } - nglGetVertexAttribPointervARB(index, pname, memAddress(pointer)); - } - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link #GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB VERTEX_ATTRIB_ARRAY_POINTER_ARB}
    - */ - @NativeType("void") - public static long glGetVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer pointer = stack.callocPointer(1); - nglGetVertexAttribPointervARB(index, pname, memAddress(pointer)); - return pointer.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glVertexAttrib1fvARB VertexAttrib1fvARB} */ - public static void glVertexAttrib1fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib1fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib1svARB VertexAttrib1svARB} */ - public static void glVertexAttrib1svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib1svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib1dvARB VertexAttrib1dvARB} */ - public static void glVertexAttrib1dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib1dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib2fvARB VertexAttrib2fvARB} */ - public static void glVertexAttrib2fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib2fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib2svARB VertexAttrib2svARB} */ - public static void glVertexAttrib2svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib2svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib2dvARB VertexAttrib2dvARB} */ - public static void glVertexAttrib2dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib2dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib3fvARB VertexAttrib3fvARB} */ - public static void glVertexAttrib3fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib3fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib3svARB VertexAttrib3svARB} */ - public static void glVertexAttrib3svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib3svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib3dvARB VertexAttrib3dvARB} */ - public static void glVertexAttrib3dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib3dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4fvARB VertexAttrib4fvARB} */ - public static void glVertexAttrib4fvARB(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4fvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4svARB VertexAttrib4svARB} */ - public static void glVertexAttrib4svARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4svARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4dvARB VertexAttrib4dvARB} */ - public static void glVertexAttrib4dvARB(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4dvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4ivARB VertexAttrib4ivARB} */ - public static void glVertexAttrib4ivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4ivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4usvARB VertexAttrib4usvARB} */ - public static void glVertexAttrib4usvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4usvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4uivARB VertexAttrib4uivARB} */ - public static void glVertexAttrib4uivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4uivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4NsvARB VertexAttrib4NsvARB} */ - public static void glVertexAttrib4NsvARB(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4NsvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4NivARB VertexAttrib4NivARB} */ - public static void glVertexAttrib4NivARB(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4NivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4NusvARB VertexAttrib4NusvARB} */ - public static void glVertexAttrib4NusvARB(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4NusvARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4NuivARB VertexAttrib4NuivARB} */ - public static void glVertexAttrib4NuivARB(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4NuivARB; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") short[] pointer) { - long __functionAddress = GL.getICD().glVertexAttribPointerARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, size, type, normalized, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") int[] pointer) { - long __functionAddress = GL.getICD().glVertexAttribPointerARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, size, type, normalized, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribPointerARB VertexAttribPointerARB} */ - public static void glVertexAttribPointerARB(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") float[] pointer) { - long __functionAddress = GL.getICD().glVertexAttribPointerARB; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, size, type, normalized, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glGetActiveAttribARB GetActiveAttribARB} */ - public static void glGetActiveAttribARB(@NativeType("GLhandleARB") int programObj, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetActiveAttribARB; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - callPPPPV(programObj, index, name.remaining(), length, size, type, memAddress(name), __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribivARB GetVertexAttribivARB} */ - public static void glGetVertexAttribivARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribivARB; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(index, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribfvARB GetVertexAttribfvARB} */ - public static void glGetVertexAttribfvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribfvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribdvARB GetVertexAttribdvARB} */ - public static void glGetVertexAttribdvARB(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribdvARB; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java deleted file mode 100644 index 4626d309..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java +++ /dev/null @@ -1,705 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_vertex_type_2_10_10_10_rev extension. - * - *

    This extension adds two new vertex attribute data formats: a signed 2.10.10.10 and an unsigned 2.10.10.10 vertex data format. These vertex data formats - * describe a 4 component stream which can be used to store normals or other attributes in a quantized form. Normals, tangents, binormals and other vertex - * attributes can often be specified at reduced precision without introducing noticeable artifacts, reducing the amount of memory and memory bandwidth they consume.

    - * - *

    Promoted to core in {@link GL33 OpenGL 3.3}.

    - */ -public class ARBVertexType2_10_10_10_REV { - - static { GL.initialize(); } - - /** - * Accepted by the {@code type} parameter of VertexAttribPointer, VertexPointer, NormalPointer, ColorPointer, SecondaryColorPointer, TexCoordPointer, - * VertexAttribP{1234}ui, VertexP*, TexCoordP*, MultiTexCoordP*, NormalP3ui, ColorP*, SecondaryColorP and VertexAttribP*. - */ - public static final int GL_INT_2_10_10_10_REV = 0x8D9F; - - protected ARBVertexType2_10_10_10_REV() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexP2ui ] --- - - /** - * Packed component version of {@link GL11#glVertex2f Vertex2f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - */ - public static void glVertexP2ui(@NativeType("GLenum") int type, @NativeType("GLuint") int value) { - GL33.glVertexP2ui(type, value); - } - - // --- [ glVertexP3ui ] --- - - /** - * Packed component version of {@link GL11#glVertex3f Vertex3f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - */ - public static void glVertexP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int value) { - GL33.glVertexP3ui(type, value); - } - - // --- [ glVertexP4ui ] --- - - /** - * Packed component version of {@link GL11#glVertex4f Vertex4f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - */ - public static void glVertexP4ui(@NativeType("GLenum") int type, @NativeType("GLuint") int value) { - GL33.glVertexP4ui(type, value); - } - - // --- [ glVertexP2uiv ] --- - - /** Unsafe version of: {@link #glVertexP2uiv VertexP2uiv} */ - public static void nglVertexP2uiv(int type, long value) { - GL33.nglVertexP2uiv(type, value); - } - - /** - * Pointer version of {@link #glVertexP2ui VertexP2ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - */ - public static void glVertexP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer value) { - GL33.glVertexP2uiv(type, value); - } - - // --- [ glVertexP3uiv ] --- - - /** Unsafe version of: {@link #glVertexP3uiv VertexP3uiv} */ - public static void nglVertexP3uiv(int type, long value) { - GL33.nglVertexP3uiv(type, value); - } - - /** - * Pointer version of {@link #glVertexP3ui VertexP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - */ - public static void glVertexP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer value) { - GL33.glVertexP3uiv(type, value); - } - - // --- [ glVertexP4uiv ] --- - - /** Unsafe version of: {@link #glVertexP4uiv VertexP4uiv} */ - public static void nglVertexP4uiv(int type, long value) { - GL33.nglVertexP4uiv(type, value); - } - - /** - * Pointer version of {@link #glVertexP4ui VertexP4ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - */ - public static void glVertexP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer value) { - GL33.glVertexP4uiv(type, value); - } - - // --- [ glTexCoordP1ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord1f TexCoord1f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP1ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glTexCoordP1ui(type, coords); - } - - // --- [ glTexCoordP2ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord2f TexCoord2f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP2ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glTexCoordP2ui(type, coords); - } - - // --- [ glTexCoordP3ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord3f TexCoord3f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glTexCoordP3ui(type, coords); - } - - // --- [ glTexCoordP4ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord4f TexCoord4f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP4ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glTexCoordP4ui(type, coords); - } - - // --- [ glTexCoordP1uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP1uiv TexCoordP1uiv} */ - public static void nglTexCoordP1uiv(int type, long coords) { - GL33.nglTexCoordP1uiv(type, coords); - } - - /** - * Pointer version of {@link #glTexCoordP1ui TexCoordP1ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP1uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glTexCoordP1uiv(type, coords); - } - - // --- [ glTexCoordP2uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP2uiv TexCoordP2uiv} */ - public static void nglTexCoordP2uiv(int type, long coords) { - GL33.nglTexCoordP2uiv(type, coords); - } - - /** - * Pointer version of {@link #glTexCoordP2ui TexCoordP2ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glTexCoordP2uiv(type, coords); - } - - // --- [ glTexCoordP3uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP3uiv TexCoordP3uiv} */ - public static void nglTexCoordP3uiv(int type, long coords) { - GL33.nglTexCoordP3uiv(type, coords); - } - - /** - * Pointer version of {@link #glTexCoordP3ui TexCoordP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glTexCoordP3uiv(type, coords); - } - - // --- [ glTexCoordP4uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP4uiv TexCoordP4uiv} */ - public static void nglTexCoordP4uiv(int type, long coords) { - GL33.nglTexCoordP4uiv(type, coords); - } - - /** - * Pointer version of {@link #glTexCoordP4ui TexCoordP4ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glTexCoordP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glTexCoordP4uiv(type, coords); - } - - // --- [ glMultiTexCoordP1ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord1f MultiTexCoord1f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - */ - public static void glMultiTexCoordP1ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glMultiTexCoordP1ui(texture, type, coords); - } - - // --- [ glMultiTexCoordP2ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord2f MultiTexCoord2f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - */ - public static void glMultiTexCoordP2ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glMultiTexCoordP2ui(texture, type, coords); - } - - // --- [ glMultiTexCoordP3ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord3f MultiTexCoord3f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - */ - public static void glMultiTexCoordP3ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glMultiTexCoordP3ui(texture, type, coords); - } - - // --- [ glMultiTexCoordP4ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord4f MultiTexCoord4f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - */ - public static void glMultiTexCoordP4ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glMultiTexCoordP4ui(texture, type, coords); - } - - // --- [ glMultiTexCoordP1uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP1uiv MultiTexCoordP1uiv} */ - public static void nglMultiTexCoordP1uiv(int texture, int type, long coords) { - GL33.nglMultiTexCoordP1uiv(texture, type, coords); - } - - /** - * Pointer version of {@link #glMultiTexCoordP1ui MultiTexCoordP1ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glMultiTexCoordP1uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glMultiTexCoordP1uiv(texture, type, coords); - } - - // --- [ glMultiTexCoordP2uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP2uiv MultiTexCoordP2uiv} */ - public static void nglMultiTexCoordP2uiv(int texture, int type, long coords) { - GL33.nglMultiTexCoordP2uiv(texture, type, coords); - } - - /** - * Pointer version of {@link #glMultiTexCoordP2ui MultiTexCoordP2ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glMultiTexCoordP2uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glMultiTexCoordP2uiv(texture, type, coords); - } - - // --- [ glMultiTexCoordP3uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP3uiv MultiTexCoordP3uiv} */ - public static void nglMultiTexCoordP3uiv(int texture, int type, long coords) { - GL33.nglMultiTexCoordP3uiv(texture, type, coords); - } - - /** - * Pointer version of {@link #glMultiTexCoordP3ui MultiTexCoordP3ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glMultiTexCoordP3uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glMultiTexCoordP3uiv(texture, type, coords); - } - - // --- [ glMultiTexCoordP4uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP4uiv MultiTexCoordP4uiv} */ - public static void nglMultiTexCoordP4uiv(int texture, int type, long coords) { - GL33.nglMultiTexCoordP4uiv(texture, type, coords); - } - - /** - * Pointer version of {@link #glMultiTexCoordP4ui MultiTexCoordP4ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glMultiTexCoordP4uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glMultiTexCoordP4uiv(texture, type, coords); - } - - // --- [ glNormalP3ui ] --- - - /** - * Packed component version of {@link GL11#glNormal3f Normal3f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glNormalP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords) { - GL33.glNormalP3ui(type, coords); - } - - // --- [ glNormalP3uiv ] --- - - /** Unsafe version of: {@link #glNormalP3uiv NormalP3uiv} */ - public static void nglNormalP3uiv(int type, long coords) { - GL33.nglNormalP3uiv(type, coords); - } - - /** - * Pointer version {@link #glNormalP3ui NormalP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - */ - public static void glNormalP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - GL33.glNormalP3uiv(type, coords); - } - - // --- [ glColorP3ui ] --- - - /** - * Packed component version of {@link GL11#glColor3f Color3f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - */ - public static void glColorP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int color) { - GL33.glColorP3ui(type, color); - } - - // --- [ glColorP4ui ] --- - - /** - * Packed component version of {@link GL11#glColor4f Color4f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - */ - public static void glColorP4ui(@NativeType("GLenum") int type, @NativeType("GLuint") int color) { - GL33.glColorP4ui(type, color); - } - - // --- [ glColorP3uiv ] --- - - /** Unsafe version of: {@link #glColorP3uiv ColorP3uiv} */ - public static void nglColorP3uiv(int type, long color) { - GL33.nglColorP3uiv(type, color); - } - - /** - * Pointer version of {@link #glColorP3ui ColorP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - */ - public static void glColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer color) { - GL33.glColorP3uiv(type, color); - } - - // --- [ glColorP4uiv ] --- - - /** Unsafe version of: {@link #glColorP4uiv ColorP4uiv} */ - public static void nglColorP4uiv(int type, long color) { - GL33.nglColorP4uiv(type, color); - } - - /** - * Pointer version of {@link #glColorP4ui ColorP4ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - */ - public static void glColorP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer color) { - GL33.glColorP4uiv(type, color); - } - - // --- [ glSecondaryColorP3ui ] --- - - /** - * Packed component version of {@link GL14#glSecondaryColor3f SecondaryColor3f}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - */ - public static void glSecondaryColorP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int color) { - GL33.glSecondaryColorP3ui(type, color); - } - - // --- [ glSecondaryColorP3uiv ] --- - - /** Unsafe version of: {@link #glSecondaryColorP3uiv SecondaryColorP3uiv} */ - public static void nglSecondaryColorP3uiv(int type, long color) { - GL33.nglSecondaryColorP3uiv(type, color); - } - - /** - * Pointer version of {@link #glSecondaryColorP3ui SecondaryColorP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - */ - public static void glSecondaryColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer color) { - GL33.glSecondaryColorP3uiv(type, color); - } - - // --- [ glVertexAttribP1ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP1ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP1ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP2ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP2ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP2ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP3ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP3ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP3ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP4ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP4ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP4ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP1uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP1uiv VertexAttribP1uiv} */ - public static void nglVertexAttribP1uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP1uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP1ui VertexAttribP1ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP1uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP1uiv(index, type, normalized, value); - } - - // --- [ glVertexAttribP2uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP2uiv VertexAttribP2uiv} */ - public static void nglVertexAttribP2uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP2uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP2ui VertexAttribP2ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP2uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP2uiv(index, type, normalized, value); - } - - // --- [ glVertexAttribP3uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP3uiv VertexAttribP3uiv} */ - public static void nglVertexAttribP3uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP3uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP3ui VertexAttribP3ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP3uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP3uiv(index, type, normalized, value); - } - - // --- [ glVertexAttribP4uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP4uiv VertexAttribP4uiv} */ - public static void nglVertexAttribP4uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP4uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP4ui VertexAttribP4ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - */ - public static void glVertexAttribP4uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP4uiv(index, type, normalized, value); - } - - /** Array version of: {@link #glVertexP2uiv VertexP2uiv} */ - public static void glVertexP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] value) { - GL33.glVertexP2uiv(type, value); - } - - /** Array version of: {@link #glVertexP3uiv VertexP3uiv} */ - public static void glVertexP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] value) { - GL33.glVertexP3uiv(type, value); - } - - /** Array version of: {@link #glVertexP4uiv VertexP4uiv} */ - public static void glVertexP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] value) { - GL33.glVertexP4uiv(type, value); - } - - /** Array version of: {@link #glTexCoordP1uiv TexCoordP1uiv} */ - public static void glTexCoordP1uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glTexCoordP1uiv(type, coords); - } - - /** Array version of: {@link #glTexCoordP2uiv TexCoordP2uiv} */ - public static void glTexCoordP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glTexCoordP2uiv(type, coords); - } - - /** Array version of: {@link #glTexCoordP3uiv TexCoordP3uiv} */ - public static void glTexCoordP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glTexCoordP3uiv(type, coords); - } - - /** Array version of: {@link #glTexCoordP4uiv TexCoordP4uiv} */ - public static void glTexCoordP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glTexCoordP4uiv(type, coords); - } - - /** Array version of: {@link #glMultiTexCoordP1uiv MultiTexCoordP1uiv} */ - public static void glMultiTexCoordP1uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glMultiTexCoordP1uiv(texture, type, coords); - } - - /** Array version of: {@link #glMultiTexCoordP2uiv MultiTexCoordP2uiv} */ - public static void glMultiTexCoordP2uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glMultiTexCoordP2uiv(texture, type, coords); - } - - /** Array version of: {@link #glMultiTexCoordP3uiv MultiTexCoordP3uiv} */ - public static void glMultiTexCoordP3uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glMultiTexCoordP3uiv(texture, type, coords); - } - - /** Array version of: {@link #glMultiTexCoordP4uiv MultiTexCoordP4uiv} */ - public static void glMultiTexCoordP4uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glMultiTexCoordP4uiv(texture, type, coords); - } - - /** Array version of: {@link #glNormalP3uiv NormalP3uiv} */ - public static void glNormalP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - GL33.glNormalP3uiv(type, coords); - } - - /** Array version of: {@link #glColorP3uiv ColorP3uiv} */ - public static void glColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] color) { - GL33.glColorP3uiv(type, color); - } - - /** Array version of: {@link #glColorP4uiv ColorP4uiv} */ - public static void glColorP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] color) { - GL33.glColorP4uiv(type, color); - } - - /** Array version of: {@link #glSecondaryColorP3uiv SecondaryColorP3uiv} */ - public static void glSecondaryColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] color) { - GL33.glSecondaryColorP3uiv(type, color); - } - - /** Array version of: {@link #glVertexAttribP1uiv VertexAttribP1uiv} */ - public static void glVertexAttribP1uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP1uiv(index, type, normalized, value); - } - - /** Array version of: {@link #glVertexAttribP2uiv VertexAttribP2uiv} */ - public static void glVertexAttribP2uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP2uiv(index, type, normalized, value); - } - - /** Array version of: {@link #glVertexAttribP3uiv VertexAttribP3uiv} */ - public static void glVertexAttribP3uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP3uiv(index, type, normalized, value); - } - - /** Array version of: {@link #glVertexAttribP4uiv VertexAttribP4uiv} */ - public static void glVertexAttribP4uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP4uiv(index, type, normalized, value); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBViewportArray.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBViewportArray.java deleted file mode 100644 index 0f73895d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBViewportArray.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the ARB_viewport_array extension. - * - *

    OpenGL is modeled on a pipeline of operations. The final stage in this pipeline before rasterization is the viewport transformation. This stage - * transforms vertices from view space into window coordinates and allows the application to specify a rectangular region of screen space into which OpenGL - * should draw primitives. Unextended OpenGL implementations provide a single viewport per context. In order to draw primitives into multiple viewports, - * the OpenGL viewport may be changed between several draw calls. With the advent of Geometry Shaders, it has become possible for an application to amplify - * geometry and produce multiple output primitives for each primitive input to the Geometry Shader. It is possible to direct these primitives to render - * into a selected render target. However, all render targets share the same, global OpenGL viewport.

    - * - *

    This extension enhances OpenGL by providing a mechanism to expose multiple viewports. Each viewport is specified as a rectangle. The destination - * viewport may be selected per-primitive by the geometry shader. This allows the Geometry Shader to produce different versions of primitives destined for - * separate viewport rectangles on the same surface. Additionally, when combined with multiple framebuffer attachments, it allows a different viewport - * rectangle to be selected for each. This extension also exposes a separate scissor rectangle for each viewport. Finally, the viewport bounds are now - * floating point quantities allowing fractional pixel offsets to be applied during the viewport transform.

    - * - *

    Requires {@link GL32 OpenGL 3.2} or {@link EXTGeometryShader4 EXT_geometry_shader4} or {@link ARBGeometryShader4 ARB_geometry_shader4}. Promoted to core in {@link GL41 OpenGL 4.1}.

    - */ -public class ARBViewportArray { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_VIEWPORTS = 0x825B, - GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, - GL_VIEWPORT_BOUNDS_RANGE = 0x825D, - GL_LAYER_PROVOKING_VERTEX = 0x825E, - GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; - - /** Returned in the {@code data} parameter from a Get query with a {@code pname} of LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX. */ - public static final int GL_UNDEFINED_VERTEX = 0x8260; - - protected ARBViewportArray() { - throw new UnsupportedOperationException(); - } - - // --- [ glViewportArrayv ] --- - - /** - * Unsafe version of: {@link #glViewportArrayv ViewportArrayv} - * - * @param count the number of viewports to set - */ - public static void nglViewportArrayv(int first, int count, long v) { - GL41C.nglViewportArrayv(first, count, v); - } - - /** - * Sets multiple viewports. - * - * @param first the first viewport to set - * @param v an array containing the viewport parameters - */ - public static void glViewportArrayv(@NativeType("GLuint") int first, @NativeType("GLfloat const *") FloatBuffer v) { - GL41C.glViewportArrayv(first, v); - } - - // --- [ glViewportIndexedf ] --- - - /** - * Sets a specified viewport. - * - * @param index the viewport to set - * @param x the left viewport coordinate - * @param y the bottom viewport coordinate - * @param w the viewport width - * @param h the viewport height - */ - public static void glViewportIndexedf(@NativeType("GLuint") int index, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float w, @NativeType("GLfloat") float h) { - GL41C.glViewportIndexedf(index, x, y, w, h); - } - - // --- [ glViewportIndexedfv ] --- - - /** Unsafe version of: {@link #glViewportIndexedfv ViewportIndexedfv} */ - public static void nglViewportIndexedfv(int index, long v) { - GL41C.nglViewportIndexedfv(index, v); - } - - /** - * Pointer version of {@link #glViewportIndexedf ViewportIndexedf}. - * - * @param index the viewport to set - * @param v the viewport parameters - */ - public static void glViewportIndexedfv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - GL41C.glViewportIndexedfv(index, v); - } - - // --- [ glScissorArrayv ] --- - - /** - * Unsafe version of: {@link #glScissorArrayv ScissorArrayv} - * - * @param count the number of scissor boxes to modify - */ - public static void nglScissorArrayv(int first, int count, long v) { - GL41C.nglScissorArrayv(first, count, v); - } - - /** - * Defines the scissor box for multiple viewports. - * - * @param first the index of the first viewport whose scissor box to modify - * @param v an array containing the left, bottom, width and height of each scissor box, in that order - */ - public static void glScissorArrayv(@NativeType("GLuint") int first, @NativeType("GLint const *") IntBuffer v) { - GL41C.glScissorArrayv(first, v); - } - - // --- [ glScissorIndexed ] --- - - /** - * Defines the scissor box for a specific viewport. - * - * @param index the index of the viewport whose scissor box to modify - * @param left the left scissor box coordinate - * @param bottom the bottom scissor box coordinate - * @param width the scissor box width - * @param height the scissor box height - */ - public static void glScissorIndexed(@NativeType("GLuint") int index, @NativeType("GLint") int left, @NativeType("GLint") int bottom, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL41C.glScissorIndexed(index, left, bottom, width, height); - } - - // --- [ glScissorIndexedv ] --- - - /** Unsafe version of: {@link #glScissorIndexedv ScissorIndexedv} */ - public static void nglScissorIndexedv(int index, long v) { - GL41C.nglScissorIndexedv(index, v); - } - - /** - * Pointer version of {@link #glScissorIndexed ScissorIndexed}. - * - * @param index the index of the viewport whose scissor box to modify - * @param v an array containing the left, bottom, width and height of each scissor box, in that order - */ - public static void glScissorIndexedv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL41C.glScissorIndexedv(index, v); - } - - // --- [ glDepthRangeArrayv ] --- - - /** - * Unsafe version of: {@link #glDepthRangeArrayv DepthRangeArrayv} - * - * @param count the number of viewports whose depth range to update - */ - public static void nglDepthRangeArrayv(int first, int count, long v) { - GL41C.nglDepthRangeArrayv(first, count, v); - } - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified set of viewports. - * - * @param first the index of the first viewport whose depth range to update - * @param v n array containing the near and far values for the depth range of each modified viewport - */ - public static void glDepthRangeArrayv(@NativeType("GLuint") int first, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glDepthRangeArrayv(first, v); - } - - // --- [ glDepthRangeIndexed ] --- - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified viewport. - * - * @param index the index of the viewport whose depth range to update - * @param zNear the mapping of the near clipping plane to window coordinates. The initial value is 0. - * @param zFar the mapping of the far clipping plane to window coordinates. The initial value is 1. - */ - public static void glDepthRangeIndexed(@NativeType("GLuint") int index, @NativeType("GLdouble") double zNear, @NativeType("GLdouble") double zFar) { - GL41C.glDepthRangeIndexed(index, zNear, zFar); - } - - // --- [ glGetFloati_v ] --- - - /** Unsafe version of: {@link #glGetFloati_v GetFloati_v} */ - public static void nglGetFloati_v(int target, int index, long data) { - GL41C.nglGetFloati_v(target, index, data); - } - - /** - * Queries the float value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - */ - public static void glGetFloati_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer data) { - GL41C.glGetFloati_v(target, index, data); - } - - /** - * Queries the float value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - */ - @NativeType("void") - public static float glGetFloati(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL41C.glGetFloati(target, index); - } - - // --- [ glGetDoublei_v ] --- - - /** Unsafe version of: {@link #glGetDoublei_v GetDoublei_v} */ - public static void nglGetDoublei_v(int target, int index, long data) { - GL41C.nglGetDoublei_v(target, index, data); - } - - /** - * Queries the double value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - */ - public static void glGetDoublei_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer data) { - GL41C.glGetDoublei_v(target, index, data); - } - - /** - * Queries the double value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - */ - @NativeType("void") - public static double glGetDoublei(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL41C.glGetDoublei(target, index); - } - - /** Array version of: {@link #glViewportArrayv ViewportArrayv} */ - public static void glViewportArrayv(@NativeType("GLuint") int first, @NativeType("GLfloat const *") float[] v) { - GL41C.glViewportArrayv(first, v); - } - - /** Array version of: {@link #glViewportIndexedfv ViewportIndexedfv} */ - public static void glViewportIndexedfv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - GL41C.glViewportIndexedfv(index, v); - } - - /** Array version of: {@link #glScissorArrayv ScissorArrayv} */ - public static void glScissorArrayv(@NativeType("GLuint") int first, @NativeType("GLint const *") int[] v) { - GL41C.glScissorArrayv(first, v); - } - - /** Array version of: {@link #glScissorIndexedv ScissorIndexedv} */ - public static void glScissorIndexedv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL41C.glScissorIndexedv(index, v); - } - - /** Array version of: {@link #glDepthRangeArrayv DepthRangeArrayv} */ - public static void glDepthRangeArrayv(@NativeType("GLuint") int first, @NativeType("GLdouble const *") double[] v) { - GL41C.glDepthRangeArrayv(first, v); - } - - /** Array version of: {@link #glGetFloati_v GetFloati_v} */ - public static void glGetFloati_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] data) { - GL41C.glGetFloati_v(target, index, data); - } - - /** Array version of: {@link #glGetDoublei_v GetDoublei_v} */ - public static void glGetDoublei_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] data) { - GL41C.glGetDoublei_v(target, index, data); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ARBWindowPos.java b/LWJGL/src/main/java/org/lwjgl/opengl/ARBWindowPos.java deleted file mode 100644 index 65dec43c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ARBWindowPos.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the ARB_window_pos extension. - * - *

    In order to set the current raster position to a specific window coordinate with the {@link GL11#glRasterPos2i RasterPos2i} command, the modelview matrix, projection matrix - * and viewport must be set very carefully. Furthermore, if the desired window coordinate is outside of the window's bounds one must rely on a subtle - * side-effect of the {@link GL11#glBitmap Bitmap} command in order to avoid frustum clipping.

    - * - *

    This extension provides a set of functions to directly set the current raster position in window coordinates, bypassing the modelview matrix, the - * projection matrix and the viewport-to-window mapping. Furthermore, clip testing is not performed, so that the current raster position is always valid.

    - * - *

    This greatly simplifies the process of setting the current raster position to a specific window coordinate prior to calling {@link GL11#glDrawPixels DrawPixels}, - * {@link GL11#glCopyPixels CopyPixels} or {@link GL11#glBitmap Bitmap}. Many matrix operations can be avoided when mixing 2D and 3D rendering.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public class ARBWindowPos { - - static { GL.initialize(); } - - protected ARBWindowPos() { - throw new UnsupportedOperationException(); - } - - // --- [ glWindowPos2iARB ] --- - - /** - * Alternate way to set the current raster position. {@code z} is implictly set to 0. - * - * @param x the x value - * @param y the y value - */ - public static native void glWindowPos2iARB(@NativeType("GLint") int x, @NativeType("GLint") int y); - - // --- [ glWindowPos2sARB ] --- - - /** - * Short version of {@link #glWindowPos2iARB WindowPos2iARB}. - * - * @param x the x value - * @param y the y value - */ - public static native void glWindowPos2sARB(@NativeType("GLshort") short x, @NativeType("GLshort") short y); - - // --- [ glWindowPos2fARB ] --- - - /** - * Float version of {@link #glWindowPos2iARB WindowPos2iARB}. - * - * @param x the x value - * @param y the y value - */ - public static native void glWindowPos2fARB(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y); - - // --- [ glWindowPos2dARB ] --- - - /** - * Double version of {@link #glWindowPos2iARB WindowPos2iARB}. - * - * @param x the x value - * @param y the y value - */ - public static native void glWindowPos2dARB(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glWindowPos2ivARB ] --- - - /** Unsafe version of: {@link #glWindowPos2ivARB WindowPos2ivARB} */ - public static native void nglWindowPos2ivARB(long p); - - /** - * Pointer version of {@link #glWindowPos2iARB WindowPos2iARB}. - * - * @param p the position value - */ - public static void glWindowPos2ivARB(@NativeType("GLint const *") IntBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2ivARB(memAddress(p)); - } - - // --- [ glWindowPos2svARB ] --- - - /** Unsafe version of: {@link #glWindowPos2svARB WindowPos2svARB} */ - public static native void nglWindowPos2svARB(long p); - - /** - * Pointer version of {@link #glWindowPos2sARB WindowPos2sARB}. - * - * @param p the position value - */ - public static void glWindowPos2svARB(@NativeType("GLshort const *") ShortBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2svARB(memAddress(p)); - } - - // --- [ glWindowPos2fvARB ] --- - - /** Unsafe version of: {@link #glWindowPos2fvARB WindowPos2fvARB} */ - public static native void nglWindowPos2fvARB(long p); - - /** - * Pointer version of {@link #glWindowPos2fARB WindowPos2fARB}. - * - * @param p the position value - */ - public static void glWindowPos2fvARB(@NativeType("GLfloat const *") FloatBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2fvARB(memAddress(p)); - } - - // --- [ glWindowPos2dvARB ] --- - - /** Unsafe version of: {@link #glWindowPos2dvARB WindowPos2dvARB} */ - public static native void nglWindowPos2dvARB(long p); - - /** - * Pointer version of {@link #glWindowPos2dARB WindowPos2dARB}. - * - * @param p the position value - */ - public static void glWindowPos2dvARB(@NativeType("GLdouble const *") DoubleBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2dvARB(memAddress(p)); - } - - // --- [ glWindowPos3iARB ] --- - - /** - * Alternate way to set the current raster position. - * - * @param x the x value - * @param y the y value - * @param z the z value - */ - public static native void glWindowPos3iARB(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glWindowPos3sARB ] --- - - /** - * Short version of {@link #glWindowPos3iARB WindowPos3iARB}. - * - * @param x the x value - * @param y the y value - * @param z the z value - */ - public static native void glWindowPos3sARB(@NativeType("GLshort") short x, @NativeType("GLshort") short y, @NativeType("GLshort") short z); - - // --- [ glWindowPos3fARB ] --- - - /** - * Float version of {@link #glWindowPos3iARB WindowPos3iARB}. - * - * @param x the x value - * @param y the y value - * @param z the z value - */ - public static native void glWindowPos3fARB(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glWindowPos3dARB ] --- - - /** - * Double version of {@link #glWindowPos3iARB WindowPos3iARB}. - * - * @param x the x value - * @param y the y value - * @param z the z value - */ - public static native void glWindowPos3dARB(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glWindowPos3ivARB ] --- - - /** Unsafe version of: {@link #glWindowPos3ivARB WindowPos3ivARB} */ - public static native void nglWindowPos3ivARB(long p); - - /** - * Pointer version of {@link #glWindowPos3iARB WindowPos3iARB}. - * - * @param p the position value - */ - public static void glWindowPos3ivARB(@NativeType("GLint const *") IntBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3ivARB(memAddress(p)); - } - - // --- [ glWindowPos3svARB ] --- - - /** Unsafe version of: {@link #glWindowPos3svARB WindowPos3svARB} */ - public static native void nglWindowPos3svARB(long p); - - /** - * Pointer version of {@link #glWindowPos3sARB WindowPos3sARB}. - * - * @param p the position value - */ - public static void glWindowPos3svARB(@NativeType("GLshort const *") ShortBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3svARB(memAddress(p)); - } - - // --- [ glWindowPos3fvARB ] --- - - /** Unsafe version of: {@link #glWindowPos3fvARB WindowPos3fvARB} */ - public static native void nglWindowPos3fvARB(long p); - - /** - * Pointer version of {@link #glWindowPos3fARB WindowPos3fARB}. - * - * @param p the position value - */ - public static void glWindowPos3fvARB(@NativeType("GLfloat const *") FloatBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3fvARB(memAddress(p)); - } - - // --- [ glWindowPos3dvARB ] --- - - /** Unsafe version of: {@link #glWindowPos3dvARB WindowPos3dvARB} */ - public static native void nglWindowPos3dvARB(long p); - - /** - * Pointer version of {@link #glWindowPos3dARB WindowPos3dARB}. - * - * @param p the position value - */ - public static void glWindowPos3dvARB(@NativeType("GLdouble const *") DoubleBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3dvARB(memAddress(p)); - } - - /** Array version of: {@link #glWindowPos2ivARB WindowPos2ivARB} */ - public static void glWindowPos2ivARB(@NativeType("GLint const *") int[] p) { - long __functionAddress = GL.getICD().glWindowPos2ivARB; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** Array version of: {@link #glWindowPos2svARB WindowPos2svARB} */ - public static void glWindowPos2svARB(@NativeType("GLshort const *") short[] p) { - long __functionAddress = GL.getICD().glWindowPos2svARB; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** Array version of: {@link #glWindowPos2fvARB WindowPos2fvARB} */ - public static void glWindowPos2fvARB(@NativeType("GLfloat const *") float[] p) { - long __functionAddress = GL.getICD().glWindowPos2fvARB; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** Array version of: {@link #glWindowPos2dvARB WindowPos2dvARB} */ - public static void glWindowPos2dvARB(@NativeType("GLdouble const *") double[] p) { - long __functionAddress = GL.getICD().glWindowPos2dvARB; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** Array version of: {@link #glWindowPos3ivARB WindowPos3ivARB} */ - public static void glWindowPos3ivARB(@NativeType("GLint const *") int[] p) { - long __functionAddress = GL.getICD().glWindowPos3ivARB; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - - /** Array version of: {@link #glWindowPos3svARB WindowPos3svARB} */ - public static void glWindowPos3svARB(@NativeType("GLshort const *") short[] p) { - long __functionAddress = GL.getICD().glWindowPos3svARB; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - - /** Array version of: {@link #glWindowPos3fvARB WindowPos3fvARB} */ - public static void glWindowPos3fvARB(@NativeType("GLfloat const *") float[] p) { - long __functionAddress = GL.getICD().glWindowPos3fvARB; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - - /** Array version of: {@link #glWindowPos3dvARB WindowPos3dvARB} */ - public static void glWindowPos3dvARB(@NativeType("GLdouble const *") double[] p) { - long __functionAddress = GL.getICD().glWindowPos3dvARB; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ATIMeminfo.java b/LWJGL/src/main/java/org/lwjgl/opengl/ATIMeminfo.java deleted file mode 100644 index a9688416..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ATIMeminfo.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the ATI_meminfo extension. - * - *

    Traditionally, OpenGL has treated resource management as a task of hardware virtualization hidden from applications. While providing great portability, - * this shielding of information can prevent applications from making intelligent decisions on the management of resources they create. For instance, an - * application may be better served by choosing a different rendering method if there is not sufficient resources to efficiently utilize its preferred - * method.

    - * - *

    Requires {@link GL11 OpenGL 1.1}

    - */ -public final class ATIMeminfo { - - /** Accepted by the {@code param} parameter of GetIntegerv. */ - public static final int - GL_VBO_FREE_MEMORY_ATI = 0x87FB, - GL_TEXTURE_FREE_MEMORY_ATI = 0x87FC, - GL_RENDERBUFFER_FREE_MEMORY_ATI = 0x87FD; - - private ATIMeminfo() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ATITextureCompression3DC.java b/LWJGL/src/main/java/org/lwjgl/opengl/ATITextureCompression3DC.java deleted file mode 100644 index 200cdde4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ATITextureCompression3DC.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** This extension is undocumented. See 3Dc for information. */ -public final class ATITextureCompression3DC { - - /** Accepted by the {@code internalformat} parameter of TexImage functions. */ - public static final int GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI = 0x8837; - - private ATITextureCompression3DC() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AWTCanvasImplementation.java b/LWJGL/src/main/java/org/lwjgl/opengl/AWTCanvasImplementation.java deleted file mode 100644 index 95439cc3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AWTCanvasImplementation.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.opengl; - -import org.lwjgl.LWJGLException; - -import java.awt.Canvas; -import java.awt.GraphicsConfiguration; -import java.awt.GraphicsDevice; - -/** - * - * @author elias_naur - * @version $Revision$ - * $Id$ - */ -interface AWTCanvasImplementation { - /** - * Return an opaque handle to the canvas peer information required to create a context from it. - */ - PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException; - - /** - * Find a proper GraphicsConfiguration from the given GraphicsDevice and PixelFormat. - * - * @return A GraphicsConfiguration matching the given GraphicsConfiguration and PixelFormat. - * @throws LWJGLException if no suitable configuration could be found. - */ - GraphicsConfiguration findConfiguration(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException; -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/AWTGLCanvas.java b/LWJGL/src/main/java/org/lwjgl/opengl/AWTGLCanvas.java deleted file mode 100644 index 373793b5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/AWTGLCanvas.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * 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.opengl; - -import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT; -import static org.lwjgl.opengl.GL11.glClear; -import static org.lwjgl.opengl.GL11.glClearColor; - -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.PointerBuffer; -import org.lwjgl.Sys; - -import java.awt.Canvas; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.GraphicsDevice; -import java.awt.GraphicsEnvironment; -import java.awt.Point; -import java.awt.event.ComponentEvent; -import java.awt.event.ComponentListener; -import java.awt.event.HierarchyEvent; -import java.awt.event.HierarchyListener; - -/** - *

    - * An AWT rendering context. - *

    - * - * @author $Author$ - * $Id$ - * @version $Revision$ - */ -public class AWTGLCanvas extends Canvas implements DrawableLWJGL, ComponentListener, HierarchyListener { - - private static final long serialVersionUID = 1L; - - private static final AWTCanvasImplementation implementation; - private boolean update_context; - private Object SYNC_LOCK = new Object(); - - /** The requested pixel format */ - private final PixelFormat pixel_format; - - /** The drawable to share context with */ - private final Drawable drawable; - - /** The ContextAttribs to use when creating the context */ - private final ContextAttribs attribs; - - /** Context handle */ - private PeerInfo peer_info; - private ContextGL context; - - /** - * re-entry counter for support for re-entrant - * redrawing in paint(). It happens when using dialog boxes. - */ - private int reentry_count; - - /** Tracks whether initGL() needs to be called */ - private boolean first_run; - - static { - Sys.initialize(); - implementation = createImplementation(); - } - - static AWTCanvasImplementation createImplementation() { - switch ( LWJGLUtil.getPlatform() ) { - - default: - throw new IllegalStateException("Unsupported platform"); - } - } - - private void setUpdate() { - synchronized ( SYNC_LOCK ) { - update_context = true; - } - } - - public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException { - throw new UnsupportedOperationException(); - } - - public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException { - throw new UnsupportedOperationException(); - } - - public PixelFormatLWJGL getPixelFormat() { - return pixel_format; - } - - /** This method should only be called internally. */ - public ContextGL getContext() { - return context; - } - - /** This method should only be called internally. */ - public ContextGL createSharedContext() throws LWJGLException { - synchronized ( SYNC_LOCK ) { - if ( context == null ) throw new IllegalStateException("Canvas not yet displayable"); - - return new ContextGL(peer_info, context.getContextAttribs(), context); - } - } - - public void checkGLError() { - Util.checkGLError(); - } - - public void initContext(final float r, final float g, final float b) { - // set background clear color - glClearColor(r, g, b, 0.0f); - // Clear window to avoid the desktop "showing through" - glClear(GL_COLOR_BUFFER_BIT); - } - - /** Constructor using the default PixelFormat. */ - public AWTGLCanvas() throws LWJGLException { - this(new PixelFormat()); - } - - /** - * Create an AWTGLCanvas with the requested PixelFormat on the default GraphicsDevice. - * - * @param pixel_format The desired pixel format. May not be null - */ - public AWTGLCanvas(PixelFormat pixel_format) throws LWJGLException { - this(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(), pixel_format); - } - - /** - * Create an AWTGLCanvas with the requested PixelFormat on the default GraphicsDevice. - * - * @param device the device to create the canvas on. - * @param pixel_format The desired pixel format. May not be null - */ - public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException { - this(device, pixel_format, null); - } - - /** - * Create an AWTGLCanvas with the requested PixelFormat on the specified GraphicsDevice. - * - * @param device the device to create the canvas on. - * @param pixel_format The desired pixel format. May not be null - * @param drawable The Drawable to share context with - */ - public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable) throws LWJGLException { - this(device, pixel_format, drawable, null); - } - - /** - * Create an AWTGLCanvas with the requested PixelFormat on the specified GraphicsDevice. - * - * @param device the device to create the canvas on. - * @param pixel_format The desired pixel format. May not be null - * @param drawable The Drawable to share context with - * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) - */ - public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable, ContextAttribs attribs) throws LWJGLException { - super(implementation.findConfiguration(device, pixel_format)); - if ( pixel_format == null ) - throw new NullPointerException("Pixel format must be non-null"); - addHierarchyListener(this); - addComponentListener(this); - this.drawable = drawable; - this.pixel_format = pixel_format; - this.attribs = attribs; - } - - /* (non-Javadoc) - * @see java.awt.Canvas#addNotify() - */ - public void addNotify() { - super.addNotify(); - } - - /* (non-Javadoc) - * @see java.awt.Component#removeNotify() - */ - public void removeNotify() { - synchronized ( SYNC_LOCK ) { - destroy(); - super.removeNotify(); - } - } - - /** Set swap interval. */ - public void setSwapInterval(int swap_interval) { - synchronized ( SYNC_LOCK ) { - if ( context == null ) - throw new IllegalStateException("Canvas not yet displayable"); - ContextGL.setSwapInterval(swap_interval); - } - } - - /** Enable vsync */ - public void setVSyncEnabled(boolean enabled) { - setSwapInterval(enabled ? 1 : 0); - } - - /** Swap the canvas' buffer */ - public void swapBuffers() throws LWJGLException { - synchronized ( SYNC_LOCK ) { - if ( context == null ) - throw new IllegalStateException("Canvas not yet displayable"); - ContextGL.swapBuffers(); - } - } - - public boolean isCurrent() throws LWJGLException { - synchronized ( SYNC_LOCK ) { - if ( context == null ) throw new IllegalStateException("Canvas not yet displayable"); - - return context.isCurrent(); - } - } - - /** - * Make the canvas' context current. It is highly recommended that the context - * is only made current inside the AWT thread (for example in an overridden paintGL()). - */ - public void makeCurrent() throws LWJGLException { - synchronized ( SYNC_LOCK ) { - if ( context == null ) - throw new IllegalStateException("Canvas not yet displayable"); - context.makeCurrent(); - } - } - - public void releaseContext() throws LWJGLException { - synchronized ( SYNC_LOCK ) { - if ( context == null ) - throw new IllegalStateException("Canvas not yet displayable"); - if ( context.isCurrent() ) - context.releaseCurrent(); - } - } - - /** Destroy the OpenGL context. This happens when the component becomes undisplayable */ - public final void destroy() { - synchronized ( SYNC_LOCK ) { - try { - if ( context != null ) { - context.forceDestroy(); - context = null; - reentry_count = 0; - peer_info.destroy(); - peer_info = null; - } - } catch (LWJGLException e) { - throw new RuntimeException(e); - } - } - } - - public final void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { - synchronized ( SYNC_LOCK ) { - if ( context == null ) - throw new IllegalStateException("Canvas not yet displayable"); - context.setCLSharingProperties(properties); - } - } - - /** - * Override this to do initialising of the context. - * It will be called once from paint(), immediately after - * the context is created and made current. - */ - protected void initGL() { - } - - /** Override this to do painting */ - protected void paintGL() { - } - - /** - * The default paint() operation makes the context current and calls paintGL() which should - * be overridden to do GL operations. - */ - public final void paint(Graphics g) { - LWJGLException exception = null; - synchronized ( SYNC_LOCK ) { - if ( !isDisplayable() ) - return; - try { - if ( peer_info == null ) { - this.peer_info = implementation.createPeerInfo(this, pixel_format, attribs); - } - peer_info.lockAndGetHandle(); - try { - if ( context == null ) { - this.context = new ContextGL(peer_info, attribs, drawable != null ? (ContextGL)((DrawableLWJGL)drawable).getContext() : null); - first_run = true; - } - - if ( reentry_count == 0 ) - context.makeCurrent(); - reentry_count++; - try { - if ( update_context ) { - context.update(); - update_context = false; - } - if ( first_run ) { - first_run = false; - initGL(); - } - paintGL(); - } finally { - reentry_count--; - if ( reentry_count == 0 ) - context.releaseCurrent(); - } - } finally { - peer_info.unlock(); - } - } catch (LWJGLException e) { - exception = e; - } - } - if ( exception != null ) - exceptionOccurred(exception); - } - - /** - * This method will be called if an unhandled LWJGLException occurs in paint(). - * Override this method to be notified of this. - * - * @param exception The exception that occurred. - */ - protected void exceptionOccurred(LWJGLException exception) { - LWJGLUtil.log("Unhandled exception occurred, skipping paint(): " + exception); - } - - /** override update to avoid clearing */ - public void update(Graphics g) { - paint(g); - } - - public void componentShown(ComponentEvent e) { - } - - public void componentHidden(ComponentEvent e) { - } - - public void componentResized(ComponentEvent e) { - setUpdate(); - } - - public void componentMoved(ComponentEvent e) { - setUpdate(); - } - - public void setLocation(int x, int y) { - super.setLocation(x, y); - setUpdate(); - } - - public void setLocation(Point p) { - super.setLocation(p); - setUpdate(); - } - - public void setSize(Dimension d) { - super.setSize(d); - setUpdate(); - } - - public void setSize(int width, int height) { - super.setSize(width, height); - setUpdate(); - } - - public void setBounds(int x, int y, int width, int height) { - super.setBounds(x, y, width, height); - setUpdate(); - } - - public void hierarchyChanged(HierarchyEvent e) { - setUpdate(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/CGL.java b/LWJGL/src/main/java/org/lwjgl/opengl/CGL.java deleted file mode 100644 index 17a52cb4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/CGL.java +++ /dev/null @@ -1,1650 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to CGL. */ -public class CGL { - - /** Contains the function pointers loaded from {@code GL.getFunctionProvider()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetCurrentContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetCurrentContext"), - SetCurrentContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetCurrentContext"), - GetShareGroup = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetShareGroup"), - ChoosePixelFormat = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLChoosePixelFormat"), - DestroyPixelFormat = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDestroyPixelFormat"), - DescribePixelFormat = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDescribePixelFormat"), - ReleasePixelFormat = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLReleasePixelFormat"), - RetainPixelFormat = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLRetainPixelFormat"), - GetPixelFormatRetainCount = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetPixelFormatRetainCount"), - QueryRendererInfo = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLQueryRendererInfo"), - DestroyRendererInfo = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDestroyRendererInfo"), - DescribeRenderer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDescribeRenderer"), - CreateContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLCreateContext"), - DestroyContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDestroyContext"), - CopyContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLCopyContext"), - RetainContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLRetainContext"), - ReleaseContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLReleaseContext"), - GetContextRetainCount = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetContextRetainCount"), - GetPixelFormat = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetPixelFormat"), - CreatePBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLCreatePBuffer"), - DestroyPBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDestroyPBuffer"), - DescribePBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDescribePBuffer"), - TexImagePBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLTexImagePBuffer"), - RetainPBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLRetainPBuffer"), - ReleasePBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLReleasePBuffer"), - GetPBufferRetainCount = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetPBufferRetainCount"), - SetOffScreen = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetOffScreen"), - GetOffScreen = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetOffScreen"), - SetFullScreen = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetFullScreen"), - SetFullScreenOnDisplay = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetFullScreenOnDisplay"), - SetPBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetPBuffer"), - GetPBuffer = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetPBuffer"), - ClearDrawable = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLClearDrawable"), - FlushDrawable = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLFlushDrawable"), - Enable = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLEnable"), - Disable = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLDisable"), - IsEnabled = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLIsEnabled"), - SetParameter = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetParameter"), - GetParameter = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetParameter"), - SetVirtualScreen = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetVirtualScreen"), - GetVirtualScreen = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetVirtualScreen"), - UpdateContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLUpdateContext"), - SetGlobalOption = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLSetGlobalOption"), - GetGlobalOption = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetGlobalOption"), - LockContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLLockContext"), - UnlockContext = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLUnlockContext"), - GetVersion = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLGetVersion"), - ErrorString = apiGetFunctionAddress(GL.getFunctionProvider(), "CGLErrorString"); - - } - - /** Attribute names for {@link #CGLChoosePixelFormat ChoosePixelFormat} and {@link #CGLDescribePixelFormat DescribePixelFormat}. */ - public static final int - kCGLPFAAllRenderers = 1, - kCGLPFATripleBuffer = 3, - kCGLPFADoubleBuffer = 5, - kCGLPFAStereo = 6, - kCGLPFAColorSize = 8, - kCGLPFAAlphaSize = 11, - kCGLPFADepthSize = 12, - kCGLPFAStencilSize = 13, - kCGLPFAMinimumPolicy = 51, - kCGLPFAMaximumPolicy = 52, - kCGLPFASampleBuffers = 55, - kCGLPFASamples = 56, - kCGLPFAColorFloat = 58, - kCGLPFAMultisample = 59, - kCGLPFASupersample = 60, - kCGLPFASampleAlpha = 61, - kCGLPFARendererID = 70, - kCGLPFASingleRenderer = 71, - kCGLPFANoRecovery = 72, - kCGLPFAAccelerated = 73, - kCGLPFAClosestPolicy = 74, - kCGLPFABackingStore = 76, - kCGLPFABackingVolatile = 77, - kCGLPFADisplayMask = 84, - kCGLPFAAllowOfflineRenderers = 96, - kCGLPFAAcceleratedCompute = 97, - kCGLPFAOpenGLProfile = 99, - kCGLPFASupportsAutomaticGraphicsSwitching = 101, - kCGLPFAVirtualScreenCount = 128, - kCGLPFAAuxBuffers = 7, - kCGLPFAAccumSize = 14, - kCGLPFAOffScreen = 53, - kCGLPFAAuxDepthStencil = 57, - kCGLPFAWindow = 80, - kCGLPFACompliant = 83, - kCGLPFAPBuffer = 90, - kCGLPFARemotePBuffer = 91, - kCGLPFARobust = 75, - kCGLPFAMPSafe = 78, - kCGLPFAMultiScreen = 81, - kCGLPFAFullScreen = 54; - - /** Property names for {@link #CGLDescribeRenderer DescribeRenderer}. */ - public static final int - kCGLRPOffScreen = 53, - kCGLRPRendererID = 70, - kCGLRPAccelerated = 73, - kCGLRPBackingStore = 76, - kCGLRPWindow = 80, - kCGLRPCompliant = 83, - kCGLRPDisplayMask = 84, - kCGLRPBufferModes = 100, - kCGLRPColorModes = 103, - kCGLRPAccumModes = 104, - kCGLRPDepthModes = 105, - kCGLRPStencilModes = 106, - kCGLRPMaxAuxBuffers = 107, - kCGLRPMaxSampleBuffers = 108, - kCGLRPMaxSamples = 109, - kCGLRPSampleModes = 110, - kCGLRPSampleAlpha = 111, - kCGLRPVideoMemory = 120, - kCGLRPTextureMemory = 121, - kCGLRPGPUVertProcCapable = 122, - kCGLRPGPUFragProcCapable = 123, - kCGLRPRendererCount = 128, - kCGLRPOnline = 129, - kCGLRPAcceleratedCompute = 130, - kCGLRPVideoMemoryMegabytes = 131, - kCGLRPTextureMemoryMegabytes = 132, - kCGLRPRobust = 75, - kCGLRPMPSafe = 78, - kCGLRPMultiScreen = 81, - kCGLRPFullScreen = 54; - - /** Enable names for {@link #CGLEnable Enable}, {@link #CGLDisable Disable}, and {@link #CGLIsEnabled IsEnabled}. */ - public static final int - kCGLCESwapRectangle = 201, - kCGLCESwapLimit = 203, - kCGLCERasterization = 221, - kCGLCEStateValidation = 301, - kCGLCESurfaceBackingSize = 305, - kCGLCEDisplayListOptimization = 307, - kCGLCEMPEngine = 313; - - /** Parameter names for {@link #CGLSetParameter SetParameter} and {@link #CGLGetParameter GetParameter}. */ - public static final int - kCGLCPSwapRectangle = 200, - kCGLCPSwapInterval = 222, - kCGLCPDispatchTableSize = 224, - kCGLCPClientStorage = 226, - kCGLCPSurfaceTexture = 228, - kCGLCPSurfaceOrder = 235, - kCGLCPSurfaceOpacity = 236, - kCGLCPSurfaceBackingSize = 304, - kCGLCPSurfaceSurfaceVolatile = 306, - kCGLCPReclaimResources = 308, - kCGLCPCurrentRendererID = 309, - kCGLCPGPUVertexProcessing = 310, - kCGLCPGPUFragmentProcessing = 311, - kCGLCPHasDrawable = 314, - kCGLCPMPSwapsInFlight = 315; - - /** Option names for {@link #CGLSetGlobalOption SetGlobalOption} and {@link #CGLGetGlobalOption GetGlobalOption}. */ - public static final int - kCGLGOFormatCacheSize = 501, - kCGLGOClearFormatCache = 502, - kCGLGORetainRenderers = 503, - kCGLGOResetLibrary = 504, - kCGLGOUseErrorHandler = 505, - kCGLGOUseBuildCache = 506; - - /** OpenGL Implementation Profiles. */ - public static final int - kCGLOGLPVersion_Legacy = 0x1000, - kCGLOGLPVersion_3_2_Core = 0x3200; - - /** CGL error return values. */ - public static final int - kCGLNoError = 0, - kCGLBadAttribute = 10000, - kCGLBadProperty = 10001, - kCGLBadPixelFormat = 10002, - kCGLBadRendererInfo = 10003, - kCGLBadContext = 10004, - kCGLBadDrawable = 10005, - kCGLBadDisplay = 10006, - kCGLBadState = 10007, - kCGLBadValue = 10008, - kCGLBadMatch = 10009, - kCGLBadEnumeration = 10010, - kCGLBadOffScreen = 10011, - kCGLBadFullScreen = 10012, - kCGLBadWindow = 10013, - kCGLBadAddress = 10014, - kCGLBadCodeModule = 10015, - kCGLBadAlloc = 10016, - kCGLBadConnection = 10017; - - /** Buffer modes. */ - public static final int - kCGLMonoscopicBit = 0x1, - kCGLStereoscopicBit = 0x2, - kCGLSingleBufferBit = 0x4, - kCGLDoubleBufferBit = 0x8, - kCGLTripleBufferBit = 0x10; - - /** Depth and stencil buffer depths. */ - public static final int - kCGL0Bit = 0x1, - kCGL1Bit = 0x2, - kCGL2Bit = 0x4, - kCGL3Bit = 0x8, - kCGL4Bit = 0x10, - kCGL5Bit = 0x20, - kCGL6Bit = 0x40, - kCGL8Bit = 0x80, - kCGL10Bit = 0x100, - kCGL12Bit = 0x200, - kCGL16Bit = 0x400, - kCGL24Bit = 0x800, - kCGL32Bit = 0x1000, - kCGL48Bit = 0x2000, - kCGL64Bit = 0x4000, - kCGL96Bit = 0x8000, - kCGL128Bit = 0x10000; - - /** Color and accumulation buffer formats. */ - public static final int - kCGLRGB444Bit = 0x40, - kCGLARGB4444Bit = 0x80, - kCGLRGB444A8Bit = 0x100, - kCGLRGB555Bit = 0x200, - kCGLARGB1555Bit = 0x400, - kCGLRGB555A8Bit = 0x800, - kCGLRGB565Bit = 0x1000, - kCGLRGB565A8Bit = 0x2000, - kCGLRGB888Bit = 0x4000, - kCGLARGB8888Bit = 0x8000, - kCGLRGB888A8Bit = 0x10000, - kCGLRGB101010Bit = 0x20000, - kCGLARGB2101010Bit = 0x40000, - kCGLRGB101010_A8Bit = 0x80000, - kCGLRGB121212Bit = 0x100000, - kCGLARGB12121212Bit = 0x200000, - kCGLRGB161616Bit = 0x400000, - kCGLRGBA16161616Bit = 0x800000, - kCGLRGBFloat64Bit = 0x1000000, - kCGLRGBAFloat64Bit = 0x2000000, - kCGLRGBFloat128Bit = 0x4000000, - kCGLRGBAFloat128Bit = 0x8000000, - kCGLRGBFloat256Bit = 0x10000000, - kCGLRGBAFloat256Bit = 0x20000000; - - /** Sampling modes. */ - public static final int - kCGLSupersampleBit = 0x1, - kCGLMultisampleBit = 0x2; - - protected CGL() { - throw new UnsupportedOperationException(); - } - - // --- [ CGLGetCurrentContext ] --- - - /** Returns the current rendering context. If there is none, returns {@code NULL}. */ - @NativeType("CGLContextObj") - public static long CGLGetCurrentContext() { - long __functionAddress = Functions.GetCurrentContext; - return callP(__functionAddress); - } - - // --- [ CGLSetCurrentContext ] --- - - /** - * Sets the specified rendering context as the current rendering context. - * - *

    There can be only one current rendering context. Subsequent OpenGL rendering calls operate on the current rendering context to modify the drawable - * object associated with it.

    - * - *

    You can use AGL macros to bypass the current rendering context mechanism and maintain your own current rendering context.

    - * - *

    A context is current on a per-thread basis. Multiple threads must serialize calls into the same context.

    - * - * @param context the rendering context to set as the current rendering context. Pass {@code NULL} to release the current rendering context without assigning a new one. - */ - @NativeType("CGLError") - public static int CGLSetCurrentContext(@NativeType("CGLContextObj") long context) { - long __functionAddress = Functions.SetCurrentContext; - return callPI(context, __functionAddress); - } - - // --- [ CGLGetShareGroup ] --- - - /** - * Returns the sharegroup of the specified rendering context. - * - * @param ctx a rendering context - */ - @NativeType("CGLShareGroupObj") - public static long CGLGetShareGroup(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.GetShareGroup; - if (CHECKS) { - check(ctx); - } - return callPP(ctx, __functionAddress); - } - - // --- [ CGLChoosePixelFormat ] --- - - /** Unsafe version of: {@link #CGLChoosePixelFormat ChoosePixelFormat} */ - public static int nCGLChoosePixelFormat(long attribs, long pix, long npix) { - long __functionAddress = Functions.ChoosePixelFormat; - return callPPPI(attribs, pix, npix, __functionAddress); - } - - /** - * Creates a pixel format object that satisfies the constraints of the specified buffer and renderer attributes. - * - * @param attribs a 0 terminated array that contains a list of buffer and renderer attributes. Attributes can be Boolean or integer. If an attribute is integer, you - * must supply the desired value immediately following the attribute. If the attribute is Boolean, do not supply a value because its presence in the - * attributes array implies a true value. One of:
    {@link #kCGLPFAAllRenderers PFAAllRenderers}{@link #kCGLPFATripleBuffer PFATripleBuffer}{@link #kCGLPFADoubleBuffer PFADoubleBuffer}{@link #kCGLPFAStereo PFAStereo}{@link #kCGLPFAColorSize PFAColorSize}
    {@link #kCGLPFAAlphaSize PFAAlphaSize}{@link #kCGLPFADepthSize PFADepthSize}{@link #kCGLPFAStencilSize PFAStencilSize}{@link #kCGLPFAMinimumPolicy PFAMinimumPolicy}{@link #kCGLPFAMaximumPolicy PFAMaximumPolicy}
    {@link #kCGLPFASampleBuffers PFASampleBuffers}{@link #kCGLPFASamples PFASamples}{@link #kCGLPFAColorFloat PFAColorFloat}{@link #kCGLPFAMultisample PFAMultisample}{@link #kCGLPFASupersample PFASupersample}
    {@link #kCGLPFASampleAlpha PFASampleAlpha}{@link #kCGLPFARendererID PFARendererID}{@link #kCGLPFASingleRenderer PFASingleRenderer}{@link #kCGLPFANoRecovery PFANoRecovery}{@link #kCGLPFAAccelerated PFAAccelerated}
    {@link #kCGLPFAClosestPolicy PFAClosestPolicy}{@link #kCGLPFABackingStore PFABackingStore}{@link #kCGLPFABackingVolatile PFABackingVolatile}{@link #kCGLPFADisplayMask PFADisplayMask}{@link #kCGLPFAAllowOfflineRenderers PFAAllowOfflineRenderers}
    {@link #kCGLPFAAcceleratedCompute PFAAcceleratedCompute}{@link #kCGLPFAOpenGLProfile PFAOpenGLProfile}{@link #kCGLPFASupportsAutomaticGraphicsSwitching PFASupportsAutomaticGraphicsSwitching}{@link #kCGLPFAVirtualScreenCount PFAVirtualScreenCount}{@link #kCGLPFAAuxBuffers PFAAuxBuffers}
    {@link #kCGLPFAAccumSize PFAAccumSize}{@link #kCGLPFAOffScreen PFAOffScreen}{@link #kCGLPFAAuxDepthStencil PFAAuxDepthStencil}{@link #kCGLPFAWindow PFAWindow}{@link #kCGLPFACompliant PFACompliant}
    {@link #kCGLPFAPBuffer PFAPBuffer}{@link #kCGLPFARemotePBuffer PFARemotePBuffer}{@link #kCGLPFARobust PFARobust}{@link #kCGLPFAMPSafe PFAMPSafe}{@link #kCGLPFAMultiScreen PFAMultiScreen}
    {@link #kCGLPFAFullScreen PFAFullScreen}
    - * @param pix the memory address of a pixel format object. On return, points to a new pixel format object that contains pixel format information and a list of - * virtual screens. If there are no pixel formats or virtual screens that satisfy the constraints of the buffer and renderer attributes, the value of - * pix is set to {@code NULL}. - * @param npix on return, points to the number of virtual screens referenced by pix. If pix is {@code NULL}, the value of {@code npix} is set to 0. - */ - @NativeType("CGLError") - public static int CGLChoosePixelFormat(@NativeType("CGLPixelFormatAttribute const *") IntBuffer attribs, @NativeType("CGLPixelFormatObj *") PointerBuffer pix, @NativeType("GLint *") IntBuffer npix) { - if (CHECKS) { - checkNT(attribs); - check(pix, 1); - check(npix, 1); - } - return nCGLChoosePixelFormat(memAddress(attribs), memAddress(pix), memAddress(npix)); - } - - // --- [ CGLDestroyPixelFormat ] --- - - /** - * Frees the memory associated with a pixel format object. Calling this function is equivalent to calling {@link #CGLReleasePixelFormat ReleasePixelFormat}. - * - * @param pix the pixel format object to destroy - */ - @NativeType("CGLError") - public static int CGLDestroyPixelFormat(@NativeType("CGLPixelFormatObj") long pix) { - long __functionAddress = Functions.DestroyPixelFormat; - if (CHECKS) { - check(pix); - } - return callPI(pix, __functionAddress); - } - - // --- [ CGLDescribePixelFormat ] --- - - /** Unsafe version of: {@link #CGLDescribePixelFormat DescribePixelFormat} */ - public static int nCGLDescribePixelFormat(long pix, int pix_num, int attrib, long value) { - long __functionAddress = Functions.DescribePixelFormat; - if (CHECKS) { - check(pix); - } - return callPPI(pix, pix_num, attrib, value, __functionAddress); - } - - /** - * Retrieves the values of an attribute associated with a pixel format object. - * - * @param pix the pixel format object to query - * @param pix_num the virtual screen number whose attribute value you want to retrieve. This value must be between 0 and the number of virtual screens minus one. - * @param attrib the attribute whose value you want to obtain. One of:
    {@link #kCGLPFAAllRenderers PFAAllRenderers}{@link #kCGLPFATripleBuffer PFATripleBuffer}{@link #kCGLPFADoubleBuffer PFADoubleBuffer}{@link #kCGLPFAStereo PFAStereo}{@link #kCGLPFAColorSize PFAColorSize}
    {@link #kCGLPFAAlphaSize PFAAlphaSize}{@link #kCGLPFADepthSize PFADepthSize}{@link #kCGLPFAStencilSize PFAStencilSize}{@link #kCGLPFAMinimumPolicy PFAMinimumPolicy}{@link #kCGLPFAMaximumPolicy PFAMaximumPolicy}
    {@link #kCGLPFASampleBuffers PFASampleBuffers}{@link #kCGLPFASamples PFASamples}{@link #kCGLPFAColorFloat PFAColorFloat}{@link #kCGLPFAMultisample PFAMultisample}{@link #kCGLPFASupersample PFASupersample}
    {@link #kCGLPFASampleAlpha PFASampleAlpha}{@link #kCGLPFARendererID PFARendererID}{@link #kCGLPFASingleRenderer PFASingleRenderer}{@link #kCGLPFANoRecovery PFANoRecovery}{@link #kCGLPFAAccelerated PFAAccelerated}
    {@link #kCGLPFAClosestPolicy PFAClosestPolicy}{@link #kCGLPFABackingStore PFABackingStore}{@link #kCGLPFABackingVolatile PFABackingVolatile}{@link #kCGLPFADisplayMask PFADisplayMask}{@link #kCGLPFAAllowOfflineRenderers PFAAllowOfflineRenderers}
    {@link #kCGLPFAAcceleratedCompute PFAAcceleratedCompute}{@link #kCGLPFAOpenGLProfile PFAOpenGLProfile}{@link #kCGLPFASupportsAutomaticGraphicsSwitching PFASupportsAutomaticGraphicsSwitching}{@link #kCGLPFAVirtualScreenCount PFAVirtualScreenCount}{@link #kCGLPFAAuxBuffers PFAAuxBuffers}
    {@link #kCGLPFAAccumSize PFAAccumSize}{@link #kCGLPFAOffScreen PFAOffScreen}{@link #kCGLPFAAuxDepthStencil PFAAuxDepthStencil}{@link #kCGLPFAWindow PFAWindow}{@link #kCGLPFACompliant PFACompliant}
    {@link #kCGLPFAPBuffer PFAPBuffer}{@link #kCGLPFARemotePBuffer PFARemotePBuffer}{@link #kCGLPFARobust PFARobust}{@link #kCGLPFAMPSafe PFAMPSafe}{@link #kCGLPFAMultiScreen PFAMultiScreen}
    {@link #kCGLPFAFullScreen PFAFullScreen}
    - * @param value on return, points to the value of the attribute - */ - @NativeType("CGLError") - public static int CGLDescribePixelFormat(@NativeType("CGLPixelFormatObj") long pix, @NativeType("GLint") int pix_num, @NativeType("CGLPixelFormatAttribute") int attrib, @NativeType("GLint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nCGLDescribePixelFormat(pix, pix_num, attrib, memAddress(value)); - } - - // --- [ CGLReleasePixelFormat ] --- - - /** - * Decrements the reference count of a pixel format object. - * - *

    The system retains the pixel format object when you call the function {@link #CGLCreateContext CreateContext}, so you can release a pixel format object immediately - * after passing it to the context creation function.

    - * - *

    Each call to CGLReleasePixelFormat decreases the reference count by 1. If the reference count reaches 0, the pixel format object is destroyed.

    - * - * @param pix the pixel format object whose reference count should be decremented - */ - public static void CGLReleasePixelFormat(@NativeType("CGLPixelFormatObj") long pix) { - long __functionAddress = Functions.ReleasePixelFormat; - if (CHECKS) { - check(pix); - } - callPV(pix, __functionAddress); - } - - // --- [ CGLRetainPixelFormat ] --- - - /** - * Increments the receiver's reference count. - * - *

    Each call to CGLRetainPixelFormat increases the reference count by 1. Each call to CGLRetainPixelFormat must be matched with a call to - * {@link #CGLReleasePixelFormat ReleasePixelFormat}.

    - * - * @param pix the pixel format object whose reference count should be incremented - */ - @NativeType("CGLPixelFormatObj") - public static long CGLRetainPixelFormat(@NativeType("CGLPixelFormatObj") long pix) { - long __functionAddress = Functions.RetainPixelFormat; - if (CHECKS) { - check(pix); - } - return callPP(pix, __functionAddress); - } - - // --- [ CGLGetPixelFormatRetainCount ] --- - - /** - * Returns the retain count of a pixel format object. - * - * @param pix a pixel format object - */ - @NativeType("GLuint") - public static int CGLGetPixelFormatRetainCount(@NativeType("CGLPixelFormatObj") long pix) { - long __functionAddress = Functions.GetPixelFormatRetainCount; - if (CHECKS) { - check(pix); - } - return callPI(pix, __functionAddress); - } - - // --- [ CGLQueryRendererInfo ] --- - - /** Unsafe version of: {@link #CGLQueryRendererInfo QueryRendererInfo} */ - public static int nCGLQueryRendererInfo(int display_mask, long rend, long nrend) { - long __functionAddress = Functions.QueryRendererInfo; - return callPPI(display_mask, rend, nrend, __functionAddress); - } - - /** - * Creates a renderer information object that contains properties and values for renderers able to drive all the specified displays in a given display - * mask. - * - * @param display_mask a bit field that contains the bitwise OR of OpenGL display masks returned by the CGDisplayIDToOpenGLDisplayMask function. If you want to obtain - * information for all renderers in the system you must call CGLQueryRendererInfo once for each display bit. - * @param rend the memory address of a renderer information object. On return, points to a renderer information object that describes all renderers that are able - * to drive the displays specified by the {@code display_mask} parameter. If {@code display_mask} does not specify any displays, the value of - * {@code rend} is set to {@code NULL}. You must call {@link #CGLDestroyRendererInfo DestroyRendererInfo} when you no longer need this object. - * @param nrend on return, points to the number of renderers described in the renderer information object. If {@code display_mask} does not specify any displays, - * the value of {@code nrend} is set to 0. - */ - @NativeType("CGLError") - public static int CGLQueryRendererInfo(@NativeType("GLuint") int display_mask, @NativeType("CGLRendererInfoObj *") PointerBuffer rend, @NativeType("GLint *") IntBuffer nrend) { - if (CHECKS) { - check(rend, 1); - check(nrend, 1); - } - return nCGLQueryRendererInfo(display_mask, memAddress(rend), memAddress(nrend)); - } - - // --- [ CGLDestroyRendererInfo ] --- - - /** - * Frees resources associated with a renderer information object. - * - * @param rend the renderer information object to destroy - */ - @NativeType("CGLError") - public static int CGLDestroyRendererInfo(@NativeType("CGLRendererInfoObj") long rend) { - long __functionAddress = Functions.DestroyRendererInfo; - if (CHECKS) { - check(rend); - } - return callPI(rend, __functionAddress); - } - - // --- [ CGLDescribeRenderer ] --- - - /** Unsafe version of: {@link #CGLDescribeRenderer DescribeRenderer} */ - public static int nCGLDescribeRenderer(long rend, int rend_num, int prop, long value) { - long __functionAddress = Functions.DescribeRenderer; - if (CHECKS) { - check(rend); - } - return callPPI(rend, rend_num, prop, value, __functionAddress); - } - - /** - * Obtains the value associated with a renderer property. - * - * @param rend an opaque renderer information object that contains a description of the renderer capabilities you want to inspect. You can obtain a renderer - * information object by calling the function {@link #CGLQueryRendererInfo QueryRendererInfo}. You must call {@link #CGLDestroyRendererInfo DestroyRendererInfo} when you no longer need this - * object. - * @param rend_num the index of the renderer inside the renderer information object — a value between 0 and the number of renderers minus one. The number of renderers - * can be obtained by calling {@link #CGLDescribeRenderer DescribeRenderer}, passing in {@code rend}, renderer number 0, and the renderer property - * {@link #kCGLRPRendererCount RPRendererCount}. - * @param prop the renderer property whose value you want to obtain. One of:
    {@link #kCGLRPOffScreen RPOffScreen}{@link #kCGLRPRendererID RPRendererID}{@link #kCGLRPAccelerated RPAccelerated}{@link #kCGLRPBackingStore RPBackingStore}{@link #kCGLRPWindow RPWindow}
    {@link #kCGLRPCompliant RPCompliant}{@link #kCGLRPDisplayMask RPDisplayMask}{@link #kCGLRPBufferModes RPBufferModes}{@link #kCGLRPColorModes RPColorModes}{@link #kCGLRPAccumModes RPAccumModes}
    {@link #kCGLRPDepthModes RPDepthModes}{@link #kCGLRPStencilModes RPStencilModes}{@link #kCGLRPMaxAuxBuffers RPMaxAuxBuffers}{@link #kCGLRPMaxSampleBuffers RPMaxSampleBuffers}{@link #kCGLRPMaxSamples RPMaxSamples}
    {@link #kCGLRPSampleModes RPSampleModes}{@link #kCGLRPSampleAlpha RPSampleAlpha}{@link #kCGLRPVideoMemory RPVideoMemory}{@link #kCGLRPTextureMemory RPTextureMemory}{@link #kCGLRPGPUVertProcCapable RPGPUVertProcCapable}
    {@link #kCGLRPGPUFragProcCapable RPGPUFragProcCapable}{@link #kCGLRPRendererCount RPRendererCount}{@link #kCGLRPOnline RPOnline}{@link #kCGLRPAcceleratedCompute RPAcceleratedCompute}{@link #kCGLRPVideoMemoryMegabytes RPVideoMemoryMegabytes}
    {@link #kCGLRPTextureMemoryMegabytes RPTextureMemoryMegabytes}{@link #kCGLRPRobust RPRobust}{@link #kCGLRPMPSafe RPMPSafe}{@link #kCGLRPMultiScreen RPMultiScreen}{@link #kCGLRPFullScreen RPFullScreen}
    - * @param value on return, points to the value of the requested property - */ - @NativeType("CGLError") - public static int CGLDescribeRenderer(@NativeType("CGLRendererInfoObj") long rend, @NativeType("GLint") int rend_num, @NativeType("CGLRendererProperty") int prop, @NativeType("GLint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nCGLDescribeRenderer(rend, rend_num, prop, memAddress(value)); - } - - // --- [ CGLCreateContext ] --- - - /** Unsafe version of: {@link #CGLCreateContext CreateContext} */ - public static int nCGLCreateContext(long pix, long share, long ctx) { - long __functionAddress = Functions.CreateContext; - if (CHECKS) { - check(pix); - } - return callPPPI(pix, share, ctx, __functionAddress); - } - - /** - * Creates a CGL rendering context. - * - * @param pix a pixel format object created by calling the function {@link #CGLChoosePixelFormat ChoosePixelFormat} - * @param share the rendering context with which to share the OpenGL object state — including texture objects, programs and shader display lists, vertex array - * objects, vertex buffer objects, pixel buffer objects, and frame buffer objects — and the object state associated which each of these object types. - * Pass {@code NULL} to indicate that no sharing is to take place. - * @param ctx the memory address of a context object. On return, points to a new context object with the buffers and attributes specified by the {@code pix} - * parameter. If the context can not be created as specified, the value of {@code ctx} is set to {@code NULL}. - */ - @NativeType("CGLError") - public static int CGLCreateContext(@NativeType("CGLPixelFormatObj") long pix, @NativeType("CGLContextObj") long share, @NativeType("CGLContextObj *") PointerBuffer ctx) { - if (CHECKS) { - check(ctx, 1); - } - return nCGLCreateContext(pix, share, memAddress(ctx)); - } - - // --- [ CGLDestroyContext ] --- - - /** - * Frees the resources associated with a rendering context. - * - *

    Starting in Mac OS 10.5, CGL rendering contexts are reference counted. For compatibility reasons, calling CGLDestroyContext clears the drawable - * associated with the rendering context. Calling CGLDestroyContext is the equivalent of calling both {@link #CGLClearDrawable ClearDrawable} and - * {@link #CGLReleaseContext ReleaseContext}.

    - * - * @param ctx the rendering context to destroy - */ - @NativeType("CGLError") - public static int CGLDestroyContext(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.DestroyContext; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, __functionAddress); - } - - // --- [ CGLCopyContext ] --- - - /** - * Copies the specified state variables from one rendering context to another. - * - * @param src the source rendering context - * @param dst the destination rendering context - * @param mask a mask that specifies the state variables to copy. Pass a bit field that contains the bitwise OR of the state variable names that you want to copy. - * Use the symbolic mask constants that are passed to the OpenGL function {@link GL11#glPushAttrib PushAttrib}. To copy as many state variables - * as possible, supply the constant {@link GL11#GL_ALL_ATTRIB_BITS ALL_ATTRIB_BITS}. - */ - @NativeType("CGLError") - public static int CGLCopyContext(@NativeType("CGLContextObj") long src, @NativeType("CGLContextObj") long dst, @NativeType("GLbitfield") int mask) { - long __functionAddress = Functions.CopyContext; - if (CHECKS) { - check(src); - check(dst); - } - return callPPI(src, dst, mask, __functionAddress); - } - - // --- [ CGLRetainContext ] --- - - /** - * Increments the retain count on a CGL rendering context. - * - *

    Each call to CGLRetainContext increases the retain count by 1. To prevent memory leaks, each retain call must be balanced with a call to - * {@link #CGLReleaseContext ReleaseContext}.

    - * - * @param ctx the rendering context to be retained - * - * @return the same context that was passed into the function. - */ - @NativeType("CGLContextObj") - public static long CGLRetainContext(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.RetainContext; - if (CHECKS) { - check(ctx); - } - return callPP(ctx, __functionAddress); - } - - // --- [ CGLReleaseContext ] --- - - /** - * Decrements the retain count on a CGL rendering context. - * - *

    Each call to CGLReleaseContext decreases the retain count by 1.

    - * - *

    When the retain count reaches 0, all resources associated with the rendering context are freed. If the rendering context that you pass is the current - * rendering context and it is freed, the current context is set to {@code NULL} and there is no current rendering context after the function executes. After the - * context is freed, you must make sure you do not use the destroyed rendering context. This includes using CGL macros in which the rendering context is - * explicitly passed to OpenGL.

    - * - * @param ctx the rendering context to be released - */ - public static void CGLReleaseContext(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.ReleaseContext; - if (CHECKS) { - check(ctx); - } - callPV(ctx, __functionAddress); - } - - // --- [ CGLGetContextRetainCount ] --- - - /** - * Returns the current retain count of a CGL rendering context. - * - * @param ctx the CGL rendering context whose retain count you wish to discover - */ - @NativeType("GLuint") - public static int CGLGetContextRetainCount(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.GetContextRetainCount; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, __functionAddress); - } - - // --- [ CGLGetPixelFormat ] --- - - /** - * Retrieves the current pixel format associated with a CGL rendering context. - * - *

    The pixel format object is not retained before being returned to your application. If your application needs to maintain this object, it should call - * {@link #CGLRetainPixelFormat RetainPixelFormat}.

    - * - * @param ctx the CGL rendering context whose format you want to receive - */ - @NativeType("CGLPixelFormatObj") - public static long CGLGetPixelFormat(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.GetPixelFormat; - if (CHECKS) { - check(ctx); - } - return callPP(ctx, __functionAddress); - } - - // --- [ CGLCreatePBuffer ] --- - - /** Unsafe version of: {@link #CGLCreatePBuffer CreatePBuffer} */ - public static int nCGLCreatePBuffer(int width, int height, int target, int internalFormat, int max_level, long pbuffer) { - long __functionAddress = Functions.CreatePBuffer; - return callPI(width, height, target, internalFormat, max_level, pbuffer, __functionAddress); - } - - /** - * Creates a pixel buffer of the specified size, compatible with the specified texture target. - * - *

    This function does not have any knowledge of OpenGL contexts or pixel format objects and does not specifically allocate the storage needed for the - * actual pixel buffer. These operations occur when you call the function {@link #CGLSetPBuffer SetPBuffer}.

    - * - *

    You can determine the dimensional limits of a pixel buffer by calling the OpenGL function glGetInteger. You can find the maximum size supported by - * querying GL_MAX_VIEWPORT_DIMS and the minimum size by querying GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE, which returns two integer values (similar to - * GL_MAX_VIEWPORT_DIMS). All pixel buffer dimensions that you request with the function aglCreatePBuffer should fall within these limits (inclusively) - * and should comply with any limitations imposed by the texture target you select.

    - * - *

    The maximum viewport size supported in OS X is quite large. You should take into consideration the amount of video or system memory required to support - * the requested pixel buffer size, including additional memory needed for multiple buffers and options such as multisampling.

    - * - *

    Starting in OS X v10.5, pixel buffer objects are reference counted. Pixel buffer objects are created with a reference count of 1 and are destroyed when - * the last reference to the object is released.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param width the width, in pixels, of the pixel buffer - * @param height the height, in pixels, of the pixel buffer - * @param target a constant that specifies the type of the pixel buffer target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}
    - * @param internalFormat a constant that specifies the internal color format of the pixel buffer. The format controls whether the alpha channel of the pixel buffer is used - * for texturing operations. One of:
    {@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA}
    - * @param max_level the maximum level of mipmap detail allowable. Pass 0 for a pixel buffer that is not using mipmaps. The value passed should never exceed the actual - * maximum number of mipmap levels that can be represented with the given width and height. - * @param pbuffer on return, points to a new pixel buffer object - */ - @NativeType("CGLError") - public static int CGLCreatePBuffer(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int target, @NativeType("GLenum") int internalFormat, @NativeType("GLint") int max_level, @NativeType("CGLPBufferObj *") PointerBuffer pbuffer) { - if (CHECKS) { - check(pbuffer, 1); - } - return nCGLCreatePBuffer(width, height, target, internalFormat, max_level, memAddress(pbuffer)); - } - - // --- [ CGLDestroyPBuffer ] --- - - /** - * Releases the resources associated with a pixel buffer object. - * - *

    Starting in OS X v10.5, pixel buffer objects are reference counted. Calling this function is equivalent to calling {@link #CGLReleasePBuffer ReleasePBuffer}.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param pbuffer the pixel buffer object whose resources you want to release - */ - @NativeType("CGLError") - public static int CGLDestroyPBuffer(@NativeType("CGLPBufferObj") long pbuffer) { - long __functionAddress = Functions.DestroyPBuffer; - if (CHECKS) { - check(pbuffer); - } - return callPI(pbuffer, __functionAddress); - } - - // --- [ CGLDescribePBuffer ] --- - - /** Unsafe version of: {@link #CGLDescribePBuffer DescribePBuffer} */ - public static int nCGLDescribePBuffer(long obj, long width, long height, long target, long internalFormat, long mipmap) { - long __functionAddress = Functions.DescribePBuffer; - if (CHECKS) { - check(obj); - } - return callPPPPPPI(obj, width, height, target, internalFormat, mipmap, __functionAddress); - } - - /** - * Retrieves information that describes the specified pixel buffer object. - * - *

    The width, height, texture target, and internal texture color format of a pixel buffer object are set at its creation and cannot be changed without - * destroying and recreating the object. The level is set when the pixel buffer object is attached to a rendering context by calling the function - * {@link #CGLSetPBuffer SetPBuffer}.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param obj a pointer to the pixel buffer object - * @param width on return, points to the width, in pixels, of the pixel buffer - * @param height on return, points to the height, in pixels, of the pixel buffer - * @param target on return, points to a constant that specifies the pixel buffer texture target - * @param internalFormat on return, points to a constant that specifies the internal color format of the pixel buffer - * @param mipmap on return, points to the mipmap level of the pixel buffer or 0 if it doesn't use mipmaps - */ - @NativeType("CGLError") - public static int CGLDescribePBuffer(@NativeType("CGLPBufferObj") long obj, @NativeType("GLsizei *") IntBuffer width, @NativeType("GLsizei *") IntBuffer height, @NativeType("GLenum *") IntBuffer target, @NativeType("GLenum *") IntBuffer internalFormat, @NativeType("GLint *") IntBuffer mipmap) { - if (CHECKS) { - check(width, 1); - check(height, 1); - check(target, 1); - check(internalFormat, 1); - check(mipmap, 1); - } - return nCGLDescribePBuffer(obj, memAddress(width), memAddress(height), memAddress(target), memAddress(internalFormat), memAddress(mipmap)); - } - - // --- [ CGLTexImagePBuffer ] --- - - /** - * Binds the contents of a pixel buffer to a data source for a texture object. - * - *

    You must generate and bind a texture name (using standard OpenGL texturing calls) that is compatible with the pixel buffer texture target. Don't supply - * a texture object that was used previously for nonpixel buffer texturing operations unless you first call glDeleteTextures to regenerate the texture - * name.

    - * - *

    If you modify the content of a pixel buffer that uses mipmap levels, you must call this function again before drawing with the pixel buffer, to ensure - * that the content is synchronized with OpenGL. For pixel buffers without mipmaps, simply rebind to the texture object to synchronize content.

    - * - *

    No OpenGL texturing calls that modify a pixel buffer texture content are permitted (such as glTexSubImage2D or glCopyTexImage2D) with the pixel buffer - * texture as the destination. It is permitted to use texturing commands to read data from a pixel buffer texture, such as glCopyTexImage2D, with the - * pixel buffer texture as the source. It is also legal to use OpenGL functions such as glReadPixels to read the contents of a pixel buffer directly - * through the pixel buffer context.

    - * - *

    Note that texturing with the CGLTexImagePBuffer function can fail to produce the intended results without error in the same way other OpenGL texturing - * commands can normally fail. The function fails if you set an incompatible filter mode, do not enable the proper texture target, or other conditions - * described in the OpenGL specification.

    - * - *

    You don't need to share a context to use a pixel buffer object as a texture source. You can use independent pixel format objects and OpenGL contexts - * for both the pixel buffer and the target drawable object without sharing resources, and still texture using a pixel buffer in the target context.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param ctx a rendering context, which is the target context for the texture operation. This is the context that you plan to render content to. This is not the - * context attached to the pixel buffer. - * @param pbuffer a pixel buffer object - * @param source the source buffer to get the texture from, which should be a valid OpenGL buffer such as GL_FRONT or GL_BACK and should be compatible with the - * buffer and renderer attributes that you used to create the rendering context attached to the pixel buffer. This means that the pixel buffer must - * possess the buffer in question for the texturing operation to succeed. - */ - @NativeType("CGLError") - public static int CGLTexImagePBuffer(@NativeType("CGLContextObj") long ctx, @NativeType("CGLPBufferObj") long pbuffer, @NativeType("GLenum") int source) { - long __functionAddress = Functions.TexImagePBuffer; - if (CHECKS) { - check(ctx); - check(pbuffer); - } - return callPPI(ctx, pbuffer, source, __functionAddress); - } - - // --- [ CGLRetainPBuffer ] --- - - /** - * Increments the retain count on a pixel buffer object. - * - *

    Each call to CGLRetainPBuffer increases the retain count by 1. To prevent the pixel buffer object from being leaked, each retain call must be matched - * with a call to {@link #CGLReleasePBuffer ReleasePBuffer}.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param pbuffer the pixel buffer object whose retain count you wish to increment - */ - @NativeType("CGLPBufferObj") - public static long CGLRetainPBuffer(@NativeType("CGLPBufferObj") long pbuffer) { - long __functionAddress = Functions.RetainPBuffer; - if (CHECKS) { - check(pbuffer); - } - return callPP(pbuffer, __functionAddress); - } - - // --- [ CGLReleasePBuffer ] --- - - /** - * Releases the resources associated with a pixel buffer object. - * - *

    Starting in OS X v10.5, pixel buffer objects are reference counted. Calling this function is equivalent to calling CGLReleasePBuffer.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param pbuffer the pixel buffer object whose resources you want to release - */ - public static void CGLReleasePBuffer(@NativeType("CGLPBufferObj") long pbuffer) { - long __functionAddress = Functions.ReleasePBuffer; - if (CHECKS) { - check(pbuffer); - } - callPV(pbuffer, __functionAddress); - } - - // --- [ CGLGetPBufferRetainCount ] --- - - /** - * Returns the retain count of a pixel buffer object. - * - *

    Deprecated in OS X v10.7.

    - * - * @param pbuffer the pixel buffer object whose retain count you wish to retrieve - */ - @NativeType("GLuint") - public static int CGLGetPBufferRetainCount(@NativeType("CGLPBufferObj") long pbuffer) { - long __functionAddress = Functions.GetPBufferRetainCount; - if (CHECKS) { - check(pbuffer); - } - return callPI(pbuffer, __functionAddress); - } - - // --- [ CGLSetOffScreen ] --- - - /** Unsafe version of: {@link #CGLSetOffScreen SetOffScreen} */ - public static int nCGLSetOffScreen(long ctx, int width, int height, int rowbytes, long baseaddr) { - long __functionAddress = Functions.SetOffScreen; - if (CHECKS) { - check(ctx); - } - return callPPI(ctx, width, height, rowbytes, baseaddr, __functionAddress); - } - - /** - * Attaches a rendering context to an offscreen buffer. - * - *

    Before calling this function, you must set up the rendering context using a pixel format object created with the kCGLPFAOffScreen attribute. For more - * information about kCGLPFAOffScreen, see Buffer and Renderer Attributes.

    - * - *

    After calling this function, subsequent OpenGL drawing is rendered into the offscreen buffer and the viewport of the rendering context is set to the - * full size of the offscreen area.

    - * - *

    To exit offscreen mode, call {@link #CGLClearDrawable ClearDrawable}.

    - * - *

    To obtain functionality similar to offscreen mode on renderers that do not support it, attach the context to a hidden window and use the OpenGL - * function glReadPixels.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param ctx a rendering context - * @param width the width, in pixels, of the offscreen buffer - * @param height the height, in pixels, of the offscreen buffer - * @param rowbytes the number of bytes per row of the offscreen buffer, which must be greater than or equal to width times bytes per pixel - * @param baseaddr a pointer to a block of memory to use as the offscreen buffer. The size of the memory must be at least {@code rowbytes*height} bytes. - */ - @NativeType("CGLError") - public static int CGLSetOffScreen(@NativeType("CGLContextObj") long ctx, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int rowbytes, @NativeType("void *") ByteBuffer baseaddr) { - if (CHECKS) { - check(baseaddr, rowbytes * height); - } - return nCGLSetOffScreen(ctx, width, height, rowbytes, memAddress(baseaddr)); - } - - // --- [ CGLGetOffScreen ] --- - - /** Unsafe version of: {@link #CGLGetOffScreen GetOffScreen} */ - public static int nCGLGetOffScreen(long ctx, long width, long height, long rowbytes, long baseaddr) { - long __functionAddress = Functions.GetOffScreen; - if (CHECKS) { - check(ctx); - } - return callPPPPPI(ctx, width, height, rowbytes, baseaddr, __functionAddress); - } - - /** - * Retrieves an offscreen buffer and its parameters for a specified rendering context. - * - *

    Deprecated in OS X v10.7.

    - * - * @param ctx a rendering context - * @param width on return, points to the width, in pixels, of the offscreen buffer. If the rendering context is not attached to an offscreen drawable object, the - * value of width is set to 0. - * @param height on return, points to the height, in pixels, of the offscreen buffer. If the rendering context is not attached to an offscreen drawable object, the - * value of height is set to 0. - * @param rowbytes on return, points to the number of bytes per row of the offscreen buffer. If the context is not attached to an offscreen drawable object, the value - * of rowbytes is set to 0. - * @param baseaddr on return, points to the base address of the offscreen buffer. If the context is not attached to an offscreen drawable object, the value of - * {@code baseaddr} is set to {@code NULL}. - */ - @NativeType("CGLError") - public static int CGLGetOffScreen(@NativeType("CGLContextObj") long ctx, @NativeType("GLsizei *") IntBuffer width, @NativeType("GLsizei *") IntBuffer height, @NativeType("GLint *") IntBuffer rowbytes, @NativeType("void **") PointerBuffer baseaddr) { - if (CHECKS) { - check(width, 1); - check(height, 1); - check(rowbytes, 1); - check(baseaddr, 1); - } - return nCGLGetOffScreen(ctx, memAddress(width), memAddress(height), memAddress(rowbytes), memAddress(baseaddr)); - } - - // --- [ CGLSetFullScreen ] --- - - /** - * Attaches a rendering context to its full-screen drawable object. - * - *

    Before calling this function, you must set up the rendering context using a pixel format object created with the kCGLPFAFullScreen attribute (see - * Buffer and Renderer Attributes). Some OpenGL renderers, such as the software renderer, do not support full-screen mode. After you call the function - * {@link #CGLChoosePixelFormat ChoosePixelFormat} with the full-screen attribute, you need to check whether the pixel format object is created successfully.

    - * - *

    You must capture the display prior to entering full-screen mode and release it after exiting. After calling this function, subsequent OpenGL drawing is - * rendered into the entire screen. For more information, see OpenGL Programming Guide for Mac.

    - * - *

    To exit full-screen mode, call {@link #CGLClearDrawable ClearDrawable}.

    - * - *

    Deprecated in OS X v10.7. Use {@link #CGLSetFullScreenOnDisplay SetFullScreenOnDisplay} instead.

    - * - * @param ctx a rendering context - */ - @NativeType("CGLError") - public static int CGLSetFullScreen(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.SetFullScreen; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, __functionAddress); - } - - // --- [ CGLSetFullScreenOnDisplay ] --- - - /** - * Attaches a rendering context to a full-screen drawable object." + - * - *

    This function obtains a drawable object that covers an entire screen and attaches it to the rendering context. A full-screen rendering context may - * allow the underlying renderer to provide better performance compared to a context associated with a window that partially covers the screen.

    - * - *

    Prior to calling this function, your application should ensure that the context is capable of rendering to this display by querying the appropriate - * renderer properties. For more information, see {@link #CGLQueryRendererInfo QueryRendererInfo}. Note that some renderers, including the software renderer, do not support - * full-screen mode.

    - * - *

    You must capture the screen prior to entering full-screen mode and release it after exiting. After calling this function, subsequent OpenGL drawing is - * rendered into the entire screen. For more information, see OpenGL Programming Guide for Mac.

    - * - *

    To exit full-screen mode, call {@link #CGLClearDrawable ClearDrawable}.

    - * - *

    In OS X v10.6 or later, this function is not deprecated, but is usually not necessary. If your application creates a window that completely covers the - * screen, the system implicitly creates a full-screen instance, for the same potential performance benefit.

    - * - *

    Deprecated in OS X v10.7.

    - * - * @param ctx a rendering context - * @param display_mask a bit field that contains the OpenGL display mask for the screen you wish the context to cover - */ - @NativeType("CGLError") - public static int CGLSetFullScreenOnDisplay(@NativeType("CGLContextObj") long ctx, @NativeType("GLuint") int display_mask) { - long __functionAddress = Functions.SetFullScreenOnDisplay; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, display_mask, __functionAddress); - } - - // --- [ CGLSetPBuffer ] --- - - /** - * Attaches a pixel buffer object to a rendering context. - * - *

    The first time you call this function for a specific pixel buffer object, the system creates the necessary buffers. The buffers are created to support - * the attributes dictated by the pixel format object used to create the rendering context and by the parameters used to create the pixel buffer object. - * The storage requirements for pixel buffer objects, which can be quite large, are very similar to the requirements for windows or views with OpenGL - * contexts attached. All drawable objects compete for the same scarce resources. This function can fail is there is not enough contiguous VRAM for each - * buffer. It's best to code defensively with a scheme that reduces resource consumption without causing the application to resort to failure. Unless, of - * course, failure is the only viable alternative.

    - * - *

    The ability to attach a pixel buffer to a context is supported only on renderers that export GL_APPLE_pixel_buffer in the GL_EXTENSIONS string. Before - * calling this function, you should programmatically determine if it’s possible to attach a pixel buffer to a context by querying GL_EXTENSIONS in the - * context and looking for GL_APPLE_pixel_buffer. If that extension is not present, the renderer won’t allow setting the pixel buffer.

    - * - *

    In order of performance, these are the renderers you should consider using when setting up a rendering context to attach to a pixel buffer:

    - * - *
      - *
    • A hardware renderer.
    • - *
    • The generic render, but only with an offscreen pixel format and glTexSubImage.
    • - *
    • The Apple software renderer, which supports pixel buffers in OS X v10.4.8 and later.
    • - *
    - * - *

    Deprecated in OS X v10.7.

    - * - * @param ctx the rendering context to attach the pixel buffer to - * @param pbuffer a pixel buffer object - * @param face the cube map face to draw if the pixel buffer texture target type is {@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}; otherwise pass 0. - * @param level the mipmap level to draw. This must not exceed the maximum mipmap level set when the pixel buffer object was created. Pass 0 for a texture target - * that does not support mipmaps. - * @param screen a virtual screen value. The virtual screen determines the renderer OpenGL uses to draw to the pixel buffer object. For best performance, for a - * pixel buffer used as a texture source, you should supply the virtual screen value that results in using the same renderer used by the context - * that's the texturing target. - */ - @NativeType("CGLError") - public static int CGLSetPBuffer(@NativeType("CGLContextObj") long ctx, @NativeType("CGLPBufferObj") long pbuffer, @NativeType("GLenum") int face, @NativeType("GLint") int level, @NativeType("GLint") int screen) { - long __functionAddress = Functions.SetPBuffer; - if (CHECKS) { - check(ctx); - check(pbuffer); - } - return callPPI(ctx, pbuffer, face, level, screen, __functionAddress); - } - - // --- [ CGLGetPBuffer ] --- - - /** Unsafe version of: {@link #CGLGetPBuffer GetPBuffer} */ - public static int nCGLGetPBuffer(long ctx, long pbuffer, long face, long level, long screen) { - long __functionAddress = Functions.GetPBuffer; - if (CHECKS) { - check(ctx); - } - return callPPPPPI(ctx, pbuffer, face, level, screen, __functionAddress); - } - - /** - * Retrieves a pixel buffer and its parameters for a specified rendering context. - * - *

    Deprecated in OS X v10.7.

    - * - * @param ctx a rendering context - * @param pbuffer on return, points to the pixel buffer object attached to the rendering context - * @param face on return, points to the cube map face that is set if the pixel buffer texture target type is {@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}; otherwise 0 for all other - * texture target types. - * @param level on return, points to the current mipmap level for drawing - * @param screen on return, points to the current virtual screen number, as set by the last valid call to {@link #CGLSetPBuffer SetPBuffer} - */ - @NativeType("CGLError") - public static int CGLGetPBuffer(@NativeType("CGLContextObj") long ctx, @NativeType("CGLPBufferObj *") PointerBuffer pbuffer, @NativeType("GLenum *") IntBuffer face, @NativeType("GLint *") IntBuffer level, @NativeType("GLint *") IntBuffer screen) { - if (CHECKS) { - check(pbuffer, 1); - check(face, 1); - check(level, 1); - check(screen, 1); - } - return nCGLGetPBuffer(ctx, memAddress(pbuffer), memAddress(face), memAddress(level), memAddress(screen)); - } - - // --- [ CGLClearDrawable ] --- - - /** - * Disassociates a rendering context from any drawable objects attached to it. - * - * @param ctx a rendering context - */ - @NativeType("CGLError") - public static int CGLClearDrawable(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.ClearDrawable; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, __functionAddress); - } - - // --- [ CGLFlushDrawable ] --- - - /** - * Copies the back buffer of a double-buffered context to the front buffer. - * - *

    To create a double-buffered context, specify the {@link #kCGLPFADoubleBuffer PFADoubleBuffer} attribute when you create the pixel format object for the rendering - * context. If the backing store attribute is set to false, the buffers can be exchanged rather than copied. This is often the case in full-screen mode. If - * the receiver is not a double-buffered context, this call does nothing.

    - * - *

    If you set the swap interval attribute ({@link #kCGLCPSwapInterval CPSwapInterval}) appropriately, the copy takes place during the vertical retrace of the display, - * rather than immediately after CGLFlushDrawable is called. An implicit {@link GL11C#glFlush Flush} operation is performed by CGLFlushDrawable - * before it returns. For optimal performance, an application should not call glFlush immediately before calling CGLFlushDrawable. Subsequent OpenGL - * commands can be issued immediately after calling CGLFlushDrawable, but are not executed until the buffer copy is completed.

    - * - * @param ctx the context object - */ - @NativeType("CGLError") - public static int CGLFlushDrawable(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.FlushDrawable; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, __functionAddress); - } - - // --- [ CGLEnable ] --- - - /** - * Enables an option for a rendering context. - * - * @param ctx a rendering context - * @param pname the option to enable. One of:
    {@link #kCGLCESwapRectangle CESwapRectangle}{@link #kCGLCESwapLimit CESwapLimit}{@link #kCGLCERasterization CERasterization}{@link #kCGLCEStateValidation CEStateValidation}{@link #kCGLCESurfaceBackingSize CESurfaceBackingSize}
    {@link #kCGLCEDisplayListOptimization CEDisplayListOptimization}{@link #kCGLCEMPEngine CEMPEngine}
    - */ - @NativeType("CGLError") - public static int CGLEnable(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextEnable") int pname) { - long __functionAddress = Functions.Enable; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, pname, __functionAddress); - } - - // --- [ CGLDisable ] --- - - /** - * Disables an option for a rendering context. - * - * @param ctx a rendering context - * @param pname the option to disable. One of:
    {@link #kCGLCESwapRectangle CESwapRectangle}{@link #kCGLCESwapLimit CESwapLimit}{@link #kCGLCERasterization CERasterization}{@link #kCGLCEStateValidation CEStateValidation}{@link #kCGLCESurfaceBackingSize CESurfaceBackingSize}
    {@link #kCGLCEDisplayListOptimization CEDisplayListOptimization}{@link #kCGLCEMPEngine CEMPEngine}
    - */ - @NativeType("CGLError") - public static int CGLDisable(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextEnable") int pname) { - long __functionAddress = Functions.Disable; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, pname, __functionAddress); - } - - // --- [ CGLIsEnabled ] --- - - /** Unsafe version of: {@link #CGLIsEnabled IsEnabled} */ - public static int nCGLIsEnabled(long ctx, int pname, long enable) { - long __functionAddress = Functions.IsEnabled; - if (CHECKS) { - check(ctx); - } - return callPPI(ctx, pname, enable, __functionAddress); - } - - /** - * Reports whether an option is enabled for a rendering context. - * - * @param ctx a rendering context - * @param pname the option to query. One of:
    {@link #kCGLCESwapRectangle CESwapRectangle}{@link #kCGLCESwapLimit CESwapLimit}{@link #kCGLCERasterization CERasterization}{@link #kCGLCEStateValidation CEStateValidation}{@link #kCGLCESurfaceBackingSize CESurfaceBackingSize}
    {@link #kCGLCEDisplayListOptimization CEDisplayListOptimization}{@link #kCGLCEMPEngine CEMPEngine}
    - * @param enable on return, enable is set to true if the option is enabled - */ - @NativeType("CGLError") - public static int CGLIsEnabled(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextEnable") int pname, @NativeType("GLint *") IntBuffer enable) { - if (CHECKS) { - check(enable, 1); - } - return nCGLIsEnabled(ctx, pname, memAddress(enable)); - } - - // --- [ CGLSetParameter ] --- - - /** Unsafe version of: {@link #CGLSetParameter SetParameter} */ - public static int nCGLSetParameter(long ctx, int pname, long params) { - long __functionAddress = Functions.SetParameter; - if (CHECKS) { - check(ctx); - } - return callPPI(ctx, pname, params, __functionAddress); - } - - /** - * Sets the value of a rendering context parameter. - * - * @param ctx a rendering context - * @param pname the parameter whose value you want to set. One of:
    {@link #kCGLCPSwapRectangle CPSwapRectangle}{@link #kCGLCPSwapInterval CPSwapInterval}{@link #kCGLCPDispatchTableSize CPDispatchTableSize}{@link #kCGLCPClientStorage CPClientStorage}
    {@link #kCGLCPSurfaceTexture CPSurfaceTexture}{@link #kCGLCPSurfaceOrder CPSurfaceOrder}{@link #kCGLCPSurfaceOpacity CPSurfaceOpacity}{@link #kCGLCPSurfaceBackingSize CPSurfaceBackingSize}
    {@link #kCGLCPSurfaceSurfaceVolatile CPSurfaceSurfaceVolatile}{@link #kCGLCPReclaimResources CPReclaimResources}{@link #kCGLCPCurrentRendererID CPCurrentRendererID}{@link #kCGLCPGPUVertexProcessing CPGPUVertexProcessing}
    {@link #kCGLCPGPUFragmentProcessing CPGPUFragmentProcessing}{@link #kCGLCPHasDrawable CPHasDrawable}{@link #kCGLCPMPSwapsInFlight CPMPSwapsInFlight}
    - * @param params a pointer to the value to set the parameter to - */ - @NativeType("CGLError") - public static int CGLSetParameter(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextParameter") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - return nCGLSetParameter(ctx, pname, memAddress(params)); - } - - /** - * Sets the value of a rendering context parameter. - * - * @param ctx a rendering context - * @param pname the parameter whose value you want to set. One of:
    {@link #kCGLCPSwapRectangle CPSwapRectangle}{@link #kCGLCPSwapInterval CPSwapInterval}{@link #kCGLCPDispatchTableSize CPDispatchTableSize}{@link #kCGLCPClientStorage CPClientStorage}
    {@link #kCGLCPSurfaceTexture CPSurfaceTexture}{@link #kCGLCPSurfaceOrder CPSurfaceOrder}{@link #kCGLCPSurfaceOpacity CPSurfaceOpacity}{@link #kCGLCPSurfaceBackingSize CPSurfaceBackingSize}
    {@link #kCGLCPSurfaceSurfaceVolatile CPSurfaceSurfaceVolatile}{@link #kCGLCPReclaimResources CPReclaimResources}{@link #kCGLCPCurrentRendererID CPCurrentRendererID}{@link #kCGLCPGPUVertexProcessing CPGPUVertexProcessing}
    {@link #kCGLCPGPUFragmentProcessing CPGPUFragmentProcessing}{@link #kCGLCPHasDrawable CPHasDrawable}{@link #kCGLCPMPSwapsInFlight CPMPSwapsInFlight}
    - */ - @NativeType("CGLError") - public static int CGLSetParameter(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextParameter") int pname, @NativeType("GLint const *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - return nCGLSetParameter(ctx, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ CGLGetParameter ] --- - - /** Unsafe version of: {@link #CGLGetParameter GetParameter} */ - public static int nCGLGetParameter(long ctx, int pname, long params) { - long __functionAddress = Functions.GetParameter; - if (CHECKS) { - check(ctx); - } - return callPPI(ctx, pname, params, __functionAddress); - } - - /** - * Retrieves the value of a rendering context parameter. - * - * @param ctx a rendering context - * @param pname the parameter whose value you want to retrieve. One of:
    {@link #kCGLCPSwapRectangle CPSwapRectangle}{@link #kCGLCPSwapInterval CPSwapInterval}{@link #kCGLCPDispatchTableSize CPDispatchTableSize}{@link #kCGLCPClientStorage CPClientStorage}
    {@link #kCGLCPSurfaceTexture CPSurfaceTexture}{@link #kCGLCPSurfaceOrder CPSurfaceOrder}{@link #kCGLCPSurfaceOpacity CPSurfaceOpacity}{@link #kCGLCPSurfaceBackingSize CPSurfaceBackingSize}
    {@link #kCGLCPSurfaceSurfaceVolatile CPSurfaceSurfaceVolatile}{@link #kCGLCPReclaimResources CPReclaimResources}{@link #kCGLCPCurrentRendererID CPCurrentRendererID}{@link #kCGLCPGPUVertexProcessing CPGPUVertexProcessing}
    {@link #kCGLCPGPUFragmentProcessing CPGPUFragmentProcessing}{@link #kCGLCPHasDrawable CPHasDrawable}{@link #kCGLCPMPSwapsInFlight CPMPSwapsInFlight}
    - * @param params on return, points to the value of the parameter - */ - @NativeType("CGLError") - public static int CGLGetParameter(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextParameter") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - return nCGLGetParameter(ctx, pname, memAddress(params)); - } - - // --- [ CGLSetVirtualScreen ] --- - - /** - * Forces subsequent OpenGL commands to the specified virtual screen. - * - *

    Setting the virtual screen forces the renderer associated with the virtual screen to process OpenGL commands issued to the specified context. Changing - * the virtual screen changes the current renderer. You should use this function only when it is necessary to override the default behavior. The current - * virtual screen is normally set automatically. Because the current virtual screen determines which OpenGL renderer is processing commands, the return - * values of all glGetXXX functions can be affected by the current virtual screen.

    - * - * @param ctx a rendering context - * @param screen a virtual screen number, which must be a value between 0 and the number of virtual screens minus one. The number of virtual screens available in a - * context can be obtained by calling the function {@link #CGLDescribePixelFormat DescribePixelFormat}, passing in the pixel format object used to create the rendering - * context, 0 for the virtual screen number ({@code pix_num} parameter), and the attribute constant {@link #kCGLPFAVirtualScreenCount PFAVirtualScreenCount}. - */ - @NativeType("CGLError") - public static int CGLSetVirtualScreen(@NativeType("CGLContextObj") long ctx, @NativeType("GLint") int screen) { - long __functionAddress = Functions.SetVirtualScreen; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, screen, __functionAddress); - } - - // --- [ CGLGetVirtualScreen ] --- - - /** Unsafe version of: {@link #CGLGetVirtualScreen GetVirtualScreen} */ - public static int nCGLGetVirtualScreen(long ctx, long screen) { - long __functionAddress = Functions.GetVirtualScreen; - if (CHECKS) { - check(ctx); - } - return callPPI(ctx, screen, __functionAddress); - } - - /** - * Gets the current virtual screen number associated with a rendering context. - * - *

    The current virtual screen can change when a drawable object is moved or resized across graphics device boundaries. A change in the current virtual - * screen can affect the return values of some OpenGL functions and in most cases also means that the renderer has changed.

    - * - * @param ctx a rendering context - * @param screen on return, points to the virtual screen associated with the context. The value is always 0 on a single-display system and –1 if the function fails - * for any reason. - */ - @NativeType("CGLError") - public static int CGLGetVirtualScreen(@NativeType("CGLContextObj") long ctx, @NativeType("GLint *") IntBuffer screen) { - if (CHECKS) { - check(screen, 1); - } - return nCGLGetVirtualScreen(ctx, memAddress(screen)); - } - - // --- [ CGLUpdateContext ] --- - - /** - * Synchronizes new renderer state to that of the application context - * - * @param ctx a rendering context - */ - @NativeType("CGLError") - public static int CGLUpdateContext(@NativeType("CGLContextObj") long ctx) { - long __functionAddress = Functions.UpdateContext; - if (CHECKS) { - check(ctx); - } - return callPI(ctx, __functionAddress); - } - - // --- [ CGLSetGlobalOption ] --- - - /** Unsafe version of: {@link #CGLSetGlobalOption SetGlobalOption} */ - public static int nCGLSetGlobalOption(int pname, long params) { - long __functionAddress = Functions.SetGlobalOption; - return callPI(pname, params, __functionAddress); - } - - /** - * Sets the value of a global option. - * - * @param pname the name of the option whose value you want to set. One of:
    {@link #kCGLGOFormatCacheSize GOFormatCacheSize}{@link #kCGLGOClearFormatCache GOClearFormatCache}{@link #kCGLGORetainRenderers GORetainRenderers}{@link #kCGLGOResetLibrary GOResetLibrary}{@link #kCGLGOUseErrorHandler GOUseErrorHandler}
    {@link #kCGLGOUseBuildCache GOUseBuildCache}
    - * @param params the value to set the option to - */ - @NativeType("CGLError") - public static int CGLSetGlobalOption(@NativeType("CGLGlobalOption") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - return nCGLSetGlobalOption(pname, memAddress(params)); - } - - /** - * Sets the value of a global option. - * - * @param pname the name of the option whose value you want to set. One of:
    {@link #kCGLGOFormatCacheSize GOFormatCacheSize}{@link #kCGLGOClearFormatCache GOClearFormatCache}{@link #kCGLGORetainRenderers GORetainRenderers}{@link #kCGLGOResetLibrary GOResetLibrary}{@link #kCGLGOUseErrorHandler GOUseErrorHandler}
    {@link #kCGLGOUseBuildCache GOUseBuildCache}
    - */ - @NativeType("CGLError") - public static int CGLSetGlobalOption(@NativeType("CGLGlobalOption") int pname, @NativeType("GLint const *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - return nCGLSetGlobalOption(pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ CGLGetGlobalOption ] --- - - /** Unsafe version of: {@link #CGLGetGlobalOption GetGlobalOption} */ - public static int nCGLGetGlobalOption(int pname, long params) { - long __functionAddress = Functions.GetGlobalOption; - return callPI(pname, params, __functionAddress); - } - - /** - * Retrieves the value of a global option. - * - * @param pname the name of the option whose value you want to get. One of:
    {@link #kCGLGOFormatCacheSize GOFormatCacheSize}{@link #kCGLGOClearFormatCache GOClearFormatCache}{@link #kCGLGORetainRenderers GORetainRenderers}{@link #kCGLGOResetLibrary GOResetLibrary}{@link #kCGLGOUseErrorHandler GOUseErrorHandler}
    {@link #kCGLGOUseBuildCache GOUseBuildCache}
    - * @param params on return, a pointer to the value of the option - */ - @NativeType("CGLError") - public static int CGLGetGlobalOption(@NativeType("CGLGlobalOption") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - return nCGLGetGlobalOption(pname, memAddress(params)); - } - - // --- [ CGLLockContext ] --- - - /** - * Locks a CGL rendering context. - * - *

    The function CGLLockContext blocks the thread it is on until all other threads have unlocked the same context using the function - * {@link #CGLUnlockContext UnlockContext}. You can use CGLLockContext recursively. Context-specific CGL calls by themselves do not require locking, but you can - * guarantee serial processing for a group of calls by surrounding them with CGLLockContext and CGLUnlockContext. Keep in mind that calls from the OpenGL - * API (the API provided by the Architecture Review Board) require locking.

    - * - *

    Applications that use NSOpenGL classes with multithreading can lock contexts using the functions CGLLockContext and CGLUnlockContext. To perform - * rendering in a thread other than the main one, you can lock the context that you want to access and safely execute OpenGL commands. The locking calls - * must be placed around all OpenGL calls in all threads.

    - * - * @param context a rendering context - */ - @NativeType("CGLError") - public static int CGLLockContext(@NativeType("CGLContextObj") long context) { - long __functionAddress = Functions.LockContext; - if (CHECKS) { - check(context); - } - return callPI(context, __functionAddress); - } - - // --- [ CGLUnlockContext ] --- - - /** - * Unlocks a CGL rendering context. - * - * @param context the CGL context to unlock - */ - @NativeType("CGLError") - public static int CGLUnlockContext(@NativeType("CGLContextObj") long context) { - long __functionAddress = Functions.UnlockContext; - if (CHECKS) { - check(context); - } - return callPI(context, __functionAddress); - } - - // --- [ CGLGetVersion ] --- - - /** Unsafe version of: {@link #CGLGetVersion GetVersion} */ - public static void nCGLGetVersion(long majorvers, long minorvers) { - long __functionAddress = Functions.GetVersion; - callPPV(majorvers, minorvers, __functionAddress); - } - - /** - * Gets the major and minor version numbers of the CGL library. - * - * @param majorvers on return, points to the major version number of the CGL library - * @param minorvers on return, points to the minor version number of the CGL library - */ - public static void CGLGetVersion(@NativeType("GLint *") IntBuffer majorvers, @NativeType("GLint *") IntBuffer minorvers) { - if (CHECKS) { - check(majorvers, 1); - check(minorvers, 1); - } - nCGLGetVersion(memAddress(majorvers), memAddress(minorvers)); - } - - // --- [ CGLErrorString ] --- - - /** Unsafe version of: {@link #CGLErrorString ErrorString} */ - public static long nCGLErrorString(int error) { - long __functionAddress = Functions.ErrorString; - return callP(error, __functionAddress); - } - - /** - * Returns a string that describes the specified result code. - * - * @param error the CGL result code constant returned from a CGL function. One of:
    {@link #kCGLNoError NoError}{@link #kCGLBadAttribute BadAttribute}{@link #kCGLBadProperty BadProperty}{@link #kCGLBadPixelFormat BadPixelFormat}{@link #kCGLBadRendererInfo BadRendererInfo}{@link #kCGLBadContext BadContext}{@link #kCGLBadDrawable BadDrawable}
    {@link #kCGLBadDisplay BadDisplay}{@link #kCGLBadState BadState}{@link #kCGLBadValue BadValue}{@link #kCGLBadMatch BadMatch}{@link #kCGLBadEnumeration BadEnumeration}{@link #kCGLBadOffScreen BadOffScreen}{@link #kCGLBadFullScreen BadFullScreen}
    {@link #kCGLBadWindow BadWindow}{@link #kCGLBadAddress BadAddress}{@link #kCGLBadCodeModule BadCodeModule}{@link #kCGLBadAlloc BadAlloc}{@link #kCGLBadConnection BadConnection}
    - */ - @Nullable - @NativeType("char const *") - public static String CGLErrorString(@NativeType("CGLError") int error) { - long __result = nCGLErrorString(error); - return memASCIISafe(__result); - } - - /** Array version of: {@link #CGLChoosePixelFormat ChoosePixelFormat} */ - @NativeType("CGLError") - public static int CGLChoosePixelFormat(@NativeType("CGLPixelFormatAttribute const *") int[] attribs, @NativeType("CGLPixelFormatObj *") PointerBuffer pix, @NativeType("GLint *") int[] npix) { - long __functionAddress = Functions.ChoosePixelFormat; - if (CHECKS) { - checkNT(attribs); - check(pix, 1); - check(npix, 1); - } - return callPPPI(attribs, memAddress(pix), npix, __functionAddress); - } - - /** Array version of: {@link #CGLDescribePixelFormat DescribePixelFormat} */ - @NativeType("CGLError") - public static int CGLDescribePixelFormat(@NativeType("CGLPixelFormatObj") long pix, @NativeType("GLint") int pix_num, @NativeType("CGLPixelFormatAttribute") int attrib, @NativeType("GLint *") int[] value) { - long __functionAddress = Functions.DescribePixelFormat; - if (CHECKS) { - check(pix); - check(value, 1); - } - return callPPI(pix, pix_num, attrib, value, __functionAddress); - } - - /** Array version of: {@link #CGLQueryRendererInfo QueryRendererInfo} */ - @NativeType("CGLError") - public static int CGLQueryRendererInfo(@NativeType("GLuint") int display_mask, @NativeType("CGLRendererInfoObj *") PointerBuffer rend, @NativeType("GLint *") int[] nrend) { - long __functionAddress = Functions.QueryRendererInfo; - if (CHECKS) { - check(rend, 1); - check(nrend, 1); - } - return callPPI(display_mask, memAddress(rend), nrend, __functionAddress); - } - - /** Array version of: {@link #CGLDescribeRenderer DescribeRenderer} */ - @NativeType("CGLError") - public static int CGLDescribeRenderer(@NativeType("CGLRendererInfoObj") long rend, @NativeType("GLint") int rend_num, @NativeType("CGLRendererProperty") int prop, @NativeType("GLint *") int[] value) { - long __functionAddress = Functions.DescribeRenderer; - if (CHECKS) { - check(rend); - check(value, 1); - } - return callPPI(rend, rend_num, prop, value, __functionAddress); - } - - /** Array version of: {@link #CGLDescribePBuffer DescribePBuffer} */ - @NativeType("CGLError") - public static int CGLDescribePBuffer(@NativeType("CGLPBufferObj") long obj, @NativeType("GLsizei *") int[] width, @NativeType("GLsizei *") int[] height, @NativeType("GLenum *") int[] target, @NativeType("GLenum *") int[] internalFormat, @NativeType("GLint *") int[] mipmap) { - long __functionAddress = Functions.DescribePBuffer; - if (CHECKS) { - check(obj); - check(width, 1); - check(height, 1); - check(target, 1); - check(internalFormat, 1); - check(mipmap, 1); - } - return callPPPPPPI(obj, width, height, target, internalFormat, mipmap, __functionAddress); - } - - /** Array version of: {@link #CGLGetOffScreen GetOffScreen} */ - @NativeType("CGLError") - public static int CGLGetOffScreen(@NativeType("CGLContextObj") long ctx, @NativeType("GLsizei *") int[] width, @NativeType("GLsizei *") int[] height, @NativeType("GLint *") int[] rowbytes, @NativeType("void **") PointerBuffer baseaddr) { - long __functionAddress = Functions.GetOffScreen; - if (CHECKS) { - check(ctx); - check(width, 1); - check(height, 1); - check(rowbytes, 1); - check(baseaddr, 1); - } - return callPPPPPI(ctx, width, height, rowbytes, memAddress(baseaddr), __functionAddress); - } - - /** Array version of: {@link #CGLGetPBuffer GetPBuffer} */ - @NativeType("CGLError") - public static int CGLGetPBuffer(@NativeType("CGLContextObj") long ctx, @NativeType("CGLPBufferObj *") PointerBuffer pbuffer, @NativeType("GLenum *") int[] face, @NativeType("GLint *") int[] level, @NativeType("GLint *") int[] screen) { - long __functionAddress = Functions.GetPBuffer; - if (CHECKS) { - check(ctx); - check(pbuffer, 1); - check(face, 1); - check(level, 1); - check(screen, 1); - } - return callPPPPPI(ctx, memAddress(pbuffer), face, level, screen, __functionAddress); - } - - /** Array version of: {@link #CGLIsEnabled IsEnabled} */ - @NativeType("CGLError") - public static int CGLIsEnabled(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextEnable") int pname, @NativeType("GLint *") int[] enable) { - long __functionAddress = Functions.IsEnabled; - if (CHECKS) { - check(ctx); - check(enable, 1); - } - return callPPI(ctx, pname, enable, __functionAddress); - } - - /** Array version of: {@link #CGLSetParameter SetParameter} */ - @NativeType("CGLError") - public static int CGLSetParameter(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextParameter") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = Functions.SetParameter; - if (CHECKS) { - check(ctx); - check(params, 1); - } - return callPPI(ctx, pname, params, __functionAddress); - } - - /** Array version of: {@link #CGLGetParameter GetParameter} */ - @NativeType("CGLError") - public static int CGLGetParameter(@NativeType("CGLContextObj") long ctx, @NativeType("CGLContextParameter") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = Functions.GetParameter; - if (CHECKS) { - check(ctx); - check(params, 1); - } - return callPPI(ctx, pname, params, __functionAddress); - } - - /** Array version of: {@link #CGLGetVirtualScreen GetVirtualScreen} */ - @NativeType("CGLError") - public static int CGLGetVirtualScreen(@NativeType("CGLContextObj") long ctx, @NativeType("GLint *") int[] screen) { - long __functionAddress = Functions.GetVirtualScreen; - if (CHECKS) { - check(ctx); - check(screen, 1); - } - return callPPI(ctx, screen, __functionAddress); - } - - /** Array version of: {@link #CGLSetGlobalOption SetGlobalOption} */ - @NativeType("CGLError") - public static int CGLSetGlobalOption(@NativeType("CGLGlobalOption") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = Functions.SetGlobalOption; - if (CHECKS) { - check(params, 1); - } - return callPI(pname, params, __functionAddress); - } - - /** Array version of: {@link #CGLGetGlobalOption GetGlobalOption} */ - @NativeType("CGLError") - public static int CGLGetGlobalOption(@NativeType("CGLGlobalOption") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = Functions.GetGlobalOption; - if (CHECKS) { - check(params, 1); - } - return callPI(pname, params, __functionAddress); - } - - /** Array version of: {@link #CGLGetVersion GetVersion} */ - public static void CGLGetVersion(@NativeType("GLint *") int[] majorvers, @NativeType("GLint *") int[] minorvers) { - long __functionAddress = Functions.GetVersion; - if (CHECKS) { - check(majorvers, 1); - check(minorvers, 1); - } - callPPV(majorvers, minorvers, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/Context.java b/LWJGL/src/main/java/org/lwjgl/opengl/Context.java deleted file mode 100644 index 15978e14..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/Context.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.lwjgl.opengl; - -import org.lwjgl.LWJGLException; - -/** - * @author Spasi - * @since 14/5/2011 - */ -interface Context { - - boolean isCurrent() throws LWJGLException; - - void makeCurrent() throws LWJGLException; - - void releaseCurrent() throws LWJGLException; - - void releaseDrawable() throws LWJGLException; - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ContextAttribs.java b/LWJGL/src/main/java/org/lwjgl/opengl/ContextAttribs.java deleted file mode 100644 index 977d6043..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ContextAttribs.java +++ /dev/null @@ -1,476 +0,0 @@ -/* - * Copyright (c) 2002-2014 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLUtil; - -import java.nio.IntBuffer; -import java.util.LinkedHashMap; -import java.util.Map.Entry; - -/** - * This class represents the context attributes passed to CreateContextAttribs of the ARB_create_context extension. - *

    - * The attributes supported are described in the following extensions:
    - *

    - *

    - * Use of this class is optional. If an OpenGL context is created without passing an instance of this class - * (or ARB_create_context is not supported), the old context creation code will be used. Support for debug and forward - * compatible mobes is not guaranteed by the OpenGL implementation. Developers may encounter debug contexts being the same - * as non-debug contexts or forward compatible contexts having support for deprecated functionality. - *

    - * If the {@link #CONTEXT_FORWARD_COMPATIBLE_BIT_ARB} flag is used, LWJGL will not load the deprecated functionality (as defined in the OpenGL 3.0 - * specification), even if the driver exposes the corresponding entry points. - *

    - * This extension is not supported on MacOS X. However, in order to enable the GL 3.2 context on MacOS X 10.7 or newer, an instance of this class must be passed - * to LWJGL. The only valid configuration is ContextAttribs(3, 2, CONTEXT_CORE_PROFILE_BIT_ARB), anything else will be ignored. - * - * @author spasi - */ -public final class ContextAttribs { - - // ATTRIBUTES - - public static final int CONTEXT_MAJOR_VERSION_ARB = 0x2091; - public static final int CONTEXT_MINOR_VERSION_ARB = 0x2092; - - public static final int CONTEXT_PROFILE_MASK_ARB = 0x9126, - CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001, - CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002, - CONTEXT_ES2_PROFILE_BIT_EXT = 0x00000004; - - public static final int CONTEXT_FLAGS_ARB = 0x2094, - CONTEXT_DEBUG_BIT_ARB = 0x0001, - CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002, - CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x00000004, - CONTEXT_RESET_ISOLATION_BIT_ARB = 0x00000008; - - public static final int CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256, - NO_RESET_NOTIFICATION_ARB = 0x8261, - LOSE_CONTEXT_ON_RESET_ARB = 0x8252; - - public static final int CONTEXT_RELEASE_BEHABIOR_ARB = 0x2097, - CONTEXT_RELEASE_BEHAVIOR_NONE_ARB = 0x0000, - CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB = 0x2098; - - public static final int CONTEXT_LAYER_PLANE_ARB = 0x2093; // WGL-only - - // STATE - - private int majorVersion; - private int minorVersion; - - private int profileMask; - private int contextFlags; - - private int contextResetNotificationStrategy = NO_RESET_NOTIFICATION_ARB; - private int contextReleaseBehavior = CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB; - - private int layerPlane; - - // CONSTRUCTORS - - /** Creates the default ContextAttribs instance. No special attributes will be used when creating the OpenGL context. */ - public ContextAttribs() { - this(1, 0); - } - - /** Creates a ContextAttribs instance for the given OpenGL version. */ - public ContextAttribs(int majorVersion, int minorVersion) { - this(majorVersion, minorVersion, 0, 0); - } - - /** - * Creates a new ContextAttribs instance with the given attributes. - * - * @param majorVersion the major OpenGL version - * @param minorVersion the minor OpenGL version - * @param profileMask the context profile mask. One of:
    {@link #CONTEXT_CORE_PROFILE_BIT_ARB}, {@link #CONTEXT_FORWARD_COMPATIBLE_BIT_ARB}, {@link #CONTEXT_ES2_PROFILE_BIT_EXT} - */ - public ContextAttribs(int majorVersion, int minorVersion, int profileMask) { - this(majorVersion, minorVersion, 0, profileMask); - } - - /** - * Creates a new ContextAttribs instance with the given attributes. - * - * @param majorVersion the major OpenGL version - * @param minorVersion the minor OpenGL version - * @param profileMask the context profile mask. One of:
    {@link #CONTEXT_CORE_PROFILE_BIT_ARB}, {@link #CONTEXT_FORWARD_COMPATIBLE_BIT_ARB}, {@link #CONTEXT_ES2_PROFILE_BIT_EXT} - * @param contextFlags the context flags, a bitfield value. One or more of:
    {@link #CONTEXT_DEBUG_BIT_ARB}, {@link #CONTEXT_FORWARD_COMPATIBLE_BIT_ARB}, {@link #CONTEXT_ROBUST_ACCESS_BIT_ARB}, {@link #CONTEXT_RESET_ISOLATION_BIT_ARB} - */ - public ContextAttribs(int majorVersion, int minorVersion, int profileMask, int contextFlags) { - if ( majorVersion < 0 || 4 < majorVersion || - minorVersion < 0 || - (majorVersion == 4 && 5 < minorVersion) || - (majorVersion == 3 && 3 < minorVersion) || - (majorVersion == 2 && 1 < minorVersion) || - (majorVersion == 1 && 5 < minorVersion) ) - throw new IllegalArgumentException("Invalid OpenGL version specified: " + majorVersion + '.' + minorVersion); - - if ( LWJGLUtil.CHECKS ) { - if ( 1 < Integer.bitCount(profileMask) || CONTEXT_ES2_PROFILE_BIT_EXT < profileMask ) - throw new IllegalArgumentException("Invalid profile mask specified: " + Integer.toBinaryString(profileMask)); - - if ( 0xF < contextFlags ) - throw new IllegalArgumentException("Invalid context flags specified: " + Integer.toBinaryString(profileMask)); - } - - this.majorVersion = majorVersion; - this.minorVersion = minorVersion; - - this.profileMask = profileMask; - this.contextFlags = contextFlags; - } - - // Copy constructor - private ContextAttribs(ContextAttribs other) { - this.majorVersion = other.majorVersion; - this.minorVersion = other.minorVersion; - - this.profileMask = other.profileMask; - this.contextFlags = other.contextFlags; - - this.contextResetNotificationStrategy = other.contextResetNotificationStrategy; - this.contextReleaseBehavior = other.contextReleaseBehavior; - - this.layerPlane = other.layerPlane; - } - - // GETTERS - - /** Returns the {@link #CONTEXT_MAJOR_VERSION_ARB} value. */ - public int getMajorVersion() { - return majorVersion; - } - - /** Returns the {@link #CONTEXT_MINOR_VERSION_ARB} value. */ - public int getMinorVersion() { - return minorVersion; - } - - /** Returns the {@link #CONTEXT_PROFILE_MASK_ARB} value. */ - public int getProfileMask() { - return profileMask; - } - - private boolean hasMask(int mask) { - return profileMask == mask; - } - - /** Returns true if the {@link #CONTEXT_CORE_PROFILE_BIT_ARB} has been set. */ - public boolean isProfileCore() { - return hasMask(CONTEXT_CORE_PROFILE_BIT_ARB); - } - - /** Returns true if the {@link #CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB} has been set. */ - public boolean isProfileCompatibility() { - return hasMask(CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB); - } - - /** Returns true if the {@link #CONTEXT_ES2_PROFILE_BIT_EXT} has been set. */ - public boolean isProfileES() { - return hasMask(CONTEXT_ES2_PROFILE_BIT_EXT); - } - - /** Returns the {@link #CONTEXT_FLAGS_ARB} value. */ - public int getContextFlags() { - return contextFlags; - } - - private boolean hasFlag(int flag) { - return (contextFlags & flag) != 0; - } - - /** Returns true if the {@link #CONTEXT_DEBUG_BIT_ARB} has been set. */ - public boolean isDebug() { - return hasFlag(CONTEXT_DEBUG_BIT_ARB); - } - - /** Returns true if the {@link #CONTEXT_FORWARD_COMPATIBLE_BIT_ARB} has been set. */ - public boolean isForwardCompatible() { - return hasFlag(CONTEXT_FORWARD_COMPATIBLE_BIT_ARB); - } - - /** Returns true if the {@link #CONTEXT_ROBUST_ACCESS_BIT_ARB} has been set. */ - public boolean isRobustAccess() { return hasFlag(CONTEXT_ROBUST_ACCESS_BIT_ARB); } - - /** Returns true if the {@link #CONTEXT_RESET_ISOLATION_BIT_ARB} has been set. */ - public boolean isContextResetIsolation() { - return hasFlag(CONTEXT_RESET_ISOLATION_BIT_ARB); - } - - /** Returns the {@link #CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB} value. */ - public int getContextResetNotificationStrategy() { - return contextResetNotificationStrategy; - } - - /** - * Returns true if the {@link #CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB} has been set to {@link #LOSE_CONTEXT_ON_RESET_ARB}. - * - * @deprecated use {@link #getContextResetNotificationStrategy} instead - */ - public boolean isLoseContextOnReset() { return contextResetNotificationStrategy == LOSE_CONTEXT_ON_RESET_ARB; } - - /** Returns the {@link #CONTEXT_RELEASE_BEHABIOR_ARB} value. */ - public int getContextReleaseBehavior() { - return contextReleaseBehavior; - } - - /** Returns the {@link #CONTEXT_LAYER_PLANE_ARB} value. */ - public int getLayerPlane() { - return layerPlane; - } - - // CHAIN CONFIGURATION PATTERN - - private ContextAttribs toggleMask(int mask, boolean value) { - if ( value == hasMask(mask) ) - return this; - - ContextAttribs attribs = new ContextAttribs(this); - attribs.profileMask = value ? mask : 0; - return attribs; - } - - /** - * Returns a new {@code ContextAttribs} instance with the {@link #CONTEXT_CORE_PROFILE_BIT_ARB} bit in {@link #CONTEXT_PROFILE_MASK_ARB} set to the given value. - * If {@code profileCore} is true, all other bits in the mask are cleared. - */ - public ContextAttribs withProfileCore(boolean profileCore) { - if ( majorVersion < 3 || (majorVersion == 3 && minorVersion < 2) ) - throw new IllegalArgumentException("Profiles are only supported on OpenGL version 3.2 or higher."); - - return toggleMask(CONTEXT_CORE_PROFILE_BIT_ARB, profileCore); - } - - /** - * Returns a new {@code ContextAttribs} instance with the {@link #CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB} bit in {@link #CONTEXT_PROFILE_MASK_ARB} set to the given value. - * If {@code profileCompatibility} is true, all other bits in the mask are cleared. - */ - public ContextAttribs withProfileCompatibility(boolean profileCompatibility) { - if ( majorVersion < 3 || (majorVersion == 3 && minorVersion < 2) ) - throw new IllegalArgumentException("Profiles are only supported on OpenGL version 3.2 or higher."); - - return toggleMask(CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, profileCompatibility); - } - - /** - * Returns a new {@code ContextAttribs} instance with the {@link #CONTEXT_ES2_PROFILE_BIT_EXT} bit in {@link #CONTEXT_PROFILE_MASK_ARB} set to the given value. - * If {@code profileES} is true, all other bits in the mask are cleared. - */ - public ContextAttribs withProfileES(boolean profileES) { - if ( !(majorVersion == 2 && minorVersion == 0) ) - throw new IllegalArgumentException("The OpenGL ES profile is only supported on OpenGL version 2.0."); - - return toggleMask(CONTEXT_ES2_PROFILE_BIT_EXT, profileES); - } - - private ContextAttribs toggleFlag(int flag, boolean value) { - if ( value == hasFlag(flag) ) - return this; - - ContextAttribs attribs = new ContextAttribs(this); - attribs.contextFlags ^= flag; // toggle bit - return attribs; - } - - /** Returns a new {@code ContextAttribs} instance with the {@link #CONTEXT_DEBUG_BIT_ARB} bit in {@link #CONTEXT_FLAGS_ARB} set to the given value. */ - public ContextAttribs withDebug(boolean debug) { return toggleFlag(CONTEXT_DEBUG_BIT_ARB, debug); } - - /** Returns a new {@code ContextAttribs} instance with the {@link #CONTEXT_FORWARD_COMPATIBLE_BIT_ARB} bit in {@link #CONTEXT_FLAGS_ARB} set to the given value. */ - public ContextAttribs withForwardCompatible(boolean forwardCompatible) { return toggleFlag(CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, forwardCompatible); } - - /** Returns a new {@code ContextAttribs} instance with the {@link #CONTEXT_ROBUST_ACCESS_BIT_ARB} bit in {@link #CONTEXT_FLAGS_ARB} set to the given value. */ - public ContextAttribs withRobustAccess(boolean robustAccess) { return toggleFlag(CONTEXT_ROBUST_ACCESS_BIT_ARB, robustAccess); } - - /** Returns a new {@code ContextAttribs} instance with the {@link #CONTEXT_RESET_ISOLATION_BIT_ARB} bit in {@link #CONTEXT_FLAGS_ARB} set to the given value. */ - public ContextAttribs withContextResetIsolation(boolean contextResetIsolation) { return toggleFlag(CONTEXT_RESET_ISOLATION_BIT_ARB, contextResetIsolation); } - - /** - * Returns a ContextAttribs instance with {@link #CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB} set to the given strategy. The default context reset notification - * strategy is {@link #NO_RESET_NOTIFICATION_ARB}. - * - * @param strategy the context reset notification strategy. One of:
    {@link #NO_RESET_NOTIFICATION_ARB}, {@link #LOSE_CONTEXT_ON_RESET_ARB} - * - * @return the new ContextAttribs - */ - public ContextAttribs withResetNotificationStrategy(int strategy) { - if ( strategy == contextResetNotificationStrategy ) - return this; - - if ( LWJGLUtil.CHECKS && !(strategy == NO_RESET_NOTIFICATION_ARB || strategy == LOSE_CONTEXT_ON_RESET_ARB) ) - throw new IllegalArgumentException("Invalid context reset notification strategy specified: 0x" + LWJGLUtil.toHexString(strategy)); - - ContextAttribs attribs = new ContextAttribs(this); - attribs.contextResetNotificationStrategy = strategy; - return attribs; - } - - /** - * Returns a ContextAttribs instance with {@link #CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB} set to {@link #LOSE_CONTEXT_ON_RESET_ARB} if the parameter is - * true or to {@link #NO_RESET_NOTIFICATION_ARB} if the parameter is false. - * - * @param loseContextOnReset the context reset notification strategy - * - * @return the new ContextAttribs - * - * @deprecated use {@link #withResetNotificationStrategy} instead - */ - public ContextAttribs withLoseContextOnReset(boolean loseContextOnReset) { - return withResetNotificationStrategy(loseContextOnReset ? LOSE_CONTEXT_ON_RESET_ARB : NO_RESET_NOTIFICATION_ARB); - } - - /** - * Returns a ContextAttribs instance with {@link #CONTEXT_RELEASE_BEHABIOR_ARB} set to the given behavior. The default context release behavior is - * {@link #CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB}. - * - * @param behavior the context release behavior. One of:
    {@link #CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB}, {@link #CONTEXT_RELEASE_BEHAVIOR_NONE_ARB} - * - * @return the new ContextAttribs - */ - public ContextAttribs withContextReleaseBehavior(int behavior) { - if ( behavior == contextReleaseBehavior ) - return this; - - if ( LWJGLUtil.CHECKS && !(behavior == CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB || behavior == CONTEXT_RELEASE_BEHAVIOR_NONE_ARB) ) - throw new IllegalArgumentException("Invalid context release behavior specified: 0x" + LWJGLUtil.toHexString(behavior)); - - ContextAttribs attribs = new ContextAttribs(this); - attribs.contextReleaseBehavior = behavior; - return attribs; - } - - /** Returns a new {@code ContextAttribs} instance with {@link #CONTEXT_LAYER_PLANE_ARB} set to the given value. */ - public ContextAttribs withLayer(int layerPlane) { - if ( LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_WINDOWS ) - throw new IllegalArgumentException("The CONTEXT_LAYER_PLANE_ARB attribute is supported only on the Windows platform."); - - if ( layerPlane == this.layerPlane ) - return this; - - if ( layerPlane < 0 ) - throw new IllegalArgumentException("Invalid layer plane specified: " + layerPlane); - - ContextAttribs attribs = new ContextAttribs(this); - attribs.layerPlane = layerPlane; - return attribs; - } - - IntBuffer getAttribList() { - if ( LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX ) - return null; - - LinkedHashMap map = new LinkedHashMap(8); - - if ( !(majorVersion == 1 && minorVersion == 0) ) { - map.put(CONTEXT_MAJOR_VERSION_ARB, majorVersion); - map.put(CONTEXT_MINOR_VERSION_ARB, minorVersion); - } - - if ( contextFlags != 0 ) - map.put(CONTEXT_FLAGS_ARB, contextFlags); - - if ( profileMask != 0 ) - map.put(CONTEXT_PROFILE_MASK_ARB, profileMask); - - if ( contextResetNotificationStrategy != NO_RESET_NOTIFICATION_ARB ) - map.put(CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB, contextResetNotificationStrategy); - - if ( contextReleaseBehavior != CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB ) - map.put(CONTEXT_RELEASE_BEHABIOR_ARB, contextReleaseBehavior); - - if ( layerPlane != 0 ) - map.put(CONTEXT_LAYER_PLANE_ARB, layerPlane); - - if ( map.isEmpty() ) - return null; - - IntBuffer attribs = BufferUtils.createIntBuffer((map.size() * 2) + 1); - for ( Entry attrib : map.entrySet() ) { - attribs - .put(attrib.getKey()) - .put(attrib.getValue()); - } - attribs.put(0); - attribs.rewind(); - return attribs; - } - - public String toString() { - StringBuilder sb = new StringBuilder(32); - - sb.append("ContextAttribs:"); - sb.append(" Version=").append(majorVersion).append('.').append(minorVersion); - - if ( profileMask != 0 ) { - sb.append(", Profile="); - if ( hasMask(CONTEXT_CORE_PROFILE_BIT_ARB) ) - sb.append("CORE"); - else if ( hasMask(CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB) ) - sb.append("COMPATIBLITY"); - else if ( hasMask(CONTEXT_ES2_PROFILE_BIT_EXT) ) - sb.append("ES2"); - else - sb.append("*unknown*"); - } - - if ( contextFlags != 0 ) { - if ( hasFlag(CONTEXT_DEBUG_BIT_ARB) ) - sb.append(", DEBUG"); - if ( hasFlag(CONTEXT_FORWARD_COMPATIBLE_BIT_ARB) ) - sb.append(", FORWARD_COMPATIBLE"); - if ( hasFlag(CONTEXT_ROBUST_ACCESS_BIT_ARB) ) - sb.append(", ROBUST_ACCESS"); - if ( hasFlag(CONTEXT_RESET_ISOLATION_BIT_ARB) ) - sb.append(", RESET_ISOLATION"); - } - - if ( contextResetNotificationStrategy != NO_RESET_NOTIFICATION_ARB ) - sb.append(", LOSE_CONTEXT_ON_RESET"); - if ( contextReleaseBehavior != CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB ) - sb.append(", RELEASE_BEHAVIOR_NONE"); - - if ( layerPlane != 0 ) - sb.append(", Layer=").append(layerPlane); - - return sb.toString(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ContextCapabilities.java b/LWJGL/src/main/java/org/lwjgl/opengl/ContextCapabilities.java deleted file mode 100644 index e67144e9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ContextCapabilities.java +++ /dev/null @@ -1,409 +0,0 @@ -package org.lwjgl.opengl; - -import java.lang.reflect.Field; - -public class ContextCapabilities { - - GLCapabilities cap = GL.createCapabilities(); - - public ContextCapabilities() { - - Field[] fields = GLCapabilities.class.getFields(); - - try { - for ( Field field : fields ) { - - String name = field.getName(); - - if (name.startsWith("GL_") || name.startsWith("OpenGL")) { - - boolean value = field.getBoolean(cap); - - try { - Field f = this.getClass().getField(name); - f.setBoolean(this, value); - } catch (Exception e) { - } - } - if (name.equals("glGetBufferSubData") || name.equals("glBufferSubData")) { - Field f = this.getClass().getField(name); - f.setLong(this, field.getLong(cap)); - } - } - } catch (Exception e) { - System.out.println(e); - } - } - - public boolean GL_AMD_blend_minmax_factor; - public boolean GL_AMD_conservative_depth; - public boolean GL_AMD_debug_output; - public boolean GL_AMD_depth_clamp_separate; - public boolean GL_AMD_draw_buffers_blend; - public boolean GL_AMD_interleaved_elements; - public boolean GL_AMD_multi_draw_indirect; - public boolean GL_AMD_name_gen_delete; - public boolean GL_AMD_performance_monitor; - public boolean GL_AMD_pinned_memory; - public boolean GL_AMD_query_buffer_object; - public boolean GL_AMD_sample_positions; - public boolean GL_AMD_seamless_cubemap_per_texture; - public boolean GL_AMD_shader_atomic_counter_ops; - public boolean GL_AMD_shader_stencil_export; - public boolean GL_AMD_shader_trinary_minmax; - public boolean GL_AMD_sparse_texture; - public boolean GL_AMD_stencil_operation_extended; - public boolean GL_AMD_texture_texture4; - public boolean GL_AMD_transform_feedback3_lines_triangles; - public boolean GL_AMD_vertex_shader_layer; - public boolean GL_AMD_vertex_shader_tessellator; - public boolean GL_AMD_vertex_shader_viewport_index; - public boolean GL_APPLE_aux_depth_stencil; - public boolean GL_APPLE_client_storage; - public boolean GL_APPLE_element_array; - public boolean GL_APPLE_fence; - public boolean GL_APPLE_float_pixels; - public boolean GL_APPLE_flush_buffer_range; - public boolean GL_APPLE_object_purgeable; - public boolean GL_APPLE_packed_pixels; - public boolean GL_APPLE_rgb_422; - public boolean GL_APPLE_row_bytes; - public boolean GL_APPLE_texture_range; - public boolean GL_APPLE_vertex_array_object; - public boolean GL_APPLE_vertex_array_range; - public boolean GL_APPLE_vertex_program_evaluators; - public boolean GL_APPLE_ycbcr_422; - public boolean GL_ARB_ES2_compatibility; - public boolean GL_ARB_ES3_compatibility; - public boolean GL_ARB_arrays_of_arrays; - public boolean GL_ARB_base_instance; - public boolean GL_ARB_bindless_texture; - public boolean GL_ARB_blend_func_extended; - public boolean GL_ARB_buffer_storage; - public boolean GL_ARB_cl_event; - public boolean GL_ARB_clear_buffer_object; - public boolean GL_ARB_clear_texture; - public boolean GL_ARB_color_buffer_float; - public boolean GL_ARB_compatibility; - public boolean GL_ARB_compressed_texture_pixel_storage; - public boolean GL_ARB_compute_shader; - public boolean GL_ARB_compute_variable_group_size; - public boolean GL_ARB_conservative_depth; - public boolean GL_ARB_copy_buffer; - public boolean GL_ARB_copy_image; - public boolean GL_ARB_debug_output; - public boolean GL_ARB_depth_buffer_float; - public boolean GL_ARB_depth_clamp; - public boolean GL_ARB_depth_texture; - public boolean GL_ARB_draw_buffers; - public boolean GL_ARB_draw_buffers_blend; - public boolean GL_ARB_draw_elements_base_vertex; - public boolean GL_ARB_draw_indirect; - public boolean GL_ARB_draw_instanced; - public boolean GL_ARB_enhanced_layouts; - public boolean GL_ARB_explicit_attrib_location; - public boolean GL_ARB_explicit_uniform_location; - public boolean GL_ARB_fragment_coord_conventions; - public boolean GL_ARB_fragment_layer_viewport; - public boolean GL_ARB_fragment_program; - public boolean GL_ARB_fragment_program_shadow; - public boolean GL_ARB_fragment_shader; - public boolean GL_ARB_framebuffer_no_attachments; - public boolean GL_ARB_framebuffer_object; - public boolean GL_ARB_framebuffer_sRGB; - public boolean GL_ARB_geometry_shader4; - public boolean GL_ARB_get_program_binary; - public boolean GL_ARB_gpu_shader5; - public boolean GL_ARB_gpu_shader_fp64; - public boolean GL_ARB_half_float_pixel; - public boolean GL_ARB_half_float_vertex; - public boolean GL_ARB_imaging; - public boolean GL_ARB_indirect_parameters; - public boolean GL_ARB_instanced_arrays; - public boolean GL_ARB_internalformat_query; - public boolean GL_ARB_internalformat_query2; - public boolean GL_ARB_invalidate_subdata; - public boolean GL_ARB_map_buffer_alignment; - public boolean GL_ARB_map_buffer_range; - public boolean GL_ARB_matrix_palette; - public boolean GL_ARB_multi_bind; - public boolean GL_ARB_multi_draw_indirect; - public boolean GL_ARB_multisample; - public boolean GL_ARB_multitexture; - public boolean GL_ARB_occlusion_query; - public boolean GL_ARB_occlusion_query2; - public boolean GL_ARB_pixel_buffer_object; - public boolean GL_ARB_point_parameters; - public boolean GL_ARB_point_sprite; - public boolean GL_ARB_program_interface_query; - public boolean GL_ARB_provoking_vertex; - public boolean GL_ARB_query_buffer_object; - public boolean GL_ARB_robust_buffer_access_behavior; - public boolean GL_ARB_robustness; - public boolean GL_ARB_robustness_isolation; - public boolean GL_ARB_sample_shading; - public boolean GL_ARB_sampler_objects; - public boolean GL_ARB_seamless_cube_map; - public boolean GL_ARB_seamless_cubemap_per_texture; - public boolean GL_ARB_separate_shader_objects; - public boolean GL_ARB_shader_atomic_counters; - public boolean GL_ARB_shader_bit_encoding; - public boolean GL_ARB_shader_draw_parameters; - public boolean GL_ARB_shader_group_vote; - public boolean GL_ARB_shader_image_load_store; - public boolean GL_ARB_shader_image_size; - public boolean GL_ARB_shader_objects; - public boolean GL_ARB_shader_precision; - public boolean GL_ARB_shader_stencil_export; - public boolean GL_ARB_shader_storage_buffer_object; - public boolean GL_ARB_shader_subroutine; - public boolean GL_ARB_shader_texture_lod; - public boolean GL_ARB_shading_language_100; - public boolean GL_ARB_shading_language_420pack; - public boolean GL_ARB_shading_language_include; - public boolean GL_ARB_shading_language_packing; - public boolean GL_ARB_shadow; - public boolean GL_ARB_shadow_ambient; - public boolean GL_ARB_sparse_texture; - public boolean GL_ARB_stencil_texturing; - public boolean GL_ARB_sync; - public boolean GL_ARB_tessellation_shader; - public boolean GL_ARB_texture_border_clamp; - public boolean GL_ARB_texture_buffer_object; - public boolean GL_ARB_texture_buffer_object_rgb32; - public boolean GL_ARB_texture_buffer_range; - public boolean GL_ARB_texture_compression; - public boolean GL_ARB_texture_compression_bptc; - public boolean GL_ARB_texture_compression_rgtc; - public boolean GL_ARB_texture_cube_map; - public boolean GL_ARB_texture_cube_map_array; - public boolean GL_ARB_texture_env_add; - 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_gather; - public boolean GL_ARB_texture_mirror_clamp_to_edge; - public boolean GL_ARB_texture_mirrored_repeat; - public boolean GL_ARB_texture_multisample; - public boolean GL_ARB_texture_non_power_of_two; - public boolean GL_ARB_texture_query_levels; - public boolean GL_ARB_texture_query_lod; - public boolean GL_ARB_texture_rectangle; - public boolean GL_ARB_texture_rg; - public boolean GL_ARB_texture_rgb10_a2ui; - public boolean GL_ARB_texture_stencil8; - public boolean GL_ARB_texture_storage; - public boolean GL_ARB_texture_storage_multisample; - public boolean GL_ARB_texture_swizzle; - public boolean GL_ARB_texture_view; - public boolean GL_ARB_timer_query; - public boolean GL_ARB_transform_feedback2; - public boolean GL_ARB_transform_feedback3; - public boolean GL_ARB_transform_feedback_instanced; - public boolean GL_ARB_transpose_matrix; - public boolean GL_ARB_uniform_buffer_object; - public boolean GL_ARB_vertex_array_bgra; - public boolean GL_ARB_vertex_array_object; - public boolean GL_ARB_vertex_attrib_64bit; - public boolean GL_ARB_vertex_attrib_binding; - public boolean GL_ARB_vertex_blend; - public boolean GL_ARB_vertex_buffer_object; - public boolean GL_ARB_vertex_program; - public boolean GL_ARB_vertex_shader; - public boolean GL_ARB_vertex_type_10f_11f_11f_rev; - public boolean GL_ARB_vertex_type_2_10_10_10_rev; - public boolean GL_ARB_viewport_array; - public boolean GL_ARB_window_pos; - public boolean GL_ATI_draw_buffers; - public boolean GL_ATI_element_array; - public boolean GL_ATI_envmap_bumpmap; - public boolean GL_ATI_fragment_shader; - public boolean GL_ATI_map_object_buffer; - public boolean GL_ATI_meminfo; - public boolean GL_ATI_pn_triangles; - public boolean GL_ATI_separate_stencil; - public boolean GL_ATI_shader_texture_lod; - public boolean GL_ATI_text_fragment_shader; - public boolean GL_ATI_texture_compression_3dc; - public boolean GL_ATI_texture_env_combine3; - public boolean GL_ATI_texture_float; - public boolean GL_ATI_texture_mirror_once; - public boolean GL_ATI_vertex_array_object; - public boolean GL_ATI_vertex_attrib_array_object; - public boolean GL_ATI_vertex_streams; - public boolean GL_EXT_abgr; - public boolean GL_EXT_bgra; - public boolean GL_EXT_bindable_uniform; - public boolean GL_EXT_blend_color; - public boolean GL_EXT_blend_equation_separate; - public boolean GL_EXT_blend_func_separate; - public boolean GL_EXT_blend_minmax; - public boolean GL_EXT_blend_subtract; - public boolean GL_EXT_Cg_shader; - public boolean GL_EXT_compiled_vertex_array; - public boolean GL_EXT_depth_bounds_test; - public boolean GL_EXT_direct_state_access; - public boolean GL_EXT_draw_buffers2; - public boolean GL_EXT_draw_instanced; - public boolean GL_EXT_draw_range_elements; - public boolean GL_EXT_fog_coord; - public boolean GL_EXT_framebuffer_blit; - public boolean GL_EXT_framebuffer_multisample; - public boolean GL_EXT_framebuffer_multisample_blit_scaled; - public boolean GL_EXT_framebuffer_object; - public boolean GL_EXT_framebuffer_sRGB; - public boolean GL_EXT_geometry_shader4; - public boolean GL_EXT_gpu_program_parameters; - public boolean GL_EXT_gpu_shader4; - public boolean GL_EXT_multi_draw_arrays; - public boolean GL_EXT_packed_depth_stencil; - public boolean GL_EXT_packed_float; - public boolean GL_EXT_packed_pixels; - public boolean GL_EXT_paletted_texture; - public boolean GL_EXT_pixel_buffer_object; - public boolean GL_EXT_point_parameters; - public boolean GL_EXT_provoking_vertex; - public boolean GL_EXT_rescale_normal; - public boolean GL_EXT_secondary_color; - public boolean GL_EXT_separate_shader_objects; - public boolean GL_EXT_separate_specular_color; - public boolean GL_EXT_shader_image_load_store; - public boolean GL_EXT_shadow_funcs; - public boolean GL_EXT_shared_texture_palette; - public boolean GL_EXT_stencil_clear_tag; - public boolean GL_EXT_stencil_two_side; - public boolean GL_EXT_stencil_wrap; - public boolean GL_EXT_texture_3d; - public boolean GL_EXT_texture_array; - public boolean GL_EXT_texture_buffer_object; - public boolean GL_EXT_texture_compression_latc; - public boolean GL_EXT_texture_compression_rgtc; - public boolean GL_EXT_texture_compression_s3tc; - public boolean GL_EXT_texture_env_combine; - public boolean GL_EXT_texture_env_dot3; - public boolean GL_EXT_texture_filter_anisotropic; - public boolean GL_EXT_texture_integer; - public boolean GL_EXT_texture_lod_bias; - public boolean GL_EXT_texture_mirror_clamp; - public boolean GL_EXT_texture_rectangle; - public boolean GL_EXT_texture_sRGB; - public boolean GL_EXT_texture_sRGB_decode; - public boolean GL_EXT_texture_shared_exponent; - public boolean GL_EXT_texture_snorm; - public boolean GL_EXT_texture_swizzle; - public boolean GL_EXT_timer_query; - public boolean GL_EXT_transform_feedback; - public boolean GL_EXT_vertex_array_bgra; - public boolean GL_EXT_vertex_attrib_64bit; - public boolean GL_EXT_vertex_shader; - public boolean GL_EXT_vertex_weighting; - public boolean OpenGL11; - public boolean OpenGL12; - public boolean OpenGL13; - public boolean OpenGL14; - public boolean OpenGL15; - public boolean OpenGL20; - public boolean OpenGL21; - public boolean OpenGL30; - public boolean OpenGL31; - public boolean OpenGL32; - public boolean OpenGL33; - public boolean OpenGL40; - public boolean OpenGL41; - public boolean OpenGL42; - public boolean OpenGL43; - public boolean OpenGL44; - public boolean GL_GREMEDY_frame_terminator; - public boolean GL_GREMEDY_string_marker; - public boolean GL_HP_occlusion_test; - public boolean GL_IBM_rasterpos_clip; - public boolean GL_INTEL_map_texture; - public boolean GL_KHR_debug; - public boolean GL_KHR_texture_compression_astc_ldr; - public boolean GL_NVX_gpu_memory_info; - public boolean GL_NV_bindless_multi_draw_indirect; - public boolean GL_NV_bindless_texture; - public boolean GL_NV_blend_equation_advanced; - public boolean GL_NV_blend_square; - public boolean GL_NV_compute_program5; - public boolean GL_NV_conditional_render; - public boolean GL_NV_copy_depth_to_color; - public boolean GL_NV_copy_image; - public boolean GL_NV_deep_texture3D; - public boolean GL_NV_depth_buffer_float; - public boolean GL_NV_depth_clamp; - public boolean GL_NV_draw_texture; - public boolean GL_NV_evaluators; - public boolean GL_NV_explicit_multisample; - public boolean GL_NV_fence; - public boolean GL_NV_float_buffer; - public boolean GL_NV_fog_distance; - public boolean GL_NV_fragment_program; - public boolean GL_NV_fragment_program2; - public boolean GL_NV_fragment_program4; - public boolean GL_NV_fragment_program_option; - public boolean GL_NV_framebuffer_multisample_coverage; - public boolean GL_NV_geometry_program4; - public boolean GL_NV_geometry_shader4; - public boolean GL_NV_gpu_program4; - public boolean GL_NV_gpu_program5; - public boolean GL_NV_gpu_program5_mem_extended; - public boolean GL_NV_gpu_shader5; - public boolean GL_NV_half_float; - public boolean GL_NV_light_max_exponent; - public boolean GL_NV_multisample_coverage; - public boolean GL_NV_multisample_filter_hint; - public boolean GL_NV_occlusion_query; - public boolean GL_NV_packed_depth_stencil; - public boolean GL_NV_parameter_buffer_object; - public boolean GL_NV_parameter_buffer_object2; - public boolean GL_NV_path_rendering; - public boolean GL_NV_pixel_data_range; - public boolean GL_NV_point_sprite; - public boolean GL_NV_present_video; - public boolean GL_NV_primitive_restart; - public boolean GL_NV_register_combiners; - public boolean GL_NV_register_combiners2; - public boolean GL_NV_shader_atomic_counters; - public boolean GL_NV_shader_atomic_float; - public boolean GL_NV_shader_buffer_load; - public boolean GL_NV_shader_buffer_store; - public boolean GL_NV_shader_storage_buffer_object; - public boolean GL_NV_tessellation_program5; - public boolean GL_NV_texgen_reflection; - public boolean GL_NV_texture_barrier; - public boolean GL_NV_texture_compression_vtc; - public boolean GL_NV_texture_env_combine4; - public boolean GL_NV_texture_expand_normal; - public boolean GL_NV_texture_multisample; - public boolean GL_NV_texture_rectangle; - public boolean GL_NV_texture_shader; - public boolean GL_NV_texture_shader2; - public boolean GL_NV_texture_shader3; - public boolean GL_NV_transform_feedback; - public boolean GL_NV_transform_feedback2; - public boolean GL_NV_vertex_array_range; - public boolean GL_NV_vertex_array_range2; - public boolean GL_NV_vertex_attrib_integer_64bit; - public boolean GL_NV_vertex_buffer_unified_memory; - public boolean GL_NV_vertex_program; - public boolean GL_NV_vertex_program1_1; - public boolean GL_NV_vertex_program2; - public boolean GL_NV_vertex_program2_option; - public boolean GL_NV_vertex_program3; - public boolean GL_NV_vertex_program4; - public boolean GL_NV_video_capture; - public boolean GL_SGIS_generate_mipmap; - public boolean GL_SGIS_texture_lod; - public boolean GL_SUN_slice_accum; - - public long glGetBufferSubData; - public long glBufferSubData; - - public static void main(String[] arg) { - System.out.println("START!"); - new ContextCapabilities(); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/ContextGL.java b/LWJGL/src/main/java/org/lwjgl/opengl/ContextGL.java deleted file mode 100644 index ccfca707..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/ContextGL.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 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.opengl; - -import static org.lwjgl.opengl.GL11.GL_NO_ERROR; -import static org.lwjgl.opengl.GL11.glGetError; - -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.PointerBuffer; -import org.lwjgl.Sys; -import org.lwjgl.glfw.GLFW; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -/** - *

    - * Context encapsulates an OpenGL context. - *

    - *

    - * This class is thread-safe. - * - * @author elias_naur - * @version $Revision$ - * $Id$ - */ -final class ContextGL implements Context { - - /** The current Context */ - private static final ThreadLocal current_context_local = new ThreadLocal(); - - /** Handle to the native GL rendering context */ - private final long handle; - private final PeerInfo peer_info; - - private final ContextAttribs contextAttribs; - private final boolean forwardCompatible; - - /** Whether the context has been destroyed */ - private boolean destroyed; - - private boolean destroy_requested; - - /** The thread that has this context current, or null. */ - private Thread thread; - - private boolean isCurrent; - - static { - Sys.initialize(); - } - - PeerInfo getPeerInfo() { - return peer_info; - } - - ContextAttribs getContextAttribs() { - return contextAttribs; - } - - static ContextGL getCurrentContext() { - return current_context_local.get(); - } - - ContextGL(long handle) { - this.peer_info = null; - this.contextAttribs = null; - this.forwardCompatible = false; - this.handle = handle; - System.out.println("LWJGL: ready-handle context created"); - } - - /** Create a context with the specified peer info and shared context */ - ContextGL(PeerInfo peer_info, ContextAttribs attribs, ContextGL shared_context) throws LWJGLException { - ContextGL context_lock = shared_context != null ? shared_context : this; - // If shared_context is not null, synchronize on it to make sure it is not deleted - // while this context is created. Otherwise, simply synchronize on ourself to avoid NPE - synchronized ( context_lock ) { - if ( shared_context != null && shared_context.destroyed ) - throw new IllegalArgumentException("Shared context is destroyed"); - - this.peer_info = peer_info; - this.contextAttribs = attribs; - - forwardCompatible = false; - long share = 0; - if(shared_context != null) { - share = shared_context.handle; - } - int width = Integer.parseInt(System.getProperty("window.width") == null ? "-1" : System.getProperty("window.width")); - int height = Integer.parseInt(System.getProperty("window.height") == null ? "-1" : System.getProperty("window.height")); - this.handle = GLFW.glfwCreateWindow(width, height, "Game", GLFW.glfwGetPrimaryMonitor(), share); - } - } - - /** Release the current context (if any). After this call, no context is current. */ - public void releaseCurrent() throws LWJGLException { - ContextGL current_context = getCurrentContext(); - if ( current_context != null ) { - GLFW.glfwMakeContextCurrent(0L); - isCurrent = false; - current_context_local.set(null); - synchronized ( current_context ) { - current_context.thread = null; - current_context.checkDestroy(); - } - } - } - - /** - * Release the context from its drawable. This is necessary on some platforms, - * like Mac OS X, where binding the context to a drawable and binding the context - * for rendering are two distinct actions and where calling releaseDrawable - * on every releaseCurrentContext results in artifacts. - */ - public synchronized void releaseDrawable() throws LWJGLException { - if ( destroyed ) - throw new IllegalStateException("Context is destroyed"); - } - - /** Update the context. Should be called whenever it's drawable is moved or resized */ - public synchronized void update() { - if ( destroyed ) - throw new IllegalStateException("Context is destroyed"); - } - - /** Swap the buffers on the current context. Only valid for double-buffered contexts */ - public static void swapBuffers() throws LWJGLException { - Display.swapBuffers(); - } - - private boolean canAccess() { - return thread == null || Thread.currentThread() == thread; - } - - private void checkAccess() { - if ( !canAccess() ) - throw new IllegalStateException("From thread " + Thread.currentThread() + ": " + thread + " already has the context current"); - } - - /** Make the context current */ - public synchronized void makeCurrent() throws LWJGLException { - checkAccess(); - if ( destroyed ) - throw new IllegalStateException("Context is destroyed"); - thread = Thread.currentThread(); - current_context_local.set(this); - GLFW.glfwMakeContextCurrent(handle); - GLContext.initCapabilities(); - isCurrent = true; - } - - ByteBuffer getHandle() { - return null; - } - - /** Query whether the context is current */ - public synchronized boolean isCurrent() throws LWJGLException { - if ( destroyed ) - throw new IllegalStateException("Context is destroyed"); - return isCurrent; - } - - private void checkDestroy() { - if ( !destroyed && destroy_requested ) { - try { - releaseDrawable(); - destroyed = true; - thread = null; - Display.destroy(); - } catch (LWJGLException e) { - LWJGLUtil.log("Exception occurred while destroying context: " + e); - } - } - } - - /** - * Set the buffer swap interval. This call is a best-attempt at changing - * the monitor swap interval, which is the minimum periodicity of color buffer swaps, - * measured in video frame periods, and is not guaranteed to be successful. - *

    - * A video frame period is the time required to display a full frame of video data. - */ - public static void setSwapInterval(int value) { - GLFW.glfwSwapInterval(value); - } - - /** - * Destroy the context. This method behaves the same as destroy() with the extra - * requirement that the context must be either current to the current thread or not - * current at all. - */ - public synchronized void forceDestroy() throws LWJGLException { - checkAccess(); - destroy(); - } - - /** - * Request destruction of the Context. If the context is current, no context will be current after this call. - * The context is destroyed when no thread has it current. - */ - public synchronized void destroy() throws LWJGLException { - if ( destroyed ) - return; - destroy_requested = true; - boolean was_current = isCurrent(); - int error = GL_NO_ERROR; - if ( was_current ) { - try { - // May fail on GLContext.getCapabilities() - error = glGetError(); - } catch (Exception e) { - // ignore - } - releaseCurrent(); - } - checkDestroy(); - if ( was_current && error != GL_NO_ERROR ) - throw new OpenGLException(error); - } - - public synchronized void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { - final ByteBuffer peer_handle = peer_info.lockAndGetHandle(); - try { - switch ( LWJGLUtil.getPlatform() ) { - - default: - throw new UnsupportedOperationException("CL/GL context sharing is not supported on this platform."); - } - } finally { - peer_info.unlock(); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/Display.java b/LWJGL/src/main/java/org/lwjgl/opengl/Display.java deleted file mode 100644 index b358188b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/Display.java +++ /dev/null @@ -1,1057 +0,0 @@ -package org.lwjgl.opengl; - -import static org.lwjgl.glfw.GLFW.GLFW_ACCUM_ALPHA_BITS; -import static org.lwjgl.glfw.GLFW.GLFW_ALPHA_BITS; -import static org.lwjgl.glfw.GLFW.GLFW_AUX_BUFFERS; -import static org.lwjgl.glfw.GLFW.GLFW_DEPTH_BITS; -import static org.lwjgl.glfw.GLFW.GLFW_OPENGL_DEBUG_CONTEXT; -import static org.lwjgl.glfw.GLFW.GLFW_RESIZABLE; -import static org.lwjgl.glfw.GLFW.GLFW_SAMPLES; -import static org.lwjgl.glfw.GLFW.GLFW_STENCIL_BITS; -import static org.lwjgl.glfw.GLFW.GLFW_VISIBLE; -import static org.lwjgl.glfw.GLFW.glfwCreateWindow; -import static org.lwjgl.glfw.GLFW.glfwDefaultWindowHints; -import static org.lwjgl.glfw.GLFW.glfwDestroyWindow; -import static org.lwjgl.glfw.GLFW.glfwGetCurrentContext; -import static org.lwjgl.glfw.GLFW.glfwGetFramebufferSize; -import static org.lwjgl.glfw.GLFW.glfwGetPrimaryMonitor; -import static org.lwjgl.glfw.GLFW.glfwGetVideoMode; -import static org.lwjgl.glfw.GLFW.glfwGetWindowSize; -import static org.lwjgl.glfw.GLFW.glfwMakeContextCurrent; -import static org.lwjgl.glfw.GLFW.glfwPollEvents; -import static org.lwjgl.glfw.GLFW.glfwSetCharCallback; -import static org.lwjgl.glfw.GLFW.glfwSetCursorEnterCallback; -import static org.lwjgl.glfw.GLFW.glfwSetCursorPosCallback; -import static org.lwjgl.glfw.GLFW.glfwSetFramebufferSizeCallback; -import static org.lwjgl.glfw.GLFW.glfwSetKeyCallback; -import static org.lwjgl.glfw.GLFW.glfwSetMouseButtonCallback; -import static org.lwjgl.glfw.GLFW.glfwSetScrollCallback; -import static org.lwjgl.glfw.GLFW.glfwSetWindowFocusCallback; -import static org.lwjgl.glfw.GLFW.glfwSetWindowIcon; -import static org.lwjgl.glfw.GLFW.glfwSetWindowIconifyCallback; -import static org.lwjgl.glfw.GLFW.glfwSetWindowPos; -import static org.lwjgl.glfw.GLFW.glfwSetWindowPosCallback; -import static org.lwjgl.glfw.GLFW.glfwSetWindowRefreshCallback; -import static org.lwjgl.glfw.GLFW.glfwSetWindowSizeCallback; -import static org.lwjgl.glfw.GLFW.glfwShowWindow; -import static org.lwjgl.glfw.GLFW.glfwSwapBuffers; -import static org.lwjgl.glfw.GLFW.glfwSwapInterval; -import static org.lwjgl.glfw.GLFW.glfwWindowHint; -import static org.lwjgl.glfw.GLFW.glfwWindowShouldClose; -import static org.lwjgl.opengl.GL11.GL_FALSE; -import static org.lwjgl.opengl.GL11.GL_TRUE; -import static org.lwjgl.system.MemoryUtil.NULL; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.Sys; -import org.lwjgl.glfw.Callbacks; -import org.lwjgl.glfw.GLFW; -import org.lwjgl.glfw.GLFWCharCallback; -import org.lwjgl.glfw.GLFWCursorEnterCallback; -import org.lwjgl.glfw.GLFWCursorPosCallback; -import org.lwjgl.glfw.GLFWFramebufferSizeCallback; -import org.lwjgl.glfw.GLFWImage; -import org.lwjgl.glfw.GLFWKeyCallback; -import org.lwjgl.glfw.GLFWMouseButtonCallback; -import org.lwjgl.glfw.GLFWScrollCallback; -import org.lwjgl.glfw.GLFWVidMode; -import org.lwjgl.glfw.GLFWWindowFocusCallback; -import org.lwjgl.glfw.GLFWWindowIconifyCallback; -import org.lwjgl.glfw.GLFWWindowPosCallback; -import org.lwjgl.glfw.GLFWWindowRefreshCallback; -import org.lwjgl.glfw.GLFWWindowSizeCallback; -import org.lwjgl.input.Cursor; -import org.lwjgl.input.GLFWInputImplementation; -import org.lwjgl.input.KeyCodes; -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; -import org.lwjgl.system.MemoryUtil; - -import java.awt.Canvas; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -public class Display { - - private static String windowTitle = "Game"; - - private static GLContext context; - - private static DisplayImplementation display_impl; - - private static boolean displayCreated = false; - private static boolean displayFocused = true; - private static boolean displayVisible = true; - private static boolean displayDirty = false; - private static boolean displayResizable = false; - - private static DisplayMode mode, desktopDisplayMode; - - private static int latestEventKey = 0; - - private static int displayX = -1; - private static int displayY = -1; - - private static boolean displayResized = false; - private static int displayWidth = 0; - private static int displayHeight = 0; - private static int displayFramebufferWidth = 0; - private static int displayFramebufferHeight = 0; - - private static boolean latestResized = false; - private static int latestWidth = 0; - private static int latestHeight = 0; - - private static boolean vsyncEnabled = false; - private static boolean displayFullscreen = true; - private static float fps; - - private static boolean window_created; - - /** The Drawable instance that tracks the current Display context */ - private static volatile DrawableLWJGL drawable = null; - - private static Canvas parent; - - private static GLFWImage.Buffer icons; - - private static int swap_interval; - - static { - Sys.initialize(); // init using dummy sys method - - long monitor = glfwGetPrimaryMonitor(); - GLFWVidMode vidmode = glfwGetVideoMode(monitor); - - int monitorWidth = displayWidth = displayFramebufferWidth = vidmode.width(); - int monitorHeight = displayHeight = displayFramebufferHeight = vidmode.height(); - int monitorBitPerPixel = vidmode.redBits() + vidmode.greenBits() + vidmode.blueBits(); - int monitorRefreshRate = vidmode.refreshRate(); - - mode = desktopDisplayMode = new DisplayMode(monitorWidth, monitorHeight, monitorBitPerPixel, monitorRefreshRate); - LWJGLUtil.log("Initial mode: " + desktopDisplayMode); - } - - public static void setSwapInterval(int value) { - synchronized ( GlobalLock.lock ) { - swap_interval = value; - if ( isCreated() ) { - drawable.setSwapInterval(swap_interval); - } - } - } - - private static void makeCurrentAndSetSwapInterval() throws LWJGLException { - makeCurrent(); - try { - drawable.checkGLError(); - } catch (OpenGLException e) { - LWJGLUtil.log("OpenGL error during context creation: " + e.getMessage()); - } - setSwapInterval(swap_interval); - } - - private static void initContext() { - drawable.initContext(0, 0, 0); - update(); - } - - private static void initControls() { - // Automatically create mouse, keyboard and controller - if ( true ) { - if ( !Mouse.isCreated() ) { - try { - Mouse.create(); - } catch (LWJGLException e) { - if ( LWJGLUtil.DEBUG ) { - e.printStackTrace(System.err); - } else { - LWJGLUtil.log("Failed to create Mouse: " + e); - } - } - } - if ( !Keyboard.isCreated() ) { - try { - Keyboard.create(); - } catch (LWJGLException e) { - if ( LWJGLUtil.DEBUG ) { - e.printStackTrace(System.err); - } else { - LWJGLUtil.log("Failed to create Keyboard: " + e); - } - } - } - } - } - - private static void releaseDrawable() { - try { - Context context = drawable.getContext(); - if ( context != null && context.isCurrent() ) { - context.releaseCurrent(); - context.releaseDrawable(); - } - } catch (LWJGLException e) { - LWJGLUtil.log("Exception occurred while trying to release context: " + e); - } - } - - private static void destroyWindow() { - if ( !window_created ) { - return; - } - releaseDrawable(); - - // Automatically destroy keyboard & mouse - if ( Mouse.isCreated() ) { - Mouse.destroy(); - } - if ( Keyboard.isCreated() ) { - Keyboard.destroy(); - } - display_impl.destroyWindow(); - window_created = false; - } - - private static void reset() { - display_impl.resetDisplayMode(); - } - - private static void createWindow() throws LWJGLException { - if ( window_created ) { - return; - } - DisplayMode mode = Display.getDisplayMode(); - display_impl.createWindow(drawable, mode, null, 0, 0 /* getWindowX(), getWindowY() */); - window_created = true; - - displayWidth = mode.getWidth(); - displayHeight = mode.getHeight(); - - initControls(); - - setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon32x32, LWJGLUtil.LWJGLIcon16x16 }); - } - - public static void create(PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException { - create(pixel_format); - - try { - drawable.setPixelFormat(pixel_format, null); - try { - createWindow(); - try { - ((DrawableGL) drawable).context = new ContextGL(((DrawableGL) drawable).peer_info, null /* attribs */, shared_drawable != null ? ((DrawableGL) shared_drawable).getContext() : null); - try { - makeCurrentAndSetSwapInterval(); - initContext(); - } catch (LWJGLException e) { - // drawable.destroy(); - throw e; - } - } catch (LWJGLException e) { - destroyWindow(); - throw e; - } - } catch (LWJGLException e) { - drawable.destroy(); - throw e; - } - } catch (LWJGLException e) { - display_impl.resetDisplayMode(); - throw e; - } - } - - public static void create(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { - create(pixel_format); - } - - public static void create(PixelFormat format) throws LWJGLException { - glfwWindowHint(GLFW_ACCUM_ALPHA_BITS, format.getAccumulationBitsPerPixel()); - glfwWindowHint(GLFW_ALPHA_BITS, format.getAlphaBits()); - glfwWindowHint(GLFW_AUX_BUFFERS, format.getAuxBuffers()); - glfwWindowHint(GLFW_DEPTH_BITS, format.getDepthBits()); - glfwWindowHint(GLFW_SAMPLES, format.getSamples()); - glfwWindowHint(GLFW_STENCIL_BITS, format.getStencilBits()); - create(); - } - - private static boolean isCreated = false; - public static void create() throws LWJGLException { - if (isCreated) return; - else isCreated = true; - - if (Window.handle != MemoryUtil.NULL) - glfwDestroyWindow(Window.handle); - - long monitor = glfwGetPrimaryMonitor(); - GLFWVidMode vidmode = glfwGetVideoMode(monitor); - - int monitorWidth = vidmode.width(); - int monitorHeight = vidmode.height(); - int monitorBitPerPixel = vidmode.redBits() + vidmode.greenBits() + vidmode.blueBits(); - int monitorRefreshRate = vidmode.refreshRate(); - - desktopDisplayMode = new DisplayMode(monitorWidth, monitorHeight, monitorBitPerPixel, monitorRefreshRate); - - glfwDefaultWindowHints(); - glfwWindowHint(GLFW_VISIBLE, GL_FALSE); - glfwWindowHint(GLFW_RESIZABLE, displayResizable ? GL_TRUE : GL_FALSE); - glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); - - Window.handle = glfwCreateWindow(mode.getWidth(), mode.getHeight(), windowTitle, NULL, NULL); - if (Window.handle == NULL) - throw new LWJGLException("Failed to create Display window"); - - Window.keyCallback = new GLFWKeyCallback() { - @Override - public void invoke(long window, int key, int scancode, int action, int mods) { - latestEventKey = key; - GLFWInputImplementation.singleton.putKeyboardEvent(KeyCodes.toLwjglKey(key), (byte) action, 0, Sys.getNanoTime(), false); - } - }; - - Window.charCallback = new GLFWCharCallback() { - @Override - public void invoke(long window, int codepoint) { - GLFWInputImplementation.singleton.putKeyboardEvent(0, (byte) 1, codepoint, Sys.getNanoTime(), false); - } - }; - - Window.cursorEnterCallback = new GLFWCursorEnterCallback() { - @Override - public void invoke(long window, boolean entered) { - - } - }; - - Window.cursorPosCallback = new GLFWCursorPosCallback() { - @Override - public void invoke(long window, double xpos, double ypos) { - GLFWInputImplementation.singleton.putMouseEventWithCoords((byte) -1, (byte) 0, (int) xpos, (int) ((ypos - Display.getHeight()) * -1), 0, Sys.getNanoTime()); - } - }; - - Window.mouseButtonCallback = new GLFWMouseButtonCallback() { - @Override - public void invoke(long window, int button, int action, int mods) { - GLFWInputImplementation.singleton.putMouseEventWithCoords((byte) button, (byte) action, -1, -1, 0, Sys.getNanoTime()); - } - }; - - Window.windowFocusCallback = new GLFWWindowFocusCallback() { - @Override - public void invoke(long window, boolean focused) { - displayFocused = focused; - } - }; - - Window.windowIconifyCallback = new GLFWWindowIconifyCallback() { - @Override - public void invoke(long window, boolean iconified) { - displayVisible = !iconified; - } - }; - - Window.windowSizeCallback = new GLFWWindowSizeCallback() { - @Override - public void invoke(long window, int width, int height) { - latestResized = true; - latestWidth = width; - latestHeight = height; - - if (parent != null) - parent.setSize(width, height); - } - }; - - Window.windowPosCallback = new GLFWWindowPosCallback() { - @Override - public void invoke(long window, int xpos, int ypos) { - displayX = xpos; - displayY = ypos; - } - }; - - Window.windowRefreshCallback = new GLFWWindowRefreshCallback() { - @Override - public void invoke(long window) { - displayDirty = true; - } - }; - - Window.framebufferSizeCallback = new GLFWFramebufferSizeCallback() { - @Override - public void invoke(long window, int width, int height) { - displayFramebufferWidth = width; - displayFramebufferHeight = height; - } - }; - - Window.scrollCallback = new GLFWScrollCallback() { - @Override - public void invoke(long window, double xoffset, double yoffset) { - GLFWInputImplementation.singleton.putMouseEventWithCoords((byte) -1, (byte) 0, -1, -1, (int) (yoffset * 120), Sys.getNanoTime()); - } - }; - - Window.setCallbacks(); - - displayWidth = mode.getWidth(); - displayHeight = mode.getHeight(); - - IntBuffer fbw = BufferUtils.createIntBuffer(1); - IntBuffer fbh = BufferUtils.createIntBuffer(1); - glfwGetFramebufferSize(Window.handle, fbw, fbh); - displayFramebufferWidth = fbw.get(0); - displayFramebufferHeight = fbh.get(0); - - glfwSetWindowPos(Window.handle, (monitorWidth - mode.getWidth()) / 2, (monitorHeight - mode.getHeight()) / 2); - - if (displayX == -1) { - displayX = (monitorWidth - mode.getWidth()) / 2; - } - - if (displayY == -1) { - displayY = (monitorHeight - mode.getHeight()) / 2; - } - - final DrawableGL drawable = new DrawableGL() { - public void destroy() { - synchronized ( GlobalLock.lock ) { - if ( !isCreated() ) - return; - - releaseDrawable(); - super.destroy(); - destroyWindow(); - reset(); - } - } - }; - drawable.context = new ContextGL(Window.handle); - drawable.context.makeCurrent(); - Display.drawable = drawable; - context = GLContext.createFromCurrent(); - - glfwShowWindow(Window.handle); - if (parent != null) - parent.setSize(displayWidth, displayHeight); - Mouse.create(); - Keyboard.create(); - - display_impl = new DisplayImplementation() { - - @Override - public void setNativeCursor(Object handle) throws LWJGLException { - try { - Mouse.setNativeCursor((Cursor) handle); - } catch (ClassCastException e) { - throw new LWJGLException("Handle is not an instance of cursor"); - } - } - - @Override - public void setCursorPosition(int x, int y) { - Mouse.setCursorPosition(x, y); - } - - @Override - public void readMouse(ByteBuffer buffer) { - - } - - @Override - public void readKeyboard(ByteBuffer buffer) { - - } - - @Override - public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) { - - } - - @Override - public void pollKeyboard(ByteBuffer keyDownBuffer) { - - } - - @Override - public boolean isInsideWindow() { - return false; - } - - @Override - public boolean hasWheel() { - return false; - } - - @Override - public void grabMouse(boolean grab) { - Mouse.setGrabbed(grab); - } - - @Override - public int getNativeCursorCapabilities() { - return 0; - } - - @Override - public int getMinCursorSize() { - return 0; - } - - @Override - public int getMaxCursorSize() { - return 0; - } - - @Override - public int getButtonCount() { - return 0; - } - - @Override - public void destroyMouse() { - - } - - @Override - public void destroyKeyboard() { - - } - - @Override - public void destroyCursor(Object cursor_handle) { - - } - - @Override - public void createMouse() throws LWJGLException { - - } - - @Override - public void createKeyboard() throws LWJGLException { - - } - - @Override - public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { - return null; - } - - @Override - public boolean wasResized() { - return false; - } - - @Override - public void update() { - Display.update(); - } - - @Override - public void switchDisplayMode(DisplayMode mode) throws LWJGLException { - Display.setDisplayMode(mode); - } - - @Override - public void setTitle(String title) { - windowTitle = title; - } - - @Override - public void setResizable(boolean resizable) { - Display.setResizable(resizable); - } - - @Override - public void setPbufferAttrib(PeerInfo handle, int attrib, int value) { - - } - - @Override - public int setIcon(ByteBuffer[] icons) { - Display.setIcon(icons); - return 0; - } - - @Override - public void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException { - - } - - @Override - public void reshape(int x, int y, int width, int height) { - - } - - @Override - public void resetDisplayMode() { - try { - Display.setDisplayMode(desktopDisplayMode); - } catch (LWJGLException e) { - e.printStackTrace(); - } - } - - @Override - public void releaseTexImageFromPbuffer(PeerInfo handle, int buffer) { - - } - - @Override - public boolean isVisible() { - return Display.displayVisible; - } - - @Override - public boolean isDirty() { - return Display.displayDirty; - } - - @Override - public boolean isCloseRequested() { - return GLFW.glfwWindowShouldClose(Window.handle); - } - - @Override - public boolean isBufferLost(PeerInfo handle) { - return false; - } - - @Override - public boolean isActive() { - return Display.displayFocused; - } - - @Override - public DisplayMode init() throws LWJGLException { - return desktopDisplayMode; - } - - @Override - public int getY() { - return Display.displayY; - } - - @Override - public int getX() { - return Display.displayX; - } - - @Override - public int getWidth() { - return Display.latestWidth; - } - - @Override - public String getVersion() { - return Sys.getVersion(); - } - - @Override - public float getPixelScaleFactor() { - return 0; - } - - @Override - public int getPbufferCapabilities() { - return 0; - } - - @Override - public int getHeight() { - return Display.latestHeight; - } - - @Override - public int getGammaRampLength() { - return 0; - } - - @Override - public DisplayMode[] getAvailableDisplayModes() throws LWJGLException { - return Display.getAvailableDisplayModes(); - } - - @Override - public String getAdapter() { - return Display.getAdapter(); - } - - @Override - public void destroyWindow() { - Display.destroy(); - } - - @Override - public void createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException { - - } - - @Override - public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { - return null; - } - - @Override - public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException { - return null; - } - - @Override - public void bindTexImageToPbuffer(PeerInfo handle, int buffer) { - - } - }; - - - displayCreated = true; - - } - - public static boolean isCreated() { - return true; - } - - public static boolean isActive() { - return displayFocused; - } - - public static boolean isVisible() { - return displayVisible; - } - - public static GLContext getContext() { - return context; - } - - public static void setLocation(int new_x, int new_y) { - if (Window.handle == 0L) { - Display.displayX = new_x; - Display.displayY = new_y; - } else { - GLFW.glfwSetWindowPos(Window.handle, new_x, new_y); - } - } - - public static void setVSyncEnabled(boolean sync) { - vsyncEnabled = sync; - glfwSwapInterval(vsyncEnabled ? 1 : 0); - } - - public static long getWindow() { - return Window.handle; - } - - public static void update() { - update(true); - } - - public static void update(boolean processMessages) { - try { - swapBuffers(); - displayDirty = false; - - } catch (LWJGLException e) { - throw new RuntimeException(e); - } - - if (processMessages) - processMessages(); - } - - public static void processMessages() { - glfwPollEvents(); - Keyboard.poll(); - Mouse.poll(); - - if (latestResized) { - latestResized = false; - displayResized = true; - displayWidth = latestWidth; - displayHeight = latestHeight; - } else { - displayResized = false; - } - } - - /** Return the last parent set with setParent(). */ - public static Canvas getParent() { - return parent; - } - - /** - * Set the parent of the Display. If parent is null, the Display will appear as a top level window. - * If parent is not null, the Display is made a child of the parent. A parent's isDisplayable() must be true when - * setParent() is called and remain true until setParent() is called again with - * null or a different parent. This generally means that the parent component must remain added to it's parent container.

    - * It is not advisable to call this method from an AWT thread, since the context will be made current on the thread - * and it is difficult to predict which AWT thread will process any given AWT event.

    - * While the Display is in fullscreen mode, the current parent will be ignored. Additionally, when a non null parent is specified, - * the Dispaly will inherit the size of the parent, disregarding the currently set display mode.

    - */ - public static void setParent(Canvas parent) throws LWJGLException { - if ( Display.parent != parent ) { - Display.parent = parent; - } - } - - public static void swapBuffers() throws LWJGLException { - glfwSwapBuffers(Window.handle); - } - - public static void destroy() { - Window.releaseCallbacks(); - glfwDestroyWindow(Window.handle); - - displayCreated = false; - } - - public static void setDisplayMode(DisplayMode dm) throws LWJGLException { - mode = dm; - if(isCreated) GLFW.glfwSetWindowSize(Window.handle, dm.getWidth(), dm.getHeight()); - } - - public static DisplayMode getDisplayMode() { - return mode; - } - - public static DisplayMode[] getAvailableDisplayModes() throws LWJGLException { - GLFWVidMode.Buffer modes = GLFW.glfwGetVideoModes(org.lwjgl.glfw.GLFW.glfwGetPrimaryMonitor()); - - DisplayMode[] displayModes = new DisplayMode[modes.capacity()]; - - for (int i = 0; i < modes.capacity(); i++) { - modes.position(i); - - int w = modes.width(); - int h = modes.height(); - int b = modes.redBits() + modes.greenBits() + modes.blueBits(); - int r = modes.refreshRate(); - - displayModes[i] = new DisplayMode(w, h, b, r); - } - - return displayModes; - } - - public static DisplayMode getDesktopDisplayMode() { - long mon = GLFW.glfwGetPrimaryMonitor(); - GLFWVidMode mode = GLFW.glfwGetVideoMode(mon); - return new DisplayMode(mode.width(), mode.height(), mode.redBits() + mode.greenBits() + mode.blueBits(), mode.refreshRate()); - } - - public static boolean wasResized() { - return displayResized; - } - - public static int getX() { - return displayX; - } - - public static int getY() { - return displayY; - } - - public static int getWidth() { - return displayWidth; - } - - public static int getHeight() { - return displayHeight; - } - - public static int getFramebufferWidth() { - return displayFramebufferWidth; - } - - public static int getFramebufferHeight() { - return displayFramebufferHeight; - } - - public static void setTitle(String title) { - windowTitle = title; - } - - public static String getTitle() { return windowTitle; } - - public static boolean isCloseRequested() { - return glfwWindowShouldClose(Window.handle); - } - - public static boolean isDirty() { - return displayDirty; - } - - public static void setInitialBackground(float red, float green, float blue) { - if (Window.handle != MemoryUtil.NULL) { - GL11.glClearColor(red, green, blue, 1f); - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); - } - } - - public static int setIcon(ByteBuffer[] icons) { - return 0; - } - - public static void setResizable(boolean resizable) { - //displayResizable = resizable; - if (displayResizable ^ resizable) { - if (Window.handle != 0) { - IntBuffer width = BufferUtils.createIntBuffer(1); - IntBuffer height = BufferUtils.createIntBuffer(1); - GLFW.glfwGetWindowSize(Window.handle, width, height); - width.rewind(); - height.rewind(); - - GLFW.glfwDefaultWindowHints(); - glfwWindowHint(GLFW_VISIBLE, displayVisible ? GL_TRUE : GL_FALSE); - glfwWindowHint(GLFW_RESIZABLE, displayResizable ? GL_TRUE : GL_FALSE); - glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); - - GLFW.glfwSetWindowSize(Window.handle, width.get(), height.get()); - } - } - displayResizable = resizable; - } - - public static boolean isResizable() { - return displayResizable; - } - - public static void setDisplayModeAndFullscreen(DisplayMode dm) throws LWJGLException { - if(Window.handle != 0) { - Display.mode = dm; - GLFW.glfwSetWindowSize(Window.handle, dm.getWidth(), dm.getHeight()); - } - } - - public static void setFullscreen(boolean fullscreen) throws LWJGLException { - System.out.println("LWJGL: switch fullscreen to " + fullscreen); - if (isFullscreen() ^ fullscreen) { - if (fullscreen && (!mode.isFullscreenCapable())) - throw new LWJGLException("Display mode is not fullscreen capable"); - if (Window.handle != 0) { - IntBuffer width = BufferUtils.createIntBuffer(1); - IntBuffer height = BufferUtils.createIntBuffer(1); - glfwGetWindowSize(Window.handle, width, height); - width.rewind(); - height.rewind(); - - glfwDefaultWindowHints(); - glfwWindowHint(GLFW_VISIBLE, displayVisible ? GL_TRUE : GL_FALSE); - glfwWindowHint(GLFW_RESIZABLE, displayResizable ? GL_TRUE : GL_FALSE); - glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); - - GLFW.glfwSetWindowSize(Window.handle, width.get(), height.get()); - } - } - displayFullscreen = fullscreen; - } - - public static boolean isFullscreen() { - return displayFullscreen; - } - - public static void releaseContext() throws LWJGLException { - glfwMakeContextCurrent(0); - } - - public static boolean isCurrent() throws LWJGLException { - return glfwGetCurrentContext() == Window.handle; - } - - public static void makeCurrent() throws LWJGLException { - if (!isCurrent()) { - // glfwMakeContextCurrent(Window.handle); - } - } - - public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLException { - - } - - public static String getAdapter() { - return "GeNotSupportedAdapter"; - } - - public static String getVersion() { - return "1.0 NOT SUPPORTED"; - } - - /** - * 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 - */ - public static void sync(int fps) { - Sync.sync(fps); - } - - public static Drawable getDrawable() { - return drawable; - } - - static DisplayImplementation getImplementation() { - return display_impl; - } - - static class Window { - static long handle; - - static GLFWKeyCallback keyCallback; - static GLFWCharCallback charCallback; - static GLFWCursorEnterCallback cursorEnterCallback; - static GLFWCursorPosCallback cursorPosCallback; - static GLFWMouseButtonCallback mouseButtonCallback; - static GLFWWindowFocusCallback windowFocusCallback; - static GLFWWindowIconifyCallback windowIconifyCallback; - static GLFWWindowSizeCallback windowSizeCallback; - static GLFWWindowPosCallback windowPosCallback; - static GLFWWindowRefreshCallback windowRefreshCallback; - static GLFWFramebufferSizeCallback framebufferSizeCallback; - static GLFWScrollCallback scrollCallback; - - public static void setCallbacks() { - glfwSetKeyCallback(handle, keyCallback); - glfwSetCharCallback(handle, charCallback); - glfwSetCursorEnterCallback(handle, cursorEnterCallback); - glfwSetCursorPosCallback(handle, cursorPosCallback); - glfwSetMouseButtonCallback(handle, mouseButtonCallback); - glfwSetWindowFocusCallback(handle, windowFocusCallback); - glfwSetWindowIconifyCallback(handle, windowIconifyCallback); - glfwSetWindowSizeCallback(handle, windowSizeCallback); - glfwSetWindowPosCallback(handle, windowPosCallback); - glfwSetWindowRefreshCallback(handle, windowRefreshCallback); - glfwSetFramebufferSizeCallback(handle, framebufferSizeCallback); - glfwSetScrollCallback(handle, scrollCallback); - } - - public static void releaseCallbacks() { - Callbacks.glfwFreeCallbacks(handle); - keyCallback = null; - charCallback = null; - cursorEnterCallback = null; - cursorPosCallback = null; - mouseButtonCallback = null; - windowFocusCallback = null; - windowIconifyCallback = null; - windowSizeCallback = null; - windowPosCallback = null; - windowRefreshCallback = null; - framebufferSizeCallback = null; - scrollCallback = null; - System.gc(); - } - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/DisplayImplementation.java b/LWJGL/src/main/java/org/lwjgl/opengl/DisplayImplementation.java deleted file mode 100644 index e0df5e4f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/DisplayImplementation.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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.opengl; - -/** - * 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 org.lwjgl.LWJGLException; - -import java.awt.Canvas; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -interface DisplayImplementation extends InputImplementation { - - void createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException; - - void destroyWindow(); - - void switchDisplayMode(DisplayMode mode) throws LWJGLException; - - /** - * 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 each gamma ramp array, or 0 if gamma settings are unsupported. - */ - int getGammaRampLength(); - - /** - * Method to set the gamma ramp. - */ - 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. - * @return a String - */ - String getAdapter(); - - /** - * 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(); - - /** - * Initialize and return the current display mode. - */ - 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. - */ - void setTitle(String title); - - boolean isCloseRequested(); - - boolean isVisible(); - boolean isActive(); - - boolean isDirty(); - - /** - * Create the native PeerInfo. - * @throws LWJGLException - */ - PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException; - -// 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. - */ - void update(); - - void reshape(int x, int y, int width, int height); - - /** - * Method for getting displaymodes - */ - DisplayMode[] getAvailableDisplayModes() throws LWJGLException; - - /* Pbuffer */ - int getPbufferCapabilities(); - - /** - * Method to test for buffer integrity - */ - boolean isBufferLost(PeerInfo handle); - - /** - * Method to create a Pbuffer - */ - 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); - - void bindTexImageToPbuffer(PeerInfo handle, int buffer); - - void releaseTexImageFromPbuffer(PeerInfo handle, int buffer); - - /** - * Sets one or more icons for the Display. - *

      - *
    • On Windows you should supply at least one 16x16 icon and one 32x32.
    • - *
    • 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. - * - * @param icons Array of icons in RGBA mode - * @return number of icons used. - */ - int setIcon(ByteBuffer[] icons); - - /** - * 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. - */ - void setResizable(boolean resizable); - - /** - * @return true if the Display window has been resized since this method was last called. - */ - boolean wasResized(); - - /** - * @return this method will return the width of the Display window. - */ - int getWidth(); - - /** - * @return this method will return the height of the Display window. - */ - int getHeight(); - - /** - * @return this method will return the top-left x position of the Display window. - */ - int getX(); - - /** - * @return this method will return the top-left y position of the Display window. - */ - int getY(); - - /** - * @return this method will return the pixel scale factor of the Display window useful for high resolution modes. - */ - float getPixelScaleFactor(); -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/DisplayMode.java b/LWJGL/src/main/java/org/lwjgl/opengl/DisplayMode.java deleted file mode 100644 index c3a34202..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/DisplayMode.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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.opengl; - -/** - * - * 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$ - */ - -public final class DisplayMode { - - /** properties of the display mode */ - private final int width, height, bpp, freq; - /** If true, this instance can be used for fullscreen modes */ - 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(). - * - * @param width The Display width. - * @param height The Display height. - * @see Display - */ - public DisplayMode(int width, int height) { - this(width, height, 0, 0, false); - } - - DisplayMode(int width, int height, int bpp, int freq) { - this(width, height, bpp, freq, true); - } - - private DisplayMode(int width, int height, int bpp, int freq, boolean fullscreen) { - width = Integer.parseInt(System.getProperty("window.width") == null ? "-1" : System.getProperty("window.width")); - height = Integer.parseInt(System.getProperty("window.height") == null ? "-1" : System.getProperty("window.height")); - this.width = width; - this.height = height; - this.bpp = bpp; - this.freq = freq; - this.fullscreen = false; - } - - /** True if this instance can be used for fullscreen modes */ - public boolean isFullscreenCapable() { - return fullscreen; - } - - public int getWidth() { - return width; - } - - public int getHeight() { - return height; - } - - public int getBitsPerPixel() { - return bpp; - } - - public int getFrequency() { - return freq; - } - - /** - * Tests for DisplayMode equality - * - * @see Object#equals(Object) - */ - public boolean equals(Object obj) { - if (obj == null || !(obj instanceof DisplayMode)) { - return false; - } - - DisplayMode dm = (DisplayMode) obj; - return dm.width == width - && dm.height == height - && dm.bpp == bpp - && dm.freq == freq; - } - - /** - * Retrieves the hashcode for this object - * - * @see Object#hashCode() - */ - public int hashCode() { - return width ^ height ^ freq ^ bpp; - } - - /** - * Retrieves a String representation of this DisplayMode - * - * @see Object#toString() - */ - public String toString() { - StringBuilder sb = new StringBuilder(32); - sb.append(width); - sb.append(" x "); - sb.append(height); - sb.append(" x "); - sb.append(bpp); - sb.append(" @"); - sb.append(freq); - sb.append("Hz"); - return sb.toString(); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/Drawable.java b/LWJGL/src/main/java/org/lwjgl/opengl/Drawable.java deleted file mode 100644 index d5fdc4b8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/Drawable.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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.opengl; - -import org.lwjgl.LWJGLException; -import org.lwjgl.PointerBuffer; - -/** - * The Drawable interface describes an OpenGL drawable with an associated - * Context. - * - * @author elias_naur - */ - -public interface Drawable { - - /** Returns true if the Drawable's context is current in the current thread. */ - boolean isCurrent() throws LWJGLException; - - /** - * Makes the Drawable's context current in the current thread. - * - * @throws LWJGLException - */ - 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. - * - * @throws LWJGLException - */ - void releaseContext() throws LWJGLException; - - /** Destroys the 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. - * - * @param properties The target properties buffer. It must have at least 4 positions remaining. - */ - void setCLSharingProperties(PointerBuffer properties) throws LWJGLException; - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/DrawableGL.java b/LWJGL/src/main/java/org/lwjgl/opengl/DrawableGL.java deleted file mode 100644 index dc904cdf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/DrawableGL.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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.lwjgl.opengl; - -import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT; -import static org.lwjgl.opengl.GL11.glClear; -import static org.lwjgl.opengl.GL11.glClearColor; - -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.PointerBuffer; - -/** @author Spasi */ -abstract class DrawableGL implements DrawableLWJGL { - - /** The PixelFormat used to create the drawable. */ - protected PixelFormat pixel_format; - - /** Handle to the native GL rendering context */ - protected PeerInfo peer_info; - - /** The OpenGL Context. */ - protected ContextGL context; - - protected DrawableGL() { - } - - public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException { - throw new UnsupportedOperationException(); - } - - public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException { - this.pixel_format = (PixelFormat)pf; - this.peer_info = Display.getImplementation().createPeerInfo(pixel_format, attribs); - } - - public PixelFormatLWJGL getPixelFormat() { - return pixel_format; - } - - public ContextGL getContext() { - synchronized ( GlobalLock.lock ) { - return context; - } - } - - public ContextGL createSharedContext() throws LWJGLException { - synchronized ( GlobalLock.lock ) { - checkDestroyed(); - return new ContextGL(peer_info, context.getContextAttribs(), context); - } - } - - public void checkGLError() { - Util.checkGLError(); - } - - public void setSwapInterval(final int swap_interval) { - ContextGL.setSwapInterval(swap_interval); - } - - public void swapBuffers() throws LWJGLException { - ContextGL.swapBuffers(); - } - - public void initContext(final float r, final float g, final float b) { - // set background clear color - glClearColor(r, g, b, 0.0f); - // Clear window to avoid the desktop "showing through" - glClear(GL_COLOR_BUFFER_BIT); - } - - public boolean isCurrent() throws LWJGLException { - synchronized ( GlobalLock.lock ) { - checkDestroyed(); - return context.isCurrent(); - } - } - - public void makeCurrent() throws LWJGLException { - synchronized ( GlobalLock.lock ) { - checkDestroyed(); - context.makeCurrent(); - } - } - - public void releaseContext() throws LWJGLException { - synchronized ( GlobalLock.lock ) { - checkDestroyed(); - if ( context.isCurrent() ) - context.releaseCurrent(); - } - } - - public void destroy() { - synchronized ( GlobalLock.lock ) { - if ( context == null ) - return; - - try { - releaseContext(); - - context.forceDestroy(); - context = null; - - if ( peer_info != null ) { - peer_info.destroy(); - peer_info = null; - } - } catch (LWJGLException e) { - LWJGLUtil.log("Exception occurred while destroying Drawable: " + e); - } - } - } - - public void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { - synchronized ( GlobalLock.lock ) { - checkDestroyed(); - context.setCLSharingProperties(properties); - } - } - - protected final void checkDestroyed() { - if ( context == null ) - throw new IllegalStateException("The Drawable has no context available."); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/DrawableLWJGL.java b/LWJGL/src/main/java/org/lwjgl/opengl/DrawableLWJGL.java deleted file mode 100644 index e4d989df..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/DrawableLWJGL.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.lwjgl.opengl; - -import org.lwjgl.LWJGLException; - -/** - * [INTERNAL USE ONLY] - * - * @author Spasi - */ -interface DrawableLWJGL extends Drawable { - - void setPixelFormat(PixelFormatLWJGL pf) throws LWJGLException; - - void setPixelFormat(PixelFormatLWJGL pf, ContextAttribs attribs) throws LWJGLException; - - PixelFormatLWJGL getPixelFormat(); - - /** - * [INTERNAL USE ONLY] Returns the Drawable's Context. - * - * @return the Drawable's Context - */ - Context getContext(); - - /** - * [INTERNAL USE ONLY] Creates a new Context that is shared with the Drawable's Context. - * - * @return a Context shared with the Drawable's Context. - */ - Context createSharedContext() throws LWJGLException; - - void checkGLError(); - - void setSwapInterval(int swap_interval); - - void swapBuffers() throws LWJGLException; - - void initContext(final float r, final float g, final float b); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXT422Pixels.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXT422Pixels.java deleted file mode 100644 index e7d6ad96..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXT422Pixels.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_422_pixels extension. - * - *

    This extension provides support for converting 422 pixels in host memory to 444 pixels as part of the pixel storage operation.

    - * - *

    The pixel unpack storage operation treats a 422 pixel as a 2 element format where the first element is C (chrominance) and the second element is L - * (luminance). Luminance is present on all pixels; a full chrominance value requires two pixels.

    - * - *

    The pixel pack storage operation converts RGB to a 422 pixel defined as a 2 element format where the first element stored is C (chrominance) and the - * second element stored is L (luminance). Luminance is present on all pixels; a full chrominance value requires two pixels.

    - * - *

    Both averaging and non-averaging is supported for green and blue assignments for pack and unpack operations.

    - */ -public final class EXT422Pixels { - - /** - * Accepted by the {@code format} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * SeparableFilter3D, GetSeparableFilter, ColorTable, and GetColorTable. - */ - public static final int - GL_422_EXT = 0x80CC, - GL_422_REV_EXT = 0x80CD, - GL_422_AVERAGE_EXT = 0x80CE, - GL_422_REV_AVERAGE_EXT = 0x80CF; - - private EXT422Pixels() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTABGR.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTABGR.java deleted file mode 100644 index c20505ec..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTABGR.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_abgr extension. - * - *

    EXT_abgr extends the list of host-memory color formats. Specifically, it provides a reverse-order alternative to image format RGBA. The ABGR component - * order matches the cpack Iris GL format on big-endian machines.

    - */ -public final class EXTABGR { - - /** Accepted by the {@code format} parameter of DrawPixels, GetTexImage, ReadPixels, TexImage1D, and TexImage2D. */ - public static final int GL_ABGR_EXT = 0x8000; - - private EXTABGR() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBGRA.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTBGRA.java deleted file mode 100644 index d4f1ffa4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBGRA.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_bgra extension. - * - *

    EXT_bgra extends the list of host-memory color formats. Specifically, it provides formats which match the memory layout of Windows DIBs so that - * applications can use the same data in both Windows API calls and OpenGL pixel API calls.

    - * - *

    Promoted to core in {@link GL12 OpenGL 1.2}.

    - */ -public final class EXTBGRA { - - /** Accepted by the {@code format} parameter of DrawPixels, GetTexImage, ReadPixels, TexImage1D, and TexImage2D. */ - public static final int - GL_BGR_EXT = 0x80E0, - GL_BGRA_EXT = 0x80E1; - - private EXTBGRA() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBindableUniform.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTBindableUniform.java deleted file mode 100644 index 6684e621..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBindableUniform.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_bindable_uniform extension. - * - *

    This extension introduces the concept of bindable uniforms to the OpenGL Shading Language. A uniform variable can be declared bindable, which means that - * the storage for the uniform is not allocated by the compiler/linker anymore, but is backed by a buffer object. This buffer object is bound to the - * bindable uniform through the new command UniformBufferEXT(). Binding needs to happen after linking a program object.

    - * - *

    Binding different buffer objects to a bindable uniform allows an application to easily use different "uniform data sets", without having to re-specify - * the data every time.

    - * - *

    A buffer object can be bound to bindable uniforms in different program objects. If those bindable uniforms are all of the same type, accessing a - * bindable uniform in program object A will result in the same data if the same access is made in program object B. This provides a mechanism for - * 'environment uniforms', uniform values that can be shared among multiple program objects.

    - */ -public class EXTBindableUniform { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2, - GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3, - GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4, - GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED, - GL_UNIFORM_BUFFER_BINDING_EXT = 0x8DEF; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_UNIFORM_BUFFER_EXT = 0x8DEE; - - protected EXTBindableUniform() { - throw new UnsupportedOperationException(); - } - - // --- [ glUniformBufferEXT ] --- - - public static native void glUniformBufferEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int buffer); - - // --- [ glGetUniformBufferSizeEXT ] --- - - @NativeType("GLint") - public static native int glGetUniformBufferSizeEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location); - - // --- [ glGetUniformOffsetEXT ] --- - - @NativeType("GLintptr") - public static native long glGetUniformOffsetEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendColor.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendColor.java deleted file mode 100644 index 397adb27..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendColor.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_blend_color extension. - * - *

    Blending capability is extended by defining a constant color that can be included in blending equations. A typical usage is blending two RGB images. - * Without the constant blend factor, one image must have an alpha channel with each pixel set to the desired blend factor.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public class EXTBlendColor { - - static { GL.initialize(); } - - /** Accepted by the {@code sfactor} and {@code dfactor} parameters of BlendFunc. */ - public static final int - GL_CONSTANT_COLOR_EXT = 0x8001, - GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002, - GL_CONSTANT_ALPHA_EXT = 0x8003, - GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_BLEND_COLOR_EXT = 0x8005; - - protected EXTBlendColor() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendColorEXT ] --- - - public static native void glBlendColorEXT(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java deleted file mode 100644 index d3e18ea8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_blend_equation_separate extension. - * - *

    {@link EXTBlendFuncSeparate EXT_blend_func_separate} introduced separate RGB and alpha blend factors. {@link EXTBlendMinmax EXT_blend_minmax} introduced a distinct blend equation for - * combining source and destination blend terms. ({@link EXTBlendSubtract EXT_blend_subtract} & EXT_blend_logic_op added other blend equation - * modes.) OpenGL 1.4 integrated both functionalities into the core standard.

    - * - *

    While there are separate blend functions for the RGB and alpha blend factors, OpenGL 1.4 provides a single blend equation that applies to both RGB and - * alpha portions of blending.

    - * - *

    This extension provides a separate blend equation for RGB and alpha to match the generality available for blend factors.

    - * - *

    Requires {@link GL14 OpenGL 1.4} or {@link ARBImaging ARB_imaging} or {@link EXTBlendMinmax EXT_blend_minmax} and/or {@link EXTBlendSubtract EXT_blend_subtract}. Promoted to core in {@link GL20 OpenGL 2.0}.

    - */ -public class EXTBlendEquationSeparate { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_BLEND_EQUATION_RGB_EXT = 0x8009, - GL_BLEND_EQUATION_ALPHA_EXT = 0x883D; - - protected EXTBlendEquationSeparate() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendEquationSeparateEXT ] --- - - public static native void glBlendEquationSeparateEXT(@NativeType("GLenum") int modeRGB, @NativeType("GLenum") int modeAlpha); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java deleted file mode 100644 index e027551a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_blend_func_separate extension. - * - *

    Blending capability is extended by defining a function that allows independent setting of the RGB and alpha blend factors for blend operations that - * require source and destination blend factors. It is not always desired that the blending used for RGB is also applied to alpha.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public class EXTBlendFuncSeparate { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_BLEND_DST_RGB_EXT = 0x80C8, - GL_BLEND_SRC_RGB_EXT = 0x80C9, - GL_BLEND_DST_ALPHA_EXT = 0x80CA, - GL_BLEND_SRC_ALPHA_EXT = 0x80CB; - - protected EXTBlendFuncSeparate() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendFuncSeparateEXT ] --- - - public static native void glBlendFuncSeparateEXT(@NativeType("GLenum") int sfactorRGB, @NativeType("GLenum") int dfactorRGB, @NativeType("GLenum") int sfactorAlpha, @NativeType("GLenum") int dfactorAlpha); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendMinmax.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendMinmax.java deleted file mode 100644 index 6951af19..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendMinmax.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_blend_minmax extension. - * - *

    Blending capability is extended by respecifying the entire blend equation. While this document defines only two new equations, the {@link #glBlendEquationEXT BlendEquationEXT} - * procedure that it defines will be used by subsequent extensions to define additional blending equations.

    - * - *

    The two new equations defined by this extension produce the minimum (or maximum) color components of the source and destination colors. Taking the - * maximum is useful for applications such as maximum projection in medical imaging.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public class EXTBlendMinmax { - - static { GL.initialize(); } - - /** Accepted by the {@code mode} parameter of BlendEquationEXT. */ - public static final int - GL_FUNC_ADD_EXT = 0x8006, - GL_MIN_EXT = 0x8007, - GL_MAX_EXT = 0x8008; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_BLEND_EQUATION_EXT = 0x8009; - - protected EXTBlendMinmax() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendEquationEXT ] --- - - public static native void glBlendEquationEXT(@NativeType("GLenum") int mode); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendSubtract.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendSubtract.java deleted file mode 100644 index 1d639bcc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTBlendSubtract.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_blend_subtract extension. - * - *

    Two additional blending equations are specified using the interface defined by {@link EXTBlendMinmax EXT_blend_minmax}. These equations are similar to the default - * blending equation, but produce the difference of its left and right hand sides, rather than the sum. Image differences are useful in many image - * processing applications.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public final class EXTBlendSubtract { - - /** Accepted by the {@code mode} parameter of BlendEquationEXT. */ - public static final int - GL_FUNC_SUBTRACT_EXT = 0x800A, - GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B; - - private EXTBlendSubtract() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTClipVolumeHint.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTClipVolumeHint.java deleted file mode 100644 index 66cda233..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTClipVolumeHint.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_clip_volume_hint extension. - * - *

    EXT_clip_volume_hint provides a mechanism for applications to indicate that they do not require clip volume clipping for primitives. It allows - * applications to maximize performance in situations where they know that clipping is unnecessary. EXT_clip_volume_hint is only an indication, though, - * and implementations are free to ignore it.

    - */ -public final class EXTClipVolumeHint { - - /** Accepted by the target parameter of Hint and the pname parameter of GetBooleanv, GetDoublev, GetFloatv and GetIntegerv. */ - public static final int GL_CLIP_VOLUME_CLIPPING_HINT_EXT = 0x80F0; - - private EXTClipVolumeHint() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTCompiledVertexArray.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTCompiledVertexArray.java deleted file mode 100644 index 83c7f9f3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTCompiledVertexArray.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_compiled_vertex_array extension. - * - *

    This extension defines an interface which allows static vertex array data to be cached or pre-compiled for more efficient rendering. This is useful for - * implementations which can cache the transformed results of array data for reuse by several DrawArrays, ArrayElement, or DrawElements commands. It is - * also useful for implementations which can transfer array data to fast memory for more efficient processing.

    - * - *

    For example, rendering an M by N mesh of quadrilaterals can be accomplished by setting up vertex arrays containing all of the vertexes in the mesh and - * issuing M DrawElements commands each of which operate on 2 * N vertexes. Each DrawElements command after the first will share N vertexes with the - * preceding DrawElements command. If the vertex array data is locked while the DrawElements commands are executed, then OpenGL may be able to transform - * each of these shared vertexes just once.

    - */ -public class EXTCompiledVertexArray { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8, - GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9; - - protected EXTCompiledVertexArray() { - throw new UnsupportedOperationException(); - } - - // --- [ glLockArraysEXT ] --- - - public static native void glLockArraysEXT(@NativeType("GLint") int first, @NativeType("GLsizei") int count); - - // --- [ glUnlockArraysEXT ] --- - - public static native void glUnlockArraysEXT(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDebugLabel.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTDebugLabel.java deleted file mode 100644 index ebe4dcb0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDebugLabel.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_debug_label extension. - * - *

    This extension defines a mechanism for OpenGL and OpenGL ES applications to label their objects (textures, buffers, shaders, etc.) with a descriptive - * string.

    - * - *

    When profiling or debugging such an application within a debugger or profiler it is difficult to identify resources from their object names. Even when - * the resource itself is viewed it can be problematic to differentiate between similar resources. Attaching a label to an object helps obviate this - * difficulty.

    - * - *

    The intended purpose of this is purely to improve the user experience within OpenGL and OpenGL ES development tools.

    - */ -public class EXTDebugLabel { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of LabelObjectEXT and GetObjectLabelEXT. */ - public static final int - GL_BUFFER_OBJECT_EXT = 0x9151, - GL_SHADER_OBJECT_EXT = 0x8B48, - GL_PROGRAM_OBJECT_EXT = 0x8B40, - GL_VERTEX_ARRAY_OBJECT_EXT = 0x9154, - GL_QUERY_OBJECT_EXT = 0x9153, - GL_PROGRAM_PIPELINE_OBJECT_EXT = 0x8A4F; - - protected EXTDebugLabel() { - throw new UnsupportedOperationException(); - } - - // --- [ glLabelObjectEXT ] --- - - public static native void nglLabelObjectEXT(int type, int object, int length, long label); - - public static void glLabelObjectEXT(@NativeType("GLenum") int type, @NativeType("GLuint") int object, @NativeType("GLchar const *") ByteBuffer label) { - nglLabelObjectEXT(type, object, label.remaining(), memAddress(label)); - } - - public static void glLabelObjectEXT(@NativeType("GLenum") int type, @NativeType("GLuint") int object, @NativeType("GLchar const *") CharSequence label) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int labelEncodedLength = stack.nUTF8(label, false); - long labelEncoded = stack.getPointerAddress(); - nglLabelObjectEXT(type, object, labelEncodedLength, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetObjectLabelEXT ] --- - - public static native void nglGetObjectLabelEXT(int type, int object, int bufSize, long length, long label); - - public static void glGetObjectLabelEXT(@NativeType("GLenum") int type, @NativeType("GLuint") int object, @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer label) { - if (CHECKS) { - check(length, 1); - } - nglGetObjectLabelEXT(type, object, label.remaining(), memAddress(length), memAddress(label)); - } - - @NativeType("void") - public static String glGetObjectLabelEXT(@NativeType("GLenum") int type, @NativeType("GLuint") int object, @NativeType("GLsizei") int bufSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer label = stack.malloc(bufSize); - nglGetObjectLabelEXT(type, object, bufSize, memAddress(length), memAddress(label)); - return memUTF8(label, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGetObjectLabelEXT GetObjectLabelEXT} */ - public static void glGetObjectLabelEXT(@NativeType("GLenum") int type, @NativeType("GLuint") int object, @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer label) { - long __functionAddress = GL.getICD().glGetObjectLabelEXT; - if (CHECKS) { - check(__functionAddress); - check(length, 1); - } - callPPV(type, object, label.remaining(), length, memAddress(label), __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDebugMarker.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTDebugMarker.java deleted file mode 100644 index bbe293b0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDebugMarker.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_debug_marker extension. - * - *

    This extension defines a mechanism for OpenGL and OpenGL ES applications to annotate their command stream with markers for discrete events and groups - * of commands using descriptive text markers.

    - * - *

    When profiling or debugging such an application within a debugger or profiler it is difficult to relate the commands within the command stream to the - * elements of the scene or parts of the program code to which they correspond. Markers help obviate this by allowing applications to specify this link.

    - * - *

    The intended purpose of this is purely to improve the user experience within OpenGL and OpenGL ES development tools.

    - */ -public class EXTDebugMarker { - - static { GL.initialize(); } - - protected EXTDebugMarker() { - throw new UnsupportedOperationException(); - } - - // --- [ glInsertEventMarkerEXT ] --- - - public static native void nglInsertEventMarkerEXT(int length, long marker); - - public static void glInsertEventMarkerEXT(@NativeType("GLchar const *") ByteBuffer marker) { - nglInsertEventMarkerEXT(marker.remaining(), memAddress(marker)); - } - - public static void glInsertEventMarkerEXT(@NativeType("GLchar const *") CharSequence marker) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int markerEncodedLength = stack.nUTF8(marker, false); - long markerEncoded = stack.getPointerAddress(); - nglInsertEventMarkerEXT(markerEncodedLength, markerEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glPushGroupMarkerEXT ] --- - - public static native void nglPushGroupMarkerEXT(int length, long marker); - - public static void glPushGroupMarkerEXT(@NativeType("GLchar const *") ByteBuffer marker) { - nglPushGroupMarkerEXT(marker.remaining(), memAddress(marker)); - } - - public static void glPushGroupMarkerEXT(@NativeType("GLchar const *") CharSequence marker) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int markerEncodedLength = stack.nUTF8(marker, false); - long markerEncoded = stack.getPointerAddress(); - nglPushGroupMarkerEXT(markerEncodedLength, markerEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glPopGroupMarkerEXT ] --- - - public static native void glPopGroupMarkerEXT(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDepthBoundsTest.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTDepthBoundsTest.java deleted file mode 100644 index f7d3a8b5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDepthBoundsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_depth_bounds_test extension. - * - *

    This extension adds a new per-fragment test that is, logically, after the scissor test and before the alpha test. The depth bounds test compares the - * depth value stored at the location given by the incoming fragment's (xw,yw) coordinates to a user-defined minimum and maximum depth value. If the stored - * depth value is outside the user-defined range (exclusive), the incoming fragment is discarded.

    - * - *

    Unlike the depth test, the depth bounds test has NO dependency on the fragment's window-space depth value.

    - * - *

    This functionality is useful in the context of attenuated stenciled shadow volume rendering. To motivate the functionality's utility in this context, we - * first describe how conventional scissor testing can be used to optimize shadow volume rendering.

    - * - *

    If an attenuated light source's illumination can be bounded to a rectangle in XY window-space, the conventional scissor test can be used to discard - * shadow volume fragments that are guaranteed to be outside the light source's window-space XY rectangle. The stencil increments and decrements that would - * otherwise be generated by these scissored fragments are inconsequential because the light source's illumination can pre-determined to be fully - * attenuated outside the scissored region. In other words, the scissor test can be used to discard shadow volume fragments rendered outside the scissor, - * thereby improving performance, without affecting the ultimate illumination of these pixels with respect to the attenuated light source.

    - * - *

    This scissoring optimization can be used both when rendering the stenciled shadow volumes to update stencil (incrementing and decrementing the stencil - * buffer) AND when adding the illumination contribution of attenuated light source's.

    - * - *

    In a similar fashion, we can compute the attenuated light source's window-space Z bounds (zmin,zmax) of consequential illumination. Unless a depth value - * (in the depth buffer) at a pixel is within the range [zmin,zmax], the light source's illumination can be pre-determined to be inconsequential for the - * pixel. Said another way, the pixel being illuminated is either far enough in front of or behind the attenuated light source so that the light source's - * illumination for the pixel is fully attenuated. The depth bounds test can perform this test.

    - */ -public class EXTDepthBoundsTest { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_DEPTH_BOUNDS_TEST_EXT = 0x8890; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_DEPTH_BOUNDS_EXT = 0x8891; - - protected EXTDepthBoundsTest() { - throw new UnsupportedOperationException(); - } - - // --- [ glDepthBoundsEXT ] --- - - public static native void glDepthBoundsEXT(double zmin, double zmax); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDirectStateAccess.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTDirectStateAccess.java deleted file mode 100644 index 0b122e41..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDirectStateAccess.java +++ /dev/null @@ -1,4024 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_direct_state_access extension. - * - *

    This extension introduces a set of new "direct state access" commands (meaning no selector is involved) to access (update and query) OpenGL state that - * previously depended on the OpenGL state selectors for access. These new commands supplement the existing selector-based OpenGL commands to access the - * same state.

    - * - *

    The intent of this extension is to make it more efficient for libraries to avoid disturbing selector and latched state. The extension also allows more - * efficient command usage by eliminating the need for selector update commands.

    - * - *

    Two derivative advantages of this extension are 1) display lists can be executed using these commands that avoid disturbing selectors that subsequent - * commands may depend on, and 2) drivers implemented with a dual-thread partitioning with OpenGL command buffering from an application thread and then - * OpenGL command dispatching in a concurrent driver thread can avoid thread synchronization created by selector saving, setting, command execution, and - * selector restoration.

    - * - *

    This extension does not itself add any new OpenGL state.

    - * - *

    We call a state variable in OpenGL an "OpenGL state selector" or simply a "selector" if OpenGL commands depend on the state variable to determine what - * state to query or update. The matrix mode and active texture are both selectors. Object bindings for buffers, programs, textures, and framebuffer - * objects are also selectors.

    - * - *

    We call OpenGL state "latched" if the state is set by one OpenGL command but then that state is saved by a subsequent command or the state determines - * how client memory or buffer object memory is accessed by a subsequent command. The array and element array buffer bindings are latched by vertex array - * specification commands to determine which buffer a given vertex array uses. Vertex array state and pixel pack/unpack state decides how client memory or - * buffer object memory is accessed by subsequent vertex pulling or image specification commands.

    - * - *

    The existence of selectors and latched state in the OpenGL API reduces the number of parameters to various sets of OpenGL commands but complicates the - * access to state for layered libraries which seek to access state without disturbing other state, namely the state of state selectors and latched state. - * In many cases, selectors and latched state were introduced by extensions as OpenGL evolved to minimize the disruption to the OpenGL API when new - * functionality, particularly the pluralization of existing functionality as when texture objects and later multiple texture units, was introduced.

    - * - *

    The OpenGL API involves several selectors (listed in historical order of introduction):

    - * - *
      - *
    • The matrix mode.
    • - *
    • The current bound texture for each supported texture target.
    • - *
    • The active texture.
    • - *
    • The active client texture.
    • - *
    • The current bound program for each supported program target.
    • - *
    • The current bound buffer for each supported buffer target.
    • - *
    • The current GLSL program.
    • - *
    • The current framebuffer object.
    • - *
    - * - *

    The new selector-free update commands can be compiled into display lists.

    - * - *

    The OpenGL API has latched state for vertex array buffer objects and pixel store state. When an application issues a GL command to unpack or pack pixels - * (for example, glTexImage2D or glReadPixels respectively), the current unpack and pack pixel store state determines how the pixels are unpacked - * from/packed to client memory or pixel buffer objects. For example, consider:

    - * - *
    
    - * glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_TRUE);
    - * glPixelStorei(GL_UNPACK_ROW_LENGTH, 640);
    - * glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 47);
    - * glDrawPixels(100, 100, GL_RGB, GL_FLOAT, pixels);
    - * - *

    The unpack swap bytes and row length state set by the preceding glPixelStorei commands (as well as the 6 other unpack pixel store state variables) - * control how data is read (unpacked) from buffer of data pointed to by pixels. The glBindBuffer command also specifies an unpack buffer object (47) so - * the pixel pointer is actually treated as a byte offset into buffer object 47.

    - * - *

    When an application issues a command to configure a vertex array, the current array buffer state is latched as the binding for the particular vertex - * array being specified. For example, consider:

    - * - *
    
    - * glBindBuffer(GL_ARRAY_BUFFER, 23);
    - * glVertexPointer(3, GL_FLOAT, 12, pointer);
    - * - *

    The glBindBuffer command updates the array buffering binding (GL_ARRAY_BUFFER_BINDING) to the buffer object named 23. The subsequent glVertexPointer - * command specifies explicit parameters for the size, type, stride, and pointer to access the position vertex array BUT ALSO latches the current array - * buffer binding for the vertex array buffer binding (GL_VERTEX_ARRAY_BUFFER_BINDING). Effectively the current array buffer binding buffer object becomes - * an implicit fifth parameter to glVertexPointer and this applies to all the gl*Pointer vertex array specification commands.

    - * - *

    Selectors and latched state create problems for layered libraries using OpenGL because selectors require the selector state to be modified to update - * some other state and latched state means implicit state can affect the operation of commands specifying, packing, or unpacking data through - * pointers/offsets. For layered libraries, a state update performed by the library may attempt to save the selector state, set the selector, update/query - * some state the selector controls, and then restore the selector to its saved state. Layered libraries can skip the selector save/restore but this risks - * introducing uncertainty about the state of a selector after calling layered library routines. Such selector side-effects are difficult to document and - * lead to compatibility issues as the layered library evolves or its usage varies. For latched state, layered libraries may find commands such as - * glDrawPixels do not work as expected because latched pixel store state is not what the library expects. Querying or pushing the latched state, setting - * the latched state explicitly, performing the operation involving latched state, and then restoring or popping the latched state avoids entanglements - * with latched state but at considerable cost.

    - * - *

    EXAMPLE USAGE OF THIS EXTENSION'S FUNCTIONALITY

    - * - *

    Consider the following routine to set the modelview matrix involving the matrix mode selector:

    - * - *
    
    - * void setModelviewMatrix(const GLfloat matrix[16])
    - * {
    - *     GLenum savedMatrixMode;
    - * 
    - *     glGetIntegerv(GL_MATRIX_MODE, &savedMatrixMode);
    - *     glMatrixMode(GL_MODELVIEW);
    - *     glLoadMatrixf(matrix);
    - *     glMatrixMode(savedMatrixMode);
    - * }
    - * - *

    Notice that four OpenGL commands are required to update the current modelview matrix without disturbing the matrix mode selector.

    - * - *

    OpenGL query commands can also substantially reduce the performance of modern OpenGL implementations which may off-load OpenGL state processing to - * another CPU core/thread or to the GPU itself.

    - * - *

    An alternative to querying the selector is to use the glPushAttrib/glPopAttrib commands. However this approach typically involves pushing far more state - * than simply the one or two selectors that need to be saved and restored. Because so much state is associated with a given push/pop attribute bit, the - * glPushAttrib and glPopAttrib commands are considerably more costly than the save/restore approach. Additionally glPushAttrib risks overflowing the - * attribute stack.

    - * - *

    The reliability and performance of layered libraries and applications can be improved by adding to the OpenGL API a new set of commands to access - * directly OpenGL state that otherwise involves selectors to access.

    - * - *

    The above example can be reimplemented more efficiently and without selector side-effects:

    - * - *
    
    - * void setModelviewMatrix(const GLfloat matrix[16])
    - * {
    - *     glMatrixLoadfEXT(GL_MODELVIEW, matrix);
    - * }
    - * - *

    Consider a layered library seeking to load a texture:

    - * - *
    
    - * void loadTexture(GLint texobj, GLint width, GLint height, void *data)
    - * {
    - *     glBindTexture(GL_TEXTURE_2D, texobj);
    - *     glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, width, height, GL_RGB, GL_FLOAT, data);
    - * }
    - * - *

    The library expects the data to be packed into the buffer pointed to by data. But what if the current pixel unpack buffer binding is not zero so the - * current pixel unpack buffer, rather than client memory, will be read? Or what if the application has modified the GL_UNPACK_ROW_LENGTH pixel store state - * before loadTexture is called?

    - * - *

    We can fix the routine by calling glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0) and setting all the pixel store unpack state to the initial state the - * loadTexture routine expects, but this is expensive. It also risks disturbing the state so when loadTexture returns to the application, the application - * doesn't realize the current texture object (for whatever texture unit the current active texture happens to be) and pixel store state has changed.

    - * - *

    We can more efficiently implement this routine without disturbing selector or latched state as follows:

    - * - *
    
    - * void loadTexture(GLint texobj, GLint width, GLint height, void *data)
    - * {
    - *     glPushClientAttribDefaultEXT(GL_CLIENT_PIXEL_STORE_BIT);
    - *     glTextureImage2D(texobj, GL_TEXTURE_2D, 0, GL_RGB8, width, height, GL_RGB, GL_FLOAT, data);
    - *     glPopClientAttrib();
    - * }
    - * - *

    Now loadTexture does not have to worry about inappropriately configured pixel store state or a non-zero pixel unpack buffer binding. And loadTexture has - * no unintended side-effects for selector or latched state (assuming the client attrib state does not overflow).

    - */ -public class EXTDirectStateAccess { - - static { GL.initialize(); } - - /** GetBooleani_v, GetIntegeri_v, GetFloati_vEXT, GetDoublei_vEXT. */ - public static final int - GL_PROGRAM_MATRIX_EXT = 0x8E2D, - GL_TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E, - GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F; - - protected EXTDirectStateAccess() { - throw new UnsupportedOperationException(); - } - - // --- [ glClientAttribDefaultEXT ] --- - - public static native void glClientAttribDefaultEXT(@NativeType("GLbitfield") int mask); - - // --- [ glPushClientAttribDefaultEXT ] --- - - public static native void glPushClientAttribDefaultEXT(@NativeType("GLbitfield") int mask); - - // --- [ glMatrixLoadfEXT ] --- - - public static native void nglMatrixLoadfEXT(int matrixMode, long m); - - public static void glMatrixLoadfEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixLoadfEXT(matrixMode, memAddress(m)); - } - - // --- [ glMatrixLoaddEXT ] --- - - public static native void nglMatrixLoaddEXT(int matrixMode, long m); - - public static void glMatrixLoaddEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixLoaddEXT(matrixMode, memAddress(m)); - } - - // --- [ glMatrixMultfEXT ] --- - - public static native void nglMatrixMultfEXT(int matrixMode, long m); - - public static void glMatrixMultfEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixMultfEXT(matrixMode, memAddress(m)); - } - - // --- [ glMatrixMultdEXT ] --- - - public static native void nglMatrixMultdEXT(int matrixMode, long m); - - public static void glMatrixMultdEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixMultdEXT(matrixMode, memAddress(m)); - } - - // --- [ glMatrixLoadIdentityEXT ] --- - - public static native void glMatrixLoadIdentityEXT(@NativeType("GLenum") int matrixMode); - - // --- [ glMatrixRotatefEXT ] --- - - public static native void glMatrixRotatefEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat") float angle, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glMatrixRotatedEXT ] --- - - public static native void glMatrixRotatedEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble") double angle, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glMatrixScalefEXT ] --- - - public static native void glMatrixScalefEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glMatrixScaledEXT ] --- - - public static native void glMatrixScaledEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glMatrixTranslatefEXT ] --- - - public static native void glMatrixTranslatefEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glMatrixTranslatedEXT ] --- - - public static native void glMatrixTranslatedEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glMatrixOrthoEXT ] --- - - public static native void glMatrixOrthoEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble") double l, @NativeType("GLdouble") double r, @NativeType("GLdouble") double b, @NativeType("GLdouble") double t, @NativeType("GLdouble") double n, @NativeType("GLdouble") double f); - - // --- [ glMatrixFrustumEXT ] --- - - public static native void glMatrixFrustumEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble") double l, @NativeType("GLdouble") double r, @NativeType("GLdouble") double b, @NativeType("GLdouble") double t, @NativeType("GLdouble") double n, @NativeType("GLdouble") double f); - - // --- [ glMatrixPushEXT ] --- - - public static native void glMatrixPushEXT(@NativeType("GLenum") int matrixMode); - - // --- [ glMatrixPopEXT ] --- - - public static native void glMatrixPopEXT(@NativeType("GLenum") int matrixMode); - - // --- [ glTextureParameteriEXT ] --- - - public static native void glTextureParameteriEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glTextureParameterivEXT ] --- - - public static native void nglTextureParameterivEXT(int texture, int target, int pname, long param); - - public static void glTextureParameterivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer param) { - if (CHECKS) { - check(param, 4); - } - nglTextureParameterivEXT(texture, target, pname, memAddress(param)); - } - - // --- [ glTextureParameterfEXT ] --- - - public static native void glTextureParameterfEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glTextureParameterfvEXT ] --- - - public static native void nglTextureParameterfvEXT(int texture, int target, int pname, long param); - - public static void glTextureParameterfvEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer param) { - if (CHECKS) { - check(param, 4); - } - nglTextureParameterfvEXT(texture, target, pname, memAddress(param)); - } - - // --- [ glTextureImage1DEXT ] --- - - public static native void nglTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, long pixels); - - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glTextureImage2DEXT ] --- - - public static native void nglTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels); - - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels); - } - - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glTextureSubImage1DEXT ] --- - - public static native void nglTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, long pixels); - - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - // --- [ glTextureSubImage2DEXT ] --- - - public static native void nglTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels); - - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - // --- [ glCopyTextureImage1DEXT ] --- - - public static native void glCopyTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLint") int border); - - // --- [ glCopyTextureImage2DEXT ] --- - - public static native void glCopyTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border); - - // --- [ glCopyTextureSubImage1DEXT ] --- - - public static native void glCopyTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width); - - // --- [ glCopyTextureSubImage2DEXT ] --- - - public static native void glCopyTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glGetTextureImageEXT ] --- - - public static native void nglGetTextureImageEXT(int texture, int target, int level, int format, int type, long pixels); - - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - nglGetTextureImageEXT(texture, target, level, format, type, memAddress(pixels)); - } - - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long pixels) { - nglGetTextureImageEXT(texture, target, level, format, type, pixels); - } - - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - nglGetTextureImageEXT(texture, target, level, format, type, memAddress(pixels)); - } - - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - nglGetTextureImageEXT(texture, target, level, format, type, memAddress(pixels)); - } - - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - nglGetTextureImageEXT(texture, target, level, format, type, memAddress(pixels)); - } - - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - nglGetTextureImageEXT(texture, target, level, format, type, memAddress(pixels)); - } - - // --- [ glGetTextureParameterfvEXT ] --- - - public static native void nglGetTextureParameterfvEXT(int texture, int target, int pname, long params); - - public static void glGetTextureParameterfvEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameterfvEXT(texture, target, pname, memAddress(params)); - } - - @NativeType("void") - public static float glGetTextureParameterfEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetTextureParameterfvEXT(texture, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureParameterivEXT ] --- - - public static native void nglGetTextureParameterivEXT(int texture, int target, int pname, long params); - - public static void glGetTextureParameterivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameterivEXT(texture, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetTextureParameteriEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureParameterivEXT(texture, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureLevelParameterfvEXT ] --- - - public static native void nglGetTextureLevelParameterfvEXT(int texture, int target, int level, int pname, long params); - - public static void glGetTextureLevelParameterfvEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureLevelParameterfvEXT(texture, target, level, pname, memAddress(params)); - } - - @NativeType("void") - public static float glGetTextureLevelParameterfEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetTextureLevelParameterfvEXT(texture, target, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureLevelParameterivEXT ] --- - - public static native void nglGetTextureLevelParameterivEXT(int texture, int target, int level, int pname, long params); - - public static void glGetTextureLevelParameterivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureLevelParameterivEXT(texture, target, level, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetTextureLevelParameteriEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureLevelParameterivEXT(texture, target, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTextureImage3DEXT ] --- - - public static native void nglTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels); - - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glTextureSubImage3DEXT ] --- - - public static native void nglTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels); - - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - // --- [ glCopyTextureSubImage3DEXT ] --- - - public static native void glCopyTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glBindMultiTextureEXT ] --- - - public static native void glBindMultiTextureEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLuint") int texture); - - // --- [ glMultiTexCoordPointerEXT ] --- - - public static native void nglMultiTexCoordPointerEXT(int texunit, int size, int type, int stride, long pointer); - - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglMultiTexCoordPointerEXT(texunit, size, type, stride, memAddress(pointer)); - } - - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglMultiTexCoordPointerEXT(texunit, size, type, stride, pointer); - } - - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglMultiTexCoordPointerEXT(texunit, size, type, stride, memAddress(pointer)); - } - - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglMultiTexCoordPointerEXT(texunit, size, type, stride, memAddress(pointer)); - } - - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglMultiTexCoordPointerEXT(texunit, size, type, stride, memAddress(pointer)); - } - - // --- [ glMultiTexEnvfEXT ] --- - - public static native void glMultiTexEnvfEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glMultiTexEnvfvEXT ] --- - - public static native void nglMultiTexEnvfvEXT(int texunit, int target, int pname, long params); - - public static void glMultiTexEnvfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMultiTexEnvfvEXT(texunit, target, pname, memAddress(params)); - } - - // --- [ glMultiTexEnviEXT ] --- - - public static native void glMultiTexEnviEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glMultiTexEnvivEXT ] --- - - public static native void nglMultiTexEnvivEXT(int texunit, int target, int pname, long params); - - public static void glMultiTexEnvivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMultiTexEnvivEXT(texunit, target, pname, memAddress(params)); - } - - // --- [ glMultiTexGendEXT ] --- - - public static native void glMultiTexGendEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble") double param); - - // --- [ glMultiTexGendvEXT ] --- - - public static native void nglMultiTexGendvEXT(int texunit, int coord, int pname, long params); - - public static void glMultiTexGendvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble const *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMultiTexGendvEXT(texunit, coord, pname, memAddress(params)); - } - - // --- [ glMultiTexGenfEXT ] --- - - public static native void glMultiTexGenfEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glMultiTexGenfvEXT ] --- - - public static native void nglMultiTexGenfvEXT(int texunit, int coord, int pname, long params); - - public static void glMultiTexGenfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMultiTexGenfvEXT(texunit, coord, pname, memAddress(params)); - } - - // --- [ glMultiTexGeniEXT ] --- - - public static native void glMultiTexGeniEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glMultiTexGenivEXT ] --- - - public static native void nglMultiTexGenivEXT(int texunit, int coord, int pname, long params); - - public static void glMultiTexGenivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMultiTexGenivEXT(texunit, coord, pname, memAddress(params)); - } - - // --- [ glGetMultiTexEnvfvEXT ] --- - - public static native void nglGetMultiTexEnvfvEXT(int texunit, int target, int pname, long params); - - public static void glGetMultiTexEnvfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexEnvfvEXT(texunit, target, pname, memAddress(params)); - } - - @NativeType("void") - public static float glGetMultiTexEnvfEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetMultiTexEnvfvEXT(texunit, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexEnvivEXT ] --- - - public static native void nglGetMultiTexEnvivEXT(int texunit, int target, int pname, long params); - - public static void glGetMultiTexEnvivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexEnvivEXT(texunit, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetMultiTexEnviEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMultiTexEnvivEXT(texunit, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexGendvEXT ] --- - - public static native void nglGetMultiTexGendvEXT(int texunit, int coord, int pname, long params); - - public static void glGetMultiTexGendvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexGendvEXT(texunit, coord, pname, memAddress(params)); - } - - @NativeType("void") - public static double glGetMultiTexGendEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer params = stack.callocDouble(1); - nglGetMultiTexGendvEXT(texunit, coord, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexGenfvEXT ] --- - - public static native void nglGetMultiTexGenfvEXT(int texunit, int coord, int pname, long params); - - public static void glGetMultiTexGenfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexGenfvEXT(texunit, coord, pname, memAddress(params)); - } - - @NativeType("void") - public static float glGetMultiTexGenfEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetMultiTexGenfvEXT(texunit, coord, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexGenivEXT ] --- - - public static native void nglGetMultiTexGenivEXT(int texunit, int coord, int pname, long params); - - public static void glGetMultiTexGenivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexGenivEXT(texunit, coord, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetMultiTexGeniEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMultiTexGenivEXT(texunit, coord, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMultiTexParameteriEXT ] --- - - public static native void glMultiTexParameteriEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glMultiTexParameterivEXT ] --- - - public static native void nglMultiTexParameterivEXT(int texunit, int target, int pname, long param); - - public static void glMultiTexParameterivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer param) { - if (CHECKS) { - check(param, 4); - } - nglMultiTexParameterivEXT(texunit, target, pname, memAddress(param)); - } - - // --- [ glMultiTexParameterfEXT ] --- - - public static native void glMultiTexParameterfEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glMultiTexParameterfvEXT ] --- - - public static native void nglMultiTexParameterfvEXT(int texunit, int target, int pname, long param); - - public static void glMultiTexParameterfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer param) { - if (CHECKS) { - check(param, 4); - } - nglMultiTexParameterfvEXT(texunit, target, pname, memAddress(param)); - } - - // --- [ glMultiTexImage1DEXT ] --- - - public static native void nglMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, long pixels); - - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); - } - - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glMultiTexImage2DEXT ] --- - - public static native void nglMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels); - - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels); - } - - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glMultiTexSubImage1DEXT ] --- - - public static native void nglMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, long pixels); - - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); - } - - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, memAddress(pixels)); - } - - // --- [ glMultiTexSubImage2DEXT ] --- - - public static native void nglMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels); - - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - // --- [ glCopyMultiTexImage1DEXT ] --- - - public static native void glCopyMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLint") int border); - - // --- [ glCopyMultiTexImage2DEXT ] --- - - public static native void glCopyMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border); - - // --- [ glCopyMultiTexSubImage1DEXT ] --- - - public static native void glCopyMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width); - - // --- [ glCopyMultiTexSubImage2DEXT ] --- - - public static native void glCopyMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glGetMultiTexImageEXT ] --- - - public static native void nglGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, long pixels); - - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - nglGetMultiTexImageEXT(texunit, target, level, format, type, memAddress(pixels)); - } - - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long pixels) { - nglGetMultiTexImageEXT(texunit, target, level, format, type, pixels); - } - - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - nglGetMultiTexImageEXT(texunit, target, level, format, type, memAddress(pixels)); - } - - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - nglGetMultiTexImageEXT(texunit, target, level, format, type, memAddress(pixels)); - } - - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - nglGetMultiTexImageEXT(texunit, target, level, format, type, memAddress(pixels)); - } - - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - nglGetMultiTexImageEXT(texunit, target, level, format, type, memAddress(pixels)); - } - - // --- [ glGetMultiTexParameterfvEXT ] --- - - public static native void nglGetMultiTexParameterfvEXT(int texunit, int target, int pname, long params); - - public static void glGetMultiTexParameterfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexParameterfvEXT(texunit, target, pname, memAddress(params)); - } - - @NativeType("void") - public static float glGetMultiTexParameterfEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetMultiTexParameterfvEXT(texunit, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexParameterivEXT ] --- - - public static native void nglGetMultiTexParameterivEXT(int texunit, int target, int pname, long params); - - public static void glGetMultiTexParameterivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexParameterivEXT(texunit, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetMultiTexParameteriEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMultiTexParameterivEXT(texunit, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexLevelParameterfvEXT ] --- - - public static native void nglGetMultiTexLevelParameterfvEXT(int texunit, int target, int level, int pname, long params); - - public static void glGetMultiTexLevelParameterfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, memAddress(params)); - } - - @NativeType("void") - public static float glGetMultiTexLevelParameterfEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexLevelParameterivEXT ] --- - - public static native void nglGetMultiTexLevelParameterivEXT(int texunit, int target, int level, int pname, long params); - - public static void glGetMultiTexLevelParameterivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexLevelParameterivEXT(texunit, target, level, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetMultiTexLevelParameteriEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMultiTexLevelParameterivEXT(texunit, target, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMultiTexImage3DEXT ] --- - - public static native void nglMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels); - - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glMultiTexSubImage3DEXT ] --- - - public static native void nglMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels); - - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - // --- [ glCopyMultiTexSubImage3DEXT ] --- - - public static native void glCopyMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glEnableClientStateIndexedEXT ] --- - - public static native void glEnableClientStateIndexedEXT(@NativeType("GLenum") int array, @NativeType("GLuint") int index); - - // --- [ glDisableClientStateIndexedEXT ] --- - - public static native void glDisableClientStateIndexedEXT(@NativeType("GLenum") int array, @NativeType("GLuint") int index); - - // --- [ glEnableClientStateiEXT ] --- - - public static native void glEnableClientStateiEXT(@NativeType("GLenum") int array, @NativeType("GLuint") int index); - - // --- [ glDisableClientStateiEXT ] --- - - public static native void glDisableClientStateiEXT(@NativeType("GLenum") int array, @NativeType("GLuint") int index); - - // --- [ glGetFloatIndexedvEXT ] --- - - public static native void nglGetFloatIndexedvEXT(int target, int index, long params); - - public static void glGetFloatIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFloatIndexedvEXT(target, index, memAddress(params)); - } - - @NativeType("void") - public static float glGetFloatIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetFloatIndexedvEXT(target, index, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetDoubleIndexedvEXT ] --- - - public static native void nglGetDoubleIndexedvEXT(int target, int index, long params); - - public static void glGetDoubleIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetDoubleIndexedvEXT(target, index, memAddress(params)); - } - - @NativeType("void") - public static double glGetDoubleIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer params = stack.callocDouble(1); - nglGetDoubleIndexedvEXT(target, index, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPointerIndexedvEXT ] --- - - public static native void nglGetPointerIndexedvEXT(int target, int index, long params); - - public static void glGetPointerIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("void **") PointerBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetPointerIndexedvEXT(target, index, memAddress(params)); - } - - @NativeType("void") - public static long glGetPointerIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer params = stack.callocPointer(1); - nglGetPointerIndexedvEXT(target, index, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetFloati_vEXT ] --- - - public static native void nglGetFloati_vEXT(int pname, int index, long params); - - public static void glGetFloati_vEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFloati_vEXT(pname, index, memAddress(params)); - } - - @NativeType("void") - public static float glGetFloatiEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetFloati_vEXT(pname, index, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetDoublei_vEXT ] --- - - public static native void nglGetDoublei_vEXT(int pname, int index, long params); - - public static void glGetDoublei_vEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetDoublei_vEXT(pname, index, memAddress(params)); - } - - @NativeType("void") - public static double glGetDoubleiEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer params = stack.callocDouble(1); - nglGetDoublei_vEXT(pname, index, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPointeri_vEXT ] --- - - public static native void nglGetPointeri_vEXT(int pname, int index, long params); - - public static void glGetPointeri_vEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("void **") PointerBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetPointeri_vEXT(pname, index, memAddress(params)); - } - - @NativeType("void") - public static long glGetPointeriEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer params = stack.callocPointer(1); - nglGetPointeri_vEXT(pname, index, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glEnableIndexedEXT ] --- - - public static void glEnableIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - EXTDrawBuffers2.glEnableIndexedEXT(target, index); - } - - // --- [ glDisableIndexedEXT ] --- - - public static void glDisableIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - EXTDrawBuffers2.glDisableIndexedEXT(target, index); - } - - // --- [ glIsEnabledIndexedEXT ] --- - - @NativeType("GLboolean") - public static boolean glIsEnabledIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return EXTDrawBuffers2.glIsEnabledIndexedEXT(target, index); - } - - // --- [ glGetIntegerIndexedvEXT ] --- - - public static void nglGetIntegerIndexedvEXT(int target, int index, long data) { - EXTDrawBuffers2.nglGetIntegerIndexedvEXT(target, index, data); - } - - public static void glGetIntegerIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer data) { - EXTDrawBuffers2.glGetIntegerIndexedvEXT(target, index, data); - } - - @NativeType("void") - public static int glGetIntegerIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return EXTDrawBuffers2.glGetIntegerIndexedEXT(target, index); - } - - // --- [ glGetBooleanIndexedvEXT ] --- - - public static void nglGetBooleanIndexedvEXT(int target, int index, long data) { - EXTDrawBuffers2.nglGetBooleanIndexedvEXT(target, index, data); - } - - public static void glGetBooleanIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLboolean *") ByteBuffer data) { - EXTDrawBuffers2.glGetBooleanIndexedvEXT(target, index, data); - } - - @NativeType("void") - public static boolean glGetBooleanIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return EXTDrawBuffers2.glGetBooleanIndexedEXT(target, index); - } - - // --- [ glNamedProgramStringEXT ] --- - - public static native void nglNamedProgramStringEXT(int program, int target, int format, int len, long string); - - public static void glNamedProgramStringEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer string) { - nglNamedProgramStringEXT(program, target, format, string.remaining(), memAddress(string)); - } - - // --- [ glNamedProgramLocalParameter4dEXT ] --- - - public static native void glNamedProgramLocalParameter4dEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glNamedProgramLocalParameter4dvEXT ] --- - - public static native void nglNamedProgramLocalParameter4dvEXT(int program, int target, int index, long params); - - public static void glNamedProgramLocalParameter4dvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglNamedProgramLocalParameter4dvEXT(program, target, index, memAddress(params)); - } - - // --- [ glNamedProgramLocalParameter4fEXT ] --- - - public static native void glNamedProgramLocalParameter4fEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w); - - // --- [ glNamedProgramLocalParameter4fvEXT ] --- - - public static native void nglNamedProgramLocalParameter4fvEXT(int program, int target, int index, long params); - - public static void glNamedProgramLocalParameter4fvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglNamedProgramLocalParameter4fvEXT(program, target, index, memAddress(params)); - } - - // --- [ glGetNamedProgramLocalParameterdvEXT ] --- - - public static native void nglGetNamedProgramLocalParameterdvEXT(int program, int target, int index, long params); - - public static void glGetNamedProgramLocalParameterdvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetNamedProgramLocalParameterdvEXT(program, target, index, memAddress(params)); - } - - // --- [ glGetNamedProgramLocalParameterfvEXT ] --- - - public static native void nglGetNamedProgramLocalParameterfvEXT(int program, int target, int index, long params); - - public static void glGetNamedProgramLocalParameterfvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetNamedProgramLocalParameterfvEXT(program, target, index, memAddress(params)); - } - - // --- [ glGetNamedProgramivEXT ] --- - - public static native void nglGetNamedProgramivEXT(int program, int target, int pname, long params); - - public static void glGetNamedProgramivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedProgramivEXT(program, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetNamedProgramiEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedProgramivEXT(program, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedProgramStringEXT ] --- - - public static native void nglGetNamedProgramStringEXT(int program, int target, int pname, long string); - - public static void glGetNamedProgramStringEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("void *") ByteBuffer string) { - if (CHECKS) { - if (DEBUG) { - check(string, glGetNamedProgramiEXT(program, target, ARBVertexProgram.GL_PROGRAM_LENGTH_ARB)); - } - } - nglGetNamedProgramStringEXT(program, target, pname, memAddress(string)); - } - - // --- [ glCompressedTextureImage3DEXT ] --- - - public static native void nglCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, long data); - - public static void glCompressedTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, imageSize, data); - } - - public static void glCompressedTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedTextureImage2DEXT ] --- - - public static native void nglCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int imageSize, long data); - - public static void glCompressedTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, imageSize, data); - } - - public static void glCompressedTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedTextureImage1DEXT ] --- - - public static native void nglCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int imageSize, long data); - - public static void glCompressedTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, data); - } - - public static void glCompressedTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedTextureSubImage3DEXT ] --- - - public static native void nglCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data); - - public static void glCompressedTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - public static void glCompressedTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTextureSubImage2DEXT ] --- - - public static native void nglCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data); - - public static void glCompressedTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - public static void glCompressedTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTextureSubImage1DEXT ] --- - - public static native void nglCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int imageSize, long data); - - public static void glCompressedTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, data); - } - - public static void glCompressedTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, data.remaining(), memAddress(data)); - } - - // --- [ glGetCompressedTextureImageEXT ] --- - - public static native void nglGetCompressedTextureImageEXT(int texture, int target, int level, long img); - - public static void glGetCompressedTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer img) { - if (CHECKS) { - if (DEBUG) { - check(img, glGetTextureLevelParameteriEXT(texture, target, level, GL13.GL_TEXTURE_COMPRESSED_IMAGE_SIZE)); - } - } - nglGetCompressedTextureImageEXT(texture, target, level, memAddress(img)); - } - - public static void glGetCompressedTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") long img) { - nglGetCompressedTextureImageEXT(texture, target, level, img); - } - - // --- [ glCompressedMultiTexImage3DEXT ] --- - - public static native void nglCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, long data); - - public static void glCompressedMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, imageSize, data); - } - - public static void glCompressedMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedMultiTexImage2DEXT ] --- - - public static native void nglCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int imageSize, long data); - - public static void glCompressedMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, imageSize, data); - } - - public static void glCompressedMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedMultiTexImage1DEXT ] --- - - public static native void nglCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int imageSize, long data); - - public static void glCompressedMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, data); - } - - public static void glCompressedMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedMultiTexSubImage3DEXT ] --- - - public static native void nglCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data); - - public static void glCompressedMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - public static void glCompressedMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedMultiTexSubImage2DEXT ] --- - - public static native void nglCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data); - - public static void glCompressedMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - public static void glCompressedMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedMultiTexSubImage1DEXT ] --- - - public static native void nglCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int imageSize, long data); - - public static void glCompressedMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, imageSize, data); - } - - public static void glCompressedMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, data.remaining(), memAddress(data)); - } - - // --- [ glGetCompressedMultiTexImageEXT ] --- - - public static native void nglGetCompressedMultiTexImageEXT(int texunit, int target, int level, long img); - - public static void glGetCompressedMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer img) { - if (CHECKS) { - if (DEBUG) { - check(img, glGetMultiTexLevelParameteriEXT(texunit, target, level, GL13.GL_TEXTURE_COMPRESSED_IMAGE_SIZE)); - } - } - nglGetCompressedMultiTexImageEXT(texunit, target, level, memAddress(img)); - } - - public static void glGetCompressedMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") long img) { - nglGetCompressedMultiTexImageEXT(texunit, target, level, img); - } - - // --- [ glMatrixLoadTransposefEXT ] --- - - public static native void nglMatrixLoadTransposefEXT(int matrixMode, long m); - - public static void glMatrixLoadTransposefEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixLoadTransposefEXT(matrixMode, memAddress(m)); - } - - // --- [ glMatrixLoadTransposedEXT ] --- - - public static native void nglMatrixLoadTransposedEXT(int matrixMode, long m); - - public static void glMatrixLoadTransposedEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixLoadTransposedEXT(matrixMode, memAddress(m)); - } - - // --- [ glMatrixMultTransposefEXT ] --- - - public static native void nglMatrixMultTransposefEXT(int matrixMode, long m); - - public static void glMatrixMultTransposefEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixMultTransposefEXT(matrixMode, memAddress(m)); - } - - // --- [ glMatrixMultTransposedEXT ] --- - - public static native void nglMatrixMultTransposedEXT(int matrixMode, long m); - - public static void glMatrixMultTransposedEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMatrixMultTransposedEXT(matrixMode, memAddress(m)); - } - - // --- [ glNamedBufferDataEXT ] --- - - public static native void nglNamedBufferDataEXT(int buffer, long size, long data, int usage); - - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int usage) { - nglNamedBufferDataEXT(buffer, size, NULL, usage); - } - - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferDataEXT(buffer, data.remaining(), memAddress(data), usage); - } - - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferDataEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data), usage); - } - - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferDataEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferDataEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferDataEXT(buffer, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), usage); - } - - // --- [ glNamedBufferSubDataEXT ] --- - - public static native void nglNamedBufferSubDataEXT(int buffer, long offset, long size, long data); - - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ByteBuffer data) { - nglNamedBufferSubDataEXT(buffer, offset, data.remaining(), memAddress(data)); - } - - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ShortBuffer data) { - nglNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") IntBuffer data) { - nglNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") FloatBuffer data) { - nglNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") DoubleBuffer data) { - nglNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glMapNamedBufferEXT ] --- - - public static native long nglMapNamedBufferEXT(int buffer, int access); - - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access) { - long __result = nglMapNamedBufferEXT(buffer, access); - return memByteBufferSafe(__result, glGetNamedBufferParameteriEXT(buffer, GL15.GL_BUFFER_SIZE)); - } - - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, @Nullable ByteBuffer old_buffer) { - long __result = nglMapNamedBufferEXT(buffer, access); - int length = glGetNamedBufferParameteriEXT(buffer, GL15.GL_BUFFER_SIZE); - return apiGetMappedBuffer(old_buffer, __result, length); - } - - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, long length, @Nullable ByteBuffer old_buffer) { - long __result = nglMapNamedBufferEXT(buffer, access); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - // --- [ glUnmapNamedBufferEXT ] --- - - @NativeType("GLboolean") - public static native boolean glUnmapNamedBufferEXT(@NativeType("GLuint") int buffer); - - // --- [ glGetNamedBufferParameterivEXT ] --- - - public static native void nglGetNamedBufferParameterivEXT(int buffer, int pname, long params); - - public static void glGetNamedBufferParameterivEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedBufferParameterivEXT(buffer, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetNamedBufferParameteriEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedBufferParameterivEXT(buffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedBufferSubDataEXT ] --- - - public static native void nglGetNamedBufferSubDataEXT(int buffer, long offset, long size, long data); - - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ByteBuffer data) { - nglGetNamedBufferSubDataEXT(buffer, offset, data.remaining(), memAddress(data)); - } - - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ShortBuffer data) { - nglGetNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") IntBuffer data) { - nglGetNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") FloatBuffer data) { - nglGetNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") DoubleBuffer data) { - nglGetNamedBufferSubDataEXT(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glProgramUniform1fEXT ] --- - - public static native void glProgramUniform1fEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float v0); - - // --- [ glProgramUniform2fEXT ] --- - - public static native void glProgramUniform2fEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1); - - // --- [ glProgramUniform3fEXT ] --- - - public static native void glProgramUniform3fEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2); - - // --- [ glProgramUniform4fEXT ] --- - - public static native void glProgramUniform4fEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3); - - // --- [ glProgramUniform1iEXT ] --- - - public static native void glProgramUniform1iEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int v0); - - // --- [ glProgramUniform2iEXT ] --- - - public static native void glProgramUniform2iEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1); - - // --- [ glProgramUniform3iEXT ] --- - - public static native void glProgramUniform3iEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2); - - // --- [ glProgramUniform4iEXT ] --- - - public static native void glProgramUniform4iEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2, @NativeType("GLint") int v3); - - // --- [ glProgramUniform1fvEXT ] --- - - public static native void nglProgramUniform1fvEXT(int program, int location, int count, long value); - - public static void glProgramUniform1fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform1fvEXT(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2fvEXT ] --- - - public static native void nglProgramUniform2fvEXT(int program, int location, int count, long value); - - public static void glProgramUniform2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform2fvEXT(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3fvEXT ] --- - - public static native void nglProgramUniform3fvEXT(int program, int location, int count, long value); - - public static void glProgramUniform3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform3fvEXT(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4fvEXT ] --- - - public static native void nglProgramUniform4fvEXT(int program, int location, int count, long value); - - public static void glProgramUniform4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform4fvEXT(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniform1ivEXT ] --- - - public static native void nglProgramUniform1ivEXT(int program, int location, int count, long value); - - public static void glProgramUniform1ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform1ivEXT(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2ivEXT ] --- - - public static native void nglProgramUniform2ivEXT(int program, int location, int count, long value); - - public static void glProgramUniform2ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform2ivEXT(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3ivEXT ] --- - - public static native void nglProgramUniform3ivEXT(int program, int location, int count, long value); - - public static void glProgramUniform3ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform3ivEXT(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4ivEXT ] --- - - public static native void nglProgramUniform4ivEXT(int program, int location, int count, long value); - - public static void glProgramUniform4ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform4ivEXT(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2fvEXT ] --- - - public static native void nglProgramUniformMatrix2fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix2fvEXT(program, location, value.remaining() >> 2, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3fvEXT ] --- - - public static native void nglProgramUniformMatrix3fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix3fvEXT(program, location, value.remaining() / 9, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4fvEXT ] --- - - public static native void nglProgramUniformMatrix4fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix4fvEXT(program, location, value.remaining() >> 4, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x3fvEXT ] --- - - public static native void nglProgramUniformMatrix2x3fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix2x3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix2x3fvEXT(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x2fvEXT ] --- - - public static native void nglProgramUniformMatrix3x2fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix3x2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix3x2fvEXT(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x4fvEXT ] --- - - public static native void nglProgramUniformMatrix2x4fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix2x4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix2x4fvEXT(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x2fvEXT ] --- - - public static native void nglProgramUniformMatrix4x2fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix4x2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix4x2fvEXT(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x4fvEXT ] --- - - public static native void nglProgramUniformMatrix3x4fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix3x4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix3x4fvEXT(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x3fvEXT ] --- - - public static native void nglProgramUniformMatrix4x3fvEXT(int program, int location, int count, boolean transpose, long value); - - public static void glProgramUniformMatrix4x3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix4x3fvEXT(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glTextureBufferEXT ] --- - - public static native void glTextureBufferEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer); - - // --- [ glMultiTexBufferEXT ] --- - - public static native void glMultiTexBufferEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer); - - // --- [ glTextureParameterIivEXT ] --- - - public static native void nglTextureParameterIivEXT(int texture, int target, int pname, long params); - - public static void glTextureParameterIivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTextureParameterIivEXT(texture, target, pname, memAddress(params)); - } - - // --- [ glTextureParameterIuivEXT ] --- - - public static native void nglTextureParameterIuivEXT(int texture, int target, int pname, long params); - - public static void glTextureParameterIuivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTextureParameterIuivEXT(texture, target, pname, memAddress(params)); - } - - // --- [ glGetTextureParameterIivEXT ] --- - - public static native void nglGetTextureParameterIivEXT(int texture, int target, int pname, long params); - - public static void glGetTextureParameterIivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameterIivEXT(texture, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetTextureParameterIiEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureParameterIivEXT(texture, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureParameterIuivEXT ] --- - - public static native void nglGetTextureParameterIuivEXT(int texture, int target, int pname, long params); - - public static void glGetTextureParameterIuivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameterIuivEXT(texture, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetTextureParameterIuiEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureParameterIuivEXT(texture, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMultiTexParameterIivEXT ] --- - - public static native void nglMultiTexParameterIivEXT(int texunit, int target, int pname, long params); - - public static void glMultiTexParameterIivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMultiTexParameterIivEXT(texunit, target, pname, memAddress(params)); - } - - // --- [ glMultiTexParameterIuivEXT ] --- - - public static native void nglMultiTexParameterIuivEXT(int texunit, int target, int pname, long params); - - public static void glMultiTexParameterIuivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMultiTexParameterIuivEXT(texunit, target, pname, memAddress(params)); - } - - // --- [ glGetMultiTexParameterIivEXT ] --- - - public static native void nglGetMultiTexParameterIivEXT(int texunit, int target, int pname, long params); - - public static void glGetMultiTexParameterIivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexParameterIivEXT(texunit, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetMultiTexParameterIiEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMultiTexParameterIivEXT(texunit, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMultiTexParameterIuivEXT ] --- - - public static native void nglGetMultiTexParameterIuivEXT(int texunit, int target, int pname, long params); - - public static void glGetMultiTexParameterIuivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMultiTexParameterIuivEXT(texunit, target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetMultiTexParameterIuiEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMultiTexParameterIuivEXT(texunit, target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glProgramUniform1uiEXT ] --- - - public static native void glProgramUniform1uiEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int v0); - - // --- [ glProgramUniform2uiEXT ] --- - - public static native void glProgramUniform2uiEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1); - - // --- [ glProgramUniform3uiEXT ] --- - - public static native void glProgramUniform3uiEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2); - - // --- [ glProgramUniform4uiEXT ] --- - - public static native void glProgramUniform4uiEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2, @NativeType("GLuint") int v3); - - // --- [ glProgramUniform1uivEXT ] --- - - public static native void nglProgramUniform1uivEXT(int program, int location, int count, long value); - - public static void glProgramUniform1uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform1uivEXT(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2uivEXT ] --- - - public static native void nglProgramUniform2uivEXT(int program, int location, int count, long value); - - public static void glProgramUniform2uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform2uivEXT(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3uivEXT ] --- - - public static native void nglProgramUniform3uivEXT(int program, int location, int count, long value); - - public static void glProgramUniform3uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform3uivEXT(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4uivEXT ] --- - - public static native void nglProgramUniform4uivEXT(int program, int location, int count, long value); - - public static void glProgramUniform4uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform4uivEXT(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glNamedProgramLocalParameters4fvEXT ] --- - - public static native void nglNamedProgramLocalParameters4fvEXT(int program, int target, int index, int count, long params); - - public static void glNamedProgramLocalParameters4fvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer params) { - nglNamedProgramLocalParameters4fvEXT(program, target, index, params.remaining() >> 2, memAddress(params)); - } - - // --- [ glNamedProgramLocalParameterI4iEXT ] --- - - public static native void glNamedProgramLocalParameterI4iEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glNamedProgramLocalParameterI4ivEXT ] --- - - public static native void nglNamedProgramLocalParameterI4ivEXT(int program, int target, int index, long params); - - public static void glNamedProgramLocalParameterI4ivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglNamedProgramLocalParameterI4ivEXT(program, target, index, memAddress(params)); - } - - // --- [ glNamedProgramLocalParametersI4ivEXT ] --- - - public static native void nglNamedProgramLocalParametersI4ivEXT(int program, int target, int index, int count, long params); - - public static void glNamedProgramLocalParametersI4ivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer params) { - nglNamedProgramLocalParametersI4ivEXT(program, target, index, params.remaining() >> 2, memAddress(params)); - } - - // --- [ glNamedProgramLocalParameterI4uiEXT ] --- - - public static native void glNamedProgramLocalParameterI4uiEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int x, @NativeType("GLuint") int y, @NativeType("GLuint") int z, @NativeType("GLuint") int w); - - // --- [ glNamedProgramLocalParameterI4uivEXT ] --- - - public static native void nglNamedProgramLocalParameterI4uivEXT(int program, int target, int index, long params); - - public static void glNamedProgramLocalParameterI4uivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglNamedProgramLocalParameterI4uivEXT(program, target, index, memAddress(params)); - } - - // --- [ glNamedProgramLocalParametersI4uivEXT ] --- - - public static native void nglNamedProgramLocalParametersI4uivEXT(int program, int target, int index, int count, long params); - - public static void glNamedProgramLocalParametersI4uivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer params) { - nglNamedProgramLocalParametersI4uivEXT(program, target, index, params.remaining() >> 2, memAddress(params)); - } - - // --- [ glGetNamedProgramLocalParameterIivEXT ] --- - - public static native void nglGetNamedProgramLocalParameterIivEXT(int program, int target, int index, long params); - - public static void glGetNamedProgramLocalParameterIivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetNamedProgramLocalParameterIivEXT(program, target, index, memAddress(params)); - } - - // --- [ glGetNamedProgramLocalParameterIuivEXT ] --- - - public static native void nglGetNamedProgramLocalParameterIuivEXT(int program, int target, int index, long params); - - public static void glGetNamedProgramLocalParameterIuivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetNamedProgramLocalParameterIuivEXT(program, target, index, memAddress(params)); - } - - // --- [ glNamedRenderbufferStorageEXT ] --- - - public static native void glNamedRenderbufferStorageEXT(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glGetNamedRenderbufferParameterivEXT ] --- - - public static native void nglGetNamedRenderbufferParameterivEXT(int renderbuffer, int pname, long params); - - public static void glGetNamedRenderbufferParameterivEXT(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedRenderbufferParameterivEXT(renderbuffer, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetNamedRenderbufferParameteriEXT(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedRenderbufferParameterivEXT(renderbuffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glNamedRenderbufferStorageMultisampleEXT ] --- - - public static native void glNamedRenderbufferStorageMultisampleEXT(@NativeType("GLuint") int renderbuffer, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glNamedRenderbufferStorageMultisampleCoverageEXT ] --- - - public static native void glNamedRenderbufferStorageMultisampleCoverageEXT(@NativeType("GLuint") int renderbuffer, @NativeType("GLsizei") int coverageSamples, @NativeType("GLsizei") int colorSamples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glCheckNamedFramebufferStatusEXT ] --- - - @NativeType("GLenum") - public static native int glCheckNamedFramebufferStatusEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int target); - - // --- [ glNamedFramebufferTexture1DEXT ] --- - - public static native void glNamedFramebufferTexture1DEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glNamedFramebufferTexture2DEXT ] --- - - public static native void glNamedFramebufferTexture2DEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glNamedFramebufferTexture3DEXT ] --- - - public static native void glNamedFramebufferTexture3DEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int zoffset); - - // --- [ glNamedFramebufferRenderbufferEXT ] --- - - public static native void glNamedFramebufferRenderbufferEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer); - - // --- [ glGetNamedFramebufferAttachmentParameterivEXT ] --- - - public static native void nglGetNamedFramebufferAttachmentParameterivEXT(int framebuffer, int attachment, int pname, long params); - - public static void glGetNamedFramebufferAttachmentParameterivEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetNamedFramebufferAttachmentParameteriEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenerateTextureMipmapEXT ] --- - - public static native void glGenerateTextureMipmapEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target); - - // --- [ glGenerateMultiTexMipmapEXT ] --- - - public static native void glGenerateMultiTexMipmapEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target); - - // --- [ glFramebufferDrawBufferEXT ] --- - - public static native void glFramebufferDrawBufferEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int mode); - - // --- [ glFramebufferDrawBuffersEXT ] --- - - public static native void nglFramebufferDrawBuffersEXT(int framebuffer, int n, long bufs); - - public static void glFramebufferDrawBuffersEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer bufs) { - nglFramebufferDrawBuffersEXT(framebuffer, bufs.remaining(), memAddress(bufs)); - } - - // --- [ glFramebufferReadBufferEXT ] --- - - public static native void glFramebufferReadBufferEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int mode); - - // --- [ glGetFramebufferParameterivEXT ] --- - - public static native void nglGetFramebufferParameterivEXT(int framebuffer, int pname, long param); - - public static void glGetFramebufferParameterivEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetFramebufferParameterivEXT(framebuffer, pname, memAddress(param)); - } - - @NativeType("void") - public static int glGetFramebufferParameteriEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer param = stack.callocInt(1); - nglGetFramebufferParameterivEXT(framebuffer, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glNamedCopyBufferSubDataEXT ] --- - - public static native void glNamedCopyBufferSubDataEXT(@NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size); - - // --- [ glNamedFramebufferTextureEXT ] --- - - public static native void glNamedFramebufferTextureEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glNamedFramebufferTextureLayerEXT ] --- - - public static native void glNamedFramebufferTextureLayerEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer); - - // --- [ glNamedFramebufferTextureFaceEXT ] --- - - public static native void glNamedFramebufferTextureFaceEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int face); - - // --- [ glTextureRenderbufferEXT ] --- - - public static native void glTextureRenderbufferEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLuint") int renderbuffer); - - // --- [ glMultiTexRenderbufferEXT ] --- - - public static native void glMultiTexRenderbufferEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLuint") int renderbuffer); - - // --- [ glVertexArrayVertexOffsetEXT ] --- - - public static native void glVertexArrayVertexOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayColorOffsetEXT ] --- - - public static native void glVertexArrayColorOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayEdgeFlagOffsetEXT ] --- - - public static native void glVertexArrayEdgeFlagOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayIndexOffsetEXT ] --- - - public static native void glVertexArrayIndexOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayNormalOffsetEXT ] --- - - public static native void glVertexArrayNormalOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayTexCoordOffsetEXT ] --- - - public static native void glVertexArrayTexCoordOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayMultiTexCoordOffsetEXT ] --- - - public static native void glVertexArrayMultiTexCoordOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayFogCoordOffsetEXT ] --- - - public static native void glVertexArrayFogCoordOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArraySecondaryColorOffsetEXT ] --- - - public static native void glVertexArraySecondaryColorOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayVertexAttribOffsetEXT ] --- - - public static native void glVertexArrayVertexAttribOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glVertexArrayVertexAttribIOffsetEXT ] --- - - public static native void glVertexArrayVertexAttribIOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset); - - // --- [ glEnableVertexArrayEXT ] --- - - public static native void glEnableVertexArrayEXT(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int array); - - // --- [ glDisableVertexArrayEXT ] --- - - public static native void glDisableVertexArrayEXT(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int array); - - // --- [ glEnableVertexArrayAttribEXT ] --- - - public static native void glEnableVertexArrayAttribEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index); - - // --- [ glDisableVertexArrayAttribEXT ] --- - - public static native void glDisableVertexArrayAttribEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index); - - // --- [ glGetVertexArrayIntegervEXT ] --- - - public static native void nglGetVertexArrayIntegervEXT(int vaobj, int pname, long param); - - public static void glGetVertexArrayIntegervEXT(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetVertexArrayIntegervEXT(vaobj, pname, memAddress(param)); - } - - @NativeType("void") - public static int glGetVertexArrayIntegerEXT(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer param = stack.callocInt(1); - nglGetVertexArrayIntegervEXT(vaobj, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexArrayPointervEXT ] --- - - public static native void nglGetVertexArrayPointervEXT(int vaobj, int pname, long param); - - public static void glGetVertexArrayPointervEXT(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetVertexArrayPointervEXT(vaobj, pname, memAddress(param)); - } - - @NativeType("void") - public static long glGetVertexArrayPointerEXT(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer param = stack.callocPointer(1); - nglGetVertexArrayPointervEXT(vaobj, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexArrayIntegeri_vEXT ] --- - - public static native void nglGetVertexArrayIntegeri_vEXT(int vaobj, int index, int pname, long param); - - public static void glGetVertexArrayIntegeri_vEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetVertexArrayIntegeri_vEXT(vaobj, index, pname, memAddress(param)); - } - - @NativeType("void") - public static int glGetVertexArrayIntegeriEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer param = stack.callocInt(1); - nglGetVertexArrayIntegeri_vEXT(vaobj, index, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexArrayPointeri_vEXT ] --- - - public static native void nglGetVertexArrayPointeri_vEXT(int vaobj, int index, int pname, long param); - - public static void glGetVertexArrayPointeri_vEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetVertexArrayPointeri_vEXT(vaobj, index, pname, memAddress(param)); - } - - @NativeType("void") - public static long glGetVertexArrayPointeriEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer param = stack.callocPointer(1); - nglGetVertexArrayPointeri_vEXT(vaobj, index, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMapNamedBufferRangeEXT ] --- - - public static native long nglMapNamedBufferRangeEXT(int buffer, long offset, long length, int access); - - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRangeEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access) { - long __result = nglMapNamedBufferRangeEXT(buffer, offset, length, access); - return memByteBufferSafe(__result, (int)length); - } - - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRangeEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access, @Nullable ByteBuffer old_buffer) { - long __result = nglMapNamedBufferRangeEXT(buffer, offset, length, access); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - // --- [ glFlushMappedNamedBufferRangeEXT ] --- - - public static native void glFlushMappedNamedBufferRangeEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length); - - /** Array version of: {@link #glMatrixLoadfEXT MatrixLoadfEXT} */ - public static void glMatrixLoadfEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixLoadfEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixLoaddEXT MatrixLoaddEXT} */ - public static void glMatrixLoaddEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glMatrixLoaddEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixMultfEXT MatrixMultfEXT} */ - public static void glMatrixMultfEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixMultfEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixMultdEXT MatrixMultdEXT} */ - public static void glMatrixMultdEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glMatrixMultdEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glTextureParameterivEXT TextureParameterivEXT} */ - public static void glTextureParameterivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] param) { - long __functionAddress = GL.getICD().glTextureParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(param, 4); - } - callPV(texture, target, pname, param, __functionAddress); - } - - /** Array version of: {@link #glTextureParameterfvEXT TextureParameterfvEXT} */ - public static void glTextureParameterfvEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] param) { - long __functionAddress = GL.getICD().glTextureParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(param, 4); - } - callPV(texture, target, pname, param, __functionAddress); - } - - /** Array version of: {@link #glTextureImage1DEXT TextureImage1DEXT} */ - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage1DEXT TextureImage1DEXT} */ - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage1DEXT TextureImage1DEXT} */ - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage1DEXT TextureImage1DEXT} */ - public static void glTextureImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage2DEXT TextureImage2DEXT} */ - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage2DEXT TextureImage2DEXT} */ - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage2DEXT TextureImage2DEXT} */ - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage2DEXT TextureImage2DEXT} */ - public static void glTextureImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage1DEXT TextureSubImage1DEXT} */ - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage1DEXT TextureSubImage1DEXT} */ - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage1DEXT TextureSubImage1DEXT} */ - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage1DEXT TextureSubImage1DEXT} */ - public static void glTextureSubImage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage2DEXT TextureSubImage2DEXT} */ - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage2DEXT TextureSubImage2DEXT} */ - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage2DEXT TextureSubImage2DEXT} */ - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage2DEXT TextureSubImage2DEXT} */ - public static void glTextureSubImage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetTextureImageEXT GetTextureImageEXT} */ - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetTextureImageEXT GetTextureImageEXT} */ - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetTextureImageEXT GetTextureImageEXT} */ - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetTextureImageEXT GetTextureImageEXT} */ - public static void glGetTextureImageEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetTextureParameterfvEXT GetTextureParameterfvEXT} */ - public static void glGetTextureParameterfvEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetTextureParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetTextureParameterivEXT GetTextureParameterivEXT} */ - public static void glGetTextureParameterivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetTextureLevelParameterfvEXT GetTextureLevelParameterfvEXT} */ - public static void glGetTextureLevelParameterfvEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetTextureLevelParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, target, level, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetTextureLevelParameterivEXT GetTextureLevelParameterivEXT} */ - public static void glGetTextureLevelParameterivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureLevelParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, target, level, pname, params, __functionAddress); - } - - /** Array version of: {@link #glTextureImage3DEXT TextureImage3DEXT} */ - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage3DEXT TextureImage3DEXT} */ - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage3DEXT TextureImage3DEXT} */ - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureImage3DEXT TextureImage3DEXT} */ - public static void glTextureImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage3DEXT TextureSubImage3DEXT} */ - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage3DEXT TextureSubImage3DEXT} */ - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage3DEXT TextureSubImage3DEXT} */ - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glTextureSubImage3DEXT TextureSubImage3DEXT} */ - public static void glTextureSubImage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoordPointerEXT MultiTexCoordPointerEXT} */ - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") short[] pointer) { - long __functionAddress = GL.getICD().glMultiTexCoordPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoordPointerEXT MultiTexCoordPointerEXT} */ - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") int[] pointer) { - long __functionAddress = GL.getICD().glMultiTexCoordPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoordPointerEXT MultiTexCoordPointerEXT} */ - public static void glMultiTexCoordPointerEXT(@NativeType("GLenum") int texunit, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") float[] pointer) { - long __functionAddress = GL.getICD().glMultiTexCoordPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glMultiTexEnvfvEXT MultiTexEnvfvEXT} */ - public static void glMultiTexEnvfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glMultiTexEnvfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexEnvivEXT MultiTexEnvivEXT} */ - public static void glMultiTexEnvivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glMultiTexEnvivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexGendvEXT MultiTexGendvEXT} */ - public static void glMultiTexGendvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble const *") double[] params) { - long __functionAddress = GL.getICD().glMultiTexGendvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texunit, coord, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexGenfvEXT MultiTexGenfvEXT} */ - public static void glMultiTexGenfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glMultiTexGenfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texunit, coord, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexGenivEXT MultiTexGenivEXT} */ - public static void glMultiTexGenivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glMultiTexGenivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texunit, coord, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexEnvfvEXT GetMultiTexEnvfvEXT} */ - public static void glGetMultiTexEnvfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetMultiTexEnvfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexEnvivEXT GetMultiTexEnvivEXT} */ - public static void glGetMultiTexEnvivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetMultiTexEnvivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexGendvEXT GetMultiTexGendvEXT} */ - public static void glGetMultiTexGendvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetMultiTexGendvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, coord, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexGenfvEXT GetMultiTexGenfvEXT} */ - public static void glGetMultiTexGenfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetMultiTexGenfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, coord, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexGenivEXT GetMultiTexGenivEXT} */ - public static void glGetMultiTexGenivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetMultiTexGenivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, coord, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexParameterivEXT MultiTexParameterivEXT} */ - public static void glMultiTexParameterivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] param) { - long __functionAddress = GL.getICD().glMultiTexParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(param, 4); - } - callPV(texunit, target, pname, param, __functionAddress); - } - - /** Array version of: {@link #glMultiTexParameterfvEXT MultiTexParameterfvEXT} */ - public static void glMultiTexParameterfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] param) { - long __functionAddress = GL.getICD().glMultiTexParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(param, 4); - } - callPV(texunit, target, pname, param, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage1DEXT MultiTexImage1DEXT} */ - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage1DEXT MultiTexImage1DEXT} */ - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage1DEXT MultiTexImage1DEXT} */ - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage1DEXT MultiTexImage1DEXT} */ - public static void glMultiTexImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage2DEXT MultiTexImage2DEXT} */ - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage2DEXT MultiTexImage2DEXT} */ - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage2DEXT MultiTexImage2DEXT} */ - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage2DEXT MultiTexImage2DEXT} */ - public static void glMultiTexImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage1DEXT MultiTexSubImage1DEXT} */ - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage1DEXT MultiTexSubImage1DEXT} */ - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage1DEXT MultiTexSubImage1DEXT} */ - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage1DEXT MultiTexSubImage1DEXT} */ - public static void glMultiTexSubImage1DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage1DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage2DEXT MultiTexSubImage2DEXT} */ - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage2DEXT MultiTexSubImage2DEXT} */ - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage2DEXT MultiTexSubImage2DEXT} */ - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage2DEXT MultiTexSubImage2DEXT} */ - public static void glMultiTexSubImage2DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage2DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexImageEXT GetMultiTexImageEXT} */ - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glGetMultiTexImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexImageEXT GetMultiTexImageEXT} */ - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glGetMultiTexImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexImageEXT GetMultiTexImageEXT} */ - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glGetMultiTexImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexImageEXT GetMultiTexImageEXT} */ - public static void glGetMultiTexImageEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - long __functionAddress = GL.getICD().glGetMultiTexImageEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexParameterfvEXT GetMultiTexParameterfvEXT} */ - public static void glGetMultiTexParameterfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetMultiTexParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexParameterivEXT GetMultiTexParameterivEXT} */ - public static void glGetMultiTexParameterivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetMultiTexParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexLevelParameterfvEXT GetMultiTexLevelParameterfvEXT} */ - public static void glGetMultiTexLevelParameterfvEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetMultiTexLevelParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, level, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexLevelParameterivEXT GetMultiTexLevelParameterivEXT} */ - public static void glGetMultiTexLevelParameterivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetMultiTexLevelParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, level, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage3DEXT MultiTexImage3DEXT} */ - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage3DEXT MultiTexImage3DEXT} */ - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage3DEXT MultiTexImage3DEXT} */ - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexImage3DEXT MultiTexImage3DEXT} */ - public static void glMultiTexImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glMultiTexImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage3DEXT MultiTexSubImage3DEXT} */ - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage3DEXT MultiTexSubImage3DEXT} */ - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage3DEXT MultiTexSubImage3DEXT} */ - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glMultiTexSubImage3DEXT MultiTexSubImage3DEXT} */ - public static void glMultiTexSubImage3DEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glMultiTexSubImage3DEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** Array version of: {@link #glGetFloatIndexedvEXT GetFloatIndexedvEXT} */ - public static void glGetFloatIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetFloatIndexedvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetDoubleIndexedvEXT GetDoubleIndexedvEXT} */ - public static void glGetDoubleIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetDoubleIndexedvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetFloati_vEXT GetFloati_vEXT} */ - public static void glGetFloati_vEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetFloati_vEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetDoublei_vEXT GetDoublei_vEXT} */ - public static void glGetDoublei_vEXT(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetDoublei_vEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetIntegerIndexedvEXT GetIntegerIndexedvEXT} */ - public static void glGetIntegerIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") int[] data) { - EXTDrawBuffers2.glGetIntegerIndexedvEXT(target, index, data); - } - - /** Array version of: {@link #glNamedProgramLocalParameter4dvEXT NamedProgramLocalParameter4dvEXT} */ - public static void glNamedProgramLocalParameter4dvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] params) { - long __functionAddress = GL.getICD().glNamedProgramLocalParameter4dvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glNamedProgramLocalParameter4fvEXT NamedProgramLocalParameter4fvEXT} */ - public static void glNamedProgramLocalParameter4fvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glNamedProgramLocalParameter4fvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedProgramLocalParameterdvEXT GetNamedProgramLocalParameterdvEXT} */ - public static void glGetNamedProgramLocalParameterdvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetNamedProgramLocalParameterdvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedProgramLocalParameterfvEXT GetNamedProgramLocalParameterfvEXT} */ - public static void glGetNamedProgramLocalParameterfvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetNamedProgramLocalParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedProgramivEXT GetNamedProgramivEXT} */ - public static void glGetNamedProgramivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedProgramivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMatrixLoadTransposefEXT MatrixLoadTransposefEXT} */ - public static void glMatrixLoadTransposefEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixLoadTransposefEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixLoadTransposedEXT MatrixLoadTransposedEXT} */ - public static void glMatrixLoadTransposedEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glMatrixLoadTransposedEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixMultTransposefEXT MatrixMultTransposefEXT} */ - public static void glMatrixMultTransposefEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixMultTransposefEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixMultTransposedEXT MatrixMultTransposedEXT} */ - public static void glMatrixMultTransposedEXT(@NativeType("GLenum") int matrixMode, @NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glMatrixMultTransposedEXT; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferDataEXT NamedBufferDataEXT} */ - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 1, data, usage, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferDataEXT NamedBufferDataEXT} */ - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferDataEXT NamedBufferDataEXT} */ - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferDataEXT NamedBufferDataEXT} */ - public static void glNamedBufferDataEXT(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 3, data, usage, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferSubDataEXT NamedBufferSubDataEXT} */ - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferSubDataEXT NamedBufferSubDataEXT} */ - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferSubDataEXT NamedBufferSubDataEXT} */ - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glNamedBufferSubDataEXT NamedBufferSubDataEXT} */ - public static void glNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") double[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** Array version of: {@link #glGetNamedBufferParameterivEXT GetNamedBufferParameterivEXT} */ - public static void glGetNamedBufferParameterivEXT(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedBufferParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(buffer, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedBufferSubDataEXT GetNamedBufferSubDataEXT} */ - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") short[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** Array version of: {@link #glGetNamedBufferSubDataEXT GetNamedBufferSubDataEXT} */ - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") int[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glGetNamedBufferSubDataEXT GetNamedBufferSubDataEXT} */ - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") float[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glGetNamedBufferSubDataEXT GetNamedBufferSubDataEXT} */ - public static void glGetNamedBufferSubDataEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") double[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubDataEXT; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform1fvEXT ProgramUniform1fvEXT} */ - public static void glProgramUniform1fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform1fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2fvEXT ProgramUniform2fvEXT} */ - public static void glProgramUniform2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform2fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3fvEXT ProgramUniform3fvEXT} */ - public static void glProgramUniform3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform3fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4fvEXT ProgramUniform4fvEXT} */ - public static void glProgramUniform4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform4fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform1ivEXT ProgramUniform1ivEXT} */ - public static void glProgramUniform1ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform1ivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2ivEXT ProgramUniform2ivEXT} */ - public static void glProgramUniform2ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform2ivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3ivEXT ProgramUniform3ivEXT} */ - public static void glProgramUniform3ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform3ivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4ivEXT ProgramUniform4ivEXT} */ - public static void glProgramUniform4ivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform4ivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix2fvEXT ProgramUniformMatrix2fvEXT} */ - public static void glProgramUniformMatrix2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix3fvEXT ProgramUniformMatrix3fvEXT} */ - public static void glProgramUniformMatrix3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 9, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix4fvEXT ProgramUniformMatrix4fvEXT} */ - public static void glProgramUniformMatrix4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 4, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix2x3fvEXT ProgramUniformMatrix2x3fvEXT} */ - public static void glProgramUniformMatrix2x3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x3fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix3x2fvEXT ProgramUniformMatrix3x2fvEXT} */ - public static void glProgramUniformMatrix3x2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x2fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix2x4fvEXT ProgramUniformMatrix2x4fvEXT} */ - public static void glProgramUniformMatrix2x4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x4fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix4x2fvEXT ProgramUniformMatrix4x2fvEXT} */ - public static void glProgramUniformMatrix4x2fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x2fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix3x4fvEXT ProgramUniformMatrix3x4fvEXT} */ - public static void glProgramUniformMatrix3x4fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x4fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformMatrix4x3fvEXT ProgramUniformMatrix4x3fvEXT} */ - public static void glProgramUniformMatrix4x3fvEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x3fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - - /** Array version of: {@link #glTextureParameterIivEXT TextureParameterIivEXT} */ - public static void glTextureParameterIivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glTextureParameterIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texture, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glTextureParameterIuivEXT TextureParameterIuivEXT} */ - public static void glTextureParameterIuivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - long __functionAddress = GL.getICD().glTextureParameterIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texture, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetTextureParameterIivEXT GetTextureParameterIivEXT} */ - public static void glGetTextureParameterIivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureParameterIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetTextureParameterIuivEXT GetTextureParameterIuivEXT} */ - public static void glGetTextureParameterIuivEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureParameterIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexParameterIivEXT MultiTexParameterIivEXT} */ - public static void glMultiTexParameterIivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glMultiTexParameterIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMultiTexParameterIuivEXT MultiTexParameterIuivEXT} */ - public static void glMultiTexParameterIuivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - long __functionAddress = GL.getICD().glMultiTexParameterIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexParameterIivEXT GetMultiTexParameterIivEXT} */ - public static void glGetMultiTexParameterIivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetMultiTexParameterIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMultiTexParameterIuivEXT GetMultiTexParameterIuivEXT} */ - public static void glGetMultiTexParameterIuivEXT(@NativeType("GLenum") int texunit, @NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetMultiTexParameterIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texunit, target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform1uivEXT ProgramUniform1uivEXT} */ - public static void glProgramUniform1uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform1uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2uivEXT ProgramUniform2uivEXT} */ - public static void glProgramUniform2uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform2uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3uivEXT ProgramUniform3uivEXT} */ - public static void glProgramUniform3uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform3uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4uivEXT ProgramUniform4uivEXT} */ - public static void glProgramUniform4uivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform4uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glNamedProgramLocalParameters4fvEXT NamedProgramLocalParameters4fvEXT} */ - public static void glNamedProgramLocalParameters4fvEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glNamedProgramLocalParameters4fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, target, index, params.length >> 2, params, __functionAddress); - } - - /** Array version of: {@link #glNamedProgramLocalParameterI4ivEXT NamedProgramLocalParameterI4ivEXT} */ - public static void glNamedProgramLocalParameterI4ivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glNamedProgramLocalParameterI4ivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glNamedProgramLocalParametersI4ivEXT NamedProgramLocalParametersI4ivEXT} */ - public static void glNamedProgramLocalParametersI4ivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glNamedProgramLocalParametersI4ivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, target, index, params.length >> 2, params, __functionAddress); - } - - /** Array version of: {@link #glNamedProgramLocalParameterI4uivEXT NamedProgramLocalParameterI4uivEXT} */ - public static void glNamedProgramLocalParameterI4uivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint const *") int[] params) { - long __functionAddress = GL.getICD().glNamedProgramLocalParameterI4uivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glNamedProgramLocalParametersI4uivEXT NamedProgramLocalParametersI4uivEXT} */ - public static void glNamedProgramLocalParametersI4uivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint const *") int[] params) { - long __functionAddress = GL.getICD().glNamedProgramLocalParametersI4uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, target, index, params.length >> 2, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedProgramLocalParameterIivEXT GetNamedProgramLocalParameterIivEXT} */ - public static void glGetNamedProgramLocalParameterIivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedProgramLocalParameterIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedProgramLocalParameterIuivEXT GetNamedProgramLocalParameterIuivEXT} */ - public static void glGetNamedProgramLocalParameterIuivEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedProgramLocalParameterIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(program, target, index, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedRenderbufferParameterivEXT GetNamedRenderbufferParameterivEXT} */ - public static void glGetNamedRenderbufferParameterivEXT(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedRenderbufferParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(renderbuffer, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedFramebufferAttachmentParameterivEXT GetNamedFramebufferAttachmentParameterivEXT} */ - public static void glGetNamedFramebufferAttachmentParameterivEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedFramebufferAttachmentParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(framebuffer, attachment, pname, params, __functionAddress); - } - - /** Array version of: {@link #glFramebufferDrawBuffersEXT FramebufferDrawBuffersEXT} */ - public static void glFramebufferDrawBuffersEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] bufs) { - long __functionAddress = GL.getICD().glFramebufferDrawBuffersEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffer, bufs.length, bufs, __functionAddress); - } - - /** Array version of: {@link #glGetFramebufferParameterivEXT GetFramebufferParameterivEXT} */ - public static void glGetFramebufferParameterivEXT(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - long __functionAddress = GL.getICD().glGetFramebufferParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(framebuffer, pname, param, __functionAddress); - } - - /** Array version of: {@link #glGetVertexArrayIntegervEXT GetVertexArrayIntegervEXT} */ - public static void glGetVertexArrayIntegervEXT(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - long __functionAddress = GL.getICD().glGetVertexArrayIntegervEXT; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(vaobj, pname, param, __functionAddress); - } - - /** Array version of: {@link #glGetVertexArrayIntegeri_vEXT GetVertexArrayIntegeri_vEXT} */ - public static void glGetVertexArrayIntegeri_vEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - long __functionAddress = GL.getICD().glGetVertexArrayIntegeri_vEXT; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(vaobj, index, pname, param, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDrawBuffers2.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTDrawBuffers2.java deleted file mode 100644 index 22081fca..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDrawBuffers2.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_draw_buffers2 extension. - * - *

    This extension builds upon the ARB_draw_buffers extension and provides separate blend enables and color write masks for each color output. In - * ARB_draw_buffers (part of OpenGL 2.0), separate values can be written to each color buffer, but the blend enable and color write mask are global and - * apply to all color outputs.

    - * - *

    While this extension does provide separate blend enables, it does not provide separate blend functions or blend equations per color output.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public class EXTDrawBuffers2 { - - static { GL.initialize(); } - - protected EXTDrawBuffers2() { - throw new UnsupportedOperationException(); - } - - // --- [ glColorMaskIndexedEXT ] --- - - public static native void glColorMaskIndexedEXT(@NativeType("GLuint") int index, @NativeType("GLboolean") boolean r, @NativeType("GLboolean") boolean g, @NativeType("GLboolean") boolean b, @NativeType("GLboolean") boolean a); - - // --- [ glGetBooleanIndexedvEXT ] --- - - public static native void nglGetBooleanIndexedvEXT(int target, int index, long data); - - public static void glGetBooleanIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLboolean *") ByteBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetBooleanIndexedvEXT(target, index, memAddress(data)); - } - - @NativeType("void") - public static boolean glGetBooleanIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - ByteBuffer data = stack.calloc(1); - nglGetBooleanIndexedvEXT(target, index, memAddress(data)); - return data.get(0) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetIntegerIndexedvEXT ] --- - - public static native void nglGetIntegerIndexedvEXT(int target, int index, long data); - - public static void glGetIntegerIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetIntegerIndexedvEXT(target, index, memAddress(data)); - } - - @NativeType("void") - public static int glGetIntegerIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetIntegerIndexedvEXT(target, index, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glEnableIndexedEXT ] --- - - public static native void glEnableIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index); - - // --- [ glDisableIndexedEXT ] --- - - public static native void glDisableIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index); - - // --- [ glIsEnabledIndexedEXT ] --- - - @NativeType("GLboolean") - public static native boolean glIsEnabledIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index); - - /** Array version of: {@link #glGetIntegerIndexedvEXT GetIntegerIndexedvEXT} */ - public static void glGetIntegerIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetIntegerIndexedvEXT; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(target, index, data, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDrawInstanced.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTDrawInstanced.java deleted file mode 100644 index 5eb03005..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTDrawInstanced.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_draw_instanced extension. - * - *

    This extension provides the means to render multiple instances of an object with a single draw call, and an "instance ID" variable which can be used by - * the vertex program to compute per-instance values, typically an object's transform.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public class EXTDrawInstanced { - - static { GL.initialize(); } - - protected EXTDrawInstanced() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawArraysInstancedEXT ] --- - - public static native void glDrawArraysInstancedEXT(@NativeType("GLenum") int mode, @NativeType("GLint") int start, @NativeType("GLsizei") int count, @NativeType("GLsizei") int primcount); - - // --- [ glDrawElementsInstancedEXT ] --- - - public static native void nglDrawElementsInstancedEXT(int mode, int count, int type, long indices, int primcount); - - public static void glDrawElementsInstancedEXT(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedEXT(mode, count, type, indices, primcount); - } - - public static void glDrawElementsInstancedEXT(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedEXT(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), primcount); - } - - public static void glDrawElementsInstancedEXT(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedEXT(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), primcount); - } - - public static void glDrawElementsInstancedEXT(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedEXT(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), primcount); - } - - public static void glDrawElementsInstancedEXT(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstancedEXT(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), primcount); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTEGLImageStorage.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTEGLImageStorage.java deleted file mode 100644 index 3c29aac4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTEGLImageStorage.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_EGL_image_storage extension. - * - *

    The OpenGL ES extension {@code OES_EGL_image} provides a mechanism for creating GL textures sharing storage with {@code EGLImage} objects (in other - * words, creating GL texture {@code EGLImage} targets). The extension was written against the OpenGL ES 2.0 specification, which does not have the - * concept of immutable textures. As a result, it specifies that respecification of a texture by calling {@code TexImage*} on a texture that is an - * {@code EGLImage} target causes it to be implicitly orphaned. In most cases, this is not the desired behavior, but rather a result of an application - * error.

    - * - *

    This extension provides a mechanism for creating texture objects that are both {@code EGLImage} targets and immutable. Since immutable textures cannot - * be respecified, they also cannot accidentally be orphaned, and attempts to do so generate errors instead of resulting in well-defined, but often - * undesirable and surprising behavior. It provides a strong guarantee that texture data that is intended to be shared will remain shared.

    - * - *

    Requires {@link GL42 OpenGL 4.2} or {@link ARBTextureStorage ARB_texture_storage}. Requires EGL 1.4 and either the {@code EGL_KHR_image} or {@code EGL_KHR_image_base} extensions.

    - */ -public class EXTEGLImageStorage { - - static { GL.initialize(); } - - protected EXTEGLImageStorage() { - throw new UnsupportedOperationException(); - } - - // --- [ glEGLImageTargetTexStorageEXT ] --- - - public static native void nglEGLImageTargetTexStorageEXT(int target, long image, long attrib_list); - - public static void glEGLImageTargetTexStorageEXT(@NativeType("GLenum") int target, @NativeType("GLeglImageOES") long image, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - check(image); - checkNTSafe(attrib_list); - } - nglEGLImageTargetTexStorageEXT(target, image, memAddressSafe(attrib_list)); - } - - // --- [ glEGLImageTargetTextureStorageEXT ] --- - - public static native void nglEGLImageTargetTextureStorageEXT(int texture, long image, long attrib_list); - - public static void glEGLImageTargetTextureStorageEXT(@NativeType("GLuint") int texture, @NativeType("GLeglImageOES") long image, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - check(image); - checkNTSafe(attrib_list); - } - nglEGLImageTargetTextureStorageEXT(texture, image, memAddressSafe(attrib_list)); - } - - /** Array version of: {@link #glEGLImageTargetTexStorageEXT EGLImageTargetTexStorageEXT} */ - public static void glEGLImageTargetTexStorageEXT(@NativeType("GLenum") int target, @NativeType("GLeglImageOES") long image, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getICD().glEGLImageTargetTexStorageEXT; - if (CHECKS) { - check(__functionAddress); - check(image); - checkNTSafe(attrib_list); - } - callPPV(target, image, attrib_list, __functionAddress); - } - - /** Array version of: {@link #glEGLImageTargetTextureStorageEXT EGLImageTargetTextureStorageEXT} */ - public static void glEGLImageTargetTextureStorageEXT(@NativeType("GLuint") int texture, @NativeType("GLeglImageOES") long image, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getICD().glEGLImageTargetTextureStorageEXT; - if (CHECKS) { - check(__functionAddress); - check(image); - checkNTSafe(attrib_list); - } - callPPV(texture, image, attrib_list, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTExternalBuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTExternalBuffer.java deleted file mode 100644 index 858056be..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTExternalBuffer.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; - -/** - * Native bindings to the EXT_external_buffer extension. - * - *

    Extension EXT_buffer_storage introduced immutable storage buffers to OpenGL ES. This extension allows the data store for an immutable buffer to be - * sourced from an external {@code EGLClientBuffer}, allowing sharing of EGL client buffers across APIs, across processes, and across different processing - * cores such as the GPU, CPU, and DSP.

    - * - *

    Operations can then be performed on the external buffer using standard GL buffer object procedures. The data in the allocation is not copied to the - * buffer object's data store; the external allocation represents a single memory allocation that can be shared across multiple GL objects -- this aspect - * is similar to EGL external images. On the other hand, the external buffer does not provide lifetime guarantees including orphaning and sibling behavior - * as provided by EGL external images.

    - * - *

    The {@code EGLClientBuffer} must be allocated in a way which permits this shared access. For example, on Android via a shareable Android hardware - * buffer. This extension does not enable support for arbitrary {@code EGLClientBuffers} to be used as an external buffer.

    - * - *

    It is the application's responsibility to ensure synchronization between operations performed by separate components (DSP / CPU / GPU) and processes on - * the external buffer. Additionally the application is responsible for avoiding violating existing GL spec requirements. For example, mapping a single - * shared allocation to two GL buffer objects and then performing {@code CopyBufferSubData} such that the read and write regions overlap would violate the - * existing {@code CopyBufferSubData} spec regarding copies performed with the same buffer set for source and destination.

    - * - *

    The application must take any steps necessary to ensure memory access to the external buffer behaves as required by the application. For example, - * preventing compilation differences in data padding from causing data to be inadvertently corrupted by using defined structure alignment methods such as - * the std140 layout qualifier. The application is responsible for managing the lifetime of the external buffer, ensuring that the external buffer is not - * deleted as long as there are any GL buffer objects referring to it.

    - * - *

    Requires {@link GL44 OpenGL 4.4}.

    - */ -public class EXTExternalBuffer { - - static { GL.initialize(); } - - protected EXTExternalBuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ glBufferStorageExternalEXT ] --- - - public static native void nglBufferStorageExternalEXT(int target, long offset, long size, long clientBuffer, int flags); - - public static void glBufferStorageExternalEXT(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLeglClientBufferEXT") long clientBuffer, @NativeType("GLbitfield") int flags) { - if (CHECKS) { - check(clientBuffer); - } - nglBufferStorageExternalEXT(target, offset, size, clientBuffer, flags); - } - - // --- [ glNamedBufferStorageExternalEXT ] --- - - public static native void nglNamedBufferStorageExternalEXT(int buffer, long offset, long size, long clientBuffer, int flags); - - public static void glNamedBufferStorageExternalEXT(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLeglClientBufferEXT") long clientBuffer, @NativeType("GLbitfield") int flags) { - if (CHECKS) { - check(clientBuffer); - } - nglNamedBufferStorageExternalEXT(buffer, offset, size, clientBuffer, flags); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferBlit.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferBlit.java deleted file mode 100644 index 33db7ca8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferBlit.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_framebuffer_blit extension. - * - *

    This extension modifies EXT_framebuffer_object by splitting the framebuffer object binding point into separate DRAW and READ bindings. This allows - * copying directly from one framebuffer to another. In addition, a new high performance blit function is added to facilitate these blits and perform some - * data conversion where allowed.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class EXTFramebufferBlit { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameter of BindFramebufferEXT, CheckFramebufferStatusEXT, FramebufferTexture{1D|2D|3D}EXT, FramebufferRenderbufferEXT, - * and GetFramebufferAttachmentParameterivEXT. - */ - public static final int - GL_READ_FRAMEBUFFER_EXT = 0x8CA8, - GL_DRAW_FRAMEBUFFER_EXT = 0x8CA9; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_DRAW_FRAMEBUFFER_BINDING_EXT = 0x8CA6, - GL_READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA; - - protected EXTFramebufferBlit() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlitFramebufferEXT ] --- - - public static native void glBlitFramebufferEXT(@NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferBlitLayers.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferBlitLayers.java deleted file mode 100644 index 9df8ab86..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferBlitLayers.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_framebuffer_blit_layers extension. - * - *

    This extensions defines the behaviour for copying data from one layered framebuffer to another layered framebuffer.

    - * - *

    Requires {@link GL30 OpenGL 3.0} or {@link EXTFramebufferBlit EXT_framebuffer_blit}.

    - */ -public class EXTFramebufferBlitLayers { - - static { GL.initialize(); } - - protected EXTFramebufferBlitLayers() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlitFramebufferLayersEXT ] --- - - public static native void glBlitFramebufferLayersEXT(@NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter); - - // --- [ glBlitFramebufferLayerEXT ] --- - - public static native void glBlitFramebufferLayerEXT(@NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int srcLayer, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLint") int dstLayer, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisample.java deleted file mode 100644 index 4c1bc8ef..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisample.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_framebuffer_multisample extension. - * - *

    This extension extends the EXT_framebuffer_object framework to enable multisample rendering.

    - * - *

    The new operation RenderbufferStorageMultisampleEXT() allocates storage for a renderbuffer object that can be used as a multisample buffer. A - * multisample render buffer image differs from a single-sample render buffer image in that a multisample image has a number of SAMPLES that is greater - * than zero. No method is provided for creating multisample texture images.

    - * - *

    All of the framebuffer-attachable images attached to a framebuffer object must have the same number of SAMPLES or else the framebuffer object is not - * "framebuffer complete". If a framebuffer object with multisample attachments is "framebuffer complete", then the framebuffer object behaves as if - * SAMPLE_BUFFERS is one.

    - * - *

    In traditional multisample rendering, where DRAW_FRAMEBUFFER_BINDING_EXT is zero and SAMPLE_BUFFERS is one, the GL spec states that "the color sample - * values are resolved to a single, displayable color each time a pixel is updated." There are, however, several modern hardware implementations that do - * not actually resolve for each sample update, but instead postpones the resolve operation to a later time and resolve a batch of sample updates at a - * time. This is OK as long as the implementation behaves "as if" it had resolved a sample-at-a-time. Unfortunately, however, honoring the "as if" rule can - * sometimes degrade performance.

    - * - *

    In contrast, when DRAW_FRAMEBUFFER_BINDING_EXT is an application-created framebuffer object, MULTISAMPLE is enabled, and SAMPLE_BUFFERS is one, there is - * no implicit per-sample-update resolve. Instead, the application explicitly controls when the resolve operation is performed. The resolve operation is - * affected by calling BlitFramebufferEXT (provided by the EXT_framebuffer_blit extension) where the source is a multisample application-created - * framebuffer object and the destination is a single-sample framebuffer object (either application-created or window-system provided).

    - * - *

    This design for multisample resolve more closely matches current hardware, but still permits implementations which choose to resolve a single sample at - * a time. If hardware that implementes the multisample resolution "one sample at a time" exposes EXT_framebuffer_multisample, it could perform the - * implicit resolve to a driver-managed hidden surface, then read from that surface when the application calls BlitFramebufferEXT.

    - * - *

    Another motivation for granting the application explicit control over the multisample resolve operation has to do with the flexibility afforded by - * EXT_framebuffer_object. Previously, a drawable (window or pbuffer) had exclusive access to all of its buffers. There was no mechanism for sharing a - * buffer across multiple drawables. Under EXT_framebuffer_object, however, a mechanism exists for sharing a framebuffer-attachable image across several - * framebuffer objects, as well as sharing an image between a framebuffer object and a texture. If we had retained the "implicit" - * resolve from traditional multisampled rendering, and allowed the creation of "multisample" format renderbuffers, then this type of sharing would have - * lead to two problematic situations:

    - * - *
      - *
    • Two contexts, which shared renderbuffers, might perform competing resolve operations into the same single-sample buffer with ambiguous results.
    • - *
    • It would have introduced the unfortunate ability to use the single-sample buffer as a texture while MULTISAMPLE is ENABLED.
    • - *
    - * - *

    By using the BlitFramebufferEXT from EXT_framebuffer_blit as an explicit resolve to serialize access to the multisampled contents and eliminate the - * implicit per-sample resolve operation, we avoid both of these problems.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class EXTFramebufferMultisample { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetRenderbufferParameterivEXT. */ - public static final int GL_RENDERBUFFER_SAMPLES_EXT = 0x8CAB; - - /** Returned by CheckFramebufferStatusEXT. */ - public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8D56; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_SAMPLES_EXT = 0x8D57; - - protected EXTFramebufferMultisample() { - throw new UnsupportedOperationException(); - } - - // --- [ glRenderbufferStorageMultisampleEXT ] --- - - public static native void glRenderbufferStorageMultisampleEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java deleted file mode 100644 index 8c6c9c30..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_framebuffer_multisample_blit_scaled extension. - * - *

    This extension relaxes some of the restrictions associated with multisample resolve operations, specifically to allow a combined resolve and scale - * operation through a single call to BlitFramebuffer. It also adds two new filter types to control the quality of the combined scaled resolve operation.

    - * - *

    In traditional multisampled framebuffer rendering, color samples must be explicitly resolved via BlitFramebuffer before any other operation on the - * resulting pixel values can be performed. This multisample resolve operation must be done using a BlitFramebuffer call where the dimensions of the source - * and destination rectangles are identical. If the resulting pixel values need to be copied to a texture with different dimensions, these resolved values - * can then be scaled with a second call to BlitFramebuffer.

    - * - *

    By requiring two separate calls to BlitFramebuffer, the quality of final image can be maintained to a certain degree. The samples are first resolved, - * and then these resolved values can be filtered to produce the final image. This image quality comes at the price of increased memory usage and lower - * performance. However, the scaling blit can still introduce artifacts, particularly if it is done with a simple bilinear filter.

    - * - *

    The new filter types introduced by this extension allow the scaled resolve to be done with a single call to BlitFramebuffer. Not all samples from the - * read framebuffer are required to be be used when producing the final pixel values, and there may be a loss in quality when compared to an image produced - * by a separate resolve and scale. However, the single-pass scaled resolve blit should be faster than the traditional two-pass resolve then scale blits.

    - * - *

    Requires {@link ARBFramebufferObject ARB_framebuffer_object}.

    - */ -public final class EXTFramebufferMultisampleBlitScaled { - - /** Accepted by the {@code filter} parameter of BlitFramebuffer. */ - public static final int - GL_SCALED_RESOLVE_FASTEST_EXT = 0x90BA, - GL_SCALED_RESOLVE_NICEST_EXT = 0x90BB; - - private EXTFramebufferMultisampleBlitScaled() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferObject.java deleted file mode 100644 index c3647ab1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferObject.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_framebuffer_object extension. - * - *

    This extension defines a simple interface for drawing to rendering destinations other than the buffers provided to the GL by the window-system.

    - * - *

    In this extension, these newly defined rendering destinations are known collectively as "framebuffer-attachable images". This extension provides a - * mechanism for attaching framebuffer-attachable images to the GL framebuffer as one of the standard GL logical buffers: color, depth, and stencil. - * (Attaching a framebuffer-attachable image to the accum logical buffer is left for a future extension to define). When a framebuffer-attachable image is - * attached to the framebuffer, it is used as the source and destination of fragment operations.

    - * - *

    By allowing the use of a framebuffer-attachable image as a rendering destination, this extension enables a form of "offscreen" rendering. Furthermore, - * "render to texture" is supported by allowing the images of a texture to be used as framebuffer-attachable images. A particular image of a texture object - * is selected for use as a framebuffer-attachable image by specifying the mipmap level, cube map face (for a cube map texture), and z-offset (for a 3D - * texture) that identifies the image. The "render to texture" semantics of this extension are similar to performing traditional rendering to the - * framebuffer, followed immediately by a call to CopyTexSubImage. However, by using this extension instead, an application can achieve the same effect, - * but with the advantage that the GL can usually eliminate the data copy that would have been incurred by calling CopyTexSubImage.

    - * - *

    This extension also defines a new GL object type, called a "renderbuffer", which encapsulates a single 2D pixel image. The image of renderbuffer can be - * used as a framebuffer-attachable image for generalized offscreen rendering and it also provides a means to support rendering to GL logical buffer types - * which have no corresponding texture format (stencil, accum, etc). A renderbuffer is similar to a texture in that both renderbuffers and textures can be - * independently allocated and shared among multiple contexts. The framework defined by this extension is general enough that support for attaching images - * from GL objects other than textures and renderbuffers could be added by layered extensions.

    - * - *

    To facilitate efficient switching between collections of framebuffer-attachable images, this extension introduces another new GL object, called a - * framebuffer object. A framebuffer object contains the state that defines the traditional GL framebuffer, including its set of images. Prior to this - * extension, it was the window-system which defined and managed this collection of images, traditionally by grouping them into a "drawable". The - * window-system API's would also provide a function (i.e., wglMakeCurrent, glXMakeCurrent, aglSetDrawable, etc.) to bind a drawable with a GL context (as - * is done in the WGL_ARB_pbuffer extension). In this extension however, this functionality is subsumed by the GL and the GL provides the function - * BindFramebufferEXT to bind a framebuffer object to the current context. Later, the context can bind back to the window-system-provided framebuffer in - * order to display rendered content.

    - * - *

    Previous extensions that enabled rendering to a texture have been much more complicated. One example is the combination of ARB_pbuffer and - * ARB_render_texture, both of which are window-system extensions. This combination requires calling MakeCurrent, an operation that may be expensive, to - * switch between the window and the pbuffer drawables. An application must create one pbuffer per renderable texture in order to portably use - * ARB_render_texture. An application must maintain at least one GL context per texture format, because each context can only operate on a single - * pixelformat or FBConfig. All of these characteristics make ARB_render_texture both inefficient and cumbersome to use.

    - * - *

    EXT_framebuffer_object, on the other hand, is both simpler to use and more efficient than ARB_render_texture. The EXT_framebuffer_object API is - * contained wholly within the GL API and has no (non-portable) window-system components. Under EXT_framebuffer_object, it is not necessary to create a - * second GL context when rendering to a texture image whose format differs from that of the window. Finally, unlike the pbuffers of ARB_render_texture, a - * single framebuffer object can facilitate rendering to an unlimited number of texture objects.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class EXTFramebufferObject { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameter of BindFramebufferEXT, CheckFramebufferStatusEXT, FramebufferTexture{1D|2D|3D}EXT, FramebufferRenderbufferEXT, - * and GetFramebufferAttachmentParameterivEXT. - */ - public static final int GL_FRAMEBUFFER_EXT = 0x8D40; - - /** - * Accepted by the {@code target} parameter of BindRenderbufferEXT, RenderbufferStorageEXT, and GetRenderbufferParameterivEXT, and returned by - * GetFramebufferAttachmentParameterivEXT. - */ - public static final int GL_RENDERBUFFER_EXT = 0x8D41; - - /** Accepted by the {@code internalformat} parameter of RenderbufferStorageEXT. */ - public static final int - GL_STENCIL_INDEX1_EXT = 0x8D46, - GL_STENCIL_INDEX4_EXT = 0x8D47, - GL_STENCIL_INDEX8_EXT = 0x8D48, - GL_STENCIL_INDEX16_EXT = 0x8D49; - - /** Accepted by the {@code pname} parameter of GetRenderbufferParameterivEXT. */ - public static final int - GL_RENDERBUFFER_WIDTH_EXT = 0x8D42, - GL_RENDERBUFFER_HEIGHT_EXT = 0x8D43, - GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44, - GL_RENDERBUFFER_RED_SIZE_EXT = 0x8D50, - GL_RENDERBUFFER_GREEN_SIZE_EXT = 0x8D51, - GL_RENDERBUFFER_BLUE_SIZE_EXT = 0x8D52, - GL_RENDERBUFFER_ALPHA_SIZE_EXT = 0x8D53, - GL_RENDERBUFFER_DEPTH_SIZE_EXT = 0x8D54, - GL_RENDERBUFFER_STENCIL_SIZE_EXT = 0x8D55; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachmentParameterivEXT. */ - public static final int - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = 0x8CD0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = 0x8CD1, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = 0x8CD2, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = 0x8CD3, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = 0x8CD4; - - /** Accepted by the {@code attachment} parameter of FramebufferTexture{1D|2D|3D}EXT, FramebufferRenderbufferEXT, and GetFramebufferAttachmentParameterivEXT. */ - public static final int - GL_COLOR_ATTACHMENT0_EXT = 0x8CE0, - GL_COLOR_ATTACHMENT1_EXT = 0x8CE1, - GL_COLOR_ATTACHMENT2_EXT = 0x8CE2, - GL_COLOR_ATTACHMENT3_EXT = 0x8CE3, - GL_COLOR_ATTACHMENT4_EXT = 0x8CE4, - GL_COLOR_ATTACHMENT5_EXT = 0x8CE5, - GL_COLOR_ATTACHMENT6_EXT = 0x8CE6, - GL_COLOR_ATTACHMENT7_EXT = 0x8CE7, - GL_COLOR_ATTACHMENT8_EXT = 0x8CE8, - GL_COLOR_ATTACHMENT9_EXT = 0x8CE9, - GL_COLOR_ATTACHMENT10_EXT = 0x8CEA, - GL_COLOR_ATTACHMENT11_EXT = 0x8CEB, - GL_COLOR_ATTACHMENT12_EXT = 0x8CEC, - GL_COLOR_ATTACHMENT13_EXT = 0x8CED, - GL_COLOR_ATTACHMENT14_EXT = 0x8CEE, - GL_COLOR_ATTACHMENT15_EXT = 0x8CEF, - GL_DEPTH_ATTACHMENT_EXT = 0x8D00, - GL_STENCIL_ATTACHMENT_EXT = 0x8D20; - - /** Returned by CheckFramebufferStatusEXT(). */ - public static final int - GL_FRAMEBUFFER_COMPLETE_EXT = 0x8CD5, - GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6, - GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7, - GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = 0x8CD9, - GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = 0x8CDA, - GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = 0x8CDB, - GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC, - GL_FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD; - - /** Accepted by GetIntegerv(). */ - public static final int - GL_FRAMEBUFFER_BINDING_EXT = 0x8CA6, - GL_RENDERBUFFER_BINDING_EXT = 0x8CA7, - GL_MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF, - GL_MAX_RENDERBUFFER_SIZE_EXT = 0x84E8; - - /** Returned by GetError(). */ - public static final int GL_INVALID_FRAMEBUFFER_OPERATION_EXT = 0x506; - - protected EXTFramebufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glIsRenderbufferEXT ] --- - - @NativeType("GLboolean") - public static native boolean glIsRenderbufferEXT(@NativeType("GLuint") int renderbuffer); - - // --- [ glBindRenderbufferEXT ] --- - - public static native void glBindRenderbufferEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int renderbuffer); - - // --- [ glDeleteRenderbuffersEXT ] --- - - public static native void nglDeleteRenderbuffersEXT(int n, long renderbuffers); - - public static void glDeleteRenderbuffersEXT(@NativeType("GLuint const *") IntBuffer renderbuffers) { - nglDeleteRenderbuffersEXT(renderbuffers.remaining(), memAddress(renderbuffers)); - } - - public static void glDeleteRenderbuffersEXT(@NativeType("GLuint const *") int renderbuffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer renderbuffers = stack.ints(renderbuffer); - nglDeleteRenderbuffersEXT(1, memAddress(renderbuffers)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenRenderbuffersEXT ] --- - - public static native void nglGenRenderbuffersEXT(int n, long renderbuffers); - - public static void glGenRenderbuffersEXT(@NativeType("GLuint *") IntBuffer renderbuffers) { - nglGenRenderbuffersEXT(renderbuffers.remaining(), memAddress(renderbuffers)); - } - - @NativeType("void") - public static int glGenRenderbuffersEXT() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer renderbuffers = stack.callocInt(1); - nglGenRenderbuffersEXT(1, memAddress(renderbuffers)); - return renderbuffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glRenderbufferStorageEXT ] --- - - public static native void glRenderbufferStorageEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glGetRenderbufferParameterivEXT ] --- - - public static native void nglGetRenderbufferParameterivEXT(int target, int pname, long params); - - public static void glGetRenderbufferParameterivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetRenderbufferParameterivEXT(target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetRenderbufferParameteriEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetRenderbufferParameterivEXT(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsFramebufferEXT ] --- - - @NativeType("GLboolean") - public static native boolean glIsFramebufferEXT(@NativeType("GLuint") int framebuffer); - - // --- [ glBindFramebufferEXT ] --- - - public static native void glBindFramebufferEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int framebuffer); - - // --- [ glDeleteFramebuffersEXT ] --- - - public static native void nglDeleteFramebuffersEXT(int n, long framebuffers); - - public static void glDeleteFramebuffersEXT(@NativeType("GLuint const *") IntBuffer framebuffers) { - nglDeleteFramebuffersEXT(framebuffers.remaining(), memAddress(framebuffers)); - } - - public static void glDeleteFramebuffersEXT(@NativeType("GLuint const *") int framebuffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer framebuffers = stack.ints(framebuffer); - nglDeleteFramebuffersEXT(1, memAddress(framebuffers)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenFramebuffersEXT ] --- - - public static native void nglGenFramebuffersEXT(int n, long framebuffers); - - public static void glGenFramebuffersEXT(@NativeType("GLuint *") IntBuffer framebuffers) { - nglGenFramebuffersEXT(framebuffers.remaining(), memAddress(framebuffers)); - } - - @NativeType("void") - public static int glGenFramebuffersEXT() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer framebuffers = stack.callocInt(1); - nglGenFramebuffersEXT(1, memAddress(framebuffers)); - return framebuffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCheckFramebufferStatusEXT ] --- - - @NativeType("GLenum") - public static native int glCheckFramebufferStatusEXT(@NativeType("GLenum") int target); - - // --- [ glFramebufferTexture1DEXT ] --- - - public static native void glFramebufferTexture1DEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glFramebufferTexture2DEXT ] --- - - public static native void glFramebufferTexture2DEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glFramebufferTexture3DEXT ] --- - - public static native void glFramebufferTexture3DEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int zoffset); - - // --- [ glFramebufferRenderbufferEXT ] --- - - public static native void glFramebufferRenderbufferEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer); - - // --- [ glGetFramebufferAttachmentParameterivEXT ] --- - - public static native void nglGetFramebufferAttachmentParameterivEXT(int target, int attachment, int pname, long params); - - public static void glGetFramebufferAttachmentParameterivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFramebufferAttachmentParameterivEXT(target, attachment, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetFramebufferAttachmentParameteriEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetFramebufferAttachmentParameterivEXT(target, attachment, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenerateMipmapEXT ] --- - - public static native void glGenerateMipmapEXT(@NativeType("GLenum") int target); - - /** Array version of: {@link #glDeleteRenderbuffersEXT DeleteRenderbuffersEXT} */ - public static void glDeleteRenderbuffersEXT(@NativeType("GLuint const *") int[] renderbuffers) { - long __functionAddress = GL.getICD().glDeleteRenderbuffersEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(renderbuffers.length, renderbuffers, __functionAddress); - } - - /** Array version of: {@link #glGenRenderbuffersEXT GenRenderbuffersEXT} */ - public static void glGenRenderbuffersEXT(@NativeType("GLuint *") int[] renderbuffers) { - long __functionAddress = GL.getICD().glGenRenderbuffersEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(renderbuffers.length, renderbuffers, __functionAddress); - } - - /** Array version of: {@link #glGetRenderbufferParameterivEXT GetRenderbufferParameterivEXT} */ - public static void glGetRenderbufferParameterivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetRenderbufferParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glDeleteFramebuffersEXT DeleteFramebuffersEXT} */ - public static void glDeleteFramebuffersEXT(@NativeType("GLuint const *") int[] framebuffers) { - long __functionAddress = GL.getICD().glDeleteFramebuffersEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffers.length, framebuffers, __functionAddress); - } - - /** Array version of: {@link #glGenFramebuffersEXT GenFramebuffersEXT} */ - public static void glGenFramebuffersEXT(@NativeType("GLuint *") int[] framebuffers) { - long __functionAddress = GL.getICD().glGenFramebuffersEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffers.length, framebuffers, __functionAddress); - } - - /** Array version of: {@link #glGetFramebufferAttachmentParameterivEXT GetFramebufferAttachmentParameterivEXT} */ - public static void glGetFramebufferAttachmentParameterivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetFramebufferAttachmentParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, attachment, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferSRGB.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferSRGB.java deleted file mode 100644 index 199a7d9c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTFramebufferSRGB.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_framebuffer_sRGB extension. - * - *

    Conventionally, OpenGL assumes framebuffer color components are stored in a linear color space. In particular, framebuffer blending is a linear - * operation.

    - * - *

    The sRGB color space is based on typical (non-linear) monitor characteristics expected in a dimly lit office. It has been standardized by the - * International Electrotechnical Commission (IEC) as IEC 61966-2-1. The sRGB color space roughly corresponds to 2.2 gamma correction.

    - * - *

    This extension adds a framebuffer capability for sRGB framebuffer update and blending. When blending is disabled but the new sRGB updated mode is - * enabled (assume the framebuffer supports the capability), high-precision linear color component values for red, green, and blue generated by fragment - * coloring are encoded for sRGB prior to being written into the framebuffer. When blending is enabled along with the new sRGB update mode, red, green, and - * blue framebuffer color components are treated as sRGB values that are converted to linear color values, blended with the high-precision color values - * generated by fragment coloring, and then the blend result is encoded for sRGB just prior to being written into the framebuffer.

    - * - *

    The primary motivation for this extension is that it allows OpenGL applications to render into a framebuffer that is scanned to a monitor configured to - * assume framebuffer color values are sRGB encoded. This assumption is roughly true of most PC monitors with default gamma correction. This allows - * applications to achieve faithful color reproduction for OpenGL rendering without adjusting the monitor's gamma correction.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class EXTFramebufferSRGB { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_FRAMEBUFFER_SRGB_EXT = 0x8DB9; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA; - - private EXTFramebufferSRGB() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTGPUProgramParameters.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTGPUProgramParameters.java deleted file mode 100644 index 20f158ea..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTGPUProgramParameters.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_gpu_program_parameters extension. - * - *

    This extension provides a new set of procedures to load multiple consecutive program environment parameters more efficiently, via a single GL call - * instead of multiple calls. This will reduce the amount of CPU overhead involved in loading parameters.

    - * - *

    With the existing ARB_vertex_program and ARB_fragment_program APIs, program parameters must be loaded one at a time, via separate calls. While the - * NV_vertex_program extension provides a set of similar functions that can be used to load program environment parameters (which are equivalent to - * "program parameters" in NV_vertex_program), no such function exists for program local parameters.

    - */ -public class EXTGPUProgramParameters { - - static { GL.initialize(); } - - protected EXTGPUProgramParameters() { - throw new UnsupportedOperationException(); - } - - // --- [ glProgramEnvParameters4fvEXT ] --- - - public static native void nglProgramEnvParameters4fvEXT(int target, int index, int count, long params); - - public static void glProgramEnvParameters4fvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer params) { - nglProgramEnvParameters4fvEXT(target, index, params.remaining() >> 2, memAddress(params)); - } - - // --- [ glProgramLocalParameters4fvEXT ] --- - - public static native void nglProgramLocalParameters4fvEXT(int target, int index, int count, long params); - - public static void glProgramLocalParameters4fvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer params) { - nglProgramLocalParameters4fvEXT(target, index, params.remaining() >> 2, memAddress(params)); - } - - /** Array version of: {@link #glProgramEnvParameters4fvEXT ProgramEnvParameters4fvEXT} */ - public static void glProgramEnvParameters4fvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glProgramEnvParameters4fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, index, params.length >> 2, params, __functionAddress); - } - - /** Array version of: {@link #glProgramLocalParameters4fvEXT ProgramLocalParameters4fvEXT} */ - public static void glProgramLocalParameters4fvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glProgramLocalParameters4fvEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, index, params.length >> 2, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTGPUShader4.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTGPUShader4.java deleted file mode 100644 index c6f8683b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTGPUShader4.java +++ /dev/null @@ -1,862 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_gpu_shader4 extension. - * - *

    This extension provides a set of new features to the OpenGL Shading Language and related APIs to support capabilities of new hardware. In particular, - * this extension provides the following functionality:

    - * - *
      - *
    • New texture lookup functions are provided that allow shaders to access individual texels using integer coordinates referring to the texel location - * and level of detail. No filtering is performed. These functions allow applications to use textures as one-, two-, and three-dimensional arrays.
    • - *
    • New texture lookup functions are provided that allow shaders to query the dimensions of a specific level-of-detail image of a texture object.
    • - *
    • New texture lookup functions variants are provided that allow shaders to pass a constant integer vector used to offset the texel locations used - * during the lookup to assist in custom texture filtering operations.
    • - *
    • New texture lookup functions are provided that allow shaders to access one- and two-dimensional array textures. The second, or third, coordinate is - * used to select the layer of the array to access.
    • - *
    • New "Grad" texture lookup functions are provided that allow shaders to explicitely pass in derivative values which are used by the GL to compute the - * level-of-detail when performing a texture lookup.
    • - *
    • A new texture lookup function is provided to access a buffer texture.
    • - *
    • The existing absolute LOD texture lookup functions are no longer restricted to the vertex shader only.
    • - *
    • The ability to specify and use cubemap textures with a DEPTH_COMPONENT internal format. This also enables shadow mapping on cubemaps. The 'q' - * coordinate is used as the reference value for comparisons. A set of new texture lookup functions is provided to lookup into shadow cubemaps.
    • - *
    • The ability to specify if varying variables are interpolated in a non-perspective correct manner, if they are flat shaded or, if multi-sampling, if - * centroid sampling should be performed.
    • - *
    • Full signed integer and unsigned integer support in the OpenGL Shading Language: - * - *
        - *
      • Integers are defined as 32 bit values using two's complement.
      • - *
      • Unsigned integers and vectors thereof are added.
      • - *
      • New texture lookup functions are provided that return integer values. These functions are to be used in conjunction with new texture formats - * whose components are actual integers, rather than integers that encode a floating-point value. To support these lookup functions, new integer - * and unsigned-integer sampler types are introduced.
      • - *
      • Integer bitwise operators are now enabled.
      • - *
      • Several built-in functions and operators now operate on integers or vectors of integers.
      • - *
      • New vertex attribute functions are added that load integer attribute data and can be referenced in a vertex shader as integer data.
      • - *
      • New uniform loading commands are added to load unsigned integer data.
      • - *
      • Varying variables can now be (unsigned) integers. If declared as such, they have to be flat shaded.
      • - *
      • Fragment shaders can define their own output variables, and declare them to be of type floating-point, integer or unsigned integer. These - * variables are bound to a fragment color index with the new API command BindFragDataLocationEXT(), and directed to buffers using the existing - * DrawBuffer or DrawBuffers API commands.
      • - *
    • - *
    • Added new built-in functions truncate() and round() to the shading language.
    • - *
    • A new built-in variable accessible from within vertex shaders that holds the index {@code i} implicitly passed to ArrayElement to specify the - * vertex. This is called the vertex ID.
    • - *
    • A new built-in variable accessible from within fragment and geometry shaders that hold the index of the currently processed primitive. This is - * called the primitive ID.
    • - *
    - * - *

    This extension also briefly mentions a new shader type, called a geometry shader. A geometry shader is run after vertices are transformed, but before - * clipping. A geometry shader begins with a single primitive (point, line, triangle. It can read the attributes of any of the vertices in the primitive - * and use them to generate new primitives. A geometry shader has a fixed output primitive type (point, line strip, or triangle strip) and emits vertices - * to define a new primitive. Geometry shaders are discussed in detail in the GL_EXT_geometry_shader4 specification.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public class EXTGPUShader4 { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetVertexAttribdv, GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIuivEXT and GetVertexAttribIivEXT. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT = 0x88FD; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0, - GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1, - GL_SAMPLER_BUFFER_EXT = 0x8DC2, - GL_SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3, - GL_SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4, - GL_SAMPLER_CUBE_SHADOW_EXT = 0x8DC5, - GL_UNSIGNED_INT_VEC2_EXT = 0x8DC6, - GL_UNSIGNED_INT_VEC3_EXT = 0x8DC7, - GL_UNSIGNED_INT_VEC4_EXT = 0x8DC8, - GL_INT_SAMPLER_1D_EXT = 0x8DC9, - GL_INT_SAMPLER_2D_EXT = 0x8DCA, - GL_INT_SAMPLER_3D_EXT = 0x8DCB, - GL_INT_SAMPLER_CUBE_EXT = 0x8DCC, - GL_INT_SAMPLER_2D_RECT_EXT = 0x8DCD, - GL_INT_SAMPLER_1D_ARRAY_EXT = 0x8DCE, - GL_INT_SAMPLER_2D_ARRAY_EXT = 0x8DCF, - GL_INT_SAMPLER_BUFFER_EXT = 0x8DD0, - GL_UNSIGNED_INT_SAMPLER_1D_EXT = 0x8DD1, - GL_UNSIGNED_INT_SAMPLER_2D_EXT = 0x8DD2, - GL_UNSIGNED_INT_SAMPLER_3D_EXT = 0x8DD3, - GL_UNSIGNED_INT_SAMPLER_CUBE_EXT = 0x8DD4, - GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5, - GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = 0x8DD6, - GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = 0x8DD7, - GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MIN_PROGRAM_TEXEL_OFFSET_EXT = 0x8904, - GL_MAX_PROGRAM_TEXEL_OFFSET_EXT = 0x8905; - - protected EXTGPUShader4() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttribI1iEXT ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - */ - public static native void glVertexAttribI1iEXT(@NativeType("GLuint") int index, @NativeType("GLint") int x); - - // --- [ glVertexAttribI2iEXT ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - */ - public static native void glVertexAttribI2iEXT(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y); - - // --- [ glVertexAttribI3iEXT ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The w component is implicitly set to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - */ - public static native void glVertexAttribI3iEXT(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glVertexAttribI4iEXT ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - */ - public static native void glVertexAttribI4iEXT(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glVertexAttribI1uiEXT ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - */ - public static native void glVertexAttribI1uiEXT(@NativeType("GLuint") int index, @NativeType("GLuint") int x); - - // --- [ glVertexAttribI2uiEXT ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - */ - public static native void glVertexAttribI2uiEXT(@NativeType("GLuint") int index, @NativeType("GLuint") int x, @NativeType("GLuint") int y); - - // --- [ glVertexAttribI3uiEXT ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The w component is implicitly set to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - */ - public static native void glVertexAttribI3uiEXT(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glVertexAttribI4uiEXT ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - */ - public static native void glVertexAttribI4uiEXT(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glVertexAttribI1ivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI1ivEXT VertexAttribI1ivEXT} */ - public static native void nglVertexAttribI1ivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI1iEXT VertexAttribI1iEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI1ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribI1ivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI2ivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI2ivEXT VertexAttribI2ivEXT} */ - public static native void nglVertexAttribI2ivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI2iEXT VertexAttribI2iEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI2ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribI2ivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI3ivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI3ivEXT VertexAttribI3ivEXT} */ - public static native void nglVertexAttribI3ivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI3iEXT VertexAttribI3iEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI3ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribI3ivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI4ivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI4ivEXT VertexAttribI4ivEXT} */ - public static native void nglVertexAttribI4ivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI4iEXT VertexAttribI4iEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI4ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4ivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI1uivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI1uivEXT VertexAttribI1uivEXT} */ - public static native void nglVertexAttribI1uivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI1uiEXT VertexAttribI1uiEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI1uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribI1uivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI2uivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI2uivEXT VertexAttribI2uivEXT} */ - public static native void nglVertexAttribI2uivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI2uiEXT VertexAttribI2uiEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI2uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribI2uivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI3uivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI3uivEXT VertexAttribI3uivEXT} */ - public static native void nglVertexAttribI3uivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI3uiEXT VertexAttribI3uiEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI3uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribI3uivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI4uivEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI4uivEXT VertexAttribI4uivEXT} */ - public static native void nglVertexAttribI4uivEXT(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI4uiEXT VertexAttribI4uiEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI4uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4uivEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI4bvEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI4bvEXT VertexAttribI4bvEXT} */ - public static native void nglVertexAttribI4bvEXT(int index, long v); - - /** - * Byte version of {@link #glVertexAttribI4ivEXT VertexAttribI4ivEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI4bvEXT(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4bvEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI4svEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI4svEXT VertexAttribI4svEXT} */ - public static native void nglVertexAttribI4svEXT(int index, long v); - - /** - * Short version of {@link #glVertexAttribI4ivEXT VertexAttribI4ivEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI4svEXT(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4svEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI4ubvEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI4ubvEXT VertexAttribI4ubvEXT} */ - public static native void nglVertexAttribI4ubvEXT(int index, long v); - - /** - * Byte version of {@link #glVertexAttribI4uivEXT VertexAttribI4uivEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI4ubvEXT(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4ubvEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribI4usvEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribI4usvEXT VertexAttribI4usvEXT} */ - public static native void nglVertexAttribI4usvEXT(int index, long v); - - /** - * Short version of {@link #glVertexAttribI4uivEXT VertexAttribI4uivEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - */ - public static void glVertexAttribI4usvEXT(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4usvEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribIPointerEXT ] --- - - /** Unsafe version of: {@link #glVertexAttribIPointerEXT VertexAttribIPointerEXT} */ - public static native void nglVertexAttribIPointerEXT(int index, int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribIPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglVertexAttribIPointerEXT(index, size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribIPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglVertexAttribIPointerEXT(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribIPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglVertexAttribIPointerEXT(index, size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - */ - public static void glVertexAttribIPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglVertexAttribIPointerEXT(index, size, type, stride, memAddress(pointer)); - } - - // --- [ glGetVertexAttribIivEXT ] --- - - /** Unsafe version of: {@link #glGetVertexAttribIivEXT GetVertexAttribIivEXT} */ - public static native void nglGetVertexAttribIivEXT(int index, int pname, long params); - - /** - * Returns the value of a pure integer generic vertex attribute parameter. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - */ - public static void glGetVertexAttribIivEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribIivEXT(index, pname, memAddress(params)); - } - - /** - * Returns the value of a pure integer generic vertex attribute parameter. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried - */ - @NativeType("void") - public static int glGetVertexAttribIiEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetVertexAttribIivEXT(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexAttribIuivEXT ] --- - - /** Unsafe version of: {@link #glGetVertexAttribIuivEXT GetVertexAttribIuivEXT} */ - public static native void nglGetVertexAttribIuivEXT(int index, int pname, long params); - - /** - * Unsigned version of {@link #glGetVertexAttribIivEXT GetVertexAttribIivEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - */ - public static void glGetVertexAttribIuivEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribIuivEXT(index, pname, memAddress(params)); - } - - /** - * Unsigned version of {@link #glGetVertexAttribIivEXT GetVertexAttribIivEXT}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried - */ - @NativeType("void") - public static int glGetVertexAttribIuiEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetVertexAttribIuivEXT(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetUniformuivEXT ] --- - - public static native void nglGetUniformuivEXT(int program, int location, long params); - - public static void glGetUniformuivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformuivEXT(program, location, memAddress(params)); - } - - @NativeType("void") - public static int glGetUniformuiEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetUniformuivEXT(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glBindFragDataLocationEXT ] --- - - public static native void nglBindFragDataLocationEXT(int program, int color, long name); - - public static void glBindFragDataLocationEXT(@NativeType("GLuint") int program, @NativeType("GLuint") int color, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - nglBindFragDataLocationEXT(program, color, memAddress(name)); - } - - public static void glBindFragDataLocationEXT(@NativeType("GLuint") int program, @NativeType("GLuint") int color, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - nglBindFragDataLocationEXT(program, color, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetFragDataLocationEXT ] --- - - public static native int nglGetFragDataLocationEXT(int program, long name); - - @NativeType("GLint") - public static int glGetFragDataLocationEXT(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetFragDataLocationEXT(program, memAddress(name)); - } - - @NativeType("GLint") - public static int glGetFragDataLocationEXT(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetFragDataLocationEXT(program, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glUniform1uiEXT ] --- - - public static native void glUniform1uiEXT(@NativeType("GLint") int location, @NativeType("GLuint") int v0); - - // --- [ glUniform2uiEXT ] --- - - public static native void glUniform2uiEXT(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1); - - // --- [ glUniform3uiEXT ] --- - - public static native void glUniform3uiEXT(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2); - - // --- [ glUniform4uiEXT ] --- - - public static native void glUniform4uiEXT(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2, @NativeType("GLuint") int v3); - - // --- [ glUniform1uivEXT ] --- - - public static native void nglUniform1uivEXT(int location, int count, long value); - - public static void glUniform1uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform1uivEXT(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2uivEXT ] --- - - public static native void nglUniform2uivEXT(int location, int count, long value); - - public static void glUniform2uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform2uivEXT(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3uivEXT ] --- - - public static native void nglUniform3uivEXT(int location, int count, long value); - - public static void glUniform3uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform3uivEXT(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4uivEXT ] --- - - public static native void nglUniform4uivEXT(int location, int count, long value); - - public static void glUniform4uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform4uivEXT(location, value.remaining() >> 2, memAddress(value)); - } - - /** Array version of: {@link #glVertexAttribI1ivEXT VertexAttribI1ivEXT} */ - public static void glVertexAttribI1ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI1ivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI2ivEXT VertexAttribI2ivEXT} */ - public static void glVertexAttribI2ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI2ivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI3ivEXT VertexAttribI3ivEXT} */ - public static void glVertexAttribI3ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI3ivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI4ivEXT VertexAttribI4ivEXT} */ - public static void glVertexAttribI4ivEXT(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4ivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI1uivEXT VertexAttribI1uivEXT} */ - public static void glVertexAttribI1uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI1uivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI2uivEXT VertexAttribI2uivEXT} */ - public static void glVertexAttribI2uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI2uivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI3uivEXT VertexAttribI3uivEXT} */ - public static void glVertexAttribI3uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI3uivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI4uivEXT VertexAttribI4uivEXT} */ - public static void glVertexAttribI4uivEXT(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4uivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI4svEXT VertexAttribI4svEXT} */ - public static void glVertexAttribI4svEXT(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4svEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribI4usvEXT VertexAttribI4usvEXT} */ - public static void glVertexAttribI4usvEXT(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4usvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribIPointerEXT VertexAttribIPointerEXT} */ - public static void glVertexAttribIPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") short[] pointer) { - long __functionAddress = GL.getICD().glVertexAttribIPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribIPointerEXT VertexAttribIPointerEXT} */ - public static void glVertexAttribIPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") int[] pointer) { - long __functionAddress = GL.getICD().glVertexAttribIPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribIivEXT GetVertexAttribIivEXT} */ - public static void glGetVertexAttribIivEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribIuivEXT GetVertexAttribIuivEXT} */ - public static void glGetVertexAttribIuivEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetUniformuivEXT GetUniformuivEXT} */ - public static void glGetUniformuivEXT(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetUniformuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** Array version of: {@link #glUniform1uivEXT Uniform1uivEXT} */ - public static void glUniform1uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform1uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glUniform2uivEXT Uniform2uivEXT} */ - public static void glUniform2uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform2uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glUniform3uivEXT Uniform3uivEXT} */ - public static void glUniform3uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform3uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glUniform4uivEXT Uniform4uivEXT} */ - public static void glUniform4uivEXT(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform4uivEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTGeometryShader4.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTGeometryShader4.java deleted file mode 100644 index 03bd4611..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTGeometryShader4.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_geometry_shader4 extension. - * - *

    EXT_geometry_shader4 defines a new shader type available to be run on the GPU, called a geometry shader. Geometry shaders are run after vertices are - * transformed, but prior to color clamping, flat shading and clipping.

    - * - *

    A geometry shader begins with a single primitive (point, line, triangle). It can read the attributes of any of the vertices in the primitive and use - * them to generate new primitives. A geometry shader has a fixed output primitive type (point, line strip, or triangle strip) and emits vertices to - * define a new primitive. A geometry shader can emit multiple disconnected primitives. The primitives emitted by the geometry shader are clipped and then - * processed like an equivalent OpenGL primitive specified by the application.

    - * - *

    Furthermore, EXT_geometry_shader4 provides four additional primitive types: lines with adjacency, line strips with adjacency, separate triangles with - * adjacency, and triangle strips with adjacency. Some of the vertices specified in these new primitive types are not part of the ordinary primitives, - * instead they represent neighboring vertices that are adjacent to the two line segment end points (lines/strips) or the three triangle edges - * (triangles/tstrips). These vertices can be accessed by geometry shaders and used to match up the vertices emitted by the geometry shader with those of - * neighboring primitives.

    - * - *

    Since geometry shaders expect a specific input primitive type, an error will occur if the application presents primitives of a different type. For - * example, if a geometry shader expects points, an error will occur at Begin() time, if a primitive mode of TRIANGLES is specified.

    - */ -public class EXTGeometryShader4 { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_GEOMETRY_SHADER_EXT = 0x8DD9; - - /** Accepted by the {@code pname} parameter of ProgramParameteriEXT and GetProgramiv. */ - public static final int - GL_GEOMETRY_VERTICES_OUT_EXT = 0x8DDA, - GL_GEOMETRY_INPUT_TYPE_EXT = 0x8DDB, - GL_GEOMETRY_OUTPUT_TYPE_EXT = 0x8DDC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 0x8C29, - GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT = 0x8DDD, - GL_MAX_VERTEX_VARYING_COMPONENTS_EXT = 0x8DDE, - GL_MAX_VARYING_COMPONENTS_EXT = 0x8B4B, - GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 0x8DDF, - GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 0x8DE0, - GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 0x8DE1; - - /** Accepted by the {@code mode} parameter of Begin, DrawArrays, MultiDrawArrays, DrawElements, MultiDrawElements, and DrawRangeElements. */ - public static final int - GL_LINES_ADJACENCY_EXT = 0xA, - GL_LINE_STRIP_ADJACENCY_EXT = 0xB, - GL_TRIANGLES_ADJACENCY_EXT = 0xC, - GL_TRIANGLE_STRIP_ADJACENCY_EXT = 0xD; - - /** Returned by CheckFramebufferStatusEXT. */ - public static final int - GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 0x8DA8, - GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = 0x8DA9; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachment- ParameterivEXT. */ - public static final int - GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 0x8DA7, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetIntegerv, GetFloatv, GetDoublev, and - * GetBooleanv. - */ - public static final int GL_PROGRAM_POINT_SIZE_EXT = 0x8642; - - protected EXTGeometryShader4() { - throw new UnsupportedOperationException(); - } - - // --- [ glProgramParameteriEXT ] --- - - public static native void glProgramParameteriEXT(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint") int value); - - // --- [ glFramebufferTextureEXT ] --- - - public static native void glFramebufferTextureEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glFramebufferTextureLayerEXT ] --- - - public static void glFramebufferTextureLayerEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer) { - EXTTextureArray.glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); - } - - // --- [ glFramebufferTextureFaceEXT ] --- - - public static native void glFramebufferTextureFaceEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int face); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObject.java deleted file mode 100644 index 62d1b127..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObject.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_memory_object extension. - * - *

    The Vulkan API introduces the concept of explicit memory objects and reusable synchronization objects. This extension brings those concepts to the - * OpenGL API via two new object types:

    - * - *
      - *
    • Memory objects
    • - *
    • Semaphores
    • - *
    - * - *

    Rather than allocating memory as a response to object allocation, memory allocation and binding are two separate operations in Vulkan. This extension - * allows an OpenGL application to import a Vulkan memory object, and to bind textures and/or buffer objects to it.

    - * - *

    No methods to import memory objects are defined here. Separate platform-specific extensions are defined for this purpose.

    - * - *

    Semaphores are synchronization primitives that can be waited on and signaled only by the GPU, or in GL terms, in the GL server. They are similar in - * concept to GL's "sync" objects and EGL's "EGLSync" objects, but different enough that compatibilities between the two are difficult to derive.

    - * - *

    Rather than attempt to map Vulkan semaphores on to GL/EGL sync objects to achieve interoperability, this extension introduces a new object, GL - * semaphores, that map directly to the semantics of Vulkan semaphores. To achieve full image and buffer memory coherence with a Vulkan driver, the - * commands that manipulate semaphores also allow external usage information to be imported and exported.

    - * - *

    Requires {@link GL42 OpenGL 4.2} or {@link ARBTextureStorage ARB_texture_storage}.

    - */ -public class EXTMemoryObject { - - static { GL.initialize(); } - - /** - * Accepted by the {@code pname} parameter of TexParameter{ifx}{v}, TexParameterI{i ui}v, TextureParameter{if}{v}, TextureParameterI{i ui}v, - * GetTexParameter{if}v, GetTexParameterI{i ui}v, GetTextureParameter{if}v, and GetTextureParameterI{i ui}v. - */ - public static final int GL_TEXTURE_TILING_EXT = 0x9580; - - /** Accepted by the {@code pname} parameter of {@link #glMemoryObjectParameterivEXT MemoryObjectParameterivEXT}, and {@link #glGetMemoryObjectParameterivEXT GetMemoryObjectParameterivEXT}. */ - public static final int GL_DEDICATED_MEMORY_OBJECT_EXT = 0x9581; - - /** Accepted by the {@code pname} parameter of GetInternalFormativ or GetInternalFormati64v. */ - public static final int - GL_NUM_TILING_TYPES_EXT = 0x9582, - GL_TILING_TYPES_EXT = 0x9583; - - /** - * Returned in the {@code params} parameter of GetInternalFormativ or GetInternalFormati64v when the {@code pname} parameter is {@link #GL_TILING_TYPES_EXT TILING_TYPES_EXT}, - * returned in the {@code params} parameter of GetTexParameter{if}v, GetTexParameterI{i ui}v, GetTextureParameter{if}v, and GetTextureParameterI{i ui}v - * when the {@code pname} parameter is {@link #GL_TEXTURE_TILING_EXT TEXTURE_TILING_EXT}, and accepted by the {@code params} parameter of TexParameter{ifx}{v}, TexParameterI{i ui}v, - * TextureParameter{if}{v}, TextureParameterI{i ui}v when the {@code pname} parameter is {@link #GL_TEXTURE_TILING_EXT TEXTURE_TILING_EXT}. - */ - public static final int - GL_OPTIMAL_TILING_EXT = 0x9584, - GL_LINEAR_TILING_EXT = 0x9585; - - /** - * Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, GetInteger64v, {@link #glGetUnsignedBytevEXT GetUnsignedBytevEXT}, and the - * {@code target} parameter of GetBooleani_v, GetIntegeri_v,GetFloati_v, GetDoublei_v, GetInteger64i_v, and {@link #glGetUnsignedBytei_vEXT GetUnsignedBytei_vEXT}. - */ - public static final int - GL_NUM_DEVICE_UUIDS_EXT = 0x9596, - GL_DEVICE_UUID_EXT = 0x9597, - GL_DRIVER_UUID_EXT = 0x9598; - - /** Constant values. */ - public static final int GL_UUID_SIZE_EXT = 16; - - protected EXTMemoryObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetUnsignedBytevEXT ] --- - - public static native void nglGetUnsignedBytevEXT(int pname, long data); - - public static void glGetUnsignedBytevEXT(@NativeType("GLenum") int pname, @NativeType("GLubyte *") ByteBuffer data) { - nglGetUnsignedBytevEXT(pname, memAddress(data)); - } - - // --- [ glGetUnsignedBytei_vEXT ] --- - - public static native void nglGetUnsignedBytei_vEXT(int target, int index, long data); - - public static void glGetUnsignedBytei_vEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLubyte *") ByteBuffer data) { - nglGetUnsignedBytei_vEXT(target, index, memAddress(data)); - } - - // --- [ glDeleteMemoryObjectsEXT ] --- - - public static native void nglDeleteMemoryObjectsEXT(int n, long memoryObjects); - - public static void glDeleteMemoryObjectsEXT(@NativeType("GLuint const *") IntBuffer memoryObjects) { - nglDeleteMemoryObjectsEXT(memoryObjects.remaining(), memAddress(memoryObjects)); - } - - public static void glDeleteMemoryObjectsEXT(@NativeType("GLuint const *") int memoryObject) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer memoryObjects = stack.ints(memoryObject); - nglDeleteMemoryObjectsEXT(1, memAddress(memoryObjects)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsMemoryObjectEXT ] --- - - @NativeType("GLboolean") - public static native boolean glIsMemoryObjectEXT(@NativeType("GLuint") int memoryObject); - - // --- [ glCreateMemoryObjectsEXT ] --- - - public static native void nglCreateMemoryObjectsEXT(int n, long memoryObjects); - - public static void glCreateMemoryObjectsEXT(@NativeType("GLuint *") IntBuffer memoryObjects) { - nglCreateMemoryObjectsEXT(memoryObjects.remaining(), memAddress(memoryObjects)); - } - - @NativeType("void") - public static int glCreateMemoryObjectsEXT() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer memoryObjects = stack.callocInt(1); - nglCreateMemoryObjectsEXT(1, memAddress(memoryObjects)); - return memoryObjects.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMemoryObjectParameterivEXT ] --- - - public static native void nglMemoryObjectParameterivEXT(int memoryObject, int pname, long params); - - public static void glMemoryObjectParameterivEXT(@NativeType("GLuint") int memoryObject, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglMemoryObjectParameterivEXT(memoryObject, pname, memAddress(params)); - } - - public static void glMemoryObjectParameteriEXT(@NativeType("GLuint") int memoryObject, @NativeType("GLenum") int pname, @NativeType("GLint const *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - nglMemoryObjectParameterivEXT(memoryObject, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMemoryObjectParameterivEXT ] --- - - public static native void nglGetMemoryObjectParameterivEXT(int memoryObject, int pname, long params); - - public static void glGetMemoryObjectParameterivEXT(@NativeType("GLuint") int memoryObject, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetMemoryObjectParameterivEXT(memoryObject, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetMemoryObjectParameteriEXT(@NativeType("GLuint") int memoryObject, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetMemoryObjectParameterivEXT(memoryObject, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTexStorageMem2DEXT ] --- - - public static native void glTexStorageMem2DEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTexStorageMem2DMultisampleEXT ] --- - - public static native void glTexStorageMem2DMultisampleEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedSampleLocations, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTexStorageMem3DEXT ] --- - - public static native void glTexStorageMem3DEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTexStorageMem3DMultisampleEXT ] --- - - public static native void glTexStorageMem3DMultisampleEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedSampleLocations, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glBufferStorageMemEXT ] --- - - public static native void glBufferStorageMemEXT(@NativeType("GLenum") int target, @NativeType("GLsizeiptr") long size, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTextureStorageMem2DEXT ] --- - - public static native void glTextureStorageMem2DEXT(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTextureStorageMem2DMultisampleEXT ] --- - - public static native void glTextureStorageMem2DMultisampleEXT(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedSampleLocations, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTextureStorageMem3DEXT ] --- - - public static native void glTextureStorageMem3DEXT(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTextureStorageMem3DMultisampleEXT ] --- - - public static native void glTextureStorageMem3DMultisampleEXT(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedSampleLocations, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glNamedBufferStorageMemEXT ] --- - - public static native void glNamedBufferStorageMemEXT(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTexStorageMem1DEXT ] --- - - public static native void glTexStorageMem1DEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTextureStorageMem1DEXT ] --- - - public static native void glTextureStorageMem1DEXT(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - /** Array version of: {@link #glDeleteMemoryObjectsEXT DeleteMemoryObjectsEXT} */ - public static void glDeleteMemoryObjectsEXT(@NativeType("GLuint const *") int[] memoryObjects) { - long __functionAddress = GL.getICD().glDeleteMemoryObjectsEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(memoryObjects.length, memoryObjects, __functionAddress); - } - - /** Array version of: {@link #glCreateMemoryObjectsEXT CreateMemoryObjectsEXT} */ - public static void glCreateMemoryObjectsEXT(@NativeType("GLuint *") int[] memoryObjects) { - long __functionAddress = GL.getICD().glCreateMemoryObjectsEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(memoryObjects.length, memoryObjects, __functionAddress); - } - - /** Array version of: {@link #glMemoryObjectParameterivEXT MemoryObjectParameterivEXT} */ - public static void glMemoryObjectParameterivEXT(@NativeType("GLuint") int memoryObject, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glMemoryObjectParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(memoryObject, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetMemoryObjectParameterivEXT GetMemoryObjectParameterivEXT} */ - public static void glGetMemoryObjectParameterivEXT(@NativeType("GLuint") int memoryObject, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetMemoryObjectParameterivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(memoryObject, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObjectFD.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObjectFD.java deleted file mode 100644 index 516cf292..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObjectFD.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_memory_object_fd extension. - * - *

    Building upon the OpenGL memory object and semaphore framework defined in EXT_external_objects this extension enables an OpenGL - * application to import a memory object or semaphore from POSIX file descriptor external handles.

    - * - *

    Requires {@link EXTMemoryObject EXT_memory_object} and {@link ARBTextureStorage ARB_texture_storage} or a version of OpenGL that incorporates it.

    - */ -public class EXTMemoryObjectFD { - - static { GL.initialize(); } - - /** Accepted by the {@code handleType} parameter of {@link #glImportMemoryFdEXT ImportMemoryFdEXT} */ - public static final int GL_HANDLE_TYPE_OPAQUE_FD_EXT = 0x9586; - - protected EXTMemoryObjectFD() { - throw new UnsupportedOperationException(); - } - - // --- [ glImportMemoryFdEXT ] --- - - public static native void glImportMemoryFdEXT(@NativeType("GLuint") int memory, @NativeType("GLuint64") long size, @NativeType("GLenum") int handleType, @NativeType("GLint") int fd); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObjectWin32.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObjectWin32.java deleted file mode 100644 index 5efb8449..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTMemoryObjectWin32.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; - -/** - * Native bindings to the EXT_memory_object_win32 extension. - * - *

    Building upon the OpenGL memory object and semaphore framework defined in EXT_external_objects, this extension enables an - * OpenGL application to import a memory object or semaphore from a Win32 NT handle or a KMT share handle.

    - */ -public class EXTMemoryObjectWin32 { - - static { GL.initialize(); } - - /** - * Accepted by the {@code handleType} parameter of {@link #glImportMemoryWin32HandleEXT ImportMemoryWin32HandleEXT}, {@link #glImportMemoryWin32NameEXT ImportMemoryWin32NameEXT}, {@link EXTSemaphoreWin32#glImportSemaphoreWin32HandleEXT ImportSemaphoreWin32HandleEXT}, and - * {@link EXTSemaphoreWin32#glImportSemaphoreWin32NameEXT ImportSemaphoreWin32NameEXT}. - */ - public static final int GL_HANDLE_TYPE_OPAQUE_WIN32_EXT = 0x9587; - - /** Accepted by the {@code handleType} parameter of {@link #glImportMemoryWin32HandleEXT ImportMemoryWin32HandleEXT} and {@link EXTSemaphoreWin32#glImportSemaphoreWin32HandleEXT ImportSemaphoreWin32HandleEXT}. */ - public static final int GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT = 0x9588; - - /** - * Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, GetInteger64v, GetBooleani_v, GetIntegeri_v, GetFloati_v, - * GetDoublei_v, and GetInteger64i_v. - */ - public static final int - GL_DEVICE_LUID_EXT = 0x9599, - GL_DEVICE_NODE_MASK_EXT = 0x959A; - - /** Constant values. */ - public static final int GL_LUID_SIZE_EXT = 8; - - /** Accepted by the {@code handleType} parameter of {@link #glImportMemoryWin32HandleEXT ImportMemoryWin32HandleEXT} and {@link #glImportMemoryWin32NameEXT ImportMemoryWin32NameEXT}. */ - public static final int - GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT = 0x9589, - GL_HANDLE_TYPE_D3D12_RESOURCE_EXT = 0x958A, - GL_HANDLE_TYPE_D3D11_IMAGE_EXT = 0x958B; - - /** Accepted by the {@code handleType} parameter of {@link #glImportMemoryWin32HandleEXT ImportMemoryWin32HandleEXT}. */ - public static final int GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT = 0x958C; - - protected EXTMemoryObjectWin32() { - throw new UnsupportedOperationException(); - } - - // --- [ glImportMemoryWin32HandleEXT ] --- - - public static native void nglImportMemoryWin32HandleEXT(int memory, long size, int handleType, long handle); - - public static void glImportMemoryWin32HandleEXT(@NativeType("GLuint") int memory, @NativeType("GLuint64") long size, @NativeType("GLenum") int handleType, @NativeType("void *") long handle) { - if (CHECKS) { - check(handle); - } - nglImportMemoryWin32HandleEXT(memory, size, handleType, handle); - } - - // --- [ glImportMemoryWin32NameEXT ] --- - - public static native void nglImportMemoryWin32NameEXT(int memory, long size, int handleType, long name); - - public static void glImportMemoryWin32NameEXT(@NativeType("GLuint") int memory, @NativeType("GLuint64") long size, @NativeType("GLenum") int handleType, @NativeType("void const *") long name) { - if (CHECKS) { - check(name); - } - nglImportMemoryWin32NameEXT(memory, size, handleType, name); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPackedDepthStencil.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTPackedDepthStencil.java deleted file mode 100644 index 37afeec5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPackedDepthStencil.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_packed_depth_stencil extension. - * - *

    Many OpenGL implementations have chosen to interleave the depth and stencil buffers into one buffer, often with 24 bits of depth precision and 8 bits - * of stencil data. 32 bits is more than is needed for the depth buffer much of the time; a 24-bit depth buffer, on the other hand, requires that reads - * and writes of depth data be unaligned with respect to power-of-two boundaries. On the other hand, 8 bits of stencil data is more than sufficient for - * most applications, so it is only natural to pack the two buffers into a single buffer with both depth and stencil data. OpenGL never provides direct - * access to the buffers, so the OpenGL implementation can provide an interface to applications where it appears the one merged buffer is composed of two - * logical buffers.

    - * - *

    One disadvantage of this scheme is that OpenGL lacks any means by which this packed data can be handled efficiently. For example, when an application - * reads from the 24-bit depth buffer, using the type GL_UNSIGNED_SHORT will lose 8 bits of data, while GL_UNSIGNED_INT has 8 too many. Both require - * expensive format conversion operations. A 24-bit format would be no more suitable, because it would also suffer from the unaligned memory accesses that - * made the standalone 24-bit depth buffer an unattractive proposition in the first place.

    - * - *

    Many applications, such as parallel rendering applications, may also wish to draw to or read back from both the depth and stencil buffers at the same - * time. Currently this requires two separate operations, reducing performance. Since the buffers are interleaved, drawing to or reading from both should - * be no more expensive than using just one; in some cases, it may even be cheaper.

    - * - *

    This extension provides a new data format, GL_DEPTH_STENCIL_EXT, that can be used with the glDrawPixels, glReadPixels, and glCopyPixels commands, as - * well as a packed data type, GL_UNSIGNED_INT_24_8_EXT, that is meant to be used with GL_DEPTH_STENCIL_EXT. No other data types are supported with - * GL_DEPTH_STENCIL_EXT. If ARB_depth_texture or SGIX_depth_texture is supported, GL_DEPTH_STENCIL_EXT/GL_UNSIGNED_INT_24_8_EXT data can also be used for - * textures; this provides a more efficient way to supply data for a 24-bit depth texture.

    - * - *

    GL_DEPTH_STENCIL_EXT data, when passed through the pixel path, undergoes both depth and stencil operations. The depth data is scaled and biased by the - * current GL_DEPTH_SCALE and GL_DEPTH_BIAS, while the stencil data is shifted and offset by the current GL_INDEX_SHIFT and GL_INDEX_OFFSET. The stencil - * data is also put through the stencil-to-stencil pixel map.

    - * - *

    glDrawPixels of GL_DEPTH_STENCIL_EXT data operates similarly to that of GL_STENCIL_INDEX data, bypassing the OpenGL fragment pipeline entirely, unlike - * the treatment of GL_DEPTH_COMPONENT data. The stencil and depth masks are applied, as are the pixel ownership and scissor tests, but all other - * operations are skipped.

    - * - *

    glReadPixels of GL_DEPTH_STENCIL_EXT data reads back a rectangle from both the depth and stencil buffers.

    - * - *

    glCopyPixels of GL_DEPTH_STENCIL_EXT data copies a rectangle from both the depth and stencil buffers. Like glDrawPixels, it applies both the stencil - * and depth masks but skips the remainder of the OpenGL fragment pipeline.

    - * - *

    glTex[Sub]Image[1,2,3]D of GL_DEPTH_STENCIL_EXT data loads depth and stencil data into a depth_stencil texture. glGetTexImage of GL_DEPTH_STENCIL_EXT - * data can be used to retrieve depth and stencil data from a depth/stencil texture.

    - * - *

    In addition, a new base internal format, GL_DEPTH_STENCIL_EXT, can be used by both texture images and renderbuffer storage. When an image with a - * DEPTH_STENCIL_EXT internal format is attached to both the depth and stencil attachment points of a framebuffer object (see EXT_framebuffer_object), - * then it becomes both the depth and stencil buffers of the framebuffer. This fits nicely with hardware that interleaves both depth and stencil data into - * a single buffer. When a texture with DEPTH_STENCIL_EXT data is bound for texturing, only the depth component is accessible through the texture fetcher. - * The stencil data can be written with TexImage or CopyTexImage, and can be read with GetTexImage. When a DEPTH_STENCIL_EXT image is attached to the - * stencil attachment of the bound framebuffer object, the stencil data can be accessed through any operation that reads from or writes to the - * framebuffer's stencil buffer.

    - * - *

    Requires {@link EXTFramebufferObject EXT_framebuffer_object}. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class EXTPackedDepthStencil { - - /** - * Accepted by the {@code format} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage, by the {@code type} parameter of CopyPixels, by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, - * CopyTexImage2D, and RenderbufferStorageEXT, and returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameterivEXT. - */ - public static final int GL_DEPTH_STENCIL_EXT = 0x84F9; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_UNSIGNED_INT_24_8_EXT = 0x84FA; - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameterivEXT. - */ - public static final int GL_DEPTH24_STENCIL8_EXT = 0x88F0; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int GL_TEXTURE_STENCIL_SIZE_EXT = 0x88F1; - - private EXTPackedDepthStencil() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPackedFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTPackedFloat.java deleted file mode 100644 index 56bdacfa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPackedFloat.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_packed_float extension. - * - *

    This extension adds a new 3-component floating-point texture format that fits within a single 32-bit word. This format stores 5 bits of biased exponent - * per component in the same manner as 16-bit floating-point formats, but rather than 10 mantissa bits, the red, green, and blue components have 6, 6, and - * 5 bits respectively. Each mantissa is assumed to have an implied leading one except in the denorm exponent case. There is no sign bit so only - * non-negative values can be represented. Positive infinity, positive denorms, and positive NaN values are representable. The value of the fourth - * component returned by a texture fetch is always 1.0.

    - * - *

    This extension also provides support for rendering into an unsigned floating-point rendering format with the assumption that the texture format - * described above could also be advertised as an unsigned floating-point format for rendering.

    - * - *

    The extension also provides a pixel external format for specifying packed float values directly.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class EXTPackedFloat { - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT. */ - public static final int GL_R11F_G11F_B10F_EXT = 0x8C3A; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * GetSeparableFilter, ColorTable, ColorSubTable, and GetColorTable. - */ - public static final int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C; - - private EXTPackedFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPixelBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTPixelBufferObject.java deleted file mode 100644 index c6a72788..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPixelBufferObject.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_pixel_buffer_object extension. - * - *

    This extension expands on the interface provided by buffer objects. It is intended to permit buffer objects to be used not only with vertex array data, - * but also with pixel data. Buffer objects were promoted from the ARB_vertex_buffer_object extension in OpenGL 1.5.

    - */ -public final class EXTPixelBufferObject { - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferParameteriv, and - * GetBufferPointerv. - */ - public static final int - GL_PIXEL_PACK_BUFFER_EXT = 0x88EB, - GL_PIXEL_UNPACK_BUFFER_EXT = 0x88EC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED, - GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF; - - private EXTPixelBufferObject() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPointParameters.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTPointParameters.java deleted file mode 100644 index 264b98e3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPointParameters.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_point_parameters extension. - * - *

    This extension supports additional geometric characteristics of points. It can be used to render particles or tiny light sources, commonly referred as - * "Light points".

    - * - *

    The raster brightness of a point is a function of the point area, point color, point transparency, and the response of the display's electron gun and - * phosphor. The point area and the point transparency are derived from the point size, currently provided with the {@code size} parameter of - * {@link GL11C#glPointSize PointSize}.

    - * - *

    The primary motivation is to allow the size of a point to be affected by distance attenuation. When distance attenuation has an effect, the final point - * size decreases as the distance of the point from the eye increases.

    - * - *

    The secondary motivation is a mean to control the mapping from the point size to the raster point area and point transparency. This is done in order to - * increase the dynamic range of the raster brightness of points. In other words, the alpha component of a point may be decreased (and its transparency - * increased) as its area shrinks below a defined threshold.

    - * - *

    This extension defines a derived point size to be closely related to point brightness. The brightness of a point is given by:

    - * - *
    
    - *                         1
    - * dist_atten(d) = -------------------
    - *                 a + b * d + c * d^2
    - * 
    - * brightness(Pe) = Brightness * dist_atten(|Pe|)
    - * - *

    where 'Pe' is the point in eye coordinates, and 'Brightness' is some initial value proportional to the square of the size provided with glPointSize. - * Here we simplify the raster brightness to be a function of the rasterized point area and point transparency.

    - * - *
    
    - *             brightness(Pe)      brightness(Pe) ≥ Threshold_Area
    - * area(Pe) =
    - *             Threshold_Area      Otherwise
    - * 
    - * factor(Pe) = brightness(Pe)/Threshold_Area
    - * 
    - * alpha(Pe) = Alpha * factor(Pe)
    - * - *

    where 'Alpha' comes with the point color (possibly modified by lighting).

    - * - *

    'Threshold_Area' above is in area units. Thus, it is proportional to the square of the threshold provided by the programmer through this extension.

    - * - *

    The new point size derivation method applies to all points, while the threshold applies to multisample points only.

    - */ -public class EXTPointParameters { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of glPointParameterfvEXT, and the {@code pname} of glGet. */ - public static final int - GL_POINT_SIZE_MIN_EXT = 0x8126, - GL_POINT_SIZE_MAX_EXT = 0x8127, - GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128, - GL_DISTANCE_ATTENUATION_EXT = 0x8129; - - protected EXTPointParameters() { - throw new UnsupportedOperationException(); - } - - // --- [ glPointParameterfEXT ] --- - - public static native void glPointParameterfEXT(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glPointParameterfvEXT ] --- - - public static native void nglPointParameterfvEXT(int pname, long params); - - public static void glPointParameterfvEXT(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglPointParameterfvEXT(pname, memAddress(params)); - } - - /** Array version of: {@link #glPointParameterfvEXT PointParameterfvEXT} */ - public static void glPointParameterfvEXT(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glPointParameterfvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPolygonOffsetClamp.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTPolygonOffsetClamp.java deleted file mode 100644 index 8ca348cb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTPolygonOffsetClamp.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_polygon_offset_clamp extension. - * - *

    This extension adds a new parameter to the polygon offset function that clamps the calculated offset to a minimum or maximum value. The clamping - * functionality is useful when polygons are nearly parallel to the view direction because their high slopes can result in arbitrarily large polygon - * offsets. In the particular case of shadow mapping, the lack of clamping can produce the appearance of unwanted holes when the shadow casting polygons - * are offset beyond the shadow receiving polygons, and this problem can be alleviated by enforcing a maximum offset value.

    - * - *

    Requires {@link GL33 OpenGL 3.3}.

    - */ -public class EXTPolygonOffsetClamp { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_POLYGON_OFFSET_CLAMP_EXT = 0x8E1B; - - protected EXTPolygonOffsetClamp() { - throw new UnsupportedOperationException(); - } - - // --- [ glPolygonOffsetClampEXT ] --- - - /** - * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. The - * function that determines this value is specified with this command. - * - *

    {@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable - * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value, which may then be clamped to a minimum or maximum - * value specified by {@code clamp}. The values {@code factor}, {@code units}, and {@code clamp} may each be positive, negative, or zero. Calling the - * command {@link GL11C#glPolygonOffset PolygonOffset} is equivalent to calling the command PolygonOffsetClampEXT with {@code clamp} equal to zero.

    - * - * @param factor scales the maximum depth slope of the polygon - * @param units scales an implementation-dependent constant that relates to the usable resolution of the depth buffer - * @param clamp the minimum or maximum clamp value - */ - public static native void glPolygonOffsetClampEXT(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units, @NativeType("GLfloat") float clamp); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTProvokingVertex.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTProvokingVertex.java deleted file mode 100644 index 93904dde..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTProvokingVertex.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_provoking_vertex extension. - * - *

    This extension provides an alternative provoking vertex convention for rendering lines, triangles, and (optionally depending on the implementation) - * quads.

    - * - *

    The provoking vertex of a primitive is the vertex that determines the constant primary and secondary colors when flat shading is enabled.

    - * - *

    In OpenGL, the provoking vertex for triangle, quad, line, and (trivially) point primitives is the last vertex used to assemble the primitive. The - * polygon primitive is an exception in OpenGL where the first vertex of a polygon primitive determines the color of the polygon, even if actually broken - * into triangles and/or quads.

    - * - *

    See section 2.14.7 (Flatshading) of the OpenGL 2.1 specification, particularly Table 2.12 for more details.

    - * - *

    Alternatively the provoking vertex could be the first vertex of the primitive. Other APIs with flat-shading functionality such as Reality Lab and - * Direct3D have adopted the "first vertex of the primitive" convention to determine the provoking vertex. However, these APIs lack quads so do not have a - * defined provoking vertex convention for quads.

    - * - *

    The motivation for this extension is to allow applications developed for APIs with a "first vertex of the primitive" provoking vertex to be easily - * converted to OpenGL.

    - */ -public class EXTProvokingVertex { - - static { GL.initialize(); } - - /** Accepted by the {@code mode} parameter of ProvokingVertexEXT. */ - public static final int - GL_FIRST_VERTEX_CONVENTION_EXT = 0x8E4D, - GL_LAST_VERTEX_CONVENTION_EXT = 0x8E4E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PROVOKING_VERTEX_EXT = 0x8E4F, - GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C; - - protected EXTProvokingVertex() { - throw new UnsupportedOperationException(); - } - - // --- [ glProvokingVertexEXT ] --- - - public static native void glProvokingVertexEXT(@NativeType("GLenum") int mode); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTRasterMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTRasterMultisample.java deleted file mode 100644 index 830b763b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTRasterMultisample.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_raster_multisample extension. - * - *

    This extension allows rendering to a non-multisample color buffer while rasterizing with more than one sample. The result of rasterization (coverage) - * is available in the {@code gl_SampleMaskIn[]} fragment shader input, multisample rasterization is enabled for all primitives, and several per- fragment - * operations operate at the raster sample rate.

    - * - *

    When using the functionality provided by this extension, depth, stencil, and depth bounds tests must be disabled, and a multisample draw framebuffer - * must not be used.

    - * - *

    A fragment's "coverage", or "effective raster samples" is considered to have "N bits" (as opposed to "one bit" corresponding to the single color - * sample) through the fragment shader, in the sample mask output, through the multisample fragment operations and occlusion query, until the coverage is - * finally "reduced" to a single bit in a new "Coverage Reduction" stage that occurs before blending.

    - */ -public class EXTRasterMultisample { - - static { GL.initialize(); } - - /** Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled. */ - public static final int GL_RASTER_MULTISAMPLE_EXT = 0x9327; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_RASTER_SAMPLES_EXT = 0x9328, - GL_MAX_RASTER_SAMPLES_EXT = 0x9329, - GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT = 0x932A, - GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT = 0x932B, - GL_EFFECTIVE_RASTER_SAMPLES_EXT = 0x932C; - - protected EXTRasterMultisample() { - throw new UnsupportedOperationException(); - } - - // --- [ glRasterSamplesEXT ] --- - - /** - * Selects the number of samples to be used for rasterization. {@code samples} represents a request for a desired minimum number of samples. Since - * different implementations may support different sample counts, the actual sample pattern used is implementation-dependent. However, the resulting value - * for {@link #GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} is guaranteed to be greater than or equal to {@code samples} and no more than the next larger sample count supported by the - * implementation. If {@code fixedsamplelocations} is {@link GL11#GL_TRUE TRUE}, identical sample locations will be used for all pixels. The sample locations chosen are a - * function of only the parameters to RasterSamplesEXT and not of any other state. - * - *

    If {@link #GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled, then the sample pattern chosen by RasterSamplesEXT will be used instead of sampling at the center of the pixel. - * The sample locations can be queried with {@link GL32C#glGetMultisamplefv GetMultisamplefv} with a {@code pname} of {@link GL32#GL_SAMPLE_POSITION SAMPLE_POSITION}, similar to normal multisample sample - * locations.

    - * - *

    The value {@link #GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT MULTISAMPLE_RASTERIZATION_ALLOWED_EXT} is {@link GL11#GL_TRUE TRUE} if {@link GL13#GL_SAMPLE_BUFFERS SAMPLE_BUFFERS} is one or if {@link #GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled. The value - * {@link #GL_EFFECTIVE_RASTER_SAMPLES_EXT EFFECTIVE_RASTER_SAMPLES_EXT} is equal to {@link #GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} if {@link #GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled, otherwise is equal to {@link GL13#GL_SAMPLES SAMPLES}.

    - * - *

    Explicit multisample rasterization can not be used in conjunction with depth, stencil, or depth bounds tests, multisample framebuffers, or if - * {@link #GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} is zero. If {@link #GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} will be generated by Draw commands if

    - * - *
      - *
    • the value of {@link #GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} is zero
    • - *
    • the depth, stencil, or depth bounds test is enabled
    • - *
    • a multisample draw framebuffer is bound ({@link GL13#GL_SAMPLE_BUFFERS SAMPLE_BUFFERS} is one)
    • - *
    - * - *
    Errors
    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code samples} is greater than the value of {@link #GL_MAX_RASTER_SAMPLES_EXT MAX_RASTER_SAMPLES_EXT} (the implementation-dependent maximum - * number of samples).

    - * - * @param samples the number of samples to be used for rasterization - * @param fixedsamplelocations if {@link GL11#GL_TRUE TRUE}, identical sample locations will be used for all pixels - */ - public static native void glRasterSamplesEXT(@NativeType("GLuint") int samples, @NativeType("GLboolean") boolean fixedsamplelocations); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSecondaryColor.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTSecondaryColor.java deleted file mode 100644 index 790bbc8f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSecondaryColor.java +++ /dev/null @@ -1,425 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_secondary_color extension. - * - *

    This extension allows specifying the RGB components of the secondary color used in the Color Sum stage, instead of using the default (0,0,0,0) color. - * It applies only in RGBA mode and when LIGHTING is disabled.

    - */ -public class EXTSecondaryColor { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_COLOR_SUM_EXT = 0x8458; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CURRENT_SECONDARY_COLOR_EXT = 0x8459, - GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A, - GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B, - GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C; - - /** Accepted by the {@code pname} parameter of GetPointerv. */ - public static final int GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D; - - /** Accepted by the {@code array} parameter of EnableClientState and DisableClientState. */ - public static final int GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E; - - protected EXTSecondaryColor() { - throw new UnsupportedOperationException(); - } - - // --- [ glSecondaryColor3bEXT ] --- - - /** - * Sets the R, G, and B components of the current secondary color. - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3bEXT(@NativeType("GLbyte") byte red, @NativeType("GLbyte") byte green, @NativeType("GLbyte") byte blue); - - // --- [ glSecondaryColor3sEXT ] --- - - /** - * Short version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3sEXT(@NativeType("GLshort") short red, @NativeType("GLshort") short green, @NativeType("GLshort") short blue); - - // --- [ glSecondaryColor3iEXT ] --- - - /** - * Integer version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3iEXT(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue); - - // --- [ glSecondaryColor3fEXT ] --- - - /** - * Float version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3fEXT(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue); - - // --- [ glSecondaryColor3dEXT ] --- - - /** - * Double version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3dEXT(@NativeType("GLdouble") double red, @NativeType("GLdouble") double green, @NativeType("GLdouble") double blue); - - // --- [ glSecondaryColor3ubEXT ] --- - - /** - * Unsigned version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3ubEXT(@NativeType("GLubyte") byte red, @NativeType("GLubyte") byte green, @NativeType("GLubyte") byte blue); - - // --- [ glSecondaryColor3usEXT ] --- - - /** - * Unsigned short version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3usEXT(@NativeType("GLushort") short red, @NativeType("GLushort") short green, @NativeType("GLushort") short blue); - - // --- [ glSecondaryColor3uiEXT ] --- - - /** - * Unsigned int version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - */ - public static native void glSecondaryColor3uiEXT(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue); - - // --- [ glSecondaryColor3bvEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3bvEXT SecondaryColor3bvEXT} */ - public static native void nglSecondaryColor3bvEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3bEXT SecondaryColor3bEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3bvEXT(@NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3bvEXT(memAddress(v)); - } - - // --- [ glSecondaryColor3svEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3svEXT SecondaryColor3svEXT} */ - public static native void nglSecondaryColor3svEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3sEXT SecondaryColor3sEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3svEXT(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3svEXT(memAddress(v)); - } - - // --- [ glSecondaryColor3ivEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3ivEXT SecondaryColor3ivEXT} */ - public static native void nglSecondaryColor3ivEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3iEXT SecondaryColor3iEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3ivEXT(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3ivEXT(memAddress(v)); - } - - // --- [ glSecondaryColor3fvEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3fvEXT SecondaryColor3fvEXT} */ - public static native void nglSecondaryColor3fvEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3fEXT SecondaryColor3fEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3fvEXT(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3fvEXT(memAddress(v)); - } - - // --- [ glSecondaryColor3dvEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3dvEXT SecondaryColor3dvEXT} */ - public static native void nglSecondaryColor3dvEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3dEXT SecondaryColor3dEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3dvEXT(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3dvEXT(memAddress(v)); - } - - // --- [ glSecondaryColor3ubvEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3ubvEXT SecondaryColor3ubvEXT} */ - public static native void nglSecondaryColor3ubvEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3ubEXT SecondaryColor3ubEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3ubvEXT(@NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3ubvEXT(memAddress(v)); - } - - // --- [ glSecondaryColor3usvEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3usvEXT SecondaryColor3usvEXT} */ - public static native void nglSecondaryColor3usvEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3usEXT SecondaryColor3usEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3usvEXT(@NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3usvEXT(memAddress(v)); - } - - // --- [ glSecondaryColor3uivEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColor3uivEXT SecondaryColor3uivEXT} */ - public static native void nglSecondaryColor3uivEXT(long v); - - /** - * Pointer version of {@link #glSecondaryColor3uiEXT SecondaryColor3uiEXT}. - * - * @param v the secondary color buffer - */ - public static void glSecondaryColor3uivEXT(@NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3uivEXT(memAddress(v)); - } - - // --- [ glSecondaryColorPointerEXT ] --- - - /** Unsafe version of: {@link #glSecondaryColorPointerEXT SecondaryColorPointerEXT} */ - public static native void nglSecondaryColorPointerEXT(int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglSecondaryColorPointerEXT(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglSecondaryColorPointerEXT(size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglSecondaryColorPointerEXT(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglSecondaryColorPointerEXT(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglSecondaryColorPointerEXT(size, type, stride, memAddress(pointer)); - } - - /** Array version of: {@link #glSecondaryColor3svEXT SecondaryColor3svEXT} */ - public static void glSecondaryColor3svEXT(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3svEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColor3ivEXT SecondaryColor3ivEXT} */ - public static void glSecondaryColor3ivEXT(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3ivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColor3fvEXT SecondaryColor3fvEXT} */ - public static void glSecondaryColor3fvEXT(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3fvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColor3dvEXT SecondaryColor3dvEXT} */ - public static void glSecondaryColor3dvEXT(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3dvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColor3usvEXT SecondaryColor3usvEXT} */ - public static void glSecondaryColor3usvEXT(@NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3usvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColor3uivEXT SecondaryColor3uivEXT} */ - public static void glSecondaryColor3uivEXT(@NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3uivEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColorPointerEXT SecondaryColorPointerEXT} */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") short[] pointer) { - long __functionAddress = GL.getICD().glSecondaryColorPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColorPointerEXT SecondaryColorPointerEXT} */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") int[] pointer) { - long __functionAddress = GL.getICD().glSecondaryColorPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(size, type, stride, pointer, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColorPointerEXT SecondaryColorPointerEXT} */ - public static void glSecondaryColorPointerEXT(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") float[] pointer) { - long __functionAddress = GL.getICD().glSecondaryColorPointerEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(size, type, stride, pointer, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphore.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphore.java deleted file mode 100644 index 7f01401b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphore.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_semaphore extension. - * - *

    The Vulkan API introduces the concept of explicit memory objects and reusable synchronization objects. This extension brings those concepts to the - * OpenGL API via two new object types:

    - * - *
      - *
    • Memory objects
    • - *
    • Semaphores
    • - *
    - * - *

    Rather than allocating memory as a response to object allocation, memory allocation and binding are two separate operations in Vulkan. This extension - * allows an OpenGL application to import a Vulkan memory object, and to bind textures and/or buffer objects to it.

    - * - *

    No methods to import memory objects are defined here. Separate platform-specific extensions are defined for this purpose.

    - * - *

    Semaphores are synchronization primitives that can be waited on and signaled only by the GPU, or in GL terms, in the GL server. They are similar in - * concept to GL's "sync" objects and EGL's "EGLSync" objects, but different enough that compatibilities between the two are difficult to derive.

    - * - *

    Rather than attempt to map Vulkan semaphores on to GL/EGL sync objects to achieve interoperability, this extension introduces a new object, GL - * semaphores, that map directly to the semantics of Vulkan semaphores. To achieve full image and buffer memory coherence with a Vulkan driver, the - * commands that manipulate semaphores also allow external usage information to be imported and exported.

    - */ -public class EXTSemaphore { - - static { GL.initialize(); } - - /** - * Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, GetInteger64v, {@link #glGetUnsignedBytevEXT GetUnsignedBytevEXT}, and the - * {@code target} parameter of GetBooleani_v, GetIntegeri_v,GetFloati_v, GetDoublei_v, GetInteger64i_v, and {@link #glGetUnsignedBytei_vEXT GetUnsignedBytei_vEXT}. - */ - public static final int - GL_NUM_DEVICE_UUIDS_EXT = 0x9596, - GL_DEVICE_UUID_EXT = 0x9597, - GL_DRIVER_UUID_EXT = 0x9598; - - /** Constant values. */ - public static final int GL_UUID_SIZE_EXT = 16; - - /** Accepted by the {@code dstLayouts} parameter of {@link #glSignalSemaphoreEXT SignalSemaphoreEXT} and the {@code srcLayouts} parameter of {@link #glWaitSemaphoreEXT WaitSemaphoreEXT}. */ - public static final int - GL_LAYOUT_GENERAL_EXT = 0x958D, - GL_LAYOUT_COLOR_ATTACHMENT_EXT = 0x958E, - GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT = 0x958F, - GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT = 0x9590, - GL_LAYOUT_SHADER_READ_ONLY_EXT = 0x9591, - GL_LAYOUT_TRANSFER_SRC_EXT = 0x9592, - GL_LAYOUT_TRANSFER_DST_EXT = 0x9593, - GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT = 0x9530, - GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT = 0x9531; - - protected EXTSemaphore() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetUnsignedBytevEXT ] --- - - public static void nglGetUnsignedBytevEXT(int pname, long data) { - EXTMemoryObject.nglGetUnsignedBytevEXT(pname, data); - } - - public static void glGetUnsignedBytevEXT(@NativeType("GLenum") int pname, @NativeType("GLubyte *") ByteBuffer data) { - EXTMemoryObject.glGetUnsignedBytevEXT(pname, data); - } - - // --- [ glGetUnsignedBytei_vEXT ] --- - - public static void nglGetUnsignedBytei_vEXT(int target, int index, long data) { - EXTMemoryObject.nglGetUnsignedBytei_vEXT(target, index, data); - } - - public static void glGetUnsignedBytei_vEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLubyte *") ByteBuffer data) { - EXTMemoryObject.glGetUnsignedBytei_vEXT(target, index, data); - } - - // --- [ glGenSemaphoresEXT ] --- - - public static native void nglGenSemaphoresEXT(int n, long semaphores); - - public static void glGenSemaphoresEXT(@NativeType("GLuint *") IntBuffer semaphores) { - nglGenSemaphoresEXT(semaphores.remaining(), memAddress(semaphores)); - } - - @NativeType("void") - public static int glGenSemaphoresEXT() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer semaphores = stack.callocInt(1); - nglGenSemaphoresEXT(1, memAddress(semaphores)); - return semaphores.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteSemaphoresEXT ] --- - - public static native void nglDeleteSemaphoresEXT(int n, long semaphores); - - public static void glDeleteSemaphoresEXT(@NativeType("GLuint const *") IntBuffer semaphores) { - nglDeleteSemaphoresEXT(semaphores.remaining(), memAddress(semaphores)); - } - - public static void glDeleteSemaphoresEXT(@NativeType("GLuint const *") int semaphore) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer semaphores = stack.ints(semaphore); - nglDeleteSemaphoresEXT(1, memAddress(semaphores)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsSemaphoreEXT ] --- - - @NativeType("GLboolean") - public static native boolean glIsSemaphoreEXT(@NativeType("GLuint") int semaphore); - - // --- [ glSemaphoreParameterui64vEXT ] --- - - public static native void nglSemaphoreParameterui64vEXT(int semaphore, int pname, long params); - - public static void glSemaphoreParameterui64vEXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLuint64 const *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglSemaphoreParameterui64vEXT(semaphore, pname, memAddress(params)); - } - - public static void glSemaphoreParameterui64EXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLuint64 const *") long param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.longs(param); - nglSemaphoreParameterui64vEXT(semaphore, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetSemaphoreParameterui64vEXT ] --- - - public static native void nglGetSemaphoreParameterui64vEXT(int semaphore, int pname, long params); - - public static void glGetSemaphoreParameterui64vEXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetSemaphoreParameterui64vEXT(semaphore, pname, memAddress(params)); - } - - @NativeType("void") - public static long glGetSemaphoreParameterui64EXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetSemaphoreParameterui64vEXT(semaphore, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glWaitSemaphoreEXT ] --- - - public static native void nglWaitSemaphoreEXT(int semaphore, int numBufferBarriers, long buffers, int numTextureBarriers, long textures, long srcLayouts); - - public static void glWaitSemaphoreEXT(@NativeType("GLuint") int semaphore, @NativeType("GLuint const *") IntBuffer buffers, @NativeType("GLuint const *") IntBuffer textures, @NativeType("GLenum const *") IntBuffer srcLayouts) { - if (CHECKS) { - check(srcLayouts, textures.remaining()); - } - nglWaitSemaphoreEXT(semaphore, buffers.remaining(), memAddress(buffers), textures.remaining(), memAddress(textures), memAddress(srcLayouts)); - } - - // --- [ glSignalSemaphoreEXT ] --- - - public static native void nglSignalSemaphoreEXT(int semaphore, int numBufferBarriers, long buffers, int numTextureBarriers, long textures, long dstLayouts); - - public static void glSignalSemaphoreEXT(@NativeType("GLuint") int semaphore, @NativeType("GLuint const *") IntBuffer buffers, @NativeType("GLuint const *") IntBuffer textures, @NativeType("GLenum const *") IntBuffer dstLayouts) { - if (CHECKS) { - check(dstLayouts, textures.remaining()); - } - nglSignalSemaphoreEXT(semaphore, buffers.remaining(), memAddress(buffers), textures.remaining(), memAddress(textures), memAddress(dstLayouts)); - } - - /** Array version of: {@link #glGenSemaphoresEXT GenSemaphoresEXT} */ - public static void glGenSemaphoresEXT(@NativeType("GLuint *") int[] semaphores) { - long __functionAddress = GL.getICD().glGenSemaphoresEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(semaphores.length, semaphores, __functionAddress); - } - - /** Array version of: {@link #glDeleteSemaphoresEXT DeleteSemaphoresEXT} */ - public static void glDeleteSemaphoresEXT(@NativeType("GLuint const *") int[] semaphores) { - long __functionAddress = GL.getICD().glDeleteSemaphoresEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(semaphores.length, semaphores, __functionAddress); - } - - /** Array version of: {@link #glSemaphoreParameterui64vEXT SemaphoreParameterui64vEXT} */ - public static void glSemaphoreParameterui64vEXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLuint64 const *") long[] params) { - long __functionAddress = GL.getICD().glSemaphoreParameterui64vEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(semaphore, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetSemaphoreParameterui64vEXT GetSemaphoreParameterui64vEXT} */ - public static void glGetSemaphoreParameterui64vEXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetSemaphoreParameterui64vEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(semaphore, pname, params, __functionAddress); - } - - /** Array version of: {@link #glWaitSemaphoreEXT WaitSemaphoreEXT} */ - public static void glWaitSemaphoreEXT(@NativeType("GLuint") int semaphore, @NativeType("GLuint const *") int[] buffers, @NativeType("GLuint const *") int[] textures, @NativeType("GLenum const *") int[] srcLayouts) { - long __functionAddress = GL.getICD().glWaitSemaphoreEXT; - if (CHECKS) { - check(__functionAddress); - check(srcLayouts, textures.length); - } - callPPPV(semaphore, buffers.length, buffers, textures.length, textures, srcLayouts, __functionAddress); - } - - /** Array version of: {@link #glSignalSemaphoreEXT SignalSemaphoreEXT} */ - public static void glSignalSemaphoreEXT(@NativeType("GLuint") int semaphore, @NativeType("GLuint const *") int[] buffers, @NativeType("GLuint const *") int[] textures, @NativeType("GLenum const *") int[] dstLayouts) { - long __functionAddress = GL.getICD().glSignalSemaphoreEXT; - if (CHECKS) { - check(__functionAddress); - check(dstLayouts, textures.length); - } - callPPPV(semaphore, buffers.length, buffers, textures.length, textures, dstLayouts, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphoreFD.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphoreFD.java deleted file mode 100644 index 823bee88..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphoreFD.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_semaphore_fd extension. - * - *

    Building upon the OpenGL memory object and semaphore framework defined in EXT_external_objects this extension enables an OpenGL - * application to import a memory object or semaphore from POSIX file descriptor external handles.

    - * - *

    Requires {@link EXTSemaphore EXT_semaphore} and {@link ARBTextureStorage ARB_texture_storage} or a version of OpenGL that incorporates it.

    - */ -public class EXTSemaphoreFD { - - static { GL.initialize(); } - - /** Accepted by the {@code handleType} parameter of {@link #glImportSemaphoreFdEXT ImportSemaphoreFdEXT}. */ - public static final int GL_HANDLE_TYPE_OPAQUE_FD_EXT = 0x9586; - - protected EXTSemaphoreFD() { - throw new UnsupportedOperationException(); - } - - // --- [ glImportSemaphoreFdEXT ] --- - - public static native void glImportSemaphoreFdEXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int handleType, @NativeType("GLint") int fd); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphoreWin32.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphoreWin32.java deleted file mode 100644 index 6ba72e40..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSemaphoreWin32.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; - -/** - * Native bindings to the EXT_semaphore_win32 extension. - * - *

    Building upon the OpenGL memory object and semaphore framework defined in EXT_external_objects, this extension enables an - * OpenGL application to import a memory object or semaphore from a Win32 NT handle or a KMT share handle.

    - */ -public class EXTSemaphoreWin32 { - - static { GL.initialize(); } - - /** - * Accepted by the {@code handleType} parameter of {@link EXTMemoryObjectWin32#glImportMemoryWin32HandleEXT ImportMemoryWin32HandleEXT}, {@link EXTMemoryObjectWin32#glImportMemoryWin32NameEXT ImportMemoryWin32NameEXT}, {@link #glImportSemaphoreWin32HandleEXT ImportSemaphoreWin32HandleEXT}, and - * {@link #glImportSemaphoreWin32NameEXT ImportSemaphoreWin32NameEXT}. - */ - public static final int GL_HANDLE_TYPE_OPAQUE_WIN32_EXT = 0x9587; - - /** Accepted by the {@code handleType} parameter of {@link EXTMemoryObjectWin32#glImportMemoryWin32HandleEXT ImportMemoryWin32HandleEXT} and {@link #glImportSemaphoreWin32HandleEXT ImportSemaphoreWin32HandleEXT}. */ - public static final int GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT = 0x9588; - - /** - * Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, GetInteger64v, GetBooleani_v, GetIntegeri_v, GetFloati_v, - * GetDoublei_v, and GetInteger64i_v. - */ - public static final int - GL_DEVICE_LUID_EXT = 0x9599, - GL_DEVICE_NODE_MASK_EXT = 0x959A; - - /** Constant values. */ - public static final int GL_LUID_SIZE_EXT = 8; - - /** Accepted by the {@code handleType} parameter of {@link #glImportSemaphoreWin32HandleEXT ImportSemaphoreWin32HandleEXT}. */ - public static final int GL_HANDLE_TYPE_D3D12_FENCE_EXT = 0x9594; - - /** Accepted by the {@code pname} parameter of {@link EXTSemaphore#glSemaphoreParameterui64vEXT SemaphoreParameterui64vEXT} and {@link EXTSemaphore#glGetSemaphoreParameterui64vEXT GetSemaphoreParameterui64vEXT}. */ - public static final int GL_D3D12_FENCE_VALUE_EXT = 0x9595; - - protected EXTSemaphoreWin32() { - throw new UnsupportedOperationException(); - } - - // --- [ glImportSemaphoreWin32HandleEXT ] --- - - public static native void nglImportSemaphoreWin32HandleEXT(int semaphore, int handleType, long handle); - - public static void glImportSemaphoreWin32HandleEXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int handleType, @NativeType("void *") long handle) { - if (CHECKS) { - check(handle); - } - nglImportSemaphoreWin32HandleEXT(semaphore, handleType, handle); - } - - // --- [ glImportSemaphoreWin32NameEXT ] --- - - public static native void nglImportSemaphoreWin32NameEXT(int semaphore, int handleType, long name); - - public static void glImportSemaphoreWin32NameEXT(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int handleType, @NativeType("void const *") long name) { - if (CHECKS) { - check(name); - } - nglImportSemaphoreWin32NameEXT(semaphore, handleType, name); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSeparateShaderObjects.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTSeparateShaderObjects.java deleted file mode 100644 index 1b8d473f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSeparateShaderObjects.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_separate_shader_objects extension. - * - *

    rior to this extension, GLSL requires multiple shader domains (vertex, fragment, geometry) to be linked into a single monolithic program object to - * specify a GLSL shader for each domain.

    - * - *

    While GLSL's monolithic approach has some advantages for optimizing shaders as a unit that span multiple domains, all existing GPU hardware supports - * the more flexible mix-and-match approach.

    - * - *

    HLSL9, Cg, the prior OpenGL assembly program extensions, and game console programmers favor a more flexible "mix-and-match" approach to specifying - * shaders independently for these different shader domains. Many developers build their shader content around the mix-and-match approach where they can - * use a single vertex shader with multiple fragment shaders (or vice versa).

    - * - *

    This keep-it-simple extension adapts the "mix-and-match" shader domain model for GLSL so different GLSL program objects can be bound to different - * shader domains.

    - * - *

    This extension redefines the operation of glUseProgram(GLenum program) to be equivalent to:

    - * - *
    
    - *  glUseShaderProgramEXT(GL_VERTEX_SHADER, program);
    - * glUseShaderProgramEXT(GL_GEOMETRY_SHADER_EXT, program);
    - * glUseShaderProgramEXT(GL_FRAGMENT_SHADER, program);
    - * glActiveProgramEXT(program);
    - * - *

    You can also call these commands separately to bind each respective domain. The GL_VERTEX_SHADER, GL_GEOMETRY_SHADER_EXT, and GL_FRAGMENT_SHADER tokens - * refer to the conventional vertex, geometry, and fragment domains respectively. glActiveProgramEXT specifies the program that glUniform* commands will - * update.

    - * - *

    Separate linking creates the possibility that certain output varyings of a shader may go unread by the subsequent shader inputting varyings. In this - * case, the output varyings are simply ignored. It is also possible input varyings from a shader may not be written as output varyings of a preceding - * shader. In this case, the unwritten input varying values are undefined. Implementations are encouraged to zero these undefined input varying values.

    - * - *

    This extension is a proof-of-concept that separate shader objects can work for GLSL and a response to repeated requests for this functionality. There - * are various loose ends, particularly when dealing with user-defined varyings. The hope is a future extension will improve this situation.

    - * - *

    Requires {@link GL20 OpenGL 2.0} or {@link ARBShaderObjects ARB_shader_objects}.

    - */ -public class EXTSeparateShaderObjects { - - static { GL.initialize(); } - - /** Accepted by {@code type} parameter to GetIntegerv and GetFloatv. */ - public static final int GL_ACTIVE_PROGRAM_EXT = 0x8B8D; - - protected EXTSeparateShaderObjects() { - throw new UnsupportedOperationException(); - } - - // --- [ glUseShaderProgramEXT ] --- - - public static native void glUseShaderProgramEXT(@NativeType("GLenum") int type, @NativeType("GLuint") int program); - - // --- [ glActiveProgramEXT ] --- - - public static native void glActiveProgramEXT(@NativeType("GLuint") int program); - - // --- [ glCreateShaderProgramEXT ] --- - - public static native int nglCreateShaderProgramEXT(int type, long string); - - @NativeType("GLuint") - public static int glCreateShaderProgramEXT(@NativeType("GLenum") int type, @NativeType("GLchar const *") ByteBuffer string) { - if (CHECKS) { - checkNT1(string); - } - return nglCreateShaderProgramEXT(type, memAddress(string)); - } - - @NativeType("GLuint") - public static int glCreateShaderProgramEXT(@NativeType("GLenum") int type, @NativeType("GLchar const *") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(string, true); - long stringEncoded = stack.getPointerAddress(); - return nglCreateShaderProgramEXT(type, stringEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderFramebufferFetch.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderFramebufferFetch.java deleted file mode 100644 index 2f160108..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderFramebufferFetch.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_shader_framebuffer_fetch extension. - * - *

    Conventional OpenGL blending provides a configurable series of operations that can be used to combine the output values from a fragment shader with the - * values already in the framebuffer. While these operations are suitable for basic image compositing, other compositing operations or operations that - * treat fragment output as something other than a color (normals, for instance) may not be expressible without multiple passes or render-to-texture - * operations.

    - * - *

    This extension provides a mechanism whereby a fragment shader may read existing framebuffer data as input. This can be used to implement compositing - * operations that would have been inconvenient or impossible with fixed-function blending. It can also be used to apply a function to the framebuffer - * color, by writing a shader which uses the existing framebuffer color as its only input.

    - * - *

    This extension provides two alternative name strings:

    - * - *
      - *
    • {@code GL_EXT_shader_framebuffer_fetch} guarantees full coherency between framebuffer reads and writes. If this extension string is exposed, the - * result of reading from the framebuffer from a fragment shader invocation is guaranteed to reflect values written by any previous overlapping - * samples in API primitive order, unless requested otherwise in the shader source using the noncoherent layout qualifier.
    • - *
    • {@code GL_EXT_shader_framebuffer_fetch_non_coherent} provides limited implicit coherency guarantees. Instead, the application is expected to call - * the {@link EXTShaderFramebufferFetchNonCoherent#glFramebufferFetchBarrierEXT FramebufferFetchBarrierEXT} command for previous framebuffer writes to become visible to subsequent fragment shader invocations. For this - * extension to give well-defined results applications may have to split rendering into multiple passes separated with - * {@code FramebufferFetchBarrierEXT} calls. The functionality provided by this extension is requested in the shader source using the noncoherent - * layout qualifier.
    • - *
    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public final class EXTShaderFramebufferFetch { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8A52; - - private EXTShaderFramebufferFetch() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderFramebufferFetchNonCoherent.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderFramebufferFetchNonCoherent.java deleted file mode 100644 index 08221751..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderFramebufferFetchNonCoherent.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_shader_framebuffer_fetch_non_coherent extension. - * - *

    See {@link EXTShaderFramebufferFetch EXT_shader_framebuffer_fetch}.

    - */ -public class EXTShaderFramebufferFetchNonCoherent { - - static { GL.initialize(); } - - protected EXTShaderFramebufferFetchNonCoherent() { - throw new UnsupportedOperationException(); - } - - // --- [ glFramebufferFetchBarrierEXT ] --- - - /** - * Specifies a boundary between passes when reading existing framebuffer data from fragment shaders via the {@code gl_LastFragData} built-in variable. - * Previous framebuffer object writes regardless of the mechanism (including clears, blits and primitive rendering) are guaranteed to be visible to - * subsequent fragment shader invocations that read from the framebuffer once {@code FramebufferFetchBarrierEXT} is executed. - * - *

    If {@code EXT_shader_framebuffer_fetch} is also supported: Because the implementation guarantees coherency of framebuffer reads and writes for color - * outputs not explicitly marked with the noncoherent layout qualifier, calling the {@code FramebufferFetchBarrierEXT} command is not required unless the - * application wishes to manage memory ordering of framebuffer reads and writes explicitly, which may provide better performance on some implementations - * in cases where rendering can be split into multiple passes with non-self-overlapping geometry.

    - */ - public static native void glFramebufferFetchBarrierEXT(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderImageLoadStore.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderImageLoadStore.java deleted file mode 100644 index e9ef9307..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTShaderImageLoadStore.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_shader_image_load_store extension. - * - *

    This extension provides GLSL built-in functions allowing shaders to load from, store to, and perform atomic read-modify-write operations to a single - * level of a texture object from any shader stage. These built-in functions are named imageLoad(), imageStore(), and imageAtomic*(), respectively, and - * accept integer texel coordinates to identify the texel accessed. The extension adds the notion of "image units" to the OpenGL API, to which texture - * levels are bound for access by the GLSL built-in functions. To allow shaders to specify the image unit to access, GLSL provides a new set of data types - * ("image*") similar to samplers. Each image variable is assigned an integer value to identify an image unit to access, which is specified using - * Uniform*() APIs in a manner similar to samplers. For implementations supporting the NV_gpu_program5 extensions, assembly language instructions to - * perform image loads, stores, and atomics are also provided.

    - * - *

    This extension also provides the capability to explicitly enable "early" per-fragment tests, where operations like depth and stencil testing are - * performed prior to fragment shader execution. In unextended OpenGL, fragment shaders never have any side effects and implementations can sometimes - * perform per-fragment tests and discard some fragments prior to executing the fragment shader. Since this extension allows fragment shaders to write to - * texture and buffer object memory using the built-in image functions, such optimizations could lead to non-deterministic results. To avoid this, - * implementations supporting this extension may not perform such optimizations on shaders having such side effects. However, enabling early per-fragment - * tests guarantees that such tests will be performed prior to fragment shader execution, and ensures that image stores and atomics will not be performed - * by fragment shader invocations where these per-fragment tests fail.

    - * - *

    Finally, this extension provides both a GLSL built-in function and an OpenGL API function allowing applications some control over the ordering of image - * loads, stores, and atomics relative to other OpenGL pipeline operations accessing the same memory. Because the extension provides the ability to - * perform random accesses to texture or buffer object memory, such accesses are not easily tracked by the OpenGL driver. To avoid the need for - * heavy-handed synchronization at the driver level, this extension requires manual synchronization. The MemoryBarrierEXT() OpenGL API function allows - * applications to specify a bitfield indicating the set of OpenGL API operations to synchronize relative to shader memory access. The memoryBarrier() - * GLSL built-in function provides a synchronization point within a given shader invocation to ensure that all memory accesses performed prior to the - * synchronization point complete prior to any started after the synchronization point.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public class EXTShaderImageLoadStore { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_IMAGE_UNITS_EXT = 0x8F38, - GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT = 0x8F39, - GL_MAX_IMAGE_SAMPLES_EXT = 0x906D; - - /** Accepted by the {@code target} parameter of GetIntegeri_v and GetBooleani_v. */ - public static final int - GL_IMAGE_BINDING_NAME_EXT = 0x8F3A, - GL_IMAGE_BINDING_LEVEL_EXT = 0x8F3B, - GL_IMAGE_BINDING_LAYERED_EXT = 0x8F3C, - GL_IMAGE_BINDING_LAYER_EXT = 0x8F3D, - GL_IMAGE_BINDING_ACCESS_EXT = 0x8F3E, - GL_IMAGE_BINDING_FORMAT_EXT = 0x906E; - - /** Accepted by the {@code barriers} parameter of MemoryBarrierEXT. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = 0x1, - GL_ELEMENT_ARRAY_BARRIER_BIT_EXT = 0x2, - GL_UNIFORM_BARRIER_BIT_EXT = 0x4, - GL_TEXTURE_FETCH_BARRIER_BIT_EXT = 0x8, - GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT = 0x20, - GL_COMMAND_BARRIER_BIT_EXT = 0x40, - GL_PIXEL_BUFFER_BARRIER_BIT_EXT = 0x80, - GL_TEXTURE_UPDATE_BARRIER_BIT_EXT = 0x100, - GL_BUFFER_UPDATE_BARRIER_BIT_EXT = 0x200, - GL_FRAMEBUFFER_BARRIER_BIT_EXT = 0x400, - GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT = 0x800, - GL_ATOMIC_COUNTER_BARRIER_BIT_EXT = 0x1000, - GL_ALL_BARRIER_BITS_EXT = 0xFFFFFFFF; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_IMAGE_1D_EXT = 0x904C, - GL_IMAGE_2D_EXT = 0x904D, - GL_IMAGE_3D_EXT = 0x904E, - GL_IMAGE_2D_RECT_EXT = 0x904F, - GL_IMAGE_CUBE_EXT = 0x9050, - GL_IMAGE_BUFFER_EXT = 0x9051, - GL_IMAGE_1D_ARRAY_EXT = 0x9052, - GL_IMAGE_2D_ARRAY_EXT = 0x9053, - GL_IMAGE_CUBE_MAP_ARRAY_EXT = 0x9054, - GL_IMAGE_2D_MULTISAMPLE_EXT = 0x9055, - GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9056, - GL_INT_IMAGE_1D_EXT = 0x9057, - GL_INT_IMAGE_2D_EXT = 0x9058, - GL_INT_IMAGE_3D_EXT = 0x9059, - GL_INT_IMAGE_2D_RECT_EXT = 0x905A, - GL_INT_IMAGE_CUBE_EXT = 0x905B, - GL_INT_IMAGE_BUFFER_EXT = 0x905C, - GL_INT_IMAGE_1D_ARRAY_EXT = 0x905D, - GL_INT_IMAGE_2D_ARRAY_EXT = 0x905E, - GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x905F, - GL_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x9060, - GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9061, - GL_UNSIGNED_INT_IMAGE_1D_EXT = 0x9062, - GL_UNSIGNED_INT_IMAGE_2D_EXT = 0x9063, - GL_UNSIGNED_INT_IMAGE_3D_EXT = 0x9064, - GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT = 0x9065, - GL_UNSIGNED_INT_IMAGE_CUBE_EXT = 0x9066, - GL_UNSIGNED_INT_IMAGE_BUFFER_EXT = 0x9067, - GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT = 0x9068, - GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT = 0x9069, - GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x906A, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x906B, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x906C; - - protected EXTShaderImageLoadStore() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindImageTextureEXT ] --- - - public static native void glBindImageTextureEXT(@NativeType("GLuint") int index, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLboolean") boolean layered, @NativeType("GLint") int layer, @NativeType("GLenum") int access, @NativeType("GLint") int format); - - // --- [ glMemoryBarrierEXT ] --- - - public static native void glMemoryBarrierEXT(@NativeType("GLbitfield") int barriers); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSharedTexturePalette.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTSharedTexturePalette.java deleted file mode 100644 index 7bff9486..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTSharedTexturePalette.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_shared_texture_palette extension. - * - *

    EXT_shared_texture_palette defines a shared texture palette which may be used in place of the texture object palettes provided by - * EXT_paletted_texture. This is useful for rapidly changing a palette common to many textures, rather than having to reload the - * new palette for each texture. The extension acts as a switch, causing all lookups that would normally be done on the texture's palette to instead use - * the shared palette.

    - * - *

    Requires EXT_paletted_texture.

    - */ -public final class EXTSharedTexturePalette { - - /** - * Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, IsEnabled, Enable, Disable, ColorTableEXT, - * ColorSubTableEXT, GetColorTableEXT, GetColorTableParameterivEXT, and GetColorTableParameterfd EXT. - */ - public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; - - private EXTSharedTexturePalette() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilClearTag.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilClearTag.java deleted file mode 100644 index 930a3bbe..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilClearTag.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_stencil_clear_tag extension. - * - *

    Stencil-only framebuffer clears are increasingly common as 3D applications are now using rendering algorithms such as stenciled shadow volume rendering - * for multiple light sources in a single frame, recent "soft" stenciled shadow volume techniques, and stencil-based constructive solid geometry - * techniques. In such algorithms there are multiple stencil buffer clears for each depth buffer clear. Additionally in most cases, these algorithms do - * not require all of the 8 typical stencil bitplanes for their stencil requirements. In such cases, there is the potential for unused stencil bitplanes - * to encode a "stencil clear tag" in such a way to reduce the number of actual stencil clears. The idea is that switching to an unused stencil clear tag - * logically corresponds to when an application would otherwise perform a framebuffer-wide stencil clear.

    - * - *

    This extension exposes an inexpensive hardware mechanism for amortizing the cost of multiple stencil-only clears by using a client-specified number of - * upper bits of the stencil buffer to maintain a per-pixel stencil tag.

    - * - *

    The upper bits of each stencil value is treated as a tag that indicates the state of the upper bits of the "stencil clear tag" state when the stencil - * value was last written. If a stencil value is read and its upper bits containing its tag do NOT match the current upper bits of the stencil clear tag - * state, the stencil value is substituted with the lower bits of the stencil clear tag (the reset value). Either way, the upper tag bits of the stencil - * value are ignored by subsequent stencil function and operation processing of the stencil value.

    - * - *

    When a stencil value is written to the stencil buffer, its upper bits are overridden with the upper bits of the current stencil clear tag state so - * subsequent reads, prior to any subsequent stencil clear tag state change, properly return the updated lower bits.

    - * - *

    In this way, the stencil clear tag functionality provides a way to replace multiple bandwidth-intensive stencil clears with very inexpensive update of - * the stencil clear tag state.

    - * - *

    If used as expected with the client specifying 3 bits for the stencil tag, every 7 of 8 stencil-only clears of the entire stencil buffer can be - * substituted for an update of the current stencil clear tag rather than an actual update of all the framebuffer's stencil values. Still, every 8th clear - * must be an actual stencil clear. The net effect is that the aggregate cost of stencil clears is reduced by a factor of 1/(2^n) where n is the number of - * bits devoted to the stencil tag.

    - * - *

    The application specifies two new pieces of state: 1) the number of upper stencil bits, n, assigned to maintain the tag bits for each stencil value - * within the stencil buffer, and 2) a stencil clear tag value that packs the current tag and a reset value into a single integer values. The upper n bits - * of the stencil clear tag value specify the current tag while the lower s-min(n,s) bits specify the current reset value, where s is the number of - * bitplanes in the stencil buffer and n is the current number of stencil tag bits.

    - * - *

    If zero stencil clear tag bits are assigned to the stencil tag encoding, then the stencil buffer operates in the conventional manner.

    - */ -public class EXTStencilClearTag { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_STENCIL_TAG_BITS_EXT = 0x88F2, - GL_STENCIL_CLEAR_TAG_VALUE_EXT = 0x88F3; - - protected EXTStencilClearTag() { - throw new UnsupportedOperationException(); - } - - // --- [ glStencilClearTagEXT ] --- - - public static native void glStencilClearTagEXT(@NativeType("GLsizei") int stencilTagBits, @NativeType("GLuint") int stencilClearTag); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilTwoSide.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilTwoSide.java deleted file mode 100644 index 04f068e1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilTwoSide.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_stencil_two_side extension. - * - *

    This extension provides two-sided stencil testing where the stencil-related state (stencil operations, reference value, compare mask, and write mask) - * may be different for front- and back-facing polygons. Two-sided stencil testing may improve the performance of stenciled shadow volume and Constructive - * Solid Geometry (CSG) rendering algorithms.

    - */ -public class EXTStencilTwoSide { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_ACTIVE_STENCIL_FACE_EXT = 0x8911; - - protected EXTStencilTwoSide() { - throw new UnsupportedOperationException(); - } - - // --- [ glActiveStencilFaceEXT ] --- - - public static native void glActiveStencilFaceEXT(@NativeType("GLenum") int face); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilWrap.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilWrap.java deleted file mode 100644 index 8a45844d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTStencilWrap.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_stencil_wrap extension. - * - *

    Various algorithms use the stencil buffer to "count" the number of surfaces that a ray passes through. As the ray passes into an object, the stencil - * buffer is incremented. As the ray passes out of an object, the stencil buffer is decremented.

    - * - *

    GL requires that the stencil increment operation clamps to its maximum value. For algorithms that depend on the difference between the sum of the - * increments and the sum of the decrements, clamping causes an erroneous result.

    - * - *

    This extension provides an enable for both maximum and minimum wrapping of stencil values. Instead, the stencil value wraps in both directions.

    - * - *

    Two additional stencil operations are specified. These new operations are similiar to the existing INCR and DECR operations, but they wrap their result - * instead of saturating it. This functionality matches the new stencil operations introduced by DirectX 6.

    - * - *

    Promoted to core in {@link GL14 OpenGL 1.4}.

    - */ -public final class EXTStencilWrap { - - /** Accepted by the {@code sfail}, {@code dpfail}, and {@code dppass} parameter of StencilOp. */ - public static final int - GL_INCR_WRAP_EXT = 0x8507, - GL_DECR_WRAP_EXT = 0x8508; - - private EXTStencilWrap() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureArray.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureArray.java deleted file mode 100644 index 220a8ca8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureArray.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_texture_array extension. - * - *

    This extension introduces the notion of one- and two-dimensional array textures. An array texture is a collection of one- and two-dimensional images of - * identical size and format, arranged in layers. A one-dimensional array texture is specified using TexImage2D; a two-dimensional array texture is - * specified using TexImage3D. The height (1D array) or depth (2D array) specify the number of layers in the image.

    - * - *

    An array texture is accessed as a single unit in a programmable shader, using a single coordinate vector. A single layer is selected, and that layer is - * then accessed as though it were a one- or two-dimensional texture. The layer used is specified using the "t" or "r" texture coordinate for 1D and 2D - * array textures, respectively. The layer coordinate is provided as an unnormalized floating-point value in the range {@code [0,-1]}, where - * {@code } is the number of layers in the array texture. Texture lookups do not filter between layers, though such filtering can be achieved using - * programmable shaders. When mipmapping is used, each level of an array texture has the same number of layers as the base level; the number of layers is - * not reduced as the image size decreases.

    - * - *

    Array textures can be rendered to by binding them to a framebuffer object (EXT_framebuffer_object). A single layer of an array texture can be bound - * using normal framebuffer object mechanisms, or an entire array texture can be bound and rendered to using the layered rendering mechanisms provided by - * NV_geometry_program4.

    - * - *

    This extension does not provide for the use of array textures with fixed-function fragment processing. Such support could be added by providing an - * additional extension allowing applications to pass the new target enumerants (TEXTURE_1D_ARRAY_EXT and TEXTURE_2D_ARRAY_EXT) to Enable and Disable.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class EXTTextureArray { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of TexParameteri, TexParameteriv, TexParameterf, TexParameterfv, GenerateMipmapEXT, and BindTexture. */ - public static final int - GL_TEXTURE_1D_ARRAY_EXT = 0x8C18, - GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A; - - /** Accepted by the {@code target} parameter of TexImage3D, TexSubImage3D, CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D. */ - public static final int GL_PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B; - - /** - * Accepted by the {@code target} parameter of TexImage2D, TexSubImage2D, CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and - * CompressedTexSubImage2D. - */ - public static final int GL_PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int - GL_TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C, - GL_TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D, - GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF; - - /** - * Accepted by the {@code param} parameter of TexParameterf, TexParameteri, TexParameterfv, and TexParameteriv when the {@code pname} parameter is - * TEXTURE_COMPARE_MODE_ARB. - */ - public static final int GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E; - - /** - * COMPARE_REF_DEPTH_TO_TEXTURE_EXT is simply an alias for the existing COMPARE_R_TO_TEXTURE token in OpenGL 2.0; the alternate name reflects the fact that - * the R coordinate is not always used.) Accepted by the {@code pname} parameter of GetFramebufferAttachmentParameterivEXT. - */ - public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; - - /** - * FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER is simply an alias for the FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT token provided in EXT_framebuffer_object. - * This extension generalizes the notion of "{@code zoffset}" to include layers of an array texture.) Returned by the {@code type} parameter of - * GetActiveUniform. - */ - public static final int - GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0, - GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1, - GL_SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3, - GL_SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4; - - protected EXTTextureArray() { - throw new UnsupportedOperationException(); - } - - // --- [ glFramebufferTextureLayerEXT ] --- - - public static native void glFramebufferTextureLayerEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureBufferObject.java deleted file mode 100644 index 41fa73a0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureBufferObject.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_texture_buffer_object extension. - * - *

    This extension provides a new texture type, called a buffer texture. Buffer textures are one-dimensional arrays of texels whose storage comes from an - * attached buffer object. When a buffer object is bound to a buffer texture, a format is specified, and the data in the buffer object is treated as an - * array of texels of the specified format.

    - * - *

    The use of a buffer object to provide storage allows the texture data to be specified in a number of different ways: via buffer object loads - * (BufferData), direct CPU writes (MapBuffer), framebuffer readbacks (EXT_pixel_buffer_object extension). A buffer object can also be loaded by transform - * feedback (NV_transform_feedback extension), which captures selected transformed attributes of vertices processed by the GL. Several of these mechanisms - * do not require an extra data copy, which would be required when using conventional TexImage-like entry points.

    - * - *

    Buffer textures do not support mipmapping, texture lookups with normalized floating-point texture coordinates, and texture filtering of any sort, and - * may not be used in fixed-function fragment processing. They can be accessed via single texel fetch operations in programmable shaders. For assembly - * shaders (NV_gpu_program4), the TXF instruction is used. For GLSL (EXT_gpu_shader4), a new sampler type and texel fetch function are used.

    - * - *

    Buffer textures can be substantially larger than equivalent one-dimensional textures; the maximum texture size supported for buffer textures in the - * initial implementation of this extension is 2^27 texels, versus 2^13 (8192) texels for otherwise equivalent one-dimensional textures. (Note that this - * extension only guarantees support for buffer textures with 2^16 texels, but we expect most implementations to exceed that substantially.) When a buffer - * object is attached to a buffer texture, a size is not specified; rather, the number of texels in the texture is taken by dividing the size of the - * buffer object by the size of each texel.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link EXTGPUShader4 EXT_gpu_shader4} or NV_gpu_program4.

    - */ -public class EXTTextureBufferObject { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameter of BindBuffer, BufferData, BufferSubData, MapBuffer, BindTexture, UnmapBuffer, GetBufferSubData, - * GetBufferParameteriv, GetBufferPointerv, and TexBufferEXT, and the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. - */ - public static final int GL_TEXTURE_BUFFER_EXT = 0x8C2A; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int - GL_MAX_TEXTURE_BUFFER_SIZE_EXT = 0x8C2B, - GL_TEXTURE_BINDING_BUFFER_EXT = 0x8C2C, - GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 0x8C2D, - GL_TEXTURE_BUFFER_FORMAT_EXT = 0x8C2E; - - protected EXTTextureBufferObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexBufferEXT ] --- - - public static native void glTexBufferEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionLATC.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionLATC.java deleted file mode 100644 index 29f0175a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionLATC.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_compression_latc extension. - * - *

    This extension introduces four new block-based texture compression formats suited for unsigned and signed luminance and luminance-alpha textures (hence - * the name "latc" for Luminance-Alpha Texture Compression).

    - * - *

    These formats are designed to reduce the storage requirements and memory bandwidth required for luminance and luminance-alpha textures by a factor of - * 2-to-1 over conventional uncompressed luminance and luminance-alpha textures with 8-bit components ({@link GL11#GL_LUMINANCE8 LUMINANCE8} and {@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}).

    - * - *

    The compressed signed luminance-alpha format is reasonably suited for storing compressed normal maps.

    - * - *

    Requires {@link GL13 OpenGL 1.3} or {@link ARBTextureCompression ARB_texture_compression}.

    - */ -public final class EXTTextureCompressionLATC { - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2D and the {@code format} parameter of - * CompressedTexSubImage2D. - */ - public static final int - GL_COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70, - GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71, - GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72, - GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73; - - private EXTTextureCompressionLATC() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionRGTC.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionRGTC.java deleted file mode 100644 index b3b5c3cf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionRGTC.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_compression_rgtc extension. - * - *

    This extension introduces four new block-based texture compression formats suited for unsigned and signed red and red-green textures (hence the name - * "rgtc" for Red-Green Texture Compression).

    - * - *

    These formats are designed to reduce the storage requirements and memory bandwidth required for red and red-green textures by a factor of 2-to-1 over - * conventional uncompressed luminance and luminance-alpha textures with 8-bit components ({@link GL11#GL_LUMINANCE8 LUMINANCE8} and {@link GL11#GL_LUMINANCE8_ALPHA8 LUMINANCE8_ALPHA8}).

    - * - *

    The compressed signed red-green format is reasonably suited for storing compressed normal maps.

    - * - *

    This extension uses the same compression format as the EXT_texture_compression_latc extension except the color data is stored in the red and green - * components rather than luminance and alpha. Representing compressed red and green components is consistent with the BC4 and BC5 compressed formats - * supported by DirectX 10.

    - * - *

    Requires {@link GL13 OpenGL 1.3} or {@link ARBTextureCompression ARB_texture_compression}.

    - */ -public final class EXTTextureCompressionRGTC { - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2D and the {@code format} parameter of - * CompressedTexSubImage2D. - */ - public static final int - GL_COMPRESSED_RED_RGTC1_EXT = 0x8DBB, - GL_COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC, - GL_COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD, - GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE; - - private EXTTextureCompressionRGTC() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionS3TC.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionS3TC.java deleted file mode 100644 index 9cb6cca8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureCompressionS3TC.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_compression_s3tc extension. - * - *

    This extension provides additional texture compression functionality specific to S3's S3TC format (called DXTC in Microsoft's DirectX API), subject to - * all the requirements and limitations described by the extension {@link ARBTextureCompression ARB_texture_compression}.

    - * - *

    This extension supports DXT1, DXT3, and DXT5 texture compression formats. For the DXT1 image format, this specification supports an RGB-only mode and a - * special RGBA mode with single-bit "transparent" alpha.

    - * - *

    Requires {@link ARBTextureCompression ARB_texture_compression}.

    - */ -public final class EXTTextureCompressionS3TC { - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2D and the {@code format} parameter of - * CompressedTexSubImage2D. - */ - public static final int - GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0, - GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1, - GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2, - GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; - - private EXTTextureCompressionS3TC() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java deleted file mode 100644 index 9559e721..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_filter_anisotropic extension. - * - *

    Texture mapping using OpenGL's existing mipmap texture filtering modes assumes that the projection of the pixel filter footprint into texture space is a - * square (ie, isotropic). In practice however, the footprint may be long and narrow (ie, anisotropic). Consequently, mipmap filtering severely blurs - * images on surfaces angled obliquely away from the viewer.

    - * - *

    Several approaches exist for improving texture sampling by accounting for the anisotropic nature of the pixel filter footprint into texture space. This - * extension provides a general mechanism for supporting anisotropic texturing filtering schemes without specifying a particular formulation of anisotropic - * filtering.

    - * - *

    The extension permits the OpenGL application to specify on a per-texture object basis the maximum degree of anisotropy to account for in texture - * filtering.

    - * - *

    Increasing a texture object's maximum degree of anisotropy may improve texture filtering but may also significantly reduce the implementation's texture - * filtering rate. Implementations are free to clamp the specified degree of anisotropy to the implementation's maximum supported degree of anisotropy.

    - * - *

    A texture's maximum degree of anisotropy is specified independent from the texture's minification and magnification filter (as opposed to being - * supported as an entirely new filtering mode). Implementations are free to use the specified minification and magnification filter to select a particular - * anisotropic texture filtering scheme. For example, a NEAREST filter with a maximum degree of anisotropy of two could be treated as a 2-tap filter that - * accounts for the direction of anisotropy. Implementations are also permitted to ignore the minification or magnification filter and implement the - * highest quality of anisotropic filtering possible.

    - * - *

    Applications seeking the highest quality anisotropic filtering available are advised to request a {@link GL11#GL_LINEAR_MIPMAP_LINEAR LINEAR_MIPMAP_LINEAR} minification filter, a - * {@link GL11#GL_LINEAR LINEAR} magnification filter, and a large maximum degree of anisotropy.

    - */ -public final class EXTTextureFilterAnisotropic { - - /** Accepted by the {@code pname} parameters of GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameterfv, TexParameteri, and TexParameteriv. */ - public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; - - private EXTTextureFilterAnisotropic() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureFilterMinmax.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureFilterMinmax.java deleted file mode 100644 index 8c25fe69..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureFilterMinmax.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_filter_minmax extension. - * - *

    In unextended OpenGL 4.3, minification and magnification filters such as {@link GL11#GL_LINEAR LINEAR} allow texture lookups to returned a filtered texel value produced - * by computing an weighted average of a collection of texels in the neighborhood of the texture coordinate provided.

    - * - *

    This extension provides a new texture and sampler parameter ({@link #GL_TEXTURE_REDUCTION_MODE_EXT TEXTURE_REDUCTION_MODE_EXT}) which allows applications to produce a filtered texel value - * by computing a component-wise minimum ({@link GL14#GL_MIN MIN}) or maximum ({@link GL14#GL_MAX MAX}) of the texels that would normally be averaged. The reduction mode is orthogonal - * to the minification and magnification filter parameters. The filter parameters are used to identify the set of texels used to produce a final filtered - * value; the reduction mode identifies how these texels are combined.

    - */ -public final class EXTTextureFilterMinmax { - - /** - * Accepted by the {@code pname} parameter to SamplerParameter{i f}{v}, SamplerParameterI{u}iv, GetSamplerParameter{i f}v, GetSamplerParameterI{u}iv, - * TexParameter{i f}{v}, TexParameterI{u}iv, GetTexParameter{i f}v, GetTexParameterI{u}iv, TextureParameter{i f}{v}EXT, TextureParameterI{u}ivEXT, - * GetTextureParameter{i f}vEXT, GetTextureParameterI{u}ivEXT, MultiTexParameter{i f}{v}EXT, MultiTexParameterI{u}ivEXT, GetMultiTexParameter{i f}vEXT, and - * GetMultiTexParameterI{u}ivEXT. - */ - public static final int GL_TEXTURE_REDUCTION_MODE_EXT = 0x9366; - - /** - * Accepted by the {@code param} or {@code params} parameter to SamplerParameter{i f}{v}, SamplerParameterI{u}iv, TexParameter{i f}{v}, TexParameterI{u}iv, - * TextureParameter{i f}{v}EXT, TextureParameterI{u}ivEXT, MultiTexParameter{i f}{v}EXT, or MultiTexParameterI{u}ivEXT when {@code pname} is - * TEXTURE_REDUCTION_MODE_EXT. - */ - public static final int GL_WEIGHTED_AVERAGE_EXT = 0x9367; - - private EXTTextureFilterMinmax() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureInteger.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureInteger.java deleted file mode 100644 index 540661d7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureInteger.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_texture_integer extension. - * - *

    Fixed-point textures in unextended OpenGL have integer components, but those values are taken to represent floating-point values in the range [0,1]. - * These integer components are considered "normalized" integers. When such a texture is accessed by a shader or by fixed-function fragment processing, - * floating-point values are returned.

    - * - *

    This extension provides a set of new "unnormalized" integer texture formats. Formats with both signed and unsigned integers are provided. In these - * formats, the components are treated as true integers. When such textures are accessed by a shader, actual integer values are returned.

    - * - *

    Pixel operations that read from or write to a texture or color buffer with unnormalized integer components follow a path similar to that used for color - * index pixel operations, except that more than one component may be provided at once. Integer values flow through the pixel processing pipe, and no pixel - * transfer operations are performed. Integer format enumerants used for such operations indicate unnormalized integer data.

    - * - *

    Textures or render buffers with unnormalized integer formats may also be attached to framebuffer objects to receive fragment color values written by a - * fragment shader. Per-fragment operations that require floating-point color components, including multisample alpha operations, alpha test, blending, and - * dithering, have no effect when the corresponding colors are written to an integer color buffer. The NV_gpu_program4 and - * {@link EXTGPUShader4 EXT_gpu_shader4} extensions add the capability to fragment programs and fragment shaders to write signed and unsigned integer output values.

    - * - *

    This extension does not enforce type consistency for texture accesses or between fragment shaders and the corresponding framebuffer attachments. The - * results of a texture lookup from an integer texture are undefined:

    - * - *
      - *
    • for fixed-function fragment processing, or
    • - *
    • for shader texture accesses expecting floating-point return values.
    • - *
    - * - *

    The color components used for per-fragment operations and written into a color buffer are undefined:

    - * - *
      - *
    • for fixed-function fragment processing with an integer color buffer,
    • - *
    • for fragment shaders that write floating-point color components to an integer color buffer, or
    • - *
    • for fragment shaders that write integer color components to a color buffer with floating point or normalized integer components.
    • - *
    - * - *

    Requires {@link GL20 OpenGL 2.0} and NV_gpu_program4 or {@link EXTGPUShader4 EXT_gpu_shader4}. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class EXTTextureInteger { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_RGBA_INTEGER_MODE_EXT = 0x8D9E; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_RGBA32UI_EXT = 0x8D70, - GL_RGB32UI_EXT = 0x8D71, - GL_ALPHA32UI_EXT = 0x8D72, - GL_INTENSITY32UI_EXT = 0x8D73, - GL_LUMINANCE32UI_EXT = 0x8D74, - GL_LUMINANCE_ALPHA32UI_EXT = 0x8D75, - GL_RGBA16UI_EXT = 0x8D76, - GL_RGB16UI_EXT = 0x8D77, - GL_ALPHA16UI_EXT = 0x8D78, - GL_INTENSITY16UI_EXT = 0x8D79, - GL_LUMINANCE16UI_EXT = 0x8D7A, - GL_LUMINANCE_ALPHA16UI_EXT = 0x8D7B, - GL_RGBA8UI_EXT = 0x8D7C, - GL_RGB8UI_EXT = 0x8D7D, - GL_ALPHA8UI_EXT = 0x8D7E, - GL_INTENSITY8UI_EXT = 0x8D7F, - GL_LUMINANCE8UI_EXT = 0x8D80, - GL_LUMINANCE_ALPHA8UI_EXT = 0x8D81, - GL_RGBA32I_EXT = 0x8D82, - GL_RGB32I_EXT = 0x8D83, - GL_ALPHA32I_EXT = 0x8D84, - GL_INTENSITY32I_EXT = 0x8D85, - GL_LUMINANCE32I_EXT = 0x8D86, - GL_LUMINANCE_ALPHA32I_EXT = 0x8D87, - GL_RGBA16I_EXT = 0x8D88, - GL_RGB16I_EXT = 0x8D89, - GL_ALPHA16I_EXT = 0x8D8A, - GL_INTENSITY16I_EXT = 0x8D8B, - GL_LUMINANCE16I_EXT = 0x8D8C, - GL_LUMINANCE_ALPHA16I_EXT = 0x8D8D, - GL_RGBA8I_EXT = 0x8D8E, - GL_RGB8I_EXT = 0x8D8F, - GL_ALPHA8I_EXT = 0x8D90, - GL_INTENSITY8I_EXT = 0x8D91, - GL_LUMINANCE8I_EXT = 0x8D92, - GL_LUMINANCE_ALPHA8I_EXT = 0x8D93; - - /** Accepted by the {@code format} parameter of TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, DrawPixels and ReadPixels. */ - public static final int - GL_RED_INTEGER_EXT = 0x8D94, - GL_GREEN_INTEGER_EXT = 0x8D95, - GL_BLUE_INTEGER_EXT = 0x8D96, - GL_ALPHA_INTEGER_EXT = 0x8D97, - GL_RGB_INTEGER_EXT = 0x8D98, - GL_RGBA_INTEGER_EXT = 0x8D99, - GL_BGR_INTEGER_EXT = 0x8D9A, - GL_BGRA_INTEGER_EXT = 0x8D9B, - GL_LUMINANCE_INTEGER_EXT = 0x8D9C, - GL_LUMINANCE_ALPHA_INTEGER_EXT = 0x8D9D; - - protected EXTTextureInteger() { - throw new UnsupportedOperationException(); - } - - // --- [ glClearColorIiEXT ] --- - - public static native void glClearColorIiEXT(@NativeType("GLint") int r, @NativeType("GLint") int g, @NativeType("GLint") int b, @NativeType("GLint") int a); - - // --- [ glClearColorIuiEXT ] --- - - public static native void glClearColorIuiEXT(@NativeType("GLuint") int r, @NativeType("GLuint") int g, @NativeType("GLuint") int b, @NativeType("GLuint") int a); - - // --- [ glTexParameterIivEXT ] --- - - public static native void nglTexParameterIivEXT(int target, int pname, long params); - - public static void glTexParameterIivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglTexParameterIivEXT(target, pname, memAddress(params)); - } - - public static void glTexParameterIiEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - nglTexParameterIivEXT(target, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTexParameterIuivEXT ] --- - - public static native void nglTexParameterIuivEXT(int target, int pname, long params); - - public static void glTexParameterIuivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglTexParameterIuivEXT(target, pname, memAddress(params)); - } - - public static void glTexParameterIuiEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - nglTexParameterIuivEXT(target, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexParameterIivEXT ] --- - - public static native void nglGetTexParameterIivEXT(int target, int pname, long params); - - public static void glGetTexParameterIivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexParameterIivEXT(target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetTexParameterIiEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTexParameterIivEXT(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexParameterIuivEXT ] --- - - public static native void nglGetTexParameterIuivEXT(int target, int pname, long params); - - public static void glGetTexParameterIuivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexParameterIuivEXT(target, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetTexParameterIuiEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTexParameterIuivEXT(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glTexParameterIivEXT TexParameterIivEXT} */ - public static void glTexParameterIivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glTexParameterIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glTexParameterIuivEXT TexParameterIuivEXT} */ - public static void glTexParameterIuivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glTexParameterIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetTexParameterIivEXT GetTexParameterIivEXT} */ - public static void glGetTexParameterIivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTexParameterIivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetTexParameterIuivEXT GetTexParameterIuivEXT} */ - public static void glGetTexParameterIuivEXT(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetTexParameterIuivEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java deleted file mode 100644 index c13b7ea2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_mirror_clamp extension. - * - *

    EXT_texture_mirror_clamp extends the set of texture wrap modes to include three modes ({@link #GL_MIRROR_CLAMP_EXT MIRROR_CLAMP_EXT}, {@link #GL_MIRROR_CLAMP_TO_EDGE_EXT MIRROR_CLAMP_TO_EDGE_EXT}, - * {@link #GL_MIRROR_CLAMP_TO_BORDER_EXT MIRROR_CLAMP_TO_BORDER_EXT}) that effectively use a texture map twice as large as the original image in which the additional half of the new image is - * a mirror image of the original image.

    - * - *

    This new mode relaxes the need to generate images whose opposite edges match by using the original image to generate a matching "mirror image". This - * mode allows the texture to be mirrored only once in the negative s, t, and r directions.

    - */ -public final class EXTTextureMirrorClamp { - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int - GL_MIRROR_CLAMP_EXT = 0x8742, - GL_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743, - GL_MIRROR_CLAMP_TO_BORDER_EXT = 0x8912; - - private EXTTextureMirrorClamp() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureRectangle.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureRectangle.java deleted file mode 100644 index ae08d901..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureRectangle.java +++ /dev/null @@ -1,13 +0,0 @@ -/* MACHINE GENERATED FILE, DO NOT EDIT */ - -package org.lwjgl.opengl; - -public final class EXTTextureRectangle { - - public static final int GL_TEXTURE_RECTANGLE_EXT = 0x84F5, - GL_TEXTURE_BINDING_RECTANGLE_EXT = 0x84F6, - GL_PROXY_TEXTURE_RECTANGLE_EXT = 0x84F7, - GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = 0x84F8; - - private EXTTextureRectangle() {} -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGB.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGB.java deleted file mode 100644 index 15cefcab..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGB.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_sRGB extension. - * - *

    Conventional texture formats assume a linear color space. So for a conventional internal texture format such as GL_RGB8, the 256 discrete values for - * each 8-bit color component map linearly and uniformly to the [0,1] range.

    - * - *

    The sRGB color space is based on typical (non-linear) monitor characteristics expected in a dimly lit office. It has been standardized by the - * International Electrotechnical Commission (IEC) as IEC 61966-2-1. The sRGB color space roughly corresponds to 2.2 gamma correction.

    - * - *

    This extension adds a few new uncompressed and compressed color texture formats with sRGB color components.

    - * - *

    Promoted to core in {@link GL21 OpenGL 2.1}.

    - */ -public final class EXTTextureSRGB { - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D. */ - public static final int - GL_SRGB_EXT = 0x8C40, - GL_SRGB8_EXT = 0x8C41, - GL_SRGB_ALPHA_EXT = 0x8C42, - GL_SRGB8_ALPHA8_EXT = 0x8C43, - GL_SLUMINANCE_ALPHA_EXT = 0x8C44, - GL_SLUMINANCE8_ALPHA8_EXT = 0x8C45, - GL_SLUMINANCE_EXT = 0x8C46, - GL_SLUMINANCE8_EXT = 0x8C47, - GL_COMPRESSED_SRGB_EXT = 0x8C48, - GL_COMPRESSED_SRGB_ALPHA_EXT = 0x8C49, - GL_COMPRESSED_SLUMINANCE_EXT = 0x8C4A, - GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8C4B; - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2DARB and the {@code format} parameter of - * CompressedTexSubImage2DARB. - */ - public static final int - GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C, - GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D, - GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E, - GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F; - - private EXTTextureSRGB() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBDecode.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBDecode.java deleted file mode 100644 index 9818cf4c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBDecode.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_sRGB_decode extension. - * - *

    The EXT_texture_sRGB extension (promoted to core in OpenGL 2.1) provides a texture format stored in the sRGB color space. Sampling one of these - * textures will always return the color value decoded into a linear color space. However, an application may wish to sample and retrieve the undecoded - * sRGB data from the texture and manipulate that directly.

    - * - *

    This extension adds a Texture Parameter and Sampler Object parameter to allow sRGB textures to be read directly, without decoding.

    - * - *

    The new parameter, {@link #GL_TEXTURE_SRGB_DECODE_EXT TEXTURE_SRGB_DECODE_EXT} controls whether the decoding happens at sample time. It only applies to textures with an internal format - * that is sRGB and is ignored for all other textures. This value defaults to {@link #GL_DECODE_EXT DECODE_EXT}, which indicates the texture should be decoded to linear color - * space.

    - * - *

    Requires {@link GL21 OpenGL 2.1} or {@link EXTTextureSRGB EXT_texture_sRGB}.

    - */ -public final class EXTTextureSRGBDecode { - - /** - * Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, TexParameterIiv, TexParameterIuiv, - * TexParameterIivEXT, TexParameterIuivEXT, TextureParameterfEXT, TextureParameterfvEXT, TextureParameteriEXT, TextureParameterivEXT, - * TextureParameterIivEXT, TextureParameterIuivEXT, MultiTexParameterfEXT, MultiTexParameterfvEXT, MultiTexParameteriEXT, MultiTexParameterivEXT, - * MultiTexParameterIivEXT, MultiTexParameterIuivEXT, GetTexParameterfv, GetTexParameteriv, GetTexParameterIiv, GetTexParameterIuiv, GetTexParameterIivEXT, - * GetTexParameterIuivEXT, GetTextureParameterfEXT, GetTextureParameterfvEXT, GetTextureParameteriEXT, GetTextureParameterivEXT, GetTextureParameterIivEXT, - * GetTextureParameterIuivEXT, GetMultiTexParameterfEXT, GetMultiTexParameterfvEXT, GetMultiTexParameteriEXT, GetMultiTexParameterivEXT, - * GetMultiTexParameterIivEXT, GetMultiTexParameterIuivEXT, SamplerParameteri, SamplerParameterf, SamplerParameteriv, SamplerParameterfv, - * SamplerParameterIiv, SamplerParameterIuiv, GetSamplerParameteriv, GetSamplerParameterfv, GetSamplerParameterIiv, and GetSamplerParameterIuiv. - */ - public static final int GL_TEXTURE_SRGB_DECODE_EXT = 0x8A48; - - /** - * Accepted by the {@code param} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, TexParameterIiv, TexParameterIuiv, - * TexParameterIivEXT, TexParameterIuivEXT, TextureParameterfEXT, TextureParameterfvEXT, TextureParameteriEXT, TextureParameterivEXT, - * TextureParameterIivEXT, TextureParameterIuivEXT, MultiTexParameterfEXT, MultiTexParameterfvEXT, MultiTexParameteriEXT, MultiTexParameterivEXT, - * MultiTexParameterIivEXT, MultiTexParameterIuivEXT, SamplerParameteri, SamplerParameterf, SamplerParameteriv, SamplerParameterfv, SamplerParameterIiv, - * and SamplerParameterIuiv. - */ - public static final int - GL_DECODE_EXT = 0x8A49, - GL_SKIP_DECODE_EXT = 0x8A4A; - - private EXTTextureSRGBDecode() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBR8.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBR8.java deleted file mode 100644 index b610dd80..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBR8.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_sRGB_R8 extension. - * - *

    This extension introduces {@link #GL_SR8_EXT SR8_EXT} as an acceptable internal format. This allows efficient sRGB sampling for source images stored as a separate texture - * per channel.

    - * - *

    Requires {@link GL12 OpenGL 1.2}.

    - */ -public final class EXTTextureSRGBR8 { - - /** - * Accepted by the {@code internalformat} parameters of {@link GL12C#glTexImage3D TexImage3D}, {@link GL11C#glTexImage2D TexImage2D}, {@link GL11C#glTexImage1D TexImage1D}, {@link GL42C#glTexStorage3D TexStorage3D}, {@link GL42C#glTexStorage2D TexStorage2D}, {@link GL42C#glTexStorage1D TexStorage1D}, - * {@link GL45C#glTextureStorage3D TextureStorage3D}, {@link GL45C#glTextureStorage2D TextureStorage2D}, and {@link GL45C#glTextureStorage1D TextureStorage1D}. - */ - public static final int GL_SR8_EXT = 0x8FBD; - - private EXTTextureSRGBR8() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBRG8.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBRG8.java deleted file mode 100644 index 62adeb63..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSRGBRG8.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_sRGB_RG8 extension. - * - *

    This extension introduces SRG8_EXT as an acceptable internal format. This allows efficient sRGB sampling for source images stored with 2 channels.

    - * - *

    Requires {@link GL12 OpenGL 1.2}.

    - */ -public final class EXTTextureSRGBRG8 { - - public static final int GL_SRG8_EXT = 0x8FBE; - - private EXTTextureSRGBRG8() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSharedExponent.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSharedExponent.java deleted file mode 100644 index 39cd43d0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSharedExponent.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_shared_exponent extension. - * - *

    Existing texture formats provide either fixed-point formats with limited range and precision but with compact encodings (allowing 32 or fewer bits per - * multi-component texel), or floating-point formats with tremendous range and precision but without compact encodings (typically 16 or 32 bits per - * component).

    - * - *

    This extension adds a new packed format and new internal texture format for encoding 3-component vectors (typically RGB colors) with a single 5-bit - * exponent (biased up by 15) and three 9-bit mantissas for each respective component. There is no sign bit so all three components must be non-negative. - * The fractional mantissas are stored without an implied 1 to the left of the decimal point. Neither infinity nor not-a-number (NaN) are representable in - * this shared exponent format.

    - * - *

    This 32 bits/texel shared exponent format is particularly well-suited to high dynamic range (HDR) applications where light intensity is typically stored - * as non-negative red, green, and blue components with considerable range.

    - * - *

    Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public final class EXTTextureSharedExponent { - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT. */ - public static final int GL_RGB9_E5_EXT = 0x8C3D; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * GetSeparableFilter, ColorTable, ColorSubTable, and GetColorTable. - */ - public static final int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int GL_TEXTURE_SHARED_SIZE_EXT = 0x8C3F; - - private EXTTextureSharedExponent() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSnorm.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSnorm.java deleted file mode 100644 index 40b616a4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSnorm.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_snorm extension. - * - *

    Fixed-point textures in unextended OpenGL have integer components, but those values are taken to represent floating-point values in the range - * [0.0,1.0]. These integer components are considered "unsigned normalized" integers. When such a texture is accessed by a shader or by fixed-function - * fragment processing, floating-point values are returned in the range [0.0,1.0].

    - * - *

    This extension provides a set of new "signed normalized" integer texture formats. These are taken to represent a floating-point value in the range - * [-1.0,1.0] with an exact 0.0.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public final class EXTTextureSnorm { - - /** ccepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_RED_SNORM = 0x8F90, - GL_RG_SNORM = 0x8F91, - GL_RGB_SNORM = 0x8F92, - GL_RGBA_SNORM = 0x8F93, - GL_ALPHA_SNORM = 0x9010, - GL_LUMINANCE_SNORM = 0x9011, - GL_LUMINANCE_ALPHA_SNORM = 0x9012, - GL_INTENSITY_SNORM = 0x9013, - GL_R8_SNORM = 0x8F94, - GL_RG8_SNORM = 0x8F95, - GL_RGB8_SNORM = 0x8F96, - GL_RGBA8_SNORM = 0x8F97, - GL_ALPHA8_SNORM = 0x9014, - GL_LUMINANCE8_SNORM = 0x9015, - GL_LUMINANCE8_ALPHA8_SNORM = 0x9016, - GL_INTENSITY8_SNORM = 0x9017, - GL_R16_SNORM = 0x8F98, - GL_RG16_SNORM = 0x8F99, - GL_RGB16_SNORM = 0x8F9A, - GL_RGBA16_SNORM = 0x8F9B, - GL_ALPHA16_SNORM = 0x9018, - GL_LUMINANCE16_SNORM = 0x9019, - GL_LUMINANCE16_ALPHA16_SNORM = 0x901A, - GL_INTENSITY16_SNORM = 0x901B; - - /** Returned by GetTexLevelParmeter. */ - public static final int GL_SIGNED_NORMALIZED = 0x8F9C; - - private EXTTextureSnorm() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureStorage.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureStorage.java deleted file mode 100644 index 880b20f1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureStorage.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_texture_storage extension. - * - *

    The texture image specification commands in OpenGL allow each level to be separately specified with different sizes, formats, types and so on, and only - * imposes consistency checks at draw time. This adds overhead for implementations.

    - * - *

    This extension provides a mechanism for specifying the entire structure of a texture in a single call, allowing certain consistency checks and memory - * allocations to be done up front. Once specified, the format and dimensions of the image array become immutable, to simplify completeness checks in the - * implementation.

    - * - *

    When using this extension, it is no longer possible to supply texture data using TexImage*. Instead, data can be uploaded using TexSubImage*, or - * produced by other means (such as render-to-texture, mipmap generation, or rendering to a sibling EGLImage).

    - * - *

    This extension has complicated interactions with other extensions. The goal of most of these interactions is to ensure that a texture is always mipmap - * complete (and cube complete for cubemap textures).

    - * - *

    Requires {@link GL12 OpenGL 1.2}.

    - */ -public class EXTTextureStorage { - - static { GL.initialize(); } - - /** Accepted by the {@code value} parameter of GetTexParameter{if}v. */ - public static final int GL_TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912F; - - /** Accepted by the {@code internalformat} parameter of {@code TexStorage*}. */ - public static final int - GL_ALPHA8_EXT = 0x803C, - GL_LUMINANCE8_EXT = 0x8040, - GL_LUMINANCE8_ALPHA8_EXT = 0x8045, - GL_RGBA32F_EXT = 0x8814, - GL_RGB32F_EXT = 0x8815, - GL_ALPHA32F_EXT = 0x8816, - GL_LUMINANCE32F_EXT = 0x8818, - GL_LUMINANCE_ALPHA32F_EXT = 0x8819, - GL_RGBA16F_EXT = 0x881A, - GL_RGB16F_EXT = 0x881B, - GL_ALPHA16F_EXT = 0x881C, - GL_LUMINANCE16F_EXT = 0x881E, - GL_LUMINANCE_ALPHA16F_EXT = 0x881F, - GL_RGB10_A2_EXT = 0x8059, - GL_RGB10_EXT = 0x8052, - GL_BGRA8_EXT = 0x93A1, - GL_R8_EXT = 0x8229, - GL_RG8_EXT = 0x822B, - GL_R32F_EXT = 0x822E, - GL_RG32F_EXT = 0x8230, - GL_R16F_EXT = 0x822D, - GL_RG16F_EXT = 0x822F, - GL_RGB_RAW_422_APPLE = 0x8A51; - - protected EXTTextureStorage() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexStorage1DEXT ] --- - - public static native void glTexStorage1DEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width); - - // --- [ glTexStorage2DEXT ] --- - - public static native void glTexStorage2DEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glTexStorage3DEXT ] --- - - public static native void glTexStorage3DEXT(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth); - - // --- [ glTextureStorage1DEXT ] --- - - public static native void glTextureStorage1DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width); - - // --- [ glTextureStorage2DEXT ] --- - - public static native void glTextureStorage2DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glTextureStorage3DEXT ] --- - - public static native void glTextureStorage3DEXT(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSwizzle.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSwizzle.java deleted file mode 100644 index b9ebd38b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTextureSwizzle.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the EXT_texture_swizzle extension. - * - *

    Classic OpenGL texture formats conflate texture storage and interpretation, and assume that textures represent color. In modern applications, a - * significant quantity of textures don't represent color, but rather data like shadow maps, normal maps, page tables, occlusion data, etc.. For the - * latter class of data, calling the data "RGBA" is just a convenient mapping of what the data is onto the current model, but isn't an accurate reflection - * of the reality of the data.

    - * - *

    The existing texture formats provide an almost orthogonal set of data types, sizes, and number of components, but the mappings of this storage into - * what the shader or fixed-function pipeline fetches is very much non-orthogonal. Previous extensions have added some of the most demanded missing - * formats, but the problem has not been solved once and for all.

    - * - *

    This extension provides a mechanism to swizzle the components of a texture before they are applied according to the texture environment in - * fixed-function or as they are returned to the shader.

    - */ -public final class EXTTextureSwizzle { - - /** Accepted by the {@code pname} parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int - GL_TEXTURE_SWIZZLE_R_EXT = 0x8E42, - GL_TEXTURE_SWIZZLE_G_EXT = 0x8E43, - GL_TEXTURE_SWIZZLE_B_EXT = 0x8E44, - GL_TEXTURE_SWIZZLE_A_EXT = 0x8E45; - - /** Accepted by the {@code pname} parameters of TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_TEXTURE_SWIZZLE_RGBA_EXT = 0x8E46; - - private EXTTextureSwizzle() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTimerQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTimerQuery.java deleted file mode 100644 index c5aa6115..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTimerQuery.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_timer_query extension. - * - *

    Applications can benefit from accurate timing information in a number of different ways. During application development, timing information can help - * identify application or driver bottlenecks. At run time, applications can use timing information to dynamically adjust the amount of detail in a scene - * to achieve constant frame rates. OpenGL implementations have historically provided little to no useful timing information. Applications can get some - * idea of timing by reading timers on the CPU, but these timers are not synchronized with the graphics rendering pipeline. Reading a CPU timer does not - * guarantee the completion of a potentially large amount of graphics work accumulated before the timer is read, and will thus produce wildly inaccurate - * results. glFinish() can be used to determine when previous rendering commands have been completed, but will idle the graphics pipeline and adversely - * affect application performance.

    - * - *

    This extension provides a query mechanism that can be used to determine the amount of time it takes to fully complete a set of GL commands, and without - * stalling the rendering pipeline. It uses the query object mechanisms first introduced in the occlusion query extension, which allow time intervals to - * be polled asynchronously by the application.

    - * - *

    Requires {@link GL15 OpenGL 1.5}.

    - */ -public class EXTTimerQuery { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_TIME_ELAPSED_EXT = 0x88BF; - - protected EXTTimerQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetQueryObjecti64vEXT ] --- - - public static native void nglGetQueryObjecti64vEXT(int id, int pname, long params); - - public static void glGetQueryObjecti64vEXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjecti64vEXT(id, pname, memAddress(params)); - } - - public static void glGetQueryObjecti64vEXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long params) { - nglGetQueryObjecti64vEXT(id, pname, params); - } - - @NativeType("void") - public static long glGetQueryObjecti64EXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetQueryObjecti64vEXT(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetQueryObjectui64vEXT ] --- - - public static native void nglGetQueryObjectui64vEXT(int id, int pname, long params); - - public static void glGetQueryObjectui64vEXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjectui64vEXT(id, pname, memAddress(params)); - } - - public static void glGetQueryObjectui64vEXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long params) { - nglGetQueryObjectui64vEXT(id, pname, params); - } - - @NativeType("void") - public static long glGetQueryObjectui64EXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetQueryObjectui64vEXT(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGetQueryObjecti64vEXT GetQueryObjecti64vEXT} */ - public static void glGetQueryObjecti64vEXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetQueryObjecti64vEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetQueryObjectui64vEXT GetQueryObjectui64vEXT} */ - public static void glGetQueryObjectui64vEXT(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetQueryObjectui64vEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTransformFeedback.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTTransformFeedback.java deleted file mode 100644 index 4e6ac8de..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTTransformFeedback.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_transform_feedback extension. - * - *

    This extension provides a new mode to the GL, called transform feedback, which records selected vertex attributes for each primitive processed by the - * GL. The selected attributes are written into buffer objects, and can be written with each attribute in a separate buffer object or with all attributes - * interleaved into a single buffer object. If a geometry shader is active, the primitives recorded are those emitted by the geometry shader. Otherwise, - * transform feedback captures primitives whose vertices are transformed by a vertex shader. In either case, the primitives captured are those generated - * prior to clipping. Transform feedback mode captures the values of specified varying variables emitted from GLSL vertex or geometry shaders.

    - * - *

    The vertex data recorded in transform feedback mode is stored into buffer objects as an array of vertex attributes. The regular representation and the - * use of buffer objects allows the recorded data to be processed directly by the GL without requiring CPU intervention to copy data. In particular, - * transform feedback data can be used for vertex arrays (via vertex buffer objects), as the source for pixel data (via pixel buffer objects), as shader - * constant data (via the NV_parameter_buffer_object or {@link EXTBindableUniform EXT_bindable_uniform} extensions), or via any other extension that - * makes use of buffer objects.

    - * - *

    This extension introduces new query object support to allow transform feedback mode to operate asynchronously. Query objects allow applications to - * determine when transform feedback results are complete, as well as the number of primitives processed and written back to buffer objects while in - * transform feedback mode. This extension also provides a new rasterizer discard enable, which allows applications to use transform feedback to capture - * vertex attributes without rendering anything.

    - * - *

    Requires {@link GL20 OpenGL 2.0} or {@link ARBShaderObjects ARB_shader_objects}. Promoted to core in {@link GL30 OpenGL 3.0}.

    - */ -public class EXTTransformFeedback { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * BindBufferRangeEXT, BindBufferOffsetEXT and BindBufferBaseEXT. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E; - - /** Accepted by the {@code param} parameter of GetIntegerIndexedvEXT and GetBooleanIndexedvEXT. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84, - GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85; - - /** - * Accepted by the {@code param} parameter of GetIntegerIndexedvEXT and GetBooleanIndexedvEXT, and by the {@code pname} parameter of GetBooleanv, - * GetDoublev, GetIntegerv, and GetFloatv. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F; - - /** Accepted by the {@code bufferMode} parameter of TransformFeedbackVaryingsEXT. */ - public static final int - GL_INTERLEAVED_ATTRIBS_EXT = 0x8C8C, - GL_SEPARATE_ATTRIBS_EXT = 0x8C8D; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int - GL_PRIMITIVES_GENERATED_EXT = 0x8C87, - GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_RASTERIZER_DISCARD_EXT = 0x8C89; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83, - GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F, - GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76; - - protected EXTTransformFeedback() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindBufferRangeEXT ] --- - - public static native void glBindBufferRangeEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size); - - // --- [ glBindBufferOffsetEXT ] --- - - public static native void glBindBufferOffsetEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset); - - // --- [ glBindBufferBaseEXT ] --- - - public static native void glBindBufferBaseEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer); - - // --- [ glBeginTransformFeedbackEXT ] --- - - public static native void glBeginTransformFeedbackEXT(@NativeType("GLenum") int primitiveMode); - - // --- [ glEndTransformFeedbackEXT ] --- - - public static native void glEndTransformFeedbackEXT(); - - // --- [ glTransformFeedbackVaryingsEXT ] --- - - public static native void nglTransformFeedbackVaryingsEXT(int program, int count, long varyings, int bufferMode); - - public static void glTransformFeedbackVaryingsEXT(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer varyings, @NativeType("GLenum") int bufferMode) { - nglTransformFeedbackVaryingsEXT(program, varyings.remaining(), memAddress(varyings), bufferMode); - } - - public static void glTransformFeedbackVaryingsEXT(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence[] varyings, @NativeType("GLenum") int bufferMode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long varyingsAddress = APIUtil.apiArray(stack, MemoryUtil::memASCII, varyings); - nglTransformFeedbackVaryingsEXT(program, varyings.length, varyingsAddress, bufferMode); - APIUtil.apiArrayFree(varyingsAddress, varyings.length); - } finally { - stack.setPointer(stackPointer); - } - } - - public static void glTransformFeedbackVaryingsEXT(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence varying, @NativeType("GLenum") int bufferMode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long varyingsAddress = APIUtil.apiArray(stack, MemoryUtil::memASCII, varying); - nglTransformFeedbackVaryingsEXT(program, 1, varyingsAddress, bufferMode); - APIUtil.apiArrayFree(varyingsAddress, 1); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTransformFeedbackVaryingEXT ] --- - - public static native void nglGetTransformFeedbackVaryingEXT(int program, int index, int bufSize, long length, long size, long type, long name); - - public static void glGetTransformFeedbackVaryingEXT(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - nglGetTransformFeedbackVaryingEXT(program, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); - } - - @NativeType("void") - public static String glGetTransformFeedbackVaryingEXT(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufSize, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - if (CHECKS) { - check(size, 1); - check(type, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(bufSize); - nglGetTransformFeedbackVaryingEXT(program, index, bufSize, memAddress(length), memAddress(size), memAddress(type), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - @NativeType("void") - public static String glGetTransformFeedbackVaryingEXT(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetTransformFeedbackVaryingEXT(program, index, GL.getCapabilities().OpenGL20 - ? GL20.glGetProgrami(program, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT) - : ARBShaderObjects.glGetObjectParameteriARB(program, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT), size, type); - } - - // --- [ glGetIntegerIndexedvEXT ] --- - - public static void nglGetIntegerIndexedvEXT(int target, int index, long data) { - EXTDrawBuffers2.nglGetIntegerIndexedvEXT(target, index, data); - } - - public static void glGetIntegerIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer data) { - EXTDrawBuffers2.glGetIntegerIndexedvEXT(target, index, data); - } - - @NativeType("void") - public static int glGetIntegerIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return EXTDrawBuffers2.glGetIntegerIndexedEXT(target, index); - } - - // --- [ glGetBooleanIndexedvEXT ] --- - - public static void nglGetBooleanIndexedvEXT(int target, int index, long data) { - EXTDrawBuffers2.nglGetBooleanIndexedvEXT(target, index, data); - } - - public static void glGetBooleanIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLboolean *") ByteBuffer data) { - EXTDrawBuffers2.glGetBooleanIndexedvEXT(target, index, data); - } - - @NativeType("void") - public static boolean glGetBooleanIndexedEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return EXTDrawBuffers2.glGetBooleanIndexedEXT(target, index); - } - - /** Array version of: {@link #glGetTransformFeedbackVaryingEXT GetTransformFeedbackVaryingEXT} */ - public static void glGetTransformFeedbackVaryingEXT(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLsizei *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetTransformFeedbackVaryingEXT; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - callPPPPV(program, index, name.remaining(), length, size, type, memAddress(name), __functionAddress); - } - - /** Array version of: {@link #glGetIntegerIndexedvEXT GetIntegerIndexedvEXT} */ - public static void glGetIntegerIndexedvEXT(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") int[] data) { - EXTDrawBuffers2.glGetIntegerIndexedvEXT(target, index, data); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTVertexAttrib64bit.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTVertexAttrib64bit.java deleted file mode 100644 index f828e959..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTVertexAttrib64bit.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_vertex_attrib_64bit extension. - * - *

    This extension provides OpenGL shading language support for vertex shader inputs with 64-bit floating-point components and OpenGL API support for - * specifying the value of those inputs using vertex array or immediate mode entry points. This builds on the support for general-purpose support for - * 64-bit floating-point values in the ARB_gpu_shader_fp64 extension.

    - * - *

    This extension provides a new class of vertex attribute functions, beginning with "VertexAttribL" ("L" for "long"), that can be used to specify - * attributes with 64-bit floating-point components. This extension provides no automatic type conversion between attribute and shader variables; - * single-precision attributes are not automatically converted to double-precision or vice versa. For shader variables with 64-bit component types, the - * "VertexAttribL" functions must be used to specify attribute values. For other shader variables, the "VertexAttribL" functions must not be used. If a - * vertex attribute is specified using the wrong attribute function, the values of the corresponding shader input are undefined. This approach requiring - * matching types is identical to that used for the "VertexAttribI" functions provided by OpenGL 3.0 and the EXT_gpu_shader4 extension.

    - * - *

    Additionally, some vertex shader inputs using the wider 64-bit components may count double against the implementation-dependent limit on the number of - * vertex shader attribute vectors. A 64-bit scalar or a two-component vector consumes only a single generic vertex attribute; three- and four-component - * "long" may count as two. This approach is similar to the one used in the current GL where matrix attributes consume multiple attributes.

    - * - *

    Note that 64-bit generic vertex attributes were nominally supported beginning with the introduction of vertex shaders in OpenGL 2.0. However, the - * OpenGL Shading Language at the time had no support for 64-bit data types, so any such values were automatically converted to 32-bit.

    - * - *

    Support for 64-bit floating-point vertex attributes in this extension can be combined with other extensions. In particular, this extension provides an - * entry point that can be used with EXT_direct_state_access to directly set state for any vertex array object. Also, the related - * NV_vertex_attrib_integer_64bit extension provides an entry point to specify bindless vertex attribute arrays with 64-bit components, integer or - * floating-point.

    - * - *

    Requires {@link GL30 OpenGL 3.0} and {@link ARBGPUShaderFP64 ARB_gpu_shader_fp64} (or equivalent functionality).

    - */ -public class EXTVertexAttrib64bit { - - static { GL.initialize(); } - - /** Returned in the {@code type} parameter of GetActiveAttrib. */ - public static final int - GL_DOUBLE_VEC2_EXT = 0x8FFC, - GL_DOUBLE_VEC3_EXT = 0x8FFD, - GL_DOUBLE_VEC4_EXT = 0x8FFE, - GL_DOUBLE_MAT2_EXT = 0x8F46, - GL_DOUBLE_MAT3_EXT = 0x8F47, - GL_DOUBLE_MAT4_EXT = 0x8F48, - GL_DOUBLE_MAT2x3_EXT = 0x8F49, - GL_DOUBLE_MAT2x4_EXT = 0x8F4A, - GL_DOUBLE_MAT3x2_EXT = 0x8F4B, - GL_DOUBLE_MAT3x4_EXT = 0x8F4C, - GL_DOUBLE_MAT4x2_EXT = 0x8F4D, - GL_DOUBLE_MAT4x3_EXT = 0x8F4E; - - protected EXTVertexAttrib64bit() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttribL1dEXT ] --- - - public static native void glVertexAttribL1dEXT(@NativeType("GLuint") int index, @NativeType("GLdouble") double x); - - // --- [ glVertexAttribL2dEXT ] --- - - public static native void glVertexAttribL2dEXT(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glVertexAttribL3dEXT ] --- - - public static native void glVertexAttribL3dEXT(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glVertexAttribL4dEXT ] --- - - public static native void glVertexAttribL4dEXT(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glVertexAttribL1dvEXT ] --- - - public static native void nglVertexAttribL1dvEXT(int index, long v); - - public static void glVertexAttribL1dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribL1dvEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribL2dvEXT ] --- - - public static native void nglVertexAttribL2dvEXT(int index, long v); - - public static void glVertexAttribL2dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribL2dvEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribL3dvEXT ] --- - - public static native void nglVertexAttribL3dvEXT(int index, long v); - - public static void glVertexAttribL3dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribL3dvEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribL4dvEXT ] --- - - public static native void nglVertexAttribL4dvEXT(int index, long v); - - public static void glVertexAttribL4dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribL4dvEXT(index, memAddress(v)); - } - - // --- [ glVertexAttribLPointerEXT ] --- - - public static native void nglVertexAttribLPointerEXT(int index, int size, int type, int stride, long pointer); - - public static void glVertexAttribLPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglVertexAttribLPointerEXT(index, size, type, stride, memAddress(pointer)); - } - - public static void glVertexAttribLPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglVertexAttribLPointerEXT(index, size, type, stride, pointer); - } - - public static void glVertexAttribLPointerEXT(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLsizei") int stride, @NativeType("void const *") DoubleBuffer pointer) { - nglVertexAttribLPointerEXT(index, size, GL11.GL_DOUBLE, stride, memAddress(pointer)); - } - - // --- [ glGetVertexAttribLdvEXT ] --- - - public static native void nglGetVertexAttribLdvEXT(int index, int pname, long params); - - public static void glGetVertexAttribLdvEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribLdvEXT(index, pname, memAddress(params)); - } - - // --- [ glVertexArrayVertexAttribLOffsetEXT ] --- - - /** - * DSA version of {@link ARBVertexAttrib64Bit#glVertexAttribLPointer VertexAttribLPointer}. - * - * @param vaobj the vertex array object - * @param buffer the buffer object - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param offset the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer. The initial value is 0. - */ - public static void glVertexArrayVertexAttribLOffsetEXT(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer, @NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("GLintptr") long offset) { - ARBVertexAttrib64Bit.glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset); - } - - /** Array version of: {@link #glVertexAttribL1dvEXT VertexAttribL1dvEXT} */ - public static void glVertexAttribL1dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL1dvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL2dvEXT VertexAttribL2dvEXT} */ - public static void glVertexAttribL2dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL2dvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL3dvEXT VertexAttribL3dvEXT} */ - public static void glVertexAttribL3dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL3dvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL4dvEXT VertexAttribL4dvEXT} */ - public static void glVertexAttribL4dvEXT(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL4dvEXT; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribLdvEXT GetVertexAttribLdvEXT} */ - public static void glGetVertexAttribLdvEXT(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribLdvEXT; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTWin32KeyedMutex.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTWin32KeyedMutex.java deleted file mode 100644 index a0af9c66..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTWin32KeyedMutex.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_win32_keyed_mutex extension. - * - *

    Direct3D image objects may have a built-in synchronization primitive associated with them that can be used to synchronize access to their contents - * across process and API boundaries. This extension provides access to that synchronization primitive via two new commands that operate on GL memory - * objects.

    - * - *

    Requires {@link EXTMemoryObject EXT_memory_object}.

    - */ -public class EXTWin32KeyedMutex { - - static { GL.initialize(); } - - protected EXTWin32KeyedMutex() { - throw new UnsupportedOperationException(); - } - - // --- [ glAcquireKeyedMutexWin32EXT ] --- - - /** - * Blocks GL command processing until a keyed mutex is acquired. - * - * @param memory identifies which keyed mutex to acquire - * @param key is the mutex value to wait for - * @param timeout the time, in milliseconds, to wait before failing the acquire operation - */ - @NativeType("GLboolean") - public static native boolean glAcquireKeyedMutexWin32EXT(@NativeType("GLuint") int memory, @NativeType("GLuint64") long key, @NativeType("GLuint") int timeout); - - // --- [ glReleaseKeyedMutexWin32EXT ] --- - - /** - * Releases a keyed mutex after all prior GL command processing has completed. - * - * @param memory identifies the keyed mutex to release - * @param key the mutex value set by the release operation - */ - @NativeType("GLboolean") - public static native boolean glReleaseKeyedMutexWin32EXT(@NativeType("GLuint") int memory, @NativeType("GLuint64") long key); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTWindowRectangles.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTWindowRectangles.java deleted file mode 100644 index bd7baf84..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTWindowRectangles.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the EXT_window_rectangles extension. - * - *

    This extension provides additional orthogonally aligned "window rectangles" specified in window-space coordinates that restrict rasterization of all - * primitive types (geometry, images, paths) and framebuffer clears.

    - * - *

    When rendering to the framebuffer of an on-screen window, these window rectangles are ignored so these window rectangles apply to rendering to non-zero - * framebuffer objects only.

    - * - *

    From zero to an implementation-dependent limit (specified by {@link #GL_MAX_WINDOW_RECTANGLES_EXT MAX_WINDOW_RECTANGLES_EXT}) number of window rectangles can be operational at once. When - * one or more window rectangles are active, rasterized fragments can either survive if the fragment is within any of the operational window rectangles - * ({@link #GL_INCLUSIVE_EXT INCLUSIVE_EXT} mode) or be rejected if the fragment is within any of the operational window rectangles ({@link #GL_EXCLUSIVE_EXT EXCLUSIVE_EXT} mode).

    - * - *

    These window rectangles operate orthogonally to the existing scissor test functionality.

    - * - *

    This extension has specification language for both OpenGL and ES so {@code EXT_window_rectangles} can be implemented and advertised for either or both - * API contexts.

    - * - *

    Requires {@link GL30 GL30} or {@link EXTDrawBuffers2 EXT_draw_buffers2}.

    - */ -public class EXTWindowRectangles { - - static { GL.initialize(); } - - /** Accepted by the {@code mode} parameter of {@link #glWindowRectanglesEXT WindowRectanglesEXT}. */ - public static final int - GL_INCLUSIVE_EXT = 0x8F10, - GL_EXCLUSIVE_EXT = 0x8F11; - - /** - * Accepted by the {@code pname} parameter of GetIntegeri_v, GetInteger64i_v, GetBooleani_v, GetFloati_v, GetDoublei_v, GetIntegerIndexedvEXT, - * GetFloatIndexedvEXT, GetDoubleIndexedvEXT, GetBooleanIndexedvEXT, and GetIntegeri_vEXT. - */ - public static final int GL_WINDOW_RECTANGLE_EXT = 0x8F12; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_WINDOW_RECTANGLE_MODE_EXT = 0x8F13, - GL_MAX_WINDOW_RECTANGLES_EXT = 0x8F14, - GL_NUM_WINDOW_RECTANGLES_EXT = 0x8F15; - - protected EXTWindowRectangles() { - throw new UnsupportedOperationException(); - } - - // --- [ glWindowRectanglesEXT ] --- - - /** - * Unsafe version of: {@link #glWindowRectanglesEXT WindowRectanglesEXT} - * - * @param count the number of active window rectangles. Must be between zero and the value of {@link #GL_MAX_WINDOW_RECTANGLES_EXT MAX_WINDOW_RECTANGLES_EXT}. - */ - public static native void nglWindowRectanglesEXT(int mode, int count, long box); - - /** - * Sets the active window rectangles. - * - *

    When the {@code WindowRectanglesEXT} command is processed without error, the ith window rectangle box is set to the corresponding four - * parameters for values of {@code i} less then {@code n}. For values of {@code i} greater than {@code n}, each window rectangle box is set to (0,0,0,0).

    - * - *

    Each four elements corresponds to the ith window rectangle indicating a box of pixels specified with window-space coordinates. Each window - * rectangle box {@code i} has a lower-left origin at {@code (x_i,y_i)} and upper-right corner at {@code (x_i+w_i,y_i+h_i)}.

    - * - *

    The {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if any element {@code w_i} or {@code h_i}, corresponding to each box's respective width and height, is negative.

    - * - *

    Each rasterized or cleared fragment with a window-space position {@code (xw,yw)} is within the ith window rectangle box when both of these - * equations are satisfied for all {@code i} less than {@code n}:

    - * - *
    
    -     * x_i ≤ xw < x_i+w_i
    -     * y_i ≤ yw < y_i+h_i
    - * - *

    When the window rectangles mode is {@link #GL_INCLUSIVE_EXT INCLUSIVE_EXT} mode and the bound framebuffer object is non-zero, a fragment passes the window rectangles test if - * the fragment's window-space position is within at least one of the current {@code n} active window rectangles; otherwise the window rectangles test - * fails and the fragment is discarded.

    - * - *

    When the window rectangles mode is {@link #GL_EXCLUSIVE_EXT EXCLUSIVE_EXT} mode and the bound framebuffer object is non-zero, a fragment fails the window rectangles test and is - * discarded if the fragment's window-space position is within at least one of the current {@code n} active window rectangles; otherwise the window - * rectangles test passes and the fragment passes the window rectangles test.

    - * - *

    When the bound framebuffer object is zero, the window rectangles test always passes.

    - * - * @param mode the rectangle mode. One of:
    {@link #GL_INCLUSIVE_EXT INCLUSIVE_EXT}{@link #GL_EXCLUSIVE_EXT EXCLUSIVE_EXT}
    - * @param box an array of {@code 4*count} window rectangle coordinates - */ - public static void glWindowRectanglesEXT(@NativeType("GLenum") int mode, @Nullable @NativeType("GLint const *") IntBuffer box) { - nglWindowRectanglesEXT(mode, remainingSafe(box) >> 2, memAddressSafe(box)); - } - - /** Array version of: {@link #glWindowRectanglesEXT WindowRectanglesEXT} */ - public static void glWindowRectanglesEXT(@NativeType("GLenum") int mode, @Nullable @NativeType("GLint const *") int[] box) { - long __functionAddress = GL.getICD().glWindowRectanglesEXT; - if (CHECKS) { - check(__functionAddress); - } - callPV(mode, lengthSafe(box) >> 2, box, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/EXTX11SyncObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/EXTX11SyncObject.java deleted file mode 100644 index 7520b9ee..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/EXTX11SyncObject.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the EXT_x11_sync_object extension. - * - *

    Synchronization objects added the ability to better coordinate operations between multiple GL command streams. However, it is desirable to have the - * same level of coordination between GL command streams and external rendering APIs. This extension introduces two new concepts to build upon the - * synchronization infrastructure provided by {@link ARBSync ARB_sync}:

    - * - *
      - *
    1. A means to import an X Synchronization Fence object into the GL and use it as a sync object.
    2. - *
    3. The concept of a reusable sync object.
    4. - *
    - * - *

    The latter is necessary because the import operation is expensive and performing it every time a synchronization point was reached would make the - * synchronization prohibitively slow.

    - * - *

    This extension stops short of allowing the GL to change the state of imported/reusable sync objects, but does not add any language that would prohibit - * such functionality from being added in a subsequent extension.

    - * - *

    Requires {@link GL32 OpenGL 3.2} or {@link ARBSync ARB_sync}.

    - */ -public class EXTX11SyncObject { - - static { GL.initialize(); } - - /** Accepted by the {@code external_sync_type} parameter of ImportSyncEXT. */ - public static final int GL_SYNC_X11_FENCE_EXT = 0x90E1; - - protected EXTX11SyncObject() { - throw new UnsupportedOperationException(); - } - - // --- [ glImportSyncEXT ] --- - - /** - * Creates a GL sync object of the type {@code external_sync_type} based on the object referred to by {@code external_sync}. - * - * @param external_sync_type the external sync object type. Must be:
    {@link #GL_SYNC_X11_FENCE_EXT SYNC_X11_FENCE_EXT}
    - * @param external_sync the external sync object. Must be the XID of a valid X11 Synchronization Fence object - * @param flags Must be 0. - */ - @NativeType("GLsync") - public static native long glImportSyncEXT(@NativeType("GLenum") int external_sync_type, @NativeType("GLintptr") long external_sync, @NativeType("GLbitfield") int flags); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL.java deleted file mode 100644 index 3d596583..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL.java +++ /dev/null @@ -1,739 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.opengl; - -import org.lwjgl.*; -import org.lwjgl.system.*; -import org.lwjgl.system.windows.*; - -import javax.annotation.*; -import java.nio.*; -import java.util.*; -import java.util.function.*; - -import static java.lang.Math.*; -import static org.lwjgl.opengl.GL32C.*; -import static org.lwjgl.opengl.GLX.*; -import static org.lwjgl.opengl.GLX11.*; -import static org.lwjgl.opengl.WGL.*; -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.linux.X11.*; -import static org.lwjgl.system.windows.GDI32.*; -import static org.lwjgl.system.windows.User32.*; -import static org.lwjgl.system.windows.WindowsUtil.*; - -/** - * This class must be used before any OpenGL function is called. It has the following responsibilities: - *
      - *
    • Loads the OpenGL native library into the JVM process.
    • - *
    • Creates instances of {@link GLCapabilities} classes. A {@code GLCapabilities} instance contains flags for functionality that is available in an OpenGL - * context. Internally, it also contains function pointers that are only valid in that specific OpenGL context.
    • - *
    • Maintains thread-local state for {@code GLCapabilities} instances, corresponding to OpenGL contexts that are current in those threads.
    • - *
    - * - *

    Library lifecycle

    - *

    The OpenGL library is loaded automatically when this class is initialized. Set the {@link Configuration#OPENGL_EXPLICIT_INIT} option to override this - * behavior. Manual loading/unloading can be achieved with the {@link #create} and {@link #destroy} functions. The name of the library loaded can be overridden - * with the {@link Configuration#OPENGL_LIBRARY_NAME} option. The maximum OpenGL version loaded can be set with the {@link Configuration#OPENGL_MAXVERSION} - * option. This can be useful to ensure that no functionality above a specific version is used during development.

    - * - *

    GLCapabilities creation

    - *

    Instances of {@code GLCapabilities} can be created with the {@link #createCapabilities} method. An OpenGL context must be current in the current thread - * before it is called. Calling this method is expensive, so the {@code GLCapabilities} instance should be associated with the OpenGL context and reused as - * necessary.

    - * - *

    Thread-local state

    - *

    Before a function for a given OpenGL context can be called, the corresponding {@code GLCapabilities} instance must be passed to the - * {@link #setCapabilities} method. The user is also responsible for clearing the current {@code GLCapabilities} instance when the context is destroyed or made - * current in another thread.

    - * - *

    Note that the {@link #createCapabilities} method implicitly calls {@link #setCapabilities} with the newly created instance.

    - */ -public final class GL { - - @Nullable - private static final APIVersion MAX_VERSION; - - @Nullable - private static FunctionProvider functionProvider; - - private static final ThreadLocal capabilitiesTLS = new ThreadLocal<>(); - - private static ICD icd = new ICDStatic(); - - @Nullable - private static WGLCapabilities capabilitiesWGL; - - @Nullable - private static GLXCapabilities capabilitiesGLXClient; - @Nullable - private static GLXCapabilities capabilitiesGLX; - - static { - Library.loadSystem(System::load, System::loadLibrary, GL.class, "org.lwjgl.opengl", Platform.mapLibraryNameBundled("lwjgl_opengl")); - - MAX_VERSION = apiParseVersion(Configuration.OPENGL_MAXVERSION); - - if (!Configuration.OPENGL_EXPLICIT_INIT.get(false)) { - create(); - } - } - - private GL() {} - - /** Ensures that the lwjgl_opengl shared library has been loaded. */ - static void initialize() { - // intentionally empty to trigger static initializer - } - - /** Loads the OpenGL native library, using the default library name. */ - public static void create() { - SharedLibrary GL; - switch (Platform.get()) { - case LINUX: - GL = Library.loadNative(GL.class, "org.lwjgl.opengl", Configuration.OPENGL_LIBRARY_NAME, "libGLX.so.0", "libGL.so.1", "libGL.so"); - break; - case MACOSX: - GL = Library.loadNative(GL.class, "org.lwjgl.opengl", Configuration.OPENGL_LIBRARY_NAME, "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"); - break; - case WINDOWS: - GL = Library.loadNative(GL.class, "org.lwjgl.opengl", Configuration.OPENGL_LIBRARY_NAME, "opengl32"); - break; - default: - throw new IllegalStateException(); - } - create(GL); - } - - /** - * Loads the OpenGL native library, using the specified library name. - * - * @param libName the native library name - */ - public static void create(String libName) { - create(Library.loadNative(GL.class, "org.lwjgl.opengl", libName)); - } - - private static void create(SharedLibrary OPENGL) { - try { - create((FunctionProvider)new SharedLibrary.Delegate(OPENGL) { - private final long GetProcAddress; - - { - long GetProcAddress = NULL; - - switch (Platform.get()) { - case LINUX: - GetProcAddress = library.getFunctionAddress("glXGetProcAddress"); - if (GetProcAddress == NULL) { - GetProcAddress = library.getFunctionAddress("glXGetProcAddressARB"); - } - break; - case WINDOWS: - GetProcAddress = library.getFunctionAddress("wglGetProcAddress"); - break; - } - if (GetProcAddress == NULL) { - GetProcAddress = library.getFunctionAddress("OSMesaGetProcAddress"); - } - - this.GetProcAddress = GetProcAddress; - } - - @Override - public long getFunctionAddress(ByteBuffer functionName) { - long address = GetProcAddress == NULL ? NULL : Platform.get() == Platform.WINDOWS - ? nwglGetProcAddress(memAddress(functionName), GetProcAddress) // save LastError - : callPP(memAddress(functionName), GetProcAddress); - if (address == NULL) { - address = library.getFunctionAddress(functionName); - if (address == NULL && DEBUG_FUNCTIONS) { - apiLogMissing("GL", functionName); - } - } - - return address; - } - }); - } catch (RuntimeException e) { - OPENGL.free(); - throw e; - } - } - - /** - * Initializes OpenGL with the specified {@link FunctionProvider}. This method can be used to implement custom OpenGL library loading. - * - * @param functionProvider the provider of OpenGL function addresses - */ - public static void create(FunctionProvider functionProvider) { - if (GL.functionProvider != null) { - throw new IllegalStateException("OpenGL library has already been loaded."); - } - - GL.functionProvider = functionProvider; - ThreadLocalUtil.setFunctionMissingAddresses(GLCapabilities.ADDRESS_BUFFER_SIZE); - } - - /** Unloads the OpenGL native library. */ - public static void destroy() { - if (functionProvider == null) { - return; - } - - ThreadLocalUtil.setFunctionMissingAddresses(0); - - capabilitiesWGL = null; - capabilitiesGLX = null; - - if (functionProvider instanceof NativeResource) { - ((NativeResource)functionProvider).free(); - } - functionProvider = null; - } - - /** Returns the {@link FunctionProvider} for the OpenGL native library. */ - @Nullable - public static FunctionProvider getFunctionProvider() { - return functionProvider; - } - - /** - * Sets the {@link GLCapabilities} of the OpenGL context that is current in the current thread. - * - *

    This {@code GLCapabilities} instance will be used by any OpenGL call in the current thread, until {@code setCapabilities} is called again with a - * different value.

    - */ - public static void setCapabilities(@Nullable GLCapabilities caps) { - capabilitiesTLS.set(caps); - ThreadLocalUtil.setCapabilities(caps == null ? NULL : memAddress(caps.addresses)); - icd.set(caps); - } - - /** - * Returns the {@link GLCapabilities} of the OpenGL context that is current in the current thread. - * - * @throws IllegalStateException if {@link #setCapabilities} has never been called in the current thread or was last called with a {@code null} value - */ - public static GLCapabilities getCapabilities() { - return checkCapabilities(capabilitiesTLS.get()); - } - - private static GLCapabilities checkCapabilities(@Nullable GLCapabilities caps) { - if (CHECKS && caps == null) { - throw new IllegalStateException( - "No GLCapabilities instance set for the current thread. Possible solutions:\n" + - "\ta) Call GL.createCapabilities() after making a context current in the current thread.\n" + - "\tb) Call GL.setCapabilities() if a GLCapabilities instance already exists for the current context." - ); - } - //noinspection ConstantConditions - return caps; - } - - /** - * Returns the WGL capabilities. - * - *

    This method may only be used on Windows.

    - */ - public static WGLCapabilities getCapabilitiesWGL() { - if (capabilitiesWGL == null) { - capabilitiesWGL = createCapabilitiesWGLDummy(); - } - - return capabilitiesWGL; - } - - /** Returns the GLX client capabilities. */ - static GLXCapabilities getCapabilitiesGLXClient() { - if (capabilitiesGLXClient == null) { - capabilitiesGLXClient = initCapabilitiesGLX(true); - } - - return capabilitiesGLXClient; - } - - /** - * Returns the GLX capabilities. - * - *

    This method may only be used on Linux.

    - */ - public static GLXCapabilities getCapabilitiesGLX() { - if (capabilitiesGLX == null) { - capabilitiesGLX = initCapabilitiesGLX(false); - } - - return capabilitiesGLX; - } - - private static GLXCapabilities initCapabilitiesGLX(boolean client) { - long display = nXOpenDisplay(NULL); - try { - return createCapabilitiesGLX(display, client ? -1 : XDefaultScreen(display)); - } finally { - XCloseDisplay(display); - } - } - - /** - * Creates a new {@link GLCapabilities} instance for the OpenGL context that is current in the current thread. - * - *

    Depending on the current context, the instance returned may or may not contain the deprecated functionality removed since OpenGL version 3.1.

    - * - *

    This method calls {@link #setCapabilities(GLCapabilities)} with the new instance before returning.

    - * - * @return the GLCapabilities instance - */ - public static GLCapabilities createCapabilities() { - return createCapabilities(null); - } - - /** - * Creates a new {@link GLCapabilities} instance for the OpenGL context that is current in the current thread. - * - *

    Depending on the current context, the instance returned may or may not contain the deprecated functionality removed since OpenGL version 3.1.

    - * - *

    This method calls {@link #setCapabilities(GLCapabilities)} with the new instance before returning.

    - * - * @param bufferFactory a function that allocates a {@link PointerBuffer} given a size. The buffer must be filled with zeroes. If {@code null}, LWJGL will - * allocate a GC-managed buffer internally. - * - * @return the GLCapabilities instance - */ - public static GLCapabilities createCapabilities(@Nullable IntFunction bufferFactory) { - return createCapabilities(false, bufferFactory); - } - - /** - * Creates a new {@link GLCapabilities} instance for the OpenGL context that is current in the current thread. - * - *

    Depending on the current context, the instance returned may or may not contain the deprecated functionality removed since OpenGL version 3.1. The - * {@code forwardCompatible} flag will force LWJGL to not load the deprecated functions, even if the current context exposes them.

    - * - *

    This method calls {@link #setCapabilities(GLCapabilities)} with the new instance before returning.

    - * - * @param forwardCompatible if true, LWJGL will create forward compatible capabilities - * - * @return the GLCapabilities instance - */ - public static GLCapabilities createCapabilities(boolean forwardCompatible) { - return createCapabilities(forwardCompatible, null); - } - - /** - * Creates a new {@link GLCapabilities} instance for the OpenGL context that is current in the current thread. - * - *

    Depending on the current context, the instance returned may or may not contain the deprecated functionality removed since OpenGL version 3.1. The - * {@code forwardCompatible} flag will force LWJGL to not load the deprecated functions, even if the current context exposes them.

    - * - *

    This method calls {@link #setCapabilities(GLCapabilities)} with the new instance before returning.

    - * - * @param forwardCompatible if true, LWJGL will create forward compatible capabilities - * @param bufferFactory a function that allocates a {@link PointerBuffer} given a size. If {@code null}, LWJGL will allocate a GC-managed buffer - * internally. - * - * @return the GLCapabilities instance - */ - @SuppressWarnings("AssignmentToMethodParameter") - public static GLCapabilities createCapabilities(boolean forwardCompatible, @Nullable IntFunction bufferFactory) { - FunctionProvider functionProvider = GL.functionProvider; - if (functionProvider == null) { - throw new IllegalStateException("OpenGL library has not been loaded."); - } - - // We don't have a current ContextCapabilities when this method is called - // so we have to use the native bindings directly. - long GetError = functionProvider.getFunctionAddress("glGetError"); - long GetString = functionProvider.getFunctionAddress("glGetString"); - long GetIntegerv = functionProvider.getFunctionAddress("glGetIntegerv"); - - if (GetError == NULL || GetString == NULL || GetIntegerv == NULL) { - throw new IllegalStateException("Core OpenGL functions could not be found. Make sure that the OpenGL library has been loaded correctly."); - } - - int errorCode = callI(GetError); - if (errorCode != GL_NO_ERROR) { - apiLog(String.format("An OpenGL context was in an error state before the creation of its capabilities instance. Error: 0x%X", errorCode)); - } - - int majorVersion; - int minorVersion; - - try (MemoryStack stack = stackPush()) { - IntBuffer version = stack.ints(0); - - // Try the 3.0+ version query first - callPV(GL_MAJOR_VERSION, memAddress(version), GetIntegerv); - if (callI(GetError) == GL_NO_ERROR && 3 <= (majorVersion = version.get(0))) { - // We're on an 3.0+ context. - callPV(GL_MINOR_VERSION, memAddress(version), GetIntegerv); - minorVersion = version.get(0); - } else { - // Fallback to the string query. - String versionString = memUTF8Safe(callP(GL_VERSION, GetString)); - if (versionString == null || callI(GetError) != GL_NO_ERROR) { - throw new IllegalStateException("There is no OpenGL context current in the current thread."); - } - - APIVersion apiVersion = apiParseVersion(versionString); - - majorVersion = apiVersion.major; - minorVersion = apiVersion.minor; - } - } - - if (majorVersion < 1 || (majorVersion == 1 && minorVersion < 1)) { - throw new IllegalStateException("OpenGL 1.1 is required."); - } - - int[] GL_VERSIONS = { - 5, // OpenGL 1.1 to 1.5 - 1, // OpenGL 2.0 to 2.1 - 3, // OpenGL 3.0 to 3.3 - 6, // OpenGL 4.0 to 4.6 - }; - - Set supportedExtensions = new HashSet<>(512); - - int maxMajor = min(majorVersion, GL_VERSIONS.length); - if (MAX_VERSION != null) { - maxMajor = min(MAX_VERSION.major, maxMajor); - } - for (int M = 1; M <= maxMajor; M++) { - int maxMinor = GL_VERSIONS[M - 1]; - if (M == majorVersion) { - maxMinor = min(minorVersion, maxMinor); - } - if (MAX_VERSION != null && M == MAX_VERSION.major) { - maxMinor = min(MAX_VERSION.minor, maxMinor); - } - - for (int m = M == 1 ? 1 : 0; m <= maxMinor; m++) { - supportedExtensions.add("OpenGL" + M + m); - } - } - - if (majorVersion < 3) { - // Parse EXTENSIONS string - String extensionsString = memASCIISafe(callP(GL_EXTENSIONS, GetString)); - if (extensionsString != null) { - StringTokenizer tokenizer = new StringTokenizer(extensionsString); - while (tokenizer.hasMoreTokens()) { - supportedExtensions.add(tokenizer.nextToken()); - } - } - } else { - // Use indexed EXTENSIONS - try (MemoryStack stack = stackPush()) { - IntBuffer pi = stack.ints(0); - - callPV(GL_NUM_EXTENSIONS, memAddress(pi), GetIntegerv); - int extensionCount = pi.get(0); - - long GetStringi = apiGetFunctionAddress(functionProvider, "glGetStringi"); - for (int i = 0; i < extensionCount; i++) { - supportedExtensions.add(memASCII(callP(GL_EXTENSIONS, i, GetStringi))); - } - - // In real drivers, we may encounter the following weird scenarios: - // - 3.1 context without GL_ARB_compatibility but with deprecated functionality exposed and working. - // - Core or forward-compatible context with GL_ARB_compatibility exposed, but not working when used. - // We ignore these and go by the spec. - - // Force forwardCompatible to true if the context is a forward-compatible context. - callPV(GL_CONTEXT_FLAGS, memAddress(pi), GetIntegerv); - if ((pi.get(0) & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) != 0) { - forwardCompatible = true; - } else { - // Force forwardCompatible to true if the context is a core profile context. - if ((3 < majorVersion || 1 <= minorVersion)) { // OpenGL 3.1+ - if (3 < majorVersion || 2 <= minorVersion) { // OpenGL 3.2+ - callPV(GL_CONTEXT_PROFILE_MASK, memAddress(pi), GetIntegerv); - if ((pi.get(0) & GL_CONTEXT_CORE_PROFILE_BIT) != 0) { - forwardCompatible = true; - } - } else { - forwardCompatible = !supportedExtensions.contains("GL_ARB_compatibility"); - } - } - } - } - } - apiFilterExtensions(supportedExtensions, Configuration.OPENGL_EXTENSION_FILTER); - - GLCapabilities caps = new GLCapabilities(functionProvider, supportedExtensions, forwardCompatible, bufferFactory == null - ? BufferUtils::createPointerBuffer - : bufferFactory); - - setCapabilities(caps); - - return caps; - } - - /** Creates a dummy context and retrieves the WGL capabilities. */ - private static WGLCapabilities createCapabilitiesWGLDummy() { - long hdc = wglGetCurrentDC(); // just use the current context if one exists - if (hdc != NULL) { - return createCapabilitiesWGL(hdc); - } - - short classAtom = 0; - long hwnd = NULL; - long hglrc = NULL; - try (MemoryStack stack = stackPush()) { - WNDCLASSEX wc = WNDCLASSEX.calloc(stack) - .cbSize(WNDCLASSEX.SIZEOF) - .style(CS_HREDRAW | CS_VREDRAW) - .hInstance(WindowsLibrary.HINSTANCE) - .lpszClassName(stack.UTF16("WGL")); - - memPutAddress( - wc.address() + WNDCLASSEX.LPFNWNDPROC, - User32.Functions.DefWindowProc - ); - - classAtom = RegisterClassEx(wc); - if (classAtom == 0) { - throw new IllegalStateException("Failed to register WGL window class"); - } - - hwnd = check(nCreateWindowEx( - 0, classAtom & 0xFFFF, NULL, - WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, - 0, 0, 1, 1, - NULL, NULL, NULL, NULL - )); - - hdc = check(GetDC(hwnd)); - - PIXELFORMATDESCRIPTOR pfd = PIXELFORMATDESCRIPTOR.calloc(stack) - .nSize((short)PIXELFORMATDESCRIPTOR.SIZEOF) - .nVersion((short)1) - .dwFlags(PFD_SUPPORT_OPENGL); // we don't care about anything else - - int pixelFormat = ChoosePixelFormat(hdc, pfd); - if (pixelFormat == 0) { - windowsThrowException("Failed to choose an OpenGL-compatible pixel format"); - } - - if (DescribePixelFormat(hdc, pixelFormat, pfd) == 0) { - windowsThrowException("Failed to obtain pixel format information"); - } - - if (!SetPixelFormat(hdc, pixelFormat, pfd)) { - windowsThrowException("Failed to set the pixel format"); - } - - hglrc = check(wglCreateContext(hdc)); - wglMakeCurrent(hdc, hglrc); - - return createCapabilitiesWGL(hdc); - } finally { - if (hglrc != NULL) { - wglMakeCurrent(NULL, NULL); - wglDeleteContext(hglrc); - } - - if (hwnd != NULL) { - DestroyWindow(hwnd); - } - - if (classAtom != 0) { - nUnregisterClass(classAtom & 0xFFFF, WindowsLibrary.HINSTANCE); - } - } - } - - /** - * Creates a {@link WGLCapabilities} instance for the context that is current in the current thread. - * - *

    This method may only be used on Windows.

    - */ - public static WGLCapabilities createCapabilitiesWGL() { - long hdc = wglGetCurrentDC(); - if (hdc == NULL) { - throw new IllegalStateException("Failed to retrieve the device context of the current OpenGL context"); - } - - return createCapabilitiesWGL(hdc); - } - - /** - * Creates a {@link WGLCapabilities} instance for the specified device context. - * - * @param hdc the device context handle ({@code HDC}) - */ - private static WGLCapabilities createCapabilitiesWGL(long hdc) { - FunctionProvider functionProvider = GL.functionProvider; - if (functionProvider == null) { - throw new IllegalStateException("OpenGL library has not been loaded."); - } - - String extensionsString = null; - - long wglGetExtensionsString = functionProvider.getFunctionAddress("wglGetExtensionsStringARB"); - if (wglGetExtensionsString != NULL) { - extensionsString = memASCII(callPP(hdc, wglGetExtensionsString)); - } else { - wglGetExtensionsString = functionProvider.getFunctionAddress("wglGetExtensionsStringEXT"); - if (wglGetExtensionsString != NULL) { - extensionsString = memASCII(callP(wglGetExtensionsString)); - } - } - - Set supportedExtensions = new HashSet<>(32); - - if (extensionsString != null) { - StringTokenizer tokenizer = new StringTokenizer(extensionsString); - while (tokenizer.hasMoreTokens()) { - supportedExtensions.add(tokenizer.nextToken()); - } - } - - apiFilterExtensions(supportedExtensions, Configuration.OPENGL_EXTENSION_FILTER); - - return new WGLCapabilities(functionProvider, supportedExtensions); - } - - /** - * Creates a {@link GLXCapabilities} instance for the default screen of the specified X connection. - * - *

    This method may only be used on Linux.

    - * - * @param display the X connection handle ({@code DISPLAY}) - */ - public static GLXCapabilities createCapabilitiesGLX(long display) { - return createCapabilitiesGLX(display, XDefaultScreen(display)); - } - - /** - * Creates a {@link GLXCapabilities} instance for the specified screen of the specified X connection. - * - *

    This method may only be used on Linux.

    - * - * @param display the X connection handle ({@code DISPLAY}) - * @param screen the screen index - */ - public static GLXCapabilities createCapabilitiesGLX(long display, int screen) { - FunctionProvider functionProvider = GL.functionProvider; - if (functionProvider == null) { - throw new IllegalStateException("OpenGL library has not been loaded."); - } - - int majorVersion; - int minorVersion; - - try (MemoryStack stack = stackPush()) { - IntBuffer piMajor = stack.ints(0); - IntBuffer piMinor = stack.ints(0); - - if (!glXQueryVersion(display, piMajor, piMinor)) { - throw new IllegalStateException("Failed to query GLX version"); - } - - majorVersion = piMajor.get(0); - minorVersion = piMinor.get(0); - if (majorVersion != 1) { - throw new IllegalStateException("Invalid GLX major version: " + majorVersion); - } - } - - Set supportedExtensions = new HashSet<>(32); - - int[][] GLX_VERSIONS = { - {1, 2, 3, 4} - }; - - for (int major = 1; major <= GLX_VERSIONS.length; major++) { - int[] minors = GLX_VERSIONS[major - 1]; - for (int minor : minors) { - if (major < majorVersion || (major == majorVersion && minor <= minorVersion)) { - supportedExtensions.add("GLX" + major + minor); - } - } - } - - if (1 <= minorVersion) { - String extensionsString; - - if (screen == -1) { - long glXGetClientString = functionProvider.getFunctionAddress("glXGetClientString"); - extensionsString = memASCIISafe(callPP(display, GLX_EXTENSIONS, glXGetClientString)); - } else { - long glXQueryExtensionsString = functionProvider.getFunctionAddress("glXQueryExtensionsString"); - extensionsString = memASCIISafe(callPP(display, screen, glXQueryExtensionsString)); - } - - if (extensionsString != null) { - StringTokenizer tokenizer = new StringTokenizer(extensionsString); - while (tokenizer.hasMoreTokens()) { - supportedExtensions.add(tokenizer.nextToken()); - } - } - } - - apiFilterExtensions(supportedExtensions, Configuration.OPENGL_EXTENSION_FILTER); - - return new GLXCapabilities(functionProvider, supportedExtensions); - } - - // Only used by array overloads - static GLCapabilities getICD() { - return checkCapabilities(icd.get()); - } - - /** Function pointer provider. */ - private interface ICD { - default void set(@Nullable GLCapabilities caps) {} - @Nullable GLCapabilities get(); - } - - /** - * Write-once {@link ICD}. - * - *

    This is the default implementation that skips the thread-local lookup. When a new GLCapabilities is set, we compare it to the write-once capabilities. - * If different function pointers are found, we fall back to the expensive lookup.

    - */ - private static class ICDStatic implements ICD { - - @Nullable - private static GLCapabilities tempCaps; - - @SuppressWarnings("AssignmentToStaticFieldFromInstanceMethod") - @Override - public void set(@Nullable GLCapabilities caps) { - if (tempCaps == null) { - tempCaps = caps; - } else if (caps != null && caps != tempCaps && ThreadLocalUtil.areCapabilitiesDifferent(tempCaps.addresses, caps.addresses)) { - apiLog("[WARNING] Incompatible context detected. Falling back to thread-local lookup for GL contexts."); - icd = GL::getCapabilities; // fall back to thread/process lookup - } - } - - @Override - public GLCapabilities get() { - return WriteOnce.caps; - } - - private static final class WriteOnce { - // This will be initialized the first time get() above is called - static final GLCapabilities caps; - - static { - GLCapabilities tempCaps = ICDStatic.tempCaps; - if (tempCaps == null) { - throw new IllegalStateException("No GLCapabilities instance has been set"); - } - caps = tempCaps; - } - } - - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL11.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL11.java deleted file mode 100644 index d63c2fe2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL11.java +++ /dev/null @@ -1,10174 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -import java.nio.ByteBuffer; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.ShortBuffer; - -/** - * The OpenGL functionality up to version 1.1. Includes the deprecated symbols of the Compatibility Profile. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL11 { - - static { GL.initialize(); } - - public static void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { - glColorPointer(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pointer); - } - - public static void glColorPointer(int size, int stride, FloatBuffer pointer) { - glColorPointer(size, GL11.GL_FLOAT, stride, pointer); - } - - public static void glFog(int p1, FloatBuffer p2) { - glFogfv(p1, p2); - } - - public static void glFog(int p1, IntBuffer p2) { - glFogiv(p1, p2); - } - - public static void glGetBoolean(int p1, ByteBuffer p2) { - glGetBooleanv(p1, p2); - } - - public static void glGetDouble(int p1, DoubleBuffer p2) { - glGetDoublev(p1, p2); - } - - public static void glGetFloat(int p1, FloatBuffer p2) { - glGetFloatv(p1, p2); - } - - public static void glGetInteger(int p1, IntBuffer p2) { - glGetIntegerv(p1, p2); - } - - public static void glGetLight(int p1, int p2, FloatBuffer p3) { - glGetLightfv(p1, p2, p3); - } - - public static void glGetLight(int p1, int p2, IntBuffer p3) { - glGetLightiv(p1, p2, p3); - } - - public static void glGetMap(int p1, int p2, DoubleBuffer p3) { - glGetMapdv(p1, p2, p3); - } - - public static void glGetMap(int p1, int p2, FloatBuffer p3) { - glGetMapfv(p1, p2, p3); - } - - public static void glGetMap(int p1, int p2, IntBuffer p3) { - glGetMapiv(p1, p2, p3); - } - - public static void glGetMaterial(int p1, int p2, FloatBuffer p3) { - glGetMaterialfv(p1, p2, p3); - } - - public static void glGetMaterial(int p1, int p2, IntBuffer p3) { - glGetMaterialiv(p1, p2, p3); - } - - public static void glGetPixelMap(int p1, FloatBuffer p2) { - glGetPixelMapfv(p1, p2); - } - - public static void glGetPixelMapu(int p1, IntBuffer p2) { - glGetPixelMapuiv(p1, p2); - } - - public static void glGetPixelMapu(int p1, ShortBuffer p2) { - glGetPixelMapusv(p1, p2); - } - - public static void glGetTexEnv(int p1, int p2, FloatBuffer p3) { - glGetTexEnvfv(p1, p2, p3); - } - - public static void glGetTexEnv(int p1, int p2, IntBuffer p3) { - glGetTexEnviv(p1, p2, p3); - } - - public static void glGetTexGen(int p1, int p2, DoubleBuffer p3) { - glGetTexGendv(p1, p2, p3); - } - - public static void glGetTexGen(int p1, int p2, FloatBuffer p3) { - glGetTexGenfv(p1, p2, p3); - } - - public static void glGetTexGen(int p1, int p2, IntBuffer p3) { - glGetTexGeniv(p1, p2, p3); - } - - public static void glGetTexLevelParameter(int target, int level, int pname, FloatBuffer params) { - glGetTexLevelParameterfv(target, level, pname, params); - } - - public static void glGetTexLevelParameter(int target, int level, int pname, IntBuffer params) { - glGetTexLevelParameteriv(target, level, pname, params); - } - - public static void glGetTexParameter(int target, int pname, FloatBuffer params) { - glGetTexParameterfv(target, pname, params); - } - - public static void glGetTexParameter(int target, int pname, IntBuffer params) { - glGetTexParameteriv(target, pname, params); - } - - public static void glLight(int light, int pname, FloatBuffer params) { - glLightfv(light, pname, params); - } - - public static void glLight(int light, int pname, IntBuffer params) { - glLightiv(light, pname, params); - } - - public static void glLightModel(int pname, FloatBuffer params) { - glLightModelfv(pname, params); - } - - public static void glLightModel(int pname, IntBuffer params) { - glLightModeliv(pname, params); - } - - public static void glLoadMatrix(DoubleBuffer m) { - glLoadMatrixd(m); - } - - public static void glLoadMatrix(FloatBuffer m) { - glLoadMatrixf(m); - } - - public static void glMaterial(int p1, int p2, FloatBuffer p3) { - glMaterialfv(p1, p2, p3); - } - - public static void glMaterial(int p1, int p2, IntBuffer p3) { - glMaterialiv(p1, p2, p3); - } - - public static void glMultMatrix(DoubleBuffer p1) { - glMultMatrixd(p1); - } - - public static void glMultMatrix(FloatBuffer p1) { - glMultMatrixf(p1); - } - - public static void glNormalPointer(int stride, ByteBuffer pointer) { - glNormalPointer(GL11.GL_BYTE, stride, pointer); - } - - public static void glNormalPointer(int stride, FloatBuffer pointer) { - glNormalPointer(GL11.GL_FLOAT, stride, pointer); - } - - public static void glNormalPointer(int stride, IntBuffer pointer) { - glNormalPointer(GL11.GL_INT, stride, pointer); - } - - public static void glNormalPointer(int stride, ShortBuffer pointer) { - glNormalPointer(GL11.GL_SHORT, stride, pointer); - } - - public static void glPixelMap(int p1, FloatBuffer p2) { - glPixelMapfv(p1, p2); - } - - public static void glPixelMapu(int p1, IntBuffer p2) { - glPixelMapuiv(p1, p2); - } - - public static void glPixelMapu(int p1, ShortBuffer p2) { - glPixelMapusv(p1, p2); - } - - public static void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { - glTexCoordPointer(size, GL11.GL_FLOAT, stride, pointer); - } - - public static void glTexCoordPointer(int size, int stride, IntBuffer pointer) { - glTexCoordPointer(size, GL11.GL_INT, stride, pointer); - } - - public static void glTexCoordPointer(int size, int stride, ShortBuffer pointer) { - glTexCoordPointer(size, GL11.GL_SHORT, stride, pointer); - } - - public static void glTexEnv(int p1, int p2, FloatBuffer p3) { - glTexEnvfv(p1, p2, p3); - } - - public static void glTexEnv(int p1, int p2, IntBuffer p3) { - glTexEnviv(p1, p2, p3); - } - - public static void glTexGen(int p1, int p2, DoubleBuffer p3) { - glTexGendv(p1, p2, p3); - } - - public static void glTexGen(int p1, int p2, FloatBuffer p3) { - glTexGenfv(p1, p2, p3); - } - - public static void glTexGen(int p1, int p2, IntBuffer p3) { - glTexGeniv(p1, p2, p3); - } - - public static void glVertexPointer(int size, int stride, FloatBuffer pointer) { - glVertexPointer(size, GL11.GL_FLOAT, stride, pointer); - } - - public static void glVertexPointer(int size, int stride, IntBuffer pointer) { - glVertexPointer(size, GL11.GL_INT, stride, pointer); - } - - public static void glVertexPointer(int size, int stride, ShortBuffer pointer) { - glVertexPointer(size, GL11.GL_SHORT, stride, pointer); - } - - /** AccumOp */ - public static final int - GL_ACCUM = 0x100, - GL_LOAD = 0x101, - GL_RETURN = 0x102, - GL_MULT = 0x103, - GL_ADD = 0x104; - - /** AlphaFunction */ - public static final int - GL_NEVER = 0x200, - GL_LESS = 0x201, - GL_EQUAL = 0x202, - GL_LEQUAL = 0x203, - GL_GREATER = 0x204, - GL_NOTEQUAL = 0x205, - GL_GEQUAL = 0x206, - GL_ALWAYS = 0x207; - - /** AttribMask */ - public static final int - GL_CURRENT_BIT = 0x1, - GL_POINT_BIT = 0x2, - GL_LINE_BIT = 0x4, - GL_POLYGON_BIT = 0x8, - GL_POLYGON_STIPPLE_BIT = 0x10, - GL_PIXEL_MODE_BIT = 0x20, - GL_LIGHTING_BIT = 0x40, - GL_FOG_BIT = 0x80, - GL_DEPTH_BUFFER_BIT = 0x100, - GL_ACCUM_BUFFER_BIT = 0x200, - GL_STENCIL_BUFFER_BIT = 0x400, - GL_VIEWPORT_BIT = 0x800, - GL_TRANSFORM_BIT = 0x1000, - GL_ENABLE_BIT = 0x2000, - GL_COLOR_BUFFER_BIT = 0x4000, - GL_HINT_BIT = 0x8000, - GL_EVAL_BIT = 0x10000, - GL_LIST_BIT = 0x20000, - GL_TEXTURE_BIT = 0x40000, - GL_SCISSOR_BIT = 0x80000, - GL_ALL_ATTRIB_BITS = 0xFFFFF; - - /** BeginMode */ - public static final int - GL_POINTS = 0x0, - GL_LINES = 0x1, - GL_LINE_LOOP = 0x2, - GL_LINE_STRIP = 0x3, - GL_TRIANGLES = 0x4, - GL_TRIANGLE_STRIP = 0x5, - GL_TRIANGLE_FAN = 0x6, - GL_QUADS = 0x7, - GL_QUAD_STRIP = 0x8, - GL_POLYGON = 0x9; - - /** BlendingFactorDest */ - public static final int - GL_ZERO = 0, - GL_ONE = 1, - GL_SRC_COLOR = 0x300, - GL_ONE_MINUS_SRC_COLOR = 0x301, - GL_SRC_ALPHA = 0x302, - GL_ONE_MINUS_SRC_ALPHA = 0x303, - GL_DST_ALPHA = 0x304, - GL_ONE_MINUS_DST_ALPHA = 0x305; - - /** BlendingFactorSrc */ - public static final int - GL_DST_COLOR = 0x306, - GL_ONE_MINUS_DST_COLOR = 0x307, - GL_SRC_ALPHA_SATURATE = 0x308; - - /** Boolean */ - public static final int - GL_TRUE = 1, - GL_FALSE = 0; - - /** ClipPlaneName */ - public static final int - GL_CLIP_PLANE0 = 0x3000, - GL_CLIP_PLANE1 = 0x3001, - GL_CLIP_PLANE2 = 0x3002, - GL_CLIP_PLANE3 = 0x3003, - GL_CLIP_PLANE4 = 0x3004, - GL_CLIP_PLANE5 = 0x3005; - - /** DataType */ - public static final int - GL_BYTE = 0x1400, - GL_UNSIGNED_BYTE = 0x1401, - GL_SHORT = 0x1402, - GL_UNSIGNED_SHORT = 0x1403, - GL_INT = 0x1404, - GL_UNSIGNED_INT = 0x1405, - GL_FLOAT = 0x1406, - GL_2_BYTES = 0x1407, - GL_3_BYTES = 0x1408, - GL_4_BYTES = 0x1409, - GL_DOUBLE = 0x140A; - - /** DrawBufferMode */ - public static final int - GL_NONE = 0, - GL_FRONT_LEFT = 0x400, - GL_FRONT_RIGHT = 0x401, - GL_BACK_LEFT = 0x402, - GL_BACK_RIGHT = 0x403, - GL_FRONT = 0x404, - GL_BACK = 0x405, - GL_LEFT = 0x406, - GL_RIGHT = 0x407, - GL_FRONT_AND_BACK = 0x408, - GL_AUX0 = 0x409, - GL_AUX1 = 0x40A, - GL_AUX2 = 0x40B, - GL_AUX3 = 0x40C; - - /** ErrorCode */ - public static final int - GL_NO_ERROR = 0, - GL_INVALID_ENUM = 0x500, - GL_INVALID_VALUE = 0x501, - GL_INVALID_OPERATION = 0x502, - GL_STACK_OVERFLOW = 0x503, - GL_STACK_UNDERFLOW = 0x504, - GL_OUT_OF_MEMORY = 0x505; - - /** FeedBackMode */ - public static final int - GL_2D = 0x600, - GL_3D = 0x601, - GL_3D_COLOR = 0x602, - GL_3D_COLOR_TEXTURE = 0x603, - GL_4D_COLOR_TEXTURE = 0x604; - - /** FeedBackToken */ - public static final int - GL_PASS_THROUGH_TOKEN = 0x700, - GL_POINT_TOKEN = 0x701, - GL_LINE_TOKEN = 0x702, - GL_POLYGON_TOKEN = 0x703, - GL_BITMAP_TOKEN = 0x704, - GL_DRAW_PIXEL_TOKEN = 0x705, - GL_COPY_PIXEL_TOKEN = 0x706, - GL_LINE_RESET_TOKEN = 0x707; - - /** FogMode */ - public static final int - GL_EXP = 0x800, - GL_EXP2 = 0x801; - - /** FrontFaceDirection */ - public static final int - GL_CW = 0x900, - GL_CCW = 0x901; - - /** GetMapTarget */ - public static final int - GL_COEFF = 0xA00, - GL_ORDER = 0xA01, - GL_DOMAIN = 0xA02; - - /** GetTarget */ - public static final int - GL_CURRENT_COLOR = 0xB00, - GL_CURRENT_INDEX = 0xB01, - GL_CURRENT_NORMAL = 0xB02, - GL_CURRENT_TEXTURE_COORDS = 0xB03, - GL_CURRENT_RASTER_COLOR = 0xB04, - GL_CURRENT_RASTER_INDEX = 0xB05, - GL_CURRENT_RASTER_TEXTURE_COORDS = 0xB06, - GL_CURRENT_RASTER_POSITION = 0xB07, - GL_CURRENT_RASTER_POSITION_VALID = 0xB08, - GL_CURRENT_RASTER_DISTANCE = 0xB09, - GL_POINT_SMOOTH = 0xB10, - GL_POINT_SIZE = 0xB11, - GL_POINT_SIZE_RANGE = 0xB12, - GL_POINT_SIZE_GRANULARITY = 0xB13, - GL_LINE_SMOOTH = 0xB20, - GL_LINE_WIDTH = 0xB21, - GL_LINE_WIDTH_RANGE = 0xB22, - GL_LINE_WIDTH_GRANULARITY = 0xB23, - GL_LINE_STIPPLE = 0xB24, - GL_LINE_STIPPLE_PATTERN = 0xB25, - GL_LINE_STIPPLE_REPEAT = 0xB26, - GL_LIST_MODE = 0xB30, - GL_MAX_LIST_NESTING = 0xB31, - GL_LIST_BASE = 0xB32, - GL_LIST_INDEX = 0xB33, - GL_POLYGON_MODE = 0xB40, - GL_POLYGON_SMOOTH = 0xB41, - GL_POLYGON_STIPPLE = 0xB42, - GL_EDGE_FLAG = 0xB43, - GL_CULL_FACE = 0xB44, - GL_CULL_FACE_MODE = 0xB45, - GL_FRONT_FACE = 0xB46, - GL_LIGHTING = 0xB50, - GL_LIGHT_MODEL_LOCAL_VIEWER = 0xB51, - GL_LIGHT_MODEL_TWO_SIDE = 0xB52, - GL_LIGHT_MODEL_AMBIENT = 0xB53, - GL_SHADE_MODEL = 0xB54, - GL_COLOR_MATERIAL_FACE = 0xB55, - GL_COLOR_MATERIAL_PARAMETER = 0xB56, - GL_COLOR_MATERIAL = 0xB57, - GL_FOG = 0xB60, - GL_FOG_INDEX = 0xB61, - GL_FOG_DENSITY = 0xB62, - GL_FOG_START = 0xB63, - GL_FOG_END = 0xB64, - GL_FOG_MODE = 0xB65, - GL_FOG_COLOR = 0xB66, - GL_DEPTH_RANGE = 0xB70, - GL_DEPTH_TEST = 0xB71, - GL_DEPTH_WRITEMASK = 0xB72, - GL_DEPTH_CLEAR_VALUE = 0xB73, - GL_DEPTH_FUNC = 0xB74, - GL_ACCUM_CLEAR_VALUE = 0xB80, - GL_STENCIL_TEST = 0xB90, - GL_STENCIL_CLEAR_VALUE = 0xB91, - GL_STENCIL_FUNC = 0xB92, - GL_STENCIL_VALUE_MASK = 0xB93, - GL_STENCIL_FAIL = 0xB94, - GL_STENCIL_PASS_DEPTH_FAIL = 0xB95, - GL_STENCIL_PASS_DEPTH_PASS = 0xB96, - GL_STENCIL_REF = 0xB97, - GL_STENCIL_WRITEMASK = 0xB98, - GL_MATRIX_MODE = 0xBA0, - GL_NORMALIZE = 0xBA1, - GL_VIEWPORT = 0xBA2, - GL_MODELVIEW_STACK_DEPTH = 0xBA3, - GL_PROJECTION_STACK_DEPTH = 0xBA4, - GL_TEXTURE_STACK_DEPTH = 0xBA5, - GL_MODELVIEW_MATRIX = 0xBA6, - GL_PROJECTION_MATRIX = 0xBA7, - GL_TEXTURE_MATRIX = 0xBA8, - GL_ATTRIB_STACK_DEPTH = 0xBB0, - GL_CLIENT_ATTRIB_STACK_DEPTH = 0xBB1, - GL_ALPHA_TEST = 0xBC0, - GL_ALPHA_TEST_FUNC = 0xBC1, - GL_ALPHA_TEST_REF = 0xBC2, - GL_DITHER = 0xBD0, - GL_BLEND_DST = 0xBE0, - GL_BLEND_SRC = 0xBE1, - GL_BLEND = 0xBE2, - GL_LOGIC_OP_MODE = 0xBF0, - GL_INDEX_LOGIC_OP = 0xBF1, - GL_LOGIC_OP = 0xBF1, - GL_COLOR_LOGIC_OP = 0xBF2, - GL_AUX_BUFFERS = 0xC00, - GL_DRAW_BUFFER = 0xC01, - GL_READ_BUFFER = 0xC02, - GL_SCISSOR_BOX = 0xC10, - GL_SCISSOR_TEST = 0xC11, - GL_INDEX_CLEAR_VALUE = 0xC20, - GL_INDEX_WRITEMASK = 0xC21, - GL_COLOR_CLEAR_VALUE = 0xC22, - GL_COLOR_WRITEMASK = 0xC23, - GL_INDEX_MODE = 0xC30, - GL_RGBA_MODE = 0xC31, - GL_DOUBLEBUFFER = 0xC32, - GL_STEREO = 0xC33, - GL_RENDER_MODE = 0xC40, - GL_PERSPECTIVE_CORRECTION_HINT = 0xC50, - GL_POINT_SMOOTH_HINT = 0xC51, - GL_LINE_SMOOTH_HINT = 0xC52, - GL_POLYGON_SMOOTH_HINT = 0xC53, - GL_FOG_HINT = 0xC54, - GL_TEXTURE_GEN_S = 0xC60, - GL_TEXTURE_GEN_T = 0xC61, - GL_TEXTURE_GEN_R = 0xC62, - GL_TEXTURE_GEN_Q = 0xC63, - GL_PIXEL_MAP_I_TO_I = 0xC70, - GL_PIXEL_MAP_S_TO_S = 0xC71, - GL_PIXEL_MAP_I_TO_R = 0xC72, - GL_PIXEL_MAP_I_TO_G = 0xC73, - GL_PIXEL_MAP_I_TO_B = 0xC74, - GL_PIXEL_MAP_I_TO_A = 0xC75, - GL_PIXEL_MAP_R_TO_R = 0xC76, - GL_PIXEL_MAP_G_TO_G = 0xC77, - GL_PIXEL_MAP_B_TO_B = 0xC78, - GL_PIXEL_MAP_A_TO_A = 0xC79, - GL_PIXEL_MAP_I_TO_I_SIZE = 0xCB0, - GL_PIXEL_MAP_S_TO_S_SIZE = 0xCB1, - GL_PIXEL_MAP_I_TO_R_SIZE = 0xCB2, - GL_PIXEL_MAP_I_TO_G_SIZE = 0xCB3, - GL_PIXEL_MAP_I_TO_B_SIZE = 0xCB4, - GL_PIXEL_MAP_I_TO_A_SIZE = 0xCB5, - GL_PIXEL_MAP_R_TO_R_SIZE = 0xCB6, - GL_PIXEL_MAP_G_TO_G_SIZE = 0xCB7, - GL_PIXEL_MAP_B_TO_B_SIZE = 0xCB8, - GL_PIXEL_MAP_A_TO_A_SIZE = 0xCB9, - GL_UNPACK_SWAP_BYTES = 0xCF0, - GL_UNPACK_LSB_FIRST = 0xCF1, - GL_UNPACK_ROW_LENGTH = 0xCF2, - GL_UNPACK_SKIP_ROWS = 0xCF3, - GL_UNPACK_SKIP_PIXELS = 0xCF4, - GL_UNPACK_ALIGNMENT = 0xCF5, - GL_PACK_SWAP_BYTES = 0xD00, - GL_PACK_LSB_FIRST = 0xD01, - GL_PACK_ROW_LENGTH = 0xD02, - GL_PACK_SKIP_ROWS = 0xD03, - GL_PACK_SKIP_PIXELS = 0xD04, - GL_PACK_ALIGNMENT = 0xD05, - GL_MAP_COLOR = 0xD10, - GL_MAP_STENCIL = 0xD11, - GL_INDEX_SHIFT = 0xD12, - GL_INDEX_OFFSET = 0xD13, - GL_RED_SCALE = 0xD14, - GL_RED_BIAS = 0xD15, - GL_ZOOM_X = 0xD16, - GL_ZOOM_Y = 0xD17, - GL_GREEN_SCALE = 0xD18, - GL_GREEN_BIAS = 0xD19, - GL_BLUE_SCALE = 0xD1A, - GL_BLUE_BIAS = 0xD1B, - GL_ALPHA_SCALE = 0xD1C, - GL_ALPHA_BIAS = 0xD1D, - GL_DEPTH_SCALE = 0xD1E, - GL_DEPTH_BIAS = 0xD1F, - GL_MAX_EVAL_ORDER = 0xD30, - GL_MAX_LIGHTS = 0xD31, - GL_MAX_CLIP_PLANES = 0xD32, - GL_MAX_TEXTURE_SIZE = 0xD33, - GL_MAX_PIXEL_MAP_TABLE = 0xD34, - GL_MAX_ATTRIB_STACK_DEPTH = 0xD35, - GL_MAX_MODELVIEW_STACK_DEPTH = 0xD36, - GL_MAX_NAME_STACK_DEPTH = 0xD37, - GL_MAX_PROJECTION_STACK_DEPTH = 0xD38, - GL_MAX_TEXTURE_STACK_DEPTH = 0xD39, - GL_MAX_VIEWPORT_DIMS = 0xD3A, - GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0xD3B, - GL_SUBPIXEL_BITS = 0xD50, - GL_INDEX_BITS = 0xD51, - GL_RED_BITS = 0xD52, - GL_GREEN_BITS = 0xD53, - GL_BLUE_BITS = 0xD54, - GL_ALPHA_BITS = 0xD55, - GL_DEPTH_BITS = 0xD56, - GL_STENCIL_BITS = 0xD57, - GL_ACCUM_RED_BITS = 0xD58, - GL_ACCUM_GREEN_BITS = 0xD59, - GL_ACCUM_BLUE_BITS = 0xD5A, - GL_ACCUM_ALPHA_BITS = 0xD5B, - GL_NAME_STACK_DEPTH = 0xD70, - GL_AUTO_NORMAL = 0xD80, - GL_MAP1_COLOR_4 = 0xD90, - GL_MAP1_INDEX = 0xD91, - GL_MAP1_NORMAL = 0xD92, - GL_MAP1_TEXTURE_COORD_1 = 0xD93, - GL_MAP1_TEXTURE_COORD_2 = 0xD94, - GL_MAP1_TEXTURE_COORD_3 = 0xD95, - GL_MAP1_TEXTURE_COORD_4 = 0xD96, - GL_MAP1_VERTEX_3 = 0xD97, - GL_MAP1_VERTEX_4 = 0xD98, - GL_MAP2_COLOR_4 = 0xDB0, - GL_MAP2_INDEX = 0xDB1, - GL_MAP2_NORMAL = 0xDB2, - GL_MAP2_TEXTURE_COORD_1 = 0xDB3, - GL_MAP2_TEXTURE_COORD_2 = 0xDB4, - GL_MAP2_TEXTURE_COORD_3 = 0xDB5, - GL_MAP2_TEXTURE_COORD_4 = 0xDB6, - GL_MAP2_VERTEX_3 = 0xDB7, - GL_MAP2_VERTEX_4 = 0xDB8, - GL_MAP1_GRID_DOMAIN = 0xDD0, - GL_MAP1_GRID_SEGMENTS = 0xDD1, - GL_MAP2_GRID_DOMAIN = 0xDD2, - GL_MAP2_GRID_SEGMENTS = 0xDD3, - GL_TEXTURE_1D = 0xDE0, - GL_TEXTURE_2D = 0xDE1, - GL_FEEDBACK_BUFFER_POINTER = 0xDF0, - GL_FEEDBACK_BUFFER_SIZE = 0xDF1, - GL_FEEDBACK_BUFFER_TYPE = 0xDF2, - GL_SELECTION_BUFFER_POINTER = 0xDF3, - GL_SELECTION_BUFFER_SIZE = 0xDF4; - - /** GetTextureParameter */ - public static final int - GL_TEXTURE_WIDTH = 0x1000, - GL_TEXTURE_HEIGHT = 0x1001, - GL_TEXTURE_INTERNAL_FORMAT = 0x1003, - GL_TEXTURE_COMPONENTS = 0x1003, - GL_TEXTURE_BORDER_COLOR = 0x1004, - GL_TEXTURE_BORDER = 0x1005; - - /** HintMode */ - public static final int - GL_DONT_CARE = 0x1100, - GL_FASTEST = 0x1101, - GL_NICEST = 0x1102; - - /** LightName */ - public static final int - GL_LIGHT0 = 0x4000, - GL_LIGHT1 = 0x4001, - GL_LIGHT2 = 0x4002, - GL_LIGHT3 = 0x4003, - GL_LIGHT4 = 0x4004, - GL_LIGHT5 = 0x4005, - GL_LIGHT6 = 0x4006, - GL_LIGHT7 = 0x4007; - - /** LightParameter */ - public static final int - GL_AMBIENT = 0x1200, - GL_DIFFUSE = 0x1201, - GL_SPECULAR = 0x1202, - GL_POSITION = 0x1203, - GL_SPOT_DIRECTION = 0x1204, - GL_SPOT_EXPONENT = 0x1205, - GL_SPOT_CUTOFF = 0x1206, - GL_CONSTANT_ATTENUATION = 0x1207, - GL_LINEAR_ATTENUATION = 0x1208, - GL_QUADRATIC_ATTENUATION = 0x1209; - - /** ListMode */ - public static final int - GL_COMPILE = 0x1300, - GL_COMPILE_AND_EXECUTE = 0x1301; - - /** LogicOp */ - public static final int - GL_CLEAR = 0x1500, - GL_AND = 0x1501, - GL_AND_REVERSE = 0x1502, - GL_COPY = 0x1503, - GL_AND_INVERTED = 0x1504, - GL_NOOP = 0x1505, - GL_XOR = 0x1506, - GL_OR = 0x1507, - GL_NOR = 0x1508, - GL_EQUIV = 0x1509, - GL_INVERT = 0x150A, - GL_OR_REVERSE = 0x150B, - GL_COPY_INVERTED = 0x150C, - GL_OR_INVERTED = 0x150D, - GL_NAND = 0x150E, - GL_SET = 0x150F; - - /** MaterialParameter */ - public static final int - GL_EMISSION = 0x1600, - GL_SHININESS = 0x1601, - GL_AMBIENT_AND_DIFFUSE = 0x1602, - GL_COLOR_INDEXES = 0x1603; - - /** MatrixMode */ - public static final int - GL_MODELVIEW = 0x1700, - GL_PROJECTION = 0x1701, - GL_TEXTURE = 0x1702; - - /** PixelCopyType */ - public static final int - GL_COLOR = 0x1800, - GL_DEPTH = 0x1801, - GL_STENCIL = 0x1802; - - /** PixelFormat */ - public static final int - GL_COLOR_INDEX = 0x1900, - GL_STENCIL_INDEX = 0x1901, - GL_DEPTH_COMPONENT = 0x1902, - GL_RED = 0x1903, - GL_GREEN = 0x1904, - GL_BLUE = 0x1905, - GL_ALPHA = 0x1906, - GL_RGB = 0x1907, - GL_RGBA = 0x1908, - GL_LUMINANCE = 0x1909, - GL_LUMINANCE_ALPHA = 0x190A; - - /** PixelType */ - public static final int GL_BITMAP = 0x1A00; - - /** PolygonMode */ - public static final int - GL_POINT = 0x1B00, - GL_LINE = 0x1B01, - GL_FILL = 0x1B02; - - /** RenderingMode */ - public static final int - GL_RENDER = 0x1C00, - GL_FEEDBACK = 0x1C01, - GL_SELECT = 0x1C02; - - /** ShadingModel */ - public static final int - GL_FLAT = 0x1D00, - GL_SMOOTH = 0x1D01; - - /** StencilOp */ - public static final int - GL_KEEP = 0x1E00, - GL_REPLACE = 0x1E01, - GL_INCR = 0x1E02, - GL_DECR = 0x1E03; - - /** StringName */ - public static final int - GL_VENDOR = 0x1F00, - GL_RENDERER = 0x1F01, - GL_VERSION = 0x1F02, - GL_EXTENSIONS = 0x1F03; - - /** TextureCoordName */ - public static final int - GL_S = 0x2000, - GL_T = 0x2001, - GL_R = 0x2002, - GL_Q = 0x2003; - - /** TextureEnvMode */ - public static final int - GL_MODULATE = 0x2100, - GL_DECAL = 0x2101; - - /** TextureEnvParameter */ - public static final int - GL_TEXTURE_ENV_MODE = 0x2200, - GL_TEXTURE_ENV_COLOR = 0x2201; - - /** TextureEnvTarget */ - public static final int GL_TEXTURE_ENV = 0x2300; - - /** TextureGenMode */ - public static final int - GL_EYE_LINEAR = 0x2400, - GL_OBJECT_LINEAR = 0x2401, - GL_SPHERE_MAP = 0x2402; - - /** TextureGenParameter */ - public static final int - GL_TEXTURE_GEN_MODE = 0x2500, - GL_OBJECT_PLANE = 0x2501, - GL_EYE_PLANE = 0x2502; - - /** TextureMagFilter */ - public static final int - GL_NEAREST = 0x2600, - GL_LINEAR = 0x2601; - - /** TextureMinFilter */ - public static final int - GL_NEAREST_MIPMAP_NEAREST = 0x2700, - GL_LINEAR_MIPMAP_NEAREST = 0x2701, - GL_NEAREST_MIPMAP_LINEAR = 0x2702, - GL_LINEAR_MIPMAP_LINEAR = 0x2703; - - /** TextureParameterName */ - public static final int - GL_TEXTURE_MAG_FILTER = 0x2800, - GL_TEXTURE_MIN_FILTER = 0x2801, - GL_TEXTURE_WRAP_S = 0x2802, - GL_TEXTURE_WRAP_T = 0x2803; - - /** TextureWrapMode */ - public static final int - GL_CLAMP = 0x2900, - GL_REPEAT = 0x2901; - - /** ClientAttribMask */ - public static final int - GL_CLIENT_PIXEL_STORE_BIT = 0x1, - GL_CLIENT_VERTEX_ARRAY_BIT = 0x2, - GL_CLIENT_ALL_ATTRIB_BITS = 0xFFFFFFFF; - - /** polygon_offset */ - public static final int - GL_POLYGON_OFFSET_FACTOR = 0x8038, - GL_POLYGON_OFFSET_UNITS = 0x2A00, - GL_POLYGON_OFFSET_POINT = 0x2A01, - GL_POLYGON_OFFSET_LINE = 0x2A02, - GL_POLYGON_OFFSET_FILL = 0x8037; - - /** texture */ - public static final int - GL_ALPHA4 = 0x803B, - GL_ALPHA8 = 0x803C, - GL_ALPHA12 = 0x803D, - GL_ALPHA16 = 0x803E, - GL_LUMINANCE4 = 0x803F, - GL_LUMINANCE8 = 0x8040, - GL_LUMINANCE12 = 0x8041, - GL_LUMINANCE16 = 0x8042, - GL_LUMINANCE4_ALPHA4 = 0x8043, - GL_LUMINANCE6_ALPHA2 = 0x8044, - GL_LUMINANCE8_ALPHA8 = 0x8045, - GL_LUMINANCE12_ALPHA4 = 0x8046, - GL_LUMINANCE12_ALPHA12 = 0x8047, - GL_LUMINANCE16_ALPHA16 = 0x8048, - GL_INTENSITY = 0x8049, - GL_INTENSITY4 = 0x804A, - GL_INTENSITY8 = 0x804B, - GL_INTENSITY12 = 0x804C, - GL_INTENSITY16 = 0x804D, - GL_R3_G3_B2 = 0x2A10, - GL_RGB4 = 0x804F, - GL_RGB5 = 0x8050, - GL_RGB8 = 0x8051, - GL_RGB10 = 0x8052, - GL_RGB12 = 0x8053, - GL_RGB16 = 0x8054, - GL_RGBA2 = 0x8055, - GL_RGBA4 = 0x8056, - GL_RGB5_A1 = 0x8057, - GL_RGBA8 = 0x8058, - GL_RGB10_A2 = 0x8059, - GL_RGBA12 = 0x805A, - GL_RGBA16 = 0x805B, - GL_TEXTURE_RED_SIZE = 0x805C, - GL_TEXTURE_GREEN_SIZE = 0x805D, - GL_TEXTURE_BLUE_SIZE = 0x805E, - GL_TEXTURE_ALPHA_SIZE = 0x805F, - GL_TEXTURE_LUMINANCE_SIZE = 0x8060, - GL_TEXTURE_INTENSITY_SIZE = 0x8061, - GL_PROXY_TEXTURE_1D = 0x8063, - GL_PROXY_TEXTURE_2D = 0x8064; - - /** texture_object */ - public static final int - GL_TEXTURE_PRIORITY = 0x8066, - GL_TEXTURE_RESIDENT = 0x8067, - GL_TEXTURE_BINDING_1D = 0x8068, - GL_TEXTURE_BINDING_2D = 0x8069; - - /** vertex_array */ - public static final int - GL_VERTEX_ARRAY = 0x8074, - GL_NORMAL_ARRAY = 0x8075, - GL_COLOR_ARRAY = 0x8076, - GL_INDEX_ARRAY = 0x8077, - GL_TEXTURE_COORD_ARRAY = 0x8078, - GL_EDGE_FLAG_ARRAY = 0x8079, - GL_VERTEX_ARRAY_SIZE = 0x807A, - GL_VERTEX_ARRAY_TYPE = 0x807B, - GL_VERTEX_ARRAY_STRIDE = 0x807C, - GL_NORMAL_ARRAY_TYPE = 0x807E, - GL_NORMAL_ARRAY_STRIDE = 0x807F, - GL_COLOR_ARRAY_SIZE = 0x8081, - GL_COLOR_ARRAY_TYPE = 0x8082, - GL_COLOR_ARRAY_STRIDE = 0x8083, - GL_INDEX_ARRAY_TYPE = 0x8085, - GL_INDEX_ARRAY_STRIDE = 0x8086, - GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088, - GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089, - GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A, - GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C, - GL_VERTEX_ARRAY_POINTER = 0x808E, - GL_NORMAL_ARRAY_POINTER = 0x808F, - GL_COLOR_ARRAY_POINTER = 0x8090, - GL_INDEX_ARRAY_POINTER = 0x8091, - GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092, - GL_EDGE_FLAG_ARRAY_POINTER = 0x8093, - GL_V2F = 0x2A20, - GL_V3F = 0x2A21, - GL_C4UB_V2F = 0x2A22, - GL_C4UB_V3F = 0x2A23, - GL_C3F_V3F = 0x2A24, - GL_N3F_V3F = 0x2A25, - GL_C4F_N3F_V3F = 0x2A26, - GL_T2F_V3F = 0x2A27, - GL_T4F_V4F = 0x2A28, - GL_T2F_C4UB_V3F = 0x2A29, - GL_T2F_C3F_V3F = 0x2A2A, - GL_T2F_N3F_V3F = 0x2A2B, - GL_T2F_C4F_N3F_V3F = 0x2A2C, - GL_T4F_C4F_N3F_V4F = 0x2A2D; - - protected GL11() { - throw new UnsupportedOperationException(); - } - - // --- [ glEnable ] --- - - /** - * Enables the specified OpenGL state. - * - * @param target the OpenGL state to enable - * - * @see Reference Page - */ - public static void glEnable(@NativeType("GLenum") int target) { - GL11C.glEnable(target); - } - - // --- [ glDisable ] --- - - /** - * Disables the specified OpenGL state. - * - * @param target the OpenGL state to disable - * - * @see Reference Page - */ - public static void glDisable(@NativeType("GLenum") int target) { - GL11C.glDisable(target); - } - - // --- [ glAccum ] --- - - /** - * Each portion of a pixel in the accumulation buffer consists of four values: one for each of R, G, B, and A. The accumulation buffer is controlled - * exclusively through the use of this method (except for clearing it). - * - * @param op a symbolic constant indicating an accumulation buffer operation - * @param value a floating-point value to be used in that operation. One of:
    {@link #GL_ACCUM ACCUM}{@link #GL_LOAD LOAD}{@link #GL_RETURN RETURN}{@link #GL_MULT MULT}{@link #GL_ADD ADD}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glAccum(@NativeType("GLenum") int op, @NativeType("GLfloat") float value); - - // --- [ glAlphaFunc ] --- - - /** - * The alpha test discards a fragment conditionally based on the outcome of a comparison between the incoming fragment’s alpha value and a constant value. - * The comparison is enabled or disabled with the generic {@link #glEnable Enable} and {@link #glDisable Disable} commands using the symbolic constant {@link #GL_ALPHA_TEST ALPHA_TEST}. - * When disabled, it is as if the comparison always passes. The test is controlled with this method. - * - * @param func a symbolic constant indicating the alpha test function. One of:
    {@link #GL_NEVER NEVER}{@link #GL_ALWAYS ALWAYS}{@link #GL_LESS LESS}{@link #GL_LEQUAL LEQUAL}{@link #GL_EQUAL EQUAL}{@link #GL_GEQUAL GEQUAL}{@link #GL_GREATER GREATER}{@link #GL_NOTEQUAL NOTEQUAL}
    - * @param ref a reference value clamped to the range [0, 1]. When performing the alpha test, the GL will convert the reference value to the same representation as the fragment's alpha value (floating-point or fixed-point). - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glAlphaFunc(@NativeType("GLenum") int func, @NativeType("GLfloat") float ref); - - // --- [ glAreTexturesResident ] --- - - /** - * Unsafe version of: {@link #glAreTexturesResident AreTexturesResident} - * - * @param n the number of texture objects in {@code textures} - */ - public static native boolean nglAreTexturesResident(int n, long textures, long residences); - - /** - * Returns {@link #GL_TRUE TRUE} if all of the texture objects named in textures are resident, or if the implementation does not distinguish a working set. If - * at least one of the texture objects named in textures is not resident, then {@link #GL_FALSE FALSE} is returned, and the residence of each texture object is - * returned in residences. Otherwise the contents of residences are not changed. - * - * @param textures an array of texture objects - * @param residences returns the residences of each texture object - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("GLboolean") - public static boolean glAreTexturesResident(@NativeType("GLuint const *") IntBuffer textures, @NativeType("GLboolean *") ByteBuffer residences) { - if (CHECKS) { - check(residences, textures.remaining()); - } - return nglAreTexturesResident(textures.remaining(), memAddress(textures), memAddress(residences)); - } - - /** - * Returns {@link #GL_TRUE TRUE} if all of the texture objects named in textures are resident, or if the implementation does not distinguish a working set. If - * at least one of the texture objects named in textures is not resident, then {@link #GL_FALSE FALSE} is returned, and the residence of each texture object is - * returned in residences. Otherwise the contents of residences are not changed. - * - * @param residences returns the residences of each texture object - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("GLboolean") - public static boolean glAreTexturesResident(@NativeType("GLuint const *") int texture, @NativeType("GLboolean *") ByteBuffer residences) { - if (CHECKS) { - check(residences, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer textures = stack.ints(texture); - return nglAreTexturesResident(1, memAddress(textures), memAddress(residences)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glArrayElement ] --- - - /** - * Transfers the ith element of every enabled, non-instanced array, and the first element of every enabled, instanced array to the GL. - * - * @param i the element to transfer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glArrayElement(@NativeType("GLint") int i); - - // --- [ glBegin ] --- - - /** - * Begins the definition of vertex attributes of a sequence of primitives to be transferred to the GL. - * - * @param mode the primitive type being defined. One of:
    {@link #GL_POINTS POINTS}{@link #GL_LINE_STRIP LINE_STRIP}{@link #GL_LINE_LOOP LINE_LOOP}{@link #GL_LINES LINES}{@link #GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link #GL_TRIANGLE_FAN TRIANGLE_FAN}{@link #GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link #GL_POLYGON POLYGON}{@link #GL_QUADS QUADS}
    {@link #GL_QUAD_STRIP QUAD_STRIP}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glBegin(@NativeType("GLenum") int mode); - - // --- [ glBindTexture ] --- - - /** - * Binds the a texture to a texture target. - * - *

    While a texture object is bound, GL operations on the target to which it is bound affect the bound object, and queries of the target to which it is - * bound return state from the bound object. If texture mapping of the dimensionality of the target to which a texture object is bound is enabled, the - * state of the bound texture object directs the texturing operation.

    - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param texture the texture object to bind - * - * @see Reference Page - */ - public static void glBindTexture(@NativeType("GLenum") int target, @NativeType("GLuint") int texture) { - GL11C.glBindTexture(target, texture); - } - - // --- [ glBitmap ] --- - - /** Unsafe version of: {@link #glBitmap Bitmap} */ - public static native void nglBitmap(int w, int h, float xOrig, float yOrig, float xInc, float yInc, long data); - - /** - * Sents a bitmap to the GL. Bitmaps are rectangles of zeros and ones specifying a particular pattern of fragments to be produced. Each of these fragments - * has the same associated data. These data are those associated with the current raster position. - * - * @param w the bitmap width - * @param h the bitmap width - * @param xOrig the bitmap origin x coordinate - * @param yOrig the bitmap origin y coordinate - * @param xInc the x increment added to the raster position - * @param yInc the y increment added to the raster position - * @param data the buffer containing the bitmap data. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glBitmap(@NativeType("GLsizei") int w, @NativeType("GLsizei") int h, @NativeType("GLfloat") float xOrig, @NativeType("GLfloat") float yOrig, @NativeType("GLfloat") float xInc, @NativeType("GLfloat") float yInc, @Nullable @NativeType("GLubyte const *") ByteBuffer data) { - if (CHECKS) { - checkSafe(data, ((w + 7) >> 3) * h); - } - nglBitmap(w, h, xOrig, yOrig, xInc, yInc, memAddressSafe(data)); - } - - /** - * Sents a bitmap to the GL. Bitmaps are rectangles of zeros and ones specifying a particular pattern of fragments to be produced. Each of these fragments - * has the same associated data. These data are those associated with the current raster position. - * - * @param w the bitmap width - * @param h the bitmap width - * @param xOrig the bitmap origin x coordinate - * @param yOrig the bitmap origin y coordinate - * @param xInc the x increment added to the raster position - * @param yInc the y increment added to the raster position - * @param data the buffer containing the bitmap data. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glBitmap(@NativeType("GLsizei") int w, @NativeType("GLsizei") int h, @NativeType("GLfloat") float xOrig, @NativeType("GLfloat") float yOrig, @NativeType("GLfloat") float xInc, @NativeType("GLfloat") float yInc, @NativeType("GLubyte const *") long data) { - nglBitmap(w, h, xOrig, yOrig, xInc, yInc, data); - } - - // --- [ glBlendFunc ] --- - - /** - * Specifies the weighting factors used by the blend equation, for both RGB and alpha functions and for all draw buffers. - * - * @param sfactor the source weighting factor. One of:
    {@link GL11C#GL_ZERO ZERO}{@link GL11C#GL_ONE ONE}{@link GL11C#GL_SRC_COLOR SRC_COLOR}{@link GL11C#GL_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link GL11C#GL_DST_COLOR DST_COLOR}
    {@link GL11C#GL_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}{@link GL11C#GL_SRC_ALPHA SRC_ALPHA}{@link GL11C#GL_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link GL11C#GL_DST_ALPHA DST_ALPHA}{@link GL11C#GL_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}
    {@link GL14#GL_CONSTANT_COLOR CONSTANT_COLOR}{@link GL14#GL_ONE_MINUS_CONSTANT_COLOR ONE_MINUS_CONSTANT_COLOR}{@link GL14#GL_CONSTANT_ALPHA CONSTANT_ALPHA}{@link GL14#GL_ONE_MINUS_CONSTANT_ALPHA ONE_MINUS_CONSTANT_ALPHA}{@link GL11C#GL_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    {@link GL33#GL_SRC1_COLOR SRC1_COLOR}{@link GL33#GL_ONE_MINUS_SRC1_COLOR ONE_MINUS_SRC1_COLOR}{@link GL15#GL_SRC1_ALPHA SRC1_ALPHA}{@link GL33#GL_ONE_MINUS_SRC1_ALPHA ONE_MINUS_SRC1_ALPHA}
    - * @param dfactor the destination weighting factor - * - * @see Reference Page - */ - public static void glBlendFunc(@NativeType("GLenum") int sfactor, @NativeType("GLenum") int dfactor) { - GL11C.glBlendFunc(sfactor, dfactor); - } - - // --- [ glCallList ] --- - - /** - * Executes a display list. Causes the commands saved in the display list to be executed, in order, just as if they were issued without using a display list. - * - * @param list the index of the display list to be called - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glCallList(@NativeType("GLuint") int list); - - // --- [ glCallLists ] --- - - /** - * Unsafe version of: {@link #glCallLists CallLists} - * - * @param n the number of display lists to be called - * @param type the data type of each element in {@code lists}. One of:
    {@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_INT INT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_FLOAT FLOAT}{@link #GL_2_BYTES 2_BYTES}{@link #GL_3_BYTES 3_BYTES}{@link #GL_4_BYTES 4_BYTES}
    - */ - public static native void nglCallLists(int n, int type, long lists); - - /** - * Provides an efficient means for executing a number of display lists. - * - * @param type the data type of each element in {@code lists}. One of:
    {@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_INT INT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_FLOAT FLOAT}{@link #GL_2_BYTES 2_BYTES}{@link #GL_3_BYTES 3_BYTES}{@link #GL_4_BYTES 4_BYTES}
    - * @param lists an array of offsets. Each offset is added to the display list base to obtain the display list number. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glCallLists(@NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer lists) { - nglCallLists(lists.remaining() / GLChecks.typeToBytes(type), type, memAddress(lists)); - } - - /** - * Provides an efficient means for executing a number of display lists. - * - * @param lists an array of offsets. Each offset is added to the display list base to obtain the display list number. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glCallLists(@NativeType("void const *") ByteBuffer lists) { - nglCallLists(lists.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(lists)); - } - - /** - * Provides an efficient means for executing a number of display lists. - * - * @param lists an array of offsets. Each offset is added to the display list base to obtain the display list number. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glCallLists(@NativeType("void const *") ShortBuffer lists) { - nglCallLists(lists.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(lists)); - } - - /** - * Provides an efficient means for executing a number of display lists. - * - * @param lists an array of offsets. Each offset is added to the display list base to obtain the display list number. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glCallLists(@NativeType("void const *") IntBuffer lists) { - nglCallLists(lists.remaining(), GL11.GL_UNSIGNED_INT, memAddress(lists)); - } - - // --- [ glClear ] --- - - /** - * Sets portions of every pixel in a particular buffer to the same value. The value to which each buffer is cleared depends on the setting of the clear - * value for that buffer. - * - * @param mask Zero or the bitwise OR of one or more values indicating which buffers are to be cleared. One or more of:
    {@link GL11C#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11C#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11C#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * - * @see Reference Page - */ - public static void glClear(@NativeType("GLbitfield") int mask) { - GL11C.glClear(mask); - } - - // --- [ glClearAccum ] --- - - /** - * Sets the clear values for the accumulation buffer. These values are clamped to the range [-1,1] when they are specified. - * - * @param red the value to which to clear the R values of the accumulation buffer - * @param green the value to which to clear the G values of the accumulation buffer - * @param blue the value to which to clear the B values of the accumulation buffer - * @param alpha the value to which to clear the A values of the accumulation buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glClearAccum(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha); - - // --- [ glClearColor ] --- - - /** - * Sets the clear value for fixed-point and floating-point color buffers in RGBA mode. The specified components are stored as floating-point values. - * - * @param red the value to which to clear the R channel of the color buffer - * @param green the value to which to clear the G channel of the color buffer - * @param blue the value to which to clear the B channel of the color buffer - * @param alpha the value to which to clear the A channel of the color buffer - * - * @see Reference Page - */ - public static void glClearColor(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha) { - GL11C.glClearColor(red, green, blue, alpha); - } - - // --- [ glClearDepth ] --- - - /** - * Sets the depth value used when clearing the depth buffer. When clearing a fixedpoint depth buffer, {@code depth} is clamped to the range [0,1] and - * converted to fixed-point. No conversion is applied when clearing a floating-point depth buffer. - * - * @param depth the value to which to clear the depth buffer - * - * @see Reference Page - */ - public static void glClearDepth(@NativeType("GLdouble") double depth) { - GL11C.glClearDepth(depth); - } - - // --- [ glClearIndex ] --- - - /** - * sets the clear color index. index is converted to a fixed-point value with unspecified precision to the left of the binary point; the integer part of - * this value is then masked with 2m – 1, where {@code m} is the number of bits in a color index value stored in the - * framebuffer. - * - * @param index the value to which to clear the color buffer in color index mode - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glClearIndex(@NativeType("GLfloat") float index); - - // --- [ glClearStencil ] --- - - /** - * Sets the value to which to clear the stencil buffer. {@code s} is masked to the number of bitplanes in the stencil buffer. - * - * @param s the value to which to clear the stencil buffer - * - * @see Reference Page - */ - public static void glClearStencil(@NativeType("GLint") int s) { - GL11C.glClearStencil(s); - } - - // --- [ glClipPlane ] --- - - /** Unsafe version of: {@link #glClipPlane ClipPlane} */ - public static native void nglClipPlane(int plane, long equation); - - /** - * Specifies a client-defined clip plane. - * - *

    The value of the first argument, {@code plane}, is a symbolic constant, CLIP_PLANEi, where i is an integer between 0 and n – 1, indicating one of - * n client-defined clip planes. {@code equation} is an array of four double-precision floating-point values. These are the coefficients of a plane - * equation in object coordinates: p1, p2, p3, and p4 (in that order).

    - * - * @param plane the clip plane to define - * @param equation the clip plane coefficients - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glClipPlane(@NativeType("GLenum") int plane, @NativeType("GLdouble const *") DoubleBuffer equation) { - if (CHECKS) { - check(equation, 4); - } - nglClipPlane(plane, memAddress(equation)); - } - - // --- [ glColor3b ] --- - - /** - * Sets the R, G, and B components of the current color. The alpha component is set to 1.0. - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3b(@NativeType("GLbyte") byte red, @NativeType("GLbyte") byte green, @NativeType("GLbyte") byte blue); - - // --- [ glColor3s ] --- - - /** - * Short version of {@link #glColor3b Color3b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3s(@NativeType("GLshort") short red, @NativeType("GLshort") short green, @NativeType("GLshort") short blue); - - // --- [ glColor3i ] --- - - /** - * Integer version of {@link #glColor3b Color3b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3i(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue); - - // --- [ glColor3f ] --- - - /** - * Float version of {@link #glColor3b Color3b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue); - - // --- [ glColor3d ] --- - - /** - * Double version of {@link #glColor3b Color3b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3d(@NativeType("GLdouble") double red, @NativeType("GLdouble") double green, @NativeType("GLdouble") double blue); - - // --- [ glColor3ub ] --- - - /** - * Unsigned version of {@link #glColor3b Color3b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3ub(@NativeType("GLubyte") byte red, @NativeType("GLubyte") byte green, @NativeType("GLubyte") byte blue); - - // --- [ glColor3us ] --- - - /** - * Unsigned short version of {@link #glColor3b Color3b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3us(@NativeType("GLushort") short red, @NativeType("GLushort") short green, @NativeType("GLushort") short blue); - - // --- [ glColor3ui ] --- - - /** - * Unsigned int version of {@link #glColor3b Color3b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor3ui(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue); - - // --- [ glColor3bv ] --- - - /** Unsafe version of: {@link #glColor3bv Color3bv} */ - public static native void nglColor3bv(long v); - - /** - * Byte pointer version of {@link #glColor3b Color3b}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3bv(@NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3bv(memAddress(v)); - } - - // --- [ glColor3sv ] --- - - /** Unsafe version of: {@link #glColor3sv Color3sv} */ - public static native void nglColor3sv(long v); - - /** - * Pointer version of {@link #glColor3s Color3s}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3sv(memAddress(v)); - } - - // --- [ glColor3iv ] --- - - /** Unsafe version of: {@link #glColor3iv Color3iv} */ - public static native void nglColor3iv(long v); - - /** - * Pointer version of {@link #glColor3i Color3i}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3iv(memAddress(v)); - } - - // --- [ glColor3fv ] --- - - /** Unsafe version of: {@link #glColor3fv Color3fv} */ - public static native void nglColor3fv(long v); - - /** - * Pointer version of {@link #glColor3f Color3f}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3fv(memAddress(v)); - } - - // --- [ glColor3dv ] --- - - /** Unsafe version of: {@link #glColor3dv Color3dv} */ - public static native void nglColor3dv(long v); - - /** - * Pointer version of {@link #glColor3d Color3d}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3dv(memAddress(v)); - } - - // --- [ glColor3ubv ] --- - - /** Unsafe version of: {@link #glColor3ubv Color3ubv} */ - public static native void nglColor3ubv(long v); - - /** - * Pointer version of {@link #glColor3ub Color3ub}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3ubv(@NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3ubv(memAddress(v)); - } - - // --- [ glColor3usv ] --- - - /** Unsafe version of: {@link #glColor3usv Color3usv} */ - public static native void nglColor3usv(long v); - - /** - * Pointer version of {@link #glColor3us Color3us}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3usv(@NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3usv(memAddress(v)); - } - - // --- [ glColor3uiv ] --- - - /** Unsafe version of: {@link #glColor3uiv Color3uiv} */ - public static native void nglColor3uiv(long v); - - /** - * Pointer version of {@link #glColor3ui Color3ui}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3uiv(@NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3uiv(memAddress(v)); - } - - // --- [ glColor4b ] --- - - /** - * Sets the current color. - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4b(@NativeType("GLbyte") byte red, @NativeType("GLbyte") byte green, @NativeType("GLbyte") byte blue, @NativeType("GLbyte") byte alpha); - - // --- [ glColor4s ] --- - - /** - * Short version of {@link #glColor4b Color4b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4s(@NativeType("GLshort") short red, @NativeType("GLshort") short green, @NativeType("GLshort") short blue, @NativeType("GLshort") short alpha); - - // --- [ glColor4i ] --- - - /** - * Integer version of {@link #glColor4b Color4b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4i(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue, @NativeType("GLint") int alpha); - - // --- [ glColor4f ] --- - - /** - * Float version of {@link #glColor4b Color4b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha); - - // --- [ glColor4d ] --- - - /** - * Double version of {@link #glColor4b Color4b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4d(@NativeType("GLdouble") double red, @NativeType("GLdouble") double green, @NativeType("GLdouble") double blue, @NativeType("GLdouble") double alpha); - - // --- [ glColor4ub ] --- - - /** - * Unsigned version of {@link #glColor4b Color4b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4ub(@NativeType("GLubyte") byte red, @NativeType("GLubyte") byte green, @NativeType("GLubyte") byte blue, @NativeType("GLubyte") byte alpha); - - // --- [ glColor4us ] --- - - /** - * Unsigned short version of {@link #glColor4b Color4b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4us(@NativeType("GLushort") short red, @NativeType("GLushort") short green, @NativeType("GLushort") short blue, @NativeType("GLushort") short alpha); - - // --- [ glColor4ui ] --- - - /** - * Unsigned int version of {@link #glColor4b Color4b} - * - * @param red the red component of the current color - * @param green the green component of the current color - * @param blue the blue component of the current color - * @param alpha the alpha component of the current color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColor4ui(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue, @NativeType("GLint") int alpha); - - // --- [ glColor4bv ] --- - - /** Unsafe version of: {@link #glColor4bv Color4bv} */ - public static native void nglColor4bv(long v); - - /** - * Pointer version of {@link #glColor4b Color4b}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4bv(@NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4bv(memAddress(v)); - } - - // --- [ glColor4sv ] --- - - /** Unsafe version of: {@link #glColor4sv Color4sv} */ - public static native void nglColor4sv(long v); - - /** - * Pointer version of {@link #glColor4s Color4s}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4sv(memAddress(v)); - } - - // --- [ glColor4iv ] --- - - /** Unsafe version of: {@link #glColor4iv Color4iv} */ - public static native void nglColor4iv(long v); - - /** - * Pointer version of {@link #glColor4i Color4i}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4iv(memAddress(v)); - } - - // --- [ glColor4fv ] --- - - /** Unsafe version of: {@link #glColor4fv Color4fv} */ - public static native void nglColor4fv(long v); - - /** - * Pointer version of {@link #glColor4f Color4f}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4fv(memAddress(v)); - } - - // --- [ glColor4dv ] --- - - /** Unsafe version of: {@link #glColor4dv Color4dv} */ - public static native void nglColor4dv(long v); - - /** - * Pointer version of {@link #glColor4d Color4d}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4dv(memAddress(v)); - } - - // --- [ glColor4ubv ] --- - - /** Unsafe version of: {@link #glColor4ubv Color4ubv} */ - public static native void nglColor4ubv(long v); - - /** - * Pointer version of {@link #glColor4ub Color4ub}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4ubv(@NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4ubv(memAddress(v)); - } - - // --- [ glColor4usv ] --- - - /** Unsafe version of: {@link #glColor4usv Color4usv} */ - public static native void nglColor4usv(long v); - - /** - * Pointer version of {@link #glColor4us Color4us}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4usv(@NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4usv(memAddress(v)); - } - - // --- [ glColor4uiv ] --- - - /** Unsafe version of: {@link #glColor4uiv Color4uiv} */ - public static native void nglColor4uiv(long v); - - /** - * Pointer version of {@link #glColor4ui Color4ui}. - * - * @param v the color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4uiv(@NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4uiv(memAddress(v)); - } - - // --- [ glColorMask ] --- - - /** - * Masks the writing of R, G, B and A values to all draw buffers. In the initial state, all color values are enabled for writing for all draw buffers. - * - * @param red whether R values are written or not - * @param green whether G values are written or not - * @param blue whether B values are written or not - * @param alpha whether A values are written or not - * - * @see Reference Page - */ - public static void glColorMask(@NativeType("GLboolean") boolean red, @NativeType("GLboolean") boolean green, @NativeType("GLboolean") boolean blue, @NativeType("GLboolean") boolean alpha) { - GL11C.glColorMask(red, green, blue, alpha); - } - - // --- [ glColorMaterial ] --- - - /** - * It is possible to attach one or more material properties to the current color, so that they continuously track its component values. This behavior is - * enabled and disabled by calling {@link #glEnable Enable} or {@link #glDisable Disable} with the symbolic value {@link #GL_COLOR_MATERIAL COLOR_MATERIAL}. This function controls which - * of these modes is selected. - * - * @param face specifies which material face is affected by the current color. One of:
    {@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param mode specifies which material property or properties track the current color. One of:
    {@link #GL_EMISSION EMISSION}{@link #GL_AMBIENT AMBIENT}{@link #GL_DIFFUSE DIFFUSE}{@link #GL_SPECULAR SPECULAR}{@link #GL_AMBIENT_AND_DIFFUSE AMBIENT_AND_DIFFUSE}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColorMaterial(@NativeType("GLenum") int face, @NativeType("GLenum") int mode); - - // --- [ glColorPointer ] --- - - /** Unsafe version of: {@link #glColorPointer ColorPointer} */ - public static native void nglColorPointer(int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. One of:
    34{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_INT INT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglColorPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. One of:
    34{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_INT INT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglColorPointer(size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. One of:
    34{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_INT INT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglColorPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. One of:
    34{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_INT INT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglColorPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. One of:
    34{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_INT INT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglColorPointer(size, type, stride, memAddress(pointer)); - } - - // --- [ glCopyPixels ] --- - - /** - * Transfers a rectangle of pixel values from one region of the read framebuffer to another in the draw framebuffer - * - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the rectangle width - * @param height the rectangle height - * @param type Indicates the type of values to be transfered. One of:
    {@link #GL_COLOR COLOR}{@link #GL_STENCIL STENCIL}{@link #GL_DEPTH DEPTH}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glCopyPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int type); - - // --- [ glCullFace ] --- - - /** - * Specifies which polygon faces are culled if {@link GL11C#GL_CULL_FACE CULL_FACE} is enabled. Front-facing polygons are rasterized if either culling is disabled or the - * CullFace mode is {@link GL11C#GL_BACK BACK} while back-facing polygons are rasterized only if either culling is disabled or the CullFace mode is - * {@link GL11C#GL_FRONT FRONT}. The initial setting of the CullFace mode is {@link GL11C#GL_BACK BACK}. Initially, culling is disabled. - * - * @param mode the CullFace mode. One of:
    {@link GL11C#GL_FRONT FRONT}{@link GL11C#GL_BACK BACK}{@link GL11C#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * - * @see Reference Page - */ - public static void glCullFace(@NativeType("GLenum") int mode) { - GL11C.glCullFace(mode); - } - - // --- [ glDeleteLists ] --- - - /** - * Deletes a contiguous group of display lists. All information about the display lists is lost, and the indices become unused. Indices to which no display - * list corresponds are ignored. If {@code range} is zero, nothing happens. - * - * @param list the index of the first display list to be deleted - * @param range the number of display lists to be deleted - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glDeleteLists(@NativeType("GLuint") int list, @NativeType("GLsizei") int range); - - // --- [ glDepthFunc ] --- - - /** - * Specifies the comparison that takes place during the depth buffer test (when {@link GL11C#GL_DEPTH_TEST DEPTH_TEST} is enabled). - * - * @param func the depth test comparison. One of:
    {@link GL11C#GL_NEVER NEVER}{@link GL11C#GL_ALWAYS ALWAYS}{@link GL11C#GL_LESS LESS}{@link GL11C#GL_LEQUAL LEQUAL}{@link GL11C#GL_EQUAL EQUAL}{@link GL11C#GL_GREATER GREATER}{@link GL11C#GL_GEQUAL GEQUAL}{@link GL11C#GL_NOTEQUAL NOTEQUAL}
    - * - * @see Reference Page - */ - public static void glDepthFunc(@NativeType("GLenum") int func) { - GL11C.glDepthFunc(func); - } - - // --- [ glDepthMask ] --- - - /** - * Masks the writing of depth values to the depth buffer. In the initial state, the depth buffer is enabled for writing. - * - * @param flag whether depth values are written or not. - * - * @see Reference Page - */ - public static void glDepthMask(@NativeType("GLboolean") boolean flag) { - GL11C.glDepthMask(flag); - } - - // --- [ glDepthRange ] --- - - /** - * Sets the depth range for all viewports to the same values. - * - * @param zNear the near depth range - * @param zFar the far depth range - * - * @see Reference Page - */ - public static void glDepthRange(@NativeType("GLdouble") double zNear, @NativeType("GLdouble") double zFar) { - GL11C.glDepthRange(zNear, zFar); - } - - // --- [ glDisableClientState ] --- - - /** - * Disables a client-side capability. - * - *

    If the {@link NVVertexBufferUnifiedMemory} extension is supported, this function is available even in a core profile context.

    - * - * @param cap the capability to disable. One of:
    {@link #GL_COLOR_ARRAY COLOR_ARRAY}{@link #GL_EDGE_FLAG_ARRAY EDGE_FLAG_ARRAY}{@link GL15#GL_FOG_COORD_ARRAY FOG_COORD_ARRAY}{@link #GL_INDEX_ARRAY INDEX_ARRAY}
    {@link #GL_NORMAL_ARRAY NORMAL_ARRAY}{@link GL14#GL_SECONDARY_COLOR_ARRAY SECONDARY_COLOR_ARRAY}{@link #GL_TEXTURE_COORD_ARRAY TEXTURE_COORD_ARRAY}{@link #GL_VERTEX_ARRAY VERTEX_ARRAY}
    {@link NVVertexBufferUnifiedMemory#GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV VERTEX_ATTRIB_ARRAY_UNIFIED_NV}{@link NVVertexBufferUnifiedMemory#GL_ELEMENT_ARRAY_UNIFIED_NV ELEMENT_ARRAY_UNIFIED_NV}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glDisableClientState(@NativeType("GLenum") int cap); - - // --- [ glDrawArrays ] --- - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices. Elements {@code first} through - * first + count – 1 of each enabled non-instanced array are transferred to the GL. - * - *

    If an array corresponding to an attribute required by a vertex shader is not enabled, then the corresponding element is taken from the current attribute - * state. If an array is enabled, the corresponding current vertex attribute value is unaffected by the execution of this function.

    - * - * @param mode the kind of primitives being constructed - * @param first the first vertex to transfer to the GL - * @param count the number of vertices after {@code first} to transfer to the GL - * - * @see Reference Page - */ - public static void glDrawArrays(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count) { - GL11C.glDrawArrays(mode, first, count); - } - - // --- [ glDrawBuffer ] --- - - /** - * Defines the color buffer to which fragment color zero is written. - * - *

    Acceptable values for {@code buf} depend on whether the GL is using the default framebuffer (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is zero), or - * a framebuffer object (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is non-zero). In the initial state, the GL is bound to the default framebuffer.

    - * - * @param buf the color buffer to draw to. One of:
    {@link GL11C#GL_NONE NONE}{@link GL11C#GL_FRONT_LEFT FRONT_LEFT}{@link GL11C#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11C#GL_BACK_LEFT BACK_LEFT}{@link GL11C#GL_BACK_RIGHT BACK_RIGHT}{@link GL11C#GL_FRONT FRONT}{@link GL11C#GL_BACK BACK}{@link GL11C#GL_LEFT LEFT}
    {@link GL11C#GL_RIGHT RIGHT}{@link GL11C#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glDrawBuffer(@NativeType("GLenum") int buf) { - GL11C.glDrawBuffer(buf); - } - - // --- [ glDrawElements ] --- - - /** - * Unsafe version of: {@link #glDrawElements DrawElements} - * - * @param count the number of vertices to transfer to the GL - * @param type indicates the type of index values in {@code indices}. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElements(int mode, int count, int type, long indices) { - GL11C.nglDrawElements(mode, count, type, indices); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link GL11C#GL_POINTS POINTS}{@link GL11C#GL_LINE_STRIP LINE_STRIP}{@link GL11C#GL_LINE_LOOP LINE_LOOP}{@link GL11C#GL_LINES LINES}{@link GL11C#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11C#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11C#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param count the number of vertices to transfer to the GL - * @param type indicates the type of index values in {@code indices}. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices) { - GL11C.glDrawElements(mode, count, type, indices); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link GL11C#GL_POINTS POINTS}{@link GL11C#GL_LINE_STRIP LINE_STRIP}{@link GL11C#GL_LINE_LOOP LINE_LOOP}{@link GL11C#GL_LINES LINES}{@link GL11C#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11C#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11C#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param type indicates the type of index values in {@code indices}. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices) { - GL11C.glDrawElements(mode, type, indices); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link GL11C#GL_POINTS POINTS}{@link GL11C#GL_LINE_STRIP LINE_STRIP}{@link GL11C#GL_LINE_LOOP LINE_LOOP}{@link GL11C#GL_LINES LINES}{@link GL11C#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11C#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11C#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices) { - GL11C.glDrawElements(mode, indices); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link GL11C#GL_POINTS POINTS}{@link GL11C#GL_LINE_STRIP LINE_STRIP}{@link GL11C#GL_LINE_LOOP LINE_LOOP}{@link GL11C#GL_LINES LINES}{@link GL11C#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11C#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11C#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices) { - GL11C.glDrawElements(mode, indices); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link GL11C#GL_POINTS POINTS}{@link GL11C#GL_LINE_STRIP LINE_STRIP}{@link GL11C#GL_LINE_LOOP LINE_LOOP}{@link GL11C#GL_LINES LINES}{@link GL11C#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11C#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11C#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices) { - GL11C.glDrawElements(mode, indices); - } - - // --- [ glDrawPixels ] --- - - /** Unsafe version of: {@link #glDrawPixels DrawPixels} */ - public static native void nglDrawPixels(int width, int height, int format, int type, long pixels); - - /** - * Draws a pixel rectangle to the active draw buffers. - * - * @param width the pixel rectangle width - * @param height the pixel rectangle height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link #GL_LUMINANCE LUMINANCE}{@link #GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link #GL_BITMAP BITMAP}
    - * @param pixels the pixel data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglDrawPixels(width, height, format, type, memAddress(pixels)); - } - - /** - * Draws a pixel rectangle to the active draw buffers. - * - * @param width the pixel rectangle width - * @param height the pixel rectangle height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link #GL_LUMINANCE LUMINANCE}{@link #GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link #GL_BITMAP BITMAP}
    - * @param pixels the pixel data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglDrawPixels(width, height, format, type, pixels); - } - - /** - * Draws a pixel rectangle to the active draw buffers. - * - * @param width the pixel rectangle width - * @param height the pixel rectangle height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link #GL_LUMINANCE LUMINANCE}{@link #GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link #GL_BITMAP BITMAP}
    - * @param pixels the pixel data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglDrawPixels(width, height, format, type, memAddress(pixels)); - } - - /** - * Draws a pixel rectangle to the active draw buffers. - * - * @param width the pixel rectangle width - * @param height the pixel rectangle height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link #GL_LUMINANCE LUMINANCE}{@link #GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link #GL_BITMAP BITMAP}
    - * @param pixels the pixel data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglDrawPixels(width, height, format, type, memAddress(pixels)); - } - - /** - * Draws a pixel rectangle to the active draw buffers. - * - * @param width the pixel rectangle width - * @param height the pixel rectangle height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link #GL_LUMINANCE LUMINANCE}{@link #GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link #GL_BITMAP BITMAP}
    - * @param pixels the pixel data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglDrawPixels(width, height, format, type, memAddress(pixels)); - } - - // --- [ glEdgeFlag ] --- - - /** - * Each edge of each polygon primitive generated is flagged as either boundary or non-boundary. These classifications are used during polygon - * rasterization; some modes affect the interpretation of polygon boundary edges. By default, all edges are boundary edges, but the flagging of polygons, - * separate triangles, or separate quadrilaterals may be altered by calling this function. - * - *

    When a primitive of type {@link #GL_POLYGON POLYGON}, {@link #GL_TRIANGLES TRIANGLES}, or {@link #GL_QUADS QUADS} is drawn, each vertex transferred begins an edge. If the edge - * flag bit is TRUE, then each specified vertex begins an edge that is flagged as boundary. If the bit is FALSE, then induced edges are flagged as - * non-boundary.

    - * - * @param flag the edge flag bit - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEdgeFlag(@NativeType("GLboolean") boolean flag); - - // --- [ glEdgeFlagv ] --- - - /** Unsafe version of: {@link #glEdgeFlagv EdgeFlagv} */ - public static native void nglEdgeFlagv(long flag); - - /** - * Pointer version of {@link #glEdgeFlag EdgeFlag}. - * - * @param flag the edge flag buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEdgeFlagv(@NativeType("GLboolean const *") ByteBuffer flag) { - if (CHECKS) { - check(flag, 1); - } - nglEdgeFlagv(memAddress(flag)); - } - - // --- [ glEdgeFlagPointer ] --- - - /** Unsafe version of: {@link #glEdgeFlagPointer EdgeFlagPointer} */ - public static native void nglEdgeFlagPointer(int stride, long pointer); - - /** - * Specifies the location and organization of an edge flag array. - * - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the edge flag array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEdgeFlagPointer(@NativeType("GLsizei") int stride, @NativeType("GLboolean const *") ByteBuffer pointer) { - nglEdgeFlagPointer(stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of an edge flag array. - * - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the edge flag array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEdgeFlagPointer(@NativeType("GLsizei") int stride, @NativeType("GLboolean const *") long pointer) { - nglEdgeFlagPointer(stride, pointer); - } - - // --- [ glEnableClientState ] --- - - /** - * Enables a client-side capability. - * - *

    If the {@link NVVertexBufferUnifiedMemory} extension is supported, this function is available even in a core profile context.

    - * - * @param cap the capability to enable. One of:
    {@link #GL_COLOR_ARRAY COLOR_ARRAY}{@link #GL_EDGE_FLAG_ARRAY EDGE_FLAG_ARRAY}{@link GL15#GL_FOG_COORD_ARRAY FOG_COORD_ARRAY}{@link #GL_INDEX_ARRAY INDEX_ARRAY}
    {@link #GL_NORMAL_ARRAY NORMAL_ARRAY}{@link GL14#GL_SECONDARY_COLOR_ARRAY SECONDARY_COLOR_ARRAY}{@link #GL_TEXTURE_COORD_ARRAY TEXTURE_COORD_ARRAY}{@link #GL_VERTEX_ARRAY VERTEX_ARRAY}
    {@link NVVertexBufferUnifiedMemory#GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV VERTEX_ATTRIB_ARRAY_UNIFIED_NV}{@link NVVertexBufferUnifiedMemory#GL_ELEMENT_ARRAY_UNIFIED_NV ELEMENT_ARRAY_UNIFIED_NV}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEnableClientState(@NativeType("GLenum") int cap); - - // --- [ glEnd ] --- - - /** - * Ends the definition of vertex attributes of a sequence of primitives to be transferred to the GL. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEnd(); - - // --- [ glEvalCoord1f ] --- - - /** - * Causes evaluation of the enabled one-dimensional evaluator maps. - * - * @param u the domain coordinate u - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalCoord1f(@NativeType("GLfloat") float u); - - // --- [ glEvalCoord1fv ] --- - - /** Unsafe version of: {@link #glEvalCoord1fv EvalCoord1fv} */ - public static native void nglEvalCoord1fv(long u); - - /** - * Pointer version of {@link #glEvalCoord1f EvalCoord1f}. - * - * @param u the domain coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord1fv(@NativeType("GLfloat const *") FloatBuffer u) { - if (CHECKS) { - check(u, 1); - } - nglEvalCoord1fv(memAddress(u)); - } - - // --- [ glEvalCoord1d ] --- - - /** - * Double version of {@link #glEvalCoord1f EvalCoord1f}. - * - * @param u the domain coordinate u - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalCoord1d(@NativeType("GLdouble") double u); - - // --- [ glEvalCoord1dv ] --- - - /** Unsafe version of: {@link #glEvalCoord1dv EvalCoord1dv} */ - public static native void nglEvalCoord1dv(long u); - - /** - * Pointer version of {@link #glEvalCoord1d EvalCoord1d}. - * - * @param u the domain coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord1dv(@NativeType("GLdouble const *") DoubleBuffer u) { - if (CHECKS) { - check(u, 1); - } - nglEvalCoord1dv(memAddress(u)); - } - - // --- [ glEvalCoord2f ] --- - - /** - * Causes evaluation of the enabled two-dimensional evaluator maps. - * - * @param u the domain coordinate u - * @param v the domain coordinate v - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalCoord2f(@NativeType("GLfloat") float u, @NativeType("GLfloat") float v); - - // --- [ glEvalCoord2fv ] --- - - /** Unsafe version of: {@link #glEvalCoord2fv EvalCoord2fv} */ - public static native void nglEvalCoord2fv(long u); - - /** - * Pointer version of {@link #glEvalCoord2f EvalCoord2f}. - * - * @param u the domain coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord2fv(@NativeType("GLfloat const *") FloatBuffer u) { - if (CHECKS) { - check(u, 2); - } - nglEvalCoord2fv(memAddress(u)); - } - - // --- [ glEvalCoord2d ] --- - - /** - * Double version of {@link #glEvalCoord2f EvalCoord2f}. - * - * @param u the domain coordinate u - * @param v the domain coordinate v - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalCoord2d(@NativeType("GLdouble") double u, @NativeType("GLdouble") double v); - - // --- [ glEvalCoord2dv ] --- - - /** Unsafe version of: {@link #glEvalCoord2dv EvalCoord2dv} */ - public static native void nglEvalCoord2dv(long u); - - /** - * Pointer version of {@link #glEvalCoord2d EvalCoord2d}. - * - * @param u the domain coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord2dv(@NativeType("GLdouble const *") DoubleBuffer u) { - if (CHECKS) { - check(u, 2); - } - nglEvalCoord2dv(memAddress(u)); - } - - // --- [ glEvalMesh1 ] --- - - /** - * Carries out an evaluation on a subset of the one-dimensional map grid. - * - * @param mode the mesh type. One of:
    {@link #GL_POINT POINT}{@link #GL_LINE LINE}
    - * @param i1 the start index - * @param i2 the end index - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalMesh1(@NativeType("GLenum") int mode, @NativeType("GLint") int i1, @NativeType("GLint") int i2); - - // --- [ glEvalMesh2 ] --- - - /** - * Carries out an evaluation on a rectangular subset of the two-dimensional map grid. - * - * @param mode the mesh type. One of:
    {@link #GL_FILL FILL}{@link #GL_LINE LINE}{@link #GL_POINT POINT}
    - * @param i1 the u-dimension start index - * @param i2 the u-dimension end index - * @param j1 the v-dimension start index - * @param j2 the v-dimension end index - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalMesh2(@NativeType("GLenum") int mode, @NativeType("GLint") int i1, @NativeType("GLint") int i2, @NativeType("GLint") int j1, @NativeType("GLint") int j2); - - // --- [ glEvalPoint1 ] --- - - /** - * Carries out an evalutation of a single point on the one-dimensional map grid. - * - * @param i the grid index - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalPoint1(@NativeType("GLint") int i); - - // --- [ glEvalPoint2 ] --- - - /** - * Carries out an evalutation of a single point on the two-dimensional map grid. - * - * @param i the u-dimension grid index - * @param j the v-dimension grid index - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEvalPoint2(@NativeType("GLint") int i, @NativeType("GLint") int j); - - // --- [ glFeedbackBuffer ] --- - - /** - * Unsafe version of: {@link #glFeedbackBuffer FeedbackBuffer} - * - * @param size the maximum number of values that can be written to {@code buffer} - */ - public static native void nglFeedbackBuffer(int size, int type, long buffer); - - /** - * Returns information about primitives when the GL is in feedback mode. - * - * @param type the type of information to feed back for each vertex. One of:
    {@link #GL_2D 2D}{@link #GL_3D 3D}{@link #GL_3D_COLOR 3D_COLOR}{@link #GL_3D_COLOR_TEXTURE 3D_COLOR_TEXTURE}{@link #GL_4D_COLOR_TEXTURE 4D_COLOR_TEXTURE}
    - * @param buffer an array of floating-point values into which feedback information will be placed - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFeedbackBuffer(@NativeType("GLenum") int type, @NativeType("GLfloat *") FloatBuffer buffer) { - nglFeedbackBuffer(buffer.remaining(), type, memAddress(buffer)); - } - - // --- [ glFinish ] --- - - /** - * Forces all previously issued GL commands to complete. {@code Finish} does not return until all effects from such commands on GL client and server - * state and the framebuffer are fully realized. - * - * @see Reference Page - */ - public static void glFinish() { - GL11C.glFinish(); - } - - // --- [ glFlush ] --- - - /** - * Causes all previously issued GL commands to complete in finite time (although such commands may still be executing when {@code Flush} returns). - * - * @see Reference Page - */ - public static void glFlush() { - GL11C.glFlush(); - } - - // --- [ glFogi ] --- - - /** - * Sets the integer value of a fog parameter. - * - * @param pname the fog parameter. One of:
    {@link #GL_FOG_MODE FOG_MODE}{@link GL15#GL_FOG_COORD_SRC FOG_COORD_SRC}
    - * @param param the fog parameter value. One of:
    {@link #GL_EXP EXP}{@link #GL_EXP2 EXP2}{@link #GL_LINEAR LINEAR}{@link GL14#GL_FRAGMENT_DEPTH FRAGMENT_DEPTH}{@link GL15#GL_FOG_COORD FOG_COORD}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glFogi(@NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glFogiv ] --- - - /** Unsafe version of: {@link #glFogiv Fogiv} */ - public static native void nglFogiv(int pname, long params); - - /** - * Pointer version of {@link #glFogi Fogi}. - * - * @param pname the fog parameter. One of:
    {@link #GL_FOG_MODE FOG_MODE}{@link GL15#GL_FOG_COORD_SRC FOG_COORD_SRC}
    - * @param params the fog parameter buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogiv(@NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglFogiv(pname, memAddress(params)); - } - - // --- [ glFogf ] --- - - /** - * Sets the float value of a fog parameter. - * - * @param pname the fog parameter. One of:
    {@link #GL_FOG_DENSITY FOG_DENSITY}{@link #GL_FOG_START FOG_START}{@link #GL_FOG_END FOG_END}
    - * @param param the fog parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glFogf(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glFogfv ] --- - - /** Unsafe version of: {@link #glFogfv Fogfv} */ - public static native void nglFogfv(int pname, long params); - - /** - * Pointer version of {@link #glFogf Fogf}. - * - * @param pname the fog parameter. One of:
    {@link #GL_FOG_DENSITY FOG_DENSITY}{@link #GL_FOG_START FOG_START}{@link #GL_FOG_END FOG_END}
    - * @param params the fog parameter buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglFogfv(pname, memAddress(params)); - } - - // --- [ glFrontFace ] --- - - /** - * The first step of polygon rasterization is to determine if the polygon is back-facing or front-facing. This determination is made based on the sign of - * the (clipped or unclipped) polygon's area computed in window coordinates. The interpretation of the sign of this value is controlled with this function. - * In the initial state, the front face direction is set to {@link GL11C#GL_CCW CCW}. - * - * @param dir the front face direction. One of:
    {@link GL11C#GL_CCW CCW}{@link GL11C#GL_CW CW}
    - * - * @see Reference Page - */ - public static void glFrontFace(@NativeType("GLenum") int dir) { - GL11C.glFrontFace(dir); - } - - // --- [ glGenLists ] --- - - /** - * Returns an integer n such that the indices {@code n,..., n + s - 1} are previously unused (i.e. there are {@code s} previously unused display list - * indices starting at n). {@code GenLists} also has the effect of creating an empty display list for each of the indices {@code n,..., n + s - 1}, so - * that these indices all become used. {@code GenLists} returns zero if there is no group of {@code s} contiguous previously unused display list indices, - * or if {@code s = 0}. - * - * @param s the number of display lists to create - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("GLuint") - public static native int glGenLists(@NativeType("GLsizei") int s); - - // --- [ glGenTextures ] --- - - /** - * Unsafe version of: {@link #glGenTextures GenTextures} - * - * @param n the number of textures to create - */ - public static void nglGenTextures(int n, long textures) { - GL11C.nglGenTextures(n, textures); - } - - /** - * Returns n previously unused texture names in textures. These names are marked as used, for the purposes of GenTextures only, but they acquire texture - * state and a dimensionality only when they are first bound, just as if they were unused. - * - * @param textures a scalar or buffer in which to place the returned texture names - * - * @see Reference Page - */ - public static void glGenTextures(@NativeType("GLuint *") IntBuffer textures) { - GL11C.glGenTextures(textures); - } - - /** - * Returns n previously unused texture names in textures. These names are marked as used, for the purposes of GenTextures only, but they acquire texture - * state and a dimensionality only when they are first bound, just as if they were unused. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenTextures() { - return GL11C.glGenTextures(); - } - - // --- [ glDeleteTextures ] --- - - /** - * Unsafe version of: {@link #glDeleteTextures DeleteTextures} - * - * @param n the number of texture names in the {@code textures} parameter - */ - public static void nglDeleteTextures(int n, long textures) { - GL11C.nglDeleteTextures(n, textures); - } - - /** - * Deletes texture objects. After a texture object is deleted, it has no contents or dimensionality, and its name is again unused. If a texture that is - * currently bound to any of the target bindings of {@link #glBindTexture BindTexture} is deleted, it is as though {@link #glBindTexture BindTexture} had been executed with the - * same target and texture zero. Additionally, special care must be taken when deleting a texture if any of the images of the texture are attached to a - * framebuffer object. - * - *

    Unused names in textures that have been marked as used for the purposes of {@link #glGenTextures GenTextures} are marked as unused again. Unused names in textures are - * silently ignored, as is the name zero.

    - * - * @param textures contains {@code n} names of texture objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteTextures(@NativeType("GLuint const *") IntBuffer textures) { - GL11C.glDeleteTextures(textures); - } - - /** - * Deletes texture objects. After a texture object is deleted, it has no contents or dimensionality, and its name is again unused. If a texture that is - * currently bound to any of the target bindings of {@link #glBindTexture BindTexture} is deleted, it is as though {@link #glBindTexture BindTexture} had been executed with the - * same target and texture zero. Additionally, special care must be taken when deleting a texture if any of the images of the texture are attached to a - * framebuffer object. - * - *

    Unused names in textures that have been marked as used for the purposes of {@link #glGenTextures GenTextures} are marked as unused again. Unused names in textures are - * silently ignored, as is the name zero.

    - * - * @see Reference Page - */ - public static void glDeleteTextures(@NativeType("GLuint const *") int texture) { - GL11C.glDeleteTextures(texture); - } - - // --- [ glGetClipPlane ] --- - - /** Unsafe version of: {@link #glGetClipPlane GetClipPlane} */ - public static native void nglGetClipPlane(int plane, long equation); - - /** - * Returns four double-precision values in {@code equation}; these are the coefficients of the plane equation of plane in eye coordinates (these - * coordinates are those that were computed when the plane was specified). - * - * @param plane the clip plane - * @param equation a buffer in which to place the returned values - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetClipPlane(@NativeType("GLenum") int plane, @NativeType("GLdouble *") DoubleBuffer equation) { - if (CHECKS) { - check(equation, 4); - } - nglGetClipPlane(plane, memAddress(equation)); - } - - // --- [ glGetBooleanv ] --- - - /** Unsafe version of: {@link #glGetBooleanv GetBooleanv} */ - public static void nglGetBooleanv(int pname, long params) { - GL11C.nglGetBooleanv(pname, params); - } - - /** - * Returns the current boolean value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetBooleanv(@NativeType("GLenum") int pname, @NativeType("GLboolean *") ByteBuffer params) { - GL11C.glGetBooleanv(pname, params); - } - - /** - * Returns the current boolean value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static boolean glGetBoolean(@NativeType("GLenum") int pname) { - return GL11C.glGetBoolean(pname); - } - - // --- [ glGetFloatv ] --- - - /** Unsafe version of: {@link #glGetFloatv GetFloatv} */ - public static void nglGetFloatv(int pname, long params) { - GL11C.nglGetFloatv(pname, params); - } - - /** - * Returns the current float value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetFloatv(@NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL11C.glGetFloatv(pname, params); - } - - /** - * Returns the current float value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetFloat(@NativeType("GLenum") int pname) { - return GL11C.glGetFloat(pname); - } - - // --- [ glGetIntegerv ] --- - - /** Unsafe version of: {@link #glGetIntegerv GetIntegerv} */ - public static void nglGetIntegerv(int pname, long params) { - GL11C.nglGetIntegerv(pname, params); - } - - /** - * Returns the current integer value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetIntegerv(@NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL11C.glGetIntegerv(pname, params); - } - - /** - * Returns the current integer value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetInteger(@NativeType("GLenum") int pname) { - return GL11C.glGetInteger(pname); - } - - // --- [ glGetDoublev ] --- - - /** Unsafe version of: {@link #glGetDoublev GetDoublev} */ - public static void nglGetDoublev(int pname, long params) { - GL11C.nglGetDoublev(pname, params); - } - - /** - * Returns the current double value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetDoublev(@NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - GL11C.glGetDoublev(pname, params); - } - - /** - * Returns the current double value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetDouble(@NativeType("GLenum") int pname) { - return GL11C.glGetDouble(pname); - } - - // --- [ glGetError ] --- - - /** - * Returns error information. - * - *

    Each detectable error is assigned a numeric code. When an error is detected, a flag is set and the code is recorded. Further errors, if they occur, do - * not affect this recorded code. When {@code GetError} is called, the code is returned and the flag is cleared, so that a further error will again record - * its code. If a call to {@code GetError} returns {@link GL11C#GL_NO_ERROR NO_ERROR}, then there has been no detectable error since the last call to {@code GetError} (or since - * the GL was initialized).

    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static int glGetError() { - return GL11C.glGetError(); - } - - // --- [ glGetLightiv ] --- - - /** Unsafe version of: {@link #glGetLightiv GetLightiv} */ - public static native void nglGetLightiv(int light, int pname, long data); - - /** - * Returns integer information about light parameter {@code pname} for {@code light} in {@code data}. - * - * @param light the light for which to return information. One of:
    {@link #GL_LIGHT0 LIGHT0}GL_LIGHT[1-7]
    - * @param pname the light parameter to query. One of:
    {@link #GL_AMBIENT AMBIENT}{@link #GL_DIFFUSE DIFFUSE}{@link #GL_SPECULAR SPECULAR}{@link #GL_POSITION POSITION}{@link #GL_CONSTANT_ATTENUATION CONSTANT_ATTENUATION}{@link #GL_LINEAR_ATTENUATION LINEAR_ATTENUATION}
    {@link #GL_QUADRATIC_ATTENUATION QUADRATIC_ATTENUATION}{@link #GL_SPOT_DIRECTION SPOT_DIRECTION}{@link #GL_SPOT_EXPONENT SPOT_EXPONENT}{@link #GL_SPOT_CUTOFF SPOT_CUTOFF}
    - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetLightiv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetLightiv(light, pname, memAddress(data)); - } - - /** - * Returns integer information about light parameter {@code pname} for {@code light} in {@code data}. - * - * @param light the light for which to return information. One of:
    {@link #GL_LIGHT0 LIGHT0}GL_LIGHT[1-7]
    - * @param pname the light parameter to query. One of:
    {@link #GL_AMBIENT AMBIENT}{@link #GL_DIFFUSE DIFFUSE}{@link #GL_SPECULAR SPECULAR}{@link #GL_POSITION POSITION}{@link #GL_CONSTANT_ATTENUATION CONSTANT_ATTENUATION}{@link #GL_LINEAR_ATTENUATION LINEAR_ATTENUATION}
    {@link #GL_QUADRATIC_ATTENUATION QUADRATIC_ATTENUATION}{@link #GL_SPOT_DIRECTION SPOT_DIRECTION}{@link #GL_SPOT_EXPONENT SPOT_EXPONENT}{@link #GL_SPOT_CUTOFF SPOT_CUTOFF}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static int glGetLighti(@NativeType("GLenum") int light, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetLightiv(light, pname, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetLightfv ] --- - - /** Unsafe version of: {@link #glGetLightfv GetLightfv} */ - public static native void nglGetLightfv(int light, int pname, long data); - - /** - * Float version of {@link #glGetLightiv GetLightiv}. - * - * @param light the light for which to return information - * @param pname the light parameter to query - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetLightfv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetLightfv(light, pname, memAddress(data)); - } - - /** - * Float version of {@link #glGetLightiv GetLightiv}. - * - * @param light the light for which to return information - * @param pname the light parameter to query - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static float glGetLightf(@NativeType("GLenum") int light, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer data = stack.callocFloat(1); - nglGetLightfv(light, pname, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMapiv ] --- - - /** Unsafe version of: {@link #glGetMapiv GetMapiv} */ - public static native void nglGetMapiv(int target, int query, long data); - - /** - * Returns integer information about {@code query} for evaluator map {@code target} in {@code data}. - * - * @param target the evaluator target. One of:
    {@link #GL_MAP1_VERTEX_3 MAP1_VERTEX_3}{@link #GL_MAP1_VERTEX_4 MAP1_VERTEX_4}{@link #GL_MAP1_COLOR_4 MAP1_COLOR_4}{@link #GL_MAP1_NORMAL MAP1_NORMAL}{@link #GL_MAP1_TEXTURE_COORD_1 MAP1_TEXTURE_COORD_1}
    {@link #GL_MAP1_TEXTURE_COORD_2 MAP1_TEXTURE_COORD_2}{@link #GL_MAP1_TEXTURE_COORD_3 MAP1_TEXTURE_COORD_3}{@link #GL_MAP1_TEXTURE_COORD_4 MAP1_TEXTURE_COORD_4}{@link #GL_MAP2_VERTEX_3 MAP2_VERTEX_3}{@link #GL_MAP2_VERTEX_4 MAP2_VERTEX_4}
    {@link #GL_MAP2_COLOR_4 MAP2_COLOR_4}{@link #GL_MAP2_NORMAL MAP2_NORMAL}{@link #GL_MAP2_TEXTURE_COORD_1 MAP2_TEXTURE_COORD_1}{@link #GL_MAP2_TEXTURE_COORD_2 MAP2_TEXTURE_COORD_2}{@link #GL_MAP2_TEXTURE_COORD_3 MAP2_TEXTURE_COORD_3}
    {@link #GL_MAP2_TEXTURE_COORD_4 MAP2_TEXTURE_COORD_4}
    - * @param query the information to query. One of:
    {@link #GL_ORDER ORDER}{@link #GL_COEFF COEFF}{@link #GL_DOMAIN DOMAIN}
    - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMapiv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLint *") IntBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetMapiv(target, query, memAddress(data)); - } - - /** - * Returns integer information about {@code query} for evaluator map {@code target} in {@code data}. - * - * @param target the evaluator target. One of:
    {@link #GL_MAP1_VERTEX_3 MAP1_VERTEX_3}{@link #GL_MAP1_VERTEX_4 MAP1_VERTEX_4}{@link #GL_MAP1_COLOR_4 MAP1_COLOR_4}{@link #GL_MAP1_NORMAL MAP1_NORMAL}{@link #GL_MAP1_TEXTURE_COORD_1 MAP1_TEXTURE_COORD_1}
    {@link #GL_MAP1_TEXTURE_COORD_2 MAP1_TEXTURE_COORD_2}{@link #GL_MAP1_TEXTURE_COORD_3 MAP1_TEXTURE_COORD_3}{@link #GL_MAP1_TEXTURE_COORD_4 MAP1_TEXTURE_COORD_4}{@link #GL_MAP2_VERTEX_3 MAP2_VERTEX_3}{@link #GL_MAP2_VERTEX_4 MAP2_VERTEX_4}
    {@link #GL_MAP2_COLOR_4 MAP2_COLOR_4}{@link #GL_MAP2_NORMAL MAP2_NORMAL}{@link #GL_MAP2_TEXTURE_COORD_1 MAP2_TEXTURE_COORD_1}{@link #GL_MAP2_TEXTURE_COORD_2 MAP2_TEXTURE_COORD_2}{@link #GL_MAP2_TEXTURE_COORD_3 MAP2_TEXTURE_COORD_3}
    {@link #GL_MAP2_TEXTURE_COORD_4 MAP2_TEXTURE_COORD_4}
    - * @param query the information to query. One of:
    {@link #GL_ORDER ORDER}{@link #GL_COEFF COEFF}{@link #GL_DOMAIN DOMAIN}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static int glGetMapi(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetMapiv(target, query, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMapfv ] --- - - /** Unsafe version of: {@link #glGetMapfv GetMapfv} */ - public static native void nglGetMapfv(int target, int query, long data); - - /** - * Float version of {@link #glGetMapiv GetMapiv}. - * - * @param target the evaluator map - * @param query the information to query - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMapfv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLfloat *") FloatBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetMapfv(target, query, memAddress(data)); - } - - /** - * Float version of {@link #glGetMapiv GetMapiv}. - * - * @param target the evaluator map - * @param query the information to query - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static float glGetMapf(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer data = stack.callocFloat(1); - nglGetMapfv(target, query, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMapdv ] --- - - /** Unsafe version of: {@link #glGetMapdv GetMapdv} */ - public static native void nglGetMapdv(int target, int query, long data); - - /** - * Double version of {@link #glGetMapiv GetMapiv}. - * - * @param target the evaluator map - * @param query the information to query - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMapdv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLdouble *") DoubleBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetMapdv(target, query, memAddress(data)); - } - - /** - * Double version of {@link #glGetMapiv GetMapiv}. - * - * @param target the evaluator map - * @param query the information to query - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static double glGetMapd(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer data = stack.callocDouble(1); - nglGetMapdv(target, query, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetMaterialiv ] --- - - /** Unsafe version of: {@link #glGetMaterialiv GetMaterialiv} */ - public static native void nglGetMaterialiv(int face, int pname, long data); - - /** - * Returns integer information about material property {@code pname} for {@code face} in {@code data}. - * - * @param face the material face for which to return information. One of:
    {@link #GL_FRONT FRONT}{@link #GL_BACK BACK}
    - * @param pname the information to query. One of:
    {@link #GL_AMBIENT AMBIENT}{@link #GL_DIFFUSE DIFFUSE}{@link #GL_SPECULAR SPECULAR}{@link #GL_EMISSION EMISSION}{@link #GL_SHININESS SHININESS}
    - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMaterialiv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetMaterialiv(face, pname, memAddress(data)); - } - - // --- [ glGetMaterialfv ] --- - - /** Unsafe version of: {@link #glGetMaterialfv GetMaterialfv} */ - public static native void nglGetMaterialfv(int face, int pname, long data); - - /** - * Float version of {@link #glGetMaterialiv GetMaterialiv}. - * - * @param face the material face for which to return information - * @param pname the information to query - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMaterialfv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetMaterialfv(face, pname, memAddress(data)); - } - - // --- [ glGetPixelMapfv ] --- - - /** Unsafe version of: {@link #glGetPixelMapfv GetPixelMapfv} */ - public static native void nglGetPixelMapfv(int map, long data); - - /** - * Returns all float values in the pixel map {@code map} in {@code data}. - * - * @param map the pixel map parameter to query. One of:
    {@link #GL_PIXEL_MAP_I_TO_I PIXEL_MAP_I_TO_I}{@link #GL_PIXEL_MAP_S_TO_S PIXEL_MAP_S_TO_S}{@link #GL_PIXEL_MAP_I_TO_R PIXEL_MAP_I_TO_R}{@link #GL_PIXEL_MAP_I_TO_G PIXEL_MAP_I_TO_G}{@link #GL_PIXEL_MAP_I_TO_B PIXEL_MAP_I_TO_B}
    {@link #GL_PIXEL_MAP_I_TO_A PIXEL_MAP_I_TO_A}{@link #GL_PIXEL_MAP_R_TO_R PIXEL_MAP_R_TO_R}{@link #GL_PIXEL_MAP_G_TO_G PIXEL_MAP_G_TO_G}{@link #GL_PIXEL_MAP_B_TO_B PIXEL_MAP_B_TO_B}{@link #GL_PIXEL_MAP_A_TO_A PIXEL_MAP_A_TO_A}
    - * @param data a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLfloat *") FloatBuffer data) { - if (CHECKS) { - check(data, 32); - } - nglGetPixelMapfv(map, memAddress(data)); - } - - /** - * Returns all float values in the pixel map {@code map} in {@code data}. - * - * @param map the pixel map parameter to query. One of:
    {@link #GL_PIXEL_MAP_I_TO_I PIXEL_MAP_I_TO_I}{@link #GL_PIXEL_MAP_S_TO_S PIXEL_MAP_S_TO_S}{@link #GL_PIXEL_MAP_I_TO_R PIXEL_MAP_I_TO_R}{@link #GL_PIXEL_MAP_I_TO_G PIXEL_MAP_I_TO_G}{@link #GL_PIXEL_MAP_I_TO_B PIXEL_MAP_I_TO_B}
    {@link #GL_PIXEL_MAP_I_TO_A PIXEL_MAP_I_TO_A}{@link #GL_PIXEL_MAP_R_TO_R PIXEL_MAP_R_TO_R}{@link #GL_PIXEL_MAP_G_TO_G PIXEL_MAP_G_TO_G}{@link #GL_PIXEL_MAP_B_TO_B PIXEL_MAP_B_TO_B}{@link #GL_PIXEL_MAP_A_TO_A PIXEL_MAP_A_TO_A}
    - * @param data a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLfloat *") long data) { - nglGetPixelMapfv(map, data); - } - - // --- [ glGetPixelMapusv ] --- - - /** Unsafe version of: {@link #glGetPixelMapusv GetPixelMapusv} */ - public static native void nglGetPixelMapusv(int map, long data); - - /** - * Unsigned short version of {@link #glGetPixelMapfv GetPixelMapfv}. - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLushort *") ShortBuffer data) { - if (CHECKS) { - check(data, 32); - } - nglGetPixelMapusv(map, memAddress(data)); - } - - /** - * Unsigned short version of {@link #glGetPixelMapfv GetPixelMapfv}. - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLushort *") long data) { - nglGetPixelMapusv(map, data); - } - - // --- [ glGetPixelMapuiv ] --- - - /** Unsafe version of: {@link #glGetPixelMapuiv GetPixelMapuiv} */ - public static native void nglGetPixelMapuiv(int map, long data); - - /** - * Unsigned integer version of {@link #glGetPixelMapfv GetPixelMapfv}. - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLuint *") IntBuffer data) { - if (CHECKS) { - check(data, 32); - } - nglGetPixelMapuiv(map, memAddress(data)); - } - - /** - * Unsigned integer version of {@link #glGetPixelMapfv GetPixelMapfv}. - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLuint *") long data) { - nglGetPixelMapuiv(map, data); - } - - // --- [ glGetPointerv ] --- - - /** Unsafe version of: {@link #glGetPointerv GetPointerv} */ - public static void nglGetPointerv(int pname, long params) { - GL11C.nglGetPointerv(pname, params); - } - - /** - * Returns a pointer in the current GL context. - * - * @param pname the pointer to return. One of:
    {@link GL43#GL_DEBUG_CALLBACK_FUNCTION DEBUG_CALLBACK_FUNCTION}{@link GL43#GL_DEBUG_CALLBACK_USER_PARAM DEBUG_CALLBACK_USER_PARAM}
    - * @param params a buffer in which to place the returned pointer - * - * @see Reference Page - */ - public static void glGetPointerv(@NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - GL11C.glGetPointerv(pname, params); - } - - /** - * Returns a pointer in the current GL context. - * - * @param pname the pointer to return. One of:
    {@link GL43#GL_DEBUG_CALLBACK_FUNCTION DEBUG_CALLBACK_FUNCTION}{@link GL43#GL_DEBUG_CALLBACK_USER_PARAM DEBUG_CALLBACK_USER_PARAM}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetPointer(@NativeType("GLenum") int pname) { - return GL11C.glGetPointer(pname); - } - - // --- [ glGetPolygonStipple ] --- - - /** Unsafe version of: {@link #glGetPolygonStipple GetPolygonStipple} */ - public static native void nglGetPolygonStipple(long pattern); - - /** - * Obtains the polygon stipple. - * - * @param pattern a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPolygonStipple(@NativeType("void *") ByteBuffer pattern) { - if (CHECKS) { - check(pattern, 128); - } - nglGetPolygonStipple(memAddress(pattern)); - } - - /** - * Obtains the polygon stipple. - * - * @param pattern a buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPolygonStipple(@NativeType("void *") long pattern) { - nglGetPolygonStipple(pattern); - } - - // --- [ glGetString ] --- - - /** Unsafe version of: {@link #glGetString GetString} */ - public static long nglGetString(int name) { - return GL11C.nglGetString(name); - } - - /** - * Return strings describing properties of the current GL context. - * - * @param name the property to query. One of:
    {@link GL11C#GL_RENDERER RENDERER}{@link GL11C#GL_VENDOR VENDOR}{@link GL11C#GL_EXTENSIONS EXTENSIONS}{@link GL11C#GL_VERSION VERSION}{@link GL20#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("GLubyte const *") - public static String glGetString(@NativeType("GLenum") int name) { - return GL11C.glGetString(name); - } - - // --- [ glGetTexEnviv ] --- - - /** Unsafe version of: {@link #glGetTexEnviv GetTexEnviv} */ - public static native void nglGetTexEnviv(int env, int pname, long data); - - /** - * Returns integer information about {@code pname} for {@code env} in {@code data}. - * - * @param env the texture environment to query. One of:
    {@link GL20#GL_POINT_SPRITE POINT_SPRITE}{@link #GL_TEXTURE_ENV TEXTURE_ENV}{@link GL14#GL_TEXTURE_FILTER_CONTROL TEXTURE_FILTER_CONTROL}
    - * @param pname the parameter to query. One of:
    {@link GL20#GL_COORD_REPLACE COORD_REPLACE}{@link #GL_TEXTURE_ENV_MODE TEXTURE_ENV_MODE}{@link #GL_TEXTURE_ENV_COLOR TEXTURE_ENV_COLOR}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL13#GL_COMBINE_RGB COMBINE_RGB}{@link GL13#GL_COMBINE_ALPHA COMBINE_ALPHA}
    {@link GL15#GL_SRC0_RGB SRC0_RGB}{@link GL15#GL_SRC1_RGB SRC1_RGB}{@link GL15#GL_SRC2_RGB SRC2_RGB}{@link GL15#GL_SRC0_ALPHA SRC0_ALPHA}{@link GL15#GL_SRC1_ALPHA SRC1_ALPHA}{@link GL15#GL_SRC2_ALPHA SRC2_ALPHA}
    {@link GL13#GL_OPERAND0_RGB OPERAND0_RGB}{@link GL13#GL_OPERAND1_RGB OPERAND1_RGB}{@link GL13#GL_OPERAND2_RGB OPERAND2_RGB}{@link GL13#GL_OPERAND0_ALPHA OPERAND0_ALPHA}{@link GL13#GL_OPERAND1_ALPHA OPERAND1_ALPHA}{@link GL13#GL_OPERAND2_ALPHA OPERAND2_ALPHA}
    {@link GL13#GL_RGB_SCALE RGB_SCALE}{@link #GL_ALPHA_SCALE ALPHA_SCALE}
    - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexEnviv(@NativeType("GLenum") int env, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetTexEnviv(env, pname, memAddress(data)); - } - - /** - * Returns integer information about {@code pname} for {@code env} in {@code data}. - * - * @param env the texture environment to query. One of:
    {@link GL20#GL_POINT_SPRITE POINT_SPRITE}{@link #GL_TEXTURE_ENV TEXTURE_ENV}{@link GL14#GL_TEXTURE_FILTER_CONTROL TEXTURE_FILTER_CONTROL}
    - * @param pname the parameter to query. One of:
    {@link GL20#GL_COORD_REPLACE COORD_REPLACE}{@link #GL_TEXTURE_ENV_MODE TEXTURE_ENV_MODE}{@link #GL_TEXTURE_ENV_COLOR TEXTURE_ENV_COLOR}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL13#GL_COMBINE_RGB COMBINE_RGB}{@link GL13#GL_COMBINE_ALPHA COMBINE_ALPHA}
    {@link GL15#GL_SRC0_RGB SRC0_RGB}{@link GL15#GL_SRC1_RGB SRC1_RGB}{@link GL15#GL_SRC2_RGB SRC2_RGB}{@link GL15#GL_SRC0_ALPHA SRC0_ALPHA}{@link GL15#GL_SRC1_ALPHA SRC1_ALPHA}{@link GL15#GL_SRC2_ALPHA SRC2_ALPHA}
    {@link GL13#GL_OPERAND0_RGB OPERAND0_RGB}{@link GL13#GL_OPERAND1_RGB OPERAND1_RGB}{@link GL13#GL_OPERAND2_RGB OPERAND2_RGB}{@link GL13#GL_OPERAND0_ALPHA OPERAND0_ALPHA}{@link GL13#GL_OPERAND1_ALPHA OPERAND1_ALPHA}{@link GL13#GL_OPERAND2_ALPHA OPERAND2_ALPHA}
    {@link GL13#GL_RGB_SCALE RGB_SCALE}{@link #GL_ALPHA_SCALE ALPHA_SCALE}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static int glGetTexEnvi(@NativeType("GLenum") int env, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetTexEnviv(env, pname, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexEnvfv ] --- - - /** Unsafe version of: {@link #glGetTexEnvfv GetTexEnvfv} */ - public static native void nglGetTexEnvfv(int env, int pname, long data); - - /** - * Float version of {@link #glGetTexEnviv GetTexEnviv}. - * - * @param env the texture environment to query - * @param pname the parameter to query - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexEnvfv(@NativeType("GLenum") int env, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetTexEnvfv(env, pname, memAddress(data)); - } - - /** - * Float version of {@link #glGetTexEnviv GetTexEnviv}. - * - * @param env the texture environment to query - * @param pname the parameter to query - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static float glGetTexEnvf(@NativeType("GLenum") int env, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer data = stack.callocFloat(1); - nglGetTexEnvfv(env, pname, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexGeniv ] --- - - /** Unsafe version of: {@link #glGetTexGeniv GetTexGeniv} */ - public static native void nglGetTexGeniv(int coord, int pname, long data); - - /** - * Returns integer information about {@code pname} for {@code coord} in {@code data}. - * - * @param coord the coord to query. One of:
    {@link #GL_S S}{@link #GL_T T}{@link #GL_R R}{@link #GL_Q Q}
    - * @param pname the parameter to query. One of:
    {@link #GL_EYE_PLANE EYE_PLANE}{@link #GL_OBJECT_PLANE OBJECT_PLANE}{@link #GL_TEXTURE_GEN_MODE TEXTURE_GEN_MODE}
    - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexGeniv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetTexGeniv(coord, pname, memAddress(data)); - } - - /** - * Returns integer information about {@code pname} for {@code coord} in {@code data}. - * - * @param coord the coord to query. One of:
    {@link #GL_S S}{@link #GL_T T}{@link #GL_R R}{@link #GL_Q Q}
    - * @param pname the parameter to query. One of:
    {@link #GL_EYE_PLANE EYE_PLANE}{@link #GL_OBJECT_PLANE OBJECT_PLANE}{@link #GL_TEXTURE_GEN_MODE TEXTURE_GEN_MODE}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static int glGetTexGeni(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetTexGeniv(coord, pname, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexGenfv ] --- - - /** Unsafe version of: {@link #glGetTexGenfv GetTexGenfv} */ - public static native void nglGetTexGenfv(int coord, int pname, long data); - - /** - * Float version of {@link #glGetTexGeniv GetTexGeniv}. - * - * @param coord the coord to query - * @param pname the parameter to query - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexGenfv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetTexGenfv(coord, pname, memAddress(data)); - } - - /** - * Float version of {@link #glGetTexGeniv GetTexGeniv}. - * - * @param coord the coord to query - * @param pname the parameter to query - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static float glGetTexGenf(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer data = stack.callocFloat(1); - nglGetTexGenfv(coord, pname, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexGendv ] --- - - /** Unsafe version of: {@link #glGetTexGendv GetTexGendv} */ - public static native void nglGetTexGendv(int coord, int pname, long data); - - /** - * Double version of {@link #glGetTexGeniv GetTexGeniv}. - * - * @param coord the coord to query - * @param pname the parameter to query - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexGendv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer data) { - if (CHECKS) { - check(data, 4); - } - nglGetTexGendv(coord, pname, memAddress(data)); - } - - /** - * Double version of {@link #glGetTexGeniv GetTexGeniv}. - * - * @param coord the coord to query - * @param pname the parameter to query - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("void") - public static double glGetTexGend(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer data = stack.callocDouble(1); - nglGetTexGendv(coord, pname, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexImage ] --- - - /** Unsafe version of: {@link #glGetTexImage GetTexImage} */ - public static void nglGetTexImage(int tex, int level, int format, int type, long pixels) { - GL11C.nglGetTexImage(tex, level, format, type, pixels); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - // --- [ glGetTexLevelParameteriv ] --- - - /** Unsafe version of: {@link #glGetTexLevelParameteriv GetTexLevelParameteriv} */ - public static void nglGetTexLevelParameteriv(int target, int level, int pname, long params) { - GL11C.nglGetTexLevelParameteriv(target, level, pname, params); - } - - /** - * Places integer information about texture image parameter {@code pname} for level-of-detail {@code level} of the specified {@code target} into {@code params}. - * - * @param target the texture image target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11C#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11C#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11C#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11C#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11C#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11C#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11C#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexLevelParameteriv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL11C.glGetTexLevelParameteriv(target, level, pname, params); - } - - /** - * Places integer information about texture image parameter {@code pname} for level-of-detail {@code level} of the specified {@code target} into {@code params}. - * - * @param target the texture image target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11C#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11C#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11C#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11C#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11C#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11C#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11C#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexLevelParameteri(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - return GL11C.glGetTexLevelParameteri(target, level, pname); - } - - // --- [ glGetTexLevelParameterfv ] --- - - /** Unsafe version of: {@link #glGetTexLevelParameterfv GetTexLevelParameterfv} */ - public static void nglGetTexLevelParameterfv(int target, int level, int pname, long params) { - GL11C.nglGetTexLevelParameterfv(target, level, pname, params); - } - - /** - * Float version of {@link #glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param target the texture image target - * @param level the level-of-detail number - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexLevelParameterfv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL11C.glGetTexLevelParameterfv(target, level, pname, params); - } - - /** - * Float version of {@link #glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param target the texture image target - * @param level the level-of-detail number - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTexLevelParameterf(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - return GL11C.glGetTexLevelParameterf(target, level, pname); - } - - // --- [ glGetTexParameteriv ] --- - - /** Unsafe version of: {@link #glGetTexParameteriv GetTexParameteriv} */ - public static void nglGetTexParameteriv(int target, int pname, long params) { - GL11C.nglGetTexParameteriv(target, pname, params); - } - - /** - * Place integer information about texture parameter {@code pname} for the specified {@code target} into {@code params}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11C#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11C#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11C#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11C#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11C#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL11C.glGetTexParameteriv(target, pname, params); - } - - /** - * Place integer information about texture parameter {@code pname} for the specified {@code target} into {@code params}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11C#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11C#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11C#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11C#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11C#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL11C.glGetTexParameteri(target, pname); - } - - // --- [ glGetTexParameterfv ] --- - - /** Unsafe version of: {@link #glGetTexParameterfv GetTexParameterfv} */ - public static void nglGetTexParameterfv(int target, int pname, long params) { - GL11C.nglGetTexParameterfv(target, pname, params); - } - - /** - * Float version of {@link #glGetTexParameteriv GetTexParameteriv}. - * - * @param target the texture target - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL11C.glGetTexParameterfv(target, pname, params); - } - - /** - * Float version of {@link #glGetTexParameteriv GetTexParameteriv}. - * - * @param target the texture target - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTexParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL11C.glGetTexParameterf(target, pname); - } - - // --- [ glHint ] --- - - /** - * Certain aspects of GL behavior, when there is room for variation, may be controlled with this function. The initial value for all hints is - * {@link GL11C#GL_DONT_CARE DONT_CARE}. - * - * @param target the behavior to control. One of:
    {@link GL11C#GL_LINE_SMOOTH_HINT LINE_SMOOTH_HINT}{@link GL11C#GL_POLYGON_SMOOTH_HINT POLYGON_SMOOTH_HINT}{@link GL13#GL_TEXTURE_COMPRESSION_HINT TEXTURE_COMPRESSION_HINT}
    {@link GL20#GL_FRAGMENT_SHADER_DERIVATIVE_HINT FRAGMENT_SHADER_DERIVATIVE_HINT}
    - * @param hint the behavior hint. One of:
    {@link GL11C#GL_FASTEST FASTEST}{@link GL11C#GL_NICEST NICEST}{@link GL11C#GL_DONT_CARE DONT_CARE}
    - * - * @see Reference Page - */ - public static void glHint(@NativeType("GLenum") int target, @NativeType("GLenum") int hint) { - GL11C.glHint(target, hint); - } - - // --- [ glIndexi ] --- - - /** - * Updates the current (single-valued) color index. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glIndexi(@NativeType("GLint") int index); - - // --- [ glIndexub ] --- - - /** - * Unsigned byte version of {@link #glIndexi Indexi}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glIndexub(@NativeType("GLubyte") byte index); - - // --- [ glIndexs ] --- - - /** - * Short version of {@link #glIndexi Indexi}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glIndexs(@NativeType("GLshort") short index); - - // --- [ glIndexf ] --- - - /** - * Float version of {@link #glIndexi Indexi}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glIndexf(@NativeType("GLfloat") float index); - - // --- [ glIndexd ] --- - - /** - * Double version of {@link #glIndexi Indexi}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glIndexd(@NativeType("GLdouble") double index); - - // --- [ glIndexiv ] --- - - /** Unsafe version of: {@link #glIndexiv Indexiv} */ - public static native void nglIndexiv(long index); - - /** - * Pointer version of {@link #glIndexi Indexi} - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexiv(@NativeType("GLint const *") IntBuffer index) { - if (CHECKS) { - check(index, 1); - } - nglIndexiv(memAddress(index)); - } - - // --- [ glIndexubv ] --- - - /** Unsafe version of: {@link #glIndexubv Indexubv} */ - public static native void nglIndexubv(long index); - - /** - * Pointer version of {@link #glIndexub Indexub}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexubv(@NativeType("GLubyte const *") ByteBuffer index) { - if (CHECKS) { - check(index, 1); - } - nglIndexubv(memAddress(index)); - } - - // --- [ glIndexsv ] --- - - /** Unsafe version of: {@link #glIndexsv Indexsv} */ - public static native void nglIndexsv(long index); - - /** - * Pointer version of {@link #glIndexs Indexs}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexsv(@NativeType("GLshort const *") ShortBuffer index) { - if (CHECKS) { - check(index, 1); - } - nglIndexsv(memAddress(index)); - } - - // --- [ glIndexfv ] --- - - /** Unsafe version of: {@link #glIndexfv Indexfv} */ - public static native void nglIndexfv(long index); - - /** - * Pointer version of {@link #glIndexf Indexf}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexfv(@NativeType("GLfloat const *") FloatBuffer index) { - if (CHECKS) { - check(index, 1); - } - nglIndexfv(memAddress(index)); - } - - // --- [ glIndexdv ] --- - - /** Unsafe version of: {@link #glIndexdv Indexdv} */ - public static native void nglIndexdv(long index); - - /** - * Pointer version of {@link #glIndexd Indexd}. - * - * @param index the value to which the current color index should be set - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexdv(@NativeType("GLdouble const *") DoubleBuffer index) { - if (CHECKS) { - check(index, 1); - } - nglIndexdv(memAddress(index)); - } - - // --- [ glIndexMask ] --- - - /** - * The least significant n bits of mask, where n is the number of bits in a color index buffer, specify a mask. Where a 1 appears in this mask, the - * corresponding bit in the color index buffer (or buffers) is written; where a 0 appears, the bit is not written. This mask applies only in color index - * mode. - * - * @param mask the color index mask value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glIndexMask(@NativeType("GLuint") int mask); - - // --- [ glIndexPointer ] --- - - /** - * Unsafe version of: {@link #glIndexPointer IndexPointer} - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}
    - */ - public static native void nglIndexPointer(int type, int stride, long pointer); - - /** - * Specifies the location and organization of a color index array. - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color index array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglIndexPointer(type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a color index array. - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color index array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglIndexPointer(type, stride, pointer); - } - - /** - * Specifies the location and organization of a color index array. - * - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color index array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexPointer(@NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglIndexPointer(GL11.GL_UNSIGNED_BYTE, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a color index array. - * - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color index array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexPointer(@NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglIndexPointer(GL11.GL_SHORT, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a color index array. - * - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the color index array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexPointer(@NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglIndexPointer(GL11.GL_INT, stride, memAddress(pointer)); - } - - // --- [ glInitNames ] --- - - /** - * Clears the selection name stack. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glInitNames(); - - // --- [ glInterleavedArrays ] --- - - /** Unsafe version of: {@link #glInterleavedArrays InterleavedArrays} */ - public static native void nglInterleavedArrays(int format, int stride, long pointer); - - /** - * Efficiently initializes the six vertex arrays and their enables to one of 14 configurations. - * - * @param format the interleaved array format. One of:
    {@link #GL_V2F V2F}{@link #GL_V3F V3F}{@link #GL_C4UB_V2F C4UB_V2F}{@link #GL_C4UB_V3F C4UB_V3F}{@link #GL_C3F_V3F C3F_V3F}{@link #GL_N3F_V3F N3F_V3F}{@link #GL_C4F_N3F_V3F C4F_N3F_V3F}{@link #GL_T2F_V3F T2F_V3F}
    {@link #GL_T4F_V4F T4F_V4F}{@link #GL_T2F_C4UB_V3F T2F_C4UB_V3F}{@link #GL_T2F_C3F_V3F T2F_C3F_V3F}{@link #GL_T2F_N3F_V3F T2F_N3F_V3F}{@link #GL_T2F_C4F_N3F_V3F T2F_C4F_N3F_V3F}{@link #GL_T4F_C4F_N3F_V4F T4F_C4F_N3F_V4F}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglInterleavedArrays(format, stride, memAddress(pointer)); - } - - /** - * Efficiently initializes the six vertex arrays and their enables to one of 14 configurations. - * - * @param format the interleaved array format. One of:
    {@link #GL_V2F V2F}{@link #GL_V3F V3F}{@link #GL_C4UB_V2F C4UB_V2F}{@link #GL_C4UB_V3F C4UB_V3F}{@link #GL_C3F_V3F C3F_V3F}{@link #GL_N3F_V3F N3F_V3F}{@link #GL_C4F_N3F_V3F C4F_N3F_V3F}{@link #GL_T2F_V3F T2F_V3F}
    {@link #GL_T4F_V4F T4F_V4F}{@link #GL_T2F_C4UB_V3F T2F_C4UB_V3F}{@link #GL_T2F_C3F_V3F T2F_C3F_V3F}{@link #GL_T2F_N3F_V3F T2F_N3F_V3F}{@link #GL_T2F_C4F_N3F_V3F T2F_C4F_N3F_V3F}{@link #GL_T4F_C4F_N3F_V4F T4F_C4F_N3F_V4F}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglInterleavedArrays(format, stride, pointer); - } - - /** - * Efficiently initializes the six vertex arrays and their enables to one of 14 configurations. - * - * @param format the interleaved array format. One of:
    {@link #GL_V2F V2F}{@link #GL_V3F V3F}{@link #GL_C4UB_V2F C4UB_V2F}{@link #GL_C4UB_V3F C4UB_V3F}{@link #GL_C3F_V3F C3F_V3F}{@link #GL_N3F_V3F N3F_V3F}{@link #GL_C4F_N3F_V3F C4F_N3F_V3F}{@link #GL_T2F_V3F T2F_V3F}
    {@link #GL_T4F_V4F T4F_V4F}{@link #GL_T2F_C4UB_V3F T2F_C4UB_V3F}{@link #GL_T2F_C3F_V3F T2F_C3F_V3F}{@link #GL_T2F_N3F_V3F T2F_N3F_V3F}{@link #GL_T2F_C4F_N3F_V3F T2F_C4F_N3F_V3F}{@link #GL_T4F_C4F_N3F_V4F T4F_C4F_N3F_V4F}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglInterleavedArrays(format, stride, memAddress(pointer)); - } - - /** - * Efficiently initializes the six vertex arrays and their enables to one of 14 configurations. - * - * @param format the interleaved array format. One of:
    {@link #GL_V2F V2F}{@link #GL_V3F V3F}{@link #GL_C4UB_V2F C4UB_V2F}{@link #GL_C4UB_V3F C4UB_V3F}{@link #GL_C3F_V3F C3F_V3F}{@link #GL_N3F_V3F N3F_V3F}{@link #GL_C4F_N3F_V3F C4F_N3F_V3F}{@link #GL_T2F_V3F T2F_V3F}
    {@link #GL_T4F_V4F T4F_V4F}{@link #GL_T2F_C4UB_V3F T2F_C4UB_V3F}{@link #GL_T2F_C3F_V3F T2F_C3F_V3F}{@link #GL_T2F_N3F_V3F T2F_N3F_V3F}{@link #GL_T2F_C4F_N3F_V3F T2F_C4F_N3F_V3F}{@link #GL_T4F_C4F_N3F_V4F T4F_C4F_N3F_V4F}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglInterleavedArrays(format, stride, memAddress(pointer)); - } - - /** - * Efficiently initializes the six vertex arrays and their enables to one of 14 configurations. - * - * @param format the interleaved array format. One of:
    {@link #GL_V2F V2F}{@link #GL_V3F V3F}{@link #GL_C4UB_V2F C4UB_V2F}{@link #GL_C4UB_V3F C4UB_V3F}{@link #GL_C3F_V3F C3F_V3F}{@link #GL_N3F_V3F N3F_V3F}{@link #GL_C4F_N3F_V3F C4F_N3F_V3F}{@link #GL_T2F_V3F T2F_V3F}
    {@link #GL_T4F_V4F T4F_V4F}{@link #GL_T2F_C4UB_V3F T2F_C4UB_V3F}{@link #GL_T2F_C3F_V3F T2F_C3F_V3F}{@link #GL_T2F_N3F_V3F T2F_N3F_V3F}{@link #GL_T2F_C4F_N3F_V3F T2F_C4F_N3F_V3F}{@link #GL_T4F_C4F_N3F_V4F T4F_C4F_N3F_V4F}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglInterleavedArrays(format, stride, memAddress(pointer)); - } - - /** - * Efficiently initializes the six vertex arrays and their enables to one of 14 configurations. - * - * @param format the interleaved array format. One of:
    {@link #GL_V2F V2F}{@link #GL_V3F V3F}{@link #GL_C4UB_V2F C4UB_V2F}{@link #GL_C4UB_V3F C4UB_V3F}{@link #GL_C3F_V3F C3F_V3F}{@link #GL_N3F_V3F N3F_V3F}{@link #GL_C4F_N3F_V3F C4F_N3F_V3F}{@link #GL_T2F_V3F T2F_V3F}
    {@link #GL_T4F_V4F T4F_V4F}{@link #GL_T2F_C4UB_V3F T2F_C4UB_V3F}{@link #GL_T2F_C3F_V3F T2F_C3F_V3F}{@link #GL_T2F_N3F_V3F T2F_N3F_V3F}{@link #GL_T2F_C4F_N3F_V3F T2F_C4F_N3F_V3F}{@link #GL_T4F_C4F_N3F_V4F T4F_C4F_N3F_V4F}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") DoubleBuffer pointer) { - nglInterleavedArrays(format, stride, memAddress(pointer)); - } - - // --- [ glIsEnabled ] --- - - /** - * Determines if {@code cap} is currently enabled (as with {@link #glEnable Enable}) or disabled. - * - * @param cap the enable state to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsEnabled(@NativeType("GLenum") int cap) { - return GL11C.glIsEnabled(cap); - } - - // --- [ glIsList ] --- - - /** - * Returns true if the {@code list} is the index of some display list. - * - * @param list the list index to query - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("GLboolean") - public static native boolean glIsList(@NativeType("GLuint") int list); - - // --- [ glIsTexture ] --- - - /** - * Returns true if {@code texture} is the name of a texture object. - * - * @param texture the texture name to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsTexture(@NativeType("GLuint") int texture) { - return GL11C.glIsTexture(texture); - } - - // --- [ glLightModeli ] --- - - /** - * Set the integer value of a lighting model parameter. - * - * @param pname the lighting model parameter to set. One of:
    {@link #GL_LIGHT_MODEL_AMBIENT LIGHT_MODEL_AMBIENT}{@link #GL_LIGHT_MODEL_LOCAL_VIEWER LIGHT_MODEL_LOCAL_VIEWER}{@link #GL_LIGHT_MODEL_TWO_SIDE LIGHT_MODEL_TWO_SIDE}
    {@link GL12#GL_LIGHT_MODEL_COLOR_CONTROL LIGHT_MODEL_COLOR_CONTROL}
    - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glLightModeli(@NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glLightModelf ] --- - - /** - * Float version of {@link #glLightModeli LightModeli}. - * - * @param pname the lighting model parameter to set - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glLightModelf(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glLightModeliv ] --- - - /** Unsafe version of: {@link #glLightModeliv LightModeliv} */ - public static native void nglLightModeliv(int pname, long params); - - /** - * Pointer version of {@link #glLightModeli LightModeli}. - * - * @param pname the lighting model parameter to set - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightModeliv(@NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglLightModeliv(pname, memAddress(params)); - } - - // --- [ glLightModelfv ] --- - - /** Unsafe version of: {@link #glLightModelfv LightModelfv} */ - public static native void nglLightModelfv(int pname, long params); - - /** - * Pointer version of {@link #glLightModelf LightModelf}. - * - * @param pname the lighting model parameter to set - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightModelfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglLightModelfv(pname, memAddress(params)); - } - - // --- [ glLighti ] --- - - /** - * Sets the integer value of a light parameter. - * - * @param light the light for which to set the parameter. One of:
    {@link #GL_LIGHT0 LIGHT0}GL_LIGHT[1-7]
    - * @param pname the parameter to set. One of:
    {@link #GL_AMBIENT AMBIENT}{@link #GL_DIFFUSE DIFFUSE}{@link #GL_SPECULAR SPECULAR}{@link #GL_POSITION POSITION}{@link #GL_CONSTANT_ATTENUATION CONSTANT_ATTENUATION}{@link #GL_LINEAR_ATTENUATION LINEAR_ATTENUATION}
    {@link #GL_QUADRATIC_ATTENUATION QUADRATIC_ATTENUATION}{@link #GL_SPOT_DIRECTION SPOT_DIRECTION}{@link #GL_SPOT_EXPONENT SPOT_EXPONENT}{@link #GL_SPOT_CUTOFF SPOT_CUTOFF}
    - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glLighti(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glLightf ] --- - - /** - * Float version of {@link #glLighti Lighti}. - * - * @param light the light for which to set the parameter - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glLightf(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glLightiv ] --- - - /** Unsafe version of: {@link #glLightiv Lightiv} */ - public static native void nglLightiv(int light, int pname, long params); - - /** - * Pointer version of {@link #glLighti Lighti}. - * - * @param light the light for which to set the parameter - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightiv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglLightiv(light, pname, memAddress(params)); - } - - // --- [ glLightfv ] --- - - /** Unsafe version of: {@link #glLightfv Lightfv} */ - public static native void nglLightfv(int light, int pname, long params); - - /** - * Pointer version of {@link #glLightf Lightf}. - * - * @param light the light for which to set the parameter - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightfv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglLightfv(light, pname, memAddress(params)); - } - - // --- [ glLineStipple ] --- - - /** - * Defines a line stipple. It determines those fragments that are to be drawn when the line is rasterized. Line stippling may be enabled or disabled using - * {@link #glEnable Enable} or {@link #glDisable Disable} with the constant {@link #GL_LINE_STIPPLE LINE_STIPPLE}. When disabled, it is as if the line stipple has its default value. - * - * @param factor a count that is used to modify the effective line stipple by causing each bit in pattern to be used {@code factor} times. {@code factor} is clamped - * to the range [1, 256]. - * @param pattern an unsigned short integer whose 16 bits define the stipple pattern - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glLineStipple(@NativeType("GLint") int factor, @NativeType("GLushort") short pattern); - - // --- [ glLineWidth ] --- - - /** - * Sets the width of rasterized line segments. The default width is 1.0. - * - * @param width the line width - * - * @see Reference Page - */ - public static void glLineWidth(@NativeType("GLfloat") float width) { - GL11C.glLineWidth(width); - } - - // --- [ glListBase ] --- - - /** - * Sets the display list base. - * - * @param base the display list base offset - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glListBase(@NativeType("GLuint") int base); - - // --- [ glLoadMatrixf ] --- - - /** Unsafe version of: {@link #glLoadMatrixf LoadMatrixf} */ - public static native void nglLoadMatrixf(long m); - - /** - * Sets the current matrix to a 4 × 4 matrix in column-major order. - * - *

    The matrix is stored as 16 consecutive values, i.e. as:

    - * - * - * - * - * - * - *
    a1a5a9a13
    a2a6a10a14
    a3a7a11a15
    a4a8a12a16
    - * - *

    This differs from the standard row-major ordering for matrix elements. If the standard ordering is used, all of the subsequent transformation equations - * are transposed, and the columns representing vectors become rows.

    - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadMatrixf(@NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglLoadMatrixf(memAddress(m)); - } - - // --- [ glLoadMatrixd ] --- - - /** Unsafe version of: {@link #glLoadMatrixd LoadMatrixd} */ - public static native void nglLoadMatrixd(long m); - - /** - * Double version of {@link #glLoadMatrixf LoadMatrixf}. - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadMatrixd(@NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglLoadMatrixd(memAddress(m)); - } - - // --- [ glLoadIdentity ] --- - - /** - * Sets the current matrix to the identity matrix. - * - *

    Calling this function is equivalent to calling {@link #glLoadMatrixf LoadMatrixf} with the following matrix:

    - * - * - * - * - * - * - *
    1000
    0100
    0010
    0001
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glLoadIdentity(); - - // --- [ glLoadName ] --- - - /** - * Replaces the value on the top of the selection stack with {@code name}. - * - * @param name the name to load - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glLoadName(@NativeType("GLuint") int name); - - // --- [ glLogicOp ] --- - - /** - * Sets the logical framebuffer operation. - * - * @param op the operation to set. One of:
    {@link GL11C#GL_CLEAR CLEAR}{@link GL11C#GL_AND AND}{@link GL11C#GL_AND_REVERSE AND_REVERSE}{@link GL11C#GL_COPY COPY}{@link GL11C#GL_AND_INVERTED AND_INVERTED}{@link GL11C#GL_NOOP NOOP}{@link GL11C#GL_XOR XOR}{@link GL11C#GL_OR OR}{@link GL11C#GL_NOR NOR}{@link GL11C#GL_EQUIV EQUIV}{@link GL11C#GL_INVERT INVERT}{@link GL11C#GL_OR_REVERSE OR_REVERSE}{@link GL11C#GL_COPY_INVERTED COPY_INVERTED}
    {@link GL11C#GL_OR_INVERTED OR_INVERTED}{@link GL11C#GL_NAND NAND}{@link GL11C#GL_SET SET}
    - * - * @see Reference Page - */ - public static void glLogicOp(@NativeType("GLenum") int op) { - GL11C.glLogicOp(op); - } - - // --- [ glMap1f ] --- - - /** Unsafe version of: {@link #glMap1f Map1f} */ - public static native void nglMap1f(int target, float u1, float u2, int stride, int order, long points); - - /** - * Defines a polynomial or rational polynomial mapping to produce vertex, normal, texture coordinates and colors. The values so produced are sent on to - * further stages of the GL as if they had been provided directly by the client. - * - * @param target the evaluator target. One of:
    {@link #GL_MAP1_VERTEX_3 MAP1_VERTEX_3}{@link #GL_MAP1_VERTEX_4 MAP1_VERTEX_4}{@link #GL_MAP1_COLOR_4 MAP1_COLOR_4}{@link #GL_MAP1_NORMAL MAP1_NORMAL}{@link #GL_MAP1_TEXTURE_COORD_1 MAP1_TEXTURE_COORD_1}
    {@link #GL_MAP1_TEXTURE_COORD_2 MAP1_TEXTURE_COORD_2}{@link #GL_MAP1_TEXTURE_COORD_3 MAP1_TEXTURE_COORD_3}{@link #GL_MAP1_TEXTURE_COORD_4 MAP1_TEXTURE_COORD_4}
    - * @param u1 the first endpoint of the pre-image of the map - * @param u2 the second endpoint of the pre-image of the map - * @param stride the number of values in each block of storage - * @param order the polynomial order - * @param points a set of {@code order} blocks of storage containing control points - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap1f(@NativeType("GLenum") int target, @NativeType("GLfloat") float u1, @NativeType("GLfloat") float u2, @NativeType("GLint") int stride, @NativeType("GLint") int order, @NativeType("GLfloat const *") FloatBuffer points) { - if (CHECKS) { - check(points, order * stride); - } - nglMap1f(target, u1, u2, stride, order, memAddress(points)); - } - - // --- [ glMap1d ] --- - - /** Unsafe version of: {@link #glMap1d Map1d} */ - public static native void nglMap1d(int target, double u1, double u2, int stride, int order, long points); - - /** - * Double version of {@link #glMap1f Map1f}. - * - * @param target the evaluator target - * @param u1 the first endpoint of the pre-image of the map - * @param u2 the second endpoint of the pre-image of the map - * @param stride the number of values in each block of storage - * @param order the polynomial order - * @param points a set of {@code order} blocks of storage containing control points - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap1d(@NativeType("GLenum") int target, @NativeType("GLdouble") double u1, @NativeType("GLdouble") double u2, @NativeType("GLint") int stride, @NativeType("GLint") int order, @NativeType("GLdouble const *") DoubleBuffer points) { - if (CHECKS) { - check(points, stride * order); - } - nglMap1d(target, u1, u2, stride, order, memAddress(points)); - } - - // --- [ glMap2f ] --- - - /** Unsafe version of: {@link #glMap2f Map2f} */ - public static native void nglMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, long points); - - /** - * Bivariate version of {@link #glMap1f Map1f}. - * - * @param target the evaluator target - * @param u1 the first u-dimension endpoint of the pre-image rectangle of the map - * @param u2 the second u-dimension endpoint of the pre-image rectangle of the map - * @param ustride the number of values in the u-dimension in each block of storage - * @param uorder the polynomial order in the u-dimension - * @param v1 the first v-dimension endpoint of the pre-image rectangle of the map - * @param v2 the second v-dimension endpoint of the pre-image rectangle of the map - * @param vstride the number of values in the v-dimension in each block of storage - * @param vorder the polynomial order in the v-dimension - * @param points a set of uorder × vorder blocks of storage containing control points - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap2f(@NativeType("GLenum") int target, @NativeType("GLfloat") float u1, @NativeType("GLfloat") float u2, @NativeType("GLint") int ustride, @NativeType("GLint") int uorder, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLint") int vstride, @NativeType("GLint") int vorder, @NativeType("GLfloat const *") FloatBuffer points) { - if (CHECKS) { - check(points, ustride * uorder * vstride * vorder); - } - nglMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, memAddress(points)); - } - - // --- [ glMap2d ] --- - - /** Unsafe version of: {@link #glMap2d Map2d} */ - public static native void nglMap2d(int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, long points); - - /** - * Double version of {@link #glMap2f Map2f}. - * - * @param target the evaluator target - * @param u1 the first u-dimension endpoint of the pre-image rectangle of the map - * @param u2 the second u-dimension endpoint of the pre-image rectangle of the map - * @param ustride the number of values in the u-dimension in each block of storage - * @param uorder the polynomial order in the u-dimension - * @param v1 the first v-dimension endpoint of the pre-image rectangle of the map - * @param v2 the second v-dimension endpoint of the pre-image rectangle of the map - * @param vstride the number of values in the v-dimension in each block of storage - * @param vorder the polynomial order in the v-dimension - * @param points a set of uorder × vorder blocks of storage containing control points - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap2d(@NativeType("GLenum") int target, @NativeType("GLdouble") double u1, @NativeType("GLdouble") double u2, @NativeType("GLint") int ustride, @NativeType("GLint") int uorder, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2, @NativeType("GLint") int vstride, @NativeType("GLint") int vorder, @NativeType("GLdouble const *") DoubleBuffer points) { - if (CHECKS) { - check(points, ustride * uorder * vstride * vorder); - } - nglMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, memAddress(points)); - } - - // --- [ glMapGrid1f ] --- - - /** - * Defines a one-dimensional grid in the map evaluator domain. - * - * @param n the number of partitions of the interval - * @param u1 the first interval endpoint - * @param u2 the second interval endpoint - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMapGrid1f(@NativeType("GLint") int n, @NativeType("GLfloat") float u1, @NativeType("GLfloat") float u2); - - // --- [ glMapGrid1d ] --- - - /** - * Double version of {@link #glMapGrid1f MapGrid1f}. - * - * @param n the number of partitions of the interval - * @param u1 the first interval endpoint - * @param u2 the second interval endpoint - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMapGrid1d(@NativeType("GLint") int n, @NativeType("GLdouble") double u1, @NativeType("GLdouble") double u2); - - // --- [ glMapGrid2f ] --- - - /** - * Defines a two-dimensional grid in the map evaluator domain. - * - * @param un the number of partitions of the interval in the u-dimension - * @param u1 the first u-dimension interval endpoint - * @param u2 the second u-dimension interval endpoint - * @param vn the number of partitions of the interval in the v-dimension - * @param v1 the first v-dimension interval endpoint - * @param v2 the second v-dimension interval endpoint - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMapGrid2f(@NativeType("GLint") int un, @NativeType("GLfloat") float u1, @NativeType("GLfloat") float u2, @NativeType("GLint") int vn, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2); - - // --- [ glMapGrid2d ] --- - - /** - * Double version of {@link #glMapGrid2f MapGrid2f}. - * - * @param un the number of partitions of the interval in the u-dimension - * @param u1 the first u-dimension interval endpoint - * @param u2 the second u-dimension interval endpoint - * @param vn the number of partitions of the interval in the v-dimension - * @param v1 the first v-dimension interval endpoint - * @param v2 the second v-dimension interval endpoint - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMapGrid2d(@NativeType("GLint") int un, @NativeType("GLdouble") double u1, @NativeType("GLdouble") double u2, @NativeType("GLint") int vn, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2); - - // --- [ glMateriali ] --- - - /** - * Sets the integer value of a material parameter. - * - * @param face the material face for which to set the parameter. One of:
    {@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param pname the parameter to set. Must be:
    {@link #GL_SHININESS SHININESS}
    - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMateriali(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glMaterialf ] --- - - /** - * Float version of {@link #glMateriali Materiali}. - * - * @param face the material face for which to set the parameter - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMaterialf(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glMaterialiv ] --- - - /** Unsafe version of: {@link #glMaterialiv Materialiv} */ - public static native void nglMaterialiv(int face, int pname, long params); - - /** - * Pointer version of {@link #glMateriali Materiali}. - * - * @param face the material face for which to set the parameter - * @param pname the parameter to set. One of:
    {@link #GL_AMBIENT AMBIENT}{@link #GL_DIFFUSE DIFFUSE}{@link #GL_AMBIENT_AND_DIFFUSE AMBIENT_AND_DIFFUSE}{@link #GL_SPECULAR SPECULAR}{@link #GL_EMISSION EMISSION}
    - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMaterialiv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMaterialiv(face, pname, memAddress(params)); - } - - // --- [ glMaterialfv ] --- - - /** Unsafe version of: {@link #glMaterialfv Materialfv} */ - public static native void nglMaterialfv(int face, int pname, long params); - - /** - * Pointer version of {@link #glMaterialf Materialf}. - * - * @param face the material face for which to set the parameter - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMaterialfv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglMaterialfv(face, pname, memAddress(params)); - } - - // --- [ glMatrixMode ] --- - - /** - * Set the current matrix mode. - * - * @param mode the matrix mode. One of:
    {@link #GL_MODELVIEW MODELVIEW}{@link #GL_PROJECTION PROJECTION}{@link #GL_TEXTURE TEXTURE}{@link #GL_COLOR COLOR}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMatrixMode(@NativeType("GLenum") int mode); - - // --- [ glMultMatrixf ] --- - - /** Unsafe version of: {@link #glMultMatrixf MultMatrixf} */ - public static native void nglMultMatrixf(long m); - - /** - * Multiplies the current matrix with a 4 × 4 matrix in column-major order. See {@link #glLoadMatrixf LoadMatrixf} for details. - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultMatrixf(@NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMultMatrixf(memAddress(m)); - } - - // --- [ glMultMatrixd ] --- - - /** Unsafe version of: {@link #glMultMatrixd MultMatrixd} */ - public static native void nglMultMatrixd(long m); - - /** - * Double version of {@link #glMultMatrixf MultMatrixf}. - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultMatrixd(@NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMultMatrixd(memAddress(m)); - } - - // --- [ glFrustum ] --- - - /** - * Manipulates the current matrix with a matrix that produces perspective projection, in such a way that the coordinates (lb – n)T - * and (rt – n)T specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the - * window, respectively (assuming that the eye is located at (0 0 0)T). {@code f} gives the distance from the eye to the far clipping - * plane. - * - *

    Calling this function is equivalent to calling {@link #glMultMatrixf MultMatrixf} with the following matrix:

    - * - * - * - * - * - * - *
    2n / (r - l)0(r + l) / (r - l)0
    02n / (t - b)(t + b) / (t - b)0
    00- (f + n) / (f - n)- (2fn) / (f - n)
    00-10
    - * - * @param l the left frustum plane - * @param r the right frustum plane - * @param b the bottom frustum plane - * @param t the top frustum plane - * @param n the near frustum plane - * @param f the far frustum plane - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glFrustum(@NativeType("GLdouble") double l, @NativeType("GLdouble") double r, @NativeType("GLdouble") double b, @NativeType("GLdouble") double t, @NativeType("GLdouble") double n, @NativeType("GLdouble") double f); - - // --- [ glNewList ] --- - - /** - * Begins the definition of a display list. - * - * @param n a positive integer to which the display list that follows is assigned - * @param mode a symbolic constant that controls the behavior of the GL during display list creation. One of:
    {@link #GL_COMPILE COMPILE}{@link #GL_COMPILE_AND_EXECUTE COMPILE_AND_EXECUTE}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glNewList(@NativeType("GLuint") int n, @NativeType("GLenum") int mode); - - // --- [ glEndList ] --- - - /** - * Ends the definition of GL commands to be placed in a display list. It is only when {@code EndList} occurs that the specified display list is actually - * associated with the index indicated with {@link #glNewList NewList}. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glEndList(); - - // --- [ glNormal3f ] --- - - /** - * Sets the current normal. - * - * @param nx the x coordinate of the current normal - * @param ny the y coordinate of the current normal - * @param nz the z coordinate of the current normal - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glNormal3f(@NativeType("GLfloat") float nx, @NativeType("GLfloat") float ny, @NativeType("GLfloat") float nz); - - // --- [ glNormal3b ] --- - - /** - * Byte version of {@link #glNormal3f Normal3f}. - * - * @param nx the x coordinate of the current normal - * @param ny the y coordinate of the current normal - * @param nz the z coordinate of the current normal - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glNormal3b(@NativeType("GLbyte") byte nx, @NativeType("GLbyte") byte ny, @NativeType("GLbyte") byte nz); - - // --- [ glNormal3s ] --- - - /** - * Short version of {@link #glNormal3f Normal3f}. - * - * @param nx the x coordinate of the current normal - * @param ny the y coordinate of the current normal - * @param nz the z coordinate of the current normal - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glNormal3s(@NativeType("GLshort") short nx, @NativeType("GLshort") short ny, @NativeType("GLshort") short nz); - - // --- [ glNormal3i ] --- - - /** - * Integer version of {@link #glNormal3f Normal3f}. - * - * @param nx the x coordinate of the current normal - * @param ny the y coordinate of the current normal - * @param nz the z coordinate of the current normal - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glNormal3i(@NativeType("GLint") int nx, @NativeType("GLint") int ny, @NativeType("GLint") int nz); - - // --- [ glNormal3d ] --- - - /** - * Double version of {@link #glNormal3f Normal3f}. - * - * @param nx the x coordinate of the current normal - * @param ny the y coordinate of the current normal - * @param nz the z coordinate of the current normal - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glNormal3d(@NativeType("GLdouble") double nx, @NativeType("GLdouble") double ny, @NativeType("GLdouble") double nz); - - // --- [ glNormal3fv ] --- - - /** Unsafe version of: {@link #glNormal3fv Normal3fv} */ - public static native void nglNormal3fv(long v); - - /** - * Pointer version of {@link #glNormal3f Normal3f}. - * - * @param v the normal buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglNormal3fv(memAddress(v)); - } - - // --- [ glNormal3bv ] --- - - /** Unsafe version of: {@link #glNormal3bv Normal3bv} */ - public static native void nglNormal3bv(long v); - - /** - * Pointer version of {@link #glNormal3b Normal3b}. - * - * @param v the normal buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3bv(@NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglNormal3bv(memAddress(v)); - } - - // --- [ glNormal3sv ] --- - - /** Unsafe version of: {@link #glNormal3sv Normal3sv} */ - public static native void nglNormal3sv(long v); - - /** - * Pointer version of {@link #glNormal3s Normal3s}. - * - * @param v the normal buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglNormal3sv(memAddress(v)); - } - - // --- [ glNormal3iv ] --- - - /** Unsafe version of: {@link #glNormal3iv Normal3iv} */ - public static native void nglNormal3iv(long v); - - /** - * Pointer version of {@link #glNormal3i Normal3i}. - * - * @param v the normal buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglNormal3iv(memAddress(v)); - } - - // --- [ glNormal3dv ] --- - - /** Unsafe version of: {@link #glNormal3dv Normal3dv} */ - public static native void nglNormal3dv(long v); - - /** - * Pointer version of {@link #glNormal3d Normal3d}. - * - * @param v the normal buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglNormal3dv(memAddress(v)); - } - - // --- [ glNormalPointer ] --- - - /** Unsafe version of: {@link #glNormalPointer NormalPointer} */ - public static native void nglNormalPointer(int type, int stride, long pointer); - - /** - * Specifies the location and organization of a normal array. - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the normal array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormalPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglNormalPointer(type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a normal array. - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the normal array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormalPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglNormalPointer(type, stride, pointer); - } - - /** - * Specifies the location and organization of a normal array. - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the normal array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormalPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglNormalPointer(type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a normal array. - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the normal array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormalPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglNormalPointer(type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a normal array. - * - * @param type the data type of the values stored in the array. One of:
    {@link #GL_BYTE BYTE}{@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the normal array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormalPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglNormalPointer(type, stride, memAddress(pointer)); - } - - // --- [ glOrtho ] --- - - /** - * Manipulates the current matrix with a matrix that produces parallel projection, in such a way that the coordinates (lb – n)T - * and (rt – n)T specify the points on the near clipping plane that are mapped to the lower left and upper right corners of the - * window, respectively (assuming that the eye is located at (0 0 0)T). {@code f} gives the distance from the eye to the far clipping - * plane. - * - *

    Calling this function is equivalent to calling {@link #glMultMatrixf MultMatrixf} with the following matrix:

    - * - * - * - * - * - * - *
    2 / (r - l)00- (r + l) / (r - l)
    02 / (t - b)0- (t + b) / (t - b)
    00- 2 / (f - n)- (f + n) / (f - n)
    0001
    - * - * @param l the left frustum plane - * @param r the right frustum plane - * @param b the bottom frustum plane - * @param t the top frustum plane - * @param n the near frustum plane - * @param f the far frustum plane - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glOrtho(@NativeType("GLdouble") double l, @NativeType("GLdouble") double r, @NativeType("GLdouble") double b, @NativeType("GLdouble") double t, @NativeType("GLdouble") double n, @NativeType("GLdouble") double f); - - // --- [ glPassThrough ] --- - - /** - * Inserts a marker when the GL is in feeback mode. {@code token} is returned as if it were a primitive; it is indicated with its own unique identifying - * value. The ordering of any {@code PassThrough} commands with respect to primitive specification is maintained by feedback. {@code PassThrough} may - * not occur between {@link #glBegin Begin} and {@link #glEnd End}. - * - * @param token the marker value to insert - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPassThrough(@NativeType("GLfloat") float token); - - // --- [ glPixelMapfv ] --- - - /** - * Unsafe version of: {@link #glPixelMapfv PixelMapfv} - * - * @param size the map size - */ - public static native void nglPixelMapfv(int map, int size, long values); - - /** - * Sets a pixel map lookup table. - * - * @param map the map to set. One of:
    {@link #GL_PIXEL_MAP_I_TO_I PIXEL_MAP_I_TO_I}{@link #GL_PIXEL_MAP_S_TO_S PIXEL_MAP_S_TO_S}{@link #GL_PIXEL_MAP_I_TO_R PIXEL_MAP_I_TO_R}{@link #GL_PIXEL_MAP_I_TO_G PIXEL_MAP_I_TO_G}{@link #GL_PIXEL_MAP_I_TO_B PIXEL_MAP_I_TO_B}
    {@link #GL_PIXEL_MAP_I_TO_A PIXEL_MAP_I_TO_A}{@link #GL_PIXEL_MAP_R_TO_R PIXEL_MAP_R_TO_R}{@link #GL_PIXEL_MAP_G_TO_G PIXEL_MAP_G_TO_G}{@link #GL_PIXEL_MAP_B_TO_B PIXEL_MAP_B_TO_B}{@link #GL_PIXEL_MAP_A_TO_A PIXEL_MAP_A_TO_A}
    - * @param size the map size - * @param values the map values - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLsizei") int size, @NativeType("GLfloat const *") long values) { - nglPixelMapfv(map, size, values); - } - - /** - * Sets a pixel map lookup table. - * - * @param map the map to set. One of:
    {@link #GL_PIXEL_MAP_I_TO_I PIXEL_MAP_I_TO_I}{@link #GL_PIXEL_MAP_S_TO_S PIXEL_MAP_S_TO_S}{@link #GL_PIXEL_MAP_I_TO_R PIXEL_MAP_I_TO_R}{@link #GL_PIXEL_MAP_I_TO_G PIXEL_MAP_I_TO_G}{@link #GL_PIXEL_MAP_I_TO_B PIXEL_MAP_I_TO_B}
    {@link #GL_PIXEL_MAP_I_TO_A PIXEL_MAP_I_TO_A}{@link #GL_PIXEL_MAP_R_TO_R PIXEL_MAP_R_TO_R}{@link #GL_PIXEL_MAP_G_TO_G PIXEL_MAP_G_TO_G}{@link #GL_PIXEL_MAP_B_TO_B PIXEL_MAP_B_TO_B}{@link #GL_PIXEL_MAP_A_TO_A PIXEL_MAP_A_TO_A}
    - * @param values the map values - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLfloat const *") FloatBuffer values) { - nglPixelMapfv(map, values.remaining(), memAddress(values)); - } - - // --- [ glPixelMapusv ] --- - - /** - * Unsafe version of: {@link #glPixelMapusv PixelMapusv} - * - * @param size the map size - */ - public static native void nglPixelMapusv(int map, int size, long values); - - /** - * Unsigned short version of {@link #glPixelMapfv PixelMapfv}. - * - * @param map the map to set - * @param size the map size - * @param values the map values - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLsizei") int size, @NativeType("GLushort const *") long values) { - nglPixelMapusv(map, size, values); - } - - /** - * Unsigned short version of {@link #glPixelMapfv PixelMapfv}. - * - * @param map the map to set - * @param values the map values - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLushort const *") ShortBuffer values) { - nglPixelMapusv(map, values.remaining(), memAddress(values)); - } - - // --- [ glPixelMapuiv ] --- - - /** - * Unsafe version of: {@link #glPixelMapuiv PixelMapuiv} - * - * @param size the map size - */ - public static native void nglPixelMapuiv(int map, int size, long values); - - /** - * Unsigned integer version of {@link #glPixelMapfv PixelMapfv}. - * - * @param map the map to set - * @param size the map size - * @param values the map values - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLsizei") int size, @NativeType("GLuint const *") long values) { - nglPixelMapuiv(map, size, values); - } - - /** - * Unsigned integer version of {@link #glPixelMapfv PixelMapfv}. - * - * @param map the map to set - * @param values the map values - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLuint const *") IntBuffer values) { - nglPixelMapuiv(map, values.remaining(), memAddress(values)); - } - - // --- [ glPixelStorei ] --- - - /** - * Sets the integer value of a pixel store parameter. - * - * @param pname the pixel store parameter to set. One of:
    {@link GL11C#GL_UNPACK_SWAP_BYTES UNPACK_SWAP_BYTES}{@link GL11C#GL_UNPACK_LSB_FIRST UNPACK_LSB_FIRST}{@link GL11C#GL_UNPACK_ROW_LENGTH UNPACK_ROW_LENGTH}
    {@link GL11C#GL_UNPACK_SKIP_ROWS UNPACK_SKIP_ROWS}{@link GL11C#GL_UNPACK_SKIP_PIXELS UNPACK_SKIP_PIXELS}{@link GL11C#GL_UNPACK_ALIGNMENT UNPACK_ALIGNMENT}
    {@link GL12#GL_UNPACK_IMAGE_HEIGHT UNPACK_IMAGE_HEIGHT}{@link GL12#GL_UNPACK_SKIP_IMAGES UNPACK_SKIP_IMAGES}{@link GL42#GL_UNPACK_COMPRESSED_BLOCK_WIDTH UNPACK_COMPRESSED_BLOCK_WIDTH}
    {@link GL42#GL_UNPACK_COMPRESSED_BLOCK_HEIGHT UNPACK_COMPRESSED_BLOCK_HEIGHT}{@link GL42#GL_UNPACK_COMPRESSED_BLOCK_DEPTH UNPACK_COMPRESSED_BLOCK_DEPTH}{@link GL42#GL_UNPACK_COMPRESSED_BLOCK_SIZE UNPACK_COMPRESSED_BLOCK_SIZE}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static void glPixelStorei(@NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL11C.glPixelStorei(pname, param); - } - - // --- [ glPixelStoref ] --- - - /** - * Float version of {@link #glPixelStorei PixelStorei}. - * - * @param pname the pixel store parameter to set - * @param param the parameter value - * - * @see Reference Page - */ - public static void glPixelStoref(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param) { - GL11C.glPixelStoref(pname, param); - } - - // --- [ glPixelTransferi ] --- - - /** - * Sets the integer value of a pixel transfer parameter. - * - * @param pname the pixel transfer parameter to set. One of:
    {@link #GL_MAP_COLOR MAP_COLOR}{@link #GL_MAP_STENCIL MAP_STENCIL}{@link #GL_INDEX_SHIFT INDEX_SHIFT}{@link #GL_INDEX_OFFSET INDEX_OFFSET}
    {@link #GL_RED_SCALE RED_SCALE}{@link #GL_GREEN_SCALE GREEN_SCALE}{@link #GL_BLUE_SCALE BLUE_SCALE}{@link #GL_ALPHA_SCALE ALPHA_SCALE}
    {@link #GL_DEPTH_SCALE DEPTH_SCALE}{@link #GL_RED_BIAS RED_BIAS}{@link #GL_GREEN_BIAS GREEN_BIAS}{@link #GL_BLUE_BIAS BLUE_BIAS}
    {@link #GL_ALPHA_BIAS ALPHA_BIAS}{@link #GL_DEPTH_BIAS DEPTH_BIAS}{@link ARBImaging#GL_POST_CONVOLUTION_RED_SCALE POST_CONVOLUTION_RED_SCALE}{@link ARBImaging#GL_POST_CONVOLUTION_RED_BIAS POST_CONVOLUTION_RED_BIAS}
    {@link ARBImaging#GL_POST_COLOR_MATRIX_RED_SCALE POST_COLOR_MATRIX_RED_SCALE}{@link ARBImaging#GL_POST_COLOR_MATRIX_RED_BIAS POST_COLOR_MATRIX_RED_BIAS}{@link ARBImaging#GL_POST_CONVOLUTION_GREEN_SCALE POST_CONVOLUTION_GREEN_SCALE}{@link ARBImaging#GL_POST_CONVOLUTION_GREEN_BIAS POST_CONVOLUTION_GREEN_BIAS}
    {@link ARBImaging#GL_POST_COLOR_MATRIX_GREEN_SCALE POST_COLOR_MATRIX_GREEN_SCALE}{@link ARBImaging#GL_POST_COLOR_MATRIX_GREEN_BIAS POST_COLOR_MATRIX_GREEN_BIAS}{@link ARBImaging#GL_POST_CONVOLUTION_BLUE_SCALE POST_CONVOLUTION_BLUE_SCALE}{@link ARBImaging#GL_POST_CONVOLUTION_BLUE_BIAS POST_CONVOLUTION_BLUE_BIAS}
    {@link ARBImaging#GL_POST_COLOR_MATRIX_BLUE_SCALE POST_COLOR_MATRIX_BLUE_SCALE}{@link ARBImaging#GL_POST_COLOR_MATRIX_BLUE_BIAS POST_COLOR_MATRIX_BLUE_BIAS}{@link ARBImaging#GL_POST_CONVOLUTION_ALPHA_SCALE POST_CONVOLUTION_ALPHA_SCALE}{@link ARBImaging#GL_POST_CONVOLUTION_ALPHA_BIAS POST_CONVOLUTION_ALPHA_BIAS}
    {@link ARBImaging#GL_POST_COLOR_MATRIX_ALPHA_SCALE POST_COLOR_MATRIX_ALPHA_SCALE}{@link ARBImaging#GL_POST_COLOR_MATRIX_ALPHA_BIAS POST_COLOR_MATRIX_ALPHA_BIAS}
    - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPixelTransferi(@NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glPixelTransferf ] --- - - /** - * Float version of {@link #glPixelTransferi PixelTransferi}. - * - * @param pname the pixel transfer parameter to set - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPixelTransferf(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glPixelZoom ] --- - - /** - * Controls the conversion of a group of fragments. - * - *

    Let (xrp, yrp) be the current raster position. If a particular group is the nth in a row and belongs to the - * mth row, consider the region in window coordinates bounded by the rectangle with corners

    - * - *

    (xrp + zxn, yrp + zym) and (xrp + zx(n + 1), yrp + zy(m + 1))

    - * - *

    (either zx or zy may be negative). A fragment representing group {@code (n, m)} is produced for each framebuffer pixel inside, or - * on the bottom or left boundary, of this rectangle.

    - * - * @param xfactor the zx factor - * @param yfactor the zy factor - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPixelZoom(@NativeType("GLfloat") float xfactor, @NativeType("GLfloat") float yfactor); - - // --- [ glPointSize ] --- - - /** - * Controls the rasterization of points if no vertex, tessellation control, tessellation evaluation, or geometry shader is active. The default point size is 1.0. - * - * @param size the request size of a point - * - * @see Reference Page - */ - public static void glPointSize(@NativeType("GLfloat") float size) { - GL11C.glPointSize(size); - } - - // --- [ glPolygonMode ] --- - - /** - * Controls the interpretation of polygons for rasterization. - * - *

    {@link GL11C#GL_FILL FILL} is the default mode of polygon rasterization. Note that these modes affect only the final rasterization of polygons: in particular, a - * polygon's vertices are lit, and the polygon is clipped and possibly culled before these modes are applied. Polygon antialiasing applies only to the - * {@link GL11C#GL_FILL FILL} state of PolygonMode. For {@link GL11C#GL_POINT POINT} or {@link GL11C#GL_LINE LINE}, point antialiasing or line segment antialiasing, respectively, apply.

    - * - * @param face the face for which to set the rasterizing method. One of:
    {@link GL11C#GL_FRONT FRONT}{@link GL11C#GL_BACK BACK}{@link GL11C#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param mode the rasterization mode. One of:
    {@link GL11C#GL_POINT POINT}{@link GL11C#GL_LINE LINE}{@link GL11C#GL_FILL FILL}
    - * - * @see Reference Page - */ - public static void glPolygonMode(@NativeType("GLenum") int face, @NativeType("GLenum") int mode) { - GL11C.glPolygonMode(face, mode); - } - - // --- [ glPolygonOffset ] --- - - /** - * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This - * function determines that value. - * - *

    {@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable - * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value.

    - * - * @param factor the maximum depth slope factor - * @param units the constant scale - * - * @see Reference Page - */ - public static void glPolygonOffset(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units) { - GL11C.glPolygonOffset(factor, units); - } - - // --- [ glPolygonStipple ] --- - - /** Unsafe version of: {@link #glPolygonStipple PolygonStipple} */ - public static native void nglPolygonStipple(long pattern); - - /** - * Defines a polygon stipple. It works much the same way as {@link #glLineStipple LineStipple}, masking out certain fragments produced by rasterization so that they - * are not sent to the next stage of the GL. This is the case regardless of the state of polygon antialiasing. - * - *

    If xw and yw are the window coordinates of a rasterized polygon fragment, then that fragment is sent to the next stage of the GL - * if and only if the bit of the pattern (xw mod 32, yw mod 32) is 1.

    - * - *

    Polygon stippling may be enabled or disabled with {@link #glEnable Enable} or {@link #glDisable Disable} using the constant {@link #GL_POLYGON_STIPPLE POLYGON_STIPPLE}. When disabled, - * it is as if the stipple pattern were all ones.

    - * - * @param pattern a pointer to memory into which a 32 × 32 pattern is packed - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPolygonStipple(@NativeType("GLubyte const *") ByteBuffer pattern) { - if (CHECKS) { - check(pattern, 128); - } - nglPolygonStipple(memAddress(pattern)); - } - - /** - * Defines a polygon stipple. It works much the same way as {@link #glLineStipple LineStipple}, masking out certain fragments produced by rasterization so that they - * are not sent to the next stage of the GL. This is the case regardless of the state of polygon antialiasing. - * - *

    If xw and yw are the window coordinates of a rasterized polygon fragment, then that fragment is sent to the next stage of the GL - * if and only if the bit of the pattern (xw mod 32, yw mod 32) is 1.

    - * - *

    Polygon stippling may be enabled or disabled with {@link #glEnable Enable} or {@link #glDisable Disable} using the constant {@link #GL_POLYGON_STIPPLE POLYGON_STIPPLE}. When disabled, - * it is as if the stipple pattern were all ones.

    - * - * @param pattern a pointer to memory into which a 32 × 32 pattern is packed - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPolygonStipple(@NativeType("GLubyte const *") long pattern) { - nglPolygonStipple(pattern); - } - - // --- [ glPushAttrib ] --- - - /** - * Takes a bitwise OR of symbolic constants indicating which groups of state variables to push onto the server attribute stack. Each constant refers to a - * group of state variables. - * - *

    Bits set in mask that do not correspond to an attribute group are ignored. The special mask value {@link #GL_ALL_ATTRIB_BITS ALL_ATTRIB_BITS} may be used to push all - * stackable server state.

    - * - *

    A {@link #GL_STACK_OVERFLOW STACK_OVERFLOW} error is generated if {@code PushAttrib} is called and the attribute stack depth is equal to the value of - * {@link #GL_MAX_ATTRIB_STACK_DEPTH MAX_ATTRIB_STACK_DEPTH}.

    - * - * @param mask the state variables to push. One or more of:
    {@link #GL_ACCUM_BUFFER_BIT ACCUM_BUFFER_BIT}{@link #GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link #GL_CURRENT_BIT CURRENT_BIT}{@link #GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link #GL_ENABLE_BIT ENABLE_BIT}{@link #GL_EVAL_BIT EVAL_BIT}
    {@link #GL_FOG_BIT FOG_BIT}{@link #GL_HINT_BIT HINT_BIT}{@link #GL_LIGHTING_BIT LIGHTING_BIT}{@link #GL_LINE_BIT LINE_BIT}{@link #GL_LIST_BIT LIST_BIT}{@link GL13#GL_MULTISAMPLE_BIT MULTISAMPLE_BIT}
    {@link #GL_PIXEL_MODE_BIT PIXEL_MODE_BIT}{@link #GL_POINT_BIT POINT_BIT}{@link #GL_POLYGON_BIT POLYGON_BIT}{@link #GL_POLYGON_STIPPLE_BIT POLYGON_STIPPLE_BIT}{@link #GL_SCISSOR_BIT SCISSOR_BIT}{@link #GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    {@link #GL_TEXTURE_BIT TEXTURE_BIT}{@link #GL_TRANSFORM_BIT TRANSFORM_BIT}{@link #GL_VIEWPORT_BIT VIEWPORT_BIT}{@link #GL_ALL_ATTRIB_BITS ALL_ATTRIB_BITS}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPushAttrib(@NativeType("GLbitfield") int mask); - - // --- [ glPushClientAttrib ] --- - - /** - * Takes a bitwise OR of symbolic constants indicating which groups of state variables to push onto the client attribute stack. Each constant refers to a - * group of state variables. - * - *

    Bits set in mask that do not correspond to an attribute group are ignored. The special mask value {@link #GL_CLIENT_ALL_ATTRIB_BITS CLIENT_ALL_ATTRIB_BITS} may be used to push - * all stackable client state.

    - * - *

    A {@link #GL_STACK_OVERFLOW STACK_OVERFLOW} error is generated if {@code PushAttrib} is called and the client attribute stack depth is equal to the value of - * {@link #GL_MAX_CLIENT_ATTRIB_STACK_DEPTH MAX_CLIENT_ATTRIB_STACK_DEPTH}.

    - * - * @param mask the state variables to push. One or more of:
    {@link #GL_CLIENT_VERTEX_ARRAY_BIT CLIENT_VERTEX_ARRAY_BIT}{@link #GL_CLIENT_PIXEL_STORE_BIT CLIENT_PIXEL_STORE_BIT}{@link #GL_CLIENT_ALL_ATTRIB_BITS CLIENT_ALL_ATTRIB_BITS}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPushClientAttrib(@NativeType("GLbitfield") int mask); - - // --- [ glPopAttrib ] --- - - /** - * Resets the values of those state variables that were saved with the last {@link #glPushAttrib PushAttrib}. Those not saved remain unchanged. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPopAttrib(); - - // --- [ glPopClientAttrib ] --- - - /** - * Resets the values of those state variables that were saved with the last {@link #glPushClientAttrib PushClientAttrib}. Those not saved remain unchanged. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPopClientAttrib(); - - // --- [ glPopMatrix ] --- - - /** - * Pops the top entry off the current matrix stack, replacing the current matrix with the matrix that was the second entry in the stack. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPopMatrix(); - - // --- [ glPopName ] --- - - /** - * Pops one name off the top of the selection name stack. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPopName(); - - // --- [ glPrioritizeTextures ] --- - - /** - * Unsafe version of: {@link #glPrioritizeTextures PrioritizeTextures} - * - * @param n the number of texture object priorities to set - */ - public static native void nglPrioritizeTextures(int n, long textures, long priorities); - - /** - * Sets the priority of texture objects. Each priority value is clamped to the range [0, 1] before it is assigned. Zero indicates the lowest priority, with - * the least likelihood of being resident. One indicates the highest priority, with the greatest likelihood of being resident. - * - * @param textures an array of texture object names - * @param priorities an array of texture object priorities - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPrioritizeTextures(@NativeType("GLuint const *") IntBuffer textures, @NativeType("GLfloat const *") FloatBuffer priorities) { - if (CHECKS) { - check(priorities, textures.remaining()); - } - nglPrioritizeTextures(textures.remaining(), memAddress(textures), memAddress(priorities)); - } - - // --- [ glPushMatrix ] --- - - /** - * Pushes the current matrix stack down by one, duplicating the current matrix in both the top of the stack and the entry below it. - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPushMatrix(); - - // --- [ glPushName ] --- - - /** - * Causes {@code name} to be pushed onto the selection name stack. - * - * @param name the name to push - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glPushName(@NativeType("GLuint") int name); - - // --- [ glRasterPos2i ] --- - - /** - * Sets the two-dimensional current raster position. {@code z} is implicitly set to 0 and {@code w} implicitly set to 1. - * - *

    The coordinates are treated as if they were specified in a Vertex command. If a vertex shader is active, this vertex shader is executed using the x, y, - * z, and w coordinates as the object coordinates of the vertex. Otherwise, the x, y, z, and w coordinates are transformed by the current model-view and - * projection matrices. These coordinates, along with current values, are used to generate primary and secondary colors and texture coordinates just as is - * done for a vertex. The colors and texture coordinates so produced replace the colors and texture coordinates stored in the current raster position's - * associated data.

    - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos2i(@NativeType("GLint") int x, @NativeType("GLint") int y); - - // --- [ glRasterPos2s ] --- - - /** - * Short version of {@link #glRasterPos2i RasterPos2i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos2s(@NativeType("GLshort") short x, @NativeType("GLshort") short y); - - // --- [ glRasterPos2f ] --- - - /** - * Float version of {@link #glRasterPos2i RasterPos2i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos2f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y); - - // --- [ glRasterPos2d ] --- - - /** - * Double version of {@link #glRasterPos2i RasterPos2i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos2d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glRasterPos2iv ] --- - - /** Unsafe version of: {@link #glRasterPos2iv RasterPos2iv} */ - public static native void nglRasterPos2iv(long coords); - - /** - * Pointer version of {@link #glRasterPos2i RasterPos2i}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2iv(@NativeType("GLint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglRasterPos2iv(memAddress(coords)); - } - - // --- [ glRasterPos2sv ] --- - - /** Unsafe version of: {@link #glRasterPos2sv RasterPos2sv} */ - public static native void nglRasterPos2sv(long coords); - - /** - * Pointer version of {@link #glRasterPos2s RasterPos2s}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2sv(@NativeType("GLshort const *") ShortBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglRasterPos2sv(memAddress(coords)); - } - - // --- [ glRasterPos2fv ] --- - - /** Unsafe version of: {@link #glRasterPos2fv RasterPos2fv} */ - public static native void nglRasterPos2fv(long coords); - - /** - * Pointer version of {@link #glRasterPos2f RasterPos2f}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2fv(@NativeType("GLfloat const *") FloatBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglRasterPos2fv(memAddress(coords)); - } - - // --- [ glRasterPos2dv ] --- - - /** Unsafe version of: {@link #glRasterPos2dv RasterPos2dv} */ - public static native void nglRasterPos2dv(long coords); - - /** - * Pointer version of {@link #glRasterPos2d RasterPos2d}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2dv(@NativeType("GLdouble const *") DoubleBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglRasterPos2dv(memAddress(coords)); - } - - // --- [ glRasterPos3i ] --- - - /** - * Sets the three-dimensional current raster position. {@code w} is implicitly set to 1. See {@link #glRasterPos2i RasterPos2i} for more details. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos3i(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glRasterPos3s ] --- - - /** - * Short version of {@link #glRasterPos3i RasterPos3i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos3s(@NativeType("GLshort") short x, @NativeType("GLshort") short y, @NativeType("GLshort") short z); - - // --- [ glRasterPos3f ] --- - - /** - * Float version of {@link #glRasterPos3i RasterPos3i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos3f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glRasterPos3d ] --- - - /** - * Double version of {@link #glRasterPos3i RasterPos3i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos3d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glRasterPos3iv ] --- - - /** Unsafe version of: {@link #glRasterPos3iv RasterPos3iv} */ - public static native void nglRasterPos3iv(long coords); - - /** - * Pointer version of {@link #glRasterPos3i RasterPos3i}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3iv(@NativeType("GLint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglRasterPos3iv(memAddress(coords)); - } - - // --- [ glRasterPos3sv ] --- - - /** Unsafe version of: {@link #glRasterPos3sv RasterPos3sv} */ - public static native void nglRasterPos3sv(long coords); - - /** - * Pointer version of {@link #glRasterPos3s RasterPos3s}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3sv(@NativeType("GLshort const *") ShortBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglRasterPos3sv(memAddress(coords)); - } - - // --- [ glRasterPos3fv ] --- - - /** Unsafe version of: {@link #glRasterPos3fv RasterPos3fv} */ - public static native void nglRasterPos3fv(long coords); - - /** - * Pointer version of {@link #glRasterPos3f RasterPos3f}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3fv(@NativeType("GLfloat const *") FloatBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglRasterPos3fv(memAddress(coords)); - } - - // --- [ glRasterPos3dv ] --- - - /** Unsafe version of: {@link #glRasterPos3dv RasterPos3dv} */ - public static native void nglRasterPos3dv(long coords); - - /** - * Pointer version of {@link #glRasterPos3d RasterPos3d}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3dv(@NativeType("GLdouble const *") DoubleBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglRasterPos3dv(memAddress(coords)); - } - - // --- [ glRasterPos4i ] --- - - /** - * Sets the four-dimensional current raster position. See {@link #glRasterPos2i RasterPos2i} for more details. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * @param w the {@code w} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos4i(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glRasterPos4s ] --- - - /** - * Short version of {@link #glRasterPos4i RasterPos4i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * @param w the {@code w} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos4s(@NativeType("GLshort") short x, @NativeType("GLshort") short y, @NativeType("GLshort") short z, @NativeType("GLshort") short w); - - // --- [ glRasterPos4f ] --- - - /** - * Float version of RasterPos4i. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * @param w the {@code w} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos4f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w); - - // --- [ glRasterPos4d ] --- - - /** - * Double version of {@link #glRasterPos4i RasterPos4i}. - * - * @param x the {@code x} raster coordinate - * @param y the {@code y} raster coordinate - * @param z the {@code z} raster coordinate - * @param w the {@code w} raster coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRasterPos4d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glRasterPos4iv ] --- - - /** Unsafe version of: {@link #glRasterPos4iv RasterPos4iv} */ - public static native void nglRasterPos4iv(long coords); - - /** - * Pointer version of {@link #glRasterPos4i RasterPos4i}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4iv(@NativeType("GLint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglRasterPos4iv(memAddress(coords)); - } - - // --- [ glRasterPos4sv ] --- - - /** Unsafe version of: {@link #glRasterPos4sv RasterPos4sv} */ - public static native void nglRasterPos4sv(long coords); - - /** - * Pointer version of {@link #glRasterPos4s RasterPos4s}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4sv(@NativeType("GLshort const *") ShortBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglRasterPos4sv(memAddress(coords)); - } - - // --- [ glRasterPos4fv ] --- - - /** Unsafe version of: {@link #glRasterPos4fv RasterPos4fv} */ - public static native void nglRasterPos4fv(long coords); - - /** - * Pointer version of {@link #glRasterPos4f RasterPos4f}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4fv(@NativeType("GLfloat const *") FloatBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglRasterPos4fv(memAddress(coords)); - } - - // --- [ glRasterPos4dv ] --- - - /** Unsafe version of: {@link #glRasterPos4dv RasterPos4dv} */ - public static native void nglRasterPos4dv(long coords); - - /** - * Pointer version of {@link #glRasterPos4d RasterPos4d}. - * - * @param coords the raster position buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4dv(@NativeType("GLdouble const *") DoubleBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglRasterPos4dv(memAddress(coords)); - } - - // --- [ glReadBuffer ] --- - - /** - * Defines the color buffer from which values are obtained. - * - *

    Acceptable values for {@code src} depend on whether the GL is using the default framebuffer (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is zero), or - * a framebuffer object (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is non-zero). In the initial state, the GL is bound to the default framebuffer.

    - * - * @param src the color buffer to read from. One of:
    {@link GL11C#GL_NONE NONE}{@link GL11C#GL_FRONT_LEFT FRONT_LEFT}{@link GL11C#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11C#GL_BACK_LEFT BACK_LEFT}{@link GL11C#GL_BACK_RIGHT BACK_RIGHT}{@link GL11C#GL_FRONT FRONT}{@link GL11C#GL_BACK BACK}{@link GL11C#GL_LEFT LEFT}
    {@link GL11C#GL_RIGHT RIGHT}{@link GL11C#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glReadBuffer(@NativeType("GLenum") int src) { - GL11C.glReadBuffer(src); - } - - // --- [ glReadPixels ] --- - - /** Unsafe version of: {@link #glReadPixels ReadPixels} */ - public static void nglReadPixels(int x, int y, int width, int height, int format, int type, long pixels) { - GL11C.nglReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - // --- [ glRecti ] --- - - /** - * Specifies a rectangle as two corner vertices. The effect of the Rect command - * - *

    {@code Rect(x1, y1, x2, y2);}

    - * - *

    is exactly the same as the following sequence of commands: - * {@code - * Begin(POLYGON); - * Vertex2(x1, y1); - * Vertex2(x2, y1); - * Vertex2(x2, y2); - * Vertex2(x1, y2); - * End();}

    - * - *

    The appropriate Vertex2 command would be invoked depending on which of the Rect commands is issued.

    - * - * @param x1 the x coordinate of the first corner vertex - * @param y1 the y coordinate of the first corner vertex - * @param x2 the x coordinate of the second corner vertex - * @param y2 the y coordinate of the second corner vertex - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRecti(@NativeType("GLint") int x1, @NativeType("GLint") int y1, @NativeType("GLint") int x2, @NativeType("GLint") int y2); - - // --- [ glRects ] --- - - /** - * Short version of {@link #glRecti Recti}. - * - * @param x1 the x coordinate of the first corner vertex - * @param y1 the y coordinate of the first corner vertex - * @param x2 the x coordinate of the second corner vertex - * @param y2 the y coordinate of the second corner vertex - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRects(@NativeType("GLshort") short x1, @NativeType("GLshort") short y1, @NativeType("GLshort") short x2, @NativeType("GLshort") short y2); - - // --- [ glRectf ] --- - - /** - * Float version of {@link #glRecti Recti}. - * - * @param x1 the x coordinate of the first corner vertex - * @param y1 the y coordinate of the first corner vertex - * @param x2 the x coordinate of the second corner vertex - * @param y2 the y coordinate of the second corner vertex - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRectf(@NativeType("GLfloat") float x1, @NativeType("GLfloat") float y1, @NativeType("GLfloat") float x2, @NativeType("GLfloat") float y2); - - // --- [ glRectd ] --- - - /** - * Double version of {@link #glRecti Recti}. - * - * @param x1 the x coordinate of the first corner vertex - * @param y1 the y coordinate of the first corner vertex - * @param x2 the x coordinate of the second corner vertex - * @param y2 the y coordinate of the second corner vertex - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRectd(@NativeType("GLdouble") double x1, @NativeType("GLdouble") double y1, @NativeType("GLdouble") double x2, @NativeType("GLdouble") double y2); - - // --- [ glRectiv ] --- - - /** Unsafe version of: {@link #glRectiv Rectiv} */ - public static native void nglRectiv(long v1, long v2); - - /** - * Pointer version of {@link #glRecti Recti}. - * - * @param v1 the first vertex buffer - * @param v2 the second vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectiv(@NativeType("GLint const *") IntBuffer v1, @NativeType("GLint const *") IntBuffer v2) { - if (CHECKS) { - check(v1, 2); - check(v2, 2); - } - nglRectiv(memAddress(v1), memAddress(v2)); - } - - // --- [ glRectsv ] --- - - /** Unsafe version of: {@link #glRectsv Rectsv} */ - public static native void nglRectsv(long v1, long v2); - - /** - * Pointer version of {@link #glRects Rects}. - * - * @param v1 the first vertex buffer - * @param v2 the second vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectsv(@NativeType("GLshort const *") ShortBuffer v1, @NativeType("GLshort const *") ShortBuffer v2) { - if (CHECKS) { - check(v1, 2); - check(v2, 2); - } - nglRectsv(memAddress(v1), memAddress(v2)); - } - - // --- [ glRectfv ] --- - - /** Unsafe version of: {@link #glRectfv Rectfv} */ - public static native void nglRectfv(long v1, long v2); - - /** - * Pointer version of {@link #glRectf Rectf}. - * - * @param v1 the first vertex buffer - * @param v2 the second vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectfv(@NativeType("GLfloat const *") FloatBuffer v1, @NativeType("GLfloat const *") FloatBuffer v2) { - if (CHECKS) { - check(v1, 2); - check(v2, 2); - } - nglRectfv(memAddress(v1), memAddress(v2)); - } - - // --- [ glRectdv ] --- - - /** Unsafe version of: {@link #glRectdv Rectdv} */ - public static native void nglRectdv(long v1, long v2); - - /** - * Pointer version of {@link #glRectd Rectd}. - * - * @param v1 the first vertex buffer - * @param v2 the second vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectdv(@NativeType("GLdouble const *") DoubleBuffer v1, @NativeType("GLdouble const *") DoubleBuffer v2) { - if (CHECKS) { - check(v1, 2); - check(v2, 2); - } - nglRectdv(memAddress(v1), memAddress(v2)); - } - - // --- [ glRenderMode ] --- - - /** - * Sets the current render mode. The default is {@link #GL_RENDER RENDER}. - * - * @param mode the render mode. One of:
    {@link #GL_RENDER RENDER}{@link #GL_SELECT SELECT}{@link #GL_FEEDBACK FEEDBACK}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("GLint") - public static native int glRenderMode(@NativeType("GLenum") int mode); - - // --- [ glRotatef ] --- - - /** - * Manipulates the current matrix with a rotation matrix. - * - *

    {@code angle} gives an angle of rotation in degrees; the coordinates of a vector v are given by v = (x y z)T. The computed matrix - * is a counter-clockwise rotation about the line through the origin with the specified axis when that axis is pointing up (i.e. the right-hand rule - * determines the sense of the rotation angle). The matrix is thus

    - * - * - * - * - * - * - *
    R0
    0
    0
    0001
    - * - *

    Let u = v / ||v|| = (x' y' z')T. If S =

    - * - * - * - * - * - *
    0-z'y'
    z'0-x'
    -y'x'0
    - * - *

    then R = uuT + cos(angle)(I - uuT) + sin(angle)S

    - * - * @param angle the angle of rotation in degrees - * @param x the x coordinate of the rotation vector - * @param y the y coordinate of the rotation vector - * @param z the z coordinate of the rotation vector - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRotatef(@NativeType("GLfloat") float angle, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glRotated ] --- - - /** - * Double version of {@link #glRotatef Rotatef}. - * - * @param angle the angle of rotation in degrees - * @param x the x coordinate of the rotation vector - * @param y the y coordinate of the rotation vector - * @param z the z coordinate of the rotation vector - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glRotated(@NativeType("GLdouble") double angle, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glScalef ] --- - - /** - * Manipulates the current matrix with a general scaling matrix along the x-, y- and z- axes. - * - *

    Calling this function is equivalent to calling {@link #glMultMatrixf MultMatrixf} with the following matrix:

    - * - * - * - * - * - * - *
    x000
    0y00
    00z0
    0001
    - * - * @param x the x-axis scaling factor - * @param y the y-axis scaling factor - * @param z the z-axis scaling factor - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glScalef(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glScaled ] --- - - /** - * Double version of {@link #glScalef Scalef}. - * - * @param x the x-axis scaling factor - * @param y the y-axis scaling factor - * @param z the z-axis scaling factor - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glScaled(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glScissor ] --- - - /** - * Defines the scissor rectangle for all viewports. The scissor test is enabled or disabled for all viewports using {@link #glEnable Enable} or {@link #glDisable Disable} - * with the symbolic constant {@link GL11C#GL_SCISSOR_TEST SCISSOR_TEST}. When disabled, it is as if the scissor test always passes. When enabled, if - * left ≤ xw < left + width and bottom ≤ yw < bottom + height for the scissor rectangle, then the scissor - * test passes. Otherwise, the test fails and the fragment is discarded. - * - * @param x the left scissor rectangle coordinate - * @param y the bottom scissor rectangle coordinate - * @param width the scissor rectangle width - * @param height the scissor rectangle height - * - * @see Reference Page - */ - public static void glScissor(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL11C.glScissor(x, y, width, height); - } - - // --- [ glSelectBuffer ] --- - - /** - * Unsafe version of: {@link #glSelectBuffer SelectBuffer} - * - * @param size the maximum number of values that can be stored in {@code buffer} - */ - public static native void nglSelectBuffer(int size, long buffer); - - /** - * Sets the selection array. - * - * @param buffer an array of unsigned integers to be potentially filled names - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSelectBuffer(@NativeType("GLuint *") IntBuffer buffer) { - nglSelectBuffer(buffer.remaining(), memAddress(buffer)); - } - - // --- [ glShadeModel ] --- - - /** - * Sets the current shade mode. The initial value of the shade mode is {@link #GL_SMOOTH SMOOTH}. - * - *

    If mode is {@link #GL_SMOOTH SMOOTH}, vertex colors are treated individually. If mode is {@link #GL_FLAT FLAT}, flatshading is enabled and colors are taken from the - * provoking vertex of the primitive. The colors selected are those derived from current values, generated by lighting, or generated by vertex shading, if - * lighting is disabled, enabled, or a vertex shader is in use, respectively.

    - * - * @param mode the shade mode. One of:
    {@link #GL_SMOOTH SMOOTH}{@link #GL_FLAT FLAT}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glShadeModel(@NativeType("GLenum") int mode); - - // --- [ glStencilFunc ] --- - - /** - * Controls the stencil test. - * - *

    {@code ref} is an integer reference value that is used in the unsigned stencil comparison. Stencil comparison operations and queries of {@code ref} - * clamp its value to the range [0, 2s – 1], where s is the number of bits in the stencil buffer attached to the draw framebuffer. The s - * least significant bits of {@code mask} are bitwise ANDed with both the reference and the stored stencil value, and the resulting masked values are those that - * participate in the comparison controlled by {@code func}.

    - * - * @param func the stencil comparison function. One of:
    {@link GL11C#GL_NEVER NEVER}{@link GL11C#GL_ALWAYS ALWAYS}{@link GL11C#GL_LESS LESS}{@link GL11C#GL_LEQUAL LEQUAL}{@link GL11C#GL_EQUAL EQUAL}{@link GL11C#GL_GEQUAL GEQUAL}{@link GL11C#GL_GREATER GREATER}{@link GL11C#GL_NOTEQUAL NOTEQUAL}
    - * @param ref the reference value - * @param mask the stencil comparison mask - * - * @see Reference Page - */ - public static void glStencilFunc(@NativeType("GLenum") int func, @NativeType("GLint") int ref, @NativeType("GLuint") int mask) { - GL11C.glStencilFunc(func, ref, mask); - } - - // --- [ glStencilMask ] --- - - /** - * Masks the writing of particular bits into the stencil plans. - * - *

    The least significant s bits of {@code mask}, where s is the number of bits in the stencil buffer, specify an integer mask. Where a 1 appears in this - * mask, the corresponding bit in the stencil buffer is written; where a 0 appears, the bit is not written.

    - * - * @param mask the stencil mask - * - * @see Reference Page - */ - public static void glStencilMask(@NativeType("GLuint") int mask) { - GL11C.glStencilMask(mask); - } - - // --- [ glStencilOp ] --- - - /** - * Indicates what happens to the stored stencil value if this or certain subsequent tests fail or pass. - * - *

    The supported actions are {@link GL11C#GL_KEEP KEEP}, {@link GL11C#GL_ZERO ZERO}, {@link GL11C#GL_REPLACE REPLACE}, {@link GL11C#GL_INCR INCR}, {@link GL11C#GL_DECR DECR}, {@link GL11C#GL_INVERT INVERT}, - * {@link GL14#GL_INCR_WRAP INCR_WRAP} and {@link GL14#GL_DECR_WRAP DECR_WRAP}. These correspond to keeping the current value, setting to zero, replacing with the reference value, - * incrementing with saturation, decrementing with saturation, bitwise inverting it, incrementing without saturation, and decrementing without saturation.

    - * - *

    For purposes of increment and decrement, the stencil bits are considered as an unsigned integer. Incrementing or decrementing with saturation clamps - * the stencil value at 0 and the maximum representable value. Incrementing or decrementing without saturation will wrap such that incrementing the maximum - * representable value results in 0, and decrementing 0 results in the maximum representable value.

    - * - * @param sfail the action to take if the stencil test fails - * @param dpfail the action to take if the depth buffer test fails - * @param dppass the action to take if the depth buffer test passes - * - * @see Reference Page - */ - public static void glStencilOp(@NativeType("GLenum") int sfail, @NativeType("GLenum") int dpfail, @NativeType("GLenum") int dppass) { - GL11C.glStencilOp(sfail, dpfail, dppass); - } - - // --- [ glTexCoord1f ] --- - - /** - * Sets the current one-dimensional texture coordinate. {@code t} and {@code r} are implicitly set to 0 and {@code q} to 1. - * - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord1f(@NativeType("GLfloat") float s); - - // --- [ glTexCoord1s ] --- - - /** - * Short version of {@link #glTexCoord1f TexCoord1f}. - * - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord1s(@NativeType("GLshort") short s); - - // --- [ glTexCoord1i ] --- - - /** - * Integer version of {@link #glTexCoord1f TexCoord1f}. - * - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord1i(@NativeType("GLint") int s); - - // --- [ glTexCoord1d ] --- - - /** - * Double version of {@link #glTexCoord1f TexCoord1f}. - * - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord1d(@NativeType("GLdouble") double s); - - // --- [ glTexCoord1fv ] --- - - /** Unsafe version of: {@link #glTexCoord1fv TexCoord1fv} */ - public static native void nglTexCoord1fv(long v); - - /** - * Pointer version of {@link #glTexCoord1f TexCoord1f}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglTexCoord1fv(memAddress(v)); - } - - // --- [ glTexCoord1sv ] --- - - /** Unsafe version of: {@link #glTexCoord1sv TexCoord1sv} */ - public static native void nglTexCoord1sv(long v); - - /** - * Pointer version of {@link #glTexCoord1s TexCoord1s}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglTexCoord1sv(memAddress(v)); - } - - // --- [ glTexCoord1iv ] --- - - /** Unsafe version of: {@link #glTexCoord1iv TexCoord1iv} */ - public static native void nglTexCoord1iv(long v); - - /** - * Pointer version of {@link #glTexCoord1i TexCoord1i}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglTexCoord1iv(memAddress(v)); - } - - // --- [ glTexCoord1dv ] --- - - /** Unsafe version of: {@link #glTexCoord1dv TexCoord1dv} */ - public static native void nglTexCoord1dv(long v); - - /** - * Pointer version of {@link #glTexCoord1d TexCoord1d}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglTexCoord1dv(memAddress(v)); - } - - // --- [ glTexCoord2f ] --- - - /** - * Sets the current two-dimensional texture coordinate. {@code r} is implicitly set to 0 and {@code q} to 1. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord2f(@NativeType("GLfloat") float s, @NativeType("GLfloat") float t); - - // --- [ glTexCoord2s ] --- - - /** - * Short version of {@link #glTexCoord2f TexCoord2f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord2s(@NativeType("GLshort") short s, @NativeType("GLshort") short t); - - // --- [ glTexCoord2i ] --- - - /** - * Integer version of {@link #glTexCoord2f TexCoord2f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord2i(@NativeType("GLint") int s, @NativeType("GLint") int t); - - // --- [ glTexCoord2d ] --- - - /** - * Double version of {@link #glTexCoord2f TexCoord2f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord2d(@NativeType("GLdouble") double s, @NativeType("GLdouble") double t); - - // --- [ glTexCoord2fv ] --- - - /** Unsafe version of: {@link #glTexCoord2fv TexCoord2fv} */ - public static native void nglTexCoord2fv(long v); - - /** - * Pointer version of {@link #glTexCoord2f TexCoord2f}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglTexCoord2fv(memAddress(v)); - } - - // --- [ glTexCoord2sv ] --- - - /** Unsafe version of: {@link #glTexCoord2sv TexCoord2sv} */ - public static native void nglTexCoord2sv(long v); - - /** - * Pointer version of {@link #glTexCoord2s TexCoord2s}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglTexCoord2sv(memAddress(v)); - } - - // --- [ glTexCoord2iv ] --- - - /** Unsafe version of: {@link #glTexCoord2iv TexCoord2iv} */ - public static native void nglTexCoord2iv(long v); - - /** - * Pointer version of {@link #glTexCoord2i TexCoord2i}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglTexCoord2iv(memAddress(v)); - } - - // --- [ glTexCoord2dv ] --- - - /** Unsafe version of: {@link #glTexCoord2dv TexCoord2dv} */ - public static native void nglTexCoord2dv(long v); - - /** - * Pointer version of {@link #glTexCoord2d TexCoord2d}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglTexCoord2dv(memAddress(v)); - } - - // --- [ glTexCoord3f ] --- - - /** - * Sets the current three-dimensional texture coordinate. {@code q} is implicitly set to 1. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord3f(@NativeType("GLfloat") float s, @NativeType("GLfloat") float t, @NativeType("GLfloat") float r); - - // --- [ glTexCoord3s ] --- - - /** - * Short version of {@link #glTexCoord3f TexCoord3f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord3s(@NativeType("GLshort") short s, @NativeType("GLshort") short t, @NativeType("GLshort") short r); - - // --- [ glTexCoord3i ] --- - - /** - * Integer version of {@link #glTexCoord3f TexCoord3f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord3i(@NativeType("GLint") int s, @NativeType("GLint") int t, @NativeType("GLint") int r); - - // --- [ glTexCoord3d ] --- - - /** - * Double version of {@link #glTexCoord3f TexCoord3f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord3d(@NativeType("GLdouble") double s, @NativeType("GLdouble") double t, @NativeType("GLdouble") double r); - - // --- [ glTexCoord3fv ] --- - - /** Unsafe version of: {@link #glTexCoord3fv TexCoord3fv} */ - public static native void nglTexCoord3fv(long v); - - /** - * Pointer version of {@link #glTexCoord3f TexCoord3f}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglTexCoord3fv(memAddress(v)); - } - - // --- [ glTexCoord3sv ] --- - - /** Unsafe version of: {@link #glTexCoord3sv TexCoord3sv} */ - public static native void nglTexCoord3sv(long v); - - /** - * Pointer version of {@link #glTexCoord3s TexCoord3s}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglTexCoord3sv(memAddress(v)); - } - - // --- [ glTexCoord3iv ] --- - - /** Unsafe version of: {@link #glTexCoord3iv TexCoord3iv} */ - public static native void nglTexCoord3iv(long v); - - /** - * Pointer version of {@link #glTexCoord3i TexCoord3i}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglTexCoord3iv(memAddress(v)); - } - - // --- [ glTexCoord3dv ] --- - - /** Unsafe version of: {@link #glTexCoord3dv TexCoord3dv} */ - public static native void nglTexCoord3dv(long v); - - /** - * Pointer version of {@link #glTexCoord3d TexCoord3d}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglTexCoord3dv(memAddress(v)); - } - - // --- [ glTexCoord4f ] --- - - /** - * Sets the current four-dimensional texture coordinate. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord4f(@NativeType("GLfloat") float s, @NativeType("GLfloat") float t, @NativeType("GLfloat") float r, @NativeType("GLfloat") float q); - - // --- [ glTexCoord4s ] --- - - /** - * Short version of {@link #glTexCoord4f TexCoord4f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord4s(@NativeType("GLshort") short s, @NativeType("GLshort") short t, @NativeType("GLshort") short r, @NativeType("GLshort") short q); - - // --- [ glTexCoord4i ] --- - - /** - * Integer version of {@link #glTexCoord4f TexCoord4f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord4i(@NativeType("GLint") int s, @NativeType("GLint") int t, @NativeType("GLint") int r, @NativeType("GLint") int q); - - // --- [ glTexCoord4d ] --- - - /** - * Double version of {@link #glTexCoord4f TexCoord4f}. - * - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoord4d(@NativeType("GLdouble") double s, @NativeType("GLdouble") double t, @NativeType("GLdouble") double r, @NativeType("GLdouble") double q); - - // --- [ glTexCoord4fv ] --- - - /** Unsafe version of: {@link #glTexCoord4fv TexCoord4fv} */ - public static native void nglTexCoord4fv(long v); - - /** - * Pointer version of {@link #glTexCoord4f TexCoord4f}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglTexCoord4fv(memAddress(v)); - } - - // --- [ glTexCoord4sv ] --- - - /** Unsafe version of: {@link #glTexCoord4sv TexCoord4sv} */ - public static native void nglTexCoord4sv(long v); - - /** - * Pointer version of {@link #glTexCoord4s TexCoord4s}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglTexCoord4sv(memAddress(v)); - } - - // --- [ glTexCoord4iv ] --- - - /** Unsafe version of: {@link #glTexCoord4iv TexCoord4iv} */ - public static native void nglTexCoord4iv(long v); - - /** - * Pointer version of {@link #glTexCoord4i TexCoord4i}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglTexCoord4iv(memAddress(v)); - } - - // --- [ glTexCoord4dv ] --- - - /** Unsafe version of: {@link #glTexCoord4dv TexCoord4dv} */ - public static native void nglTexCoord4dv(long v); - - /** - * Pointer version of {@link #glTexCoord4d TexCoord4d}. - * - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglTexCoord4dv(memAddress(v)); - } - - // --- [ glTexCoordPointer ] --- - - /** Unsafe version of: {@link #glTexCoordPointer TexCoordPointer} */ - public static native void nglTexCoordPointer(int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a texture coordinate array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    1234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the texture coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglTexCoordPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a texture coordinate array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    1234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the texture coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglTexCoordPointer(size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a texture coordinate array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    1234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the texture coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglTexCoordPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a texture coordinate array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    1234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the texture coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglTexCoordPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a texture coordinate array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    1234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the texture coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglTexCoordPointer(size, type, stride, memAddress(pointer)); - } - - // --- [ glTexEnvi ] --- - - /** - * Sets parameters of the texture environment that specifies how texture values are interpreted when texturing a fragment, or sets per-texture-unit - * filtering parameters. - * - * @param target the texture environment target. One of:
    {@link #GL_TEXTURE_ENV TEXTURE_ENV}{@link GL14#GL_TEXTURE_FILTER_CONTROL TEXTURE_FILTER_CONTROL}{@link GL20#GL_POINT_SPRITE POINT_SPRITE}
    - * @param pname the parameter to set. One of:
    {@link GL20#GL_COORD_REPLACE COORD_REPLACE}{@link #GL_TEXTURE_ENV_MODE TEXTURE_ENV_MODE}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL13#GL_COMBINE_RGB COMBINE_RGB}{@link GL13#GL_COMBINE_ALPHA COMBINE_ALPHA}{@link GL15#GL_SRC0_RGB SRC0_RGB}
    {@link GL15#GL_SRC1_RGB SRC1_RGB}{@link GL15#GL_SRC2_RGB SRC2_RGB}{@link GL15#GL_SRC0_ALPHA SRC0_ALPHA}{@link GL15#GL_SRC1_ALPHA SRC1_ALPHA}{@link GL15#GL_SRC2_ALPHA SRC2_ALPHA}{@link GL13#GL_OPERAND0_RGB OPERAND0_RGB}
    {@link GL13#GL_OPERAND1_RGB OPERAND1_RGB}{@link GL13#GL_OPERAND2_RGB OPERAND2_RGB}{@link GL13#GL_OPERAND0_ALPHA OPERAND0_ALPHA}{@link GL13#GL_OPERAND1_ALPHA OPERAND1_ALPHA}{@link GL13#GL_OPERAND2_ALPHA OPERAND2_ALPHA}{@link GL13#GL_RGB_SCALE RGB_SCALE}
    {@link #GL_ALPHA_SCALE ALPHA_SCALE}
    - * @param param the parameter value. Scalar value or one of:
    {@link #GL_REPLACE REPLACE}{@link #GL_MODULATE MODULATE}{@link #GL_DECAL DECAL}{@link #GL_BLEND BLEND}{@link #GL_ADD ADD}{@link GL13#GL_COMBINE COMBINE}{@link GL13#GL_ADD_SIGNED ADD_SIGNED}{@link GL13#GL_INTERPOLATE INTERPOLATE}
    {@link GL13#GL_SUBTRACT SUBTRACT}{@link GL13#GL_DOT3_RGB DOT3_RGB}{@link GL13#GL_DOT3_RGBA DOT3_RGBA}{@link #GL_TEXTURE TEXTURE}{@link GL13#GL_TEXTURE0 TEXTURE0}GL13.GL_TEXTURE[1-31]{@link GL13#GL_CONSTANT CONSTANT}{@link GL13#GL_PRIMARY_COLOR PRIMARY_COLOR}
    {@link GL13#GL_PREVIOUS PREVIOUS}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexEnvi(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glTexEnviv ] --- - - /** Unsafe version of: {@link #glTexEnviv TexEnviv} */ - public static native void nglTexEnviv(int target, int pname, long params); - - /** - * Pointer version of {@link #glTexEnvi TexEnvi}. - * - * @param target the texture environment target. Must be:
    {@link #GL_TEXTURE_ENV TEXTURE_ENV}
    - * @param pname the parameter to set. Must be:
    {@link #GL_TEXTURE_ENV_COLOR TEXTURE_ENV_COLOR}
    - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexEnviv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTexEnviv(target, pname, memAddress(params)); - } - - // --- [ glTexEnvf ] --- - - /** - * Float version of {@link #glTexEnvi TexEnvi}. - * - * @param target the texture environment target - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexEnvf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glTexEnvfv ] --- - - /** Unsafe version of: {@link #glTexEnvfv TexEnvfv} */ - public static native void nglTexEnvfv(int target, int pname, long params); - - /** - * Pointer version of {@link #glTexEnvf TexEnvf}. - * - * @param target the texture environment target. Must be:
    {@link #GL_TEXTURE_ENV TEXTURE_ENV}
    - * @param pname the parameter to set. Must be:
    {@link #GL_TEXTURE_ENV_COLOR TEXTURE_ENV_COLOR}
    - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexEnvfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTexEnvfv(target, pname, memAddress(params)); - } - - // --- [ glTexGeni ] --- - - /** - * Sets an integer texture coordinate generation parameter. - * - *

    A texture coordinate generation function is enabled or disabled using {@link #glEnable Enable} and {@link #glDisable Disable} with an argument of - * {@link #GL_TEXTURE_GEN_S TEXTURE_GEN_S}, {@link #GL_TEXTURE_GEN_T TEXTURE_GEN_T}, {@link #GL_TEXTURE_GEN_R TEXTURE_GEN_R}, or {@link #GL_TEXTURE_GEN_Q TEXTURE_GEN_Q} (each indicates the corresponding texture - * coordinate). When enabled, the specified texture coordinate is computed according to the current {@link #GL_EYE_LINEAR EYE_LINEAR}, {@link #GL_OBJECT_LINEAR OBJECT_LINEAR} or - * {@link #GL_SPHERE_MAP SPHERE_MAP} specification, depending on the current setting of {@link #GL_TEXTURE_GEN_MODE TEXTURE_GEN_MODE} for that coordinate. When disabled, subsequent - * vertices will take the indicated texture coordinate from the current texture coordinates.

    - * - *

    The initial state has the texture generation function disabled for all texture coordinates. Initially all texture generation modes are EYE_LINEAR.

    - * - * @param coord the coordinate for which to set the parameter. One of:
    {@link #GL_S S}{@link #GL_T T}{@link #GL_R R}{@link #GL_Q Q}
    - * @param pname the parameter to set. Must be:
    {@link #GL_TEXTURE_GEN_MODE TEXTURE_GEN_MODE}
    - * @param param the parameter value. One of:
    {@link #GL_OBJECT_LINEAR OBJECT_LINEAR}{@link #GL_EYE_LINEAR EYE_LINEAR}{@link #GL_SPHERE_MAP SPHERE_MAP}{@link GL13#GL_REFLECTION_MAP REFLECTION_MAP}{@link GL13#GL_NORMAL_MAP NORMAL_MAP}
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexGeni(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glTexGeniv ] --- - - /** Unsafe version of: {@link #glTexGeniv TexGeniv} */ - public static native void nglTexGeniv(int coord, int pname, long params); - - /** - * Pointer version of {@link #glTexGeni TexGeni}. - * - * @param coord the coordinate for which to set the parameter - * @param pname the parameter to set. One of:
    {@link #GL_OBJECT_PLANE OBJECT_PLANE}{@link #GL_EYE_PLANE EYE_PLANE}
    - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexGeniv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTexGeniv(coord, pname, memAddress(params)); - } - - // --- [ glTexGenf ] --- - - /** - * Float version of {@link #glTexGeni TexGeni}. - * - * @param coord the coordinate for which to set the parameter - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexGenf(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glTexGenfv ] --- - - /** Unsafe version of: {@link #glTexGenfv TexGenfv} */ - public static native void nglTexGenfv(int coord, int pname, long params); - - /** - * Pointer version of {@link #glTexGenf TexGenf}. - * - * @param coord the coordinate for which to set the parameter - * @param pname the parameter to set. One of:
    {@link #GL_OBJECT_PLANE OBJECT_PLANE}{@link #GL_EYE_PLANE EYE_PLANE}
    - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexGenfv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTexGenfv(coord, pname, memAddress(params)); - } - - // --- [ glTexGend ] --- - - /** - * Double version of {@link #glTexGeni TexGeni}. - * - * @param coord the coordinate for which to set the parameter - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexGend(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble") double param); - - // --- [ glTexGendv ] --- - - /** Unsafe version of: {@link #glTexGendv TexGendv} */ - public static native void nglTexGendv(int coord, int pname, long params); - - /** - * Pointer version of {@link #glTexGend TexGend}. - * - * @param coord the coordinate for which to set the parameter - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexGendv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble const *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTexGendv(coord, pname, memAddress(params)); - } - - // --- [ glTexImage1D ] --- - - /** Unsafe version of: {@link #glTexImage1D TexImage1D} */ - public static void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, long pixels) { - GL11C.nglTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - // --- [ glTexImage2D ] --- - - /** Unsafe version of: {@link #glTexImage2D TexImage2D} */ - public static void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels) { - GL11C.nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11C#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11C#GL_R3_G3_B2 R3_G3_B2}{@link GL11C#GL_RGB4 RGB4}{@link GL11C#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11C#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11C#GL_RGB10 RGB10}{@link GL11C#GL_RGB12 RGB12}{@link GL11C#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11C#GL_RGBA2 RGBA2}{@link GL11C#GL_RGBA4 RGBA4}{@link GL11C#GL_RGB5_A1 RGB5_A1}{@link GL11C#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11C#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11C#GL_RGBA12 RGBA12}{@link GL11C#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11C#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11C#GL_R3_G3_B2 R3_G3_B2}{@link GL11C#GL_RGB4 RGB4}{@link GL11C#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11C#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11C#GL_RGB10 RGB10}{@link GL11C#GL_RGB12 RGB12}{@link GL11C#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11C#GL_RGBA2 RGBA2}{@link GL11C#GL_RGBA4 RGBA4}{@link GL11C#GL_RGB5_A1 RGB5_A1}{@link GL11C#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11C#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11C#GL_RGBA12 RGBA12}{@link GL11C#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11C#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11C#GL_R3_G3_B2 R3_G3_B2}{@link GL11C#GL_RGB4 RGB4}{@link GL11C#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11C#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11C#GL_RGB10 RGB10}{@link GL11C#GL_RGB12 RGB12}{@link GL11C#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11C#GL_RGBA2 RGBA2}{@link GL11C#GL_RGBA4 RGBA4}{@link GL11C#GL_RGB5_A1 RGB5_A1}{@link GL11C#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11C#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11C#GL_RGBA12 RGBA12}{@link GL11C#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11C#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11C#GL_R3_G3_B2 R3_G3_B2}{@link GL11C#GL_RGB4 RGB4}{@link GL11C#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11C#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11C#GL_RGB10 RGB10}{@link GL11C#GL_RGB12 RGB12}{@link GL11C#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11C#GL_RGBA2 RGBA2}{@link GL11C#GL_RGBA4 RGBA4}{@link GL11C#GL_RGB5_A1 RGB5_A1}{@link GL11C#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11C#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11C#GL_RGBA12 RGBA12}{@link GL11C#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11C#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11C#GL_R3_G3_B2 R3_G3_B2}{@link GL11C#GL_RGB4 RGB4}{@link GL11C#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11C#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11C#GL_RGB10 RGB10}{@link GL11C#GL_RGB12 RGB12}{@link GL11C#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11C#GL_RGBA2 RGBA2}{@link GL11C#GL_RGBA4 RGBA4}{@link GL11C#GL_RGB5_A1 RGB5_A1}{@link GL11C#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11C#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11C#GL_RGBA12 RGBA12}{@link GL11C#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11C#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11C#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11C#GL_R3_G3_B2 R3_G3_B2}{@link GL11C#GL_RGB4 RGB4}{@link GL11C#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11C#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11C#GL_RGB10 RGB10}{@link GL11C#GL_RGB12 RGB12}{@link GL11C#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11C#GL_RGBA2 RGBA2}{@link GL11C#GL_RGBA4 RGBA4}{@link GL11C#GL_RGB5_A1 RGB5_A1}{@link GL11C#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11C#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11C#GL_RGBA12 RGBA12}{@link GL11C#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - // --- [ glCopyTexImage1D ] --- - - /** - * Defines a one-dimensional texel array in exactly the manner of {@link #glTexImage1D TexImage1D}, except that the image data are taken from the framebuffer rather - * than from client memory. For the purposes of decoding the texture image, {@code CopyTexImage1D} is equivalent to calling {@link #glCopyTexImage2D CopyTexImage2D} - * with corresponding arguments and height of 1, except that the height of the image is always 1, regardless of the value of border. level, internalformat, - * and border are specified using the same values, with the same meanings, as the corresponding arguments of {@link #glTexImage1D TexImage1D}. The constraints on - * width and border are exactly those of the corresponding arguments of {@link #glTexImage1D TexImage1D}. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalFormat the texture internal format. See {@link #glTexImage2D TexImage2D} for a list of supported formats. - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture width - * @param border the texture border width - * - * @see Reference Page - */ - public static void glCopyTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalFormat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLint") int border) { - GL11C.glCopyTexImage1D(target, level, internalFormat, x, y, width, border); - } - - // --- [ glCopyTexImage2D ] --- - - /** - * Defines a two-dimensional texel array in exactly the manner of {@link #glTexImage2D TexImage2D}, except that the image data are taken from the framebuffer rather - * than from client memory. - * - *

    {@code x}, {@code y}, {@code width}, and {@code height} correspond precisely to the corresponding arguments to {@link #glReadPixels ReadPixels}; they specify the - * image's width and height, and the lower left (x, y) coordinates of the framebuffer region to be copied.

    - * - *

    The image is taken from the framebuffer exactly as if these arguments were passed to {@link GL11#glCopyPixels CopyPixels} with argument type set to {@link GL11C#GL_COLOR COLOR}, - * {@link GL11C#GL_DEPTH DEPTH}, or {@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}, depending on {@code internalformat}. RGBA data is taken from the current color buffer, while depth - * component and stencil index data are taken from the depth and stencil buffers, respectively.

    - * - *

    Subsequent processing is identical to that described for {@link #glTexImage2D TexImage2D}, beginning with clamping of the R, G, B, A, or depth values, and masking - * of the stencil index values from the resulting pixel groups. Parameters {@code level}, {@code internalformat}, and {@code border} are specified using - * the same values, with the same meanings, as the corresponding arguments of {@link #glTexImage2D TexImage2D}.

    - * - *

    The constraints on width, height, and border are exactly those for the corresponding arguments of {@link #glTexImage2D TexImage2D}.

    - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalFormat the texture internal format. See {@link #glTexImage2D TexImage2D} for a list of supported formats. - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * - * @see Reference Page - */ - public static void glCopyTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalFormat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border) { - GL11C.glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border); - } - - // --- [ glCopyTexSubImage1D ] --- - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the {@code internalformat}, {@code width} or {@code border} - * parameters of the specified texel array, nor is any change made to texel values outside the specified subregion. See {@link #glCopyTexImage1D CopyTexImage1D} for more - * details. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * - * @see Reference Page - */ - public static void glCopyTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width) { - GL11C.glCopyTexSubImage1D(target, level, xoffset, x, y, width); - } - - // --- [ glCopyTexSubImage2D ] --- - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the {@code internalformat}, {@code width}, {@code height}, - * or {@code border} parameters of the specified texel array, nor is any change made to texel values outside the specified subregion. See - * {@link #glCopyTexImage2D CopyTexImage2D} for more details. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param yoffset the lower texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static void glCopyTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL11C.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); - } - - // --- [ glTexParameteri ] --- - - /** - * Sets the integer value of a texture parameter, which controls how the texel array is treated when specified or changed, and when applied to a fragment. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}{@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param pname the parameter to set. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11C#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11C#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11C#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11C#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11C#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static void glTexParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL11C.glTexParameteri(target, pname, param); - } - - // --- [ glTexParameteriv ] --- - - /** Unsafe version of: {@link #glTexParameteriv TexParameteriv} */ - public static void nglTexParameteriv(int target, int pname, long params) { - GL11C.nglTexParameteriv(target, pname, params); - } - - /** - * Pointer version of {@link #glTexParameteri TexParameteri}. - * - * @param target the texture target - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL11C.glTexParameteriv(target, pname, params); - } - - // --- [ glTexParameterf ] --- - - /** - * Float version of {@link #glTexParameteri TexParameteri}. - * - * @param target the texture target - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - */ - public static void glTexParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param) { - GL11C.glTexParameterf(target, pname, param); - } - - // --- [ glTexParameterfv ] --- - - /** Unsafe version of: {@link #glTexParameterfv TexParameterfv} */ - public static void nglTexParameterfv(int target, int pname, long params) { - GL11C.nglTexParameterfv(target, pname, params); - } - - /** - * Pointer version of {@link #glTexParameterf TexParameterf}. - * - * @param target the texture target - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - GL11C.glTexParameterfv(target, pname, params); - } - - // --- [ glTexSubImage1D ] --- - - /** Unsafe version of: {@link #glTexSubImage1D TexSubImage1D} */ - public static void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, long pixels) { - GL11C.nglTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link GL11C#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - // --- [ glTexSubImage2D ] --- - - /** Unsafe version of: {@link #glTexSubImage2D TexSubImage2D} */ - public static void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels) { - GL11C.nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL11C#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11C#GL_RED RED}{@link GL11C#GL_GREEN GREEN}{@link GL11C#GL_BLUE BLUE}{@link GL11C#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11C#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11C#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11C#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11C#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11C#GL_BYTE BYTE}{@link GL11C#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11C#GL_SHORT SHORT}
    {@link GL11C#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11C#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11C#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - // --- [ glTranslatef ] --- - - /** - * Manipulates the current matrix with a translation matrix along the x-, y- and z- axes. - * - *

    Calling this function is equivalent to calling {@link #glMultMatrixf MultMatrixf} with the following matrix:

    - * - * - * - * - * - * - *
    100x
    010y
    001z
    0001
    - * - * @param x the x-axis translation - * @param y the y-axis translation - * @param z the z-axis translation - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTranslatef(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glTranslated ] --- - - /** - * Double version of {@link #glTranslatef Translatef}. - * - * @param x the x-axis translation - * @param y the y-axis translation - * @param z the z-axis translation - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTranslated(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glVertex2f ] --- - - /** - * Specifies a single vertex between {@link #glBegin Begin} and {@link #glEnd End} by giving its coordinates in two dimensions. The z coordinate is implicitly set - * to zero and the w coordinate to one. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex2f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y); - - // --- [ glVertex2s ] --- - - /** - * Short version of {@link #glVertex2f Vertex2f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex2s(@NativeType("GLshort") short x, @NativeType("GLshort") short y); - - // --- [ glVertex2i ] --- - - /** - * Integer version of {@link #glVertex2f Vertex2f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex2i(@NativeType("GLint") int x, @NativeType("GLint") int y); - - // --- [ glVertex2d ] --- - - /** - * Double version of {@link #glVertex2f Vertex2f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex2d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glVertex2fv ] --- - - /** Unsafe version of: {@link #glVertex2fv Vertex2fv} */ - public static native void nglVertex2fv(long coords); - - /** - * Pointer version of {@link #glVertex2f Vertex2f}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2fv(@NativeType("GLfloat const *") FloatBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglVertex2fv(memAddress(coords)); - } - - // --- [ glVertex2sv ] --- - - /** Unsafe version of: {@link #glVertex2sv Vertex2sv} */ - public static native void nglVertex2sv(long coords); - - /** - * Pointer version of {@link #glVertex2s Vertex2s}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2sv(@NativeType("GLshort const *") ShortBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglVertex2sv(memAddress(coords)); - } - - // --- [ glVertex2iv ] --- - - /** Unsafe version of: {@link #glVertex2iv Vertex2iv} */ - public static native void nglVertex2iv(long coords); - - /** - * Pointer version of {@link #glVertex2i Vertex2i}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2iv(@NativeType("GLint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglVertex2iv(memAddress(coords)); - } - - // --- [ glVertex2dv ] --- - - /** Unsafe version of: {@link #glVertex2dv Vertex2dv} */ - public static native void nglVertex2dv(long coords); - - /** - * Pointer version of {@link #glVertex2d Vertex2d}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2dv(@NativeType("GLdouble const *") DoubleBuffer coords) { - if (CHECKS) { - check(coords, 2); - } - nglVertex2dv(memAddress(coords)); - } - - // --- [ glVertex3f ] --- - - /** - * Specifies a single vertex between {@link #glBegin Begin} and {@link #glEnd End} by giving its coordinates in three dimensions. The w coordinate is implicitly set - * to one. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex3f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glVertex3s ] --- - - /** - * Short version of {@link #glVertex3f Vertex3f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex3s(@NativeType("GLshort") short x, @NativeType("GLshort") short y, @NativeType("GLshort") short z); - - // --- [ glVertex3i ] --- - - /** - * Integer version of {@link #glVertex3f Vertex3f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex3i(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glVertex3d ] --- - - /** - * Double version of {@link #glVertex3f Vertex3f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex3d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glVertex3fv ] --- - - /** Unsafe version of: {@link #glVertex3fv Vertex3fv} */ - public static native void nglVertex3fv(long coords); - - /** - * Pointer version of {@link #glVertex3f Vertex3f}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3fv(@NativeType("GLfloat const *") FloatBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglVertex3fv(memAddress(coords)); - } - - // --- [ glVertex3sv ] --- - - /** Unsafe version of: {@link #glVertex3sv Vertex3sv} */ - public static native void nglVertex3sv(long coords); - - /** - * Pointer version of {@link #glVertex3s Vertex3s}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3sv(@NativeType("GLshort const *") ShortBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglVertex3sv(memAddress(coords)); - } - - // --- [ glVertex3iv ] --- - - /** Unsafe version of: {@link #glVertex3iv Vertex3iv} */ - public static native void nglVertex3iv(long coords); - - /** - * Pointer version of {@link #glVertex3i Vertex3i}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3iv(@NativeType("GLint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglVertex3iv(memAddress(coords)); - } - - // --- [ glVertex3dv ] --- - - /** Unsafe version of: {@link #glVertex3dv Vertex3dv} */ - public static native void nglVertex3dv(long coords); - - /** - * Pointer version of {@link #glVertex3d Vertex3d}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3dv(@NativeType("GLdouble const *") DoubleBuffer coords) { - if (CHECKS) { - check(coords, 3); - } - nglVertex3dv(memAddress(coords)); - } - - // --- [ glVertex4f ] --- - - /** - * Specifies a single vertex between {@link #glBegin Begin} and {@link #glEnd End} by giving its coordinates in four dimensions. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * @param w the vertex w coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex4f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w); - - // --- [ glVertex4s ] --- - - /** - * Short version of {@link #glVertex4f Vertex4f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * @param w the vertex w coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex4s(@NativeType("GLshort") short x, @NativeType("GLshort") short y, @NativeType("GLshort") short z, @NativeType("GLshort") short w); - - // --- [ glVertex4i ] --- - - /** - * Integer version of {@link #glVertex4f Vertex4f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * @param w the vertex w coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex4i(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glVertex4d ] --- - - /** - * Double version of {@link #glVertex4f Vertex4f}. - * - * @param x the vertex x coordinate - * @param y the vertex y coordinate - * @param z the vertex z coordinate - * @param w the vertex w coordinate - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertex4d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glVertex4fv ] --- - - /** Unsafe version of: {@link #glVertex4fv Vertex4fv} */ - public static native void nglVertex4fv(long coords); - - /** - * Pointer version of {@link #glVertex4f Vertex4f}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4fv(@NativeType("GLfloat const *") FloatBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglVertex4fv(memAddress(coords)); - } - - // --- [ glVertex4sv ] --- - - /** Unsafe version of: {@link #glVertex4sv Vertex4sv} */ - public static native void nglVertex4sv(long coords); - - /** - * Pointer version of {@link #glVertex4s Vertex4s}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4sv(@NativeType("GLshort const *") ShortBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglVertex4sv(memAddress(coords)); - } - - // --- [ glVertex4iv ] --- - - /** Unsafe version of: {@link #glVertex4iv Vertex4iv} */ - public static native void nglVertex4iv(long coords); - - /** - * Pointer version of {@link #glVertex4i Vertex4i}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4iv(@NativeType("GLint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglVertex4iv(memAddress(coords)); - } - - // --- [ glVertex4dv ] --- - - /** Unsafe version of: {@link #glVertex4dv Vertex4dv} */ - public static native void nglVertex4dv(long coords); - - /** - * Pointer version of {@link #glVertex4d Vertex4d}. - * - * @param coords the vertex buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4dv(@NativeType("GLdouble const *") DoubleBuffer coords) { - if (CHECKS) { - check(coords, 4); - } - nglVertex4dv(memAddress(coords)); - } - - // --- [ glVertexPointer ] --- - - /** Unsafe version of: {@link #glVertexPointer VertexPointer} */ - public static native void nglVertexPointer(int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a vertex array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglVertexPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglVertexPointer(size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglVertexPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglVertexPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex array. - * - * @param size the number of values per vertex that are stored in the array. One of:
    234
    - * @param type the data type of the values stored in the array. One of:
    {@link #GL_SHORT SHORT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}{@link #GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the vertex array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglVertexPointer(size, type, stride, memAddress(pointer)); - } - - // --- [ glViewport ] --- - - /** - * Specifies the viewport transformation parameters for all viewports. - * - *

    The location of the viewport's bottom-left corner, given by {@code (x, y)}, are clamped to be within the implementation-dependent viewport bounds range. - * The viewport bounds range {@code [min, max]} tuple may be determined by calling {@link #glGetFloatv GetFloatv} with the symbolic - * constant {@link GL41#GL_VIEWPORT_BOUNDS_RANGE VIEWPORT_BOUNDS_RANGE}. Viewport width and height are clamped to implementation-dependent maximums when specified. The maximum - * width and height may be found by calling {@link #glGetFloatv GetFloatv} with the symbolic constant {@link GL11C#GL_MAX_VIEWPORT_DIMS MAX_VIEWPORT_DIMS}. The - * maximum viewport dimensions must be greater than or equal to the larger of the visible dimensions of the display being rendered to (if a display - * exists), and the largest renderbuffer image which can be successfully created and attached to a framebuffer object.

    - * - *

    In the initial state, {@code w} and {@code h} for each viewport are set to the width and height, respectively, of the window into which the GL is to do - * its rendering. If the default framebuffer is bound but no default framebuffer is associated with the GL context, then {@code w} and {@code h} are - * initially set to zero.

    - * - * @param x the left viewport coordinate - * @param y the bottom viewport coordinate - * @param w the viewport width - * @param h the viewport height - * - * @see Reference Page - */ - public static void glViewport(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int w, @NativeType("GLsizei") int h) { - GL11C.glViewport(x, y, w, h); - } - - /** - * Array version of: {@link #glAreTexturesResident AreTexturesResident} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - @NativeType("GLboolean") - public static boolean glAreTexturesResident(@NativeType("GLuint const *") int[] textures, @NativeType("GLboolean *") ByteBuffer residences) { - long __functionAddress = GL.getICD().glAreTexturesResident; - if (CHECKS) { - check(__functionAddress); - check(residences, textures.length); - } - return callPPZ(textures.length, textures, memAddress(residences), __functionAddress); - } - - /** - * Array version of: {@link #glClipPlane ClipPlane} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glClipPlane(@NativeType("GLenum") int plane, @NativeType("GLdouble const *") double[] equation) { - long __functionAddress = GL.getICD().glClipPlane; - if (CHECKS) { - check(__functionAddress); - check(equation, 4); - } - callPV(plane, equation, __functionAddress); - } - - /** - * Array version of: {@link #glColor3sv Color3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glColor3sv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor3iv Color3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glColor3iv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor3fv Color3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glColor3fv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor3dv Color3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glColor3dv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor3usv Color3usv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3usv(@NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glColor3usv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor3uiv Color3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor3uiv(@NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glColor3uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor4sv Color4sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glColor4sv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor4iv Color4iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glColor4iv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor4fv Color4fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glColor4fv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor4dv Color4dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glColor4dv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor4usv Color4usv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4usv(@NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glColor4usv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glColor4uiv Color4uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColor4uiv(@NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glColor4uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glDrawPixels DrawPixels} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glDrawPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glDrawPixels DrawPixels} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glDrawPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glDrawPixels DrawPixels} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glDrawPixels(@NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glDrawPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glEvalCoord1fv EvalCoord1fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord1fv(@NativeType("GLfloat const *") float[] u) { - long __functionAddress = GL.getICD().glEvalCoord1fv; - if (CHECKS) { - check(__functionAddress); - check(u, 1); - } - callPV(u, __functionAddress); - } - - /** - * Array version of: {@link #glEvalCoord1dv EvalCoord1dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord1dv(@NativeType("GLdouble const *") double[] u) { - long __functionAddress = GL.getICD().glEvalCoord1dv; - if (CHECKS) { - check(__functionAddress); - check(u, 1); - } - callPV(u, __functionAddress); - } - - /** - * Array version of: {@link #glEvalCoord2fv EvalCoord2fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord2fv(@NativeType("GLfloat const *") float[] u) { - long __functionAddress = GL.getICD().glEvalCoord2fv; - if (CHECKS) { - check(__functionAddress); - check(u, 2); - } - callPV(u, __functionAddress); - } - - /** - * Array version of: {@link #glEvalCoord2dv EvalCoord2dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glEvalCoord2dv(@NativeType("GLdouble const *") double[] u) { - long __functionAddress = GL.getICD().glEvalCoord2dv; - if (CHECKS) { - check(__functionAddress); - check(u, 2); - } - callPV(u, __functionAddress); - } - - /** - * Array version of: {@link #glFeedbackBuffer FeedbackBuffer} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFeedbackBuffer(@NativeType("GLenum") int type, @NativeType("GLfloat *") float[] buffer) { - long __functionAddress = GL.getICD().glFeedbackBuffer; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer.length, type, buffer, __functionAddress); - } - - /** - * Array version of: {@link #glFogiv Fogiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogiv(@NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glFogiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glFogfv Fogfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glFogfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGenTextures GenTextures} - * - * @see Reference Page - */ - public static void glGenTextures(@NativeType("GLuint *") int[] textures) { - GL11C.glGenTextures(textures); - } - - /** - * Array version of: {@link #glDeleteTextures DeleteTextures} - * - * @see Reference Page - */ - public static void glDeleteTextures(@NativeType("GLuint const *") int[] textures) { - GL11C.glDeleteTextures(textures); - } - - /** - * Array version of: {@link #glGetClipPlane GetClipPlane} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetClipPlane(@NativeType("GLenum") int plane, @NativeType("GLdouble *") double[] equation) { - long __functionAddress = GL.getICD().glGetClipPlane; - if (CHECKS) { - check(__functionAddress); - check(equation, 4); - } - callPV(plane, equation, __functionAddress); - } - - /** - * Array version of: {@link #glGetFloatv GetFloatv} - * - * @see Reference Page - */ - public static void glGetFloatv(@NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL11C.glGetFloatv(pname, params); - } - - /** - * Array version of: {@link #glGetIntegerv GetIntegerv} - * - * @see Reference Page - */ - public static void glGetIntegerv(@NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL11C.glGetIntegerv(pname, params); - } - - /** - * Array version of: {@link #glGetDoublev GetDoublev} - * - * @see Reference Page - */ - public static void glGetDoublev(@NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - GL11C.glGetDoublev(pname, params); - } - - /** - * Array version of: {@link #glGetLightiv GetLightiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetLightiv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetLightiv; - if (CHECKS) { - check(__functionAddress); - check(data, 4); - } - callPV(light, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetLightfv GetLightfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetLightfv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetLightfv; - if (CHECKS) { - check(__functionAddress); - check(data, 4); - } - callPV(light, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetMapiv GetMapiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMapiv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetMapiv; - if (CHECKS) { - check(__functionAddress); - check(data, 4); - } - callPV(target, query, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetMapfv GetMapfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMapfv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetMapfv; - if (CHECKS) { - check(__functionAddress); - check(data, 4); - } - callPV(target, query, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetMapdv GetMapdv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMapdv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLdouble *") double[] data) { - long __functionAddress = GL.getICD().glGetMapdv; - if (CHECKS) { - check(__functionAddress); - check(data, 4); - } - callPV(target, query, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetMaterialiv GetMaterialiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMaterialiv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetMaterialiv; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(face, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetMaterialfv GetMaterialfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetMaterialfv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetMaterialfv; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(face, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetPixelMapfv GetPixelMapfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetPixelMapfv; - if (CHECKS) { - check(__functionAddress); - check(data, 32); - } - callPV(map, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetPixelMapusv GetPixelMapusv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLushort *") short[] data) { - long __functionAddress = GL.getICD().glGetPixelMapusv; - if (CHECKS) { - check(__functionAddress); - check(data, 32); - } - callPV(map, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetPixelMapuiv GetPixelMapuiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLuint *") int[] data) { - long __functionAddress = GL.getICD().glGetPixelMapuiv; - if (CHECKS) { - check(__functionAddress); - check(data, 32); - } - callPV(map, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexEnviv GetTexEnviv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexEnviv(@NativeType("GLenum") int env, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetTexEnviv; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(env, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexEnvfv GetTexEnvfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexEnvfv(@NativeType("GLenum") int env, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetTexEnvfv; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(env, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexGeniv GetTexGeniv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexGeniv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetTexGeniv; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(coord, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexGenfv GetTexGenfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexGenfv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetTexGenfv; - if (CHECKS) { - check(__functionAddress); - check(data, 4); - } - callPV(coord, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexGendv GetTexGendv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glGetTexGendv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] data) { - long __functionAddress = GL.getICD().glGetTexGendv; - if (CHECKS) { - check(__functionAddress); - check(data, 4); - } - callPV(coord, pname, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - GL11C.glGetTexImage(tex, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTexLevelParameteriv GetTexLevelParameteriv} - * - * @see Reference Page - */ - public static void glGetTexLevelParameteriv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL11C.glGetTexLevelParameteriv(target, level, pname, params); - } - - /** - * Array version of: {@link #glGetTexLevelParameterfv GetTexLevelParameterfv} - * - * @see Reference Page - */ - public static void glGetTexLevelParameterfv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL11C.glGetTexLevelParameterfv(target, level, pname, params); - } - - /** - * Array version of: {@link #glGetTexParameteriv GetTexParameteriv} - * - * @see Reference Page - */ - public static void glGetTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL11C.glGetTexParameteriv(target, pname, params); - } - - /** - * Array version of: {@link #glGetTexParameterfv GetTexParameterfv} - * - * @see Reference Page - */ - public static void glGetTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL11C.glGetTexParameterfv(target, pname, params); - } - - /** - * Array version of: {@link #glIndexiv Indexiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexiv(@NativeType("GLint const *") int[] index) { - long __functionAddress = GL.getICD().glIndexiv; - if (CHECKS) { - check(__functionAddress); - check(index, 1); - } - callPV(index, __functionAddress); - } - - /** - * Array version of: {@link #glIndexsv Indexsv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexsv(@NativeType("GLshort const *") short[] index) { - long __functionAddress = GL.getICD().glIndexsv; - if (CHECKS) { - check(__functionAddress); - check(index, 1); - } - callPV(index, __functionAddress); - } - - /** - * Array version of: {@link #glIndexfv Indexfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexfv(@NativeType("GLfloat const *") float[] index) { - long __functionAddress = GL.getICD().glIndexfv; - if (CHECKS) { - check(__functionAddress); - check(index, 1); - } - callPV(index, __functionAddress); - } - - /** - * Array version of: {@link #glIndexdv Indexdv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glIndexdv(@NativeType("GLdouble const *") double[] index) { - long __functionAddress = GL.getICD().glIndexdv; - if (CHECKS) { - check(__functionAddress); - check(index, 1); - } - callPV(index, __functionAddress); - } - - /** - * Array version of: {@link #glInterleavedArrays InterleavedArrays} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") short[] pointer) { - long __functionAddress = GL.getICD().glInterleavedArrays; - if (CHECKS) { - check(__functionAddress); - } - callPV(format, stride, pointer, __functionAddress); - } - - /** - * Array version of: {@link #glInterleavedArrays InterleavedArrays} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") int[] pointer) { - long __functionAddress = GL.getICD().glInterleavedArrays; - if (CHECKS) { - check(__functionAddress); - } - callPV(format, stride, pointer, __functionAddress); - } - - /** - * Array version of: {@link #glInterleavedArrays InterleavedArrays} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") float[] pointer) { - long __functionAddress = GL.getICD().glInterleavedArrays; - if (CHECKS) { - check(__functionAddress); - } - callPV(format, stride, pointer, __functionAddress); - } - - /** - * Array version of: {@link #glInterleavedArrays InterleavedArrays} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glInterleavedArrays(@NativeType("GLenum") int format, @NativeType("GLsizei") int stride, @NativeType("void const *") double[] pointer) { - long __functionAddress = GL.getICD().glInterleavedArrays; - if (CHECKS) { - check(__functionAddress); - } - callPV(format, stride, pointer, __functionAddress); - } - - /** - * Array version of: {@link #glLightModeliv LightModeliv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightModeliv(@NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glLightModeliv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glLightModelfv LightModelfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightModelfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glLightModelfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glLightiv Lightiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightiv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glLightiv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(light, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glLightfv Lightfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLightfv(@NativeType("GLenum") int light, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glLightfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(light, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glLoadMatrixf LoadMatrixf} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadMatrixf(@NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glLoadMatrixf; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** - * Array version of: {@link #glLoadMatrixd LoadMatrixd} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadMatrixd(@NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glLoadMatrixd; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** - * Array version of: {@link #glMap1f Map1f} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap1f(@NativeType("GLenum") int target, @NativeType("GLfloat") float u1, @NativeType("GLfloat") float u2, @NativeType("GLint") int stride, @NativeType("GLint") int order, @NativeType("GLfloat const *") float[] points) { - long __functionAddress = GL.getICD().glMap1f; - if (CHECKS) { - check(__functionAddress); - check(points, order * stride); - } - callPV(target, u1, u2, stride, order, points, __functionAddress); - } - - /** - * Array version of: {@link #glMap1d Map1d} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap1d(@NativeType("GLenum") int target, @NativeType("GLdouble") double u1, @NativeType("GLdouble") double u2, @NativeType("GLint") int stride, @NativeType("GLint") int order, @NativeType("GLdouble const *") double[] points) { - long __functionAddress = GL.getICD().glMap1d; - if (CHECKS) { - check(__functionAddress); - check(points, stride * order); - } - callPV(target, u1, u2, stride, order, points, __functionAddress); - } - - /** - * Array version of: {@link #glMap2f Map2f} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap2f(@NativeType("GLenum") int target, @NativeType("GLfloat") float u1, @NativeType("GLfloat") float u2, @NativeType("GLint") int ustride, @NativeType("GLint") int uorder, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLint") int vstride, @NativeType("GLint") int vorder, @NativeType("GLfloat const *") float[] points) { - long __functionAddress = GL.getICD().glMap2f; - if (CHECKS) { - check(__functionAddress); - check(points, ustride * uorder * vstride * vorder); - } - callPV(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points, __functionAddress); - } - - /** - * Array version of: {@link #glMap2d Map2d} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMap2d(@NativeType("GLenum") int target, @NativeType("GLdouble") double u1, @NativeType("GLdouble") double u2, @NativeType("GLint") int ustride, @NativeType("GLint") int uorder, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2, @NativeType("GLint") int vstride, @NativeType("GLint") int vorder, @NativeType("GLdouble const *") double[] points) { - long __functionAddress = GL.getICD().glMap2d; - if (CHECKS) { - check(__functionAddress); - check(points, ustride * uorder * vstride * vorder); - } - callPV(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points, __functionAddress); - } - - /** - * Array version of: {@link #glMaterialiv Materialiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMaterialiv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glMaterialiv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(face, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glMaterialfv Materialfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMaterialfv(@NativeType("GLenum") int face, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glMaterialfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(face, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glMultMatrixf MultMatrixf} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultMatrixf(@NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMultMatrixf; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** - * Array version of: {@link #glMultMatrixd MultMatrixd} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultMatrixd(@NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glMultMatrixd; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** - * Array version of: {@link #glNormal3fv Normal3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glNormal3fv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glNormal3sv Normal3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glNormal3sv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glNormal3iv Normal3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glNormal3iv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glNormal3dv Normal3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormal3dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glNormal3dv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glPixelMapfv PixelMapfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLfloat const *") float[] values) { - long __functionAddress = GL.getICD().glPixelMapfv; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, values.length, values, __functionAddress); - } - - /** - * Array version of: {@link #glPixelMapusv PixelMapusv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLushort const *") short[] values) { - long __functionAddress = GL.getICD().glPixelMapusv; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, values.length, values, __functionAddress); - } - - /** - * Array version of: {@link #glPixelMapuiv PixelMapuiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLuint const *") int[] values) { - long __functionAddress = GL.getICD().glPixelMapuiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, values.length, values, __functionAddress); - } - - /** - * Array version of: {@link #glPrioritizeTextures PrioritizeTextures} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glPrioritizeTextures(@NativeType("GLuint const *") int[] textures, @NativeType("GLfloat const *") float[] priorities) { - long __functionAddress = GL.getICD().glPrioritizeTextures; - if (CHECKS) { - check(__functionAddress); - check(priorities, textures.length); - } - callPPV(textures.length, textures, priorities, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos2iv RasterPos2iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2iv(@NativeType("GLint const *") int[] coords) { - long __functionAddress = GL.getICD().glRasterPos2iv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos2sv RasterPos2sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2sv(@NativeType("GLshort const *") short[] coords) { - long __functionAddress = GL.getICD().glRasterPos2sv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos2fv RasterPos2fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2fv(@NativeType("GLfloat const *") float[] coords) { - long __functionAddress = GL.getICD().glRasterPos2fv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos2dv RasterPos2dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos2dv(@NativeType("GLdouble const *") double[] coords) { - long __functionAddress = GL.getICD().glRasterPos2dv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos3iv RasterPos3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3iv(@NativeType("GLint const *") int[] coords) { - long __functionAddress = GL.getICD().glRasterPos3iv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos3sv RasterPos3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3sv(@NativeType("GLshort const *") short[] coords) { - long __functionAddress = GL.getICD().glRasterPos3sv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos3fv RasterPos3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3fv(@NativeType("GLfloat const *") float[] coords) { - long __functionAddress = GL.getICD().glRasterPos3fv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos3dv RasterPos3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos3dv(@NativeType("GLdouble const *") double[] coords) { - long __functionAddress = GL.getICD().glRasterPos3dv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos4iv RasterPos4iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4iv(@NativeType("GLint const *") int[] coords) { - long __functionAddress = GL.getICD().glRasterPos4iv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos4sv RasterPos4sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4sv(@NativeType("GLshort const *") short[] coords) { - long __functionAddress = GL.getICD().glRasterPos4sv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos4fv RasterPos4fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4fv(@NativeType("GLfloat const *") float[] coords) { - long __functionAddress = GL.getICD().glRasterPos4fv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glRasterPos4dv RasterPos4dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRasterPos4dv(@NativeType("GLdouble const *") double[] coords) { - long __functionAddress = GL.getICD().glRasterPos4dv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glReadPixels ReadPixels} - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glReadPixels ReadPixels} - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glReadPixels ReadPixels} - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL11C.glReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glRectiv Rectiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectiv(@NativeType("GLint const *") int[] v1, @NativeType("GLint const *") int[] v2) { - long __functionAddress = GL.getICD().glRectiv; - if (CHECKS) { - check(__functionAddress); - check(v1, 2); - check(v2, 2); - } - callPPV(v1, v2, __functionAddress); - } - - /** - * Array version of: {@link #glRectsv Rectsv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectsv(@NativeType("GLshort const *") short[] v1, @NativeType("GLshort const *") short[] v2) { - long __functionAddress = GL.getICD().glRectsv; - if (CHECKS) { - check(__functionAddress); - check(v1, 2); - check(v2, 2); - } - callPPV(v1, v2, __functionAddress); - } - - /** - * Array version of: {@link #glRectfv Rectfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectfv(@NativeType("GLfloat const *") float[] v1, @NativeType("GLfloat const *") float[] v2) { - long __functionAddress = GL.getICD().glRectfv; - if (CHECKS) { - check(__functionAddress); - check(v1, 2); - check(v2, 2); - } - callPPV(v1, v2, __functionAddress); - } - - /** - * Array version of: {@link #glRectdv Rectdv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glRectdv(@NativeType("GLdouble const *") double[] v1, @NativeType("GLdouble const *") double[] v2) { - long __functionAddress = GL.getICD().glRectdv; - if (CHECKS) { - check(__functionAddress); - check(v1, 2); - check(v2, 2); - } - callPPV(v1, v2, __functionAddress); - } - - /** - * Array version of: {@link #glSelectBuffer SelectBuffer} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSelectBuffer(@NativeType("GLuint *") int[] buffer) { - long __functionAddress = GL.getICD().glSelectBuffer; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer.length, buffer, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord1fv TexCoord1fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glTexCoord1fv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord1sv TexCoord1sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord1sv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord1iv TexCoord1iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glTexCoord1iv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord1dv TexCoord1dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord1dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glTexCoord1dv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord2fv TexCoord2fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glTexCoord2fv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord2sv TexCoord2sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord2sv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord2iv TexCoord2iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glTexCoord2iv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord2dv TexCoord2dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord2dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glTexCoord2dv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord3fv TexCoord3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glTexCoord3fv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord3sv TexCoord3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord3sv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord3iv TexCoord3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glTexCoord3iv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord3dv TexCoord3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord3dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glTexCoord3dv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord4fv TexCoord4fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glTexCoord4fv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord4sv TexCoord4sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord4sv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord4iv TexCoord4iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glTexCoord4iv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoord4dv TexCoord4dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoord4dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glTexCoord4dv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glTexEnviv TexEnviv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexEnviv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glTexEnviv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexEnvfv TexEnvfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexEnvfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glTexEnvfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexGeniv TexGeniv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexGeniv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glTexGeniv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(coord, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexGenfv TexGenfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexGenfv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glTexGenfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(coord, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexGendv TexGendv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexGendv(@NativeType("GLenum") int coord, @NativeType("GLenum") int pname, @NativeType("GLdouble const *") double[] params) { - long __functionAddress = GL.getICD().glTexGendv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(coord, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - GL11C.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - GL11C.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexParameteriv TexParameteriv} - * - * @see Reference Page - */ - public static void glTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL11C.glTexParameteriv(target, pname, params); - } - - /** - * Array version of: {@link #glTexParameterfv TexParameterfv} - * - * @see Reference Page - */ - public static void glTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - GL11C.glTexParameterfv(target, pname, params); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL11C.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL11C.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glVertex2fv Vertex2fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2fv(@NativeType("GLfloat const *") float[] coords) { - long __functionAddress = GL.getICD().glVertex2fv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex2sv Vertex2sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2sv(@NativeType("GLshort const *") short[] coords) { - long __functionAddress = GL.getICD().glVertex2sv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex2iv Vertex2iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2iv(@NativeType("GLint const *") int[] coords) { - long __functionAddress = GL.getICD().glVertex2iv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex2dv Vertex2dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex2dv(@NativeType("GLdouble const *") double[] coords) { - long __functionAddress = GL.getICD().glVertex2dv; - if (CHECKS) { - check(__functionAddress); - check(coords, 2); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex3fv Vertex3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3fv(@NativeType("GLfloat const *") float[] coords) { - long __functionAddress = GL.getICD().glVertex3fv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex3sv Vertex3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3sv(@NativeType("GLshort const *") short[] coords) { - long __functionAddress = GL.getICD().glVertex3sv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex3iv Vertex3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3iv(@NativeType("GLint const *") int[] coords) { - long __functionAddress = GL.getICD().glVertex3iv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex3dv Vertex3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex3dv(@NativeType("GLdouble const *") double[] coords) { - long __functionAddress = GL.getICD().glVertex3dv; - if (CHECKS) { - check(__functionAddress); - check(coords, 3); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex4fv Vertex4fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4fv(@NativeType("GLfloat const *") float[] coords) { - long __functionAddress = GL.getICD().glVertex4fv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex4sv Vertex4sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4sv(@NativeType("GLshort const *") short[] coords) { - long __functionAddress = GL.getICD().glVertex4sv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex4iv Vertex4iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4iv(@NativeType("GLint const *") int[] coords) { - long __functionAddress = GL.getICD().glVertex4iv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - - /** - * Array version of: {@link #glVertex4dv Vertex4dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertex4dv(@NativeType("GLdouble const *") double[] coords) { - long __functionAddress = GL.getICD().glVertex4dv; - if (CHECKS) { - check(__functionAddress); - check(coords, 4); - } - callPV(coords, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL11C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL11C.java deleted file mode 100644 index dec438a3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL11C.java +++ /dev/null @@ -1,2664 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 1.1. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL11C { - - static { GL.initialize(); } - - /** AlphaFunction */ - public static final int - GL_NEVER = 0x200, - GL_LESS = 0x201, - GL_EQUAL = 0x202, - GL_LEQUAL = 0x203, - GL_GREATER = 0x204, - GL_NOTEQUAL = 0x205, - GL_GEQUAL = 0x206, - GL_ALWAYS = 0x207; - - /** AttribMask */ - public static final int - GL_DEPTH_BUFFER_BIT = 0x100, - GL_STENCIL_BUFFER_BIT = 0x400, - GL_COLOR_BUFFER_BIT = 0x4000; - - /** BeginMode */ - public static final int - GL_POINTS = 0x0, - GL_LINES = 0x1, - GL_LINE_LOOP = 0x2, - GL_LINE_STRIP = 0x3, - GL_TRIANGLES = 0x4, - GL_TRIANGLE_STRIP = 0x5, - GL_TRIANGLE_FAN = 0x6, - GL_QUADS = 0x7; - - /** BlendingFactorDest */ - public static final int - GL_ZERO = 0, - GL_ONE = 1, - GL_SRC_COLOR = 0x300, - GL_ONE_MINUS_SRC_COLOR = 0x301, - GL_SRC_ALPHA = 0x302, - GL_ONE_MINUS_SRC_ALPHA = 0x303, - GL_DST_ALPHA = 0x304, - GL_ONE_MINUS_DST_ALPHA = 0x305; - - /** BlendingFactorSrc */ - public static final int - GL_DST_COLOR = 0x306, - GL_ONE_MINUS_DST_COLOR = 0x307, - GL_SRC_ALPHA_SATURATE = 0x308; - - /** Boolean */ - public static final int - GL_TRUE = 1, - GL_FALSE = 0; - - /** DataType */ - public static final int - GL_BYTE = 0x1400, - GL_UNSIGNED_BYTE = 0x1401, - GL_SHORT = 0x1402, - GL_UNSIGNED_SHORT = 0x1403, - GL_INT = 0x1404, - GL_UNSIGNED_INT = 0x1405, - GL_FLOAT = 0x1406, - GL_DOUBLE = 0x140A; - - /** DrawBufferMode */ - public static final int - GL_NONE = 0, - GL_FRONT_LEFT = 0x400, - GL_FRONT_RIGHT = 0x401, - GL_BACK_LEFT = 0x402, - GL_BACK_RIGHT = 0x403, - GL_FRONT = 0x404, - GL_BACK = 0x405, - GL_LEFT = 0x406, - GL_RIGHT = 0x407, - GL_FRONT_AND_BACK = 0x408; - - /** ErrorCode */ - public static final int - GL_NO_ERROR = 0, - GL_INVALID_ENUM = 0x500, - GL_INVALID_VALUE = 0x501, - GL_INVALID_OPERATION = 0x502, - GL_STACK_OVERFLOW = 0x503, - GL_STACK_UNDERFLOW = 0x504, - GL_OUT_OF_MEMORY = 0x505; - - /** FrontFaceDirection */ - public static final int - GL_CW = 0x900, - GL_CCW = 0x901; - - /** GetTarget */ - public static final int - GL_POINT_SIZE = 0xB11, - GL_POINT_SIZE_RANGE = 0xB12, - GL_POINT_SIZE_GRANULARITY = 0xB13, - GL_LINE_SMOOTH = 0xB20, - GL_LINE_WIDTH = 0xB21, - GL_LINE_WIDTH_RANGE = 0xB22, - GL_LINE_WIDTH_GRANULARITY = 0xB23, - GL_POLYGON_MODE = 0xB40, - GL_POLYGON_SMOOTH = 0xB41, - GL_CULL_FACE = 0xB44, - GL_CULL_FACE_MODE = 0xB45, - GL_FRONT_FACE = 0xB46, - GL_DEPTH_RANGE = 0xB70, - GL_DEPTH_TEST = 0xB71, - GL_DEPTH_WRITEMASK = 0xB72, - GL_DEPTH_CLEAR_VALUE = 0xB73, - GL_DEPTH_FUNC = 0xB74, - GL_STENCIL_TEST = 0xB90, - GL_STENCIL_CLEAR_VALUE = 0xB91, - GL_STENCIL_FUNC = 0xB92, - GL_STENCIL_VALUE_MASK = 0xB93, - GL_STENCIL_FAIL = 0xB94, - GL_STENCIL_PASS_DEPTH_FAIL = 0xB95, - GL_STENCIL_PASS_DEPTH_PASS = 0xB96, - GL_STENCIL_REF = 0xB97, - GL_STENCIL_WRITEMASK = 0xB98, - GL_VIEWPORT = 0xBA2, - GL_DITHER = 0xBD0, - GL_BLEND_DST = 0xBE0, - GL_BLEND_SRC = 0xBE1, - GL_BLEND = 0xBE2, - GL_LOGIC_OP_MODE = 0xBF0, - GL_COLOR_LOGIC_OP = 0xBF2, - GL_DRAW_BUFFER = 0xC01, - GL_READ_BUFFER = 0xC02, - GL_SCISSOR_BOX = 0xC10, - GL_SCISSOR_TEST = 0xC11, - GL_COLOR_CLEAR_VALUE = 0xC22, - GL_COLOR_WRITEMASK = 0xC23, - GL_DOUBLEBUFFER = 0xC32, - GL_STEREO = 0xC33, - GL_LINE_SMOOTH_HINT = 0xC52, - GL_POLYGON_SMOOTH_HINT = 0xC53, - GL_UNPACK_SWAP_BYTES = 0xCF0, - GL_UNPACK_LSB_FIRST = 0xCF1, - GL_UNPACK_ROW_LENGTH = 0xCF2, - GL_UNPACK_SKIP_ROWS = 0xCF3, - GL_UNPACK_SKIP_PIXELS = 0xCF4, - GL_UNPACK_ALIGNMENT = 0xCF5, - GL_PACK_SWAP_BYTES = 0xD00, - GL_PACK_LSB_FIRST = 0xD01, - GL_PACK_ROW_LENGTH = 0xD02, - GL_PACK_SKIP_ROWS = 0xD03, - GL_PACK_SKIP_PIXELS = 0xD04, - GL_PACK_ALIGNMENT = 0xD05, - GL_MAX_TEXTURE_SIZE = 0xD33, - GL_MAX_VIEWPORT_DIMS = 0xD3A, - GL_SUBPIXEL_BITS = 0xD50, - GL_TEXTURE_1D = 0xDE0, - GL_TEXTURE_2D = 0xDE1; - - /** GetTextureParameter */ - public static final int - GL_TEXTURE_WIDTH = 0x1000, - GL_TEXTURE_HEIGHT = 0x1001, - GL_TEXTURE_INTERNAL_FORMAT = 0x1003, - GL_TEXTURE_BORDER_COLOR = 0x1004; - - /** HintMode */ - public static final int - GL_DONT_CARE = 0x1100, - GL_FASTEST = 0x1101, - GL_NICEST = 0x1102; - - /** LogicOp */ - public static final int - GL_CLEAR = 0x1500, - GL_AND = 0x1501, - GL_AND_REVERSE = 0x1502, - GL_COPY = 0x1503, - GL_AND_INVERTED = 0x1504, - GL_NOOP = 0x1505, - GL_XOR = 0x1506, - GL_OR = 0x1507, - GL_NOR = 0x1508, - GL_EQUIV = 0x1509, - GL_INVERT = 0x150A, - GL_OR_REVERSE = 0x150B, - GL_COPY_INVERTED = 0x150C, - GL_OR_INVERTED = 0x150D, - GL_NAND = 0x150E, - GL_SET = 0x150F; - - /** Token accepted or provided by the {@code identifier} parameters of ObjectLabel and GetObjectLabel. */ - public static final int GL_TEXTURE = 0x1702; - - /** PixelCopyType */ - public static final int - GL_COLOR = 0x1800, - GL_DEPTH = 0x1801, - GL_STENCIL = 0x1802; - - /** PixelFormat */ - public static final int - GL_STENCIL_INDEX = 0x1901, - GL_DEPTH_COMPONENT = 0x1902, - GL_RED = 0x1903, - GL_GREEN = 0x1904, - GL_BLUE = 0x1905, - GL_ALPHA = 0x1906, - GL_RGB = 0x1907, - GL_RGBA = 0x1908; - - /** PolygonMode */ - public static final int - GL_POINT = 0x1B00, - GL_LINE = 0x1B01, - GL_FILL = 0x1B02; - - /** StencilOp */ - public static final int - GL_KEEP = 0x1E00, - GL_REPLACE = 0x1E01, - GL_INCR = 0x1E02, - GL_DECR = 0x1E03; - - /** StringName */ - public static final int - GL_VENDOR = 0x1F00, - GL_RENDERER = 0x1F01, - GL_VERSION = 0x1F02, - GL_EXTENSIONS = 0x1F03; - - /** TextureMagFilter */ - public static final int - GL_NEAREST = 0x2600, - GL_LINEAR = 0x2601; - - /** TextureMinFilter */ - public static final int - GL_NEAREST_MIPMAP_NEAREST = 0x2700, - GL_LINEAR_MIPMAP_NEAREST = 0x2701, - GL_NEAREST_MIPMAP_LINEAR = 0x2702, - GL_LINEAR_MIPMAP_LINEAR = 0x2703; - - /** TextureParameterName */ - public static final int - GL_TEXTURE_MAG_FILTER = 0x2800, - GL_TEXTURE_MIN_FILTER = 0x2801, - GL_TEXTURE_WRAP_S = 0x2802, - GL_TEXTURE_WRAP_T = 0x2803; - - /** TextureWrapMode */ - public static final int GL_REPEAT = 0x2901; - - /** polygon_offset */ - public static final int - GL_POLYGON_OFFSET_FACTOR = 0x8038, - GL_POLYGON_OFFSET_UNITS = 0x2A00, - GL_POLYGON_OFFSET_POINT = 0x2A01, - GL_POLYGON_OFFSET_LINE = 0x2A02, - GL_POLYGON_OFFSET_FILL = 0x8037; - - /** texture */ - public static final int - GL_R3_G3_B2 = 0x2A10, - GL_RGB4 = 0x804F, - GL_RGB5 = 0x8050, - GL_RGB8 = 0x8051, - GL_RGB10 = 0x8052, - GL_RGB12 = 0x8053, - GL_RGB16 = 0x8054, - GL_RGBA2 = 0x8055, - GL_RGBA4 = 0x8056, - GL_RGB5_A1 = 0x8057, - GL_RGBA8 = 0x8058, - GL_RGB10_A2 = 0x8059, - GL_RGBA12 = 0x805A, - GL_RGBA16 = 0x805B, - GL_TEXTURE_RED_SIZE = 0x805C, - GL_TEXTURE_GREEN_SIZE = 0x805D, - GL_TEXTURE_BLUE_SIZE = 0x805E, - GL_TEXTURE_ALPHA_SIZE = 0x805F, - GL_PROXY_TEXTURE_1D = 0x8063, - GL_PROXY_TEXTURE_2D = 0x8064; - - /** texture_object */ - public static final int - GL_TEXTURE_BINDING_1D = 0x8068, - GL_TEXTURE_BINDING_2D = 0x8069; - - /** vertex_array */ - public static final int GL_VERTEX_ARRAY = 0x8074; - - protected GL11C() { - throw new UnsupportedOperationException(); - } - - // --- [ glEnable ] --- - - /** - * Enables the specified OpenGL state. - * - * @param target the OpenGL state to enable - * - * @see Reference Page - */ - public static native void glEnable(@NativeType("GLenum") int target); - - // --- [ glDisable ] --- - - /** - * Disables the specified OpenGL state. - * - * @param target the OpenGL state to disable - * - * @see Reference Page - */ - public static native void glDisable(@NativeType("GLenum") int target); - - // --- [ glBindTexture ] --- - - /** - * Binds the a texture to a texture target. - * - *

    While a texture object is bound, GL operations on the target to which it is bound affect the bound object, and queries of the target to which it is - * bound return state from the bound object. If texture mapping of the dimensionality of the target to which a texture object is bound is enabled, the - * state of the bound texture object directs the texturing operation.

    - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param texture the texture object to bind - * - * @see Reference Page - */ - public static native void glBindTexture(@NativeType("GLenum") int target, @NativeType("GLuint") int texture); - - // --- [ glBlendFunc ] --- - - /** - * Specifies the weighting factors used by the blend equation, for both RGB and alpha functions and for all draw buffers. - * - * @param sfactor the source weighting factor. One of:
    {@link #GL_ZERO ZERO}{@link #GL_ONE ONE}{@link #GL_SRC_COLOR SRC_COLOR}{@link #GL_ONE_MINUS_SRC_COLOR ONE_MINUS_SRC_COLOR}{@link #GL_DST_COLOR DST_COLOR}
    {@link #GL_ONE_MINUS_DST_COLOR ONE_MINUS_DST_COLOR}{@link #GL_SRC_ALPHA SRC_ALPHA}{@link #GL_ONE_MINUS_SRC_ALPHA ONE_MINUS_SRC_ALPHA}{@link #GL_DST_ALPHA DST_ALPHA}{@link #GL_ONE_MINUS_DST_ALPHA ONE_MINUS_DST_ALPHA}
    {@link GL14#GL_CONSTANT_COLOR CONSTANT_COLOR}{@link GL14#GL_ONE_MINUS_CONSTANT_COLOR ONE_MINUS_CONSTANT_COLOR}{@link GL14#GL_CONSTANT_ALPHA CONSTANT_ALPHA}{@link GL14#GL_ONE_MINUS_CONSTANT_ALPHA ONE_MINUS_CONSTANT_ALPHA}{@link #GL_SRC_ALPHA_SATURATE SRC_ALPHA_SATURATE}
    {@link GL33#GL_SRC1_COLOR SRC1_COLOR}{@link GL33#GL_ONE_MINUS_SRC1_COLOR ONE_MINUS_SRC1_COLOR}{@link GL15#GL_SRC1_ALPHA SRC1_ALPHA}{@link GL33#GL_ONE_MINUS_SRC1_ALPHA ONE_MINUS_SRC1_ALPHA}
    - * @param dfactor the destination weighting factor - * - * @see Reference Page - */ - public static native void glBlendFunc(@NativeType("GLenum") int sfactor, @NativeType("GLenum") int dfactor); - - // --- [ glClear ] --- - - /** - * Sets portions of every pixel in a particular buffer to the same value. The value to which each buffer is cleared depends on the setting of the clear - * value for that buffer. - * - * @param mask Zero or the bitwise OR of one or more values indicating which buffers are to be cleared. One or more of:
    {@link #GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link #GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link #GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * - * @see Reference Page - */ - public static native void glClear(@NativeType("GLbitfield") int mask); - - // --- [ glClearColor ] --- - - /** - * Sets the clear value for fixed-point and floating-point color buffers in RGBA mode. The specified components are stored as floating-point values. - * - * @param red the value to which to clear the R channel of the color buffer - * @param green the value to which to clear the G channel of the color buffer - * @param blue the value to which to clear the B channel of the color buffer - * @param alpha the value to which to clear the A channel of the color buffer - * - * @see Reference Page - */ - public static native void glClearColor(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha); - - // --- [ glClearDepth ] --- - - /** - * Sets the depth value used when clearing the depth buffer. When clearing a fixedpoint depth buffer, {@code depth} is clamped to the range [0,1] and - * converted to fixed-point. No conversion is applied when clearing a floating-point depth buffer. - * - * @param depth the value to which to clear the depth buffer - * - * @see Reference Page - */ - public static native void glClearDepth(@NativeType("GLdouble") double depth); - - // --- [ glClearStencil ] --- - - /** - * Sets the value to which to clear the stencil buffer. {@code s} is masked to the number of bitplanes in the stencil buffer. - * - * @param s the value to which to clear the stencil buffer - * - * @see Reference Page - */ - public static native void glClearStencil(@NativeType("GLint") int s); - - // --- [ glColorMask ] --- - - /** - * Masks the writing of R, G, B and A values to all draw buffers. In the initial state, all color values are enabled for writing for all draw buffers. - * - * @param red whether R values are written or not - * @param green whether G values are written or not - * @param blue whether B values are written or not - * @param alpha whether A values are written or not - * - * @see Reference Page - */ - public static native void glColorMask(@NativeType("GLboolean") boolean red, @NativeType("GLboolean") boolean green, @NativeType("GLboolean") boolean blue, @NativeType("GLboolean") boolean alpha); - - // --- [ glCullFace ] --- - - /** - * Specifies which polygon faces are culled if {@link #GL_CULL_FACE CULL_FACE} is enabled. Front-facing polygons are rasterized if either culling is disabled or the - * CullFace mode is {@link #GL_BACK BACK} while back-facing polygons are rasterized only if either culling is disabled or the CullFace mode is - * {@link #GL_FRONT FRONT}. The initial setting of the CullFace mode is {@link #GL_BACK BACK}. Initially, culling is disabled. - * - * @param mode the CullFace mode. One of:
    {@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * - * @see Reference Page - */ - public static native void glCullFace(@NativeType("GLenum") int mode); - - // --- [ glDepthFunc ] --- - - /** - * Specifies the comparison that takes place during the depth buffer test (when {@link #GL_DEPTH_TEST DEPTH_TEST} is enabled). - * - * @param func the depth test comparison. One of:
    {@link #GL_NEVER NEVER}{@link #GL_ALWAYS ALWAYS}{@link #GL_LESS LESS}{@link #GL_LEQUAL LEQUAL}{@link #GL_EQUAL EQUAL}{@link #GL_GREATER GREATER}{@link #GL_GEQUAL GEQUAL}{@link #GL_NOTEQUAL NOTEQUAL}
    - * - * @see Reference Page - */ - public static native void glDepthFunc(@NativeType("GLenum") int func); - - // --- [ glDepthMask ] --- - - /** - * Masks the writing of depth values to the depth buffer. In the initial state, the depth buffer is enabled for writing. - * - * @param flag whether depth values are written or not. - * - * @see Reference Page - */ - public static native void glDepthMask(@NativeType("GLboolean") boolean flag); - - // --- [ glDepthRange ] --- - - /** - * Sets the depth range for all viewports to the same values. - * - * @param zNear the near depth range - * @param zFar the far depth range - * - * @see Reference Page - */ - public static native void glDepthRange(@NativeType("GLdouble") double zNear, @NativeType("GLdouble") double zFar); - - // --- [ glDrawArrays ] --- - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices. Elements {@code first} through - * first + count – 1 of each enabled non-instanced array are transferred to the GL. - * - *

    If an array corresponding to an attribute required by a vertex shader is not enabled, then the corresponding element is taken from the current attribute - * state. If an array is enabled, the corresponding current vertex attribute value is unaffected by the execution of this function.

    - * - * @param mode the kind of primitives being constructed - * @param first the first vertex to transfer to the GL - * @param count the number of vertices after {@code first} to transfer to the GL - * - * @see Reference Page - */ - public static native void glDrawArrays(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count); - - // --- [ glDrawBuffer ] --- - - /** - * Defines the color buffer to which fragment color zero is written. - * - *

    Acceptable values for {@code buf} depend on whether the GL is using the default framebuffer (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is zero), or - * a framebuffer object (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is non-zero). In the initial state, the GL is bound to the default framebuffer.

    - * - * @param buf the color buffer to draw to. One of:
    {@link #GL_NONE NONE}{@link #GL_FRONT_LEFT FRONT_LEFT}{@link #GL_FRONT_RIGHT FRONT_RIGHT}{@link #GL_BACK_LEFT BACK_LEFT}{@link #GL_BACK_RIGHT BACK_RIGHT}{@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_LEFT LEFT}
    {@link #GL_RIGHT RIGHT}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static native void glDrawBuffer(@NativeType("GLenum") int buf); - - // --- [ glDrawElements ] --- - - /** - * Unsafe version of: {@link #glDrawElements DrawElements} - * - * @param count the number of vertices to transfer to the GL - * @param type indicates the type of index values in {@code indices}. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawElements(int mode, int count, int type, long indices); - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link #GL_POINTS POINTS}{@link #GL_LINE_STRIP LINE_STRIP}{@link #GL_LINE_LOOP LINE_LOOP}{@link #GL_LINES LINES}{@link #GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link #GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link #GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param count the number of vertices to transfer to the GL - * @param type indicates the type of index values in {@code indices}. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices) { - nglDrawElements(mode, count, type, indices); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link #GL_POINTS POINTS}{@link #GL_LINE_STRIP LINE_STRIP}{@link #GL_LINE_LOOP LINE_LOOP}{@link #GL_LINES LINES}{@link #GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link #GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link #GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param type indicates the type of index values in {@code indices}. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices) { - nglDrawElements(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices)); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link #GL_POINTS POINTS}{@link #GL_LINE_STRIP LINE_STRIP}{@link #GL_LINE_LOOP LINE_LOOP}{@link #GL_LINES LINES}{@link #GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link #GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link #GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices) { - nglDrawElements(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices)); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link #GL_POINTS POINTS}{@link #GL_LINE_STRIP LINE_STRIP}{@link #GL_LINE_LOOP LINE_LOOP}{@link #GL_LINES LINES}{@link #GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link #GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link #GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices) { - nglDrawElements(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices)); - } - - /** - * Constructs a sequence of geometric primitives by successively transferring elements for {@code count} vertices to the GL. - * The ith element transferred by {@code DrawElements} will be taken from element {@code indices[i]} (if no element array buffer is bound), or - * from the element whose index is stored in the currently bound element array buffer at offset {@code indices + i}. - * - * @param mode the kind of primitives being constructed. One of:
    {@link #GL_POINTS POINTS}{@link #GL_LINE_STRIP LINE_STRIP}{@link #GL_LINE_LOOP LINE_LOOP}{@link #GL_LINES LINES}{@link #GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link #GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link #GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the index values - * - * @see Reference Page - */ - public static void glDrawElements(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices) { - nglDrawElements(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices)); - } - - // --- [ glFinish ] --- - - /** - * Forces all previously issued GL commands to complete. {@code Finish} does not return until all effects from such commands on GL client and server - * state and the framebuffer are fully realized. - * - * @see Reference Page - */ - public static native void glFinish(); - - // --- [ glFlush ] --- - - /** - * Causes all previously issued GL commands to complete in finite time (although such commands may still be executing when {@code Flush} returns). - * - * @see Reference Page - */ - public static native void glFlush(); - - // --- [ glFrontFace ] --- - - /** - * The first step of polygon rasterization is to determine if the polygon is back-facing or front-facing. This determination is made based on the sign of - * the (clipped or unclipped) polygon's area computed in window coordinates. The interpretation of the sign of this value is controlled with this function. - * In the initial state, the front face direction is set to {@link #GL_CCW CCW}. - * - * @param dir the front face direction. One of:
    {@link #GL_CCW CCW}{@link #GL_CW CW}
    - * - * @see Reference Page - */ - public static native void glFrontFace(@NativeType("GLenum") int dir); - - // --- [ glGenTextures ] --- - - /** - * Unsafe version of: {@link #glGenTextures GenTextures} - * - * @param n the number of textures to create - */ - public static native void nglGenTextures(int n, long textures); - - /** - * Returns n previously unused texture names in textures. These names are marked as used, for the purposes of GenTextures only, but they acquire texture - * state and a dimensionality only when they are first bound, just as if they were unused. - * - * @param textures a scalar or buffer in which to place the returned texture names - * - * @see Reference Page - */ - public static void glGenTextures(@NativeType("GLuint *") IntBuffer textures) { - nglGenTextures(textures.remaining(), memAddress(textures)); - } - - /** - * Returns n previously unused texture names in textures. These names are marked as used, for the purposes of GenTextures only, but they acquire texture - * state and a dimensionality only when they are first bound, just as if they were unused. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenTextures() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer textures = stack.callocInt(1); - nglGenTextures(1, memAddress(textures)); - return textures.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteTextures ] --- - - /** - * Unsafe version of: {@link #glDeleteTextures DeleteTextures} - * - * @param n the number of texture names in the {@code textures} parameter - */ - public static native void nglDeleteTextures(int n, long textures); - - /** - * Deletes texture objects. After a texture object is deleted, it has no contents or dimensionality, and its name is again unused. If a texture that is - * currently bound to any of the target bindings of {@link #glBindTexture BindTexture} is deleted, it is as though {@link #glBindTexture BindTexture} had been executed with the - * same target and texture zero. Additionally, special care must be taken when deleting a texture if any of the images of the texture are attached to a - * framebuffer object. - * - *

    Unused names in textures that have been marked as used for the purposes of {@link #glGenTextures GenTextures} are marked as unused again. Unused names in textures are - * silently ignored, as is the name zero.

    - * - * @param textures contains {@code n} names of texture objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteTextures(@NativeType("GLuint const *") IntBuffer textures) { - nglDeleteTextures(textures.remaining(), memAddress(textures)); - } - - /** - * Deletes texture objects. After a texture object is deleted, it has no contents or dimensionality, and its name is again unused. If a texture that is - * currently bound to any of the target bindings of {@link #glBindTexture BindTexture} is deleted, it is as though {@link #glBindTexture BindTexture} had been executed with the - * same target and texture zero. Additionally, special care must be taken when deleting a texture if any of the images of the texture are attached to a - * framebuffer object. - * - *

    Unused names in textures that have been marked as used for the purposes of {@link #glGenTextures GenTextures} are marked as unused again. Unused names in textures are - * silently ignored, as is the name zero.

    - * - * @see Reference Page - */ - public static void glDeleteTextures(@NativeType("GLuint const *") int texture) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer textures = stack.ints(texture); - nglDeleteTextures(1, memAddress(textures)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetBooleanv ] --- - - /** Unsafe version of: {@link #glGetBooleanv GetBooleanv} */ - public static native void nglGetBooleanv(int pname, long params); - - /** - * Returns the current boolean value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetBooleanv(@NativeType("GLenum") int pname, @NativeType("GLboolean *") ByteBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetBooleanv(pname, memAddress(params)); - } - - /** - * Returns the current boolean value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static boolean glGetBoolean(@NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - ByteBuffer params = stack.calloc(1); - nglGetBooleanv(pname, memAddress(params)); - return params.get(0) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetFloatv ] --- - - /** Unsafe version of: {@link #glGetFloatv GetFloatv} */ - public static native void nglGetFloatv(int pname, long params); - - /** - * Returns the current float value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetFloatv(@NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFloatv(pname, memAddress(params)); - } - - /** - * Returns the current float value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetFloat(@NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetFloatv(pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetIntegerv ] --- - - /** Unsafe version of: {@link #glGetIntegerv GetIntegerv} */ - public static native void nglGetIntegerv(int pname, long params); - - /** - * Returns the current integer value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetIntegerv(@NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetIntegerv(pname, memAddress(params)); - } - - /** - * Returns the current integer value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetInteger(@NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetIntegerv(pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetDoublev ] --- - - /** Unsafe version of: {@link #glGetDoublev GetDoublev} */ - public static native void nglGetDoublev(int pname, long params); - - /** - * Returns the current double value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetDoublev(@NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetDoublev(pname, memAddress(params)); - } - - /** - * Returns the current double value of the specified state variable. - * - *

    LWJGL note: The state that corresponds to the state variable may be a single value or an array of values. In the case of an array of values, - * LWJGL will not validate if {@code params} has enough space to store that array. Doing so would introduce significant overhead, as the - * OpenGL state variables are too many. It is the user's responsibility to avoid JVM crashes by ensuring enough space for the returned values.

    - * - * @param pname the state variable - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetDouble(@NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer params = stack.callocDouble(1); - nglGetDoublev(pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetError ] --- - - /** - * Returns error information. - * - *

    Each detectable error is assigned a numeric code. When an error is detected, a flag is set and the code is recorded. Further errors, if they occur, do - * not affect this recorded code. When {@code GetError} is called, the code is returned and the flag is cleared, so that a further error will again record - * its code. If a call to {@code GetError} returns {@link #GL_NO_ERROR NO_ERROR}, then there has been no detectable error since the last call to {@code GetError} (or since - * the GL was initialized).

    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static native int glGetError(); - - // --- [ glGetPointerv ] --- - - /** Unsafe version of: {@link #glGetPointerv GetPointerv} */ - public static native void nglGetPointerv(int pname, long params); - - /** - * Returns a pointer in the current GL context. - * - * @param pname the pointer to return. One of:
    {@link GL43#GL_DEBUG_CALLBACK_FUNCTION DEBUG_CALLBACK_FUNCTION}{@link GL43#GL_DEBUG_CALLBACK_USER_PARAM DEBUG_CALLBACK_USER_PARAM}
    - * @param params a buffer in which to place the returned pointer - * - * @see Reference Page - */ - public static void glGetPointerv(@NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetPointerv(pname, memAddress(params)); - } - - /** - * Returns a pointer in the current GL context. - * - * @param pname the pointer to return. One of:
    {@link GL43#GL_DEBUG_CALLBACK_FUNCTION DEBUG_CALLBACK_FUNCTION}{@link GL43#GL_DEBUG_CALLBACK_USER_PARAM DEBUG_CALLBACK_USER_PARAM}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetPointer(@NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer params = stack.callocPointer(1); - nglGetPointerv(pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetString ] --- - - /** Unsafe version of: {@link #glGetString GetString} */ - public static native long nglGetString(int name); - - /** - * Return strings describing properties of the current GL context. - * - * @param name the property to query. One of:
    {@link #GL_RENDERER RENDERER}{@link #GL_VENDOR VENDOR}{@link #GL_EXTENSIONS EXTENSIONS}{@link #GL_VERSION VERSION}{@link GL20#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("GLubyte const *") - public static String glGetString(@NativeType("GLenum") int name) { - long __result = nglGetString(name); - return memUTF8Safe(__result); - } - - // --- [ glGetTexImage ] --- - - /** Unsafe version of: {@link #glGetTexImage GetTexImage} */ - public static native void nglGetTexImage(int tex, int level, int format, int type, long pixels); - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - nglGetTexImage(tex, level, format, type, memAddress(pixels)); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long pixels) { - nglGetTexImage(tex, level, format, type, pixels); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - nglGetTexImage(tex, level, format, type, memAddress(pixels)); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - nglGetTexImage(tex, level, format, type, memAddress(pixels)); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - nglGetTexImage(tex, level, format, type, memAddress(pixels)); - } - - /** - * Obtains texture images. - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - nglGetTexImage(tex, level, format, type, memAddress(pixels)); - } - - // --- [ glGetTexLevelParameteriv ] --- - - /** Unsafe version of: {@link #glGetTexLevelParameteriv GetTexLevelParameteriv} */ - public static native void nglGetTexLevelParameteriv(int target, int level, int pname, long params); - - /** - * Places integer information about texture image parameter {@code pname} for level-of-detail {@code level} of the specified {@code target} into {@code params}. - * - * @param target the texture image target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link #GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link #GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link #GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link #GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link #GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link #GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link #GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexLevelParameteriv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexLevelParameteriv(target, level, pname, memAddress(params)); - } - - /** - * Places integer information about texture image parameter {@code pname} for level-of-detail {@code level} of the specified {@code target} into {@code params}. - * - * @param target the texture image target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link #GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link #GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link #GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link #GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link #GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link #GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link #GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexLevelParameteri(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTexLevelParameteriv(target, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexLevelParameterfv ] --- - - /** Unsafe version of: {@link #glGetTexLevelParameterfv GetTexLevelParameterfv} */ - public static native void nglGetTexLevelParameterfv(int target, int level, int pname, long params); - - /** - * Float version of {@link #glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param target the texture image target - * @param level the level-of-detail number - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexLevelParameterfv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexLevelParameterfv(target, level, pname, memAddress(params)); - } - - /** - * Float version of {@link #glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param target the texture image target - * @param level the level-of-detail number - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTexLevelParameterf(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetTexLevelParameterfv(target, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexParameteriv ] --- - - /** Unsafe version of: {@link #glGetTexParameteriv GetTexParameteriv} */ - public static native void nglGetTexParameteriv(int target, int pname, long params); - - /** - * Place integer information about texture parameter {@code pname} for the specified {@code target} into {@code params}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link #GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link #GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link #GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link #GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link #GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexParameteriv(target, pname, memAddress(params)); - } - - /** - * Place integer information about texture parameter {@code pname} for the specified {@code target} into {@code params}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link #GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link #GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link #GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link #GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link #GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTexParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexParameterfv ] --- - - /** Unsafe version of: {@link #glGetTexParameterfv GetTexParameterfv} */ - public static native void nglGetTexParameterfv(int target, int pname, long params); - - /** - * Float version of {@link #glGetTexParameteriv GetTexParameteriv}. - * - * @param target the texture target - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexParameterfv(target, pname, memAddress(params)); - } - - /** - * Float version of {@link #glGetTexParameteriv GetTexParameteriv}. - * - * @param target the texture target - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTexParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetTexParameterfv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glHint ] --- - - /** - * Certain aspects of GL behavior, when there is room for variation, may be controlled with this function. The initial value for all hints is - * {@link #GL_DONT_CARE DONT_CARE}. - * - * @param target the behavior to control. One of:
    {@link #GL_LINE_SMOOTH_HINT LINE_SMOOTH_HINT}{@link #GL_POLYGON_SMOOTH_HINT POLYGON_SMOOTH_HINT}{@link GL13#GL_TEXTURE_COMPRESSION_HINT TEXTURE_COMPRESSION_HINT}
    {@link GL20#GL_FRAGMENT_SHADER_DERIVATIVE_HINT FRAGMENT_SHADER_DERIVATIVE_HINT}
    - * @param hint the behavior hint. One of:
    {@link #GL_FASTEST FASTEST}{@link #GL_NICEST NICEST}{@link #GL_DONT_CARE DONT_CARE}
    - * - * @see Reference Page - */ - public static native void glHint(@NativeType("GLenum") int target, @NativeType("GLenum") int hint); - - // --- [ glIsEnabled ] --- - - /** - * Determines if {@code cap} is currently enabled (as with {@link #glEnable Enable}) or disabled. - * - * @param cap the enable state to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsEnabled(@NativeType("GLenum") int cap); - - // --- [ glIsTexture ] --- - - /** - * Returns true if {@code texture} is the name of a texture object. - * - * @param texture the texture name to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsTexture(@NativeType("GLuint") int texture); - - // --- [ glLineWidth ] --- - - /** - * Sets the width of rasterized line segments. The default width is 1.0. - * - * @param width the line width - * - * @see Reference Page - */ - public static native void glLineWidth(@NativeType("GLfloat") float width); - - // --- [ glLogicOp ] --- - - /** - * Sets the logical framebuffer operation. - * - * @param op the operation to set. One of:
    {@link #GL_CLEAR CLEAR}{@link #GL_AND AND}{@link #GL_AND_REVERSE AND_REVERSE}{@link #GL_COPY COPY}{@link #GL_AND_INVERTED AND_INVERTED}{@link #GL_NOOP NOOP}{@link #GL_XOR XOR}{@link #GL_OR OR}{@link #GL_NOR NOR}{@link #GL_EQUIV EQUIV}{@link #GL_INVERT INVERT}{@link #GL_OR_REVERSE OR_REVERSE}{@link #GL_COPY_INVERTED COPY_INVERTED}
    {@link #GL_OR_INVERTED OR_INVERTED}{@link #GL_NAND NAND}{@link #GL_SET SET}
    - * - * @see Reference Page - */ - public static native void glLogicOp(@NativeType("GLenum") int op); - - // --- [ glPixelStorei ] --- - - /** - * Sets the integer value of a pixel store parameter. - * - * @param pname the pixel store parameter to set. One of:
    {@link #GL_UNPACK_SWAP_BYTES UNPACK_SWAP_BYTES}{@link #GL_UNPACK_LSB_FIRST UNPACK_LSB_FIRST}{@link #GL_UNPACK_ROW_LENGTH UNPACK_ROW_LENGTH}
    {@link #GL_UNPACK_SKIP_ROWS UNPACK_SKIP_ROWS}{@link #GL_UNPACK_SKIP_PIXELS UNPACK_SKIP_PIXELS}{@link #GL_UNPACK_ALIGNMENT UNPACK_ALIGNMENT}
    {@link GL12#GL_UNPACK_IMAGE_HEIGHT UNPACK_IMAGE_HEIGHT}{@link GL12#GL_UNPACK_SKIP_IMAGES UNPACK_SKIP_IMAGES}{@link GL42#GL_UNPACK_COMPRESSED_BLOCK_WIDTH UNPACK_COMPRESSED_BLOCK_WIDTH}
    {@link GL42#GL_UNPACK_COMPRESSED_BLOCK_HEIGHT UNPACK_COMPRESSED_BLOCK_HEIGHT}{@link GL42#GL_UNPACK_COMPRESSED_BLOCK_DEPTH UNPACK_COMPRESSED_BLOCK_DEPTH}{@link GL42#GL_UNPACK_COMPRESSED_BLOCK_SIZE UNPACK_COMPRESSED_BLOCK_SIZE}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glPixelStorei(@NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glPixelStoref ] --- - - /** - * Float version of {@link #glPixelStorei PixelStorei}. - * - * @param pname the pixel store parameter to set - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glPixelStoref(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glPointSize ] --- - - /** - * Controls the rasterization of points if no vertex, tessellation control, tessellation evaluation, or geometry shader is active. The default point size is 1.0. - * - * @param size the request size of a point - * - * @see Reference Page - */ - public static native void glPointSize(@NativeType("GLfloat") float size); - - // --- [ glPolygonMode ] --- - - /** - * Controls the interpretation of polygons for rasterization. - * - *

    {@link #GL_FILL FILL} is the default mode of polygon rasterization. Note that these modes affect only the final rasterization of polygons: in particular, a - * polygon's vertices are lit, and the polygon is clipped and possibly culled before these modes are applied. Polygon antialiasing applies only to the - * {@link #GL_FILL FILL} state of PolygonMode. For {@link #GL_POINT POINT} or {@link #GL_LINE LINE}, point antialiasing or line segment antialiasing, respectively, apply.

    - * - * @param face the face for which to set the rasterizing method. One of:
    {@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param mode the rasterization mode. One of:
    {@link #GL_POINT POINT}{@link #GL_LINE LINE}{@link #GL_FILL FILL}
    - * - * @see Reference Page - */ - public static native void glPolygonMode(@NativeType("GLenum") int face, @NativeType("GLenum") int mode); - - // --- [ glPolygonOffset ] --- - - /** - * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This - * function determines that value. - * - *

    {@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable - * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value.

    - * - * @param factor the maximum depth slope factor - * @param units the constant scale - * - * @see Reference Page - */ - public static native void glPolygonOffset(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units); - - // --- [ glReadBuffer ] --- - - /** - * Defines the color buffer from which values are obtained. - * - *

    Acceptable values for {@code src} depend on whether the GL is using the default framebuffer (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is zero), or - * a framebuffer object (i.e., {@link GL30#GL_DRAW_FRAMEBUFFER_BINDING DRAW_FRAMEBUFFER_BINDING} is non-zero). In the initial state, the GL is bound to the default framebuffer.

    - * - * @param src the color buffer to read from. One of:
    {@link #GL_NONE NONE}{@link #GL_FRONT_LEFT FRONT_LEFT}{@link #GL_FRONT_RIGHT FRONT_RIGHT}{@link #GL_BACK_LEFT BACK_LEFT}{@link #GL_BACK_RIGHT BACK_RIGHT}{@link #GL_FRONT FRONT}{@link #GL_BACK BACK}{@link #GL_LEFT LEFT}
    {@link #GL_RIGHT RIGHT}{@link #GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static native void glReadBuffer(@NativeType("GLenum") int src); - - // --- [ glReadPixels ] --- - - /** Unsafe version of: {@link #glReadPixels ReadPixels} */ - public static native void nglReadPixels(int x, int y, int width, int height, int format, int type, long pixels); - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - nglReadPixels(x, y, width, height, format, type, memAddress(pixels)); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") long pixels) { - nglReadPixels(x, y, width, height, format, type, pixels); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - nglReadPixels(x, y, width, height, format, type, memAddress(pixels)); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - nglReadPixels(x, y, width, height, format, type, memAddress(pixels)); - } - - /** - * ReadPixels obtains values from the selected read buffer from each pixel with lower left hand corner at {@code (x + i, y + j)} for {@code 0 <= i < width} - * and {@code 0 <= j < height}; this pixel is said to be the ith pixel in the jth row. If any of these pixels lies outside of the - * window allocated to the current GL context, or outside of the image attached to the currently bound read framebuffer object, then the values obtained - * for those pixels are undefined. When {@link GL30#GL_READ_FRAMEBUFFER_BINDING READ_FRAMEBUFFER_BINDING} is zero, values are also undefined for individual pixels that are not owned by - * the current context. Otherwise, {@code ReadPixels} obtains values from the selected buffer, regardless of how those values were placed there. - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - nglReadPixels(x, y, width, height, format, type, memAddress(pixels)); - } - - // --- [ glScissor ] --- - - /** - * Defines the scissor rectangle for all viewports. The scissor test is enabled or disabled for all viewports using {@link #glEnable Enable} or {@link #glDisable Disable} - * with the symbolic constant {@link #GL_SCISSOR_TEST SCISSOR_TEST}. When disabled, it is as if the scissor test always passes. When enabled, if - * left ≤ xw < left + width and bottom ≤ yw < bottom + height for the scissor rectangle, then the scissor - * test passes. Otherwise, the test fails and the fragment is discarded. - * - * @param x the left scissor rectangle coordinate - * @param y the bottom scissor rectangle coordinate - * @param width the scissor rectangle width - * @param height the scissor rectangle height - * - * @see Reference Page - */ - public static native void glScissor(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glStencilFunc ] --- - - /** - * Controls the stencil test. - * - *

    {@code ref} is an integer reference value that is used in the unsigned stencil comparison. Stencil comparison operations and queries of {@code ref} - * clamp its value to the range [0, 2s – 1], where s is the number of bits in the stencil buffer attached to the draw framebuffer. The s - * least significant bits of {@code mask} are bitwise ANDed with both the reference and the stored stencil value, and the resulting masked values are those that - * participate in the comparison controlled by {@code func}.

    - * - * @param func the stencil comparison function. One of:
    {@link #GL_NEVER NEVER}{@link #GL_ALWAYS ALWAYS}{@link #GL_LESS LESS}{@link #GL_LEQUAL LEQUAL}{@link #GL_EQUAL EQUAL}{@link #GL_GEQUAL GEQUAL}{@link #GL_GREATER GREATER}{@link #GL_NOTEQUAL NOTEQUAL}
    - * @param ref the reference value - * @param mask the stencil comparison mask - * - * @see Reference Page - */ - public static native void glStencilFunc(@NativeType("GLenum") int func, @NativeType("GLint") int ref, @NativeType("GLuint") int mask); - - // --- [ glStencilMask ] --- - - /** - * Masks the writing of particular bits into the stencil plans. - * - *

    The least significant s bits of {@code mask}, where s is the number of bits in the stencil buffer, specify an integer mask. Where a 1 appears in this - * mask, the corresponding bit in the stencil buffer is written; where a 0 appears, the bit is not written.

    - * - * @param mask the stencil mask - * - * @see Reference Page - */ - public static native void glStencilMask(@NativeType("GLuint") int mask); - - // --- [ glStencilOp ] --- - - /** - * Indicates what happens to the stored stencil value if this or certain subsequent tests fail or pass. - * - *

    The supported actions are {@link #GL_KEEP KEEP}, {@link #GL_ZERO ZERO}, {@link #GL_REPLACE REPLACE}, {@link #GL_INCR INCR}, {@link #GL_DECR DECR}, {@link #GL_INVERT INVERT}, - * {@link GL14#GL_INCR_WRAP INCR_WRAP} and {@link GL14#GL_DECR_WRAP DECR_WRAP}. These correspond to keeping the current value, setting to zero, replacing with the reference value, - * incrementing with saturation, decrementing with saturation, bitwise inverting it, incrementing without saturation, and decrementing without saturation.

    - * - *

    For purposes of increment and decrement, the stencil bits are considered as an unsigned integer. Incrementing or decrementing with saturation clamps - * the stencil value at 0 and the maximum representable value. Incrementing or decrementing without saturation will wrap such that incrementing the maximum - * representable value results in 0, and decrementing 0 results in the maximum representable value.

    - * - * @param sfail the action to take if the stencil test fails - * @param dpfail the action to take if the depth buffer test fails - * @param dppass the action to take if the depth buffer test passes - * - * @see Reference Page - */ - public static native void glStencilOp(@NativeType("GLenum") int sfail, @NativeType("GLenum") int dpfail, @NativeType("GLenum") int dppass); - - // --- [ glTexImage1D ] --- - - /** Unsafe version of: {@link #glTexImage1D TexImage1D} */ - public static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, long pixels); - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglTexImage1D(target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTexImage1D(target, level, internalformat, width, border, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglTexImage1D(target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglTexImage1D(target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglTexImage1D(target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - /** - * One-dimensional version of {@link #glTexImage2D TexImage2D}}. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format - * @param width the texture width - * @param border the texture border width - * @param format the texel data format - * @param type the texel data type - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglTexImage1D(target, level, internalformat, width, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glTexImage2D ] --- - - /** Unsafe version of: {@link #glTexImage2D TexImage2D} */ - public static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels); - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link #GL_RED RED}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link #GL_R3_G3_B2 R3_G3_B2}{@link #GL_RGB4 RGB4}{@link #GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link #GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link #GL_RGB10 RGB10}{@link #GL_RGB12 RGB12}{@link #GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link #GL_RGBA2 RGBA2}{@link #GL_RGBA4 RGBA4}{@link #GL_RGB5_A1 RGB5_A1}{@link #GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link #GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link #GL_RGBA12 RGBA12}{@link #GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglTexImage2D(target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link #GL_RED RED}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link #GL_R3_G3_B2 R3_G3_B2}{@link #GL_RGB4 RGB4}{@link #GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link #GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link #GL_RGB10 RGB10}{@link #GL_RGB12 RGB12}{@link #GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link #GL_RGBA2 RGBA2}{@link #GL_RGBA4 RGBA4}{@link #GL_RGB5_A1 RGB5_A1}{@link #GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link #GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link #GL_RGBA12 RGBA12}{@link #GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link #GL_RED RED}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link #GL_R3_G3_B2 R3_G3_B2}{@link #GL_RGB4 RGB4}{@link #GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link #GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link #GL_RGB10 RGB10}{@link #GL_RGB12 RGB12}{@link #GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link #GL_RGBA2 RGBA2}{@link #GL_RGBA4 RGBA4}{@link #GL_RGB5_A1 RGB5_A1}{@link #GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link #GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link #GL_RGBA12 RGBA12}{@link #GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglTexImage2D(target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link #GL_RED RED}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link #GL_R3_G3_B2 R3_G3_B2}{@link #GL_RGB4 RGB4}{@link #GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link #GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link #GL_RGB10 RGB10}{@link #GL_RGB12 RGB12}{@link #GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link #GL_RGBA2 RGBA2}{@link #GL_RGBA4 RGBA4}{@link #GL_RGB5_A1 RGB5_A1}{@link #GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link #GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link #GL_RGBA12 RGBA12}{@link #GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglTexImage2D(target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link #GL_RED RED}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link #GL_R3_G3_B2 R3_G3_B2}{@link #GL_RGB4 RGB4}{@link #GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link #GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link #GL_RGB10 RGB10}{@link #GL_RGB12 RGB12}{@link #GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link #GL_RGBA2 RGBA2}{@link #GL_RGBA4 RGBA4}{@link #GL_RGB5_A1 RGB5_A1}{@link #GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link #GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link #GL_RGBA12 RGBA12}{@link #GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglTexImage2D(target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a two-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link #GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link #GL_RED RED}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link #GL_R3_G3_B2 R3_G3_B2}{@link #GL_RGB4 RGB4}{@link #GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link #GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link #GL_RGB10 RGB10}{@link #GL_RGB12 RGB12}{@link #GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link #GL_RGBA2 RGBA2}{@link #GL_RGBA4 RGBA4}{@link #GL_RGB5_A1 RGB5_A1}{@link #GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link #GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link #GL_RGBA12 RGBA12}{@link #GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * @param format the texel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglTexImage2D(target, level, internalformat, width, height, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glCopyTexImage1D ] --- - - /** - * Defines a one-dimensional texel array in exactly the manner of {@link #glTexImage1D TexImage1D}, except that the image data are taken from the framebuffer rather - * than from client memory. For the purposes of decoding the texture image, {@code CopyTexImage1D} is equivalent to calling {@link #glCopyTexImage2D CopyTexImage2D} - * with corresponding arguments and height of 1, except that the height of the image is always 1, regardless of the value of border. level, internalformat, - * and border are specified using the same values, with the same meanings, as the corresponding arguments of {@link #glTexImage1D TexImage1D}. The constraints on - * width and border are exactly those of the corresponding arguments of {@link #glTexImage1D TexImage1D}. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number - * @param internalFormat the texture internal format. See {@link #glTexImage2D TexImage2D} for a list of supported formats. - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture width - * @param border the texture border width - * - * @see Reference Page - */ - public static native void glCopyTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalFormat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLint") int border); - - // --- [ glCopyTexImage2D ] --- - - /** - * Defines a two-dimensional texel array in exactly the manner of {@link #glTexImage2D TexImage2D}, except that the image data are taken from the framebuffer rather - * than from client memory. - * - *

    {@code x}, {@code y}, {@code width}, and {@code height} correspond precisely to the corresponding arguments to {@link #glReadPixels ReadPixels}; they specify the - * image's width and height, and the lower left (x, y) coordinates of the framebuffer region to be copied.

    - * - *

    The image is taken from the framebuffer exactly as if these arguments were passed to {@link GL11#glCopyPixels CopyPixels} with argument type set to {@link #GL_COLOR COLOR}, - * {@link #GL_DEPTH DEPTH}, or {@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}, depending on {@code internalformat}. RGBA data is taken from the current color buffer, while depth - * component and stencil index data are taken from the depth and stencil buffers, respectively.

    - * - *

    Subsequent processing is identical to that described for {@link #glTexImage2D TexImage2D}, beginning with clamping of the R, G, B, A, or depth values, and masking - * of the stencil index values from the resulting pixel groups. Parameters {@code level}, {@code internalformat}, and {@code border} are specified using - * the same values, with the same meanings, as the corresponding arguments of {@link #glTexImage2D TexImage2D}.

    - * - *

    The constraints on width, height, and border are exactly those for the corresponding arguments of {@link #glTexImage2D TexImage2D}.

    - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param internalFormat the texture internal format. See {@link #glTexImage2D TexImage2D} for a list of supported formats. - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture width - * @param height the texture height - * @param border the texture border width - * - * @see Reference Page - */ - public static native void glCopyTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalFormat, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border); - - // --- [ glCopyTexSubImage1D ] --- - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the {@code internalformat}, {@code width} or {@code border} - * parameters of the specified texel array, nor is any change made to texel values outside the specified subregion. See {@link #glCopyTexImage1D CopyTexImage1D} for more - * details. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * - * @see Reference Page - */ - public static native void glCopyTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width); - - // --- [ glCopyTexSubImage2D ] --- - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the {@code internalformat}, {@code width}, {@code height}, - * or {@code border} parameters of the specified texel array, nor is any change made to texel values outside the specified subregion. See - * {@link #glCopyTexImage2D CopyTexImage2D} for more details. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param yoffset the lower texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static native void glCopyTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glTexParameteri ] --- - - /** - * Sets the integer value of a texture parameter, which controls how the texel array is treated when specified or changed, and when applied to a fragment. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_1D TEXTURE_1D}{@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param pname the parameter to set. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link #GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link #GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link #GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link #GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link #GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glTexParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glTexParameteriv ] --- - - /** Unsafe version of: {@link #glTexParameteriv TexParameteriv} */ - public static native void nglTexParameteriv(int target, int pname, long params); - - /** - * Pointer version of {@link #glTexParameteri TexParameteri}. - * - * @param target the texture target - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTexParameteriv(target, pname, memAddress(params)); - } - - // --- [ glTexParameterf ] --- - - /** - * Float version of {@link #glTexParameteri TexParameteri}. - * - * @param target the texture target - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glTexParameterf(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glTexParameterfv ] --- - - /** Unsafe version of: {@link #glTexParameterfv TexParameterfv} */ - public static native void nglTexParameterfv(int target, int pname, long params); - - /** - * Pointer version of {@link #glTexParameterf TexParameterf}. - * - * @param target the texture target - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTexParameterfv(target, pname, memAddress(params)); - } - - // --- [ glTexSubImage1D ] --- - - /** Unsafe version of: {@link #glTexSubImage1D TexSubImage1D} */ - public static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, long pixels); - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTexSubImage1D(target, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTexSubImage1D(target, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTexSubImage1D(target, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTexSubImage1D(target, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * One-dimensional version of {@link #glTexSubImage2D TexSubImage2D}. - * - * @param target the texture target. Must be:
    {@link #GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTexSubImage1D(target, level, xoffset, width, format, type, memAddress(pixels)); - } - - // --- [ glTexSubImage2D ] --- - - /** Unsafe version of: {@link #glTexSubImage2D TexSubImage2D} */ - public static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels); - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * Respecifies a rectangular subregion of an existing texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link #GL_RED RED}{@link #GL_GREEN GREEN}{@link #GL_BLUE BLUE}{@link #GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link #GL_RGB RGB}{@link #GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link #GL_STENCIL_INDEX STENCIL_INDEX}{@link #GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link #GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link #GL_BYTE BYTE}{@link #GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link #GL_SHORT SHORT}
    {@link #GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link #GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - // --- [ glViewport ] --- - - /** - * Specifies the viewport transformation parameters for all viewports. - * - *

    The location of the viewport's bottom-left corner, given by {@code (x, y)}, are clamped to be within the implementation-dependent viewport bounds range. - * The viewport bounds range {@code [min, max]} tuple may be determined by calling {@link #glGetFloatv GetFloatv} with the symbolic - * constant {@link GL41#GL_VIEWPORT_BOUNDS_RANGE VIEWPORT_BOUNDS_RANGE}. Viewport width and height are clamped to implementation-dependent maximums when specified. The maximum - * width and height may be found by calling {@link #glGetFloatv GetFloatv} with the symbolic constant {@link #GL_MAX_VIEWPORT_DIMS MAX_VIEWPORT_DIMS}. The - * maximum viewport dimensions must be greater than or equal to the larger of the visible dimensions of the display being rendered to (if a display - * exists), and the largest renderbuffer image which can be successfully created and attached to a framebuffer object.

    - * - *

    In the initial state, {@code w} and {@code h} for each viewport are set to the width and height, respectively, of the window into which the GL is to do - * its rendering. If the default framebuffer is bound but no default framebuffer is associated with the GL context, then {@code w} and {@code h} are - * initially set to zero.

    - * - * @param x the left viewport coordinate - * @param y the bottom viewport coordinate - * @param w the viewport width - * @param h the viewport height - * - * @see Reference Page - */ - public static native void glViewport(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int w, @NativeType("GLsizei") int h); - - /** - * Array version of: {@link #glGenTextures GenTextures} - * - * @see Reference Page - */ - public static void glGenTextures(@NativeType("GLuint *") int[] textures) { - long __functionAddress = GL.getICD().glGenTextures; - if (CHECKS) { - check(__functionAddress); - } - callPV(textures.length, textures, __functionAddress); - } - - /** - * Array version of: {@link #glDeleteTextures DeleteTextures} - * - * @see Reference Page - */ - public static void glDeleteTextures(@NativeType("GLuint const *") int[] textures) { - long __functionAddress = GL.getICD().glDeleteTextures; - if (CHECKS) { - check(__functionAddress); - } - callPV(textures.length, textures, __functionAddress); - } - - /** - * Array version of: {@link #glGetFloatv GetFloatv} - * - * @see Reference Page - */ - public static void glGetFloatv(@NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetFloatv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetIntegerv GetIntegerv} - * - * @see Reference Page - */ - public static void glGetIntegerv(@NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetIntegerv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetDoublev GetDoublev} - * - * @see Reference Page - */ - public static void glGetDoublev(@NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetDoublev; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glGetTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glGetTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glGetTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexImage GetTexImage} - * - * @see Reference Page - */ - public static void glGetTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - long __functionAddress = GL.getICD().glGetTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexLevelParameteriv GetTexLevelParameteriv} - * - * @see Reference Page - */ - public static void glGetTexLevelParameteriv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTexLevelParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, level, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexLevelParameterfv GetTexLevelParameterfv} - * - * @see Reference Page - */ - public static void glGetTexLevelParameterfv(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetTexLevelParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, level, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexParameteriv GetTexParameteriv} - * - * @see Reference Page - */ - public static void glGetTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTexParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexParameterfv GetTexParameterfv} - * - * @see Reference Page - */ - public static void glGetTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetTexParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glReadPixels ReadPixels} - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glReadPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glReadPixels ReadPixels} - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glReadPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glReadPixels ReadPixels} - * - * @see Reference Page - */ - public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glReadPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTexImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTexImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTexImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage1D TexImage1D} - * - * @see Reference Page - */ - public static void glTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTexImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTexImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTexImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTexImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage2D TexImage2D} - * - * @see Reference Page - */ - public static void glTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTexImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexParameteriv TexParameteriv} - * - * @see Reference Page - */ - public static void glTexParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glTexParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexParameterfv TexParameterfv} - * - * @see Reference Page - */ - public static void glTexParameterfv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glTexParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage1D TexSubImage1D} - * - * @see Reference Page - */ - public static void glTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage2D TexSubImage2D} - * - * @see Reference Page - */ - public static void glTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL12.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL12.java deleted file mode 100644 index 88c3063d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL12.java +++ /dev/null @@ -1,734 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 1.2. Includes the deprecated symbols of the Compatibility Profile. - * - *

    Extensions promoted to core in this release:

    - * - * - * - *

    Extensions part of the imaging subset:

    - * - * - */ -public class GL12 extends GL11 { - - static { GL.initialize(); } - - /** Aliases for smooth points and lines. */ - public static final int - GL_ALIASED_POINT_SIZE_RANGE = 0x846D, - GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, - GL_SMOOTH_POINT_SIZE_RANGE = 0xB12, - GL_SMOOTH_POINT_SIZE_GRANULARITY = 0xB13, - GL_SMOOTH_LINE_WIDTH_RANGE = 0xB22, - GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0xB23; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_3D = 0x806A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, and by the {@code pname} parameter of PixelStore. */ - public static final int - GL_PACK_SKIP_IMAGES = 0x806B, - GL_PACK_IMAGE_HEIGHT = 0x806C, - GL_UNPACK_SKIP_IMAGES = 0x806D, - GL_UNPACK_IMAGE_HEIGHT = 0x806E; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of TexImage3D, GetTexImage, GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and - * GetTexParameterfv. - */ - public static final int GL_TEXTURE_3D = 0x806F; - - /** Accepted by the {@code target} parameter of TexImage3D, GetTexLevelParameteriv, and GetTexLevelParameterfv. */ - public static final int GL_PROXY_TEXTURE_3D = 0x8070; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameteriv and GetTexLevelParameterfv. */ - public static final int GL_TEXTURE_DEPTH = 0x8071; - - /** Accepted by the {@code pname} parameter of TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. */ - public static final int GL_TEXTURE_WRAP_R = 0x8072; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073; - - /** Accepted by the {@code format} parameter of DrawPixels, GetTexImage, ReadPixels, TexImage1D, and TexImage2D. */ - public static final int - GL_BGR = 0x80E0, - GL_BGRA = 0x80E1; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * SeparableFilter3D, GetSeparableFilter, ColorTable, GetColorTable, TexImage4D, and TexSubImage4D. - */ - public static final int - GL_UNSIGNED_BYTE_3_3_2 = 0x8032, - GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, - GL_UNSIGNED_SHORT_5_6_5 = 0x8363, - GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, - GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, - GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, - GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, - GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, - GL_UNSIGNED_INT_8_8_8_8 = 0x8035, - GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, - GL_UNSIGNED_INT_10_10_10_2 = 0x8036, - GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_RESCALE_NORMAL = 0x803A; - - /** Accepted by the {@code pname} parameter of LightModel*, and also by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8; - - /** Accepted by the {@code param} parameter of LightModel* when {@code pname} is LIGHT_MODEL_COLOR_CONTROL. */ - public static final int - GL_SINGLE_COLOR = 0x81F9, - GL_SEPARATE_SPECULAR_COLOR = 0x81FA; - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int GL_CLAMP_TO_EDGE = 0x812F; - - /** Accepted by the {@code pname} parameter of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. */ - public static final int - GL_TEXTURE_MIN_LOD = 0x813A, - GL_TEXTURE_MAX_LOD = 0x813B, - GL_TEXTURE_BASE_LEVEL = 0x813C, - GL_TEXTURE_MAX_LEVEL = 0x813D; - - /** Recommended maximum amounts of vertex and index data. */ - public static final int - GL_MAX_ELEMENTS_VERTICES = 0x80E8, - GL_MAX_ELEMENTS_INDICES = 0x80E9; - - protected GL12() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexImage3D ] --- - - /** Unsafe version of: {@link #glTexImage3D TexImage3D} */ - public static void nglTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels) { - GL12C.nglTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12C#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12C#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12C#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12C#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12C#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12C#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - // --- [ glTexSubImage3D ] --- - - /** Unsafe version of: {@link #glTexSubImage3D TexSubImage3D} */ - public static void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels) { - GL12C.nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12C#GL_BGR BGR}
    {@link GL12C#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12C#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12C#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12C#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12C#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12C#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12C#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12C#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12C#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12C#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12C#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - // --- [ glCopyTexSubImage3D ] --- - - /** - * Respecifies a rectangular subregion of a slice of an existing 3D texel array. No change is made to the {@code internalformat}, {@code width}, - * {@code height}, or {@code border} parameters of the specified texel array, nor is any change made to texel values outside the specified subregion. See - * {@link GL11C#glCopyTexImage2D CopyTexImage2D} for more details. - * - * @param target the texture target. One of:
    {@link GL12C#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param xoffset the x coordinate of the texture subregion to update - * @param yoffset the y coordinate of the texture subregion to update - * @param zoffset the z coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static void glCopyTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL12C.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - // --- [ glDrawRangeElements ] --- - - /** - * Unsafe version of: {@link #glDrawRangeElements DrawRangeElements} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawRangeElements(int mode, int start, int end, int count, int type, long indices) { - GL12C.nglDrawRangeElements(mode, start, end, count, type, indices); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link GL12C#GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link GL12C#GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices) { - GL12C.glDrawRangeElements(mode, start, end, count, type, indices); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link GL12C#GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link GL12C#GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices) { - GL12C.glDrawRangeElements(mode, start, end, type, indices); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link GL12C#GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link GL12C#GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ByteBuffer indices) { - GL12C.glDrawRangeElements(mode, start, end, indices); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link GL12C#GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link GL12C#GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ShortBuffer indices) { - GL12C.glDrawRangeElements(mode, start, end, indices); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link GL12C#GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link GL12C#GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") IntBuffer indices) { - GL12C.glDrawRangeElements(mode, start, end, indices); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - GL12C.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL12C.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL12C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL12C.java deleted file mode 100644 index 37b241e0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL12C.java +++ /dev/null @@ -1,745 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 1.2. - * - *

    Extensions promoted to core in this release:

    - * - * - * - *

    Extensions part of the imaging subset:

    - * - * - */ -public class GL12C extends GL11C { - - static { GL.initialize(); } - - /** Aliases for smooth points and lines. */ - public static final int - GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, - GL_SMOOTH_POINT_SIZE_RANGE = 0xB12, - GL_SMOOTH_POINT_SIZE_GRANULARITY = 0xB13, - GL_SMOOTH_LINE_WIDTH_RANGE = 0xB22, - GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0xB23; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_3D = 0x806A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, and by the {@code pname} parameter of PixelStore. */ - public static final int - GL_PACK_SKIP_IMAGES = 0x806B, - GL_PACK_IMAGE_HEIGHT = 0x806C, - GL_UNPACK_SKIP_IMAGES = 0x806D, - GL_UNPACK_IMAGE_HEIGHT = 0x806E; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of TexImage3D, GetTexImage, GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and - * GetTexParameterfv. - */ - public static final int GL_TEXTURE_3D = 0x806F; - - /** Accepted by the {@code target} parameter of TexImage3D, GetTexLevelParameteriv, and GetTexLevelParameterfv. */ - public static final int GL_PROXY_TEXTURE_3D = 0x8070; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameteriv and GetTexLevelParameterfv. */ - public static final int GL_TEXTURE_DEPTH = 0x8071; - - /** Accepted by the {@code pname} parameter of TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. */ - public static final int GL_TEXTURE_WRAP_R = 0x8072; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073; - - /** Accepted by the {@code format} parameter of DrawPixels, GetTexImage, ReadPixels, TexImage1D, and TexImage2D. */ - public static final int - GL_BGR = 0x80E0, - GL_BGRA = 0x80E1; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * SeparableFilter3D, GetSeparableFilter, ColorTable, GetColorTable, TexImage4D, and TexSubImage4D. - */ - public static final int - GL_UNSIGNED_BYTE_3_3_2 = 0x8032, - GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, - GL_UNSIGNED_SHORT_5_6_5 = 0x8363, - GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, - GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, - GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, - GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, - GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, - GL_UNSIGNED_INT_8_8_8_8 = 0x8035, - GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, - GL_UNSIGNED_INT_10_10_10_2 = 0x8036, - GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int GL_CLAMP_TO_EDGE = 0x812F; - - /** Accepted by the {@code pname} parameter of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. */ - public static final int - GL_TEXTURE_MIN_LOD = 0x813A, - GL_TEXTURE_MAX_LOD = 0x813B, - GL_TEXTURE_BASE_LEVEL = 0x813C, - GL_TEXTURE_MAX_LEVEL = 0x813D; - - /** Recommended maximum amounts of vertex and index data. */ - public static final int - GL_MAX_ELEMENTS_VERTICES = 0x80E8, - GL_MAX_ELEMENTS_INDICES = 0x80E9; - - protected GL12C() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexImage3D ] --- - - /** Unsafe version of: {@link #glTexImage3D TexImage3D} */ - public static native void nglTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels); - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link #GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer pixels) { - nglTexImage3D(target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link #GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link #GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer pixels) { - nglTexImage3D(target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link #GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer pixels) { - nglTexImage3D(target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link #GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer pixels) { - nglTexImage3D(target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - /** - * Specifies a three-dimensional texture image. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link #GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param internalformat the texture internal format. One of:
    {@link GL11#GL_RED RED}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    {@link GL30#GL_R8 R8}{@link GL31#GL_R8_SNORM R8_SNORM}{@link GL30#GL_R16 R16}{@link GL31#GL_R16_SNORM R16_SNORM}{@link GL30#GL_RG8 RG8}{@link GL31#GL_RG8_SNORM RG8_SNORM}
    {@link GL30#GL_RG16 RG16}{@link GL31#GL_RG16_SNORM RG16_SNORM}{@link GL11#GL_R3_G3_B2 R3_G3_B2}{@link GL11#GL_RGB4 RGB4}{@link GL11#GL_RGB5 RGB5}{@link GL41#GL_RGB565 RGB565}
    {@link GL11#GL_RGB8 RGB8}{@link GL31#GL_RGB8_SNORM RGB8_SNORM}{@link GL11#GL_RGB10 RGB10}{@link GL11#GL_RGB12 RGB12}{@link GL11#GL_RGB16 RGB16}{@link GL31#GL_RGB16_SNORM RGB16_SNORM}
    {@link GL11#GL_RGBA2 RGBA2}{@link GL11#GL_RGBA4 RGBA4}{@link GL11#GL_RGB5_A1 RGB5_A1}{@link GL11#GL_RGBA8 RGBA8}{@link GL31#GL_RGBA8_SNORM RGBA8_SNORM}{@link GL11#GL_RGB10_A2 RGB10_A2}
    {@link GL33#GL_RGB10_A2UI RGB10_A2UI}{@link GL11#GL_RGBA12 RGBA12}{@link GL11#GL_RGBA16 RGBA16}{@link GL31#GL_RGBA16_SNORM RGBA16_SNORM}{@link GL21#GL_SRGB8 SRGB8}{@link GL21#GL_SRGB8_ALPHA8 SRGB8_ALPHA8}
    {@link GL30#GL_R16F R16F}{@link GL30#GL_RG16F RG16F}{@link GL30#GL_RGB16F RGB16F}{@link GL30#GL_RGBA16F RGBA16F}{@link GL30#GL_R32F R32F}{@link GL30#GL_RG32F RG32F}
    {@link GL30#GL_RGB32F RGB32F}{@link GL30#GL_RGBA32F RGBA32F}{@link GL30#GL_R11F_G11F_B10F R11F_G11F_B10F}{@link GL30#GL_RGB9_E5 RGB9_E5}{@link GL30#GL_R8I R8I}{@link GL30#GL_R8UI R8UI}
    {@link GL30#GL_R16I R16I}{@link GL30#GL_R16UI R16UI}{@link GL30#GL_R32I R32I}{@link GL30#GL_R32UI R32UI}{@link GL30#GL_RG8I RG8I}{@link GL30#GL_RG8UI RG8UI}
    {@link GL30#GL_RG16I RG16I}{@link GL30#GL_RG16UI RG16UI}{@link GL30#GL_RG32I RG32I}{@link GL30#GL_RG32UI RG32UI}{@link GL30#GL_RGB8I RGB8I}{@link GL30#GL_RGB8UI RGB8UI}
    {@link GL30#GL_RGB16I RGB16I}{@link GL30#GL_RGB16UI RGB16UI}{@link GL30#GL_RGB32I RGB32I}{@link GL30#GL_RGB32UI RGB32UI}{@link GL30#GL_RGBA8I RGBA8I}{@link GL30#GL_RGBA8UI RGBA8UI}
    {@link GL30#GL_RGBA16I RGBA16I}{@link GL30#GL_RGBA16UI RGBA16UI}{@link GL30#GL_RGBA32I RGBA32I}{@link GL30#GL_RGBA32UI RGBA32UI}{@link GL14#GL_DEPTH_COMPONENT16 DEPTH_COMPONENT16}{@link GL14#GL_DEPTH_COMPONENT24 DEPTH_COMPONENT24}
    {@link GL14#GL_DEPTH_COMPONENT32 DEPTH_COMPONENT32}{@link GL30#GL_DEPTH24_STENCIL8 DEPTH24_STENCIL8}{@link GL30#GL_DEPTH_COMPONENT32F DEPTH_COMPONENT32F}{@link GL30#GL_DEPTH32F_STENCIL8 DEPTH32F_STENCIL8}{@link GL30#GL_COMPRESSED_RED COMPRESSED_RED}{@link GL30#GL_COMPRESSED_RG COMPRESSED_RG}
    {@link GL13#GL_COMPRESSED_RGB COMPRESSED_RGB}{@link GL13#GL_COMPRESSED_RGBA COMPRESSED_RGBA}{@link GL21#GL_COMPRESSED_SRGB COMPRESSED_SRGB}{@link GL21#GL_COMPRESSED_SRGB_ALPHA COMPRESSED_SRGB_ALPHA}{@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}{@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}{@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}{@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}
    - * @param width the texture width - * @param height the texture height - * @param depth the texture depth - * @param border the texture border width - * @param format the texel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the texel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the texel data - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer pixels) { - nglTexImage3D(target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); - } - - // --- [ glTexSubImage3D ] --- - - /** Unsafe version of: {@link #glTexSubImage3D TexSubImage3D} */ - public static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels); - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * Respecifies a cubic subregion of an existing 3D texel array. No change is made to the internalformat, width, height, depth, or border parameters of - * the specified texel array, nor is any change made to texel values outside the specified subregion. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link #GL_BGR BGR}
    {@link #GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link #GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link #GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link #GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link #GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link #GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link #GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link #GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link #GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link #GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link #GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link #GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link #GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - // --- [ glCopyTexSubImage3D ] --- - - /** - * Respecifies a rectangular subregion of a slice of an existing 3D texel array. No change is made to the {@code internalformat}, {@code width}, - * {@code height}, or {@code border} parameters of the specified texel array, nor is any change made to texel values outside the specified subregion. See - * {@link GL11C#glCopyTexImage2D CopyTexImage2D} for more details. - * - * @param target the texture target. One of:
    {@link #GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number - * @param xoffset the x coordinate of the texture subregion to update - * @param yoffset the y coordinate of the texture subregion to update - * @param zoffset the z coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static native void glCopyTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glDrawRangeElements ] --- - - /** - * Unsafe version of: {@link #glDrawRangeElements DrawRangeElements} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawRangeElements(int mode, int start, int end, int count, int type, long indices); - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link #GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link #GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices) { - nglDrawRangeElements(mode, start, end, count, type, indices); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link #GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link #GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices) { - nglDrawRangeElements(mode, start, end, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices)); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link #GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link #GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ByteBuffer indices) { - nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices)); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link #GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link #GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ShortBuffer indices) { - nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices)); - } - - /** - * A restricted form of {@link GL11C#glDrawElements DrawElements}. mode, start, end, and count match the corresponding arguments to glDrawElements, with the additional - * constraint that all values in the arrays count must lie between start and end, inclusive. - * - *

    Implementations denote recommended maximum amounts of vertex and index data, which may be queried by calling glGet with argument - * {@link #GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} and {@link #GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if - * count is greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no requirement that all vertices - * in the range start end be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be - * achieved with an optimal index set.

    - * - *

    When glDrawRangeElements is called, it uses count sequential elements from an enabled array, starting at start to construct a sequence of geometric - * primitives. mode specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is - * enabled, each is used.

    - * - *

    Vertex attributes that are modified by glDrawRangeElements have an unspecified value after glDrawRangeElements returns. Attributes that aren't modified - * maintain their previous values.

    - * - *
    Errors
    - * - *

    It is an error for indices to lie outside the range start end, but implementations may not check for this situation. Such indices cause - * implementation-dependent behavior.

    - * - *
      - *
    • GL_INVALID_ENUM is generated if mode is not an accepted value.
    • - *
    • GL_INVALID_VALUE is generated if count is negative.
    • - *
    • GL_INVALID_VALUE is generated if end < start.
    • - *
    • GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible with the input primitive type of the geometry shader in the - * currently installed program object.
    • - *
    • GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data - * store is currently mapped.
    • - *
    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glDrawRangeElements(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") IntBuffer indices) { - nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices)); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTexImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTexImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTexImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexImage3D TexImage3D} - * - * @see Reference Page - */ - public static void glTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTexImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, internalformat, width, height, depth, border, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTexSubImage3D TexSubImage3D} - * - * @see Reference Page - */ - public static void glTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTexSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL13.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL13.java deleted file mode 100644 index beb0f036..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL13.java +++ /dev/null @@ -1,1486 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 1.3. Includes the deprecated symbols of the Compatibility Profile. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL13 extends GL12 { - - static { GL.initialize(); } - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D. */ - public static final int - GL_COMPRESSED_ALPHA = 0x84E9, - GL_COMPRESSED_LUMINANCE = 0x84EA, - GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB, - GL_COMPRESSED_INTENSITY = 0x84EC, - GL_COMPRESSED_RGB = 0x84ED, - GL_COMPRESSED_RGBA = 0x84EE; - - /** Accepted by the {@code target} parameter of Hint and the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_COMPRESSION_HINT = 0x84EF; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0, - GL_TEXTURE_COMPRESSED = 0x86A1; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int - GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, - GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; - - /** Accepted by the {@code param} parameters of TexGend, TexGenf, and TexGeni when {@code pname} parameter is TEXTURE_GEN_MODE. */ - public static final int - GL_NORMAL_MAP = 0x8511, - GL_REFLECTION_MAP = 0x8512; - - /** - * When the {@code pname} parameter of TexGendv, TexGenfv, and TexGeniv is TEXTURE_GEN_MODE, then the array {@code params} may also contain NORMAL_MAP - * or REFLECTION_MAP. Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled, and by the {@code pname} parameter of GetBooleanv, - * GetIntegerv, GetFloatv, and GetDoublev, and by the {@code target} parameter of BindTexture, GetTexParameterfv, GetTexParameteriv, TexParameterf, - * TexParameteri, TexParameterfv, and TexParameteriv. - */ - public static final int GL_TEXTURE_CUBE_MAP = 0x8513; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; - - /** - * Accepted by the {@code target} parameter of GetTexImage, GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, CopyTexImage2D, TexSubImage2D, and - * CopySubTexImage2D. - */ - public static final int - GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; - - /** Accepted by the {@code target} parameter of GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and TexImage2D. */ - public static final int GL_PROXY_TEXTURE_CUBE_MAP = 0x851B; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_MULTISAMPLE = 0x809D, - GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, - GL_SAMPLE_ALPHA_TO_ONE = 0x809F, - GL_SAMPLE_COVERAGE = 0x80A0; - - /** Accepted by the {@code mask} parameter of PushAttrib. */ - public static final int GL_MULTISAMPLE_BIT = 0x20000000; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_SAMPLE_BUFFERS = 0x80A8, - GL_SAMPLES = 0x80A9, - GL_SAMPLE_COVERAGE_VALUE = 0x80AA, - GL_SAMPLE_COVERAGE_INVERT = 0x80AB; - - /** Accepted by the {@code texture} parameter of ActiveTexture and MultiTexCoord. */ - public static final int - GL_TEXTURE0 = 0x84C0, - GL_TEXTURE1 = 0x84C1, - GL_TEXTURE2 = 0x84C2, - GL_TEXTURE3 = 0x84C3, - GL_TEXTURE4 = 0x84C4, - GL_TEXTURE5 = 0x84C5, - GL_TEXTURE6 = 0x84C6, - GL_TEXTURE7 = 0x84C7, - GL_TEXTURE8 = 0x84C8, - GL_TEXTURE9 = 0x84C9, - GL_TEXTURE10 = 0x84CA, - GL_TEXTURE11 = 0x84CB, - GL_TEXTURE12 = 0x84CC, - GL_TEXTURE13 = 0x84CD, - GL_TEXTURE14 = 0x84CE, - GL_TEXTURE15 = 0x84CF, - GL_TEXTURE16 = 0x84D0, - GL_TEXTURE17 = 0x84D1, - GL_TEXTURE18 = 0x84D2, - GL_TEXTURE19 = 0x84D3, - GL_TEXTURE20 = 0x84D4, - GL_TEXTURE21 = 0x84D5, - GL_TEXTURE22 = 0x84D6, - GL_TEXTURE23 = 0x84D7, - GL_TEXTURE24 = 0x84D8, - GL_TEXTURE25 = 0x84D9, - GL_TEXTURE26 = 0x84DA, - GL_TEXTURE27 = 0x84DB, - GL_TEXTURE28 = 0x84DC, - GL_TEXTURE29 = 0x84DD, - GL_TEXTURE30 = 0x84DE, - GL_TEXTURE31 = 0x84DF; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_ACTIVE_TEXTURE = 0x84E0, - GL_CLIENT_ACTIVE_TEXTURE = 0x84E1, - GL_MAX_TEXTURE_UNITS = 0x84E2; - - /** Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is TEXTURE_ENV_MODE. */ - public static final int GL_COMBINE = 0x8570; - - /** Accepted by the {@code pname} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code target} parameter value is TEXTURE_ENV. */ - public static final int - GL_COMBINE_RGB = 0x8571, - GL_COMBINE_ALPHA = 0x8572, - GL_SOURCE0_RGB = 0x8580, - GL_SOURCE1_RGB = 0x8581, - GL_SOURCE2_RGB = 0x8582, - GL_SOURCE0_ALPHA = 0x8588, - GL_SOURCE1_ALPHA = 0x8589, - GL_SOURCE2_ALPHA = 0x858A, - GL_OPERAND0_RGB = 0x8590, - GL_OPERAND1_RGB = 0x8591, - GL_OPERAND2_RGB = 0x8592, - GL_OPERAND0_ALPHA = 0x8598, - GL_OPERAND1_ALPHA = 0x8599, - GL_OPERAND2_ALPHA = 0x859A, - GL_RGB_SCALE = 0x8573; - - /** - * Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is COMBINE_RGB or - * COMBINE_ALPHA. - */ - public static final int - GL_ADD_SIGNED = 0x8574, - GL_INTERPOLATE = 0x8575, - GL_SUBTRACT = 0x84E7; - - /** - * Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is SOURCE0_RGB, - * SOURCE1_RGB, SOURCE2_RGB, SOURCE0_ALPHA, SOURCE1_ALPHA, or SOURCE2_ALPHA. - */ - public static final int - GL_CONSTANT = 0x8576, - GL_PRIMARY_COLOR = 0x8577, - GL_PREVIOUS = 0x8578; - - /** Accepted by the {@code params} parameter of TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the {@code pname} parameter value is COMBINE_RGB_ARB. */ - public static final int - GL_DOT3_RGB = 0x86AE, - GL_DOT3_RGBA = 0x86AF; - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int GL_CLAMP_TO_BORDER = 0x812D; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3, - GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4, - GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5, - GL_TRANSPOSE_COLOR_MATRIX = 0x84E6; - - protected GL13() { - throw new UnsupportedOperationException(); - } - - // --- [ glCompressedTexImage3D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage3D CompressedTexImage3D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, long data) { - GL13C.nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); - } - - /** - * Specifies a three-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param depth the depth of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL13C.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); - } - - /** - * Specifies a three-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param depth the depth of the texture image - * @param border must be 0 - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - GL13C.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, data); - } - - // --- [ glCompressedTexImage2D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage2D CompressedTexImage2D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, long data) { - GL13C.nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); - } - - /** - * Specifies a two-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13C#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13C#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL13C.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); - } - - /** - * Specifies a two-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13C#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13C#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param border must be 0 - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - GL13C.glCompressedTexImage2D(target, level, internalformat, width, height, border, data); - } - - // --- [ glCompressedTexImage1D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage1D CompressedTexImage1D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, long data) { - GL13C.nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); - } - - /** - * Specifies a one-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL13C.glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); - } - - /** - * Specifies a one-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param border must be 0 - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - GL13C.glCompressedTexImage1D(target, level, internalformat, width, border, data); - } - - // --- [ glCompressedTexSubImage3D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage3D CompressedTexSubImage3D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data) { - GL13C.nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * Respecifies only a cubic subregion of an existing 3D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL13C.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * Respecifies only a cubic subregion of an existing 3D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL13C.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data); - } - - // --- [ glCompressedTexSubImage2D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage2D CompressedTexSubImage2D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data) { - GL13C.nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13C#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL13C.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13C#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL13C.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); - } - - // --- [ glCompressedTexSubImage1D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage1D CompressedTexSubImage1D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, long data) { - GL13C.nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); - } - - /** - * Respecifies only a subregion of an existing 1D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. Must be:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL13C.glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); - } - - /** - * Respecifies only a subregion of an existing 1D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. Must be:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL13C.glCompressedTexSubImage1D(target, level, xoffset, width, format, data); - } - - // --- [ glGetCompressedTexImage ] --- - - /** Unsafe version of: {@link #glGetCompressedTexImage GetCompressedTexImage} */ - public static void nglGetCompressedTexImage(int target, int level, long pixels) { - GL13C.nglGetCompressedTexImage(target, level, pixels); - } - - /** - * Returns a compressed texture image. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13C#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13C#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13C#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13C#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13C#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13C#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer pixels) { - GL13C.glGetCompressedTexImage(target, level, pixels); - } - - /** - * Returns a compressed texture image. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13C#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13C#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13C#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13C#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13C#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13C#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") long pixels) { - GL13C.glGetCompressedTexImage(target, level, pixels); - } - - // --- [ glSampleCoverage ] --- - - /** - * Specifies multisample coverage parameters. - * - *

    Multisampling samples a pixel multiple times at various implementation-dependent subpixel locations to generate antialiasing effects. Multisampling - * transparently antialiases points, lines, polygons, and images if it is enabled.

    - * - *

    {@code value} is used in constructing a temporary mask used in determining which samples will be used in resolving the final fragment color. This mask - * is bitwise-ANDed with the coverage mask generated from the multisampling computation. If the {@code invert} flag is set, the temporary mask is inverted - * (all bits flipped) and then the bitwise-AND is computed.

    - * - *

    If an implementation does not have any multisample buffers available, or multisampling is disabled, rasterization occurs with only a single sample - * computing a pixel's final RGB color.

    - * - *

    Provided an implementation supports multisample buffers, and multisampling is enabled, then a pixel's final color is generated by combining several - * samples per pixel. Each sample contains color, depth, and stencil information, allowing those operations to be performed on each sample.

    - * - * @param value a sample coverage value. The value is clamped to the range [0, 1]. The initial value is 1.0. - * @param invert if the coverage masks should be inverted. The initial value is false. - * - * @see Reference Page - */ - public static void glSampleCoverage(@NativeType("GLfloat") float value, @NativeType("GLboolean") boolean invert) { - GL13C.glSampleCoverage(value, invert); - } - - // --- [ glActiveTexture ] --- - - /** - * Selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation - * dependent. - * - * @param texture which texture unit to make active. One of:
    {@link GL13C#GL_TEXTURE0 TEXTURE0}GL_TEXTURE[1-31]
    - * - * @see Reference Page - */ - public static void glActiveTexture(@NativeType("GLenum") int texture) { - GL13C.glActiveTexture(texture); - } - - // --- [ glClientActiveTexture ] --- - - /** - * Selects the vertex array client state parameters to be modified by the TexCoordPointer command and the array affected by EnableClientState and - * DisableClientState with parameter TEXTURE_COORD_ARRAY. - * - * @param texture which texture coordinate array to make active. One of:
    {@link #GL_TEXTURE0 TEXTURE0}GL_TEXTURE[1-31]
    - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glClientActiveTexture(@NativeType("GLenum") int texture); - - // --- [ glMultiTexCoord1f ] --- - - /** - * Sets the current one-dimensional texture coordinate for the specified texture coordinate set. {@code t} and {@code r} are implicitly set to 0 and {@code q} to 1. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord1f(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s); - - // --- [ glMultiTexCoord1s ] --- - - /** - * Short version of {@link #glMultiTexCoord1f MultiTexCoord1f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord1s(@NativeType("GLenum") int texture, @NativeType("GLshort") short s); - - // --- [ glMultiTexCoord1i ] --- - - /** - * Integer version of {@link #glMultiTexCoord1f MultiTexCoord1f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord1i(@NativeType("GLenum") int texture, @NativeType("GLint") int s); - - // --- [ glMultiTexCoord1d ] --- - - /** - * Double version of {@link #glMultiTexCoord1f MultiTexCoord1f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord1d(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s); - - // --- [ glMultiTexCoord1fv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1fv MultiTexCoord1fv} */ - public static native void nglMultiTexCoord1fv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1f MultiTexCoord1f}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1fv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord1sv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1sv MultiTexCoord1sv} */ - public static native void nglMultiTexCoord1sv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1s MultiTexCoord1s}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1sv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord1iv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1iv MultiTexCoord1iv} */ - public static native void nglMultiTexCoord1iv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1i MultiTexCoord1i}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1iv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord1dv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord1dv MultiTexCoord1dv} */ - public static native void nglMultiTexCoord1dv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord1d MultiTexCoord1d}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1dv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2f ] --- - - /** - * Sets the current two-dimensional texture coordinate for the specified texture coordinate set. {@code r} is implicitly set to 0 and {@code q} to 1. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord2f(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s, @NativeType("GLfloat") float t); - - // --- [ glMultiTexCoord2s ] --- - - /** - * Short version of {@link #glMultiTexCoord2f MultiTexCoord2f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord2s(@NativeType("GLenum") int texture, @NativeType("GLshort") short s, @NativeType("GLshort") short t); - - // --- [ glMultiTexCoord2i ] --- - - /** - * Integer version of {@link #glMultiTexCoord2f MultiTexCoord2f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord2i(@NativeType("GLenum") int texture, @NativeType("GLint") int s, @NativeType("GLint") int t); - - // --- [ glMultiTexCoord2d ] --- - - /** - * Double version of {@link #glMultiTexCoord2f MultiTexCoord2f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord2d(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s, @NativeType("GLdouble") double t); - - // --- [ glMultiTexCoord2fv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2fv MultiTexCoord2fv} */ - public static native void nglMultiTexCoord2fv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2f MultiTexCoord2f}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2fv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2sv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2sv MultiTexCoord2sv} */ - public static native void nglMultiTexCoord2sv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2s MultiTexCoord2s}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2sv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2iv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2iv MultiTexCoord2iv} */ - public static native void nglMultiTexCoord2iv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2i MultiTexCoord2i}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2iv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord2dv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord2dv MultiTexCoord2dv} */ - public static native void nglMultiTexCoord2dv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord2d MultiTexCoord2d}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2dv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3f ] --- - - /** - * Sets the current three-dimensional texture coordinate for the specified texture coordinate set. {@code q} is implicitly set to 1. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord3f(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s, @NativeType("GLfloat") float t, @NativeType("GLfloat") float r); - - // --- [ glMultiTexCoord3s ] --- - - /** - * Short version of {@link #glMultiTexCoord3f MultiTexCoord3f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord3s(@NativeType("GLenum") int texture, @NativeType("GLshort") short s, @NativeType("GLshort") short t, @NativeType("GLshort") short r); - - // --- [ glMultiTexCoord3i ] --- - - /** - * Integer version of {@link #glMultiTexCoord3f MultiTexCoord3f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord3i(@NativeType("GLenum") int texture, @NativeType("GLint") int s, @NativeType("GLint") int t, @NativeType("GLint") int r); - - // --- [ glMultiTexCoord3d ] --- - - /** - * Double version of {@link #glMultiTexCoord3f MultiTexCoord3f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord3d(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s, @NativeType("GLdouble") double t, @NativeType("GLdouble") double r); - - // --- [ glMultiTexCoord3fv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3fv MultiTexCoord3fv} */ - public static native void nglMultiTexCoord3fv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3f MultiTexCoord3f}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3fv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3sv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3sv MultiTexCoord3sv} */ - public static native void nglMultiTexCoord3sv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3s MultiTexCoord3s}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3sv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3iv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3iv MultiTexCoord3iv} */ - public static native void nglMultiTexCoord3iv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3i MultiTexCoord3i}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3iv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord3dv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord3dv MultiTexCoord3dv} */ - public static native void nglMultiTexCoord3dv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord3d MultiTexCoord3d}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3dv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4f ] --- - - /** - * Sets the current four-dimensional texture coordinate for the specified texture coordinate set. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord4f(@NativeType("GLenum") int texture, @NativeType("GLfloat") float s, @NativeType("GLfloat") float t, @NativeType("GLfloat") float r, @NativeType("GLfloat") float q); - - // --- [ glMultiTexCoord4s ] --- - - /** - * Short version of {@link #glMultiTexCoord4f MultiTexCoord4f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord4s(@NativeType("GLenum") int texture, @NativeType("GLshort") short s, @NativeType("GLshort") short t, @NativeType("GLshort") short r, @NativeType("GLshort") short q); - - // --- [ glMultiTexCoord4i ] --- - - /** - * Integer version of {@link #glMultiTexCoord4f MultiTexCoord4f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord4i(@NativeType("GLenum") int texture, @NativeType("GLint") int s, @NativeType("GLint") int t, @NativeType("GLint") int r, @NativeType("GLint") int q); - - // --- [ glMultiTexCoord4d ] --- - - /** - * Double version of {@link #glMultiTexCoord4f MultiTexCoord4f}. - * - * @param texture the coordinate set to be modified - * @param s the s component of the current texture coordinates - * @param t the t component of the current texture coordinates - * @param r the r component of the current texture coordinates - * @param q the q component of the current texture coordinates - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoord4d(@NativeType("GLenum") int texture, @NativeType("GLdouble") double s, @NativeType("GLdouble") double t, @NativeType("GLdouble") double r, @NativeType("GLdouble") double q); - - // --- [ glMultiTexCoord4fv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4fv MultiTexCoord4fv} */ - public static native void nglMultiTexCoord4fv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4f MultiTexCoord4f}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4fv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4sv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4sv MultiTexCoord4sv} */ - public static native void nglMultiTexCoord4sv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4s MultiTexCoord4s}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4sv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4iv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4iv MultiTexCoord4iv} */ - public static native void nglMultiTexCoord4iv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4i MultiTexCoord4i}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4iv(texture, memAddress(v)); - } - - // --- [ glMultiTexCoord4dv ] --- - - /** Unsafe version of: {@link #glMultiTexCoord4dv MultiTexCoord4dv} */ - public static native void nglMultiTexCoord4dv(int texture, long v); - - /** - * Pointer version of {@link #glMultiTexCoord4d MultiTexCoord4d}. - * - * @param texture the coordinate set to be modified - * @param v the texture coordinate buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4dv(texture, memAddress(v)); - } - - // --- [ glLoadTransposeMatrixf ] --- - - /** Unsafe version of: {@link #glLoadTransposeMatrixf LoadTransposeMatrixf} */ - public static native void nglLoadTransposeMatrixf(long m); - - /** - * Sets the current matrix to a 4 × 4 matrix in row-major order. - * - *

    The matrix is stored as 16 consecutive values, i.e. as:

    - * - * - * - * - * - * - *
    a1a2a3a4
    a5a6a7a8
    a9a10a11a12
    a13a14a15a16
    - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadTransposeMatrixf(@NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglLoadTransposeMatrixf(memAddress(m)); - } - - // --- [ glLoadTransposeMatrixd ] --- - - /** Unsafe version of: {@link #glLoadTransposeMatrixd LoadTransposeMatrixd} */ - public static native void nglLoadTransposeMatrixd(long m); - - /** - * Double version of {@link #glLoadTransposeMatrixf LoadTransposeMatrixf}. - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadTransposeMatrixd(@NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglLoadTransposeMatrixd(memAddress(m)); - } - - // --- [ glMultTransposeMatrixf ] --- - - /** Unsafe version of: {@link #glMultTransposeMatrixf MultTransposeMatrixf} */ - public static native void nglMultTransposeMatrixf(long m); - - /** - * Multiplies the current matrix with a 4 × 4 matrix in row-major order. See {@link #glLoadTransposeMatrixf LoadTransposeMatrixf} for details. - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultTransposeMatrixf(@NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMultTransposeMatrixf(memAddress(m)); - } - - // --- [ glMultTransposeMatrixd ] --- - - /** Unsafe version of: {@link #glMultTransposeMatrixd MultTransposeMatrixd} */ - public static native void nglMultTransposeMatrixd(long m); - - /** - * Double version of {@link #glMultTransposeMatrixf MultTransposeMatrixf}. - * - * @param m the matrix data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultTransposeMatrixd(@NativeType("GLdouble const *") DoubleBuffer m) { - if (CHECKS) { - check(m, 16); - } - nglMultTransposeMatrixd(memAddress(m)); - } - - /** - * Array version of: {@link #glMultiTexCoord1fv MultiTexCoord1fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1fv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord1sv MultiTexCoord1sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1sv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord1iv MultiTexCoord1iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1iv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord1dv MultiTexCoord1dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord1dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1dv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord2fv MultiTexCoord2fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2fv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord2sv MultiTexCoord2sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2sv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord2iv MultiTexCoord2iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2iv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord2dv MultiTexCoord2dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord2dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2dv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord3fv MultiTexCoord3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3fv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord3sv MultiTexCoord3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3sv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord3iv MultiTexCoord3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3iv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord3dv MultiTexCoord3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord3dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3dv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord4fv MultiTexCoord4fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4fv(@NativeType("GLenum") int texture, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4fv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord4sv MultiTexCoord4sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4sv(@NativeType("GLenum") int texture, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4sv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord4iv MultiTexCoord4iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4iv(@NativeType("GLenum") int texture, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4iv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoord4dv MultiTexCoord4dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoord4dv(@NativeType("GLenum") int texture, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4dv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(texture, v, __functionAddress); - } - - /** - * Array version of: {@link #glLoadTransposeMatrixf LoadTransposeMatrixf} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadTransposeMatrixf(@NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glLoadTransposeMatrixf; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** - * Array version of: {@link #glLoadTransposeMatrixd LoadTransposeMatrixd} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glLoadTransposeMatrixd(@NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glLoadTransposeMatrixd; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** - * Array version of: {@link #glMultTransposeMatrixf MultTransposeMatrixf} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultTransposeMatrixf(@NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMultTransposeMatrixf; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - - /** - * Array version of: {@link #glMultTransposeMatrixd MultTransposeMatrixd} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultTransposeMatrixd(@NativeType("GLdouble const *") double[] m) { - long __functionAddress = GL.getICD().glMultTransposeMatrixd; - if (CHECKS) { - check(__functionAddress); - check(m, 16); - } - callPV(m, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL13C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL13C.java deleted file mode 100644 index b1fbd910..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL13C.java +++ /dev/null @@ -1,489 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 1.3. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL13C extends GL12C { - - static { GL.initialize(); } - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D. */ - public static final int - GL_COMPRESSED_RGB = 0x84ED, - GL_COMPRESSED_RGBA = 0x84EE; - - /** Accepted by the {@code target} parameter of Hint and the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_COMPRESSION_HINT = 0x84EF; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0, - GL_TEXTURE_COMPRESSED = 0x86A1; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int - GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, - GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; - - /** - * When the {@code pname} parameter of TexGendv, TexGenfv, and TexGeniv is TEXTURE_GEN_MODE, then the array {@code params} may also contain NORMAL_MAP - * or REFLECTION_MAP. Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled, and by the {@code pname} parameter of GetBooleanv, - * GetIntegerv, GetFloatv, and GetDoublev, and by the {@code target} parameter of BindTexture, GetTexParameterfv, GetTexParameteriv, TexParameterf, - * TexParameteri, TexParameterfv, and TexParameteriv. - */ - public static final int GL_TEXTURE_CUBE_MAP = 0x8513; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; - - /** - * Accepted by the {@code target} parameter of GetTexImage, GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, CopyTexImage2D, TexSubImage2D, and - * CopySubTexImage2D. - */ - public static final int - GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; - - /** Accepted by the {@code target} parameter of GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and TexImage2D. */ - public static final int GL_PROXY_TEXTURE_CUBE_MAP = 0x851B; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_MULTISAMPLE = 0x809D, - GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, - GL_SAMPLE_ALPHA_TO_ONE = 0x809F, - GL_SAMPLE_COVERAGE = 0x80A0; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_SAMPLE_BUFFERS = 0x80A8, - GL_SAMPLES = 0x80A9, - GL_SAMPLE_COVERAGE_VALUE = 0x80AA, - GL_SAMPLE_COVERAGE_INVERT = 0x80AB; - - /** Accepted by the {@code texture} parameter of ActiveTexture and MultiTexCoord. */ - public static final int - GL_TEXTURE0 = 0x84C0, - GL_TEXTURE1 = 0x84C1, - GL_TEXTURE2 = 0x84C2, - GL_TEXTURE3 = 0x84C3, - GL_TEXTURE4 = 0x84C4, - GL_TEXTURE5 = 0x84C5, - GL_TEXTURE6 = 0x84C6, - GL_TEXTURE7 = 0x84C7, - GL_TEXTURE8 = 0x84C8, - GL_TEXTURE9 = 0x84C9, - GL_TEXTURE10 = 0x84CA, - GL_TEXTURE11 = 0x84CB, - GL_TEXTURE12 = 0x84CC, - GL_TEXTURE13 = 0x84CD, - GL_TEXTURE14 = 0x84CE, - GL_TEXTURE15 = 0x84CF, - GL_TEXTURE16 = 0x84D0, - GL_TEXTURE17 = 0x84D1, - GL_TEXTURE18 = 0x84D2, - GL_TEXTURE19 = 0x84D3, - GL_TEXTURE20 = 0x84D4, - GL_TEXTURE21 = 0x84D5, - GL_TEXTURE22 = 0x84D6, - GL_TEXTURE23 = 0x84D7, - GL_TEXTURE24 = 0x84D8, - GL_TEXTURE25 = 0x84D9, - GL_TEXTURE26 = 0x84DA, - GL_TEXTURE27 = 0x84DB, - GL_TEXTURE28 = 0x84DC, - GL_TEXTURE29 = 0x84DD, - GL_TEXTURE30 = 0x84DE, - GL_TEXTURE31 = 0x84DF; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_ACTIVE_TEXTURE = 0x84E0; - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int GL_CLAMP_TO_BORDER = 0x812D; - - protected GL13C() { - throw new UnsupportedOperationException(); - } - - // --- [ glCompressedTexImage3D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage3D CompressedTexImage3D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, long data); - - /** - * Specifies a three-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param depth the depth of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); - } - - /** - * Specifies a three-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param depth the depth of the texture image - * @param border must be 0 - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedTexImage2D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage2D CompressedTexImage2D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, long data); - - /** - * Specifies a two-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link #GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link #GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); - } - - /** - * Specifies a two-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link #GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link #GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param height the height of the texture image - * @param border must be 0 - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedTexImage2D(target, level, internalformat, width, height, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedTexImage1D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexImage1D CompressedTexImage1D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, long data); - - /** - * Specifies a one-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param border must be 0 - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); - } - - /** - * Specifies a one-dimensional texture image in a compressed format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param internalformat the format of the compressed image data. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param width the width of the texture image - * @param border must be 0 - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLint") int border, @Nullable @NativeType("void const *") ByteBuffer data) { - nglCompressedTexImage1D(target, level, internalformat, width, border, remainingSafe(data), memAddressSafe(data)); - } - - // --- [ glCompressedTexSubImage3D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage3D CompressedTexSubImage3D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data); - - /** - * Respecifies only a cubic subregion of an existing 3D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * Respecifies only a cubic subregion of an existing 3D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage3D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTexSubImage2D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage2D CompressedTexSubImage2D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data); - - /** - * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link #GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * Respecifies only a rectangular subregion of an existing 2D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link #GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage2D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTexSubImage1D ] --- - - /** - * Unsafe version of: {@link #glCompressedTexSubImage1D CompressedTexSubImage1D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, long data); - - /** - * Respecifies only a subregion of an existing 1D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. Must be:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); - } - - /** - * Respecifies only a subregion of an existing 1D texel array, with incoming data stored in a specific compressed image format. - * - * @param target the target texture. Must be:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTexSubImage1D(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTexSubImage1D(target, level, xoffset, width, format, data.remaining(), memAddress(data)); - } - - // --- [ glGetCompressedTexImage ] --- - - /** Unsafe version of: {@link #glGetCompressedTexImage GetCompressedTexImage} */ - public static native void nglGetCompressedTexImage(int target, int level, long pixels); - - /** - * Returns a compressed texture image. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link #GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link #GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link #GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link #GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link #GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link #GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer pixels) { - if (CHECKS) { - if (DEBUG) { - check(pixels, GL11.glGetTexLevelParameteri(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE)); - } - } - nglGetCompressedTexImage(target, level, memAddress(pixels)); - } - - /** - * Returns a compressed texture image. - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link #GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link #GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link #GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link #GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link #GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link #GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") long pixels) { - nglGetCompressedTexImage(target, level, pixels); - } - - // --- [ glSampleCoverage ] --- - - /** - * Specifies multisample coverage parameters. - * - *

    Multisampling samples a pixel multiple times at various implementation-dependent subpixel locations to generate antialiasing effects. Multisampling - * transparently antialiases points, lines, polygons, and images if it is enabled.

    - * - *

    {@code value} is used in constructing a temporary mask used in determining which samples will be used in resolving the final fragment color. This mask - * is bitwise-ANDed with the coverage mask generated from the multisampling computation. If the {@code invert} flag is set, the temporary mask is inverted - * (all bits flipped) and then the bitwise-AND is computed.

    - * - *

    If an implementation does not have any multisample buffers available, or multisampling is disabled, rasterization occurs with only a single sample - * computing a pixel's final RGB color.

    - * - *

    Provided an implementation supports multisample buffers, and multisampling is enabled, then a pixel's final color is generated by combining several - * samples per pixel. Each sample contains color, depth, and stencil information, allowing those operations to be performed on each sample.

    - * - * @param value a sample coverage value. The value is clamped to the range [0, 1]. The initial value is 1.0. - * @param invert if the coverage masks should be inverted. The initial value is false. - * - * @see Reference Page - */ - public static native void glSampleCoverage(@NativeType("GLfloat") float value, @NativeType("GLboolean") boolean invert); - - // --- [ glActiveTexture ] --- - - /** - * Selects which texture unit subsequent texture state calls will affect. The number of texture units an implementation supports is implementation - * dependent. - * - * @param texture which texture unit to make active. One of:
    {@link #GL_TEXTURE0 TEXTURE0}GL_TEXTURE[1-31]
    - * - * @see Reference Page - */ - public static native void glActiveTexture(@NativeType("GLenum") int texture); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL14.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL14.java deleted file mode 100644 index 91aeae87..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL14.java +++ /dev/null @@ -1,1292 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 1.4. Includes the deprecated symbols of the Compatibility Profile. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL14 extends GL13 { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. */ - public static final int GL_GENERATE_MIPMAP = 0x8191; - - /** Accepted by the {@code target} parameter of Hint, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_GENERATE_MIPMAP_HINT = 0x8192; - - /** Accepted by the {@code sfactor} and {@code dfactor} parameters of BlendFunc. */ - public static final int - GL_CONSTANT_COLOR = 0x8001, - GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, - GL_CONSTANT_ALPHA = 0x8003, - GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; - - /** Accepted by the {@code mode} parameter of BlendEquation. */ - public static final int - GL_FUNC_ADD = 0x8006, - GL_MIN = 0x8007, - GL_MAX = 0x8008; - - /** Accepted by the {@code mode} parameter of BlendEquation. */ - public static final int - GL_FUNC_SUBTRACT = 0x800A, - GL_FUNC_REVERSE_SUBTRACT = 0x800B; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, CopyTexImage1D and CopyTexImage2D. */ - public static final int - GL_DEPTH_COMPONENT16 = 0x81A5, - GL_DEPTH_COMPONENT24 = 0x81A6, - GL_DEPTH_COMPONENT32 = 0x81A7; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int GL_TEXTURE_DEPTH_SIZE = 0x884A; - - /** Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_DEPTH_TEXTURE_MODE = 0x884B; - - /** Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int - GL_TEXTURE_COMPARE_MODE = 0x884C, - GL_TEXTURE_COMPARE_FUNC = 0x884D; - - /** - * Accepted by the {@code param} parameter of TexParameterf, TexParameteri, TexParameterfv, and TexParameteriv when the {@code pname} parameter is - * TEXTURE_COMPARE_MODE. - */ - public static final int GL_COMPARE_R_TO_TEXTURE = 0x884E; - - /** Accepted by the {@code pname} parameter of Fogi and Fogf. */ - public static final int GL_FOG_COORDINATE_SOURCE = 0x8450; - - /** Accepted by the {@code param} parameter of Fogi and Fogf. */ - public static final int - GL_FOG_COORDINATE = 0x8451, - GL_FRAGMENT_DEPTH = 0x8452; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CURRENT_FOG_COORDINATE = 0x8453, - GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454, - GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455; - - /** Accepted by the {@code pname} parameter of GetPointerv. */ - public static final int GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456; - - /** Accepted by the {@code array} parameter of EnableClientState and DisableClientState. */ - public static final int GL_FOG_COORDINATE_ARRAY = 0x8457; - - /** Accepted by the {@code pname} parameter of PointParameterfARB, and the {@code pname} of Get. */ - public static final int - GL_POINT_SIZE_MIN = 0x8126, - GL_POINT_SIZE_MAX = 0x8127, - GL_POINT_FADE_THRESHOLD_SIZE = 0x8128, - GL_POINT_DISTANCE_ATTENUATION = 0x8129; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_COLOR_SUM = 0x8458; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CURRENT_SECONDARY_COLOR = 0x8459, - GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A, - GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B, - GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C; - - /** Accepted by the {@code pname} parameter of GetPointerv. */ - public static final int GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D; - - /** Accepted by the {@code array} parameter of EnableClientState and DisableClientState. */ - public static final int GL_SECONDARY_COLOR_ARRAY = 0x845E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_BLEND_DST_RGB = 0x80C8, - GL_BLEND_SRC_RGB = 0x80C9, - GL_BLEND_DST_ALPHA = 0x80CA, - GL_BLEND_SRC_ALPHA = 0x80CB; - - /** Accepted by the {@code sfail}, {@code dpfail}, and {@code dppass} parameter of StencilOp. */ - public static final int - GL_INCR_WRAP = 0x8507, - GL_DECR_WRAP = 0x8508; - - /** Accepted by the {@code target} parameters of GetTexEnvfv, GetTexEnviv, TexEnvi, TexEnvf, Texenviv, and TexEnvfv. */ - public static final int GL_TEXTURE_FILTER_CONTROL = 0x8500; - - /** - * When the {@code target} parameter of GetTexEnvfv, GetTexEnviv, TexEnvi, TexEnvf, TexEnviv, and TexEnvfv is TEXTURE_FILTER_CONTROL, then the value of - * {@code pname} may be. - */ - public static final int GL_TEXTURE_LOD_BIAS = 0x8501; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int GL_MIRRORED_REPEAT = 0x8370; - - protected GL14() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendColor ] --- - - /** - * Specifies the constant color Cc to be used in blending. - * - * @param red the red color component - * @param green the green color component - * @param blue the blue color component - * @param alpha the alpha color component - * - * @see Reference Page - */ - public static void glBlendColor(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha) { - GL14C.glBlendColor(red, green, blue, alpha); - } - - // --- [ glBlendEquation ] --- - - /** - * Controls the blend equations used for per-fragment blending. - * - * @param mode the blend equation. One of:
    {@link GL14C#GL_FUNC_ADD FUNC_ADD}{@link GL14C#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14C#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14C#GL_MIN MIN}{@link GL14C#GL_MAX MAX}
    - * - * @see Reference Page - */ - public static void glBlendEquation(@NativeType("GLenum") int mode) { - GL14C.glBlendEquation(mode); - } - - // --- [ glFogCoordf ] --- - - /** - * Sets the current fog coordinate. - * - * @param coord the fog coordinate value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glFogCoordf(@NativeType("GLfloat") float coord); - - // --- [ glFogCoordd ] --- - - /** - * Double version of {@link #glFogCoordf FogCoordf}. - * - * @param coord the fog coordinate value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glFogCoordd(@NativeType("GLdouble") double coord); - - // --- [ glFogCoordfv ] --- - - /** Unsafe version of: {@link #glFogCoordfv FogCoordfv} */ - public static native void nglFogCoordfv(long coord); - - /** - * Pointer version of {@link #glFogCoordf FogCoordf}. - * - * @param coord the fog coordinate value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoordfv(@NativeType("GLfloat const *") FloatBuffer coord) { - if (CHECKS) { - check(coord, 1); - } - nglFogCoordfv(memAddress(coord)); - } - - // --- [ glFogCoorddv ] --- - - /** Unsafe version of: {@link #glFogCoorddv FogCoorddv} */ - public static native void nglFogCoorddv(long coord); - - /** - * Pointer version of {@link #glFogCoordd FogCoordd}. - * - * @param coord the fog coordinate value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoorddv(@NativeType("GLdouble const *") DoubleBuffer coord) { - if (CHECKS) { - check(coord, 1); - } - nglFogCoorddv(memAddress(coord)); - } - - // --- [ glFogCoordPointer ] --- - - /** Unsafe version of: {@link #glFogCoordPointer FogCoordPointer} */ - public static native void nglFogCoordPointer(int type, int stride, long pointer); - - /** - * Specifies the location and organization of a fog coordinate array. - * - * @param type the data type of the values stored in the array. One of:
    {@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the fog coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoordPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglFogCoordPointer(type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a fog coordinate array. - * - * @param type the data type of the values stored in the array. One of:
    {@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the fog coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoordPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglFogCoordPointer(type, stride, pointer); - } - - /** - * Specifies the location and organization of a fog coordinate array. - * - * @param type the data type of the values stored in the array. One of:
    {@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the fog coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoordPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglFogCoordPointer(type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a fog coordinate array. - * - * @param type the data type of the values stored in the array. One of:
    {@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the fog coordinate array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoordPointer(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglFogCoordPointer(type, stride, memAddress(pointer)); - } - - // --- [ glMultiDrawArrays ] --- - - /** - * Unsafe version of: {@link #glMultiDrawArrays MultiDrawArrays} - * - * @param drawcount the size of {@code first} and {@code count} - */ - public static void nglMultiDrawArrays(int mode, long first, long count, int drawcount) { - GL14C.nglMultiDrawArrays(mode, first, count, drawcount); - } - - /** - * Renders multiple sets of primitives from array data. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param first an array of starting indices in the enabled arrays - * @param count an array of the number of indices to be rendered - * - * @see Reference Page - */ - public static void glMultiDrawArrays(@NativeType("GLenum") int mode, @NativeType("GLint const *") IntBuffer first, @NativeType("GLsizei const *") IntBuffer count) { - GL14C.glMultiDrawArrays(mode, first, count); - } - - // --- [ glMultiDrawElements ] --- - - /** - * Unsafe version of: {@link #glMultiDrawElements MultiDrawElements} - * - * @param drawcount the size of the {@code count} array - */ - public static void nglMultiDrawElements(int mode, long count, int type, long indices, int drawcount) { - GL14C.nglMultiDrawElements(mode, count, type, indices, drawcount); - } - - /** - * Renders multiple sets of primitives by specifying indices of array data elements. - * - *

    LWJGL note: Use {@link org.lwjgl.system.MemoryUtil#memAddress} to retrieve pointers to the index buffers.

    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param count an array of the elements counts - * @param type the type of the values in indices. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glMultiDrawElements(@NativeType("GLenum") int mode, @NativeType("GLsizei *") IntBuffer count, @NativeType("GLenum") int type, @NativeType("void const **") PointerBuffer indices) { - GL14C.glMultiDrawElements(mode, count, type, indices); - } - - // --- [ glPointParameterf ] --- - - /** - * Sets the float value of a pointer parameter. - * - * @param pname the parameter to set. Must be:
    {@link GL14C#GL_POINT_FADE_THRESHOLD_SIZE POINT_FADE_THRESHOLD_SIZE}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static void glPointParameterf(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param) { - GL14C.glPointParameterf(pname, param); - } - - // --- [ glPointParameteri ] --- - - /** - * Integer version of {@link #glPointParameterf PointParameterf}. - * - * @param pname the parameter to set. Must be:
    {@link GL14C#GL_POINT_FADE_THRESHOLD_SIZE POINT_FADE_THRESHOLD_SIZE}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static void glPointParameteri(@NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL14C.glPointParameteri(pname, param); - } - - // --- [ glPointParameterfv ] --- - - /** Unsafe version of: {@link #glPointParameterfv PointParameterfv} */ - public static void nglPointParameterfv(int pname, long params) { - GL14C.nglPointParameterfv(pname, params); - } - - /** - * Pointer version of {@link #glPointParameterf PointParameterf}. - * - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glPointParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - GL14C.glPointParameterfv(pname, params); - } - - // --- [ glPointParameteriv ] --- - - /** Unsafe version of: {@link #glPointParameteriv PointParameteriv} */ - public static void nglPointParameteriv(int pname, long params) { - GL14C.nglPointParameteriv(pname, params); - } - - /** - * Pointer version of {@link #glPointParameteri PointParameteri}. - * - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glPointParameteriv(@NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL14C.glPointParameteriv(pname, params); - } - - // --- [ glSecondaryColor3b ] --- - - /** - * Sets the R, G, and B components of the current secondary color. The alpha component is set to 1.0. - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3b(@NativeType("GLbyte") byte red, @NativeType("GLbyte") byte green, @NativeType("GLbyte") byte blue); - - // --- [ glSecondaryColor3s ] --- - - /** - * Short version of {@link #glSecondaryColor3b SecondaryColor3b} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3s(@NativeType("GLshort") short red, @NativeType("GLshort") short green, @NativeType("GLshort") short blue); - - // --- [ glSecondaryColor3i ] --- - - /** - * Integer version of {@link #glSecondaryColor3b SecondaryColor3b} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3i(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue); - - // --- [ glSecondaryColor3f ] --- - - /** - * Float version of {@link #glSecondaryColor3b SecondaryColor3b} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue); - - // --- [ glSecondaryColor3d ] --- - - /** - * Double version of {@link #glSecondaryColor3b SecondaryColor3b} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3d(@NativeType("GLdouble") double red, @NativeType("GLdouble") double green, @NativeType("GLdouble") double blue); - - // --- [ glSecondaryColor3ub ] --- - - /** - * Unsigned version of {@link #glSecondaryColor3b SecondaryColor3b} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3ub(@NativeType("GLubyte") byte red, @NativeType("GLubyte") byte green, @NativeType("GLubyte") byte blue); - - // --- [ glSecondaryColor3us ] --- - - /** - * Unsigned short version of {@link #glSecondaryColor3b SecondaryColor3b} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3us(@NativeType("GLushort") short red, @NativeType("GLushort") short green, @NativeType("GLushort") short blue); - - // --- [ glSecondaryColor3ui ] --- - - /** - * Unsigned int version of {@link #glSecondaryColor3b SecondaryColor3b} - * - * @param red the red component of the current secondary color - * @param green the green component of the current secondary color - * @param blue the blue component of the current secondary color - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColor3ui(@NativeType("GLint") int red, @NativeType("GLint") int green, @NativeType("GLint") int blue); - - // --- [ glSecondaryColor3bv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3bv SecondaryColor3bv} */ - public static native void nglSecondaryColor3bv(long v); - - /** - * Byte pointer version of {@link #glSecondaryColor3b SecondaryColor3b}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3bv(@NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3bv(memAddress(v)); - } - - // --- [ glSecondaryColor3sv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3sv SecondaryColor3sv} */ - public static native void nglSecondaryColor3sv(long v); - - /** - * Pointer version of {@link #glSecondaryColor3s SecondaryColor3s}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3sv(@NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3sv(memAddress(v)); - } - - // --- [ glSecondaryColor3iv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3iv SecondaryColor3iv} */ - public static native void nglSecondaryColor3iv(long v); - - /** - * Pointer version of {@link #glSecondaryColor3i SecondaryColor3i}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3iv(@NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3iv(memAddress(v)); - } - - // --- [ glSecondaryColor3fv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3fv SecondaryColor3fv} */ - public static native void nglSecondaryColor3fv(long v); - - /** - * Pointer version of {@link #glSecondaryColor3f SecondaryColor3f}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3fv(@NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3fv(memAddress(v)); - } - - // --- [ glSecondaryColor3dv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3dv SecondaryColor3dv} */ - public static native void nglSecondaryColor3dv(long v); - - /** - * Pointer version of {@link #glSecondaryColor3d SecondaryColor3d}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3dv(@NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3dv(memAddress(v)); - } - - // --- [ glSecondaryColor3ubv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3ubv SecondaryColor3ubv} */ - public static native void nglSecondaryColor3ubv(long v); - - /** - * Pointer version of {@link #glSecondaryColor3ub SecondaryColor3ub}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3ubv(@NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3ubv(memAddress(v)); - } - - // --- [ glSecondaryColor3usv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3usv SecondaryColor3usv} */ - public static native void nglSecondaryColor3usv(long v); - - /** - * Pointer version of {@link #glSecondaryColor3us SecondaryColor3us}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3usv(@NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3usv(memAddress(v)); - } - - // --- [ glSecondaryColor3uiv ] --- - - /** Unsafe version of: {@link #glSecondaryColor3uiv SecondaryColor3uiv} */ - public static native void nglSecondaryColor3uiv(long v); - - /** - * Pointer version of {@link #glSecondaryColor3ui SecondaryColor3ui}. - * - * @param v the secondary color buffer - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3uiv(@NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3uiv(memAddress(v)); - } - - // --- [ glSecondaryColorPointer ] --- - - /** Unsafe version of: {@link #glSecondaryColorPointer SecondaryColorPointer} */ - public static native void nglSecondaryColorPointer(int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglSecondaryColorPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglSecondaryColorPointer(size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglSecondaryColorPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglSecondaryColorPointer(size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a secondary color array. - * - * @param size the number of values per vertex that are stored in the array, as well as their component ordering. Must be:
    3
    - * @param type the data type of the values stored in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}
    {@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}
    - * @param stride the vertex stride in bytes. If specified as zero, then array elements are stored sequentially - * @param pointer the secondary color array data - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColorPointer(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglSecondaryColorPointer(size, type, stride, memAddress(pointer)); - } - - // --- [ glBlendFuncSeparate ] --- - - /** - * Specifies pixel arithmetic for RGB and alpha components separately. - * - * @param sfactorRGB how the red, green, and blue blending factors are computed. The initial value is GL_ONE. - * @param dfactorRGB how the red, green, and blue destination blending factors are computed. The initial value is GL_ZERO. - * @param sfactorAlpha how the alpha source blending factor is computed. The initial value is GL_ONE. - * @param dfactorAlpha how the alpha destination blending factor is computed. The initial value is GL_ZERO. - * - * @see Reference Page - */ - public static void glBlendFuncSeparate(@NativeType("GLenum") int sfactorRGB, @NativeType("GLenum") int dfactorRGB, @NativeType("GLenum") int sfactorAlpha, @NativeType("GLenum") int dfactorAlpha) { - GL14C.glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); - } - - // --- [ glWindowPos2i ] --- - - /** - * Alternate way to set the current raster position. {@code z} is implictly set to 0. - * - * @param x the x value - * @param y the y value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos2i(@NativeType("GLint") int x, @NativeType("GLint") int y); - - // --- [ glWindowPos2s ] --- - - /** - * Short version of {@link #glWindowPos2i WindowPos2i}. - * - * @param x the x value - * @param y the y value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos2s(@NativeType("GLshort") short x, @NativeType("GLshort") short y); - - // --- [ glWindowPos2f ] --- - - /** - * Float version of {@link #glWindowPos2i WindowPos2i}. - * - * @param x the x value - * @param y the y value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos2f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y); - - // --- [ glWindowPos2d ] --- - - /** - * Double version of {@link #glWindowPos2i WindowPos2i}. - * - * @param x the x value - * @param y the y value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos2d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glWindowPos2iv ] --- - - /** Unsafe version of: {@link #glWindowPos2iv WindowPos2iv} */ - public static native void nglWindowPos2iv(long p); - - /** - * Pointer version of {@link #glWindowPos2i WindowPos2i}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2iv(@NativeType("GLint const *") IntBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2iv(memAddress(p)); - } - - // --- [ glWindowPos2sv ] --- - - /** Unsafe version of: {@link #glWindowPos2sv WindowPos2sv} */ - public static native void nglWindowPos2sv(long p); - - /** - * Pointer version of {@link #glWindowPos2s WindowPos2s}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2sv(@NativeType("GLshort const *") ShortBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2sv(memAddress(p)); - } - - // --- [ glWindowPos2fv ] --- - - /** Unsafe version of: {@link #glWindowPos2fv WindowPos2fv} */ - public static native void nglWindowPos2fv(long p); - - /** - * Pointer version of {@link #glWindowPos2f WindowPos2f}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2fv(@NativeType("GLfloat const *") FloatBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2fv(memAddress(p)); - } - - // --- [ glWindowPos2dv ] --- - - /** Unsafe version of: {@link #glWindowPos2dv WindowPos2dv} */ - public static native void nglWindowPos2dv(long p); - - /** - * Pointer version of {@link #glWindowPos2d WindowPos2d}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2dv(@NativeType("GLdouble const *") DoubleBuffer p) { - if (CHECKS) { - check(p, 2); - } - nglWindowPos2dv(memAddress(p)); - } - - // --- [ glWindowPos3i ] --- - - /** - * Alternate way to set the current raster position. - * - * @param x the x value - * @param y the y value - * @param z the z value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos3i(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glWindowPos3s ] --- - - /** - * Short version of {@link #glWindowPos3i WindowPos3i}. - * - * @param x the x value - * @param y the y value - * @param z the z value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos3s(@NativeType("GLshort") short x, @NativeType("GLshort") short y, @NativeType("GLshort") short z); - - // --- [ glWindowPos3f ] --- - - /** - * Float version of {@link #glWindowPos3i WindowPos3i}. - * - * @param x the x value - * @param y the y value - * @param z the z value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos3f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glWindowPos3d ] --- - - /** - * Double version of {@link #glWindowPos3i WindowPos3i}. - * - * @param x the x value - * @param y the y value - * @param z the z value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glWindowPos3d(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glWindowPos3iv ] --- - - /** Unsafe version of: {@link #glWindowPos3iv WindowPos3iv} */ - public static native void nglWindowPos3iv(long p); - - /** - * Pointer version of {@link #glWindowPos3i WindowPos3i}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3iv(@NativeType("GLint const *") IntBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3iv(memAddress(p)); - } - - // --- [ glWindowPos3sv ] --- - - /** Unsafe version of: {@link #glWindowPos3sv WindowPos3sv} */ - public static native void nglWindowPos3sv(long p); - - /** - * Pointer version of {@link #glWindowPos3s WindowPos3s}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3sv(@NativeType("GLshort const *") ShortBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3sv(memAddress(p)); - } - - // --- [ glWindowPos3fv ] --- - - /** Unsafe version of: {@link #glWindowPos3fv WindowPos3fv} */ - public static native void nglWindowPos3fv(long p); - - /** - * Pointer version of {@link #glWindowPos3f WindowPos3f}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3fv(@NativeType("GLfloat const *") FloatBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3fv(memAddress(p)); - } - - // --- [ glWindowPos3dv ] --- - - /** Unsafe version of: {@link #glWindowPos3dv WindowPos3dv} */ - public static native void nglWindowPos3dv(long p); - - /** - * Pointer version of {@link #glWindowPos3d WindowPos3d}. - * - * @param p the position value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3dv(@NativeType("GLdouble const *") DoubleBuffer p) { - if (CHECKS) { - check(p, 3); - } - nglWindowPos3dv(memAddress(p)); - } - - /** - * Array version of: {@link #glFogCoordfv FogCoordfv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoordfv(@NativeType("GLfloat const *") float[] coord) { - long __functionAddress = GL.getICD().glFogCoordfv; - if (CHECKS) { - check(__functionAddress); - check(coord, 1); - } - callPV(coord, __functionAddress); - } - - /** - * Array version of: {@link #glFogCoorddv FogCoorddv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glFogCoorddv(@NativeType("GLdouble const *") double[] coord) { - long __functionAddress = GL.getICD().glFogCoorddv; - if (CHECKS) { - check(__functionAddress); - check(coord, 1); - } - callPV(coord, __functionAddress); - } - - /** - * Array version of: {@link #glMultiDrawArrays MultiDrawArrays} - * - * @see Reference Page - */ - public static void glMultiDrawArrays(@NativeType("GLenum") int mode, @NativeType("GLint const *") int[] first, @NativeType("GLsizei const *") int[] count) { - GL14C.glMultiDrawArrays(mode, first, count); - } - - /** - * Array version of: {@link #glMultiDrawElements MultiDrawElements} - * - * @see Reference Page - */ - public static void glMultiDrawElements(@NativeType("GLenum") int mode, @NativeType("GLsizei *") int[] count, @NativeType("GLenum") int type, @NativeType("void const **") PointerBuffer indices) { - GL14C.glMultiDrawElements(mode, count, type, indices); - } - - /** - * Array version of: {@link #glPointParameterfv PointParameterfv} - * - * @see Reference Page - */ - public static void glPointParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - GL14C.glPointParameterfv(pname, params); - } - - /** - * Array version of: {@link #glPointParameteriv PointParameteriv} - * - * @see Reference Page - */ - public static void glPointParameteriv(@NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL14C.glPointParameteriv(pname, params); - } - - /** - * Array version of: {@link #glSecondaryColor3sv SecondaryColor3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3sv(@NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3sv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glSecondaryColor3iv SecondaryColor3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3iv(@NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3iv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glSecondaryColor3fv SecondaryColor3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3fv(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3fv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glSecondaryColor3dv SecondaryColor3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3dv(@NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3dv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glSecondaryColor3usv SecondaryColor3usv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3usv(@NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3usv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glSecondaryColor3uiv SecondaryColor3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColor3uiv(@NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos2iv WindowPos2iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2iv(@NativeType("GLint const *") int[] p) { - long __functionAddress = GL.getICD().glWindowPos2iv; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos2sv WindowPos2sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2sv(@NativeType("GLshort const *") short[] p) { - long __functionAddress = GL.getICD().glWindowPos2sv; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos2fv WindowPos2fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2fv(@NativeType("GLfloat const *") float[] p) { - long __functionAddress = GL.getICD().glWindowPos2fv; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos2dv WindowPos2dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos2dv(@NativeType("GLdouble const *") double[] p) { - long __functionAddress = GL.getICD().glWindowPos2dv; - if (CHECKS) { - check(__functionAddress); - check(p, 2); - } - callPV(p, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos3iv WindowPos3iv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3iv(@NativeType("GLint const *") int[] p) { - long __functionAddress = GL.getICD().glWindowPos3iv; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos3sv WindowPos3sv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3sv(@NativeType("GLshort const *") short[] p) { - long __functionAddress = GL.getICD().glWindowPos3sv; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos3fv WindowPos3fv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3fv(@NativeType("GLfloat const *") float[] p) { - long __functionAddress = GL.getICD().glWindowPos3fv; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - - /** - * Array version of: {@link #glWindowPos3dv WindowPos3dv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glWindowPos3dv(@NativeType("GLdouble const *") double[] p) { - long __functionAddress = GL.getICD().glWindowPos3dv; - if (CHECKS) { - check(__functionAddress); - check(p, 3); - } - callPV(p, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL14C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL14C.java deleted file mode 100644 index 2650eba6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL14C.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 1.4. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL14C extends GL13C { - - static { GL.initialize(); } - - /** Accepted by the {@code sfactor} and {@code dfactor} parameters of BlendFunc. */ - public static final int - GL_CONSTANT_COLOR = 0x8001, - GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, - GL_CONSTANT_ALPHA = 0x8003, - GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; - - /** Accepted by the {@code mode} parameter of BlendEquation. */ - public static final int - GL_FUNC_ADD = 0x8006, - GL_MIN = 0x8007, - GL_MAX = 0x8008; - - /** Accepted by the {@code mode} parameter of BlendEquation. */ - public static final int - GL_FUNC_SUBTRACT = 0x800A, - GL_FUNC_REVERSE_SUBTRACT = 0x800B; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, CopyTexImage1D and CopyTexImage2D. */ - public static final int - GL_DEPTH_COMPONENT16 = 0x81A5, - GL_DEPTH_COMPONENT24 = 0x81A6, - GL_DEPTH_COMPONENT32 = 0x81A7; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int GL_TEXTURE_DEPTH_SIZE = 0x884A; - - /** Accepted by the {@code pname} parameter of TexParameterf, TexParameteri, TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int - GL_TEXTURE_COMPARE_MODE = 0x884C, - GL_TEXTURE_COMPARE_FUNC = 0x884D; - - /** Accepted by the {@code pname} parameter of PointParameterfARB, and the {@code pname} of Get. */ - public static final int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_BLEND_DST_RGB = 0x80C8, - GL_BLEND_SRC_RGB = 0x80C9, - GL_BLEND_DST_ALPHA = 0x80CA, - GL_BLEND_SRC_ALPHA = 0x80CB; - - /** Accepted by the {@code sfail}, {@code dpfail}, and {@code dppass} parameter of StencilOp. */ - public static final int - GL_INCR_WRAP = 0x8507, - GL_DECR_WRAP = 0x8508; - - /** - * When the {@code target} parameter of GetTexEnvfv, GetTexEnviv, TexEnvi, TexEnvf, TexEnviv, and TexEnvfv is TEXTURE_FILTER_CONTROL, then the value of - * {@code pname} may be. - */ - public static final int GL_TEXTURE_LOD_BIAS = 0x8501; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; - - /** - * Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv, - * when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R. - */ - public static final int GL_MIRRORED_REPEAT = 0x8370; - - protected GL14C() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendColor ] --- - - /** - * Specifies the constant color Cc to be used in blending. - * - * @param red the red color component - * @param green the green color component - * @param blue the blue color component - * @param alpha the alpha color component - * - * @see Reference Page - */ - public static native void glBlendColor(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green, @NativeType("GLfloat") float blue, @NativeType("GLfloat") float alpha); - - // --- [ glBlendEquation ] --- - - /** - * Controls the blend equations used for per-fragment blending. - * - * @param mode the blend equation. One of:
    {@link #GL_FUNC_ADD FUNC_ADD}{@link #GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link #GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link #GL_MIN MIN}{@link #GL_MAX MAX}
    - * - * @see Reference Page - */ - public static native void glBlendEquation(@NativeType("GLenum") int mode); - - // --- [ glMultiDrawArrays ] --- - - /** - * Unsafe version of: {@link #glMultiDrawArrays MultiDrawArrays} - * - * @param drawcount the size of {@code first} and {@code count} - */ - public static native void nglMultiDrawArrays(int mode, long first, long count, int drawcount); - - /** - * Renders multiple sets of primitives from array data. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param first an array of starting indices in the enabled arrays - * @param count an array of the number of indices to be rendered - * - * @see Reference Page - */ - public static void glMultiDrawArrays(@NativeType("GLenum") int mode, @NativeType("GLint const *") IntBuffer first, @NativeType("GLsizei const *") IntBuffer count) { - if (CHECKS) { - check(count, first.remaining()); - } - nglMultiDrawArrays(mode, memAddress(first), memAddress(count), first.remaining()); - } - - // --- [ glMultiDrawElements ] --- - - /** - * Unsafe version of: {@link #glMultiDrawElements MultiDrawElements} - * - * @param drawcount the size of the {@code count} array - */ - public static native void nglMultiDrawElements(int mode, long count, int type, long indices, int drawcount); - - /** - * Renders multiple sets of primitives by specifying indices of array data elements. - * - *

    LWJGL note: Use {@link org.lwjgl.system.MemoryUtil#memAddress} to retrieve pointers to the index buffers.

    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param count an array of the elements counts - * @param type the type of the values in indices. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * - * @see Reference Page - */ - public static void glMultiDrawElements(@NativeType("GLenum") int mode, @NativeType("GLsizei *") IntBuffer count, @NativeType("GLenum") int type, @NativeType("void const **") PointerBuffer indices) { - if (CHECKS) { - check(indices, count.remaining()); - } - nglMultiDrawElements(mode, memAddress(count), type, memAddress(indices), count.remaining()); - } - - // --- [ glPointParameterf ] --- - - /** - * Sets the float value of a pointer parameter. - * - * @param pname the parameter to set. Must be:
    {@link #GL_POINT_FADE_THRESHOLD_SIZE POINT_FADE_THRESHOLD_SIZE}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glPointParameterf(@NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glPointParameteri ] --- - - /** - * Integer version of {@link #glPointParameterf PointParameterf}. - * - * @param pname the parameter to set. Must be:
    {@link #GL_POINT_FADE_THRESHOLD_SIZE POINT_FADE_THRESHOLD_SIZE}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glPointParameteri(@NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glPointParameterfv ] --- - - /** Unsafe version of: {@link #glPointParameterfv PointParameterfv} */ - public static native void nglPointParameterfv(int pname, long params); - - /** - * Pointer version of {@link #glPointParameterf PointParameterf}. - * - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glPointParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 3); - } - nglPointParameterfv(pname, memAddress(params)); - } - - // --- [ glPointParameteriv ] --- - - /** Unsafe version of: {@link #glPointParameteriv PointParameteriv} */ - public static native void nglPointParameteriv(int pname, long params); - - /** - * Pointer version of {@link #glPointParameteri PointParameteri}. - * - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glPointParameteriv(@NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 3); - } - nglPointParameteriv(pname, memAddress(params)); - } - - // --- [ glBlendFuncSeparate ] --- - - /** - * Specifies pixel arithmetic for RGB and alpha components separately. - * - * @param sfactorRGB how the red, green, and blue blending factors are computed. The initial value is GL_ONE. - * @param dfactorRGB how the red, green, and blue destination blending factors are computed. The initial value is GL_ZERO. - * @param sfactorAlpha how the alpha source blending factor is computed. The initial value is GL_ONE. - * @param dfactorAlpha how the alpha destination blending factor is computed. The initial value is GL_ZERO. - * - * @see Reference Page - */ - public static native void glBlendFuncSeparate(@NativeType("GLenum") int sfactorRGB, @NativeType("GLenum") int dfactorRGB, @NativeType("GLenum") int sfactorAlpha, @NativeType("GLenum") int dfactorAlpha); - - /** - * Array version of: {@link #glMultiDrawArrays MultiDrawArrays} - * - * @see Reference Page - */ - public static void glMultiDrawArrays(@NativeType("GLenum") int mode, @NativeType("GLint const *") int[] first, @NativeType("GLsizei const *") int[] count) { - long __functionAddress = GL.getICD().glMultiDrawArrays; - if (CHECKS) { - check(__functionAddress); - check(count, first.length); - } - callPPV(mode, first, count, first.length, __functionAddress); - } - - /** - * Array version of: {@link #glMultiDrawElements MultiDrawElements} - * - * @see Reference Page - */ - public static void glMultiDrawElements(@NativeType("GLenum") int mode, @NativeType("GLsizei *") int[] count, @NativeType("GLenum") int type, @NativeType("void const **") PointerBuffer indices) { - long __functionAddress = GL.getICD().glMultiDrawElements; - if (CHECKS) { - check(__functionAddress); - check(indices, count.length); - } - callPPV(mode, count, type, memAddress(indices), count.length, __functionAddress); - } - - /** - * Array version of: {@link #glPointParameterfv PointParameterfv} - * - * @see Reference Page - */ - public static void glPointParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glPointParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 3); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glPointParameteriv PointParameteriv} - * - * @see Reference Page - */ - public static void glPointParameteriv(@NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glPointParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 3); - } - callPV(pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL15.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL15.java deleted file mode 100644 index 9c1af589..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL15.java +++ /dev/null @@ -1,1216 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 1.5. Includes the deprecated symbols of the Compatibility Profile. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL15 extends GL14 { - - static { GL.initialize(); } - - /** New token names. */ - public static final int - GL_FOG_COORD_SRC = 0x8450, - GL_FOG_COORD = 0x8451, - GL_CURRENT_FOG_COORD = 0x8453, - GL_FOG_COORD_ARRAY_TYPE = 0x8454, - GL_FOG_COORD_ARRAY_STRIDE = 0x8455, - GL_FOG_COORD_ARRAY_POINTER = 0x8456, - GL_FOG_COORD_ARRAY = 0x8457, - GL_FOG_COORD_ARRAY_BUFFER_BINDING = 0x889D, - GL_SRC0_RGB = 0x8580, - GL_SRC1_RGB = 0x8581, - GL_SRC2_RGB = 0x8582, - GL_SRC0_ALPHA = 0x8588, - GL_SRC1_ALPHA = 0x8589, - GL_SRC2_ALPHA = 0x858A; - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, - * GetBufferParameteriv, and GetBufferPointerv. - */ - public static final int - GL_ARRAY_BUFFER = 0x8892, - GL_ELEMENT_ARRAY_BUFFER = 0x8893; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_ARRAY_BUFFER_BINDING = 0x8894, - GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895, - GL_VERTEX_ARRAY_BUFFER_BINDING = 0x8896, - GL_NORMAL_ARRAY_BUFFER_BINDING = 0x8897, - GL_COLOR_ARRAY_BUFFER_BINDING = 0x8898, - GL_INDEX_ARRAY_BUFFER_BINDING = 0x8899, - GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A, - GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = 0x889B, - GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C, - GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D, - GL_WEIGHT_ARRAY_BUFFER_BINDING = 0x889E; - - /** Accepted by the {@code pname} parameter of GetVertexAttribiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; - - /** Accepted by the {@code usage} parameter of BufferData. */ - public static final int - GL_STREAM_DRAW = 0x88E0, - GL_STREAM_READ = 0x88E1, - GL_STREAM_COPY = 0x88E2, - GL_STATIC_DRAW = 0x88E4, - GL_STATIC_READ = 0x88E5, - GL_STATIC_COPY = 0x88E6, - GL_DYNAMIC_DRAW = 0x88E8, - GL_DYNAMIC_READ = 0x88E9, - GL_DYNAMIC_COPY = 0x88EA; - - /** Accepted by the {@code access} parameter of MapBuffer. */ - public static final int - GL_READ_ONLY = 0x88B8, - GL_WRITE_ONLY = 0x88B9, - GL_READ_WRITE = 0x88BA; - - /** Accepted by the {@code pname} parameter of GetBufferParameteriv. */ - public static final int - GL_BUFFER_SIZE = 0x8764, - GL_BUFFER_USAGE = 0x8765, - GL_BUFFER_ACCESS = 0x88BB, - GL_BUFFER_MAPPED = 0x88BC; - - /** Accepted by the {@code pname} parameter of GetBufferPointerv. */ - public static final int GL_BUFFER_MAP_POINTER = 0x88BD; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_SAMPLES_PASSED = 0x8914; - - /** Accepted by the {@code pname} parameter of GetQueryiv. */ - public static final int - GL_QUERY_COUNTER_BITS = 0x8864, - GL_CURRENT_QUERY = 0x8865; - - /** Accepted by the {@code pname} parameter of GetQueryObjectiv and GetQueryObjectuiv. */ - public static final int - GL_QUERY_RESULT = 0x8866, - GL_QUERY_RESULT_AVAILABLE = 0x8867; - - protected GL15() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindBuffer ] --- - - /** - * Binds a named buffer object. - * - * @param target the target to which the buffer object is bound. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param buffer the name of a buffer object - * - * @see Reference Page - */ - public static void glBindBuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int buffer) { - GL15C.glBindBuffer(target, buffer); - } - - // --- [ glDeleteBuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteBuffers DeleteBuffers} - * - * @param n the number of buffer objects to be deleted - */ - public static void nglDeleteBuffers(int n, long buffers) { - GL15C.nglDeleteBuffers(n, buffers); - } - - /** - * Deletes named buffer objects. - * - * @param buffers an array of buffer objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteBuffers(@NativeType("GLuint const *") IntBuffer buffers) { - GL15C.glDeleteBuffers(buffers); - } - - /** - * Deletes named buffer objects. - * - * @see Reference Page - */ - public static void glDeleteBuffers(@NativeType("GLuint const *") int buffer) { - GL15C.glDeleteBuffers(buffer); - } - - // --- [ glGenBuffers ] --- - - /** - * Unsafe version of: {@link #glGenBuffers GenBuffers} - * - * @param n the number of buffer object names to be generated - */ - public static void nglGenBuffers(int n, long buffers) { - GL15C.nglGenBuffers(n, buffers); - } - - /** - * Generates buffer object names. - * - * @param buffers a buffer in which the generated buffer object names are stored - * - * @see Reference Page - */ - public static void glGenBuffers(@NativeType("GLuint *") IntBuffer buffers) { - GL15C.glGenBuffers(buffers); - } - - /** - * Generates buffer object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenBuffers() { - return GL15C.glGenBuffers(); - } - - // --- [ glIsBuffer ] --- - - /** - * Determines if a name corresponds to a buffer object. - * - * @param buffer a value that may be the name of a buffer object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsBuffer(@NativeType("GLuint") int buffer) { - return GL15C.glIsBuffer(buffer); - } - - // --- [ glBufferData ] --- - - /** - * Unsafe version of: {@link #glBufferData BufferData} - * - * @param size the size in bytes of the buffer object's new data store - */ - public static void nglBufferData(int target, long size, long data, int usage) { - GL15C.nglBufferData(target, size, data, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param size the size in bytes of the buffer object's new data store - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15C#GL_STREAM_DRAW STREAM_DRAW}{@link GL15C#GL_STREAM_READ STREAM_READ}{@link GL15C#GL_STREAM_COPY STREAM_COPY}{@link GL15C#GL_STATIC_DRAW STATIC_DRAW}{@link GL15C#GL_STATIC_READ STATIC_READ}{@link GL15C#GL_STATIC_COPY STATIC_COPY}{@link GL15C#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15C#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15C#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, size, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15C#GL_STREAM_DRAW STREAM_DRAW}{@link GL15C#GL_STREAM_READ STREAM_READ}{@link GL15C#GL_STREAM_COPY STREAM_COPY}{@link GL15C#GL_STATIC_DRAW STATIC_DRAW}{@link GL15C#GL_STATIC_READ STATIC_READ}{@link GL15C#GL_STATIC_COPY STATIC_COPY}{@link GL15C#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15C#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15C#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") ByteBuffer data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15C#GL_STREAM_DRAW STREAM_DRAW}{@link GL15C#GL_STREAM_READ STREAM_READ}{@link GL15C#GL_STREAM_COPY STREAM_COPY}{@link GL15C#GL_STATIC_DRAW STATIC_DRAW}{@link GL15C#GL_STATIC_READ STATIC_READ}{@link GL15C#GL_STATIC_COPY STATIC_COPY}{@link GL15C#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15C#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15C#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") ShortBuffer data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15C#GL_STREAM_DRAW STREAM_DRAW}{@link GL15C#GL_STREAM_READ STREAM_READ}{@link GL15C#GL_STREAM_COPY STREAM_COPY}{@link GL15C#GL_STATIC_DRAW STATIC_DRAW}{@link GL15C#GL_STATIC_READ STATIC_READ}{@link GL15C#GL_STATIC_COPY STATIC_COPY}{@link GL15C#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15C#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15C#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") IntBuffer data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15C#GL_STREAM_DRAW STREAM_DRAW}{@link GL15C#GL_STREAM_READ STREAM_READ}{@link GL15C#GL_STREAM_COPY STREAM_COPY}{@link GL15C#GL_STATIC_DRAW STATIC_DRAW}{@link GL15C#GL_STATIC_READ STATIC_READ}{@link GL15C#GL_STATIC_COPY STATIC_COPY}{@link GL15C#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15C#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15C#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") LongBuffer data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15C#GL_STREAM_DRAW STREAM_DRAW}{@link GL15C#GL_STREAM_READ STREAM_READ}{@link GL15C#GL_STREAM_COPY STREAM_COPY}{@link GL15C#GL_STATIC_DRAW STATIC_DRAW}{@link GL15C#GL_STATIC_READ STATIC_READ}{@link GL15C#GL_STATIC_COPY STATIC_COPY}{@link GL15C#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15C#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15C#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") FloatBuffer data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15C#GL_STREAM_DRAW STREAM_DRAW}{@link GL15C#GL_STREAM_READ STREAM_READ}{@link GL15C#GL_STREAM_COPY STREAM_COPY}{@link GL15C#GL_STATIC_DRAW STATIC_DRAW}{@link GL15C#GL_STATIC_READ STATIC_READ}{@link GL15C#GL_STATIC_COPY STATIC_COPY}{@link GL15C#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15C#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15C#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") DoubleBuffer data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - // --- [ glBufferSubData ] --- - - /** - * Unsafe version of: {@link #glBufferSubData BufferSubData} - * - * @param size the size in bytes of the data store region being replaced - */ - public static void nglBufferSubData(int target, long offset, long size, long data) { - GL15C.nglBufferSubData(target, offset, size, data); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") ByteBuffer data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") ShortBuffer data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") IntBuffer data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") LongBuffer data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") FloatBuffer data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") DoubleBuffer data) { - GL15C.glBufferSubData(target, offset, data); - } - - // --- [ glGetBufferSubData ] --- - - /** - * Unsafe version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @param size the size in bytes of the data store region being returned - */ - public static void nglGetBufferSubData(int target, long offset, long size, long data) { - GL15C.nglGetBufferSubData(target, offset, size, data); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") ByteBuffer data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") ShortBuffer data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") IntBuffer data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") LongBuffer data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") FloatBuffer data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") DoubleBuffer data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - // --- [ glMapBuffer ] --- - - /** Unsafe version of: {@link #glMapBuffer MapBuffer} */ - public static long nglMapBuffer(int target, int access) { - return GL15C.nglMapBuffer(target, access); - } - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBuffer(int, int)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBuffer(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBuffer(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15C#GL_READ_ONLY READ_ONLY}{@link GL15C#GL_WRITE_ONLY WRITE_ONLY}{@link GL15C#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int access) { - return GL15C.glMapBuffer(target, access); - } - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBuffer(int, int)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBuffer(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBuffer(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15C#GL_READ_ONLY READ_ONLY}{@link GL15C#GL_WRITE_ONLY WRITE_ONLY}{@link GL15C#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int access, @Nullable ByteBuffer old_buffer) { - return GL15C.glMapBuffer(target, access, old_buffer); - } - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBuffer(int, int)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBuffer(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBuffer(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15C#GL_READ_ONLY READ_ONLY}{@link GL15C#GL_WRITE_ONLY WRITE_ONLY}{@link GL15C#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int access, long length, @Nullable ByteBuffer old_buffer) { - return GL15C.glMapBuffer(target, access, length, old_buffer); - } - - // --- [ glUnmapBuffer ] --- - - /** - * Relinquishes the mapping of a buffer object and invalidates the pointer to its data store. - * - *

    Returns TRUE unless data values in the buffer’s data store have become corrupted during the period that the buffer was mapped. Such corruption can be - * the result of a screen resolution change or other window system-dependent event that causes system heaps such as those for high-performance graphics - * memory to be discarded. GL implementations must guarantee that such corruption can occur only during the periods that a buffer’s data store is mapped. - * If such corruption has occurred, UnmapBuffer returns FALSE, and the contents of the buffer’s data store become undefined.

    - * - * @param target the target buffer object being unmapped. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glUnmapBuffer(@NativeType("GLenum") int target) { - return GL15C.glUnmapBuffer(target); - } - - // --- [ glGetBufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetBufferParameteriv GetBufferParameteriv} */ - public static void nglGetBufferParameteriv(int target, int pname, long params) { - GL15C.nglGetBufferParameteriv(target, pname, params); - } - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15C#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15C#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15C#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetBufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL15C.glGetBufferParameteriv(target, pname, params); - } - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15C#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15C#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15C#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetBufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL15C.glGetBufferParameteri(target, pname); - } - - // --- [ glGetBufferPointerv ] --- - - /** Unsafe version of: {@link #glGetBufferPointerv GetBufferPointerv} */ - public static void nglGetBufferPointerv(int target, int pname, long params) { - GL15C.nglGetBufferPointerv(target, pname, params); - } - - /** - * Returns the pointer to a mapped buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the pointer to be returned. Must be:
    {@link GL15C#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * @param params the pointer value specified by {@code pname} - * - * @see Reference Page - */ - public static void glGetBufferPointerv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - GL15C.glGetBufferPointerv(target, pname, params); - } - - /** - * Returns the pointer to a mapped buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link GL15C#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15C#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the pointer to be returned. Must be:
    {@link GL15C#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetBufferPointer(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL15C.glGetBufferPointer(target, pname); - } - - // --- [ glGenQueries ] --- - - /** - * Unsafe version of: {@link #glGenQueries GenQueries} - * - * @param n the number of query object names to be generated - */ - public static void nglGenQueries(int n, long ids) { - GL15C.nglGenQueries(n, ids); - } - - /** - * Generates query object names. - * - * @param ids a buffer in which the generated query object names are stored - * - * @see Reference Page - */ - public static void glGenQueries(@NativeType("GLuint *") IntBuffer ids) { - GL15C.glGenQueries(ids); - } - - /** - * Generates query object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenQueries() { - return GL15C.glGenQueries(); - } - - // --- [ glDeleteQueries ] --- - - /** - * Unsafe version of: {@link #glDeleteQueries DeleteQueries} - * - * @param n the number of query objects to be deleted - */ - public static void nglDeleteQueries(int n, long ids) { - GL15C.nglDeleteQueries(n, ids); - } - - /** - * Deletes named query objects. - * - * @param ids an array of query objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteQueries(@NativeType("GLuint const *") IntBuffer ids) { - GL15C.glDeleteQueries(ids); - } - - /** - * Deletes named query objects. - * - * @see Reference Page - */ - public static void glDeleteQueries(@NativeType("GLuint const *") int id) { - GL15C.glDeleteQueries(id); - } - - // --- [ glIsQuery ] --- - - /** - * Determine if a name corresponds to a query object. - * - * @param id a value that may be the name of a query object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsQuery(@NativeType("GLuint") int id) { - return GL15C.glIsQuery(id); - } - - // --- [ glBeginQuery ] --- - - /** - * Creates a query object and makes it active. - * - * @param target the target type of query object established. One of:
    {@link GL15C#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param id the name of a query object - * - * @see Reference Page - */ - public static void glBeginQuery(@NativeType("GLenum") int target, @NativeType("GLuint") int id) { - GL15C.glBeginQuery(target, id); - } - - // --- [ glEndQuery ] --- - - /** - * Marks the end of the sequence of commands to be tracked for the active query specified by {@code target}. - * - * @param target the query object target. One of:
    {@link GL15C#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * - * @see Reference Page - */ - public static void glEndQuery(@NativeType("GLenum") int target) { - GL15C.glEndQuery(target); - } - - // --- [ glGetQueryiv ] --- - - /** Unsafe version of: {@link #glGetQueryiv GetQueryiv} */ - public static void nglGetQueryiv(int target, int pname, long params) { - GL15C.nglGetQueryiv(target, pname, params); - } - - /** - * Returns parameters of a query object target. - * - * @param target the query object target. One of:
    {@link GL15C#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param pname the symbolic name of a query object target parameter. One of:
    {@link GL15C#GL_QUERY_COUNTER_BITS QUERY_COUNTER_BITS}{@link GL15C#GL_CURRENT_QUERY CURRENT_QUERY}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL15C.glGetQueryiv(target, pname, params); - } - - /** - * Returns parameters of a query object target. - * - * @param target the query object target. One of:
    {@link GL15C#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param pname the symbolic name of a query object target parameter. One of:
    {@link GL15C#GL_QUERY_COUNTER_BITS QUERY_COUNTER_BITS}{@link GL15C#GL_CURRENT_QUERY CURRENT_QUERY}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryi(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL15C.glGetQueryi(target, pname); - } - - // --- [ glGetQueryObjectiv ] --- - - /** Unsafe version of: {@link #glGetQueryObjectiv GetQueryObjectiv} */ - public static void nglGetQueryObjectiv(int id, int pname, long params) { - GL15C.nglGetQueryObjectiv(id, pname, params); - } - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15C#GL_QUERY_RESULT QUERY_RESULT}{@link GL15C#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL15C.glGetQueryObjectiv(id, pname, params); - } - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15C#GL_QUERY_RESULT QUERY_RESULT}{@link GL15C#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") long params) { - GL15C.glGetQueryObjectiv(id, pname, params); - } - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15C#GL_QUERY_RESULT QUERY_RESULT}{@link GL15C#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryObjecti(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - return GL15C.glGetQueryObjecti(id, pname); - } - - // --- [ glGetQueryObjectuiv ] --- - - /** Unsafe version of: {@link #glGetQueryObjectuiv GetQueryObjectuiv} */ - public static void nglGetQueryObjectuiv(int id, int pname, long params) { - GL15C.nglGetQueryObjectuiv(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjectiv GetQueryObjectiv}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15C#GL_QUERY_RESULT QUERY_RESULT}{@link GL15C#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectuiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - GL15C.glGetQueryObjectuiv(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjectiv GetQueryObjectiv}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15C#GL_QUERY_RESULT QUERY_RESULT}{@link GL15C#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectuiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") long params) { - GL15C.glGetQueryObjectuiv(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjectiv GetQueryObjectiv}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15C#GL_QUERY_RESULT QUERY_RESULT}{@link GL15C#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryObjectui(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - return GL15C.glGetQueryObjectui(id, pname); - } - - /** - * Array version of: {@link #glDeleteBuffers DeleteBuffers} - * - * @see Reference Page - */ - public static void glDeleteBuffers(@NativeType("GLuint const *") int[] buffers) { - GL15C.glDeleteBuffers(buffers); - } - - /** - * Array version of: {@link #glGenBuffers GenBuffers} - * - * @see Reference Page - */ - public static void glGenBuffers(@NativeType("GLuint *") int[] buffers) { - GL15C.glGenBuffers(buffers); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") short[] data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") int[] data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") long[] data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") float[] data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") double[] data, @NativeType("GLenum") int usage) { - GL15C.glBufferData(target, data, usage); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") short[] data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") int[] data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") long[] data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") float[] data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") double[] data) { - GL15C.glBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") short[] data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") int[] data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") long[] data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") float[] data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") double[] data) { - GL15C.glGetBufferSubData(target, offset, data); - } - - /** - * Array version of: {@link #glGetBufferParameteriv GetBufferParameteriv} - * - * @see Reference Page - */ - public static void glGetBufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL15C.glGetBufferParameteriv(target, pname, params); - } - - /** - * Array version of: {@link #glGenQueries GenQueries} - * - * @see Reference Page - */ - public static void glGenQueries(@NativeType("GLuint *") int[] ids) { - GL15C.glGenQueries(ids); - } - - /** - * Array version of: {@link #glDeleteQueries DeleteQueries} - * - * @see Reference Page - */ - public static void glDeleteQueries(@NativeType("GLuint const *") int[] ids) { - GL15C.glDeleteQueries(ids); - } - - /** - * Array version of: {@link #glGetQueryiv GetQueryiv} - * - * @see Reference Page - */ - public static void glGetQueryiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL15C.glGetQueryiv(target, pname, params); - } - - /** - * Array version of: {@link #glGetQueryObjectiv GetQueryObjectiv} - * - * @see Reference Page - */ - public static void glGetQueryObjectiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL15C.glGetQueryObjectiv(id, pname, params); - } - - /** - * Array version of: {@link #glGetQueryObjectuiv GetQueryObjectuiv} - * - * @see Reference Page - */ - public static void glGetQueryObjectuiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - GL15C.glGetQueryObjectuiv(id, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL15C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL15C.java deleted file mode 100644 index 38ff1096..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL15C.java +++ /dev/null @@ -1,1337 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 1.5. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL15C extends GL14C { - - static { GL.initialize(); } - - /** New token names. */ - public static final int GL_SRC1_ALPHA = 0x8589; - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, - * GetBufferParameteriv, and GetBufferPointerv. - */ - public static final int - GL_ARRAY_BUFFER = 0x8892, - GL_ELEMENT_ARRAY_BUFFER = 0x8893; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_ARRAY_BUFFER_BINDING = 0x8894, - GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; - - /** Accepted by the {@code pname} parameter of GetVertexAttribiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; - - /** Accepted by the {@code usage} parameter of BufferData. */ - public static final int - GL_STREAM_DRAW = 0x88E0, - GL_STREAM_READ = 0x88E1, - GL_STREAM_COPY = 0x88E2, - GL_STATIC_DRAW = 0x88E4, - GL_STATIC_READ = 0x88E5, - GL_STATIC_COPY = 0x88E6, - GL_DYNAMIC_DRAW = 0x88E8, - GL_DYNAMIC_READ = 0x88E9, - GL_DYNAMIC_COPY = 0x88EA; - - /** Accepted by the {@code access} parameter of MapBuffer. */ - public static final int - GL_READ_ONLY = 0x88B8, - GL_WRITE_ONLY = 0x88B9, - GL_READ_WRITE = 0x88BA; - - /** Accepted by the {@code pname} parameter of GetBufferParameteriv. */ - public static final int - GL_BUFFER_SIZE = 0x8764, - GL_BUFFER_USAGE = 0x8765, - GL_BUFFER_ACCESS = 0x88BB, - GL_BUFFER_MAPPED = 0x88BC; - - /** Accepted by the {@code pname} parameter of GetBufferPointerv. */ - public static final int GL_BUFFER_MAP_POINTER = 0x88BD; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_SAMPLES_PASSED = 0x8914; - - /** Accepted by the {@code pname} parameter of GetQueryiv. */ - public static final int - GL_QUERY_COUNTER_BITS = 0x8864, - GL_CURRENT_QUERY = 0x8865; - - /** Accepted by the {@code pname} parameter of GetQueryObjectiv and GetQueryObjectuiv. */ - public static final int - GL_QUERY_RESULT = 0x8866, - GL_QUERY_RESULT_AVAILABLE = 0x8867; - - protected GL15C() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindBuffer ] --- - - /** - * Binds a named buffer object. - * - * @param target the target to which the buffer object is bound. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param buffer the name of a buffer object - * - * @see Reference Page - */ - public static native void glBindBuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int buffer); - - // --- [ glDeleteBuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteBuffers DeleteBuffers} - * - * @param n the number of buffer objects to be deleted - */ - public static native void nglDeleteBuffers(int n, long buffers); - - /** - * Deletes named buffer objects. - * - * @param buffers an array of buffer objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteBuffers(@NativeType("GLuint const *") IntBuffer buffers) { - nglDeleteBuffers(buffers.remaining(), memAddress(buffers)); - } - - /** - * Deletes named buffer objects. - * - * @see Reference Page - */ - public static void glDeleteBuffers(@NativeType("GLuint const *") int buffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer buffers = stack.ints(buffer); - nglDeleteBuffers(1, memAddress(buffers)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenBuffers ] --- - - /** - * Unsafe version of: {@link #glGenBuffers GenBuffers} - * - * @param n the number of buffer object names to be generated - */ - public static native void nglGenBuffers(int n, long buffers); - - /** - * Generates buffer object names. - * - * @param buffers a buffer in which the generated buffer object names are stored - * - * @see Reference Page - */ - public static void glGenBuffers(@NativeType("GLuint *") IntBuffer buffers) { - nglGenBuffers(buffers.remaining(), memAddress(buffers)); - } - - /** - * Generates buffer object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenBuffers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer buffers = stack.callocInt(1); - nglGenBuffers(1, memAddress(buffers)); - return buffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsBuffer ] --- - - /** - * Determines if a name corresponds to a buffer object. - * - * @param buffer a value that may be the name of a buffer object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsBuffer(@NativeType("GLuint") int buffer); - - // --- [ glBufferData ] --- - - /** - * Unsafe version of: {@link #glBufferData BufferData} - * - * @param size the size in bytes of the buffer object's new data store - */ - public static native void nglBufferData(int target, long size, long data, int usage); - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param size the size in bytes of the buffer object's new data store - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW STREAM_DRAW}{@link #GL_STREAM_READ STREAM_READ}{@link #GL_STREAM_COPY STREAM_COPY}{@link #GL_STATIC_DRAW STATIC_DRAW}{@link #GL_STATIC_READ STATIC_READ}{@link #GL_STATIC_COPY STATIC_COPY}{@link #GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link #GL_DYNAMIC_READ DYNAMIC_READ}{@link #GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int usage) { - nglBufferData(target, size, NULL, usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW STREAM_DRAW}{@link #GL_STREAM_READ STREAM_READ}{@link #GL_STREAM_COPY STREAM_COPY}{@link #GL_STATIC_DRAW STATIC_DRAW}{@link #GL_STATIC_READ STATIC_READ}{@link #GL_STATIC_COPY STATIC_COPY}{@link #GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link #GL_DYNAMIC_READ DYNAMIC_READ}{@link #GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") ByteBuffer data, @NativeType("GLenum") int usage) { - nglBufferData(target, data.remaining(), memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW STREAM_DRAW}{@link #GL_STREAM_READ STREAM_READ}{@link #GL_STREAM_COPY STREAM_COPY}{@link #GL_STATIC_DRAW STATIC_DRAW}{@link #GL_STATIC_READ STATIC_READ}{@link #GL_STATIC_COPY STATIC_COPY}{@link #GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link #GL_DYNAMIC_READ DYNAMIC_READ}{@link #GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") ShortBuffer data, @NativeType("GLenum") int usage) { - nglBufferData(target, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW STREAM_DRAW}{@link #GL_STREAM_READ STREAM_READ}{@link #GL_STREAM_COPY STREAM_COPY}{@link #GL_STATIC_DRAW STATIC_DRAW}{@link #GL_STATIC_READ STATIC_READ}{@link #GL_STATIC_COPY STATIC_COPY}{@link #GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link #GL_DYNAMIC_READ DYNAMIC_READ}{@link #GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") IntBuffer data, @NativeType("GLenum") int usage) { - nglBufferData(target, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW STREAM_DRAW}{@link #GL_STREAM_READ STREAM_READ}{@link #GL_STREAM_COPY STREAM_COPY}{@link #GL_STATIC_DRAW STATIC_DRAW}{@link #GL_STATIC_READ STATIC_READ}{@link #GL_STATIC_COPY STATIC_COPY}{@link #GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link #GL_DYNAMIC_READ DYNAMIC_READ}{@link #GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") LongBuffer data, @NativeType("GLenum") int usage) { - nglBufferData(target, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW STREAM_DRAW}{@link #GL_STREAM_READ STREAM_READ}{@link #GL_STREAM_COPY STREAM_COPY}{@link #GL_STATIC_DRAW STATIC_DRAW}{@link #GL_STATIC_READ STATIC_READ}{@link #GL_STATIC_COPY STATIC_COPY}{@link #GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link #GL_DYNAMIC_READ DYNAMIC_READ}{@link #GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") FloatBuffer data, @NativeType("GLenum") int usage) { - nglBufferData(target, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - /** - * Creates and initializes a buffer object's data store. - * - *

    {@code usage} is a hint to the GL implementation as to how a buffer object's data store will be accessed. This enables the GL implementation to make - * more intelligent decisions that may significantly impact buffer object performance. It does not, however, constrain the actual usage of the data store. - * {@code usage} can be broken down into two parts: first, the frequency of access (modification and usage), and second, the nature of that access. The - * frequency of access may be one of these:

    - * - *
      - *
    • STREAM - The data store contents will be modified once and used at most a few times.
    • - *
    • STATIC - The data store contents will be modified once and used many times.
    • - *
    • DYNAMIC - The data store contents will be modified repeatedly and used many times.
    • - *
    - * - *

    The nature of access may be one of these:

    - * - *
      - *
    • DRAW - The data store contents are modified by the application, and used as the source for GL drawing and image specification commands.
    • - *
    • READ - The data store contents are modified by reading data from the GL, and used to return that data when queried by the application.
    • - *
    • COPY - The data store contents are modified by reading data from the GL, and used as the source for GL drawing and image specification commands.
    • - *
    - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link #GL_STREAM_DRAW STREAM_DRAW}{@link #GL_STREAM_READ STREAM_READ}{@link #GL_STREAM_COPY STREAM_COPY}{@link #GL_STATIC_DRAW STATIC_DRAW}{@link #GL_STATIC_READ STATIC_READ}{@link #GL_STATIC_COPY STATIC_COPY}{@link #GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link #GL_DYNAMIC_READ DYNAMIC_READ}{@link #GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") DoubleBuffer data, @NativeType("GLenum") int usage) { - nglBufferData(target, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), usage); - } - - // --- [ glBufferSubData ] --- - - /** - * Unsafe version of: {@link #glBufferSubData BufferSubData} - * - * @param size the size in bytes of the data store region being replaced - */ - public static native void nglBufferSubData(int target, long offset, long size, long data); - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") ByteBuffer data) { - nglBufferSubData(target, offset, data.remaining(), memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") ShortBuffer data) { - nglBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") IntBuffer data) { - nglBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") LongBuffer data) { - nglBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") FloatBuffer data) { - nglBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Updates a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") DoubleBuffer data) { - nglBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glGetBufferSubData ] --- - - /** - * Unsafe version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @param size the size in bytes of the data store region being returned - */ - public static native void nglGetBufferSubData(int target, long offset, long size, long data); - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") ByteBuffer data) { - nglGetBufferSubData(target, offset, data.remaining(), memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") ShortBuffer data) { - nglGetBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") IntBuffer data) { - nglGetBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") LongBuffer data) { - nglGetBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") FloatBuffer data) { - nglGetBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * Returns a subset of a buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") DoubleBuffer data) { - nglGetBufferSubData(target, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glMapBuffer ] --- - - /** Unsafe version of: {@link #glMapBuffer MapBuffer} */ - public static native long nglMapBuffer(int target, int access); - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBuffer(int, int)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBuffer(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBuffer(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link #GL_READ_ONLY READ_ONLY}{@link #GL_WRITE_ONLY WRITE_ONLY}{@link #GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int access) { - long __result = nglMapBuffer(target, access); - return memByteBufferSafe(__result, glGetBufferParameteri(target, GL_BUFFER_SIZE)); - } - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBuffer(int, int)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBuffer(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBuffer(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link #GL_READ_ONLY READ_ONLY}{@link #GL_WRITE_ONLY WRITE_ONLY}{@link #GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int access, @Nullable ByteBuffer old_buffer) { - long __result = nglMapBuffer(target, access); - int length = glGetBufferParameteri(target, GL_BUFFER_SIZE); - return apiGetMappedBuffer(old_buffer, __result, length); - } - - /** - * Maps a buffer object's data store. - * - *

    LWJGL note: This method comes in 3 flavors:

    - * - *
      - *
    1. {@link #glMapBuffer(int, int)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and a new ByteBuffer instance is always returned.
    2. - *
    3. {@link #glMapBuffer(int, int, ByteBuffer)} - Calls {@link #glGetBufferParameteriv GetBufferParameteriv} to retrieve the buffer size and the {@code old_buffer} parameter is reused if not null.
    4. - *
    5. {@link #glMapBuffer(int, int, long, ByteBuffer)} - The buffer size is explicitly specified and the {@code old_buffer} parameter is reused if not null. This is the most efficient method.
    6. - *
    - * - * @param target the target buffer object being mapped. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link #GL_READ_ONLY READ_ONLY}{@link #GL_WRITE_ONLY WRITE_ONLY}{@link #GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int access, long length, @Nullable ByteBuffer old_buffer) { - long __result = nglMapBuffer(target, access); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - // --- [ glUnmapBuffer ] --- - - /** - * Relinquishes the mapping of a buffer object and invalidates the pointer to its data store. - * - *

    Returns TRUE unless data values in the buffer’s data store have become corrupted during the period that the buffer was mapped. Such corruption can be - * the result of a screen resolution change or other window system-dependent event that causes system heaps such as those for high-performance graphics - * memory to be discarded. GL implementations must guarantee that such corruption can occur only during the periods that a buffer’s data store is mapped. - * If such corruption has occurred, UnmapBuffer returns FALSE, and the contents of the buffer’s data store become undefined.

    - * - * @param target the target buffer object being unmapped. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glUnmapBuffer(@NativeType("GLenum") int target); - - // --- [ glGetBufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetBufferParameteriv GetBufferParameteriv} */ - public static native void nglGetBufferParameteriv(int target, int pname, long params); - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link #GL_BUFFER_USAGE BUFFER_USAGE}{@link #GL_BUFFER_ACCESS BUFFER_ACCESS}{@link #GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetBufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetBufferParameteriv(target, pname, memAddress(params)); - } - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link #GL_BUFFER_USAGE BUFFER_USAGE}{@link #GL_BUFFER_ACCESS BUFFER_ACCESS}{@link #GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetBufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetBufferParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetBufferPointerv ] --- - - /** Unsafe version of: {@link #glGetBufferPointerv GetBufferPointerv} */ - public static native void nglGetBufferPointerv(int target, int pname, long params); - - /** - * Returns the pointer to a mapped buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the pointer to be returned. Must be:
    {@link #GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * @param params the pointer value specified by {@code pname} - * - * @see Reference Page - */ - public static void glGetBufferPointerv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetBufferPointerv(target, pname, memAddress(params)); - } - - /** - * Returns the pointer to a mapped buffer object's data store. - * - * @param target the target buffer object. One of:
    {@link #GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the pointer to be returned. Must be:
    {@link #GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetBufferPointer(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer params = stack.callocPointer(1); - nglGetBufferPointerv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenQueries ] --- - - /** - * Unsafe version of: {@link #glGenQueries GenQueries} - * - * @param n the number of query object names to be generated - */ - public static native void nglGenQueries(int n, long ids); - - /** - * Generates query object names. - * - * @param ids a buffer in which the generated query object names are stored - * - * @see Reference Page - */ - public static void glGenQueries(@NativeType("GLuint *") IntBuffer ids) { - nglGenQueries(ids.remaining(), memAddress(ids)); - } - - /** - * Generates query object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenQueries() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.callocInt(1); - nglGenQueries(1, memAddress(ids)); - return ids.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteQueries ] --- - - /** - * Unsafe version of: {@link #glDeleteQueries DeleteQueries} - * - * @param n the number of query objects to be deleted - */ - public static native void nglDeleteQueries(int n, long ids); - - /** - * Deletes named query objects. - * - * @param ids an array of query objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteQueries(@NativeType("GLuint const *") IntBuffer ids) { - nglDeleteQueries(ids.remaining(), memAddress(ids)); - } - - /** - * Deletes named query objects. - * - * @see Reference Page - */ - public static void glDeleteQueries(@NativeType("GLuint const *") int id) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.ints(id); - nglDeleteQueries(1, memAddress(ids)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsQuery ] --- - - /** - * Determine if a name corresponds to a query object. - * - * @param id a value that may be the name of a query object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsQuery(@NativeType("GLuint") int id); - - // --- [ glBeginQuery ] --- - - /** - * Creates a query object and makes it active. - * - * @param target the target type of query object established. One of:
    {@link #GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param id the name of a query object - * - * @see Reference Page - */ - public static native void glBeginQuery(@NativeType("GLenum") int target, @NativeType("GLuint") int id); - - // --- [ glEndQuery ] --- - - /** - * Marks the end of the sequence of commands to be tracked for the active query specified by {@code target}. - * - * @param target the query object target. One of:
    {@link #GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * - * @see Reference Page - */ - public static native void glEndQuery(@NativeType("GLenum") int target); - - // --- [ glGetQueryiv ] --- - - /** Unsafe version of: {@link #glGetQueryiv GetQueryiv} */ - public static native void nglGetQueryiv(int target, int pname, long params); - - /** - * Returns parameters of a query object target. - * - * @param target the query object target. One of:
    {@link #GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param pname the symbolic name of a query object target parameter. One of:
    {@link #GL_QUERY_COUNTER_BITS QUERY_COUNTER_BITS}{@link #GL_CURRENT_QUERY CURRENT_QUERY}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryiv(target, pname, memAddress(params)); - } - - /** - * Returns parameters of a query object target. - * - * @param target the query object target. One of:
    {@link #GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param pname the symbolic name of a query object target parameter. One of:
    {@link #GL_QUERY_COUNTER_BITS QUERY_COUNTER_BITS}{@link #GL_CURRENT_QUERY CURRENT_QUERY}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryi(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetQueryiv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetQueryObjectiv ] --- - - /** Unsafe version of: {@link #glGetQueryObjectiv GetQueryObjectiv} */ - public static native void nglGetQueryObjectiv(int id, int pname, long params); - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT QUERY_RESULT}{@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjectiv(id, pname, memAddress(params)); - } - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT QUERY_RESULT}{@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") long params) { - nglGetQueryObjectiv(id, pname, params); - } - - /** - * Returns the integer value of a query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT QUERY_RESULT}{@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryObjecti(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetQueryObjectiv(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetQueryObjectuiv ] --- - - /** Unsafe version of: {@link #glGetQueryObjectuiv GetQueryObjectuiv} */ - public static native void nglGetQueryObjectuiv(int id, int pname, long params); - - /** - * Unsigned version of {@link #glGetQueryObjectiv GetQueryObjectiv}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT QUERY_RESULT}{@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectuiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjectuiv(id, pname, memAddress(params)); - } - - /** - * Unsigned version of {@link #glGetQueryObjectiv GetQueryObjectiv}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT QUERY_RESULT}{@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectuiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") long params) { - nglGetQueryObjectuiv(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjectiv GetQueryObjectiv}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link #GL_QUERY_RESULT QUERY_RESULT}{@link #GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryObjectui(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetQueryObjectuiv(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Array version of: {@link #glDeleteBuffers DeleteBuffers} - * - * @see Reference Page - */ - public static void glDeleteBuffers(@NativeType("GLuint const *") int[] buffers) { - long __functionAddress = GL.getICD().glDeleteBuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffers.length, buffers, __functionAddress); - } - - /** - * Array version of: {@link #glGenBuffers GenBuffers} - * - * @see Reference Page - */ - public static void glGenBuffers(@NativeType("GLuint *") int[] buffers) { - long __functionAddress = GL.getICD().glGenBuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffers.length, buffers, __functionAddress); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") short[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 1, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") int[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") long[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 3, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") float[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glBufferData BufferData} - * - * @see Reference Page - */ - public static void glBufferData(@NativeType("GLenum") int target, @NativeType("void const *") double[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 3, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") long[] data) { - long __functionAddress = GL.getICD().glBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glBufferSubData BufferSubData} - * - * @see Reference Page - */ - public static void glBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void const *") double[] data) { - long __functionAddress = GL.getICD().glBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") short[] data) { - long __functionAddress = GL.getICD().glGetBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") int[] data) { - long __functionAddress = GL.getICD().glGetBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") long[] data) { - long __functionAddress = GL.getICD().glGetBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") float[] data) { - long __functionAddress = GL.getICD().glGetBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetBufferSubData GetBufferSubData} - * - * @see Reference Page - */ - public static void glGetBufferSubData(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("void *") double[] data) { - long __functionAddress = GL.getICD().glGetBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetBufferParameteriv GetBufferParameteriv} - * - * @see Reference Page - */ - public static void glGetBufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetBufferParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGenQueries GenQueries} - * - * @see Reference Page - */ - public static void glGenQueries(@NativeType("GLuint *") int[] ids) { - long __functionAddress = GL.getICD().glGenQueries; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** - * Array version of: {@link #glDeleteQueries DeleteQueries} - * - * @see Reference Page - */ - public static void glDeleteQueries(@NativeType("GLuint const *") int[] ids) { - long __functionAddress = GL.getICD().glDeleteQueries; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** - * Array version of: {@link #glGetQueryiv GetQueryiv} - * - * @see Reference Page - */ - public static void glGetQueryiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetQueryiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetQueryObjectiv GetQueryObjectiv} - * - * @see Reference Page - */ - public static void glGetQueryObjectiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetQueryObjectiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetQueryObjectuiv GetQueryObjectuiv} - * - * @see Reference Page - */ - public static void glGetQueryObjectuiv(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetQueryObjectuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL20.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL20.java deleted file mode 100644 index ce140038..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL20.java +++ /dev/null @@ -1,2810 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -/** - * The OpenGL functionality up to version 2.0. Includes the deprecated symbols of the Compatibility Profile. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL20 extends GL15 { - - static { GL.initialize(); } - - /** Accepted by the {@code name} parameter of GetString. */ - public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C; - - /** Accepted by the {@code pname} parameter of GetInteger. */ - public static final int GL_CURRENT_PROGRAM = 0x8B8D; - - /** Accepted by the {@code pname} parameter of GetShaderiv. */ - public static final int - GL_SHADER_TYPE = 0x8B4F, - GL_DELETE_STATUS = 0x8B80, - GL_COMPILE_STATUS = 0x8B81, - GL_LINK_STATUS = 0x8B82, - GL_VALIDATE_STATUS = 0x8B83, - GL_INFO_LOG_LENGTH = 0x8B84, - GL_ATTACHED_SHADERS = 0x8B85, - GL_ACTIVE_UNIFORMS = 0x8B86, - GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, - GL_ACTIVE_ATTRIBUTES = 0x8B89, - GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, - GL_SHADER_SOURCE_LENGTH = 0x8B88; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_FLOAT_VEC2 = 0x8B50, - GL_FLOAT_VEC3 = 0x8B51, - GL_FLOAT_VEC4 = 0x8B52, - GL_INT_VEC2 = 0x8B53, - GL_INT_VEC3 = 0x8B54, - GL_INT_VEC4 = 0x8B55, - GL_BOOL = 0x8B56, - GL_BOOL_VEC2 = 0x8B57, - GL_BOOL_VEC3 = 0x8B58, - GL_BOOL_VEC4 = 0x8B59, - GL_FLOAT_MAT2 = 0x8B5A, - GL_FLOAT_MAT3 = 0x8B5B, - GL_FLOAT_MAT4 = 0x8B5C, - GL_SAMPLER_1D = 0x8B5D, - GL_SAMPLER_2D = 0x8B5E, - GL_SAMPLER_3D = 0x8B5F, - GL_SAMPLER_CUBE = 0x8B60, - GL_SAMPLER_1D_SHADOW = 0x8B61, - GL_SAMPLER_2D_SHADOW = 0x8B62; - - /** Accepted by the {@code type} argument of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_VERTEX_SHADER = 0x8B31; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A, - GL_MAX_VARYING_FLOATS = 0x8B4B, - GL_MAX_VERTEX_ATTRIBS = 0x8869, - GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, - GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, - GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D, - GL_MAX_TEXTURE_COORDS = 0x8871; - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int - GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642, - GL_VERTEX_PROGRAM_TWO_SIDE = 0x8643; - - /** Accepted by the {@code pname} parameter of GetVertexAttrib{dfi}v. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622, - GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623, - GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624, - GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625, - GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A, - GL_CURRENT_VERTEX_ATTRIB = 0x8626; - - /** Accepted by the {@code pname} parameter of GetVertexAttribPointerv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; - - /** Accepted by the {@code type} argument of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_FRAGMENT_SHADER = 0x8B30; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; - - /** Accepted by the {@code target} parameter of Hint and the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_DRAW_BUFFERS = 0x8824, - GL_DRAW_BUFFER0 = 0x8825, - GL_DRAW_BUFFER1 = 0x8826, - GL_DRAW_BUFFER2 = 0x8827, - GL_DRAW_BUFFER3 = 0x8828, - GL_DRAW_BUFFER4 = 0x8829, - GL_DRAW_BUFFER5 = 0x882A, - GL_DRAW_BUFFER6 = 0x882B, - GL_DRAW_BUFFER7 = 0x882C, - GL_DRAW_BUFFER8 = 0x882D, - GL_DRAW_BUFFER9 = 0x882E, - GL_DRAW_BUFFER10 = 0x882F, - GL_DRAW_BUFFER11 = 0x8830, - GL_DRAW_BUFFER12 = 0x8831, - GL_DRAW_BUFFER13 = 0x8832, - GL_DRAW_BUFFER14 = 0x8833, - GL_DRAW_BUFFER15 = 0x8834; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of TexEnvi, TexEnviv, TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv. - */ - public static final int GL_POINT_SPRITE = 0x8861; - - /** - * When the {@code target} parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, or GetTexEnviv is POINT_SPRITE, then the value of - * {@code pname} may be. - */ - public static final int GL_COORD_REPLACE = 0x8862; - - /** Accepted by the {@code pname} parameter of PointParameter{if}v. */ - public static final int GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0; - - /** Accepted by the {@code param} parameter of PointParameter{if}v. */ - public static final int - GL_LOWER_LEFT = 0x8CA1, - GL_UPPER_LEFT = 0x8CA2; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_BLEND_EQUATION_RGB = 0x8009, - GL_BLEND_EQUATION_ALPHA = 0x883D; - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int - GL_STENCIL_BACK_FUNC = 0x8800, - GL_STENCIL_BACK_FAIL = 0x8801, - GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802, - GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803, - GL_STENCIL_BACK_REF = 0x8CA3, - GL_STENCIL_BACK_VALUE_MASK = 0x8CA4, - GL_STENCIL_BACK_WRITEMASK = 0x8CA5; - - protected GL20() { - throw new UnsupportedOperationException(); - } - - 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) { - GL20.nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, MemoryUtil.memAddress(buffer)); - } - - public static void glVertexAttribPointer(int index, int size, - boolean unsigned, boolean normalized, - int stride, IntBuffer buffer) { - GL20.nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, MemoryUtil.memAddress(buffer)); - } - - public static String glGetActiveAttrib(int program, int index, int maxLength, - IntBuffer sizeType) { - //TODO check if correct - IntBuffer type = BufferUtils.createIntBuffer(1); - String s = GL20.glGetActiveAttrib(program, index, maxLength, sizeType, type); - sizeType.put(type.get(0)); - return s; - } - - public static String glGetActiveUniform(int program, int index, int maxLength, - IntBuffer sizeType) { - //TODO if correct - IntBuffer type = BufferUtils.createIntBuffer(1); - String s = GL20.glGetActiveUniform(program, index, maxLength, sizeType, type); - sizeType.put(type.get(0)); - return s; - } - - public static void glShaderSource(int shader, ByteBuffer string) { - byte[] b = new byte[string.remaining()]; - string.get(b); - glShaderSource(shader, new String(b)); - } - - @Deprecated - public static int glGetProgram(int i, int i2) { - return glGetProgrami(i, i2); - } - - public static void glGetProgram(int program, int pname, IntBuffer params) { - glGetProgramiv(program, pname, params); - } - - @Deprecated - public static int glGetShader(int i, int i2) { - return glGetShaderi(i, i2); - } - - public static void glGetShader(int shader, int pname, IntBuffer params) { - glGetShaderiv(shader, pname, params); - } - - public static void glGetUniform(int program, int location, FloatBuffer params) { - glGetUniformfv(program, location, params); - } - - public static void glGetUniform(int program, int location, IntBuffer params) { - glGetUniformiv(program, location, params); - } - - public static void glGetVertexAttrib(int index, int pname, DoubleBuffer params) { - glGetVertexAttribdv(index, pname, params); - } - - public static void glGetVertexAttrib(int index, int pname, FloatBuffer params) { - glGetVertexAttribfv(index, pname, params); - } - - public static void glGetVertexAttrib(int index, int pname, IntBuffer params) { - glGetVertexAttribiv(index, pname, params); - } - - public static void glUniform1(int location, FloatBuffer buffer) { - glUniform1fv(location, buffer); - } - - public static void glUniform1(int location, IntBuffer buffer) { - glUniform1iv(location, buffer); - } - - public static void glUniform2(int location, FloatBuffer buffer) { - glUniform2fv(location, buffer); - } - - public static void glUniform2(int location, IntBuffer buffer) { - glUniform2iv(location, buffer); - } - - public static void glUniform3(int location, FloatBuffer buffer) { - glUniform3fv(location, buffer); - } - - public static void glUniform3(int location, IntBuffer buffer) { - glUniform3iv(location, buffer); - } - - public static void glUniform4(int location, FloatBuffer buffer) { - glUniform4fv(location, buffer); - } - - public static void glUniform4(int location, IntBuffer buffer) { - glUniform4iv(location, buffer); - } - - public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer buffer) { - glUniformMatrix2fv(location, transpose, buffer); - } - - public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer buffer) { - glUniformMatrix3fv(location, transpose, buffer); - } - - public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer buffer) { - glUniformMatrix4fv(location, transpose, buffer); - } - - public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, FloatBuffer buffer) { - glVertexAttribPointer(index, size, GL11.GL_FLOAT, normalized, stride, buffer); - } - - // --- [ glCreateProgram ] --- - - /** - * Creates a program object. - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateProgram() { - return GL20C.glCreateProgram(); - } - - // --- [ glDeleteProgram ] --- - - /** - * Deletes a program object. - * - * @param program the program object to be deleted - * - * @see Reference Page - */ - public static void glDeleteProgram(@NativeType("GLuint") int program) { - GL20C.glDeleteProgram(program); - } - - // --- [ glIsProgram ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if {@code program} is the name of a program object. If {@code program} is zero, or a non-zero value that is not the name of a program - * object, IsProgram returns {@link GL11#GL_FALSE FALSE}. No error is generated if program is not a valid program object name. - * - * @param program the program object name to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsProgram(@NativeType("GLuint") int program) { - return GL20C.glIsProgram(program); - } - - // --- [ glCreateShader ] --- - - /** - * Creates a shader object. - * - * @param type the type of shader to be created. One of:
    {@link GL20C#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20C#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateShader(@NativeType("GLenum") int type) { - return GL20C.glCreateShader(type); - } - - // --- [ glDeleteShader ] --- - - /** - * Deletes a shader object. - * - * @param shader the shader object to be deleted - * - * @see Reference Page - */ - public static void glDeleteShader(@NativeType("GLuint") int shader) { - GL20C.glDeleteShader(shader); - } - - // --- [ glIsShader ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if {@code shader} is the name of a shader object. If {@code shader} is zero, or a nonzero value that is not the name of a shader - * object, IsShader returns {@link GL11#GL_FALSE FALSE}. No error is generated if shader is not a valid shader object name. - * - * @param shader the shader object name to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsShader(@NativeType("GLuint") int shader) { - return GL20C.glIsShader(shader); - } - - // --- [ glAttachShader ] --- - - /** - * Attaches a shader object to a program object. - * - *

    In order to create a complete shader program, there must be a way to specify the list of things that will be linked together. Program objects provide - * this mechanism. Shaders that are to be linked together in a program object must first be attached to that program object. glAttachShader attaches the - * shader object specified by shader to the program object specified by program. This indicates that shader will be included in link operations that will - * be performed on program.

    - * - *

    All operations that can be performed on a shader object are valid whether or not the shader object is attached to a program object. It is permissible to - * attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled. It - * is permissible to attach multiple shader objects of the same type because each may contain a portion of the complete shader. It is also permissible to - * attach a shader object to more than one program object. If a shader object is deleted while it is attached to a program object, it will be flagged for - * deletion, and deletion will not occur until glDetachShader is called to detach it from all program objects to which it is attached.

    - * - * @param program the program object to which a shader object will be attached - * @param shader the shader object that is to be attached - * - * @see Reference Page - */ - public static void glAttachShader(@NativeType("GLuint") int program, @NativeType("GLuint") int shader) { - GL20C.glAttachShader(program, shader); - } - - // --- [ glDetachShader ] --- - - /** - * Detaches a shader object from a program object to which it is attached. - * - * @param program the program object from which to detach the shader object - * @param shader the shader object to be detached - * - * @see Reference Page - */ - public static void glDetachShader(@NativeType("GLuint") int program, @NativeType("GLuint") int shader) { - GL20C.glDetachShader(program, shader); - } - - // --- [ glShaderSource ] --- - - /** - * Unsafe version of: {@link #glShaderSource ShaderSource} - * - * @param count the number of elements in the string and length arrays - */ - public static void nglShaderSource(int shader, int count, long strings, long length) { - GL20C.nglShaderSource(shader, count, strings, length); - } - - /** - * Sets the source code in {@code shader} to the source code in the array of strings specified by {@code strings}. Any source code previously stored in the - * shader object is completely replaced. The number of strings in the array is specified by {@code count}. If {@code length} is {@code NULL}, each string is - * assumed to be null terminated. If {@code length} is a value other than {@code NULL}, it points to an array containing a string length for each of the - * corresponding elements of {@code strings}. Each element in the length array may contain the length of the corresponding string (the null character is not - * counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or - * parsed at this time; they are simply copied into the specified shader object. - * - * @param shader the shader object whose source code is to be replaced - * @param strings an array of pointers to strings containing the source code to be loaded into the shader - * @param length an array of string lengths - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") PointerBuffer strings, @Nullable @NativeType("GLint const *") IntBuffer length) { - GL20C.glShaderSource(shader, strings, length); - } - - /** - * Sets the source code in {@code shader} to the source code in the array of strings specified by {@code strings}. Any source code previously stored in the - * shader object is completely replaced. The number of strings in the array is specified by {@code count}. If {@code length} is {@code NULL}, each string is - * assumed to be null terminated. If {@code length} is a value other than {@code NULL}, it points to an array containing a string length for each of the - * corresponding elements of {@code strings}. Each element in the length array may contain the length of the corresponding string (the null character is not - * counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or - * parsed at this time; they are simply copied into the specified shader object. - * - * @param shader the shader object whose source code is to be replaced - * @param strings an array of pointers to strings containing the source code to be loaded into the shader - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") CharSequence... strings) { - GL20C.glShaderSource(shader, strings); - } - - /** - * Sets the source code in {@code shader} to the source code in the array of strings specified by {@code strings}. Any source code previously stored in the - * shader object is completely replaced. The number of strings in the array is specified by {@code count}. If {@code length} is {@code NULL}, each string is - * assumed to be null terminated. If {@code length} is a value other than {@code NULL}, it points to an array containing a string length for each of the - * corresponding elements of {@code strings}. Each element in the length array may contain the length of the corresponding string (the null character is not - * counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or - * parsed at this time; they are simply copied into the specified shader object. - * - * @param shader the shader object whose source code is to be replaced - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") CharSequence string) { - GL20C.glShaderSource(shader, string); - } - - // --- [ glCompileShader ] --- - - /** - * Compiles a shader object. - * - * @param shader the shader object to be compiled - * - * @see Reference Page - */ - public static void glCompileShader(@NativeType("GLuint") int shader) { - GL20C.glCompileShader(shader); - } - - // --- [ glLinkProgram ] --- - - /** - * Links a program object. - * - * @param program the program object to be linked - * - * @see Reference Page - */ - public static void glLinkProgram(@NativeType("GLuint") int program) { - GL20C.glLinkProgram(program); - } - - // --- [ glUseProgram ] --- - - /** - * Installs a program object as part of current rendering state. - * - * @param program the program object whose executables are to be used as part of current rendering state - * - * @see Reference Page - */ - public static void glUseProgram(@NativeType("GLuint") int program) { - GL20C.glUseProgram(program); - } - - // --- [ glValidateProgram ] --- - - /** - * Validates a program object. - * - * @param program the program object to be validated - * - * @see Reference Page - */ - public static void glValidateProgram(@NativeType("GLuint") int program) { - GL20C.glValidateProgram(program); - } - - // --- [ glUniform1f ] --- - - /** - * Specifies the value of a float uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform value - * - * @see Reference Page - */ - public static void glUniform1f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0) { - GL20C.glUniform1f(location, v0); - } - - // --- [ glUniform2f ] --- - - /** - * Specifies the value of a vec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * - * @see Reference Page - */ - public static void glUniform2f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1) { - GL20C.glUniform2f(location, v0, v1); - } - - // --- [ glUniform3f ] --- - - /** - * Specifies the value of a vec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * - * @see Reference Page - */ - public static void glUniform3f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2) { - GL20C.glUniform3f(location, v0, v1, v2); - } - - // --- [ glUniform4f ] --- - - /** - * Specifies the value of a vec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - * - * @see Reference Page - */ - public static void glUniform4f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3) { - GL20C.glUniform4f(location, v0, v1, v2, v3); - } - - // --- [ glUniform1i ] --- - - /** - * Specifies the value of an int uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform value - * - * @see Reference Page - */ - public static void glUniform1i(@NativeType("GLint") int location, @NativeType("GLint") int v0) { - GL20C.glUniform1i(location, v0); - } - - // --- [ glUniform2i ] --- - - /** - * Specifies the value of an ivec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * - * @see Reference Page - */ - public static void glUniform2i(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1) { - GL20C.glUniform2i(location, v0, v1); - } - - // --- [ glUniform3i ] --- - - /** - * Specifies the value of an ivec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * - * @see Reference Page - */ - public static void glUniform3i(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2) { - GL20C.glUniform3i(location, v0, v1, v2); - } - - // --- [ glUniform4i ] --- - - /** - * Specifies the value of an ivec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - * - * @see Reference Page - */ - public static void glUniform4i(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2, @NativeType("GLint") int v3) { - GL20C.glUniform4i(location, v0, v1, v2, v3); - } - - // --- [ glUniform1fv ] --- - - /** - * Unsafe version of: {@link #glUniform1fv Uniform1fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform1fv(int location, int count, long value) { - GL20C.nglUniform1fv(location, count, value); - } - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL20C.glUniform1fv(location, value); - } - - // --- [ glUniform2fv ] --- - - /** - * Unsafe version of: {@link #glUniform2fv Uniform2fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform2fv(int location, int count, long value) { - GL20C.nglUniform2fv(location, count, value); - } - - /** - * Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL20C.glUniform2fv(location, value); - } - - // --- [ glUniform3fv ] --- - - /** - * Unsafe version of: {@link #glUniform3fv Uniform3fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform3fv(int location, int count, long value) { - GL20C.nglUniform3fv(location, count, value); - } - - /** - * Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL20C.glUniform3fv(location, value); - } - - // --- [ glUniform4fv ] --- - - /** - * Unsafe version of: {@link #glUniform4fv Uniform4fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform4fv(int location, int count, long value) { - GL20C.nglUniform4fv(location, count, value); - } - - /** - * Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL20C.glUniform4fv(location, value); - } - - // --- [ glUniform1iv ] --- - - /** - * Unsafe version of: {@link #glUniform1iv Uniform1iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform1iv(int location, int count, long value) { - GL20C.nglUniform1iv(location, count, value); - } - - /** - * Specifies the value of a single int uniform variable or a int uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL20C.glUniform1iv(location, value); - } - - // --- [ glUniform2iv ] --- - - /** - * Unsafe version of: {@link #glUniform2iv Uniform2iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform2iv(int location, int count, long value) { - GL20C.nglUniform2iv(location, count, value); - } - - /** - * Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL20C.glUniform2iv(location, value); - } - - // --- [ glUniform3iv ] --- - - /** - * Unsafe version of: {@link #glUniform3iv Uniform3iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform3iv(int location, int count, long value) { - GL20C.nglUniform3iv(location, count, value); - } - - /** - * Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL20C.glUniform3iv(location, value); - } - - // --- [ glUniform4iv ] --- - - /** - * Unsafe version of: {@link #glUniform4iv Uniform4iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform4iv(int location, int count, long value) { - GL20C.nglUniform4iv(location, count, value); - } - - /** - * Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL20C.glUniform4iv(location, value); - } - - // --- [ glUniformMatrix2fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2fv UniformMatrix2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2fv(int location, int count, boolean transpose, long value) { - GL20C.nglUniformMatrix2fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2 uniform variable or a mat2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL20C.glUniformMatrix2fv(location, transpose, value); - } - - // --- [ glUniformMatrix3fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3fv UniformMatrix3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3fv(int location, int count, boolean transpose, long value) { - GL20C.nglUniformMatrix3fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL20C.glUniformMatrix3fv(location, transpose, value); - } - - // --- [ glUniformMatrix4fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4fv UniformMatrix4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4fv(int location, int count, boolean transpose, long value) { - GL20C.nglUniformMatrix4fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL20C.glUniformMatrix4fv(location, transpose, value); - } - - // --- [ glGetShaderiv ] --- - - /** Unsafe version of: {@link #glGetShaderiv GetShaderiv} */ - public static void nglGetShaderiv(int shader, int pname, long params) { - GL20C.nglGetShaderiv(shader, pname, params); - } - - /** - * Returns a parameter from a shader object. - * - * @param shader the shader object to be queried - * @param pname the object parameter. One of:
    {@link GL20C#GL_SHADER_TYPE SHADER_TYPE}{@link GL20C#GL_DELETE_STATUS DELETE_STATUS}{@link GL20C#GL_COMPILE_STATUS COMPILE_STATUS}{@link GL20C#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20C#GL_SHADER_SOURCE_LENGTH SHADER_SOURCE_LENGTH}
    - * @param params the requested object parameter - * - * @see Reference Page - */ - public static void glGetShaderiv(@NativeType("GLuint") int shader, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL20C.glGetShaderiv(shader, pname, params); - } - - /** - * Returns a parameter from a shader object. - * - * @param shader the shader object to be queried - * @param pname the object parameter. One of:
    {@link GL20C#GL_SHADER_TYPE SHADER_TYPE}{@link GL20C#GL_DELETE_STATUS DELETE_STATUS}{@link GL20C#GL_COMPILE_STATUS COMPILE_STATUS}{@link GL20C#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20C#GL_SHADER_SOURCE_LENGTH SHADER_SOURCE_LENGTH}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetShaderi(@NativeType("GLuint") int shader, @NativeType("GLenum") int pname) { - return GL20C.glGetShaderi(shader, pname); - } - - // --- [ glGetProgramiv ] --- - - /** Unsafe version of: {@link #glGetProgramiv GetProgramiv} */ - public static void nglGetProgramiv(int program, int pname, long params) { - GL20C.nglGetProgramiv(program, pname, params); - } - - /** - * Returns a parameter from a program object. - * - * @param program the program object to be queried - * @param pname the object parameter. One of:
    {@link GL20C#GL_DELETE_STATUS DELETE_STATUS}{@link GL20C#GL_LINK_STATUS LINK_STATUS}{@link GL20C#GL_VALIDATE_STATUS VALIDATE_STATUS}
    {@link GL20C#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20C#GL_ATTACHED_SHADERS ATTACHED_SHADERS}{@link GL20C#GL_ACTIVE_ATTRIBUTES ACTIVE_ATTRIBUTES}
    {@link GL20C#GL_ACTIVE_ATTRIBUTE_MAX_LENGTH ACTIVE_ATTRIBUTE_MAX_LENGTH}{@link GL20C#GL_ACTIVE_UNIFORMS ACTIVE_UNIFORMS}{@link GL20C#GL_ACTIVE_UNIFORM_MAX_LENGTH ACTIVE_UNIFORM_MAX_LENGTH}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_MODE TRANSFORM_FEEDBACK_BUFFER_MODE}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYINGS TRANSFORM_FEEDBACK_VARYINGS}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH}
    {@link GL31#GL_ACTIVE_UNIFORM_BLOCKS ACTIVE_UNIFORM_BLOCKS}{@link GL31#GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH}{@link GL32#GL_GEOMETRY_VERTICES_OUT GEOMETRY_VERTICES_OUT}
    {@link GL32#GL_GEOMETRY_INPUT_TYPE GEOMETRY_INPUT_TYPE}{@link GL32#GL_GEOMETRY_OUTPUT_TYPE GEOMETRY_OUTPUT_TYPE}{@link GL41#GL_PROGRAM_BINARY_LENGTH PROGRAM_BINARY_LENGTH}
    {@link GL42#GL_ACTIVE_ATOMIC_COUNTER_BUFFERS ACTIVE_ATOMIC_COUNTER_BUFFERS}{@link GL43#GL_COMPUTE_WORK_GROUP_SIZE COMPUTE_WORK_GROUP_SIZE}
    - * @param params the requested object parameter - * - * @see Reference Page - */ - public static void glGetProgramiv(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL20C.glGetProgramiv(program, pname, params); - } - - /** - * Returns a parameter from a program object. - * - * @param program the program object to be queried - * @param pname the object parameter. One of:
    {@link GL20C#GL_DELETE_STATUS DELETE_STATUS}{@link GL20C#GL_LINK_STATUS LINK_STATUS}{@link GL20C#GL_VALIDATE_STATUS VALIDATE_STATUS}
    {@link GL20C#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20C#GL_ATTACHED_SHADERS ATTACHED_SHADERS}{@link GL20C#GL_ACTIVE_ATTRIBUTES ACTIVE_ATTRIBUTES}
    {@link GL20C#GL_ACTIVE_ATTRIBUTE_MAX_LENGTH ACTIVE_ATTRIBUTE_MAX_LENGTH}{@link GL20C#GL_ACTIVE_UNIFORMS ACTIVE_UNIFORMS}{@link GL20C#GL_ACTIVE_UNIFORM_MAX_LENGTH ACTIVE_UNIFORM_MAX_LENGTH}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_MODE TRANSFORM_FEEDBACK_BUFFER_MODE}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYINGS TRANSFORM_FEEDBACK_VARYINGS}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH}
    {@link GL31#GL_ACTIVE_UNIFORM_BLOCKS ACTIVE_UNIFORM_BLOCKS}{@link GL31#GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH}{@link GL32#GL_GEOMETRY_VERTICES_OUT GEOMETRY_VERTICES_OUT}
    {@link GL32#GL_GEOMETRY_INPUT_TYPE GEOMETRY_INPUT_TYPE}{@link GL32#GL_GEOMETRY_OUTPUT_TYPE GEOMETRY_OUTPUT_TYPE}{@link GL41#GL_PROGRAM_BINARY_LENGTH PROGRAM_BINARY_LENGTH}
    {@link GL42#GL_ACTIVE_ATOMIC_COUNTER_BUFFERS ACTIVE_ATOMIC_COUNTER_BUFFERS}{@link GL43#GL_COMPUTE_WORK_GROUP_SIZE COMPUTE_WORK_GROUP_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgrami(@NativeType("GLuint") int program, @NativeType("GLenum") int pname) { - return GL20C.glGetProgrami(program, pname); - } - - // --- [ glGetShaderInfoLog ] --- - - /** - * Unsafe version of: {@link #glGetShaderInfoLog GetShaderInfoLog} - * - * @param maxLength the size of the character buffer for storing the returned information log - */ - public static void nglGetShaderInfoLog(int shader, int maxLength, long length, long infoLog) { - GL20C.nglGetShaderInfoLog(shader, maxLength, length, infoLog); - } - - /** - * Returns the information log for a shader object. - * - * @param shader the shader object whose information log is to be queried - * @param length the length of the string returned in {@code infoLog} (excluding the null terminator) - * @param infoLog an array of characters that is used to return the information log - * - * @see Reference Page - */ - public static void glGetShaderInfoLog(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL20C.glGetShaderInfoLog(shader, length, infoLog); - } - - /** - * Returns the information log for a shader object. - * - * @param shader the shader object whose information log is to be queried - * @param maxLength the size of the character buffer for storing the returned information log - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderInfoLog(@NativeType("GLuint") int shader, @NativeType("GLsizei") int maxLength) { - return GL20C.glGetShaderInfoLog(shader, maxLength); - } - - /** - * Returns the information log for a shader object. - * - * @param shader the shader object whose information log is to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderInfoLog(@NativeType("GLuint") int shader) { - return glGetShaderInfoLog(shader, glGetShaderi(shader, GL_INFO_LOG_LENGTH)); - } - - // --- [ glGetProgramInfoLog ] --- - - /** - * Unsafe version of: {@link #glGetProgramInfoLog GetProgramInfoLog} - * - * @param maxLength the size of the character buffer for storing the returned information log - */ - public static void nglGetProgramInfoLog(int program, int maxLength, long length, long infoLog) { - GL20C.nglGetProgramInfoLog(program, maxLength, length, infoLog); - } - - /** - * Returns the information log for a program object. - * - * @param program the program object whose information log is to be queried - * @param length the length of the string returned in {@code infoLog} (excluding the null terminator) - * @param infoLog an array of characters that is used to return the information log - * - * @see Reference Page - */ - public static void glGetProgramInfoLog(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL20C.glGetProgramInfoLog(program, length, infoLog); - } - - /** - * Returns the information log for a program object. - * - * @param program the program object whose information log is to be queried - * @param maxLength the size of the character buffer for storing the returned information log - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramInfoLog(@NativeType("GLuint") int program, @NativeType("GLsizei") int maxLength) { - return GL20C.glGetProgramInfoLog(program, maxLength); - } - - /** - * Returns the information log for a program object. - * - * @param program the program object whose information log is to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramInfoLog(@NativeType("GLuint") int program) { - return glGetProgramInfoLog(program, glGetProgrami(program, GL_INFO_LOG_LENGTH)); - } - - // --- [ glGetAttachedShaders ] --- - - /** - * Unsafe version of: {@link #glGetAttachedShaders GetAttachedShaders} - * - * @param maxCount the size of the array for storing the returned object names - */ - public static void nglGetAttachedShaders(int program, int maxCount, long count, long shaders) { - GL20C.nglGetAttachedShaders(program, maxCount, count, shaders); - } - - /** - * Returns the shader objects attached to a program object. - * - * @param program the program object to be queried - * @param count the number of names actually returned in {@code shaders} - * @param shaders an array that is used to return the names of attached shader objects - * - * @see Reference Page - */ - public static void glGetAttachedShaders(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") IntBuffer count, @NativeType("GLuint *") IntBuffer shaders) { - GL20C.glGetAttachedShaders(program, count, shaders); - } - - // --- [ glGetUniformLocation ] --- - - /** Unsafe version of: {@link #glGetUniformLocation GetUniformLocation} */ - public static int nglGetUniformLocation(int program, long name) { - return GL20C.nglGetUniformLocation(program, name); - } - - /** - * Returns the location of a uniform variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the uniform variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetUniformLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - return GL20C.glGetUniformLocation(program, name); - } - - /** - * Returns the location of a uniform variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the uniform variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetUniformLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - return GL20C.glGetUniformLocation(program, name); - } - - // --- [ glGetActiveUniform ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniform GetActiveUniform} - * - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - */ - public static void nglGetActiveUniform(int program, int index, int maxLength, long length, long size, long type, long name) { - GL20C.nglGetActiveUniform(program, index, maxLength, length, size, type, name); - } - - /** - * Returns information about an active uniform variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the uniform variable to be queried - * @param length the number of characters actually written by OpenGL in the string indicated by {@code name} (excluding the null terminator) if a value other than NULL is passed - * @param size the size of the uniform variable - * @param type the data type of the uniform variable - * @param name a null terminated string containing the name of the uniform variable - * - * @see Reference Page - */ - public static void glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - GL20C.glGetActiveUniform(program, index, length, size, type, name); - } - - /** - * Returns information about an active uniform variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the uniform variable to be queried - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - * @param size the size of the uniform variable - * @param type the data type of the uniform variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei") int maxLength, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return GL20C.glGetActiveUniform(program, index, maxLength, size, type); - } - - /** - * Returns information about an active uniform variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the uniform variable to be queried - * @param size the size of the uniform variable - * @param type the data type of the uniform variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetActiveUniform(program, index, glGetProgrami(program, GL_ACTIVE_UNIFORM_MAX_LENGTH), size, type); - } - - // --- [ glGetUniformfv ] --- - - /** Unsafe version of: {@link #glGetUniformfv GetUniformfv} */ - public static void nglGetUniformfv(int program, int location, long params) { - GL20C.nglGetUniformfv(program, location, params); - } - - /** - * Returns the float value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - GL20C.glGetUniformfv(program, location, params); - } - - /** - * Returns the float value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetUniformf(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL20C.glGetUniformf(program, location); - } - - // --- [ glGetUniformiv ] --- - - /** Unsafe version of: {@link #glGetUniformiv GetUniformiv} */ - public static void nglGetUniformiv(int program, int location, long params) { - GL20C.nglGetUniformiv(program, location, params); - } - - /** - * Returns the int value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - GL20C.glGetUniformiv(program, location, params); - } - - /** - * Returns the int value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL20C.glGetUniformi(program, location); - } - - // --- [ glGetShaderSource ] --- - - /** - * Unsafe version of: {@link #glGetShaderSource GetShaderSource} - * - * @param maxLength the size of the character buffer for storing the returned source code string - */ - public static void nglGetShaderSource(int shader, int maxLength, long length, long source) { - GL20C.nglGetShaderSource(shader, maxLength, length, source); - } - - /** - * Returns the source code string from a shader object. - * - * @param shader the shader object to be queried - * @param length the length of the string returned in source (excluding the null terminator) - * @param source an array of characters that is used to return the source code string - * - * @see Reference Page - */ - public static void glGetShaderSource(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer source) { - GL20C.glGetShaderSource(shader, length, source); - } - - /** - * Returns the source code string from a shader object. - * - * @param shader the shader object to be queried - * @param maxLength the size of the character buffer for storing the returned source code string - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderSource(@NativeType("GLuint") int shader, @NativeType("GLsizei") int maxLength) { - return GL20C.glGetShaderSource(shader, maxLength); - } - - /** - * Returns the source code string from a shader object. - * - * @param shader the shader object to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderSource(@NativeType("GLuint") int shader) { - return glGetShaderSource(shader, glGetShaderi(shader, GL_SHADER_SOURCE_LENGTH)); - } - - // --- [ glVertexAttrib1f ] --- - - /** - * Specifies the value of a generic vertex attribute. The y and z components are implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * - * @see Reference Page - */ - public static void glVertexAttrib1f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0) { - GL20C.glVertexAttrib1f(index, v0); - } - - // --- [ glVertexAttrib1s ] --- - - /** - * Short version of {@link #glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * - * @see Reference Page - */ - public static void glVertexAttrib1s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0) { - GL20C.glVertexAttrib1s(index, v0); - } - - // --- [ glVertexAttrib1d ] --- - - /** - * Double version of {@link #glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * - * @see Reference Page - */ - public static void glVertexAttrib1d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0) { - GL20C.glVertexAttrib1d(index, v0); - } - - // --- [ glVertexAttrib2f ] --- - - /** - * Specifies the value of a generic vertex attribute. The y component is implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * - * @see Reference Page - */ - public static void glVertexAttrib2f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1) { - GL20C.glVertexAttrib2f(index, v0, v1); - } - - // --- [ glVertexAttrib2s ] --- - - /** - * Short version of {@link #glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * - * @see Reference Page - */ - public static void glVertexAttrib2s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1) { - GL20C.glVertexAttrib2s(index, v0, v1); - } - - // --- [ glVertexAttrib2d ] --- - - /** - * Double version of {@link #glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * - * @see Reference Page - */ - public static void glVertexAttrib2d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1) { - GL20C.glVertexAttrib2d(index, v0, v1); - } - - // --- [ glVertexAttrib3f ] --- - - /** - * Specifies the value of a generic vertex attribute. The w is implicitly set to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * - * @see Reference Page - */ - public static void glVertexAttrib3f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2) { - GL20C.glVertexAttrib3f(index, v0, v1, v2); - } - - // --- [ glVertexAttrib3s ] --- - - /** - * Short version of {@link #glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * - * @see Reference Page - */ - public static void glVertexAttrib3s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2) { - GL20C.glVertexAttrib3s(index, v0, v1, v2); - } - - // --- [ glVertexAttrib3d ] --- - - /** - * Double version of {@link #glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * - * @see Reference Page - */ - public static void glVertexAttrib3d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2) { - GL20C.glVertexAttrib3d(index, v0, v1, v2); - } - - // --- [ glVertexAttrib4f ] --- - - /** - * Specifies the value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - * - * @see Reference Page - */ - public static void glVertexAttrib4f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3) { - GL20C.glVertexAttrib4f(index, v0, v1, v2, v3); - } - - // --- [ glVertexAttrib4s ] --- - - /** - * Short version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - * - * @see Reference Page - */ - public static void glVertexAttrib4s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2, @NativeType("GLshort") short v3) { - GL20C.glVertexAttrib4s(index, v0, v1, v2, v3); - } - - // --- [ glVertexAttrib4d ] --- - - /** - * Double version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - * - * @see Reference Page - */ - public static void glVertexAttrib4d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2, @NativeType("GLdouble") double v3) { - GL20C.glVertexAttrib4d(index, v0, v1, v2, v3); - } - - // --- [ glVertexAttrib4Nub ] --- - - /** - * Normalized unsigned byte version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static void glVertexAttrib4Nub(@NativeType("GLuint") int index, @NativeType("GLubyte") byte x, @NativeType("GLubyte") byte y, @NativeType("GLubyte") byte z, @NativeType("GLubyte") byte w) { - GL20C.glVertexAttrib4Nub(index, x, y, z, w); - } - - // --- [ glVertexAttrib1fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib1fv VertexAttrib1fv} */ - public static void nglVertexAttrib1fv(int index, long v) { - GL20C.nglVertexAttrib1fv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib1fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - GL20C.glVertexAttrib1fv(index, v); - } - - // --- [ glVertexAttrib1sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib1sv VertexAttrib1sv} */ - public static void nglVertexAttrib1sv(int index, long v) { - GL20C.nglVertexAttrib1sv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib1s VertexAttrib1s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib1sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - GL20C.glVertexAttrib1sv(index, v); - } - - // --- [ glVertexAttrib1dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib1dv VertexAttrib1dv} */ - public static void nglVertexAttrib1dv(int index, long v) { - GL20C.nglVertexAttrib1dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib1d VertexAttrib1d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL20C.glVertexAttrib1dv(index, v); - } - - // --- [ glVertexAttrib2fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib2fv VertexAttrib2fv} */ - public static void nglVertexAttrib2fv(int index, long v) { - GL20C.nglVertexAttrib2fv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib2fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - GL20C.glVertexAttrib2fv(index, v); - } - - // --- [ glVertexAttrib2sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib2sv VertexAttrib2sv} */ - public static void nglVertexAttrib2sv(int index, long v) { - GL20C.nglVertexAttrib2sv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib2s VertexAttrib2s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib2sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - GL20C.glVertexAttrib2sv(index, v); - } - - // --- [ glVertexAttrib2dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib2dv VertexAttrib2dv} */ - public static void nglVertexAttrib2dv(int index, long v) { - GL20C.nglVertexAttrib2dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib2d VertexAttrib2d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL20C.glVertexAttrib2dv(index, v); - } - - // --- [ glVertexAttrib3fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib3fv VertexAttrib3fv} */ - public static void nglVertexAttrib3fv(int index, long v) { - GL20C.nglVertexAttrib3fv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib3fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - GL20C.glVertexAttrib3fv(index, v); - } - - // --- [ glVertexAttrib3sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib3sv VertexAttrib3sv} */ - public static void nglVertexAttrib3sv(int index, long v) { - GL20C.nglVertexAttrib3sv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib3s VertexAttrib3s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib3sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - GL20C.glVertexAttrib3sv(index, v); - } - - // --- [ glVertexAttrib3dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib3dv VertexAttrib3dv} */ - public static void nglVertexAttrib3dv(int index, long v) { - GL20C.nglVertexAttrib3dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib3d VertexAttrib3d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL20C.glVertexAttrib3dv(index, v); - } - - // --- [ glVertexAttrib4fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4fv VertexAttrib4fv} */ - public static void nglVertexAttrib4fv(int index, long v) { - GL20C.nglVertexAttrib4fv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - GL20C.glVertexAttrib4fv(index, v); - } - - // --- [ glVertexAttrib4sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4sv VertexAttrib4sv} */ - public static void nglVertexAttrib4sv(int index, long v) { - GL20C.nglVertexAttrib4sv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4s VertexAttrib4s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - GL20C.glVertexAttrib4sv(index, v); - } - - // --- [ glVertexAttrib4dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4dv VertexAttrib4dv} */ - public static void nglVertexAttrib4dv(int index, long v) { - GL20C.nglVertexAttrib4dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4d VertexAttrib4d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL20C.glVertexAttrib4dv(index, v); - } - - // --- [ glVertexAttrib4iv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4iv VertexAttrib4iv} */ - public static void nglVertexAttrib4iv(int index, long v) { - GL20C.nglVertexAttrib4iv(index, v); - } - - /** - * Integer pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL20C.glVertexAttrib4iv(index, v); - } - - // --- [ glVertexAttrib4bv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4bv VertexAttrib4bv} */ - public static void nglVertexAttrib4bv(int index, long v) { - GL20C.nglVertexAttrib4bv(index, v); - } - - /** - * Byte pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4bv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - GL20C.glVertexAttrib4bv(index, v); - } - - // --- [ glVertexAttrib4ubv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4ubv VertexAttrib4ubv} */ - public static void nglVertexAttrib4ubv(int index, long v) { - GL20C.nglVertexAttrib4ubv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttrib4Nub VertexAttrib4Nub}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4ubv(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - GL20C.glVertexAttrib4ubv(index, v); - } - - // --- [ glVertexAttrib4usv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4usv VertexAttrib4usv} */ - public static void nglVertexAttrib4usv(int index, long v) { - GL20C.nglVertexAttrib4usv(index, v); - } - - /** - * Unsigned short pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4usv(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - GL20C.glVertexAttrib4usv(index, v); - } - - // --- [ glVertexAttrib4uiv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4uiv VertexAttrib4uiv} */ - public static void nglVertexAttrib4uiv(int index, long v) { - GL20C.nglVertexAttrib4uiv(index, v); - } - - /** - * Unsigned int pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - GL20C.glVertexAttrib4uiv(index, v); - } - - // --- [ glVertexAttrib4Nbv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nbv VertexAttrib4Nbv} */ - public static void nglVertexAttrib4Nbv(int index, long v) { - GL20C.nglVertexAttrib4Nbv(index, v); - } - - /** - * Normalized byte pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nbv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - GL20C.glVertexAttrib4Nbv(index, v); - } - - // --- [ glVertexAttrib4Nsv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nsv VertexAttrib4Nsv} */ - public static void nglVertexAttrib4Nsv(int index, long v) { - GL20C.nglVertexAttrib4Nsv(index, v); - } - - /** - * Normalized short pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nsv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - GL20C.glVertexAttrib4Nsv(index, v); - } - - // --- [ glVertexAttrib4Niv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Niv VertexAttrib4Niv} */ - public static void nglVertexAttrib4Niv(int index, long v) { - GL20C.nglVertexAttrib4Niv(index, v); - } - - /** - * Normalized int pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Niv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL20C.glVertexAttrib4Niv(index, v); - } - - // --- [ glVertexAttrib4Nubv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nubv VertexAttrib4Nubv} */ - public static void nglVertexAttrib4Nubv(int index, long v) { - GL20C.nglVertexAttrib4Nubv(index, v); - } - - /** - * Normalized unsigned byte pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nubv(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - GL20C.glVertexAttrib4Nubv(index, v); - } - - // --- [ glVertexAttrib4Nusv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nusv VertexAttrib4Nusv} */ - public static void nglVertexAttrib4Nusv(int index, long v) { - GL20C.nglVertexAttrib4Nusv(index, v); - } - - /** - * Normalized unsigned short pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nusv(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - GL20C.glVertexAttrib4Nusv(index, v); - } - - // --- [ glVertexAttrib4Nuiv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nuiv VertexAttrib4Nuiv} */ - public static void nglVertexAttrib4Nuiv(int index, long v) { - GL20C.nglVertexAttrib4Nuiv(index, v); - } - - /** - * Normalized unsigned int pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nuiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - GL20C.glVertexAttrib4Nuiv(index, v); - } - - // --- [ glVertexAttribPointer ] --- - - /** Unsafe version of: {@link #glVertexAttribPointer VertexAttribPointer} */ - public static void nglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer) { - GL20C.nglVertexAttribPointer(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - GL20C.glVertexAttribPointer(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - GL20C.glVertexAttribPointer(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - GL20C.glVertexAttribPointer(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - GL20C.glVertexAttribPointer(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - GL20C.glVertexAttribPointer(index, size, type, normalized, stride, pointer); - } - - // --- [ glEnableVertexAttribArray ] --- - - /** - * Enables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be enabled - * - * @see Reference Page - */ - public static void glEnableVertexAttribArray(@NativeType("GLuint") int index) { - GL20C.glEnableVertexAttribArray(index); - } - - // --- [ glDisableVertexAttribArray ] --- - - /** - * Disables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be disabled - * - * @see Reference Page - */ - public static void glDisableVertexAttribArray(@NativeType("GLuint") int index) { - GL20C.glDisableVertexAttribArray(index); - } - - // --- [ glBindAttribLocation ] --- - - /** Unsafe version of: {@link #glBindAttribLocation BindAttribLocation} */ - public static void nglBindAttribLocation(int program, int index, long name) { - GL20C.nglBindAttribLocation(program, index, name); - } - - /** - * Associates a generic vertex attribute index with a named attribute variable. - * - * @param program the program object in which the association is to be made - * @param index the index of the generic vertex attribute to be bound - * @param name a null terminated string containing the name of the vertex shader attribute variable to which {@code index} is to be bound - * - * @see Reference Page - */ - public static void glBindAttribLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLchar const *") ByteBuffer name) { - GL20C.glBindAttribLocation(program, index, name); - } - - /** - * Associates a generic vertex attribute index with a named attribute variable. - * - * @param program the program object in which the association is to be made - * @param index the index of the generic vertex attribute to be bound - * @param name a null terminated string containing the name of the vertex shader attribute variable to which {@code index} is to be bound - * - * @see Reference Page - */ - public static void glBindAttribLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLchar const *") CharSequence name) { - GL20C.glBindAttribLocation(program, index, name); - } - - // --- [ glGetActiveAttrib ] --- - - /** - * Unsafe version of: {@link #glGetActiveAttrib GetActiveAttrib} - * - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - */ - public static void nglGetActiveAttrib(int program, int index, int maxLength, long length, long size, long type, long name) { - GL20C.nglGetActiveAttrib(program, index, maxLength, length, size, type, name); - } - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the attribute variable to be queried - * @param length the number of characters actually written by OpenGL in the string indicated by {@code name} (excluding the null terminator) if a value other than - * {@code NULL} is passed - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - * @param name a null terminated string containing the name of the attribute variable - * - * @see Reference Page - */ - public static void glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - GL20C.glGetActiveAttrib(program, index, length, size, type, name); - } - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the attribute variable to be queried - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei") int maxLength, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return GL20C.glGetActiveAttrib(program, index, maxLength, size, type); - } - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the attribute variable to be queried - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetActiveAttrib(program, index, glGetProgrami(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH), size, type); - } - - // --- [ glGetAttribLocation ] --- - - /** Unsafe version of: {@link #glGetAttribLocation GetAttribLocation} */ - public static int nglGetAttribLocation(int program, long name) { - return GL20C.nglGetAttribLocation(program, name); - } - - /** - * Returns the location of an attribute variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the attribute variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetAttribLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - return GL20C.glGetAttribLocation(program, name); - } - - /** - * Returns the location of an attribute variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the attribute variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetAttribLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - return GL20C.glGetAttribLocation(program, name); - } - - // --- [ glGetVertexAttribiv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribiv GetVertexAttribiv} */ - public static void nglGetVertexAttribiv(int index, int pname, long params) { - GL20C.nglGetVertexAttribiv(index, pname, params); - } - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link GL20C#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}
    {@link GL20C#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE}{@link GL20C#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}
    {@link GL20C#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}{@link GL20C#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}
    {@link GL20C#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL20C.glGetVertexAttribiv(index, pname, params); - } - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link GL20C#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}
    {@link GL20C#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE}{@link GL20C#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}
    {@link GL20C#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}{@link GL20C#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}
    {@link GL20C#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexAttribi(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL20C.glGetVertexAttribi(index, pname); - } - - // --- [ glGetVertexAttribfv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribfv GetVertexAttribfv} */ - public static void nglGetVertexAttribfv(int index, int pname, long params) { - GL20C.nglGetVertexAttribfv(index, pname, params); - } - - /** - * Float version of {@link #glGetVertexAttribiv GetVertexAttribiv}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribfv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL20C.glGetVertexAttribfv(index, pname, params); - } - - // --- [ glGetVertexAttribdv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribdv GetVertexAttribdv} */ - public static void nglGetVertexAttribdv(int index, int pname, long params) { - GL20C.nglGetVertexAttribdv(index, pname, params); - } - - /** - * Double version of {@link #glGetVertexAttribiv GetVertexAttribiv}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - GL20C.glGetVertexAttribdv(index, pname, params); - } - - // --- [ glGetVertexAttribPointerv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribPointerv GetVertexAttribPointerv} */ - public static void nglGetVertexAttribPointerv(int index, int pname, long pointer) { - GL20C.nglGetVertexAttribPointerv(index, pname, pointer); - } - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link GL20C#GL_VERTEX_ATTRIB_ARRAY_POINTER VERTEX_ATTRIB_ARRAY_POINTER}
    - * @param pointer the pointer value - * - * @see Reference Page - */ - public static void glGetVertexAttribPointerv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer pointer) { - GL20C.glGetVertexAttribPointerv(index, pname, pointer); - } - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link GL20C#GL_VERTEX_ATTRIB_ARRAY_POINTER VERTEX_ATTRIB_ARRAY_POINTER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL20C.glGetVertexAttribPointer(index, pname); - } - - // --- [ glDrawBuffers ] --- - - /** - * Unsafe version of: {@link #glDrawBuffers DrawBuffers} - * - * @param n the number of buffers in {@code bufs} - */ - public static void nglDrawBuffers(int n, long bufs) { - GL20C.nglDrawBuffers(n, bufs); - } - - /** - * Specifies a list of color buffers to be drawn into. - * - * @param bufs an array of symbolic constants specifying the buffers into which fragment colors or data values will be written. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}
    GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glDrawBuffers(@NativeType("GLenum const *") IntBuffer bufs) { - GL20C.glDrawBuffers(bufs); - } - - /** - * Specifies a list of color buffers to be drawn into. - * - * @see Reference Page - */ - public static void glDrawBuffers(@NativeType("GLenum const *") int buf) { - GL20C.glDrawBuffers(buf); - } - - // --- [ glBlendEquationSeparate ] --- - - /** - * Sets the RGB blend equation and the alpha blend equation separately. - * - * @param modeRGB the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * @param modeAlpha the alpha blend equation, how the alpha component of the source and destination colors are combined - * - * @see Reference Page - */ - public static void glBlendEquationSeparate(@NativeType("GLenum") int modeRGB, @NativeType("GLenum") int modeAlpha) { - GL20C.glBlendEquationSeparate(modeRGB, modeAlpha); - } - - // --- [ glStencilOpSeparate ] --- - - /** - * Sets front and/or back stencil test actions. - * - * @param face whether front and/or back stencil state is updated. One of:
    {@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param sfail the action to take when the stencil test fails. The initial value is GL_KEEP. One of:
    {@link GL11#GL_KEEP KEEP}{@link GL11#GL_ZERO ZERO}{@link GL11#GL_REPLACE REPLACE}{@link GL11#GL_INCR INCR}{@link GL14#GL_INCR_WRAP INCR_WRAP}{@link GL11#GL_DECR DECR}{@link GL14#GL_DECR_WRAP DECR_WRAP}{@link GL11#GL_INVERT INVERT}
    - * @param dpfail the stencil action when the stencil test passes, but the depth test fails. The initial value is GL_KEEP - * @param dppass the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth - * testing is not enabled. The initial value is GL_KEEP - * - * @see Reference Page - */ - public static void glStencilOpSeparate(@NativeType("GLenum") int face, @NativeType("GLenum") int sfail, @NativeType("GLenum") int dpfail, @NativeType("GLenum") int dppass) { - GL20C.glStencilOpSeparate(face, sfail, dpfail, dppass); - } - - // --- [ glStencilFuncSeparate ] --- - - /** - * Sets front and/or back function and reference value for stencil testing. - * - * @param face whether front and/or back stencil state is updated. One of:
    {@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param func the test function. The initial value is GL_ALWAYS. One of:
    {@link GL11#GL_NEVER NEVER}{@link GL11#GL_LESS LESS}{@link GL11#GL_LEQUAL LEQUAL}{@link GL11#GL_GREATER GREATER}{@link GL11#GL_GEQUAL GEQUAL}{@link GL11#GL_EQUAL EQUAL}{@link GL11#GL_NOTEQUAL NOTEQUAL}{@link GL11#GL_ALWAYS ALWAYS}
    - * @param ref the reference value for the stencil test. {@code ref} is clamped to the range [0, 2n – 1], where {@code n} is the number of bitplanes in the stencil - * buffer. The initial value is 0. - * @param mask a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's. - * - * @see Reference Page - */ - public static void glStencilFuncSeparate(@NativeType("GLenum") int face, @NativeType("GLenum") int func, @NativeType("GLint") int ref, @NativeType("GLuint") int mask) { - GL20C.glStencilFuncSeparate(face, func, ref, mask); - } - - // --- [ glStencilMaskSeparate ] --- - - /** - * Controls the front and/or back writing of individual bits in the stencil planes. - * - * @param face whether front and/or back stencil writemask is updated. One of:
    {@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param mask a bit mask to enable and disable writing of individual bits in the stencil planes. Initially, the mask is all 1's. - * - * @see Reference Page - */ - public static void glStencilMaskSeparate(@NativeType("GLenum") int face, @NativeType("GLuint") int mask) { - GL20C.glStencilMaskSeparate(face, mask); - } - - /** - * Array version of: {@link #glShaderSource ShaderSource} - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") PointerBuffer strings, @Nullable @NativeType("GLint const *") int[] length) { - GL20C.glShaderSource(shader, strings, length); - } - - /** - * Array version of: {@link #glUniform1fv Uniform1fv} - * - * @see Reference Page - */ - public static void glUniform1fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL20C.glUniform1fv(location, value); - } - - /** - * Array version of: {@link #glUniform2fv Uniform2fv} - * - * @see Reference Page - */ - public static void glUniform2fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL20C.glUniform2fv(location, value); - } - - /** - * Array version of: {@link #glUniform3fv Uniform3fv} - * - * @see Reference Page - */ - public static void glUniform3fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL20C.glUniform3fv(location, value); - } - - /** - * Array version of: {@link #glUniform4fv Uniform4fv} - * - * @see Reference Page - */ - public static void glUniform4fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL20C.glUniform4fv(location, value); - } - - /** - * Array version of: {@link #glUniform1iv Uniform1iv} - * - * @see Reference Page - */ - public static void glUniform1iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL20C.glUniform1iv(location, value); - } - - /** - * Array version of: {@link #glUniform2iv Uniform2iv} - * - * @see Reference Page - */ - public static void glUniform2iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL20C.glUniform2iv(location, value); - } - - /** - * Array version of: {@link #glUniform3iv Uniform3iv} - * - * @see Reference Page - */ - public static void glUniform3iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL20C.glUniform3iv(location, value); - } - - /** - * Array version of: {@link #glUniform4iv Uniform4iv} - * - * @see Reference Page - */ - public static void glUniform4iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL20C.glUniform4iv(location, value); - } - - /** - * Array version of: {@link #glUniformMatrix2fv UniformMatrix2fv} - * - * @see Reference Page - */ - public static void glUniformMatrix2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL20C.glUniformMatrix2fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix3fv UniformMatrix3fv} - * - * @see Reference Page - */ - public static void glUniformMatrix3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL20C.glUniformMatrix3fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix4fv UniformMatrix4fv} - * - * @see Reference Page - */ - public static void glUniformMatrix4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL20C.glUniformMatrix4fv(location, transpose, value); - } - - /** - * Array version of: {@link #glGetShaderiv GetShaderiv} - * - * @see Reference Page - */ - public static void glGetShaderiv(@NativeType("GLuint") int shader, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL20C.glGetShaderiv(shader, pname, params); - } - - /** - * Array version of: {@link #glGetProgramiv GetProgramiv} - * - * @see Reference Page - */ - public static void glGetProgramiv(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL20C.glGetProgramiv(program, pname, params); - } - - /** - * Array version of: {@link #glGetShaderInfoLog GetShaderInfoLog} - * - * @see Reference Page - */ - public static void glGetShaderInfoLog(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL20C.glGetShaderInfoLog(shader, length, infoLog); - } - - /** - * Array version of: {@link #glGetProgramInfoLog GetProgramInfoLog} - * - * @see Reference Page - */ - public static void glGetProgramInfoLog(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL20C.glGetProgramInfoLog(program, length, infoLog); - } - - /** - * Array version of: {@link #glGetAttachedShaders GetAttachedShaders} - * - * @see Reference Page - */ - public static void glGetAttachedShaders(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") int[] count, @NativeType("GLuint *") int[] shaders) { - GL20C.glGetAttachedShaders(program, count, shaders); - } - - /** - * Array version of: {@link #glGetActiveUniform GetActiveUniform} - * - * @see Reference Page - */ - public static void glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - GL20C.glGetActiveUniform(program, index, length, size, type, name); - } - - /** - * Array version of: {@link #glGetUniformfv GetUniformfv} - * - * @see Reference Page - */ - public static void glGetUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) { - GL20C.glGetUniformfv(program, location, params); - } - - /** - * Array version of: {@link #glGetUniformiv GetUniformiv} - * - * @see Reference Page - */ - public static void glGetUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) { - GL20C.glGetUniformiv(program, location, params); - } - - /** - * Array version of: {@link #glGetShaderSource GetShaderSource} - * - * @see Reference Page - */ - public static void glGetShaderSource(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer source) { - GL20C.glGetShaderSource(shader, length, source); - } - - /** - * Array version of: {@link #glVertexAttrib1fv VertexAttrib1fv} - * - * @see Reference Page - */ - public static void glVertexAttrib1fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - GL20C.glVertexAttrib1fv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib1sv VertexAttrib1sv} - * - * @see Reference Page - */ - public static void glVertexAttrib1sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - GL20C.glVertexAttrib1sv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib1dv VertexAttrib1dv} - * - * @see Reference Page - */ - public static void glVertexAttrib1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL20C.glVertexAttrib1dv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib2fv VertexAttrib2fv} - * - * @see Reference Page - */ - public static void glVertexAttrib2fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - GL20C.glVertexAttrib2fv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib2sv VertexAttrib2sv} - * - * @see Reference Page - */ - public static void glVertexAttrib2sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - GL20C.glVertexAttrib2sv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib2dv VertexAttrib2dv} - * - * @see Reference Page - */ - public static void glVertexAttrib2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL20C.glVertexAttrib2dv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib3fv VertexAttrib3fv} - * - * @see Reference Page - */ - public static void glVertexAttrib3fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - GL20C.glVertexAttrib3fv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib3sv VertexAttrib3sv} - * - * @see Reference Page - */ - public static void glVertexAttrib3sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - GL20C.glVertexAttrib3sv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib3dv VertexAttrib3dv} - * - * @see Reference Page - */ - public static void glVertexAttrib3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL20C.glVertexAttrib3dv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4fv VertexAttrib4fv} - * - * @see Reference Page - */ - public static void glVertexAttrib4fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - GL20C.glVertexAttrib4fv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4sv VertexAttrib4sv} - * - * @see Reference Page - */ - public static void glVertexAttrib4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - GL20C.glVertexAttrib4sv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4dv VertexAttrib4dv} - * - * @see Reference Page - */ - public static void glVertexAttrib4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL20C.glVertexAttrib4dv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4iv VertexAttrib4iv} - * - * @see Reference Page - */ - public static void glVertexAttrib4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL20C.glVertexAttrib4iv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4usv VertexAttrib4usv} - * - * @see Reference Page - */ - public static void glVertexAttrib4usv(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - GL20C.glVertexAttrib4usv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4uiv VertexAttrib4uiv} - * - * @see Reference Page - */ - public static void glVertexAttrib4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - GL20C.glVertexAttrib4uiv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4Nsv VertexAttrib4Nsv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Nsv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - GL20C.glVertexAttrib4Nsv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4Niv VertexAttrib4Niv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Niv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL20C.glVertexAttrib4Niv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4Nusv VertexAttrib4Nusv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Nusv(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - GL20C.glVertexAttrib4Nusv(index, v); - } - - /** - * Array version of: {@link #glVertexAttrib4Nuiv VertexAttrib4Nuiv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Nuiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - GL20C.glVertexAttrib4Nuiv(index, v); - } - - /** - * Array version of: {@link #glGetActiveAttrib GetActiveAttrib} - * - * @see Reference Page - */ - public static void glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - GL20C.glGetActiveAttrib(program, index, length, size, type, name); - } - - /** - * Array version of: {@link #glGetVertexAttribiv GetVertexAttribiv} - * - * @see Reference Page - */ - public static void glGetVertexAttribiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL20C.glGetVertexAttribiv(index, pname, params); - } - - /** - * Array version of: {@link #glGetVertexAttribfv GetVertexAttribfv} - * - * @see Reference Page - */ - public static void glGetVertexAttribfv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL20C.glGetVertexAttribfv(index, pname, params); - } - - /** - * Array version of: {@link #glGetVertexAttribdv GetVertexAttribdv} - * - * @see Reference Page - */ - public static void glGetVertexAttribdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - GL20C.glGetVertexAttribdv(index, pname, params); - } - - /** - * Array version of: {@link #glDrawBuffers DrawBuffers} - * - * @see Reference Page - */ - public static void glDrawBuffers(@NativeType("GLenum const *") int[] bufs) { - GL20C.glDrawBuffers(bufs); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL20C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL20C.java deleted file mode 100644 index 4665de39..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL20C.java +++ /dev/null @@ -1,2963 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 2.0. - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL20C extends GL15C { - - static { GL.initialize(); } - - /** Accepted by the {@code name} parameter of GetString. */ - public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C; - - /** Accepted by the {@code pname} parameter of GetInteger. */ - public static final int GL_CURRENT_PROGRAM = 0x8B8D; - - /** Accepted by the {@code pname} parameter of GetShaderiv. */ - public static final int - GL_SHADER_TYPE = 0x8B4F, - GL_DELETE_STATUS = 0x8B80, - GL_COMPILE_STATUS = 0x8B81, - GL_LINK_STATUS = 0x8B82, - GL_VALIDATE_STATUS = 0x8B83, - GL_INFO_LOG_LENGTH = 0x8B84, - GL_ATTACHED_SHADERS = 0x8B85, - GL_ACTIVE_UNIFORMS = 0x8B86, - GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, - GL_ACTIVE_ATTRIBUTES = 0x8B89, - GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, - GL_SHADER_SOURCE_LENGTH = 0x8B88; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_FLOAT_VEC2 = 0x8B50, - GL_FLOAT_VEC3 = 0x8B51, - GL_FLOAT_VEC4 = 0x8B52, - GL_INT_VEC2 = 0x8B53, - GL_INT_VEC3 = 0x8B54, - GL_INT_VEC4 = 0x8B55, - GL_BOOL = 0x8B56, - GL_BOOL_VEC2 = 0x8B57, - GL_BOOL_VEC3 = 0x8B58, - GL_BOOL_VEC4 = 0x8B59, - GL_FLOAT_MAT2 = 0x8B5A, - GL_FLOAT_MAT3 = 0x8B5B, - GL_FLOAT_MAT4 = 0x8B5C, - GL_SAMPLER_1D = 0x8B5D, - GL_SAMPLER_2D = 0x8B5E, - GL_SAMPLER_3D = 0x8B5F, - GL_SAMPLER_CUBE = 0x8B60, - GL_SAMPLER_1D_SHADOW = 0x8B61, - GL_SAMPLER_2D_SHADOW = 0x8B62; - - /** Accepted by the {@code type} argument of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_VERTEX_SHADER = 0x8B31; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A, - GL_MAX_VARYING_FLOATS = 0x8B4B, - GL_MAX_VERTEX_ATTRIBS = 0x8869, - GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, - GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, - GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642; - - /** Accepted by the {@code pname} parameter of GetVertexAttrib{dfi}v. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622, - GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623, - GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624, - GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625, - GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A, - GL_CURRENT_VERTEX_ATTRIB = 0x8626; - - /** Accepted by the {@code pname} parameter of GetVertexAttribPointerv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; - - /** Accepted by the {@code type} argument of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_FRAGMENT_SHADER = 0x8B30; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; - - /** Accepted by the {@code target} parameter of Hint and the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_DRAW_BUFFERS = 0x8824, - GL_DRAW_BUFFER0 = 0x8825, - GL_DRAW_BUFFER1 = 0x8826, - GL_DRAW_BUFFER2 = 0x8827, - GL_DRAW_BUFFER3 = 0x8828, - GL_DRAW_BUFFER4 = 0x8829, - GL_DRAW_BUFFER5 = 0x882A, - GL_DRAW_BUFFER6 = 0x882B, - GL_DRAW_BUFFER7 = 0x882C, - GL_DRAW_BUFFER8 = 0x882D, - GL_DRAW_BUFFER9 = 0x882E, - GL_DRAW_BUFFER10 = 0x882F, - GL_DRAW_BUFFER11 = 0x8830, - GL_DRAW_BUFFER12 = 0x8831, - GL_DRAW_BUFFER13 = 0x8832, - GL_DRAW_BUFFER14 = 0x8833, - GL_DRAW_BUFFER15 = 0x8834; - - /** Accepted by the {@code pname} parameter of PointParameter{if}v. */ - public static final int GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0; - - /** Accepted by the {@code param} parameter of PointParameter{if}v. */ - public static final int - GL_LOWER_LEFT = 0x8CA1, - GL_UPPER_LEFT = 0x8CA2; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_BLEND_EQUATION_RGB = 0x8009, - GL_BLEND_EQUATION_ALPHA = 0x883D; - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int - GL_STENCIL_BACK_FUNC = 0x8800, - GL_STENCIL_BACK_FAIL = 0x8801, - GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802, - GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803, - GL_STENCIL_BACK_REF = 0x8CA3, - GL_STENCIL_BACK_VALUE_MASK = 0x8CA4, - GL_STENCIL_BACK_WRITEMASK = 0x8CA5; - - protected GL20C() { - throw new UnsupportedOperationException(); - } - - // --- [ glCreateProgram ] --- - - /** - * Creates a program object. - * - * @see Reference Page - */ - @NativeType("GLuint") - public static native int glCreateProgram(); - - // --- [ glDeleteProgram ] --- - - /** - * Deletes a program object. - * - * @param program the program object to be deleted - * - * @see Reference Page - */ - public static native void glDeleteProgram(@NativeType("GLuint") int program); - - // --- [ glIsProgram ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if {@code program} is the name of a program object. If {@code program} is zero, or a non-zero value that is not the name of a program - * object, IsProgram returns {@link GL11#GL_FALSE FALSE}. No error is generated if program is not a valid program object name. - * - * @param program the program object name to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsProgram(@NativeType("GLuint") int program); - - // --- [ glCreateShader ] --- - - /** - * Creates a shader object. - * - * @param type the type of shader to be created. One of:
    {@link #GL_VERTEX_SHADER VERTEX_SHADER}{@link #GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * - * @see Reference Page - */ - @NativeType("GLuint") - public static native int glCreateShader(@NativeType("GLenum") int type); - - // --- [ glDeleteShader ] --- - - /** - * Deletes a shader object. - * - * @param shader the shader object to be deleted - * - * @see Reference Page - */ - public static native void glDeleteShader(@NativeType("GLuint") int shader); - - // --- [ glIsShader ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if {@code shader} is the name of a shader object. If {@code shader} is zero, or a nonzero value that is not the name of a shader - * object, IsShader returns {@link GL11#GL_FALSE FALSE}. No error is generated if shader is not a valid shader object name. - * - * @param shader the shader object name to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsShader(@NativeType("GLuint") int shader); - - // --- [ glAttachShader ] --- - - /** - * Attaches a shader object to a program object. - * - *

    In order to create a complete shader program, there must be a way to specify the list of things that will be linked together. Program objects provide - * this mechanism. Shaders that are to be linked together in a program object must first be attached to that program object. glAttachShader attaches the - * shader object specified by shader to the program object specified by program. This indicates that shader will be included in link operations that will - * be performed on program.

    - * - *

    All operations that can be performed on a shader object are valid whether or not the shader object is attached to a program object. It is permissible to - * attach a shader object to a program object before source code has been loaded into the shader object or before the shader object has been compiled. It - * is permissible to attach multiple shader objects of the same type because each may contain a portion of the complete shader. It is also permissible to - * attach a shader object to more than one program object. If a shader object is deleted while it is attached to a program object, it will be flagged for - * deletion, and deletion will not occur until glDetachShader is called to detach it from all program objects to which it is attached.

    - * - * @param program the program object to which a shader object will be attached - * @param shader the shader object that is to be attached - * - * @see Reference Page - */ - public static native void glAttachShader(@NativeType("GLuint") int program, @NativeType("GLuint") int shader); - - // --- [ glDetachShader ] --- - - /** - * Detaches a shader object from a program object to which it is attached. - * - * @param program the program object from which to detach the shader object - * @param shader the shader object to be detached - * - * @see Reference Page - */ - public static native void glDetachShader(@NativeType("GLuint") int program, @NativeType("GLuint") int shader); - - // --- [ glShaderSource ] --- - - /** - * Unsafe version of: {@link #glShaderSource ShaderSource} - * - * @param count the number of elements in the string and length arrays - */ - public static native void nglShaderSource(int shader, int count, long strings, long length); - - /** - * Sets the source code in {@code shader} to the source code in the array of strings specified by {@code strings}. Any source code previously stored in the - * shader object is completely replaced. The number of strings in the array is specified by {@code count}. If {@code length} is {@code NULL}, each string is - * assumed to be null terminated. If {@code length} is a value other than {@code NULL}, it points to an array containing a string length for each of the - * corresponding elements of {@code strings}. Each element in the length array may contain the length of the corresponding string (the null character is not - * counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or - * parsed at this time; they are simply copied into the specified shader object. - * - * @param shader the shader object whose source code is to be replaced - * @param strings an array of pointers to strings containing the source code to be loaded into the shader - * @param length an array of string lengths - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") PointerBuffer strings, @Nullable @NativeType("GLint const *") IntBuffer length) { - if (CHECKS) { - checkSafe(length, strings.remaining()); - } - nglShaderSource(shader, strings.remaining(), memAddress(strings), memAddressSafe(length)); - } - - /** - * Sets the source code in {@code shader} to the source code in the array of strings specified by {@code strings}. Any source code previously stored in the - * shader object is completely replaced. The number of strings in the array is specified by {@code count}. If {@code length} is {@code NULL}, each string is - * assumed to be null terminated. If {@code length} is a value other than {@code NULL}, it points to an array containing a string length for each of the - * corresponding elements of {@code strings}. Each element in the length array may contain the length of the corresponding string (the null character is not - * counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or - * parsed at this time; they are simply copied into the specified shader object. - * - * @param shader the shader object whose source code is to be replaced - * @param strings an array of pointers to strings containing the source code to be loaded into the shader - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") CharSequence... strings) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long stringsAddress = APIUtil.apiArrayi(stack, MemoryUtil::memUTF8, strings); - nglShaderSource(shader, strings.length, stringsAddress, stringsAddress - (strings.length << 2)); - APIUtil.apiArrayFree(stringsAddress, strings.length); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Sets the source code in {@code shader} to the source code in the array of strings specified by {@code strings}. Any source code previously stored in the - * shader object is completely replaced. The number of strings in the array is specified by {@code count}. If {@code length} is {@code NULL}, each string is - * assumed to be null terminated. If {@code length} is a value other than {@code NULL}, it points to an array containing a string length for each of the - * corresponding elements of {@code strings}. Each element in the length array may contain the length of the corresponding string (the null character is not - * counted as part of the string length) or a value less than 0 to indicate that the string is null terminated. The source code strings are not scanned or - * parsed at this time; they are simply copied into the specified shader object. - * - * @param shader the shader object whose source code is to be replaced - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long stringsAddress = APIUtil.apiArrayi(stack, MemoryUtil::memUTF8, string); - nglShaderSource(shader, 1, stringsAddress, stringsAddress - 4); - APIUtil.apiArrayFree(stringsAddress, 1); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCompileShader ] --- - - /** - * Compiles a shader object. - * - * @param shader the shader object to be compiled - * - * @see Reference Page - */ - public static native void glCompileShader(@NativeType("GLuint") int shader); - - // --- [ glLinkProgram ] --- - - /** - * Links a program object. - * - * @param program the program object to be linked - * - * @see Reference Page - */ - public static native void glLinkProgram(@NativeType("GLuint") int program); - - // --- [ glUseProgram ] --- - - /** - * Installs a program object as part of current rendering state. - * - * @param program the program object whose executables are to be used as part of current rendering state - * - * @see Reference Page - */ - public static native void glUseProgram(@NativeType("GLuint") int program); - - // --- [ glValidateProgram ] --- - - /** - * Validates a program object. - * - * @param program the program object to be validated - * - * @see Reference Page - */ - public static native void glValidateProgram(@NativeType("GLuint") int program); - - // --- [ glUniform1f ] --- - - /** - * Specifies the value of a float uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform value - * - * @see Reference Page - */ - public static native void glUniform1f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0); - - // --- [ glUniform2f ] --- - - /** - * Specifies the value of a vec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * - * @see Reference Page - */ - public static native void glUniform2f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1); - - // --- [ glUniform3f ] --- - - /** - * Specifies the value of a vec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * - * @see Reference Page - */ - public static native void glUniform3f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2); - - // --- [ glUniform4f ] --- - - /** - * Specifies the value of a vec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - * - * @see Reference Page - */ - public static native void glUniform4f(@NativeType("GLint") int location, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3); - - // --- [ glUniform1i ] --- - - /** - * Specifies the value of an int uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform value - * - * @see Reference Page - */ - public static native void glUniform1i(@NativeType("GLint") int location, @NativeType("GLint") int v0); - - // --- [ glUniform2i ] --- - - /** - * Specifies the value of an ivec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * - * @see Reference Page - */ - public static native void glUniform2i(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1); - - // --- [ glUniform3i ] --- - - /** - * Specifies the value of an ivec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * - * @see Reference Page - */ - public static native void glUniform3i(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2); - - // --- [ glUniform4i ] --- - - /** - * Specifies the value of an ivec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - * - * @see Reference Page - */ - public static native void glUniform4i(@NativeType("GLint") int location, @NativeType("GLint") int v0, @NativeType("GLint") int v1, @NativeType("GLint") int v2, @NativeType("GLint") int v3); - - // --- [ glUniform1fv ] --- - - /** - * Unsafe version of: {@link #glUniform1fv Uniform1fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform1fv(int location, int count, long value); - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform1fv(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2fv ] --- - - /** - * Unsafe version of: {@link #glUniform2fv Uniform2fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform2fv(int location, int count, long value); - - /** - * Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform2fv(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3fv ] --- - - /** - * Unsafe version of: {@link #glUniform3fv Uniform3fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform3fv(int location, int count, long value); - - /** - * Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform3fv(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4fv ] --- - - /** - * Unsafe version of: {@link #glUniform4fv Uniform4fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform4fv(int location, int count, long value); - - /** - * Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniform4fv(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glUniform1iv ] --- - - /** - * Unsafe version of: {@link #glUniform1iv Uniform1iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform1iv(int location, int count, long value); - - /** - * Specifies the value of a single int uniform variable or a int uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform1iv(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2iv ] --- - - /** - * Unsafe version of: {@link #glUniform2iv Uniform2iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform2iv(int location, int count, long value); - - /** - * Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform2iv(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3iv ] --- - - /** - * Unsafe version of: {@link #glUniform3iv Uniform3iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform3iv(int location, int count, long value); - - /** - * Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform3iv(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4iv ] --- - - /** - * Unsafe version of: {@link #glUniform4iv Uniform4iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform4iv(int location, int count, long value); - - /** - * Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4iv(@NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglUniform4iv(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glUniformMatrix2fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2fv UniformMatrix2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix2fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat2 uniform variable or a mat2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix2fv(location, value.remaining() >> 2, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix3fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3fv UniformMatrix3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix3fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix3fv(location, value.remaining() / 9, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix4fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4fv UniformMatrix4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix4fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix4fv(location, value.remaining() >> 4, transpose, memAddress(value)); - } - - // --- [ glGetShaderiv ] --- - - /** Unsafe version of: {@link #glGetShaderiv GetShaderiv} */ - public static native void nglGetShaderiv(int shader, int pname, long params); - - /** - * Returns a parameter from a shader object. - * - * @param shader the shader object to be queried - * @param pname the object parameter. One of:
    {@link #GL_SHADER_TYPE SHADER_TYPE}{@link #GL_DELETE_STATUS DELETE_STATUS}{@link #GL_COMPILE_STATUS COMPILE_STATUS}{@link #GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link #GL_SHADER_SOURCE_LENGTH SHADER_SOURCE_LENGTH}
    - * @param params the requested object parameter - * - * @see Reference Page - */ - public static void glGetShaderiv(@NativeType("GLuint") int shader, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetShaderiv(shader, pname, memAddress(params)); - } - - /** - * Returns a parameter from a shader object. - * - * @param shader the shader object to be queried - * @param pname the object parameter. One of:
    {@link #GL_SHADER_TYPE SHADER_TYPE}{@link #GL_DELETE_STATUS DELETE_STATUS}{@link #GL_COMPILE_STATUS COMPILE_STATUS}{@link #GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link #GL_SHADER_SOURCE_LENGTH SHADER_SOURCE_LENGTH}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetShaderi(@NativeType("GLuint") int shader, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetShaderiv(shader, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetProgramiv ] --- - - /** Unsafe version of: {@link #glGetProgramiv GetProgramiv} */ - public static native void nglGetProgramiv(int program, int pname, long params); - - /** - * Returns a parameter from a program object. - * - * @param program the program object to be queried - * @param pname the object parameter. One of:
    {@link #GL_DELETE_STATUS DELETE_STATUS}{@link #GL_LINK_STATUS LINK_STATUS}{@link #GL_VALIDATE_STATUS VALIDATE_STATUS}
    {@link #GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link #GL_ATTACHED_SHADERS ATTACHED_SHADERS}{@link #GL_ACTIVE_ATTRIBUTES ACTIVE_ATTRIBUTES}
    {@link #GL_ACTIVE_ATTRIBUTE_MAX_LENGTH ACTIVE_ATTRIBUTE_MAX_LENGTH}{@link #GL_ACTIVE_UNIFORMS ACTIVE_UNIFORMS}{@link #GL_ACTIVE_UNIFORM_MAX_LENGTH ACTIVE_UNIFORM_MAX_LENGTH}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_MODE TRANSFORM_FEEDBACK_BUFFER_MODE}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYINGS TRANSFORM_FEEDBACK_VARYINGS}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH}
    {@link GL31#GL_ACTIVE_UNIFORM_BLOCKS ACTIVE_UNIFORM_BLOCKS}{@link GL31#GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH}{@link GL32#GL_GEOMETRY_VERTICES_OUT GEOMETRY_VERTICES_OUT}
    {@link GL32#GL_GEOMETRY_INPUT_TYPE GEOMETRY_INPUT_TYPE}{@link GL32#GL_GEOMETRY_OUTPUT_TYPE GEOMETRY_OUTPUT_TYPE}{@link GL41#GL_PROGRAM_BINARY_LENGTH PROGRAM_BINARY_LENGTH}
    {@link GL42#GL_ACTIVE_ATOMIC_COUNTER_BUFFERS ACTIVE_ATOMIC_COUNTER_BUFFERS}{@link GL43#GL_COMPUTE_WORK_GROUP_SIZE COMPUTE_WORK_GROUP_SIZE}
    - * @param params the requested object parameter - * - * @see Reference Page - */ - public static void glGetProgramiv(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetProgramiv(program, pname, memAddress(params)); - } - - /** - * Returns a parameter from a program object. - * - * @param program the program object to be queried - * @param pname the object parameter. One of:
    {@link #GL_DELETE_STATUS DELETE_STATUS}{@link #GL_LINK_STATUS LINK_STATUS}{@link #GL_VALIDATE_STATUS VALIDATE_STATUS}
    {@link #GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link #GL_ATTACHED_SHADERS ATTACHED_SHADERS}{@link #GL_ACTIVE_ATTRIBUTES ACTIVE_ATTRIBUTES}
    {@link #GL_ACTIVE_ATTRIBUTE_MAX_LENGTH ACTIVE_ATTRIBUTE_MAX_LENGTH}{@link #GL_ACTIVE_UNIFORMS ACTIVE_UNIFORMS}{@link #GL_ACTIVE_UNIFORM_MAX_LENGTH ACTIVE_UNIFORM_MAX_LENGTH}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_MODE TRANSFORM_FEEDBACK_BUFFER_MODE}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYINGS TRANSFORM_FEEDBACK_VARYINGS}{@link GL30#GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH}
    {@link GL31#GL_ACTIVE_UNIFORM_BLOCKS ACTIVE_UNIFORM_BLOCKS}{@link GL31#GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH}{@link GL32#GL_GEOMETRY_VERTICES_OUT GEOMETRY_VERTICES_OUT}
    {@link GL32#GL_GEOMETRY_INPUT_TYPE GEOMETRY_INPUT_TYPE}{@link GL32#GL_GEOMETRY_OUTPUT_TYPE GEOMETRY_OUTPUT_TYPE}{@link GL41#GL_PROGRAM_BINARY_LENGTH PROGRAM_BINARY_LENGTH}
    {@link GL42#GL_ACTIVE_ATOMIC_COUNTER_BUFFERS ACTIVE_ATOMIC_COUNTER_BUFFERS}{@link GL43#GL_COMPUTE_WORK_GROUP_SIZE COMPUTE_WORK_GROUP_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgrami(@NativeType("GLuint") int program, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetProgramiv(program, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetShaderInfoLog ] --- - - /** - * Unsafe version of: {@link #glGetShaderInfoLog GetShaderInfoLog} - * - * @param maxLength the size of the character buffer for storing the returned information log - */ - public static native void nglGetShaderInfoLog(int shader, int maxLength, long length, long infoLog); - - /** - * Returns the information log for a shader object. - * - * @param shader the shader object whose information log is to be queried - * @param length the length of the string returned in {@code infoLog} (excluding the null terminator) - * @param infoLog an array of characters that is used to return the information log - * - * @see Reference Page - */ - public static void glGetShaderInfoLog(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetShaderInfoLog(shader, infoLog.remaining(), memAddressSafe(length), memAddress(infoLog)); - } - - /** - * Returns the information log for a shader object. - * - * @param shader the shader object whose information log is to be queried - * @param maxLength the size of the character buffer for storing the returned information log - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderInfoLog(@NativeType("GLuint") int shader, @NativeType("GLsizei") int maxLength) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - ByteBuffer infoLog = memAlloc(maxLength); - try { - IntBuffer length = stack.ints(0); - nglGetShaderInfoLog(shader, maxLength, memAddress(length), memAddress(infoLog)); - return memUTF8(infoLog, length.get(0)); - } finally { - memFree(infoLog); - stack.setPointer(stackPointer); - } - } - - /** - * Returns the information log for a shader object. - * - * @param shader the shader object whose information log is to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderInfoLog(@NativeType("GLuint") int shader) { - return glGetShaderInfoLog(shader, glGetShaderi(shader, GL_INFO_LOG_LENGTH)); - } - - // --- [ glGetProgramInfoLog ] --- - - /** - * Unsafe version of: {@link #glGetProgramInfoLog GetProgramInfoLog} - * - * @param maxLength the size of the character buffer for storing the returned information log - */ - public static native void nglGetProgramInfoLog(int program, int maxLength, long length, long infoLog); - - /** - * Returns the information log for a program object. - * - * @param program the program object whose information log is to be queried - * @param length the length of the string returned in {@code infoLog} (excluding the null terminator) - * @param infoLog an array of characters that is used to return the information log - * - * @see Reference Page - */ - public static void glGetProgramInfoLog(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetProgramInfoLog(program, infoLog.remaining(), memAddressSafe(length), memAddress(infoLog)); - } - - /** - * Returns the information log for a program object. - * - * @param program the program object whose information log is to be queried - * @param maxLength the size of the character buffer for storing the returned information log - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramInfoLog(@NativeType("GLuint") int program, @NativeType("GLsizei") int maxLength) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - ByteBuffer infoLog = memAlloc(maxLength); - try { - IntBuffer length = stack.ints(0); - nglGetProgramInfoLog(program, maxLength, memAddress(length), memAddress(infoLog)); - return memUTF8(infoLog, length.get(0)); - } finally { - memFree(infoLog); - stack.setPointer(stackPointer); - } - } - - /** - * Returns the information log for a program object. - * - * @param program the program object whose information log is to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramInfoLog(@NativeType("GLuint") int program) { - return glGetProgramInfoLog(program, glGetProgrami(program, GL_INFO_LOG_LENGTH)); - } - - // --- [ glGetAttachedShaders ] --- - - /** - * Unsafe version of: {@link #glGetAttachedShaders GetAttachedShaders} - * - * @param maxCount the size of the array for storing the returned object names - */ - public static native void nglGetAttachedShaders(int program, int maxCount, long count, long shaders); - - /** - * Returns the shader objects attached to a program object. - * - * @param program the program object to be queried - * @param count the number of names actually returned in {@code shaders} - * @param shaders an array that is used to return the names of attached shader objects - * - * @see Reference Page - */ - public static void glGetAttachedShaders(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") IntBuffer count, @NativeType("GLuint *") IntBuffer shaders) { - if (CHECKS) { - checkSafe(count, 1); - } - nglGetAttachedShaders(program, shaders.remaining(), memAddressSafe(count), memAddress(shaders)); - } - - // --- [ glGetUniformLocation ] --- - - /** Unsafe version of: {@link #glGetUniformLocation GetUniformLocation} */ - public static native int nglGetUniformLocation(int program, long name); - - /** - * Returns the location of a uniform variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the uniform variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetUniformLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetUniformLocation(program, memAddress(name)); - } - - /** - * Returns the location of a uniform variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the uniform variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetUniformLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetUniformLocation(program, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveUniform ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniform GetActiveUniform} - * - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - */ - public static native void nglGetActiveUniform(int program, int index, int maxLength, long length, long size, long type, long name); - - /** - * Returns information about an active uniform variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the uniform variable to be queried - * @param length the number of characters actually written by OpenGL in the string indicated by {@code name} (excluding the null terminator) if a value other than NULL is passed - * @param size the size of the uniform variable - * @param type the data type of the uniform variable - * @param name a null terminated string containing the name of the uniform variable - * - * @see Reference Page - */ - public static void glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - nglGetActiveUniform(program, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); - } - - /** - * Returns information about an active uniform variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the uniform variable to be queried - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - * @param size the size of the uniform variable - * @param type the data type of the uniform variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei") int maxLength, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - if (CHECKS) { - check(size, 1); - check(type, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(maxLength); - nglGetActiveUniform(program, index, maxLength, memAddress(length), memAddress(size), memAddress(type), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Returns information about an active uniform variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the uniform variable to be queried - * @param size the size of the uniform variable - * @param type the data type of the uniform variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetActiveUniform(program, index, glGetProgrami(program, GL_ACTIVE_UNIFORM_MAX_LENGTH), size, type); - } - - // --- [ glGetUniformfv ] --- - - /** Unsafe version of: {@link #glGetUniformfv GetUniformfv} */ - public static native void nglGetUniformfv(int program, int location, long params); - - /** - * Returns the float value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformfv(program, location, memAddress(params)); - } - - /** - * Returns the float value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetUniformf(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetUniformfv(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetUniformiv ] --- - - /** Unsafe version of: {@link #glGetUniformiv GetUniformiv} */ - public static native void nglGetUniformiv(int program, int location, long params); - - /** - * Returns the int value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformiv(program, location, memAddress(params)); - } - - /** - * Returns the int value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetUniformiv(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetShaderSource ] --- - - /** - * Unsafe version of: {@link #glGetShaderSource GetShaderSource} - * - * @param maxLength the size of the character buffer for storing the returned source code string - */ - public static native void nglGetShaderSource(int shader, int maxLength, long length, long source); - - /** - * Returns the source code string from a shader object. - * - * @param shader the shader object to be queried - * @param length the length of the string returned in source (excluding the null terminator) - * @param source an array of characters that is used to return the source code string - * - * @see Reference Page - */ - public static void glGetShaderSource(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer source) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetShaderSource(shader, source.remaining(), memAddressSafe(length), memAddress(source)); - } - - /** - * Returns the source code string from a shader object. - * - * @param shader the shader object to be queried - * @param maxLength the size of the character buffer for storing the returned source code string - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderSource(@NativeType("GLuint") int shader, @NativeType("GLsizei") int maxLength) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - ByteBuffer source = memAlloc(maxLength); - try { - IntBuffer length = stack.ints(0); - nglGetShaderSource(shader, maxLength, memAddress(length), memAddress(source)); - return memUTF8(source, length.get(0)); - } finally { - memFree(source); - stack.setPointer(stackPointer); - } - } - - /** - * Returns the source code string from a shader object. - * - * @param shader the shader object to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetShaderSource(@NativeType("GLuint") int shader) { - return glGetShaderSource(shader, glGetShaderi(shader, GL_SHADER_SOURCE_LENGTH)); - } - - // --- [ glVertexAttrib1f ] --- - - /** - * Specifies the value of a generic vertex attribute. The y and z components are implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * - * @see Reference Page - */ - public static native void glVertexAttrib1f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0); - - // --- [ glVertexAttrib1s ] --- - - /** - * Short version of {@link #glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * - * @see Reference Page - */ - public static native void glVertexAttrib1s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0); - - // --- [ glVertexAttrib1d ] --- - - /** - * Double version of {@link #glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * - * @see Reference Page - */ - public static native void glVertexAttrib1d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0); - - // --- [ glVertexAttrib2f ] --- - - /** - * Specifies the value of a generic vertex attribute. The y component is implicitly set to 0.0f and w to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * - * @see Reference Page - */ - public static native void glVertexAttrib2f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1); - - // --- [ glVertexAttrib2s ] --- - - /** - * Short version of {@link #glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * - * @see Reference Page - */ - public static native void glVertexAttrib2s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1); - - // --- [ glVertexAttrib2d ] --- - - /** - * Double version of {@link #glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * - * @see Reference Page - */ - public static native void glVertexAttrib2d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1); - - // --- [ glVertexAttrib3f ] --- - - /** - * Specifies the value of a generic vertex attribute. The w is implicitly set to 1.0f. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * - * @see Reference Page - */ - public static native void glVertexAttrib3f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2); - - // --- [ glVertexAttrib3s ] --- - - /** - * Short version of {@link #glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * - * @see Reference Page - */ - public static native void glVertexAttrib3s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2); - - // --- [ glVertexAttrib3d ] --- - - /** - * Double version of {@link #glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * - * @see Reference Page - */ - public static native void glVertexAttrib3d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2); - - // --- [ glVertexAttrib4f ] --- - - /** - * Specifies the value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - * - * @see Reference Page - */ - public static native void glVertexAttrib4f(@NativeType("GLuint") int index, @NativeType("GLfloat") float v0, @NativeType("GLfloat") float v1, @NativeType("GLfloat") float v2, @NativeType("GLfloat") float v3); - - // --- [ glVertexAttrib4s ] --- - - /** - * Short version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - * - * @see Reference Page - */ - public static native void glVertexAttrib4s(@NativeType("GLuint") int index, @NativeType("GLshort") short v0, @NativeType("GLshort") short v1, @NativeType("GLshort") short v2, @NativeType("GLshort") short v3); - - // --- [ glVertexAttrib4d ] --- - - /** - * Double version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v0 the vertex attribute x component - * @param v1 the vertex attribute y component - * @param v2 the vertex attribute z component - * @param v3 the vertex attribute w component - * - * @see Reference Page - */ - public static native void glVertexAttrib4d(@NativeType("GLuint") int index, @NativeType("GLdouble") double v0, @NativeType("GLdouble") double v1, @NativeType("GLdouble") double v2, @NativeType("GLdouble") double v3); - - // --- [ glVertexAttrib4Nub ] --- - - /** - * Normalized unsigned byte version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static native void glVertexAttrib4Nub(@NativeType("GLuint") int index, @NativeType("GLubyte") byte x, @NativeType("GLubyte") byte y, @NativeType("GLubyte") byte z, @NativeType("GLubyte") byte w); - - // --- [ glVertexAttrib1fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib1fv VertexAttrib1fv} */ - public static native void nglVertexAttrib1fv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib1fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttrib1fv(index, memAddress(v)); - } - - // --- [ glVertexAttrib1sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib1sv VertexAttrib1sv} */ - public static native void nglVertexAttrib1sv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib1s VertexAttrib1s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib1sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttrib1sv(index, memAddress(v)); - } - - // --- [ glVertexAttrib1dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib1dv VertexAttrib1dv} */ - public static native void nglVertexAttrib1dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib1d VertexAttrib1d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttrib1dv(index, memAddress(v)); - } - - // --- [ glVertexAttrib2fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib2fv VertexAttrib2fv} */ - public static native void nglVertexAttrib2fv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib2fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttrib2fv(index, memAddress(v)); - } - - // --- [ glVertexAttrib2sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib2sv VertexAttrib2sv} */ - public static native void nglVertexAttrib2sv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib2s VertexAttrib2s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib2sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttrib2sv(index, memAddress(v)); - } - - // --- [ glVertexAttrib2dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib2dv VertexAttrib2dv} */ - public static native void nglVertexAttrib2dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib2d VertexAttrib2d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttrib2dv(index, memAddress(v)); - } - - // --- [ glVertexAttrib3fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib3fv VertexAttrib3fv} */ - public static native void nglVertexAttrib3fv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib3fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttrib3fv(index, memAddress(v)); - } - - // --- [ glVertexAttrib3sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib3sv VertexAttrib3sv} */ - public static native void nglVertexAttrib3sv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib3s VertexAttrib3s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib3sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttrib3sv(index, memAddress(v)); - } - - // --- [ glVertexAttrib3dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib3dv VertexAttrib3dv} */ - public static native void nglVertexAttrib3dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib3d VertexAttrib3d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttrib3dv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4fv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4fv VertexAttrib4fv} */ - public static native void nglVertexAttrib4fv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4fv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4sv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4sv VertexAttrib4sv} */ - public static native void nglVertexAttrib4sv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4s VertexAttrib4s}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4sv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4dv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4dv VertexAttrib4dv} */ - public static native void nglVertexAttrib4dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4d VertexAttrib4d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4dv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4iv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4iv VertexAttrib4iv} */ - public static native void nglVertexAttrib4iv(int index, long v); - - /** - * Integer pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4iv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4bv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4bv VertexAttrib4bv} */ - public static native void nglVertexAttrib4bv(int index, long v); - - /** - * Byte pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4bv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4bv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4ubv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4ubv VertexAttrib4ubv} */ - public static native void nglVertexAttrib4ubv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttrib4Nub VertexAttrib4Nub}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4ubv(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4ubv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4usv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4usv VertexAttrib4usv} */ - public static native void nglVertexAttrib4usv(int index, long v); - - /** - * Unsigned short pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4usv(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4usv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4uiv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4uiv VertexAttrib4uiv} */ - public static native void nglVertexAttrib4uiv(int index, long v); - - /** - * Unsigned int pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4uiv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4Nbv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nbv VertexAttrib4Nbv} */ - public static native void nglVertexAttrib4Nbv(int index, long v); - - /** - * Normalized byte pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nbv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4Nbv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4Nsv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nsv VertexAttrib4Nsv} */ - public static native void nglVertexAttrib4Nsv(int index, long v); - - /** - * Normalized short pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nsv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4Nsv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4Niv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Niv VertexAttrib4Niv} */ - public static native void nglVertexAttrib4Niv(int index, long v); - - /** - * Normalized int pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Niv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4Niv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4Nubv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nubv VertexAttrib4Nubv} */ - public static native void nglVertexAttrib4Nubv(int index, long v); - - /** - * Normalized unsigned byte pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nubv(@NativeType("GLuint") int index, @NativeType("GLubyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4Nubv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4Nusv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nusv VertexAttrib4Nusv} */ - public static native void nglVertexAttrib4Nusv(int index, long v); - - /** - * Normalized unsigned short pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nusv(@NativeType("GLuint") int index, @NativeType("GLushort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4Nusv(index, memAddress(v)); - } - - // --- [ glVertexAttrib4Nuiv ] --- - - /** Unsafe version of: {@link #glVertexAttrib4Nuiv VertexAttrib4Nuiv} */ - public static native void nglVertexAttrib4Nuiv(int index, long v); - - /** - * Normalized unsigned int pointer version of {@link #glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttrib4Nuiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4Nuiv(index, memAddress(v)); - } - - // --- [ glVertexAttribPointer ] --- - - /** Unsafe version of: {@link #glVertexAttribPointer VertexAttribPointer} */ - public static native void nglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long pointer); - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglVertexAttribPointer(index, size, type, normalized, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglVertexAttribPointer(index, size, type, normalized, stride, pointer); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglVertexAttribPointer(index, size, type, normalized, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglVertexAttribPointer(index, size, type, normalized, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. The initial value is GL_FLOAT. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL11#GL_DOUBLE DOUBLE}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}{@link GL33#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL41#GL_FIXED FIXED}
    - * @param normalized whether fixed-point data values should be normalized or converted directly as fixed-point values when they are accessed - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride, @NativeType("void const *") FloatBuffer pointer) { - nglVertexAttribPointer(index, size, type, normalized, stride, memAddress(pointer)); - } - - // --- [ glEnableVertexAttribArray ] --- - - /** - * Enables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be enabled - * - * @see Reference Page - */ - public static native void glEnableVertexAttribArray(@NativeType("GLuint") int index); - - // --- [ glDisableVertexAttribArray ] --- - - /** - * Disables a generic vertex attribute array. - * - * @param index the index of the generic vertex attribute to be disabled - * - * @see Reference Page - */ - public static native void glDisableVertexAttribArray(@NativeType("GLuint") int index); - - // --- [ glBindAttribLocation ] --- - - /** Unsafe version of: {@link #glBindAttribLocation BindAttribLocation} */ - public static native void nglBindAttribLocation(int program, int index, long name); - - /** - * Associates a generic vertex attribute index with a named attribute variable. - * - * @param program the program object in which the association is to be made - * @param index the index of the generic vertex attribute to be bound - * @param name a null terminated string containing the name of the vertex shader attribute variable to which {@code index} is to be bound - * - * @see Reference Page - */ - public static void glBindAttribLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - nglBindAttribLocation(program, index, memAddress(name)); - } - - /** - * Associates a generic vertex attribute index with a named attribute variable. - * - * @param program the program object in which the association is to be made - * @param index the index of the generic vertex attribute to be bound - * @param name a null terminated string containing the name of the vertex shader attribute variable to which {@code index} is to be bound - * - * @see Reference Page - */ - public static void glBindAttribLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - nglBindAttribLocation(program, index, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveAttrib ] --- - - /** - * Unsafe version of: {@link #glGetActiveAttrib GetActiveAttrib} - * - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - */ - public static native void nglGetActiveAttrib(int program, int index, int maxLength, long length, long size, long type, long name); - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the attribute variable to be queried - * @param length the number of characters actually written by OpenGL in the string indicated by {@code name} (excluding the null terminator) if a value other than - * {@code NULL} is passed - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - * @param name a null terminated string containing the name of the attribute variable - * - * @see Reference Page - */ - public static void glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - nglGetActiveAttrib(program, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); - } - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the attribute variable to be queried - * @param maxLength the maximum number of characters OpenGL is allowed to write in the character buffer indicated by {@code name} - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei") int maxLength, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - if (CHECKS) { - check(size, 1); - check(type, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(maxLength); - nglGetActiveAttrib(program, index, maxLength, memAddress(length), memAddress(size), memAddress(type), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Returns information about an active attribute variable for the specified program object. - * - * @param program the program object to be queried - * @param index the index of the attribute variable to be queried - * @param size the size of the attribute variable - * @param type the data type of the attribute variable - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetActiveAttrib(program, index, glGetProgrami(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH), size, type); - } - - // --- [ glGetAttribLocation ] --- - - /** Unsafe version of: {@link #glGetAttribLocation GetAttribLocation} */ - public static native int nglGetAttribLocation(int program, long name); - - /** - * Returns the location of an attribute variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the attribute variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetAttribLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetAttribLocation(program, memAddress(name)); - } - - /** - * Returns the location of an attribute variable. - * - * @param program the program object to be queried - * @param name a null terminated string containing the name of the attribute variable whose location is to be queried - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetAttribLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetAttribLocation(program, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexAttribiv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribiv GetVertexAttribiv} */ - public static native void nglGetVertexAttribiv(int index, int pname, long params); - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link #GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}
    {@link #GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE}{@link #GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}
    {@link #GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}{@link #GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}
    {@link #GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetVertexAttribiv(index, pname, memAddress(params)); - } - - /** - * Returns the integer value of a generic vertex attribute parameter. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried. One of:
    {@link GL15#GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING VERTEX_ATTRIB_ARRAY_BUFFER_BINDING}{@link #GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}
    {@link #GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE}{@link #GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}
    {@link #GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}{@link #GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}
    {@link #GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexAttribi(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetVertexAttribiv(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexAttribfv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribfv GetVertexAttribfv} */ - public static native void nglGetVertexAttribfv(int index, int pname, long params); - - /** - * Float version of {@link #glGetVertexAttribiv GetVertexAttribiv}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribfv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribfv(index, pname, memAddress(params)); - } - - // --- [ glGetVertexAttribdv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribdv GetVertexAttribdv} */ - public static native void nglGetVertexAttribdv(int index, int pname, long params); - - /** - * Double version of {@link #glGetVertexAttribiv GetVertexAttribiv}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribdv(index, pname, memAddress(params)); - } - - // --- [ glGetVertexAttribPointerv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribPointerv GetVertexAttribPointerv} */ - public static native void nglGetVertexAttribPointerv(int index, int pname, long pointer); - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link #GL_VERTEX_ATTRIB_ARRAY_POINTER VERTEX_ATTRIB_ARRAY_POINTER}
    - * @param pointer the pointer value - * - * @see Reference Page - */ - public static void glGetVertexAttribPointerv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer pointer) { - if (CHECKS) { - check(pointer, 1); - } - nglGetVertexAttribPointerv(index, pname, memAddress(pointer)); - } - - /** - * Returns the address of the specified generic vertex attribute pointer. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the generic vertex attribute parameter to be returned. Must be:
    {@link #GL_VERTEX_ATTRIB_ARRAY_POINTER VERTEX_ATTRIB_ARRAY_POINTER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetVertexAttribPointer(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer pointer = stack.callocPointer(1); - nglGetVertexAttribPointerv(index, pname, memAddress(pointer)); - return pointer.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDrawBuffers ] --- - - /** - * Unsafe version of: {@link #glDrawBuffers DrawBuffers} - * - * @param n the number of buffers in {@code bufs} - */ - public static native void nglDrawBuffers(int n, long bufs); - - /** - * Specifies a list of color buffers to be drawn into. - * - * @param bufs an array of symbolic constants specifying the buffers into which fragment colors or data values will be written. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}
    GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glDrawBuffers(@NativeType("GLenum const *") IntBuffer bufs) { - nglDrawBuffers(bufs.remaining(), memAddress(bufs)); - } - - /** - * Specifies a list of color buffers to be drawn into. - * - * @see Reference Page - */ - public static void glDrawBuffers(@NativeType("GLenum const *") int buf) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer bufs = stack.ints(buf); - nglDrawBuffers(1, memAddress(bufs)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glBlendEquationSeparate ] --- - - /** - * Sets the RGB blend equation and the alpha blend equation separately. - * - * @param modeRGB the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * @param modeAlpha the alpha blend equation, how the alpha component of the source and destination colors are combined - * - * @see Reference Page - */ - public static native void glBlendEquationSeparate(@NativeType("GLenum") int modeRGB, @NativeType("GLenum") int modeAlpha); - - // --- [ glStencilOpSeparate ] --- - - /** - * Sets front and/or back stencil test actions. - * - * @param face whether front and/or back stencil state is updated. One of:
    {@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param sfail the action to take when the stencil test fails. The initial value is GL_KEEP. One of:
    {@link GL11#GL_KEEP KEEP}{@link GL11#GL_ZERO ZERO}{@link GL11#GL_REPLACE REPLACE}{@link GL11#GL_INCR INCR}{@link GL14#GL_INCR_WRAP INCR_WRAP}{@link GL11#GL_DECR DECR}{@link GL14#GL_DECR_WRAP DECR_WRAP}{@link GL11#GL_INVERT INVERT}
    - * @param dpfail the stencil action when the stencil test passes, but the depth test fails. The initial value is GL_KEEP - * @param dppass the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth - * testing is not enabled. The initial value is GL_KEEP - * - * @see Reference Page - */ - public static native void glStencilOpSeparate(@NativeType("GLenum") int face, @NativeType("GLenum") int sfail, @NativeType("GLenum") int dpfail, @NativeType("GLenum") int dppass); - - // --- [ glStencilFuncSeparate ] --- - - /** - * Sets front and/or back function and reference value for stencil testing. - * - * @param face whether front and/or back stencil state is updated. One of:
    {@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param func the test function. The initial value is GL_ALWAYS. One of:
    {@link GL11#GL_NEVER NEVER}{@link GL11#GL_LESS LESS}{@link GL11#GL_LEQUAL LEQUAL}{@link GL11#GL_GREATER GREATER}{@link GL11#GL_GEQUAL GEQUAL}{@link GL11#GL_EQUAL EQUAL}{@link GL11#GL_NOTEQUAL NOTEQUAL}{@link GL11#GL_ALWAYS ALWAYS}
    - * @param ref the reference value for the stencil test. {@code ref} is clamped to the range [0, 2n – 1], where {@code n} is the number of bitplanes in the stencil - * buffer. The initial value is 0. - * @param mask a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's. - * - * @see Reference Page - */ - public static native void glStencilFuncSeparate(@NativeType("GLenum") int face, @NativeType("GLenum") int func, @NativeType("GLint") int ref, @NativeType("GLuint") int mask); - - // --- [ glStencilMaskSeparate ] --- - - /** - * Controls the front and/or back writing of individual bits in the stencil planes. - * - * @param face whether front and/or back stencil writemask is updated. One of:
    {@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}
    - * @param mask a bit mask to enable and disable writing of individual bits in the stencil planes. Initially, the mask is all 1's. - * - * @see Reference Page - */ - public static native void glStencilMaskSeparate(@NativeType("GLenum") int face, @NativeType("GLuint") int mask); - - /** - * Array version of: {@link #glShaderSource ShaderSource} - * - * @see Reference Page - */ - public static void glShaderSource(@NativeType("GLuint") int shader, @NativeType("GLchar const * const *") PointerBuffer strings, @Nullable @NativeType("GLint const *") int[] length) { - long __functionAddress = GL.getICD().glShaderSource; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, strings.remaining()); - } - callPPV(shader, strings.remaining(), memAddress(strings), length, __functionAddress); - } - - /** - * Array version of: {@link #glUniform1fv Uniform1fv} - * - * @see Reference Page - */ - public static void glUniform1fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform1fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform2fv Uniform2fv} - * - * @see Reference Page - */ - public static void glUniform2fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform3fv Uniform3fv} - * - * @see Reference Page - */ - public static void glUniform3fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform4fv Uniform4fv} - * - * @see Reference Page - */ - public static void glUniform4fv(@NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniform4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform1iv Uniform1iv} - * - * @see Reference Page - */ - public static void glUniform1iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform1iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform2iv Uniform2iv} - * - * @see Reference Page - */ - public static void glUniform2iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform2iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform3iv Uniform3iv} - * - * @see Reference Page - */ - public static void glUniform3iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform3iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform4iv Uniform4iv} - * - * @see Reference Page - */ - public static void glUniform4iv(@NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform4iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix2fv UniformMatrix2fv} - * - * @see Reference Page - */ - public static void glUniformMatrix2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix3fv UniformMatrix3fv} - * - * @see Reference Page - */ - public static void glUniformMatrix3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 9, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix4fv UniformMatrix4fv} - * - * @see Reference Page - */ - public static void glUniformMatrix4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 4, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glGetShaderiv GetShaderiv} - * - * @see Reference Page - */ - public static void glGetShaderiv(@NativeType("GLuint") int shader, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetShaderiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(shader, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramiv GetProgramiv} - * - * @see Reference Page - */ - public static void glGetProgramiv(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetProgramiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetShaderInfoLog GetShaderInfoLog} - * - * @see Reference Page - */ - public static void glGetShaderInfoLog(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer infoLog) { - long __functionAddress = GL.getICD().glGetShaderInfoLog; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(shader, infoLog.remaining(), length, memAddress(infoLog), __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramInfoLog GetProgramInfoLog} - * - * @see Reference Page - */ - public static void glGetProgramInfoLog(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer infoLog) { - long __functionAddress = GL.getICD().glGetProgramInfoLog; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(program, infoLog.remaining(), length, memAddress(infoLog), __functionAddress); - } - - /** - * Array version of: {@link #glGetAttachedShaders GetAttachedShaders} - * - * @see Reference Page - */ - public static void glGetAttachedShaders(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") int[] count, @NativeType("GLuint *") int[] shaders) { - long __functionAddress = GL.getICD().glGetAttachedShaders; - if (CHECKS) { - check(__functionAddress); - checkSafe(count, 1); - } - callPPV(program, shaders.length, count, shaders, __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveUniform GetActiveUniform} - * - * @see Reference Page - */ - public static void glGetActiveUniform(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetActiveUniform; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - callPPPPV(program, index, name.remaining(), length, size, type, memAddress(name), __functionAddress); - } - - /** - * Array version of: {@link #glGetUniformfv GetUniformfv} - * - * @see Reference Page - */ - public static void glGetUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetUniformfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetUniformiv GetUniformiv} - * - * @see Reference Page - */ - public static void glGetUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetUniformiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetShaderSource GetShaderSource} - * - * @see Reference Page - */ - public static void glGetShaderSource(@NativeType("GLuint") int shader, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer source) { - long __functionAddress = GL.getICD().glGetShaderSource; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(shader, source.remaining(), length, memAddress(source), __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib1fv VertexAttrib1fv} - * - * @see Reference Page - */ - public static void glVertexAttrib1fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib1fv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib1sv VertexAttrib1sv} - * - * @see Reference Page - */ - public static void glVertexAttrib1sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib1sv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib1dv VertexAttrib1dv} - * - * @see Reference Page - */ - public static void glVertexAttrib1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib1dv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib2fv VertexAttrib2fv} - * - * @see Reference Page - */ - public static void glVertexAttrib2fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib2fv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib2sv VertexAttrib2sv} - * - * @see Reference Page - */ - public static void glVertexAttrib2sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib2sv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib2dv VertexAttrib2dv} - * - * @see Reference Page - */ - public static void glVertexAttrib2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib2dv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib3fv VertexAttrib3fv} - * - * @see Reference Page - */ - public static void glVertexAttrib3fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib3fv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib3sv VertexAttrib3sv} - * - * @see Reference Page - */ - public static void glVertexAttrib3sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib3sv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib3dv VertexAttrib3dv} - * - * @see Reference Page - */ - public static void glVertexAttrib3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib3dv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4fv VertexAttrib4fv} - * - * @see Reference Page - */ - public static void glVertexAttrib4fv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4fv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4sv VertexAttrib4sv} - * - * @see Reference Page - */ - public static void glVertexAttrib4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4sv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4dv VertexAttrib4dv} - * - * @see Reference Page - */ - public static void glVertexAttrib4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4dv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4iv VertexAttrib4iv} - * - * @see Reference Page - */ - public static void glVertexAttrib4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4iv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4usv VertexAttrib4usv} - * - * @see Reference Page - */ - public static void glVertexAttrib4usv(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4usv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4uiv VertexAttrib4uiv} - * - * @see Reference Page - */ - public static void glVertexAttrib4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4Nsv VertexAttrib4Nsv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Nsv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4Nsv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4Niv VertexAttrib4Niv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Niv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4Niv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4Nusv VertexAttrib4Nusv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Nusv(@NativeType("GLuint") int index, @NativeType("GLushort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4Nusv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttrib4Nuiv VertexAttrib4Nuiv} - * - * @see Reference Page - */ - public static void glVertexAttrib4Nuiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4Nuiv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveAttrib GetActiveAttrib} - * - * @see Reference Page - */ - public static void glGetActiveAttrib(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetActiveAttrib; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - callPPPPV(program, index, name.remaining(), length, size, type, memAddress(name), __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexAttribiv GetVertexAttribiv} - * - * @see Reference Page - */ - public static void glGetVertexAttribiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(index, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexAttribfv GetVertexAttribfv} - * - * @see Reference Page - */ - public static void glGetVertexAttribfv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexAttribdv GetVertexAttribdv} - * - * @see Reference Page - */ - public static void glGetVertexAttribdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribdv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glDrawBuffers DrawBuffers} - * - * @see Reference Page - */ - public static void glDrawBuffers(@NativeType("GLenum const *") int[] bufs) { - long __functionAddress = GL.getICD().glDrawBuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(bufs.length, bufs, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL21.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL21.java deleted file mode 100644 index a96100bf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL21.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 2.1. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 2.1 implementations must support at least revision 1.20 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL21 extends GL20 { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_FLOAT_MAT2x3 = 0x8B65, - GL_FLOAT_MAT2x4 = 0x8B66, - GL_FLOAT_MAT3x2 = 0x8B67, - GL_FLOAT_MAT3x4 = 0x8B68, - GL_FLOAT_MAT4x2 = 0x8B69, - GL_FLOAT_MAT4x3 = 0x8B6A; - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferParameteriv, and - * GetBufferPointerv. - */ - public static final int - GL_PIXEL_PACK_BUFFER = 0x88EB, - GL_PIXEL_UNPACK_BUFFER = 0x88EC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED, - GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D. */ - public static final int - GL_SRGB = 0x8C40, - GL_SRGB8 = 0x8C41, - GL_SRGB_ALPHA = 0x8C42, - GL_SRGB8_ALPHA8 = 0x8C43, - GL_SLUMINANCE_ALPHA = 0x8C44, - GL_SLUMINANCE8_ALPHA8 = 0x8C45, - GL_SLUMINANCE = 0x8C46, - GL_SLUMINANCE8 = 0x8C47, - GL_COMPRESSED_SRGB = 0x8C48, - GL_COMPRESSED_SRGB_ALPHA = 0x8C49, - GL_COMPRESSED_SLUMINANCE = 0x8C4A, - GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B; - - protected GL21() { - throw new UnsupportedOperationException(); - } - - // --- [ glUniformMatrix2x3fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x3fv UniformMatrix2x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2x3fv(int location, int count, boolean transpose, long value) { - GL21C.nglUniformMatrix2x3fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2x3 uniform variable or a mat2x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL21C.glUniformMatrix2x3fv(location, transpose, value); - } - - // --- [ glUniformMatrix3x2fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x2fv UniformMatrix3x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3x2fv(int location, int count, boolean transpose, long value) { - GL21C.nglUniformMatrix3x2fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3x2 uniform variable or a mat3x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL21C.glUniformMatrix3x2fv(location, transpose, value); - } - - // --- [ glUniformMatrix2x4fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x4fv UniformMatrix2x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2x4fv(int location, int count, boolean transpose, long value) { - GL21C.nglUniformMatrix2x4fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2x4 uniform variable or a mat2x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL21C.glUniformMatrix2x4fv(location, transpose, value); - } - - // --- [ glUniformMatrix4x2fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x2fv UniformMatrix4x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4x2fv(int location, int count, boolean transpose, long value) { - GL21C.nglUniformMatrix4x2fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4x2 uniform variable or a mat4x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL21C.glUniformMatrix4x2fv(location, transpose, value); - } - - // --- [ glUniformMatrix3x4fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x4fv UniformMatrix3x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3x4fv(int location, int count, boolean transpose, long value) { - GL21C.nglUniformMatrix3x4fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3x4 uniform variable or a mat3x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL21C.glUniformMatrix3x4fv(location, transpose, value); - } - - // --- [ glUniformMatrix4x3fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x3fv UniformMatrix4x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4x3fv(int location, int count, boolean transpose, long value) { - GL21C.nglUniformMatrix4x3fv(location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4x3 uniform variable or a mat4x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL21C.glUniformMatrix4x3fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix2x3fv UniformMatrix2x3fv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL21C.glUniformMatrix2x3fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix3x2fv UniformMatrix3x2fv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL21C.glUniformMatrix3x2fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix2x4fv UniformMatrix2x4fv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL21C.glUniformMatrix2x4fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix4x2fv UniformMatrix4x2fv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL21C.glUniformMatrix4x2fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix3x4fv UniformMatrix3x4fv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL21C.glUniformMatrix3x4fv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix4x3fv UniformMatrix4x3fv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL21C.glUniformMatrix4x3fv(location, transpose, value); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL21C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL21C.java deleted file mode 100644 index c8fb2491..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL21C.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 2.1. - * - *

    OpenGL 2.1 implementations must support at least revision 1.20 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL21C extends GL20C { - - static { GL.initialize(); } - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_FLOAT_MAT2x3 = 0x8B65, - GL_FLOAT_MAT2x4 = 0x8B66, - GL_FLOAT_MAT3x2 = 0x8B67, - GL_FLOAT_MAT3x4 = 0x8B68, - GL_FLOAT_MAT4x2 = 0x8B69, - GL_FLOAT_MAT4x3 = 0x8B6A; - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferParameteriv, and - * GetBufferPointerv. - */ - public static final int - GL_PIXEL_PACK_BUFFER = 0x88EB, - GL_PIXEL_UNPACK_BUFFER = 0x88EC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED, - GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D. */ - public static final int - GL_SRGB = 0x8C40, - GL_SRGB8 = 0x8C41, - GL_SRGB_ALPHA = 0x8C42, - GL_SRGB8_ALPHA8 = 0x8C43, - GL_COMPRESSED_SRGB = 0x8C48, - GL_COMPRESSED_SRGB_ALPHA = 0x8C49; - - protected GL21C() { - throw new UnsupportedOperationException(); - } - - // --- [ glUniformMatrix2x3fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x3fv UniformMatrix2x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix2x3fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat2x3 uniform variable or a mat2x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix2x3fv(location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix3x2fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x2fv UniformMatrix3x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix3x2fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat3x2 uniform variable or a mat3x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix3x2fv(location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix2x4fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x4fv UniformMatrix2x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix2x4fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat2x4 uniform variable or a mat2x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix2x4fv(location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix4x2fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x2fv UniformMatrix4x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix4x2fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat4x2 uniform variable or a mat4x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix4x2fv(location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix3x4fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x4fv UniformMatrix3x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix3x4fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat3x4 uniform variable or a mat3x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix3x4fv(location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix4x3fv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x3fv UniformMatrix4x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix4x3fv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat4x3 uniform variable or a mat4x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglUniformMatrix4x3fv(location, value.remaining() / 12, transpose, memAddress(value)); - } - - /** - * Array version of: {@link #glUniformMatrix2x3fv UniformMatrix2x3fv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix2x3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix3x2fv UniformMatrix3x2fv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix3x2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix2x4fv UniformMatrix2x4fv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix2x4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix4x2fv UniformMatrix4x2fv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x2fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix4x2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix3x4fv UniformMatrix3x4fv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x4fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix3x4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 12, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix4x3fv UniformMatrix4x3fv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x3fv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glUniformMatrix4x3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 12, transpose, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL30.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL30.java deleted file mode 100644 index 0e5f3159..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL30.java +++ /dev/null @@ -1,2669 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 3.0. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 3.0 implementations are guaranteed to support at least versions 1.10, 1.20 and 1.30 of the shading language, although versions 1.10 and 1.20 are - * deprecated in a forward-compatible context.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL30 extends GL21 { - - static { GL.initialize(); } - - /** GetTarget */ - public static final int - GL_MAJOR_VERSION = 0x821B, - GL_MINOR_VERSION = 0x821C, - GL_NUM_EXTENSIONS = 0x821D, - GL_CONTEXT_FLAGS = 0x821E, - GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x1; - - /** Renamed tokens. */ - public static final int - GL_COMPARE_REF_TO_TEXTURE = GL14.GL_COMPARE_R_TO_TEXTURE, - GL_CLIP_DISTANCE0 = GL11.GL_CLIP_PLANE0, - GL_CLIP_DISTANCE1 = GL11.GL_CLIP_PLANE1, - GL_CLIP_DISTANCE2 = GL11.GL_CLIP_PLANE2, - GL_CLIP_DISTANCE3 = GL11.GL_CLIP_PLANE3, - GL_CLIP_DISTANCE4 = GL11.GL_CLIP_PLANE4, - GL_CLIP_DISTANCE5 = GL11.GL_CLIP_PLANE5, - GL_CLIP_DISTANCE6 = 0x3006, - GL_CLIP_DISTANCE7 = 0x3007, - GL_MAX_CLIP_DISTANCES = GL11.GL_MAX_CLIP_PLANES, - GL_MAX_VARYING_COMPONENTS = GL20.GL_MAX_VARYING_FLOATS; - - /** Accepted by the {@code pname} parameters of GetVertexAttribdv, GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIuiv and GetVertexAttribIiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_1D_ARRAY = 0x8DC0, - GL_SAMPLER_2D_ARRAY = 0x8DC1, - GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3, - GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4, - GL_SAMPLER_CUBE_SHADOW = 0x8DC5, - GL_UNSIGNED_INT_VEC2 = 0x8DC6, - GL_UNSIGNED_INT_VEC3 = 0x8DC7, - GL_UNSIGNED_INT_VEC4 = 0x8DC8, - GL_INT_SAMPLER_1D = 0x8DC9, - GL_INT_SAMPLER_2D = 0x8DCA, - GL_INT_SAMPLER_3D = 0x8DCB, - GL_INT_SAMPLER_CUBE = 0x8DCC, - GL_INT_SAMPLER_1D_ARRAY = 0x8DCE, - GL_INT_SAMPLER_2D_ARRAY = 0x8DCF, - GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1, - GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2, - GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3, - GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4, - GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6, - GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904, - GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; - - /** Accepted by the {@code mode} parameter of BeginConditionalRender. */ - public static final int - GL_QUERY_WAIT = 0x8E13, - GL_QUERY_NO_WAIT = 0x8E14, - GL_QUERY_BY_REGION_WAIT = 0x8E15, - GL_QUERY_BY_REGION_NO_WAIT = 0x8E16; - - /** Accepted by the {@code access} parameter of MapBufferRange. */ - public static final int - GL_MAP_READ_BIT = 0x1, - GL_MAP_WRITE_BIT = 0x2, - GL_MAP_INVALIDATE_RANGE_BIT = 0x4, - GL_MAP_INVALIDATE_BUFFER_BIT = 0x8, - GL_MAP_FLUSH_EXPLICIT_BIT = 0x10, - GL_MAP_UNSYNCHRONIZED_BIT = 0x20; - - /** Accepted by the {@code pname} parameter of GetBufferParameteriv. */ - public static final int - GL_BUFFER_ACCESS_FLAGS = 0x911F, - GL_BUFFER_MAP_LENGTH = 0x9120, - GL_BUFFER_MAP_OFFSET = 0x9121; - - /** Accepted by the {@code target} parameter of ClampColor and the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CLAMP_VERTEX_COLOR = 0x891A, - GL_CLAMP_FRAGMENT_COLOR = 0x891B, - GL_CLAMP_READ_COLOR = 0x891C; - - /** Accepted by the {@code clamp} parameter of ClampColor. */ - public static final int GL_FIXED_ONLY = 0x891D; - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int - GL_DEPTH_COMPONENT32F = 0x8CAC, - GL_DEPTH32F_STENCIL8 = 0x8CAD; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_RED_TYPE = 0x8C10, - GL_TEXTURE_GREEN_TYPE = 0x8C11, - GL_TEXTURE_BLUE_TYPE = 0x8C12, - GL_TEXTURE_ALPHA_TYPE = 0x8C13, - GL_TEXTURE_LUMINANCE_TYPE = 0x8C14, - GL_TEXTURE_INTENSITY_TYPE = 0x8C15, - GL_TEXTURE_DEPTH_TYPE = 0x8C16; - - /** Returned by the {@code params} parameter of GetTexLevelParameter. */ - public static final int GL_UNSIGNED_NORMALIZED = 0x8C17; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_RGBA32F = 0x8814, - GL_RGB32F = 0x8815, - GL_RGBA16F = 0x881A, - GL_RGB16F = 0x881B; - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage. */ - public static final int GL_R11F_G11F_B10F = 0x8C3A; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * GetSeparableFilter, ColorTable, ColorSubTable, and GetColorTable. - */ - public static final int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage. */ - public static final int GL_RGB9_E5 = 0x8C3D; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * GetSeparableFilter, ColorTable, ColorSubTable, and GetColorTable. - */ - public static final int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int GL_TEXTURE_SHARED_SIZE = 0x8C3F; - - /** - * Accepted by the {@code target} parameter of BindFramebuffer, CheckFramebufferStatus, FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and - * GetFramebufferAttachmentParameteriv. - */ - public static final int - GL_FRAMEBUFFER = 0x8D40, - GL_READ_FRAMEBUFFER = 0x8CA8, - GL_DRAW_FRAMEBUFFER = 0x8CA9; - - /** - * Accepted by the {@code target} parameter of BindRenderbuffer, RenderbufferStorage, and GetRenderbufferParameteriv, and returned by - * GetFramebufferAttachmentParameteriv. - */ - public static final int GL_RENDERBUFFER = 0x8D41; - - /** Accepted by the {@code internalformat} parameter of RenderbufferStorage. */ - public static final int - GL_STENCIL_INDEX1 = 0x8D46, - GL_STENCIL_INDEX4 = 0x8D47, - GL_STENCIL_INDEX8 = 0x8D48, - GL_STENCIL_INDEX16 = 0x8D49; - - /** Accepted by the {@code pname} parameter of GetRenderbufferParameteriv. */ - public static final int - GL_RENDERBUFFER_WIDTH = 0x8D42, - GL_RENDERBUFFER_HEIGHT = 0x8D43, - GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, - GL_RENDERBUFFER_RED_SIZE = 0x8D50, - GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, - GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, - GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, - GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, - GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, - GL_RENDERBUFFER_SAMPLES = 0x8CAB; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachmentParameteriv. */ - public static final int - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, - GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, - GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, - GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, - GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, - GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, - GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, - GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, - GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; - - /** Returned in {@code params} by GetFramebufferAttachmentParameteriv. */ - public static final int - GL_FRAMEBUFFER_DEFAULT = 0x8218, - GL_INDEX = 0x8222; - - /** Accepted by the {@code attachment} parameter of FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv. */ - public static final int - GL_COLOR_ATTACHMENT0 = 0x8CE0, - GL_COLOR_ATTACHMENT1 = 0x8CE1, - GL_COLOR_ATTACHMENT2 = 0x8CE2, - GL_COLOR_ATTACHMENT3 = 0x8CE3, - GL_COLOR_ATTACHMENT4 = 0x8CE4, - GL_COLOR_ATTACHMENT5 = 0x8CE5, - GL_COLOR_ATTACHMENT6 = 0x8CE6, - GL_COLOR_ATTACHMENT7 = 0x8CE7, - GL_COLOR_ATTACHMENT8 = 0x8CE8, - GL_COLOR_ATTACHMENT9 = 0x8CE9, - GL_COLOR_ATTACHMENT10 = 0x8CEA, - GL_COLOR_ATTACHMENT11 = 0x8CEB, - GL_COLOR_ATTACHMENT12 = 0x8CEC, - GL_COLOR_ATTACHMENT13 = 0x8CED, - GL_COLOR_ATTACHMENT14 = 0x8CEE, - GL_COLOR_ATTACHMENT15 = 0x8CEF, - GL_COLOR_ATTACHMENT16 = 0x8CF0, - GL_COLOR_ATTACHMENT17 = 0x8CF1, - GL_COLOR_ATTACHMENT18 = 0x8CF2, - GL_COLOR_ATTACHMENT19 = 0x8CF3, - GL_COLOR_ATTACHMENT20 = 0x8CF4, - GL_COLOR_ATTACHMENT21 = 0x8CF5, - GL_COLOR_ATTACHMENT22 = 0x8CF6, - GL_COLOR_ATTACHMENT23 = 0x8CF7, - GL_COLOR_ATTACHMENT24 = 0x8CF8, - GL_COLOR_ATTACHMENT25 = 0x8CF9, - GL_COLOR_ATTACHMENT26 = 0x8CFA, - GL_COLOR_ATTACHMENT27 = 0x8CFB, - GL_COLOR_ATTACHMENT28 = 0x8CFC, - GL_COLOR_ATTACHMENT29 = 0x8CFD, - GL_COLOR_ATTACHMENT30 = 0x8CFE, - GL_COLOR_ATTACHMENT31 = 0x8CFF, - GL_DEPTH_ATTACHMENT = 0x8D00, - GL_STENCIL_ATTACHMENT = 0x8D20, - GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_SAMPLES = 0x8D57; - - /** Returned by CheckFramebufferStatus(). */ - public static final int - GL_FRAMEBUFFER_COMPLETE = 0x8CD5, - GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, - GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, - GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, - GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, - GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, - GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, - GL_FRAMEBUFFER_UNDEFINED = 0x8219; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_FRAMEBUFFER_BINDING = 0x8CA6, - GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6, - GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, - GL_RENDERBUFFER_BINDING = 0x8CA7, - GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, - GL_MAX_RENDERBUFFER_SIZE = 0x84E8; - - /** Returned by GetError(). */ - public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x506; - - /** - * Accepted by the {@code format} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage, by the {@code type} parameter of CopyPixels, by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, - * CopyTexImage2D, and RenderbufferStorage, and returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int GL_DEPTH_STENCIL = 0x84F9; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_UNSIGNED_INT_24_8 = 0x84FA; - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int GL_DEPTH24_STENCIL8 = 0x88F0; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int GL_TEXTURE_STENCIL_SIZE = 0x88F1; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, - * ColorTable, ColorSubTable, and GetColorTable. - * - *

    Accepted by the {@code type} argument of VertexPointer, NormalPointer, ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, and - * VertexAttribPointer.

    - */ - public static final int GL_HALF_FLOAT = 0x140B; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_RGBA32UI = 0x8D70, - GL_RGB32UI = 0x8D71, - GL_RGBA16UI = 0x8D76, - GL_RGB16UI = 0x8D77, - GL_RGBA8UI = 0x8D7C, - GL_RGB8UI = 0x8D7D, - GL_RGBA32I = 0x8D82, - GL_RGB32I = 0x8D83, - GL_RGBA16I = 0x8D88, - GL_RGB16I = 0x8D89, - GL_RGBA8I = 0x8D8E, - GL_RGB8I = 0x8D8F; - - /** Accepted by the {@code format} parameter of TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, DrawPixels and ReadPixels. */ - public static final int - GL_RED_INTEGER = 0x8D94, - GL_GREEN_INTEGER = 0x8D95, - GL_BLUE_INTEGER = 0x8D96, - GL_ALPHA_INTEGER = 0x8D97, - GL_RGB_INTEGER = 0x8D98, - GL_RGBA_INTEGER = 0x8D99, - GL_BGR_INTEGER = 0x8D9A, - GL_BGRA_INTEGER = 0x8D9B; - - /** Accepted by the {@code target} parameter of TexParameteri, TexParameteriv, TexParameterf, TexParameterfv, GenerateMipmap, and BindTexture. */ - public static final int - GL_TEXTURE_1D_ARRAY = 0x8C18, - GL_TEXTURE_2D_ARRAY = 0x8C1A; - - /** Accepted by the {@code target} parameter of TexImage3D, TexSubImage3D, CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D. */ - public static final int GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B; - - /** - * Accepted by the {@code target} parameter of TexImage2D, TexSubImage2D, CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and - * CompressedTexSubImage2D. - */ - public static final int GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int - GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C, - GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D, - GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2D and the {@code format} parameter of - * CompressedTexSubImage2D. - */ - public static final int - GL_COMPRESSED_RED_RGTC1 = 0x8DBB, - GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, - GL_COMPRESSED_RG_RGTC2 = 0x8DBD, - GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D. */ - public static final int - GL_R8 = 0x8229, - GL_R16 = 0x822A, - GL_RG8 = 0x822B, - GL_RG16 = 0x822C, - GL_R16F = 0x822D, - GL_R32F = 0x822E, - GL_RG16F = 0x822F, - GL_RG32F = 0x8230, - GL_R8I = 0x8231, - GL_R8UI = 0x8232, - GL_R16I = 0x8233, - GL_R16UI = 0x8234, - GL_R32I = 0x8235, - GL_R32UI = 0x8236, - GL_RG8I = 0x8237, - GL_RG8UI = 0x8238, - GL_RG16I = 0x8239, - GL_RG16UI = 0x823A, - GL_RG32I = 0x823B, - GL_RG32UI = 0x823C, - GL_RG = 0x8227, - GL_COMPRESSED_RED = 0x8225, - GL_COMPRESSED_RG = 0x8226; - - /** Accepted by the {@code format} parameter of TexImage3D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and ReadPixels. */ - public static final int GL_RG_INTEGER = 0x8228; - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * BindBufferRange, BindBufferOffset and BindBufferBase. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; - - /** Accepted by the {@code param} parameter of GetIntegeri_v and GetBooleani_v. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84, - GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; - - /** - * Accepted by the {@code param} parameter of GetIntegeri_v and GetBooleani_v, and by the {@code pname} parameter of GetBooleanv, - * GetDoublev, GetIntegerv, and GetFloatv. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; - - /** Accepted by the {@code bufferMode} parameter of TransformFeedbackVaryings. */ - public static final int - GL_INTERLEAVED_ATTRIBS = 0x8C8C, - GL_SEPARATE_ATTRIBS = 0x8C8D; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int - GL_PRIMITIVES_GENERATED = 0x8C87, - GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_RASTERIZER_DISCARD = 0x8C89; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83, - GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F, - GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_VERTEX_ARRAY_BINDING = 0x85B5; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_FRAMEBUFFER_SRGB = 0x8DB9; - - protected GL30() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetStringi ] --- - - /** Unsafe version of: {@link #glGetStringi GetStringi} */ - public static long nglGetStringi(int name, int index) { - return GL30C.nglGetStringi(name, index); - } - - /** - * Queries indexed string state. - * - * @param name the indexed state to query. One of:
    {@link GL11#GL_EXTENSIONS EXTENSIONS}{@link GL20#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}
    - * @param index the index of the particular element being queried - * - * @see Reference Page - */ - @Nullable - @NativeType("GLubyte const *") - public static String glGetStringi(@NativeType("GLenum") int name, @NativeType("GLuint") int index) { - return GL30C.glGetStringi(name, index); - } - - // --- [ glClearBufferiv ] --- - - /** Unsafe version of: {@link #glClearBufferiv ClearBufferiv} */ - public static void nglClearBufferiv(int buffer, int drawbuffer, long value) { - GL30C.nglClearBufferiv(buffer, drawbuffer, value); - } - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_STENCIL STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For stencil buffers, a pointer to a - * single stencil value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearBufferiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - GL30C.glClearBufferiv(buffer, drawbuffer, value); - } - - // --- [ glClearBufferuiv ] --- - - /** Unsafe version of: {@link #glClearBufferuiv ClearBufferuiv} */ - public static void nglClearBufferuiv(int buffer, int drawbuffer, long value) { - GL30C.nglClearBufferuiv(buffer, drawbuffer, value); - } - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. Must be:
    {@link GL11#GL_COLOR COLOR}
    - * @param drawbuffer the draw buffer to clear - * @param value a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to - * - * @see Reference Page - */ - public static void glClearBufferuiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - GL30C.glClearBufferuiv(buffer, drawbuffer, value); - } - - // --- [ glClearBufferfv ] --- - - /** Unsafe version of: {@link #glClearBufferfv ClearBufferfv} */ - public static void nglClearBufferfv(int buffer, int drawbuffer, long value) { - GL30C.nglClearBufferfv(buffer, drawbuffer, value); - } - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_DEPTH DEPTH}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For depth buffers, a pointer to a - * single depth value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearBufferfv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") FloatBuffer value) { - GL30C.glClearBufferfv(buffer, drawbuffer, value); - } - - // --- [ glClearBufferfi ] --- - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. Must be:
    {@link GL30C#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param depth the depth value to clear the buffer to - * @param stencil the stencil value to clear the buffer to - * - * @see Reference Page - */ - public static void glClearBufferfi(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat") float depth, @NativeType("GLint") int stencil) { - GL30C.glClearBufferfi(buffer, drawbuffer, depth, stencil); - } - - // --- [ glVertexAttribI1i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * - * @see Reference Page - */ - public static void glVertexAttribI1i(@NativeType("GLuint") int index, @NativeType("GLint") int x) { - GL30C.glVertexAttribI1i(index, x); - } - - // --- [ glVertexAttribI2i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * - * @see Reference Page - */ - public static void glVertexAttribI2i(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y) { - GL30C.glVertexAttribI2i(index, x, y); - } - - // --- [ glVertexAttribI3i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The w component is implicitly set to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * - * @see Reference Page - */ - public static void glVertexAttribI3i(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z) { - GL30C.glVertexAttribI3i(index, x, y, z); - } - - // --- [ glVertexAttribI4i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static void glVertexAttribI4i(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w) { - GL30C.glVertexAttribI4i(index, x, y, z, w); - } - - // --- [ glVertexAttribI1ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * - * @see Reference Page - */ - public static void glVertexAttribI1ui(@NativeType("GLuint") int index, @NativeType("GLuint") int x) { - GL30C.glVertexAttribI1ui(index, x); - } - - // --- [ glVertexAttribI2ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * - * @see Reference Page - */ - public static void glVertexAttribI2ui(@NativeType("GLuint") int index, @NativeType("GLuint") int x, @NativeType("GLuint") int y) { - GL30C.glVertexAttribI2ui(index, x, y); - } - - // --- [ glVertexAttribI3ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The w component is implicitly set to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * - * @see Reference Page - */ - public static void glVertexAttribI3ui(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z) { - GL30C.glVertexAttribI3ui(index, x, y, z); - } - - // --- [ glVertexAttribI4ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static void glVertexAttribI4ui(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w) { - GL30C.glVertexAttribI4ui(index, x, y, z, w); - } - - // --- [ glVertexAttribI1iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI1iv VertexAttribI1iv} */ - public static void nglVertexAttribI1iv(int index, long v) { - GL30C.nglVertexAttribI1iv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI1i VertexAttribI1i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI1iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL30C.glVertexAttribI1iv(index, v); - } - - // --- [ glVertexAttribI2iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI2iv VertexAttribI2iv} */ - public static void nglVertexAttribI2iv(int index, long v) { - GL30C.nglVertexAttribI2iv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI2i VertexAttribI2i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI2iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL30C.glVertexAttribI2iv(index, v); - } - - // --- [ glVertexAttribI3iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI3iv VertexAttribI3iv} */ - public static void nglVertexAttribI3iv(int index, long v) { - GL30C.nglVertexAttribI3iv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI3i VertexAttribI3i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI3iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL30C.glVertexAttribI3iv(index, v); - } - - // --- [ glVertexAttribI4iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4iv VertexAttribI4iv} */ - public static void nglVertexAttribI4iv(int index, long v) { - GL30C.nglVertexAttribI4iv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI4i VertexAttribI4i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL30C.glVertexAttribI4iv(index, v); - } - - // --- [ glVertexAttribI1uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI1uiv VertexAttribI1uiv} */ - public static void nglVertexAttribI1uiv(int index, long v) { - GL30C.nglVertexAttribI1uiv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI1ui VertexAttribI1ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI1uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - GL30C.glVertexAttribI1uiv(index, v); - } - - // --- [ glVertexAttribI2uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI2uiv VertexAttribI2uiv} */ - public static void nglVertexAttribI2uiv(int index, long v) { - GL30C.nglVertexAttribI2uiv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI2ui VertexAttribI2ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI2uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - GL30C.glVertexAttribI2uiv(index, v); - } - - // --- [ glVertexAttribI3uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI3uiv VertexAttribI3uiv} */ - public static void nglVertexAttribI3uiv(int index, long v) { - GL30C.nglVertexAttribI3uiv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI3ui VertexAttribI3ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI3uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - GL30C.glVertexAttribI3uiv(index, v); - } - - // --- [ glVertexAttribI4uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4uiv VertexAttribI4uiv} */ - public static void nglVertexAttribI4uiv(int index, long v) { - GL30C.nglVertexAttribI4uiv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribI4ui VertexAttribI4ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - GL30C.glVertexAttribI4uiv(index, v); - } - - // --- [ glVertexAttribI4bv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4bv VertexAttribI4bv} */ - public static void nglVertexAttribI4bv(int index, long v) { - GL30C.nglVertexAttribI4bv(index, v); - } - - /** - * Byte version of {@link #glVertexAttribI4iv VertexAttribI4iv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4bv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - GL30C.glVertexAttribI4bv(index, v); - } - - // --- [ glVertexAttribI4sv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4sv VertexAttribI4sv} */ - public static void nglVertexAttribI4sv(int index, long v) { - GL30C.nglVertexAttribI4sv(index, v); - } - - /** - * Short version of {@link #glVertexAttribI4iv VertexAttribI4iv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - GL30C.glVertexAttribI4sv(index, v); - } - - // --- [ glVertexAttribI4ubv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4ubv VertexAttribI4ubv} */ - public static void nglVertexAttribI4ubv(int index, long v) { - GL30C.nglVertexAttribI4ubv(index, v); - } - - /** - * Byte version of {@link #glVertexAttribI4uiv VertexAttribI4uiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4ubv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - GL30C.glVertexAttribI4ubv(index, v); - } - - // --- [ glVertexAttribI4usv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4usv VertexAttribI4usv} */ - public static void nglVertexAttribI4usv(int index, long v) { - GL30C.nglVertexAttribI4usv(index, v); - } - - /** - * Short version of {@link #glVertexAttribI4uiv VertexAttribI4uiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4usv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - GL30C.glVertexAttribI4usv(index, v); - } - - // --- [ glVertexAttribIPointer ] --- - - /** Unsafe version of: {@link #glVertexAttribIPointer VertexAttribIPointer} */ - public static void nglVertexAttribIPointer(int index, int size, int type, int stride, long pointer) { - GL30C.nglVertexAttribIPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - GL30C.glVertexAttribIPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - GL30C.glVertexAttribIPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - GL30C.glVertexAttribIPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - GL30C.glVertexAttribIPointer(index, size, type, stride, pointer); - } - - // --- [ glGetVertexAttribIiv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribIiv GetVertexAttribIiv} */ - public static void nglGetVertexAttribIiv(int index, int pname, long params) { - GL30C.nglGetVertexAttribIiv(index, pname, params); - } - - /** - * Returns the value of a pure integer generic vertex attribute parameter. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribIiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL30C.glGetVertexAttribIiv(index, pname, params); - } - - /** - * Returns the value of a pure integer generic vertex attribute parameter. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexAttribIi(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL30C.glGetVertexAttribIi(index, pname); - } - - // --- [ glGetVertexAttribIuiv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribIuiv GetVertexAttribIuiv} */ - public static void nglGetVertexAttribIuiv(int index, int pname, long params) { - GL30C.nglGetVertexAttribIuiv(index, pname, params); - } - - /** - * Unsigned version of {@link #glGetVertexAttribIiv GetVertexAttribIiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribIuiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - GL30C.glGetVertexAttribIuiv(index, pname, params); - } - - /** - * Unsigned version of {@link #glGetVertexAttribIiv GetVertexAttribIiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexAttribIui(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL30C.glGetVertexAttribIui(index, pname); - } - - // --- [ glUniform1ui ] --- - - /** - * Specifies the value of a uint uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform value - * - * @see Reference Page - */ - public static void glUniform1ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0) { - GL30C.glUniform1ui(location, v0); - } - - // --- [ glUniform2ui ] --- - - /** - * Specifies the value of a uvec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * - * @see Reference Page - */ - public static void glUniform2ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1) { - GL30C.glUniform2ui(location, v0, v1); - } - - // --- [ glUniform3ui ] --- - - /** - * Specifies the value of a uvec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * - * @see Reference Page - */ - public static void glUniform3ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2) { - GL30C.glUniform3ui(location, v0, v1, v2); - } - - // --- [ glUniform4ui ] --- - - /** - * Specifies the value of a uvec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - * - * @see Reference Page - */ - public static void glUniform4ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2, @NativeType("GLuint") int v3) { - GL30C.glUniform4ui(location, v0, v1, v2, v3); - } - - // --- [ glUniform1uiv ] --- - - /** - * Unsafe version of: {@link #glUniform1uiv Uniform1uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform1uiv(int location, int count, long value) { - GL30C.nglUniform1uiv(location, count, value); - } - - /** - * Specifies the value of a single uint uniform variable or a uint uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL30C.glUniform1uiv(location, value); - } - - // --- [ glUniform2uiv ] --- - - /** - * Unsafe version of: {@link #glUniform2uiv Uniform2uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform2uiv(int location, int count, long value) { - GL30C.nglUniform2uiv(location, count, value); - } - - /** - * Specifies the value of a single uvec2 uniform variable or a uvec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL30C.glUniform2uiv(location, value); - } - - // --- [ glUniform3uiv ] --- - - /** - * Unsafe version of: {@link #glUniform3uiv Uniform3uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform3uiv(int location, int count, long value) { - GL30C.nglUniform3uiv(location, count, value); - } - - /** - * Specifies the value of a single uvec3 uniform variable or a uvec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL30C.glUniform3uiv(location, value); - } - - // --- [ glUniform4uiv ] --- - - /** - * Unsafe version of: {@link #glUniform4uiv Uniform4uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform4uiv(int location, int count, long value) { - GL30C.nglUniform4uiv(location, count, value); - } - - /** - * Specifies the value of a single uvec4 uniform variable or a uvec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL30C.glUniform4uiv(location, value); - } - - // --- [ glGetUniformuiv ] --- - - /** Unsafe version of: {@link #glGetUniformuiv GetUniformuiv} */ - public static void nglGetUniformuiv(int program, int location, long params) { - GL30C.nglGetUniformuiv(program, location, params); - } - - /** - * Returns the uint value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - GL30C.glGetUniformuiv(program, location, params); - } - - /** - * Returns the uint value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL30C.glGetUniformui(program, location); - } - - // --- [ glBindFragDataLocation ] --- - - /** Unsafe version of: {@link #glBindFragDataLocation BindFragDataLocation} */ - public static void nglBindFragDataLocation(int program, int colorNumber, long name) { - GL30C.nglBindFragDataLocation(program, colorNumber, name); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLchar const *") ByteBuffer name) { - GL30C.glBindFragDataLocation(program, colorNumber, name); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLchar const *") CharSequence name) { - GL30C.glBindFragDataLocation(program, colorNumber, name); - } - - // --- [ glGetFragDataLocation ] --- - - /** Unsafe version of: {@link #glGetFragDataLocation GetFragDataLocation} */ - public static int nglGetFragDataLocation(int program, long name) { - return GL30C.nglGetFragDataLocation(program, name); - } - - /** - * Queries the bindings of color numbers to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose binding to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - return GL30C.glGetFragDataLocation(program, name); - } - - /** - * Queries the bindings of color numbers to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose binding to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - return GL30C.glGetFragDataLocation(program, name); - } - - // --- [ glBeginConditionalRender ] --- - - /** - * Starts conditional rendering. - * - * @param id the name of an occlusion query object whose results are used to determine if the rendering commands are discarded - * @param mode how {@code glBeginConditionalRender} interprets the results of the occlusion query. One of:
    {@link GL30C#GL_QUERY_WAIT QUERY_WAIT}{@link GL30C#GL_QUERY_NO_WAIT QUERY_NO_WAIT}{@link GL30C#GL_QUERY_BY_REGION_WAIT QUERY_BY_REGION_WAIT}
    {@link GL30C#GL_QUERY_BY_REGION_NO_WAIT QUERY_BY_REGION_NO_WAIT}{@link GL45#GL_QUERY_WAIT_INVERTED QUERY_WAIT_INVERTED}{@link GL45#GL_QUERY_NO_WAIT_INVERTED QUERY_NO_WAIT_INVERTED}
    {@link GL45#GL_QUERY_BY_REGION_WAIT_INVERTED QUERY_BY_REGION_WAIT_INVERTED}{@link GL45#GL_QUERY_BY_REGION_NO_WAIT_INVERTED QUERY_BY_REGION_NO_WAIT_INVERTED}
    - * - * @see Reference Page - */ - public static void glBeginConditionalRender(@NativeType("GLuint") int id, @NativeType("GLenum") int mode) { - GL30C.glBeginConditionalRender(id, mode); - } - - // --- [ glEndConditionalRender ] --- - - /** - * Ends conditional rendering. - * - * @see Reference Page - */ - public static void glEndConditionalRender() { - GL30C.glEndConditionalRender(); - } - - // --- [ glMapBufferRange ] --- - - /** Unsafe version of: {@link #glMapBufferRange MapBufferRange} */ - public static long nglMapBufferRange(int target, long offset, long length, int access) { - return GL30C.nglMapBufferRange(target, offset, length, access); - } - - /** - * Maps a section of a buffer object's data store. - * - *

    LWJGL note: This method comes in 2 flavors:

    - * - *
      - *
    1. {@link #glMapBufferRange(int, long, long, int)} - Always returns a new ByteBuffer instance.
    2. - *
    3. {@link #glMapBufferRange(int, long, long, int, ByteBuffer)} - The {@code old_buffer} parameter is reused if not null.
    4. - *
    - * - * @param target a binding to which the target buffer is bound. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30C#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30C#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30C#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30C#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30C#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30C#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access) { - return GL30C.glMapBufferRange(target, offset, length, access); - } - - /** - * Maps a section of a buffer object's data store. - * - *

    LWJGL note: This method comes in 2 flavors:

    - * - *
      - *
    1. {@link #glMapBufferRange(int, long, long, int)} - Always returns a new ByteBuffer instance.
    2. - *
    3. {@link #glMapBufferRange(int, long, long, int, ByteBuffer)} - The {@code old_buffer} parameter is reused if not null.
    4. - *
    - * - * @param target a binding to which the target buffer is bound. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30C#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30C#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30C#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30C#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30C#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30C#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access, @Nullable ByteBuffer old_buffer) { - return GL30C.glMapBufferRange(target, offset, length, access, old_buffer); - } - - // --- [ glFlushMappedBufferRange ] --- - - /** - * Indicates modifications to a range of a mapped buffer. - * - * @param target the target of the flush operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the start of the buffer subrange, in basic machine units - * @param length the length of the buffer subrange, in basic machine units - * - * @see Reference Page - */ - public static void glFlushMappedBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length) { - GL30C.glFlushMappedBufferRange(target, offset, length); - } - - // --- [ glClampColor ] --- - - /** - * Controls color clamping. - * - * @param target target for color clamping. Must be:
    {@link GL30C#GL_CLAMP_READ_COLOR CLAMP_READ_COLOR}
    - * @param clamp whether to apply color clamping. One of:
    {@link GL11#GL_TRUE TRUE}{@link GL11#GL_FALSE FALSE}{@link GL30C#GL_FIXED_ONLY FIXED_ONLY}
    - * - * @see Reference Page - */ - public static void glClampColor(@NativeType("GLenum") int target, @NativeType("GLenum") int clamp) { - GL30C.glClampColor(target, clamp); - } - - // --- [ glIsRenderbuffer ] --- - - /** - * Determines if a name corresponds to a renderbuffer object. - * - * @param renderbuffer a value that may be the name of a renderbuffer object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsRenderbuffer(@NativeType("GLuint") int renderbuffer) { - return GL30C.glIsRenderbuffer(renderbuffer); - } - - // --- [ glBindRenderbuffer ] --- - - /** - * Binds a renderbuffer to a renderbuffer target. - * - * @param target the renderbuffer target of the binding operation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of the renderbuffer object to bind - * - * @see Reference Page - */ - public static void glBindRenderbuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int renderbuffer) { - GL30C.glBindRenderbuffer(target, renderbuffer); - } - - // --- [ glDeleteRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteRenderbuffers DeleteRenderbuffers} - * - * @param n the number of renderbuffer objects to be deleted - */ - public static void nglDeleteRenderbuffers(int n, long renderbuffers) { - GL30C.nglDeleteRenderbuffers(n, renderbuffers); - } - - /** - * Deletes renderbuffer objects. - * - * @param renderbuffers an array containing {@code n} renderbuffer objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") IntBuffer renderbuffers) { - GL30C.glDeleteRenderbuffers(renderbuffers); - } - - /** - * Deletes renderbuffer objects. - * - * @see Reference Page - */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") int renderbuffer) { - GL30C.glDeleteRenderbuffers(renderbuffer); - } - - // --- [ glGenRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glGenRenderbuffers GenRenderbuffers} - * - * @param n the number of renderbuffer object names to generate - */ - public static void nglGenRenderbuffers(int n, long renderbuffers) { - GL30C.nglGenRenderbuffers(n, renderbuffers); - } - - /** - * Generates renderbuffer object names. - * - * @param renderbuffers a buffer in which the generated renderbuffer object names are stored - * - * @see Reference Page - */ - public static void glGenRenderbuffers(@NativeType("GLuint *") IntBuffer renderbuffers) { - GL30C.glGenRenderbuffers(renderbuffers); - } - - /** - * Generates renderbuffer object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenRenderbuffers() { - return GL30C.glGenRenderbuffers(); - } - - // --- [ glRenderbufferStorage ] --- - - /** - * Establishes data storage, format and dimensions of a renderbuffer object's image. - * - * @param target the target of the allocation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static void glRenderbufferStorage(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL30C.glRenderbufferStorage(target, internalformat, width, height); - } - - // --- [ glRenderbufferStorageMultisample ] --- - - /** - * Establishes data storage, format, dimensions and sample count of a renderbuffer object's image. - * - *

    {@link #glRenderbufferStorage RenderbufferStorage} is equivalent to calling this method with the samples set to zero.

    - * - * @param target the target of the allocation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param samples the number of samples to be used for the renderbuffer object's storage - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static void glRenderbufferStorageMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL30C.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); - } - - // --- [ glGetRenderbufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetRenderbufferParameteriv GetRenderbufferParameteriv} */ - public static void nglGetRenderbufferParameteriv(int target, int pname, long params) { - GL30C.nglGetRenderbufferParameteriv(target, pname, params); - } - - /** - * Retrieves information about a bound renderbuffer object. - * - * @param target the target of the query operation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30C#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30C#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30C#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30C#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30C#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30C#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30C#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30C#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30C#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30C#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetRenderbufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL30C.glGetRenderbufferParameteriv(target, pname, params); - } - - /** - * Retrieves information about a bound renderbuffer object. - * - * @param target the target of the query operation. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30C#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30C#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30C#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30C#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30C#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30C#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30C#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30C#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30C#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30C#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetRenderbufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL30C.glGetRenderbufferParameteri(target, pname); - } - - // --- [ glIsFramebuffer ] --- - - /** - * Determines if a name corresponds to a framebuffer object. - * - * @param framebuffer a value that may be the name of a framebuffer object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsFramebuffer(@NativeType("GLuint") int framebuffer) { - return GL30C.glIsFramebuffer(framebuffer); - } - - // --- [ glBindFramebuffer ] --- - - /** - * Binds a framebuffer to a framebuffer target. - * - * @param target the framebuffer target of the binding operation. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param framebuffer the name of the framebuffer object to bind - * - * @see Reference Page - */ - public static void glBindFramebuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int framebuffer) { - GL30C.glBindFramebuffer(target, framebuffer); - } - - // --- [ glDeleteFramebuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteFramebuffers DeleteFramebuffers} - * - * @param n the number of framebuffer objects to be deleted - */ - public static void nglDeleteFramebuffers(int n, long framebuffers) { - GL30C.nglDeleteFramebuffers(n, framebuffers); - } - - /** - * Deletes framebuffer objects. - * - * @param framebuffers an array containing {@code n} framebuffer objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") IntBuffer framebuffers) { - GL30C.glDeleteFramebuffers(framebuffers); - } - - /** - * Deletes framebuffer objects. - * - * @see Reference Page - */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") int framebuffer) { - GL30C.glDeleteFramebuffers(framebuffer); - } - - // --- [ glGenFramebuffers ] --- - - /** - * Unsafe version of: {@link #glGenFramebuffers GenFramebuffers} - * - * @param n the number of framebuffer object names to generate - */ - public static void nglGenFramebuffers(int n, long framebuffers) { - GL30C.nglGenFramebuffers(n, framebuffers); - } - - /** - * Generates framebuffer object names. - * - * @param framebuffers a buffer in which the generated framebuffer object names are stored - * - * @see Reference Page - */ - public static void glGenFramebuffers(@NativeType("GLuint *") IntBuffer framebuffers) { - GL30C.glGenFramebuffers(framebuffers); - } - - /** - * Generates framebuffer object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenFramebuffers() { - return GL30C.glGenFramebuffers(); - } - - // --- [ glCheckFramebufferStatus ] --- - - /** - * Checks the completeness status of a framebuffer. - * - * @param target the target of the framebuffer completeness check. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static int glCheckFramebufferStatus(@NativeType("GLenum") int target) { - return GL30C.glCheckFramebufferStatus(target); - } - - // --- [ glFramebufferTexture1D ] --- - - /** - * Attaches a level of a 1D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static void glFramebufferTexture1D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL30C.glFramebufferTexture1D(target, attachment, textarget, texture, level); - } - - // --- [ glFramebufferTexture2D ] --- - - /** - * Attaches a level of a 2D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static void glFramebufferTexture2D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL30C.glFramebufferTexture2D(target, attachment, textarget, texture, level); - } - - // --- [ glFramebufferTexture3D ] --- - - /** - * Attaches a layer of a 3D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of a 2-dimensional image within the 3-dimensional texture. - * - * @see Reference Page - */ - public static void glFramebufferTexture3D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer) { - GL30C.glFramebufferTexture3D(target, attachment, textarget, texture, level, layer); - } - - // --- [ glFramebufferTextureLayer ] --- - - /** - * Attaches a single layer of a texture to a framebuffer - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of {@code texture} to attach. - * - * @see Reference Page - */ - public static void glFramebufferTextureLayer(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer) { - GL30C.glFramebufferTextureLayer(target, attachment, texture, level, layer); - } - - // --- [ glFramebufferRenderbuffer ] --- - - /** - * Attaches a renderbuffer as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param renderbuffertarget the renderbuffer target. Must be:
    {@link GL30C#GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of an existing renderbuffer object of type {@code renderbuffertarget} to attach - * - * @see Reference Page - */ - public static void glFramebufferRenderbuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer) { - GL30C.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); - } - - // --- [ glGetFramebufferAttachmentParameteriv ] --- - - /** Unsafe version of: {@link #glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv} */ - public static void nglGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, long params) { - GL30C.nglGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - } - - /** - * Retrievees information about attachments of a bound framebuffer object. - * - * @param target the target of the query operation. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment within {@code target}. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetFramebufferAttachmentParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL30C.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - } - - /** - * Retrievees information about attachments of a bound framebuffer object. - * - * @param target the target of the query operation. One of:
    {@link GL30C#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30C#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30C#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment within {@code target}. One of:
    {@link GL30C#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30C#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30C#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30C#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30C#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30C#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30C#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30C#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30C#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30C#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30C#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30C#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30C#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30C#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30C#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30C#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30C#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30C#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30C#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30C#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30C#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30C#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30C#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30C#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30C#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30C#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30C#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30C#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30C#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30C#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30C#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30C#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30C#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30C#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30C#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30C#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetFramebufferAttachmentParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - return GL30C.glGetFramebufferAttachmentParameteri(target, attachment, pname); - } - - // --- [ glBlitFramebuffer ] --- - - /** - * Copies a block of pixels from the read framebuffer to the draw framebuffer. - * - * @param srcX0 the lower-left coordinate of the source rectangle within the read buffer - * @param srcY0 the upper-left coordinate of the source rectangle within the read buffer - * @param srcX1 the lower-right coordinate of the source rectangle within the read buffer - * @param srcY1 the upper-right coordinate of the source rectangle within the read buffer - * @param dstX0 the lower-left coordinate of the destination rectangle within the write buffer - * @param dstY0 the upper-left coordinate of the destination rectangle within the write buffer - * @param dstX1 the lower-right coordinate of the destination rectangle within the write buffer - * @param dstY1 the upper-right coordinate of the destination rectangle within the write buffer - * @param mask the bitwise OR of the flags indicating which buffers are to be copied. One of:
    {@link GL11#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * @param filter the interpolation to be applied if the image is stretched. One of:
    {@link GL11#GL_NEAREST NEAREST}{@link GL11#GL_LINEAR LINEAR}
    - * - * @see Reference Page - */ - public static void glBlitFramebuffer(@NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter) { - GL30C.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); - } - - // --- [ glGenerateMipmap ] --- - - /** - * Generate mipmaps for a specified texture target. - * - * @param target the target to which the texture whose mimaps to generate is bound. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30C#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL30C#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * - * @see Reference Page - */ - public static void glGenerateMipmap(@NativeType("GLenum") int target) { - GL30C.glGenerateMipmap(target); - } - - // --- [ glTexParameterIiv ] --- - - /** Unsafe version of: {@link #glTexParameterIiv TexParameterIiv} */ - public static void nglTexParameterIiv(int target, int pname, long params) { - GL30C.nglTexParameterIiv(target, pname, params); - } - - /** - * Sets the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL30C.glTexParameterIiv(target, pname, params); - } - - /** - * Sets the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTexParameterIi(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int param) { - GL30C.glTexParameterIi(target, pname, param); - } - - // --- [ glTexParameterIuiv ] --- - - /** Unsafe version of: {@link #glTexParameterIuiv TexParameterIuiv} */ - public static void nglTexParameterIuiv(int target, int pname, long params) { - GL30C.nglTexParameterIuiv(target, pname, params); - } - - /** - * Sets the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - GL30C.glTexParameterIuiv(target, pname, params); - } - - /** - * Sets the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTexParameterIui(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int param) { - GL30C.glTexParameterIui(target, pname, param); - } - - // --- [ glGetTexParameterIiv ] --- - - /** Unsafe version of: {@link #glGetTexParameterIiv GetTexParameterIiv} */ - public static void nglGetTexParameterIiv(int target, int pname, long params) { - GL30C.nglGetTexParameterIiv(target, pname, params); - } - - /** - * Returns the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL30C.glGetTexParameterIiv(target, pname, params); - } - - /** - * Returns the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexParameterIi(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL30C.glGetTexParameterIi(target, pname); - } - - // --- [ glGetTexParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetTexParameterIuiv GetTexParameterIuiv} */ - public static void nglGetTexParameterIuiv(int target, int pname, long params) { - GL30C.nglGetTexParameterIuiv(target, pname, params); - } - - /** - * Returns the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - GL30C.glGetTexParameterIuiv(target, pname, params); - } - - /** - * Returns the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexParameterIui(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL30C.glGetTexParameterIui(target, pname); - } - - // --- [ glColorMaski ] --- - - /** - * Enables and disables writing of frame buffer color components. - * - * @param buf the index of the draw buffer whose color mask to set - * @param r whether R values are written or not - * @param g whether G values are written or not - * @param b whether B values are written or not - * @param a whether A values are written or not - * - * @see Reference Page - */ - public static void glColorMaski(@NativeType("GLuint") int buf, @NativeType("GLboolean") boolean r, @NativeType("GLboolean") boolean g, @NativeType("GLboolean") boolean b, @NativeType("GLboolean") boolean a) { - GL30C.glColorMaski(buf, r, g, b, a); - } - - // --- [ glGetBooleani_v ] --- - - /** Unsafe version of: {@link #glGetBooleani_v GetBooleani_v} */ - public static void nglGetBooleani_v(int target, int index, long data) { - GL30C.nglGetBooleani_v(target, index, data); - } - - /** - * Queries the boolean value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetBooleani_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLboolean *") ByteBuffer data) { - GL30C.glGetBooleani_v(target, index, data); - } - - /** - * Queries the boolean value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static boolean glGetBooleani(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL30C.glGetBooleani(target, index); - } - - // --- [ glGetIntegeri_v ] --- - - /** Unsafe version of: {@link #glGetIntegeri_v GetIntegeri_v} */ - public static void nglGetIntegeri_v(int target, int index, long data) { - GL30C.nglGetIntegeri_v(target, index, data); - } - - /** - * Queries the integer value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetIntegeri_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer data) { - GL30C.glGetIntegeri_v(target, index, data); - } - - /** - * Queries the integer value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetIntegeri(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL30C.glGetIntegeri(target, index); - } - - // --- [ glEnablei ] --- - - /** - * Enables an indexed capability. - * - * @param cap the indexed capability to enable - * @param index the index to enable - * - * @see Reference Page - */ - public static void glEnablei(@NativeType("GLenum") int cap, @NativeType("GLuint") int index) { - GL30C.glEnablei(cap, index); - } - - // --- [ glDisablei ] --- - - /** - * Disables an indexed capability. - * - * @param target the indexed capability to disable - * @param index the index to disable - * - * @see Reference Page - */ - public static void glDisablei(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - GL30C.glDisablei(target, index); - } - - // --- [ glIsEnabledi ] --- - - /** - * Tests whether an indexed capability is enabled. - * - * @param target the indexed capability to query - * @param index the index to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsEnabledi(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL30C.glIsEnabledi(target, index); - } - - // --- [ glBindBufferRange ] --- - - /** - * Binds a range within a buffer object to an indexed buffer target. - * - * @param target the target of the bind operation. One of:
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}
    - * @param index the index of the binding point within the array specified by {@code target} - * @param buffer a buffer object to bind to the specified binding point - * @param offset the starting offset in basic machine units into the buffer object {@code buffer} - * @param size the amount of data in machine units that can be read from the buffer object while used as an indexed target - * - * @see Reference Page - */ - public static void glBindBufferRange(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL30C.glBindBufferRange(target, index, buffer, offset, size); - } - - // --- [ glBindBufferBase ] --- - - /** - * Binds a buffer object to an indexed buffer target. - * - * @param target the target of the bind operation. One of:
    {@link GL30C#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}
    - * @param index the index of the binding point within the array specified by {@code target} - * @param buffer a buffer object to bind to the specified binding point - * - * @see Reference Page - */ - public static void glBindBufferBase(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer) { - GL30C.glBindBufferBase(target, index, buffer); - } - - // --- [ glBeginTransformFeedback ] --- - - /** - * Starts transform feedback operation. - * - * @param primitiveMode the output type of the primitives that will be recorded into the buffer objects that are bound for transform feedback. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLES TRIANGLES}
    - * - * @see Reference Page - */ - public static void glBeginTransformFeedback(@NativeType("GLenum") int primitiveMode) { - GL30C.glBeginTransformFeedback(primitiveMode); - } - - // --- [ glEndTransformFeedback ] --- - - /** - * Ends transform feedback operation. - * - * @see Reference Page - */ - public static void glEndTransformFeedback() { - GL30C.glEndTransformFeedback(); - } - - // --- [ glTransformFeedbackVaryings ] --- - - /** - * Unsafe version of: {@link #glTransformFeedbackVaryings TransformFeedbackVaryings} - * - * @param count the number of varying variables used for transform feedback - */ - public static void nglTransformFeedbackVaryings(int program, int count, long varyings, int bufferMode) { - GL30C.nglTransformFeedbackVaryings(program, count, varyings, bufferMode); - } - - /** - * Specifies values to record in transform feedback buffers. - * - * @param program the target program object - * @param varyings an array of {@code count} zero-terminated strings specifying the names of the varying variables to use for transform feedback - * @param bufferMode the mode used to capture the varying variables when transform feedback is active. One of:
    {@link GL30C#GL_INTERLEAVED_ATTRIBS INTERLEAVED_ATTRIBS}{@link GL30C#GL_SEPARATE_ATTRIBS SEPARATE_ATTRIBS}
    - * - * @see Reference Page - */ - public static void glTransformFeedbackVaryings(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer varyings, @NativeType("GLenum") int bufferMode) { - GL30C.glTransformFeedbackVaryings(program, varyings, bufferMode); - } - - /** - * Specifies values to record in transform feedback buffers. - * - * @param program the target program object - * @param varyings an array of {@code count} zero-terminated strings specifying the names of the varying variables to use for transform feedback - * @param bufferMode the mode used to capture the varying variables when transform feedback is active. One of:
    {@link GL30C#GL_INTERLEAVED_ATTRIBS INTERLEAVED_ATTRIBS}{@link GL30C#GL_SEPARATE_ATTRIBS SEPARATE_ATTRIBS}
    - * - * @see Reference Page - */ - public static void glTransformFeedbackVaryings(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence[] varyings, @NativeType("GLenum") int bufferMode) { - GL30C.glTransformFeedbackVaryings(program, varyings, bufferMode); - } - - /** - * Specifies values to record in transform feedback buffers. - * - * @param program the target program object - * @param bufferMode the mode used to capture the varying variables when transform feedback is active. One of:
    {@link GL30C#GL_INTERLEAVED_ATTRIBS INTERLEAVED_ATTRIBS}{@link GL30C#GL_SEPARATE_ATTRIBS SEPARATE_ATTRIBS}
    - * - * @see Reference Page - */ - public static void glTransformFeedbackVaryings(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence varying, @NativeType("GLenum") int bufferMode) { - GL30C.glTransformFeedbackVaryings(program, varying, bufferMode); - } - - // --- [ glGetTransformFeedbackVarying ] --- - - /** - * Unsafe version of: {@link #glGetTransformFeedbackVarying GetTransformFeedbackVarying} - * - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code name} - */ - public static void nglGetTransformFeedbackVarying(int program, int index, int bufSize, long length, long size, long type, long name) { - GL30C.nglGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); - } - - /** - * Retrieves information about varying variables selected for transform feedback. - * - * @param program the target program object - * @param index the index of the varying variable whose information to retrieve - * @param length a variable which will receive the number of characters written into {@code name}, excluding the null-terminator. If {@code length} is NULL no length is returned. - * @param size a variable that will receive the size of the varying - * @param type a variable that will receive the type of the varying - * @param name a buffer into which will be written the name of the varying - * - * @see Reference Page - */ - public static void glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - GL30C.glGetTransformFeedbackVarying(program, index, length, size, type, name); - } - - /** - * Retrieves information about varying variables selected for transform feedback. - * - * @param program the target program object - * @param index the index of the varying variable whose information to retrieve - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code name} - * @param size a variable that will receive the size of the varying - * @param type a variable that will receive the type of the varying - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufSize, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return GL30C.glGetTransformFeedbackVarying(program, index, bufSize, size, type); - } - - /** - * Retrieves information about varying variables selected for transform feedback. - * - * @param program the target program object - * @param index the index of the varying variable whose information to retrieve - * @param size a variable that will receive the size of the varying - * @param type a variable that will receive the type of the varying - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetTransformFeedbackVarying(program, index, GL20.glGetProgrami(program, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH), size, type); - } - - // --- [ glBindVertexArray ] --- - - /** - * Binds a vertex array object - * - * @param array the name of the vertex array to bind - * - * @see Reference Page - */ - public static void glBindVertexArray(@NativeType("GLuint") int array) { - GL30C.glBindVertexArray(array); - } - - // --- [ glDeleteVertexArrays ] --- - - /** - * Unsafe version of: {@link #glDeleteVertexArrays DeleteVertexArrays} - * - * @param n the number of vertex array objects to be deleted - */ - public static void nglDeleteVertexArrays(int n, long arrays) { - GL30C.nglDeleteVertexArrays(n, arrays); - } - - /** - * Deletes vertex array objects. - * - * @param arrays an array containing the n names of the objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") IntBuffer arrays) { - GL30C.glDeleteVertexArrays(arrays); - } - - /** - * Deletes vertex array objects. - * - * @see Reference Page - */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") int array) { - GL30C.glDeleteVertexArrays(array); - } - - // --- [ glGenVertexArrays ] --- - - /** - * Unsafe version of: {@link #glGenVertexArrays GenVertexArrays} - * - * @param n the number of vertex array object names to generate - */ - public static void nglGenVertexArrays(int n, long arrays) { - GL30C.nglGenVertexArrays(n, arrays); - } - - /** - * Generates vertex array object names. - * - * @param arrays a buffer in which the generated vertex array object names are stored - * - * @see Reference Page - */ - public static void glGenVertexArrays(@NativeType("GLuint *") IntBuffer arrays) { - GL30C.glGenVertexArrays(arrays); - } - - /** - * Generates vertex array object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenVertexArrays() { - return GL30C.glGenVertexArrays(); - } - - // --- [ glIsVertexArray ] --- - - /** - * Determines if a name corresponds to a vertex array object. - * - * @param array a value that may be the name of a vertex array object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsVertexArray(@NativeType("GLuint") int array) { - return GL30C.glIsVertexArray(array); - } - - /** - * Array version of: {@link #glClearBufferiv ClearBufferiv} - * - * @see Reference Page - */ - public static void glClearBufferiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - GL30C.glClearBufferiv(buffer, drawbuffer, value); - } - - /** - * Array version of: {@link #glClearBufferuiv ClearBufferuiv} - * - * @see Reference Page - */ - public static void glClearBufferuiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - GL30C.glClearBufferuiv(buffer, drawbuffer, value); - } - - /** - * Array version of: {@link #glClearBufferfv ClearBufferfv} - * - * @see Reference Page - */ - public static void glClearBufferfv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") float[] value) { - GL30C.glClearBufferfv(buffer, drawbuffer, value); - } - - /** - * Array version of: {@link #glVertexAttribI1iv VertexAttribI1iv} - * - * @see Reference Page - */ - public static void glVertexAttribI1iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL30C.glVertexAttribI1iv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI2iv VertexAttribI2iv} - * - * @see Reference Page - */ - public static void glVertexAttribI2iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL30C.glVertexAttribI2iv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI3iv VertexAttribI3iv} - * - * @see Reference Page - */ - public static void glVertexAttribI3iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL30C.glVertexAttribI3iv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI4iv VertexAttribI4iv} - * - * @see Reference Page - */ - public static void glVertexAttribI4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL30C.glVertexAttribI4iv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI1uiv VertexAttribI1uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI1uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - GL30C.glVertexAttribI1uiv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI2uiv VertexAttribI2uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI2uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - GL30C.glVertexAttribI2uiv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI3uiv VertexAttribI3uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI3uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - GL30C.glVertexAttribI3uiv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI4uiv VertexAttribI4uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - GL30C.glVertexAttribI4uiv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI4sv VertexAttribI4sv} - * - * @see Reference Page - */ - public static void glVertexAttribI4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - GL30C.glVertexAttribI4sv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribI4usv VertexAttribI4usv} - * - * @see Reference Page - */ - public static void glVertexAttribI4usv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - GL30C.glVertexAttribI4usv(index, v); - } - - /** - * Array version of: {@link #glGetVertexAttribIiv GetVertexAttribIiv} - * - * @see Reference Page - */ - public static void glGetVertexAttribIiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL30C.glGetVertexAttribIiv(index, pname, params); - } - - /** - * Array version of: {@link #glGetVertexAttribIuiv GetVertexAttribIuiv} - * - * @see Reference Page - */ - public static void glGetVertexAttribIuiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - GL30C.glGetVertexAttribIuiv(index, pname, params); - } - - /** - * Array version of: {@link #glUniform1uiv Uniform1uiv} - * - * @see Reference Page - */ - public static void glUniform1uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL30C.glUniform1uiv(location, value); - } - - /** - * Array version of: {@link #glUniform2uiv Uniform2uiv} - * - * @see Reference Page - */ - public static void glUniform2uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL30C.glUniform2uiv(location, value); - } - - /** - * Array version of: {@link #glUniform3uiv Uniform3uiv} - * - * @see Reference Page - */ - public static void glUniform3uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL30C.glUniform3uiv(location, value); - } - - /** - * Array version of: {@link #glUniform4uiv Uniform4uiv} - * - * @see Reference Page - */ - public static void glUniform4uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL30C.glUniform4uiv(location, value); - } - - /** - * Array version of: {@link #glGetUniformuiv GetUniformuiv} - * - * @see Reference Page - */ - public static void glGetUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - GL30C.glGetUniformuiv(program, location, params); - } - - /** - * Array version of: {@link #glDeleteRenderbuffers DeleteRenderbuffers} - * - * @see Reference Page - */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") int[] renderbuffers) { - GL30C.glDeleteRenderbuffers(renderbuffers); - } - - /** - * Array version of: {@link #glGenRenderbuffers GenRenderbuffers} - * - * @see Reference Page - */ - public static void glGenRenderbuffers(@NativeType("GLuint *") int[] renderbuffers) { - GL30C.glGenRenderbuffers(renderbuffers); - } - - /** - * Array version of: {@link #glGetRenderbufferParameteriv GetRenderbufferParameteriv} - * - * @see Reference Page - */ - public static void glGetRenderbufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL30C.glGetRenderbufferParameteriv(target, pname, params); - } - - /** - * Array version of: {@link #glDeleteFramebuffers DeleteFramebuffers} - * - * @see Reference Page - */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") int[] framebuffers) { - GL30C.glDeleteFramebuffers(framebuffers); - } - - /** - * Array version of: {@link #glGenFramebuffers GenFramebuffers} - * - * @see Reference Page - */ - public static void glGenFramebuffers(@NativeType("GLuint *") int[] framebuffers) { - GL30C.glGenFramebuffers(framebuffers); - } - - /** - * Array version of: {@link #glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv} - * - * @see Reference Page - */ - public static void glGetFramebufferAttachmentParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL30C.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - } - - /** - * Array version of: {@link #glTexParameterIiv TexParameterIiv} - * - * @see Reference Page - */ - public static void glTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL30C.glTexParameterIiv(target, pname, params); - } - - /** - * Array version of: {@link #glTexParameterIuiv TexParameterIuiv} - * - * @see Reference Page - */ - public static void glTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - GL30C.glTexParameterIuiv(target, pname, params); - } - - /** - * Array version of: {@link #glGetTexParameterIiv GetTexParameterIiv} - * - * @see Reference Page - */ - public static void glGetTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL30C.glGetTexParameterIiv(target, pname, params); - } - - /** - * Array version of: {@link #glGetTexParameterIuiv GetTexParameterIuiv} - * - * @see Reference Page - */ - public static void glGetTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - GL30C.glGetTexParameterIuiv(target, pname, params); - } - - /** - * Array version of: {@link #glGetIntegeri_v GetIntegeri_v} - * - * @see Reference Page - */ - public static void glGetIntegeri_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") int[] data) { - GL30C.glGetIntegeri_v(target, index, data); - } - - /** - * Array version of: {@link #glGetTransformFeedbackVarying GetTransformFeedbackVarying} - * - * @see Reference Page - */ - public static void glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLsizei *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - GL30C.glGetTransformFeedbackVarying(program, index, length, size, type, name); - } - - /** - * Array version of: {@link #glDeleteVertexArrays DeleteVertexArrays} - * - * @see Reference Page - */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") int[] arrays) { - GL30C.glDeleteVertexArrays(arrays); - } - - /** - * Array version of: {@link #glGenVertexArrays GenVertexArrays} - * - * @see Reference Page - */ - public static void glGenVertexArrays(@NativeType("GLuint *") int[] arrays) { - GL30C.glGenVertexArrays(arrays); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL30C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL30C.java deleted file mode 100644 index 3188ea75..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL30C.java +++ /dev/null @@ -1,2908 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 3.0. - * - *

    OpenGL 3.0 implementations are guaranteed to support at least versions 1.10, 1.20 and 1.30 of the shading language, - * although versions 1.10 and 1.20 are deprecated in a forward-compatible context.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL30C extends GL21C { - - static { GL.initialize(); } - - /** GetTarget */ - public static final int - GL_MAJOR_VERSION = 0x821B, - GL_MINOR_VERSION = 0x821C, - GL_NUM_EXTENSIONS = 0x821D, - GL_CONTEXT_FLAGS = 0x821E, - GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x1; - - /** Renamed tokens. */ - public static final int - GL_COMPARE_REF_TO_TEXTURE = 0x884E, - GL_CLIP_DISTANCE0 = 0x3000, - GL_CLIP_DISTANCE1 = 0x3001, - GL_CLIP_DISTANCE2 = 0x3002, - GL_CLIP_DISTANCE3 = 0x3003, - GL_CLIP_DISTANCE4 = 0x3004, - GL_CLIP_DISTANCE5 = 0x3005, - GL_CLIP_DISTANCE6 = 0x3006, - GL_CLIP_DISTANCE7 = 0x3007, - GL_MAX_CLIP_DISTANCES = 0xD32, - GL_MAX_VARYING_COMPONENTS = 0x8B4B; - - /** Accepted by the {@code pname} parameters of GetVertexAttribdv, GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIuiv and GetVertexAttribIiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_1D_ARRAY = 0x8DC0, - GL_SAMPLER_2D_ARRAY = 0x8DC1, - GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3, - GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4, - GL_SAMPLER_CUBE_SHADOW = 0x8DC5, - GL_UNSIGNED_INT_VEC2 = 0x8DC6, - GL_UNSIGNED_INT_VEC3 = 0x8DC7, - GL_UNSIGNED_INT_VEC4 = 0x8DC8, - GL_INT_SAMPLER_1D = 0x8DC9, - GL_INT_SAMPLER_2D = 0x8DCA, - GL_INT_SAMPLER_3D = 0x8DCB, - GL_INT_SAMPLER_CUBE = 0x8DCC, - GL_INT_SAMPLER_1D_ARRAY = 0x8DCE, - GL_INT_SAMPLER_2D_ARRAY = 0x8DCF, - GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1, - GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2, - GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3, - GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4, - GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6, - GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904, - GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; - - /** Accepted by the {@code mode} parameter of BeginConditionalRender. */ - public static final int - GL_QUERY_WAIT = 0x8E13, - GL_QUERY_NO_WAIT = 0x8E14, - GL_QUERY_BY_REGION_WAIT = 0x8E15, - GL_QUERY_BY_REGION_NO_WAIT = 0x8E16; - - /** Accepted by the {@code access} parameter of MapBufferRange. */ - public static final int - GL_MAP_READ_BIT = 0x1, - GL_MAP_WRITE_BIT = 0x2, - GL_MAP_INVALIDATE_RANGE_BIT = 0x4, - GL_MAP_INVALIDATE_BUFFER_BIT = 0x8, - GL_MAP_FLUSH_EXPLICIT_BIT = 0x10, - GL_MAP_UNSYNCHRONIZED_BIT = 0x20; - - /** Accepted by the {@code pname} parameter of GetBufferParameteriv. */ - public static final int - GL_BUFFER_ACCESS_FLAGS = 0x911F, - GL_BUFFER_MAP_LENGTH = 0x9120, - GL_BUFFER_MAP_OFFSET = 0x9121; - - /** Accepted by the {@code target} parameter of ClampColor and the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_CLAMP_READ_COLOR = 0x891C; - - /** Accepted by the {@code clamp} parameter of ClampColor. */ - public static final int GL_FIXED_ONLY = 0x891D; - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int - GL_DEPTH_COMPONENT32F = 0x8CAC, - GL_DEPTH32F_STENCIL8 = 0x8CAD; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_RED_TYPE = 0x8C10, - GL_TEXTURE_GREEN_TYPE = 0x8C11, - GL_TEXTURE_BLUE_TYPE = 0x8C12, - GL_TEXTURE_ALPHA_TYPE = 0x8C13, - GL_TEXTURE_DEPTH_TYPE = 0x8C16; - - /** Returned by the {@code params} parameter of GetTexLevelParameter. */ - public static final int GL_UNSIGNED_NORMALIZED = 0x8C17; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_RGBA32F = 0x8814, - GL_RGB32F = 0x8815, - GL_RGBA16F = 0x881A, - GL_RGB16F = 0x881B; - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage. */ - public static final int GL_R11F_G11F_B10F = 0x8C3A; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * GetSeparableFilter, ColorTable, ColorSubTable, and GetColorTable. - */ - public static final int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage. */ - public static final int GL_RGB9_E5 = 0x8C3D; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, SeparableFilter2D, - * GetSeparableFilter, ColorTable, ColorSubTable, and GetColorTable. - */ - public static final int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int GL_TEXTURE_SHARED_SIZE = 0x8C3F; - - /** - * Accepted by the {@code target} parameter of BindFramebuffer, CheckFramebufferStatus, FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and - * GetFramebufferAttachmentParameteriv. - */ - public static final int - GL_FRAMEBUFFER = 0x8D40, - GL_READ_FRAMEBUFFER = 0x8CA8, - GL_DRAW_FRAMEBUFFER = 0x8CA9; - - /** - * Accepted by the {@code target} parameter of BindRenderbuffer, RenderbufferStorage, and GetRenderbufferParameteriv, and returned by - * GetFramebufferAttachmentParameteriv. - */ - public static final int GL_RENDERBUFFER = 0x8D41; - - /** Accepted by the {@code internalformat} parameter of RenderbufferStorage. */ - public static final int - GL_STENCIL_INDEX1 = 0x8D46, - GL_STENCIL_INDEX4 = 0x8D47, - GL_STENCIL_INDEX8 = 0x8D48, - GL_STENCIL_INDEX16 = 0x8D49; - - /** Accepted by the {@code pname} parameter of GetRenderbufferParameteriv. */ - public static final int - GL_RENDERBUFFER_WIDTH = 0x8D42, - GL_RENDERBUFFER_HEIGHT = 0x8D43, - GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, - GL_RENDERBUFFER_RED_SIZE = 0x8D50, - GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, - GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, - GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, - GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, - GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, - GL_RENDERBUFFER_SAMPLES = 0x8CAB; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachmentParameteriv. */ - public static final int - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, - GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, - GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, - GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, - GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, - GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, - GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, - GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, - GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; - - /** Returned in {@code params} by GetFramebufferAttachmentParameteriv. */ - public static final int GL_FRAMEBUFFER_DEFAULT = 0x8218; - - /** Accepted by the {@code attachment} parameter of FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv. */ - public static final int - GL_COLOR_ATTACHMENT0 = 0x8CE0, - GL_COLOR_ATTACHMENT1 = 0x8CE1, - GL_COLOR_ATTACHMENT2 = 0x8CE2, - GL_COLOR_ATTACHMENT3 = 0x8CE3, - GL_COLOR_ATTACHMENT4 = 0x8CE4, - GL_COLOR_ATTACHMENT5 = 0x8CE5, - GL_COLOR_ATTACHMENT6 = 0x8CE6, - GL_COLOR_ATTACHMENT7 = 0x8CE7, - GL_COLOR_ATTACHMENT8 = 0x8CE8, - GL_COLOR_ATTACHMENT9 = 0x8CE9, - GL_COLOR_ATTACHMENT10 = 0x8CEA, - GL_COLOR_ATTACHMENT11 = 0x8CEB, - GL_COLOR_ATTACHMENT12 = 0x8CEC, - GL_COLOR_ATTACHMENT13 = 0x8CED, - GL_COLOR_ATTACHMENT14 = 0x8CEE, - GL_COLOR_ATTACHMENT15 = 0x8CEF, - GL_COLOR_ATTACHMENT16 = 0x8CF0, - GL_COLOR_ATTACHMENT17 = 0x8CF1, - GL_COLOR_ATTACHMENT18 = 0x8CF2, - GL_COLOR_ATTACHMENT19 = 0x8CF3, - GL_COLOR_ATTACHMENT20 = 0x8CF4, - GL_COLOR_ATTACHMENT21 = 0x8CF5, - GL_COLOR_ATTACHMENT22 = 0x8CF6, - GL_COLOR_ATTACHMENT23 = 0x8CF7, - GL_COLOR_ATTACHMENT24 = 0x8CF8, - GL_COLOR_ATTACHMENT25 = 0x8CF9, - GL_COLOR_ATTACHMENT26 = 0x8CFA, - GL_COLOR_ATTACHMENT27 = 0x8CFB, - GL_COLOR_ATTACHMENT28 = 0x8CFC, - GL_COLOR_ATTACHMENT29 = 0x8CFD, - GL_COLOR_ATTACHMENT30 = 0x8CFE, - GL_COLOR_ATTACHMENT31 = 0x8CFF, - GL_DEPTH_ATTACHMENT = 0x8D00, - GL_STENCIL_ATTACHMENT = 0x8D20, - GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_SAMPLES = 0x8D57; - - /** Returned by CheckFramebufferStatus(). */ - public static final int - GL_FRAMEBUFFER_COMPLETE = 0x8CD5, - GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, - GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, - GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, - GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, - GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, - GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, - GL_FRAMEBUFFER_UNDEFINED = 0x8219; - - /** Accepted by the {@code pname} parameters of GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_FRAMEBUFFER_BINDING = 0x8CA6, - GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6, - GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, - GL_RENDERBUFFER_BINDING = 0x8CA7, - GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, - GL_MAX_RENDERBUFFER_SIZE = 0x84E8; - - /** Returned by GetError(). */ - public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x506; - - /** - * Accepted by the {@code format} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage, by the {@code type} parameter of CopyPixels, by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, - * CopyTexImage2D, and RenderbufferStorage, and returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int GL_DEPTH_STENCIL = 0x84F9; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_UNSIGNED_INT_24_8 = 0x84FA; - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorage, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameteriv. - */ - public static final int GL_DEPTH24_STENCIL8 = 0x88F0; - - /** Accepted by the {@code value} parameter of GetTexLevelParameter. */ - public static final int GL_TEXTURE_STENCIL_SIZE = 0x88F1; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, TexSubImage2D, - * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, - * ColorTable, ColorSubTable, and GetColorTable. - * - *

    Accepted by the {@code type} argument of VertexPointer, NormalPointer, ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, and - * VertexAttribPointer.

    - */ - public static final int GL_HALF_FLOAT = 0x140B; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_RGBA32UI = 0x8D70, - GL_RGB32UI = 0x8D71, - GL_RGBA16UI = 0x8D76, - GL_RGB16UI = 0x8D77, - GL_RGBA8UI = 0x8D7C, - GL_RGB8UI = 0x8D7D, - GL_RGBA32I = 0x8D82, - GL_RGB32I = 0x8D83, - GL_RGBA16I = 0x8D88, - GL_RGB16I = 0x8D89, - GL_RGBA8I = 0x8D8E, - GL_RGB8I = 0x8D8F; - - /** Accepted by the {@code format} parameter of TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, DrawPixels and ReadPixels. */ - public static final int - GL_RED_INTEGER = 0x8D94, - GL_GREEN_INTEGER = 0x8D95, - GL_BLUE_INTEGER = 0x8D96, - GL_RGB_INTEGER = 0x8D98, - GL_RGBA_INTEGER = 0x8D99, - GL_BGR_INTEGER = 0x8D9A, - GL_BGRA_INTEGER = 0x8D9B; - - /** Accepted by the {@code target} parameter of TexParameteri, TexParameteriv, TexParameterf, TexParameterfv, GenerateMipmap, and BindTexture. */ - public static final int - GL_TEXTURE_1D_ARRAY = 0x8C18, - GL_TEXTURE_2D_ARRAY = 0x8C1A; - - /** Accepted by the {@code target} parameter of TexImage3D, TexSubImage3D, CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D. */ - public static final int GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B; - - /** - * Accepted by the {@code target} parameter of TexImage2D, TexSubImage2D, CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and - * CompressedTexSubImage2D. - */ - public static final int GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int - GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C, - GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D, - GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2D and the {@code format} parameter of - * CompressedTexSubImage2D. - */ - public static final int - GL_COMPRESSED_RED_RGTC1 = 0x8DBB, - GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, - GL_COMPRESSED_RG_RGTC2 = 0x8DBD, - GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D. */ - public static final int - GL_R8 = 0x8229, - GL_R16 = 0x822A, - GL_RG8 = 0x822B, - GL_RG16 = 0x822C, - GL_R16F = 0x822D, - GL_R32F = 0x822E, - GL_RG16F = 0x822F, - GL_RG32F = 0x8230, - GL_R8I = 0x8231, - GL_R8UI = 0x8232, - GL_R16I = 0x8233, - GL_R16UI = 0x8234, - GL_R32I = 0x8235, - GL_R32UI = 0x8236, - GL_RG8I = 0x8237, - GL_RG8UI = 0x8238, - GL_RG16I = 0x8239, - GL_RG16UI = 0x823A, - GL_RG32I = 0x823B, - GL_RG32UI = 0x823C, - GL_RG = 0x8227, - GL_COMPRESSED_RED = 0x8225, - GL_COMPRESSED_RG = 0x8226; - - /** Accepted by the {@code format} parameter of TexImage3D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and ReadPixels. */ - public static final int GL_RG_INTEGER = 0x8228; - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * BindBufferRange, BindBufferOffset and BindBufferBase. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; - - /** Accepted by the {@code param} parameter of GetIntegeri_v and GetBooleani_v. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84, - GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; - - /** - * Accepted by the {@code param} parameter of GetIntegeri_v and GetBooleani_v, and by the {@code pname} parameter of GetBooleanv, - * GetDoublev, GetIntegerv, and GetFloatv. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; - - /** Accepted by the {@code bufferMode} parameter of TransformFeedbackVaryings. */ - public static final int - GL_INTERLEAVED_ATTRIBS = 0x8C8C, - GL_SEPARATE_ATTRIBS = 0x8C8D; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int - GL_PRIMITIVES_GENERATED = 0x8C87, - GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_RASTERIZER_DISCARD = 0x8C89; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83, - GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F, - GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_VERTEX_ARRAY_BINDING = 0x85B5; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_FRAMEBUFFER_SRGB = 0x8DB9; - - protected GL30C() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetStringi ] --- - - /** Unsafe version of: {@link #glGetStringi GetStringi} */ - public static native long nglGetStringi(int name, int index); - - /** - * Queries indexed string state. - * - * @param name the indexed state to query. One of:
    {@link GL11#GL_EXTENSIONS EXTENSIONS}{@link GL20#GL_SHADING_LANGUAGE_VERSION SHADING_LANGUAGE_VERSION}
    - * @param index the index of the particular element being queried - * - * @see Reference Page - */ - @Nullable - @NativeType("GLubyte const *") - public static String glGetStringi(@NativeType("GLenum") int name, @NativeType("GLuint") int index) { - long __result = nglGetStringi(name, index); - return memUTF8Safe(__result); - } - - // --- [ glClearBufferiv ] --- - - /** Unsafe version of: {@link #glClearBufferiv ClearBufferiv} */ - public static native void nglClearBufferiv(int buffer, int drawbuffer, long value); - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_STENCIL STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For stencil buffers, a pointer to a - * single stencil value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearBufferiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglClearBufferiv(buffer, drawbuffer, memAddress(value)); - } - - // --- [ glClearBufferuiv ] --- - - /** Unsafe version of: {@link #glClearBufferuiv ClearBufferuiv} */ - public static native void nglClearBufferuiv(int buffer, int drawbuffer, long value); - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. Must be:
    {@link GL11#GL_COLOR COLOR}
    - * @param drawbuffer the draw buffer to clear - * @param value a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to - * - * @see Reference Page - */ - public static void glClearBufferuiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - if (CHECKS) { - check(value, 4); - } - nglClearBufferuiv(buffer, drawbuffer, memAddress(value)); - } - - // --- [ glClearBufferfv ] --- - - /** Unsafe version of: {@link #glClearBufferfv ClearBufferfv} */ - public static native void nglClearBufferfv(int buffer, int drawbuffer, long value); - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_DEPTH DEPTH}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For depth buffers, a pointer to a - * single depth value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearBufferfv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglClearBufferfv(buffer, drawbuffer, memAddress(value)); - } - - // --- [ glClearBufferfi ] --- - - /** - * Clears an individual buffer of the currently bound framebuffer object to the {@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} binding. - * - * @param buffer the buffer to clear. Must be:
    {@link #GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param depth the depth value to clear the buffer to - * @param stencil the stencil value to clear the buffer to - * - * @see Reference Page - */ - public static native void glClearBufferfi(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat") float depth, @NativeType("GLint") int stencil); - - // --- [ glVertexAttribI1i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * - * @see Reference Page - */ - public static native void glVertexAttribI1i(@NativeType("GLuint") int index, @NativeType("GLint") int x); - - // --- [ glVertexAttribI2i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * - * @see Reference Page - */ - public static native void glVertexAttribI2i(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y); - - // --- [ glVertexAttribI3i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. The w component is implicitly set to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * - * @see Reference Page - */ - public static native void glVertexAttribI3i(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glVertexAttribI4i ] --- - - /** - * Specifies the value of a pure integer generic vertex attribute. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static native void glVertexAttribI4i(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glVertexAttribI1ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The y and z components are implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * - * @see Reference Page - */ - public static native void glVertexAttribI1ui(@NativeType("GLuint") int index, @NativeType("GLuint") int x); - - // --- [ glVertexAttribI2ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The z component is implicitly set to 0 and w to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * - * @see Reference Page - */ - public static native void glVertexAttribI2ui(@NativeType("GLuint") int index, @NativeType("GLuint") int x, @NativeType("GLuint") int y); - - // --- [ glVertexAttribI3ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. The w component is implicitly set to 1. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * - * @see Reference Page - */ - public static native void glVertexAttribI3ui(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glVertexAttribI4ui ] --- - - /** - * Specifies the value of an unsigned pure integer generic vertex attribute. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static native void glVertexAttribI4ui(@NativeType("GLuint") int index, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glVertexAttribI1iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI1iv VertexAttribI1iv} */ - public static native void nglVertexAttribI1iv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI1i VertexAttribI1i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI1iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribI1iv(index, memAddress(v)); - } - - // --- [ glVertexAttribI2iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI2iv VertexAttribI2iv} */ - public static native void nglVertexAttribI2iv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI2i VertexAttribI2i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI2iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribI2iv(index, memAddress(v)); - } - - // --- [ glVertexAttribI3iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI3iv VertexAttribI3iv} */ - public static native void nglVertexAttribI3iv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI3i VertexAttribI3i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI3iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribI3iv(index, memAddress(v)); - } - - // --- [ glVertexAttribI4iv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4iv VertexAttribI4iv} */ - public static native void nglVertexAttribI4iv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI4i VertexAttribI4i}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4iv(index, memAddress(v)); - } - - // --- [ glVertexAttribI1uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI1uiv VertexAttribI1uiv} */ - public static native void nglVertexAttribI1uiv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI1ui VertexAttribI1ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI1uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribI1uiv(index, memAddress(v)); - } - - // --- [ glVertexAttribI2uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI2uiv VertexAttribI2uiv} */ - public static native void nglVertexAttribI2uiv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI2ui VertexAttribI2ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI2uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribI2uiv(index, memAddress(v)); - } - - // --- [ glVertexAttribI3uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI3uiv VertexAttribI3uiv} */ - public static native void nglVertexAttribI3uiv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI3ui VertexAttribI3ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI3uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribI3uiv(index, memAddress(v)); - } - - // --- [ glVertexAttribI4uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4uiv VertexAttribI4uiv} */ - public static native void nglVertexAttribI4uiv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribI4ui VertexAttribI4ui}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4uiv(index, memAddress(v)); - } - - // --- [ glVertexAttribI4bv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4bv VertexAttribI4bv} */ - public static native void nglVertexAttribI4bv(int index, long v); - - /** - * Byte version of {@link #glVertexAttribI4iv VertexAttribI4iv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4bv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4bv(index, memAddress(v)); - } - - // --- [ glVertexAttribI4sv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4sv VertexAttribI4sv} */ - public static native void nglVertexAttribI4sv(int index, long v); - - /** - * Short version of {@link #glVertexAttribI4iv VertexAttribI4iv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4sv(index, memAddress(v)); - } - - // --- [ glVertexAttribI4ubv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4ubv VertexAttribI4ubv} */ - public static native void nglVertexAttribI4ubv(int index, long v); - - /** - * Byte version of {@link #glVertexAttribI4uiv VertexAttribI4uiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4ubv(@NativeType("GLuint") int index, @NativeType("GLbyte const *") ByteBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4ubv(index, memAddress(v)); - } - - // --- [ glVertexAttribI4usv ] --- - - /** Unsafe version of: {@link #glVertexAttribI4usv VertexAttribI4usv} */ - public static native void nglVertexAttribI4usv(int index, long v); - - /** - * Short version of {@link #glVertexAttribI4uiv VertexAttribI4uiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param v the pure integer vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribI4usv(@NativeType("GLuint") int index, @NativeType("GLshort const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribI4usv(index, memAddress(v)); - } - - // --- [ glVertexAttribIPointer ] --- - - /** Unsafe version of: {@link #glVertexAttribIPointer VertexAttribIPointer} */ - public static native void nglVertexAttribIPointer(int index, int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglVertexAttribIPointer(index, size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglVertexAttribIPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ShortBuffer pointer) { - nglVertexAttribIPointer(index, size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a pure integer vertex attribute array. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. One of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribIPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") IntBuffer pointer) { - nglVertexAttribIPointer(index, size, type, stride, memAddress(pointer)); - } - - // --- [ glGetVertexAttribIiv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribIiv GetVertexAttribIiv} */ - public static native void nglGetVertexAttribIiv(int index, int pname, long params); - - /** - * Returns the value of a pure integer generic vertex attribute parameter. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribIiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribIiv(index, pname, memAddress(params)); - } - - /** - * Returns the value of a pure integer generic vertex attribute parameter. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexAttribIi(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetVertexAttribIiv(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexAttribIuiv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribIuiv GetVertexAttribIuiv} */ - public static native void nglGetVertexAttribIuiv(int index, int pname, long params); - - /** - * Unsigned version of {@link #glGetVertexAttribIiv GetVertexAttribIiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * @param params returns the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribIuiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglGetVertexAttribIuiv(index, pname, memAddress(params)); - } - - /** - * Unsigned version of {@link #glGetVertexAttribIiv GetVertexAttribIiv}. - * - * @param index the index of the pure integer generic vertex attribute to be modified - * @param pname the symbolic name of the vertex attribute parameter to be queried. Must be:
    {@link GL20#GL_CURRENT_VERTEX_ATTRIB CURRENT_VERTEX_ATTRIB}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexAttribIui(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetVertexAttribIuiv(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glUniform1ui ] --- - - /** - * Specifies the value of a uint uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform value - * - * @see Reference Page - */ - public static native void glUniform1ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0); - - // --- [ glUniform2ui ] --- - - /** - * Specifies the value of a uvec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * - * @see Reference Page - */ - public static native void glUniform2ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1); - - // --- [ glUniform3ui ] --- - - /** - * Specifies the value of a uvec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * - * @see Reference Page - */ - public static native void glUniform3ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2); - - // --- [ glUniform4ui ] --- - - /** - * Specifies the value of a uvec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param v0 the uniform x value - * @param v1 the uniform y value - * @param v2 the uniform z value - * @param v3 the uniform w value - * - * @see Reference Page - */ - public static native void glUniform4ui(@NativeType("GLint") int location, @NativeType("GLuint") int v0, @NativeType("GLuint") int v1, @NativeType("GLuint") int v2, @NativeType("GLuint") int v3); - - // --- [ glUniform1uiv ] --- - - /** - * Unsafe version of: {@link #glUniform1uiv Uniform1uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform1uiv(int location, int count, long value); - - /** - * Specifies the value of a single uint uniform variable or a uint uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform1uiv(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2uiv ] --- - - /** - * Unsafe version of: {@link #glUniform2uiv Uniform2uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform2uiv(int location, int count, long value); - - /** - * Specifies the value of a single uvec2 uniform variable or a uvec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform2uiv(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3uiv ] --- - - /** - * Unsafe version of: {@link #glUniform3uiv Uniform3uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform3uiv(int location, int count, long value); - - /** - * Specifies the value of a single uvec3 uniform variable or a uvec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform3uiv(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4uiv ] --- - - /** - * Unsafe version of: {@link #glUniform4uiv Uniform4uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform4uiv(int location, int count, long value); - - /** - * Specifies the value of a single uvec4 uniform variable or a uvec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglUniform4uiv(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glGetUniformuiv ] --- - - /** Unsafe version of: {@link #glGetUniformuiv GetUniformuiv} */ - public static native void nglGetUniformuiv(int program, int location, long params); - - /** - * Returns the uint value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformuiv(program, location, memAddress(params)); - } - - /** - * Returns the uint value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetUniformuiv(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glBindFragDataLocation ] --- - - /** Unsafe version of: {@link #glBindFragDataLocation BindFragDataLocation} */ - public static native void nglBindFragDataLocation(int program, int colorNumber, long name); - - /** - * Binds a user-defined varying out variable to a fragment shader color number. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - nglBindFragDataLocation(program, colorNumber, memAddress(name)); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - nglBindFragDataLocation(program, colorNumber, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetFragDataLocation ] --- - - /** Unsafe version of: {@link #glGetFragDataLocation GetFragDataLocation} */ - public static native int nglGetFragDataLocation(int program, long name); - - /** - * Queries the bindings of color numbers to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose binding to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetFragDataLocation(program, memAddress(name)); - } - - /** - * Queries the bindings of color numbers to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose binding to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataLocation(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetFragDataLocation(program, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glBeginConditionalRender ] --- - - /** - * Starts conditional rendering. - * - * @param id the name of an occlusion query object whose results are used to determine if the rendering commands are discarded - * @param mode how {@code glBeginConditionalRender} interprets the results of the occlusion query. One of:
    {@link #GL_QUERY_WAIT QUERY_WAIT}{@link #GL_QUERY_NO_WAIT QUERY_NO_WAIT}{@link #GL_QUERY_BY_REGION_WAIT QUERY_BY_REGION_WAIT}
    {@link #GL_QUERY_BY_REGION_NO_WAIT QUERY_BY_REGION_NO_WAIT}{@link GL45#GL_QUERY_WAIT_INVERTED QUERY_WAIT_INVERTED}{@link GL45#GL_QUERY_NO_WAIT_INVERTED QUERY_NO_WAIT_INVERTED}
    {@link GL45#GL_QUERY_BY_REGION_WAIT_INVERTED QUERY_BY_REGION_WAIT_INVERTED}{@link GL45#GL_QUERY_BY_REGION_NO_WAIT_INVERTED QUERY_BY_REGION_NO_WAIT_INVERTED}
    - * - * @see Reference Page - */ - public static native void glBeginConditionalRender(@NativeType("GLuint") int id, @NativeType("GLenum") int mode); - - // --- [ glEndConditionalRender ] --- - - /** - * Ends conditional rendering. - * - * @see Reference Page - */ - public static native void glEndConditionalRender(); - - // --- [ glMapBufferRange ] --- - - /** Unsafe version of: {@link #glMapBufferRange MapBufferRange} */ - public static native long nglMapBufferRange(int target, long offset, long length, int access); - - /** - * Maps a section of a buffer object's data store. - * - *

    LWJGL note: This method comes in 2 flavors:

    - * - *
      - *
    1. {@link #glMapBufferRange(int, long, long, int)} - Always returns a new ByteBuffer instance.
    2. - *
    3. {@link #glMapBufferRange(int, long, long, int, ByteBuffer)} - The {@code old_buffer} parameter is reused if not null.
    4. - *
    - * - * @param target a binding to which the target buffer is bound. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link #GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link #GL_MAP_READ_BIT MAP_READ_BIT}{@link #GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link #GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link #GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link #GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link #GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access) { - long __result = nglMapBufferRange(target, offset, length, access); - return memByteBufferSafe(__result, (int)length); - } - - /** - * Maps a section of a buffer object's data store. - * - *

    LWJGL note: This method comes in 2 flavors:

    - * - *
      - *
    1. {@link #glMapBufferRange(int, long, long, int)} - Always returns a new ByteBuffer instance.
    2. - *
    3. {@link #glMapBufferRange(int, long, long, int, ByteBuffer)} - The {@code old_buffer} parameter is reused if not null.
    4. - *
    - * - * @param target a binding to which the target buffer is bound. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link #GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link #GL_MAP_READ_BIT MAP_READ_BIT}{@link #GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link #GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link #GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link #GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link #GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access, @Nullable ByteBuffer old_buffer) { - long __result = nglMapBufferRange(target, offset, length, access); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - // --- [ glFlushMappedBufferRange ] --- - - /** - * Indicates modifications to a range of a mapped buffer. - * - * @param target the target of the flush operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link #GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param offset the start of the buffer subrange, in basic machine units - * @param length the length of the buffer subrange, in basic machine units - * - * @see Reference Page - */ - public static native void glFlushMappedBufferRange(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length); - - // --- [ glClampColor ] --- - - /** - * Controls color clamping. - * - * @param target target for color clamping. Must be:
    {@link #GL_CLAMP_READ_COLOR CLAMP_READ_COLOR}
    - * @param clamp whether to apply color clamping. One of:
    {@link GL11#GL_TRUE TRUE}{@link GL11#GL_FALSE FALSE}{@link #GL_FIXED_ONLY FIXED_ONLY}
    - * - * @see Reference Page - */ - public static native void glClampColor(@NativeType("GLenum") int target, @NativeType("GLenum") int clamp); - - // --- [ glIsRenderbuffer ] --- - - /** - * Determines if a name corresponds to a renderbuffer object. - * - * @param renderbuffer a value that may be the name of a renderbuffer object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsRenderbuffer(@NativeType("GLuint") int renderbuffer); - - // --- [ glBindRenderbuffer ] --- - - /** - * Binds a renderbuffer to a renderbuffer target. - * - * @param target the renderbuffer target of the binding operation. Must be:
    {@link #GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of the renderbuffer object to bind - * - * @see Reference Page - */ - public static native void glBindRenderbuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int renderbuffer); - - // --- [ glDeleteRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteRenderbuffers DeleteRenderbuffers} - * - * @param n the number of renderbuffer objects to be deleted - */ - public static native void nglDeleteRenderbuffers(int n, long renderbuffers); - - /** - * Deletes renderbuffer objects. - * - * @param renderbuffers an array containing {@code n} renderbuffer objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") IntBuffer renderbuffers) { - nglDeleteRenderbuffers(renderbuffers.remaining(), memAddress(renderbuffers)); - } - - /** - * Deletes renderbuffer objects. - * - * @see Reference Page - */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") int renderbuffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer renderbuffers = stack.ints(renderbuffer); - nglDeleteRenderbuffers(1, memAddress(renderbuffers)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glGenRenderbuffers GenRenderbuffers} - * - * @param n the number of renderbuffer object names to generate - */ - public static native void nglGenRenderbuffers(int n, long renderbuffers); - - /** - * Generates renderbuffer object names. - * - * @param renderbuffers a buffer in which the generated renderbuffer object names are stored - * - * @see Reference Page - */ - public static void glGenRenderbuffers(@NativeType("GLuint *") IntBuffer renderbuffers) { - nglGenRenderbuffers(renderbuffers.remaining(), memAddress(renderbuffers)); - } - - /** - * Generates renderbuffer object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenRenderbuffers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer renderbuffers = stack.callocInt(1); - nglGenRenderbuffers(1, memAddress(renderbuffers)); - return renderbuffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glRenderbufferStorage ] --- - - /** - * Establishes data storage, format and dimensions of a renderbuffer object's image. - * - * @param target the target of the allocation. Must be:
    {@link #GL_RENDERBUFFER RENDERBUFFER}
    - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static native void glRenderbufferStorage(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glRenderbufferStorageMultisample ] --- - - /** - * Establishes data storage, format, dimensions and sample count of a renderbuffer object's image. - * - *

    {@link #glRenderbufferStorage RenderbufferStorage} is equivalent to calling this method with the samples set to zero.

    - * - * @param target the target of the allocation. Must be:
    {@link #GL_RENDERBUFFER RENDERBUFFER}
    - * @param samples the number of samples to be used for the renderbuffer object's storage - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static native void glRenderbufferStorageMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glGetRenderbufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetRenderbufferParameteriv GetRenderbufferParameteriv} */ - public static native void nglGetRenderbufferParameteriv(int target, int pname, long params); - - /** - * Retrieves information about a bound renderbuffer object. - * - * @param target the target of the query operation. Must be:
    {@link #GL_RENDERBUFFER RENDERBUFFER}
    - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link #GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link #GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link #GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link #GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link #GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link #GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link #GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link #GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link #GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link #GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetRenderbufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetRenderbufferParameteriv(target, pname, memAddress(params)); - } - - /** - * Retrieves information about a bound renderbuffer object. - * - * @param target the target of the query operation. Must be:
    {@link #GL_RENDERBUFFER RENDERBUFFER}
    - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link #GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link #GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link #GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link #GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link #GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link #GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link #GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link #GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link #GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link #GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetRenderbufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetRenderbufferParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsFramebuffer ] --- - - /** - * Determines if a name corresponds to a framebuffer object. - * - * @param framebuffer a value that may be the name of a framebuffer object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsFramebuffer(@NativeType("GLuint") int framebuffer); - - // --- [ glBindFramebuffer ] --- - - /** - * Binds a framebuffer to a framebuffer target. - * - * @param target the framebuffer target of the binding operation. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param framebuffer the name of the framebuffer object to bind - * - * @see Reference Page - */ - public static native void glBindFramebuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int framebuffer); - - // --- [ glDeleteFramebuffers ] --- - - /** - * Unsafe version of: {@link #glDeleteFramebuffers DeleteFramebuffers} - * - * @param n the number of framebuffer objects to be deleted - */ - public static native void nglDeleteFramebuffers(int n, long framebuffers); - - /** - * Deletes framebuffer objects. - * - * @param framebuffers an array containing {@code n} framebuffer objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") IntBuffer framebuffers) { - nglDeleteFramebuffers(framebuffers.remaining(), memAddress(framebuffers)); - } - - /** - * Deletes framebuffer objects. - * - * @see Reference Page - */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") int framebuffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer framebuffers = stack.ints(framebuffer); - nglDeleteFramebuffers(1, memAddress(framebuffers)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenFramebuffers ] --- - - /** - * Unsafe version of: {@link #glGenFramebuffers GenFramebuffers} - * - * @param n the number of framebuffer object names to generate - */ - public static native void nglGenFramebuffers(int n, long framebuffers); - - /** - * Generates framebuffer object names. - * - * @param framebuffers a buffer in which the generated framebuffer object names are stored - * - * @see Reference Page - */ - public static void glGenFramebuffers(@NativeType("GLuint *") IntBuffer framebuffers) { - nglGenFramebuffers(framebuffers.remaining(), memAddress(framebuffers)); - } - - /** - * Generates framebuffer object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenFramebuffers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer framebuffers = stack.callocInt(1); - nglGenFramebuffers(1, memAddress(framebuffers)); - return framebuffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCheckFramebufferStatus ] --- - - /** - * Checks the completeness status of a framebuffer. - * - * @param target the target of the framebuffer completeness check. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static native int glCheckFramebufferStatus(@NativeType("GLenum") int target); - - // --- [ glFramebufferTexture1D ] --- - - /** - * Attaches a level of a 1D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link #GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link #GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link #GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link #GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link #GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link #GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link #GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link #GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link #GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link #GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link #GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link #GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link #GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link #GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link #GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link #GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link #GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link #GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link #GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link #GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link #GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link #GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link #GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link #GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link #GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link #GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link #GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link #GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link #GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link #GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link #GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link #GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link #GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link #GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link #GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static native void glFramebufferTexture1D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glFramebufferTexture2D ] --- - - /** - * Attaches a level of a 2D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link #GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link #GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link #GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link #GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link #GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link #GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link #GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link #GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link #GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link #GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link #GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link #GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link #GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link #GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link #GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link #GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link #GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link #GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link #GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link #GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link #GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link #GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link #GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link #GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link #GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link #GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link #GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link #GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link #GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link #GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link #GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link #GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link #GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link #GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link #GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static native void glFramebufferTexture2D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glFramebufferTexture3D ] --- - - /** - * Attaches a layer of a 3D texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link #GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link #GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link #GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link #GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link #GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link #GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link #GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link #GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link #GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link #GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link #GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link #GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link #GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link #GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link #GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link #GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link #GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link #GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link #GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link #GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link #GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link #GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link #GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link #GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link #GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link #GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link #GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link #GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link #GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link #GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link #GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link #GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link #GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link #GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link #GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param textarget the type of texture - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of a 2-dimensional image within the 3-dimensional texture. - * - * @see Reference Page - */ - public static native void glFramebufferTexture3D(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int textarget, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer); - - // --- [ glFramebufferTextureLayer ] --- - - /** - * Attaches a single layer of a texture to a framebuffer - * - * @param target the framebuffer target. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link #GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link #GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link #GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link #GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link #GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link #GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link #GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link #GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link #GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link #GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link #GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link #GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link #GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link #GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link #GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link #GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link #GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link #GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link #GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link #GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link #GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link #GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link #GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link #GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link #GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link #GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link #GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link #GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link #GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link #GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link #GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link #GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link #GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link #GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link #GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of {@code texture} to attach. - * - * @see Reference Page - */ - public static native void glFramebufferTextureLayer(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer); - - // --- [ glFramebufferRenderbuffer ] --- - - /** - * Attaches a renderbuffer as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link #GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link #GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link #GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link #GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link #GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link #GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link #GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link #GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link #GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link #GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link #GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link #GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link #GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link #GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link #GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link #GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link #GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link #GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link #GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link #GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link #GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link #GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link #GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link #GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link #GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link #GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link #GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link #GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link #GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link #GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link #GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link #GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link #GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link #GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link #GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param renderbuffertarget the renderbuffer target. Must be:
    {@link #GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of an existing renderbuffer object of type {@code renderbuffertarget} to attach - * - * @see Reference Page - */ - public static native void glFramebufferRenderbuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer); - - // --- [ glGetFramebufferAttachmentParameteriv ] --- - - /** Unsafe version of: {@link #glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv} */ - public static native void nglGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, long params); - - /** - * Retrievees information about attachments of a bound framebuffer object. - * - * @param target the target of the query operation. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment within {@code target}. One of:
    {@link #GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link #GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link #GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link #GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link #GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link #GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link #GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link #GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link #GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link #GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link #GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link #GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link #GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link #GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link #GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link #GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link #GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link #GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link #GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link #GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link #GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link #GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link #GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link #GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link #GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link #GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link #GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link #GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link #GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link #GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link #GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link #GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link #GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link #GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link #GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link #GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link #GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link #GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link #GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link #GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link #GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetFramebufferAttachmentParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFramebufferAttachmentParameteriv(target, attachment, pname, memAddress(params)); - } - - /** - * Retrievees information about attachments of a bound framebuffer object. - * - * @param target the target of the query operation. One of:
    {@link #GL_FRAMEBUFFER FRAMEBUFFER}{@link #GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link #GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment within {@code target}. One of:
    {@link #GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link #GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link #GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link #GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link #GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link #GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link #GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link #GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link #GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link #GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link #GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link #GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link #GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link #GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link #GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link #GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link #GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link #GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link #GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link #GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link #GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link #GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link #GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link #GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link #GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link #GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link #GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link #GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link #GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link #GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link #GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link #GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link #GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link #GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link #GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link #GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link #GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link #GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link #GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link #GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link #GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link #GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetFramebufferAttachmentParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetFramebufferAttachmentParameteriv(target, attachment, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glBlitFramebuffer ] --- - - /** - * Copies a block of pixels from the read framebuffer to the draw framebuffer. - * - * @param srcX0 the lower-left coordinate of the source rectangle within the read buffer - * @param srcY0 the upper-left coordinate of the source rectangle within the read buffer - * @param srcX1 the lower-right coordinate of the source rectangle within the read buffer - * @param srcY1 the upper-right coordinate of the source rectangle within the read buffer - * @param dstX0 the lower-left coordinate of the destination rectangle within the write buffer - * @param dstY0 the upper-left coordinate of the destination rectangle within the write buffer - * @param dstX1 the lower-right coordinate of the destination rectangle within the write buffer - * @param dstY1 the upper-right coordinate of the destination rectangle within the write buffer - * @param mask the bitwise OR of the flags indicating which buffers are to be copied. One of:
    {@link GL11#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * @param filter the interpolation to be applied if the image is stretched. One of:
    {@link GL11#GL_NEAREST NEAREST}{@link GL11#GL_LINEAR LINEAR}
    - * - * @see Reference Page - */ - public static native void glBlitFramebuffer(@NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter); - - // --- [ glGenerateMipmap ] --- - - /** - * Generate mipmaps for a specified texture target. - * - * @param target the target to which the texture whose mimaps to generate is bound. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link #GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link #GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    - * - * @see Reference Page - */ - public static native void glGenerateMipmap(@NativeType("GLenum") int target); - - // --- [ glTexParameterIiv ] --- - - /** Unsafe version of: {@link #glTexParameterIiv TexParameterIiv} */ - public static native void nglTexParameterIiv(int target, int pname, long params); - - /** - * Sets the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglTexParameterIiv(target, pname, memAddress(params)); - } - - /** - * Sets the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTexParameterIi(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - nglTexParameterIiv(target, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTexParameterIuiv ] --- - - /** Unsafe version of: {@link #glTexParameterIuiv TexParameterIuiv} */ - public static native void nglTexParameterIuiv(int target, int pname, long params); - - /** - * Sets the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglTexParameterIuiv(target, pname, memAddress(params)); - } - - /** - * Sets the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTexParameterIui(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - nglTexParameterIuiv(target, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexParameterIiv ] --- - - /** Unsafe version of: {@link #glGetTexParameterIiv GetTexParameterIiv} */ - public static native void nglGetTexParameterIiv(int target, int pname, long params); - - /** - * Returns the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexParameterIiv(target, pname, memAddress(params)); - } - - /** - * Returns the integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexParameterIi(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTexParameterIiv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTexParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetTexParameterIuiv GetTexParameterIuiv} */ - public static native void nglGetTexParameterIuiv(int target, int pname, long params); - - /** - * Returns the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTexParameterIuiv(target, pname, memAddress(params)); - } - - /** - * Returns the unsigned integer value of a texture parameter. - * - * @param target the texture target - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTexParameterIui(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTexParameterIuiv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glColorMaski ] --- - - /** - * Enables and disables writing of frame buffer color components. - * - * @param buf the index of the draw buffer whose color mask to set - * @param r whether R values are written or not - * @param g whether G values are written or not - * @param b whether B values are written or not - * @param a whether A values are written or not - * - * @see Reference Page - */ - public static native void glColorMaski(@NativeType("GLuint") int buf, @NativeType("GLboolean") boolean r, @NativeType("GLboolean") boolean g, @NativeType("GLboolean") boolean b, @NativeType("GLboolean") boolean a); - - // --- [ glGetBooleani_v ] --- - - /** Unsafe version of: {@link #glGetBooleani_v GetBooleani_v} */ - public static native void nglGetBooleani_v(int target, int index, long data); - - /** - * Queries the boolean value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetBooleani_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLboolean *") ByteBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetBooleani_v(target, index, memAddress(data)); - } - - /** - * Queries the boolean value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static boolean glGetBooleani(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - ByteBuffer data = stack.calloc(1); - nglGetBooleani_v(target, index, memAddress(data)); - return data.get(0) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetIntegeri_v ] --- - - /** Unsafe version of: {@link #glGetIntegeri_v GetIntegeri_v} */ - public static native void nglGetIntegeri_v(int target, int index, long data); - - /** - * Queries the integer value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetIntegeri_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetIntegeri_v(target, index, memAddress(data)); - } - - /** - * Queries the integer value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetIntegeri(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetIntegeri_v(target, index, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glEnablei ] --- - - /** - * Enables an indexed capability. - * - * @param cap the indexed capability to enable - * @param index the index to enable - * - * @see Reference Page - */ - public static native void glEnablei(@NativeType("GLenum") int cap, @NativeType("GLuint") int index); - - // --- [ glDisablei ] --- - - /** - * Disables an indexed capability. - * - * @param target the indexed capability to disable - * @param index the index to disable - * - * @see Reference Page - */ - public static native void glDisablei(@NativeType("GLenum") int target, @NativeType("GLuint") int index); - - // --- [ glIsEnabledi ] --- - - /** - * Tests whether an indexed capability is enabled. - * - * @param target the indexed capability to query - * @param index the index to query - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsEnabledi(@NativeType("GLenum") int target, @NativeType("GLuint") int index); - - // --- [ glBindBufferRange ] --- - - /** - * Binds a range within a buffer object to an indexed buffer target. - * - * @param target the target of the bind operation. One of:
    {@link #GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}
    - * @param index the index of the binding point within the array specified by {@code target} - * @param buffer a buffer object to bind to the specified binding point - * @param offset the starting offset in basic machine units into the buffer object {@code buffer} - * @param size the amount of data in machine units that can be read from the buffer object while used as an indexed target - * - * @see Reference Page - */ - public static native void glBindBufferRange(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size); - - // --- [ glBindBufferBase ] --- - - /** - * Binds a buffer object to an indexed buffer target. - * - * @param target the target of the bind operation. One of:
    {@link #GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}
    - * @param index the index of the binding point within the array specified by {@code target} - * @param buffer a buffer object to bind to the specified binding point - * - * @see Reference Page - */ - public static native void glBindBufferBase(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer); - - // --- [ glBeginTransformFeedback ] --- - - /** - * Starts transform feedback operation. - * - * @param primitiveMode the output type of the primitives that will be recorded into the buffer objects that are bound for transform feedback. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLES TRIANGLES}
    - * - * @see Reference Page - */ - public static native void glBeginTransformFeedback(@NativeType("GLenum") int primitiveMode); - - // --- [ glEndTransformFeedback ] --- - - /** - * Ends transform feedback operation. - * - * @see Reference Page - */ - public static native void glEndTransformFeedback(); - - // --- [ glTransformFeedbackVaryings ] --- - - /** - * Unsafe version of: {@link #glTransformFeedbackVaryings TransformFeedbackVaryings} - * - * @param count the number of varying variables used for transform feedback - */ - public static native void nglTransformFeedbackVaryings(int program, int count, long varyings, int bufferMode); - - /** - * Specifies values to record in transform feedback buffers. - * - * @param program the target program object - * @param varyings an array of {@code count} zero-terminated strings specifying the names of the varying variables to use for transform feedback - * @param bufferMode the mode used to capture the varying variables when transform feedback is active. One of:
    {@link #GL_INTERLEAVED_ATTRIBS INTERLEAVED_ATTRIBS}{@link #GL_SEPARATE_ATTRIBS SEPARATE_ATTRIBS}
    - * - * @see Reference Page - */ - public static void glTransformFeedbackVaryings(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer varyings, @NativeType("GLenum") int bufferMode) { - nglTransformFeedbackVaryings(program, varyings.remaining(), memAddress(varyings), bufferMode); - } - - /** - * Specifies values to record in transform feedback buffers. - * - * @param program the target program object - * @param varyings an array of {@code count} zero-terminated strings specifying the names of the varying variables to use for transform feedback - * @param bufferMode the mode used to capture the varying variables when transform feedback is active. One of:
    {@link #GL_INTERLEAVED_ATTRIBS INTERLEAVED_ATTRIBS}{@link #GL_SEPARATE_ATTRIBS SEPARATE_ATTRIBS}
    - * - * @see Reference Page - */ - public static void glTransformFeedbackVaryings(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence[] varyings, @NativeType("GLenum") int bufferMode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long varyingsAddress = APIUtil.apiArray(stack, MemoryUtil::memASCII, varyings); - nglTransformFeedbackVaryings(program, varyings.length, varyingsAddress, bufferMode); - APIUtil.apiArrayFree(varyingsAddress, varyings.length); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Specifies values to record in transform feedback buffers. - * - * @param program the target program object - * @param bufferMode the mode used to capture the varying variables when transform feedback is active. One of:
    {@link #GL_INTERLEAVED_ATTRIBS INTERLEAVED_ATTRIBS}{@link #GL_SEPARATE_ATTRIBS SEPARATE_ATTRIBS}
    - * - * @see Reference Page - */ - public static void glTransformFeedbackVaryings(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence varying, @NativeType("GLenum") int bufferMode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long varyingsAddress = APIUtil.apiArray(stack, MemoryUtil::memASCII, varying); - nglTransformFeedbackVaryings(program, 1, varyingsAddress, bufferMode); - APIUtil.apiArrayFree(varyingsAddress, 1); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTransformFeedbackVarying ] --- - - /** - * Unsafe version of: {@link #glGetTransformFeedbackVarying GetTransformFeedbackVarying} - * - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code name} - */ - public static native void nglGetTransformFeedbackVarying(int program, int index, int bufSize, long length, long size, long type, long name); - - /** - * Retrieves information about varying variables selected for transform feedback. - * - * @param program the target program object - * @param index the index of the varying variable whose information to retrieve - * @param length a variable which will receive the number of characters written into {@code name}, excluding the null-terminator. If {@code length} is NULL no length is returned. - * @param size a variable that will receive the size of the varying - * @param type a variable that will receive the type of the varying - * @param name a buffer into which will be written the name of the varying - * - * @see Reference Page - */ - public static void glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - nglGetTransformFeedbackVarying(program, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); - } - - /** - * Retrieves information about varying variables selected for transform feedback. - * - * @param program the target program object - * @param index the index of the varying variable whose information to retrieve - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code name} - * @param size a variable that will receive the size of the varying - * @param type a variable that will receive the type of the varying - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufSize, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - if (CHECKS) { - check(size, 1); - check(type, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(bufSize); - nglGetTransformFeedbackVarying(program, index, bufSize, memAddress(length), memAddress(size), memAddress(type), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Retrieves information about varying variables selected for transform feedback. - * - * @param program the target program object - * @param index the index of the varying variable whose information to retrieve - * @param size a variable that will receive the size of the varying - * @param type a variable that will receive the type of the varying - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type) { - return glGetTransformFeedbackVarying(program, index, GL20.glGetProgrami(program, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH), size, type); - } - - // --- [ glBindVertexArray ] --- - - /** - * Binds a vertex array object - * - * @param array the name of the vertex array to bind - * - * @see Reference Page - */ - public static native void glBindVertexArray(@NativeType("GLuint") int array); - - // --- [ glDeleteVertexArrays ] --- - - /** - * Unsafe version of: {@link #glDeleteVertexArrays DeleteVertexArrays} - * - * @param n the number of vertex array objects to be deleted - */ - public static native void nglDeleteVertexArrays(int n, long arrays); - - /** - * Deletes vertex array objects. - * - * @param arrays an array containing the n names of the objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") IntBuffer arrays) { - nglDeleteVertexArrays(arrays.remaining(), memAddress(arrays)); - } - - /** - * Deletes vertex array objects. - * - * @see Reference Page - */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") int array) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer arrays = stack.ints(array); - nglDeleteVertexArrays(1, memAddress(arrays)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenVertexArrays ] --- - - /** - * Unsafe version of: {@link #glGenVertexArrays GenVertexArrays} - * - * @param n the number of vertex array object names to generate - */ - public static native void nglGenVertexArrays(int n, long arrays); - - /** - * Generates vertex array object names. - * - * @param arrays a buffer in which the generated vertex array object names are stored - * - * @see Reference Page - */ - public static void glGenVertexArrays(@NativeType("GLuint *") IntBuffer arrays) { - nglGenVertexArrays(arrays.remaining(), memAddress(arrays)); - } - - /** - * Generates vertex array object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenVertexArrays() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer arrays = stack.callocInt(1); - nglGenVertexArrays(1, memAddress(arrays)); - return arrays.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsVertexArray ] --- - - /** - * Determines if a name corresponds to a vertex array object. - * - * @param array a value that may be the name of a vertex array object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsVertexArray(@NativeType("GLuint") int array); - - /** - * Array version of: {@link #glClearBufferiv ClearBufferiv} - * - * @see Reference Page - */ - public static void glClearBufferiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glClearBufferiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(buffer, drawbuffer, value, __functionAddress); - } - - /** - * Array version of: {@link #glClearBufferuiv ClearBufferuiv} - * - * @see Reference Page - */ - public static void glClearBufferuiv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glClearBufferuiv; - if (CHECKS) { - check(__functionAddress); - check(value, 4); - } - callPV(buffer, drawbuffer, value, __functionAddress); - } - - /** - * Array version of: {@link #glClearBufferfv ClearBufferfv} - * - * @see Reference Page - */ - public static void glClearBufferfv(@NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glClearBufferfv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(buffer, drawbuffer, value, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI1iv VertexAttribI1iv} - * - * @see Reference Page - */ - public static void glVertexAttribI1iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI1iv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI2iv VertexAttribI2iv} - * - * @see Reference Page - */ - public static void glVertexAttribI2iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI2iv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI3iv VertexAttribI3iv} - * - * @see Reference Page - */ - public static void glVertexAttribI3iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI3iv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI4iv VertexAttribI4iv} - * - * @see Reference Page - */ - public static void glVertexAttribI4iv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4iv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI1uiv VertexAttribI1uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI1uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI1uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI2uiv VertexAttribI2uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI2uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI2uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI3uiv VertexAttribI3uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI3uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI3uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI4uiv VertexAttribI4uiv} - * - * @see Reference Page - */ - public static void glVertexAttribI4uiv(@NativeType("GLuint") int index, @NativeType("GLuint const *") int[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4uiv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI4sv VertexAttribI4sv} - * - * @see Reference Page - */ - public static void glVertexAttribI4sv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4sv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribI4usv VertexAttribI4usv} - * - * @see Reference Page - */ - public static void glVertexAttribI4usv(@NativeType("GLuint") int index, @NativeType("GLshort const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribI4usv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexAttribIiv GetVertexAttribIiv} - * - * @see Reference Page - */ - public static void glGetVertexAttribIiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribIiv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexAttribIuiv GetVertexAttribIuiv} - * - * @see Reference Page - */ - public static void glGetVertexAttribIuiv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribIuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(index, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glUniform1uiv Uniform1uiv} - * - * @see Reference Page - */ - public static void glUniform1uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform1uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform2uiv Uniform2uiv} - * - * @see Reference Page - */ - public static void glUniform2uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform2uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform3uiv Uniform3uiv} - * - * @see Reference Page - */ - public static void glUniform3uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform3uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform4uiv Uniform4uiv} - * - * @see Reference Page - */ - public static void glUniform4uiv(@NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glUniform4uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glGetUniformuiv GetUniformuiv} - * - * @see Reference Page - */ - public static void glGetUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetUniformuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** - * Array version of: {@link #glDeleteRenderbuffers DeleteRenderbuffers} - * - * @see Reference Page - */ - public static void glDeleteRenderbuffers(@NativeType("GLuint const *") int[] renderbuffers) { - long __functionAddress = GL.getICD().glDeleteRenderbuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(renderbuffers.length, renderbuffers, __functionAddress); - } - - /** - * Array version of: {@link #glGenRenderbuffers GenRenderbuffers} - * - * @see Reference Page - */ - public static void glGenRenderbuffers(@NativeType("GLuint *") int[] renderbuffers) { - long __functionAddress = GL.getICD().glGenRenderbuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(renderbuffers.length, renderbuffers, __functionAddress); - } - - /** - * Array version of: {@link #glGetRenderbufferParameteriv GetRenderbufferParameteriv} - * - * @see Reference Page - */ - public static void glGetRenderbufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetRenderbufferParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glDeleteFramebuffers DeleteFramebuffers} - * - * @see Reference Page - */ - public static void glDeleteFramebuffers(@NativeType("GLuint const *") int[] framebuffers) { - long __functionAddress = GL.getICD().glDeleteFramebuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffers.length, framebuffers, __functionAddress); - } - - /** - * Array version of: {@link #glGenFramebuffers GenFramebuffers} - * - * @see Reference Page - */ - public static void glGenFramebuffers(@NativeType("GLuint *") int[] framebuffers) { - long __functionAddress = GL.getICD().glGenFramebuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffers.length, framebuffers, __functionAddress); - } - - /** - * Array version of: {@link #glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv} - * - * @see Reference Page - */ - public static void glGetFramebufferAttachmentParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetFramebufferAttachmentParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, attachment, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexParameterIiv TexParameterIiv} - * - * @see Reference Page - */ - public static void glTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glTexParameterIiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTexParameterIuiv TexParameterIuiv} - * - * @see Reference Page - */ - public static void glTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - long __functionAddress = GL.getICD().glTexParameterIuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexParameterIiv GetTexParameterIiv} - * - * @see Reference Page - */ - public static void glGetTexParameterIiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTexParameterIiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTexParameterIuiv GetTexParameterIuiv} - * - * @see Reference Page - */ - public static void glGetTexParameterIuiv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetTexParameterIuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetIntegeri_v GetIntegeri_v} - * - * @see Reference Page - */ - public static void glGetIntegeri_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetIntegeri_v; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(target, index, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetTransformFeedbackVarying GetTransformFeedbackVarying} - * - * @see Reference Page - */ - public static void glGetTransformFeedbackVarying(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLsizei *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetTransformFeedbackVarying; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - callPPPPV(program, index, name.remaining(), length, size, type, memAddress(name), __functionAddress); - } - - /** - * Array version of: {@link #glDeleteVertexArrays DeleteVertexArrays} - * - * @see Reference Page - */ - public static void glDeleteVertexArrays(@NativeType("GLuint const *") int[] arrays) { - long __functionAddress = GL.getICD().glDeleteVertexArrays; - if (CHECKS) { - check(__functionAddress); - } - callPV(arrays.length, arrays, __functionAddress); - } - - /** - * Array version of: {@link #glGenVertexArrays GenVertexArrays} - * - * @see Reference Page - */ - public static void glGenVertexArrays(@NativeType("GLuint *") int[] arrays) { - long __functionAddress = GL.getICD().glGenVertexArrays; - if (CHECKS) { - check(__functionAddress); - } - callPV(arrays.length, arrays, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL31.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL31.java deleted file mode 100644 index de4b3b78..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL31.java +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 3.1. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 3.1 implementations support revision 1.40 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL31 extends GL30 { - - static { GL.initialize(); } - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_R8_SNORM = 0x8F94, - GL_RG8_SNORM = 0x8F95, - GL_RGB8_SNORM = 0x8F96, - GL_RGBA8_SNORM = 0x8F97, - GL_R16_SNORM = 0x8F98, - GL_RG16_SNORM = 0x8F99, - GL_RGB16_SNORM = 0x8F9A, - GL_RGBA16_SNORM = 0x8F9B; - - /** Returned by GetTexLevelParameter and GetFramebufferAttachmentParameter. */ - public static final int GL_SIGNED_NORMALIZED = 0x8F9C; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_BUFFER = 0x8DC2, - GL_INT_SAMPLER_2D_RECT = 0x8DCD, - GL_INT_SAMPLER_BUFFER = 0x8DD0, - GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5, - GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8; - - /** - * Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, MapBufferRange, - * FlushMappedBufferRange, GetBufferParameteriv, BindBufferRange, BindBufferBase, and CopyBufferSubData. - */ - public static final int - GL_COPY_READ_BUFFER = 0x8F36, - GL_COPY_WRITE_BUFFER = 0x8F37; - - /** Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled. */ - public static final int GL_PRIMITIVE_RESTART = 0x8F9D; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_PRIMITIVE_RESTART_INDEX = 0x8F9E; - - /** - * Accepted by the {@code target} parameter of BindBuffer, BufferData, BufferSubData, MapBuffer, MapBufferRange, BindTexture, UnmapBuffer, - * GetBufferSubData, GetBufferParameteriv, GetBufferPointerv, and TexBuffer, and the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, and - * GetIntegerv. - */ - public static final int GL_TEXTURE_BUFFER = 0x8C2A; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int - GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B, - GL_TEXTURE_BINDING_BUFFER = 0x8C2C, - GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled; by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and - * GetDoublev; and by the {@code target} parameter of BindTexture, GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, TexParameterfv and - * TexParameteriv. - */ - public static final int GL_TEXTURE_RECTANGLE = 0x84F5; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_RECTANGLE = 0x84F6; - - /** Accepted by the {@code target} parameter of GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv and TexImage2D. */ - public static final int GL_PROXY_TEXTURE_RECTANGLE = 0x84F7; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8; - - /** Returned by {@code type} parameter of GetActiveUniform when the location {@code index} for program object {@code program} is of type sampler2DRect. */ - public static final int GL_SAMPLER_2D_RECT = 0x8B63; - - /** - * Returned by {@code type} parameter of GetActiveUniform when the location {@code index} for program object {@code program} is of type - * sampler2DRectShadow. - */ - public static final int GL_SAMPLER_2D_RECT_SHADOW = 0x8B64; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_UNIFORM_BUFFER = 0x8A11; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_UNIFORM_BUFFER_BINDING = 0x8A28; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v. */ - public static final int - GL_UNIFORM_BUFFER_START = 0x8A29, - GL_UNIFORM_BUFFER_SIZE = 0x8A2A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, - GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, - GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, - GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, - GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, - GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, - GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, - GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, - GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, - GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, - GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; - - /** Accepted by the {@code pname} parameter of GetActiveUniformsiv. */ - public static final int - GL_UNIFORM_TYPE = 0x8A37, - GL_UNIFORM_SIZE = 0x8A38, - GL_UNIFORM_NAME_LENGTH = 0x8A39, - GL_UNIFORM_BLOCK_INDEX = 0x8A3A, - GL_UNIFORM_OFFSET = 0x8A3B, - GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, - GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, - GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int - GL_UNIFORM_BLOCK_BINDING = 0x8A3F, - GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, - GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, - GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, - GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, - GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; - - /** Returned by GetActiveUniformsiv and GetUniformBlockIndex. */ - public static final int GL_INVALID_INDEX = 0xFFFFFFFF; - - protected GL31() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawArraysInstanced ] --- - - /** - * Draw multiple instances of a range of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param first the index of the first vertex to be rendered - * @param count the number of vertices to be rendered - * @param primcount the number of instances of the specified range of vertices to be rendered - * - * @see Reference Page - */ - public static void glDrawArraysInstanced(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count, @NativeType("GLsizei") int primcount) { - GL31C.glDrawArraysInstanced(mode, first, count, primcount); - } - - // --- [ glDrawElementsInstanced ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstanced DrawElementsInstanced} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsInstanced(int mode, int count, int type, long indices, int primcount) { - GL31C.nglDrawElementsInstanced(mode, count, type, indices, primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount) { - GL31C.glDrawElementsInstanced(mode, count, type, indices, primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - GL31C.glDrawElementsInstanced(mode, type, indices, primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - GL31C.glDrawElementsInstanced(mode, indices, primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount) { - GL31C.glDrawElementsInstanced(mode, indices, primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount) { - GL31C.glDrawElementsInstanced(mode, indices, primcount); - } - - // --- [ glCopyBufferSubData ] --- - - /** - * Copies all or part of one buffer object's data store to the data store of another buffer object. - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if any of readoffset, writeoffset, or size are negative, if readoffset+size exceeds the size of the buffer object - * bound to readtarget, or if writeoffset+size exceeds the size of the buffer object bound to writetarget.

    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if the same buffer object is bound to both readtarget and writetarget, and the ranges [readoffset, readoffset+size) - * and [writeoffset, writeoffset+size) overlap.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if zero is bound to readtarget or writetarget.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if the buffer objects bound to either readtarget or writetarget are mapped.

    - * - * @param readTarget the source buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL31C#GL_COPY_READ_BUFFER COPY_READ_BUFFER}{@link GL31C#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}
    {@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31C#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL31C#GL_UNIFORM_BUFFER UNIFORM_BUFFER}
    - * @param writeTarget the destination buffer object target - * @param readOffset the source buffer object offset, in bytes - * @param writeOffset the destination buffer object offset, in bytes - * @param size the number of bytes to copy - * - * @see Reference Page - */ - public static void glCopyBufferSubData(@NativeType("GLenum") int readTarget, @NativeType("GLenum") int writeTarget, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size) { - GL31C.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); - } - - // --- [ glPrimitiveRestartIndex ] --- - - /** - * Specifies the primitive restart index. - * - * @param index the value to be interpreted as the primitive restart index - * - * @see Reference Page - */ - public static void glPrimitiveRestartIndex(@NativeType("GLuint") int index) { - GL31C.glPrimitiveRestartIndex(index); - } - - // --- [ glTexBuffer ] --- - - /** - * Attaches the storage for the buffer object named {@code buffer} to the active buffer texture, and specifies an internal format for the texel array found - * in the attached buffer object. If {@code buffer} is zero, any buffer object attached to the buffer texture is detached, and no new buffer object is - * attached. If {@code buffer} is non-zero, but is not the name of an existing buffer object, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. - * - *

    When a buffer object is attached to a buffer texture, the buffer object's data store is taken as the texture's texel array. The number of texels in the - * buffer texture's texel array is given by

    - * - *

    {@code floor(buffer_size / (components * sizeof(base_type))},

    - * - *

    where {@code buffer_size} is the size of the buffer object, in basic machine units and {@code components} and {@code base_type} are the element count - * and base data type for elements. The number of texels in the texel array is then clamped to the implementation-dependent limit {@link GL31C#GL_MAX_TEXTURE_BUFFER_SIZE MAX_TEXTURE_BUFFER_SIZE}. - * When a buffer texture is accessed in a shader, the results of a texel fetch are undefined if the specified texel number is greater than or equal to the - * clamped number of texels in the texel array.

    - * - *

    When a buffer texture is accessed in a shader, an integer is provided to indicate the texel number being accessed. If no buffer object is bound to the - * buffer texture, the results of the texel access are undefined. Otherwise, the attached buffer object's data store is interpreted as an array of elements - * of the GL data type corresponding to {@code internalformat}. Each texel consists of one to four elements that are mapped to texture components - * (R, G, B, A, L, and I). Element {@code m} of the texel numbered {@code n} is taken from element {@code n} * {@code components} + {@code m} of the - * attached buffer object's data store. Elements and texels are both numbered starting with zero. For texture formats with normalized components, the - * extracted values are converted to floating-point values. The components of the texture are then converted to an (R,G,B,A) vector, and returned to the - * shader as a four-component result vector with components of the appropriate data type for the texture's internal format.

    - * - * @param target the target of the operation. Must be:
    {@link GL31C#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    - * @param internalformat the sized internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * - * @see Reference Page - */ - public static void glTexBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer) { - GL31C.glTexBuffer(target, internalformat, buffer); - } - - // --- [ glGetUniformIndices ] --- - - /** - * Unsafe version of: {@link #glGetUniformIndices GetUniformIndices} - * - * @param uniformCount the number of uniforms whose indices to query - */ - public static void nglGetUniformIndices(int program, int uniformCount, long uniformNames, long uniformIndices) { - GL31C.nglGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * @param uniformNames an array of pointers to buffers containing the names of the queried uniforms - * @param uniformIndices an array that will receive the indices of the uniforms - * - * @see Reference Page - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer uniformNames, @NativeType("GLuint *") IntBuffer uniformIndices) { - GL31C.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * @param uniformNames an array of pointers to buffers containing the names of the queried uniforms - * @param uniformIndices an array that will receive the indices of the uniforms - * - * @see Reference Page - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence[] uniformNames, @NativeType("GLuint *") IntBuffer uniformIndices) { - GL31C.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence uniformName) { - return GL31C.glGetUniformIndices(program, uniformName); - } - - // --- [ glGetActiveUniformsiv ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformsiv GetActiveUniformsiv} - * - * @param uniformCount the number of elements in the array of indices {@code uniformIndices} and the number of parameters written to {@code params} upon successful return - */ - public static void nglGetActiveUniformsiv(int program, int uniformCount, long uniformIndices, int pname, long params) { - GL31C.nglGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); - } - - /** - * Returns information about several active uniform variables for the specified program object. - * - * @param program the program object to be queried - * @param uniformIndices an array of {@code uniformCount} integers containing the indices of uniforms within {@code program} - * @param pname the property of the each uniform in {@code uniformIndices} that should be written into the corresponding element of {@code params} - * @param params an array of {@code uniformCount} integers which are to receive the value of {@code pname} for each uniform in {@code uniformIndices} - * - * @see Reference Page - */ - public static void glGetActiveUniformsiv(@NativeType("GLuint") int program, @NativeType("GLuint const *") IntBuffer uniformIndices, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL31C.glGetActiveUniformsiv(program, uniformIndices, pname, params); - } - - /** - * Returns information about several active uniform variables for the specified program object. - * - * @param program the program object to be queried - * @param pname the property of the each uniform in {@code uniformIndices} that should be written into the corresponding element of {@code params} - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveUniformsi(@NativeType("GLuint") int program, @NativeType("GLuint const *") int uniformIndex, @NativeType("GLenum") int pname) { - return GL31C.glGetActiveUniformsi(program, uniformIndex, pname); - } - - // --- [ glGetActiveUniformName ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformName GetActiveUniformName} - * - * @param bufSize the size of the buffer, in units of {@code GLchar}, of the buffer whose address is specified in {@code uniformName} - */ - public static void nglGetActiveUniformName(int program, int uniformIndex, int bufSize, long length, long uniformName) { - GL31C.nglGetActiveUniformName(program, uniformIndex, bufSize, length, uniformName); - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * @param length the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by {@code uniformName} - * @param uniformName the address of a buffer into which the GL will place the name of the active uniform at {@code uniformIndex} within {@code program} - * - * @see Reference Page - */ - public static void glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer uniformName) { - GL31C.glGetActiveUniformName(program, uniformIndex, length, uniformName); - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * @param bufSize the size of the buffer, in units of {@code GLchar}, of the buffer whose address is specified in {@code uniformName} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @NativeType("GLsizei") int bufSize) { - return GL31C.glGetActiveUniformName(program, uniformIndex, bufSize); - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex) { - return glGetActiveUniformName(program, uniformIndex, glGetActiveUniformsi(program, uniformIndex, GL_UNIFORM_NAME_LENGTH)); - } - - // --- [ glGetUniformBlockIndex ] --- - - /** Unsafe version of: {@link #glGetUniformBlockIndex GetUniformBlockIndex} */ - public static int nglGetUniformBlockIndex(int program, long uniformBlockName) { - return GL31C.nglGetUniformBlockIndex(program, uniformBlockName); - } - - /** - * Retrieves the index of a named uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockName an array of characters to containing the name of the uniform block whose index to retrieve - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetUniformBlockIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer uniformBlockName) { - return GL31C.glGetUniformBlockIndex(program, uniformBlockName); - } - - /** - * Retrieves the index of a named uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockName an array of characters to containing the name of the uniform block whose index to retrieve - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetUniformBlockIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence uniformBlockName) { - return GL31C.glGetUniformBlockIndex(program, uniformBlockName); - } - - // --- [ glGetActiveUniformBlockiv ] --- - - /** Unsafe version of: {@link #glGetActiveUniformBlockiv GetActiveUniformBlockiv} */ - public static void nglGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, long params) { - GL31C.nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); - } - - /** - * Queries information about an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param pname the name of the parameter to query. One of:
    {@link GL31C#GL_UNIFORM_BLOCK_BINDING UNIFORM_BLOCK_BINDING}{@link GL31C#GL_UNIFORM_BLOCK_DATA_SIZE UNIFORM_BLOCK_DATA_SIZE}
    {@link GL31C#GL_UNIFORM_BLOCK_NAME_LENGTH UNIFORM_BLOCK_NAME_LENGTH}{@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS UNIFORM_BLOCK_ACTIVE_UNIFORMS}
    {@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER}
    {@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER}
    - * @param params the address of a variable to receive the result of the query - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockiv(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL31C.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); - } - - /** - * Queries information about an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param pname the name of the parameter to query. One of:
    {@link GL31C#GL_UNIFORM_BLOCK_BINDING UNIFORM_BLOCK_BINDING}{@link GL31C#GL_UNIFORM_BLOCK_DATA_SIZE UNIFORM_BLOCK_DATA_SIZE}
    {@link GL31C#GL_UNIFORM_BLOCK_NAME_LENGTH UNIFORM_BLOCK_NAME_LENGTH}{@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS UNIFORM_BLOCK_ACTIVE_UNIFORMS}
    {@link GL31C#GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER}
    {@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER}{@link GL31C#GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveUniformBlocki(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname) { - return GL31C.glGetActiveUniformBlocki(program, uniformBlockIndex, pname); - } - - // --- [ glGetActiveUniformBlockName ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformBlockName GetActiveUniformBlockName} - * - * @param bufSize the size of the buffer addressed by {@code uniformBlockName} - */ - public static void nglGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize, long length, long uniformBlockName) { - GL31C.nglGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param length the address of a variable to receive the number of characters that were written to {@code uniformBlockName} - * @param uniformBlockName an array of characters to receive the name of the uniform block at {@code uniformBlockIndex} - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer uniformBlockName) { - GL31C.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param bufSize the size of the buffer addressed by {@code uniformBlockName} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLsizei") int bufSize) { - return GL31C.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize); - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex) { - return glGetActiveUniformBlockName(program, uniformBlockIndex, glGetActiveUniformBlocki(program, uniformBlockIndex, GL_UNIFORM_BLOCK_NAME_LENGTH)); - } - - // --- [ glUniformBlockBinding ] --- - - /** - * Assigns a binding point to an active uniform block. - * - * @param program the name of a program object containing the active uniform block whose binding to assign - * @param uniformBlockIndex the index of the active uniform block within {@code program} whose binding to assign - * @param uniformBlockBinding the binding point to which to bind the uniform block with index {@code uniformBlockIndex} within {@code program} - * - * @see Reference Page - */ - public static void glUniformBlockBinding(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLuint") int uniformBlockBinding) { - GL31C.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); - } - - /** - * Array version of: {@link #glGetUniformIndices GetUniformIndices} - * - * @see Reference Page - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer uniformNames, @NativeType("GLuint *") int[] uniformIndices) { - GL31C.glGetUniformIndices(program, uniformNames, uniformIndices); - } - - /** - * Array version of: {@link #glGetActiveUniformsiv GetActiveUniformsiv} - * - * @see Reference Page - */ - public static void glGetActiveUniformsiv(@NativeType("GLuint") int program, @NativeType("GLuint const *") int[] uniformIndices, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL31C.glGetActiveUniformsiv(program, uniformIndices, pname, params); - } - - /** - * Array version of: {@link #glGetActiveUniformName GetActiveUniformName} - * - * @see Reference Page - */ - public static void glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer uniformName) { - GL31C.glGetActiveUniformName(program, uniformIndex, length, uniformName); - } - - /** - * Array version of: {@link #glGetActiveUniformBlockiv GetActiveUniformBlockiv} - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockiv(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL31C.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); - } - - /** - * Array version of: {@link #glGetActiveUniformBlockName GetActiveUniformBlockName} - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer uniformBlockName) { - GL31C.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL31C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL31C.java deleted file mode 100644 index f10494c2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL31C.java +++ /dev/null @@ -1,740 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality of a forward compatible context, up to version 3.1. - * - *

    OpenGL 3.1 implementations support revision 1.40 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL31C extends GL30C { - - static { GL.initialize(); } - - /** Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_R8_SNORM = 0x8F94, - GL_RG8_SNORM = 0x8F95, - GL_RGB8_SNORM = 0x8F96, - GL_RGBA8_SNORM = 0x8F97, - GL_R16_SNORM = 0x8F98, - GL_RG16_SNORM = 0x8F99, - GL_RGB16_SNORM = 0x8F9A, - GL_RGBA16_SNORM = 0x8F9B; - - /** Returned by GetTexLevelParameter and GetFramebufferAttachmentParameter. */ - public static final int GL_SIGNED_NORMALIZED = 0x8F9C; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_BUFFER = 0x8DC2, - GL_INT_SAMPLER_2D_RECT = 0x8DCD, - GL_INT_SAMPLER_BUFFER = 0x8DD0, - GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5, - GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8; - - /** - * Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, MapBufferRange, - * FlushMappedBufferRange, GetBufferParameteriv, BindBufferRange, BindBufferBase, and CopyBufferSubData. - */ - public static final int - GL_COPY_READ_BUFFER = 0x8F36, - GL_COPY_WRITE_BUFFER = 0x8F37; - - /** Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled. */ - public static final int GL_PRIMITIVE_RESTART = 0x8F9D; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_PRIMITIVE_RESTART_INDEX = 0x8F9E; - - /** - * Accepted by the {@code target} parameter of BindBuffer, BufferData, BufferSubData, MapBuffer, MapBufferRange, BindTexture, UnmapBuffer, - * GetBufferSubData, GetBufferParameteriv, GetBufferPointerv, and TexBuffer, and the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, and - * GetIntegerv. - */ - public static final int GL_TEXTURE_BUFFER = 0x8C2A; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int - GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B, - GL_TEXTURE_BINDING_BUFFER = 0x8C2C, - GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled; by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and - * GetDoublev; and by the {@code target} parameter of BindTexture, GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, TexParameterfv and - * TexParameteriv. - */ - public static final int GL_TEXTURE_RECTANGLE = 0x84F5; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and GetDoublev. */ - public static final int GL_TEXTURE_BINDING_RECTANGLE = 0x84F6; - - /** Accepted by the {@code target} parameter of GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv and TexImage2D. */ - public static final int GL_PROXY_TEXTURE_RECTANGLE = 0x84F7; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8; - - /** Returned by {@code type} parameter of GetActiveUniform when the location {@code index} for program object {@code program} is of type sampler2DRect. */ - public static final int GL_SAMPLER_2D_RECT = 0x8B63; - - /** - * Returned by {@code type} parameter of GetActiveUniform when the location {@code index} for program object {@code program} is of type - * sampler2DRectShadow. - */ - public static final int GL_SAMPLER_2D_RECT_SHADOW = 0x8B64; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_UNIFORM_BUFFER = 0x8A11; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_UNIFORM_BUFFER_BINDING = 0x8A28; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v. */ - public static final int - GL_UNIFORM_BUFFER_START = 0x8A29, - GL_UNIFORM_BUFFER_SIZE = 0x8A2A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, - GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, - GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, - GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, - GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, - GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, - GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, - GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, - GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, - GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, - GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; - - /** Accepted by the {@code pname} parameter of GetActiveUniformsiv. */ - public static final int - GL_UNIFORM_TYPE = 0x8A37, - GL_UNIFORM_SIZE = 0x8A38, - GL_UNIFORM_NAME_LENGTH = 0x8A39, - GL_UNIFORM_BLOCK_INDEX = 0x8A3A, - GL_UNIFORM_OFFSET = 0x8A3B, - GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, - GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, - GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int - GL_UNIFORM_BLOCK_BINDING = 0x8A3F, - GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, - GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, - GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, - GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, - GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; - - /** Returned by GetActiveUniformsiv and GetUniformBlockIndex. */ - public static final int GL_INVALID_INDEX = 0xFFFFFFFF; - - protected GL31C() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawArraysInstanced ] --- - - /** - * Draw multiple instances of a range of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param first the index of the first vertex to be rendered - * @param count the number of vertices to be rendered - * @param primcount the number of instances of the specified range of vertices to be rendered - * - * @see Reference Page - */ - public static native void glDrawArraysInstanced(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count, @NativeType("GLsizei") int primcount); - - // --- [ glDrawElementsInstanced ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstanced DrawElementsInstanced} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawElementsInstanced(int mode, int count, int type, long indices, int primcount); - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstanced(mode, count, type, indices, primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstanced(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstanced(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstanced(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), primcount); - } - - /** - * Draws multiple instances of a set of elements. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}
    {@link GL11#GL_TRIANGLES TRIANGLES}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - * @param indices the ByteBuffer containing the indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * - * @see Reference Page - */ - public static void glDrawElementsInstanced(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount) { - nglDrawElementsInstanced(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), primcount); - } - - // --- [ glCopyBufferSubData ] --- - - /** - * Copies all or part of one buffer object's data store to the data store of another buffer object. - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if any of readoffset, writeoffset, or size are negative, if readoffset+size exceeds the size of the buffer object - * bound to readtarget, or if writeoffset+size exceeds the size of the buffer object bound to writetarget.

    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if the same buffer object is bound to both readtarget and writetarget, and the ranges [readoffset, readoffset+size) - * and [writeoffset, writeoffset+size) overlap.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if zero is bound to readtarget or writetarget.

    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if the buffer objects bound to either readtarget or writetarget are mapped.

    - * - * @param readTarget the source buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link #GL_COPY_READ_BUFFER COPY_READ_BUFFER}{@link #GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}
    {@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link #GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link #GL_UNIFORM_BUFFER UNIFORM_BUFFER}
    - * @param writeTarget the destination buffer object target - * @param readOffset the source buffer object offset, in bytes - * @param writeOffset the destination buffer object offset, in bytes - * @param size the number of bytes to copy - * - * @see Reference Page - */ - public static native void glCopyBufferSubData(@NativeType("GLenum") int readTarget, @NativeType("GLenum") int writeTarget, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size); - - // --- [ glPrimitiveRestartIndex ] --- - - /** - * Specifies the primitive restart index. - * - * @param index the value to be interpreted as the primitive restart index - * - * @see Reference Page - */ - public static native void glPrimitiveRestartIndex(@NativeType("GLuint") int index); - - // --- [ glTexBuffer ] --- - - /** - * Attaches the storage for the buffer object named {@code buffer} to the active buffer texture, and specifies an internal format for the texel array found - * in the attached buffer object. If {@code buffer} is zero, any buffer object attached to the buffer texture is detached, and no new buffer object is - * attached. If {@code buffer} is non-zero, but is not the name of an existing buffer object, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated. - * - *

    When a buffer object is attached to a buffer texture, the buffer object's data store is taken as the texture's texel array. The number of texels in the - * buffer texture's texel array is given by

    - * - *

    {@code floor(buffer_size / (components * sizeof(base_type))},

    - * - *

    where {@code buffer_size} is the size of the buffer object, in basic machine units and {@code components} and {@code base_type} are the element count - * and base data type for elements. The number of texels in the texel array is then clamped to the implementation-dependent limit {@link #GL_MAX_TEXTURE_BUFFER_SIZE MAX_TEXTURE_BUFFER_SIZE}. - * When a buffer texture is accessed in a shader, the results of a texel fetch are undefined if the specified texel number is greater than or equal to the - * clamped number of texels in the texel array.

    - * - *

    When a buffer texture is accessed in a shader, an integer is provided to indicate the texel number being accessed. If no buffer object is bound to the - * buffer texture, the results of the texel access are undefined. Otherwise, the attached buffer object's data store is interpreted as an array of elements - * of the GL data type corresponding to {@code internalformat}. Each texel consists of one to four elements that are mapped to texture components - * (R, G, B, A, L, and I). Element {@code m} of the texel numbered {@code n} is taken from element {@code n} * {@code components} + {@code m} of the - * attached buffer object's data store. Elements and texels are both numbered starting with zero. For texture formats with normalized components, the - * extracted values are converted to floating-point values. The components of the texture are then converted to an (R,G,B,A) vector, and returned to the - * shader as a four-component result vector with components of the appropriate data type for the texture's internal format.

    - * - * @param target the target of the operation. Must be:
    {@link #GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    - * @param internalformat the sized internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * - * @see Reference Page - */ - public static native void glTexBuffer(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer); - - // --- [ glGetUniformIndices ] --- - - /** - * Unsafe version of: {@link #glGetUniformIndices GetUniformIndices} - * - * @param uniformCount the number of uniforms whose indices to query - */ - public static native void nglGetUniformIndices(int program, int uniformCount, long uniformNames, long uniformIndices); - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * @param uniformNames an array of pointers to buffers containing the names of the queried uniforms - * @param uniformIndices an array that will receive the indices of the uniforms - * - * @see Reference Page - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer uniformNames, @NativeType("GLuint *") IntBuffer uniformIndices) { - if (CHECKS) { - check(uniformIndices, uniformNames.remaining()); - } - nglGetUniformIndices(program, uniformNames.remaining(), memAddress(uniformNames), memAddress(uniformIndices)); - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * @param uniformNames an array of pointers to buffers containing the names of the queried uniforms - * @param uniformIndices an array that will receive the indices of the uniforms - * - * @see Reference Page - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence[] uniformNames, @NativeType("GLuint *") IntBuffer uniformIndices) { - if (CHECKS) { - check(uniformIndices, uniformNames.length); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long uniformNamesAddress = APIUtil.apiArray(stack, MemoryUtil::memASCII, uniformNames); - nglGetUniformIndices(program, uniformNames.length, uniformNamesAddress, memAddress(uniformIndices)); - APIUtil.apiArrayFree(uniformNamesAddress, uniformNames.length); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Retrieves the indices of a number of uniforms within a program object - * - * @param program the name of a program containing uniforms whose indices to query - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") CharSequence uniformName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long uniformNamesAddress = APIUtil.apiArray(stack, MemoryUtil::memASCII, uniformName); - IntBuffer uniformIndices = stack.callocInt(1); - nglGetUniformIndices(program, 1, uniformNamesAddress, memAddress(uniformIndices)); - APIUtil.apiArrayFree(uniformNamesAddress, 1); - return uniformIndices.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveUniformsiv ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformsiv GetActiveUniformsiv} - * - * @param uniformCount the number of elements in the array of indices {@code uniformIndices} and the number of parameters written to {@code params} upon successful return - */ - public static native void nglGetActiveUniformsiv(int program, int uniformCount, long uniformIndices, int pname, long params); - - /** - * Returns information about several active uniform variables for the specified program object. - * - * @param program the program object to be queried - * @param uniformIndices an array of {@code uniformCount} integers containing the indices of uniforms within {@code program} - * @param pname the property of the each uniform in {@code uniformIndices} that should be written into the corresponding element of {@code params} - * @param params an array of {@code uniformCount} integers which are to receive the value of {@code pname} for each uniform in {@code uniformIndices} - * - * @see Reference Page - */ - public static void glGetActiveUniformsiv(@NativeType("GLuint") int program, @NativeType("GLuint const *") IntBuffer uniformIndices, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, uniformIndices.remaining()); - } - nglGetActiveUniformsiv(program, uniformIndices.remaining(), memAddress(uniformIndices), pname, memAddress(params)); - } - - /** - * Returns information about several active uniform variables for the specified program object. - * - * @param program the program object to be queried - * @param pname the property of the each uniform in {@code uniformIndices} that should be written into the corresponding element of {@code params} - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveUniformsi(@NativeType("GLuint") int program, @NativeType("GLuint const *") int uniformIndex, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - IntBuffer uniformIndices = stack.ints(uniformIndex); - nglGetActiveUniformsiv(program, 1, memAddress(uniformIndices), pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveUniformName ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformName GetActiveUniformName} - * - * @param bufSize the size of the buffer, in units of {@code GLchar}, of the buffer whose address is specified in {@code uniformName} - */ - public static native void nglGetActiveUniformName(int program, int uniformIndex, int bufSize, long length, long uniformName); - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * @param length the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by {@code uniformName} - * @param uniformName the address of a buffer into which the GL will place the name of the active uniform at {@code uniformIndex} within {@code program} - * - * @see Reference Page - */ - public static void glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer uniformName) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetActiveUniformName(program, uniformIndex, uniformName.remaining(), memAddressSafe(length), memAddress(uniformName)); - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * @param bufSize the size of the buffer, in units of {@code GLchar}, of the buffer whose address is specified in {@code uniformName} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @NativeType("GLsizei") int bufSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer uniformName = stack.malloc(bufSize); - nglGetActiveUniformName(program, uniformIndex, bufSize, memAddress(length), memAddress(uniformName)); - return memASCII(uniformName, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Queries the name of an active uniform. - * - * @param program the program containing the active uniform index {@code uniformIndex} - * @param uniformIndex the index of the active uniform whose name to query - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex) { - return glGetActiveUniformName(program, uniformIndex, glGetActiveUniformsi(program, uniformIndex, GL_UNIFORM_NAME_LENGTH)); - } - - // --- [ glGetUniformBlockIndex ] --- - - /** Unsafe version of: {@link #glGetUniformBlockIndex GetUniformBlockIndex} */ - public static native int nglGetUniformBlockIndex(int program, long uniformBlockName); - - /** - * Retrieves the index of a named uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockName an array of characters to containing the name of the uniform block whose index to retrieve - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetUniformBlockIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer uniformBlockName) { - if (CHECKS) { - checkNT1(uniformBlockName); - } - return nglGetUniformBlockIndex(program, memAddress(uniformBlockName)); - } - - /** - * Retrieves the index of a named uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockName an array of characters to containing the name of the uniform block whose index to retrieve - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetUniformBlockIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence uniformBlockName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(uniformBlockName, true); - long uniformBlockNameEncoded = stack.getPointerAddress(); - return nglGetUniformBlockIndex(program, uniformBlockNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveUniformBlockiv ] --- - - /** Unsafe version of: {@link #glGetActiveUniformBlockiv GetActiveUniformBlockiv} */ - public static native void nglGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, long params); - - /** - * Queries information about an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param pname the name of the parameter to query. One of:
    {@link #GL_UNIFORM_BLOCK_BINDING UNIFORM_BLOCK_BINDING}{@link #GL_UNIFORM_BLOCK_DATA_SIZE UNIFORM_BLOCK_DATA_SIZE}
    {@link #GL_UNIFORM_BLOCK_NAME_LENGTH UNIFORM_BLOCK_NAME_LENGTH}{@link #GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS UNIFORM_BLOCK_ACTIVE_UNIFORMS}
    {@link #GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES}{@link #GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER}
    {@link #GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER}{@link #GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER}
    - * @param params the address of a variable to receive the result of the query - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockiv(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, memAddress(params)); - } - - /** - * Queries information about an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param pname the name of the parameter to query. One of:
    {@link #GL_UNIFORM_BLOCK_BINDING UNIFORM_BLOCK_BINDING}{@link #GL_UNIFORM_BLOCK_DATA_SIZE UNIFORM_BLOCK_DATA_SIZE}
    {@link #GL_UNIFORM_BLOCK_NAME_LENGTH UNIFORM_BLOCK_NAME_LENGTH}{@link #GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS UNIFORM_BLOCK_ACTIVE_UNIFORMS}
    {@link #GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES}{@link #GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER}
    {@link #GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER}{@link #GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveUniformBlocki(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveUniformBlockName ] --- - - /** - * Unsafe version of: {@link #glGetActiveUniformBlockName GetActiveUniformBlockName} - * - * @param bufSize the size of the buffer addressed by {@code uniformBlockName} - */ - public static native void nglGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize, long length, long uniformBlockName); - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param length the address of a variable to receive the number of characters that were written to {@code uniformBlockName} - * @param uniformBlockName an array of characters to receive the name of the uniform block at {@code uniformBlockIndex} - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer uniformBlockName) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetActiveUniformBlockName(program, uniformBlockIndex, uniformBlockName.remaining(), memAddressSafe(length), memAddress(uniformBlockName)); - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * @param bufSize the size of the buffer addressed by {@code uniformBlockName} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLsizei") int bufSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer uniformBlockName = stack.malloc(bufSize); - nglGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, memAddress(length), memAddress(uniformBlockName)); - return memASCII(uniformBlockName, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Retrieves the name of an active uniform block. - * - * @param program the name of a program containing the uniform block - * @param uniformBlockIndex the index of the uniform block within {@code program} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex) { - return glGetActiveUniformBlockName(program, uniformBlockIndex, glGetActiveUniformBlocki(program, uniformBlockIndex, GL_UNIFORM_BLOCK_NAME_LENGTH)); - } - - // --- [ glUniformBlockBinding ] --- - - /** - * Assigns a binding point to an active uniform block. - * - * @param program the name of a program object containing the active uniform block whose binding to assign - * @param uniformBlockIndex the index of the active uniform block within {@code program} whose binding to assign - * @param uniformBlockBinding the binding point to which to bind the uniform block with index {@code uniformBlockIndex} within {@code program} - * - * @see Reference Page - */ - public static native void glUniformBlockBinding(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLuint") int uniformBlockBinding); - - /** - * Array version of: {@link #glGetUniformIndices GetUniformIndices} - * - * @see Reference Page - */ - public static void glGetUniformIndices(@NativeType("GLuint") int program, @NativeType("GLchar const * const *") PointerBuffer uniformNames, @NativeType("GLuint *") int[] uniformIndices) { - long __functionAddress = GL.getICD().glGetUniformIndices; - if (CHECKS) { - check(__functionAddress); - check(uniformIndices, uniformNames.remaining()); - } - callPPV(program, uniformNames.remaining(), memAddress(uniformNames), uniformIndices, __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveUniformsiv GetActiveUniformsiv} - * - * @see Reference Page - */ - public static void glGetActiveUniformsiv(@NativeType("GLuint") int program, @NativeType("GLuint const *") int[] uniformIndices, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetActiveUniformsiv; - if (CHECKS) { - check(__functionAddress); - check(params, uniformIndices.length); - } - callPPV(program, uniformIndices.length, uniformIndices, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveUniformName GetActiveUniformName} - * - * @see Reference Page - */ - public static void glGetActiveUniformName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformIndex, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer uniformName) { - long __functionAddress = GL.getICD().glGetActiveUniformName; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(program, uniformIndex, uniformName.remaining(), length, memAddress(uniformName), __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveUniformBlockiv GetActiveUniformBlockiv} - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockiv(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetActiveUniformBlockiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, uniformBlockIndex, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveUniformBlockName GetActiveUniformBlockName} - * - * @see Reference Page - */ - public static void glGetActiveUniformBlockName(@NativeType("GLuint") int program, @NativeType("GLuint") int uniformBlockIndex, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer uniformBlockName) { - long __functionAddress = GL.getICD().glGetActiveUniformBlockName; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(program, uniformBlockIndex, uniformBlockName.remaining(), length, memAddress(uniformBlockName), __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL32.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL32.java deleted file mode 100644 index abd7a3c9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL32.java +++ /dev/null @@ -1,896 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 3.2. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 3.2 implementations support revision 1.50 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL32 extends GL31 { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int GL_CONTEXT_PROFILE_MASK = 0x9126; - - /** Context profile bits. */ - public static final int - GL_CONTEXT_CORE_PROFILE_BIT = 0x1, - GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x2; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, - GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123, - GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124, - GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; - - /** Accepted by the {@code mode} parameter of ProvokingVertex. */ - public static final int - GL_FIRST_VERTEX_CONVENTION = 0x8E4D, - GL_LAST_VERTEX_CONVENTION = 0x8E4E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PROVOKING_VERTEX = 0x8E4F, - GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and - * GetDoublev. - */ - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; - - /** Accepted by the {@code pname} parameter of GetMultisamplefv. */ - public static final int GL_SAMPLE_POSITION = 0x8E50; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_SAMPLE_MASK = 0x8E51; - - /** Accepted by the {@code target} parameter of GetBooleani_v and GetIntegeri_v. */ - public static final int GL_SAMPLE_MASK_VALUE = 0x8E52; - - /** Accepted by the {@code target} parameter of BindTexture and TexImage2DMultisample. */ - public static final int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; - - /** Accepted by the {@code target} parameter of TexImage2DMultisample. */ - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; - - /** Accepted by the {@code target} parameter of BindTexture and TexImage3DMultisample. */ - public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; - - /** Accepted by the {@code target} parameter of TexImage3DMultisample. */ - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, - GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, - GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, - GL_MAX_INTEGER_SAMPLES = 0x9110, - GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104, - GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_SAMPLES = 0x9106, - GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_2D_MULTISAMPLE = 0x9108, - GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A, - GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B, - GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_DEPTH_CLAMP = 0x864F; - - /** Accepted by the {@code type} parameter of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_GEOMETRY_SHADER = 0x8DD9; - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int - GL_GEOMETRY_VERTICES_OUT = 0x8DDA, - GL_GEOMETRY_INPUT_TYPE = 0x8DDB, - GL_GEOMETRY_OUTPUT_TYPE = 0x8DDC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29, - GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF, - GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0, - GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1; - - /** Accepted by the {@code mode} parameter of Begin, DrawArrays, MultiDrawArrays, DrawElements, MultiDrawElements, and DrawRangeElements. */ - public static final int - GL_LINES_ADJACENCY = 0xA, - GL_LINE_STRIP_ADJACENCY = 0xB, - GL_TRIANGLES_ADJACENCY = 0xC, - GL_TRIANGLE_STRIP_ADJACENCY = 0xD; - - /** Returned by CheckFramebufferStatus. */ - public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachment- Parameteriv. */ - public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetIntegerv, GetFloatv, GetDoublev, and - * GetBooleanv. - */ - public static final int GL_PROGRAM_POINT_SIZE = 0x8642; - - /** Accepted as the {@code pname} parameter of GetInteger64v. */ - public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; - - /** Accepted as the {@code pname} parameter of GetSynciv. */ - public static final int - GL_OBJECT_TYPE = 0x9112, - GL_SYNC_CONDITION = 0x9113, - GL_SYNC_STATUS = 0x9114, - GL_SYNC_FLAGS = 0x9115; - - /** Returned in {@code values} for GetSynciv {@code pname} OBJECT_TYPE. */ - public static final int GL_SYNC_FENCE = 0x9116; - - /** Returned in {@code values} for GetSynciv {@code pname} SYNC_CONDITION. */ - public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; - - /** Returned in {@code values} for GetSynciv {@code pname} SYNC_STATUS. */ - public static final int - GL_UNSIGNALED = 0x9118, - GL_SIGNALED = 0x9119; - - /** Accepted in the {@code flags} parameter of ClientWaitSync. */ - public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; - - /** Accepted in the {@code timeout} parameter of WaitSync. */ - public static final long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFL; - - /** Returned by ClientWaitSync. */ - public static final int - GL_ALREADY_SIGNALED = 0x911A, - GL_TIMEOUT_EXPIRED = 0x911B, - GL_CONDITION_SATISFIED = 0x911C, - GL_WAIT_FAILED = 0x911D; - - protected GL32() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetBufferParameteri64v ] --- - - /** Unsafe version of: {@link #glGetBufferParameteri64v GetBufferParameteri64v} */ - public static void nglGetBufferParameteri64v(int target, int pname, long params) { - GL32C.nglGetBufferParameteri64v(target, pname, params); - } - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetBufferParameteri64v(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL32C.glGetBufferParameteri64v(target, pname, params); - } - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetBufferParameteri64(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL32C.glGetBufferParameteri64(target, pname); - } - - // --- [ glDrawElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawElementsBaseVertex DrawElementsBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsBaseVertex(int mode, int count, int type, long indices, int basevertex) { - GL32C.nglDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsBaseVertex(mode, indices, basevertex); - } - - // --- [ glDrawRangeElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawRangeElementsBaseVertex DrawRangeElementsBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawRangeElementsBaseVertex(int mode, int start, int end, int count, int type, long indices, int basevertex) { - GL32C.nglDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ShortBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") IntBuffer indices, @NativeType("GLint") int basevertex) { - GL32C.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); - } - - // --- [ glDrawElementsInstancedBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseVertex DrawElementsInstancedBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsInstancedBaseVertex(int mode, int count, int type, long indices, int primcount, int basevertex) { - GL32C.nglDrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, type, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - GL32C.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); - } - - // --- [ glMultiDrawElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glMultiDrawElementsBaseVertex MultiDrawElementsBaseVertex} - * - * @param drawcount the size of the {@code count} array - */ - public static void nglMultiDrawElementsBaseVertex(int mode, long count, int type, long indices, int drawcount, long basevertex) { - GL32C.nglMultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex); - } - - /** - * Renders multiple sets of primitives by specifying indices of array data elements and an offset to apply to each index. - * - *

    LWJGL note: Use {@link org.lwjgl.system.MemoryUtil#memAddress} to retrieve pointers to the index buffers.

    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32C#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32C#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32C#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32C#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count an array of the elements counts - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a pointer to the location where the base vertices are stored - * - * @see Reference Page - */ - public static void glMultiDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei const *") IntBuffer count, @NativeType("GLenum") int type, @NativeType("void const * const *") PointerBuffer indices, @NativeType("GLint *") IntBuffer basevertex) { - GL32C.glMultiDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - // --- [ glProvokingVertex ] --- - - /** - * Specifies the vertex to be used as the source of data for flat shaded varyings. - * - * @param mode the provoking vertex mode. One of:
    {@link GL32C#GL_FIRST_VERTEX_CONVENTION FIRST_VERTEX_CONVENTION}{@link GL32C#GL_LAST_VERTEX_CONVENTION LAST_VERTEX_CONVENTION}
    - * - * @see Reference Page - */ - public static void glProvokingVertex(@NativeType("GLenum") int mode) { - GL32C.glProvokingVertex(mode); - } - - // --- [ glTexImage2DMultisample ] --- - - /** - * Establishes the data storage, format, dimensions, and number of samples of a 2D multisample texture's image. - * - * @param target the target of the operation. One of:
    {@link GL32C#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32C#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the multisample texture's image - * @param internalformat the internal format to be used to store the multisample texture's image. {@code internalformat} must specify a color-renderable, depth-renderable, - * or stencil-renderable format. - * @param width the width of the multisample texture's image, in texels - * @param height the height of the multisample texture's image, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static void glTexImage2DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL32C.glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - // --- [ glTexImage3DMultisample ] --- - - /** - * Establishes the data storage, format, dimensions, and number of samples of a 3D multisample texture's image. - * - * @param target the target of the operation. One of:
    {@link GL32C#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL32C#GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param samples the number of samples in the multisample texture's image - * @param internalformat the internal format to be used to store the multisample texture's image. {@code internalformat} must specify a color-renderable, depth-renderable, - * or stencil-renderable format. - * @param width the width of the multisample texture's image, in texels - * @param height the height of the multisample texture's image, in texels - * @param depth the depth of the multisample texture's image, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static void glTexImage3DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL32C.glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - // --- [ glGetMultisamplefv ] --- - - /** Unsafe version of: {@link #glGetMultisamplefv GetMultisamplefv} */ - public static void nglGetMultisamplefv(int pname, int index, long val) { - GL32C.nglGetMultisamplefv(pname, index, val); - } - - /** - * Retrieves the location of a sample. - * - * @param pname the sample parameter name. Must be:
    {@link GL32C#GL_SAMPLE_POSITION SAMPLE_POSITION}
    - * @param index the index of the sample whose position to query - * @param val an array to receive the position of the sample - * - * @see Reference Page - */ - public static void glGetMultisamplefv(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer val) { - GL32C.glGetMultisamplefv(pname, index, val); - } - - /** - * Retrieves the location of a sample. - * - * @param pname the sample parameter name. Must be:
    {@link GL32C#GL_SAMPLE_POSITION SAMPLE_POSITION}
    - * @param index the index of the sample whose position to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetMultisamplef(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - return GL32C.glGetMultisamplef(pname, index); - } - - // --- [ glSampleMaski ] --- - - /** - * Sets the value of a sub-word of the sample mask. - * - * @param index which 32-bit sub-word of the sample mask to update - * @param mask the new value of the mask sub-word - * - * @see Reference Page - */ - public static void glSampleMaski(@NativeType("GLuint") int index, @NativeType("GLbitfield") int mask) { - GL32C.glSampleMaski(index, mask); - } - - // --- [ glFramebufferTexture ] --- - - /** - * Attaches a level of a texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static void glFramebufferTexture(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL32C.glFramebufferTexture(target, attachment, texture, level); - } - - // --- [ glFenceSync ] --- - - /** - * Creates a new sync object and inserts it into the GL command stream. - * - * @param condition the condition that must be met to set the sync object's state to signaled. Must be:
    {@link GL32C#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE}
    - * @param flags a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and {@code flags} must - * be zero. - * - * @see Reference Page - */ - @NativeType("GLsync") - public static long glFenceSync(@NativeType("GLenum") int condition, @NativeType("GLbitfield") int flags) { - return GL32C.glFenceSync(condition, flags); - } - - // --- [ glIsSync ] --- - - /** Unsafe version of: {@link #glIsSync IsSync} */ - public static boolean nglIsSync(long sync) { - return GL32C.nglIsSync(sync); - } - - /** - * Determines if a name corresponds to a sync object. - * - * @param sync a value that may be the name of a sync object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsSync(@NativeType("GLsync") long sync) { - return GL32C.glIsSync(sync); - } - - // --- [ glDeleteSync ] --- - - /** Unsafe version of: {@link #glDeleteSync DeleteSync} */ - public static void nglDeleteSync(long sync) { - GL32C.nglDeleteSync(sync); - } - - /** - * Deletes a sync object. - * - * @param sync the sync object to be deleted - * - * @see Reference Page - */ - public static void glDeleteSync(@NativeType("GLsync") long sync) { - GL32C.glDeleteSync(sync); - } - - // --- [ glClientWaitSync ] --- - - /** Unsafe version of: {@link #glClientWaitSync ClientWaitSync} */ - public static int nglClientWaitSync(long sync, int flags, long timeout) { - return GL32C.nglClientWaitSync(sync, flags, timeout); - } - - /** - * Causes the client to block and wait for a sync object to become signaled. If {@code sync} is signaled when {@code glClientWaitSync} is called, - * {@code glClientWaitSync} returns immediately, otherwise it will block and wait for up to timeout nanoseconds for {@code sync} to become signaled. - * - *

    The return value is one of four status values:

    - * - *
      - *
    • {@link GL32C#GL_ALREADY_SIGNALED ALREADY_SIGNALED} indicates that sync was signaled at the time that glClientWaitSync was called.
    • - *
    • {@link GL32C#GL_TIMEOUT_EXPIRED TIMEOUT_EXPIRED} indicates that at least timeout nanoseconds passed and sync did not become signaled.
    • - *
    • {@link GL32C#GL_CONDITION_SATISFIED CONDITION_SATISFIED} indicates that sync was signaled before the timeout expired.
    • - *
    • {@link GL32C#GL_WAIT_FAILED WAIT_FAILED} indicates that an error occurred. Additionally, an OpenGL error will be generated.
    • - *
    - * - * @param sync the sync object whose status to wait on - * @param flags a bitfield controlling the command flushing behavior. One or more of:
    0{@link GL32C#GL_SYNC_FLUSH_COMMANDS_BIT SYNC_FLUSH_COMMANDS_BIT}
    - * @param timeout the timeout, specified in nanoseconds, for which the implementation should wait for {@code sync} to become signaled - * - * @see Reference Page - */ - @NativeType("GLenum") - public static int glClientWaitSync(@NativeType("GLsync") long sync, @NativeType("GLbitfield") int flags, @NativeType("GLuint64") long timeout) { - return GL32C.glClientWaitSync(sync, flags, timeout); - } - - // --- [ glWaitSync ] --- - - /** Unsafe version of: {@link #glWaitSync WaitSync} */ - public static void nglWaitSync(long sync, int flags, long timeout) { - GL32C.nglWaitSync(sync, flags, timeout); - } - - /** - * Causes the GL server to block and wait for a sync object to become signaled. - * - *

    {@code glWaitSync} will always wait no longer than an implementation-dependent timeout. The duration of this timeout in nanoseconds may be queried by - * with {@link GL32C#GL_MAX_SERVER_WAIT_TIMEOUT MAX_SERVER_WAIT_TIMEOUT}. There is currently no way to determine whether glWaitSync unblocked because the timeout expired or because the - * sync object being waited on was signaled.

    - * - *

    If an error occurs, {@code glWaitSync} does not cause the GL server to block.

    - * - * @param sync the sync object whose status to wait on - * @param flags a bitfield controlling the command flushing behavior. Must be:
    0
    - * @param timeout the timeout that the server should wait before continuing. Must be:
    {@link GL32C#GL_TIMEOUT_IGNORED TIMEOUT_IGNORED}
    - * - * @see Reference Page - */ - public static void glWaitSync(@NativeType("GLsync") long sync, @NativeType("GLbitfield") int flags, @NativeType("GLuint64") long timeout) { - GL32C.glWaitSync(sync, flags, timeout); - } - - // --- [ glGetInteger64v ] --- - - /** Unsafe version of: {@link #glGetInteger64v GetInteger64v} */ - public static void nglGetInteger64v(int pname, long params) { - GL32C.nglGetInteger64v(pname, params); - } - - /** - * Returns the 64bit integer value or values of a selected parameter. - * - * @param pname the parameter value to be returned - * @param params the value or values of the specified parameter - * - * @see Reference Page - */ - public static void glGetInteger64v(@NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL32C.glGetInteger64v(pname, params); - } - - /** - * Returns the 64bit integer value or values of a selected parameter. - * - * @param pname the parameter value to be returned - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetInteger64(@NativeType("GLenum") int pname) { - return GL32C.glGetInteger64(pname); - } - - // --- [ glGetInteger64i_v ] --- - - /** Unsafe version of: {@link #glGetInteger64i_v GetInteger64i_v} */ - public static void nglGetInteger64i_v(int pname, int index, long params) { - GL32C.nglGetInteger64i_v(pname, index, params); - } - - /** - * Queries the 64bit integer value of an indexed state variable. - * - * @param pname the indexed state to query - * @param index the index of the element being queried - * @param params the value or values of the specified parameter - * - * @see Reference Page - */ - public static void glGetInteger64i_v(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") LongBuffer params) { - GL32C.glGetInteger64i_v(pname, index, params); - } - - /** - * Queries the 64bit integer value of an indexed state variable. - * - * @param pname the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetInteger64i(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - return GL32C.glGetInteger64i(pname, index); - } - - // --- [ glGetSynciv ] --- - - /** - * Unsafe version of: {@link #glGetSynciv GetSynciv} - * - * @param bufSize the size of the buffer whose address is given in {@code values} - */ - public static void nglGetSynciv(long sync, int pname, int bufSize, long length, long values) { - GL32C.nglGetSynciv(sync, pname, bufSize, length, values); - } - - /** - * Queries the properties of a sync object. - * - * @param sync the sync object whose properties to query - * @param pname the parameter whose value to retrieve from the sync object specified in {@code sync}. One of:
    {@link GL32C#GL_OBJECT_TYPE OBJECT_TYPE}{@link GL32C#GL_SYNC_CONDITION SYNC_CONDITION}{@link GL32C#GL_SYNC_STATUS SYNC_STATUS}{@link GL32C#GL_SYNC_FLAGS SYNC_FLAGS}
    - * @param length the address of an variable to receive the number of integers placed in {@code values} - * @param values the address of an array to receive the values of the queried parameter - * - * @see Reference Page - */ - public static void glGetSynciv(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer values) { - GL32C.glGetSynciv(sync, pname, length, values); - } - - /** - * Queries the properties of a sync object. - * - * @param sync the sync object whose properties to query - * @param pname the parameter whose value to retrieve from the sync object specified in {@code sync}. One of:
    {@link GL32C#GL_OBJECT_TYPE OBJECT_TYPE}{@link GL32C#GL_SYNC_CONDITION SYNC_CONDITION}{@link GL32C#GL_SYNC_STATUS SYNC_STATUS}{@link GL32C#GL_SYNC_FLAGS SYNC_FLAGS}
    - * @param length the address of an variable to receive the number of integers placed in {@code values} - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSynci(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") IntBuffer length) { - return GL32C.glGetSynci(sync, pname, length); - } - - /** - * Array version of: {@link #glGetBufferParameteri64v GetBufferParameteri64v} - * - * @see Reference Page - */ - public static void glGetBufferParameteri64v(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL32C.glGetBufferParameteri64v(target, pname, params); - } - - /** - * Array version of: {@link #glMultiDrawElementsBaseVertex MultiDrawElementsBaseVertex} - * - * @see Reference Page - */ - public static void glMultiDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei const *") int[] count, @NativeType("GLenum") int type, @NativeType("void const * const *") PointerBuffer indices, @NativeType("GLint *") int[] basevertex) { - GL32C.glMultiDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - /** - * Array version of: {@link #glGetMultisamplefv GetMultisamplefv} - * - * @see Reference Page - */ - public static void glGetMultisamplefv(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] val) { - GL32C.glGetMultisamplefv(pname, index, val); - } - - /** - * Array version of: {@link #glGetInteger64v GetInteger64v} - * - * @see Reference Page - */ - public static void glGetInteger64v(@NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL32C.glGetInteger64v(pname, params); - } - - /** - * Array version of: {@link #glGetInteger64i_v GetInteger64i_v} - * - * @see Reference Page - */ - public static void glGetInteger64i_v(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") long[] params) { - GL32C.glGetInteger64i_v(pname, index, params); - } - - /** - * Array version of: {@link #glGetSynciv GetSynciv} - * - * @see Reference Page - */ - public static void glGetSynciv(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] values) { - GL32C.glGetSynciv(sync, pname, length, values); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL32C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL32C.java deleted file mode 100644 index 601a8890..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL32C.java +++ /dev/null @@ -1,964 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 3.2. Includes only Core Profile symbols. - * - *

    OpenGL 3.2 implementations support revision 1.50 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL32C extends GL31C { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int GL_CONTEXT_PROFILE_MASK = 0x9126; - - /** Context profile bits. */ - public static final int - GL_CONTEXT_CORE_PROFILE_BIT = 0x1, - GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x2; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, - GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123, - GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124, - GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; - - /** Accepted by the {@code mode} parameter of ProvokingVertex. */ - public static final int - GL_FIRST_VERTEX_CONVENTION = 0x8E4D, - GL_LAST_VERTEX_CONVENTION = 0x8E4E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_PROVOKING_VERTEX = 0x8E4F, - GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and - * GetDoublev. - */ - public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; - - /** Accepted by the {@code pname} parameter of GetMultisamplefv. */ - public static final int GL_SAMPLE_POSITION = 0x8E50; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_SAMPLE_MASK = 0x8E51; - - /** Accepted by the {@code target} parameter of GetBooleani_v and GetIntegeri_v. */ - public static final int GL_SAMPLE_MASK_VALUE = 0x8E52; - - /** Accepted by the {@code target} parameter of BindTexture and TexImage2DMultisample. */ - public static final int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; - - /** Accepted by the {@code target} parameter of TexImage2DMultisample. */ - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; - - /** Accepted by the {@code target} parameter of BindTexture and TexImage3DMultisample. */ - public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; - - /** Accepted by the {@code target} parameter of TexImage3DMultisample. */ - public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, - GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, - GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, - GL_MAX_INTEGER_SAMPLES = 0x9110, - GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104, - GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_SAMPLES = 0x9106, - GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_2D_MULTISAMPLE = 0x9108, - GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A, - GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B, - GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_DEPTH_CLAMP = 0x864F; - - /** Accepted by the {@code type} parameter of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int GL_GEOMETRY_SHADER = 0x8DD9; - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int - GL_GEOMETRY_VERTICES_OUT = 0x8DDA, - GL_GEOMETRY_INPUT_TYPE = 0x8DDB, - GL_GEOMETRY_OUTPUT_TYPE = 0x8DDC; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29, - GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF, - GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0, - GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1; - - /** Accepted by the {@code mode} parameter of Begin, DrawArrays, MultiDrawArrays, DrawElements, MultiDrawElements, and DrawRangeElements. */ - public static final int - GL_LINES_ADJACENCY = 0xA, - GL_LINE_STRIP_ADJACENCY = 0xB, - GL_TRIANGLES_ADJACENCY = 0xC, - GL_TRIANGLE_STRIP_ADJACENCY = 0xD; - - /** Returned by CheckFramebufferStatus. */ - public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8; - - /** Accepted by the {@code pname} parameter of GetFramebufferAttachment- Parameteriv. */ - public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetIntegerv, GetFloatv, GetDoublev, and - * GetBooleanv. - */ - public static final int GL_PROGRAM_POINT_SIZE = 0x8642; - - /** Accepted as the {@code pname} parameter of GetInteger64v. */ - public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; - - /** Accepted as the {@code pname} parameter of GetSynciv. */ - public static final int - GL_OBJECT_TYPE = 0x9112, - GL_SYNC_CONDITION = 0x9113, - GL_SYNC_STATUS = 0x9114, - GL_SYNC_FLAGS = 0x9115; - - /** Returned in {@code values} for GetSynciv {@code pname} OBJECT_TYPE. */ - public static final int GL_SYNC_FENCE = 0x9116; - - /** Returned in {@code values} for GetSynciv {@code pname} SYNC_CONDITION. */ - public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; - - /** Returned in {@code values} for GetSynciv {@code pname} SYNC_STATUS. */ - public static final int - GL_UNSIGNALED = 0x9118, - GL_SIGNALED = 0x9119; - - /** Accepted in the {@code flags} parameter of ClientWaitSync. */ - public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; - - /** Accepted in the {@code timeout} parameter of WaitSync. */ - public static final long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFL; - - /** Returned by ClientWaitSync. */ - public static final int - GL_ALREADY_SIGNALED = 0x911A, - GL_TIMEOUT_EXPIRED = 0x911B, - GL_CONDITION_SATISFIED = 0x911C, - GL_WAIT_FAILED = 0x911D; - - protected GL32C() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetBufferParameteri64v ] --- - - /** Unsafe version of: {@link #glGetBufferParameteri64v GetBufferParameteri64v} */ - public static native void nglGetBufferParameteri64v(int target, int pname, long params); - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetBufferParameteri64v(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetBufferParameteri64v(target, pname, memAddress(params)); - } - - /** - * Returns the value of a buffer object parameter. - * - * @param target the target buffer object. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetBufferParameteri64(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetBufferParameteri64v(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDrawElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawElementsBaseVertex DrawElementsBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawElementsBaseVertex(int mode, int count, int type, long indices, int basevertex); - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLint") int basevertex) { - nglDrawElementsBaseVertex(mode, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawElementsBaseVertex(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawElementsBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawElementsBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawElementsBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), basevertex); - } - - // --- [ glDrawRangeElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawRangeElementsBaseVertex DrawRangeElementsBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawRangeElementsBaseVertex(int mode, int start, int end, int count, int type, long indices, int basevertex); - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLint") int basevertex) { - nglDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawRangeElementsBaseVertex(mode, start, end, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ByteBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawRangeElementsBaseVertex(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") ShortBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawRangeElementsBaseVertex(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), basevertex); - } - - /** - * Renders primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param start the minimum array index contained in {@code indices} - * @param end the maximum array index contained in {@code indices} - * @param indices a pointer to the location where the indices are stored - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawRangeElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLuint") int start, @NativeType("GLuint") int end, @NativeType("void const *") IntBuffer indices, @NativeType("GLint") int basevertex) { - nglDrawRangeElementsBaseVertex(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), basevertex); - } - - // --- [ glDrawElementsInstancedBaseVertex ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseVertex DrawElementsInstancedBaseVertex} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawElementsInstancedBaseVertex(int mode, int count, int type, long indices, int primcount, int basevertex); - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - nglDrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - nglDrawElementsInstancedBaseVertex(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - nglDrawElementsInstancedBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - nglDrawElementsInstancedBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), primcount, basevertex); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of indices when chosing elements from the enabled vertex arrays - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertex(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex) { - nglDrawElementsInstancedBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), primcount, basevertex); - } - - // --- [ glMultiDrawElementsBaseVertex ] --- - - /** - * Unsafe version of: {@link #glMultiDrawElementsBaseVertex MultiDrawElementsBaseVertex} - * - * @param drawcount the size of the {@code count} array - */ - public static native void nglMultiDrawElementsBaseVertex(int mode, long count, int type, long indices, int drawcount, long basevertex); - - /** - * Renders multiple sets of primitives by specifying indices of array data elements and an offset to apply to each index. - * - *

    LWJGL note: Use {@link org.lwjgl.system.MemoryUtil#memAddress} to retrieve pointers to the index buffers.

    - * - * @param mode the kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link #GL_LINES_ADJACENCY LINES_ADJACENCY}{@link #GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link #GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link #GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count an array of the elements counts - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param basevertex a pointer to the location where the base vertices are stored - * - * @see Reference Page - */ - public static void glMultiDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei const *") IntBuffer count, @NativeType("GLenum") int type, @NativeType("void const * const *") PointerBuffer indices, @NativeType("GLint *") IntBuffer basevertex) { - while (basevertex.hasRemaining()){ - GL32C.glDrawElementsBaseVertex(mode, count.get(), type, indices.get(), basevertex.get()); - } - } - - // --- [ glProvokingVertex ] --- - - /** - * Specifies the vertex to be used as the source of data for flat shaded varyings. - * - * @param mode the provoking vertex mode. One of:
    {@link #GL_FIRST_VERTEX_CONVENTION FIRST_VERTEX_CONVENTION}{@link #GL_LAST_VERTEX_CONVENTION LAST_VERTEX_CONVENTION}
    - * - * @see Reference Page - */ - public static native void glProvokingVertex(@NativeType("GLenum") int mode); - - // --- [ glTexImage2DMultisample ] --- - - /** - * Establishes the data storage, format, dimensions, and number of samples of a 2D multisample texture's image. - * - * @param target the target of the operation. One of:
    {@link #GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link #GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the multisample texture's image - * @param internalformat the internal format to be used to store the multisample texture's image. {@code internalformat} must specify a color-renderable, depth-renderable, - * or stencil-renderable format. - * @param width the width of the multisample texture's image, in texels - * @param height the height of the multisample texture's image, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static native void glTexImage2DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations); - - // --- [ glTexImage3DMultisample ] --- - - /** - * Establishes the data storage, format, dimensions, and number of samples of a 3D multisample texture's image. - * - * @param target the target of the operation. One of:
    {@link #GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link #GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param samples the number of samples in the multisample texture's image - * @param internalformat the internal format to be used to store the multisample texture's image. {@code internalformat} must specify a color-renderable, depth-renderable, - * or stencil-renderable format. - * @param width the width of the multisample texture's image, in texels - * @param height the height of the multisample texture's image, in texels - * @param depth the depth of the multisample texture's image, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static native void glTexImage3DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations); - - // --- [ glGetMultisamplefv ] --- - - /** Unsafe version of: {@link #glGetMultisamplefv GetMultisamplefv} */ - public static native void nglGetMultisamplefv(int pname, int index, long val); - - /** - * Retrieves the location of a sample. - * - * @param pname the sample parameter name. Must be:
    {@link #GL_SAMPLE_POSITION SAMPLE_POSITION}
    - * @param index the index of the sample whose position to query - * @param val an array to receive the position of the sample - * - * @see Reference Page - */ - public static void glGetMultisamplefv(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer val) { - if (CHECKS) { - check(val, 1); - } - nglGetMultisamplefv(pname, index, memAddress(val)); - } - - /** - * Retrieves the location of a sample. - * - * @param pname the sample parameter name. Must be:
    {@link #GL_SAMPLE_POSITION SAMPLE_POSITION}
    - * @param index the index of the sample whose position to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetMultisamplef(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer val = stack.callocFloat(1); - nglGetMultisamplefv(pname, index, memAddress(val)); - return val.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glSampleMaski ] --- - - /** - * Sets the value of a sub-word of the sample mask. - * - * @param index which 32-bit sub-word of the sample mask to update - * @param mask the new value of the mask sub-word - * - * @see Reference Page - */ - public static native void glSampleMaski(@NativeType("GLuint") int index, @NativeType("GLbitfield") int mask); - - // --- [ glFramebufferTexture ] --- - - /** - * Attaches a level of a texture object as a logical buffer to the currently bound framebuffer object. - * - * @param target the framebuffer target. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static native void glFramebufferTexture(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glFenceSync ] --- - - /** - * Creates a new sync object and inserts it into the GL command stream. - * - * @param condition the condition that must be met to set the sync object's state to signaled. Must be:
    {@link #GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE}
    - * @param flags a bitwise combination of flags controlling the behavior of the sync object. No flags are presently defined for this operation and {@code flags} must - * be zero. - * - * @see Reference Page - */ - @NativeType("GLsync") - public static native long glFenceSync(@NativeType("GLenum") int condition, @NativeType("GLbitfield") int flags); - - // --- [ glIsSync ] --- - - /** Unsafe version of: {@link #glIsSync IsSync} */ - public static native boolean nglIsSync(long sync); - - /** - * Determines if a name corresponds to a sync object. - * - * @param sync a value that may be the name of a sync object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsSync(@NativeType("GLsync") long sync) { - if (CHECKS) { - check(sync); - } - return nglIsSync(sync); - } - - // --- [ glDeleteSync ] --- - - /** Unsafe version of: {@link #glDeleteSync DeleteSync} */ - public static native void nglDeleteSync(long sync); - - /** - * Deletes a sync object. - * - * @param sync the sync object to be deleted - * - * @see Reference Page - */ - public static void glDeleteSync(@NativeType("GLsync") long sync) { - if (CHECKS) { - check(sync); - } - nglDeleteSync(sync); - } - - // --- [ glClientWaitSync ] --- - - /** Unsafe version of: {@link #glClientWaitSync ClientWaitSync} */ - public static native int nglClientWaitSync(long sync, int flags, long timeout); - - /** - * Causes the client to block and wait for a sync object to become signaled. If {@code sync} is signaled when {@code glClientWaitSync} is called, - * {@code glClientWaitSync} returns immediately, otherwise it will block and wait for up to timeout nanoseconds for {@code sync} to become signaled. - * - *

    The return value is one of four status values:

    - * - *
      - *
    • {@link #GL_ALREADY_SIGNALED ALREADY_SIGNALED} indicates that sync was signaled at the time that glClientWaitSync was called.
    • - *
    • {@link #GL_TIMEOUT_EXPIRED TIMEOUT_EXPIRED} indicates that at least timeout nanoseconds passed and sync did not become signaled.
    • - *
    • {@link #GL_CONDITION_SATISFIED CONDITION_SATISFIED} indicates that sync was signaled before the timeout expired.
    • - *
    • {@link #GL_WAIT_FAILED WAIT_FAILED} indicates that an error occurred. Additionally, an OpenGL error will be generated.
    • - *
    - * - * @param sync the sync object whose status to wait on - * @param flags a bitfield controlling the command flushing behavior. One or more of:
    0{@link #GL_SYNC_FLUSH_COMMANDS_BIT SYNC_FLUSH_COMMANDS_BIT}
    - * @param timeout the timeout, specified in nanoseconds, for which the implementation should wait for {@code sync} to become signaled - * - * @see Reference Page - */ - @NativeType("GLenum") - public static int glClientWaitSync(@NativeType("GLsync") long sync, @NativeType("GLbitfield") int flags, @NativeType("GLuint64") long timeout) { - if (CHECKS) { - check(sync); - } - return nglClientWaitSync(sync, flags, timeout); - } - - // --- [ glWaitSync ] --- - - /** Unsafe version of: {@link #glWaitSync WaitSync} */ - public static native void nglWaitSync(long sync, int flags, long timeout); - - /** - * Causes the GL server to block and wait for a sync object to become signaled. - * - *

    {@code glWaitSync} will always wait no longer than an implementation-dependent timeout. The duration of this timeout in nanoseconds may be queried by - * with {@link #GL_MAX_SERVER_WAIT_TIMEOUT MAX_SERVER_WAIT_TIMEOUT}. There is currently no way to determine whether glWaitSync unblocked because the timeout expired or because the - * sync object being waited on was signaled.

    - * - *

    If an error occurs, {@code glWaitSync} does not cause the GL server to block.

    - * - * @param sync the sync object whose status to wait on - * @param flags a bitfield controlling the command flushing behavior. Must be:
    0
    - * @param timeout the timeout that the server should wait before continuing. Must be:
    {@link #GL_TIMEOUT_IGNORED TIMEOUT_IGNORED}
    - * - * @see Reference Page - */ - public static void glWaitSync(@NativeType("GLsync") long sync, @NativeType("GLbitfield") int flags, @NativeType("GLuint64") long timeout) { - if (CHECKS) { - check(sync); - } - nglWaitSync(sync, flags, timeout); - } - - // --- [ glGetInteger64v ] --- - - /** Unsafe version of: {@link #glGetInteger64v GetInteger64v} */ - public static native void nglGetInteger64v(int pname, long params); - - /** - * Returns the 64bit integer value or values of a selected parameter. - * - * @param pname the parameter value to be returned - * @param params the value or values of the specified parameter - * - * @see Reference Page - */ - public static void glGetInteger64v(@NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetInteger64v(pname, memAddress(params)); - } - - /** - * Returns the 64bit integer value or values of a selected parameter. - * - * @param pname the parameter value to be returned - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetInteger64(@NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetInteger64v(pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetInteger64i_v ] --- - - /** Unsafe version of: {@link #glGetInteger64i_v GetInteger64i_v} */ - public static native void nglGetInteger64i_v(int pname, int index, long params); - - /** - * Queries the 64bit integer value of an indexed state variable. - * - * @param pname the indexed state to query - * @param index the index of the element being queried - * @param params the value or values of the specified parameter - * - * @see Reference Page - */ - public static void glGetInteger64i_v(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetInteger64i_v(pname, index, memAddress(params)); - } - - /** - * Queries the 64bit integer value of an indexed state variable. - * - * @param pname the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetInteger64i(@NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetInteger64i_v(pname, index, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetSynciv ] --- - - /** - * Unsafe version of: {@link #glGetSynciv GetSynciv} - * - * @param bufSize the size of the buffer whose address is given in {@code values} - */ - public static native void nglGetSynciv(long sync, int pname, int bufSize, long length, long values); - - /** - * Queries the properties of a sync object. - * - * @param sync the sync object whose properties to query - * @param pname the parameter whose value to retrieve from the sync object specified in {@code sync}. One of:
    {@link #GL_OBJECT_TYPE OBJECT_TYPE}{@link #GL_SYNC_CONDITION SYNC_CONDITION}{@link #GL_SYNC_STATUS SYNC_STATUS}{@link #GL_SYNC_FLAGS SYNC_FLAGS}
    - * @param length the address of an variable to receive the number of integers placed in {@code values} - * @param values the address of an array to receive the values of the queried parameter - * - * @see Reference Page - */ - public static void glGetSynciv(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer values) { - if (CHECKS) { - check(sync); - checkSafe(length, 1); - } - nglGetSynciv(sync, pname, values.remaining(), memAddressSafe(length), memAddress(values)); - } - - /** - * Queries the properties of a sync object. - * - * @param sync the sync object whose properties to query - * @param pname the parameter whose value to retrieve from the sync object specified in {@code sync}. One of:
    {@link #GL_OBJECT_TYPE OBJECT_TYPE}{@link #GL_SYNC_CONDITION SYNC_CONDITION}{@link #GL_SYNC_STATUS SYNC_STATUS}{@link #GL_SYNC_FLAGS SYNC_FLAGS}
    - * @param length the address of an variable to receive the number of integers placed in {@code values} - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSynci(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") IntBuffer length) { - if (CHECKS) { - check(sync); - checkSafe(length, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer values = stack.callocInt(1); - nglGetSynciv(sync, pname, 1, memAddressSafe(length), memAddress(values)); - return values.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Array version of: {@link #glGetBufferParameteri64v GetBufferParameteri64v} - * - * @see Reference Page - */ - public static void glGetBufferParameteri64v(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetBufferParameteri64v; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glMultiDrawElementsBaseVertex MultiDrawElementsBaseVertex} - * - * @see Reference Page - */ - public static void glMultiDrawElementsBaseVertex(@NativeType("GLenum") int mode, @NativeType("GLsizei const *") int[] count, @NativeType("GLenum") int type, @NativeType("void const * const *") PointerBuffer indices, @NativeType("GLint *") int[] basevertex) { - long __functionAddress = GL.getICD().glMultiDrawElementsBaseVertex; - if (CHECKS) { - check(__functionAddress); - check(indices, count.length); - check(basevertex, count.length); - } - callPPPV(mode, count, type, memAddress(indices), count.length, basevertex, __functionAddress); - } - - /** - * Array version of: {@link #glGetMultisamplefv GetMultisamplefv} - * - * @see Reference Page - */ - public static void glGetMultisamplefv(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] val) { - long __functionAddress = GL.getICD().glGetMultisamplefv; - if (CHECKS) { - check(__functionAddress); - check(val, 1); - } - callPV(pname, index, val, __functionAddress); - } - - /** - * Array version of: {@link #glGetInteger64v GetInteger64v} - * - * @see Reference Page - */ - public static void glGetInteger64v(@NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetInteger64v; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetInteger64i_v GetInteger64i_v} - * - * @see Reference Page - */ - public static void glGetInteger64i_v(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetInteger64i_v; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, index, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetSynciv GetSynciv} - * - * @see Reference Page - */ - public static void glGetSynciv(@NativeType("GLsync") long sync, @NativeType("GLenum") int pname, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] values) { - long __functionAddress = GL.getICD().glGetSynciv; - if (CHECKS) { - check(__functionAddress); - check(sync); - checkSafe(length, 1); - } - callPPPV(sync, pname, values.length, length, values, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL33.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL33.java deleted file mode 100644 index 0ff2ab65..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL33.java +++ /dev/null @@ -1,1607 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 3.3. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 3.3 implementations support revision 3.30 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL33 extends GL32 { - - static { GL.initialize(); } - - /** - * Accepted by the {@code src} and {@code dst} parameters of BlendFunc and BlendFunci, and by the {@code srcRGB}, {@code dstRGB}, {@code srcAlpha} and - * {@code dstAlpha} parameters of BlendFuncSeparate and BlendFuncSeparatei. - */ - public static final int - GL_SRC1_COLOR = 0x88F9, - GL_ONE_MINUS_SRC1_COLOR = 0x88FA, - GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and GetDoublev. */ - public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_ANY_SAMPLES_PASSED = 0x8C2F; - - /** Accepted by the {@code value} parameter of the GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv and GetDoublev functions. */ - public static final int GL_SAMPLER_BINDING = 0x8919; - - /** - * Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, RenderbufferStorage and - * RenderbufferStorageMultisample. - */ - public static final int GL_RGB10_A2UI = 0x906F; - - /** Accepted by the {@code pname} parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int - GL_TEXTURE_SWIZZLE_R = 0x8E42, - GL_TEXTURE_SWIZZLE_G = 0x8E43, - GL_TEXTURE_SWIZZLE_B = 0x8E44, - GL_TEXTURE_SWIZZLE_A = 0x8E45; - - /** Accepted by the {@code pname} parameters of TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_TIME_ELAPSED = 0x88BF; - - /** - * Accepted by the {@code target} parameter of GetQueryiv and QueryCounter. Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, - * GetInteger64v, GetFloatv, and GetDoublev. - */ - public static final int GL_TIMESTAMP = 0x8E28; - - /** Accepted by the {@code pname} parameters of GetVertexAttribdv, GetVertexAttribfv, and GetVertexAttribiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; - - /** - * Accepted by the {@code type} parameter of VertexAttribPointer, VertexPointer, NormalPointer, ColorPointer, SecondaryColorPointer, TexCoordPointer, - * VertexAttribP{1234}ui, VertexP*, TexCoordP*, MultiTexCoordP*, NormalP3ui, ColorP*, SecondaryColorP* and VertexAttribP*. - */ - public static final int GL_INT_2_10_10_10_REV = 0x8D9F; - - protected GL33() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindFragDataLocationIndexed ] --- - - /** Unsafe version of: {@link #glBindFragDataLocationIndexed BindFragDataLocationIndexed} */ - public static void nglBindFragDataLocationIndexed(int program, int colorNumber, int index, long name) { - GL33C.nglBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number and index. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param index the index of the color input to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocationIndexed(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLuint") int index, @NativeType("GLchar const *") ByteBuffer name) { - GL33C.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number and index. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param index the index of the color input to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocationIndexed(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLuint") int index, @NativeType("GLchar const *") CharSequence name) { - GL33C.glBindFragDataLocationIndexed(program, colorNumber, index, name); - } - - // --- [ glGetFragDataIndex ] --- - - /** Unsafe version of: {@link #glGetFragDataIndex GetFragDataIndex} */ - public static int nglGetFragDataIndex(int program, long name) { - return GL33C.nglGetFragDataIndex(program, name); - } - - /** - * Queries the bindings of color indices to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose index to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - return GL33C.glGetFragDataIndex(program, name); - } - - /** - * Queries the bindings of color indices to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose index to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - return GL33C.glGetFragDataIndex(program, name); - } - - // --- [ glGenSamplers ] --- - - /** - * Unsafe version of: {@link #glGenSamplers GenSamplers} - * - * @param count the number of sampler object names to generate - */ - public static void nglGenSamplers(int count, long samplers) { - GL33C.nglGenSamplers(count, samplers); - } - - /** - * Generates sampler object names. - * - * @param samplers a buffer in which the generated sampler object names are stored - * - * @see Reference Page - */ - public static void glGenSamplers(@NativeType("GLuint *") IntBuffer samplers) { - GL33C.glGenSamplers(samplers); - } - - /** - * Generates sampler object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenSamplers() { - return GL33C.glGenSamplers(); - } - - // --- [ glDeleteSamplers ] --- - - /** - * Unsafe version of: {@link #glDeleteSamplers DeleteSamplers} - * - * @param count the number of sampler objects to be deleted - */ - public static void nglDeleteSamplers(int count, long samplers) { - GL33C.nglDeleteSamplers(count, samplers); - } - - /** - * Deletes named sampler objects. - * - * @param samplers an array of sampler objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteSamplers(@NativeType("GLuint const *") IntBuffer samplers) { - GL33C.glDeleteSamplers(samplers); - } - - /** - * Deletes named sampler objects. - * - * @see Reference Page - */ - public static void glDeleteSamplers(@NativeType("GLuint const *") int sampler) { - GL33C.glDeleteSamplers(sampler); - } - - // --- [ glIsSampler ] --- - - /** - * Determines if a name corresponds to a sampler object. - * - * @param sampler a value that may be the name of a sampler object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsSampler(@NativeType("GLuint") int sampler) { - return GL33C.glIsSampler(sampler); - } - - // --- [ glBindSampler ] --- - - /** - * Binds a named sampler to a texturing target. - * - * @param unit the index of the texture unit to which the sampler is bound - * @param sampler the name of a sampler - * - * @see Reference Page - */ - public static void glBindSampler(@NativeType("GLuint") int unit, @NativeType("GLuint") int sampler) { - GL33C.glBindSampler(unit, sampler); - } - - // --- [ glSamplerParameteri ] --- - - /** - * Set the integer value of a sampler parameter. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a single-valued sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    - * @param param the value of {@code pname} - * - * @see Reference Page - */ - public static void glSamplerParameteri(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL33C.glSamplerParameteri(sampler, pname, param); - } - - // --- [ glSamplerParameterf ] --- - - /** - * Float version of {@link #glSamplerParameteri SamplerParameteri}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a single-valued sampler parameter - * @param param the value of {@code pname} - * - * @see Reference Page - */ - public static void glSamplerParameterf(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param) { - GL33C.glSamplerParameterf(sampler, pname, param); - } - - // --- [ glSamplerParameteriv ] --- - - /** Unsafe version of: {@link #glSamplerParameteriv SamplerParameteriv} */ - public static void nglSamplerParameteriv(int sampler, int pname, long params) { - GL33C.nglSamplerParameteriv(sampler, pname, params); - } - - /** - * Pointer version of {@link #glSamplerParameteri SamplerParameteri}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL33C.glSamplerParameteriv(sampler, pname, params); - } - - // --- [ glSamplerParameterfv ] --- - - /** Unsafe version of: {@link #glSamplerParameterfv SamplerParameterfv} */ - public static void nglSamplerParameterfv(int sampler, int pname, long params) { - GL33C.nglSamplerParameterfv(sampler, pname, params); - } - - /** - * Float version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - GL33C.glSamplerParameterfv(sampler, pname, params); - } - - // --- [ glSamplerParameterIiv ] --- - - /** Unsafe version of: {@link #glSamplerParameterIiv SamplerParameterIiv} */ - public static void nglSamplerParameterIiv(int sampler, int pname, long params) { - GL33C.nglSamplerParameterIiv(sampler, pname, params); - } - - /** - * Pure integer version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL33C.glSamplerParameterIiv(sampler, pname, params); - } - - // --- [ glSamplerParameterIuiv ] --- - - /** Unsafe version of: {@link #glSamplerParameterIuiv SamplerParameterIuiv} */ - public static void nglSamplerParameterIuiv(int sampler, int pname, long params) { - GL33C.nglSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Unsigned pure integer version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - GL33C.glSamplerParameterIuiv(sampler, pname, params); - } - - // --- [ glGetSamplerParameteriv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameteriv GetSamplerParameteriv} */ - public static void nglGetSamplerParameteriv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameteriv(sampler, pname, params); - } - - /** - * Return the integer value(s) of a sampler parameter. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    ,{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}
    - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL33C.glGetSamplerParameteriv(sampler, pname, params); - } - - /** - * Return the integer value(s) of a sampler parameter. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    ,{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSamplerParameteri(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameteri(sampler, pname); - } - - // --- [ glGetSamplerParameterfv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterfv GetSamplerParameterfv} */ - public static void nglGetSamplerParameterfv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameterfv(sampler, pname, params); - } - - /** - * Float version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL33C.glGetSamplerParameterfv(sampler, pname, params); - } - - /** - * Float version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetSamplerParameterf(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameterf(sampler, pname); - } - - // --- [ glGetSamplerParameterIiv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterIiv GetSamplerParameterIiv} */ - public static void nglGetSamplerParameterIiv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameterIiv(sampler, pname, params); - } - - /** - * Pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL33C.glGetSamplerParameterIiv(sampler, pname, params); - } - - /** - * Pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSamplerParameterIi(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameterIi(sampler, pname); - } - - // --- [ glGetSamplerParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterIuiv GetSamplerParameterIuiv} */ - public static void nglGetSamplerParameterIuiv(int sampler, int pname, long params) { - GL33C.nglGetSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Unsigned pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - GL33C.glGetSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Unsigned pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSamplerParameterIui(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - return GL33C.glGetSamplerParameterIui(sampler, pname); - } - - // --- [ glQueryCounter ] --- - - /** - * Records the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed. - * - * @param id the name of a query object into which to record the GL time - * @param target the counter to query. Must be:
    {@link GL33C#GL_TIMESTAMP TIMESTAMP}
    - * - * @see Reference Page - */ - public static void glQueryCounter(@NativeType("GLuint") int id, @NativeType("GLenum") int target) { - GL33C.glQueryCounter(id, target); - } - - // --- [ glGetQueryObjecti64v ] --- - - /** Unsafe version of: {@link #glGetQueryObjecti64v GetQueryObjecti64v} */ - public static void nglGetQueryObjecti64v(int id, int pname, long params) { - GL33C.nglGetQueryObjecti64v(id, pname, params); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL33C.glGetQueryObjecti64v(id, pname, params); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long params) { - GL33C.glGetQueryObjecti64v(id, pname, params); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetQueryObjecti64(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - return GL33C.glGetQueryObjecti64(id, pname); - } - - // --- [ glGetQueryObjectui64v ] --- - - /** Unsafe version of: {@link #glGetQueryObjectui64v GetQueryObjectui64v} */ - public static void nglGetQueryObjectui64v(int id, int pname, long params) { - GL33C.nglGetQueryObjectui64v(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") LongBuffer params) { - GL33C.glGetQueryObjectui64v(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long params) { - GL33C.glGetQueryObjectui64v(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetQueryObjectui64(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - return GL33C.glGetQueryObjectui64(id, pname); - } - - // --- [ glVertexAttribDivisor ] --- - - /** - * Modifies the rate at which generic vertex attributes advance during instanced rendering. - * - * @param index the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - * - * @see Reference Page - */ - public static void glVertexAttribDivisor(@NativeType("GLuint") int index, @NativeType("GLuint") int divisor) { - GL33C.glVertexAttribDivisor(index, divisor); - } - - // --- [ glVertexP2ui ] --- - - /** - * Packed component version of {@link GL11#glVertex2f Vertex2f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertexP2ui(@NativeType("GLenum") int type, @NativeType("GLuint") int value); - - // --- [ glVertexP3ui ] --- - - /** - * Packed component version of {@link GL11#glVertex3f Vertex3f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertexP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int value); - - // --- [ glVertexP4ui ] --- - - /** - * Packed component version of {@link GL11#glVertex4f Vertex4f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glVertexP4ui(@NativeType("GLenum") int type, @NativeType("GLuint") int value); - - // --- [ glVertexP2uiv ] --- - - /** Unsafe version of: {@link #glVertexP2uiv VertexP2uiv} */ - public static native void nglVertexP2uiv(int type, long value); - - /** - * Pointer version of {@link #glVertexP2ui VertexP2ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglVertexP2uiv(type, memAddress(value)); - } - - // --- [ glVertexP3uiv ] --- - - /** Unsafe version of: {@link #glVertexP3uiv VertexP3uiv} */ - public static native void nglVertexP3uiv(int type, long value); - - /** - * Pointer version of {@link #glVertexP3ui VertexP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglVertexP3uiv(type, memAddress(value)); - } - - // --- [ glVertexP4uiv ] --- - - /** Unsafe version of: {@link #glVertexP4uiv VertexP4uiv} */ - public static native void nglVertexP4uiv(int type, long value); - - /** - * Pointer version of {@link #glVertexP4ui VertexP4ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param value the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglVertexP4uiv(type, memAddress(value)); - } - - // --- [ glTexCoordP1ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord1f TexCoord1f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoordP1ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glTexCoordP2ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord2f TexCoord2f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoordP2ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glTexCoordP3ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord3f TexCoord3f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoordP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glTexCoordP4ui ] --- - - /** - * Packed component version of {@link GL11#glTexCoord4f TexCoord4f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glTexCoordP4ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glTexCoordP1uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP1uiv TexCoordP1uiv} */ - public static native void nglTexCoordP1uiv(int type, long coords); - - /** - * Pointer version of {@link #glTexCoordP1ui TexCoordP1ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP1uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglTexCoordP1uiv(type, memAddress(coords)); - } - - // --- [ glTexCoordP2uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP2uiv TexCoordP2uiv} */ - public static native void nglTexCoordP2uiv(int type, long coords); - - /** - * Pointer version of {@link #glTexCoordP2ui TexCoordP2ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglTexCoordP2uiv(type, memAddress(coords)); - } - - // --- [ glTexCoordP3uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP3uiv TexCoordP3uiv} */ - public static native void nglTexCoordP3uiv(int type, long coords); - - /** - * Pointer version of {@link #glTexCoordP3ui TexCoordP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglTexCoordP3uiv(type, memAddress(coords)); - } - - // --- [ glTexCoordP4uiv ] --- - - /** Unsafe version of: {@link #glTexCoordP4uiv TexCoordP4uiv} */ - public static native void nglTexCoordP4uiv(int type, long coords); - - /** - * Pointer version of {@link #glTexCoordP4ui TexCoordP4ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglTexCoordP4uiv(type, memAddress(coords)); - } - - // --- [ glMultiTexCoordP1ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord1f MultiTexCoord1f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoordP1ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glMultiTexCoordP2ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord2f MultiTexCoord2f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoordP2ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glMultiTexCoordP3ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord3f MultiTexCoord3f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoordP3ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glMultiTexCoordP4ui ] --- - - /** - * Packed component version of {@link GL13#glMultiTexCoord4f MultiTexCoord4f}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    typeofpackingusedonthedata
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glMultiTexCoordP4ui(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glMultiTexCoordP1uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP1uiv MultiTexCoordP1uiv} */ - public static native void nglMultiTexCoordP1uiv(int texture, int type, long coords); - - /** - * Pointer version of {@link #glMultiTexCoordP1ui MultiTexCoordP1ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP1uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglMultiTexCoordP1uiv(texture, type, memAddress(coords)); - } - - // --- [ glMultiTexCoordP2uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP2uiv MultiTexCoordP2uiv} */ - public static native void nglMultiTexCoordP2uiv(int texture, int type, long coords); - - /** - * Pointer version of {@link #glMultiTexCoordP2ui MultiTexCoordP2ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP2uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglMultiTexCoordP2uiv(texture, type, memAddress(coords)); - } - - // --- [ glMultiTexCoordP3uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP3uiv MultiTexCoordP3uiv} */ - public static native void nglMultiTexCoordP3uiv(int texture, int type, long coords); - - /** - * Pointer version of {@link #glMultiTexCoordP3ui MultiTexCoordP3ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP3uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglMultiTexCoordP3uiv(texture, type, memAddress(coords)); - } - - // --- [ glMultiTexCoordP4uiv ] --- - - /** Unsafe version of: {@link #glMultiTexCoordP4uiv MultiTexCoordP4uiv} */ - public static native void nglMultiTexCoordP4uiv(int texture, int type, long coords); - - /** - * Pointer version of {@link #glMultiTexCoordP4ui MultiTexCoordP4ui}. - * - * @param texture the coordinate set to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP4uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglMultiTexCoordP4uiv(texture, type, memAddress(coords)); - } - - // --- [ glNormalP3ui ] --- - - /** - * Packed component version of {@link GL11#glNormal3f Normal3f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glNormalP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int coords); - - // --- [ glNormalP3uiv ] --- - - /** Unsafe version of: {@link #glNormalP3uiv NormalP3uiv} */ - public static native void nglNormalP3uiv(int type, long coords); - - /** - * Pointer version {@link #glNormalP3ui NormalP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param coords the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormalP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer coords) { - if (CHECKS) { - check(coords, 1); - } - nglNormalP3uiv(type, memAddress(coords)); - } - - // --- [ glColorP3ui ] --- - - /** - * Packed component version of {@link GL11#glColor3f Color3f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColorP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int color); - - // --- [ glColorP4ui ] --- - - /** - * Packed component version of {@link GL11#glColor4f Color4f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glColorP4ui(@NativeType("GLenum") int type, @NativeType("GLuint") int color); - - // --- [ glColorP3uiv ] --- - - /** Unsafe version of: {@link #glColorP3uiv ColorP3uiv} */ - public static native void nglColorP3uiv(int type, long color); - - /** - * Pointer version of {@link #glColorP3ui ColorP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer color) { - if (CHECKS) { - check(color, 1); - } - nglColorP3uiv(type, memAddress(color)); - } - - // --- [ glColorP4uiv ] --- - - /** Unsafe version of: {@link #glColorP4uiv ColorP4uiv} */ - public static native void nglColorP4uiv(int type, long color); - - /** - * Pointer version of {@link #glColorP4ui ColorP4ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer color) { - if (CHECKS) { - check(color, 1); - } - nglColorP4uiv(type, memAddress(color)); - } - - // --- [ glSecondaryColorP3ui ] --- - - /** - * Packed component version of {@link GL14#glSecondaryColor3f SecondaryColor3f}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static native void glSecondaryColorP3ui(@NativeType("GLenum") int type, @NativeType("GLuint") int color); - - // --- [ glSecondaryColorP3uiv ] --- - - /** Unsafe version of: {@link #glSecondaryColorP3uiv SecondaryColorP3uiv} */ - public static native void nglSecondaryColorP3uiv(int type, long color); - - /** - * Pointer version of {@link #glSecondaryColorP3ui SecondaryColorP3ui}. - * - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param color the packed value - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") IntBuffer color) { - if (CHECKS) { - check(color, 1); - } - nglSecondaryColorP3uiv(type, memAddress(color)); - } - - // --- [ glVertexAttribP1ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP1ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP1ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP2ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP2ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP2ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP3ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP3ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP3ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP4ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP4ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value) { - GL33C.glVertexAttribP4ui(index, type, normalized, value); - } - - // --- [ glVertexAttribP1uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP1uiv VertexAttribP1uiv} */ - public static void nglVertexAttribP1uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP1uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP1ui VertexAttribP1ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP1uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP1uiv(index, type, normalized, value); - } - - // --- [ glVertexAttribP2uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP2uiv VertexAttribP2uiv} */ - public static void nglVertexAttribP2uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP2uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP2ui VertexAttribP2ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP2uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP2uiv(index, type, normalized, value); - } - - // --- [ glVertexAttribP3uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP3uiv VertexAttribP3uiv} */ - public static void nglVertexAttribP3uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP3uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP3ui VertexAttribP3ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP3uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP3uiv(index, type, normalized, value); - } - - // --- [ glVertexAttribP4uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP4uiv VertexAttribP4uiv} */ - public static void nglVertexAttribP4uiv(int index, int type, boolean normalized, long value) { - GL33C.nglVertexAttribP4uiv(index, type, normalized, value); - } - - /** - * Pointer version of {@link #glVertexAttribP4ui VertexAttribP4ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link GL33C#GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP4uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - GL33C.glVertexAttribP4uiv(index, type, normalized, value); - } - - /** - * Array version of: {@link #glGenSamplers GenSamplers} - * - * @see Reference Page - */ - public static void glGenSamplers(@NativeType("GLuint *") int[] samplers) { - GL33C.glGenSamplers(samplers); - } - - /** - * Array version of: {@link #glDeleteSamplers DeleteSamplers} - * - * @see Reference Page - */ - public static void glDeleteSamplers(@NativeType("GLuint const *") int[] samplers) { - GL33C.glDeleteSamplers(samplers); - } - - /** - * Array version of: {@link #glSamplerParameteriv SamplerParameteriv} - * - * @see Reference Page - */ - public static void glSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL33C.glSamplerParameteriv(sampler, pname, params); - } - - /** - * Array version of: {@link #glSamplerParameterfv SamplerParameterfv} - * - * @see Reference Page - */ - public static void glSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - GL33C.glSamplerParameterfv(sampler, pname, params); - } - - /** - * Array version of: {@link #glSamplerParameterIiv SamplerParameterIiv} - * - * @see Reference Page - */ - public static void glSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL33C.glSamplerParameterIiv(sampler, pname, params); - } - - /** - * Array version of: {@link #glSamplerParameterIuiv SamplerParameterIuiv} - * - * @see Reference Page - */ - public static void glSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - GL33C.glSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Array version of: {@link #glGetSamplerParameteriv GetSamplerParameteriv} - * - * @see Reference Page - */ - public static void glGetSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL33C.glGetSamplerParameteriv(sampler, pname, params); - } - - /** - * Array version of: {@link #glGetSamplerParameterfv GetSamplerParameterfv} - * - * @see Reference Page - */ - public static void glGetSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL33C.glGetSamplerParameterfv(sampler, pname, params); - } - - /** - * Array version of: {@link #glGetSamplerParameterIiv GetSamplerParameterIiv} - * - * @see Reference Page - */ - public static void glGetSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL33C.glGetSamplerParameterIiv(sampler, pname, params); - } - - /** - * Array version of: {@link #glGetSamplerParameterIuiv GetSamplerParameterIuiv} - * - * @see Reference Page - */ - public static void glGetSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - GL33C.glGetSamplerParameterIuiv(sampler, pname, params); - } - - /** - * Array version of: {@link #glGetQueryObjecti64v GetQueryObjecti64v} - * - * @see Reference Page - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL33C.glGetQueryObjecti64v(id, pname, params); - } - - /** - * Array version of: {@link #glGetQueryObjectui64v GetQueryObjectui64v} - * - * @see Reference Page - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long[] params) { - GL33C.glGetQueryObjectui64v(id, pname, params); - } - - /** - * Array version of: {@link #glVertexP2uiv VertexP2uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glVertexP2uiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(type, value, __functionAddress); - } - - /** - * Array version of: {@link #glVertexP3uiv VertexP3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glVertexP3uiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(type, value, __functionAddress); - } - - /** - * Array version of: {@link #glVertexP4uiv VertexP4uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glVertexP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glVertexP4uiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(type, value, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoordP1uiv TexCoordP1uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP1uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glTexCoordP1uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoordP2uiv TexCoordP2uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP2uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glTexCoordP2uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoordP3uiv TexCoordP3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glTexCoordP3uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glTexCoordP4uiv TexCoordP4uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glTexCoordP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glTexCoordP4uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoordP1uiv MultiTexCoordP1uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP1uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glMultiTexCoordP1uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(texture, type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoordP2uiv MultiTexCoordP2uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP2uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glMultiTexCoordP2uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(texture, type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoordP3uiv MultiTexCoordP3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP3uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glMultiTexCoordP3uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(texture, type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glMultiTexCoordP4uiv MultiTexCoordP4uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glMultiTexCoordP4uiv(@NativeType("GLenum") int texture, @NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glMultiTexCoordP4uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(texture, type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glNormalP3uiv NormalP3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glNormalP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] coords) { - long __functionAddress = GL.getICD().glNormalP3uiv; - if (CHECKS) { - check(__functionAddress); - check(coords, 1); - } - callPV(type, coords, __functionAddress); - } - - /** - * Array version of: {@link #glColorP3uiv ColorP3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] color) { - long __functionAddress = GL.getICD().glColorP3uiv; - if (CHECKS) { - check(__functionAddress); - check(color, 1); - } - callPV(type, color, __functionAddress); - } - - /** - * Array version of: {@link #glColorP4uiv ColorP4uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glColorP4uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] color) { - long __functionAddress = GL.getICD().glColorP4uiv; - if (CHECKS) { - check(__functionAddress); - check(color, 1); - } - callPV(type, color, __functionAddress); - } - - /** - * Array version of: {@link #glSecondaryColorP3uiv SecondaryColorP3uiv} - * - * @see Reference Page - This function is deprecated and unavailable in the Core profile - */ - public static void glSecondaryColorP3uiv(@NativeType("GLenum") int type, @NativeType("GLuint const *") int[] color) { - long __functionAddress = GL.getICD().glSecondaryColorP3uiv; - if (CHECKS) { - check(__functionAddress); - check(color, 1); - } - callPV(type, color, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribP1uiv VertexAttribP1uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP1uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP1uiv(index, type, normalized, value); - } - - /** - * Array version of: {@link #glVertexAttribP2uiv VertexAttribP2uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP2uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP2uiv(index, type, normalized, value); - } - - /** - * Array version of: {@link #glVertexAttribP3uiv VertexAttribP3uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP3uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP3uiv(index, type, normalized, value); - } - - /** - * Array version of: {@link #glVertexAttribP4uiv VertexAttribP4uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP4uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - GL33C.glVertexAttribP4uiv(index, type, normalized, value); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL33C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL33C.java deleted file mode 100644 index 90b60394..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL33C.java +++ /dev/null @@ -1,1049 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 3.3. Includes only Core Profile symbols. - * - *

    OpenGL 3.3 implementations support revision 3.30 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL33C extends GL32C { - - static { GL.initialize(); } - - /** - * Accepted by the {@code src} and {@code dst} parameters of BlendFunc and BlendFunci, and by the {@code srcRGB}, {@code dstRGB}, {@code srcAlpha} and - * {@code dstAlpha} parameters of BlendFuncSeparate and BlendFuncSeparatei. - */ - public static final int - GL_SRC1_COLOR = 0x88F9, - GL_ONE_MINUS_SRC1_COLOR = 0x88FA, - GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv and GetDoublev. */ - public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_ANY_SAMPLES_PASSED = 0x8C2F; - - /** Accepted by the {@code value} parameter of the GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv and GetDoublev functions. */ - public static final int GL_SAMPLER_BINDING = 0x8919; - - /** - * Accepted by the {@code internalFormat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, RenderbufferStorage and - * RenderbufferStorageMultisample. - */ - public static final int GL_RGB10_A2UI = 0x906F; - - /** Accepted by the {@code pname} parameters of TexParameteri, TexParameterf, TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int - GL_TEXTURE_SWIZZLE_R = 0x8E42, - GL_TEXTURE_SWIZZLE_G = 0x8E43, - GL_TEXTURE_SWIZZLE_B = 0x8E44, - GL_TEXTURE_SWIZZLE_A = 0x8E45; - - /** Accepted by the {@code pname} parameters of TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv. */ - public static final int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int GL_TIME_ELAPSED = 0x88BF; - - /** - * Accepted by the {@code target} parameter of GetQueryiv and QueryCounter. Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, - * GetInteger64v, GetFloatv, and GetDoublev. - */ - public static final int GL_TIMESTAMP = 0x8E28; - - /** Accepted by the {@code pname} parameters of GetVertexAttribdv, GetVertexAttribfv, and GetVertexAttribiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; - - /** - * Accepted by the {@code type} parameter of VertexAttribPointer, VertexPointer, NormalPointer, ColorPointer, SecondaryColorPointer, TexCoordPointer, - * VertexAttribP{1234}ui, VertexP*, TexCoordP*, MultiTexCoordP*, NormalP3ui, ColorP*, SecondaryColorP* and VertexAttribP*. - */ - public static final int GL_INT_2_10_10_10_REV = 0x8D9F; - - protected GL33C() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindFragDataLocationIndexed ] --- - - /** Unsafe version of: {@link #glBindFragDataLocationIndexed BindFragDataLocationIndexed} */ - public static native void nglBindFragDataLocationIndexed(int program, int colorNumber, int index, long name); - - /** - * Binds a user-defined varying out variable to a fragment shader color number and index. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param index the index of the color input to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocationIndexed(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLuint") int index, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - nglBindFragDataLocationIndexed(program, colorNumber, index, memAddress(name)); - } - - /** - * Binds a user-defined varying out variable to a fragment shader color number and index. - * - * @param program the name of the program containing varying out variable whose binding to modify - * @param colorNumber the color number to bind the user-defined varying out variable to - * @param index the index of the color input to bind the user-defined varying out variable to - * @param name the name of the user-defined varying out variable whose binding to modify - * - * @see Reference Page - */ - public static void glBindFragDataLocationIndexed(@NativeType("GLuint") int program, @NativeType("GLuint") int colorNumber, @NativeType("GLuint") int index, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - nglBindFragDataLocationIndexed(program, colorNumber, index, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetFragDataIndex ] --- - - /** Unsafe version of: {@link #glGetFragDataIndex GetFragDataIndex} */ - public static native int nglGetFragDataIndex(int program, long name); - - /** - * Queries the bindings of color indices to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose index to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetFragDataIndex(program, memAddress(name)); - } - - /** - * Queries the bindings of color indices to user-defined varying out variables. - * - * @param program the name of the program containing varying out variable whose binding to query - * @param name the name of the user-defined varying out variable whose index to query - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetFragDataIndex(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetFragDataIndex(program, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenSamplers ] --- - - /** - * Unsafe version of: {@link #glGenSamplers GenSamplers} - * - * @param count the number of sampler object names to generate - */ - public static native void nglGenSamplers(int count, long samplers); - - /** - * Generates sampler object names. - * - * @param samplers a buffer in which the generated sampler object names are stored - * - * @see Reference Page - */ - public static void glGenSamplers(@NativeType("GLuint *") IntBuffer samplers) { - nglGenSamplers(samplers.remaining(), memAddress(samplers)); - } - - /** - * Generates sampler object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenSamplers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer samplers = stack.callocInt(1); - nglGenSamplers(1, memAddress(samplers)); - return samplers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteSamplers ] --- - - /** - * Unsafe version of: {@link #glDeleteSamplers DeleteSamplers} - * - * @param count the number of sampler objects to be deleted - */ - public static native void nglDeleteSamplers(int count, long samplers); - - /** - * Deletes named sampler objects. - * - * @param samplers an array of sampler objects to be deleted - * - * @see Reference Page - */ - public static void glDeleteSamplers(@NativeType("GLuint const *") IntBuffer samplers) { - nglDeleteSamplers(samplers.remaining(), memAddress(samplers)); - } - - /** - * Deletes named sampler objects. - * - * @see Reference Page - */ - public static void glDeleteSamplers(@NativeType("GLuint const *") int sampler) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer samplers = stack.ints(sampler); - nglDeleteSamplers(1, memAddress(samplers)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsSampler ] --- - - /** - * Determines if a name corresponds to a sampler object. - * - * @param sampler a value that may be the name of a sampler object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsSampler(@NativeType("GLuint") int sampler); - - // --- [ glBindSampler ] --- - - /** - * Binds a named sampler to a texturing target. - * - * @param unit the index of the texture unit to which the sampler is bound - * @param sampler the name of a sampler - * - * @see Reference Page - */ - public static native void glBindSampler(@NativeType("GLuint") int unit, @NativeType("GLuint") int sampler); - - // --- [ glSamplerParameteri ] --- - - /** - * Set the integer value of a sampler parameter. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a single-valued sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    - * @param param the value of {@code pname} - * - * @see Reference Page - */ - public static native void glSamplerParameteri(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glSamplerParameterf ] --- - - /** - * Float version of {@link #glSamplerParameteri SamplerParameteri}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a single-valued sampler parameter - * @param param the value of {@code pname} - * - * @see Reference Page - */ - public static native void glSamplerParameterf(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glSamplerParameteriv ] --- - - /** Unsafe version of: {@link #glSamplerParameteriv SamplerParameteriv} */ - public static native void nglSamplerParameteriv(int sampler, int pname, long params); - - /** - * Pointer version of {@link #glSamplerParameteri SamplerParameteri}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglSamplerParameteriv(sampler, pname, memAddress(params)); - } - - // --- [ glSamplerParameterfv ] --- - - /** Unsafe version of: {@link #glSamplerParameterfv SamplerParameterfv} */ - public static native void nglSamplerParameterfv(int sampler, int pname, long params); - - /** - * Float version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglSamplerParameterfv(sampler, pname, memAddress(params)); - } - - // --- [ glSamplerParameterIiv ] --- - - /** Unsafe version of: {@link #glSamplerParameterIiv SamplerParameterIiv} */ - public static native void nglSamplerParameterIiv(int sampler, int pname, long params); - - /** - * Pure integer version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglSamplerParameterIiv(sampler, pname, memAddress(params)); - } - - // --- [ glSamplerParameterIuiv ] --- - - /** Unsafe version of: {@link #glSamplerParameterIuiv SamplerParameterIuiv} */ - public static native void nglSamplerParameterIuiv(int sampler, int pname, long params); - - /** - * Unsigned pure integer version of {@link #glSamplerParameteriv SamplerParameteriv}. - * - * @param sampler the sampler object whose parameter to modify - * @param pname the symbolic name of a sampler parameter - * @param params an array where the value or values of {@code pname} are stored - * - * @see Reference Page - */ - public static void glSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglSamplerParameterIuiv(sampler, pname, memAddress(params)); - } - - // --- [ glGetSamplerParameteriv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameteriv GetSamplerParameteriv} */ - public static native void nglGetSamplerParameteriv(int sampler, int pname, long params); - - /** - * Return the integer value(s) of a sampler parameter. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    ,{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}
    - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetSamplerParameteriv(sampler, pname, memAddress(params)); - } - - /** - * Return the integer value(s) of a sampler parameter. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter. One of:
    {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}{@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}
    {@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}{@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    ,{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSamplerParameteri(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetSamplerParameteriv(sampler, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetSamplerParameterfv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterfv GetSamplerParameterfv} */ - public static native void nglGetSamplerParameterfv(int sampler, int pname, long params); - - /** - * Float version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetSamplerParameterfv(sampler, pname, memAddress(params)); - } - - /** - * Float version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetSamplerParameterf(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetSamplerParameterfv(sampler, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetSamplerParameterIiv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterIiv GetSamplerParameterIiv} */ - public static native void nglGetSamplerParameterIiv(int sampler, int pname, long params); - - /** - * Pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetSamplerParameterIiv(sampler, pname, memAddress(params)); - } - - /** - * Pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSamplerParameterIi(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetSamplerParameterIiv(sampler, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetSamplerParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetSamplerParameterIuiv GetSamplerParameterIuiv} */ - public static native void nglGetSamplerParameterIuiv(int sampler, int pname, long params); - - /** - * Unsigned pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * @param params the sampler parameters - * - * @see Reference Page - */ - public static void glGetSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetSamplerParameterIuiv(sampler, pname, memAddress(params)); - } - - /** - * Unsigned pure integer version of {@link #glGetSamplerParameteriv GetSamplerParameteriv}. - * - * @param sampler the name of the sampler object from which to retrieve parameters - * @param pname the symbolic name of a sampler parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetSamplerParameterIui(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetSamplerParameterIuiv(sampler, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glQueryCounter ] --- - - /** - * Records the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed. - * - * @param id the name of a query object into which to record the GL time - * @param target the counter to query. Must be:
    {@link #GL_TIMESTAMP TIMESTAMP}
    - * - * @see Reference Page - */ - public static native void glQueryCounter(@NativeType("GLuint") int id, @NativeType("GLenum") int target); - - // --- [ glGetQueryObjecti64v ] --- - - /** Unsafe version of: {@link #glGetQueryObjecti64v GetQueryObjecti64v} */ - public static native void nglGetQueryObjecti64v(int id, int pname, long params); - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjecti64v(id, pname, memAddress(params)); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long params) { - nglGetQueryObjecti64v(id, pname, params); - } - - /** - * Returns the 64bit integer value of query object parameter. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter. One of:
    {@link GL15#GL_QUERY_RESULT QUERY_RESULT}{@link GL15#GL_QUERY_RESULT_AVAILABLE QUERY_RESULT_AVAILABLE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetQueryObjecti64(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetQueryObjecti64v(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetQueryObjectui64v ] --- - - /** Unsafe version of: {@link #glGetQueryObjectui64v GetQueryObjectui64v} */ - public static native void nglGetQueryObjectui64v(int id, int pname, long params); - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryObjectui64v(id, pname, memAddress(params)); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long params) { - nglGetQueryObjectui64v(id, pname, params); - } - - /** - * Unsigned version of {@link #glGetQueryObjecti64v GetQueryObjecti64v}. - * - * @param id the name of a query object - * @param pname the symbolic name of a query object parameter - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetQueryObjectui64(@NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetQueryObjectui64v(id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glVertexAttribDivisor ] --- - - /** - * Modifies the rate at which generic vertex attributes advance during instanced rendering. - * - * @param index the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - * - * @see Reference Page - */ - public static native void glVertexAttribDivisor(@NativeType("GLuint") int index, @NativeType("GLuint") int divisor); - - // --- [ glVertexAttribP1ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib1f VertexAttrib1f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static native void glVertexAttribP1ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value); - - // --- [ glVertexAttribP2ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib2f VertexAttrib2f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static native void glVertexAttribP2ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value); - - // --- [ glVertexAttribP3ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib3f VertexAttrib3f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static native void glVertexAttribP3ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value); - - // --- [ glVertexAttribP4ui ] --- - - /** - * Packed component version of {@link GL20C#glVertexAttrib4f VertexAttrib4f}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static native void glVertexAttribP4ui(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int value); - - // --- [ glVertexAttribP1uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP1uiv VertexAttribP1uiv} */ - public static native void nglVertexAttribP1uiv(int index, int type, boolean normalized, long value); - - /** - * Pointer version of {@link #glVertexAttribP1ui VertexAttribP1ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP1uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglVertexAttribP1uiv(index, type, normalized, memAddress(value)); - } - - // --- [ glVertexAttribP2uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP2uiv VertexAttribP2uiv} */ - public static native void nglVertexAttribP2uiv(int index, int type, boolean normalized, long value); - - /** - * Pointer version of {@link #glVertexAttribP2ui VertexAttribP2ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP2uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglVertexAttribP2uiv(index, type, normalized, memAddress(value)); - } - - // --- [ glVertexAttribP3uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP3uiv VertexAttribP3uiv} */ - public static native void nglVertexAttribP3uiv(int index, int type, boolean normalized, long value); - - /** - * Pointer version of {@link #glVertexAttribP3ui VertexAttribP3ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP3uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglVertexAttribP3uiv(index, type, normalized, memAddress(value)); - } - - // --- [ glVertexAttribP4uiv ] --- - - /** Unsafe version of: {@link #glVertexAttribP4uiv VertexAttribP4uiv} */ - public static native void nglVertexAttribP4uiv(int index, int type, boolean normalized, long value); - - /** - * Pointer version of {@link #glVertexAttribP4ui VertexAttribP4ui}. - * - * @param index the index of the generic vertex attribute to be modified - * @param type type of packing used on the data. One of:
    {@link #GL_INT_2_10_10_10_REV INT_2_10_10_10_REV}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param normalized whether values should be normalized or cast directly to floating-point - * @param value the packed value - * - * @see Reference Page - */ - public static void glVertexAttribP4uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglVertexAttribP4uiv(index, type, normalized, memAddress(value)); - } - - /** - * Array version of: {@link #glGenSamplers GenSamplers} - * - * @see Reference Page - */ - public static void glGenSamplers(@NativeType("GLuint *") int[] samplers) { - long __functionAddress = GL.getICD().glGenSamplers; - if (CHECKS) { - check(__functionAddress); - } - callPV(samplers.length, samplers, __functionAddress); - } - - /** - * Array version of: {@link #glDeleteSamplers DeleteSamplers} - * - * @see Reference Page - */ - public static void glDeleteSamplers(@NativeType("GLuint const *") int[] samplers) { - long __functionAddress = GL.getICD().glDeleteSamplers; - if (CHECKS) { - check(__functionAddress); - } - callPV(samplers.length, samplers, __functionAddress); - } - - /** - * Array version of: {@link #glSamplerParameteriv SamplerParameteriv} - * - * @see Reference Page - */ - public static void glSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glSamplerParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glSamplerParameterfv SamplerParameterfv} - * - * @see Reference Page - */ - public static void glSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glSamplerParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glSamplerParameterIiv SamplerParameterIiv} - * - * @see Reference Page - */ - public static void glSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glSamplerParameterIiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glSamplerParameterIuiv SamplerParameterIuiv} - * - * @see Reference Page - */ - public static void glSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - long __functionAddress = GL.getICD().glSamplerParameterIuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetSamplerParameteriv GetSamplerParameteriv} - * - * @see Reference Page - */ - public static void glGetSamplerParameteriv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetSamplerParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetSamplerParameterfv GetSamplerParameterfv} - * - * @see Reference Page - */ - public static void glGetSamplerParameterfv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetSamplerParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetSamplerParameterIiv GetSamplerParameterIiv} - * - * @see Reference Page - */ - public static void glGetSamplerParameterIiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetSamplerParameterIiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetSamplerParameterIuiv GetSamplerParameterIuiv} - * - * @see Reference Page - */ - public static void glGetSamplerParameterIuiv(@NativeType("GLuint") int sampler, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetSamplerParameterIuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(sampler, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetQueryObjecti64v GetQueryObjecti64v} - * - * @see Reference Page - */ - public static void glGetQueryObjecti64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetQueryObjecti64v; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetQueryObjectui64v GetQueryObjectui64v} - * - * @see Reference Page - */ - public static void glGetQueryObjectui64v(@NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetQueryObjectui64v; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(id, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribP1uiv VertexAttribP1uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP1uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glVertexAttribP1uiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(index, type, normalized, value, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribP2uiv VertexAttribP2uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP2uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glVertexAttribP2uiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(index, type, normalized, value, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribP3uiv VertexAttribP3uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP3uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glVertexAttribP3uiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(index, type, normalized, value, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribP4uiv VertexAttribP4uiv} - * - * @see Reference Page - */ - public static void glVertexAttribP4uiv(@NativeType("GLuint") int index, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glVertexAttribP4uiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(index, type, normalized, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL40.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL40.java deleted file mode 100644 index d57bbc5b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL40.java +++ /dev/null @@ -1,1705 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 4.0. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 4.0 implementations support revision 4.00 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL40 extends GL33 { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * MapBufferRange, FlushMappedBufferRange, GetBufferParameteriv, and CopyBufferSubData. - */ - public static final int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, - GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, - GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, - GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D; - - /** Returned in the {@code type} parameter of GetActiveUniform, and GetTransformFeedbackVarying. */ - public static final int - GL_DOUBLE_VEC2 = 0x8FFC, - GL_DOUBLE_VEC3 = 0x8FFD, - GL_DOUBLE_VEC4 = 0x8FFE, - GL_DOUBLE_MAT2 = 0x8F46, - GL_DOUBLE_MAT3 = 0x8F47, - GL_DOUBLE_MAT4 = 0x8F48, - GL_DOUBLE_MAT2x3 = 0x8F49, - GL_DOUBLE_MAT2x4 = 0x8F4A, - GL_DOUBLE_MAT3x2 = 0x8F4B, - GL_DOUBLE_MAT3x4 = 0x8F4C, - GL_DOUBLE_MAT4x2 = 0x8F4D, - GL_DOUBLE_MAT4x3 = 0x8F4E; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_SAMPLE_SHADING = 0x8C36; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37; - - /** Accepted by the {@code pname} parameter of GetProgramStageiv. */ - public static final int - GL_ACTIVE_SUBROUTINES = 0x8DE5, - GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6, - GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47, - GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48, - GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_SUBROUTINES = 0x8DE7, - GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; - - /** Accepted by the {@code pname} parameter of GetActiveSubroutineUniformiv. */ - public static final int - GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A, - GL_COMPATIBLE_SUBROUTINES = 0x8E4B; - - /** Accepted by the {@code mode} parameter of Begin and all vertex array functions that implicitly call Begin. */ - public static final int GL_PATCHES = 0xE; - - /** Accepted by the {@code pname} parameter of PatchParameteri, GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int GL_PATCH_VERTICES = 0x8E72; - - /** Accepted by the {@code pname} parameter of PatchParameterfv, GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv, and GetInteger64v. */ - public static final int - GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73, - GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75, - GL_TESS_GEN_MODE = 0x8E76, - GL_TESS_GEN_SPACING = 0x8E77, - GL_TESS_GEN_VERTEX_ORDER = 0x8E78, - GL_TESS_GEN_POINT_MODE = 0x8E79; - - /** Returned by GetProgramiv when {@code pname} is TESS_GEN_MODE. */ - public static final int GL_ISOLINES = 0x8E7A; - - /** Returned by GetProgramiv when {@code pname} is TESS_GEN_SPACING. */ - public static final int - GL_FRACTIONAL_ODD = 0x8E7B, - GL_FRACTIONAL_EVEN = 0x8E7C; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int - GL_MAX_PATCH_VERTICES = 0x8E7D, - GL_MAX_TESS_GEN_LEVEL = 0x8E7E, - GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F, - GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80, - GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81, - GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82, - GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83, - GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84, - GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85, - GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86, - GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89, - GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A, - GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C, - GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D, - GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E, - GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int - GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0, - GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; - - /** Accepted by the {@code type} parameter of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int - GL_TESS_EVALUATION_SHADER = 0x8E87, - GL_TESS_CONTROL_SHADER = 0x8E88; - - /** Accepted by the {@code target} parameter of TexParameteri, TexParameteriv, TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap. */ - public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A; - - /** Accepted by the {@code target} parameter of TexImage3D, TexSubImage3D, CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D. */ - public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C, - GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D, - GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E, - GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E, - GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F; - - /** Accepted by the {@code target} parameter of BindTransformFeedback. */ - public static final int GL_TRANSFORM_FEEDBACK = 0x8E22; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23, - GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24, - GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70, - GL_MAX_VERTEX_STREAMS = 0x8E71; - - protected GL40() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendEquationi ] --- - - /** - * Specifies the equation used for both the RGB blend equation and the Alpha blend equation for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend equation - * @param mode how source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * - * @see Reference Page - */ - public static void glBlendEquationi(@NativeType("GLuint") int buf, @NativeType("GLenum") int mode) { - GL40C.glBlendEquationi(buf, mode); - } - - // --- [ glBlendEquationSeparatei ] --- - - /** - * Sets the RGB blend equation and the alpha blend equation separately for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend equations - * @param modeRGB the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * @param modeAlpha the alpha blend equation, how the alpha component of the source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * - * @see Reference Page - */ - public static void glBlendEquationSeparatei(@NativeType("GLuint") int buf, @NativeType("GLenum") int modeRGB, @NativeType("GLenum") int modeAlpha) { - GL40C.glBlendEquationSeparatei(buf, modeRGB, modeAlpha); - } - - // --- [ glBlendFunci ] --- - - /** - * Specifies pixel arithmetic for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend function - * @param sfactor how the red, green, blue, and alpha source blending factors are computed - * @param dfactor how the red, green, blue, and alpha destination blending factors are computed - * - * @see Reference Page - */ - public static void glBlendFunci(@NativeType("GLuint") int buf, @NativeType("GLenum") int sfactor, @NativeType("GLenum") int dfactor) { - GL40C.glBlendFunci(buf, sfactor, dfactor); - } - - // --- [ glBlendFuncSeparatei ] --- - - /** - * Specifies pixel arithmetic for RGB and alpha components separately for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend functions - * @param srcRGB how the red, green, and blue blending factors are computed - * @param dstRGB how the red, green, and blue destination blending factors are computed - * @param srcAlpha how the alpha source blending factor is computed - * @param dstAlpha how the alpha destination blending factor is computed - * - * @see Reference Page - */ - public static void glBlendFuncSeparatei(@NativeType("GLuint") int buf, @NativeType("GLenum") int srcRGB, @NativeType("GLenum") int dstRGB, @NativeType("GLenum") int srcAlpha, @NativeType("GLenum") int dstAlpha) { - GL40C.glBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); - } - - // --- [ glDrawArraysIndirect ] --- - - /** Unsafe version of: {@link #glDrawArraysIndirect DrawArraysIndirect} */ - public static void nglDrawArraysIndirect(int mode, long indirect) { - GL40C.nglDrawArraysIndirect(mode, indirect); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - // --- [ glDrawElementsIndirect ] --- - - /** Unsafe version of: {@link #glDrawElementsIndirect DrawElementsIndirect} */ - public static void nglDrawElementsIndirect(int mode, int type, long indirect) { - GL40C.nglDrawElementsIndirect(mode, type, indirect); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - - // --- [ glUniform1d ] --- - - /** - * Specifies the value of a double uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static void glUniform1d(@NativeType("GLint") int location, @NativeType("GLdouble") double x) { - GL40C.glUniform1d(location, x); - } - - // --- [ glUniform2d ] --- - - /** - * Specifies the value of a dvec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static void glUniform2d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y) { - GL40C.glUniform2d(location, x, y); - } - - // --- [ glUniform3d ] --- - - /** - * Specifies the value of a dvec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static void glUniform3d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z) { - GL40C.glUniform3d(location, x, y, z); - } - - // --- [ glUniform4d ] --- - - /** - * Specifies the value of a dvec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static void glUniform4d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w) { - GL40C.glUniform4d(location, x, y, z, w); - } - - // --- [ glUniform1dv ] --- - - /** - * Unsafe version of: {@link #glUniform1dv Uniform1dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform1dv(int location, int count, long value) { - GL40C.nglUniform1dv(location, count, value); - } - - /** - * Specifies the value of a single double uniform variable or a double uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform1dv(location, value); - } - - // --- [ glUniform2dv ] --- - - /** - * Unsafe version of: {@link #glUniform2dv Uniform2dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform2dv(int location, int count, long value) { - GL40C.nglUniform2dv(location, count, value); - } - - /** - * Specifies the value of a single dvec2 uniform variable or a dvec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform2dv(location, value); - } - - // --- [ glUniform3dv ] --- - - /** - * Unsafe version of: {@link #glUniform3dv Uniform3dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform3dv(int location, int count, long value) { - GL40C.nglUniform3dv(location, count, value); - } - - /** - * Specifies the value of a single dvec3 uniform variable or a dvec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform3dv(location, value); - } - - // --- [ glUniform4dv ] --- - - /** - * Unsafe version of: {@link #glUniform4dv Uniform4dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglUniform4dv(int location, int count, long value) { - GL40C.nglUniform4dv(location, count, value); - } - - /** - * Specifies the value of a single dvec4 uniform variable or a dvec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniform4dv(location, value); - } - - // --- [ glUniformMatrix2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2dv UniformMatrix2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix2dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2 uniform variable or a dmat2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix2dv(location, transpose, value); - } - - // --- [ glUniformMatrix3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3dv UniformMatrix3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix3dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3 uniform variable or a dmat3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix3dv(location, transpose, value); - } - - // --- [ glUniformMatrix4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4dv UniformMatrix4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix4dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4 uniform variable or a dmat4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix4dv(location, transpose, value); - } - - // --- [ glUniformMatrix2x3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x3dv UniformMatrix2x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2x3dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix2x3dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x3 uniform variable or a dmat2x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix2x3dv(location, transpose, value); - } - - // --- [ glUniformMatrix2x4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x4dv UniformMatrix2x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix2x4dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix2x4dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x4 uniform variable or a dmat2x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix2x4dv(location, transpose, value); - } - - // --- [ glUniformMatrix3x2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x2dv UniformMatrix3x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3x2dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix3x2dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x2 uniform variable or a dmat3x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix3x2dv(location, transpose, value); - } - - // --- [ glUniformMatrix3x4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x4dv UniformMatrix3x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix3x4dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix3x4dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x4 uniform variable or a dmat3x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix3x4dv(location, transpose, value); - } - - // --- [ glUniformMatrix4x2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x2dv UniformMatrix4x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4x2dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix4x2dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x2 uniform variable or a dmat4x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix4x2dv(location, transpose, value); - } - - // --- [ glUniformMatrix4x3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x3dv UniformMatrix4x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglUniformMatrix4x3dv(int location, int count, boolean transpose, long value) { - GL40C.nglUniformMatrix4x3dv(location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x3 uniform variable or a dmat4x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL40C.glUniformMatrix4x3dv(location, transpose, value); - } - - // --- [ glGetUniformdv ] --- - - /** Unsafe version of: {@link #glGetUniformdv GetUniformdv} */ - public static void nglGetUniformdv(int program, int location, long params) { - GL40C.nglGetUniformdv(program, location, params); - } - - /** - * Returns the double value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") DoubleBuffer params) { - GL40C.glGetUniformdv(program, location, params); - } - - /** - * Returns the double value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetUniformd(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL40C.glGetUniformd(program, location); - } - - // --- [ glMinSampleShading ] --- - - /** - * Specifies the minimum rate at which sample shading takes place. - * - * @param value the rate at which samples are shaded within each covered pixel - * - * @see Reference Page - */ - public static void glMinSampleShading(@NativeType("GLfloat") float value) { - GL40C.glMinSampleShading(value); - } - - // --- [ glGetSubroutineUniformLocation ] --- - - /** Unsafe version of: {@link #glGetSubroutineUniformLocation GetSubroutineUniformLocation} */ - public static int nglGetSubroutineUniformLocation(int program, int shadertype, long name) { - return GL40C.nglGetSubroutineUniformLocation(program, shadertype, name); - } - - /** - * Retrieves the location of a subroutine uniform of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine uniform whose index to query. - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetSubroutineUniformLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") ByteBuffer name) { - return GL40C.glGetSubroutineUniformLocation(program, shadertype, name); - } - - /** - * Retrieves the location of a subroutine uniform of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine uniform whose index to query. - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetSubroutineUniformLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") CharSequence name) { - return GL40C.glGetSubroutineUniformLocation(program, shadertype, name); - } - - // --- [ glGetSubroutineIndex ] --- - - /** Unsafe version of: {@link #glGetSubroutineIndex GetSubroutineIndex} */ - public static int nglGetSubroutineIndex(int program, int shadertype, long name) { - return GL40C.nglGetSubroutineIndex(program, shadertype, name); - } - - /** - * Retrieves the index of a subroutine function of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine function index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine function whose index to query - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetSubroutineIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") ByteBuffer name) { - return GL40C.glGetSubroutineIndex(program, shadertype, name); - } - - /** - * Retrieves the index of a subroutine function of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine function index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine function whose index to query - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetSubroutineIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") CharSequence name) { - return GL40C.glGetSubroutineIndex(program, shadertype, name); - } - - // --- [ glGetActiveSubroutineUniformiv ] --- - - /** Unsafe version of: {@link #glGetActiveSubroutineUniformiv GetActiveSubroutineUniformiv} */ - public static void nglGetActiveSubroutineUniformiv(int program, int shadertype, int index, int pname, long values) { - GL40C.nglGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); - } - - /** - * Queries a property of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param pname the parameter of the shader subroutine uniform to query. One of:
    {@link GL40C#GL_NUM_COMPATIBLE_SUBROUTINES NUM_COMPATIBLE_SUBROUTINES}{@link GL40C#GL_COMPATIBLE_SUBROUTINES COMPATIBLE_SUBROUTINES}{@link GL31#GL_UNIFORM_SIZE UNIFORM_SIZE}{@link GL31#GL_UNIFORM_NAME_LENGTH UNIFORM_NAME_LENGTH}
    - * @param values the address of a buffer into which the queried value or values will be placed - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer values) { - GL40C.glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); - } - - /** - * Queries a property of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param pname the parameter of the shader subroutine uniform to query. One of:
    {@link GL40C#GL_NUM_COMPATIBLE_SUBROUTINES NUM_COMPATIBLE_SUBROUTINES}{@link GL40C#GL_COMPATIBLE_SUBROUTINES COMPATIBLE_SUBROUTINES}{@link GL31#GL_UNIFORM_SIZE UNIFORM_SIZE}{@link GL31#GL_UNIFORM_NAME_LENGTH UNIFORM_NAME_LENGTH}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveSubroutineUniformi(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL40C.glGetActiveSubroutineUniformi(program, shadertype, index, pname); - } - - // --- [ glGetActiveSubroutineUniformName ] --- - - /** - * Unsafe version of: {@link #glGetActiveSubroutineUniformName GetActiveSubroutineUniformName} - * - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - public static void nglGetActiveSubroutineUniformName(int program, int shadertype, int index, int bufsize, long length, long name) { - GL40C.nglGetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name); - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param length the address of a variable into which is written the number of characters copied into {@code name} - * @param name the address of a buffer that will receive the name of the specified shader subroutine uniform - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param bufsize the size of the buffer whose address is given in {@code name} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufsize) { - return GL40C.glGetActiveSubroutineUniformName(program, shadertype, index, bufsize); - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index) { - return glGetActiveSubroutineUniformName(program, shadertype, index, glGetActiveSubroutineUniformi(program, shadertype, index, GL31.GL_UNIFORM_NAME_LENGTH)); - } - - // --- [ glGetActiveSubroutineName ] --- - - /** - * Unsafe version of: {@link #glGetActiveSubroutineName GetActiveSubroutineName} - * - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - public static void nglGetActiveSubroutineName(int program, int shadertype, int index, int bufsize, long length, long name) { - GL40C.nglGetActiveSubroutineName(program, shadertype, index, bufsize, length, name); - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param length a variable which is to receive the length of the shader subroutine uniform name - * @param name an array into which the name of the shader subroutine uniform will be written - * - * @see Reference Page - */ - public static void glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineName(program, shadertype, index, length, name); - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param bufsize the size of the buffer whose address is given in {@code name} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufsize) { - return GL40C.glGetActiveSubroutineName(program, shadertype, index, bufsize); - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index) { - return glGetActiveSubroutineName(program, shadertype, index, glGetProgramStagei(program, shadertype, GL_ACTIVE_SUBROUTINE_MAX_LENGTH)); - } - - // --- [ glUniformSubroutinesuiv ] --- - - /** - * Unsafe version of: {@link #glUniformSubroutinesuiv UniformSubroutinesuiv} - * - * @param count the number of uniform indices stored in {@code indices} - */ - public static void nglUniformSubroutinesuiv(int shadertype, int count, long indices) { - GL40C.nglUniformSubroutinesuiv(shadertype, count, indices); - } - - /** - * Loads active subroutine uniforms. - * - * @param shadertype the shader stage to update. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param indices an array holding the indices to load into the shader subroutine variables - * - * @see Reference Page - */ - public static void glUniformSubroutinesuiv(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") IntBuffer indices) { - GL40C.glUniformSubroutinesuiv(shadertype, indices); - } - - /** - * Loads active subroutine uniforms. - * - * @param shadertype the shader stage to update. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * - * @see Reference Page - */ - public static void glUniformSubroutinesui(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") int index) { - GL40C.glUniformSubroutinesui(shadertype, index); - } - - // --- [ glGetUniformSubroutineuiv ] --- - - /** Unsafe version of: {@link #glGetUniformSubroutineuiv GetUniformSubroutineuiv} */ - public static void nglGetUniformSubroutineuiv(int shadertype, int location, long params) { - GL40C.nglGetUniformSubroutineuiv(shadertype, location, params); - } - - /** - * Retrieves the value of a subroutine uniform of a given shader stage of the current program. - * - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param location the location of the subroutine uniform - * @param params a variable to receive the value or values of the subroutine uniform - * - * @see Reference Page - */ - public static void glGetUniformSubroutineuiv(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - GL40C.glGetUniformSubroutineuiv(shadertype, location, params); - } - - /** - * Retrieves the value of a subroutine uniform of a given shader stage of the current program. - * - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param location the location of the subroutine uniform - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformSubroutineui(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location) { - return GL40C.glGetUniformSubroutineui(shadertype, location); - } - - // --- [ glGetProgramStageiv ] --- - - /** Unsafe version of: {@link #glGetProgramStageiv GetProgramStageiv} */ - public static void nglGetProgramStageiv(int program, int shadertype, int pname, long values) { - GL40C.nglGetProgramStageiv(program, shadertype, pname, values); - } - - /** - * Retrieves properties of a program object corresponding to a specified shader stage. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param pname the parameter of the shader to query. One of:
    {@link GL40C#GL_ACTIVE_SUBROUTINES ACTIVE_SUBROUTINES}{@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORMS ACTIVE_SUBROUTINE_UNIFORMS}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS}{@link GL40C#GL_ACTIVE_SUBROUTINE_MAX_LENGTH ACTIVE_SUBROUTINE_MAX_LENGTH}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH}
    - * @param values a variable into which the queried value or values will be placed - * - * @see Reference Page - */ - public static void glGetProgramStageiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer values) { - GL40C.glGetProgramStageiv(program, shadertype, pname, values); - } - - /** - * Retrieves properties of a program object corresponding to a specified shader stage. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link GL40C#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link GL40C#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param pname the parameter of the shader to query. One of:
    {@link GL40C#GL_ACTIVE_SUBROUTINES ACTIVE_SUBROUTINES}{@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORMS ACTIVE_SUBROUTINE_UNIFORMS}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS}{@link GL40C#GL_ACTIVE_SUBROUTINE_MAX_LENGTH ACTIVE_SUBROUTINE_MAX_LENGTH}
    {@link GL40C#GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgramStagei(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname) { - return GL40C.glGetProgramStagei(program, shadertype, pname); - } - - // --- [ glPatchParameteri ] --- - - /** - * Specifies the integer value of the specified parameter for patch primitives. - * - * @param pname the name of the parameter to set. Must be:
    {@link GL40C#GL_PATCH_VERTICES PATCH_VERTICES}
    - * @param value the new value for the parameter given by {@code pname} - * - * @see Reference Page - */ - public static void glPatchParameteri(@NativeType("GLenum") int pname, @NativeType("GLint") int value) { - GL40C.glPatchParameteri(pname, value); - } - - // --- [ glPatchParameterfv ] --- - - /** Unsafe version of: {@link #glPatchParameterfv PatchParameterfv} */ - public static void nglPatchParameterfv(int pname, long values) { - GL40C.nglPatchParameterfv(pname, values); - } - - /** - * Specifies an array of float values for the specified parameter for patch primitives. - * - * @param pname the name of the parameter to set. One of:
    {@link GL40C#GL_PATCH_DEFAULT_OUTER_LEVEL PATCH_DEFAULT_OUTER_LEVEL}{@link GL40C#GL_PATCH_DEFAULT_INNER_LEVEL PATCH_DEFAULT_INNER_LEVEL}
    - * @param values an array containing the new values for the parameter given by {@code pname} - * - * @see Reference Page - */ - public static void glPatchParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer values) { - GL40C.glPatchParameterfv(pname, values); - } - - // --- [ glBindTransformFeedback ] --- - - /** - * Binds a transform feedback object. - * - * @param target the target to which to bind the transform feedback object {@code id}. Must be:
    {@link GL40C#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param id the name of a transform feedback object - * - * @see Reference Page - */ - public static void glBindTransformFeedback(@NativeType("GLenum") int target, @NativeType("GLuint") int id) { - GL40C.glBindTransformFeedback(target, id); - } - - // --- [ glDeleteTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glDeleteTransformFeedbacks DeleteTransformFeedbacks} - * - * @param n the number of transform feedback objects to delete - */ - public static void nglDeleteTransformFeedbacks(int n, long ids) { - GL40C.nglDeleteTransformFeedbacks(n, ids); - } - - /** - * Deletes transform feedback objects. - * - * @param ids an array of names of transform feedback objects to delete - * - * @see Reference Page - */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") IntBuffer ids) { - GL40C.glDeleteTransformFeedbacks(ids); - } - - /** - * Deletes transform feedback objects. - * - * @see Reference Page - */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") int id) { - GL40C.glDeleteTransformFeedbacks(id); - } - - // --- [ glGenTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glGenTransformFeedbacks GenTransformFeedbacks} - * - * @param n the number of transform feedback object names to reserve - */ - public static void nglGenTransformFeedbacks(int n, long ids) { - GL40C.nglGenTransformFeedbacks(n, ids); - } - - /** - * Reserves transform feedback object names. - * - * @param ids an array of into which the reserved names will be written - * - * @see Reference Page - */ - public static void glGenTransformFeedbacks(@NativeType("GLuint *") IntBuffer ids) { - GL40C.glGenTransformFeedbacks(ids); - } - - /** - * Reserves transform feedback object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenTransformFeedbacks() { - return GL40C.glGenTransformFeedbacks(); - } - - // --- [ glIsTransformFeedback ] --- - - /** - * Determines if a name corresponds to a transform feedback object. - * - * @param id a value that may be the name of a transform feedback object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsTransformFeedback(@NativeType("GLuint") int id) { - return GL40C.glIsTransformFeedback(id); - } - - // --- [ glPauseTransformFeedback ] --- - - /** - * Pauses transform feedback operations for the currently bound transform feedback object. - * - *

    When transform feedback operations are paused, transform feedback is still considered active and changing most transform feedback state related to the - * object results in an error. However, a new transform feedback object may be bound while transform feedback is paused. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} - * is generated by PauseTransformFeedback if the currently bound transform feedback is not active or is paused.

    - * - *

    When transform feedback is active and not paused, all geometric primitives generated must be compatible with the value of {@code primitiveMode} passed - * to {@link GL30C#glBeginTransformFeedback BeginTransformFeedback}. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link GL11#glBegin Begin} or any operation that implicitly calls {@link GL11#glBegin Begin} - * (such as {@link GL11C#glDrawElements DrawElements}) if {@code mode} is not one of the allowed modes. If a geometry shader is active, its output primitive type is used instead - * of the {@code mode} parameter passed to {@link GL11#glBegin Begin} for the purposes of this error check. Any primitive type may be used while transform feedback is - * paused.

    - * - * @see Reference Page - */ - public static void glPauseTransformFeedback() { - GL40C.glPauseTransformFeedback(); - } - - // --- [ glResumeTransformFeedback ] --- - - /** - * Resumes transform feedback operations for the currently bound transform feedback object. - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link #glResumeTransformFeedback ResumeTransformFeedback} if the currently bound transform feedback is not active or is not paused.

    - * - * @see Reference Page - */ - public static void glResumeTransformFeedback() { - GL40C.glResumeTransformFeedback(); - } - - // --- [ glDrawTransformFeedback ] --- - - /** - * Render primitives using a count derived from a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * - * @see Reference Page - */ - public static void glDrawTransformFeedback(@NativeType("GLenum") int mode, @NativeType("GLuint") int id) { - GL40C.glDrawTransformFeedback(mode, id); - } - - // --- [ glDrawTransformFeedbackStream ] --- - - /** - * Renders primitives using a count derived from a specifed stream of a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40C#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param stream the index of the transform feedback stream from which to retrieve a primitive count - * - * @see Reference Page - */ - public static void glDrawTransformFeedbackStream(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLuint") int stream) { - GL40C.glDrawTransformFeedbackStream(mode, id, stream); - } - - // --- [ glBeginQueryIndexed ] --- - - /** - * Begins a query object on an indexed target - * - * @param target the target type of query object established between {@code glBeginQueryIndexed} and the subsequent {@link #glEndQueryIndexed EndQueryIndexed}. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query target upon which to begin the query - * @param id the name of a query object - * - * @see Reference Page - */ - public static void glBeginQueryIndexed(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int id) { - GL40C.glBeginQueryIndexed(target, index, id); - } - - // --- [ glEndQueryIndexed ] --- - - /** - * Ends a query object on an indexed target - * - * @param target the target type of query object to be concluded. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query target upon which to end the query - * - * @see Reference Page - */ - public static void glEndQueryIndexed(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - GL40C.glEndQueryIndexed(target, index); - } - - // --- [ glGetQueryIndexediv ] --- - - /** Unsafe version of: {@link #glGetQueryIndexediv GetQueryIndexediv} */ - public static void nglGetQueryIndexediv(int target, int index, int pname, long params) { - GL40C.nglGetQueryIndexediv(target, index, pname, params); - } - - /** - * Returns parameters of an indexed query object target. - * - * @param target a query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query object target - * @param pname the symbolic name of a query object target parameter - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryIndexediv(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL40C.glGetQueryIndexediv(target, index, pname, params); - } - - /** - * Returns parameters of an indexed query object target. - * - * @param target a query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query object target - * @param pname the symbolic name of a query object target parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryIndexedi(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL40C.glGetQueryIndexedi(target, index, pname); - } - - /** - * Array version of: {@link #glDrawArraysIndirect DrawArraysIndirect} - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect) { - GL40C.glDrawArraysIndirect(mode, indirect); - } - - /** - * Array version of: {@link #glDrawElementsIndirect DrawElementsIndirect} - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect) { - GL40C.glDrawElementsIndirect(mode, type, indirect); - } - - /** - * Array version of: {@link #glUniform1dv Uniform1dv} - * - * @see Reference Page - */ - public static void glUniform1dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform1dv(location, value); - } - - /** - * Array version of: {@link #glUniform2dv Uniform2dv} - * - * @see Reference Page - */ - public static void glUniform2dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform2dv(location, value); - } - - /** - * Array version of: {@link #glUniform3dv Uniform3dv} - * - * @see Reference Page - */ - public static void glUniform3dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform3dv(location, value); - } - - /** - * Array version of: {@link #glUniform4dv Uniform4dv} - * - * @see Reference Page - */ - public static void glUniform4dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniform4dv(location, value); - } - - /** - * Array version of: {@link #glUniformMatrix2dv UniformMatrix2dv} - * - * @see Reference Page - */ - public static void glUniformMatrix2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix2dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix3dv UniformMatrix3dv} - * - * @see Reference Page - */ - public static void glUniformMatrix3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix3dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix4dv UniformMatrix4dv} - * - * @see Reference Page - */ - public static void glUniformMatrix4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix4dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix2x3dv UniformMatrix2x3dv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix2x3dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix2x4dv UniformMatrix2x4dv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix2x4dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix3x2dv UniformMatrix3x2dv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix3x2dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix3x4dv UniformMatrix3x4dv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix3x4dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix4x2dv UniformMatrix4x2dv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix4x2dv(location, transpose, value); - } - - /** - * Array version of: {@link #glUniformMatrix4x3dv UniformMatrix4x3dv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL40C.glUniformMatrix4x3dv(location, transpose, value); - } - - /** - * Array version of: {@link #glGetUniformdv GetUniformdv} - * - * @see Reference Page - */ - public static void glGetUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") double[] params) { - GL40C.glGetUniformdv(program, location, params); - } - - /** - * Array version of: {@link #glGetActiveSubroutineUniformiv GetActiveSubroutineUniformiv} - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] values) { - GL40C.glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); - } - - /** - * Array version of: {@link #glGetActiveSubroutineUniformName GetActiveSubroutineUniformName} - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); - } - - /** - * Array version of: {@link #glGetActiveSubroutineName GetActiveSubroutineName} - * - * @see Reference Page - */ - public static void glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - GL40C.glGetActiveSubroutineName(program, shadertype, index, length, name); - } - - /** - * Array version of: {@link #glUniformSubroutinesuiv UniformSubroutinesuiv} - * - * @see Reference Page - */ - public static void glUniformSubroutinesuiv(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") int[] indices) { - GL40C.glUniformSubroutinesuiv(shadertype, indices); - } - - /** - * Array version of: {@link #glGetUniformSubroutineuiv GetUniformSubroutineuiv} - * - * @see Reference Page - */ - public static void glGetUniformSubroutineuiv(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - GL40C.glGetUniformSubroutineuiv(shadertype, location, params); - } - - /** - * Array version of: {@link #glGetProgramStageiv GetProgramStageiv} - * - * @see Reference Page - */ - public static void glGetProgramStageiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] values) { - GL40C.glGetProgramStageiv(program, shadertype, pname, values); - } - - /** - * Array version of: {@link #glPatchParameterfv PatchParameterfv} - * - * @see Reference Page - */ - public static void glPatchParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] values) { - GL40C.glPatchParameterfv(pname, values); - } - - /** - * Array version of: {@link #glDeleteTransformFeedbacks DeleteTransformFeedbacks} - * - * @see Reference Page - */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") int[] ids) { - GL40C.glDeleteTransformFeedbacks(ids); - } - - /** - * Array version of: {@link #glGenTransformFeedbacks GenTransformFeedbacks} - * - * @see Reference Page - */ - public static void glGenTransformFeedbacks(@NativeType("GLuint *") int[] ids) { - GL40C.glGenTransformFeedbacks(ids); - } - - /** - * Array version of: {@link #glGetQueryIndexediv GetQueryIndexediv} - * - * @see Reference Page - */ - public static void glGetQueryIndexediv(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL40C.glGetQueryIndexediv(target, index, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL40C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL40C.java deleted file mode 100644 index 41bf29dc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL40C.java +++ /dev/null @@ -1,1862 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.0. Includes only Core Profile symbols. - * - *

    OpenGL 4.0 implementations support revision 4.00 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL40C extends GL33C { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * MapBufferRange, FlushMappedBufferRange, GetBufferParameteriv, and CopyBufferSubData. - */ - public static final int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, - GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, - GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, - GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D; - - /** Returned in the {@code type} parameter of GetActiveUniform, and GetTransformFeedbackVarying. */ - public static final int - GL_DOUBLE_VEC2 = 0x8FFC, - GL_DOUBLE_VEC3 = 0x8FFD, - GL_DOUBLE_VEC4 = 0x8FFE, - GL_DOUBLE_MAT2 = 0x8F46, - GL_DOUBLE_MAT3 = 0x8F47, - GL_DOUBLE_MAT4 = 0x8F48, - GL_DOUBLE_MAT2x3 = 0x8F49, - GL_DOUBLE_MAT2x4 = 0x8F4A, - GL_DOUBLE_MAT3x2 = 0x8F4B, - GL_DOUBLE_MAT3x4 = 0x8F4C, - GL_DOUBLE_MAT4x2 = 0x8F4D, - GL_DOUBLE_MAT4x3 = 0x8F4E; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_SAMPLE_SHADING = 0x8C36; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37; - - /** Accepted by the {@code pname} parameter of GetProgramStageiv. */ - public static final int - GL_ACTIVE_SUBROUTINES = 0x8DE5, - GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6, - GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47, - GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48, - GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_SUBROUTINES = 0x8DE7, - GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; - - /** Accepted by the {@code pname} parameter of GetActiveSubroutineUniformiv. */ - public static final int - GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A, - GL_COMPATIBLE_SUBROUTINES = 0x8E4B; - - /** Accepted by the {@code mode} parameter of Begin and all vertex array functions that implicitly call Begin. */ - public static final int GL_PATCHES = 0xE; - - /** Accepted by the {@code pname} parameter of PatchParameteri, GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int GL_PATCH_VERTICES = 0x8E72; - - /** Accepted by the {@code pname} parameter of PatchParameterfv, GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv, and GetInteger64v. */ - public static final int - GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73, - GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75, - GL_TESS_GEN_MODE = 0x8E76, - GL_TESS_GEN_SPACING = 0x8E77, - GL_TESS_GEN_VERTEX_ORDER = 0x8E78, - GL_TESS_GEN_POINT_MODE = 0x8E79; - - /** Returned by GetProgramiv when {@code pname} is TESS_GEN_MODE. */ - public static final int GL_ISOLINES = 0x8E7A; - - /** Returned by GetProgramiv when {@code pname} is TESS_GEN_SPACING. */ - public static final int - GL_FRACTIONAL_ODD = 0x8E7B, - GL_FRACTIONAL_EVEN = 0x8E7C; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int - GL_MAX_PATCH_VERTICES = 0x8E7D, - GL_MAX_TESS_GEN_LEVEL = 0x8E7E, - GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F, - GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80, - GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81, - GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82, - GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83, - GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84, - GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85, - GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86, - GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89, - GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A, - GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C, - GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D, - GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E, - GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int - GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0, - GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; - - /** Accepted by the {@code type} parameter of CreateShader and returned by the {@code params} parameter of GetShaderiv. */ - public static final int - GL_TESS_EVALUATION_SHADER = 0x8E87, - GL_TESS_CONTROL_SHADER = 0x8E88; - - /** Accepted by the {@code target} parameter of TexParameteri, TexParameteriv, TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap. */ - public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A; - - /** Accepted by the {@code target} parameter of TexImage3D, TexSubImage3D, CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D. */ - public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C, - GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D, - GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E, - GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E, - GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F; - - /** Accepted by the {@code target} parameter of BindTransformFeedback. */ - public static final int GL_TRANSFORM_FEEDBACK = 0x8E22; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23, - GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24, - GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70, - GL_MAX_VERTEX_STREAMS = 0x8E71; - - protected GL40C() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendEquationi ] --- - - /** - * Specifies the equation used for both the RGB blend equation and the Alpha blend equation for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend equation - * @param mode how source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * - * @see Reference Page - */ - public static native void glBlendEquationi(@NativeType("GLuint") int buf, @NativeType("GLenum") int mode); - - // --- [ glBlendEquationSeparatei ] --- - - /** - * Sets the RGB blend equation and the alpha blend equation separately for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend equations - * @param modeRGB the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * @param modeAlpha the alpha blend equation, how the alpha component of the source and destination colors are combined. One of:
    {@link GL14#GL_FUNC_ADD FUNC_ADD}{@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}{@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT}{@link GL14#GL_MIN MIN}{@link GL14#GL_MAX MAX}
    - * - * @see Reference Page - */ - public static native void glBlendEquationSeparatei(@NativeType("GLuint") int buf, @NativeType("GLenum") int modeRGB, @NativeType("GLenum") int modeAlpha); - - // --- [ glBlendFunci ] --- - - /** - * Specifies pixel arithmetic for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend function - * @param sfactor how the red, green, blue, and alpha source blending factors are computed - * @param dfactor how the red, green, blue, and alpha destination blending factors are computed - * - * @see Reference Page - */ - public static native void glBlendFunci(@NativeType("GLuint") int buf, @NativeType("GLenum") int sfactor, @NativeType("GLenum") int dfactor); - - // --- [ glBlendFuncSeparatei ] --- - - /** - * Specifies pixel arithmetic for RGB and alpha components separately for the specified draw buffer. - * - * @param buf the index of the draw buffer for which to set the blend functions - * @param srcRGB how the red, green, and blue blending factors are computed - * @param dstRGB how the red, green, and blue destination blending factors are computed - * @param srcAlpha how the alpha source blending factor is computed - * @param dstAlpha how the alpha destination blending factor is computed - * - * @see Reference Page - */ - public static native void glBlendFuncSeparatei(@NativeType("GLuint") int buf, @NativeType("GLenum") int srcRGB, @NativeType("GLenum") int dstRGB, @NativeType("GLenum") int srcAlpha, @NativeType("GLenum") int dstAlpha); - - // --- [ glDrawArraysIndirect ] --- - - /** Unsafe version of: {@link #glDrawArraysIndirect DrawArraysIndirect} */ - public static native void nglDrawArraysIndirect(int mode, long indirect); - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect) { - if (CHECKS) { - check(indirect, 4 * 4); - } - nglDrawArraysIndirect(mode, memAddress(indirect)); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect) { - nglDrawArraysIndirect(mode, indirect); - } - - /** - * Renders primitives from array data, taking parameters from memory. - * - *

    {@code glDrawArraysIndirect} behaves similarly to {@link GL42C#glDrawArraysInstancedBaseInstance DrawArraysInstancedBaseInstance}, except that the parameters to - * glDrawArraysInstancedBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance; // must be 0 unless OpenGL 4.2 is supported
    -     * } DrawArraysIndirectCommand;
    -     * 
    -     * const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand *)indirect;
    -     * glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, cmd->baseInstance);
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect) { - if (CHECKS) { - check(indirect, (4 * 4) >> 2); - } - nglDrawArraysIndirect(mode, memAddress(indirect)); - } - - // --- [ glDrawElementsIndirect ] --- - - /** Unsafe version of: {@link #glDrawElementsIndirect DrawElementsIndirect} */ - public static native void nglDrawElementsIndirect(int mode, int type, long indirect); - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect) { - if (CHECKS) { - check(indirect, 5 * 4); - } - nglDrawElementsIndirect(mode, type, memAddress(indirect)); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect) { - nglDrawElementsIndirect(mode, type, indirect); - } - - /** - * Renders indexed primitives from array data, taking parameters from memory. - * - *

    {@code glDrawElementsIndirect} behaves similarly to {@link GL42C#glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance}, execpt that the parameters to - * glDrawElementsInstancedBaseVertexBaseInstance are stored in memory at the address given by {@code indirect}.

    - * - *

    The parameters addressed by {@code indirect} are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    {@code glDrawElementsIndirect} is equivalent to:

    - * - *
    
    -     * void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect) {
    -     *     const DrawElementsIndirectCommand *cmd  = (const DrawElementsIndirectCommand *)indirect;
    -     *     glDrawElementsInstancedBaseVertexBaseInstance(
    -     *         mode,
    -     *         cmd->count,
    -     *         type,
    -     *         cmd->firstIndex + size-of-type,
    -     *         cmd->primCount,
    -     *         cmd->baseVertex,
    -     *         cmd->baseInstance
    -     *     );
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the {@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER} binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect the address of a structure containing the draw parameters - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect) { - if (CHECKS) { - check(indirect, (5 * 4) >> 2); - } - nglDrawElementsIndirect(mode, type, memAddress(indirect)); - } - - // --- [ glUniform1d ] --- - - /** - * Specifies the value of a double uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static native void glUniform1d(@NativeType("GLint") int location, @NativeType("GLdouble") double x); - - // --- [ glUniform2d ] --- - - /** - * Specifies the value of a dvec2 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static native void glUniform2d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glUniform3d ] --- - - /** - * Specifies the value of a dvec3 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static native void glUniform3d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glUniform4d ] --- - - /** - * Specifies the value of a dvec4 uniform variable for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static native void glUniform4d(@NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glUniform1dv ] --- - - /** - * Unsafe version of: {@link #glUniform1dv Uniform1dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform1dv(int location, int count, long value); - - /** - * Specifies the value of a single double uniform variable or a double uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform1dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniform1dv(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2dv ] --- - - /** - * Unsafe version of: {@link #glUniform2dv Uniform2dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform2dv(int location, int count, long value); - - /** - * Specifies the value of a single dvec2 uniform variable or a dvec2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform2dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniform2dv(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3dv ] --- - - /** - * Unsafe version of: {@link #glUniform3dv Uniform3dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform3dv(int location, int count, long value); - - /** - * Specifies the value of a single dvec3 uniform variable or a dvec3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform3dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniform3dv(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4dv ] --- - - /** - * Unsafe version of: {@link #glUniform4dv Uniform4dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglUniform4dv(int location, int count, long value); - - /** - * Specifies the value of a single dvec4 uniform variable or a dvec4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glUniform4dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniform4dv(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glUniformMatrix2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2dv UniformMatrix2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix2dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat2 uniform variable or a dmat2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix2dv(location, value.remaining() >> 2, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3dv UniformMatrix3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix3dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat3 uniform variable or a dmat3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix3dv(location, value.remaining() / 9, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4dv UniformMatrix4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix4dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat4 uniform variable or a dmat4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix4dv(location, value.remaining() >> 4, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix2x3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x3dv UniformMatrix2x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix2x3dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat2x3 uniform variable or a dmat2x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix2x3dv(location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix2x4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix2x4dv UniformMatrix2x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix2x4dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat2x4 uniform variable or a dmat2x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix2x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix2x4dv(location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix3x2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x2dv UniformMatrix3x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix3x2dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat3x2 uniform variable or a dmat3x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix3x2dv(location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix3x4dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix3x4dv UniformMatrix3x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix3x4dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat3x4 uniform variable or a dmat3x4 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix3x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix3x4dv(location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix4x2dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x2dv UniformMatrix4x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix4x2dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat4x2 uniform variable or a dmat4x2 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix4x2dv(location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glUniformMatrix4x3dv ] --- - - /** - * Unsafe version of: {@link #glUniformMatrix4x3dv UniformMatrix4x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglUniformMatrix4x3dv(int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat4x3 uniform variable or a dmat4x3 uniform variable array for the current program object. - * - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value a pointer to an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glUniformMatrix4x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglUniformMatrix4x3dv(location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glGetUniformdv ] --- - - /** Unsafe version of: {@link #glGetUniformdv GetUniformdv} */ - public static native void nglGetUniformdv(int program, int location, long params); - - /** - * Returns the double value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * @param params the value of the specified uniform variable - * - * @see Reference Page - */ - public static void glGetUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformdv(program, location, memAddress(params)); - } - - /** - * Returns the double value(s) of a uniform variable. - * - * @param program the program object to be queried - * @param location the location of the uniform variable to be queried - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetUniformd(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer params = stack.callocDouble(1); - nglGetUniformdv(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMinSampleShading ] --- - - /** - * Specifies the minimum rate at which sample shading takes place. - * - * @param value the rate at which samples are shaded within each covered pixel - * - * @see Reference Page - */ - public static native void glMinSampleShading(@NativeType("GLfloat") float value); - - // --- [ glGetSubroutineUniformLocation ] --- - - /** Unsafe version of: {@link #glGetSubroutineUniformLocation GetSubroutineUniformLocation} */ - public static native int nglGetSubroutineUniformLocation(int program, int shadertype, long name); - - /** - * Retrieves the location of a subroutine uniform of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine uniform whose index to query. - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetSubroutineUniformLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetSubroutineUniformLocation(program, shadertype, memAddress(name)); - } - - /** - * Retrieves the location of a subroutine uniform of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine uniform whose index to query. - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetSubroutineUniformLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetSubroutineUniformLocation(program, shadertype, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetSubroutineIndex ] --- - - /** Unsafe version of: {@link #glGetSubroutineIndex GetSubroutineIndex} */ - public static native int nglGetSubroutineIndex(int program, int shadertype, long name); - - /** - * Retrieves the index of a subroutine function of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine function index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine function whose index to query - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetSubroutineIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetSubroutineIndex(program, shadertype, memAddress(name)); - } - - /** - * Retrieves the index of a subroutine function of a given shader stage within a program. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for subroutine function index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param name the name of the subroutine function whose index to query - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetSubroutineIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetSubroutineIndex(program, shadertype, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveSubroutineUniformiv ] --- - - /** Unsafe version of: {@link #glGetActiveSubroutineUniformiv GetActiveSubroutineUniformiv} */ - public static native void nglGetActiveSubroutineUniformiv(int program, int shadertype, int index, int pname, long values); - - /** - * Queries a property of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param pname the parameter of the shader subroutine uniform to query. One of:
    {@link #GL_NUM_COMPATIBLE_SUBROUTINES NUM_COMPATIBLE_SUBROUTINES}{@link #GL_COMPATIBLE_SUBROUTINES COMPATIBLE_SUBROUTINES}{@link GL31#GL_UNIFORM_SIZE UNIFORM_SIZE}{@link GL31#GL_UNIFORM_NAME_LENGTH UNIFORM_NAME_LENGTH}
    - * @param values the address of a buffer into which the queried value or values will be placed - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nglGetActiveSubroutineUniformiv(program, shadertype, index, pname, memAddress(values)); - } - - /** - * Queries a property of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param pname the parameter of the shader subroutine uniform to query. One of:
    {@link #GL_NUM_COMPATIBLE_SUBROUTINES NUM_COMPATIBLE_SUBROUTINES}{@link #GL_COMPATIBLE_SUBROUTINES COMPATIBLE_SUBROUTINES}{@link GL31#GL_UNIFORM_SIZE UNIFORM_SIZE}{@link GL31#GL_UNIFORM_NAME_LENGTH UNIFORM_NAME_LENGTH}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveSubroutineUniformi(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer values = stack.callocInt(1); - nglGetActiveSubroutineUniformiv(program, shadertype, index, pname, memAddress(values)); - return values.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveSubroutineUniformName ] --- - - /** - * Unsafe version of: {@link #glGetActiveSubroutineUniformName GetActiveSubroutineUniformName} - * - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - public static native void nglGetActiveSubroutineUniformName(int program, int shadertype, int index, int bufsize, long length, long name); - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param length the address of a variable into which is written the number of characters copied into {@code name} - * @param name the address of a buffer that will receive the name of the specified shader subroutine uniform - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetActiveSubroutineUniformName(program, shadertype, index, name.remaining(), memAddressSafe(length), memAddress(name)); - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param bufsize the size of the buffer whose address is given in {@code name} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufsize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(bufsize); - nglGetActiveSubroutineUniformName(program, shadertype, index, bufsize, memAddress(length), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Queries the name of an active shader subroutine uniform. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index) { - return glGetActiveSubroutineUniformName(program, shadertype, index, glGetActiveSubroutineUniformi(program, shadertype, index, GL31.GL_UNIFORM_NAME_LENGTH)); - } - - // --- [ glGetActiveSubroutineName ] --- - - /** - * Unsafe version of: {@link #glGetActiveSubroutineName GetActiveSubroutineName} - * - * @param bufsize the size of the buffer whose address is given in {@code name} - */ - public static native void nglGetActiveSubroutineName(int program, int shadertype, int index, int bufsize, long length, long name); - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param length a variable which is to receive the length of the shader subroutine uniform name - * @param name an array into which the name of the shader subroutine uniform will be written - * - * @see Reference Page - */ - public static void glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetActiveSubroutineName(program, shadertype, index, name.remaining(), memAddressSafe(length), memAddress(name)); - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * @param bufsize the size of the buffer whose address is given in {@code name} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufsize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(bufsize); - nglGetActiveSubroutineName(program, shadertype, index, bufsize, memAddress(length), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Queries the name of an active shader subroutine. - * - * @param program the name of the program containing the subroutine - * @param shadertype the shader stage from which to query the subroutine name. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param index the index of the shader subroutine uniform - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index) { - return glGetActiveSubroutineName(program, shadertype, index, glGetProgramStagei(program, shadertype, GL_ACTIVE_SUBROUTINE_MAX_LENGTH)); - } - - // --- [ glUniformSubroutinesuiv ] --- - - /** - * Unsafe version of: {@link #glUniformSubroutinesuiv UniformSubroutinesuiv} - * - * @param count the number of uniform indices stored in {@code indices} - */ - public static native void nglUniformSubroutinesuiv(int shadertype, int count, long indices); - - /** - * Loads active subroutine uniforms. - * - * @param shadertype the shader stage to update. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param indices an array holding the indices to load into the shader subroutine variables - * - * @see Reference Page - */ - public static void glUniformSubroutinesuiv(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") IntBuffer indices) { - nglUniformSubroutinesuiv(shadertype, indices.remaining(), memAddress(indices)); - } - - /** - * Loads active subroutine uniforms. - * - * @param shadertype the shader stage to update. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * - * @see Reference Page - */ - public static void glUniformSubroutinesui(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer indices = stack.ints(index); - nglUniformSubroutinesuiv(shadertype, 1, memAddress(indices)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetUniformSubroutineuiv ] --- - - /** Unsafe version of: {@link #glGetUniformSubroutineuiv GetUniformSubroutineuiv} */ - public static native void nglGetUniformSubroutineuiv(int shadertype, int location, long params); - - /** - * Retrieves the value of a subroutine uniform of a given shader stage of the current program. - * - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param location the location of the subroutine uniform - * @param params a variable to receive the value or values of the subroutine uniform - * - * @see Reference Page - */ - public static void glGetUniformSubroutineuiv(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformSubroutineuiv(shadertype, location, memAddress(params)); - } - - /** - * Retrieves the value of a subroutine uniform of a given shader stage of the current program. - * - * @param shadertype the shader stage from which to query for subroutine uniform index. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param location the location of the subroutine uniform - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetUniformSubroutineui(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetUniformSubroutineuiv(shadertype, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetProgramStageiv ] --- - - /** Unsafe version of: {@link #glGetProgramStageiv GetProgramStageiv} */ - public static native void nglGetProgramStageiv(int program, int shadertype, int pname, long values); - - /** - * Retrieves properties of a program object corresponding to a specified shader stage. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param pname the parameter of the shader to query. One of:
    {@link #GL_ACTIVE_SUBROUTINES ACTIVE_SUBROUTINES}{@link #GL_ACTIVE_SUBROUTINE_UNIFORMS ACTIVE_SUBROUTINE_UNIFORMS}
    {@link #GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS}{@link #GL_ACTIVE_SUBROUTINE_MAX_LENGTH ACTIVE_SUBROUTINE_MAX_LENGTH}
    {@link #GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH}
    - * @param values a variable into which the queried value or values will be placed - * - * @see Reference Page - */ - public static void glGetProgramStageiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - nglGetProgramStageiv(program, shadertype, pname, memAddress(values)); - } - - /** - * Retrieves properties of a program object corresponding to a specified shader stage. - * - * @param program the name of the program containing shader stage - * @param shadertype the shader stage from which to query for the subroutine parameter. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}{@link #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}
    {@link #GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param pname the parameter of the shader to query. One of:
    {@link #GL_ACTIVE_SUBROUTINES ACTIVE_SUBROUTINES}{@link #GL_ACTIVE_SUBROUTINE_UNIFORMS ACTIVE_SUBROUTINE_UNIFORMS}
    {@link #GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS}{@link #GL_ACTIVE_SUBROUTINE_MAX_LENGTH ACTIVE_SUBROUTINE_MAX_LENGTH}
    {@link #GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgramStagei(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer values = stack.callocInt(1); - nglGetProgramStageiv(program, shadertype, pname, memAddress(values)); - return values.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glPatchParameteri ] --- - - /** - * Specifies the integer value of the specified parameter for patch primitives. - * - * @param pname the name of the parameter to set. Must be:
    {@link #GL_PATCH_VERTICES PATCH_VERTICES}
    - * @param value the new value for the parameter given by {@code pname} - * - * @see Reference Page - */ - public static native void glPatchParameteri(@NativeType("GLenum") int pname, @NativeType("GLint") int value); - - // --- [ glPatchParameterfv ] --- - - /** Unsafe version of: {@link #glPatchParameterfv PatchParameterfv} */ - public static native void nglPatchParameterfv(int pname, long values); - - /** - * Specifies an array of float values for the specified parameter for patch primitives. - * - * @param pname the name of the parameter to set. One of:
    {@link #GL_PATCH_DEFAULT_OUTER_LEVEL PATCH_DEFAULT_OUTER_LEVEL}{@link #GL_PATCH_DEFAULT_INNER_LEVEL PATCH_DEFAULT_INNER_LEVEL}
    - * @param values an array containing the new values for the parameter given by {@code pname} - * - * @see Reference Page - */ - public static void glPatchParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer values) { - if (CHECKS) { - if (DEBUG) { - check(values, GL11.glGetInteger(GL_PATCH_VERTICES)); - } - } - nglPatchParameterfv(pname, memAddress(values)); - } - - // --- [ glBindTransformFeedback ] --- - - /** - * Binds a transform feedback object. - * - * @param target the target to which to bind the transform feedback object {@code id}. Must be:
    {@link #GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param id the name of a transform feedback object - * - * @see Reference Page - */ - public static native void glBindTransformFeedback(@NativeType("GLenum") int target, @NativeType("GLuint") int id); - - // --- [ glDeleteTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glDeleteTransformFeedbacks DeleteTransformFeedbacks} - * - * @param n the number of transform feedback objects to delete - */ - public static native void nglDeleteTransformFeedbacks(int n, long ids); - - /** - * Deletes transform feedback objects. - * - * @param ids an array of names of transform feedback objects to delete - * - * @see Reference Page - */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") IntBuffer ids) { - nglDeleteTransformFeedbacks(ids.remaining(), memAddress(ids)); - } - - /** - * Deletes transform feedback objects. - * - * @see Reference Page - */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") int id) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.ints(id); - nglDeleteTransformFeedbacks(1, memAddress(ids)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glGenTransformFeedbacks GenTransformFeedbacks} - * - * @param n the number of transform feedback object names to reserve - */ - public static native void nglGenTransformFeedbacks(int n, long ids); - - /** - * Reserves transform feedback object names. - * - * @param ids an array of into which the reserved names will be written - * - * @see Reference Page - */ - public static void glGenTransformFeedbacks(@NativeType("GLuint *") IntBuffer ids) { - nglGenTransformFeedbacks(ids.remaining(), memAddress(ids)); - } - - /** - * Reserves transform feedback object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenTransformFeedbacks() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.callocInt(1); - nglGenTransformFeedbacks(1, memAddress(ids)); - return ids.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsTransformFeedback ] --- - - /** - * Determines if a name corresponds to a transform feedback object. - * - * @param id a value that may be the name of a transform feedback object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsTransformFeedback(@NativeType("GLuint") int id); - - // --- [ glPauseTransformFeedback ] --- - - /** - * Pauses transform feedback operations for the currently bound transform feedback object. - * - *

    When transform feedback operations are paused, transform feedback is still considered active and changing most transform feedback state related to the - * object results in an error. However, a new transform feedback object may be bound while transform feedback is paused. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} - * is generated by PauseTransformFeedback if the currently bound transform feedback is not active or is paused.

    - * - *

    When transform feedback is active and not paused, all geometric primitives generated must be compatible with the value of {@code primitiveMode} passed - * to {@link GL30C#glBeginTransformFeedback BeginTransformFeedback}. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link GL11#glBegin Begin} or any operation that implicitly calls {@link GL11#glBegin Begin} - * (such as {@link GL11C#glDrawElements DrawElements}) if {@code mode} is not one of the allowed modes. If a geometry shader is active, its output primitive type is used instead - * of the {@code mode} parameter passed to {@link GL11#glBegin Begin} for the purposes of this error check. Any primitive type may be used while transform feedback is - * paused.

    - * - * @see Reference Page - */ - public static native void glPauseTransformFeedback(); - - // --- [ glResumeTransformFeedback ] --- - - /** - * Resumes transform feedback operations for the currently bound transform feedback object. - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link #glResumeTransformFeedback ResumeTransformFeedback} if the currently bound transform feedback is not active or is not paused.

    - * - * @see Reference Page - */ - public static native void glResumeTransformFeedback(); - - // --- [ glDrawTransformFeedback ] --- - - /** - * Render primitives using a count derived from a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * - * @see Reference Page - */ - public static native void glDrawTransformFeedback(@NativeType("GLenum") int mode, @NativeType("GLuint") int id); - - // --- [ glDrawTransformFeedbackStream ] --- - - /** - * Renders primitives using a count derived from a specifed stream of a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link #GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param stream the index of the transform feedback stream from which to retrieve a primitive count - * - * @see Reference Page - */ - public static native void glDrawTransformFeedbackStream(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLuint") int stream); - - // --- [ glBeginQueryIndexed ] --- - - /** - * Begins a query object on an indexed target - * - * @param target the target type of query object established between {@code glBeginQueryIndexed} and the subsequent {@link #glEndQueryIndexed EndQueryIndexed}. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query target upon which to begin the query - * @param id the name of a query object - * - * @see Reference Page - */ - public static native void glBeginQueryIndexed(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int id); - - // --- [ glEndQueryIndexed ] --- - - /** - * Ends a query object on an indexed target - * - * @param target the target type of query object to be concluded. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query target upon which to end the query - * - * @see Reference Page - */ - public static native void glEndQueryIndexed(@NativeType("GLenum") int target, @NativeType("GLuint") int index); - - // --- [ glGetQueryIndexediv ] --- - - /** Unsafe version of: {@link #glGetQueryIndexediv GetQueryIndexediv} */ - public static native void nglGetQueryIndexediv(int target, int index, int pname, long params); - - /** - * Returns parameters of an indexed query object target. - * - * @param target a query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query object target - * @param pname the symbolic name of a query object target parameter - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetQueryIndexediv(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetQueryIndexediv(target, index, pname, memAddress(params)); - } - - /** - * Returns parameters of an indexed query object target. - * - * @param target a query object target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param index the index of the query object target - * @param pname the symbolic name of a query object target parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetQueryIndexedi(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetQueryIndexediv(target, index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Array version of: {@link #glDrawArraysIndirect DrawArraysIndirect} - * - * @see Reference Page - */ - public static void glDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect) { - long __functionAddress = GL.getICD().glDrawArraysIndirect; - if (CHECKS) { - check(__functionAddress); - check(indirect, (4 * 4) >> 2); - } - callPV(mode, indirect, __functionAddress); - } - - /** - * Array version of: {@link #glDrawElementsIndirect DrawElementsIndirect} - * - * @see Reference Page - */ - public static void glDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect) { - long __functionAddress = GL.getICD().glDrawElementsIndirect; - if (CHECKS) { - check(__functionAddress); - check(indirect, (5 * 4) >> 2); - } - callPV(mode, type, indirect, __functionAddress); - } - - /** - * Array version of: {@link #glUniform1dv Uniform1dv} - * - * @see Reference Page - */ - public static void glUniform1dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniform1dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform2dv Uniform2dv} - * - * @see Reference Page - */ - public static void glUniform2dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniform2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform3dv Uniform3dv} - * - * @see Reference Page - */ - public static void glUniform3dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniform3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniform4dv Uniform4dv} - * - * @see Reference Page - */ - public static void glUniform4dv(@NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniform4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix2dv UniformMatrix2dv} - * - * @see Reference Page - */ - public static void glUniformMatrix2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix3dv UniformMatrix3dv} - * - * @see Reference Page - */ - public static void glUniformMatrix3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 9, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix4dv UniformMatrix4dv} - * - * @see Reference Page - */ - public static void glUniformMatrix4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 4, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix2x3dv UniformMatrix2x3dv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix2x3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix2x4dv UniformMatrix2x4dv} - * - * @see Reference Page - */ - public static void glUniformMatrix2x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix2x4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix3x2dv UniformMatrix3x2dv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix3x2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix3x4dv UniformMatrix3x4dv} - * - * @see Reference Page - */ - public static void glUniformMatrix3x4dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix3x4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 12, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix4x2dv UniformMatrix4x2dv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x2dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix4x2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glUniformMatrix4x3dv UniformMatrix4x3dv} - * - * @see Reference Page - */ - public static void glUniformMatrix4x3dv(@NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glUniformMatrix4x3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 12, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glGetUniformdv GetUniformdv} - * - * @see Reference Page - */ - public static void glGetUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetUniformdv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveSubroutineUniformiv GetActiveSubroutineUniformiv} - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] values) { - long __functionAddress = GL.getICD().glGetActiveSubroutineUniformiv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - callPV(program, shadertype, index, pname, values, __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveSubroutineUniformName GetActiveSubroutineUniformName} - * - * @see Reference Page - */ - public static void glGetActiveSubroutineUniformName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetActiveSubroutineUniformName; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(program, shadertype, index, name.remaining(), length, memAddress(name), __functionAddress); - } - - /** - * Array version of: {@link #glGetActiveSubroutineName GetActiveSubroutineName} - * - * @see Reference Page - */ - public static void glGetActiveSubroutineName(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetActiveSubroutineName; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(program, shadertype, index, name.remaining(), length, memAddress(name), __functionAddress); - } - - /** - * Array version of: {@link #glUniformSubroutinesuiv UniformSubroutinesuiv} - * - * @see Reference Page - */ - public static void glUniformSubroutinesuiv(@NativeType("GLenum") int shadertype, @NativeType("GLuint const *") int[] indices) { - long __functionAddress = GL.getICD().glUniformSubroutinesuiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(shadertype, indices.length, indices, __functionAddress); - } - - /** - * Array version of: {@link #glGetUniformSubroutineuiv GetUniformSubroutineuiv} - * - * @see Reference Page - */ - public static void glGetUniformSubroutineuiv(@NativeType("GLenum") int shadertype, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetUniformSubroutineuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(shadertype, location, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramStageiv GetProgramStageiv} - * - * @see Reference Page - */ - public static void glGetProgramStageiv(@NativeType("GLuint") int program, @NativeType("GLenum") int shadertype, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] values) { - long __functionAddress = GL.getICD().glGetProgramStageiv; - if (CHECKS) { - check(__functionAddress); - check(values, 1); - } - callPV(program, shadertype, pname, values, __functionAddress); - } - - /** - * Array version of: {@link #glPatchParameterfv PatchParameterfv} - * - * @see Reference Page - */ - public static void glPatchParameterfv(@NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] values) { - long __functionAddress = GL.getICD().glPatchParameterfv; - if (CHECKS) { - check(__functionAddress); - if (DEBUG) { - check(values, GL11.glGetInteger(GL_PATCH_VERTICES)); - } - } - callPV(pname, values, __functionAddress); - } - - /** - * Array version of: {@link #glDeleteTransformFeedbacks DeleteTransformFeedbacks} - * - * @see Reference Page - */ - public static void glDeleteTransformFeedbacks(@NativeType("GLuint const *") int[] ids) { - long __functionAddress = GL.getICD().glDeleteTransformFeedbacks; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** - * Array version of: {@link #glGenTransformFeedbacks GenTransformFeedbacks} - * - * @see Reference Page - */ - public static void glGenTransformFeedbacks(@NativeType("GLuint *") int[] ids) { - long __functionAddress = GL.getICD().glGenTransformFeedbacks; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** - * Array version of: {@link #glGetQueryIndexediv GetQueryIndexediv} - * - * @see Reference Page - */ - public static void glGetQueryIndexediv(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetQueryIndexediv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, index, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL41.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL41.java deleted file mode 100644 index cbbc3688..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL41.java +++ /dev/null @@ -1,2628 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 4.1. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 4.1 implementations support revision 4.10 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL41 extends GL40 { - - static { GL.initialize(); } - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_SHADER_COMPILER = 0x8DFA, - GL_SHADER_BINARY_FORMATS = 0x8DF8, - GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, - GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, - GL_MAX_VARYING_VECTORS = 0x8DFC, - GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, - GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, - GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; - - /** Accepted by the {@code type} parameter of VertexAttribPointer. */ - public static final int GL_FIXED = 0x140C; - - /** Accepted by the {@code precisiontype} parameter of GetShaderPrecisionFormat. */ - public static final int - GL_LOW_FLOAT = 0x8DF0, - GL_MEDIUM_FLOAT = 0x8DF1, - GL_HIGH_FLOAT = 0x8DF2, - GL_LOW_INT = 0x8DF3, - GL_MEDIUM_INT = 0x8DF4, - GL_HIGH_INT = 0x8DF5; - - /** Accepted by the {@code format} parameter of most commands taking sized internal formats. */ - public static final int GL_RGB565 = 0x8D62; - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_PROGRAM_BINARY_LENGTH = 0x8741; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv and GetDoublev. */ - public static final int - GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, - GL_PROGRAM_BINARY_FORMATS = 0x87FF; - - /** Accepted by {@code stages} parameter to UseProgramStages. */ - public static final int - GL_VERTEX_SHADER_BIT = 0x1, - GL_FRAGMENT_SHADER_BIT = 0x2, - GL_GEOMETRY_SHADER_BIT = 0x4, - GL_TESS_CONTROL_SHADER_BIT = 0x8, - GL_TESS_EVALUATION_SHADER_BIT = 0x10, - GL_ALL_SHADER_BITS = 0xFFFFFFFF; - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int GL_PROGRAM_SEPARABLE = 0x8258; - - /** Accepted by {@code type} parameter to GetProgramPipelineiv. */ - public static final int GL_ACTIVE_PROGRAM = 0x8259; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_PROGRAM_PIPELINE_BINDING = 0x825A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_VIEWPORTS = 0x825B, - GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, - GL_VIEWPORT_BOUNDS_RANGE = 0x825D, - GL_LAYER_PROVOKING_VERTEX = 0x825E, - GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; - - /** Returned in the {@code data} parameter from a Get query with a {@code pname} of LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX. */ - public static final int GL_UNDEFINED_VERTEX = 0x8260; - - protected GL41() { - throw new UnsupportedOperationException(); - } - - // --- [ glReleaseShaderCompiler ] --- - - /** - * Releases resources allocated by the shader compiler. This is a hint from the application, and does not prevent later use of the shader compiler. - * - * @see Reference Page - */ - public static void glReleaseShaderCompiler() { - GL41C.glReleaseShaderCompiler(); - } - - // --- [ glShaderBinary ] --- - - /** - * Unsafe version of: {@link #glShaderBinary ShaderBinary} - * - * @param count the number of shader object handles contained in {@code shaders} - * @param length the length of the array whose address is given in binary - */ - public static void nglShaderBinary(int count, long shaders, int binaryformat, long binary, int length) { - GL41C.nglShaderBinary(count, shaders, binaryformat, binary, length); - } - - /** - * Loads pre-compiled shader binaries. - * - * @param shaders an array of shader handles into which to load pre-compiled shader binaries - * @param binaryformat the format of the shader binaries contained in {@code binary} - * @param binary an array of bytes containing pre-compiled binary shader code - * - * @see Reference Page - */ - public static void glShaderBinary(@NativeType("GLuint const *") IntBuffer shaders, @NativeType("GLenum") int binaryformat, @NativeType("void const *") ByteBuffer binary) { - GL41C.glShaderBinary(shaders, binaryformat, binary); - } - - // --- [ glGetShaderPrecisionFormat ] --- - - /** Unsafe version of: {@link #glGetShaderPrecisionFormat GetShaderPrecisionFormat} */ - public static void nglGetShaderPrecisionFormat(int shadertype, int precisiontype, long range, long precision) { - GL41C.nglGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - - /** - * Retrieves the range and precision for numeric formats supported by the shader compiler. - * - * @param shadertype the type of shader whose precision to query. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}
    - * @param precisiontype the numeric format whose precision and range to query - * @param range the address of array of two integers into which encodings of the implementation's numeric range are returned - * @param precision the address of an integer into which the numeric precision of the implementation is written - * - * @see Reference Page - */ - public static void glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") IntBuffer range, @NativeType("GLint *") IntBuffer precision) { - GL41C.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - - /** - * Retrieves the range and precision for numeric formats supported by the shader compiler. - * - * @param shadertype the type of shader whose precision to query. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}
    - * @param precisiontype the numeric format whose precision and range to query - * @param range the address of array of two integers into which encodings of the implementation's numeric range are returned - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") IntBuffer range) { - return GL41C.glGetShaderPrecisionFormat(shadertype, precisiontype, range); - } - - // --- [ glDepthRangef ] --- - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates - * - * @param zNear the mapping of the near clipping plane to window coordinates. The initial value is 0.0f. - * @param zFar the mapping of the far clipping plane to window coordinates. The initial value is 1.0f. - * - * @see Reference Page - */ - public static void glDepthRangef(@NativeType("GLfloat") float zNear, @NativeType("GLfloat") float zFar) { - GL41C.glDepthRangef(zNear, zFar); - } - - // --- [ glClearDepthf ] --- - - /** - * Specifies the clear value for the depth buffer - * - * @param depth the depth value used when the depth buffer is cleared. The initial value is 1.0f. - * - * @see Reference Page - */ - public static void glClearDepthf(@NativeType("GLfloat") float depth) { - GL41C.glClearDepthf(depth); - } - - // --- [ glGetProgramBinary ] --- - - /** - * Unsafe version of: {@link #glGetProgramBinary GetProgramBinary} - * - * @param bufSize the size of the buffer whose address is given by {@code binary} - */ - public static void nglGetProgramBinary(int program, int bufSize, long length, long binaryFormat, long binary) { - GL41C.nglGetProgramBinary(program, bufSize, length, binaryFormat, binary); - } - - /** - * Returns a binary representation of a program object's compiled and linked executable source. - * - * @param program the name of a program object whose binary representation to retrieve - * @param length the address of a variable to receive the number of bytes written into {@code binary} - * @param binaryFormat a variable to receive a token indicating the format of the binary data returned by the GL - * @param binary an array into which the GL will return {@code program}'s binary representation - * - * @see Reference Page - */ - public static void glGetProgramBinary(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLenum *") IntBuffer binaryFormat, @NativeType("void *") ByteBuffer binary) { - GL41C.glGetProgramBinary(program, length, binaryFormat, binary); - } - - // --- [ glProgramBinary ] --- - - /** - * Unsafe version of: {@link #glProgramBinary ProgramBinary} - * - * @param length the number of bytes contained in {@code binary} - */ - public static void nglProgramBinary(int program, int binaryFormat, long binary, int length) { - GL41C.nglProgramBinary(program, binaryFormat, binary, length); - } - - /** - * Loads a program object with a program binary. - * - * @param program the name of a program object into which to load a program binary - * @param binaryFormat the format of the binary data in binary - * @param binary an array containing the binary to be loaded into {@code program} - * - * @see Reference Page - */ - public static void glProgramBinary(@NativeType("GLuint") int program, @NativeType("GLenum") int binaryFormat, @NativeType("void const *") ByteBuffer binary) { - GL41C.glProgramBinary(program, binaryFormat, binary); - } - - // --- [ glProgramParameteri ] --- - - /** - * Specifies the integer value of a program object parameter. - * - * @param program the name of a program object whose parameter to modify - * @param pname the name of the parameter to modify. One of:
    {@link GL41C#GL_PROGRAM_BINARY_RETRIEVABLE_HINT PROGRAM_BINARY_RETRIEVABLE_HINT}{@link GL41C#GL_PROGRAM_SEPARABLE PROGRAM_SEPARABLE}
    - * @param value the new value of the parameter specified by {@code pname} for {@code program} - * - * @see Reference Page - */ - public static void glProgramParameteri(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint") int value) { - GL41C.glProgramParameteri(program, pname, value); - } - - // --- [ glUseProgramStages ] --- - - /** - * Binds stages of a program object to a program pipeline. - * - * @param pipeline the program pipeline object to which to bind stages from {@code program} - * @param stages a set of program stages to bind to the program pipeline object - * @param program the program object containing the shader executables to use in {@code pipeline} - * - * @see Reference Page - */ - public static void glUseProgramStages(@NativeType("GLuint") int pipeline, @NativeType("GLbitfield") int stages, @NativeType("GLuint") int program) { - GL41C.glUseProgramStages(pipeline, stages, program); - } - - // --- [ glActiveShaderProgram ] --- - - /** - * Sets the active program object for a program pipeline object. - * - * @param pipeline the program pipeline object to set the active program object for - * @param program the program object to set as the active program pipeline object {@code pipeline} - * - * @see Reference Page - */ - public static void glActiveShaderProgram(@NativeType("GLuint") int pipeline, @NativeType("GLuint") int program) { - GL41C.glActiveShaderProgram(pipeline, program); - } - - // --- [ glCreateShaderProgramv ] --- - - /** - * Unsafe version of: {@link #glCreateShaderProgramv CreateShaderProgramv} - * - * @param count the number of source code strings in the array {@code strings} - */ - public static int nglCreateShaderProgramv(int type, int count, long strings) { - return GL41C.nglCreateShaderProgramv(type, count, strings); - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * @param strings an array of pointers to source code strings from which to create the program object - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") PointerBuffer strings) { - return GL41C.glCreateShaderProgramv(type, strings); - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * @param strings an array of pointers to source code strings from which to create the program object - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") CharSequence... strings) { - return GL41C.glCreateShaderProgramv(type, strings); - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") CharSequence string) { - return GL41C.glCreateShaderProgramv(type, string); - } - - // --- [ glBindProgramPipeline ] --- - - /** - * Binds a program pipeline to the current context. - * - * @param pipeline the name of the pipeline object to bind to the context - * - * @see Reference Page - */ - public static void glBindProgramPipeline(@NativeType("GLuint") int pipeline) { - GL41C.glBindProgramPipeline(pipeline); - } - - // --- [ glDeleteProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glDeleteProgramPipelines DeleteProgramPipelines} - * - * @param n the number of program pipeline objects to delete - */ - public static void nglDeleteProgramPipelines(int n, long pipelines) { - GL41C.nglDeleteProgramPipelines(n, pipelines); - } - - /** - * Deletes program pipeline objects. - * - * @param pipelines an array of names of program pipeline objects to delete - * - * @see Reference Page - */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") IntBuffer pipelines) { - GL41C.glDeleteProgramPipelines(pipelines); - } - - /** - * Deletes program pipeline objects. - * - * @see Reference Page - */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") int pipeline) { - GL41C.glDeleteProgramPipelines(pipeline); - } - - // --- [ glGenProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glGenProgramPipelines GenProgramPipelines} - * - * @param n the number of program pipeline object names to reserve - */ - public static void nglGenProgramPipelines(int n, long pipelines) { - GL41C.nglGenProgramPipelines(n, pipelines); - } - - /** - * Reserves program pipeline object names. - * - * @param pipelines an array of into which the reserved names will be written - * - * @see Reference Page - */ - public static void glGenProgramPipelines(@NativeType("GLuint *") IntBuffer pipelines) { - GL41C.glGenProgramPipelines(pipelines); - } - - /** - * Reserves program pipeline object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenProgramPipelines() { - return GL41C.glGenProgramPipelines(); - } - - // --- [ glIsProgramPipeline ] --- - - /** - * Determines if a name corresponds to a program pipeline object. - * - * @param pipeline a value that may be the name of a program pipeline object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glIsProgramPipeline(@NativeType("GLuint") int pipeline) { - return GL41C.glIsProgramPipeline(pipeline); - } - - // --- [ glGetProgramPipelineiv ] --- - - /** Unsafe version of: {@link #glGetProgramPipelineiv GetProgramPipelineiv} */ - public static void nglGetProgramPipelineiv(int pipeline, int pname, long params) { - GL41C.nglGetProgramPipelineiv(pipeline, pname, params); - } - - /** - * Retrieves properties of a program pipeline object. - * - * @param pipeline the name of a program pipeline object whose parameter retrieve - * @param pname the name of the parameter to retrieve. One of:
    {@link GL41C#GL_ACTIVE_PROGRAM ACTIVE_PROGRAM}{@link GL20#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}
    {@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}{@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param params a variable into which will be written the value or values of {@code pname} for {@code pipeline} - * - * @see Reference Page - */ - public static void glGetProgramPipelineiv(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL41C.glGetProgramPipelineiv(pipeline, pname, params); - } - - /** - * Retrieves properties of a program pipeline object. - * - * @param pipeline the name of a program pipeline object whose parameter retrieve - * @param pname the name of the parameter to retrieve. One of:
    {@link GL41C#GL_ACTIVE_PROGRAM ACTIVE_PROGRAM}{@link GL20#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}
    {@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}{@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgramPipelinei(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname) { - return GL41C.glGetProgramPipelinei(pipeline, pname); - } - - // --- [ glProgramUniform1i ] --- - - /** - * Specifies the value of an int uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static void glProgramUniform1i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x) { - GL41C.glProgramUniform1i(program, location, x); - } - - // --- [ glProgramUniform2i ] --- - - /** - * Specifies the value of an ivec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static void glProgramUniform2i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y) { - GL41C.glProgramUniform2i(program, location, x, y); - } - - // --- [ glProgramUniform3i ] --- - - /** - * Specifies the value of an ivec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static void glProgramUniform3i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z) { - GL41C.glProgramUniform3i(program, location, x, y, z); - } - - // --- [ glProgramUniform4i ] --- - - /** - * Specifies the value of an ivec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static void glProgramUniform4i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w) { - GL41C.glProgramUniform4i(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1ui ] --- - - /** - * Specifies the value of a uint uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static void glProgramUniform1ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x) { - GL41C.glProgramUniform1ui(program, location, x); - } - - // --- [ glProgramUniform2ui ] --- - - /** - * Specifies the value of a uvec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static void glProgramUniform2ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y) { - GL41C.glProgramUniform2ui(program, location, x, y); - } - - // --- [ glProgramUniform3ui ] --- - - /** - * Specifies the value of a uvec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static void glProgramUniform3ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y, @NativeType("GLuint") int z) { - GL41C.glProgramUniform3ui(program, location, x, y, z); - } - - // --- [ glProgramUniform4ui ] --- - - /** - * Specifies the value of a uvec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static void glProgramUniform4ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y, @NativeType("GLuint") int z, @NativeType("GLuint") int w) { - GL41C.glProgramUniform4ui(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1f ] --- - - /** - * Specifies the value of a float uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static void glProgramUniform1f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x) { - GL41C.glProgramUniform1f(program, location, x); - } - - // --- [ glProgramUniform2f ] --- - - /** - * Specifies the value of a vec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static void glProgramUniform2f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y) { - GL41C.glProgramUniform2f(program, location, x, y); - } - - // --- [ glProgramUniform3f ] --- - - /** - * Specifies the value of a vec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static void glProgramUniform3f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z) { - GL41C.glProgramUniform3f(program, location, x, y, z); - } - - // --- [ glProgramUniform4f ] --- - - /** - * Specifies the value of a vec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static void glProgramUniform4f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w) { - GL41C.glProgramUniform4f(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1d ] --- - - /** - * Specifies the value of a double uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static void glProgramUniform1d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x) { - GL41C.glProgramUniform1d(program, location, x); - } - - // --- [ glProgramUniform2d ] --- - - /** - * Specifies the value of a dvec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static void glProgramUniform2d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y) { - GL41C.glProgramUniform2d(program, location, x, y); - } - - // --- [ glProgramUniform3d ] --- - - /** - * Specifies the value of a dvec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static void glProgramUniform3d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z) { - GL41C.glProgramUniform3d(program, location, x, y, z); - } - - // --- [ glProgramUniform4d ] --- - - /** - * Specifies the value of a dvec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static void glProgramUniform4d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w) { - GL41C.glProgramUniform4d(program, location, x, y, z, w); - } - - // --- [ glProgramUniform1iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1iv ProgramUniform1iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1iv(program, location, count, value); - } - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform1iv(program, location, value); - } - - // --- [ glProgramUniform2iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2iv ProgramUniform2iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2iv(program, location, count, value); - } - - /** - * Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform2iv(program, location, value); - } - - // --- [ glProgramUniform3iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3iv ProgramUniform3iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3iv(program, location, count, value); - } - - /** - * Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform3iv(program, location, value); - } - - // --- [ glProgramUniform4iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4iv ProgramUniform4iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4iv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4iv(program, location, count, value); - } - - /** - * Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - GL41C.glProgramUniform4iv(program, location, value); - } - - // --- [ glProgramUniform1uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1uiv ProgramUniform1uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uint uniform variable or a uint uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform1uiv(program, location, value); - } - - // --- [ glProgramUniform2uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2uiv ProgramUniform2uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uvec2 uniform variable or a uvec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform2uiv(program, location, value); - } - - // --- [ glProgramUniform3uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3uiv ProgramUniform3uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uvec3 uniform variable or a uvec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform3uiv(program, location, value); - } - - // --- [ glProgramUniform4uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4uiv ProgramUniform4uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4uiv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4uiv(program, location, count, value); - } - - /** - * Specifies the value of a single uvec4 uniform variable or a uvec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - GL41C.glProgramUniform4uiv(program, location, value); - } - - // --- [ glProgramUniform1fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1fv ProgramUniform1fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1fv(program, location, count, value); - } - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform1fv(program, location, value); - } - - // --- [ glProgramUniform2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2fv ProgramUniform2fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2fv(program, location, count, value); - } - - /** - * Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform2fv(program, location, value); - } - - // --- [ glProgramUniform3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3fv ProgramUniform3fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3fv(program, location, count, value); - } - - /** - * Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform3fv(program, location, value); - } - - // --- [ glProgramUniform4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4fv ProgramUniform4fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4fv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4fv(program, location, count, value); - } - - /** - * Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniform4fv(program, location, value); - } - - // --- [ glProgramUniform1dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1dv ProgramUniform1dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform1dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform1dv(program, location, count, value); - } - - /** - * Specifies the value of a single double uniform variable or a double uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform1dv(program, location, value); - } - - // --- [ glProgramUniform2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2dv ProgramUniform2dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform2dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform2dv(program, location, count, value); - } - - /** - * Specifies the value of a single dvec2 uniform variable or a dvec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform2dv(program, location, value); - } - - // --- [ glProgramUniform3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3dv ProgramUniform3dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform3dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform3dv(program, location, count, value); - } - - /** - * Specifies the value of a single dvec3 uniform variable or a dvec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform3dv(program, location, value); - } - - // --- [ glProgramUniform4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4dv ProgramUniform4dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static void nglProgramUniform4dv(int program, int location, int count, long value) { - GL41C.nglProgramUniform4dv(program, location, count, value); - } - - /** - * Specifies the value of a single dvec4 uniform variable or a dvec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniform4dv(program, location, value); - } - - // --- [ glProgramUniformMatrix2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2fv ProgramUniformMatrix2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2 uniform variable or a mat2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix2fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3fv ProgramUniformMatrix3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix3fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4fv ProgramUniformMatrix4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix4fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2dv ProgramUniformMatrix2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2 uniform variable or a dmat2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix2dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3dv ProgramUniformMatrix3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3 uniform variable or a dmat3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix3dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4dv ProgramUniformMatrix4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4 uniform variable or a dmat4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix4dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x3fv ProgramUniformMatrix2x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x3fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x3fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2x3 uniform variable or a mat2x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix2x3fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x2fv ProgramUniformMatrix3x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x2fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x2fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3x2 uniform variable or a mat3x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix3x2fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x4fv ProgramUniformMatrix2x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x4fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x4fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat2x4 uniform variable or a mat2x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix2x4fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x2fv ProgramUniformMatrix4x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x2fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x2fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4x2 uniform variable or a mat4x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix4x2fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x4fv ProgramUniformMatrix3x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x4fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x4fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat3x4 uniform variable or a mat3x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix3x4fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x3fv ProgramUniformMatrix4x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x3fv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x3fv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single mat4x3 uniform variable or a mat4x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - GL41C.glProgramUniformMatrix4x3fv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x3dv ProgramUniformMatrix2x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x3dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x3dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x3 uniform variable or a dmat2x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix2x3dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x2dv ProgramUniformMatrix3x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x2dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x2dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x2 uniform variable or a dmat3x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix3x2dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix2x4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x4dv ProgramUniformMatrix2x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix2x4dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix2x4dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat2x4 uniform variable or a dmat2x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix2x4dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x2dv ProgramUniformMatrix4x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x2dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x2dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x2 uniform variable or a dmat4x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix4x2dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix3x4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x4dv ProgramUniformMatrix3x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix3x4dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix3x4dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat3x4 uniform variable or a dmat3x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix3x4dv(program, location, transpose, value); - } - - // --- [ glProgramUniformMatrix4x3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x3dv ProgramUniformMatrix4x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static void nglProgramUniformMatrix4x3dv(int program, int location, int count, boolean transpose, long value) { - GL41C.nglProgramUniformMatrix4x3dv(program, location, count, transpose, value); - } - - /** - * Specifies the value of a single dmat4x3 uniform variable or a dmat4x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - GL41C.glProgramUniformMatrix4x3dv(program, location, transpose, value); - } - - // --- [ glValidateProgramPipeline ] --- - - /** - * Validates a program pipeline object against current GL state. - * - * @param pipeline the name of a program pipeline object to validate - * - * @see Reference Page - */ - public static void glValidateProgramPipeline(@NativeType("GLuint") int pipeline) { - GL41C.glValidateProgramPipeline(pipeline); - } - - // --- [ glGetProgramPipelineInfoLog ] --- - - /** - * Unsafe version of: {@link #glGetProgramPipelineInfoLog GetProgramPipelineInfoLog} - * - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code infoLog} - */ - public static void nglGetProgramPipelineInfoLog(int pipeline, int bufSize, long length, long infoLog) { - GL41C.nglGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * @param length a variable into which will be written the number of characters written into {@code infoLog} - * @param infoLog an array of characters into which will be written the info log for {@code pipeline} - * - * @see Reference Page - */ - public static void glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL41C.glGetProgramPipelineInfoLog(pipeline, length, infoLog); - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code infoLog} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @NativeType("GLsizei") int bufSize) { - return GL41C.glGetProgramPipelineInfoLog(pipeline, bufSize); - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline) { - return glGetProgramPipelineInfoLog(pipeline, glGetProgramPipelinei(pipeline, GL20.GL_INFO_LOG_LENGTH)); - } - - // --- [ glVertexAttribL1d ] --- - - /** - * Specifies the value of a generic vertex attribute. The y and z components are implicitly set to 0.0 and w to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * - * @see Reference Page - */ - public static void glVertexAttribL1d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x) { - GL41C.glVertexAttribL1d(index, x); - } - - // --- [ glVertexAttribL2d ] --- - - /** - * Specifies the value of a generic vertex attribute. The y component is implicitly set to 0.0 and w to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * - * @see Reference Page - */ - public static void glVertexAttribL2d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y) { - GL41C.glVertexAttribL2d(index, x, y); - } - - // --- [ glVertexAttribL3d ] --- - - /** - * Specifies the value of a generic vertex attribute. The w is implicitly set to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * - * @see Reference Page - */ - public static void glVertexAttribL3d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z) { - GL41C.glVertexAttribL3d(index, x, y, z); - } - - // --- [ glVertexAttribL4d ] --- - - /** - * Specifies the value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static void glVertexAttribL4d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w) { - GL41C.glVertexAttribL4d(index, x, y, z, w); - } - - // --- [ glVertexAttribL1dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL1dv VertexAttribL1dv} */ - public static void nglVertexAttribL1dv(int index, long v) { - GL41C.nglVertexAttribL1dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL1d VertexAttribL1d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL1dv(index, v); - } - - // --- [ glVertexAttribL2dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL2dv VertexAttribL2dv} */ - public static void nglVertexAttribL2dv(int index, long v) { - GL41C.nglVertexAttribL2dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL2d VertexAttribL2d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL2dv(index, v); - } - - // --- [ glVertexAttribL3dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL3dv VertexAttribL3dv} */ - public static void nglVertexAttribL3dv(int index, long v) { - GL41C.nglVertexAttribL3dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL3d VertexAttribL3d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL3dv(index, v); - } - - // --- [ glVertexAttribL4dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL4dv VertexAttribL4dv} */ - public static void nglVertexAttribL4dv(int index, long v) { - GL41C.nglVertexAttribL4dv(index, v); - } - - /** - * Pointer version of {@link #glVertexAttribL4d VertexAttribL4d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glVertexAttribL4dv(index, v); - } - - // --- [ glVertexAttribLPointer ] --- - - /** - * Unsafe version of: {@link #glVertexAttribLPointer VertexAttribLPointer} - * - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - */ - public static void nglVertexAttribLPointer(int index, int size, int type, int stride, long pointer) { - GL41C.nglVertexAttribLPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - GL41C.glVertexAttribLPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - GL41C.glVertexAttribLPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLsizei") int stride, @NativeType("void const *") DoubleBuffer pointer) { - GL41C.glVertexAttribLPointer(index, size, stride, pointer); - } - - // --- [ glGetVertexAttribLdv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribLdv GetVertexAttribLdv} */ - public static void nglGetVertexAttribLdv(int index, int pname, long params) { - GL41C.nglGetVertexAttribLdv(index, pname, params); - } - - /** - * Double version of {@link GL20C#glGetVertexAttribiv GetVertexAttribiv}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribLdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - GL41C.glGetVertexAttribLdv(index, pname, params); - } - - // --- [ glViewportArrayv ] --- - - /** - * Unsafe version of: {@link #glViewportArrayv ViewportArrayv} - * - * @param count the number of viewports to set - */ - public static void nglViewportArrayv(int first, int count, long v) { - GL41C.nglViewportArrayv(first, count, v); - } - - /** - * Sets multiple viewports. - * - * @param first the first viewport to set - * @param v an array containing the viewport parameters - * - * @see Reference Page - */ - public static void glViewportArrayv(@NativeType("GLuint") int first, @NativeType("GLfloat const *") FloatBuffer v) { - GL41C.glViewportArrayv(first, v); - } - - // --- [ glViewportIndexedf ] --- - - /** - * Sets a specified viewport. - * - * @param index the viewport to set - * @param x the left viewport coordinate - * @param y the bottom viewport coordinate - * @param w the viewport width - * @param h the viewport height - * - * @see Reference Page - */ - public static void glViewportIndexedf(@NativeType("GLuint") int index, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float w, @NativeType("GLfloat") float h) { - GL41C.glViewportIndexedf(index, x, y, w, h); - } - - // --- [ glViewportIndexedfv ] --- - - /** Unsafe version of: {@link #glViewportIndexedfv ViewportIndexedfv} */ - public static void nglViewportIndexedfv(int index, long v) { - GL41C.nglViewportIndexedfv(index, v); - } - - /** - * Pointer version of {@link #glViewportIndexedf ViewportIndexedf}. - * - * @param index the viewport to set - * @param v the viewport parameters - * - * @see Reference Page - */ - public static void glViewportIndexedfv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - GL41C.glViewportIndexedfv(index, v); - } - - // --- [ glScissorArrayv ] --- - - /** - * Unsafe version of: {@link #glScissorArrayv ScissorArrayv} - * - * @param count the number of scissor boxes to modify - */ - public static void nglScissorArrayv(int first, int count, long v) { - GL41C.nglScissorArrayv(first, count, v); - } - - /** - * Defines the scissor box for multiple viewports. - * - * @param first the index of the first viewport whose scissor box to modify - * @param v an array containing the left, bottom, width and height of each scissor box, in that order - * - * @see Reference Page - */ - public static void glScissorArrayv(@NativeType("GLuint") int first, @NativeType("GLint const *") IntBuffer v) { - GL41C.glScissorArrayv(first, v); - } - - // --- [ glScissorIndexed ] --- - - /** - * Defines the scissor box for a specific viewport. - * - * @param index the index of the viewport whose scissor box to modify - * @param left the left scissor box coordinate - * @param bottom the bottom scissor box coordinate - * @param width the scissor box width - * @param height the scissor box height - * - * @see Reference Page - */ - public static void glScissorIndexed(@NativeType("GLuint") int index, @NativeType("GLint") int left, @NativeType("GLint") int bottom, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL41C.glScissorIndexed(index, left, bottom, width, height); - } - - // --- [ glScissorIndexedv ] --- - - /** Unsafe version of: {@link #glScissorIndexedv ScissorIndexedv} */ - public static void nglScissorIndexedv(int index, long v) { - GL41C.nglScissorIndexedv(index, v); - } - - /** - * Pointer version of {@link #glScissorIndexed ScissorIndexed}. - * - * @param index the index of the viewport whose scissor box to modify - * @param v an array containing the left, bottom, width and height of each scissor box, in that order - * - * @see Reference Page - */ - public static void glScissorIndexedv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - GL41C.glScissorIndexedv(index, v); - } - - // --- [ glDepthRangeArrayv ] --- - - /** - * Unsafe version of: {@link #glDepthRangeArrayv DepthRangeArrayv} - * - * @param count the number of viewports whose depth range to update - */ - public static void nglDepthRangeArrayv(int first, int count, long v) { - GL41C.nglDepthRangeArrayv(first, count, v); - } - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified set of viewports. - * - * @param first the index of the first viewport whose depth range to update - * @param v n array containing the near and far values for the depth range of each modified viewport - * - * @see Reference Page - */ - public static void glDepthRangeArrayv(@NativeType("GLuint") int first, @NativeType("GLdouble const *") DoubleBuffer v) { - GL41C.glDepthRangeArrayv(first, v); - } - - // --- [ glDepthRangeIndexed ] --- - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified viewport. - * - * @param index the index of the viewport whose depth range to update - * @param zNear the mapping of the near clipping plane to window coordinates. The initial value is 0. - * @param zFar the mapping of the far clipping plane to window coordinates. The initial value is 1. - * - * @see Reference Page - */ - public static void glDepthRangeIndexed(@NativeType("GLuint") int index, @NativeType("GLdouble") double zNear, @NativeType("GLdouble") double zFar) { - GL41C.glDepthRangeIndexed(index, zNear, zFar); - } - - // --- [ glGetFloati_v ] --- - - /** Unsafe version of: {@link #glGetFloati_v GetFloati_v} */ - public static void nglGetFloati_v(int target, int index, long data) { - GL41C.nglGetFloati_v(target, index, data); - } - - /** - * Queries the float value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetFloati_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer data) { - GL41C.glGetFloati_v(target, index, data); - } - - /** - * Queries the float value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetFloati(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL41C.glGetFloati(target, index); - } - - // --- [ glGetDoublei_v ] --- - - /** Unsafe version of: {@link #glGetDoublei_v GetDoublei_v} */ - public static void nglGetDoublei_v(int target, int index, long data) { - GL41C.nglGetDoublei_v(target, index, data); - } - - /** - * Queries the double value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetDoublei_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer data) { - GL41C.glGetDoublei_v(target, index, data); - } - - /** - * Queries the double value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetDoublei(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - return GL41C.glGetDoublei(target, index); - } - - /** - * Array version of: {@link #glShaderBinary ShaderBinary} - * - * @see Reference Page - */ - public static void glShaderBinary(@NativeType("GLuint const *") int[] shaders, @NativeType("GLenum") int binaryformat, @NativeType("void const *") ByteBuffer binary) { - GL41C.glShaderBinary(shaders, binaryformat, binary); - } - - /** - * Array version of: {@link #glGetShaderPrecisionFormat GetShaderPrecisionFormat} - * - * @see Reference Page - */ - public static void glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") int[] range, @NativeType("GLint *") int[] precision) { - GL41C.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - } - - /** - * Array version of: {@link #glGetProgramBinary GetProgramBinary} - * - * @see Reference Page - */ - public static void glGetProgramBinary(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLenum *") int[] binaryFormat, @NativeType("void *") ByteBuffer binary) { - GL41C.glGetProgramBinary(program, length, binaryFormat, binary); - } - - /** - * Array version of: {@link #glDeleteProgramPipelines DeleteProgramPipelines} - * - * @see Reference Page - */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") int[] pipelines) { - GL41C.glDeleteProgramPipelines(pipelines); - } - - /** - * Array version of: {@link #glGenProgramPipelines GenProgramPipelines} - * - * @see Reference Page - */ - public static void glGenProgramPipelines(@NativeType("GLuint *") int[] pipelines) { - GL41C.glGenProgramPipelines(pipelines); - } - - /** - * Array version of: {@link #glGetProgramPipelineiv GetProgramPipelineiv} - * - * @see Reference Page - */ - public static void glGetProgramPipelineiv(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL41C.glGetProgramPipelineiv(pipeline, pname, params); - } - - /** - * Array version of: {@link #glProgramUniform1iv ProgramUniform1iv} - * - * @see Reference Page - */ - public static void glProgramUniform1iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform1iv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform2iv ProgramUniform2iv} - * - * @see Reference Page - */ - public static void glProgramUniform2iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform2iv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform3iv ProgramUniform3iv} - * - * @see Reference Page - */ - public static void glProgramUniform3iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform3iv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform4iv ProgramUniform4iv} - * - * @see Reference Page - */ - public static void glProgramUniform4iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - GL41C.glProgramUniform4iv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform1uiv ProgramUniform1uiv} - * - * @see Reference Page - */ - public static void glProgramUniform1uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform1uiv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform2uiv ProgramUniform2uiv} - * - * @see Reference Page - */ - public static void glProgramUniform2uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform2uiv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform3uiv ProgramUniform3uiv} - * - * @see Reference Page - */ - public static void glProgramUniform3uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform3uiv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform4uiv ProgramUniform4uiv} - * - * @see Reference Page - */ - public static void glProgramUniform4uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - GL41C.glProgramUniform4uiv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform1fv ProgramUniform1fv} - * - * @see Reference Page - */ - public static void glProgramUniform1fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform1fv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform2fv ProgramUniform2fv} - * - * @see Reference Page - */ - public static void glProgramUniform2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform2fv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform3fv ProgramUniform3fv} - * - * @see Reference Page - */ - public static void glProgramUniform3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform3fv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform4fv ProgramUniform4fv} - * - * @see Reference Page - */ - public static void glProgramUniform4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniform4fv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform1dv ProgramUniform1dv} - * - * @see Reference Page - */ - public static void glProgramUniform1dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform1dv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform2dv ProgramUniform2dv} - * - * @see Reference Page - */ - public static void glProgramUniform2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform2dv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform3dv ProgramUniform3dv} - * - * @see Reference Page - */ - public static void glProgramUniform3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform3dv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniform4dv ProgramUniform4dv} - * - * @see Reference Page - */ - public static void glProgramUniform4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniform4dv(program, location, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2fv ProgramUniformMatrix2fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix2fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3fv ProgramUniformMatrix3fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix3fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4fv ProgramUniformMatrix4fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix4fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2dv ProgramUniformMatrix2dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix2dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3dv ProgramUniformMatrix3dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix3dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4dv ProgramUniformMatrix4dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix4dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x3fv ProgramUniformMatrix2x3fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix2x3fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x2fv ProgramUniformMatrix3x2fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix3x2fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x4fv ProgramUniformMatrix2x4fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix2x4fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x2fv ProgramUniformMatrix4x2fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix4x2fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x4fv ProgramUniformMatrix3x4fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix3x4fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x3fv ProgramUniformMatrix4x3fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - GL41C.glProgramUniformMatrix4x3fv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x3dv ProgramUniformMatrix2x3dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix2x3dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x2dv ProgramUniformMatrix3x2dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix3x2dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x4dv ProgramUniformMatrix2x4dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix2x4dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x2dv ProgramUniformMatrix4x2dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix4x2dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x4dv ProgramUniformMatrix3x4dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix3x4dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x3dv ProgramUniformMatrix4x3dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - GL41C.glProgramUniformMatrix4x3dv(program, location, transpose, value); - } - - /** - * Array version of: {@link #glGetProgramPipelineInfoLog GetProgramPipelineInfoLog} - * - * @see Reference Page - */ - public static void glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer infoLog) { - GL41C.glGetProgramPipelineInfoLog(pipeline, length, infoLog); - } - - /** - * Array version of: {@link #glVertexAttribL1dv VertexAttribL1dv} - * - * @see Reference Page - */ - public static void glVertexAttribL1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL1dv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribL2dv VertexAttribL2dv} - * - * @see Reference Page - */ - public static void glVertexAttribL2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL2dv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribL3dv VertexAttribL3dv} - * - * @see Reference Page - */ - public static void glVertexAttribL3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL3dv(index, v); - } - - /** - * Array version of: {@link #glVertexAttribL4dv VertexAttribL4dv} - * - * @see Reference Page - */ - public static void glVertexAttribL4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - GL41C.glVertexAttribL4dv(index, v); - } - - /** - * Array version of: {@link #glGetVertexAttribLdv GetVertexAttribLdv} - * - * @see Reference Page - */ - public static void glGetVertexAttribLdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - GL41C.glGetVertexAttribLdv(index, pname, params); - } - - /** - * Array version of: {@link #glViewportArrayv ViewportArrayv} - * - * @see Reference Page - */ - public static void glViewportArrayv(@NativeType("GLuint") int first, @NativeType("GLfloat const *") float[] v) { - GL41C.glViewportArrayv(first, v); - } - - /** - * Array version of: {@link #glViewportIndexedfv ViewportIndexedfv} - * - * @see Reference Page - */ - public static void glViewportIndexedfv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - GL41C.glViewportIndexedfv(index, v); - } - - /** - * Array version of: {@link #glScissorArrayv ScissorArrayv} - * - * @see Reference Page - */ - public static void glScissorArrayv(@NativeType("GLuint") int first, @NativeType("GLint const *") int[] v) { - GL41C.glScissorArrayv(first, v); - } - - /** - * Array version of: {@link #glScissorIndexedv ScissorIndexedv} - * - * @see Reference Page - */ - public static void glScissorIndexedv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - GL41C.glScissorIndexedv(index, v); - } - - /** - * Array version of: {@link #glDepthRangeArrayv DepthRangeArrayv} - * - * @see Reference Page - */ - public static void glDepthRangeArrayv(@NativeType("GLuint") int first, @NativeType("GLdouble const *") double[] v) { - GL41C.glDepthRangeArrayv(first, v); - } - - /** - * Array version of: {@link #glGetFloati_v GetFloati_v} - * - * @see Reference Page - */ - public static void glGetFloati_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] data) { - GL41C.glGetFloati_v(target, index, data); - } - - /** - * Array version of: {@link #glGetDoublei_v GetDoublei_v} - * - * @see Reference Page - */ - public static void glGetDoublei_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] data) { - GL41C.glGetDoublei_v(target, index, data); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL41C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL41C.java deleted file mode 100644 index 86600a7d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL41C.java +++ /dev/null @@ -1,2795 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.MemoryUtil; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.1. Includes only Core Profile symbols. - * - *

    OpenGL 4.1 implementations support revision 4.10 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL41C extends GL40C { - - static { GL.initialize(); } - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_SHADER_COMPILER = 0x8DFA, - GL_SHADER_BINARY_FORMATS = 0x8DF8, - GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, - GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, - GL_MAX_VARYING_VECTORS = 0x8DFC, - GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, - GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, - GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; - - /** Accepted by the {@code type} parameter of VertexAttribPointer. */ - public static final int GL_FIXED = 0x140C; - - /** Accepted by the {@code precisiontype} parameter of GetShaderPrecisionFormat. */ - public static final int - GL_LOW_FLOAT = 0x8DF0, - GL_MEDIUM_FLOAT = 0x8DF1, - GL_HIGH_FLOAT = 0x8DF2, - GL_LOW_INT = 0x8DF3, - GL_MEDIUM_INT = 0x8DF4, - GL_HIGH_INT = 0x8DF5; - - /** Accepted by the {@code format} parameter of most commands taking sized internal formats. */ - public static final int GL_RGB565 = 0x8D62; - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_PROGRAM_BINARY_LENGTH = 0x8741; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv and GetDoublev. */ - public static final int - GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, - GL_PROGRAM_BINARY_FORMATS = 0x87FF; - - /** Accepted by {@code stages} parameter to UseProgramStages. */ - public static final int - GL_VERTEX_SHADER_BIT = 0x1, - GL_FRAGMENT_SHADER_BIT = 0x2, - GL_GEOMETRY_SHADER_BIT = 0x4, - GL_TESS_CONTROL_SHADER_BIT = 0x8, - GL_TESS_EVALUATION_SHADER_BIT = 0x10, - GL_ALL_SHADER_BITS = 0xFFFFFFFF; - - /** Accepted by the {@code pname} parameter of ProgramParameteri and GetProgramiv. */ - public static final int GL_PROGRAM_SEPARABLE = 0x8258; - - /** Accepted by {@code type} parameter to GetProgramPipelineiv. */ - public static final int GL_ACTIVE_PROGRAM = 0x8259; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_PROGRAM_PIPELINE_BINDING = 0x825A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_VIEWPORTS = 0x825B, - GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, - GL_VIEWPORT_BOUNDS_RANGE = 0x825D, - GL_LAYER_PROVOKING_VERTEX = 0x825E, - GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; - - /** Returned in the {@code data} parameter from a Get query with a {@code pname} of LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX. */ - public static final int GL_UNDEFINED_VERTEX = 0x8260; - - protected GL41C() { - throw new UnsupportedOperationException(); - } - - // --- [ glReleaseShaderCompiler ] --- - - /** - * Releases resources allocated by the shader compiler. This is a hint from the application, and does not prevent later use of the shader compiler. - * - * @see Reference Page - */ - public static native void glReleaseShaderCompiler(); - - // --- [ glShaderBinary ] --- - - /** - * Unsafe version of: {@link #glShaderBinary ShaderBinary} - * - * @param count the number of shader object handles contained in {@code shaders} - * @param length the length of the array whose address is given in binary - */ - public static native void nglShaderBinary(int count, long shaders, int binaryformat, long binary, int length); - - /** - * Loads pre-compiled shader binaries. - * - * @param shaders an array of shader handles into which to load pre-compiled shader binaries - * @param binaryformat the format of the shader binaries contained in {@code binary} - * @param binary an array of bytes containing pre-compiled binary shader code - * - * @see Reference Page - */ - public static void glShaderBinary(@NativeType("GLuint const *") IntBuffer shaders, @NativeType("GLenum") int binaryformat, @NativeType("void const *") ByteBuffer binary) { - nglShaderBinary(shaders.remaining(), memAddress(shaders), binaryformat, memAddress(binary), binary.remaining()); - } - - // --- [ glGetShaderPrecisionFormat ] --- - - /** Unsafe version of: {@link #glGetShaderPrecisionFormat GetShaderPrecisionFormat} */ - public static native void nglGetShaderPrecisionFormat(int shadertype, int precisiontype, long range, long precision); - - /** - * Retrieves the range and precision for numeric formats supported by the shader compiler. - * - * @param shadertype the type of shader whose precision to query. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}
    - * @param precisiontype the numeric format whose precision and range to query - * @param range the address of array of two integers into which encodings of the implementation's numeric range are returned - * @param precision the address of an integer into which the numeric precision of the implementation is written - * - * @see Reference Page - */ - public static void glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") IntBuffer range, @NativeType("GLint *") IntBuffer precision) { - if (CHECKS) { - check(range, 2); - check(precision, 1); - } - nglGetShaderPrecisionFormat(shadertype, precisiontype, memAddress(range), memAddress(precision)); - } - - /** - * Retrieves the range and precision for numeric formats supported by the shader compiler. - * - * @param shadertype the type of shader whose precision to query. One of:
    {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}
    - * @param precisiontype the numeric format whose precision and range to query - * @param range the address of array of two integers into which encodings of the implementation's numeric range are returned - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") IntBuffer range) { - if (CHECKS) { - check(range, 2); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer precision = stack.callocInt(1); - nglGetShaderPrecisionFormat(shadertype, precisiontype, memAddress(range), memAddress(precision)); - return precision.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDepthRangef ] --- - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates - * - * @param zNear the mapping of the near clipping plane to window coordinates. The initial value is 0.0f. - * @param zFar the mapping of the far clipping plane to window coordinates. The initial value is 1.0f. - * - * @see Reference Page - */ - public static native void glDepthRangef(@NativeType("GLfloat") float zNear, @NativeType("GLfloat") float zFar); - - // --- [ glClearDepthf ] --- - - /** - * Specifies the clear value for the depth buffer - * - * @param depth the depth value used when the depth buffer is cleared. The initial value is 1.0f. - * - * @see Reference Page - */ - public static native void glClearDepthf(@NativeType("GLfloat") float depth); - - // --- [ glGetProgramBinary ] --- - - /** - * Unsafe version of: {@link #glGetProgramBinary GetProgramBinary} - * - * @param bufSize the size of the buffer whose address is given by {@code binary} - */ - public static native void nglGetProgramBinary(int program, int bufSize, long length, long binaryFormat, long binary); - - /** - * Returns a binary representation of a program object's compiled and linked executable source. - * - * @param program the name of a program object whose binary representation to retrieve - * @param length the address of a variable to receive the number of bytes written into {@code binary} - * @param binaryFormat a variable to receive a token indicating the format of the binary data returned by the GL - * @param binary an array into which the GL will return {@code program}'s binary representation - * - * @see Reference Page - */ - public static void glGetProgramBinary(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLenum *") IntBuffer binaryFormat, @NativeType("void *") ByteBuffer binary) { - if (CHECKS) { - checkSafe(length, 1); - check(binaryFormat, 1); - } - nglGetProgramBinary(program, binary.remaining(), memAddressSafe(length), memAddress(binaryFormat), memAddress(binary)); - } - - // --- [ glProgramBinary ] --- - - /** - * Unsafe version of: {@link #glProgramBinary ProgramBinary} - * - * @param length the number of bytes contained in {@code binary} - */ - public static native void nglProgramBinary(int program, int binaryFormat, long binary, int length); - - /** - * Loads a program object with a program binary. - * - * @param program the name of a program object into which to load a program binary - * @param binaryFormat the format of the binary data in binary - * @param binary an array containing the binary to be loaded into {@code program} - * - * @see Reference Page - */ - public static void glProgramBinary(@NativeType("GLuint") int program, @NativeType("GLenum") int binaryFormat, @NativeType("void const *") ByteBuffer binary) { - nglProgramBinary(program, binaryFormat, memAddress(binary), binary.remaining()); - } - - // --- [ glProgramParameteri ] --- - - /** - * Specifies the integer value of a program object parameter. - * - * @param program the name of a program object whose parameter to modify - * @param pname the name of the parameter to modify. One of:
    {@link #GL_PROGRAM_BINARY_RETRIEVABLE_HINT PROGRAM_BINARY_RETRIEVABLE_HINT}{@link #GL_PROGRAM_SEPARABLE PROGRAM_SEPARABLE}
    - * @param value the new value of the parameter specified by {@code pname} for {@code program} - * - * @see Reference Page - */ - public static native void glProgramParameteri(@NativeType("GLuint") int program, @NativeType("GLenum") int pname, @NativeType("GLint") int value); - - // --- [ glUseProgramStages ] --- - - /** - * Binds stages of a program object to a program pipeline. - * - * @param pipeline the program pipeline object to which to bind stages from {@code program} - * @param stages a set of program stages to bind to the program pipeline object - * @param program the program object containing the shader executables to use in {@code pipeline} - * - * @see Reference Page - */ - public static native void glUseProgramStages(@NativeType("GLuint") int pipeline, @NativeType("GLbitfield") int stages, @NativeType("GLuint") int program); - - // --- [ glActiveShaderProgram ] --- - - /** - * Sets the active program object for a program pipeline object. - * - * @param pipeline the program pipeline object to set the active program object for - * @param program the program object to set as the active program pipeline object {@code pipeline} - * - * @see Reference Page - */ - public static native void glActiveShaderProgram(@NativeType("GLuint") int pipeline, @NativeType("GLuint") int program); - - // --- [ glCreateShaderProgramv ] --- - - /** - * Unsafe version of: {@link #glCreateShaderProgramv CreateShaderProgramv} - * - * @param count the number of source code strings in the array {@code strings} - */ - public static native int nglCreateShaderProgramv(int type, int count, long strings); - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * @param strings an array of pointers to source code strings from which to create the program object - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") PointerBuffer strings) { - return nglCreateShaderProgramv(type, strings.remaining(), memAddress(strings)); - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * @param strings an array of pointers to source code strings from which to create the program object - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") CharSequence... strings) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long stringsAddress = APIUtil.apiArray(stack, MemoryUtil::memUTF8, strings); - int __result = nglCreateShaderProgramv(type, strings.length, stringsAddress); - APIUtil.apiArrayFree(stringsAddress, strings.length); - return __result; - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Creates a stand-alone program from an array of null-terminated source code strings. - * - *

    {@code glCreateShaderProgram} is equivalent (assuming no errors are generated) to:

    - * - *
    
    -     * const GLuint shader = glCreateShader(type);
    -     * if (shader) {
    -     *     glShaderSource(shader, count, strings, NULL);
    -     *     glCompileShader(shader);
    -     *     const GLuint program = glCreateProgram();
    -     *     if (program) {
    -     *         GLint compiled = GL_FALSE;
    -     *         glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
    -     *         glProgramParameteri(program, GL_PROGRAM_SEPARABLE, GL_TRUE);
    -     *         if (compiled) {
    -     *             glAttachShader(program, shader);
    -     *             glLinkProgram(program);
    -     *             glDetachShader(program, shader);
    -     *         }
    -     *         // append-shader-info-log-to-program-info-log
    -     *     }
    -     *     glDeleteShader(shader);
    -     *     return program;
    -     * } else {
    -     *     return 0;
    -     * }
    - * - *

    The program object created by glCreateShaderProgram has its GL_PROGRAM_SEPARABLE status set to GL_TRUE.

    - * - * @param type the type of shader to create - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glCreateShaderProgramv(@NativeType("GLenum") int type, @NativeType("GLchar const * const *") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long stringsAddress = APIUtil.apiArray(stack, MemoryUtil::memUTF8, string); - int __result = nglCreateShaderProgramv(type, 1, stringsAddress); - APIUtil.apiArrayFree(stringsAddress, 1); - return __result; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glBindProgramPipeline ] --- - - /** - * Binds a program pipeline to the current context. - * - * @param pipeline the name of the pipeline object to bind to the context - * - * @see Reference Page - */ - public static native void glBindProgramPipeline(@NativeType("GLuint") int pipeline); - - // --- [ glDeleteProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glDeleteProgramPipelines DeleteProgramPipelines} - * - * @param n the number of program pipeline objects to delete - */ - public static native void nglDeleteProgramPipelines(int n, long pipelines); - - /** - * Deletes program pipeline objects. - * - * @param pipelines an array of names of program pipeline objects to delete - * - * @see Reference Page - */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") IntBuffer pipelines) { - nglDeleteProgramPipelines(pipelines.remaining(), memAddress(pipelines)); - } - - /** - * Deletes program pipeline objects. - * - * @see Reference Page - */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") int pipeline) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer pipelines = stack.ints(pipeline); - nglDeleteProgramPipelines(1, memAddress(pipelines)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glGenProgramPipelines GenProgramPipelines} - * - * @param n the number of program pipeline object names to reserve - */ - public static native void nglGenProgramPipelines(int n, long pipelines); - - /** - * Reserves program pipeline object names. - * - * @param pipelines an array of into which the reserved names will be written - * - * @see Reference Page - */ - public static void glGenProgramPipelines(@NativeType("GLuint *") IntBuffer pipelines) { - nglGenProgramPipelines(pipelines.remaining(), memAddress(pipelines)); - } - - /** - * Reserves program pipeline object names. - * - * @see Reference Page - */ - @NativeType("void") - public static int glGenProgramPipelines() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer pipelines = stack.callocInt(1); - nglGenProgramPipelines(1, memAddress(pipelines)); - return pipelines.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsProgramPipeline ] --- - - /** - * Determines if a name corresponds to a program pipeline object. - * - * @param pipeline a value that may be the name of a program pipeline object - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glIsProgramPipeline(@NativeType("GLuint") int pipeline); - - // --- [ glGetProgramPipelineiv ] --- - - /** Unsafe version of: {@link #glGetProgramPipelineiv GetProgramPipelineiv} */ - public static native void nglGetProgramPipelineiv(int pipeline, int pname, long params); - - /** - * Retrieves properties of a program pipeline object. - * - * @param pipeline the name of a program pipeline object whose parameter retrieve - * @param pname the name of the parameter to retrieve. One of:
    {@link #GL_ACTIVE_PROGRAM ACTIVE_PROGRAM}{@link GL20#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}
    {@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}{@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * @param params a variable into which will be written the value or values of {@code pname} for {@code pipeline} - * - * @see Reference Page - */ - public static void glGetProgramPipelineiv(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetProgramPipelineiv(pipeline, pname, memAddress(params)); - } - - /** - * Retrieves properties of a program pipeline object. - * - * @param pipeline the name of a program pipeline object whose parameter retrieve - * @param pname the name of the parameter to retrieve. One of:
    {@link #GL_ACTIVE_PROGRAM ACTIVE_PROGRAM}{@link GL20#GL_INFO_LOG_LENGTH INFO_LOG_LENGTH}{@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}{@link GL20#GL_FRAGMENT_SHADER FRAGMENT_SHADER}{@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}
    {@link GL40#GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}{@link GL40#GL_TESS_EVALUATION_SHADER TESS_EVALUATION_SHADER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgramPipelinei(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetProgramPipelineiv(pipeline, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glProgramUniform1i ] --- - - /** - * Specifies the value of an int uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static native void glProgramUniform1i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x); - - // --- [ glProgramUniform2i ] --- - - /** - * Specifies the value of an ivec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static native void glProgramUniform2i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y); - - // --- [ glProgramUniform3i ] --- - - /** - * Specifies the value of an ivec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static native void glProgramUniform3i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z); - - // --- [ glProgramUniform4i ] --- - - /** - * Specifies the value of an ivec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static native void glProgramUniform4i(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLint") int z, @NativeType("GLint") int w); - - // --- [ glProgramUniform1ui ] --- - - /** - * Specifies the value of a uint uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static native void glProgramUniform1ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x); - - // --- [ glProgramUniform2ui ] --- - - /** - * Specifies the value of a uvec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static native void glProgramUniform2ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y); - - // --- [ glProgramUniform3ui ] --- - - /** - * Specifies the value of a uvec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static native void glProgramUniform3ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y, @NativeType("GLuint") int z); - - // --- [ glProgramUniform4ui ] --- - - /** - * Specifies the value of a uvec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static native void glProgramUniform4ui(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint") int x, @NativeType("GLuint") int y, @NativeType("GLuint") int z, @NativeType("GLuint") int w); - - // --- [ glProgramUniform1f ] --- - - /** - * Specifies the value of a float uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static native void glProgramUniform1f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x); - - // --- [ glProgramUniform2f ] --- - - /** - * Specifies the value of a vec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static native void glProgramUniform2f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y); - - // --- [ glProgramUniform3f ] --- - - /** - * Specifies the value of a vec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static native void glProgramUniform3f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z); - - // --- [ glProgramUniform4f ] --- - - /** - * Specifies the value of a vec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static native void glProgramUniform4f(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z, @NativeType("GLfloat") float w); - - // --- [ glProgramUniform1d ] --- - - /** - * Specifies the value of a double uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * - * @see Reference Page - */ - public static native void glProgramUniform1d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x); - - // --- [ glProgramUniform2d ] --- - - /** - * Specifies the value of a dvec2 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * - * @see Reference Page - */ - public static native void glProgramUniform2d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glProgramUniform3d ] --- - - /** - * Specifies the value of a dvec3 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * - * @see Reference Page - */ - public static native void glProgramUniform3d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glProgramUniform4d ] --- - - /** - * Specifies the value of a dvec4 uniform variable for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param x the uniform x value - * @param y the uniform y value - * @param z the uniform z value - * @param w the uniform w value - * - * @see Reference Page - */ - public static native void glProgramUniform4d(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glProgramUniform1iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1iv ProgramUniform1iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform1iv(int program, int location, int count, long value); - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform1iv(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2iv ProgramUniform2iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform2iv(int program, int location, int count, long value); - - /** - * Specifies the value of a single ivec2 uniform variable or an ivec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform2iv(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3iv ProgramUniform3iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform3iv(int program, int location, int count, long value); - - /** - * Specifies the value of a single ivec3 uniform variable or an ivec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform3iv(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4iv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4iv ProgramUniform4iv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform4iv(int program, int location, int count, long value); - - /** - * Specifies the value of a single ivec4 uniform variable or an ivec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") IntBuffer value) { - nglProgramUniform4iv(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniform1uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1uiv ProgramUniform1uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform1uiv(int program, int location, int count, long value); - - /** - * Specifies the value of a single uint uniform variable or a uint uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform1uiv(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2uiv ProgramUniform2uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform2uiv(int program, int location, int count, long value); - - /** - * Specifies the value of a single uvec2 uniform variable or a uvec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform2uiv(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3uiv ProgramUniform3uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform3uiv(int program, int location, int count, long value); - - /** - * Specifies the value of a single uvec3 uniform variable or a uvec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform3uiv(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4uiv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4uiv ProgramUniform4uiv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform4uiv(int program, int location, int count, long value); - - /** - * Specifies the value of a single uvec4 uniform variable or a uvec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") IntBuffer value) { - nglProgramUniform4uiv(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniform1fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1fv ProgramUniform1fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform1fv(int program, int location, int count, long value); - - /** - * Specifies the value of a single float uniform variable or a float uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform1fv(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2fv ProgramUniform2fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform2fv(int program, int location, int count, long value); - - /** - * Specifies the value of a single vec2 uniform variable or a vec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform2fv(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3fv ProgramUniform3fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform3fv(int program, int location, int count, long value); - - /** - * Specifies the value of a single vec3 uniform variable or a vec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform3fv(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4fv ProgramUniform4fv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform4fv(int program, int location, int count, long value); - - /** - * Specifies the value of a single vec4 uniform variable or a vec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniform4fv(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniform1dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform1dv ProgramUniform1dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform1dv(int program, int location, int count, long value); - - /** - * Specifies the value of a single double uniform variable or a double uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform1dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform1dv(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform2dv ProgramUniform2dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform2dv(int program, int location, int count, long value); - - /** - * Specifies the value of a single dvec2 uniform variable or a dvec2 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform2dv(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform3dv ProgramUniform3dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform3dv(int program, int location, int count, long value); - - /** - * Specifies the value of a single dvec3 uniform variable or a dvec3 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform3dv(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniform4dv ProgramUniform4dv} - * - * @param count the number of elements that are to be modified. This should be 1 if the targeted uniform variable is not an array, and 1 or more if it is an array. - */ - public static native void nglProgramUniform4dv(int program, int location, int count, long value); - - /** - * Specifies the value of a single dvec4 uniform variable or a dvec4 uniform variable array for a specified program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param value an array of {@code count} values that will be used to update the specified uniform variable - * - * @see Reference Page - */ - public static void glProgramUniform4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniform4dv(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2fv ProgramUniformMatrix2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat2 uniform variable or a mat2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix2fv(program, location, value.remaining() >> 2, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3fv ProgramUniformMatrix3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat3 uniform variable or a mat3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix3fv(program, location, value.remaining() / 9, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4fv ProgramUniformMatrix4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat4 uniform variable or a mat4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix4fv(program, location, value.remaining() >> 4, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2dv ProgramUniformMatrix2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat2 uniform variable or a dmat2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix2dv(program, location, value.remaining() >> 2, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3dv ProgramUniformMatrix3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat3 uniform variable or a dmat3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix3dv(program, location, value.remaining() / 9, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4dv ProgramUniformMatrix4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat4 uniform variable or a dmat4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix4dv(program, location, value.remaining() >> 4, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x3fv ProgramUniformMatrix2x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2x3fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat2x3 uniform variable or a mat2x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix2x3fv(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x2fv ProgramUniformMatrix3x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3x2fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat3x2 uniform variable or a mat3x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix3x2fv(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x4fv ProgramUniformMatrix2x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2x4fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat2x4 uniform variable or a mat2x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix2x4fv(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x2fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x2fv ProgramUniformMatrix4x2fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4x2fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat4x2 uniform variable or a mat4x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix4x2fv(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x4fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x4fv ProgramUniformMatrix3x4fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3x4fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat3x4 uniform variable or a mat3x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix3x4fv(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x3fv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x3fv ProgramUniformMatrix4x3fv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4x3fv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single mat4x3 uniform variable or a mat4x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") FloatBuffer value) { - nglProgramUniformMatrix4x3fv(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x3dv ProgramUniformMatrix2x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2x3dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat2x3 uniform variable or a dmat2x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix2x3dv(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x2dv ProgramUniformMatrix3x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3x2dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat3x2 uniform variable or a dmat3x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix3x2dv(program, location, value.remaining() / 6, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix2x4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix2x4dv ProgramUniformMatrix2x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix2x4dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat2x4 uniform variable or a dmat2x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix2x4dv(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x2dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x2dv ProgramUniformMatrix4x2dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4x2dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat4x2 uniform variable or a dmat4x2 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix4x2dv(program, location, value.remaining() >> 3, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix3x4dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix3x4dv ProgramUniformMatrix3x4dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix3x4dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat3x4 uniform variable or a dmat3x4 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix3x4dv(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glProgramUniformMatrix4x3dv ] --- - - /** - * Unsafe version of: {@link #glProgramUniformMatrix4x3dv ProgramUniformMatrix4x3dv} - * - * @param count the number of matrices that are to be modified. This should be 1 if the targeted uniform variable is not an array of matrices, and 1 or more if it is an array of matrices. - */ - public static native void nglProgramUniformMatrix4x3dv(int program, int location, int count, boolean transpose, long value); - - /** - * Specifies the value of a single dmat4x3 uniform variable or a dmat4x3 uniform variable array for the current program object. - * - * @param program the handle of the program containing the uniform variable to be modified - * @param location the location of the uniform variable to be modified - * @param transpose whether to transpose the matrix as the values are loaded into the uniform variable - * @param value an array of {@code count} values that will be used to update the specified uniform matrix variable - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") DoubleBuffer value) { - nglProgramUniformMatrix4x3dv(program, location, value.remaining() / 12, transpose, memAddress(value)); - } - - // --- [ glValidateProgramPipeline ] --- - - /** - * Validates a program pipeline object against current GL state. - * - * @param pipeline the name of a program pipeline object to validate - * - * @see Reference Page - */ - public static native void glValidateProgramPipeline(@NativeType("GLuint") int pipeline); - - // --- [ glGetProgramPipelineInfoLog ] --- - - /** - * Unsafe version of: {@link #glGetProgramPipelineInfoLog GetProgramPipelineInfoLog} - * - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code infoLog} - */ - public static native void nglGetProgramPipelineInfoLog(int pipeline, int bufSize, long length, long infoLog); - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * @param length a variable into which will be written the number of characters written into {@code infoLog} - * @param infoLog an array of characters into which will be written the info log for {@code pipeline} - * - * @see Reference Page - */ - public static void glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer infoLog) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetProgramPipelineInfoLog(pipeline, infoLog.remaining(), memAddressSafe(length), memAddress(infoLog)); - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * @param bufSize the maximum number of characters, including the null terminator, that may be written into {@code infoLog} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @NativeType("GLsizei") int bufSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - ByteBuffer infoLog = memAlloc(bufSize); - try { - IntBuffer length = stack.ints(0); - nglGetProgramPipelineInfoLog(pipeline, bufSize, memAddress(length), memAddress(infoLog)); - return memUTF8(infoLog, length.get(0)); - } finally { - memFree(infoLog); - stack.setPointer(stackPointer); - } - } - - /** - * Retrieves the info log string from a program pipeline object. - * - * @param pipeline the name of a program pipeline object from which to retrieve the info log - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline) { - return glGetProgramPipelineInfoLog(pipeline, glGetProgramPipelinei(pipeline, GL20.GL_INFO_LOG_LENGTH)); - } - - // --- [ glVertexAttribL1d ] --- - - /** - * Specifies the value of a generic vertex attribute. The y and z components are implicitly set to 0.0 and w to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * - * @see Reference Page - */ - public static native void glVertexAttribL1d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x); - - // --- [ glVertexAttribL2d ] --- - - /** - * Specifies the value of a generic vertex attribute. The y component is implicitly set to 0.0 and w to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * - * @see Reference Page - */ - public static native void glVertexAttribL2d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y); - - // --- [ glVertexAttribL3d ] --- - - /** - * Specifies the value of a generic vertex attribute. The w is implicitly set to 1.0. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * - * @see Reference Page - */ - public static native void glVertexAttribL3d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z); - - // --- [ glVertexAttribL4d ] --- - - /** - * Specifies the value of a generic vertex attribute. - * - * @param index the index of the generic vertex attribute to be modified - * @param x the vertex attribute x component - * @param y the vertex attribute y component - * @param z the vertex attribute z component - * @param w the vertex attribute w component - * - * @see Reference Page - */ - public static native void glVertexAttribL4d(@NativeType("GLuint") int index, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z, @NativeType("GLdouble") double w); - - // --- [ glVertexAttribL1dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL1dv VertexAttribL1dv} */ - public static native void nglVertexAttribL1dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribL1d VertexAttribL1d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribL1dv(index, memAddress(v)); - } - - // --- [ glVertexAttribL2dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL2dv VertexAttribL2dv} */ - public static native void nglVertexAttribL2dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribL2d VertexAttribL2d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribL2dv(index, memAddress(v)); - } - - // --- [ glVertexAttribL3dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL3dv VertexAttribL3dv} */ - public static native void nglVertexAttribL3dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribL3d VertexAttribL3d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribL3dv(index, memAddress(v)); - } - - // --- [ glVertexAttribL4dv ] --- - - /** Unsafe version of: {@link #glVertexAttribL4dv VertexAttribL4dv} */ - public static native void nglVertexAttribL4dv(int index, long v); - - /** - * Pointer version of {@link #glVertexAttribL4d VertexAttribL4d}. - * - * @param index the index of the generic vertex attribute to be modified - * @param v the vertex attribute buffer - * - * @see Reference Page - */ - public static void glVertexAttribL4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") DoubleBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribL4dv(index, memAddress(v)); - } - - // --- [ glVertexAttribLPointer ] --- - - /** - * Unsafe version of: {@link #glVertexAttribLPointer VertexAttribLPointer} - * - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - */ - public static native void nglVertexAttribLPointer(int index, int size, int type, int stride, long pointer); - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") ByteBuffer pointer) { - nglVertexAttribLPointer(index, size, type, stride, memAddress(pointer)); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the data type of each component in the array. Must be:
    {@link GL11#GL_DOUBLE DOUBLE}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride, @NativeType("void const *") long pointer) { - nglVertexAttribLPointer(index, size, type, stride, pointer); - } - - /** - * Specifies the location and organization of a 64-bit vertex attribute array. - * - * @param index the index of the generic vertex attribute to be modified - * @param size the number of values per vertex that are stored in the array. The initial value is 4. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex attributes are understood to be tightly packed in - * the array. The initial value is 0. - * @param pointer the vertex attribute data or the offset of the first component of the first generic vertex attribute in the array in the data store of the buffer - * currently bound to the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. - * - * @see Reference Page - */ - public static void glVertexAttribLPointer(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLsizei") int stride, @NativeType("void const *") DoubleBuffer pointer) { - nglVertexAttribLPointer(index, size, GL11.GL_DOUBLE, stride, memAddress(pointer)); - } - - // --- [ glGetVertexAttribLdv ] --- - - /** Unsafe version of: {@link #glGetVertexAttribLdv GetVertexAttribLdv} */ - public static native void nglGetVertexAttribLdv(int index, int pname, long params); - - /** - * Double version of {@link GL20C#glGetVertexAttribiv GetVertexAttribiv}. - * - * @param index the generic vertex attribute parameter to be queried - * @param pname the symbolic name of the vertex attribute parameter to be queried - * @param params the requested data - * - * @see Reference Page - */ - public static void glGetVertexAttribLdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") DoubleBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetVertexAttribLdv(index, pname, memAddress(params)); - } - - // --- [ glViewportArrayv ] --- - - /** - * Unsafe version of: {@link #glViewportArrayv ViewportArrayv} - * - * @param count the number of viewports to set - */ - public static native void nglViewportArrayv(int first, int count, long v); - - /** - * Sets multiple viewports. - * - * @param first the first viewport to set - * @param v an array containing the viewport parameters - * - * @see Reference Page - */ - public static void glViewportArrayv(@NativeType("GLuint") int first, @NativeType("GLfloat const *") FloatBuffer v) { - nglViewportArrayv(first, v.remaining() >> 2, memAddress(v)); - } - - // --- [ glViewportIndexedf ] --- - - /** - * Sets a specified viewport. - * - * @param index the viewport to set - * @param x the left viewport coordinate - * @param y the bottom viewport coordinate - * @param w the viewport width - * @param h the viewport height - * - * @see Reference Page - */ - public static native void glViewportIndexedf(@NativeType("GLuint") int index, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float w, @NativeType("GLfloat") float h); - - // --- [ glViewportIndexedfv ] --- - - /** Unsafe version of: {@link #glViewportIndexedfv ViewportIndexedfv} */ - public static native void nglViewportIndexedfv(int index, long v); - - /** - * Pointer version of {@link #glViewportIndexedf ViewportIndexedf}. - * - * @param index the viewport to set - * @param v the viewport parameters - * - * @see Reference Page - */ - public static void glViewportIndexedfv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") FloatBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglViewportIndexedfv(index, memAddress(v)); - } - - // --- [ glScissorArrayv ] --- - - /** - * Unsafe version of: {@link #glScissorArrayv ScissorArrayv} - * - * @param count the number of scissor boxes to modify - */ - public static native void nglScissorArrayv(int first, int count, long v); - - /** - * Defines the scissor box for multiple viewports. - * - * @param first the index of the first viewport whose scissor box to modify - * @param v an array containing the left, bottom, width and height of each scissor box, in that order - * - * @see Reference Page - */ - public static void glScissorArrayv(@NativeType("GLuint") int first, @NativeType("GLint const *") IntBuffer v) { - nglScissorArrayv(first, v.remaining() >> 2, memAddress(v)); - } - - // --- [ glScissorIndexed ] --- - - /** - * Defines the scissor box for a specific viewport. - * - * @param index the index of the viewport whose scissor box to modify - * @param left the left scissor box coordinate - * @param bottom the bottom scissor box coordinate - * @param width the scissor box width - * @param height the scissor box height - * - * @see Reference Page - */ - public static native void glScissorIndexed(@NativeType("GLuint") int index, @NativeType("GLint") int left, @NativeType("GLint") int bottom, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glScissorIndexedv ] --- - - /** Unsafe version of: {@link #glScissorIndexedv ScissorIndexedv} */ - public static native void nglScissorIndexedv(int index, long v); - - /** - * Pointer version of {@link #glScissorIndexed ScissorIndexed}. - * - * @param index the index of the viewport whose scissor box to modify - * @param v an array containing the left, bottom, width and height of each scissor box, in that order - * - * @see Reference Page - */ - public static void glScissorIndexedv(@NativeType("GLuint") int index, @NativeType("GLint const *") IntBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglScissorIndexedv(index, memAddress(v)); - } - - // --- [ glDepthRangeArrayv ] --- - - /** - * Unsafe version of: {@link #glDepthRangeArrayv DepthRangeArrayv} - * - * @param count the number of viewports whose depth range to update - */ - public static native void nglDepthRangeArrayv(int first, int count, long v); - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified set of viewports. - * - * @param first the index of the first viewport whose depth range to update - * @param v n array containing the near and far values for the depth range of each modified viewport - * - * @see Reference Page - */ - public static void glDepthRangeArrayv(@NativeType("GLuint") int first, @NativeType("GLdouble const *") DoubleBuffer v) { - nglDepthRangeArrayv(first, v.remaining() >> 1, memAddress(v)); - } - - // --- [ glDepthRangeIndexed ] --- - - /** - * Specifies mapping of depth values from normalized device coordinates to window coordinates for a specified viewport. - * - * @param index the index of the viewport whose depth range to update - * @param zNear the mapping of the near clipping plane to window coordinates. The initial value is 0. - * @param zFar the mapping of the far clipping plane to window coordinates. The initial value is 1. - * - * @see Reference Page - */ - public static native void glDepthRangeIndexed(@NativeType("GLuint") int index, @NativeType("GLdouble") double zNear, @NativeType("GLdouble") double zFar); - - // --- [ glGetFloati_v ] --- - - /** Unsafe version of: {@link #glGetFloati_v GetFloati_v} */ - public static native void nglGetFloati_v(int target, int index, long data); - - /** - * Queries the float value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetFloati_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetFloati_v(target, index, memAddress(data)); - } - - /** - * Queries the float value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetFloati(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer data = stack.callocFloat(1); - nglGetFloati_v(target, index, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetDoublei_v ] --- - - /** Unsafe version of: {@link #glGetDoublei_v GetDoublei_v} */ - public static native void nglGetDoublei_v(int target, int index, long data); - - /** - * Queries the double value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * @param data a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetDoublei_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") DoubleBuffer data) { - if (CHECKS) { - check(data, 1); - } - nglGetDoublei_v(target, index, memAddress(data)); - } - - /** - * Queries the double value of an indexed state variable. - * - * @param target the indexed state to query - * @param index the index of the element being queried - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetDoublei(@NativeType("GLenum") int target, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer data = stack.callocDouble(1); - nglGetDoublei_v(target, index, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Array version of: {@link #glShaderBinary ShaderBinary} - * - * @see Reference Page - */ - public static void glShaderBinary(@NativeType("GLuint const *") int[] shaders, @NativeType("GLenum") int binaryformat, @NativeType("void const *") ByteBuffer binary) { - long __functionAddress = GL.getICD().glShaderBinary; - if (CHECKS) { - check(__functionAddress); - } - callPPV(shaders.length, shaders, binaryformat, memAddress(binary), binary.remaining(), __functionAddress); - } - - /** - * Array version of: {@link #glGetShaderPrecisionFormat GetShaderPrecisionFormat} - * - * @see Reference Page - */ - public static void glGetShaderPrecisionFormat(@NativeType("GLenum") int shadertype, @NativeType("GLenum") int precisiontype, @NativeType("GLint *") int[] range, @NativeType("GLint *") int[] precision) { - long __functionAddress = GL.getICD().glGetShaderPrecisionFormat; - if (CHECKS) { - check(__functionAddress); - check(range, 2); - check(precision, 1); - } - callPPV(shadertype, precisiontype, range, precision, __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramBinary GetProgramBinary} - * - * @see Reference Page - */ - public static void glGetProgramBinary(@NativeType("GLuint") int program, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLenum *") int[] binaryFormat, @NativeType("void *") ByteBuffer binary) { - long __functionAddress = GL.getICD().glGetProgramBinary; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(binaryFormat, 1); - } - callPPPV(program, binary.remaining(), length, binaryFormat, memAddress(binary), __functionAddress); - } - - /** - * Array version of: {@link #glDeleteProgramPipelines DeleteProgramPipelines} - * - * @see Reference Page - */ - public static void glDeleteProgramPipelines(@NativeType("GLuint const *") int[] pipelines) { - long __functionAddress = GL.getICD().glDeleteProgramPipelines; - if (CHECKS) { - check(__functionAddress); - } - callPV(pipelines.length, pipelines, __functionAddress); - } - - /** - * Array version of: {@link #glGenProgramPipelines GenProgramPipelines} - * - * @see Reference Page - */ - public static void glGenProgramPipelines(@NativeType("GLuint *") int[] pipelines) { - long __functionAddress = GL.getICD().glGenProgramPipelines; - if (CHECKS) { - check(__functionAddress); - } - callPV(pipelines.length, pipelines, __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramPipelineiv GetProgramPipelineiv} - * - * @see Reference Page - */ - public static void glGetProgramPipelineiv(@NativeType("GLuint") int pipeline, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetProgramPipelineiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pipeline, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform1iv ProgramUniform1iv} - * - * @see Reference Page - */ - public static void glProgramUniform1iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform1iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform2iv ProgramUniform2iv} - * - * @see Reference Page - */ - public static void glProgramUniform2iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform2iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform3iv ProgramUniform3iv} - * - * @see Reference Page - */ - public static void glProgramUniform3iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform3iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform4iv ProgramUniform4iv} - * - * @see Reference Page - */ - public static void glProgramUniform4iv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform4iv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform1uiv ProgramUniform1uiv} - * - * @see Reference Page - */ - public static void glProgramUniform1uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform1uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform2uiv ProgramUniform2uiv} - * - * @see Reference Page - */ - public static void glProgramUniform2uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform2uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform3uiv ProgramUniform3uiv} - * - * @see Reference Page - */ - public static void glProgramUniform3uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform3uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform4uiv ProgramUniform4uiv} - * - * @see Reference Page - */ - public static void glProgramUniform4uiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint const *") int[] value) { - long __functionAddress = GL.getICD().glProgramUniform4uiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform1fv ProgramUniform1fv} - * - * @see Reference Page - */ - public static void glProgramUniform1fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform1fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform2fv ProgramUniform2fv} - * - * @see Reference Page - */ - public static void glProgramUniform2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform3fv ProgramUniform3fv} - * - * @see Reference Page - */ - public static void glProgramUniform3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform4fv ProgramUniform4fv} - * - * @see Reference Page - */ - public static void glProgramUniform4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniform4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform1dv ProgramUniform1dv} - * - * @see Reference Page - */ - public static void glProgramUniform1dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform1dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform2dv ProgramUniform2dv} - * - * @see Reference Page - */ - public static void glProgramUniform2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform3dv ProgramUniform3dv} - * - * @see Reference Page - */ - public static void glProgramUniform3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniform4dv ProgramUniform4dv} - * - * @see Reference Page - */ - public static void glProgramUniform4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniform4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2fv ProgramUniformMatrix2fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3fv ProgramUniformMatrix3fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 9, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4fv ProgramUniformMatrix4fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 4, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2dv ProgramUniformMatrix2dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3dv ProgramUniformMatrix3dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 9, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4dv ProgramUniformMatrix4dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 4, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x3fv ProgramUniformMatrix2x3fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x2fv ProgramUniformMatrix3x2fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x4fv ProgramUniformMatrix2x4fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x2fv ProgramUniformMatrix4x2fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x2fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x4fv ProgramUniformMatrix3x4fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x4fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x3fv ProgramUniformMatrix4x3fv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3fv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x3fv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x3dv ProgramUniformMatrix2x3dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x2dv ProgramUniformMatrix3x2dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 6, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix2x4dv ProgramUniformMatrix2x4dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix2x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix2x4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x2dv ProgramUniformMatrix4x2dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x2dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x2dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 3, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix3x4dv ProgramUniformMatrix3x4dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix3x4dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix3x4dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glProgramUniformMatrix4x3dv ProgramUniformMatrix4x3dv} - * - * @see Reference Page - */ - public static void glProgramUniformMatrix4x3dv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLboolean") boolean transpose, @NativeType("GLdouble const *") double[] value) { - long __functionAddress = GL.getICD().glProgramUniformMatrix4x3dv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 12, transpose, value, __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramPipelineInfoLog GetProgramPipelineInfoLog} - * - * @see Reference Page - */ - public static void glGetProgramPipelineInfoLog(@NativeType("GLuint") int pipeline, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer infoLog) { - long __functionAddress = GL.getICD().glGetProgramPipelineInfoLog; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(pipeline, infoLog.remaining(), length, memAddress(infoLog), __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribL1dv VertexAttribL1dv} - * - * @see Reference Page - */ - public static void glVertexAttribL1dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL1dv; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribL2dv VertexAttribL2dv} - * - * @see Reference Page - */ - public static void glVertexAttribL2dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL2dv; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribL3dv VertexAttribL3dv} - * - * @see Reference Page - */ - public static void glVertexAttribL3dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL3dv; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glVertexAttribL4dv VertexAttribL4dv} - * - * @see Reference Page - */ - public static void glVertexAttribL4dv(@NativeType("GLuint") int index, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glVertexAttribL4dv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexAttribLdv GetVertexAttribLdv} - * - * @see Reference Page - */ - public static void glGetVertexAttribLdv(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribLdv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(index, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glViewportArrayv ViewportArrayv} - * - * @see Reference Page - */ - public static void glViewportArrayv(@NativeType("GLuint") int first, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glViewportArrayv; - if (CHECKS) { - check(__functionAddress); - } - callPV(first, v.length >> 2, v, __functionAddress); - } - - /** - * Array version of: {@link #glViewportIndexedfv ViewportIndexedfv} - * - * @see Reference Page - */ - public static void glViewportIndexedfv(@NativeType("GLuint") int index, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glViewportIndexedfv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glScissorArrayv ScissorArrayv} - * - * @see Reference Page - */ - public static void glScissorArrayv(@NativeType("GLuint") int first, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glScissorArrayv; - if (CHECKS) { - check(__functionAddress); - } - callPV(first, v.length >> 2, v, __functionAddress); - } - - /** - * Array version of: {@link #glScissorIndexedv ScissorIndexedv} - * - * @see Reference Page - */ - public static void glScissorIndexedv(@NativeType("GLuint") int index, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glScissorIndexedv; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** - * Array version of: {@link #glDepthRangeArrayv DepthRangeArrayv} - * - * @see Reference Page - */ - public static void glDepthRangeArrayv(@NativeType("GLuint") int first, @NativeType("GLdouble const *") double[] v) { - long __functionAddress = GL.getICD().glDepthRangeArrayv; - if (CHECKS) { - check(__functionAddress); - } - callPV(first, v.length >> 1, v, __functionAddress); - } - - /** - * Array version of: {@link #glGetFloati_v GetFloati_v} - * - * @see Reference Page - */ - public static void glGetFloati_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetFloati_v; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(target, index, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetDoublei_v GetDoublei_v} - * - * @see Reference Page - */ - public static void glGetDoublei_v(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLdouble *") double[] data) { - long __functionAddress = GL.getICD().glGetDoublei_v; - if (CHECKS) { - check(__functionAddress); - check(data, 1); - } - callPV(target, index, data, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL42.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL42.java deleted file mode 100644 index 381bd58d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL42.java +++ /dev/null @@ -1,610 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 4.2. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 4.2 implementations support revision 4.20 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL42 extends GL41 { - - static { GL.initialize(); } - - /** Renamed tokens. */ - public static final int - GL_COPY_READ_BUFFER_BINDING = GL31.GL_COPY_READ_BUFFER, - GL_COPY_WRITE_BUFFER_BINDING = GL31.GL_COPY_WRITE_BUFFER, - GL_TRANSFORM_FEEDBACK_ACTIVE = GL40.GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, - GL_TRANSFORM_FEEDBACK_PAUSED = GL40.GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED; - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, TexImage3D, CopyTexImage2D, CopyTexImage3D, CompressedTexImage2D, and - * CompressedTexImage3D and the {@code format} parameter of CompressedTexSubImage2D and CompressedTexSubImage3D. - */ - public static final int - GL_COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C, - GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D, - GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E, - GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F; - - /** Accepted by the {@code pname} parameter of PixelStore[fi], GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, - GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, - GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, - GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, - GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, - GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, - GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, - GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; - - /** Accepted by the {@code target} parameter of BindBufferBase and BindBufferRange. */ - public static final int GL_ATOMIC_COUNTER_BUFFER = 0x92C0; - - /** - * Accepted by the {@code pname} parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, - * GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv. - */ - public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; - - /** Accepted by the {@code pname} parameter of GetIntegeri_64v. */ - public static final int - GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, - GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; - - /** Accepted by the {@code pname} parameter of GetActiveAtomicCounterBufferiv. */ - public static final int - GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, - GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, - GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, - GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, - GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, - GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, - GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, - GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, - GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, - GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, - GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, - GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, - GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, - GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, - GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, - GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; - - /** Accepted by the {@code pname} parameter of GetActiveUniformsiv. */ - public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; - - /** Returned in {@code params} by GetActiveUniform and GetActiveUniformsiv. */ - public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; - - /** Accepted by the {@code value} parameter of GetTexParameter{if}v. */ - public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_IMAGE_UNITS = 0x8F38, - GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, - GL_MAX_IMAGE_SAMPLES = 0x906D, - GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, - GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, - GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, - GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, - GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, - GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; - - /** Accepted by the {@code target} parameter of GetIntegeri_v and GetBooleani_v. */ - public static final int - GL_IMAGE_BINDING_NAME = 0x8F3A, - GL_IMAGE_BINDING_LEVEL = 0x8F3B, - GL_IMAGE_BINDING_LAYERED = 0x8F3C, - GL_IMAGE_BINDING_LAYER = 0x8F3D, - GL_IMAGE_BINDING_ACCESS = 0x8F3E, - GL_IMAGE_BINDING_FORMAT = 0x906E; - - /** Accepted by the {@code barriers} parameter of MemoryBarrier. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x1, - GL_ELEMENT_ARRAY_BARRIER_BIT = 0x2, - GL_UNIFORM_BARRIER_BIT = 0x4, - GL_TEXTURE_FETCH_BARRIER_BIT = 0x8, - GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x20, - GL_COMMAND_BARRIER_BIT = 0x40, - GL_PIXEL_BUFFER_BARRIER_BIT = 0x80, - GL_TEXTURE_UPDATE_BARRIER_BIT = 0x100, - GL_BUFFER_UPDATE_BARRIER_BIT = 0x200, - GL_FRAMEBUFFER_BARRIER_BIT = 0x400, - GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x800, - GL_ATOMIC_COUNTER_BARRIER_BIT = 0x1000, - GL_ALL_BARRIER_BITS = 0xFFFFFFFF; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_IMAGE_1D = 0x904C, - GL_IMAGE_2D = 0x904D, - GL_IMAGE_3D = 0x904E, - GL_IMAGE_2D_RECT = 0x904F, - GL_IMAGE_CUBE = 0x9050, - GL_IMAGE_BUFFER = 0x9051, - GL_IMAGE_1D_ARRAY = 0x9052, - GL_IMAGE_2D_ARRAY = 0x9053, - GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, - GL_IMAGE_2D_MULTISAMPLE = 0x9055, - GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, - GL_INT_IMAGE_1D = 0x9057, - GL_INT_IMAGE_2D = 0x9058, - GL_INT_IMAGE_3D = 0x9059, - GL_INT_IMAGE_2D_RECT = 0x905A, - GL_INT_IMAGE_CUBE = 0x905B, - GL_INT_IMAGE_BUFFER = 0x905C, - GL_INT_IMAGE_1D_ARRAY = 0x905D, - GL_INT_IMAGE_2D_ARRAY = 0x905E, - GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, - GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, - GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, - GL_UNSIGNED_INT_IMAGE_1D = 0x9062, - GL_UNSIGNED_INT_IMAGE_2D = 0x9063, - GL_UNSIGNED_INT_IMAGE_3D = 0x9064, - GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, - GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, - GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, - GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, - GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, - GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; - - /** Accepted by the {@code value} parameter of GetTexParameteriv, GetTexParameterfv, GetTexParameterIiv, and GetTexParameterIuiv. */ - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; - - /** - * Returned in the {@code data} parameter of GetTexParameteriv, GetTexParameterfv, GetTexParameterIiv, and GetTexParameterIuiv when {@code value} is - * IMAGE_FORMAT_COMPATIBILITY_TYPE. - */ - public static final int - GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, - GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; - - /** Accepted by the {@code pname} parameter of GetInternalformativ. */ - public static final int GL_NUM_SAMPLE_COUNTS = 0x9380; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; - - protected GL42() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetActiveAtomicCounterBufferiv ] --- - - /** Unsafe version of: {@link #glGetActiveAtomicCounterBufferiv GetActiveAtomicCounterBufferiv} */ - public static void nglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, long params) { - GL42C.nglGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); - } - - /** - * Obtains information about the set of active atomic counter buffers for a program. - * - * @param program the name of a program object for which the command {@link GL20C#glLinkProgram LinkProgram} has been issued in the past - * @param bufferIndex the index of an active atomic counter buffer - * @param pname the parameter to query. One of:
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE ATOMIC_COUNTER_BUFFER_DATA_SIZE}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}
    - * @param params a buffer in which to place the returned value - * - * @see Reference Page - */ - public static void glGetActiveAtomicCounterBufferiv(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL42C.glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); - } - - /** - * Obtains information about the set of active atomic counter buffers for a program. - * - * @param program the name of a program object for which the command {@link GL20C#glLinkProgram LinkProgram} has been issued in the past - * @param bufferIndex the index of an active atomic counter buffer - * @param pname the parameter to query. One of:
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE ATOMIC_COUNTER_BUFFER_DATA_SIZE}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}
    {@link GL42C#GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveAtomicCounterBufferi(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname) { - return GL42C.glGetActiveAtomicCounterBufferi(program, bufferIndex, pname); - } - - // --- [ glTexStorage1D ] --- - - /** - * Simultaneously specifies storage for all levels of a one-dimensional texture. - * - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * - * @see Reference Page - */ - public static void glTexStorage1D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width) { - GL42C.glTexStorage1D(target, levels, internalformat, width); - } - - // --- [ glTexStorage2D ] --- - - /** - * Simultaneously specifies storage for all levels of a two-dimensional or one-dimensional array texture. - * - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * - * @see Reference Page - */ - public static void glTexStorage2D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL42C.glTexStorage2D(target, levels, internalformat, width, height); - } - - // --- [ glTexStorage3D ] --- - - /** - * Simultaneously specifies storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture. - * - * @param target the target of the operation. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * - * @see Reference Page - */ - public static void glTexStorage3D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - GL42C.glTexStorage3D(target, levels, internalformat, width, height, depth); - } - - // --- [ glDrawTransformFeedbackInstanced ] --- - - /** - * Renders multiple instances of primitives using a count derived from a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param primcount the number of instances of the geometry to render - * - * @see Reference Page - */ - public static void glDrawTransformFeedbackInstanced(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLsizei") int primcount) { - GL42C.glDrawTransformFeedbackInstanced(mode, id, primcount); - } - - // --- [ glDrawTransformFeedbackStreamInstanced ] --- - - /** - * Renders multiple instances of primitives using a count derived from a specifed stream of a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param stream the index of the transform feedback stream from which to retrieve a primitive count - * @param primcount the number of instances of the geometry to render - * - * @see Reference Page - */ - public static void glDrawTransformFeedbackStreamInstanced(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLuint") int stream, @NativeType("GLsizei") int primcount) { - GL42C.glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); - } - - // --- [ glDrawArraysInstancedBaseInstance ] --- - - /** - * Draws multiple instances of a range of elements with an offset applied to instanced attributes. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param first the starting index in the enabled arrays - * @param count the number of indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawArraysInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); - } - - // --- [ glDrawElementsInstancedBaseInstance ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseInstance DrawElementsInstancedBaseInstance} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsInstancedBaseInstance(int mode, int count, int type, long indices, int primcount, int baseinstance) { - GL42C.nglDrawElementsInstancedBaseInstance(mode, count, type, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, count, type, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, type, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - // --- [ glDrawElementsInstancedBaseVertexBaseInstance ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static void nglDrawElementsInstancedBaseVertexBaseInstance(int mode, int count, int type, long indices, int primcount, int basevertex, int baseinstance) { - GL42C.nglDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, type, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - GL42C.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); - } - - // --- [ glBindImageTexture ] --- - - /** - * Binds a level of a texture to an image unit. - * - * @param unit the index of the image unit to which to bind the texture - * @param texture the name of the texture to bind to the image unit - * @param level the level of the texture that is to be bound - * @param layered whether a layered texture binding is to be established - * @param layer if {@code layered} is false, specifies the layer of texture to be bound to the image unit. Ignored otherwise. - * @param access a token indicating the type of access that will be performed on the image - * @param format the format that the elements of the image will be treated as for the purposes of formatted stores - * - * @see Reference Page - */ - public static void glBindImageTexture(@NativeType("GLuint") int unit, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLboolean") boolean layered, @NativeType("GLint") int layer, @NativeType("GLenum") int access, @NativeType("GLenum") int format) { - GL42C.glBindImageTexture(unit, texture, level, layered, layer, access, format); - } - - // --- [ glMemoryBarrier ] --- - - /** - * Defines a barrier ordering memory transactions. - * - * @param barriers the barriers to insert (bitwise combination). One or more of:
    {@link GL42C#GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT VERTEX_ATTRIB_ARRAY_BARRIER_BIT}{@link GL42C#GL_ELEMENT_ARRAY_BARRIER_BIT ELEMENT_ARRAY_BARRIER_BIT}{@link GL42C#GL_UNIFORM_BARRIER_BIT UNIFORM_BARRIER_BIT}
    {@link GL42C#GL_TEXTURE_FETCH_BARRIER_BIT TEXTURE_FETCH_BARRIER_BIT}{@link GL42C#GL_SHADER_IMAGE_ACCESS_BARRIER_BIT SHADER_IMAGE_ACCESS_BARRIER_BIT}{@link GL42C#GL_COMMAND_BARRIER_BIT COMMAND_BARRIER_BIT}
    {@link GL42C#GL_PIXEL_BUFFER_BARRIER_BIT PIXEL_BUFFER_BARRIER_BIT}{@link GL42C#GL_TEXTURE_UPDATE_BARRIER_BIT TEXTURE_UPDATE_BARRIER_BIT}{@link GL42C#GL_BUFFER_UPDATE_BARRIER_BIT BUFFER_UPDATE_BARRIER_BIT}
    {@link GL42C#GL_FRAMEBUFFER_BARRIER_BIT FRAMEBUFFER_BARRIER_BIT}{@link GL42C#GL_TRANSFORM_FEEDBACK_BARRIER_BIT TRANSFORM_FEEDBACK_BARRIER_BIT}{@link GL42C#GL_ATOMIC_COUNTER_BARRIER_BIT ATOMIC_COUNTER_BARRIER_BIT}
    {@link GL42C#GL_ALL_BARRIER_BITS ALL_BARRIER_BITS}{@link GL43#GL_SHADER_STORAGE_BARRIER_BIT SHADER_STORAGE_BARRIER_BIT}
    - * - * @see Reference Page - */ - public static void glMemoryBarrier(@NativeType("GLbitfield") int barriers) { - GL42C.glMemoryBarrier(barriers); - } - - // --- [ glGetInternalformativ ] --- - - /** - * Unsafe version of: {@link #glGetInternalformativ GetInternalformativ} - * - * @param bufSize the maximum number of values that may be written to params by the function - */ - public static void nglGetInternalformativ(int target, int internalformat, int pname, int bufSize, long params) { - GL42C.nglGetInternalformativ(target, internalformat, pname, bufSize, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * @param params a variable into which to write the retrieved information - * - * @see Reference Page - */ - public static void glGetInternalformativ(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL42C.glGetInternalformativ(target, internalformat, pname, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetInternalformati(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname) { - return GL42C.glGetInternalformati(target, internalformat, pname); - } - - /** - * Array version of: {@link #glGetActiveAtomicCounterBufferiv GetActiveAtomicCounterBufferiv} - * - * @see Reference Page - */ - public static void glGetActiveAtomicCounterBufferiv(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL42C.glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); - } - - /** - * Array version of: {@link #glGetInternalformativ GetInternalformativ} - * - * @see Reference Page - */ - public static void glGetInternalformativ(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL42C.glGetInternalformativ(target, internalformat, pname, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL42C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL42C.java deleted file mode 100644 index 6cd3d423..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL42C.java +++ /dev/null @@ -1,617 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.2. Includes only Core Profile symbols. - * - *

    OpenGL 4.2 implementations support revision 4.20 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL42C extends GL41C { - - static { GL.initialize(); } - - /** Renamed tokens. */ - public static final int - GL_COPY_READ_BUFFER_BINDING = GL31.GL_COPY_READ_BUFFER, - GL_COPY_WRITE_BUFFER_BINDING = GL31.GL_COPY_WRITE_BUFFER, - GL_TRANSFORM_FEEDBACK_ACTIVE = GL40.GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, - GL_TRANSFORM_FEEDBACK_PAUSED = GL40.GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED; - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, TexImage3D, CopyTexImage2D, CopyTexImage3D, CompressedTexImage2D, and - * CompressedTexImage3D and the {@code format} parameter of CompressedTexSubImage2D and CompressedTexSubImage3D. - */ - public static final int - GL_COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C, - GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D, - GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E, - GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F; - - /** Accepted by the {@code pname} parameter of PixelStore[fi], GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, - GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, - GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, - GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, - GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, - GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, - GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, - GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; - - /** Accepted by the {@code target} parameter of BindBufferBase and BindBufferRange. */ - public static final int GL_ATOMIC_COUNTER_BUFFER = 0x92C0; - - /** - * Accepted by the {@code pname} parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, - * GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv. - */ - public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; - - /** Accepted by the {@code pname} parameter of GetIntegeri_64v. */ - public static final int - GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, - GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; - - /** Accepted by the {@code pname} parameter of GetActiveAtomicCounterBufferiv. */ - public static final int - GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, - GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, - GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, - GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, - GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, - GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, - GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, - GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, - GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, - GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, - GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, - GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, - GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, - GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, - GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, - GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; - - /** Accepted by the {@code pname} parameter of GetActiveUniformsiv. */ - public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; - - /** Returned in {@code params} by GetActiveUniform and GetActiveUniformsiv. */ - public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; - - /** Accepted by the {@code value} parameter of GetTexParameter{if}v. */ - public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int - GL_MAX_IMAGE_UNITS = 0x8F38, - GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, - GL_MAX_IMAGE_SAMPLES = 0x906D, - GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, - GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, - GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, - GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, - GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, - GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; - - /** Accepted by the {@code target} parameter of GetIntegeri_v and GetBooleani_v. */ - public static final int - GL_IMAGE_BINDING_NAME = 0x8F3A, - GL_IMAGE_BINDING_LEVEL = 0x8F3B, - GL_IMAGE_BINDING_LAYERED = 0x8F3C, - GL_IMAGE_BINDING_LAYER = 0x8F3D, - GL_IMAGE_BINDING_ACCESS = 0x8F3E, - GL_IMAGE_BINDING_FORMAT = 0x906E; - - /** Accepted by the {@code barriers} parameter of MemoryBarrier. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x1, - GL_ELEMENT_ARRAY_BARRIER_BIT = 0x2, - GL_UNIFORM_BARRIER_BIT = 0x4, - GL_TEXTURE_FETCH_BARRIER_BIT = 0x8, - GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x20, - GL_COMMAND_BARRIER_BIT = 0x40, - GL_PIXEL_BUFFER_BARRIER_BIT = 0x80, - GL_TEXTURE_UPDATE_BARRIER_BIT = 0x100, - GL_BUFFER_UPDATE_BARRIER_BIT = 0x200, - GL_FRAMEBUFFER_BARRIER_BIT = 0x400, - GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x800, - GL_ATOMIC_COUNTER_BARRIER_BIT = 0x1000, - GL_ALL_BARRIER_BITS = 0xFFFFFFFF; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_IMAGE_1D = 0x904C, - GL_IMAGE_2D = 0x904D, - GL_IMAGE_3D = 0x904E, - GL_IMAGE_2D_RECT = 0x904F, - GL_IMAGE_CUBE = 0x9050, - GL_IMAGE_BUFFER = 0x9051, - GL_IMAGE_1D_ARRAY = 0x9052, - GL_IMAGE_2D_ARRAY = 0x9053, - GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, - GL_IMAGE_2D_MULTISAMPLE = 0x9055, - GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, - GL_INT_IMAGE_1D = 0x9057, - GL_INT_IMAGE_2D = 0x9058, - GL_INT_IMAGE_3D = 0x9059, - GL_INT_IMAGE_2D_RECT = 0x905A, - GL_INT_IMAGE_CUBE = 0x905B, - GL_INT_IMAGE_BUFFER = 0x905C, - GL_INT_IMAGE_1D_ARRAY = 0x905D, - GL_INT_IMAGE_2D_ARRAY = 0x905E, - GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, - GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, - GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, - GL_UNSIGNED_INT_IMAGE_1D = 0x9062, - GL_UNSIGNED_INT_IMAGE_2D = 0x9063, - GL_UNSIGNED_INT_IMAGE_3D = 0x9064, - GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, - GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, - GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, - GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, - GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, - GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, - GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; - - /** Accepted by the {@code value} parameter of GetTexParameteriv, GetTexParameterfv, GetTexParameterIiv, and GetTexParameterIuiv. */ - public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; - - /** - * Returned in the {@code data} parameter of GetTexParameteriv, GetTexParameterfv, GetTexParameterIiv, and GetTexParameterIuiv when {@code value} is - * IMAGE_FORMAT_COMPATIBILITY_TYPE. - */ - public static final int - GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, - GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; - - /** Accepted by the {@code pname} parameter of GetInternalformativ. */ - public static final int GL_NUM_SAMPLE_COUNTS = 0x9380; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; - - protected GL42C() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetActiveAtomicCounterBufferiv ] --- - - /** Unsafe version of: {@link #glGetActiveAtomicCounterBufferiv GetActiveAtomicCounterBufferiv} */ - public static native void nglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, long params); - - /** - * Obtains information about the set of active atomic counter buffers for a program. - * - * @param program the name of a program object for which the command {@link GL20C#glLinkProgram LinkProgram} has been issued in the past - * @param bufferIndex the index of an active atomic counter buffer - * @param pname the parameter to query. One of:
    {@link #GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE ATOMIC_COUNTER_BUFFER_DATA_SIZE}
    {@link #GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}
    {@link #GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}
    - * @param params a buffer in which to place the returned value - * - * @see Reference Page - */ - public static void glGetActiveAtomicCounterBufferiv(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, memAddress(params)); - } - - /** - * Obtains information about the set of active atomic counter buffers for a program. - * - * @param program the name of a program object for which the command {@link GL20C#glLinkProgram LinkProgram} has been issued in the past - * @param bufferIndex the index of an active atomic counter buffer - * @param pname the parameter to query. One of:
    {@link #GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE ATOMIC_COUNTER_BUFFER_DATA_SIZE}
    {@link #GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS}
    {@link #GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER}
    {@link #GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetActiveAtomicCounterBufferi(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTexStorage1D ] --- - - /** - * Simultaneously specifies storage for all levels of a one-dimensional texture. - * - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_PROXY_TEXTURE_1D PROXY_TEXTURE_1D}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * - * @see Reference Page - */ - public static native void glTexStorage1D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width); - - // --- [ glTexStorage2D ] --- - - /** - * Simultaneously specifies storage for all levels of a two-dimensional or one-dimensional array texture. - * - * @param target the target of the operation. One of:
    {@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL11#GL_PROXY_TEXTURE_2D PROXY_TEXTURE_2D}{@link GL30#GL_PROXY_TEXTURE_1D_ARRAY PROXY_TEXTURE_1D_ARRAY}{@link GL31#GL_PROXY_TEXTURE_RECTANGLE PROXY_TEXTURE_RECTANGLE}{@link GL13#GL_PROXY_TEXTURE_CUBE_MAP PROXY_TEXTURE_CUBE_MAP}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * - * @see Reference Page - */ - public static native void glTexStorage2D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glTexStorage3D ] --- - - /** - * Simultaneously specifies storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture. - * - * @param target the target of the operation. One of:
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL12#GL_PROXY_TEXTURE_3D PROXY_TEXTURE_3D}
    {@link GL30#GL_PROXY_TEXTURE_2D_ARRAY PROXY_TEXTURE_2D_ARRAY}{@link GL40#GL_PROXY_TEXTURE_CUBE_MAP_ARRAY PROXY_TEXTURE_CUBE_MAP_ARRAY}
    - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * - * @see Reference Page - */ - public static native void glTexStorage3D(@NativeType("GLenum") int target, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth); - - // --- [ glDrawTransformFeedbackInstanced ] --- - - /** - * Renders multiple instances of primitives using a count derived from a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param primcount the number of instances of the geometry to render - * - * @see Reference Page - */ - public static native void glDrawTransformFeedbackInstanced(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLsizei") int primcount); - - // --- [ glDrawTransformFeedbackStreamInstanced ] --- - - /** - * Renders multiple instances of primitives using a count derived from a specifed stream of a transform feedback object. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param id the name of a transform feedback object from which to retrieve a primitive count - * @param stream the index of the transform feedback stream from which to retrieve a primitive count - * @param primcount the number of instances of the geometry to render - * - * @see Reference Page - */ - public static native void glDrawTransformFeedbackStreamInstanced(@NativeType("GLenum") int mode, @NativeType("GLuint") int id, @NativeType("GLuint") int stream, @NativeType("GLsizei") int primcount); - - // --- [ glDrawArraysInstancedBaseInstance ] --- - - /** - * Draws multiple instances of a range of elements with an offset applied to instanced attributes. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param first the starting index in the enabled arrays - * @param count the number of indices to be rendered - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static native void glDrawArraysInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLint") int first, @NativeType("GLsizei") int count, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance); - - // --- [ glDrawElementsInstancedBaseInstance ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseInstance DrawElementsInstancedBaseInstance} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawElementsInstancedBaseInstance(int mode, int count, int type, long indices, int primcount, int baseinstance); - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseInstance(mode, count, type, indices, primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseInstance(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), primcount, baseinstance); - } - - /** - * Draws multiple instances of a set of elements with an offset applied to instanced attributes - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the specified range of indices to be rendered - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), primcount, baseinstance); - } - - // --- [ glDrawElementsInstancedBaseVertexBaseInstance ] --- - - /** - * Unsafe version of: {@link #glDrawElementsInstancedBaseVertexBaseInstance DrawElementsInstancedBaseVertexBaseInstance} - * - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - */ - public static native void nglDrawElementsInstancedBaseVertexBaseInstance(int mode, int count, int type, long indices, int primcount, int basevertex, int baseinstance); - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param count the number of elements to be rendered - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLsizei") int count, @NativeType("GLenum") int type, @NativeType("void const *") long indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices, primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of the values in {@code indices}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseVertexBaseInstance(mode, indices.remaining() >> GLChecks.typeToByteShift(type), type, memAddress(indices), primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseVertexBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, memAddress(indices), primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") ShortBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseVertexBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, memAddress(indices), primcount, basevertex, baseinstance); - } - - /** - * Renders multiple instances of a set of primitives from array data with a per-element offset. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indices a pointer to the location where the indices are stored - * @param primcount the number of instances of the indexed geometry that should be drawn - * @param basevertex a constant that should be added to each element of {@code indices} when choosing elements from the enabled vertex arrays - * @param baseinstance the base instance for use in fetching instanced vertex attributes - * - * @see Reference Page - */ - public static void glDrawElementsInstancedBaseVertexBaseInstance(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indices, @NativeType("GLsizei") int primcount, @NativeType("GLint") int basevertex, @NativeType("GLuint") int baseinstance) { - nglDrawElementsInstancedBaseVertexBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices), primcount, basevertex, baseinstance); - } - - // --- [ glBindImageTexture ] --- - - /** - * Binds a level of a texture to an image unit. - * - * @param unit the index of the image unit to which to bind the texture - * @param texture the name of the texture to bind to the image unit - * @param level the level of the texture that is to be bound - * @param layered whether a layered texture binding is to be established - * @param layer if {@code layered} is false, specifies the layer of texture to be bound to the image unit. Ignored otherwise. - * @param access a token indicating the type of access that will be performed on the image - * @param format the format that the elements of the image will be treated as for the purposes of formatted stores - * - * @see Reference Page - */ - public static native void glBindImageTexture(@NativeType("GLuint") int unit, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLboolean") boolean layered, @NativeType("GLint") int layer, @NativeType("GLenum") int access, @NativeType("GLenum") int format); - - // --- [ glMemoryBarrier ] --- - - /** - * Defines a barrier ordering memory transactions. - * - * @param barriers the barriers to insert (bitwise combination). One or more of:
    {@link #GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT VERTEX_ATTRIB_ARRAY_BARRIER_BIT}{@link #GL_ELEMENT_ARRAY_BARRIER_BIT ELEMENT_ARRAY_BARRIER_BIT}{@link #GL_UNIFORM_BARRIER_BIT UNIFORM_BARRIER_BIT}
    {@link #GL_TEXTURE_FETCH_BARRIER_BIT TEXTURE_FETCH_BARRIER_BIT}{@link #GL_SHADER_IMAGE_ACCESS_BARRIER_BIT SHADER_IMAGE_ACCESS_BARRIER_BIT}{@link #GL_COMMAND_BARRIER_BIT COMMAND_BARRIER_BIT}
    {@link #GL_PIXEL_BUFFER_BARRIER_BIT PIXEL_BUFFER_BARRIER_BIT}{@link #GL_TEXTURE_UPDATE_BARRIER_BIT TEXTURE_UPDATE_BARRIER_BIT}{@link #GL_BUFFER_UPDATE_BARRIER_BIT BUFFER_UPDATE_BARRIER_BIT}
    {@link #GL_FRAMEBUFFER_BARRIER_BIT FRAMEBUFFER_BARRIER_BIT}{@link #GL_TRANSFORM_FEEDBACK_BARRIER_BIT TRANSFORM_FEEDBACK_BARRIER_BIT}{@link #GL_ATOMIC_COUNTER_BARRIER_BIT ATOMIC_COUNTER_BARRIER_BIT}
    {@link #GL_ALL_BARRIER_BITS ALL_BARRIER_BITS}{@link GL43#GL_SHADER_STORAGE_BARRIER_BIT SHADER_STORAGE_BARRIER_BIT}
    - * - * @see Reference Page - */ - public static native void glMemoryBarrier(@NativeType("GLbitfield") int barriers); - - // --- [ glGetInternalformativ ] --- - - /** - * Unsafe version of: {@link #glGetInternalformativ GetInternalformativ} - * - * @param bufSize the maximum number of values that may be written to params by the function - */ - public static native void nglGetInternalformativ(int target, int internalformat, int pname, int bufSize, long params); - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * @param params a variable into which to write the retrieved information - * - * @see Reference Page - */ - public static void glGetInternalformativ(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - nglGetInternalformativ(target, internalformat, pname, params.remaining(), memAddress(params)); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetInternalformati(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetInternalformativ(target, internalformat, pname, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Array version of: {@link #glGetActiveAtomicCounterBufferiv GetActiveAtomicCounterBufferiv} - * - * @see Reference Page - */ - public static void glGetActiveAtomicCounterBufferiv(@NativeType("GLuint") int program, @NativeType("GLuint") int bufferIndex, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetActiveAtomicCounterBufferiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, bufferIndex, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetInternalformativ GetInternalformativ} - * - * @see Reference Page - */ - public static void glGetInternalformativ(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetInternalformativ; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, pname, params.length, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL43.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL43.java deleted file mode 100644 index 0de244cc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL43.java +++ /dev/null @@ -1,2206 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 4.3. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 4.3 implementations support revision 4.30 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL43 extends GL42 { - - static { GL.initialize(); } - - /** No. of supported Shading Language Versions. Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9; - - /** Vertex attrib array has unconverted doubles. Accepted by the {@code pname} parameter of GetVertexAttribiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E; - - /** Accepted by the {@code internalformat} parameter of CompressedTexImage2D. */ - public static final int - GL_COMPRESSED_RGB8_ETC2 = 0x9274, - GL_COMPRESSED_SRGB8_ETC2 = 0x9275, - GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, - GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, - GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, - GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, - GL_COMPRESSED_R11_EAC = 0x9270, - GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, - GL_COMPRESSED_RG11_EAC = 0x9272, - GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; - - /** Accepted by the {@code target} parameter of Enable and Disable. */ - public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, GetQueryIndexediv and GetQueryiv. */ - public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; - - /** Accepted by the {@code value} parameter of the GetInteger* functions. */ - public static final int GL_MAX_ELEMENT_INDEX = 0x8D6B; - - /** Accepted by the {@code pname} parameters of GetTexParameterfv and GetTexParameteriv. */ - public static final int GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; - - /** Accepted by the {@code type} parameter of CreateShader and returned in the {@code params} parameter by GetShaderiv. */ - public static final int GL_COMPUTE_SHADER = 0x91B9; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, - GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, - GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, - GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, - GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, - GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, - GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, - GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, - GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleani_v, GetFloati_v, GetDoublei_v and GetInteger64i_v. */ - public static final int - GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, - GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; - - /** Accepted by the {@code pname} parameter of GetActiveAtomicCounterBufferiv. */ - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; - - /** Accepted by the {@code stages} parameter of UseProgramStages. */ - public static final int GL_COMPUTE_SHADER_BIT = 0x20; - - /** Tokens accepted by the {@code target} parameters of Enable, Disable, and IsEnabled. */ - public static final int - GL_DEBUG_OUTPUT = 0x92E0, - GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; - - /** Returned by GetIntegerv when {@code pname} is CONTEXT_FLAGS. */ - public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 0x2; - - /** Tokens accepted by the {@code value} parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, - GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, - GL_DEBUG_LOGGED_MESSAGES = 0x9145, - GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, - GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, - GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, - GL_MAX_LABEL_LENGTH = 0x82E8; - - /** Tokens accepted by the {@code pname} parameter of GetPointerv. */ - public static final int - GL_DEBUG_CALLBACK_FUNCTION = 0x8244, - GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; - - /** - * Tokens accepted or provided by the {@code source} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the {@code sources} parameter - * of GetDebugMessageLog. - */ - public static final int - GL_DEBUG_SOURCE_API = 0x8246, - GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, - GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, - GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, - GL_DEBUG_SOURCE_APPLICATION = 0x824A, - GL_DEBUG_SOURCE_OTHER = 0x824B; - - /** - * Tokens accepted or provided by the {@code type} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the {@code types} parameter of - * GetDebugMessageLog. - */ - public static final int - GL_DEBUG_TYPE_ERROR = 0x824C, - GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, - GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, - GL_DEBUG_TYPE_PORTABILITY = 0x824F, - GL_DEBUG_TYPE_PERFORMANCE = 0x8250, - GL_DEBUG_TYPE_OTHER = 0x8251, - GL_DEBUG_TYPE_MARKER = 0x8268; - - /** Tokens accepted or provided by the {@code type} parameters of DebugMessageControl and DEBUGPROC, and the {@code types} parameter of GetDebugMessageLog. */ - public static final int - GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, - GL_DEBUG_TYPE_POP_GROUP = 0x826A; - - /** - * Tokens accepted or provided by the {@code severity} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the - * {@code severities} parameter of GetDebugMessageLog. - */ - public static final int - GL_DEBUG_SEVERITY_HIGH = 0x9146, - GL_DEBUG_SEVERITY_MEDIUM = 0x9147, - GL_DEBUG_SEVERITY_LOW = 0x9148, - GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; - - /** Tokens accepted or provided by the {@code identifier} parameters of ObjectLabel and GetObjectLabel. */ - public static final int - GL_BUFFER = 0x82E0, - GL_SHADER = 0x82E1, - GL_PROGRAM = 0x82E2, - GL_QUERY = 0x82E3, - GL_PROGRAM_PIPELINE = 0x82E4, - GL_SAMPLER = 0x82E6, - GL_DISPLAY_LIST = 0x82E7; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int GL_MAX_UNIFORM_LOCATIONS = 0x826E; - - /** - * Accepted by the {@code pname} parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and - * GetNamedFramebufferParameterivEXT. - */ - public static final int - GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, - GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, - GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, - GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, - GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, - GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, - GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, - GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; - - /** Accepted by the {@code pname} parameter of GetInternalformativ and GetInternalformati64v. */ - public static final int - GL_INTERNALFORMAT_SUPPORTED = 0x826F, - GL_INTERNALFORMAT_PREFERRED = 0x8270, - GL_INTERNALFORMAT_RED_SIZE = 0x8271, - GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, - GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, - GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, - GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, - GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, - GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, - GL_INTERNALFORMAT_RED_TYPE = 0x8278, - GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, - GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, - GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, - GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, - GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, - GL_MAX_WIDTH = 0x827E, - GL_MAX_HEIGHT = 0x827F, - GL_MAX_DEPTH = 0x8280, - GL_MAX_LAYERS = 0x8281, - GL_MAX_COMBINED_DIMENSIONS = 0x8282, - GL_COLOR_COMPONENTS = 0x8283, - GL_DEPTH_COMPONENTS = 0x8284, - GL_STENCIL_COMPONENTS = 0x8285, - GL_COLOR_RENDERABLE = 0x8286, - GL_DEPTH_RENDERABLE = 0x8287, - GL_STENCIL_RENDERABLE = 0x8288, - GL_FRAMEBUFFER_RENDERABLE = 0x8289, - GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, - GL_FRAMEBUFFER_BLEND = 0x828B, - GL_READ_PIXELS = 0x828C, - GL_READ_PIXELS_FORMAT = 0x828D, - GL_READ_PIXELS_TYPE = 0x828E, - GL_TEXTURE_IMAGE_FORMAT = 0x828F, - GL_TEXTURE_IMAGE_TYPE = 0x8290, - GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, - GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, - GL_MIPMAP = 0x8293, - GL_MANUAL_GENERATE_MIPMAP = 0x8294, - GL_AUTO_GENERATE_MIPMAP = 0x8295, - GL_COLOR_ENCODING = 0x8296, - GL_SRGB_READ = 0x8297, - GL_SRGB_WRITE = 0x8298, - GL_FILTER = 0x829A, - GL_VERTEX_TEXTURE = 0x829B, - GL_TESS_CONTROL_TEXTURE = 0x829C, - GL_TESS_EVALUATION_TEXTURE = 0x829D, - GL_GEOMETRY_TEXTURE = 0x829E, - GL_FRAGMENT_TEXTURE = 0x829F, - GL_COMPUTE_TEXTURE = 0x82A0, - GL_TEXTURE_SHADOW = 0x82A1, - GL_TEXTURE_GATHER = 0x82A2, - GL_TEXTURE_GATHER_SHADOW = 0x82A3, - GL_SHADER_IMAGE_LOAD = 0x82A4, - GL_SHADER_IMAGE_STORE = 0x82A5, - GL_SHADER_IMAGE_ATOMIC = 0x82A6, - GL_IMAGE_TEXEL_SIZE = 0x82A7, - GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, - GL_IMAGE_PIXEL_FORMAT = 0x82A9, - GL_IMAGE_PIXEL_TYPE = 0x82AA, - GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, - GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, - GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, - GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, - GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, - GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, - GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, - GL_CLEAR_BUFFER = 0x82B4, - GL_TEXTURE_VIEW = 0x82B5, - GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; - - /** Returned as possible responses for various {@code pname} queries to GetInternalformativ and GetInternalformati64v. */ - public static final int - GL_FULL_SUPPORT = 0x82B7, - GL_CAVEAT_SUPPORT = 0x82B8, - GL_IMAGE_CLASS_4_X_32 = 0x82B9, - GL_IMAGE_CLASS_2_X_32 = 0x82BA, - GL_IMAGE_CLASS_1_X_32 = 0x82BB, - GL_IMAGE_CLASS_4_X_16 = 0x82BC, - GL_IMAGE_CLASS_2_X_16 = 0x82BD, - GL_IMAGE_CLASS_1_X_16 = 0x82BE, - GL_IMAGE_CLASS_4_X_8 = 0x82BF, - GL_IMAGE_CLASS_2_X_8 = 0x82C0, - GL_IMAGE_CLASS_1_X_8 = 0x82C1, - GL_IMAGE_CLASS_11_11_10 = 0x82C2, - GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, - GL_VIEW_CLASS_128_BITS = 0x82C4, - GL_VIEW_CLASS_96_BITS = 0x82C5, - GL_VIEW_CLASS_64_BITS = 0x82C6, - GL_VIEW_CLASS_48_BITS = 0x82C7, - GL_VIEW_CLASS_32_BITS = 0x82C8, - GL_VIEW_CLASS_24_BITS = 0x82C9, - GL_VIEW_CLASS_16_BITS = 0x82CA, - GL_VIEW_CLASS_8_BITS = 0x82CB, - GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, - GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, - GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, - GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, - GL_VIEW_CLASS_RGTC1_RED = 0x82D0, - GL_VIEW_CLASS_RGTC2_RG = 0x82D1, - GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, - GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; - - /** - * Accepted by the {@code programInterface} parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, - * GetProgramResourceLocation, and GetProgramResourceLocationIndex. - */ - public static final int - GL_UNIFORM = 0x92E1, - GL_UNIFORM_BLOCK = 0x92E2, - GL_PROGRAM_INPUT = 0x92E3, - GL_PROGRAM_OUTPUT = 0x92E4, - GL_BUFFER_VARIABLE = 0x92E5, - GL_SHADER_STORAGE_BLOCK = 0x92E6, - GL_VERTEX_SUBROUTINE = 0x92E8, - GL_TESS_CONTROL_SUBROUTINE = 0x92E9, - GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, - GL_GEOMETRY_SUBROUTINE = 0x92EB, - GL_FRAGMENT_SUBROUTINE = 0x92EC, - GL_COMPUTE_SUBROUTINE = 0x92ED, - GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, - GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, - GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, - GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, - GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, - GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, - GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; - - /** Accepted by the {@code pname} parameter of GetProgramInterfaceiv. */ - public static final int - GL_ACTIVE_RESOURCES = 0x92F5, - GL_MAX_NAME_LENGTH = 0x92F6, - GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, - GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; - - /** Accepted in the {@code props} array of GetProgramResourceiv. */ - public static final int - GL_NAME_LENGTH = 0x92F9, - GL_TYPE = 0x92FA, - GL_ARRAY_SIZE = 0x92FB, - GL_OFFSET = 0x92FC, - GL_BLOCK_INDEX = 0x92FD, - GL_ARRAY_STRIDE = 0x92FE, - GL_MATRIX_STRIDE = 0x92FF, - GL_IS_ROW_MAJOR = 0x9300, - GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, - GL_BUFFER_BINDING = 0x9302, - GL_BUFFER_DATA_SIZE = 0x9303, - GL_NUM_ACTIVE_VARIABLES = 0x9304, - GL_ACTIVE_VARIABLES = 0x9305, - GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, - GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, - GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, - GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, - GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, - GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, - GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, - GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, - GL_LOCATION = 0x930E, - GL_LOCATION_INDEX = 0x930F, - GL_IS_PER_PATCH = 0x92E7; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_SHADER_STORAGE_BUFFER = 0x90D2; - - /** - * Accepted by the {@code pname} parameter of GetIntegerv, GetIntegeri_v, GetBooleanv, GetInteger64v, GetFloatv, GetDoublev, GetBooleani_v, GetIntegeri_v, - * GetFloati_v, GetDoublei_v, and GetInteger64i_v. - */ - public static final int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. */ - public static final int - GL_SHADER_STORAGE_BUFFER_START = 0x90D4, - GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, - GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, - GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, - GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, - GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, - GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, - GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, - GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, - GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, - GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; - - /** Accepted in the {@code barriers} bitfield in glMemoryBarrier. */ - public static final int GL_SHADER_STORAGE_BARRIER_BIT = 0x2000; - - /** Alias for the existing token MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS. */ - public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; - - /** Accepted by the {@code pname} parameter of TexParameter* and GetTexParameter*. */ - public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_BUFFER_OFFSET = 0x919D, - GL_TEXTURE_BUFFER_SIZE = 0x919E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; - - /** Accepted by the {@code pname} parameters of GetTexParameterfv and GetTexParameteriv. */ - public static final int - GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, - GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, - GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, - GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE; - - /** Accepted by the {@code pname} parameter of GetVertexAttrib*v. */ - public static final int - GL_VERTEX_ATTRIB_BINDING = 0x82D4, - GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; - - /** Accepted by the {@code target} parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. */ - public static final int - GL_VERTEX_BINDING_DIVISOR = 0x82D6, - GL_VERTEX_BINDING_OFFSET = 0x82D7, - GL_VERTEX_BINDING_STRIDE = 0x82D8, - GL_VERTEX_BINDING_BUFFER = 0x8F4F; - - /** Accepted by the {@code pname} parameter of GetIntegerv, .... */ - public static final int - GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, - GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; - - protected GL43() { - throw new UnsupportedOperationException(); - } - - // --- [ glClearBufferData ] --- - - /** Unsafe version of: {@link #glClearBufferData ClearBufferData} */ - public static void nglClearBufferData(int target, int internalformat, int format, int type, long data) { - GL43C.nglClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - // --- [ glClearBufferSubData ] --- - - /** Unsafe version of: {@link #glClearBufferSubData ClearBufferSubData} */ - public static void nglClearBufferSubData(int target, int internalformat, long offset, long size, int format, int type, long data) { - GL43C.nglClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43C#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - // --- [ glDispatchCompute ] --- - - /** - * Launches one or more compute work groups. - * - * @param num_groups_x the number of work groups to be launched in the X dimension - * @param num_groups_y the number of work groups to be launched in the Y dimension - * @param num_groups_z the number of work groups to be launched in the Z dimension - * - * @see Reference Page - */ - public static void glDispatchCompute(@NativeType("GLuint") int num_groups_x, @NativeType("GLuint") int num_groups_y, @NativeType("GLuint") int num_groups_z) { - GL43C.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); - } - - // --- [ glDispatchComputeIndirect ] --- - - /** - * Launches one or more compute work groups using parameters stored in a buffer. - * - *

    The parameters addressed by indirect are packed a structure, which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint num_groups_x;
    -     *     uint num_groups_y;
    -     *     uint num_groups_z;
    -     * } DispatchIndirectCommand;
    - * - *

    A call to {@code glDispatchComputeIndirect} is equivalent, assuming no errors are generated, to:

    - * - *
    
    -     * cmd = (const DispatchIndirectCommand *)indirect;
    -     * glDispatchCompute(cmd->num_groups_x, cmd->num_groups_y, cmd->num_groups_z);
    - * - * @param indirect the offset into the buffer object currently bound to the {@link GL43C#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER} buffer target at which the dispatch parameters are - * stored. - * - * @see Reference Page - */ - public static void glDispatchComputeIndirect(@NativeType("GLintptr") long indirect) { - GL43C.glDispatchComputeIndirect(indirect); - } - - // --- [ glCopyImageSubData ] --- - - /** - * Performs a raw data copy between two images. - * - * @param srcName the name of a texture or renderbuffer object from which to copy - * @param srcTarget the target representing the namespace of the source name {@code srcName} - * @param srcLevel the mipmap level to read from the source - * @param srcX the X coordinate of the left edge of the souce region to copy - * @param srcY the Y coordinate of the top edge of the souce region to copy - * @param srcZ the Z coordinate of the near edge of the souce region to copy - * @param dstName the name of a texture or renderbuffer object to which to copy - * @param dstTarget the target representing the namespace of the destination name {@code dstName} - * @param dstLevel the mipmap level to write to the source - * @param dstX the X coordinate of the left edge of the destination region - * @param dstY the Y coordinate of the top edge of the destination region - * @param dstZ the Z coordinate of the near edge of the destination region - * @param srcWidth the width of the region to be copied - * @param srcHeight the height of the region to be copied - * @param srcDepth the depth of the region to be copied - * - * @see Reference Page - */ - public static void glCopyImageSubData(@NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int srcWidth, @NativeType("GLsizei") int srcHeight, @NativeType("GLsizei") int srcDepth) { - GL43C.glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); - } - - // --- [ glDebugMessageControl ] --- - - /** - * Unsafe version of: {@link #glDebugMessageControl DebugMessageControl} - * - * @param count the length of the array {@code ids} - */ - public static void nglDebugMessageControl(int source, int type, int severity, int count, long ids, boolean enabled) { - GL43C.nglDebugMessageControl(source, type, severity, count, ids, enabled); - } - - /** - * Controls the volume of debug output in the active debug group, by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source}, {@code type}, or {@code severity} is {@link GL11#GL_DONT_CARE DONT_CARE}, the messages from all sources, of all types, or of all severities are - * referenced respectively.
    • - *
    • When values other than {@link GL11#GL_DONT_CARE DONT_CARE} are specified, all messages whose source, type, or severity match the specified {@code source}, {@code type}, - * or {@code severity} respectively will be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated.
    • - *
    - * - *

    Unrecognized message IDs in {@code ids} are ignored. If {@code count} is zero, the value if {@code ids} is ignored.

    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled the GL operates the same as if messages of every {@code source}, {@code type} or {@code severity} are disabled.

    - * - * @param source the source of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param severity the severity of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param ids an array of unsigned integers containing the ids of the messages to enable or disable - * @param enabled whether the selected messages should be enabled or disabled - * - * @see Reference Page - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") IntBuffer ids, @NativeType("GLboolean") boolean enabled) { - GL43C.glDebugMessageControl(source, type, severity, ids, enabled); - } - - /** - * Controls the volume of debug output in the active debug group, by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source}, {@code type}, or {@code severity} is {@link GL11#GL_DONT_CARE DONT_CARE}, the messages from all sources, of all types, or of all severities are - * referenced respectively.
    • - *
    • When values other than {@link GL11#GL_DONT_CARE DONT_CARE} are specified, all messages whose source, type, or severity match the specified {@code source}, {@code type}, - * or {@code severity} respectively will be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated.
    • - *
    - * - *

    Unrecognized message IDs in {@code ids} are ignored. If {@code count} is zero, the value if {@code ids} is ignored.

    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled the GL operates the same as if messages of every {@code source}, {@code type} or {@code severity} are disabled.

    - * - * @param source the source of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param severity the severity of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param enabled whether the selected messages should be enabled or disabled - * - * @see Reference Page - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @NativeType("GLuint const *") int id, @NativeType("GLboolean") boolean enabled) { - GL43C.glDebugMessageControl(source, type, severity, id, enabled); - } - - // --- [ glDebugMessageInsert ] --- - - /** - * Unsafe version of: {@link #glDebugMessageInsert DebugMessageInsert} - * - * @param length the length of the string contained in the character array whose address is given by {@code message} - */ - public static void nglDebugMessageInsert(int source, int type, int id, int severity, int length, long message) { - GL43C.nglDebugMessageInsert(source, type, id, severity, length, message); - } - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the caller. The string - * {@code buf} contains the string representation of the message. The parameter {@code length} contains the number of characters in {@code buf}. If - * {@code length} is negative, it is implied that {@code buf} contains a null terminated string. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the - * number of characters in {@code buf}, excluding the null terminator when {@code length} is negative, is not less than the value of - * {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled calls to DebugMessageInsert are discarded and do not generate an error.

    - * - * @param source the source of the debug message to insert. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of the debug message insert. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param id the user-supplied identifier of the message to insert. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param severity the severity of the debug messages to insert - * @param message a character array containing the message to insert - * - * @see Reference Page - */ - public static void glDebugMessageInsert(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") ByteBuffer message) { - GL43C.glDebugMessageInsert(source, type, id, severity, message); - } - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the caller. The string - * {@code buf} contains the string representation of the message. The parameter {@code length} contains the number of characters in {@code buf}. If - * {@code length} is negative, it is implied that {@code buf} contains a null terminated string. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the - * number of characters in {@code buf}, excluding the null terminator when {@code length} is negative, is not less than the value of - * {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled calls to DebugMessageInsert are discarded and do not generate an error.

    - * - * @param source the source of the debug message to insert. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of the debug message insert. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param id the user-supplied identifier of the message to insert. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param severity the severity of the debug messages to insert - * @param message a character array containing the message to insert - * - * @see Reference Page - */ - public static void glDebugMessageInsert(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") CharSequence message) { - GL43C.glDebugMessageInsert(source, type, id, severity, message); - } - - // --- [ glDebugMessageCallback ] --- - - /** Unsafe version of: {@link #glDebugMessageCallback DebugMessageCallback} */ - public static void nglDebugMessageCallback(long callback, long userParam) { - GL43C.nglDebugMessageCallback(callback, userParam); - } - - /** - * Specifies a callback to receive debugging messages from the GL. - * - *

    The function's prototype must follow the type definition of DEBUGPROC including its platform-dependent calling convention. Anything else will result in - * undefined behavior. Only one debug callback can be specified for the current context, and further calls overwrite the previous callback. Specifying - * {@code NULL} as the value of {@code callback} clears the current callback and disables message output through callbacks. Applications can provide - * user-specified data through the pointer {@code userParam}. The context will store this pointer and will include it as one of the parameters in each call - * to the callback function.

    - * - *

    If the application has specified a callback function for receiving debug output, the implementation will call that function whenever any enabled message - * is generated. The source, type, ID, and severity of the message are specified by the DEBUGPROC parameters {@code source}, {@code type}, {@code id}, and - * {@code severity}, respectively. The string representation of the message is stored in {@code message} and its length (excluding the null-terminator) is - * stored in {@code length}. The parameter {@code userParam} is the user-specified parameter that was given when calling DebugMessageCallback.

    - * - *

    Applications can query the current callback function and the current user-specified parameter by obtaining the values of {@link GL43C#GL_DEBUG_CALLBACK_FUNCTION DEBUG_CALLBACK_FUNCTION} and - * {@link GL43C#GL_DEBUG_CALLBACK_USER_PARAM DEBUG_CALLBACK_USER_PARAM}, respectively.

    - * - *

    Applications that specify a callback function must be aware of certain special conditions when executing code inside a callback when it is called by the - * GL, regardless of the debug source.

    - * - *

    The memory for {@code message} is owned and managed by the GL, and should only be considered valid for the duration of the function call.

    - * - *

    The behavior of calling any GL or window system function from within the callback function is undefined and may lead to program termination.

    - * - *

    Care must also be taken in securing debug callbacks for use with asynchronous debug output by multi-threaded GL implementations.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled then the GL will not call the callback function.

    - * - * @param callback a callback function that will be called when a debug message is generated - * @param userParam a user supplied pointer that will be passed on each invocation of {@code callback} - * - * @see Reference Page - */ - public static void glDebugMessageCallback(@Nullable @NativeType("GLDEBUGPROC") GLDebugMessageCallbackI callback, @NativeType("void const *") long userParam) { - GL43C.glDebugMessageCallback(callback, userParam); - } - - // --- [ glGetDebugMessageLog ] --- - - /** - * Unsafe version of: {@link #glGetDebugMessageLog GetDebugMessageLog} - * - * @param bufsize the size of the buffer whose address is given by {@code messageLog} - */ - public static int nglGetDebugMessageLog(int count, int bufsize, long sources, long types, long ids, long severities, long lengths, long messageLog) { - return GL43C.nglGetDebugMessageLog(count, bufsize, sources, types, ids, severities, lengths, messageLog); - } - - /** - * Retrieves messages from the debug message log. - * - *

    This function fetches a maximum of {@code count} messages from the message log, and will return the number of messages successfully fetched.

    - * - *

    Messages will be fetched from the log in order of oldest to newest. Those messages that were fetched will be removed from the log.

    - * - *

    The sources, types, severities, IDs, and string lengths of fetched messages will be stored in the application-provided arrays {@code sources}, - * {@code types}, {@code severities}, {@code ids}, and {@code lengths}, respectively. The application is responsible for allocating enough space for each - * array to hold up to {@code count} elements. The string representations of all fetched messages are stored in the {@code messageLog} array. If multiple - * messages are fetched, their strings are concatenated into the same {@code messageLog} array and will be separated by single null terminators. The last - * string in the array will also be null-terminated. The maximum size of {@code messageLog}, including the space used by all null terminators, is given by - * {@code bufSize}. If {@code bufSize} is less than zero and {@code messageLog} is not {@code NULL}, an {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error will be generated. If a message's - * string, including its null terminator, can not fully fit within the {@code messageLog} array's remaining space, then that message and any subsequent - * messages will not be fetched and will remain in the log. The string lengths stored in the array {@code lengths} include the space for the null - * terminator of each string.

    - * - *

    Any or all of the arrays {@code sources}, {@code types}, {@code ids}, {@code severities}, {@code lengths} and {@code messageLog} can also be null - * pointers, which causes the attributes for such arrays to be discarded when messages are fetched, however those messages will still be removed from the - * log. Thus to simply delete up to {@code count} messages from the message log while ignoring their attributes, the application can call the function - * with null pointers for all attribute arrays.

    - * - *

    If the context was created without the {@link GL43C#GL_CONTEXT_FLAG_DEBUG_BIT CONTEXT_FLAG_DEBUG_BIT} in the {@link GL30#GL_CONTEXT_FLAGS CONTEXT_FLAGS} state, then the GL can opt to never add messages to the - * message log so GetDebugMessageLog will always return zero.

    - * - * @param count the number of debug messages to retrieve from the log - * @param sources an array of variables to receive the sources of the retrieved messages - * @param types an array of variables to receive the types of the retrieved messages - * @param ids an array of unsigned integers to receive the ids of the retrieved messages - * @param severities an array of variables to receive the severites of the retrieved messages - * @param lengths an array of variables to receive the lengths of the received messages - * @param messageLog an array of characters that will receive the messages - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetDebugMessageLog(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") IntBuffer sources, @Nullable @NativeType("GLenum *") IntBuffer types, @Nullable @NativeType("GLuint *") IntBuffer ids, @Nullable @NativeType("GLenum *") IntBuffer severities, @Nullable @NativeType("GLsizei *") IntBuffer lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - return GL43C.glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); - } - - // --- [ glPushDebugGroup ] --- - - /** - * Unsafe version of: {@link #glPushDebugGroup PushDebugGroup} - * - * @param length the length of the message to be sent to the debug output stream - */ - public static void nglPushDebugGroup(int source, int id, int length, long message) { - GL43C.nglPushDebugGroup(source, id, length, message); - } - - /** - * Pushes a debug group described by the string {@code message} into the command stream. The value of {@code id} specifies the ID of messages generated. - * The parameter {@code length} contains the number of characters in {@code message}. If {@code length} is negative, it is implied that {@code message} - * contains a null terminated string. The message has the specified {@code source} and {@code id}, {@code type} {@link GL43C#GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP}, and - * {@code severity} {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The GL will put a new debug group on top of the debug group stack which inherits the control of the - * volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any - * additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group. - * - *

    An {@link GL11#GL_INVALID_ENUM INVALID_ENUM} error is generated if the value of {@code source} is neither {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION} nor {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}. An - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code length} is negative and the number of characters in {@code message}, excluding the null-terminator, is - * not less than the value of {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - * @param source the source of the debug message. One of:
    {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}
    - * @param id the identifier of the message - * @param message a string containing the message to be sent to the debug output stream - * - * @see Reference Page - */ - public static void glPushDebugGroup(@NativeType("GLenum") int source, @NativeType("GLuint") int id, @NativeType("GLchar const *") ByteBuffer message) { - GL43C.glPushDebugGroup(source, id, message); - } - - /** - * Pushes a debug group described by the string {@code message} into the command stream. The value of {@code id} specifies the ID of messages generated. - * The parameter {@code length} contains the number of characters in {@code message}. If {@code length} is negative, it is implied that {@code message} - * contains a null terminated string. The message has the specified {@code source} and {@code id}, {@code type} {@link GL43C#GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP}, and - * {@code severity} {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The GL will put a new debug group on top of the debug group stack which inherits the control of the - * volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any - * additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group. - * - *

    An {@link GL11#GL_INVALID_ENUM INVALID_ENUM} error is generated if the value of {@code source} is neither {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION} nor {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}. An - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code length} is negative and the number of characters in {@code message}, excluding the null-terminator, is - * not less than the value of {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - * @param source the source of the debug message. One of:
    {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}
    - * @param id the identifier of the message - * @param message a string containing the message to be sent to the debug output stream - * - * @see Reference Page - */ - public static void glPushDebugGroup(@NativeType("GLenum") int source, @NativeType("GLuint") int id, @NativeType("GLchar const *") CharSequence message) { - GL43C.glPushDebugGroup(source, id, message); - } - - // --- [ glPopDebugGroup ] --- - - /** - * Pops the active debug group. When a debug group is popped, the GL will also generate a debug output message describing its cause based on the - * {@code message} string, the source {@code source}, and an ID {@code id} submitted to the associated {@link #glPushDebugGroup PushDebugGroup} command. {@link GL43C#GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP} - * and {@link GL43C#GL_DEBUG_TYPE_POP_GROUP DEBUG_TYPE_POP_GROUP} share a single namespace for message {@code id}. {@code severity} has the value {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The {@code type} - * has the value {@link GL43C#GL_DEBUG_TYPE_POP_GROUP DEBUG_TYPE_POP_GROUP}. Popping a debug group restores the debug output volume control of the parent debug group. - * - *

    Attempting to pop the default debug group off the stack generates a {@link GL11#GL_STACK_UNDERFLOW STACK_UNDERFLOW} error; pushing a debug group onto a stack containing - * {@link GL43C#GL_MAX_DEBUG_GROUP_STACK_DEPTH MAX_DEBUG_GROUP_STACK_DEPTH} minus one elements will generate a {@link GL11#GL_STACK_OVERFLOW STACK_OVERFLOW} error.

    - * - * @see Reference Page - */ - public static void glPopDebugGroup() { - GL43C.glPopDebugGroup(); - } - - // --- [ glObjectLabel ] --- - - /** - * Unsafe version of: {@link #glObjectLabel ObjectLabel} - * - * @param length the length of the label to be used for the object - */ - public static void nglObjectLabel(int identifier, int name, int length, long label) { - GL43C.nglObjectLabel(identifier, name, length, label); - } - - /** - * Labels a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object to label - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLchar const *") ByteBuffer label) { - GL43C.glObjectLabel(identifier, name, label); - } - - /** - * Labels a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object to label - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLchar const *") CharSequence label) { - GL43C.glObjectLabel(identifier, name, label); - } - - // --- [ glGetObjectLabel ] --- - - /** - * Unsafe version of: {@link #glGetObjectLabel GetObjectLabel} - * - * @param bufSize the length of the buffer whose address is in {@code label} - */ - public static void nglGetObjectLabel(int identifier, int name, int bufSize, long length, long label) { - GL43C.nglGetObjectLabel(identifier, name, bufSize, length, label); - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * @param length the address of a variable to receive the length of the object label - * @param label a string that will receive the object label - * - * @see Reference Page - */ - public static void glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectLabel(identifier, name, length, label); - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * @param bufSize the length of the buffer whose address is in {@code label} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLsizei") int bufSize) { - return GL43C.glGetObjectLabel(identifier, name, bufSize); - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name) { - return glGetObjectLabel(identifier, name, GL11.glGetInteger(GL_MAX_LABEL_LENGTH)); - } - - // --- [ glObjectPtrLabel ] --- - - /** - * Unsafe version of: {@link #glObjectPtrLabel ObjectPtrLabel} - * - * @param length the length of the label to be used for the object - */ - public static void nglObjectPtrLabel(long ptr, int length, long label) { - GL43C.nglObjectPtrLabel(ptr, length, label); - } - - /** - * Labels a sync object identified by a pointer. - * - * @param ptr a pointer identifying a sync object - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLchar const *") ByteBuffer label) { - GL43C.glObjectPtrLabel(ptr, label); - } - - /** - * Labels a sync object identified by a pointer. - * - * @param ptr a pointer identifying a sync object - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLchar const *") CharSequence label) { - GL43C.glObjectPtrLabel(ptr, label); - } - - // --- [ glGetObjectPtrLabel ] --- - - /** - * Unsafe version of: {@link #glGetObjectPtrLabel GetObjectPtrLabel} - * - * @param bufSize the length of the buffer whose address is in {@code label} - */ - public static void nglGetObjectPtrLabel(long ptr, int bufSize, long length, long label) { - GL43C.nglGetObjectPtrLabel(ptr, bufSize, length, label); - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * @param length a variable to receive the length of the object label - * @param label a string that will receive the object label - * - * @see Reference Page - */ - public static void glGetObjectPtrLabel(@NativeType("void *") long ptr, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectPtrLabel(ptr, length, label); - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * @param bufSize the length of the buffer whose address is in {@code label} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLsizei") int bufSize) { - return GL43C.glGetObjectPtrLabel(ptr, bufSize); - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectPtrLabel(@NativeType("void *") long ptr) { - return glGetObjectPtrLabel(ptr, GL11.glGetInteger(GL_MAX_LABEL_LENGTH)); - } - - // --- [ glFramebufferParameteri ] --- - - /** - * Sets a named parameter of a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be modified. One of:
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param param the new value for the parameter named {@code pname} - * - * @see Reference Page - */ - public static void glFramebufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL43C.glFramebufferParameteri(target, pname, param); - } - - // --- [ glGetFramebufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetFramebufferParameteriv GetFramebufferParameteriv} */ - public static void nglGetFramebufferParameteriv(int target, int pname, long params) { - GL43C.nglGetFramebufferParameteriv(target, pname, params); - } - - /** - * Retrieves a named parameter from a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param params a variable to receive the value of the parameter named {@code pname} - * - * @see Reference Page - */ - public static void glGetFramebufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL43C.glGetFramebufferParameteriv(target, pname, params); - } - - /** - * Retrieves a named parameter from a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43C#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43C#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetFramebufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - return GL43C.glGetFramebufferParameteri(target, pname); - } - - // --- [ glGetInternalformati64v ] --- - - /** - * Unsafe version of: {@link #glGetInternalformati64v GetInternalformati64v} - * - * @param bufSize the maximum number of values that may be written to params by the function - */ - public static void nglGetInternalformati64v(int target, int internalformat, int pname, int bufSize, long params) { - GL43C.nglGetInternalformati64v(target, internalformat, pname, bufSize, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * @param params a variable into which to write the retrieved information - * - * @see Reference Page - */ - public static void glGetInternalformati64v(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL43C.glGetInternalformati64v(target, internalformat, pname, params); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetInternalformati64(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname) { - return GL43C.glGetInternalformati64(target, internalformat, pname); - } - - // --- [ glInvalidateTexSubImage ] --- - - /** - * Invalidates a region of a texture image. - * - * @param texture the name of a texture object a subregion of which to invalidate - * @param level the level of detail of the texture object within which the region resides - * @param xoffset the X offset of the region to be invalidated - * @param yoffset the Y offset of the region to be invalidated - * @param zoffset the Z offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * @param depth the depth of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - GL43C.glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); - } - - // --- [ glInvalidateTexImage ] --- - - /** - * Invalidates the entirety of a texture image. - * - * @param texture the name of a texture object to invalidate - * @param level the level of detail of the texture object to invalidate - * - * @see Reference Page - */ - public static void glInvalidateTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL43C.glInvalidateTexImage(texture, level); - } - - // --- [ glInvalidateBufferSubData ] --- - - /** - * Invalidates a region of a buffer object's data store. - * - * @param buffer the name of a buffer object, a subrange of whose data store to invalidate - * @param offset the offset within the buffer's data store of the start of the range to be invalidated - * @param length the length of the range within the buffer's data store to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length) { - GL43C.glInvalidateBufferSubData(buffer, offset, length); - } - - // --- [ glInvalidateBufferData ] --- - - /** - * Invalidates the content of a buffer object's data store. - * - * @param buffer the name of a buffer object whose data store to invalidate - * - * @see Reference Page - */ - public static void glInvalidateBufferData(@NativeType("GLuint") int buffer) { - GL43C.glInvalidateBufferData(buffer); - } - - // --- [ glInvalidateFramebuffer ] --- - - /** - * Unsafe version of: {@link #glInvalidateFramebuffer InvalidateFramebuffer} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateFramebuffer(int target, int numAttachments, long attachments) { - GL43C.nglInvalidateFramebuffer(target, numAttachments, attachments); - } - - /** - * Invalidate the content some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param attachments the address of an array identifying the attachments to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") IntBuffer attachments) { - GL43C.glInvalidateFramebuffer(target, attachments); - } - - /** - * Invalidate the content some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * - * @see Reference Page - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int attachment) { - GL43C.glInvalidateFramebuffer(target, attachment); - } - - // --- [ glInvalidateSubFramebuffer ] --- - - /** - * Unsafe version of: {@link #glInvalidateSubFramebuffer InvalidateSubFramebuffer} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateSubFramebuffer(int target, int numAttachments, long attachments, int x, int y, int width, int height) { - GL43C.nglInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); - } - - /** - * Invalidates the content of a region of some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param attachments an array identifying the attachments to be invalidated - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") IntBuffer attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL43C.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); - } - - /** - * Invalidates the content of a region of some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int attachment, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL43C.glInvalidateSubFramebuffer(target, attachment, x, y, width, height); - } - - // --- [ glMultiDrawArraysIndirect ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirect MultiDrawArraysIndirect} */ - public static void nglMultiDrawArraysIndirect(int mode, long indirect, int drawcount, int stride) { - GL43C.nglMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - // --- [ glMultiDrawElementsIndirect ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirect MultiDrawElementsIndirect} */ - public static void nglMultiDrawElementsIndirect(int mode, int type, long indirect, int drawcount, int stride) { - GL43C.nglMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - // --- [ glGetProgramInterfaceiv ] --- - - /** Unsafe version of: {@link #glGetProgramInterfaceiv GetProgramInterfaceiv} */ - public static void nglGetProgramInterfaceiv(int program, int programInterface, int pname, long params) { - GL43C.nglGetProgramInterfaceiv(program, programInterface, pname, params); - } - - /** - * Queries a property of an interface in a program. - * - * @param program the name of a program object whose interface to query - * @param programInterface a token identifying the interface within {@code program} to query. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param pname the name of the parameter within {@code programInterface} to query. One of:
    {@link GL43C#GL_ACTIVE_RESOURCES ACTIVE_RESOURCES}{@link GL43C#GL_MAX_NAME_LENGTH MAX_NAME_LENGTH}{@link GL43C#GL_MAX_NUM_ACTIVE_VARIABLES MAX_NUM_ACTIVE_VARIABLES}
    {@link GL43C#GL_MAX_NUM_COMPATIBLE_SUBROUTINES MAX_NUM_COMPATIBLE_SUBROUTINES}
    - * @param params a variable to retrieve the value of {@code pname} for the program interface - * - * @see Reference Page - */ - public static void glGetProgramInterfaceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL43C.glGetProgramInterfaceiv(program, programInterface, pname, params); - } - - /** - * Queries a property of an interface in a program. - * - * @param program the name of a program object whose interface to query - * @param programInterface a token identifying the interface within {@code program} to query. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param pname the name of the parameter within {@code programInterface} to query. One of:
    {@link GL43C#GL_ACTIVE_RESOURCES ACTIVE_RESOURCES}{@link GL43C#GL_MAX_NAME_LENGTH MAX_NAME_LENGTH}{@link GL43C#GL_MAX_NUM_ACTIVE_VARIABLES MAX_NUM_ACTIVE_VARIABLES}
    {@link GL43C#GL_MAX_NUM_COMPATIBLE_SUBROUTINES MAX_NUM_COMPATIBLE_SUBROUTINES}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgramInterfacei(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname) { - return GL43C.glGetProgramInterfacei(program, programInterface, pname); - } - - // --- [ glGetProgramResourceIndex ] --- - - /** Unsafe version of: {@link #glGetProgramResourceIndex GetProgramResourceIndex} */ - public static int nglGetProgramResourceIndex(int program, int programInterface, long name) { - return GL43C.nglGetProgramResourceIndex(program, programInterface, name); - } - - /** - * Queries the index of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {Wcode name}. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param name the name of the resource to query the index of - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetProgramResourceIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - return GL43C.glGetProgramResourceIndex(program, programInterface, name); - } - - /** - * Queries the index of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {Wcode name}. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param name the name of the resource to query the index of - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetProgramResourceIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - return GL43C.glGetProgramResourceIndex(program, programInterface, name); - } - - // --- [ glGetProgramResourceName ] --- - - /** - * Unsafe version of: {@link #glGetProgramResourceName GetProgramResourceName} - * - * @param bufSize the size of the character array whose address is given by {@code name} - */ - public static void nglGetProgramResourceName(int program, int programInterface, int index, int bufSize, long length, long name) { - GL43C.nglGetProgramResourceName(program, programInterface, index, bufSize, length, name); - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * @param length a variable which will receive the length of the resource name - * @param name a character array into which will be written the name of the resource - * - * @see Reference Page - */ - public static void glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - GL43C.glGetProgramResourceName(program, programInterface, index, length, name); - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * @param bufSize the size of the character array whose address is given by {@code name} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufSize) { - return GL43C.glGetProgramResourceName(program, programInterface, index, bufSize); - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index) { - return glGetProgramResourceName(program, programInterface, index, glGetProgramInterfacei(program, programInterface, GL_MAX_NAME_LENGTH)); - } - - // --- [ glGetProgramResourceiv ] --- - - /** - * Unsafe version of: {@link #glGetProgramResourceiv GetProgramResourceiv} - * - * @param propCount the number of properties in {@code props} - * @param bufSize the size of the integer array whose address is given by {@code params} - */ - public static void nglGetProgramResourceiv(int program, int programInterface, int index, int propCount, long props, int bufSize, long length, long params) { - GL43C.nglGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); - } - - /** - * Retrieves values for multiple properties of a single active resource within a program object. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. One of:
    {@link GL43C#GL_UNIFORM UNIFORM}{@link GL43C#GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link GL43C#GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link GL43C#GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link GL43C#GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link GL43C#GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link GL43C#GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link GL43C#GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link GL43C#GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link GL43C#GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link GL43C#GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link GL43C#GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link GL43C#GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the active resource index - * @param props an array that will receive the active resource properties - * @param length a variable which will receive the number of values returned - * @param params an array that will receive the property values - * - * @see Reference Page - */ - public static void glGetProgramResourceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") IntBuffer props, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer params) { - GL43C.glGetProgramResourceiv(program, programInterface, index, props, length, params); - } - - // --- [ glGetProgramResourceLocation ] --- - - /** Unsafe version of: {@link #glGetProgramResourceLocation GetProgramResourceLocation} */ - public static int nglGetProgramResourceLocation(int program, int programInterface, long name) { - return GL43C.nglGetProgramResourceLocation(program, programInterface, name); - } - - /** - * Queries the location of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name} - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - return GL43C.glGetProgramResourceLocation(program, programInterface, name); - } - - /** - * Queries the location of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name} - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - return GL43C.glGetProgramResourceLocation(program, programInterface, name); - } - - // --- [ glGetProgramResourceLocationIndex ] --- - - /** Unsafe version of: {@link #glGetProgramResourceLocationIndex GetProgramResourceLocationIndex} */ - public static int nglGetProgramResourceLocationIndex(int program, int programInterface, long name) { - return GL43C.nglGetProgramResourceLocationIndex(program, programInterface, name); - } - - /** - * Queries the fragment color index of a named variable within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. Must be:
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}
    - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocationIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - return GL43C.glGetProgramResourceLocationIndex(program, programInterface, name); - } - - /** - * Queries the fragment color index of a named variable within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. Must be:
    {@link GL43C#GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}
    - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocationIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - return GL43C.glGetProgramResourceLocationIndex(program, programInterface, name); - } - - // --- [ glShaderStorageBlockBinding ] --- - - /** - * Changes an active shader storage block binding. - * - * @param program the name of the program containing the block whose binding to change - * @param storageBlockIndex the index storage block within the program - * @param storageBlockBinding the index storage block binding to associate with the specified storage block - * - * @see Reference Page - */ - public static void glShaderStorageBlockBinding(@NativeType("GLuint") int program, @NativeType("GLuint") int storageBlockIndex, @NativeType("GLuint") int storageBlockBinding) { - GL43C.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); - } - - // --- [ glTexBufferRange ] --- - - /** - * Binds a range of a buffer's data store to a buffer texture. - * - * @param target the target of the operation. Must be:
    {@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    - * @param internalformat the internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * @param offset the offset of the start of the range of the buffer's data store to attach - * @param size the size of the range of the buffer's data store to attach - * - * @see Reference Page - */ - public static void glTexBufferRange(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL43C.glTexBufferRange(target, internalformat, buffer, offset, size); - } - - // --- [ glTexStorage2DMultisample ] --- - - /** - * Specifies storage for a two-dimensional multisample texture. - * - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static void glTexStorage2DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL43C.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); - } - - // --- [ glTexStorage3DMultisample ] --- - - /** - * Specifies storage for a two-dimensional multisample array texture. - * - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static void glTexStorage3DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL43C.glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - // --- [ glTextureView ] --- - - /** - * Initializes a texture as a data alias of another texture's data store. - * - * @param texture the texture object to be initialized as a view - * @param target the target to be used for the newly initialized texture - * @param origtexture the name of a texture object of which to make a view - * @param internalformat the internal format for the newly created view - * @param minlevel the lowest level of detail of the view - * @param numlevels the number of levels of detail to include in the view - * @param minlayer the index of the first layer to include in the view - * @param numlayers the number of layers to include in the view - * - * @see Reference Page - */ - public static void glTextureView(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLuint") int origtexture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int minlevel, @NativeType("GLuint") int numlevels, @NativeType("GLuint") int minlayer, @NativeType("GLuint") int numlayers) { - GL43C.glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); - } - - // --- [ glBindVertexBuffer ] --- - - /** - * Binds a buffer to a vertex buffer bind point. - * - * @param bindingindex the index of the vertex buffer binding point to which to bind the buffer - * @param buffer the name of an existing buffer to bind to the vertex buffer binding point - * @param offset the offset of the first element of the buffer - * @param stride the distance between elements within the buffer - * - * @see Reference Page - */ - public static void glBindVertexBuffer(@NativeType("GLuint") int bindingindex, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizei") int stride) { - GL43C.glBindVertexBuffer(bindingindex, buffer, offset, stride); - } - - // --- [ glVertexAttribFormat ] --- - - /** - * Specifies the organization of data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param normalized if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is - * directly converted to floating point. - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static void glVertexAttribFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int relativeoffset) { - GL43C.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); - } - - // --- [ glVertexAttribIFormat ] --- - - /** - * Specifies the organization of pure integer data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static void glVertexAttribIFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL43C.glVertexAttribIFormat(attribindex, size, type, relativeoffset); - } - - // --- [ glVertexAttribLFormat ] --- - - /** - * Specifies the organization of 64-bit double data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static void glVertexAttribLFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL43C.glVertexAttribLFormat(attribindex, size, type, relativeoffset); - } - - // --- [ glVertexAttribBinding ] --- - - /** - * Associate a vertex attribute and a vertex buffer binding. - * - * @param attribindex the index of the attribute to associate with a vertex buffer binding - * @param bindingindex the index of the vertex buffer binding with which to associate the generic vertex attribute - * - * @see Reference Page - */ - public static void glVertexAttribBinding(@NativeType("GLuint") int attribindex, @NativeType("GLuint") int bindingindex) { - GL43C.glVertexAttribBinding(attribindex, bindingindex); - } - - // --- [ glVertexBindingDivisor ] --- - - /** - * Modifies the rate at which generic vertex attributes advance during instanced rendering. - * - * @param bindingindex the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - * - * @see Reference Page - */ - public static void glVertexBindingDivisor(@NativeType("GLuint") int bindingindex, @NativeType("GLuint") int divisor) { - GL43C.glVertexBindingDivisor(bindingindex, divisor); - } - - /** - * Array version of: {@link #glClearBufferData ClearBufferData} - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Array version of: {@link #glClearBufferData ClearBufferData} - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Array version of: {@link #glClearBufferData ClearBufferData} - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL43C.glClearBufferData(target, internalformat, format, type, data); - } - - /** - * Array version of: {@link #glClearBufferSubData ClearBufferSubData} - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Array version of: {@link #glClearBufferSubData ClearBufferSubData} - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Array version of: {@link #glClearBufferSubData ClearBufferSubData} - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL43C.glClearBufferSubData(target, internalformat, offset, size, format, type, data); - } - - /** - * Array version of: {@link #glDebugMessageControl DebugMessageControl} - * - * @see Reference Page - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") int[] ids, @NativeType("GLboolean") boolean enabled) { - GL43C.glDebugMessageControl(source, type, severity, ids, enabled); - } - - /** - * Array version of: {@link #glGetDebugMessageLog GetDebugMessageLog} - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetDebugMessageLog(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") int[] sources, @Nullable @NativeType("GLenum *") int[] types, @Nullable @NativeType("GLuint *") int[] ids, @Nullable @NativeType("GLenum *") int[] severities, @Nullable @NativeType("GLsizei *") int[] lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - return GL43C.glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); - } - - /** - * Array version of: {@link #glGetObjectLabel GetObjectLabel} - * - * @see Reference Page - */ - public static void glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectLabel(identifier, name, length, label); - } - - /** - * Array version of: {@link #glGetObjectPtrLabel GetObjectPtrLabel} - * - * @see Reference Page - */ - public static void glGetObjectPtrLabel(@NativeType("void *") long ptr, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectPtrLabel(ptr, length, label); - } - - /** - * Array version of: {@link #glGetFramebufferParameteriv GetFramebufferParameteriv} - * - * @see Reference Page - */ - public static void glGetFramebufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL43C.glGetFramebufferParameteriv(target, pname, params); - } - - /** - * Array version of: {@link #glGetInternalformati64v GetInternalformati64v} - * - * @see Reference Page - */ - public static void glGetInternalformati64v(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL43C.glGetInternalformati64v(target, internalformat, pname, params); - } - - /** - * Array version of: {@link #glInvalidateFramebuffer InvalidateFramebuffer} - * - * @see Reference Page - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int[] attachments) { - GL43C.glInvalidateFramebuffer(target, attachments); - } - - /** - * Array version of: {@link #glInvalidateSubFramebuffer InvalidateSubFramebuffer} - * - * @see Reference Page - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int[] attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL43C.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); - } - - /** - * Array version of: {@link #glMultiDrawArraysIndirect MultiDrawArraysIndirect} - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Array version of: {@link #glMultiDrawElementsIndirect MultiDrawElementsIndirect} - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - GL43C.glMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Array version of: {@link #glGetProgramInterfaceiv GetProgramInterfaceiv} - * - * @see Reference Page - */ - public static void glGetProgramInterfaceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL43C.glGetProgramInterfaceiv(program, programInterface, pname, params); - } - - /** - * Array version of: {@link #glGetProgramResourceName GetProgramResourceName} - * - * @see Reference Page - */ - public static void glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - GL43C.glGetProgramResourceName(program, programInterface, index, length, name); - } - - /** - * Array version of: {@link #glGetProgramResourceiv GetProgramResourceiv} - * - * @see Reference Page - */ - public static void glGetProgramResourceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") int[] props, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] params) { - GL43C.glGetProgramResourceiv(program, programInterface, index, props, length, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL43C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL43C.java deleted file mode 100644 index ef8f189a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL43C.java +++ /dev/null @@ -1,2382 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.3. Includes only Core Profile symbols. - * - *

    OpenGL 4.3 implementations support revision 4.30 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL43C extends GL42C { - - static { GL.initialize(); } - - /** No. of supported Shading Language Versions. Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9; - - /** Vertex attrib array has unconverted doubles. Accepted by the {@code pname} parameter of GetVertexAttribiv. */ - public static final int GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E; - - /** Accepted by the {@code internalformat} parameter of CompressedTexImage2D. */ - public static final int - GL_COMPRESSED_RGB8_ETC2 = 0x9274, - GL_COMPRESSED_SRGB8_ETC2 = 0x9275, - GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, - GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, - GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, - GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, - GL_COMPRESSED_R11_EAC = 0x9270, - GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, - GL_COMPRESSED_RG11_EAC = 0x9272, - GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; - - /** Accepted by the {@code target} parameter of Enable and Disable. */ - public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, GetQueryIndexediv and GetQueryiv. */ - public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; - - /** Accepted by the {@code value} parameter of the GetInteger* functions. */ - public static final int GL_MAX_ELEMENT_INDEX = 0x8D6B; - - /** Accepted by the {@code pname} parameters of GetTexParameterfv and GetTexParameteriv. */ - public static final int GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; - - /** Accepted by the {@code type} parameter of CreateShader and returned in the {@code params} parameter by GetShaderiv. */ - public static final int GL_COMPUTE_SHADER = 0x91B9; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, - GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, - GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, - GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, - GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, - GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, - GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, - GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, - GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleani_v, GetFloati_v, GetDoublei_v and GetInteger64i_v. */ - public static final int - GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, - GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; - - /** Accepted by the {@code pname} parameter of GetActiveUniformBlockiv. */ - public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; - - /** Accepted by the {@code pname} parameter of GetActiveAtomicCounterBufferiv. */ - public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; - - /** Accepted by the {@code stages} parameter of UseProgramStages. */ - public static final int GL_COMPUTE_SHADER_BIT = 0x20; - - /** Tokens accepted by the {@code target} parameters of Enable, Disable, and IsEnabled. */ - public static final int - GL_DEBUG_OUTPUT = 0x92E0, - GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; - - /** Returned by GetIntegerv when {@code pname} is CONTEXT_FLAGS. */ - public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 0x2; - - /** Tokens accepted by the {@code value} parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, - GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, - GL_DEBUG_LOGGED_MESSAGES = 0x9145, - GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, - GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, - GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, - GL_MAX_LABEL_LENGTH = 0x82E8; - - /** Tokens accepted by the {@code pname} parameter of GetPointerv. */ - public static final int - GL_DEBUG_CALLBACK_FUNCTION = 0x8244, - GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; - - /** - * Tokens accepted or provided by the {@code source} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the {@code sources} parameter - * of GetDebugMessageLog. - */ - public static final int - GL_DEBUG_SOURCE_API = 0x8246, - GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, - GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, - GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, - GL_DEBUG_SOURCE_APPLICATION = 0x824A, - GL_DEBUG_SOURCE_OTHER = 0x824B; - - /** - * Tokens accepted or provided by the {@code type} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the {@code types} parameter of - * GetDebugMessageLog. - */ - public static final int - GL_DEBUG_TYPE_ERROR = 0x824C, - GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, - GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, - GL_DEBUG_TYPE_PORTABILITY = 0x824F, - GL_DEBUG_TYPE_PERFORMANCE = 0x8250, - GL_DEBUG_TYPE_OTHER = 0x8251, - GL_DEBUG_TYPE_MARKER = 0x8268; - - /** Tokens accepted or provided by the {@code type} parameters of DebugMessageControl and DEBUGPROC, and the {@code types} parameter of GetDebugMessageLog. */ - public static final int - GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, - GL_DEBUG_TYPE_POP_GROUP = 0x826A; - - /** - * Tokens accepted or provided by the {@code severity} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the - * {@code severities} parameter of GetDebugMessageLog. - */ - public static final int - GL_DEBUG_SEVERITY_HIGH = 0x9146, - GL_DEBUG_SEVERITY_MEDIUM = 0x9147, - GL_DEBUG_SEVERITY_LOW = 0x9148, - GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; - - /** Tokens accepted or provided by the {@code identifier} parameters of ObjectLabel and GetObjectLabel. */ - public static final int - GL_BUFFER = 0x82E0, - GL_SHADER = 0x82E1, - GL_PROGRAM = 0x82E2, - GL_QUERY = 0x82E3, - GL_PROGRAM_PIPELINE = 0x82E4, - GL_SAMPLER = 0x82E6; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, and GetInteger64v. */ - public static final int GL_MAX_UNIFORM_LOCATIONS = 0x826E; - - /** - * Accepted by the {@code pname} parameter of FramebufferParameteri, GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and - * GetNamedFramebufferParameterivEXT. - */ - public static final int - GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, - GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, - GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, - GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, - GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, - GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, - GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, - GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; - - /** Accepted by the {@code pname} parameter of GetInternalformativ and GetInternalformati64v. */ - public static final int - GL_INTERNALFORMAT_SUPPORTED = 0x826F, - GL_INTERNALFORMAT_PREFERRED = 0x8270, - GL_INTERNALFORMAT_RED_SIZE = 0x8271, - GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, - GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, - GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, - GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, - GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, - GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, - GL_INTERNALFORMAT_RED_TYPE = 0x8278, - GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, - GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, - GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, - GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, - GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, - GL_MAX_WIDTH = 0x827E, - GL_MAX_HEIGHT = 0x827F, - GL_MAX_DEPTH = 0x8280, - GL_MAX_LAYERS = 0x8281, - GL_MAX_COMBINED_DIMENSIONS = 0x8282, - GL_COLOR_COMPONENTS = 0x8283, - GL_DEPTH_COMPONENTS = 0x8284, - GL_STENCIL_COMPONENTS = 0x8285, - GL_COLOR_RENDERABLE = 0x8286, - GL_DEPTH_RENDERABLE = 0x8287, - GL_STENCIL_RENDERABLE = 0x8288, - GL_FRAMEBUFFER_RENDERABLE = 0x8289, - GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, - GL_FRAMEBUFFER_BLEND = 0x828B, - GL_READ_PIXELS = 0x828C, - GL_READ_PIXELS_FORMAT = 0x828D, - GL_READ_PIXELS_TYPE = 0x828E, - GL_TEXTURE_IMAGE_FORMAT = 0x828F, - GL_TEXTURE_IMAGE_TYPE = 0x8290, - GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, - GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, - GL_MIPMAP = 0x8293, - GL_MANUAL_GENERATE_MIPMAP = 0x8294, - GL_AUTO_GENERATE_MIPMAP = 0x8295, - GL_COLOR_ENCODING = 0x8296, - GL_SRGB_READ = 0x8297, - GL_SRGB_WRITE = 0x8298, - GL_FILTER = 0x829A, - GL_VERTEX_TEXTURE = 0x829B, - GL_TESS_CONTROL_TEXTURE = 0x829C, - GL_TESS_EVALUATION_TEXTURE = 0x829D, - GL_GEOMETRY_TEXTURE = 0x829E, - GL_FRAGMENT_TEXTURE = 0x829F, - GL_COMPUTE_TEXTURE = 0x82A0, - GL_TEXTURE_SHADOW = 0x82A1, - GL_TEXTURE_GATHER = 0x82A2, - GL_TEXTURE_GATHER_SHADOW = 0x82A3, - GL_SHADER_IMAGE_LOAD = 0x82A4, - GL_SHADER_IMAGE_STORE = 0x82A5, - GL_SHADER_IMAGE_ATOMIC = 0x82A6, - GL_IMAGE_TEXEL_SIZE = 0x82A7, - GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, - GL_IMAGE_PIXEL_FORMAT = 0x82A9, - GL_IMAGE_PIXEL_TYPE = 0x82AA, - GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, - GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, - GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, - GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, - GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, - GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, - GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, - GL_CLEAR_BUFFER = 0x82B4, - GL_TEXTURE_VIEW = 0x82B5, - GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; - - /** Returned as possible responses for various {@code pname} queries to GetInternalformativ and GetInternalformati64v. */ - public static final int - GL_FULL_SUPPORT = 0x82B7, - GL_CAVEAT_SUPPORT = 0x82B8, - GL_IMAGE_CLASS_4_X_32 = 0x82B9, - GL_IMAGE_CLASS_2_X_32 = 0x82BA, - GL_IMAGE_CLASS_1_X_32 = 0x82BB, - GL_IMAGE_CLASS_4_X_16 = 0x82BC, - GL_IMAGE_CLASS_2_X_16 = 0x82BD, - GL_IMAGE_CLASS_1_X_16 = 0x82BE, - GL_IMAGE_CLASS_4_X_8 = 0x82BF, - GL_IMAGE_CLASS_2_X_8 = 0x82C0, - GL_IMAGE_CLASS_1_X_8 = 0x82C1, - GL_IMAGE_CLASS_11_11_10 = 0x82C2, - GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, - GL_VIEW_CLASS_128_BITS = 0x82C4, - GL_VIEW_CLASS_96_BITS = 0x82C5, - GL_VIEW_CLASS_64_BITS = 0x82C6, - GL_VIEW_CLASS_48_BITS = 0x82C7, - GL_VIEW_CLASS_32_BITS = 0x82C8, - GL_VIEW_CLASS_24_BITS = 0x82C9, - GL_VIEW_CLASS_16_BITS = 0x82CA, - GL_VIEW_CLASS_8_BITS = 0x82CB, - GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, - GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, - GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, - GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, - GL_VIEW_CLASS_RGTC1_RED = 0x82D0, - GL_VIEW_CLASS_RGTC2_RG = 0x82D1, - GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, - GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; - - /** - * Accepted by the {@code programInterface} parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, - * GetProgramResourceLocation, and GetProgramResourceLocationIndex. - */ - public static final int - GL_UNIFORM = 0x92E1, - GL_UNIFORM_BLOCK = 0x92E2, - GL_PROGRAM_INPUT = 0x92E3, - GL_PROGRAM_OUTPUT = 0x92E4, - GL_BUFFER_VARIABLE = 0x92E5, - GL_SHADER_STORAGE_BLOCK = 0x92E6, - GL_VERTEX_SUBROUTINE = 0x92E8, - GL_TESS_CONTROL_SUBROUTINE = 0x92E9, - GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, - GL_GEOMETRY_SUBROUTINE = 0x92EB, - GL_FRAGMENT_SUBROUTINE = 0x92EC, - GL_COMPUTE_SUBROUTINE = 0x92ED, - GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, - GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, - GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, - GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, - GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, - GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, - GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; - - /** Accepted by the {@code pname} parameter of GetProgramInterfaceiv. */ - public static final int - GL_ACTIVE_RESOURCES = 0x92F5, - GL_MAX_NAME_LENGTH = 0x92F6, - GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, - GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; - - /** Accepted in the {@code props} array of GetProgramResourceiv. */ - public static final int - GL_NAME_LENGTH = 0x92F9, - GL_TYPE = 0x92FA, - GL_ARRAY_SIZE = 0x92FB, - GL_OFFSET = 0x92FC, - GL_BLOCK_INDEX = 0x92FD, - GL_ARRAY_STRIDE = 0x92FE, - GL_MATRIX_STRIDE = 0x92FF, - GL_IS_ROW_MAJOR = 0x9300, - GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, - GL_BUFFER_BINDING = 0x9302, - GL_BUFFER_DATA_SIZE = 0x9303, - GL_NUM_ACTIVE_VARIABLES = 0x9304, - GL_ACTIVE_VARIABLES = 0x9305, - GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, - GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, - GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, - GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, - GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, - GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, - GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, - GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, - GL_LOCATION = 0x930E, - GL_LOCATION_INDEX = 0x930F, - GL_IS_PER_PATCH = 0x92E7; - - /** Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv. */ - public static final int GL_SHADER_STORAGE_BUFFER = 0x90D2; - - /** - * Accepted by the {@code pname} parameter of GetIntegerv, GetIntegeri_v, GetBooleanv, GetInteger64v, GetFloatv, GetDoublev, GetBooleani_v, GetIntegeri_v, - * GetFloati_v, GetDoublei_v, and GetInteger64i_v. - */ - public static final int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; - - /** Accepted by the {@code pname} parameter of GetIntegeri_v, GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. */ - public static final int - GL_SHADER_STORAGE_BUFFER_START = 0x90D4, - GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, - GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, - GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, - GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, - GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, - GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, - GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, - GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, - GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, - GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; - - /** Accepted in the {@code barriers} bitfield in glMemoryBarrier. */ - public static final int GL_SHADER_STORAGE_BARRIER_BIT = 0x2000; - - /** Alias for the existing token MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS. */ - public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; - - /** Accepted by the {@code pname} parameter of TexParameter* and GetTexParameter*. */ - public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_BUFFER_OFFSET = 0x919D, - GL_TEXTURE_BUFFER_SIZE = 0x919E; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; - - /** Accepted by the {@code pname} parameters of GetTexParameterfv and GetTexParameteriv. */ - public static final int - GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, - GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, - GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, - GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE; - - /** Accepted by the {@code pname} parameter of GetVertexAttrib*v. */ - public static final int - GL_VERTEX_ATTRIB_BINDING = 0x82D4, - GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; - - /** Accepted by the {@code target} parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. */ - public static final int - GL_VERTEX_BINDING_DIVISOR = 0x82D6, - GL_VERTEX_BINDING_OFFSET = 0x82D7, - GL_VERTEX_BINDING_STRIDE = 0x82D8, - GL_VERTEX_BINDING_BUFFER = 0x8F4F; - - /** Accepted by the {@code pname} parameter of GetIntegerv, .... */ - public static final int - GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, - GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; - - protected GL43C() { - throw new UnsupportedOperationException(); - } - - // --- [ glClearBufferData ] --- - - /** Unsafe version of: {@link #glClearBufferData ClearBufferData} */ - public static native void nglClearBufferData(int target, int internalformat, int format, int type, long data); - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearBufferData(target, internalformat, format, type, memAddressSafe(data)); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearBufferData(target, internalformat, format, type, memAddressSafe(data)); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearBufferData(target, internalformat, format, type, memAddressSafe(data)); - } - - /** - * Fills a buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearBufferData(target, internalformat, format, type, memAddressSafe(data)); - } - - // --- [ glClearBufferSubData ] --- - - /** Unsafe version of: {@link #glClearBufferSubData ClearBufferSubData} */ - public static native void nglClearBufferSubData(int target, int internalformat, long offset, long size, int format, int type, long data); - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearBufferSubData(target, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearBufferSubData(target, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearBufferSubData(target, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * Fills all or part of buffer object's data store with a fixed value. - * - * @param target the target of the operation. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link #GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearBufferSubData(target, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - // --- [ glDispatchCompute ] --- - - /** - * Launches one or more compute work groups. - * - * @param num_groups_x the number of work groups to be launched in the X dimension - * @param num_groups_y the number of work groups to be launched in the Y dimension - * @param num_groups_z the number of work groups to be launched in the Z dimension - * - * @see Reference Page - */ - public static native void glDispatchCompute(@NativeType("GLuint") int num_groups_x, @NativeType("GLuint") int num_groups_y, @NativeType("GLuint") int num_groups_z); - - // --- [ glDispatchComputeIndirect ] --- - - /** - * Launches one or more compute work groups using parameters stored in a buffer. - * - *

    The parameters addressed by indirect are packed a structure, which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint num_groups_x;
    -     *     uint num_groups_y;
    -     *     uint num_groups_z;
    -     * } DispatchIndirectCommand;
    - * - *

    A call to {@code glDispatchComputeIndirect} is equivalent, assuming no errors are generated, to:

    - * - *
    
    -     * cmd = (const DispatchIndirectCommand *)indirect;
    -     * glDispatchCompute(cmd->num_groups_x, cmd->num_groups_y, cmd->num_groups_z);
    - * - * @param indirect the offset into the buffer object currently bound to the {@link #GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER} buffer target at which the dispatch parameters are - * stored. - * - * @see Reference Page - */ - public static native void glDispatchComputeIndirect(@NativeType("GLintptr") long indirect); - - // --- [ glCopyImageSubData ] --- - - /** - * Performs a raw data copy between two images. - * - * @param srcName the name of a texture or renderbuffer object from which to copy - * @param srcTarget the target representing the namespace of the source name {@code srcName} - * @param srcLevel the mipmap level to read from the source - * @param srcX the X coordinate of the left edge of the souce region to copy - * @param srcY the Y coordinate of the top edge of the souce region to copy - * @param srcZ the Z coordinate of the near edge of the souce region to copy - * @param dstName the name of a texture or renderbuffer object to which to copy - * @param dstTarget the target representing the namespace of the destination name {@code dstName} - * @param dstLevel the mipmap level to write to the source - * @param dstX the X coordinate of the left edge of the destination region - * @param dstY the Y coordinate of the top edge of the destination region - * @param dstZ the Z coordinate of the near edge of the destination region - * @param srcWidth the width of the region to be copied - * @param srcHeight the height of the region to be copied - * @param srcDepth the depth of the region to be copied - * - * @see Reference Page - */ - public static native void glCopyImageSubData(@NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int srcWidth, @NativeType("GLsizei") int srcHeight, @NativeType("GLsizei") int srcDepth); - - // --- [ glDebugMessageControl ] --- - - /** - * Unsafe version of: {@link #glDebugMessageControl DebugMessageControl} - * - * @param count the length of the array {@code ids} - */ - public static native void nglDebugMessageControl(int source, int type, int severity, int count, long ids, boolean enabled); - - /** - * Controls the volume of debug output in the active debug group, by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source}, {@code type}, or {@code severity} is {@link GL11#GL_DONT_CARE DONT_CARE}, the messages from all sources, of all types, or of all severities are - * referenced respectively.
    • - *
    • When values other than {@link GL11#GL_DONT_CARE DONT_CARE} are specified, all messages whose source, type, or severity match the specified {@code source}, {@code type}, - * or {@code severity} respectively will be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated.
    • - *
    - * - *

    Unrecognized message IDs in {@code ids} are ignored. If {@code count} is zero, the value if {@code ids} is ignored.

    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - *

    If the {@link #GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled the GL operates the same as if messages of every {@code source}, {@code type} or {@code severity} are disabled.

    - * - * @param source the source of debug messages to enable or disable. One of:
    {@link #GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link #GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link #GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link #GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of debug messages to enable or disable. One of:
    {@link #GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link #GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link #GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link #GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link #GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param severity the severity of debug messages to enable or disable. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link #GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link #GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link #GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param ids an array of unsigned integers containing the ids of the messages to enable or disable - * @param enabled whether the selected messages should be enabled or disabled - * - * @see Reference Page - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") IntBuffer ids, @NativeType("GLboolean") boolean enabled) { - nglDebugMessageControl(source, type, severity, remainingSafe(ids), memAddressSafe(ids), enabled); - } - - /** - * Controls the volume of debug output in the active debug group, by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source}, {@code type}, or {@code severity} is {@link GL11#GL_DONT_CARE DONT_CARE}, the messages from all sources, of all types, or of all severities are - * referenced respectively.
    • - *
    • When values other than {@link GL11#GL_DONT_CARE DONT_CARE} are specified, all messages whose source, type, or severity match the specified {@code source}, {@code type}, - * or {@code severity} respectively will be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated.
    • - *
    - * - *

    Unrecognized message IDs in {@code ids} are ignored. If {@code count} is zero, the value if {@code ids} is ignored.

    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - *

    If the {@link #GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled the GL operates the same as if messages of every {@code source}, {@code type} or {@code severity} are disabled.

    - * - * @param source the source of debug messages to enable or disable. One of:
    {@link #GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link #GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link #GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link #GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of debug messages to enable or disable. One of:
    {@link #GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link #GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link #GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link #GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link #GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param severity the severity of debug messages to enable or disable. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link #GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link #GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link #GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param enabled whether the selected messages should be enabled or disabled - * - * @see Reference Page - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @NativeType("GLuint const *") int id, @NativeType("GLboolean") boolean enabled) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.ints(id); - nglDebugMessageControl(source, type, severity, 1, memAddress(ids), enabled); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDebugMessageInsert ] --- - - /** - * Unsafe version of: {@link #glDebugMessageInsert DebugMessageInsert} - * - * @param length the length of the string contained in the character array whose address is given by {@code message} - */ - public static native void nglDebugMessageInsert(int source, int type, int id, int severity, int length, long message); - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the caller. The string - * {@code buf} contains the string representation of the message. The parameter {@code length} contains the number of characters in {@code buf}. If - * {@code length} is negative, it is implied that {@code buf} contains a null terminated string. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the - * number of characters in {@code buf}, excluding the null terminator when {@code length} is negative, is not less than the value of - * {@link #GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - *

    If the {@link #GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled calls to DebugMessageInsert are discarded and do not generate an error.

    - * - * @param source the source of the debug message to insert. One of:
    {@link #GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link #GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link #GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link #GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of the debug message insert. One of:
    {@link #GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link #GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link #GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link #GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link #GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param id the user-supplied identifier of the message to insert. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link #GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link #GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link #GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param severity the severity of the debug messages to insert - * @param message a character array containing the message to insert - * - * @see Reference Page - */ - public static void glDebugMessageInsert(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") ByteBuffer message) { - nglDebugMessageInsert(source, type, id, severity, message.remaining(), memAddress(message)); - } - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the caller. The string - * {@code buf} contains the string representation of the message. The parameter {@code length} contains the number of characters in {@code buf}. If - * {@code length} is negative, it is implied that {@code buf} contains a null terminated string. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the - * number of characters in {@code buf}, excluding the null terminator when {@code length} is negative, is not less than the value of - * {@link #GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - *

    If the {@link #GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled calls to DebugMessageInsert are discarded and do not generate an error.

    - * - * @param source the source of the debug message to insert. One of:
    {@link #GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link #GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link #GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link #GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of the debug message insert. One of:
    {@link #GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link #GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link #GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link #GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link #GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link #GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link #GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param id the user-supplied identifier of the message to insert. One of:
    {@link #GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link #GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link #GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link #GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param severity the severity of the debug messages to insert - * @param message a character array containing the message to insert - * - * @see Reference Page - */ - public static void glDebugMessageInsert(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") CharSequence message) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int messageEncodedLength = stack.nUTF8(message, false); - long messageEncoded = stack.getPointerAddress(); - nglDebugMessageInsert(source, type, id, severity, messageEncodedLength, messageEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDebugMessageCallback ] --- - - /** Unsafe version of: {@link #glDebugMessageCallback DebugMessageCallback} */ - public static native void nglDebugMessageCallback(long callback, long userParam); - - /** - * Specifies a callback to receive debugging messages from the GL. - * - *

    The function's prototype must follow the type definition of DEBUGPROC including its platform-dependent calling convention. Anything else will result in - * undefined behavior. Only one debug callback can be specified for the current context, and further calls overwrite the previous callback. Specifying - * {@code NULL} as the value of {@code callback} clears the current callback and disables message output through callbacks. Applications can provide - * user-specified data through the pointer {@code userParam}. The context will store this pointer and will include it as one of the parameters in each call - * to the callback function.

    - * - *

    If the application has specified a callback function for receiving debug output, the implementation will call that function whenever any enabled message - * is generated. The source, type, ID, and severity of the message are specified by the DEBUGPROC parameters {@code source}, {@code type}, {@code id}, and - * {@code severity}, respectively. The string representation of the message is stored in {@code message} and its length (excluding the null-terminator) is - * stored in {@code length}. The parameter {@code userParam} is the user-specified parameter that was given when calling DebugMessageCallback.

    - * - *

    Applications can query the current callback function and the current user-specified parameter by obtaining the values of {@link #GL_DEBUG_CALLBACK_FUNCTION DEBUG_CALLBACK_FUNCTION} and - * {@link #GL_DEBUG_CALLBACK_USER_PARAM DEBUG_CALLBACK_USER_PARAM}, respectively.

    - * - *

    Applications that specify a callback function must be aware of certain special conditions when executing code inside a callback when it is called by the - * GL, regardless of the debug source.

    - * - *

    The memory for {@code message} is owned and managed by the GL, and should only be considered valid for the duration of the function call.

    - * - *

    The behavior of calling any GL or window system function from within the callback function is undefined and may lead to program termination.

    - * - *

    Care must also be taken in securing debug callbacks for use with asynchronous debug output by multi-threaded GL implementations.

    - * - *

    If the {@link #GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled then the GL will not call the callback function.

    - * - * @param callback a callback function that will be called when a debug message is generated - * @param userParam a user supplied pointer that will be passed on each invocation of {@code callback} - * - * @see Reference Page - */ - public static void glDebugMessageCallback(@Nullable @NativeType("GLDEBUGPROC") GLDebugMessageCallbackI callback, @NativeType("void const *") long userParam) { - nglDebugMessageCallback(memAddressSafe(callback), userParam); - } - - // --- [ glGetDebugMessageLog ] --- - - /** - * Unsafe version of: {@link #glGetDebugMessageLog GetDebugMessageLog} - * - * @param bufsize the size of the buffer whose address is given by {@code messageLog} - */ - public static native int nglGetDebugMessageLog(int count, int bufsize, long sources, long types, long ids, long severities, long lengths, long messageLog); - - /** - * Retrieves messages from the debug message log. - * - *

    This function fetches a maximum of {@code count} messages from the message log, and will return the number of messages successfully fetched.

    - * - *

    Messages will be fetched from the log in order of oldest to newest. Those messages that were fetched will be removed from the log.

    - * - *

    The sources, types, severities, IDs, and string lengths of fetched messages will be stored in the application-provided arrays {@code sources}, - * {@code types}, {@code severities}, {@code ids}, and {@code lengths}, respectively. The application is responsible for allocating enough space for each - * array to hold up to {@code count} elements. The string representations of all fetched messages are stored in the {@code messageLog} array. If multiple - * messages are fetched, their strings are concatenated into the same {@code messageLog} array and will be separated by single null terminators. The last - * string in the array will also be null-terminated. The maximum size of {@code messageLog}, including the space used by all null terminators, is given by - * {@code bufSize}. If {@code bufSize} is less than zero and {@code messageLog} is not {@code NULL}, an {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error will be generated. If a message's - * string, including its null terminator, can not fully fit within the {@code messageLog} array's remaining space, then that message and any subsequent - * messages will not be fetched and will remain in the log. The string lengths stored in the array {@code lengths} include the space for the null - * terminator of each string.

    - * - *

    Any or all of the arrays {@code sources}, {@code types}, {@code ids}, {@code severities}, {@code lengths} and {@code messageLog} can also be null - * pointers, which causes the attributes for such arrays to be discarded when messages are fetched, however those messages will still be removed from the - * log. Thus to simply delete up to {@code count} messages from the message log while ignoring their attributes, the application can call the function - * with null pointers for all attribute arrays.

    - * - *

    If the context was created without the {@link #GL_CONTEXT_FLAG_DEBUG_BIT CONTEXT_FLAG_DEBUG_BIT} in the {@link GL30#GL_CONTEXT_FLAGS CONTEXT_FLAGS} state, then the GL can opt to never add messages to the - * message log so GetDebugMessageLog will always return zero.

    - * - * @param count the number of debug messages to retrieve from the log - * @param sources an array of variables to receive the sources of the retrieved messages - * @param types an array of variables to receive the types of the retrieved messages - * @param ids an array of unsigned integers to receive the ids of the retrieved messages - * @param severities an array of variables to receive the severites of the retrieved messages - * @param lengths an array of variables to receive the lengths of the received messages - * @param messageLog an array of characters that will receive the messages - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetDebugMessageLog(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") IntBuffer sources, @Nullable @NativeType("GLenum *") IntBuffer types, @Nullable @NativeType("GLuint *") IntBuffer ids, @Nullable @NativeType("GLenum *") IntBuffer severities, @Nullable @NativeType("GLsizei *") IntBuffer lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - if (CHECKS) { - checkSafe(sources, count); - checkSafe(types, count); - checkSafe(ids, count); - checkSafe(severities, count); - checkSafe(lengths, count); - } - return nglGetDebugMessageLog(count, remainingSafe(messageLog), memAddressSafe(sources), memAddressSafe(types), memAddressSafe(ids), memAddressSafe(severities), memAddressSafe(lengths), memAddressSafe(messageLog)); - } - - // --- [ glPushDebugGroup ] --- - - /** - * Unsafe version of: {@link #glPushDebugGroup PushDebugGroup} - * - * @param length the length of the message to be sent to the debug output stream - */ - public static native void nglPushDebugGroup(int source, int id, int length, long message); - - /** - * Pushes a debug group described by the string {@code message} into the command stream. The value of {@code id} specifies the ID of messages generated. - * The parameter {@code length} contains the number of characters in {@code message}. If {@code length} is negative, it is implied that {@code message} - * contains a null terminated string. The message has the specified {@code source} and {@code id}, {@code type} {@link #GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP}, and - * {@code severity} {@link #GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The GL will put a new debug group on top of the debug group stack which inherits the control of the - * volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any - * additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group. - * - *

    An {@link GL11#GL_INVALID_ENUM INVALID_ENUM} error is generated if the value of {@code source} is neither {@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION} nor {@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}. An - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code length} is negative and the number of characters in {@code message}, excluding the null-terminator, is - * not less than the value of {@link #GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - * @param source the source of the debug message. One of:
    {@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}
    - * @param id the identifier of the message - * @param message a string containing the message to be sent to the debug output stream - * - * @see Reference Page - */ - public static void glPushDebugGroup(@NativeType("GLenum") int source, @NativeType("GLuint") int id, @NativeType("GLchar const *") ByteBuffer message) { - nglPushDebugGroup(source, id, message.remaining(), memAddress(message)); - } - - /** - * Pushes a debug group described by the string {@code message} into the command stream. The value of {@code id} specifies the ID of messages generated. - * The parameter {@code length} contains the number of characters in {@code message}. If {@code length} is negative, it is implied that {@code message} - * contains a null terminated string. The message has the specified {@code source} and {@code id}, {@code type} {@link #GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP}, and - * {@code severity} {@link #GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The GL will put a new debug group on top of the debug group stack which inherits the control of the - * volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any - * additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group. - * - *

    An {@link GL11#GL_INVALID_ENUM INVALID_ENUM} error is generated if the value of {@code source} is neither {@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION} nor {@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}. An - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code length} is negative and the number of characters in {@code message}, excluding the null-terminator, is - * not less than the value of {@link #GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - * @param source the source of the debug message. One of:
    {@link #GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link #GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}
    - * @param id the identifier of the message - * @param message a string containing the message to be sent to the debug output stream - * - * @see Reference Page - */ - public static void glPushDebugGroup(@NativeType("GLenum") int source, @NativeType("GLuint") int id, @NativeType("GLchar const *") CharSequence message) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int messageEncodedLength = stack.nUTF8(message, false); - long messageEncoded = stack.getPointerAddress(); - nglPushDebugGroup(source, id, messageEncodedLength, messageEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glPopDebugGroup ] --- - - /** - * Pops the active debug group. When a debug group is popped, the GL will also generate a debug output message describing its cause based on the - * {@code message} string, the source {@code source}, and an ID {@code id} submitted to the associated {@link #glPushDebugGroup PushDebugGroup} command. {@link #GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP} - * and {@link #GL_DEBUG_TYPE_POP_GROUP DEBUG_TYPE_POP_GROUP} share a single namespace for message {@code id}. {@code severity} has the value {@link #GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The {@code type} - * has the value {@link #GL_DEBUG_TYPE_POP_GROUP DEBUG_TYPE_POP_GROUP}. Popping a debug group restores the debug output volume control of the parent debug group. - * - *

    Attempting to pop the default debug group off the stack generates a {@link GL11#GL_STACK_UNDERFLOW STACK_UNDERFLOW} error; pushing a debug group onto a stack containing - * {@link #GL_MAX_DEBUG_GROUP_STACK_DEPTH MAX_DEBUG_GROUP_STACK_DEPTH} minus one elements will generate a {@link GL11#GL_STACK_OVERFLOW STACK_OVERFLOW} error.

    - * - * @see Reference Page - */ - public static native void glPopDebugGroup(); - - // --- [ glObjectLabel ] --- - - /** - * Unsafe version of: {@link #glObjectLabel ObjectLabel} - * - * @param length the length of the label to be used for the object - */ - public static native void nglObjectLabel(int identifier, int name, int length, long label); - - /** - * Labels a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link #GL_BUFFER BUFFER}{@link #GL_SHADER SHADER}{@link #GL_PROGRAM PROGRAM}{@link #GL_QUERY QUERY}{@link #GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link #GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object to label - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLchar const *") ByteBuffer label) { - nglObjectLabel(identifier, name, label.remaining(), memAddress(label)); - } - - /** - * Labels a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link #GL_BUFFER BUFFER}{@link #GL_SHADER SHADER}{@link #GL_PROGRAM PROGRAM}{@link #GL_QUERY QUERY}{@link #GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link #GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object to label - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLchar const *") CharSequence label) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int labelEncodedLength = stack.nUTF8(label, false); - long labelEncoded = stack.getPointerAddress(); - nglObjectLabel(identifier, name, labelEncodedLength, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetObjectLabel ] --- - - /** - * Unsafe version of: {@link #glGetObjectLabel GetObjectLabel} - * - * @param bufSize the length of the buffer whose address is in {@code label} - */ - public static native void nglGetObjectLabel(int identifier, int name, int bufSize, long length, long label); - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link #GL_BUFFER BUFFER}{@link #GL_SHADER SHADER}{@link #GL_PROGRAM PROGRAM}{@link #GL_QUERY QUERY}{@link #GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link #GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * @param length the address of a variable to receive the length of the object label - * @param label a string that will receive the object label - * - * @see Reference Page - */ - public static void glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer label) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetObjectLabel(identifier, name, label.remaining(), memAddressSafe(length), memAddress(label)); - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link #GL_BUFFER BUFFER}{@link #GL_SHADER SHADER}{@link #GL_PROGRAM PROGRAM}{@link #GL_QUERY QUERY}{@link #GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link #GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * @param bufSize the length of the buffer whose address is in {@code label} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLsizei") int bufSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer label = stack.malloc(bufSize); - nglGetObjectLabel(identifier, name, bufSize, memAddress(length), memAddress(label)); - return memUTF8(label, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link #GL_BUFFER BUFFER}{@link #GL_SHADER SHADER}{@link #GL_PROGRAM PROGRAM}{@link #GL_QUERY QUERY}{@link #GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link #GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name) { - return glGetObjectLabel(identifier, name, GL11.glGetInteger(GL_MAX_LABEL_LENGTH)); - } - - // --- [ glObjectPtrLabel ] --- - - /** - * Unsafe version of: {@link #glObjectPtrLabel ObjectPtrLabel} - * - * @param length the length of the label to be used for the object - */ - public static native void nglObjectPtrLabel(long ptr, int length, long label); - - /** - * Labels a sync object identified by a pointer. - * - * @param ptr a pointer identifying a sync object - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLchar const *") ByteBuffer label) { - if (CHECKS) { - check(ptr); - } - nglObjectPtrLabel(ptr, label.remaining(), memAddress(label)); - } - - /** - * Labels a sync object identified by a pointer. - * - * @param ptr a pointer identifying a sync object - * @param label a string containing the label to assign to the object - * - * @see Reference Page - */ - public static void glObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLchar const *") CharSequence label) { - if (CHECKS) { - check(ptr); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int labelEncodedLength = stack.nUTF8(label, false); - long labelEncoded = stack.getPointerAddress(); - nglObjectPtrLabel(ptr, labelEncodedLength, labelEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetObjectPtrLabel ] --- - - /** - * Unsafe version of: {@link #glGetObjectPtrLabel GetObjectPtrLabel} - * - * @param bufSize the length of the buffer whose address is in {@code label} - */ - public static native void nglGetObjectPtrLabel(long ptr, int bufSize, long length, long label); - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * @param length a variable to receive the length of the object label - * @param label a string that will receive the object label - * - * @see Reference Page - */ - public static void glGetObjectPtrLabel(@NativeType("void *") long ptr, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer label) { - if (CHECKS) { - check(ptr); - checkSafe(length, 1); - } - nglGetObjectPtrLabel(ptr, label.remaining(), memAddressSafe(length), memAddress(label)); - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * @param bufSize the length of the buffer whose address is in {@code label} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLsizei") int bufSize) { - if (CHECKS) { - check(ptr); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer label = stack.malloc(bufSize); - nglGetObjectPtrLabel(ptr, bufSize, memAddress(length), memAddress(label)); - return memUTF8(label, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetObjectPtrLabel(@NativeType("void *") long ptr) { - return glGetObjectPtrLabel(ptr, GL11.glGetInteger(GL_MAX_LABEL_LENGTH)); - } - - // --- [ glFramebufferParameteri ] --- - - /** - * Sets a named parameter of a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be modified. One of:
    {@link #GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link #GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link #GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link #GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link #GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param param the new value for the parameter named {@code pname} - * - * @see Reference Page - */ - public static native void glFramebufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glGetFramebufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetFramebufferParameteriv GetFramebufferParameteriv} */ - public static native void nglGetFramebufferParameteriv(int target, int pname, long params); - - /** - * Retrieves a named parameter from a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link #GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link #GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link #GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link #GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link #GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param params a variable to receive the value of the parameter named {@code pname} - * - * @see Reference Page - */ - public static void glGetFramebufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFramebufferParameteriv(target, pname, memAddress(params)); - } - - /** - * Retrieves a named parameter from a framebuffer. - * - * @param target target of the operation. One of:
    {@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}
    - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link #GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link #GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link #GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link #GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link #GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetFramebufferParameteri(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetFramebufferParameteriv(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetInternalformati64v ] --- - - /** - * Unsafe version of: {@link #glGetInternalformati64v GetInternalformati64v} - * - * @param bufSize the maximum number of values that may be written to params by the function - */ - public static native void nglGetInternalformati64v(int target, int internalformat, int pname, int bufSize, long params); - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * @param params a variable into which to write the retrieved information - * - * @see Reference Page - */ - public static void glGetInternalformati64v(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - nglGetInternalformati64v(target, internalformat, pname, params.remaining(), memAddress(params)); - } - - /** - * Retrieves information about implementation-dependent support for internal formats. - * - * @param target the usage of the internal format. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param internalformat the internal format about which to retrieve information - * @param pname the type of information to query - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetInternalformati64(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetInternalformati64v(target, internalformat, pname, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glInvalidateTexSubImage ] --- - - /** - * Invalidates a region of a texture image. - * - * @param texture the name of a texture object a subregion of which to invalidate - * @param level the level of detail of the texture object within which the region resides - * @param xoffset the X offset of the region to be invalidated - * @param yoffset the Y offset of the region to be invalidated - * @param zoffset the Z offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * @param depth the depth of the region to be invalidated - * - * @see Reference Page - */ - public static native void glInvalidateTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth); - - // --- [ glInvalidateTexImage ] --- - - /** - * Invalidates the entirety of a texture image. - * - * @param texture the name of a texture object to invalidate - * @param level the level of detail of the texture object to invalidate - * - * @see Reference Page - */ - public static native void glInvalidateTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glInvalidateBufferSubData ] --- - - /** - * Invalidates a region of a buffer object's data store. - * - * @param buffer the name of a buffer object, a subrange of whose data store to invalidate - * @param offset the offset within the buffer's data store of the start of the range to be invalidated - * @param length the length of the range within the buffer's data store to be invalidated - * - * @see Reference Page - */ - public static native void glInvalidateBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length); - - // --- [ glInvalidateBufferData ] --- - - /** - * Invalidates the content of a buffer object's data store. - * - * @param buffer the name of a buffer object whose data store to invalidate - * - * @see Reference Page - */ - public static native void glInvalidateBufferData(@NativeType("GLuint") int buffer); - - // --- [ glInvalidateFramebuffer ] --- - - /** - * Unsafe version of: {@link #glInvalidateFramebuffer InvalidateFramebuffer} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static native void nglInvalidateFramebuffer(int target, int numAttachments, long attachments); - - /** - * Invalidate the content some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param attachments the address of an array identifying the attachments to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") IntBuffer attachments) { - nglInvalidateFramebuffer(target, attachments.remaining(), memAddress(attachments)); - } - - /** - * Invalidate the content some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * - * @see Reference Page - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int attachment) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer attachments = stack.ints(attachment); - nglInvalidateFramebuffer(target, 1, memAddress(attachments)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glInvalidateSubFramebuffer ] --- - - /** - * Unsafe version of: {@link #glInvalidateSubFramebuffer InvalidateSubFramebuffer} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static native void nglInvalidateSubFramebuffer(int target, int numAttachments, long attachments, int x, int y, int width, int height); - - /** - * Invalidates the content of a region of some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param attachments an array identifying the attachments to be invalidated - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") IntBuffer attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - nglInvalidateSubFramebuffer(target, attachments.remaining(), memAddress(attachments), x, y, width, height); - } - - /** - * Invalidates the content of a region of some or all of a framebuffer object's attachments. - * - * @param target the target to which the framebuffer is attached. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}
    - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int attachment, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer attachments = stack.ints(attachment); - nglInvalidateSubFramebuffer(target, 1, memAddress(attachments), x, y, width, height); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMultiDrawArraysIndirect ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirect MultiDrawArraysIndirect} */ - public static native void nglMultiDrawArraysIndirect(int mode, long indirect, int drawcount, int stride); - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, drawcount * (stride == 0 ? (4 * 4) : stride)); - } - nglMultiDrawArraysIndirect(mode, memAddress(indirect), drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - nglMultiDrawArraysIndirect(mode, indirect, drawcount, stride); - } - - /** - * Renders multiple sets of primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by {@code indirect} are packed into an array of structures, each element of which takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint first;
    -     *     uint baseInstance;
    -     * } DrawArraysIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawArraysIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawArraysIndirect(mode, (DrawArraysIndirectCommand*)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawArraysIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the number of elements in the array of draw parameter structures - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, (drawcount * (stride == 0 ? (4 * 4) : stride)) >> 2); - } - nglMultiDrawArraysIndirect(mode, memAddress(indirect), drawcount, stride); - } - - // --- [ glMultiDrawElementsIndirect ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirect MultiDrawElementsIndirect} */ - public static native void nglMultiDrawElementsIndirect(int mode, int type, long indirect, int drawcount, int stride); - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, drawcount * (stride == 0 ? (5 * 4) : stride)); - } - nglMultiDrawElementsIndirect(mode, type, memAddress(indirect), drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - nglMultiDrawElementsIndirect(mode, type, indirect, drawcount, stride); - } - - /** - * Renders multiple indexed primitives from array data, taking parameters from memory. - * - *

    The parameters addressed by indirect are packed into a structure that takes the form (in C):

    - * - *
    
    -     * typedef struct {
    -     *     uint count;
    -     *     uint primCount;
    -     *     uint firstIndex;
    -     *     uint baseVertex;
    -     *     uint baseInstance;
    -     * } DrawElementsIndirectCommand;
    - * - *

    A single call to {@code glMultiDrawElementsIndirect} is equivalent, assuming no errors are generated to:

    - * - *
    
    -     * const ubyte *ptr = (const ubyte *)indirect;
    -     * for ( i = 0; i < drawcount; i++ ) {
    -     *     DrawElementsIndirect(mode, type, (DrawElementsIndirectCommand *)ptr);
    -     *     if ( stride == 0 )
    -     *         ptr += sizeof(DrawElementsIndirectCommand);
    -     *     else
    -     *         ptr += stride;
    -     * }
    - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the number of elements in the array addressed by {@code indirect} - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, (drawcount * (stride == 0 ? (5 * 4) : stride)) >> 2); - } - nglMultiDrawElementsIndirect(mode, type, memAddress(indirect), drawcount, stride); - } - - // --- [ glGetProgramInterfaceiv ] --- - - /** Unsafe version of: {@link #glGetProgramInterfaceiv GetProgramInterfaceiv} */ - public static native void nglGetProgramInterfaceiv(int program, int programInterface, int pname, long params); - - /** - * Queries a property of an interface in a program. - * - * @param program the name of a program object whose interface to query - * @param programInterface a token identifying the interface within {@code program} to query. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param pname the name of the parameter within {@code programInterface} to query. One of:
    {@link #GL_ACTIVE_RESOURCES ACTIVE_RESOURCES}{@link #GL_MAX_NAME_LENGTH MAX_NAME_LENGTH}{@link #GL_MAX_NUM_ACTIVE_VARIABLES MAX_NUM_ACTIVE_VARIABLES}
    {@link #GL_MAX_NUM_COMPATIBLE_SUBROUTINES MAX_NUM_COMPATIBLE_SUBROUTINES}
    - * @param params a variable to retrieve the value of {@code pname} for the program interface - * - * @see Reference Page - */ - public static void glGetProgramInterfaceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetProgramInterfaceiv(program, programInterface, pname, memAddress(params)); - } - - /** - * Queries a property of an interface in a program. - * - * @param program the name of a program object whose interface to query - * @param programInterface a token identifying the interface within {@code program} to query. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param pname the name of the parameter within {@code programInterface} to query. One of:
    {@link #GL_ACTIVE_RESOURCES ACTIVE_RESOURCES}{@link #GL_MAX_NAME_LENGTH MAX_NAME_LENGTH}{@link #GL_MAX_NUM_ACTIVE_VARIABLES MAX_NUM_ACTIVE_VARIABLES}
    {@link #GL_MAX_NUM_COMPATIBLE_SUBROUTINES MAX_NUM_COMPATIBLE_SUBROUTINES}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetProgramInterfacei(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetProgramInterfaceiv(program, programInterface, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetProgramResourceIndex ] --- - - /** Unsafe version of: {@link #glGetProgramResourceIndex GetProgramResourceIndex} */ - public static native int nglGetProgramResourceIndex(int program, int programInterface, long name); - - /** - * Queries the index of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {Wcode name}. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param name the name of the resource to query the index of - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetProgramResourceIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetProgramResourceIndex(program, programInterface, memAddress(name)); - } - - /** - * Queries the index of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {Wcode name}. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param name the name of the resource to query the index of - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetProgramResourceIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetProgramResourceIndex(program, programInterface, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetProgramResourceName ] --- - - /** - * Unsafe version of: {@link #glGetProgramResourceName GetProgramResourceName} - * - * @param bufSize the size of the character array whose address is given by {@code name} - */ - public static native void nglGetProgramResourceName(int program, int programInterface, int index, int bufSize, long length, long name); - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * @param length a variable which will receive the length of the resource name - * @param name a character array into which will be written the name of the resource - * - * @see Reference Page - */ - public static void glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetProgramResourceName(program, programInterface, index, name.remaining(), memAddressSafe(length), memAddress(name)); - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * @param bufSize the size of the character array whose address is given by {@code name} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLsizei") int bufSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer length = stack.ints(0); - ByteBuffer name = stack.malloc(bufSize); - nglGetProgramResourceName(program, programInterface, index, bufSize, memAddress(length), memAddress(name)); - return memASCII(name, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Queries the name of an indexed resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the indexed resource. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the index of the resource within {@code programInterface} of {@code program} - * - * @see Reference Page - */ - @NativeType("void") - public static String glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index) { - return glGetProgramResourceName(program, programInterface, index, glGetProgramInterfacei(program, programInterface, GL_MAX_NAME_LENGTH)); - } - - // --- [ glGetProgramResourceiv ] --- - - /** - * Unsafe version of: {@link #glGetProgramResourceiv GetProgramResourceiv} - * - * @param propCount the number of properties in {@code props} - * @param bufSize the size of the integer array whose address is given by {@code params} - */ - public static native void nglGetProgramResourceiv(int program, int programInterface, int index, int propCount, long props, int bufSize, long length, long params); - - /** - * Retrieves values for multiple properties of a single active resource within a program object. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. One of:
    {@link #GL_UNIFORM UNIFORM}{@link #GL_UNIFORM_BLOCK UNIFORM_BLOCK}{@link #GL_PROGRAM_INPUT PROGRAM_INPUT}
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}{@link #GL_BUFFER_VARIABLE BUFFER_VARIABLE}{@link #GL_SHADER_STORAGE_BLOCK SHADER_STORAGE_BLOCK}
    {@link #GL_VERTEX_SUBROUTINE VERTEX_SUBROUTINE}{@link #GL_TESS_CONTROL_SUBROUTINE TESS_CONTROL_SUBROUTINE}{@link #GL_TESS_EVALUATION_SUBROUTINE TESS_EVALUATION_SUBROUTINE}
    {@link #GL_GEOMETRY_SUBROUTINE GEOMETRY_SUBROUTINE}{@link #GL_FRAGMENT_SUBROUTINE FRAGMENT_SUBROUTINE}{@link #GL_COMPUTE_SUBROUTINE COMPUTE_SUBROUTINE}
    {@link #GL_VERTEX_SUBROUTINE_UNIFORM VERTEX_SUBROUTINE_UNIFORM}{@link #GL_TESS_CONTROL_SUBROUTINE_UNIFORM TESS_CONTROL_SUBROUTINE_UNIFORM}{@link #GL_TESS_EVALUATION_SUBROUTINE_UNIFORM TESS_EVALUATION_SUBROUTINE_UNIFORM}
    {@link #GL_GEOMETRY_SUBROUTINE_UNIFORM GEOMETRY_SUBROUTINE_UNIFORM}{@link #GL_FRAGMENT_SUBROUTINE_UNIFORM FRAGMENT_SUBROUTINE_UNIFORM}{@link #GL_COMPUTE_SUBROUTINE_UNIFORM COMPUTE_SUBROUTINE_UNIFORM}
    {@link #GL_TRANSFORM_FEEDBACK_VARYING TRANSFORM_FEEDBACK_VARYING}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}
    - * @param index the active resource index - * @param props an array that will receive the active resource properties - * @param length a variable which will receive the number of values returned - * @param params an array that will receive the property values - * - * @see Reference Page - */ - public static void glGetProgramResourceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") IntBuffer props, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetProgramResourceiv(program, programInterface, index, props.remaining(), memAddress(props), params.remaining(), memAddressSafe(length), memAddress(params)); - } - - // --- [ glGetProgramResourceLocation ] --- - - /** Unsafe version of: {@link #glGetProgramResourceLocation GetProgramResourceLocation} */ - public static native int nglGetProgramResourceLocation(int program, int programInterface, long name); - - /** - * Queries the location of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name} - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetProgramResourceLocation(program, programInterface, memAddress(name)); - } - - /** - * Queries the location of a named resource within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name} - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocation(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetProgramResourceLocation(program, programInterface, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetProgramResourceLocationIndex ] --- - - /** Unsafe version of: {@link #glGetProgramResourceLocationIndex GetProgramResourceLocationIndex} */ - public static native int nglGetProgramResourceLocationIndex(int program, int programInterface, long name); - - /** - * Queries the fragment color index of a named variable within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. Must be:
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}
    - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocationIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetProgramResourceLocationIndex(program, programInterface, memAddress(name)); - } - - /** - * Queries the fragment color index of a named variable within a program. - * - * @param program the name of a program object whose resources to query - * @param programInterface a token identifying the interface within {@code program} containing the resource named {@code name}. Must be:
    {@link #GL_PROGRAM_OUTPUT PROGRAM_OUTPUT}
    - * @param name the name of the resource to query the location of - * - * @see Reference Page - */ - @NativeType("GLint") - public static int glGetProgramResourceLocationIndex(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetProgramResourceLocationIndex(program, programInterface, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glShaderStorageBlockBinding ] --- - - /** - * Changes an active shader storage block binding. - * - * @param program the name of the program containing the block whose binding to change - * @param storageBlockIndex the index storage block within the program - * @param storageBlockBinding the index storage block binding to associate with the specified storage block - * - * @see Reference Page - */ - public static native void glShaderStorageBlockBinding(@NativeType("GLuint") int program, @NativeType("GLuint") int storageBlockIndex, @NativeType("GLuint") int storageBlockBinding); - - // --- [ glTexBufferRange ] --- - - /** - * Binds a range of a buffer's data store to a buffer texture. - * - * @param target the target of the operation. Must be:
    {@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}
    - * @param internalformat the internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * @param offset the offset of the start of the range of the buffer's data store to attach - * @param size the size of the range of the buffer's data store to attach - * - * @see Reference Page - */ - public static native void glTexBufferRange(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size); - - // --- [ glTexStorage2DMultisample ] --- - - /** - * Specifies storage for a two-dimensional multisample texture. - * - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static native void glTexStorage2DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations); - - // --- [ glTexStorage3DMultisample ] --- - - /** - * Specifies storage for a two-dimensional multisample array texture. - * - * @param target the target of the operation. One of:
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}{@link GL32#GL_PROXY_TEXTURE_2D_MULTISAMPLE PROXY_TEXTURE_2D_MULTISAMPLE}
    - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static native void glTexStorage3DMultisample(@NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations); - - // --- [ glTextureView ] --- - - /** - * Initializes a texture as a data alias of another texture's data store. - * - * @param texture the texture object to be initialized as a view - * @param target the target to be used for the newly initialized texture - * @param origtexture the name of a texture object of which to make a view - * @param internalformat the internal format for the newly created view - * @param minlevel the lowest level of detail of the view - * @param numlevels the number of levels of detail to include in the view - * @param minlayer the index of the first layer to include in the view - * @param numlayers the number of layers to include in the view - * - * @see Reference Page - */ - public static native void glTextureView(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLuint") int origtexture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int minlevel, @NativeType("GLuint") int numlevels, @NativeType("GLuint") int minlayer, @NativeType("GLuint") int numlayers); - - // --- [ glBindVertexBuffer ] --- - - /** - * Binds a buffer to a vertex buffer bind point. - * - * @param bindingindex the index of the vertex buffer binding point to which to bind the buffer - * @param buffer the name of an existing buffer to bind to the vertex buffer binding point - * @param offset the offset of the first element of the buffer - * @param stride the distance between elements within the buffer - * - * @see Reference Page - */ - public static native void glBindVertexBuffer(@NativeType("GLuint") int bindingindex, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizei") int stride); - - // --- [ glVertexAttribFormat ] --- - - /** - * Specifies the organization of data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param normalized if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is - * directly converted to floating point. - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static native void glVertexAttribFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexAttribIFormat ] --- - - /** - * Specifies the organization of pure integer data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static native void glVertexAttribIFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexAttribLFormat ] --- - - /** - * Specifies the organization of 64-bit double data in vertex arrays. - * - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static native void glVertexAttribLFormat(@NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexAttribBinding ] --- - - /** - * Associate a vertex attribute and a vertex buffer binding. - * - * @param attribindex the index of the attribute to associate with a vertex buffer binding - * @param bindingindex the index of the vertex buffer binding with which to associate the generic vertex attribute - * - * @see Reference Page - */ - public static native void glVertexAttribBinding(@NativeType("GLuint") int attribindex, @NativeType("GLuint") int bindingindex); - - // --- [ glVertexBindingDivisor ] --- - - /** - * Modifies the rate at which generic vertex attributes advance during instanced rendering. - * - * @param bindingindex the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - * - * @see Reference Page - */ - public static native void glVertexBindingDivisor(@NativeType("GLuint") int bindingindex, @NativeType("GLuint") int divisor); - - /** - * Array version of: {@link #glClearBufferData ClearBufferData} - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearBufferData ClearBufferData} - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearBufferData ClearBufferData} - * - * @see Reference Page - */ - public static void glClearBufferData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearBufferSubData ClearBufferSubData} - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearBufferSubData ClearBufferSubData} - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearBufferSubData ClearBufferSubData} - * - * @see Reference Page - */ - public static void glClearBufferSubData(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(target, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glDebugMessageControl DebugMessageControl} - * - * @see Reference Page - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") int[] ids, @NativeType("GLboolean") boolean enabled) { - long __functionAddress = GL.getICD().glDebugMessageControl; - if (CHECKS) { - check(__functionAddress); - } - callPV(source, type, severity, lengthSafe(ids), ids, enabled, __functionAddress); - } - - /** - * Array version of: {@link #glGetDebugMessageLog GetDebugMessageLog} - * - * @see Reference Page - */ - @NativeType("GLuint") - public static int glGetDebugMessageLog(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") int[] sources, @Nullable @NativeType("GLenum *") int[] types, @Nullable @NativeType("GLuint *") int[] ids, @Nullable @NativeType("GLenum *") int[] severities, @Nullable @NativeType("GLsizei *") int[] lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - long __functionAddress = GL.getICD().glGetDebugMessageLog; - if (CHECKS) { - check(__functionAddress); - checkSafe(sources, count); - checkSafe(types, count); - checkSafe(ids, count); - checkSafe(severities, count); - checkSafe(lengths, count); - } - return callPPPPPPI(count, remainingSafe(messageLog), sources, types, ids, severities, lengths, memAddressSafe(messageLog), __functionAddress); - } - - /** - * Array version of: {@link #glGetObjectLabel GetObjectLabel} - * - * @see Reference Page - */ - public static void glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer label) { - long __functionAddress = GL.getICD().glGetObjectLabel; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(identifier, name, label.remaining(), length, memAddress(label), __functionAddress); - } - - /** - * Array version of: {@link #glGetObjectPtrLabel GetObjectPtrLabel} - * - * @see Reference Page - */ - public static void glGetObjectPtrLabel(@NativeType("void *") long ptr, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer label) { - long __functionAddress = GL.getICD().glGetObjectPtrLabel; - if (CHECKS) { - check(__functionAddress); - check(ptr); - checkSafe(length, 1); - } - callPPPV(ptr, label.remaining(), length, memAddress(label), __functionAddress); - } - - /** - * Array version of: {@link #glGetFramebufferParameteriv GetFramebufferParameteriv} - * - * @see Reference Page - */ - public static void glGetFramebufferParameteriv(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetFramebufferParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetInternalformati64v GetInternalformati64v} - * - * @see Reference Page - */ - public static void glGetInternalformati64v(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetInternalformati64v; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, pname, params.length, params, __functionAddress); - } - - /** - * Array version of: {@link #glInvalidateFramebuffer InvalidateFramebuffer} - * - * @see Reference Page - */ - public static void glInvalidateFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int[] attachments) { - long __functionAddress = GL.getICD().glInvalidateFramebuffer; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, attachments.length, attachments, __functionAddress); - } - - /** - * Array version of: {@link #glInvalidateSubFramebuffer InvalidateSubFramebuffer} - * - * @see Reference Page - */ - public static void glInvalidateSubFramebuffer(@NativeType("GLenum") int target, @NativeType("GLenum const *") int[] attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - long __functionAddress = GL.getICD().glInvalidateSubFramebuffer; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, attachments.length, attachments, x, y, width, height, __functionAddress); - } - - /** - * Array version of: {@link #glMultiDrawArraysIndirect MultiDrawArraysIndirect} - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirect(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - long __functionAddress = GL.getICD().glMultiDrawArraysIndirect; - if (CHECKS) { - check(__functionAddress); - check(indirect, (drawcount * (stride == 0 ? (4 * 4) : stride)) >> 2); - } - callPV(mode, indirect, drawcount, stride, __functionAddress); - } - - /** - * Array version of: {@link #glMultiDrawElementsIndirect MultiDrawElementsIndirect} - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirect(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride) { - long __functionAddress = GL.getICD().glMultiDrawElementsIndirect; - if (CHECKS) { - check(__functionAddress); - check(indirect, (drawcount * (stride == 0 ? (5 * 4) : stride)) >> 2); - } - callPV(mode, type, indirect, drawcount, stride, __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramInterfaceiv GetProgramInterfaceiv} - * - * @see Reference Page - */ - public static void glGetProgramInterfaceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetProgramInterfaceiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, programInterface, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramResourceName GetProgramResourceName} - * - * @see Reference Page - */ - public static void glGetProgramResourceName(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetProgramResourceName; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPV(program, programInterface, index, name.remaining(), length, memAddress(name), __functionAddress); - } - - /** - * Array version of: {@link #glGetProgramResourceiv GetProgramResourceiv} - * - * @see Reference Page - */ - public static void glGetProgramResourceiv(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") int[] props, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetProgramResourceiv; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPPV(program, programInterface, index, props.length, props, params.length, length, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL44.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL44.java deleted file mode 100644 index acc7d264..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL44.java +++ /dev/null @@ -1,1169 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 4.4. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 4.4 implementations support revision 4.40 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL44 extends GL43 { - - static { GL.initialize(); } - - /** Implementation-dependent state which constrains the maximum value of stride parameters to vertex array pointer-setting commands. */ - public static final int GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5; - - /** - * Implementations are not required to support primitive restart for separate patch primitives (primitive type PATCHES). Support can be queried by calling - * GetBooleanv with the symbolic constant PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED. A value of FALSE indicates that primitive restart is treated as - * disabled when drawing patches, no matter the value of the enables. A value of TRUE indicates that primitive restart behaves normally for patches. - */ - public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 0x8221; - - /** Equivalent to {@link ARBTextureBufferObject#GL_TEXTURE_BUFFER_ARB TEXTURE_BUFFER_ARB} query, but named more consistently. */ - public static final int GL_TEXTURE_BUFFER_BINDING = 0x8C2A; - - /** Accepted in the {@code flags} parameter of {@link #glBufferStorage BufferStorage} and {@link ARBBufferStorage#glNamedBufferStorageEXT NamedBufferStorageEXT}. */ - public static final int - GL_MAP_PERSISTENT_BIT = 0x40, - GL_MAP_COHERENT_BIT = 0x80, - GL_DYNAMIC_STORAGE_BIT = 0x100, - GL_CLIENT_STORAGE_BIT = 0x200; - - /** Accepted by the {@code pname} parameter of {@code GetBufferParameter{i|i64}v}. */ - public static final int - GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, - GL_BUFFER_STORAGE_FLAGS = 0x8220; - - /** Accepted by the {@code barriers} parameter of {@link GL42C#glMemoryBarrier MemoryBarrier}. */ - public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x4000; - - /** Accepted by the {@code pname} parameter for {@link GL42C#glGetInternalformativ GetInternalformativ} and {@link GL43C#glGetInternalformati64v GetInternalformati64v}. */ - public static final int GL_CLEAR_TEXTURE = 0x9365; - - /** Accepted in the {@code props} array of {@link GL43C#glGetProgramResourceiv GetProgramResourceiv}. */ - public static final int - GL_LOCATION_COMPONENT = 0x934A, - GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, - GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; - - /** Accepted by the {@code pname} parameter of {@link GL15C#glGetQueryObjectiv GetQueryObjectiv}, {@link GL15C#glGetQueryObjectuiv GetQueryObjectuiv}, {@link GL33C#glGetQueryObjecti64v GetQueryObjecti64v} and {@link GL33C#glGetQueryObjectui64v GetQueryObjectui64v}. */ - public static final int GL_QUERY_RESULT_NO_WAIT = 0x9194; - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBindBuffer BindBuffer}, {@link GL15C#glBufferData BufferData}, {@link GL15C#glBufferSubData BufferSubData}, - * {@link GL15C#glMapBuffer MapBuffer}, {@link GL15C#glUnmapBuffer UnmapBuffer}, {@link GL30C#glMapBufferRange MapBufferRange}, {@link GL15C#glGetBufferSubData GetBufferSubData}, - * {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}, {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}, {@link GL15C#glGetBufferPointerv GetBufferPointerv}, - * {@link GL43C#glClearBufferSubData ClearBufferSubData}, and the {@code readtarget} and {@code writetarget} parameters of {@link GL31C#glCopyBufferSubData CopyBufferSubData}. - */ - public static final int GL_QUERY_BUFFER = 0x9192; - - /** - * Accepted by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetIntegerv GetIntegerv}, {@link GL11C#glGetFloatv GetFloatv}, - * and {@link GL11C#glGetDoublev GetDoublev}. - */ - public static final int GL_QUERY_BUFFER_BINDING = 0x9193; - - /** Accepted in the {@code barriers} bitfield in {@link GL42C#glMemoryBarrier MemoryBarrier}. */ - public static final int GL_QUERY_BUFFER_BARRIER_BIT = 0x8000; - - /** - * Accepted by the {@code param} parameter of TexParameter{if}, SamplerParameter{if} and SamplerParameter{if}v, and by the {@code params} parameter of - * TexParameter{if}v, TexParameterI{i ui}v and SamplerParameterI{i ui}v when their {@code pname} parameter is {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}, {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}, or - * {@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}, - */ - public static final int GL_MIRROR_CLAMP_TO_EDGE = 0x8743; - - protected GL44() { - throw new UnsupportedOperationException(); - } - - // --- [ glBufferStorage ] --- - - /** - * Unsafe version of: {@link #glBufferStorage BufferStorage} - * - * @param size the size of the data store in basic machine units - */ - public static void nglBufferStorage(int target, long size, long data, int flags) { - GL44C.nglBufferStorage(target, size, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param size the size of the data store in basic machine units - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("GLsizeiptr") long size, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, size, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") ByteBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") ShortBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") IntBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") FloatBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44C#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44C#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44C#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44C#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44C#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") DoubleBuffer data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - // --- [ glClearTexSubImage ] --- - - /** Unsafe version of: {@link #glClearTexSubImage ClearTexSubImage} */ - public static void nglClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long data) { - GL44C.nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - // --- [ glClearTexImage ] --- - - /** Unsafe version of: {@link #glClearTexImage ClearTexImage} */ - public static void nglClearTexImage(int texture, int level, int format, int type, long data) { - GL44C.nglClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - // --- [ glBindBuffersBase ] --- - - /** - * Unsafe version of: {@link #glBindBuffersBase BindBuffersBase} - * - * @param count the number of bindings - */ - public static void nglBindBuffersBase(int target, int first, int count, long buffers) { - GL44C.nglBindBuffersBase(target, first, count, buffers); - } - - /** - * Binds {@code count} existing buffer objects to bindings numbered {@code first} through {@code first+count-1} in the array of buffer binding points - * corresponding to {@code target}. If {@code buffers} is not {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name - * of an existing buffer object. It is equivalent to: - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindBufferBase(target, first + i, 0);
    -     *     } else {
    -     *         glBindBufferBase(target, first + i, buffers[i]);
    -     *     }
    -     * }
    - * - *

    except that the single general buffer binding corresponding to {@code target} is unmodified, and that buffers will not be created if they do not exist.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param first the first binding - * @param buffers an array of zeros or names of existing buffers objects - * - * @see Reference Page - */ - public static void glBindBuffersBase(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers) { - GL44C.glBindBuffersBase(target, first, buffers); - } - - // --- [ glBindBuffersRange ] --- - - /** - * Unsafe version of: {@link #glBindBuffersRange BindBuffersRange} - * - * @param count the number of bindings - */ - public static void nglBindBuffersRange(int target, int first, int count, long buffers, long offsets, long sizes) { - GL44C.nglBindBuffersRange(target, first, count, buffers, offsets, sizes); - } - - /** - * Binds {@code count} existing buffer objects to bindings numbered {@code first} through {@code first+count-1} in the array of buffer binding points - * corresponding to {@code target}. {@code offsets} and {@code sizes} specify arrays of {@code count} values indicating the range of each buffer to bind. - * If {@code buffers} is {@code NULL}, all bindings from {@code first} through {@code first+count-1} are reset to their unbound (zero) state. In this - * case, the offsets and sizes associated with the binding points are set to default values, ignoring {@code offsets} and {@code sizes}. It is equivalent - * to: - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindBufferRange(target, first + i, 0, 0, 0);
    -     *     } else {
    -     *         glBindBufferRange(target, first + i, buffers[i], offsets[i], sizes[i]);
    -     *     }
    -     * }
    - * - *

    except that the single general buffer binding corresponding to {@code target} is unmodified, and that buffers will not be created if they do not exist.

    - * - *

    The values specified in {@code buffers}, {@code offsets}, and {@code sizes} will be checked separately for each binding point. When values for a - * specific binding point are invalid, the state for that binding point will be unchanged and an error will be generated. However, state for other binding - * points will still be changed if their corresponding values are valid.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param first the first binding - * @param buffers an array of names of existing buffers objects - * @param offsets an array of offsets - * @param sizes an array of sizes - * - * @see Reference Page - */ - public static void glBindBuffersRange(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizeiptr const *") PointerBuffer sizes) { - GL44C.glBindBuffersRange(target, first, buffers, offsets, sizes); - } - - // --- [ glBindTextures ] --- - - /** - * Unsafe version of: {@link #glBindTextures BindTextures} - * - * @param count the number of texture objects - */ - public static void nglBindTextures(int first, int count, long textures) { - GL44C.nglBindTextures(first, count, textures); - } - - /** - * Binds {@code count} existing texture objects to texture image units numbered {@code first} through {@code first+count-1}. If {@code textures} is not - * {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing texture object. When an entry in - * {@code textures} is the name of an existing texture object, that object is bound to corresponding texture unit for the target specified when the texture - * object was created. When an entry in {@code textures} is zero, each of the targets enumerated at the beginning of this section is reset to its default - * texture for the corresponding texture image unit. If {@code textures} is {@code NULL}, each target of each affected texture image unit from {@code first} - * through {@code first+count-1} is reset to its default texture. - * - *

    {@code BindTextures} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     uint texture;
    -     *     if ( textures == NULL ) {
    -     *         texture = 0;
    -     *     } else {
    -     *         texture = textures[i];
    -     *     }
    -     *     ActiveTexture(TEXTURE0 + first + i);
    -     *     if ( texture != 0 ) {
    -     *         enum target; // target of texture object textures[i]
    -     *         BindTexture(target, textures[i]);
    -     *     } else {
    -     *         for ( target in all supported targets ) {
    -     *             BindTexture(target, 0);
    -     *         }
    -     *     }
    -     * }
    - * - *

    except that the active texture selector retains its original value upon completion of the command, and that textures will not be created if they do not - * exist.

    - * - *

    The values specified in {@code textures} will be checked separately for each texture image unit. When a value for a specific texture image unit is - * invalid, the state for that texture image unit will be unchanged and an error will be generated. However, state for other texture image units will still - * be changed if their corresponding values are valid.

    - * - * @param first the first texture objects - * @param textures an array of zeros or names of existing texture objects - * - * @see Reference Page - */ - public static void glBindTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer textures) { - GL44C.glBindTextures(first, textures); - } - - // --- [ glBindSamplers ] --- - - /** - * Unsafe version of: {@link #glBindSamplers BindSamplers} - * - * @param count the number of sampler objects - */ - public static void nglBindSamplers(int first, int count, long samplers) { - GL44C.nglBindSamplers(first, count, samplers); - } - - /** - * Binds {@code count} existing sampler objects to texture image units numbered {@code first} through {@code first+count-1}. If {@code samplers} is not - * {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing sampler object. If {@code samplers} is {@code NULL}, - * each affected texture image unit from {@code first} through {@code first+count-1} will be reset to have no bound sampler object. - * - *

    {@code BindSamplers} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( samplers == NULL ) {
    -     *         glBindSampler(first + i, 0);
    -     *     } else {
    -     *         glBindSampler(first + i, samplers[i]);
    -     *     }
    -     * }
    - * - *

    The values specified in {@code samplers} will be checked separately for each texture image unit. When a value for a specific texture image unit is - * invalid, the state for that texture image unit will be unchanged and an error will be generated. However, state for other texture image units will still - * be changed if their corresponding values are valid.

    - * - * @param first the first sampler object - * @param samplers an array of zeros or names of existing sampler objects - * - * @see Reference Page - */ - public static void glBindSamplers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer samplers) { - GL44C.glBindSamplers(first, samplers); - } - - // --- [ glBindImageTextures ] --- - - /** - * Unsafe version of: {@link #glBindImageTextures BindImageTextures} - * - * @param count the number of image units - */ - public static void nglBindImageTextures(int first, int count, long textures) { - GL44C.nglBindImageTextures(first, count, textures); - } - - /** - * Binds {@code count} existing texture objects to image units numbered {@code first} through {@code first+count-1}. If {@code textures} is not {@code NULL}, it - * specifies an array of {@code count} values, each of which must be zero or the name of an existing texture object. If {@code textures} is {@code NULL}, each - * affected image unit from {@code first} through {@code first+count-1} will be reset to have no bound texture object. - * - *

    When binding a non-zero texture object to an image unit, the image unit {@code level}, {@code layered}, {@code layer}, and {@code access} parameters are - * set to zero, {@link GL11#GL_TRUE TRUE}, zero, and {@link GL15#GL_READ_WRITE READ_WRITE}, respectively. The image unit {@code format} parameter is taken from the internal - * format of the texture image at level zero of the texture object identified by {@code textures}. For cube map textures, the internal format of the - * {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X} image of level zero is used. For multisample, multisample array, buffer, and rectangle textures, the internal - * format of the single texture level is used.

    - * - *

    When unbinding a texture object from an image unit, the image unit parameters {@code level}, {@code layered}, {@code layer}, and {@code format} will be - * reset to their default values of zero, {@link GL11#GL_FALSE FALSE}, 0, and {@link GL30#GL_R8 R8}, respectively.

    - * - *

    {@code BindImageTextures} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( textures == NULL || textures[i] = 0 ) {
    -     *         glBindImageTexture(first + i, 0, 0, FALSE, 0, READ_ONLY, R8);
    -     *     } else {
    -     *         glBindImageTexture(first + i, textures[i], 0, TRUE, 0, READ_WRITE, lookupInternalFormat(textures[i]));
    -     *     }
    -     * }
    - * - *

    where {@code lookupInternalFormat} returns the internal format of the specified texture object.

    - * - *

    The values specified in {@code textures} will be checked separately for each image unit. When a value for a specific image unit is invalid, the state - * for that image unit will be unchanged and an error will be generated. However, state for other image units will still be changed if their corresponding - * values are valid.

    - * - * @param first the first image unit - * @param textures an array of zeros or names of existing texture objects - * - * @see Reference Page - */ - public static void glBindImageTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer textures) { - GL44C.glBindImageTextures(first, textures); - } - - // --- [ glBindVertexBuffers ] --- - - /** - * Unsafe version of: {@link #glBindVertexBuffers BindVertexBuffers} - * - * @param count the number of vertex buffer binding points - */ - public static void nglBindVertexBuffers(int first, int count, long buffers, long offsets, long strides) { - GL44C.nglBindVertexBuffers(first, count, buffers, offsets, strides); - } - - /** - * Binds {@code count} existing buffer objects to vertex buffer binding points numbered {@code first} through {@code first+count-1}. If {@code buffers} is - * not {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing buffer object. {@code offsets} and - * {@code strides} specify arrays of {@code count} values indicating the offset of the first element and stride between elements in each buffer, - * respectively. If {@code buffers} is {@code NULL}, each affected vertex buffer binding point from {@code first} through {@code first+count-1} will be reset to - * have no bound buffer object. In this case, the offsets and strides associated with the binding points are set to default values, ignoring - * {@code offsets} and {@code strides}. - * - *

    {@code BindVertexBuffers} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindVertexBuffer(first + i, 0, 0, 16);
    -     *     } else {
    -     *         glBindVertexBuffer(first + i, buffers[i], offsets[i], strides[i]);
    -     *     }
    -     * }
    - * - *

    except that buffers will not be created if they do not exist.

    - * - *

    The values specified in {@code buffers}, {@code offsets}, and {@code strides} will be checked separately for each vertex buffer binding point. When a - * value for a specific binding point is invalid, the state for that binding point will be unchanged and an error will be generated. However, state for - * other binding points will still be changed if their corresponding values are valid.

    - * - * @param first the first vertex buffer binding point - * @param buffers an array of zeros or names of existing buffers objects - * @param offsets an array of offses - * @param strides an array of stride values - * - * @see Reference Page - */ - public static void glBindVertexBuffers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") IntBuffer strides) { - GL44C.glBindVertexBuffers(first, buffers, offsets, strides); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") short[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") int[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") float[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") double[] data, @NativeType("GLbitfield") int flags) { - GL44C.glBufferStorage(target, data, flags); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] data) { - GL44C.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] data) { - GL44C.glClearTexImage(texture, level, format, type, data); - } - - /** - * Array version of: {@link #glBindBuffersBase BindBuffersBase} - * - * @see Reference Page - */ - public static void glBindBuffersBase(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers) { - GL44C.glBindBuffersBase(target, first, buffers); - } - - /** - * Array version of: {@link #glBindBuffersRange BindBuffersRange} - * - * @see Reference Page - */ - public static void glBindBuffersRange(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizeiptr const *") PointerBuffer sizes) { - GL44C.glBindBuffersRange(target, first, buffers, offsets, sizes); - } - - /** - * Array version of: {@link #glBindTextures BindTextures} - * - * @see Reference Page - */ - public static void glBindTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] textures) { - GL44C.glBindTextures(first, textures); - } - - /** - * Array version of: {@link #glBindSamplers BindSamplers} - * - * @see Reference Page - */ - public static void glBindSamplers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] samplers) { - GL44C.glBindSamplers(first, samplers); - } - - /** - * Array version of: {@link #glBindImageTextures BindImageTextures} - * - * @see Reference Page - */ - public static void glBindImageTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] textures) { - GL44C.glBindImageTextures(first, textures); - } - - /** - * Array version of: {@link #glBindVertexBuffers BindVertexBuffers} - * - * @see Reference Page - */ - public static void glBindVertexBuffers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") int[] strides) { - GL44C.glBindVertexBuffers(first, buffers, offsets, strides); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL44C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL44C.java deleted file mode 100644 index ae07c1f4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL44C.java +++ /dev/null @@ -1,1239 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.4. Includes only Core Profile symbols. - * - *

    OpenGL 4.4 implementations support revision 4.40 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL44C extends GL43C { - - static { GL.initialize(); } - - /** Implementation-dependent state which constrains the maximum value of stride parameters to vertex array pointer-setting commands. */ - public static final int GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5; - - /** - * Implementations are not required to support primitive restart for separate patch primitives (primitive type PATCHES). Support can be queried by calling - * GetBooleanv with the symbolic constant PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED. A value of FALSE indicates that primitive restart is treated as - * disabled when drawing patches, no matter the value of the enables. A value of TRUE indicates that primitive restart behaves normally for patches. - */ - public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 0x8221; - - /** Equivalent to {@link ARBTextureBufferObject#GL_TEXTURE_BUFFER_ARB TEXTURE_BUFFER_ARB} query, but named more consistently. */ - public static final int GL_TEXTURE_BUFFER_BINDING = 0x8C2A; - - /** Accepted in the {@code flags} parameter of {@link #glBufferStorage BufferStorage} and {@link ARBBufferStorage#glNamedBufferStorageEXT NamedBufferStorageEXT}. */ - public static final int - GL_MAP_PERSISTENT_BIT = 0x40, - GL_MAP_COHERENT_BIT = 0x80, - GL_DYNAMIC_STORAGE_BIT = 0x100, - GL_CLIENT_STORAGE_BIT = 0x200; - - /** Accepted by the {@code pname} parameter of {@code GetBufferParameter{i|i64}v}. */ - public static final int - GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, - GL_BUFFER_STORAGE_FLAGS = 0x8220; - - /** Accepted by the {@code barriers} parameter of {@link GL42C#glMemoryBarrier MemoryBarrier}. */ - public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x4000; - - /** Accepted by the {@code pname} parameter for {@link GL42C#glGetInternalformativ GetInternalformativ} and {@link GL43C#glGetInternalformati64v GetInternalformati64v}. */ - public static final int GL_CLEAR_TEXTURE = 0x9365; - - /** Accepted in the {@code props} array of {@link GL43C#glGetProgramResourceiv GetProgramResourceiv}. */ - public static final int - GL_LOCATION_COMPONENT = 0x934A, - GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, - GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; - - /** Accepted by the {@code pname} parameter of {@link GL15C#glGetQueryObjectiv GetQueryObjectiv}, {@link GL15C#glGetQueryObjectuiv GetQueryObjectuiv}, {@link GL33C#glGetQueryObjecti64v GetQueryObjecti64v} and {@link GL33C#glGetQueryObjectui64v GetQueryObjectui64v}. */ - public static final int GL_QUERY_RESULT_NO_WAIT = 0x9194; - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBindBuffer BindBuffer}, {@link GL15C#glBufferData BufferData}, {@link GL15C#glBufferSubData BufferSubData}, - * {@link GL15C#glMapBuffer MapBuffer}, {@link GL15C#glUnmapBuffer UnmapBuffer}, {@link GL30C#glMapBufferRange MapBufferRange}, {@link GL15C#glGetBufferSubData GetBufferSubData}, - * {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}, {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}, {@link GL15C#glGetBufferPointerv GetBufferPointerv}, - * {@link GL43C#glClearBufferSubData ClearBufferSubData}, and the {@code readtarget} and {@code writetarget} parameters of {@link GL31C#glCopyBufferSubData CopyBufferSubData}. - */ - public static final int GL_QUERY_BUFFER = 0x9192; - - /** - * Accepted by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetIntegerv GetIntegerv}, {@link GL11C#glGetFloatv GetFloatv}, - * and {@link GL11C#glGetDoublev GetDoublev}. - */ - public static final int GL_QUERY_BUFFER_BINDING = 0x9193; - - /** Accepted in the {@code barriers} bitfield in {@link GL42C#glMemoryBarrier MemoryBarrier}. */ - public static final int GL_QUERY_BUFFER_BARRIER_BIT = 0x8000; - - /** - * Accepted by the {@code param} parameter of TexParameter{if}, SamplerParameter{if} and SamplerParameter{if}v, and by the {@code params} parameter of - * TexParameter{if}v, TexParameterI{i ui}v and SamplerParameterI{i ui}v when their {@code pname} parameter is {@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}, {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}, or - * {@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}, - */ - public static final int GL_MIRROR_CLAMP_TO_EDGE = 0x8743; - - protected GL44C() { - throw new UnsupportedOperationException(); - } - - // --- [ glBufferStorage ] --- - - /** - * Unsafe version of: {@link #glBufferStorage BufferStorage} - * - * @param size the size of the data store in basic machine units - */ - public static native void nglBufferStorage(int target, long size, long data, int flags); - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param size the size of the data store in basic machine units - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("GLsizeiptr") long size, @NativeType("GLbitfield") int flags) { - nglBufferStorage(target, size, NULL, flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") ByteBuffer data, @NativeType("GLbitfield") int flags) { - nglBufferStorage(target, data.remaining(), memAddress(data), flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") ShortBuffer data, @NativeType("GLbitfield") int flags) { - nglBufferStorage(target, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data), flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") IntBuffer data, @NativeType("GLbitfield") int flags) { - nglBufferStorage(target, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") FloatBuffer data, @NativeType("GLbitfield") int flags) { - nglBufferStorage(target, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), flags); - } - - /** - * Creates the data store of a buffer object. - * - *

    The data store of the buffer object bound to {@code target} is allocated as a result of a call to this function and cannot be de-allocated until the - * buffer is deleted with a call to {@link GL15C#glDeleteBuffers DeleteBuffers}. Such a store may not be re-allocated through further calls to {@code BufferStorage} - * or {@link GL15C#glBufferData BufferData}.

    - * - *

    {@code BufferStorage} deletes any existing data store. If any portion of the buffer object is mapped in the current context or any context current to - * another thread, it is as though {@link GL15C#glUnmapBuffer UnmapBuffer} is executed in each such context prior to deleting the existing data store.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link #GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link #GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link #GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link #GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link #GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") DoubleBuffer data, @NativeType("GLbitfield") int flags) { - nglBufferStorage(target, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), flags); - } - - // --- [ glClearTexSubImage ] --- - - /** Unsafe version of: {@link #glClearTexSubImage ClearTexSubImage} */ - public static native void nglClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long data); - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddressSafe(data)); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddressSafe(data)); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddressSafe(data)); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddressSafe(data)); - } - - /** - * Fills all or part of a texture image with a constant value. - * - *

    Arguments {@code xoffset}, {@code yoffset}, and {@code zoffset} specify the lower left texel coordinates of a {@code width}-wide by {@code height}-high - * by {@code depth}-deep rectangular subregion of the texel array and are interpreted as they are in {@link GL12C#glTexSubImage3D TexSubImage3D}.

    - * - *

    For 1D array textures, {@code yoffset} is interpreted as the first layer to be cleared and {@code height} is the number of layers to clear. For 2D array - * textures, {@code zoffset} is interpreted as the first layer to be cleared and {@code depth} is the number of layers to clear. Cube map textures are - * treated as an array of six slices in the z-dimension, where the value of {@code zoffset} is interpreted as specifying the cube map face for the - * corresponding {@code layer} and {@code depth} is the number of faces to clear. For cube map array textures, {@code zoffset} is the first layer-face to - * clear, and {@code depth} is the number of layer-faces to clear. Each layer-face is translated into an array layer and a cube map face.

    - * - *

    Negative values of {@code xoffset}, {@code yoffset}, and {@code zoffset} correspond to the coordinates of border texels.

    - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer data) { - nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddressSafe(data)); - } - - // --- [ glClearTexImage ] --- - - /** Unsafe version of: {@link #glClearTexImage ClearTexImage} */ - public static native void nglClearTexImage(int texture, int level, int format, int type, long data); - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearTexImage(texture, level, format, type, memAddressSafe(data)); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearTexImage(texture, level, format, type, memAddressSafe(data)); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearTexImage(texture, level, format, type, memAddressSafe(data)); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearTexImage(texture, level, format, type, memAddressSafe(data)); - } - - /** - * Is equivalent to calling {@link #glClearTexSubImage ClearTexSubImage} with {@code xoffset}, {@code yoffset}, and {@code zoffset} equal to -{@code b} and {@code width}, - * {@code height}, and {@code depth} equal to the dimensions of the texture image plus {@code 2xb} (or zero and one for dimensions the texture doesn't - * have). - * - * @param texture the texture to clear. It is an error if {@code texture} is zero or not the name of a texture object, if {@code texture} is a buffer texture, or if - * the texture image has a compressed internal format - * @param level the texture level to clear - * @param format the format of the source data. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the source data. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data an array of between one and four components of texel data that will be used as the source for the constant fill value. If {@code data} is {@code NULL}, - * then the pointer is ignored and the sub-range of the texture image is filled with zeros. - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") DoubleBuffer data) { - nglClearTexImage(texture, level, format, type, memAddressSafe(data)); - } - - // --- [ glBindBuffersBase ] --- - - /** - * Unsafe version of: {@link #glBindBuffersBase BindBuffersBase} - * - * @param count the number of bindings - */ - public static native void nglBindBuffersBase(int target, int first, int count, long buffers); - - /** - * Binds {@code count} existing buffer objects to bindings numbered {@code first} through {@code first+count-1} in the array of buffer binding points - * corresponding to {@code target}. If {@code buffers} is not {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name - * of an existing buffer object. It is equivalent to: - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindBufferBase(target, first + i, 0);
    -     *     } else {
    -     *         glBindBufferBase(target, first + i, buffers[i]);
    -     *     }
    -     * }
    - * - *

    except that the single general buffer binding corresponding to {@code target} is unmodified, and that buffers will not be created if they do not exist.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param first the first binding - * @param buffers an array of zeros or names of existing buffers objects - * - * @see Reference Page - */ - public static void glBindBuffersBase(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers) { - nglBindBuffersBase(target, first, remainingSafe(buffers), memAddressSafe(buffers)); - } - - // --- [ glBindBuffersRange ] --- - - /** - * Unsafe version of: {@link #glBindBuffersRange BindBuffersRange} - * - * @param count the number of bindings - */ - public static native void nglBindBuffersRange(int target, int first, int count, long buffers, long offsets, long sizes); - - /** - * Binds {@code count} existing buffer objects to bindings numbered {@code first} through {@code first+count-1} in the array of buffer binding points - * corresponding to {@code target}. {@code offsets} and {@code sizes} specify arrays of {@code count} values indicating the range of each buffer to bind. - * If {@code buffers} is {@code NULL}, all bindings from {@code first} through {@code first+count-1} are reset to their unbound (zero) state. In this - * case, the offsets and sizes associated with the binding points are set to default values, ignoring {@code offsets} and {@code sizes}. It is equivalent - * to: - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindBufferRange(target, first + i, 0, 0, 0);
    -     *     } else {
    -     *         glBindBufferRange(target, first + i, buffers[i], offsets[i], sizes[i]);
    -     *     }
    -     * }
    - * - *

    except that the single general buffer binding corresponding to {@code target} is unmodified, and that buffers will not be created if they do not exist.

    - * - *

    The values specified in {@code buffers}, {@code offsets}, and {@code sizes} will be checked separately for each binding point. When values for a - * specific binding point are invalid, the state for that binding point will be unchanged and an error will be generated. However, state for other binding - * points will still be changed if their corresponding values are valid.

    - * - * @param target the buffer object target. One of:
    {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER}{@link GL15#GL_ELEMENT_ARRAY_BUFFER ELEMENT_ARRAY_BUFFER}{@link GL21#GL_PIXEL_PACK_BUFFER PIXEL_PACK_BUFFER}{@link GL21#GL_PIXEL_UNPACK_BUFFER PIXEL_UNPACK_BUFFER}
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER TRANSFORM_FEEDBACK_BUFFER}{@link GL31#GL_UNIFORM_BUFFER UNIFORM_BUFFER}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL31#GL_COPY_READ_BUFFER COPY_READ_BUFFER}
    {@link GL31#GL_COPY_WRITE_BUFFER COPY_WRITE_BUFFER}{@link GL40#GL_DRAW_INDIRECT_BUFFER DRAW_INDIRECT_BUFFER}{@link GL42#GL_ATOMIC_COUNTER_BUFFER ATOMIC_COUNTER_BUFFER}{@link GL43#GL_DISPATCH_INDIRECT_BUFFER DISPATCH_INDIRECT_BUFFER}
    {@link GL43#GL_SHADER_STORAGE_BUFFER SHADER_STORAGE_BUFFER}{@link ARBIndirectParameters#GL_PARAMETER_BUFFER_ARB PARAMETER_BUFFER_ARB}
    - * @param first the first binding - * @param buffers an array of names of existing buffers objects - * @param offsets an array of offsets - * @param sizes an array of sizes - * - * @see Reference Page - */ - public static void glBindBuffersRange(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizeiptr const *") PointerBuffer sizes) { - if (CHECKS) { - checkSafe(offsets, remainingSafe(buffers)); - checkSafe(sizes, remainingSafe(buffers)); - } - nglBindBuffersRange(target, first, remainingSafe(buffers), memAddressSafe(buffers), memAddressSafe(offsets), memAddressSafe(sizes)); - } - - // --- [ glBindTextures ] --- - - /** - * Unsafe version of: {@link #glBindTextures BindTextures} - * - * @param count the number of texture objects - */ - public static native void nglBindTextures(int first, int count, long textures); - - /** - * Binds {@code count} existing texture objects to texture image units numbered {@code first} through {@code first+count-1}. If {@code textures} is not - * {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing texture object. When an entry in - * {@code textures} is the name of an existing texture object, that object is bound to corresponding texture unit for the target specified when the texture - * object was created. When an entry in {@code textures} is zero, each of the targets enumerated at the beginning of this section is reset to its default - * texture for the corresponding texture image unit. If {@code textures} is {@code NULL}, each target of each affected texture image unit from {@code first} - * through {@code first+count-1} is reset to its default texture. - * - *

    {@code BindTextures} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     uint texture;
    -     *     if ( textures == NULL ) {
    -     *         texture = 0;
    -     *     } else {
    -     *         texture = textures[i];
    -     *     }
    -     *     ActiveTexture(TEXTURE0 + first + i);
    -     *     if ( texture != 0 ) {
    -     *         enum target; // target of texture object textures[i]
    -     *         BindTexture(target, textures[i]);
    -     *     } else {
    -     *         for ( target in all supported targets ) {
    -     *             BindTexture(target, 0);
    -     *         }
    -     *     }
    -     * }
    - * - *

    except that the active texture selector retains its original value upon completion of the command, and that textures will not be created if they do not - * exist.

    - * - *

    The values specified in {@code textures} will be checked separately for each texture image unit. When a value for a specific texture image unit is - * invalid, the state for that texture image unit will be unchanged and an error will be generated. However, state for other texture image units will still - * be changed if their corresponding values are valid.

    - * - * @param first the first texture objects - * @param textures an array of zeros or names of existing texture objects - * - * @see Reference Page - */ - public static void glBindTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer textures) { - nglBindTextures(first, remainingSafe(textures), memAddressSafe(textures)); - } - - // --- [ glBindSamplers ] --- - - /** - * Unsafe version of: {@link #glBindSamplers BindSamplers} - * - * @param count the number of sampler objects - */ - public static native void nglBindSamplers(int first, int count, long samplers); - - /** - * Binds {@code count} existing sampler objects to texture image units numbered {@code first} through {@code first+count-1}. If {@code samplers} is not - * {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing sampler object. If {@code samplers} is {@code NULL}, - * each affected texture image unit from {@code first} through {@code first+count-1} will be reset to have no bound sampler object. - * - *

    {@code BindSamplers} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( samplers == NULL ) {
    -     *         glBindSampler(first + i, 0);
    -     *     } else {
    -     *         glBindSampler(first + i, samplers[i]);
    -     *     }
    -     * }
    - * - *

    The values specified in {@code samplers} will be checked separately for each texture image unit. When a value for a specific texture image unit is - * invalid, the state for that texture image unit will be unchanged and an error will be generated. However, state for other texture image units will still - * be changed if their corresponding values are valid.

    - * - * @param first the first sampler object - * @param samplers an array of zeros or names of existing sampler objects - * - * @see Reference Page - */ - public static void glBindSamplers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer samplers) { - nglBindSamplers(first, remainingSafe(samplers), memAddressSafe(samplers)); - } - - // --- [ glBindImageTextures ] --- - - /** - * Unsafe version of: {@link #glBindImageTextures BindImageTextures} - * - * @param count the number of image units - */ - public static native void nglBindImageTextures(int first, int count, long textures); - - /** - * Binds {@code count} existing texture objects to image units numbered {@code first} through {@code first+count-1}. If {@code textures} is not {@code NULL}, it - * specifies an array of {@code count} values, each of which must be zero or the name of an existing texture object. If {@code textures} is {@code NULL}, each - * affected image unit from {@code first} through {@code first+count-1} will be reset to have no bound texture object. - * - *

    When binding a non-zero texture object to an image unit, the image unit {@code level}, {@code layered}, {@code layer}, and {@code access} parameters are - * set to zero, {@link GL11#GL_TRUE TRUE}, zero, and {@link GL15#GL_READ_WRITE READ_WRITE}, respectively. The image unit {@code format} parameter is taken from the internal - * format of the texture image at level zero of the texture object identified by {@code textures}. For cube map textures, the internal format of the - * {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X} image of level zero is used. For multisample, multisample array, buffer, and rectangle textures, the internal - * format of the single texture level is used.

    - * - *

    When unbinding a texture object from an image unit, the image unit parameters {@code level}, {@code layered}, {@code layer}, and {@code format} will be - * reset to their default values of zero, {@link GL11#GL_FALSE FALSE}, 0, and {@link GL30#GL_R8 R8}, respectively.

    - * - *

    {@code BindImageTextures} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( textures == NULL || textures[i] = 0 ) {
    -     *         glBindImageTexture(first + i, 0, 0, FALSE, 0, READ_ONLY, R8);
    -     *     } else {
    -     *         glBindImageTexture(first + i, textures[i], 0, TRUE, 0, READ_WRITE, lookupInternalFormat(textures[i]));
    -     *     }
    -     * }
    - * - *

    where {@code lookupInternalFormat} returns the internal format of the specified texture object.

    - * - *

    The values specified in {@code textures} will be checked separately for each image unit. When a value for a specific image unit is invalid, the state - * for that image unit will be unchanged and an error will be generated. However, state for other image units will still be changed if their corresponding - * values are valid.

    - * - * @param first the first image unit - * @param textures an array of zeros or names of existing texture objects - * - * @see Reference Page - */ - public static void glBindImageTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer textures) { - nglBindImageTextures(first, remainingSafe(textures), memAddressSafe(textures)); - } - - // --- [ glBindVertexBuffers ] --- - - /** - * Unsafe version of: {@link #glBindVertexBuffers BindVertexBuffers} - * - * @param count the number of vertex buffer binding points - */ - public static native void nglBindVertexBuffers(int first, int count, long buffers, long offsets, long strides); - - /** - * Binds {@code count} existing buffer objects to vertex buffer binding points numbered {@code first} through {@code first+count-1}. If {@code buffers} is - * not {@code NULL}, it specifies an array of {@code count} values, each of which must be zero or the name of an existing buffer object. {@code offsets} and - * {@code strides} specify arrays of {@code count} values indicating the offset of the first element and stride between elements in each buffer, - * respectively. If {@code buffers} is {@code NULL}, each affected vertex buffer binding point from {@code first} through {@code first+count-1} will be reset to - * have no bound buffer object. In this case, the offsets and strides associated with the binding points are set to default values, ignoring - * {@code offsets} and {@code strides}. - * - *

    {@code BindVertexBuffers} is equivalent to:

    - * - *
    
    -     * for ( i = 0; i < count; i++ ) {
    -     *     if ( buffers == NULL ) {
    -     *         glBindVertexBuffer(first + i, 0, 0, 16);
    -     *     } else {
    -     *         glBindVertexBuffer(first + i, buffers[i], offsets[i], strides[i]);
    -     *     }
    -     * }
    - * - *

    except that buffers will not be created if they do not exist.

    - * - *

    The values specified in {@code buffers}, {@code offsets}, and {@code strides} will be checked separately for each vertex buffer binding point. When a - * value for a specific binding point is invalid, the state for that binding point will be unchanged and an error will be generated. However, state for - * other binding points will still be changed if their corresponding values are valid.

    - * - * @param first the first vertex buffer binding point - * @param buffers an array of zeros or names of existing buffers objects - * @param offsets an array of offses - * @param strides an array of stride values - * - * @see Reference Page - */ - public static void glBindVertexBuffers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") IntBuffer strides) { - if (CHECKS) { - checkSafe(offsets, remainingSafe(buffers)); - checkSafe(strides, remainingSafe(buffers)); - } - nglBindVertexBuffers(first, remainingSafe(buffers), memAddressSafe(buffers), memAddressSafe(offsets), memAddressSafe(strides)); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") short[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 1, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") int[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 2, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") float[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 2, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glBufferStorage BufferStorage} - * - * @see Reference Page - */ - public static void glBufferStorage(@NativeType("GLenum") int target, @NativeType("void const *") double[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(target, Integer.toUnsignedLong(data.length) << 3, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearTexSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearTexSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearTexSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexSubImage ClearTexSubImage} - * - * @see Reference Page - */ - public static void glClearTexSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] data) { - long __functionAddress = GL.getICD().glClearTexSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearTexImage ClearTexImage} - * - * @see Reference Page - */ - public static void glClearTexImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") double[] data) { - long __functionAddress = GL.getICD().glClearTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glBindBuffersBase BindBuffersBase} - * - * @see Reference Page - */ - public static void glBindBuffersBase(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers) { - long __functionAddress = GL.getICD().glBindBuffersBase; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, first, lengthSafe(buffers), buffers, __functionAddress); - } - - /** - * Array version of: {@link #glBindBuffersRange BindBuffersRange} - * - * @see Reference Page - */ - public static void glBindBuffersRange(@NativeType("GLenum") int target, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizeiptr const *") PointerBuffer sizes) { - long __functionAddress = GL.getICD().glBindBuffersRange; - if (CHECKS) { - check(__functionAddress); - checkSafe(offsets, lengthSafe(buffers)); - checkSafe(sizes, lengthSafe(buffers)); - } - callPPPV(target, first, lengthSafe(buffers), buffers, memAddressSafe(offsets), memAddressSafe(sizes), __functionAddress); - } - - /** - * Array version of: {@link #glBindTextures BindTextures} - * - * @see Reference Page - */ - public static void glBindTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] textures) { - long __functionAddress = GL.getICD().glBindTextures; - if (CHECKS) { - check(__functionAddress); - } - callPV(first, lengthSafe(textures), textures, __functionAddress); - } - - /** - * Array version of: {@link #glBindSamplers BindSamplers} - * - * @see Reference Page - */ - public static void glBindSamplers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] samplers) { - long __functionAddress = GL.getICD().glBindSamplers; - if (CHECKS) { - check(__functionAddress); - } - callPV(first, lengthSafe(samplers), samplers, __functionAddress); - } - - /** - * Array version of: {@link #glBindImageTextures BindImageTextures} - * - * @see Reference Page - */ - public static void glBindImageTextures(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] textures) { - long __functionAddress = GL.getICD().glBindImageTextures; - if (CHECKS) { - check(__functionAddress); - } - callPV(first, lengthSafe(textures), textures, __functionAddress); - } - - /** - * Array version of: {@link #glBindVertexBuffers BindVertexBuffers} - * - * @see Reference Page - */ - public static void glBindVertexBuffers(@NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") int[] strides) { - long __functionAddress = GL.getICD().glBindVertexBuffers; - if (CHECKS) { - check(__functionAddress); - checkSafe(offsets, lengthSafe(buffers)); - checkSafe(strides, lengthSafe(buffers)); - } - callPPPV(first, lengthSafe(buffers), buffers, memAddressSafe(offsets), strides, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL45.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL45.java deleted file mode 100644 index 3f7b9b8e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL45.java +++ /dev/null @@ -1,5682 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.5. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 4.5 implementations support revision 4.50 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL45 extends GL44 { - - static { GL.initialize(); } - - /** Accepted by the {@code depth} parameter of {@link #glClipControl ClipControl}. */ - public static final int - GL_NEGATIVE_ONE_TO_ONE = 0x935E, - GL_ZERO_TO_ONE = 0x935F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CLIP_ORIGIN = 0x935C, - GL_CLIP_DEPTH_MODE = 0x935D; - - /** Accepted by the {@code mode} parameter of {@link GL30C#glBeginConditionalRender BeginConditionalRender}. */ - public static final int - GL_QUERY_WAIT_INVERTED = 0x8E17, - GL_QUERY_NO_WAIT_INVERTED = 0x8E18, - GL_QUERY_BY_REGION_WAIT_INVERTED = 0x8E19, - GL_QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int - GL_MAX_CULL_DISTANCES = 0x82F9, - GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA; - - /** Accepted by the {@code pname} parameter of GetTextureParameter{if}v and GetTextureParameterI{i ui}v. */ - public static final int GL_TEXTURE_TARGET = 0x1006; - - /** Accepted by the {@code pname} parameter of GetQueryObjectiv. */ - public static final int GL_QUERY_TARGET = 0x82EA; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetFloatv, GetBooleanv GetDoublev and GetInteger64v. */ - public static final int GL_CONTEXT_RELEASE_BEHAVIOR = 0x82FB; - - /** Returned in {@code data} by GetIntegerv, GetFloatv, GetBooleanv GetDoublev and GetInteger64v when {@code pname} is {@link #GL_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR}. */ - public static final int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC; - - /** Returned by {@link #glGetGraphicsResetStatus GetGraphicsResetStatus}. */ - public static final int - GL_GUILTY_CONTEXT_RESET = 0x8253, - GL_INNOCENT_CONTEXT_RESET = 0x8254, - GL_UNKNOWN_CONTEXT_RESET = 0x8255; - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, and GetFloatv. */ - public static final int GL_RESET_NOTIFICATION_STRATEGY = 0x8256; - - /** Returned by GetIntegerv and related simple queries when {@code value} is {@link #GL_RESET_NOTIFICATION_STRATEGY RESET_NOTIFICATION_STRATEGY}. */ - public static final int - GL_LOSE_CONTEXT_ON_RESET = 0x8252, - GL_NO_RESET_NOTIFICATION = 0x8261; - - /** Returned by GetIntegerv when {@code pname} is CONTEXT_FLAGS. */ - public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 0x4; - - /** Returned by {@link GL11C#glGetError GetError}. */ - public static final int GL_CONTEXT_LOST = 0x507; - - protected GL45() { - throw new UnsupportedOperationException(); - } - - // --- [ glClipControl ] --- - - /** - * Controls the clipping volume behavior. - * - *

    These parameters update the clip control origin and depth mode respectively. The initial value of the clip control origin is {@link GL20#GL_LOWER_LEFT LOWER_LEFT} and the - * initial value of the depth mode is {@link GL45C#GL_NEGATIVE_ONE_TO_ONE NEGATIVE_ONE_TO_ONE}.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if ClipControl is executed between the execution of {@link GL11#glBegin Begin} and the corresponding - * execution of {@link GL11#glEnd End}.

    - * - * @param origin the clip origin. One of:
    {@link GL20#GL_LOWER_LEFT LOWER_LEFT}{@link GL20#GL_UPPER_LEFT UPPER_LEFT}
    - * @param depth the clip depth mode. One of:
    {@link GL45C#GL_NEGATIVE_ONE_TO_ONE NEGATIVE_ONE_TO_ONE}{@link GL45C#GL_ZERO_TO_ONE ZERO_TO_ONE}
    - * - * @see Reference Page - */ - public static void glClipControl(@NativeType("GLenum") int origin, @NativeType("GLenum") int depth) { - GL45C.glClipControl(origin, depth); - } - - // --- [ glCreateTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glCreateTransformFeedbacks CreateTransformFeedbacks} - * - * @param n the number of transform feedback object names to create - */ - public static void nglCreateTransformFeedbacks(int n, long ids) { - GL45C.nglCreateTransformFeedbacks(n, ids); - } - - /** - * Returns {@code n} previously unused transform feedback object names in {@code ids}, each representing a new state vector. - * - * @param ids the buffer in which to return the names - * - * @see Reference Page - */ - public static void glCreateTransformFeedbacks(@NativeType("GLuint *") IntBuffer ids) { - GL45C.glCreateTransformFeedbacks(ids); - } - - /** - * Returns {@code n} previously unused transform feedback object names in {@code ids}, each representing a new state vector. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateTransformFeedbacks() { - return GL45C.glCreateTransformFeedbacks(); - } - - // --- [ glTransformFeedbackBufferBase ] --- - - /** - * Binds a buffer object to a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param index the transform feedback stream index - * @param buffer the name of an existing buffer object - * - * @see Reference Page - */ - public static void glTransformFeedbackBufferBase(@NativeType("GLuint") int xfb, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer) { - GL45C.glTransformFeedbackBufferBase(xfb, index, buffer); - } - - // --- [ glTransformFeedbackBufferRange ] --- - - /** - * Binds a region of a buffer object to a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param index the transform feedback stream index - * @param buffer the name of an existing buffer object - * @param offset the starting offset in basic machine units into the buffer object - * @param size the amount of data in machine units - * - * @see Reference Page - */ - public static void glTransformFeedbackBufferRange(@NativeType("GLuint") int xfb, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL45C.glTransformFeedbackBufferRange(xfb, index, buffer, offset, size); - } - - // --- [ glGetTransformFeedbackiv ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbackiv GetTransformFeedbackiv} */ - public static void nglGetTransformFeedbackiv(int xfb, int pname, long param) { - GL45C.nglGetTransformFeedbackiv(xfb, pname, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL42#GL_TRANSFORM_FEEDBACK_PAUSED TRANSFORM_FEEDBACK_PAUSED}{@link GL42#GL_TRANSFORM_FEEDBACK_ACTIVE TRANSFORM_FEEDBACK_ACTIVE}
    - * @param param the buffer in which to return the parameter value - * - * @see Reference Page - */ - public static void glGetTransformFeedbackiv(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetTransformFeedbackiv(xfb, pname, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL42#GL_TRANSFORM_FEEDBACK_PAUSED TRANSFORM_FEEDBACK_PAUSED}{@link GL42#GL_TRANSFORM_FEEDBACK_ACTIVE TRANSFORM_FEEDBACK_ACTIVE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTransformFeedbacki(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname) { - return GL45C.glGetTransformFeedbacki(xfb, pname); - } - - // --- [ glGetTransformFeedbacki_v ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbacki_v GetTransformFeedbacki_v} */ - public static void nglGetTransformFeedbacki_v(int xfb, int pname, int index, long param) { - GL45C.nglGetTransformFeedbacki_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. Must be:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_BINDING TRANSFORM_FEEDBACK_BUFFER_BINDING}
    - * @param index the transform feedback stream index - * @param param the buffer in which to return the parameter value - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetTransformFeedbacki_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. Must be:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_BINDING TRANSFORM_FEEDBACK_BUFFER_BINDING}
    - * @param index the transform feedback stream index - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTransformFeedbacki(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - return GL45C.glGetTransformFeedbacki(xfb, pname, index); - } - - // --- [ glGetTransformFeedbacki64_v ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbacki64_v GetTransformFeedbacki64_v} */ - public static void nglGetTransformFeedbacki64_v(int xfb, int pname, int index, long param) { - GL45C.nglGetTransformFeedbacki64_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_START TRANSFORM_FEEDBACK_BUFFER_START}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_SIZE TRANSFORM_FEEDBACK_BUFFER_SIZE}
    - * @param index the transform feedback stream index - * @param param the buffer in which to return the parameter value - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki64_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") LongBuffer param) { - GL45C.glGetTransformFeedbacki64_v(xfb, pname, index, param); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_START TRANSFORM_FEEDBACK_BUFFER_START}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_SIZE TRANSFORM_FEEDBACK_BUFFER_SIZE}
    - * @param index the transform feedback stream index - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetTransformFeedbacki64(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - return GL45C.glGetTransformFeedbacki64(xfb, pname, index); - } - - // --- [ glCreateBuffers ] --- - - /** - * Unsafe version of: {@link #glCreateBuffers CreateBuffers} - * - * @param n the number of buffer names to create - */ - public static void nglCreateBuffers(int n, long buffers) { - GL45C.nglCreateBuffers(n, buffers); - } - - /** - * Returns {@code n} previously unused buffer names in {@code buffers}, each representing a new buffer object initialized as if it had been bound to an - * unspecified target. - * - * @param buffers the buffer in which to return the names - * - * @see Reference Page - */ - public static void glCreateBuffers(@NativeType("GLuint *") IntBuffer buffers) { - GL45C.glCreateBuffers(buffers); - } - - /** - * Returns {@code n} previously unused buffer names in {@code buffers}, each representing a new buffer object initialized as if it had been bound to an - * unspecified target. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateBuffers() { - return GL45C.glCreateBuffers(); - } - - // --- [ glNamedBufferStorage ] --- - - /** - * Unsafe version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @param size the size of the data store in basic machine units - */ - public static void nglNamedBufferStorage(int buffer, long size, long data, int flags) { - GL45C.nglNamedBufferStorage(buffer, size, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param size the size of the data store in basic machine units - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, size, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - // --- [ glNamedBufferData ] --- - - /** - * Unsafe version of: {@link #glNamedBufferData NamedBufferData} - * - * @param size the size in bytes of the buffer object's new data store - */ - public static void nglNamedBufferData(int buffer, long size, long data, int usage) { - GL45C.nglNamedBufferData(buffer, size, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param size the size in bytes of the buffer object's new data store - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, size, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") LongBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - // --- [ glNamedBufferSubData ] --- - - /** - * Unsafe version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @param size the size in bytes of the data store region being replaced - */ - public static void nglNamedBufferSubData(int buffer, long offset, long size, long data) { - GL45C.nglNamedBufferSubData(buffer, offset, size, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ByteBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ShortBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") IntBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") LongBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") FloatBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") DoubleBuffer data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - // --- [ glCopyNamedBufferSubData ] --- - - /** - * DSA version of {@link GL31C#glCopyBufferSubData CopyBufferSubData}. - * - * @param readBuffer the source buffer object name - * @param writeBuffer the destination buffer object name - * @param readOffset the source buffer object offset, in bytes - * @param writeOffset the destination buffer object offset, in bytes - * @param size the number of bytes to copy - * - * @see Reference Page - */ - public static void glCopyNamedBufferSubData(@NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size) { - GL45C.glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); - } - - // --- [ glClearNamedBufferData ] --- - - /** Unsafe version of: {@link #glClearNamedBufferData ClearNamedBufferData} */ - public static void nglClearNamedBufferData(int buffer, int internalformat, int format, int type, long data) { - GL45C.nglClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - // --- [ glClearNamedBufferSubData ] --- - - /** Unsafe version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} */ - public static void nglClearNamedBufferSubData(int buffer, int internalformat, long offset, long size, int format, int type, long data) { - GL45C.nglClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - // --- [ glMapNamedBuffer ] --- - - /** Unsafe version of: {@link #glMapNamedBuffer MapNamedBuffer} */ - public static long nglMapNamedBuffer(int buffer, int access) { - return GL45C.nglMapNamedBuffer(buffer, access); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access) { - return GL45C.glMapNamedBuffer(buffer, access); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, @Nullable ByteBuffer old_buffer) { - return GL45C.glMapNamedBuffer(buffer, access, old_buffer); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, long length, @Nullable ByteBuffer old_buffer) { - return GL45C.glMapNamedBuffer(buffer, access, length, old_buffer); - } - - // --- [ glMapNamedBufferRange ] --- - - /** Unsafe version of: {@link #glMapNamedBufferRange MapNamedBufferRange} */ - public static long nglMapNamedBufferRange(int buffer, long offset, long length, int access) { - return GL45C.nglMapNamedBufferRange(buffer, offset, length, access); - } - - /** - * DSA version of {@link GL30C#glMapBufferRange MapBufferRange}. - * - * @param buffer the buffer object name - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access) { - return GL45C.glMapNamedBufferRange(buffer, offset, length, access); - } - - /** - * DSA version of {@link GL30C#glMapBufferRange MapBufferRange}. - * - * @param buffer the buffer object name - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access, @Nullable ByteBuffer old_buffer) { - return GL45C.glMapNamedBufferRange(buffer, offset, length, access, old_buffer); - } - - // --- [ glUnmapNamedBuffer ] --- - - /** - * DSA version of {@link GL15C#glUnmapBuffer UnmapBuffer}. - * - * @param buffer the buffer object name - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static boolean glUnmapNamedBuffer(@NativeType("GLuint") int buffer) { - return GL45C.glUnmapNamedBuffer(buffer); - } - - // --- [ glFlushMappedNamedBufferRange ] --- - - /** - * DSA version of {@link GL30C#glFlushMappedBufferRange FlushMappedBufferRange}. - * - * @param buffer the buffer object name - * @param offset the start of the buffer subrange, in basic machine units - * @param length the length of the buffer subrange, in basic machine units - * - * @see Reference Page - */ - public static void glFlushMappedNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length) { - GL45C.glFlushMappedNamedBufferRange(buffer, offset, length); - } - - // --- [ glGetNamedBufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedBufferParameteriv GetNamedBufferParameteriv} */ - public static void nglGetNamedBufferParameteriv(int buffer, int pname, long params) { - GL45C.nglGetNamedBufferParameteriv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteriv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedBufferParameteriv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedBufferParameteri(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedBufferParameteri(buffer, pname); - } - - // --- [ glGetNamedBufferParameteri64v ] --- - - /** Unsafe version of: {@link #glGetNamedBufferParameteri64v GetNamedBufferParameteri64v} */ - public static void nglGetNamedBufferParameteri64v(int buffer, int pname, long params) { - GL45C.nglGetNamedBufferParameteri64v(buffer, pname, params); - } - - /** - * DSA version of {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteri64v(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - GL45C.glGetNamedBufferParameteri64v(buffer, pname, params); - } - - /** - * DSA version of {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetNamedBufferParameteri64(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedBufferParameteri64(buffer, pname); - } - - // --- [ glGetNamedBufferPointerv ] --- - - /** Unsafe version of: {@link #glGetNamedBufferPointerv GetNamedBufferPointerv} */ - public static void nglGetNamedBufferPointerv(int buffer, int pname, long params) { - GL45C.nglGetNamedBufferPointerv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferPointerv GetBufferPointerv}. - * - * @param buffer the buffer object name - * @param pname the pointer to be returned. Must be:
    {@link GL15#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * @param params the pointer value specified by {@code pname} - * - * @see Reference Page - */ - public static void glGetNamedBufferPointerv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - GL45C.glGetNamedBufferPointerv(buffer, pname, params); - } - - /** - * DSA version of {@link GL15C#glGetBufferPointerv GetBufferPointerv}. - * - * @param buffer the buffer object name - * @param pname the pointer to be returned. Must be:
    {@link GL15#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetNamedBufferPointer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedBufferPointer(buffer, pname); - } - - // --- [ glGetNamedBufferSubData ] --- - - /** - * Unsafe version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @param size the size in bytes of the data store region being returned - */ - public static void nglGetNamedBufferSubData(int buffer, long offset, long size, long data) { - GL45C.nglGetNamedBufferSubData(buffer, offset, size, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ByteBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ShortBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") IntBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") LongBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") FloatBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") DoubleBuffer data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - // --- [ glCreateFramebuffers ] --- - - /** - * Unsafe version of: {@link #glCreateFramebuffers CreateFramebuffers} - * - * @param n the number of framebuffer names to create - */ - public static void nglCreateFramebuffers(int n, long framebuffers) { - GL45C.nglCreateFramebuffers(n, framebuffers); - } - - /** - * Returns {@code n} previously unused framebuffer names in {@code framebuffers}, each representing a new framebuffer object. - * - * @param framebuffers the buffer in which to store the framebuffer names - * - * @see Reference Page - */ - public static void glCreateFramebuffers(@NativeType("GLuint *") IntBuffer framebuffers) { - GL45C.glCreateFramebuffers(framebuffers); - } - - /** - * Returns {@code n} previously unused framebuffer names in {@code framebuffers}, each representing a new framebuffer object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateFramebuffers() { - return GL45C.glCreateFramebuffers(); - } - - // --- [ glNamedFramebufferRenderbuffer ] --- - - /** - * DSA version of {@link GL30C#glFramebufferRenderbuffer FramebufferRenderbuffer}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param renderbuffertarget the renderbuffer target. Must be:
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of an existing renderbuffer object of type {@code renderbuffertarget} to attach - * - * @see Reference Page - */ - public static void glNamedFramebufferRenderbuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer) { - GL45C.glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); - } - - // --- [ glNamedFramebufferParameteri ] --- - - /** - * DSA version of {@link GL43C#glFramebufferParameteri FramebufferParameteri}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be modified. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param param the new value for the parameter named {@code pname} - * - * @see Reference Page - */ - public static void glNamedFramebufferParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL45C.glNamedFramebufferParameteri(framebuffer, pname, param); - } - - // --- [ glNamedFramebufferTexture ] --- - - /** - * DSA version of {@link GL32C#glFramebufferTexture FramebufferTexture}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static void glNamedFramebufferTexture(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level) { - GL45C.glNamedFramebufferTexture(framebuffer, attachment, texture, level); - } - - // --- [ glNamedFramebufferTextureLayer ] --- - - /** - * DSA version of {@link GL30C#glFramebufferTextureLayer FramebufferTextureLayer}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of {@code texture} to attach. - * - * @see Reference Page - */ - public static void glNamedFramebufferTextureLayer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer) { - GL45C.glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); - } - - // --- [ glNamedFramebufferDrawBuffer ] --- - - /** - * DSA version of {@link GL11C#glDrawBuffer DrawBuffer}. - * - * @param framebuffer the framebuffer name - * @param buf the color buffer to draw to. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_LEFT LEFT}
    {@link GL11#GL_RIGHT RIGHT}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glNamedFramebufferDrawBuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buf) { - GL45C.glNamedFramebufferDrawBuffer(framebuffer, buf); - } - - // --- [ glNamedFramebufferDrawBuffers ] --- - - /** - * Unsafe version of: {@link #glNamedFramebufferDrawBuffers NamedFramebufferDrawBuffers} - * - * @param n the number of buffers in {@code bufs} - */ - public static void nglNamedFramebufferDrawBuffers(int framebuffer, int n, long bufs) { - GL45C.nglNamedFramebufferDrawBuffers(framebuffer, n, bufs); - } - - /** - * DSA version of {@link GL20C#glDrawBuffers DrawBuffers}. - * - * @param framebuffer the framebuffer name - * @param bufs an array of symbolic constants specifying the buffers into which fragment colors or data values will be written. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}
    GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer bufs) { - GL45C.glNamedFramebufferDrawBuffers(framebuffer, bufs); - } - - /** - * DSA version of {@link GL20C#glDrawBuffers DrawBuffers}. - * - * @param framebuffer the framebuffer name - * - * @see Reference Page - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int buf) { - GL45C.glNamedFramebufferDrawBuffers(framebuffer, buf); - } - - // --- [ glNamedFramebufferReadBuffer ] --- - - /** - * DSA version of {@link GL11C#glReadBuffer ReadBuffer}. - * - * @param framebuffer the framebuffer name - * @param src the color buffer to read from. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_LEFT LEFT}
    {@link GL11#GL_RIGHT RIGHT}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glNamedFramebufferReadBuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int src) { - GL45C.glNamedFramebufferReadBuffer(framebuffer, src); - } - - // --- [ glInvalidateNamedFramebufferData ] --- - - /** - * Unsafe version of: {@link #glInvalidateNamedFramebufferData InvalidateNamedFramebufferData} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateNamedFramebufferData(int framebuffer, int numAttachments, long attachments) { - GL45C.nglInvalidateNamedFramebufferData(framebuffer, numAttachments, attachments); - } - - /** - * DSA version of {@link GL43C#glInvalidateFramebuffer InvalidateFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param attachments the address of an array identifying the attachments to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer attachments) { - GL45C.glInvalidateNamedFramebufferData(framebuffer, attachments); - } - - /** - * DSA version of {@link GL43C#glInvalidateFramebuffer InvalidateFramebuffer}. - * - * @param framebuffer the framebuffer name - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int attachment) { - GL45C.glInvalidateNamedFramebufferData(framebuffer, attachment); - } - - // --- [ glInvalidateNamedFramebufferSubData ] --- - - /** - * Unsafe version of: {@link #glInvalidateNamedFramebufferSubData InvalidateNamedFramebufferSubData} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static void nglInvalidateNamedFramebufferSubData(int framebuffer, int numAttachments, long attachments, int x, int y, int width, int height) { - GL45C.nglInvalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x, y, width, height); - } - - /** - * DSA version of {@link GL43C#glInvalidateSubFramebuffer InvalidateSubFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param attachments an array identifying the attachments to be invalidated - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); - } - - /** - * DSA version of {@link GL43C#glInvalidateSubFramebuffer InvalidateSubFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int attachment, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glInvalidateNamedFramebufferSubData(framebuffer, attachment, x, y, width, height); - } - - // --- [ glClearNamedFramebufferiv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferiv ClearNamedFramebufferiv} */ - public static void nglClearNamedFramebufferiv(int framebuffer, int buffer, int drawbuffer, long value) { - GL45C.nglClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); - } - - /** - * DSA version of {@link GL30C#glClearBufferiv ClearBufferiv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_STENCIL STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For stencil buffers, a pointer to a - * single stencil value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearNamedFramebufferiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - GL45C.glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); - } - - // --- [ glClearNamedFramebufferuiv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferuiv ClearNamedFramebufferuiv} */ - public static void nglClearNamedFramebufferuiv(int framebuffer, int buffer, int drawbuffer, long value) { - GL45C.nglClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); - } - - /** - * DSA version of {@link GL30C#glClearBufferuiv ClearBufferuiv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. Must be:
    {@link GL11#GL_COLOR COLOR}
    - * @param drawbuffer the draw buffer to clear - * @param value a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to - * - * @see Reference Page - */ - public static void glClearNamedFramebufferuiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - GL45C.glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); - } - - // --- [ glClearNamedFramebufferfv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferfv ClearNamedFramebufferfv} */ - public static void nglClearNamedFramebufferfv(int framebuffer, int buffer, int drawbuffer, long value) { - GL45C.nglClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); - } - - /** - * DSA version of {@link GL30C#glClearBufferfv ClearBufferfv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_DEPTH DEPTH}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For depth buffers, a pointer to a - * single depth value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearNamedFramebufferfv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") FloatBuffer value) { - GL45C.glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); - } - - // --- [ glClearNamedFramebufferfi ] --- - - /** - * DSA version of {@link GL30C#glClearBufferfi ClearBufferfi}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. Must be:
    {@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param depth the depth value to clear the buffer to - * @param stencil the stencil value to clear the buffer to - * - * @see Reference Page - */ - public static void glClearNamedFramebufferfi(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat") float depth, @NativeType("GLint") int stencil) { - GL45C.glClearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil); - } - - // --- [ glBlitNamedFramebuffer ] --- - - /** - * DSA version of {@link GL30C#glBlitFramebuffer BlitFramebuffer}. - * - * @param readFramebuffer the source framebuffer name - * @param drawFramebuffer the destination framebuffer name - * @param srcX0 the lower-left coordinate of the source rectangle within the read buffer - * @param srcY0 the upper-left coordinate of the source rectangle within the read buffer - * @param srcX1 the lower-right coordinate of the source rectangle within the read buffer - * @param srcY1 the upper-right coordinate of the source rectangle within the read buffer - * @param dstX0 the lower-left coordinate of the destination rectangle within the write buffer - * @param dstY0 the upper-left coordinate of the destination rectangle within the write buffer - * @param dstX1 the lower-right coordinate of the destination rectangle within the write buffer - * @param dstY1 the upper-right coordinate of the destination rectangle within the write buffer - * @param mask the bitwise OR of the flags indicating which buffers are to be copied. One of:
    {@link GL11#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * @param filter the interpolation to be applied if the image is stretched. One of:
    {@link GL11#GL_NEAREST NEAREST}{@link GL11#GL_LINEAR LINEAR}
    - * - * @see Reference Page - */ - public static void glBlitNamedFramebuffer(@NativeType("GLuint") int readFramebuffer, @NativeType("GLuint") int drawFramebuffer, @NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter) { - GL45C.glBlitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); - } - - // --- [ glCheckNamedFramebufferStatus ] --- - - /** - * DSA version of {@link GL30C#glCheckFramebufferStatus CheckFramebufferStatus}. - * - * @param framebuffer the framebuffer name - * @param target the target of the framebuffer completeness check. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static int glCheckNamedFramebufferStatus(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int target) { - return GL45C.glCheckNamedFramebufferStatus(framebuffer, target); - } - - // --- [ glGetNamedFramebufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedFramebufferParameteriv GetNamedFramebufferParameteriv} */ - public static void nglGetNamedFramebufferParameteriv(int framebuffer, int pname, long params) { - GL45C.nglGetNamedFramebufferParameteriv(framebuffer, pname, params); - } - - /** - * DSA version of {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param params a variable to receive the value of the parameter named {@code pname} - * - * @see Reference Page - */ - public static void glGetNamedFramebufferParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedFramebufferParameteriv(framebuffer, pname, params); - } - - /** - * DSA version of {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedFramebufferParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedFramebufferParameteri(framebuffer, pname); - } - - // --- [ glGetNamedFramebufferAttachmentParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedFramebufferAttachmentParameteriv GetNamedFramebufferAttachmentParameteriv} */ - public static void nglGetNamedFramebufferAttachmentParameteriv(int framebuffer, int attachment, int pname, long params) { - GL45C.nglGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment within {@code target}. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetNamedFramebufferAttachmentParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment within {@code target}. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedFramebufferAttachmentParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedFramebufferAttachmentParameteri(framebuffer, attachment, pname); - } - - // --- [ glCreateRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glCreateRenderbuffers CreateRenderbuffers} - * - * @param n the number of renderbuffer names to create - */ - public static void nglCreateRenderbuffers(int n, long renderbuffers) { - GL45C.nglCreateRenderbuffers(n, renderbuffers); - } - - /** - * Returns {@code n} previously unused renderbuffer names in {@code renderbuffers}, each representing a new renderbuffer object. - * - * @param renderbuffers the buffer in which to store the created renderbuffer names - * - * @see Reference Page - */ - public static void glCreateRenderbuffers(@NativeType("GLuint *") IntBuffer renderbuffers) { - GL45C.glCreateRenderbuffers(renderbuffers); - } - - /** - * Returns {@code n} previously unused renderbuffer names in {@code renderbuffers}, each representing a new renderbuffer object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateRenderbuffers() { - return GL45C.glCreateRenderbuffers(); - } - - // --- [ glNamedRenderbufferStorage ] --- - - /** - * DSA version of {@link GL30C#glRenderbufferStorage RenderbufferStorage}. - * - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static void glNamedRenderbufferStorage(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); - } - - // --- [ glNamedRenderbufferStorageMultisample ] --- - - /** - * DSA version of {@link GL30C#glRenderbufferStorageMultisample RenderbufferStorageMultisample}. - * - * @param samples the number of samples to be used for the renderbuffer object's storage - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static void glNamedRenderbufferStorageMultisample(@NativeType("GLuint") int renderbuffer, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); - } - - // --- [ glGetNamedRenderbufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedRenderbufferParameteriv GetNamedRenderbufferParameteriv} */ - public static void nglGetNamedRenderbufferParameteriv(int renderbuffer, int pname, long params) { - GL45C.nglGetNamedRenderbufferParameteriv(renderbuffer, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetRenderbufferParameteriv GetRenderbufferParameteriv}. - * - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetNamedRenderbufferParameteriv(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetRenderbufferParameteriv GetRenderbufferParameteriv}. - * - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedRenderbufferParameteri(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname) { - return GL45C.glGetNamedRenderbufferParameteri(renderbuffer, pname); - } - - // --- [ glCreateTextures ] --- - - /** - * Unsafe version of: {@link #glCreateTextures CreateTextures} - * - * @param n the number of texture names to create - */ - public static void nglCreateTextures(int target, int n, long textures) { - GL45C.nglCreateTextures(target, n, textures); - } - - /** - * Returns {@code n} previously unused texture names in {@code textures}, each representing a new texture object. - * - * @param target the texture target. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param textures the buffer in which to store the created texture names - * - * @see Reference Page - */ - public static void glCreateTextures(@NativeType("GLenum") int target, @NativeType("GLuint *") IntBuffer textures) { - GL45C.glCreateTextures(target, textures); - } - - /** - * Returns {@code n} previously unused texture names in {@code textures}, each representing a new texture object. - * - * @param target the texture target. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateTextures(@NativeType("GLenum") int target) { - return GL45C.glCreateTextures(target); - } - - // --- [ glTextureBuffer ] --- - - /** - * DSA version of {@link GL31C#glTexBuffer TexBuffer}. - * - * @param texture the texture name - * @param internalformat the sized internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * - * @see Reference Page - */ - public static void glTextureBuffer(@NativeType("GLuint") int texture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer) { - GL45C.glTextureBuffer(texture, internalformat, buffer); - } - - // --- [ glTextureBufferRange ] --- - - /** - * DSA version of {@link GL43C#glTexBufferRange TexBufferRange}. - * - * @param texture the texture name - * @param internalformat the internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * @param offset the offset of the start of the range of the buffer's data store to attach - * @param size the size of the range of the buffer's data store to attach - * - * @see Reference Page - */ - public static void glTextureBufferRange(@NativeType("GLuint") int texture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size) { - GL45C.glTextureBufferRange(texture, internalformat, buffer, offset, size); - } - - // --- [ glTextureStorage1D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage1D TexStorage1D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * - * @see Reference Page - */ - public static void glTextureStorage1D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width) { - GL45C.glTextureStorage1D(texture, levels, internalformat, width); - } - - // --- [ glTextureStorage2D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage2D TexStorage2D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * - * @see Reference Page - */ - public static void glTextureStorage2D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glTextureStorage2D(texture, levels, internalformat, width, height); - } - - // --- [ glTextureStorage3D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage3D TexStorage3D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * - * @see Reference Page - */ - public static void glTextureStorage3D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - GL45C.glTextureStorage3D(texture, levels, internalformat, width, height, depth); - } - - // --- [ glTextureStorage2DMultisample ] --- - - /** - * DSA version of {@link GL43C#glTexStorage2DMultisample TexStorage2DMultisample}. - * - * @param texture the texture name - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static void glTextureStorage2DMultisample(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL45C.glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); - } - - // --- [ glTextureStorage3DMultisample ] --- - - /** - * DSA version of {@link GL43C#glTexStorage3DMultisample TexStorage3DMultisample}. - * - * @param texture the texture name - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static void glTextureStorage3DMultisample(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations) { - GL45C.glTextureStorage3DMultisample(texture, samples, internalformat, width, height, depth, fixedsamplelocations); - } - - // --- [ glTextureSubImage1D ] --- - - /** Unsafe version of: {@link #glTextureSubImage1D TextureSubImage1D} */ - public static void nglTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, long pixels) { - GL45C.nglTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - // --- [ glTextureSubImage2D ] --- - - /** Unsafe version of: {@link #glTextureSubImage2D TextureSubImage2D} */ - public static void nglTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels) { - GL45C.nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - // --- [ glTextureSubImage3D ] --- - - /** Unsafe version of: {@link #glTextureSubImage3D TextureSubImage3D} */ - public static void nglTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels) { - GL45C.nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - // --- [ glCompressedTextureSubImage1D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage1D CompressedTextureSubImage1D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int imageSize, long data) { - GL45C.nglCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage1D CompressedTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL45C.glCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage1D CompressedTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL45C.glCompressedTextureSubImage1D(texture, level, xoffset, width, format, data); - } - - // --- [ glCompressedTextureSubImage2D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage2D CompressedTextureSubImage2D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data) { - GL45C.nglCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage2D CompressedTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL45C.glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage2D CompressedTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL45C.glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, data); - } - - // --- [ glCompressedTextureSubImage3D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage3D CompressedTextureSubImage3D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static void nglCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data) { - GL45C.nglCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage3D CompressedTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - GL45C.glCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage3D CompressedTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - GL45C.glCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, data); - } - - // --- [ glCopyTextureSubImage1D ] --- - - /** - * DSA version of {@link GL11C#glCopyTexSubImage1D CopyTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * - * @see Reference Page - */ - public static void glCopyTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width) { - GL45C.glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); - } - - // --- [ glCopyTextureSubImage2D ] --- - - /** - * DSA version of {@link GL11C#glCopyTexSubImage2D CopyTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param yoffset the lower texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static void glCopyTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); - } - - // --- [ glCopyTextureSubImage3D ] --- - - /** - * DSA version of {@link GL12C#glCopyTexSubImage3D CopyTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the x coordinate of the texture subregion to update - * @param yoffset the y coordinate of the texture subregion to update - * @param zoffset the z coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static void glCopyTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); - } - - // --- [ glTextureParameterf ] --- - - /** - * DSA version of {@link GL11C#glTexParameterf TexParameterf}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - */ - public static void glTextureParameterf(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param) { - GL45C.glTextureParameterf(texture, pname, param); - } - - // --- [ glTextureParameterfv ] --- - - /** Unsafe version of: {@link #glTextureParameterfv TextureParameterfv} */ - public static void nglTextureParameterfv(int texture, int pname, long params) { - GL45C.nglTextureParameterfv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glTexParameterfv TexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - GL45C.glTextureParameterfv(texture, pname, params); - } - - // --- [ glTextureParameteri ] --- - - /** - * DSA version of {@link GL11C#glTexParameteri TexParameteri}. - * - * @param texture the texture name - * @param pname the parameter to set. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static void glTextureParameteri(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint") int param) { - GL45C.glTextureParameteri(texture, pname, param); - } - - // --- [ glTextureParameterIiv ] --- - - /** Unsafe version of: {@link #glTextureParameterIiv TextureParameterIiv} */ - public static void nglTextureParameterIiv(int texture, int pname, long params) { - GL45C.nglTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIiv TexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL45C.glTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIiv TexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTextureParameterIi(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int param) { - GL45C.glTextureParameterIi(texture, pname, param); - } - - // --- [ glTextureParameterIuiv ] --- - - /** Unsafe version of: {@link #glTextureParameterIuiv TextureParameterIuiv} */ - public static void nglTextureParameterIuiv(int texture, int pname, long params) { - GL45C.nglTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIuiv TexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - GL45C.glTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glTexParameterIuiv TexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTextureParameterIui(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int param) { - GL45C.glTextureParameterIui(texture, pname, param); - } - - // --- [ glTextureParameteriv ] --- - - /** Unsafe version of: {@link #glTextureParameteriv TextureParameteriv} */ - public static void nglTextureParameteriv(int texture, int pname, long params) { - GL45C.nglTextureParameteriv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glTexParameteriv TexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - GL45C.glTextureParameteriv(texture, pname, params); - } - - // --- [ glGenerateTextureMipmap ] --- - - /** - * DSA version of {@link GL30C#glGenerateMipmap GenerateMipmap}. - * - * @param texture the texture name - * - * @see Reference Page - */ - public static void glGenerateTextureMipmap(@NativeType("GLuint") int texture) { - GL45C.glGenerateTextureMipmap(texture); - } - - // --- [ glBindTextureUnit ] --- - - /** - * Binds an existing texture object to the texture unit numbered {@code unit}. - * - *

    {@code texture} must be zero or the name of an existing texture object. When {@code texture} is the name of an existing texture object, that object is - * bound to the target, in the corresponding texture unit, that was specified when the object was created. When {@code texture} is zero, each of the targets - * enumerated at the beginning of this section is reset to its default texture for the corresponding texture image unit.

    - * - * @param unit the texture unit number - * @param texture the texture name - * - * @see Reference Page - */ - public static void glBindTextureUnit(@NativeType("GLuint") int unit, @NativeType("GLuint") int texture) { - GL45C.glBindTextureUnit(unit, texture); - } - - // --- [ glGetTextureImage ] --- - - /** - * Unsafe version of: {@link #glGetTextureImage GetTextureImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetTextureImage(int texture, int level, int format, int type, int bufSize, long pixels) { - GL45C.nglGetTextureImage(texture, level, format, type, bufSize, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetTextureImage(texture, level, format, type, bufSize, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - // --- [ glGetCompressedTextureImage ] --- - - /** - * Unsafe version of: {@link #glGetCompressedTextureImage GetCompressedTextureImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetCompressedTextureImage(int texture, int level, int bufSize, long pixels) { - GL45C.nglGetCompressedTextureImage(texture, level, bufSize, pixels); - } - - /** - * DSA version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetCompressedTextureImage(texture, level, bufSize, pixels); - } - - /** - * DSA version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetCompressedTextureImage(texture, level, pixels); - } - - // --- [ glGetTextureLevelParameterfv ] --- - - /** Unsafe version of: {@link #glGetTextureLevelParameterfv GetTextureLevelParameterfv} */ - public static void nglGetTextureLevelParameterfv(int texture, int level, int pname, long params) { - GL45C.nglGetTextureLevelParameterfv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameterfv GetTexLevelParameterfv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureLevelParameterfv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL45C.glGetTextureLevelParameterfv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameterfv GetTexLevelParameterfv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTextureLevelParameterf(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureLevelParameterf(texture, level, pname); - } - - // --- [ glGetTextureLevelParameteriv ] --- - - /** Unsafe version of: {@link #glGetTextureLevelParameteriv GetTextureLevelParameteriv} */ - public static void nglGetTextureLevelParameteriv(int texture, int level, int pname, long params) { - GL45C.nglGetTextureLevelParameteriv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureLevelParameteriv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetTextureLevelParameteriv(texture, level, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureLevelParameteri(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureLevelParameteri(texture, level, pname); - } - - // --- [ glGetTextureParameterfv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterfv GetTextureParameterfv} */ - public static void nglGetTextureParameterfv(int texture, int pname, long params) { - GL45C.nglGetTextureParameterfv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameterfv GetTexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - GL45C.glGetTextureParameterfv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameterfv GetTexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTextureParameterf(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameterf(texture, pname); - } - - // --- [ glGetTextureParameterIiv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterIiv GetTextureParameterIiv} */ - public static void nglGetTextureParameterIiv(int texture, int pname, long params) { - GL45C.nglGetTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIiv GetTexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetTextureParameterIiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIiv GetTexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureParameterIi(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameterIi(texture, pname); - } - - // --- [ glGetTextureParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterIuiv GetTextureParameterIuiv} */ - public static void nglGetTextureParameterIuiv(int texture, int pname, long params) { - GL45C.nglGetTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIuiv GetTexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - GL45C.glGetTextureParameterIuiv(texture, pname, params); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIuiv GetTexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureParameterIui(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameterIui(texture, pname); - } - - // --- [ glGetTextureParameteriv ] --- - - /** Unsafe version of: {@link #glGetTextureParameteriv GetTextureParameteriv} */ - public static void nglGetTextureParameteriv(int texture, int pname, long params) { - GL45C.nglGetTextureParameteriv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameteriv GetTexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetTextureParameteriv(texture, pname, params); - } - - /** - * DSA version of {@link GL11C#glGetTexParameteriv GetTexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureParameteri(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - return GL45C.glGetTextureParameteri(texture, pname); - } - - // --- [ glCreateVertexArrays ] --- - - /** - * Unsafe version of: {@link #glCreateVertexArrays CreateVertexArrays} - * - * @param n the number of vertex array object names to create - */ - public static void nglCreateVertexArrays(int n, long arrays) { - GL45C.nglCreateVertexArrays(n, arrays); - } - - /** - * Returns {@code n} previously unused vertex array object names in {@code arrays}. - * - * @param arrays the buffer in which to return the created vertex array object names - * - * @see Reference Page - */ - public static void glCreateVertexArrays(@NativeType("GLuint *") IntBuffer arrays) { - GL45C.glCreateVertexArrays(arrays); - } - - /** - * Returns {@code n} previously unused vertex array object names in {@code arrays}. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateVertexArrays() { - return GL45C.glCreateVertexArrays(); - } - - // --- [ glDisableVertexArrayAttrib ] --- - - /** - * DSA version of {@link GL20C#glDisableVertexAttribArray DisableVertexAttribArray}. - * - * @param vaobj the vertex array object name - * @param index the index of the generic vertex attribute to be disabled - * - * @see Reference Page - */ - public static void glDisableVertexArrayAttrib(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index) { - GL45C.glDisableVertexArrayAttrib(vaobj, index); - } - - // --- [ glEnableVertexArrayAttrib ] --- - - /** - * DSA version of {@link GL20C#glEnableVertexAttribArray EnableVertexAttribArray}. - * - * @param vaobj the vertex array object name - * @param index the index of the generic vertex attribute to be enabled - * - * @see Reference Page - */ - public static void glEnableVertexArrayAttrib(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index) { - GL45C.glEnableVertexArrayAttrib(vaobj, index); - } - - // --- [ glVertexArrayElementBuffer ] --- - - /** - * Binds a buffer object to the element array buffer bind point of a vertex array object. - * - * @param vaobj the vertex array object name - * @param buffer the buffer object name. If {@code buffer} is zero, any existing element array buffer binding to {@code vaobj} is removed. - * - * @see Reference Page - */ - public static void glVertexArrayElementBuffer(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer) { - GL45C.glVertexArrayElementBuffer(vaobj, buffer); - } - - // --- [ glVertexArrayVertexBuffer ] --- - - /** - * DSA version of {@link GL43C#glBindVertexBuffer BindVertexBuffer}. - * - * @param vaobj the vertex array object name - * @param bindingindex the index of the vertex buffer binding point to which to bind the buffer - * @param buffer the name of an existing buffer to bind to the vertex buffer binding point - * @param offset the offset of the first element of the buffer - * @param stride the distance between elements within the buffer - * - * @see Reference Page - */ - public static void glVertexArrayVertexBuffer(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizei") int stride) { - GL45C.glVertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride); - } - - // --- [ glVertexArrayVertexBuffers ] --- - - /** - * Unsafe version of: {@link #glVertexArrayVertexBuffers VertexArrayVertexBuffers} - * - * @param count the number of vertex buffer binding points - */ - public static void nglVertexArrayVertexBuffers(int vaobj, int first, int count, long buffers, long offsets, long strides) { - GL45C.nglVertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, strides); - } - - /** - * DSA version of {@link GL44C#glBindVertexBuffers BindVertexBuffers}. - * - * @param vaobj the vertex array object name - * @param first the first vertex buffer binding point - * @param buffers an array of zeros or names of existing buffers objects - * @param offsets an array of offses - * @param strides an array of stride values - * - * @see Reference Page - */ - public static void glVertexArrayVertexBuffers(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") IntBuffer strides) { - GL45C.glVertexArrayVertexBuffers(vaobj, first, buffers, offsets, strides); - } - - // --- [ glVertexArrayAttribFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribFormat VertexAttribFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param normalized if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is - * directly converted to floating point. - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static void glVertexArrayAttribFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int relativeoffset) { - GL45C.glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); - } - - // --- [ glVertexArrayAttribIFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribIFormat VertexAttribIFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static void glVertexArrayAttribIFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL45C.glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); - } - - // --- [ glVertexArrayAttribLFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribLFormat VertexAttribLFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static void glVertexArrayAttribLFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset) { - GL45C.glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); - } - - // --- [ glVertexArrayAttribBinding ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribBinding VertexAttribBinding}. - * - * @param vaobj the vertex array object name - * @param attribindex the index of the attribute to associate with a vertex buffer binding - * @param bindingindex the index of the vertex buffer binding with which to associate the generic vertex attribute - * - * @see Reference Page - */ - public static void glVertexArrayAttribBinding(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLuint") int bindingindex) { - GL45C.glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); - } - - // --- [ glVertexArrayBindingDivisor ] --- - - /** - * DSA version of {@link GL43C#glVertexBindingDivisor VertexBindingDivisor}. - * - * @param vaobj the vertex array object name - * @param bindingindex the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - * - * @see Reference Page - */ - public static void glVertexArrayBindingDivisor(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int divisor) { - GL45C.glVertexArrayBindingDivisor(vaobj, bindingindex, divisor); - } - - // --- [ glGetVertexArrayiv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayiv GetVertexArrayiv} */ - public static void nglGetVertexArrayiv(int vaobj, int pname, long param) { - GL45C.nglGetVertexArrayiv(vaobj, pname, param); - } - - /** - * Queries parameters of a vertex array object. - * - * @param vaobj the vertex array object name - * @param pname the parameter to query. Must be:
    {@link GL15#GL_ELEMENT_ARRAY_BUFFER_BINDING ELEMENT_ARRAY_BUFFER_BINDING}
    - * @param param the buffer in which to return the parameter values - * - * @see Reference Page - */ - public static void glGetVertexArrayiv(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetVertexArrayiv(vaobj, pname, param); - } - - /** - * Queries parameters of a vertex array object. - * - * @param vaobj the vertex array object name - * @param pname the parameter to query. Must be:
    {@link GL15#GL_ELEMENT_ARRAY_BUFFER_BINDING ELEMENT_ARRAY_BUFFER_BINDING}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexArrayi(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname) { - return GL45C.glGetVertexArrayi(vaobj, pname); - } - - // --- [ glGetVertexArrayIndexediv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayIndexediv GetVertexArrayIndexediv} */ - public static void nglGetVertexArrayIndexediv(int vaobj, int index, int pname, long param) { - GL45C.nglGetVertexArrayIndexediv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. One of:
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE},
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}{@link GL43#GL_VERTEX_ATTRIB_ARRAY_LONG VERTEX_ATTRIB_ARRAY_LONG}
    {@link GL43#GL_VERTEX_ATTRIB_RELATIVE_OFFSET VERTEX_ATTRIB_RELATIVE_OFFSET}
    - * @param param the buffer in which to return the parameter values - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexediv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - GL45C.glGetVertexArrayIndexediv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. One of:
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE},
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}{@link GL43#GL_VERTEX_ATTRIB_ARRAY_LONG VERTEX_ATTRIB_ARRAY_LONG}
    {@link GL43#GL_VERTEX_ATTRIB_RELATIVE_OFFSET VERTEX_ATTRIB_RELATIVE_OFFSET}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexArrayIndexedi(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL45C.glGetVertexArrayIndexedi(vaobj, index, pname); - } - - // --- [ glGetVertexArrayIndexed64iv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayIndexed64iv GetVertexArrayIndexed64iv} */ - public static void nglGetVertexArrayIndexed64iv(int vaobj, int index, int pname, long param) { - GL45C.nglGetVertexArrayIndexed64iv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. Must be:
    {@link GL43#GL_VERTEX_BINDING_OFFSET VERTEX_BINDING_OFFSET}
    - * @param param the buffer in which to return the parameter values - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexed64iv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer param) { - GL45C.glGetVertexArrayIndexed64iv(vaobj, index, pname, param); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. Must be:
    {@link GL43#GL_VERTEX_BINDING_OFFSET VERTEX_BINDING_OFFSET}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetVertexArrayIndexed64i(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - return GL45C.glGetVertexArrayIndexed64i(vaobj, index, pname); - } - - // --- [ glCreateSamplers ] --- - - /** - * Unsafe version of: {@link #glCreateSamplers CreateSamplers} - * - * @param n the number of sampler object names to create - */ - public static void nglCreateSamplers(int n, long samplers) { - GL45C.nglCreateSamplers(n, samplers); - } - - /** - * Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object. - * - * @param samplers the buffer in which to return the created sampler object names - * - * @see Reference Page - */ - public static void glCreateSamplers(@NativeType("GLuint *") IntBuffer samplers) { - GL45C.glCreateSamplers(samplers); - } - - /** - * Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateSamplers() { - return GL45C.glCreateSamplers(); - } - - // --- [ glCreateProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glCreateProgramPipelines CreateProgramPipelines} - * - * @param n the number of program pipeline names to create - */ - public static void nglCreateProgramPipelines(int n, long pipelines) { - GL45C.nglCreateProgramPipelines(n, pipelines); - } - - /** - * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object. - * - * @param pipelines the buffer in which to return the created program pipeline names - * - * @see Reference Page - */ - public static void glCreateProgramPipelines(@NativeType("GLuint *") IntBuffer pipelines) { - GL45C.glCreateProgramPipelines(pipelines); - } - - /** - * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateProgramPipelines() { - return GL45C.glCreateProgramPipelines(); - } - - // --- [ glCreateQueries ] --- - - /** - * Unsafe version of: {@link #glCreateQueries CreateQueries} - * - * @param n the number of query object names to create - */ - public static void nglCreateQueries(int target, int n, long ids) { - GL45C.nglCreateQueries(target, n, ids); - } - - /** - * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}. - * - * @param target the query target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param ids the buffer in which to return the created query object names - * - * @see Reference Page - */ - public static void glCreateQueries(@NativeType("GLenum") int target, @NativeType("GLuint *") IntBuffer ids) { - GL45C.glCreateQueries(target, ids); - } - - /** - * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}. - * - * @param target the query target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateQueries(@NativeType("GLenum") int target) { - return GL45C.glCreateQueries(target); - } - - // --- [ glGetQueryBufferObjectiv ] --- - - /** - * Queries the state of a query object. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static void glGetQueryBufferObjectiv(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjectiv(id, buffer, pname, offset); - } - - // --- [ glGetQueryBufferObjectuiv ] --- - - /** - * Unsigned version of {@link #glGetQueryBufferObjectiv GetQueryBufferObjectiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static void glGetQueryBufferObjectuiv(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjectuiv(id, buffer, pname, offset); - } - - // --- [ glGetQueryBufferObjecti64v ] --- - - /** - * 64bit version of {@link #glGetQueryBufferObjectiv GetQueryBufferObjectiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static void glGetQueryBufferObjecti64v(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjecti64v(id, buffer, pname, offset); - } - - // --- [ glGetQueryBufferObjectui64v ] --- - - /** - * 64bit version of {@link #glGetQueryBufferObjectuiv GetQueryBufferObjectuiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static void glGetQueryBufferObjectui64v(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset) { - GL45C.glGetQueryBufferObjectui64v(id, buffer, pname, offset); - } - - // --- [ glMemoryBarrierByRegion ] --- - - /** - * Behaves like {@link GL42C#glMemoryBarrier MemoryBarrier}, with two differences: - * - *

    First, it narrows the region under consideration so that only reads/writes of prior fragment shaders that are invoked for a smaller region of the - * framebuffer will be completed/reflected prior to subsequent reads/write of following fragment shaders. The size of the region is implementation - * dependent and may be as small as one framebuffer pixel.

    - * - *

    Second, it only applies to memory transactions that may be read by or written by a fragment shader.

    - * - *

    When barriers is {@link GL42#GL_ALL_BARRIER_BITS ALL_BARRIER_BITS}, shader memory accesses will be synchronized relative to all these barrier bits, but not to other - * barrier bits specific to {@link GL42C#glMemoryBarrier MemoryBarrier}. This implies that reads/writes for scatter/gather-like algorithms may or may not be - * completed/reflected after a MemoryBarrierByRegion command. However, for uses such as deferred shading, where a linked list of visible - * surfaces with the head at a framebuffer address may be constructed, and the entirety of the list is only dependent on previous executions at that - * framebuffer address, MemoryBarrierByRegion may be significantly more efficient than {@link GL42C#glMemoryBarrier MemoryBarrier}.

    - * - * @param barriers the barriers to insert. One or more of:
    {@link GL42#GL_ATOMIC_COUNTER_BARRIER_BIT ATOMIC_COUNTER_BARRIER_BIT}{@link GL42#GL_FRAMEBUFFER_BARRIER_BIT FRAMEBUFFER_BARRIER_BIT}{@link GL42#GL_SHADER_IMAGE_ACCESS_BARRIER_BIT SHADER_IMAGE_ACCESS_BARRIER_BIT}
    {@link GL43#GL_SHADER_STORAGE_BARRIER_BIT SHADER_STORAGE_BARRIER_BIT}{@link GL42#GL_TEXTURE_FETCH_BARRIER_BIT TEXTURE_FETCH_BARRIER_BIT}{@link GL42#GL_UNIFORM_BARRIER_BIT UNIFORM_BARRIER_BIT}
    - * - * @see Reference Page - */ - public static void glMemoryBarrierByRegion(@NativeType("GLbitfield") int barriers) { - GL45C.glMemoryBarrierByRegion(barriers); - } - - // --- [ glGetTextureSubImage ] --- - - /** - * Unsafe version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int bufSize, long pixels) { - GL45C.nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - // --- [ glGetCompressedTextureSubImage ] --- - - /** - * Unsafe version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static void nglGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int bufSize, long pixels) { - GL45C.nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") ByteBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") ShortBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") IntBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") FloatBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") DoubleBuffer pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - // --- [ glTextureBarrier ] --- - - /** - * Guarantees that writes have completed and caches have been invalidated before subsequent Draws are executed. - * - * @see Reference Page - */ - public static void glTextureBarrier() { - GL45C.glTextureBarrier(); - } - - // --- [ glGetGraphicsResetStatus ] --- - - /** - * Indicates if the GL context has been in a reset state at any point since the last call to GetGraphicsResetStatus: - * - *
      - *
    • {@link GL11#GL_NO_ERROR NO_ERROR} indicates that the GL context has not been in a reset state since the last call.
    • - *
    • {@link GL45C#GL_GUILTY_CONTEXT_RESET GUILTY_CONTEXT_RESET} indicates that a reset has been detected that is attributable to the current GL context.
    • - *
    • {@link GL45C#GL_INNOCENT_CONTEXT_RESET INNOCENT_CONTEXT_RESET} indicates a reset has been detected that is not attributable to the current GL context.
    • - *
    • {@link GL45C#GL_UNKNOWN_CONTEXT_RESET UNKNOWN_CONTEXT_RESET} indicates a detected graphics reset whose cause is unknown.
    • - *
    - * - *

    If a reset status other than NO_ERROR is returned and subsequent calls return NO_ERROR, the context reset was encountered and completed. If a reset - * status is repeatedly returned, the context may be in the process of resetting.

    - * - *

    Reset notification behavior is determined at context creation time, and may be queried by calling GetIntegerv with the symbolic constant - * {@link GL45C#GL_RESET_NOTIFICATION_STRATEGY RESET_NOTIFICATION_STRATEGY}.

    - * - *

    If the reset notification behavior is {@link GL45C#GL_NO_RESET_NOTIFICATION NO_RESET_NOTIFICATION}, then the implementation will never deliver notification of reset events, and - * GetGraphicsResetStatus will always return NO_ERROR.

    - * - *

    If the behavior is {@link GL45C#GL_LOSE_CONTEXT_ON_RESET LOSE_CONTEXT_ON_RESET}, a graphics reset will result in a lost context and require creating a new context as described - * above. In this case GetGraphicsResetStatus will return an appropriate value from those described above.

    - * - *

    If a graphics reset notification occurs in a context, a notification must also occur in all other contexts which share objects with that context.

    - * - *

    After a graphics reset has occurred on a context, subsequent GL commands on that context (or any context which shares with that context) will generate a - * {@link GL45C#GL_CONTEXT_LOST CONTEXT_LOST} error. Such commands will not have side effects (in particular, they will not modify memory passed by pointer for query results, - * and may not block indefinitely or cause termination of the application. Exceptions to this behavior include:

    - * - *
      - *
    • {@link GL11C#glGetError GetError} and GetGraphicsResetStatus behave normally following a graphics reset, so that the application can determine a reset has - * occurred, and when it is safe to destroy and recreate the context.
    • - *
    • Any commands which might cause a polling application to block indefinitely will generate a CONTEXT_LOST error, but will also return a value - * indicating completion to the application.
    • - *
    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static int glGetGraphicsResetStatus() { - return GL45C.glGetGraphicsResetStatus(); - } - - // --- [ glGetnMapdv ] --- - - /** - * Unsafe version of: {@link #glGetnMapdv GetnMapdv} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnMapdv(int target, int query, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetMapdv GetMapdv} - * - * @param target the evaluator map - * @param query the information to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnMapdv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLdouble *") DoubleBuffer data) { - nglGetnMapdv(target, query, data.remaining(), memAddress(data)); - } - - /** - * Robust version of {@link GL11#glGetMapdv GetMapdv} - * - * @param target the evaluator map - * @param query the information to query - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetnMapd(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer data = stack.callocDouble(1); - nglGetnMapdv(target, query, 1, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnMapfv ] --- - - /** - * Unsafe version of: {@link #glGetnMapfv GetnMapfv} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnMapfv(int target, int query, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetMapfv GetMapfv} - * - * @param target the evaluator map - * @param query the information to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnMapfv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLfloat *") FloatBuffer data) { - nglGetnMapfv(target, query, data.remaining(), memAddress(data)); - } - - /** - * Robust version of {@link GL11#glGetMapfv GetMapfv} - * - * @param target the evaluator map - * @param query the information to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetnMapf(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer data = stack.callocFloat(1); - nglGetnMapfv(target, query, 1, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnMapiv ] --- - - /** - * Unsafe version of: {@link #glGetnMapiv GetnMapiv} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnMapiv(int target, int query, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetMapiv GetMapiv} - * - * @param target the evaluator target. One of:
    {@link GL11#GL_MAP1_VERTEX_3 MAP1_VERTEX_3}{@link GL11#GL_MAP1_VERTEX_4 MAP1_VERTEX_4}{@link GL11#GL_MAP1_COLOR_4 MAP1_COLOR_4}{@link GL11#GL_MAP1_NORMAL MAP1_NORMAL}{@link GL11#GL_MAP1_TEXTURE_COORD_1 MAP1_TEXTURE_COORD_1}
    {@link GL11#GL_MAP1_TEXTURE_COORD_2 MAP1_TEXTURE_COORD_2}{@link GL11#GL_MAP1_TEXTURE_COORD_3 MAP1_TEXTURE_COORD_3}{@link GL11#GL_MAP1_TEXTURE_COORD_4 MAP1_TEXTURE_COORD_4}{@link GL11#GL_MAP2_VERTEX_3 MAP2_VERTEX_3}{@link GL11#GL_MAP2_VERTEX_4 MAP2_VERTEX_4}
    {@link GL11#GL_MAP2_COLOR_4 MAP2_COLOR_4}{@link GL11#GL_MAP2_NORMAL MAP2_NORMAL}{@link GL11#GL_MAP2_TEXTURE_COORD_1 MAP2_TEXTURE_COORD_1}{@link GL11#GL_MAP2_TEXTURE_COORD_2 MAP2_TEXTURE_COORD_2}{@link GL11#GL_MAP2_TEXTURE_COORD_3 MAP2_TEXTURE_COORD_3}
    {@link GL11#GL_MAP2_TEXTURE_COORD_4 MAP2_TEXTURE_COORD_4}
    - * @param query the information to query. One of:
    {@link GL11#GL_ORDER ORDER}{@link GL11#GL_COEFF COEFF}{@link GL11#GL_DOMAIN DOMAIN}
    - * @param data a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnMapiv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLint *") IntBuffer data) { - nglGetnMapiv(target, query, data.remaining(), memAddress(data)); - } - - /** - * Robust version of {@link GL11#glGetMapiv GetMapiv} - * - * @param target the evaluator target. One of:
    {@link GL11#GL_MAP1_VERTEX_3 MAP1_VERTEX_3}{@link GL11#GL_MAP1_VERTEX_4 MAP1_VERTEX_4}{@link GL11#GL_MAP1_COLOR_4 MAP1_COLOR_4}{@link GL11#GL_MAP1_NORMAL MAP1_NORMAL}{@link GL11#GL_MAP1_TEXTURE_COORD_1 MAP1_TEXTURE_COORD_1}
    {@link GL11#GL_MAP1_TEXTURE_COORD_2 MAP1_TEXTURE_COORD_2}{@link GL11#GL_MAP1_TEXTURE_COORD_3 MAP1_TEXTURE_COORD_3}{@link GL11#GL_MAP1_TEXTURE_COORD_4 MAP1_TEXTURE_COORD_4}{@link GL11#GL_MAP2_VERTEX_3 MAP2_VERTEX_3}{@link GL11#GL_MAP2_VERTEX_4 MAP2_VERTEX_4}
    {@link GL11#GL_MAP2_COLOR_4 MAP2_COLOR_4}{@link GL11#GL_MAP2_NORMAL MAP2_NORMAL}{@link GL11#GL_MAP2_TEXTURE_COORD_1 MAP2_TEXTURE_COORD_1}{@link GL11#GL_MAP2_TEXTURE_COORD_2 MAP2_TEXTURE_COORD_2}{@link GL11#GL_MAP2_TEXTURE_COORD_3 MAP2_TEXTURE_COORD_3}
    {@link GL11#GL_MAP2_TEXTURE_COORD_4 MAP2_TEXTURE_COORD_4}
    - * @param query the information to query. One of:
    {@link GL11#GL_ORDER ORDER}{@link GL11#GL_COEFF COEFF}{@link GL11#GL_DOMAIN DOMAIN}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetnMapi(@NativeType("GLenum") int target, @NativeType("GLenum") int query) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer data = stack.callocInt(1); - nglGetnMapiv(target, query, 1, memAddress(data)); - return data.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnPixelMapfv ] --- - - /** - * Unsafe version of: {@link #glGetnPixelMapfv GetnPixelMapfv} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnPixelMapfv(int map, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetPixelMapfv GetPixelMapfv} - * - * @param map the pixel map parameter to query. One of:
    {@link GL11#GL_PIXEL_MAP_I_TO_I PIXEL_MAP_I_TO_I}{@link GL11#GL_PIXEL_MAP_S_TO_S PIXEL_MAP_S_TO_S}{@link GL11#GL_PIXEL_MAP_I_TO_R PIXEL_MAP_I_TO_R}{@link GL11#GL_PIXEL_MAP_I_TO_G PIXEL_MAP_I_TO_G}{@link GL11#GL_PIXEL_MAP_I_TO_B PIXEL_MAP_I_TO_B}
    {@link GL11#GL_PIXEL_MAP_I_TO_A PIXEL_MAP_I_TO_A}{@link GL11#GL_PIXEL_MAP_R_TO_R PIXEL_MAP_R_TO_R}{@link GL11#GL_PIXEL_MAP_G_TO_G PIXEL_MAP_G_TO_G}{@link GL11#GL_PIXEL_MAP_B_TO_B PIXEL_MAP_B_TO_B}{@link GL11#GL_PIXEL_MAP_A_TO_A PIXEL_MAP_A_TO_A}
    - * @param data a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLfloat *") FloatBuffer data) { - nglGetnPixelMapfv(map, data.remaining(), memAddress(data)); - } - - // --- [ glGetnPixelMapuiv ] --- - - /** - * Unsafe version of: {@link #glGetnPixelMapuiv GetnPixelMapuiv} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnPixelMapuiv(int map, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetPixelMapuiv GetPixelMapuiv} - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLuint *") IntBuffer data) { - nglGetnPixelMapuiv(map, data.remaining(), memAddress(data)); - } - - // --- [ glGetnPixelMapusv ] --- - - /** - * Unsafe version of: {@link #glGetnPixelMapusv GetnPixelMapusv} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglGetnPixelMapusv(int map, int bufSize, long data); - - /** - * Robust version of {@link GL11#glGetPixelMapusv GetPixelMapusv} - * - * @param map the pixel map parameter to query - * @param data a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLushort *") ShortBuffer data) { - nglGetnPixelMapusv(map, data.remaining(), memAddress(data)); - } - - // --- [ glGetnPolygonStipple ] --- - - /** - * Unsafe version of: {@link #glGetnPolygonStipple GetnPolygonStipple} - * - * @param bufSize the maximum number of bytes to write into {@code pattern} - */ - public static native void nglGetnPolygonStipple(int bufSize, long pattern); - - /** - * Robust version of {@link GL11#glGetPolygonStipple GetPolygonStipple} - * - * @param bufSize the maximum number of bytes to write into {@code pattern} - * @param pattern a buffer in which to place the returned pattern - * - * @see Reference Page - */ - public static void glGetnPolygonStipple(@NativeType("GLsizei") int bufSize, @NativeType("GLubyte *") long pattern) { - nglGetnPolygonStipple(bufSize, pattern); - } - - /** - * Robust version of {@link GL11#glGetPolygonStipple GetPolygonStipple} - * - * @param pattern a buffer in which to place the returned pattern - * - * @see Reference Page - */ - public static void glGetnPolygonStipple(@NativeType("GLubyte *") ByteBuffer pattern) { - nglGetnPolygonStipple(pattern.remaining(), memAddress(pattern)); - } - - // --- [ glGetnTexImage ] --- - - /** - * Unsafe version of: {@link #glGetnTexImage GetnTexImage} - * - * @param bufSize the maximum number of bytes to write into {@code img} - */ - public static void nglGetnTexImage(int tex, int level, int format, int type, int bufSize, long img) { - GL45C.nglGetnTexImage(tex, level, format, type, bufSize, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param bufSize the maximum number of bytes to write into {@code img} - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long img) { - GL45C.glGetnTexImage(tex, level, format, type, bufSize, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - // --- [ glReadnPixels ] --- - - /** - * Unsafe version of: {@link #glReadnPixels ReadnPixels} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static void nglReadnPixels(int x, int y, int width, int height, int format, int type, int bufSize, long pixels) { - GL45C.nglReadnPixels(x, y, width, height, format, type, bufSize, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param bufSize the maximum number of bytes to write into {@code data} - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, bufSize, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - // --- [ glGetnColorTable ] --- - - /** - * Unsafe version of: {@link #glGetnColorTable GetnColorTable} - * - * @param bufSize the maximum number of bytes to write into {@code table} - */ - public static native void nglGetnColorTable(int target, int format, int type, int bufSize, long table); - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code table} - * @param table a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long table) { - nglGetnColorTable(target, format, type, bufSize, table); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer table) { - nglGetnColorTable(target, format, type, table.remaining(), memAddress(table)); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer table) { - nglGetnColorTable(target, format, type, table.remaining() << 1, memAddress(table)); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer table) { - nglGetnColorTable(target, format, type, table.remaining() << 2, memAddress(table)); - } - - /** - * Robust version of {@link ARBImaging#glGetColorTable GetColorTable} - * - * @param target the color table target. One of:
    {@link ARBImaging#GL_COLOR_TABLE COLOR_TABLE}{@link ARBImaging#GL_POST_CONVOLUTION_COLOR_TABLE POST_CONVOLUTION_COLOR_TABLE}{@link ARBImaging#GL_POST_COLOR_MATRIX_COLOR_TABLE POST_COLOR_MATRIX_COLOR_TABLE}
    - * @param format the color data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the color data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param table a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer table) { - nglGetnColorTable(target, format, type, table.remaining() << 2, memAddress(table)); - } - - // --- [ glGetnConvolutionFilter ] --- - - /** - * Unsafe version of: {@link #glGetnConvolutionFilter GetnConvolutionFilter} - * - * @param bufSize the maximum number of bytes to write into {@code image} - */ - public static native void nglGetnConvolutionFilter(int target, int format, int type, int bufSize, long image); - - /** - * Robust version of {@link ARBImaging#glGetConvolutionFilter GetConvolutionFilter} - * - * @param target the convolution target. One of:
    {@link ARBImaging#GL_CONVOLUTION_1D CONVOLUTION_1D}{@link ARBImaging#GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code image} - * @param image a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnConvolutionFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long image) { - nglGetnConvolutionFilter(target, format, type, bufSize, image); - } - - /** - * Robust version of {@link ARBImaging#glGetConvolutionFilter GetConvolutionFilter} - * - * @param target the convolution target. One of:
    {@link ARBImaging#GL_CONVOLUTION_1D CONVOLUTION_1D}{@link ARBImaging#GL_CONVOLUTION_2D CONVOLUTION_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param image a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnConvolutionFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer image) { - nglGetnConvolutionFilter(target, format, type, image.remaining(), memAddress(image)); - } - - // --- [ glGetnSeparableFilter ] --- - - /** - * Unsafe version of: {@link #glGetnSeparableFilter GetnSeparableFilter} - * - * @param rowBufSize the maximum number of bytes to write into {@code row} - * @param columnBufSize the maximum number of bytes to write into {@code column} - */ - public static native void nglGetnSeparableFilter(int target, int format, int type, int rowBufSize, long row, int columnBufSize, long column, long span); - - /** - * Robust version of {@link ARBImaging#glGetSeparableFilter GetSeparableFilter} - * - * @param target the filter target. Must be:
    {@link ARBImaging#GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param rowBufSize the maximum number of bytes to write into {@code row} - * @param row a buffer in which to return the filter row - * @param columnBufSize the maximum number of bytes to write into {@code column} - * @param column a buffer in which to return the filter column - * - * @see Reference Page - */ - public static void glGetnSeparableFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int rowBufSize, @NativeType("void *") long row, @NativeType("GLsizei") int columnBufSize, @NativeType("void *") long column, @Nullable @NativeType("void *") ByteBuffer span) { - nglGetnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize, column, memAddressSafe(span)); - } - - /** - * Robust version of {@link ARBImaging#glGetSeparableFilter GetSeparableFilter} - * - * @param target the filter target. Must be:
    {@link ARBImaging#GL_SEPARABLE_2D SEPARABLE_2D}
    - * @param format the filter data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the filter data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param row a buffer in which to return the filter row - * @param column a buffer in which to return the filter column - * - * @see Reference Page - */ - public static void glGetnSeparableFilter(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer row, @NativeType("void *") ByteBuffer column, @Nullable @NativeType("void *") ByteBuffer span) { - nglGetnSeparableFilter(target, format, type, row.remaining(), memAddress(row), column.remaining(), memAddress(column), memAddressSafe(span)); - } - - // --- [ glGetnHistogram ] --- - - /** - * Unsafe version of: {@link #glGetnHistogram GetnHistogram} - * - * @param bufSize the maximum number of bytes to write into {@code values} - */ - public static native void nglGetnHistogram(int target, boolean reset, int format, int type, int bufSize, long values); - - /** - * Robust version of {@link ARBImaging#glGetHistogram GetHistogram} - * - * @param target the histogram target. Must be:
    {@link ARBImaging#GL_HISTOGRAM HISTOGRAM}
    - * @param reset if {@link GL11#GL_TRUE TRUE}, then all counters of all elements of the histogram are reset to zero. Counters are reset whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data types. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code values} - * @param values a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnHistogram(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long values) { - nglGetnHistogram(target, reset, format, type, bufSize, values); - } - - /** - * Robust version of {@link ARBImaging#glGetHistogram GetHistogram} - * - * @param target the histogram target. Must be:
    {@link ARBImaging#GL_HISTOGRAM HISTOGRAM}
    - * @param reset if {@link GL11#GL_TRUE TRUE}, then all counters of all elements of the histogram are reset to zero. Counters are reset whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data types. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnHistogram(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer values) { - nglGetnHistogram(target, reset, format, type, values.remaining(), memAddress(values)); - } - - // --- [ glGetnMinmax ] --- - - /** - * Unsafe version of: {@link #glGetnMinmax GetnMinmax} - * - * @param bufSize the maximum number of bytes to write into {@code values} - */ - public static native void nglGetnMinmax(int target, boolean reset, int format, int type, int bufSize, long values); - - /** - * Robust version of {@link ARBImaging#glGetMinmax GetMinmax} - * - * @param target the minmax target. Must be:
    {@link ARBImaging#GL_MINMAX MINMAX}
    - * @param reset If {@link GL11#GL_TRUE TRUE}, then each minimum value is reset to the maximum representable value, and each maximum value is reset to the minimum - * representable value. All values are reset, whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param bufSize the maximum number of bytes to write into {@code values} - * @param values a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnMinmax(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long values) { - nglGetnMinmax(target, reset, format, type, bufSize, values); - } - - /** - * Robust version of {@link ARBImaging#glGetMinmax GetMinmax} - * - * @param target the minmax target. Must be:
    {@link ARBImaging#GL_MINMAX MINMAX}
    - * @param reset If {@link GL11#GL_TRUE TRUE}, then each minimum value is reset to the maximum representable value, and each maximum value is reset to the minimum - * representable value. All values are reset, whether returned or not. - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL11#GL_RGB RGB}{@link GL11#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}{@link GL12#GL_BGRA BGRA}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}
    {@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}{@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}
    {@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    - * @param values a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnMinmax(@NativeType("GLenum") int target, @NativeType("GLboolean") boolean reset, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer values) { - nglGetnMinmax(target, reset, format, type, values.remaining(), memAddress(values)); - } - - // --- [ glGetnCompressedTexImage ] --- - - /** - * Unsafe version of: {@link #glGetnCompressedTexImage GetnCompressedTexImage} - * - * @param bufSize the maximum number of bytes to write into {@code img} - */ - public static void nglGetnCompressedTexImage(int target, int level, int bufSize, long img) { - GL45C.nglGetnCompressedTexImage(target, level, bufSize, img); - } - - /** - * Robust version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage} - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param bufSize the maximum number of bytes to write into {@code img} - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLsizei") int bufSize, @NativeType("void *") long img) { - GL45C.glGetnCompressedTexImage(target, level, bufSize, img); - } - - /** - * Robust version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage} - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer img) { - GL45C.glGetnCompressedTexImage(target, level, img); - } - - // --- [ glGetnUniformfv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformfv GetnUniformfv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static void nglGetnUniformfv(int program, int location, int bufSize, long params) { - GL45C.nglGetnUniformfv(program, location, bufSize, params); - } - - /** - * Returns the value or values of a uniform of the default uniform block. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - GL45C.glGetnUniformfv(program, location, params); - } - - /** - * Returns the value or values of a uniform of the default uniform block. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetnUniformf(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL45C.glGetnUniformf(program, location); - } - - // --- [ glGetnUniformdv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformdv GetnUniformdv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static void nglGetnUniformdv(int program, int location, int bufSize, long params) { - GL45C.nglGetnUniformdv(program, location, bufSize, params); - } - - /** - * Double version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") DoubleBuffer params) { - GL45C.glGetnUniformdv(program, location, params); - } - - /** - * Double version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetnUniformd(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL45C.glGetnUniformd(program, location); - } - - // --- [ glGetnUniformiv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformiv GetnUniformiv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static void nglGetnUniformiv(int program, int location, int bufSize, long params) { - GL45C.nglGetnUniformiv(program, location, bufSize, params); - } - - /** - * Integer version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetnUniformiv(program, location, params); - } - - /** - * Integer version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL45C.glGetnUniformi(program, location); - } - - // --- [ glGetnUniformuiv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformuiv GetnUniformuiv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static void nglGetnUniformuiv(int program, int location, int bufSize, long params) { - GL45C.nglGetnUniformuiv(program, location, bufSize, params); - } - - /** - * Unsigned version of {@link #glGetnUniformiv GetnUniformiv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - GL45C.glGetnUniformuiv(program, location, params); - } - - /** - * Unsigned version of {@link #glGetnUniformiv GetnUniformiv}. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL45C.glGetnUniformui(program, location); - } - - /** - * Array version of: {@link #glCreateTransformFeedbacks CreateTransformFeedbacks} - * - * @see Reference Page - */ - public static void glCreateTransformFeedbacks(@NativeType("GLuint *") int[] ids) { - GL45C.glCreateTransformFeedbacks(ids); - } - - /** - * Array version of: {@link #glGetTransformFeedbackiv GetTransformFeedbackiv} - * - * @see Reference Page - */ - public static void glGetTransformFeedbackiv(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - GL45C.glGetTransformFeedbackiv(xfb, pname, param); - } - - /** - * Array version of: {@link #glGetTransformFeedbacki_v GetTransformFeedbacki_v} - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint *") int[] param) { - GL45C.glGetTransformFeedbacki_v(xfb, pname, index, param); - } - - /** - * Array version of: {@link #glGetTransformFeedbacki64_v GetTransformFeedbacki64_v} - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki64_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") long[] param) { - GL45C.glGetTransformFeedbacki64_v(xfb, pname, index, param); - } - - /** - * Array version of: {@link #glCreateBuffers CreateBuffers} - * - * @see Reference Page - */ - public static void glCreateBuffers(@NativeType("GLuint *") int[] buffers) { - GL45C.glCreateBuffers(buffers); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLbitfield") int flags) { - GL45C.glNamedBufferStorage(buffer, data, flags); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") long[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLenum") int usage) { - GL45C.glNamedBufferData(buffer, data, usage); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") short[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") int[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") long[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") float[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") double[] data) { - GL45C.glNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL45C.glClearNamedBufferData(buffer, internalformat, format, type, data); - } - - /** - * Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - GL45C.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); - } - - /** - * Array version of: {@link #glGetNamedBufferParameteriv GetNamedBufferParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteriv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedBufferParameteriv(buffer, pname, params); - } - - /** - * Array version of: {@link #glGetNamedBufferParameteri64v GetNamedBufferParameteri64v} - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteri64v(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - GL45C.glGetNamedBufferParameteri64v(buffer, pname, params); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") short[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") int[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") long[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") float[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") double[] data) { - GL45C.glGetNamedBufferSubData(buffer, offset, data); - } - - /** - * Array version of: {@link #glCreateFramebuffers CreateFramebuffers} - * - * @see Reference Page - */ - public static void glCreateFramebuffers(@NativeType("GLuint *") int[] framebuffers) { - GL45C.glCreateFramebuffers(framebuffers); - } - - /** - * Array version of: {@link #glNamedFramebufferDrawBuffers NamedFramebufferDrawBuffers} - * - * @see Reference Page - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] bufs) { - GL45C.glNamedFramebufferDrawBuffers(framebuffer, bufs); - } - - /** - * Array version of: {@link #glInvalidateNamedFramebufferData InvalidateNamedFramebufferData} - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] attachments) { - GL45C.glInvalidateNamedFramebufferData(framebuffer, attachments); - } - - /** - * Array version of: {@link #glInvalidateNamedFramebufferSubData InvalidateNamedFramebufferSubData} - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - GL45C.glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); - } - - /** - * Array version of: {@link #glClearNamedFramebufferiv ClearNamedFramebufferiv} - * - * @see Reference Page - */ - public static void glClearNamedFramebufferiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - GL45C.glClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value); - } - - /** - * Array version of: {@link #glClearNamedFramebufferuiv ClearNamedFramebufferuiv} - * - * @see Reference Page - */ - public static void glClearNamedFramebufferuiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - GL45C.glClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value); - } - - /** - * Array version of: {@link #glClearNamedFramebufferfv ClearNamedFramebufferfv} - * - * @see Reference Page - */ - public static void glClearNamedFramebufferfv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") float[] value) { - GL45C.glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); - } - - /** - * Array version of: {@link #glGetNamedFramebufferParameteriv GetNamedFramebufferParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedFramebufferParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedFramebufferParameteriv(framebuffer, pname, params); - } - - /** - * Array version of: {@link #glGetNamedFramebufferAttachmentParameteriv GetNamedFramebufferAttachmentParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedFramebufferAttachmentParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); - } - - /** - * Array version of: {@link #glCreateRenderbuffers CreateRenderbuffers} - * - * @see Reference Page - */ - public static void glCreateRenderbuffers(@NativeType("GLuint *") int[] renderbuffers) { - GL45C.glCreateRenderbuffers(renderbuffers); - } - - /** - * Array version of: {@link #glGetNamedRenderbufferParameteriv GetNamedRenderbufferParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedRenderbufferParameteriv(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); - } - - /** - * Array version of: {@link #glCreateTextures CreateTextures} - * - * @see Reference Page - */ - public static void glCreateTextures(@NativeType("GLenum") int target, @NativeType("GLuint *") int[] textures) { - GL45C.glCreateTextures(target, textures); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL45C.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL45C.glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - GL45C.glTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glTextureParameterfv TextureParameterfv} - * - * @see Reference Page - */ - public static void glTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - GL45C.glTextureParameterfv(texture, pname, params); - } - - /** - * Array version of: {@link #glTextureParameterIiv TextureParameterIiv} - * - * @see Reference Page - */ - public static void glTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL45C.glTextureParameterIiv(texture, pname, params); - } - - /** - * Array version of: {@link #glTextureParameterIuiv TextureParameterIuiv} - * - * @see Reference Page - */ - public static void glTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - GL45C.glTextureParameterIuiv(texture, pname, params); - } - - /** - * Array version of: {@link #glTextureParameteriv TextureParameteriv} - * - * @see Reference Page - */ - public static void glTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - GL45C.glTextureParameteriv(texture, pname, params); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - GL45C.glGetTextureImage(texture, level, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTextureLevelParameterfv GetTextureLevelParameterfv} - * - * @see Reference Page - */ - public static void glGetTextureLevelParameterfv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL45C.glGetTextureLevelParameterfv(texture, level, pname, params); - } - - /** - * Array version of: {@link #glGetTextureLevelParameteriv GetTextureLevelParameteriv} - * - * @see Reference Page - */ - public static void glGetTextureLevelParameteriv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetTextureLevelParameteriv(texture, level, pname, params); - } - - /** - * Array version of: {@link #glGetTextureParameterfv GetTextureParameterfv} - * - * @see Reference Page - */ - public static void glGetTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - GL45C.glGetTextureParameterfv(texture, pname, params); - } - - /** - * Array version of: {@link #glGetTextureParameterIiv GetTextureParameterIiv} - * - * @see Reference Page - */ - public static void glGetTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetTextureParameterIiv(texture, pname, params); - } - - /** - * Array version of: {@link #glGetTextureParameterIuiv GetTextureParameterIuiv} - * - * @see Reference Page - */ - public static void glGetTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - GL45C.glGetTextureParameterIuiv(texture, pname, params); - } - - /** - * Array version of: {@link #glGetTextureParameteriv GetTextureParameteriv} - * - * @see Reference Page - */ - public static void glGetTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - GL45C.glGetTextureParameteriv(texture, pname, params); - } - - /** - * Array version of: {@link #glCreateVertexArrays CreateVertexArrays} - * - * @see Reference Page - */ - public static void glCreateVertexArrays(@NativeType("GLuint *") int[] arrays) { - GL45C.glCreateVertexArrays(arrays); - } - - /** - * Array version of: {@link #glVertexArrayVertexBuffers VertexArrayVertexBuffers} - * - * @see Reference Page - */ - public static void glVertexArrayVertexBuffers(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") int[] strides) { - GL45C.glVertexArrayVertexBuffers(vaobj, first, buffers, offsets, strides); - } - - /** - * Array version of: {@link #glGetVertexArrayiv GetVertexArrayiv} - * - * @see Reference Page - */ - public static void glGetVertexArrayiv(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - GL45C.glGetVertexArrayiv(vaobj, pname, param); - } - - /** - * Array version of: {@link #glGetVertexArrayIndexediv GetVertexArrayIndexediv} - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexediv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - GL45C.glGetVertexArrayIndexediv(vaobj, index, pname, param); - } - - /** - * Array version of: {@link #glGetVertexArrayIndexed64iv GetVertexArrayIndexed64iv} - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexed64iv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] param) { - GL45C.glGetVertexArrayIndexed64iv(vaobj, index, pname, param); - } - - /** - * Array version of: {@link #glCreateSamplers CreateSamplers} - * - * @see Reference Page - */ - public static void glCreateSamplers(@NativeType("GLuint *") int[] samplers) { - GL45C.glCreateSamplers(samplers); - } - - /** - * Array version of: {@link #glCreateProgramPipelines CreateProgramPipelines} - * - * @see Reference Page - */ - public static void glCreateProgramPipelines(@NativeType("GLuint *") int[] pipelines) { - GL45C.glCreateProgramPipelines(pipelines); - } - - /** - * Array version of: {@link #glCreateQueries CreateQueries} - * - * @see Reference Page - */ - public static void glCreateQueries(@NativeType("GLenum") int target, @NativeType("GLuint *") int[] ids) { - GL45C.glCreateQueries(target, ids); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - GL45C.glGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") short[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") int[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") float[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") double[] pixels) { - GL45C.glGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); - } - - /** - * Array version of: {@link #glGetnMapdv GetnMapdv} - * - * @see Reference Page - */ - public static void glGetnMapdv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLdouble *") double[] data) { - long __functionAddress = GL.getICD().glGetnMapdv; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, query, data.length, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetnMapfv GetnMapfv} - * - * @see Reference Page - */ - public static void glGetnMapfv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetnMapfv; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, query, data.length, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetnMapiv GetnMapiv} - * - * @see Reference Page - */ - public static void glGetnMapiv(@NativeType("GLenum") int target, @NativeType("GLenum") int query, @NativeType("GLint *") int[] data) { - long __functionAddress = GL.getICD().glGetnMapiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, query, data.length, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetnPixelMapfv GetnPixelMapfv} - * - * @see Reference Page - */ - public static void glGetnPixelMapfv(@NativeType("GLenum") int map, @NativeType("GLfloat *") float[] data) { - long __functionAddress = GL.getICD().glGetnPixelMapfv; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, data.length, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetnPixelMapuiv GetnPixelMapuiv} - * - * @see Reference Page - */ - public static void glGetnPixelMapuiv(@NativeType("GLenum") int map, @NativeType("GLuint *") int[] data) { - long __functionAddress = GL.getICD().glGetnPixelMapuiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, data.length, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetnPixelMapusv GetnPixelMapusv} - * - * @see Reference Page - */ - public static void glGetnPixelMapusv(@NativeType("GLenum") int map, @NativeType("GLushort *") short[] data) { - long __functionAddress = GL.getICD().glGetnPixelMapusv; - if (CHECKS) { - check(__functionAddress); - } - callPV(map, data.length, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] img) { - GL45C.glGetnTexImage(tex, level, format, type, img); - } - - /** - * Array version of: {@link #glReadnPixels ReadnPixels} - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glReadnPixels ReadnPixels} - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glReadnPixels ReadnPixels} - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Array version of: {@link #glGetnColorTable GetnColorTable} - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] table) { - long __functionAddress = GL.getICD().glGetnColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table.length << 1, table, __functionAddress); - } - - /** - * Array version of: {@link #glGetnColorTable GetnColorTable} - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] table) { - long __functionAddress = GL.getICD().glGetnColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table.length << 2, table, __functionAddress); - } - - /** - * Array version of: {@link #glGetnColorTable GetnColorTable} - * - * @see Reference Page - */ - public static void glGetnColorTable(@NativeType("GLenum") int target, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] table) { - long __functionAddress = GL.getICD().glGetnColorTable; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, format, type, table.length << 2, table, __functionAddress); - } - - /** - * Array version of: {@link #glGetnUniformfv GetnUniformfv} - * - * @see Reference Page - */ - public static void glGetnUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) { - GL45C.glGetnUniformfv(program, location, params); - } - - /** - * Array version of: {@link #glGetnUniformdv GetnUniformdv} - * - * @see Reference Page - */ - public static void glGetnUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") double[] params) { - GL45C.glGetnUniformdv(program, location, params); - } - - /** - * Array version of: {@link #glGetnUniformiv GetnUniformiv} - * - * @see Reference Page - */ - public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) { - GL45C.glGetnUniformiv(program, location, params); - } - - /** - * Array version of: {@link #glGetnUniformuiv GetnUniformuiv} - * - * @see Reference Page - */ - public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - GL45C.glGetnUniformuiv(program, location, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL45C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL45C.java deleted file mode 100644 index 17ef971f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL45C.java +++ /dev/null @@ -1,5639 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.5. Includes only Core Profile symbols. - * - *

    OpenGL 4.5 implementations support revision 4.50 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL45C extends GL44C { - - static { GL.initialize(); } - - /** Accepted by the {@code depth} parameter of {@link #glClipControl ClipControl}. */ - public static final int - GL_NEGATIVE_ONE_TO_ONE = 0x935E, - GL_ZERO_TO_ONE = 0x935F; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_CLIP_ORIGIN = 0x935C, - GL_CLIP_DEPTH_MODE = 0x935D; - - /** Accepted by the {@code mode} parameter of {@link GL30C#glBeginConditionalRender BeginConditionalRender}. */ - public static final int - GL_QUERY_WAIT_INVERTED = 0x8E17, - GL_QUERY_NO_WAIT_INVERTED = 0x8E18, - GL_QUERY_BY_REGION_WAIT_INVERTED = 0x8E19, - GL_QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v. */ - public static final int - GL_MAX_CULL_DISTANCES = 0x82F9, - GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA; - - /** Accepted by the {@code pname} parameter of GetTextureParameter{if}v and GetTextureParameterI{i ui}v. */ - public static final int GL_TEXTURE_TARGET = 0x1006; - - /** Accepted by the {@code pname} parameter of GetQueryObjectiv. */ - public static final int GL_QUERY_TARGET = 0x82EA; - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetFloatv, GetBooleanv GetDoublev and GetInteger64v. */ - public static final int GL_CONTEXT_RELEASE_BEHAVIOR = 0x82FB; - - /** Returned in {@code data} by GetIntegerv, GetFloatv, GetBooleanv GetDoublev and GetInteger64v when {@code pname} is {@link #GL_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR}. */ - public static final int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC; - - /** Returned by {@link #glGetGraphicsResetStatus GetGraphicsResetStatus}. */ - public static final int - GL_GUILTY_CONTEXT_RESET = 0x8253, - GL_INNOCENT_CONTEXT_RESET = 0x8254, - GL_UNKNOWN_CONTEXT_RESET = 0x8255; - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, and GetFloatv. */ - public static final int GL_RESET_NOTIFICATION_STRATEGY = 0x8256; - - /** Returned by GetIntegerv and related simple queries when {@code value} is {@link #GL_RESET_NOTIFICATION_STRATEGY RESET_NOTIFICATION_STRATEGY}. */ - public static final int - GL_LOSE_CONTEXT_ON_RESET = 0x8252, - GL_NO_RESET_NOTIFICATION = 0x8261; - - /** Returned by GetIntegerv when {@code pname} is CONTEXT_FLAGS. */ - public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 0x4; - - /** Returned by {@link GL11C#glGetError GetError}. */ - public static final int GL_CONTEXT_LOST = 0x507; - - protected GL45C() { - throw new UnsupportedOperationException(); - } - - // --- [ glClipControl ] --- - - /** - * Controls the clipping volume behavior. - * - *

    These parameters update the clip control origin and depth mode respectively. The initial value of the clip control origin is {@link GL20#GL_LOWER_LEFT LOWER_LEFT} and the - * initial value of the depth mode is {@link #GL_NEGATIVE_ONE_TO_ONE NEGATIVE_ONE_TO_ONE}.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if ClipControl is executed between the execution of {@link GL11#glBegin Begin} and the corresponding - * execution of {@link GL11#glEnd End}.

    - * - * @param origin the clip origin. One of:
    {@link GL20#GL_LOWER_LEFT LOWER_LEFT}{@link GL20#GL_UPPER_LEFT UPPER_LEFT}
    - * @param depth the clip depth mode. One of:
    {@link #GL_NEGATIVE_ONE_TO_ONE NEGATIVE_ONE_TO_ONE}{@link #GL_ZERO_TO_ONE ZERO_TO_ONE}
    - * - * @see Reference Page - */ - public static native void glClipControl(@NativeType("GLenum") int origin, @NativeType("GLenum") int depth); - - // --- [ glCreateTransformFeedbacks ] --- - - /** - * Unsafe version of: {@link #glCreateTransformFeedbacks CreateTransformFeedbacks} - * - * @param n the number of transform feedback object names to create - */ - public static native void nglCreateTransformFeedbacks(int n, long ids); - - /** - * Returns {@code n} previously unused transform feedback object names in {@code ids}, each representing a new state vector. - * - * @param ids the buffer in which to return the names - * - * @see Reference Page - */ - public static void glCreateTransformFeedbacks(@NativeType("GLuint *") IntBuffer ids) { - nglCreateTransformFeedbacks(ids.remaining(), memAddress(ids)); - } - - /** - * Returns {@code n} previously unused transform feedback object names in {@code ids}, each representing a new state vector. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateTransformFeedbacks() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.callocInt(1); - nglCreateTransformFeedbacks(1, memAddress(ids)); - return ids.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTransformFeedbackBufferBase ] --- - - /** - * Binds a buffer object to a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param index the transform feedback stream index - * @param buffer the name of an existing buffer object - * - * @see Reference Page - */ - public static native void glTransformFeedbackBufferBase(@NativeType("GLuint") int xfb, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer); - - // --- [ glTransformFeedbackBufferRange ] --- - - /** - * Binds a region of a buffer object to a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param index the transform feedback stream index - * @param buffer the name of an existing buffer object - * @param offset the starting offset in basic machine units into the buffer object - * @param size the amount of data in machine units - * - * @see Reference Page - */ - public static native void glTransformFeedbackBufferRange(@NativeType("GLuint") int xfb, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size); - - // --- [ glGetTransformFeedbackiv ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbackiv GetTransformFeedbackiv} */ - public static native void nglGetTransformFeedbackiv(int xfb, int pname, long param); - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL42#GL_TRANSFORM_FEEDBACK_PAUSED TRANSFORM_FEEDBACK_PAUSED}{@link GL42#GL_TRANSFORM_FEEDBACK_ACTIVE TRANSFORM_FEEDBACK_ACTIVE}
    - * @param param the buffer in which to return the parameter value - * - * @see Reference Page - */ - public static void glGetTransformFeedbackiv(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetTransformFeedbackiv(xfb, pname, memAddress(param)); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL42#GL_TRANSFORM_FEEDBACK_PAUSED TRANSFORM_FEEDBACK_PAUSED}{@link GL42#GL_TRANSFORM_FEEDBACK_ACTIVE TRANSFORM_FEEDBACK_ACTIVE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTransformFeedbacki(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer param = stack.callocInt(1); - nglGetTransformFeedbackiv(xfb, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTransformFeedbacki_v ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbacki_v GetTransformFeedbacki_v} */ - public static native void nglGetTransformFeedbacki_v(int xfb, int pname, int index, long param); - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. Must be:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_BINDING TRANSFORM_FEEDBACK_BUFFER_BINDING}
    - * @param index the transform feedback stream index - * @param param the buffer in which to return the parameter value - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetTransformFeedbacki_v(xfb, pname, index, memAddress(param)); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. Must be:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_BINDING TRANSFORM_FEEDBACK_BUFFER_BINDING}
    - * @param index the transform feedback stream index - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTransformFeedbacki(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer param = stack.callocInt(1); - nglGetTransformFeedbacki_v(xfb, pname, index, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTransformFeedbacki64_v ] --- - - /** Unsafe version of: {@link #glGetTransformFeedbacki64_v GetTransformFeedbacki64_v} */ - public static native void nglGetTransformFeedbacki64_v(int xfb, int pname, int index, long param); - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_START TRANSFORM_FEEDBACK_BUFFER_START}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_SIZE TRANSFORM_FEEDBACK_BUFFER_SIZE}
    - * @param index the transform feedback stream index - * @param param the buffer in which to return the parameter value - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki64_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") LongBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetTransformFeedbacki64_v(xfb, pname, index, memAddress(param)); - } - - /** - * Returns information about a transform feedback object. - * - * @param xfb zero or the name of an existing transform feedback object - * @param pname the parameter to query. One of:
    {@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_START TRANSFORM_FEEDBACK_BUFFER_START}{@link GL30#GL_TRANSFORM_FEEDBACK_BUFFER_SIZE TRANSFORM_FEEDBACK_BUFFER_SIZE}
    - * @param index the transform feedback stream index - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetTransformFeedbacki64(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer param = stack.callocLong(1); - nglGetTransformFeedbacki64_v(xfb, pname, index, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCreateBuffers ] --- - - /** - * Unsafe version of: {@link #glCreateBuffers CreateBuffers} - * - * @param n the number of buffer names to create - */ - public static native void nglCreateBuffers(int n, long buffers); - - /** - * Returns {@code n} previously unused buffer names in {@code buffers}, each representing a new buffer object initialized as if it had been bound to an - * unspecified target. - * - * @param buffers the buffer in which to return the names - * - * @see Reference Page - */ - public static void glCreateBuffers(@NativeType("GLuint *") IntBuffer buffers) { - nglCreateBuffers(buffers.remaining(), memAddress(buffers)); - } - - /** - * Returns {@code n} previously unused buffer names in {@code buffers}, each representing a new buffer object initialized as if it had been bound to an - * unspecified target. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateBuffers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer buffers = stack.callocInt(1); - nglCreateBuffers(1, memAddress(buffers)); - return buffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glNamedBufferStorage ] --- - - /** - * Unsafe version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @param size the size of the data store in basic machine units - */ - public static native void nglNamedBufferStorage(int buffer, long size, long data, int flags); - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param size the size of the data store in basic machine units - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorage(buffer, size, NULL, flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorage(buffer, data.remaining(), memAddress(data), flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorage(buffer, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data), flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorage(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorage(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), flags); - } - - /** - * DSA version of {@link GL44C#glBufferStorage BufferStorage}. - * - * @param buffer the buffer object name - * @param data the address in client memory of the data that should be used to initialize the buffer's data store. If {@code data} is {@code NULL}, the data store of the - * buffer is created, but contains undefined data. Otherwise, {@code data} should point to an array of at least {@code size} basic machine units. - * @param flags the bitwise {@code OR} of flags describing the intended usage of the buffer object's data store by the application. Valid flags and their meanings - * are as follows: - * - *
      - *
    • {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT} – The contents of the data store may be updated after creation through calls to - * {@link GL15C#glBufferSubData BufferSubData}. If this bit is not set, the buffer content may not be directly updated by the client. The {@code data} - * argument may be used to specify the initial content of the buffer's data store regardless of the presence of the {@link GL44#GL_DYNAMIC_STORAGE_BIT DYNAMIC_STORAGE_BIT}. - * Regardless of the presence of this bit, buffers may always be updated with server-side calls such as {@link GL31C#glCopyBufferSubData CopyBufferSubData} and - * {@link GL43C#glClearBufferSubData ClearBufferSubData}.
    • - *
    • {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} – The buffer's data store may be mapped by the client for read access and a pointer in the client's address space - * obtained that may be read from.
    • - *
    • {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT} – The buffer's data store may be mapped by the client for write access and a pointer in the client's address - * space obtained that may be written to.
    • - *
    • {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT} – The client may request that the server read from or write to the buffer while it is mapped. The client's - * pointer to the data store remains valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
    • - *
    • {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} – Shared access to buffers that are simultaneously mapped for client access and are used by the server will be - * coherent, so long as that mapping is performed using MapBufferRange. That is, data written to the store by either the client or server will be - * immediately visible to the other with no further action taken by the application. In particular: - * - *
        - *
      • If {@code MAP_COHERENT_BIT} is not set and the client performs a write followed by a call to the {@link GL42C#glMemoryBarrier MemoryBarrier} command with - * the {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the client performs a write, then in subsequent commands the server will see the writes.
      • - *
      • If {@code MAP_COHERENT_BIT} is not set and the server performs a write, the application must call {@link GL42C#glMemoryBarrier MemoryBarrier} with the - * {@link GL44#GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT CLIENT_MAPPED_BUFFER_BARRIER_BIT} set and then call {@link GL32C#glFenceSync FenceSync} with {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or - * {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
      • If {@code MAP_COHERENT_BIT} is set and the server does a write, the app must call {@link GL32C#glFenceSync FenceSync} with - * {@link GL32#GL_SYNC_GPU_COMMANDS_COMPLETE SYNC_GPU_COMMANDS_COMPLETE} (or {@link GL11C#glFinish Finish}). Then the CPU will see the writes after the sync is complete.
      • - *
    • - *
    • {@link GL44#GL_CLIENT_STORAGE_BIT CLIENT_STORAGE_BIT} – When all other criteria for the buffer storage allocation are met, this bit may be used by an - * implementation to determine whether to use storage that is local to the server or to the client to serve as the backing store for the buffer.
    • - *
    - * - *

    If {@code flags} contains {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}, it must also contain at least one of {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT} or {@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}.

    - * - *

    It is an error to specify {@link GL44#GL_MAP_COHERENT_BIT MAP_COHERENT_BIT} without also specifying {@link GL44#GL_MAP_PERSISTENT_BIT MAP_PERSISTENT_BIT}.

    - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLbitfield") int flags) { - nglNamedBufferStorage(buffer, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), flags); - } - - // --- [ glNamedBufferData ] --- - - /** - * Unsafe version of: {@link #glNamedBufferData NamedBufferData} - * - * @param size the size in bytes of the buffer object's new data store - */ - public static native void nglNamedBufferData(int buffer, long size, long data, int usage); - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param size the size in bytes of the buffer object's new data store - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int usage) { - nglNamedBufferData(buffer, size, NULL, usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") ByteBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferData(buffer, data.remaining(), memAddress(data), usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") ShortBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferData(buffer, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data), usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") IntBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferData(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") LongBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferData(buffer, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") FloatBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferData(buffer, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data), usage); - } - - /** - * DSA version of {@link GL15C#glBufferData BufferData}. - * - * @param data a pointer to data that will be copied into the data store for initialization, or {@code NULL} if no data is to be copied - * @param usage the expected usage pattern of the data store. One of:
    {@link GL15#GL_STREAM_DRAW STREAM_DRAW}{@link GL15#GL_STREAM_READ STREAM_READ}{@link GL15#GL_STREAM_COPY STREAM_COPY}{@link GL15#GL_STATIC_DRAW STATIC_DRAW}{@link GL15#GL_STATIC_READ STATIC_READ}{@link GL15#GL_STATIC_COPY STATIC_COPY}{@link GL15#GL_DYNAMIC_DRAW DYNAMIC_DRAW}
    {@link GL15#GL_DYNAMIC_READ DYNAMIC_READ}{@link GL15#GL_DYNAMIC_COPY DYNAMIC_COPY}
    - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") DoubleBuffer data, @NativeType("GLenum") int usage) { - nglNamedBufferData(buffer, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data), usage); - } - - // --- [ glNamedBufferSubData ] --- - - /** - * Unsafe version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @param size the size in bytes of the data store region being replaced - */ - public static native void nglNamedBufferSubData(int buffer, long offset, long size, long data); - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ByteBuffer data) { - nglNamedBufferSubData(buffer, offset, data.remaining(), memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ShortBuffer data) { - nglNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") IntBuffer data) { - nglNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") LongBuffer data) { - nglNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") FloatBuffer data) { - nglNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glBufferSubData BufferSubData}. - * - * @param offset the offset into the buffer object's data store where data replacement will begin, measured in bytes - * @param data a pointer to the new data that will be copied into the data store - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") DoubleBuffer data) { - nglNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glCopyNamedBufferSubData ] --- - - /** - * DSA version of {@link GL31C#glCopyBufferSubData CopyBufferSubData}. - * - * @param readBuffer the source buffer object name - * @param writeBuffer the destination buffer object name - * @param readOffset the source buffer object offset, in bytes - * @param writeOffset the destination buffer object offset, in bytes - * @param size the number of bytes to copy - * - * @see Reference Page - */ - public static native void glCopyNamedBufferSubData(@NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size); - - // --- [ glClearNamedBufferData ] --- - - /** Unsafe version of: {@link #glClearNamedBufferData ClearNamedBufferData} */ - public static native void nglClearNamedBufferData(int buffer, int internalformat, int format, int type, long data); - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearNamedBufferData(buffer, internalformat, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearNamedBufferData(buffer, internalformat, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearNamedBufferData(buffer, internalformat, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link GL43C#glClearBufferData ClearBufferData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearNamedBufferData(buffer, internalformat, format, type, memAddressSafe(data)); - } - - // --- [ glClearNamedBufferSubData ] --- - - /** Unsafe version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} */ - public static native void nglClearNamedBufferSubData(int buffer, int internalformat, long offset, long size, int format, int type, long data); - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ByteBuffer data) { - nglClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") ShortBuffer data) { - nglClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") IntBuffer data) { - nglClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - /** - * DSA version of {@link GL43C#glClearBufferSubData ClearBufferSubData}. - * - * @param buffer the buffer object name - * @param internalformat the internal format with which the data will be stored in the buffer object - * @param offset the offset, in basic machine units into the buffer object's data store at which to start filling - * @param size the size, in basic machine units of the range of the data store to fill - * @param format the format of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the type of the data in memory addressed by {@code data}. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param data the buffer containing the data to be used as the source of the constant fill value. The elements of data are converted by the GL into the format - * specified by internalformat, and then used to fill the specified range of the destination buffer. If data is {@code NULL}, then it is ignored and the - * sub-range of the buffer is filled with zeros. - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") FloatBuffer data) { - nglClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, memAddressSafe(data)); - } - - // --- [ glMapNamedBuffer ] --- - - /** Unsafe version of: {@link #glMapNamedBuffer MapNamedBuffer} */ - public static native long nglMapNamedBuffer(int buffer, int access); - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access) { - long __result = nglMapNamedBuffer(buffer, access); - return memByteBufferSafe(__result, glGetNamedBufferParameteri(buffer, GL15.GL_BUFFER_SIZE)); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, @Nullable ByteBuffer old_buffer) { - long __result = nglMapNamedBuffer(buffer, access); - int length = glGetNamedBufferParameteri(buffer, GL15.GL_BUFFER_SIZE); - return apiGetMappedBuffer(old_buffer, __result, length); - } - - /** - * DSA version of {@link GL15C#glMapBuffer MapBuffer}. - * - * @param buffer the buffer object name - * @param access the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBuffer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access, long length, @Nullable ByteBuffer old_buffer) { - long __result = nglMapNamedBuffer(buffer, access); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - // --- [ glMapNamedBufferRange ] --- - - /** Unsafe version of: {@link #glMapNamedBufferRange MapNamedBufferRange} */ - public static native long nglMapNamedBufferRange(int buffer, long offset, long length, int access); - - /** - * DSA version of {@link GL30C#glMapBufferRange MapBufferRange}. - * - * @param buffer the buffer object name - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access) { - long __result = nglMapNamedBufferRange(buffer, offset, length, access); - return memByteBufferSafe(__result, (int)length); - } - - /** - * DSA version of {@link GL30C#glMapBufferRange MapBufferRange}. - * - * @param buffer the buffer object name - * @param offset the starting offset within the buffer of the range to be mapped - * @param length the length of the range to be mapped - * @param access a combination of access flags indicating the desired access to the range. One or more of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}{@link GL30#GL_MAP_INVALIDATE_RANGE_BIT MAP_INVALIDATE_RANGE_BIT}{@link GL30#GL_MAP_INVALIDATE_BUFFER_BIT MAP_INVALIDATE_BUFFER_BIT}
    {@link GL30#GL_MAP_FLUSH_EXPLICIT_BIT MAP_FLUSH_EXPLICIT_BIT}{@link GL30#GL_MAP_UNSYNCHRONIZED_BIT MAP_UNSYNCHRONIZED_BIT}
    - * - * @see Reference Page - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length, @NativeType("GLbitfield") int access, @Nullable ByteBuffer old_buffer) { - long __result = nglMapNamedBufferRange(buffer, offset, length, access); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - // --- [ glUnmapNamedBuffer ] --- - - /** - * DSA version of {@link GL15C#glUnmapBuffer UnmapBuffer}. - * - * @param buffer the buffer object name - * - * @see Reference Page - */ - @NativeType("GLboolean") - public static native boolean glUnmapNamedBuffer(@NativeType("GLuint") int buffer); - - // --- [ glFlushMappedNamedBufferRange ] --- - - /** - * DSA version of {@link GL30C#glFlushMappedBufferRange FlushMappedBufferRange}. - * - * @param buffer the buffer object name - * @param offset the start of the buffer subrange, in basic machine units - * @param length the length of the buffer subrange, in basic machine units - * - * @see Reference Page - */ - public static native void glFlushMappedNamedBufferRange(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long length); - - // --- [ glGetNamedBufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedBufferParameteriv GetNamedBufferParameteriv} */ - public static native void nglGetNamedBufferParameteriv(int buffer, int pname, long params); - - /** - * DSA version of {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteriv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedBufferParameteriv(buffer, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL15C#glGetBufferParameteriv GetBufferParameteriv}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedBufferParameteri(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedBufferParameteriv(buffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedBufferParameteri64v ] --- - - /** Unsafe version of: {@link #glGetNamedBufferParameteri64v GetNamedBufferParameteri64v} */ - public static native void nglGetNamedBufferParameteri64v(int buffer, int pname, long params); - - /** - * DSA version of {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * @param params the requested parameter - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteri64v(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedBufferParameteri64v(buffer, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL32C#glGetBufferParameteri64v GetBufferParameteri64v}. - * - * @param buffer the buffer object name - * @param pname the symbolic name of a buffer object parameter. One of:
    {@link GL15#GL_BUFFER_SIZE BUFFER_SIZE}{@link GL15#GL_BUFFER_USAGE BUFFER_USAGE}{@link GL15#GL_BUFFER_ACCESS BUFFER_ACCESS}{@link GL15#GL_BUFFER_MAPPED BUFFER_MAPPED}
    {@link GL30#GL_BUFFER_ACCESS_FLAGS BUFFER_ACCESS_FLAGS}{@link GL30#GL_BUFFER_MAP_LENGTH BUFFER_MAP_LENGTH}{@link GL30#GL_BUFFER_MAP_OFFSET BUFFER_MAP_OFFSET}{@link GL44#GL_BUFFER_IMMUTABLE_STORAGE BUFFER_IMMUTABLE_STORAGE}
    {@link GL44#GL_BUFFER_STORAGE_FLAGS BUFFER_STORAGE_FLAGS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetNamedBufferParameteri64(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetNamedBufferParameteri64v(buffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedBufferPointerv ] --- - - /** Unsafe version of: {@link #glGetNamedBufferPointerv GetNamedBufferPointerv} */ - public static native void nglGetNamedBufferPointerv(int buffer, int pname, long params); - - /** - * DSA version of {@link GL15C#glGetBufferPointerv GetBufferPointerv}. - * - * @param buffer the buffer object name - * @param pname the pointer to be returned. Must be:
    {@link GL15#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * @param params the pointer value specified by {@code pname} - * - * @see Reference Page - */ - public static void glGetNamedBufferPointerv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("void **") PointerBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedBufferPointerv(buffer, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL15C#glGetBufferPointerv GetBufferPointerv}. - * - * @param buffer the buffer object name - * @param pname the pointer to be returned. Must be:
    {@link GL15#GL_BUFFER_MAP_POINTER BUFFER_MAP_POINTER}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetNamedBufferPointer(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer params = stack.callocPointer(1); - nglGetNamedBufferPointerv(buffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedBufferSubData ] --- - - /** - * Unsafe version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @param size the size in bytes of the data store region being returned - */ - public static native void nglGetNamedBufferSubData(int buffer, long offset, long size, long data); - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ByteBuffer data) { - nglGetNamedBufferSubData(buffer, offset, data.remaining(), memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") ShortBuffer data) { - nglGetNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") IntBuffer data) { - nglGetNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") LongBuffer data) { - nglGetNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") FloatBuffer data) { - nglGetNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - /** - * DSA version of {@link GL15C#glGetBufferSubData GetBufferSubData}. - * - * @param buffer the buffer object name - * @param offset the offset into the buffer object's data store from which data will be returned, measured in bytes - * @param data a pointer to the location where buffer object data is returned - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") DoubleBuffer data) { - nglGetNamedBufferSubData(buffer, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glCreateFramebuffers ] --- - - /** - * Unsafe version of: {@link #glCreateFramebuffers CreateFramebuffers} - * - * @param n the number of framebuffer names to create - */ - public static native void nglCreateFramebuffers(int n, long framebuffers); - - /** - * Returns {@code n} previously unused framebuffer names in {@code framebuffers}, each representing a new framebuffer object. - * - * @param framebuffers the buffer in which to store the framebuffer names - * - * @see Reference Page - */ - public static void glCreateFramebuffers(@NativeType("GLuint *") IntBuffer framebuffers) { - nglCreateFramebuffers(framebuffers.remaining(), memAddress(framebuffers)); - } - - /** - * Returns {@code n} previously unused framebuffer names in {@code framebuffers}, each representing a new framebuffer object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateFramebuffers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer framebuffers = stack.callocInt(1); - nglCreateFramebuffers(1, memAddress(framebuffers)); - return framebuffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glNamedFramebufferRenderbuffer ] --- - - /** - * DSA version of {@link GL30C#glFramebufferRenderbuffer FramebufferRenderbuffer}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param renderbuffertarget the renderbuffer target. Must be:
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}
    - * @param renderbuffer the name of an existing renderbuffer object of type {@code renderbuffertarget} to attach - * - * @see Reference Page - */ - public static native void glNamedFramebufferRenderbuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int renderbuffertarget, @NativeType("GLuint") int renderbuffer); - - // --- [ glNamedFramebufferParameteri ] --- - - /** - * DSA version of {@link GL43C#glFramebufferParameteri FramebufferParameteri}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be modified. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param param the new value for the parameter named {@code pname} - * - * @see Reference Page - */ - public static native void glNamedFramebufferParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glNamedFramebufferTexture ] --- - - /** - * DSA version of {@link GL32C#glFramebufferTexture FramebufferTexture}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * - * @see Reference Page - */ - public static native void glNamedFramebufferTexture(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glNamedFramebufferTextureLayer ] --- - - /** - * DSA version of {@link GL30C#glFramebufferTextureLayer FramebufferTextureLayer}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param layer the layer of {@code texture} to attach. - * - * @see Reference Page - */ - public static native void glNamedFramebufferTextureLayer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int layer); - - // --- [ glNamedFramebufferDrawBuffer ] --- - - /** - * DSA version of {@link GL11C#glDrawBuffer DrawBuffer}. - * - * @param framebuffer the framebuffer name - * @param buf the color buffer to draw to. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_LEFT LEFT}
    {@link GL11#GL_RIGHT RIGHT}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static native void glNamedFramebufferDrawBuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buf); - - // --- [ glNamedFramebufferDrawBuffers ] --- - - /** - * Unsafe version of: {@link #glNamedFramebufferDrawBuffers NamedFramebufferDrawBuffers} - * - * @param n the number of buffers in {@code bufs} - */ - public static native void nglNamedFramebufferDrawBuffers(int framebuffer, int n, long bufs); - - /** - * DSA version of {@link GL20C#glDrawBuffers DrawBuffers}. - * - * @param framebuffer the framebuffer name - * @param bufs an array of symbolic constants specifying the buffers into which fragment colors or data values will be written. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}
    GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer bufs) { - nglNamedFramebufferDrawBuffers(framebuffer, bufs.remaining(), memAddress(bufs)); - } - - /** - * DSA version of {@link GL20C#glDrawBuffers DrawBuffers}. - * - * @param framebuffer the framebuffer name - * - * @see Reference Page - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int buf) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer bufs = stack.ints(buf); - nglNamedFramebufferDrawBuffers(framebuffer, 1, memAddress(bufs)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glNamedFramebufferReadBuffer ] --- - - /** - * DSA version of {@link GL11C#glReadBuffer ReadBuffer}. - * - * @param framebuffer the framebuffer name - * @param src the color buffer to read from. One of:
    {@link GL11#GL_NONE NONE}{@link GL11#GL_FRONT_LEFT FRONT_LEFT}{@link GL11#GL_FRONT_RIGHT FRONT_RIGHT}{@link GL11#GL_BACK_LEFT BACK_LEFT}{@link GL11#GL_BACK_RIGHT BACK_RIGHT}{@link GL11#GL_FRONT FRONT}{@link GL11#GL_BACK BACK}{@link GL11#GL_LEFT LEFT}
    {@link GL11#GL_RIGHT RIGHT}{@link GL11#GL_FRONT_AND_BACK FRONT_AND_BACK}{@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}GL30.GL_COLOR_ATTACHMENT[1-15]
    - * - * @see Reference Page - */ - public static native void glNamedFramebufferReadBuffer(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int src); - - // --- [ glInvalidateNamedFramebufferData ] --- - - /** - * Unsafe version of: {@link #glInvalidateNamedFramebufferData InvalidateNamedFramebufferData} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static native void nglInvalidateNamedFramebufferData(int framebuffer, int numAttachments, long attachments); - - /** - * DSA version of {@link GL43C#glInvalidateFramebuffer InvalidateFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param attachments the address of an array identifying the attachments to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer attachments) { - nglInvalidateNamedFramebufferData(framebuffer, attachments.remaining(), memAddress(attachments)); - } - - /** - * DSA version of {@link GL43C#glInvalidateFramebuffer InvalidateFramebuffer}. - * - * @param framebuffer the framebuffer name - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int attachment) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer attachments = stack.ints(attachment); - nglInvalidateNamedFramebufferData(framebuffer, 1, memAddress(attachments)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glInvalidateNamedFramebufferSubData ] --- - - /** - * Unsafe version of: {@link #glInvalidateNamedFramebufferSubData InvalidateNamedFramebufferSubData} - * - * @param numAttachments the number of entries in the {@code attachments} array - */ - public static native void nglInvalidateNamedFramebufferSubData(int framebuffer, int numAttachments, long attachments, int x, int y, int width, int height); - - /** - * DSA version of {@link GL43C#glInvalidateSubFramebuffer InvalidateSubFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param attachments an array identifying the attachments to be invalidated - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") IntBuffer attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - nglInvalidateNamedFramebufferSubData(framebuffer, attachments.remaining(), memAddress(attachments), x, y, width, height); - } - - /** - * DSA version of {@link GL43C#glInvalidateSubFramebuffer InvalidateSubFramebuffer}. - * - * @param framebuffer the framebuffer name - * @param x the X offset of the region to be invalidated - * @param y the Y offset of the region to be invalidated - * @param width the width of the region to be invalidated - * @param height the height of the region to be invalidated - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int attachment, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer attachments = stack.ints(attachment); - nglInvalidateNamedFramebufferSubData(framebuffer, 1, memAddress(attachments), x, y, width, height); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glClearNamedFramebufferiv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferiv ClearNamedFramebufferiv} */ - public static native void nglClearNamedFramebufferiv(int framebuffer, int buffer, int drawbuffer, long value); - - /** - * DSA version of {@link GL30C#glClearBufferiv ClearBufferiv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_STENCIL STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For stencil buffers, a pointer to a - * single stencil value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearNamedFramebufferiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglClearNamedFramebufferiv(framebuffer, buffer, drawbuffer, memAddress(value)); - } - - // --- [ glClearNamedFramebufferuiv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferuiv ClearNamedFramebufferuiv} */ - public static native void nglClearNamedFramebufferuiv(int framebuffer, int buffer, int drawbuffer, long value); - - /** - * DSA version of {@link GL30C#glClearBufferuiv ClearBufferuiv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. Must be:
    {@link GL11#GL_COLOR COLOR}
    - * @param drawbuffer the draw buffer to clear - * @param value a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to - * - * @see Reference Page - */ - public static void glClearNamedFramebufferuiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") IntBuffer value) { - if (CHECKS) { - check(value, 4); - } - nglClearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, memAddress(value)); - } - - // --- [ glClearNamedFramebufferfv ] --- - - /** Unsafe version of: {@link #glClearNamedFramebufferfv ClearNamedFramebufferfv} */ - public static native void nglClearNamedFramebufferfv(int framebuffer, int buffer, int drawbuffer, long value); - - /** - * DSA version of {@link GL30C#glClearBufferfv ClearBufferfv}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. One of:
    {@link GL11#GL_COLOR COLOR}{@link GL11#GL_DEPTH DEPTH}
    - * @param drawbuffer the draw buffer to clear - * @param value for color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For depth buffers, a pointer to a - * single depth value to clear the buffer to. - * - * @see Reference Page - */ - public static void glClearNamedFramebufferfv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, memAddress(value)); - } - - // --- [ glClearNamedFramebufferfi ] --- - - /** - * DSA version of {@link GL30C#glClearBufferfi ClearBufferfi}. - * - * @param framebuffer the framebuffer name - * @param buffer the buffer to clear. Must be:
    {@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param drawbuffer the draw buffer to clear - * @param depth the depth value to clear the buffer to - * @param stencil the stencil value to clear the buffer to - * - * @see Reference Page - */ - public static native void glClearNamedFramebufferfi(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat") float depth, @NativeType("GLint") int stencil); - - // --- [ glBlitNamedFramebuffer ] --- - - /** - * DSA version of {@link GL30C#glBlitFramebuffer BlitFramebuffer}. - * - * @param readFramebuffer the source framebuffer name - * @param drawFramebuffer the destination framebuffer name - * @param srcX0 the lower-left coordinate of the source rectangle within the read buffer - * @param srcY0 the upper-left coordinate of the source rectangle within the read buffer - * @param srcX1 the lower-right coordinate of the source rectangle within the read buffer - * @param srcY1 the upper-right coordinate of the source rectangle within the read buffer - * @param dstX0 the lower-left coordinate of the destination rectangle within the write buffer - * @param dstY0 the upper-left coordinate of the destination rectangle within the write buffer - * @param dstX1 the lower-right coordinate of the destination rectangle within the write buffer - * @param dstY1 the upper-right coordinate of the destination rectangle within the write buffer - * @param mask the bitwise OR of the flags indicating which buffers are to be copied. One of:
    {@link GL11#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * @param filter the interpolation to be applied if the image is stretched. One of:
    {@link GL11#GL_NEAREST NEAREST}{@link GL11#GL_LINEAR LINEAR}
    - * - * @see Reference Page - */ - public static native void glBlitNamedFramebuffer(@NativeType("GLuint") int readFramebuffer, @NativeType("GLuint") int drawFramebuffer, @NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter); - - // --- [ glCheckNamedFramebufferStatus ] --- - - /** - * DSA version of {@link GL30C#glCheckFramebufferStatus CheckFramebufferStatus}. - * - * @param framebuffer the framebuffer name - * @param target the target of the framebuffer completeness check. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static native int glCheckNamedFramebufferStatus(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int target); - - // --- [ glGetNamedFramebufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedFramebufferParameteriv GetNamedFramebufferParameteriv} */ - public static native void nglGetNamedFramebufferParameteriv(int framebuffer, int pname, long params); - - /** - * DSA version of {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * @param params a variable to receive the value of the parameter named {@code pname} - * - * @see Reference Page - */ - public static void glGetNamedFramebufferParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedFramebufferParameteriv(framebuffer, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. - * - * @param framebuffer the framebuffer name - * @param pname a token indicating the parameter to be retrieved. One of:
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_WIDTH FRAMEBUFFER_DEFAULT_WIDTH}{@link GL43#GL_FRAMEBUFFER_DEFAULT_HEIGHT FRAMEBUFFER_DEFAULT_HEIGHT}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_LAYERS FRAMEBUFFER_DEFAULT_LAYERS}{@link GL43#GL_FRAMEBUFFER_DEFAULT_SAMPLES FRAMEBUFFER_DEFAULT_SAMPLES}
    {@link GL43#GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedFramebufferParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedFramebufferParameteriv(framebuffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedFramebufferAttachmentParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedFramebufferAttachmentParameteriv GetNamedFramebufferAttachmentParameteriv} */ - public static native void nglGetNamedFramebufferAttachmentParameteriv(int framebuffer, int attachment, int pname, long params); - - /** - * DSA version of {@link GL30C#glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment within {@code target}. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetNamedFramebufferAttachmentParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL30C#glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv}. - * - * @param framebuffer the framebuffer name - * @param attachment the attachment within {@code target}. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param pname the parameter of {@code attachment} to query. One of:
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE FRAMEBUFFER_ATTACHMENT_RED_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE FRAMEBUFFER_ATTACHMENT_GREEN_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE FRAMEBUFFER_ATTACHMENT_BLUE_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE}{@link GL30#GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE}
    {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedFramebufferAttachmentParameteri(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCreateRenderbuffers ] --- - - /** - * Unsafe version of: {@link #glCreateRenderbuffers CreateRenderbuffers} - * - * @param n the number of renderbuffer names to create - */ - public static native void nglCreateRenderbuffers(int n, long renderbuffers); - - /** - * Returns {@code n} previously unused renderbuffer names in {@code renderbuffers}, each representing a new renderbuffer object. - * - * @param renderbuffers the buffer in which to store the created renderbuffer names - * - * @see Reference Page - */ - public static void glCreateRenderbuffers(@NativeType("GLuint *") IntBuffer renderbuffers) { - nglCreateRenderbuffers(renderbuffers.remaining(), memAddress(renderbuffers)); - } - - /** - * Returns {@code n} previously unused renderbuffer names in {@code renderbuffers}, each representing a new renderbuffer object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateRenderbuffers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer renderbuffers = stack.callocInt(1); - nglCreateRenderbuffers(1, memAddress(renderbuffers)); - return renderbuffers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glNamedRenderbufferStorage ] --- - - /** - * DSA version of {@link GL30C#glRenderbufferStorage RenderbufferStorage}. - * - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static native void glNamedRenderbufferStorage(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glNamedRenderbufferStorageMultisample ] --- - - /** - * DSA version of {@link GL30C#glRenderbufferStorageMultisample RenderbufferStorageMultisample}. - * - * @param samples the number of samples to be used for the renderbuffer object's storage - * @param internalformat the internal format to use for the renderbuffer object's image. Must be a color-renderable, depth-renderable, or stencil-renderable format. - * @param width the width of the renderbuffer, in pixels - * @param height the height of the renderbuffer, in pixels - * - * @see Reference Page - */ - public static native void glNamedRenderbufferStorageMultisample(@NativeType("GLuint") int renderbuffer, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glGetNamedRenderbufferParameteriv ] --- - - /** Unsafe version of: {@link #glGetNamedRenderbufferParameteriv GetNamedRenderbufferParameteriv} */ - public static native void nglGetNamedRenderbufferParameteriv(int renderbuffer, int pname, long params); - - /** - * DSA version of {@link GL30C#glGetRenderbufferParameteriv GetRenderbufferParameteriv}. - * - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * @param params an array to receive the value of the queried parameter - * - * @see Reference Page - */ - public static void glGetNamedRenderbufferParameteriv(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedRenderbufferParameteriv(renderbuffer, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL30C#glGetRenderbufferParameteriv GetRenderbufferParameteriv}. - * - * @param pname the parameter whose value to retrieve from the renderbuffer bound to {@code target}. One of:
    {@link GL30#GL_RENDERBUFFER_WIDTH RENDERBUFFER_WIDTH}{@link GL30#GL_RENDERBUFFER_HEIGHT RENDERBUFFER_HEIGHT}{@link GL30#GL_RENDERBUFFER_INTERNAL_FORMAT RENDERBUFFER_INTERNAL_FORMAT}
    {@link GL30#GL_RENDERBUFFER_RED_SIZE RENDERBUFFER_RED_SIZE}{@link GL30#GL_RENDERBUFFER_GREEN_SIZE RENDERBUFFER_GREEN_SIZE}{@link GL30#GL_RENDERBUFFER_BLUE_SIZE RENDERBUFFER_BLUE_SIZE}
    {@link GL30#GL_RENDERBUFFER_ALPHA_SIZE RENDERBUFFER_ALPHA_SIZE}{@link GL30#GL_RENDERBUFFER_DEPTH_SIZE RENDERBUFFER_DEPTH_SIZE}{@link GL30#GL_RENDERBUFFER_STENCIL_SIZE RENDERBUFFER_STENCIL_SIZE}
    {@link GL30#GL_RENDERBUFFER_SAMPLES RENDERBUFFER_SAMPLES}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetNamedRenderbufferParameteri(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetNamedRenderbufferParameteriv(renderbuffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCreateTextures ] --- - - /** - * Unsafe version of: {@link #glCreateTextures CreateTextures} - * - * @param n the number of texture names to create - */ - public static native void nglCreateTextures(int target, int n, long textures); - - /** - * Returns {@code n} previously unused texture names in {@code textures}, each representing a new texture object. - * - * @param target the texture target. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * @param textures the buffer in which to store the created texture names - * - * @see Reference Page - */ - public static void glCreateTextures(@NativeType("GLenum") int target, @NativeType("GLuint *") IntBuffer textures) { - nglCreateTextures(target, textures.remaining(), memAddress(textures)); - } - - /** - * Returns {@code n} previously unused texture names in {@code textures}, each representing a new texture object. - * - * @param target the texture target. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP TEXTURE_CUBE_MAP}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}{@link GL31#GL_TEXTURE_BUFFER TEXTURE_BUFFER}{@link GL32#GL_TEXTURE_2D_MULTISAMPLE TEXTURE_2D_MULTISAMPLE}
    {@link GL32#GL_TEXTURE_2D_MULTISAMPLE_ARRAY TEXTURE_2D_MULTISAMPLE_ARRAY}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateTextures(@NativeType("GLenum") int target) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer textures = stack.callocInt(1); - nglCreateTextures(target, 1, memAddress(textures)); - return textures.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTextureBuffer ] --- - - /** - * DSA version of {@link GL31C#glTexBuffer TexBuffer}. - * - * @param texture the texture name - * @param internalformat the sized internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * - * @see Reference Page - */ - public static native void glTextureBuffer(@NativeType("GLuint") int texture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer); - - // --- [ glTextureBufferRange ] --- - - /** - * DSA version of {@link GL43C#glTexBufferRange TexBufferRange}. - * - * @param texture the texture name - * @param internalformat the internal format of the data in the store belonging to {@code buffer} - * @param buffer the name of the buffer object whose storage to attach to the active buffer texture - * @param offset the offset of the start of the range of the buffer's data store to attach - * @param size the size of the range of the buffer's data store to attach - * - * @see Reference Page - */ - public static native void glTextureBufferRange(@NativeType("GLuint") int texture, @NativeType("GLenum") int internalformat, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size); - - // --- [ glTextureStorage1D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage1D TexStorage1D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * - * @see Reference Page - */ - public static native void glTextureStorage1D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width); - - // --- [ glTextureStorage2D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage2D TexStorage2D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * - * @see Reference Page - */ - public static native void glTextureStorage2D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glTextureStorage3D ] --- - - /** - * DSA version of {@link GL42C#glTexStorage3D TexStorage3D}. - * - * @param texture the texture name - * @param levels the number of texture levels - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * - * @see Reference Page - */ - public static native void glTextureStorage3D(@NativeType("GLuint") int texture, @NativeType("GLsizei") int levels, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth); - - // --- [ glTextureStorage2DMultisample ] --- - - /** - * DSA version of {@link GL43C#glTexStorage2DMultisample TexStorage2DMultisample}. - * - * @param texture the texture name - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static native void glTextureStorage2DMultisample(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedsamplelocations); - - // --- [ glTextureStorage3DMultisample ] --- - - /** - * DSA version of {@link GL43C#glTexStorage3DMultisample TexStorage3DMultisample}. - * - * @param texture the texture name - * @param samples the number of samples in the texture - * @param internalformat the sized internal format to be used to store texture image data - * @param width the width of the texture, in texels - * @param height the height of the texture, in texels - * @param depth the depth of the texture, in texels - * @param fixedsamplelocations whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not - * depend on the internal format or size of the image - * - * @see Reference Page - */ - public static native void glTextureStorage3DMultisample(@NativeType("GLuint") int texture, @NativeType("GLsizei") int samples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedsamplelocations); - - // --- [ glTextureSubImage1D ] --- - - /** Unsafe version of: {@link #glTextureSubImage1D TextureSubImage1D} */ - public static native void nglTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, long pixels); - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTextureSubImage1D(texture, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTextureSubImage1D(texture, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTextureSubImage1D(texture, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTextureSubImage1D(texture, level, xoffset, width, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage1D TexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param width the subregion width - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTextureSubImage1D(texture, level, xoffset, width, format, type, memAddress(pixels)); - } - - // --- [ glTextureSubImage2D ] --- - - /** Unsafe version of: {@link #glTextureSubImage2D TextureSubImage2D} */ - public static native void nglTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels); - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glTexSubImage2D TexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the left coordinate of the texel subregion - * @param yoffset the bottom coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, memAddress(pixels)); - } - - // --- [ glTextureSubImage3D ] --- - - /** Unsafe version of: {@link #glTextureSubImage3D TextureSubImage3D} */ - public static native void nglTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels); - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer pixels) { - nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") long pixels) { - nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") ShortBuffer pixels) { - nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer pixels) { - nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") FloatBuffer pixels) { - nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - /** - * DSA version of {@link GL12C#glTexSubImage3D TexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail-number - * @param xoffset the x coordinate of the texel subregion - * @param yoffset the y coordinate of the texel subregion - * @param zoffset the z coordinate of the texel subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel data format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel data type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the pixel data - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") DoubleBuffer pixels) { - nglTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); - } - - // --- [ glCompressedTextureSubImage1D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage1D CompressedTextureSubImage1D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int imageSize, long data); - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage1D CompressedTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage1D CompressedTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param width the width of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureSubImage1D(texture, level, xoffset, width, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTextureSubImage2D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage2D CompressedTextureSubImage2D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, long data); - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage2D CompressedTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage2D CompressedTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, data.remaining(), memAddress(data)); - } - - // --- [ glCompressedTextureSubImage3D ] --- - - /** - * Unsafe version of: {@link #glCompressedTextureSubImage3D CompressedTextureSubImage3D} - * - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - */ - public static native void nglCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data); - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage3D CompressedTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param imageSize the number of unsigned bytes of image data starting at the address specified by {@code data} - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLsizei") int imageSize, @NativeType("void const *") long data) { - nglCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); - } - - /** - * DSA version of {@link GL13C#glCompressedTexSubImage3D CompressedTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param xoffset a texel offset in the x direction within the texture array - * @param yoffset a texel offset in the y direction within the texture array - * @param zoffset a texel offset in the z direction within the texture array - * @param width the width of the texture subimage - * @param height the height of the texture subimage - * @param depth the depth of the texture subimage - * @param format the format of the compressed image data stored at address {@code data}. One of:
    {@link GL30#GL_COMPRESSED_RED_RGTC1 COMPRESSED_RED_RGTC1}{@link GL30#GL_COMPRESSED_SIGNED_RED_RGTC1 COMPRESSED_SIGNED_RED_RGTC1}
    {@link GL30#GL_COMPRESSED_RG_RGTC2 COMPRESSED_RG_RGTC2}{@link GL30#GL_COMPRESSED_SIGNED_RG_RGTC2 COMPRESSED_SIGNED_RG_RGTC2}
    {@link GL42#GL_COMPRESSED_RGBA_BPTC_UNORM COMPRESSED_RGBA_BPTC_UNORM}{@link GL42#GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM COMPRESSED_SRGB_ALPHA_BPTC_UNORM}
    {@link GL42#GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT COMPRESSED_RGB_BPTC_SIGNED_FLOAT}{@link GL42#GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT}
    {@link GL43#GL_COMPRESSED_RGB8_ETC2 COMPRESSED_RGB8_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_ETC2 COMPRESSED_SRGB8_ETC2}
    {@link GL43#GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2}{@link GL43#GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2}
    {@link GL43#GL_COMPRESSED_RGBA8_ETC2_EAC COMPRESSED_RGBA8_ETC2_EAC}{@link GL43#GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}
    {@link GL43#GL_COMPRESSED_R11_EAC COMPRESSED_R11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_R11_EAC COMPRESSED_SIGNED_R11_EAC}
    {@link GL43#GL_COMPRESSED_RG11_EAC COMPRESSED_RG11_EAC}{@link GL43#GL_COMPRESSED_SIGNED_RG11_EAC COMPRESSED_SIGNED_RG11_EAC}
    see {@link EXTTextureCompressionS3TC}see {@link EXTTextureCompressionLATC}
    see {@link ATITextureCompression3DC}see {@link KHRTextureCompressionASTCLDR}
    - * @param data a pointer to the compressed image data - * - * @see Reference Page - */ - public static void glCompressedTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer data) { - nglCompressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), memAddress(data)); - } - - // --- [ glCopyTextureSubImage1D ] --- - - /** - * DSA version of {@link GL11C#glCopyTexSubImage1D CopyTexSubImage1D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * - * @see Reference Page - */ - public static native void glCopyTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width); - - // --- [ glCopyTextureSubImage2D ] --- - - /** - * DSA version of {@link GL11C#glCopyTexSubImage2D CopyTexSubImage2D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the left texel coordinate of the texture subregion to update - * @param yoffset the lower texel coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static native void glCopyTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glCopyTextureSubImage3D ] --- - - /** - * DSA version of {@link GL12C#glCopyTexSubImage3D CopyTexSubImage3D}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param xoffset the x coordinate of the texture subregion to update - * @param yoffset the y coordinate of the texture subregion to update - * @param zoffset the z coordinate of the texture subregion to update - * @param x the left framebuffer pixel coordinate - * @param y the lower framebuffer pixel coordinate - * @param width the texture subregion width - * @param height the texture subregion height - * - * @see Reference Page - */ - public static native void glCopyTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - // --- [ glTextureParameterf ] --- - - /** - * DSA version of {@link GL11C#glTexParameterf TexParameterf}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glTextureParameterf(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat") float param); - - // --- [ glTextureParameterfv ] --- - - /** Unsafe version of: {@link #glTextureParameterfv TextureParameterfv} */ - public static native void nglTextureParameterfv(int texture, int pname, long params); - - /** - * DSA version of {@link GL11C#glTexParameterfv TexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTextureParameterfv(texture, pname, memAddress(params)); - } - - // --- [ glTextureParameteri ] --- - - /** - * DSA version of {@link GL11C#glTexParameteri TexParameteri}. - * - * @param texture the texture name - * @param pname the parameter to set. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    - * @param param the parameter value - * - * @see Reference Page - */ - public static native void glTextureParameteri(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glTextureParameterIiv ] --- - - /** Unsafe version of: {@link #glTextureParameterIiv TextureParameterIiv} */ - public static native void nglTextureParameterIiv(int texture, int pname, long params); - - /** - * DSA version of {@link GL30C#glTexParameterIiv TexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglTextureParameterIiv(texture, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL30C#glTexParameterIiv TexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTextureParameterIi(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - nglTextureParameterIiv(texture, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTextureParameterIuiv ] --- - - /** Unsafe version of: {@link #glTextureParameterIuiv TextureParameterIuiv} */ - public static native void nglTextureParameterIuiv(int texture, int pname, long params); - - /** - * DSA version of {@link GL30C#glTexParameterIuiv TexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * @param params the value of {@code pname} - * - * @see Reference Page - */ - public static void glTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglTextureParameterIuiv(texture, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL30C#glTexParameterIuiv TexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a single-valued texture parameter - * - * @see Reference Page - */ - public static void glTextureParameterIui(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int param) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.ints(param); - nglTextureParameterIuiv(texture, pname, memAddress(params)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTextureParameteriv ] --- - - /** Unsafe version of: {@link #glTextureParameteriv TextureParameteriv} */ - public static native void nglTextureParameteriv(int texture, int pname, long params); - - /** - * DSA version of {@link GL11C#glTexParameteriv TexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to set - * @param params the parameter value - * - * @see Reference Page - */ - public static void glTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 4); - } - nglTextureParameteriv(texture, pname, memAddress(params)); - } - - // --- [ glGenerateTextureMipmap ] --- - - /** - * DSA version of {@link GL30C#glGenerateMipmap GenerateMipmap}. - * - * @param texture the texture name - * - * @see Reference Page - */ - public static native void glGenerateTextureMipmap(@NativeType("GLuint") int texture); - - // --- [ glBindTextureUnit ] --- - - /** - * Binds an existing texture object to the texture unit numbered {@code unit}. - * - *

    {@code texture} must be zero or the name of an existing texture object. When {@code texture} is the name of an existing texture object, that object is - * bound to the target, in the corresponding texture unit, that was specified when the object was created. When {@code texture} is zero, each of the targets - * enumerated at the beginning of this section is reset to its default texture for the corresponding texture image unit.

    - * - * @param unit the texture unit number - * @param texture the texture name - * - * @see Reference Page - */ - public static native void glBindTextureUnit(@NativeType("GLuint") int unit, @NativeType("GLuint") int texture); - - // --- [ glGetTextureImage ] --- - - /** - * Unsafe version of: {@link #glGetTextureImage GetTextureImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static native void nglGetTextureImage(int texture, int level, int format, int type, int bufSize, long pixels); - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - nglGetTextureImage(texture, level, format, type, bufSize, pixels); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - nglGetTextureImage(texture, level, format, type, pixels.remaining(), memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - nglGetTextureImage(texture, level, format, type, pixels.remaining() << 1, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - nglGetTextureImage(texture, level, format, type, pixels.remaining() << 2, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - nglGetTextureImage(texture, level, format, type, pixels.remaining() << 2, memAddress(pixels)); - } - - /** - * DSA version of {@link GL11C#glGetTexImage GetTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - nglGetTextureImage(texture, level, format, type, pixels.remaining() << 3, memAddress(pixels)); - } - - // --- [ glGetCompressedTextureImage ] --- - - /** - * Unsafe version of: {@link #glGetCompressedTextureImage GetCompressedTextureImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static native void nglGetCompressedTextureImage(int texture, int level, int bufSize, long pixels); - - /** - * DSA version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - nglGetCompressedTextureImage(texture, level, bufSize, pixels); - } - - /** - * DSA version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage}. - * - * @param texture the texture name - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param pixels a buffer in which to return the compressed texture image - * - * @see Reference Page - */ - public static void glGetCompressedTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer pixels) { - if (CHECKS) { - if (DEBUG) { - check(pixels, glGetTextureLevelParameteri(texture, level, GL13.GL_TEXTURE_COMPRESSED_IMAGE_SIZE)); - } - } - nglGetCompressedTextureImage(texture, level, pixels.remaining(), memAddress(pixels)); - } - - // --- [ glGetTextureLevelParameterfv ] --- - - /** Unsafe version of: {@link #glGetTextureLevelParameterfv GetTextureLevelParameterfv} */ - public static native void nglGetTextureLevelParameterfv(int texture, int level, int pname, long params); - - /** - * DSA version of {@link GL11C#glGetTexLevelParameterfv GetTexLevelParameterfv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureLevelParameterfv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureLevelParameterfv(texture, level, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameterfv GetTexLevelParameterfv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTextureLevelParameterf(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetTextureLevelParameterfv(texture, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureLevelParameteriv ] --- - - /** Unsafe version of: {@link #glGetTextureLevelParameteriv GetTextureLevelParameteriv} */ - public static native void nglGetTextureLevelParameteriv(int texture, int level, int pname, long params); - - /** - * DSA version of {@link GL11C#glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureLevelParameteriv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureLevelParameteriv(texture, level, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL11C#glGetTexLevelParameteriv GetTexLevelParameteriv}. - * - * @param texture the texture name - * @param level the level-of-detail number - * @param pname the parameter to query. One of:
    {@link GL11#GL_TEXTURE_WIDTH TEXTURE_WIDTH}{@link GL11#GL_TEXTURE_HEIGHT TEXTURE_HEIGHT}{@link GL12#GL_TEXTURE_DEPTH TEXTURE_DEPTH}{@link GL32#GL_TEXTURE_SAMPLES TEXTURE_SAMPLES}
    {@link GL32#GL_TEXTURE_FIXED_SAMPLE_LOCATIONS TEXTURE_FIXED_SAMPLE_LOCATIONS}{@link GL11#GL_TEXTURE_INTERNAL_FORMAT TEXTURE_INTERNAL_FORMAT}{@link GL11#GL_TEXTURE_RED_SIZE TEXTURE_RED_SIZE}{@link GL11#GL_TEXTURE_GREEN_SIZE TEXTURE_GREEN_SIZE}
    {@link GL11#GL_TEXTURE_BLUE_SIZE TEXTURE_BLUE_SIZE}{@link GL11#GL_TEXTURE_ALPHA_SIZE TEXTURE_ALPHA_SIZE}{@link GL14#GL_TEXTURE_DEPTH_SIZE TEXTURE_DEPTH_SIZE}{@link GL30#GL_TEXTURE_STENCIL_SIZE TEXTURE_STENCIL_SIZE}
    {@link GL30#GL_TEXTURE_SHARED_SIZE TEXTURE_SHARED_SIZE}{@link GL30#GL_TEXTURE_ALPHA_TYPE TEXTURE_ALPHA_TYPE}{@link GL30#GL_TEXTURE_DEPTH_TYPE TEXTURE_DEPTH_TYPE}{@link GL13#GL_TEXTURE_COMPRESSED TEXTURE_COMPRESSED}
    {@link GL13#GL_TEXTURE_COMPRESSED_IMAGE_SIZE TEXTURE_COMPRESSED_IMAGE_SIZE}{@link GL31#GL_TEXTURE_BUFFER_DATA_STORE_BINDING TEXTURE_BUFFER_DATA_STORE_BINDING}{@link GL43#GL_TEXTURE_BUFFER_OFFSET TEXTURE_BUFFER_OFFSET}{@link GL43#GL_TEXTURE_BUFFER_SIZE TEXTURE_BUFFER_SIZE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureLevelParameteri(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureLevelParameteriv(texture, level, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureParameterfv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterfv GetTextureParameterfv} */ - public static native void nglGetTextureParameterfv(int texture, int pname, long params); - - /** - * DSA version of {@link GL11C#glGetTexParameterfv GetTexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to query - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameterfv(texture, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL11C#glGetTexParameterfv GetTexParameterfv}. - * - * @param texture the texture name - * @param pname the parameter to query - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetTextureParameterf(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetTextureParameterfv(texture, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureParameterIiv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterIiv GetTextureParameterIiv} */ - public static native void nglGetTextureParameterIiv(int texture, int pname, long params); - - /** - * DSA version of {@link GL30C#glGetTexParameterIiv GetTexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameterIiv(texture, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIiv GetTexParameterIiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureParameterIi(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureParameterIiv(texture, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureParameterIuiv ] --- - - /** Unsafe version of: {@link #glGetTextureParameterIuiv GetTextureParameterIuiv} */ - public static native void nglGetTextureParameterIuiv(int texture, int pname, long params); - - /** - * DSA version of {@link GL30C#glGetTexParameterIuiv GetTexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * @param params returns the texture parameter value - * - * @see Reference Page - */ - public static void glGetTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameterIuiv(texture, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL30C#glGetTexParameterIuiv GetTexParameterIuiv}. - * - * @param texture the texture name - * @param pname the symbolic name of a texture parameter - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureParameterIui(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureParameterIuiv(texture, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetTextureParameteriv ] --- - - /** Unsafe version of: {@link #glGetTextureParameteriv GetTextureParameteriv} */ - public static native void nglGetTextureParameteriv(int texture, int pname, long params); - - /** - * DSA version of {@link GL11C#glGetTexParameteriv GetTexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * @param params a scalar or buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetTextureParameteriv(texture, pname, memAddress(params)); - } - - /** - * DSA version of {@link GL11C#glGetTexParameteriv GetTexParameteriv}. - * - * @param texture the texture name - * @param pname the parameter to query. One of:
    {@link GL12#GL_TEXTURE_BASE_LEVEL TEXTURE_BASE_LEVEL}{@link GL11#GL_TEXTURE_BORDER_COLOR TEXTURE_BORDER_COLOR}{@link GL14#GL_TEXTURE_COMPARE_MODE TEXTURE_COMPARE_MODE}{@link GL14#GL_TEXTURE_COMPARE_FUNC TEXTURE_COMPARE_FUNC}
    {@link GL14#GL_TEXTURE_LOD_BIAS TEXTURE_LOD_BIAS}{@link GL11#GL_TEXTURE_MAG_FILTER TEXTURE_MAG_FILTER}{@link GL12#GL_TEXTURE_MAX_LEVEL TEXTURE_MAX_LEVEL}{@link GL12#GL_TEXTURE_MAX_LOD TEXTURE_MAX_LOD}
    {@link GL11#GL_TEXTURE_MIN_FILTER TEXTURE_MIN_FILTER}{@link GL12#GL_TEXTURE_MIN_LOD TEXTURE_MIN_LOD}{@link GL33#GL_TEXTURE_SWIZZLE_R TEXTURE_SWIZZLE_R}{@link GL33#GL_TEXTURE_SWIZZLE_G TEXTURE_SWIZZLE_G}
    {@link GL33#GL_TEXTURE_SWIZZLE_B TEXTURE_SWIZZLE_B}{@link GL33#GL_TEXTURE_SWIZZLE_A TEXTURE_SWIZZLE_A}{@link GL33#GL_TEXTURE_SWIZZLE_RGBA TEXTURE_SWIZZLE_RGBA}{@link GL11#GL_TEXTURE_WRAP_S TEXTURE_WRAP_S}
    {@link GL11#GL_TEXTURE_WRAP_T TEXTURE_WRAP_T}{@link GL12#GL_TEXTURE_WRAP_R TEXTURE_WRAP_R}{@link GL14#GL_DEPTH_TEXTURE_MODE DEPTH_TEXTURE_MODE}{@link GL14#GL_GENERATE_MIPMAP GENERATE_MIPMAP}
    {@link GL42#GL_IMAGE_FORMAT_COMPATIBILITY_TYPE IMAGE_FORMAT_COMPATIBILITY_TYPE}{@link GL42#GL_TEXTURE_IMMUTABLE_FORMAT TEXTURE_IMMUTABLE_FORMAT}{@link GL43#GL_TEXTURE_IMMUTABLE_LEVELS TEXTURE_IMMUTABLE_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LEVEL TEXTURE_VIEW_MIN_LEVEL}
    {@link GL43#GL_TEXTURE_VIEW_NUM_LEVELS TEXTURE_VIEW_NUM_LEVELS}{@link GL43#GL_TEXTURE_VIEW_MIN_LAYER TEXTURE_VIEW_MIN_LAYER}{@link GL43#GL_TEXTURE_VIEW_NUM_LAYERS TEXTURE_VIEW_NUM_LAYERS}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetTextureParameteri(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetTextureParameteriv(texture, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCreateVertexArrays ] --- - - /** - * Unsafe version of: {@link #glCreateVertexArrays CreateVertexArrays} - * - * @param n the number of vertex array object names to create - */ - public static native void nglCreateVertexArrays(int n, long arrays); - - /** - * Returns {@code n} previously unused vertex array object names in {@code arrays}. - * - * @param arrays the buffer in which to return the created vertex array object names - * - * @see Reference Page - */ - public static void glCreateVertexArrays(@NativeType("GLuint *") IntBuffer arrays) { - nglCreateVertexArrays(arrays.remaining(), memAddress(arrays)); - } - - /** - * Returns {@code n} previously unused vertex array object names in {@code arrays}. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateVertexArrays() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer arrays = stack.callocInt(1); - nglCreateVertexArrays(1, memAddress(arrays)); - return arrays.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDisableVertexArrayAttrib ] --- - - /** - * DSA version of {@link GL20C#glDisableVertexAttribArray DisableVertexAttribArray}. - * - * @param vaobj the vertex array object name - * @param index the index of the generic vertex attribute to be disabled - * - * @see Reference Page - */ - public static native void glDisableVertexArrayAttrib(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index); - - // --- [ glEnableVertexArrayAttrib ] --- - - /** - * DSA version of {@link GL20C#glEnableVertexAttribArray EnableVertexAttribArray}. - * - * @param vaobj the vertex array object name - * @param index the index of the generic vertex attribute to be enabled - * - * @see Reference Page - */ - public static native void glEnableVertexArrayAttrib(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index); - - // --- [ glVertexArrayElementBuffer ] --- - - /** - * Binds a buffer object to the element array buffer bind point of a vertex array object. - * - * @param vaobj the vertex array object name - * @param buffer the buffer object name. If {@code buffer} is zero, any existing element array buffer binding to {@code vaobj} is removed. - * - * @see Reference Page - */ - public static native void glVertexArrayElementBuffer(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int buffer); - - // --- [ glVertexArrayVertexBuffer ] --- - - /** - * DSA version of {@link GL43C#glBindVertexBuffer BindVertexBuffer}. - * - * @param vaobj the vertex array object name - * @param bindingindex the index of the vertex buffer binding point to which to bind the buffer - * @param buffer the name of an existing buffer to bind to the vertex buffer binding point - * @param offset the offset of the first element of the buffer - * @param stride the distance between elements within the buffer - * - * @see Reference Page - */ - public static native void glVertexArrayVertexBuffer(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizei") int stride); - - // --- [ glVertexArrayVertexBuffers ] --- - - /** - * Unsafe version of: {@link #glVertexArrayVertexBuffers VertexArrayVertexBuffers} - * - * @param count the number of vertex buffer binding points - */ - public static native void nglVertexArrayVertexBuffers(int vaobj, int first, int count, long buffers, long offsets, long strides); - - /** - * DSA version of {@link GL44C#glBindVertexBuffers BindVertexBuffers}. - * - * @param vaobj the vertex array object name - * @param first the first vertex buffer binding point - * @param buffers an array of zeros or names of existing buffers objects - * @param offsets an array of offses - * @param strides an array of stride values - * - * @see Reference Page - */ - public static void glVertexArrayVertexBuffers(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") IntBuffer buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") IntBuffer strides) { - if (CHECKS) { - checkSafe(offsets, remainingSafe(buffers)); - checkSafe(strides, remainingSafe(buffers)); - } - nglVertexArrayVertexBuffers(vaobj, first, remainingSafe(buffers), memAddressSafe(buffers), memAddressSafe(offsets), memAddressSafe(strides)); - } - - // --- [ glVertexArrayAttribFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribFormat VertexAttribFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param normalized if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is - * directly converted to floating point. - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static native void glVertexArrayAttribFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexArrayAttribIFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribIFormat VertexAttribIFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static native void glVertexArrayAttribIFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexArrayAttribLFormat ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribLFormat VertexAttribLFormat}. - * - * @param vaobj the vertex array object name - * @param attribindex the generic vertex attribute array being described - * @param size the number of values per vertex that are stored in the array. One of:
    1234{@link GL12#GL_BGRA BGRA}
    - * @param type the type of the data stored in the array - * @param relativeoffset the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from - * - * @see Reference Page - */ - public static native void glVertexArrayAttribLFormat(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLuint") int relativeoffset); - - // --- [ glVertexArrayAttribBinding ] --- - - /** - * DSA version of {@link GL43C#glVertexAttribBinding VertexAttribBinding}. - * - * @param vaobj the vertex array object name - * @param attribindex the index of the attribute to associate with a vertex buffer binding - * @param bindingindex the index of the vertex buffer binding with which to associate the generic vertex attribute - * - * @see Reference Page - */ - public static native void glVertexArrayAttribBinding(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int attribindex, @NativeType("GLuint") int bindingindex); - - // --- [ glVertexArrayBindingDivisor ] --- - - /** - * DSA version of {@link GL43C#glVertexBindingDivisor VertexBindingDivisor}. - * - * @param vaobj the vertex array object name - * @param bindingindex the index of the generic vertex attribute - * @param divisor the number of instances that will pass between updates of the generic attribute at slot {@code index} - * - * @see Reference Page - */ - public static native void glVertexArrayBindingDivisor(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int bindingindex, @NativeType("GLuint") int divisor); - - // --- [ glGetVertexArrayiv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayiv GetVertexArrayiv} */ - public static native void nglGetVertexArrayiv(int vaobj, int pname, long param); - - /** - * Queries parameters of a vertex array object. - * - * @param vaobj the vertex array object name - * @param pname the parameter to query. Must be:
    {@link GL15#GL_ELEMENT_ARRAY_BUFFER_BINDING ELEMENT_ARRAY_BUFFER_BINDING}
    - * @param param the buffer in which to return the parameter values - * - * @see Reference Page - */ - public static void glGetVertexArrayiv(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetVertexArrayiv(vaobj, pname, memAddress(param)); - } - - /** - * Queries parameters of a vertex array object. - * - * @param vaobj the vertex array object name - * @param pname the parameter to query. Must be:
    {@link GL15#GL_ELEMENT_ARRAY_BUFFER_BINDING ELEMENT_ARRAY_BUFFER_BINDING}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexArrayi(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer param = stack.callocInt(1); - nglGetVertexArrayiv(vaobj, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexArrayIndexediv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayIndexediv GetVertexArrayIndexediv} */ - public static native void nglGetVertexArrayIndexediv(int vaobj, int index, int pname, long param); - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. One of:
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE},
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}{@link GL43#GL_VERTEX_ATTRIB_ARRAY_LONG VERTEX_ATTRIB_ARRAY_LONG}
    {@link GL43#GL_VERTEX_ATTRIB_RELATIVE_OFFSET VERTEX_ATTRIB_RELATIVE_OFFSET}
    - * @param param the buffer in which to return the parameter values - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexediv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetVertexArrayIndexediv(vaobj, index, pname, memAddress(param)); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. One of:
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_ENABLED VERTEX_ATTRIB_ARRAY_ENABLED}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_SIZE VERTEX_ATTRIB_ARRAY_SIZE},
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_STRIDE VERTEX_ATTRIB_ARRAY_STRIDE}{@link GL20#GL_VERTEX_ATTRIB_ARRAY_TYPE VERTEX_ATTRIB_ARRAY_TYPE}
    {@link GL20#GL_VERTEX_ATTRIB_ARRAY_NORMALIZED VERTEX_ATTRIB_ARRAY_NORMALIZED}{@link GL30#GL_VERTEX_ATTRIB_ARRAY_INTEGER VERTEX_ATTRIB_ARRAY_INTEGER}
    {@link GL33#GL_VERTEX_ATTRIB_ARRAY_DIVISOR VERTEX_ATTRIB_ARRAY_DIVISOR}{@link GL43#GL_VERTEX_ATTRIB_ARRAY_LONG VERTEX_ATTRIB_ARRAY_LONG}
    {@link GL43#GL_VERTEX_ATTRIB_RELATIVE_OFFSET VERTEX_ATTRIB_RELATIVE_OFFSET}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetVertexArrayIndexedi(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer param = stack.callocInt(1); - nglGetVertexArrayIndexediv(vaobj, index, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexArrayIndexed64iv ] --- - - /** Unsafe version of: {@link #glGetVertexArrayIndexed64iv GetVertexArrayIndexed64iv} */ - public static native void nglGetVertexArrayIndexed64iv(int vaobj, int index, int pname, long param); - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. Must be:
    {@link GL43#GL_VERTEX_BINDING_OFFSET VERTEX_BINDING_OFFSET}
    - * @param param the buffer in which to return the parameter values - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexed64iv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer param) { - if (CHECKS) { - check(param, 1); - } - nglGetVertexArrayIndexed64iv(vaobj, index, pname, memAddress(param)); - } - - /** - * Queries parameters of an attribute of a vertex array object. - * - * @param vaobj the vertex array object name - * @param index the attribute to query - * @param pname the parameter to query. Must be:
    {@link GL43#GL_VERTEX_BINDING_OFFSET VERTEX_BINDING_OFFSET}
    - * - * @see Reference Page - */ - @NativeType("void") - public static long glGetVertexArrayIndexed64i(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer param = stack.callocLong(1); - nglGetVertexArrayIndexed64iv(vaobj, index, pname, memAddress(param)); - return param.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCreateSamplers ] --- - - /** - * Unsafe version of: {@link #glCreateSamplers CreateSamplers} - * - * @param n the number of sampler object names to create - */ - public static native void nglCreateSamplers(int n, long samplers); - - /** - * Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object. - * - * @param samplers the buffer in which to return the created sampler object names - * - * @see Reference Page - */ - public static void glCreateSamplers(@NativeType("GLuint *") IntBuffer samplers) { - nglCreateSamplers(samplers.remaining(), memAddress(samplers)); - } - - /** - * Returns {@code n} previously unused sampler names in {@code samplers}, each representing a new sampler object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateSamplers() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer samplers = stack.callocInt(1); - nglCreateSamplers(1, memAddress(samplers)); - return samplers.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCreateProgramPipelines ] --- - - /** - * Unsafe version of: {@link #glCreateProgramPipelines CreateProgramPipelines} - * - * @param n the number of program pipeline names to create - */ - public static native void nglCreateProgramPipelines(int n, long pipelines); - - /** - * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object. - * - * @param pipelines the buffer in which to return the created program pipeline names - * - * @see Reference Page - */ - public static void glCreateProgramPipelines(@NativeType("GLuint *") IntBuffer pipelines) { - nglCreateProgramPipelines(pipelines.remaining(), memAddress(pipelines)); - } - - /** - * Returns {@code n} previously unused program pipeline names in {@code pipelines}, each representing a new program pipeline object. - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateProgramPipelines() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer pipelines = stack.callocInt(1); - nglCreateProgramPipelines(1, memAddress(pipelines)); - return pipelines.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glCreateQueries ] --- - - /** - * Unsafe version of: {@link #glCreateQueries CreateQueries} - * - * @param n the number of query object names to create - */ - public static native void nglCreateQueries(int target, int n, long ids); - - /** - * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}. - * - * @param target the query target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * @param ids the buffer in which to return the created query object names - * - * @see Reference Page - */ - public static void glCreateQueries(@NativeType("GLenum") int target, @NativeType("GLuint *") IntBuffer ids) { - nglCreateQueries(target, ids.remaining(), memAddress(ids)); - } - - /** - * Returns {@code n} previously unused query object names in {@code ids}, each representing a new query object with the specified {@code target}. - * - * @param target the query target. One of:
    {@link GL15#GL_SAMPLES_PASSED SAMPLES_PASSED}{@link GL30#GL_PRIMITIVES_GENERATED PRIMITIVES_GENERATED}{@link GL30#GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN}{@link GL33#GL_TIME_ELAPSED TIME_ELAPSED}
    {@link GL33#GL_TIMESTAMP TIMESTAMP}{@link GL33#GL_ANY_SAMPLES_PASSED ANY_SAMPLES_PASSED}{@link GL43#GL_ANY_SAMPLES_PASSED_CONSERVATIVE ANY_SAMPLES_PASSED_CONSERVATIVE}
    - * - * @see Reference Page - */ - @NativeType("void") - public static int glCreateQueries(@NativeType("GLenum") int target) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.callocInt(1); - nglCreateQueries(target, 1, memAddress(ids)); - return ids.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetQueryBufferObjectiv ] --- - - /** - * Queries the state of a query object. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static native void glGetQueryBufferObjectiv(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset); - - // --- [ glGetQueryBufferObjectuiv ] --- - - /** - * Unsigned version of {@link #glGetQueryBufferObjectiv GetQueryBufferObjectiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static native void glGetQueryBufferObjectuiv(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset); - - // --- [ glGetQueryBufferObjecti64v ] --- - - /** - * 64bit version of {@link #glGetQueryBufferObjectiv GetQueryBufferObjectiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static native void glGetQueryBufferObjecti64v(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset); - - // --- [ glGetQueryBufferObjectui64v ] --- - - /** - * 64bit version of {@link #glGetQueryBufferObjectuiv GetQueryBufferObjectuiv}. - * - * @param id the name of a query object - * @param buffer the name of a buffer object - * @param pname the state to query - * @param offset the offset into {@code buffer} at which the queried value is written - * - * @see Reference Page - */ - public static native void glGetQueryBufferObjectui64v(@NativeType("GLuint") int id, @NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLintptr") long offset); - - // --- [ glMemoryBarrierByRegion ] --- - - /** - * Behaves like {@link GL42C#glMemoryBarrier MemoryBarrier}, with two differences: - * - *

    First, it narrows the region under consideration so that only reads/writes of prior fragment shaders that are invoked for a smaller region of the - * framebuffer will be completed/reflected prior to subsequent reads/write of following fragment shaders. The size of the region is implementation - * dependent and may be as small as one framebuffer pixel.

    - * - *

    Second, it only applies to memory transactions that may be read by or written by a fragment shader.

    - * - *

    When barriers is {@link GL42#GL_ALL_BARRIER_BITS ALL_BARRIER_BITS}, shader memory accesses will be synchronized relative to all these barrier bits, but not to other - * barrier bits specific to {@link GL42C#glMemoryBarrier MemoryBarrier}. This implies that reads/writes for scatter/gather-like algorithms may or may not be - * completed/reflected after a MemoryBarrierByRegion command. However, for uses such as deferred shading, where a linked list of visible - * surfaces with the head at a framebuffer address may be constructed, and the entirety of the list is only dependent on previous executions at that - * framebuffer address, MemoryBarrierByRegion may be significantly more efficient than {@link GL42C#glMemoryBarrier MemoryBarrier}.

    - * - * @param barriers the barriers to insert. One or more of:
    {@link GL42#GL_ATOMIC_COUNTER_BARRIER_BIT ATOMIC_COUNTER_BARRIER_BIT}{@link GL42#GL_FRAMEBUFFER_BARRIER_BIT FRAMEBUFFER_BARRIER_BIT}{@link GL42#GL_SHADER_IMAGE_ACCESS_BARRIER_BIT SHADER_IMAGE_ACCESS_BARRIER_BIT}
    {@link GL43#GL_SHADER_STORAGE_BARRIER_BIT SHADER_STORAGE_BARRIER_BIT}{@link GL42#GL_TEXTURE_FETCH_BARRIER_BIT TEXTURE_FETCH_BARRIER_BIT}{@link GL42#GL_UNIFORM_BARRIER_BIT UNIFORM_BARRIER_BIT}
    - * - * @see Reference Page - */ - public static native void glMemoryBarrierByRegion(@NativeType("GLbitfield") int barriers); - - // --- [ glGetTextureSubImage ] --- - - /** - * Unsafe version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static native void nglGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int bufSize, long pixels); - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize, pixels); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.remaining(), memAddress(pixels)); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.remaining() << 1, memAddress(pixels)); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.remaining() << 2, memAddress(pixels)); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.remaining() << 2, memAddress(pixels)); - } - - /** - * Obtains sub-regions of a texture image from a texture object. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer pixels) { - nglGetTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.remaining() << 3, memAddress(pixels)); - } - - // --- [ glGetCompressedTextureSubImage ] --- - - /** - * Unsafe version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @param bufSize the size of the buffer to receive the retrieved pixel data - */ - public static native void nglGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int bufSize, long pixels); - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param bufSize the size of the buffer to receive the retrieved pixel data - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") ByteBuffer pixels) { - nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.remaining(), memAddress(pixels)); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") ShortBuffer pixels) { - nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.remaining() << 1, memAddress(pixels)); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") IntBuffer pixels) { - nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.remaining() << 2, memAddress(pixels)); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") FloatBuffer pixels) { - nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.remaining() << 2, memAddress(pixels)); - } - - /** - * Obtains a sub-region of a compressed texture image. - * - * @param texture the source texture object name - * @param level the level-of-detail number - * @param xoffset the x-position of the subregion - * @param yoffset the y-position of the subregion - * @param zoffset the z-position of the subregion - * @param width the subregion width - * @param height the subregion height - * @param depth the subregion depth - * @param pixels the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") DoubleBuffer pixels) { - nglGetCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.remaining() << 3, memAddress(pixels)); - } - - // --- [ glTextureBarrier ] --- - - /** - * Guarantees that writes have completed and caches have been invalidated before subsequent Draws are executed. - * - * @see Reference Page - */ - public static native void glTextureBarrier(); - - // --- [ glGetGraphicsResetStatus ] --- - - /** - * Indicates if the GL context has been in a reset state at any point since the last call to GetGraphicsResetStatus: - * - *
      - *
    • {@link GL11#GL_NO_ERROR NO_ERROR} indicates that the GL context has not been in a reset state since the last call.
    • - *
    • {@link #GL_GUILTY_CONTEXT_RESET GUILTY_CONTEXT_RESET} indicates that a reset has been detected that is attributable to the current GL context.
    • - *
    • {@link #GL_INNOCENT_CONTEXT_RESET INNOCENT_CONTEXT_RESET} indicates a reset has been detected that is not attributable to the current GL context.
    • - *
    • {@link #GL_UNKNOWN_CONTEXT_RESET UNKNOWN_CONTEXT_RESET} indicates a detected graphics reset whose cause is unknown.
    • - *
    - * - *

    If a reset status other than NO_ERROR is returned and subsequent calls return NO_ERROR, the context reset was encountered and completed. If a reset - * status is repeatedly returned, the context may be in the process of resetting.

    - * - *

    Reset notification behavior is determined at context creation time, and may be queried by calling GetIntegerv with the symbolic constant - * {@link #GL_RESET_NOTIFICATION_STRATEGY RESET_NOTIFICATION_STRATEGY}.

    - * - *

    If the reset notification behavior is {@link #GL_NO_RESET_NOTIFICATION NO_RESET_NOTIFICATION}, then the implementation will never deliver notification of reset events, and - * GetGraphicsResetStatus will always return NO_ERROR.

    - * - *

    If the behavior is {@link #GL_LOSE_CONTEXT_ON_RESET LOSE_CONTEXT_ON_RESET}, a graphics reset will result in a lost context and require creating a new context as described - * above. In this case GetGraphicsResetStatus will return an appropriate value from those described above.

    - * - *

    If a graphics reset notification occurs in a context, a notification must also occur in all other contexts which share objects with that context.

    - * - *

    After a graphics reset has occurred on a context, subsequent GL commands on that context (or any context which shares with that context) will generate a - * {@link #GL_CONTEXT_LOST CONTEXT_LOST} error. Such commands will not have side effects (in particular, they will not modify memory passed by pointer for query results, - * and may not block indefinitely or cause termination of the application. Exceptions to this behavior include:

    - * - *
      - *
    • {@link GL11C#glGetError GetError} and GetGraphicsResetStatus behave normally following a graphics reset, so that the application can determine a reset has - * occurred, and when it is safe to destroy and recreate the context.
    • - *
    • Any commands which might cause a polling application to block indefinitely will generate a CONTEXT_LOST error, but will also return a value - * indicating completion to the application.
    • - *
    - * - * @see Reference Page - */ - @NativeType("GLenum") - public static native int glGetGraphicsResetStatus(); - - // --- [ glGetnTexImage ] --- - - /** - * Unsafe version of: {@link #glGetnTexImage GetnTexImage} - * - * @param bufSize the maximum number of bytes to write into {@code img} - */ - public static native void nglGetnTexImage(int tex, int level, int format, int type, int bufSize, long img); - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param bufSize the maximum number of bytes to write into {@code img} - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long img) { - nglGetnTexImage(tex, level, format, type, bufSize, img); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer img) { - nglGetnTexImage(tex, level, format, type, img.remaining(), memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer img) { - nglGetnTexImage(tex, level, format, type, img.remaining() << 1, memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer img) { - nglGetnTexImage(tex, level, format, type, img.remaining() << 2, memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer img) { - nglGetnTexImage(tex, level, format, type, img.remaining() << 2, memAddress(img)); - } - - /** - * Robust version of {@link GL11C#glGetTexImage GetTexImage} - * - * @param tex the texture (or texture face) to be obtained. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL31#GL_TEXTURE_RECTANGLE TEXTURE_RECTANGLE}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    - * @param level the level-of-detail number - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") DoubleBuffer img) { - nglGetnTexImage(tex, level, format, type, img.remaining() << 3, memAddress(img)); - } - - // --- [ glReadnPixels ] --- - - /** - * Unsafe version of: {@link #glReadnPixels ReadnPixels} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static native void nglReadnPixels(int x, int y, int width, int height, int format, int type, int bufSize, long pixels); - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param bufSize the maximum number of bytes to write into {@code data} - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - nglReadnPixels(x, y, width, height, format, type, bufSize, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - nglReadnPixels(x, y, width, height, format, type, pixels.remaining(), memAddress(pixels)); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - nglReadnPixels(x, y, width, height, format, type, pixels.remaining() << 1, memAddress(pixels)); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - nglReadnPixels(x, y, width, height, format, type, pixels.remaining() << 2, memAddress(pixels)); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - nglReadnPixels(x, y, width, height, format, type, pixels.remaining() << 2, memAddress(pixels)); - } - - // --- [ glGetnCompressedTexImage ] --- - - /** - * Unsafe version of: {@link #glGetnCompressedTexImage GetnCompressedTexImage} - * - * @param bufSize the maximum number of bytes to write into {@code img} - */ - public static native void nglGetnCompressedTexImage(int target, int level, int bufSize, long img); - - /** - * Robust version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage} - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param bufSize the maximum number of bytes to write into {@code img} - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("GLsizei") int bufSize, @NativeType("void *") long img) { - nglGetnCompressedTexImage(target, level, bufSize, img); - } - - /** - * Robust version of {@link GL13C#glGetCompressedTexImage GetCompressedTexImage} - * - * @param target the target texture. One of:
    {@link GL11#GL_TEXTURE_1D TEXTURE_1D}{@link GL11#GL_TEXTURE_2D TEXTURE_2D}{@link GL30#GL_TEXTURE_1D_ARRAY TEXTURE_1D_ARRAY}
    {@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_POSITIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_POSITIVE_Y}
    {@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y}{@link GL13#GL_TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_POSITIVE_Z}{@link GL13#GL_TEXTURE_CUBE_MAP_NEGATIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z}
    {@link GL12#GL_TEXTURE_3D TEXTURE_3D}{@link GL30#GL_TEXTURE_2D_ARRAY TEXTURE_2D_ARRAY}{@link GL40#GL_TEXTURE_CUBE_MAP_ARRAY TEXTURE_CUBE_MAP_ARRAY}
    - * @param level the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. - * @param img a buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnCompressedTexImage(@NativeType("GLenum") int target, @NativeType("GLint") int level, @NativeType("void *") ByteBuffer img) { - if (CHECKS) { - if (DEBUG) { - check(img, GL11.glGetTexLevelParameteri(target, level, GL13.GL_TEXTURE_COMPRESSED_IMAGE_SIZE)); - } - } - nglGetnCompressedTexImage(target, level, img.remaining(), memAddress(img)); - } - - // --- [ glGetnUniformfv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformfv GetnUniformfv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static native void nglGetnUniformfv(int program, int location, int bufSize, long params); - - /** - * Returns the value or values of a uniform of the default uniform block. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - nglGetnUniformfv(program, location, params.remaining(), memAddress(params)); - } - - /** - * Returns the value or values of a uniform of the default uniform block. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static float glGetnUniformf(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer params = stack.callocFloat(1); - nglGetnUniformfv(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformdv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformdv GetnUniformdv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static native void nglGetnUniformdv(int program, int location, int bufSize, long params); - - /** - * Double version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") DoubleBuffer params) { - nglGetnUniformdv(program, location, params.remaining(), memAddress(params)); - } - - /** - * Double version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static double glGetnUniformd(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - DoubleBuffer params = stack.callocDouble(1); - nglGetnUniformdv(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformiv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformiv GetnUniformiv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static native void nglGetnUniformiv(int program, int location, int bufSize, long params); - - /** - * Integer version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - nglGetnUniformiv(program, location, params.remaining(), memAddress(params)); - } - - /** - * Integer version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetnUniformiv(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetnUniformuiv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformuiv GetnUniformuiv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static native void nglGetnUniformuiv(int program, int location, int bufSize, long params); - - /** - * Unsigned version of {@link #glGetnUniformiv GetnUniformiv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - * - * @see Reference Page - */ - public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - nglGetnUniformuiv(program, location, params.remaining(), memAddress(params)); - } - - /** - * Unsigned version of {@link #glGetnUniformiv GetnUniformiv}. - * - * @param program the program object - * @param location the uniform location - * - * @see Reference Page - */ - @NativeType("void") - public static int glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetnUniformuiv(program, location, 1, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Array version of: {@link #glCreateTransformFeedbacks CreateTransformFeedbacks} - * - * @see Reference Page - */ - public static void glCreateTransformFeedbacks(@NativeType("GLuint *") int[] ids) { - long __functionAddress = GL.getICD().glCreateTransformFeedbacks; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** - * Array version of: {@link #glGetTransformFeedbackiv GetTransformFeedbackiv} - * - * @see Reference Page - */ - public static void glGetTransformFeedbackiv(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - long __functionAddress = GL.getICD().glGetTransformFeedbackiv; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(xfb, pname, param, __functionAddress); - } - - /** - * Array version of: {@link #glGetTransformFeedbacki_v GetTransformFeedbacki_v} - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint *") int[] param) { - long __functionAddress = GL.getICD().glGetTransformFeedbacki_v; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(xfb, pname, index, param, __functionAddress); - } - - /** - * Array version of: {@link #glGetTransformFeedbacki64_v GetTransformFeedbacki64_v} - * - * @see Reference Page - */ - public static void glGetTransformFeedbacki64_v(@NativeType("GLuint") int xfb, @NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLint64 *") long[] param) { - long __functionAddress = GL.getICD().glGetTransformFeedbacki64_v; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(xfb, pname, index, param, __functionAddress); - } - - /** - * Array version of: {@link #glCreateBuffers CreateBuffers} - * - * @see Reference Page - */ - public static void glCreateBuffers(@NativeType("GLuint *") int[] buffers) { - long __functionAddress = GL.getICD().glCreateBuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffers.length, buffers, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 1, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferStorage NamedBufferStorage} - * - * @see Reference Page - */ - public static void glNamedBufferStorage(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLbitfield") int flags) { - long __functionAddress = GL.getICD().glNamedBufferStorage; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 3, data, flags, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") short[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 1, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") int[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") long[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 3, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") float[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 2, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferData NamedBufferData} - * - * @see Reference Page - */ - public static void glNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("void const *") double[] data, @NativeType("GLenum") int usage) { - long __functionAddress = GL.getICD().glNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPPV(buffer, Integer.toUnsignedLong(data.length) << 3, data, usage, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") long[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glNamedBufferSubData NamedBufferSubData} - * - * @see Reference Page - */ - public static void glNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") double[] data) { - long __functionAddress = GL.getICD().glNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer, internalformat, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer, internalformat, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedBufferData ClearNamedBufferData} - * - * @see Reference Page - */ - public static void glClearNamedBufferData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferData; - if (CHECKS) { - check(__functionAddress); - } - callPV(buffer, internalformat, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedBufferSubData ClearNamedBufferSubData} - * - * @see Reference Page - */ - public static void glClearNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLenum") int internalformat, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @Nullable @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glClearNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, internalformat, offset, size, format, type, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedBufferParameteriv GetNamedBufferParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteriv(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedBufferParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(buffer, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedBufferParameteri64v GetNamedBufferParameteri64v} - * - * @see Reference Page - */ - public static void glGetNamedBufferParameteri64v(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glGetNamedBufferParameteri64v; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(buffer, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") short[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") int[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") long[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") float[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedBufferSubData GetNamedBufferSubData} - * - * @see Reference Page - */ - public static void glGetNamedBufferSubData(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void *") double[] data) { - long __functionAddress = GL.getICD().glGetNamedBufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(buffer, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** - * Array version of: {@link #glCreateFramebuffers CreateFramebuffers} - * - * @see Reference Page - */ - public static void glCreateFramebuffers(@NativeType("GLuint *") int[] framebuffers) { - long __functionAddress = GL.getICD().glCreateFramebuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffers.length, framebuffers, __functionAddress); - } - - /** - * Array version of: {@link #glNamedFramebufferDrawBuffers NamedFramebufferDrawBuffers} - * - * @see Reference Page - */ - public static void glNamedFramebufferDrawBuffers(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] bufs) { - long __functionAddress = GL.getICD().glNamedFramebufferDrawBuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffer, bufs.length, bufs, __functionAddress); - } - - /** - * Array version of: {@link #glInvalidateNamedFramebufferData InvalidateNamedFramebufferData} - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] attachments) { - long __functionAddress = GL.getICD().glInvalidateNamedFramebufferData; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffer, attachments.length, attachments, __functionAddress); - } - - /** - * Array version of: {@link #glInvalidateNamedFramebufferSubData InvalidateNamedFramebufferSubData} - * - * @see Reference Page - */ - public static void glInvalidateNamedFramebufferSubData(@NativeType("GLuint") int framebuffer, @NativeType("GLenum const *") int[] attachments, @NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height) { - long __functionAddress = GL.getICD().glInvalidateNamedFramebufferSubData; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffer, attachments.length, attachments, x, y, width, height, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedFramebufferiv ClearNamedFramebufferiv} - * - * @see Reference Page - */ - public static void glClearNamedFramebufferiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glClearNamedFramebufferiv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(framebuffer, buffer, drawbuffer, value, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedFramebufferuiv ClearNamedFramebufferuiv} - * - * @see Reference Page - */ - public static void glClearNamedFramebufferuiv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glClearNamedFramebufferuiv; - if (CHECKS) { - check(__functionAddress); - check(value, 4); - } - callPV(framebuffer, buffer, drawbuffer, value, __functionAddress); - } - - /** - * Array version of: {@link #glClearNamedFramebufferfv ClearNamedFramebufferfv} - * - * @see Reference Page - */ - public static void glClearNamedFramebufferfv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int buffer, @NativeType("GLint") int drawbuffer, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glClearNamedFramebufferfv; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(framebuffer, buffer, drawbuffer, value, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedFramebufferParameteriv GetNamedFramebufferParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedFramebufferParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedFramebufferParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(framebuffer, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedFramebufferAttachmentParameteriv GetNamedFramebufferAttachmentParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedFramebufferAttachmentParameteriv(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedFramebufferAttachmentParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(framebuffer, attachment, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glCreateRenderbuffers CreateRenderbuffers} - * - * @see Reference Page - */ - public static void glCreateRenderbuffers(@NativeType("GLuint *") int[] renderbuffers) { - long __functionAddress = GL.getICD().glCreateRenderbuffers; - if (CHECKS) { - check(__functionAddress); - } - callPV(renderbuffers.length, renderbuffers, __functionAddress); - } - - /** - * Array version of: {@link #glGetNamedRenderbufferParameteriv GetNamedRenderbufferParameteriv} - * - * @see Reference Page - */ - public static void glGetNamedRenderbufferParameteriv(@NativeType("GLuint") int renderbuffer, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetNamedRenderbufferParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(renderbuffer, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glCreateTextures CreateTextures} - * - * @see Reference Page - */ - public static void glCreateTextures(@NativeType("GLenum") int target, @NativeType("GLuint *") int[] textures) { - long __functionAddress = GL.getICD().glCreateTextures; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, textures.length, textures, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage1D TextureSubImage1D} - * - * @see Reference Page - */ - public static void glTextureSubImage1D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLsizei") int width, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage1D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, width, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage2D TextureSubImage2D} - * - * @see Reference Page - */ - public static void glTextureSubImage2D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage2D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, width, height, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") short[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") int[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") float[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureSubImage3D TextureSubImage3D} - * - * @see Reference Page - */ - public static void glTextureSubImage3D(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void const *") double[] pixels) { - long __functionAddress = GL.getICD().glTextureSubImage3D; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glTextureParameterfv TextureParameterfv} - * - * @see Reference Page - */ - public static void glTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] params) { - long __functionAddress = GL.getICD().glTextureParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTextureParameterIiv TextureParameterIiv} - * - * @see Reference Page - */ - public static void glTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glTextureParameterIiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTextureParameterIuiv TextureParameterIuiv} - * - * @see Reference Page - */ - public static void glTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint const *") int[] params) { - long __functionAddress = GL.getICD().glTextureParameterIuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glTextureParameteriv TextureParameteriv} - * - * @see Reference Page - */ - public static void glTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glTextureParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 4); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, pixels.length << 1, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureImage GetTextureImage} - * - * @see Reference Page - */ - public static void glGetTextureImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - long __functionAddress = GL.getICD().glGetTextureImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, format, type, pixels.length << 3, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureLevelParameterfv GetTextureLevelParameterfv} - * - * @see Reference Page - */ - public static void glGetTextureLevelParameterfv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetTextureLevelParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, level, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureLevelParameteriv GetTextureLevelParameteriv} - * - * @see Reference Page - */ - public static void glGetTextureLevelParameteriv(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureLevelParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, level, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureParameterfv GetTextureParameterfv} - * - * @see Reference Page - */ - public static void glGetTextureParameterfv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetTextureParameterfv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureParameterIiv GetTextureParameterIiv} - * - * @see Reference Page - */ - public static void glGetTextureParameterIiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureParameterIiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureParameterIuiv GetTextureParameterIuiv} - * - * @see Reference Page - */ - public static void glGetTextureParameterIuiv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureParameterIuiv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureParameteriv GetTextureParameteriv} - * - * @see Reference Page - */ - public static void glGetTextureParameteriv(@NativeType("GLuint") int texture, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetTextureParameteriv; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(texture, pname, params, __functionAddress); - } - - /** - * Array version of: {@link #glCreateVertexArrays CreateVertexArrays} - * - * @see Reference Page - */ - public static void glCreateVertexArrays(@NativeType("GLuint *") int[] arrays) { - long __functionAddress = GL.getICD().glCreateVertexArrays; - if (CHECKS) { - check(__functionAddress); - } - callPV(arrays.length, arrays, __functionAddress); - } - - /** - * Array version of: {@link #glVertexArrayVertexBuffers VertexArrayVertexBuffers} - * - * @see Reference Page - */ - public static void glVertexArrayVertexBuffers(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int first, @Nullable @NativeType("GLuint const *") int[] buffers, @Nullable @NativeType("GLintptr const *") PointerBuffer offsets, @Nullable @NativeType("GLsizei const *") int[] strides) { - long __functionAddress = GL.getICD().glVertexArrayVertexBuffers; - if (CHECKS) { - check(__functionAddress); - checkSafe(offsets, lengthSafe(buffers)); - checkSafe(strides, lengthSafe(buffers)); - } - callPPPV(vaobj, first, lengthSafe(buffers), buffers, memAddressSafe(offsets), strides, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexArrayiv GetVertexArrayiv} - * - * @see Reference Page - */ - public static void glGetVertexArrayiv(@NativeType("GLuint") int vaobj, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - long __functionAddress = GL.getICD().glGetVertexArrayiv; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(vaobj, pname, param, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexArrayIndexediv GetVertexArrayIndexediv} - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexediv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] param) { - long __functionAddress = GL.getICD().glGetVertexArrayIndexediv; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(vaobj, index, pname, param, __functionAddress); - } - - /** - * Array version of: {@link #glGetVertexArrayIndexed64iv GetVertexArrayIndexed64iv} - * - * @see Reference Page - */ - public static void glGetVertexArrayIndexed64iv(@NativeType("GLuint") int vaobj, @NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] param) { - long __functionAddress = GL.getICD().glGetVertexArrayIndexed64iv; - if (CHECKS) { - check(__functionAddress); - check(param, 1); - } - callPV(vaobj, index, pname, param, __functionAddress); - } - - /** - * Array version of: {@link #glCreateSamplers CreateSamplers} - * - * @see Reference Page - */ - public static void glCreateSamplers(@NativeType("GLuint *") int[] samplers) { - long __functionAddress = GL.getICD().glCreateSamplers; - if (CHECKS) { - check(__functionAddress); - } - callPV(samplers.length, samplers, __functionAddress); - } - - /** - * Array version of: {@link #glCreateProgramPipelines CreateProgramPipelines} - * - * @see Reference Page - */ - public static void glCreateProgramPipelines(@NativeType("GLuint *") int[] pipelines) { - long __functionAddress = GL.getICD().glCreateProgramPipelines; - if (CHECKS) { - check(__functionAddress); - } - callPV(pipelines.length, pipelines, __functionAddress); - } - - /** - * Array version of: {@link #glCreateQueries CreateQueries} - * - * @see Reference Page - */ - public static void glCreateQueries(@NativeType("GLenum") int target, @NativeType("GLuint *") int[] ids) { - long __functionAddress = GL.getICD().glCreateQueries; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, ids.length, ids, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glGetTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.length << 1, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glGetTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glGetTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetTextureSubImage GetTextureSubImage} - * - * @see Reference Page - */ - public static void glGetTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] pixels) { - long __functionAddress = GL.getICD().glGetTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels.length << 3, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glGetCompressedTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.length << 1, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glGetCompressedTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glGetCompressedTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetCompressedTextureSubImage GetCompressedTextureSubImage} - * - * @see Reference Page - */ - public static void glGetCompressedTextureSubImage(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("void *") double[] pixels) { - long __functionAddress = GL.getICD().glGetCompressedTextureSubImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels.length << 3, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] img) { - long __functionAddress = GL.getICD().glGetnTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 1, img, __functionAddress); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] img) { - long __functionAddress = GL.getICD().glGetnTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 2, img, __functionAddress); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] img) { - long __functionAddress = GL.getICD().glGetnTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 2, img, __functionAddress); - } - - /** - * Array version of: {@link #glGetnTexImage GetnTexImage} - * - * @see Reference Page - */ - public static void glGetnTexImage(@NativeType("GLenum") int tex, @NativeType("GLint") int level, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") double[] img) { - long __functionAddress = GL.getICD().glGetnTexImage; - if (CHECKS) { - check(__functionAddress); - } - callPV(tex, level, format, type, img.length << 3, img, __functionAddress); - } - - /** - * Array version of: {@link #glReadnPixels ReadnPixels} - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - long __functionAddress = GL.getICD().glReadnPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, pixels.length << 1, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glReadnPixels ReadnPixels} - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - long __functionAddress = GL.getICD().glReadnPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glReadnPixels ReadnPixels} - * - * @see Reference Page - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - long __functionAddress = GL.getICD().glReadnPixels; - if (CHECKS) { - check(__functionAddress); - } - callPV(x, y, width, height, format, type, pixels.length << 2, pixels, __functionAddress); - } - - /** - * Array version of: {@link #glGetnUniformfv GetnUniformfv} - * - * @see Reference Page - */ - public static void glGetnUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetnUniformfv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetnUniformdv GetnUniformdv} - * - * @see Reference Page - */ - public static void glGetnUniformdv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLdouble *") double[] params) { - long __functionAddress = GL.getICD().glGetnUniformdv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetnUniformiv GetnUniformiv} - * - * @see Reference Page - */ - public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetnUniformiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - - /** - * Array version of: {@link #glGetnUniformuiv GetnUniformuiv} - * - * @see Reference Page - */ - public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetnUniformuiv; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, params.length, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL46.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL46.java deleted file mode 100644 index dafe9a72..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL46.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * The OpenGL functionality up to version 4.6. Includes the deprecated symbols of the Compatibility Profile. - * - *

    OpenGL 4.6 implementations support revision 4.60 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL46 extends GL45 { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * MapBufferRange, FlushMappedBufferRange, GetBufferParameteriv, and CopyBufferSubData. - */ - public static final int GL_PARAMETER_BUFFER = 0x80EE; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_PARAMETER_BUFFER_BINDING = 0x80EF; - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBeginQuery BeginQuery}, {@link GL15C#glEndQuery EndQuery}, {@link GL15C#glGetQueryiv GetQueryiv}, - * {@link GL40C#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40C#glEndQueryIndexed EndQueryIndexed} and {@link GL40C#glGetQueryIndexediv GetQueryIndexediv}. - */ - public static final int - GL_VERTICES_SUBMITTED = 0x82EE, - GL_PRIMITIVES_SUBMITTED = 0x82EF, - GL_VERTEX_SHADER_INVOCATIONS = 0x82F0, - GL_TESS_CONTROL_SHADER_PATCHES = 0x82F1, - GL_TESS_EVALUATION_SHADER_INVOCATIONS = 0x82F2, - GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED = 0x82F3, - GL_FRAGMENT_SHADER_INVOCATIONS = 0x82F4, - GL_COMPUTE_SHADER_INVOCATIONS = 0x82F5, - GL_CLIPPING_INPUT_PRIMITIVES = 0x82F6, - GL_CLIPPING_OUTPUT_PRIMITIVES = 0x82F7; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_POLYGON_OFFSET_CLAMP = 0x8E1B; - - /** If set in {@link GL30#GL_CONTEXT_FLAGS CONTEXT_FLAGS}, then no error behavior is enabled for this context. */ - public static final int GL_CONTEXT_FLAG_NO_ERROR_BIT = 0x8; - - /** Accepted by the {@code binaryformat} parameter of {@link GL41C#glShaderBinary ShaderBinary}. */ - public static final int GL_SHADER_BINARY_FORMAT_SPIR_V = 0x9551; - - /** Accepted by the {@code pname} parameter of {@link GL20C#glGetShaderiv GetShaderiv}. */ - public static final int GL_SPIR_V_BINARY = 0x9552; - - /** Accepted by the {@code name} parameter of {@link GL30C#glGetStringi GetStringi}. */ - public static final int GL_SPIR_V_EXTENSIONS = 0x9553; - - /** Accepted by the {@code pname} parameter of {@link GL11C#glGetIntegerv GetIntegerv}. */ - public static final int GL_NUM_SPIR_V_EXTENSIONS = 0x9554; - - /** Accepted by the {@code pname} parameters of GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameterfv, TexParameteri, and TexParameteriv. */ - public static final int GL_TEXTURE_MAX_ANISOTROPY = 0x84FE; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF; - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBeginQuery BeginQuery}, {@link GL15C#glEndQuery EndQuery}, {@link GL15C#glGetQueryiv GetQueryiv}, - * {@link GL40C#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40C#glEndQueryIndexed EndQueryIndexed} and {@link GL40C#glGetQueryIndexediv GetQueryIndexediv}. - */ - public static final int - GL_TRANSFORM_FEEDBACK_OVERFLOW = 0x82EC, - GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW = 0x82ED; - - protected GL46() { - throw new UnsupportedOperationException(); - } - - // --- [ glMultiDrawArraysIndirectCount ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirectCount MultiDrawArraysIndirectCount} */ - public static void nglMultiDrawArraysIndirectCount(int mode, long indirect, long drawcount, int maxdrawcount, int stride) { - GL46C.nglMultiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link GL46C#GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link GL46C#GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link GL46C#GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride); - } - - // --- [ glMultiDrawElementsIndirectCount ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirectCount MultiDrawElementsIndirectCount} */ - public static void nglMultiDrawElementsIndirectCount(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride) { - GL46C.nglMultiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link GL46C#GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link GL46C#GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link GL46C#GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - // --- [ glPolygonOffsetClamp ] --- - - /** - * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This - * function determines this value. - * - *

    {@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable - * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value, which may then be clamped to a minimum or maximum - * value specified by {@code clamp}.

    - * - *

    The values {@code factor}, {@code units}, and {@code clamp} may each be positive, negative, or zero. Calling the command {@link GL11C#glPolygonOffset PolygonOffset} is equivalent - * to calling the command {@code PolygonOffsetClamp} with clamp equal to zero.

    - * - * @param factor scales the maximum depth slope of the polygon - * @param units scales an implementation-dependent constant that relates to the usable resolution of the depth buffer - * @param clamp the minimum or maximum polygon offset value - * - * @see Reference Page - */ - public static void glPolygonOffsetClamp(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units, @NativeType("GLfloat") float clamp) { - GL46C.glPolygonOffsetClamp(factor, units, clamp); - } - - // --- [ glSpecializeShader ] --- - - /** - * Unsafe version of: {@link #glSpecializeShader SpecializeShader} - * - * @param numSpecializationConstants the number of specialization constants whose values to set in this call - */ - public static void nglSpecializeShader(int shader, long pEntryPoint, int numSpecializationConstants, long pConstantIndex, long pConstantValue) { - GL46C.nglSpecializeShader(shader, pEntryPoint, numSpecializationConstants, pConstantIndex, pConstantValue); - } - - /** - * Specializes a shader created from a SPIR-V module. - * - *

    Shaders associated with SPIR-V modules must be specialized before they can be linked into a program object. It is not necessary to specialize the - * shader before it is attached to a program object. Once specialized, a shader may not be specialized again without first re-associating the original - * SPIR-V module with it, through {@link GL41C#glShaderBinary ShaderBinary}.

    - * - *

    Specialization does two things:

    - * - *
      - *
    • Selects the name of the entry point, for that shader’s stage, from the SPIR-V module.
    • - *
    • Sets the values of all, or a subset of, the specialization constants in the SPIRV module.
    • - *
    - * - *

    On successful shader specialization, the compile status for shader is set to {@link GL11#GL_TRUE TRUE}. On failure, the compile status for shader is set to {@link GL11#GL_FALSE FALSE} and - * additional information about the cause of the failure may be available in the shader compilation log.

    - * - * @param shader the name of a shader object containing unspecialized SPIR-V as created from a successful call to {@link GL41C#glShaderBinary ShaderBinary} to which a SPIR-V module was - * passed - * @param pEntryPoint a pointer to a null-terminated UTF-8 string specifying the name of the entry point in the SPIR-V module to use for this shader - * @param pConstantIndex is a pointer to an array of {@code numSpecializationConstants} unsigned integers, each holding the index of a specialization constant in the SPIR-V - * module whose value to set. - * - *

    Specialization constants not referenced by {@code pConstantIndex} retain their default values as specified in the SPIR-V module.

    - * @param pConstantValue an entry in {@code pConstantValue} is used to set the value of the specialization constant indexed by the corresponding entry in - * {@code pConstantIndex}. - * - *

    Although this array is of unsigned integer, each entry is bitcast to the appropriate type for the module, and therefore, floating-point constants - * may be set by including their IEEE-754 bit representation in the {@code pConstantValue} array.

    - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") ByteBuffer pEntryPoint, @Nullable @NativeType("GLuint const *") IntBuffer pConstantIndex, @Nullable @NativeType("GLuint const *") IntBuffer pConstantValue) { - GL46C.glSpecializeShader(shader, pEntryPoint, pConstantIndex, pConstantValue); - } - - /** - * Specializes a shader created from a SPIR-V module. - * - *

    Shaders associated with SPIR-V modules must be specialized before they can be linked into a program object. It is not necessary to specialize the - * shader before it is attached to a program object. Once specialized, a shader may not be specialized again without first re-associating the original - * SPIR-V module with it, through {@link GL41C#glShaderBinary ShaderBinary}.

    - * - *

    Specialization does two things:

    - * - *
      - *
    • Selects the name of the entry point, for that shader’s stage, from the SPIR-V module.
    • - *
    • Sets the values of all, or a subset of, the specialization constants in the SPIRV module.
    • - *
    - * - *

    On successful shader specialization, the compile status for shader is set to {@link GL11#GL_TRUE TRUE}. On failure, the compile status for shader is set to {@link GL11#GL_FALSE FALSE} and - * additional information about the cause of the failure may be available in the shader compilation log.

    - * - * @param shader the name of a shader object containing unspecialized SPIR-V as created from a successful call to {@link GL41C#glShaderBinary ShaderBinary} to which a SPIR-V module was - * passed - * @param pEntryPoint a pointer to a null-terminated UTF-8 string specifying the name of the entry point in the SPIR-V module to use for this shader - * @param pConstantIndex is a pointer to an array of {@code numSpecializationConstants} unsigned integers, each holding the index of a specialization constant in the SPIR-V - * module whose value to set. - * - *

    Specialization constants not referenced by {@code pConstantIndex} retain their default values as specified in the SPIR-V module.

    - * @param pConstantValue an entry in {@code pConstantValue} is used to set the value of the specialization constant indexed by the corresponding entry in - * {@code pConstantIndex}. - * - *

    Although this array is of unsigned integer, each entry is bitcast to the appropriate type for the module, and therefore, floating-point constants - * may be set by including their IEEE-754 bit representation in the {@code pConstantValue} array.

    - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") CharSequence pEntryPoint, @Nullable @NativeType("GLuint const *") IntBuffer pConstantIndex, @Nullable @NativeType("GLuint const *") IntBuffer pConstantValue) { - GL46C.glSpecializeShader(shader, pEntryPoint, pConstantIndex, pConstantValue); - } - - /** - * Array version of: {@link #glMultiDrawArraysIndirectCount MultiDrawArraysIndirectCount} - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Array version of: {@link #glMultiDrawElementsIndirectCount MultiDrawElementsIndirectCount} - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - GL46C.glMultiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Array version of: {@link #glSpecializeShader SpecializeShader} - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") ByteBuffer pEntryPoint, @Nullable @NativeType("GLuint const *") int[] pConstantIndex, @Nullable @NativeType("GLuint const *") int[] pConstantValue) { - GL46C.glSpecializeShader(shader, pEntryPoint, pConstantIndex, pConstantValue); - } - - /** - * Array version of: {@link #glSpecializeShader SpecializeShader} - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") CharSequence pEntryPoint, @Nullable @NativeType("GLuint const *") int[] pConstantIndex, @Nullable @NativeType("GLuint const *") int[] pConstantValue) { - GL46C.glSpecializeShader(shader, pEntryPoint, pConstantIndex, pConstantValue); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GL46C.java b/LWJGL/src/main/java/org/lwjgl/opengl/GL46C.java deleted file mode 100644 index a994ab3d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GL46C.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The OpenGL functionality up to version 4.6. Includes only Core Profile symbols. - * - *

    OpenGL 4.6 implementations support revision 4.60 of the OpenGL Shading Language.

    - * - *

    Extensions promoted to core in this release:

    - * - * - */ -public class GL46C extends GL45C { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * MapBufferRange, FlushMappedBufferRange, GetBufferParameteriv, and CopyBufferSubData. - */ - public static final int GL_PARAMETER_BUFFER = 0x80EE; - - /** Accepted by the {@code value} parameter of GetIntegerv, GetBooleanv, GetFloatv, and GetDoublev. */ - public static final int GL_PARAMETER_BUFFER_BINDING = 0x80EF; - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBeginQuery BeginQuery}, {@link GL15C#glEndQuery EndQuery}, {@link GL15C#glGetQueryiv GetQueryiv}, - * {@link GL40C#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40C#glEndQueryIndexed EndQueryIndexed} and {@link GL40C#glGetQueryIndexediv GetQueryIndexediv}. - */ - public static final int - GL_VERTICES_SUBMITTED = 0x82EE, - GL_PRIMITIVES_SUBMITTED = 0x82EF, - GL_VERTEX_SHADER_INVOCATIONS = 0x82F0, - GL_TESS_CONTROL_SHADER_PATCHES = 0x82F1, - GL_TESS_EVALUATION_SHADER_INVOCATIONS = 0x82F2, - GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED = 0x82F3, - GL_FRAGMENT_SHADER_INVOCATIONS = 0x82F4, - GL_COMPUTE_SHADER_INVOCATIONS = 0x82F5, - GL_CLIPPING_INPUT_PRIMITIVES = 0x82F6, - GL_CLIPPING_OUTPUT_PRIMITIVES = 0x82F7; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_POLYGON_OFFSET_CLAMP = 0x8E1B; - - /** If set in {@link GL30#GL_CONTEXT_FLAGS CONTEXT_FLAGS}, then no error behavior is enabled for this context. */ - public static final int GL_CONTEXT_FLAG_NO_ERROR_BIT = 0x8; - - /** Accepted by the {@code binaryformat} parameter of {@link GL41C#glShaderBinary ShaderBinary}. */ - public static final int GL_SHADER_BINARY_FORMAT_SPIR_V = 0x9551; - - /** Accepted by the {@code pname} parameter of {@link GL20C#glGetShaderiv GetShaderiv}. */ - public static final int GL_SPIR_V_BINARY = 0x9552; - - /** Accepted by the {@code name} parameter of {@link GL30C#glGetStringi GetStringi}. */ - public static final int GL_SPIR_V_EXTENSIONS = 0x9553; - - /** Accepted by the {@code pname} parameter of {@link GL11C#glGetIntegerv GetIntegerv}. */ - public static final int GL_NUM_SPIR_V_EXTENSIONS = 0x9554; - - /** Accepted by the {@code pname} parameters of GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameterfv, TexParameteri, and TexParameteriv. */ - public static final int GL_TEXTURE_MAX_ANISOTROPY = 0x84FE; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetDoublev, GetFloatv, and GetIntegerv. */ - public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF; - - /** - * Accepted by the {@code target} parameter of {@link GL15C#glBeginQuery BeginQuery}, {@link GL15C#glEndQuery EndQuery}, {@link GL15C#glGetQueryiv GetQueryiv}, - * {@link GL40C#glBeginQueryIndexed BeginQueryIndexed}, {@link GL40C#glEndQueryIndexed EndQueryIndexed} and {@link GL40C#glGetQueryIndexediv GetQueryIndexediv}. - */ - public static final int - GL_TRANSFORM_FEEDBACK_OVERFLOW = 0x82EC, - GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW = 0x82ED; - - protected GL46C() { - throw new UnsupportedOperationException(); - } - - // --- [ glMultiDrawArraysIndirectCount ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirectCount MultiDrawArraysIndirectCount} */ - public static native void nglMultiDrawArraysIndirectCount(int mode, long indirect, long drawcount, int maxdrawcount, int stride); - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, maxdrawcount * (stride == 0 ? (4 * 4) : stride)); - } - nglMultiDrawArraysIndirectCount(mode, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - nglMultiDrawArraysIndirectCount(mode, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of structures containing the draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") IntBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, (maxdrawcount * (stride == 0 ? (4 * 4) : stride)) >> 2); - } - nglMultiDrawArraysIndirectCount(mode, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - // --- [ glMultiDrawElementsIndirectCount ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirectCount MultiDrawElementsIndirectCount} */ - public static native void nglMultiDrawElementsIndirectCount(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride); - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, maxdrawcount * (stride == 0 ? (5 * 4) : stride)); - } - nglMultiDrawElementsIndirectCount(mode, type, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - nglMultiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount, stride); - } - - /** - * Behaves similarly to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code drawcount} defines an offset (in bytes) into the buffer object bound to the - * {@link #GL_PARAMETER_BUFFER PARAMETER_BUFFER} binding point at which a single {@code sizei} typed value is stored, which contains the draw count. {@code maxdrawcount} specifies - * the maximum number of draws that are expected to be stored in the buffer. If the value stored at {@code drawcount} into the buffer is greater than - * {@code maxdrawcount}, the implementation stops processing draws after {@code maxdrawcount} parameter sets. {@code drawcount} must be a multiple of - * four. - * - * @param mode what kind of primitives to render. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the type of data in the buffer bound to the GL_ELEMENT_ARRAY_BUFFER binding. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect a structure containing an array of draw parameters - * @param drawcount the offset into the parameter buffer object - * @param maxdrawcount the maximum number of draws - * @param stride the distance in basic machine units between elements of the draw parameter array - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") IntBuffer indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - if (CHECKS) { - check(indirect, (maxdrawcount * (stride == 0 ? (5 * 4) : stride)) >> 2); - } - nglMultiDrawElementsIndirectCount(mode, type, memAddress(indirect), drawcount, maxdrawcount, stride); - } - - // --- [ glPolygonOffsetClamp ] --- - - /** - * The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This - * function determines this value. - * - *

    {@code factor} scales the maximum depth slope of the polygon, and {@code units} scales an implementation-dependent constant that relates to the usable - * resolution of the depth buffer. The resulting values are summed to produce the polygon offset value, which may then be clamped to a minimum or maximum - * value specified by {@code clamp}.

    - * - *

    The values {@code factor}, {@code units}, and {@code clamp} may each be positive, negative, or zero. Calling the command {@link GL11C#glPolygonOffset PolygonOffset} is equivalent - * to calling the command {@code PolygonOffsetClamp} with clamp equal to zero.

    - * - * @param factor scales the maximum depth slope of the polygon - * @param units scales an implementation-dependent constant that relates to the usable resolution of the depth buffer - * @param clamp the minimum or maximum polygon offset value - * - * @see Reference Page - */ - public static native void glPolygonOffsetClamp(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units, @NativeType("GLfloat") float clamp); - - // --- [ glSpecializeShader ] --- - - /** - * Unsafe version of: {@link #glSpecializeShader SpecializeShader} - * - * @param numSpecializationConstants the number of specialization constants whose values to set in this call - */ - public static native void nglSpecializeShader(int shader, long pEntryPoint, int numSpecializationConstants, long pConstantIndex, long pConstantValue); - - /** - * Specializes a shader created from a SPIR-V module. - * - *

    Shaders associated with SPIR-V modules must be specialized before they can be linked into a program object. It is not necessary to specialize the - * shader before it is attached to a program object. Once specialized, a shader may not be specialized again without first re-associating the original - * SPIR-V module with it, through {@link GL41C#glShaderBinary ShaderBinary}.

    - * - *

    Specialization does two things:

    - * - *
      - *
    • Selects the name of the entry point, for that shader’s stage, from the SPIR-V module.
    • - *
    • Sets the values of all, or a subset of, the specialization constants in the SPIRV module.
    • - *
    - * - *

    On successful shader specialization, the compile status for shader is set to {@link GL11#GL_TRUE TRUE}. On failure, the compile status for shader is set to {@link GL11#GL_FALSE FALSE} and - * additional information about the cause of the failure may be available in the shader compilation log.

    - * - * @param shader the name of a shader object containing unspecialized SPIR-V as created from a successful call to {@link GL41C#glShaderBinary ShaderBinary} to which a SPIR-V module was - * passed - * @param pEntryPoint a pointer to a null-terminated UTF-8 string specifying the name of the entry point in the SPIR-V module to use for this shader - * @param pConstantIndex is a pointer to an array of {@code numSpecializationConstants} unsigned integers, each holding the index of a specialization constant in the SPIR-V - * module whose value to set. - * - *

    Specialization constants not referenced by {@code pConstantIndex} retain their default values as specified in the SPIR-V module.

    - * @param pConstantValue an entry in {@code pConstantValue} is used to set the value of the specialization constant indexed by the corresponding entry in - * {@code pConstantIndex}. - * - *

    Although this array is of unsigned integer, each entry is bitcast to the appropriate type for the module, and therefore, floating-point constants - * may be set by including their IEEE-754 bit representation in the {@code pConstantValue} array.

    - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") ByteBuffer pEntryPoint, @Nullable @NativeType("GLuint const *") IntBuffer pConstantIndex, @Nullable @NativeType("GLuint const *") IntBuffer pConstantValue) { - if (CHECKS) { - checkNT1(pEntryPoint); - checkSafe(pConstantValue, remainingSafe(pConstantIndex)); - } - nglSpecializeShader(shader, memAddress(pEntryPoint), remainingSafe(pConstantIndex), memAddressSafe(pConstantIndex), memAddressSafe(pConstantValue)); - } - - /** - * Specializes a shader created from a SPIR-V module. - * - *

    Shaders associated with SPIR-V modules must be specialized before they can be linked into a program object. It is not necessary to specialize the - * shader before it is attached to a program object. Once specialized, a shader may not be specialized again without first re-associating the original - * SPIR-V module with it, through {@link GL41C#glShaderBinary ShaderBinary}.

    - * - *

    Specialization does two things:

    - * - *
      - *
    • Selects the name of the entry point, for that shader’s stage, from the SPIR-V module.
    • - *
    • Sets the values of all, or a subset of, the specialization constants in the SPIRV module.
    • - *
    - * - *

    On successful shader specialization, the compile status for shader is set to {@link GL11#GL_TRUE TRUE}. On failure, the compile status for shader is set to {@link GL11#GL_FALSE FALSE} and - * additional information about the cause of the failure may be available in the shader compilation log.

    - * - * @param shader the name of a shader object containing unspecialized SPIR-V as created from a successful call to {@link GL41C#glShaderBinary ShaderBinary} to which a SPIR-V module was - * passed - * @param pEntryPoint a pointer to a null-terminated UTF-8 string specifying the name of the entry point in the SPIR-V module to use for this shader - * @param pConstantIndex is a pointer to an array of {@code numSpecializationConstants} unsigned integers, each holding the index of a specialization constant in the SPIR-V - * module whose value to set. - * - *

    Specialization constants not referenced by {@code pConstantIndex} retain their default values as specified in the SPIR-V module.

    - * @param pConstantValue an entry in {@code pConstantValue} is used to set the value of the specialization constant indexed by the corresponding entry in - * {@code pConstantIndex}. - * - *

    Although this array is of unsigned integer, each entry is bitcast to the appropriate type for the module, and therefore, floating-point constants - * may be set by including their IEEE-754 bit representation in the {@code pConstantValue} array.

    - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") CharSequence pEntryPoint, @Nullable @NativeType("GLuint const *") IntBuffer pConstantIndex, @Nullable @NativeType("GLuint const *") IntBuffer pConstantValue) { - if (CHECKS) { - checkSafe(pConstantValue, remainingSafe(pConstantIndex)); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pEntryPoint, true); - long pEntryPointEncoded = stack.getPointerAddress(); - nglSpecializeShader(shader, pEntryPointEncoded, remainingSafe(pConstantIndex), memAddressSafe(pConstantIndex), memAddressSafe(pConstantValue)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Array version of: {@link #glMultiDrawArraysIndirectCount MultiDrawArraysIndirectCount} - * - * @see Reference Page - */ - public static void glMultiDrawArraysIndirectCount(@NativeType("GLenum") int mode, @NativeType("void const *") int[] indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - long __functionAddress = GL.getICD().glMultiDrawArraysIndirectCount; - if (CHECKS) { - check(__functionAddress); - check(indirect, (maxdrawcount * (stride == 0 ? (4 * 4) : stride)) >> 2); - } - callPPV(mode, indirect, drawcount, maxdrawcount, stride, __functionAddress); - } - - /** - * Array version of: {@link #glMultiDrawElementsIndirectCount MultiDrawElementsIndirectCount} - * - * @see Reference Page - */ - public static void glMultiDrawElementsIndirectCount(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") int[] indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride) { - long __functionAddress = GL.getICD().glMultiDrawElementsIndirectCount; - if (CHECKS) { - check(__functionAddress); - check(indirect, (maxdrawcount * (stride == 0 ? (5 * 4) : stride)) >> 2); - } - callPPV(mode, type, indirect, drawcount, maxdrawcount, stride, __functionAddress); - } - - /** - * Array version of: {@link #glSpecializeShader SpecializeShader} - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") ByteBuffer pEntryPoint, @Nullable @NativeType("GLuint const *") int[] pConstantIndex, @Nullable @NativeType("GLuint const *") int[] pConstantValue) { - long __functionAddress = GL.getICD().glSpecializeShader; - if (CHECKS) { - check(__functionAddress); - checkNT1(pEntryPoint); - checkSafe(pConstantValue, lengthSafe(pConstantIndex)); - } - callPPPV(shader, memAddress(pEntryPoint), lengthSafe(pConstantIndex), pConstantIndex, pConstantValue, __functionAddress); - } - - /** - * Array version of: {@link #glSpecializeShader SpecializeShader} - * - * @see Reference Page - */ - public static void glSpecializeShader(@NativeType("GLuint") int shader, @NativeType("GLchar const *") CharSequence pEntryPoint, @Nullable @NativeType("GLuint const *") int[] pConstantIndex, @Nullable @NativeType("GLuint const *") int[] pConstantValue) { - long __functionAddress = GL.getICD().glSpecializeShader; - if (CHECKS) { - check(__functionAddress); - checkSafe(pConstantValue, lengthSafe(pConstantIndex)); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pEntryPoint, true); - long pEntryPointEncoded = stack.getPointerAddress(); - callPPPV(shader, pEntryPointEncoded, lengthSafe(pConstantIndex), pConstantIndex, pConstantValue, __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLChecks.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLChecks.java deleted file mode 100644 index 91cac0f6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLChecks.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.opengl; - -import static org.lwjgl.opengl.GL41.*; -import static org.lwjgl.opengl.NVGPUShader5.*; -import static org.lwjgl.system.APIUtil.*; - -final class GLChecks { - - private GLChecks() { - } - - /** - * Returns the number of bytes required to store the specified OpenGL type. - * - * @param type the OpenGL type to translate - * - * @return the number of bytes - */ - static int typeToBytes(int type) { - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return 1; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_2_BYTES: - case GL_HALF_FLOAT: - return 2; - case GL_3_BYTES: - return 3; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_4_BYTES: - case GL_FIXED: - return 4; - case GL_DOUBLE: - case GL_INT64_NV: - case GL_UNSIGNED_INT64_NV: - return 8; - default: - throw new IllegalArgumentException(apiUnknownToken("Unsupported OpenGL type", type)); - } - } - - /** - * Returns the power-of-two of the number of bytes required to store the specified OpenGL type. - * - * @param type the OpenGL type to translate - * - * @return the number of bytes PoT value - */ - static int typeToByteShift(int type) { - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return 0; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_2_BYTES: - case GL_HALF_FLOAT: - return 1; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_4_BYTES: - case GL_FIXED: - return 2; - case GL_DOUBLE: - case GL_INT64_NV: - case GL_UNSIGNED_INT64_NV: - return 3; - default: - throw new IllegalArgumentException(apiUnknownToken("Unsupported OpenGL type", type)); - } - } - - /** - * Queries the specified parameter of the specified texture object level. If direct-state-access functionality is not available, the texture must be - * currently bound to the specified texture target. - * - * @param texture the texture object - * @param target the texture target - * @param level the texture level - * @param pname the parameter to query - * - * @return the parameter value - */ - static int getTexLevelParameteri(int texture, int target, int level, int pname) { - GLCapabilities caps = GL.getCapabilities(); - - if (caps.OpenGL45) { - return GL45.glGetTextureLevelParameteri(texture, level, pname); - } - if (caps.GL_ARB_direct_state_access) { - return ARBDirectStateAccess.glGetTextureLevelParameteri(texture, level, pname); - } - if (caps.GL_EXT_direct_state_access) { - return EXTDirectStateAccess.glGetTextureLevelParameteriEXT(texture, target, level, pname); - } - - return glGetTexLevelParameteri(target, level, pname); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLContext.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLContext.java deleted file mode 100644 index abcb5615..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLContext.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.opengl; - -public class GLContext { - - private static ThreadLocal contextCapabilities = new ThreadLocal<>(); - - public static GLContext createFromCurrent() { - return new GLContext(); - } - public static void initCapabilities() { - if(contextCapabilities.get() == null) { - System.out.println("LWJGL: GL caps init"); - contextCapabilities.set(new ContextCapabilities()); - } - } - public static ContextCapabilities getCapabilities() { - return contextCapabilities.get(); - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageAMDCallback.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageAMDCallback.java deleted file mode 100644 index 59c5cc02..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageAMDCallback.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be passed to the {@link AMDDebugOutput#glDebugMessageCallbackAMD DebugMessageCallbackAMD} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLuint id,
    - *     GLenum category,
    - *     GLenum severity,
    - *     GLsizei length,
    - *     GLchar const *message,
    - *     void *userParam
    - * )
    - */ -public abstract class GLDebugMessageAMDCallback extends Callback implements GLDebugMessageAMDCallbackI { - - /** - * Creates a {@code GLDebugMessageAMDCallback} instance from the specified function pointer. - * - * @return the new {@code GLDebugMessageAMDCallback} - */ - public static GLDebugMessageAMDCallback create(long functionPointer) { - GLDebugMessageAMDCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLDebugMessageAMDCallback - ? (GLDebugMessageAMDCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLDebugMessageAMDCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLDebugMessageAMDCallback} instance that delegates to the specified {@code GLDebugMessageAMDCallbackI} instance. */ - public static GLDebugMessageAMDCallback create(GLDebugMessageAMDCallbackI instance) { - return instance instanceof GLDebugMessageAMDCallback - ? (GLDebugMessageAMDCallback)instance - : new Container(instance.address(), instance); - } - - protected GLDebugMessageAMDCallback() { - super(CIF); - } - - GLDebugMessageAMDCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Converts the specified {@link GLDebugMessageAMDCallback} arguments to a String. - * - *

    This method may only be used inside a GLDebugMessageAMDCallback invocation.

    - * - * @param length the GLDebugMessageAMDCallback {@code length} argument - * @param message the GLDebugMessageAMDCallback {@code message} argument - * - * @return the message as a String - */ - public static String getMessage(int length, long message) { - return memUTF8(memByteBuffer(message, length)); - } - - private static final class Container extends GLDebugMessageAMDCallback { - - private final GLDebugMessageAMDCallbackI delegate; - - Container(long functionPointer, GLDebugMessageAMDCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int id, int category, int severity, int length, long message, long userParam) { - delegate.invoke(id, category, severity, length, message, userParam); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageAMDCallbackI.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageAMDCallbackI.java deleted file mode 100644 index 8319823a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageAMDCallbackI.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link AMDDebugOutput#glDebugMessageCallbackAMD DebugMessageCallbackAMD} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLuint id,
    - *     GLenum category,
    - *     GLenum severity,
    - *     GLsizei length,
    - *     GLchar const *message,
    - *     void *userParam
    - * )
    - */ -@FunctionalInterface -@NativeType("GLDEBUGPROCAMD") -public interface GLDebugMessageAMDCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - apiStdcall(), - ffi_type_void, - ffi_type_uint32, ffi_type_uint32, ffi_type_uint32, ffi_type_sint32, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 5 * POINTER_SIZE)) - ); - } - - /** - * Will be called when a debug message is generated. - * - * @param id the message ID - * @param category the message category - * @param severity the message severity - * @param length the message length, excluding the null-terminator - * @param message a pointer to the message string representation - * @param userParam the user-specified value that was passed when calling {@link AMDDebugOutput#glDebugMessageCallbackAMD DebugMessageCallbackAMD} - */ - void invoke(@NativeType("GLuint") int id, @NativeType("GLenum") int category, @NativeType("GLenum") int severity, @NativeType("GLsizei") int length, @NativeType("GLchar const *") long message, @NativeType("void *") long userParam); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageARBCallback.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageARBCallback.java deleted file mode 100644 index 13e28546..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageARBCallback.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be passed to the {@link ARBDebugOutput#glDebugMessageCallbackARB DebugMessageCallbackARB} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLenum source,
    - *     GLenum type,
    - *     GLuint id,
    - *     GLenum severity,
    - *     GLsizei length,
    - *     GLchar const *message,
    - *     void const *userParam
    - * )
    - */ -public abstract class GLDebugMessageARBCallback extends Callback implements GLDebugMessageARBCallbackI { - - /** - * Creates a {@code GLDebugMessageARBCallback} instance from the specified function pointer. - * - * @return the new {@code GLDebugMessageARBCallback} - */ - public static GLDebugMessageARBCallback create(long functionPointer) { - GLDebugMessageARBCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLDebugMessageARBCallback - ? (GLDebugMessageARBCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLDebugMessageARBCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLDebugMessageARBCallback} instance that delegates to the specified {@code GLDebugMessageARBCallbackI} instance. */ - public static GLDebugMessageARBCallback create(GLDebugMessageARBCallbackI instance) { - return instance instanceof GLDebugMessageARBCallback - ? (GLDebugMessageARBCallback)instance - : new Container(instance.address(), instance); - } - - protected GLDebugMessageARBCallback() { - super(CIF); - } - - GLDebugMessageARBCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Converts the specified {@link GLDebugMessageARBCallback} arguments to a String. - * - *

    This method may only be used inside a GLDebugMessageARBCallback invocation.

    - * - * @param length the GLDebugMessageARBCallback {@code length} argument - * @param message the GLDebugMessageARBCallback {@code message} argument - * - * @return the message as a String - */ - public static String getMessage(int length, long message) { - return memUTF8(memByteBuffer(message, length)); - } - - private static final class Container extends GLDebugMessageARBCallback { - - private final GLDebugMessageARBCallbackI delegate; - - Container(long functionPointer, GLDebugMessageARBCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int source, int type, int id, int severity, int length, long message, long userParam) { - delegate.invoke(source, type, id, severity, length, message, userParam); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageARBCallbackI.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageARBCallbackI.java deleted file mode 100644 index b19e2f77..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageARBCallbackI.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link ARBDebugOutput#glDebugMessageCallbackARB DebugMessageCallbackARB} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLenum source,
    - *     GLenum type,
    - *     GLuint id,
    - *     GLenum severity,
    - *     GLsizei length,
    - *     GLchar const *message,
    - *     void const *userParam
    - * )
    - */ -@FunctionalInterface -@NativeType("GLDEBUGPROCARB") -public interface GLDebugMessageARBCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - apiStdcall(), - ffi_type_void, - ffi_type_uint32, ffi_type_uint32, ffi_type_uint32, ffi_type_uint32, ffi_type_sint32, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 3 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 4 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 5 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 6 * POINTER_SIZE)) - ); - } - - /** - * Will be called when a debug message is generated. - * - * @param source the message source - * @param type the message type - * @param id the message ID - * @param severity the message severity - * @param length the message length, excluding the null-terminator - * @param message a pointer to the message string representation - * @param userParam the user-specified value that was passed when calling {@link ARBDebugOutput#glDebugMessageCallbackARB DebugMessageCallbackARB} - */ - void invoke(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLsizei") int length, @NativeType("GLchar const *") long message, @NativeType("void const *") long userParam); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageCallback.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageCallback.java deleted file mode 100644 index 79eb6aff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageCallback.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be passed to the {@link GL43#glDebugMessageCallback} and {@link KHRDebug#glDebugMessageCallback} methods. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLenum source,
    - *     GLenum type,
    - *     GLuint id,
    - *     GLenum severity,
    - *     GLsizei length,
    - *     GLchar const *message,
    - *     void const *userParam
    - * )
    - */ -public abstract class GLDebugMessageCallback extends Callback implements GLDebugMessageCallbackI { - - /** - * Creates a {@code GLDebugMessageCallback} instance from the specified function pointer. - * - * @return the new {@code GLDebugMessageCallback} - */ - public static GLDebugMessageCallback create(long functionPointer) { - GLDebugMessageCallbackI instance = Callback.get(functionPointer); - return instance instanceof GLDebugMessageCallback - ? (GLDebugMessageCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static GLDebugMessageCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code GLDebugMessageCallback} instance that delegates to the specified {@code GLDebugMessageCallbackI} instance. */ - public static GLDebugMessageCallback create(GLDebugMessageCallbackI instance) { - return instance instanceof GLDebugMessageCallback - ? (GLDebugMessageCallback)instance - : new Container(instance.address(), instance); - } - - protected GLDebugMessageCallback() { - super(CIF); - } - - GLDebugMessageCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Converts the specified {@link GLDebugMessageCallback} arguments to a String. - * - *

    This method may only be used inside a GLDebugMessageCallback invocation.

    - * - * @param length the GLDebugMessageCallback {@code length} argument - * @param message the GLDebugMessageCallback {@code message} argument - * - * @return the message as a String - */ - public static String getMessage(int length, long message) { - return memUTF8(memByteBuffer(message, length)); - } - - private static final class Container extends GLDebugMessageCallback { - - private final GLDebugMessageCallbackI delegate; - - Container(long functionPointer, GLDebugMessageCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int source, int type, int id, int severity, int length, long message, long userParam) { - delegate.invoke(source, type, id, severity, length, message, userParam); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageCallbackI.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageCallbackI.java deleted file mode 100644 index c62a759f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLDebugMessageCallbackI.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link GL43#glDebugMessageCallback} and {@link KHRDebug#glDebugMessageCallback} methods. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     GLenum source,
    - *     GLenum type,
    - *     GLuint id,
    - *     GLenum severity,
    - *     GLsizei length,
    - *     GLchar const *message,
    - *     void const *userParam
    - * )
    - */ -@FunctionalInterface -@NativeType("GLDEBUGPROC") -public interface GLDebugMessageCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - apiStdcall(), - ffi_type_void, - ffi_type_uint32, ffi_type_uint32, ffi_type_uint32, ffi_type_uint32, ffi_type_sint32, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 3 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 4 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 5 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 6 * POINTER_SIZE)) - ); - } - - /** - * Will be called when a debug message is generated. - * - * @param source the message source - * @param type the message type - * @param id the message ID - * @param severity the message severity - * @param length the message length, excluding the null-terminator - * @param message a pointer to the message string representation - * @param userParam the user-specified value that was passed when calling {@link GL43#glDebugMessageCallback} or {@link KHRDebug#glDebugMessageCallback} - */ - void invoke(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLsizei") int length, @NativeType("GLchar const *") long message, @NativeType("void const *") long userParam); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLSync.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLSync.java deleted file mode 100644 index f9166b09..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLSync.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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.opengl; - -import org.lwjgl.PointerWrapperAbstract; - -/** - * This class is a wrapper around a GLsync pointer. - * - * @author spasi - */ -public final class GLSync extends PointerWrapperAbstract { - - GLSync(final long sync) { - super(sync); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLUtil.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLUtil.java deleted file mode 100644 index cf9f07c7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLUtil.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.io.*; - -import static org.lwjgl.opengl.AMDDebugOutput.*; -import static org.lwjgl.opengl.ARBDebugOutput.*; -import static org.lwjgl.opengl.GL43C.*; -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** OpenGL utilities. */ -public final class GLUtil { - - private GLUtil() { - } - - /** - * Detects the best debug output functionality to use and creates a callback that prints information to {@link APIUtil#DEBUG_STREAM}. The callback - * function is returned as a {@link Callback}, that should be {@link Callback#free freed} when no longer needed. - */ - @Nullable - public static Callback setupDebugMessageCallback() { - return setupDebugMessageCallback(APIUtil.DEBUG_STREAM); - } - - /** - * Detects the best debug output functionality to use and creates a callback that prints information to the specified {@link PrintStream}. The callback - * function is returned as a {@link Callback}, that should be {@link Callback#free freed} when no longer needed. - * - * @param stream the output {@link PrintStream} - */ - @Nullable - public static Callback setupDebugMessageCallback(PrintStream stream) { - GLCapabilities caps = GL.getCapabilities(); - - if (caps.OpenGL43) { - apiLog("[GL] Using OpenGL 4.3 for error logging."); - GLDebugMessageCallback proc = GLDebugMessageCallback.create((source, type, id, severity, length, message, userParam) -> { - StringBuilder sb = new StringBuilder(300); - - sb.append("[LWJGL] OpenGL debug message\n"); - printDetail(sb, "ID", "0x" + Integer.toHexString(id).toUpperCase()); - printDetail(sb, "Source", getDebugSource(source)); - printDetail(sb, "Type", getDebugType(type)); - printDetail(sb, "Severity", getDebugSeverity(severity)); - printDetail(sb, "Message", GLDebugMessageCallback.getMessage(length, message)); - - stream.print(sb); - }); - glDebugMessageCallback(proc, NULL); - if ((glGetInteger(GL_CONTEXT_FLAGS) & GL_CONTEXT_FLAG_DEBUG_BIT) == 0) { - apiLog("[GL] Warning: A non-debug context may not produce any debug output."); - glEnable(GL_DEBUG_OUTPUT); - } - return proc; - } - - if (caps.GL_KHR_debug) { - apiLog("[GL] Using KHR_debug for error logging."); - GLDebugMessageCallback proc = GLDebugMessageCallback.create((source, type, id, severity, length, message, userParam) -> { - StringBuilder sb = new StringBuilder(300); - - sb.append("[LWJGL] OpenGL debug message\n"); - printDetail(sb, "ID", "0x" + Integer.toHexString(id).toUpperCase()); - printDetail(sb, "Source", getDebugSource(source)); - printDetail(sb, "Type", getDebugType(type)); - printDetail(sb, "Severity", getDebugSeverity(severity)); - printDetail(sb, "Message", GLDebugMessageCallback.getMessage(length, message)); - - stream.print(sb); - }); - KHRDebug.glDebugMessageCallback(proc, NULL); - if (caps.OpenGL30 && (glGetInteger(GL_CONTEXT_FLAGS) & GL_CONTEXT_FLAG_DEBUG_BIT) == 0) { - apiLog("[GL] Warning: A non-debug context may not produce any debug output."); - glEnable(GL_DEBUG_OUTPUT); - } - return proc; - } - - if (caps.GL_ARB_debug_output) { - apiLog("[GL] Using ARB_debug_output for error logging."); - GLDebugMessageARBCallback proc = GLDebugMessageARBCallback.create((source, type, id, severity, length, message, userParam) -> { - StringBuilder sb = new StringBuilder(300); - - sb.append("[LWJGL] ARB_debug_output message\n"); - printDetail(sb, "ID", "0x" + Integer.toHexString(id).toUpperCase()); - printDetail(sb, "Source", getSourceARB(source)); - printDetail(sb, "Type", getTypeARB(type)); - printDetail(sb, "Severity", getSeverityARB(severity)); - printDetail(sb, "Message", GLDebugMessageARBCallback.getMessage(length, message)); - - stream.print(sb); - }); - glDebugMessageCallbackARB(proc, NULL); - return proc; - } - - if (caps.GL_AMD_debug_output) { - apiLog("[GL] Using AMD_debug_output for error logging."); - GLDebugMessageAMDCallback proc = GLDebugMessageAMDCallback.create((id, category, severity, length, message, userParam) -> { - StringBuilder sb = new StringBuilder(300); - - sb.append("[LWJGL] AMD_debug_output message\n"); - printDetail(sb, "ID", "0x" + Integer.toHexString(id).toUpperCase()); - printDetail(sb, "Category", getCategoryAMD(category)); - printDetail(sb, "Severity", getSeverityAMD(severity)); - printDetail(sb, "Message", GLDebugMessageAMDCallback.getMessage(length, message)); - - stream.print(sb); - }); - glDebugMessageCallbackAMD(proc, NULL); - return proc; - } - - apiLog("[GL] No debug output implementation is available."); - return null; - } - - private static void printDetail(StringBuilder sb, String type, String message) { - sb - .append("\t") - .append(type) - .append(": ") - .append(message) - .append("\n"); - } - - private static String getDebugSource(int source) { - switch (source) { - case GL_DEBUG_SOURCE_API: - return "API"; - case GL_DEBUG_SOURCE_WINDOW_SYSTEM: - return "WINDOW SYSTEM"; - case GL_DEBUG_SOURCE_SHADER_COMPILER: - return "SHADER COMPILER"; - case GL_DEBUG_SOURCE_THIRD_PARTY: - return "THIRD PARTY"; - case GL_DEBUG_SOURCE_APPLICATION: - return "APPLICATION"; - case GL_DEBUG_SOURCE_OTHER: - return "OTHER"; - default: - return apiUnknownToken(source); - } - } - - private static String getDebugType(int type) { - switch (type) { - case GL_DEBUG_TYPE_ERROR: - return "ERROR"; - case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: - return "DEPRECATED BEHAVIOR"; - case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: - return "UNDEFINED BEHAVIOR"; - case GL_DEBUG_TYPE_PORTABILITY: - return "PORTABILITY"; - case GL_DEBUG_TYPE_PERFORMANCE: - return "PERFORMANCE"; - case GL_DEBUG_TYPE_OTHER: - return "OTHER"; - case GL_DEBUG_TYPE_MARKER: - return "MARKER"; - default: - return apiUnknownToken(type); - } - } - - private static String getDebugSeverity(int severity) { - switch (severity) { - case GL_DEBUG_SEVERITY_HIGH: - return "HIGH"; - case GL_DEBUG_SEVERITY_MEDIUM: - return "MEDIUM"; - case GL_DEBUG_SEVERITY_LOW: - return "LOW"; - case GL_DEBUG_SEVERITY_NOTIFICATION: - return "NOTIFICATION"; - default: - return apiUnknownToken(severity); - } - } - - private static String getSourceARB(int source) { - switch (source) { - case GL_DEBUG_SOURCE_API_ARB: - return "API"; - case GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB: - return "WINDOW SYSTEM"; - case GL_DEBUG_SOURCE_SHADER_COMPILER_ARB: - return "SHADER COMPILER"; - case GL_DEBUG_SOURCE_THIRD_PARTY_ARB: - return "THIRD PARTY"; - case GL_DEBUG_SOURCE_APPLICATION_ARB: - return "APPLICATION"; - case GL_DEBUG_SOURCE_OTHER_ARB: - return "OTHER"; - default: - return apiUnknownToken(source); - } - } - - private static String getTypeARB(int type) { - switch (type) { - case GL_DEBUG_TYPE_ERROR_ARB: - return "ERROR"; - case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB: - return "DEPRECATED BEHAVIOR"; - case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB: - return "UNDEFINED BEHAVIOR"; - case GL_DEBUG_TYPE_PORTABILITY_ARB: - return "PORTABILITY"; - case GL_DEBUG_TYPE_PERFORMANCE_ARB: - return "PERFORMANCE"; - case GL_DEBUG_TYPE_OTHER_ARB: - return "OTHER"; - default: - return apiUnknownToken(type); - } - } - - private static String getSeverityARB(int severity) { - switch (severity) { - case GL_DEBUG_SEVERITY_HIGH_ARB: - return "HIGH"; - case GL_DEBUG_SEVERITY_MEDIUM_ARB: - return "MEDIUM"; - case GL_DEBUG_SEVERITY_LOW_ARB: - return "LOW"; - default: - return apiUnknownToken(severity); - } - } - - private static String getCategoryAMD(int category) { - switch (category) { - case GL_DEBUG_CATEGORY_API_ERROR_AMD: - return "API ERROR"; - case GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD: - return "WINDOW SYSTEM"; - case GL_DEBUG_CATEGORY_DEPRECATION_AMD: - return "DEPRECATION"; - case GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD: - return "UNDEFINED BEHAVIOR"; - case GL_DEBUG_CATEGORY_PERFORMANCE_AMD: - return "PERFORMANCE"; - case GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD: - return "SHADER COMPILER"; - case GL_DEBUG_CATEGORY_APPLICATION_AMD: - return "APPLICATION"; - case GL_DEBUG_CATEGORY_OTHER_AMD: - return "OTHER"; - default: - return apiUnknownToken(category); - } - } - - private static String getSeverityAMD(int severity) { - switch (severity) { - case GL_DEBUG_SEVERITY_HIGH_AMD: - return "HIGH"; - case GL_DEBUG_SEVERITY_MEDIUM_AMD: - return "MEDIUM"; - case GL_DEBUG_SEVERITY_LOW_AMD: - return "LOW"; - default: - return apiUnknownToken(severity); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLX.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLX.java deleted file mode 100644 index 26761e9e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLX.java +++ /dev/null @@ -1,483 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -import org.lwjgl.system.linux.*; - -/** Native bindings to GLX. */ -public class GLX { - - /** Contains the function pointers loaded from {@code GL.getFunctionProvider()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - QueryExtension = apiGetFunctionAddress(GL.getFunctionProvider(), "glXQueryExtension"), - QueryVersion = apiGetFunctionAddress(GL.getFunctionProvider(), "glXQueryVersion"), - GetConfig = apiGetFunctionAddress(GL.getFunctionProvider(), "glXGetConfig"), - ChooseVisual = apiGetFunctionAddress(GL.getFunctionProvider(), "glXChooseVisual"), - CreateContext = apiGetFunctionAddress(GL.getFunctionProvider(), "glXCreateContext"), - MakeCurrent = apiGetFunctionAddress(GL.getFunctionProvider(), "glXMakeCurrent"), - CopyContext = apiGetFunctionAddress(GL.getFunctionProvider(), "glXCopyContext"), - IsDirect = apiGetFunctionAddress(GL.getFunctionProvider(), "glXIsDirect"), - DestroyContext = apiGetFunctionAddress(GL.getFunctionProvider(), "glXDestroyContext"), - GetCurrentContext = apiGetFunctionAddress(GL.getFunctionProvider(), "glXGetCurrentContext"), - GetCurrentDrawable = apiGetFunctionAddress(GL.getFunctionProvider(), "glXGetCurrentDrawable"), - WaitGL = apiGetFunctionAddress(GL.getFunctionProvider(), "glXWaitGL"), - WaitX = apiGetFunctionAddress(GL.getFunctionProvider(), "glXWaitX"), - SwapBuffers = apiGetFunctionAddress(GL.getFunctionProvider(), "glXSwapBuffers"), - UseXFont = apiGetFunctionAddress(GL.getFunctionProvider(), "glXUseXFont"), - CreateGLXPixmap = apiGetFunctionAddress(GL.getFunctionProvider(), "glXCreateGLXPixmap"), - DestroyGLXPixmap = apiGetFunctionAddress(GL.getFunctionProvider(), "glXDestroyGLXPixmap"); - - } - - /** Errors. */ - public static final int - GLXBadContext = 0, - GLXBadContextState = 1, - GLXBadDrawable = 2, - GLXBadPixmap = 3, - GLXBadContextTag = 4, - GLXBadCurrentWindow = 5, - GLXBadRenderRequest = 6, - GLXBadLargeRequest = 7, - GLXUnsupportedPrivateRequest = 8, - GLXBadFBConfig = 9, - GLXBadPbuffer = 10, - GLXBadCurrentDrawable = 11, - GLXBadWindow = 12; - - /** Names for attributes to {@link #glXGetConfig GetConfig}. */ - public static final int - GLX_USE_GL = 1, - GLX_BUFFER_SIZE = 2, - GLX_LEVEL = 3, - GLX_RGBA = 4, - GLX_DOUBLEBUFFER = 5, - GLX_STEREO = 6, - GLX_AUX_BUFFERS = 7, - GLX_RED_SIZE = 8, - GLX_GREEN_SIZE = 9, - GLX_BLUE_SIZE = 10, - GLX_ALPHA_SIZE = 11, - GLX_DEPTH_SIZE = 12, - GLX_STENCIL_SIZE = 13, - GLX_ACCUM_RED_SIZE = 14, - GLX_ACCUM_GREEN_SIZE = 15, - GLX_ACCUM_BLUE_SIZE = 16, - GLX_ACCUM_ALPHA_SIZE = 17; - - /** Error return values from {@link #glXGetConfig GetConfig}. Success is indicated by a value of 0. */ - public static final int - GLX_BAD_SCREEN = 1, - GLX_BAD_ATTRIBUTE = 2, - GLX_NO_EXTENSION = 3, - GLX_BAD_VISUAL = 4, - GLX_BAD_CONTEXT = 5, - GLX_BAD_VALUE = 6, - GLX_BAD_ENUM = 7; - - protected GLX() { - throw new UnsupportedOperationException(); - } - - // --- [ glXQueryExtension ] --- - - /** Unsafe version of: {@link #glXQueryExtension QueryExtension} */ - public static int nglXQueryExtension(long display, long error_base, long event_base) { - long __functionAddress = Functions.QueryExtension; - if (CHECKS) { - check(display); - } - return callPPPI(display, error_base, event_base, __functionAddress); - } - - /** - * Ascertains if the GLX extension is defined for an X server. - * - * @param display the connection to the X server - * @param error_base returns the value of the first error code - * @param event_base returns the value of the first event code - */ - @NativeType("Bool") - public static boolean glXQueryExtension(@NativeType("Display *") long display, @NativeType("int *") IntBuffer error_base, @NativeType("int *") IntBuffer event_base) { - if (CHECKS) { - check(error_base, 1); - check(event_base, 1); - } - return nglXQueryExtension(display, memAddress(error_base), memAddress(event_base)) != 0; - } - - // --- [ glXQueryVersion ] --- - - /** Unsafe version of: {@link #glXQueryVersion QueryVersion} */ - public static int nglXQueryVersion(long display, long major, long minor) { - long __functionAddress = Functions.QueryVersion; - if (CHECKS) { - check(display); - } - return callPPPI(display, major, minor, __functionAddress); - } - - /** - * Queries the GLX version supported. - * - * @param display the connection to the X server - * @param major returns the major version - * @param minor returns the minor version - */ - @NativeType("Bool") - public static boolean glXQueryVersion(@NativeType("Display *") long display, @NativeType("int *") IntBuffer major, @NativeType("int *") IntBuffer minor) { - if (CHECKS) { - check(major, 1); - check(minor, 1); - } - return nglXQueryVersion(display, memAddress(major), memAddress(minor)) != 0; - } - - // --- [ glXGetConfig ] --- - - /** Unsafe version of: {@link #glXGetConfig GetConfig} */ - public static int nglXGetConfig(long display, long visual, int attribute, long value) { - long __functionAddress = Functions.GetConfig; - if (CHECKS) { - check(display); - XVisualInfo.validate(visual); - } - return callPPPI(display, visual, attribute, value, __functionAddress); - } - - /** - * Returns a description of an OpenGL attribute exported by a Visual. - * - * @param display the connection to the X server - * @param visual a pointer to an {@link XVisualInfo} structure - * @param attribute the attribute to query - * @param value returns the attribute value - */ - public static int glXGetConfig(@NativeType("Display *") long display, @NativeType("XVisualInfo *") XVisualInfo visual, int attribute, @NativeType("int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nglXGetConfig(display, visual.address(), attribute, memAddress(value)); - } - - // --- [ glXChooseVisual ] --- - - /** Unsafe version of: {@link #glXChooseVisual ChooseVisual} */ - public static long nglXChooseVisual(long display, int screen, long attrib_list) { - long __functionAddress = Functions.ChooseVisual; - if (CHECKS) { - check(display); - } - return callPPP(display, screen, attrib_list, __functionAddress); - } - - /** - * Finds a visual that matches the client’s specified attributes. - * - * @param display the connection to the X server - * @param screen the screen number - * @param attrib_list a list of attributes terminated with {@code None} - * - * @return a pointer to an {@code XVisualInfo} structure describing the visual that best matches the specified attributes. If no matching visual exists, {@code NULL} is - * returned. - */ - @Nullable - @NativeType("XVisualInfo *") - public static XVisualInfo glXChooseVisual(@NativeType("Display *") long display, int screen, @Nullable @NativeType("int *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - long __result = nglXChooseVisual(display, screen, memAddressSafe(attrib_list)); - return XVisualInfo.createSafe(__result); - } - - // --- [ glXCreateContext ] --- - - /** Unsafe version of: {@link #glXCreateContext CreateContext} */ - public static long nglXCreateContext(long display, long visual, long share_list, int direct) { - long __functionAddress = Functions.CreateContext; - if (CHECKS) { - check(display); - XVisualInfo.validate(visual); - } - return callPPPP(display, visual, share_list, direct, __functionAddress); - } - - /** - * Creates an OpenGL context. - * - * @param display the connection to the X server - * @param visual a pointer to an {@link XVisualInfo} structure - * @param share_list the GLXContext to share objects with - * @param direct whether direct rendering is requested - */ - @NativeType("GLXContext") - public static long glXCreateContext(@NativeType("Display *") long display, @NativeType("XVisualInfo *") XVisualInfo visual, @NativeType("GLXContext") long share_list, @NativeType("Bool") boolean direct) { - return nglXCreateContext(display, visual.address(), share_list, direct ? 1 : 0); - } - - // --- [ glXMakeCurrent ] --- - - /** - * Makes a context current in the current thread - * - * @param display the connection to the X server - * @param draw the draw GLXdrawable - * @param ctx the GLXContext to make current - */ - @NativeType("Bool") - public static boolean glXMakeCurrent(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, @NativeType("GLXContext") long ctx) { - long __functionAddress = Functions.MakeCurrent; - if (CHECKS) { - check(display); - } - return callPPPI(display, draw, ctx, __functionAddress) != 0; - } - - // --- [ glXCopyContext ] --- - - /** - * Copies OpenGL rendering state from one context to another. - * - * @param display the connection to the X server - * @param source the source GLXContext - * @param dest the destination GLXContext - * @param mask indicates which groups of state variables are to be copied; it contains the bitwise OR of the symbolic names for the attribute groups - */ - public static void glXCopyContext(@NativeType("Display *") long display, @NativeType("GLXContext") long source, @NativeType("GLXContext") long dest, @NativeType("unsigned long") long mask) { - long __functionAddress = Functions.CopyContext; - if (CHECKS) { - check(display); - check(source); - check(dest); - } - callPPPNV(display, source, dest, mask, __functionAddress); - } - - // --- [ glXIsDirect ] --- - - /** - * Determines if an OpenGL rendering context is direct. - * - * @param display the connection to the X server - * @param ctx the GLXContext to query - */ - @NativeType("Bool") - public static boolean glXIsDirect(@NativeType("Display *") long display, @NativeType("GLXContext") long ctx) { - long __functionAddress = Functions.IsDirect; - if (CHECKS) { - check(display); - check(ctx); - } - return callPPI(display, ctx, __functionAddress) != 0; - } - - // --- [ glXDestroyContext ] --- - - /** - * Destroys an OpenGL context. - * - *

    If {@code ctx} is still current to any thread, {@code ctx} is not destroyed until it is no longer current. In any event, the associated XID will be - * destroyed and {@code ctx} cannot subsequently be made current to any thread.

    - * - * @param display the connection to the X server - * @param ctx the GLXContext to destroy - */ - public static void glXDestroyContext(@NativeType("Display *") long display, @NativeType("GLXContext") long ctx) { - long __functionAddress = Functions.DestroyContext; - if (CHECKS) { - check(display); - check(ctx); - } - callPPV(display, ctx, __functionAddress); - } - - // --- [ glXGetCurrentContext ] --- - - /** Returns the GLXContext that is current in the current thread. */ - @NativeType("GLXContext") - public static long glXGetCurrentContext() { - long __functionAddress = Functions.GetCurrentContext; - return callP(__functionAddress); - } - - // --- [ glXGetCurrentDrawable ] --- - - /** Returns the XID of the current drawable used for rendering. */ - @NativeType("GLXDrawable") - public static long glXGetCurrentDrawable() { - long __functionAddress = Functions.GetCurrentDrawable; - return callP(__functionAddress); - } - - // --- [ glXWaitGL ] --- - - /** - * Prevents X requests from executing until any outstanding OpenGL rendering is done. - * - *

    OpenGL calls made prior to {@code glXWaitGL} are guaranteed to be executed before X rendering calls made after {@code glXWaitGL}. While the same result - * can be achieved using {@link GL11C#glFinish Finish}, {@code glXWaitGL} does not require a round trip to the server, and is therefore more efficient in cases - * where the client and server are on separate machines.

    - */ - public static void glXWaitGL() { - long __functionAddress = Functions.WaitGL; - callV(__functionAddress); - } - - // --- [ glXWaitX ] --- - - /** - * Prevents the OpenGL command sequence from executing until any outstanding X requests are completed. - * - *

    X rendering calls made prior to {@code glXWaitX} are guaranteed to be executed before OpenGL rendering calls made after {@code glXWaitX}. While the same - * result can be achieved using {@code XSync()}, {@code glXWaitX} does not require a round trip to the server, and may therefore be more efficient.

    - */ - public static void glXWaitX() { - long __functionAddress = Functions.WaitX; - callV(__functionAddress); - } - - // --- [ glXSwapBuffers ] --- - - /** - * For drawables that are double buffered, makes the contexts of the back buffer potentially visible (i.e., become the contents of the front buffer). - * - *

    The contents of the back buffer then become undefined. This operation is a no-op if draw was created with a non-double-buffered GLXFBConfig, or if draw - * is a GLXPixmap.

    - * - * @param display the connection to the X server - * @param draw a double buffered GLXDrawable - */ - public static void glXSwapBuffers(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw) { - long __functionAddress = Functions.SwapBuffers; - if (CHECKS) { - check(display); - check(draw); - } - callPPV(display, draw, __functionAddress); - } - - // --- [ glXUseXFont ] --- - - /** - * Provides a shortcut for using X fonts. - * - * @param font the font to use - * @param first the first glyph in the font to use - * @param count the number of display lists to define - * @param list_base the base list number - */ - public static void glXUseXFont(@NativeType("Font") long font, int first, int count, int list_base) { - long __functionAddress = Functions.UseXFont; - callNV(font, first, count, list_base, __functionAddress); - } - - // --- [ glXCreateGLXPixmap ] --- - - /** Unsafe version of: {@link #glXCreateGLXPixmap CreateGLXPixmap} */ - public static long nglXCreateGLXPixmap(long display, long visual, long pixmap) { - long __functionAddress = Functions.CreateGLXPixmap; - if (CHECKS) { - check(display); - XVisualInfo.validate(visual); - } - return callPPNP(display, visual, pixmap, __functionAddress); - } - - /** - * Creates a GLXPixmap from a Pixmap. - * - * @param display the connection to the X server - * @param visual a pointer to a {@link XVisualInfo} structure - * @param pixmap the Pixmap - */ - @NativeType("GLXPixmap") - public static long glXCreateGLXPixmap(@NativeType("Display *") long display, @NativeType("XVisualInfo *") XVisualInfo visual, @NativeType("Pixmap") long pixmap) { - return nglXCreateGLXPixmap(display, visual.address(), pixmap); - } - - // --- [ glXDestroyGLXPixmap ] --- - - /** - * Destroys a GLXPixmap. - * - * @param display the connection to the X server - * @param pixmap the GLXPixmap to destroy. - */ - public static void glXDestroyGLXPixmap(@NativeType("Display *") long display, @NativeType("GLXPixmap") long pixmap) { - long __functionAddress = Functions.DestroyGLXPixmap; - if (CHECKS) { - check(display); - check(pixmap); - } - callPPV(display, pixmap, __functionAddress); - } - - /** Array version of: {@link #glXQueryExtension QueryExtension} */ - @NativeType("Bool") - public static boolean glXQueryExtension(@NativeType("Display *") long display, @NativeType("int *") int[] error_base, @NativeType("int *") int[] event_base) { - long __functionAddress = Functions.QueryExtension; - if (CHECKS) { - check(display); - check(error_base, 1); - check(event_base, 1); - } - return callPPPI(display, error_base, event_base, __functionAddress) != 0; - } - - /** Array version of: {@link #glXQueryVersion QueryVersion} */ - @NativeType("Bool") - public static boolean glXQueryVersion(@NativeType("Display *") long display, @NativeType("int *") int[] major, @NativeType("int *") int[] minor) { - long __functionAddress = Functions.QueryVersion; - if (CHECKS) { - check(display); - check(major, 1); - check(minor, 1); - } - return callPPPI(display, major, minor, __functionAddress) != 0; - } - - /** Array version of: {@link #glXGetConfig GetConfig} */ - public static int glXGetConfig(@NativeType("Display *") long display, @NativeType("XVisualInfo *") XVisualInfo visual, int attribute, @NativeType("int *") int[] value) { - long __functionAddress = Functions.GetConfig; - if (CHECKS) { - check(display); - check(value, 1); - XVisualInfo.validate(visual.address()); - } - return callPPPI(display, visual.address(), attribute, value, __functionAddress); - } - - /** Array version of: {@link #glXChooseVisual ChooseVisual} */ - @Nullable - @NativeType("XVisualInfo *") - public static XVisualInfo glXChooseVisual(@NativeType("Display *") long display, int screen, @Nullable @NativeType("int *") int[] attrib_list) { - long __functionAddress = Functions.ChooseVisual; - if (CHECKS) { - check(display); - checkNTSafe(attrib_list); - } - long __result = callPPP(display, screen, attrib_list, __functionAddress); - return XVisualInfo.createSafe(__result); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLX11.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLX11.java deleted file mode 100644 index eb096d7b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLX11.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to GLX 1.1. */ -public class GLX11 extends GLX { - - /** Names for attributes to {@link #glXGetClientString GetClientString}. */ - public static final int - GLX_VENDOR = 0x1, - GLX_VERSION = 0x2, - GLX_EXTENSIONS = 0x3; - - protected GLX11() { - throw new UnsupportedOperationException(); - } - - // --- [ glXQueryExtensionsString ] --- - - /** Unsafe version of: {@link #glXQueryExtensionsString QueryExtensionsString} */ - public static long nglXQueryExtensionsString(long display, int screen) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryExtensionsString; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPP(display, screen, __functionAddress); - } - - /** - * Returns a string describing which GLX extensions are supported on the connection. - * - * @param display the connection to the X server - * @param screen the screen number - */ - @Nullable - @NativeType("char const *") - public static String glXQueryExtensionsString(@NativeType("Display *") long display, int screen) { - long __result = nglXQueryExtensionsString(display, screen); - return memASCIISafe(__result); - } - - // --- [ glXGetClientString ] --- - - /** Unsafe version of: {@link #glXGetClientString GetClientString} */ - public static long nglXGetClientString(long display, int name) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetClientString; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPP(display, name, __functionAddress); - } - - /** - * Returns a pointer to a string describing some aspect of the client library. - * - * @param display the connection to the X server - * @param name the string to query - */ - @Nullable - @NativeType("char const *") - public static String glXGetClientString(@NativeType("Display *") long display, int name) { - long __result = nglXGetClientString(display, name); - return memASCIISafe(__result); - } - - // --- [ glXQueryServerString ] --- - - /** Unsafe version of: {@link #glXQueryServerString QueryServerString} */ - public static long nglXQueryServerString(long display, int screen, int name) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryServerString; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPP(display, screen, name, __functionAddress); - } - - /** - * Returns a pointer to a string describing some aspect of the server's GLX extension. - * - * @param display the connection to the X server - * @param screen the screen number - * @param name the string to query - */ - @Nullable - @NativeType("char const *") - public static String glXQueryServerString(@NativeType("Display *") long display, int screen, int name) { - long __result = nglXQueryServerString(display, screen, name); - return memASCIISafe(__result); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLX12.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLX12.java deleted file mode 100644 index 1a52bd25..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLX12.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** Native bindings to GLX 1.2. */ -public class GLX12 extends GLX11 { - - protected GLX12() { - throw new UnsupportedOperationException(); - } - - // --- [ glXGetCurrentDisplay ] --- - - /** Returns the display associated with the current context and drawable. */ - @NativeType("Display *") - public static long glXGetCurrentDisplay() { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetCurrentDisplay; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLX13.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLX13.java deleted file mode 100644 index 77219640..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLX13.java +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -import org.lwjgl.system.linux.*; - -/** Native bindings to GLX 1.3. */ -public class GLX13 extends GLX12 { - - /** Added in GLX 1.3. */ - public static final int - GLX_WINDOW_BIT = 0x1, - GLX_PIXMAP_BIT = 0x2, - GLX_PBUFFER_BIT = 0x4, - GLX_RGBA_BIT = 0x1, - GLX_COLOR_INDEX_BIT = 0x2, - GLX_PBUFFER_CLOBBER_MASK = 0x8000000, - GLX_FRONT_LEFT_BUFFER_BIT = 0x1, - GLX_FRONT_RIGHT_BUFFER_BIT = 0x2, - GLX_BACK_LEFT_BUFFER_BIT = 0x4, - GLX_BACK_RIGHT_BUFFER_BIT = 0x8, - GLX_AUX_BUFFERS_BIT = 0x10, - GLX_DEPTH_BUFFER_BIT = 0x20, - GLX_STENCIL_BUFFER_BIT = 0x40, - GLX_ACCUM_BUFFER_BIT = 0x80, - GLX_CONFIG_CAVEAT = 0x20, - GLX_X_VISUAL_TYPE = 0x22, - GLX_TRANSPARENT_TYPE = 0x23, - GLX_TRANSPARENT_INDEX_VALUE = 0x24, - GLX_TRANSPARENT_RED_VALUE = 0x25, - GLX_TRANSPARENT_GREEN_VALUE = 0x26, - GLX_TRANSPARENT_BLUE_VALUE = 0x27, - GLX_TRANSPARENT_ALPHA_VALUE = 0x28, - GLX_DONT_CARE = 0xFFFFFFFF, - GLX_NONE = 0x8000, - GLX_SLOW_CONFIG = 0x8001, - GLX_TRUE_COLOR = 0x8002, - GLX_DIRECT_COLOR = 0x8003, - GLX_PSEUDO_COLOR = 0x8004, - GLX_STATIC_COLOR = 0x8005, - GLX_GRAY_SCALE = 0x8006, - GLX_STATIC_GRAY = 0x8007, - GLX_TRANSPARENT_RGB = 0x8008, - GLX_TRANSPARENT_INDEX = 0x8009, - GLX_VISUAL_ID = 0x800B, - GLX_SCREEN = 0x800C, - GLX_NON_CONFORMANT_CONFIG = 0x800D, - GLX_DRAWABLE_TYPE = 0x8010, - GLX_RENDER_TYPE = 0x8011, - GLX_X_RENDERABLE = 0x8012, - GLX_FBCONFIG_ID = 0x8013, - GLX_RGBA_TYPE = 0x8014, - GLX_COLOR_INDEX_TYPE = 0x8015, - GLX_MAX_PBUFFER_WIDTH = 0x8016, - GLX_MAX_PBUFFER_HEIGHT = 0x8017, - GLX_MAX_PBUFFER_PIXELS = 0x8018, - GLX_PRESERVED_CONTENTS = 0x801B, - GLX_LARGEST_PBUFFER = 0x801C, - GLX_WIDTH = 0x801D, - GLX_HEIGHT = 0x801E, - GLX_EVENT_MASK = 0x801F, - GLX_DAMAGED = 0x8020, - GLX_SAVED = 0x8021, - GLX_WINDOW = 0x8022, - GLX_PBUFFER = 0x8023, - GLX_PBUFFER_HEIGHT = 0x8040, - GLX_PBUFFER_WIDTH = 0x8041; - - protected GLX13() { - throw new UnsupportedOperationException(); - } - - // --- [ glXGetFBConfigs ] --- - - /** - * Unsafe version of: {@link #glXGetFBConfigs GetFBConfigs} - * - * @param nelements returns the number of GLXFBConfigs in the returned list - */ - public static long nglXGetFBConfigs(long display, int screen, long nelements) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetFBConfigs; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPP(display, screen, nelements, __functionAddress); - } - - /** - * Returns the list of all GLXFBConfigs that are available on the specified screen. - * - * @param display the connection to the X server - * @param screen the screen number - */ - @Nullable - @NativeType("GLXFBConfig *") - public static PointerBuffer glXGetFBConfigs(@NativeType("Display *") long display, int screen) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer nelements = stack.callocInt(1); - try { - long __result = nglXGetFBConfigs(display, screen, memAddress(nelements)); - return memPointerBufferSafe(__result, nelements.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glXChooseFBConfig ] --- - - /** - * Unsafe version of: {@link #glXChooseFBConfig ChooseFBConfig} - * - * @param nelements returns the number of GLXFBConfigs matched - */ - public static long nglXChooseFBConfig(long display, int screen, long attrib_list, long nelements) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXChooseFBConfig; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPPP(display, screen, attrib_list, nelements, __functionAddress); - } - - /** - * Returns a list of GLXFBConfigs that match a list of attributes. - * - * @param display the connection to the X server - * @param screen the screen number - * @param attrib_list a list of attributes terminated with {@code None} - */ - @Nullable - @NativeType("GLXFBConfig *") - public static PointerBuffer glXChooseFBConfig(@NativeType("Display *") long display, int screen, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer nelements = stack.callocInt(1); - try { - long __result = nglXChooseFBConfig(display, screen, memAddressSafe(attrib_list), memAddress(nelements)); - return memPointerBufferSafe(__result, nelements.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glXGetFBConfigAttrib ] --- - - /** Unsafe version of: {@link #glXGetFBConfigAttrib GetFBConfigAttrib} */ - public static int nglXGetFBConfigAttrib(long display, long config, int attribute, long value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetFBConfigAttrib; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPPI(display, config, attribute, value, __functionAddress); - } - - /** - * Queries the value of a GLX attribute for a GLXFBConfig. - * - * @param display the connection to the X server - * @param config the GLXFBConfig being queried - * @param attribute the attribute to query - * @param value the attribute value - */ - public static int glXGetFBConfigAttrib(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, int attribute, @NativeType("int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nglXGetFBConfigAttrib(display, config, attribute, memAddress(value)); - } - - // --- [ glXGetVisualFromFBConfig ] --- - - /** Unsafe version of: {@link #glXGetVisualFromFBConfig GetVisualFromFBConfig} */ - public static long nglXGetVisualFromFBConfig(long display, long config) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetVisualFromFBConfig; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPP(display, config, __functionAddress); - } - - /** - * Retrieves the associated visual of a GLXFBConfig. - * - * @param display the connection to the X server - * @param config the GLXFBConfig - */ - @Nullable - @NativeType("XVisualInfo *") - public static XVisualInfo glXGetVisualFromFBConfig(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config) { - long __result = nglXGetVisualFromFBConfig(display, config); - return XVisualInfo.createSafe(__result); - } - - // --- [ glXCreateWindow ] --- - - /** Unsafe version of: {@link #glXCreateWindow CreateWindow} */ - public static long nglXCreateWindow(long display, long config, long win, long attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateWindow; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPNPP(display, config, win, attrib_list, __functionAddress); - } - - /** - * Create an onscreen rendering area from an X Window and a desired GLXFBConfig. - * - * @param display the connection to the X server - * @param config the GLXFBConfig - * @param win the X Window - * @param attrib_list a list of attributes terminated with {@code None} - */ - @NativeType("GLXWindow") - public static long glXCreateWindow(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("Window") long win, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - return nglXCreateWindow(display, config, win, memAddressSafe(attrib_list)); - } - - // --- [ glXCreatePixmap ] --- - - /** Unsafe version of: {@link #glXCreatePixmap CreatePixmap} */ - public static long nglXCreatePixmap(long display, long config, long pixmap, long attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreatePixmap; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPNPP(display, config, pixmap, attrib_list, __functionAddress); - } - - /** - * Creates a GLXPixmap offscreen rendering area from an X Pixmap and a desired GLXFBConfig. - * - * @param display the connection to the X server - * @param config the GLXFBConfig - * @param pixmap the X Pixmap - * @param attrib_list a list of attributes terminated with {@code None} - */ - @NativeType("GLXPixmap") - public static long glXCreatePixmap(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("Pixmap") long pixmap, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - return nglXCreatePixmap(display, config, pixmap, memAddressSafe(attrib_list)); - } - - // --- [ glXDestroyPixmap ] --- - - /** - * Destroys a GLXPixmap. - * - * @param display the connection to the X server - * @param pixmap the GLXPixmap to destroy - */ - public static void glXDestroyPixmap(@NativeType("Display *") long display, @NativeType("GLXPixmap") long pixmap) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXDestroyPixmap; - if (CHECKS) { - check(__functionAddress); - check(display); - check(pixmap); - } - callPPV(display, pixmap, __functionAddress); - } - - // --- [ glXCreatePbuffer ] --- - - /** Unsafe version of: {@link #glXCreatePbuffer CreatePbuffer} */ - public static long nglXCreatePbuffer(long display, long config, long attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreatePbuffer; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPPP(display, config, attrib_list, __functionAddress); - } - - /** - * Creates a GLXPbuffer from a GLXFBConfig. - * - * @param display the connection to the X server - * @param config the GLXFBConfig - * @param attrib_list a list of attributes terminated with {@code None} - */ - @NativeType("GLXPbuffer") - public static long glXCreatePbuffer(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - return nglXCreatePbuffer(display, config, memAddressSafe(attrib_list)); - } - - // --- [ glXDestroyPbuffer ] --- - - /** - * Destroys a GLXPbuffer. - * - * @param display the connection to the X server - * @param pbuf the GLXPbuffer to destroy - */ - public static void glXDestroyPbuffer(@NativeType("Display *") long display, @NativeType("GLXPbuffer") long pbuf) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXDestroyPbuffer; - if (CHECKS) { - check(__functionAddress); - check(display); - check(pbuf); - } - callPPV(display, pbuf, __functionAddress); - } - - // --- [ glXQueryDrawable ] --- - - /** Unsafe version of: {@link #glXQueryDrawable QueryDrawable} */ - public static void nglXQueryDrawable(long display, long draw, int attribute, long value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryDrawable; - if (CHECKS) { - check(__functionAddress); - check(display); - check(draw); - } - callPPPV(display, draw, attribute, value, __functionAddress); - } - - /** - * Queries an attribute associated with a GLXDrawable. - * - * @param display the connection to the X server - * @param draw the GLXDrawable being queried - * @param attribute the attribute to query - * @param value returns the attribute value - */ - public static void glXQueryDrawable(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, int attribute, @NativeType("unsigned int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglXQueryDrawable(display, draw, attribute, memAddress(value)); - } - - /** - * Queries an attribute associated with a GLXDrawable. - * - * @param display the connection to the X server - * @param draw the GLXDrawable being queried - * @param attribute the attribute to query - */ - @NativeType("void") - public static int glXQueryDrawable(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, int attribute) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nglXQueryDrawable(display, draw, attribute, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glXCreateNewContext ] --- - - /** - * Creates an OpenGL rendering context. - * - * @param display the connection to the X server - * @param config the GLXFBConfig - * @param render_type the render type - * @param share_list a GLXContext to share objects with - * @param direct whether direct rendering is requested - */ - @NativeType("GLXContext") - public static long glXCreateNewContext(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, int render_type, @NativeType("GLXContext") long share_list, @NativeType("Bool") boolean direct) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateNewContext; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPPP(display, config, render_type, share_list, direct ? 1 : 0, __functionAddress); - } - - // --- [ glXMakeContextCurrent ] --- - - /** - * Makes a GLXContext current in the current thread. - * - * @param display the connection to the X server - * @param draw the draw GLXDrawable - * @param read the read GLXDrawable - * @param ctx the GLXContext - */ - @NativeType("Bool") - public static boolean glXMakeContextCurrent(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, @NativeType("GLXDrawable") long read, @NativeType("GLXContext") long ctx) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXMakeContextCurrent; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPPPI(display, draw, read, ctx, __functionAddress) != 0; - } - - // --- [ glXGetCurrentReadDrawable ] --- - - /** Returns the current GLXDrawable used for reading in the current thread. */ - @NativeType("GLXDrawable") - public static long glXGetCurrentReadDrawable() { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetCurrentReadDrawable; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - - // --- [ glXQueryContext ] --- - - /** Unsafe version of: {@link #glXQueryContext QueryContext} */ - public static int nglXQueryContext(long display, long ctx, int attribute, long value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryContext; - if (CHECKS) { - check(__functionAddress); - check(display); - check(ctx); - } - return callPPPI(display, ctx, attribute, value, __functionAddress); - } - - /** - * Queries the value of a GLXContext attribute. - * - * @param display the connection to the X server - * @param ctx the GLXContext being queried - * @param attribute the attribute to query - * @param value returns the attribute value - */ - public static int glXQueryContext(@NativeType("Display *") long display, @NativeType("GLXContext") long ctx, int attribute, @NativeType("int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nglXQueryContext(display, ctx, attribute, memAddress(value)); - } - - // --- [ glXSelectEvent ] --- - - /** - * Selects which GLX events should be received on a GLXDrawable. - * - * @param display the connection to the X server - * @param draw the GLXDrawable - * @param event_mask the selection mask - */ - public static void glXSelectEvent(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, @NativeType("unsigned long") long event_mask) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXSelectEvent; - if (CHECKS) { - check(__functionAddress); - check(display); - check(draw); - } - callPPNV(display, draw, event_mask, __functionAddress); - } - - // --- [ glXGetSelectedEvent ] --- - - /** Unsafe version of: {@link #glXGetSelectedEvent GetSelectedEvent} */ - public static void nglXGetSelectedEvent(long display, long draw, long event_mask) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetSelectedEvent; - if (CHECKS) { - check(__functionAddress); - check(display); - check(draw); - } - callPPPV(display, draw, event_mask, __functionAddress); - } - - /** - * Returns which GLX events are selected for a GLXDrawable. - * - * @param display the connection to the X server - * @param draw the GLXDrawable - * @param event_mask returns the selection mask - */ - public static void glXGetSelectedEvent(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, @NativeType("unsigned long *") CLongBuffer event_mask) { - if (CHECKS) { - check(event_mask, 1); - } - nglXGetSelectedEvent(display, draw, memAddress(event_mask)); - } - - /** Array version of: {@link #glXChooseFBConfig ChooseFBConfig} */ - @Nullable - @NativeType("GLXFBConfig *") - public static PointerBuffer glXChooseFBConfig(@NativeType("Display *") long display, int screen, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXChooseFBConfig; - if (CHECKS) { - check(__functionAddress); - check(display); - checkNTSafe(attrib_list); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer nelements = stack.callocInt(1); - try { - long __result = callPPPP(display, screen, attrib_list, memAddress(nelements), __functionAddress); - return memPointerBufferSafe(__result, nelements.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glXGetFBConfigAttrib GetFBConfigAttrib} */ - public static int glXGetFBConfigAttrib(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, int attribute, @NativeType("int *") int[] value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetFBConfigAttrib; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - check(value, 1); - } - return callPPPI(display, config, attribute, value, __functionAddress); - } - - /** Array version of: {@link #glXCreateWindow CreateWindow} */ - @NativeType("GLXWindow") - public static long glXCreateWindow(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("Window") long win, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateWindow; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - checkNTSafe(attrib_list); - } - return callPPNPP(display, config, win, attrib_list, __functionAddress); - } - - /** Array version of: {@link #glXCreatePixmap CreatePixmap} */ - @NativeType("GLXPixmap") - public static long glXCreatePixmap(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("Pixmap") long pixmap, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreatePixmap; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - checkNTSafe(attrib_list); - } - return callPPNPP(display, config, pixmap, attrib_list, __functionAddress); - } - - /** Array version of: {@link #glXCreatePbuffer CreatePbuffer} */ - @NativeType("GLXPbuffer") - public static long glXCreatePbuffer(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreatePbuffer; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - checkNTSafe(attrib_list); - } - return callPPPP(display, config, attrib_list, __functionAddress); - } - - /** Array version of: {@link #glXQueryDrawable QueryDrawable} */ - public static void glXQueryDrawable(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, int attribute, @NativeType("unsigned int *") int[] value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryDrawable; - if (CHECKS) { - check(__functionAddress); - check(display); - check(draw); - check(value, 1); - } - callPPPV(display, draw, attribute, value, __functionAddress); - } - - /** Array version of: {@link #glXQueryContext QueryContext} */ - public static int glXQueryContext(@NativeType("Display *") long display, @NativeType("GLXContext") long ctx, int attribute, @NativeType("int *") int[] value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryContext; - if (CHECKS) { - check(__functionAddress); - check(display); - check(ctx); - check(value, 1); - } - return callPPPI(display, ctx, attribute, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLX14.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLX14.java deleted file mode 100644 index 5471bd80..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLX14.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to GLX 1.4. */ -public class GLX14 extends GLX13 { - - /** Added in GLX 1.4. */ - public static final int - GLX_SAMPLE_BUFFERS = 0x186A0, - GLX_SAMPLES = 0x186A1; - - protected GLX14() { - throw new UnsupportedOperationException(); - } - - // --- [ glXGetProcAddress ] --- - - /** Unsafe version of: {@link #glXGetProcAddress GetProcAddress} */ - public static long nglXGetProcAddress(long procName) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetProcAddress; - if (CHECKS) { - check(__functionAddress); - } - return callPP(procName, __functionAddress); - } - - /** - * Returns the address of the extension function named by {@code procName}. The pointer returned should be cast to a function pointer type matching the - * extension function's definition in that extension specification. A return value of {@code NULL} indicates that the specified function does not exist for the - * implementation. - * - *

    A non-{@code NULL} return value for {@code glXGetProcAddress} does not guarantee that an extension function is actually supported at runtime. The client must - * also query {@link GL11C#glGetString GetString}({@link GL11#GL_EXTENSIONS}) or {@link GLX11#glXQueryExtensionsString QueryExtensionsString} to determine if an extension is supported by a particular context.

    - * - *

    GL function pointers returned by {@code glXGetProcAddress} are independent of the currently bound context and may be used by any context which supports - * the extension.

    - * - *

    {@code glXGetProcAddress} may be queried for all of the following functions:

    - * - *
      - *
    • All GL and GLX extension functions supported by the implementation (whether those extensions are supported by the current context or not).
    • - *
    • All core (non-extension) functions in GL and GLX from version 1.0 up to and including the versions of those specifications supported by the - * implementation, as determined by {@link GL11C#glGetString GetString}({@link GL11#GL_VERSION}) and {@link GLX#glXQueryVersion QueryVersion} queries.
    • - *
    - * - * @param procName the function name to query - */ - @NativeType("void *") - public static long glXGetProcAddress(@NativeType("GLchar const *") ByteBuffer procName) { - if (CHECKS) { - checkNT1(procName); - } - return nglXGetProcAddress(memAddress(procName)); - } - - /** - * Returns the address of the extension function named by {@code procName}. The pointer returned should be cast to a function pointer type matching the - * extension function's definition in that extension specification. A return value of {@code NULL} indicates that the specified function does not exist for the - * implementation. - * - *

    A non-{@code NULL} return value for {@code glXGetProcAddress} does not guarantee that an extension function is actually supported at runtime. The client must - * also query {@link GL11C#glGetString GetString}({@link GL11#GL_EXTENSIONS}) or {@link GLX11#glXQueryExtensionsString QueryExtensionsString} to determine if an extension is supported by a particular context.

    - * - *

    GL function pointers returned by {@code glXGetProcAddress} are independent of the currently bound context and may be used by any context which supports - * the extension.

    - * - *

    {@code glXGetProcAddress} may be queried for all of the following functions:

    - * - *
      - *
    • All GL and GLX extension functions supported by the implementation (whether those extensions are supported by the current context or not).
    • - *
    • All core (non-extension) functions in GL and GLX from version 1.0 up to and including the versions of those specifications supported by the - * implementation, as determined by {@link GL11C#glGetString GetString}({@link GL11#GL_VERSION}) and {@link GLX#glXQueryVersion QueryVersion} queries.
    • - *
    - * - * @param procName the function name to query - */ - @NativeType("void *") - public static long glXGetProcAddress(@NativeType("GLchar const *") CharSequence procName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(procName, true); - long procNameEncoded = stack.getPointerAddress(); - return nglXGetProcAddress(procNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXAMDGPUAssociation.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXAMDGPUAssociation.java deleted file mode 100644 index 33f3dd23..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXAMDGPUAssociation.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_AMD_gpu_association extension. - * - *

    There currently is no way for applications to efficiently use GPU resources in systems that contain more than one GPU. Vendors have provided methods - * that attempt to split the workload for an application among the available GPU resources. This has proven to be very inefficient because most - * applications were never written with these sorts of optimizations in mind.

    - * - *

    This extension provides a mechanism for applications to explicitly use the GPU resources on a given system individually. By providing this - * functionality, a driver allows applications to make appropriate decisions regarding where and when to distribute rendering tasks.

    - * - *

    Requires {@link GL15 OpenGL 1.5}, {@link GLX13 GLX 1.3}, {@link EXTFramebufferObject EXT_framebuffer_object} and {@link GLXARBGetProcAddress GLX_ARB_get_proc_address}.

    - */ -public class GLXAMDGPUAssociation { - - /** Accepted by the {@code property} parameter of {@link #glXGetGPUInfoAMD GetGPUInfoAMD}. */ - public static final int - GLX_GPU_VENDOR_AMD = 0x1F00, - GLX_GPU_RENDERER_STRING_AMD = 0x1F01, - GLX_GPU_OPENGL_VERSION_STRING_AMD = 0x1F02, - GLX_GPU_FASTEST_TARGET_GPUS_AMD = 0x21A2, - GLX_GPU_RAM_AMD = 0x21A3, - GLX_GPU_CLOCK_AMD = 0x21A4, - GLX_GPU_NUM_PIPES_AMD = 0x21A5, - GLX_GPU_NUM_SIMD_AMD = 0x21A6, - GLX_GPU_NUM_RB_AMD = 0x21A7, - GLX_GPU_NUM_SPI_AMD = 0x21A8; - - protected GLXAMDGPUAssociation() { - throw new UnsupportedOperationException(); - } - - // --- [ glXBlitContextFramebufferAMD ] --- - - public static void glXBlitContextFramebufferAMD(@NativeType("GLXContext") long dstCtx, @NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXBlitContextFramebufferAMD; - if (CHECKS) { - check(__functionAddress); - check(dstCtx); - } - callPV(dstCtx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, __functionAddress); - } - - // --- [ glXCreateAssociatedContextAMD ] --- - - /** Creates an associated context. */ - @NativeType("GLXContext") - public static long glXCreateAssociatedContextAMD(@NativeType("unsigned int") int id, @NativeType("GLXContext") long share_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateAssociatedContextAMD; - if (CHECKS) { - check(__functionAddress); - check(share_list); - } - return callPP(id, share_list, __functionAddress); - } - - // --- [ glXCreateAssociatedContextAttribsAMD ] --- - - /** Unsafe version of: {@link #glXCreateAssociatedContextAttribsAMD CreateAssociatedContextAttribsAMD} */ - public static long nglXCreateAssociatedContextAttribsAMD(int id, long share_context, long attribList) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateAssociatedContextAttribsAMD; - if (CHECKS) { - check(__functionAddress); - check(share_context); - } - return callPPP(id, share_context, attribList, __functionAddress); - } - - /** Creates an associated context and requests a specific GL version. */ - @NativeType("GLXContext") - public static long glXCreateAssociatedContextAttribsAMD(@NativeType("unsigned int") int id, @NativeType("GLXContext") long share_context, @NativeType("int const *") IntBuffer attribList) { - if (CHECKS) { - checkNT(attribList); - } - return nglXCreateAssociatedContextAttribsAMD(id, share_context, memAddress(attribList)); - } - - // --- [ glXDeleteAssociatedContextAMD ] --- - - /** - * Deletes an associated context. - * - * @param ctx the GLXContext - */ - @NativeType("Bool") - public static boolean glXDeleteAssociatedContextAMD(@NativeType("GLXContext") long ctx) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXDeleteAssociatedContextAMD; - if (CHECKS) { - check(__functionAddress); - check(ctx); - } - return callPI(ctx, __functionAddress) != 0; - } - - // --- [ glXGetContextGPUIDAMD ] --- - - /** - * Determines which GPU a context is attached to. - * - * @param ctx the GLXContext - */ - @NativeType("unsigned int") - public static int glXGetContextGPUIDAMD(@NativeType("GLXContext") long ctx) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetContextGPUIDAMD; - if (CHECKS) { - check(__functionAddress); - check(ctx); - } - return callPI(ctx, __functionAddress); - } - - // --- [ glXGetCurrentAssociatedContextAMD ] --- - - /** Queries the crrent associated context. */ - @NativeType("GLXContext") - public static long glXGetCurrentAssociatedContextAMD() { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetCurrentAssociatedContextAMD; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - - // --- [ glXGetGPUIDsAMD ] --- - - /** Queries the IDs for available GPUs. */ - @NativeType("unsigned int") - public static int glXGetGPUIDsAMD(@NativeType("unsigned int") int maxCount, @NativeType("unsigned int") int ids) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetGPUIDsAMD; - if (CHECKS) { - check(__functionAddress); - } - return callI(maxCount, ids, __functionAddress); - } - - // --- [ glXGetGPUInfoAMD ] --- - - /** Unsafe version of: {@link #glXGetGPUInfoAMD GetGPUInfoAMD} */ - public static int nglXGetGPUInfoAMD(int id, int property, int dataType, int size, long data) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetGPUInfoAMD; - if (CHECKS) { - check(__functionAddress); - } - return callPI(id, property, dataType, size, data, __functionAddress); - } - - /** - * Queries GPU properties. - * - * @param property one of:
    {@link #GLX_GPU_VENDOR_AMD GPU_VENDOR_AMD}{@link #GLX_GPU_RENDERER_STRING_AMD GPU_RENDERER_STRING_AMD}{@link #GLX_GPU_OPENGL_VERSION_STRING_AMD GPU_OPENGL_VERSION_STRING_AMD}{@link #GLX_GPU_FASTEST_TARGET_GPUS_AMD GPU_FASTEST_TARGET_GPUS_AMD}
    {@link #GLX_GPU_RAM_AMD GPU_RAM_AMD}{@link #GLX_GPU_CLOCK_AMD GPU_CLOCK_AMD}{@link #GLX_GPU_NUM_PIPES_AMD GPU_NUM_PIPES_AMD}{@link #GLX_GPU_NUM_SIMD_AMD GPU_NUM_SIMD_AMD}
    {@link #GLX_GPU_NUM_RB_AMD GPU_NUM_RB_AMD}{@link #GLX_GPU_NUM_SPI_AMD GPU_NUM_SPI_AMD}
    - */ - public static int glXGetGPUInfoAMD(@NativeType("unsigned int") int id, int property, @NativeType("GLenum") int dataType, @NativeType("void *") ByteBuffer data) { - return nglXGetGPUInfoAMD(id, property, dataType, data.remaining(), memAddress(data)); - } - - // --- [ glXMakeAssociatedContextCurrentAMD ] --- - - /** - * Makes an associated context current in the current thread. - * - * @param ctx the GLXContext - */ - @NativeType("Bool") - public static boolean glXMakeAssociatedContextCurrentAMD(@NativeType("GLXContext") long ctx) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXMakeAssociatedContextCurrentAMD; - if (CHECKS) { - check(__functionAddress); - check(ctx); - } - return callPI(ctx, __functionAddress) != 0; - } - - /** Array version of: {@link #glXCreateAssociatedContextAttribsAMD CreateAssociatedContextAttribsAMD} */ - @NativeType("GLXContext") - public static long glXCreateAssociatedContextAttribsAMD(@NativeType("unsigned int") int id, @NativeType("GLXContext") long share_context, @NativeType("int const *") int[] attribList) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateAssociatedContextAttribsAMD; - if (CHECKS) { - check(__functionAddress); - check(share_context); - checkNT(attribList); - } - return callPPP(id, share_context, attribList, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBContextFlushControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBContextFlushControl.java deleted file mode 100644 index 06fbcabb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBContextFlushControl.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_context_flush_control extension. - * - *

    The GLX version of {@link KHRContextFlushControl}. This extension adds new context creation parameters the allow an application to specify the behavior - * that is desired when a context is made non-current, and specifically to opt out of the implicit flush behavior.

    - */ -public final class GLXARBContextFlushControl { - - /** Accepted as an attribute name in the {@code *attrib_list} argument to {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int GLX_CONTEXT_RELEASE_BEHAVIOR_ARB = 0x2097; - - /** - * Accepted as an attribute value for {@link #GLX_CONTEXT_RELEASE_BEHAVIOR_ARB CONTEXT_RELEASE_BEHAVIOR_ARB} in the {@code *attrib_list} argument to - * {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int - GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB = 0x0, - GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB = 0x2098; - - private GLXARBContextFlushControl() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContext.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContext.java deleted file mode 100644 index 98fee629..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContext.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_ARB_create_context extension. - * - *

    With the advent of new versions of OpenGL which deprecate features and/or break backward compatibility with older versions, there is a need and desire - * to indicate at context creation which interface will be used. These extensions add a new context creation routine with attributes specifying the GL - * version and context properties requested for the context, and additionally add an attribute specifying the GL profile requested for a context of OpenGL - * 3.2 or later. It also allows making an OpenGL 3.0 or later context current without providing a default framebuffer.

    - * - *

    Requires {@link GLX14 GLX 1.4}.

    - */ -public class GLXARBCreateContext { - - /** Accepted as an attribute name in {@code attrib_list}. */ - public static final int - GLX_CONTEXT_MAJOR_VERSION_ARB = 0x2091, - GLX_CONTEXT_MINOR_VERSION_ARB = 0x2092, - GLX_CONTEXT_FLAGS_ARB = 0x2094; - - /** Accepted as bits in the attribute value for {@link #GLX_CONTEXT_FLAGS_ARB CONTEXT_FLAGS_ARB} in {@code attrib_list}. */ - public static final int - GLX_CONTEXT_DEBUG_BIT_ARB = 0x1, - GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x2; - - protected GLXARBCreateContext() { - throw new UnsupportedOperationException(); - } - - // --- [ glXCreateContextAttribsARB ] --- - - /** Unsafe version of: {@link #glXCreateContextAttribsARB CreateContextAttribsARB} */ - public static long nglXCreateContextAttribsARB(long display, long config, long share_context, int direct, long attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateContextAttribsARB; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPPPP(display, config, share_context, direct, attrib_list, __functionAddress); - } - - /** - * Creates an OpenGL rendering context. - * - *

    If {@code glXCreateContextAttribsARB} succeeds, it initializes the context to the initial state defined by the OpenGL specification, and returns a - * handle to it. This handle can be used to render to any GLX surface (window, pixmap, or pbuffer) compatible with {@code config}, subject to constraints - * imposed by the OpenGL API version of the context.

    - * - *

    If {@code share_context} is not {@code NULL}, then all shareable data (excluding OpenGL texture objects named 0) will be shared by {@code share_context}, all - * other contexts {@code share_context} already shares with, and the newly created context. An arbitrary number of {@code GLXContexts} can share data in - * this fashion. The server context state for all sharing contexts must exist in a single address space.

    - * - * @param display the connection to the X server - * @param config the {@code GLXFBConfig} - * @param share_context if not {@code NULL}, then all shareable data (excluding OpenGL texture objects named 0) will be shared by {@code share_context}, all other contexts - * {@code share_context} already shares with, and the newly created context. An arbitrary number of GLXContexts can share data in this fashion. The - * server context state for all sharing contexts must exist in a single address space. - * @param direct direct rendering is requested if {@code direct} is {@code True}, and indirect rendering if {@code direct} is {@code False}. If - * {@code direct} is {@code True}, the implementation may nonetheless create an indirect rendering context if any of the following conditions hold: - * - *
      - *
    • The implementation does not support direct rendering.
    • - *
    • {@code display} is not a local X server.
    • - *
    • Implementation-dependent limits on the number of direct rendering contexts that can be supported simultaneously are exceeded.
    • - *
    - * - *

    Use {@link GLX#glXIsDirect IsDirect} to determine whether or not a request for a direct rendering context succeeded.

    - * @param attrib_list an optional list of attributes for the context, terminated with {@code None} - */ - @NativeType("GLXContext") - public static long glXCreateContextAttribsARB(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("GLXContext") long share_context, @NativeType("Bool") boolean direct, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - return nglXCreateContextAttribsARB(display, config, share_context, direct ? 1 : 0, memAddressSafe(attrib_list)); - } - - /** Array version of: {@link #glXCreateContextAttribsARB CreateContextAttribsARB} */ - @NativeType("GLXContext") - public static long glXCreateContextAttribsARB(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("GLXContext") long share_context, @NativeType("Bool") boolean direct, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateContextAttribsARB; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - checkNTSafe(attrib_list); - } - return callPPPPP(display, config, share_context, direct ? 1 : 0, attrib_list, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextNoError.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextNoError.java deleted file mode 100644 index 1b23e536..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextNoError.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_create_context_no_error extension. - * - *

    This extension allows the creation of an OpenGL or OpenGL ES context that doesn't generate errors if the context supports a no error mode. The - * implications of this feature are discussed in the {@link KHRNoError KHR_no_error} extension.

    - * - *

    Requires {@link WGLARBCreateContext WGL_ARB_create_context}.

    - */ -public final class GLXARBCreateContextNoError { - - /** Accepted as an attribute name in the {@code *attrib_list} argument to {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int GLX_CONTEXT_OPENGL_NO_ERROR_ARB = 0x31B3; - - private GLXARBCreateContextNoError() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextProfile.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextProfile.java deleted file mode 100644 index f81bb1e3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextProfile.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_create_context_profile extension. - * - *

    Adds an attribute to {@link GLXARBCreateContext}, specifying the GL profile requested for a context of OpenGL 3.2 or later.

    - * - *

    Requires {@link GLX14 GLX 1.4} and {@link GL32 OpenGL 3.2}.

    - */ -public final class GLXARBCreateContextProfile { - - /** Accepted as an attribute name in {@code attrib_list}. */ - public static final int GLX_CONTEXT_PROFILE_MASK_ARB = 0x9126; - - /** Accepted as bits in the attribute value for {@link #GLX_CONTEXT_PROFILE_MASK_ARB CONTEXT_PROFILE_MASK_ARB} in {@code attrib_list}. */ - public static final int - GLX_CONTEXT_CORE_PROFILE_BIT_ARB = 0x1, - GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x2; - - /** GLX error. */ - public static final int GLXBadProfileARB = 13; - - private GLXARBCreateContextProfile() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextRobustness.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextRobustness.java deleted file mode 100644 index f8f995ec..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBCreateContextRobustness.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_create_context_robustness extension. - * - *

    This extension allows creating an OpenGL context supporting robust buffer access behavior and a specified graphics reset notification behavior.

    - * - *

    Requires {@link GLX14 GLX 1.4}, {@link GLXARBCreateContext GLX_ARB_create_context} and {@link ARBRobustness ARB_robustness}.

    - */ -public final class GLXARBCreateContextRobustness { - - /** - * Accepted as a bit in the attribute value for {@link GLXARBCreateContext#GLX_CONTEXT_FLAGS_ARB CONTEXT_FLAGS_ARB} in the {@code attrib_list} argument to - * {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x4; - - /** Accepted as an attribute name in the {@code attrib_list} argument to {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; - - /** - * Accepted as an attribute value for {@link #GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB} in the {@code attrib_list} argument to - * {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int - GLX_NO_RESET_NOTIFICATION_ARB = 0x8261, - GLX_LOSE_CONTEXT_ON_RESET_ARB = 0x8252; - - private GLXARBCreateContextRobustness() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBFBConfigFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBFBConfigFloat.java deleted file mode 100644 index 510c044d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBFBConfigFloat.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_fbconfig_float extension. - * - *

    The standard OpenGL pipeline is based on a fixed-point pipeline. While color components are nominally floating-point values in the pipeline, components - * are frequently clamped to the range [0,1] to accomodate the fixed-point color buffer representation and allow for fixed-point computational hardware.

    - * - *

    This extension adds pixel formats or visuals with floating-point RGBA color components and controls for clamping of color components within the pipeline.

    - */ -public final class GLXARBFBConfigFloat { - - /** Accepted as values of the {@code render_type} arguments in the {@link GLX13#glXCreateNewContext CreateNewContext} and {@link GLX#glXCreateContext CreateContext} functions. */ - public static final int GLX_RGBA_FLOAT_TYPE_ARB = 0x20B9; - - /** Accepted as a bit set in the GLX_RENDER_TYPE variable. */ - public static final int GLX_RGBA_FLOAT_BIT_ARB = 0x4; - - private GLXARBFBConfigFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBFramebufferSRGB.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBFramebufferSRGB.java deleted file mode 100644 index 25cb8f05..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBFramebufferSRGB.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_framebuffer_sRGB extension. - * - *

    GLX functionality for {@link ARBFramebufferSRGB ARB_framebuffer_sRGB}.

    - */ -public final class GLXARBFramebufferSRGB { - - /** Accepted by the {@code attribList} parameter of {@link GLX#glXChooseVisual ChooseVisual}, and by the {@code attrib} parameter of {@link GLX#glXGetConfig GetConfig}. */ - public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20B2; - - private GLXARBFramebufferSRGB() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBGetProcAddress.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBGetProcAddress.java deleted file mode 100644 index e167a8bf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBGetProcAddress.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_ARB_get_proc_address extension. - * - *

    This extension adds a function to return the address of GLX and GL extension functions, given the function name. This is necessary with (for example) - * heterogenous implementations where hardware drivers may implement extension functions not known to the link library; a similar situation on Windows - * implementations resulted in the {@code wglGetProcAddress} function.

    - */ -public class GLXARBGetProcAddress { - - protected GLXARBGetProcAddress() { - throw new UnsupportedOperationException(); - } - - // --- [ glXGetProcAddressARB ] --- - - /** Unsafe version of: {@link #glXGetProcAddressARB GetProcAddressARB} */ - public static long nglXGetProcAddressARB(long procName) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetProcAddressARB; - if (CHECKS) { - check(__functionAddress); - } - return callPP(procName, __functionAddress); - } - - /** - * Returns the address of the extension function named by procName. The pointer returned should be cast to a function pointer type matching the extension - * function's definition in that extension specification. A return value of {@code NULL} indicates that the specified function does not exist for the - * implementation. - * - *

    A non-{@code NULL} return value for {@code glXGetProcAddressARB} does not guarantee that an extension function is actually supported at runtime. The client - * must must also query {@link GL11C#glGetString GetString}({@link GL11#GL_EXTENSIONS}) or {@link GLX11#glXQueryExtensionsString QueryExtensionsString} to determine if an extension is supported by a particular - * context.

    - * - *

    GL function pointers returned by {@code glXGetProcAddressARB} are independent of the currently bound context and may be used by any context which - * supports the extension.

    - * - *

    {@code glXGetProcAddressARB} may be queried for all of the following functions:

    - * - *
      - *
    • All GL and GLX extension functions supported by the implementation (whether those extensions are supported by the current context or not).
    • - *
    • All core (non-extension) functions in GL and GLX from version 1.0 up to and including the versions of those specifications supported by the - * implementation, as determined by {@link GL11C#glGetString GetString}({@link GL11#GL_VERSION}) and {@link GLX#glXQueryVersion QueryVersion} queries.
    • - *
    - * - * @param procName the function name to query - */ - @NativeType("void *") - public static long glXGetProcAddressARB(@NativeType("GLchar const *") ByteBuffer procName) { - if (CHECKS) { - checkNT1(procName); - } - return nglXGetProcAddressARB(memAddress(procName)); - } - - /** - * Returns the address of the extension function named by procName. The pointer returned should be cast to a function pointer type matching the extension - * function's definition in that extension specification. A return value of {@code NULL} indicates that the specified function does not exist for the - * implementation. - * - *

    A non-{@code NULL} return value for {@code glXGetProcAddressARB} does not guarantee that an extension function is actually supported at runtime. The client - * must must also query {@link GL11C#glGetString GetString}({@link GL11#GL_EXTENSIONS}) or {@link GLX11#glXQueryExtensionsString QueryExtensionsString} to determine if an extension is supported by a particular - * context.

    - * - *

    GL function pointers returned by {@code glXGetProcAddressARB} are independent of the currently bound context and may be used by any context which - * supports the extension.

    - * - *

    {@code glXGetProcAddressARB} may be queried for all of the following functions:

    - * - *
      - *
    • All GL and GLX extension functions supported by the implementation (whether those extensions are supported by the current context or not).
    • - *
    • All core (non-extension) functions in GL and GLX from version 1.0 up to and including the versions of those specifications supported by the - * implementation, as determined by {@link GL11C#glGetString GetString}({@link GL11#GL_VERSION}) and {@link GLX#glXQueryVersion QueryVersion} queries.
    • - *
    - * - * @param procName the function name to query - */ - @NativeType("void *") - public static long glXGetProcAddressARB(@NativeType("GLchar const *") CharSequence procName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(procName, true); - long procNameEncoded = stack.getPointerAddress(); - return nglXGetProcAddressARB(procNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBMultisample.java deleted file mode 100644 index 3f3805fa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBMultisample.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_multisample extension. - * - *

    See {@link ARBMultisample} for details.

    - */ -public final class GLXARBMultisample { - - /** Accepted by the {@code attribList} parameter of {@link GLX#glXChooseVisual ChooseVisual}, and by the {@code attrib} parameter of {@link GLX#glXGetConfig GetConfig}. */ - public static final int - GLX_SAMPLE_BUFFERS_ARB = 100000, - GLX_SAMPLES_ARB = 100001; - - private GLXARBMultisample() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBRobustnessApplicationIsolation.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBRobustnessApplicationIsolation.java deleted file mode 100644 index cbfe747c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBRobustnessApplicationIsolation.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_robustness_application_isolation extension. - * - *

    GL_ARB_robustness and GLX_ARB_create_context_robustness allow creating an OpenGL context supporting graphics reset notification behavior. - * GLX_ARB_robustness_application_isolation provides stronger guarantees about the possible side-effects of a graphics reset.

    - * - *

    If the graphics driver advertises the GLX_ARB_robustness_application_isolation extension string, then the driver guarantees that if a particular - * application causes a graphics reset to occur:

    - * - *
      - *
    1. No other application on the system is affected by the graphics reset.
    2. - *
    3. No other application on the system receives any notification that the graphics reset occurred.
    4. - *
    - * - *

    Requires {@link GLX14 GLX 1.4} and {@link GLXARBCreateContextRobustness GLX_ARB_create_context_robustness}.

    - */ -public final class GLXARBRobustnessApplicationIsolation { - - /** - * Accepted as a bit in the attribute value for {@link GLXARBCreateContext#GLX_CONTEXT_FLAGS_ARB CONTEXT_FLAGS_ARB} in the {@code attrib_list} argument to - * {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int GLX_CONTEXT_RESET_ISOLATION_BIT_ARB = 0x8; - - private GLXARBRobustnessApplicationIsolation() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBVertexBufferObject.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBVertexBufferObject.java deleted file mode 100644 index 17ebb084..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXARBVertexBufferObject.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_ARB_vertex_buffer_object extension. - * - *

    It is the client's responsibility to convert buffer data to and from the server's byte order. Since only the client knows the correct format of the - * data, and there may be multiple clients with different byte orderings sharing a single buffer object, it is unreasonable to ask the GL to handle buffer - * object byte-swapping. To avoid errors caused by naive clients attempting to use buffer objects without performing the appropriate byte swapping, clients - * must opt in to buffer object support at context creation time using the {@link #GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB} context attrib. If this attribute - * is not specified and the byte ordering of the client and server differ, the VBO extension must not be exposed and the maximum context version that can - * be reported is 1.4.

    - * - *

    Requires {@link GLXARBCreateContext GLX_ARB_create_context} and {@link ARBVertexBufferObject ARB_vertex_buffer_object}.

    - */ -public final class GLXARBVertexBufferObject { - - /** Accepted as an attribute name in the {@code attrib_list} parameter of {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB = 0x2095; - - private GLXARBVertexBufferObject() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXCapabilities.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXCapabilities.java deleted file mode 100644 index b0394b2a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXCapabilities.java +++ /dev/null @@ -1,652 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; -import java.util.Set; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; - -/** Defines the GLX capabilities of a connection. */ -public final class GLXCapabilities { - - // GLX11 - public final long - glXQueryExtensionsString, - glXGetClientString, - glXQueryServerString; - - // GLX12 - public final long - glXGetCurrentDisplay; - - // GLX13 - public final long - glXGetFBConfigs, - glXChooseFBConfig, - glXGetFBConfigAttrib, - glXGetVisualFromFBConfig, - glXCreateWindow, - glXCreatePixmap, - glXDestroyPixmap, - glXCreatePbuffer, - glXDestroyPbuffer, - glXQueryDrawable, - glXCreateNewContext, - glXMakeContextCurrent, - glXGetCurrentReadDrawable, - glXQueryContext, - glXSelectEvent, - glXGetSelectedEvent; - - // GLX14 - public final long - glXGetProcAddress; - - // GLX_AMD_gpu_association - public final long - glXBlitContextFramebufferAMD, - glXCreateAssociatedContextAMD, - glXCreateAssociatedContextAttribsAMD, - glXDeleteAssociatedContextAMD, - glXGetContextGPUIDAMD, - glXGetCurrentAssociatedContextAMD, - glXGetGPUIDsAMD, - glXGetGPUInfoAMD, - glXMakeAssociatedContextCurrentAMD; - - // GLX_ARB_create_context - public final long - glXCreateContextAttribsARB; - - // GLX_ARB_get_proc_address - public final long - glXGetProcAddressARB; - - // GLX_EXT_import_context - public final long - glXGetCurrentDisplayEXT, - glXQueryContextInfoEXT, - glXGetContextIDEXT, - glXImportContextEXT, - glXFreeContextEXT; - - // GLX_EXT_swap_control - public final long - glXSwapIntervalEXT; - - // GLX_EXT_texture_from_pixmap - public final long - glXBindTexImageEXT, - glXReleaseTexImageEXT; - - // GLX_NV_copy_buffer - public final long - glXCopyBufferSubDataNV, - glXNamedCopyBufferSubDataNV; - - // GLX_NV_copy_image - public final long - glXCopyImageSubDataNV; - - // GLX_NV_delay_before_swap - public final long - glXDelayBeforeSwapNV; - - // GLX_NV_swap_group - public final long - glXJoinSwapGroupNV, - glXBindSwapBarrierNV, - glXQuerySwapGroupNV, - glXQueryMaxSwapGroupsNV, - glXQueryFrameCountNV, - glXResetFrameCountNV; - - // GLX_SGI_make_current_read - public final long - glXMakeCurrentReadSGI, - glXGetCurrentReadDrawableSGI; - - // GLX_SGI_swap_control - public final long - glXSwapIntervalSGI; - - // GLX_SGI_video_sync - public final long - glXGetVideoSyncSGI, - glXWaitVideoSyncSGI; - - // GLX_SGIX_fbconfig - public final long - glXGetFBConfigAttribSGIX, - glXChooseFBConfigSGIX, - glXCreateGLXPixmapWithConfigSGIX, - glXCreateContextWithConfigSGIX, - glXGetVisualFromFBConfigSGIX, - glXGetFBConfigFromVisualSGIX; - - // GLX_SGIX_pbuffer - public final long - glXCreateGLXPbufferSGIX, - glXDestroyGLXPbufferSGIX, - glXQueryGLXPbufferSGIX, - glXSelectEventSGIX, - glXGetSelectedEventSGIX; - - // GLX_SGIX_swap_barrier - public final long - glXBindSwapBarrierSGIX, - glXQueryMaxSwapBarriersSGIX; - - // GLX_SGIX_swap_group - public final long - glXJoinSwapGroupSGIX; - - /** When true, {@link GLX11} is supported. */ - public final boolean GLX11; - /** When true, {@link GLX12} is supported. */ - public final boolean GLX12; - /** When true, {@link GLX13} is supported. */ - public final boolean GLX13; - /** When true, {@link GLX14} is supported. */ - public final boolean GLX14; - /** When true, {@link GLXAMDGPUAssociation} is supported. */ - public final boolean GLX_AMD_gpu_association; - /** When true, {@link GLXARBContextFlushControl} is supported. */ - public final boolean GLX_ARB_context_flush_control; - /** When true, {@link GLXARBCreateContext} is supported. */ - public final boolean GLX_ARB_create_context; - /** When true, {@link GLXARBCreateContextNoError} is supported. */ - public final boolean GLX_ARB_create_context_no_error; - /** When true, {@link GLXARBCreateContextProfile} is supported. */ - public final boolean GLX_ARB_create_context_profile; - /** When true, {@link GLXARBCreateContextRobustness} is supported. */ - public final boolean GLX_ARB_create_context_robustness; - /** When true, {@link GLXARBFBConfigFloat} is supported. */ - public final boolean GLX_ARB_fbconfig_float; - /** When true, {@link GLXARBFramebufferSRGB} is supported. */ - public final boolean GLX_ARB_framebuffer_sRGB; - /** When true, {@link GLXARBGetProcAddress} is supported. */ - public final boolean GLX_ARB_get_proc_address; - /** When true, {@link GLXARBMultisample} is supported. */ - public final boolean GLX_ARB_multisample; - /** When true, {@link GLXARBRobustnessApplicationIsolation} is supported. */ - public final boolean GLX_ARB_robustness_application_isolation; - /** - * When true, the GLX_ARB_robustness_share_group_isolation extension is supported. - * - *

    GL_ARB_robustness and GLX_ARB_create_context_robustness allow creating an OpenGL context supporting graphics reset notification behavior. - * GLX_ARB_robustness_share_group_isolation provides stronger guarantees about the possible side-effects of a graphics reset.

    - * - *

    If the graphics driver advertises the GLX_ARB_robustness_share_group_isolation extension string, then the driver guarantees that if a context in a - * particular share group causes a graphics reset to occur:

    - * - *
      - *
    1. No other share group within the application, nor any other application on the system, is affected by the graphics reset.
    2. - *
    3. No other share group within the application, nor any other application on the system, receives any notification that the graphics reset occurred.
    4. - *
    - * - *

    Requires {@link GLX14 GLX 1.4} and {@link GLXARBCreateContextRobustness GLX_ARB_create_context_robustness}.

    - */ - public final boolean GLX_ARB_robustness_share_group_isolation; - /** When true, {@link GLXARBVertexBufferObject} is supported. */ - public final boolean GLX_ARB_vertex_buffer_object; - /** When true, {@link GLXEXTBufferAge} is supported. */ - public final boolean GLX_EXT_buffer_age; - /** When true, {@link GLXEXTContextPriority} is supported. */ - public final boolean GLX_EXT_context_priority; - /** When true, {@link GLXEXTCreateContextES2Profile} is supported. */ - public final boolean GLX_EXT_create_context_es2_profile; - /** When true, {@link GLXEXTCreateContextESProfile} is supported. */ - public final boolean GLX_EXT_create_context_es_profile; - /** When true, {@link GLXEXTFBConfigPackedFloat} is supported. */ - public final boolean GLX_EXT_fbconfig_packed_float; - /** When true, {@link GLXEXTFramebufferSRGB} is supported. */ - public final boolean GLX_EXT_framebuffer_sRGB; - /** - * When true, the GLX_EXT_get_drawable_type extension is supported. - * - *

    This extension adds {@link GLX13#GLX_DRAWABLE_TYPE DRAWABLE_TYPE} to the set of drawable attributes that are sent in a {@code GLXGetDrawableAttributes} request, and that can be - * queried with {@link GLX13#glXQueryDrawable QueryDrawable}. While this is primarily a convenience for the client library implementation, it may also be useful for applications.

    - */ - public final boolean GLX_EXT_get_drawable_type; - /** When true, {@link GLXEXTImportContext} is supported. */ - public final boolean GLX_EXT_import_context; - /** - * When true, the GLX_EXT_no_config_context extension is supported. - * - *

    Modern GPUs allow contexts to render to almost any combination of supported color and auxiliary buffer formats. Traditionally GLX context creation is - * done with respect to a GLXFBConfig specifying buffer formats, and constrains contexts to only work with drawables created with a "compatible" config.

    - * - *

    This extension allows creation of GL & ES contexts without specifying a {@code GLXFBConfig}.

    - */ - public final boolean GLX_EXT_no_config_context; - /** When true, {@link GLXEXTStereoTree} is supported. */ - public final boolean GLX_EXT_stereo_tree; - /** When true, {@link GLXEXTSwapControl} is supported. */ - public final boolean GLX_EXT_swap_control; - /** When true, {@link GLXEXTSwapControlTear} is supported. */ - public final boolean GLX_EXT_swap_control_tear; - /** When true, {@link GLXEXTTextureFromPixmap} is supported. */ - public final boolean GLX_EXT_texture_from_pixmap; - /** When true, {@link GLXEXTVisualInfo} is supported. */ - public final boolean GLX_EXT_visual_info; - /** When true, {@link GLXEXTVisualRating} is supported. */ - public final boolean GLX_EXT_visual_rating; - /** When true, {@link GLXINTELSwapEvent} is supported. */ - public final boolean GLX_INTEL_swap_event; - /** When true, {@link GLXNVCopyBuffer} is supported. */ - public final boolean GLX_NV_copy_buffer; - /** When true, {@link GLXNVCopyImage} is supported. */ - public final boolean GLX_NV_copy_image; - /** When true, {@link GLXNVDelayBeforeSwap} is supported. */ - public final boolean GLX_NV_delay_before_swap; - /** When true, {@link GLXNVFloatBuffer} is supported. */ - public final boolean GLX_NV_float_buffer; - /** When true, {@link GLXNVMultiGPUContext} is supported. */ - public final boolean GLX_NV_multigpu_context; - /** When true, {@link GLXNVMultisampleCoverage} is supported. */ - public final boolean GLX_NV_multisample_coverage; - /** When true, {@link GLXNVRobustnessVideoMemoryPurge} is supported. */ - public final boolean GLX_NV_robustness_video_memory_purge; - /** When true, {@link GLXNVSwapGroup} is supported. */ - public final boolean GLX_NV_swap_group; - /** When true, {@link GLXSGIMakeCurrentRead} is supported. */ - public final boolean GLX_SGI_make_current_read; - /** When true, {@link GLXSGISwapControl} is supported. */ - public final boolean GLX_SGI_swap_control; - /** When true, {@link GLXSGIVideoSync} is supported. */ - public final boolean GLX_SGI_video_sync; - /** When true, {@link GLXSGIXFBConfig} is supported. */ - public final boolean GLX_SGIX_fbconfig; - /** When true, {@link GLXSGIXPbuffer} is supported. */ - public final boolean GLX_SGIX_pbuffer; - /** When true, {@link GLXSGIXSwapBarrier} is supported. */ - public final boolean GLX_SGIX_swap_barrier; - /** When true, {@link GLXSGIXSwapGroup} is supported. */ - public final boolean GLX_SGIX_swap_group; - - GLXCapabilities(FunctionProvider provider, Set ext) { - long[] caps = new long[69]; - - GLX11 = check_GLX11(provider, caps, ext); - GLX12 = check_GLX12(provider, caps, ext); - GLX13 = check_GLX13(provider, caps, ext); - GLX14 = check_GLX14(provider, caps, ext); - GLX_AMD_gpu_association = check_GLX_AMD_gpu_association(provider, caps, ext); - GLX_ARB_context_flush_control = ext.contains("GLX_ARB_context_flush_control"); - GLX_ARB_create_context = check_GLX_ARB_create_context(provider, caps, ext); - GLX_ARB_create_context_no_error = ext.contains("GLX_ARB_create_context_no_error"); - GLX_ARB_create_context_profile = ext.contains("GLX_ARB_create_context_profile"); - GLX_ARB_create_context_robustness = ext.contains("GLX_ARB_create_context_robustness"); - GLX_ARB_fbconfig_float = ext.contains("GLX_ARB_fbconfig_float"); - GLX_ARB_framebuffer_sRGB = ext.contains("GLX_ARB_framebuffer_sRGB"); - GLX_ARB_get_proc_address = check_GLX_ARB_get_proc_address(provider, caps, ext); - GLX_ARB_multisample = ext.contains("GLX_ARB_multisample"); - GLX_ARB_robustness_application_isolation = ext.contains("GLX_ARB_robustness_application_isolation"); - GLX_ARB_robustness_share_group_isolation = ext.contains("GLX_ARB_robustness_share_group_isolation"); - GLX_ARB_vertex_buffer_object = ext.contains("GLX_ARB_vertex_buffer_object"); - GLX_EXT_buffer_age = ext.contains("GLX_EXT_buffer_age"); - GLX_EXT_context_priority = ext.contains("GLX_EXT_context_priority"); - GLX_EXT_create_context_es2_profile = ext.contains("GLX_EXT_create_context_es2_profile"); - GLX_EXT_create_context_es_profile = ext.contains("GLX_EXT_create_context_es_profile"); - GLX_EXT_fbconfig_packed_float = ext.contains("GLX_EXT_fbconfig_packed_float"); - GLX_EXT_framebuffer_sRGB = ext.contains("GLX_EXT_framebuffer_sRGB"); - GLX_EXT_get_drawable_type = ext.contains("GLX_EXT_get_drawable_type"); - GLX_EXT_import_context = check_GLX_EXT_import_context(provider, caps, ext); - GLX_EXT_no_config_context = ext.contains("GLX_EXT_no_config_context"); - GLX_EXT_stereo_tree = ext.contains("GLX_EXT_stereo_tree"); - GLX_EXT_swap_control = check_GLX_EXT_swap_control(provider, caps, ext); - GLX_EXT_swap_control_tear = ext.contains("GLX_EXT_swap_control_tear"); - GLX_EXT_texture_from_pixmap = check_GLX_EXT_texture_from_pixmap(provider, caps, ext); - GLX_EXT_visual_info = ext.contains("GLX_EXT_visual_info"); - GLX_EXT_visual_rating = ext.contains("GLX_EXT_visual_rating"); - GLX_INTEL_swap_event = ext.contains("GLX_INTEL_swap_event"); - GLX_NV_copy_buffer = check_GLX_NV_copy_buffer(provider, caps, ext); - GLX_NV_copy_image = check_GLX_NV_copy_image(provider, caps, ext); - GLX_NV_delay_before_swap = check_GLX_NV_delay_before_swap(provider, caps, ext); - GLX_NV_float_buffer = ext.contains("GLX_NV_float_buffer"); - GLX_NV_multigpu_context = ext.contains("GLX_NV_multigpu_context"); - GLX_NV_multisample_coverage = ext.contains("GLX_NV_multisample_coverage"); - GLX_NV_robustness_video_memory_purge = ext.contains("GLX_NV_robustness_video_memory_purge"); - GLX_NV_swap_group = check_GLX_NV_swap_group(provider, caps, ext); - GLX_SGI_make_current_read = check_GLX_SGI_make_current_read(provider, caps, ext); - GLX_SGI_swap_control = check_GLX_SGI_swap_control(provider, caps, ext); - GLX_SGI_video_sync = check_GLX_SGI_video_sync(provider, caps, ext); - GLX_SGIX_fbconfig = check_GLX_SGIX_fbconfig(provider, caps, ext); - GLX_SGIX_pbuffer = check_GLX_SGIX_pbuffer(provider, caps, ext); - GLX_SGIX_swap_barrier = check_GLX_SGIX_swap_barrier(provider, caps, ext); - GLX_SGIX_swap_group = check_GLX_SGIX_swap_group(provider, caps, ext); - - glXQueryExtensionsString = caps[0]; - glXGetClientString = caps[1]; - glXQueryServerString = caps[2]; - glXGetCurrentDisplay = caps[3]; - glXGetFBConfigs = caps[4]; - glXChooseFBConfig = caps[5]; - glXGetFBConfigAttrib = caps[6]; - glXGetVisualFromFBConfig = caps[7]; - glXCreateWindow = caps[8]; - glXCreatePixmap = caps[9]; - glXDestroyPixmap = caps[10]; - glXCreatePbuffer = caps[11]; - glXDestroyPbuffer = caps[12]; - glXQueryDrawable = caps[13]; - glXCreateNewContext = caps[14]; - glXMakeContextCurrent = caps[15]; - glXGetCurrentReadDrawable = caps[16]; - glXQueryContext = caps[17]; - glXSelectEvent = caps[18]; - glXGetSelectedEvent = caps[19]; - glXGetProcAddress = caps[20]; - glXBlitContextFramebufferAMD = caps[21]; - glXCreateAssociatedContextAMD = caps[22]; - glXCreateAssociatedContextAttribsAMD = caps[23]; - glXDeleteAssociatedContextAMD = caps[24]; - glXGetContextGPUIDAMD = caps[25]; - glXGetCurrentAssociatedContextAMD = caps[26]; - glXGetGPUIDsAMD = caps[27]; - glXGetGPUInfoAMD = caps[28]; - glXMakeAssociatedContextCurrentAMD = caps[29]; - glXCreateContextAttribsARB = caps[30]; - glXGetProcAddressARB = caps[31]; - glXGetCurrentDisplayEXT = caps[32]; - glXQueryContextInfoEXT = caps[33]; - glXGetContextIDEXT = caps[34]; - glXImportContextEXT = caps[35]; - glXFreeContextEXT = caps[36]; - glXSwapIntervalEXT = caps[37]; - glXBindTexImageEXT = caps[38]; - glXReleaseTexImageEXT = caps[39]; - glXCopyBufferSubDataNV = caps[40]; - glXNamedCopyBufferSubDataNV = caps[41]; - glXCopyImageSubDataNV = caps[42]; - glXDelayBeforeSwapNV = caps[43]; - glXJoinSwapGroupNV = caps[44]; - glXBindSwapBarrierNV = caps[45]; - glXQuerySwapGroupNV = caps[46]; - glXQueryMaxSwapGroupsNV = caps[47]; - glXQueryFrameCountNV = caps[48]; - glXResetFrameCountNV = caps[49]; - glXMakeCurrentReadSGI = caps[50]; - glXGetCurrentReadDrawableSGI = caps[51]; - glXSwapIntervalSGI = caps[52]; - glXGetVideoSyncSGI = caps[53]; - glXWaitVideoSyncSGI = caps[54]; - glXGetFBConfigAttribSGIX = caps[55]; - glXChooseFBConfigSGIX = caps[56]; - glXCreateGLXPixmapWithConfigSGIX = caps[57]; - glXCreateContextWithConfigSGIX = caps[58]; - glXGetVisualFromFBConfigSGIX = caps[59]; - glXGetFBConfigFromVisualSGIX = caps[60]; - glXCreateGLXPbufferSGIX = caps[61]; - glXDestroyGLXPbufferSGIX = caps[62]; - glXQueryGLXPbufferSGIX = caps[63]; - glXSelectEventSGIX = caps[64]; - glXGetSelectedEventSGIX = caps[65]; - glXBindSwapBarrierSGIX = caps[66]; - glXQueryMaxSwapBarriersSGIX = caps[67]; - glXJoinSwapGroupSGIX = caps[68]; - } - - private static boolean check_GLX11(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX11")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 0, 1, 2 - }, - "glXQueryExtensionsString", "glXGetClientString", "glXQueryServerString" - ) || reportMissing("GLX", "GLX11"); - } - - private static boolean check_GLX12(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX12")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 3 - }, - "glXGetCurrentDisplay" - ) || reportMissing("GLX", "GLX12"); - } - - private static boolean check_GLX13(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX13")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 - }, - "glXGetFBConfigs", "glXChooseFBConfig", "glXGetFBConfigAttrib", "glXGetVisualFromFBConfig", "glXCreateWindow", "glXCreatePixmap", - "glXDestroyPixmap", "glXCreatePbuffer", "glXDestroyPbuffer", "glXQueryDrawable", "glXCreateNewContext", "glXMakeContextCurrent", - "glXGetCurrentReadDrawable", "glXQueryContext", "glXSelectEvent", "glXGetSelectedEvent" - ) || reportMissing("GLX", "GLX13"); - } - - private static boolean check_GLX14(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX14")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 20 - }, - "glXGetProcAddress" - ) || reportMissing("GLX", "GLX14"); - } - - private static boolean check_GLX_AMD_gpu_association(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_AMD_gpu_association")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 21, 22, 23, 24, 25, 26, 27, 28, 29 - }, - "glXBlitContextFramebufferAMD", "glXCreateAssociatedContextAMD", "glXCreateAssociatedContextAttribsAMD", "glXDeleteAssociatedContextAMD", - "glXGetContextGPUIDAMD", "glXGetCurrentAssociatedContextAMD", "glXGetGPUIDsAMD", "glXGetGPUInfoAMD", "glXMakeAssociatedContextCurrentAMD" - ) || reportMissing("GLX", "GLX_AMD_gpu_association"); - } - - private static boolean check_GLX_ARB_create_context(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_ARB_create_context")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 30 - }, - "glXCreateContextAttribsARB" - ) || reportMissing("GLX", "GLX_ARB_create_context"); - } - - private static boolean check_GLX_ARB_get_proc_address(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_ARB_get_proc_address")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 31 - }, - "glXGetProcAddressARB" - ) || reportMissing("GLX", "GLX_ARB_get_proc_address"); - } - - private static boolean check_GLX_EXT_import_context(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_EXT_import_context")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 32, 33, 34, 35, 36 - }, - "glXGetCurrentDisplayEXT", "glXQueryContextInfoEXT", "glXGetContextIDEXT", "glXImportContextEXT", "glXFreeContextEXT" - ) || reportMissing("GLX", "GLX_EXT_import_context"); - } - - private static boolean check_GLX_EXT_swap_control(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_EXT_swap_control")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 37 - }, - "glXSwapIntervalEXT" - ) || reportMissing("GLX", "GLX_EXT_swap_control"); - } - - private static boolean check_GLX_EXT_texture_from_pixmap(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_EXT_texture_from_pixmap")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 38, 39 - }, - "glXBindTexImageEXT", "glXReleaseTexImageEXT" - ) || reportMissing("GLX", "GLX_EXT_texture_from_pixmap"); - } - - private static boolean check_GLX_NV_copy_buffer(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_NV_copy_buffer")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 40, 41 - }, - "glXCopyBufferSubDataNV", "glXNamedCopyBufferSubDataNV" - ) || reportMissing("GLX", "GLX_NV_copy_buffer"); - } - - private static boolean check_GLX_NV_copy_image(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_NV_copy_image")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 42 - }, - "glXCopyImageSubDataNV" - ) || reportMissing("GLX", "GLX_NV_copy_image"); - } - - private static boolean check_GLX_NV_delay_before_swap(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_NV_delay_before_swap")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 43 - }, - "glXDelayBeforeSwapNV" - ) || reportMissing("GLX", "GLX_NV_delay_before_swap"); - } - - private static boolean check_GLX_NV_swap_group(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_NV_swap_group")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 44, 45, 46, 47, 48, 49 - }, - "glXJoinSwapGroupNV", "glXBindSwapBarrierNV", "glXQuerySwapGroupNV", "glXQueryMaxSwapGroupsNV", "glXQueryFrameCountNV", "glXResetFrameCountNV" - ) || reportMissing("GLX", "GLX_NV_swap_group"); - } - - private static boolean check_GLX_SGI_make_current_read(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_SGI_make_current_read")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 50, 51 - }, - "glXMakeCurrentReadSGI", "glXGetCurrentReadDrawableSGI" - ) || reportMissing("GLX", "GLX_SGI_make_current_read"); - } - - private static boolean check_GLX_SGI_swap_control(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_SGI_swap_control")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 52 - }, - "glXSwapIntervalSGI" - ) || reportMissing("GLX", "GLX_SGI_swap_control"); - } - - private static boolean check_GLX_SGI_video_sync(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_SGI_video_sync")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 53, 54 - }, - "glXGetVideoSyncSGI", "glXWaitVideoSyncSGI" - ) || reportMissing("GLX", "GLX_SGI_video_sync"); - } - - private static boolean check_GLX_SGIX_fbconfig(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_SGIX_fbconfig")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 55, 56, 57, 58, 59, 60 - }, - "glXGetFBConfigAttribSGIX", "glXChooseFBConfigSGIX", "glXCreateGLXPixmapWithConfigSGIX", "glXCreateContextWithConfigSGIX", - "glXGetVisualFromFBConfigSGIX", "glXGetFBConfigFromVisualSGIX" - ) || reportMissing("GLX", "GLX_SGIX_fbconfig"); - } - - private static boolean check_GLX_SGIX_pbuffer(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_SGIX_pbuffer")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 61, 62, 63, 64, 65 - }, - "glXCreateGLXPbufferSGIX", "glXDestroyGLXPbufferSGIX", "glXQueryGLXPbufferSGIX", "glXSelectEventSGIX", "glXGetSelectedEventSGIX" - ) || reportMissing("GLX", "GLX_SGIX_pbuffer"); - } - - private static boolean check_GLX_SGIX_swap_barrier(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_SGIX_swap_barrier")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 66, 67 - }, - "glXBindSwapBarrierSGIX", "glXQueryMaxSwapBarriersSGIX" - ) || reportMissing("GLX", "GLX_SGIX_swap_barrier"); - } - - private static boolean check_GLX_SGIX_swap_group(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("GLX_SGIX_swap_group")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 68 - }, - "glXJoinSwapGroupSGIX" - ) || reportMissing("GLX", "GLX_SGIX_swap_group"); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTBufferAge.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTBufferAge.java deleted file mode 100644 index 6c16db1d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTBufferAge.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_buffer_age extension. - * - *

    The aim of this extension is to expose enough information to applications about how the driver manages the set of front and back buffers associated with - * a given surface to allow applications to re-use the contents of old frames and minimize how much must be redrawn for the next frame.

    - * - *

    Requires {@link GLX14 GLX 1.4}.

    - */ -public final class GLXEXTBufferAge { - - /** Accepted by {@link GLX13#glXQueryDrawable QueryDrawable}. */ - public static final int GLX_BACK_BUFFER_AGE_EXT = 0x20F4; - - private GLXEXTBufferAge() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTContextPriority.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTContextPriority.java deleted file mode 100644 index 1e2acc80..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTContextPriority.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_context_priority extension. - * - *

    This extension allows a {@code GLXContext} to be created with a priority hint. It is possible that an implementation will not honour the hint, - * especially if there are constraints on the number of high priority contexts available in the system, or system policy limits access to high priority - * contexts to appropriate system privilege level. A query is provided to find the real priority level assigned to the context after creation.

    - * - *

    Requires {@link GLXARBCreateContext GLX_ARB_create_context}.

    - */ -public final class GLXEXTContextPriority { - - /** New attributes accepted by the {@code attrib_list} argument of {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int GLX_CONTEXT_PRIORITY_LEVEL_EXT = 0x3100; - - /** New attribute values accepted in the {@code attrib_list} argument of {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int - GLX_CONTEXT_PRIORITY_HIGH_EXT = 0x3101, - GLX_CONTEXT_PRIORITY_MEDIUM_EXT = 0x3102, - GLX_CONTEXT_PRIORITY_LOW_EXT = 0x3103; - - private GLXEXTContextPriority() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTCreateContextES2Profile.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTCreateContextES2Profile.java deleted file mode 100644 index eda886ef..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTCreateContextES2Profile.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_create_context_es2_profile extension. - * - *

    This extension allows creating an OpenGL ES context.

    - * - *

    Requires {@link GLX14 GLX 1.4}, {@link GLXARBCreateContext GLX_ARB_create_context}, {@link GLXARBCreateContextProfile GLX_ARB_create_context_profile} and an OpenGL ES implemenation.

    - */ -public final class GLXEXTCreateContextES2Profile { - - /** Accepted as a bit in the attribute value for {@link GLXARBCreateContextProfile#GLX_CONTEXT_PROFILE_MASK_ARB CONTEXT_PROFILE_MASK_ARB} in {@code attrib_list}. */ - public static final int GLX_CONTEXT_ES2_PROFILE_BIT_EXT = 0x4; - - private GLXEXTCreateContextES2Profile() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTCreateContextESProfile.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTCreateContextESProfile.java deleted file mode 100644 index 00daa1c6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTCreateContextESProfile.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_create_context_es_profile extension. - * - *

    This extension allows creating an OpenGL ES context.

    - * - *

    Requires {@link GLX14 GLX 1.4}, {@link GLXARBCreateContext GLX_ARB_create_context}, {@link GLXARBCreateContextProfile GLX_ARB_create_context_profile} and an OpenGL ES implemenation.

    - */ -public final class GLXEXTCreateContextESProfile { - - /** Accepted as a bit in the attribute value for {@link GLXARBCreateContextProfile#GLX_CONTEXT_PROFILE_MASK_ARB CONTEXT_PROFILE_MASK_ARB} in {@code attrib_list}. */ - public static final int GLX_CONTEXT_ES_PROFILE_BIT_EXT = 0x4; - - private GLXEXTCreateContextESProfile() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTFBConfigPackedFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTFBConfigPackedFloat.java deleted file mode 100644 index 9ccabe10..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTFBConfigPackedFloat.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_fbconfig_packed_float extension. - * - *

    This extension adds a new 3-component floating-point texture format that fits within a single 32-bit word. This format stores 5 bits of biased exponent - * per component in the same manner as 16-bit floating-point formats, but rather than 10 mantissa bits, the red, green, and blue components have 6, 6, and - * 5 bits respectively. Each mantissa is assumed to have an implied leading one except in the denorm exponent case. There is no sign bit so only - * non-negative values can be represented. Positive infinity, positive denorms, and positive NaN values are representable. The value of the fourth - * component returned by a texture fetch is always 1.0.

    - * - *

    This extension also provides support for rendering into an unsigned floating-point rendering format with the assumption that the texture format - * described above could also be advertised as an unsigned floating-point format for rendering.

    - * - *

    The extension also provides a pixel external format for specifying packed float values directly.

    - * - *

    Requires {@link GLX13 GLX 1.3}.

    - */ -public final class GLXEXTFBConfigPackedFloat { - - /** Accepted as values of the {@code render_type} arguments in the {@link GLX13#glXCreateNewContext CreateNewContext} and {@link GLX#glXCreateContext CreateContext} functions. */ - public static final int GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT = 0x20B1; - - /** - * Returned by {@link GLX13#glXGetFBConfigAttrib GetFBConfigAttrib} (when {@code attribute} is set to GLX_RENDER_TYPE) and accepted by the {@code attrib_list} parameter of - * {@link GLX13#glXChooseFBConfig ChooseFBConfig} (following the GLX_RENDER_TYPE token). - */ - public static final int GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT = 0x8; - - private GLXEXTFBConfigPackedFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTFramebufferSRGB.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTFramebufferSRGB.java deleted file mode 100644 index 6aaee7d7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTFramebufferSRGB.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_framebuffer_sRGB extension. - * - *

    GLX functionality for {@link EXTFramebufferSRGB EXT_framebuffer_sRGB}.

    - */ -public final class GLXEXTFramebufferSRGB { - - /** Accepted by the {@code attribList} parameter of glXChooseVisual, and by the {@code attrib} parameter of glXGetConfig. */ - public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20B2; - - private GLXEXTFramebufferSRGB() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTImportContext.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTImportContext.java deleted file mode 100644 index 7b5d27ba..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTImportContext.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_EXT_import_context extension. - * - *

    This extension allows multiple X clients to share an indirect rendering context.

    - * - *

    Additional convenience procedures to get the current Display* bound to a context as well as other context information are also added.

    - */ -public class GLXEXTImportContext { - - /** Accepted by the {@code attribute} parameter of {@link #glXQueryContextInfoEXT QueryContextInfoEXT}. */ - public static final int - GLX_SHARE_CONTEXT_EXT = 0x800A, - GLX_VISUAL_ID_EXT = 0x800B, - GLX_SCREEN_EXT = 0x800C; - - protected GLXEXTImportContext() { - throw new UnsupportedOperationException(); - } - - // --- [ glXGetCurrentDisplayEXT ] --- - - /** Returns the display associated with the current context. */ - @NativeType("Display *") - public static long glXGetCurrentDisplayEXT() { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetCurrentDisplayEXT; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - - // --- [ glXQueryContextInfoEXT ] --- - - /** Unsafe version of: {@link #glXQueryContextInfoEXT QueryContextInfoEXT} */ - public static int nglXQueryContextInfoEXT(long display, long context, int attribute, long value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryContextInfoEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - check(context); - } - return callPPPI(display, context, attribute, value, __functionAddress); - } - - /** - * Obtains the value of a context's attribute. - * - * @param display the connection to the X server - * @param context the context being queried - * @param attribute the attribute to query - * @param value returns the attribute value - */ - public static int glXQueryContextInfoEXT(@NativeType("Display *") long display, @NativeType("GLXContext") long context, int attribute, @NativeType("int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nglXQueryContextInfoEXT(display, context, attribute, memAddress(value)); - } - - // --- [ glXGetContextIDEXT ] --- - - /** - * Returns the XID of a GLXContext. - * - * @param context the context - */ - @NativeType("GLXContextID") - public static long glXGetContextIDEXT(@NativeType("GLXContext const") long context) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetContextIDEXT; - if (CHECKS) { - check(__functionAddress); - check(context); - } - return callPN(context, __functionAddress); - } - - // --- [ glXImportContextEXT ] --- - - /** - * May be used in place of glXCreateContext to share another process's indirect rendering context. - * - * @param display the connection to the X server - * @param contextID the context XID - */ - @NativeType("GLXContext") - public static long glXImportContextEXT(@NativeType("Display *") long display, @NativeType("GLXContextID") long contextID) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXImportContextEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPNP(display, contextID, __functionAddress); - } - - // --- [ glXFreeContextEXT ] --- - - /** - * Frees the client-side part of a GLXContext that was created with {@link #glXImportContextEXT ImportContextEXT}. - * - * @param display the connection to the X server - * @param context the context to free - */ - public static void glXFreeContextEXT(@NativeType("Display *") long display, @NativeType("GLXContext") long context) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXFreeContextEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - check(context); - } - callPPV(display, context, __functionAddress); - } - - /** Array version of: {@link #glXQueryContextInfoEXT QueryContextInfoEXT} */ - public static int glXQueryContextInfoEXT(@NativeType("Display *") long display, @NativeType("GLXContext") long context, int attribute, @NativeType("int *") int[] value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryContextInfoEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - check(context); - check(value, 1); - } - return callPPPI(display, context, attribute, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTStereoTree.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTStereoTree.java deleted file mode 100644 index 1bfd8664..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTStereoTree.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_stereo_tree extension. - * - *

    When using stereoscopic rendering with the X composite extension, a stereo-aware GLX composite manager can be used to composite both the left and right - * buffers of a window's backing pixmap to the left and right buffers of the root or composite overlay window to preserve the stereo effect of a - * redirected window or any of its child windows. However, to do this, the composite manager needs a method to determine which windows have both left and - * right buffers available without needing to walk entire window trees or be aware of other clients' GLX drawables.

    - * - *

    This extension provides a new drawable tree query, which can be used by the composite manager when it begins tracking a window, and an event, which can - * be used to listen for updates to a tracked window. This query and event provide the composite manager with a boolean value representing the stereo - * status of an entire redirected window tree. With this information, the composite manager is able to properly choose between a stereoscopic or - * monoscopic format when creating a GLXPixmap for a given window tree's backing pixmap.

    - */ -public final class GLXEXTStereoTree { - - /** Accepted by the {@code attribute} parameter of glXQueryDrawable and glXQueryGLXPbufferSGIX. */ - public static final int GLX_STEREO_TREE_EXT = 0x20F5; - - /** - * Accepted in the {@code event_mask} parameter of glXSelectEvent and glXSelectEventSGIX, and returned in the {@code event_mask} parameter of - * glXGetSelectedEvent and glXGetSelectedEventSGIX. - */ - public static final int GLX_STEREO_NOTIFY_MASK_EXT = 0x1; - - /** Returned in the {@code evtype} field of XGenericEventCookie events. */ - public static final int GLX_STEREO_NOTIFY_EXT = 0x0; - - private GLXEXTStereoTree() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTSwapControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTSwapControl.java deleted file mode 100644 index 389ce848..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTSwapControl.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the GLX_EXT_swap_control extension. - * - *

    This extension allows an application to specify a minimum periodicity of color buffer swaps, measured in video frame periods, for a particular drawable. - * It also allows an application to query the swap interval and the implementation-dependent maximum swap interval of a drawable.

    - */ -public class GLXEXTSwapControl { - - /** The current swap interval and implementation-dependent max swap interval for a particular drawable. */ - public static final int - GLX_SWAP_INTERVAL_EXT = 0x20F1, - GLX_MAX_SWAP_INTERVAL_EXT = 0x20F2; - - protected GLXEXTSwapControl() { - throw new UnsupportedOperationException(); - } - - // --- [ glXSwapIntervalEXT ] --- - - /** - * Specifies the minimum number of video frame periods per buffer swap for a particular GLX drawable (e.g. a value of two means that the color buffers will - * be swapped at most every other video frame). The interval takes effect when {@link GLX#glXSwapBuffers SwapBuffers} is first called on the drawable subsequent to the - * {@code glXSwapIntervalEXT} call. - * - * @param display the connection to the X server - * @param drawable the drawable - * @param interval the swap interval - */ - public static void glXSwapIntervalEXT(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, int interval) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXSwapIntervalEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - callPPV(display, drawable, interval, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTSwapControlTear.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTSwapControlTear.java deleted file mode 100644 index 1b847d26..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTSwapControlTear.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_swap_control_tear extension. - * - *

    This extension extends the existing GLX_EXT_swap_control extension by allowing a negative {@code interval} parameter to - * {@link GLXEXTSwapControl#glXSwapIntervalEXT SwapIntervalEXT}. The negative {@code interval} allows late swaps to occur without synchronization to the video frame. This - * reduces the visual stutter on late frames and reduces the stall on subsequent frames.

    - * - *

    Requires {@link GLXEXTSwapControl GLX_EXT_swap_control}.

    - */ -public final class GLXEXTSwapControlTear { - - /** Accepted by {@link GLX13#glXQueryDrawable QueryDrawable}. */ - public static final int GLX_LATE_SWAPS_TEAR_EXT = 0x20F3; - - private GLXEXTSwapControlTear() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTTextureFromPixmap.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTTextureFromPixmap.java deleted file mode 100644 index 02316a1e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTTextureFromPixmap.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_EXT_texture_from_pixmap extension. - * - *

    This extension allows a color buffer to be used for both rendering and texturing.

    - * - *

    Requires {@link GLX13 GLX 1.3}.

    - */ -public class GLXEXTTextureFromPixmap { - - /** Accepted by the {@code attribute} parameter of {@link GLX13#glXGetFBConfigAttrib GetFBConfigAttrib} and the {@code attrib_list} parameter of {@link GLX13#glXChooseFBConfig ChooseFBConfig}. */ - public static final int - GLX_BIND_TO_TEXTURE_RGB_EXT = 0x20D0, - GLX_BIND_TO_TEXTURE_RGBA_EXT = 0x20D1, - GLX_BIND_TO_MIPMAP_TEXTURE_EXT = 0x20D2, - GLX_BIND_TO_TEXTURE_TARGETS_EXT = 0x20D3, - GLX_Y_INVERTED_EXT = 0x20D4; - - /** Accepted as an attribute in the {@code attrib_list} parameter of {@link GLX13#glXCreatePixmap CreatePixmap}, and by the {@code attribute} parameter of {@link GLX13#glXQueryDrawable QueryDrawable}. */ - public static final int - GLX_TEXTURE_FORMAT_EXT = 0x20D5, - GLX_TEXTURE_TARGET_EXT = 0x20D6, - GLX_MIPMAP_TEXTURE_EXT = 0x20D7; - - /** - * Accepted as a value in the {@code attrib_list} parameter of {@link GLX13#glXCreatePixmap CreatePixmap} and returned in the {@code value} parameter of - * {@link GLX13#glXQueryDrawable QueryDrawable} when {@code attribute} is {@link #GLX_TEXTURE_FORMAT_EXT TEXTURE_FORMAT_EXT}. - */ - public static final int - GLX_TEXTURE_FORMAT_NONE_EXT = 0x20D8, - GLX_TEXTURE_FORMAT_RGB_EXT = 0x20D9, - GLX_TEXTURE_FORMAT_RGBA_EXT = 0x20DA; - - /** Accepted as bits in the {@link #GLX_BIND_TO_TEXTURE_TARGETS_EXT BIND_TO_TEXTURE_TARGETS_EXT} variable. */ - public static final int - GLX_TEXTURE_1D_BIT_EXT = 0x1, - GLX_TEXTURE_2D_BIT_EXT = 0x2, - GLX_TEXTURE_RECTANGLE_BIT_EXT = 0x4; - - /** - * Accepted as a value in the {@code attrib_list} parameter of {@link GLX13#glXCreatePixmap CreatePixmap} and returned in the {@code value} parameter of - * {@link GLX13#glXQueryDrawable QueryDrawable} when {@code attribute} is {@link #GLX_TEXTURE_TARGET_EXT TEXTURE_TARGET_EXT}. - */ - public static final int - GLX_TEXTURE_1D_EXT = 0x20DB, - GLX_TEXTURE_2D_EXT = 0x20DC, - GLX_TEXTURE_RECTANGLE_EXT = 0x20DD; - - /** Accepted by the {@code buffer} parameter of {@link #glXBindTexImageEXT BindTexImageEXT} and {@link #glXReleaseTexImageEXT ReleaseTexImageEXT}. */ - public static final int - GLX_FRONT_LEFT_EXT = 0x20DE, - GLX_FRONT_RIGHT_EXT = 0x20DF, - GLX_BACK_LEFT_EXT = 0x20E0, - GLX_BACK_RIGHT_EXT = 0x20E1, - GLX_FRONT_EXT = GLX_FRONT_LEFT_EXT, - GLX_BACK_EXT = GLX_BACK_LEFT_EXT, - GLX_AUX0_EXT = 0x20E2, - GLX_AUX1_EXT = 0x20E3, - GLX_AUX2_EXT = 0x20E4, - GLX_AUX3_EXT = 0x20E5, - GLX_AUX4_EXT = 0x20E6, - GLX_AUX5_EXT = 0x20E7, - GLX_AUX6_EXT = 0x20E8, - GLX_AUX7_EXT = 0x20E9, - GLX_AUX8_EXT = 0x20EA, - GLX_AUX9_EXT = 0x20EB; - - protected GLXEXTTextureFromPixmap() { - throw new UnsupportedOperationException(); - } - - // --- [ glXBindTexImageEXT ] --- - - /** Unsafe version of: {@link #glXBindTexImageEXT BindTexImageEXT} */ - public static void nglXBindTexImageEXT(long display, long drawable, int buffer, long attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXBindTexImageEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - callPPPV(display, drawable, buffer, attrib_list, __functionAddress); - } - - /** - * Defines a one- or two-dimensional texture image. The texture image is taken from {@code buffer} and need not be copied. The texture target, the texture - * format, and the size of the texture components are derived from attributes of {@code drawable}. - * - * @param display the connection to the X server - * @param drawable the drawable - * @param buffer the buffer - * @param attrib_list an optional null-terminated list of attributes - */ - public static void glXBindTexImageEXT(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, int buffer, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - nglXBindTexImageEXT(display, drawable, buffer, memAddressSafe(attrib_list)); - } - - // --- [ glXReleaseTexImageEXT ] --- - - /** - * Releases a color buffer that is being used as a texture. - * - * @param display the connection to the X server - * @param drawable the drawable - * @param buffer the buffer - */ - public static void glXReleaseTexImageEXT(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, int buffer) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXReleaseTexImageEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - callPPV(display, drawable, buffer, __functionAddress); - } - - /** Array version of: {@link #glXBindTexImageEXT BindTexImageEXT} */ - public static void glXBindTexImageEXT(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, int buffer, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXBindTexImageEXT; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - checkNTSafe(attrib_list); - } - callPPPV(display, drawable, buffer, attrib_list, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTVisualInfo.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTVisualInfo.java deleted file mode 100644 index fdcaca2a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTVisualInfo.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_visual_info extension. - * - *

    This extension allows the user to request a particular X visual type to be associated with a GLX visual, and allows the user to query the X visual type - * underlying a GLX visual.

    - * - *

    In addition, this extension provides a means to request a visual with a transparent pixel and to query whether a visual supports a transparent pixel - * value and the value of the transparent pixel. Note that the notion of level and transparent pixels are orthogonal as both layer 1 and layer 0 visuals - * may or may not have a transparent pixel value.

    - */ -public final class GLXEXTVisualInfo { - - /** Accepted by the {@code attrib} parameter of {@link GLX#glXGetConfig GetConfig}, and by the {@code attrib_list} parameter of {@link GLX#glXChooseVisual ChooseVisual}. */ - public static final int - GLX_X_VISUAL_TYPE_EXT = 0x22, - GLX_TRANSPARENT_TYPE_EXT = 0x23, - GLX_TRANSPARENT_INDEX_VALUE_EXT = 0x24, - GLX_TRANSPARENT_RED_VALUE_EXT = 0x25, - GLX_TRANSPARENT_GREEN_VALUE_EXT = 0x26, - GLX_TRANSPARENT_BLUE_VALUE_EXT = 0x27, - GLX_TRANSPARENT_ALPHA_VALUE_EXT = 0x28; - - /** - * Returned by {@link GLX#glXGetConfig GetConfig}, and accepted by the {@code attrib_list} parameter of {@link GLX#glXChooseVisual ChooseVisual} (following the - * {@link #GLX_X_VISUAL_TYPE_EXT X_VISUAL_TYPE_EXT} token). - */ - public static final int - GLX_TRUE_COLOR_EXT = 0x8002, - GLX_DIRECT_COLOR_EXT = 0x8003, - GLX_PSEUDO_COLOR_EXT = 0x8004, - GLX_STATIC_COLOR_EXT = 0x8005, - GLX_GRAY_SCALE_EXT = 0x8006, - GLX_STATIC_GRAY_EXT = 0x8007; - - /** - * Returned by {@link GLX#glXGetConfig GetConfig}, and accepted by the {@code attrib_list} parameter of {@link GLX#glXChooseVisual ChooseVisual} (following the - * {@link #GLX_TRANSPARENT_TYPE_EXT TRANSPARENT_TYPE_EXT} token). - */ - public static final int - GLX_NONE_EXT = 0x8000, - GLX_TRANSPARENT_RGB_EXT = 0x8008, - GLX_TRANSPARENT_INDEX_EXT = 0x8009; - - private GLXEXTVisualInfo() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTVisualRating.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTVisualRating.java deleted file mode 100644 index 247e2605..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXEXTVisualRating.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_EXT_visual_rating extension. - * - *

    This extension allows servers to identify a particular GLX visual as undesirable. A new visual attribute is introduced, providing a way for servers to - * specify caveats (e.g., slow) for a visual. The attribute may be queried using {@link GLX#glXGetConfig GetConfig}, and can therefore be used by - * application-specific visual selection routines. The new attribute is also used by {@link GLX#glXChooseVisual ChooseVisual} to discriminate against visuals with - * caveats.

    - * - *

    This extension allows servers to export visuals with improved features or image quality, but lower performance or greater system burden, without having - * to have these visuals selected preferentially. It is intended to insure that most applications get the "right" visual, not that all applications do.

    - */ -public final class GLXEXTVisualRating { - - /** Accepted by the {@code attribute} parameter of {@link GLX#glXGetConfig GetConfig} and by the {@code attrib_list} parameter of {@link GLX#glXChooseVisual ChooseVisual}. */ - public static final int GLX_VISUAL_CAVEAT_EXT = 0x20; - - /** - * Returned by the {@code value} parameter of {@link GLX#glXGetConfig GetConfig} (when {@code attribute} is set to {@link #GLX_VISUAL_CAVEAT_EXT VISUAL_CAVEAT_EXT}) and accepted by the {@code attrib_list} - * parameter of {@link GLX#glXChooseVisual ChooseVisual} (following the {@link #GLX_VISUAL_CAVEAT_EXT VISUAL_CAVEAT_EXT} token). - */ - public static final int - GLX_NONE_EXT = 0x8000, - GLX_SLOW_VISUAL_EXT = 0x8001, - GLX_NON_CONFORMANT_VISUAL_EXT = 0x800D; - - private GLXEXTVisualRating() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXINTELSwapEvent.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXINTELSwapEvent.java deleted file mode 100644 index ad1a8e3c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXINTELSwapEvent.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_INTEL_swap_event extension. - * - *

    This extension adds a new event type, {@link #GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK BUFFER_SWAP_COMPLETE_INTEL_MASK}, which is sent to the client via the X11 event stream and - * selected/consumed by the normal GLX event mask mechanisms, to indicate when a previously queued swap has completed.

    - * - *

    Requires {@link GLX13 GLX 1.3}.

    - */ -public final class GLXINTELSwapEvent { - - /** Accepted by the {@code mask} parameter of {@link GLX13#glXSelectEvent SelectEvent} and returned in the {@code mask} parameter of {@link GLX13#glXGetSelectedEvent GetSelectedEvent}. */ - public static final int GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK = 0x4000000; - - /** Returned in the {@code event_type} field of a "swap complete" event. */ - public static final int - GLX_EXCHANGE_COMPLETE_INTEL = 0x8180, - GLX_COPY_COMPLETE_INTEL = 0x8181, - GLX_FLIP_COMPLETE_INTEL = 0x8182; - - private GLXINTELSwapEvent() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVCopyBuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVCopyBuffer.java deleted file mode 100644 index a6a8e7d0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVCopyBuffer.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the GLX_NV_copy_buffer extension. - * - *

    Extends {@link ARBCopyBuffer ARB_copy_buffer} to have GLX bindings.

    - */ -public class GLXNVCopyBuffer { - - protected GLXNVCopyBuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ glXCopyBufferSubDataNV ] --- - - /** @param display the connection to the X server */ - public static void glXCopyBufferSubDataNV(@NativeType("Display *") long display, @NativeType("GLXContext") long readCtx, @NativeType("GLXContext") long writeCtx, @NativeType("GLenum") int readTarget, @NativeType("GLenum") int writeTarget, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCopyBufferSubDataNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(readCtx); - check(writeCtx); - } - callPPPPPPV(display, readCtx, writeCtx, readTarget, writeTarget, readOffset, writeOffset, size, __functionAddress); - } - - // --- [ glXNamedCopyBufferSubDataNV ] --- - - /** @param display the connection to the X server */ - public static void glXNamedCopyBufferSubDataNV(@NativeType("Display *") long display, @NativeType("GLXContext") long readCtx, @NativeType("GLXContext") long writeCtx, @NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXNamedCopyBufferSubDataNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(readCtx); - check(writeCtx); - } - callPPPPPPV(display, readCtx, writeCtx, readBuffer, writeBuffer, readOffset, writeOffset, size, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVCopyImage.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVCopyImage.java deleted file mode 100644 index b12cc6fc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVCopyImage.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the GLX_NV_copy_image extension. - * - *

    This extension enables efficient image data transfer between image objects (i.e. textures and renderbuffers) without the need to bind the objects or - * otherwise configure the rendering pipeline. The GLX version allows copying between images in different contexts, even if those contexts are in different - * sharelists or even on different physical devices.

    - */ -public class GLXNVCopyImage { - - protected GLXNVCopyImage() { - throw new UnsupportedOperationException(); - } - - // --- [ glXCopyImageSubDataNV ] --- - - /** - * Behaves identically to the core function {@link #glXCopyImageSubDataNV CopyImageSubDataNV}, except that the {@code srcCtx} and {@code dstCtx} parameters specify - * the contexts in which to look up the source and destination objects, respectively. A value of {@code NULL} for either context indicates that the value which is - * returned by {@link GLX#glXGetCurrentContext GetCurrentContext} should be used instead. Both contexts must share the same address space. - * - * @param display the connection to the X server - * @param srcCtx the source context - * @param dstCtx the destination context - */ - public static void glXCopyImageSubDataNV(@NativeType("Display *") long display, @NativeType("GLXContext") long srcCtx, @NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("GLXContext") long dstCtx, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCopyImageSubDataNV; - if (CHECKS) { - check(__functionAddress); - check(display); - } - callPPPV(display, srcCtx, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstCtx, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVDelayBeforeSwap.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVDelayBeforeSwap.java deleted file mode 100644 index cc93f007..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVDelayBeforeSwap.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the GLX_NV_delay_before_swap extension. - * - *

    For most interactive applications, the standard rendering loop responding to input events on a frame granularity is sufficient. Some more demanding - * applications may want to exchange performance for the ability to sample input closer to the final frame swap and adjust rendering accordingly. This - * extension adds functionality to allow the application to wait until a specified time before a swapbuffers command would be able to execute.

    - * - *

    Requires {@link GLX11 GLX11} and {@link GLXEXTSwapControl GLX_EXT_swap_control}.

    - */ -public class GLXNVDelayBeforeSwap { - - protected GLXNVDelayBeforeSwap() { - throw new UnsupportedOperationException(); - } - - // --- [ glXDelayBeforeSwapNV ] --- - - /** - * Blocks the CPU until {@code seconds} seconds before a synchronized swap would occur on a particular GLX window drawable. It also returns a boolean value - * equal to {@code True} when the implementation had to wait for the synchronized swap and {@code False} otherwise. - * - *

    The parameter {@code seconds} accepts positive floating point values not larger than the length in seconds of the swap period on the associated - * drawable. When buffer swaps are synchronized, the swap period is composed of one or multiple video frame periods. A video frame period is the time - * required by the monitor to display a full frame of video data. A swap interval set to a value of 2 means that the color buffers will be swapped at most - * every other video frame. If {@code seconds} is smaller than 0, {@code DelayBeforeSwapNV} will return False and will not wait for the end of the swap - * period. If {@code seconds} is greater than a swap period, {@code DelayBeforeSwapNV} will return immediately without generating any error and the return - * value will be False.

    - * - *

    The application should use a {@code seconds} delay large enough to have time to complete its work before the end of the swap period. If {@code seconds} - * is close to 0.0, the application may miss the end of the swap period and it will have to wait an additional swap period before it can swap.

    - * - *

    If {@code DelayBeforeSwapNV} detects that there is less than {@code seconds} seconds before the end of the swap period, it will return immediately and - * the return value will be False. The implementation will not wait an additional video frame period to have an exact delay of {@code seconds} seconds.

    - * - *

    If buffer swaps are unsynchronized, {@code DelayBeforeSwapNV} will return immediately and the return value will be False. It could happen for multiple - * reasons, for example if the swap interval is equal to 0, if the window is in a mode switch or if no monitors are active.

    - * - * @param display the connection to the X server - * @param drawable the window drawable - * @param seconds the delay, in seconds - */ - @NativeType("Bool") - public static boolean glXDelayBeforeSwapNV(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, @NativeType("GLfloat") float seconds) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXDelayBeforeSwapNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - return callPPI(display, drawable, seconds, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVFloatBuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVFloatBuffer.java deleted file mode 100644 index 00c5ecfd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVFloatBuffer.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_NV_float_buffer extension. - * - *

    GLX functionality for {@link NVFloatBuffer NV_float_buffer}.

    - */ -public final class GLXNVFloatBuffer { - - /** Accepted in the {@code value} array of glXGetFBConfigAttrib (and glXGetFBConfigAttribSGIX). */ - public static final int GLX_FLOAT_COMPONENTS_NV = 0x20B0; - - private GLXNVFloatBuffer() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVMultiGPUContext.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVMultiGPUContext.java deleted file mode 100644 index f8301b49..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVMultiGPUContext.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_NV_multigpu_context extension. - * - *

    This extension allows the creation of an OpenGL context in a multi-GPU environment with a specified multi-GPU strategy (known as SLI mode) which takes - * precedence over process-wide multi-GPU mode settings.

    - * - *

    The multi-GPU mode denotes vendor specific techniques to allow distributed rendering on multiple GPUs, further called AFR (alternate frame rendering) - * and Multicast (as defined in NV_gpu_multicast).

    - * - *

    OpenGL supports multiple contexts. The semantics of switching contexts is generally left to window system binding APIs such as WGL, GLX and EGL. The - * extension {@code GLX_NV_multigpu_context} allows to specify a preferred multi-GPU rendering mode per context, thus context switching can also switch - * the current multi-GPU rendering mode.

    - * - *

    In addition to the modes described above, this extension allows creating contexts in single mode to force all rendering to be done on a single GPU, and - * multi-display multicast mode to allow multicast rendering on a multi-display configuration where displays attached to multiple GPUs are linked together - * in a desktop configuration spanning multiple GPUs.

    - * - *

    The implementation is platform dependent and the actual multi-GPU rendering mode of the created context may vary on different hardware and operation - * system platforms.

    - * - *

    Requires {@link GLX14 GLX14} and {@link GLXARBCreateContext GLX_ARB_create_context}.

    - */ -public final class GLXNVMultiGPUContext { - - /** Accepted as an attribute name in the {@code *attrib_list} argument to {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int GLX_CONTEXT_MULTIGPU_ATTRIB_NV = 0x20AA; - - /** - * Accepted as an attribute value for {@link #GLX_CONTEXT_MULTIGPU_ATTRIB_NV CONTEXT_MULTIGPU_ATTRIB_NV} in the {@code *attrib_list} argument to - * {@link GLXARBCreateContext#glXCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int - GLX_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV = 0x20AB, - GLX_CONTEXT_MULTIGPU_ATTRIB_AFR_NV = 0x20AC, - GLX_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV = 0x20AD, - GLX_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV = 0x20AE; - - private GLXNVMultiGPUContext() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVMultisampleCoverage.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVMultisampleCoverage.java deleted file mode 100644 index 92541caa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVMultisampleCoverage.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_NV_multisample_coverage extension. - * - *

    GLX functionality for {@link NVMultisampleCoverage NV_multisample_coverage}.

    - */ -public final class GLXNVMultisampleCoverage { - - /** - * Accepted by the {@code attribList} parameter of glXChooseVisual, and by the {@code attrib} parameter of glXGetConfig, the - * {@code attrib_list} parameter of glXChooseFBConfig, and the {@code attribute} parameter of glXGetFBConfigAttrib. - */ - public static final int - GLX_COVERAGE_SAMPLES_NV = 100001, - GLX_COLOR_SAMPLES_NV = 0x20B3; - - private GLXNVMultisampleCoverage() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVRobustnessVideoMemoryPurge.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVRobustnessVideoMemoryPurge.java deleted file mode 100644 index a76cc53a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVRobustnessVideoMemoryPurge.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the GLX_NV_robustness_video_memory_purge extension. - * - *

    GLX functionality for {@link NVRobustnessVideoMemoryPurge NV_robustness_video_memory_purge}.

    - */ -public final class GLXNVRobustnessVideoMemoryPurge { - - /** Accepted as an attribute name in the {@code *attrib_list} argument of glXCreateContextAttribsARB. */ - public static final int GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV = 0x20F7; - - private GLXNVRobustnessVideoMemoryPurge() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVSwapGroup.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVSwapGroup.java deleted file mode 100644 index 3acbcea9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXNVSwapGroup.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_NV_swap_group extension. - * - *

    This extension provides the capability to synchronize the buffer swaps of a group of OpenGL windows. A swap group is created, and windows are added as - * members to the swap group. Buffer swaps to members of the swap group will then take place concurrently.

    - * - *

    This extension also provides the capability to sychronize the buffer swaps of different swap groups, which may reside on distributed systems on a - * network. For this purpose swap groups can be bound to a swap barrier.

    - * - *

    This extension extends the set of conditions that must be met before a buffer swap can take place.

    - */ -public class GLXNVSwapGroup { - - protected GLXNVSwapGroup() { - throw new UnsupportedOperationException(); - } - - // --- [ glXJoinSwapGroupNV ] --- - - /** @param display the connection to the X server */ - @NativeType("Bool") - public static boolean glXJoinSwapGroupNV(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, @NativeType("GLuint") int group) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXJoinSwapGroupNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - return callPPI(display, drawable, group, __functionAddress) != 0; - } - - // --- [ glXBindSwapBarrierNV ] --- - - /** @param display the connection to the X server */ - @NativeType("Bool") - public static boolean glXBindSwapBarrierNV(@NativeType("Display *") long display, @NativeType("GLuint") int group, @NativeType("GLuint") int barrier) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXBindSwapBarrierNV; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPI(display, group, barrier, __functionAddress) != 0; - } - - // --- [ glXQuerySwapGroupNV ] --- - - /** Unsafe version of: {@link #glXQuerySwapGroupNV QuerySwapGroupNV} */ - public static int nglXQuerySwapGroupNV(long display, long drawable, long group, long barrier) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQuerySwapGroupNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - return callPPPPI(display, drawable, group, barrier, __functionAddress); - } - - /** @param display the connection to the X server */ - @NativeType("Bool") - public static boolean glXQuerySwapGroupNV(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, @NativeType("GLuint *") IntBuffer group, @NativeType("GLuint *") IntBuffer barrier) { - if (CHECKS) { - check(group, 1); - check(barrier, 1); - } - return nglXQuerySwapGroupNV(display, drawable, memAddress(group), memAddress(barrier)) != 0; - } - - // --- [ glXQueryMaxSwapGroupsNV ] --- - - /** Unsafe version of: {@link #glXQueryMaxSwapGroupsNV QueryMaxSwapGroupsNV} */ - public static int nglXQueryMaxSwapGroupsNV(long display, int screen, long maxGroups, long maxBarriers) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryMaxSwapGroupsNV; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPPI(display, screen, maxGroups, maxBarriers, __functionAddress); - } - - /** @param display the connection to the X server */ - @NativeType("Bool") - public static boolean glXQueryMaxSwapGroupsNV(@NativeType("Display *") long display, int screen, @NativeType("GLuint *") IntBuffer maxGroups, @NativeType("GLuint *") IntBuffer maxBarriers) { - if (CHECKS) { - check(maxGroups, 1); - check(maxBarriers, 1); - } - return nglXQueryMaxSwapGroupsNV(display, screen, memAddress(maxGroups), memAddress(maxBarriers)) != 0; - } - - // --- [ glXQueryFrameCountNV ] --- - - /** Unsafe version of: {@link #glXQueryFrameCountNV QueryFrameCountNV} */ - public static int nglXQueryFrameCountNV(long display, int screen, long count) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryFrameCountNV; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPI(display, screen, count, __functionAddress); - } - - /** @param display the connection to the X server */ - @NativeType("Bool") - public static boolean glXQueryFrameCountNV(@NativeType("Display *") long display, int screen, @NativeType("GLuint *") IntBuffer count) { - if (CHECKS) { - check(count, 1); - } - return nglXQueryFrameCountNV(display, screen, memAddress(count)) != 0; - } - - // --- [ glXResetFrameCountNV ] --- - - /** @param display the connection to the X server */ - @NativeType("Bool") - public static boolean glXResetFrameCountNV(@NativeType("Display *") long display, int screen) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXResetFrameCountNV; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPI(display, screen, __functionAddress) != 0; - } - - /** Array version of: {@link #glXQuerySwapGroupNV QuerySwapGroupNV} */ - @NativeType("Bool") - public static boolean glXQuerySwapGroupNV(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, @NativeType("GLuint *") int[] group, @NativeType("GLuint *") int[] barrier) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQuerySwapGroupNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - check(group, 1); - check(barrier, 1); - } - return callPPPPI(display, drawable, group, barrier, __functionAddress) != 0; - } - - /** Array version of: {@link #glXQueryMaxSwapGroupsNV QueryMaxSwapGroupsNV} */ - @NativeType("Bool") - public static boolean glXQueryMaxSwapGroupsNV(@NativeType("Display *") long display, int screen, @NativeType("GLuint *") int[] maxGroups, @NativeType("GLuint *") int[] maxBarriers) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryMaxSwapGroupsNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(maxGroups, 1); - check(maxBarriers, 1); - } - return callPPPI(display, screen, maxGroups, maxBarriers, __functionAddress) != 0; - } - - /** Array version of: {@link #glXQueryFrameCountNV QueryFrameCountNV} */ - @NativeType("Bool") - public static boolean glXQueryFrameCountNV(@NativeType("Display *") long display, int screen, @NativeType("GLuint *") int[] count) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryFrameCountNV; - if (CHECKS) { - check(__functionAddress); - check(display); - check(count, 1); - } - return callPPI(display, screen, count, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIMakeCurrentRead.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIMakeCurrentRead.java deleted file mode 100644 index 48aa6bc8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIMakeCurrentRead.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the GLX_SGI_make_current_read extension. - * - *

    The association of the current context with a drawable is extended to allow separate write and read drawables. This paves the way for allowing - * preprocessing of image data in an "off screen" window which is then read into the visible window for final display. Similarly it sets the frame-work - * for direct transfer of video to the GL, by treating the video as a special kind of read drawable (a.k.a, readable).

    - */ -public class GLXSGIMakeCurrentRead { - - protected GLXSGIMakeCurrentRead() { - throw new UnsupportedOperationException(); - } - - // --- [ glXMakeCurrentReadSGI ] --- - - /** - * Associates two {@code GLXDrawables} with the current rendering context. - * - * @param display the connection to the X server - * @param draw the draw drawable - * @param read the read drawable - * @param ctx the current context - */ - @NativeType("Bool") - public static boolean glXMakeCurrentReadSGI(@NativeType("Display *") long display, @NativeType("GLXDrawable") long draw, @NativeType("GLXDrawable") long read, @NativeType("GLXContext") long ctx) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXMakeCurrentReadSGI; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPPPI(display, draw, read, ctx, __functionAddress) != 0; - } - - // --- [ glXGetCurrentReadDrawableSGI ] --- - - /** Returns the name of the {@code GLXDrawable} currently being used as a pixel query source. */ - @NativeType("GLXDrawable") - public static long glXGetCurrentReadDrawableSGI() { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetCurrentReadDrawableSGI; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGISwapControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGISwapControl.java deleted file mode 100644 index 974941dd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGISwapControl.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the GLX_SGI_swap_control extension. - * - *

    This extension allows an application to specify a minimum periodicity of color buffer swaps, measured in video frame periods.

    - */ -public class GLXSGISwapControl { - - protected GLXSGISwapControl() { - throw new UnsupportedOperationException(); - } - - // --- [ glXSwapIntervalSGI ] --- - - /** - * Specifies the minimum number of video frame periods per buffer swap. (e.g. a value of two means that the color buffers will be swapped at most every - * other video frame.) A return value of zero indicates success; otherwise an error occurred. The interval takes effect when {@link GLX#glXSwapBuffers SwapBuffers} - * is first called subsequent to the {@code glXSwapIntervalSGI} call. - * - *

    A video frame period is the time required by the monitor to display a full frame of video data. In the case of an interlaced monitor, this is typically - * the time required to display both the even and odd fields of a frame of video data.

    - * - * @param interval the swap interval - */ - @NativeType("GLint") - public static int glXSwapIntervalSGI(int interval) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXSwapIntervalSGI; - if (CHECKS) { - check(__functionAddress); - } - return callI(interval, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIVideoSync.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIVideoSync.java deleted file mode 100644 index 2a41bc3a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIVideoSync.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_SGI_video_sync extension. - * - *

    This extension provides a means for synchronization with the video frame rate of a monitor.

    - */ -public class GLXSGIVideoSync { - - protected GLXSGIVideoSync() { - throw new UnsupportedOperationException(); - } - - // --- [ glXGetVideoSyncSGI ] --- - - /** Unsafe version of: {@link #glXGetVideoSyncSGI GetVideoSyncSGI} */ - public static int nglXGetVideoSyncSGI(long count) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetVideoSyncSGI; - if (CHECKS) { - check(__functionAddress); - } - return callPI(count, __functionAddress); - } - - /** - * Returns the value of the video sync counter in {@code count}. Zero is returned if the call is successful. - * - * @param count the video sync counter value - */ - @NativeType("GLint") - public static int glXGetVideoSyncSGI(@NativeType("unsigned int *") IntBuffer count) { - if (CHECKS) { - check(count, 1); - } - return nglXGetVideoSyncSGI(memAddress(count)); - } - - // --- [ glXWaitVideoSyncSGI ] --- - - /** Unsafe version of: {@link #glXWaitVideoSyncSGI WaitVideoSyncSGI} */ - public static int nglXWaitVideoSyncSGI(int divisor, int remainder, long count) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXWaitVideoSyncSGI; - if (CHECKS) { - check(__functionAddress); - } - return callPI(divisor, remainder, count, __functionAddress); - } - - /** - * Puts the calling process to sleep until - * - *

    {@code (C mod D) = R}

    - * - *

    where {@code C} is the video sync counter, {@code D} is specified by the {@code divisor} parameter of {@code glXWaitVideoSyncSGI}, and {@code R} is - * specified by the {@code remainder} parameter of {@code glXWaitVideoSyncSGI}. {@code glXWaitVideoSyncSGI} returns the current video sync counter value in - * {@code count}. Zero is returned by {@code glXWaitVideoSyncSGI} if it is successful.

    - * - * @param divisor the divisor value - * @param remainder the remainder value - * @param count the video sync counter value - */ - @NativeType("GLint") - public static int glXWaitVideoSyncSGI(int divisor, int remainder, @NativeType("unsigned int *") IntBuffer count) { - if (CHECKS) { - check(count, 1); - } - return nglXWaitVideoSyncSGI(divisor, remainder, memAddress(count)); - } - - /** Array version of: {@link #glXGetVideoSyncSGI GetVideoSyncSGI} */ - @NativeType("GLint") - public static int glXGetVideoSyncSGI(@NativeType("unsigned int *") int[] count) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetVideoSyncSGI; - if (CHECKS) { - check(__functionAddress); - check(count, 1); - } - return callPI(count, __functionAddress); - } - - /** Array version of: {@link #glXWaitVideoSyncSGI WaitVideoSyncSGI} */ - @NativeType("GLint") - public static int glXWaitVideoSyncSGI(int divisor, int remainder, @NativeType("unsigned int *") int[] count) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXWaitVideoSyncSGI; - if (CHECKS) { - check(__functionAddress); - check(count, 1); - } - return callPI(divisor, remainder, count, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXFBConfig.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXFBConfig.java deleted file mode 100644 index 003b376e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXFBConfig.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -import org.lwjgl.system.linux.*; - -/** - * Native bindings to the GLX_SGIX_fbconfig extension. - * - *

    This extension introduces a new way to describe the capabilities of a GLX drawable (i.e., to describe the depth of color buffer components and the type - * and size of ancillary buffers), removes the "similarity" requirement when making a context current to a drawable, and supports RGBA rendering to - * one-and two-component Windows and GLX Pixmaps.

    - */ -public class GLXSGIXFBConfig { - - /** Accepted by the {@code attribute} parameter of {@link #glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX}, and by the {@code attrib_list} parameter of {@link #glXChooseFBConfigSGIX ChooseFBConfigSGIX}. */ - public static final int - GLX_DRAWABLE_TYPE_SGIX = 0x8010, - GLX_RENDER_TYPE_SGIX = 0x8011, - GLX_X_RENDERABLE_SGIX = 0x8012; - - /** - * Accepted by the {@code attribute} parameter of {@link #glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX}, the {@code attrib_list} parameter of {@link #glXChooseFBConfigSGIX ChooseFBConfigSGIX}, - * by the {@code attribute} parameter of {@link GLXSGIXPbuffer#glXQueryGLXPbufferSGIX QueryGLXPbufferSGIX} and by the {@code attribute} parameter of - * {@link GLXEXTImportContext#glXQueryContextInfoEXT QueryContextInfoEXT}. - */ - public static final int GLX_FBCONFIG_ID_SGIX = 0x8013; - - /** Accepted by the {@code attribute} parameter of {@link #glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX}. */ - public static final int GLX_SCREEN_EXT = 0x800C; - - /** - * Returned by {@link #glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX} (when {@code attribute} is set to {@link #GLX_DRAWABLE_TYPE_SGIX DRAWABLE_TYPE_SGIX}) and accepted by the {@code attrib_list} - * parameter of {@link #glXChooseFBConfigSGIX ChooseFBConfigSGIX} (following the {@link #GLX_DRAWABLE_TYPE_SGIX DRAWABLE_TYPE_SGIX} token). - */ - public static final int - GLX_WINDOW_BIT_SGIX = 0x1, - GLX_PIXMAP_BIT_SGIX = 0x2; - - /** - * Returned by {@link #glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX} (when {@code attribute} is set to {@link #GLX_RENDER_TYPE_SGIX RENDER_TYPE_SGIX}) and accepted by the {@code attrib_list} - * parameter of {@link #glXChooseFBConfigSGIX ChooseFBConfigSGIX} (following the {@link #GLX_RENDER_TYPE_SGIX RENDER_TYPE_SGIX} token). - */ - public static final int - GLX_RGBA_BIT_SGIX = 0x1, - GLX_COLOR_INDEX_BIT_SGIX = 0x2; - - /** Accepted by the {@code render_type} parameter of {@link #glXCreateContextWithConfigSGIX CreateContextWithConfigSGIX}. */ - public static final int - GLX_RGBA_TYPE_SGIX = 0x8014, - GLX_COLOR_INDEX_TYPE_SGIX = 0x8015; - - protected GLXSGIXFBConfig() { - throw new UnsupportedOperationException(); - } - - // --- [ glXGetFBConfigAttribSGIX ] --- - - /** Unsafe version of: {@link #glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX} */ - public static int nglXGetFBConfigAttribSGIX(long display, long config, int attribute, long value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetFBConfigAttribSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPPI(display, config, attribute, value, __functionAddress); - } - - /** - * Gets the value of a GLX attribute for a {@code GLXFBConfigSGIX}. - * - * @param display the connection to the X server - * @param config the {@code GLXFBConfigSGIX} being queried - * @param attribute the attribute to query - * @param value returns the attribute value - */ - public static int glXGetFBConfigAttribSGIX(@NativeType("Display *") long display, @NativeType("GLXFBConfigSGIX") long config, int attribute, @NativeType("int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nglXGetFBConfigAttribSGIX(display, config, attribute, memAddress(value)); - } - - // --- [ glXChooseFBConfigSGIX ] --- - - /** - * Unsafe version of: {@link #glXChooseFBConfigSGIX ChooseFBConfigSGIX} - * - * @param nelements the number of {@code GLXFBConfigSGIX} returned - */ - public static long nglXChooseFBConfigSGIX(long display, int screen, long attrib_list, long nelements) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXChooseFBConfigSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPPP(display, screen, attrib_list, nelements, __functionAddress); - } - - /** - * Gets {@code GLXFBConfigSGIX}s that match a list of attributes or to get the list of GLXFBConfigSGIXs that are available on the specified screen. - * - * @param display the connection to the X server - * @param screen the screen number - * @param attrib_list an optional list of attributes, terminated with org.lwjgl.system.linux.{@code None} - */ - @Nullable - @NativeType("GLXFBConfigSGIX *") - public static PointerBuffer glXChooseFBConfigSGIX(@NativeType("Display *") long display, int screen, @Nullable @NativeType("int const *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer nelements = stack.callocInt(1); - try { - long __result = nglXChooseFBConfigSGIX(display, screen, memAddressSafe(attrib_list), memAddress(nelements)); - return memPointerBufferSafe(__result, nelements.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glXCreateGLXPixmapWithConfigSGIX ] --- - - /** - * Creates a GLX pixmap using a {@code GLXFBConfigSGIX}. - * - * @param display the connection to the X server - * @param config the {@code GLXFBConfigSGIX} - * @param pixmap the pixmap - */ - @NativeType("GLXPixmap") - public static long glXCreateGLXPixmapWithConfigSGIX(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("Pixmap") long pixmap) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateGLXPixmapWithConfigSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPNP(display, config, pixmap, __functionAddress); - } - - // --- [ glXCreateContextWithConfigSGIX ] --- - - /** - * Creates a GLX context using a {@code GLXFBConfigSGIX}. - * - * @param display the connection to the X server - * @param config the {@code GLXFBConfigSGIX} - * @param render_type the render type. One of:
    {@link #GLX_RGBA_TYPE_SGIX RGBA_TYPE_SGIX}{@link #GLX_COLOR_INDEX_TYPE_SGIX COLOR_INDEX_TYPE_SGIX}
    - * @param share_list the GLX context to share objects with - * @param direct direct rendering request - */ - @NativeType("GLXContext") - public static long glXCreateContextWithConfigSGIX(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, int render_type, @NativeType("GLXContext") long share_list, @NativeType("Bool") boolean direct) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateContextWithConfigSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - check(share_list); - } - return callPPPP(display, config, render_type, share_list, direct ? 1 : 0, __functionAddress); - } - - // --- [ glXGetVisualFromFBConfigSGIX ] --- - - /** Unsafe version of: {@link #glXGetVisualFromFBConfigSGIX GetVisualFromFBConfigSGIX} */ - public static long nglXGetVisualFromFBConfigSGIX(long display, long config) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetVisualFromFBConfigSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPP(display, config, __functionAddress); - } - - /** - * Retrieves the associated visual of a {@code GLXFBConfigSGIX}. - * - * @param display the connection to the X server - * @param config the {@code GLXFBConfigSGIX} - */ - @Nullable - @NativeType("XVisualInfo *") - public static XVisualInfo glXGetVisualFromFBConfigSGIX(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config) { - long __result = nglXGetVisualFromFBConfigSGIX(display, config); - return XVisualInfo.createSafe(__result); - } - - // --- [ glXGetFBConfigFromVisualSGIX ] --- - - /** Unsafe version of: {@link #glXGetFBConfigFromVisualSGIX GetFBConfigFromVisualSGIX} */ - public static long nglXGetFBConfigFromVisualSGIX(long display, long vis) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetFBConfigFromVisualSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - XVisualInfo.validate(vis); - } - return callPPP(display, vis, __functionAddress); - } - - /** - * Retrieves the {@code GLXFBConfigSGIX} associated with a visual. - * - * @param display the connection to the X server - * @param vis the visual - */ - @NativeType("GLXFBConfigSGIX") - public static long glXGetFBConfigFromVisualSGIX(@NativeType("Display *") long display, @NativeType("XVisualInfo *") XVisualInfo vis) { - return nglXGetFBConfigFromVisualSGIX(display, vis.address()); - } - - /** Array version of: {@link #glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX} */ - public static int glXGetFBConfigAttribSGIX(@NativeType("Display *") long display, @NativeType("GLXFBConfigSGIX") long config, int attribute, @NativeType("int *") int[] value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetFBConfigAttribSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - check(value, 1); - } - return callPPPI(display, config, attribute, value, __functionAddress); - } - - /** Array version of: {@link #glXChooseFBConfigSGIX ChooseFBConfigSGIX} */ - @Nullable - @NativeType("GLXFBConfigSGIX *") - public static PointerBuffer glXChooseFBConfigSGIX(@NativeType("Display *") long display, int screen, @Nullable @NativeType("int const *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXChooseFBConfigSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - checkNTSafe(attrib_list); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer nelements = stack.callocInt(1); - try { - long __result = callPPPP(display, screen, attrib_list, memAddress(nelements), __functionAddress); - return memPointerBufferSafe(__result, nelements.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXPbuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXPbuffer.java deleted file mode 100644 index af29974d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXPbuffer.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_SGIX_pbuffer extension. - * - *

    This extension defines pixel buffers (GLXPbuffers, or pbuffer for short). GLXPbuffers are additional non-visible rendering buffers for an OpenGL - * renderer.

    - */ -public class GLXSGIXPbuffer { - - /** Accepted by the {@code attribute} parameter of {@link GLXSGIXFBConfig#glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX}. */ - public static final int - GLX_MAX_PBUFFER_WIDTH_SGIX = 0x8016, - GLX_MAX_PBUFFER_HEIGHT_SGIX = 0x8017, - GLX_MAX_PBUFFER_PIXELS_SGIX = 0x8018, - GLX_OPTIMAL_PBUFFER_WIDTH_SGIX = 0x8019, - GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX = 0x801A; - - /** - * Returned by {@link GLXSGIXFBConfig#glXGetFBConfigAttribSGIX GetFBConfigAttribSGIX} (when {@code attribute} is set to {@link GLXSGIXFBConfig#GLX_DRAWABLE_TYPE_SGIX DRAWABLE_TYPE_SGIX}) and - * accepted by the {@code attrib_list} parameter of {@link GLXSGIXFBConfig#glXChooseFBConfigSGIX ChooseFBConfigSGIX} (following the - * {@link GLXSGIXFBConfig#GLX_DRAWABLE_TYPE_SGIX DRAWABLE_TYPE_SGIX} token). - */ - public static final int GLX_PBUFFER_BIT_SGIX = 0x4; - - /** Accepted by the {@code attrib_list} parameter of {@link #glXCreateGLXPbufferSGIX CreateGLXPbufferSGIX} and by the {@code attribute} parameter of {@link #glXQueryGLXPbufferSGIX QueryGLXPbufferSGIX}. */ - public static final int - GLX_PRESERVED_CONTENTS_SGIX = 0x801B, - GLX_LARGEST_PBUFFER_SGIX = 0x801C; - - /** Accepted by the {@code attribute} parameter of {@link #glXQueryGLXPbufferSGIX QueryGLXPbufferSGIX}. */ - public static final int - GLX_WIDTH_SGIX = 0x801D, - GLX_HEIGHT_SGIX = 0x801E, - GLX_EVENT_MASK_SGIX = 0x801F; - - /** Accepted by the {@code mask} parameter of {@link #glXSelectEventSGIX SelectEventSGIX} and returned in the {@code mask} parameter of {@link #glXGetSelectedEventSGIX GetSelectedEventSGIX}. */ - public static final int GLX_BUFFER_CLOBBER_MASK_SGIX = 0x8000000; - - /** Returned in the {@code event_type} field of a "buffer clobber" event. */ - public static final int - GLX_DAMAGED_SGIX = 0x8020, - GLX_SAVED_SGIX = 0x8021; - - /** Returned in the {@code draw_type} field of a "buffer clobber" event. */ - public static final int - GLX_WINDOW_SGIX = 0x8022, - GLX_PBUFFER_SGIX = 0x8023; - - /** Returned in the {@code mask} field of a "buffer clobber" event. */ - public static final int - GLX_FRONT_LEFT_BUFFER_BIT_SGIX = 0x1, - GLX_FRONT_RIGHT_BUFFER_BIT_SGIX = 0x2, - GLX_BACK_LEFT_BUFFER_BIT_SGIX = 0x4, - GLX_BACK_RIGHT_BUFFER_BIT_SGIX = 0x8, - GLX_AUX_BUFFERS_BIT_SGIX = 0x10, - GLX_DEPTH_BUFFER_BIT_SGIX = 0x20, - GLX_STENCIL_BUFFER_BIT_SGIX = 0x40, - GLX_ACCUM_BUFFER_BIT_SGIX = 0x80, - GLX_SAMPLE_BUFFERS_BIT_SGIX = 0x100; - - protected GLXSGIXPbuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ glXCreateGLXPbufferSGIX ] --- - - /** Unsafe version of: {@link #glXCreateGLXPbufferSGIX CreateGLXPbufferSGIX} */ - public static long nglXCreateGLXPbufferSGIX(long display, long config, int width, int height, long attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateGLXPbufferSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - } - return callPPPP(display, config, width, height, attrib_list, __functionAddress); - } - - /** - * Creates a single GLXPbuffer and returns its XID. - * - * @param display the connection to the X server - * @param config the {@code GLXFBConfig} - * @param width the pbuffer width - * @param height the pbuffer height - * @param attrib_list an optional null-terminated list of attributes - */ - @NativeType("GLXPbuffer") - public static long glXCreateGLXPbufferSGIX(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("unsigned int") int width, @NativeType("unsigned int") int height, @Nullable @NativeType("int *") IntBuffer attrib_list) { - if (CHECKS) { - checkNTSafe(attrib_list); - } - return nglXCreateGLXPbufferSGIX(display, config, width, height, memAddressSafe(attrib_list)); - } - - // --- [ glXDestroyGLXPbufferSGIX ] --- - - /** - * Destroys a GLXPbuffer. - * - * @param display the connection to the X server - * @param pbuf the pbuffer to destroy - */ - public static void glXDestroyGLXPbufferSGIX(@NativeType("Display *") long display, @NativeType("GLXPbuffer") long pbuf) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXDestroyGLXPbufferSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(pbuf); - } - callPPV(display, pbuf, __functionAddress); - } - - // --- [ glXQueryGLXPbufferSGIX ] --- - - /** Unsafe version of: {@link #glXQueryGLXPbufferSGIX QueryGLXPbufferSGIX} */ - public static void nglXQueryGLXPbufferSGIX(long display, long pbuf, int attribute, long value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryGLXPbufferSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(pbuf); - } - callPPPV(display, pbuf, attribute, value, __functionAddress); - } - - /** - * Queries an attribute associated with a GLXPbuffer. - * - * @param display the connection to the X server - * @param pbuf the pbuffer being queried - * @param attribute the attribute to query - * @param value returns the attribute value - */ - public static void glXQueryGLXPbufferSGIX(@NativeType("Display *") long display, @NativeType("GLXPbuffer") long pbuf, int attribute, @NativeType("unsigned int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglXQueryGLXPbufferSGIX(display, pbuf, attribute, memAddress(value)); - } - - // --- [ glXSelectEventSGIX ] --- - - /** - * Selects which GLX events should be received on a GLXdrawable. - * - * @param display the connection to the X server - * @param drawable the GLXDrawable - * @param mask the selection mask - */ - public static void glXSelectEventSGIX(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, @NativeType("unsigned long") long mask) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXSelectEventSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - callPPNV(display, drawable, mask, __functionAddress); - } - - // --- [ glXGetSelectedEventSGIX ] --- - - /** Unsafe version of: {@link #glXGetSelectedEventSGIX GetSelectedEventSGIX} */ - public static void nglXGetSelectedEventSGIX(long display, long drawable, long mask) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXGetSelectedEventSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - callPPPV(display, drawable, mask, __functionAddress); - } - - /** - * Returns which GLX events are selected for a GLXdrawable. - * - * @param display the connection to the X server - * @param drawable the GLXDrawable - * @param mask returns the selection mask - */ - public static void glXGetSelectedEventSGIX(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, @NativeType("unsigned long *") CLongBuffer mask) { - if (CHECKS) { - check(mask, 1); - } - nglXGetSelectedEventSGIX(display, drawable, memAddress(mask)); - } - - /** Array version of: {@link #glXCreateGLXPbufferSGIX CreateGLXPbufferSGIX} */ - @NativeType("GLXPbuffer") - public static long glXCreateGLXPbufferSGIX(@NativeType("Display *") long display, @NativeType("GLXFBConfig") long config, @NativeType("unsigned int") int width, @NativeType("unsigned int") int height, @Nullable @NativeType("int *") int[] attrib_list) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXCreateGLXPbufferSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(config); - checkNTSafe(attrib_list); - } - return callPPPP(display, config, width, height, attrib_list, __functionAddress); - } - - /** Array version of: {@link #glXQueryGLXPbufferSGIX QueryGLXPbufferSGIX} */ - public static void glXQueryGLXPbufferSGIX(@NativeType("Display *") long display, @NativeType("GLXPbuffer") long pbuf, int attribute, @NativeType("unsigned int *") int[] value) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryGLXPbufferSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(pbuf); - check(value, 1); - } - callPPPV(display, pbuf, attribute, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXSwapBarrier.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXSwapBarrier.java deleted file mode 100644 index 0c9f6449..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXSwapBarrier.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GLX_SGIX_swap_barrier extension. - * - *

    This extension provides the capability to sychronize the buffer swaps of different swap groups.

    - * - *

    Requires {@link GLXSGIXSwapGroup GLX_SGIX_swap_group}.

    - */ -public class GLXSGIXSwapBarrier { - - protected GLXSGIXSwapBarrier() { - throw new UnsupportedOperationException(); - } - - // --- [ glXBindSwapBarrierSGIX ] --- - - /** - * Binds the swap group that contains {@code drawable} to {@code barrier}. Subsequent buffer swaps for that group will be subject to this binding, until - * the group is unbound from {@code barrier}. If {@code barrier} is zero, the group is unbound from its current barrier, if any. - * - * @param display the connection to the X server - * @param drawable the swap group GLXDrawable - * @param barrier the swap barrier - */ - public static void glXBindSwapBarrierSGIX(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, int barrier) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXBindSwapBarrierSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - callPPV(display, drawable, barrier, __functionAddress); - } - - // --- [ glXQueryMaxSwapBarriersSGIX ] --- - - /** Unsafe version of: {@link #glXQueryMaxSwapBarriersSGIX QueryMaxSwapBarriersSGIX} */ - public static int nglXQueryMaxSwapBarriersSGIX(long display, int screen, long max) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryMaxSwapBarriersSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - } - return callPPI(display, screen, max, __functionAddress); - } - - /** - * Returns in {@code max} the maximum number of barriers supported by an implementation on {@code screen}. - * - * @param display the connection to the X server - * @param screen the screen - * @param max returns the maximum number of barriers - */ - @NativeType("Bool") - public static boolean glXQueryMaxSwapBarriersSGIX(@NativeType("Display *") long display, int screen, @NativeType("int *") IntBuffer max) { - if (CHECKS) { - check(max, 1); - } - return nglXQueryMaxSwapBarriersSGIX(display, screen, memAddress(max)) != 0; - } - - /** Array version of: {@link #glXQueryMaxSwapBarriersSGIX QueryMaxSwapBarriersSGIX} */ - @NativeType("Bool") - public static boolean glXQueryMaxSwapBarriersSGIX(@NativeType("Display *") long display, int screen, @NativeType("int *") int[] max) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXQueryMaxSwapBarriersSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(max, 1); - } - return callPPI(display, screen, max, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXSwapGroup.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXSwapGroup.java deleted file mode 100644 index 71ebde3d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXSGIXSwapGroup.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the GLX_SGIX_swap_group extension. - * - *

    This extension provides the capability to synchronize the buffer swaps of a group of GLX drawables. A swap group is created, and drawables are added as - * members to the swap group. Buffer swaps to members of the swap group will then take place concurrently.

    - * - *

    This extension extends the set of conditions that must be met before a buffer swap can take place.

    - */ -public class GLXSGIXSwapGroup { - - protected GLXSGIXSwapGroup() { - throw new UnsupportedOperationException(); - } - - // --- [ glXJoinSwapGroupSGIX ] --- - - /** - * Adds {@code drawable} to the swap group containing {@code member} as a member. If {@code drawable} is already a member of a different group, it is - * implicitly removed from that group first. If {@code member} is {@code None}, {@code drawable} is removed from the swap group that it belongs to, if - * any. - * - * @param display the connection to the X server - * @param drawable the GLXDrawable to add to the swap group - * @param member a member of the swap group or {@code None} - */ - public static void glXJoinSwapGroupSGIX(@NativeType("Display *") long display, @NativeType("GLXDrawable") long drawable, @NativeType("GLXDrawable") long member) { - long __functionAddress = GL.getCapabilitiesGLXClient().glXJoinSwapGroupSGIX; - if (CHECKS) { - check(__functionAddress); - check(display); - check(drawable); - } - callPPPV(display, drawable, member, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GLXStereoNotifyEventEXT.java b/LWJGL/src/main/java/org/lwjgl/opengl/GLXStereoNotifyEventEXT.java deleted file mode 100644 index dc33e1b9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GLXStereoNotifyEventEXT.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct GLXStereoNotifyEventEXT {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     int {@link #extension};
    - *     int {@link #evtype};
    - *     GLXDrawable {@link #window};
    - *     Bool {@link #stereo_tree};
    - * }
    - */ -public class GLXStereoNotifyEventEXT extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EXTENSION, - EVTYPE, - WINDOW, - STEREO_TREE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EXTENSION = layout.offsetof(4); - EVTYPE = layout.offsetof(5); - WINDOW = layout.offsetof(6); - STEREO_TREE = layout.offsetof(7); - } - - protected GLXStereoNotifyEventEXT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected GLXStereoNotifyEventEXT create(long address, @Nullable ByteBuffer container) { - return new GLXStereoNotifyEventEXT(address, container); - } - - /** - * Creates a {@code GLXStereoNotifyEventEXT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public GLXStereoNotifyEventEXT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** GenericEvent */ - public int type() { return ntype(address()); } - /** \# of last request server processed */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** {@code True} if generated by {@code SendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** display the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** GLX major opcode, from {@code XQueryExtension} */ - public int extension() { return nextension(address()); } - /** always {@code GLX_STEREO_NOTIFY_EXT} */ - public int evtype() { return nevtype(address()); } - /** XID of the X window affected */ - @NativeType("GLXDrawable") - public long window() { return nwindow(address()); } - /** {@code True} if tree contains stereo windows */ - @NativeType("Bool") - public boolean stereo_tree() { return nstereo_tree(address()) != 0; } - - // ----------------------------------- - - /** Returns a new {@code GLXStereoNotifyEventEXT} instance for the specified memory address. */ - public static GLXStereoNotifyEventEXT create(long address) { - return new GLXStereoNotifyEventEXT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static GLXStereoNotifyEventEXT createSafe(long address) { - return address == NULL ? null : new GLXStereoNotifyEventEXT(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + GLXStereoNotifyEventEXT.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + GLXStereoNotifyEventEXT.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + GLXStereoNotifyEventEXT.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + GLXStereoNotifyEventEXT.DISPLAY); } - /** Unsafe version of {@link #extension}. */ - public static int nextension(long struct) { return UNSAFE.getInt(null, struct + GLXStereoNotifyEventEXT.EXTENSION); } - /** Unsafe version of {@link #evtype}. */ - public static int nevtype(long struct) { return UNSAFE.getInt(null, struct + GLXStereoNotifyEventEXT.EVTYPE); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetAddress(struct + GLXStereoNotifyEventEXT.WINDOW); } - /** Unsafe version of {@link #stereo_tree}. */ - public static int nstereo_tree(long struct) { return UNSAFE.getInt(null, struct + GLXStereoNotifyEventEXT.STEREO_TREE); } - - // ----------------------------------- - - /** An array of {@link GLXStereoNotifyEventEXT} structs. */ - public static class Buffer extends StructBuffer { - - private static final GLXStereoNotifyEventEXT ELEMENT_FACTORY = GLXStereoNotifyEventEXT.create(-1L); - - /** - * Creates a new {@code GLXStereoNotifyEventEXT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link GLXStereoNotifyEventEXT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected GLXStereoNotifyEventEXT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link GLXStereoNotifyEventEXT#type} field. */ - public int type() { return GLXStereoNotifyEventEXT.ntype(address()); } - /** @return the value of the {@link GLXStereoNotifyEventEXT#serial} field. */ - @NativeType("unsigned long") - public long serial() { return GLXStereoNotifyEventEXT.nserial(address()); } - /** @return the value of the {@link GLXStereoNotifyEventEXT#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return GLXStereoNotifyEventEXT.nsend_event(address()) != 0; } - /** @return the value of the {@link GLXStereoNotifyEventEXT#display} field. */ - @NativeType("Display *") - public long display() { return GLXStereoNotifyEventEXT.ndisplay(address()); } - /** @return the value of the {@link GLXStereoNotifyEventEXT#extension} field. */ - public int extension() { return GLXStereoNotifyEventEXT.nextension(address()); } - /** @return the value of the {@link GLXStereoNotifyEventEXT#evtype} field. */ - public int evtype() { return GLXStereoNotifyEventEXT.nevtype(address()); } - /** @return the value of the {@link GLXStereoNotifyEventEXT#window} field. */ - @NativeType("GLXDrawable") - public long window() { return GLXStereoNotifyEventEXT.nwindow(address()); } - /** @return the value of the {@link GLXStereoNotifyEventEXT#stereo_tree} field. */ - @NativeType("Bool") - public boolean stereo_tree() { return GLXStereoNotifyEventEXT.nstereo_tree(address()) != 0; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GPU_DEVICE.java b/LWJGL/src/main/java/org/lwjgl/opengl/GPU_DEVICE.java deleted file mode 100644 index 159dfc96..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GPU_DEVICE.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -import org.lwjgl.system.windows.*; - -/** - * Receives information about the display device specified by the {@code deviceIndex} parameter of the {@link WGLNVGPUAffinity#wglEnumGpuDevicesNV EnumGpuDevicesNV} function. - * - *

    Layout

    - * - *
    
    - * struct GPU_DEVICE {
    - *     DWORD {@link #cb};
    - *     CHAR {@link #DeviceName}[32];
    - *     CHAR {@link #DeviceString}[128];
    - *     DWORD {@link #Flags};
    - *     {@link RECT RECT} {@link #rcVirtualScreen};
    - * }
    - */ -public class GPU_DEVICE extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CB, - DEVICENAME, - DEVICESTRING, - FLAGS, - RCVIRTUALSCREEN; - - static { - Layout layout = __struct( - __member(4), - __array(1, 32), - __array(1, 128), - __member(4), - __member(RECT.SIZEOF, RECT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CB = layout.offsetof(0); - DEVICENAME = layout.offsetof(1); - DEVICESTRING = layout.offsetof(2); - FLAGS = layout.offsetof(3); - RCVIRTUALSCREEN = layout.offsetof(4); - } - - protected GPU_DEVICE(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected GPU_DEVICE create(long address, @Nullable ByteBuffer container) { - return new GPU_DEVICE(address, container); - } - - /** - * Creates a {@code GPU_DEVICE} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public GPU_DEVICE(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the size of the {@code GPU_DEVICE} structure. Before calling {@link WGLNVGPUAffinity#wglEnumGpuDevicesNV EnumGpuDevicesNV}, set {@code cb} to the size, in bytes, of {@code GPU_DEVICE}. */ - @NativeType("DWORD") - public int cb() { return ncb(address()); } - /** - * a string identifying the display device name. This will be the same string as stored in the {@code DeviceName} field of the {@code DISPLAY_DEVICE} - * structure, which is filled in by {@code EnumDisplayDevices}. - */ - @NativeType("CHAR[32]") - public ByteBuffer DeviceName() { return nDeviceName(address()); } - /** - * a string identifying the display device name. This will be the same string as stored in the {@code DeviceName} field of the {@code DISPLAY_DEVICE} - * structure, which is filled in by {@code EnumDisplayDevices}. - */ - @NativeType("CHAR[32]") - public String DeviceNameString() { return nDeviceNameString(address()); } - /** - * a string describing the GPU for this display device. It is the same string as stored in the {@code DeviceString} field in the {@code DISPLAY_DEVICE} - * structure that is filled in by {@code EnumDisplayDevices} when it describes a display adapter (and not a monitor). - */ - @NativeType("CHAR[128]") - public ByteBuffer DeviceString() { return nDeviceString(address()); } - /** - * a string describing the GPU for this display device. It is the same string as stored in the {@code DeviceString} field in the {@code DISPLAY_DEVICE} - * structure that is filled in by {@code EnumDisplayDevices} when it describes a display adapter (and not a monitor). - */ - @NativeType("CHAR[128]") - public String DeviceStringString() { return nDeviceStringString(address()); } - /** indicates the state of the display device */ - @NativeType("DWORD") - public int Flags() { return nFlags(address()); } - /** - * specifies the display device rectangle, in virtual screen coordinates. The value of {@code rcVirtualScreen} is undefined if the device is not part of - * the desktop, i.e. {@code DISPLAY_DEVICE_ATTACHED_TO_DESKTOP} is not set in the {@code Flags} field. - */ - public RECT rcVirtualScreen() { return nrcVirtualScreen(address()); } - - // ----------------------------------- - - /** Returns a new {@code GPU_DEVICE} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static GPU_DEVICE malloc() { - return new GPU_DEVICE(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code GPU_DEVICE} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static GPU_DEVICE calloc() { - return new GPU_DEVICE(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code GPU_DEVICE} instance allocated with {@link BufferUtils}. */ - public static GPU_DEVICE create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new GPU_DEVICE(memAddress(container), container); - } - - /** Returns a new {@code GPU_DEVICE} instance for the specified memory address. */ - public static GPU_DEVICE create(long address) { - return new GPU_DEVICE(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static GPU_DEVICE createSafe(long address) { - return address == NULL ? null : new GPU_DEVICE(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GPU_DEVICE mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GPU_DEVICE callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static GPU_DEVICE mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static GPU_DEVICE callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code GPU_DEVICE} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static GPU_DEVICE malloc(MemoryStack stack) { - return new GPU_DEVICE(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code GPU_DEVICE} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static GPU_DEVICE calloc(MemoryStack stack) { - return new GPU_DEVICE(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cb}. */ - public static int ncb(long struct) { return UNSAFE.getInt(null, struct + GPU_DEVICE.CB); } - /** Unsafe version of {@link #DeviceName}. */ - public static ByteBuffer nDeviceName(long struct) { return memByteBuffer(struct + GPU_DEVICE.DEVICENAME, 32); } - /** Unsafe version of {@link #DeviceNameString}. */ - public static String nDeviceNameString(long struct) { return memASCII(struct + GPU_DEVICE.DEVICENAME); } - /** Unsafe version of {@link #DeviceString}. */ - public static ByteBuffer nDeviceString(long struct) { return memByteBuffer(struct + GPU_DEVICE.DEVICESTRING, 128); } - /** Unsafe version of {@link #DeviceStringString}. */ - public static String nDeviceStringString(long struct) { return memASCII(struct + GPU_DEVICE.DEVICESTRING); } - /** Unsafe version of {@link #Flags}. */ - public static int nFlags(long struct) { return UNSAFE.getInt(null, struct + GPU_DEVICE.FLAGS); } - /** Unsafe version of {@link #rcVirtualScreen}. */ - public static RECT nrcVirtualScreen(long struct) { return RECT.create(struct + GPU_DEVICE.RCVIRTUALSCREEN); } - - // ----------------------------------- - - /** An array of {@link GPU_DEVICE} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final GPU_DEVICE ELEMENT_FACTORY = GPU_DEVICE.create(-1L); - - /** - * Creates a new {@code GPU_DEVICE.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link GPU_DEVICE#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected GPU_DEVICE getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link GPU_DEVICE#cb} field. */ - @NativeType("DWORD") - public int cb() { return GPU_DEVICE.ncb(address()); } - /** @return a {@link ByteBuffer} view of the {@link GPU_DEVICE#DeviceName} field. */ - @NativeType("CHAR[32]") - public ByteBuffer DeviceName() { return GPU_DEVICE.nDeviceName(address()); } - /** @return the null-terminated string stored in the {@link GPU_DEVICE#DeviceName} field. */ - @NativeType("CHAR[32]") - public String DeviceNameString() { return GPU_DEVICE.nDeviceNameString(address()); } - /** @return a {@link ByteBuffer} view of the {@link GPU_DEVICE#DeviceString} field. */ - @NativeType("CHAR[128]") - public ByteBuffer DeviceString() { return GPU_DEVICE.nDeviceString(address()); } - /** @return the null-terminated string stored in the {@link GPU_DEVICE#DeviceString} field. */ - @NativeType("CHAR[128]") - public String DeviceStringString() { return GPU_DEVICE.nDeviceStringString(address()); } - /** @return the value of the {@link GPU_DEVICE#Flags} field. */ - @NativeType("DWORD") - public int Flags() { return GPU_DEVICE.nFlags(address()); } - /** @return a {@link RECT} view of the {@link GPU_DEVICE#rcVirtualScreen} field. */ - public RECT rcVirtualScreen() { return GPU_DEVICE.nrcVirtualScreen(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GREMEDYFrameTerminator.java b/LWJGL/src/main/java/org/lwjgl/opengl/GREMEDYFrameTerminator.java deleted file mode 100644 index 6651cf86..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GREMEDYFrameTerminator.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the GREMEDY_frame_terminator extension. - * - *

    This extension defines a mechanism that enables marking the end of render frames within the OpenGL stream.

    - * - *

    When debugging or profiling an OpenGL application, the debuggers and profilers needs to know when a render frame is ended. This is important for frame - * per second measurements, statistical analysis, marking and clearing stream loggers logs, performance counters sampling and more.

    - * - *

    When an application uses off screen buffers, the debugger / profiler cannot be guaranteed that the application will call a certain function at the end - * of each off-screen frame (e.g: SwapBuffers / glClear / etc). This extension enables the application to notify the debugger / profiler whenever a render - * frame is ended.

    - * - *

    This extension is mainly useful for debuggers and profilers. It is not expected that standard drivers would implement this extension. The main point of - * having this extension is to allow applications to have a clean way of accessing this functionality only when they are run under the control of a - * debugger / profiler, without having to recompile or change the application source code.

    - */ -public class GREMEDYFrameTerminator { - - static { GL.initialize(); } - - protected GREMEDYFrameTerminator() { - throw new UnsupportedOperationException(); - } - - // --- [ glFrameTerminatorGREMEDY ] --- - - /** - * Can be used to insert a frame terminator marker into the command stream. This frame terminator marker can be used by appropriate debugging tools / - * profiling tools / profiling drivers for frame per second measurements, statistical analysis, marking and clearing stream loggers logs, performance - * counters sampling and more. This command has no influence on the rendered image or the OpenGL state. - */ - public static native void glFrameTerminatorGREMEDY(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GREMEDYStringMarker.java b/LWJGL/src/main/java/org/lwjgl/opengl/GREMEDYStringMarker.java deleted file mode 100644 index b2713a40..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GREMEDYStringMarker.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the GREMEDY_string_marker extension. - * - *

    This extension defines a mechanism to insert textual markers into the OpenGL stream.

    - * - *

    When debugging or profiling an OpenGL application some of the most important tools are stream loggers, which just output a list of the called OpenGL - * commands, and profilers, which show at which points the pipeline is bottlenecked for a given part of the frame. The problem in using these is that - * there is a definite loss of information between the application and the used debugger/profiler. The application generally has a pretty good idea what - * is rendered when (e.g. rendering background, landscape, building, players, particle effects, bullets etc.), but the debugger/profiler only sees the - * OpenGL stream. To analyze the stream developers have to guess what is done when by following the program code and the log output in parallel, which can - * get difficult for systems that restructure their internal pipeline or do lazy changes.

    - * - *

    This extension is really only useful for these debuggers and profilers, and not for actual drivers. In fact, it is not expected that any standard - * driver would ever implement this extension. The main point of having this extension is to allow applications to have a clean way of accessing this - * functionality only when they are run under the control of a debugger/profiler, without having to recompile or change the application source code.

    - */ -public class GREMEDYStringMarker { - - static { GL.initialize(); } - - protected GREMEDYStringMarker() { - throw new UnsupportedOperationException(); - } - - // --- [ glStringMarkerGREMEDY ] --- - - /** - * Unsafe version of: {@link #glStringMarkerGREMEDY StringMarkerGREMEDY} - * - * @param len the length of the array. If {@code string} is null-terminated, {@code len} should not include the terminator. If {@code len} is 0, then the string - * is assumed to be null-terminated. - */ - public static native void nglStringMarkerGREMEDY(int len, long string); - - /** - * Can be used to insert arbitrary marker strings into the command stream that can be recorded by appropriate debugging tools / profiling tools / drivers. - * They have no influence on the rendered image or the OpenGL state. - * - * @param string a pointer to the array of bytes representing the marker being inserted, which need not be null-terminated - */ - public static void glStringMarkerGREMEDY(@NativeType("GLchar const *") ByteBuffer string) { - nglStringMarkerGREMEDY(string.remaining(), memAddress(string)); - } - - /** - * Can be used to insert arbitrary marker strings into the command stream that can be recorded by appropriate debugging tools / profiling tools / drivers. - * They have no influence on the rendered image or the OpenGL state. - * - * @param string a pointer to the array of bytes representing the marker being inserted, which need not be null-terminated - */ - public static void glStringMarkerGREMEDY(@NativeType("GLchar const *") CharSequence string) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - int stringEncodedLength = stack.nUTF8(string, false); - long stringEncoded = stack.getPointerAddress(); - nglStringMarkerGREMEDY(stringEncodedLength, stringEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/GlobalLock.java b/LWJGL/src/main/java/org/lwjgl/opengl/GlobalLock.java deleted file mode 100644 index 0dc7c5ee..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/GlobalLock.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.opengl; - -/** - * 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/LWJGL/src/main/java/org/lwjgl/opengl/INTELBlackholeRender.java b/LWJGL/src/main/java/org/lwjgl/opengl/INTELBlackholeRender.java deleted file mode 100644 index 061ee657..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/INTELBlackholeRender.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the INTEL_blackhole_render extension. - * - *

    The purpose of this extension is to allow an application to disable all rendering operations emitted to the GPU through the OpenGL rendering commands - * ({@code Draw*}, {@code DispatchCompute*}, {@code BlitFramebuffer}, etc...). Changes to the OpenGL pipeline are not affected.

    - * - *

    New preprocessor {@code #defines} are added to the OpenGL Shading Language:

    - * - *
    
    - * #define GL_INTEL_blackhole_render 1
    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public final class INTELBlackholeRender { - - /** Accepted by the {@code target} parameter of Enable, Disable, IsEnabled. */ - public static final int GL_BLACKHOLE_RENDER_INTEL = 0x83FC; - - private INTELBlackholeRender() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/INTELConservativeRasterization.java b/LWJGL/src/main/java/org/lwjgl/opengl/INTELConservativeRasterization.java deleted file mode 100644 index 02dd7614..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/INTELConservativeRasterization.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the INTEL_conservative_rasterization extension. - * - *

    Regular rasterization includes fragments with at least one sample covered by a polygon. Conservative rasterization includes all fragments that are at - * least partially covered by the polygon.

    - * - *

    In some use cases, it is also important to know if a fragment is fully covered by a polygon, i.e. if all parts of the fragment are within the polygon. - * An application may, for example, want to process fully covered fragments different from the "edge" pixels. This extension adds an option for the - * fragment shader to receive this information via {@code gl_SampleMaskIn[]}.

    - * - *

    This extension affects only polygons in {@link GL11#GL_FILL FILL} mode and specifically does not imply any changes in processing of lines or points.

    - * - *

    Conservative rasterization automatically disables polygon antialiasing rasterization if enabled by {@link GL11#GL_POLYGON_SMOOTH POLYGON_SMOOTH}.

    - * - *

    Requires {@link GL42 OpenGL 4.2}.

    - */ -public final class INTELConservativeRasterization { - - /** Accepted by the {@code target} parameter of {@link GL11#glEnable Enable}, {@link GL11#glDisable Disable}, {@link GL11#glIsEnabled IsEnabled}. */ - public static final int GL_CONSERVATIVE_RASTERIZATION_INTEL = 0x83FE; - - private INTELConservativeRasterization() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/INTELFramebufferCMAA.java b/LWJGL/src/main/java/org/lwjgl/opengl/INTELFramebufferCMAA.java deleted file mode 100644 index 0ad37a66..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/INTELFramebufferCMAA.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the INTEL_framebuffer_CMAA extension. - * - *

    Multisampling is a mechanism to antialias all GL primitives and is part of the GL specification.

    - * - *

    Better visual quality can be achieved by applying multisampling. However, on certain platforms it comes at a high performance cost. In general, the - * greater number of samples per pixel, the bigger the cost.

    - * - *

    Conservative Morphological Anti-Aliasing (CMAA) is an alternative approach to antialiasing, which operates on the final image. This post processing - * technique results in image quality comparable to multisampling at much lower cost and better performance.

    - * - *

    This extension incorporates an optimized CMAA algorithm implementation into the GL implementation.

    - * - *

    For more information on CMAA refer to software.intel.com.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public class INTELFramebufferCMAA { - - static { GL.initialize(); } - - protected INTELFramebufferCMAA() { - throw new UnsupportedOperationException(); - } - - // --- [ glApplyFramebufferAttachmentCMAAINTEL ] --- - - /** - * Requests the post processing of current draw buffers pertaining to the framebuffer bound to the {@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER} target according to the - * Conservative Morphological Anti-Aliasing algorithm. - */ - public static native void glApplyFramebufferAttachmentCMAAINTEL(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/INTELMapTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/INTELMapTexture.java deleted file mode 100644 index e0257576..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/INTELMapTexture.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the INTEL_map_texture extension. - * - *

    Systems with integrated GPUs can share the same physical memory between CPU and GPU. This feature, if exposed by API, can bring significant performance - * benefits for graphics applications by reducing the complexity of uploading/accessing texture contents. This extension enables CPU direct access to the - * GPU memory holding textures.

    - * - *

    The problem with texture memory directly exposed to clients is that textures are often 'tiled'. Texels are kept in specific layout to improve locality - * of reference and thus performance of texturing. This 'tiling' is specific to particular hardware and would be thus difficult to use.

    - * - *

    This extension allows to create textures with 'linear' layout which allows for simplified access on user side (potentially sacrificing some performance - * during texture sampling).

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public class INTELMapTexture { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of TexParameteri, for target TEXTURE_2D. */ - public static final int GL_TEXTURE_MEMORY_LAYOUT_INTEL = 0x83FF; - - /** Accepted by the {@code params} when {@code pname} is set to {@code TEXTURE_MEMORY_LAYOUT_INTEL}. */ - public static final int - GL_LAYOUT_DEFAULT_INTEL = 0, - GL_LAYOUT_LINEAR_INTEL = 1, - GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2; - - protected INTELMapTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glSyncTextureINTEL ] --- - - /** - * Makes sure that changes made by CPU are visible to GPU by flushing texture cache in GPU. The GL implementation tracks the cache usage and ignores the - * command if such flush is not needed. - * - *

    It is worth noting that this extension does not address automatic synchronization between CPU and GPU when both entities operate on the same texture at - * the same time. This is up to the application to assure such synchronization. Otherwise, the results may not be deterministic (writes from different - * entities may interleave in a non-deterministic way).

    - * - * @param texture the texture to synchronize - */ - public static native void glSyncTextureINTEL(@NativeType("GLuint") int texture); - - // --- [ glUnmapTexture2DINTEL ] --- - - /** - * Releases the pointer obtained previously via {@link #glMapTexture2DINTEL MapTexture2DINTEL}. This means that virtual memory space dedicated to make the texture available via a - * pointer is released and an application can no longer assume this memory is accessible from CPU. Successful execution of this command has an additional - * effect as if {@link #glSyncTextureINTEL SyncTextureINTEL} was called with {@code texture} parameter. - * - * @param texture the texture to unmap - * @param level the mipmap level-of-detail of the texture - */ - public static native void glUnmapTexture2DINTEL(@NativeType("GLuint") int texture, @NativeType("GLint") int level); - - // --- [ glMapTexture2DINTEL ] --- - - /** Unsafe version of: {@link #glMapTexture2DINTEL MapTexture2DINTEL} */ - public static native long nglMapTexture2DINTEL(int texture, int level, int access, long stride, long layout); - - /** - * Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the {@code texture} parameter. - * - *

    LWJGL note: If glMapTexture2DINTEL without an explicit length argument is used and direct-state-access functionality is not available in the - * current context, the texture object must currently be bound to the GL_TEXTURE_2D target.

    - * - * @param texture the texture to map - * @param level the mipmap level-of-detail of the texture - * @param access the type of access that will be performed by the application. One of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}
    - * @param stride returns the distance in bytes between subsequent rows in the texture - * @param layout returns the internal layout of the texture in the graphics memory - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapTexture2DINTEL(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLbitfield") int access, @NativeType("GLint *") IntBuffer stride, @NativeType("GLenum *") IntBuffer layout) { - if (CHECKS) { - check(stride, 1); - check(layout, 1); - } - long __result = nglMapTexture2DINTEL(texture, level, access, memAddress(stride), memAddress(layout)); - return memByteBufferSafe(__result, getStride(stride) * GLChecks.getTexLevelParameteri(texture, GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_HEIGHT)); - } - - /** - * Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the {@code texture} parameter. - * - *

    LWJGL note: If glMapTexture2DINTEL without an explicit length argument is used and direct-state-access functionality is not available in the - * current context, the texture object must currently be bound to the GL_TEXTURE_2D target.

    - * - * @param texture the texture to map - * @param level the mipmap level-of-detail of the texture - * @param access the type of access that will be performed by the application. One of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}
    - * @param stride returns the distance in bytes between subsequent rows in the texture - * @param layout returns the internal layout of the texture in the graphics memory - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapTexture2DINTEL(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLbitfield") int access, @NativeType("GLint *") IntBuffer stride, @NativeType("GLenum *") IntBuffer layout, @Nullable ByteBuffer old_buffer) { - if (CHECKS) { - check(stride, 1); - check(layout, 1); - } - long __result = nglMapTexture2DINTEL(texture, level, access, memAddress(stride), memAddress(layout)); - int length = getStride(stride) * GLChecks.getTexLevelParameteri(texture, GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_HEIGHT); - return apiGetMappedBuffer(old_buffer, __result, length); - } - - /** - * Attempts to return a direct pointer to the graphics storage for 2D texture indicated by the {@code texture} parameter. - * - *

    LWJGL note: If glMapTexture2DINTEL without an explicit length argument is used and direct-state-access functionality is not available in the - * current context, the texture object must currently be bound to the GL_TEXTURE_2D target.

    - * - * @param texture the texture to map - * @param level the mipmap level-of-detail of the texture - * @param access the type of access that will be performed by the application. One of:
    {@link GL30#GL_MAP_READ_BIT MAP_READ_BIT}{@link GL30#GL_MAP_WRITE_BIT MAP_WRITE_BIT}
    - * @param stride returns the distance in bytes between subsequent rows in the texture - * @param layout returns the internal layout of the texture in the graphics memory - */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapTexture2DINTEL(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLbitfield") int access, @NativeType("GLint *") IntBuffer stride, @NativeType("GLenum *") IntBuffer layout, long length, @Nullable ByteBuffer old_buffer) { - if (CHECKS) { - check(stride, 1); - check(layout, 1); - } - long __result = nglMapTexture2DINTEL(texture, level, access, memAddress(stride), memAddress(layout)); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - /** Array version of: {@link #glMapTexture2DINTEL MapTexture2DINTEL} */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapTexture2DINTEL(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLbitfield") int access, @NativeType("GLint *") int[] stride, @NativeType("GLenum *") int[] layout) { - long __functionAddress = GL.getICD().glMapTexture2DINTEL; - if (CHECKS) { - check(__functionAddress); - check(stride, 1); - check(layout, 1); - } - long __result = callPPP(texture, level, access, stride, layout, __functionAddress); - return memByteBufferSafe(__result, getStride(stride) * GLChecks.getTexLevelParameteri(texture, GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_HEIGHT)); - } - - /** Array version of: {@link #glMapTexture2DINTEL MapTexture2DINTEL} */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapTexture2DINTEL(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLbitfield") int access, @NativeType("GLint *") int[] stride, @NativeType("GLenum *") int[] layout, @Nullable ByteBuffer old_buffer) { - long __functionAddress = GL.getICD().glMapTexture2DINTEL; - if (CHECKS) { - check(__functionAddress); - check(stride, 1); - check(layout, 1); - } - long __result = callPPP(texture, level, access, stride, layout, __functionAddress); - int length = getStride(stride) * GLChecks.getTexLevelParameteri(texture, GL11.GL_TEXTURE_2D, level, GL11.GL_TEXTURE_HEIGHT); - return apiGetMappedBuffer(old_buffer, __result, length); - } - - /** Array version of: {@link #glMapTexture2DINTEL MapTexture2DINTEL} */ - @Nullable - @NativeType("void *") - public static ByteBuffer glMapTexture2DINTEL(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLbitfield") int access, @NativeType("GLint *") int[] stride, @NativeType("GLenum *") int[] layout, long length, @Nullable ByteBuffer old_buffer) { - long __functionAddress = GL.getICD().glMapTexture2DINTEL; - if (CHECKS) { - check(__functionAddress); - check(stride, 1); - check(layout, 1); - } - long __result = callPPP(texture, level, access, stride, layout, __functionAddress); - return apiGetMappedBuffer(old_buffer, __result, (int)length); - } - - private static int getStride(IntBuffer stride) { - return stride.get(stride.position()); - } - - private static int getStride(int[] stride) { - return stride[0]; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/INTELPerformanceQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/INTELPerformanceQuery.java deleted file mode 100644 index f620200f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/INTELPerformanceQuery.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the INTEL_performance_query extension. - * - *

    The purpose of this extension is to expose Intel proprietary hardware performance counters to the OpenGL applications. Performance counters may count:

    - * - *
      - *
    • number of hardware events such as number of spawned vertex shaders. In this case the results represent the number of events.
    • - *
    • duration of certain activity, like time took by all fragment shader invocations. In that case the result usually represents the number of clocks in - * which the particular HW unit was busy. In order to use such counter efficiently, it should be normalized to the range of <0,1> by dividing - * its value by the number of render clocks.
    • - *
    • used throughput of certain memory types such as texture memory. In that case the result of performance counter usually represents the number of - * bytes transferred between GPU and memory.
    • - *
    - * - *

    This extension specifies universal API to manage performance counters on different Intel hardware platforms. Performance counters are grouped together - * into proprietary, hardware-specific, fixed sets of counters that are measured together by the GPU.

    - * - *

    It is assumed that performance counters are started and ended on any arbitrary boundaries during rendering.

    - * - *

    A set of performance counters is represented by a unique query type. Each query type is identified by assigned name and ID. Multiple query types (sets - * of performance counters) are supported by the Intel hardware. However each Intel hardware generation supports different sets of performance counters. - * Therefore the query types between hardware generations can be different. The definition of query types and their results structures can be learned - * through the API. It is also documented in a separate document of Intel OGL Performance Counters Specification issued per each new hardware generation.

    - * - *

    The API allows to create multiple instances of any query type and to sample different fragments of 3D rendering with such instances. Query instances - * are identified with handles.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public class INTELPerformanceQuery { - - static { GL.initialize(); } - - /** Returned by the capsMask parameter of GetPerfQueryInfoINTEL. */ - public static final int - GL_PERFQUERY_SINGLE_CONTEXT_INTEL = 0x0, - GL_PERFQUERY_GLOBAL_CONTEXT_INTEL = 0x1; - - /** Accepted by the flags parameter of GetPerfQueryDataINTEL. */ - public static final int - GL_PERFQUERY_WAIT_INTEL = 0x83FB, - GL_PERFQUERY_FLUSH_INTEL = 0x83FA, - GL_PERFQUERY_DONOT_FLUSH_INTEL = 0x83F9; - - /** Returned by GetPerfCounterInfoINTEL function as counter type enumeration in location pointed by counterTypeEnum. */ - public static final int - GL_PERFQUERY_COUNTER_EVENT_INTEL = 0x94F0, - GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL = 0x94F1, - GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL = 0x94F2, - GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL = 0x94F3, - GL_PERFQUERY_COUNTER_RAW_INTEL = 0x94F4, - GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL = 0x94F5; - - /** Returned by glGetPerfCounterInfoINTEL function as counter data type enumeration in location pointed by counterDataTypeEnum. */ - public static final int - GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL = 0x94F8, - GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL = 0x94F9, - GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL = 0x94FA, - GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL = 0x94FB, - GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL = 0x94FC; - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int - GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL = 0x94FD, - GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL = 0x94FE, - GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL = 0x94FF; - - /** Accepted by the {@code pname} parameter of GetBooleanv. */ - public static final int GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL = 0x9500; - - protected INTELPerformanceQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ glBeginPerfQueryINTEL ] --- - - public static native void glBeginPerfQueryINTEL(@NativeType("GLuint") int queryHandle); - - // --- [ glCreatePerfQueryINTEL ] --- - - public static native void nglCreatePerfQueryINTEL(int queryId, long queryHandle); - - public static void glCreatePerfQueryINTEL(@NativeType("GLuint") int queryId, @NativeType("GLuint *") IntBuffer queryHandle) { - if (CHECKS) { - check(queryHandle, 1); - } - nglCreatePerfQueryINTEL(queryId, memAddress(queryHandle)); - } - - @NativeType("void") - public static int glCreatePerfQueryINTEL(@NativeType("GLuint") int queryId) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer queryHandle = stack.callocInt(1); - nglCreatePerfQueryINTEL(queryId, memAddress(queryHandle)); - return queryHandle.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeletePerfQueryINTEL ] --- - - public static native void glDeletePerfQueryINTEL(@NativeType("GLuint") int queryHandle); - - // --- [ glEndPerfQueryINTEL ] --- - - public static native void glEndPerfQueryINTEL(@NativeType("GLuint") int queryHandle); - - // --- [ glGetFirstPerfQueryIdINTEL ] --- - - public static native void nglGetFirstPerfQueryIdINTEL(long queryId); - - public static void glGetFirstPerfQueryIdINTEL(@NativeType("GLuint *") IntBuffer queryId) { - if (CHECKS) { - check(queryId, 1); - } - nglGetFirstPerfQueryIdINTEL(memAddress(queryId)); - } - - @NativeType("void") - public static int glGetFirstPerfQueryIdINTEL() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer queryId = stack.callocInt(1); - nglGetFirstPerfQueryIdINTEL(memAddress(queryId)); - return queryId.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNextPerfQueryIdINTEL ] --- - - public static native void nglGetNextPerfQueryIdINTEL(int queryId, long nextQueryId); - - public static void glGetNextPerfQueryIdINTEL(@NativeType("GLuint") int queryId, @NativeType("GLuint *") IntBuffer nextQueryId) { - if (CHECKS) { - check(nextQueryId, 1); - } - nglGetNextPerfQueryIdINTEL(queryId, memAddress(nextQueryId)); - } - - @NativeType("void") - public static int glGetNextPerfQueryIdINTEL(@NativeType("GLuint") int queryId) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer nextQueryId = stack.callocInt(1); - nglGetNextPerfQueryIdINTEL(queryId, memAddress(nextQueryId)); - return nextQueryId.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPerfCounterInfoINTEL ] --- - - public static native void nglGetPerfCounterInfoINTEL(int queryId, int counterId, int counterNameLength, long counterName, int counterDescLength, long counterDesc, long counterOffset, long counterDataSize, long counterTypeEnum, long counterDataTypeEnum, long rawCounterMaxValue); - - public static void glGetPerfCounterInfoINTEL(@NativeType("GLuint") int queryId, @NativeType("GLuint") int counterId, @NativeType("GLchar *") ByteBuffer counterName, @NativeType("GLchar *") ByteBuffer counterDesc, @NativeType("GLuint *") IntBuffer counterOffset, @NativeType("GLuint *") IntBuffer counterDataSize, @NativeType("GLuint *") IntBuffer counterTypeEnum, @NativeType("GLuint *") IntBuffer counterDataTypeEnum, @NativeType("GLuint64 *") LongBuffer rawCounterMaxValue) { - if (CHECKS) { - check(counterOffset, 1); - check(counterDataSize, 1); - check(counterTypeEnum, 1); - check(counterDataTypeEnum, 1); - check(rawCounterMaxValue, 1); - } - nglGetPerfCounterInfoINTEL(queryId, counterId, counterName.remaining(), memAddress(counterName), counterDesc.remaining(), memAddress(counterDesc), memAddress(counterOffset), memAddress(counterDataSize), memAddress(counterTypeEnum), memAddress(counterDataTypeEnum), memAddress(rawCounterMaxValue)); - } - - // --- [ glGetPerfQueryDataINTEL ] --- - - public static native void nglGetPerfQueryDataINTEL(int queryHandle, int flags, int dataSize, long data, long bytesWritten); - - public static void glGetPerfQueryDataINTEL(@NativeType("GLuint") int queryHandle, @NativeType("GLuint") int flags, @NativeType("void *") ByteBuffer data, @NativeType("GLuint *") IntBuffer bytesWritten) { - if (CHECKS) { - check(bytesWritten, 1); - } - nglGetPerfQueryDataINTEL(queryHandle, flags, data.remaining(), memAddress(data), memAddress(bytesWritten)); - } - - // --- [ glGetPerfQueryIdByNameINTEL ] --- - - public static native void nglGetPerfQueryIdByNameINTEL(long queryName, long queryId); - - public static void glGetPerfQueryIdByNameINTEL(@NativeType("GLchar *") ByteBuffer queryName, @NativeType("GLuint *") IntBuffer queryId) { - if (CHECKS) { - checkNT1(queryName); - check(queryId, 1); - } - nglGetPerfQueryIdByNameINTEL(memAddress(queryName), memAddress(queryId)); - } - - public static void glGetPerfQueryIdByNameINTEL(@NativeType("GLchar *") CharSequence queryName, @NativeType("GLuint *") IntBuffer queryId) { - if (CHECKS) { - check(queryId, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(queryName, true); - long queryNameEncoded = stack.getPointerAddress(); - nglGetPerfQueryIdByNameINTEL(queryNameEncoded, memAddress(queryId)); - } finally { - stack.setPointer(stackPointer); - } - } - - @NativeType("void") - public static int glGetPerfQueryIdByNameINTEL(@NativeType("GLchar *") CharSequence queryName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(queryName, true); - long queryNameEncoded = stack.getPointerAddress(); - IntBuffer queryId = stack.callocInt(1); - nglGetPerfQueryIdByNameINTEL(queryNameEncoded, memAddress(queryId)); - return queryId.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPerfQueryInfoINTEL ] --- - - public static native void nglGetPerfQueryInfoINTEL(int queryId, int queryNameLength, long queryName, long dataSize, long noCounters, long noInstances, long capsMask); - - public static void glGetPerfQueryInfoINTEL(@NativeType("GLuint") int queryId, @NativeType("GLchar *") ByteBuffer queryName, @NativeType("GLuint *") IntBuffer dataSize, @NativeType("GLuint *") IntBuffer noCounters, @NativeType("GLuint *") IntBuffer noInstances, @NativeType("GLuint *") IntBuffer capsMask) { - if (CHECKS) { - check(dataSize, 1); - check(noCounters, 1); - check(noInstances, 1); - check(capsMask, 1); - } - nglGetPerfQueryInfoINTEL(queryId, queryName.remaining(), memAddress(queryName), memAddress(dataSize), memAddress(noCounters), memAddress(noInstances), memAddress(capsMask)); - } - - /** Array version of: {@link #glCreatePerfQueryINTEL CreatePerfQueryINTEL} */ - public static void glCreatePerfQueryINTEL(@NativeType("GLuint") int queryId, @NativeType("GLuint *") int[] queryHandle) { - long __functionAddress = GL.getICD().glCreatePerfQueryINTEL; - if (CHECKS) { - check(__functionAddress); - check(queryHandle, 1); - } - callPV(queryId, queryHandle, __functionAddress); - } - - /** Array version of: {@link #glGetFirstPerfQueryIdINTEL GetFirstPerfQueryIdINTEL} */ - public static void glGetFirstPerfQueryIdINTEL(@NativeType("GLuint *") int[] queryId) { - long __functionAddress = GL.getICD().glGetFirstPerfQueryIdINTEL; - if (CHECKS) { - check(__functionAddress); - check(queryId, 1); - } - callPV(queryId, __functionAddress); - } - - /** Array version of: {@link #glGetNextPerfQueryIdINTEL GetNextPerfQueryIdINTEL} */ - public static void glGetNextPerfQueryIdINTEL(@NativeType("GLuint") int queryId, @NativeType("GLuint *") int[] nextQueryId) { - long __functionAddress = GL.getICD().glGetNextPerfQueryIdINTEL; - if (CHECKS) { - check(__functionAddress); - check(nextQueryId, 1); - } - callPV(queryId, nextQueryId, __functionAddress); - } - - /** Array version of: {@link #glGetPerfCounterInfoINTEL GetPerfCounterInfoINTEL} */ - public static void glGetPerfCounterInfoINTEL(@NativeType("GLuint") int queryId, @NativeType("GLuint") int counterId, @NativeType("GLchar *") ByteBuffer counterName, @NativeType("GLchar *") ByteBuffer counterDesc, @NativeType("GLuint *") int[] counterOffset, @NativeType("GLuint *") int[] counterDataSize, @NativeType("GLuint *") int[] counterTypeEnum, @NativeType("GLuint *") int[] counterDataTypeEnum, @NativeType("GLuint64 *") long[] rawCounterMaxValue) { - long __functionAddress = GL.getICD().glGetPerfCounterInfoINTEL; - if (CHECKS) { - check(__functionAddress); - check(counterOffset, 1); - check(counterDataSize, 1); - check(counterTypeEnum, 1); - check(counterDataTypeEnum, 1); - check(rawCounterMaxValue, 1); - } - callPPPPPPPV(queryId, counterId, counterName.remaining(), memAddress(counterName), counterDesc.remaining(), memAddress(counterDesc), counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue, __functionAddress); - } - - /** Array version of: {@link #glGetPerfQueryDataINTEL GetPerfQueryDataINTEL} */ - public static void glGetPerfQueryDataINTEL(@NativeType("GLuint") int queryHandle, @NativeType("GLuint") int flags, @NativeType("void *") ByteBuffer data, @NativeType("GLuint *") int[] bytesWritten) { - long __functionAddress = GL.getICD().glGetPerfQueryDataINTEL; - if (CHECKS) { - check(__functionAddress); - check(bytesWritten, 1); - } - callPPV(queryHandle, flags, data.remaining(), memAddress(data), bytesWritten, __functionAddress); - } - - /** Array version of: {@link #glGetPerfQueryIdByNameINTEL GetPerfQueryIdByNameINTEL} */ - public static void glGetPerfQueryIdByNameINTEL(@NativeType("GLchar *") ByteBuffer queryName, @NativeType("GLuint *") int[] queryId) { - long __functionAddress = GL.getICD().glGetPerfQueryIdByNameINTEL; - if (CHECKS) { - check(__functionAddress); - checkNT1(queryName); - check(queryId, 1); - } - callPPV(memAddress(queryName), queryId, __functionAddress); - } - - /** Array version of: {@link #glGetPerfQueryIdByNameINTEL GetPerfQueryIdByNameINTEL} */ - public static void glGetPerfQueryIdByNameINTEL(@NativeType("GLchar *") CharSequence queryName, @NativeType("GLuint *") int[] queryId) { - long __functionAddress = GL.getICD().glGetPerfQueryIdByNameINTEL; - if (CHECKS) { - check(__functionAddress); - check(queryId, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(queryName, true); - long queryNameEncoded = stack.getPointerAddress(); - callPPV(queryNameEncoded, queryId, __functionAddress); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGetPerfQueryInfoINTEL GetPerfQueryInfoINTEL} */ - public static void glGetPerfQueryInfoINTEL(@NativeType("GLuint") int queryId, @NativeType("GLchar *") ByteBuffer queryName, @NativeType("GLuint *") int[] dataSize, @NativeType("GLuint *") int[] noCounters, @NativeType("GLuint *") int[] noInstances, @NativeType("GLuint *") int[] capsMask) { - long __functionAddress = GL.getICD().glGetPerfQueryInfoINTEL; - if (CHECKS) { - check(__functionAddress); - check(dataSize, 1); - check(noCounters, 1); - check(noInstances, 1); - check(capsMask, 1); - } - callPPPPPV(queryId, queryName.remaining(), memAddress(queryName), dataSize, noCounters, noInstances, capsMask, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/InputImplementation.java b/LWJGL/src/main/java/org/lwjgl/opengl/InputImplementation.java deleted file mode 100644 index b134e60d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/InputImplementation.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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.opengl; - -/** - * 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 org.lwjgl.LWJGLException; - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -public interface InputImplementation { - /* - * Mouse methods - */ - /** Query of wheel support */ - boolean hasWheel(); - - /** Query of button count */ - int getButtonCount(); - - /** - * Method to create the mouse. - */ - void createMouse() throws LWJGLException; - - /** - * Method the destroy the mouse - */ - void destroyMouse(); - - /** - * Method to poll the mouse - */ - void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons); - - /** - * Method to read the mouse buffer - */ - void readMouse(ByteBuffer buffer); - - void grabMouse(boolean grab); - - /** - * Function to determine native cursor support - */ - int getNativeCursorCapabilities(); - - /** Method to set the native cursor position */ - void setCursorPosition(int x, int y); - - /** Method to set the native cursor */ - void setNativeCursor(Object handle) throws LWJGLException; - - /** Method returning the minimum cursor size */ - int getMinCursorSize(); - - /** Method returning the maximum cursor size */ - int getMaxCursorSize(); - - /* - * Keyboard methods - */ - - /** - * Method to create the keyboard - */ - void createKeyboard() throws LWJGLException; - - /** - * Method to destroy the keyboard - */ - void destroyKeyboard(); - - /** - * Method to poll the keyboard. - * - * @param keyDownBuffer the address of a 256-byte buffer to place - * key states in. - */ - void pollKeyboard(ByteBuffer keyDownBuffer); - - /** - * Method to read the keyboard buffer - */ - void readKeyboard(ByteBuffer buffer); - -// 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; - - void destroyCursor(Object cursor_handle); - - int getWidth(); - - int getHeight(); - - boolean isInsideWindow(); -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRBlendEquationAdvanced.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRBlendEquationAdvanced.java deleted file mode 100644 index 812fd00b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRBlendEquationAdvanced.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the KHR_blend_equation_advanced extension. - * - *

    This extension adds a number of "advanced" blending equations that can be used to perform new color blending operations, many of which are more complex - * than the standard blend modes provided by unextended OpenGL. This extension provides two different extension string entries:

    - * - *
      - *
    • KHR_blend_equation_advanced:Provides the new blending equations, but guarantees defined results only if each sample is touched no more than - * once in any single rendering pass. The command {@link #glBlendBarrierKHR BlendBarrierKHR} is provided to indicate a boundary between passes.
    • - *
    • {@link KHRBlendEquationAdvancedCoherent KHR_blend_equation_advanced_coherent}: Provides the new blending equations, and guarantees that blending is - * done coherently and in API primitive order. An enable is provided to allow implementations to opt out of fully coherent blending and instead behave - * as though only KHR_blend_equation_advanced were supported.
    • - *
    - * - *

    Some implementations may support KHR_blend_equation_advanced without supporting KHR_blend_equation_advanced_coherent.

    - * - *

    In unextended OpenGL, the set of blending equations is limited, and can be expressed very simply. The {@link GL14#GL_MIN MIN} and {@link GL14#GL_MAX MAX} blend equations - * simply compute component-wise minimums or maximums of source and destination color components. The {@link GL14#GL_FUNC_ADD FUNC_ADD}, {@link GL14#GL_FUNC_SUBTRACT FUNC_SUBTRACT}, and - * {@link GL14#GL_FUNC_REVERSE_SUBTRACT FUNC_REVERSE_SUBTRACT} multiply the source and destination colors by source and destination factors and either add the two products together - * or subtract one from the other. This limited set of operations supports many common blending operations but precludes the use of more sophisticated - * transparency and blending operations commonly available in many dedicated imaging APIs.

    - * - *

    This extension provides a number of new "advanced" blending equations. Unlike traditional blending operations using the {@link GL14#GL_FUNC_ADD FUNC_ADD} equation, - * these blending equations do not use source and destination factors specified by {@link GL11C#glBlendFunc BlendFunc}. Instead, each blend equation specifies a complete - * equation based on the source and destination colors. These new blend equations are used for both RGB and alpha components; they may not be used to - * perform separate RGB and alpha blending (via functions like {@link GL20C#glBlendEquationSeparate BlendEquationSeparate}).

    - * - *

    These blending operations are performed using premultiplied source and destination colors, where RGB colors produced by the fragment shader and stored - * in the framebuffer are considered to be multiplied by alpha (coverage). Many of these advanced blending equations are formulated where the result of - * blending source and destination colors with partial coverage have three separate contributions: from the portions covered by both the source and the - * destination, from the portion covered only by the source, and from the portion covered only by the destination. Such equations are defined assuming that - * the source and destination coverage have no spatial correlation within the pixel.

    - * - *

    In addition to the coherency issues on implementations not supporting KHR_blend_equation_advanced_coherent, this extension has several limitations worth - * noting. First, the new blend equations are not supported while rendering to more than one color buffer at once; an {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} will be - * generated if an application attempts to render any primitives in this unsupported configuration. Additionally, blending precision may be limited to - * 16-bit floating-point, which could result in a loss of precision and dynamic range for framebuffer formats with 32-bit floating-point components, and in - * a loss of precision for formats with 12- and 16-bit signed or unsigned normalized integer components.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public class KHRBlendEquationAdvanced { - - static { GL.initialize(); } - - /** Accepted by the {@code mode} parameter of BlendEquation and BlendEquationi. */ - public static final int - GL_MULTIPLY_KHR = 0x9294, - GL_SCREEN_KHR = 0x9295, - GL_OVERLAY_KHR = 0x9296, - GL_DARKEN_KHR = 0x9297, - GL_LIGHTEN_KHR = 0x9298, - GL_COLORDODGE_KHR = 0x9299, - GL_COLORBURN_KHR = 0x929A, - GL_HARDLIGHT_KHR = 0x929B, - GL_SOFTLIGHT_KHR = 0x929C, - GL_DIFFERENCE_KHR = 0x929E, - GL_EXCLUSION_KHR = 0x92A0, - GL_HSL_HUE_KHR = 0x92AD, - GL_HSL_SATURATION_KHR = 0x92AE, - GL_HSL_COLOR_KHR = 0x92AF, - GL_HSL_LUMINOSITY_KHR = 0x92B0; - - protected KHRBlendEquationAdvanced() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendBarrierKHR ] --- - - /** - * Specifies a boundary between passes when using advanced blend equations. - * - *

    When using advanced blending equations, applications should split their rendering into a collection of blending passes, none of which touch an - * individual sample in the framebuffer more than once. The results of blending are undefined if the sample being blended has been touched previously in - * the same pass. Any command that causes the value of a sample to be modified using the framebuffer is considered to touch the sample, including clears, - * blended or unblended primitives, and {@link GL30C#glBlitFramebuffer BlitFramebuffer} copies.

    - */ - public static native void glBlendBarrierKHR(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRBlendEquationAdvancedCoherent.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRBlendEquationAdvancedCoherent.java deleted file mode 100644 index 05287f19..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRBlendEquationAdvancedCoherent.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the KHR_blend_equation_advanced_coherent extension. - * - *

    This extension guarantees that blending is done coherently and in API primitive order. An enable is provided to allow implementations to opt out of - * fully coherent blending and instead behave as though only {@link KHRBlendEquationAdvanced KHR_blend_equation_advanced} were supported.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public final class KHRBlendEquationAdvancedCoherent { - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, and by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetFloatv, - * GetDoublev and GetInteger64v. - */ - public static final int GL_BLEND_ADVANCED_COHERENT_KHR = 0x9285; - - private KHRBlendEquationAdvancedCoherent() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRContextFlushControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRContextFlushControl.java deleted file mode 100644 index 4dbff592..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRContextFlushControl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the KHR_context_flush_control extension. - * - *

    OpenGL and OpenGL ES have long supported multiple contexts. The semantics of switching contexts is generally left to window system binding APIs such as - * WGL, GLX and EGL. Most of these APIs (if not all) specify that when the current context for a thread is changed, the outgoing context performs an - * implicit flush of any commands that have been issued to that point. OpenGL and OpenGL ES define a flush as sending any pending commands for execution - * and that this action will result in their completion in finite time.

    - * - *

    This behavior has subtle consequences. For example, if an application is rendering to the front buffer and switches contexts, it may assume that any - * rendering performed thus far will eventually be visible to the user. With recent introduction of shared memory buffers, there become inumerable ways in - * which applications may observe side effects of an implicit flush (or lack thereof).

    - * - *

    In general, a full flush is not the desired behavior of the application. Nonetheless, applications that switch contexts frequently suffer the - * performance consequences of this unless implementations make special considerations for them, which is generally untenable.

    - * - *

    This extension allows querying the context flush behavior.

    - * - *

    Promoted to core in {@link GL45 OpenGL 4.5}.

    - */ -public final class KHRContextFlushControl { - - /** Accepted by the {@code pname} parameter of GetIntegerv, GetFloatv, GetBooleanv GetDoublev and GetInteger64v. */ - public static final int GL_CONTEXT_RELEASE_BEHAVIOR = 0x82FB; - - /** Returned in {@code data} by GetIntegerv, GetFloatv, GetBooleanv GetDoublev and GetInteger64v when {@code pname} is {@link #GL_CONTEXT_RELEASE_BEHAVIOR CONTEXT_RELEASE_BEHAVIOR}. */ - public static final int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC; - - private KHRContextFlushControl() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRDebug.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRDebug.java deleted file mode 100644 index 46a36cda..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRDebug.java +++ /dev/null @@ -1,632 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the KHR_debug extension. - * - *

    This extension allows the GL to notify applications when various events occur that may be useful during application development, debugging and - * profiling.

    - * - *

    These events are represented in the form of enumerable messages with a human-readable string representation. Examples of debug events include incorrect - * use of the GL, warnings of undefined behavior, and performance warnings.

    - * - *

    A message is uniquely identified by a source, a type and an implementation-dependent ID within the source and type pair.

    - * - *

    A message's source identifies the origin of the message and can either describe components of the GL, the window system, third-party external sources - * such as external debuggers, or even the application itself.

    - * - *

    The type of the message roughly identifies the nature of the event that caused the message. Examples include errors, performance warnings, warnings - * about undefined behavior or notifications identifying that the application is within a specific section of the application code.

    - * - *

    A message's ID for a given source and type further distinguishes messages within namespaces. For example, an error caused by a negative parameter value - * or an invalid internal texture format are both errors generated by the API, but would likely have different message IDs.

    - * - *

    Each message is also assigned to a severity level that denotes roughly how "important" that message is in comparison to other messages across all - * sources and types. For example, notification of a GL error would likely have a higher severity than a performance warning due to redundant state changes.

    - * - *

    Furthermore, every message contains an implementation-dependent string representation that provides a useful description of the event.

    - * - *

    Messages are communicated to the application through an application-defined callback function that is called by the GL implementation on each debug - * message. The motivation for the callback routine is to free application developers from actively having to query whether a GL error, or any other - * debuggable event has happened after each call to a GL function. With a callback, developers can keep their code free of debug checks, set breakpoints in - * the callback function, and only have to react to messages as they occur. In situations where using a callback is not possible, a message log is also - * provided that stores only copies of recent messages until they are actively queried.

    - * - *

    To control the volume of debug output, messages can be disabled either individually by ID, or entire sets of messages can be turned off based on - * combination of source and type, through the entire application code or only section of the code encapsulated in debug groups. A debug group may also be - * used to annotate the command stream using descriptive texts.

    - * - *

    This extension also defines debug markers, a mechanism for the OpenGL application to annotate the command stream with markers for discrete events.

    - * - *

    When profiling or debugging an OpenGL application with a built-in or an external debugger or profiler, it is difficult to relate the commands within the - * command stream to the elements of the scene or parts of the program code to which they correspond. Debug markers and debug groups help obviate this by - * allowing applications to specify this link. For example, a debug marker can be used to identify the beginning of a frame in the command stream and a - * debug group can encapsulate a specific command stream to identify a rendering pass. Debug groups also allow control of the debug outputs volume per - * section of an application code providing an effective way to handle the massive amount of debug outputs that drivers can generate.

    - * - *

    Some existing implementations of {@link ARBDebugOutput ARB_debug_output} only expose the ARB_debug_output extension string if the context was created with the debug - * flag {GLX|WGL}_CONTEXT_DEBUG_BIT_ARB as specified in {GLX|WGL}_ARB_create_context. The behavior is not obvious when the functionality is brought into - * the OpenGL core specification because the extension string and function entry points must always exist.

    - * - *

    This extension modifies the existing ARB_debug_output extension to allow implementations to always have an empty message log. The specific messages - * written to the message log or callback routines are already implementation defined, so this specification simply makes it explicit that it's fine for - * there to be zero messages generated, even when a GL error occurs, which is useful if the context is non-debug.

    - * - *

    Debug output can be enabled and disabled by changing the {@link #GL_DEBUG_OUTPUT DEBUG_OUTPUT} state. It is implementation defined how much debug output is generated if the - * context was created without the {@link #GL_CONTEXT_FLAG_DEBUG_BIT CONTEXT_FLAG_DEBUG_BIT} set. This is a new query bit added to the existing {@link GL30#GL_CONTEXT_FLAGS CONTEXT_FLAGS} state to specify whether the - * context was created with debug enabled.

    - * - *

    Finally, this extension defines a mechanism for OpenGL applications to label their objects (textures, buffers, shaders, etc.) with a descriptive string.

    - * - *

    When profiling or debugging an OpenGL application within an external or built-in (debut output API) debugger or profiler it is difficult to identify - * objects from their object names (integers).

    - * - *

    Even when the object itself is viewed it can be problematic to differentiate between similar objects. Attaching a descriptive string, a label, to an - * object obviates this difficulty.

    - * - *

    The intended purpose of this extension is purely to improve the user experience within OpenGL development tools and application built-in profilers and - * debuggers. This extension typically improves OpenGL programmers efficiency by allowing them to instantly detect issues and the reason for these issues - * giving him more time to focus on adding new features to an OpenGL application.

    - * - *

    Promoted to core in {@link GL43 OpenGL 4.3}.

    - */ -public class KHRDebug { - - static { GL.initialize(); } - - /** Tokens accepted by the {@code target} parameters of Enable, Disable, and IsEnabled. */ - public static final int - GL_DEBUG_OUTPUT = 0x92E0, - GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; - - /** Returned by GetIntegerv when {@code pname} is CONTEXT_FLAGS. */ - public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 0x2; - - /** Tokens accepted by the {@code value} parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v. */ - public static final int - GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, - GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, - GL_DEBUG_LOGGED_MESSAGES = 0x9145, - GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, - GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, - GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, - GL_MAX_LABEL_LENGTH = 0x82E8; - - /** Tokens accepted by the {@code pname} parameter of GetPointerv. */ - public static final int - GL_DEBUG_CALLBACK_FUNCTION = 0x8244, - GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; - - /** - * Tokens accepted or provided by the {@code source} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the {@code sources} parameter - * of GetDebugMessageLog (some commands restrict {@code source} to a subset of these parameters; see the specification body for details). - */ - public static final int - GL_DEBUG_SOURCE_API = 0x8246, - GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, - GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, - GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, - GL_DEBUG_SOURCE_APPLICATION = 0x824A, - GL_DEBUG_SOURCE_OTHER = 0x824B; - - /** - * Tokens accepted or provided by the {@code type} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the {@code types} parameter of - * GetDebugMessageLog. - */ - public static final int - GL_DEBUG_TYPE_ERROR = 0x824C, - GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, - GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, - GL_DEBUG_TYPE_PORTABILITY = 0x824F, - GL_DEBUG_TYPE_PERFORMANCE = 0x8250, - GL_DEBUG_TYPE_OTHER = 0x8251, - GL_DEBUG_TYPE_MARKER = 0x8268; - - /** Tokens accepted or provided by the {@code type} parameters of DebugMessageControl and DEBUGPROC, and the {@code types} parameter of GetDebugMessageLog. */ - public static final int - GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, - GL_DEBUG_TYPE_POP_GROUP = 0x826A; - - /** - * Tokens accepted or provided by the {@code severity} parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the - * {@code severities} parameter of GetDebugMessageLog. - */ - public static final int - GL_DEBUG_SEVERITY_HIGH = 0x9146, - GL_DEBUG_SEVERITY_MEDIUM = 0x9147, - GL_DEBUG_SEVERITY_LOW = 0x9148, - GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; - - /** Tokens accepted or provided by the {@code identifier} parameters of ObjectLabel and GetObjectLabel. */ - public static final int - GL_BUFFER = 0x82E0, - GL_SHADER = 0x82E1, - GL_PROGRAM = 0x82E2, - GL_QUERY = 0x82E3, - GL_PROGRAM_PIPELINE = 0x82E4, - GL_SAMPLER = 0x82E6, - GL_DISPLAY_LIST = 0x82E7; - - protected KHRDebug() { - throw new UnsupportedOperationException(); - } - - // --- [ glDebugMessageControl ] --- - - /** - * Unsafe version of: {@link #glDebugMessageControl DebugMessageControl} - * - * @param count the length of the array {@code ids} - */ - public static void nglDebugMessageControl(int source, int type, int severity, int count, long ids, boolean enabled) { - GL43C.nglDebugMessageControl(source, type, severity, count, ids, enabled); - } - - /** - * Controls the volume of debug output in the active debug group, by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source}, {@code type}, or {@code severity} is {@link GL11#GL_DONT_CARE DONT_CARE}, the messages from all sources, of all types, or of all severities are - * referenced respectively.
    • - *
    • When values other than {@link GL11#GL_DONT_CARE DONT_CARE} are specified, all messages whose source, type, or severity match the specified {@code source}, {@code type}, - * or {@code severity} respectively will be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated.
    • - *
    - * - *

    Unrecognized message IDs in {@code ids} are ignored. If {@code count} is zero, the value if {@code ids} is ignored.

    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled the GL operates the same as if messages of every {@code source}, {@code type} or {@code severity} are disabled.

    - * - * @param source the source of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param severity the severity of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param ids an array of unsigned integers containing the ids of the messages to enable or disable - * @param enabled whether the selected messages should be enabled or disabled - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") IntBuffer ids, @NativeType("GLboolean") boolean enabled) { - GL43C.glDebugMessageControl(source, type, severity, ids, enabled); - } - - /** - * Controls the volume of debug output in the active debug group, by disabling specific or groups of messages. - * - *

    If {@code enabled} is {@link GL11#GL_TRUE TRUE}, the referenced subset of messages will be enabled. If {@link GL11#GL_FALSE FALSE}, then those messages will be disabled.

    - * - *

    This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following - * ways:

    - * - *
      - *
    • If {@code source}, {@code type}, or {@code severity} is {@link GL11#GL_DONT_CARE DONT_CARE}, the messages from all sources, of all types, or of all severities are - * referenced respectively.
    • - *
    • When values other than {@link GL11#GL_DONT_CARE DONT_CARE} are specified, all messages whose source, type, or severity match the specified {@code source}, {@code type}, - * or {@code severity} respectively will be referenced.
    • - *
    • If {@code count} is greater than zero, then {@code ids} is an array of {@code count} message IDs for the specified combination of {@code source} and - * {@code type}. In this case, if {@code source} or {@code type} is {@link GL11#GL_DONT_CARE DONT_CARE}, or {@code severity} is not {@link GL11#GL_DONT_CARE DONT_CARE}, the error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated.
    • - *
    - * - *

    Unrecognized message IDs in {@code ids} are ignored. If {@code count} is zero, the value if {@code ids} is ignored.

    - * - *

    Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled - * state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a - * single call, and individually disabling all messages from that source using their types and IDs.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled the GL operates the same as if messages of every {@code source}, {@code type} or {@code severity} are disabled.

    - * - * @param source the source of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param severity the severity of debug messages to enable or disable. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param enabled whether the selected messages should be enabled or disabled - */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @NativeType("GLuint const *") int id, @NativeType("GLboolean") boolean enabled) { - GL43C.glDebugMessageControl(source, type, severity, id, enabled); - } - - // --- [ glDebugMessageInsert ] --- - - /** - * Unsafe version of: {@link #glDebugMessageInsert DebugMessageInsert} - * - * @param length the length of the string contained in the character array whose address is given by {@code message} - */ - public static void nglDebugMessageInsert(int source, int type, int id, int severity, int length, long message) { - GL43C.nglDebugMessageInsert(source, type, id, severity, length, message); - } - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the caller. The string - * {@code buf} contains the string representation of the message. The parameter {@code length} contains the number of characters in {@code buf}. If - * {@code length} is negative, it is implied that {@code buf} contains a null terminated string. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the - * number of characters in {@code buf}, excluding the null terminator when {@code length} is negative, is not less than the value of - * {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled calls to DebugMessageInsert are discarded and do not generate an error.

    - * - * @param source the source of the debug message to insert. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of the debug message insert. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param id the user-supplied identifier of the message to insert. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param severity the severity of the debug messages to insert - * @param message a character array containing the message to insert - */ - public static void glDebugMessageInsert(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") ByteBuffer message) { - GL43C.glDebugMessageInsert(source, type, id, severity, message); - } - - /** - * This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or - * signals about specific render system events. - * - *

    The value of {@code id} specifies the ID for the message and {@code severity} indicates its severity level as defined by the caller. The string - * {@code buf} contains the string representation of the message. The parameter {@code length} contains the number of characters in {@code buf}. If - * {@code length} is negative, it is implied that {@code buf} contains a null terminated string. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} will be generated if the - * number of characters in {@code buf}, excluding the null terminator when {@code length} is negative, is not less than the value of - * {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled calls to DebugMessageInsert are discarded and do not generate an error.

    - * - * @param source the source of the debug message to insert. One of:
    {@link GL43C#GL_DEBUG_SOURCE_API DEBUG_SOURCE_API}{@link GL43C#GL_DEBUG_SOURCE_WINDOW_SYSTEM DEBUG_SOURCE_WINDOW_SYSTEM}{@link GL43C#GL_DEBUG_SOURCE_SHADER_COMPILER DEBUG_SOURCE_SHADER_COMPILER}
    {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}{@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_OTHER DEBUG_SOURCE_OTHER}
    - * @param type the type of the debug message insert. One of:
    {@link GL43C#GL_DEBUG_TYPE_ERROR DEBUG_TYPE_ERROR}{@link GL43C#GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR DEBUG_TYPE_DEPRECATED_BEHAVIOR}{@link GL43C#GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR DEBUG_TYPE_UNDEFINED_BEHAVIOR}
    {@link GL43C#GL_DEBUG_TYPE_PORTABILITY DEBUG_TYPE_PORTABILITY}{@link GL43C#GL_DEBUG_TYPE_PERFORMANCE DEBUG_TYPE_PERFORMANCE}{@link GL43C#GL_DEBUG_TYPE_OTHER DEBUG_TYPE_OTHER}
    {@link GL43C#GL_DEBUG_TYPE_MARKER DEBUG_TYPE_MARKER}
    - * @param id the user-supplied identifier of the message to insert. One of:
    {@link GL43C#GL_DEBUG_SEVERITY_HIGH DEBUG_SEVERITY_HIGH}{@link GL43C#GL_DEBUG_SEVERITY_MEDIUM DEBUG_SEVERITY_MEDIUM}{@link GL43C#GL_DEBUG_SEVERITY_LOW DEBUG_SEVERITY_LOW}
    {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}
    - * @param severity the severity of the debug messages to insert - * @param message a character array containing the message to insert - */ - public static void glDebugMessageInsert(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLuint") int id, @NativeType("GLenum") int severity, @NativeType("GLchar const *") CharSequence message) { - GL43C.glDebugMessageInsert(source, type, id, severity, message); - } - - // --- [ glDebugMessageCallback ] --- - - /** Unsafe version of: {@link #glDebugMessageCallback DebugMessageCallback} */ - public static void nglDebugMessageCallback(long callback, long userParam) { - GL43C.nglDebugMessageCallback(callback, userParam); - } - - /** - * Specifies a callback to receive debugging messages from the GL. - * - *

    The function's prototype must follow the type definition of DEBUGPROC including its platform-dependent calling convention. Anything else will result in - * undefined behavior. Only one debug callback can be specified for the current context, and further calls overwrite the previous callback. Specifying - * {@code NULL} as the value of {@code callback} clears the current callback and disables message output through callbacks. Applications can provide - * user-specified data through the pointer {@code userParam}. The context will store this pointer and will include it as one of the parameters in each call - * to the callback function.

    - * - *

    If the application has specified a callback function for receiving debug output, the implementation will call that function whenever any enabled message - * is generated. The source, type, ID, and severity of the message are specified by the DEBUGPROC parameters {@code source}, {@code type}, {@code id}, and - * {@code severity}, respectively. The string representation of the message is stored in {@code message} and its length (excluding the null-terminator) is - * stored in {@code length}. The parameter {@code userParam} is the user-specified parameter that was given when calling DebugMessageCallback.

    - * - *

    Applications can query the current callback function and the current user-specified parameter by obtaining the values of {@link GL43C#GL_DEBUG_CALLBACK_FUNCTION DEBUG_CALLBACK_FUNCTION} and - * {@link GL43C#GL_DEBUG_CALLBACK_USER_PARAM DEBUG_CALLBACK_USER_PARAM}, respectively.

    - * - *

    Applications that specify a callback function must be aware of certain special conditions when executing code inside a callback when it is called by the - * GL, regardless of the debug source.

    - * - *

    The memory for {@code message} is owned and managed by the GL, and should only be considered valid for the duration of the function call.

    - * - *

    The behavior of calling any GL or window system function from within the callback function is undefined and may lead to program termination.

    - * - *

    Care must also be taken in securing debug callbacks for use with asynchronous debug output by multi-threaded GL implementations.

    - * - *

    If the {@link GL43C#GL_DEBUG_OUTPUT DEBUG_OUTPUT} state is disabled then the GL will not call the callback function.

    - * - * @param callback a callback function that will be called when a debug message is generated - * @param userParam a user supplied pointer that will be passed on each invocation of {@code callback} - */ - public static void glDebugMessageCallback(@Nullable @NativeType("GLDEBUGPROC") GLDebugMessageCallbackI callback, @NativeType("void const *") long userParam) { - GL43C.glDebugMessageCallback(callback, userParam); - } - - // --- [ glGetDebugMessageLog ] --- - - /** - * Unsafe version of: {@link #glGetDebugMessageLog GetDebugMessageLog} - * - * @param bufsize the size of the buffer whose address is given by {@code messageLog} - */ - public static int nglGetDebugMessageLog(int count, int bufsize, long sources, long types, long ids, long severities, long lengths, long messageLog) { - return GL43C.nglGetDebugMessageLog(count, bufsize, sources, types, ids, severities, lengths, messageLog); - } - - /** - * Retrieves messages from the debug message log. - * - *

    This function fetches a maximum of {@code count} messages from the message log, and will return the number of messages successfully fetched.

    - * - *

    Messages will be fetched from the log in order of oldest to newest. Those messages that were fetched will be removed from the log.

    - * - *

    The sources, types, severities, IDs, and string lengths of fetched messages will be stored in the application-provided arrays {@code sources}, - * {@code types}, {@code severities}, {@code ids}, and {@code lengths}, respectively. The application is responsible for allocating enough space for each - * array to hold up to {@code count} elements. The string representations of all fetched messages are stored in the {@code messageLog} array. If multiple - * messages are fetched, their strings are concatenated into the same {@code messageLog} array and will be separated by single null terminators. The last - * string in the array will also be null-terminated. The maximum size of {@code messageLog}, including the space used by all null terminators, is given by - * {@code bufSize}. If {@code bufSize} is less than zero and {@code messageLog} is not {@code NULL}, an {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error will be generated. If a message's - * string, including its null terminator, can not fully fit within the {@code messageLog} array's remaining space, then that message and any subsequent - * messages will not be fetched and will remain in the log. The string lengths stored in the array {@code lengths} include the space for the null - * terminator of each string.

    - * - *

    Any or all of the arrays {@code sources}, {@code types}, {@code ids}, {@code severities}, {@code lengths} and {@code messageLog} can also be null - * pointers, which causes the attributes for such arrays to be discarded when messages are fetched, however those messages will still be removed from the - * log. Thus to simply delete up to {@code count} messages from the message log while ignoring their attributes, the application can call the function - * with null pointers for all attribute arrays.

    - * - *

    If the context was created without the {@link GL43C#GL_CONTEXT_FLAG_DEBUG_BIT CONTEXT_FLAG_DEBUG_BIT} in the {@link GL30#GL_CONTEXT_FLAGS CONTEXT_FLAGS} state, then the GL can opt to never add messages to the - * message log so GetDebugMessageLog will always return zero.

    - * - * @param count the number of debug messages to retrieve from the log - * @param sources an array of variables to receive the sources of the retrieved messages - * @param types an array of variables to receive the types of the retrieved messages - * @param ids an array of unsigned integers to receive the ids of the retrieved messages - * @param severities an array of variables to receive the severites of the retrieved messages - * @param lengths an array of variables to receive the lengths of the received messages - * @param messageLog an array of characters that will receive the messages - */ - @NativeType("GLuint") - public static int glGetDebugMessageLog(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") IntBuffer sources, @Nullable @NativeType("GLenum *") IntBuffer types, @Nullable @NativeType("GLuint *") IntBuffer ids, @Nullable @NativeType("GLenum *") IntBuffer severities, @Nullable @NativeType("GLsizei *") IntBuffer lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - return GL43C.glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); - } - - // --- [ glPushDebugGroup ] --- - - /** - * Unsafe version of: {@link #glPushDebugGroup PushDebugGroup} - * - * @param length the length of the message to be sent to the debug output stream - */ - public static void nglPushDebugGroup(int source, int id, int length, long message) { - GL43C.nglPushDebugGroup(source, id, length, message); - } - - /** - * Pushes a debug group described by the string {@code message} into the command stream. The value of {@code id} specifies the ID of messages generated. - * The parameter {@code length} contains the number of characters in {@code message}. If {@code length} is negative, it is implied that {@code message} - * contains a null terminated string. The message has the specified {@code source} and {@code id}, {@code type} {@link GL43C#GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP}, and - * {@code severity} {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The GL will put a new debug group on top of the debug group stack which inherits the control of the - * volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any - * additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group. - * - *

    An {@link GL11#GL_INVALID_ENUM INVALID_ENUM} error is generated if the value of {@code source} is neither {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION} nor {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}. An - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code length} is negative and the number of characters in {@code message}, excluding the null-terminator, is - * not less than the value of {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - * @param source the source of the debug message. One of:
    {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}
    - * @param id the identifier of the message - * @param message a string containing the message to be sent to the debug output stream - */ - public static void glPushDebugGroup(@NativeType("GLenum") int source, @NativeType("GLuint") int id, @NativeType("GLchar const *") ByteBuffer message) { - GL43C.glPushDebugGroup(source, id, message); - } - - /** - * Pushes a debug group described by the string {@code message} into the command stream. The value of {@code id} specifies the ID of messages generated. - * The parameter {@code length} contains the number of characters in {@code message}. If {@code length} is negative, it is implied that {@code message} - * contains a null terminated string. The message has the specified {@code source} and {@code id}, {@code type} {@link GL43C#GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP}, and - * {@code severity} {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The GL will put a new debug group on top of the debug group stack which inherits the control of the - * volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any - * additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group. - * - *

    An {@link GL11#GL_INVALID_ENUM INVALID_ENUM} error is generated if the value of {@code source} is neither {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION} nor {@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}. An - * {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code length} is negative and the number of characters in {@code message}, excluding the null-terminator, is - * not less than the value of {@link GL43C#GL_MAX_DEBUG_MESSAGE_LENGTH MAX_DEBUG_MESSAGE_LENGTH}.

    - * - * @param source the source of the debug message. One of:
    {@link GL43C#GL_DEBUG_SOURCE_APPLICATION DEBUG_SOURCE_APPLICATION}{@link GL43C#GL_DEBUG_SOURCE_THIRD_PARTY DEBUG_SOURCE_THIRD_PARTY}
    - * @param id the identifier of the message - * @param message a string containing the message to be sent to the debug output stream - */ - public static void glPushDebugGroup(@NativeType("GLenum") int source, @NativeType("GLuint") int id, @NativeType("GLchar const *") CharSequence message) { - GL43C.glPushDebugGroup(source, id, message); - } - - // --- [ glPopDebugGroup ] --- - - /** - * Pops the active debug group. When a debug group is popped, the GL will also generate a debug output message describing its cause based on the - * {@code message} string, the source {@code source}, and an ID {@code id} submitted to the associated {@link #glPushDebugGroup PushDebugGroup} command. {@link GL43C#GL_DEBUG_TYPE_PUSH_GROUP DEBUG_TYPE_PUSH_GROUP} - * and {@link GL43C#GL_DEBUG_TYPE_POP_GROUP DEBUG_TYPE_POP_GROUP} share a single namespace for message {@code id}. {@code severity} has the value {@link GL43C#GL_DEBUG_SEVERITY_NOTIFICATION DEBUG_SEVERITY_NOTIFICATION}. The {@code type} - * has the value {@link GL43C#GL_DEBUG_TYPE_POP_GROUP DEBUG_TYPE_POP_GROUP}. Popping a debug group restores the debug output volume control of the parent debug group. - * - *

    Attempting to pop the default debug group off the stack generates a {@link GL11#GL_STACK_UNDERFLOW STACK_UNDERFLOW} error; pushing a debug group onto a stack containing - * {@link GL43C#GL_MAX_DEBUG_GROUP_STACK_DEPTH MAX_DEBUG_GROUP_STACK_DEPTH} minus one elements will generate a {@link GL11#GL_STACK_OVERFLOW STACK_OVERFLOW} error.

    - */ - public static void glPopDebugGroup() { - GL43C.glPopDebugGroup(); - } - - // --- [ glObjectLabel ] --- - - /** - * Unsafe version of: {@link #glObjectLabel ObjectLabel} - * - * @param length the length of the label to be used for the object - */ - public static void nglObjectLabel(int identifier, int name, int length, long label) { - GL43C.nglObjectLabel(identifier, name, length, label); - } - - /** - * Labels a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object to label - * @param label a string containing the label to assign to the object - */ - public static void glObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLchar const *") ByteBuffer label) { - GL43C.glObjectLabel(identifier, name, label); - } - - /** - * Labels a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object to label - * @param label a string containing the label to assign to the object - */ - public static void glObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLchar const *") CharSequence label) { - GL43C.glObjectLabel(identifier, name, label); - } - - // --- [ glGetObjectLabel ] --- - - /** - * Unsafe version of: {@link #glGetObjectLabel GetObjectLabel} - * - * @param bufSize the length of the buffer whose address is in {@code label} - */ - public static void nglGetObjectLabel(int identifier, int name, int bufSize, long length, long label) { - GL43C.nglGetObjectLabel(identifier, name, bufSize, length, label); - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * @param length the address of a variable to receive the length of the object label - * @param label a string that will receive the object label - */ - public static void glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectLabel(identifier, name, length, label); - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - * @param bufSize the length of the buffer whose address is in {@code label} - */ - @NativeType("void") - public static String glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @NativeType("GLsizei") int bufSize) { - return GL43C.glGetObjectLabel(identifier, name, bufSize); - } - - /** - * Retrieves the label of a named object identified within a namespace. - * - * @param identifier the namespace from which the name of the object is allocated. One of:
    {@link GL43C#GL_BUFFER BUFFER}{@link GL43C#GL_SHADER SHADER}{@link GL43C#GL_PROGRAM PROGRAM}{@link GL43C#GL_QUERY QUERY}{@link GL43C#GL_PROGRAM_PIPELINE PROGRAM_PIPELINE}{@link GL43C#GL_SAMPLER SAMPLER}{@link GL11#GL_VERTEX_ARRAY VERTEX_ARRAY}{@link GL11#GL_TEXTURE TEXTURE}
    {@link GL30#GL_RENDERBUFFER RENDERBUFFER}{@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL40#GL_TRANSFORM_FEEDBACK TRANSFORM_FEEDBACK}
    - * @param name the name of the object whose label to retrieve - */ - @NativeType("void") - public static String glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name) { - return glGetObjectLabel(identifier, name, GL11.glGetInteger(GL_MAX_LABEL_LENGTH)); - } - - // --- [ glObjectPtrLabel ] --- - - /** - * Unsafe version of: {@link #glObjectPtrLabel ObjectPtrLabel} - * - * @param length the length of the label to be used for the object - */ - public static void nglObjectPtrLabel(long ptr, int length, long label) { - GL43C.nglObjectPtrLabel(ptr, length, label); - } - - /** - * Labels a sync object identified by a pointer. - * - * @param ptr a pointer identifying a sync object - * @param label a string containing the label to assign to the object - */ - public static void glObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLchar const *") ByteBuffer label) { - GL43C.glObjectPtrLabel(ptr, label); - } - - /** - * Labels a sync object identified by a pointer. - * - * @param ptr a pointer identifying a sync object - * @param label a string containing the label to assign to the object - */ - public static void glObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLchar const *") CharSequence label) { - GL43C.glObjectPtrLabel(ptr, label); - } - - // --- [ glGetObjectPtrLabel ] --- - - /** - * Unsafe version of: {@link #glGetObjectPtrLabel GetObjectPtrLabel} - * - * @param bufSize the length of the buffer whose address is in {@code label} - */ - public static void nglGetObjectPtrLabel(long ptr, int bufSize, long length, long label) { - GL43C.nglGetObjectPtrLabel(ptr, bufSize, length, label); - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * @param length a variable to receive the length of the object label - * @param label a string that will receive the object label - */ - public static void glGetObjectPtrLabel(@NativeType("void *") long ptr, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectPtrLabel(ptr, length, label); - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - * @param bufSize the length of the buffer whose address is in {@code label} - */ - @NativeType("void") - public static String glGetObjectPtrLabel(@NativeType("void *") long ptr, @NativeType("GLsizei") int bufSize) { - return GL43C.glGetObjectPtrLabel(ptr, bufSize); - } - - /** - * Retrieves the label of a sync object identified by a pointer. - * - * @param ptr the name of the sync object whose label to retrieve - */ - @NativeType("void") - public static String glGetObjectPtrLabel(@NativeType("void *") long ptr) { - return glGetObjectPtrLabel(ptr, GL11.glGetInteger(GL_MAX_LABEL_LENGTH)); - } - - /** Array version of: {@link #glDebugMessageControl DebugMessageControl} */ - public static void glDebugMessageControl(@NativeType("GLenum") int source, @NativeType("GLenum") int type, @NativeType("GLenum") int severity, @Nullable @NativeType("GLuint const *") int[] ids, @NativeType("GLboolean") boolean enabled) { - GL43C.glDebugMessageControl(source, type, severity, ids, enabled); - } - - /** Array version of: {@link #glGetDebugMessageLog GetDebugMessageLog} */ - @NativeType("GLuint") - public static int glGetDebugMessageLog(@NativeType("GLuint") int count, @Nullable @NativeType("GLenum *") int[] sources, @Nullable @NativeType("GLenum *") int[] types, @Nullable @NativeType("GLuint *") int[] ids, @Nullable @NativeType("GLenum *") int[] severities, @Nullable @NativeType("GLsizei *") int[] lengths, @Nullable @NativeType("GLchar *") ByteBuffer messageLog) { - return GL43C.glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); - } - - /** Array version of: {@link #glGetObjectLabel GetObjectLabel} */ - public static void glGetObjectLabel(@NativeType("GLenum") int identifier, @NativeType("GLuint") int name, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectLabel(identifier, name, length, label); - } - - /** Array version of: {@link #glGetObjectPtrLabel GetObjectPtrLabel} */ - public static void glGetObjectPtrLabel(@NativeType("void *") long ptr, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLchar *") ByteBuffer label) { - GL43C.glGetObjectPtrLabel(ptr, length, label); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRNoError.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRNoError.java deleted file mode 100644 index 23718860..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRNoError.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the KHR_no_error extension. - * - *

    With this extension enabled any behavior that generates a GL error will have undefined behavior. The reason this extension exists is performance can be - * increased and power usage decreased. When this mode is used, a GL driver can have undefined behavior where it would have generated a GL error without - * this extension. This could include application termination. In general this extension should be used after you have verified all the GL errors are - * removed, and an application is not the kind that would check for GL errors and adjust behavior based on those errors.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public final class KHRNoError { - - /** If set in {@link GL30#GL_CONTEXT_FLAGS CONTEXT_FLAGS}, then no error behavior is enabled for this context. */ - public static final int GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR = 0x8; - - private KHRNoError() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRParallelShaderCompile.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRParallelShaderCompile.java deleted file mode 100644 index 065215d5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRParallelShaderCompile.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the KHR_parallel_shader_compile extension. - * - *

    Compiling GLSL into implementation-specific code can be a time consuming process, so a GL implementation may wish to perform the compilation in a - * separate CPU thread. This extension provides a mechanism for the application to provide a hint to limit the number of threads it wants to be used to - * compile shaders, as well as a query to determine if the compilation process is complete.

    - */ -public class KHRParallelShaderCompile { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int GL_MAX_SHADER_COMPILER_THREADS_KHR = 0x91B0; - - /** Accepted as part of the {@code pname} parameter to {@link GL20C#glGetShaderiv GetShaderiv} and accepted as part of the {@code pname} parameter to {@link GL20C#glGetProgramiv GetProgramiv}. */ - public static final int GL_COMPLETION_STATUS_KHR = 0x91B1; - - protected KHRParallelShaderCompile() { - throw new UnsupportedOperationException(); - } - - // --- [ glMaxShaderCompilerThreadsKHR ] --- - - /** - * Applications may use this function to hint to the driver the maximum number background threads it would like to be used in the process of compiling - * shaders or linking programs, - * - *

    An implementation may combine the maximum compiler thread request from multiple contexts in a share group in an implementation-specific way.

    - * - *

    An application can query the current {@code MaxShaderCompilerThreadsKHR} {@code count} by calling {@link GL11C#glGetIntegerv GetIntegerv} with {@code pname} set to - * {@link #GL_MAX_SHADER_COMPILER_THREADS_KHR MAX_SHADER_COMPILER_THREADS_KHR}, which returns the value of the current state.

    - * - * @param count the number of background threads. A {@code count} of zero specifies a request for no parallel compiling or linking and a {@code count} of - * {@code 0xFFFFFFFF} requests an implementation-specific maximum. - */ - public static native void glMaxShaderCompilerThreadsKHR(@NativeType("GLuint") int count); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRRobustness.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRRobustness.java deleted file mode 100644 index d54b6c92..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRRobustness.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -/** - * Native bindings to the KHR_robustness extension. - * - *

    Several recent trends in how OpenGL ES integrates into modern computer systems have created new requirements for robustness and security for GL - * rendering contexts.

    - * - *

    Additionally GPU architectures now support hardware fault detection; for example, video memory supporting ECC (error correcting codes) and error - * detection. GL contexts should be capable of recovering from hardware faults such as uncorrectable memory errors. Along with recovery from such hardware - * faults, the recovery mechanism can also allow recovery from video memory access exceptions and system software failures. System software failures can - * be due to device changes or driver failures.

    - * - *

    GL queries that return (write) some number of bytes to a buffer indicated by a pointer parameter introduce risk of buffer overflows that might be - * exploitable by malware. To address this, queries with return value sizes that are not expressed directly by the parameters to the query itself are - * given additional API functions with an additional parameter that specifies the number of bytes in the buffer and never writing bytes beyond that limit. - * This is particularly useful for multi-threaded usage of GL contexts in a "share group" where one context can change objects in ways that can cause - * buffer overflows for another context's GL queries.

    - * - *

    The original ARB_vertex_buffer_object extension includes an issue that explicitly states program termination is allowed when out-of-bounds vertex - * buffer object fetches occur. Modern graphics hardware is capable of well-defined behavior in the case of out-of- bounds vertex buffer object fetches. - * Older hardware may require extra checks to enforce well-defined (and termination free) behavior, but this expense is warranted when processing - * potentially untrusted content.

    - * - *

    The intent of this extension is to address some specific robustness goals:

    - * - *
      - *
    • For all existing GL queries, provide additional "safe" APIs that limit data written to user pointers to a buffer size in bytes that is an explicit - * additional parameter of the query.
    • - *
    • Provide a mechanism for a GL application to learn about graphics resets that affect the context. When a graphics reset occurs, the GL context - * becomes unusable and the application must create a new context to continue operation. Detecting a graphics reset happens through an inexpensive query.
    • - *
    • Define behavior of OpenGL calls made after a graphics reset.
    • - *
    • Provide an enable to guarantee that out-of-bounds buffer object accesses by the GPU will have deterministic behavior and preclude application - * instability or termination due to an incorrect buffer access. Such accesses include vertex buffer fetches of attributes and indices, and indexed - * reads of uniforms or parameters from buffers.
    • - *
    - * - *

    Requires {@link GL32 OpenGL 3.2}.

    - */ -public class KHRRobustness { - - static { GL.initialize(); } - - /** Returned by {@link #glGetGraphicsResetStatus GetGraphicsResetStatus}. */ - public static final int - GL_NO_ERROR = 0x0, - GL_GUILTY_CONTEXT_RESET = 0x8253, - GL_INNOCENT_CONTEXT_RESET = 0x8254, - GL_UNKNOWN_CONTEXT_RESET = 0x8255; - - /** Accepted by the {@code value} parameter of GetBooleanv, GetIntegerv, and GetFloatv. */ - public static final int - GL_CONTEXT_ROBUST_ACCESS = 0x90F3, - GL_RESET_NOTIFICATION_STRATEGY = 0x8256; - - /** Returned by GetIntegerv and related simple queries when {@code value} is {@link #GL_RESET_NOTIFICATION_STRATEGY RESET_NOTIFICATION_STRATEGY}. */ - public static final int - GL_LOSE_CONTEXT_ON_RESET = 0x8252, - GL_NO_RESET_NOTIFICATION = 0x8261; - - /** Returned by {@link GL11C#glGetError GetError}. */ - public static final int GL_CONTEXT_LOST = 0x507; - - protected KHRRobustness() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetGraphicsResetStatus ] --- - - /** - * Indicates if the GL context has been in a reset state at any point since the last call to GetGraphicsResetStatus: - * - *
      - *
    • {@link GL11#GL_NO_ERROR NO_ERROR} indicates that the GL context has not been in a reset state since the last call.
    • - *
    • {@link GL45C#GL_GUILTY_CONTEXT_RESET GUILTY_CONTEXT_RESET} indicates that a reset has been detected that is attributable to the current GL context.
    • - *
    • {@link GL45C#GL_INNOCENT_CONTEXT_RESET INNOCENT_CONTEXT_RESET} indicates a reset has been detected that is not attributable to the current GL context.
    • - *
    • {@link GL45C#GL_UNKNOWN_CONTEXT_RESET UNKNOWN_CONTEXT_RESET} indicates a detected graphics reset whose cause is unknown.
    • - *
    - * - *

    If a reset status other than NO_ERROR is returned and subsequent calls return NO_ERROR, the context reset was encountered and completed. If a reset - * status is repeatedly returned, the context may be in the process of resetting.

    - * - *

    Reset notification behavior is determined at context creation time, and may be queried by calling GetIntegerv with the symbolic constant - * {@link GL45C#GL_RESET_NOTIFICATION_STRATEGY RESET_NOTIFICATION_STRATEGY}.

    - * - *

    If the reset notification behavior is {@link GL45C#GL_NO_RESET_NOTIFICATION NO_RESET_NOTIFICATION}, then the implementation will never deliver notification of reset events, and - * GetGraphicsResetStatus will always return NO_ERROR.

    - * - *

    If the behavior is {@link GL45C#GL_LOSE_CONTEXT_ON_RESET LOSE_CONTEXT_ON_RESET}, a graphics reset will result in a lost context and require creating a new context as described - * above. In this case GetGraphicsResetStatus will return an appropriate value from those described above.

    - * - *

    If a graphics reset notification occurs in a context, a notification must also occur in all other contexts which share objects with that context.

    - * - *

    After a graphics reset has occurred on a context, subsequent GL commands on that context (or any context which shares with that context) will generate a - * {@link GL45C#GL_CONTEXT_LOST CONTEXT_LOST} error. Such commands will not have side effects (in particular, they will not modify memory passed by pointer for query results, - * and may not block indefinitely or cause termination of the application. Exceptions to this behavior include:

    - * - *
      - *
    • {@link GL11C#glGetError GetError} and GetGraphicsResetStatus behave normally following a graphics reset, so that the application can determine a reset has - * occurred, and when it is safe to destroy and recreate the context.
    • - *
    • Any commands which might cause a polling application to block indefinitely will generate a CONTEXT_LOST error, but will also return a value - * indicating completion to the application.
    • - *
    - */ - @NativeType("GLenum") - public static int glGetGraphicsResetStatus() { - return GL45C.glGetGraphicsResetStatus(); - } - - // --- [ glReadnPixels ] --- - - /** - * Unsafe version of: {@link #glReadnPixels ReadnPixels} - * - * @param bufSize the maximum number of bytes to write into {@code data} - */ - public static void nglReadnPixels(int x, int y, int width, int height, int format, int type, int bufSize, long pixels) { - GL45C.nglReadnPixels(x, y, width, height, format, type, bufSize, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param bufSize the maximum number of bytes to write into {@code data} - * @param pixels a buffer in which to place the returned pixel data - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("GLsizei") int bufSize, @NativeType("void *") long pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, bufSize, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ByteBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") ShortBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") IntBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** - * Behaves identically to {@link GL11C#glReadPixels ReadPixels} except that it does not write more than {@code bufSize} bytes into {@code data} - * - * @param x the left pixel coordinate - * @param y the lower pixel coordinate - * @param width the number of pixels to read in the x-dimension - * @param height the number of pixels to read in the y-dimension - * @param format the pixel format. One of:
    {@link GL11#GL_RED RED}{@link GL11#GL_GREEN GREEN}{@link GL11#GL_BLUE BLUE}{@link GL11#GL_ALPHA ALPHA}{@link GL30#GL_RG RG}{@link GL11#GL_RGB RGB}{@link GL11C#GL_RGBA RGBA}{@link GL12#GL_BGR BGR}
    {@link GL12#GL_BGRA BGRA}{@link GL30#GL_RED_INTEGER RED_INTEGER}{@link GL30#GL_GREEN_INTEGER GREEN_INTEGER}{@link GL30#GL_BLUE_INTEGER BLUE_INTEGER}{@link GL30#GL_ALPHA_INTEGER ALPHA_INTEGER}{@link GL30#GL_RG_INTEGER RG_INTEGER}{@link GL30#GL_RGB_INTEGER RGB_INTEGER}{@link GL30#GL_RGBA_INTEGER RGBA_INTEGER}
    {@link GL30#GL_BGR_INTEGER BGR_INTEGER}{@link GL30#GL_BGRA_INTEGER BGRA_INTEGER}{@link GL11#GL_STENCIL_INDEX STENCIL_INDEX}{@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT}{@link GL30#GL_DEPTH_STENCIL DEPTH_STENCIL}{@link GL11#GL_LUMINANCE LUMINANCE}{@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA}
    - * @param type the pixel type. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_SHORT SHORT}
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL30#GL_HALF_FLOAT HALF_FLOAT}{@link GL11#GL_FLOAT FLOAT}
    {@link GL12#GL_UNSIGNED_BYTE_3_3_2 UNSIGNED_BYTE_3_3_2}{@link GL12#GL_UNSIGNED_BYTE_2_3_3_REV UNSIGNED_BYTE_2_3_3_REV}{@link GL12#GL_UNSIGNED_SHORT_5_6_5 UNSIGNED_SHORT_5_6_5}{@link GL12#GL_UNSIGNED_SHORT_5_6_5_REV UNSIGNED_SHORT_5_6_5_REV}
    {@link GL12#GL_UNSIGNED_SHORT_4_4_4_4 UNSIGNED_SHORT_4_4_4_4}{@link GL12#GL_UNSIGNED_SHORT_4_4_4_4_REV UNSIGNED_SHORT_4_4_4_4_REV}{@link GL12#GL_UNSIGNED_SHORT_5_5_5_1 UNSIGNED_SHORT_5_5_5_1}{@link GL12#GL_UNSIGNED_SHORT_1_5_5_5_REV UNSIGNED_SHORT_1_5_5_5_REV}
    {@link GL12#GL_UNSIGNED_INT_8_8_8_8 UNSIGNED_INT_8_8_8_8}{@link GL12#GL_UNSIGNED_INT_8_8_8_8_REV UNSIGNED_INT_8_8_8_8_REV}{@link GL12#GL_UNSIGNED_INT_10_10_10_2 UNSIGNED_INT_10_10_10_2}{@link GL12#GL_UNSIGNED_INT_2_10_10_10_REV UNSIGNED_INT_2_10_10_10_REV}
    {@link GL30#GL_UNSIGNED_INT_24_8 UNSIGNED_INT_24_8}{@link GL30#GL_UNSIGNED_INT_10F_11F_11F_REV UNSIGNED_INT_10F_11F_11F_REV}{@link GL30#GL_UNSIGNED_INT_5_9_9_9_REV UNSIGNED_INT_5_9_9_9_REV}{@link GL30#GL_FLOAT_32_UNSIGNED_INT_24_8_REV FLOAT_32_UNSIGNED_INT_24_8_REV}
    {@link GL11#GL_BITMAP BITMAP}
    - * @param pixels a buffer in which to place the returned pixel data - */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") FloatBuffer pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - // --- [ glGetnUniformfv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformfv GetnUniformfv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static void nglGetnUniformfv(int program, int location, int bufSize, long params) { - GL45C.nglGetnUniformfv(program, location, bufSize, params); - } - - /** - * Returns the value or values of a uniform of the default uniform block. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - */ - public static void glGetnUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") FloatBuffer params) { - GL45C.glGetnUniformfv(program, location, params); - } - - /** - * Returns the value or values of a uniform of the default uniform block. - * - * @param program the program object - * @param location the uniform location - */ - @NativeType("void") - public static float glGetnUniformf(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL45C.glGetnUniformf(program, location); - } - - // --- [ glGetnUniformiv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformiv GetnUniformiv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static void nglGetnUniformiv(int program, int location, int bufSize, long params) { - GL45C.nglGetnUniformiv(program, location, bufSize, params); - } - - /** - * Integer version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - */ - public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") IntBuffer params) { - GL45C.glGetnUniformiv(program, location, params); - } - - /** - * Integer version of {@link #glGetnUniformfv GetnUniformfv}. - * - * @param program the program object - * @param location the uniform location - */ - @NativeType("void") - public static int glGetnUniformi(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL45C.glGetnUniformi(program, location); - } - - // --- [ glGetnUniformuiv ] --- - - /** - * Unsafe version of: {@link #glGetnUniformuiv GetnUniformuiv} - * - * @param bufSize the maximum number of bytes to write to {@code params} - */ - public static void nglGetnUniformuiv(int program, int location, int bufSize, long params) { - GL45C.nglGetnUniformuiv(program, location, bufSize, params); - } - - /** - * Unsigned version of {@link #glGetnUniformiv GetnUniformiv}. - * - * @param program the program object - * @param location the uniform location - * @param params the buffer in which to place the returned data - */ - public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") IntBuffer params) { - GL45C.glGetnUniformuiv(program, location, params); - } - - /** - * Unsigned version of {@link #glGetnUniformiv GetnUniformiv}. - * - * @param program the program object - * @param location the uniform location - */ - @NativeType("void") - public static int glGetnUniformui(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return GL45C.glGetnUniformui(program, location); - } - - /** Array version of: {@link #glReadnPixels ReadnPixels} */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") short[] pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** Array version of: {@link #glReadnPixels ReadnPixels} */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") int[] pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** Array version of: {@link #glReadnPixels ReadnPixels} */ - public static void glReadnPixels(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format, @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) { - GL45C.glReadnPixels(x, y, width, height, format, type, pixels); - } - - /** Array version of: {@link #glGetnUniformfv GetnUniformfv} */ - public static void glGetnUniformfv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLfloat *") float[] params) { - GL45C.glGetnUniformfv(program, location, params); - } - - /** Array version of: {@link #glGetnUniformiv GetnUniformiv} */ - public static void glGetnUniformiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint *") int[] params) { - GL45C.glGetnUniformiv(program, location, params); - } - - /** Array version of: {@link #glGetnUniformuiv GetnUniformuiv} */ - public static void glGetnUniformuiv(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint *") int[] params) { - GL45C.glGetnUniformuiv(program, location, params); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRShaderSubgroup.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRShaderSubgroup.java deleted file mode 100644 index ef08380f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRShaderSubgroup.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the KHR_shader_subgroup extension. - * - *

    This extension enables support for the {@code KHR_shader_subgroup} shading language extension in OpenGL.

    - * - *

    The extension adds API queries to be able to query

    - * - *
      - *
    • the size of subgroups in this implementation ({@link #GL_SUBGROUP_SIZE_KHR SUBGROUP_SIZE_KHR})
    • - *
    • which shader stages support subgroup operations ({@link #GL_SUBGROUP_SUPPORTED_STAGES_KHR SUBGROUP_SUPPORTED_STAGES_KHR})
    • - *
    • which subgroup features are supported ({@link #GL_SUBGROUP_SUPPORTED_FEATURES_KHR SUBGROUP_SUPPORTED_FEATURES_KHR})
    • - *
    • whether quad subgroup operations are supported in all stages supporting subgroup operations ({@link #GL_SUBGROUP_QUAD_ALL_STAGES_KHR SUBGROUP_QUAD_ALL_STAGES_KHR})
    • - *
    - * - *

    In OpenGL implementations supporting SPIR-V, this extension enables the minimal subset of SPIR-V 1.3 which is required to support the subgroup features - * that are supported by the implementation.

    - * - *

    Requires {@link GL43 OpenGL 4.3}.

    - */ -public final class KHRShaderSubgroup { - - /** Accepted as the {@code pname} argument for {@link GL11C#glGetIntegerv GetIntegerv} and {@link GL32C#glGetInteger64v GetInteger64v}. */ - public static final int - GL_SUBGROUP_SIZE_KHR = 0x9532, - GL_SUBGROUP_SUPPORTED_STAGES_KHR = 0x9533, - GL_SUBGROUP_SUPPORTED_FEATURES_KHR = 0x9534; - - /** Accepted as the {@code pname} argument for {@link GL11C#glGetBooleanv GetBooleanv}. */ - public static final int GL_SUBGROUP_QUAD_ALL_STAGES_KHR = 0x9535; - - /** Returned as bitfield in the {@code data} argument when {@link GL11C#glGetIntegerv GetIntegerv} is queried with a {@code pname} of {@link #GL_SUBGROUP_SUPPORTED_FEATURES_KHR SUBGROUP_SUPPORTED_FEATURES_KHR}. */ - public static final int - GL_SUBGROUP_FEATURE_BASIC_BIT_KHR = 0x1, - GL_SUBGROUP_FEATURE_VOTE_BIT_KHR = 0x2, - GL_SUBGROUP_FEATURE_ARITHMETIC_BIT_KHR = 0x4, - GL_SUBGROUP_FEATURE_BALLOT_BIT_KHR = 0x8, - GL_SUBGROUP_FEATURE_SHUFFLE_BIT_KHR = 0x10, - GL_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT_KHR = 0x20, - GL_SUBGROUP_FEATURE_CLUSTERED_BIT_KHR = 0x40, - GL_SUBGROUP_FEATURE_QUAD_BIT_KHR = 0x80; - - private KHRShaderSubgroup() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/KHRTextureCompressionASTCLDR.java b/LWJGL/src/main/java/org/lwjgl/opengl/KHRTextureCompressionASTCLDR.java deleted file mode 100644 index d1a41fde..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/KHRTextureCompressionASTCLDR.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the KHR_texture_compression_astc_ldr extension. - * - *

    Adaptive Scalable Texture Compression (ASTC) is a new texture compression technology that offers unprecendented flexibility, while producing better or - * comparable results than existing texture compressions at all bit rates. It includes support for 2D and slice-based 3D textures, with low and high - * dynamic range, at bitrates from below 1 bit/pixel up to 8 bits/pixel in fine steps.

    - * - *

    The goal of this extension is to support the full 2D profile of the ASTC texture compression specification, and allow construction of 3D textures from - * multiple 2D slices.

    - * - *

    ASTC-compressed textures are handled in OpenGL by adding new supported formats to the existing mechanisms for handling compressed textures.

    - * - *

    What is ASTC

    - * - *

    ASTC stands for Adaptive Scalable Texture Compression. The ASTC formats form a family of related compressed texture image formats. They are all derived - * from a common set of definitions.

    - * - *

    ASTC textures may be either 2D or 3D.

    - * - *

    ASTC textures may be encoded using either high or low dynamic range. Low dynamic range images may optionally be specified using the sRGB color space.

    - * - *

    A sub-profile ("HDR Profile") is defined, which supports only 2D images (and 3D images made up of multiple 2D slices) at low or high dynamic range.

    - * - *

    Support for this profile is indicated by the presence of the extension string "GL_KHR_texture_compression_astc_hdr". If, in future, the full profile is - * supported, "GL_KHR_texture_compression_astc_hdr" must still be published, in order to ensure backward compatibility.

    - * - *

    A lower sub-profile ("LDR Profile") may be implemented, which supports only 2D images at low dynamic range. This is indicated by the presence of the - * extension string "GL_KHR_texture_compression_astc_ldr". If either the HDR or full profile are implemented, then both name strings - * "GL_KHR_texture_compression_astc_ldr" and "GL_KHR_texture_compression_astc_hdr" must be published.

    - * - *

    ASTC textures may be encoded as 1, 2, 3 or 4 components, but they are all decoded into RGBA.

    - * - *

    ASTC has a variable block size, and this is specified as part of the name of the token passed to CompressedImage2D and its related functions.

    - */ -public final class KHRTextureCompressionASTCLDR { - - /** - * Accepted by the {@code internalformat} parameter of CompressedTexImage2D, CompressedTexSubImage2D, TexStorage2D, TextureStorage2D, TexStorage3D, and - * TextureStorage3D. - */ - public static final int - GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, - GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1, - GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2, - GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3, - GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4, - GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5, - GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6, - GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7, - GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8, - GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9, - GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA, - GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB, - GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC, - GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC, - GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD; - - private KHRTextureCompressionASTCLDR() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferFlipX.java b/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferFlipX.java deleted file mode 100644 index 7ebedb3c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferFlipX.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the MESA_framebuffer_flip_x extension. - * - *

    This extension defines a new framebuffer parameter, {@link #GL_FRAMEBUFFER_FLIP_X_MESA FRAMEBUFFER_FLIP_X_MESA}, that changes the behavior of the reads and writes to the framebuffer - * attachment points. When {@code GL_FRAMEBUFFER_FLIP_X_MESA} is {@link GL11#GL_TRUE TRUE}, render commands and pixel transfer operations access the backing store of each - * attachment point with an x-inverted coordinate system. This x-inversion is relative to the coordinate system set when - * {@code GL_FRAMEBUFFER_FLIP_X_MESA} is {@link GL11#GL_FALSE FALSE}.

    - * - *

    Access through {@link GL11C#glTexSubImage2D TexSubImage2D} and similar calls will notice the effect of the flip when they are not attached to framebuffer objects because - * {@code GL_FRAMEBUFFER_FLIP_X_MESA} is associated with the framebuffer object and not the attachment points.

    - * - *

    This extension is mainly for pre-rotation and recommended to use it with {@code MESA_framebuffer_flip_y} and {@code MESA_framebuffer_swap_xy} to have - * rotated result.

    - * - *

    Requires {@link GL43 OpenGL 4.3}.

    - */ -public final class MESAFramebufferFlipX { - - /** Accepted by the {@code pname} argument of {@link GL43C#glFramebufferParameteri FramebufferParameteri} and {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. */ - public static final int GL_FRAMEBUFFER_FLIP_X_MESA = 0x8BBC; - - private MESAFramebufferFlipX() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferFlipY.java b/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferFlipY.java deleted file mode 100644 index 94ccafc5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferFlipY.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the MESA_framebuffer_flip_y extension. - * - *

    This extension defines a new framebuffer parameter, {@link #GL_FRAMEBUFFER_FLIP_Y_MESA FRAMEBUFFER_FLIP_Y_MESA}, that changes the behavior of the reads and writes to the framebuffer - * attachment points. When {@code GL_FRAMEBUFFER_FLIP_Y_MESA} is {@link GL11#GL_TRUE TRUE}, render commands and pixel transfer operations access the backing store of each - * attachment point with an y-inverted coordinate system. This y-inversion is relative to the coordinate system set when - * {@code GL_FRAMEBUFFER_FLIP_Y_MESA} is {@link GL11#GL_FALSE FALSE}.

    - * - *

    Access through {@link GL11C#glTexSubImage2D TexSubImage2D} and similar calls will notice the effect of the flip when they are not attached to framebuffer objects because - * {@code GL_FRAMEBUFFER_FLIP_Y_MESA} is associated with the framebuffer object and not the attachment points.

    - * - *

    Requires {@link GL43 OpenGL 4.3} or {@link ARBFramebufferNoAttachments ARB_framebuffer_no_attachments}.

    - */ -public class MESAFramebufferFlipY { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} argument of {@link #glFramebufferParameteriMESA FramebufferParameteriMESA} and {@link #glGetFramebufferParameterivMESA GetFramebufferParameterivMESA}. */ - public static final int GL_FRAMEBUFFER_FLIP_Y_MESA = 0x8BBB; - - protected MESAFramebufferFlipY() { - throw new UnsupportedOperationException(); - } - - // --- [ glFramebufferParameteriMESA ] --- - - public static native void glFramebufferParameteriMESA(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glGetFramebufferParameterivMESA ] --- - - public static native void nglGetFramebufferParameterivMESA(int target, int pname, long params); - - public static void glGetFramebufferParameterivMESA(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFramebufferParameterivMESA(target, pname, memAddress(params)); - } - - /** Array version of: {@link #glGetFramebufferParameterivMESA GetFramebufferParameterivMESA} */ - public static void glGetFramebufferParameterivMESA(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetFramebufferParameterivMESA; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferSwapXY.java b/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferSwapXY.java deleted file mode 100644 index 2704f8fe..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/MESAFramebufferSwapXY.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the MESA_framebuffer_swap_xy extension. - * - *

    This extension defines a new framebuffer parameter, {@link #GL_FRAMEBUFFER_SWAP_XY_MESA FRAMEBUFFER_SWAP_XY_MESA}, that changes the behavior of the reads and writes to the framebuffer - * attachment points. When {@code GL_FRAMEBUFFER_SWAP_XY_MESA} is {@link GL11#GL_TRUE TRUE}, render commands and pixel transfer operations access the backing store of each - * attachment point with an xy-swapped coordinate system. This xy-inversion is relative to the coordinate system set when - * {@code GL_FRAMEBUFFER_SWAP_XY_MESA} is {@link GL11#GL_FALSE FALSE}.

    - * - *

    Access through {@link GL11C#glTexSubImage2D TexSubImage2D} and similar calls will notice the effect of the swap when they are not attached to framebuffer objects because - * {@code GL_FRAMEBUFFER_SWAP_XY_MESA} is associated with the framebuffer object and not the attachment points.

    - * - *

    The application should notice the display width and height are also swapped when {@code GL_FRAMEBUFFER_SWAP_XY_MESA} is {@code GL_TRUE}.

    - * - *

    This extension is mainly for pre-rotation and recommended to use it with {@code MESA_framebuffer_flip_x} and {@code MESA_framebuffer_flip_y} to have - * rotated result.

    - * - *

    Requires {@link GL43 OpenGL 4.3}.

    - */ -public final class MESAFramebufferSwapXY { - - /** Accepted by the {@code pname} argument of {@link GL43C#glFramebufferParameteri FramebufferParameteri} and {@link GL43C#glGetFramebufferParameteriv GetFramebufferParameteriv}. */ - public static final int GL_FRAMEBUFFER_SWAP_XY_MESA = 0x8BBD; - - private MESAFramebufferSwapXY() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVAlphaToCoverageDitherControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVAlphaToCoverageDitherControl.java deleted file mode 100644 index 3667272c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVAlphaToCoverageDitherControl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_alpha_to_coverage_dither_control extension. - * - *

    {@code NV_alpha_to_coverage_dither_control} provides a new mechanism to control whether dithering is applied when the existing alpha to coverage - * functionality is used.

    - */ -public class NVAlphaToCoverageDitherControl { - - static { GL.initialize(); } - - /** Accepted by the {@code param} parameter of {@link #glAlphaToCoverageDitherControlNV AlphaToCoverageDitherControlNV}. */ - public static final int - GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV = 0x934D, - GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV = 0x934E, - GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV = 0x934F; - - /** Accepted by the {@code param} of {@link GL11C#glGetIntegerv GetIntegerv}. */ - public static final int GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV = 0x92BF; - - protected NVAlphaToCoverageDitherControl() { - throw new UnsupportedOperationException(); - } - - // --- [ glAlphaToCoverageDitherControlNV ] --- - - public static native void glAlphaToCoverageDitherControlNV(@NativeType("GLenum") int mode); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java deleted file mode 100644 index 20a3b157..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_bindless_multi_draw_indirect extension. - * - *

    This extension combines {@code NV_vertex_buffer_unified_memory} and {@code ARB_multi_draw_indirect} to allow the processing of multiple drawing - * commands, whose vertex and index data can be sourced from arbitrary buffer locations, by a single function call.

    - * - *

    The {@code NV_vertex_buffer_unified_memory} extension provided a mechanism to specify vertex attrib and element array locations using GPU addresses. - * Prior to this extension, these addresses had to be set through explicit function calls. Now the ability to set the pointer addresses indirectly by - * extending the {@link ARBDrawIndirect ARB_draw_indirect} mechanism has been added.

    - * - *

    Combined with other "bindless" extensions, such as {@link NVBindlessTexture NV_bindless_texture} and {@link NVShaderBufferLoad NV_shader_buffer_load}, it is now possible for the GPU to - * create draw commands that source all resource inputs, which are common to change frequently between draw calls from the GPU: vertex and index buffers, - * samplers, images and other shader input data stored in buffers.

    - * - *

    Requires {@link GL43 OpenGL 4.3} or {@link ARBMultiDrawIndirect ARB_multi_draw_indirect}, and {@link NVVertexBufferUnifiedMemory NV_vertex_buffer_unified_memory}.

    - */ -public class NVBindlessMultiDrawIndirect { - - static { GL.initialize(); } - - protected NVBindlessMultiDrawIndirect() { - throw new UnsupportedOperationException(); - } - - // --- [ glMultiDrawArraysIndirectBindlessNV ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirectBindlessNV MultiDrawArraysIndirectBindlessNV} */ - public static native void nglMultiDrawArraysIndirectBindlessNV(int mode, long indirect, int drawCount, int stride, int vertexBufferCount); - - /** - * Behaves similar to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code indirect} is treated as an array of {@code drawCount} - * {@code DrawArraysIndirectBindlessCommandNV} structures: - * - *
    
    -     * typedef struct {
    -     *   GLuint   index;
    -     *   GLuint   reserved;
    -     *   GLuint64 address;
    -     *   GLuint64 length;
    -     * } BindlessPtrNV;
    -     * 
    -     * typedef struct {
    -     *   DrawArraysIndirectCommand   cmd;
    -     *   BindlessPtrNV               vertexBuffers[];
    -     * } DrawArraysIndirectBindlessCommandNV;
    - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of {@code DrawArraysIndirectBindlessCommandNV} structures (see the extension spec for more information) - * @param drawCount the number of structures in the {@code indirect} array - * @param stride the size of one {@code DrawArraysIndirectBindlessCommandNV} structure - * @param vertexBufferCount the number of vertex buffers in the {@code DrawArraysIndirectBindlessCommandNV} structure - */ - public static void glMultiDrawArraysIndirectBindlessNV(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - if (CHECKS) { - check(indirect, drawCount * (stride == 0 ? (16 + vertexBufferCount * 24) : stride)); - } - nglMultiDrawArraysIndirectBindlessNV(mode, memAddress(indirect), drawCount, stride, vertexBufferCount); - } - - /** - * Behaves similar to {@link GL43C#glMultiDrawArraysIndirect MultiDrawArraysIndirect}, except that {@code indirect} is treated as an array of {@code drawCount} - * {@code DrawArraysIndirectBindlessCommandNV} structures: - * - *
    
    -     * typedef struct {
    -     *   GLuint   index;
    -     *   GLuint   reserved;
    -     *   GLuint64 address;
    -     *   GLuint64 length;
    -     * } BindlessPtrNV;
    -     * 
    -     * typedef struct {
    -     *   DrawArraysIndirectCommand   cmd;
    -     *   BindlessPtrNV               vertexBuffers[];
    -     * } DrawArraysIndirectBindlessCommandNV;
    - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of {@code DrawArraysIndirectBindlessCommandNV} structures (see the extension spec for more information) - * @param drawCount the number of structures in the {@code indirect} array - * @param stride the size of one {@code DrawArraysIndirectBindlessCommandNV} structure - * @param vertexBufferCount the number of vertex buffers in the {@code DrawArraysIndirectBindlessCommandNV} structure - */ - public static void glMultiDrawArraysIndirectBindlessNV(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - nglMultiDrawArraysIndirectBindlessNV(mode, indirect, drawCount, stride, vertexBufferCount); - } - - // --- [ glMultiDrawElementsIndirectBindlessNV ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirectBindlessNV MultiDrawElementsIndirectBindlessNV} */ - public static native void nglMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect, int drawCount, int stride, int vertexBufferCount); - - /** - * Behaves similar to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code indirect} is treated as an array of {@code drawCount} - * {@code DrawElementsIndirectBindlessCommandNV} structures: - * - *
    
    -     *  typedef struct {
    -     *   GLuint   index;
    -     *   GLuint   reserved;
    -     *   GLuint64 address;
    -     *   GLuint64 length;
    -     * } BindlessPtrNV;
    -     * 
    -     * typedef struct {
    -     *   DrawElementsIndirectCommand cmd;
    -     *   GLuint                      reserved;
    -     *   BindlessPtrNV               indexBuffer;
    -     *   BindlessPtrNV               vertexBuffers[];
    -     * } DrawElementsIndirectBindlessCommandNV;
    - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the data type of the element indices. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect an array of {@code DrawElementsIndirectBindlessCommandNV} structures (see the extension spec for more information) - * @param drawCount the number of structures in the {@code indirect} array - * @param stride the size of one {@code DrawElementsIndirectBindlessCommandNV} structure - * @param vertexBufferCount the number of vertex buffers in the {@code DrawElementsIndirectBindlessCommandNV} structure - */ - public static void glMultiDrawElementsIndirectBindlessNV(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLsizei") int drawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - if (CHECKS) { - check(indirect, drawCount * (stride == 0 ? ((vertexBufferCount + 2) * 24) : stride)); - } - nglMultiDrawElementsIndirectBindlessNV(mode, type, memAddress(indirect), drawCount, stride, vertexBufferCount); - } - - /** - * Behaves similar to {@link GL43C#glMultiDrawElementsIndirect MultiDrawElementsIndirect}, except that {@code indirect} is treated as an array of {@code drawCount} - * {@code DrawElementsIndirectBindlessCommandNV} structures: - * - *
    
    -     *  typedef struct {
    -     *   GLuint   index;
    -     *   GLuint   reserved;
    -     *   GLuint64 address;
    -     *   GLuint64 length;
    -     * } BindlessPtrNV;
    -     * 
    -     * typedef struct {
    -     *   DrawElementsIndirectCommand cmd;
    -     *   GLuint                      reserved;
    -     *   BindlessPtrNV               indexBuffer;
    -     *   BindlessPtrNV               vertexBuffers[];
    -     * } DrawElementsIndirectBindlessCommandNV;
    - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the data type of the element indices. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect an array of {@code DrawElementsIndirectBindlessCommandNV} structures (see the extension spec for more information) - * @param drawCount the number of structures in the {@code indirect} array - * @param stride the size of one {@code DrawElementsIndirectBindlessCommandNV} structure - * @param vertexBufferCount the number of vertex buffers in the {@code DrawElementsIndirectBindlessCommandNV} structure - */ - public static void glMultiDrawElementsIndirectBindlessNV(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLsizei") int drawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - nglMultiDrawElementsIndirectBindlessNV(mode, type, indirect, drawCount, stride, vertexBufferCount); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirectCount.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirectCount.java deleted file mode 100644 index e8bdddc2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessMultiDrawIndirectCount.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_bindless_multi_draw_indirect_count extension. - * - *

    This extension adds the possibility to define the number of drawcalls within a multi-draw-indirect call from the GPU, as provided by - * {@code ARB_indirect_parameters}, for the functions added in {@code NV_bindless_multi_draw_indirect}.

    - * - *

    Requires {@link NVBindlessMultiDrawIndirect NV_bindless_multi_draw_indirect}, {@link ARBIndirectParameters ARB_indirect_parameters}.

    - */ -public class NVBindlessMultiDrawIndirectCount { - - static { GL.initialize(); } - - protected NVBindlessMultiDrawIndirectCount() { - throw new UnsupportedOperationException(); - } - - // --- [ glMultiDrawArraysIndirectBindlessCountNV ] --- - - /** Unsafe version of: {@link #glMultiDrawArraysIndirectBindlessCountNV MultiDrawArraysIndirectBindlessCountNV} */ - public static native void nglMultiDrawArraysIndirectBindlessCountNV(int mode, long indirect, long drawCount, int maxDrawCount, int stride, int vertexBufferCount); - - /** - * Behaves similarly to {@link NVBindlessMultiDrawIndirect#glMultiDrawArraysIndirectBindlessNV MultiDrawArraysIndirectBindlessNV}, except that {@code drawCount} defines an offset (in bytes) into - * the buffer object bound to the PARAMETER_BUFFER_ARB binding point at which a single {@code sizei} typed value is stored, which contains the draw count. - * If the value stored at {@code drawCount} into the buffer is greater than {@code maxDrawCount}, an implementation may stop processing draws after - * {@code maxDrawCount} parameter sets. - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of DrawArraysIndirectBindlessCommandNV structures (see the extension spec for more information) - * @param drawCount the byte offset into the buffer object containing the draw count. This offset must be a multiple of 4 - * @param maxDrawCount the maximum number of draws that are expected to be stored in the buffer - * @param stride the size of one DrawArraysIndirectBindlessCommandNV structure - * @param vertexBufferCount the number of vertex buffers in the DrawArraysIndirectBindlessCommandNV structure - */ - public static void glMultiDrawArraysIndirectBindlessCountNV(@NativeType("GLenum") int mode, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawCount, @NativeType("GLsizei") int maxDrawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - if (CHECKS) { - check(indirect, maxDrawCount * (stride == 0 ? (16 + vertexBufferCount * 24) : stride)); - } - nglMultiDrawArraysIndirectBindlessCountNV(mode, memAddress(indirect), drawCount, maxDrawCount, stride, vertexBufferCount); - } - - /** - * Behaves similarly to {@link NVBindlessMultiDrawIndirect#glMultiDrawArraysIndirectBindlessNV MultiDrawArraysIndirectBindlessNV}, except that {@code drawCount} defines an offset (in bytes) into - * the buffer object bound to the PARAMETER_BUFFER_ARB binding point at which a single {@code sizei} typed value is stored, which contains the draw count. - * If the value stored at {@code drawCount} into the buffer is greater than {@code maxDrawCount}, an implementation may stop processing draws after - * {@code maxDrawCount} parameter sets. - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param indirect an array of DrawArraysIndirectBindlessCommandNV structures (see the extension spec for more information) - * @param drawCount the byte offset into the buffer object containing the draw count. This offset must be a multiple of 4 - * @param maxDrawCount the maximum number of draws that are expected to be stored in the buffer - * @param stride the size of one DrawArraysIndirectBindlessCommandNV structure - * @param vertexBufferCount the number of vertex buffers in the DrawArraysIndirectBindlessCommandNV structure - */ - public static void glMultiDrawArraysIndirectBindlessCountNV(@NativeType("GLenum") int mode, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawCount, @NativeType("GLsizei") int maxDrawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - nglMultiDrawArraysIndirectBindlessCountNV(mode, indirect, drawCount, maxDrawCount, stride, vertexBufferCount); - } - - // --- [ glMultiDrawElementsIndirectBindlessCountNV ] --- - - /** Unsafe version of: {@link #glMultiDrawElementsIndirectBindlessCountNV MultiDrawElementsIndirectBindlessCountNV} */ - public static native void nglMultiDrawElementsIndirectBindlessCountNV(int mode, int type, long indirect, long drawCount, int maxDrawCount, int stride, int vertexBufferCount); - - /** - * Behaves similarly to {@link NVBindlessMultiDrawIndirect#glMultiDrawElementsIndirectBindlessNV MultiDrawElementsIndirectBindlessNV}, except that {@code drawCount} defines an offset (in bytes) into - * the buffer object bound to the PARAMETER_BUFFER_ARB binding point at which a single {@code sizei} typed value is stored, which contains the draw count. - * If the value stored at {@code drawCount} into the buffer is greater than {@code maxDrawCount}, an implementation may stop processing draws after - * {@code maxDrawCount} parameter sets. - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the data type of the element indices. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect an array of DrawElementsIndirectBindlessCommandNV structures (see the extension spec for more information) - * @param drawCount the byte offset into the buffer object containing the draw count. This offset must be a multiple of 4 - * @param maxDrawCount the maximum number of draws that are expected to be stored in the buffer - * @param stride the size of one DrawElementsIndirectBindlessCommandNV structure - * @param vertexBufferCount the number of vertex buffers in the DrawElementsIndirectBindlessCommandNV structure - */ - public static void glMultiDrawElementsIndirectBindlessCountNV(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer indirect, @NativeType("GLintptr") long drawCount, @NativeType("GLsizei") int maxDrawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - if (CHECKS) { - check(indirect, maxDrawCount * (stride == 0 ? ((vertexBufferCount + 2) * 24) : stride)); - } - nglMultiDrawElementsIndirectBindlessCountNV(mode, type, memAddress(indirect), drawCount, maxDrawCount, stride, vertexBufferCount); - } - - /** - * Behaves similarly to {@link NVBindlessMultiDrawIndirect#glMultiDrawElementsIndirectBindlessNV MultiDrawElementsIndirectBindlessNV}, except that {@code drawCount} defines an offset (in bytes) into - * the buffer object bound to the PARAMETER_BUFFER_ARB binding point at which a single {@code sizei} typed value is stored, which contains the draw count. - * If the value stored at {@code drawCount} into the buffer is greater than {@code maxDrawCount}, an implementation may stop processing draws after - * {@code maxDrawCount} parameter sets. - * - * @param mode the primitive mode. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINE_STRIP LINE_STRIP}{@link GL11#GL_LINE_LOOP LINE_LOOP}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}{@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}{@link GL11#GL_TRIANGLES TRIANGLES}
    {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}{@link GL11#GL_POLYGON POLYGON}{@link GL11#GL_QUADS QUADS}
    {@link GL11#GL_QUAD_STRIP QUAD_STRIP}
    - * @param type the data type of the element indices. One of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}
    - * @param indirect an array of DrawElementsIndirectBindlessCommandNV structures (see the extension spec for more information) - * @param drawCount the byte offset into the buffer object containing the draw count. This offset must be a multiple of 4 - * @param maxDrawCount the maximum number of draws that are expected to be stored in the buffer - * @param stride the size of one DrawElementsIndirectBindlessCommandNV structure - * @param vertexBufferCount the number of vertex buffers in the DrawElementsIndirectBindlessCommandNV structure - */ - public static void glMultiDrawElementsIndirectBindlessCountNV(@NativeType("GLenum") int mode, @NativeType("GLenum") int type, @NativeType("void const *") long indirect, @NativeType("GLintptr") long drawCount, @NativeType("GLsizei") int maxDrawCount, @NativeType("GLsizei") int stride, @NativeType("GLint") int vertexBufferCount) { - nglMultiDrawElementsIndirectBindlessCountNV(mode, type, indirect, drawCount, maxDrawCount, stride, vertexBufferCount); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessTexture.java deleted file mode 100644 index 22548613..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVBindlessTexture.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_bindless_texture extension. - * - *

    This extension allows OpenGL applications to access texture objects in - * shaders without first binding each texture to one of a limited number of - * texture image units. Using this extension, an application can query a - * 64-bit unsigned integer texture handle for each texture that it wants to - * access and then use that handle directly in GLSL or assembly-based - * shaders. The ability to access textures without having to bind and/or - * re-bind them is similar to the capability provided by the - * NV_shader_buffer_load extension that allows shaders to access buffer - * objects without binding them. In both cases, these extensions - * significantly reduce the amount of API and internal GL driver overhead - * needed to manage resource bindings.

    - * - *

    This extension also provides similar capability for the image load, store, - * and atomic functionality provided by OpenGL 4.2, OpenGL ES 3.1 and the - * ARB_shader_image_load_store and EXT_shader_image_load_store extensions, - * where a texture can be accessed without first binding it to an image unit. - * An image handle can be extracted from a texture object using an API with a - * set of parameters similar to those for BindImageTextureEXT.

    - * - *

    This extension adds no new data types to GLSL. Instead, it uses existing - * sampler and image data types and allows them to be populated with texture - * and image handles. This extension does permit sampler and image data - * types to be used in more contexts than in unextended GLSL 4.00. In - * particular, sampler and image types may be used as shader inputs/outputs, - * temporary variables, and uniform block members, and may be assigned to by - * shader code. Constructors are provided to convert 64-bit unsigned integer - * values to and from sampler and image data types. Additionally, new APIs - * are provided to load values for sampler and image uniforms with 64-bit - * handle inputs. The use of existing integer-based Uniform* APIs is still - * permitted, in which case the integer specified will identify a texture - * image or image unit. For samplers and images with values specified as - * texture image or image units, the GL implemenation will translate the unit - * number to an internal handle as required.

    - * - *

    To access texture or image resources using handles, the handles must first - * be made resident. Accessing a texture or image by handle without first - * making it resident can result in undefined results, including program - * termination. Since the amount of texture memory required by an - * application may exceed the amount of memory available to the system, this - * extension provides API calls allowing applications to manage overall - * texture memory consumption by making a texture resident and non-resident - * as required.

    - * - *

    Requires {@link GL40 OpenGL 4.0}.

    - */ -public class NVBindlessTexture { - - static { GL.initialize(); } - - protected NVBindlessTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetTextureHandleNV ] --- - - /** - * Creates a texture handle using the current state of the texture named {@code texture}, including any embedded sampler state. See - * {@link #glGetTextureSamplerHandleNV GetTextureSamplerHandleNV} for details. - * - * @param texture the texture object - */ - @NativeType("GLuint64") - public static native long glGetTextureHandleNV(@NativeType("GLuint") int texture); - - // --- [ glGetTextureSamplerHandleNV ] --- - - /** - * Creates a texture handle using the current non-sampler state from the texture named {@code texture} and the sampler state from the sampler object - * {@code sampler}. In both cases, a 64-bit unsigned integer handle is returned. The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated if {@code texture} is zero or is - * not the name of an existing texture object or if {@code sampler} is zero or is not the name of an existing sampler object. The error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if the texture object {@code texture} is not complete. If an error occurs, a handle of zero is returned. - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if the border color (taken from the embedded sampler for GetTextureHandleNV or from the {@code sampler} - * for GetTextureSamplerHandleNV) is not one of the following allowed values. If the texture's base internal format is signed or unsigned integer, allowed - * values are (0,0,0,0), (0,0,0,1), (1,1,1,0), and (1,1,1,1). If the base internal format is not integer, allowed values are (0.0,0.0,0.0,0.0), - * (0.0,0.0,0.0,1.0), (1.0,1.0,1.0,0.0), and (1.0,1.0,1.0,1.0).

    - * - *

    The handle for each texture or texture/sampler pair is unique; the same handle will be returned if GetTextureHandleNV is called multiple times for the - * same texture or if GetTextureSamplerHandleNV is called multiple times for the same texture/sampler pair.

    - * - *

    When a texture object is referenced by one or more texture handles, the texture parameters of the object may not be changed, and the size and format of - * the images in the texture object may not be re-specified. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if the functions TexImage*, CopyTexImage*, - * CompressedTexImage*, TexBuffer*, or TexParameter* are called to modify a texture object referenced by one or more texture handles. The contents of the - * images in a texture object may still be updated via commands such as TexSubImage*, CopyTexSubImage*, and CompressedTexSubImage*, and by rendering to a - * framebuffer object, even if the texture object is referenced by one or more texture handles.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link GL15C#glBufferData BufferData} if it is called to modify a buffer object bound to a buffer texture while that - * texture object is referenced by one or more texture handles. The contents of the buffer object may still be updated via buffer update commands such as - * {@link GL15C#glBufferSubData BufferSubData} and MapBuffer*, or via the texture update commands, even if the buffer is bound to a texture while that buffer texture object is - * referenced by one or more texture handles.

    - * - *

    When a sampler object is referenced by one or more texture handles, the sampler parameters of the object may not be changed. The error - * {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated when calling SamplerParameter* functions to modify a sampler object referenced by one or more texture handles.

    - * - * @param texture the texture object - * @param sampler the sampler object - */ - @NativeType("GLuint64") - public static native long glGetTextureSamplerHandleNV(@NativeType("GLuint") int texture, @NativeType("GLuint") int sampler); - - // --- [ glMakeTextureHandleResidentNV ] --- - - /** - * Make a texture handle resident, so that it is accessible to shaders for texture mapping operations. - * - *

    While the texture handle is resident, it may be used in texture mapping operations. If a shader attempts to perform a texture mapping operation using a - * handle that is not resident, the results of that operation are undefined and may lead to application termination. When a texture handle is resident, the - * texture it references is also considered resident for the purposes of the {@link GL11#glAreTexturesResident AreTexturesResident} command. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is - * generated if {@code handle} is not a valid texture handle, or if {@code handle} is already resident in the current GL context.

    - * - * @param handle the texture handle - */ - public static native void glMakeTextureHandleResidentNV(@NativeType("GLuint64") long handle); - - // --- [ glMakeTextureHandleNonResidentNV ] --- - - /** - * Makes a texture handle inaccessible to shaders. - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if {@code handle} is not a valid texture handle, or if {@code handle} is not resident in the current GL - * context.

    - * - * @param handle the texture handle - */ - public static native void glMakeTextureHandleNonResidentNV(@NativeType("GLuint64") long handle); - - // --- [ glGetImageHandleNV ] --- - - /** - * Creates and returns an image handle for level {@code level} of the texture named {@code texture}. If {@code layered} is {@link GL11#GL_TRUE TRUE}, a handle is created - * for the entire texture level. If {@code layered} is {@link GL11#GL_FALSE FALSE}, a handle is created for only the layer {@code layer} of the texture level. - * {@code format} specifies a format used to interpret the texels of the image when used for image loads, stores, and atomics, and has the same meaning as - * the {@code format} parameter of BindImageTextureEXT(). A 64-bit unsigned integer handle is returned if the command succeeds; otherwise, zero is returned. - * - *

    The error {@link GL11#GL_INVALID_VALUE INVALID_VALUE} is generated by GetImageHandleNV if:

    - * - *
      - *
    • {@code texture} is zero or not the name of an existing texture object;
    • - *
    • the image for the texture level {@code level} doesn't exist (i.e., has a size of zero in {@code texture}); or
    • - *
    • {@code layered} is FALSE and {@code layer} is greater than or equal to the number of layers in the image at level {@code level}.
    • - *
    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by GetImageHandleNV if:

    - * - *
      - *
    • the texture object {@code texture} is not complete (section 3.9.14);
    • - *
    • {@code layered} is TRUE and the texture is not a three-dimensional, one-dimensional array, two dimensional array, cube map, or cube map array - * texture.
    • - *
    - * - *

    When a texture object is referenced by one or more image handles, the texture parameters of the object may not be changed, and the size and format of - * the images in the texture object may not be re-specified. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated when calling TexImage*, CopyTexImage*, - * CompressedTexImage*, TexBuffer*, or TexParameter* functions while a texture object is referenced by one or more image handles. The contents of the - * images in a texture object may still be updated via commands such as TexSubImage*, CopyTexSubImage*, and CompressedTexSubImage*, and by rendering to a - * framebuffer object, even if the texture object is referenced by one or more image handles.

    - * - *

    The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated by {@link GL15C#glBufferData BufferData} if it is called to modify a buffer object bound to a buffer texture while that texture - * object is referenced by one or more image handles. The contents of the buffer object may still be updated via buffer update commands such as - * {@link GL15C#glBufferSubData BufferSubData} and MapBuffer*, or via the texture update commands, even if the buffer is bound to a texture while that buffer texture object is - * referenced by one or more image handles.

    - * - *

    The handle returned for each combination of {@code texture}, {@code level}, {@code layered}, {@code layer}, and {@code format} is unique; the same - * handle will be returned if GetImageHandleNV is called multiple times with the same parameters.

    - * - * @param texture the texture object - * @param level the texture level - * @param layered the layered flag - * @param layer the texture layer - * @param format the texture format - */ - @NativeType("GLuint64") - public static native long glGetImageHandleNV(@NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLboolean") boolean layered, @NativeType("GLint") int layer, @NativeType("GLenum") int format); - - // --- [ glMakeImageHandleResidentNV ] --- - - /** - * Makes an image handle resident, so that it is accessible to shaders for image loads, stores, and atomic operations. - * - *

    {@code access} specifies whether the texture bound to the image handle will be treated as {@link GL15#GL_READ_ONLY READ_ONLY}, {@link GL15#GL_WRITE_ONLY WRITE_ONLY}, or {@link GL15#GL_READ_WRITE READ_WRITE}. If a - * shader reads from an image handle made resident as {@link GL15#GL_WRITE_ONLY WRITE_ONLY}, or writes to an image handle made resident as {@link GL15#GL_READ_ONLY READ_ONLY}, the results of that - * shader operation are undefined and may lead to application termination. The error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} is generated if {@code handle} is not a valid - * image handle, or if {@code handle} is already resident in the current GL context.

    - * - *

    While the image handle is resident, it may be used in image load, store, and atomic operations. If a shader attempts to perform an image operation using - * a handle that is not resident, the results of that operation are undefined and may lead to application termination. When an image handle is resident, - * the texture it references is not necessarily considered resident for the purposes of the {@link GL11#glAreTexturesResident AreTexturesResident} command.

    - * - * @param handle the image handle - * @param access the access type. One of:
    {@link GL15#GL_READ_ONLY READ_ONLY}{@link GL15#GL_WRITE_ONLY WRITE_ONLY}{@link GL15#GL_READ_WRITE READ_WRITE}
    - */ - public static native void glMakeImageHandleResidentNV(@NativeType("GLuint64") long handle, @NativeType("GLenum") int access); - - // --- [ glMakeImageHandleNonResidentNV ] --- - - /** - * Makes an image handle inaccessible to shaders. - * - * @param handle the image handle - */ - public static native void glMakeImageHandleNonResidentNV(@NativeType("GLuint64") long handle); - - // --- [ glUniformHandleui64NV ] --- - - /** - * Loads a 64-bit unsigned integer handle into a uniform location corresponding to sampler or image variable types. - * - * @param location the uniform location - * @param value the handle value - */ - public static native void glUniformHandleui64NV(@NativeType("GLint") int location, @NativeType("GLuint64") long value); - - // --- [ glUniformHandleui64vNV ] --- - - /** - * Unsafe version of: {@link #glUniformHandleui64vNV UniformHandleui64vNV} - * - * @param count the number of handles to load - */ - public static native void nglUniformHandleui64vNV(int location, int count, long values); - - /** - * Loads {@code count} 64-bit unsigned integer handles into a uniform location corresponding to sampler or image variable types. - * - * @param location the uniform location - * @param values a buffer from which to load the handles - */ - public static void glUniformHandleui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer values) { - nglUniformHandleui64vNV(location, values.remaining(), memAddress(values)); - } - - // --- [ glProgramUniformHandleui64NV ] --- - - /** - * DSA version of {@link #glUniformHandleui64NV UniformHandleui64NV}. - * - * @param program the program object - * @param location the uniform location - * @param value the handle value - */ - public static native void glProgramUniformHandleui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64") long value); - - // --- [ glProgramUniformHandleui64vNV ] --- - - /** - * Unsafe version of: {@link #glProgramUniformHandleui64vNV ProgramUniformHandleui64vNV} - * - * @param count the number of handles to load - */ - public static native void nglProgramUniformHandleui64vNV(int program, int location, int count, long values); - - /** - * DSA version of {@link #glUniformHandleui64vNV UniformHandleui64vNV}. - * - * @param program the program object - * @param location the uniform location - * @param values a buffer from which to load the handles - */ - public static void glProgramUniformHandleui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") LongBuffer values) { - nglProgramUniformHandleui64vNV(program, location, values.remaining(), memAddress(values)); - } - - // --- [ glIsTextureHandleResidentNV ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if the specified texture handle is resident in the current context. - * - * @param handle the texture handle - */ - @NativeType("GLboolean") - public static native boolean glIsTextureHandleResidentNV(@NativeType("GLuint64") long handle); - - // --- [ glIsImageHandleResidentNV ] --- - - /** - * Returns {@link GL11#GL_TRUE TRUE} if the specified image handle is resident in the current context. - * - * @param handle the image handle - */ - @NativeType("GLboolean") - public static native boolean glIsImageHandleResidentNV(@NativeType("GLuint64") long handle); - - /** Array version of: {@link #glUniformHandleui64vNV UniformHandleui64vNV} */ - public static void glUniformHandleui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] values) { - long __functionAddress = GL.getICD().glUniformHandleui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, values.length, values, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformHandleui64vNV ProgramUniformHandleui64vNV} */ - public static void glProgramUniformHandleui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64 const *") long[] values) { - long __functionAddress = GL.getICD().glProgramUniformHandleui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, values.length, values, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvanced.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvanced.java deleted file mode 100644 index 338a915b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvanced.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_blend_equation_advanced extension. - * - *

    This extension adds a number of "advanced" blending equations that can be used to perform new color blending operations, many of which are more complex - * than the standard blend modes provided by unextended OpenGL.

    - * - *

    Provides the new blending equations, but guarantees defined results only if each sample is touched no more than once in any single rendering pass. The - * command {@link #glBlendBarrierNV BlendBarrierNV} is provided to indicate a boundary between passes.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public class NVBlendEquationAdvanced { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of BlendParameteriNV, GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_BLEND_PREMULTIPLIED_SRC_NV = 0x9280, - GL_BLEND_OVERLAP_NV = 0x9281; - - /** Accepted by the {@code value} parameter of BlendParameteriNV when {@code pname} is BLEND_OVERLAP_NV. */ - public static final int - GL_UNCORRELATED_NV = 0x8521, - GL_DISJOINT_NV = 0x9283, - GL_CONJOINT_NV = 0x9284; - - /** Accepted by the {@code mode} parameter of BlendEquation and BlendEquationi. */ - public static final int - GL_SRC_NV = 0x9286, - GL_DST_NV = 0x9287, - GL_SRC_OVER_NV = 0x9288, - GL_DST_OVER_NV = 0x9289, - GL_SRC_IN_NV = 0x928A, - GL_DST_IN_NV = 0x928B, - GL_SRC_OUT_NV = 0x928C, - GL_DST_OUT_NV = 0x928D, - GL_SRC_ATOP_NV = 0x928E, - GL_DST_ATOP_NV = 0x928F, - GL_XOR_NV = 0x1506, - GL_MULTIPLY_NV = 0x9294, - GL_SCREEN_NV = 0x9295, - GL_OVERLAY_NV = 0x9296, - GL_DARKEN_NV = 0x9297, - GL_LIGHTEN_NV = 0x9298, - GL_COLORDODGE_NV = 0x9299, - GL_COLORBURN_NV = 0x929A, - GL_HARDLIGHT_NV = 0x929B, - GL_SOFTLIGHT_NV = 0x929C, - GL_DIFFERENCE_NV = 0x929E, - GL_EXCLUSION_NV = 0x92A0, - GL_INVERT_RGB_NV = 0x92A3, - GL_LINEARDODGE_NV = 0x92A4, - GL_LINEARBURN_NV = 0x92A5, - GL_VIVIDLIGHT_NV = 0x92A6, - GL_LINEARLIGHT_NV = 0x92A7, - GL_PINLIGHT_NV = 0x92A8, - GL_HARDMIX_NV = 0x92A9, - GL_HSL_HUE_NV = 0x92AD, - GL_HSL_SATURATION_NV = 0x92AE, - GL_HSL_COLOR_NV = 0x92AF, - GL_HSL_LUMINOSITY_NV = 0x92B0, - GL_PLUS_NV = 0x9291, - GL_PLUS_CLAMPED_NV = 0x92B1, - GL_PLUS_CLAMPED_ALPHA_NV = 0x92B2, - GL_PLUS_DARKER_NV = 0x9292, - GL_MINUS_NV = 0x929F, - GL_MINUS_CLAMPED_NV = 0x92B3, - GL_CONTRAST_NV = 0x92A1, - GL_INVERT_OVG_NV = 0x92B4, - GL_RED_NV = 0x1903, - GL_GREEN_NV = 0x1904, - GL_BLUE_NV = 0x1905; - - protected NVBlendEquationAdvanced() { - throw new UnsupportedOperationException(); - } - - // --- [ glBlendParameteriNV ] --- - - public static native void glBlendParameteriNV(@NativeType("GLenum") int pname, @NativeType("GLint") int value); - - // --- [ glBlendBarrierNV ] --- - - public static native void glBlendBarrierNV(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvancedCoherent.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvancedCoherent.java deleted file mode 100644 index 13a7a4e6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendEquationAdvancedCoherent.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_blend_equation_advanced_coherent extension. - * - *

    Similar to NV_blend_equation_advanced, but guarantees that blending is done coherently and in API primitive ordering. An enable is provided to allow - * implementations to opt out of fully coherent blending and instead behave as though only NV_blend_equation_advanced were supported.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link NVBlendEquationAdvanced NV_blend_equation_advanced}.

    - */ -public final class NVBlendEquationAdvancedCoherent { - - /** - * Accepted by the {@code cap} parameter of Disable, Enable, and IsEnabled, and by the {@code pname} parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev - * and GetInteger64v. - */ - public static final int GL_BLEND_ADVANCED_COHERENT_NV = 0x9285; - - private NVBlendEquationAdvancedCoherent() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendMinmaxFactor.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendMinmaxFactor.java deleted file mode 100644 index c9ea7d27..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVBlendMinmaxFactor.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_blend_minmax_factor extension. - * - *

    The {@link EXTBlendMinmax EXT_blend_minmax} extension extended the GL's blending functionality to allow the blending equation to be specified by the application. That - * extension introduced the {@link EXTBlendMinmax#GL_MIN_EXT MIN_EXT} and {@link EXTBlendMinmax#GL_MAX_EXT MAX_EXT} blend equations, which caused the result of the blend equation to become the minimum or maximum of the - * source color and destination color, respectively.

    - * - *

    The {@code MIN_EXT} and {@code MAX_EXT} blend equations, however, do not include the source or destination blend factors in the arguments to the min - * and max functions. This extension provides two new blend equations that produce the minimum or maximum of the products of the source color and source - * factor, and the destination color and destination factor.

    - */ -public final class NVBlendMinmaxFactor { - - /** - * Accepted by the {@code mode} parameter of BlendEquation and BlendEquationi, and by the {@code modeRGB} and {@code modeAlpha} parameters of - * BlendEquationSeparate and BlendEquationSeparatei. - */ - public static final int - GL_FACTOR_MIN_AMD = 0x901C, - GL_FACTOR_MAX_AMD = 0x901D; - - private NVBlendMinmaxFactor() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVClipSpaceWScaling.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVClipSpaceWScaling.java deleted file mode 100644 index eeecd534..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVClipSpaceWScaling.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Virtual Reality (VR) applications often involve a post-processing step to apply a "barrel" distortion to the rendered image to correct the "pincushion" - * distortion introduced by the optics in a VR device. The barrel distorted image has lower resolution along the edges compared to the center. Since the - * original image is rendered at high resolution, which is uniform across the complete image, a lot of pixels towards the edges do not make it to the - * final post-processed image. - * - *

    This extension also provides a mechanism to render VR scenes at a non-uniform resolution, in particular a resolution that falls linearly from the - * center towards the edges. This is achieved by scaling the "w" coordinate of the vertices in the clip space before perspective divide. The clip space - * "w" coordinate of the vertices may be offset as of a function of "x" and "y" coordinates as follows:

    - * - *
    
    - * w' = w + Ax + By
    - * - *

    In the intended use case for viewport position scaling, an application should use a set of 4 viewports, one for each of the 4 quadrants of a Cartesian - * coordinate system. Each viewport is set to the dimension of the image, but is scissored to the quadrant it represents. The application should specify A - * and B coefficients of the w-scaling equation above, that have the same value, but different signs, for each of the viewports. The signs of A and B - * should match the signs of X and Y for the quadrant that they represent such that the value of "w'" will always be greater than or equal to the original - * "w" value for the entire image. Since the offset to "w", (Ax + By), is always positive and increases with the absolute values of "x" and "y", the - * effective resolution will fall off linearly from the center of the image to its edges.

    - */ -public class NVClipSpaceWScaling { - - static { GL.initialize(); } - - /** Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled. */ - public static final int GL_VIEWPORT_POSITION_W_SCALE_NV = 0x937C; - - /** Accepted by the {@code pname} parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v. */ - public static final int - GL_VIEWPORT_POSITION_W_SCALE_X_COEFF = 0x937D, - GL_VIEWPORT_POSITION_W_SCALE_Y_COEFF = 0x937E; - - protected NVClipSpaceWScaling() { - throw new UnsupportedOperationException(); - } - - // --- [ glViewportPositionWScaleNV ] --- - - /** - * If {@link #GL_VIEWPORT_POSITION_W_SCALE_NV VIEWPORT_POSITION_W_SCALE_NV} is enabled, the w coordinates for each primitive sent to a given viewport will be scaled as a function of its x and y - * coordinates using the following equation: - * - *
    
    -     * w' = xcoeff * x + ycoeff * y + w;
    - * - *

    The coefficients for "x" and "y" used in the above equation depend on the viewport index, and are controlled by this command.

    - * - *

    The viewport specified by {@code index} has its coefficients for "x" and "y" set to the {@code xcoeff} and {@code ycoeff} values. Specifying these - * coefficients enables rendering images at a non-uniform resolution, in particular a resolution that falls off linearly from the center towards the - * edges, which is useful for VR applications. VR applications often involve a post-processing step to apply a "barrel" distortion to the rendered image - * to correct the "pincushion" distortion introduced by the optics in a VR device. The barrel distorted image, has lower resolution along the edges - * compared to the center. Since the original image is rendered at high resolution, which is uniform across the complete image, a lot of pixels towards - * the edges do not make it to the final post-processed image. VR applications may use the w-scaling to minimize the processing of unused fragments. To - * achieve the intended effect, applications should use a set of 4 viewports one for each of the 4 quadrants of a Cartesian coordinate system. Each - * viewport is set to the dimension of the image, but is scissored to the quadrant it represents. The application should specify the x and y coefficients - * of the w-scaling equation above, that have the same value, but different signs, for each of the viewports. The signs of {@code xcoeff} and - * {@code ycoeff} should match the signs of X and Y for the quadrant that they represent such that the value of "w'" will always be greater than or equal - * to the original "w" value for the entire image. Since the offset to "w", (Ax + By), is always positive and increases with the absolute values of "x" - * and "y", the effective resolution will fall off linearly from the center of the image to its edges.

    - * - * @param index the viewport index - * @param xcoeff the x coefficient - * @param ycoeff the y coefficient - */ - public static native void glViewportPositionWScaleNV(@NativeType("GLuint") int index, @NativeType("GLfloat") float xcoeff, @NativeType("GLfloat") float ycoeff); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVCommandList.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVCommandList.java deleted file mode 100644 index c2a09034..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVCommandList.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_command_list extension. - * - *

    This extension adds a few new features designed to provide very low overhead batching and replay of rendering commands and state changes:

    - * - *
      - *
    • A state object, which stores a pre-validated representation of the state of (almost) the entire pipeline.
    • - *
    • A more flexible and extensible MultiDrawIndirect (MDI) type of mechanism, using a token-based command stream, allowing to setup binding state and - * emit draw calls.
    • - *
    • A set of functions to execute a list of the token-based command streams with state object changes interleaved with the streams.
    • - *
    • Command lists enabling compilation and reuse of sequences of command streams and state object changes.
    • - *
    - * - *

    Because state objects reflect the state of the entire pipeline, it is expected that they can be pre-validated and executed efficiently. It is also - * expected that when state objects are combined into a command list, the command list can diff consecutive state objects to produce a reduced/ optimized - * set of state changes specific to that transition.

    - * - *

    The token-based command stream can also be stored in regular buffer objects and therefore be modified by the server itself. This allows more complex - * work creation than the original MDI approach, which was limited to emitting draw calls only.

    - * - *

    Command structures

    - * - *
    
    - * typedef struct {
    - *   uint  header;
    - * } TerminateSequenceCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - * } NOPCommandNV;
    - * 
    - * typedef  struct {
    - *   uint  header;
    - *   uint  count;
    - *   uint  firstIndex;
    - *   uint  baseVertex;
    - * } DrawElementsCommandNV;
    - * 
    - * typedef  struct {
    - *   uint  header;
    - *   uint  count;
    - *   uint  first;
    - * } DrawArraysCommandNV;
    - * 
    - * typedef  struct {
    - *   uint  header;
    - *   uint  mode;
    - *   uint  count;
    - *   uint  instanceCount;
    - *   uint  firstIndex;
    - *   uint  baseVertex;
    - *   uint  baseInstance;
    - * } DrawElementsInstancedCommandNV;
    - * 
    - * typedef  struct {
    - *   uint  header;
    - *   uint  mode;
    - *   uint  count;
    - *   uint  instanceCount;
    - *   uint  first;
    - *   uint  baseInstance;
    - * } DrawArraysInstancedCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   uint  addressLo;
    - *   uint  addressHi;
    - *   uint  typeSizeInByte;
    - * } ElementAddressCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   uint  index;
    - *   uint  addressLo;
    - *   uint  addressHi;
    - * } AttributeAddressCommandNV;
    - * 
    - * typedef struct {
    - *   uint    header;
    - *   ushort  index;
    - *   ushort  stage;
    - *   uint    addressLo;
    - *   uint    addressHi;
    - * } UniformAddressCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   float red;
    - *   float green;
    - *   float blue;
    - *   float alpha;
    - * } BlendColorCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   uint  frontStencilRef;
    - *   uint  backStencilRef;
    - * } StencilRefCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   float lineWidth;
    - * } LineWidthCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   float scale;
    - *   float bias;
    - * } PolygonOffsetCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   float alphaRef;
    - * } AlphaRefCommandNV;
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   uint  x;
    - *   uint  y;
    - *   uint  width;
    - *   uint  height;
    - * } ViewportCommandNV; // only ViewportIndex 0
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   uint  x;
    - *   uint  y;
    - *   uint  width;
    - *   uint  height;
    - * } ScissorCommandNV; // only ViewportIndex 0
    - * 
    - * typedef struct {
    - *   uint  header;
    - *   uint  frontFace; // 0 for CW, 1 for CCW
    - * } FrontFaceCommandNV;
    - * - *

    Tight packing is used for all structures.

    - */ -public class NVCommandList { - - static { GL.initialize(); } - - /** Used in DrawCommandsStates buffer formats, in GetCommandHeaderNV to return the header. */ - public static final int - GL_TERMINATE_SEQUENCE_COMMAND_NV = 0x0, - GL_NOP_COMMAND_NV = 0x1, - GL_DRAW_ELEMENTS_COMMAND_NV = 0x2, - GL_DRAW_ARRAYS_COMMAND_NV = 0x3, - GL_DRAW_ELEMENTS_STRIP_COMMAND_NV = 0x4, - GL_DRAW_ARRAYS_STRIP_COMMAND_NV = 0x5, - GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV = 0x6, - GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV = 0x7, - GL_ELEMENT_ADDRESS_COMMAND_NV = 0x8, - GL_ATTRIBUTE_ADDRESS_COMMAND_NV = 0x9, - GL_UNIFORM_ADDRESS_COMMAND_NV = 0xA, - GL_BLEND_COLOR_COMMAND_NV = 0xB, - GL_STENCIL_REF_COMMAND_NV = 0xC, - GL_LINE_WIDTH_COMMAND_NV = 0xD, - GL_POLYGON_OFFSET_COMMAND_NV = 0xE, - GL_ALPHA_REF_COMMAND_NV = 0xF, - GL_VIEWPORT_COMMAND_NV = 0x10, - GL_SCISSOR_COMMAND_NV = 0x11, - GL_FRONT_FACE_COMMAND_NV = 0x12; - - protected NVCommandList() { - throw new UnsupportedOperationException(); - } - - // --- [ glCreateStatesNV ] --- - - /** - * Unsafe version of: {@link #glCreateStatesNV CreateStatesNV} - * - * @param n the number of state object names to create - */ - public static native void nglCreateStatesNV(int n, long states); - - /** - * Returns {@code n} previously unused state object names in {@code states}, and creates a state object in the initial state for each name. - * - * @param states the buffer in which to write the created state object names - */ - public static void glCreateStatesNV(@NativeType("GLuint *") IntBuffer states) { - nglCreateStatesNV(states.remaining(), memAddress(states)); - } - - /** Returns {@code n} previously unused state object names in {@code states}, and creates a state object in the initial state for each name. */ - @NativeType("void") - public static int glCreateStatesNV() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer states = stack.callocInt(1); - nglCreateStatesNV(1, memAddress(states)); - return states.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteStatesNV ] --- - - /** - * Unsafe version of: {@link #glDeleteStatesNV DeleteStatesNV} - * - * @param n the number of state object names to delete - */ - public static native void nglDeleteStatesNV(int n, long states); - - /** - * Deletes {@code n} names of state objects given by {@code states}. Once a state object is deleted it has no contents and its name is again unused. - * Unused names in {@code states} are silently ignored, as is the value zero. - * - * @param states the buffer from which to read the state object names to delete - */ - public static void glDeleteStatesNV(@NativeType("GLuint const *") IntBuffer states) { - nglDeleteStatesNV(states.remaining(), memAddress(states)); - } - - /** - * Deletes {@code n} names of state objects given by {@code states}. Once a state object is deleted it has no contents and its name is again unused. - * Unused names in {@code states} are silently ignored, as is the value zero. - */ - public static void glDeleteStatesNV(@NativeType("GLuint const *") int state) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer states = stack.ints(state); - nglDeleteStatesNV(1, memAddress(states)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsStateNV ] --- - - /** - * Returns true if the specified name corresponds to a state object. - * - * @param state the object name to test - */ - @NativeType("GLboolean") - public static native boolean glIsStateNV(@NativeType("GLuint") int state); - - // --- [ glStateCaptureNV ] --- - - /** - * Captures the current state of the rendering pipeline into the object indicated by {@code state}. - * - *

    The captured rendering state includes:

    - * - *
      - *
    • Vertex attribute enable state, formats, types, relative offsets and strides, but not bound vertex buffers or vertex unified addresses, nor their - * offsets, nor bound index buffers/addresses.
    • - *
    • Primitive state such as primitive restart and patch parameters, provoking vertex.
    • - *
    • Immediate vertex attribute values as provided by glVertexAttrib* or glVertexAttribI*
    • - *
    • All active program binaries except compute (either from the active program pipeline or from UseProgram) with their current subroutine configuration - * excluding all default-block uniform values.
    • - *
    • Rasterization, multisample fragment operation, depth, stencil, and blending state.
    • - *
    • Rasterization state such as line widths, stippling, polygon modes and offsets.
    • - *
    • Viewport, scissor, and depth range state.
    • - *
    • Framebuffer attachment configuration: attachment state including attachment formats, drawbuffer state, and target/layer information, but not - * including actual attachments or sizes of attachments (these are stored separately).
    • - *
    • Framebuffer attachment textures (but not residency state).
    • - *
    - * - * @param state the state object into which to capture the current rendering state - * @param mode the basic Begin mode that this state object must be used with. One of:
    {@link GL11#GL_POINTS POINTS}{@link GL11#GL_LINES LINES}{@link GL11#GL_TRIANGLES TRIANGLES}{@link GL11#GL_QUADS QUADS}{@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}{@link GL32#GL_TRIANGLES_ADJACENCY TRIANGLES_ADJACENCY}{@link GL40#GL_PATCHES PATCHES}
    - */ - public static native void glStateCaptureNV(@NativeType("GLuint") int state, @NativeType("GLenum") int mode); - - // --- [ glGetCommandHeaderNV ] --- - - /** - * Returns the encoded 32bit header value for a given command; the returned value is implementation specific. - * - * @param tokenID the command to query. One of:
    {@link #GL_TERMINATE_SEQUENCE_COMMAND_NV TERMINATE_SEQUENCE_COMMAND_NV}{@link #GL_NOP_COMMAND_NV NOP_COMMAND_NV}{@link #GL_DRAW_ELEMENTS_COMMAND_NV DRAW_ELEMENTS_COMMAND_NV}
    {@link #GL_DRAW_ARRAYS_COMMAND_NV DRAW_ARRAYS_COMMAND_NV}{@link #GL_DRAW_ELEMENTS_STRIP_COMMAND_NV DRAW_ELEMENTS_STRIP_COMMAND_NV}{@link #GL_DRAW_ARRAYS_STRIP_COMMAND_NV DRAW_ARRAYS_STRIP_COMMAND_NV}
    {@link #GL_DRAW_ELEMENTS_INSTANCED_COMMAND_NV DRAW_ELEMENTS_INSTANCED_COMMAND_NV}{@link #GL_DRAW_ARRAYS_INSTANCED_COMMAND_NV DRAW_ARRAYS_INSTANCED_COMMAND_NV}{@link #GL_ELEMENT_ADDRESS_COMMAND_NV ELEMENT_ADDRESS_COMMAND_NV}
    {@link #GL_ATTRIBUTE_ADDRESS_COMMAND_NV ATTRIBUTE_ADDRESS_COMMAND_NV}{@link #GL_UNIFORM_ADDRESS_COMMAND_NV UNIFORM_ADDRESS_COMMAND_NV}{@link #GL_BLEND_COLOR_COMMAND_NV BLEND_COLOR_COMMAND_NV}
    {@link #GL_STENCIL_REF_COMMAND_NV STENCIL_REF_COMMAND_NV}{@link #GL_LINE_WIDTH_COMMAND_NV LINE_WIDTH_COMMAND_NV}{@link #GL_POLYGON_OFFSET_COMMAND_NV POLYGON_OFFSET_COMMAND_NV}
    {@link #GL_ALPHA_REF_COMMAND_NV ALPHA_REF_COMMAND_NV}{@link #GL_VIEWPORT_COMMAND_NV VIEWPORT_COMMAND_NV}{@link #GL_SCISSOR_COMMAND_NV SCISSOR_COMMAND_NV}
    {@link #GL_FRONT_FACE_COMMAND_NV FRONT_FACE_COMMAND_NV}
    - * @param size provided as basic consistency check, since the size of each structure is fixed and no padding is allowed. The value is the sum of the header and - * the command specific structure. - */ - @NativeType("GLuint") - public static native int glGetCommandHeaderNV(@NativeType("GLenum") int tokenID, @NativeType("GLuint") int size); - - // --- [ glGetStageIndexNV ] --- - - /** - * Returns the 16bit value for a specific shader stage; the returned value is implementation specific. The value is to be used with the stage field within - * {@code UniformAddressCommandNV} tokens. - * - * @param shadertype the shader stage type - */ - @NativeType("GLushort") - public static native short glGetStageIndexNV(@NativeType("GLenum") int shadertype); - - // --- [ glDrawCommandsNV ] --- - - /** - * Unsafe version of: {@link #glDrawCommandsNV DrawCommandsNV} - * - * @param count the number of commands - */ - public static native void nglDrawCommandsNV(int primitiveMode, int buffer, long indirects, long sizes, int count); - - /** - * Accepts arrays of buffer addresses as an array of offsets {@code indirects} into a buffer named by {@code buffer}, an array of command lengths in - * {@code sizes}. All arrays have {@code count} entries. - * - * @param primitiveMode the primitive mode - * @param buffer the buffer object name - * @param indirects the array of offsets into the buffer - * @param sizes the array of command lengths - */ - public static void glDrawCommandsNV(@NativeType("GLenum") int primitiveMode, @NativeType("GLuint") int buffer, @NativeType("GLintptr const *") PointerBuffer indirects, @NativeType("GLsizei const *") IntBuffer sizes) { - if (CHECKS) { - check(sizes, indirects.remaining()); - } - nglDrawCommandsNV(primitiveMode, buffer, memAddress(indirects), memAddress(sizes), indirects.remaining()); - } - - // --- [ glDrawCommandsAddressNV ] --- - - /** - * Unsafe version of: {@link #glDrawCommandsAddressNV DrawCommandsAddressNV} - * - * @param count the number of commands - */ - public static native void nglDrawCommandsAddressNV(int primitiveMode, long indirects, long sizes, int count); - - /** - * Accepts arrays of buffer addresses as an array of GPU addresses {@code indirects}, an array of sequence lengths in {@code sizes}. All arrays have - * {@code count} entries. - * - * @param primitiveMode the primitive mode - * @param indirects the array of GPU addreses - * @param sizes the array of command lengths - */ - public static void glDrawCommandsAddressNV(@NativeType("GLenum") int primitiveMode, @NativeType("GLuint64 const *") LongBuffer indirects, @NativeType("GLsizei const *") IntBuffer sizes) { - if (CHECKS) { - check(sizes, indirects.remaining()); - } - nglDrawCommandsAddressNV(primitiveMode, memAddress(indirects), memAddress(sizes), indirects.remaining()); - } - - // --- [ glDrawCommandsStatesNV ] --- - - /** - * Unsafe version of: {@link #glDrawCommandsStatesNV DrawCommandsStatesNV} - * - * @param count the number of commands - */ - public static native void nglDrawCommandsStatesNV(int buffer, long indirects, long sizes, long states, long fbos, int count); - - /** - * Accepts arrays of buffer addresses as an array of offsets {@code indirects} into a buffer named by {@code buffer}, an array of command lengths in - * {@code sizes}, and an array of state object names in {@code states}, of which all names must be non-zero. Frame buffer object names are stored in - * {@code fbos} and can be either zero or non-zero. All arrays have {@code count} entries. The residency of textures used as attachment inside the state - * object's captured fbo or the passed fbo must managed explicitly. - * - * @param buffer the buffer object name - * @param indirects the array of offsets into the buffer - * @param sizes the array of command lengths - * @param states the array of state object names - * @param fbos the array of framebuffer object names - */ - public static void glDrawCommandsStatesNV(@NativeType("GLuint") int buffer, @NativeType("GLintptr const *") PointerBuffer indirects, @NativeType("GLsizei const *") IntBuffer sizes, @NativeType("GLuint const *") IntBuffer states, @NativeType("GLuint const *") IntBuffer fbos) { - if (CHECKS) { - check(sizes, indirects.remaining()); - check(states, indirects.remaining()); - check(fbos, indirects.remaining()); - } - nglDrawCommandsStatesNV(buffer, memAddress(indirects), memAddress(sizes), memAddress(states), memAddress(fbos), indirects.remaining()); - } - - // --- [ glDrawCommandsStatesAddressNV ] --- - - /** - * Unsafe version of: {@link #glDrawCommandsStatesAddressNV DrawCommandsStatesAddressNV} - * - * @param count the number of commands - */ - public static native void nglDrawCommandsStatesAddressNV(long indirects, long sizes, long states, long fbos, int count); - - /** - * Accepts arrays of buffer addresses as an array of GPU addresses {@code indirects}, an array of command lengths in {@code sizes}, and an array of state - * object names in {@code states}, of which all names must be non-zero. Frame buffer object names are stored in {@code fbos} and can be either zero or - * non-zero. All arrays have {@code count} entries. The residency of textures used as attachment inside the state object's captured fbo or the passed fbo - * must managed explicitly. - * - * @param indirects the array of GPU addresses - * @param sizes the array of command lengths - * @param states the array of state object names - * @param fbos the array of framebuffer object names - */ - public static void glDrawCommandsStatesAddressNV(@NativeType("GLuint64 const *") LongBuffer indirects, @NativeType("GLsizei const *") IntBuffer sizes, @NativeType("GLuint const *") IntBuffer states, @NativeType("GLuint const *") IntBuffer fbos) { - if (CHECKS) { - check(sizes, indirects.remaining()); - check(states, indirects.remaining()); - check(fbos, indirects.remaining()); - } - nglDrawCommandsStatesAddressNV(memAddress(indirects), memAddress(sizes), memAddress(states), memAddress(fbos), indirects.remaining()); - } - - // --- [ glCreateCommandListsNV ] --- - - /** - * Unsafe version of: {@link #glCreateCommandListsNV CreateCommandListsNV} - * - * @param n the number of command list names to create - */ - public static native void nglCreateCommandListsNV(int n, long lists); - - /** - * Returns {@code n} previously unused command list names in {@code lists}, and creates a command list in the initial state for each name. - * - * @param lists the buffer in which to return the created command list names - */ - public static void glCreateCommandListsNV(@NativeType("GLuint *") IntBuffer lists) { - nglCreateCommandListsNV(lists.remaining(), memAddress(lists)); - } - - /** Returns {@code n} previously unused command list names in {@code lists}, and creates a command list in the initial state for each name. */ - @NativeType("void") - public static int glCreateCommandListsNV() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer lists = stack.callocInt(1); - nglCreateCommandListsNV(1, memAddress(lists)); - return lists.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteCommandListsNV ] --- - - /** - * Unsafe version of: {@link #glDeleteCommandListsNV DeleteCommandListsNV} - * - * @param n the number of command list names to delete - */ - public static native void nglDeleteCommandListsNV(int n, long lists); - - /** - * Deletes {@code n} command lists stored in {@code lists}. Once a command list is deleted it has no contents and its name is again unused. Unused names - * in {@code lists} are silently ignored, as is the value zero. - * - * @param lists the buffer from which to read the command list names to delete - */ - public static void glDeleteCommandListsNV(@NativeType("GLuint const *") IntBuffer lists) { - nglDeleteCommandListsNV(lists.remaining(), memAddress(lists)); - } - - /** - * Deletes {@code n} command lists stored in {@code lists}. Once a command list is deleted it has no contents and its name is again unused. Unused names - * in {@code lists} are silently ignored, as is the value zero. - */ - public static void glDeleteCommandListsNV(@NativeType("GLuint const *") int list) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer lists = stack.ints(list); - nglDeleteCommandListsNV(1, memAddress(lists)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsCommandListNV ] --- - - /** - * Returns true if the specified name corresponds to a command list. - * - * @param list the object name to query - */ - @NativeType("GLboolean") - public static native boolean glIsCommandListNV(@NativeType("GLuint") int list); - - // --- [ glListDrawCommandsStatesClientNV ] --- - - /** - * Unsafe version of: {@link #glListDrawCommandsStatesClientNV ListDrawCommandsStatesClientNV} - * - * @param count the number of commands - */ - public static native void nglListDrawCommandsStatesClientNV(int list, int segment, long indirects, long sizes, long states, long fbos, int count); - - /** - * A list has multiple segments and each segment enqueues an ordered list of commands. This command enqueues the equivalent of the - * DrawCommandsStatesClientNV commands into the list indicated by {@code list} on the segment indicated by {@code segment}. - * - *

    A list has multiple segments and each segment enqueues an ordered list of command sequences. This command enqueues the equivalent of the - * DrawCommandsStatesNV commands into the list indicated by {@code list} on the segment indicated by {@code segment} except that the sequence data is - * copied from the sequences pointed to by the {@code indirects} pointer. The {@code indirects} pointer should point to a list of size {@code count} of - * pointers, each of which should point to a command sequence.

    - * - *

    The pre-validated state from {@code states} is saved into the command list, rather than a reference to the state object (i.e. the state objects or fbos - * could be deleted and the command list would be unaffected). This includes native GPU addresses for all textures indirectly referenced through the fbos - * passed or state objects' fbos attachments, therefore a recompile of the command list is required if such referenced textures change their allocation - * (for example due to resizing), as well as explicit management of the residency of the textures prior {@link #glCallCommandListNV CallCommandListNV}.

    - * - *

    ListDrawCommandsStatesClientNV performs a by-value copy of the indirect data based on the provided client-side pointers. In this case the content is - * fully immutable, while the buffer-based versions can change the content of the buffers at any later time.

    - * - * @param list the command list - * @param segment the segment - * @param indirects the array of GPU addresses - * @param sizes the array of command lengths - * @param states the array of state object names - * @param fbos the array of framebuffer object names - */ - public static void glListDrawCommandsStatesClientNV(@NativeType("GLuint") int list, @NativeType("GLuint") int segment, @NativeType("void const **") PointerBuffer indirects, @NativeType("GLsizei const *") IntBuffer sizes, @NativeType("GLuint const *") IntBuffer states, @NativeType("GLuint const *") IntBuffer fbos) { - if (CHECKS) { - check(sizes, indirects.remaining()); - check(states, indirects.remaining()); - check(fbos, indirects.remaining()); - } - nglListDrawCommandsStatesClientNV(list, segment, memAddress(indirects), memAddress(sizes), memAddress(states), memAddress(fbos), indirects.remaining()); - } - - // --- [ glCommandListSegmentsNV ] --- - - /** - * Indicates that {@code list} will have {@code segments} number of segments, each of which is a list of command sequences that it enqueues. This must be - * called before any commands are enqueued. In the initial state, a command list has a single segment. - * - * @param list the command list - * @param segments the number of ordered sequences of commands - */ - public static native void glCommandListSegmentsNV(@NativeType("GLuint") int list, @NativeType("GLuint") int segments); - - // --- [ glCompileCommandListNV ] --- - - /** - * Makes the list indicated by {@code list} switch from allowing collection of commands to allowing its execution. At this time, the implementation may - * generate optimized commands to transition between states as efficiently as possible. - * - * @param list the command list to compile - */ - public static native void glCompileCommandListNV(@NativeType("GLuint") int list); - - // --- [ glCallCommandListNV ] --- - - /** - * Executes the command list indicated by {@code list}, which operates as if the DrawCommandsStates* commands were replayed in the order they were - * enqueued on each segment, starting from segment zero and proceeding to the maximum segment. All buffer or texture resources' residency must be managed - * explicitly, including texture attachments of the effective fbos during list enqueuing. - * - * @param list the command list to call - */ - public static native void glCallCommandListNV(@NativeType("GLuint") int list); - - /** Array version of: {@link #glCreateStatesNV CreateStatesNV} */ - public static void glCreateStatesNV(@NativeType("GLuint *") int[] states) { - long __functionAddress = GL.getICD().glCreateStatesNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(states.length, states, __functionAddress); - } - - /** Array version of: {@link #glDeleteStatesNV DeleteStatesNV} */ - public static void glDeleteStatesNV(@NativeType("GLuint const *") int[] states) { - long __functionAddress = GL.getICD().glDeleteStatesNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(states.length, states, __functionAddress); - } - - /** Array version of: {@link #glDrawCommandsNV DrawCommandsNV} */ - public static void glDrawCommandsNV(@NativeType("GLenum") int primitiveMode, @NativeType("GLuint") int buffer, @NativeType("GLintptr const *") PointerBuffer indirects, @NativeType("GLsizei const *") int[] sizes) { - long __functionAddress = GL.getICD().glDrawCommandsNV; - if (CHECKS) { - check(__functionAddress); - check(sizes, indirects.remaining()); - } - callPPV(primitiveMode, buffer, memAddress(indirects), sizes, indirects.remaining(), __functionAddress); - } - - /** Array version of: {@link #glDrawCommandsAddressNV DrawCommandsAddressNV} */ - public static void glDrawCommandsAddressNV(@NativeType("GLenum") int primitiveMode, @NativeType("GLuint64 const *") long[] indirects, @NativeType("GLsizei const *") int[] sizes) { - long __functionAddress = GL.getICD().glDrawCommandsAddressNV; - if (CHECKS) { - check(__functionAddress); - check(sizes, indirects.length); - } - callPPV(primitiveMode, indirects, sizes, indirects.length, __functionAddress); - } - - /** Array version of: {@link #glDrawCommandsStatesNV DrawCommandsStatesNV} */ - public static void glDrawCommandsStatesNV(@NativeType("GLuint") int buffer, @NativeType("GLintptr const *") PointerBuffer indirects, @NativeType("GLsizei const *") int[] sizes, @NativeType("GLuint const *") int[] states, @NativeType("GLuint const *") int[] fbos) { - long __functionAddress = GL.getICD().glDrawCommandsStatesNV; - if (CHECKS) { - check(__functionAddress); - check(sizes, indirects.remaining()); - check(states, indirects.remaining()); - check(fbos, indirects.remaining()); - } - callPPPPV(buffer, memAddress(indirects), sizes, states, fbos, indirects.remaining(), __functionAddress); - } - - /** Array version of: {@link #glDrawCommandsStatesAddressNV DrawCommandsStatesAddressNV} */ - public static void glDrawCommandsStatesAddressNV(@NativeType("GLuint64 const *") long[] indirects, @NativeType("GLsizei const *") int[] sizes, @NativeType("GLuint const *") int[] states, @NativeType("GLuint const *") int[] fbos) { - long __functionAddress = GL.getICD().glDrawCommandsStatesAddressNV; - if (CHECKS) { - check(__functionAddress); - check(sizes, indirects.length); - check(states, indirects.length); - check(fbos, indirects.length); - } - callPPPPV(indirects, sizes, states, fbos, indirects.length, __functionAddress); - } - - /** Array version of: {@link #glCreateCommandListsNV CreateCommandListsNV} */ - public static void glCreateCommandListsNV(@NativeType("GLuint *") int[] lists) { - long __functionAddress = GL.getICD().glCreateCommandListsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(lists.length, lists, __functionAddress); - } - - /** Array version of: {@link #glDeleteCommandListsNV DeleteCommandListsNV} */ - public static void glDeleteCommandListsNV(@NativeType("GLuint const *") int[] lists) { - long __functionAddress = GL.getICD().glDeleteCommandListsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(lists.length, lists, __functionAddress); - } - - /** Array version of: {@link #glListDrawCommandsStatesClientNV ListDrawCommandsStatesClientNV} */ - public static void glListDrawCommandsStatesClientNV(@NativeType("GLuint") int list, @NativeType("GLuint") int segment, @NativeType("void const **") PointerBuffer indirects, @NativeType("GLsizei const *") int[] sizes, @NativeType("GLuint const *") int[] states, @NativeType("GLuint const *") int[] fbos) { - long __functionAddress = GL.getICD().glListDrawCommandsStatesClientNV; - if (CHECKS) { - check(__functionAddress); - check(sizes, indirects.remaining()); - check(states, indirects.remaining()); - check(fbos, indirects.remaining()); - } - callPPPPV(list, segment, memAddress(indirects), sizes, states, fbos, indirects.remaining(), __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVConditionalRender.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVConditionalRender.java deleted file mode 100644 index 73a84329..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVConditionalRender.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_conditional_render extension. - * - *

    This extension provides support for conditional rendering based on the results of an occlusion query. This mechanism allows an application to - * potentially reduce the latency between the completion of an occlusion query and the rendering commands depending on its result. It additionally allows - * the decision of whether to render to be made without application intervention.

    - * - *

    This extension defines two new functions, {@link #glBeginConditionalRenderNV BeginConditionalRenderNV} and {@link #glEndConditionalRenderNV EndConditionalRenderNV}, between which rendering commands may be discarded - * based on the results of an occlusion query. If the specified occlusion query returns a non-zero value, rendering commands between these calls are - * executed. If the occlusion query returns a value of zero, all rendering commands between the calls are discarded.

    - * - *

    If the occlusion query results are not available when {@link #glBeginConditionalRenderNV BeginConditionalRenderNV} is executed, the {@code mode} parameter specifies whether the GL - * should wait for the query to complete or should simply render the subsequent geometry unconditionally.

    - * - *

    Additionally, the extension provides a set of "by region" modes, allowing for implementations that divide rendering work by screen regions to perform - * the conditional query test on a region-by-region basis without checking the query results from other regions. Such a mode is useful for cases like - * split-frame SLI, where a frame is divided between multiple GPUs, each of which has its own occlusion query hardware.

    - */ -public class NVConditionalRender { - - static { GL.initialize(); } - - /** Accepted by the {@code mode} parameter of BeginConditionalRenderNV. */ - public static final int - GL_QUERY_WAIT_NV = 0x8E13, - GL_QUERY_NO_WAIT_NV = 0x8E14, - GL_QUERY_BY_REGION_WAIT_NV = 0x8E15, - GL_QUERY_BY_REGION_NO_WAIT_NV = 0x8E16; - - protected NVConditionalRender() { - throw new UnsupportedOperationException(); - } - - // --- [ glBeginConditionalRenderNV ] --- - - public static native void glBeginConditionalRenderNV(@NativeType("GLuint") int id, @NativeType("GLenum") int mode); - - // --- [ glEndConditionalRenderNV ] --- - - public static native void glEndConditionalRenderNV(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRaster.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRaster.java deleted file mode 100644 index 1ae91aa4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRaster.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_conservative_raster extension. - * - *

    This extension adds a "conservative" rasterization mode where any pixel that is partially covered, even if no sample location is covered, is treated as - * fully covered and a corresponding fragment will be shaded.

    - * - *

    A new control is also added to modify window coordinate snapping precision.

    - * - *

    These controls can be used to implement "binning" to a low-resolution render target, for example to determine which tiles of a sparse texture need to - * be populated. An app can construct a framebuffer where there is one pixel per tile in the sparse texture, and adjust the number of subpixel bits such - * that snapping occurs to the same effective grid as when rendering to the sparse texture. Then triangles should cover (at least) the same pixels in the - * low-res framebuffer as they do tiles in the sparse texture.

    - */ -public class NVConservativeRaster { - - static { GL.initialize(); } - - /** Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled. */ - public static final int GL_CONSERVATIVE_RASTERIZATION_NV = 0x9346; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV = 0x9347, - GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV = 0x9348, - GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV = 0x9349; - - protected NVConservativeRaster() { - throw new UnsupportedOperationException(); - } - - // --- [ glSubpixelPrecisionBiasNV ] --- - - /** - * Sets the {@link #GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV SUBPIXEL_PRECISION_BIAS_X_BITS_NV} and {@link #GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV SUBPIXEL_PRECISION_BIAS_Y_BITS_NV} values. - * - *

    The vertex's window x and y coordinates may be optionally converted to fixed-point values with {@code N} fractional bits. If - * {@link #GL_CONSERVATIVE_RASTERIZATION_NV CONSERVATIVE_RASTERIZATION_NV} is disabled, then {@code N} is the implementation-dependent value of {@link GL11#GL_SUBPIXEL_BITS SUBPIXEL_BITS}. If - * {@link #GL_CONSERVATIVE_RASTERIZATION_NV CONSERVATIVE_RASTERIZATION_NV} is enabled, {@code N} is computed as the sum of the value of {@link GL11#GL_SUBPIXEL_BITS SUBPIXEL_BITS} and programmable values of - * {@link #GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV SUBPIXEL_PRECISION_BIAS_X_BITS_NV} and {@link #GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV SUBPIXEL_PRECISION_BIAS_Y_BITS_NV}.

    - * - *

    When these values are non-zero, the invariance requirement may not apply because the subpixel precision may not be the same at all window coordinates.

    - * - * @param xbits the {@link #GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV SUBPIXEL_PRECISION_BIAS_X_BITS_NV} value. The initial value is zero. - * @param ybits the {@link #GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV SUBPIXEL_PRECISION_BIAS_Y_BITS_NV} value. The initial value is zero. - */ - public static native void glSubpixelPrecisionBiasNV(@NativeType("GLuint") int xbits, @NativeType("GLuint") int ybits); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterDilate.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterDilate.java deleted file mode 100644 index b4bd0038..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterDilate.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_conservative_raster_dilate extension. - * - *

    This extension extends the conservative rasterization funtionality provided by NV_conservative_raster. It provides a new control to generate an - * "over-conservative" rasterization by dilating primitives prior to rasterization.

    - * - *

    When using conservative raster to bin geometry, this extension provides a programmable overlap region between adjacent primitives. Regular - * rasterization bins triangles with a shared edge uniquely into pixels. Conservative raster has a one-pixel overlap along the shared edge. Using a - * half-pixel raster dilation, this overlap region increases to two pixels.

    - * - *

    Requires {@link NVConservativeRaster NV_conservative_raster}.

    - */ -public class NVConservativeRasterDilate { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of ConservativeRasterParameterfNV, GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_CONSERVATIVE_RASTER_DILATE_NV = 0x9379, - GL_CONSERVATIVE_RASTER_DILATE_RANGE_NV = 0x937A, - GL_CONSERVATIVE_RASTER_DILATE_GRANULARITY_NV = 0x937B; - - protected NVConservativeRasterDilate() { - throw new UnsupportedOperationException(); - } - - // --- [ glConservativeRasterParameterfNV ] --- - - public static native void glConservativeRasterParameterfNV(@NativeType("GLenum") int pname, @NativeType("GLfloat") float value); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterPreSnap.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterPreSnap.java deleted file mode 100644 index bfa60076..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterPreSnap.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_conservative_raster_pre_snap extension. - * - *

    {@link NVConservativeRasterPreSnapTriangles NV_conservative_raster_pre_snap_triangles} provides a new mode to achieve rasterization of triangles that is conservative w.r.t the triangle at - * infinite precision i.e. before it is snapped to the sub-pixel grid. This extension provides a new mode that expands this functionality to lines and - * points.

    - * - *

    Requires {@link NVConservativeRasterPreSnapTriangles NV_conservative_raster_pre_snap_triangles}.

    - */ -public final class NVConservativeRasterPreSnap { - - /** Accepted by the {@code param} parameter of {@link NVConservativeRasterPreSnapTriangles#glConservativeRasterParameteriNV ConservativeRasterParameteriNV} */ - public static final int GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV = 0x9550; - - private NVConservativeRasterPreSnap() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterPreSnapTriangles.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterPreSnapTriangles.java deleted file mode 100644 index c8013f90..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVConservativeRasterPreSnapTriangles.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * When {@link NVConservativeRaster#GL_CONSERVATIVE_RASTERIZATION_NV CONSERVATIVE_RASTERIZATION_NV} is enabled, the fragments generated for a primitive are conservative with respect to the primitive after snapping - * to sub-pixel grid. This extension provides a new mode of rasterization for triangles where the fragments generated are conservative with respect to the - * primitive at infinite precision before vertex snapping. - * - *

    When the conservative raster mode is set to {@link #GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV}, triangles are rasterized more conservatively, and may - * generate fragments not generated when the mode is {@link #GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV CONSERVATIVE_RASTER_MODE_POST_SNAP_NV} (default). In particular it may generate fragments for pixels - * covered by triangles with zero area, or for pixels that are adjacent to but not covered by any triangle. This modified behavior may be useful in - * compensating for rounding errors caused by snapping vertex positions to a sub-pixel grid during rasterization. It's possible that a non-degenerate - * triangle becomes degenerate due to snapping. It's additionally possible that rounding errors in computing the position of a vertex or from snapping may - * cause a primitive that would cover a pixel at infinite precision to fail to cover the pixel post-snap. Rasterizing such primitives more conservatively - * may be useful for "binning" algorithms described in {@link NVConservativeRaster NV_conservative_raster}.

    - * - *

    Requires {@link NVConservativeRaster NV_conservative_raster}.

    - */ -public class NVConservativeRasterPreSnapTriangles { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of ConservativeRasterParameteriNV. */ - public static final int GL_CONSERVATIVE_RASTER_MODE_NV = 0x954D; - - /** Accepted by the {@code param} parameter of ConservativeRasterParameteriNV. */ - public static final int - GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV = 0x954E, - GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV = 0x954F; - - protected NVConservativeRasterPreSnapTriangles() { - throw new UnsupportedOperationException(); - } - - // --- [ glConservativeRasterParameteriNV ] --- - - /** - * When {@link NVConservativeRaster#GL_CONSERVATIVE_RASTERIZATION_NV CONSERVATIVE_RASTERIZATION_NV} is enabled, the rasterization behavior may be controlled by calling the this command. - * - *

    If the mode is set to {@link #GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV CONSERVATIVE_RASTER_MODE_POST_SNAP_NV}, the generated fragments are conservative w.r.t the primitive after it is snapped to - * sub-pixel grid. If the mode is set to {@link #GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV} the fragments generated for triangles will be conservative w.r.t - * the triangle at infinite precision. Since non-degenerate triangles may become degenerate due to vertex snapping, this mode will generate fragments for - * zero area triangles that are otherwise culled when the mode is {@link #GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV CONSERVATIVE_RASTER_MODE_POST_SNAP_NV}. This mode may also generate fragments for pixels - * that are within half a sub-pixel distance away from a triangle's infinite precision boundary. The default mode is set to - * {@link #GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV CONSERVATIVE_RASTER_MODE_POST_SNAP_NV}.

    - * - * @param pname the parameter to set. Must be:
    {@link #GL_CONSERVATIVE_RASTER_MODE_NV CONSERVATIVE_RASTER_MODE_NV}
    - * @param param specifies the conservative raster mode to be used. One of:
    {@link #GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV CONSERVATIVE_RASTER_MODE_POST_SNAP_NV}
    {@link #GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV}
    - */ - public static native void glConservativeRasterParameteriNV(@NativeType("GLenum") int pname, @NativeType("GLint") int param); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVCopyDepthToColor.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVCopyDepthToColor.java deleted file mode 100644 index d4800ee2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVCopyDepthToColor.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Some applications, especially systems for distributed OpenGL rendering, would like to have a fast way of copying their depth buffer into a color - * buffer; for example, this allows the depth buffer to be scanned out, allowing downstream compositing operations. - * - *

    To do this operation in unextended OpenGL, the app must use {@link GL11C#glReadPixels ReadPixels} of {@link GL11#GL_DEPTH_COMPONENT DEPTH_COMPONENT} data, followed by {@link GL11#glDrawPixels DrawPixels} of {@link GL11#GL_RGBA RGBA} - * data. However, this typically will not provide adequate performance.

    - * - *

    This extension provides a way to copy the depth data directly into the color buffer, by adding two new options for the "type" parameter of - * {@link GL11#glCopyPixels CopyPixels}: {@link #GL_DEPTH_STENCIL_TO_RGBA_NV DEPTH_STENCIL_TO_RGBA_NV} and {@link #GL_DEPTH_STENCIL_TO_BGRA_NV DEPTH_STENCIL_TO_BGRA_NV}.

    - * - *

    Requires {@link NVPackedDepthStencil NV_packed_depth_stencil}.

    - */ -public final class NVCopyDepthToColor { - - /** Accepted by the {@code type} parameter of CopyPixels. */ - public static final int - GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E, - GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F; - - private NVCopyDepthToColor() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVCopyImage.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVCopyImage.java deleted file mode 100644 index 7ff7196d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVCopyImage.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_copy_image extension. - * - *

    This extension enables efficient image data transfer between image objects (i.e. textures and renderbuffers) without the need to bind the objects or - * otherwise configure the rendering pipeline. The WGL and GLX versions allow copying between images in different contexts, even if those contexts are in - * different sharelists or even on different physical devices.

    - */ -public class NVCopyImage { - - static { GL.initialize(); } - - protected NVCopyImage() { - throw new UnsupportedOperationException(); - } - - // --- [ glCopyImageSubDataNV ] --- - - /** Copies a region of texel data between two image objects. An image object may be either a texture or a renderbuffer. */ - public static native void glCopyImageSubDataNV(@NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVDeepTexture3D.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVDeepTexture3D.java deleted file mode 100644 index 5b8cbca7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVDeepTexture3D.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_deep_texture3D extension. - * - *

    Some applications require 3D textures that have a significant number of slices, but less resolution in width and height. In the current spec, the - * maximum value for the size of all three dimensions is specified by a single value. This extension adds a second set of limits against which 3D textures - * can be checked if an application needs deeper textures than would be allowed by the symmetric texture limits.

    - */ -public final class NVDeepTexture3D { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv and GetFloatv. */ - public static final int - GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV = 0x90D0, - GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV = 0x90D1; - - private NVDeepTexture3D() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVDepthBufferFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVDepthBufferFloat.java deleted file mode 100644 index fc280458..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVDepthBufferFloat.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_depth_buffer_float extension. - * - *

    This extension provides new texture internal formats whose depth components are stored as 32-bit floating-point values, rather than the normalized - * unsigned integers used in existing depth formats. Floating-point depth textures support all the functionality supported for fixed-point depth textures, - * including shadow mapping and rendering support via EXT_framebuffer_object. Floating-point depth textures can store values outside the range [0,1].

    - * - *

    By default, OpenGL entry points taking depth values implicitly clamp the values to the range [0,1]. This extension provides new DepthClear, DepthRange, - * and DepthBoundsEXT entry points that allow applications to specify depth values that are not clamped.

    - * - *

    Additionally, this extension provides new packed depth/stencil pixel formats (see EXT_packed_depth_stencil) that have 64-bit pixels consisting of a - * 32-bit floating-point depth value, 8 bits of stencil, and 24 unused bites. A packed depth/stencil texture internal format is also provided.

    - * - *

    This extension does not provide support for WGL or GLX pixel formats with floating-point depth buffers. The existing (but not commonly used) - * WGL_EXT_depth_float extension could be used for this purpose.

    - * - *

    Requires {@link GL20 OpenGL 2.0}, {@link ARBColorBufferFloat ARB_color_buffer_float}, {@link EXTPackedDepthStencil EXT_packed_depth_stencil} and {@link EXTFramebufferObject EXT_framebuffer_object}.

    - */ -public class NVDepthBufferFloat { - - static { GL.initialize(); } - - /** - * Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, and - * returned in the {@code data} parameter of GetTexLevelParameter and GetRenderbufferParameterivEXT. - */ - public static final int - GL_DEPTH_COMPONENT32F_NV = 0x8DAB, - GL_DEPTH32F_STENCIL8_NV = 0x8DAC; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV = 0x8DAD; - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_DEPTH_BUFFER_FLOAT_MODE_NV = 0x8DAF; - - protected NVDepthBufferFloat() { - throw new UnsupportedOperationException(); - } - - // --- [ glDepthRangedNV ] --- - - public static native void glDepthRangedNV(@NativeType("GLdouble") double zNear, @NativeType("GLdouble") double zFar); - - // --- [ glClearDepthdNV ] --- - - public static native void glClearDepthdNV(@NativeType("GLdouble") double depth); - - // --- [ glDepthBoundsdNV ] --- - - public static native void glDepthBoundsdNV(@NativeType("GLdouble") double zmin, @NativeType("GLdouble") double zmax); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVDepthClamp.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVDepthClamp.java deleted file mode 100644 index ef32ac09..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVDepthClamp.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_depth_clamp extension. - * - *

    In some rendering applications such as shadow volumes, it is useful - * to allow line and polygon primitives to be rasterized without - * clipping the primitive to the near or far clip volume planes (side - * clip volume planes clip normally). Without the near and far clip - * planes, rasterization (pixel coverage determination) in X and Y - * can proceed normally if we ignore the near and far clip planes. - * The one major issue is that fragments of a primitive may extend - * beyond the conventional window space depth range for depth values - * (typically the range [0,1]). Rather than discarding fragments that - * defy the window space depth range (effectively what near and far - * plane clipping accomplish), the depth values can be clamped to the - * current depth range.

    - * - *

    This extension provides exactly such functionality.

    - */ -public final class NVDepthClamp { - - /** - * Accepted by the {@code cap} parameter Enable, Disable, and IsEnabled, - * and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. - */ - public static final int GL_DEPTH_CLAMP_NV = 0x864F; - - private NVDepthClamp() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVDrawTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVDrawTexture.java deleted file mode 100644 index a690442f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVDrawTexture.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_draw_texture extension. - * - *

    This extension provides a new function, DrawTextureNV(), allowing - * applications to draw an screen-aligned rectangle displaying some or all of - * the contents of a two-dimensional or rectangle texture. Callers specify a - * texture object, an optional sampler object, window coordinates of the - * rectangle to draw, and texture coordinates corresponding to the corners of - * the rectangle. For each fragment produced by the rectangle, DrawTextureNV - * interpolates the texture coordinates, performs a texture lookup, and uses - * the texture result as the fragment color.

    - */ -public class NVDrawTexture { - - static { GL.initialize(); } - - protected NVDrawTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawTextureNV ] --- - - public static native void glDrawTextureNV(@NativeType("GLuint") int texture, @NativeType("GLuint") int sampler, @NativeType("GLfloat") float x0, @NativeType("GLfloat") float y0, @NativeType("GLfloat") float x1, @NativeType("GLfloat") float y1, @NativeType("GLfloat") float z, @NativeType("GLfloat") float s0, @NativeType("GLfloat") float t0, @NativeType("GLfloat") float s1, @NativeType("GLfloat") float t1); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVDrawVulkanImage.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVDrawVulkanImage.java deleted file mode 100644 index 38a94a59..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVDrawVulkanImage.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_draw_vulkan_image extension. - * - *

    This extension provides a new function, {@link #glDrawVkImageNV DrawVkImageNV}, allowing applications to draw a screen-aligned rectangle displaying some or all of the - * contents of a two-dimensional Vulkan VkImage. Callers specify a Vulkan {@code VkImage} handle, an optional OpenGL sampler object, window coordinates of - * the rectangle to draw, and texture coordinates corresponding to the corners of the rectangle. For each fragment produced by the rectangle, - * {@code DrawVkImageNV} interpolates the texture coordinates, performs a texture lookup, and uses the texture result as the fragment color.

    - * - *

    No shaders are used by {@code DrawVkImageNV}; the results of the texture lookup are used in lieu of a fragment shader output. The fragments generated - * are processed by all per-fragment operations. In particular, {@code DrawVkImageNV()} fully supports blending and multisampling.

    - * - *

    In order to synchronize between Vulkan and OpenGL there are three other functions provided; {@link #glWaitVkSemaphoreNV WaitVkSemaphoreNV}, {@link #glSignalVkSemaphoreNV SignalVkSemaphoreNV} and - * {@link #glSignalVkFenceNV SignalVkFenceNV}. These allow OpenGL to wait for Vulkan to complete work and also Vulkan to wait for OpenGL to complete work. Together OpenGL and - * Vulkan can synchronize on the server without application interation.

    - * - *

    Finally the function {@code GetVkProcAddrNV()} is provided to allow the OpenGL context to query the Vulkan entry points directly and avoid having to - * load them through the typical Vulkan loader.

    - */ -public class NVDrawVulkanImage { - - static { GL.initialize(); } - - protected NVDrawVulkanImage() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawVkImageNV ] --- - - /** - * Draws a screen-aligned rectangle displaying a portion of the contents of the Vulkan {@code VkImage}. - * - * @param vkImage the Vulkan image handle - * @param sampler an optional sampler object - * @param x0 the rectangle left window coordinate - * @param y0 the rectangle bottom window coordinate - * @param x1 the rectangle right window coordinate - * @param y1 the rectangle top window coordinate - * @param z the Z window coordinate - * @param s0 the left texture coordinate - * @param t0 the bottom texture coordinate - * @param s1 the right texture coordinate - * @param t1 the top texture coordinate - */ - public static native void glDrawVkImageNV(@NativeType("GLuint64") long vkImage, @NativeType("GLuint") int sampler, @NativeType("GLfloat") float x0, @NativeType("GLfloat") float y0, @NativeType("GLfloat") float x1, @NativeType("GLfloat") float y1, @NativeType("GLfloat") float z, @NativeType("GLfloat") float s0, @NativeType("GLfloat") float t0, @NativeType("GLfloat") float s1, @NativeType("GLfloat") float t1); - - // --- [ glGetVkProcAddrNV ] --- - - /** Unsafe version of: {@link #glGetVkProcAddrNV GetVkProcAddrNV} */ - public static native long nglGetVkProcAddrNV(long name); - - /** - * Queries the Vulkan function entry points from within an OpenGL context. - * - * @param name name of the Vulkan function - */ - @NativeType("VULKANPROCNV") - public static long glGetVkProcAddrNV(@NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetVkProcAddrNV(memAddress(name)); - } - - /** - * Queries the Vulkan function entry points from within an OpenGL context. - * - * @param name name of the Vulkan function - */ - @NativeType("VULKANPROCNV") - public static long glGetVkProcAddrNV(@NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetVkProcAddrNV(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glWaitVkSemaphoreNV ] --- - - /** - * Causes the GL server to block until the Vulkan {@code VkSemaphore} is signalled. No GL commands after this command are executed by the server until the - * semaphore is signaled. - * - * @param vkSemaphore a valid Vulkan {@code VkSemaphore} non-dispatchable handle otherwise the operation is undefined - */ - public static native void glWaitVkSemaphoreNV(@NativeType("GLuint64") long vkSemaphore); - - // --- [ glSignalVkSemaphoreNV ] --- - - /** - * Causes the GL server to signal the Vulkan {@code VkSemaphore} when it executes this command. The semaphore is not signalled by GL until all commands - * issued before this have completed execution on the GL server. - * - * @param vkSemaphore a valid Vulkan {@code VkSemaphore} non-dispatchable handle otherwise the operation is undefined - */ - public static native void glSignalVkSemaphoreNV(@NativeType("GLuint64") long vkSemaphore); - - // --- [ glSignalVkFenceNV ] --- - - /** - * Causes the GL server to signal the Vulkan {@code VkFence} object when it executes this command. The fence is not signalled by the GL until all commands - * issued before this have completed execution on the GL server. - * - * @param vkFence a valid Vulkan VkFence non-dispatcable handle otherwise the operation is undefined - */ - public static native void glSignalVkFenceNV(@NativeType("GLuint64") long vkFence); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVExplicitMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVExplicitMultisample.java deleted file mode 100644 index 3f431ad3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVExplicitMultisample.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_explicit_multisample extension. - * - *

    In traditional multisample specs, the API only allows access to the samples indirectly through methods such as coverage values and downsampled - * readbacks. NV_explicit_multisample adds a set of new capabilities to allow more precise control over the use of multisamples. Specifically, it adds:

    - * - *
      - *
    • A query in the API to query the location of samples within the pixel
    • - *
    • An explicit control for the multisample sample mask to augment the control provided by SampleCoverage
    • - *
    • A new texture target to wrap a renderbuffer and allow a restricted class of accesses to the samples
    • - *
    • The ability to fetch a specific sample from a multisampled texture from within a shader
    • - *
    • A program option to enable the new behavior
    • - *
    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link ARBMultisample ARB_multisample}.

    - */ -public class NVExplicitMultisample { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetMultisamplefvNV. */ - public static final int GL_SAMPLE_POSITION_NV = 0x8E50; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_SAMPLE_MASK_NV = 0x8E51; - - /** Accepted by the {@code pname} parameter of GetBooleanIndexedvEXT and GetIntegerIndexedvEXT. */ - public static final int GL_SAMPLE_MASK_VALUE_NV = 0x8E52; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_TEXTURE_BINDING_RENDERBUFFER_NV = 0x8E53, - GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = 0x8E54, - GL_MAX_SAMPLE_MASK_WORDS_NV = 0x8E59; - - /** Accepted by the {@code target} parameter of BindTexture, and TexRenderbufferNV. */ - public static final int GL_TEXTURE_RENDERBUFFER_NV = 0x8E55; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int - GL_SAMPLER_RENDERBUFFER_NV = 0x8E56, - GL_INT_SAMPLER_RENDERBUFFER_NV = 0x8E57, - GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = 0x8E58; - - protected NVExplicitMultisample() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetMultisamplefvNV ] --- - - public static native void nglGetMultisamplefvNV(int pname, int index, long val); - - public static void glGetMultisamplefvNV(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") FloatBuffer val) { - if (CHECKS) { - check(val, 2); - } - nglGetMultisamplefvNV(pname, index, memAddress(val)); - } - - // --- [ glSampleMaskIndexedNV ] --- - - public static native void glSampleMaskIndexedNV(@NativeType("GLuint") int index, @NativeType("GLbitfield") int mask); - - // --- [ glTexRenderbufferNV ] --- - - public static native void glTexRenderbufferNV(@NativeType("GLenum") int target, @NativeType("GLuint") int renderbuffer); - - /** Array version of: {@link #glGetMultisamplefvNV GetMultisamplefvNV} */ - public static void glGetMultisamplefvNV(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLfloat *") float[] val) { - long __functionAddress = GL.getICD().glGetMultisamplefvNV; - if (CHECKS) { - check(__functionAddress); - check(val, 2); - } - callPV(pname, index, val, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVFence.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVFence.java deleted file mode 100644 index cb26003a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVFence.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_fence extension. - * - *

    The goal of this extension is provide a finer granularity of synchronizing GL command completion than offered by standard OpenGL, which offers only two - * mechanisms for synchronization: Flush and Finish. Since Flush merely assures the user that the commands complete in a finite (though undetermined) - * amount of time, it is, thus, of only modest utility. Finish, on the other hand, stalls CPU execution until all pending GL commands have completed. This - * extension offers a middle ground - the ability to "finish" a subset of the command stream, and the ability to determine whether a given command has - * completed or not.

    - * - *

    This extension introduces the concept of a "fence" to the OpenGL command stream. Once the fence is inserted into the command stream, it can be queried - * for a given condition - typically, its completion. Moreover, the application may also request a partial Finish -- that is, all commands prior to the - * fence will be forced to complete until control is returned to the calling process. These new mechanisms allow for synchronization between the host CPU - * and the GPU, which may be accessing the same resources (typically memory).

    - * - *

    This extension is useful in conjunction with NV_vertex_array_range to determine when vertex information has been pulled from the vertex array range. - * Once a fence has been tested TRUE or finished, all vertex indices issued before the fence must have been pulled. This ensures that the vertex data - * memory corresponding to the issued vertex indices can be safely modified (assuming no other outstanding vertex indices are issued subsequent to the - * fence).

    - */ -public class NVFence { - - static { GL.initialize(); } - - /** Accepted by the {@code condition} parameter of SetFenceNV. */ - public static final int GL_ALL_COMPLETED_NV = 0x84F2; - - /** Accepted by the {@code pname} parameter of GetFenceivNV. */ - public static final int - GL_FENCE_STATUS_NV = 0x84F3, - GL_FENCE_CONDITION_NV = 0x84F4; - - protected NVFence() { - throw new UnsupportedOperationException(); - } - - // --- [ glDeleteFencesNV ] --- - - public static native void nglDeleteFencesNV(int n, long fences); - - public static void glDeleteFencesNV(@NativeType("GLuint const *") IntBuffer fences) { - nglDeleteFencesNV(fences.remaining(), memAddress(fences)); - } - - public static void glDeleteFencesNV(@NativeType("GLuint const *") int fence) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer fences = stack.ints(fence); - nglDeleteFencesNV(1, memAddress(fences)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenFencesNV ] --- - - public static native void nglGenFencesNV(int n, long fences); - - public static void glGenFencesNV(@NativeType("GLuint *") IntBuffer fences) { - nglGenFencesNV(fences.remaining(), memAddress(fences)); - } - - @NativeType("void") - public static int glGenFencesNV() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer fences = stack.callocInt(1); - nglGenFencesNV(1, memAddress(fences)); - return fences.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsFenceNV ] --- - - @NativeType("GLboolean") - public static native boolean glIsFenceNV(@NativeType("GLuint") int fence); - - // --- [ glTestFenceNV ] --- - - @NativeType("GLboolean") - public static native boolean glTestFenceNV(@NativeType("GLuint") int fence); - - // --- [ glGetFenceivNV ] --- - - public static native void nglGetFenceivNV(int fence, int pname, long params); - - public static void glGetFenceivNV(@NativeType("GLuint") int fence, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetFenceivNV(fence, pname, memAddress(params)); - } - - @NativeType("void") - public static int glGetFenceiNV(@NativeType("GLuint") int fence, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglGetFenceivNV(fence, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glFinishFenceNV ] --- - - public static native void glFinishFenceNV(@NativeType("GLuint") int fence); - - // --- [ glSetFenceNV ] --- - - public static native void glSetFenceNV(@NativeType("GLuint") int fence, @NativeType("GLenum") int condition); - - /** Array version of: {@link #glDeleteFencesNV DeleteFencesNV} */ - public static void glDeleteFencesNV(@NativeType("GLuint const *") int[] fences) { - long __functionAddress = GL.getICD().glDeleteFencesNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(fences.length, fences, __functionAddress); - } - - /** Array version of: {@link #glGenFencesNV GenFencesNV} */ - public static void glGenFencesNV(@NativeType("GLuint *") int[] fences) { - long __functionAddress = GL.getICD().glGenFencesNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(fences.length, fences, __functionAddress); - } - - /** Array version of: {@link #glGetFenceivNV GetFenceivNV} */ - public static void glGetFenceivNV(@NativeType("GLuint") int fence, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetFenceivNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(fence, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVFillRectangle.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVFillRectangle.java deleted file mode 100644 index a6fd1fe4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVFillRectangle.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_fill_rectangle extension. - * - *

    This extension adds a new {@link GL11C#glPolygonMode PolygonMode} setting where a triangle is rasterized by computing and filling its axis-aligned screen-space bounding - * box, disregarding the actual triangle edges. This can be useful for drawing a rectangle without being split into two triangles with an internal edge. - * It is also useful to minimize the number of primitives that need to be drawn, particularly for a user-interface.

    - */ -public final class NVFillRectangle { - - /** Accepted by the {@code mode} parameter of PolygonMode. */ - public static final int GL_FILL_RECTANGLE_NV = 0x933C; - - private NVFillRectangle() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVFloatBuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVFloatBuffer.java deleted file mode 100644 index 7485e9a7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVFloatBuffer.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_float_buffer extension. - * - *

    This extension builds upon NV_fragment_program to provide a framebuffer and texture format that allows fragment programs to read and write - * unconstrained floating point data.

    - */ -public final class NVFloatBuffer { - - /** Accepted by the {@code internalformat} parameter of TexImage2D and CopyTexImage2D. */ - public static final int - GL_FLOAT_R_NV = 0x8880, - GL_FLOAT_RG_NV = 0x8881, - GL_FLOAT_RGB_NV = 0x8882, - GL_FLOAT_RGBA_NV = 0x8883, - GL_FLOAT_R16_NV = 0x8884, - GL_FLOAT_R32_NV = 0x8885, - GL_FLOAT_RG16_NV = 0x8886, - GL_FLOAT_RG32_NV = 0x8887, - GL_FLOAT_RGB16_NV = 0x8888, - GL_FLOAT_RGB32_NV = 0x8889, - GL_FLOAT_RGBA16_NV = 0x888A, - GL_FLOAT_RGBA32_NV = 0x888B; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int GL_TEXTURE_FLOAT_COMPONENTS_NV = 0x888C; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D, - GL_FLOAT_RGBA_MODE_NV = 0x888E; - - private NVFloatBuffer() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVFogDistance.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVFogDistance.java deleted file mode 100644 index b5fe4892..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVFogDistance.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_fog_distance extension. - * - *

    Ideally, the fog distance (used to compute the fog factor as described in Section 3.10) should be computed as the per-fragment Euclidean distance to - * the fragment center from the eye. In practice, implementations "may choose to approximate the eye-coordinate distance from the eye to each fragment - * center by abs(ze). Further, [the fog factor] f need not be computed at each fragment, but may be computed at each vertex and interpolated as other data - * are."

    - * - *

    This extension provides the application specific control over how OpenGL computes the distance used in computing the fog factor.

    - * - *

    The extension supports three fog distance modes: "eye plane absolute", where the fog distance is the absolute planar distance from the eye plane (i.e., - * OpenGL's standard implementation allowance as cited above); "eye plane", where the fog distance is the signed planar distance from the eye plane; and - * "eye radial", where the fog distance is computed as a Euclidean distance. In the case of the eye radial fog distance mode, the distance may be computed - * per-vertex and then interpolated per-fragment.

    - * - *

    The intent of this extension is to provide applications with better control over the tradeoff between performance and fog quality. The "eye planar" - * modes (signed or absolute) are straightforward to implement with good performance, but scenes are consistently under-fogged at the edges of the field - * of view. The "eye radial" mode can provide for more accurate fog at the edges of the field of view, but this assumes that either the eye radial fog - * distance is computed per-fragment, or if the fog distance is computed per-vertex and then interpolated per-fragment, then the scene must be - * sufficiently tessellated.

    - */ -public final class NVFogDistance { - - /** Accepted by the {@code pname} parameters of Fogf, Fogi, Fogfv, Fogiv, GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_FOG_DISTANCE_MODE_NV = 0x855A; - - /** - * When the {@code pname} parameter of Fogf, Fogi, Foggv, and Fogiv, is FOG_DISTANCE_MODE_NV, then the value of {@code param} or the value pointed to by - * {@code params} may be. - */ - public static final int - GL_EYE_RADIAL_NV = 0x855B, - GL_EYE_PLANE_ABSOLUTE_NV = 0x855C; - - private NVFogDistance() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVFragmentCoverageToColor.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVFragmentCoverageToColor.java deleted file mode 100644 index 9b427e22..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVFragmentCoverageToColor.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_fragment_coverage_to_color extension. - * - *

    This extension allows the fragment coverage value, represented as an - * integer bitfield, to be substituted for a color output being written to a - * single-component color buffer with integer components (e.g., R8UI). The - * capability provided by this extension is different from simply writing the - * gl_SampleMask fragment shader output in that the coverage value written to - * the framebuffer is taken after alpha test, stencil test, and depth test, - * as well as after the multisample fragment operations such as - * alpha-to-coverage.

    - */ -public class NVFragmentCoverageToColor { - - static { GL.initialize(); } - - /** Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled. */ - public static final int GL_FRAGMENT_COVERAGE_TO_COLOR_NV = 0x92DD; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_FRAGMENT_COVERAGE_COLOR_NV = 0x92DE; - - protected NVFragmentCoverageToColor() { - throw new UnsupportedOperationException(); - } - - // --- [ glFragmentCoverageColorNV ] --- - - /** @param color the draw buffer index that the coverage value will be written to. Must be between 0 and the value of MAX_DRAW_BUFFERS minus one, inclusive. */ - public static native void glFragmentCoverageColorNV(@NativeType("GLuint") int color); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVFramebufferMixedSamples.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVFramebufferMixedSamples.java deleted file mode 100644 index 3b452a54..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVFramebufferMixedSamples.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_framebuffer_mixed_samples extension. - * - *

    This extension allows multisample rendering with a raster and - * depth/stencil sample count that is larger than the color sample count. - * Rasterization and the results of the depth and stencil tests together - * determine the portion of a pixel that is "covered". It can be useful to - * evaluate coverage at a higher frequency than color samples are stored. - * This coverage is then "reduced" to a collection of covered color samples, - * each having an opacity value corresponding to the fraction of the color - * sample covered. The opacity can optionally be blended into individual - * color samples.

    - */ -public class NVFramebufferMixedSamples { - - static { GL.initialize(); } - - /** Accepted by the {@code cap} parameter of Enable, Disable, IsEnabled. */ - public static final int - GL_RASTER_MULTISAMPLE_EXT = 0x9327, - GL_COVERAGE_MODULATION_TABLE_NV = 0x9331; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_RASTER_SAMPLES_EXT = 0x9328, - GL_MAX_RASTER_SAMPLES_EXT = 0x9329, - GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT = 0x932A, - GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT = 0x932B, - GL_EFFECTIVE_RASTER_SAMPLES_EXT = 0x932C, - GL_COLOR_SAMPLES_NV = 0x8E20, - GL_DEPTH_SAMPLES_NV = 0x932D, - GL_STENCIL_SAMPLES_NV = 0x932E, - GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV = 0x932F, - GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV = 0x9330, - GL_COVERAGE_MODULATION_NV = 0x9332, - GL_COVERAGE_MODULATION_TABLE_SIZE_NV = 0x9333; - - protected NVFramebufferMixedSamples() { - throw new UnsupportedOperationException(); - } - - // --- [ glRasterSamplesEXT ] --- - - /** - * Selects the number of samples to be used for rasterization. {@code samples} represents a request for a desired minimum number of samples. Since - * different implementations may support different sample counts, the actual sample pattern used is implementation-dependent. However, the resulting value - * for {@link EXTRasterMultisample#GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} is guaranteed to be greater than or equal to {@code samples} and no more than the next larger sample count supported by the - * implementation. If {@code fixedsamplelocations} is {@link GL11#GL_TRUE TRUE}, identical sample locations will be used for all pixels. The sample locations chosen are a - * function of only the parameters to RasterSamplesEXT and not of any other state. - * - *

    If {@link EXTRasterMultisample#GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled, then the sample pattern chosen by RasterSamplesEXT will be used instead of sampling at the center of the pixel. - * The sample locations can be queried with {@link GL32C#glGetMultisamplefv GetMultisamplefv} with a {@code pname} of {@link GL32#GL_SAMPLE_POSITION SAMPLE_POSITION}, similar to normal multisample sample - * locations.

    - * - *

    The value {@link EXTRasterMultisample#GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT MULTISAMPLE_RASTERIZATION_ALLOWED_EXT} is {@link GL11#GL_TRUE TRUE} if {@link GL13#GL_SAMPLE_BUFFERS SAMPLE_BUFFERS} is one or if {@link EXTRasterMultisample#GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled. The value - * {@link EXTRasterMultisample#GL_EFFECTIVE_RASTER_SAMPLES_EXT EFFECTIVE_RASTER_SAMPLES_EXT} is equal to {@link EXTRasterMultisample#GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} if {@link EXTRasterMultisample#GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled, otherwise is equal to {@link GL13#GL_SAMPLES SAMPLES}.

    - * - *

    Explicit multisample rasterization can not be used in conjunction with depth, stencil, or depth bounds tests, multisample framebuffers, or if - * {@link EXTRasterMultisample#GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} is zero. If {@link EXTRasterMultisample#GL_RASTER_MULTISAMPLE_EXT RASTER_MULTISAMPLE_EXT} is enabled, the error {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} will be generated by Draw commands if

    - * - *
      - *
    • the value of {@link EXTRasterMultisample#GL_RASTER_SAMPLES_EXT RASTER_SAMPLES_EXT} is zero
    • - *
    • the depth, stencil, or depth bounds test is enabled
    • - *
    • a multisample draw framebuffer is bound ({@link GL13#GL_SAMPLE_BUFFERS SAMPLE_BUFFERS} is one)
    • - *
    - * - *
    Errors
    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if {@code samples} is greater than the value of {@link EXTRasterMultisample#GL_MAX_RASTER_SAMPLES_EXT MAX_RASTER_SAMPLES_EXT} (the implementation-dependent maximum - * number of samples).

    - * - * @param samples the number of samples to be used for rasterization - * @param fixedsamplelocations if {@link GL11#GL_TRUE TRUE}, identical sample locations will be used for all pixels - */ - public static void glRasterSamplesEXT(@NativeType("GLuint") int samples, @NativeType("GLboolean") boolean fixedsamplelocations) { - EXTRasterMultisample.glRasterSamplesEXT(samples, fixedsamplelocations); - } - - // --- [ glCoverageModulationTableNV ] --- - - /** - * Unsafe version of: {@link #glCoverageModulationTableNV CoverageModulationTableNV} - * - * @param n The size of the coverage modulation table. Must be equal to the value of COVERAGE_MODULATION_TABLE_SIZE_NV. - */ - public static native void nglCoverageModulationTableNV(int n, long v); - - public static void glCoverageModulationTableNV(@NativeType("GLfloat const *") FloatBuffer v) { - nglCoverageModulationTableNV(v.remaining(), memAddress(v)); - } - - // --- [ glGetCoverageModulationTableNV ] --- - - public static native void nglGetCoverageModulationTableNV(int bufsize, long v); - - public static void glGetCoverageModulationTableNV(@NativeType("GLfloat *") FloatBuffer v) { - nglGetCoverageModulationTableNV(v.remaining(), memAddress(v)); - } - - // --- [ glCoverageModulationNV ] --- - - public static native void glCoverageModulationNV(@NativeType("GLenum") int components); - - /** Array version of: {@link #glCoverageModulationTableNV CoverageModulationTableNV} */ - public static void glCoverageModulationTableNV(@NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glCoverageModulationTableNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(v.length, v, __functionAddress); - } - - /** Array version of: {@link #glGetCoverageModulationTableNV GetCoverageModulationTableNV} */ - public static void glGetCoverageModulationTableNV(@NativeType("GLfloat *") float[] v) { - long __functionAddress = GL.getICD().glGetCoverageModulationTableNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(v.length, v, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java deleted file mode 100644 index c5cc8a67..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_framebuffer_multisample_coverage extension. - * - *

    This extension extends the EXT_framebuffer_multisample specification by providing a new function, RenderBufferStorageMultisampleCoverageNV, that - * distinguishes between color samples and coverage samples.

    - * - *

    EXT_framebuffer_multisample introduced the function RenderbufferStorageMultisampleEXT as a method of defining the storage parameters for a multisample - * render buffer. This function takes a {@code samples} parameter. Using rules provided by the specification, the {@code samples} parameter is resolved to - * an actual number of samples that is supported by the underlying hardware. EXT_framebuffer_multisample does not specify whether {@code samples} refers - * to coverage samples or color samples.

    - * - *

    This extension adds the function RenderbufferStorageMultisamplCoverageNV, which takes a {@code coverageSamples} parameter as well as a - * {@code colorSamples} parameter. These two parameters give developers more fine grained control over the quality of multisampled images.

    - * - *

    Requires {@link EXTFramebufferObject EXT_framebuffer_object}, {@link EXTFramebufferBlit EXT_framebuffer_blit} and {@link EXTFramebufferMultisample EXT_framebuffer_multisample}.

    - */ -public class NVFramebufferMultisampleCoverage { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetRenderbufferParameterivEXT. */ - public static final int - GL_RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB, - GL_RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10; - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int - GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11, - GL_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12; - - protected NVFramebufferMultisampleCoverage() { - throw new UnsupportedOperationException(); - } - - // --- [ glRenderbufferStorageMultisampleCoverageNV ] --- - - public static native void glRenderbufferStorageMultisampleCoverageNV(@NativeType("GLenum") int target, @NativeType("GLsizei") int coverageSamples, @NativeType("GLsizei") int colorSamples, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVGPUMulticast.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVGPUMulticast.java deleted file mode 100644 index 97e45749..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVGPUMulticast.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_gpu_multicast extension. - * - *

    This extension enables novel multi-GPU rendering techniques by providing application control over a group of linked GPUs with identical hardware - * configuration.

    - * - *

    Multi-GPU rendering techniques fall into two categories: implicit and explicit. Existing explicit approaches like {@link WGLNVGPUAffinity WGL_NV_gpu_affinity} have two - * main drawbacks: CPU overhead and application complexity. An application must manage one context per GPU and multi-pump the API stream. Implicit - * multi-GPU rendering techniques avoid these issues by broadcasting rendering from one context to multiple GPUs. Common implicit approaches include - * alternate-frame rendering (AFR), split-frame rendering (SFR) and multi-GPU anti-aliasing. They each have drawbacks. AFR scales nicely but interacts - * poorly with inter-frame dependencies. SFR can improve latency but has challenges with offscreen rendering and scaling of vertex processing. With - * multi-GPU anti-aliasing, each GPU renders the same content with alternate sample positions and the driver blends the result to improve quality. This - * also has issues with offscreen rendering and can conflict with other anti-aliasing techniques.

    - * - *

    These issues with implicit multi-GPU rendering all have the same root cause: the driver lacks adequate knowledge to accelerate every application. To - * resolve this, NV_gpu_multicast provides fine-grained, explicit application control over multiple GPUs with a single context.

    - * - *

    Key points:

    - * - *
      - *
    • One context controls multiple GPUs. Every GPU in the linked group can access every object.
    • - *
    • Rendering is broadcast. Each draw is repeated across all GPUs in the linked group.
    • - *
    • Each GPU gets its own instance of all framebuffers, allowing individualized output for each GPU. Input data can be customized for each GPU using - * buffers created with the storage flag, {@link #GL_PER_GPU_STORAGE_BIT_NV PER_GPU_STORAGE_BIT_NV} and a new API, {@link #glMulticastBufferSubDataNV MulticastBufferSubDataNV}.
    • - *
    • New interfaces provide mechanisms to transfer textures and buffers from one GPU to another.
    • - *
    - * - *

    Requires {@link ARBCopyImage ARB_copy_image} and {@link EXTDirectStateAccess EXT_direct_state_access}.

    - */ -public class NVGPUMulticast { - - static { GL.initialize(); } - - /** Accepted in the {@code flags} parameter of BufferStorage and NamedBufferStorageEXT. */ - public static final int GL_PER_GPU_STORAGE_BIT_NV = 0x800; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_MULTICAST_GPUS_NV = 0x92BA, - GL_RENDER_GPU_MASK_NV = 0x9558; - - /** - * Accepted as a value for {@code pname} for the TexParameter{if}, TexParameter{if}v, TextureParameter{if}, TextureParameter{if}v, MultiTexParameter{if}EXT - * and MultiTexParameter{if}vEXT commands and for the {@code value} parameter of GetTexParameter{if}v, GetTextureParameter{if}vEXT and - * GetMultiTexParameter{if}vEXT. - */ - public static final int GL_PER_GPU_STORAGE_NV = 0x9548; - - /** Accepted by the {@code pname} parameter of GetMultisamplefv. */ - public static final int GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV = 0x9549; - - protected NVGPUMulticast() { - throw new UnsupportedOperationException(); - } - - // --- [ glRenderGpuMaskNV ] --- - - /** Restricts render commands to a specific set of GPUs. */ - public static native void glRenderGpuMaskNV(@NativeType("GLbitfield") int mask); - - // --- [ glMulticastBufferSubDataNV ] --- - - public static native void nglMulticastBufferSubDataNV(int gpuMask, int buffer, long offset, long size, long data); - - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ByteBuffer data) { - nglMulticastBufferSubDataNV(gpuMask, buffer, offset, data.remaining(), memAddress(data)); - } - - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") ShortBuffer data) { - nglMulticastBufferSubDataNV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.remaining()) << 1, memAddress(data)); - } - - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") IntBuffer data) { - nglMulticastBufferSubDataNV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") FloatBuffer data) { - nglMulticastBufferSubDataNV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.remaining()) << 2, memAddress(data)); - } - - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") DoubleBuffer data) { - nglMulticastBufferSubDataNV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.remaining()) << 3, memAddress(data)); - } - - // --- [ glMulticastCopyBufferSubDataNV ] --- - - public static native void glMulticastCopyBufferSubDataNV(@NativeType("GLuint") int readGpu, @NativeType("GLbitfield") int writeGpuMask, @NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size); - - // --- [ glMulticastCopyImageSubDataNV ] --- - - public static native void glMulticastCopyImageSubDataNV(@NativeType("GLuint") int srcGpu, @NativeType("GLbitfield") int dstGpuMask, @NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srxY, @NativeType("GLint") int srcZ, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int srcWidth, @NativeType("GLsizei") int srcHeight, @NativeType("GLsizei") int srcDepth); - - // --- [ glMulticastBlitFramebufferNV ] --- - - public static native void glMulticastBlitFramebufferNV(@NativeType("GLuint") int srcGpu, @NativeType("GLuint") int dstGpu, @NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter); - - // --- [ glMulticastFramebufferSampleLocationsfvNV ] --- - - public static native void nglMulticastFramebufferSampleLocationsfvNV(int gpu, int framebuffer, int start, int count, long v); - - public static void glMulticastFramebufferSampleLocationsfvNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int framebuffer, @NativeType("GLuint") int start, @NativeType("GLfloat const *") FloatBuffer v) { - nglMulticastFramebufferSampleLocationsfvNV(gpu, framebuffer, start, v.remaining() >> 1, memAddress(v)); - } - - // --- [ glMulticastBarrierNV ] --- - - public static native void glMulticastBarrierNV(); - - // --- [ glMulticastWaitSyncNV ] --- - - public static native void glMulticastWaitSyncNV(@NativeType("GLuint") int signalGpu, @NativeType("GLbitfield") int waitGpuMask); - - // --- [ glMulticastGetQueryObjectivNV ] --- - - public static native void nglMulticastGetQueryObjectivNV(int gpu, int id, int pname, long params); - - public static void glMulticastGetQueryObjectivNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglMulticastGetQueryObjectivNV(gpu, id, pname, memAddress(params)); - } - - @NativeType("void") - public static int glMulticastGetQueryObjectiNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglMulticastGetQueryObjectivNV(gpu, id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMulticastGetQueryObjectuivNV ] --- - - public static native void nglMulticastGetQueryObjectuivNV(int gpu, int id, int pname, long params); - - public static void glMulticastGetQueryObjectuivNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglMulticastGetQueryObjectuivNV(gpu, id, pname, memAddress(params)); - } - - @NativeType("void") - public static int glMulticastGetQueryObjectuiNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer params = stack.callocInt(1); - nglMulticastGetQueryObjectuivNV(gpu, id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMulticastGetQueryObjecti64vNV ] --- - - public static native void nglMulticastGetQueryObjecti64vNV(int gpu, int id, int pname, long params); - - public static void glMulticastGetQueryObjecti64vNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglMulticastGetQueryObjecti64vNV(gpu, id, pname, memAddress(params)); - } - - @NativeType("void") - public static long glMulticastGetQueryObjecti64NV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglMulticastGetQueryObjecti64vNV(gpu, id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glMulticastGetQueryObjectui64vNV ] --- - - public static native void nglMulticastGetQueryObjectui64vNV(int gpu, int id, int pname, long params); - - public static void glMulticastGetQueryObjectui64vNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglMulticastGetQueryObjectui64vNV(gpu, id, pname, memAddress(params)); - } - - @NativeType("void") - public static long glMulticastGetQueryObjectui64NV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglMulticastGetQueryObjectui64vNV(gpu, id, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glMulticastBufferSubDataNV MulticastBufferSubDataNV} */ - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") short[] data) { - long __functionAddress = GL.getICD().glMulticastBufferSubDataNV; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.length) << 1, data, __functionAddress); - } - - /** Array version of: {@link #glMulticastBufferSubDataNV MulticastBufferSubDataNV} */ - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") int[] data) { - long __functionAddress = GL.getICD().glMulticastBufferSubDataNV; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glMulticastBufferSubDataNV MulticastBufferSubDataNV} */ - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") float[] data) { - long __functionAddress = GL.getICD().glMulticastBufferSubDataNV; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.length) << 2, data, __functionAddress); - } - - /** Array version of: {@link #glMulticastBufferSubDataNV MulticastBufferSubDataNV} */ - public static void glMulticastBufferSubDataNV(@NativeType("GLbitfield") int gpuMask, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("void const *") double[] data) { - long __functionAddress = GL.getICD().glMulticastBufferSubDataNV; - if (CHECKS) { - check(__functionAddress); - } - callPPPV(gpuMask, buffer, offset, Integer.toUnsignedLong(data.length) << 3, data, __functionAddress); - } - - /** Array version of: {@link #glMulticastFramebufferSampleLocationsfvNV MulticastFramebufferSampleLocationsfvNV} */ - public static void glMulticastFramebufferSampleLocationsfvNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int framebuffer, @NativeType("GLuint") int start, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMulticastFramebufferSampleLocationsfvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(gpu, framebuffer, start, v.length >> 1, v, __functionAddress); - } - - /** Array version of: {@link #glMulticastGetQueryObjectivNV MulticastGetQueryObjectivNV} */ - public static void glMulticastGetQueryObjectivNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glMulticastGetQueryObjectivNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(gpu, id, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMulticastGetQueryObjectuivNV MulticastGetQueryObjectuivNV} */ - public static void glMulticastGetQueryObjectuivNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glMulticastGetQueryObjectuivNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(gpu, id, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMulticastGetQueryObjecti64vNV MulticastGetQueryObjecti64vNV} */ - public static void glMulticastGetQueryObjecti64vNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLint64 *") long[] params) { - long __functionAddress = GL.getICD().glMulticastGetQueryObjecti64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(gpu, id, pname, params, __functionAddress); - } - - /** Array version of: {@link #glMulticastGetQueryObjectui64vNV MulticastGetQueryObjectui64vNV} */ - public static void glMulticastGetQueryObjectui64vNV(@NativeType("GLuint") int gpu, @NativeType("GLuint") int id, @NativeType("GLenum") int pname, @NativeType("GLuint64 *") long[] params) { - long __functionAddress = GL.getICD().glMulticastGetQueryObjectui64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(gpu, id, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVGPUShader5.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVGPUShader5.java deleted file mode 100644 index a575c23b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVGPUShader5.java +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_gpu_shader5 extension. - * - *

    This extension provides a set of new features to the OpenGL Shading Language and related APIs to support capabilities of new GPUs. Shaders using the - * new functionality provided by this extension should enable this functionality via the construct

    - * - *
    
    - * \#extension GL_NV_gpu_shader5 : require (or enable)
    - * - *

    This extension was developed concurrently with the ARB_gpu_shader5 extension, and provides a superset of the features provided there. The features - * common to both extensions are documented in the ARB_gpu_shader5 specification; this document describes only the addition language features not - * available via ARB_gpu_shader5. A shader that enables this extension via an \#extension directive also implicitly enables the common capabilities - * provided by ARB_gpu_shader5.

    - * - *

    In addition to the capabilities of ARB_gpu_shader5, this extension provides a variety of new features for all shader types, including:

    - * - *
      - *
    • support for a full set of 8-, 16-, 32-, and 64-bit scalar and vector data types, including uniform API, uniform buffer object, and shader input and - * output support;
    • - *
    • the ability to aggregate samplers into arrays, index these arrays with arbitrary expressions, and not require that non-constant indices be uniform - * across all shader invocations;
    • - *
    • new built-in functions to pack and unpack 64-bit integer types into a two-component 32-bit integer vector;
    • - *
    • new built-in functions to pack and unpack 32-bit unsigned integer types into a two-component 16-bit floating-point vector;
    • - *
    • new built-in functions to convert double-precision floating-point values to or from their 64-bit integer bit encodings;
    • - *
    • new built-in functions to compute the composite of a set of boolean conditions a group of shader threads;
    • - *
    • vector relational functions supporting comparisons of vectors of 8-, 16-, and 64-bit integer types or 16-bit floating-point types; and
    • - *
    • extending texel offset support to allow loading texel offsets from regular integer operands computed at run-time, except for lookups with gradients - * (textureGrad*).
    • - *
    - * - *

    This extension also provides additional support for processing patch primitives (introduced by ARB_tessellation_shader). ARB_tessellation_shader - * requires the use of a tessellation evaluation shader when processing patches, which means that patches will never survive past the tessellation - * pipeline stage. This extension lifts that restriction, and allows patches to proceed further in the pipeline and be used

    - * - *
      - *
    • as input to a geometry shader, using a new "patches" layout qualifier;
    • - *
    • as input to transform feedback;
    • - *
    • by fixed-function rasterization stages, in which case the patches are drawn as independent points.
    • - *
    - * - *

    Additionally, it allows geometry shaders to read per-patch attributes written by a tessellation control shader using input variables declared with - * "patch in".

    - * - *

    Requires {@link GL32 OpenGL 3.2}, GLSL 1.50 and {@link ARBGPUShader5 ARB_gpu_shader5}.

    - */ -public class NVGPUShader5 { - - static { GL.initialize(); } - - /** Returned by the {@code type} parameter of GetActiveAttrib, GetActiveUniform, and GetTransformFeedbackVarying. */ - public static final int - GL_INT64_NV = 0x140E, - GL_UNSIGNED_INT64_NV = 0x140F, - GL_INT8_NV = 0x8FE0, - GL_INT8_VEC2_NV = 0x8FE1, - GL_INT8_VEC3_NV = 0x8FE2, - GL_INT8_VEC4_NV = 0x8FE3, - GL_INT16_NV = 0x8FE4, - GL_INT16_VEC2_NV = 0x8FE5, - GL_INT16_VEC3_NV = 0x8FE6, - GL_INT16_VEC4_NV = 0x8FE7, - GL_INT64_VEC2_NV = 0x8FE9, - GL_INT64_VEC3_NV = 0x8FEA, - GL_INT64_VEC4_NV = 0x8FEB, - GL_UNSIGNED_INT8_NV = 0x8FEC, - GL_UNSIGNED_INT8_VEC2_NV = 0x8FED, - GL_UNSIGNED_INT8_VEC3_NV = 0x8FEE, - GL_UNSIGNED_INT8_VEC4_NV = 0x8FEF, - GL_UNSIGNED_INT16_NV = 0x8FF0, - GL_UNSIGNED_INT16_VEC2_NV = 0x8FF1, - GL_UNSIGNED_INT16_VEC3_NV = 0x8FF2, - GL_UNSIGNED_INT16_VEC4_NV = 0x8FF3, - GL_UNSIGNED_INT64_VEC2_NV = 0x8FF5, - GL_UNSIGNED_INT64_VEC3_NV = 0x8FF6, - GL_UNSIGNED_INT64_VEC4_NV = 0x8FF7, - GL_FLOAT16_NV = 0x8FF8, - GL_FLOAT16_VEC2_NV = 0x8FF9, - GL_FLOAT16_VEC3_NV = 0x8FFA, - GL_FLOAT16_VEC4_NV = 0x8FFB; - - protected NVGPUShader5() { - throw new UnsupportedOperationException(); - } - - // --- [ glUniform1i64NV ] --- - - public static native void glUniform1i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x); - - // --- [ glUniform2i64NV ] --- - - public static native void glUniform2i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y); - - // --- [ glUniform3i64NV ] --- - - public static native void glUniform3i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z); - - // --- [ glUniform4i64NV ] --- - - public static native void glUniform4i64NV(@NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z, @NativeType("GLint64EXT") long w); - - // --- [ glUniform1i64vNV ] --- - - public static native void nglUniform1i64vNV(int location, int count, long value); - - public static void glUniform1i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglUniform1i64vNV(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2i64vNV ] --- - - public static native void nglUniform2i64vNV(int location, int count, long value); - - public static void glUniform2i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglUniform2i64vNV(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3i64vNV ] --- - - public static native void nglUniform3i64vNV(int location, int count, long value); - - public static void glUniform3i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglUniform3i64vNV(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4i64vNV ] --- - - public static native void nglUniform4i64vNV(int location, int count, long value); - - public static void glUniform4i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglUniform4i64vNV(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glUniform1ui64NV ] --- - - public static native void glUniform1ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x); - - // --- [ glUniform2ui64NV ] --- - - public static native void glUniform2ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y); - - // --- [ glUniform3ui64NV ] --- - - public static native void glUniform3ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z); - - // --- [ glUniform4ui64NV ] --- - - public static native void glUniform4ui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z, @NativeType("GLuint64EXT") long w); - - // --- [ glUniform1ui64vNV ] --- - - public static native void nglUniform1ui64vNV(int location, int count, long value); - - public static void glUniform1ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglUniform1ui64vNV(location, value.remaining(), memAddress(value)); - } - - // --- [ glUniform2ui64vNV ] --- - - public static native void nglUniform2ui64vNV(int location, int count, long value); - - public static void glUniform2ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT *") LongBuffer value) { - nglUniform2ui64vNV(location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glUniform3ui64vNV ] --- - - public static native void nglUniform3ui64vNV(int location, int count, long value); - - public static void glUniform3ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglUniform3ui64vNV(location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glUniform4ui64vNV ] --- - - public static native void nglUniform4ui64vNV(int location, int count, long value); - - public static void glUniform4ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglUniform4ui64vNV(location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glGetUniformi64vNV ] --- - - public static native void nglGetUniformi64vNV(int program, int location, long params); - - public static void glGetUniformi64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformi64vNV(program, location, memAddress(params)); - } - - @NativeType("void") - public static long glGetUniformi64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetUniformi64vNV(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetUniformui64vNV ] --- - - public static void nglGetUniformui64vNV(int program, int location, long params) { - NVShaderBufferLoad.nglGetUniformui64vNV(program, location, params); - } - - public static void glGetUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT *") LongBuffer params) { - NVShaderBufferLoad.glGetUniformui64vNV(program, location, params); - } - - @NativeType("void") - public static long glGetUniformui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - return NVShaderBufferLoad.glGetUniformui64NV(program, location); - } - - // --- [ glProgramUniform1i64NV ] --- - - public static native void glProgramUniform1i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x); - - // --- [ glProgramUniform2i64NV ] --- - - public static native void glProgramUniform2i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y); - - // --- [ glProgramUniform3i64NV ] --- - - public static native void glProgramUniform3i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z); - - // --- [ glProgramUniform4i64NV ] --- - - public static native void glProgramUniform4i64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z, @NativeType("GLint64EXT") long w); - - // --- [ glProgramUniform1i64vNV ] --- - - public static native void nglProgramUniform1i64vNV(int program, int location, int count, long value); - - public static void glProgramUniform1i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglProgramUniform1i64vNV(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2i64vNV ] --- - - public static native void nglProgramUniform2i64vNV(int program, int location, int count, long value); - - public static void glProgramUniform2i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglProgramUniform2i64vNV(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3i64vNV ] --- - - public static native void nglProgramUniform3i64vNV(int program, int location, int count, long value); - - public static void glProgramUniform3i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglProgramUniform3i64vNV(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4i64vNV ] --- - - public static native void nglProgramUniform4i64vNV(int program, int location, int count, long value); - - public static void glProgramUniform4i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") LongBuffer value) { - nglProgramUniform4i64vNV(program, location, value.remaining() >> 2, memAddress(value)); - } - - // --- [ glProgramUniform1ui64NV ] --- - - public static native void glProgramUniform1ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x); - - // --- [ glProgramUniform2ui64NV ] --- - - public static native void glProgramUniform2ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y); - - // --- [ glProgramUniform3ui64NV ] --- - - public static native void glProgramUniform3ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z); - - // --- [ glProgramUniform4ui64NV ] --- - - public static native void glProgramUniform4ui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z, @NativeType("GLuint64EXT") long w); - - // --- [ glProgramUniform1ui64vNV ] --- - - public static native void nglProgramUniform1ui64vNV(int program, int location, int count, long value); - - public static void glProgramUniform1ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglProgramUniform1ui64vNV(program, location, value.remaining(), memAddress(value)); - } - - // --- [ glProgramUniform2ui64vNV ] --- - - public static native void nglProgramUniform2ui64vNV(int program, int location, int count, long value); - - public static void glProgramUniform2ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglProgramUniform2ui64vNV(program, location, value.remaining() >> 1, memAddress(value)); - } - - // --- [ glProgramUniform3ui64vNV ] --- - - public static native void nglProgramUniform3ui64vNV(int program, int location, int count, long value); - - public static void glProgramUniform3ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglProgramUniform3ui64vNV(program, location, value.remaining() / 3, memAddress(value)); - } - - // --- [ glProgramUniform4ui64vNV ] --- - - public static native void nglProgramUniform4ui64vNV(int program, int location, int count, long value); - - public static void glProgramUniform4ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglProgramUniform4ui64vNV(program, location, value.remaining() >> 2, memAddress(value)); - } - - /** Array version of: {@link #glUniform1i64vNV Uniform1i64vNV} */ - public static void glUniform1i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniform1i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glUniform2i64vNV Uniform2i64vNV} */ - public static void glUniform2i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniform2i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glUniform3i64vNV Uniform3i64vNV} */ - public static void glUniform3i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniform3i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glUniform4i64vNV Uniform4i64vNV} */ - public static void glUniform4i64vNV(@NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniform4i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glUniform1ui64vNV Uniform1ui64vNV} */ - public static void glUniform1ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniform1ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glUniform2ui64vNV Uniform2ui64vNV} */ - public static void glUniform2ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT *") long[] value) { - long __functionAddress = GL.getICD().glUniform2ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glUniform3ui64vNV Uniform3ui64vNV} */ - public static void glUniform3ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniform3ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glUniform4ui64vNV Uniform4ui64vNV} */ - public static void glUniform4ui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniform4ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glGetUniformi64vNV GetUniformi64vNV} */ - public static void glGetUniformi64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT *") long[] params) { - long __functionAddress = GL.getICD().glGetUniformi64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** Array version of: {@link #glGetUniformui64vNV GetUniformui64vNV} */ - public static void glGetUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT *") long[] params) { - NVShaderBufferLoad.glGetUniformui64vNV(program, location, params); - } - - /** Array version of: {@link #glProgramUniform1i64vNV ProgramUniform1i64vNV} */ - public static void glProgramUniform1i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform1i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2i64vNV ProgramUniform2i64vNV} */ - public static void glProgramUniform2i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform2i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3i64vNV ProgramUniform3i64vNV} */ - public static void glProgramUniform3i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform3i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4i64vNV ProgramUniform4i64vNV} */ - public static void glProgramUniform4i64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform4i64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform1ui64vNV ProgramUniform1ui64vNV} */ - public static void glProgramUniform1ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform1ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform2ui64vNV ProgramUniform2ui64vNV} */ - public static void glProgramUniform2ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform2ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 1, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform3ui64vNV ProgramUniform3ui64vNV} */ - public static void glProgramUniform3ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform3ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length / 3, value, __functionAddress); - } - - /** Array version of: {@link #glProgramUniform4ui64vNV ProgramUniform4ui64vNV} */ - public static void glProgramUniform4ui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniform4ui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length >> 2, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVHalfFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVHalfFloat.java deleted file mode 100644 index 879db1bc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVHalfFloat.java +++ /dev/null @@ -1,636 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_half_float extension. - * - *

    This extension introduces a new storage format and data type for half-precision (16-bit) floating-point quantities. The floating-point format is very - * similar to the IEEE single-precision floating-point standard, except that it has only 5 exponent bits and 10 mantissa bits. Half-precision floats are - * smaller than full precision floats and provide a larger dynamic range than similarly-sized normalized scalar data types.

    - * - *

    This extension allows applications to use half-precision floating point data when specifying vertices or pixel data. It adds new commands to specify - * vertex attributes using the new data type, and extends the existing vertex array and image specification commands to accept the new data type.

    - * - *

    This storage format is also used to represent 16-bit components in the floating-point frame buffers, as defined in the NV_float_buffer extension.

    - */ -public class NVHalfFloat { - - static { GL.initialize(); } - - /** - * Accepted by the {@code type} argument of VertexPointer, NormalPointer, ColorPointer, TexCoordPointer, FogCoordPointerEXT, SecondaryColorPointerEXT, - * VertexWeightPointerEXT, VertexAttribPointerNV, DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, - * and GetTexImage. - */ - public static final int GL_HALF_FLOAT_NV = 0x140B; - - protected NVHalfFloat() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertex2hNV ] --- - - public static native void glVertex2hNV(@NativeType("GLhalfNV") short x, @NativeType("GLhalfNV") short y); - - // --- [ glVertex2hvNV ] --- - - public static native void nglVertex2hvNV(long v); - - public static void glVertex2hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertex2hvNV(memAddress(v)); - } - - // --- [ glVertex3hNV ] --- - - public static native void glVertex3hNV(@NativeType("GLhalfNV") short x, @NativeType("GLhalfNV") short y, @NativeType("GLhalfNV") short z); - - // --- [ glVertex3hvNV ] --- - - public static native void nglVertex3hvNV(long v); - - public static void glVertex3hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertex3hvNV(memAddress(v)); - } - - // --- [ glVertex4hNV ] --- - - public static native void glVertex4hNV(@NativeType("GLhalfNV") short x, @NativeType("GLhalfNV") short y, @NativeType("GLhalfNV") short z, @NativeType("GLhalfNV") short w); - - // --- [ glVertex4hvNV ] --- - - public static native void nglVertex4hvNV(long v); - - public static void glVertex4hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertex4hvNV(memAddress(v)); - } - - // --- [ glNormal3hNV ] --- - - public static native void glNormal3hNV(@NativeType("GLhalfNV") short nx, @NativeType("GLhalfNV") short ny, @NativeType("GLhalfNV") short nz); - - // --- [ glNormal3hvNV ] --- - - public static native void nglNormal3hvNV(long v); - - public static void glNormal3hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglNormal3hvNV(memAddress(v)); - } - - // --- [ glColor3hNV ] --- - - public static native void glColor3hNV(@NativeType("GLhalfNV") short red, @NativeType("GLhalfNV") short green, @NativeType("GLhalfNV") short blue); - - // --- [ glColor3hvNV ] --- - - public static native void nglColor3hvNV(long v); - - public static void glColor3hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglColor3hvNV(memAddress(v)); - } - - // --- [ glColor4hNV ] --- - - public static native void glColor4hNV(@NativeType("GLhalfNV") short red, @NativeType("GLhalfNV") short green, @NativeType("GLhalfNV") short blue, @NativeType("GLhalfNV") short alpha); - - // --- [ glColor4hvNV ] --- - - public static native void nglColor4hvNV(long v); - - public static void glColor4hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglColor4hvNV(memAddress(v)); - } - - // --- [ glTexCoord1hNV ] --- - - public static native void glTexCoord1hNV(@NativeType("GLhalfNV") short s); - - // --- [ glTexCoord1hvNV ] --- - - public static native void nglTexCoord1hvNV(long v); - - public static void glTexCoord1hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglTexCoord1hvNV(memAddress(v)); - } - - // --- [ glTexCoord2hNV ] --- - - public static native void glTexCoord2hNV(@NativeType("GLhalfNV") short s, @NativeType("GLhalfNV") short t); - - // --- [ glTexCoord2hvNV ] --- - - public static native void nglTexCoord2hvNV(long v); - - public static void glTexCoord2hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglTexCoord2hvNV(memAddress(v)); - } - - // --- [ glTexCoord3hNV ] --- - - public static native void glTexCoord3hNV(@NativeType("GLhalfNV") short s, @NativeType("GLhalfNV") short t, @NativeType("GLhalfNV") short r); - - // --- [ glTexCoord3hvNV ] --- - - public static native void nglTexCoord3hvNV(long v); - - public static void glTexCoord3hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglTexCoord3hvNV(memAddress(v)); - } - - // --- [ glTexCoord4hNV ] --- - - public static native void glTexCoord4hNV(@NativeType("GLhalfNV") short s, @NativeType("GLhalfNV") short t, @NativeType("GLhalfNV") short r, @NativeType("GLhalfNV") short q); - - // --- [ glTexCoord4hvNV ] --- - - public static native void nglTexCoord4hvNV(long v); - - public static void glTexCoord4hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglTexCoord4hvNV(memAddress(v)); - } - - // --- [ glMultiTexCoord1hNV ] --- - - public static native void glMultiTexCoord1hNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV") short s); - - // --- [ glMultiTexCoord1hvNV ] --- - - public static native void nglMultiTexCoord1hvNV(int target, long v); - - public static void glMultiTexCoord1hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglMultiTexCoord1hvNV(target, memAddress(v)); - } - - // --- [ glMultiTexCoord2hNV ] --- - - public static native void glMultiTexCoord2hNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV") short s, @NativeType("GLhalfNV") short t); - - // --- [ glMultiTexCoord2hvNV ] --- - - public static native void nglMultiTexCoord2hvNV(int target, long v); - - public static void glMultiTexCoord2hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglMultiTexCoord2hvNV(target, memAddress(v)); - } - - // --- [ glMultiTexCoord3hNV ] --- - - public static native void glMultiTexCoord3hNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV") short s, @NativeType("GLhalfNV") short t, @NativeType("GLhalfNV") short r); - - // --- [ glMultiTexCoord3hvNV ] --- - - public static native void nglMultiTexCoord3hvNV(int target, long v); - - public static void glMultiTexCoord3hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglMultiTexCoord3hvNV(target, memAddress(v)); - } - - // --- [ glMultiTexCoord4hNV ] --- - - public static native void glMultiTexCoord4hNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV") short s, @NativeType("GLhalfNV") short t, @NativeType("GLhalfNV") short r, @NativeType("GLhalfNV") short q); - - // --- [ glMultiTexCoord4hvNV ] --- - - public static native void nglMultiTexCoord4hvNV(int target, long v); - - public static void glMultiTexCoord4hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglMultiTexCoord4hvNV(target, memAddress(v)); - } - - // --- [ glFogCoordhNV ] --- - - public static native void glFogCoordhNV(@NativeType("GLhalfNV") short fog); - - // --- [ glFogCoordhvNV ] --- - - public static native void nglFogCoordhvNV(long fog); - - public static void glFogCoordhvNV(@NativeType("GLhalfNV const *") ShortBuffer fog) { - if (CHECKS) { - check(fog, 1); - } - nglFogCoordhvNV(memAddress(fog)); - } - - // --- [ glSecondaryColor3hNV ] --- - - public static native void glSecondaryColor3hNV(@NativeType("GLhalfNV") short red, @NativeType("GLhalfNV") short green, @NativeType("GLhalfNV") short blue); - - // --- [ glSecondaryColor3hvNV ] --- - - public static native void nglSecondaryColor3hvNV(long v); - - public static void glSecondaryColor3hvNV(@NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglSecondaryColor3hvNV(memAddress(v)); - } - - // --- [ glVertexWeighthNV ] --- - - public static native void glVertexWeighthNV(@NativeType("GLhalfNV") short weight); - - // --- [ glVertexWeighthvNV ] --- - - public static native void nglVertexWeighthvNV(long weight); - - public static void glVertexWeighthvNV(@NativeType("GLhalfNV const *") ShortBuffer weight) { - if (CHECKS) { - check(weight, 1); - } - nglVertexWeighthvNV(memAddress(weight)); - } - - // --- [ glVertexAttrib1hNV ] --- - - public static native void glVertexAttrib1hNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV") short x); - - // --- [ glVertexAttrib1hvNV ] --- - - public static native void nglVertexAttrib1hvNV(int index, long v); - - public static void glVertexAttrib1hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttrib1hvNV(index, memAddress(v)); - } - - // --- [ glVertexAttrib2hNV ] --- - - public static native void glVertexAttrib2hNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV") short x, @NativeType("GLhalfNV") short y); - - // --- [ glVertexAttrib2hvNV ] --- - - public static native void nglVertexAttrib2hvNV(int index, long v); - - public static void glVertexAttrib2hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttrib2hvNV(index, memAddress(v)); - } - - // --- [ glVertexAttrib3hNV ] --- - - public static native void glVertexAttrib3hNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV") short x, @NativeType("GLhalfNV") short y, @NativeType("GLhalfNV") short z); - - // --- [ glVertexAttrib3hvNV ] --- - - public static native void nglVertexAttrib3hvNV(int index, long v); - - public static void glVertexAttrib3hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttrib3hvNV(index, memAddress(v)); - } - - // --- [ glVertexAttrib4hNV ] --- - - public static native void glVertexAttrib4hNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV") short x, @NativeType("GLhalfNV") short y, @NativeType("GLhalfNV") short z, @NativeType("GLhalfNV") short w); - - // --- [ glVertexAttrib4hvNV ] --- - - public static native void nglVertexAttrib4hvNV(int index, long v); - - public static void glVertexAttrib4hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttrib4hvNV(index, memAddress(v)); - } - - // --- [ glVertexAttribs1hvNV ] --- - - public static native void nglVertexAttribs1hvNV(int index, int n, long v); - - public static void glVertexAttribs1hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - nglVertexAttribs1hvNV(index, v.remaining(), memAddress(v)); - } - - // --- [ glVertexAttribs2hvNV ] --- - - public static native void nglVertexAttribs2hvNV(int index, int n, long v); - - public static void glVertexAttribs2hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - nglVertexAttribs2hvNV(index, v.remaining() >> 1, memAddress(v)); - } - - // --- [ glVertexAttribs3hvNV ] --- - - public static native void nglVertexAttribs3hvNV(int index, int n, long v); - - public static void glVertexAttribs3hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - nglVertexAttribs3hvNV(index, v.remaining() / 3, memAddress(v)); - } - - // --- [ glVertexAttribs4hvNV ] --- - - public static native void nglVertexAttribs4hvNV(int index, int n, long v); - - public static void glVertexAttribs4hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") ShortBuffer v) { - nglVertexAttribs4hvNV(index, v.remaining() >> 2, memAddress(v)); - } - - /** Array version of: {@link #glVertex2hvNV Vertex2hvNV} */ - public static void glVertex2hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertex2hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glVertex3hvNV Vertex3hvNV} */ - public static void glVertex3hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertex3hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glVertex4hvNV Vertex4hvNV} */ - public static void glVertex4hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertex4hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glNormal3hvNV Normal3hvNV} */ - public static void glNormal3hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glNormal3hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glColor3hvNV Color3hvNV} */ - public static void glColor3hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glColor3hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glColor4hvNV Color4hvNV} */ - public static void glColor4hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glColor4hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glTexCoord1hvNV TexCoord1hvNV} */ - public static void glTexCoord1hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord1hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glTexCoord2hvNV TexCoord2hvNV} */ - public static void glTexCoord2hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord2hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glTexCoord3hvNV TexCoord3hvNV} */ - public static void glTexCoord3hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord3hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glTexCoord4hvNV TexCoord4hvNV} */ - public static void glTexCoord4hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glTexCoord4hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord1hvNV MultiTexCoord1hvNV} */ - public static void glMultiTexCoord1hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord1hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(target, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord2hvNV MultiTexCoord2hvNV} */ - public static void glMultiTexCoord2hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord2hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(target, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord3hvNV MultiTexCoord3hvNV} */ - public static void glMultiTexCoord3hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord3hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(target, v, __functionAddress); - } - - /** Array version of: {@link #glMultiTexCoord4hvNV MultiTexCoord4hvNV} */ - public static void glMultiTexCoord4hvNV(@NativeType("GLenum") int target, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glMultiTexCoord4hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(target, v, __functionAddress); - } - - /** Array version of: {@link #glFogCoordhvNV FogCoordhvNV} */ - public static void glFogCoordhvNV(@NativeType("GLhalfNV const *") short[] fog) { - long __functionAddress = GL.getICD().glFogCoordhvNV; - if (CHECKS) { - check(__functionAddress); - check(fog, 1); - } - callPV(fog, __functionAddress); - } - - /** Array version of: {@link #glSecondaryColor3hvNV SecondaryColor3hvNV} */ - public static void glSecondaryColor3hvNV(@NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glSecondaryColor3hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(v, __functionAddress); - } - - /** Array version of: {@link #glVertexWeighthvNV VertexWeighthvNV} */ - public static void glVertexWeighthvNV(@NativeType("GLhalfNV const *") short[] weight) { - long __functionAddress = GL.getICD().glVertexWeighthvNV; - if (CHECKS) { - check(__functionAddress); - check(weight, 1); - } - callPV(weight, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib1hvNV VertexAttrib1hvNV} */ - public static void glVertexAttrib1hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib1hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib2hvNV VertexAttrib2hvNV} */ - public static void glVertexAttrib2hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib2hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib3hvNV VertexAttrib3hvNV} */ - public static void glVertexAttrib3hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib3hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttrib4hvNV VertexAttrib4hvNV} */ - public static void glVertexAttrib4hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttrib4hvNV; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribs1hvNV VertexAttribs1hvNV} */ - public static void glVertexAttribs1hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribs1hvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, v.length, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribs2hvNV VertexAttribs2hvNV} */ - public static void glVertexAttribs2hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribs2hvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, v.length >> 1, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribs3hvNV VertexAttribs3hvNV} */ - public static void glVertexAttribs3hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribs3hvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, v.length / 3, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribs4hvNV VertexAttribs4hvNV} */ - public static void glVertexAttribs4hvNV(@NativeType("GLuint") int index, @NativeType("GLhalfNV const *") short[] v) { - long __functionAddress = GL.getICD().glVertexAttribs4hvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(index, v.length >> 2, v, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVInternalformatSampleQuery.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVInternalformatSampleQuery.java deleted file mode 100644 index ea7230d1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVInternalformatSampleQuery.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_internalformat_sample_query extension. - * - *

    Some OpenGL implementations support modes of multisampling which have - * properties which are non-obvious to applications and/or which may not be - * standards conformant. The idea of non-conformant AA modes is not new, - * and is exposed in both GLX and EGL with config caveats and the - * GLX_NON_CONFORMANT_CONFIG for GLX and EGL_NON_CONFORMANT_CONFIG for EGL, - * or by querying the EGL_CONFORMANT attribute in newer versions of EGL.

    - * - *

    Both of these mechanisms operate on a per-config basis, which works as - * intended for window-based configs. However, with the advent of - * application-created FBOs, it is now possible to do all the multisample - * operations in an application-created FBO and never use a multisample - * window.

    - * - *

    This extension further extends the internalformat query mechanism - * (first introduced by ARB_internalformat_query and extended in - * ARB_internalformat_query2) and introduces a mechanism for a - * implementation to report properties of formats that may also be - * dependent on the number of samples. This includes information - * such as whether the combination of format and samples should be - * considered conformant. This enables an implementation to report - * caveats which might apply to both window and FBO-based rendering - * configurations.

    - * - *

    Requires {@link GL42 OpenGL 4.2} or {@link ARBInternalformatQuery ARB_internalformat_query}.

    - */ -public class NVInternalformatSampleQuery { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetInternalformatSampleivNV */ - public static final int - GL_MULTISAMPLES_NV = 0x9371, - GL_SUPERSAMPLE_SCALE_X_NV = 0x9372, - GL_SUPERSAMPLE_SCALE_Y_NV = 0x9373, - GL_CONFORMANT_NV = 0x9374; - - protected NVInternalformatSampleQuery() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetInternalformatSampleivNV ] --- - - public static native void nglGetInternalformatSampleivNV(int target, int internalformat, int samples, int pname, int bufSize, long params); - - public static void glGetInternalformatSampleivNV(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int samples, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - nglGetInternalformatSampleivNV(target, internalformat, samples, pname, params.remaining(), memAddress(params)); - } - - /** Array version of: {@link #glGetInternalformatSampleivNV GetInternalformatSampleivNV} */ - public static void glGetInternalformatSampleivNV(@NativeType("GLenum") int target, @NativeType("GLenum") int internalformat, @NativeType("GLsizei") int samples, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetInternalformatSampleivNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, internalformat, samples, pname, params.length, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVLightMaxExponent.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVLightMaxExponent.java deleted file mode 100644 index 1996a224..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVLightMaxExponent.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_light_max_exponent extension. - * - *

    Default OpenGL does not permit a shininess or spot exponent over 128.0. This extension permits implementations to support and advertise a maximum - * shininess and spot exponent beyond 128.0.

    - */ -public final class NVLightMaxExponent { - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev */ - public static final int - GL_MAX_SHININESS_NV = 0x8504, - GL_MAX_SPOT_EXPONENT_NV = 0x8505; - - private NVLightMaxExponent() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVMemoryAttachment.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVMemoryAttachment.java deleted file mode 100644 index 6dec12ce..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVMemoryAttachment.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_memory_attachment extension. - * - *

    This extension extends the memory objects introduced with {@link EXTMemoryObject EXT_memory_object} to allow existing textures and buffers to be migrated to an - * imported memory allocation. The primary use-case of this extension is plug-in development where resource management (creation, deletion, sizing etc.) - * is handled by inaccessible host application code.

    - * - *

    Requires {@link EXTMemoryObject EXT_memory_object} and {@link ARBTextureStorage ARB_texture_storage} or a version of OpenGL that incorporates it.

    - */ -public class NVMemoryAttachment { - - static { GL.initialize(); } - - /** - * Accepted by the {@code pname} parameter of TexParameter{ifx}{v}, TexParameterI{i ui}v, TextureParameter{if}{v}, TextureParameterI{i ui}v, - * GetTexParameter{if}v, GetTexParameterI{i ui}v, GetTextureParameter{if}v, GetTextureParameterI{i ui}v, GetBufferParameter{i|i64}v and - * GetNamedBufferParameter{i|i64}v. - */ - public static final int - GL_ATTACHED_MEMORY_OBJECT_NV = 0x95A4, - GL_ATTACHED_MEMORY_OFFSET_NV = 0x95A5, - GL_MEMORY_ATTACHABLE_ALIGNMENT_NV = 0x95A6, - GL_MEMORY_ATTACHABLE_SIZE_NV = 0x95A7, - GL_MEMORY_ATTACHABLE_NV = 0x95A8; - - /** - * Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetFloatv, GetIntegerv, GetInteger64v, GetUnsignedBytevEXT, - * GetMemoryObjectParameterivEXT, and the {@code target} parameter of GetBooleani_v, GetIntegeri_v,GetFloati_v, GetDoublei_v, GetInteger64i_v and - * GetUnsignedBytei_vEXT. - */ - public static final int GL_DETACHED_MEMORY_INCARNATION_NV = 0x95A9; - - /** Accepted by the {@code pname} parameter of GetMemoryObjectParameterivEXT, GetMemoryObjectDetachedResourcesuivNV and ResetMemoryObjectParameterNV. */ - public static final int - GL_DETACHED_TEXTURES_NV = 0x95AA, - GL_DETACHED_BUFFERS_NV = 0x95AB; - - /** Accepted by the {@code pname} parameter of MemoryObjectParameterivEXT, GetMemoryObjectParameterivEXT. */ - public static final int - GL_MAX_DETACHED_TEXTURES_NV = 0x95AC, - GL_MAX_DETACHED_BUFFERS_NV = 0x95AD; - - protected NVMemoryAttachment() { - throw new UnsupportedOperationException(); - } - - // --- [ glGetMemoryObjectDetachedResourcesuivNV ] --- - - public static native void nglGetMemoryObjectDetachedResourcesuivNV(int memory, int pname, int first, int count, long params); - - public static void glGetMemoryObjectDetachedResourcesuivNV(@NativeType("GLuint") int memory, @NativeType("GLenum") int pname, @NativeType("GLint") int first, @NativeType("GLuint *") IntBuffer params) { - nglGetMemoryObjectDetachedResourcesuivNV(memory, pname, first, params.remaining(), memAddress(params)); - } - - // --- [ glResetMemoryObjectParameterNV ] --- - - public static native void glResetMemoryObjectParameterNV(@NativeType("GLuint") int memory, @NativeType("GLenum") int pname); - - // --- [ glTexAttachMemoryNV ] --- - - public static native void glTexAttachMemoryNV(@NativeType("GLenum") int target, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glBufferAttachMemoryNV ] --- - - public static native void glBufferAttachMemoryNV(@NativeType("GLenum") int target, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glTextureAttachMemoryNV ] --- - - public static native void glTextureAttachMemoryNV(@NativeType("GLuint") int texture, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - // --- [ glNamedBufferAttachMemoryNV ] --- - - public static native void glNamedBufferAttachMemoryNV(@NativeType("GLuint") int buffer, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset); - - /** Array version of: {@link #glGetMemoryObjectDetachedResourcesuivNV GetMemoryObjectDetachedResourcesuivNV} */ - public static void glGetMemoryObjectDetachedResourcesuivNV(@NativeType("GLuint") int memory, @NativeType("GLenum") int pname, @NativeType("GLint") int first, @NativeType("GLuint *") int[] params) { - long __functionAddress = GL.getICD().glGetMemoryObjectDetachedResourcesuivNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(memory, pname, first, params.length, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVMemoryObjectSparse.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVMemoryObjectSparse.java deleted file mode 100644 index 34ec7417..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVMemoryObjectSparse.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_memory_object_sparse extension. - * - *

    This extension adds sparse support to {@code EXT_memory_object} extension.

    - * - *

    Requires {@link EXTMemoryObject EXT_memory_object}, {@link ARBSparseTexture ARB_sparse_texture} and/or {@link ARBSparseBuffer ARB_sparse_buffer} or a version of OpenGL that incorporates it.

    - */ -public class NVMemoryObjectSparse { - - static { GL.initialize(); } - - protected NVMemoryObjectSparse() { - throw new UnsupportedOperationException(); - } - - // --- [ glBufferPageCommitmentMemNV ] --- - - public static native void glBufferPageCommitmentMemNV(@NativeType("GLenum") int target, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLuint") int memory, @NativeType("GLuint64") long memOffset, @NativeType("GLboolean") boolean commit); - - // --- [ glNamedBufferPageCommitmentMemNV ] --- - - public static native void glNamedBufferPageCommitmentMemNV(@NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size, @NativeType("GLuint") int memory, @NativeType("GLuint64") long memOffset, @NativeType("GLboolean") boolean commit); - - // --- [ glTexPageCommitmentMemNV ] --- - - public static native void glTexPageCommitmentMemNV(@NativeType("GLenum") int target, @NativeType("GLint") int layer, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset, @NativeType("GLboolean") boolean commit); - - // --- [ glTexturePageCommitmentMemNV ] --- - - public static native void glTexturePageCommitmentMemNV(@NativeType("GLuint") int texture, @NativeType("GLint") int layer, @NativeType("GLint") int level, @NativeType("GLint") int xoffset, @NativeType("GLint") int yoffset, @NativeType("GLint") int zoffset, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLuint") int memory, @NativeType("GLuint64") long offset, @NativeType("GLboolean") boolean commit); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVMeshShader.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVMeshShader.java deleted file mode 100644 index a4a12fe9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVMeshShader.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_mesh_shader extension. - * - *

    This extension provides a new mechanism allowing applications to use two new programmable shader types -- the task and mesh shader -- to generate - * collections of geometric primitives to be processed by fixed-function primitive assembly and rasterization logic. When the task and mesh shaders are - * drawn, they replace the standard programmable vertex processing pipeline, including vertex array attribute fetching, vertex shader processing, - * tessellation, and the geometry shader processing.

    - * - *

    Requires {@link GL45 OpenGL 4.5}.

    - */ -public class NVMeshShader { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of {@link GL20C#glCreateShader CreateShader} and returned by the {@code params} parameter of {@link GL20C#glGetShaderiv GetShaderiv}. */ - public static final int - GL_MESH_SHADER_NV = 0x9559, - GL_TASK_SHADER_NV = 0x955A; - - /** Accepted by the {@code pname} parameter of {@link GL11C#glGetIntegerv GetIntegerv}, {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetFloatv GetFloatv}, {@link GL11C#glGetDoublev GetDoublev} and {@link GL32C#glGetInteger64v GetInteger64v}. */ - public static final int - GL_MAX_MESH_UNIFORM_BLOCKS_NV = 0x8E60, - GL_MAX_MESH_TEXTURE_IMAGE_UNITS_NV = 0x8E61, - GL_MAX_MESH_IMAGE_UNIFORMS_NV = 0x8E62, - GL_MAX_MESH_UNIFORM_COMPONENTS_NV = 0x8E63, - GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_NV = 0x8E64, - GL_MAX_MESH_ATOMIC_COUNTERS_NV = 0x8E65, - GL_MAX_MESH_SHADER_STORAGE_BLOCKS_NV = 0x8E66, - GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_NV = 0x8E67, - GL_MAX_TASK_UNIFORM_BLOCKS_NV = 0x8E68, - GL_MAX_TASK_TEXTURE_IMAGE_UNITS_NV = 0x8E69, - GL_MAX_TASK_IMAGE_UNIFORMS_NV = 0x8E6A, - GL_MAX_TASK_UNIFORM_COMPONENTS_NV = 0x8E6B, - GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_NV = 0x8E6C, - GL_MAX_TASK_ATOMIC_COUNTERS_NV = 0x8E6D, - GL_MAX_TASK_SHADER_STORAGE_BLOCKS_NV = 0x8E6E, - GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_NV = 0x8E6F, - GL_MAX_MESH_WORK_GROUP_INVOCATIONS_NV = 0x95A2, - GL_MAX_TASK_WORK_GROUP_INVOCATIONS_NV = 0x95A3, - GL_MAX_MESH_TOTAL_MEMORY_SIZE_NV = 0x9536, - GL_MAX_TASK_TOTAL_MEMORY_SIZE_NV = 0x9537, - GL_MAX_MESH_OUTPUT_VERTICES_NV = 0x9538, - GL_MAX_MESH_OUTPUT_PRIMITIVES_NV = 0x9539, - GL_MAX_TASK_OUTPUT_COUNT_NV = 0x953A, - GL_MAX_DRAW_MESH_TASKS_COUNT_NV = 0x953D, - GL_MAX_MESH_VIEWS_NV = 0x9557, - GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_NV = 0x92DF, - GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_NV = 0x9543; - - /** Accepted by the {@code pname} parameter of {@link GL30C#glGetIntegeri_v GetIntegeri_v}, {@link GL30C#glGetBooleani_v GetBooleani_v}, {@link GL41C#glGetFloati_v GetFloati_v}, {@link GL41C#glGetDoublei_v GetDoublei_v} and {@link GL32C#glGetInteger64i_v GetInteger64i_v}. */ - public static final int - GL_MAX_MESH_WORK_GROUP_SIZE_NV = 0x953B, - GL_MAX_TASK_WORK_GROUP_SIZE_NV = 0x953C; - - /** Accepted by the {@code pname} parameter of {@link GL20C#glGetProgramiv GetProgramiv}. */ - public static final int - GL_MESH_WORK_GROUP_SIZE_NV = 0x953E, - GL_TASK_WORK_GROUP_SIZE_NV = 0x953F, - GL_MESH_VERTICES_OUT_NV = 0x9579, - GL_MESH_PRIMITIVES_OUT_NV = 0x957A, - GL_MESH_OUTPUT_TYPE_NV = 0x957B; - - /** Accepted by the {@code pname} parameter of {@link GL31C#glGetActiveUniformBlockiv GetActiveUniformBlockiv}. */ - public static final int - GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_NV = 0x959C, - GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_NV = 0x959D; - - /** Accepted by the {@code pname} parameter of {@link GL42C#glGetActiveAtomicCounterBufferiv GetActiveAtomicCounterBufferiv}. */ - public static final int - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_NV = 0x959E, - GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_NV = 0x959F; - - /** Accepted in the {@code props} array of {@link GL43C#glGetProgramResourceiv GetProgramResourceiv}. */ - public static final int - GL_REFERENCED_BY_MESH_SHADER_NV = 0x95A0, - GL_REFERENCED_BY_TASK_SHADER_NV = 0x95A1; - - /** - * Accepted by the {@code programInterface} parameter of {@link GL43C#glGetProgramInterfaceiv GetProgramInterfaceiv}, {@link GL43C#glGetProgramResourceIndex GetProgramResourceIndex}, {@link GL43C#glGetProgramResourceName GetProgramResourceName}, - * {@link GL43C#glGetProgramResourceiv GetProgramResourceiv}, {@link GL43C#glGetProgramResourceLocation GetProgramResourceLocation}, and {@link GL43C#glGetProgramResourceLocationIndex GetProgramResourceLocationIndex}. - */ - public static final int - GL_MESH_SUBROUTINE_NV = 0x957C, - GL_TASK_SUBROUTINE_NV = 0x957D, - GL_MESH_SUBROUTINE_UNIFORM_NV = 0x957E, - GL_TASK_SUBROUTINE_UNIFORM_NV = 0x957F; - - /** Accepted by the {@code stages} parameter of {@link GL41C#glUseProgramStages UseProgramStages}. */ - public static final int - GL_MESH_SHADER_BIT_NV = 0x40, - GL_TASK_SHADER_BIT_NV = 0x80; - - protected NVMeshShader() { - throw new UnsupportedOperationException(); - } - - // --- [ glDrawMeshTasksNV ] --- - - public static native void glDrawMeshTasksNV(@NativeType("GLuint") int first, @NativeType("GLuint") int count); - - // --- [ glDrawMeshTasksIndirectNV ] --- - - public static native void glDrawMeshTasksIndirectNV(@NativeType("GLintptr") long indirect); - - // --- [ glMultiDrawMeshTasksIndirectNV ] --- - - public static native void glMultiDrawMeshTasksIndirectNV(@NativeType("GLintptr") long indirect, @NativeType("GLsizei") int drawcount, @NativeType("GLsizei") int stride); - - // --- [ glMultiDrawMeshTasksIndirectCountNV ] --- - - public static native void glMultiDrawMeshTasksIndirectCountNV(@NativeType("GLintptr") long indirect, @NativeType("GLintptr") long drawcount, @NativeType("GLsizei") int maxdrawcount, @NativeType("GLsizei") int stride); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVMultisampleCoverage.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVMultisampleCoverage.java deleted file mode 100644 index 1be1cc19..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVMultisampleCoverage.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_multisample_coverage extension. - * - *

    The ARB_multisample extension provides a mechanism for antialiasing primitives. This mechanism allows an application to request an additional buffer, - * the multisample buffer, that is added to the framebuffer. An application can request the number of samples per fragment that are stored in the - * multisample buffer. Rendering proceeds by writing color, depth, and stencil values for each sample to the multisample buffer. The results are - * automatically resolved to a single displayable color each time a pixel is updated.

    - * - *

    Coverage Sample Anti-Aliasing (CSAA) is an extension to multisample antialiasing. The technique separates "samples" into two types of samples. "Color - * samples" are samples with color, depth, and stencil information stored in the multisample buffer. "Coverage samples" include both color samples and - * additional samples that only provide pixel coverage information.

    - * - *

    This extension follows the example of the NV_framebuffer_multisample_coverage extension, which adds CSAA support for framebuffer objects. The base - * description of multisample rendering is written in terms of coverage samples and color samples. The windows system notion of "samples" (SAMPLES_ARB) is - * layered on top of coverage and color samples.

    - * - *

    Requires {@link ARBMultisample ARB_multisample}.

    - */ -public final class NVMultisampleCoverage { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int GL_COLOR_SAMPLES_NV = 0x8E20; - - private NVMultisampleCoverage() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVMultisampleFilterHint.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVMultisampleFilterHint.java deleted file mode 100644 index ca703581..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVMultisampleFilterHint.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_multisample_filter_hint extension. - * - *

    OpenGL multisampling typically assumes that the samples of a given pixel are weighted uniformly and averaged to compute the pixel's resolved color. - * This extension provides a hint that permits implementations to provide an alternative method of resolving the color of multisampled pixels.

    - * - *

    As an example of such an alternative method, NVIDIA's GeForce3 GPU provides a technique known as Quincunx filtering. This technique is used in - * two-sample multisampling, but it blends the pixel's two samples and three additional samples from adjacent pixels. The sample pattern is analogous to - * the 5 pattern on a die. The quality of this technique is widely regarded as comparable to 4 sample multisampling.

    - * - *

    Requires {@link ARBMultisample ARB_multisample}.

    - */ -public final class NVMultisampleFilterHint { - - /** Accepted by the {@code target} parameter of Hint and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_MULTISAMPLE_FILTER_HINT_NV = 0x8534; - - private NVMultisampleFilterHint() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVPackedDepthStencil.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVPackedDepthStencil.java deleted file mode 100644 index ab3e4ef4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVPackedDepthStencil.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * This extension provides a new data format, {@link #GL_DEPTH_STENCIL_NV DEPTH_STENCIL_NV}, that can be used with the glDrawPixels, glReadPixels, and glCopyPixels commands, as well - * as a packed data type, {@link #GL_UNSIGNED_INT_24_8_NV UNSIGNED_INT_24_8_NV}, that is meant to be used with GL_DEPTH_STENCIL_NV. No other formats are supported with - * GL_DEPTH_STENCIL_NV. If SGIX_depth_texture is supported, GL_DEPTH_STENCIL_NV/GL_UNSIGNED_INT_24_8_NV data can also be used for - * textures; this provides a more efficient way to supply data for a 24-bit depth texture. - */ -public final class NVPackedDepthStencil { - - /** - * Accepted by the {@code format} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, - * and GetTexImage, and by the {@code type} parameter of CopyPixels. - */ - public static final int GL_DEPTH_STENCIL_NV = 0x84F9; - - /** - * Accepted by the {@code type} parameter of DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and - * GetTexImage. - */ - public static final int GL_UNSIGNED_INT_24_8_NV = 0x84FA; - - private NVPackedDepthStencil() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVPathRendering.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVPathRendering.java deleted file mode 100644 index c11ee975..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVPathRendering.java +++ /dev/null @@ -1,1713 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.opengl.GL11.*; - -/** - * Native bindings to the NV_path_rendering extension. - * - *

    Conventional OpenGL supports rendering images (pixel rectangles and bitmaps) and simple geometric primitives (points, lines, polygons).

    - * - *

    This extension adds a new rendering paradigm, known as path rendering, for rendering filled and stroked paths. Path rendering is not novel but rather a - * standard part of most resolution-independent 2D rendering systems such as Flash, PDF, Silverlight, SVG, Java 2D, Office drawings, TrueType fonts, - * PostScript and its fonts, Quartz 2D, XML Paper Specification (XPS), and OpenVG. What is novel is the ability to mix path rendering with arbitrary - * OpenGL 3D rendering and imaging.

    - * - *

    With this extension, path rendering becomes a first-class rendering mode within the OpenGL graphics system that can be arbitrarily mixed with existing - * OpenGL rendering and can take advantage of OpenGL's existing mechanisms for texturing, programmability, and per-fragment operations.

    - * - *

    Unlike geometric primitive rendering, paths are specified on a 2D (non-projective) plane rather than in 3D (projective) space. Even though the path is - * defined in a 2D plane, every path can be transformed into 3D clip space allowing for 3D view frustum & user-defined clipping, depth offset, and - * depth testing in the same manner as geometric primitive rendering.

    - * - *

    Both geometric primitive rendering and path rendering support rasterization of edges defined by line segments; however, path rendering also allows path - * segments to be specified by Bezier (cubic or quadratic) curves or partial elliptical arcs. This allows path rendering to define truly curved primitive - * boundaries unlike the straight edges of line and polygon primitives. Whereas geometric primitive rendering requires convex polygons for well-defined - * rendering results, path rendering allows (and encourages!) concave and curved outlines to be specified. These paths are even allowed to self-intersect.

    - * - *

    When filling closed paths, the winding of paths (counterclockwise or clockwise) determines whether pixels are inside or outside of the path.

    - * - *

    Paths can also be stroked whereby, conceptually, a fixed-width "brush" is pulled along the path such that the brush remains orthogonal to the gradient - * of each path segment. Samples within the sweep of this brush are considered inside the stroke of the path.

    - * - *

    This extension supports path rendering through a sequence of three operations:

    - * - *
      - *
    1. Path specification is the process of creating and updating a path object consisting of a set of path commands and a corresponding set of 2D - * vertices. - * - *

      Path commands can be specified explicitly from path command and coordinate data, parsed from a string based on standard grammars for representing - * paths, or specified by a particular glyph of standard font representations. Also new paths can be specified by weighting one or more existing paths - * so long as all the weighted paths have consistent command sequences.

      - * - *

      Each path object contains zero or more subpaths specified by a sequence of line segments, partial elliptical arcs, and (cubic or quadratic) Bezier - * curve segments. Each path may contain multiple subpaths that can be closed (forming a contour) or open.

    2. - *
    3. Path stenciling is the process of updating the stencil buffer based on a path's coverage transformed into window space. - * - *

      Path stenciling can determine either the filled or stroked coverage of a path.

      - * - *

      The details of path stenciling are explained within the core of the specification.

      - * - *

      Stenciling a stroked path supports all the standard embellishments for path stroking such as end caps, join styles, miter limits, dashing, and dash - * caps. These stroking properties specified are parameters of path objects.

    4. - *
    5. Path covering is the process of emitting simple (convex & planar) geometry that (conservatively) "covers" the path's sample coverage in the - * stencil buffer. During path covering, stencil testing can be configured to discard fragments not within the actual coverage of the path as - * determined by prior path stenciling. - * - *

      Path covering can cover either the filled or stroked coverage of a path.

      - * - *

      The details of path covering are explained within the core of the specification.

    6. - *
    - * - *

    To render a path object into the color buffer, an application specifies a path object and then uses a two-step rendering process. First, the path - * object is stenciled whereby the path object's stroked or filled coverage is rasterized into the stencil buffer. Second, the path object is covered - * whereby conservative bounding geometry for the path is transformed and rasterized with stencil testing configured to test against the coverage - * information written to the stencil buffer in the first step so that only fragments covered by the path are written during this second step. Also during - * this second step written pixels typically have their stencil value reset (so there's no need for clearing the stencil buffer between rendering each - * path).

    - */ -public class NVPathRendering { - - static { GL.initialize(); } - - /** Accepted in elements of the {@code commands} array parameter of PathCommandsNV and PathSubCommandsNV. */ - public static final byte - GL_CLOSE_PATH_NV = 0x0, - GL_MOVE_TO_NV = 0x2, - GL_RELATIVE_MOVE_TO_NV = 0x3, - GL_LINE_TO_NV = 0x4, - GL_RELATIVE_LINE_TO_NV = 0x5, - GL_HORIZONTAL_LINE_TO_NV = 0x6, - GL_RELATIVE_HORIZONTAL_LINE_TO_NV = 0x7, - GL_VERTICAL_LINE_TO_NV = 0x8, - GL_RELATIVE_VERTICAL_LINE_TO_NV = 0x9, - GL_QUADRATIC_CURVE_TO_NV = 0xA, - GL_RELATIVE_QUADRATIC_CURVE_TO_NV = 0xB, - GL_CUBIC_CURVE_TO_NV = 0xC, - GL_RELATIVE_CUBIC_CURVE_TO_NV = 0xD, - GL_SMOOTH_QUADRATIC_CURVE_TO_NV = 0xE, - GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV = 0xF, - GL_SMOOTH_CUBIC_CURVE_TO_NV = 0x10, - GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV = 0x11, - GL_SMALL_CCW_ARC_TO_NV = 0x12, - GL_RELATIVE_SMALL_CCW_ARC_TO_NV = 0x13, - GL_SMALL_CW_ARC_TO_NV = 0x14, - GL_RELATIVE_SMALL_CW_ARC_TO_NV = 0x15, - GL_LARGE_CCW_ARC_TO_NV = 0x16, - GL_RELATIVE_LARGE_CCW_ARC_TO_NV = 0x17, - GL_LARGE_CW_ARC_TO_NV = 0x18, - GL_RELATIVE_LARGE_CW_ARC_TO_NV = 0x19, - GL_CONIC_CURVE_TO_NV = 0x1A, - GL_RELATIVE_CONIC_CURVE_TO_NV = 0x1B, - GL_ROUNDED_RECT_NV = (byte)0xE8, - GL_RELATIVE_ROUNDED_RECT_NV = (byte)0xE9, - GL_ROUNDED_RECT2_NV = (byte)0xEA, - GL_RELATIVE_ROUNDED_RECT2_NV = (byte)0xEB, - GL_ROUNDED_RECT4_NV = (byte)0xEC, - GL_RELATIVE_ROUNDED_RECT4_NV = (byte)0xED, - GL_ROUNDED_RECT8_NV = (byte)0xEE, - GL_RELATIVE_ROUNDED_RECT8_NV = (byte)0xEF, - GL_RESTART_PATH_NV = (byte)0xF0, - GL_DUP_FIRST_CUBIC_CURVE_TO_NV = (byte)0xF2, - GL_DUP_LAST_CUBIC_CURVE_TO_NV = (byte)0xF4, - GL_RECT_NV = (byte)0xF6, - GL_RELATIVE_RECT_NV = (byte)0xF7, - GL_CIRCULAR_CCW_ARC_TO_NV = (byte)0xF8, - GL_CIRCULAR_CW_ARC_TO_NV = (byte)0xFA, - GL_CIRCULAR_TANGENT_ARC_TO_NV = (byte)0xFC, - GL_ARC_TO_NV = (byte)0xFE, - GL_RELATIVE_ARC_TO_NV = (byte)0xFF; - - /** Accepted by the {@code format} parameter of PathStringNV. */ - public static final int - GL_PATH_FORMAT_SVG_NV = 0x9070, - GL_PATH_FORMAT_PS_NV = 0x9071; - - /** Accepted by the {@code fontTarget} parameter of PathGlyphsNV, PathGlyphRangeNV, and PathGlyphIndexRangeNV. */ - public static final int - GL_STANDARD_FONT_NAME_NV = 0x9072, - GL_SYSTEM_FONT_NAME_NV = 0x9073, - GL_FILE_NAME_NV = 0x9074; - - /** Accepted by the {@code fontTarget} parameter of PathMemoryGlyphIndexArrayNV. */ - public static final int GL_STANDARD_FONT_FORMAT_NV = 0x936C; - - /** Accepted by the {@code handleMissingGlyph} parameter of PathGlyphsNV and PathGlyphRangeNV. */ - public static final int - GL_SKIP_MISSING_GLYPH_NV = 0x90A9, - GL_USE_MISSING_GLYPH_NV = 0x90AA; - - /** Returned by PathGlyphIndexRangeNV. */ - public static final int - GL_FONT_GLYPHS_AVAILABLE_NV = 0x9368, - GL_FONT_TARGET_UNAVAILABLE_NV = 0x9369, - GL_FONT_UNAVAILABLE_NV = 0x936A, - GL_FONT_UNINTELLIGIBLE_NV = 0x936B; - - /** - * Accepted by the {@code pname} parameter of PathParameterfNV, PathParameterfvNV, GetPathParameterfvNV, PathParameteriNV, PathParameterivNV, and - * GetPathParameterivNV. - */ - public static final int - GL_PATH_STROKE_WIDTH_NV = 0x9075, - GL_PATH_INITIAL_END_CAP_NV = 0x9077, - GL_PATH_TERMINAL_END_CAP_NV = 0x9078, - GL_PATH_JOIN_STYLE_NV = 0x9079, - GL_PATH_MITER_LIMIT_NV = 0x907A, - GL_PATH_INITIAL_DASH_CAP_NV = 0x907C, - GL_PATH_TERMINAL_DASH_CAP_NV = 0x907D, - GL_PATH_DASH_OFFSET_NV = 0x907E, - GL_PATH_CLIENT_LENGTH_NV = 0x907F, - GL_PATH_DASH_OFFSET_RESET_NV = 0x90B4, - GL_PATH_FILL_MODE_NV = 0x9080, - GL_PATH_FILL_MASK_NV = 0x9081, - GL_PATH_FILL_COVER_MODE_NV = 0x9082, - GL_PATH_STROKE_COVER_MODE_NV = 0x9083, - GL_PATH_STROKE_MASK_NV = 0x9084, - GL_PATH_STROKE_BOUND_NV = 0x9086; - - /** Accepted by the {@code pname} parameter of PathParameterfNV and PathParameterfvNV. */ - public static final int - GL_PATH_END_CAPS_NV = 0x9076, - GL_PATH_DASH_CAPS_NV = 0x907B; - - /** Accepted by the {@code fillMode} parameter of StencilFillPathNV and StencilFillPathInstancedNV. */ - public static final int - GL_COUNT_UP_NV = 0x9088, - GL_COUNT_DOWN_NV = 0x9089; - - /** Accepted by the {@code color} parameter of PathColorGenNV, GetPathColorGenivNV, and GetPathColorGenfvNV. */ - public static final int - GL_PRIMARY_COLOR_NV = 0x852C, - GL_SECONDARY_COLOR_NV = 0x852D; - - /** Accepted by the {@code genMode} parameter of PathColorGenNV, PathTexGenNV, ProgramPathFragmentInputGenNV. */ - public static final int GL_PATH_OBJECT_BOUNDING_BOX_NV = 0x908A; - - /** Accepted by the {@code coverMode} parameter of CoverFillPathNV and CoverFillPathInstancedNV. */ - public static final int - GL_CONVEX_HULL_NV = 0x908B, - GL_BOUNDING_BOX_NV = 0x908D; - - /** - * Accepted by the {@code transformType} parameter of StencilFillPathInstancedNV, StencilStrokePathInstancedNV, CoverFillPathInstancedNV, and - * CoverStrokePathInstancedNV. - */ - public static final int - GL_TRANSLATE_X_NV = 0x908E, - GL_TRANSLATE_Y_NV = 0x908F, - GL_TRANSLATE_2D_NV = 0x9090, - GL_TRANSLATE_3D_NV = 0x9091, - GL_AFFINE_2D_NV = 0x9092, - GL_AFFINE_3D_NV = 0x9094, - GL_TRANSPOSE_AFFINE_2D_NV = 0x9096, - GL_TRANSPOSE_AFFINE_3D_NV = 0x9098; - - /** - * Accepted by the {@code type} or {@code pathNameType} parameter of StencilFillPathInstancedNV, StencilStrokePathInstancedNV, CoverFillPathInstancedNV, - * CoverStrokePathInstancedNV, GetPathMetricsNV, and GetPathSpacingNV. - */ - public static final int - GL_UTF8_NV = 0x909A, - GL_UTF16_NV = 0x909B; - - /** Accepted by the {@code coverMode} parameter of CoverFillPathInstancedNV. */ - public static final int GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV = 0x909C; - - /** Accepted by the {@code pname} parameter of GetPathParameterfvNV and GetPathParameterivNV. */ - public static final int - GL_PATH_COMMAND_COUNT_NV = 0x909D, - GL_PATH_COORD_COUNT_NV = 0x909E, - GL_PATH_DASH_ARRAY_COUNT_NV = 0x909F, - GL_PATH_COMPUTED_LENGTH_NV = 0x90A0, - GL_PATH_FILL_BOUNDING_BOX_NV = 0x90A1, - GL_PATH_STROKE_BOUNDING_BOX_NV = 0x90A2; - - /** - * Accepted by the {@code value} parameter of PathParameterfNV, PathParameterfvNV, PathParameteriNV, and PathParameterivNV when {@code pname} is one of - * PATH_END_CAPS_NV, PATH_INTIAL_END_CAP_NV, PATH_TERMINAL_END_CAP_NV, PATH_DASH_CAPS_NV, PATH_INITIAL_DASH_CAP_NV, and PATH_TERMINAL_DASH_CAP_NV. - */ - public static final int - GL_SQUARE_NV = 0x90A3, - GL_ROUND_NV = 0x90A4, - GL_TRIANGULAR_NV = 0x90A5; - - /** - * Accepted by the {@code value} parameter of PathParameterfNV, PathParameterfvNV, PathParameteriNV, and PathParameterivNV when {@code pname} is - * PATH_JOIN_STYLE_NV. - */ - public static final int - GL_BEVEL_NV = 0x90A6, - GL_MITER_REVERT_NV = 0x90A7, - GL_MITER_TRUNCATE_NV = 0x90A8; - - /** - * Accepted by the {@code value} parameter of PathParameterfNV, PathParameterfvNV, PathParameteriNV, and PathParameterivNV when {@code pname} is - * PATH_DASH_OFFSET_RESET_NV. - */ - public static final int - GL_MOVE_TO_RESETS_NV = 0x90B5, - GL_MOVE_TO_CONTINUES_NV = 0x90B6; - - /** Accepted by the {@code fontStyle} parameter of PathGlyphsNV, PathGlyphRangeNV, and PathGlyphIndexRangeNV. */ - public static final int - GL_BOLD_BIT_NV = 0x1, - GL_ITALIC_BIT_NV = 0x2; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_PATH_ERROR_POSITION_NV = 0x90AB, - GL_PATH_FOG_GEN_MODE_NV = 0x90AC, - GL_PATH_STENCIL_FUNC_NV = 0x90B7, - GL_PATH_STENCIL_REF_NV = 0x90B8, - GL_PATH_STENCIL_VALUE_MASK_NV = 0x90B9, - GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV = 0x90BD, - GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV = 0x90BE, - GL_PATH_COVER_DEPTH_FUNC_NV = 0x90BF; - - /** Accepted as a bit within the {@code metricQueryMask} parameter of GetPathMetricRangeNV or GetPathMetricsNV. */ - public static final int - GL_GLYPH_WIDTH_BIT_NV = 0x1, - GL_GLYPH_HEIGHT_BIT_NV = 0x2, - GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV = 0x4, - GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV = 0x8, - GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV = 0x10, - GL_GLYPH_VERTICAL_BEARING_X_BIT_NV = 0x20, - GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV = 0x40, - GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV = 0x80, - GL_GLYPH_HAS_KERNING_BIT_NV = 0x100, - GL_FONT_X_MIN_BOUNDS_BIT_NV = 0x10000, - GL_FONT_Y_MIN_BOUNDS_BIT_NV = 0x20000, - GL_FONT_X_MAX_BOUNDS_BIT_NV = 0x40000, - GL_FONT_Y_MAX_BOUNDS_BIT_NV = 0x80000, - GL_FONT_UNITS_PER_EM_BIT_NV = 0x100000, - GL_FONT_ASCENDER_BIT_NV = 0x200000, - GL_FONT_DESCENDER_BIT_NV = 0x400000, - GL_FONT_HEIGHT_BIT_NV = 0x800000, - GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV = 0x1000000, - GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV = 0x2000000, - GL_FONT_UNDERLINE_POSITION_BIT_NV = 0x4000000, - GL_FONT_UNDERLINE_THICKNESS_BIT_NV = 0x8000000, - GL_FONT_HAS_KERNING_BIT_NV = 0x10000000, - GL_FONT_NUM_GLYPH_INDICES_BIT_NV = 0x20000000; - - /** Accepted by the {@code pathListMode} parameter of GetPathSpacingNV. */ - public static final int - GL_ACCUM_ADJACENT_PAIRS_NV = 0x90AD, - GL_ADJACENT_PAIRS_NV = 0x90AE, - GL_FIRST_TO_REST_NV = 0x90AF; - - /** Accepted by the {@code pname} parameter of GetPathColorGenivNV, GetPathColorGenfvNV, GetPathTexGenivNV and GetPathTexGenfvNV. */ - public static final int - GL_PATH_GEN_MODE_NV = 0x90B0, - GL_PATH_GEN_COEFF_NV = 0x90B1; - - /** Accepted by the {@code pname} parameter of GetPathColorGenivNV and GetPathColorGenfvNV. */ - public static final int GL_PATH_GEN_COLOR_FORMAT_NV = 0x90B2; - - /** Accepted by the {@code pname} parameter of GetPathTexGenivNV and GetPathTexGenfvNV. */ - public static final int GL_PATH_GEN_COMPONENTS_NV = 0x90B3; - - /** - * Accepted by the {@code programInterface} parameter of GetProgramInterfaceiv, GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, - * GetProgramResourcefvNV, and GetProgramResourceLocation. - */ - public static final int GL_FRAGMENT_INPUT_NV = 0x936D; - - /** Token values for matrices. */ - public static final int - GL_PATH_PROJECTION_NV = 0x1701, - GL_PATH_MODELVIEW_NV = 0x1700, - GL_PATH_MODELVIEW_STACK_DEPTH_NV = 0xBA3, - GL_PATH_MODELVIEW_MATRIX_NV = 0xBA6, - GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV = 0xD36, - GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV = 0x84E3, - GL_PATH_PROJECTION_STACK_DEPTH_NV = 0xBA4, - GL_PATH_PROJECTION_MATRIX_NV = 0xBA7, - GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV = 0xD38, - GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV = 0x84E4; - - /** The following types are defined as alias to the GL tokens. */ - public static final int - GL_2_BYTES_NV = 0x1407, - GL_3_BYTES_NV = 0x1408, - GL_4_BYTES_NV = 0x1409, - GL_EYE_LINEAR_NV = 0x2400, - GL_OBJECT_LINEAR_NV = 0x2401, - GL_CONSTANT_NV = 0x8576; - - protected NVPathRendering() { - throw new UnsupportedOperationException(); - } - - // --- [ glPathCommandsNV ] --- - - /** Unsafe version of: {@link #glPathCommandsNV PathCommandsNV} */ - public static native void nglPathCommandsNV(int path, int numCommands, long commands, int numCoords, int coordType, long coords); - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathCommandsNV(@NativeType("GLuint") int path, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") ByteBuffer coords) { - nglPathCommandsNV(path, commands.remaining(), memAddress(commands), coords.remaining() >> GLChecks.typeToByteShift(coordType), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathCommandsNV(@NativeType("GLuint") int path, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") ShortBuffer coords) { - nglPathCommandsNV(path, commands.remaining(), memAddress(commands), (int)(((long)coords.remaining() << 1) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathCommandsNV(@NativeType("GLuint") int path, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") FloatBuffer coords) { - nglPathCommandsNV(path, commands.remaining(), memAddress(commands), (int)(((long)coords.remaining() << 2) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - // --- [ glPathCoordsNV ] --- - - /** Unsafe version of: {@link #glPathCoordsNV PathCoordsNV} */ - public static native void nglPathCoordsNV(int path, int numCoords, int coordType, long coords); - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathCoordsNV(@NativeType("GLuint") int path, @NativeType("GLenum") int coordType, @NativeType("void const *") ByteBuffer coords) { - nglPathCoordsNV(path, coords.remaining() >> GLChecks.typeToByteShift(coordType), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathCoordsNV(@NativeType("GLuint") int path, @NativeType("GLenum") int coordType, @NativeType("void const *") ShortBuffer coords) { - nglPathCoordsNV(path, (int)(((long)coords.remaining() << 1) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathCoordsNV(@NativeType("GLuint") int path, @NativeType("GLenum") int coordType, @NativeType("void const *") FloatBuffer coords) { - nglPathCoordsNV(path, (int)(((long)coords.remaining() << 2) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - // --- [ glPathSubCommandsNV ] --- - - /** Unsafe version of: {@link #glPathSubCommandsNV PathSubCommandsNV} */ - public static native void nglPathSubCommandsNV(int path, int commandStart, int commandsToDelete, int numCommands, long commands, int numCoords, int coordType, long coords); - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathSubCommandsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int commandStart, @NativeType("GLsizei") int commandsToDelete, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") ByteBuffer coords) { - nglPathSubCommandsNV(path, commandStart, commandsToDelete, commands.remaining(), memAddress(commands), coords.remaining() >> GLChecks.typeToByteShift(coordType), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathSubCommandsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int commandStart, @NativeType("GLsizei") int commandsToDelete, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") ShortBuffer coords) { - nglPathSubCommandsNV(path, commandStart, commandsToDelete, commands.remaining(), memAddress(commands), (int)(((long)coords.remaining() << 1) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathSubCommandsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int commandStart, @NativeType("GLsizei") int commandsToDelete, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") FloatBuffer coords) { - nglPathSubCommandsNV(path, commandStart, commandsToDelete, commands.remaining(), memAddress(commands), (int)(((long)coords.remaining() << 2) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - // --- [ glPathSubCoordsNV ] --- - - /** Unsafe version of: {@link #glPathSubCoordsNV PathSubCoordsNV} */ - public static native void nglPathSubCoordsNV(int path, int coordStart, int numCoords, int coordType, long coords); - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathSubCoordsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int coordStart, @NativeType("GLenum") int coordType, @NativeType("void const *") ByteBuffer coords) { - nglPathSubCoordsNV(path, coordStart, coords.remaining() >> GLChecks.typeToByteShift(coordType), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathSubCoordsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int coordStart, @NativeType("GLenum") int coordType, @NativeType("void const *") ShortBuffer coords) { - nglPathSubCoordsNV(path, coordStart, (int)(((long)coords.remaining() << 1) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - /** @param coordType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_FLOAT FLOAT}
    */ - public static void glPathSubCoordsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int coordStart, @NativeType("GLenum") int coordType, @NativeType("void const *") FloatBuffer coords) { - nglPathSubCoordsNV(path, coordStart, (int)(((long)coords.remaining() << 2) >> GLChecks.typeToByteShift(coordType)), coordType, memAddress(coords)); - } - - // --- [ glPathStringNV ] --- - - /** Unsafe version of: {@link #glPathStringNV PathStringNV} */ - public static native void nglPathStringNV(int path, int format, int length, long pathString); - - /** @param format one of:
    {@link #GL_PATH_FORMAT_SVG_NV PATH_FORMAT_SVG_NV}{@link #GL_PATH_FORMAT_PS_NV PATH_FORMAT_PS_NV}
    */ - public static void glPathStringNV(@NativeType("GLuint") int path, @NativeType("GLenum") int format, @NativeType("void const *") ByteBuffer pathString) { - nglPathStringNV(path, format, pathString.remaining(), memAddress(pathString)); - } - - // --- [ glPathGlyphsNV ] --- - - /** Unsafe version of: {@link #glPathGlyphsNV PathGlyphsNV} */ - public static native void nglPathGlyphsNV(int firstPathName, int fontTarget, long fontName, int fontStyle, int numGlyphs, int type, long charcodes, int handleMissingGlyphs, int pathParameterTemplate, float emScale); - - /** - * @param fontTarget one of:
    {@link #GL_STANDARD_FONT_NAME_NV STANDARD_FONT_NAME_NV}{@link #GL_SYSTEM_FONT_NAME_NV SYSTEM_FONT_NAME_NV}{@link #GL_FILE_NAME_NV FILE_NAME_NV}
    - * @param fontStyle one or more of:
    {@link #GL_BOLD_BIT_NV BOLD_BIT_NV}{@link #GL_ITALIC_BIT_NV ITALIC_BIT_NV}
    - * @param type one of:
    {@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}{@link #GL_3_BYTES_NV 3_BYTES_NV}
    {@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param handleMissingGlyphs one of:
    {@link #GL_SKIP_MISSING_GLYPH_NV SKIP_MISSING_GLYPH_NV}{@link #GL_USE_MISSING_GLYPH_NV USE_MISSING_GLYPH_NV}
    - */ - public static void glPathGlyphsNV(@NativeType("GLuint") int firstPathName, @NativeType("GLenum") int fontTarget, @NativeType("void const *") ByteBuffer fontName, @NativeType("GLbitfield") int fontStyle, @NativeType("GLenum") int type, @NativeType("void const *") ByteBuffer charcodes, @NativeType("GLenum") int handleMissingGlyphs, @NativeType("GLuint") int pathParameterTemplate, @NativeType("GLfloat") float emScale) { - if (CHECKS) { - checkNT1(fontName); - } - nglPathGlyphsNV(firstPathName, fontTarget, memAddress(fontName), fontStyle, charcodes.remaining() / charcodeTypeToBytes(type), type, memAddress(charcodes), handleMissingGlyphs, pathParameterTemplate, emScale); - } - - // --- [ glPathGlyphRangeNV ] --- - - /** Unsafe version of: {@link #glPathGlyphRangeNV PathGlyphRangeNV} */ - public static native void nglPathGlyphRangeNV(int firstPathName, int fontTarget, long fontName, int fontStyle, int firstGlyph, int numGlyphs, int handleMissingGlyphs, int pathParameterTemplate, float emScale); - - /** - * @param fontTarget one of:
    {@link #GL_STANDARD_FONT_NAME_NV STANDARD_FONT_NAME_NV}{@link #GL_SYSTEM_FONT_NAME_NV SYSTEM_FONT_NAME_NV}{@link #GL_FILE_NAME_NV FILE_NAME_NV}
    - * @param fontStyle one or more of:
    {@link #GL_BOLD_BIT_NV BOLD_BIT_NV}{@link #GL_ITALIC_BIT_NV ITALIC_BIT_NV}
    - * @param handleMissingGlyphs one of:
    {@link #GL_SKIP_MISSING_GLYPH_NV SKIP_MISSING_GLYPH_NV}{@link #GL_USE_MISSING_GLYPH_NV USE_MISSING_GLYPH_NV}
    - */ - public static void glPathGlyphRangeNV(@NativeType("GLuint") int firstPathName, @NativeType("GLenum") int fontTarget, @NativeType("void const *") ByteBuffer fontName, @NativeType("GLbitfield") int fontStyle, @NativeType("GLuint") int firstGlyph, @NativeType("GLsizei") int numGlyphs, @NativeType("GLenum") int handleMissingGlyphs, @NativeType("GLuint") int pathParameterTemplate, @NativeType("GLfloat") float emScale) { - if (CHECKS) { - checkNT1(fontName); - } - nglPathGlyphRangeNV(firstPathName, fontTarget, memAddress(fontName), fontStyle, firstGlyph, numGlyphs, handleMissingGlyphs, pathParameterTemplate, emScale); - } - - // --- [ glPathGlyphIndexArrayNV ] --- - - /** Unsafe version of: {@link #glPathGlyphIndexArrayNV PathGlyphIndexArrayNV} */ - public static native int nglPathGlyphIndexArrayNV(int firstPathName, int fontTarget, long fontName, int fontStyle, int firstGlyphIndex, int numGlyphs, int pathParameterTemplate, float emScale); - - /** - * @param fontTarget one of:
    {@link #GL_STANDARD_FONT_NAME_NV STANDARD_FONT_NAME_NV}{@link #GL_SYSTEM_FONT_NAME_NV SYSTEM_FONT_NAME_NV}{@link #GL_FILE_NAME_NV FILE_NAME_NV}
    - * @param fontStyle one or more of:
    {@link #GL_BOLD_BIT_NV BOLD_BIT_NV}{@link #GL_ITALIC_BIT_NV ITALIC_BIT_NV}
    - */ - @NativeType("GLenum") - public static int glPathGlyphIndexArrayNV(@NativeType("GLuint") int firstPathName, @NativeType("GLenum") int fontTarget, @NativeType("void const *") ByteBuffer fontName, @NativeType("GLbitfield") int fontStyle, @NativeType("GLuint") int firstGlyphIndex, @NativeType("GLsizei") int numGlyphs, @NativeType("GLuint") int pathParameterTemplate, @NativeType("GLfloat") float emScale) { - if (CHECKS) { - checkNT1(fontName); - } - return nglPathGlyphIndexArrayNV(firstPathName, fontTarget, memAddress(fontName), fontStyle, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); - } - - // --- [ glPathMemoryGlyphIndexArrayNV ] --- - - /** Unsafe version of: {@link #glPathMemoryGlyphIndexArrayNV PathMemoryGlyphIndexArrayNV} */ - public static native int nglPathMemoryGlyphIndexArrayNV(int firstPathName, int fontTarget, long fontSize, long fontData, int faceIndex, int firstGlyphIndex, int numGlyphs, int pathParameterTemplate, float emScale); - - /** @param fontTarget one of:
    {@link #GL_STANDARD_FONT_NAME_NV STANDARD_FONT_NAME_NV}{@link #GL_SYSTEM_FONT_NAME_NV SYSTEM_FONT_NAME_NV}{@link #GL_FILE_NAME_NV FILE_NAME_NV}
    */ - @NativeType("GLenum") - public static int glPathMemoryGlyphIndexArrayNV(@NativeType("GLuint") int firstPathName, @NativeType("GLenum") int fontTarget, @NativeType("void const *") ByteBuffer fontData, @NativeType("GLsizei") int faceIndex, @NativeType("GLuint") int firstGlyphIndex, @NativeType("GLsizei") int numGlyphs, @NativeType("GLuint") int pathParameterTemplate, @NativeType("GLfloat") float emScale) { - return nglPathMemoryGlyphIndexArrayNV(firstPathName, fontTarget, fontData.remaining(), memAddress(fontData), faceIndex, firstGlyphIndex, numGlyphs, pathParameterTemplate, emScale); - } - - // --- [ glCopyPathNV ] --- - - public static native void glCopyPathNV(@NativeType("GLuint") int resultPath, @NativeType("GLuint") int srcPath); - - // --- [ glWeightPathsNV ] --- - - public static native void nglWeightPathsNV(int resultPath, int numPaths, long paths, long weights); - - public static void glWeightPathsNV(@NativeType("GLuint") int resultPath, @NativeType("GLuint const *") IntBuffer paths, @NativeType("GLfloat const *") FloatBuffer weights) { - if (CHECKS) { - check(weights, paths.remaining()); - } - nglWeightPathsNV(resultPath, paths.remaining(), memAddress(paths), memAddress(weights)); - } - - // --- [ glInterpolatePathsNV ] --- - - public static native void glInterpolatePathsNV(@NativeType("GLuint") int resultPath, @NativeType("GLuint") int pathA, @NativeType("GLuint") int pathB, @NativeType("GLfloat") float weight); - - // --- [ glTransformPathNV ] --- - - /** Unsafe version of: {@link #glTransformPathNV TransformPathNV} */ - public static native void nglTransformPathNV(int resultPath, int srcPath, int transformType, long transformValues); - - /** @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_Y_NV TRANSLATE_Y_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}{@link #GL_TRANSLATE_3D_NV TRANSLATE_3D_NV}{@link #GL_AFFINE_2D_NV AFFINE_2D_NV}
    {@link #GL_AFFINE_3D_NV AFFINE_3D_NV}{@link #GL_TRANSPOSE_AFFINE_2D_NV TRANSPOSE_AFFINE_2D_NV}{@link #GL_TRANSPOSE_AFFINE_3D_NV TRANSPOSE_AFFINE_3D_NV}
    */ - public static void glTransformPathNV(@NativeType("GLuint") int resultPath, @NativeType("GLuint") int srcPath, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") FloatBuffer transformValues) { - if (CHECKS) { - check(transformValues, transformTypeToElements(transformType)); - } - nglTransformPathNV(resultPath, srcPath, transformType, memAddress(transformValues)); - } - - // --- [ glPathParameterivNV ] --- - - /** Unsafe version of: {@link #glPathParameterivNV PathParameterivNV} */ - public static native void nglPathParameterivNV(int path, int pname, long value); - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}
    */ - public static void glPathParameterivNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglPathParameterivNV(path, pname, memAddress(value)); - } - - // --- [ glPathParameteriNV ] --- - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}
    */ - public static native void glPathParameteriNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLint") int value); - - // --- [ glPathParameterfvNV ] --- - - /** Unsafe version of: {@link #glPathParameterfvNV PathParameterfvNV} */ - public static native void nglPathParameterfvNV(int path, int pname, long value); - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}{@link #GL_PATH_END_CAPS_NV PATH_END_CAPS_NV}{@link #GL_PATH_DASH_CAPS_NV PATH_DASH_CAPS_NV}
    */ - public static void glPathParameterfvNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglPathParameterfvNV(path, pname, memAddress(value)); - } - - // --- [ glPathParameterfNV ] --- - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}{@link #GL_PATH_END_CAPS_NV PATH_END_CAPS_NV}{@link #GL_PATH_DASH_CAPS_NV PATH_DASH_CAPS_NV}
    */ - public static native void glPathParameterfNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLfloat") float value); - - // --- [ glPathDashArrayNV ] --- - - public static native void nglPathDashArrayNV(int path, int dashCount, long dashArray); - - public static void glPathDashArrayNV(@NativeType("GLuint") int path, @NativeType("GLfloat const *") FloatBuffer dashArray) { - nglPathDashArrayNV(path, dashArray.remaining(), memAddress(dashArray)); - } - - // --- [ glGenPathsNV ] --- - - @NativeType("GLuint") - public static native int glGenPathsNV(@NativeType("GLsizei") int range); - - // --- [ glDeletePathsNV ] --- - - public static native void glDeletePathsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int range); - - // --- [ glIsPathNV ] --- - - @NativeType("GLboolean") - public static native boolean glIsPathNV(@NativeType("GLuint") int path); - - // --- [ glPathStencilFuncNV ] --- - - public static native void glPathStencilFuncNV(@NativeType("GLenum") int func, @NativeType("GLint") int ref, @NativeType("GLuint") int mask); - - // --- [ glPathStencilDepthOffsetNV ] --- - - public static native void glPathStencilDepthOffsetNV(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units); - - // --- [ glStencilFillPathNV ] --- - - /** @param fillMode one of:
    {@link GL11#GL_INVERT INVERT}{@link #GL_COUNT_UP_NV COUNT_UP_NV}{@link #GL_COUNT_DOWN_NV COUNT_DOWN_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}
    */ - public static native void glStencilFillPathNV(@NativeType("GLuint") int path, @NativeType("GLenum") int fillMode, @NativeType("GLuint") int mask); - - // --- [ glStencilStrokePathNV ] --- - - public static native void glStencilStrokePathNV(@NativeType("GLuint") int path, @NativeType("GLint") int reference, @NativeType("GLuint") int mask); - - // --- [ glStencilFillPathInstancedNV ] --- - - /** Unsafe version of: {@link #glStencilFillPathInstancedNV StencilFillPathInstancedNV} */ - public static native void nglStencilFillPathInstancedNV(int numPaths, int pathNameType, long paths, int pathBase, int fillMode, int mask, int transformType, long transformValues); - - /** - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param fillMode one of:
    {@link GL11#GL_INVERT INVERT}{@link #GL_COUNT_UP_NV COUNT_UP_NV}{@link #GL_COUNT_DOWN_NV COUNT_DOWN_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}
    - * @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_Y_NV TRANSLATE_Y_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}{@link #GL_TRANSLATE_3D_NV TRANSLATE_3D_NV}{@link #GL_AFFINE_2D_NV AFFINE_2D_NV}
    {@link #GL_AFFINE_3D_NV AFFINE_3D_NV}{@link #GL_TRANSPOSE_AFFINE_2D_NV TRANSPOSE_AFFINE_2D_NV}{@link #GL_TRANSPOSE_AFFINE_3D_NV TRANSPOSE_AFFINE_3D_NV}
    - */ - public static void glStencilFillPathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int fillMode, @NativeType("GLuint") int mask, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") FloatBuffer transformValues) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - nglStencilFillPathInstancedNV(numPaths, pathNameType, memAddress(paths), pathBase, fillMode, mask, transformType, memAddress(transformValues)); - } - - // --- [ glStencilStrokePathInstancedNV ] --- - - /** Unsafe version of: {@link #glStencilStrokePathInstancedNV StencilStrokePathInstancedNV} */ - public static native void nglStencilStrokePathInstancedNV(int numPaths, int pathNameType, long paths, int pathBase, int reference, int mask, int transformType, long transformValues); - - /** - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_Y_NV TRANSLATE_Y_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}{@link #GL_TRANSLATE_3D_NV TRANSLATE_3D_NV}{@link #GL_AFFINE_2D_NV AFFINE_2D_NV}
    {@link #GL_AFFINE_3D_NV AFFINE_3D_NV}{@link #GL_TRANSPOSE_AFFINE_2D_NV TRANSPOSE_AFFINE_2D_NV}{@link #GL_TRANSPOSE_AFFINE_3D_NV TRANSPOSE_AFFINE_3D_NV}
    - */ - public static void glStencilStrokePathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLint") int reference, @NativeType("GLuint") int mask, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") FloatBuffer transformValues) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - nglStencilStrokePathInstancedNV(numPaths, pathNameType, memAddress(paths), pathBase, reference, mask, transformType, memAddress(transformValues)); - } - - // --- [ glPathCoverDepthFuncNV ] --- - - public static native void glPathCoverDepthFuncNV(@NativeType("GLenum") int zfunc); - - // --- [ glPathColorGenNV ] --- - - /** Unsafe version of: {@link #glPathColorGenNV PathColorGenNV} */ - public static native void nglPathColorGenNV(int color, int genMode, int colorFormat, long coeffs); - - /** - * @param color one of:
    {@link GL13#GL_PRIMARY_COLOR PRIMARY_COLOR}{@link #GL_PRIMARY_COLOR_NV PRIMARY_COLOR_NV}{@link #GL_SECONDARY_COLOR_NV SECONDARY_COLOR_NV}
    - * @param genMode one of:
    {@link GL11#GL_NONE NONE}{@link #GL_OBJECT_LINEAR_NV OBJECT_LINEAR_NV}{@link #GL_PATH_OBJECT_BOUNDING_BOX_NV PATH_OBJECT_BOUNDING_BOX_NV}{@link #GL_EYE_LINEAR_NV EYE_LINEAR_NV}{@link #GL_CONSTANT_NV CONSTANT_NV}
    - * @param colorFormat {@link GL11#GL_LUMINANCE LUMINANCE} {@link GL11#GL_ALPHA ALPHA} {@link GL11#GL_INTENSITY INTENSITY} {@link GL11#GL_LUMINANCE_ALPHA LUMINANCE_ALPHA} {@link GL11#GL_RGB RGB} {@link GL11#GL_RGBA RGBA} - */ - public static void glPathColorGenNV(@NativeType("GLenum") int color, @NativeType("GLenum") int genMode, @NativeType("GLenum") int colorFormat, @NativeType("GLfloat const *") FloatBuffer coeffs) { - if (CHECKS) { - check(coeffs, genModeToElements(genMode) * colorFormatToComponents(colorFormat)); - } - nglPathColorGenNV(color, genMode, colorFormat, memAddress(coeffs)); - } - - // --- [ glPathTexGenNV ] --- - - public static native void nglPathTexGenNV(int texCoordSet, int genMode, int components, long coeffs); - - public static void glPathTexGenNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int genMode, @NativeType("GLint") int components, @NativeType("GLfloat const *") FloatBuffer coeffs) { - if (CHECKS) { - check(coeffs, genModeToElements(genMode) * components); - } - nglPathTexGenNV(texCoordSet, genMode, components, memAddress(coeffs)); - } - - // --- [ glPathFogGenNV ] --- - - public static native void glPathFogGenNV(@NativeType("GLenum") int genMode); - - // --- [ glCoverFillPathNV ] --- - - /** @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}
    */ - public static native void glCoverFillPathNV(@NativeType("GLuint") int path, @NativeType("GLenum") int coverMode); - - // --- [ glCoverStrokePathNV ] --- - - /** @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}
    */ - public static native void glCoverStrokePathNV(@NativeType("GLuint") int path, @NativeType("GLenum") int coverMode); - - // --- [ glCoverFillPathInstancedNV ] --- - - /** Unsafe version of: {@link #glCoverFillPathInstancedNV CoverFillPathInstancedNV} */ - public static native void nglCoverFillPathInstancedNV(int numPaths, int pathNameType, long paths, int pathBase, int coverMode, int transformType, long transformValues); - - /** - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}{@link #GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV BOUNDING_BOX_OF_BOUNDING_BOXES_NV}
    - * @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_Y_NV TRANSLATE_Y_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}{@link #GL_TRANSLATE_3D_NV TRANSLATE_3D_NV}{@link #GL_AFFINE_2D_NV AFFINE_2D_NV}
    {@link #GL_AFFINE_3D_NV AFFINE_3D_NV}{@link #GL_TRANSPOSE_AFFINE_2D_NV TRANSPOSE_AFFINE_2D_NV}{@link #GL_TRANSPOSE_AFFINE_3D_NV TRANSPOSE_AFFINE_3D_NV}
    - */ - public static void glCoverFillPathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") FloatBuffer transformValues) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - nglCoverFillPathInstancedNV(numPaths, pathNameType, memAddress(paths), pathBase, coverMode, transformType, memAddress(transformValues)); - } - - // --- [ glCoverStrokePathInstancedNV ] --- - - /** Unsafe version of: {@link #glCoverStrokePathInstancedNV CoverStrokePathInstancedNV} */ - public static native void nglCoverStrokePathInstancedNV(int numPaths, int pathNameType, long paths, int pathBase, int coverMode, int transformType, long transformValues); - - /** - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}{@link #GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV BOUNDING_BOX_OF_BOUNDING_BOXES_NV}
    - * @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_Y_NV TRANSLATE_Y_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}{@link #GL_TRANSLATE_3D_NV TRANSLATE_3D_NV}{@link #GL_AFFINE_2D_NV AFFINE_2D_NV}
    {@link #GL_AFFINE_3D_NV AFFINE_3D_NV}{@link #GL_TRANSPOSE_AFFINE_2D_NV TRANSPOSE_AFFINE_2D_NV}{@link #GL_TRANSPOSE_AFFINE_3D_NV TRANSPOSE_AFFINE_3D_NV}
    - */ - public static void glCoverStrokePathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") FloatBuffer transformValues) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - nglCoverStrokePathInstancedNV(numPaths, pathNameType, memAddress(paths), pathBase, coverMode, transformType, memAddress(transformValues)); - } - - // --- [ glStencilThenCoverFillPathNV ] --- - - /** - * @param fillMode one of:
    {@link GL11#GL_INVERT INVERT}{@link #GL_COUNT_UP_NV COUNT_UP_NV}{@link #GL_COUNT_DOWN_NV COUNT_DOWN_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}
    - * @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}
    - */ - public static native void glStencilThenCoverFillPathNV(@NativeType("GLuint") int path, @NativeType("GLenum") int fillMode, @NativeType("GLuint") int mask, @NativeType("GLenum") int coverMode); - - // --- [ glStencilThenCoverStrokePathNV ] --- - - /** @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}
    */ - public static native void glStencilThenCoverStrokePathNV(@NativeType("GLuint") int path, @NativeType("GLint") int reference, @NativeType("GLuint") int mask, @NativeType("GLenum") int coverMode); - - // --- [ glStencilThenCoverFillPathInstancedNV ] --- - - /** Unsafe version of: {@link #glStencilThenCoverFillPathInstancedNV StencilThenCoverFillPathInstancedNV} */ - public static native void nglStencilThenCoverFillPathInstancedNV(int numPaths, int pathNameType, long paths, int pathBase, int fillMode, int mask, int coverMode, int transformType, long transformValues); - - /** - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param fillMode one of:
    {@link GL11#GL_INVERT INVERT}{@link #GL_COUNT_UP_NV COUNT_UP_NV}{@link #GL_COUNT_DOWN_NV COUNT_DOWN_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}
    - * @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}{@link #GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV BOUNDING_BOX_OF_BOUNDING_BOXES_NV}
    - * @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_Y_NV TRANSLATE_Y_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}{@link #GL_TRANSLATE_3D_NV TRANSLATE_3D_NV}{@link #GL_AFFINE_2D_NV AFFINE_2D_NV}
    {@link #GL_AFFINE_3D_NV AFFINE_3D_NV}{@link #GL_TRANSPOSE_AFFINE_2D_NV TRANSPOSE_AFFINE_2D_NV}{@link #GL_TRANSPOSE_AFFINE_3D_NV TRANSPOSE_AFFINE_3D_NV}
    - */ - public static void glStencilThenCoverFillPathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int fillMode, @NativeType("GLuint") int mask, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") FloatBuffer transformValues) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - nglStencilThenCoverFillPathInstancedNV(numPaths, pathNameType, memAddress(paths), pathBase, fillMode, mask, coverMode, transformType, memAddress(transformValues)); - } - - // --- [ glStencilThenCoverStrokePathInstancedNV ] --- - - /** Unsafe version of: {@link #glStencilThenCoverStrokePathInstancedNV StencilThenCoverStrokePathInstancedNV} */ - public static native void nglStencilThenCoverStrokePathInstancedNV(int numPaths, int pathNameType, long paths, int pathBase, int reference, int mask, int coverMode, int transformType, long transformValues); - - /** - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param coverMode one of:
    {@link #GL_CONVEX_HULL_NV CONVEX_HULL_NV}{@link #GL_BOUNDING_BOX_NV BOUNDING_BOX_NV}{@link #GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV BOUNDING_BOX_OF_BOUNDING_BOXES_NV}
    - * @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_Y_NV TRANSLATE_Y_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}{@link #GL_TRANSLATE_3D_NV TRANSLATE_3D_NV}{@link #GL_AFFINE_2D_NV AFFINE_2D_NV}
    {@link #GL_AFFINE_3D_NV AFFINE_3D_NV}{@link #GL_TRANSPOSE_AFFINE_2D_NV TRANSPOSE_AFFINE_2D_NV}{@link #GL_TRANSPOSE_AFFINE_3D_NV TRANSPOSE_AFFINE_3D_NV}
    - */ - public static void glStencilThenCoverStrokePathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLint") int reference, @NativeType("GLuint") int mask, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") FloatBuffer transformValues) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - nglStencilThenCoverStrokePathInstancedNV(numPaths, pathNameType, memAddress(paths), pathBase, reference, mask, coverMode, transformType, memAddress(transformValues)); - } - - // --- [ glPathGlyphIndexRangeNV ] --- - - /** Unsafe version of: {@link #glPathGlyphIndexRangeNV PathGlyphIndexRangeNV} */ - public static native int nglPathGlyphIndexRangeNV(int fontTarget, long fontName, int fontStyle, int pathParameterTemplate, float emScale, long baseAndCount); - - /** - * @param fontTarget one of:
    {@link #GL_STANDARD_FONT_NAME_NV STANDARD_FONT_NAME_NV}{@link #GL_SYSTEM_FONT_NAME_NV SYSTEM_FONT_NAME_NV}{@link #GL_FILE_NAME_NV FILE_NAME_NV}
    - * @param fontStyle one or more of:
    {@link #GL_BOLD_BIT_NV BOLD_BIT_NV}{@link #GL_ITALIC_BIT_NV ITALIC_BIT_NV}
    - */ - @NativeType("GLenum") - public static int glPathGlyphIndexRangeNV(@NativeType("GLenum") int fontTarget, @NativeType("void const *") ByteBuffer fontName, @NativeType("GLbitfield") int fontStyle, @NativeType("GLuint") int pathParameterTemplate, @NativeType("GLfloat") float emScale, @NativeType("GLuint *") IntBuffer baseAndCount) { - if (CHECKS) { - checkNT1(fontName); - check(baseAndCount, 2); - } - return nglPathGlyphIndexRangeNV(fontTarget, memAddress(fontName), fontStyle, pathParameterTemplate, emScale, memAddress(baseAndCount)); - } - - // --- [ glProgramPathFragmentInputGenNV ] --- - - public static native void nglProgramPathFragmentInputGenNV(int program, int location, int genMode, int components, long coeffs); - - public static void glProgramPathFragmentInputGenNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLenum") int genMode, @NativeType("GLint") int components, @NativeType("GLfloat const *") FloatBuffer coeffs) { - if (CHECKS) { - check(coeffs, genModeToElements(genMode) * components); - } - nglProgramPathFragmentInputGenNV(program, location, genMode, components, memAddress(coeffs)); - } - - // --- [ glGetPathParameterivNV ] --- - - /** Unsafe version of: {@link #glGetPathParameterivNV GetPathParameterivNV} */ - public static native void nglGetPathParameterivNV(int path, int pname, long value); - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}{@link #GL_PATH_COMMAND_COUNT_NV PATH_COMMAND_COUNT_NV}{@link #GL_PATH_COORD_COUNT_NV PATH_COORD_COUNT_NV}
    {@link #GL_PATH_DASH_ARRAY_COUNT_NV PATH_DASH_ARRAY_COUNT_NV}{@link #GL_PATH_COMPUTED_LENGTH_NV PATH_COMPUTED_LENGTH_NV}{@link #GL_PATH_FILL_BOUNDING_BOX_NV PATH_FILL_BOUNDING_BOX_NV}
    {@link #GL_PATH_STROKE_BOUNDING_BOX_NV PATH_STROKE_BOUNDING_BOX_NV}
    */ - public static void glGetPathParameterivNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglGetPathParameterivNV(path, pname, memAddress(value)); - } - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}{@link #GL_PATH_COMMAND_COUNT_NV PATH_COMMAND_COUNT_NV}{@link #GL_PATH_COORD_COUNT_NV PATH_COORD_COUNT_NV}
    {@link #GL_PATH_DASH_ARRAY_COUNT_NV PATH_DASH_ARRAY_COUNT_NV}{@link #GL_PATH_COMPUTED_LENGTH_NV PATH_COMPUTED_LENGTH_NV}{@link #GL_PATH_FILL_BOUNDING_BOX_NV PATH_FILL_BOUNDING_BOX_NV}
    {@link #GL_PATH_STROKE_BOUNDING_BOX_NV PATH_STROKE_BOUNDING_BOX_NV}
    */ - @NativeType("void") - public static int glGetPathParameteriNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nglGetPathParameterivNV(path, pname, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPathParameterfvNV ] --- - - /** Unsafe version of: {@link #glGetPathParameterfvNV GetPathParameterfvNV} */ - public static native void nglGetPathParameterfvNV(int path, int pname, long value); - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}{@link #GL_PATH_COMMAND_COUNT_NV PATH_COMMAND_COUNT_NV}{@link #GL_PATH_COORD_COUNT_NV PATH_COORD_COUNT_NV}
    {@link #GL_PATH_DASH_ARRAY_COUNT_NV PATH_DASH_ARRAY_COUNT_NV}{@link #GL_PATH_COMPUTED_LENGTH_NV PATH_COMPUTED_LENGTH_NV}{@link #GL_PATH_FILL_BOUNDING_BOX_NV PATH_FILL_BOUNDING_BOX_NV}
    {@link #GL_PATH_STROKE_BOUNDING_BOX_NV PATH_STROKE_BOUNDING_BOX_NV}
    */ - public static void glGetPathParameterfvNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglGetPathParameterfvNV(path, pname, memAddress(value)); - } - - /** @param pname one of:
    {@link #GL_PATH_STROKE_WIDTH_NV PATH_STROKE_WIDTH_NV}{@link #GL_PATH_INITIAL_END_CAP_NV PATH_INITIAL_END_CAP_NV}{@link #GL_PATH_TERMINAL_END_CAP_NV PATH_TERMINAL_END_CAP_NV}
    {@link #GL_PATH_JOIN_STYLE_NV PATH_JOIN_STYLE_NV}{@link #GL_PATH_MITER_LIMIT_NV PATH_MITER_LIMIT_NV}{@link #GL_PATH_INITIAL_DASH_CAP_NV PATH_INITIAL_DASH_CAP_NV}
    {@link #GL_PATH_TERMINAL_DASH_CAP_NV PATH_TERMINAL_DASH_CAP_NV}{@link #GL_PATH_DASH_OFFSET_NV PATH_DASH_OFFSET_NV}{@link #GL_PATH_CLIENT_LENGTH_NV PATH_CLIENT_LENGTH_NV}
    {@link #GL_PATH_DASH_OFFSET_RESET_NV PATH_DASH_OFFSET_RESET_NV}{@link #GL_PATH_FILL_MODE_NV PATH_FILL_MODE_NV}{@link #GL_PATH_FILL_MASK_NV PATH_FILL_MASK_NV}
    {@link #GL_PATH_FILL_COVER_MODE_NV PATH_FILL_COVER_MODE_NV}{@link #GL_PATH_STROKE_COVER_MODE_NV PATH_STROKE_COVER_MODE_NV}{@link #GL_PATH_STROKE_MASK_NV PATH_STROKE_MASK_NV}
    {@link #GL_PATH_STROKE_BOUND_NV PATH_STROKE_BOUND_NV}{@link #GL_PATH_COMMAND_COUNT_NV PATH_COMMAND_COUNT_NV}{@link #GL_PATH_COORD_COUNT_NV PATH_COORD_COUNT_NV}
    {@link #GL_PATH_DASH_ARRAY_COUNT_NV PATH_DASH_ARRAY_COUNT_NV}{@link #GL_PATH_COMPUTED_LENGTH_NV PATH_COMPUTED_LENGTH_NV}{@link #GL_PATH_FILL_BOUNDING_BOX_NV PATH_FILL_BOUNDING_BOX_NV}
    {@link #GL_PATH_STROKE_BOUNDING_BOX_NV PATH_STROKE_BOUNDING_BOX_NV}
    */ - @NativeType("void") - public static float glGetPathParameterfNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nglGetPathParameterfvNV(path, pname, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPathCommandsNV ] --- - - public static native void nglGetPathCommandsNV(int path, long commands); - - public static void glGetPathCommandsNV(@NativeType("GLuint") int path, @NativeType("GLubyte *") ByteBuffer commands) { - if (CHECKS) { - if (DEBUG) { - check(commands, glGetPathParameteriNV(path, GL_PATH_COMMAND_COUNT_NV)); - } - } - nglGetPathCommandsNV(path, memAddress(commands)); - } - - // --- [ glGetPathCoordsNV ] --- - - public static native void nglGetPathCoordsNV(int path, long coords); - - public static void glGetPathCoordsNV(@NativeType("GLuint") int path, @NativeType("GLfloat *") FloatBuffer coords) { - if (CHECKS) { - if (DEBUG) { - check(coords, glGetPathParameteriNV(path, GL_PATH_COORD_COUNT_NV)); - } - } - nglGetPathCoordsNV(path, memAddress(coords)); - } - - // --- [ glGetPathDashArrayNV ] --- - - public static native void nglGetPathDashArrayNV(int path, long dashArray); - - public static void glGetPathDashArrayNV(@NativeType("GLuint") int path, @NativeType("GLfloat *") FloatBuffer dashArray) { - if (CHECKS) { - if (DEBUG) { - check(dashArray, glGetPathParameteriNV(path, GL_PATH_DASH_ARRAY_COUNT_NV)); - } - } - nglGetPathDashArrayNV(path, memAddress(dashArray)); - } - - // --- [ glGetPathMetricsNV ] --- - - /** Unsafe version of: {@link #glGetPathMetricsNV GetPathMetricsNV} */ - public static native void nglGetPathMetricsNV(int metricQueryMask, int numPaths, int pathNameType, long paths, int pathBase, int stride, long metrics); - - /** - * @param metricQueryMask one or more of:
    {@link #GL_GLYPH_WIDTH_BIT_NV GLYPH_WIDTH_BIT_NV}{@link #GL_GLYPH_HEIGHT_BIT_NV GLYPH_HEIGHT_BIT_NV}
    {@link #GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV GLYPH_HORIZONTAL_BEARING_X_BIT_NV}{@link #GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV GLYPH_HORIZONTAL_BEARING_Y_BIT_NV}
    {@link #GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV}{@link #GL_GLYPH_VERTICAL_BEARING_X_BIT_NV GLYPH_VERTICAL_BEARING_X_BIT_NV}
    {@link #GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV GLYPH_VERTICAL_BEARING_Y_BIT_NV}{@link #GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV}
    {@link #GL_GLYPH_HAS_KERNING_BIT_NV GLYPH_HAS_KERNING_BIT_NV}{@link #GL_FONT_X_MIN_BOUNDS_BIT_NV FONT_X_MIN_BOUNDS_BIT_NV}
    {@link #GL_FONT_Y_MIN_BOUNDS_BIT_NV FONT_Y_MIN_BOUNDS_BIT_NV}{@link #GL_FONT_X_MAX_BOUNDS_BIT_NV FONT_X_MAX_BOUNDS_BIT_NV}
    {@link #GL_FONT_Y_MAX_BOUNDS_BIT_NV FONT_Y_MAX_BOUNDS_BIT_NV}{@link #GL_FONT_UNITS_PER_EM_BIT_NV FONT_UNITS_PER_EM_BIT_NV}
    {@link #GL_FONT_ASCENDER_BIT_NV FONT_ASCENDER_BIT_NV}{@link #GL_FONT_DESCENDER_BIT_NV FONT_DESCENDER_BIT_NV}
    {@link #GL_FONT_HEIGHT_BIT_NV FONT_HEIGHT_BIT_NV}{@link #GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV FONT_MAX_ADVANCE_WIDTH_BIT_NV}
    {@link #GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV FONT_MAX_ADVANCE_HEIGHT_BIT_NV}{@link #GL_FONT_UNDERLINE_POSITION_BIT_NV FONT_UNDERLINE_POSITION_BIT_NV}
    {@link #GL_FONT_UNDERLINE_THICKNESS_BIT_NV FONT_UNDERLINE_THICKNESS_BIT_NV}{@link #GL_FONT_HAS_KERNING_BIT_NV FONT_HAS_KERNING_BIT_NV}
    {@link #GL_FONT_NUM_GLYPH_INDICES_BIT_NV FONT_NUM_GLYPH_INDICES_BIT_NV}
    - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - */ - public static void glGetPathMetricsNV(@NativeType("GLbitfield") int metricQueryMask, @NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLsizei") int stride, @NativeType("GLfloat *") FloatBuffer metrics) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(metrics, numPaths * (stride == 0 ? Integer.bitCount(metricQueryMask) : (stride >> 2))); - } - nglGetPathMetricsNV(metricQueryMask, numPaths, pathNameType, memAddress(paths), pathBase, stride, memAddress(metrics)); - } - - // --- [ glGetPathMetricRangeNV ] --- - - /** Unsafe version of: {@link #glGetPathMetricRangeNV GetPathMetricRangeNV} */ - public static native void nglGetPathMetricRangeNV(int metricQueryMask, int firstPathName, int numPaths, int stride, long metrics); - - /** @param metricQueryMask one or more of:
    {@link #GL_GLYPH_WIDTH_BIT_NV GLYPH_WIDTH_BIT_NV}{@link #GL_GLYPH_HEIGHT_BIT_NV GLYPH_HEIGHT_BIT_NV}
    {@link #GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV GLYPH_HORIZONTAL_BEARING_X_BIT_NV}{@link #GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV GLYPH_HORIZONTAL_BEARING_Y_BIT_NV}
    {@link #GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV}{@link #GL_GLYPH_VERTICAL_BEARING_X_BIT_NV GLYPH_VERTICAL_BEARING_X_BIT_NV}
    {@link #GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV GLYPH_VERTICAL_BEARING_Y_BIT_NV}{@link #GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV}
    {@link #GL_GLYPH_HAS_KERNING_BIT_NV GLYPH_HAS_KERNING_BIT_NV}{@link #GL_FONT_X_MIN_BOUNDS_BIT_NV FONT_X_MIN_BOUNDS_BIT_NV}
    {@link #GL_FONT_Y_MIN_BOUNDS_BIT_NV FONT_Y_MIN_BOUNDS_BIT_NV}{@link #GL_FONT_X_MAX_BOUNDS_BIT_NV FONT_X_MAX_BOUNDS_BIT_NV}
    {@link #GL_FONT_Y_MAX_BOUNDS_BIT_NV FONT_Y_MAX_BOUNDS_BIT_NV}{@link #GL_FONT_UNITS_PER_EM_BIT_NV FONT_UNITS_PER_EM_BIT_NV}
    {@link #GL_FONT_ASCENDER_BIT_NV FONT_ASCENDER_BIT_NV}{@link #GL_FONT_DESCENDER_BIT_NV FONT_DESCENDER_BIT_NV}
    {@link #GL_FONT_HEIGHT_BIT_NV FONT_HEIGHT_BIT_NV}{@link #GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV FONT_MAX_ADVANCE_WIDTH_BIT_NV}
    {@link #GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV FONT_MAX_ADVANCE_HEIGHT_BIT_NV}{@link #GL_FONT_UNDERLINE_POSITION_BIT_NV FONT_UNDERLINE_POSITION_BIT_NV}
    {@link #GL_FONT_UNDERLINE_THICKNESS_BIT_NV FONT_UNDERLINE_THICKNESS_BIT_NV}{@link #GL_FONT_HAS_KERNING_BIT_NV FONT_HAS_KERNING_BIT_NV}
    {@link #GL_FONT_NUM_GLYPH_INDICES_BIT_NV FONT_NUM_GLYPH_INDICES_BIT_NV}
    */ - public static void glGetPathMetricRangeNV(@NativeType("GLbitfield") int metricQueryMask, @NativeType("GLuint") int firstPathName, @NativeType("GLsizei") int numPaths, @NativeType("GLsizei") int stride, @NativeType("GLfloat *") FloatBuffer metrics) { - if (CHECKS) { - check(metrics, numPaths * (stride == 0 ? Integer.bitCount(metricQueryMask) : (stride >> 2))); - } - nglGetPathMetricRangeNV(metricQueryMask, firstPathName, numPaths, stride, memAddress(metrics)); - } - - // --- [ glGetPathSpacingNV ] --- - - /** Unsafe version of: {@link #glGetPathSpacingNV GetPathSpacingNV} */ - public static native void nglGetPathSpacingNV(int pathListMode, int numPaths, int pathNameType, long paths, int pathBase, float advanceScale, float kerningScale, int transformType, long returnedSpacing); - - /** - * @param pathListMode one of:
    {@link #GL_ACCUM_ADJACENT_PAIRS_NV ACCUM_ADJACENT_PAIRS_NV}{@link #GL_ADJACENT_PAIRS_NV ADJACENT_PAIRS_NV}{@link #GL_FIRST_TO_REST_NV FIRST_TO_REST_NV}
    - * @param pathNameType one of:
    {@link GL11#GL_BYTE BYTE}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}{@link GL11#GL_SHORT SHORT}{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}{@link GL11#GL_INT INT}{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_FLOAT FLOAT}{@link #GL_UTF8_NV UTF8_NV}{@link #GL_UTF16_NV UTF16_NV}{@link #GL_2_BYTES_NV 2_BYTES_NV}
    {@link #GL_3_BYTES_NV 3_BYTES_NV}{@link #GL_4_BYTES_NV 4_BYTES_NV}
    - * @param transformType one of:
    {@link #GL_TRANSLATE_X_NV TRANSLATE_X_NV}{@link #GL_TRANSLATE_2D_NV TRANSLATE_2D_NV}
    - */ - public static void glGetPathSpacingNV(@NativeType("GLenum") int pathListMode, @NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLfloat") float advanceScale, @NativeType("GLfloat") float kerningScale, @NativeType("GLenum") int transformType, @NativeType("GLfloat *") FloatBuffer returnedSpacing) { - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(returnedSpacing, (numPaths - 1) * (transformType == GL_TRANSLATE_X_NV ? 1 : 2)); - } - nglGetPathSpacingNV(pathListMode, numPaths, pathNameType, memAddress(paths), pathBase, advanceScale, kerningScale, transformType, memAddress(returnedSpacing)); - } - - // --- [ glGetPathColorGenivNV ] --- - - /** Unsafe version of: {@link #glGetPathColorGenivNV GetPathColorGenivNV} */ - public static native void nglGetPathColorGenivNV(int color, int pname, long value); - - /** - * @param color one of:
    {@link GL13#GL_PRIMARY_COLOR PRIMARY_COLOR}{@link #GL_PRIMARY_COLOR_NV PRIMARY_COLOR_NV}{@link #GL_SECONDARY_COLOR_NV SECONDARY_COLOR_NV}
    - * @param pname one of:
    {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV}{@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV}{@link #GL_PATH_GEN_COLOR_FORMAT_NV PATH_GEN_COLOR_FORMAT_NV}
    - */ - public static void glGetPathColorGenivNV(@NativeType("GLenum") int color, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglGetPathColorGenivNV(color, pname, memAddress(value)); - } - - /** - * @param color one of:
    {@link GL13#GL_PRIMARY_COLOR PRIMARY_COLOR}{@link #GL_PRIMARY_COLOR_NV PRIMARY_COLOR_NV}{@link #GL_SECONDARY_COLOR_NV SECONDARY_COLOR_NV}
    - * @param pname one of:
    {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV}{@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV}{@link #GL_PATH_GEN_COLOR_FORMAT_NV PATH_GEN_COLOR_FORMAT_NV}
    - */ - @NativeType("void") - public static int glGetPathColorGeniNV(@NativeType("GLenum") int color, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nglGetPathColorGenivNV(color, pname, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPathColorGenfvNV ] --- - - /** Unsafe version of: {@link #glGetPathColorGenfvNV GetPathColorGenfvNV} */ - public static native void nglGetPathColorGenfvNV(int color, int pname, long value); - - /** - * @param color one of:
    {@link GL13#GL_PRIMARY_COLOR PRIMARY_COLOR}{@link #GL_PRIMARY_COLOR_NV PRIMARY_COLOR_NV}{@link #GL_SECONDARY_COLOR_NV SECONDARY_COLOR_NV}
    - * @param pname one of:
    {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV}{@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV}{@link #GL_PATH_GEN_COLOR_FORMAT_NV PATH_GEN_COLOR_FORMAT_NV}
    - */ - public static void glGetPathColorGenfvNV(@NativeType("GLenum") int color, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglGetPathColorGenfvNV(color, pname, memAddress(value)); - } - - /** - * @param color one of:
    {@link GL13#GL_PRIMARY_COLOR PRIMARY_COLOR}{@link #GL_PRIMARY_COLOR_NV PRIMARY_COLOR_NV}{@link #GL_SECONDARY_COLOR_NV SECONDARY_COLOR_NV}
    - * @param pname one of:
    {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV}{@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV}{@link #GL_PATH_GEN_COLOR_FORMAT_NV PATH_GEN_COLOR_FORMAT_NV}
    - */ - @NativeType("void") - public static float glGetPathColorGenfNV(@NativeType("GLenum") int color, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nglGetPathColorGenfvNV(color, pname, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPathTexGenivNV ] --- - - /** Unsafe version of: {@link #glGetPathTexGenivNV GetPathTexGenivNV} */ - public static native void nglGetPathTexGenivNV(int texCoordSet, int pname, long value); - - /** @param pname {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV} {@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV} {@link #GL_PATH_GEN_COMPONENTS_NV PATH_GEN_COMPONENTS_NV} */ - public static void glGetPathTexGenivNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglGetPathTexGenivNV(texCoordSet, pname, memAddress(value)); - } - - /** @param pname {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV} {@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV} {@link #GL_PATH_GEN_COMPONENTS_NV PATH_GEN_COMPONENTS_NV} */ - @NativeType("void") - public static int glGetPathTexGeniNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer value = stack.callocInt(1); - nglGetPathTexGenivNV(texCoordSet, pname, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetPathTexGenfvNV ] --- - - /** Unsafe version of: {@link #glGetPathTexGenfvNV GetPathTexGenfvNV} */ - public static native void nglGetPathTexGenfvNV(int texCoordSet, int pname, long value); - - /** @param pname {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV} {@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV} {@link #GL_PATH_GEN_COMPONENTS_NV PATH_GEN_COMPONENTS_NV} */ - public static void glGetPathTexGenfvNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int pname, @NativeType("GLfloat *") FloatBuffer value) { - if (CHECKS) { - check(value, 1); - } - nglGetPathTexGenfvNV(texCoordSet, pname, memAddress(value)); - } - - /** @param pname {@link #GL_PATH_GEN_MODE_NV PATH_GEN_MODE_NV} {@link #GL_PATH_GEN_COEFF_NV PATH_GEN_COEFF_NV} {@link #GL_PATH_GEN_COMPONENTS_NV PATH_GEN_COMPONENTS_NV} */ - @NativeType("void") - public static float glGetPathTexGenfNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - FloatBuffer value = stack.callocFloat(1); - nglGetPathTexGenfvNV(texCoordSet, pname, memAddress(value)); - return value.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsPointInFillPathNV ] --- - - @NativeType("GLboolean") - public static native boolean glIsPointInFillPathNV(@NativeType("GLuint") int path, @NativeType("GLuint") int mask, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y); - - // --- [ glIsPointInStrokePathNV ] --- - - @NativeType("GLboolean") - public static native boolean glIsPointInStrokePathNV(@NativeType("GLuint") int path, @NativeType("GLfloat") float x, @NativeType("GLfloat") float y); - - // --- [ glGetPathLengthNV ] --- - - @NativeType("GLfloat") - public static native float glGetPathLengthNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int startSegment, @NativeType("GLsizei") int numSegments); - - // --- [ glPointAlongPathNV ] --- - - public static native boolean nglPointAlongPathNV(int path, int startSegment, int numSegments, float distance, long x, long y, long tangentX, long tangentY); - - @NativeType("GLboolean") - public static boolean glPointAlongPathNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int startSegment, @NativeType("GLsizei") int numSegments, @NativeType("GLfloat") float distance, @Nullable @NativeType("GLfloat *") FloatBuffer x, @Nullable @NativeType("GLfloat *") FloatBuffer y, @Nullable @NativeType("GLfloat *") FloatBuffer tangentX, @Nullable @NativeType("GLfloat *") FloatBuffer tangentY) { - if (CHECKS) { - checkSafe(x, 1); - checkSafe(y, 1); - checkSafe(tangentX, 1); - checkSafe(tangentY, 1); - } - return nglPointAlongPathNV(path, startSegment, numSegments, distance, memAddressSafe(x), memAddressSafe(y), memAddressSafe(tangentX), memAddressSafe(tangentY)); - } - - // --- [ glMatrixLoad3x2fNV ] --- - - /** Unsafe version of: {@link #glMatrixLoad3x2fNV MatrixLoad3x2fNV} */ - public static native void nglMatrixLoad3x2fNV(int matrixMode, long m); - - /** @param matrixMode one of:
    {@link #GL_PATH_PROJECTION_NV PATH_PROJECTION_NV}{@link #GL_PATH_MODELVIEW_NV PATH_MODELVIEW_NV}
    */ - public static void glMatrixLoad3x2fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 6); - } - nglMatrixLoad3x2fNV(matrixMode, memAddress(m)); - } - - // --- [ glMatrixLoad3x3fNV ] --- - - /** Unsafe version of: {@link #glMatrixLoad3x3fNV MatrixLoad3x3fNV} */ - public static native void nglMatrixLoad3x3fNV(int matrixMode, long m); - - /** @param matrixMode one of:
    {@link #GL_PATH_PROJECTION_NV PATH_PROJECTION_NV}{@link #GL_PATH_MODELVIEW_NV PATH_MODELVIEW_NV}
    */ - public static void glMatrixLoad3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 9); - } - nglMatrixLoad3x3fNV(matrixMode, memAddress(m)); - } - - // --- [ glMatrixLoadTranspose3x3fNV ] --- - - /** Unsafe version of: {@link #glMatrixLoadTranspose3x3fNV MatrixLoadTranspose3x3fNV} */ - public static native void nglMatrixLoadTranspose3x3fNV(int matrixMode, long m); - - /** @param matrixMode one of:
    {@link #GL_PATH_PROJECTION_NV PATH_PROJECTION_NV}{@link #GL_PATH_MODELVIEW_NV PATH_MODELVIEW_NV}
    */ - public static void glMatrixLoadTranspose3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 9); - } - nglMatrixLoadTranspose3x3fNV(matrixMode, memAddress(m)); - } - - // --- [ glMatrixMult3x2fNV ] --- - - /** Unsafe version of: {@link #glMatrixMult3x2fNV MatrixMult3x2fNV} */ - public static native void nglMatrixMult3x2fNV(int matrixMode, long m); - - /** @param matrixMode one of:
    {@link #GL_PATH_PROJECTION_NV PATH_PROJECTION_NV}{@link #GL_PATH_MODELVIEW_NV PATH_MODELVIEW_NV}
    */ - public static void glMatrixMult3x2fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 6); - } - nglMatrixMult3x2fNV(matrixMode, memAddress(m)); - } - - // --- [ glMatrixMult3x3fNV ] --- - - /** Unsafe version of: {@link #glMatrixMult3x3fNV MatrixMult3x3fNV} */ - public static native void nglMatrixMult3x3fNV(int matrixMode, long m); - - /** @param matrixMode one of:
    {@link #GL_PATH_PROJECTION_NV PATH_PROJECTION_NV}{@link #GL_PATH_MODELVIEW_NV PATH_MODELVIEW_NV}
    */ - public static void glMatrixMult3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 9); - } - nglMatrixMult3x3fNV(matrixMode, memAddress(m)); - } - - // --- [ glMatrixMultTranspose3x3fNV ] --- - - /** Unsafe version of: {@link #glMatrixMultTranspose3x3fNV MatrixMultTranspose3x3fNV} */ - public static native void nglMatrixMultTranspose3x3fNV(int matrixMode, long m); - - /** @param matrixMode one of:
    {@link #GL_PATH_PROJECTION_NV PATH_PROJECTION_NV}{@link #GL_PATH_MODELVIEW_NV PATH_MODELVIEW_NV}
    */ - public static void glMatrixMultTranspose3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") FloatBuffer m) { - if (CHECKS) { - check(m, 9); - } - nglMatrixMultTranspose3x3fNV(matrixMode, memAddress(m)); - } - - // --- [ glGetProgramResourcefvNV ] --- - - public static native void nglGetProgramResourcefvNV(int program, int programInterface, int index, int propCount, long props, int bufSize, long length, long params); - - public static void glGetProgramResourcefvNV(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") IntBuffer props, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLfloat *") FloatBuffer params) { - if (CHECKS) { - checkSafe(length, 1); - } - nglGetProgramResourcefvNV(program, programInterface, index, props.remaining(), memAddress(props), params.remaining(), memAddressSafe(length), memAddress(params)); - } - - /** Array version of: {@link #glPathCommandsNV PathCommandsNV} */ - public static void glPathCommandsNV(@NativeType("GLuint") int path, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") short[] coords) { - long __functionAddress = GL.getICD().glPathCommandsNV; - if (CHECKS) { - check(__functionAddress); - } - callPPV(path, commands.remaining(), memAddress(commands), coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glPathCommandsNV PathCommandsNV} */ - public static void glPathCommandsNV(@NativeType("GLuint") int path, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") float[] coords) { - long __functionAddress = GL.getICD().glPathCommandsNV; - if (CHECKS) { - check(__functionAddress); - } - callPPV(path, commands.remaining(), memAddress(commands), coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glPathCoordsNV PathCoordsNV} */ - public static void glPathCoordsNV(@NativeType("GLuint") int path, @NativeType("GLenum") int coordType, @NativeType("void const *") short[] coords) { - long __functionAddress = GL.getICD().glPathCoordsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(path, coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glPathCoordsNV PathCoordsNV} */ - public static void glPathCoordsNV(@NativeType("GLuint") int path, @NativeType("GLenum") int coordType, @NativeType("void const *") float[] coords) { - long __functionAddress = GL.getICD().glPathCoordsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(path, coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glPathSubCommandsNV PathSubCommandsNV} */ - public static void glPathSubCommandsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int commandStart, @NativeType("GLsizei") int commandsToDelete, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") short[] coords) { - long __functionAddress = GL.getICD().glPathSubCommandsNV; - if (CHECKS) { - check(__functionAddress); - } - callPPV(path, commandStart, commandsToDelete, commands.remaining(), memAddress(commands), coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glPathSubCommandsNV PathSubCommandsNV} */ - public static void glPathSubCommandsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int commandStart, @NativeType("GLsizei") int commandsToDelete, @NativeType("GLubyte const *") ByteBuffer commands, @NativeType("GLenum") int coordType, @NativeType("void const *") float[] coords) { - long __functionAddress = GL.getICD().glPathSubCommandsNV; - if (CHECKS) { - check(__functionAddress); - } - callPPV(path, commandStart, commandsToDelete, commands.remaining(), memAddress(commands), coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glPathSubCoordsNV PathSubCoordsNV} */ - public static void glPathSubCoordsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int coordStart, @NativeType("GLenum") int coordType, @NativeType("void const *") short[] coords) { - long __functionAddress = GL.getICD().glPathSubCoordsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(path, coordStart, coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glPathSubCoordsNV PathSubCoordsNV} */ - public static void glPathSubCoordsNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int coordStart, @NativeType("GLenum") int coordType, @NativeType("void const *") float[] coords) { - long __functionAddress = GL.getICD().glPathSubCoordsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(path, coordStart, coords.length, coordType, coords, __functionAddress); - } - - /** Array version of: {@link #glWeightPathsNV WeightPathsNV} */ - public static void glWeightPathsNV(@NativeType("GLuint") int resultPath, @NativeType("GLuint const *") int[] paths, @NativeType("GLfloat const *") float[] weights) { - long __functionAddress = GL.getICD().glWeightPathsNV; - if (CHECKS) { - check(__functionAddress); - check(weights, paths.length); - } - callPPV(resultPath, paths.length, paths, weights, __functionAddress); - } - - /** Array version of: {@link #glTransformPathNV TransformPathNV} */ - public static void glTransformPathNV(@NativeType("GLuint") int resultPath, @NativeType("GLuint") int srcPath, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) { - long __functionAddress = GL.getICD().glTransformPathNV; - if (CHECKS) { - check(__functionAddress); - check(transformValues, transformTypeToElements(transformType)); - } - callPV(resultPath, srcPath, transformType, transformValues, __functionAddress); - } - - /** Array version of: {@link #glPathParameterivNV PathParameterivNV} */ - public static void glPathParameterivNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] value) { - long __functionAddress = GL.getICD().glPathParameterivNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(path, pname, value, __functionAddress); - } - - /** Array version of: {@link #glPathParameterfvNV PathParameterfvNV} */ - public static void glPathParameterfvNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLfloat const *") float[] value) { - long __functionAddress = GL.getICD().glPathParameterfvNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(path, pname, value, __functionAddress); - } - - /** Array version of: {@link #glPathDashArrayNV PathDashArrayNV} */ - public static void glPathDashArrayNV(@NativeType("GLuint") int path, @NativeType("GLfloat const *") float[] dashArray) { - long __functionAddress = GL.getICD().glPathDashArrayNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(path, dashArray.length, dashArray, __functionAddress); - } - - /** Array version of: {@link #glStencilFillPathInstancedNV StencilFillPathInstancedNV} */ - public static void glStencilFillPathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int fillMode, @NativeType("GLuint") int mask, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) { - long __functionAddress = GL.getICD().glStencilFillPathInstancedNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - callPPV(numPaths, pathNameType, memAddress(paths), pathBase, fillMode, mask, transformType, transformValues, __functionAddress); - } - - /** Array version of: {@link #glStencilStrokePathInstancedNV StencilStrokePathInstancedNV} */ - public static void glStencilStrokePathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLint") int reference, @NativeType("GLuint") int mask, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) { - long __functionAddress = GL.getICD().glStencilStrokePathInstancedNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - callPPV(numPaths, pathNameType, memAddress(paths), pathBase, reference, mask, transformType, transformValues, __functionAddress); - } - - /** Array version of: {@link #glPathColorGenNV PathColorGenNV} */ - public static void glPathColorGenNV(@NativeType("GLenum") int color, @NativeType("GLenum") int genMode, @NativeType("GLenum") int colorFormat, @NativeType("GLfloat const *") float[] coeffs) { - long __functionAddress = GL.getICD().glPathColorGenNV; - if (CHECKS) { - check(__functionAddress); - check(coeffs, genModeToElements(genMode) * colorFormatToComponents(colorFormat)); - } - callPV(color, genMode, colorFormat, coeffs, __functionAddress); - } - - /** Array version of: {@link #glPathTexGenNV PathTexGenNV} */ - public static void glPathTexGenNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int genMode, @NativeType("GLint") int components, @NativeType("GLfloat const *") float[] coeffs) { - long __functionAddress = GL.getICD().glPathTexGenNV; - if (CHECKS) { - check(__functionAddress); - check(coeffs, genModeToElements(genMode) * components); - } - callPV(texCoordSet, genMode, components, coeffs, __functionAddress); - } - - /** Array version of: {@link #glCoverFillPathInstancedNV CoverFillPathInstancedNV} */ - public static void glCoverFillPathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) { - long __functionAddress = GL.getICD().glCoverFillPathInstancedNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - callPPV(numPaths, pathNameType, memAddress(paths), pathBase, coverMode, transformType, transformValues, __functionAddress); - } - - /** Array version of: {@link #glCoverStrokePathInstancedNV CoverStrokePathInstancedNV} */ - public static void glCoverStrokePathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) { - long __functionAddress = GL.getICD().glCoverStrokePathInstancedNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - callPPV(numPaths, pathNameType, memAddress(paths), pathBase, coverMode, transformType, transformValues, __functionAddress); - } - - /** Array version of: {@link #glStencilThenCoverFillPathInstancedNV StencilThenCoverFillPathInstancedNV} */ - public static void glStencilThenCoverFillPathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLenum") int fillMode, @NativeType("GLuint") int mask, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) { - long __functionAddress = GL.getICD().glStencilThenCoverFillPathInstancedNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - callPPV(numPaths, pathNameType, memAddress(paths), pathBase, fillMode, mask, coverMode, transformType, transformValues, __functionAddress); - } - - /** Array version of: {@link #glStencilThenCoverStrokePathInstancedNV StencilThenCoverStrokePathInstancedNV} */ - public static void glStencilThenCoverStrokePathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLint") int reference, @NativeType("GLuint") int mask, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) { - long __functionAddress = GL.getICD().glStencilThenCoverStrokePathInstancedNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(transformValues, numPaths * transformTypeToElements(transformType)); - } - callPPV(numPaths, pathNameType, memAddress(paths), pathBase, reference, mask, coverMode, transformType, transformValues, __functionAddress); - } - - /** Array version of: {@link #glPathGlyphIndexRangeNV PathGlyphIndexRangeNV} */ - @NativeType("GLenum") - public static int glPathGlyphIndexRangeNV(@NativeType("GLenum") int fontTarget, @NativeType("void const *") ByteBuffer fontName, @NativeType("GLbitfield") int fontStyle, @NativeType("GLuint") int pathParameterTemplate, @NativeType("GLfloat") float emScale, @NativeType("GLuint *") int[] baseAndCount) { - long __functionAddress = GL.getICD().glPathGlyphIndexRangeNV; - if (CHECKS) { - check(__functionAddress); - checkNT1(fontName); - check(baseAndCount, 2); - } - return callPPI(fontTarget, memAddress(fontName), fontStyle, pathParameterTemplate, emScale, baseAndCount, __functionAddress); - } - - /** Array version of: {@link #glProgramPathFragmentInputGenNV ProgramPathFragmentInputGenNV} */ - public static void glProgramPathFragmentInputGenNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLenum") int genMode, @NativeType("GLint") int components, @NativeType("GLfloat const *") float[] coeffs) { - long __functionAddress = GL.getICD().glProgramPathFragmentInputGenNV; - if (CHECKS) { - check(__functionAddress); - check(coeffs, genModeToElements(genMode) * components); - } - callPV(program, location, genMode, components, coeffs, __functionAddress); - } - - /** Array version of: {@link #glGetPathParameterivNV GetPathParameterivNV} */ - public static void glGetPathParameterivNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] value) { - long __functionAddress = GL.getICD().glGetPathParameterivNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(path, pname, value, __functionAddress); - } - - /** Array version of: {@link #glGetPathParameterfvNV GetPathParameterfvNV} */ - public static void glGetPathParameterfvNV(@NativeType("GLuint") int path, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] value) { - long __functionAddress = GL.getICD().glGetPathParameterfvNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(path, pname, value, __functionAddress); - } - - /** Array version of: {@link #glGetPathCoordsNV GetPathCoordsNV} */ - public static void glGetPathCoordsNV(@NativeType("GLuint") int path, @NativeType("GLfloat *") float[] coords) { - long __functionAddress = GL.getICD().glGetPathCoordsNV; - if (CHECKS) { - check(__functionAddress); - if (DEBUG) { - check(coords, glGetPathParameteriNV(path, GL_PATH_COORD_COUNT_NV)); - } - } - callPV(path, coords, __functionAddress); - } - - /** Array version of: {@link #glGetPathDashArrayNV GetPathDashArrayNV} */ - public static void glGetPathDashArrayNV(@NativeType("GLuint") int path, @NativeType("GLfloat *") float[] dashArray) { - long __functionAddress = GL.getICD().glGetPathDashArrayNV; - if (CHECKS) { - check(__functionAddress); - if (DEBUG) { - check(dashArray, glGetPathParameteriNV(path, GL_PATH_DASH_ARRAY_COUNT_NV)); - } - } - callPV(path, dashArray, __functionAddress); - } - - /** Array version of: {@link #glGetPathMetricsNV GetPathMetricsNV} */ - public static void glGetPathMetricsNV(@NativeType("GLbitfield") int metricQueryMask, @NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLsizei") int stride, @NativeType("GLfloat *") float[] metrics) { - long __functionAddress = GL.getICD().glGetPathMetricsNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(metrics, numPaths * (stride == 0 ? Integer.bitCount(metricQueryMask) : (stride >> 2))); - } - callPPV(metricQueryMask, numPaths, pathNameType, memAddress(paths), pathBase, stride, metrics, __functionAddress); - } - - /** Array version of: {@link #glGetPathMetricRangeNV GetPathMetricRangeNV} */ - public static void glGetPathMetricRangeNV(@NativeType("GLbitfield") int metricQueryMask, @NativeType("GLuint") int firstPathName, @NativeType("GLsizei") int numPaths, @NativeType("GLsizei") int stride, @NativeType("GLfloat *") float[] metrics) { - long __functionAddress = GL.getICD().glGetPathMetricRangeNV; - if (CHECKS) { - check(__functionAddress); - check(metrics, numPaths * (stride == 0 ? Integer.bitCount(metricQueryMask) : (stride >> 2))); - } - callPV(metricQueryMask, firstPathName, numPaths, stride, metrics, __functionAddress); - } - - /** Array version of: {@link #glGetPathSpacingNV GetPathSpacingNV} */ - public static void glGetPathSpacingNV(@NativeType("GLenum") int pathListMode, @NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLfloat") float advanceScale, @NativeType("GLfloat") float kerningScale, @NativeType("GLenum") int transformType, @NativeType("GLfloat *") float[] returnedSpacing) { - long __functionAddress = GL.getICD().glGetPathSpacingNV; - int numPaths = paths.remaining() / pathNameTypeToBytes(pathNameType); - if (CHECKS) { - check(__functionAddress); - check(returnedSpacing, (numPaths - 1) * (transformType == GL_TRANSLATE_X_NV ? 1 : 2)); - } - callPPV(pathListMode, numPaths, pathNameType, memAddress(paths), pathBase, advanceScale, kerningScale, transformType, returnedSpacing, __functionAddress); - } - - /** Array version of: {@link #glGetPathColorGenivNV GetPathColorGenivNV} */ - public static void glGetPathColorGenivNV(@NativeType("GLenum") int color, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] value) { - long __functionAddress = GL.getICD().glGetPathColorGenivNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(color, pname, value, __functionAddress); - } - - /** Array version of: {@link #glGetPathColorGenfvNV GetPathColorGenfvNV} */ - public static void glGetPathColorGenfvNV(@NativeType("GLenum") int color, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] value) { - long __functionAddress = GL.getICD().glGetPathColorGenfvNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(color, pname, value, __functionAddress); - } - - /** Array version of: {@link #glGetPathTexGenivNV GetPathTexGenivNV} */ - public static void glGetPathTexGenivNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] value) { - long __functionAddress = GL.getICD().glGetPathTexGenivNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(texCoordSet, pname, value, __functionAddress); - } - - /** Array version of: {@link #glGetPathTexGenfvNV GetPathTexGenfvNV} */ - public static void glGetPathTexGenfvNV(@NativeType("GLenum") int texCoordSet, @NativeType("GLenum") int pname, @NativeType("GLfloat *") float[] value) { - long __functionAddress = GL.getICD().glGetPathTexGenfvNV; - if (CHECKS) { - check(__functionAddress); - check(value, 1); - } - callPV(texCoordSet, pname, value, __functionAddress); - } - - /** Array version of: {@link #glPointAlongPathNV PointAlongPathNV} */ - @NativeType("GLboolean") - public static boolean glPointAlongPathNV(@NativeType("GLuint") int path, @NativeType("GLsizei") int startSegment, @NativeType("GLsizei") int numSegments, @NativeType("GLfloat") float distance, @Nullable @NativeType("GLfloat *") float[] x, @Nullable @NativeType("GLfloat *") float[] y, @Nullable @NativeType("GLfloat *") float[] tangentX, @Nullable @NativeType("GLfloat *") float[] tangentY) { - long __functionAddress = GL.getICD().glPointAlongPathNV; - if (CHECKS) { - check(__functionAddress); - checkSafe(x, 1); - checkSafe(y, 1); - checkSafe(tangentX, 1); - checkSafe(tangentY, 1); - } - return callPPPPZ(path, startSegment, numSegments, distance, x, y, tangentX, tangentY, __functionAddress); - } - - /** Array version of: {@link #glMatrixLoad3x2fNV MatrixLoad3x2fNV} */ - public static void glMatrixLoad3x2fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixLoad3x2fNV; - if (CHECKS) { - check(__functionAddress); - check(m, 6); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixLoad3x3fNV MatrixLoad3x3fNV} */ - public static void glMatrixLoad3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixLoad3x3fNV; - if (CHECKS) { - check(__functionAddress); - check(m, 9); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixLoadTranspose3x3fNV MatrixLoadTranspose3x3fNV} */ - public static void glMatrixLoadTranspose3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixLoadTranspose3x3fNV; - if (CHECKS) { - check(__functionAddress); - check(m, 9); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixMult3x2fNV MatrixMult3x2fNV} */ - public static void glMatrixMult3x2fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixMult3x2fNV; - if (CHECKS) { - check(__functionAddress); - check(m, 6); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixMult3x3fNV MatrixMult3x3fNV} */ - public static void glMatrixMult3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixMult3x3fNV; - if (CHECKS) { - check(__functionAddress); - check(m, 9); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glMatrixMultTranspose3x3fNV MatrixMultTranspose3x3fNV} */ - public static void glMatrixMultTranspose3x3fNV(@NativeType("GLenum") int matrixMode, @NativeType("GLfloat const *") float[] m) { - long __functionAddress = GL.getICD().glMatrixMultTranspose3x3fNV; - if (CHECKS) { - check(__functionAddress); - check(m, 9); - } - callPV(matrixMode, m, __functionAddress); - } - - /** Array version of: {@link #glGetProgramResourcefvNV GetProgramResourcefvNV} */ - public static void glGetProgramResourcefvNV(@NativeType("GLuint") int program, @NativeType("GLenum") int programInterface, @NativeType("GLuint") int index, @NativeType("GLenum const *") int[] props, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLfloat *") float[] params) { - long __functionAddress = GL.getICD().glGetProgramResourcefvNV; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - } - callPPPV(program, programInterface, index, props.length, props, params.length, length, params, __functionAddress); - } - - private static int charcodeTypeToBytes(int type) { - switch ( type ) { - case GL_UNSIGNED_BYTE: - case GL_UTF8_NV: - return 1; - case GL_UNSIGNED_SHORT: - case GL_2_BYTES_NV: - case GL_UTF16_NV: - return 2; - case GL_3_BYTES_NV: - return 3; - case GL_UNSIGNED_INT: - case GL_4_BYTES_NV: - return 4; - default: - throw new IllegalArgumentException(String.format("Unsupported charcode type: 0x%X", type)); - } - } - - private static int pathNameTypeToBytes(int type) { - switch ( type ) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_UTF8_NV: - return 1; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_2_BYTES_NV: - case GL_UTF16_NV: - return 2; - case GL_3_BYTES_NV: - return 3; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_4_BYTES_NV: - return 4; - default: - throw new IllegalArgumentException(String.format("Unsupported path name type: 0x%X", type)); - } - } - - private static int transformTypeToElements(int type) { - switch ( type ) { - case GL_NONE: - return 0; - case GL_TRANSLATE_X_NV: - case GL_TRANSLATE_Y_NV: - return 1; - case GL_TRANSLATE_2D_NV: - return 2; - case GL_TRANSLATE_3D_NV: - return 3; - case GL_AFFINE_2D_NV: - case GL_TRANSPOSE_AFFINE_2D_NV: - return 6; - case GL_AFFINE_3D_NV: - case GL_TRANSPOSE_AFFINE_3D_NV: - return 12; - default: - throw new IllegalArgumentException(String.format("Unsupported transform type: 0x%X", type)); - } - } - - private static int colorFormatToComponents(int colorFormat) { - switch ( colorFormat ) { - case GL_LUMINANCE: - case GL_INTENSITY: - case GL_ALPHA: - return 1; - case GL_LUMINANCE_ALPHA: - return 2; - case GL_RGB: - return 3; - case GL_RGBA: - return 4; - default: - throw new IllegalArgumentException(String.format("Unsupported colorFormat specified: 0x%X", colorFormat)); - } - } - - private static int genModeToElements(int genMode) { - switch ( genMode ) { - case GL_NONE: - return 0; - case GL_CONSTANT_NV: - return 1; - case GL_OBJECT_LINEAR_NV: - case GL_PATH_OBJECT_BOUNDING_BOX_NV: - return 3; - case GL_EYE_LINEAR_NV: - return 4; - default: - throw new IllegalArgumentException(String.format("Unsupported genMode specified: 0x%X", genMode)); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVPathRenderingSharedEdge.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVPathRenderingSharedEdge.java deleted file mode 100644 index 8ff8750e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVPathRenderingSharedEdge.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_path_rendering_shared_edge extension. - * - *

    This extension introduces a new path command modifier to the NV_path_rendering extension to indicate that a path command represents an edge (either - * straight or curved) that is shared with another path.

    - * - *

    When used in conjunction with {@link NVFramebufferMixedSamples NV_framebuffer_mixed_samples}, a shared edge (or a whole path including shared edges) will use modified - * rasterization rules in order to ensure that groups of raster samples associated with a given coverage sample will all produce consistent coverage - * results, in order to avoid artifacts described further in the issues section at the end of this document.

    - * - *

    Requires {@link NVPathRendering NV_path_rendering}.

    - */ -public final class NVPathRenderingSharedEdge { - - /** Allowed to be added to command tokens in elements of the {@code commands} array parameter of PathCommandsNV and PathSubCommandsNV. */ - public static final int GL_SHARED_EDGE_NV = 0xC0; - - private NVPathRenderingSharedEdge() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVPixelDataRange.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVPixelDataRange.java deleted file mode 100644 index 4e0810cc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVPixelDataRange.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_pixel_data_range extension. - * - *

    The vertex array range extension is intended to improve the efficiency of OpenGL vertex arrays. OpenGL vertex arrays' coherency model and ability to - * access memory from arbitrary locations in memory prevented implementations from using DMA (Direct Memory Access) operations.

    - * - *

    Many image-intensive applications, such as those that use dynamically generated textures, face similar problems. These applications would like to be - * able to sustain throughputs of hundreds of millions of pixels per second through DrawPixels and hundreds of millions of texels per second through - * TexSubImage.

    - * - *

    However, the same restrictions that limited vertex throughput also limit pixel throughput.

    - * - *

    By the time that any pixel operation that reads data from user memory returns, OpenGL requires that it must be safe for the application to start using - * that memory for a different purpose. This coherency model prevents asynchronous DMA transfers directly out of the user's buffer.

    - * - *

    There are also no restrictions on the pointer provided to pixel operations or on the size of the data. To facilitate DMA implementations, the driver - * needs to know in advance what region of the address space to lock down.

    - * - *

    Vertex arrays faced both of these restrictions already, but pixel operations have one additional complicating factor -- they are bidirectional. Vertex - * array data is always being transfered from the application to the driver and the HW, whereas pixel operations sometimes transfer data to the - * application from the driver and HW. Note that the types of memory that are suitable for DMA for reading and writing purposes are often different. For - * example, on many PC platforms, DMA pulling is best accomplished with write-combined (uncached) AGP memory, while pushing data should use cached memory - * so that the application can read the data efficiently once it has been read back over the AGP bus.

    - * - *

    This extension defines an API where an application can specify two pixel data ranges, which are analogous to vertex array ranges, except that one is - * for operations where the application is reading data (e.g. glReadPixels) and one is for operations where the application is writing data (e.g. - * glDrawPixels, glTexSubImage2D, etc.). Each pixel data range has a pointer to its start and a length in bytes.

    - * - *

    When the pixel data range is enabled, and if the pointer specified as the argument to a pixel operation is inside the corresponding pixel data range, - * the implementation may choose to asynchronously pull data from the pixel data range or push data to the pixel data range. Data pulled from outside the - * pixel data range is undefined, while pushing data to outside the pixel data range produces undefined results.

    - * - *

    The application may synchronize with the hardware in one of two ways: by flushing the pixel data range (or causing an implicit flush) or by using the - * NV_fence extension to insert fences in the command stream.

    - */ -public class NVPixelDataRange { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameter of PixelDataRangeNV and FlushPixelDataRangeNV, and by the {@code cap} parameter of EnableClientState, - * DisableClientState, and IsEnabled. - */ - public static final int - GL_WRITE_PIXEL_DATA_RANGE_NV = 0x8878, - GL_READ_PIXEL_DATA_RANGE_NV = 0x8879; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A, - GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B; - - /** Accepted by the {@code pname} parameter of GetPointerv. */ - public static final int - GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C, - GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D; - - protected NVPixelDataRange() { - throw new UnsupportedOperationException(); - } - - // --- [ glPixelDataRangeNV ] --- - - public static native void nglPixelDataRangeNV(int target, int length, long pointer); - - public static void glPixelDataRangeNV(@NativeType("GLenum") int target, @NativeType("void const *") ByteBuffer pointer) { - nglPixelDataRangeNV(target, pointer.remaining(), memAddress(pointer)); - } - - // --- [ glFlushPixelDataRangeNV ] --- - - public static native void glFlushPixelDataRangeNV(@NativeType("GLenum") int target); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVPointSprite.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVPointSprite.java deleted file mode 100644 index 54b89a92..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVPointSprite.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_point_sprite extension. - * - *

    Applications such as particle systems usually must use OpenGL quads rather than points to render their geometry, since they would like to use a - * custom-drawn texture for each particle, rather than the traditional OpenGL round antialiased points, and each fragment in a point has the same texture - * coordinates as every other fragment.

    - * - *

    Unfortunately, specifying the geometry for these quads can be quite expensive, since it quadruples the amount of geometry required, and it may also - * require the application to do extra processing to compute the location of each vertex.

    - * - *

    The goal of this extension is to allow such apps to use points rather than quads. When {@link #GL_POINT_SPRITE_NV POINT_SPRITE_NV} is enabled, the state of point antialiasing - * is ignored. For each texture unit, the app can then specify whether to replace the existing texture coordinates with point sprite texture coordinates, - * which are interpolated across the point. Finally, the app can set a global parameter for the way to generate the R coordinate for point sprites; the R - * coordinate can either be zero, the input S coordinate, or the input R coordinate. This allows applications to use a 3D texture to represent a point - * sprite that goes through an animation, with filtering between frames, for example.

    - * - *

    Requires {@link EXTPointParameters EXT_point_parameters}.

    - */ -public class NVPointSprite { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of TexEnvi, TexEnviv, TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv. - */ - public static final int GL_POINT_SPRITE_NV = 0x8861; - - /** - * When the {@code target} parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, or GetTexEnviv is POINT_SPRITE_NV, then the value of - * {@code pname} may be. - */ - public static final int GL_COORD_REPLACE_NV = 0x8862; - - /** - * Accepted by the {@code pname} parameter of PointParameteriNV, PointParameterfEXT, PointParameterivNV, PointParameterfvEXT, GetBooleanv, GetIntegerv, - * GetFloatv, and GetDoublev. - */ - public static final int GL_POINT_SPRITE_R_MODE_NV = 0x8863; - - protected NVPointSprite() { - throw new UnsupportedOperationException(); - } - - // --- [ glPointParameteriNV ] --- - - public static native void glPointParameteriNV(@NativeType("GLenum") int pname, @NativeType("GLint") int param); - - // --- [ glPointParameterivNV ] --- - - public static native void nglPointParameterivNV(int pname, long params); - - public static void glPointParameterivNV(@NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglPointParameterivNV(pname, memAddress(params)); - } - - /** Array version of: {@link #glPointParameterivNV PointParameterivNV} */ - public static void glPointParameterivNV(@NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glPointParameterivNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVPrimitiveRestart.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVPrimitiveRestart.java deleted file mode 100644 index 6d487f06..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVPrimitiveRestart.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_primitive_restart extension. - * - *

    This extension allows applications to easily and inexpensively restart a primitive in its middle. A "primitive restart" is simply the same as an End - * command, followed by another Begin command with the same mode as the original. The typical expected use of this feature is to draw a mesh with many - * triangle strips, though primitive restarts are legal for all primitive types, even for points (where they are not useful).

    - * - *

    Although the EXT_multi_draw_arrays extension did reduce the overhead of such drawing techniques, they still remain more expensive than one would like.

    - * - *

    This extension provides an extremely lightweight primitive restart, which is accomplished by allowing the application to choose a special index number - * that signals that a primitive restart should occur, rather than a vertex being provoked. This index can be an arbitrary 32-bit integer for maximum - * application convenience.

    - * - *

    In addition, for full orthogonality, a special OpenGL command is provided to restart primitives when in immediate mode. This command is not likely to - * increase performance in any significant fashion, but providing it greatly simplifies the specification and implementation of display list compilation - * and indirect rendering.

    - */ -public class NVPrimitiveRestart { - - static { GL.initialize(); } - - /** - * Accepted by the {@code array} parameter of EnableClientState and DisableClientState, by the {@code cap} parameter of IsEnabled, and by the {@code pname} - * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. - */ - public static final int GL_PRIMITIVE_RESTART_NV = 0x8558; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559; - - protected NVPrimitiveRestart() { - throw new UnsupportedOperationException(); - } - - // --- [ glPrimitiveRestartNV ] --- - - public static native void glPrimitiveRestartNV(); - - // --- [ glPrimitiveRestartIndexNV ] --- - - public static native void glPrimitiveRestartIndexNV(@NativeType("GLuint") int index); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVPrimitiveShadingRate.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVPrimitiveShadingRate.java deleted file mode 100644 index c8565add..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVPrimitiveShadingRate.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_primitive_shading_rate extension. - * - *

    This extension builds on top of the {@code NV_shading_rate_image} extension to provide OpenGL API support for using a per-primitive shading rate value - * to control the computation of the rate used to process each fragment.

    - * - *

    In the {@code NV_shading_rate_image} extension, the shading rate for each fragment produced by a primitive is determined by looking up a texel in the - * bound shading rate image and using that value as an index into a shading rate palette. That extension provides a separate shading rate image lookup - * enable and palette for each viewport. When a primitive is rasterized, the implementation uses the enable and palette associated with the primitive's - * viewport to determine the shading rate.

    - * - *

    This extension decouples the shading rate image enables and palettes from viewports. The number of enables/palettes now comes from the - * implementation-dependent constant {@link #GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV SHADING_RATE_IMAGE_PALETTE_COUNT_NV}. When {@code SHADING_RATE_IMAGE_PER_PRIMITIVE_NV} (added here) is enabled, the - * value of the new {@code gl_ShadingRateNV} built-in output is used to select an enable and palette to determine the shading rate. Otherwise, the - * viewport number for the primitive is used, as in {@code NV_shading_rate_image}.

    - * - *

    Requires {@link GL45 OpenGL 4.5} and {@link NVShadingRateImage NV_shading_rate_image}.

    - */ -public final class NVPrimitiveShadingRate { - - /** - * Accepted by the {@code cap} parameter of {@link CGL#CGLEnable Enable}, {@link CGL#CGLDisable Disable}, and {@link CGL#CGLIsEnabled IsEnabled} and by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetIntegerv GetIntegerv}, - * {@link GL32C#glGetInteger64v GetInteger64v}, {@link GL11C#glGetFloatv GetFloatv}, {@link GL11C#glGetDoublev GetDoublev}. - */ - public static final int GL_SHADING_RATE_IMAGE_PER_PRIMITIVE_NV = 0x95B1; - - /** Accepted by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetDoublev GetDoublev}, {@link GL11C#glGetIntegerv GetIntegerv}, and {@link GL11C#glGetFloatv GetFloatv}. */ - public static final int GL_SHADING_RATE_IMAGE_PALETTE_COUNT_NV = 0x95B2; - - private NVPrimitiveShadingRate() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVQueryResource.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVQueryResource.java deleted file mode 100644 index 9e460461..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVQueryResource.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_query_resource extension. - * - *

    OpenGL implementations manage the residence of textures, shaders, and other graphical objects in GPU accessible memory (whether in on-board video - * memory or addressable system memory is implementation dependent). With more insight into OpenGL's memory usage 1) applications could make educated - * decisions on better utilizing the limited GPU resources, 2) users could better optimize their workflow when working with multiple tools, and 3) - * administrators can make better decisions regarding resource allocation and system configurations.

    - * - *

    The purpose of this extension is to return a more detailed breakdown of memory usage in terms of the OpenGL objects residing in memory (textures, - * render buffers, buffer objects, system reserved objects, ...). This extension differs from GL_NVX_gpu_memory_info in that this extension returns - * detailed memory usage at the object level for video memory while the other extension only reports total vidmem usage.

    - * - *

    For the purposes of this specification the term vidmem refers to video memory resident on the graphics card that is directly accessible to the GPU at - * the highest performance level.

    - * - *

    Requires {@link GL20 OpenGL 2.0}.

    - */ -public class NVQueryResource { - - static { GL.initialize(); } - - /** Accepted by the {@code queryType} parameter of {@link #glQueryResourceNV QueryResourceNV}. */ - public static final int GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV = 0x9540; - - /** New enums defined. */ - public static final int - GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV = 0x9542, - GL_QUERY_RESOURCE_SYS_RESERVED_NV = 0x9544, - GL_QUERY_RESOURCE_TEXTURE_NV = 0x9545, - GL_QUERY_RESOURCE_RENDERBUFFER_NV = 0x9546, - GL_QUERY_RESOURCE_BUFFEROBJECT_NV = 0x9547; - - protected NVQueryResource() { - throw new UnsupportedOperationException(); - } - - // --- [ glQueryResourceNV ] --- - - /** Unsafe version of: {@link #glQueryResourceNV QueryResourceNV} */ - public static native int nglQueryResourceNV(int queryType, int pname, int bufSize, long buffer); - - /** @param queryType must be:
    {@link #GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV}
    */ - @NativeType("GLint") - public static int glQueryResourceNV(@NativeType("GLenum") int queryType, @NativeType("GLint") int pname, @NativeType("GLint *") IntBuffer buffer) { - return nglQueryResourceNV(queryType, pname, buffer.remaining(), memAddress(buffer)); - } - - /** Array version of: {@link #glQueryResourceNV QueryResourceNV} */ - @NativeType("GLint") - public static int glQueryResourceNV(@NativeType("GLenum") int queryType, @NativeType("GLint") int pname, @NativeType("GLint *") int[] buffer) { - long __functionAddress = GL.getICD().glQueryResourceNV; - if (CHECKS) { - check(__functionAddress); - } - return callPI(queryType, pname, buffer.length, buffer, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVQueryResourceTag.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVQueryResourceTag.java deleted file mode 100644 index 4180383f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVQueryResourceTag.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_query_resource_tag extension. - * - *

    This extension adds the capability to associate a tag with one or more memory resource allocations. This tag can be reported back during - * {@code queryResource} operations and also be used to limit resource reporting to only those allocations with the specified tag. A tag is a previously - * reserved id and an optional text string.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link NVQueryResource NV_query_resource}.

    - */ -public class NVQueryResourceTag { - - static { GL.initialize(); } - - protected NVQueryResourceTag() { - throw new UnsupportedOperationException(); - } - - // --- [ glGenQueryResourceTagNV ] --- - - public static native void nglGenQueryResourceTagNV(int n, long tagIds); - - public static void glGenQueryResourceTagNV(@NativeType("GLuint *") IntBuffer tagIds) { - nglGenQueryResourceTagNV(tagIds.remaining(), memAddress(tagIds)); - } - - @NativeType("void") - public static int glGenQueryResourceTagNV() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer tagIds = stack.callocInt(1); - nglGenQueryResourceTagNV(1, memAddress(tagIds)); - return tagIds.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glDeleteQueryResourceTagNV ] --- - - public static native void nglDeleteQueryResourceTagNV(int n, long tagIds); - - public static void glDeleteQueryResourceTagNV(@NativeType("GLuint const *") IntBuffer tagIds) { - nglDeleteQueryResourceTagNV(tagIds.remaining(), memAddress(tagIds)); - } - - public static void glDeleteQueryResourceTagNV(@NativeType("GLuint const *") int tagId) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer tagIds = stack.ints(tagId); - nglDeleteQueryResourceTagNV(1, memAddress(tagIds)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glQueryResourceTagNV ] --- - - public static native void nglQueryResourceTagNV(int tagId, long tagString); - - public static void glQueryResourceTagNV(@NativeType("GLuint") int tagId, @NativeType("GLchar const *") ByteBuffer tagString) { - if (CHECKS) { - checkNT1(tagString); - } - nglQueryResourceTagNV(tagId, memAddress(tagString)); - } - - public static void glQueryResourceTagNV(@NativeType("GLuint") int tagId, @NativeType("GLchar const *") CharSequence tagString) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(tagString, true); - long tagStringEncoded = stack.getPointerAddress(); - nglQueryResourceTagNV(tagId, tagStringEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGenQueryResourceTagNV GenQueryResourceTagNV} */ - public static void glGenQueryResourceTagNV(@NativeType("GLuint *") int[] tagIds) { - long __functionAddress = GL.getICD().glGenQueryResourceTagNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(tagIds.length, tagIds, __functionAddress); - } - - /** Array version of: {@link #glDeleteQueryResourceTagNV DeleteQueryResourceTagNV} */ - public static void glDeleteQueryResourceTagNV(@NativeType("GLuint const *") int[] tagIds) { - long __functionAddress = GL.getICD().glDeleteQueryResourceTagNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(tagIds.length, tagIds, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVRepresentativeFragmentTest.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVRepresentativeFragmentTest.java deleted file mode 100644 index 271924a3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVRepresentativeFragmentTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_representative_fragment_test extension. - * - *

    This extension provides a new representative fragment test that allows implementations to reduce the amount of rasterization and fragment - * processing work performed for each point, line, or triangle primitive. For any primitive that produces one or more fragments that pass all other early - * fragment tests, the implementation is permitted to choose one or more "representative" fragments for processing and discard all other fragments. For - * draw calls rendering multiple points, lines, or triangles arranged in lists, strips, or fans, the representative fragment test is performed - * independently for each of those primitives.

    - * - *

    This extension is useful for applications that use an early render pass to determine the full set of primitives that would be visible in the final - * scene. In this render pass, such applications would set up a fragment shader that enables early fragment tests and writes to an image or shader storage - * buffer to record the ID of the primitive that generated the fragment. Without this extension, the shader would record the ID separately for each - * visible fragment of each primitive. With this extension, fewer stores will be performed, particularly for large primitives.

    - * - *

    The representative fragment test has no effect if early fragment tests are not enabled via the fragment shader. The set of fragments discarded by the - * representative fragment test is implementation-dependent and may vary from frame to frame. In some cases, the representative fragment test may not - * discard any fragments for a given primitive.

    - * - *

    Requires {@link GL45 OpenGL 4.5}.

    - */ -public final class NVRepresentativeFragmentTest { - - /** - * Accepted by the {@code cap} parameter of {@link CGL#CGLEnable Enable}, {@link CGL#CGLDisable Disable}, and {@link CGL#CGLIsEnabled IsEnabled}, and by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetIntegerv GetIntegerv}, - * {@link GL11C#glGetFloatv GetFloatv}, and {@link GL11C#glGetDoublev GetDoublev}. - */ - public static final int GL_REPRESENTATIVE_FRAGMENT_TEST_NV = 0x937F; - - private NVRepresentativeFragmentTest() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVRobustnessVideoMemoryPurge.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVRobustnessVideoMemoryPurge.java deleted file mode 100644 index 102532be..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVRobustnessVideoMemoryPurge.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_robustness_video_memory_purge extension. - * - *

    This extension allows applications to be notified when video memory has been purged.

    - * - *

    The NVIDIA OpenGL driver architecture on Linux has a limitation: resources located in video memory are not persistent across certain events. VT - * switches, suspend/resume events, and mode switching events may erase the contents of video memory. Any resource that is located exclusively in video - * memory, such as framebuffer objects (FBOs), will be lost. As the OpenGL specification makes no mention of events where the video memory is allowed to - * be cleared, the driver attempts to hide this fact from the application, but cannot do it for all resources.

    - * - *

    This extension provides a way for applications to discover when video memory content has been lost, so that the application can re-populate the video - * memory content as necessary.

    - * - *

    This extension will have a limited lifespan, as planned architectural evolutions in the NVIDIA Linux driver stack will allow video memory to be - * persistent. Any driver that exposes this extension is a driver that considers video memory to be volatile. Once the driver stack has been improved, the - * extension will no longer be exposed.

    - */ -public final class NVRobustnessVideoMemoryPurge { - - /** Returned by GetGraphicsResetStatusARB, in addition to other tokens defined in ARB_robustness. */ - public static final int GL_PURGED_CONTEXT_RESET_NV = 0x92BB; - - private NVRobustnessVideoMemoryPurge() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVSampleLocations.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVSampleLocations.java deleted file mode 100644 index 174e7ea7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVSampleLocations.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_sample_locations extension. - * - *

    This extension allows an application to modify the locations of samples within a pixel used in multisample rasterization. Additionally, it allows - * applications to specify different sample locations for each pixel in a group of adjacent pixels, which may increase antialiasing quality (particularly - * if a custom resolve shader is used that takes advantage of these different locations).

    - * - *

    It is common for implementations to optimize the storage of depth values by storing values that can be used to reconstruct depth at each sample - * location, rather than storing separate depth values for each sample. For example, the depth values from a single triangle can be represented using - * plane equations. When the depth value for a sample is needed, it is automatically evaluated at the sample location. Modifying the sample locations - * causes the reconstruction to no longer evaluate the same depth values as when the samples were originally generated. This extension provides a command - * to "resolve" and store per-sample depth values using the currently programmed sample locations, which allows the application to manage this issue - * if/when necessary.

    - * - *

    The programmable sample locations are used during rasterization and for evaluation of depth functions during normal geometric rendering. The - * programmable locations are associated with a framebuffer object rather than an individual depth buffer, so if the depth buffer is used as a texture the - * texture sampling may be done at the standard sample locations. Additionally, commands that do not render geometric primitives (e.g. ReadPixels, - * BlitFramebuffer, CopyTexSubImage2D, etc.) may use the standard sample locations to resolve depth functions rather than the programmable locations. If a - * single depth buffer is used at different times with different sample locations, the depth functions may be interpreted using the current sample - * locations.

    - */ -public class NVSampleLocations { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ - public static final int - GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV = 0x933D, - GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV = 0x933E, - GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV = 0x933F, - GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV = 0x9340; - - /** Accepted by the {@code pname} parameter of GetMultisamplefv. */ - public static final int - GL_SAMPLE_LOCATION_NV = 0x8E50, - GL_PROGRAMMABLE_SAMPLE_LOCATION_NV = 0x9341; - - /** Accepted by the {@code pname} parameter of FramebufferParameteri, GetFramebufferParameteriv. */ - public static final int - GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV = 0x9342, - GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV = 0x9343; - - protected NVSampleLocations() { - throw new UnsupportedOperationException(); - } - - // --- [ glFramebufferSampleLocationsfvNV ] --- - - /** - * Unsafe version of: {@link #glFramebufferSampleLocationsfvNV FramebufferSampleLocationsfvNV} - * - * @param count the number of sample locations to modify - */ - public static native void nglFramebufferSampleLocationsfvNV(int target, int start, int count, long v); - - /** - * Updates the programmable sample locations - * - * @param target the framebuffer whose programmable sample locations are modified - * @param start the index of the first sample location to modify - * @param v a pair of floating point values in the range [0,1] for each sample location - */ - public static void glFramebufferSampleLocationsfvNV(@NativeType("GLenum") int target, @NativeType("GLuint") int start, @NativeType("GLfloat const *") FloatBuffer v) { - nglFramebufferSampleLocationsfvNV(target, start, v.remaining() >> 1, memAddress(v)); - } - - // --- [ glNamedFramebufferSampleLocationsfvNV ] --- - - /** - * Unsafe version of: {@link #glNamedFramebufferSampleLocationsfvNV NamedFramebufferSampleLocationsfvNV} - * - * @param count the number of sample locations to modify - */ - public static native void nglNamedFramebufferSampleLocationsfvNV(int framebuffer, int start, int count, long v); - - /** - * Updates the programmable sample locations - * - * @param framebuffer the framebuffer whose programmable sample locations are modified - * @param start the index of the first sample location to modify - * @param v a pair of floating point values in the range [0,1] for each sample location - */ - public static void glNamedFramebufferSampleLocationsfvNV(@NativeType("GLuint") int framebuffer, @NativeType("GLuint") int start, @NativeType("GLfloat const *") FloatBuffer v) { - nglNamedFramebufferSampleLocationsfvNV(framebuffer, start, v.remaining() >> 1, memAddress(v)); - } - - // --- [ glResolveDepthValuesNV ] --- - - /** - * Evaluates depth values for all samples in the current depth buffer (subject to the pixel ownership and scissor tests) and stores each value in the - * depth buffer. This can be used to ensure that later accesses will use depth values consistent with the sample locations used when the samples were - * generated. If the current framebuffer has no depth buffer, ResolveDepthValuesNV will have no effect. - */ - public static native void glResolveDepthValuesNV(); - - /** Array version of: {@link #glFramebufferSampleLocationsfvNV FramebufferSampleLocationsfvNV} */ - public static void glFramebufferSampleLocationsfvNV(@NativeType("GLenum") int target, @NativeType("GLuint") int start, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glFramebufferSampleLocationsfvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(target, start, v.length >> 1, v, __functionAddress); - } - - /** Array version of: {@link #glNamedFramebufferSampleLocationsfvNV NamedFramebufferSampleLocationsfvNV} */ - public static void glNamedFramebufferSampleLocationsfvNV(@NativeType("GLuint") int framebuffer, @NativeType("GLuint") int start, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glNamedFramebufferSampleLocationsfvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(framebuffer, start, v.length >> 1, v, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVScissorExclusive.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVScissorExclusive.java deleted file mode 100644 index 9292d8b5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVScissorExclusive.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_scissor_exclusive extension. - * - *

    In unextended OpenGL, applications can enable a per-viewport scissor test ({@link GL11#GL_SCISSOR_TEST SCISSOR_TEST}) where fragments are discarded if their (x,y) coordinates lie - * outside the corresponding scissor rectangle. In this extension, we provide a separate per-viewport exclusive scissor test, where fragments are - * discarded if their (x,y) coordinates lie inside the corresponding exclusive scissor rectangle.

    - * - *

    The regular (inclusive) scissor test and exclusive scissor test are orthogonal; applications can enable either or both tests for each viewport. If both - * tests are enabled, fragments will be discarded unless their (x,y) coordinates are both inside the regular scissor rectangle and outside the exclusive - * scissor rectangle.

    - * - *

    Requires {@link GL45 OpenGL 4.5}.

    - */ -public class NVScissorExclusive { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of {@link CGL#CGLEnable Enable}, {@link CGL#CGLDisable Disable}, and {@link CGL#CGLIsEnabled IsEnabled}, by the {@code target} parameter of {@link GL30C#glEnablei Enablei}, {@link GL30C#glDisablei Disablei}, - * {@link GL30C#glIsEnabledi IsEnabledi}, {@link EXTDrawBuffers2#glEnableIndexedEXT EnableIndexedEXT}, {@link EXTDrawBuffers2#glDisableIndexedEXT DisableIndexedEXT}, and {@link EXTDrawBuffers2#glIsEnabledIndexedEXT IsEnabledIndexedEXT}, and by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, - * {@link GL11C#glGetIntegerv GetIntegerv}, {@link GL32C#glGetInteger64v GetInteger64v}, {@link GL11C#glGetFloatv GetFloatv}, {@link GL11C#glGetDoublev GetDoublev}, {@link EXTDirectStateAccess#glGetDoubleIndexedvEXT GetDoubleIndexedvEXT}, {@link GL30C#glGetBooleani_v GetBooleani_v}, {@link GL30C#glGetIntegeri_v GetIntegeri_v}, {@link GL32C#glGetInteger64i_v GetInteger64i_v}, - * {@link GL41C#glGetFloati_v GetFloati_v}, {@link GL41C#glGetDoublei_v GetDoublei_v}, {@link EXTDrawBuffers2#glGetBooleanIndexedvEXT GetBooleanIndexedvEXT}, {@link EXTDrawBuffers2#glGetIntegerIndexedvEXT GetIntegerIndexedvEXT}, and {@link EXTDirectStateAccess#glGetFloatIndexedvEXT GetFloatIndexedvEXT}. - */ - public static final int GL_SCISSOR_TEST_EXCLUSIVE_NV = 0x9555; - - /** - * Accepted by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetIntegerv GetIntegerv}, {@link GL32C#glGetInteger64v GetInteger64v}, {@link GL11C#glGetFloatv GetFloatv}, {@link GL11C#glGetDoublev GetDoublev}, {@link GL30C#glGetBooleani_v GetBooleani_v}, - * {@link GL30C#glGetIntegeri_v GetIntegeri_v}, {@link GL32C#glGetInteger64i_v GetInteger64i_v}, {@link GL41C#glGetFloati_v GetFloati_v}, {@link GL41C#glGetDoublei_v GetDoublei_v}, {@link EXTDirectStateAccess#glGetDoubleIndexedvEXT GetDoubleIndexedvEXT}, {@link EXTDrawBuffers2#glGetBooleanIndexedvEXT GetBooleanIndexedvEXT}, {@link EXTDrawBuffers2#glGetIntegerIndexedvEXT GetIntegerIndexedvEXT}, and - * {@link EXTDirectStateAccess#glGetFloatIndexedvEXT GetFloatIndexedvEXT}. - */ - public static final int GL_SCISSOR_BOX_EXCLUSIVE_NV = 0x9556; - - protected NVScissorExclusive() { - throw new UnsupportedOperationException(); - } - - // --- [ glScissorExclusiveArrayvNV ] --- - - public static native void nglScissorExclusiveArrayvNV(int first, int count, long v); - - public static void glScissorExclusiveArrayvNV(@NativeType("GLuint") int first, @NativeType("GLint const *") IntBuffer v) { - nglScissorExclusiveArrayvNV(first, v.remaining() >> 2, memAddress(v)); - } - - // --- [ glScissorExclusiveNV ] --- - - public static native void glScissorExclusiveNV(@NativeType("GLint") int x, @NativeType("GLint") int y, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height); - - /** Array version of: {@link #glScissorExclusiveArrayvNV ScissorExclusiveArrayvNV} */ - public static void glScissorExclusiveArrayvNV(@NativeType("GLuint") int first, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glScissorExclusiveArrayvNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(first, v.length >> 2, v, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderBufferLoad.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderBufferLoad.java deleted file mode 100644 index 063ea90c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderBufferLoad.java +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_shader_buffer_load extension. - * - *

    At a very coarse level, GL has evolved in a way that allows applications to replace many of the original state machine variables with blocks of - * user-defined data. For example, the current vertex state has been augmented by vertex buffer objects, fixed-function shading state and parameters have - * been replaced by shaders/programs and constant buffers, etc. Applications switch between coarse sets of state by binding objects to the context or to - * other container objects (e.g. vertex array objects) instead of manipulating state variables of the context. In terms of the number of GL commands - * required to draw an object, modern applications are orders of magnitude more efficient than legacy applications, but this explosion of objects bound to - * other objects has led to a new bottleneck - pointer chasing and CPU L2 cache misses in the driver, and general L2 cache pollution.

    - * - *

    This extension provides a mechanism to read from a flat, 64-bit GPU address space from programs/shaders, to query GPU addresses of buffer objects at the - * API level, and to bind buffer objects to the context in such a way that they can be accessed via their GPU addresses in any shader stage.

    - * - *

    The intent is that applications can avoid re-binding buffer objects or updating constants between each Draw call and instead simply use a VertexAttrib - * (or TexCoord, or InstanceID, or...) to "point" to the new object's state. In this way, one of the cheapest "state" updates (from the CPU's point of - * view) can be used to effect a significant state change in the shader similarly to how a pointer change may on the CPU. At the same time, this relieves - * the limits on how many buffer objects can be accessed at once by shaders, and allows these buffer object accesses to be exposed as C-style pointer - * dereferences in the shading language.

    - * - *

    As a very simple example, imagine packing a group of similar objects' constants into a single buffer object and pointing your program at object - * <i> by setting {@code glVertexAttribI1iEXT(attrLoc, i);} and using a shader as such:

    - * - *
    
    - * struct MyObjectType {
    - *     mat4x4 modelView;
    - *     vec4 materialPropertyX;
    - *     // etc.
    - * };
    - * uniform MyObjectType *allObjects;
    - * in int objectID; // bound to attrLoc
    - * 
    - * ...
    - * 
    - * mat4x4 thisObjectsMatrix = allObjects[objectID].modelView;
    - * // do transform, shading, etc.
    - * - *

    This is beneficial in much the same way that texture arrays allow choosing between similar, but independent, texture maps with a single coordinate - * identifying which slice of the texture to use. It also resembles instancing, where a lightweight change (incrementing the instance ID) can be used to - * generate a different and interesting result, but with additional flexibility over instancing because the values are app-controlled and not a single incrementing counter.

    - * - *

    Dependent pointer fetches are allowed, so more complex scene graph structures can be built into buffer objects providing significant new flexibility in - * the use of shaders. Another simple example, showing something you can't do with existing functionality, is to do dependent fetches into many buffer - * objects:

    - * - *
    
    - * GenBuffers(N, dataBuffers);
    - * GenBuffers(1, &pointerBuffer);
    - * 
    - * GLuint64EXT gpuAddrs[N];
    - * for (i = 0; i < N; ++i) {
    - *     BindBuffer(target, dataBuffers[i]);
    - *     BufferData(target, size[i], myData[i], STATIC_DRAW);
    - * 
    - *     // get the address of this buffer and make it resident.
    - *     GetBufferParameterui64vNV(target, BUFFER_GPU_ADDRESS,
    - *                               gpuaddrs[i]);
    - *     MakeBufferResidentNV(target, READ_ONLY);
    - * }
    - * 
    - * GLuint64EXT pointerBufferAddr;
    - * BindBuffer(target, pointerBuffer);
    - * BufferData(target, sizeof(GLuint64EXT)*N, gpuAddrs, STATIC_DRAW);
    - * GetBufferParameterui64vNV(target, BUFFER_GPU_ADDRESS,
    - *                           &pointerBufferAddr);
    - * MakeBufferResidentNV(target, READ_ONLY);
    - * 
    - * // now in the shader, we can use a double indirection
    - * vec4 **ptrToBuffers = pointerBufferAddr;
    - * vec4 *ptrToBufferI = ptrToBuffers[i];
    - * - *

    This allows simultaneous access to more buffers than {@link EXTBindableUniform EXT_bindable_uniform} ({@link EXTBindableUniform#GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT MAX_VERTEX_BINDABLE_UNIFORMS_EXT}, etc.) and each can be larger than - * {@link EXTBindableUniform#GL_MAX_BINDABLE_UNIFORM_SIZE_EXT MAX_BINDABLE_UNIFORM_SIZE_EXT}.

    - */ -public class NVShaderBufferLoad { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetBufferParameterui64vNV, GetNamedBufferParameterui64vNV. */ - public static final int GL_BUFFER_GPU_ADDRESS_NV = 0x8F1D; - - /** Returned by the {@code type} parameter of GetActiveUniform. */ - public static final int GL_GPU_ADDRESS_NV = 0x8F34; - - /** Accepted by the {@code value} parameter of GetIntegerui64vNV. */ - public static final int GL_MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35; - - protected NVShaderBufferLoad() { - throw new UnsupportedOperationException(); - } - - // --- [ glMakeBufferResidentNV ] --- - - public static native void glMakeBufferResidentNV(@NativeType("GLenum") int target, @NativeType("GLenum") int access); - - // --- [ glMakeBufferNonResidentNV ] --- - - public static native void glMakeBufferNonResidentNV(@NativeType("GLenum") int target); - - // --- [ glIsBufferResidentNV ] --- - - @NativeType("GLboolean") - public static native boolean glIsBufferResidentNV(@NativeType("GLenum") int target); - - // --- [ glMakeNamedBufferResidentNV ] --- - - public static native void glMakeNamedBufferResidentNV(@NativeType("GLuint") int buffer, @NativeType("GLenum") int access); - - // --- [ glMakeNamedBufferNonResidentNV ] --- - - public static native void glMakeNamedBufferNonResidentNV(@NativeType("GLuint") int buffer); - - // --- [ glIsNamedBufferResidentNV ] --- - - @NativeType("GLboolean") - public static native boolean glIsNamedBufferResidentNV(@NativeType("GLuint") int buffer); - - // --- [ glGetBufferParameterui64vNV ] --- - - public static native void nglGetBufferParameterui64vNV(int target, int pname, long params); - - public static void glGetBufferParameterui64vNV(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint64EXT *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetBufferParameterui64vNV(target, pname, memAddress(params)); - } - - @NativeType("void") - public static long glGetBufferParameterui64NV(@NativeType("GLenum") int target, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetBufferParameterui64vNV(target, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetNamedBufferParameterui64vNV ] --- - - public static native void nglGetNamedBufferParameterui64vNV(int buffer, int pname, long params); - - public static void glGetNamedBufferParameterui64vNV(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLuint64EXT *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetNamedBufferParameterui64vNV(buffer, pname, memAddress(params)); - } - - @NativeType("void") - public static long glGetNamedBufferParameterui64NV(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetNamedBufferParameterui64vNV(buffer, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetIntegerui64vNV ] --- - - public static native void nglGetIntegerui64vNV(int value, long result); - - public static void glGetIntegerui64vNV(@NativeType("GLenum") int value, @NativeType("GLuint64EXT *") LongBuffer result) { - if (CHECKS) { - check(result, 1); - } - nglGetIntegerui64vNV(value, memAddress(result)); - } - - @NativeType("void") - public static long glGetIntegerui64NV(@NativeType("GLenum") int value) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer result = stack.callocLong(1); - nglGetIntegerui64vNV(value, memAddress(result)); - return result.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glUniformui64NV ] --- - - public static native void glUniformui64NV(@NativeType("GLint") int location, @NativeType("GLuint64EXT") long value); - - // --- [ glUniformui64vNV ] --- - - public static native void nglUniformui64vNV(int location, int count, long value); - - public static void glUniformui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglUniformui64vNV(location, value.remaining(), memAddress(value)); - } - - // --- [ glGetUniformui64vNV ] --- - - public static native void nglGetUniformui64vNV(int program, int location, long params); - - public static void glGetUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetUniformui64vNV(program, location, memAddress(params)); - } - - @NativeType("void") - public static long glGetUniformui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetUniformui64vNV(program, location, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glProgramUniformui64NV ] --- - - public static native void glProgramUniformui64NV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT") long value); - - // --- [ glProgramUniformui64vNV ] --- - - public static native void nglProgramUniformui64vNV(int program, int location, int count, long value); - - public static void glProgramUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") LongBuffer value) { - nglProgramUniformui64vNV(program, location, value.remaining(), memAddress(value)); - } - - /** Array version of: {@link #glGetBufferParameterui64vNV GetBufferParameterui64vNV} */ - public static void glGetBufferParameterui64vNV(@NativeType("GLenum") int target, @NativeType("GLenum") int pname, @NativeType("GLuint64EXT *") long[] params) { - long __functionAddress = GL.getICD().glGetBufferParameterui64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(target, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetNamedBufferParameterui64vNV GetNamedBufferParameterui64vNV} */ - public static void glGetNamedBufferParameterui64vNV(@NativeType("GLuint") int buffer, @NativeType("GLenum") int pname, @NativeType("GLuint64EXT *") long[] params) { - long __functionAddress = GL.getICD().glGetNamedBufferParameterui64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(buffer, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetIntegerui64vNV GetIntegerui64vNV} */ - public static void glGetIntegerui64vNV(@NativeType("GLenum") int value, @NativeType("GLuint64EXT *") long[] result) { - long __functionAddress = GL.getICD().glGetIntegerui64vNV; - if (CHECKS) { - check(__functionAddress); - check(result, 1); - } - callPV(value, result, __functionAddress); - } - - /** Array version of: {@link #glUniformui64vNV Uniformui64vNV} */ - public static void glUniformui64vNV(@NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glUniformui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(location, value.length, value, __functionAddress); - } - - /** Array version of: {@link #glGetUniformui64vNV GetUniformui64vNV} */ - public static void glGetUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT *") long[] params) { - long __functionAddress = GL.getICD().glGetUniformui64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(program, location, params, __functionAddress); - } - - /** Array version of: {@link #glProgramUniformui64vNV ProgramUniformui64vNV} */ - public static void glProgramUniformui64vNV(@NativeType("GLuint") int program, @NativeType("GLint") int location, @NativeType("GLuint64EXT const *") long[] value) { - long __functionAddress = GL.getICD().glProgramUniformui64vNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, location, value.length, value, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderBufferStore.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderBufferStore.java deleted file mode 100644 index cb0f796b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderBufferStore.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_shader_buffer_store extension. - * - *

    This extension builds upon the mechanisms added by the NV_shader_buffer_load extension to allow shaders to perform random-access - * reads to buffer object memory without using dedicated buffer object binding points. Instead, it allowed an application to make a buffer - * object resident, query a GPU address (pointer) for the buffer object, and then use that address as a pointer in shader code. This approach allows - * shaders to access a large number of buffer objects without needing to repeatedly bind buffers to a limited number of fixed-functionality binding - * points.

    - * - *

    Requires {@link GL30 OpenGL 3.0}, GLSL 1.30, {@link NVShaderBufferLoad NV_shader_buffer_load}, NV_gpu_program5 and/or {@link NVGPUShader5 NV_gpu_shader5}.

    - */ -public final class NVShaderBufferStore { - - /** Accepted by the {@code barriers} parameter of MemoryBarrierNV. */ - public static final int GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = 0x10; - - private NVShaderBufferStore() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderSubgroupPartitioned.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderSubgroupPartitioned.java deleted file mode 100644 index 17277acf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderSubgroupPartitioned.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_shader_subgroup_partitioned extension. - * - *

    This extension enables support for the {@code NV_shader_subgroup_partitioned} shading language extension in OpenGL.

    - * - *

    This extension adds a new {@link #GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV SUBGROUP_FEATURE_PARTITIONED_BIT_NV} feature bit that is returned by queryies for {@link KHRShaderSubgroup#GL_SUBGROUP_SUPPORTED_FEATURES_KHR SUBGROUP_SUPPORTED_FEATURES_KHR}.

    - * - *

    In OpenGL implementations supporting SPIR-V, this extension enables support for the {@code SPV_NV_shader_subgroup_partitioned} extension.

    - * - *

    Requires {@link GL43 OpenGL 4.3} and {@link KHRShaderSubgroup KHR_shader_subgroup}.

    - */ -public final class NVShaderSubgroupPartitioned { - - /** Returned as bitfield in the {@code data} argument when {@link GL11C#glGetIntegerv GetIntegerv} is queried with a {@code pname} of {@link KHRShaderSubgroup#GL_SUBGROUP_SUPPORTED_FEATURES_KHR SUBGROUP_SUPPORTED_FEATURES_KHR}. */ - public static final int GL_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x100; - - private NVShaderSubgroupPartitioned() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderThreadGroup.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderThreadGroup.java deleted file mode 100644 index 3579376e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVShaderThreadGroup.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_shader_thread_group extension. - * - *

    Implementations of the OpenGL Shading Language may, but are not required to, run multiple shader threads for a single stage as a SIMD thread group, - * where individual execution threads are assigned to thread groups in an undefined, implementation-dependent order. This extension provides a set of new - * features to the OpenGL Shading Language to query thread states and to share data between fragments within a 2x2 pixel quad.

    - * - *

    Requires {@link GL43 OpenGL 4.3}.

    - */ -public final class NVShaderThreadGroup { - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_WARP_SIZE_NV = 0x9339, - GL_WARPS_PER_SM_NV = 0x933A, - GL_SM_COUNT_NV = 0x933B; - - private NVShaderThreadGroup() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVShadingRateImage.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVShadingRateImage.java deleted file mode 100644 index a9f78ad7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVShadingRateImage.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_shading_rate_image extension. - * - *

    By default, OpenGL runs a fragment shader once for each pixel covered by a primitive being rasterized. When using multisampling, the outputs of that - * fragment shader are broadcast to each covered sample of the fragment's pixel. When using multisampling, applications can also request that the fragment - * shader be run once per color sample (when using the {@code "sample"} qualifier on one or more active fragment shader inputs), or run a fixed number of - * times per pixel using {@link GL40#GL_SAMPLE_SHADING SAMPLE_SHADING} enable and the {@link GL40C#glMinSampleShading MinSampleShading} frequency value. In all of these approaches, the number of fragment shader - * invocations per pixel is fixed, based on API state.

    - * - *

    This extension allows applications to bind and enable a shading rate image that can be used to vary the number of fragment shader invocations across - * the framebuffer. This can be useful for applications like eye tracking for virtual reality, where the portion of the framebuffer that the user is - * looking at directly can be processed at high frequency, while distant corners of the image can be processed at lower frequency. The shading rate image - * is an immutable-format two-dimensional or two-dimensional array texture that uses a format of {@link GL30#GL_R8UI R8UI}. Each texel represents a fixed-size rectangle in - * the framebuffer, covering 16x16 pixels in the initial implementation of this extension. When rasterizing a primitive covering one of these rectangles, - * the OpenGL implementation reads the texel in the bound shading rate image and looks up the fetched value in a palette of shading rates. The shading - * rate used can vary from (finest) 16 fragment shader invocations per pixel to (coarsest) one fragment shader invocation for each 4x4 block of pixels.

    - * - *

    When this extension is advertised by an OpenGL implementation, the implementation must also support the GLSL extension - * {@code "GL_NV_shading_rate_image"} (documented separately), which provides new built-in variables that allow fragment shaders to determine the - * effective shading rate used for each fragment. Additionally, the GLSL extension also provides new layout qualifiers allowing the interlock - * functionality provided by ARB_fragment_shader_interlock to guarantee mutual exclusion across an entire fragment when the shading rate specifies - * multiple pixels per fragment shader invocation.

    - * - *

    Note that this extension requires the use of a framebuffer object; the shading rate image and related state are ignored when rendering to the default - * framebuffer.

    - * - *

    Requires {@link GL45 OpenGL 4.5} and {@link NVFramebufferMixedSamples NV_framebuffer_mixed_samples}.

    - */ -public class NVShadingRateImage { - - static { GL.initialize(); } - - /** - * Accepted by the {@code cap} parameter of {@link CGL#CGLEnable Enable}, {@link CGL#CGLDisable Disable}, and {@link CGL#CGLIsEnabled IsEnabled}, by the {@code target} parameter of {@link GL30C#glEnablei Enablei}, {@link GL30C#glDisablei Disablei}, - * {@link GL30C#glIsEnabledi IsEnabledi}, {@link EXTDrawBuffers2#glEnableIndexedEXT EnableIndexedEXT}, {@link EXTDrawBuffers2#glDisableIndexedEXT DisableIndexedEXT}, and {@link EXTDrawBuffers2#glIsEnabledIndexedEXT IsEnabledIndexedEXT}, and by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, - * {@link GL11C#glGetIntegerv GetIntegerv}, {@link GL32C#glGetInteger64v GetInteger64v}, {@link GL11C#glGetFloatv GetFloatv}, {@link GL11C#glGetDoublev GetDoublev}, {@link EXTDirectStateAccess#glGetDoubleIndexedvEXT GetDoubleIndexedvEXT}, {@link GL30C#glGetBooleani_v GetBooleani_v}, {@link GL30C#glGetIntegeri_v GetIntegeri_v}, {@link GL32C#glGetInteger64i_v GetInteger64i_v}, - * {@link GL41C#glGetFloati_v GetFloati_v}, {@link GL41C#glGetDoublei_v GetDoublei_v}, {@link EXTDrawBuffers2#glGetBooleanIndexedvEXT GetBooleanIndexedvEXT}, {@link EXTDrawBuffers2#glGetIntegerIndexedvEXT GetIntegerIndexedvEXT}, and {@link EXTDirectStateAccess#glGetFloatIndexedvEXT GetFloatIndexedvEXT}. - */ - public static final int GL_SHADING_RATE_IMAGE_NV = 0x9563; - - /** - * Accepted in the {@code rates} parameter of {@link #glShadingRateImagePaletteNV ShadingRateImagePaletteNV} and the {@code rate} parameter of {@link #glShadingRateSampleOrderCustomNV ShadingRateSampleOrderCustomNV} and - * {@link #glGetShadingRateSampleLocationivNV GetShadingRateSampleLocationivNV}; returned in the {@code rate} parameter of {@link #glGetShadingRateImagePaletteNV GetShadingRateImagePaletteNV}. - */ - public static final int - GL_SHADING_RATE_NO_INVOCATIONS_NV = 0x9564, - GL_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0x9565, - GL_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 0x9566, - GL_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 0x9567, - GL_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 0x9568, - GL_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 0x9569, - GL_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 0x956A, - GL_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 0x956B, - GL_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 0x956C, - GL_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 0x956D, - GL_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 0x956E, - GL_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 0x956F; - - /** Accepted by the {@code pname} parameter of {@link GL11C#glGetBooleanv GetBooleanv}, {@link GL11C#glGetDoublev GetDoublev}, {@link GL11C#glGetIntegerv GetIntegerv}, and {@link GL11C#glGetFloatv GetFloatv}. */ - public static final int - GL_SHADING_RATE_IMAGE_BINDING_NV = 0x955B, - GL_SHADING_RATE_IMAGE_TEXEL_WIDTH_NV = 0x955C, - GL_SHADING_RATE_IMAGE_TEXEL_HEIGHT_NV = 0x955D, - GL_SHADING_RATE_IMAGE_PALETTE_SIZE_NV = 0x955E, - GL_MAX_COARSE_FRAGMENT_SAMPLES_NV = 0x955F; - - /** Accepted by the {@code order} parameter of {@link #glShadingRateSampleOrderNV ShadingRateSampleOrderNV}. */ - public static final int - GL_SHADING_RATE_SAMPLE_ORDER_DEFAULT_NV = 0x95AE, - GL_SHADING_RATE_SAMPLE_ORDER_PIXEL_MAJOR_NV = 0x95AF, - GL_SHADING_RATE_SAMPLE_ORDER_SAMPLE_MAJOR_NV = 0x95B0; - - protected NVShadingRateImage() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindShadingRateImageNV ] --- - - public static native void glBindShadingRateImageNV(@NativeType("GLuint") int texture); - - // --- [ glShadingRateImagePaletteNV ] --- - - public static native void nglShadingRateImagePaletteNV(int viewport, int first, int count, long rates); - - public static void glShadingRateImagePaletteNV(@NativeType("GLuint") int viewport, @NativeType("GLuint") int first, @NativeType("GLenum const *") IntBuffer rates) { - nglShadingRateImagePaletteNV(viewport, first, rates.remaining(), memAddress(rates)); - } - - // --- [ glGetShadingRateImagePaletteNV ] --- - - public static native void nglGetShadingRateImagePaletteNV(int viewport, int entry, long rate); - - public static void glGetShadingRateImagePaletteNV(@NativeType("GLuint") int viewport, @NativeType("GLuint") int entry, @NativeType("GLenum *") IntBuffer rate) { - if (CHECKS) { - check(rate, 1); - } - nglGetShadingRateImagePaletteNV(viewport, entry, memAddress(rate)); - } - - // --- [ glShadingRateImageBarrierNV ] --- - - public static native void glShadingRateImageBarrierNV(@NativeType("GLboolean") boolean synchronize); - - // --- [ glShadingRateSampleOrderNV ] --- - - public static native void glShadingRateSampleOrderNV(@NativeType("GLenum") int order); - - // --- [ glShadingRateSampleOrderCustomNV ] --- - - public static native void nglShadingRateSampleOrderCustomNV(int rate, int samples, long locations); - - public static void glShadingRateSampleOrderCustomNV(@NativeType("GLenum") int rate, @NativeType("GLuint") int samples, @NativeType("GLint const *") IntBuffer locations) { - nglShadingRateSampleOrderCustomNV(rate, samples, memAddress(locations)); - } - - // --- [ glGetShadingRateSampleLocationivNV ] --- - - public static native void nglGetShadingRateSampleLocationivNV(int rate, int samples, int index, long location); - - public static void glGetShadingRateSampleLocationivNV(@NativeType("GLenum") int rate, @NativeType("GLuint") int samples, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer location) { - if (CHECKS) { - check(location, 3); - } - nglGetShadingRateSampleLocationivNV(rate, samples, index, memAddress(location)); - } - - /** Array version of: {@link #glShadingRateImagePaletteNV ShadingRateImagePaletteNV} */ - public static void glShadingRateImagePaletteNV(@NativeType("GLuint") int viewport, @NativeType("GLuint") int first, @NativeType("GLenum const *") int[] rates) { - long __functionAddress = GL.getICD().glShadingRateImagePaletteNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(viewport, first, rates.length, rates, __functionAddress); - } - - /** Array version of: {@link #glGetShadingRateImagePaletteNV GetShadingRateImagePaletteNV} */ - public static void glGetShadingRateImagePaletteNV(@NativeType("GLuint") int viewport, @NativeType("GLuint") int entry, @NativeType("GLenum *") int[] rate) { - long __functionAddress = GL.getICD().glGetShadingRateImagePaletteNV; - if (CHECKS) { - check(__functionAddress); - check(rate, 1); - } - callPV(viewport, entry, rate, __functionAddress); - } - - /** Array version of: {@link #glShadingRateSampleOrderCustomNV ShadingRateSampleOrderCustomNV} */ - public static void glShadingRateSampleOrderCustomNV(@NativeType("GLenum") int rate, @NativeType("GLuint") int samples, @NativeType("GLint const *") int[] locations) { - long __functionAddress = GL.getICD().glShadingRateSampleOrderCustomNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(rate, samples, locations, __functionAddress); - } - - /** Array version of: {@link #glGetShadingRateSampleLocationivNV GetShadingRateSampleLocationivNV} */ - public static void glGetShadingRateSampleLocationivNV(@NativeType("GLenum") int rate, @NativeType("GLuint") int samples, @NativeType("GLuint") int index, @NativeType("GLint *") int[] location) { - long __functionAddress = GL.getICD().glGetShadingRateSampleLocationivNV; - if (CHECKS) { - check(__functionAddress); - check(location, 3); - } - callPV(rate, samples, index, location, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTexgenReflection.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTexgenReflection.java deleted file mode 100644 index c21e4291..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTexgenReflection.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_texgen_reflection extension. - * - *

    This extension provides two new texture coordinate generation modes that are useful texture-based lighting and environment mapping.

    - */ -public final class NVTexgenReflection { - - /** Accepted by the {@code param} parameter of TexGend, TexGenf, TexGeni when {@code pname} parameter is TEXTURE_GEN_MODE */ - public static final int - GL_NORMAL_MAP_NV = 0x8511, - GL_REFLECTION_MAP_NV = 0x8512; - - private NVTexgenReflection() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureBarrier.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureBarrier.java deleted file mode 100644 index 8a610605..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureBarrier.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_texture_barrier extension. - * - *

    This extension relaxes the restrictions on rendering to a currently bound texture and provides a mechanism to avoid read-after-write hazards.

    - */ -public class NVTextureBarrier { - - static { GL.initialize(); } - - protected NVTextureBarrier() { - throw new UnsupportedOperationException(); - } - - // --- [ glTextureBarrierNV ] --- - - /** Guarantees that writes have completed and caches have been invalidated before subsequent Draws are executed. */ - public static native void glTextureBarrierNV(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureMultisample.java deleted file mode 100644 index cc1111d1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureMultisample.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_texture_multisample extension. - * - *

    This specification extends NV_gpu_program4 to support per-sample fetching from multisample textures described in - * {@link ARBTextureMultisample ARB_texture_multisample}.

    - * - *

    Requires {@link GL20 OpenGL 2.0}, {@link ARBTextureMultisample ARB_texture_multisample}.

    - */ -public class NVTextureMultisample { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of GetTexLevelParameter. */ - public static final int - GL_TEXTURE_COVERAGE_SAMPLES_NV = 0x9045, - GL_TEXTURE_COLOR_SAMPLES_NV = 0x9046; - - protected NVTextureMultisample() { - throw new UnsupportedOperationException(); - } - - // --- [ glTexImage2DMultisampleCoverageNV ] --- - - public static native void glTexImage2DMultisampleCoverageNV(@NativeType("GLenum") int target, @NativeType("GLsizei") int coverageSamples, @NativeType("GLsizei") int colorSamples, @NativeType("GLint") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedSampleLocations); - - // --- [ glTexImage3DMultisampleCoverageNV ] --- - - public static native void glTexImage3DMultisampleCoverageNV(@NativeType("GLenum") int target, @NativeType("GLsizei") int coverageSamples, @NativeType("GLsizei") int colorSamples, @NativeType("GLint") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedSampleLocations); - - // --- [ glTextureImage2DMultisampleNV ] --- - - public static native void glTextureImage2DMultisampleNV(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedSampleLocations); - - // --- [ glTextureImage3DMultisampleNV ] --- - - public static native void glTextureImage3DMultisampleNV(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int samples, @NativeType("GLint") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedSampleLocations); - - // --- [ glTextureImage2DMultisampleCoverageNV ] --- - - public static native void glTextureImage2DMultisampleCoverageNV(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int coverageSamples, @NativeType("GLsizei") int colorSamples, @NativeType("GLint") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLboolean") boolean fixedSampleLocations); - - // --- [ glTextureImage3DMultisampleCoverageNV ] --- - - public static native void glTextureImage3DMultisampleCoverageNV(@NativeType("GLuint") int texture, @NativeType("GLenum") int target, @NativeType("GLsizei") int coverageSamples, @NativeType("GLsizei") int colorSamples, @NativeType("GLint") int internalFormat, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth, @NativeType("GLboolean") boolean fixedSampleLocations); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader.java deleted file mode 100644 index 64594dc4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_texture_shader extension. - * - *

    Standard OpenGL and the ARB_multitexture extension define a straightforward direct mechanism for mapping sets of texture coordinates to filtered - * colors. This extension provides a more functional mechanism.

    - * - *

    OpenGL's standard texturing mechanism defines a set of texture targets. Each texture target defines how the texture image is specified and accessed via - * a set of texture coordinates. OpenGL 1.0 defines the 1D and 2D texture targets. OpenGL 1.2 (and/or the EXT_texture3D extension) defines the 3D texture - * target. The ARB_texture_cube_map extension defines the cube map texture target. Each texture unit's texture coordinate set is mapped to a color using - * the unit's highest priority enabled texture target.

    - * - *

    This extension introduces texture shader stages. A sequence of texture shader stages provides a more flexible mechanism for mapping sets of texture - * coordinates to texture unit RGBA results than standard OpenGL.

    - * - *

    When the texture shader enable is on, the extension replaces the conventional OpenGL mechanism for mapping sets of texture coordinates to filtered - * colors with this extension's sequence of texture shader stages.

    - * - *

    Each texture shader stage runs one of 21 canned texture shader programs. These programs support conventional OpenGL texture mapping but also support - * dependent texture accesses, dot product texture programs, and special modes. (3D texture mapping texture shader operations are NOT provided by this - * extension; 3D texture mapping texture shader operations are added by the NV_texture_shader2 extension that is layered on this extension. See the - * NV_texture_shader2 specification.)

    - * - *

    To facilitate the new texture shader programs, this extension introduces several new texture formats and variations on existing formats. Existing color - * texture formats are extended by introducing new signed variants. Two new types of texture formats (beyond colors) are also introduced. Texture offset - * groups encode two signed offsets, and optionally a magnitude or a magnitude and an intensity. The new HILO (pronounced high-low) formats provide - * possibly signed, high precision (16-bit) two-component textures.

    - * - *

    Each program takes as input the stage's interpolated texture coordinate set (s,t,r,q). Each program generates two results: a shader stage result that - * may be used as an input to subsequent shader stage programs, and a texture unit RGBA result that becomes the texture color used by the texture unit's - * texture environment function or becomes the initial value for the corresponding texture register for register combiners. The texture unit RGBA result - * is always an RGBA color, but the shader stage result may be one of an RGBA color, a HILO value, a texture offset group, a floating-point value, or an - * invalid result. When both results are RGBA colors, the shader stage result and the texture unit RGBA result are usually identical (though not in all - * cases).

    - * - *

    Additionally, certain programs have a side-effect such as culling the fragment or replacing the fragment's depth value.

    - * - *

    Requires {@link ARBMultitexture ARB_multitexture} and {@link ARBTextureCubeMap ARB_texture_cube_map}.

    - */ -public final class NVTextureShader { - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev, and by the {@code target} parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv. - */ - public static final int GL_TEXTURE_SHADER_NV = 0x86DE; - - /** - * When the {@code target} parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value of - * {@code pname} may be. - */ - public static final int - GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9, - GL_SHADER_OPERATION_NV = 0x86DF, - GL_OFFSET_TEXTURE_SCALE_NV = 0x86E2, - GL_OFFSET_TEXTURE_BIAS_NV = 0x86E3, - GL_PREVIOUS_TEXTURE_INPUT_NV = 0x86E4; - - /** When the {@code target} parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value of {@code pname} may be. */ - public static final int - GL_CULL_MODES_NV = 0x86E0, - GL_OFFSET_TEXTURE_MATRIX_NV = 0x86E1, - GL_CONST_EYE_NV = 0x86E5; - - /** When the {@code target} parameter GetTexEnvfv and GetTexEnviv is TEXTURE_SHADER_NV, then the value of {@code pname} may be. */ - public static final int GL_SHADER_CONSISTENT_NV = 0x86DD; - - /** - * When the {@code target} and {@code pname} parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV - * respectively, then the value of {@code param} or the value pointed to by {@code params} may be. - */ - public static final int - GL_PASS_THROUGH_NV = 0x86E6, - GL_CULL_FRAGMENT_NV = 0x86E7, - GL_OFFSET_TEXTURE_2D_NV = 0x86E8, - GL_OFFSET_TEXTURE_RECTANGLE_NV = 0x864C, - GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D, - GL_DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9, - GL_DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA, - GL_DOT_PRODUCT_NV = 0x86EC, - GL_DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED, - GL_DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE, - GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E, - GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0, - GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1, - GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2, - GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3; - - /** Accepted by the {@code format} parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D. */ - public static final int - GL_HILO_NV = 0x86F4, - GL_DSDT_NV = 0x86F5, - GL_DSDT_MAG_NV = 0x86F6, - GL_DSDT_MAG_VIB_NV = 0x86F7; - - /** Accepted by the {@code type} parameter of GetTexImage, TexImage1D, TexImage2D, TexSubImage1D, and TexSubImage2D. */ - public static final int - GL_UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA, - GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB; - - /** Accepted by the {@code internalformat} parameter of CopyTexImage1D, CopyTexImage2D, TexImage1D, and TexImage2D. */ - public static final int - GL_SIGNED_RGBA_NV = 0x86FB, - GL_SIGNED_RGBA8_NV = 0x86FC, - GL_SIGNED_RGB_NV = 0x86FE, - GL_SIGNED_RGB8_NV = 0x86FF, - GL_SIGNED_LUMINANCE_NV = 0x8701, - GL_SIGNED_LUMINANCE8_NV = 0x8702, - GL_SIGNED_LUMINANCE_ALPHA_NV = 0x8703, - GL_SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704, - GL_SIGNED_ALPHA_NV = 0x8705, - GL_SIGNED_ALPHA8_NV = 0x8706, - GL_SIGNED_INTENSITY_NV = 0x8707, - GL_SIGNED_INTENSITY8_NV = 0x8708, - GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C, - GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D; - - /** Accepted by the {@code internalformat} parameter of TexImage1D and TexImage2D. */ - public static final int - GL_HILO16_NV = 0x86F8, - GL_SIGNED_HILO_NV = 0x86F9, - GL_SIGNED_HILO16_NV = 0x86FA, - GL_DSDT8_NV = 0x8709, - GL_DSDT8_MAG8_NV = 0x870A, - GL_DSDT_MAG_INTENSITY_NV = 0x86DC, - GL_DSDT8_MAG8_INTENSITY8_NV = 0x870B; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi. */ - public static final int - GL_HI_SCALE_NV = 0x870E, - GL_LO_SCALE_NV = 0x870F, - GL_DS_SCALE_NV = 0x8710, - GL_DT_SCALE_NV = 0x8711, - GL_MAGNITUDE_SCALE_NV = 0x8712, - GL_VIBRANCE_SCALE_NV = 0x8713, - GL_HI_BIAS_NV = 0x8714, - GL_LO_BIAS_NV = 0x8715, - GL_DS_BIAS_NV = 0x8716, - GL_DT_BIAS_NV = 0x8717, - GL_MAGNITUDE_BIAS_NV = 0x8718, - GL_VIBRANCE_BIAS_NV = 0x8719; - - /** Accepted by the {@code pname} parameter of TexParameteriv, TexParameterfv, GetTexParameterfv and GetTexParameteriv. */ - public static final int GL_TEXTURE_BORDER_VALUES_NV = 0x871A; - - /** Accepted by the {@code pname} parameter of GetTexLevelParameterfv and GetTexLevelParameteriv. */ - public static final int - GL_TEXTURE_HI_SIZE_NV = 0x871B, - GL_TEXTURE_LO_SIZE_NV = 0x871C, - GL_TEXTURE_DS_SIZE_NV = 0x871D, - GL_TEXTURE_DT_SIZE_NV = 0x871E, - GL_TEXTURE_MAG_SIZE_NV = 0x871F; - - private NVTextureShader() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader2.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader2.java deleted file mode 100644 index 2ff9038c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader2.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_texture_shader2 extension. - * - *

    This extension extends the {@code NV_texture_shader} functionality to support texture shader operations for 3D textures.

    - * - *

    Requires {@link NVTextureShader NV_texture_shader}.

    - */ -public final class NVTextureShader2 { - - /** - * When the {@code target} and {@code pname} parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV - * respectively, then the value of {@code param} or the value pointed to by {@code params} may be. - */ - public static final int GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF; - - private NVTextureShader2() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader3.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader3.java deleted file mode 100644 index 781bfef2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTextureShader3.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_texture_shader3 extension. - * - *

    {@code NV_texture_shader3} extends the {@code NV_texture_shader} functionality by adding several new texture shader operations, extending several - * existing texture shader operations, adding a new {@code HILO8} internal format, and adding new and more flexible re-mapping modes for dot product and - * dependent texture shader operations.

    - * - *

    Requires {@link NVTextureShader NV_texture_shader} and {@link NVTextureShader2 NV_texture_shader2}.

    - */ -public final class NVTextureShader3 { - - /** - * When the {@code target} and {@code pname} parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV - * respectively, then the value of {@code param} or the value pointed to by {@code params} may be. - */ - public static final int - GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850, - GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851, - GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852, - GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853, - GL_OFFSET_HILO_TEXTURE_2D_NV = 0x8854, - GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855, - GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856, - GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857, - GL_DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858, - GL_DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859, - GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A, - GL_DOT_PRODUCT_PASS_THROUGH_NV = 0x885B, - GL_DOT_PRODUCT_TEXTURE_1D_NV = 0x885C, - GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D; - - /** Accepted by the {@code internalformat} parameter of TexImage1D, TexImage2D, and TexImage3D. */ - public static final int - GL_HILO8_NV = 0x885E, - GL_SIGNED_HILO8_NV = 0x885F; - - /** - * When the {@code target} and {@code pname} parameters of TexEnvf, TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and - * RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV respectively, then the value of {@code param} or the value pointed to by {@code params} may be. - */ - public static final int GL_FORCE_BLUE_TO_ONE_NV = 0x8860; - - private NVTextureShader3() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTimelineSemaphore.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTimelineSemaphore.java deleted file mode 100644 index 86c56de1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTimelineSemaphore.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_timeline_semaphore extension. - * - *

    The Vulkan API introduces the concept of timeline semaphores. This extension brings those concepts to the OpenGL API by adding a semaphore type to the - * semaphore object. In OpenGL, timeline semaphore signal and wait operations are similar to the corresponding operations on imported Direct3D 12 fences - * defined in EXT_external_objects_win32.

    - * - *

    Requires {@link EXTSemaphore EXT_semaphore} or a version of OpenGL that incorporates it.

    - */ -public class NVTimelineSemaphore { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of SemaphoreParameterivNV and GetSemaphoreParameterivNV. */ - public static final int GL_SEMAPHORE_TYPE_NV = 0x95B3; - - /** Accepted by the {@code param} parameter of SemaphoreParameterivNV and GetSemaphoreParameterivNV when {@code pname} parameter is SEMAPHORE_TYPE_NV. */ - public static final int - GL_SEMAPHORE_TYPE_BINARY_NV = 0x95B4, - GL_SEMAPHORE_TYPE_TIMELINE_NV = 0x95B5; - - /** Accepted by the {@code pname} parameter of SemaphoreParameterui64vNV and GetSemaphoreParameterui64vNV. */ - public static final int GL_TIMELINE_SEMAPHORE_VALUE_NV = 0x9595; - - /** Accepted by the {@code pname} parameter to GetIntegerv, GetFloatv, GetDoublev, GetInteger64v, and GetBooleanv. */ - public static final int GL_MAX_TIMELINE_SEMAPHORE_VALUE_DIFFERENCE_NV = 0x95B6; - - protected NVTimelineSemaphore() { - throw new UnsupportedOperationException(); - } - - // --- [ glCreateSemaphoresNV ] --- - - public static native void nglCreateSemaphoresNV(int n, long semaphores); - - public static void glCreateSemaphoresNV(@NativeType("GLuint *") IntBuffer semaphores) { - nglCreateSemaphoresNV(semaphores.remaining(), memAddress(semaphores)); - } - - @NativeType("void") - public static int glCreateSemaphoresNV() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer semaphores = stack.callocInt(1); - nglCreateSemaphoresNV(1, memAddress(semaphores)); - return semaphores.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glSemaphoreParameterivNV ] --- - - public static native void nglSemaphoreParameterivNV(int semaphore, int pname, long params); - - public static void glSemaphoreParameterivNV(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLint const *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglSemaphoreParameterivNV(semaphore, pname, memAddress(params)); - } - - // --- [ glGetSemaphoreParameterivNV ] --- - - public static native void nglGetSemaphoreParameterivNV(int semaphore, int pname, long params); - - public static void glGetSemaphoreParameterivNV(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLint *") IntBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetSemaphoreParameterivNV(semaphore, pname, memAddress(params)); - } - - /** Array version of: {@link #glCreateSemaphoresNV CreateSemaphoresNV} */ - public static void glCreateSemaphoresNV(@NativeType("GLuint *") int[] semaphores) { - long __functionAddress = GL.getICD().glCreateSemaphoresNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(semaphores.length, semaphores, __functionAddress); - } - - /** Array version of: {@link #glSemaphoreParameterivNV SemaphoreParameterivNV} */ - public static void glSemaphoreParameterivNV(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLint const *") int[] params) { - long __functionAddress = GL.getICD().glSemaphoreParameterivNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(semaphore, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetSemaphoreParameterivNV GetSemaphoreParameterivNV} */ - public static void glGetSemaphoreParameterivNV(@NativeType("GLuint") int semaphore, @NativeType("GLenum") int pname, @NativeType("GLint *") int[] params) { - long __functionAddress = GL.getICD().glGetSemaphoreParameterivNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(semaphore, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTransformFeedback.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTransformFeedback.java deleted file mode 100644 index 51222b68..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTransformFeedback.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_transform_feedback extension. - * - *

    This extension provides a new mode to the GL, called transform feedback, which records vertex attributes of the primitives processed by the GL. The - * selected attributes are written into buffer objects, and can be written with each attribute in a separate buffer object or with all attributes - * interleaved into a single buffer object. If a geometry program or shader is active, the primitives recorded are those emitted by the geometry program. - * Otherwise, transform feedback captures primitives whose vertex are transformed by a vertex program or shader, or by fixed-function vertex processing. - * In either case, the primitives captured are those generated prior to clipping. Transform feedback mode is capable of capturing transformed vertex data - * generated by fixed-function vertex processing, outputs from assembly vertex or geometry programs, or varying variables emitted from GLSL vertex or - * geometry shaders.

    - * - *

    The vertex data recorded in transform feedback mode is stored into buffer objects as an array of vertex attributes. The regular representation and the - * use of buffer objects allows the recorded data to be processed directly by the GL without requiring CPU intervention to copy data. In particular, - * transform feedback data can be used for vertex arrays (via vertex buffer objects), as the source for pixel data (via pixel buffer objects), as program - * constant data (via the NV_parameter_buffer_object or EXT_bindable_uniform extension), or via any other extension that makes use of buffer objects.

    - * - *

    This extension introduces new query object support to allow transform feedback mode to operate asynchronously. Query objects allow applications to - * determine when transform feedback results are complete, as well as the number of primitives processed and written back to buffer objects while in - * transform feedback mode. This extension also provides a new rasterizer discard enable, which allows applications to use transform feedback to capture - * vertex attributes without rendering anything.

    - * - *

    Requires {@link GL15 OpenGL 1.5}.

    - */ -public class NVTransformFeedback { - - static { GL.initialize(); } - - /** - * Accepted by the {@code target} parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferPointerv, - * BindBufferRangeNV, BindBufferOffsetNV and BindBufferBaseNV. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_NV = 0x8C8E; - - /** Accepted by the {@code param} parameter of GetIntegerIndexedvEXT and GetBooleanIndexedvEXT. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_START_NV = 0x8C84, - GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = 0x8C85, - GL_TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86; - - /** - * Accepted by the {@code param} parameter of GetIntegerIndexedvEXT and GetBooleanIndexedvEXT, and by the {@code pname} parameter of GetBooleanv, - * GetDoublev, GetIntegerv, and GetFloatv. - */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = 0x8C8F; - - /** Accepted by the {@code bufferMode} parameter of TransformFeedbackAttribsNV and TransformFeedbackVaryingsNV. */ - public static final int - GL_INTERLEAVED_ATTRIBS_NV = 0x8C8C, - GL_SEPARATE_ATTRIBS_NV = 0x8C8D; - - /** Accepted by the {@code target} parameter of BeginQuery, EndQuery, and GetQueryiv. */ - public static final int - GL_PRIMITIVES_GENERATED_NV = 0x8C87, - GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = 0x8C88; - - /** - * Accepted by the {@code cap} parameter of Enable, Disable, and IsEnabled, and by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and - * GetDoublev. - */ - public static final int GL_RASTERIZER_DISCARD_NV = 0x8C89; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV = 0x8C8A, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = 0x8C8B, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = 0x8C80, - GL_TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E; - - /** Accepted by the {@code pname} parameter of GetProgramiv. */ - public static final int - GL_ACTIVE_VARYINGS_NV = 0x8C81, - GL_ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82, - GL_TRANSFORM_FEEDBACK_VARYINGS_NV = 0x8C83; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, GetFloatv, and GetProgramiv. */ - public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV = 0x8C7F; - - /** Accepted by the {@code attribs} parameter of TransformFeedbackAttribsNV. */ - public static final int - GL_BACK_PRIMARY_COLOR_NV = 0x8C77, - GL_BACK_SECONDARY_COLOR_NV = 0x8C78, - GL_TEXTURE_COORD_NV = 0x8C79, - GL_CLIP_DISTANCE_NV = 0x8C7A, - GL_VERTEX_ID_NV = 0x8C7B, - GL_PRIMITIVE_ID_NV = 0x8C7C, - GL_GENERIC_ATTRIB_NV = 0x8C7D, - GL_SECONDARY_COLOR_NV = 0x852D, - GL_LAYER_NV = 0x8DAA; - - protected NVTransformFeedback() { - throw new UnsupportedOperationException(); - } - - // --- [ glBeginTransformFeedbackNV ] --- - - public static native void glBeginTransformFeedbackNV(@NativeType("GLenum") int primitiveMode); - - // --- [ glEndTransformFeedbackNV ] --- - - public static native void glEndTransformFeedbackNV(); - - // --- [ glTransformFeedbackAttribsNV ] --- - - public static native void nglTransformFeedbackAttribsNV(int count, long attribs, int bufferMode); - - public static void glTransformFeedbackAttribsNV(@NativeType("GLint const *") IntBuffer attribs, @NativeType("GLenum") int bufferMode) { - nglTransformFeedbackAttribsNV(attribs.remaining(), memAddress(attribs), bufferMode); - } - - // --- [ glBindBufferRangeNV ] --- - - public static native void glBindBufferRangeNV(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset, @NativeType("GLsizeiptr") long size); - - // --- [ glBindBufferOffsetNV ] --- - - public static native void glBindBufferOffsetNV(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer, @NativeType("GLintptr") long offset); - - // --- [ glBindBufferBaseNV ] --- - - public static native void glBindBufferBaseNV(@NativeType("GLenum") int target, @NativeType("GLuint") int index, @NativeType("GLuint") int buffer); - - // --- [ glTransformFeedbackVaryingsNV ] --- - - public static native void nglTransformFeedbackVaryingsNV(int program, int count, long locations, int bufferMode); - - public static void glTransformFeedbackVaryingsNV(@NativeType("GLuint") int program, @NativeType("GLint const *") IntBuffer locations, @NativeType("GLenum") int bufferMode) { - nglTransformFeedbackVaryingsNV(program, locations.remaining(), memAddress(locations), bufferMode); - } - - // --- [ glActiveVaryingNV ] --- - - public static native void nglActiveVaryingNV(int program, long name); - - public static void glActiveVaryingNV(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - nglActiveVaryingNV(program, memAddress(name)); - } - - public static void glActiveVaryingNV(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - nglActiveVaryingNV(program, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVaryingLocationNV ] --- - - public static native int nglGetVaryingLocationNV(int program, long name); - - @NativeType("GLint") - public static int glGetVaryingLocationNV(@NativeType("GLuint") int program, @NativeType("GLchar const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nglGetVaryingLocationNV(program, memAddress(name)); - } - - @NativeType("GLint") - public static int glGetVaryingLocationNV(@NativeType("GLuint") int program, @NativeType("GLchar const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nglGetVaryingLocationNV(program, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetActiveVaryingNV ] --- - - public static native void nglGetActiveVaryingNV(int program, int index, int bufSize, long length, long size, long type, long name); - - public static void glGetActiveVaryingNV(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") IntBuffer length, @NativeType("GLsizei *") IntBuffer size, @NativeType("GLenum *") IntBuffer type, @NativeType("GLchar *") ByteBuffer name) { - if (CHECKS) { - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - nglGetActiveVaryingNV(program, index, name.remaining(), memAddressSafe(length), memAddress(size), memAddress(type), memAddress(name)); - } - - // --- [ glGetTransformFeedbackVaryingNV ] --- - - public static native void nglGetTransformFeedbackVaryingNV(int program, int index, long location); - - public static void glGetTransformFeedbackVaryingNV(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLint *") IntBuffer location) { - if (CHECKS) { - check(location, 1); - } - nglGetTransformFeedbackVaryingNV(program, index, memAddress(location)); - } - - @NativeType("void") - public static int glGetTransformFeedbackVaryingNV(@NativeType("GLuint") int program, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer location = stack.callocInt(1); - nglGetTransformFeedbackVaryingNV(program, index, memAddress(location)); - return location.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glTransformFeedbackStreamAttribsNV ] --- - - public static native void nglTransformFeedbackStreamAttribsNV(int count, long attribs, int nbuffers, long bufstreams, int bufferMode); - - public static void glTransformFeedbackStreamAttribsNV(@NativeType("GLint const *") IntBuffer attribs, @NativeType("GLint const *") IntBuffer bufstreams, @NativeType("GLenum") int bufferMode) { - nglTransformFeedbackStreamAttribsNV(attribs.remaining(), memAddress(attribs), bufstreams.remaining(), memAddress(bufstreams), bufferMode); - } - - /** Array version of: {@link #glTransformFeedbackAttribsNV TransformFeedbackAttribsNV} */ - public static void glTransformFeedbackAttribsNV(@NativeType("GLint const *") int[] attribs, @NativeType("GLenum") int bufferMode) { - long __functionAddress = GL.getICD().glTransformFeedbackAttribsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(attribs.length, attribs, bufferMode, __functionAddress); - } - - /** Array version of: {@link #glTransformFeedbackVaryingsNV TransformFeedbackVaryingsNV} */ - public static void glTransformFeedbackVaryingsNV(@NativeType("GLuint") int program, @NativeType("GLint const *") int[] locations, @NativeType("GLenum") int bufferMode) { - long __functionAddress = GL.getICD().glTransformFeedbackVaryingsNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(program, locations.length, locations, bufferMode, __functionAddress); - } - - /** Array version of: {@link #glGetActiveVaryingNV GetActiveVaryingNV} */ - public static void glGetActiveVaryingNV(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @Nullable @NativeType("GLsizei *") int[] length, @NativeType("GLsizei *") int[] size, @NativeType("GLenum *") int[] type, @NativeType("GLchar *") ByteBuffer name) { - long __functionAddress = GL.getICD().glGetActiveVaryingNV; - if (CHECKS) { - check(__functionAddress); - checkSafe(length, 1); - check(size, 1); - check(type, 1); - } - callPPPPV(program, index, name.remaining(), length, size, type, memAddress(name), __functionAddress); - } - - /** Array version of: {@link #glGetTransformFeedbackVaryingNV GetTransformFeedbackVaryingNV} */ - public static void glGetTransformFeedbackVaryingNV(@NativeType("GLuint") int program, @NativeType("GLuint") int index, @NativeType("GLint *") int[] location) { - long __functionAddress = GL.getICD().glGetTransformFeedbackVaryingNV; - if (CHECKS) { - check(__functionAddress); - check(location, 1); - } - callPV(program, index, location, __functionAddress); - } - - /** Array version of: {@link #glTransformFeedbackStreamAttribsNV TransformFeedbackStreamAttribsNV} */ - public static void glTransformFeedbackStreamAttribsNV(@NativeType("GLint const *") int[] attribs, @NativeType("GLint const *") int[] bufstreams, @NativeType("GLenum") int bufferMode) { - long __functionAddress = GL.getICD().glTransformFeedbackStreamAttribsNV; - if (CHECKS) { - check(__functionAddress); - } - callPPV(attribs.length, attribs, bufstreams.length, bufstreams, bufferMode, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVTransformFeedback2.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVTransformFeedback2.java deleted file mode 100644 index 78fcc4ba..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVTransformFeedback2.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_transform_feedback2 extension. - * - *

    The NV_transform_feedback and EXT_transform_feedback extensions allow applications to capture primitives to one or more buffer objects when transformed - * by the GL. This extension provides a few additional capabilities to these extensions, making transform feedback mode more useful.

    - * - *

    First, it provides transform feedback objects encapsulating transform feedback-related state, allowing applications to replace the entire transform - * feedback configuration in a single bind call. Second, it provides the ability to pause and resume transform feedback operations. When transform - * feedback is paused, applications may render without transform feedback or may use transform feedback with different state and a different transform - * feedback object. When transform feedback is resumed, additional primitives are captured and appended to previously captured primitives for the object.

    - * - *

    Additionally, this extension provides the ability to draw primitives captured in transform feedback mode without querying the captured primitive count. - * The command DrawTransformFeedbackNV() is equivalent to {@code glDrawArrays(, 0, )}, where {@code count} is the number of vertices captured - * to buffer objects during the last transform feedback capture operation on the transform feedback object used. This draw operation only provides a - * vertex count -- it does not automatically set up vertex array state or vertex buffer object bindings, which must be done separately by the application.

    - * - *

    Requires {@link GL15 OpenGL 1.5} and {@link NVTransformFeedback NV_transform_feedback} or {@link EXTTransformFeedback EXT_transform_feedback}.

    - */ -public class NVTransformFeedback2 { - - static { GL.initialize(); } - - /** Accepted by the {@code target} parameter of BindTransformFeedbackNV. */ - public static final int GL_TRANSFORM_FEEDBACK_NV = 0x8E22; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetDoublev, GetIntegerv, and GetFloatv. */ - public static final int - GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = 0x8E23, - GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = 0x8E24, - GL_TRANSFORM_FEEDBACK_BINDING_NV = 0x8E25; - - protected NVTransformFeedback2() { - throw new UnsupportedOperationException(); - } - - // --- [ glBindTransformFeedbackNV ] --- - - public static native void glBindTransformFeedbackNV(@NativeType("GLenum") int target, @NativeType("GLuint") int id); - - // --- [ glDeleteTransformFeedbacksNV ] --- - - public static native void nglDeleteTransformFeedbacksNV(int n, long ids); - - public static void glDeleteTransformFeedbacksNV(@NativeType("GLuint const *") IntBuffer ids) { - nglDeleteTransformFeedbacksNV(ids.remaining(), memAddress(ids)); - } - - public static void glDeleteTransformFeedbacksNV(@NativeType("GLuint const *") int id) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.ints(id); - nglDeleteTransformFeedbacksNV(1, memAddress(ids)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGenTransformFeedbacksNV ] --- - - public static native void nglGenTransformFeedbacksNV(int n, long ids); - - public static void glGenTransformFeedbacksNV(@NativeType("GLuint *") IntBuffer ids) { - if (CHECKS) { - check(ids, 1); - } - nglGenTransformFeedbacksNV(ids.remaining(), memAddress(ids)); - } - - @NativeType("void") - public static int glGenTransformFeedbacksNV() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer ids = stack.callocInt(1); - nglGenTransformFeedbacksNV(1, memAddress(ids)); - return ids.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glIsTransformFeedbackNV ] --- - - @NativeType("GLboolean") - public static native boolean glIsTransformFeedbackNV(@NativeType("GLuint") int id); - - // --- [ glPauseTransformFeedbackNV ] --- - - public static native void glPauseTransformFeedbackNV(); - - // --- [ glResumeTransformFeedbackNV ] --- - - public static native void glResumeTransformFeedbackNV(); - - // --- [ glDrawTransformFeedbackNV ] --- - - public static native void glDrawTransformFeedbackNV(@NativeType("GLenum") int mode, @NativeType("GLuint") int id); - - /** Array version of: {@link #glDeleteTransformFeedbacksNV DeleteTransformFeedbacksNV} */ - public static void glDeleteTransformFeedbacksNV(@NativeType("GLuint const *") int[] ids) { - long __functionAddress = GL.getICD().glDeleteTransformFeedbacksNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(ids.length, ids, __functionAddress); - } - - /** Array version of: {@link #glGenTransformFeedbacksNV GenTransformFeedbacksNV} */ - public static void glGenTransformFeedbacksNV(@NativeType("GLuint *") int[] ids) { - long __functionAddress = GL.getICD().glGenTransformFeedbacksNV; - if (CHECKS) { - check(__functionAddress); - check(ids, 1); - } - callPV(ids.length, ids, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVUniformBufferUnifiedMemory.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVUniformBufferUnifiedMemory.java deleted file mode 100644 index 69ef91ad..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVUniformBufferUnifiedMemory.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_uniform_buffer_unified_memory extension. - * - *

    This extension provides a mechanism to specify uniform buffers - * using GPU addresses.

    - * - *

    Binding uniform buffers is one of the most frequent and expensive - * operations in many GL applications, due to the cost of chasing - * pointers and binding objects described in the overview of - * NV_shader_buffer_load. The intent of this extension is to enable a - * way for the application to specify uniform buffer state that alleviates - * the overhead of object binds and driver memory management.

    - */ -public final class NVUniformBufferUnifiedMemory { - - /** Accepted by the {@code cap} parameter of DisableClientState, EnableClientState, IsEnabled. */ - public static final int GL_UNIFORM_BUFFER_UNIFIED_NV = 0x936E; - - /** Accepted by the {@code pname} parameter of BufferAddressRangeNV and the {@code value} parameter of GetIntegerui64i_vNV. */ - public static final int GL_UNIFORM_BUFFER_ADDRESS_NV = 0x936F; - - /** Accepted by the {@code target} parameter of GetIntegeri_vNV. */ - public static final int GL_UNIFORM_BUFFER_LENGTH_NV = 0x9370; - - private NVUniformBufferUnifiedMemory() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexArrayRange.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexArrayRange.java deleted file mode 100644 index b7703804..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexArrayRange.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_vertex_array_range extension. - * - *

    The goal of this extension is to permit extremely high vertex processing rates via OpenGL vertex arrays even when the CPU lacks the necessary data - * movement bandwidth to keep up with the rate at which the vertex engine can consume vertices.

    - */ -public class NVVertexArrayRange { - - static { GL.initialize(); } - - /** Accepted by the {@code cap} parameter of EnableClientState, DisableClientState, and IsEnabled. */ - public static final int GL_VERTEX_ARRAY_RANGE_NV = 0x851D; - - /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E, - GL_VERTEX_ARRAY_RANGE_VALID_NV = 0x851F, - GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520; - - /** Accepted by the {@code pname} parameter of GetPointerv. */ - public static final int GL_VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521; - - protected NVVertexArrayRange() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexArrayRangeNV ] --- - - public static native void nglVertexArrayRangeNV(int length, long pointer); - - public static void glVertexArrayRangeNV(@NativeType("void *") ByteBuffer pointer) { - nglVertexArrayRangeNV(pointer.remaining(), memAddress(pointer)); - } - - // --- [ glFlushVertexArrayRangeNV ] --- - - public static native void glFlushVertexArrayRangeNV(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexArrayRange2.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexArrayRange2.java deleted file mode 100644 index 9a65e52e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexArrayRange2.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NV_vertex_array_range2 extension. - * - *

    Enabling and disabling the vertex array range is specified by the original NV_vertex_array_range extension specification to flush the vertex array - * range implicitly. In retrospect, this semantic is extremely misconceived and creates terrible performance problems for any application that wishes to - * mix conventional vertex arrays with vertex arrange range-enabled vertex arrays.

    - * - *

    This extension provides a new token for enabling/disabling the vertex array range that does NOT perform an implicit vertex array range flush when the - * enable/disable is performed.

    - * - *

    Requires {@link NVVertexArrayRange NV_vertex_array_range}.

    - */ -public final class NVVertexArrayRange2 { - - /** Accepted by the {@code cap} parameter of EnableClientState, DisableClientState. */ - public static final int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533; - - private NVVertexArrayRange2() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexAttribInteger64bit.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexAttribInteger64bit.java deleted file mode 100644 index 0834d506..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexAttribInteger64bit.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_vertex_attrib_integer_64bit extension. - * - *

    This extension provides support for specifying vertex attributes with 64-bit integer components, analagous to the 64-bit floating point support added - * in EXT_vertex_attrib_64bit.

    - * - *

    Additionally, it provides the VertexAttribLFormatNV entry point to specify bindless vertex attribute arrays with 64-bit integer or floating-point - * components in conjunction with the NV_vertex_buffer_unified_memory extension.

    - * - *

    Requires {@link GL30 OpenGL 3.0}, GLSL 1.30, {@link NVGPUShader5 NV_gpu_shader5} or equivalent functionality and {@link EXTVertexAttrib64bit EXT_vertex_attrib_64bit}.

    - */ -public class NVVertexAttribInteger64bit { - - static { GL.initialize(); } - - /** Accepted by the {@code type} parameter of VertexAttribLPointerEXT, VertexArrayVertexAttribLOffsetEXT, and VertexAttribLFormatNV. */ - public static final int - GL_INT64_NV = 0x140E, - GL_UNSIGNED_INT64_NV = 0x140F; - - protected NVVertexAttribInteger64bit() { - throw new UnsupportedOperationException(); - } - - // --- [ glVertexAttribL1i64NV ] --- - - public static native void glVertexAttribL1i64NV(@NativeType("GLuint") int index, @NativeType("GLint64EXT") long x); - - // --- [ glVertexAttribL2i64NV ] --- - - public static native void glVertexAttribL2i64NV(@NativeType("GLuint") int index, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y); - - // --- [ glVertexAttribL3i64NV ] --- - - public static native void glVertexAttribL3i64NV(@NativeType("GLuint") int index, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z); - - // --- [ glVertexAttribL4i64NV ] --- - - public static native void glVertexAttribL4i64NV(@NativeType("GLuint") int index, @NativeType("GLint64EXT") long x, @NativeType("GLint64EXT") long y, @NativeType("GLint64EXT") long z, @NativeType("GLint64EXT") long w); - - // --- [ glVertexAttribL1i64vNV ] --- - - public static native void nglVertexAttribL1i64vNV(int index, long v); - - public static void glVertexAttribL1i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribL1i64vNV(index, memAddress(v)); - } - - // --- [ glVertexAttribL2i64vNV ] --- - - public static native void nglVertexAttribL2i64vNV(int index, long v); - - public static void glVertexAttribL2i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribL2i64vNV(index, memAddress(v)); - } - - // --- [ glVertexAttribL3i64vNV ] --- - - public static native void nglVertexAttribL3i64vNV(int index, long v); - - public static void glVertexAttribL3i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribL3i64vNV(index, memAddress(v)); - } - - // --- [ glVertexAttribL4i64vNV ] --- - - public static native void nglVertexAttribL4i64vNV(int index, long v); - - public static void glVertexAttribL4i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribL4i64vNV(index, memAddress(v)); - } - - // --- [ glVertexAttribL1ui64NV ] --- - - public static native void glVertexAttribL1ui64NV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT") long x); - - // --- [ glVertexAttribL2ui64NV ] --- - - public static native void glVertexAttribL2ui64NV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y); - - // --- [ glVertexAttribL3ui64NV ] --- - - public static native void glVertexAttribL3ui64NV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z); - - // --- [ glVertexAttribL4ui64NV ] --- - - public static native void glVertexAttribL4ui64NV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT") long x, @NativeType("GLuint64EXT") long y, @NativeType("GLuint64EXT") long z, @NativeType("GLuint64EXT") long w); - - // --- [ glVertexAttribL1ui64vNV ] --- - - public static native void nglVertexAttribL1ui64vNV(int index, long v); - - public static void glVertexAttribL1ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 1); - } - nglVertexAttribL1ui64vNV(index, memAddress(v)); - } - - // --- [ glVertexAttribL2ui64vNV ] --- - - public static native void nglVertexAttribL2ui64vNV(int index, long v); - - public static void glVertexAttribL2ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 2); - } - nglVertexAttribL2ui64vNV(index, memAddress(v)); - } - - // --- [ glVertexAttribL3ui64vNV ] --- - - public static native void nglVertexAttribL3ui64vNV(int index, long v); - - public static void glVertexAttribL3ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 3); - } - nglVertexAttribL3ui64vNV(index, memAddress(v)); - } - - // --- [ glVertexAttribL4ui64vNV ] --- - - public static native void nglVertexAttribL4ui64vNV(int index, long v); - - public static void glVertexAttribL4ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") LongBuffer v) { - if (CHECKS) { - check(v, 4); - } - nglVertexAttribL4ui64vNV(index, memAddress(v)); - } - - // --- [ glGetVertexAttribLi64vNV ] --- - - public static native void nglGetVertexAttribLi64vNV(int index, int pname, long params); - - public static void glGetVertexAttribLi64vNV(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64EXT *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetVertexAttribLi64vNV(index, pname, memAddress(params)); - } - - @NativeType("void") - public static long glGetVertexAttribLi64NV(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetVertexAttribLi64vNV(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glGetVertexAttribLui64vNV ] --- - - public static native void nglGetVertexAttribLui64vNV(int index, int pname, long params); - - public static void glGetVertexAttribLui64vNV(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint64EXT *") LongBuffer params) { - if (CHECKS) { - check(params, 1); - } - nglGetVertexAttribLui64vNV(index, pname, memAddress(params)); - } - - @NativeType("void") - public static long glGetVertexAttribLui64NV(@NativeType("GLuint") int index, @NativeType("GLenum") int pname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer params = stack.callocLong(1); - nglGetVertexAttribLui64vNV(index, pname, memAddress(params)); - return params.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ glVertexAttribLFormatNV ] --- - - public static native void glVertexAttribLFormatNV(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - /** Array version of: {@link #glVertexAttribL1i64vNV VertexAttribL1i64vNV} */ - public static void glVertexAttribL1i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL1i64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL2i64vNV VertexAttribL2i64vNV} */ - public static void glVertexAttribL2i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL2i64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL3i64vNV VertexAttribL3i64vNV} */ - public static void glVertexAttribL3i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL3i64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL4i64vNV VertexAttribL4i64vNV} */ - public static void glVertexAttribL4i64vNV(@NativeType("GLuint") int index, @NativeType("GLint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL4i64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL1ui64vNV VertexAttribL1ui64vNV} */ - public static void glVertexAttribL1ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL1ui64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 1); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL2ui64vNV VertexAttribL2ui64vNV} */ - public static void glVertexAttribL2ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL2ui64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 2); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL3ui64vNV VertexAttribL3ui64vNV} */ - public static void glVertexAttribL3ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL3ui64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 3); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glVertexAttribL4ui64vNV VertexAttribL4ui64vNV} */ - public static void glVertexAttribL4ui64vNV(@NativeType("GLuint") int index, @NativeType("GLuint64EXT const *") long[] v) { - long __functionAddress = GL.getICD().glVertexAttribL4ui64vNV; - if (CHECKS) { - check(__functionAddress); - check(v, 4); - } - callPV(index, v, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribLi64vNV GetVertexAttribLi64vNV} */ - public static void glGetVertexAttribLi64vNV(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLint64EXT *") long[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribLi64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(index, pname, params, __functionAddress); - } - - /** Array version of: {@link #glGetVertexAttribLui64vNV GetVertexAttribLui64vNV} */ - public static void glGetVertexAttribLui64vNV(@NativeType("GLuint") int index, @NativeType("GLenum") int pname, @NativeType("GLuint64EXT *") long[] params) { - long __functionAddress = GL.getICD().glGetVertexAttribLui64vNV; - if (CHECKS) { - check(__functionAddress); - check(params, 1); - } - callPV(index, pname, params, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java deleted file mode 100644 index 7ef53680..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NV_vertex_buffer_unified_memory extension. - * - *

    This extension provides a mechanism to specify vertex attrib and element array locations using GPU addresses.

    - * - *

    Binding vertex buffers is one of the most frequent and expensive operations in many GL applications, due to the cost of chasing pointers and binding - * objects described in the Overview of {@link NVShaderBufferLoad NV_shader_buffer_load}. The intent of this extension is to enable a way for the application to specify - * vertex attrib state that alleviates the overhead of object binds and driver memory management.

    - */ -public class NVVertexBufferUnifiedMemory { - - static { GL.initialize(); } - - /** Accepted by the {@code cap} parameter of DisableClientState, EnableClientState, IsEnabled. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E, - GL_ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F; - - /** Accepted by the {@code pname} parameter of BufferAddressRangeNV and the {@code value} parameter of GetIntegerui64i_vNV. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20, - GL_TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25; - - /** Accepted by the {@code pname} parameter of BufferAddressRangeNV and the {@code value} parameter of GetIntegerui64vNV. */ - public static final int - GL_VERTEX_ARRAY_ADDRESS_NV = 0x8F21, - GL_NORMAL_ARRAY_ADDRESS_NV = 0x8F22, - GL_COLOR_ARRAY_ADDRESS_NV = 0x8F23, - GL_INDEX_ARRAY_ADDRESS_NV = 0x8F24, - GL_EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26, - GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27, - GL_FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28, - GL_ELEMENT_ARRAY_ADDRESS_NV = 0x8F29; - - /** Accepted by the {@code target} parameter of GetIntegeri_vNV. */ - public static final int - GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A, - GL_TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F; - - /** Accepted by the {@code value} parameter of GetIntegerv. */ - public static final int - GL_VERTEX_ARRAY_LENGTH_NV = 0x8F2B, - GL_NORMAL_ARRAY_LENGTH_NV = 0x8F2C, - GL_COLOR_ARRAY_LENGTH_NV = 0x8F2D, - GL_INDEX_ARRAY_LENGTH_NV = 0x8F2E, - GL_EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30, - GL_SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31, - GL_FOG_COORD_ARRAY_LENGTH_NV = 0x8F32, - GL_ELEMENT_ARRAY_LENGTH_NV = 0x8F33; - - protected NVVertexBufferUnifiedMemory() { - throw new UnsupportedOperationException(); - } - - // --- [ glBufferAddressRangeNV ] --- - - public static native void glBufferAddressRangeNV(@NativeType("GLenum") int pname, @NativeType("GLuint") int index, @NativeType("GLuint64EXT") long address, @NativeType("GLsizeiptr") long length); - - // --- [ glVertexFormatNV ] --- - - public static native void glVertexFormatNV(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glNormalFormatNV ] --- - - public static native void glNormalFormatNV(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glColorFormatNV ] --- - - public static native void glColorFormatNV(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glIndexFormatNV ] --- - - public static native void glIndexFormatNV(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glTexCoordFormatNV ] --- - - public static native void glTexCoordFormatNV(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glEdgeFlagFormatNV ] --- - - public static native void glEdgeFlagFormatNV(@NativeType("GLsizei") int stride); - - // --- [ glSecondaryColorFormatNV ] --- - - public static native void glSecondaryColorFormatNV(@NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glFogCoordFormatNV ] --- - - public static native void glFogCoordFormatNV(@NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glVertexAttribFormatNV ] --- - - public static native void glVertexAttribFormatNV(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLboolean") boolean normalized, @NativeType("GLsizei") int stride); - - // --- [ glVertexAttribIFormatNV ] --- - - public static native void glVertexAttribIFormatNV(@NativeType("GLuint") int index, @NativeType("GLint") int size, @NativeType("GLenum") int type, @NativeType("GLsizei") int stride); - - // --- [ glGetIntegerui64i_vNV ] --- - - public static native void nglGetIntegerui64i_vNV(int value, int index, long result); - - public static void glGetIntegerui64i_vNV(@NativeType("GLenum") int value, @NativeType("GLuint") int index, @NativeType("GLuint64EXT *") LongBuffer result) { - if (CHECKS) { - check(result, 1); - } - nglGetIntegerui64i_vNV(value, index, memAddress(result)); - } - - @NativeType("void") - public static long glGetIntegerui64iNV(@NativeType("GLenum") int value, @NativeType("GLuint") int index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - LongBuffer result = stack.callocLong(1); - nglGetIntegerui64i_vNV(value, index, memAddress(result)); - return result.get(0); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #glGetIntegerui64i_vNV GetIntegerui64i_vNV} */ - public static void glGetIntegerui64i_vNV(@NativeType("GLenum") int value, @NativeType("GLuint") int index, @NativeType("GLuint64EXT *") long[] result) { - long __functionAddress = GL.getICD().glGetIntegerui64i_vNV; - if (CHECKS) { - check(__functionAddress); - check(result, 1); - } - callPV(value, index, result, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVViewportSwizzle.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVViewportSwizzle.java deleted file mode 100644 index 5d74f497..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVViewportSwizzle.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NV_viewport_swizzle extension. - * - *

    This extension provides a new per-viewport swizzle that can modify the position of primitives sent to each viewport. New viewport swizzle state is - * added for each viewport, and a new position vector is computed for each vertex by selecting from and optionally negating any of the four components of - * the original position vector.

    - * - *

    This new viewport swizzle is useful for a number of algorithms, including single-pass cubemap rendering (broadcasting a primitive to multiple faces and - * reorienting the vertex position for each face) and voxel rasterization. The per-viewport component remapping and negation provided by the swizzle - * allows application code to re-orient three-dimensional geometry with a view along any of the X, Y, or Z axes. If a perspective projection and depth - * buffering is required, 1/W buffering should be used, as described in the single-pass cubemap rendering example in the "Issues" section below.

    - */ -public class NVViewportSwizzle { - - static { GL.initialize(); } - - /** Accepted by the {@code swizzlex}, {@code swizzley}, {@code swizzlez}, and {@code swizzlew} parameters of ViewportSwizzleNV. */ - public static final int - GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV = 0x9350, - GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV = 0x9351, - GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV = 0x9352, - GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV = 0x9353, - GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV = 0x9354, - GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV = 0x9355, - GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV = 0x9356, - GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV = 0x9357; - - /** Accepted by the {@code pname} parameter of GetBooleani_v, GetDoublei_v, GetIntegeri_v, GetFloati_v, and GetInteger64i_v. */ - public static final int - GL_VIEWPORT_SWIZZLE_X_NV = 0x9358, - GL_VIEWPORT_SWIZZLE_Y_NV = 0x9359, - GL_VIEWPORT_SWIZZLE_Z_NV = 0x935A, - GL_VIEWPORT_SWIZZLE_W_NV = 0x935B; - - protected NVViewportSwizzle() { - throw new UnsupportedOperationException(); - } - - // --- [ glViewportSwizzleNV ] --- - - /** - * Sets the swizzle state for the specified viewport. - * - * @param index the viewport index - * @param swizzlex the x swizzle state. One of:
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV VIEWPORT_SWIZZLE_POSITIVE_X_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV VIEWPORT_SWIZZLE_NEGATIVE_X_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV VIEWPORT_SWIZZLE_POSITIVE_Y_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV VIEWPORT_SWIZZLE_NEGATIVE_Y_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV VIEWPORT_SWIZZLE_POSITIVE_Z_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV VIEWPORT_SWIZZLE_NEGATIVE_Z_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV VIEWPORT_SWIZZLE_POSITIVE_W_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV VIEWPORT_SWIZZLE_NEGATIVE_W_NV}
    - * @param swizzley the y swizzle state. One of:
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV VIEWPORT_SWIZZLE_POSITIVE_X_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV VIEWPORT_SWIZZLE_NEGATIVE_X_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV VIEWPORT_SWIZZLE_POSITIVE_Y_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV VIEWPORT_SWIZZLE_NEGATIVE_Y_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV VIEWPORT_SWIZZLE_POSITIVE_Z_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV VIEWPORT_SWIZZLE_NEGATIVE_Z_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV VIEWPORT_SWIZZLE_POSITIVE_W_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV VIEWPORT_SWIZZLE_NEGATIVE_W_NV}
    - * @param swizzlez the z swizzle state. One of:
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV VIEWPORT_SWIZZLE_POSITIVE_X_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV VIEWPORT_SWIZZLE_NEGATIVE_X_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV VIEWPORT_SWIZZLE_POSITIVE_Y_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV VIEWPORT_SWIZZLE_NEGATIVE_Y_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV VIEWPORT_SWIZZLE_POSITIVE_Z_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV VIEWPORT_SWIZZLE_NEGATIVE_Z_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV VIEWPORT_SWIZZLE_POSITIVE_W_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV VIEWPORT_SWIZZLE_NEGATIVE_W_NV}
    - * @param swizzlew the w swizzle state. One of:
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV VIEWPORT_SWIZZLE_POSITIVE_X_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV VIEWPORT_SWIZZLE_NEGATIVE_X_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV VIEWPORT_SWIZZLE_POSITIVE_Y_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV VIEWPORT_SWIZZLE_NEGATIVE_Y_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV VIEWPORT_SWIZZLE_POSITIVE_Z_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV VIEWPORT_SWIZZLE_NEGATIVE_Z_NV}
    {@link #GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV VIEWPORT_SWIZZLE_POSITIVE_W_NV}{@link #GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV VIEWPORT_SWIZZLE_NEGATIVE_W_NV}
    - */ - public static native void glViewportSwizzleNV(@NativeType("GLuint") int index, @NativeType("GLenum") int swizzlex, @NativeType("GLenum") int swizzley, @NativeType("GLenum") int swizzlez, @NativeType("GLenum") int swizzlew); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVXConditionalRender.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVXConditionalRender.java deleted file mode 100644 index 1a51164c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVXConditionalRender.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the NVX_conditional_render extension. - * - *

    This extension provides support for conditional rendering based on the - * results of an occlusion query. This mechanism allows an application to - * potentially reduce the latency between the completion of an occlusion - * query and the rendering commands depending on its result. It additionally - * allows the decision of whether to render to be made without application - * intervention.

    - * - *

    Requires {@link GL15 OpenGL 1.5} or {@link ARBOcclusionQuery ARB_occlusion_query}

    - */ -public class NVXConditionalRender { - - static { GL.initialize(); } - - protected NVXConditionalRender() { - throw new UnsupportedOperationException(); - } - - // --- [ glBeginConditionalRenderNVX ] --- - - public static native void glBeginConditionalRenderNVX(@NativeType("GLuint") int id); - - // --- [ glEndConditionalRenderNVX ] --- - - public static native void glEndConditionalRenderNVX(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVXGPUMemoryInfo.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVXGPUMemoryInfo.java deleted file mode 100644 index a9e8a900..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVXGPUMemoryInfo.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the NVX_gpu_memory_info extension. - * - *

    GL_NVX_gpu_memory_info provides applications visibility into GPU hardware memory utilization in order to allow the application to effectively manage - * its resource allocations in the scope of the current available GPU memory.

    - * - *

    Requires {@link GL20 OpenGL 2.0}

    - */ -public final class NVXGPUMemoryInfo { - - /** Accepted by the {@code param} parameter of GetIntegerv. */ - public static final int - GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = 0x9047, - GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = 0x9048, - GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = 0x9049, - GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX = 0x904A, - GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX = 0x904B; - - private NVXGPUMemoryInfo() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVXGpuMulticast2.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVXGpuMulticast2.java deleted file mode 100644 index 522fef32..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVXGpuMulticast2.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NVX_gpu_multicast2 extension. - * - *

    This extension provides additional mechanisms that influence multicast rendering which is simultaneous rendering to multiple GPUs.

    - * - *

    Requires {@link NVGPUMulticast NV_gpu_multicast}, {@code EXT_device_group}, {@code NV_viewport_array}, {@link NVClipSpaceWScaling NV_clip_space_w_scaling} and {@link NVXProgressFence NVX_progress_fence}.

    - */ -public class NVXGpuMulticast2 { - - static { GL.initialize(); } - - protected NVXGpuMulticast2() { - throw new UnsupportedOperationException(); - } - - // --- [ glAsyncCopyImageSubDataNVX ] --- - - public static native int nglAsyncCopyImageSubDataNVX(int waitSemaphoreCount, long waitSemaphoreArray, long waitValueArray, int srcGpu, int dstGpuMask, 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, int signalSemaphoreCount, long signalSemaphoreArray, long signalValueArray); - - @NativeType("GLuint") - public static int glAsyncCopyImageSubDataNVX(@NativeType("GLuint const *") IntBuffer waitSemaphoreArray, @NativeType("GLuint64 const *") LongBuffer waitValueArray, @NativeType("GLuint") int srcGpu, @NativeType("GLbitfield") int dstGpuMask, @NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int srcWidth, @NativeType("GLsizei") int srcHeight, @NativeType("GLsizei") int srcDepth, @NativeType("GLuint const *") IntBuffer signalSemaphoreArray, @NativeType("GLuint64 const *") LongBuffer signalValueArray) { - if (CHECKS) { - check(waitValueArray, waitSemaphoreArray.remaining()); - check(signalValueArray, signalSemaphoreArray.remaining()); - } - return nglAsyncCopyImageSubDataNVX(waitSemaphoreArray.remaining(), memAddress(waitSemaphoreArray), memAddress(waitValueArray), srcGpu, dstGpuMask, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth, signalSemaphoreArray.remaining(), memAddress(signalSemaphoreArray), memAddress(signalValueArray)); - } - - // --- [ glAsyncCopyBufferSubDataNVX ] --- - - public static native long nglAsyncCopyBufferSubDataNVX(int waitSemaphoreCount, long waitSemaphoreArray, long fenceValueArray, int readGpu, int writeGpuMask, int readBuffer, int writeBuffer, long readOffset, long writeOffset, long size, int signalSemaphoreCount, long signalSemaphoreArray, long signalValueArray); - - @NativeType("GLsync") - public static long glAsyncCopyBufferSubDataNVX(@NativeType("GLuint const *") IntBuffer waitSemaphoreArray, @NativeType("GLuint64 const *") LongBuffer fenceValueArray, @NativeType("GLuint") int readGpu, @NativeType("GLbitfield") int writeGpuMask, @NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size, @NativeType("GLuint const *") IntBuffer signalSemaphoreArray, @NativeType("GLuint64 const *") LongBuffer signalValueArray) { - if (CHECKS) { - check(fenceValueArray, waitSemaphoreArray.remaining()); - check(signalValueArray, signalSemaphoreArray.remaining()); - } - return nglAsyncCopyBufferSubDataNVX(waitSemaphoreArray.remaining(), memAddress(waitSemaphoreArray), memAddress(fenceValueArray), readGpu, writeGpuMask, readBuffer, writeBuffer, readOffset, writeOffset, size, signalSemaphoreArray.remaining(), memAddress(signalSemaphoreArray), memAddress(signalValueArray)); - } - - // --- [ glUploadGpuMaskNVX ] --- - - public static native void glUploadGpuMaskNVX(@NativeType("GLbitfield") int mask); - - // --- [ glMulticastViewportArrayvNVX ] --- - - public static native void nglMulticastViewportArrayvNVX(int gpu, int first, int count, long v); - - public static void glMulticastViewportArrayvNVX(@NativeType("GLuint") int gpu, @NativeType("GLuint") int first, @NativeType("GLfloat const *") FloatBuffer v) { - nglMulticastViewportArrayvNVX(gpu, first, v.remaining() >> 2, memAddress(v)); - } - - // --- [ glMulticastScissorArrayvNVX ] --- - - public static native void nglMulticastScissorArrayvNVX(int gpu, int first, int count, long v); - - public static void glMulticastScissorArrayvNVX(@NativeType("GLuint") int gpu, @NativeType("GLuint") int first, @NativeType("GLint const *") IntBuffer v) { - nglMulticastScissorArrayvNVX(gpu, first, v.remaining() >> 2, memAddress(v)); - } - - // --- [ glMulticastViewportPositionWScaleNVX ] --- - - public static native void glMulticastViewportPositionWScaleNVX(@NativeType("GLuint") int gpu, @NativeType("GLuint") int index, @NativeType("GLfloat") float xcoeff, @NativeType("GLfloat") float ycoeff); - - /** Array version of: {@link #glAsyncCopyImageSubDataNVX AsyncCopyImageSubDataNVX} */ - @NativeType("GLuint") - public static int glAsyncCopyImageSubDataNVX(@NativeType("GLuint const *") int[] waitSemaphoreArray, @NativeType("GLuint64 const *") long[] waitValueArray, @NativeType("GLuint") int srcGpu, @NativeType("GLbitfield") int dstGpuMask, @NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int srcWidth, @NativeType("GLsizei") int srcHeight, @NativeType("GLsizei") int srcDepth, @NativeType("GLuint const *") int[] signalSemaphoreArray, @NativeType("GLuint64 const *") long[] signalValueArray) { - long __functionAddress = GL.getICD().glAsyncCopyImageSubDataNVX; - if (CHECKS) { - check(__functionAddress); - check(waitValueArray, waitSemaphoreArray.length); - check(signalValueArray, signalSemaphoreArray.length); - } - return callPPPPI(waitSemaphoreArray.length, waitSemaphoreArray, waitValueArray, srcGpu, dstGpuMask, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth, signalSemaphoreArray.length, signalSemaphoreArray, signalValueArray, __functionAddress); - } - - /** Array version of: {@link #glAsyncCopyBufferSubDataNVX AsyncCopyBufferSubDataNVX} */ - @NativeType("GLsync") - public static long glAsyncCopyBufferSubDataNVX(@NativeType("GLuint const *") int[] waitSemaphoreArray, @NativeType("GLuint64 const *") long[] fenceValueArray, @NativeType("GLuint") int readGpu, @NativeType("GLbitfield") int writeGpuMask, @NativeType("GLuint") int readBuffer, @NativeType("GLuint") int writeBuffer, @NativeType("GLintptr") long readOffset, @NativeType("GLintptr") long writeOffset, @NativeType("GLsizeiptr") long size, @NativeType("GLuint const *") int[] signalSemaphoreArray, @NativeType("GLuint64 const *") long[] signalValueArray) { - long __functionAddress = GL.getICD().glAsyncCopyBufferSubDataNVX; - if (CHECKS) { - check(__functionAddress); - check(fenceValueArray, waitSemaphoreArray.length); - check(signalValueArray, signalSemaphoreArray.length); - } - return callPPPPPPPP(waitSemaphoreArray.length, waitSemaphoreArray, fenceValueArray, readGpu, writeGpuMask, readBuffer, writeBuffer, readOffset, writeOffset, size, signalSemaphoreArray.length, signalSemaphoreArray, signalValueArray, __functionAddress); - } - - /** Array version of: {@link #glMulticastViewportArrayvNVX MulticastViewportArrayvNVX} */ - public static void glMulticastViewportArrayvNVX(@NativeType("GLuint") int gpu, @NativeType("GLuint") int first, @NativeType("GLfloat const *") float[] v) { - long __functionAddress = GL.getICD().glMulticastViewportArrayvNVX; - if (CHECKS) { - check(__functionAddress); - } - callPV(gpu, first, v.length >> 2, v, __functionAddress); - } - - /** Array version of: {@link #glMulticastScissorArrayvNVX MulticastScissorArrayvNVX} */ - public static void glMulticastScissorArrayvNVX(@NativeType("GLuint") int gpu, @NativeType("GLuint") int first, @NativeType("GLint const *") int[] v) { - long __functionAddress = GL.getICD().glMulticastScissorArrayvNVX; - if (CHECKS) { - check(__functionAddress); - } - callPV(gpu, first, v.length >> 2, v, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/NVXProgressFence.java b/LWJGL/src/main/java/org/lwjgl/opengl/NVXProgressFence.java deleted file mode 100644 index b8321dad..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/NVXProgressFence.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the NVX_progress_fence extension. - * - *

    This extension uses the concept of GL semaphores as defined in {@link EXTSemaphore EXT_semaphore} to better coordinate operations between multiple GPU command - * streams. A semaphore type called "progress fence" is derived from the GL semaphore. The progress fence semaphore is created by - * {@link #glCreateProgressFenceNVX CreateProgressFenceNVX}) returning the name of a newly created semaphore object. Like other semaphores, these are signaled by the GL server. Each - * signal operation is queued in the GPU command stream with an associated fence value that is written to the semaphore at the completion of a signal - * operation.

    - * - *

    A GL server wait can be added to the command stream using {@link #glWaitSemaphoreui64NVX WaitSemaphoreui64NVX}. This blocks the GPU until the progress fence semaphore reaches or - * exceeds the specified fence value.

    - * - *

    A GL client wait can be initiated using {@link #glClientWaitSemaphoreui64NVX ClientWaitSemaphoreui64NVX}. This blocks the CPU until the specified fence value is reached.

    - * - *

    Requires {@code EXT_external_objects} and {@code EXT_external_objects_win32}.

    - */ -public class NVXProgressFence { - - static { GL.initialize(); } - - protected NVXProgressFence() { - throw new UnsupportedOperationException(); - } - - // --- [ glCreateProgressFenceNVX ] --- - - @NativeType("GLuint") - public static native int glCreateProgressFenceNVX(); - - // --- [ glSignalSemaphoreui64NVX ] --- - - public static native void nglSignalSemaphoreui64NVX(int signalGpu, int fenceObjectCount, long semaphoreArray, long fenceValueArray); - - public static void glSignalSemaphoreui64NVX(@NativeType("GLuint") int signalGpu, @NativeType("GLuint const *") IntBuffer semaphoreArray, @NativeType("GLuint64 const *") LongBuffer fenceValueArray) { - if (CHECKS) { - check(fenceValueArray, semaphoreArray.remaining()); - } - nglSignalSemaphoreui64NVX(signalGpu, semaphoreArray.remaining(), memAddress(semaphoreArray), memAddress(fenceValueArray)); - } - - // --- [ glWaitSemaphoreui64NVX ] --- - - public static native void nglWaitSemaphoreui64NVX(int waitGpu, int fenceObjectCount, long semaphoreArray, long fenceValueArray); - - public static void glWaitSemaphoreui64NVX(@NativeType("GLuint") int waitGpu, @NativeType("GLuint const *") IntBuffer semaphoreArray, @NativeType("GLuint64 const *") LongBuffer fenceValueArray) { - if (CHECKS) { - check(fenceValueArray, semaphoreArray.remaining()); - } - nglWaitSemaphoreui64NVX(waitGpu, semaphoreArray.remaining(), memAddress(semaphoreArray), memAddress(fenceValueArray)); - } - - // --- [ glClientWaitSemaphoreui64NVX ] --- - - public static native void nglClientWaitSemaphoreui64NVX(int fenceObjectCount, long semaphoreArray, long fenceValueArray); - - public static void glClientWaitSemaphoreui64NVX(@NativeType("GLuint const *") IntBuffer semaphoreArray, @NativeType("GLuint64 const *") LongBuffer fenceValueArray) { - if (CHECKS) { - check(fenceValueArray, semaphoreArray.remaining()); - } - nglClientWaitSemaphoreui64NVX(semaphoreArray.remaining(), memAddress(semaphoreArray), memAddress(fenceValueArray)); - } - - /** Array version of: {@link #glSignalSemaphoreui64NVX SignalSemaphoreui64NVX} */ - public static void glSignalSemaphoreui64NVX(@NativeType("GLuint") int signalGpu, @NativeType("GLuint const *") int[] semaphoreArray, @NativeType("GLuint64 const *") long[] fenceValueArray) { - long __functionAddress = GL.getICD().glSignalSemaphoreui64NVX; - if (CHECKS) { - check(__functionAddress); - check(fenceValueArray, semaphoreArray.length); - } - callPPV(signalGpu, semaphoreArray.length, semaphoreArray, fenceValueArray, __functionAddress); - } - - /** Array version of: {@link #glWaitSemaphoreui64NVX WaitSemaphoreui64NVX} */ - public static void glWaitSemaphoreui64NVX(@NativeType("GLuint") int waitGpu, @NativeType("GLuint const *") int[] semaphoreArray, @NativeType("GLuint64 const *") long[] fenceValueArray) { - long __functionAddress = GL.getICD().glWaitSemaphoreui64NVX; - if (CHECKS) { - check(__functionAddress); - check(fenceValueArray, semaphoreArray.length); - } - callPPV(waitGpu, semaphoreArray.length, semaphoreArray, fenceValueArray, __functionAddress); - } - - /** Array version of: {@link #glClientWaitSemaphoreui64NVX ClientWaitSemaphoreui64NVX} */ - public static void glClientWaitSemaphoreui64NVX(@NativeType("GLuint const *") int[] semaphoreArray, @NativeType("GLuint64 const *") long[] fenceValueArray) { - long __functionAddress = GL.getICD().glClientWaitSemaphoreui64NVX; - if (CHECKS) { - check(__functionAddress); - check(fenceValueArray, semaphoreArray.length); - } - callPPV(semaphoreArray.length, semaphoreArray, fenceValueArray, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/OVRMultiview.java b/LWJGL/src/main/java/org/lwjgl/opengl/OVRMultiview.java deleted file mode 100644 index f3d258f8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/OVRMultiview.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -/** - * Native bindings to the OVR_multiview extension. - * - *

    The method of stereo rendering supported in OpenGL is currently achieved by rendering to the two eye buffers sequentially. This typically incurs double - * the application and driver overhead, despite the fact that the command streams and render states are almost identical.

    - * - *

    This extension seeks to address the inefficiency of sequential multiview rendering by adding a means to render to multiple elements of a 2D texture - * array simultaneously. In multiview rendering, draw calls are instanced into each corresponding element of the texture array. The vertex program uses a - * new {@code gl_ViewID_OVR} variable to compute per-view values, typically the vertex position and view-dependent variables like reflection.

    - * - *

    The formulation of this extension is high level in order to allow implementation freedom. On existing hardware, applications and drivers can realize - * the benefits of a single scene traversal, even if all GPU work is fully duplicated per-view. But future support could enable simultaneous rendering via - * multi-GPU, tile-based architectures could sort geometry into tiles for multiple views in a single pass, and the implementation could even choose to - * interleave at the fragment level for better texture cache utilization and more coherent fragment shader branching.

    - * - *

    The most obvious use case in this model is to support two simultaneous views: one view for each eye. However, we also anticipate a usage where two - * views are rendered per eye, where one has a wide field of view and the other has a narrow one. The nature of wide field of view planar projection is - * that the sample density can become unacceptably low in the view direction. By rendering two inset eye views per eye, we can get the required sample - * density in the center of projection without wasting samples, memory, and time by oversampling in the periphery.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public class OVRMultiview { - - static { GL.initialize(); } - - /** Accepted by the {@code pname} parameter of {@link GL30C#glGetFramebufferAttachmentParameteriv GetFramebufferAttachmentParameteriv}. */ - public static final int - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 0x9630, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 0x9632; - - /** Accepted by the {@code pname} parameter of GetIntegerv. */ - public static final int GL_MAX_VIEWS_OVR = 0x9631; - - /** Returned by {@link GL30C#glCheckFramebufferStatus CheckFramebufferStatus}. */ - public static final int GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 0x9633; - - protected OVRMultiview() { - throw new UnsupportedOperationException(); - } - - // --- [ glFramebufferTextureMultiviewOVR ] --- - - /** - * Operates similarly to the {@link GL30C#glFramebufferTextureLayer FramebufferTextureLayer} command, except that {@code baseViewIndex} and {@code numViews} select a range of texture array - * elements that will be targeted when rendering. Such an attachment is considered multiview and rendering commands issued when such a framebuffer - * object is bound are termed "multiview rendering". The maximum number of views which can be bound simultaneously is determined by the value of - * {@link #GL_MAX_VIEWS_OVR MAX_VIEWS_OVR}, which can be queried with the {@link GL11C#glGetIntegerv GetIntegerv} command. - * - *

    The command

    - * - *
    
    -     * View( uint id );
    - * - *

    does not exist in the GL, but is used here to describe the multiview functionality in this section. The effect of this hypothetical function is to set - * the value of the shader built-in input {@code gl_ViewID_OVR}.

    - * - *

    When multiview rendering is enabled, the {@code Clear}, {@code ClearBuffer*}, {@code Draw*}, and {@code Dispatch*} commands have the same effect as:

    - * - *
    
    -     * for( int i = 0; i < numViews; i++ ) {
    -     *     FramebufferTextureLayer( target, attachment, texture, level, baseViewIndex + i );
    -     *     View( i );
    -     *     <drawing-command>
    -     * }
    - * - *

    The result is that every drawing command is broadcast into every active view. The shader uses {@code gl_ViewID_OVR} to compute view dependent outputs.

    - * - *

    The number of views, as specified by {@code numViews}, must be the same for all framebuffer attachments points where the value of - * {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE} is not {@link GL11#GL_NONE NONE} or the framebuffer is incomplete.

    - * - *

    If {@code texture} is non-zero and the command does not result in an error, the framebuffer attachment state corresponding to {@code attachment} is - * updated as in the {@link GL30C#glFramebufferTextureLayer FramebufferTextureLayer} command, except that the values of {@link GL30#GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER} and - * {@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR} are is set to {@code baseViewIndex}, and the value of {@link #GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR} - * is set to {@code numViews}.

    - * - *
    Errors
    - * - *

    In addition to the corresponding errors for {@link GL30C#glFramebufferTextureLayer FramebufferTextureLayer} when called with the same parameters (other than {@code layer}):

    - * - *

    An {@link GL11#GL_INVALID_VALUE INVALID_VALUE} error is generated if:

    - * - *
      - *
    • {@code numViews} is less than 1 or if {@code numViews} is greater than {@link #GL_MAX_VIEWS_OVR MAX_VIEWS_OVR}.
    • - *
    • {@code texture} is a two-dimensional array texture and {@code baseViewIndex} + {@code numViews} is larger than the value of - * {@link GL30#GL_MAX_ARRAY_TEXTURE_LAYERS MAX_ARRAY_TEXTURE_LAYERS} minus one.
    • - *
    • {@code texture} is non-zero and {@code baseViewIndex} is negative.
    • - *
    - * - *

    An {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION} error is generated if texture is non-zero and is not the name of a two-dimensional array texture.

    - * - * @param target the framebuffer target. One of:
    {@link GL30#GL_FRAMEBUFFER FRAMEBUFFER}{@link GL30#GL_READ_FRAMEBUFFER READ_FRAMEBUFFER}{@link GL30#GL_DRAW_FRAMEBUFFER DRAW_FRAMEBUFFER}
    - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - * @param baseViewIndex the base framebuffer texture layer index - * @param numViews the number of views to target when rendering - */ - public static native void glFramebufferTextureMultiviewOVR(@NativeType("GLenum") int target, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int baseViewIndex, @NativeType("GLsizei") int numViews); - - // --- [ glNamedFramebufferTextureMultiviewOVR ] --- - - /** - * @param framebuffer the framebuffer name - * @param attachment the attachment point of the framebuffer. One of:
    {@link GL30#GL_COLOR_ATTACHMENT0 COLOR_ATTACHMENT0}{@link GL30#GL_COLOR_ATTACHMENT1 COLOR_ATTACHMENT1}{@link GL30#GL_COLOR_ATTACHMENT2 COLOR_ATTACHMENT2}{@link GL30#GL_COLOR_ATTACHMENT3 COLOR_ATTACHMENT3}
    {@link GL30#GL_COLOR_ATTACHMENT4 COLOR_ATTACHMENT4}{@link GL30#GL_COLOR_ATTACHMENT5 COLOR_ATTACHMENT5}{@link GL30#GL_COLOR_ATTACHMENT6 COLOR_ATTACHMENT6}{@link GL30#GL_COLOR_ATTACHMENT7 COLOR_ATTACHMENT7}
    {@link GL30#GL_COLOR_ATTACHMENT8 COLOR_ATTACHMENT8}{@link GL30#GL_COLOR_ATTACHMENT9 COLOR_ATTACHMENT9}{@link GL30#GL_COLOR_ATTACHMENT10 COLOR_ATTACHMENT10}{@link GL30#GL_COLOR_ATTACHMENT11 COLOR_ATTACHMENT11}
    {@link GL30#GL_COLOR_ATTACHMENT12 COLOR_ATTACHMENT12}{@link GL30#GL_COLOR_ATTACHMENT13 COLOR_ATTACHMENT13}{@link GL30#GL_COLOR_ATTACHMENT14 COLOR_ATTACHMENT14}{@link GL30#GL_COLOR_ATTACHMENT15 COLOR_ATTACHMENT15}
    {@link GL30#GL_COLOR_ATTACHMENT16 COLOR_ATTACHMENT16}{@link GL30#GL_COLOR_ATTACHMENT17 COLOR_ATTACHMENT17}{@link GL30#GL_COLOR_ATTACHMENT18 COLOR_ATTACHMENT18}{@link GL30#GL_COLOR_ATTACHMENT19 COLOR_ATTACHMENT19}
    {@link GL30#GL_COLOR_ATTACHMENT20 COLOR_ATTACHMENT20}{@link GL30#GL_COLOR_ATTACHMENT21 COLOR_ATTACHMENT21}{@link GL30#GL_COLOR_ATTACHMENT22 COLOR_ATTACHMENT22}{@link GL30#GL_COLOR_ATTACHMENT23 COLOR_ATTACHMENT23}
    {@link GL30#GL_COLOR_ATTACHMENT24 COLOR_ATTACHMENT24}{@link GL30#GL_COLOR_ATTACHMENT25 COLOR_ATTACHMENT25}{@link GL30#GL_COLOR_ATTACHMENT26 COLOR_ATTACHMENT26}{@link GL30#GL_COLOR_ATTACHMENT27 COLOR_ATTACHMENT27}
    {@link GL30#GL_COLOR_ATTACHMENT28 COLOR_ATTACHMENT28}{@link GL30#GL_COLOR_ATTACHMENT29 COLOR_ATTACHMENT29}{@link GL30#GL_COLOR_ATTACHMENT30 COLOR_ATTACHMENT30}{@link GL30#GL_COLOR_ATTACHMENT31 COLOR_ATTACHMENT31}
    {@link GL30#GL_DEPTH_ATTACHMENT DEPTH_ATTACHMENT}{@link GL30#GL_STENCIL_ATTACHMENT STENCIL_ATTACHMENT}{@link GL30#GL_DEPTH_STENCIL_ATTACHMENT DEPTH_STENCIL_ATTACHMENT}
    - * @param texture the texture object to attach to the framebuffer attachment point named by {@code attachment} - * @param level the mipmap level of {@code texture} to attach - */ - public static native void glNamedFramebufferTextureMultiviewOVR(@NativeType("GLuint") int framebuffer, @NativeType("GLenum") int attachment, @NativeType("GLuint") int texture, @NativeType("GLint") int level, @NativeType("GLint") int baseViewIndex, @NativeType("GLsizei") int numViews); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/OpenGLException.java b/LWJGL/src/main/java/org/lwjgl/opengl/OpenGLException.java deleted file mode 100644 index 29fec005..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/OpenGLException.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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.opengl; - -/** - *

    - * Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ -public class OpenGLException extends RuntimeException { - - private static final long serialVersionUID = 1L; - - /** Constructor for OpenGLException. */ - public OpenGLException(int gl_error_code) { - this(createErrorMessage(gl_error_code)); - } - - private static String createErrorMessage(int gl_error_code) { - String error_string = Util.translateGLErrorString(gl_error_code); - return error_string + " (" + gl_error_code + ")"; - } - - /** Constructor for OpenGLException. */ - public OpenGLException() { - super(); - } - - /** - * Constructor for OpenGLException. - * - * @param message - */ - public OpenGLException(String message) { - super(message); - } - - /** - * Constructor for OpenGLException. - * - * @param message - * @param cause - */ - public OpenGLException(String message, Throwable cause) { - super(message, cause); - } - - /** - * Constructor for OpenGLException. - * - * @param cause - */ - public OpenGLException(Throwable cause) { - super(cause); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/Pbuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/Pbuffer.java deleted file mode 100644 index e5ec5ad0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/Pbuffer.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * 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.opengl; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.Sys; - -import java.nio.IntBuffer; - -/** - *

    - * Pbuffer encapsulates an OpenGL pbuffer. - *

    - * - * This class is thread-safe. - * - * @author elias_naur - * @version $Revision$ - * $Id$ - */ -public final class Pbuffer extends DrawableGL { - /** - * Indicates that Pbuffers can be created. - */ - public static final int PBUFFER_SUPPORTED = 1 << 0; - - /** - * Indicates that Pbuffers can be used as render-textures. - */ - public static final int RENDER_TEXTURE_SUPPORTED = 1 << 1; - - /** - * Indicates that Pbuffers can be used as non-power-of-two render-textures. - */ - public static final int RENDER_TEXTURE_RECTANGLE_SUPPORTED = 1 << 2; - - /** - * Indicates that Pbuffers can be used as depth render-textures. - */ - public static final int RENDER_DEPTH_TEXTURE_SUPPORTED = 1 << 3; - - /** - * The render-to-texture mipmap level attribute. - */ - public static final int MIPMAP_LEVEL = RenderTexture.WGL_MIPMAP_LEVEL_ARB; - - /** - * The render-to-texture cube map face attribute. - */ - public static final int CUBE_MAP_FACE = RenderTexture.WGL_CUBE_MAP_FACE_ARB; - - /** - * The render-to-texture cube map positive X face value. - */ - public static final int TEXTURE_CUBE_MAP_POSITIVE_X = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; - - /** - * The render-to-texture cube map negative X face value. - */ - public static final int TEXTURE_CUBE_MAP_NEGATIVE_X = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; - - /** - * The render-to-texture cube map positive Y face value. - */ - public static final int TEXTURE_CUBE_MAP_POSITIVE_Y = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB; - - /** - * The render-to-texture cube map negative Y face value. - */ - public static final int TEXTURE_CUBE_MAP_NEGATIVE_Y = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB; - - /** - * The render-to-texture cube map positive Z face value. - */ - public static final int TEXTURE_CUBE_MAP_POSITIVE_Z = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB; - - /** - * The render-to-texture cube map negative Z face value. - */ - public static final int TEXTURE_CUBE_MAP_NEGATIVE_Z = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB; - - /** - * The Pbuffer front left buffer. - */ - public static final int FRONT_LEFT_BUFFER = RenderTexture.WGL_FRONT_LEFT_ARB; - - /** - * The Pbuffer front right buffer. - */ - public static final int FRONT_RIGHT_BUFFER = RenderTexture.WGL_FRONT_RIGHT_ARB; - - /** - * The Pbuffer back left buffer. - */ - public static final int BACK_LEFT_BUFFER = RenderTexture.WGL_BACK_LEFT_ARB; - - /** - * The Pbuffer back right buffer. - */ - public static final int BACK_RIGHT_BUFFER = RenderTexture.WGL_BACK_RIGHT_ARB; - - /** - * The Pbuffer depth buffer. - */ - public static final int DEPTH_BUFFER = RenderTexture.WGL_DEPTH_COMPONENT_NV; - - /** - * Width - */ - private final int width; - - /** - * Height - */ - private final int height; - - static { - Sys.initialize(); - } - - /** - * 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. - *

    - * - * @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); - } - - /** - * 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. - *

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

    - * 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 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) - */ - 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; - this.peer_info = createPbuffer(width, height, pixel_format, attribs, renderTexture); - Context shared_context = null; - if ( shared_drawable == null ) - shared_drawable = Display.getDrawable(); // May be null - if (shared_drawable != null) - shared_context = ((DrawableLWJGL)shared_drawable).getContext(); - 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 { - 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 - // cause the drivers to use default settings - 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); - } - - /** - * 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. - */ - public synchronized boolean isBufferLost() { - checkDestroyed(); - return Display.getImplementation().isBufferLost(peer_info); - } - - /** - * Gets the Pbuffer capabilities. - * - * @return a bitmask of Pbuffer capabilities. - */ - public static int getCapabilities() { - return Display.getImplementation().getPbufferCapabilities(); - } - - // ----------------------------------------------------------------------------------------- - // ------------------------------- Render-to-Texture Methods ------------------------------- - // ----------------------------------------------------------------------------------------- - - /** - * 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: - *

    - * 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 - * - * @param attrib - * @param value - */ - public synchronized void setAttrib(int attrib, int value) { - checkDestroyed(); - Display.getImplementation().setPbufferAttrib(peer_info, attrib, value); - } - - /** - * Binds the currently bound texture to the buffer specified. The buffer can be one of the following: - *

    - * FRONT_LEFT_BUFFER FRONT_RIGHT_BUFFER BACK_LEFT_BUFFER BACK_RIGHT_BUFFER DEPTH_BUFFER - * - * @param buffer - */ - public synchronized void bindTexImage(int buffer) { - checkDestroyed(); - Display.getImplementation().bindTexImageToPbuffer(peer_info, buffer); - } - - /** - * Releases the currently bound texture from the buffer specified. - * - * @param buffer - */ - public synchronized void releaseTexImage(int buffer) { - checkDestroyed(); - Display.getImplementation().releaseTexImageFromPbuffer(peer_info, buffer); - } - - /** - * @return Returns the height. - */ - public synchronized int getHeight() { - checkDestroyed(); - return height; - } - - /** - * @return Returns the width. - */ - public synchronized int getWidth() { - checkDestroyed(); - return width; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/PeerInfo.java b/LWJGL/src/main/java/org/lwjgl/opengl/PeerInfo.java deleted file mode 100644 index 6b54f994..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/PeerInfo.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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.opengl; - -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; - -import java.nio.ByteBuffer; - -/** - * - * @author elias_naur - * @version $Revision$ - * $Id$ - */ -abstract class PeerInfo { - private final ByteBuffer handle; - private Thread locking_thread; // Thread that has locked this PeerInfo - private int lock_count; - - protected PeerInfo(ByteBuffer handle) { - this.handle = handle; - } - - private void lockAndInitHandle() throws LWJGLException { - doLockAndInitHandle(); - } - - public final synchronized void unlock() throws LWJGLException { - if (lock_count <= 0) - throw new IllegalStateException("PeerInfo not locked!"); - if (Thread.currentThread() != locking_thread) - throw new IllegalStateException("PeerInfo already locked by " + locking_thread); - lock_count--; - if (lock_count == 0) { - doUnlock(); - locking_thread = null; - notify(); - } - } - - protected abstract void doLockAndInitHandle() throws LWJGLException; - protected abstract void doUnlock() throws LWJGLException; - - public final synchronized ByteBuffer lockAndGetHandle() throws LWJGLException { - Thread this_thread = Thread.currentThread(); - while (locking_thread != null && locking_thread != this_thread) { - try { - wait(); - } catch (InterruptedException e) { - LWJGLUtil.log("Interrupted while waiting for PeerInfo lock: " + e); - } - } - if (lock_count == 0) { - locking_thread = this_thread; - doLockAndInitHandle(); - } - lock_count++; - return getHandle(); - } - - protected final ByteBuffer getHandle() { - return handle; - } - - public void destroy() { - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/PixelFormat.java b/LWJGL/src/main/java/org/lwjgl/opengl/PixelFormat.java deleted file mode 100644 index 10559f30..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/PixelFormat.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * 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.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. - *

    - * 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. - * - * @author elias_naur@sourceforge.net - * @version $Revision$ - */ -public final class PixelFormat implements PixelFormatLWJGL { - - /** - * The number of bits per pixel, exluding alpha. - * This parameter is ignored in Display.create(). - */ - private int bpp; - /** The number of alpha bits. */ - private int alpha; - /** The number of depth buffer bits */ - private int depth; - /** The number of stencil bits */ - private int stencil; - /** - * 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. - *

    - * This property is currently a no-op for the MacOS implementation. - */ - private int colorSamples; - /** The number of auxiliary buffers */ - private int num_aux_buffers; - /** The number of bits per pixel in the accumulation buffer */ - private int accum_bpp; - /** The number of alpha bits in the accumulation buffer */ - private int accum_alpha; - /** Whether this format requires a stereo buffer */ - private boolean stereo; - /** 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. - */ - private boolean floating_point_packed; - /** - * 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. - */ - public PixelFormat() { - this(0, 8, 0); - } - - public PixelFormat(int alpha, int depth, int stencil) { - this(alpha, depth, stencil, 0); - } - - public PixelFormat(int alpha, int depth, int stencil, int samples) { - this(0, alpha, depth, stencil, samples); - } - - public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples) { - 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) { - 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) { - this.bpp = bpp; - this.alpha = alpha; - this.depth = depth; - this.stencil = stencil; - - this.samples = samples; - - this.num_aux_buffers = num_aux_buffers; - - this.accum_bpp = accum_bpp; - this.accum_alpha = accum_alpha; - - this.stereo = stereo; - - this.floating_point = floating_point; - this.floating_point_packed = false; - this.sRGB = false; - } - - private PixelFormat(final PixelFormat pf) { - this.bpp = pf.bpp; - this.alpha = pf.alpha; - this.depth = pf.depth; - this.stencil = pf.stencil; - - this.samples = pf.samples; - this.colorSamples = pf.colorSamples; - - this.num_aux_buffers = pf.num_aux_buffers; - - this.accum_bpp = pf.accum_bpp; - this.accum_alpha = pf.accum_alpha; - - this.stereo = pf.stereo; - - this.floating_point = pf.floating_point; - this.floating_point_packed = pf.floating_point_packed; - this.sRGB = pf.sRGB; - } - - public int getBitsPerPixel() { - return bpp; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel value. - * - * @param bpp the new bits per pixel value. - * - * @return the new PixelFormat - */ - public PixelFormat withBitsPerPixel(final int bpp) { - if ( bpp < 0 ) - throw new IllegalArgumentException("Invalid number of bits per pixel specified: " + bpp); - - final PixelFormat pf = new PixelFormat(this); - pf.bpp = bpp; - return pf; - } - - public int getAlphaBits() { - return alpha; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits value. - * - * @param alpha the new alpha bits value. - * - * @return the new PixelFormat - */ - public PixelFormat withAlphaBits(final int alpha) { - if ( alpha < 0 ) - throw new IllegalArgumentException("Invalid number of alpha bits specified: " + alpha); - - final PixelFormat pf = new PixelFormat(this); - pf.alpha = alpha; - return pf; - } - - public int getDepthBits() { - return depth; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new depth bits value. - * - * @param depth the new depth bits value. - * - * @return the new PixelFormat - */ - public PixelFormat withDepthBits(final int depth) { - if ( depth < 0 ) - throw new IllegalArgumentException("Invalid number of depth bits specified: " + depth); - - final PixelFormat pf = new PixelFormat(this); - pf.depth = depth; - return pf; - } - - public int getStencilBits() { - return stencil; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new stencil bits value. - * - * @param stencil the new stencil bits value. - * - * @return the new PixelFormat - */ - public PixelFormat withStencilBits(final int stencil) { - if ( stencil < 0 ) - throw new IllegalArgumentException("Invalid number of stencil bits specified: " + stencil); - - final PixelFormat pf = new PixelFormat(this); - pf.stencil = stencil; - return pf; - } - - public int getSamples() { - return samples; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new samples value. - * - * @param samples the new samples value. - * - * @return the new PixelFormat - */ - public PixelFormat withSamples(final int samples) { - if ( samples < 0 ) - throw new IllegalArgumentException("Invalid number of samples specified: " + samples); - - final PixelFormat pf = new PixelFormat(this); - pf.samples = samples; - return pf; - } - - /** - * 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. - * - * @return the new PixelFormat - */ - public PixelFormat withCoverageSamples(final int colorSamples) { - return withCoverageSamples(colorSamples, samples); - } - - /** - * 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 coverageSamples the new coverage samples value. - * - * @return the new PixelFormat - */ - public PixelFormat withCoverageSamples(final int colorSamples, final int coverageSamples) { - if ( coverageSamples < 0 || colorSamples < 0 || (coverageSamples == 0 && 0 < colorSamples) || coverageSamples < colorSamples ) - throw new IllegalArgumentException("Invalid number of coverage samples specified: " + coverageSamples + " - " + colorSamples); - - final PixelFormat pf = new PixelFormat(this); - pf.samples = coverageSamples; - pf.colorSamples = colorSamples; - return pf; - } - - public int getAuxBuffers() { - return num_aux_buffers; - } - - /** - * 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. - * - * @return the new PixelFormat - */ - public PixelFormat withAuxBuffers(final int num_aux_buffers) { - if ( num_aux_buffers < 0 ) - throw new IllegalArgumentException("Invalid number of auxiliary buffers specified: " + num_aux_buffers); - - final PixelFormat pf = new PixelFormat(this); - pf.num_aux_buffers = num_aux_buffers; - return pf; - } - - public int getAccumulationBitsPerPixel() { - return accum_bpp; - } - - /** - * 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); - - final PixelFormat pf = new PixelFormat(this); - pf.accum_bpp = accum_bpp; - return pf; - } - - public int getAccumulationAlpha() { - return accum_alpha; - } - - /** - * 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); - - final PixelFormat pf = new PixelFormat(this); - pf.accum_alpha = accum_alpha; - return pf; - } - - public boolean isStereo() { - return stereo; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new stereo value. - * - * @param stereo the new stereo value. - * - * @return the new PixelFormat - */ - public PixelFormat withStereo(final boolean stereo) { - final PixelFormat pf = new PixelFormat(this); - pf.stereo = stereo; - return pf; - } - - public boolean isFloatingPoint() { - return floating_point; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new floating point value. - * If floating_point is true, floating_point_packed will be reset to false. - * - * @param floating_point the new floating point value. - * - * @return the new PixelFormat - */ - public PixelFormat withFloatingPoint(final boolean floating_point) { - final PixelFormat pf = new PixelFormat(this); - pf.floating_point = floating_point; - if ( floating_point ) - pf.floating_point_packed = false; - return pf; - } - - /** - * 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. - * - * @return the new PixelFormat - */ - public PixelFormat withFloatingPointPacked(final boolean floating_point_packed) { - final PixelFormat pf = new PixelFormat(this); - pf.floating_point_packed = floating_point_packed; - if ( floating_point_packed ) - pf.floating_point = false; - return pf; - } - - public boolean isSRGB() { - return sRGB; - } - - /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new sRGB value. - * - * @param sRGB the new floating point value. - * - * @return the new PixelFormat - */ - public PixelFormat withSRGB(final boolean sRGB) { - final PixelFormat pf = new PixelFormat(this); - pf.sRGB = sRGB; - return pf; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/PixelFormatLWJGL.java b/LWJGL/src/main/java/org/lwjgl/opengl/PixelFormatLWJGL.java deleted file mode 100644 index d270dac0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/PixelFormatLWJGL.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.lwjgl.opengl; - -/** - * [INTERNAL USE ONLY] - * - * @author Spasi - */ -public interface PixelFormatLWJGL { - // Marker interface -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/RenderTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/RenderTexture.java deleted file mode 100644 index 8d30e142..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/RenderTexture.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * 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.opengl; - -import static org.lwjgl.opengl.GL11.GL_TRUE; - -import org.lwjgl.BufferUtils; - -import java.nio.IntBuffer; - -/** This class represents the state necessary for render-to-texture. */ -public final class RenderTexture { - - // ---------------------------------------------------------------------------------- - // ----------------------------- WGL_ARB_render_texture ----------------------------- - // ---------------------------------------------------------------------------------- - - /* - 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: - */ - 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: - */ - 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: - */ - 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: - */ - 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: - */ - 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; - static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x2080; - static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x2081; - static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x2082; - - /* - 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; - */ - - // ------------------------------------------------------------------------------------------- - // ----------------------------- WGL_NV_render_texture_rectangle ----------------------------- - // ------------------------------------------------------------------------------------------- - - /* - 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: - */ - private static final int WGL_TEXTURE_RECTANGLE_NV = 0x20A2; - - // --------------------------------------------------------------------------------------- - // ----------------------------- WGL_NV_render_depth_texture ----------------------------- - // --------------------------------------------------------------------------------------- - - /* - 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: - */ - 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: - */ - private static final int WGL_TEXTURE_DEPTH_COMPONENT_NV = 0x20A6; - - /* - Accepted by the parameter of wglBindTexImageARB: - */ - static final int WGL_DEPTH_COMPONENT_NV = 0x20A7; - - /** The TEXTURE_1D target. */ - public static final int RENDER_TEXTURE_1D = WGL_TEXTURE_1D_ARB; - - /** The TEXTURE_2D target. */ - public static final int RENDER_TEXTURE_2D = WGL_TEXTURE_2D_ARB; - - /** The TEXTURE_RECTANGLE target. */ - public static final int RENDER_TEXTURE_RECTANGLE = WGL_TEXTURE_RECTANGLE_NV; - - /** The TEXTURE_CUBE_MAP target. */ - public static final int RENDER_TEXTURE_CUBE_MAP = WGL_TEXTURE_CUBE_MAP_ARB; - - IntBuffer pixelFormatCaps; - IntBuffer pBufferAttribs; - - /** - * Creates a RenderTexture object for enabling render-to-texture on a P-buffer. - *

    - * NOTE: Only one of useRGB and useRGBA can be true at the same time. - *

    - * NOTE: useRGB(A) and useDepth can be true at the same time, thus allowing two different render textures. - *

    - * NOTE: The target parameter can be one of the following: - *

    - * RENDER_TEXTURE_1D RENDER_TEXTURE_2D RENDER_TEXTURE_RECTANGLE RENDER_TEXTURE_CUBE_MAP - * - * @param useRGB - When true the P-buffer can be used as an RGB render texture. - * @param useRGBA - When true the P-buffer can be used as an RGBA render texture. - * @param useDepth - When true the P-buffer can be used as a depth render texture. - * @param isRectangle - When true rectangle textures will be allowed on the P-buffer. - * @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) { - 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."); - - pixelFormatCaps = BufferUtils.createIntBuffer(4); - pBufferAttribs = BufferUtils.createIntBuffer(8); - - if ( useRGB ) { - pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV : WGL_BIND_TO_TEXTURE_RGB_ARB); - pixelFormatCaps.put(GL_TRUE); - - pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB); - pBufferAttribs.put(WGL_TEXTURE_RGB_ARB); - } else if ( useRGBA ) { - pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV : WGL_BIND_TO_TEXTURE_RGBA_ARB); - pixelFormatCaps.put(GL_TRUE); - - pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB); - pBufferAttribs.put(WGL_TEXTURE_RGBA_ARB); - } - - if ( useDepth ) { - pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV : WGL_BIND_TO_TEXTURE_DEPTH_NV); - pixelFormatCaps.put(GL_TRUE); - - pBufferAttribs.put(WGL_DEPTH_TEXTURE_FORMAT_NV); - pBufferAttribs.put(WGL_TEXTURE_DEPTH_COMPONENT_NV); - } - - pBufferAttribs.put(WGL_TEXTURE_TARGET_ARB); - pBufferAttribs.put(target); - - if ( mipmaps != 0 ) { - pBufferAttribs.put(WGL_MIPMAP_TEXTURE_ARB); - pBufferAttribs.put(mipmaps); - } - - pixelFormatCaps.flip(); - pBufferAttribs.flip(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/S3S3TC.java b/LWJGL/src/main/java/org/lwjgl/opengl/S3S3TC.java deleted file mode 100644 index 641ff819..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/S3S3TC.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the S3_s3tc extension. - * - *

    This extension allows specifying texture data in compressed S3TC format.

    - */ -public final class S3S3TC { - - /** Accepted by the ??? parameter of ??? (presumably by the {@code format} argument of TexImage2D?. */ - public static final int - GL_RGB_S3TC = 0x83A0, - GL_RGB4_S3TC = 0x83A1, - GL_RGBA_S3TC = 0x83A2, - GL_RGBA4_S3TC = 0x83A3, - GL_RGBA_DXT5_S3TC = 0x83A4, - GL_RGBA4_DXT5_S3TC = 0x83A5; - - private S3S3TC() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/SharedDrawable.java b/LWJGL/src/main/java/org/lwjgl/opengl/SharedDrawable.java deleted file mode 100644 index 72273297..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/SharedDrawable.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.opengl; - -import org.lwjgl.LWJGLException; - -/** - * @author Spasi - */ - -/** - * 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 - */ -public final class SharedDrawable extends DrawableGL { - - public SharedDrawable(final Drawable drawable) throws LWJGLException { - this.context = (ContextGL)((DrawableLWJGL)drawable).createSharedContext(); - } - - public ContextGL createSharedContext() { - throw new UnsupportedOperationException(); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/Sync.java b/LWJGL/src/main/java/org/lwjgl/opengl/Sync.java deleted file mode 100644 index 51560ddf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/Sync.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * 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.lwjgl.opengl; - -import org.lwjgl.Sys; - -/** -* A highly accurate sync method that continually adapts to the system -* it runs on to provide reliable results. -* -* @author Riven -* @author kappaOne -*/ -class Sync { - - /** number of nano seconds in a second */ - private static final long NANOS_IN_SECOND = 1000L * 1000L * 1000L; - - /** The time to sleep/yield until the next frame */ - private static long nextFrame = 0; - - /** whether the initialisation code has run */ - private static boolean initialised = false; - - /** for calculating the averages the previous sleep/yield times are stored */ - private static RunningAvg sleepDurations = new RunningAvg(10); - 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. - * - * @param fps - the desired frame rate, in frames per second - */ - public static void sync(int fps) { - if (fps <= 0) return; - if (!initialised) initialise(); - - try { - // sleep until the average sleep time is greater than the time remaining till nextFrame - for (long t0 = getTime(), t1; (nextFrame - t0) > sleepDurations.avg(); t0 = t1) { - Thread.sleep(1); - sleepDurations.add((t1 = getTime()) - t0); // update average sleep time - } - - // slowly dampen sleep average if too high to avoid yielding too much - sleepDurations.dampenForLowResTicker(); - - // yield until the average yield time is greater than the time remaining till nextFrame - for (long t0 = getTime(), t1; (nextFrame - t0) > yieldDurations.avg(); t0 = t1) { - Thread.yield(); - yieldDurations.add((t1 = getTime()) - t0); // update average yield time - } - } catch (InterruptedException e) { - - } - - // schedule next frame, drop frame(s) if already too late for next frame - nextFrame = Math.max(nextFrame + NANOS_IN_SECOND / fps, getTime()); - } - - /** - * 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. - */ - private static void initialise() { - initialised = true; - - sleepDurations.init(1000 * 1000); - yieldDurations.init((int) (-(getTime() - getTime()) * 1.333)); - - nextFrame = getTime(); - - String osName = System.getProperty("os.name"); - - if (osName.startsWith("Win")) { - // On windows the sleep functions can be highly inaccurate by - // over 10ms making in unusable. However it can be forced to - // be a bit more accurate by running a separate sleeping daemon - // thread. - Thread timerAccuracyThread = new Thread(new Runnable() { - public void run() { - try { - Thread.sleep(Long.MAX_VALUE); - } catch (Exception e) {} - } - }); - - timerAccuracyThread.setName("LWJGL Timer"); - timerAccuracyThread.setDaemon(true); - timerAccuracyThread.start(); - } - } - - /** - * Get the system time in nano seconds - * - * @return will return the current time in nano's - */ - private static long getTime() { - return (Sys.getTime() * NANOS_IN_SECOND) / Sys.getTimerResolution(); - } - - private static class RunningAvg { - private final long[] slots; - private int offset; - - private static final long DAMPEN_THRESHOLD = 10 * 1000L * 1000L; // 10ms - private static final float DAMPEN_FACTOR = 0.9f; // don't change: 0.9f is exactly right! - - public RunningAvg(int slotCount) { - this.slots = new long[slotCount]; - this.offset = 0; - } - - public void init(long value) { - while (this.offset < this.slots.length) { - this.slots[this.offset++] = value; - } - } - - public void add(long value) { - this.slots[this.offset++ % this.slots.length] = value; - this.offset %= this.slots.length; - } - - public long avg() { - long sum = 0; - for (int i = 0; i < this.slots.length; i++) { - sum += this.slots[i]; - } - return sum / this.slots.length; - } - - public void dampenForLowResTicker() { - if (this.avg() > DAMPEN_THRESHOLD) { - for (int i = 0; i < this.slots.length; i++) { - this.slots[i] *= DAMPEN_FACTOR; - } - } - } - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/Util.java b/LWJGL/src/main/java/org/lwjgl/opengl/Util.java deleted file mode 100644 index 3e94a172..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/Util.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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.opengl; - -import static org.lwjgl.opengl.ARBImaging.GL_TABLE_TOO_LARGE; -import static org.lwjgl.opengl.GL11.GL_INVALID_ENUM; -import static org.lwjgl.opengl.GL11.GL_INVALID_OPERATION; -import static org.lwjgl.opengl.GL11.GL_INVALID_VALUE; -import static org.lwjgl.opengl.GL11.GL_NO_ERROR; -import static org.lwjgl.opengl.GL11.GL_OUT_OF_MEMORY; -import static org.lwjgl.opengl.GL11.GL_STACK_OVERFLOW; -import static org.lwjgl.opengl.GL11.GL_STACK_UNDERFLOW; -import static org.lwjgl.opengl.GL11.glGetError; -import static org.lwjgl.opengl.GL30.GL_INVALID_FRAMEBUFFER_OPERATION; - -/** - * Simple utility class. - * - * @author cix_foo - * @version $Revision$ - */ - -public final class Util { - /** No c'tor */ - private Util() { - } - - /** - * Throws OpenGLException if glGetError() returns anything else than GL_NO_ERROR - * - */ - public static void checkGLError() throws OpenGLException { - int err = glGetError(); - if ( err != GL_NO_ERROR ) { - throw new OpenGLException(err); - } - } - - /** - * Translate a GL error code to a String describing the error - */ - public static String translateGLErrorString(int error_code) { - switch (error_code) { - case GL_NO_ERROR: - return "No error"; - case GL_INVALID_ENUM: - return "Invalid enum"; - case GL_INVALID_VALUE: - return "Invalid value"; - case GL_INVALID_OPERATION: - return "Invalid operation"; - case GL_STACK_OVERFLOW: - return "Stack overflow"; - case GL_STACK_UNDERFLOW: - return "Stack underflow"; - case GL_OUT_OF_MEMORY: - return "Out of memory"; - case GL_TABLE_TOO_LARGE: - return "Table too large"; - case GL_INVALID_FRAMEBUFFER_OPERATION: - return "Invalid framebuffer operation"; - default: - return null; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGL.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGL.java deleted file mode 100644 index 0206da12..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGL.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -import org.lwjgl.system.windows.*; - -/** Native bindings to WGL functionality. */ -public class WGL { - - static { GL.initialize(); } - - /** Contains the function pointers loaded from {@code GL.getFunctionProvider()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - CreateContext = apiGetFunctionAddress(GL.getFunctionProvider(), "wglCreateContext"), - CreateLayerContext = apiGetFunctionAddress(GL.getFunctionProvider(), "wglCreateLayerContext"), - CopyContext = apiGetFunctionAddress(GL.getFunctionProvider(), "wglCopyContext"), - DeleteContext = apiGetFunctionAddress(GL.getFunctionProvider(), "wglDeleteContext"), - GetCurrentContext = apiGetFunctionAddress(GL.getFunctionProvider(), "wglGetCurrentContext"), - GetCurrentDC = apiGetFunctionAddress(GL.getFunctionProvider(), "wglGetCurrentDC"), - GetProcAddress = apiGetFunctionAddress(GL.getFunctionProvider(), "wglGetProcAddress"), - MakeCurrent = apiGetFunctionAddress(GL.getFunctionProvider(), "wglMakeCurrent"), - ShareLists = apiGetFunctionAddress(GL.getFunctionProvider(), "wglShareLists"); - - } - - /** UseFontOutlines format. */ - public static final int - WGL_FONT_LINES = 0, - WGL_FONT_POLYGONS = 1; - - /** SwapLayerBuffers flags. */ - public static final int - WGL_SWAP_MAIN_PLANE = 0x1, - WGL_SWAP_OVERLAY1 = 0x2, - WGL_SWAP_OVERLAY2 = 0x4, - WGL_SWAP_OVERLAY3 = 0x8, - WGL_SWAP_OVERLAY4 = 0x10, - WGL_SWAP_OVERLAY5 = 0x20, - WGL_SWAP_OVERLAY6 = 0x40, - WGL_SWAP_OVERLAY7 = 0x80, - WGL_SWAP_OVERLAY8 = 0x100, - WGL_SWAP_OVERLAY9 = 0x200, - WGL_SWAP_OVERLAY10 = 0x400, - WGL_SWAP_OVERLAY11 = 0x800, - WGL_SWAP_OVERLAY12 = 0x1000, - WGL_SWAP_OVERLAY13 = 0x2000, - WGL_SWAP_OVERLAY14 = 0x4000, - WGL_SWAP_OVERLAY15 = 0x8000, - WGL_SWAP_UNDERLAY1 = 0x10000, - WGL_SWAP_UNDERLAY2 = 0x20000, - WGL_SWAP_UNDERLAY3 = 0x40000, - WGL_SWAP_UNDERLAY4 = 0x80000, - WGL_SWAP_UNDERLAY5 = 0x100000, - WGL_SWAP_UNDERLAY6 = 0x200000, - WGL_SWAP_UNDERLAY7 = 0x400000, - WGL_SWAP_UNDERLAY8 = 0x800000, - WGL_SWAP_UNDERLAY9 = 0x1000000, - WGL_SWAP_UNDERLAY10 = 0x2000000, - WGL_SWAP_UNDERLAY11 = 0x4000000, - WGL_SWAP_UNDERLAY12 = 0x8000000, - WGL_SWAP_UNDERLAY13 = 0x10000000, - WGL_SWAP_UNDERLAY14 = 0x20000000, - WGL_SWAP_UNDERLAY15 = 0x40000000; - - protected WGL() { - throw new UnsupportedOperationException(); - } - - // --- [ wglCreateContext ] --- - - /** Unsafe version of: {@link #wglCreateContext CreateContext} */ - public static native long nwglCreateContext(long hdc, long __functionAddress); - - /** - * Creates a new OpenGL rendering context, which is suitable for drawing on the device referenced by device. The rendering context has the same pixel - * format as the device context. - * - * @param hdc handle to a device context for which the function creates a suitable OpenGL rendering context - */ - @NativeType("HGLRC") - public static long wglCreateContext(@NativeType("HDC") long hdc) { - long __functionAddress = Functions.CreateContext; - if (CHECKS) { - check(hdc); - } - return nwglCreateContext(hdc, __functionAddress); - } - - // --- [ wglCreateLayerContext ] --- - - /** Unsafe version of: {@link #wglCreateLayerContext CreateLayerContext} */ - public static native long nwglCreateLayerContext(long hdc, int layerPlane, long __functionAddress); - - /** - * Creates a new OpenGL rendering context for drawing to a specified layer plane on a device context. - * - * @param hdc the device context for a new rendering context - * @param layerPlane the layer plane to which you want to bind a rendering context. The value 0 identifies the main plane. Positive values of {@code layerPlace} identify - * overlay planes, where 1 is the first overlay plane over the main plane, 2 is the second overlay plane over the first overlay plane, and so on. - * Negative values identify underlay planes, where 1 is the first underlay plane under the main plane, 2 is the second underlay plane under the first - * underlay plane, and so on. The number of overlay and underlay planes is given in the {@code reserved} member of the {@link PIXELFORMATDESCRIPTOR} - * structure. - */ - @NativeType("HGLRC") - public static long wglCreateLayerContext(@NativeType("HDC") long hdc, int layerPlane) { - long __functionAddress = Functions.CreateLayerContext; - if (CHECKS) { - check(hdc); - } - return nwglCreateLayerContext(hdc, layerPlane, __functionAddress); - } - - // --- [ wglCopyContext ] --- - - /** Unsafe version of: {@link #wglCopyContext CopyContext} */ - public static native int nwglCopyContext(long src, long dst, int mask, long __functionAddress); - - /** - * Copies selected groups of rendering states from one OpenGL rendering context to another. - * - * @param src the source OpenGL rendering context whose state information is to be copied - * @param dst the destination OpenGL rendering context to which state information is to be copied - * @param mask which groups of the {@code src} rendering state are to be copied to {@code dst}. It contains the bitwise-OR of the same symbolic names that are - * passed to the {@link GL11#glPushAttrib PushAttrib} function. You can use {@link GL11#GL_ALL_ATTRIB_BITS ALL_ATTRIB_BITS} to copy all the rendering state information. - */ - @NativeType("BOOL") - public static boolean wglCopyContext(@NativeType("HGLRC") long src, @NativeType("HGLRC") long dst, @NativeType("UINT") int mask) { - long __functionAddress = Functions.CopyContext; - if (CHECKS) { - check(src); - check(dst); - } - return nwglCopyContext(src, dst, mask, __functionAddress) != 0; - } - - // --- [ wglDeleteContext ] --- - - /** Unsafe version of: {@link #wglDeleteContext DeleteContext} */ - public static native int nwglDeleteContext(long context, long __functionAddress); - - /** - * Deletes a specified OpenGL rendering context. - * - * @param context handle to an OpenGL rendering context that the function will delete - */ - @NativeType("BOOL") - public static boolean wglDeleteContext(@NativeType("HGLRC") long context) { - long __functionAddress = Functions.DeleteContext; - if (CHECKS) { - check(context); - } - return nwglDeleteContext(context, __functionAddress) != 0; - } - - // --- [ wglGetCurrentContext ] --- - - /** Unsafe version of: {@link #wglGetCurrentContext GetCurrentContext} */ - public static native long nwglGetCurrentContext(long __functionAddress); - - /** Obtains a handle to the current OpenGL rendering context of the calling thread. */ - @NativeType("HGLRC") - public static long wglGetCurrentContext() { - long __functionAddress = Functions.GetCurrentContext; - return nwglGetCurrentContext(__functionAddress); - } - - // --- [ wglGetCurrentDC ] --- - - /** Unsafe version of: {@link #wglGetCurrentDC GetCurrentDC} */ - public static native long nwglGetCurrentDC(long __functionAddress); - - /** Obtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread. */ - @NativeType("HDC") - public static long wglGetCurrentDC() { - long __functionAddress = Functions.GetCurrentDC; - return nwglGetCurrentDC(__functionAddress); - } - - // --- [ wglGetProcAddress ] --- - - /** Unsafe version of: {@link #wglGetProcAddress GetProcAddress} */ - public static native long nwglGetProcAddress(long proc, long __functionAddress); - - /** Unsafe version of: {@link #wglGetProcAddress GetProcAddress} */ - public static long nwglGetProcAddress(long proc) { - long __functionAddress = Functions.GetProcAddress; - return nwglGetProcAddress(proc, __functionAddress); - } - - /** - * Returns the address of an OpenGL extension function for use with the current OpenGL rendering context. - * - * @param proc points to a null-terminated string that is the name of the extension function. The name of the extension function must be identical to a - * corresponding function implemented by OpenGL. - */ - @NativeType("PROC") - public static long wglGetProcAddress(@NativeType("LPCSTR") ByteBuffer proc) { - if (CHECKS) { - checkNT1(proc); - } - return nwglGetProcAddress(memAddress(proc)); - } - - /** - * Returns the address of an OpenGL extension function for use with the current OpenGL rendering context. - * - * @param proc points to a null-terminated string that is the name of the extension function. The name of the extension function must be identical to a - * corresponding function implemented by OpenGL. - */ - @NativeType("PROC") - public static long wglGetProcAddress(@NativeType("LPCSTR") CharSequence proc) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(proc, true); - long procEncoded = stack.getPointerAddress(); - return nwglGetProcAddress(procEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ wglMakeCurrent ] --- - - /** Unsafe version of: {@link #wglMakeCurrent MakeCurrent} */ - public static native int nwglMakeCurrent(long hdc, long hglrc, long __functionAddress); - - /** - * Makes a specified OpenGL rendering context the calling thread's current rendering context. All subsequent OpenGL calls made by the thread are drawn on - * the device identified by device. You can also use MakeCurrent to change the calling thread's current rendering context so it's no longer current. - * - * @param hdc handle to a device context. Subsequent OpenGL calls made by the calling thread are drawn on the device identified by {@code dc}. - * @param hglrc handle to an OpenGL rendering context that the function sets as the calling thread's rendering context. If {@code context} is {@code NULL}, the function - * makes the calling thread's current rendering context no longer current, and releases the device context that is used by the rendering context. In - * this case, {@code hdc} is ignored. - */ - @NativeType("BOOL") - public static boolean wglMakeCurrent(@NativeType("HDC") long hdc, @NativeType("HGLRC") long hglrc) { - long __functionAddress = Functions.MakeCurrent; - return nwglMakeCurrent(hdc, hglrc, __functionAddress) != 0; - } - - // --- [ wglShareLists ] --- - - /** Unsafe version of: {@link #wglShareLists ShareLists} */ - public static native int nwglShareLists(long hglrc1, long hglrc2, long __functionAddress); - - /** - * Enables multiple OpenGL rendering contexts to share a single display-list space. - * - * @param hglrc1 the OpenGL rendering context with which to share display lists. - * @param hglrc2 the OpenGL rendering context to share display lists with {@code hglrc1}. The {@code hglrc2} parameter should not contain any existing display lists - * when {@code wglShareLists} is called. - */ - @NativeType("BOOL") - public static boolean wglShareLists(@NativeType("HGLRC") long hglrc1, @NativeType("HGLRC") long hglrc2) { - long __functionAddress = Functions.ShareLists; - if (CHECKS) { - check(hglrc1); - check(hglrc2); - } - return nwglShareLists(hglrc1, hglrc2, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLAMDGPUAssociation.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLAMDGPUAssociation.java deleted file mode 100644 index 5d5fcde5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLAMDGPUAssociation.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_AMD_gpu_association extension. - * - *

    There currently is no way for applications to efficiently use GPU resources in systems that contain more than one GPU. Vendors have provided methods - * that attempt to split the workload for an application among the available GPU resources. This has proven to be very inefficient because most - * applications were never written with these sorts of optimizations in mind.

    - * - *

    This extension provides a mechanism for applications to explicitly use the GPU resources on a given system individually. By providing this - * functionality, a driver allows applications to make appropriate decisions regarding where and when to distribute rendering tasks.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string} and {@link EXTFramebufferObject EXT_framebuffer_object}.

    - */ -public class WGLAMDGPUAssociation { - - /** Accepted by the {@code property} parameter of {@link #wglGetGPUInfoAMD GetGPUInfoAMD}. */ - public static final int - WGL_GPU_VENDOR_AMD = 0x1F00, - WGL_GPU_RENDERER_STRING_AMD = 0x1F01, - WGL_GPU_OPENGL_VERSION_STRING_AMD = 0x1F02, - WGL_GPU_FASTEST_TARGET_GPUS_AMD = 0x21A2, - WGL_GPU_RAM_AMD = 0x21A3, - WGL_GPU_CLOCK_AMD = 0x21A4, - WGL_GPU_NUM_PIPES_AMD = 0x21A5, - WGL_GPU_NUM_SIMD_AMD = 0x21A6, - WGL_GPU_NUM_RB_AMD = 0x21A7, - WGL_GPU_NUM_SPI_AMD = 0x21A8; - - protected WGLAMDGPUAssociation() { - throw new UnsupportedOperationException(); - } - - // --- [ wglGetGPUIDsAMD ] --- - - /** - * Unsafe version of: {@link #wglGetGPUIDsAMD GetGPUIDsAMD} - * - * @param maxCount the max number of IDs that can be returned - */ - public static int nwglGetGPUIDsAMD(int maxCount, long ids) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetGPUIDsAMD; - if (CHECKS) { - check(__functionAddress); - } - return callPI(maxCount, ids, __functionAddress); - } - - /** - * Returns the IDs for available GPUs. - * - *

    If the function succeeds, the return value is the number of total GPUs available. The value 0 is returned if no GPUs are available or if the call has - * failed. The ID 0 is reserved and will not be retuned as a valid GPU ID. If the array {@code ids} is {@code NULL}, the function will only return the total - * number of GPUs. {@code ids} will be tightly packed with no 0 values between valid ids.

    - * - * @param ids the array of returned IDs - */ - @NativeType("UINT") - public static int wglGetGPUIDsAMD(@Nullable @NativeType("UINT *") IntBuffer ids) { - return nwglGetGPUIDsAMD(remainingSafe(ids), memAddressSafe(ids)); - } - - // --- [ wglGetGPUInfoAMD ] --- - - /** - * Unsafe version of: {@link #wglGetGPUInfoAMD GetGPUInfoAMD} - * - * @param size the size of the {@code data} buffer - */ - public static int nwglGetGPUInfoAMD(int id, int property, int dataType, int size, long data) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetGPUInfoAMD; - if (CHECKS) { - check(__functionAddress); - } - return callPI(id, property, dataType, size, data, __functionAddress); - } - - /** - * Each GPU in a system may have different properties, performance characteristics and different supported OpenGL versions. Use this function to determine - * which GPU is best suited for a specific task. - * - *

    For a string, {@code size} will be the number of characters allocated and will include {@code NULL} termination. For arrays of type GL_UNSIGNED_INT, GL_INT, - * and GL_FLOAT {@code size} will be the array depth. If the function succeeds, the number of values written will be returned. If the number of values - * written is equal to {@code size}, the query should be repeated with a larger {@code data} buffer. Strings should be queried using the GL_UNSIGNED_BYTE - * type, are UTF-8 encoded and will be {@code NULL} terminated. If the function fails, -1 will be returned.

    - * - * @param id a GPU id obtained from calling {@link #wglGetGPUIDsAMD GetGPUIDsAMD} - * @param property the information being queried. One of:
    {@link #WGL_GPU_VENDOR_AMD GPU_VENDOR_AMD}{@link #WGL_GPU_RENDERER_STRING_AMD GPU_RENDERER_STRING_AMD}{@link #WGL_GPU_OPENGL_VERSION_STRING_AMD GPU_OPENGL_VERSION_STRING_AMD}{@link #WGL_GPU_FASTEST_TARGET_GPUS_AMD GPU_FASTEST_TARGET_GPUS_AMD}
    {@link #WGL_GPU_RAM_AMD GPU_RAM_AMD}{@link #WGL_GPU_CLOCK_AMD GPU_CLOCK_AMD}{@link #WGL_GPU_NUM_PIPES_AMD GPU_NUM_PIPES_AMD}{@link #WGL_GPU_NUM_SIMD_AMD GPU_NUM_SIMD_AMD}
    {@link #WGL_GPU_NUM_RB_AMD GPU_NUM_RB_AMD}{@link #WGL_GPU_NUM_SPI_AMD GPU_NUM_SPI_AMD}
    - * @param dataType the data type to be returned. One of:
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}
    - * @param data the buffer which will be filled with the requested information - */ - public static int wglGetGPUInfoAMD(@NativeType("UINT") int id, int property, @NativeType("GLenum") int dataType, @NativeType("void *") ByteBuffer data) { - return nwglGetGPUInfoAMD(id, property, dataType, data.remaining() >> GLChecks.typeToByteShift(dataType), memAddress(data)); - } - - /** - * Each GPU in a system may have different properties, performance characteristics and different supported OpenGL versions. Use this function to determine - * which GPU is best suited for a specific task. - * - *

    For a string, {@code size} will be the number of characters allocated and will include {@code NULL} termination. For arrays of type GL_UNSIGNED_INT, GL_INT, - * and GL_FLOAT {@code size} will be the array depth. If the function succeeds, the number of values written will be returned. If the number of values - * written is equal to {@code size}, the query should be repeated with a larger {@code data} buffer. Strings should be queried using the GL_UNSIGNED_BYTE - * type, are UTF-8 encoded and will be {@code NULL} terminated. If the function fails, -1 will be returned.

    - * - * @param id a GPU id obtained from calling {@link #wglGetGPUIDsAMD GetGPUIDsAMD} - * @param property the information being queried. One of:
    {@link #WGL_GPU_VENDOR_AMD GPU_VENDOR_AMD}{@link #WGL_GPU_RENDERER_STRING_AMD GPU_RENDERER_STRING_AMD}{@link #WGL_GPU_OPENGL_VERSION_STRING_AMD GPU_OPENGL_VERSION_STRING_AMD}{@link #WGL_GPU_FASTEST_TARGET_GPUS_AMD GPU_FASTEST_TARGET_GPUS_AMD}
    {@link #WGL_GPU_RAM_AMD GPU_RAM_AMD}{@link #WGL_GPU_CLOCK_AMD GPU_CLOCK_AMD}{@link #WGL_GPU_NUM_PIPES_AMD GPU_NUM_PIPES_AMD}{@link #WGL_GPU_NUM_SIMD_AMD GPU_NUM_SIMD_AMD}
    {@link #WGL_GPU_NUM_RB_AMD GPU_NUM_RB_AMD}{@link #WGL_GPU_NUM_SPI_AMD GPU_NUM_SPI_AMD}
    - * @param dataType the data type to be returned. One of:
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}
    - * @param data the buffer which will be filled with the requested information - */ - public static int wglGetGPUInfoAMD(@NativeType("UINT") int id, int property, @NativeType("GLenum") int dataType, @NativeType("void *") IntBuffer data) { - return nwglGetGPUInfoAMD(id, property, dataType, (int)(((long)data.remaining() << 2) >> GLChecks.typeToByteShift(dataType)), memAddress(data)); - } - - /** - * Each GPU in a system may have different properties, performance characteristics and different supported OpenGL versions. Use this function to determine - * which GPU is best suited for a specific task. - * - *

    For a string, {@code size} will be the number of characters allocated and will include {@code NULL} termination. For arrays of type GL_UNSIGNED_INT, GL_INT, - * and GL_FLOAT {@code size} will be the array depth. If the function succeeds, the number of values written will be returned. If the number of values - * written is equal to {@code size}, the query should be repeated with a larger {@code data} buffer. Strings should be queried using the GL_UNSIGNED_BYTE - * type, are UTF-8 encoded and will be {@code NULL} terminated. If the function fails, -1 will be returned.

    - * - * @param id a GPU id obtained from calling {@link #wglGetGPUIDsAMD GetGPUIDsAMD} - * @param property the information being queried. One of:
    {@link #WGL_GPU_VENDOR_AMD GPU_VENDOR_AMD}{@link #WGL_GPU_RENDERER_STRING_AMD GPU_RENDERER_STRING_AMD}{@link #WGL_GPU_OPENGL_VERSION_STRING_AMD GPU_OPENGL_VERSION_STRING_AMD}{@link #WGL_GPU_FASTEST_TARGET_GPUS_AMD GPU_FASTEST_TARGET_GPUS_AMD}
    {@link #WGL_GPU_RAM_AMD GPU_RAM_AMD}{@link #WGL_GPU_CLOCK_AMD GPU_CLOCK_AMD}{@link #WGL_GPU_NUM_PIPES_AMD GPU_NUM_PIPES_AMD}{@link #WGL_GPU_NUM_SIMD_AMD GPU_NUM_SIMD_AMD}
    {@link #WGL_GPU_NUM_RB_AMD GPU_NUM_RB_AMD}{@link #WGL_GPU_NUM_SPI_AMD GPU_NUM_SPI_AMD}
    - * @param dataType the data type to be returned. One of:
    {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}{@link GL11#GL_INT INT}{@link GL11#GL_FLOAT FLOAT}{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}
    - * @param data the buffer which will be filled with the requested information - */ - public static int wglGetGPUInfoAMD(@NativeType("UINT") int id, int property, @NativeType("GLenum") int dataType, @NativeType("void *") FloatBuffer data) { - return nwglGetGPUInfoAMD(id, property, dataType, (int)(((long)data.remaining() << 2) >> GLChecks.typeToByteShift(dataType)), memAddress(data)); - } - - // --- [ wglGetContextGPUIDAMD ] --- - - /** - * Determine which GPU a context is attached to. - * - *

    Unassociated contexts are created by calling {@link WGL#wglCreateContext CreateContext}. Although these contexts are unassociated, their use will still be tied to a single - * GPU in most cases. For this reason it is advantageous to be able to query the GPU an existing unassociated context resides on. If multiple GPUs are - * available, it would be undesirable to use one for rendering to visible surfaces and then chose the same one for off-screen rendering.

    - * - * @param hglrc the context for which the GPU id will be returned - */ - @NativeType("UINT") - public static int wglGetContextGPUIDAMD(@NativeType("HGLRC") long hglrc) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetContextGPUIDAMD; - if (CHECKS) { - check(__functionAddress); - check(hglrc); - } - return callPI(hglrc, __functionAddress); - } - - // --- [ wglCreateAssociatedContextAMD ] --- - - /** - * Creates an associated context. Upon successful creation, no pixel format is tied to an associated context. - * - * @param id a valid GPU id - */ - @NativeType("HGLRC") - public static long wglCreateAssociatedContextAMD(@NativeType("UINT") int id) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreateAssociatedContextAMD; - if (CHECKS) { - check(__functionAddress); - } - return callP(id, __functionAddress); - } - - // --- [ wglCreateAssociatedContextAttribsAMD ] --- - - /** Unsafe version of: {@link #wglCreateAssociatedContextAttribsAMD CreateAssociatedContextAttribsAMD} */ - public static long nwglCreateAssociatedContextAttribsAMD(int id, long shareContext, long attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreateAssociatedContextAttribsAMD; - if (CHECKS) { - check(__functionAddress); - } - return callPPP(id, shareContext, attribList, __functionAddress); - } - - /** - * Create an associated context with a specific GL version. - * - *

    All capabilities and limitations of {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB} apply to {@code CreateAssociatedContextAttribsAMD}.

    - * - * @param id a valid GPU id - * @param shareContext must either be {@code NULL} or that of an associated context created with the same GPU ID as {@code id} - * @param attribList a 0-terminated list of attributes for the context - */ - @NativeType("HGLRC") - public static long wglCreateAssociatedContextAttribsAMD(@NativeType("UINT") int id, @NativeType("HGLRC") long shareContext, @Nullable @NativeType("int const *") IntBuffer attribList) { - if (CHECKS) { - checkNTSafe(attribList); - } - return nwglCreateAssociatedContextAttribsAMD(id, shareContext, memAddressSafe(attribList)); - } - - // --- [ wglDeleteAssociatedContextAMD ] --- - - /** - * Deletes an associated context. An associated context cannot be deleted by calling {@link WGL#wglDeleteContext DeleteContext}. - * - * @param hglrc a valid associated context created by calling {@link #wglCreateAssociatedContextAMD CreateAssociatedContextAMD} - */ - @NativeType("BOOL") - public static boolean wglDeleteAssociatedContextAMD(@NativeType("HGLRC") long hglrc) { - long __functionAddress = GL.getCapabilitiesWGL().wglDeleteAssociatedContextAMD; - if (CHECKS) { - check(__functionAddress); - check(hglrc); - } - return callPI(hglrc, __functionAddress) != 0; - } - - // --- [ wglMakeAssociatedContextCurrentAMD ] --- - - /** - * Makes an associated context current in the current thread. - * - * @param hglrc a context handle created by calling {@link #wglCreateAssociatedContextAMD CreateAssociatedContextAMD} - */ - @NativeType("BOOL") - public static boolean wglMakeAssociatedContextCurrentAMD(@NativeType("HGLRC") long hglrc) { - long __functionAddress = GL.getCapabilitiesWGL().wglMakeAssociatedContextCurrentAMD; - if (CHECKS) { - check(__functionAddress); - check(hglrc); - } - return callPI(hglrc, __functionAddress) != 0; - } - - // --- [ wglGetCurrentAssociatedContextAMD ] --- - - /** Returns the current associated context in the current thread. */ - @NativeType("HGLRC") - public static long wglGetCurrentAssociatedContextAMD() { - long __functionAddress = GL.getCapabilitiesWGL().wglGetCurrentAssociatedContextAMD; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - - // --- [ wglBlitContextFramebufferAMD ] --- - - /** - * Blits data from one context to another. This facilitates high performance data communication between multiple contexts. - * - * @param dstCtx the context handle for the write context - * @param srcX0 the source x0 coordinate - * @param srcY0 the source Y0 coordinate - * @param srcX1 the source X1 coordinate - * @param srcY1 the source Y1 coordinate - * @param dstX0 the destination X0 coordinate - * @param dstY0 the destination Y0 coordinate - * @param dstX1 the destination X1 coordinate - * @param dstY1 the destination Y1 coordinate - * @param mask the bitwise OR of a number of values indicating which buffers are to be copied. One or more of:
    {@link GL11#GL_COLOR_BUFFER_BIT COLOR_BUFFER_BIT}{@link GL11#GL_DEPTH_BUFFER_BIT DEPTH_BUFFER_BIT}{@link GL11#GL_STENCIL_BUFFER_BIT STENCIL_BUFFER_BIT}
    - * @param filter the interpolation method to apply if the image is stretched. One of:
    {@link GL11#GL_LINEAR LINEAR}{@link GL11#GL_NEAREST NEAREST}
    - */ - @NativeType("VOID") - public static void wglBlitContextFramebufferAMD(@NativeType("HGLRC") long dstCtx, @NativeType("GLint") int srcX0, @NativeType("GLint") int srcY0, @NativeType("GLint") int srcX1, @NativeType("GLint") int srcY1, @NativeType("GLint") int dstX0, @NativeType("GLint") int dstY0, @NativeType("GLint") int dstX1, @NativeType("GLint") int dstY1, @NativeType("GLbitfield") int mask, @NativeType("GLenum") int filter) { - long __functionAddress = GL.getCapabilitiesWGL().wglBlitContextFramebufferAMD; - if (CHECKS) { - check(__functionAddress); - check(dstCtx); - } - callPV(dstCtx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, __functionAddress); - } - - /** Array version of: {@link #wglGetGPUIDsAMD GetGPUIDsAMD} */ - @NativeType("UINT") - public static int wglGetGPUIDsAMD(@Nullable @NativeType("UINT *") int[] ids) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetGPUIDsAMD; - if (CHECKS) { - check(__functionAddress); - } - return callPI(lengthSafe(ids), ids, __functionAddress); - } - - /** Array version of: {@link #wglGetGPUInfoAMD GetGPUInfoAMD} */ - public static int wglGetGPUInfoAMD(@NativeType("UINT") int id, int property, @NativeType("GLenum") int dataType, @NativeType("void *") int[] data) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetGPUInfoAMD; - if (CHECKS) { - check(__functionAddress); - } - return callPI(id, property, dataType, data.length, data, __functionAddress); - } - - /** Array version of: {@link #wglGetGPUInfoAMD GetGPUInfoAMD} */ - public static int wglGetGPUInfoAMD(@NativeType("UINT") int id, int property, @NativeType("GLenum") int dataType, @NativeType("void *") float[] data) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetGPUInfoAMD; - if (CHECKS) { - check(__functionAddress); - } - return callPI(id, property, dataType, data.length, data, __functionAddress); - } - - /** Array version of: {@link #wglCreateAssociatedContextAttribsAMD CreateAssociatedContextAttribsAMD} */ - @NativeType("HGLRC") - public static long wglCreateAssociatedContextAttribsAMD(@NativeType("UINT") int id, @NativeType("HGLRC") long shareContext, @Nullable @NativeType("int const *") int[] attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreateAssociatedContextAttribsAMD; - if (CHECKS) { - check(__functionAddress); - checkNTSafe(attribList); - } - return callPPP(id, shareContext, attribList, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBBufferRegion.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBBufferRegion.java deleted file mode 100644 index a21a829b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBBufferRegion.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the WGL_ARB_buffer_region extension. - * - *

    The buffer region extension is a mechanism that allows an area of an OpenGL window to be saved in off-screen memory for quick restores. The off-screen - * memory can either be frame buffer memory or system memory, although frame buffer memory might offer optimal performance.

    - * - *

    A buffer region can be created for the front color, back color, depth, and/or stencil buffer. Multiple buffer regions for the same buffer type can - * exist.

    - */ -public class WGLARBBufferRegion { - - /** Accepted by the {@code type} parameter of {@link #wglCreateBufferRegionARB CreateBufferRegionARB}. */ - public static final int - WGL_FRONT_COLOR_BUFFER_BIT_ARB = 0x1, - WGL_BACK_COLOR_BUFFER_BIT_ARB = 0x2, - WGL_DEPTH_BUFFER_BIT_ARB = 0x4, - WGL_STENCIL_BUFFER_BIT_ARB = 0x8; - - protected WGLARBBufferRegion() { - throw new UnsupportedOperationException(); - } - - // --- [ wglCreateBufferRegionARB ] --- - - /** - * Creates a buffer region and returns a handle associated with it. - * - * @param hdc the device context for the device on which the buffer region is created - * @param layerPlane the layer plane. Positive values identify overlay planes, negative values identify underlay planes. A value of 0 identifies the main plane. - * @param type a bitwise OR of any of the following values indicating which buffers can be saved or restored. Multiple bits can be set and may result in better - * performance if multiple buffers are saved or restored. One of:
    {@link #WGL_FRONT_COLOR_BUFFER_BIT_ARB FRONT_COLOR_BUFFER_BIT_ARB}{@link #WGL_BACK_COLOR_BUFFER_BIT_ARB BACK_COLOR_BUFFER_BIT_ARB}{@link #WGL_DEPTH_BUFFER_BIT_ARB DEPTH_BUFFER_BIT_ARB}
    {@link #WGL_STENCIL_BUFFER_BIT_ARB STENCIL_BUFFER_BIT_ARB}
    - */ - @NativeType("HANDLE") - public static long wglCreateBufferRegionARB(@NativeType("HDC") long hdc, int layerPlane, @NativeType("UINT") int type) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreateBufferRegionARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPP(hdc, layerPlane, type, __functionAddress); - } - - // --- [ wglDeleteBufferRegionARB ] --- - - /** - * Deletes a buffer region. - * - * @param region a handle to a buffer region previously created with {@link #wglCreateBufferRegionARB CreateBufferRegionARB}. - */ - @NativeType("VOID") - public static void wglDeleteBufferRegionARB(@NativeType("HANDLE") long region) { - long __functionAddress = GL.getCapabilitiesWGL().wglDeleteBufferRegionARB; - if (CHECKS) { - check(__functionAddress); - check(region); - } - callPV(region, __functionAddress); - } - - // --- [ wglSaveBufferRegionARB ] --- - - /** - * Saves image, depth, and stencil data into the buffer region. - * - *

    Data outside the window for the specified rectangle is undefined. The OpenGL coordinate system is used for specifying the rectangle ({@code x} and - * {@code y} specify the lower-left corner of the rectangle).

    - * - *

    If an RC is current to the calling thread, a flush will occur before the save operation.

    - * - *

    The saved buffer region area can be freed by calling {@code wglSaveBufferRegionARB} with {@code width} or {@code height} set to a value of 0.

    - * - * @param region a handle to a buffer region previously created with {@link #wglCreateBufferRegionARB CreateBufferRegionARB}. - * @param x the window x-coordinate for the source rectangle - * @param y the window y-coordinate for the source rectangle - * @param width the source rectangle width - * @param height the source rectangle height - */ - @NativeType("BOOL") - public static boolean wglSaveBufferRegionARB(@NativeType("HANDLE") long region, int x, int y, int width, int height) { - long __functionAddress = GL.getCapabilitiesWGL().wglSaveBufferRegionARB; - if (CHECKS) { - check(__functionAddress); - check(region); - } - return callPI(region, x, y, width, height, __functionAddress) != 0; - } - - // --- [ wglRestoreBufferRegionARB ] --- - - /** - * Restores a previously saved buffer region. - * - * @param region a handle to a buffer region previously created with {@link #wglCreateBufferRegionARB CreateBufferRegionARB}. - * @param x the window x-coordinate for the destination rectangle - * @param y the window y-coordinate for the destination rectangle - * @param width the destination rectangle width - * @param height the destination rectangle height - * @param xSrc the buffer region x-coordinate for the source of the data - * @param ySrc the buffer region y-coordinate for the source of the data - */ - @NativeType("BOOL") - public static boolean wglRestoreBufferRegionARB(@NativeType("HANDLE") long region, int x, int y, int width, int height, int xSrc, int ySrc) { - long __functionAddress = GL.getCapabilitiesWGL().wglRestoreBufferRegionARB; - if (CHECKS) { - check(__functionAddress); - check(region); - } - return callPI(region, x, y, width, height, xSrc, ySrc, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBContextFlushControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBContextFlushControl.java deleted file mode 100644 index 04cb7ffc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBContextFlushControl.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_context_flush_control extension. - * - *

    The WGL version of {@link KHRContextFlushControl}. This extension adds new context creation parameters the allow an application to specify the behavior - * that is desired when a context is made non-current, and specifically to opt out of the implicit flush behavior.

    - */ -public final class WGLARBContextFlushControl { - - /** Accepted as an attribute name in the {@code *attrib_list} argument to {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int WGL_CONTEXT_RELEASE_BEHAVIOR_ARB = 0x2097; - - /** - * Accepted as an attribute value for {@link #WGL_CONTEXT_RELEASE_BEHAVIOR_ARB CONTEXT_RELEASE_BEHAVIOR_ARB} in the {@code *attrib_list} argument to - * {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int - WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB = 0x0, - WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB = 0x2098; - - private WGLARBContextFlushControl() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContext.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContext.java deleted file mode 100644 index 0d8637e0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContext.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_ARB_create_context extension. - * - *

    With the advent of new versions of OpenGL which deprecate features and/or break backward compatibility with older versions, there is a need and desire - * to indicate at context creation which interface will be used. This extension add a new context creation routine with attributes specifying the GL - * version and context properties requested for the context.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}.

    - */ -public class WGLARBCreateContext { - - /** Accepted as an attribute name in {@code attribList}. */ - public static final int - WGL_CONTEXT_MAJOR_VERSION_ARB = 0x2091, - WGL_CONTEXT_MINOR_VERSION_ARB = 0x2092, - WGL_CONTEXT_LAYER_PLANE_ARB = 0x2093, - WGL_CONTEXT_FLAGS_ARB = 0x2094; - - /** Accepted as bits in the attribute value for {@link #WGL_CONTEXT_FLAGS_ARB CONTEXT_FLAGS_ARB} in {@code attribList}. */ - public static final int - WGL_CONTEXT_DEBUG_BIT_ARB = 0x1, - WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x2; - - /** New errors returned by {@link org.lwjgl.system.windows.WinBase#GetLastError}. */ - public static final int ERROR_INVALID_VERSION_ARB = 0x2095; - - protected WGLARBCreateContext() { - throw new UnsupportedOperationException(); - } - - // --- [ wglCreateContextAttribsARB ] --- - - /** Unsafe version of: {@link #wglCreateContextAttribsARB CreateContextAttribsARB} */ - public static long nwglCreateContextAttribsARB(long hdc, long shareContext, long attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreateContextAttribsARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPPPP(hdc, shareContext, attribList, __functionAddress); - } - - /** - * Creates an OpenGL context. - * - *

    If {@code shareContext} is not {@code NULL}, then all shareable data (excluding OpenGL texture objects named 0) will be shared by {@code shareContext}, all - * other contexts {@code shareContext} already shares with, and the newly created context. An arbitrary number of contexts can share data in this fashion.

    - * - * @param attribList a list of attributes for the context. The list consists of a sequence of <name, value> pairs terminated by the value 0. If an attribute is not - * specified in {@code attribList}, then the default value is used instead. If an attribute is specified more than once, then the last value specified - * is used. - */ - @NativeType("HGLRC") - public static long wglCreateContextAttribsARB(@NativeType("HDC") long hdc, @NativeType("HGLRC") long shareContext, @Nullable @NativeType("int const *") IntBuffer attribList) { - if (CHECKS) { - checkNTSafe(attribList); - } - return nwglCreateContextAttribsARB(hdc, shareContext, memAddressSafe(attribList)); - } - - /** Array version of: {@link #wglCreateContextAttribsARB CreateContextAttribsARB} */ - @NativeType("HGLRC") - public static long wglCreateContextAttribsARB(@NativeType("HDC") long hdc, @NativeType("HGLRC") long shareContext, @Nullable @NativeType("int const *") int[] attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreateContextAttribsARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - checkNTSafe(attribList); - } - return callPPPP(hdc, shareContext, attribList, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextNoError.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextNoError.java deleted file mode 100644 index 75e211b2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextNoError.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_create_context_no_error extension. - * - *

    This extension allows the creation of an OpenGL or OpenGL ES context that doesn't generate errors if the context supports a no error mode. The - * implications of this feature are discussed in the {@link KHRNoError KHR_no_error} extension.

    - * - *

    Requires {@link WGLARBCreateContext WGL_ARB_create_context}.

    - */ -public final class WGLARBCreateContextNoError { - - /** Accepted as an attribute name in the {@code *attrib_list} argument to {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int WGL_CONTEXT_OPENGL_NO_ERROR_ARB = 0x31B3; - - private WGLARBCreateContextNoError() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextProfile.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextProfile.java deleted file mode 100644 index b7aeb194..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextProfile.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_create_context_profile extension. - * - *

    Adds an attribute to {@link WGLARBCreateContext}, specifying the GL profile requested for a context of OpenGL 3.2 or later.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string} and {@link GL32 OpenGL 3.2}.

    - */ -public final class WGLARBCreateContextProfile { - - /** Accepted as an attribute name in {@code attribList}. */ - public static final int WGL_CONTEXT_PROFILE_MASK_ARB = 0x9126; - - /** Accepted as bits in the attribute value for {@link #WGL_CONTEXT_PROFILE_MASK_ARB CONTEXT_PROFILE_MASK_ARB} in {@code attribList}. */ - public static final int - WGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x1, - WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x2; - - /** New errors returned by {@link org.lwjgl.system.windows.WinBase#GetLastError}. */ - public static final int ERROR_INVALID_PROFILE_ARB = 0x2096; - - private WGLARBCreateContextProfile() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextRobustness.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextRobustness.java deleted file mode 100644 index 69963382..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBCreateContextRobustness.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_create_context_robustness extension. - * - *

    This extension allows creating an OpenGL context supporting robust buffer access behavior and a specified graphics reset notification behavior.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}, {@link WGLARBCreateContext WGL_ARB_create_context} and {@link ARBRobustness ARB_robustness}.

    - */ -public final class WGLARBCreateContextRobustness { - - /** - * Accepted as a bit in the attribute value for {@link WGLARBCreateContext#WGL_CONTEXT_FLAGS_ARB CONTEXT_FLAGS_ARB} in the {@code attrib_list} argument to - * {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x4; - - /** Accepted as an attribute name in the {@code attrib_list} argument to {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; - - /** - * Accepted as an attribute value for {@link #WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB} in the {@code attrib_list} argument to - * {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int - WGL_NO_RESET_NOTIFICATION_ARB = 0x8261, - WGL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252; - - private WGLARBCreateContextRobustness() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBExtensionsString.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBExtensionsString.java deleted file mode 100644 index 19ab87c2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBExtensionsString.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_ARB_extensions_string extension. - * - *

    This extension provides a way for applications to determine which WGL extensions are supported by a device. This is the foundation upon which other WGL - * extensions are built.

    - */ -public class WGLARBExtensionsString { - - protected WGLARBExtensionsString() { - throw new UnsupportedOperationException(); - } - - // --- [ wglGetExtensionsStringARB ] --- - - /** Unsafe version of: {@link #wglGetExtensionsStringARB GetExtensionsStringARB} */ - public static long nwglGetExtensionsStringARB(long hdc) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetExtensionsStringARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPP(hdc, __functionAddress); - } - - /** - * Returns a list of supported extensions to WGL. Although the contents of the string is implementation specific, the string will be {@code NULL} terminated and - * will contain a space-separated list of extension names. (The extension names themselves do not contain spaces.) If there are no extensions then the - * empty string is returned. - * - * @param hdc the device context to query extensions for - */ - @Nullable - @NativeType("char const *") - public static String wglGetExtensionsStringARB(@NativeType("HDC") long hdc) { - long __result = nwglGetExtensionsStringARB(hdc); - return memASCIISafe(__result); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBFramebufferSRGB.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBFramebufferSRGB.java deleted file mode 100644 index a114bc02..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBFramebufferSRGB.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_framebuffer_sRGB extension. - * - *

    WGL functionality for {@link ARBFramebufferSRGB ARB_framebuffer_sRGB}.

    - * - *

    Requires {@link WGLEXTExtensionsString WGL_EXT_extensions_string}, {@link WGLARBPixelFormat WGL_ARB_pixel_format} and {@link ARBFramebufferObject ARB_framebuffer_object}.

    - */ -public final class WGLARBFramebufferSRGB { - - /** - * Accepted by the {@code attributes} parameter of {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB} and the {@code attribIList} of - * {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB}. - */ - public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20A9; - - private WGLARBFramebufferSRGB() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBMakeCurrentRead.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBMakeCurrentRead.java deleted file mode 100644 index f3c415b0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBMakeCurrentRead.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the WGL_ARB_make_current_read extension. - * - *

    The association of a separate "read" and "draw" DC with the current context allows for preprocessing of image data in an "off screen" DC which is then - * read into a visible DC for final display.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}.

    - */ -public class WGLARBMakeCurrentRead { - - /** New errors returned by {@link org.lwjgl.system.windows.WinBase#GetLastError}. */ - public static final int - ERROR_INVALID_PIXEL_TYPE_ARB = 0x2043, - ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB = 0x2054; - - protected WGLARBMakeCurrentRead() { - throw new UnsupportedOperationException(); - } - - // --- [ wglMakeContextCurrentARB ] --- - - /** - * Associates the context {@code hglrc} with the device {@code drawDC} for draws and the device {@code readDC} for reads. All subsequent OpenGL calls made - * by the calling thread are drawn on the device identified by {@code drawDC} and read on the device identified by {@code readDC}. - * - *

    The {@code drawDC} and {@code readDC} parameters must refer to drawing surfaces supported by OpenGL. These parameters need not be the same {@code hdc} - * that was passed to {@link WGL#wglCreateContext CreateContext} when {@code hglrc} was created. {@code drawDC} must have the same pixel format and be created on the same - * physical device as the {@code hdc} that was passed into wglCreateContext. {@code readDC} must be created on the same device as the {@code hdc} that was - * passed to wglCreateContext and it must support the same pixel type as the pixel format of the {@code hdc} that was passed to wglCreateContext.

    - * - *

    If {@code wglMakeContextCurrentARB} is used to associate a different device for reads than for draws, the "read" device will be used for the following - * OpenGL operations:

    - * - *
      - *
    1. Any pixel data that are sourced based on the value of {@link GL11#GL_READ_BUFFER READ_BUFFER}. Note, that accumulation operations use the value of {@code READ_BUFFER}, but - * are not allowed when a different device context is used for reads. In this case, the accumulation operation will generate {@link GL11#GL_INVALID_OPERATION INVALID_OPERATION}.
    2. - *
    3. Any depth values that are retrieved by {@link GL11C#glReadPixels ReadPixels}, {@link GL11#glCopyPixels CopyPixels}, or any OpenGL extension that sources depth images from the frame buffer in the - * manner of {@code ReadPixels} and {@code CopyPixels}.
    4. - *
    5. Any stencil values that are retrieved by {@code ReadPixels}, {@code CopyPixels}, or any OpenGL extension that sources stencil images from the - * framebuffer in the manner of {@code ReadPixels} and {@code CopyPixels}.
    6. - *
    - * - *

    These frame buffer values are taken from the surface associated with the device context specified by {@code readDC}.

    - * - * @param drawDC the "draw" device context - * @param readDC the "read" device context - * @param hglrc the OpenGL context - */ - @NativeType("BOOL") - public static boolean wglMakeContextCurrentARB(@NativeType("HDC") long drawDC, @NativeType("HDC") long readDC, @NativeType("HGLRC") long hglrc) { - long __functionAddress = GL.getCapabilitiesWGL().wglMakeContextCurrentARB; - if (CHECKS) { - check(__functionAddress); - check(drawDC); - check(readDC); - check(hglrc); - } - return callPPPI(drawDC, readDC, hglrc, __functionAddress) != 0; - } - - // --- [ wglGetCurrentReadDCARB ] --- - - /** Returns the "read" device context for the current OpenGL context. */ - @NativeType("HDC") - public static long wglGetCurrentReadDCARB() { - long __functionAddress = GL.getCapabilitiesWGL().wglGetCurrentReadDCARB; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBMultisample.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBMultisample.java deleted file mode 100644 index 997431cb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBMultisample.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_multisample extension. - * - *

    See {@link ARBMultisample} for details.

    - * - *

    Requires {@link WGLEXTExtensionsString WGL_EXT_extensions_string} and {@link WGLARBPixelFormat WGL_ARB_pixel_format}.

    - */ -public final class WGLARBMultisample { - - /** - * Accepted by the {@code attributes} parameter of {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}, - * {@link WGLARBPixelFormat#wglGetPixelFormatAttribfvARB GetPixelFormatAttribfvARB}, and the {@code attribIList} and {@code attribFList} of - * {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB}. - */ - public static final int - WGL_SAMPLE_BUFFERS_ARB = 0x2041, - WGL_SAMPLES_ARB = 0x2042; - - private WGLARBMultisample() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPbuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPbuffer.java deleted file mode 100644 index be9162ff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPbuffer.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_ARB_pbuffer extension. - * - *

    This extension defines pixel buffers (pbuffer for short). Pbuffers are additional non-visible rendering buffers for an OpenGL renderer. Pbuffers are - * equivalent to a window that has the same pixel format descriptor with the following exceptions:

    - * - *
      - *
    1. There is no rendering to a pbuffer by GDI.
    2. - *
    3. The pixel format descriptors used for a pbuffer can only be those that are supported by the ICD. Generic formats are not valid.
    4. - *
    5. The allocation of a pbuffer can fail if there are insufficient resources (i.e., all the pbuffer memory has been allocated).
    6. - *
    7. The pixel buffer might be lost if a display mode change occurs. A query is provided that can be called after a display mode change to determine the - * state of the pixel buffer.
    8. - *
    - * - *

    The intent of the pbuffer semantics is to enable implementations to allocate pbuffers in non-visible frame buffer memory. These pbuffers are intended to - * be "static" resources in that a program will typically allocate them only once rather than as a part of its rendering loop. (Pbuffers should be - * deallocated when the program is no longer using them -- for example, if the program is iconified.)

    - * - *

    The frame buffer resources that are associated with a pbuffer are also static and are deallocated when the pbuffer is destroyed or possibly when a - * display mode change occurs.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string} and {@link WGLARBPixelFormat WGL_ARB_pixel_format}.

    - */ -public class WGLARBPbuffer { - - /** - * Accepted by the {@code attribIList} parameter of {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB} and the {@code attributes} parameter of - * {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}. - */ - public static final int WGL_DRAW_TO_PBUFFER_ARB = 0x202D; - - /** Accepted by the {@code attributes} parameter of {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}. */ - public static final int - WGL_MAX_PBUFFER_PIXELS_ARB = 0x202E, - WGL_MAX_PBUFFER_WIDTH_ARB = 0x202F, - WGL_MAX_PBUFFER_HEIGHT_ARB = 0x2030; - - /** Accepted by the {@code attribList} parameter of {@link #wglCreatePbufferARB CreatePbufferARB}. */ - public static final int WGL_PBUFFER_LARGEST_ARB = 0x2033; - - /** Accepted by the {@code attribute} parameter of {@link #wglQueryPbufferARB QueryPbufferARB}. */ - public static final int - WGL_PBUFFER_WIDTH_ARB = 0x2034, - WGL_PBUFFER_HEIGHT_ARB = 0x2035, - WGL_PBUFFER_LOST_ARB = 0x2036; - - protected WGLARBPbuffer() { - throw new UnsupportedOperationException(); - } - - // --- [ wglCreatePbufferARB ] --- - - /** Unsafe version of: {@link #wglCreatePbufferARB CreatePbufferARB} */ - public static long nwglCreatePbufferARB(long hdc, int pixelFormat, int width, int height, long attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreatePbufferARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPPP(hdc, pixelFormat, width, height, attribList, __functionAddress); - } - - /** - * Creates a pixel buffer (pbuffer) and returns a handle to it. - * - *

    Support for pbuffers may be restricted to specific pixel formats. Use {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB} to query the {@link #WGL_DRAW_TO_PBUFFER_ARB DRAW_TO_PBUFFER_ARB} - * attribute to determine which pixel formats support the creation of pbuffers.

    - * - * @param hdc a device context for the device on which the pbuffer is created - * @param pixelFormat a non-generic pixel format descriptor index - * @param width the pixel width of the rectangular pbuffer - * @param height the pixel height of the rectangular pbuffer - * @param attribList a 0-terminated list of attributes {type, value} pairs containing integer attribute values - */ - @NativeType("HPBUFFERARB") - public static long wglCreatePbufferARB(@NativeType("HDC") long hdc, int pixelFormat, int width, int height, @Nullable @NativeType("int const *") IntBuffer attribList) { - if (CHECKS) { - checkNTSafe(attribList); - } - return nwglCreatePbufferARB(hdc, pixelFormat, width, height, memAddressSafe(attribList)); - } - - // --- [ wglGetPbufferDCARB ] --- - - /** - * Creates a device context for the pbuffer. - * - * @param pbuffer a pbuffer handle returned from a previous call to {@link #wglCreatePbufferARB CreatePbufferARB} - */ - @NativeType("HDC") - public static long wglGetPbufferDCARB(@NativeType("HPBUFFERARB") long pbuffer) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetPbufferDCARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - } - return callPP(pbuffer, __functionAddress); - } - - // --- [ wglReleasePbufferDCARB ] --- - - /** - * Releases a device context obtained from a previous call to {@link #wglGetPbufferDCARB GetPbufferDCARB}. - * - * @param pbuffer a pbuffer handle - * @param hdc a device context handle - */ - public static int wglReleasePbufferDCARB(@NativeType("HPBUFFERARB") long pbuffer, @NativeType("HDC") long hdc) { - long __functionAddress = GL.getCapabilitiesWGL().wglReleasePbufferDCARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - check(hdc); - } - return callPPI(pbuffer, hdc, __functionAddress); - } - - // --- [ wglDestroyPbufferARB ] --- - - /** - * Destroys a pbuffer. - * - *

    The pbuffer is destroyed once it is no longer current to any rendering context. When a pbuffer is destroyed, any memory resources that are attached to - * it are freed and its handle is no longer valid.

    - * - * @param pbuffer a pbuffer handle - */ - @NativeType("BOOL") - public static boolean wglDestroyPbufferARB(@NativeType("HPBUFFERARB") long pbuffer) { - long __functionAddress = GL.getCapabilitiesWGL().wglDestroyPbufferARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - } - return callPI(pbuffer, __functionAddress) != 0; - } - - // --- [ wglQueryPbufferARB ] --- - - /** Unsafe version of: {@link #wglQueryPbufferARB QueryPbufferARB} */ - public static int nwglQueryPbufferARB(long pbuffer, int attribute, long value) { - long __functionAddress = GL.getCapabilitiesWGL().wglQueryPbufferARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - } - return callPPI(pbuffer, attribute, value, __functionAddress); - } - - /** - * Queries an attribute associated with a specific pbuffer. - * - * @param pbuffer a pbuffer handle - * @param attribute the attribute to query. One of:
    {@link #WGL_PBUFFER_WIDTH_ARB PBUFFER_WIDTH_ARB}{@link #WGL_PBUFFER_HEIGHT_ARB PBUFFER_HEIGHT_ARB}{@link #WGL_PBUFFER_LOST_ARB PBUFFER_LOST_ARB}
    - * @param value the attribute value - */ - @NativeType("BOOL") - public static boolean wglQueryPbufferARB(@NativeType("HPBUFFERARB") long pbuffer, int attribute, @NativeType("int *") IntBuffer value) { - if (CHECKS) { - check(value, 1); - } - return nwglQueryPbufferARB(pbuffer, attribute, memAddress(value)) != 0; - } - - /** Array version of: {@link #wglCreatePbufferARB CreatePbufferARB} */ - @NativeType("HPBUFFERARB") - public static long wglCreatePbufferARB(@NativeType("HDC") long hdc, int pixelFormat, int width, int height, @Nullable @NativeType("int const *") int[] attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreatePbufferARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - checkNTSafe(attribList); - } - return callPPP(hdc, pixelFormat, width, height, attribList, __functionAddress); - } - - /** Array version of: {@link #wglQueryPbufferARB QueryPbufferARB} */ - @NativeType("BOOL") - public static boolean wglQueryPbufferARB(@NativeType("HPBUFFERARB") long pbuffer, int attribute, @NativeType("int *") int[] value) { - long __functionAddress = GL.getCapabilitiesWGL().wglQueryPbufferARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - check(value, 1); - } - return callPPI(pbuffer, attribute, value, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPixelFormat.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPixelFormat.java deleted file mode 100644 index a972aac2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPixelFormat.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_ARB_pixel_format extension. - * - *

    This extension adds functions to query pixel format attributes and to choose from the list of supported pixel formats.

    - * - *

    These functions treat pixel formats as opaque types: attributes are specified by name rather than by accessing them directly as fields in a structure. - * Thus the list of attributes can be easily extended.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}.

    - */ -public class WGLARBPixelFormat { - - /** - * Accepted in the {@code attributes} parameter array of {@link #wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}, and {@link #wglGetPixelFormatAttribfvARB GetPixelFormatAttribfvARB}, and as a type in - * the {@code attribIList} and {@code attribFList} parameter arrays of {@link #wglChoosePixelFormatARB ChoosePixelFormatARB}. - */ - public static final int - WGL_NUMBER_PIXEL_FORMATS_ARB = 0x2000, - WGL_DRAW_TO_WINDOW_ARB = 0x2001, - WGL_DRAW_TO_BITMAP_ARB = 0x2002, - WGL_ACCELERATION_ARB = 0x2003, - WGL_NEED_PALETTE_ARB = 0x2004, - WGL_NEED_SYSTEM_PALETTE_ARB = 0x2005, - WGL_SWAP_LAYER_BUFFERS_ARB = 0x2006, - WGL_SWAP_METHOD_ARB = 0x2007, - WGL_NUMBER_OVERLAYS_ARB = 0x2008, - WGL_NUMBER_UNDERLAYS_ARB = 0x2009, - WGL_TRANSPARENT_ARB = 0x200A, - WGL_TRANSPARENT_RED_VALUE_ARB = 0x2037, - WGL_TRANSPARENT_GREEN_VALUE_ARB = 0x2038, - WGL_TRANSPARENT_BLUE_VALUE_ARB = 0x2039, - WGL_TRANSPARENT_ALPHA_VALUE_ARB = 0x203A, - WGL_TRANSPARENT_INDEX_VALUE_ARB = 0x203B, - WGL_SHARE_DEPTH_ARB = 0x200C, - WGL_SHARE_STENCIL_ARB = 0x200D, - WGL_SHARE_ACCUM_ARB = 0x200E, - WGL_SUPPORT_GDI_ARB = 0x200F, - WGL_SUPPORT_OPENGL_ARB = 0x2010, - WGL_DOUBLE_BUFFER_ARB = 0x2011, - WGL_STEREO_ARB = 0x2012, - WGL_PIXEL_TYPE_ARB = 0x2013, - WGL_COLOR_BITS_ARB = 0x2014, - WGL_RED_BITS_ARB = 0x2015, - WGL_RED_SHIFT_ARB = 0x2016, - WGL_GREEN_BITS_ARB = 0x2017, - WGL_GREEN_SHIFT_ARB = 0x2018, - WGL_BLUE_BITS_ARB = 0x2019, - WGL_BLUE_SHIFT_ARB = 0x201A, - WGL_ALPHA_BITS_ARB = 0x201B, - WGL_ALPHA_SHIFT_ARB = 0x201C, - WGL_ACCUM_BITS_ARB = 0x201D, - WGL_ACCUM_RED_BITS_ARB = 0x201E, - WGL_ACCUM_GREEN_BITS_ARB = 0x201F, - WGL_ACCUM_BLUE_BITS_ARB = 0x2020, - WGL_ACCUM_ALPHA_BITS_ARB = 0x2021, - WGL_DEPTH_BITS_ARB = 0x2022, - WGL_STENCIL_BITS_ARB = 0x2023, - WGL_AUX_BUFFERS_ARB = 0x2024; - - /** - * Accepted as a value in the {@code attribIList} and {@code attribFList} parameter arrays of {@link #wglChoosePixelFormatARB ChoosePixelFormatARB}, and returned in the - * {@code values} parameter array of {@link #wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB} and {@link #wglGetPixelFormatAttribfvARB GetPixelFormatAttribfvARB}. - */ - public static final int - WGL_NO_ACCELERATION_ARB = 0x2025, - WGL_GENERIC_ACCELERATION_ARB = 0x2026, - WGL_FULL_ACCELERATION_ARB = 0x2027, - WGL_SWAP_EXCHANGE_ARB = 0x2028, - WGL_SWAP_COPY_ARB = 0x2029, - WGL_SWAP_UNDEFINED_ARB = 0x202A, - WGL_TYPE_RGBA_ARB = 0x202B, - WGL_TYPE_COLORINDEX_ARB = 0x202C; - - protected WGLARBPixelFormat() { - throw new UnsupportedOperationException(); - } - - // --- [ wglGetPixelFormatAttribivARB ] --- - - /** - * Unsafe version of: {@link #wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB} - * - * @param n the number of attributes being queried - */ - public static int nwglGetPixelFormatAttribivARB(long hdc, int pixelFormat, int layerPlane, int n, long attributes, long values) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetPixelFormatAttribivARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPPPI(hdc, pixelFormat, layerPlane, n, attributes, values, __functionAddress); - } - - /** - * @param hdc the device context on which the pixel format is supported - * @param pixelFormat an index that specifies the pixel format - * @param layerPlane the plane being queried - * @param attributes an array of pixel format attribute identifiers which specify the attributes to be queried. One of:
    {@link #WGL_NUMBER_PIXEL_FORMATS_ARB NUMBER_PIXEL_FORMATS_ARB}{@link #WGL_DRAW_TO_WINDOW_ARB DRAW_TO_WINDOW_ARB}{@link #WGL_DRAW_TO_BITMAP_ARB DRAW_TO_BITMAP_ARB}{@link #WGL_ACCELERATION_ARB ACCELERATION_ARB}
    {@link #WGL_NEED_PALETTE_ARB NEED_PALETTE_ARB}{@link #WGL_NEED_SYSTEM_PALETTE_ARB NEED_SYSTEM_PALETTE_ARB}{@link #WGL_SWAP_LAYER_BUFFERS_ARB SWAP_LAYER_BUFFERS_ARB}{@link #WGL_SWAP_METHOD_ARB SWAP_METHOD_ARB}
    {@link #WGL_NUMBER_OVERLAYS_ARB NUMBER_OVERLAYS_ARB}{@link #WGL_NUMBER_UNDERLAYS_ARB NUMBER_UNDERLAYS_ARB}{@link #WGL_TRANSPARENT_ARB TRANSPARENT_ARB}{@link #WGL_TRANSPARENT_RED_VALUE_ARB TRANSPARENT_RED_VALUE_ARB}
    {@link #WGL_TRANSPARENT_GREEN_VALUE_ARB TRANSPARENT_GREEN_VALUE_ARB}{@link #WGL_TRANSPARENT_BLUE_VALUE_ARB TRANSPARENT_BLUE_VALUE_ARB}{@link #WGL_TRANSPARENT_ALPHA_VALUE_ARB TRANSPARENT_ALPHA_VALUE_ARB}{@link #WGL_TRANSPARENT_INDEX_VALUE_ARB TRANSPARENT_INDEX_VALUE_ARB}
    {@link #WGL_SHARE_DEPTH_ARB SHARE_DEPTH_ARB}{@link #WGL_SHARE_STENCIL_ARB SHARE_STENCIL_ARB}{@link #WGL_SHARE_ACCUM_ARB SHARE_ACCUM_ARB}{@link #WGL_SUPPORT_GDI_ARB SUPPORT_GDI_ARB}
    {@link #WGL_SUPPORT_OPENGL_ARB SUPPORT_OPENGL_ARB}{@link #WGL_DOUBLE_BUFFER_ARB DOUBLE_BUFFER_ARB}{@link #WGL_STEREO_ARB STEREO_ARB}{@link #WGL_PIXEL_TYPE_ARB PIXEL_TYPE_ARB}
    {@link #WGL_COLOR_BITS_ARB COLOR_BITS_ARB}{@link #WGL_RED_BITS_ARB RED_BITS_ARB}{@link #WGL_RED_SHIFT_ARB RED_SHIFT_ARB}{@link #WGL_GREEN_BITS_ARB GREEN_BITS_ARB}
    {@link #WGL_GREEN_SHIFT_ARB GREEN_SHIFT_ARB}{@link #WGL_BLUE_BITS_ARB BLUE_BITS_ARB}{@link #WGL_BLUE_SHIFT_ARB BLUE_SHIFT_ARB}{@link #WGL_ALPHA_BITS_ARB ALPHA_BITS_ARB}
    {@link #WGL_ALPHA_SHIFT_ARB ALPHA_SHIFT_ARB}{@link #WGL_ACCUM_BITS_ARB ACCUM_BITS_ARB}{@link #WGL_ACCUM_RED_BITS_ARB ACCUM_RED_BITS_ARB}{@link #WGL_ACCUM_GREEN_BITS_ARB ACCUM_GREEN_BITS_ARB}
    {@link #WGL_ACCUM_BLUE_BITS_ARB ACCUM_BLUE_BITS_ARB}{@link #WGL_ACCUM_ALPHA_BITS_ARB ACCUM_ALPHA_BITS_ARB}{@link #WGL_DEPTH_BITS_ARB DEPTH_BITS_ARB}{@link #WGL_STENCIL_BITS_ARB STENCIL_BITS_ARB}
    {@link #WGL_AUX_BUFFERS_ARB AUX_BUFFERS_ARB}
    - * @param values a buffer into which the results of the query will be placed - */ - @NativeType("BOOL") - public static boolean wglGetPixelFormatAttribivARB(@NativeType("HDC") long hdc, int pixelFormat, int layerPlane, @NativeType("int const *") IntBuffer attributes, @NativeType("int *") IntBuffer values) { - if (CHECKS) { - check(values, attributes.remaining()); - } - return nwglGetPixelFormatAttribivARB(hdc, pixelFormat, layerPlane, attributes.remaining(), memAddress(attributes), memAddress(values)) != 0; - } - - /** - * @param hdc the device context on which the pixel format is supported - * @param pixelFormat an index that specifies the pixel format - * @param layerPlane the plane being queried - * @param values a buffer into which the results of the query will be placed - */ - @NativeType("BOOL") - public static boolean wglGetPixelFormatAttribiARB(@NativeType("HDC") long hdc, int pixelFormat, int layerPlane, @NativeType("int const *") int attribute, @NativeType("int *") IntBuffer values) { - if (CHECKS) { - check(values, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer attributes = stack.ints(attribute); - return nwglGetPixelFormatAttribivARB(hdc, pixelFormat, layerPlane, 1, memAddress(attributes), memAddress(values)) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ wglGetPixelFormatAttribfvARB ] --- - - /** - * Unsafe version of: {@link #wglGetPixelFormatAttribfvARB GetPixelFormatAttribfvARB} - * - * @param n the number of attributes being queried - */ - public static int nwglGetPixelFormatAttribfvARB(long hdc, int pixelFormat, int layerPlane, int n, long attributes, long values) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetPixelFormatAttribfvARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPPPI(hdc, pixelFormat, layerPlane, n, attributes, values, __functionAddress); - } - - /** - * Float version of {@link #wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}. - * - * @param hdc the device context on which the pixel format is supported - * @param pixelFormat an index that specifies the pixel format - * @param layerPlane the plane being queried - * @param attributes an array of pixel format attribute identifiers which specify the attributes to be queried - * @param values a buffer into which the results of the query will be placed - */ - @NativeType("BOOL") - public static boolean wglGetPixelFormatAttribfvARB(@NativeType("HDC") long hdc, int pixelFormat, int layerPlane, @NativeType("int const *") IntBuffer attributes, @NativeType("FLOAT *") FloatBuffer values) { - if (CHECKS) { - check(values, attributes.remaining()); - } - return nwglGetPixelFormatAttribfvARB(hdc, pixelFormat, layerPlane, attributes.remaining(), memAddress(attributes), memAddress(values)) != 0; - } - - /** - * Float version of {@link #wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}. - * - * @param hdc the device context on which the pixel format is supported - * @param pixelFormat an index that specifies the pixel format - * @param layerPlane the plane being queried - * @param values a buffer into which the results of the query will be placed - */ - @NativeType("BOOL") - public static boolean wglGetPixelFormatAttribfARB(@NativeType("HDC") long hdc, int pixelFormat, int layerPlane, @NativeType("int const *") int attribute, @NativeType("FLOAT *") FloatBuffer values) { - if (CHECKS) { - check(values, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer attributes = stack.ints(attribute); - return nwglGetPixelFormatAttribfvARB(hdc, pixelFormat, layerPlane, 1, memAddress(attributes), memAddress(values)) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ wglChoosePixelFormatARB ] --- - - /** - * Unsafe version of: {@link #wglChoosePixelFormatARB ChoosePixelFormatARB} - * - * @param maxFormats the number of attributes being queried - */ - public static int nwglChoosePixelFormatARB(long hdc, long attribIList, long attribFList, int maxFormats, long formats, long numFormats) { - long __functionAddress = GL.getCapabilitiesWGL().wglChoosePixelFormatARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPPPPPI(hdc, attribIList, attribFList, maxFormats, formats, numFormats, __functionAddress); - } - - /** - * Selects from among all of the available pixel formats (including both accelerated and generic formats and non-displayable formats). This function - * accepts attributes for the main planes. A list of pixel formats that match the specified attributes is returned with the "best" pixel formats at the - * start of the list (order is device dependent). - * - * @param hdc the device context on which the pixel format is supported - * @param attribIList a list of attribute {type, value} pairs containing integer attribute values. One of:
    {@link #WGL_NUMBER_PIXEL_FORMATS_ARB NUMBER_PIXEL_FORMATS_ARB}{@link #WGL_DRAW_TO_WINDOW_ARB DRAW_TO_WINDOW_ARB}{@link #WGL_DRAW_TO_BITMAP_ARB DRAW_TO_BITMAP_ARB}{@link #WGL_ACCELERATION_ARB ACCELERATION_ARB}
    {@link #WGL_NEED_PALETTE_ARB NEED_PALETTE_ARB}{@link #WGL_NEED_SYSTEM_PALETTE_ARB NEED_SYSTEM_PALETTE_ARB}{@link #WGL_SWAP_LAYER_BUFFERS_ARB SWAP_LAYER_BUFFERS_ARB}{@link #WGL_SWAP_METHOD_ARB SWAP_METHOD_ARB}
    {@link #WGL_NUMBER_OVERLAYS_ARB NUMBER_OVERLAYS_ARB}{@link #WGL_NUMBER_UNDERLAYS_ARB NUMBER_UNDERLAYS_ARB}{@link #WGL_TRANSPARENT_ARB TRANSPARENT_ARB}{@link #WGL_TRANSPARENT_RED_VALUE_ARB TRANSPARENT_RED_VALUE_ARB}
    {@link #WGL_TRANSPARENT_GREEN_VALUE_ARB TRANSPARENT_GREEN_VALUE_ARB}{@link #WGL_TRANSPARENT_BLUE_VALUE_ARB TRANSPARENT_BLUE_VALUE_ARB}{@link #WGL_TRANSPARENT_ALPHA_VALUE_ARB TRANSPARENT_ALPHA_VALUE_ARB}{@link #WGL_TRANSPARENT_INDEX_VALUE_ARB TRANSPARENT_INDEX_VALUE_ARB}
    {@link #WGL_SHARE_DEPTH_ARB SHARE_DEPTH_ARB}{@link #WGL_SHARE_STENCIL_ARB SHARE_STENCIL_ARB}{@link #WGL_SHARE_ACCUM_ARB SHARE_ACCUM_ARB}{@link #WGL_SUPPORT_GDI_ARB SUPPORT_GDI_ARB}
    {@link #WGL_SUPPORT_OPENGL_ARB SUPPORT_OPENGL_ARB}{@link #WGL_DOUBLE_BUFFER_ARB DOUBLE_BUFFER_ARB}{@link #WGL_STEREO_ARB STEREO_ARB}{@link #WGL_PIXEL_TYPE_ARB PIXEL_TYPE_ARB}
    {@link #WGL_COLOR_BITS_ARB COLOR_BITS_ARB}{@link #WGL_RED_BITS_ARB RED_BITS_ARB}{@link #WGL_RED_SHIFT_ARB RED_SHIFT_ARB}{@link #WGL_GREEN_BITS_ARB GREEN_BITS_ARB}
    {@link #WGL_GREEN_SHIFT_ARB GREEN_SHIFT_ARB}{@link #WGL_BLUE_BITS_ARB BLUE_BITS_ARB}{@link #WGL_BLUE_SHIFT_ARB BLUE_SHIFT_ARB}{@link #WGL_ALPHA_BITS_ARB ALPHA_BITS_ARB}
    {@link #WGL_ALPHA_SHIFT_ARB ALPHA_SHIFT_ARB}{@link #WGL_ACCUM_BITS_ARB ACCUM_BITS_ARB}{@link #WGL_ACCUM_RED_BITS_ARB ACCUM_RED_BITS_ARB}{@link #WGL_ACCUM_GREEN_BITS_ARB ACCUM_GREEN_BITS_ARB}
    {@link #WGL_ACCUM_BLUE_BITS_ARB ACCUM_BLUE_BITS_ARB}{@link #WGL_ACCUM_ALPHA_BITS_ARB ACCUM_ALPHA_BITS_ARB}{@link #WGL_DEPTH_BITS_ARB DEPTH_BITS_ARB}{@link #WGL_STENCIL_BITS_ARB STENCIL_BITS_ARB}
    {@link #WGL_AUX_BUFFERS_ARB AUX_BUFFERS_ARB}
    - * @param attribFList a list of attribute {type, value} pairs containing floating point attribute values - * @param formats an array of returned indices of the matching pixel formats. The best pixel formats (i.e. closest match and best format for the hardware) are at the - * head of the list. - * @param numFormats returns the number of matching formats - */ - @NativeType("BOOL") - public static boolean wglChoosePixelFormatARB(@NativeType("HDC") long hdc, @Nullable @NativeType("int const *") IntBuffer attribIList, @Nullable @NativeType("FLOAT const *") FloatBuffer attribFList, @NativeType("int *") IntBuffer formats, @NativeType("UINT *") IntBuffer numFormats) { - if (CHECKS) { - checkNTSafe(attribIList); - checkNTSafe(attribFList); - check(numFormats, 1); - } - return nwglChoosePixelFormatARB(hdc, memAddressSafe(attribIList), memAddressSafe(attribFList), formats.remaining(), memAddress(formats), memAddress(numFormats)) != 0; - } - - /** Array version of: {@link #wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB} */ - @NativeType("BOOL") - public static boolean wglGetPixelFormatAttribivARB(@NativeType("HDC") long hdc, int pixelFormat, int layerPlane, @NativeType("int const *") int[] attributes, @NativeType("int *") int[] values) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetPixelFormatAttribivARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - check(values, attributes.length); - } - return callPPPI(hdc, pixelFormat, layerPlane, attributes.length, attributes, values, __functionAddress) != 0; - } - - /** Array version of: {@link #wglGetPixelFormatAttribfvARB GetPixelFormatAttribfvARB} */ - @NativeType("BOOL") - public static boolean wglGetPixelFormatAttribfvARB(@NativeType("HDC") long hdc, int pixelFormat, int layerPlane, @NativeType("int const *") int[] attributes, @NativeType("FLOAT *") float[] values) { - long __functionAddress = GL.getCapabilitiesWGL().wglGetPixelFormatAttribfvARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - check(values, attributes.length); - } - return callPPPI(hdc, pixelFormat, layerPlane, attributes.length, attributes, values, __functionAddress) != 0; - } - - /** Array version of: {@link #wglChoosePixelFormatARB ChoosePixelFormatARB} */ - @NativeType("BOOL") - public static boolean wglChoosePixelFormatARB(@NativeType("HDC") long hdc, @Nullable @NativeType("int const *") int[] attribIList, @Nullable @NativeType("FLOAT const *") float[] attribFList, @NativeType("int *") int[] formats, @NativeType("UINT *") int[] numFormats) { - long __functionAddress = GL.getCapabilitiesWGL().wglChoosePixelFormatARB; - if (CHECKS) { - check(__functionAddress); - check(hdc); - checkNTSafe(attribIList); - checkNTSafe(attribFList); - check(numFormats, 1); - } - return callPPPPPI(hdc, attribIList, attribFList, formats.length, formats, numFormats, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPixelFormatFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPixelFormatFloat.java deleted file mode 100644 index 41f20d69..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBPixelFormatFloat.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_pixel_format_float extension. - * - *

    This extension adds pixel formats with floating-point RGBA color components.

    - * - *

    Requires {@link WGLARBPixelFormat WGL_ARB_pixel_format} and {@link GL15 OpenGL 1.5}.

    - */ -public final class WGLARBPixelFormatFloat { - - /** - * Accepted as a value in the {@code attribIList} parameter array of {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB}, and returned in the {@code values} - * parameter array of {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}. - */ - public static final int WGL_TYPE_RGBA_FLOAT_ARB = 0x21A0; - - private WGLARBPixelFormatFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBRenderTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBRenderTexture.java deleted file mode 100644 index fd0d8ce1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBRenderTexture.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_ARB_render_texture extension. - * - *

    This extension allows a color buffer to be used for both rendering and texturing. When a color buffer is bound to a texture target it cannot be - * rendered to. Once it has been released from the texture it can be rendered to once again.

    - * - *

    This extension may provide a performance boost and reduce memory requirements on architectures that support rendering to the same memory where textures - * reside and in the same memory format and layout required by texturing. The functionality is similar to CopyTexImage1D and CopyTexImage2D. However, some - * changes were made to make it easier to avoid copying data:

    - * - *
      - *
    • Only color buffers of a pbuffer can be bound as a texture. It is not possible to use the color buffer of a window as a texture.
    • - *
    • The texture internal format is determined when the color buffer is associated with the texture, guaranteeing that the color buffer format is - * equivalent to the texture internal format.
    • - *
    • When a color buffer of a pbuffer is being used as a texture, the pbuffer can not be used for rendering; this makes it easier for implementations to - * avoid a copy of the image since the semantics of the pointer swap are clear.
    • - *
    • The application must release the color buffer from the texture before it can render to the pbuffer again. When the color buffer is bound as a - * texture, draw and read operations on the pbuffer are undefined.
    • - *
    • A mipmap attribute can be set, in which case memory will be allocated up front for mipmaps. The application can render the mipmap images or, if - * SGIS_generate_mipmap is supported, they can be automatically generated when the color buffer is bound as a texture.
    • - *
    • A texture target is associated with the pbuffer, so that cubemap images can be rendered into a single color buffer.
    • - *
    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}, {@link WGLARBPixelFormat WGL_ARB_pixel_format}, {@link WGLARBPbuffer WGL_ARB_pbuffer}.

    - */ -public class WGLARBRenderTexture { - - /** - * Accepted by the {@code attributes} parameter of {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}, and the {@code attribIList} parameters of - * {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB}. - */ - public static final int - WGL_BIND_TO_TEXTURE_RGB_ARB = 0x2070, - WGL_BIND_TO_TEXTURE_RGBA_ARB = 0x2071; - - /** Accepted by the {@code attribList} parameter of {@link WGLARBPbuffer#wglCreatePbufferARB CreatePbufferARB} and by the {@code attribute} parameter of {@link WGLARBPbuffer#wglQueryPbufferARB QueryPbufferARB}. */ - public static final int - WGL_TEXTURE_FORMAT_ARB = 0x2072, - WGL_TEXTURE_TARGET_ARB = 0x2073, - WGL_MIPMAP_TEXTURE_ARB = 0x2074; - - /** - * Accepted as a value in the {@code attribList} parameter of {@link WGLARBPbuffer#wglCreatePbufferARB CreatePbufferARB} and returned in the value parameter of {@link WGLARBPbuffer#wglQueryPbufferARB QueryPbufferARB} when - * {@code attribute} is {@link #WGL_TEXTURE_FORMAT_ARB TEXTURE_FORMAT_ARB}. - */ - public static final int - WGL_TEXTURE_RGB_ARB = 0x2075, - WGL_TEXTURE_RGBA_ARB = 0x2076, - WGL_NO_TEXTURE_ARB = 0x2077; - - /** - * Accepted as a value in the {@code attribList} parameter of {@link WGLARBPbuffer#wglCreatePbufferARB CreatePbufferARB} and returned in the value parameter of {@link WGLARBPbuffer#wglQueryPbufferARB QueryPbufferARB} when - * {@code attribute} is {@link #WGL_TEXTURE_TARGET_ARB TEXTURE_TARGET_ARB}. - */ - public static final int - WGL_TEXTURE_CUBE_MAP_ARB = 0x2078, - WGL_TEXTURE_1D_ARB = 0x2079, - WGL_TEXTURE_2D_ARB = 0x207A; - - /** Accepted by the {@code attribList} parameter of {@link #wglSetPbufferAttribARB SetPbufferAttribARB} and by the {@code attribute} parameter of {@link WGLARBPbuffer#wglQueryPbufferARB QueryPbufferARB}. */ - public static final int - WGL_MIPMAP_LEVEL_ARB = 0x207B, - WGL_CUBE_MAP_FACE_ARB = 0x207C; - - /** - * Accepted as a value in the {@code attribList} parameter of {@link #wglSetPbufferAttribARB SetPbufferAttribARB} and returned in the value parameter of {@link WGLARBPbuffer#wglQueryPbufferARB QueryPbufferARB} when - * {@code attribute} is {@link #WGL_CUBE_MAP_FACE_ARB CUBE_MAP_FACE_ARB}. - */ - public static final int - WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x207D, - WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x207E, - WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x207F, - WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x2080, - WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x2081, - WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x2082; - - /** Accepted by the {@code buffer} parameter of {@link #wglBindTexImageARB BindTexImageARB} and {@link #wglReleaseTexImageARB ReleaseTexImageARB}. */ - public static final int - WGL_FRONT_LEFT_ARB = 0x2083, - WGL_FRONT_RIGHT_ARB = 0x2084, - WGL_BACK_LEFT_ARB = 0x2085, - WGL_BACK_RIGHT_ARB = 0x2086, - WGL_AUX0_ARB = 0x2087, - WGL_AUX1_ARB = 0x2088, - WGL_AUX2_ARB = 0x2089, - WGL_AUX3_ARB = 0x208A, - WGL_AUX4_ARB = 0x208B, - WGL_AUX5_ARB = 0x208C, - WGL_AUX6_ARB = 0x208D, - WGL_AUX7_ARB = 0x208E, - WGL_AUX8_ARB = 0x208F, - WGL_AUX9_ARB = 0x2090; - - protected WGLARBRenderTexture() { - throw new UnsupportedOperationException(); - } - - // --- [ wglBindTexImageARB ] --- - - /** - * Defines a one-dimensional texture image or two-dimensional texture image or a set of two-dimensional cube map texture images. The texture image or - * images consist of the image data in {@code buffer} for the specified {@code pbuffer} and need not be copied. The texture target, the texture format and - * the size of the texture components are derived from attributes of pbuffer specified by {@code pbuffer}. - * - * @param pbuffer a pbuffer handle - * @param buffer the target buffer. One of:
    {@link #WGL_FRONT_LEFT_ARB FRONT_LEFT_ARB}{@link #WGL_FRONT_RIGHT_ARB FRONT_RIGHT_ARB}{@link #WGL_BACK_LEFT_ARB BACK_LEFT_ARB}{@link #WGL_BACK_RIGHT_ARB BACK_RIGHT_ARB}{@link #WGL_AUX0_ARB AUX0_ARB}WGL_AUX[1-9]_ARB
    - */ - @NativeType("BOOL") - public static boolean wglBindTexImageARB(@NativeType("HPBUFFERARB") long pbuffer, int buffer) { - long __functionAddress = GL.getCapabilitiesWGL().wglBindTexImageARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - } - return callPI(pbuffer, buffer, __functionAddress) != 0; - } - - // --- [ wglReleaseTexImageARB ] --- - - /** - * Releases the specified color buffer back to the pbuffer. The pbuffer is made available for reading and writing when it no longer has any color buffers - * bound as textures. - * - * @param pbuffer a pbuffer handle - * @param buffer the target buffer. One of:
    {@link #WGL_FRONT_LEFT_ARB FRONT_LEFT_ARB}{@link #WGL_FRONT_RIGHT_ARB FRONT_RIGHT_ARB}{@link #WGL_BACK_LEFT_ARB BACK_LEFT_ARB}{@link #WGL_BACK_RIGHT_ARB BACK_RIGHT_ARB}{@link #WGL_AUX0_ARB AUX0_ARB}WGL_AUX[1-9]_ARB
    - */ - @NativeType("BOOL") - public static boolean wglReleaseTexImageARB(@NativeType("HPBUFFERARB") long pbuffer, int buffer) { - long __functionAddress = GL.getCapabilitiesWGL().wglReleaseTexImageARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - } - return callPI(pbuffer, buffer, __functionAddress) != 0; - } - - // --- [ wglSetPbufferAttribARB ] --- - - /** Unsafe version of: {@link #wglSetPbufferAttribARB SetPbufferAttribARB} */ - public static int nwglSetPbufferAttribARB(long pbuffer, long attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglSetPbufferAttribARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - } - return callPPI(pbuffer, attribList, __functionAddress); - } - - /** - * Sets an attribute to the specified pbuffer. - * - * @param pbuffer a pbuffer handle - * @param attribList a 0-terminated list of attribute {type, value} pairs containing integer values - */ - @NativeType("BOOL") - public static boolean wglSetPbufferAttribARB(@NativeType("HPBUFFERARB") long pbuffer, @Nullable @NativeType("int const *") IntBuffer attribList) { - if (CHECKS) { - checkNTSafe(attribList); - } - return nwglSetPbufferAttribARB(pbuffer, memAddressSafe(attribList)) != 0; - } - - /** Array version of: {@link #wglSetPbufferAttribARB SetPbufferAttribARB} */ - @NativeType("BOOL") - public static boolean wglSetPbufferAttribARB(@NativeType("HPBUFFERARB") long pbuffer, @Nullable @NativeType("int const *") int[] attribList) { - long __functionAddress = GL.getCapabilitiesWGL().wglSetPbufferAttribARB; - if (CHECKS) { - check(__functionAddress); - check(pbuffer); - checkNTSafe(attribList); - } - return callPPI(pbuffer, attribList, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBRobustnessApplicationIsolation.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBRobustnessApplicationIsolation.java deleted file mode 100644 index 61e609ab..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLARBRobustnessApplicationIsolation.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ARB_robustness_application_isolation extension. - * - *

    GL_ARB_robustness and WGL_ARB_create_context_robustness allow creating an OpenGL context supporting graphics reset notification behavior. - * WGL_ARB_robustness_application_isolation provides stronger guarantees about the possible side-effects of a graphics reset.

    - * - *

    If the graphics driver advertises the WGL_ARB_robustness_application_isolation extension string, then the driver guarantees that if a particular - * application causes a graphics reset to occur:

    - * - *
      - *
    1. No other application on the system is affected by the graphics reset.
    2. - *
    3. No other application on the system receives any notification that the graphics reset occurred.
    4. - *
    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string} and {@link WGLARBCreateContextRobustness WGL_ARB_create_context_robustness}.

    - */ -public final class WGLARBRobustnessApplicationIsolation { - - /** - * Accepted as a bit in the attribute value for {@link WGLARBCreateContext#WGL_CONTEXT_FLAGS_ARB CONTEXT_FLAGS_ARB} in the {@code attribList} argument to - * {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int WGL_CONTEXT_RESET_ISOLATION_BIT_ARB = 0x8; - - private WGLARBRobustnessApplicationIsolation() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLATIPixelFormatFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLATIPixelFormatFloat.java deleted file mode 100644 index 80693fe1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLATIPixelFormatFloat.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ATI_pixel_format_float extension. - * - *

    This extension adds pixel formats with floating-point RGBA color components.

    - * - *

    The size of each float components is specified using the same WGL_RED_BITS_ARB, WGL_GREEN_BITS_ARB, WGL_BLUE_BITS_ARB and WGL_ALPHA_BITS_ARB pixel - * format attributes that are used for defining the size of fixed-point components. 32 bit floating- point components are in the standard IEEE float - * format. 16 bit floating-point components have 1 sign bit, 5 exponent bits, and 10 mantissa bits.

    - * - *

    In standard OpenGL RGBA color components are normally clamped to the range [0,1]. The color components of a float buffer are clamped to the limits of - * the range representable by their format.

    - * - *

    Requires {@link WGLARBPixelFormat WGL_ARB_pixel_format}.

    - */ -public final class WGLATIPixelFormatFloat { - - /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ - public static final int - WGL_RGBA_FLOAT_MODE_ATI = 0x8820, - WGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI = 0x8835; - - /** - * Accepted as a value in the {@code piAttribIList} and {@code pfAttribFList} parameter arrays of wglChoosePixelFormatARB, and returned in the - * {@code piValues} parameter array of wglGetPixelFormatAttribivARB, and the {@code pfValues} parameter array of wglGetPixelFormatAttribfvARB. - */ - public static final int WGL_TYPE_RGBA_FLOAT_ATI = 0x21A0; - - private WGLATIPixelFormatFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLATIRenderTextureRectangle.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLATIRenderTextureRectangle.java deleted file mode 100644 index f3502717..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLATIRenderTextureRectangle.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_ATI_render_texture_rectangle extension. - * - *

    This extension builds upon {@link WGLARBRenderTexture WGL_ARB_render_texture} and allows a pbuffer to be bound to a texture rectangle target.

    - * - *

    Requires {@link WGLARBRenderTexture WGL_ARB_render_texture} and {@link ARBTextureRectangle ARB_texture_rectangle}.

    - */ -public final class WGLATIRenderTextureRectangle { - - /** - * Accepted as a value in the {@code piAttribList} parameter of wglCreatePbufferARB and returned in the value parameter of wglQueryPbufferARB when - * {@code iAttribute} is WGL_TEXTURE_TARGET_ARB. - */ - public static final int WGL_TEXTURE_RECTANGLE_ATI = 0x21A5; - - private WGLATIRenderTextureRectangle() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLCapabilities.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLCapabilities.java deleted file mode 100644 index 847d421a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLCapabilities.java +++ /dev/null @@ -1,523 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; -import java.util.Set; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; - -/** Defines the WGL capabilities of an OpenGL device. */ -public final class WGLCapabilities { - - // WGL_AMD_gpu_association - public final long - wglGetGPUIDsAMD, - wglGetGPUInfoAMD, - wglGetContextGPUIDAMD, - wglCreateAssociatedContextAMD, - wglCreateAssociatedContextAttribsAMD, - wglDeleteAssociatedContextAMD, - wglMakeAssociatedContextCurrentAMD, - wglGetCurrentAssociatedContextAMD, - wglBlitContextFramebufferAMD; - - // WGL_ARB_buffer_region - public final long - wglCreateBufferRegionARB, - wglDeleteBufferRegionARB, - wglSaveBufferRegionARB, - wglRestoreBufferRegionARB; - - // WGL_ARB_create_context - public final long - wglCreateContextAttribsARB; - - // WGL_ARB_extensions_string - public final long - wglGetExtensionsStringARB; - - // WGL_ARB_make_current_read - public final long - wglMakeContextCurrentARB, - wglGetCurrentReadDCARB; - - // WGL_ARB_pbuffer - public final long - wglCreatePbufferARB, - wglGetPbufferDCARB, - wglReleasePbufferDCARB, - wglDestroyPbufferARB, - wglQueryPbufferARB; - - // WGL_ARB_pixel_format - public final long - wglGetPixelFormatAttribivARB, - wglGetPixelFormatAttribfvARB, - wglChoosePixelFormatARB; - - // WGL_ARB_render_texture - public final long - wglBindTexImageARB, - wglReleaseTexImageARB, - wglSetPbufferAttribARB; - - // WGL_EXT_extensions_string - public final long - wglGetExtensionsStringEXT; - - // WGL_EXT_swap_control - public final long - wglSwapIntervalEXT, - wglGetSwapIntervalEXT; - - // WGL_NV_copy_image - public final long - wglCopyImageSubDataNV; - - // WGL_NV_delay_before_swap - public final long - wglDelayBeforeSwapNV; - - // WGL_NV_DX_interop - public final long - wglDXSetResourceShareHandleNV, - wglDXOpenDeviceNV, - wglDXCloseDeviceNV, - wglDXRegisterObjectNV, - wglDXUnregisterObjectNV, - wglDXObjectAccessNV, - wglDXLockObjectsNV, - wglDXUnlockObjectsNV; - - // WGL_NV_gpu_affinity - public final long - wglEnumGpusNV, - wglEnumGpuDevicesNV, - wglCreateAffinityDCNV, - wglEnumGpusFromAffinityDCNV, - wglDeleteDCNV; - - // WGL_NV_swap_group - public final long - wglJoinSwapGroupNV, - wglBindSwapBarrierNV, - wglQuerySwapGroupNV, - wglQueryMaxSwapGroupsNV, - wglQueryFrameCountNV, - wglResetFrameCountNV; - - // WGL_NV_vertex_array_range - public final long - wglAllocateMemoryNV, - wglFreeMemoryNV; - - /** When true, {@link WGLAMDGPUAssociation} is supported. */ - public final boolean WGL_AMD_gpu_association; - /** When true, {@link WGLARBBufferRegion} is supported. */ - public final boolean WGL_ARB_buffer_region; - /** When true, {@link WGLARBContextFlushControl} is supported. */ - public final boolean WGL_ARB_context_flush_control; - /** When true, {@link WGLARBCreateContext} is supported. */ - public final boolean WGL_ARB_create_context; - /** When true, {@link WGLARBCreateContextNoError} is supported. */ - public final boolean WGL_ARB_create_context_no_error; - /** When true, {@link WGLARBCreateContextProfile} is supported. */ - public final boolean WGL_ARB_create_context_profile; - /** When true, {@link WGLARBCreateContextRobustness} is supported. */ - public final boolean WGL_ARB_create_context_robustness; - /** When true, {@link WGLARBExtensionsString} is supported. */ - public final boolean WGL_ARB_extensions_string; - /** When true, {@link WGLARBFramebufferSRGB} is supported. */ - public final boolean WGL_ARB_framebuffer_sRGB; - /** When true, {@link WGLARBMakeCurrentRead} is supported. */ - public final boolean WGL_ARB_make_current_read; - /** When true, {@link WGLARBMultisample} is supported. */ - public final boolean WGL_ARB_multisample; - /** When true, {@link WGLARBPbuffer} is supported. */ - public final boolean WGL_ARB_pbuffer; - /** When true, {@link WGLARBPixelFormat} is supported. */ - public final boolean WGL_ARB_pixel_format; - /** When true, {@link WGLARBPixelFormatFloat} is supported. */ - public final boolean WGL_ARB_pixel_format_float; - /** When true, {@link WGLARBRenderTexture} is supported. */ - public final boolean WGL_ARB_render_texture; - /** When true, {@link WGLARBRobustnessApplicationIsolation} is supported. */ - public final boolean WGL_ARB_robustness_application_isolation; - /** - * Native bindings to the WGL_ARB_robustness_share_group_isolation extension. - * - *

    GL_ARB_robustness and WGL_ARB_create_context_robustness allow creating an OpenGL context supporting graphics reset notification behavior. - * WGL_ARB_robustness_share_group_isolation provides stronger guarantees about the possible side-effects of a graphics reset.

    - * - *

    If the graphics driver advertises the WGL_ARB_robustness_share_group_isolation extension string, then the driver guarantees that if a context in a - * particular share group causes a graphics reset to occur:

    - * - *
      - *
    1. No other share group within the application is affected by the graphics reset. Additionally, no other application on the system is affected by the - * graphics reset.
    2. - *
    3. No other share group within the application receives any notification that the graphics reset occurred. Additionally, no other application on the - * system receives any notification that the graphics reset occurred.
    4. - *
    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string} and {@link WGLARBCreateContextRobustness WGL_ARB_create_context_robustness}.

    - */ - public final boolean WGL_ARB_robustness_share_group_isolation; - /** When true, {@link WGLATIPixelFormatFloat} is supported. */ - public final boolean WGL_ATI_pixel_format_float; - /** When true, {@link WGLATIRenderTextureRectangle} is supported. */ - public final boolean WGL_ATI_render_texture_rectangle; - /** When true, {@link WGLEXTColorspace} is supported. */ - public final boolean WGL_EXT_colorspace; - /** When true, {@link WGLEXTCreateContextES2Profile} is supported. */ - public final boolean WGL_EXT_create_context_es2_profile; - /** When true, {@link WGLEXTCreateContextESProfile} is supported. */ - public final boolean WGL_EXT_create_context_es_profile; - /** When true, {@link WGLEXTDepthFloat} is supported. */ - public final boolean WGL_EXT_depth_float; - /** When true, {@link WGLEXTExtensionsString} is supported. */ - public final boolean WGL_EXT_extensions_string; - /** When true, {@link WGLEXTFramebufferSRGB} is supported. */ - public final boolean WGL_EXT_framebuffer_sRGB; - /** When true, {@link WGLEXTPixelFormatPackedFloat} is supported. */ - public final boolean WGL_EXT_pixel_format_packed_float; - /** When true, {@link WGLEXTSwapControl} is supported. */ - public final boolean WGL_EXT_swap_control; - /** - * When true, the WGL_EXT_swap_control_tear extension is supported. - * - *

    This extension extends the existing {@link WGLEXTSwapControl WGL_EXT_swap_control} extension by allowing a negative {@code interval} parameter to - * {@link WGLEXTSwapControl#wglSwapIntervalEXT SwapIntervalEXT}. The negative {@code interval} allows late swaps to occur without synchronization to the video frame. This - * reduces the visual stutter on late frames and reduces the stall on subsequent frames.

    - */ - public final boolean WGL_EXT_swap_control_tear; - /** When true, {@link WGLNVCopyImage} is supported. */ - public final boolean WGL_NV_copy_image; - /** When true, {@link WGLNVDelayBeforeSwap} is supported. */ - public final boolean WGL_NV_delay_before_swap; - /** When true, {@link WGLNVDXInterop} is supported. */ - public final boolean WGL_NV_DX_interop; - /** - * When true, the WGL_NV_DX_interop2 extension is supported. - * - *

    This extension expands on the specification of {@link WGLNVDXInterop WGL_NV_DX_interop} to add support for DirectX version 10, 10.1 and 11 resources.

    - * - *

    Requires {@link GL20 OpenGL 2.0} and {@link WGLNVDXInterop WGL_NV_DX_interop}.

    - */ - public final boolean WGL_NV_DX_interop2; - /** When true, {@link WGLNVFloatBuffer} is supported. */ - public final boolean WGL_NV_float_buffer; - /** When true, {@link WGLNVGPUAffinity} is supported. */ - public final boolean WGL_NV_gpu_affinity; - /** When true, {@link WGLNVMultigpuContext} is supported. */ - public final boolean WGL_NV_multigpu_context; - /** When true, {@link WGLNVMultisampleCoverage} is supported. */ - public final boolean WGL_NV_multisample_coverage; - /** When true, {@link WGLNVRenderDepthTexture} is supported. */ - public final boolean WGL_NV_render_depth_texture; - /** When true, {@link WGLNVRenderTextureRectangle} is supported. */ - public final boolean WGL_NV_render_texture_rectangle; - /** When true, {@link WGLNVSwapGroup} is supported. */ - public final boolean WGL_NV_swap_group; - /** When true, {@code WGL_NV_vertex_array_range} is supported. */ - public final boolean WGL_NV_vertex_array_range; - - WGLCapabilities(FunctionProvider provider, Set ext) { - long[] caps = new long[54]; - - WGL_AMD_gpu_association = check_WGL_AMD_gpu_association(provider, caps, ext); - WGL_ARB_buffer_region = check_WGL_ARB_buffer_region(provider, caps, ext); - WGL_ARB_context_flush_control = ext.contains("WGL_ARB_context_flush_control"); - WGL_ARB_create_context = check_WGL_ARB_create_context(provider, caps, ext); - WGL_ARB_create_context_no_error = ext.contains("WGL_ARB_create_context_no_error"); - WGL_ARB_create_context_profile = ext.contains("WGL_ARB_create_context_profile"); - WGL_ARB_create_context_robustness = ext.contains("WGL_ARB_create_context_robustness"); - WGL_ARB_extensions_string = check_WGL_ARB_extensions_string(provider, caps, ext); - WGL_ARB_framebuffer_sRGB = ext.contains("WGL_ARB_framebuffer_sRGB"); - WGL_ARB_make_current_read = check_WGL_ARB_make_current_read(provider, caps, ext); - WGL_ARB_multisample = ext.contains("WGL_ARB_multisample"); - WGL_ARB_pbuffer = check_WGL_ARB_pbuffer(provider, caps, ext); - WGL_ARB_pixel_format = check_WGL_ARB_pixel_format(provider, caps, ext); - WGL_ARB_pixel_format_float = ext.contains("WGL_ARB_pixel_format_float"); - WGL_ARB_render_texture = check_WGL_ARB_render_texture(provider, caps, ext); - WGL_ARB_robustness_application_isolation = ext.contains("WGL_ARB_robustness_application_isolation"); - WGL_ARB_robustness_share_group_isolation = ext.contains("WGL_ARB_robustness_share_group_isolation"); - WGL_ATI_pixel_format_float = ext.contains("WGL_ATI_pixel_format_float"); - WGL_ATI_render_texture_rectangle = ext.contains("WGL_ATI_render_texture_rectangle"); - WGL_EXT_colorspace = ext.contains("WGL_EXT_colorspace"); - WGL_EXT_create_context_es2_profile = ext.contains("WGL_EXT_create_context_es2_profile"); - WGL_EXT_create_context_es_profile = ext.contains("WGL_EXT_create_context_es_profile"); - WGL_EXT_depth_float = ext.contains("WGL_EXT_depth_float"); - WGL_EXT_extensions_string = check_WGL_EXT_extensions_string(provider, caps, ext); - WGL_EXT_framebuffer_sRGB = ext.contains("WGL_EXT_framebuffer_sRGB"); - WGL_EXT_pixel_format_packed_float = ext.contains("WGL_EXT_pixel_format_packed_float"); - WGL_EXT_swap_control = check_WGL_EXT_swap_control(provider, caps, ext); - WGL_EXT_swap_control_tear = ext.contains("WGL_EXT_swap_control_tear"); - WGL_NV_copy_image = check_WGL_NV_copy_image(provider, caps, ext); - WGL_NV_delay_before_swap = check_WGL_NV_delay_before_swap(provider, caps, ext); - WGL_NV_DX_interop = check_WGL_NV_DX_interop(provider, caps, ext); - WGL_NV_DX_interop2 = ext.contains("WGL_NV_DX_interop2"); - WGL_NV_float_buffer = ext.contains("WGL_NV_float_buffer"); - WGL_NV_gpu_affinity = check_WGL_NV_gpu_affinity(provider, caps, ext); - WGL_NV_multigpu_context = ext.contains("WGL_NV_multigpu_context"); - WGL_NV_multisample_coverage = ext.contains("WGL_NV_multisample_coverage"); - WGL_NV_render_depth_texture = ext.contains("WGL_NV_render_depth_texture"); - WGL_NV_render_texture_rectangle = ext.contains("WGL_NV_render_texture_rectangle"); - WGL_NV_swap_group = check_WGL_NV_swap_group(provider, caps, ext); - WGL_NV_vertex_array_range = check_WGL_NV_vertex_array_range(provider, caps, ext); - - wglGetGPUIDsAMD = caps[0]; - wglGetGPUInfoAMD = caps[1]; - wglGetContextGPUIDAMD = caps[2]; - wglCreateAssociatedContextAMD = caps[3]; - wglCreateAssociatedContextAttribsAMD = caps[4]; - wglDeleteAssociatedContextAMD = caps[5]; - wglMakeAssociatedContextCurrentAMD = caps[6]; - wglGetCurrentAssociatedContextAMD = caps[7]; - wglBlitContextFramebufferAMD = caps[8]; - wglCreateBufferRegionARB = caps[9]; - wglDeleteBufferRegionARB = caps[10]; - wglSaveBufferRegionARB = caps[11]; - wglRestoreBufferRegionARB = caps[12]; - wglCreateContextAttribsARB = caps[13]; - wglGetExtensionsStringARB = caps[14]; - wglMakeContextCurrentARB = caps[15]; - wglGetCurrentReadDCARB = caps[16]; - wglCreatePbufferARB = caps[17]; - wglGetPbufferDCARB = caps[18]; - wglReleasePbufferDCARB = caps[19]; - wglDestroyPbufferARB = caps[20]; - wglQueryPbufferARB = caps[21]; - wglGetPixelFormatAttribivARB = caps[22]; - wglGetPixelFormatAttribfvARB = caps[23]; - wglChoosePixelFormatARB = caps[24]; - wglBindTexImageARB = caps[25]; - wglReleaseTexImageARB = caps[26]; - wglSetPbufferAttribARB = caps[27]; - wglGetExtensionsStringEXT = caps[28]; - wglSwapIntervalEXT = caps[29]; - wglGetSwapIntervalEXT = caps[30]; - wglCopyImageSubDataNV = caps[31]; - wglDelayBeforeSwapNV = caps[32]; - wglDXSetResourceShareHandleNV = caps[33]; - wglDXOpenDeviceNV = caps[34]; - wglDXCloseDeviceNV = caps[35]; - wglDXRegisterObjectNV = caps[36]; - wglDXUnregisterObjectNV = caps[37]; - wglDXObjectAccessNV = caps[38]; - wglDXLockObjectsNV = caps[39]; - wglDXUnlockObjectsNV = caps[40]; - wglEnumGpusNV = caps[41]; - wglEnumGpuDevicesNV = caps[42]; - wglCreateAffinityDCNV = caps[43]; - wglEnumGpusFromAffinityDCNV = caps[44]; - wglDeleteDCNV = caps[45]; - wglJoinSwapGroupNV = caps[46]; - wglBindSwapBarrierNV = caps[47]; - wglQuerySwapGroupNV = caps[48]; - wglQueryMaxSwapGroupsNV = caps[49]; - wglQueryFrameCountNV = caps[50]; - wglResetFrameCountNV = caps[51]; - wglAllocateMemoryNV = caps[52]; - wglFreeMemoryNV = caps[53]; - } - - private static boolean check_WGL_AMD_gpu_association(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_AMD_gpu_association")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 0, 1, 2, 3, 4, 5, 6, 7 - }, - "wglGetGPUIDsAMD", "wglGetGPUInfoAMD", "wglGetContextGPUIDAMD", "wglCreateAssociatedContextAMD", "wglCreateAssociatedContextAttribsAMD", - "wglDeleteAssociatedContextAMD", "wglMakeAssociatedContextCurrentAMD", "wglGetCurrentAssociatedContextAMD" - ) || reportMissing("WGL", "WGL_AMD_gpu_association"); - } - - private static boolean check_WGL_ARB_buffer_region(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_ARB_buffer_region")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 9, 10, 11, 12 - }, - "wglCreateBufferRegionARB", "wglDeleteBufferRegionARB", "wglSaveBufferRegionARB", "wglRestoreBufferRegionARB" - ) || reportMissing("WGL", "WGL_ARB_buffer_region"); - } - - private static boolean check_WGL_ARB_create_context(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_ARB_create_context")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 13 - }, - "wglCreateContextAttribsARB" - ) || reportMissing("WGL", "WGL_ARB_create_context"); - } - - private static boolean check_WGL_ARB_extensions_string(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_ARB_extensions_string")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 14 - }, - "wglGetExtensionsStringARB" - ) || reportMissing("WGL", "WGL_ARB_extensions_string"); - } - - private static boolean check_WGL_ARB_make_current_read(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_ARB_make_current_read")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 15, 16 - }, - "wglMakeContextCurrentARB", "wglGetCurrentReadDCARB" - ) || reportMissing("WGL", "WGL_ARB_make_current_read"); - } - - private static boolean check_WGL_ARB_pbuffer(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_ARB_pbuffer")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 17, 18, 19, 20, 21 - }, - "wglCreatePbufferARB", "wglGetPbufferDCARB", "wglReleasePbufferDCARB", "wglDestroyPbufferARB", "wglQueryPbufferARB" - ) || reportMissing("WGL", "WGL_ARB_pbuffer"); - } - - private static boolean check_WGL_ARB_pixel_format(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_ARB_pixel_format")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 22, 23, 24 - }, - "wglGetPixelFormatAttribivARB", "wglGetPixelFormatAttribfvARB", "wglChoosePixelFormatARB" - ) || reportMissing("WGL", "WGL_ARB_pixel_format"); - } - - private static boolean check_WGL_ARB_render_texture(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_ARB_render_texture")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 25, 26, 27 - }, - "wglBindTexImageARB", "wglReleaseTexImageARB", "wglSetPbufferAttribARB" - ) || reportMissing("WGL", "WGL_ARB_render_texture"); - } - - private static boolean check_WGL_EXT_extensions_string(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_EXT_extensions_string")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 28 - }, - "wglGetExtensionsStringEXT" - ) || reportMissing("WGL", "WGL_EXT_extensions_string"); - } - - private static boolean check_WGL_EXT_swap_control(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_EXT_swap_control")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 29, 30 - }, - "wglSwapIntervalEXT", "wglGetSwapIntervalEXT" - ) || reportMissing("WGL", "WGL_EXT_swap_control"); - } - - private static boolean check_WGL_NV_copy_image(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_NV_copy_image")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 31 - }, - "wglCopyImageSubDataNV" - ) || reportMissing("WGL", "WGL_NV_copy_image"); - } - - private static boolean check_WGL_NV_delay_before_swap(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_NV_delay_before_swap")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 32 - }, - "wglDelayBeforeSwapNV" - ) || reportMissing("WGL", "WGL_NV_delay_before_swap"); - } - - private static boolean check_WGL_NV_DX_interop(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_NV_DX_interop")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 33, 34, 35, 36, 37, 38, 39, 40 - }, - "wglDXSetResourceShareHandleNV", "wglDXOpenDeviceNV", "wglDXCloseDeviceNV", "wglDXRegisterObjectNV", "wglDXUnregisterObjectNV", - "wglDXObjectAccessNV", "wglDXLockObjectsNV", "wglDXUnlockObjectsNV" - ) || reportMissing("WGL", "WGL_NV_DX_interop"); - } - - private static boolean check_WGL_NV_gpu_affinity(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_NV_gpu_affinity")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 41, 42, 43, 44, 45 - }, - "wglEnumGpusNV", "wglEnumGpuDevicesNV", "wglCreateAffinityDCNV", "wglEnumGpusFromAffinityDCNV", "wglDeleteDCNV" - ) || reportMissing("WGL", "WGL_NV_gpu_affinity"); - } - - private static boolean check_WGL_NV_swap_group(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_NV_swap_group")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 46, 47, 48, 49, 50, 51 - }, - "wglJoinSwapGroupNV", "wglBindSwapBarrierNV", "wglQuerySwapGroupNV", "wglQueryMaxSwapGroupsNV", "wglQueryFrameCountNV", "wglResetFrameCountNV" - ) || reportMissing("WGL", "WGL_NV_swap_group"); - } - - private static boolean check_WGL_NV_vertex_array_range(FunctionProvider provider, long[] caps, Set ext) { - if (!ext.contains("WGL_NV_vertex_array_range")) { - return false; - } - - return checkFunctions(provider, caps, new int[] { - 52, 53 - }, - "wglAllocateMemoryNV", "wglFreeMemoryNV" - ) || reportMissing("WGL", "WGL_NV_vertex_array_range"); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTColorspace.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTColorspace.java deleted file mode 100644 index e17f9bb8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTColorspace.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_EXT_colorspace extension. - * - *

    Applications may wish to use sRGB format default framebuffers to more easily achieve sRGB rendering to display devices. This extension allows creating - * pixel formats which will be rendered to in sRGB by OpenGL/ES contexts supporting that capability.

    - * - *

    Requires {@link GL30 OpenGL 3.0}.

    - */ -public final class WGLEXTColorspace { - - /** Accepted as an attribute name by {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}, {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB} and {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB}. */ - public static final int WGL_COLORSPACE_EXT = 0x309D; - - /** Accepted as attribute values for {@link #WGL_COLORSPACE_EXT COLORSPACE_EXT} by {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}, {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB} and {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB}. */ - public static final int - WGL_COLORSPACE_SRGB_EXT = 0x3089, - WGL_COLORSPACE_LINEAR_EXT = 0x308A; - - private WGLEXTColorspace() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTCreateContextES2Profile.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTCreateContextES2Profile.java deleted file mode 100644 index c11c31a3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTCreateContextES2Profile.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_EXT_create_context_es2_profile extension. - * - *

    This extension allows creating an OpenGL ES context.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}, {@link WGLARBCreateContext WGL_ARB_create_context}, {@link WGLARBCreateContextProfile WGL_ARB_create_context_profile} and an OpenGL ES implementation.

    - */ -public final class WGLEXTCreateContextES2Profile { - - /** Accepted as a bit in the attribute value for {@link WGLARBCreateContextProfile#WGL_CONTEXT_PROFILE_MASK_ARB CONTEXT_PROFILE_MASK_ARB} in {@code attribList}. */ - public static final int WGL_CONTEXT_ES2_PROFILE_BIT_EXT = 0x4; - - private WGLEXTCreateContextES2Profile() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTCreateContextESProfile.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTCreateContextESProfile.java deleted file mode 100644 index 280934ef..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTCreateContextESProfile.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_EXT_create_context_es_profile extension. - * - *

    This extension allows creating an OpenGL ES context.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}, {@link WGLARBCreateContext WGL_ARB_create_context}, {@link WGLARBCreateContextProfile WGL_ARB_create_context_profile} and an OpenGL ES implementation.

    - */ -public final class WGLEXTCreateContextESProfile { - - /** Accepted as a bit in the attribute value for {@link WGLARBCreateContextProfile#WGL_CONTEXT_PROFILE_MASK_ARB CONTEXT_PROFILE_MASK_ARB} in {@code attribList}. */ - public static final int WGL_CONTEXT_ES_PROFILE_BIT_EXT = 0x4; - - private WGLEXTCreateContextESProfile() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTDepthFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTDepthFloat.java deleted file mode 100644 index 604a392e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTDepthFloat.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_EXT_depth_float extension. - * - *

    For perspective scenes, the density of objects (vertices) increases as the distance from the eye increases. For a linear depth buffer, this means that - * objects (vertices) are sparse for a large portion of the depth range and are dense for a small portion of the depth buffer.

    - * - *

    This behavior is obvious if you consider standing in a boat looking at the shore. The near objects include only the boat while the far objects include - * the entire shoreline which may include an entire city.

    - * - *

    A non-linear (floating-point) depth buffer helps this problem. If the near clipping plane is set to 1.0, and the far clipping plane is set to 0.0, a - * much greater resolution of objects can occur.

    - */ -public final class WGLEXTDepthFloat { - - /** Accepted by the {@code attribute} parameter of wglGetPixelFormatAttribivEXT, wglGetPixelFormatAttribfvEXT, and wglChoosePixelFormatExEXT. */ - public static final int WGL_DEPTH_FLOAT_EXT = 0x2040; - - private WGLEXTDepthFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTExtensionsString.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTExtensionsString.java deleted file mode 100644 index c727262f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTExtensionsString.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to the WGL_EXT_extensions_string extension. */ -public class WGLEXTExtensionsString { - - protected WGLEXTExtensionsString() { - throw new UnsupportedOperationException(); - } - - // --- [ wglGetExtensionsStringEXT ] --- - - /** Unsafe version of: {@link #wglGetExtensionsStringEXT GetExtensionsStringEXT} */ - public static long nwglGetExtensionsStringEXT() { - long __functionAddress = GL.getCapabilitiesWGL().wglGetExtensionsStringEXT; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - - /** - * Returns a list of supported extensions to WGL. Although the contents of the string is implementation specific, the string will be {@code NULL} terminated and - * will contain a space-separated list of extension names. (The extension names themselves do not contain spaces.) If there are no extensions then the - * empty string is returned. - */ - @Nullable - @NativeType("char const *") - public static String wglGetExtensionsStringEXT() { - long __result = nwglGetExtensionsStringEXT(); - return memASCIISafe(__result); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTFramebufferSRGB.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTFramebufferSRGB.java deleted file mode 100644 index d94c5d96..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTFramebufferSRGB.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_EXT_framebuffer_sRGB extension. - * - *

    WGL functionality for {@link EXTFramebufferSRGB EXT_framebuffer_sRGB}.

    - * - *

    Requires {@link WGLEXTExtensionsString WGL_EXT_extensions_string} and {@link WGLARBPixelFormat WGL_ARB_pixel_format}.

    - */ -public final class WGLEXTFramebufferSRGB { - - /** - * Accepted by the {@code piAttributes} parameter of wglGetPixelFormatAttribivEXT, wglGetPixelFormatAttribfvEXT, and the {@code piAttribIList} and - * {@code pfAttribIList} of wglChoosePixelFormatEXT. - */ - public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20A9; - - private WGLEXTFramebufferSRGB() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTPixelFormatPackedFloat.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTPixelFormatPackedFloat.java deleted file mode 100644 index 05710b83..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTPixelFormatPackedFloat.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_EXT_pixel_format_packed_float extension. - * - *

    This extension provides support for rendering into an unsigned floating-point rendering format with the assumption that the texture format described in - * {@link EXTPackedFloat} could also be advertised as an unsigned floating-point format for rendering.

    - * - *

    Requires {@link WGLARBPixelFormat WGL_ARB_pixel_format}.

    - */ -public final class WGLEXTPixelFormatPackedFloat { - - /** - * Accepted as a value in the {@code attribIList} parameter array of {@link WGLARBPixelFormat#wglChoosePixelFormatARB ChoosePixelFormatARB}, and returned in the {@code values} - * parameter array of {@link WGLARBPixelFormat#wglGetPixelFormatAttribivARB GetPixelFormatAttribivARB}. - */ - public static final int WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT = 0x20A8; - - private WGLEXTPixelFormatPackedFloat() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTSwapControl.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTSwapControl.java deleted file mode 100644 index e5c608bc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLEXTSwapControl.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the WGL_EXT_swap_control extension. - * - *

    This extension allows an application to specify a minimum periodicity of color buffer swaps, measured in video frame periods.

    - * - *

    Requires {@link WGLEXTExtensionsString WGL_EXT_extensions_string}.

    - */ -public class WGLEXTSwapControl { - - protected WGLEXTSwapControl() { - throw new UnsupportedOperationException(); - } - - // --- [ wglSwapIntervalEXT ] --- - - /** - * Specifies the minimum number of video frame periods per buffer swap for the window associated with the current context. The interval takes effect when - * {@link org.lwjgl.system.windows.GDI32#SwapBuffers} or wglSwapLayerBuffer is first called subsequent to the {@code wglSwapIntervalEXT} call. - * - *

    A video frame period is the time required by the monitor to display a full frame of video data. In the case of an interlaced monitor, this is typically - * the time required to display both the even and odd fields of a frame of video data. An interval set to a value of 2 means that the color buffers will - * be swapped at most every other video frame.

    - * - *

    If {@code interval} is set to a value of 0, buffer swaps are not synchronized to a video frame. The {@code interval} value is silently clamped to the - * maximum implementation-dependent value supported before being stored.

    - * - *

    The swap interval is not part of the render context state. It cannot be pushed or popped. The default swap interval is 1.

    - * - * @param interval the minimum number of video frames that are displayed before a buffer swap will occur - */ - @NativeType("BOOL") - public static boolean wglSwapIntervalEXT(int interval) { - long __functionAddress = GL.getCapabilitiesWGL().wglSwapIntervalEXT; - if (CHECKS) { - check(__functionAddress); - } - return callI(interval, __functionAddress) != 0; - } - - // --- [ wglGetSwapIntervalEXT ] --- - - /** Returns the current swap interval for the window associated with the current context. */ - public static int wglGetSwapIntervalEXT() { - long __functionAddress = GL.getCapabilitiesWGL().wglGetSwapIntervalEXT; - if (CHECKS) { - check(__functionAddress); - } - return callI(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVCopyImage.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVCopyImage.java deleted file mode 100644 index 23ea6ab1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVCopyImage.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** - * Native bindings to the WGL_NV_copy_image extension. - * - *

    This extension enables efficient image data transfer between image objects (i.e. textures and renderbuffers) without the need to bind the objects or - * otherwise configure the rendering pipeline. The WGL version allows copying between images in different contexts, even if those contexts are in - * different sharelists or even on different physical devices.

    - */ -public class WGLNVCopyImage { - - protected WGLNVCopyImage() { - throw new UnsupportedOperationException(); - } - - // --- [ wglCopyImageSubDataNV ] --- - - /** - * Behaves identically to the core function {@link #wglCopyImageSubDataNV CopyImageSubDataNV}, except that the {@code srcRC} and {@code dstRC} parameters specify - * the contexts in which to look up the source and destination objects, respectively. A value of zero indicates that the currently bound context should be - * used instead. - * - * @param srcRC the source OpenGL context - * @param srcName the source object - * @param srcTarget the source object target - * @param srcLevel the source level-of-detail number - * @param srcX the source texel x coordinate - * @param srcY the source texel y coordinate - * @param srcZ the source texel z coordinate - * @param dstRC the destination OpenGL context - * @param dstName the destination object - * @param dstTarget the destination object target - * @param dstLevel the destination level-of-detail number - * @param dstX the destination texel x coordinate - * @param dstY the destination texel y coordinate - * @param dstZ the destination texel z coordinate - * @param width the number of texels to copy in the x-dimension - * @param height the number of texels to copy in the y-dimension - * @param depth the number of texels to copy in the z-dimension - */ - @NativeType("BOOL") - public static boolean wglCopyImageSubDataNV(@NativeType("HGLRC") long srcRC, @NativeType("GLuint") int srcName, @NativeType("GLenum") int srcTarget, @NativeType("GLint") int srcLevel, @NativeType("GLint") int srcX, @NativeType("GLint") int srcY, @NativeType("GLint") int srcZ, @NativeType("HGLRC") long dstRC, @NativeType("GLuint") int dstName, @NativeType("GLenum") int dstTarget, @NativeType("GLint") int dstLevel, @NativeType("GLint") int dstX, @NativeType("GLint") int dstY, @NativeType("GLint") int dstZ, @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLsizei") int depth) { - long __functionAddress = GL.getCapabilitiesWGL().wglCopyImageSubDataNV; - if (CHECKS) { - check(__functionAddress); - check(srcRC); - check(dstRC); - } - return callPPI(srcRC, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstRC, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVDXInterop.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVDXInterop.java deleted file mode 100644 index e8f8ba60..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVDXInterop.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_NV_DX_interop extension. - * - *

    This extension allows OpenGL to directly access DirectX buffers and surfaces. A DirectX vertex buffer may be shared as an OpenGL buffer object and a - * DirectX surface may be shared as an OpenGL texture or renderbuffer object.

    - * - *

    Requires {@link GL21 OpenGL 2.1}.

    - */ -public class WGLNVDXInterop { - - /** Accepted by the {@code access} parameters of {@link #wglDXRegisterObjectNV DXRegisterObjectNV} and {@link #wglDXObjectAccessNV DXObjectAccessNV}. */ - public static final int - WGL_ACCESS_READ_ONLY_NV = 0x0, - WGL_ACCESS_READ_WRITE_NV = 0x1, - WGL_ACCESS_WRITE_DISCARD_NV = 0x2; - - protected WGLNVDXInterop() { - throw new UnsupportedOperationException(); - } - - // --- [ wglDXSetResourceShareHandleNV ] --- - - /** - * @param dxObject a pointer to the DirectX resource that will be shared - * @param shareHandle the share handle that the OS generated for the resource - */ - @NativeType("BOOL") - public static boolean wglDXSetResourceShareHandleNV(@NativeType("void *") long dxObject, @NativeType("HANDLE") long shareHandle) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXSetResourceShareHandleNV; - if (CHECKS) { - check(__functionAddress); - check(dxObject); - check(shareHandle); - } - return callPPI(dxObject, shareHandle, __functionAddress) != 0; - } - - // --- [ wglDXOpenDeviceNV ] --- - - /** - * Prepares a DirectX device for interoperability and returns a handle to a GL/DirectX interop device. - * - * @param dxDevice a pointer to a supported Direct3D device object - */ - @NativeType("HANDLE") - public static long wglDXOpenDeviceNV(@NativeType("void *") long dxDevice) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXOpenDeviceNV; - if (CHECKS) { - check(__functionAddress); - check(dxDevice); - } - return callPP(dxDevice, __functionAddress); - } - - // --- [ wglDXCloseDeviceNV ] --- - - @NativeType("BOOL") - public static boolean wglDXCloseDeviceNV(@NativeType("HANDLE") long device) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXCloseDeviceNV; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return callPI(device, __functionAddress) != 0; - } - - // --- [ wglDXRegisterObjectNV ] --- - - /** - * Prepares a DirectX object for use by the GL and returns a handle to a GL/DirectX interop object. - * - * @param device a GL/DirectX interop device handle, as returned by {@link #wglDXOpenDeviceNV DXOpenDeviceNV} - * @param dxResource a pointer to a DirectX resource to be registered with the GL - * @param name the GL object name to be assigned to the DirectX resource in the namespace of the objects identified by {@code type} in the current GL context - * @param type the GL object type that will map to the DirectX resource being shared - * @param access indicates the intended usage of the resource in GL. One of:
    {@link #WGL_ACCESS_READ_ONLY_NV ACCESS_READ_ONLY_NV}{@link #WGL_ACCESS_READ_WRITE_NV ACCESS_READ_WRITE_NV}{@link #WGL_ACCESS_WRITE_DISCARD_NV ACCESS_WRITE_DISCARD_NV}
    - */ - @NativeType("HANDLE") - public static long wglDXRegisterObjectNV(@NativeType("HANDLE") long device, @NativeType("void *") long dxResource, @NativeType("GLuint") int name, @NativeType("GLenum") int type, @NativeType("GLenum") int access) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXRegisterObjectNV; - if (CHECKS) { - check(__functionAddress); - check(device); - check(dxResource); - } - return callPPP(device, dxResource, name, type, access, __functionAddress); - } - - // --- [ wglDXUnregisterObjectNV ] --- - - @NativeType("BOOL") - public static boolean wglDXUnregisterObjectNV(@NativeType("HANDLE") long device, @NativeType("HANDLE") long object) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXUnregisterObjectNV; - if (CHECKS) { - check(__functionAddress); - check(device); - check(object); - } - return callPPI(device, object, __functionAddress) != 0; - } - - // --- [ wglDXObjectAccessNV ] --- - - /** - * Modifies the access mode of an interop object, if a different access mode is required after the object has been registered. - * - * @param object the GL/DirectX interop object - * @param access the new access mode. One of:
    {@link #WGL_ACCESS_READ_ONLY_NV ACCESS_READ_ONLY_NV}{@link #WGL_ACCESS_READ_WRITE_NV ACCESS_READ_WRITE_NV}{@link #WGL_ACCESS_WRITE_DISCARD_NV ACCESS_WRITE_DISCARD_NV}
    - */ - @NativeType("BOOL") - public static boolean wglDXObjectAccessNV(@NativeType("HANDLE") long object, @NativeType("GLenum") int access) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXObjectAccessNV; - if (CHECKS) { - check(__functionAddress); - check(object); - } - return callPI(object, access, __functionAddress) != 0; - } - - // --- [ wglDXLockObjectsNV ] --- - - /** - * Unsafe version of: {@link #wglDXLockObjectsNV DXLockObjectsNV} - * - * @param count the number of objects to lock - */ - public static int nwglDXLockObjectsNV(long device, int count, long objects) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXLockObjectsNV; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return callPPI(device, count, objects, __functionAddress); - } - - /** - * Before a GL object which is associated with a DirectX resource may be used, it must be locked with this function. - * - *

    A return value of TRUE indicates that all objects were successfully locked. A return value of FALSE indicates an error. If the function returns FALSE, - * none of the objects will be locked.

    - * - *

    Attempting to access an interop object via GL when the object is not locked, or attempting to access the DirectX resource through the DirectX API when - * it is locked by GL, will result in undefined behavior and may result in data corruption or program termination. Likewise, passing invalid interop device - * or object handles to this function has undefined results, including program termination.

    - * - * @param device the GL/DirectX interop device handle - * @param objects an array of {@code count} interop objects - */ - @NativeType("BOOL") - public static boolean wglDXLockObjectsNV(@NativeType("HANDLE") long device, @NativeType("HANDLE *") PointerBuffer objects) { - return nwglDXLockObjectsNV(device, objects.remaining(), memAddress(objects)) != 0; - } - - // --- [ wglDXUnlockObjectsNV ] --- - - /** - * Unsafe version of: {@link #wglDXUnlockObjectsNV DXUnlockObjectsNV} - * - * @param count the number of objects to unlock - */ - public static int nwglDXUnlockObjectsNV(long device, int count, long objects) { - long __functionAddress = GL.getCapabilitiesWGL().wglDXUnlockObjectsNV; - if (CHECKS) { - check(__functionAddress); - check(device); - } - return callPPI(device, count, objects, __functionAddress); - } - - /** - * Return control of an object to DirectX. - * - * @param device the GL/DirectX interop device handle - * @param objects an array of {@code count} interop objects - */ - @NativeType("BOOL") - public static boolean wglDXUnlockObjectsNV(@NativeType("HANDLE") long device, @NativeType("HANDLE *") PointerBuffer objects) { - return nwglDXUnlockObjectsNV(device, objects.remaining(), memAddress(objects)) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVDelayBeforeSwap.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVDelayBeforeSwap.java deleted file mode 100644 index 41247f22..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVDelayBeforeSwap.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -import org.lwjgl.system.windows.WinBase; - -/** - * Native bindings to the WGL_NV_delay_before_swap extension. - * - *

    For most interactive applications, the standard rendering loop responding to input events on a frame granularity is sufficient. Some more demanding - * applications may want to exchange performance for the ability to sample input closer to the final frame swap and adjust rendering accordingly. This - * extension adds functionality to allow the application to wait until a specified time before a swapbuffers command would be able to execute.

    - * - *

    Requires {@link GL21 OpenGL 2.1}.

    - */ -public class WGLNVDelayBeforeSwap { - - protected WGLNVDelayBeforeSwap() { - throw new UnsupportedOperationException(); - } - - // --- [ wglDelayBeforeSwapNV ] --- - - /** - * Blocks the CPU until {@code seconds} seconds before a synchronized swap would occur on the window associated with {@code hDC}. It also returns a boolean - * value equal to {@link WinBase#TRUE} when the implementation had to wait for the synchronized swap and {@link WinBase#FALSE} otherwise. - * - *

    The parameter {@code hDC} must be a valid device context associated with a graphic adapter. If {@code hDC} is not valid, {@link WinBase#GetLastError} will - * return WGL_INVALID_HDC, {@code DelayBeforeSwapNV} will return FALSE and will not wait for the swap. If {@code hDC} is not associated with a graphic - * adapter, {@code GetLastError} will return ERROR_DC_NOT_FOUND, {@code DelayBeforeSwapNV} will return FALSE and will not wait for the swap.

    - * - *

    The parameter {@code seconds} accepts positive floating point values not larger than the length in seconds of the swap period on the associated window. - * When buffer swaps are synchronized, the swap period is composed of one or multiple video frame periods. A video frame period is the time required by the - * monitor to display a full frame of video data. A swap interval set to a value of 2 means that the color buffers will be swapped at most every other - * video frame. If {@code seconds} is smaller than 0, {@code GetLastError} will return ERROR_INVALID_DATA, {@code DelayBeforeSwapNV} will return FALSE and - * will not wait for the end of the swap period. If {@code seconds} is greater than a swap period, {@code DelayBeforeSwapNV} will return immediately - * without generating any error and the return value will be FALSE.

    - * - *

    The application should use a {@code seconds} delay large enough to have time to complete its work before the end of the swap period. If {@code seconds} - * is close to 0.0, the application may miss the end of the swap period and it will have to wait an additional swap period before it can swap.

    - * - *

    If {@code DelayBeforeSwapNV} detects that there is less than {@code seconds} seconds before the end of the swap period, it will return immediately and - * the return value will be FALSE. The implementation will not wait an additional video frame period to have an exact delay of {@code seconds} seconds.

    - * - *

    If buffer swaps are unsynchronized, {@code DelayBeforeSwapNV} will return immediately and the return value will be FALSE. It could happen for multiple - * reasons, for example if the swap interval is equal to 0, if the window is in a mode switch or if no monitors are active.

    - * - * @param hDC a handle to the DC - * @param seconds the delay, in seconds - */ - @NativeType("BOOL") - public static boolean wglDelayBeforeSwapNV(@NativeType("HDC") long hDC, @NativeType("GLfloat") float seconds) { - long __functionAddress = GL.getCapabilitiesWGL().wglDelayBeforeSwapNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - } - return callPI(hDC, seconds, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVFloatBuffer.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVFloatBuffer.java deleted file mode 100644 index ecea6ba4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVFloatBuffer.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_NV_float_buffer extension. - * - *

    WGL functionality for {@link NVFloatBuffer NV_float_buffer}.

    - */ -public final class WGLNVFloatBuffer { - - /** - * Accepted in the {@code piAttributes} array of wglGetPixelFormatAttribivARB and wglGetPixelFormatAttribfvARB and in the {@code piAttribIList} and - * {@code pfAttribFList} arrays of wglChoosePixelFormatARB. - */ - public static final int - WGL_FLOAT_COMPONENTS_NV = 0x20B0, - WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = 0x20B1, - WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = 0x20B2, - WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = 0x20B3, - WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = 0x20B4; - - /** - * Accepted in the {@code piAttribIList} array of wglCreatePbufferARB and returned in the {@code value} parameter of wglQueryPbufferARB when - * {@code iAttribute} is TEXTURE_FORMAT_ARB. - */ - public static final int - WGL_TEXTURE_FLOAT_R_NV = 0x20B5, - WGL_TEXTURE_FLOAT_RG_NV = 0x20B6, - WGL_TEXTURE_FLOAT_RGB_NV = 0x20B7, - WGL_TEXTURE_FLOAT_RGBA_NV = 0x20B8; - - private WGLNVFloatBuffer() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVGPUAffinity.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVGPUAffinity.java deleted file mode 100644 index 72d35872..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVGPUAffinity.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_NV_gpu_affinity extension. - * - *

    On systems with more than one GPU it is desirable to be able to select which GPU(s) in the system become the target for OpenGL rendering commands. This - * extension introduces the concept of a GPU affinity mask. OpenGL rendering commands are directed to the GPU(s) specified by the affinity mask. GPU - * affinity is immutable. Once set, it cannot be changed.

    - * - *

    This extension also introduces the concept called affinity-DC. An affinity-DC is a device context with a GPU affinity mask embedded in it. This - * restricts the device context to only allow OpenGL commands to be sent to the GPU(s) in the affinity mask.

    - * - *

    Requires {@link WGLARBExtensionsString WGL_ARB_extensions_string}.

    - */ -public class WGLNVGPUAffinity { - - /** New error code set by wglShareLists, wglMakeCurrent and {@link WGLARBMakeCurrentRead#wglMakeContextCurrentARB MakeContextCurrentARB}. */ - public static final int ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV = 0x20D0; - - /** New error code set by {@link WGL#wglMakeCurrent MakeCurrent} and {@link WGLARBMakeCurrentRead#wglMakeContextCurrentARB MakeContextCurrentARB}. */ - public static final int ERROR_MISSING_AFFINITY_MASK_NV = 0x20D1; - - protected WGLNVGPUAffinity() { - throw new UnsupportedOperationException(); - } - - // --- [ wglEnumGpusNV ] --- - - /** Unsafe version of: {@link #wglEnumGpusNV EnumGpusNV} */ - public static int nwglEnumGpusNV(int gpuIndex, long gpu) { - long __functionAddress = GL.getCapabilitiesWGL().wglEnumGpusNV; - if (CHECKS) { - check(__functionAddress); - } - return callPI(gpuIndex, gpu, __functionAddress); - } - - /** - * Returns the handles for all GPUs in a system. - * - *

    By looping over {@code wglEnumGpusNV} and incrementing {@code gpuIndex}, starting at index 0, all GPU handles can be queried. If the function succeeds, - * the return value is TRUE. If the function fails, the return value is FALSE and {@code gpu} will be unmodified. The function fails if {@code gpuIndex} is - * greater or equal than the number of GPUs supported by the system.

    - * - * @param gpuIndex an index value that specifies a GPU - * @param gpu returns a handle for GPU number {@code gpuIndex}. The first GPU will be index 0. - */ - @NativeType("BOOL") - public static boolean wglEnumGpusNV(@NativeType("UINT") int gpuIndex, @NativeType("HGPUNV *") PointerBuffer gpu) { - if (CHECKS) { - check(gpu, 1); - } - return nwglEnumGpusNV(gpuIndex, memAddress(gpu)) != 0; - } - - // --- [ wglEnumGpuDevicesNV ] --- - - /** Unsafe version of: {@link #wglEnumGpuDevicesNV EnumGpuDevicesNV} */ - public static int nwglEnumGpuDevicesNV(long gpu, int deviceIndex, long gpuDevice) { - long __functionAddress = GL.getCapabilitiesWGL().wglEnumGpuDevicesNV; - if (CHECKS) { - check(__functionAddress); - check(gpu); - } - return callPPI(gpu, deviceIndex, gpuDevice, __functionAddress); - } - - /** - * Retrieve information about the display devices supported by a GPU. - * - * @param gpu a handle to the GPU to query - * @param deviceIndex an index value that specifies a display device, supported by {@code gpu}, to query. The first display device will be index 0. - * @param gpuDevice a {@link GPU_DEVICE} structure which will receive information about the display device at index {@code deviceIndex}. - */ - @NativeType("BOOL") - public static boolean wglEnumGpuDevicesNV(@NativeType("HGPUNV") long gpu, @NativeType("UINT") int deviceIndex, @NativeType("PGPU_DEVICE") GPU_DEVICE gpuDevice) { - return nwglEnumGpuDevicesNV(gpu, deviceIndex, gpuDevice.address()) != 0; - } - - // --- [ wglCreateAffinityDCNV ] --- - - /** Unsafe version of: {@link #wglCreateAffinityDCNV CreateAffinityDCNV} */ - public static long nwglCreateAffinityDCNV(long gpuList) { - long __functionAddress = GL.getCapabilitiesWGL().wglCreateAffinityDCNV; - if (CHECKS) { - check(__functionAddress); - } - return callPP(gpuList, __functionAddress); - } - - /** - * Creates an affinity-DC. Affinity-DCs, a new type of DC, can be used to direct OpenGL commands to a specific GPU or set of GPUs. An affinity-DC is a - * device context with a GPU affinity mask embedded in it. This restricts the device context to only allow OpenGL commands to be sent to the GPU(s) in the - * affinity mask. An affinity-DC can be created directly, using the new function {@code wglCreateAffinityDCNV} and also indirectly by calling - * {@link WGLARBPbuffer#wglCreatePbufferARB CreatePbufferARB} followed by {@link WGLARBPbuffer#wglGetPbufferDCARB GetPbufferDCARB}. - * - *

    If successful, the function returns an affinity-DC handle. If it fails, {@code NULL} will be returned.

    - * - * @param gpuList a {@code NULL}-terminated array of GPU handles to which the affinity-DC will be restricted - */ - @NativeType("HDC") - public static long wglCreateAffinityDCNV(@NativeType("HGPUNV const *") PointerBuffer gpuList) { - if (CHECKS) { - checkNT(gpuList); - } - return nwglCreateAffinityDCNV(memAddress(gpuList)); - } - - // --- [ wglEnumGpusFromAffinityDCNV ] --- - - /** Unsafe version of: {@link #wglEnumGpusFromAffinityDCNV EnumGpusFromAffinityDCNV} */ - public static int nwglEnumGpusFromAffinityDCNV(long affinityDC, int gpuIndex, long gpu) { - long __functionAddress = GL.getCapabilitiesWGL().wglEnumGpusFromAffinityDCNV; - if (CHECKS) { - check(__functionAddress); - check(affinityDC); - } - return callPPI(affinityDC, gpuIndex, gpu, __functionAddress); - } - - /** - * Retrieves a list of GPU handles that make up the affinity-mask of an affinity-DC. - * - *

    By looping over {@code wglEnumGpusFromAffinityDCNV} and incrementing {@code gpuIndex}, starting at index 0, all GPU handles associated with the DC can - * be queried. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE and {@code gpu} will be unmodified. The - * function fails if {@code gpuIndex} is greater or equal than the number of GPUs associated with {@code affinityDC}.

    - * - * @param affinityDC a handle of the affinity-DC to query - * @param gpuIndex an index value of the GPU handle in the affinity mask of {@code affinityDC} to query - * @param gpu returns a handle for GPU number {@code gpuIndex}. The first GPU will be at index 0. - */ - @NativeType("BOOL") - public static boolean wglEnumGpusFromAffinityDCNV(@NativeType("HDC") long affinityDC, @NativeType("UINT") int gpuIndex, @NativeType("HGPUNV *") PointerBuffer gpu) { - if (CHECKS) { - check(gpu, 1); - } - return nwglEnumGpusFromAffinityDCNV(affinityDC, gpuIndex, memAddress(gpu)) != 0; - } - - // --- [ wglDeleteDCNV ] --- - - /** - * Deletes an affinity-DC. - * - * @param hdc a handle of an affinity-DC to delete - */ - @NativeType("BOOL") - public static boolean wglDeleteDCNV(@NativeType("HDC") long hdc) { - long __functionAddress = GL.getCapabilitiesWGL().wglDeleteDCNV; - if (CHECKS) { - check(__functionAddress); - check(hdc); - } - return callPI(hdc, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVMultigpuContext.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVMultigpuContext.java deleted file mode 100644 index 0aa2cd01..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVMultigpuContext.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_NV_multigpu_context extension. - * - *

    This extension allows the creation of an OpenGL context in a multi-GPU environment with a specified multi-GPU strategy (known as SLI mode) which takes - * precedence over process-wide multi-GPU mode settings.

    - * - *

    The multi-GPU mode denotes vendor specific techniques to allow distributed rendering on multiple GPUs, further called AFR (alternate frame rendering) - * and Multicast (as defined in NV_gpu_multicast).

    - * - *

    OpenGL supports multiple contexts. The semantics of switching contexts is generally left to window system binding APIs such as WGL, GLX and EGL. The - * extension {@code WGL_NV_multigpu_context} allows to specify a preferred multi-GPU rendering mode per context, thus context switching can also switch - * the current multi-GPU rendering mode.

    - * - *

    The implementation is platform dependent and the actual multi-GPU rendering mode of the created context may vary on different hardware and operation - * system platforms.

    - * - *

    Requires {@link WGLARBCreateContext WGL_ARB_create_context}.

    - */ -public final class WGLNVMultigpuContext { - - /** Accepted as an attribute name in the {@code *attrib_list} argument to {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. */ - public static final int WGL_CONTEXT_MULTIGPU_ATTRIB_NV = 0x20AA; - - /** - * Accepted as an attribute value for {@link #WGL_CONTEXT_MULTIGPU_ATTRIB_NV CONTEXT_MULTIGPU_ATTRIB_NV} in the {@code *attrib_list} argument to - * {@link WGLARBCreateContext#wglCreateContextAttribsARB CreateContextAttribsARB}. - */ - public static final int - WGL_CONTEXT_MULTIGPU_ATTRIB_SINGLE_NV = 0x20AB, - WGL_CONTEXT_MULTIGPU_ATTRIB_AFR_NV = 0x20AC, - WGL_CONTEXT_MULTIGPU_ATTRIB_MULTICAST_NV = 0x20AD, - WGL_CONTEXT_MULTIGPU_ATTRIB_MULTI_DISPLAY_MULTICAST_NV = 0x20AE; - - private WGLNVMultigpuContext() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVMultisampleCoverage.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVMultisampleCoverage.java deleted file mode 100644 index 1ab131d0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVMultisampleCoverage.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_NV_multisample_coverage extension. - * - *

    WGL functionality for {@link NVMultisampleCoverage NV_multisample_coverage}.

    - */ -public final class WGLNVMultisampleCoverage { - - /** - * Accepted by the {@code piAttributes} parameter of wglGetPixelFormatAttribivEXT, wglGetPixelFormatAttribfvEXT, and the - * {@code piAttribIList} and {@code pfAttribIList} of wglChoosePixelFormatEXT. - */ - public static final int - WGL_COVERAGE_SAMPLES_NV = 0x2042, - WGL_COLOR_SAMPLES_NV = 0x20B9; - - private WGLNVMultisampleCoverage() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVRenderDepthTexture.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVRenderDepthTexture.java deleted file mode 100644 index 76c35872..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVRenderDepthTexture.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_NV_render_depth_texture extension. - * - *

    This extension allows a depth buffer to be used for both rendering and texturing. It is built upon the ARB_render_texture extension; the only addition - * in this extension is the ability to use a depth buffer as a DEPTH_COMPONENT texture map.

    - */ -public final class WGLNVRenderDepthTexture { - - /** - * Accepted by the {@code piAttributes} parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the {@code piAttribIList} and - * {@code pfAttribIList} parameters of wglChoosePixelFormatARB. - */ - public static final int - WGL_BIND_TO_TEXTURE_DEPTH_NV = 0x20A3, - WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = 0x20A4; - - /** Accepted by the {@code piAttribList} parameter of wglCreatePbufferARB and by the {@code iAttribute} parameter of wglQueryPbufferARB. */ - public static final int WGL_DEPTH_TEXTURE_FORMAT_NV = 0x20A5; - - /** - * Accepted as a value in the {@code piAttribList} parameter of wglCreatePbufferARB and returned in the value parameter of wglQueryPbufferARB when - * {@code iAttribute} is WGL_DEPTH_TEXTURE_FORMAT_NV. - */ - public static final int - WGL_TEXTURE_DEPTH_COMPONENT_NV = 0x20A6, - WGL_NO_TEXTURE_ARB = 0x2077; - - /** Accepted by the {@code iBuffer} parameter of wglBindTexImageARB. */ - public static final int WGL_DEPTH_COMPONENT_NV = 0x20A7; - - private WGLNVRenderDepthTexture() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVRenderTextureRectangle.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVRenderTextureRectangle.java deleted file mode 100644 index 63bdc4bc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVRenderTextureRectangle.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the WGL_NV_render_texture_rectangle extension. - * - *

    This extension allows a color buffer with non-power-of-two dimensions to be used for both rendering and texturing. It is built upon the - * ARB_render_texture extension; the only addition in this extension is the ability to bind a texture to a texture rectangle target, as provided through - * the NV_texture_rectangle extension.

    - */ -public final class WGLNVRenderTextureRectangle { - - /** - * Accepted by the {@code piAttributes} parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the {@code piAttribIList} and - * {@code pfAttribIList} parameters of wglChoosePixelFormatARB. - */ - public static final int - WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = 0x20A0, - WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = 0x20A1; - - /** - * Accepted as a value in the {@code piAttribList} parameter of wglCreatePbufferARB and returned in the value parameter of wglQueryPbufferARB when - * {@code iAttribute} is WGL_TEXTURE_TARGET_ARB. - */ - public static final int WGL_TEXTURE_RECTANGLE_NV = 0x20A2; - - private WGLNVRenderTextureRectangle() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVSwapGroup.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVSwapGroup.java deleted file mode 100644 index f96b7ef6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVSwapGroup.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the WGL_NV_swap_group extension. - * - *

    This extension provides the capability to synchronize the buffer swaps of a group of OpenGL windows. A swap group is created, and windows are added as - * members to the swap group. Buffer swaps to members of the swap group will then take place concurrently.

    - * - *

    This extension also provides the capability to sychronize the buffer swaps of different swap groups, which may reside on distributed systems on a - * network. For this purpose swap groups can be bound to a swap barrier.

    - * - *

    This extension extends the set of conditions that must be met before a buffer swap can take place.

    - */ -public class WGLNVSwapGroup { - - protected WGLNVSwapGroup() { - throw new UnsupportedOperationException(); - } - - // --- [ wglJoinSwapGroupNV ] --- - - @NativeType("BOOL") - public static boolean wglJoinSwapGroupNV(@NativeType("HDC") long hDC, @NativeType("GLuint") int group) { - long __functionAddress = GL.getCapabilitiesWGL().wglJoinSwapGroupNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - } - return callPI(hDC, group, __functionAddress) != 0; - } - - // --- [ wglBindSwapBarrierNV ] --- - - @NativeType("BOOL") - public static boolean wglBindSwapBarrierNV(@NativeType("GLuint") int group, @NativeType("GLuint") int barrier) { - long __functionAddress = GL.getCapabilitiesWGL().wglBindSwapBarrierNV; - if (CHECKS) { - check(__functionAddress); - } - return callI(group, barrier, __functionAddress) != 0; - } - - // --- [ wglQuerySwapGroupNV ] --- - - public static int nwglQuerySwapGroupNV(long hDC, long group, long barrier) { - long __functionAddress = GL.getCapabilitiesWGL().wglQuerySwapGroupNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - } - return callPPPI(hDC, group, barrier, __functionAddress); - } - - @NativeType("BOOL") - public static boolean wglQuerySwapGroupNV(@NativeType("HDC") long hDC, @NativeType("GLuint *") IntBuffer group, @NativeType("GLuint *") IntBuffer barrier) { - if (CHECKS) { - check(group, 1); - check(barrier, 1); - } - return nwglQuerySwapGroupNV(hDC, memAddress(group), memAddress(barrier)) != 0; - } - - // --- [ wglQueryMaxSwapGroupsNV ] --- - - public static int nwglQueryMaxSwapGroupsNV(long hDC, long maxGroups, long maxBarriers) { - long __functionAddress = GL.getCapabilitiesWGL().wglQueryMaxSwapGroupsNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - } - return callPPPI(hDC, maxGroups, maxBarriers, __functionAddress); - } - - @NativeType("BOOL") - public static boolean wglQueryMaxSwapGroupsNV(@NativeType("HDC") long hDC, @NativeType("GLuint *") IntBuffer maxGroups, @NativeType("GLuint *") IntBuffer maxBarriers) { - if (CHECKS) { - check(maxGroups, 1); - check(maxBarriers, 1); - } - return nwglQueryMaxSwapGroupsNV(hDC, memAddress(maxGroups), memAddress(maxBarriers)) != 0; - } - - // --- [ wglQueryFrameCountNV ] --- - - public static int nwglQueryFrameCountNV(long hDC, long count) { - long __functionAddress = GL.getCapabilitiesWGL().wglQueryFrameCountNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - } - return callPPI(hDC, count, __functionAddress); - } - - @NativeType("BOOL") - public static boolean wglQueryFrameCountNV(@NativeType("HDC") long hDC, @NativeType("GLuint *") IntBuffer count) { - if (CHECKS) { - check(count, 1); - } - return nwglQueryFrameCountNV(hDC, memAddress(count)) != 0; - } - - // --- [ wglResetFrameCountNV ] --- - - @NativeType("BOOL") - public static boolean wglResetFrameCountNV(@NativeType("HDC") long hDC) { - long __functionAddress = GL.getCapabilitiesWGL().wglResetFrameCountNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - } - return callPI(hDC, __functionAddress) != 0; - } - - /** Array version of: {@link #wglQuerySwapGroupNV QuerySwapGroupNV} */ - @NativeType("BOOL") - public static boolean wglQuerySwapGroupNV(@NativeType("HDC") long hDC, @NativeType("GLuint *") int[] group, @NativeType("GLuint *") int[] barrier) { - long __functionAddress = GL.getCapabilitiesWGL().wglQuerySwapGroupNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - check(group, 1); - check(barrier, 1); - } - return callPPPI(hDC, group, barrier, __functionAddress) != 0; - } - - /** Array version of: {@link #wglQueryMaxSwapGroupsNV QueryMaxSwapGroupsNV} */ - @NativeType("BOOL") - public static boolean wglQueryMaxSwapGroupsNV(@NativeType("HDC") long hDC, @NativeType("GLuint *") int[] maxGroups, @NativeType("GLuint *") int[] maxBarriers) { - long __functionAddress = GL.getCapabilitiesWGL().wglQueryMaxSwapGroupsNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - check(maxGroups, 1); - check(maxBarriers, 1); - } - return callPPPI(hDC, maxGroups, maxBarriers, __functionAddress) != 0; - } - - /** Array version of: {@link #wglQueryFrameCountNV QueryFrameCountNV} */ - @NativeType("BOOL") - public static boolean wglQueryFrameCountNV(@NativeType("HDC") long hDC, @NativeType("GLuint *") int[] count) { - long __functionAddress = GL.getCapabilitiesWGL().wglQueryFrameCountNV; - if (CHECKS) { - check(__functionAddress); - check(hDC); - check(count, 1); - } - return callPPI(hDC, count, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVVertexArrayRange.java b/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVVertexArrayRange.java deleted file mode 100644 index d799db7e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/WGLNVVertexArrayRange.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -public class WGLNVVertexArrayRange { - - protected WGLNVVertexArrayRange() { - throw new UnsupportedOperationException(); - } - - // --- [ wglAllocateMemoryNV ] --- - - public static long nwglAllocateMemoryNV(int size, float readfreq, float writefreq, float priority) { - long __functionAddress = GL.getCapabilitiesWGL().wglAllocateMemoryNV; - if (CHECKS) { - check(__functionAddress); - } - return callP(size, readfreq, writefreq, priority, __functionAddress); - } - - @Nullable - @NativeType("void *") - public static ByteBuffer wglAllocateMemoryNV(@NativeType("GLsizei") int size, @NativeType("GLfloat") float readfreq, @NativeType("GLfloat") float writefreq, @NativeType("GLfloat") float priority) { - long __result = nwglAllocateMemoryNV(size, readfreq, writefreq, priority); - return memByteBufferSafe(__result, size); - } - - // --- [ wglFreeMemoryNV ] --- - - public static void nwglFreeMemoryNV(long pointer) { - long __functionAddress = GL.getCapabilitiesWGL().wglFreeMemoryNV; - if (CHECKS) { - check(__functionAddress); - } - callPV(pointer, __functionAddress); - } - - public static void wglFreeMemoryNV(@NativeType("void *") ByteBuffer pointer) { - nwglFreeMemoryNV(memAddress(pointer)); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/opengl/_3DFXTextureCompressionFXT1.java b/LWJGL/src/main/java/org/lwjgl/opengl/_3DFXTextureCompressionFXT1.java deleted file mode 100644 index 7b2d37b9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/opengl/_3DFXTextureCompressionFXT1.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.opengl; - -/** - * Native bindings to the 3DFX_texture_compression_FXT1 extension. - * - *

    This extension additional texture compression functionality's FXT1 format, specific to 3dfxsubject to all the requirements and limitations described by - * the extension {@code GL_ARB_texture_compression}. The FXT1 texture format supports only 2D and 3D images without borders.

    - * - *

    Because 3dfx expects to make continual improvement to its FXT1 compressor implementation, 3dfx recommends that to achieve best visual quality - * applications adopt the following procedure with respect to reuse of textures compressed by the GL:

    - * - *
      - *
    1. Save the RENDERER and VERSION strings along with images compressed by the GL;
    2. - *
    3. Before reuse of the textures, compare the stored strings with strings newly returned from the current GL;
    4. - *
    5. If out-of-date, repeat the compression and storage steps.
    6. - *
    - * - *

    Requires {@link ARBTextureCompression ARB_texture_compression}.

    - */ -public final class _3DFXTextureCompressionFXT1 { - - /** - * Accepted by the {@code internalformat} parameter of TexImage2D, CopyTexImage2D, TexImage3D, CopyTexImage3D, and by the {@code internalformat} and - * {@code format} parameters of CompressedTexImage2D_ARB, CompressedTexSubImage2D_ARB, CompressedTexImage3D_ARB, CompressedTexSubImage3D_ARB. - */ - public static final int - GL_COMPRESSED_RGB_FXT1_3DFX = 0x86B0, - GL_COMPRESSED_RGBA_FXT1_3DFX = 0x86B1; - - private _3DFXTextureCompressionFXT1() {} - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/LibSTB.java b/LWJGL/src/main/java/org/lwjgl/stb/LibSTB.java deleted file mode 100644 index 2ab14a77..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/LibSTB.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Initializes the stb shared library. */ -final class LibSTB { - - static { - String libName = Platform.mapLibraryNameBundled("lwjgl_stb"); - Library.loadSystem(System::load, System::loadLibrary, LibSTB.class, "org.lwjgl.stb", libName); - - MemoryAllocator allocator = getAllocator(Configuration.DEBUG_MEMORY_ALLOCATOR_INTERNAL.get(true)); - setupMalloc( - allocator.getMalloc(), - allocator.getCalloc(), - allocator.getRealloc(), - allocator.getFree(), - allocator.getAlignedAlloc(), - allocator.getAlignedFree() - ); - } - - private LibSTB() { - } - - static void initialize() { - // intentionally empty to trigger static initializer - } - - private static native void setupMalloc( - long malloc, - long calloc, - long realloc, - long free, - long aligned_alloc, - long aligned_free - ); - -} diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBDXT.java b/LWJGL/src/main/java/org/lwjgl/stb/STBDXT.java deleted file mode 100644 index 167a1277..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBDXT.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to stb_dxt.h from the stb library. - * - *

    DXT1/DXT5 compressor.

    - */ -public class STBDXT { - - static { LibSTB.initialize(); } - - public static final int STB_DXT_NORMAL = 0x0; - - /** Use dithering. Was always dubious, now deprecated. Does nothing! */ - public static final int STB_DXT_DITHER = 0x1; - - /** High quality mode, does two refinement steps instead of 1. ~30-40% slower. */ - public static final int STB_DXT_HIGHQUAL = 0x2; - - protected STBDXT() { - throw new UnsupportedOperationException(); - } - - // --- [ stb_compress_dxt_block ] --- - - /** Unsafe version of: {@link #stb_compress_dxt_block compress_dxt_block} */ - public static native void nstb_compress_dxt_block(long dest, long src_rgba_four_bytes_per_pixel, int alpha, int mode); - - /** - * Call this function for every block (you must pad). - * - *

    The source should be a 4x4 block of RGBA data in row-major order. Alpha channel is not stored if you specify {@code alpha=0} (but you must supply some - * constant alpha in the alpha channel). You can turn on dithering and "high quality" using {@code mode}.

    - * - * @param dest a buffer in which to store the compressed block - * @param src_rgba_four_bytes_per_pixel the block to compress - * @param alpha 1 to compress the alpha channel, 0 to ignore it - * @param mode the compression mode. One of:
    {@link #STB_DXT_NORMAL DXT_NORMAL}{@link #STB_DXT_DITHER DXT_DITHER}{@link #STB_DXT_HIGHQUAL DXT_HIGHQUAL}
    - */ - public static void stb_compress_dxt_block(@NativeType("unsigned char *") ByteBuffer dest, @NativeType("unsigned char const *") ByteBuffer src_rgba_four_bytes_per_pixel, @NativeType("int") boolean alpha, int mode) { - if (CHECKS) { - check(dest, alpha ? 16 : 8); - check(src_rgba_four_bytes_per_pixel, 64); - } - nstb_compress_dxt_block(memAddress(dest), memAddress(src_rgba_four_bytes_per_pixel), alpha ? 1 : 0, mode); - } - - // --- [ stb_compress_bc4_block ] --- - - /** Unsafe version of: {@link #stb_compress_bc4_block compress_bc4_block} */ - public static native void nstb_compress_bc4_block(long dest, long src_r_one_byte_per_pixel); - - /** - * Call this function for every block (you must pad). The source should be a 4x4 block of A data in row-major order. - * - * @param dest a buffer in which to store the compressed block - * @param src_r_one_byte_per_pixel the block to compress - */ - public static void stb_compress_bc4_block(@NativeType("unsigned char *") ByteBuffer dest, @NativeType("unsigned char const *") ByteBuffer src_r_one_byte_per_pixel) { - if (CHECKS) { - check(dest, 8); - check(src_r_one_byte_per_pixel, 16); - } - nstb_compress_bc4_block(memAddress(dest), memAddress(src_r_one_byte_per_pixel)); - } - - // --- [ stb_compress_bc5_block ] --- - - /** Unsafe version of: {@link #stb_compress_bc5_block compress_bc5_block} */ - public static native void nstb_compress_bc5_block(long dest, long src_rg_two_byte_per_pixel); - - /** - * Call this function for every block (you must pad). The source should be a 4x4 block of RG data in row-major order. - * - * @param dest a buffer in which to store the compressed block - * @param src_rg_two_byte_per_pixel the block to compress - */ - public static void stb_compress_bc5_block(@NativeType("unsigned char *") ByteBuffer dest, @NativeType("unsigned char const *") ByteBuffer src_rg_two_byte_per_pixel) { - if (CHECKS) { - check(dest, 16); - check(src_rg_two_byte_per_pixel, 32); - } - nstb_compress_bc5_block(memAddress(dest), memAddress(src_rg_two_byte_per_pixel)); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBEasyFont.java b/LWJGL/src/main/java/org/lwjgl/stb/STBEasyFont.java deleted file mode 100644 index c0c4e240..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBEasyFont.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to stb_easy_font.h from the stb library. - * - *

    Bitmap font for use in 3D APIs:

    - * - *
      - *
    • Easy-to-deploy
    • - *
    • reasonably compact
    • - *
    • extremely inefficient performance-wise
    • - *
    • crappy-looking
    • - *
    • ASCII-only
    • - *
    - * - *

    Intended for when you just want to get some text displaying in a 3D app as quickly as possible.

    - * - *

    Doesn't use any textures, instead builds characters out of quads.

    - * - *

    SAMPLE CODE

    - * - *

    Here's sample code for old OpenGL; it's a lot more complicated to make work on modern APIs, and that's your problem.

    - * - *
    
    - * void print_string(float x, float y, char *text, float r, float g, float b)
    - * {
    - *     static char buffer[99999]; // ~500 chars
    - *     int num_quads;
    - * 
    - *     num_quads = stb_easy_font_print(x, y, text, NULL, buffer, sizeof(buffer));
    - * 
    - *     glColor3f(r,g,b);
    - *     glEnableClientState(GL_VERTEX_ARRAY);
    - *     glVertexPointer(2, GL_FLOAT, 16, buffer);
    - *     glDrawArrays(GL_QUADS, 0, num_quads*4);
    - *     glDisableClientState(GL_VERTEX_ARRAY);
    - * }
    - */ -public class STBEasyFont { - - static { LibSTB.initialize(); } - - protected STBEasyFont() { - throw new UnsupportedOperationException(); - } - - // --- [ stb_easy_font_width ] --- - - /** Unsafe version of: {@link #stb_easy_font_width easy_font_width} */ - public static native int nstb_easy_font_width(long text); - - /** - * Takes a string and returns the horizontal size. - * - * @param text an ASCII string - * - * @return the horizontal size, in pixels - */ - public static int stb_easy_font_width(@NativeType("char *") ByteBuffer text) { - if (CHECKS) { - checkNT1(text); - } - return nstb_easy_font_width(memAddress(text)); - } - - /** - * Takes a string and returns the horizontal size. - * - * @param text an ASCII string - * - * @return the horizontal size, in pixels - */ - public static int stb_easy_font_width(@NativeType("char *") CharSequence text) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(text, true); - long textEncoded = stack.getPointerAddress(); - return nstb_easy_font_width(textEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stb_easy_font_height ] --- - - /** Unsafe version of: {@link #stb_easy_font_height easy_font_height} */ - public static native int nstb_easy_font_height(long text); - - /** - * Takes a string and returns the vertical size (which can vary if {@code text} has newlines). - * - * @param text an ASCII string - * - * @return the vertical size, in pixels - */ - public static int stb_easy_font_height(@NativeType("char *") ByteBuffer text) { - if (CHECKS) { - checkNT1(text); - } - return nstb_easy_font_height(memAddress(text)); - } - - /** - * Takes a string and returns the vertical size (which can vary if {@code text} has newlines). - * - * @param text an ASCII string - * - * @return the vertical size, in pixels - */ - public static int stb_easy_font_height(@NativeType("char *") CharSequence text) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(text, true); - long textEncoded = stack.getPointerAddress(); - return nstb_easy_font_height(textEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stb_easy_font_print ] --- - - /** - * Unsafe version of: {@link #stb_easy_font_print easy_font_print} - * - * @param vbuf_size the {@code vertex_buffer} size, in bytes - */ - public static native int nstb_easy_font_print(float x, float y, long text, long color, long vertex_buffer, int vbuf_size); - - /** - * Takes a string (which can contain '\n') and fills out a vertex buffer with renderable data to draw the string. Output data assumes increasing x is - * rightwards, increasing y is downwards. - * - *

    The vertex data is divided into quads, i.e. there are four vertices in the vertex buffer for each quad.

    - * - *

    The vertices are stored in an interleaved format:

    - * - *
    
    -     * x:float
    -     * y:float
    -     * z:float
    -     * color:uint8[4]
    - * - *

    You can ignore z and color if you get them from elsewhere. This format was chosen in the hopes it would make it easier for you to reuse existing - * buffer-drawing code.

    - * - *

    If you pass in {@code NULL} for color, it becomes {@code 255,255,255,255}.

    - * - *

    If the buffer isn't large enough, it will truncate. Expect it to use an average of ~270 bytes per character.

    - * - *

    If your API doesn't draw quads, build a reusable index list that allows you to render quads as indexed triangles.

    - * - * @param x the x offset - * @param y the y offset - * @param text an ASCII string - * @param color the text color, in RGBA (4 bytes) - * @param vertex_buffer a pointer to memory in which to store the vertex data - * - * @return the number of quads - */ - public static int stb_easy_font_print(float x, float y, @NativeType("char *") ByteBuffer text, @Nullable @NativeType("unsigned char *") ByteBuffer color, @NativeType("void *") ByteBuffer vertex_buffer) { - if (CHECKS) { - checkNT1(text); - checkSafe(color, 4); - } - return nstb_easy_font_print(x, y, memAddress(text), memAddressSafe(color), memAddress(vertex_buffer), vertex_buffer.remaining()); - } - - /** - * Takes a string (which can contain '\n') and fills out a vertex buffer with renderable data to draw the string. Output data assumes increasing x is - * rightwards, increasing y is downwards. - * - *

    The vertex data is divided into quads, i.e. there are four vertices in the vertex buffer for each quad.

    - * - *

    The vertices are stored in an interleaved format:

    - * - *
    
    -     * x:float
    -     * y:float
    -     * z:float
    -     * color:uint8[4]
    - * - *

    You can ignore z and color if you get them from elsewhere. This format was chosen in the hopes it would make it easier for you to reuse existing - * buffer-drawing code.

    - * - *

    If you pass in {@code NULL} for color, it becomes {@code 255,255,255,255}.

    - * - *

    If the buffer isn't large enough, it will truncate. Expect it to use an average of ~270 bytes per character.

    - * - *

    If your API doesn't draw quads, build a reusable index list that allows you to render quads as indexed triangles.

    - * - * @param x the x offset - * @param y the y offset - * @param text an ASCII string - * @param color the text color, in RGBA (4 bytes) - * @param vertex_buffer a pointer to memory in which to store the vertex data - * - * @return the number of quads - */ - public static int stb_easy_font_print(float x, float y, @NativeType("char *") CharSequence text, @Nullable @NativeType("unsigned char *") ByteBuffer color, @NativeType("void *") ByteBuffer vertex_buffer) { - if (CHECKS) { - checkSafe(color, 4); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(text, true); - long textEncoded = stack.getPointerAddress(); - return nstb_easy_font_print(x, y, textEncoded, memAddressSafe(color), memAddress(vertex_buffer), vertex_buffer.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stb_easy_font_spacing ] --- - - /** - * Use positive values to expand the space between characters, and small negative values (no smaller than {@code -1.5}) to contract the space between characters. - * - *

    E.g. {@code spacing = 1} adds one "pixel" of spacing between the characters. {@code spacing = -1} is reasonable but feels a bit too compact to me; - * {@code -0.5} is a reasonable compromise as long as you're scaling the font up.

    - * - * @param spacing the font spacing - */ - public static native void stb_easy_font_spacing(float spacing); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIEOFCallback.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIEOFCallback.java deleted file mode 100644 index d5fd61f1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIEOFCallback.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@code eof} field of the {@link STBIIOCallbacks} struct. - * - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     void *user
    - * )
    - */ -public abstract class STBIEOFCallback extends Callback implements STBIEOFCallbackI { - - /** - * Creates a {@code STBIEOFCallback} instance from the specified function pointer. - * - * @return the new {@code STBIEOFCallback} - */ - public static STBIEOFCallback create(long functionPointer) { - STBIEOFCallbackI instance = Callback.get(functionPointer); - return instance instanceof STBIEOFCallback - ? (STBIEOFCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static STBIEOFCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code STBIEOFCallback} instance that delegates to the specified {@code STBIEOFCallbackI} instance. */ - public static STBIEOFCallback create(STBIEOFCallbackI instance) { - return instance instanceof STBIEOFCallback - ? (STBIEOFCallback)instance - : new Container(instance.address(), instance); - } - - protected STBIEOFCallback() { - super(CIF); - } - - STBIEOFCallback(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends STBIEOFCallback { - - private final STBIEOFCallbackI delegate; - - Container(long functionPointer, STBIEOFCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long user) { - return delegate.invoke(user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIEOFCallbackI.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIEOFCallbackI.java deleted file mode 100644 index 3092afeb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIEOFCallbackI.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@code eof} field of the {@link STBIIOCallbacks} struct. - * - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("int (*) (void *)") -public interface STBIEOFCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)) - ); - apiClosureRet(ret, __result); - } - - /** - * The {@code stbi_io_callbacks.eof} callback. - * - * @param user a pointer to user data - * - * @return nonzero if we are at the end of file/data - */ - int invoke(@NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIIOCallbacks.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIIOCallbacks.java deleted file mode 100644 index 2c228beb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIIOCallbacks.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Image IO callbacks, used by {@link STBImage#stbi_load_from_callbacks load_from_callbacks}. - * - *

    Layout

    - * - *
    
    - * struct stbi_io_callbacks {
    - *     int (*{@link STBIReadCallbackI read}) (void *user, char *data, int size);
    - *     void (*{@link STBISkipCallbackI skip}) (void *user, int n);
    - *     int (*{@link STBIEOFCallbackI eof}) (void *user);
    - * }
    - */ -@NativeType("struct stbi_io_callbacks") -public class STBIIOCallbacks extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - READ, - SKIP, - EOF; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - READ = layout.offsetof(0); - SKIP = layout.offsetof(1); - EOF = layout.offsetof(2); - } - - protected STBIIOCallbacks(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBIIOCallbacks create(long address, @Nullable ByteBuffer container) { - return new STBIIOCallbacks(address, container); - } - - /** - * Creates a {@code STBIIOCallbacks} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBIIOCallbacks(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** fill {@code data} with {@code size} bytes. Return number of bytes actually read. */ - @NativeType("int (*) (void *, char *, int)") - public STBIReadCallback read() { return nread(address()); } - /** skip the next {@code n} bytes, or {@code unget} the last -n bytes if negative */ - @NativeType("void (*) (void *, int)") - public STBISkipCallback skip() { return nskip(address()); } - /** returns nonzero if we are at end of file/data */ - @NativeType("int (*) (void *)") - public STBIEOFCallback eof() { return neof(address()); } - - /** Sets the specified value to the {@link #read} field. */ - public STBIIOCallbacks read(@NativeType("int (*) (void *, char *, int)") STBIReadCallbackI value) { nread(address(), value); return this; } - /** Sets the specified value to the {@link #skip} field. */ - public STBIIOCallbacks skip(@NativeType("void (*) (void *, int)") STBISkipCallbackI value) { nskip(address(), value); return this; } - /** Sets the specified value to the {@link #eof} field. */ - public STBIIOCallbacks eof(@NativeType("int (*) (void *)") STBIEOFCallbackI value) { neof(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public STBIIOCallbacks set( - STBIReadCallbackI read, - STBISkipCallbackI skip, - STBIEOFCallbackI eof - ) { - read(read); - skip(skip); - eof(eof); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public STBIIOCallbacks set(STBIIOCallbacks src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code STBIIOCallbacks} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBIIOCallbacks malloc() { - return new STBIIOCallbacks(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBIIOCallbacks} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBIIOCallbacks calloc() { - return new STBIIOCallbacks(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBIIOCallbacks} instance allocated with {@link BufferUtils}. */ - public static STBIIOCallbacks create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBIIOCallbacks(memAddress(container), container); - } - - /** Returns a new {@code STBIIOCallbacks} instance for the specified memory address. */ - public static STBIIOCallbacks create(long address) { - return new STBIIOCallbacks(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBIIOCallbacks createSafe(long address) { - return address == NULL ? null : new STBIIOCallbacks(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBIIOCallbacks mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBIIOCallbacks callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBIIOCallbacks mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBIIOCallbacks callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBIIOCallbacks} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBIIOCallbacks malloc(MemoryStack stack) { - return new STBIIOCallbacks(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBIIOCallbacks} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBIIOCallbacks calloc(MemoryStack stack) { - return new STBIIOCallbacks(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #read}. */ - public static STBIReadCallback nread(long struct) { return STBIReadCallback.create(memGetAddress(struct + STBIIOCallbacks.READ)); } - /** Unsafe version of {@link #skip}. */ - public static STBISkipCallback nskip(long struct) { return STBISkipCallback.create(memGetAddress(struct + STBIIOCallbacks.SKIP)); } - /** Unsafe version of {@link #eof}. */ - public static STBIEOFCallback neof(long struct) { return STBIEOFCallback.create(memGetAddress(struct + STBIIOCallbacks.EOF)); } - - /** Unsafe version of {@link #read(STBIReadCallbackI) read}. */ - public static void nread(long struct, STBIReadCallbackI value) { memPutAddress(struct + STBIIOCallbacks.READ, value.address()); } - /** Unsafe version of {@link #skip(STBISkipCallbackI) skip}. */ - public static void nskip(long struct, STBISkipCallbackI value) { memPutAddress(struct + STBIIOCallbacks.SKIP, value.address()); } - /** Unsafe version of {@link #eof(STBIEOFCallbackI) eof}. */ - public static void neof(long struct, STBIEOFCallbackI value) { memPutAddress(struct + STBIIOCallbacks.EOF, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + STBIIOCallbacks.READ)); - check(memGetAddress(struct + STBIIOCallbacks.SKIP)); - check(memGetAddress(struct + STBIIOCallbacks.EOF)); - } - - // ----------------------------------- - - /** An array of {@link STBIIOCallbacks} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBIIOCallbacks ELEMENT_FACTORY = STBIIOCallbacks.create(-1L); - - /** - * Creates a new {@code STBIIOCallbacks.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBIIOCallbacks#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBIIOCallbacks getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link STBIIOCallbacks#read} field. */ - @NativeType("int (*) (void *, char *, int)") - public STBIReadCallback read() { return STBIIOCallbacks.nread(address()); } - /** @return the value of the {@link STBIIOCallbacks#skip} field. */ - @NativeType("void (*) (void *, int)") - public STBISkipCallback skip() { return STBIIOCallbacks.nskip(address()); } - /** @return the value of the {@link STBIIOCallbacks#eof} field. */ - @NativeType("int (*) (void *)") - public STBIEOFCallback eof() { return STBIIOCallbacks.neof(address()); } - - /** Sets the specified value to the {@link STBIIOCallbacks#read} field. */ - public Buffer read(@NativeType("int (*) (void *, char *, int)") STBIReadCallbackI value) { STBIIOCallbacks.nread(address(), value); return this; } - /** Sets the specified value to the {@link STBIIOCallbacks#skip} field. */ - public Buffer skip(@NativeType("void (*) (void *, int)") STBISkipCallbackI value) { STBIIOCallbacks.nskip(address(), value); return this; } - /** Sets the specified value to the {@link STBIIOCallbacks#eof} field. */ - public Buffer eof(@NativeType("int (*) (void *)") STBIEOFCallbackI value) { STBIIOCallbacks.neof(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIReadCallback.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIReadCallback.java deleted file mode 100644 index 094e8e31..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIReadCallback.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import java.nio.*; - -/** - * Instances of this class may be set to the {@code read} field of the {@link STBIIOCallbacks} struct. - * - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     void *user,
    - *     char *data,
    - *     int size
    - * )
    - */ -public abstract class STBIReadCallback extends Callback implements STBIReadCallbackI { - - /** - * Creates a {@code STBIReadCallback} instance from the specified function pointer. - * - * @return the new {@code STBIReadCallback} - */ - public static STBIReadCallback create(long functionPointer) { - STBIReadCallbackI instance = Callback.get(functionPointer); - return instance instanceof STBIReadCallback - ? (STBIReadCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static STBIReadCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code STBIReadCallback} instance that delegates to the specified {@code STBIReadCallbackI} instance. */ - public static STBIReadCallback create(STBIReadCallbackI instance) { - return instance instanceof STBIReadCallback - ? (STBIReadCallback)instance - : new Container(instance.address(), instance); - } - - protected STBIReadCallback() { - super(CIF); - } - - STBIReadCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Converts the specified {@link STBIReadCallback} arguments to a ByteBuffer. - * - *

    This method may only be used inside a STBIReadCallback invocation.

    - * - * @param data the STBIReadCallback {@code data} argument - * @param size the STBIReadCallback {@code size} argument - * - * @return the data as a ByteBuffer - */ - public static ByteBuffer getData(long data, int size) { - return memByteBuffer(data, size); - } - - private static final class Container extends STBIReadCallback { - - private final STBIReadCallbackI delegate; - - Container(long functionPointer, STBIReadCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long user, long data, int size) { - return delegate.invoke(user, data, size); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIReadCallbackI.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIReadCallbackI.java deleted file mode 100644 index e7bfa849..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIReadCallbackI.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@code read} field of the {@link STBIIOCallbacks} struct. - * - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     void *user,
    - *     char *data,
    - *     int size
    - * )
    - */ -@FunctionalInterface -@NativeType("int (*) (void *, char *, int)") -public interface STBIReadCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * The {@code stbi_io_callbacks.read} callback. - * - * @param user a pointer to user data - * @param data the data buffer to fill - * @param size the number of bytes to read - * - * @return the number of bytes actually read - */ - int invoke(@NativeType("void *") long user, @NativeType("char *") long data, int size); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBISkipCallback.java b/LWJGL/src/main/java/org/lwjgl/stb/STBISkipCallback.java deleted file mode 100644 index 188fde43..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBISkipCallback.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@code skip} field of the {@link STBIIOCallbacks} struct. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *user,
    - *     int n
    - * )
    - */ -public abstract class STBISkipCallback extends Callback implements STBISkipCallbackI { - - /** - * Creates a {@code STBISkipCallback} instance from the specified function pointer. - * - * @return the new {@code STBISkipCallback} - */ - public static STBISkipCallback create(long functionPointer) { - STBISkipCallbackI instance = Callback.get(functionPointer); - return instance instanceof STBISkipCallback - ? (STBISkipCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static STBISkipCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code STBISkipCallback} instance that delegates to the specified {@code STBISkipCallbackI} instance. */ - public static STBISkipCallback create(STBISkipCallbackI instance) { - return instance instanceof STBISkipCallback - ? (STBISkipCallback)instance - : new Container(instance.address(), instance); - } - - protected STBISkipCallback() { - super(CIF); - } - - STBISkipCallback(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends STBISkipCallback { - - private final STBISkipCallbackI delegate; - - Container(long functionPointer, STBISkipCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long user, int n) { - delegate.invoke(user, n); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBISkipCallbackI.java b/LWJGL/src/main/java/org/lwjgl/stb/STBISkipCallbackI.java deleted file mode 100644 index 4bb5ebc9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBISkipCallbackI.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@code skip} field of the {@link STBIIOCallbacks} struct. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *user,
    - *     int n
    - * )
    - */ -@FunctionalInterface -@NativeType("void (*) (void *, int)") -public interface STBISkipCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** - * The {@code stbi_io_callbacks.skip} callback. - * - * @param user a pointer to user data - * @param n the number of bytes to skip if positive, or unget the last {@code -n} bytes if negative - */ - void invoke(@NativeType("void *") long user, int n); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIWriteCallback.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIWriteCallback.java deleted file mode 100644 index 33c583be..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIWriteCallback.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -import java.nio.*; - -/** - * Instances of this class may be used with the {@link STBImageWrite} {@code write_type_to_func} functions. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *context,
    - *     void *data,
    - *     int size
    - * )
    - */ -public abstract class STBIWriteCallback extends Callback implements STBIWriteCallbackI { - - /** - * Creates a {@code STBIWriteCallback} instance from the specified function pointer. - * - * @return the new {@code STBIWriteCallback} - */ - public static STBIWriteCallback create(long functionPointer) { - STBIWriteCallbackI instance = Callback.get(functionPointer); - return instance instanceof STBIWriteCallback - ? (STBIWriteCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static STBIWriteCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code STBIWriteCallback} instance that delegates to the specified {@code STBIWriteCallbackI} instance. */ - public static STBIWriteCallback create(STBIWriteCallbackI instance) { - return instance instanceof STBIWriteCallback - ? (STBIWriteCallback)instance - : new Container(instance.address(), instance); - } - - protected STBIWriteCallback() { - super(CIF); - } - - STBIWriteCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Converts the specified {@link STBIWriteCallback} arguments to a ByteBuffer. - * - *

    This method may only be used inside a STBIWriteCallback invocation.

    - * - * @param data the STBIWriteCallback {@code data} argument - * @param size the STBIWriteCallback {@code size} argument - * - * @return the data as a ByteBuffer - */ - public static ByteBuffer getData(long data, int size) { - return memByteBuffer(data, size); - } - - private static final class Container extends STBIWriteCallback { - - private final STBIWriteCallbackI delegate; - - Container(long functionPointer, STBIWriteCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long context, long data, int size) { - delegate.invoke(context, data, size); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIWriteCallbackI.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIWriteCallbackI.java deleted file mode 100644 index ac8048e2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIWriteCallbackI.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be used with the {@link STBImageWrite} {@code write_type_to_func} functions. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *context,
    - *     void *data,
    - *     int size
    - * )
    - */ -@FunctionalInterface -@NativeType("stbi_write_func *") -public interface STBIWriteCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_pointer, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetInt(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * The {@code stbi_write_func} callback. - * - * @param context the context passed to the write function - * @param data the data to write - * @param size the number of bytes in {@code data} - */ - void invoke(@NativeType("void *") long context, @NativeType("void *") long data, int size); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIZlibCompress.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIZlibCompress.java deleted file mode 100644 index 11589c6c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIZlibCompress.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to {@link STBImageWrite#stbi_zlib_compress}. - * - *

    Type

    - * - *
    
    - * unsigned char * (*{@link #invoke}) (
    - *     unsigned char *data,
    - *     int data_len,
    - *     int *out_len,
    - *     int quality
    - * )
    - */ -public abstract class STBIZlibCompress extends Callback implements STBIZlibCompressI { - - /** - * Creates a {@code STBIZlibCompress} instance from the specified function pointer. - * - * @return the new {@code STBIZlibCompress} - */ - public static STBIZlibCompress create(long functionPointer) { - STBIZlibCompressI instance = Callback.get(functionPointer); - return instance instanceof STBIZlibCompress - ? (STBIZlibCompress)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static STBIZlibCompress createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code STBIZlibCompress} instance that delegates to the specified {@code STBIZlibCompressI} instance. */ - public static STBIZlibCompress create(STBIZlibCompressI instance) { - return instance instanceof STBIZlibCompress - ? (STBIZlibCompress)instance - : new Container(instance.address(), instance); - } - - protected STBIZlibCompress() { - super(CIF); - } - - STBIZlibCompress(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends STBIZlibCompress { - - private final STBIZlibCompressI delegate; - - Container(long functionPointer, STBIZlibCompressI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long data, int data_len, long out_len, int quality) { - return delegate.invoke(data, data_len, out_len, quality); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBIZlibCompressI.java b/LWJGL/src/main/java/org/lwjgl/stb/STBIZlibCompressI.java deleted file mode 100644 index b3488432..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBIZlibCompressI.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to {@link STBImageWrite#stbi_zlib_compress}. - * - *

    Type

    - * - *
    
    - * unsigned char * (*{@link #invoke}) (
    - *     unsigned char *data,
    - *     int data_len,
    - *     int *out_len,
    - *     int quality
    - * )
    - */ -@FunctionalInterface -@NativeType("unsigned char * (*) (unsigned char *, int, int *, int)") -public interface STBIZlibCompressI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_sint32, ffi_type_pointer, ffi_type_sint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** - * Compresses a block of data using Zlib compression. - * - *

    The returned data will be freed with {@link MemoryUtil#memFree} so it must be heap allocated with {@link MemoryUtil#memAlloc}.

    - * - * @param data the data to compress - * @param data_len the data length, in bytes - * @param out_len returns the compressed data length, in bytes - * @param quality the compression quality to use - * - * @return the compressed data - */ - @NativeType("unsigned char *") long invoke(@NativeType("unsigned char *") long data, int data_len, @NativeType("int *") long out_len, int quality); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBImage.java b/LWJGL/src/main/java/org/lwjgl/stb/STBImage.java deleted file mode 100644 index 1ea0ee4a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBImage.java +++ /dev/null @@ -1,1389 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to stb_image.h from the stb library. - * - *

    Quick notes

    - * - *

    Primarily of interest to game developers and other people who can avoid problematic images and only need the trivial interface. Supported formats:

    - * - *
      - *
    • JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib
    • - *
    • PNG 1/2/4/8/16-bit-per-channel
    • - *
    • TGA (not sure what subset, if a subset)
    • - *
    • BMP non-1bpp, non-RLE
    • - *
    • PSD (composited view only, no extra channels, 8/16 bit-per-channel)
    • - *
    • GIF (*desired_channels always reports as 4-channel)
    • - *
    • HDR (radiance rgbE format)
    • - *
    • PIC (Softimage PIC)
    • - *
    • PNM (PPM and PGM binary only)
    • - *
    - * - *

    Animated GIF still needs a proper API, but here's one way to do it.

    - * - *

    Features:

    - * - *
      - *
    • decode from memory
    • - *
    • decode from arbitrary I/O callbacks
    • - *
    • SIMD acceleration on x86/x64 (SSE2) and ARM (NEON)
    • - *
    - * - *

    Limitations:

    - * - *
      - *
    • no 12-bit-per-channel JPEG
    • - *
    • no JPEGs with arithmetic coding
    • - *
    • GIF always returns *channels_in_file=4
    • - *
    - * - *

    Basic usage (see HDR discussion below for HDR usage):

    - * - *
    
    - * int x,y,n;
    - * unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
    - * // ... process data if not NULL ...
    - * // ... x = width, y = height, n = # 8-bit components per pixel ...
    - * // ... replace '0' with '1'..'4' to force that many components per pixel
    - * // ... but 'n' will always be the number that it would have been if you said 0
    - * stbi_image_free(data)
    - * - *

    HDR image support

    - * - *

    stb_image supports loading HDR images in general, and currently the Radiance .HDR file format specifically. You can still load any file through the - * existing interface; if you attempt to load an HDR file, it will be automatically remapped to LDR, assuming gamma 2.2 and an arbitrary scale factor - * defaulting to 1; both of these constants can be reconfigured through this interface:

    - * - *
    
    - * stbi_hdr_to_ldr_gamma(2.2f);
    - * stbi_hdr_to_ldr_scale(1.0f);
    - * - *

    (note, do not use inverse constants; stbi_image will invert them appropriately).

    - * - *

    Additionally, there is a new, parallel interface for loading files as (linear) floats to preserve the full dynamic range:

    - * - *
    
    - * float *data = stbi_loadf(filename, &x, &y, &n, 0);
    - * - *

    If you load LDR images through this interface, those images will be promoted to floating point values, run through the inverse of constants - * corresponding to the above:

    - * - *
    
    - * stbi_ldr_to_hdr_scale(1.0f);
    - * stbi_ldr_to_hdr_gamma(2.2f);
    - * - *

    Finally, given a filename (or an open file or memory block) containing image data, you can query for the "most appropriate" interface to use (that is, - * whether the image is HDR or not), using:

    - * - *
    
    - * stbi_is_hdr(char *filename);
    - * - *

    iPhone PNG support

    - * - *

    We optionally support converting iPhone-formatted PNGs (which store premultiplied BGRA) back to RGB, even though they're internally encoded - * differently. To enable this conversion, call {@link #stbi_convert_iphone_png_to_rgb convert_iphone_png_to_rgb}(1).

    - * - *

    Call {@link #stbi_set_unpremultiply_on_load set_unpremultiply_on_load}(1) as well to force a divide per pixel to remove any premultiplied alpha *only* if the image file explicitly says - * there's premultiplied data (currently only happens in iPhone images, and only if iPhone convert-to-rgb processing is on).

    - */ -public class STBImage { - - static { LibSTB.initialize(); } - - /** - * Component count. - * - *
    Enum values:
    - * - *
      - *
    • {@link #STBI_default default} - Default component count, used as an argument to {@code desired_channels}.
    • - *
    • {@link #STBI_grey grey}
    • - *
    • {@link #STBI_grey_alpha grey_alpha}
    • - *
    • {@link #STBI_rgb rgb}
    • - *
    • {@link #STBI_rgb_alpha rgb_alpha}
    • - *
    - */ - public static final int - STBI_default = 0, - STBI_grey = 1, - STBI_grey_alpha = 2, - STBI_rgb = 3, - STBI_rgb_alpha = 4; - - protected STBImage() { - throw new UnsupportedOperationException(); - } - - // --- [ stbi_load ] --- - - /** Unsafe version of: {@link #stbi_load load} */ - public static native long nstbi_load(long filename, long x, long y, long channels_in_file, int desired_channels); - - /** - * Loads an image from the specified file. - * - *

    The return value from an image loader is an {@code 'unsigned char *'} which points to the pixel data, or {@code NULL} on an allocation failure or if the image - * is corrupt or invalid. The pixel data consists of {@code *y} scanlines of {@code *x} pixels, with each pixel consisting of N interleaved 8-bit - * components; the first pixel pointed to is top-left-most in the image. There is no padding between image scanlines or between pixels, regardless of - * format. The number of components N is {@code 'desired_channels'} if {@code desired_channels} is non-zero, or {@code *channels_in_file} otherwise. If - * {@code desired_channels} is non-zero, {@code *channels_in_file} has the number of components that would have been output otherwise. E.g. if you - * set {@code desired_channels} to 4, you will always get RGBA output, but you can check {@code *channels_in_file} to see if it's trivially opaque because - * e.g. there were only 3 channels in the source image.

    - * - *

    An output image with N components has the following components interleaved in this order in each pixel:

    - * - *
    
    -     * N=#channels_in_file     components
    -     *   1                     grey
    -     *   2                     grey, alpha
    -     *   3                     red, green, blue
    -     *   4                     red, green, blue, alpha
    - * - *

    If image loading fails for any reason, the return value will be {@code NULL}, and {@code *x}, {@code *y}, {@code *channels_in_file} will be unchanged. The - * function {@link #stbi_failure_reason failure_reason} can be queried for an extremely brief, end-user unfriendly explanation of why the load failed.

    - * - *

    Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.

    - * - *

    To query the width, height and component count of an image without having to decode the full file, you can use the {@code stbi_info} family of - * functions:

    - * - *
    
    -     * int x,y,n,ok;
    -     * ok = stbi_info(filename, &x, &y, &n);
    -     * // returns ok=1 and sets x, y, n if image is a supported format,
    -     * // 0 otherwise.
    - * - *

    Note that stb_image pervasively uses {@code ints} in its public API for sizes, including sizes of memory buffers. This is now part of the API and thus - * hard to change without causing breakage. As a result, the various image loaders all have certain limits on image size; these differ somewhat by format - * but generally boil down to either just under 2GB or just under 1GB. When the decoded image would be larger than this, stb_image decoding will fail.

    - * - *

    Additionally, stb_image will reject image files that have any of their dimensions set to a larger value than the configurable - * {@code STBI_MAX_DIMENSIONS}, which defaults to {@code 2**24 = 16777216} pixels. Due to the above memory limit, the only way to have an image with such - * dimensions load correctly is for it to have a rather extreme aspect ratio. Either way, the assumption here is that such larger images are likely to be - * malformed or malicious. If you do need to load an image with individual dimensions larger than that, and it still fits in the overall size limit, you - * can {@code #define STBI_MAX_DIMENSIONS} on your own to be something larger.

    - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load(memAddress(filename), memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memByteBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - /** - * Loads an image from the specified file. - * - *

    The return value from an image loader is an {@code 'unsigned char *'} which points to the pixel data, or {@code NULL} on an allocation failure or if the image - * is corrupt or invalid. The pixel data consists of {@code *y} scanlines of {@code *x} pixels, with each pixel consisting of N interleaved 8-bit - * components; the first pixel pointed to is top-left-most in the image. There is no padding between image scanlines or between pixels, regardless of - * format. The number of components N is {@code 'desired_channels'} if {@code desired_channels} is non-zero, or {@code *channels_in_file} otherwise. If - * {@code desired_channels} is non-zero, {@code *channels_in_file} has the number of components that would have been output otherwise. E.g. if you - * set {@code desired_channels} to 4, you will always get RGBA output, but you can check {@code *channels_in_file} to see if it's trivially opaque because - * e.g. there were only 3 channels in the source image.

    - * - *

    An output image with N components has the following components interleaved in this order in each pixel:

    - * - *
    
    -     * N=#channels_in_file     components
    -     *   1                     grey
    -     *   2                     grey, alpha
    -     *   3                     red, green, blue
    -     *   4                     red, green, blue, alpha
    - * - *

    If image loading fails for any reason, the return value will be {@code NULL}, and {@code *x}, {@code *y}, {@code *channels_in_file} will be unchanged. The - * function {@link #stbi_failure_reason failure_reason} can be queried for an extremely brief, end-user unfriendly explanation of why the load failed.

    - * - *

    Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.

    - * - *

    To query the width, height and component count of an image without having to decode the full file, you can use the {@code stbi_info} family of - * functions:

    - * - *
    
    -     * int x,y,n,ok;
    -     * ok = stbi_info(filename, &x, &y, &n);
    -     * // returns ok=1 and sets x, y, n if image is a supported format,
    -     * // 0 otherwise.
    - * - *

    Note that stb_image pervasively uses {@code ints} in its public API for sizes, including sizes of memory buffers. This is now part of the API and thus - * hard to change without causing breakage. As a result, the various image loaders all have certain limits on image size; these differ somewhat by format - * but generally boil down to either just under 2GB or just under 1GB. When the decoded image would be larger than this, stb_image decoding will fail.

    - * - *

    Additionally, stb_image will reject image files that have any of their dimensions set to a larger value than the configurable - * {@code STBI_MAX_DIMENSIONS}, which defaults to {@code 2**24 = 16777216} pixels. Due to the above memory limit, the only way to have an image with such - * dimensions load correctly is for it to have a rather extreme aspect ratio. Either way, the assumption here is that such larger images are likely to be - * malformed or malicious. If you do need to load an image with individual dimensions larger than that, and it still fits in the overall size limit, you - * can {@code #define STBI_MAX_DIMENSIONS} on your own to be something larger.

    - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - long __result = nstbi_load(filenameEncoded, memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memByteBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_load_from_memory ] --- - - /** - * Unsafe version of: {@link #stbi_load_from_memory load_from_memory} - * - * @param len the buffer length, in bytes - */ - public static native long nstbi_load_from_memory(long buffer, int len, long x, long y, long channels_in_file, int desired_channels); - - /** - * In-memory version of {@link #stbi_load load}. - * - * @param buffer the buffer from which to load the image data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_from_memory(memAddress(buffer), buffer.remaining(), memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memByteBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - // --- [ stbi_load_from_callbacks ] --- - - /** Unsafe version of: {@link #stbi_load_from_callbacks load_from_callbacks} */ - public static native long nstbi_load_from_callbacks(long clbk, long user, long x, long y, long channels_in_file, int desired_channels); - - /** - * Callback version of {@link #stbi_load load}. - * - *

    I/O callbacks allow you to read from arbitrary sources, like packaged files or some other source. Data read from callbacks are processed through a - * small internal buffer (currently 128 bytes) to try to reduce overhead.

    - * - *

    The three functions you must define are "read" (reads some bytes of data), "skip" (skips some bytes of data), "eof" (reports if the stream is at the - * end).

    - * - * @param clbk an {@link STBIIOCallbacks} struct - * @param user a pointer to user data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - STBIIOCallbacks.validate(clbk.address()); - } - long __result = nstbi_load_from_callbacks(clbk.address(), user, memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memByteBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - // --- [ stbi_load_gif_from_memory ] --- - - /** - * Unsafe version of: {@link #stbi_load_gif_from_memory load_gif_from_memory} - * - * @param len the buffer length, in bytes - */ - public static native long nstbi_load_gif_from_memory(long buffer, int len, long delays, long x, long y, long z, long channels_in_file, int desired_channels); - - /** - * gif version of {@link #stbi_load_from_memory load_from_memory}. - * - * @param buffer the buffer from which to load the image data - * @param delays output the delays of each layer in the image - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param z outputs the number of layers in the image - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load_gif_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int **") PointerBuffer delays, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer z, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(delays, 1); - check(x, 1); - check(y, 1); - check(z, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_gif_from_memory(memAddress(buffer), buffer.remaining(), memAddress(delays), memAddress(x), memAddress(y), memAddress(z), memAddress(channels_in_file), desired_channels); - return memByteBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * z.get(z.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - // --- [ stbi_load_16 ] --- - - /** Unsafe version of: {@link #stbi_load_16 load_16} */ - public static native long nstbi_load_16(long filename, long x, long y, long channels_in_file, int desired_channels); - - /** - * 16-bits-per-channel version of {@link #stbi_load load}. - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_16(memAddress(filename), memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memShortBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - /** - * 16-bits-per-channel version of {@link #stbi_load load}. - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - long __result = nstbi_load_16(filenameEncoded, memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memShortBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_load_16_from_memory ] --- - - /** - * Unsafe version of: {@link #stbi_load_16_from_memory load_16_from_memory} - * - * @param len the buffer length, in bytes - */ - public static native long nstbi_load_16_from_memory(long buffer, int len, long x, long y, long channels_in_file, int desired_channels); - - /** - * In-memory version of {@link #stbi_load_16 load_16}. - * - * @param buffer the buffer from which to load the image data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_16_from_memory(memAddress(buffer), buffer.remaining(), memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memShortBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - // --- [ stbi_load_16_from_callbacks ] --- - - /** Unsafe version of: {@link #stbi_load_16_from_callbacks load_16_from_callbacks} */ - public static native long nstbi_load_16_from_callbacks(long clbk, long user, long x, long y, long channels_in_file, int desired_channels); - - /** - * Callback version of {@link #stbi_load_16 load_16}. - * - * @param clbk an {@link STBIIOCallbacks} struct - * @param user a pointer to user data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - STBIIOCallbacks.validate(clbk.address()); - } - long __result = nstbi_load_16_from_callbacks(clbk.address(), user, memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memShortBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - // --- [ stbi_loadf ] --- - - /** Unsafe version of: {@link #stbi_loadf loadf} */ - public static native long nstbi_loadf(long filename, long x, long y, long channels_in_file, int desired_channels); - - /** - * Floating-point version of {@link #stbi_load load}. - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_loadf(memAddress(filename), memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memFloatBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - /** - * Floating-point version of {@link #stbi_load load}. - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - long __result = nstbi_loadf(filenameEncoded, memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memFloatBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_loadf_from_memory ] --- - - /** - * Unsafe version of: {@link #stbi_loadf_from_memory loadf_from_memory} - * - * @param len the buffer length, in bytes - */ - public static native long nstbi_loadf_from_memory(long buffer, int len, long x, long y, long channels_in_file, int desired_channels); - - /** - * Floating-point version of {@link #stbi_load_from_memory load_from_memory}. - * - * @param buffer the buffer from which to load the image data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_loadf_from_memory(memAddress(buffer), buffer.remaining(), memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memFloatBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - // --- [ stbi_loadf_from_callbacks ] --- - - /** Unsafe version of: {@link #stbi_loadf_from_callbacks loadf_from_callbacks} */ - public static native long nstbi_loadf_from_callbacks(long clbk, long user, long x, long y, long channels_in_file, int desired_channels); - - /** - * Floating-point version of {@link #stbi_load_from_callbacks load_from_callbacks}. - * - * @param clbk an {@link STBIIOCallbacks} struct - * @param user a pointer to user data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param channels_in_file outputs number of components in image - * @param desired_channels 0 or 1..4 to force that many components per pixel. One of:
    01234
    - */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - STBIIOCallbacks.validate(clbk.address()); - } - long __result = nstbi_loadf_from_callbacks(clbk.address(), user, memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); - return memFloatBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); - } - - // --- [ stbi_hdr_to_ldr_gamma ] --- - - /** - * Changes the gamma value used when converting HDR images to LDR. The default value is 2.2f - * - * @param gamma the gamma value - */ - public static native void stbi_hdr_to_ldr_gamma(float gamma); - - // --- [ stbi_hdr_to_ldr_scale ] --- - - /** - * Changes the scale factor used when converting HDR images to LDR. The default value is 1.0f - * - * @param scale the scale factor - */ - public static native void stbi_hdr_to_ldr_scale(float scale); - - // --- [ stbi_ldr_to_hdr_gamma ] --- - - /** - * Changes the gamma value used when converting LDR images to HDR. The default value is 2.2f - * - * @param gamma the gamma value - */ - public static native void stbi_ldr_to_hdr_gamma(float gamma); - - // --- [ stbi_ldr_to_hdr_scale ] --- - - /** - * Changes the scale value used when converting LDR images to HDR. The default value is 1.0f - * - * @param scale the scale factor - */ - public static native void stbi_ldr_to_hdr_scale(float scale); - - // --- [ stbi_is_hdr ] --- - - /** Unsafe version of: {@link #stbi_is_hdr is_hdr} */ - public static native int nstbi_is_hdr(long filename); - - /** - * Checks if the specified file contains an HDR image. - * - * @param filename the file name - * - * @return 1 if the image is HDR, 0 otherwise - */ - @NativeType("int") - public static boolean stbi_is_hdr(@NativeType("char const *") ByteBuffer filename) { - if (CHECKS) { - checkNT1(filename); - } - return nstbi_is_hdr(memAddress(filename)) != 0; - } - - /** - * Checks if the specified file contains an HDR image. - * - * @param filename the file name - * - * @return 1 if the image is HDR, 0 otherwise - */ - @NativeType("int") - public static boolean stbi_is_hdr(@NativeType("char const *") CharSequence filename) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_is_hdr(filenameEncoded) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_is_hdr_from_memory ] --- - - /** - * Unsafe version of: {@link #stbi_is_hdr_from_memory is_hdr_from_memory} - * - * @param len the buffer length, in bytes - */ - public static native int nstbi_is_hdr_from_memory(long buffer, int len); - - /** - * In-memory version of {@link #stbi_is_hdr is_hdr}. - * - * @param buffer the buffer from which to load the image data - */ - @NativeType("int") - public static boolean stbi_is_hdr_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer) { - return nstbi_is_hdr_from_memory(memAddress(buffer), buffer.remaining()) != 0; - } - - // --- [ stbi_is_hdr_from_callbacks ] --- - - /** Unsafe version of: {@link #stbi_is_hdr_from_callbacks is_hdr_from_callbacks} */ - public static native int nstbi_is_hdr_from_callbacks(long clbk, long user); - - /** - * Callback version of {@link #stbi_is_hdr is_hdr}. - * - * @param clbk an {@link STBIIOCallbacks} struct - * @param user a pointer to user data - */ - @NativeType("int") - public static boolean stbi_is_hdr_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user) { - if (CHECKS) { - STBIIOCallbacks.validate(clbk.address()); - } - return nstbi_is_hdr_from_callbacks(clbk.address(), user) != 0; - } - - // --- [ stbi_failure_reason ] --- - - /** Unsafe version of: {@link #stbi_failure_reason failure_reason} */ - public static native long nstbi_failure_reason(); - - /** Returns a brief reason for failure. */ - @Nullable - @NativeType("char const *") - public static String stbi_failure_reason() { - long __result = nstbi_failure_reason(); - return memASCIISafe(__result); - } - - // --- [ stbi_image_free ] --- - - /** Unsafe version of: {@link #stbi_image_free image_free} */ - public static native void nstbi_image_free(long retval_from_stbi_load); - - /** - * Frees a loaded image - * - * @param retval_from_stbi_load an stb image - */ - public static void stbi_image_free(@NativeType("void *") ByteBuffer retval_from_stbi_load) { - nstbi_image_free(memAddress(retval_from_stbi_load)); - } - - /** - * Frees a loaded image - * - * @param retval_from_stbi_load an stb image - */ - public static void stbi_image_free(@NativeType("void *") ShortBuffer retval_from_stbi_load) { - nstbi_image_free(memAddress(retval_from_stbi_load)); - } - - /** - * Frees a loaded image - * - * @param retval_from_stbi_load an stb image - */ - public static void stbi_image_free(@NativeType("void *") FloatBuffer retval_from_stbi_load) { - nstbi_image_free(memAddress(retval_from_stbi_load)); - } - - // --- [ stbi_info ] --- - - /** Unsafe version of: {@link #stbi_info info} */ - public static native int nstbi_info(long filename, long x, long y, long comp); - - /** - * Returns image dimensions & components without fully decoding the image. - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param comp outputs number of components in image - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_info(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer comp) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(comp, 1); - } - return nstbi_info(memAddress(filename), memAddress(x), memAddress(y), memAddress(comp)) != 0; - } - - /** - * Returns image dimensions & components without fully decoding the image. - * - * @param filename the file name - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param comp outputs number of components in image - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_info(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer comp) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(comp, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_info(filenameEncoded, memAddress(x), memAddress(y), memAddress(comp)) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_info_from_memory ] --- - - /** - * Unsafe version of: {@link #stbi_info_from_memory info_from_memory} - * - * @param len the buffer length, in bytes - */ - public static native int nstbi_info_from_memory(long buffer, int len, long x, long y, long comp); - - /** - * In-memory version of {@link #stbi_info info}. - * - * @param buffer the buffer from which to load the image data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param comp outputs number of components in image - */ - @NativeType("int") - public static boolean stbi_info_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer comp) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(comp, 1); - } - return nstbi_info_from_memory(memAddress(buffer), buffer.remaining(), memAddress(x), memAddress(y), memAddress(comp)) != 0; - } - - // --- [ stbi_info_from_callbacks ] --- - - /** Unsafe version of: {@link #stbi_info_from_callbacks info_from_callbacks} */ - public static native int nstbi_info_from_callbacks(long clbk, long user, long x, long y, long comp); - - /** - * Callback version of {@link #stbi_info info}. - * - * @param clbk an {@link STBIIOCallbacks} struct - * @param user a pointer to user data - * @param x outputs the image width in pixels - * @param y outputs the image height in pixels - * @param comp outputs number of components in image - */ - @NativeType("int") - public static boolean stbi_info_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer comp) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(comp, 1); - STBIIOCallbacks.validate(clbk.address()); - } - return nstbi_info_from_callbacks(clbk.address(), user, memAddress(x), memAddress(y), memAddress(comp)) != 0; - } - - // --- [ stbi_is_16_bit ] --- - - /** Unsafe version of: {@link #stbi_is_16_bit is_16_bit} */ - public static native int nstbi_is_16_bit(long filename); - - /** - * Returns {@code true} if the file contains a 16-bit image. - * - * @param filename the file name - */ - @NativeType("int") - public static boolean stbi_is_16_bit(@NativeType("char const *") ByteBuffer filename) { - if (CHECKS) { - checkNT1(filename); - } - return nstbi_is_16_bit(memAddress(filename)) != 0; - } - - /** - * Returns {@code true} if the file contains a 16-bit image. - * - * @param filename the file name - */ - @NativeType("int") - public static boolean stbi_is_16_bit(@NativeType("char const *") CharSequence filename) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_is_16_bit(filenameEncoded) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_is_16_bit_from_memory ] --- - - /** - * Unsafe version of: {@link #stbi_is_16_bit_from_memory is_16_bit_from_memory} - * - * @param len the buffer length, in bytes - */ - public static native int nstbi_is_16_bit_from_memory(long buffer, int len); - - /** - * In-memory version of {@link #stbi_is_16_bit is_16_bit}. - * - * @param buffer the buffer from which to load the image data - */ - @NativeType("int") - public static boolean stbi_is_16_bit_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer) { - return nstbi_is_16_bit_from_memory(memAddress(buffer), buffer.remaining()) != 0; - } - - // --- [ stbi_is_16_bit_from_callbacks ] --- - - /** Unsafe version of: {@link #stbi_is_16_bit_from_callbacks is_16_bit_from_callbacks} */ - public static native int nstbi_is_16_bit_from_callbacks(long clbk, long user); - - /** - * Callback version of {@link #stbi_is_16_bit is_16_bit}. - * - * @param clbk an {@link STBIIOCallbacks} struct - * @param user a pointer to user data - */ - @NativeType("int") - public static boolean stbi_is_16_bit_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user) { - if (CHECKS) { - STBIIOCallbacks.validate(clbk.address()); - } - return nstbi_is_16_bit_from_callbacks(clbk.address(), user) != 0; - } - - // --- [ stbi_set_unpremultiply_on_load ] --- - - /** Unsafe version of: {@link #stbi_set_unpremultiply_on_load set_unpremultiply_on_load} */ - public static native void nstbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply); - - /** - * For image formats that explicitly notate that they have premultiplied alpha, we just return the colors as stored in the file. Set this flag to force - * unpremultiplication. Results are undefined if the unpremultiply overflows. - * - * @param flag_true_if_should_unpremultiply the unpremultiply flag - */ - public static void stbi_set_unpremultiply_on_load(@NativeType("int") boolean flag_true_if_should_unpremultiply) { - nstbi_set_unpremultiply_on_load(flag_true_if_should_unpremultiply ? 1 : 0); - } - - // --- [ stbi_convert_iphone_png_to_rgb ] --- - - /** Unsafe version of: {@link #stbi_convert_iphone_png_to_rgb convert_iphone_png_to_rgb} */ - public static native void nstbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); - - /** - * Indicate whether we should process iPhone images back to canonical format, or just pass them through "as-is". - * - * @param flag_true_if_should_convert the convert iPhone PNG to RGB flag - */ - public static void stbi_convert_iphone_png_to_rgb(@NativeType("int") boolean flag_true_if_should_convert) { - nstbi_convert_iphone_png_to_rgb(flag_true_if_should_convert ? 1 : 0); - } - - // --- [ stbi_set_flip_vertically_on_load ] --- - - /** Unsafe version of: {@link #stbi_set_flip_vertically_on_load set_flip_vertically_on_load} */ - public static native void nstbi_set_flip_vertically_on_load(int flag_true_if_should_flip); - - /** - * Flips the image vertically, so the first pixel in the output array is the bottom left. - * - * @param flag_true_if_should_flip the flip vertically on load flag - */ - public static void stbi_set_flip_vertically_on_load(@NativeType("int") boolean flag_true_if_should_flip) { - nstbi_set_flip_vertically_on_load(flag_true_if_should_flip ? 1 : 0); - } - - // --- [ stbi_set_unpremultiply_on_load_thread ] --- - - /** Unsafe version of: {@link #stbi_set_unpremultiply_on_load_thread set_unpremultiply_on_load_thread} */ - public static native void nstbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply); - - /** As {@link #stbi_set_unpremultiply_on_load set_unpremultiply_on_load}, but only applies to images loaded on the thread that calls the function. */ - public static void stbi_set_unpremultiply_on_load_thread(@NativeType("int") boolean flag_true_if_should_unpremultiply) { - nstbi_set_unpremultiply_on_load_thread(flag_true_if_should_unpremultiply ? 1 : 0); - } - - // --- [ stbi_convert_iphone_png_to_rgb_thread ] --- - - /** Unsafe version of: {@link #stbi_convert_iphone_png_to_rgb_thread convert_iphone_png_to_rgb_thread} */ - public static native void nstbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert); - - /** As {@link #stbi_convert_iphone_png_to_rgb convert_iphone_png_to_rgb}, but only applies to images loaded on the thread that calls the function. */ - public static void stbi_convert_iphone_png_to_rgb_thread(@NativeType("int") boolean flag_true_if_should_convert) { - nstbi_convert_iphone_png_to_rgb_thread(flag_true_if_should_convert ? 1 : 0); - } - - // --- [ stbi_set_flip_vertically_on_load_thread ] --- - - /** - * As {@link #stbi_set_flip_vertically_on_load set_flip_vertically_on_load}, but only applies to images loaded on the thread that calls the function. - * - * @param flag_true_if_should_flip the flip vertically on load flag - */ - public static native void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip); - - // --- [ stbi_zlib_decode_malloc_guesssize ] --- - - /** Unsafe version of: {@link #stbi_zlib_decode_malloc_guesssize zlib_decode_malloc_guesssize} */ - public static native long nstbi_zlib_decode_malloc_guesssize(long buffer, int len, int initial_size, long outlen); - - /** ZLIB client - used by PNG, available for other purposes */ - @Nullable - @NativeType("char *") - public static ByteBuffer stbi_zlib_decode_malloc_guesssize(@NativeType("char const *") ByteBuffer buffer, int initial_size) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer outlen = stack.callocInt(1); - long __result = nstbi_zlib_decode_malloc_guesssize(memAddress(buffer), buffer.remaining(), initial_size, memAddress(outlen)); - return memByteBufferSafe(__result, outlen.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_zlib_decode_malloc_guesssize_headerflag ] --- - - /** Unsafe version of: {@link #stbi_zlib_decode_malloc_guesssize_headerflag zlib_decode_malloc_guesssize_headerflag} */ - public static native long nstbi_zlib_decode_malloc_guesssize_headerflag(long buffer, int len, int initial_size, long outlen, int parse_header); - - /** ZLIB client - used by PNG, available for other purposes */ - @Nullable - @NativeType("char *") - public static ByteBuffer stbi_zlib_decode_malloc_guesssize_headerflag(@NativeType("char const *") ByteBuffer buffer, int initial_size, @NativeType("int") boolean parse_header) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer outlen = stack.callocInt(1); - long __result = nstbi_zlib_decode_malloc_guesssize_headerflag(memAddress(buffer), buffer.remaining(), initial_size, memAddress(outlen), parse_header ? 1 : 0); - return memByteBufferSafe(__result, outlen.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_zlib_decode_malloc ] --- - - /** Unsafe version of: {@link #stbi_zlib_decode_malloc zlib_decode_malloc} */ - public static native long nstbi_zlib_decode_malloc(long buffer, int len, long outlen); - - /** ZLIB client - used by PNG, available for other purposes */ - @Nullable - @NativeType("char *") - public static ByteBuffer stbi_zlib_decode_malloc(@NativeType("char const *") ByteBuffer buffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer outlen = stack.callocInt(1); - long __result = nstbi_zlib_decode_malloc(memAddress(buffer), buffer.remaining(), memAddress(outlen)); - return memByteBufferSafe(__result, outlen.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_zlib_decode_buffer ] --- - - /** Unsafe version of: {@link #stbi_zlib_decode_buffer zlib_decode_buffer} */ - public static native int nstbi_zlib_decode_buffer(long obuffer, int olen, long ibuffer, int ilen); - - /** ZLIB client - used by PNG, available for other purposes */ - public static int stbi_zlib_decode_buffer(@NativeType("char *") ByteBuffer obuffer, @NativeType("char const *") ByteBuffer ibuffer) { - return nstbi_zlib_decode_buffer(memAddress(obuffer), obuffer.remaining(), memAddress(ibuffer), ibuffer.remaining()); - } - - // --- [ stbi_zlib_decode_noheader_malloc ] --- - - /** Unsafe version of: {@link #stbi_zlib_decode_noheader_malloc zlib_decode_noheader_malloc} */ - public static native long nstbi_zlib_decode_noheader_malloc(long buffer, int len, long outlen); - - /** ZLIB client - used by PNG, available for other purposes */ - @Nullable - @NativeType("char *") - public static ByteBuffer stbi_zlib_decode_noheader_malloc(@NativeType("char const *") ByteBuffer buffer) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer outlen = stack.callocInt(1); - long __result = nstbi_zlib_decode_noheader_malloc(memAddress(buffer), buffer.remaining(), memAddress(outlen)); - return memByteBufferSafe(__result, outlen.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_zlib_decode_noheader_buffer ] --- - - /** Unsafe version of: {@link #stbi_zlib_decode_noheader_buffer zlib_decode_noheader_buffer} */ - public static native int nstbi_zlib_decode_noheader_buffer(long obuffer, int olen, long ibuffer, int ilen); - - /** ZLIB client - used by PNG, available for other purposes */ - public static int stbi_zlib_decode_noheader_buffer(@NativeType("char *") ByteBuffer obuffer, @NativeType("char const *") ByteBuffer ibuffer) { - return nstbi_zlib_decode_noheader_buffer(memAddress(obuffer), obuffer.remaining(), memAddress(ibuffer), ibuffer.remaining()); - } - - /** Array version of: {@link #nstbi_load} */ - public static native long nstbi_load(long filename, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_load load} */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load(memAddress(filename), x, y, channels_in_file, desired_channels); - return memByteBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #stbi_load load} */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - long __result = nstbi_load(filenameEncoded, x, y, channels_in_file, desired_channels); - return memByteBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstbi_load_from_memory} */ - public static native long nstbi_load_from_memory(long buffer, int len, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_load_from_memory load_from_memory} */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_from_memory(memAddress(buffer), buffer.remaining(), x, y, channels_in_file, desired_channels); - return memByteBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #nstbi_load_from_callbacks} */ - public static native long nstbi_load_from_callbacks(long clbk, long user, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_load_from_callbacks load_from_callbacks} */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - STBIIOCallbacks.validate(clbk.address()); - } - long __result = nstbi_load_from_callbacks(clbk.address(), user, x, y, channels_in_file, desired_channels); - return memByteBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #nstbi_load_gif_from_memory} */ - public static native long nstbi_load_gif_from_memory(long buffer, int len, long delays, int[] x, int[] y, int[] z, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_load_gif_from_memory load_gif_from_memory} */ - @Nullable - @NativeType("stbi_uc *") - public static ByteBuffer stbi_load_gif_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int **") PointerBuffer delays, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] z, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(delays, 1); - check(x, 1); - check(y, 1); - check(z, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_gif_from_memory(memAddress(buffer), buffer.remaining(), memAddress(delays), x, y, z, channels_in_file, desired_channels); - return memByteBufferSafe(__result, x[0] * y[0] * z[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #nstbi_load_16} */ - public static native long nstbi_load_16(long filename, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_load_16 load_16} */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_16(memAddress(filename), x, y, channels_in_file, desired_channels); - return memShortBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #stbi_load_16 load_16} */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - long __result = nstbi_load_16(filenameEncoded, x, y, channels_in_file, desired_channels); - return memShortBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstbi_load_16_from_memory} */ - public static native long nstbi_load_16_from_memory(long buffer, int len, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_load_16_from_memory load_16_from_memory} */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_load_16_from_memory(memAddress(buffer), buffer.remaining(), x, y, channels_in_file, desired_channels); - return memShortBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #nstbi_load_16_from_callbacks} */ - public static native long nstbi_load_16_from_callbacks(long clbk, long user, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_load_16_from_callbacks load_16_from_callbacks} */ - @Nullable - @NativeType("stbi_us *") - public static ShortBuffer stbi_load_16_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - STBIIOCallbacks.validate(clbk.address()); - } - long __result = nstbi_load_16_from_callbacks(clbk.address(), user, x, y, channels_in_file, desired_channels); - return memShortBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #nstbi_loadf} */ - public static native long nstbi_loadf(long filename, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_loadf loadf} */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_loadf(memAddress(filename), x, y, channels_in_file, desired_channels); - return memFloatBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #stbi_loadf loadf} */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - long __result = nstbi_loadf(filenameEncoded, x, y, channels_in_file, desired_channels); - return memFloatBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstbi_loadf_from_memory} */ - public static native long nstbi_loadf_from_memory(long buffer, int len, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_loadf_from_memory loadf_from_memory} */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - } - long __result = nstbi_loadf_from_memory(memAddress(buffer), buffer.remaining(), x, y, channels_in_file, desired_channels); - return memFloatBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #nstbi_loadf_from_callbacks} */ - public static native long nstbi_loadf_from_callbacks(long clbk, long user, int[] x, int[] y, int[] channels_in_file, int desired_channels); - - /** Array version of: {@link #stbi_loadf_from_callbacks loadf_from_callbacks} */ - @Nullable - @NativeType("float *") - public static FloatBuffer stbi_loadf_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(channels_in_file, 1); - STBIIOCallbacks.validate(clbk.address()); - } - long __result = nstbi_loadf_from_callbacks(clbk.address(), user, x, y, channels_in_file, desired_channels); - return memFloatBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); - } - - /** Array version of: {@link #nstbi_info} */ - public static native int nstbi_info(long filename, int[] x, int[] y, int[] comp); - - /** Array version of: {@link #stbi_info info} */ - @NativeType("int") - public static boolean stbi_info(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] comp) { - if (CHECKS) { - checkNT1(filename); - check(x, 1); - check(y, 1); - check(comp, 1); - } - return nstbi_info(memAddress(filename), x, y, comp) != 0; - } - - /** Array version of: {@link #stbi_info info} */ - @NativeType("int") - public static boolean stbi_info(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] comp) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(comp, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_info(filenameEncoded, x, y, comp) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstbi_info_from_memory} */ - public static native int nstbi_info_from_memory(long buffer, int len, int[] x, int[] y, int[] comp); - - /** Array version of: {@link #stbi_info_from_memory info_from_memory} */ - @NativeType("int") - public static boolean stbi_info_from_memory(@NativeType("stbi_uc const *") ByteBuffer buffer, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] comp) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(comp, 1); - } - return nstbi_info_from_memory(memAddress(buffer), buffer.remaining(), x, y, comp) != 0; - } - - /** Array version of: {@link #nstbi_info_from_callbacks} */ - public static native int nstbi_info_from_callbacks(long clbk, long user, int[] x, int[] y, int[] comp); - - /** Array version of: {@link #stbi_info_from_callbacks info_from_callbacks} */ - @NativeType("int") - public static boolean stbi_info_from_callbacks(@NativeType("stbi_io_callbacks const *") STBIIOCallbacks clbk, @NativeType("void *") long user, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] comp) { - if (CHECKS) { - check(x, 1); - check(y, 1); - check(comp, 1); - STBIIOCallbacks.validate(clbk.address()); - } - return nstbi_info_from_callbacks(clbk.address(), user, x, y, comp) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBImageResize.java b/LWJGL/src/main/java/org/lwjgl/stb/STBImageResize.java deleted file mode 100644 index 96715b01..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBImageResize.java +++ /dev/null @@ -1,565 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to stb_image_resize.h from the stb library. - * - *

    Written with emphasis on usability, portability, and efficiency. (No SIMD or threads, so it be easily outperformed by libs that use those.) Only - * scaling and translation is supported, no rotations or shears. Easy API downsamples w/Mitchell filter, upsamples w/cubic interpolation.

    - * - *

    QUICKSTART

    - * - *
    
    - * stbir_resize_uint8(      input_pixels , in_w , in_h , 0,
    - *                          output_pixels, out_w, out_h, 0, num_channels)
    - * stbir_resize_float(...)
    - * stbir_resize_uint8_srgb( input_pixels , in_w , in_h , 0,
    - *                          output_pixels, out_w, out_h, 0,
    - *                          num_channels , alpha_chan  , 0)
    - * stbir_resize_uint8_srgb_edgemode(
    - *                          input_pixels , in_w , in_h , 0,
    - *                          output_pixels, out_w, out_h, 0,
    - *                          num_channels , alpha_chan  , 0, STBIR_EDGE_CLAMP)
    - *                                                       // WRAP/REFLECT/ZERO
    - * - *

    ALPHA CHANNEL

    - * - *

    Most of the resizing functions provide the ability to control how the alpha channel of an image is processed. The important things to know about this:

    - * - *
      - *
    1. The best mathematically-behaved version of alpha to use is called "premultiplied alpha", in which the other color channels have had the alpha value - * multiplied in. If you use premultiplied alpha, linear filtering (such as image resampling done by this library, or performed in texture units on - * GPUs) does the "right thing". While premultiplied alpha is standard in the movie CGI industry, it is still uncommon in the videogame/real-time - * world. If you linearly filter non-premultiplied alpha, strange effects occur. (For example, the average of 1% opaque bright green and 99% opaque - * black produces 50% transparent dark green when non-premultiplied, whereas premultiplied it produces 50% transparent near-black. The former - * introduces green energy that doesn't exist in the source image.)
    2. - *
    3. Artists should not edit premultiplied-alpha images; artists want non-premultiplied alpha images. Thus, art tools generally output non-premultiplied - * alpha images.
    4. - *
    5. You will get best results in most cases by converting images to premultiplied alpha before processing them mathematically.
    6. - *
    7. If you pass the flag {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}, the resizer does not do anything special for the alpha channel; it is resampled identically to - * other channels. This produces the correct results for premultiplied-alpha images, but produces less-than-ideal results for non-premultiplied-alpha - * images.
    8. - *
    9. If you do not pass the flag {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}, then the resizer weights the contribution of input pixels based on their alpha values, or, - * equivalently, it multiplies the alpha value into the color channels, resamples, then divides by the resultant alpha value. Input pixels which have - * {@code alpha=0} do not contribute at all to output pixels unless all of the input pixels affecting that output pixel have {@code alpha=0}, - * in which case the result for that pixel is the same as it would be without {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}. However, this is only true for input images - * in integer formats. For input images in float format, input pixels with {@code alpha=0} have no effect, and output pixels which have - * {@code alpha=0} will be 0 in all channels. (For float images, you can manually achieve the same result by adding a tiny epsilon value to the alpha - * channel of every image, and then subtracting or clamping it at the end.)
    10. - *
    11. You can separately control whether the alpha channel is interpreted as linear or affected by the colorspace. By default it is linear; you almost - * never want to apply the colorspace. (For example, graphics hardware does not apply sRGB conversion to the alpha channel.)
    12. - *
    - */ -public class STBImageResize { - - static { LibSTB.initialize(); } - - /** Set this flag if you have no alpha channel, or otherwise provide the index of the alpha channel. */ - public static final int STBIR_ALPHA_CHANNEL_NONE = -1; - - /** - * Set this flag if your texture has premultiplied alpha. Otherwise, stbir will use alpha-weighted resampling (effectively premultiplying, resampling, - * then unpremultiplying). - */ - public static final int STBIR_FLAG_ALPHA_PREMULTIPLIED = 1 << 0; - - /** The specified alpha channel should be handled as gamma-corrected value even when doing sRGB operations. */ - public static final int STBIR_FLAG_ALPHA_USES_COLORSPACE = 1 << 1; - - /** - * Edge wrap mode. - * - *
    Enum values:
    - * - *
      - *
    • {@link #STBIR_EDGE_CLAMP EDGE_CLAMP}
    • - *
    • {@link #STBIR_EDGE_REFLECT EDGE_REFLECT}
    • - *
    • {@link #STBIR_EDGE_WRAP EDGE_WRAP}
    • - *
    • {@link #STBIR_EDGE_ZERO EDGE_ZERO}
    • - *
    - */ - public static final int - STBIR_EDGE_CLAMP = 0x1, - STBIR_EDGE_REFLECT = 0x2, - STBIR_EDGE_WRAP = 0x3, - STBIR_EDGE_ZERO = 0x4; - - /** - * Filters. - * - *
    Enum values:
    - * - *
      - *
    • {@link #STBIR_FILTER_DEFAULT FILTER_DEFAULT} - Use same filter type that easy-to-use API chooses.
    • - *
    • {@link #STBIR_FILTER_BOX FILTER_BOX} - A trapezoid w/1-pixel wide ramps, same result as box for integer scale ratios.
    • - *
    • {@link #STBIR_FILTER_TRIANGLE FILTER_TRIANGLE} - On upsampling, produces same results as bilinear texture filtering.
    • - *
    • {@link #STBIR_FILTER_CUBICBSPLINE FILTER_CUBICBSPLINE} - The cubic b-spline (aka Mitchell-Netrevalli with B=1,C=0), gaussian-esque.
    • - *
    • {@link #STBIR_FILTER_CATMULLROM FILTER_CATMULLROM} - An interpolating cubic spline.
    • - *
    • {@link #STBIR_FILTER_MITCHELL FILTER_MITCHELL} - Mitchell-Netrevalli filter with B=1/3, C=1/3.
    • - *
    - */ - public static final int - STBIR_FILTER_DEFAULT = 0, - STBIR_FILTER_BOX = 1, - STBIR_FILTER_TRIANGLE = 2, - STBIR_FILTER_CUBICBSPLINE = 3, - STBIR_FILTER_CATMULLROM = 4, - STBIR_FILTER_MITCHELL = 5; - - /** - * Colorspace. - * - *
    Enum values:
    - * - *
      - *
    • {@link #STBIR_COLORSPACE_LINEAR COLORSPACE_LINEAR}
    • - *
    • {@link #STBIR_COLORSPACE_SRGB COLORSPACE_SRGB}
    • - *
    - */ - public static final int - STBIR_COLORSPACE_LINEAR = 0, - STBIR_COLORSPACE_SRGB = 1; - - /** - * Data type. - * - *
    Enum values:
    - * - *
      - *
    • {@link #STBIR_TYPE_UINT8 TYPE_UINT8}
    • - *
    • {@link #STBIR_TYPE_UINT16 TYPE_UINT16}
    • - *
    • {@link #STBIR_TYPE_UINT32 TYPE_UINT32}
    • - *
    • {@link #STBIR_TYPE_FLOAT TYPE_FLOAT}
    • - *
    - */ - public static final int - STBIR_TYPE_UINT8 = 0, - STBIR_TYPE_UINT16 = 1, - STBIR_TYPE_UINT32 = 2, - STBIR_TYPE_FLOAT = 3; - - protected STBImageResize() { - throw new UnsupportedOperationException(); - } - - // --- [ stbir_resize_uint8 ] --- - - /** Unsafe version of: {@link #stbir_resize_uint8 resize_uint8} */ - public static native int nstbir_resize_uint8(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels); - - /** - * Easy-to-use API for resizing images. - * - *
      - *
    • The colorspace is linear.
    • - *
    • The alpha channel is treated identically to other channels.
    • - *
    • Memory required grows approximately linearly with input and output size, but with discontinuities at {@code input_w == output_w} and - * {@code input_h == output_h}.
    • - *
    - * - *

    This function uses the default resampling filter defined at compile time. For a different filter, use the medium-complexity API.

    - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_uint8(@NativeType("unsigned char const *") ByteBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("unsigned char *") ByteBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : input_stride_in_bytes)); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : output_stride_in_bytes)); - } - return nstbir_resize_uint8(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, num_channels) != 0; - } - - // --- [ stbir_resize_float ] --- - - /** Unsafe version of: {@link #stbir_resize_float resize_float} */ - public static native int nstbir_resize_float(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels); - - /** - * Float version of {@link #stbir_resize_uint8 resize_uint8}. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_float(@NativeType("float const *") FloatBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("float *") FloatBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : (input_stride_in_bytes >> 2))); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : (output_stride_in_bytes >> 2))); - } - return nstbir_resize_float(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, num_channels) != 0; - } - - // --- [ stbir_resize_uint8_srgb ] --- - - /** Unsafe version of: {@link #stbir_resize_uint8_srgb resize_uint8_srgb} */ - public static native int nstbir_resize_uint8_srgb(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags); - - /** - * Easy-to-use API for resizing images. - * - *
      - *
    • The image data is interpreted as gamma-corrected sRGB.
    • - *
    • Memory required grows approximately linearly with input and output size, but with discontinuities at {@code input_w == output_w} and - * {@code input_h == output_h}.
    • - *
    - * - *

    This function uses the default resampling filter defined at compile time. For a different filter, use the medium-complexity API.

    - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_uint8_srgb(@NativeType("unsigned char const *") ByteBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("unsigned char *") ByteBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : input_stride_in_bytes)); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : output_stride_in_bytes)); - } - return nstbir_resize_uint8_srgb(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags) != 0; - } - - // --- [ stbir_resize_uint8_srgb_edgemode ] --- - - /** Unsafe version of: {@link #stbir_resize_uint8_srgb_edgemode resize_uint8_srgb_edgemode} */ - public static native int nstbir_resize_uint8_srgb_edgemode(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, int edge_wrap_mode); - - /** - * Same as {@link #stbir_resize_uint8_srgb resize_uint8_srgb}, but adds the ability to specify how requests to sample off the edge of the image are handled. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * @param edge_wrap_mode the edge wrap mode. One of:
    {@link #STBIR_EDGE_CLAMP EDGE_CLAMP}{@link #STBIR_EDGE_REFLECT EDGE_REFLECT}{@link #STBIR_EDGE_WRAP EDGE_WRAP}{@link #STBIR_EDGE_ZERO EDGE_ZERO}
    - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_uint8_srgb_edgemode(@NativeType("unsigned char const *") ByteBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("unsigned char *") ByteBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_wrap_mode) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : input_stride_in_bytes)); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : output_stride_in_bytes)); - } - return nstbir_resize_uint8_srgb_edgemode(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, edge_wrap_mode) != 0; - } - - // --- [ stbir_resize_uint8_generic ] --- - - /** Unsafe version of: {@link #stbir_resize_uint8_generic resize_uint8_generic} */ - public static native int nstbir_resize_uint8_generic(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, int edge_wrap_mode, int filter, int space, long alloc_context); - - /** - * Medium-complexity version of {@link #stbir_resize_uint8 resize_uint8}. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * @param edge_wrap_mode the edge wrap mode. One of:
    {@link #STBIR_EDGE_CLAMP EDGE_CLAMP}{@link #STBIR_EDGE_REFLECT EDGE_REFLECT}{@link #STBIR_EDGE_WRAP EDGE_WRAP}{@link #STBIR_EDGE_ZERO EDGE_ZERO}
    - * @param filter the scale filter. One of:
    {@link #STBIR_FILTER_DEFAULT FILTER_DEFAULT}{@link #STBIR_FILTER_BOX FILTER_BOX}{@link #STBIR_FILTER_TRIANGLE FILTER_TRIANGLE}{@link #STBIR_FILTER_CUBICBSPLINE FILTER_CUBICBSPLINE}{@link #STBIR_FILTER_CATMULLROM FILTER_CATMULLROM}
    {@link #STBIR_FILTER_MITCHELL FILTER_MITCHELL}
    - * @param space the image colorspace. One of:
    {@link #STBIR_COLORSPACE_LINEAR COLORSPACE_LINEAR}{@link #STBIR_COLORSPACE_SRGB COLORSPACE_SRGB}
    - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_uint8_generic(@NativeType("unsigned char const *") ByteBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("unsigned char *") ByteBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_wrap_mode, @NativeType("stbir_filter") int filter, @NativeType("stbir_colorspace") int space) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : input_stride_in_bytes)); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : output_stride_in_bytes)); - } - return nstbir_resize_uint8_generic(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, edge_wrap_mode, filter, space, NULL) != 0; - } - - // --- [ stbir_resize_uint16_generic ] --- - - /** Unsafe version of: {@link #stbir_resize_uint16_generic resize_uint16_generic} */ - public static native int nstbir_resize_uint16_generic(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, int edge_wrap_mode, int filter, int space, long alloc_context); - - /** - * Short version of {@link #stbir_resize_uint8_generic resize_uint8_generic}. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * @param edge_wrap_mode the edge wrap mode. One of:
    {@link #STBIR_EDGE_CLAMP EDGE_CLAMP}{@link #STBIR_EDGE_REFLECT EDGE_REFLECT}{@link #STBIR_EDGE_WRAP EDGE_WRAP}{@link #STBIR_EDGE_ZERO EDGE_ZERO}
    - * @param filter the scale filter. One of:
    {@link #STBIR_FILTER_DEFAULT FILTER_DEFAULT}{@link #STBIR_FILTER_BOX FILTER_BOX}{@link #STBIR_FILTER_TRIANGLE FILTER_TRIANGLE}{@link #STBIR_FILTER_CUBICBSPLINE FILTER_CUBICBSPLINE}{@link #STBIR_FILTER_CATMULLROM FILTER_CATMULLROM}
    {@link #STBIR_FILTER_MITCHELL FILTER_MITCHELL}
    - * @param space the image colorspace. One of:
    {@link #STBIR_COLORSPACE_LINEAR COLORSPACE_LINEAR}{@link #STBIR_COLORSPACE_SRGB COLORSPACE_SRGB}
    - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_uint16_generic(@NativeType("stbir_uint16 const *") ShortBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("stbir_uint16 *") ShortBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_wrap_mode, @NativeType("stbir_filter") int filter, @NativeType("stbir_colorspace") int space) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : (input_stride_in_bytes >> 1))); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : (output_stride_in_bytes >> 1))); - } - return nstbir_resize_uint16_generic(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, edge_wrap_mode, filter, space, NULL) != 0; - } - - // --- [ stbir_resize_float_generic ] --- - - /** Unsafe version of: {@link #stbir_resize_float_generic resize_float_generic} */ - public static native int nstbir_resize_float_generic(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, int edge_wrap_mode, int filter, int space, long alloc_context); - - /** - * Float version of {@link #stbir_resize_uint8_generic resize_uint8_generic}. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * @param edge_wrap_mode the edge wrap mode. One of:
    {@link #STBIR_EDGE_CLAMP EDGE_CLAMP}{@link #STBIR_EDGE_REFLECT EDGE_REFLECT}{@link #STBIR_EDGE_WRAP EDGE_WRAP}{@link #STBIR_EDGE_ZERO EDGE_ZERO}
    - * @param filter the scale filter. One of:
    {@link #STBIR_FILTER_DEFAULT FILTER_DEFAULT}{@link #STBIR_FILTER_BOX FILTER_BOX}{@link #STBIR_FILTER_TRIANGLE FILTER_TRIANGLE}{@link #STBIR_FILTER_CUBICBSPLINE FILTER_CUBICBSPLINE}{@link #STBIR_FILTER_CATMULLROM FILTER_CATMULLROM}
    {@link #STBIR_FILTER_MITCHELL FILTER_MITCHELL}
    - * @param space the image colorspace. One of:
    {@link #STBIR_COLORSPACE_LINEAR COLORSPACE_LINEAR}{@link #STBIR_COLORSPACE_SRGB COLORSPACE_SRGB}
    - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_float_generic(@NativeType("float const *") FloatBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("float *") FloatBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_wrap_mode, @NativeType("stbir_filter") int filter, @NativeType("stbir_colorspace") int space) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : (input_stride_in_bytes >> 2))); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : (output_stride_in_bytes >> 2))); - } - return nstbir_resize_float_generic(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, edge_wrap_mode, filter, space, NULL) != 0; - } - - // --- [ stbir_resize ] --- - - /** Unsafe version of: {@link #stbir_resize resize} */ - public static native int nstbir_resize(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int datatype, int num_channels, int alpha_channel, int flags, int edge_mode_horizontal, int edge_mode_vertical, int filter_horizontal, int filter_vertical, int space, long alloc_context); - - /** - * Full-complexity version of {@link #stbir_resize_uint8_generic resize_uint8_generic}. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param datatype the image data type. One of:
    {@link #STBIR_TYPE_UINT8 TYPE_UINT8}{@link #STBIR_TYPE_UINT16 TYPE_UINT16}{@link #STBIR_TYPE_UINT32 TYPE_UINT32}{@link #STBIR_TYPE_FLOAT TYPE_FLOAT}
    - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * @param edge_mode_horizontal the horizontal edge wrap mode - * @param edge_mode_vertical the vertical edge wrap mode - * @param filter_horizontal the horizontal scale filter - * @param filter_vertical the vertical scale filter - * @param space the image colorspace. One of:
    {@link #STBIR_COLORSPACE_LINEAR COLORSPACE_LINEAR}{@link #STBIR_COLORSPACE_SRGB COLORSPACE_SRGB}
    - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize(@NativeType("void const *") ByteBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("void *") ByteBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, @NativeType("stbir_datatype") int datatype, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_mode_horizontal, @NativeType("stbir_edge") int edge_mode_vertical, @NativeType("stbir_filter") int filter_horizontal, @NativeType("stbir_filter") int filter_vertical, @NativeType("stbir_colorspace") int space) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? (input_w * num_channels) << getTypeShift(datatype) : input_stride_in_bytes)); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? (output_w * num_channels) << getTypeShift(datatype) : output_stride_in_bytes)); - } - return nstbir_resize(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, datatype, num_channels, alpha_channel, flags, edge_mode_horizontal, edge_mode_vertical, filter_horizontal, filter_vertical, space, NULL) != 0; - } - - // --- [ stbir_resize_subpixel ] --- - - /** Unsafe version of: {@link #stbir_resize_subpixel resize_subpixel} */ - public static native int nstbir_resize_subpixel(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int datatype, int num_channels, int alpha_channel, int flags, int edge_mode_horizontal, int edge_mode_vertical, int filter_horizontal, int filter_vertical, int space, long alloc_context, float x_scale, float y_scale, float x_offset, float y_offset); - - /** - * Subpixel version of {@link #stbir_resize resize}. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param datatype the image data type. One of:
    {@link #STBIR_TYPE_UINT8 TYPE_UINT8}{@link #STBIR_TYPE_UINT16 TYPE_UINT16}{@link #STBIR_TYPE_UINT32 TYPE_UINT32}{@link #STBIR_TYPE_FLOAT TYPE_FLOAT}
    - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * @param edge_mode_horizontal the horizontal edge wrap mode - * @param edge_mode_vertical the vertical edge wrap mode - * @param filter_horizontal the horizontal scale filter - * @param filter_vertical the vertical scale filter - * @param space the image colorspace. One of:
    {@link #STBIR_COLORSPACE_LINEAR COLORSPACE_LINEAR}{@link #STBIR_COLORSPACE_SRGB COLORSPACE_SRGB}
    - * @param x_scale horizontal scale for subpixel correctness - * @param y_scale vertical scale for subpixel correctness - * @param x_offset horizontal offset for subpixel correctness - * @param y_offset vertical offset for subpixel correctness - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_subpixel(@NativeType("void const *") ByteBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("void *") ByteBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, @NativeType("stbir_datatype") int datatype, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_mode_horizontal, @NativeType("stbir_edge") int edge_mode_vertical, @NativeType("stbir_filter") int filter_horizontal, @NativeType("stbir_filter") int filter_vertical, @NativeType("stbir_colorspace") int space, float x_scale, float y_scale, float x_offset, float y_offset) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? (input_w * num_channels) << getTypeShift(datatype) : input_stride_in_bytes)); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? (output_w * num_channels) << getTypeShift(datatype) : output_stride_in_bytes)); - } - return nstbir_resize_subpixel(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, datatype, num_channels, alpha_channel, flags, edge_mode_horizontal, edge_mode_vertical, filter_horizontal, filter_vertical, space, NULL, x_scale, y_scale, x_offset, y_offset) != 0; - } - - // --- [ stbir_resize_region ] --- - - /** Unsafe version of: {@link #stbir_resize_region resize_region} */ - public static native int nstbir_resize_region(long input_pixels, int input_w, int input_h, int input_stride_in_bytes, long output_pixels, int output_w, int output_h, int output_stride_in_bytes, int datatype, int num_channels, int alpha_channel, int flags, int edge_mode_horizontal, int edge_mode_vertical, int filter_horizontal, int filter_vertical, int space, long alloc_context, float s0, float t0, float s1, float t1); - - /** - * Region version of {@link #stbir_resize resize}, using texture coordinates. - * - * @param input_pixels the source image data - * @param input_w the source image width - * @param input_h the source image height - * @param input_stride_in_bytes the offset between successive rows of the source image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param output_pixels returns the scaled image data - * @param output_w the resized image width - * @param output_h the resized image height - * @param output_stride_in_bytes the offset between successive rows of the resized image data in memory, in bytes. You can specify 0 to mean packed continuously in memory - * @param datatype the image data type. One of:
    {@link #STBIR_TYPE_UINT8 TYPE_UINT8}{@link #STBIR_TYPE_UINT16 TYPE_UINT16}{@link #STBIR_TYPE_UINT32 TYPE_UINT32}{@link #STBIR_TYPE_FLOAT TYPE_FLOAT}
    - * @param num_channels the number of channels in the image (e.g. RGB=3, RGBA=4) - * @param alpha_channel the alpha channel index, or {@link #STBIR_ALPHA_CHANNEL_NONE ALPHA_CHANNEL_NONE} if there is no alpha channel - * @param flags the alpha channel flags. 0 will propably do the right thing if you're not sure what the flags mean. One of:
    {@link #STBIR_FLAG_ALPHA_PREMULTIPLIED FLAG_ALPHA_PREMULTIPLIED}{@link #STBIR_FLAG_ALPHA_USES_COLORSPACE FLAG_ALPHA_USES_COLORSPACE}
    - * @param edge_mode_horizontal the horizontal edge wrap mode - * @param edge_mode_vertical the vertical edge wrap mode - * @param filter_horizontal the horizontal scale filter - * @param filter_vertical the vertical scale filter - * @param space the image colorspace. One of:
    {@link #STBIR_COLORSPACE_LINEAR COLORSPACE_LINEAR}{@link #STBIR_COLORSPACE_SRGB COLORSPACE_SRGB}
    - * @param s0 the left texture coordinate of the region to scale - * @param t0 the top texture coordinate of the region to scale - * @param s1 the right texture coordinate of the region to scale - * @param t1 the bottom texture coordinate of the region to scale - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbir_resize_region(@NativeType("void const *") ByteBuffer input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("void *") ByteBuffer output_pixels, int output_w, int output_h, int output_stride_in_bytes, @NativeType("stbir_datatype") int datatype, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_mode_horizontal, @NativeType("stbir_edge") int edge_mode_vertical, @NativeType("stbir_filter") int filter_horizontal, @NativeType("stbir_filter") int filter_vertical, @NativeType("stbir_colorspace") int space, float s0, float t0, float s1, float t1) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? (input_w * num_channels) << getTypeShift(datatype) : input_stride_in_bytes)); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? (output_w * num_channels) << getTypeShift(datatype) : output_stride_in_bytes)); - } - return nstbir_resize_region(memAddress(input_pixels), input_w, input_h, input_stride_in_bytes, memAddress(output_pixels), output_w, output_h, output_stride_in_bytes, datatype, num_channels, alpha_channel, flags, edge_mode_horizontal, edge_mode_vertical, filter_horizontal, filter_vertical, space, NULL, s0, t0, s1, t1) != 0; - } - - /** Array version of: {@link #nstbir_resize_float} */ - public static native int nstbir_resize_float(float[] input_pixels, int input_w, int input_h, int input_stride_in_bytes, float[] output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels); - - /** Array version of: {@link #stbir_resize_float resize_float} */ - @NativeType("int") - public static boolean stbir_resize_float(@NativeType("float const *") float[] input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("float *") float[] output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : (input_stride_in_bytes >> 2))); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : (output_stride_in_bytes >> 2))); - } - return nstbir_resize_float(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels) != 0; - } - - /** Array version of: {@link #nstbir_resize_uint16_generic} */ - public static native int nstbir_resize_uint16_generic(short[] input_pixels, int input_w, int input_h, int input_stride_in_bytes, short[] output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, int edge_wrap_mode, int filter, int space, long alloc_context); - - /** Array version of: {@link #stbir_resize_uint16_generic resize_uint16_generic} */ - @NativeType("int") - public static boolean stbir_resize_uint16_generic(@NativeType("stbir_uint16 const *") short[] input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("stbir_uint16 *") short[] output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_wrap_mode, @NativeType("stbir_filter") int filter, @NativeType("stbir_colorspace") int space) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : (input_stride_in_bytes >> 1))); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : (output_stride_in_bytes >> 1))); - } - return nstbir_resize_uint16_generic(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, edge_wrap_mode, filter, space, NULL) != 0; - } - - /** Array version of: {@link #nstbir_resize_float_generic} */ - public static native int nstbir_resize_float_generic(float[] input_pixels, int input_w, int input_h, int input_stride_in_bytes, float[] output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, int edge_wrap_mode, int filter, int space, long alloc_context); - - /** Array version of: {@link #stbir_resize_float_generic resize_float_generic} */ - @NativeType("int") - public static boolean stbir_resize_float_generic(@NativeType("float const *") float[] input_pixels, int input_w, int input_h, int input_stride_in_bytes, @NativeType("float *") float[] output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, @NativeType("stbir_edge") int edge_wrap_mode, @NativeType("stbir_filter") int filter, @NativeType("stbir_colorspace") int space) { - if (CHECKS) { - check(input_pixels, input_h * (input_stride_in_bytes == 0 ? input_w * num_channels : (input_stride_in_bytes >> 2))); - check(output_pixels, output_h * (output_stride_in_bytes == 0 ? output_w * num_channels : (output_stride_in_bytes >> 2))); - } - return nstbir_resize_float_generic(input_pixels, input_w, input_h, input_stride_in_bytes, output_pixels, output_w, output_h, output_stride_in_bytes, num_channels, alpha_channel, flags, edge_wrap_mode, filter, space, NULL) != 0; - } - - private static int getTypeShift(int type) { - switch (type) { - case STBIR_TYPE_UINT8: - return 0; - case STBIR_TYPE_UINT16: - return 1; - default: - return 2; - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBImageWrite.java b/LWJGL/src/main/java/org/lwjgl/stb/STBImageWrite.java deleted file mode 100644 index 8d7575b9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBImageWrite.java +++ /dev/null @@ -1,611 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to stb_image_write.h from the stb library. - * - *

    ABOUT

    - * - *

    This header file is a library for writing images to C stdio.

    - * - *

    The PNG output is not optimal; it is 20-50% larger than the file written by a decent optimizing implementation; though providing a custom zlib compress - * function (see {@link #stbi_zlib_compress zlib_compress}) can mitigate that. This library is designed for source code compactness and simplicity, not optimal image - * file size or run-time performance.

    - * - *

    USAGE

    - * - *

    There are five functions, one for each image file format:

    - * - *
    
    - * int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes);
    - * int stbi_write_bmp(char const *filename, int w, int h, int comp, const void *data);
    - * int stbi_write_tga(char const *filename, int w, int h, int comp, const void *data);
    - * int stbi_write_hdr(char const *filename, int w, int h, int comp, const void *data);
    - * int stbi_write_jpg(char const *filename, int w, int h, int comp, const float *data, int quality);
    - * 
    - * void stbi_flip_vertically_on_write(int flag); // flag is non-zero to flip data vertically
    - * - *

    There are also five equivalent functions that use an arbitrary write function. You are expected to open/close your file-equivalent before and after - * calling these:

    - * - *
    
    - * int stbi_write_png_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data, int stride_in_bytes);
    - * int stbi_write_bmp_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data);
    - * int stbi_write_tga_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const void  *data);
    - * int stbi_write_hdr_to_func(stbi_write_func *func, void *context, int w, int h, int comp, const float *data);
    - * int stbi_write_jpg_to_func(stbi_write_func *func, void *context, int x, int y, int comp, const void *data, int quality);
    - * - *

    where the callback is:

    - * - *
    
    - * void stbi_write_func(void *context, void *data, int size);
    - * - *

    You can configure it with these global variables:

    - * - *
    
    - * int stbi_write_tga_with_rle;             // defaults to true; set to 0 to disable RLE
    - * int stbi_write_png_compression_level;    // defaults to 8; set to higher for more compression
    - * int stbi_write_force_png_filter;         // defaults to -1; set to 0..5 to force a filter mode
    - * - *

    The functions create an image file defined by the parameters. The image is a rectangle of pixels stored from left-to-right, top-to-bottom. Each pixel - * contains {@code comp} channels of data stored interleaved with 8-bits per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is monochrome - * color.) The rectangle is {@code w} pixels wide and {@code h} pixels tall. The {@code *data} pointer points to the first byte of the top-left-most - * pixel.

    - */ -public class STBImageWrite { - - static { LibSTB.initialize(); } - - protected STBImageWrite() { - throw new UnsupportedOperationException(); - } - - // --- [ stbi_write_png ] --- - - /** Unsafe version of: {@link #stbi_write_png write_png} */ - public static native int nstbi_write_png(long filename, int w, int h, int comp, long data, int stride_in_bytes); - - /** - * Writes a PNR image file. - * - *

    PNG creates output files with the same number of components as the input.

    - * - *

    PNG supports writing rectangles of data even when the bytes storing rows of data are not consecutive in memory (e.g. sub-rectangles of a larger image), - * by supplying the stride between the beginning of adjacent rows. The other formats do not. (Thus you cannot write a native-format BMP through the BMP - * writer, both because it is in BGR order and because it may have padding at the end of the line.)

    - * - *

    PNG allows you to set the deflate compression level by setting the global variable {@link #stbi_write_png_compression_level write_png_compression_level} (it defaults to 8).

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * @param stride_in_bytes the distance in bytes from the first byte of a row of pixels to the first byte of the next row of pixels - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_png(@NativeType("char const *") ByteBuffer filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data, int stride_in_bytes) { - if (CHECKS) { - checkNT1(filename); - check(data, (stride_in_bytes != 0 ? stride_in_bytes : w * comp) * h); - } - return nstbi_write_png(memAddress(filename), w, h, comp, memAddress(data), stride_in_bytes) != 0; - } - - /** - * Writes a PNR image file. - * - *

    PNG creates output files with the same number of components as the input.

    - * - *

    PNG supports writing rectangles of data even when the bytes storing rows of data are not consecutive in memory (e.g. sub-rectangles of a larger image), - * by supplying the stride between the beginning of adjacent rows. The other formats do not. (Thus you cannot write a native-format BMP through the BMP - * writer, both because it is in BGR order and because it may have padding at the end of the line.)

    - * - *

    PNG allows you to set the deflate compression level by setting the global variable {@link #stbi_write_png_compression_level write_png_compression_level} (it defaults to 8).

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * @param stride_in_bytes the distance in bytes from the first byte of a row of pixels to the first byte of the next row of pixels - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_png(@NativeType("char const *") CharSequence filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data, int stride_in_bytes) { - if (CHECKS) { - check(data, (stride_in_bytes != 0 ? stride_in_bytes : w * comp) * h); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_write_png(filenameEncoded, w, h, comp, memAddress(data), stride_in_bytes) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_write_png_compression_level ] --- - - private static native long nstbi_write_png_compression_level(); - - @NativeType("int *") - private static IntBuffer stbi_write_png_compression_level() { - long __result = nstbi_write_png_compression_level(); - return memIntBuffer(__result, 1); - } - - /** Returns the address of the global variable {@code stbi_write_png_compression_level}. */ - public static final IntBuffer stbi_write_png_compression_level = stbi_write_png_compression_level(); - - // --- [ stbi_write_force_png_filter ] --- - - private static native long nstbi_write_force_png_filter(); - - @NativeType("int *") - private static IntBuffer stbi_write_force_png_filter() { - long __result = nstbi_write_force_png_filter(); - return memIntBuffer(__result, 1); - } - - /** Returns the address of the global variable {@code stbi_write_force_png_filter}. */ - public static final IntBuffer stbi_write_force_png_filter = stbi_write_force_png_filter(); - - // --- [ stbi_zlib_compress ] --- - - private static native long nstbi_zlib_compress(); - - @NativeType("unsigned char * (*) (unsigned char *, int, int *, int) *") - private static PointerBuffer stbi_zlib_compress() { - long __result = nstbi_zlib_compress(); - return memPointerBuffer(__result, 1); - } - - /** - * Returns the address of the global variable {@code stbi_zlib_compress}. - * - *

    The address of an {@link STBIZlibCompress} instance may be set to this variable, in order to override the Zlib compression implementation.

    - */ - public static final PointerBuffer stbi_zlib_compress = stbi_zlib_compress(); - - // --- [ stbi_write_bmp ] --- - - /** Unsafe version of: {@link #stbi_write_bmp write_bmp} */ - public static native int nstbi_write_bmp(long filename, int w, int h, int comp, long data); - - /** - * Writes a BMP image file. - * - *

    The BMP format expands Y to RGB in the file format and does not output alpha.

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_bmp(@NativeType("char const *") ByteBuffer filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data) { - if (CHECKS) { - checkNT1(filename); - check(data, w * h * comp); - } - return nstbi_write_bmp(memAddress(filename), w, h, comp, memAddress(data)) != 0; - } - - /** - * Writes a BMP image file. - * - *

    The BMP format expands Y to RGB in the file format and does not output alpha.

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_bmp(@NativeType("char const *") CharSequence filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data) { - if (CHECKS) { - check(data, w * h * comp); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_write_bmp(filenameEncoded, w, h, comp, memAddress(data)) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_write_tga ] --- - - /** Unsafe version of: {@link #stbi_write_tga write_tga} */ - public static native int nstbi_write_tga(long filename, int w, int h, int comp, long data); - - /** - * Writes a TGA image file. - * - *

    TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed data, set the global variable {@code stbi_write_tga_with_rle} to 0. The variable - * can be accessed with {@link #stbi_write_tga_with_rle write_tga_with_rle}.

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_tga(@NativeType("char const *") ByteBuffer filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data) { - if (CHECKS) { - checkNT1(filename); - check(data, w * h * comp); - } - return nstbi_write_tga(memAddress(filename), w, h, comp, memAddress(data)) != 0; - } - - /** - * Writes a TGA image file. - * - *

    TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed data, set the global variable {@code stbi_write_tga_with_rle} to 0. The variable - * can be accessed with {@link #stbi_write_tga_with_rle write_tga_with_rle}.

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_tga(@NativeType("char const *") CharSequence filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data) { - if (CHECKS) { - check(data, w * h * comp); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_write_tga(filenameEncoded, w, h, comp, memAddress(data)) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_write_tga_with_rle ] --- - - private static native long nstbi_write_tga_with_rle(); - - @NativeType("int *") - private static IntBuffer stbi_write_tga_with_rle() { - long __result = nstbi_write_tga_with_rle(); - return memIntBuffer(__result, 1); - } - - /** Returns the address of the global variable {@code stbi_write_tga_with_rle}. */ - public static final IntBuffer stbi_write_tga_with_rle = stbi_write_tga_with_rle(); - - // --- [ stbi_write_hdr ] --- - - /** Unsafe version of: {@link #stbi_write_hdr write_hdr} */ - public static native int nstbi_write_hdr(long filename, int w, int h, int comp, long data); - - /** - * Writes an HDR image file. - * - *

    HDR expects linear float data. Since the format is always 32-bit rgb(e) data, alpha (if provided) is discarded, and for monochrome data it is - * replicated across all three channels.

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_hdr(@NativeType("char const *") ByteBuffer filename, int w, int h, int comp, @NativeType("float const *") FloatBuffer data) { - if (CHECKS) { - checkNT1(filename); - check(data, w * h * comp); - } - return nstbi_write_hdr(memAddress(filename), w, h, comp, memAddress(data)) != 0; - } - - /** - * Writes an HDR image file. - * - *

    HDR expects linear float data. Since the format is always 32-bit rgb(e) data, alpha (if provided) is discarded, and for monochrome data it is - * replicated across all three channels.

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_hdr(@NativeType("char const *") CharSequence filename, int w, int h, int comp, @NativeType("float const *") FloatBuffer data) { - if (CHECKS) { - check(data, w * h * comp); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_write_hdr(filenameEncoded, w, h, comp, memAddress(data)) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_write_jpg ] --- - - /** Unsafe version of: {@link #stbi_write_jpg write_jpg} */ - public static native int nstbi_write_jpg(long filename, int w, int h, int comp, long data, int quality); - - /** - * Writes a JPEG image file. - * - *

    JPEG does ignore alpha channels in input data; quality is between 1 and 100. Higher quality looks better but results in a bigger image. JPEG baseline - * (no JPEG progressive).

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * @param quality the compression quality - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_jpg(@NativeType("char const *") ByteBuffer filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data, int quality) { - if (CHECKS) { - checkNT1(filename); - check(data, w * h * comp); - } - return nstbi_write_jpg(memAddress(filename), w, h, comp, memAddress(data), quality) != 0; - } - - /** - * Writes a JPEG image file. - * - *

    JPEG does ignore alpha channels in input data; quality is between 1 and 100. Higher quality looks better but results in a bigger image. JPEG baseline - * (no JPEG progressive).

    - * - * @param filename the image file path - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * @param quality the compression quality - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_jpg(@NativeType("char const *") CharSequence filename, int w, int h, int comp, @NativeType("void const *") ByteBuffer data, int quality) { - if (CHECKS) { - check(data, w * h * comp); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_write_jpg(filenameEncoded, w, h, comp, memAddress(data), quality) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbi_write_png_to_func ] --- - - /** Unsafe version of: {@link #stbi_write_png_to_func write_png_to_func} */ - public static native int nstbi_write_png_to_func(long func, long context, int w, int h, int comp, long data, int stride_in_bytes); - - /** - * Callback version of {@link #stbi_write_png write_png}. - * - * @param func the callback function - * @param context a context that will be passed to {@code func} - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * @param stride_in_bytes the distance in bytes from the first byte of a row of pixels to the first byte of the next row of pixels - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_png_to_func(@NativeType("stbi_write_func *") STBIWriteCallbackI func, @NativeType("void *") long context, int w, int h, int comp, @NativeType("void const *") ByteBuffer data, int stride_in_bytes) { - if (CHECKS) { - check(data, (stride_in_bytes != 0 ? stride_in_bytes : w * comp) * h); - } - return nstbi_write_png_to_func(func.address(), context, w, h, comp, memAddress(data), stride_in_bytes) != 0; - } - - // --- [ stbi_write_bmp_to_func ] --- - - /** Unsafe version of: {@link #stbi_write_bmp_to_func write_bmp_to_func} */ - public static native int nstbi_write_bmp_to_func(long func, long context, int w, int h, int comp, long data); - - /** - * Callback version of {@link #stbi_write_bmp write_bmp}. - * - * @param func the callback function - * @param context a context that will be passed to {@code func} - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_bmp_to_func(@NativeType("stbi_write_func *") STBIWriteCallbackI func, @NativeType("void *") long context, int w, int h, int comp, @NativeType("void const *") ByteBuffer data) { - if (CHECKS) { - check(data, w * h * comp); - } - return nstbi_write_bmp_to_func(func.address(), context, w, h, comp, memAddress(data)) != 0; - } - - // --- [ stbi_write_tga_to_func ] --- - - /** Unsafe version of: {@link #stbi_write_tga_to_func write_tga_to_func} */ - public static native int nstbi_write_tga_to_func(long func, long context, int w, int h, int comp, long data); - - /** - * Callback version of {@link #stbi_write_tga write_tga}. - * - * @param func the callback function - * @param context a context that will be passed to {@code func} - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_tga_to_func(@NativeType("stbi_write_func *") STBIWriteCallbackI func, @NativeType("void *") long context, int w, int h, int comp, @NativeType("void const *") ByteBuffer data) { - if (CHECKS) { - check(data, w * h * comp); - } - return nstbi_write_tga_to_func(func.address(), context, w, h, comp, memAddress(data)) != 0; - } - - // --- [ stbi_write_hdr_to_func ] --- - - /** Unsafe version of: {@link #stbi_write_hdr_to_func write_hdr_to_func} */ - public static native int nstbi_write_hdr_to_func(long func, long context, int w, int h, int comp, long data); - - /** - * Callback version of {@link #stbi_write_hdr write_hdr}. - * - * @param func the callback function - * @param context a context that will be passed to {@code func} - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbi_write_hdr_to_func(@NativeType("stbi_write_func *") STBIWriteCallbackI func, @NativeType("void *") long context, int w, int h, int comp, @NativeType("float const *") FloatBuffer data) { - if (CHECKS) { - check(data, w * h * comp); - } - return nstbi_write_hdr_to_func(func.address(), context, w, h, comp, memAddress(data)) != 0; - } - - // --- [ stbi_write_jpg_to_func ] --- - - /** Unsafe version of: {@link #stbi_write_jpg_to_func write_jpg_to_func} */ - public static native int nstbi_write_jpg_to_func(long func, long context, int w, int h, int comp, long data, int quality); - - /** - * Callback version of {@link #stbi_write_jpg write_jpg}. - * - * @param func the callback function - * @param context a context that will be passed to {@code func} - * @param w the image width, in pixels - * @param h the image height, in pixels - * @param comp the number of channels in each pixel - * @param data the image data - * @param quality the compression quality - * - * @return 1 on success, 0 on failure - */ - public static int stbi_write_jpg_to_func(@NativeType("stbi_write_func *") STBIWriteCallbackI func, @NativeType("void *") long context, int w, int h, int comp, @NativeType("void const *") ByteBuffer data, int quality) { - if (CHECKS) { - check(data, w * h * comp); - } - return nstbi_write_jpg_to_func(func.address(), context, w, h, comp, memAddress(data), quality); - } - - // --- [ stbi_flip_vertically_on_write ] --- - - /** Unsafe version of: {@link #stbi_flip_vertically_on_write flip_vertically_on_write} */ - public static native void nstbi_flip_vertically_on_write(int flip_boolean); - - /** - * Configures if the written image should flipped vertically. - * - * @param flip_boolean true to flip data vertically - */ - public static void stbi_flip_vertically_on_write(@NativeType("int") boolean flip_boolean) { - nstbi_flip_vertically_on_write(flip_boolean ? 1 : 0); - } - - /** Array version of: {@link #nstbi_write_hdr} */ - public static native int nstbi_write_hdr(long filename, int w, int h, int comp, float[] data); - - /** Array version of: {@link #stbi_write_hdr write_hdr} */ - @NativeType("int") - public static boolean stbi_write_hdr(@NativeType("char const *") ByteBuffer filename, int w, int h, int comp, @NativeType("float const *") float[] data) { - if (CHECKS) { - checkNT1(filename); - check(data, w * h * comp); - } - return nstbi_write_hdr(memAddress(filename), w, h, comp, data) != 0; - } - - /** Array version of: {@link #stbi_write_hdr write_hdr} */ - @NativeType("int") - public static boolean stbi_write_hdr(@NativeType("char const *") CharSequence filename, int w, int h, int comp, @NativeType("float const *") float[] data) { - if (CHECKS) { - check(data, w * h * comp); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstbi_write_hdr(filenameEncoded, w, h, comp, data) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstbi_write_hdr_to_func} */ - public static native int nstbi_write_hdr_to_func(long func, long context, int w, int h, int comp, float[] data); - - /** Array version of: {@link #stbi_write_hdr_to_func write_hdr_to_func} */ - @NativeType("int") - public static boolean stbi_write_hdr_to_func(@NativeType("stbi_write_func *") STBIWriteCallbackI func, @NativeType("void *") long context, int w, int h, int comp, @NativeType("float const *") float[] data) { - if (CHECKS) { - check(data, w * h * comp); - } - return nstbi_write_hdr_to_func(func.address(), context, w, h, comp, data) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBPerlin.java b/LWJGL/src/main/java/org/lwjgl/stb/STBPerlin.java deleted file mode 100644 index ecad457d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBPerlin.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; - -/** - * Native bindings to stb_perlin.h from the stb library. - * - *

    Revised Perlin noise (3D input, 1D output).

    - */ -public class STBPerlin { - - static { LibSTB.initialize(); } - - protected STBPerlin() { - throw new UnsupportedOperationException(); - } - - // --- [ stb_perlin_noise3 ] --- - - /** - * Computes a random value at the coordinate (x,y,z). - * - *

    Adjacent random values are continuous but the noise fluctuates its randomness with period 1, i.e. takes on wholly unrelated values at integer points. - * Specifically, this implements Ken Perlin's revised noise function from 2002.

    - * - *

    The "wrap" parameters can be used to create wraparound noise that wraps at powers of two. The numbers MUST be powers of two. Specify 0 to mean "don't - * care". (The noise always wraps every 256 due details of the implementation, even if you ask for larger or no wrapping.)

    - * - * @param x the x coordinate - * @param y the y coordinate - * @param z the z coordinate - * @param x_wrap 0, or a power of two value that specifies the x wraparound coordinate - * @param y_wrap 0, or a power of two value that specifies the y wraparound coordinate - * @param z_wrap 0, or a power of two value that specifies the z wraparound coordinate - */ - public static native float stb_perlin_noise3(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap); - - // --- [ stb_perlin_noise3_seed ] --- - - /** - * As {@link #stb_perlin_noise3 perlin_noise3}, but {@code seed} selects from multiple different variations of the noise function. - * - *

    The current implementation only uses the bottom 8 bits of {@code seed}, but possibly in the future more bits will be used.

    - * - * @param x the x coordinate - * @param y the y coordinate - * @param z the z coordinate - * @param x_wrap 0, or a power of two value that specifies the x wraparound coordinate - * @param y_wrap 0, or a power of two value that specifies the y wraparound coordinate - * @param z_wrap 0, or a power of two value that specifies the z wraparound coordinate - * @param seed selects from multiple different variations of the noise function - */ - public static native float stb_perlin_noise3_seed(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap, int seed); - - // --- [ stb_perlin_ridge_noise3 ] --- - - /** - * Computes ridged noise. Calls {@link #stb_perlin_noise3 perlin_noise3} {@code octaves} times, so this parameter will affect runtime. - * - * @param x the x coordinate - * @param y the y coordinate - * @param z the z coordinate - * @param lacunarity spacing between successive octaves (use exactly 2.0 for wrapping output) - * @param gain relative weighting applied to each successive octave - * @param offset used to invert the ridges, may need to be larger, not sure - * @param octaves number of "octaves" of {@code noise3()} to sum - */ - public static native float stb_perlin_ridge_noise3(float x, float y, float z, float lacunarity, float gain, float offset, int octaves); - - // --- [ stb_perlin_fbm_noise3 ] --- - - /** - * Computes Fractal Brownian Motion noise. Calls {@link #stb_perlin_noise3 perlin_noise3} {@code octaves} times, so this parameter will affect runtime. - * - * @param x the x coordinate - * @param y the y coordinate - * @param z the z coordinate - * @param lacunarity spacing between successive octaves (use exactly 2.0 for wrapping output) - * @param gain relative weighting applied to each successive octave - * @param octaves number of "octaves" of {@code noise3()} to sum - */ - public static native float stb_perlin_fbm_noise3(float x, float y, float z, float lacunarity, float gain, int octaves); - - // --- [ stb_perlin_turbulence_noise3 ] --- - - /** - * Computes turbulence noise. Calls {@link #stb_perlin_noise3 perlin_noise3} {@code octaves} times, so this parameter will affect runtime. - * - * @param x the x coordinate - * @param y the y coordinate - * @param z the z coordinate - * @param lacunarity spacing between successive octaves (use exactly 2.0 for wrapping output) - * @param gain relative weighting applied to each successive octave - * @param octaves number of "octaves" of {@code noise3()} to sum - */ - public static native float stb_perlin_turbulence_noise3(float x, float y, float z, float lacunarity, float gain, int octaves); - - // --- [ stb_perlin_noise3_wrap_nonpow2 ] --- - - public static native float stb_perlin_noise3_wrap_nonpow2(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap, @NativeType("unsigned char") byte seed); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBRPContext.java b/LWJGL/src/main/java/org/lwjgl/stb/STBRPContext.java deleted file mode 100644 index b3834bff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBRPContext.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * The opaque {@code stbrp_context} struct. - * - *

    Layout

    - * - *
    
    - * struct stbrp_context {
    - *     int width;
    - *     int height;
    - *     int align;
    - *     int init_mode;
    - *     int heuristic;
    - *     int num_nodes;
    - *     {@link STBRPNode stbrp_node} * active_head;
    - *     {@link STBRPNode stbrp_node} * free_head;
    - *     {@link STBRPNode stbrp_node} {@link #extra}[2];
    - * }
    - */ -@NativeType("struct stbrp_context") -public class STBRPContext extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT, - ALIGN, - INIT_MODE, - HEURISTIC, - NUM_NODES, - ACTIVE_HEAD, - FREE_HEAD, - EXTRA; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __array(STBRPNode.SIZEOF, STBRPNode.ALIGNOF, 2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - ALIGN = layout.offsetof(2); - INIT_MODE = layout.offsetof(3); - HEURISTIC = layout.offsetof(4); - NUM_NODES = layout.offsetof(5); - ACTIVE_HEAD = layout.offsetof(6); - FREE_HEAD = layout.offsetof(7); - EXTRA = layout.offsetof(8); - } - - protected STBRPContext(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBRPContext create(long address, @Nullable ByteBuffer container) { - return new STBRPContext(address, container); - } - - /** - * Creates a {@code STBRPContext} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBRPContext(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code width} field. */ - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return nheight(address()); } - /** @return the value of the {@code align} field. */ - public int align() { return nalign(address()); } - /** @return the value of the {@code init_mode} field. */ - public int init_mode() { return ninit_mode(address()); } - /** @return the value of the {@code heuristic} field. */ - public int heuristic() { return nheuristic(address()); } - /** @return the value of the {@code num_nodes} field. */ - public int num_nodes() { return nnum_nodes(address()); } - /** @return a {@link STBRPNode} view of the struct pointed to by the {@code active_head} field. */ - @Nullable - @NativeType("stbrp_node *") - public STBRPNode active_head() { return nactive_head(address()); } - /** @return a {@link STBRPNode} view of the struct pointed to by the {@code free_head} field. */ - @Nullable - @NativeType("stbrp_node *") - public STBRPNode free_head() { return nfree_head(address()); } - /** we allocate two extra nodes so optimal user-node-count is {@code width} not {@code width+2} */ - @NativeType("stbrp_node[2]") - public STBRPNode.Buffer extra() { return nextra(address()); } - /** we allocate two extra nodes so optimal user-node-count is {@code width} not {@code width+2} */ - @NativeType("stbrp_node") - public STBRPNode extra(int index) { return nextra(address(), index); } - - // ----------------------------------- - - /** Returns a new {@code STBRPContext} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBRPContext malloc() { - return new STBRPContext(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBRPContext} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBRPContext calloc() { - return new STBRPContext(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBRPContext} instance allocated with {@link BufferUtils}. */ - public static STBRPContext create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBRPContext(memAddress(container), container); - } - - /** Returns a new {@code STBRPContext} instance for the specified memory address. */ - public static STBRPContext create(long address) { - return new STBRPContext(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBRPContext createSafe(long address) { - return address == NULL ? null : new STBRPContext(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBRPContext mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBRPContext callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBRPContext mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBRPContext callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBRPContext} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBRPContext malloc(MemoryStack stack) { - return new STBRPContext(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBRPContext} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBRPContext calloc(MemoryStack stack) { - return new STBRPContext(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + STBRPContext.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + STBRPContext.HEIGHT); } - /** Unsafe version of {@link #align}. */ - public static int nalign(long struct) { return UNSAFE.getInt(null, struct + STBRPContext.ALIGN); } - /** Unsafe version of {@link #init_mode}. */ - public static int ninit_mode(long struct) { return UNSAFE.getInt(null, struct + STBRPContext.INIT_MODE); } - /** Unsafe version of {@link #heuristic}. */ - public static int nheuristic(long struct) { return UNSAFE.getInt(null, struct + STBRPContext.HEURISTIC); } - /** Unsafe version of {@link #num_nodes}. */ - public static int nnum_nodes(long struct) { return UNSAFE.getInt(null, struct + STBRPContext.NUM_NODES); } - /** Unsafe version of {@link #active_head}. */ - @Nullable public static STBRPNode nactive_head(long struct) { return STBRPNode.createSafe(memGetAddress(struct + STBRPContext.ACTIVE_HEAD)); } - /** Unsafe version of {@link #free_head}. */ - @Nullable public static STBRPNode nfree_head(long struct) { return STBRPNode.createSafe(memGetAddress(struct + STBRPContext.FREE_HEAD)); } - /** Unsafe version of {@link #extra}. */ - public static STBRPNode.Buffer nextra(long struct) { return STBRPNode.create(struct + STBRPContext.EXTRA, 2); } - /** Unsafe version of {@link #extra(int) extra}. */ - public static STBRPNode nextra(long struct, int index) { - return STBRPNode.create(struct + STBRPContext.EXTRA + check(index, 2) * STBRPNode.SIZEOF); - } - - // ----------------------------------- - - /** An array of {@link STBRPContext} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBRPContext ELEMENT_FACTORY = STBRPContext.create(-1L); - - /** - * Creates a new {@code STBRPContext.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBRPContext#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBRPContext getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code width} field. */ - public int width() { return STBRPContext.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return STBRPContext.nheight(address()); } - /** @return the value of the {@code align} field. */ - public int align() { return STBRPContext.nalign(address()); } - /** @return the value of the {@code init_mode} field. */ - public int init_mode() { return STBRPContext.ninit_mode(address()); } - /** @return the value of the {@code heuristic} field. */ - public int heuristic() { return STBRPContext.nheuristic(address()); } - /** @return the value of the {@code num_nodes} field. */ - public int num_nodes() { return STBRPContext.nnum_nodes(address()); } - /** @return a {@link STBRPNode} view of the struct pointed to by the {@code active_head} field. */ - @Nullable - @NativeType("stbrp_node *") - public STBRPNode active_head() { return STBRPContext.nactive_head(address()); } - /** @return a {@link STBRPNode} view of the struct pointed to by the {@code free_head} field. */ - @Nullable - @NativeType("stbrp_node *") - public STBRPNode free_head() { return STBRPContext.nfree_head(address()); } - /** @return a {@link STBRPNode}.Buffer view of the {@link STBRPContext#extra} field. */ - @NativeType("stbrp_node[2]") - public STBRPNode.Buffer extra() { return STBRPContext.nextra(address()); } - /** @return a {@link STBRPNode} view of the struct at the specified index of the {@link STBRPContext#extra} field. */ - @NativeType("stbrp_node") - public STBRPNode extra(int index) { return STBRPContext.nextra(address(), index); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBRPNode.java b/LWJGL/src/main/java/org/lwjgl/stb/STBRPNode.java deleted file mode 100644 index 244f1efb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBRPNode.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * The opaque {@code stbrp_node} struct. - * - *

    Layout

    - * - *
    
    - * struct stbrp_node {
    - *     stbrp_coord x;
    - *     stbrp_coord y;
    - *     {@link STBRPNode stbrp_node} * next;
    - * }
    - */ -@NativeType("struct stbrp_node") -public class STBRPNode extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y, - NEXT; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - NEXT = layout.offsetof(2); - } - - protected STBRPNode(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBRPNode create(long address, @Nullable ByteBuffer container) { - return new STBRPNode(address, container); - } - - /** - * Creates a {@code STBRPNode} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBRPNode(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - @NativeType("stbrp_coord") - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("stbrp_coord") - public int y() { return ny(address()); } - /** @return a {@link STBRPNode} view of the struct pointed to by the {@code next} field. */ - @Nullable - @NativeType("stbrp_node *") - public STBRPNode next() { return nnext(address()); } - - // ----------------------------------- - - /** Returns a new {@code STBRPNode} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBRPNode malloc() { - return new STBRPNode(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBRPNode} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBRPNode calloc() { - return new STBRPNode(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBRPNode} instance allocated with {@link BufferUtils}. */ - public static STBRPNode create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBRPNode(memAddress(container), container); - } - - /** Returns a new {@code STBRPNode} instance for the specified memory address. */ - public static STBRPNode create(long address) { - return new STBRPNode(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBRPNode createSafe(long address) { - return address == NULL ? null : new STBRPNode(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBRPNode mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBRPNode callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBRPNode mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBRPNode callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBRPNode} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBRPNode malloc(MemoryStack stack) { - return new STBRPNode(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBRPNode} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBRPNode calloc(MemoryStack stack) { - return new STBRPNode(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + STBRPNode.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + STBRPNode.Y); } - /** Unsafe version of {@link #next}. */ - @Nullable public static STBRPNode nnext(long struct) { return STBRPNode.createSafe(memGetAddress(struct + STBRPNode.NEXT)); } - - // ----------------------------------- - - /** An array of {@link STBRPNode} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBRPNode ELEMENT_FACTORY = STBRPNode.create(-1L); - - /** - * Creates a new {@code STBRPNode.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBRPNode#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBRPNode getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - @NativeType("stbrp_coord") - public int x() { return STBRPNode.nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("stbrp_coord") - public int y() { return STBRPNode.ny(address()); } - /** @return a {@link STBRPNode} view of the struct pointed to by the {@code next} field. */ - @Nullable - @NativeType("stbrp_node *") - public STBRPNode next() { return STBRPNode.nnext(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBRPRect.java b/LWJGL/src/main/java/org/lwjgl/stb/STBRPRect.java deleted file mode 100644 index ccb916ff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBRPRect.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A packed rectangle. - * - *

    Layout

    - * - *
    
    - * struct stbrp_rect {
    - *     int {@link #id};
    - *     stbrp_coord {@link #w};
    - *     stbrp_coord {@link #h};
    - *     stbrp_coord {@link #x};
    - *     stbrp_coord {@link #y};
    - *     int {@link #was_packed};
    - * }
    - */ -@NativeType("struct stbrp_rect") -public class STBRPRect extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ID, - W, - H, - X, - Y, - WAS_PACKED; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ID = layout.offsetof(0); - W = layout.offsetof(1); - H = layout.offsetof(2); - X = layout.offsetof(3); - Y = layout.offsetof(4); - WAS_PACKED = layout.offsetof(5); - } - - protected STBRPRect(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBRPRect create(long address, @Nullable ByteBuffer container) { - return new STBRPRect(address, container); - } - - /** - * Creates a {@code STBRPRect} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBRPRect(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** reserved for your use */ - public int id() { return nid(address()); } - /** input width */ - @NativeType("stbrp_coord") - public int w() { return nw(address()); } - /** input height */ - @NativeType("stbrp_coord") - public int h() { return nh(address()); } - /** output x coordinate */ - @NativeType("stbrp_coord") - public int x() { return nx(address()); } - /** output y coordinate */ - @NativeType("stbrp_coord") - public int y() { return ny(address()); } - /** non-zero if valid packing */ - @NativeType("int") - public boolean was_packed() { return nwas_packed(address()) != 0; } - - /** Sets the specified value to the {@link #id} field. */ - public STBRPRect id(int value) { nid(address(), value); return this; } - /** Sets the specified value to the {@link #w} field. */ - public STBRPRect w(@NativeType("stbrp_coord") int value) { nw(address(), value); return this; } - /** Sets the specified value to the {@link #h} field. */ - public STBRPRect h(@NativeType("stbrp_coord") int value) { nh(address(), value); return this; } - /** Sets the specified value to the {@link #x} field. */ - public STBRPRect x(@NativeType("stbrp_coord") int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public STBRPRect y(@NativeType("stbrp_coord") int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@link #was_packed} field. */ - public STBRPRect was_packed(@NativeType("int") boolean value) { nwas_packed(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public STBRPRect set( - int id, - int w, - int h, - int x, - int y, - boolean was_packed - ) { - id(id); - w(w); - h(h); - x(x); - y(y); - was_packed(was_packed); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public STBRPRect set(STBRPRect src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code STBRPRect} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBRPRect malloc() { - return new STBRPRect(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBRPRect} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBRPRect calloc() { - return new STBRPRect(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBRPRect} instance allocated with {@link BufferUtils}. */ - public static STBRPRect create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBRPRect(memAddress(container), container); - } - - /** Returns a new {@code STBRPRect} instance for the specified memory address. */ - public static STBRPRect create(long address) { - return new STBRPRect(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBRPRect createSafe(long address) { - return address == NULL ? null : new STBRPRect(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBRPRect mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBRPRect callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBRPRect mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBRPRect callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBRPRect} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBRPRect malloc(MemoryStack stack) { - return new STBRPRect(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBRPRect} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBRPRect calloc(MemoryStack stack) { - return new STBRPRect(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #id}. */ - public static int nid(long struct) { return UNSAFE.getInt(null, struct + STBRPRect.ID); } - /** Unsafe version of {@link #w}. */ - public static int nw(long struct) { return UNSAFE.getInt(null, struct + STBRPRect.W); } - /** Unsafe version of {@link #h}. */ - public static int nh(long struct) { return UNSAFE.getInt(null, struct + STBRPRect.H); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + STBRPRect.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + STBRPRect.Y); } - /** Unsafe version of {@link #was_packed}. */ - public static int nwas_packed(long struct) { return UNSAFE.getInt(null, struct + STBRPRect.WAS_PACKED); } - - /** Unsafe version of {@link #id(int) id}. */ - public static void nid(long struct, int value) { UNSAFE.putInt(null, struct + STBRPRect.ID, value); } - /** Unsafe version of {@link #w(int) w}. */ - public static void nw(long struct, int value) { UNSAFE.putInt(null, struct + STBRPRect.W, value); } - /** Unsafe version of {@link #h(int) h}. */ - public static void nh(long struct, int value) { UNSAFE.putInt(null, struct + STBRPRect.H, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + STBRPRect.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + STBRPRect.Y, value); } - /** Unsafe version of {@link #was_packed(boolean) was_packed}. */ - public static void nwas_packed(long struct, int value) { UNSAFE.putInt(null, struct + STBRPRect.WAS_PACKED, value); } - - // ----------------------------------- - - /** An array of {@link STBRPRect} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBRPRect ELEMENT_FACTORY = STBRPRect.create(-1L); - - /** - * Creates a new {@code STBRPRect.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBRPRect#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBRPRect getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link STBRPRect#id} field. */ - public int id() { return STBRPRect.nid(address()); } - /** @return the value of the {@link STBRPRect#w} field. */ - @NativeType("stbrp_coord") - public int w() { return STBRPRect.nw(address()); } - /** @return the value of the {@link STBRPRect#h} field. */ - @NativeType("stbrp_coord") - public int h() { return STBRPRect.nh(address()); } - /** @return the value of the {@link STBRPRect#x} field. */ - @NativeType("stbrp_coord") - public int x() { return STBRPRect.nx(address()); } - /** @return the value of the {@link STBRPRect#y} field. */ - @NativeType("stbrp_coord") - public int y() { return STBRPRect.ny(address()); } - /** @return the value of the {@link STBRPRect#was_packed} field. */ - @NativeType("int") - public boolean was_packed() { return STBRPRect.nwas_packed(address()) != 0; } - - /** Sets the specified value to the {@link STBRPRect#id} field. */ - public Buffer id(int value) { STBRPRect.nid(address(), value); return this; } - /** Sets the specified value to the {@link STBRPRect#w} field. */ - public Buffer w(@NativeType("stbrp_coord") int value) { STBRPRect.nw(address(), value); return this; } - /** Sets the specified value to the {@link STBRPRect#h} field. */ - public Buffer h(@NativeType("stbrp_coord") int value) { STBRPRect.nh(address(), value); return this; } - /** Sets the specified value to the {@link STBRPRect#x} field. */ - public Buffer x(@NativeType("stbrp_coord") int value) { STBRPRect.nx(address(), value); return this; } - /** Sets the specified value to the {@link STBRPRect#y} field. */ - public Buffer y(@NativeType("stbrp_coord") int value) { STBRPRect.ny(address(), value); return this; } - /** Sets the specified value to the {@link STBRPRect#was_packed} field. */ - public Buffer was_packed(@NativeType("int") boolean value) { STBRPRect.nwas_packed(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBRectPack.java b/LWJGL/src/main/java/org/lwjgl/stb/STBRectPack.java deleted file mode 100644 index d8ce2e54..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBRectPack.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import org.lwjgl.system.*; - -/** - * Native bindings to stb_rect_pack.h from the stb library. - * - *

    Useful for e.g. packing rectangular textures into an atlas. Does not do rotation.

    - * - *

    This library currently uses the Skyline Bottom-Left algorithm. Not necessarily the awesomest packing method, but better than the totally naive one in - * stb_truetype (which is primarily what this is meant to replace).

    - */ -public class STBRectPack { - - static { LibSTB.initialize(); } - - /** Mostly for internal use, but this is the maximum supported coordinate value. */ - public static final int STBRP__MAXVAL = 0x7FFFFFFF; - - /** - * Packing heuristics - * - *
    Enum values:
    - * - *
      - *
    • {@link #STBRP_HEURISTIC_Skyline_default HEURISTIC_Skyline_default}
    • - *
    • {@link #STBRP_HEURISTIC_Skyline_BL_sortHeight HEURISTIC_Skyline_BL_sortHeight}
    • - *
    • {@link #STBRP_HEURISTIC_Skyline_BF_sortHeight HEURISTIC_Skyline_BF_sortHeight}
    • - *
    - */ - public static final int - STBRP_HEURISTIC_Skyline_default = 0, - STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default, - STBRP_HEURISTIC_Skyline_BF_sortHeight = 1; - - protected STBRectPack() { - throw new UnsupportedOperationException(); - } - - // --- [ stbrp_pack_rects ] --- - - /** - * Unsafe version of: {@link #stbrp_pack_rects pack_rects} - * - * @param num_rects the number of structs in {@code rects} - */ - public static native int nstbrp_pack_rects(long context, long rects, int num_rects); - - /** - * Assigns packed locations to rectangles. The rectangles are of type {@link STBRPRect}, stored in the array {@code rects}, and there are {@code num_rects} many - * of them. - * - *

    Rectangles which are successfully packed have the {@code was_packed} flag set to a non-zero value and {@code x} and {@code y} store the minimum - * location on each axis (i.e. bottom-left in cartesian coordinates, top-left if you imagine y increasing downwards). Rectangles which do not fit have the - * {@code was_packed} flag set to 0.

    - * - *

    You should not try to access the {@code rects} array from another thread while this function is running, as the function temporarily reorders the array - * while it executes.

    - * - *

    To pack into another rectangle, you need to call {@link #stbrp_init_target init_target} again. To continue packing into the same rectangle, you can call this function again. - * Calling this multiple times with multiple rect arrays will probably produce worse packing results than calling it a single time with the full rectangle - * array, but the option is available.

    - * - * @param context an {@link STBRPContext} struct - * @param rects an array of {@link STBRPRect} structs - * - * @return 1 if all of the rectangles were successfully packed and 0 otherwise - */ - public static int stbrp_pack_rects(@NativeType("stbrp_context *") STBRPContext context, @NativeType("stbrp_rect *") STBRPRect.Buffer rects) { - return nstbrp_pack_rects(context.address(), rects.address(), rects.remaining()); - } - - // --- [ stbrp_init_target ] --- - - /** - * Unsafe version of: {@link #stbrp_init_target init_target} - * - * @param num_nodes the number of structs in {@code nodes} - */ - public static native void nstbrp_init_target(long context, int width, int height, long nodes, int num_nodes); - - /** - * Initialize a rectangle packer to: pack a rectangle that is {@code width} by {@code height} in dimensions using temporary storage provided by the array - * {@code nodes}, which is {@code num_nodes} long. - * - *

    You must call this function every time you start packing into a new target.

    - * - *

    There is no "shutdown" function. The {@code nodes} memory must stay valid for the following {@link #stbrp_pack_rects pack_rects} call (or calls), but can be freed after the - * call (or calls) finish.

    - * - *

    Note: to guarantee best results, either:

    - * - *
      - *
    1. make sure {@code num_nodes ≥ width}
    2. - *
    3. or, call {@link #stbrp_setup_allow_out_of_mem setup_allow_out_of_mem} with {@code allow_out_of_mem = 1}
    4. - *
    - * - *

    If you don't do either of the above things, widths will be quantized to multiples of small integers to guarantee the algorithm doesn't run out of - * temporary storage.

    - * - *

    If you do #2, then the non-quantized algorithm will be used, but the algorithm may run out of temporary storage and be unable to pack some rectangles.

    - * - * @param context an {@link STBRPContext} struct - * @param width the rectangle width - * @param height the rectangle height - * @param nodes an array of {@link STBRPNode} structs - */ - public static void stbrp_init_target(@NativeType("stbrp_context *") STBRPContext context, int width, int height, @NativeType("stbrp_node *") STBRPNode.Buffer nodes) { - nstbrp_init_target(context.address(), width, height, nodes.address(), nodes.remaining()); - } - - // --- [ stbrp_setup_allow_out_of_mem ] --- - - /** Unsafe version of: {@link #stbrp_setup_allow_out_of_mem setup_allow_out_of_mem} */ - public static native void nstbrp_setup_allow_out_of_mem(long context, int allow_out_of_mem); - - /** - * Optionally call this function after init but before doing any packing to change the handling of the out-of-temp-memory scenario, described in - * {@link #stbrp_init_target init_target}. If you call init again, this will be reset to the default (false). - * - * @param context an {@link STBRPContext} struct - * @param allow_out_of_mem 1 to allow running out of temporary storage - */ - public static void stbrp_setup_allow_out_of_mem(@NativeType("stbrp_context *") STBRPContext context, @NativeType("int") boolean allow_out_of_mem) { - nstbrp_setup_allow_out_of_mem(context.address(), allow_out_of_mem ? 1 : 0); - } - - // --- [ stbrp_setup_heuristic ] --- - - /** Unsafe version of: {@link #stbrp_setup_heuristic setup_heuristic} */ - public static native void nstbrp_setup_heuristic(long context, int heuristic); - - /** - * Optionally select which packing heuristic the library should use. Different heuristics will produce better/worse results for different data sets. If - * you call init again, this will be reset to the default. - * - * @param context an {@link STBRPContext} struct - * @param heuristic the packing heuristic - */ - public static void stbrp_setup_heuristic(@NativeType("stbrp_context *") STBRPContext context, int heuristic) { - nstbrp_setup_heuristic(context.address(), heuristic); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTAlignedQuad.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTAlignedQuad.java deleted file mode 100644 index 544ddb91..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTAlignedQuad.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Quad used for drawing a baked character, returned by {@link STBTruetype#stbtt_GetBakedQuad GetBakedQuad}. - * - *

    Layout

    - * - *
    
    - * struct stbtt_aligned_quad {
    - *     float x0;
    - *     float y0;
    - *     float s0;
    - *     float t0;
    - *     float x1;
    - *     float y1;
    - *     float s1;
    - *     float t1;
    - * }
    - */ -@NativeType("struct stbtt_aligned_quad") -public class STBTTAlignedQuad extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X0, - Y0, - S0, - T0, - X1, - Y1, - S1, - T1; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X0 = layout.offsetof(0); - Y0 = layout.offsetof(1); - S0 = layout.offsetof(2); - T0 = layout.offsetof(3); - X1 = layout.offsetof(4); - Y1 = layout.offsetof(5); - S1 = layout.offsetof(6); - T1 = layout.offsetof(7); - } - - protected STBTTAlignedQuad(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTAlignedQuad create(long address, @Nullable ByteBuffer container) { - return new STBTTAlignedQuad(address, container); - } - - /** - * Creates a {@code STBTTAlignedQuad} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTAlignedQuad(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x0} field. */ - public float x0() { return nx0(address()); } - /** @return the value of the {@code y0} field. */ - public float y0() { return ny0(address()); } - /** @return the value of the {@code s0} field. */ - public float s0() { return ns0(address()); } - /** @return the value of the {@code t0} field. */ - public float t0() { return nt0(address()); } - /** @return the value of the {@code x1} field. */ - public float x1() { return nx1(address()); } - /** @return the value of the {@code y1} field. */ - public float y1() { return ny1(address()); } - /** @return the value of the {@code s1} field. */ - public float s1() { return ns1(address()); } - /** @return the value of the {@code t1} field. */ - public float t1() { return nt1(address()); } - - // ----------------------------------- - - /** Returns a new {@code STBTTAlignedQuad} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTAlignedQuad malloc() { - return new STBTTAlignedQuad(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTAlignedQuad} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTAlignedQuad calloc() { - return new STBTTAlignedQuad(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTAlignedQuad} instance allocated with {@link BufferUtils}. */ - public static STBTTAlignedQuad create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTAlignedQuad(memAddress(container), container); - } - - /** Returns a new {@code STBTTAlignedQuad} instance for the specified memory address. */ - public static STBTTAlignedQuad create(long address) { - return new STBTTAlignedQuad(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTAlignedQuad createSafe(long address) { - return address == NULL ? null : new STBTTAlignedQuad(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTAlignedQuad mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTAlignedQuad callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTAlignedQuad mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTAlignedQuad callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTAlignedQuad} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTAlignedQuad malloc(MemoryStack stack) { - return new STBTTAlignedQuad(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTAlignedQuad} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTAlignedQuad calloc(MemoryStack stack) { - return new STBTTAlignedQuad(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x0}. */ - public static float nx0(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.X0); } - /** Unsafe version of {@link #y0}. */ - public static float ny0(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.Y0); } - /** Unsafe version of {@link #s0}. */ - public static float ns0(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.S0); } - /** Unsafe version of {@link #t0}. */ - public static float nt0(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.T0); } - /** Unsafe version of {@link #x1}. */ - public static float nx1(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.X1); } - /** Unsafe version of {@link #y1}. */ - public static float ny1(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.Y1); } - /** Unsafe version of {@link #s1}. */ - public static float ns1(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.S1); } - /** Unsafe version of {@link #t1}. */ - public static float nt1(long struct) { return UNSAFE.getFloat(null, struct + STBTTAlignedQuad.T1); } - - // ----------------------------------- - - /** An array of {@link STBTTAlignedQuad} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTAlignedQuad ELEMENT_FACTORY = STBTTAlignedQuad.create(-1L); - - /** - * Creates a new {@code STBTTAlignedQuad.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTAlignedQuad#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTAlignedQuad getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x0} field. */ - public float x0() { return STBTTAlignedQuad.nx0(address()); } - /** @return the value of the {@code y0} field. */ - public float y0() { return STBTTAlignedQuad.ny0(address()); } - /** @return the value of the {@code s0} field. */ - public float s0() { return STBTTAlignedQuad.ns0(address()); } - /** @return the value of the {@code t0} field. */ - public float t0() { return STBTTAlignedQuad.nt0(address()); } - /** @return the value of the {@code x1} field. */ - public float x1() { return STBTTAlignedQuad.nx1(address()); } - /** @return the value of the {@code y1} field. */ - public float y1() { return STBTTAlignedQuad.ny1(address()); } - /** @return the value of the {@code s1} field. */ - public float s1() { return STBTTAlignedQuad.ns1(address()); } - /** @return the value of the {@code t1} field. */ - public float t1() { return STBTTAlignedQuad.nt1(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTBakedChar.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTBakedChar.java deleted file mode 100644 index 0f596308..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTBakedChar.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Baked character data, returned by {@link STBTruetype#stbtt_BakeFontBitmap BakeFontBitmap}. - * - *

    Layout

    - * - *
    
    - * struct stbtt_bakedchar {
    - *     unsigned short x0;
    - *     unsigned short y0;
    - *     unsigned short x1;
    - *     unsigned short y1;
    - *     float xoff;
    - *     float yoff;
    - *     float xadvance;
    - * }
    - */ -@NativeType("struct stbtt_bakedchar") -public class STBTTBakedChar extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X0, - Y0, - X1, - Y1, - XOFF, - YOFF, - XADVANCE; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(2), - __member(2), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X0 = layout.offsetof(0); - Y0 = layout.offsetof(1); - X1 = layout.offsetof(2); - Y1 = layout.offsetof(3); - XOFF = layout.offsetof(4); - YOFF = layout.offsetof(5); - XADVANCE = layout.offsetof(6); - } - - protected STBTTBakedChar(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTBakedChar create(long address, @Nullable ByteBuffer container) { - return new STBTTBakedChar(address, container); - } - - /** - * Creates a {@code STBTTBakedChar} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTBakedChar(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x0} field. */ - @NativeType("unsigned short") - public short x0() { return nx0(address()); } - /** @return the value of the {@code y0} field. */ - @NativeType("unsigned short") - public short y0() { return ny0(address()); } - /** @return the value of the {@code x1} field. */ - @NativeType("unsigned short") - public short x1() { return nx1(address()); } - /** @return the value of the {@code y1} field. */ - @NativeType("unsigned short") - public short y1() { return ny1(address()); } - /** @return the value of the {@code xoff} field. */ - public float xoff() { return nxoff(address()); } - /** @return the value of the {@code yoff} field. */ - public float yoff() { return nyoff(address()); } - /** @return the value of the {@code xadvance} field. */ - public float xadvance() { return nxadvance(address()); } - - // ----------------------------------- - - /** Returns a new {@code STBTTBakedChar} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTBakedChar malloc() { - return new STBTTBakedChar(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTBakedChar} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTBakedChar calloc() { - return new STBTTBakedChar(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTBakedChar} instance allocated with {@link BufferUtils}. */ - public static STBTTBakedChar create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTBakedChar(memAddress(container), container); - } - - /** Returns a new {@code STBTTBakedChar} instance for the specified memory address. */ - public static STBTTBakedChar create(long address) { - return new STBTTBakedChar(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTBakedChar createSafe(long address) { - return address == NULL ? null : new STBTTBakedChar(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBakedChar mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBakedChar callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBakedChar mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBakedChar callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTBakedChar} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTBakedChar malloc(MemoryStack stack) { - return new STBTTBakedChar(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTBakedChar} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTBakedChar calloc(MemoryStack stack) { - return new STBTTBakedChar(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x0}. */ - public static short nx0(long struct) { return UNSAFE.getShort(null, struct + STBTTBakedChar.X0); } - /** Unsafe version of {@link #y0}. */ - public static short ny0(long struct) { return UNSAFE.getShort(null, struct + STBTTBakedChar.Y0); } - /** Unsafe version of {@link #x1}. */ - public static short nx1(long struct) { return UNSAFE.getShort(null, struct + STBTTBakedChar.X1); } - /** Unsafe version of {@link #y1}. */ - public static short ny1(long struct) { return UNSAFE.getShort(null, struct + STBTTBakedChar.Y1); } - /** Unsafe version of {@link #xoff}. */ - public static float nxoff(long struct) { return UNSAFE.getFloat(null, struct + STBTTBakedChar.XOFF); } - /** Unsafe version of {@link #yoff}. */ - public static float nyoff(long struct) { return UNSAFE.getFloat(null, struct + STBTTBakedChar.YOFF); } - /** Unsafe version of {@link #xadvance}. */ - public static float nxadvance(long struct) { return UNSAFE.getFloat(null, struct + STBTTBakedChar.XADVANCE); } - - // ----------------------------------- - - /** An array of {@link STBTTBakedChar} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTBakedChar ELEMENT_FACTORY = STBTTBakedChar.create(-1L); - - /** - * Creates a new {@code STBTTBakedChar.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTBakedChar#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTBakedChar getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x0} field. */ - @NativeType("unsigned short") - public short x0() { return STBTTBakedChar.nx0(address()); } - /** @return the value of the {@code y0} field. */ - @NativeType("unsigned short") - public short y0() { return STBTTBakedChar.ny0(address()); } - /** @return the value of the {@code x1} field. */ - @NativeType("unsigned short") - public short x1() { return STBTTBakedChar.nx1(address()); } - /** @return the value of the {@code y1} field. */ - @NativeType("unsigned short") - public short y1() { return STBTTBakedChar.ny1(address()); } - /** @return the value of the {@code xoff} field. */ - public float xoff() { return STBTTBakedChar.nxoff(address()); } - /** @return the value of the {@code yoff} field. */ - public float yoff() { return STBTTBakedChar.nyoff(address()); } - /** @return the value of the {@code xadvance} field. */ - public float xadvance() { return STBTTBakedChar.nxadvance(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTBitmap.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTBitmap.java deleted file mode 100644 index 5082dc56..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTBitmap.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Bitmap data. - * - *

    Layout

    - * - *
    
    - * struct stbtt__bitmap {
    - *     int {@link #w};
    - *     int {@link #h};
    - *     int {@link #stride};
    - *     unsigned char * {@link #pixels};
    - * }
    - */ -@NativeType("struct stbtt__bitmap") -public class STBTTBitmap extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - W, - H, - STRIDE, - PIXELS; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - W = layout.offsetof(0); - H = layout.offsetof(1); - STRIDE = layout.offsetof(2); - PIXELS = layout.offsetof(3); - } - - protected STBTTBitmap(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTBitmap create(long address, @Nullable ByteBuffer container) { - return new STBTTBitmap(address, container); - } - - /** - * Creates a {@code STBTTBitmap} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTBitmap(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the bitmap width */ - public int w() { return nw(address()); } - /** the bitmap height */ - public int h() { return nh(address()); } - /** the row stride, in bytes */ - public int stride() { return nstride(address()); } - /** - * @param capacity the number of elements in the returned buffer - * - * @return the bitmap data - */ - @NativeType("unsigned char *") - public ByteBuffer pixels(int capacity) { return npixels(address(), capacity); } - - /** Sets the specified value to the {@link #w} field. */ - public STBTTBitmap w(int value) { nw(address(), value); return this; } - /** Sets the specified value to the {@link #h} field. */ - public STBTTBitmap h(int value) { nh(address(), value); return this; } - /** Sets the specified value to the {@link #stride} field. */ - public STBTTBitmap stride(int value) { nstride(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@link #pixels} field. */ - public STBTTBitmap pixels(@NativeType("unsigned char *") ByteBuffer value) { npixels(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public STBTTBitmap set( - int w, - int h, - int stride, - ByteBuffer pixels - ) { - w(w); - h(h); - stride(stride); - pixels(pixels); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public STBTTBitmap set(STBTTBitmap src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code STBTTBitmap} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTBitmap malloc() { - return new STBTTBitmap(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTBitmap} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTBitmap calloc() { - return new STBTTBitmap(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTBitmap} instance allocated with {@link BufferUtils}. */ - public static STBTTBitmap create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTBitmap(memAddress(container), container); - } - - /** Returns a new {@code STBTTBitmap} instance for the specified memory address. */ - public static STBTTBitmap create(long address) { - return new STBTTBitmap(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTBitmap createSafe(long address) { - return address == NULL ? null : new STBTTBitmap(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBitmap mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBitmap callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBitmap mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTBitmap callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTBitmap} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTBitmap malloc(MemoryStack stack) { - return new STBTTBitmap(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTBitmap} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTBitmap calloc(MemoryStack stack) { - return new STBTTBitmap(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #w}. */ - public static int nw(long struct) { return UNSAFE.getInt(null, struct + STBTTBitmap.W); } - /** Unsafe version of {@link #h}. */ - public static int nh(long struct) { return UNSAFE.getInt(null, struct + STBTTBitmap.H); } - /** Unsafe version of {@link #stride}. */ - public static int nstride(long struct) { return UNSAFE.getInt(null, struct + STBTTBitmap.STRIDE); } - /** Unsafe version of {@link #pixels(int) pixels}. */ - public static ByteBuffer npixels(long struct, int capacity) { return memByteBuffer(memGetAddress(struct + STBTTBitmap.PIXELS), capacity); } - - /** Unsafe version of {@link #w(int) w}. */ - public static void nw(long struct, int value) { UNSAFE.putInt(null, struct + STBTTBitmap.W, value); } - /** Unsafe version of {@link #h(int) h}. */ - public static void nh(long struct, int value) { UNSAFE.putInt(null, struct + STBTTBitmap.H, value); } - /** Unsafe version of {@link #stride(int) stride}. */ - public static void nstride(long struct, int value) { UNSAFE.putInt(null, struct + STBTTBitmap.STRIDE, value); } - /** Unsafe version of {@link #pixels(ByteBuffer) pixels}. */ - public static void npixels(long struct, ByteBuffer value) { memPutAddress(struct + STBTTBitmap.PIXELS, memAddress(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + STBTTBitmap.PIXELS)); - } - - // ----------------------------------- - - /** An array of {@link STBTTBitmap} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTBitmap ELEMENT_FACTORY = STBTTBitmap.create(-1L); - - /** - * Creates a new {@code STBTTBitmap.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTBitmap#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTBitmap getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link STBTTBitmap#w} field. */ - public int w() { return STBTTBitmap.nw(address()); } - /** @return the value of the {@link STBTTBitmap#h} field. */ - public int h() { return STBTTBitmap.nh(address()); } - /** @return the value of the {@link STBTTBitmap#stride} field. */ - public int stride() { return STBTTBitmap.nstride(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@link STBTTBitmap#pixels} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned char *") - public ByteBuffer pixels(int capacity) { return STBTTBitmap.npixels(address(), capacity); } - - /** Sets the specified value to the {@link STBTTBitmap#w} field. */ - public Buffer w(int value) { STBTTBitmap.nw(address(), value); return this; } - /** Sets the specified value to the {@link STBTTBitmap#h} field. */ - public Buffer h(int value) { STBTTBitmap.nh(address(), value); return this; } - /** Sets the specified value to the {@link STBTTBitmap#stride} field. */ - public Buffer stride(int value) { STBTTBitmap.nstride(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@link STBTTBitmap#pixels} field. */ - public Buffer pixels(@NativeType("unsigned char *") ByteBuffer value) { STBTTBitmap.npixels(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTFontinfo.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTFontinfo.java deleted file mode 100644 index 85e1db97..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTFontinfo.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** An opaque structure that contains font information. */ -@NativeType("struct stbtt_fontinfo") -public class STBTTFontinfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - static { - LibSTB.initialize(); - - try (MemoryStack stack = stackPush()) { - IntBuffer offsets = stack.mallocInt(1); - SIZEOF = offsets(memAddress(offsets)); - ALIGNOF = offsets.get(0); - } - } - - private static native int offsets(long buffer); - - protected STBTTFontinfo(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTFontinfo create(long address, @Nullable ByteBuffer container) { - return new STBTTFontinfo(address, container); - } - - /** - * Creates a {@code STBTTFontinfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTFontinfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - // ----------------------------------- - - /** Returns a new {@code STBTTFontinfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTFontinfo malloc() { - return new STBTTFontinfo(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTFontinfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTFontinfo calloc() { - return new STBTTFontinfo(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTFontinfo} instance allocated with {@link BufferUtils}. */ - public static STBTTFontinfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTFontinfo(memAddress(container), container); - } - - /** Returns a new {@code STBTTFontinfo} instance for the specified memory address. */ - public static STBTTFontinfo create(long address) { - return new STBTTFontinfo(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTFontinfo createSafe(long address) { - return address == NULL ? null : new STBTTFontinfo(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTFontinfo mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTFontinfo callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTFontinfo mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTFontinfo callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTFontinfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTFontinfo malloc(MemoryStack stack) { - return new STBTTFontinfo(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTFontinfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTFontinfo calloc(MemoryStack stack) { - return new STBTTFontinfo(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - // ----------------------------------- - - /** An array of {@link STBTTFontinfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTFontinfo ELEMENT_FACTORY = STBTTFontinfo.create(-1L); - - /** - * Creates a new {@code STBTTFontinfo.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTFontinfo#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTFontinfo getElementFactory() { - return ELEMENT_FACTORY; - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTKerningentry.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTKerningentry.java deleted file mode 100644 index 7cf971eb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTKerningentry.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct stbtt_kerningentry {
    - *     int glyph1;
    - *     int glyph2;
    - *     int advance;
    - * }
    - */ -@NativeType("struct stbtt_kerningentry") -public class STBTTKerningentry extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - GLYPH1, - GLYPH2, - ADVANCE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - GLYPH1 = layout.offsetof(0); - GLYPH2 = layout.offsetof(1); - ADVANCE = layout.offsetof(2); - } - - protected STBTTKerningentry(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTKerningentry create(long address, @Nullable ByteBuffer container) { - return new STBTTKerningentry(address, container); - } - - /** - * Creates a {@code STBTTKerningentry} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTKerningentry(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code glyph1} field. */ - public int glyph1() { return nglyph1(address()); } - /** @return the value of the {@code glyph2} field. */ - public int glyph2() { return nglyph2(address()); } - /** @return the value of the {@code advance} field. */ - public int advance() { return nadvance(address()); } - - // ----------------------------------- - - /** Returns a new {@code STBTTKerningentry} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTKerningentry malloc() { - return new STBTTKerningentry(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTKerningentry} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTKerningentry calloc() { - return new STBTTKerningentry(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTKerningentry} instance allocated with {@link BufferUtils}. */ - public static STBTTKerningentry create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTKerningentry(memAddress(container), container); - } - - /** Returns a new {@code STBTTKerningentry} instance for the specified memory address. */ - public static STBTTKerningentry create(long address) { - return new STBTTKerningentry(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTKerningentry createSafe(long address) { - return address == NULL ? null : new STBTTKerningentry(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code STBTTKerningentry} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTKerningentry malloc(MemoryStack stack) { - return new STBTTKerningentry(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTKerningentry} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTKerningentry calloc(MemoryStack stack) { - return new STBTTKerningentry(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #glyph1}. */ - public static int nglyph1(long struct) { return UNSAFE.getInt(null, struct + STBTTKerningentry.GLYPH1); } - /** Unsafe version of {@link #glyph2}. */ - public static int nglyph2(long struct) { return UNSAFE.getInt(null, struct + STBTTKerningentry.GLYPH2); } - /** Unsafe version of {@link #advance}. */ - public static int nadvance(long struct) { return UNSAFE.getInt(null, struct + STBTTKerningentry.ADVANCE); } - - // ----------------------------------- - - /** An array of {@link STBTTKerningentry} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTKerningentry ELEMENT_FACTORY = STBTTKerningentry.create(-1L); - - /** - * Creates a new {@code STBTTKerningentry.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTKerningentry#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTKerningentry getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code glyph1} field. */ - public int glyph1() { return STBTTKerningentry.nglyph1(address()); } - /** @return the value of the {@code glyph2} field. */ - public int glyph2() { return STBTTKerningentry.nglyph2(address()); } - /** @return the value of the {@code advance} field. */ - public int advance() { return STBTTKerningentry.nadvance(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackContext.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackContext.java deleted file mode 100644 index cadb3323..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackContext.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * An opaque structure which holds all the context needed from {@link STBTruetype#stbtt_PackBegin PackBegin} to {@link STBTruetype#stbtt_PackEnd PackEnd}. - * - *

    Layout

    - * - *
    
    - * struct stbtt_pack_context {
    - *     void * user_allocator_context;
    - *     {@link STBRPContext stbrp_context} * pack_info;
    - *     int width;
    - *     int height;
    - *     int stride_in_bytes;
    - *     int padding;
    - *     int skip_missing;
    - *     unsigned int h_oversample;
    - *     unsigned int v_oversample;
    - *     unsigned char * pixels;
    - *     {@link STBRPNode stbrp_node} * nodes;
    - * }
    - */ -@NativeType("struct stbtt_pack_context") -public class STBTTPackContext extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - USER_ALLOCATOR_CONTEXT, - PACK_INFO, - WIDTH, - HEIGHT, - STRIDE_IN_BYTES, - PADDING, - SKIP_MISSING, - H_OVERSAMPLE, - V_OVERSAMPLE, - PIXELS, - NODES; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - USER_ALLOCATOR_CONTEXT = layout.offsetof(0); - PACK_INFO = layout.offsetof(1); - WIDTH = layout.offsetof(2); - HEIGHT = layout.offsetof(3); - STRIDE_IN_BYTES = layout.offsetof(4); - PADDING = layout.offsetof(5); - SKIP_MISSING = layout.offsetof(6); - H_OVERSAMPLE = layout.offsetof(7); - V_OVERSAMPLE = layout.offsetof(8); - PIXELS = layout.offsetof(9); - NODES = layout.offsetof(10); - } - - protected STBTTPackContext(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTPackContext create(long address, @Nullable ByteBuffer container) { - return new STBTTPackContext(address, container); - } - - /** - * Creates a {@code STBTTPackContext} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTPackContext(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code user_allocator_context} field. */ - @NativeType("void *") - public long user_allocator_context() { return nuser_allocator_context(address()); } - /** @return a {@link STBRPContext} view of the struct pointed to by the {@code pack_info} field. */ - @NativeType("stbrp_context *") - public STBRPContext pack_info() { return npack_info(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return nheight(address()); } - /** @return the value of the {@code stride_in_bytes} field. */ - public int stride_in_bytes() { return nstride_in_bytes(address()); } - /** @return the value of the {@code padding} field. */ - public int padding() { return npadding(address()); } - /** @return the value of the {@code skip_missing} field. */ - @NativeType("int") - public boolean skip_missing() { return nskip_missing(address()) != 0; } - /** @return the value of the {@code h_oversample} field. */ - @NativeType("unsigned int") - public int h_oversample() { return nh_oversample(address()); } - /** @return the value of the {@code v_oversample} field. */ - @NativeType("unsigned int") - public int v_oversample() { return nv_oversample(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code pixels} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned char *") - public ByteBuffer pixels(int capacity) { return npixels(address(), capacity); } - /** - * @return a {@link STBRPNode.Buffer} view of the struct array pointed to by the {@code nodes} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("stbrp_node *") - public STBRPNode.Buffer nodes(int capacity) { return nnodes(address(), capacity); } - - // ----------------------------------- - - /** Returns a new {@code STBTTPackContext} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTPackContext malloc() { - return new STBTTPackContext(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTPackContext} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTPackContext calloc() { - return new STBTTPackContext(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTPackContext} instance allocated with {@link BufferUtils}. */ - public static STBTTPackContext create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTPackContext(memAddress(container), container); - } - - /** Returns a new {@code STBTTPackContext} instance for the specified memory address. */ - public static STBTTPackContext create(long address) { - return new STBTTPackContext(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTPackContext createSafe(long address) { - return address == NULL ? null : new STBTTPackContext(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackContext mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackContext callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackContext mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackContext callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTPackContext} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTPackContext malloc(MemoryStack stack) { - return new STBTTPackContext(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTPackContext} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTPackContext calloc(MemoryStack stack) { - return new STBTTPackContext(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #user_allocator_context}. */ - public static long nuser_allocator_context(long struct) { return memGetAddress(struct + STBTTPackContext.USER_ALLOCATOR_CONTEXT); } - /** Unsafe version of {@link #pack_info}. */ - public static STBRPContext npack_info(long struct) { return STBRPContext.create(memGetAddress(struct + STBTTPackContext.PACK_INFO)); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + STBTTPackContext.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + STBTTPackContext.HEIGHT); } - /** Unsafe version of {@link #stride_in_bytes}. */ - public static int nstride_in_bytes(long struct) { return UNSAFE.getInt(null, struct + STBTTPackContext.STRIDE_IN_BYTES); } - /** Unsafe version of {@link #padding}. */ - public static int npadding(long struct) { return UNSAFE.getInt(null, struct + STBTTPackContext.PADDING); } - /** Unsafe version of {@link #skip_missing}. */ - public static int nskip_missing(long struct) { return UNSAFE.getInt(null, struct + STBTTPackContext.SKIP_MISSING); } - /** Unsafe version of {@link #h_oversample}. */ - public static int nh_oversample(long struct) { return UNSAFE.getInt(null, struct + STBTTPackContext.H_OVERSAMPLE); } - /** Unsafe version of {@link #v_oversample}. */ - public static int nv_oversample(long struct) { return UNSAFE.getInt(null, struct + STBTTPackContext.V_OVERSAMPLE); } - /** Unsafe version of {@link #pixels(int) pixels}. */ - public static ByteBuffer npixels(long struct, int capacity) { return memByteBuffer(memGetAddress(struct + STBTTPackContext.PIXELS), capacity); } - /** Unsafe version of {@link #nodes}. */ - public static STBRPNode.Buffer nnodes(long struct, int capacity) { return STBRPNode.create(memGetAddress(struct + STBTTPackContext.NODES), capacity); } - - // ----------------------------------- - - /** An array of {@link STBTTPackContext} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTPackContext ELEMENT_FACTORY = STBTTPackContext.create(-1L); - - /** - * Creates a new {@code STBTTPackContext.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTPackContext#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTPackContext getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code user_allocator_context} field. */ - @NativeType("void *") - public long user_allocator_context() { return STBTTPackContext.nuser_allocator_context(address()); } - /** @return a {@link STBRPContext} view of the struct pointed to by the {@code pack_info} field. */ - @NativeType("stbrp_context *") - public STBRPContext pack_info() { return STBTTPackContext.npack_info(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return STBTTPackContext.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return STBTTPackContext.nheight(address()); } - /** @return the value of the {@code stride_in_bytes} field. */ - public int stride_in_bytes() { return STBTTPackContext.nstride_in_bytes(address()); } - /** @return the value of the {@code padding} field. */ - public int padding() { return STBTTPackContext.npadding(address()); } - /** @return the value of the {@code skip_missing} field. */ - @NativeType("int") - public boolean skip_missing() { return STBTTPackContext.nskip_missing(address()) != 0; } - /** @return the value of the {@code h_oversample} field. */ - @NativeType("unsigned int") - public int h_oversample() { return STBTTPackContext.nh_oversample(address()); } - /** @return the value of the {@code v_oversample} field. */ - @NativeType("unsigned int") - public int v_oversample() { return STBTTPackContext.nv_oversample(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code pixels} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned char *") - public ByteBuffer pixels(int capacity) { return STBTTPackContext.npixels(address(), capacity); } - /** - * @return a {@link STBRPNode.Buffer} view of the struct array pointed to by the {@code nodes} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("stbrp_node *") - public STBRPNode.Buffer nodes(int capacity) { return STBTTPackContext.nnodes(address(), capacity); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackRange.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackRange.java deleted file mode 100644 index 382ba82c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackRange.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A range of packed character data, used by {@link STBTruetype#stbtt_PackFontRanges PackFontRanges} - * - *

    Layout

    - * - *
    
    - * struct stbtt_pack_range {
    - *     float {@link #font_size};
    - *     int {@link #first_unicode_codepoint_in_range};
    - *     int * {@link #array_of_unicode_codepoints};
    - *     int {@link #num_chars};
    - *     {@link STBTTPackedchar stbtt_packedchar} * {@link #chardata_for_range};
    - *     unsigned char {@link #h_oversample};
    - *     unsigned char {@link #v_oversample};
    - * }
    - */ -@NativeType("struct stbtt_pack_range") -public class STBTTPackRange extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FONT_SIZE, - FIRST_UNICODE_CODEPOINT_IN_RANGE, - ARRAY_OF_UNICODE_CODEPOINTS, - NUM_CHARS, - CHARDATA_FOR_RANGE, - H_OVERSAMPLE, - V_OVERSAMPLE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(1), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FONT_SIZE = layout.offsetof(0); - FIRST_UNICODE_CODEPOINT_IN_RANGE = layout.offsetof(1); - ARRAY_OF_UNICODE_CODEPOINTS = layout.offsetof(2); - NUM_CHARS = layout.offsetof(3); - CHARDATA_FOR_RANGE = layout.offsetof(4); - H_OVERSAMPLE = layout.offsetof(5); - V_OVERSAMPLE = layout.offsetof(6); - } - - protected STBTTPackRange(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTPackRange create(long address, @Nullable ByteBuffer container) { - return new STBTTPackRange(address, container); - } - - /** - * Creates a {@code STBTTPackRange} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTPackRange(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the font size */ - public float font_size() { return nfont_size(address()); } - /** if non-zero, then the chars are continuous, and this is the first codepoint */ - public int first_unicode_codepoint_in_range() { return nfirst_unicode_codepoint_in_range(address()); } - /** if non-zero, then this is an array of unicode codepoints */ - @Nullable - @NativeType("int *") - public IntBuffer array_of_unicode_codepoints() { return narray_of_unicode_codepoints(address()); } - /** the number of codepoints in the range */ - public int num_chars() { return nnum_chars(address()); } - /** output */ - @NativeType("stbtt_packedchar *") - public STBTTPackedchar.Buffer chardata_for_range() { return nchardata_for_range(address()); } - /** used internally */ - @NativeType("unsigned char") - public byte h_oversample() { return nh_oversample(address()); } - /** used internally */ - @NativeType("unsigned char") - public byte v_oversample() { return nv_oversample(address()); } - - /** Sets the specified value to the {@link #font_size} field. */ - public STBTTPackRange font_size(float value) { nfont_size(address(), value); return this; } - /** Sets the specified value to the {@link #first_unicode_codepoint_in_range} field. */ - public STBTTPackRange first_unicode_codepoint_in_range(int value) { nfirst_unicode_codepoint_in_range(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link #array_of_unicode_codepoints} field. */ - public STBTTPackRange array_of_unicode_codepoints(@Nullable @NativeType("int *") IntBuffer value) { narray_of_unicode_codepoints(address(), value); return this; } - /** Sets the specified value to the {@link #num_chars} field. */ - public STBTTPackRange num_chars(int value) { nnum_chars(address(), value); return this; } - /** Sets the address of the specified {@link STBTTPackedchar.Buffer} to the {@link #chardata_for_range} field. */ - public STBTTPackRange chardata_for_range(@NativeType("stbtt_packedchar *") STBTTPackedchar.Buffer value) { nchardata_for_range(address(), value); return this; } - /** Sets the specified value to the {@link #h_oversample} field. */ - public STBTTPackRange h_oversample(@NativeType("unsigned char") byte value) { nh_oversample(address(), value); return this; } - /** Sets the specified value to the {@link #v_oversample} field. */ - public STBTTPackRange v_oversample(@NativeType("unsigned char") byte value) { nv_oversample(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public STBTTPackRange set( - float font_size, - int first_unicode_codepoint_in_range, - @Nullable IntBuffer array_of_unicode_codepoints, - int num_chars, - STBTTPackedchar.Buffer chardata_for_range, - byte h_oversample, - byte v_oversample - ) { - font_size(font_size); - first_unicode_codepoint_in_range(first_unicode_codepoint_in_range); - array_of_unicode_codepoints(array_of_unicode_codepoints); - num_chars(num_chars); - chardata_for_range(chardata_for_range); - h_oversample(h_oversample); - v_oversample(v_oversample); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public STBTTPackRange set(STBTTPackRange src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code STBTTPackRange} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTPackRange malloc() { - return new STBTTPackRange(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTPackRange} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTPackRange calloc() { - return new STBTTPackRange(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTPackRange} instance allocated with {@link BufferUtils}. */ - public static STBTTPackRange create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTPackRange(memAddress(container), container); - } - - /** Returns a new {@code STBTTPackRange} instance for the specified memory address. */ - public static STBTTPackRange create(long address) { - return new STBTTPackRange(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTPackRange createSafe(long address) { - return address == NULL ? null : new STBTTPackRange(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackRange mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackRange callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackRange mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackRange callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTPackRange} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTPackRange malloc(MemoryStack stack) { - return new STBTTPackRange(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTPackRange} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTPackRange calloc(MemoryStack stack) { - return new STBTTPackRange(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #font_size}. */ - public static float nfont_size(long struct) { return UNSAFE.getFloat(null, struct + STBTTPackRange.FONT_SIZE); } - /** Unsafe version of {@link #first_unicode_codepoint_in_range}. */ - public static int nfirst_unicode_codepoint_in_range(long struct) { return UNSAFE.getInt(null, struct + STBTTPackRange.FIRST_UNICODE_CODEPOINT_IN_RANGE); } - /** Unsafe version of {@link #array_of_unicode_codepoints() array_of_unicode_codepoints}. */ - @Nullable public static IntBuffer narray_of_unicode_codepoints(long struct) { return memIntBufferSafe(memGetAddress(struct + STBTTPackRange.ARRAY_OF_UNICODE_CODEPOINTS), nnum_chars(struct)); } - /** Unsafe version of {@link #num_chars}. */ - public static int nnum_chars(long struct) { return UNSAFE.getInt(null, struct + STBTTPackRange.NUM_CHARS); } - /** Unsafe version of {@link #chardata_for_range}. */ - public static STBTTPackedchar.Buffer nchardata_for_range(long struct) { return STBTTPackedchar.create(memGetAddress(struct + STBTTPackRange.CHARDATA_FOR_RANGE), nnum_chars(struct)); } - /** Unsafe version of {@link #h_oversample}. */ - public static byte nh_oversample(long struct) { return UNSAFE.getByte(null, struct + STBTTPackRange.H_OVERSAMPLE); } - /** Unsafe version of {@link #v_oversample}. */ - public static byte nv_oversample(long struct) { return UNSAFE.getByte(null, struct + STBTTPackRange.V_OVERSAMPLE); } - - /** Unsafe version of {@link #font_size(float) font_size}. */ - public static void nfont_size(long struct, float value) { UNSAFE.putFloat(null, struct + STBTTPackRange.FONT_SIZE, value); } - /** Unsafe version of {@link #first_unicode_codepoint_in_range(int) first_unicode_codepoint_in_range}. */ - public static void nfirst_unicode_codepoint_in_range(long struct, int value) { UNSAFE.putInt(null, struct + STBTTPackRange.FIRST_UNICODE_CODEPOINT_IN_RANGE, value); } - /** Unsafe version of {@link #array_of_unicode_codepoints(IntBuffer) array_of_unicode_codepoints}. */ - public static void narray_of_unicode_codepoints(long struct, @Nullable IntBuffer value) { memPutAddress(struct + STBTTPackRange.ARRAY_OF_UNICODE_CODEPOINTS, memAddressSafe(value)); } - /** Sets the specified value to the {@code num_chars} field of the specified {@code struct}. */ - public static void nnum_chars(long struct, int value) { UNSAFE.putInt(null, struct + STBTTPackRange.NUM_CHARS, value); } - /** Unsafe version of {@link #chardata_for_range(STBTTPackedchar.Buffer) chardata_for_range}. */ - public static void nchardata_for_range(long struct, STBTTPackedchar.Buffer value) { memPutAddress(struct + STBTTPackRange.CHARDATA_FOR_RANGE, value.address()); } - /** Unsafe version of {@link #h_oversample(byte) h_oversample}. */ - public static void nh_oversample(long struct, byte value) { UNSAFE.putByte(null, struct + STBTTPackRange.H_OVERSAMPLE, value); } - /** Unsafe version of {@link #v_oversample(byte) v_oversample}. */ - public static void nv_oversample(long struct, byte value) { UNSAFE.putByte(null, struct + STBTTPackRange.V_OVERSAMPLE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + STBTTPackRange.CHARDATA_FOR_RANGE)); - } - - // ----------------------------------- - - /** An array of {@link STBTTPackRange} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTPackRange ELEMENT_FACTORY = STBTTPackRange.create(-1L); - - /** - * Creates a new {@code STBTTPackRange.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTPackRange#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTPackRange getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link STBTTPackRange#font_size} field. */ - public float font_size() { return STBTTPackRange.nfont_size(address()); } - /** @return the value of the {@link STBTTPackRange#first_unicode_codepoint_in_range} field. */ - public int first_unicode_codepoint_in_range() { return STBTTPackRange.nfirst_unicode_codepoint_in_range(address()); } - /** @return a {@link IntBuffer} view of the data pointed to by the {@link STBTTPackRange#array_of_unicode_codepoints} field. */ - @Nullable - @NativeType("int *") - public IntBuffer array_of_unicode_codepoints() { return STBTTPackRange.narray_of_unicode_codepoints(address()); } - /** @return the value of the {@link STBTTPackRange#num_chars} field. */ - public int num_chars() { return STBTTPackRange.nnum_chars(address()); } - /** @return a {@link STBTTPackedchar.Buffer} view of the struct array pointed to by the {@link STBTTPackRange#chardata_for_range} field. */ - @NativeType("stbtt_packedchar *") - public STBTTPackedchar.Buffer chardata_for_range() { return STBTTPackRange.nchardata_for_range(address()); } - /** @return the value of the {@link STBTTPackRange#h_oversample} field. */ - @NativeType("unsigned char") - public byte h_oversample() { return STBTTPackRange.nh_oversample(address()); } - /** @return the value of the {@link STBTTPackRange#v_oversample} field. */ - @NativeType("unsigned char") - public byte v_oversample() { return STBTTPackRange.nv_oversample(address()); } - - /** Sets the specified value to the {@link STBTTPackRange#font_size} field. */ - public Buffer font_size(float value) { STBTTPackRange.nfont_size(address(), value); return this; } - /** Sets the specified value to the {@link STBTTPackRange#first_unicode_codepoint_in_range} field. */ - public Buffer first_unicode_codepoint_in_range(int value) { STBTTPackRange.nfirst_unicode_codepoint_in_range(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link STBTTPackRange#array_of_unicode_codepoints} field. */ - public Buffer array_of_unicode_codepoints(@Nullable @NativeType("int *") IntBuffer value) { STBTTPackRange.narray_of_unicode_codepoints(address(), value); return this; } - /** Sets the specified value to the {@link STBTTPackRange#num_chars} field. */ - public Buffer num_chars(int value) { STBTTPackRange.nnum_chars(address(), value); return this; } - /** Sets the address of the specified {@link STBTTPackedchar.Buffer} to the {@link STBTTPackRange#chardata_for_range} field. */ - public Buffer chardata_for_range(@NativeType("stbtt_packedchar *") STBTTPackedchar.Buffer value) { STBTTPackRange.nchardata_for_range(address(), value); return this; } - /** Sets the specified value to the {@link STBTTPackRange#h_oversample} field. */ - public Buffer h_oversample(@NativeType("unsigned char") byte value) { STBTTPackRange.nh_oversample(address(), value); return this; } - /** Sets the specified value to the {@link STBTTPackRange#v_oversample} field. */ - public Buffer v_oversample(@NativeType("unsigned char") byte value) { STBTTPackRange.nv_oversample(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackedchar.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackedchar.java deleted file mode 100644 index 4d78e84a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTPackedchar.java +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Packed character data, returned by {@link STBTruetype#stbtt_PackFontRange PackFontRange} - * - *

    Layout

    - * - *
    
    - * struct stbtt_packedchar {
    - *     unsigned short x0;
    - *     unsigned short y0;
    - *     unsigned short x1;
    - *     unsigned short y1;
    - *     float xoff;
    - *     float yoff;
    - *     float xadvance;
    - *     float xoff2;
    - *     float yoff2;
    - * }
    - */ -@NativeType("struct stbtt_packedchar") -public class STBTTPackedchar extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X0, - Y0, - X1, - Y1, - XOFF, - YOFF, - XADVANCE, - XOFF2, - YOFF2; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(2), - __member(2), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X0 = layout.offsetof(0); - Y0 = layout.offsetof(1); - X1 = layout.offsetof(2); - Y1 = layout.offsetof(3); - XOFF = layout.offsetof(4); - YOFF = layout.offsetof(5); - XADVANCE = layout.offsetof(6); - XOFF2 = layout.offsetof(7); - YOFF2 = layout.offsetof(8); - } - - protected STBTTPackedchar(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTPackedchar create(long address, @Nullable ByteBuffer container) { - return new STBTTPackedchar(address, container); - } - - /** - * Creates a {@code STBTTPackedchar} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTPackedchar(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x0} field. */ - @NativeType("unsigned short") - public short x0() { return nx0(address()); } - /** @return the value of the {@code y0} field. */ - @NativeType("unsigned short") - public short y0() { return ny0(address()); } - /** @return the value of the {@code x1} field. */ - @NativeType("unsigned short") - public short x1() { return nx1(address()); } - /** @return the value of the {@code y1} field. */ - @NativeType("unsigned short") - public short y1() { return ny1(address()); } - /** @return the value of the {@code xoff} field. */ - public float xoff() { return nxoff(address()); } - /** @return the value of the {@code yoff} field. */ - public float yoff() { return nyoff(address()); } - /** @return the value of the {@code xadvance} field. */ - public float xadvance() { return nxadvance(address()); } - /** @return the value of the {@code xoff2} field. */ - public float xoff2() { return nxoff2(address()); } - /** @return the value of the {@code yoff2} field. */ - public float yoff2() { return nyoff2(address()); } - - /** Sets the specified value to the {@code x0} field. */ - public STBTTPackedchar x0(@NativeType("unsigned short") short value) { nx0(address(), value); return this; } - /** Sets the specified value to the {@code y0} field. */ - public STBTTPackedchar y0(@NativeType("unsigned short") short value) { ny0(address(), value); return this; } - /** Sets the specified value to the {@code x1} field. */ - public STBTTPackedchar x1(@NativeType("unsigned short") short value) { nx1(address(), value); return this; } - /** Sets the specified value to the {@code y1} field. */ - public STBTTPackedchar y1(@NativeType("unsigned short") short value) { ny1(address(), value); return this; } - /** Sets the specified value to the {@code xoff} field. */ - public STBTTPackedchar xoff(float value) { nxoff(address(), value); return this; } - /** Sets the specified value to the {@code yoff} field. */ - public STBTTPackedchar yoff(float value) { nyoff(address(), value); return this; } - /** Sets the specified value to the {@code xadvance} field. */ - public STBTTPackedchar xadvance(float value) { nxadvance(address(), value); return this; } - /** Sets the specified value to the {@code xoff2} field. */ - public STBTTPackedchar xoff2(float value) { nxoff2(address(), value); return this; } - /** Sets the specified value to the {@code yoff2} field. */ - public STBTTPackedchar yoff2(float value) { nyoff2(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public STBTTPackedchar set( - short x0, - short y0, - short x1, - short y1, - float xoff, - float yoff, - float xadvance, - float xoff2, - float yoff2 - ) { - x0(x0); - y0(y0); - x1(x1); - y1(y1); - xoff(xoff); - yoff(yoff); - xadvance(xadvance); - xoff2(xoff2); - yoff2(yoff2); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public STBTTPackedchar set(STBTTPackedchar src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code STBTTPackedchar} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTPackedchar malloc() { - return new STBTTPackedchar(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTPackedchar} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTPackedchar calloc() { - return new STBTTPackedchar(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTPackedchar} instance allocated with {@link BufferUtils}. */ - public static STBTTPackedchar create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTPackedchar(memAddress(container), container); - } - - /** Returns a new {@code STBTTPackedchar} instance for the specified memory address. */ - public static STBTTPackedchar create(long address) { - return new STBTTPackedchar(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTPackedchar createSafe(long address) { - return address == NULL ? null : new STBTTPackedchar(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackedchar mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackedchar callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackedchar mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTPackedchar callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTPackedchar} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTPackedchar malloc(MemoryStack stack) { - return new STBTTPackedchar(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTPackedchar} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTPackedchar calloc(MemoryStack stack) { - return new STBTTPackedchar(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x0}. */ - public static short nx0(long struct) { return UNSAFE.getShort(null, struct + STBTTPackedchar.X0); } - /** Unsafe version of {@link #y0}. */ - public static short ny0(long struct) { return UNSAFE.getShort(null, struct + STBTTPackedchar.Y0); } - /** Unsafe version of {@link #x1}. */ - public static short nx1(long struct) { return UNSAFE.getShort(null, struct + STBTTPackedchar.X1); } - /** Unsafe version of {@link #y1}. */ - public static short ny1(long struct) { return UNSAFE.getShort(null, struct + STBTTPackedchar.Y1); } - /** Unsafe version of {@link #xoff}. */ - public static float nxoff(long struct) { return UNSAFE.getFloat(null, struct + STBTTPackedchar.XOFF); } - /** Unsafe version of {@link #yoff}. */ - public static float nyoff(long struct) { return UNSAFE.getFloat(null, struct + STBTTPackedchar.YOFF); } - /** Unsafe version of {@link #xadvance}. */ - public static float nxadvance(long struct) { return UNSAFE.getFloat(null, struct + STBTTPackedchar.XADVANCE); } - /** Unsafe version of {@link #xoff2}. */ - public static float nxoff2(long struct) { return UNSAFE.getFloat(null, struct + STBTTPackedchar.XOFF2); } - /** Unsafe version of {@link #yoff2}. */ - public static float nyoff2(long struct) { return UNSAFE.getFloat(null, struct + STBTTPackedchar.YOFF2); } - - /** Unsafe version of {@link #x0(short) x0}. */ - public static void nx0(long struct, short value) { UNSAFE.putShort(null, struct + STBTTPackedchar.X0, value); } - /** Unsafe version of {@link #y0(short) y0}. */ - public static void ny0(long struct, short value) { UNSAFE.putShort(null, struct + STBTTPackedchar.Y0, value); } - /** Unsafe version of {@link #x1(short) x1}. */ - public static void nx1(long struct, short value) { UNSAFE.putShort(null, struct + STBTTPackedchar.X1, value); } - /** Unsafe version of {@link #y1(short) y1}. */ - public static void ny1(long struct, short value) { UNSAFE.putShort(null, struct + STBTTPackedchar.Y1, value); } - /** Unsafe version of {@link #xoff(float) xoff}. */ - public static void nxoff(long struct, float value) { UNSAFE.putFloat(null, struct + STBTTPackedchar.XOFF, value); } - /** Unsafe version of {@link #yoff(float) yoff}. */ - public static void nyoff(long struct, float value) { UNSAFE.putFloat(null, struct + STBTTPackedchar.YOFF, value); } - /** Unsafe version of {@link #xadvance(float) xadvance}. */ - public static void nxadvance(long struct, float value) { UNSAFE.putFloat(null, struct + STBTTPackedchar.XADVANCE, value); } - /** Unsafe version of {@link #xoff2(float) xoff2}. */ - public static void nxoff2(long struct, float value) { UNSAFE.putFloat(null, struct + STBTTPackedchar.XOFF2, value); } - /** Unsafe version of {@link #yoff2(float) yoff2}. */ - public static void nyoff2(long struct, float value) { UNSAFE.putFloat(null, struct + STBTTPackedchar.YOFF2, value); } - - // ----------------------------------- - - /** An array of {@link STBTTPackedchar} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTPackedchar ELEMENT_FACTORY = STBTTPackedchar.create(-1L); - - /** - * Creates a new {@code STBTTPackedchar.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTPackedchar#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTPackedchar getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x0} field. */ - @NativeType("unsigned short") - public short x0() { return STBTTPackedchar.nx0(address()); } - /** @return the value of the {@code y0} field. */ - @NativeType("unsigned short") - public short y0() { return STBTTPackedchar.ny0(address()); } - /** @return the value of the {@code x1} field. */ - @NativeType("unsigned short") - public short x1() { return STBTTPackedchar.nx1(address()); } - /** @return the value of the {@code y1} field. */ - @NativeType("unsigned short") - public short y1() { return STBTTPackedchar.ny1(address()); } - /** @return the value of the {@code xoff} field. */ - public float xoff() { return STBTTPackedchar.nxoff(address()); } - /** @return the value of the {@code yoff} field. */ - public float yoff() { return STBTTPackedchar.nyoff(address()); } - /** @return the value of the {@code xadvance} field. */ - public float xadvance() { return STBTTPackedchar.nxadvance(address()); } - /** @return the value of the {@code xoff2} field. */ - public float xoff2() { return STBTTPackedchar.nxoff2(address()); } - /** @return the value of the {@code yoff2} field. */ - public float yoff2() { return STBTTPackedchar.nyoff2(address()); } - - /** Sets the specified value to the {@code x0} field. */ - public Buffer x0(@NativeType("unsigned short") short value) { STBTTPackedchar.nx0(address(), value); return this; } - /** Sets the specified value to the {@code y0} field. */ - public Buffer y0(@NativeType("unsigned short") short value) { STBTTPackedchar.ny0(address(), value); return this; } - /** Sets the specified value to the {@code x1} field. */ - public Buffer x1(@NativeType("unsigned short") short value) { STBTTPackedchar.nx1(address(), value); return this; } - /** Sets the specified value to the {@code y1} field. */ - public Buffer y1(@NativeType("unsigned short") short value) { STBTTPackedchar.ny1(address(), value); return this; } - /** Sets the specified value to the {@code xoff} field. */ - public Buffer xoff(float value) { STBTTPackedchar.nxoff(address(), value); return this; } - /** Sets the specified value to the {@code yoff} field. */ - public Buffer yoff(float value) { STBTTPackedchar.nyoff(address(), value); return this; } - /** Sets the specified value to the {@code xadvance} field. */ - public Buffer xadvance(float value) { STBTTPackedchar.nxadvance(address(), value); return this; } - /** Sets the specified value to the {@code xoff2} field. */ - public Buffer xoff2(float value) { STBTTPackedchar.nxoff2(address(), value); return this; } - /** Sets the specified value to the {@code yoff2} field. */ - public Buffer yoff2(float value) { STBTTPackedchar.nyoff2(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTTVertex.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTTVertex.java deleted file mode 100644 index 2547e20f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTTVertex.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Vertex data. - * - *

    Layout

    - * - *
    
    - * struct stbtt_vertex {
    - *     stbtt_vertex_type x;
    - *     stbtt_vertex_type y;
    - *     stbtt_vertex_type cx;
    - *     stbtt_vertex_type cy;
    - *     stbtt_vertex_type cx1;
    - *     stbtt_vertex_type cy1;
    - *     unsigned char type;
    - * }
    - */ -@NativeType("struct stbtt_vertex") -public class STBTTVertex extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y, - CX, - CY, - CX1, - CY1, - TYPE; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - CX = layout.offsetof(2); - CY = layout.offsetof(3); - CX1 = layout.offsetof(4); - CY1 = layout.offsetof(5); - TYPE = layout.offsetof(6); - } - - protected STBTTVertex(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBTTVertex create(long address, @Nullable ByteBuffer container) { - return new STBTTVertex(address, container); - } - - /** - * Creates a {@code STBTTVertex} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBTTVertex(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - @NativeType("stbtt_vertex_type") - public short x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("stbtt_vertex_type") - public short y() { return ny(address()); } - /** @return the value of the {@code cx} field. */ - @NativeType("stbtt_vertex_type") - public short cx() { return ncx(address()); } - /** @return the value of the {@code cy} field. */ - @NativeType("stbtt_vertex_type") - public short cy() { return ncy(address()); } - /** @return the value of the {@code cx1} field. */ - @NativeType("stbtt_vertex_type") - public short cx1() { return ncx1(address()); } - /** @return the value of the {@code cy1} field. */ - @NativeType("stbtt_vertex_type") - public short cy1() { return ncy1(address()); } - /** @return the value of the {@code type} field. */ - @NativeType("unsigned char") - public byte type() { return ntype(address()); } - - // ----------------------------------- - - /** Returns a new {@code STBTTVertex} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBTTVertex malloc() { - return new STBTTVertex(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBTTVertex} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBTTVertex calloc() { - return new STBTTVertex(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBTTVertex} instance allocated with {@link BufferUtils}. */ - public static STBTTVertex create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBTTVertex(memAddress(container), container); - } - - /** Returns a new {@code STBTTVertex} instance for the specified memory address. */ - public static STBTTVertex create(long address) { - return new STBTTVertex(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBTTVertex createSafe(long address) { - return address == NULL ? null : new STBTTVertex(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTVertex mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTVertex callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBTTVertex mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBTTVertex callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBTTVertex} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBTTVertex malloc(MemoryStack stack) { - return new STBTTVertex(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBTTVertex} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBTTVertex calloc(MemoryStack stack) { - return new STBTTVertex(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static short nx(long struct) { return UNSAFE.getShort(null, struct + STBTTVertex.X); } - /** Unsafe version of {@link #y}. */ - public static short ny(long struct) { return UNSAFE.getShort(null, struct + STBTTVertex.Y); } - /** Unsafe version of {@link #cx}. */ - public static short ncx(long struct) { return UNSAFE.getShort(null, struct + STBTTVertex.CX); } - /** Unsafe version of {@link #cy}. */ - public static short ncy(long struct) { return UNSAFE.getShort(null, struct + STBTTVertex.CY); } - /** Unsafe version of {@link #cx1}. */ - public static short ncx1(long struct) { return UNSAFE.getShort(null, struct + STBTTVertex.CX1); } - /** Unsafe version of {@link #cy1}. */ - public static short ncy1(long struct) { return UNSAFE.getShort(null, struct + STBTTVertex.CY1); } - /** Unsafe version of {@link #type}. */ - public static byte ntype(long struct) { return UNSAFE.getByte(null, struct + STBTTVertex.TYPE); } - - // ----------------------------------- - - /** An array of {@link STBTTVertex} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBTTVertex ELEMENT_FACTORY = STBTTVertex.create(-1L); - - /** - * Creates a new {@code STBTTVertex.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBTTVertex#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBTTVertex getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - @NativeType("stbtt_vertex_type") - public short x() { return STBTTVertex.nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("stbtt_vertex_type") - public short y() { return STBTTVertex.ny(address()); } - /** @return the value of the {@code cx} field. */ - @NativeType("stbtt_vertex_type") - public short cx() { return STBTTVertex.ncx(address()); } - /** @return the value of the {@code cy} field. */ - @NativeType("stbtt_vertex_type") - public short cy() { return STBTTVertex.ncy(address()); } - /** @return the value of the {@code cx1} field. */ - @NativeType("stbtt_vertex_type") - public short cx1() { return STBTTVertex.ncx1(address()); } - /** @return the value of the {@code cy1} field. */ - @NativeType("stbtt_vertex_type") - public short cy1() { return STBTTVertex.ncy1(address()); } - /** @return the value of the {@code type} field. */ - @NativeType("unsigned char") - public byte type() { return STBTTVertex.ntype(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBTruetype.java b/LWJGL/src/main/java/org/lwjgl/stb/STBTruetype.java deleted file mode 100644 index d4a12f2d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBTruetype.java +++ /dev/null @@ -1,2223 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to stb_truetype.h from the stb library. - * - *

    This library processes TrueType files:

    - * - *
      - *
    • parse files
    • - *
    • extract glyph metrics
    • - *
    • extract glyph shapes
    • - *
    • render glyphs to one-channel bitmaps with antialiasing (box filter)
    • - *
    - * - *

    ADDITIONAL DOCUMENTATION

    - * - *

    Some important concepts to understand to use this library:

    - * - *

    Codepoint

    - * - *

    Characters are defined by unicode codepoints, e.g. 65 is uppercase A, 231 is lowercase c with a cedilla, 0x7e30 is the hiragana for "ma".

    - * - *

    Glyph

    - * - *

    A visual character shape (every codepoint is rendered as some glyph)

    - * - *

    Glyph index

    - * - *

    A font-specific integer ID representing a glyph

    - * - *

    Baseline

    - * - *

    Glyph shapes are defined relative to a baseline, which is the bottom of uppercase characters. Characters extend both above and below the baseline.

    - * - *

    Current Point

    - * - *

    As you draw text to the screen, you keep track of a "current point" which is the origin of each character. The current point's vertical position is the - * baseline. Even "baked fonts" use this model.

    - * - *

    Vertical Font Metrics

    - * - *

    The vertical qualities of the font, used to vertically position and space the characters. See docs for {@link #stbtt_GetFontVMetrics GetFontVMetrics}.

    - * - *

    Font Size in Pixels or Points

    - * - *

    The preferred interface for specifying font sizes in stb_truetype is to specify how tall the font's vertical extent should be in pixels. If that sounds - * good enough, skip the next paragraph.

    - * - *

    Most font APIs instead use "points", which are a common typographic measurement for describing font size, defined as 72 points per inch. stb_truetype - * provides a point API for compatibility. However, true "per inch" conventions don't make much sense on computer displays since different monitors have - * different number of pixels per inch. For example, Windows traditionally uses a convention that there are 96 pixels per inch, thus making 'inch' - * measurements have nothing to do with inches, and thus effectively defining a point to be 1.333 pixels. Additionally, the TrueType font data provides an - * explicit scale factor to scale a given font's glyphs to points, but the author has observed that this scale factor is often wrong for non-commercial - * fonts, thus making fonts scaled in points according to the TrueType spec incoherently sized in practice.

    - * - *

    DETAILED USAGE

    - * - *

    Scale:

    - * - *

    Select how high you want the font to be, in points or pixels. Call #()ScaleForPixelHeight or {@link #stbtt_ScaleForMappingEmToPixels ScaleForMappingEmToPixels} to compute a scale factor - * {@code SF} that will be used by all other functions.

    - * - *

    Baseline:

    - * - *

    You need to select a y-coordinate that is the baseline of where your text will appear. Call {@link #stbtt_GetFontBoundingBox GetFontBoundingBox} to get the baseline-relative bounding - * box for all characters. {@code SF*-y0} will be the distance in pixels that the worst-case character could extend above the baseline, so if you want the - * top edge of characters to appear at the top of the screen where {@code y=0}, then you would set the baseline to {@code SF*-y0}.

    - * - *

    Current point:

    - * - *

    Set the current point where the first character will appear. The first character could extend left of the current point; this is font dependent. You - * can either choose a current point that is the leftmost point and hope, or add some padding, or check the bounding box or left-side-bearing of the first - * character to be displayed and set the current point based on that.

    - * - *

    Displaying a character:

    - * - *

    Compute the bounding box of the character. It will contain signed values relative to {@code }. I.e. if it returns - * {@code x0,y0,x1,y1}, then the character should be displayed in the rectangle from {@code } to - * {@code - * - *

    Advancing for the next character:

    - * - *

    Call {@link #stbtt_GetGlyphHMetrics GetGlyphHMetrics}, and compute {@code current_point += SF * advance}.

    - * - *

    ADVANCED USAGE

    - * - *

    Quality:

    - * - *
      - *
    • Use the functions with Subpixel at the end to allow your characters to have subpixel positioning. Since the font is anti-aliased, not hinted, this - * is very important for quality. (This is not possible with baked fonts.)
    • - *
    • Kerning is now supported, and if you're supporting subpixel rendering then kerning is worth using to give your text a polished look.
    • - *
    - * - *

    Performance:

    - * - *
      - *
    • Convert Unicode codepoints to glyph indexes and operate on the glyphs; if you don't do this, stb_truetype is forced to do the conversion on every - * call.
    • - *
    • There are a lot of memory allocations. We should modify it to take a temp buffer and allocate from the temp buffer (without freeing), should help - * performance a lot.
    • - *
    - * - *

    NOTES

    - * - *

    The system uses the raw data found in the .ttf file without changing it and without building auxiliary data structures. This is a bit inefficient on - * little-endian systems (the data is big-endian), but assuming you're caching the bitmaps or glyph shapes this shouldn't be a big deal.

    - * - *

    It appears to be very hard to programmatically determine what font a given file is in a general way. I provide an API for this, but I don't recommend - * it.

    - * - *

    SAMPLE PROGRAMS

    - * - *

    Incomplete text-in-3d-api example, which draws quads properly aligned to be lossless:

    - * - *
    
    - * unsigned char ttf_buffer[1<<20];
    - * unsigned char temp_bitmap[512*512];
    - * 
    - * stbtt_bakedchar cdata[96]; // ASCII 32..126 is 95 glyphs
    - * GLuint ftex;
    - * 
    - * void my_stbtt_initfont(void)
    - * {
    - *    fread(ttf_buffer, 1, 1<<20, fopen("c:/windows/fonts/times.ttf", "rb"));
    - *    stbtt_BakeFontBitmap(ttf_buffer,0, 32.0, temp_bitmap,512,512, 32,96, cdata); // no guarantee this fits!
    - *    // can free ttf_buffer at this point
    - *    glGenTextures(1, &ftex);
    - *    glBindTexture(GL_TEXTURE_2D, ftex);
    - *    glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, 512,512, 0, GL_ALPHA, GL_UNSIGNED_BYTE, temp_bitmap);
    - *    // can free temp_bitmap at this point
    - *    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    - * }
    - * 
    - * void my_stbtt_print(float x, float y, char *text)
    - * {
    - *    // assume orthographic projection with units = screen pixels, origin at top left
    - *    glEnable(GL_TEXTURE_2D);
    - *    glBindTexture(GL_TEXTURE_2D, ftex);
    - *    glBegin(GL_QUADS);
    - *    while (*text) {
    - *       if (*text ≥ 32 && *text < 128) {
    - *          stbtt_aligned_quad q;
    - *          stbtt_GetBakedQuad(cdata, 512,512, *text-32, &x,&y,&q,1);//1=opengl & d3d10+,0=d3d9
    - *          glTexCoord2f(q.s0,q.t1); glVertex2f(q.x0,q.y0);
    - *          glTexCoord2f(q.s1,q.t1); glVertex2f(q.x1,q.y0);
    - *          glTexCoord2f(q.s1,q.t0); glVertex2f(q.x1,q.y1);
    - *          glTexCoord2f(q.s0,q.t0); glVertex2f(q.x0,q.y1);
    - *       }
    - *       ++text;
    - *    }
    - *    glEnd();
    - * }
    - * - *

    Complete program (this compiles): get a single bitmap, print as ASCII art:

    - * - *
    
    - * char ttf_buffer[1<<25];
    - * 
    - * int main(int argc, char **argv)
    - * {
    - *    stbtt_fontinfo font;
    - *    unsigned char *bitmap;
    - *    int w,h,i,j,c = (argc > 1 ? atoi(argv[1]) : 'a'), s = (argc > 2 ? atoi(argv[2]) : 20);
    - * 
    - *    fread(ttf_buffer, 1, 1<<25, fopen(argc > 3 ? argv[3] : "c:/windows/fonts/arialbd.ttf", "rb"));
    - * 
    - *    stbtt_InitFont(&font, ttf_buffer, stbtt_GetFontOffsetForIndex(ttf_buffer,0));
    - *    bitmap = stbtt_GetCodepointBitmap(&font, 0,stbtt_ScaleForPixelHeight(&font, s), c, &w, &h, 0,0);
    - * 
    - *    for (j=0; j < h; ++j) {
    - *       for (i=0; i < w; ++i)
    - *          putchar(" .:ioVM@"[bitmap[j*w+i]>>5]);
    - *       putchar('\n');
    - *    }
    - *    return 0;
    - * }
    - * - *

    Complete program: print "Hello World!" banner, with bugs:

    - * - *
    
    - * char buffer[24<<20];
    - * unsigned char screen[20][79];
    - * 
    - * int main(int arg, char **argv)
    - * {
    - *    stbtt_fontinfo font;
    - *    int i,j,ascent,baseline,ch=0;
    - *    float scale, xpos=2; // leave a little padding in case the character extends left
    - *    char *text = "Heljo World!";
    - * 
    - *    fread(buffer, 1, 1000000, fopen("c:/windows/fonts/arialbd.ttf", "rb"));
    - *    stbtt_InitFont(&font, buffer, 0);
    - * 
    - *    scale = stbtt_ScaleForPixelHeight(&font, 15);
    - *    stbtt_GetFontVMetrics(&font, &ascent,0,0);
    - *    baseline = (int) (ascent*scale);
    - * 
    - *    while (text[ch]) {
    - *       int advance,lsb,x0,y0,x1,y1;
    - *       float x_shift = xpos - (float) floor(xpos);
    - *       stbtt_GetCodepointHMetrics(&font, text[ch], &advance, &lsb);
    - *       stbtt_GetCodepointBitmapBoxSubpixel(&font, text[ch], scale,scale,x_shift,0, &x0,&y0,&x1,&y1);
    - *       stbtt_MakeCodepointBitmapSubpixel(&font, &screen[baseline + y0][(int) xpos + x0], x1-x0,y1-y0, 79, scale,scale,x_shift,0, text[ch]);
    - *       // note that this stomps the old data, so where character boxes overlap (e.g. 'lj') it's wrong
    - *       // because this API is really for baking character bitmaps into textures. if you want to render
    - *       // a sequence of characters, you really need to render each bitmap to a temp buffer, then
    - *       // "alpha blend" that into the working buffer
    - *       xpos += (advance * scale);
    - *       if (text[ch+1])
    - *          xpos += scale*stbtt_GetCodepointKernAdvance(&font, text[ch],text[ch+1]);
    - *       ++ch;
    - *    }
    - * 
    - *    for (j=0; j < 20; ++j) {
    - *       for (i=0; i < 78; ++i)
    - *          putchar(" .:ioVM@"[screen[j][i]>>5]);
    - *       putchar('\n');
    - *    }
    - * 
    - *    return 0;
    - * }
    - * - *

    Finding the right font...

    - * - *

    You should really just solve this offline, keep your own tables of what font is what, and don't try to get it out of the .ttf file. That's because - * getting it out of the .ttf file is really hard, because the names in the file can appear in many possible encodings, in many possible languages, and - * e.g. if you need a case-insensitive comparison, the details of that depend on the encoding & language in a complex way (actually underspecified in - * truetype, but also gigantic).

    - * - *

    But you can use the provided functions in two possible ways:

    - * - *
      - *
    • {@link #stbtt_FindMatchingFont FindMatchingFont} will use *case-sensitive* comparisons on unicode-encoded names to try to find the font you want; you can run this before - * calling {@link #stbtt_InitFont InitFont}
    • - *
    • {@link #stbtt_GetFontNameString GetFontNameString} lets you get any of the various strings from the file yourself and do your own comparisons on them. You have to have called - * {@link #stbtt_InitFont InitFont} first.
    • - *
    - */ -public class STBTruetype { - - static { LibSTB.initialize(); } - - /** Vertex type. */ - public static final byte - STBTT_vmove = 1, - STBTT_vline = 2, - STBTT_vcurve = 3, - STBTT_vcubic = 4; - - /** Style flags, use in {@link #stbtt_FindMatchingFont FindMatchingFont}. */ - public static final int - STBTT_MACSTYLE_DONTCARE = 0, - STBTT_MACSTYLE_BOLD = 1, - STBTT_MACSTYLE_ITALIC = 2, - STBTT_MACSTYLE_UNDERSCORE = 4, - STBTT_MACSTYLE_NONE = 8; - - /** Platform IDs. */ - public static final int - STBTT_PLATFORM_ID_UNICODE = 0, - STBTT_PLATFORM_ID_MAC = 1, - STBTT_PLATFORM_ID_ISO = 2, - STBTT_PLATFORM_ID_MICROSOFT = 3; - - /** Encoding IDs for {@link #STBTT_PLATFORM_ID_UNICODE PLATFORM_ID_UNICODE}. */ - public static final int - STBTT_UNICODE_EID_UNICODE_1_0 = 0, - STBTT_UNICODE_EID_UNICODE_1_1 = 1, - STBTT_UNICODE_EID_ISO_10646 = 2, - STBTT_UNICODE_EID_UNICODE_2_0_BMP = 3, - STBTT_UNICODE_EID_UNICODE_2_0_FULL = 4; - - /** Encoding IDs for {@link #STBTT_PLATFORM_ID_MICROSOFT PLATFORM_ID_MICROSOFT}. */ - public static final int - STBTT_MS_EID_SYMBOL = 0, - STBTT_MS_EID_UNICODE_BMP = 1, - STBTT_MS_EID_SHIFTJIS = 2, - STBTT_MS_EID_UNICODE_FULL = 10; - - /** Encoding IDs for {@link #STBTT_PLATFORM_ID_MAC PLATFORM_ID_MAC}. */ - public static final int - STBTT_MAC_EID_ROMAN = 0, - STBTT_MAC_EID_JAPANESE = 1, - STBTT_MAC_EID_CHINESE_TRAD = 2, - STBTT_MAC_EID_KOREAN = 3, - STBTT_MAC_EID_ARABIC = 4, - STBTT_MAC_EID_HEBREW = 5, - STBTT_MAC_EID_GREEK = 6, - STBTT_MAC_EID_RUSSIAN = 7; - - /** Language ID for {@link #STBTT_PLATFORM_ID_MICROSOFT PLATFORM_ID_MICROSOFT}. */ - public static final int - STBTT_MS_LANG_ENGLISH = 0x409, - STBTT_MS_LANG_CHINESE = 0x804, - STBTT_MS_LANG_DUTCH = 0x413, - STBTT_MS_LANG_FRENCH = 0x40C, - STBTT_MS_LANG_GERMAN = 0x407, - STBTT_MS_LANG_HEBREW = 0x40D, - STBTT_MS_LANG_ITALIAN = 0x410, - STBTT_MS_LANG_JAPANESE = 0x411, - STBTT_MS_LANG_KOREAN = 0x412, - STBTT_MS_LANG_RUSSIAN = 0x419, - STBTT_MS_LANG_SPANISH = 0x409, - STBTT_MS_LANG_SWEDISH = 0x41D; - - /** Language ID for {@link #STBTT_PLATFORM_ID_MAC PLATFORM_ID_MAC}. */ - public static final int - STBTT_MAC_LANG_ENGLISH = 0, - STBTT_MAC_LANG_ARABIC = 12, - STBTT_MAC_LANG_DUTCH = 4, - STBTT_MAC_LANG_FRENCH = 1, - STBTT_MAC_LANG_GERMAN = 2, - STBTT_MAC_LANG_HEBREW = 10, - STBTT_MAC_LANG_ITALIAN = 3, - STBTT_MAC_LANG_JAPANESE = 11, - STBTT_MAC_LANG_KOREAN = 23, - STBTT_MAC_LANG_RUSSIAN = 32, - STBTT_MAC_LANG_SPANISH = 6, - STBTT_MAC_LANG_SWEDISH = 5, - STBTT_MAC_LANG_CHINESE_SIMPLIFIED = 33, - STBTT_MAC_LANG_CHINESE_TRAD = 19; - - protected STBTruetype() { - throw new UnsupportedOperationException(); - } - - // --- [ stbtt_BakeFontBitmap ] --- - - /** - * Unsafe version of: {@link #stbtt_BakeFontBitmap BakeFontBitmap} - * - * @param num_chars the number of characters to bake, starting at {@code first_char} - */ - public static native int nstbtt_BakeFontBitmap(long data, int offset, float pixel_height, long pixels, int pw, int ph, int first_char, int num_chars, long chardata); - - /** - * Bakes a font to a bitmap for use as texture. - * - *

    This uses a very simply packing, use with {@link #stbtt_GetBakedQuad GetBakedQuad}.

    - * - * @param data the font data - * @param pixel_height the font height, in pixels - * @param pixels a buffer in which to write the font bitmap - * @param pw the bitmap width, in pixels - * @param ph the bitmap height, in pixels - * @param first_char the first character to bake - * @param chardata an array of {@link STBTTBakedChar} structs, it's {@code num_chars} long - * - * @return if positive, the first unused row of the bitmap. If negative, returns the negative of the number of characters that fit. If 0, no characters fit and no - * rows were used. - */ - public static int stbtt_BakeFontBitmap(@NativeType("unsigned char const *") ByteBuffer data, float pixel_height, @NativeType("unsigned char *") ByteBuffer pixels, int pw, int ph, int first_char, @NativeType("stbtt_bakedchar *") STBTTBakedChar.Buffer chardata) { - if (CHECKS) { - check(pixels, pw * ph); - } - return nstbtt_BakeFontBitmap(memAddress(data), 0, pixel_height, memAddress(pixels), pw, ph, first_char, chardata.remaining(), chardata.address()); - } - - // --- [ stbtt_GetBakedQuad ] --- - - /** Unsafe version of: {@link #stbtt_GetBakedQuad GetBakedQuad} */ - public static native void nstbtt_GetBakedQuad(long chardata, int pw, int ph, int char_index, long xpos, long ypos, long q, int opengl_fillrule); - - /** - * Computes quad to draw for a given char and advances the current position. - * - *

    The coordinate system used assumes y increases downwards. Characters will extend both above and below the current position; see discussion of - * "BASELINE" above.

    - * - * @param chardata an array of {@link STBTTBakedChar} structs - * @param pw the bitmap width, in pixels - * @param ph the bitmap height, in pixels - * @param char_index the character index in the {@code chardata} array - * @param xpos the current x position, in screen pixel space - * @param ypos the current y position, in screen pixel space - * @param q an {@link STBTTAlignedQuad} struct in which to return the quad to draw - * @param opengl_fillrule 1 if opengl fill rule; 0 if DX9 or earlier - */ - public static void stbtt_GetBakedQuad(@NativeType("stbtt_bakedchar const *") STBTTBakedChar.Buffer chardata, int pw, int ph, int char_index, @NativeType("float *") FloatBuffer xpos, @NativeType("float *") FloatBuffer ypos, @NativeType("stbtt_aligned_quad *") STBTTAlignedQuad q, @NativeType("int") boolean opengl_fillrule) { - if (CHECKS) { - check(chardata, char_index + 1); - check(xpos, 1); - check(ypos, 1); - } - nstbtt_GetBakedQuad(chardata.address(), pw, ph, char_index, memAddress(xpos), memAddress(ypos), q.address(), opengl_fillrule ? 1 : 0); - } - - // --- [ stbtt_GetScaledFontVMetrics ] --- - - /** Unsafe version of: {@link #stbtt_GetScaledFontVMetrics GetScaledFontVMetrics} */ - public static native void nstbtt_GetScaledFontVMetrics(long fontdata, int index, float size, long ascent, long descent, long lineGap); - - /** - * Query the font vertical metrics without having to create a font first. - * - * @param index the font index (use 0 if you don't know what that is) - * @param size the font height, in pixels - * @param ascent returns the coordinate above the baseline the font extends - * @param descent returns the coordinate below the baseline the font extends (i.e. it is typically negative) - * @param lineGap returns the spacing between one row's descent and the next row's ascent - */ - public static void stbtt_GetScaledFontVMetrics(@NativeType("unsigned char const *") ByteBuffer fontdata, int index, float size, @NativeType("float *") FloatBuffer ascent, @NativeType("float *") FloatBuffer descent, @NativeType("float *") FloatBuffer lineGap) { - if (CHECKS) { - check(ascent, 1); - check(descent, 1); - check(lineGap, 1); - } - nstbtt_GetScaledFontVMetrics(memAddress(fontdata), index, size, memAddress(ascent), memAddress(descent), memAddress(lineGap)); - } - - // --- [ stbtt_PackBegin ] --- - - /** Unsafe version of: {@link #stbtt_PackBegin PackBegin} */ - public static native int nstbtt_PackBegin(long spc, long pixels, int width, int height, int stride_in_bytes, int padding, long alloc_context); - - /** - * Initializes a packing context stored in the passed-in {@code stbtt_pack_context}. Future calls using this context will pack characters into the bitmap - * passed in here: a 1-channel bitmap that is width x height. - * - * @param spc an {@link STBTTPackContext} struct - * @param pixels a buffer in which to store the bitmap data - * @param width the bitmap width, in pixels - * @param height the bitmap height, in pixels - * @param stride_in_bytes the distance from one row to the next (or 0 to mean they are packed tightly together) - * @param padding the amount of padding to leave between each character (normally you want '1' for bitmaps you'll use as textures with bilinear filtering) - * @param alloc_context a pointer to an allocation context - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbtt_PackBegin(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @Nullable @NativeType("unsigned char *") ByteBuffer pixels, int width, int height, int stride_in_bytes, int padding, @NativeType("void *") long alloc_context) { - if (CHECKS) { - checkSafe(pixels, (stride_in_bytes != 0 ? stride_in_bytes : width) * height); - } - return nstbtt_PackBegin(spc.address(), memAddressSafe(pixels), width, height, stride_in_bytes, padding, alloc_context) != 0; - } - - /** - * Initializes a packing context stored in the passed-in {@code stbtt_pack_context}. Future calls using this context will pack characters into the bitmap - * passed in here: a 1-channel bitmap that is width x height. - * - * @param spc an {@link STBTTPackContext} struct - * @param pixels a buffer in which to store the bitmap data - * @param width the bitmap width, in pixels - * @param height the bitmap height, in pixels - * @param stride_in_bytes the distance from one row to the next (or 0 to mean they are packed tightly together) - * @param padding the amount of padding to leave between each character (normally you want '1' for bitmaps you'll use as textures with bilinear filtering) - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbtt_PackBegin(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @Nullable @NativeType("unsigned char *") ByteBuffer pixels, int width, int height, int stride_in_bytes, int padding) { - if (CHECKS) { - checkSafe(pixels, (stride_in_bytes != 0 ? stride_in_bytes : width) * height); - } - return nstbtt_PackBegin(spc.address(), memAddressSafe(pixels), width, height, stride_in_bytes, padding, NULL) != 0; - } - - // --- [ stbtt_PackEnd ] --- - - /** Unsafe version of: {@link #stbtt_PackEnd PackEnd} */ - public static native void nstbtt_PackEnd(long spc); - - /** - * Cleans up the packing context and frees all memory. - * - * @param spc an {@link STBTTPackContext} struct - */ - public static void stbtt_PackEnd(@NativeType("stbtt_pack_context *") STBTTPackContext spc) { - nstbtt_PackEnd(spc.address()); - } - - // --- [ STBTT_POINT_SIZE ] --- - - /** - * Converts the full height of a character from ascender to descender, as computed by {@link #stbtt_ScaleForPixelHeight ScaleForPixelHeight}, to a point size as computed by - * {@link #stbtt_ScaleForMappingEmToPixels ScaleForMappingEmToPixels}. - * - * @param font_size the full height of a character - * - * @return the point size of the character - */ - public static int STBTT_POINT_SIZE(int font_size) { - return -font_size; - } - - // --- [ stbtt_PackFontRange ] --- - - /** - * Unsafe version of: {@link #stbtt_PackFontRange PackFontRange} - * - * @param num_chars_in_range the number of unicode code points in the range - */ - public static native int nstbtt_PackFontRange(long spc, long fontdata, int font_index, float font_size, int first_unicode_char_in_range, int num_chars_in_range, long chardata_for_range); - - /** - * Creates character bitmaps from the {@code font_index}'th font found in fontdata (use {@code font_index=0} if you don't know what that is). It creates - * {@code num_chars_in_range} bitmaps for characters with unicode values starting at {@code first_unicode_char_in_range} and increasing. Data for how to - * render them is stored in {@code chardata_for_range}; pass these to {@link #stbtt_GetPackedQuad GetPackedQuad} to get back renderable quads. - * - * @param spc an {@link STBTTPackContext} struct - * @param fontdata the font data - * @param font_index the font index (use 0 if you don't know what that is - * @param font_size the full height of the character from ascender to descender, as computed by {@link #stbtt_ScaleForPixelHeight ScaleForPixelHeight}. To use a point size as computed by - * {@link #stbtt_ScaleForMappingEmToPixels ScaleForMappingEmToPixels}, wrap the font size in {@link #STBTT_POINT_SIZE} and pass the result, i.e.: - * - *
    
    -     *                                    ...,                  20 , ... // font max minus min y is 20 pixels tall
    -     *                                    ..., STBTT_POINT_SIZE(20), ... // 'M' is 20 pixels tall
    - * @param first_unicode_char_in_range the first unicode code point in the range - * @param chardata_for_range an array of {@link STBTTPackedchar} structs - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbtt_PackFontRange(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @NativeType("unsigned char const *") ByteBuffer fontdata, int font_index, float font_size, int first_unicode_char_in_range, @NativeType("stbtt_packedchar *") STBTTPackedchar.Buffer chardata_for_range) { - return nstbtt_PackFontRange(spc.address(), memAddress(fontdata), font_index, font_size, first_unicode_char_in_range, chardata_for_range.remaining(), chardata_for_range.address()) != 0; - } - - // --- [ stbtt_PackFontRanges ] --- - - /** - * Unsafe version of: {@link #stbtt_PackFontRanges PackFontRanges} - * - * @param num_ranges the number of {@link STBTTPackRange} structs in {@code ranges} - */ - public static native int nstbtt_PackFontRanges(long spc, long fontdata, int font_index, long ranges, int num_ranges); - - /** - * Creates character bitmaps from multiple ranges of characters stored in ranges. This will usually create a better-packed bitmap than multiple calls to - * {@link #stbtt_PackFontRange PackFontRange}. Note that you can call this multiple times within a single {@link #stbtt_PackBegin PackBegin}/{@link #stbtt_PackEnd PackEnd}. - * - * @param spc an {@link STBTTPackContext} struct - * @param fontdata the font data - * @param font_index the font index (use 0 if you don't know what that is) - * @param ranges an array of {@link STBTTPackRange} structs - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbtt_PackFontRanges(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @NativeType("unsigned char const *") ByteBuffer fontdata, int font_index, @NativeType("stbtt_pack_range *") STBTTPackRange.Buffer ranges) { - if (CHECKS) { - Struct.validate(ranges.address(), ranges.remaining(), STBTTPackRange.SIZEOF, STBTTPackRange::validate); - } - return nstbtt_PackFontRanges(spc.address(), memAddress(fontdata), font_index, ranges.address(), ranges.remaining()) != 0; - } - - // --- [ stbtt_PackSetOversampling ] --- - - /** Unsafe version of: {@link #stbtt_PackSetOversampling PackSetOversampling} */ - public static native void nstbtt_PackSetOversampling(long spc, int h_oversample, int v_oversample); - - /** - * Oversampling a font increases the quality by allowing higher-quality subpixel positioning, and is especially valuable at smaller text sizes. - * - *

    This function sets the amount of oversampling for all following calls to {@link #stbtt_PackFontRange PackFontRange} or {@link #stbtt_PackFontRangesGatherRects PackFontRangesGatherRects} for a given pack context. The - * default (no oversampling) is achieved by {@code h_oversample=1, v_oversample=1}. The total number of pixels required is - * {@code h_oversample*v_oversample} larger than the default; for example, 2x2 oversampling requires 4x the storage of 1x1. For best results, render - * oversampled textures with bilinear filtering. Look at the readme in - * stb/tests/oversample for information about oversampled fonts.

    - * - *

    To use with PackFontRangesGather etc., you must set it before calls to {@link #stbtt_PackFontRangesGatherRects PackFontRangesGatherRects}.

    - * - * @param spc an {@link STBTTPackContext} struct - * @param h_oversample the horizontal oversampling amount - * @param v_oversample the vertical oversampling amount - */ - public static void stbtt_PackSetOversampling(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @NativeType("unsigned int") int h_oversample, @NativeType("unsigned int") int v_oversample) { - nstbtt_PackSetOversampling(spc.address(), h_oversample, v_oversample); - } - - // --- [ stbtt_PackSetSkipMissingCodepoints ] --- - - /** Unsafe version of: {@link #stbtt_PackSetSkipMissingCodepoints PackSetSkipMissingCodepoints} */ - public static native void nstbtt_PackSetSkipMissingCodepoints(long spc, int skip); - - /** - * If {@code skip != 0}, this tells stb_truetype to skip any codepoints for which there is no corresponding glyph. If {@code skip=0}, which is the - * default, then codepoints without a glyph recived the font's "missing character" glyph, typically an empty box by convention. - * - * @param spc an {@link STBTTPackContext} struct - * @param skip the skip flag - */ - public static void stbtt_PackSetSkipMissingCodepoints(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @NativeType("int") boolean skip) { - nstbtt_PackSetSkipMissingCodepoints(spc.address(), skip ? 1 : 0); - } - - // --- [ stbtt_GetPackedQuad ] --- - - /** Unsafe version of: {@link #stbtt_GetPackedQuad GetPackedQuad} */ - public static native void nstbtt_GetPackedQuad(long chardata, int pw, int ph, int char_index, long xpos, long ypos, long q, int align_to_integer); - - /** - * Computes quad to draw for a given char and advances the current position. - * - *

    The coordinate system used assumes y increases downwards. Characters will extend both above and below the current position; see discussion of - * "BASELINE" above.

    - * - * @param chardata an array of {@link STBTTPackedchar} structs - * @param pw the bitmap width, in pixels - * @param ph the bitmap height, in pixels - * @param char_index the character index in the {@code chardata} array - * @param xpos the current x position, in screen pixel space - * @param ypos the current y position, in screen pixel space - * @param q an {@link STBTTAlignedQuad} struct in which to return the quad to draw - * @param align_to_integer 1 to align the quad to integer coordinates - */ - public static void stbtt_GetPackedQuad(@NativeType("stbtt_packedchar const *") STBTTPackedchar.Buffer chardata, int pw, int ph, int char_index, @NativeType("float *") FloatBuffer xpos, @NativeType("float *") FloatBuffer ypos, @NativeType("stbtt_aligned_quad *") STBTTAlignedQuad q, @NativeType("int") boolean align_to_integer) { - if (CHECKS) { - check(chardata, char_index + 1); - check(xpos, 1); - check(ypos, 1); - } - nstbtt_GetPackedQuad(chardata.address(), pw, ph, char_index, memAddress(xpos), memAddress(ypos), q.address(), align_to_integer ? 1 : 0); - } - - // --- [ stbtt_PackFontRangesGatherRects ] --- - - /** - * Unsafe version of: {@link #stbtt_PackFontRangesGatherRects PackFontRangesGatherRects} - * - * @param num_ranges the number of {@link STBTTPackRange} structs in {@code ranges} - */ - public static native int nstbtt_PackFontRangesGatherRects(long spc, long info, long ranges, int num_ranges, long rects); - - /** - * Calling these functions in sequence is roughly equivalent to calling {@link #stbtt_PackFontRanges PackFontRanges}. If you want more control over the packing of multiple fonts, or - * if you want to pack custom data into a font texture, take a look at the source of {@link #stbtt_PackFontRanges PackFontRanges} and create a custom version using these functions, - * e.g. call {@link #stbtt_PackFontRangesGatherRects PackFontRangesGatherRects} multiple times, building up a single array of rects, then call {@link #stbtt_PackFontRangesPackRects PackFontRangesPackRects} once, then call - * {@link #stbtt_PackFontRangesRenderIntoRects PackFontRangesRenderIntoRects} repeatedly. This may result in a better packing than calling {@link #stbtt_PackFontRanges PackFontRanges} multiple times (or it may not). - * - * @param spc an {@link STBTTPackContext} struct - * @param info an {@link STBTTFontinfo} struct - * @param ranges an array of {@link STBTTPackRange} structs - * @param rects an array of {@link STBRPRect} structs. It must be big enough to accommodate all characters in the given ranges. - * - * @return the number of structs written in {@code rects} - */ - public static int stbtt_PackFontRangesGatherRects(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @NativeType("stbtt_fontinfo *") STBTTFontinfo info, @NativeType("stbtt_pack_range *") STBTTPackRange.Buffer ranges, @NativeType("stbrp_rect *") STBRPRect.Buffer rects) { - if (CHECKS) { - Struct.validate(ranges.address(), ranges.remaining(), STBTTPackRange.SIZEOF, STBTTPackRange::validate); - } - return nstbtt_PackFontRangesGatherRects(spc.address(), info.address(), ranges.address(), ranges.remaining(), rects.address()); - } - - // --- [ stbtt_PackFontRangesPackRects ] --- - - /** - * Unsafe version of: {@link #stbtt_PackFontRangesPackRects PackFontRangesPackRects} - * - * @param num_rects the number of structs in {@code rects} - */ - public static native void nstbtt_PackFontRangesPackRects(long spc, long rects, int num_rects); - - /** - * See {@link #stbtt_PackFontRangesGatherRects PackFontRangesGatherRects}. - * - * @param spc an {@link STBTTPackContext} struct - * @param rects an array of {@link STBRPRect} structs - */ - public static void stbtt_PackFontRangesPackRects(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @NativeType("stbrp_rect *") STBRPRect.Buffer rects) { - nstbtt_PackFontRangesPackRects(spc.address(), rects.address(), rects.remaining()); - } - - // --- [ stbtt_PackFontRangesRenderIntoRects ] --- - - /** - * Unsafe version of: {@link #stbtt_PackFontRangesRenderIntoRects PackFontRangesRenderIntoRects} - * - * @param num_ranges the number of {@link STBTTPackRange} structs in {@code ranges} - */ - public static native int nstbtt_PackFontRangesRenderIntoRects(long spc, long info, long ranges, int num_ranges, long rects); - - /** - * See {@link #stbtt_PackFontRangesGatherRects PackFontRangesGatherRects}. - * - * @param spc an {@link STBTTPackContext} struct - * @param info an {@link STBTTFontinfo} struct - * @param ranges an array of {@link STBTTPackRange} structs - * @param rects an array of {@link STBRPRect} structs. It must be big enough to accommodate all characters in the given ranges. - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbtt_PackFontRangesRenderIntoRects(@NativeType("stbtt_pack_context *") STBTTPackContext spc, @NativeType("stbtt_fontinfo *") STBTTFontinfo info, @NativeType("stbtt_pack_range *") STBTTPackRange.Buffer ranges, @NativeType("stbrp_rect *") STBRPRect.Buffer rects) { - if (CHECKS) { - Struct.validate(ranges.address(), ranges.remaining(), STBTTPackRange.SIZEOF, STBTTPackRange::validate); - } - return nstbtt_PackFontRangesRenderIntoRects(spc.address(), info.address(), ranges.address(), ranges.remaining(), rects.address()) != 0; - } - - // --- [ stbtt_GetNumberOfFonts ] --- - - /** Unsafe version of: {@link #stbtt_GetNumberOfFonts GetNumberOfFonts} */ - public static native int nstbtt_GetNumberOfFonts(long data); - - /** - * Determines the number of fonts in a font file. - * - *

    TrueType collection (.ttc) files may contain multiple fonts, while TrueType font (.ttf) files only contain one font. The number of fonts can be used - * for indexing with {@link #stbtt_GetFontOffsetForIndex GetFontOffsetForIndex} where the index is between zero and one less than the total fonts. If an error occurs, -1 is returned.

    - * - * @param data the font data - */ - public static int stbtt_GetNumberOfFonts(@NativeType("unsigned char const *") ByteBuffer data) { - return nstbtt_GetNumberOfFonts(memAddress(data)); - } - - // --- [ stbtt_GetFontOffsetForIndex ] --- - - /** Unsafe version of: {@link #stbtt_GetFontOffsetForIndex GetFontOffsetForIndex} */ - public static native int nstbtt_GetFontOffsetForIndex(long data, int index); - - /** - * Each .ttf/.ttc file may have more than one font. Each font has a sequential index number starting from 0. Call this function to get the font offset for - * a given index; it returns -1 if the index is out of range. A regular .ttf file will only define one font and it always be at offset 0, so it will - * return '0' for index 0, and -1 for all other indices. - * - * @param data the font data - * @param index the font index - */ - public static int stbtt_GetFontOffsetForIndex(@NativeType("unsigned char const *") ByteBuffer data, int index) { - return nstbtt_GetFontOffsetForIndex(memAddress(data), index); - } - - // --- [ stbtt_InitFont ] --- - - /** Unsafe version of: {@link #stbtt_InitFont InitFont} */ - public static native int nstbtt_InitFont(long info, long data, int offset); - - /** - * Given an offset into the file that defines a font, this function builds the necessary cached info for the rest of the system. You must allocate the - * {@link STBTTFontinfo} yourself, and stbtt_InitFont will fill it out. You don't need to do anything special to free it, because the contents are pure value - * data with no additional data structures. - * - * @param info an {@link STBTTFontinfo} struct - * @param data the font data - * @param offset the font data offset - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbtt_InitFont(@NativeType("stbtt_fontinfo *") STBTTFontinfo info, @NativeType("unsigned char const *") ByteBuffer data, int offset) { - return nstbtt_InitFont(info.address(), memAddress(data), offset) != 0; - } - - /** - * Given an offset into the file that defines a font, this function builds the necessary cached info for the rest of the system. You must allocate the - * {@link STBTTFontinfo} yourself, and stbtt_InitFont will fill it out. You don't need to do anything special to free it, because the contents are pure value - * data with no additional data structures. - * - * @param info an {@link STBTTFontinfo} struct - * @param data the font data - * - * @return 1 on success, 0 on failure - */ - @NativeType("int") - public static boolean stbtt_InitFont(@NativeType("stbtt_fontinfo *") STBTTFontinfo info, @NativeType("unsigned char const *") ByteBuffer data) { - return nstbtt_InitFont(info.address(), memAddress(data), 0) != 0; - } - - // --- [ stbtt_FindGlyphIndex ] --- - - /** Unsafe version of: {@link #stbtt_FindGlyphIndex FindGlyphIndex} */ - public static native int nstbtt_FindGlyphIndex(long info, int unicode_codepoint); - - /** - * If you're going to perform multiple operations on the same character and you want a speed-up, call this function with the character you're going to - * process, then use glyph-based functions instead of the codepoint-based functions. - * - * @param info an {@link STBTTFontinfo} struct - * @param unicode_codepoint the unicode code point - * - * @return the glyph index or 0 if the character codepoint is not defined in the font - */ - public static int stbtt_FindGlyphIndex(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int unicode_codepoint) { - return nstbtt_FindGlyphIndex(info.address(), unicode_codepoint); - } - - // --- [ stbtt_ScaleForPixelHeight ] --- - - /** Unsafe version of: {@link #stbtt_ScaleForPixelHeight ScaleForPixelHeight} */ - public static native float nstbtt_ScaleForPixelHeight(long info, float pixels); - - /** - * Computes a scale factor to produce a font whose "height" is {@code pixels} tall. Height is measured as the distance from the highest ascender to the - * lowest descender; in other words, it's equivalent to calling {@link #stbtt_GetFontVMetrics GetFontVMetrics} and computing: - * - *
    
    -     * scale = pixels / (ascent - descent)
    - * - *

    so if you prefer to measure height by the ascent only, use a similar calculation.

    - * - * @param info an {@link STBTTFontinfo} struct - * @param pixels the font height, in pixels - * - * @return the scale factor - */ - public static float stbtt_ScaleForPixelHeight(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float pixels) { - return nstbtt_ScaleForPixelHeight(info.address(), pixels); - } - - // --- [ stbtt_ScaleForMappingEmToPixels ] --- - - /** Unsafe version of: {@link #stbtt_ScaleForMappingEmToPixels ScaleForMappingEmToPixels} */ - public static native float nstbtt_ScaleForMappingEmToPixels(long info, float pixels); - - /** - * Computes a scale factor to produce a font whose EM size is mapped to {@code pixels} tall. This is probably what traditional APIs compute, but I'm not - * positive. - * - * @param info an {@link STBTTFontinfo} struct - * @param pixels the font height, in pixels - * - * @return the scale factor - */ - public static float stbtt_ScaleForMappingEmToPixels(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float pixels) { - return nstbtt_ScaleForMappingEmToPixels(info.address(), pixels); - } - - // --- [ stbtt_GetFontVMetrics ] --- - - /** Unsafe version of: {@link #stbtt_GetFontVMetrics GetFontVMetrics} */ - public static native void nstbtt_GetFontVMetrics(long info, long ascent, long descent, long lineGap); - - /** - * Returns vertical metrics for the specified font. You should advance the vertical position by {@code *ascent - *descent + *lineGap} - * - *

    The returned values are expressed in unscaled coordinates, so you must multiply by the scale factor for a given size.

    - * - * @param info an {@link STBTTFontinfo} struct - * @param ascent returns the coordinate above the baseline the font extends - * @param descent returns the coordinate below the baseline the font extends (i.e. it is typically negative) - * @param lineGap returns the spacing between one row's descent and the next row's ascent - */ - public static void stbtt_GetFontVMetrics(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @Nullable @NativeType("int *") IntBuffer ascent, @Nullable @NativeType("int *") IntBuffer descent, @Nullable @NativeType("int *") IntBuffer lineGap) { - if (CHECKS) { - checkSafe(ascent, 1); - checkSafe(descent, 1); - checkSafe(lineGap, 1); - } - nstbtt_GetFontVMetrics(info.address(), memAddressSafe(ascent), memAddressSafe(descent), memAddressSafe(lineGap)); - } - - // --- [ stbtt_GetFontVMetricsOS2 ] --- - - /** Unsafe version of: {@link #stbtt_GetFontVMetricsOS2 GetFontVMetricsOS2} */ - public static native int nstbtt_GetFontVMetricsOS2(long info, long typoAscent, long typoDescent, long typoLineGap); - - /** - * Analogous to {@link #stbtt_GetFontVMetrics GetFontVMetrics}, but returns the "typographic" values from the OS/2 table (specific to MS/Windows TTF files). - * - * @param info an {@link STBTTFontinfo} struct - * @param typoAscent returns the coordinate above the baseline the font extends - * @param typoDescent returns the coordinate below the baseline the font extends (i.e. it is typically negative) - * @param typoLineGap returns the spacing between one row's descent and the next row's ascent - * - * @return 1 on success (table present), 0 on failure - */ - @NativeType("int") - public static boolean stbtt_GetFontVMetricsOS2(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @Nullable @NativeType("int *") IntBuffer typoAscent, @Nullable @NativeType("int *") IntBuffer typoDescent, @Nullable @NativeType("int *") IntBuffer typoLineGap) { - if (CHECKS) { - checkSafe(typoAscent, 1); - checkSafe(typoDescent, 1); - checkSafe(typoLineGap, 1); - } - return nstbtt_GetFontVMetricsOS2(info.address(), memAddressSafe(typoAscent), memAddressSafe(typoDescent), memAddressSafe(typoLineGap)) != 0; - } - - // --- [ stbtt_GetFontBoundingBox ] --- - - /** Unsafe version of: {@link #stbtt_GetFontBoundingBox GetFontBoundingBox} */ - public static native void nstbtt_GetFontBoundingBox(long info, long x0, long y0, long x1, long y1); - - /** - * Returns the bounding box around all possible characters. - * - * @param info an {@link STBTTFontinfo} struct - * @param x0 the left coordinate - * @param y0 the bottom coordinate - * @param x1 the right coordinate - * @param y1 the top coordinate - */ - public static void stbtt_GetFontBoundingBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("int *") IntBuffer x0, @NativeType("int *") IntBuffer y0, @NativeType("int *") IntBuffer x1, @NativeType("int *") IntBuffer y1) { - if (CHECKS) { - check(x0, 1); - check(y0, 1); - check(x1, 1); - check(y1, 1); - } - nstbtt_GetFontBoundingBox(info.address(), memAddress(x0), memAddress(y0), memAddress(x1), memAddress(y1)); - } - - // --- [ stbtt_GetCodepointHMetrics ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointHMetrics GetCodepointHMetrics} */ - public static native void nstbtt_GetCodepointHMetrics(long info, int codepoint, long advanceWidth, long leftSideBearing); - - /** - * Returns horizontal metrics for the specified codepoint. - * - *

    The returned values are expressed in unscaled coordinates.

    - * - * @param info an {@link STBTTFontinfo} struct - * @param codepoint the unicode codepoint - * @param advanceWidth the offset from the current horizontal position to the next horizontal position - * @param leftSideBearing the offset from the current horizontal position to the left edge of the character - */ - public static void stbtt_GetCodepointHMetrics(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int codepoint, @Nullable @NativeType("int *") IntBuffer advanceWidth, @Nullable @NativeType("int *") IntBuffer leftSideBearing) { - if (CHECKS) { - checkSafe(advanceWidth, 1); - checkSafe(leftSideBearing, 1); - } - nstbtt_GetCodepointHMetrics(info.address(), codepoint, memAddressSafe(advanceWidth), memAddressSafe(leftSideBearing)); - } - - // --- [ stbtt_GetCodepointKernAdvance ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointKernAdvance GetCodepointKernAdvance} */ - public static native int nstbtt_GetCodepointKernAdvance(long info, int ch1, int ch2); - - /** - * Returns the additional amount to add to the {@code advance} value between {@code ch1} and {@code ch2}. - * - * @param info an {@link STBTTFontinfo} struct - * @param ch1 the first unicode codepoint - * @param ch2 the second unicode codepoint - */ - public static int stbtt_GetCodepointKernAdvance(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int ch1, int ch2) { - return nstbtt_GetCodepointKernAdvance(info.address(), ch1, ch2); - } - - // --- [ stbtt_GetCodepointBox ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointBox GetCodepointBox} */ - public static native int nstbtt_GetCodepointBox(long info, int codepoint, long x0, long y0, long x1, long y1); - - /** - * Gets the bounding box of the visible part of the glyph, in unscaled coordinates. - * - * @param info an {@link STBTTFontinfo} struct - * @param codepoint the unicode codepoint - * @param x0 returns the left coordinate - * @param y0 returns the bottom coordinate - * @param x1 returns the right coordinate - * @param y1 returns the top coordinate - */ - @NativeType("int") - public static boolean stbtt_GetCodepointBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int codepoint, @Nullable @NativeType("int *") IntBuffer x0, @Nullable @NativeType("int *") IntBuffer y0, @Nullable @NativeType("int *") IntBuffer x1, @Nullable @NativeType("int *") IntBuffer y1) { - if (CHECKS) { - checkSafe(x0, 1); - checkSafe(y0, 1); - checkSafe(x1, 1); - checkSafe(y1, 1); - } - return nstbtt_GetCodepointBox(info.address(), codepoint, memAddressSafe(x0), memAddressSafe(y0), memAddressSafe(x1), memAddressSafe(y1)) != 0; - } - - // --- [ stbtt_GetGlyphHMetrics ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphHMetrics GetGlyphHMetrics} */ - public static native void nstbtt_GetGlyphHMetrics(long info, int glyph_index, long advanceWidth, long leftSideBearing); - - /** - * Glyph version of {@link #stbtt_GetCodepointHMetrics GetCodepointHMetrics}, for greater efficiency. - * - * @param info an {@link STBTTFontinfo} struct - * @param glyph_index the glyph index - * @param advanceWidth the offset from the current horizontal position to the next horizontal position - * @param leftSideBearing the offset from the current horizontal position to the left edge of the character - */ - public static void stbtt_GetGlyphHMetrics(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph_index, @Nullable @NativeType("int *") IntBuffer advanceWidth, @Nullable @NativeType("int *") IntBuffer leftSideBearing) { - if (CHECKS) { - checkSafe(advanceWidth, 1); - checkSafe(leftSideBearing, 1); - } - nstbtt_GetGlyphHMetrics(info.address(), glyph_index, memAddressSafe(advanceWidth), memAddressSafe(leftSideBearing)); - } - - // --- [ stbtt_GetGlyphKernAdvance ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphKernAdvance GetGlyphKernAdvance} */ - public static native int nstbtt_GetGlyphKernAdvance(long info, int glyph1, int glyph2); - - /** - * Glyph version of {@link #stbtt_GetCodepointKernAdvance GetCodepointKernAdvance}, for greater efficiency. - * - * @param info an {@link STBTTFontinfo} struct - * @param glyph1 the first glyph index - * @param glyph2 the second glyph index - */ - public static int stbtt_GetGlyphKernAdvance(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph1, int glyph2) { - return nstbtt_GetGlyphKernAdvance(info.address(), glyph1, glyph2); - } - - // --- [ stbtt_GetGlyphBox ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphBox GetGlyphBox} */ - public static native int nstbtt_GetGlyphBox(long info, int glyph_index, long x0, long y0, long x1, long y1); - - /** - * Glyph version of {@link #stbtt_GetCodepointBox GetCodepointBox}, for greater efficiency. - * - * @param info an {@link STBTTFontinfo} struct - * @param glyph_index the glyph index - * @param x0 returns the left coordinate - * @param y0 returns the bottom coordinate - * @param x1 returns the right coordinate - * @param y1 returns the top coordinate - */ - @NativeType("int") - public static boolean stbtt_GetGlyphBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph_index, @Nullable @NativeType("int *") IntBuffer x0, @Nullable @NativeType("int *") IntBuffer y0, @Nullable @NativeType("int *") IntBuffer x1, @Nullable @NativeType("int *") IntBuffer y1) { - if (CHECKS) { - checkSafe(x0, 1); - checkSafe(y0, 1); - checkSafe(x1, 1); - checkSafe(y1, 1); - } - return nstbtt_GetGlyphBox(info.address(), glyph_index, memAddressSafe(x0), memAddressSafe(y0), memAddressSafe(x1), memAddressSafe(y1)) != 0; - } - - // --- [ stbtt_GetKerningTableLength ] --- - - public static native int nstbtt_GetKerningTableLength(long info); - - public static int stbtt_GetKerningTableLength(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info) { - return nstbtt_GetKerningTableLength(info.address()); - } - - // --- [ stbtt_GetKerningTable ] --- - - /** Unsafe version of: {@link #stbtt_GetKerningTable GetKerningTable} */ - public static native int nstbtt_GetKerningTable(long info, long table, int table_length); - - /** - * Retrieves a complete list of all of the kerning pairs provided by the font. - * - *

    {@code stbtt_GetKerningTable} never writes more than {@code table_length} entries and returns how many entries it did write. The table will be sorted - * by {@code (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1)}

    - */ - public static int stbtt_GetKerningTable(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("stbtt_kerningentry *") STBTTKerningentry.Buffer table) { - return nstbtt_GetKerningTable(info.address(), table.address(), table.remaining()); - } - - // --- [ stbtt_IsGlyphEmpty ] --- - - /** Unsafe version of: {@link #stbtt_IsGlyphEmpty IsGlyphEmpty} */ - public static native int nstbtt_IsGlyphEmpty(long info, int glyph_index); - - /** - * Returns non-zero if nothing is drawn for this glyph. - * - * @param info an {@link STBTTFontinfo} struct - * @param glyph_index the glyph index - */ - @NativeType("int") - public static boolean stbtt_IsGlyphEmpty(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph_index) { - return nstbtt_IsGlyphEmpty(info.address(), glyph_index) != 0; - } - - // --- [ stbtt_GetCodepointShape ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointShape GetCodepointShape} */ - public static native int nstbtt_GetCodepointShape(long info, int unicode_codepoint, long vertices); - - /** - * Returns number of vertices and fills {@code *vertices} with the pointer to them - * - *

    The shape is a series of contours. Each one starts with a {@link #STBTT_vmove vmove}, then consists of a series of mixed {@link #STBTT_vline vline} and {@link #STBTT_vcurve vcurve} segments. A {@link #STBTT_vline vline} draws a - * line from previous endpoint to its {@code x,y}; a {@link #STBTT_vcurve vcurve} draws a quadratic bezier from previous endpoint to its {@code x,y}, using {@code cx,cy} as - * the bezier control point.

    - * - *

    The {@link STBTTVertex} values are expressed in "unscaled" coordinates.

    - * - * @param info an {@link STBTTFontinfo} struct - * @param unicode_codepoint the unicode codepoint - * @param vertices returns a pointer to an array of {@link STBTTVertex} structs - */ - public static int stbtt_GetCodepointShape(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int unicode_codepoint, @NativeType("stbtt_vertex **") PointerBuffer vertices) { - if (CHECKS) { - check(vertices, 1); - } - return nstbtt_GetCodepointShape(info.address(), unicode_codepoint, memAddress(vertices)); - } - - /** - * Returns number of vertices and fills {@code *vertices} with the pointer to them - * - *

    The shape is a series of contours. Each one starts with a {@link #STBTT_vmove vmove}, then consists of a series of mixed {@link #STBTT_vline vline} and {@link #STBTT_vcurve vcurve} segments. A {@link #STBTT_vline vline} draws a - * line from previous endpoint to its {@code x,y}; a {@link #STBTT_vcurve vcurve} draws a quadratic bezier from previous endpoint to its {@code x,y}, using {@code cx,cy} as - * the bezier control point.

    - * - *

    The {@link STBTTVertex} values are expressed in "unscaled" coordinates.

    - * - * @param info an {@link STBTTFontinfo} struct - * @param unicode_codepoint the unicode codepoint - */ - @Nullable - @NativeType("int") - public static STBTTVertex.Buffer stbtt_GetCodepointShape(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int unicode_codepoint) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer vertices = stack.pointers(NULL); - int __result = nstbtt_GetCodepointShape(info.address(), unicode_codepoint, memAddress(vertices)); - return STBTTVertex.createSafe(vertices.get(0), __result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbtt_GetGlyphShape ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphShape GetGlyphShape} */ - public static native int nstbtt_GetGlyphShape(long info, int glyph_index, long vertices); - - /** - * Glyph version of {@link #stbtt_GetCodepointShape GetCodepointShape}, for greater efficiency. - * - * @param info an {@link STBTTFontinfo} struct - * @param glyph_index the unicode codepoint - * @param vertices returns a pointer to an array of {@link STBTTVertex} structs - */ - public static int stbtt_GetGlyphShape(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph_index, @NativeType("stbtt_vertex **") PointerBuffer vertices) { - if (CHECKS) { - check(vertices, 1); - } - return nstbtt_GetGlyphShape(info.address(), glyph_index, memAddress(vertices)); - } - - /** - * Glyph version of {@link #stbtt_GetCodepointShape GetCodepointShape}, for greater efficiency. - * - * @param info an {@link STBTTFontinfo} struct - * @param glyph_index the unicode codepoint - */ - @Nullable - @NativeType("int") - public static STBTTVertex.Buffer stbtt_GetGlyphShape(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph_index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer vertices = stack.pointers(NULL); - int __result = nstbtt_GetGlyphShape(info.address(), glyph_index, memAddress(vertices)); - return STBTTVertex.createSafe(vertices.get(0), __result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbtt_FreeShape ] --- - - /** Unsafe version of: {@link #stbtt_FreeShape FreeShape} */ - public static native void nstbtt_FreeShape(long info, long vertices); - - /** - * Frees the data allocated by {@link #stbtt_GetCodepointShape GetCodepointShape} and {@link #stbtt_GetGlyphShape GetGlyphShape}. - * - * @param info an {@link STBTTFontinfo} struct - * @param vertices the array of {@link STBTTVertex} structs to free - */ - public static void stbtt_FreeShape(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("stbtt_vertex *") STBTTVertex.Buffer vertices) { - if (CHECKS) { - check(vertices, 1); - } - nstbtt_FreeShape(info.address(), vertices.address()); - } - - // --- [ stbtt_FindSVGDoc ] --- - - public static native long nstbtt_FindSVGDoc(long info, int gl); - - @NativeType("unsigned char *") - public static long stbtt_FindSVGDoc(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int gl) { - return nstbtt_FindSVGDoc(info.address(), gl); - } - - // --- [ stbtt_GetCodepointSVG ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointSVG GetCodepointSVG} */ - public static native int nstbtt_GetCodepointSVG(long info, int unicode_codepoint, long svg); - - /** - * Fills {@code svg} with the character's SVG data. - * - * @return data size or 0 if SVG not found - */ - public static int stbtt_GetCodepointSVG(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int unicode_codepoint, @NativeType("char const **") PointerBuffer svg) { - if (CHECKS) { - check(svg, 1); - } - return nstbtt_GetCodepointSVG(info.address(), unicode_codepoint, memAddress(svg)); - } - - // --- [ stbtt_GetGlyphSVG ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphSVG GetGlyphSVG} */ - public static native int nstbtt_GetGlyphSVG(long info, int gl, long svg); - - /** - * Fills {@code svg} with the character's SVG data. - * - * @return data size or 0 if SVG not found - */ - public static int stbtt_GetGlyphSVG(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int gl, @NativeType("char const **") PointerBuffer svg) { - if (CHECKS) { - check(svg, 1); - } - return nstbtt_GetGlyphSVG(info.address(), gl, memAddress(svg)); - } - - // --- [ stbtt_FreeBitmap ] --- - - /** Unsafe version of: {@link #stbtt_FreeBitmap FreeBitmap} */ - public static native void nstbtt_FreeBitmap(long bitmap, long userdata); - - /** - * Frees a bitmap allocated by {@link #stbtt_GetCodepointBitmap GetCodepointBitmap}, {@link #stbtt_GetCodepointBitmapSubpixel GetCodepointBitmapSubpixel}, {@link #stbtt_GetGlyphBitmap GetGlyphBitmap} or {@link #stbtt_GetGlyphBitmapSubpixel GetGlyphBitmapSubpixel}. - * - * @param bitmap the bitmap to free - * @param userdata a pointer to an allocation context - */ - public static void stbtt_FreeBitmap(@NativeType("unsigned char *") ByteBuffer bitmap, @NativeType("void *") long userdata) { - nstbtt_FreeBitmap(memAddress(bitmap), userdata); - } - - /** - * Frees a bitmap allocated by {@link #stbtt_GetCodepointBitmap GetCodepointBitmap}, {@link #stbtt_GetCodepointBitmapSubpixel GetCodepointBitmapSubpixel}, {@link #stbtt_GetGlyphBitmap GetGlyphBitmap} or {@link #stbtt_GetGlyphBitmapSubpixel GetGlyphBitmapSubpixel}. - * - * @param bitmap the bitmap to free - */ - public static void stbtt_FreeBitmap(@NativeType("unsigned char *") ByteBuffer bitmap) { - nstbtt_FreeBitmap(memAddress(bitmap), NULL); - } - - // --- [ stbtt_GetCodepointBitmap ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointBitmap GetCodepointBitmap} */ - public static native long nstbtt_GetCodepointBitmap(long info, float scale_x, float scale_y, int codepoint, long width, long height, long xoff, long yoff); - - /** - * Allocates a large-enough single-channel 8bpp bitmap and renders the specified character/glyph at the specified scale into it, with antialiasing. - * - * @param info an {@link STBTTFontinfo} struct - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param codepoint the unicode codepoint to render - * @param width returns the bitmap width - * @param height returns the bitmap height - * @param xoff returns the horizontal offset in pixel space from the glyph origin to the left of the bitmap - * @param yoff returns the vertical offset in pixel space from the glyph origin to the top of the bitmap - */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetCodepointBitmap(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, int codepoint, @NativeType("int *") IntBuffer width, @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer xoff, @Nullable @NativeType("int *") IntBuffer yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetCodepointBitmap(info.address(), scale_x, scale_y, codepoint, memAddress(width), memAddress(height), memAddressSafe(xoff), memAddressSafe(yoff)); - return memByteBufferSafe(__result, width.get(width.position()) * height.get(height.position())); - } - - // --- [ stbtt_GetCodepointBitmapSubpixel ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointBitmapSubpixel GetCodepointBitmapSubpixel} */ - public static native long nstbtt_GetCodepointBitmapSubpixel(long info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, long width, long height, long xoff, long yoff); - - /** - * Same as {@link #stbtt_GetCodepointBitmap GetCodepointBitmap}, but you can specify a subpixel shift for the character. - * - * @param info an {@link STBTTFontinfo} struct - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param codepoint the unicode codepoint to render - * @param width returns the bitmap width - * @param height returns the bitmap height - * @param xoff returns the horizontal offset in pixel space from the glyph origin to the left of the bitmap - * @param yoff returns the vertical offset in pixel space from the glyph origin to the top of the bitmap - */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetCodepointBitmapSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, @NativeType("int *") IntBuffer width, @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer xoff, @Nullable @NativeType("int *") IntBuffer yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetCodepointBitmapSubpixel(info.address(), scale_x, scale_y, shift_x, shift_y, codepoint, memAddress(width), memAddress(height), memAddressSafe(xoff), memAddressSafe(yoff)); - return memByteBufferSafe(__result, width.get(width.position()) * height.get(height.position())); - } - - // --- [ stbtt_MakeCodepointBitmap ] --- - - /** Unsafe version of: {@link #stbtt_MakeCodepointBitmap MakeCodepointBitmap} */ - public static native void nstbtt_MakeCodepointBitmap(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint); - - /** - * Same as {@link #stbtt_GetCodepointBitmap GetCodepointBitmap}, but you pass in storage for the bitmap in the form of {@code output}, with row spacing of {@code out_stride} bytes. The - * bitmap is clipped to {@code out_w/out_h} bytes. Call {@link #stbtt_GetCodepointBitmapBox GetCodepointBitmapBox} to get the width and height and positioning info for it first. - * - * @param info an {@link STBTTFontinfo} struct - * @param output the bitmap storage - * @param out_w the bitmap width - * @param out_h the bitmap height - * @param out_stride the row stride, in bytes - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param codepoint the unicode codepoint to render - */ - public static void stbtt_MakeCodepointBitmap(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - } - nstbtt_MakeCodepointBitmap(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, codepoint); - } - - // --- [ stbtt_MakeCodepointBitmapSubpixel ] --- - - /** Unsafe version of: {@link #stbtt_MakeCodepointBitmapSubpixel MakeCodepointBitmapSubpixel} */ - public static native void nstbtt_MakeCodepointBitmapSubpixel(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint); - - /** - * Same as {@link #stbtt_MakeCodepointBitmap MakeCodepointBitmap}, but you can specify a subpixel shift for the character. - * - * @param info an {@link STBTTFontinfo} struct - * @param output the bitmap storage - * @param out_w the bitmap width - * @param out_h the bitmap height - * @param out_stride the row stride, in bytes - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param codepoint the unicode codepoint to render - */ - public static void stbtt_MakeCodepointBitmapSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - } - nstbtt_MakeCodepointBitmapSubpixel(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, codepoint); - } - - // --- [ stbtt_MakeCodepointBitmapSubpixelPrefilter ] --- - - /** Unsafe version of: {@link #stbtt_MakeCodepointBitmapSubpixelPrefilter MakeCodepointBitmapSubpixelPrefilter} */ - public static native void nstbtt_MakeCodepointBitmapSubpixelPrefilter(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, long sub_x, long sub_y, int codepoint); - - /** - * Same as {@link #stbtt_MakeCodepointBitmapSubpixel MakeCodepointBitmapSubpixel}, but prefiltering is performed (see {@link #stbtt_PackSetOversampling PackSetOversampling}). - * - * @param info an {@link STBTTFontinfo} struct - * @param output the bitmap storage - * @param out_w the bitmap width - * @param out_h the bitmap height - * @param out_stride the row stride, in bytes - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param oversample_x the horizontal oversampling amount - * @param oversample_y the vertical oversampling amount - * @param sub_x returns the horizontal oversample shift - * @param sub_y returns the vertical oversample shift - * @param codepoint the unicode codepoint to render - */ - public static void stbtt_MakeCodepointBitmapSubpixelPrefilter(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, @NativeType("float *") FloatBuffer sub_x, @NativeType("float *") FloatBuffer sub_y, int codepoint) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - check(sub_x, 1); - check(sub_y, 1); - } - nstbtt_MakeCodepointBitmapSubpixelPrefilter(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, memAddress(sub_x), memAddress(sub_y), codepoint); - } - - // --- [ stbtt_GetCodepointBitmapBox ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointBitmapBox GetCodepointBitmapBox} */ - public static native void nstbtt_GetCodepointBitmapBox(long font, int codepoint, float scale_x, float scale_y, long ix0, long iy0, long ix1, long iy1); - - /** - * Get the bbox of the bitmap centered around the glyph origin; so the bitmap width is {@code ix1-ix0}, height is {@code iy1-iy0}, and location to place - * the bitmap top left is {@code (leftSideBearing*scale,iy0)}. - * - *

    Note that the bitmap uses y-increases-down, but the shape uses y-increases-up, so {@code CodepointBitmapBox} and {@code CodepointBox} are inverted.

    - * - * @param font an {@link STBTTFontinfo} struct - * @param codepoint the unicode codepoint - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param ix0 returns the left coordinate - * @param iy0 returns the bottom coordinate - * @param ix1 returns the right coordinate - * @param iy1 returns the top coordinate - */ - public static void stbtt_GetCodepointBitmapBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int codepoint, float scale_x, float scale_y, @Nullable @NativeType("int *") IntBuffer ix0, @Nullable @NativeType("int *") IntBuffer iy0, @Nullable @NativeType("int *") IntBuffer ix1, @Nullable @NativeType("int *") IntBuffer iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetCodepointBitmapBox(font.address(), codepoint, scale_x, scale_y, memAddressSafe(ix0), memAddressSafe(iy0), memAddressSafe(ix1), memAddressSafe(iy1)); - } - - // --- [ stbtt_GetCodepointBitmapBoxSubpixel ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointBitmapBoxSubpixel GetCodepointBitmapBoxSubpixel} */ - public static native void nstbtt_GetCodepointBitmapBoxSubpixel(long font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, long ix0, long iy0, long ix1, long iy1); - - /** - * Same as {@link #stbtt_GetCodepointBitmapBox GetCodepointBitmapBox}, but you can specify a subpixel shift for the character. - * - * @param font an {@link STBTTFontinfo} struct - * @param codepoint the unicode codepoint - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param ix0 returns the left coordinate - * @param iy0 returns the bottom coordinate - * @param ix1 returns the right coordinate - * @param iy1 returns the top coordinate - */ - public static void stbtt_GetCodepointBitmapBoxSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, @Nullable @NativeType("int *") IntBuffer ix0, @Nullable @NativeType("int *") IntBuffer iy0, @Nullable @NativeType("int *") IntBuffer ix1, @Nullable @NativeType("int *") IntBuffer iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetCodepointBitmapBoxSubpixel(font.address(), codepoint, scale_x, scale_y, shift_x, shift_y, memAddressSafe(ix0), memAddressSafe(iy0), memAddressSafe(ix1), memAddressSafe(iy1)); - } - - // --- [ stbtt_GetGlyphBitmap ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphBitmap GetGlyphBitmap} */ - public static native long nstbtt_GetGlyphBitmap(long info, float scale_x, float scale_y, int glyph, long width, long height, long xoff, long yoff); - - /** - * Allocates a large-enough single-channel 8bpp bitmap and renders the specified character/glyph at the specified scale into it, with antialiasing. - * - * @param info an {@link STBTTFontinfo} struct - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param glyph the glyph index to render - * @param width returns the bitmap width - * @param height returns the bitmap height - * @param xoff returns the horizontal offset in pixel space from the glyph origin to the left of the bitmap - * @param yoff returns the vertical offset in pixel space from the glyph origin to the top of the bitmap - */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetGlyphBitmap(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, int glyph, @NativeType("int *") IntBuffer width, @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer xoff, @Nullable @NativeType("int *") IntBuffer yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetGlyphBitmap(info.address(), scale_x, scale_y, glyph, memAddress(width), memAddress(height), memAddressSafe(xoff), memAddressSafe(yoff)); - return memByteBufferSafe(__result, width.get(width.position()) * height.get(height.position())); - } - - // --- [ stbtt_GetGlyphBitmapSubpixel ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphBitmapSubpixel GetGlyphBitmapSubpixel} */ - public static native long nstbtt_GetGlyphBitmapSubpixel(long info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, long width, long height, long xoff, long yoff); - - /** - * Same as {@link #stbtt_GetGlyphBitmap GetGlyphBitmap}, but you can specify a subpixel shift for the character. - * - * @param info an {@link STBTTFontinfo} struct - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param glyph the glyph index to render - * @param width returns the bitmap width - * @param height returns the bitmap height - * @param xoff returns the horizontal offset in pixel space from the glyph origin to the left of the bitmap - * @param yoff returns the vertical offset in pixel space from the glyph origin to the top of the bitmap - */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetGlyphBitmapSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, @NativeType("int *") IntBuffer width, @NativeType("int *") IntBuffer height, @Nullable @NativeType("int *") IntBuffer xoff, @Nullable @NativeType("int *") IntBuffer yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetGlyphBitmapSubpixel(info.address(), scale_x, scale_y, shift_x, shift_y, glyph, memAddress(width), memAddress(height), memAddressSafe(xoff), memAddressSafe(yoff)); - return memByteBufferSafe(__result, width.get(width.position()) * height.get(height.position())); - } - - // --- [ stbtt_MakeGlyphBitmap ] --- - - /** Unsafe version of: {@link #stbtt_MakeGlyphBitmap MakeGlyphBitmap} */ - public static native void nstbtt_MakeGlyphBitmap(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph); - - /** - * Same as {@link #stbtt_GetGlyphBitmap GetGlyphBitmap}, but you pass in storage for the bitmap in the form of {@code output}, with row spacing of {@code out_stride} bytes. The - * bitmap is clipped to {@code out_w/out_h} bytes. Call {@link #stbtt_GetGlyphBitmapBox GetGlyphBitmapBox} to get the width and height and positioning info for it first. - * - * @param info an {@link STBTTFontinfo} struct - * @param output the bitmap storage - * @param out_w the bitmap width - * @param out_h the bitmap height - * @param out_stride the row stride, in bytes - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param glyph the glyph index to render - */ - public static void stbtt_MakeGlyphBitmap(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - } - nstbtt_MakeGlyphBitmap(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, glyph); - } - - // --- [ stbtt_MakeGlyphBitmapSubpixel ] --- - - /** Unsafe version of: {@link #stbtt_MakeGlyphBitmapSubpixel MakeGlyphBitmapSubpixel} */ - public static native void nstbtt_MakeGlyphBitmapSubpixel(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph); - - /** - * Same as {@link #stbtt_MakeGlyphBitmap MakeGlyphBitmap}, but you can specify a subpixel shift for the character. - * - * @param info an {@link STBTTFontinfo} struct - * @param output the bitmap storage - * @param out_w the bitmap width - * @param out_h the bitmap height - * @param out_stride the row stride, in bytes - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param glyph the glyph index to render - */ - public static void stbtt_MakeGlyphBitmapSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - } - nstbtt_MakeGlyphBitmapSubpixel(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, glyph); - } - - // --- [ stbtt_MakeGlyphBitmapSubpixelPrefilter ] --- - - /** Unsafe version of: {@link #stbtt_MakeGlyphBitmapSubpixelPrefilter MakeGlyphBitmapSubpixelPrefilter} */ - public static native void nstbtt_MakeGlyphBitmapSubpixelPrefilter(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, long sub_x, long sub_y, int glyph); - - /** - * Same as {@link #stbtt_MakeGlyphBitmapSubpixel MakeGlyphBitmapSubpixel}, but prefiltering is performed (see {@link #stbtt_PackSetOversampling PackSetOversampling}). - * - * @param info an {@link STBTTFontinfo} struct - * @param output the bitmap storage - * @param out_w the bitmap width - * @param out_h the bitmap height - * @param out_stride the row stride, in bytes - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param oversample_x the horizontal oversampling amount - * @param oversample_y the vertical oversampling amount - * @param sub_x returns the horizontal oversample shift - * @param sub_y returns the vertical oversample shift - * @param glyph the glyph index to render - */ - public static void stbtt_MakeGlyphBitmapSubpixelPrefilter(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, @NativeType("float *") FloatBuffer sub_x, @NativeType("float *") FloatBuffer sub_y, int glyph) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - check(sub_x, 1); - check(sub_y, 1); - } - nstbtt_MakeGlyphBitmapSubpixelPrefilter(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, memAddress(sub_x), memAddress(sub_y), glyph); - } - - // --- [ stbtt_GetGlyphBitmapBox ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphBitmapBox GetGlyphBitmapBox} */ - public static native void nstbtt_GetGlyphBitmapBox(long font, int glyph, float scale_x, float scale_y, long ix0, long iy0, long ix1, long iy1); - - /** - * Get the bbox of the bitmap centered around the glyph origin; so the bitmap width is {@code ix1-ix0}, height is {@code iy1-iy0}, and location to place - * the bitmap top left is {@code (leftSideBearing*scale,iy0)}. - * - *

    Note that the bitmap uses y-increases-down, but the shape uses y-increases-up, so {@code GlyphBitmapBox} and {@code GlyphBox} are inverted.

    - * - * @param font an {@link STBTTFontinfo} struct - * @param glyph the glyph index - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param ix0 returns the left coordinate - * @param iy0 returns the bottom coordinate - * @param ix1 returns the right coordinate - * @param iy1 returns the top coordinate - */ - public static void stbtt_GetGlyphBitmapBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int glyph, float scale_x, float scale_y, @Nullable @NativeType("int *") IntBuffer ix0, @Nullable @NativeType("int *") IntBuffer iy0, @Nullable @NativeType("int *") IntBuffer ix1, @Nullable @NativeType("int *") IntBuffer iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetGlyphBitmapBox(font.address(), glyph, scale_x, scale_y, memAddressSafe(ix0), memAddressSafe(iy0), memAddressSafe(ix1), memAddressSafe(iy1)); - } - - // --- [ stbtt_GetGlyphBitmapBoxSubpixel ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphBitmapBoxSubpixel GetGlyphBitmapBoxSubpixel} */ - public static native void nstbtt_GetGlyphBitmapBoxSubpixel(long font, int glyph, float scale_x, float scale_y, float shift_x, float shift_y, long ix0, long iy0, long ix1, long iy1); - - /** - * Same as {@link #stbtt_GetGlyphBitmapBox GetGlyphBitmapBox}, but you can specify a subpixel shift for the character. - * - * @param font an {@link STBTTFontinfo} struct - * @param glyph the glyph index - * @param scale_x the horizontal scale - * @param scale_y the vertical scale - * @param shift_x the horizontal subpixel shift - * @param shift_y the vertical subpixel shift - * @param ix0 returns the left coordinate - * @param iy0 returns the bottom coordinate - * @param ix1 returns the right coordinate - * @param iy1 returns the top coordinate - */ - public static void stbtt_GetGlyphBitmapBoxSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int glyph, float scale_x, float scale_y, float shift_x, float shift_y, @Nullable @NativeType("int *") IntBuffer ix0, @Nullable @NativeType("int *") IntBuffer iy0, @Nullable @NativeType("int *") IntBuffer ix1, @Nullable @NativeType("int *") IntBuffer iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetGlyphBitmapBoxSubpixel(font.address(), glyph, scale_x, scale_y, shift_x, shift_y, memAddressSafe(ix0), memAddressSafe(iy0), memAddressSafe(ix1), memAddressSafe(iy1)); - } - - // --- [ stbtt_Rasterize ] --- - - /** - * Unsafe version of: {@link #stbtt_Rasterize Rasterize} - * - * @param num_verts number of vertices in above array - */ - public static native void nstbtt_Rasterize(long result, float flatness_in_pixels, long vertices, int num_verts, float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, int invert, long alloc_context); - - /** - * Rasterize a shape with quadratic beziers into a bitmap. - * - * @param result 1-channel bitmap to draw into - * @param flatness_in_pixels allowable error of curve in pixels - * @param vertices array of vertices defining shape - * @param scale_x horizontal scale applied to input vertices - * @param scale_y vertical scale applied to input vertices - * @param shift_x horizontal translation applied to input vertices - * @param shift_y vertical translation applied to input vertices - * @param x_off another horizontal translation applied to input - * @param y_off another vertical translation applied to input - * @param invert if non-zero, vertically flip shape - */ - public static void stbtt_Rasterize(@NativeType("stbtt__bitmap *") STBTTBitmap result, float flatness_in_pixels, @NativeType("stbtt_vertex *") STBTTVertex.Buffer vertices, float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, @NativeType("int") boolean invert) { - nstbtt_Rasterize(result.address(), flatness_in_pixels, vertices.address(), vertices.remaining(), scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert ? 1 : 0, NULL); - } - - // --- [ stbtt_FreeSDF ] --- - - /** Unsafe version of: {@link #stbtt_FreeSDF FreeSDF} */ - public static native void nstbtt_FreeSDF(long bitmap, long userdata); - - /** - * Frees an SDF bitmap. - * - * @param bitmap the SDF bitmap to free - * @param userdata a pointer to an allocation context - */ - public static void stbtt_FreeSDF(@NativeType("unsigned char *") ByteBuffer bitmap, @NativeType("void *") long userdata) { - nstbtt_FreeSDF(memAddress(bitmap), userdata); - } - - /** - * Frees an SDF bitmap. - * - * @param bitmap the SDF bitmap to free - */ - public static void stbtt_FreeSDF(@NativeType("unsigned char *") ByteBuffer bitmap) { - nstbtt_FreeSDF(memAddress(bitmap), NULL); - } - - // --- [ stbtt_GetGlyphSDF ] --- - - /** Unsafe version of: {@link #stbtt_GetGlyphSDF GetGlyphSDF} */ - public static native long nstbtt_GetGlyphSDF(long font, float scale, int glyph, int padding, byte onedge_value, float pixel_dist_scale, long width, long height, long xoff, long yoff); - - /** - * Computes a discretized SDF field for a single character, suitable for storing in a single-channel texture, sampling with bilinear filtering, and - * testing against larger than some threshold to produce scalable fonts. - * - *

    {@code pixel_dist_scale} & {@code onedge_value} are a scale & bias that allows you to make optimal use of the limited {@code 0..255} for your - * application, trading off precision and special effects. SDF values outside the range {@code 0..255} are clamped to {@code 0..255}.

    - * - *

    Example:

    - * - *
    
    -     * scale = stbtt_ScaleForPixelHeight(22)
    -     * padding = 5
    -     * onedge_value = 180
    -     * pixel_dist_scale = 180/5.0 = 36.0
    - * - *

    This will create an SDF bitmap in which the character is about 22 pixels high but the whole bitmap is about {@code 22+5+5=32} pixels high. To produce a - * filled shape, sample the SDF at each pixel and fill the pixel if the SDF value is greater than or equal to {@code 180/255}. (You'll actually want to - * antialias, which is beyond the scope of this example.) Additionally, you can compute offset outlines (e.g. to stroke the character border inside & - * outside, or only outside). For example, to fill outside the character up to 3 SDF pixels, you would compare against {@code (180-36.0*3)/255 = 72/255}. - * The above choice of variables maps a range from 5 pixels outside the shape to 2 pixels inside the shape to {@code 0..255}; this is intended primarily - * for apply outside effects only (the interior range is needed to allow proper antialiasing of the font at smaller sizes).

    - * - *

    The function computes the SDF analytically at each SDF pixel, not by e.g. building a higher-res bitmap and approximating it. In theory the quality - * should be as high as possible for an SDF of this size & representation, but unclear if this is true in practice (perhaps building a higher-res - * bitmap and computing from that can allow drop-out prevention).

    - * - *

    The algorithm has not been optimized at all, so expect it to be slow if computing lots of characters or very large sizes.

    - * - * @param font an {@link STBTTFontinfo} struct - * @param scale controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap - * @param glyph the glyph to generate the SDF for - * @param padding extra "pixels" around the character which are filled with the distance to the character (not 0), which allows effects like bit outlines - * @param onedge_value value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character) - * @param pixel_dist_scale what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale). If positive, > {@code onedge_value} - * is inside; if negative, < {@code onedge_value} is inside. - * @param width output width of the SDF bitmap (including padding) - * @param height output height of the SDF bitmap (including padding) - * @param xoff output horizontal origin of the character - * @param yoff output vertical origin of the character - */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetGlyphSDF(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, float scale, int glyph, int padding, @NativeType("unsigned char") byte onedge_value, float pixel_dist_scale, @NativeType("int *") IntBuffer width, @NativeType("int *") IntBuffer height, @NativeType("int *") IntBuffer xoff, @NativeType("int *") IntBuffer yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - check(xoff, 1); - check(yoff, 1); - } - long __result = nstbtt_GetGlyphSDF(font.address(), scale, glyph, padding, onedge_value, pixel_dist_scale, memAddress(width), memAddress(height), memAddress(xoff), memAddress(yoff)); - return memByteBufferSafe(__result, width.get(width.position()) * height.get(height.position())); - } - - // --- [ stbtt_GetCodepointSDF ] --- - - /** Unsafe version of: {@link #stbtt_GetCodepointSDF GetCodepointSDF} */ - public static native long nstbtt_GetCodepointSDF(long font, float scale, int codepoint, int padding, byte onedge_value, float pixel_dist_scale, long width, long height, long xoff, long yoff); - - /** - * Codepoint version of {@link #stbtt_GetGlyphSDF GetGlyphSDF}. - * - * @param font an {@link STBTTFontinfo} struct - * @param scale controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap - * @param codepoint the codepoint to generate the SDF for - * @param padding extra "pixels" around the character which are filled with the distance to the character (not 0), which allows effects like bit outlines - * @param onedge_value value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character) - * @param pixel_dist_scale what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale). If positive, > {@code onedge_value} - * is inside; if negative, < {@code onedge_value} is inside. - * @param width output width of the SDF bitmap (including padding) - * @param height output height of the SDF bitmap (including padding) - * @param xoff output horizontal origin of the character - * @param yoff output vertical origin of the character - */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetCodepointSDF(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, float scale, int codepoint, int padding, @NativeType("unsigned char") byte onedge_value, float pixel_dist_scale, @NativeType("int *") IntBuffer width, @NativeType("int *") IntBuffer height, @NativeType("int *") IntBuffer xoff, @NativeType("int *") IntBuffer yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - check(xoff, 1); - check(yoff, 1); - } - long __result = nstbtt_GetCodepointSDF(font.address(), scale, codepoint, padding, onedge_value, pixel_dist_scale, memAddress(width), memAddress(height), memAddress(xoff), memAddress(yoff)); - return memByteBufferSafe(__result, width.get(width.position()) * height.get(height.position())); - } - - // --- [ stbtt_FindMatchingFont ] --- - - /** Unsafe version of: {@link #stbtt_FindMatchingFont FindMatchingFont} */ - public static native int nstbtt_FindMatchingFont(long fontdata, long name, int flags); - - /** - * Returns the offset (not index) of the font that matches, or -1 if none. - * - *

    If you use STBTT_MACSTYLE_DONTCARE, use a font name like "Arial Bold". If you use any other flag, use a font name like "Arial"; this checks the - * {@code macStyle} header field; I don't know if fonts set this consistently.

    - * - * @param fontdata the font data - * @param name the font name - * @param flags the style flags. One of:
    {@link #STBTT_MACSTYLE_DONTCARE MACSTYLE_DONTCARE}{@link #STBTT_MACSTYLE_BOLD MACSTYLE_BOLD}{@link #STBTT_MACSTYLE_ITALIC MACSTYLE_ITALIC}{@link #STBTT_MACSTYLE_UNDERSCORE MACSTYLE_UNDERSCORE}{@link #STBTT_MACSTYLE_NONE MACSTYLE_NONE}
    - */ - public static int stbtt_FindMatchingFont(@NativeType("unsigned char const *") ByteBuffer fontdata, @NativeType("char const *") ByteBuffer name, int flags) { - if (CHECKS) { - checkNT1(name); - } - return nstbtt_FindMatchingFont(memAddress(fontdata), memAddress(name), flags); - } - - /** - * Returns the offset (not index) of the font that matches, or -1 if none. - * - *

    If you use STBTT_MACSTYLE_DONTCARE, use a font name like "Arial Bold". If you use any other flag, use a font name like "Arial"; this checks the - * {@code macStyle} header field; I don't know if fonts set this consistently.

    - * - * @param fontdata the font data - * @param name the font name - * @param flags the style flags. One of:
    {@link #STBTT_MACSTYLE_DONTCARE MACSTYLE_DONTCARE}{@link #STBTT_MACSTYLE_BOLD MACSTYLE_BOLD}{@link #STBTT_MACSTYLE_ITALIC MACSTYLE_ITALIC}{@link #STBTT_MACSTYLE_UNDERSCORE MACSTYLE_UNDERSCORE}{@link #STBTT_MACSTYLE_NONE MACSTYLE_NONE}
    - */ - public static int stbtt_FindMatchingFont(@NativeType("unsigned char const *") ByteBuffer fontdata, @NativeType("char const *") CharSequence name, int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nstbtt_FindMatchingFont(memAddress(fontdata), nameEncoded, flags); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stbtt_CompareUTF8toUTF16_bigendian ] --- - - /** - * Unsafe version of: {@link #stbtt_CompareUTF8toUTF16_bigendian CompareUTF8toUTF16_bigendian} - * - * @param len1 the length of the first string, in bytes - * @param len2 the length of the second string, in bytes - */ - public static native int nstbtt_CompareUTF8toUTF16_bigendian(long s1, int len1, long s2, int len2); - - /** - * Returns 1/0 whether the first string interpreted as utf8 is identical to the second string interpreted as big-endian utf16... useful for strings - * returned from {@link #stbtt_GetFontNameString GetFontNameString}. - * - * @param s1 the first string - * @param s2 the second string - */ - @NativeType("int") - public static boolean stbtt_CompareUTF8toUTF16_bigendian(@NativeType("char const *") ByteBuffer s1, @NativeType("char const *") ByteBuffer s2) { - return nstbtt_CompareUTF8toUTF16_bigendian(memAddress(s1), s1.remaining(), memAddress(s2), s2.remaining()) != 0; - } - - // --- [ stbtt_GetFontNameString ] --- - - /** - * Unsafe version of: {@link #stbtt_GetFontNameString GetFontNameString} - * - * @param length returns the string length, in bytes - */ - public static native long nstbtt_GetFontNameString(long font, long length, int platformID, int encodingID, int languageID, int nameID); - - /** - * Returns the string (which may be big-endian double byte, e.g. for unicode) and puts the length in bytes in {@code *length}. - * - *

    See the truetype spec:

    - * - * - * - * @param font an {@link STBTTFontinfo} struct - * @param platformID the platform ID. One of:
    {@link #STBTT_PLATFORM_ID_UNICODE PLATFORM_ID_UNICODE}{@link #STBTT_PLATFORM_ID_MAC PLATFORM_ID_MAC}{@link #STBTT_PLATFORM_ID_ISO PLATFORM_ID_ISO}{@link #STBTT_PLATFORM_ID_MICROSOFT PLATFORM_ID_MICROSOFT}
    - * @param encodingID the encoding ID. One of:
    {@link #STBTT_UNICODE_EID_UNICODE_1_0 UNICODE_EID_UNICODE_1_0}{@link #STBTT_UNICODE_EID_UNICODE_1_1 UNICODE_EID_UNICODE_1_1}{@link #STBTT_UNICODE_EID_ISO_10646 UNICODE_EID_ISO_10646}{@link #STBTT_UNICODE_EID_UNICODE_2_0_BMP UNICODE_EID_UNICODE_2_0_BMP}
    {@link #STBTT_UNICODE_EID_UNICODE_2_0_FULL UNICODE_EID_UNICODE_2_0_FULL}{@link #STBTT_MS_EID_SYMBOL MS_EID_SYMBOL}{@link #STBTT_MS_EID_UNICODE_BMP MS_EID_UNICODE_BMP}{@link #STBTT_MS_EID_SHIFTJIS MS_EID_SHIFTJIS}
    {@link #STBTT_MS_EID_UNICODE_FULL MS_EID_UNICODE_FULL}{@link #STBTT_MAC_EID_ROMAN MAC_EID_ROMAN}{@link #STBTT_MAC_EID_JAPANESE MAC_EID_JAPANESE}{@link #STBTT_MAC_EID_CHINESE_TRAD MAC_EID_CHINESE_TRAD}
    {@link #STBTT_MAC_EID_KOREAN MAC_EID_KOREAN}{@link #STBTT_MAC_EID_ARABIC MAC_EID_ARABIC}{@link #STBTT_MAC_EID_HEBREW MAC_EID_HEBREW}{@link #STBTT_MAC_EID_GREEK MAC_EID_GREEK}
    {@link #STBTT_MAC_EID_RUSSIAN MAC_EID_RUSSIAN}
    - * @param languageID the language ID. One of:
    {@link #STBTT_MS_LANG_ENGLISH MS_LANG_ENGLISH}{@link #STBTT_MS_LANG_CHINESE MS_LANG_CHINESE}{@link #STBTT_MS_LANG_DUTCH MS_LANG_DUTCH}{@link #STBTT_MS_LANG_FRENCH MS_LANG_FRENCH}{@link #STBTT_MS_LANG_GERMAN MS_LANG_GERMAN}
    {@link #STBTT_MS_LANG_HEBREW MS_LANG_HEBREW}{@link #STBTT_MS_LANG_ITALIAN MS_LANG_ITALIAN}{@link #STBTT_MS_LANG_JAPANESE MS_LANG_JAPANESE}{@link #STBTT_MS_LANG_KOREAN MS_LANG_KOREAN}{@link #STBTT_MS_LANG_RUSSIAN MS_LANG_RUSSIAN}
    {@link #STBTT_MS_LANG_SPANISH MS_LANG_SPANISH}{@link #STBTT_MS_LANG_SWEDISH MS_LANG_SWEDISH}{@link #STBTT_MAC_LANG_ENGLISH MAC_LANG_ENGLISH}{@link #STBTT_MAC_LANG_ARABIC MAC_LANG_ARABIC}{@link #STBTT_MAC_LANG_DUTCH MAC_LANG_DUTCH}
    {@link #STBTT_MAC_LANG_FRENCH MAC_LANG_FRENCH}{@link #STBTT_MAC_LANG_GERMAN MAC_LANG_GERMAN}{@link #STBTT_MAC_LANG_HEBREW MAC_LANG_HEBREW}{@link #STBTT_MAC_LANG_ITALIAN MAC_LANG_ITALIAN}{@link #STBTT_MAC_LANG_JAPANESE MAC_LANG_JAPANESE}
    {@link #STBTT_MAC_LANG_KOREAN MAC_LANG_KOREAN}{@link #STBTT_MAC_LANG_RUSSIAN MAC_LANG_RUSSIAN}{@link #STBTT_MAC_LANG_SPANISH MAC_LANG_SPANISH}{@link #STBTT_MAC_LANG_SWEDISH MAC_LANG_SWEDISH}{@link #STBTT_MAC_LANG_CHINESE_SIMPLIFIED MAC_LANG_CHINESE_SIMPLIFIED}
    {@link #STBTT_MAC_LANG_CHINESE_TRAD MAC_LANG_CHINESE_TRAD}
    - * @param nameID the name ID - */ - @Nullable - @NativeType("char const *") - public static ByteBuffer stbtt_GetFontNameString(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int platformID, int encodingID, int languageID, int nameID) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer length = stack.callocInt(1); - try { - long __result = nstbtt_GetFontNameString(font.address(), memAddress(length), platformID, encodingID, languageID, nameID); - return memByteBufferSafe(__result, length.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstbtt_GetBakedQuad} */ - public static native void nstbtt_GetBakedQuad(long chardata, int pw, int ph, int char_index, float[] xpos, float[] ypos, long q, int opengl_fillrule); - - /** Array version of: {@link #stbtt_GetBakedQuad GetBakedQuad} */ - public static void stbtt_GetBakedQuad(@NativeType("stbtt_bakedchar const *") STBTTBakedChar.Buffer chardata, int pw, int ph, int char_index, @NativeType("float *") float[] xpos, @NativeType("float *") float[] ypos, @NativeType("stbtt_aligned_quad *") STBTTAlignedQuad q, @NativeType("int") boolean opengl_fillrule) { - if (CHECKS) { - check(chardata, char_index + 1); - check(xpos, 1); - check(ypos, 1); - } - nstbtt_GetBakedQuad(chardata.address(), pw, ph, char_index, xpos, ypos, q.address(), opengl_fillrule ? 1 : 0); - } - - /** Array version of: {@link #nstbtt_GetScaledFontVMetrics} */ - public static native void nstbtt_GetScaledFontVMetrics(long fontdata, int index, float size, float[] ascent, float[] descent, float[] lineGap); - - /** Array version of: {@link #stbtt_GetScaledFontVMetrics GetScaledFontVMetrics} */ - public static void stbtt_GetScaledFontVMetrics(@NativeType("unsigned char const *") ByteBuffer fontdata, int index, float size, @NativeType("float *") float[] ascent, @NativeType("float *") float[] descent, @NativeType("float *") float[] lineGap) { - if (CHECKS) { - check(ascent, 1); - check(descent, 1); - check(lineGap, 1); - } - nstbtt_GetScaledFontVMetrics(memAddress(fontdata), index, size, ascent, descent, lineGap); - } - - /** Array version of: {@link #nstbtt_GetPackedQuad} */ - public static native void nstbtt_GetPackedQuad(long chardata, int pw, int ph, int char_index, float[] xpos, float[] ypos, long q, int align_to_integer); - - /** Array version of: {@link #stbtt_GetPackedQuad GetPackedQuad} */ - public static void stbtt_GetPackedQuad(@NativeType("stbtt_packedchar const *") STBTTPackedchar.Buffer chardata, int pw, int ph, int char_index, @NativeType("float *") float[] xpos, @NativeType("float *") float[] ypos, @NativeType("stbtt_aligned_quad *") STBTTAlignedQuad q, @NativeType("int") boolean align_to_integer) { - if (CHECKS) { - check(chardata, char_index + 1); - check(xpos, 1); - check(ypos, 1); - } - nstbtt_GetPackedQuad(chardata.address(), pw, ph, char_index, xpos, ypos, q.address(), align_to_integer ? 1 : 0); - } - - /** Array version of: {@link #nstbtt_GetFontVMetrics} */ - public static native void nstbtt_GetFontVMetrics(long info, int[] ascent, int[] descent, int[] lineGap); - - /** Array version of: {@link #stbtt_GetFontVMetrics GetFontVMetrics} */ - public static void stbtt_GetFontVMetrics(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @Nullable @NativeType("int *") int[] ascent, @Nullable @NativeType("int *") int[] descent, @Nullable @NativeType("int *") int[] lineGap) { - if (CHECKS) { - checkSafe(ascent, 1); - checkSafe(descent, 1); - checkSafe(lineGap, 1); - } - nstbtt_GetFontVMetrics(info.address(), ascent, descent, lineGap); - } - - /** Array version of: {@link #nstbtt_GetFontVMetricsOS2} */ - public static native int nstbtt_GetFontVMetricsOS2(long info, int[] typoAscent, int[] typoDescent, int[] typoLineGap); - - /** Array version of: {@link #stbtt_GetFontVMetricsOS2 GetFontVMetricsOS2} */ - @NativeType("int") - public static boolean stbtt_GetFontVMetricsOS2(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @Nullable @NativeType("int *") int[] typoAscent, @Nullable @NativeType("int *") int[] typoDescent, @Nullable @NativeType("int *") int[] typoLineGap) { - if (CHECKS) { - checkSafe(typoAscent, 1); - checkSafe(typoDescent, 1); - checkSafe(typoLineGap, 1); - } - return nstbtt_GetFontVMetricsOS2(info.address(), typoAscent, typoDescent, typoLineGap) != 0; - } - - /** Array version of: {@link #nstbtt_GetFontBoundingBox} */ - public static native void nstbtt_GetFontBoundingBox(long info, int[] x0, int[] y0, int[] x1, int[] y1); - - /** Array version of: {@link #stbtt_GetFontBoundingBox GetFontBoundingBox} */ - public static void stbtt_GetFontBoundingBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("int *") int[] x0, @NativeType("int *") int[] y0, @NativeType("int *") int[] x1, @NativeType("int *") int[] y1) { - if (CHECKS) { - check(x0, 1); - check(y0, 1); - check(x1, 1); - check(y1, 1); - } - nstbtt_GetFontBoundingBox(info.address(), x0, y0, x1, y1); - } - - /** Array version of: {@link #nstbtt_GetCodepointHMetrics} */ - public static native void nstbtt_GetCodepointHMetrics(long info, int codepoint, int[] advanceWidth, int[] leftSideBearing); - - /** Array version of: {@link #stbtt_GetCodepointHMetrics GetCodepointHMetrics} */ - public static void stbtt_GetCodepointHMetrics(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int codepoint, @Nullable @NativeType("int *") int[] advanceWidth, @Nullable @NativeType("int *") int[] leftSideBearing) { - if (CHECKS) { - checkSafe(advanceWidth, 1); - checkSafe(leftSideBearing, 1); - } - nstbtt_GetCodepointHMetrics(info.address(), codepoint, advanceWidth, leftSideBearing); - } - - /** Array version of: {@link #nstbtt_GetCodepointBox} */ - public static native int nstbtt_GetCodepointBox(long info, int codepoint, int[] x0, int[] y0, int[] x1, int[] y1); - - /** Array version of: {@link #stbtt_GetCodepointBox GetCodepointBox} */ - @NativeType("int") - public static boolean stbtt_GetCodepointBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int codepoint, @Nullable @NativeType("int *") int[] x0, @Nullable @NativeType("int *") int[] y0, @Nullable @NativeType("int *") int[] x1, @Nullable @NativeType("int *") int[] y1) { - if (CHECKS) { - checkSafe(x0, 1); - checkSafe(y0, 1); - checkSafe(x1, 1); - checkSafe(y1, 1); - } - return nstbtt_GetCodepointBox(info.address(), codepoint, x0, y0, x1, y1) != 0; - } - - /** Array version of: {@link #nstbtt_GetGlyphHMetrics} */ - public static native void nstbtt_GetGlyphHMetrics(long info, int glyph_index, int[] advanceWidth, int[] leftSideBearing); - - /** Array version of: {@link #stbtt_GetGlyphHMetrics GetGlyphHMetrics} */ - public static void stbtt_GetGlyphHMetrics(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph_index, @Nullable @NativeType("int *") int[] advanceWidth, @Nullable @NativeType("int *") int[] leftSideBearing) { - if (CHECKS) { - checkSafe(advanceWidth, 1); - checkSafe(leftSideBearing, 1); - } - nstbtt_GetGlyphHMetrics(info.address(), glyph_index, advanceWidth, leftSideBearing); - } - - /** Array version of: {@link #nstbtt_GetGlyphBox} */ - public static native int nstbtt_GetGlyphBox(long info, int glyph_index, int[] x0, int[] y0, int[] x1, int[] y1); - - /** Array version of: {@link #stbtt_GetGlyphBox GetGlyphBox} */ - @NativeType("int") - public static boolean stbtt_GetGlyphBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, int glyph_index, @Nullable @NativeType("int *") int[] x0, @Nullable @NativeType("int *") int[] y0, @Nullable @NativeType("int *") int[] x1, @Nullable @NativeType("int *") int[] y1) { - if (CHECKS) { - checkSafe(x0, 1); - checkSafe(y0, 1); - checkSafe(x1, 1); - checkSafe(y1, 1); - } - return nstbtt_GetGlyphBox(info.address(), glyph_index, x0, y0, x1, y1) != 0; - } - - /** Array version of: {@link #nstbtt_GetCodepointBitmap} */ - public static native long nstbtt_GetCodepointBitmap(long info, float scale_x, float scale_y, int codepoint, int[] width, int[] height, int[] xoff, int[] yoff); - - /** Array version of: {@link #stbtt_GetCodepointBitmap GetCodepointBitmap} */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetCodepointBitmap(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, int codepoint, @NativeType("int *") int[] width, @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] xoff, @Nullable @NativeType("int *") int[] yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetCodepointBitmap(info.address(), scale_x, scale_y, codepoint, width, height, xoff, yoff); - return memByteBufferSafe(__result, width[0] * height[0]); - } - - /** Array version of: {@link #nstbtt_GetCodepointBitmapSubpixel} */ - public static native long nstbtt_GetCodepointBitmapSubpixel(long info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int[] width, int[] height, int[] xoff, int[] yoff); - - /** Array version of: {@link #stbtt_GetCodepointBitmapSubpixel GetCodepointBitmapSubpixel} */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetCodepointBitmapSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, @NativeType("int *") int[] width, @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] xoff, @Nullable @NativeType("int *") int[] yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetCodepointBitmapSubpixel(info.address(), scale_x, scale_y, shift_x, shift_y, codepoint, width, height, xoff, yoff); - return memByteBufferSafe(__result, width[0] * height[0]); - } - - /** Array version of: {@link #nstbtt_MakeCodepointBitmapSubpixelPrefilter} */ - public static native void nstbtt_MakeCodepointBitmapSubpixelPrefilter(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float[] sub_x, float[] sub_y, int codepoint); - - /** Array version of: {@link #stbtt_MakeCodepointBitmapSubpixelPrefilter MakeCodepointBitmapSubpixelPrefilter} */ - public static void stbtt_MakeCodepointBitmapSubpixelPrefilter(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, @NativeType("float *") float[] sub_x, @NativeType("float *") float[] sub_y, int codepoint) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - check(sub_x, 1); - check(sub_y, 1); - } - nstbtt_MakeCodepointBitmapSubpixelPrefilter(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, sub_x, sub_y, codepoint); - } - - /** Array version of: {@link #nstbtt_GetCodepointBitmapBox} */ - public static native void nstbtt_GetCodepointBitmapBox(long font, int codepoint, float scale_x, float scale_y, int[] ix0, int[] iy0, int[] ix1, int[] iy1); - - /** Array version of: {@link #stbtt_GetCodepointBitmapBox GetCodepointBitmapBox} */ - public static void stbtt_GetCodepointBitmapBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int codepoint, float scale_x, float scale_y, @Nullable @NativeType("int *") int[] ix0, @Nullable @NativeType("int *") int[] iy0, @Nullable @NativeType("int *") int[] ix1, @Nullable @NativeType("int *") int[] iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetCodepointBitmapBox(font.address(), codepoint, scale_x, scale_y, ix0, iy0, ix1, iy1); - } - - /** Array version of: {@link #nstbtt_GetCodepointBitmapBoxSubpixel} */ - public static native void nstbtt_GetCodepointBitmapBoxSubpixel(long font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int[] ix0, int[] iy0, int[] ix1, int[] iy1); - - /** Array version of: {@link #stbtt_GetCodepointBitmapBoxSubpixel GetCodepointBitmapBoxSubpixel} */ - public static void stbtt_GetCodepointBitmapBoxSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, @Nullable @NativeType("int *") int[] ix0, @Nullable @NativeType("int *") int[] iy0, @Nullable @NativeType("int *") int[] ix1, @Nullable @NativeType("int *") int[] iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetCodepointBitmapBoxSubpixel(font.address(), codepoint, scale_x, scale_y, shift_x, shift_y, ix0, iy0, ix1, iy1); - } - - /** Array version of: {@link #nstbtt_GetGlyphBitmap} */ - public static native long nstbtt_GetGlyphBitmap(long info, float scale_x, float scale_y, int glyph, int[] width, int[] height, int[] xoff, int[] yoff); - - /** Array version of: {@link #stbtt_GetGlyphBitmap GetGlyphBitmap} */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetGlyphBitmap(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, int glyph, @NativeType("int *") int[] width, @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] xoff, @Nullable @NativeType("int *") int[] yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetGlyphBitmap(info.address(), scale_x, scale_y, glyph, width, height, xoff, yoff); - return memByteBufferSafe(__result, width[0] * height[0]); - } - - /** Array version of: {@link #nstbtt_GetGlyphBitmapSubpixel} */ - public static native long nstbtt_GetGlyphBitmapSubpixel(long info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int[] width, int[] height, int[] xoff, int[] yoff); - - /** Array version of: {@link #stbtt_GetGlyphBitmapSubpixel GetGlyphBitmapSubpixel} */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetGlyphBitmapSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, @NativeType("int *") int[] width, @NativeType("int *") int[] height, @Nullable @NativeType("int *") int[] xoff, @Nullable @NativeType("int *") int[] yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - checkSafe(xoff, 1); - checkSafe(yoff, 1); - } - long __result = nstbtt_GetGlyphBitmapSubpixel(info.address(), scale_x, scale_y, shift_x, shift_y, glyph, width, height, xoff, yoff); - return memByteBufferSafe(__result, width[0] * height[0]); - } - - /** Array version of: {@link #nstbtt_MakeGlyphBitmapSubpixelPrefilter} */ - public static native void nstbtt_MakeGlyphBitmapSubpixelPrefilter(long info, long output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float[] sub_x, float[] sub_y, int glyph); - - /** Array version of: {@link #stbtt_MakeGlyphBitmapSubpixelPrefilter MakeGlyphBitmapSubpixelPrefilter} */ - public static void stbtt_MakeGlyphBitmapSubpixelPrefilter(@NativeType("stbtt_fontinfo const *") STBTTFontinfo info, @NativeType("unsigned char *") ByteBuffer output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, @NativeType("float *") float[] sub_x, @NativeType("float *") float[] sub_y, int glyph) { - if (CHECKS) { - check(output, (out_stride != 0 ? out_stride : out_w) * out_h); - check(sub_x, 1); - check(sub_y, 1); - } - nstbtt_MakeGlyphBitmapSubpixelPrefilter(info.address(), memAddress(output), out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, sub_x, sub_y, glyph); - } - - /** Array version of: {@link #nstbtt_GetGlyphBitmapBox} */ - public static native void nstbtt_GetGlyphBitmapBox(long font, int glyph, float scale_x, float scale_y, int[] ix0, int[] iy0, int[] ix1, int[] iy1); - - /** Array version of: {@link #stbtt_GetGlyphBitmapBox GetGlyphBitmapBox} */ - public static void stbtt_GetGlyphBitmapBox(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int glyph, float scale_x, float scale_y, @Nullable @NativeType("int *") int[] ix0, @Nullable @NativeType("int *") int[] iy0, @Nullable @NativeType("int *") int[] ix1, @Nullable @NativeType("int *") int[] iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetGlyphBitmapBox(font.address(), glyph, scale_x, scale_y, ix0, iy0, ix1, iy1); - } - - /** Array version of: {@link #nstbtt_GetGlyphBitmapBoxSubpixel} */ - public static native void nstbtt_GetGlyphBitmapBoxSubpixel(long font, int glyph, float scale_x, float scale_y, float shift_x, float shift_y, int[] ix0, int[] iy0, int[] ix1, int[] iy1); - - /** Array version of: {@link #stbtt_GetGlyphBitmapBoxSubpixel GetGlyphBitmapBoxSubpixel} */ - public static void stbtt_GetGlyphBitmapBoxSubpixel(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, int glyph, float scale_x, float scale_y, float shift_x, float shift_y, @Nullable @NativeType("int *") int[] ix0, @Nullable @NativeType("int *") int[] iy0, @Nullable @NativeType("int *") int[] ix1, @Nullable @NativeType("int *") int[] iy1) { - if (CHECKS) { - checkSafe(ix0, 1); - checkSafe(iy0, 1); - checkSafe(ix1, 1); - checkSafe(iy1, 1); - } - nstbtt_GetGlyphBitmapBoxSubpixel(font.address(), glyph, scale_x, scale_y, shift_x, shift_y, ix0, iy0, ix1, iy1); - } - - /** Array version of: {@link #nstbtt_GetGlyphSDF} */ - public static native long nstbtt_GetGlyphSDF(long font, float scale, int glyph, int padding, byte onedge_value, float pixel_dist_scale, int[] width, int[] height, int[] xoff, int[] yoff); - - /** Array version of: {@link #stbtt_GetGlyphSDF GetGlyphSDF} */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetGlyphSDF(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, float scale, int glyph, int padding, @NativeType("unsigned char") byte onedge_value, float pixel_dist_scale, @NativeType("int *") int[] width, @NativeType("int *") int[] height, @NativeType("int *") int[] xoff, @NativeType("int *") int[] yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - check(xoff, 1); - check(yoff, 1); - } - long __result = nstbtt_GetGlyphSDF(font.address(), scale, glyph, padding, onedge_value, pixel_dist_scale, width, height, xoff, yoff); - return memByteBufferSafe(__result, width[0] * height[0]); - } - - /** Array version of: {@link #nstbtt_GetCodepointSDF} */ - public static native long nstbtt_GetCodepointSDF(long font, float scale, int codepoint, int padding, byte onedge_value, float pixel_dist_scale, int[] width, int[] height, int[] xoff, int[] yoff); - - /** Array version of: {@link #stbtt_GetCodepointSDF GetCodepointSDF} */ - @Nullable - @NativeType("unsigned char *") - public static ByteBuffer stbtt_GetCodepointSDF(@NativeType("stbtt_fontinfo const *") STBTTFontinfo font, float scale, int codepoint, int padding, @NativeType("unsigned char") byte onedge_value, float pixel_dist_scale, @NativeType("int *") int[] width, @NativeType("int *") int[] height, @NativeType("int *") int[] xoff, @NativeType("int *") int[] yoff) { - if (CHECKS) { - check(width, 1); - check(height, 1); - check(xoff, 1); - check(yoff, 1); - } - long __result = nstbtt_GetCodepointSDF(font.address(), scale, codepoint, padding, onedge_value, pixel_dist_scale, width, height, xoff, yoff); - return memByteBufferSafe(__result, width[0] * height[0]); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbis.java b/LWJGL/src/main/java/org/lwjgl/stb/STBVorbis.java deleted file mode 100644 index e3feaba3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbis.java +++ /dev/null @@ -1,990 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -import org.lwjgl.system.libc.LibCStdlib; - -/** - * Native bindings to stb_vorbis.c from the stb library. - * - *

    Ogg Vorbis audio decoder.

    - * - *

    Limitations

    - * - *
      - *
    • floor 0 not supported (used in old ogg vorbis files pre-2004)
    • - *
    • lossless sample-truncation at beginning ignored
    • - *
    • cannot concatenate multiple vorbis streams
    • - *
    • sample positions are 32-bit, limiting seekable 192Khz files to around 6 hours (Ogg supports 64-bit)
    • - *
    - * - *

    THREAD SAFETY

    - * - *

    Individual stb_vorbis* handles are not thread-safe; you cannot decode from them from multiple threads at the same time. However, you can have multiple - * {@code stb_vorbis*} handles and decode from them independently in multiple threads.

    - * - *

    PUSHDATA API

    - * - *

    This API allows you to get blocks of data from any source and hand them to stb_vorbis. you have to buffer them; stb_vorbis will tell you how much it - * used, and you have to give it the rest next time; and stb_vorbis may not have enough data to work with and you will need to give it the same data - * again PLUS more. Note that the Vorbis specification does not bound the size of an individual frame.

    - * - *

    PULLING INPUT API

    - * - *

    This API assumes stb_vorbis is allowed to pull data from a source -- either a block of memory containing the _entire_ vorbis stream, or a FILE * that - * you or it create, or possibly some other reading mechanism if you go modify the source to replace the FILE * case with some kind of callback to your - * code. (But if you don't support seeking, you may just want to go ahead and use pushdata.)

    - */ -public class STBVorbis { - - static { LibSTB.initialize(); } - - /** - * Error code. - * - *
    Enum values:
    - * - *
      - *
    • {@link #VORBIS__no_error _no_error}
    • - *
    • {@link #VORBIS_need_more_data need_more_data}
    • - *
    • {@link #VORBIS_invalid_api_mixing invalid_api_mixing}
    • - *
    • {@link #VORBIS_outofmem outofmem}
    • - *
    • {@link #VORBIS_feature_not_supported feature_not_supported}
    • - *
    • {@link #VORBIS_too_many_channels too_many_channels}
    • - *
    • {@link #VORBIS_file_open_failure file_open_failure}
    • - *
    • {@link #VORBIS_seek_without_length seek_without_length}
    • - *
    • {@link #VORBIS_unexpected_eof unexpected_eof}
    • - *
    • {@link #VORBIS_seek_invalid seek_invalid}
    • - *
    • {@link #VORBIS_invalid_setup invalid_setup}
    • - *
    • {@link #VORBIS_invalid_stream invalid_stream}
    • - *
    • {@link #VORBIS_missing_capture_pattern missing_capture_pattern}
    • - *
    • {@link #VORBIS_invalid_stream_structure_version invalid_stream_structure_version}
    • - *
    • {@link #VORBIS_continued_packet_flag_invalid continued_packet_flag_invalid}
    • - *
    • {@link #VORBIS_incorrect_stream_serial_number incorrect_stream_serial_number}
    • - *
    • {@link #VORBIS_invalid_first_page invalid_first_page}
    • - *
    • {@link #VORBIS_bad_packet_type bad_packet_type}
    • - *
    • {@link #VORBIS_cant_find_last_page cant_find_last_page}
    • - *
    • {@link #VORBIS_seek_failed seek_failed}
    • - *
    • {@link #VORBIS_ogg_skeleton_not_supported ogg_skeleton_not_supported}
    • - *
    - */ - public static final int - VORBIS__no_error = 0, - VORBIS_need_more_data = 1, - VORBIS_invalid_api_mixing = 2, - VORBIS_outofmem = 3, - VORBIS_feature_not_supported = 4, - VORBIS_too_many_channels = 5, - VORBIS_file_open_failure = 6, - VORBIS_seek_without_length = 7, - VORBIS_unexpected_eof = 10, - VORBIS_seek_invalid = 11, - VORBIS_invalid_setup = 20, - VORBIS_invalid_stream = 21, - VORBIS_missing_capture_pattern = 30, - VORBIS_invalid_stream_structure_version = 31, - VORBIS_continued_packet_flag_invalid = 32, - VORBIS_incorrect_stream_serial_number = 33, - VORBIS_invalid_first_page = 34, - VORBIS_bad_packet_type = 35, - VORBIS_cant_find_last_page = 36, - VORBIS_seek_failed = 37, - VORBIS_ogg_skeleton_not_supported = 38; - - protected STBVorbis() { - throw new UnsupportedOperationException(); - } - - // --- [ stb_vorbis_get_info ] --- - - /** Unsafe version of: {@link #stb_vorbis_get_info get_info} */ - public static native void nstb_vorbis_get_info(long f, long __result); - - /** - * Returns general information about the specified file. - * - * @param f an ogg vorbis file decoder - */ - @NativeType("stb_vorbis_info") - public static STBVorbisInfo stb_vorbis_get_info(@NativeType("stb_vorbis *") long f, @NativeType("stb_vorbis_info") STBVorbisInfo __result) { - if (CHECKS) { - check(f); - } - nstb_vorbis_get_info(f, __result.address()); - return __result; - } - - // --- [ stb_vorbis_get_comment ] --- - - /** Unsafe version of: {@link #stb_vorbis_get_comment get_comment} */ - public static native void nstb_vorbis_get_comment(long f, long __result); - - /** - * Returns ogg comments. - * - * @param f an ogg vorbis file decoder - */ - @NativeType("stb_vorbis_comment") - public static STBVorbisComment stb_vorbis_get_comment(@NativeType("stb_vorbis *") long f, @NativeType("stb_vorbis_comment") STBVorbisComment __result) { - if (CHECKS) { - check(f); - } - nstb_vorbis_get_comment(f, __result.address()); - return __result; - } - - // --- [ stb_vorbis_get_error ] --- - - /** Unsafe version of: {@link #stb_vorbis_get_error get_error} */ - public static native int nstb_vorbis_get_error(long f); - - /** - * Returns the last error detected (clears it, too). - * - * @param f an ogg vorbis file decoder - */ - public static int stb_vorbis_get_error(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_error(f); - } - - // --- [ stb_vorbis_close ] --- - - /** Unsafe version of: {@link #stb_vorbis_close close} */ - public static native void nstb_vorbis_close(long f); - - /** - * Closes an ogg vorbis file and free all memory in use - * - * @param f an ogg vorbis file decoder - */ - public static void stb_vorbis_close(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - nstb_vorbis_close(f); - } - - // --- [ stb_vorbis_get_sample_offset ] --- - - /** Unsafe version of: {@link #stb_vorbis_get_sample_offset get_sample_offset} */ - public static native int nstb_vorbis_get_sample_offset(long f); - - /** - * Returns the offset (in samples) from the beginning of the file that will be returned by the next decode, if it is known, or -1 otherwise. After a - * {@link #stb_vorbis_flush_pushdata flush_pushdata} call, this may take a while before it becomes valid again. - * - *

    NOT WORKING YET after a seek with PULLDATA API.

    - * - * @param f an ogg vorbis file decoder - */ - public static int stb_vorbis_get_sample_offset(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_sample_offset(f); - } - - // --- [ stb_vorbis_get_file_offset ] --- - - /** Unsafe version of: {@link #stb_vorbis_get_file_offset get_file_offset} */ - public static native int nstb_vorbis_get_file_offset(long f); - - /** - * Returns the current seek point within the file, or offset from the beginning of the memory buffer. In pushdata mode it returns 0. - * - * @param f an ogg vorbis file decoder - */ - @NativeType("unsigned int") - public static int stb_vorbis_get_file_offset(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_file_offset(f); - } - - // --- [ stb_vorbis_open_pushdata ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_open_pushdata open_pushdata} - * - * @param datablock_length_in_bytes the length of {@code datablock}, in bytes - */ - public static native long nstb_vorbis_open_pushdata(long datablock, int datablock_length_in_bytes, long datablock_memory_consumed_in_bytes, long error, long alloc_buffer); - - /** - * Creates a vorbis decoder by passing in the initial data block containing the ogg&vorbis headers (you don't need to do parse them, just provide the - * first N bytes of the file -- you're told if it's not enough, see below) - * - * @param datablock the data block containing the ogg vorbis headers - * @param datablock_memory_consumed_in_bytes returns the amount of data parsed/consumed, in bytes - * @param error returns the error code - * @param alloc_buffer an {@link STBVorbisAlloc} struct - * - * @return On success, returns an {@code stb_vorbis *}, does not set error, returns the amount of data parsed/consumed on this call in - * {@code *datablock_memory_consumed_in_bytes}; On failure, returns {@code NULL} on error and sets {@code *error}, does not change - * {@code *datablock_memory_consumed}. If it returns {@code NULL} and {@code *error} is {@link #VORBIS_need_more_data need_more_data}, then the input block was incomplete and you need to pass - * in a larger block from the start of the file. - */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_pushdata(@NativeType("unsigned char const *") ByteBuffer datablock, @NativeType("int *") IntBuffer datablock_memory_consumed_in_bytes, @NativeType("int *") IntBuffer error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - check(datablock_memory_consumed_in_bytes, 1); - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - return nstb_vorbis_open_pushdata(memAddress(datablock), datablock.remaining(), memAddress(datablock_memory_consumed_in_bytes), memAddress(error), memAddressSafe(alloc_buffer)); - } - - // --- [ stb_vorbis_decode_frame_pushdata ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_decode_frame_pushdata decode_frame_pushdata} - * - * @param datablock_length_in_bytes the length of {@code datablock}, in bytes - */ - public static native int nstb_vorbis_decode_frame_pushdata(long f, long datablock, int datablock_length_in_bytes, long channels, long output, long samples); - - /** - * Decodes a frame of audio sample data if possible from the passed-in data block. - * - *

    Note that on resynch, stb_vorbis will rarely consume all of the buffer, instead only {@code datablock_length_in_bytes-3} or less. This is because it - * wants to avoid missing parts of a page header if they cross a datablock boundary, without writing state-machiney code to record a partial detection.

    - * - *

    The number of channels returned are stored in *channels (which can be {@code NULL} -- it is always the same as the number of channels reported by {@link #stb_vorbis_get_info get_info}). - * {@code *output} will contain an array of {@code float*} buffers, one per channel. In other words, {@code (*output)[0][0]} contains the first sample - * from the first channel, and {@code (*output)[1][0]} contains the first sample from the second channel.

    - * - *

    {@code *output} points into stb_vorbis's internal output buffer storage; these buffers are owned by stb_vorbis and application code should not free - * them or modify their contents. They are transient and will be overwritten once you ask for more data to get decoded, so be sure to grab any data you - * need before then.

    - * - * @param f an ogg vorbis file decoder - * @param datablock the data block containing the audio sample data - * @param channels place to write number of {@code float *} buffers - * @param output place to write float ** array of float * buffers - * @param samples place to write number of output samples - * - * @return the number of bytes we used from datablock. Possible cases: - * - *
      - *
    • 0 bytes used, 0 samples output (need more data)
    • - *
    • N bytes used, 0 samples output (resynching the stream, keep going)
    • - *
    • N bytes used, M samples output (one frame of data)
    • - *
    - * - *

    Note that after opening a file, you will ALWAYS get one N-bytes,0-sample frame, because Vorbis always "discards" the first frame.

    - */ - public static int stb_vorbis_decode_frame_pushdata(@NativeType("stb_vorbis *") long f, @NativeType("unsigned char const *") ByteBuffer datablock, @Nullable @NativeType("int *") IntBuffer channels, @NativeType("float ***") PointerBuffer output, @NativeType("int *") IntBuffer samples) { - if (CHECKS) { - check(f); - checkSafe(channels, 1); - check(output, 1); - check(samples, 1); - } - return nstb_vorbis_decode_frame_pushdata(f, memAddress(datablock), datablock.remaining(), memAddressSafe(channels), memAddress(output), memAddress(samples)); - } - - // --- [ stb_vorbis_flush_pushdata ] --- - - /** Unsafe version of: {@link #stb_vorbis_flush_pushdata flush_pushdata} */ - public static native void nstb_vorbis_flush_pushdata(long f); - - /** - * Inform stb_vorbis that your next datablock will not be contiguous with previous ones (e.g. you've seeked in the data); future attempts to decode frames - * will cause stb_vorbis to resynchronize (as noted above), and once it sees a valid Ogg page (typically 4-8KB, as large as 64KB), it will begin decoding - * the next frame. - * - *

    If you want to seek using pushdata, you need to seek in your file, then call stb_vorbis_flush_pushdata(), then start calling decoding, then once - * decoding is returning you data, call {@link #stb_vorbis_get_sample_offset get_sample_offset}, and if you don't like the result, seek your file again and repeat.

    - * - * @param f an ogg vorbis file decoder - */ - public static void stb_vorbis_flush_pushdata(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - nstb_vorbis_flush_pushdata(f); - } - - // --- [ stb_vorbis_decode_filename ] --- - - /** Unsafe version of: {@link #stb_vorbis_decode_filename decode_filename} */ - public static native int nstb_vorbis_decode_filename(long filename, long channels, long sample_rate, long output); - - /** - * Decode an entire file and output the data interleaved into a {@code malloc()ed} buffer stored in {@code *output}. When you're done with it, just - * {@link LibCStdlib#free} the pointer returned in {@code *output}. - * - * @param filename the file name - * @param channels returns the number of channels - * @param sample_rate returns the sample rate - * @param output returns a pointer to the decoded data - * - * @return the number of samples decoded, or -1 if the file could not be opened or was not an ogg vorbis file - */ - public static int stb_vorbis_decode_filename(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") IntBuffer channels, @NativeType("int *") IntBuffer sample_rate, @NativeType("short **") PointerBuffer output) { - if (CHECKS) { - checkNT1(filename); - check(channels, 1); - check(sample_rate, 1); - check(output, 1); - } - return nstb_vorbis_decode_filename(memAddress(filename), memAddress(channels), memAddress(sample_rate), memAddress(output)); - } - - /** - * Decode an entire file and output the data interleaved into a {@code malloc()ed} buffer stored in {@code *output}. When you're done with it, just - * {@link LibCStdlib#free} the pointer returned in {@code *output}. - * - * @param filename the file name - * @param channels returns the number of channels - * @param sample_rate returns the sample rate - * @param output returns a pointer to the decoded data - * - * @return the number of samples decoded, or -1 if the file could not be opened or was not an ogg vorbis file - */ - public static int stb_vorbis_decode_filename(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer channels, @NativeType("int *") IntBuffer sample_rate, @NativeType("short **") PointerBuffer output) { - if (CHECKS) { - check(channels, 1); - check(sample_rate, 1); - check(output, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstb_vorbis_decode_filename(filenameEncoded, memAddress(channels), memAddress(sample_rate), memAddress(output)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Decode an entire file and output the data interleaved into a {@code malloc()ed} buffer stored in {@code *output}. When you're done with it, just - * {@link LibCStdlib#free} the pointer returned in {@code *output}. - * - * @param filename the file name - * @param channels returns the number of channels - * @param sample_rate returns the sample rate - * - * @return the number of samples decoded, or -1 if the file could not be opened or was not an ogg vorbis file - */ - @Nullable - @NativeType("int") - public static ShortBuffer stb_vorbis_decode_filename(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer channels, @NativeType("int *") IntBuffer sample_rate) { - if (CHECKS) { - check(channels, 1); - check(sample_rate, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - PointerBuffer output = stack.pointers(NULL); - int __result = nstb_vorbis_decode_filename(filenameEncoded, memAddress(channels), memAddress(sample_rate), memAddress(output)); - return memShortBufferSafe(output.get(0), __result * channels.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stb_vorbis_decode_memory ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_decode_memory decode_memory} - * - * @param len the {@code data} length, in bytes - */ - public static native int nstb_vorbis_decode_memory(long mem, int len, long channels, long sample_rate, long output); - - /** - * In-memory version of {@link #stb_vorbis_decode_filename decode_filename}. - * - * @param mem the data to decode - * @param channels returns the number of channels - * @param sample_rate returns the sample rate - * @param output returns a pointer to the decoded data - */ - public static int stb_vorbis_decode_memory(@NativeType("unsigned char const *") ByteBuffer mem, @NativeType("int *") IntBuffer channels, @NativeType("int *") IntBuffer sample_rate, @NativeType("short **") PointerBuffer output) { - if (CHECKS) { - check(channels, 1); - check(sample_rate, 1); - check(output, 1); - } - return nstb_vorbis_decode_memory(memAddress(mem), mem.remaining(), memAddress(channels), memAddress(sample_rate), memAddress(output)); - } - - /** - * In-memory version of {@link #stb_vorbis_decode_filename decode_filename}. - * - * @param mem the data to decode - * @param channels returns the number of channels - * @param sample_rate returns the sample rate - */ - @Nullable - @NativeType("int") - public static ShortBuffer stb_vorbis_decode_memory(@NativeType("unsigned char const *") ByteBuffer mem, @NativeType("int *") IntBuffer channels, @NativeType("int *") IntBuffer sample_rate) { - if (CHECKS) { - check(channels, 1); - check(sample_rate, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - PointerBuffer output = stack.pointers(NULL); - int __result = nstb_vorbis_decode_memory(memAddress(mem), mem.remaining(), memAddress(channels), memAddress(sample_rate), memAddress(output)); - return memShortBufferSafe(output.get(0), __result * channels.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stb_vorbis_open_memory ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_open_memory open_memory} - * - * @param len the {@code data} length, in bytes - */ - public static native long nstb_vorbis_open_memory(long mem, int len, long error, long alloc_buffer); - - /** - * Creates an ogg vorbis decoder from an ogg vorbis stream in memory (note this must be the entire stream!). - * - * @param mem the data to decode - * @param error returns an error code - * @param alloc_buffer an {@link STBVorbisAlloc} struct - * - * @return the ogg vorbis decoder. On failure, returns {@code NULL} and sets {@code *error}. - */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_memory(@NativeType("unsigned char const *") ByteBuffer mem, @NativeType("int *") IntBuffer error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - return nstb_vorbis_open_memory(memAddress(mem), mem.remaining(), memAddress(error), memAddressSafe(alloc_buffer)); - } - - // --- [ stb_vorbis_open_filename ] --- - - /** Unsafe version of: {@link #stb_vorbis_open_filename open_filename} */ - public static native long nstb_vorbis_open_filename(long filename, long error, long alloc_buffer); - - /** - * Creates an ogg vorbis decoder from a file name. - * - * @param filename the file name - * @param error returns an error code - * @param alloc_buffer an {@link STBVorbisAlloc} struct - * - * @return the ogg vorbis decoder. On failure, returns {@code NULL} and sets {@code *error}. - */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_filename(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") IntBuffer error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - checkNT1(filename); - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - return nstb_vorbis_open_filename(memAddress(filename), memAddress(error), memAddressSafe(alloc_buffer)); - } - - /** - * Creates an ogg vorbis decoder from a file name. - * - * @param filename the file name - * @param error returns an error code - * @param alloc_buffer an {@link STBVorbisAlloc} struct - * - * @return the ogg vorbis decoder. On failure, returns {@code NULL} and sets {@code *error}. - */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_filename(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstb_vorbis_open_filename(filenameEncoded, memAddress(error), memAddressSafe(alloc_buffer)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ stb_vorbis_seek_frame ] --- - - /** Unsafe version of: {@link #stb_vorbis_seek_frame seek_frame} */ - public static native int nstb_vorbis_seek_frame(long f, int sample_number); - - /** - * Seeks in the Vorbis file to (approximately) {@code sample_number}. After calling seek_frame(), the next call to {@code get_frame_*()} will include the - * specified sample. - * - * @param f an ogg vorbis file decoder - * @param sample_number the sample index - */ - @NativeType("int") - public static boolean stb_vorbis_seek_frame(@NativeType("stb_vorbis *") long f, @NativeType("unsigned int") int sample_number) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_seek_frame(f, sample_number) != 0; - } - - // --- [ stb_vorbis_seek ] --- - - /** Unsafe version of: {@link #stb_vorbis_seek seek} */ - public static native int nstb_vorbis_seek(long f, int sample_number); - - /** - * Seeks in the Vorbis file to (approximately) {@code sample_number}. After calling stb_vorbis_seek(), the next call to {@code stb_vorbis_get_samples_*} - * will start with the specified sample. - * - * @param f an ogg vorbis file decoder - * @param sample_number the sample index - */ - @NativeType("int") - public static boolean stb_vorbis_seek(@NativeType("stb_vorbis *") long f, @NativeType("unsigned int") int sample_number) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_seek(f, sample_number) != 0; - } - - // --- [ stb_vorbis_seek_start ] --- - - /** Unsafe version of: {@link #stb_vorbis_seek_start seek_start} */ - public static native int nstb_vorbis_seek_start(long f); - - /** - * This function is equivalent to {@link #stb_vorbis_seek seek}(f,0). - * - * @param f an ogg vorbis file decoder - */ - @NativeType("int") - public static boolean stb_vorbis_seek_start(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_seek_start(f) != 0; - } - - // --- [ stb_vorbis_stream_length_in_samples ] --- - - /** Unsafe version of: {@link #stb_vorbis_stream_length_in_samples stream_length_in_samples} */ - public static native int nstb_vorbis_stream_length_in_samples(long f); - - /** - * Returns the total length of the vorbis stream, in samples. - * - * @param f an ogg vorbis file decoder - */ - @NativeType("unsigned int") - public static int stb_vorbis_stream_length_in_samples(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_stream_length_in_samples(f); - } - - // --- [ stb_vorbis_stream_length_in_seconds ] --- - - /** Unsafe version of: {@link #stb_vorbis_stream_length_in_seconds stream_length_in_seconds} */ - public static native float nstb_vorbis_stream_length_in_seconds(long f); - - /** - * Returns the total length of the vorbis stream, in samples. - * - * @param f an ogg vorbis file decoder - */ - public static float stb_vorbis_stream_length_in_seconds(@NativeType("stb_vorbis *") long f) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_stream_length_in_seconds(f); - } - - // --- [ stb_vorbis_get_frame_float ] --- - - /** Unsafe version of: {@link #stb_vorbis_get_frame_float get_frame_float} */ - public static native int nstb_vorbis_get_frame_float(long f, long channels, long output); - - /** - * Decodes the next frame and return the number of samples. - * - *

    You generally should not intermix calls to {@code stb_vorbis_get_frame_*()} and {@code stb_vorbis_get_samples_*()}, since the latter calls the former.

    - * - * @param f an ogg vorbis file decoder - * @param channels returns the number of channels. Can be {@code NULL} -- it is always the same as the number of channels reported by {@link #stb_vorbis_get_info get_info}. - * @param output returns a pointer to an array of float* buffers, one per channel. These outputs will be overwritten on the next call to - * {@code stb_vorbis_get_frame_*}. - * - * @return the number of samples per channel - */ - public static int stb_vorbis_get_frame_float(@NativeType("stb_vorbis *") long f, @Nullable @NativeType("int *") IntBuffer channels, @NativeType("float ***") PointerBuffer output) { - if (CHECKS) { - check(f); - checkSafe(channels, 1); - check(output, 1); - } - return nstb_vorbis_get_frame_float(f, memAddressSafe(channels), memAddress(output)); - } - - // --- [ stb_vorbis_get_frame_short ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_get_frame_short get_frame_short} - * - * @param num_c the number of channels - */ - public static native int nstb_vorbis_get_frame_short(long f, int num_c, long buffer, int num_samples); - - /** - * Decodes the next frame and returns the number of samples per channel. Note that for interleaved data, you pass in the number of shorts (the size - * of your array), but the return value is the number of samples per channel, not the total number of samples. - * - *

    The data is coerced to the number of channels you request according to the channel coercion rules (see below). You must pass in the size of your - * buffer(s) so that stb_vorbis will not overwrite the end of the buffer. The maximum buffer size needed can be gotten from {@link #stb_vorbis_get_info get_info}; however, the - * Vorbis I specification implies an absolute maximum of 4096 samples per channel.

    - * - *

    Channel coercion rules

    - * - *

    Let M be the number of channels requested, and N the number of channels present, and Cn be the nth channel; let stereo L be the sum of all L and center - * channels, and stereo R be the sum of all R and center channels (channel assignment from the vorbis spec).

    - * - *
    
    -     * M    N      output
    -     * 1    k      sum(Ck) for all k
    -     * 2    *      stereo L, stereo R
    -     * k    l      k > l, the first l channels, then 0s
    -     * k    l      k ≤ l, the first k channels
    - * - *

    Note that this is not good surround etc. mixing at all! It's just so you get something useful.

    - * - * @param f an ogg vorbis file decoder - * @param buffer the output buffer, an array of pointers with length {@code num_c}, each pointing to a short array with length {@code num_samples} - * @param num_samples the number of samples - * - * @return the number of samples per channel - */ - public static int stb_vorbis_get_frame_short(@NativeType("stb_vorbis *") long f, @NativeType("short **") PointerBuffer buffer, int num_samples) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_frame_short(f, buffer.remaining(), memAddress(buffer), num_samples); - } - - // --- [ stb_vorbis_get_frame_short_interleaved ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_get_frame_short_interleaved get_frame_short_interleaved} - * - * @param num_shorts the size of {@code buffer} - */ - public static native int nstb_vorbis_get_frame_short_interleaved(long f, int num_c, long buffer, int num_shorts); - - /** - * Interleaved version of {@link #stb_vorbis_get_frame_short get_frame_short}. - * - *

    Note that for interleaved data, you pass in the number of shorts (the size of your array), but the return value is the number of samples per channel, - * not the total number of samples.

    - * - * @param f an ogg vorbis file decoder - * @param num_c the number of channels - * @param buffer the output buffer - * - * @return the number of samples per channel - */ - public static int stb_vorbis_get_frame_short_interleaved(@NativeType("stb_vorbis *") long f, int num_c, @NativeType("short *") ShortBuffer buffer) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_frame_short_interleaved(f, num_c, memAddress(buffer), buffer.remaining()); - } - - // --- [ stb_vorbis_get_samples_float ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_get_samples_float get_samples_float} - * - * @param channels the number of channels to decode - */ - public static native int nstb_vorbis_get_samples_float(long f, int channels, long buffer, int num_samples); - - /** - * Gets {@code num_samples} samples, not necessarily on a frame boundary -- this requires buffering so you have to supply the buffers. DOES NOT APPLY THE - * COERCION RULES. - * - * @param f an ogg vorbis file decoder - * @param buffer the output buffer, an array of pointers with length {@code channels}, each pointing to a float array with length {@code num_samples} - * @param num_samples the number of samples to decode - * - * @return the number of samples stored per channel; it may be less than requested at the end of the file. If there are no more samples in the file, returns 0. - */ - public static int stb_vorbis_get_samples_float(@NativeType("stb_vorbis *") long f, @NativeType("float **") PointerBuffer buffer, int num_samples) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_samples_float(f, buffer.remaining(), memAddress(buffer), num_samples); - } - - // --- [ stb_vorbis_get_samples_float_interleaved ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_get_samples_float_interleaved get_samples_float_interleaved} - * - * @param num_floats the size of {@code buffer} - */ - public static native int nstb_vorbis_get_samples_float_interleaved(long f, int channels, long buffer, int num_floats); - - /** - * Interleaved version of {@link #stb_vorbis_get_samples_float get_samples_float}. - * - * @param f an ogg vorbis file decoder - * @param channels the number of channels - * @param buffer the output buffer - * - * @return the number of samples stored per channel; it may be less than requested at the end of the file. If there are no more samples in the file, returns 0. - */ - public static int stb_vorbis_get_samples_float_interleaved(@NativeType("stb_vorbis *") long f, int channels, @NativeType("float *") FloatBuffer buffer) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_samples_float_interleaved(f, channels, memAddress(buffer), buffer.remaining()); - } - - // --- [ stb_vorbis_get_samples_short ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_get_samples_short get_samples_short} - * - * @param channels the number of channels - */ - public static native int nstb_vorbis_get_samples_short(long f, int channels, long buffer, int num_samples); - - /** - * Gets {@code num_samples} samples, not necessarily on a frame boundary -- this requires buffering so you have to supply the buffers. Applies the - * coercion rules above to produce {@code channels} channels. - * - * @param f an ogg vorbis file decoder - * @param buffer the output buffer, an array of pointers with length {@code channels}, each pointing to a short array with length {@code num_samples} - * @param num_samples the number of samples - * - * @return the number of samples stored per channel; it may be less than requested at the end of the file. If there are no more samples in the file, returns 0. - */ - public static int stb_vorbis_get_samples_short(@NativeType("stb_vorbis *") long f, @NativeType("short **") PointerBuffer buffer, int num_samples) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_samples_short(f, buffer.remaining(), memAddress(buffer), num_samples); - } - - // --- [ stb_vorbis_get_samples_short_interleaved ] --- - - /** - * Unsafe version of: {@link #stb_vorbis_get_samples_short_interleaved get_samples_short_interleaved} - * - * @param num_shorts the size of {@code buffer} - */ - public static native int nstb_vorbis_get_samples_short_interleaved(long f, int channels, long buffer, int num_shorts); - - /** - * Interleaved version of {@link #stb_vorbis_get_samples_short get_samples_short}. - * - * @param f an ogg vorbis file decoder - * @param channels the number of channels - * @param buffer the output buffer - * - * @return the number of samples stored per channel; it may be less than requested at the end of the file. If there are no more samples in the file, returns 0. - */ - public static int stb_vorbis_get_samples_short_interleaved(@NativeType("stb_vorbis *") long f, int channels, @NativeType("short *") ShortBuffer buffer) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_samples_short_interleaved(f, channels, memAddress(buffer), buffer.remaining()); - } - - /** Array version of: {@link #nstb_vorbis_open_pushdata} */ - public static native long nstb_vorbis_open_pushdata(long datablock, int datablock_length_in_bytes, int[] datablock_memory_consumed_in_bytes, int[] error, long alloc_buffer); - - /** Array version of: {@link #stb_vorbis_open_pushdata open_pushdata} */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_pushdata(@NativeType("unsigned char const *") ByteBuffer datablock, @NativeType("int *") int[] datablock_memory_consumed_in_bytes, @NativeType("int *") int[] error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - check(datablock_memory_consumed_in_bytes, 1); - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - return nstb_vorbis_open_pushdata(memAddress(datablock), datablock.remaining(), datablock_memory_consumed_in_bytes, error, memAddressSafe(alloc_buffer)); - } - - /** Array version of: {@link #nstb_vorbis_decode_frame_pushdata} */ - public static native int nstb_vorbis_decode_frame_pushdata(long f, long datablock, int datablock_length_in_bytes, int[] channels, long output, int[] samples); - - /** Array version of: {@link #stb_vorbis_decode_frame_pushdata decode_frame_pushdata} */ - public static int stb_vorbis_decode_frame_pushdata(@NativeType("stb_vorbis *") long f, @NativeType("unsigned char const *") ByteBuffer datablock, @Nullable @NativeType("int *") int[] channels, @NativeType("float ***") PointerBuffer output, @NativeType("int *") int[] samples) { - if (CHECKS) { - check(f); - checkSafe(channels, 1); - check(output, 1); - check(samples, 1); - } - return nstb_vorbis_decode_frame_pushdata(f, memAddress(datablock), datablock.remaining(), channels, memAddress(output), samples); - } - - /** Array version of: {@link #nstb_vorbis_decode_filename} */ - public static native int nstb_vorbis_decode_filename(long filename, int[] channels, int[] sample_rate, long output); - - /** Array version of: {@link #stb_vorbis_decode_filename decode_filename} */ - public static int stb_vorbis_decode_filename(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] channels, @NativeType("int *") int[] sample_rate, @NativeType("short **") PointerBuffer output) { - if (CHECKS) { - checkNT1(filename); - check(channels, 1); - check(sample_rate, 1); - check(output, 1); - } - return nstb_vorbis_decode_filename(memAddress(filename), channels, sample_rate, memAddress(output)); - } - - /** Array version of: {@link #stb_vorbis_decode_filename decode_filename} */ - public static int stb_vorbis_decode_filename(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] channels, @NativeType("int *") int[] sample_rate, @NativeType("short **") PointerBuffer output) { - if (CHECKS) { - check(channels, 1); - check(sample_rate, 1); - check(output, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstb_vorbis_decode_filename(filenameEncoded, channels, sample_rate, memAddress(output)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstb_vorbis_decode_memory} */ - public static native int nstb_vorbis_decode_memory(long mem, int len, int[] channels, int[] sample_rate, long output); - - /** Array version of: {@link #stb_vorbis_decode_memory decode_memory} */ - public static int stb_vorbis_decode_memory(@NativeType("unsigned char const *") ByteBuffer mem, @NativeType("int *") int[] channels, @NativeType("int *") int[] sample_rate, @NativeType("short **") PointerBuffer output) { - if (CHECKS) { - check(channels, 1); - check(sample_rate, 1); - check(output, 1); - } - return nstb_vorbis_decode_memory(memAddress(mem), mem.remaining(), channels, sample_rate, memAddress(output)); - } - - /** Array version of: {@link #nstb_vorbis_open_memory} */ - public static native long nstb_vorbis_open_memory(long mem, int len, int[] error, long alloc_buffer); - - /** Array version of: {@link #stb_vorbis_open_memory open_memory} */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_memory(@NativeType("unsigned char const *") ByteBuffer mem, @NativeType("int *") int[] error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - return nstb_vorbis_open_memory(memAddress(mem), mem.remaining(), error, memAddressSafe(alloc_buffer)); - } - - /** Array version of: {@link #nstb_vorbis_open_filename} */ - public static native long nstb_vorbis_open_filename(long filename, int[] error, long alloc_buffer); - - /** Array version of: {@link #stb_vorbis_open_filename open_filename} */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_filename(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - checkNT1(filename); - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - return nstb_vorbis_open_filename(memAddress(filename), error, memAddressSafe(alloc_buffer)); - } - - /** Array version of: {@link #stb_vorbis_open_filename open_filename} */ - @NativeType("stb_vorbis *") - public static long stb_vorbis_open_filename(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] error, @Nullable @NativeType("stb_vorbis_alloc const *") STBVorbisAlloc alloc_buffer) { - if (CHECKS) { - check(error, 1); - if (alloc_buffer != null) { STBVorbisAlloc.validate(alloc_buffer.address()); } - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(filename, true); - long filenameEncoded = stack.getPointerAddress(); - return nstb_vorbis_open_filename(filenameEncoded, error, memAddressSafe(alloc_buffer)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** Array version of: {@link #nstb_vorbis_get_frame_float} */ - public static native int nstb_vorbis_get_frame_float(long f, int[] channels, long output); - - /** Array version of: {@link #stb_vorbis_get_frame_float get_frame_float} */ - public static int stb_vorbis_get_frame_float(@NativeType("stb_vorbis *") long f, @Nullable @NativeType("int *") int[] channels, @NativeType("float ***") PointerBuffer output) { - if (CHECKS) { - check(f); - checkSafe(channels, 1); - check(output, 1); - } - return nstb_vorbis_get_frame_float(f, channels, memAddress(output)); - } - - /** Array version of: {@link #nstb_vorbis_get_frame_short_interleaved} */ - public static native int nstb_vorbis_get_frame_short_interleaved(long f, int num_c, short[] buffer, int num_shorts); - - /** Array version of: {@link #stb_vorbis_get_frame_short_interleaved get_frame_short_interleaved} */ - public static int stb_vorbis_get_frame_short_interleaved(@NativeType("stb_vorbis *") long f, int num_c, @NativeType("short *") short[] buffer) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_frame_short_interleaved(f, num_c, buffer, buffer.length); - } - - /** Array version of: {@link #nstb_vorbis_get_samples_float_interleaved} */ - public static native int nstb_vorbis_get_samples_float_interleaved(long f, int channels, float[] buffer, int num_floats); - - /** Array version of: {@link #stb_vorbis_get_samples_float_interleaved get_samples_float_interleaved} */ - public static int stb_vorbis_get_samples_float_interleaved(@NativeType("stb_vorbis *") long f, int channels, @NativeType("float *") float[] buffer) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_samples_float_interleaved(f, channels, buffer, buffer.length); - } - - /** Array version of: {@link #nstb_vorbis_get_samples_short_interleaved} */ - public static native int nstb_vorbis_get_samples_short_interleaved(long f, int channels, short[] buffer, int num_shorts); - - /** Array version of: {@link #stb_vorbis_get_samples_short_interleaved get_samples_short_interleaved} */ - public static int stb_vorbis_get_samples_short_interleaved(@NativeType("stb_vorbis *") long f, int channels, @NativeType("short *") short[] buffer) { - if (CHECKS) { - check(f); - } - return nstb_vorbis_get_samples_short_interleaved(f, channels, buffer, buffer.length); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisAlloc.java b/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisAlloc.java deleted file mode 100644 index 295a2b89..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisAlloc.java +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A buffer to use for allocations by {@link STBVorbis} - * - *

    Layout

    - * - *
    
    - * struct stb_vorbis_alloc {
    - *     char * alloc_buffer;
    - *     int alloc_buffer_length_in_bytes;
    - * }
    - */ -@NativeType("struct stb_vorbis_alloc") -public class STBVorbisAlloc extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ALLOC_BUFFER, - ALLOC_BUFFER_LENGTH_IN_BYTES; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ALLOC_BUFFER = layout.offsetof(0); - ALLOC_BUFFER_LENGTH_IN_BYTES = layout.offsetof(1); - } - - protected STBVorbisAlloc(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBVorbisAlloc create(long address, @Nullable ByteBuffer container) { - return new STBVorbisAlloc(address, container); - } - - /** - * Creates a {@code STBVorbisAlloc} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBVorbisAlloc(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code alloc_buffer} field. */ - @NativeType("char *") - public ByteBuffer alloc_buffer() { return nalloc_buffer(address()); } - /** @return the value of the {@code alloc_buffer_length_in_bytes} field. */ - public int alloc_buffer_length_in_bytes() { return nalloc_buffer_length_in_bytes(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@code alloc_buffer} field. */ - public STBVorbisAlloc alloc_buffer(@NativeType("char *") ByteBuffer value) { nalloc_buffer(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public STBVorbisAlloc set(STBVorbisAlloc src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code STBVorbisAlloc} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBVorbisAlloc malloc() { - return new STBVorbisAlloc(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBVorbisAlloc} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBVorbisAlloc calloc() { - return new STBVorbisAlloc(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBVorbisAlloc} instance allocated with {@link BufferUtils}. */ - public static STBVorbisAlloc create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBVorbisAlloc(memAddress(container), container); - } - - /** Returns a new {@code STBVorbisAlloc} instance for the specified memory address. */ - public static STBVorbisAlloc create(long address) { - return new STBVorbisAlloc(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBVorbisAlloc createSafe(long address) { - return address == NULL ? null : new STBVorbisAlloc(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisAlloc mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisAlloc callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisAlloc mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisAlloc callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBVorbisAlloc} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBVorbisAlloc malloc(MemoryStack stack) { - return new STBVorbisAlloc(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBVorbisAlloc} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBVorbisAlloc calloc(MemoryStack stack) { - return new STBVorbisAlloc(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #alloc_buffer() alloc_buffer}. */ - public static ByteBuffer nalloc_buffer(long struct) { return memByteBuffer(memGetAddress(struct + STBVorbisAlloc.ALLOC_BUFFER), nalloc_buffer_length_in_bytes(struct)); } - /** Unsafe version of {@link #alloc_buffer_length_in_bytes}. */ - public static int nalloc_buffer_length_in_bytes(long struct) { return UNSAFE.getInt(null, struct + STBVorbisAlloc.ALLOC_BUFFER_LENGTH_IN_BYTES); } - - /** Unsafe version of {@link #alloc_buffer(ByteBuffer) alloc_buffer}. */ - public static void nalloc_buffer(long struct, ByteBuffer value) { memPutAddress(struct + STBVorbisAlloc.ALLOC_BUFFER, memAddress(value)); nalloc_buffer_length_in_bytes(struct, value.remaining()); } - /** Sets the specified value to the {@code alloc_buffer_length_in_bytes} field of the specified {@code struct}. */ - public static void nalloc_buffer_length_in_bytes(long struct, int value) { UNSAFE.putInt(null, struct + STBVorbisAlloc.ALLOC_BUFFER_LENGTH_IN_BYTES, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + STBVorbisAlloc.ALLOC_BUFFER)); - } - - // ----------------------------------- - - /** An array of {@link STBVorbisAlloc} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBVorbisAlloc ELEMENT_FACTORY = STBVorbisAlloc.create(-1L); - - /** - * Creates a new {@code STBVorbisAlloc.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBVorbisAlloc#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBVorbisAlloc getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code alloc_buffer} field. */ - @NativeType("char *") - public ByteBuffer alloc_buffer() { return STBVorbisAlloc.nalloc_buffer(address()); } - /** @return the value of the {@code alloc_buffer_length_in_bytes} field. */ - public int alloc_buffer_length_in_bytes() { return STBVorbisAlloc.nalloc_buffer_length_in_bytes(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@code alloc_buffer} field. */ - public Buffer alloc_buffer(@NativeType("char *") ByteBuffer value) { STBVorbisAlloc.nalloc_buffer(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisComment.java b/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisComment.java deleted file mode 100644 index 602fddd9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisComment.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct stb_vorbis_comment {
    - *     char * vendor;
    - *     int comment_list_length;
    - *     char ** comment_list;
    - * }
    - */ -@NativeType("struct stb_vorbis_comment") -public class STBVorbisComment extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VENDOR, - COMMENT_LIST_LENGTH, - COMMENT_LIST; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VENDOR = layout.offsetof(0); - COMMENT_LIST_LENGTH = layout.offsetof(1); - COMMENT_LIST = layout.offsetof(2); - } - - protected STBVorbisComment(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBVorbisComment create(long address, @Nullable ByteBuffer container) { - return new STBVorbisComment(address, container); - } - - /** - * Creates a {@code STBVorbisComment} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBVorbisComment(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code vendor} field. */ - @NativeType("char *") - public ByteBuffer vendor() { return nvendor(address()); } - /** @return the null-terminated string pointed to by the {@code vendor} field. */ - @NativeType("char *") - public String vendorString() { return nvendorString(address()); } - /** @return the value of the {@code comment_list_length} field. */ - public int comment_list_length() { return ncomment_list_length(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code comment_list} field. */ - @NativeType("char **") - public PointerBuffer comment_list() { return ncomment_list(address()); } - - // ----------------------------------- - - /** Returns a new {@code STBVorbisComment} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBVorbisComment malloc() { - return new STBVorbisComment(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBVorbisComment} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBVorbisComment calloc() { - return new STBVorbisComment(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBVorbisComment} instance allocated with {@link BufferUtils}. */ - public static STBVorbisComment create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBVorbisComment(memAddress(container), container); - } - - /** Returns a new {@code STBVorbisComment} instance for the specified memory address. */ - public static STBVorbisComment create(long address) { - return new STBVorbisComment(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBVorbisComment createSafe(long address) { - return address == NULL ? null : new STBVorbisComment(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code STBVorbisComment} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBVorbisComment malloc(MemoryStack stack) { - return new STBVorbisComment(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBVorbisComment} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBVorbisComment calloc(MemoryStack stack) { - return new STBVorbisComment(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #vendor}. */ - public static ByteBuffer nvendor(long struct) { return memByteBufferNT1(memGetAddress(struct + STBVorbisComment.VENDOR)); } - /** Unsafe version of {@link #vendorString}. */ - public static String nvendorString(long struct) { return memASCII(memGetAddress(struct + STBVorbisComment.VENDOR)); } - /** Unsafe version of {@link #comment_list_length}. */ - public static int ncomment_list_length(long struct) { return UNSAFE.getInt(null, struct + STBVorbisComment.COMMENT_LIST_LENGTH); } - /** Unsafe version of {@link #comment_list() comment_list}. */ - public static PointerBuffer ncomment_list(long struct) { return memPointerBuffer(memGetAddress(struct + STBVorbisComment.COMMENT_LIST), ncomment_list_length(struct)); } - - // ----------------------------------- - - /** An array of {@link STBVorbisComment} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBVorbisComment ELEMENT_FACTORY = STBVorbisComment.create(-1L); - - /** - * Creates a new {@code STBVorbisComment.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBVorbisComment#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBVorbisComment getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code vendor} field. */ - @NativeType("char *") - public ByteBuffer vendor() { return STBVorbisComment.nvendor(address()); } - /** @return the null-terminated string pointed to by the {@code vendor} field. */ - @NativeType("char *") - public String vendorString() { return STBVorbisComment.nvendorString(address()); } - /** @return the value of the {@code comment_list_length} field. */ - public int comment_list_length() { return STBVorbisComment.ncomment_list_length(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code comment_list} field. */ - @NativeType("char **") - public PointerBuffer comment_list() { return STBVorbisComment.ncomment_list(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisInfo.java b/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisInfo.java deleted file mode 100644 index fc2148b9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/stb/STBVorbisInfo.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.stb; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Information about a Vorbis stream. - * - *

    Layout

    - * - *
    
    - * struct stb_vorbis_info {
    - *     unsigned int sample_rate;
    - *     int channels;
    - *     unsigned int setup_memory_required;
    - *     unsigned int setup_temp_memory_required;
    - *     unsigned int temp_memory_required;
    - *     int max_frame_size;
    - * }
    - */ -@NativeType("struct stb_vorbis_info") -public class STBVorbisInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SAMPLE_RATE, - CHANNELS, - SETUP_MEMORY_REQUIRED, - SETUP_TEMP_MEMORY_REQUIRED, - TEMP_MEMORY_REQUIRED, - MAX_FRAME_SIZE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SAMPLE_RATE = layout.offsetof(0); - CHANNELS = layout.offsetof(1); - SETUP_MEMORY_REQUIRED = layout.offsetof(2); - SETUP_TEMP_MEMORY_REQUIRED = layout.offsetof(3); - TEMP_MEMORY_REQUIRED = layout.offsetof(4); - MAX_FRAME_SIZE = layout.offsetof(5); - } - - protected STBVorbisInfo(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected STBVorbisInfo create(long address, @Nullable ByteBuffer container) { - return new STBVorbisInfo(address, container); - } - - /** - * Creates a {@code STBVorbisInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public STBVorbisInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code sample_rate} field. */ - @NativeType("unsigned int") - public int sample_rate() { return nsample_rate(address()); } - /** @return the value of the {@code channels} field. */ - public int channels() { return nchannels(address()); } - /** @return the value of the {@code setup_memory_required} field. */ - @NativeType("unsigned int") - public int setup_memory_required() { return nsetup_memory_required(address()); } - /** @return the value of the {@code setup_temp_memory_required} field. */ - @NativeType("unsigned int") - public int setup_temp_memory_required() { return nsetup_temp_memory_required(address()); } - /** @return the value of the {@code temp_memory_required} field. */ - @NativeType("unsigned int") - public int temp_memory_required() { return ntemp_memory_required(address()); } - /** @return the value of the {@code max_frame_size} field. */ - public int max_frame_size() { return nmax_frame_size(address()); } - - // ----------------------------------- - - /** Returns a new {@code STBVorbisInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static STBVorbisInfo malloc() { - return new STBVorbisInfo(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code STBVorbisInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static STBVorbisInfo calloc() { - return new STBVorbisInfo(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code STBVorbisInfo} instance allocated with {@link BufferUtils}. */ - public static STBVorbisInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new STBVorbisInfo(memAddress(container), container); - } - - /** Returns a new {@code STBVorbisInfo} instance for the specified memory address. */ - public static STBVorbisInfo create(long address) { - return new STBVorbisInfo(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static STBVorbisInfo createSafe(long address) { - return address == NULL ? null : new STBVorbisInfo(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisInfo mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisInfo callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisInfo mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static STBVorbisInfo callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code STBVorbisInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static STBVorbisInfo malloc(MemoryStack stack) { - return new STBVorbisInfo(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code STBVorbisInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static STBVorbisInfo calloc(MemoryStack stack) { - return new STBVorbisInfo(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #sample_rate}. */ - public static int nsample_rate(long struct) { return UNSAFE.getInt(null, struct + STBVorbisInfo.SAMPLE_RATE); } - /** Unsafe version of {@link #channels}. */ - public static int nchannels(long struct) { return UNSAFE.getInt(null, struct + STBVorbisInfo.CHANNELS); } - /** Unsafe version of {@link #setup_memory_required}. */ - public static int nsetup_memory_required(long struct) { return UNSAFE.getInt(null, struct + STBVorbisInfo.SETUP_MEMORY_REQUIRED); } - /** Unsafe version of {@link #setup_temp_memory_required}. */ - public static int nsetup_temp_memory_required(long struct) { return UNSAFE.getInt(null, struct + STBVorbisInfo.SETUP_TEMP_MEMORY_REQUIRED); } - /** Unsafe version of {@link #temp_memory_required}. */ - public static int ntemp_memory_required(long struct) { return UNSAFE.getInt(null, struct + STBVorbisInfo.TEMP_MEMORY_REQUIRED); } - /** Unsafe version of {@link #max_frame_size}. */ - public static int nmax_frame_size(long struct) { return UNSAFE.getInt(null, struct + STBVorbisInfo.MAX_FRAME_SIZE); } - - // ----------------------------------- - - /** An array of {@link STBVorbisInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final STBVorbisInfo ELEMENT_FACTORY = STBVorbisInfo.create(-1L); - - /** - * Creates a new {@code STBVorbisInfo.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link STBVorbisInfo#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected STBVorbisInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code sample_rate} field. */ - @NativeType("unsigned int") - public int sample_rate() { return STBVorbisInfo.nsample_rate(address()); } - /** @return the value of the {@code channels} field. */ - public int channels() { return STBVorbisInfo.nchannels(address()); } - /** @return the value of the {@code setup_memory_required} field. */ - @NativeType("unsigned int") - public int setup_memory_required() { return STBVorbisInfo.nsetup_memory_required(address()); } - /** @return the value of the {@code setup_temp_memory_required} field. */ - @NativeType("unsigned int") - public int setup_temp_memory_required() { return STBVorbisInfo.nsetup_temp_memory_required(address()); } - /** @return the value of the {@code temp_memory_required} field. */ - @NativeType("unsigned int") - public int temp_memory_required() { return STBVorbisInfo.ntemp_memory_required(address()); } - /** @return the value of the {@code max_frame_size} field. */ - public int max_frame_size() { return STBVorbisInfo.nmax_frame_size(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/APIUtil.java b/LWJGL/src/main/java/org/lwjgl/system/APIUtil.java deleted file mode 100644 index 805fb024..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/APIUtil.java +++ /dev/null @@ -1,673 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; -import org.lwjgl.system.libffi.*; -import org.lwjgl.system.linux.*; -import org.lwjgl.system.fcl.*; -import org.lwjgl.system.macosx.*; -import org.lwjgl.system.windows.*; - -import javax.annotation.*; -import java.io.*; -import java.lang.reflect.*; -import java.nio.*; -import java.nio.file.*; -import java.util.*; -import java.util.function.*; -import java.util.regex.*; -import java.util.stream.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.wrap; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Utility class useful to API bindings. [INTERNAL USE ONLY] - * - *

    Method names in this class are prefixed with {@code api} to avoid ambiguities when used with static imports.

    - * - * @see Configuration#DEBUG_STREAM - */ -public final class APIUtil { - - /** - * The {@link PrintStream} used by LWJGL to print debug information and non-fatal errors. Defaults to {@link System#err} which can be changed with - * {@link Configuration#DEBUG_STREAM}. - */ - public static final PrintStream DEBUG_STREAM = getDebugStream(); - - private static final Pattern API_VERSION_PATTERN; - - static { - String PREFIX = "[^\\d\\n\\r]*"; - String VERSION = "(\\d+)[.](\\d+)(?:[.](\\S+))?"; - String IMPLEMENTATION = "(?:\\s+(.+?))?\\s*"; - - API_VERSION_PATTERN = Pattern.compile("^" + PREFIX + VERSION + IMPLEMENTATION + "$", Pattern.DOTALL); - } - - @SuppressWarnings({"unchecked", "UseOfSystemOutOrSystemErr"}) - private static PrintStream getDebugStream() { - PrintStream debugStream = System.err; - - Object state = Configuration.DEBUG_STREAM.get(); - if (state instanceof String) { - try { - Supplier factory = (Supplier)Class.forName((String)state).getConstructor().newInstance(); - debugStream = factory.get(); - } catch (Exception e) { - e.printStackTrace(); - } - } else if (state instanceof Supplier) { - debugStream = ((Supplier)state).get(); - } else if (state instanceof PrintStream) { - debugStream = (PrintStream)state; - } - - return debugStream; - } - - private APIUtil() { - } - - /** - * Prints the specified message to the {@link #DEBUG_STREAM} if {@link Checks#DEBUG} is true. - * - * @param msg the message to print - */ - public static void apiLog(CharSequence msg) { - if (DEBUG) { - DEBUG_STREAM.print("[LWJGL] " + msg + "\n"); - } - } - - /** - * Same as {@link #apiLog}, but replaces the LWJGL prefix with a tab character. - * - * @param msg the message to print, in continuation of a previous message - */ - public static void apiLogMore(CharSequence msg) { - if (DEBUG) { - DEBUG_STREAM.print("\t" + msg + "\n"); - } - } - - public static void apiLogMissing(String api, ByteBuffer functionName) { - if (DEBUG) { - String function = memASCII(functionName, functionName.remaining() - 1); - DEBUG_STREAM.print("[LWJGL] Failed to locate address for " + api + " function " + function + "\n"); - } - } - - public static String apiFindLibrary(String start, String name) { - String libName = Platform.get().mapLibraryName(name); - try (Stream paths = Files.find( - Paths.get(start).toAbsolutePath(), - Integer.MAX_VALUE, - (path, attributes) -> attributes.isRegularFile() && path.getFileName().toString().equals(libName) - )) { - return paths - .findFirst() - .map(Path::toString) - .orElse(name); - } catch (IOException e) { - return name; - } - } - - public static SharedLibrary apiCreateLibrary(String name) { - switch (Platform.get()) { - case WINDOWS: - return new WindowsLibrary(name); - case LINUX: - return new LinuxLibrary(name); - case MACOSX: - return MacOSXLibrary.create(name); - default: - throw new IllegalStateException(); - } - } - - public static long apiGetFunctionAddress(FunctionProvider provider, String functionName) { - long a = provider.getFunctionAddress(functionName); - if (a == NULL) { - requiredFunctionMissing(functionName); - } - return a; - } - private static void requiredFunctionMissing(String functionName) { - if (!Configuration.DISABLE_FUNCTION_CHECKS.get(false)) { - throw new NullPointerException("A required function is missing: " + functionName); - } - } - - public static long apiGetFunctionAddressOptional(SharedLibrary library, String functionName) { - long a = library.getFunctionAddress(functionName); - if (DEBUG_FUNCTIONS && a == NULL) { - optionalFunctionMissing(library, functionName); - } - return a; - } - private static void optionalFunctionMissing(SharedLibrary library, String functionName) { - if (DEBUG) { - DEBUG_STREAM.print("[LWJGL] Failed to locate address for " + library.getName() + " function " + functionName + "\n"); - } - } - - @Nullable - public static ByteBuffer apiGetMappedBuffer(@Nullable ByteBuffer buffer, long mappedAddress, int capacity) { - if (buffer != null && memAddress(buffer) == mappedAddress && buffer.capacity() == capacity) { - return buffer; - } - return mappedAddress == NULL ? null : wrap(BUFFER_BYTE, mappedAddress, capacity).order(NATIVE_ORDER); - } - - public static long apiGetBytes(int elements, int elementShift) { - return (elements & 0xFFFF_FFFFL) << elementShift; - } - - public static long apiCheckAllocation(int elements, long bytes, long maxBytes) { - if (DEBUG) { - if (elements < 0) { - throw new IllegalArgumentException("Invalid number of elements"); - } - if ((maxBytes + Long.MIN_VALUE) < (bytes + Long.MIN_VALUE)) { // unsigned comparison - throw new IllegalArgumentException("The request allocation is too large"); - } - } - return bytes; - } - - /** A data class for API versioning information. */ - public static class APIVersion implements Comparable { - - /** Returns the API major version. */ - public final int major; - /** Returns the API minor version. */ - public final int minor; - - /** Returns the API revision. May be null. */ - @Nullable - public final String revision; - /** Returns the API implementation-specific versioning information. May be null. */ - @Nullable - public final String implementation; - - public APIVersion(int major, int minor) { - this(major, minor, null, null); - } - - public APIVersion(int major, int minor, @Nullable String revision, @Nullable String implementation) { - this.major = major; - this.minor = minor; - this.revision = revision; - this.implementation = implementation; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(16); - sb.append(major).append('.').append(minor); - if (revision != null) { - sb.append('.').append(revision); - } - if (implementation != null) { - sb.append(" (").append(implementation).append(')'); - } - return sb.toString(); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof APIVersion)) { - return false; - } - - APIVersion that = (APIVersion)o; - - return this.major == that.major && - this.minor == that.major && - Objects.equals(this.revision, that.revision) && - Objects.equals(this.implementation, that.implementation); - } - - @Override - public int hashCode() { - int result = major; - result = 31 * result + minor; - result = 31 * result + (revision != null ? revision.hashCode() : 0); - result = 31 * result + (implementation != null ? implementation.hashCode() : 0); - return result; - } - - @Override - public int compareTo(APIVersion other) { - if (this.major != other.major) { - return Integer.compare(this.major, other.major); - } - - if (this.minor != other.minor) { - return Integer.compare(this.minor, other.minor); - } - - return 0; - } - } - - /** - * Returns the {@link APIVersion} value of the specified option. - * - * @param option the option to query - */ - @Nullable - public static APIVersion apiParseVersion(Configuration option) { - APIVersion version; - - Object state = option.get(); - if (state instanceof String) { - version = apiParseVersion((String)state); - } else if (state instanceof APIVersion) { - version = (APIVersion)state; - } else { - version = null; - } - - return version; - } - - /** - * Parses a version string. - * - *

    The version string must have the format {@code PREFIX MAJOR.MINOR.REVISION IMPL}, where {@code PREFIX} is a prefix without digits (string, optional), - * {@code MAJOR} is the major version (integer), {@code MINOR} is the minor version (integer), {@code REVISION} is the revision version (string, optional) - * and {@code IMPL} is implementation-specific information (string, optional).

    - * - * @param version the version string - * - * @return the parsed {@link APIVersion} - */ - public static APIVersion apiParseVersion(String version) { - Matcher matcher = API_VERSION_PATTERN.matcher(version); - if (!matcher.matches()) { - throw new IllegalArgumentException(String.format("Malformed API version string [%s]", version)); - } - - return new APIVersion( - Integer.parseInt(matcher.group(1)), - Integer.parseInt(matcher.group(2)), - matcher.group(3), - matcher.group(4) - ); - } - - public static void apiFilterExtensions(Set extensions, Configuration option) { - Object value = option.get(); - if (value == null) { - return; - } - - if (value instanceof String) { - String s = (String)value; - if (s.indexOf('.') != -1) { // classpath - try { - @SuppressWarnings("unchecked") Predicate predicate = (Predicate)Class.forName(s).newInstance(); - extensions.removeIf(predicate); - } catch (Exception e) { - throw new RuntimeException(e); - } - } else { - for (String extension : s.split(",")) { - extensions.remove(extension); - } - } - } else if (value instanceof List) { - @SuppressWarnings("unchecked") List list = (List)value; - extensions.removeAll(list); - } else if (value instanceof Predicate) { - @SuppressWarnings("unchecked") Predicate predicate = (Predicate)value; - extensions.removeIf(predicate); - } else { - throw new IllegalStateException("Unsupported " + option.getProperty() + " value specified."); - } - } - - public static String apiUnknownToken(int token) { - return apiUnknownToken("Unknown", token); - } - - public static String apiUnknownToken(String description, int token) { - return String.format("%s [0x%X]", description, token); - } - - /** - * 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 an API.

    - * - * @param filter the filter to use (optional) - * @param target the target map (optional) - * @param tokenClasses the classes to get tokens from - * - * @return the token map - */ - public static Map apiClassTokens(@Nullable BiPredicate filter, @Nullable Map target, Class... tokenClasses) { - if (target == null) { - //noinspection AssignmentToMethodParameter - target = new HashMap<>(64); - } - - int TOKEN_MODIFIERS = Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL; - - for (Class tokenClass : tokenClasses) { - if (tokenClass == null) { - continue; - } - - for (Field field : tokenClass.getDeclaredFields()) { - // Get only fields. - if ((field.getModifiers() & TOKEN_MODIFIERS) == TOKEN_MODIFIERS && field.getType() == int.class) { - try { - Integer value = field.getInt(null); - if (filter != null && !filter.test(field, value)) { - continue; - } - - String name = target.get(value); - target.put(value, name == null ? field.getName() : name + "|" + field.getName()); - } catch (IllegalAccessException e) { - // Ignore - } - } - } - } - - return target; - } - - // ---------------------------------------- - - /** - * Stores the specified array of pointer addresses on the specified {@link MemoryStack}. - * - * @param stack the stack to use - * @param addresses the pointer addresses to store - * - * @return the pointer array address on the stack - */ - public static long apiArray(MemoryStack stack, long... addresses) { - PointerBuffer pointers = memPointerBuffer(stack.nmalloc(POINTER_SIZE, addresses.length << POINTER_SHIFT), addresses.length); - - for (long address : addresses) { - pointers.put(address); - } - - return pointers.address; - } - - /** - * Stores the addresses of the specified array of buffers on the specified {@link MemoryStack}. - * - * @param stack the stack to use - * @param buffers the buffers to store - * - * @return the pointer array address on the stack - */ - public static long apiArray(MemoryStack stack, ByteBuffer... buffers) { - PointerBuffer pointers = memPointerBuffer(stack.nmalloc(POINTER_SIZE, buffers.length << POINTER_SHIFT), buffers.length); - - for (ByteBuffer buffer : buffers) { - pointers.put(buffer); - } - - return pointers.address; - } - - /** - * Stores the addresses of the specified array of buffers on the specified {@link MemoryStack}. A second array that contains the buffer remaining bytes is - * stored immediately after the pointer array. Length values are pointer-sized integers. - * - * @param stack the stack to use - * @param buffers the buffers to store - * - * @return the pointer array address on the stack - */ - public static long apiArrayp(MemoryStack stack, ByteBuffer... buffers) { - long pointers = apiArray(stack, buffers); - - PointerBuffer lengths = stack.mallocPointer(buffers.length); - for (ByteBuffer buffer : buffers) { - lengths.put(buffer.remaining()); - } - - return pointers; - } - - // ---------------------------------------- - - public interface Encoder { - ByteBuffer encode(CharSequence text, boolean nullTerminated); - } - - /** - * Encodes the specified strings with the specified {@link Encoder} and stores an array of pointers to the encoded data on the specified - * {@link MemoryStack}. The encoded strings include null-termination. - * - * @param stack the stack to use - * @param encoder the encoder to use - * @param strings the strings to encode - * - * @return the pointer array address on the stack - */ - public static long apiArray(MemoryStack stack, Encoder encoder, CharSequence... strings) { - PointerBuffer pointers = stack.mallocPointer(strings.length); - - for (CharSequence s : strings) { - pointers.put(encoder.encode(s, true)); - } - - return pointers.address; - } - - /** - * Encodes the specified strings with the specified {@link Encoder} and stores an array of pointers to the encoded data on the specified - * {@link MemoryStack}. A second array that contains the string lengths is stored immediately after the pointer array. Length values are 4-byte integers. - * - *

    The encoded buffers must be freed with {@link #apiArrayFree}.

    - * - * @param stack the stack to use - * @param encoder the encoder to use - * @param strings the strings to encode - * - * @return the pointer array address on the stack - */ - public static long apiArrayi(MemoryStack stack, Encoder encoder, CharSequence... strings) { - // Alignment rules guarantee these two will be contiguous - PointerBuffer pointers = stack.mallocPointer(strings.length); - IntBuffer lengths = stack.mallocInt(strings.length); - - for (CharSequence s : strings) { - ByteBuffer buffer = encoder.encode(s, false); - - pointers.put(buffer); - lengths.put(buffer.capacity()); - } - - return pointers.address; - } - - /** - * Encodes the specified strings with the specified {@link Encoder} and stores an array of pointers to the encoded data on the specified - * {@link MemoryStack}. A second array that contains the string lengths is stored immediately after the pointer array. Length values are pointer-sized - * integers. - * - *

    The encoded buffers must be freed with {@link #apiArrayFree}.

    - * - * @param stack the stack to use - * @param encoder the encoder to use - * @param strings the strings to encode - * - * @return the pointer array address on the stack - */ - public static long apiArrayp(MemoryStack stack, Encoder encoder, CharSequence... strings) { - PointerBuffer pointers = stack.mallocPointer(strings.length); - PointerBuffer lengths = stack.mallocPointer(strings.length); - - for (CharSequence s : strings) { - ByteBuffer buffer = encoder.encode(s, false); - - pointers.put(buffer); - lengths.put(buffer.capacity()); - } - - return pointers.address; - } - - /** - * Frees the specified array of pointers. - * - * @param pointers the pointer array to free - * @param length the pointer array length - */ - public static void apiArrayFree(long pointers, int length) { - for (int i = length; --i >= 0; ) { - nmemFree(memGetAddress(pointers + Integer.toUnsignedLong(i) * POINTER_SIZE)); - } - } - - // ---------------------------------------- - - // These FFITypes will never be deallocated, use the allocator directly to ignore them when detecting memory leaks. - - public static FFIType apiCreateStruct(FFIType... members) { - MemoryAllocator allocator = MemoryUtil.getAllocator(); - - PointerBuffer elementBuffer = PointerBuffer.create( - allocator.malloc((members.length + 1) * POINTER_SIZE), - members.length + 1 - ); - for (int i = 0; i < members.length; i++) { - elementBuffer.put(i, members[i]); - } - elementBuffer.put(members.length, NULL); - - return FFIType.create(allocator.calloc(1, FFIType.SIZEOF)) - .type(FFI_TYPE_STRUCT) - .elements(elementBuffer); - } - - private static FFIType prep(FFIType type) { - try (MemoryStack stack = stackPush()) { - FFICIF cif = FFICIF.calloc(stack); - if (ffi_prep_cif(cif, FFI_DEFAULT_ABI, type, null) != FFI_OK) { - throw new IllegalStateException("Failed to prepare LibFFI type."); - } - } - return type; - } - - public static FFIType apiCreateUnion(FFIType... members) { - MemoryAllocator allocator = MemoryUtil.getAllocator(); - - // ffi_prep_cif is used to make libffi initialize size/alignment of each member - FFIType maxType = prep(members[0]); - short maxAlignment = members[0].alignment(); - for (int i = 1; i < members.length; i++) { - FFIType type = prep(members[i]); - if (maxType.size() < type.size()) { - maxType = type; - } - if (maxAlignment < type.alignment()) { - maxAlignment = type.alignment(); - } - } - - return FFIType.create(allocator.malloc(FFIType.SIZEOF)) - .size(maxType.size()) - .alignment(maxAlignment) - .type(FFI_TYPE_STRUCT) - .elements(PointerBuffer.create(allocator.malloc(2 * POINTER_SIZE), 2) - .put(0, maxType) - .put(1, NULL)); - } - - public static FFIType apiCreateArray(FFIType type, int length) { - MemoryAllocator allocator = MemoryUtil.getAllocator(); - - PointerBuffer elementBuffer = PointerBuffer.create( - allocator.malloc((length + 1) * POINTER_SIZE), - length + 1 - ); - for (int i = 0; i < length; i++) { - elementBuffer.put(i, type); - } - elementBuffer.put(length, NULL); - - return FFIType.create(allocator.calloc(1, FFIType.SIZEOF)) - .type(FFI_TYPE_STRUCT) - .elements(elementBuffer); - } - - /** Allocates and prepares a libffi CIF. */ - public static FFICIF apiCreateCIF(int abi, FFIType rtype, FFIType... atypes) { - // These CIFs will never be deallocated, use the allocator directly to ignore them when detecting memory leaks. - MemoryAllocator allocator = MemoryUtil.getAllocator(); - - PointerBuffer pArgTypes = PointerBuffer.create(allocator.malloc(atypes.length * POINTER_SIZE), atypes.length); - for (int i = 0; i < atypes.length; i++) { - pArgTypes.put(i, atypes[i]); - } - - FFICIF cif = FFICIF.create(allocator.malloc(FFICIF.SIZEOF)); - - int errcode = ffi_prep_cif(cif, abi, rtype, pArgTypes); - if (errcode != FFI_OK) { - throw new IllegalStateException("Failed to prepare libffi CIF: " + errcode); - } - - return cif; - } - - /** Allocates and prepares a libffi var CIF. */ - public static FFICIF apiCreateCIFVar(int abi, int nfixedargs, FFIType rtype, FFIType... atypes) { - // These CIFs will never be deallocated, use the allocator directly to ignore them when detecting memory leaks. - MemoryAllocator allocator = MemoryUtil.getAllocator(); - - PointerBuffer pArgTypes = PointerBuffer.create(allocator.malloc(atypes.length * POINTER_SIZE), atypes.length); - for (int i = 0; i < atypes.length; i++) { - pArgTypes.put(i, atypes[i]); - } - - FFICIF cif = FFICIF.create(allocator.malloc(FFICIF.SIZEOF)); - - int errcode = ffi_prep_cif_var(cif, abi, nfixedargs, rtype, pArgTypes); - if (errcode != FFI_OK) { - throw new IllegalStateException("Failed to prepare libffi var CIF: " + errcode); - } - - return cif; - } - - public static int apiStdcall() { - return Platform.get() == Platform.WINDOWS && Pointer.BITS32 ? FFI_STDCALL : FFI_DEFAULT_ABI; - } - - public static void apiClosureRet(long ret, boolean __result) { memPutAddress(ret, __result ? 1L : 0L); } - public static void apiClosureRet(long ret, byte __result) { memPutAddress(ret, __result & 0xFFL); } - public static void apiClosureRet(long ret, short __result) { memPutAddress(ret, __result & 0xFFFFL); } - public static void apiClosureRet(long ret, int __result) { memPutAddress(ret, __result & 0xFFFF_FFFFL); } - public static void apiClosureRetL(long ret, long __result) { memPutLong(ret, __result); } - public static void apiClosureRetP(long ret, long __result) { memPutAddress(ret, __result); } - public static void apiClosureRet(long ret, float __result) { memPutFloat(ret, __result); } - public static void apiClosureRet(long ret, double __result) { memPutDouble(ret, __result); } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/Callback.java b/LWJGL/src/main/java/org/lwjgl/system/Callback.java deleted file mode 100644 index 8e7a2cf0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/Callback.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; -import org.lwjgl.system.libffi.*; - -import javax.annotation.*; -import java.lang.reflect.*; -import java.util.concurrent.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.jni.JNINativeInterface.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Base class for dynamically created native functions that call into Java code. - * - *

    Callback instances use native resources and must be explicitly freed when no longer used by calling the {@link #free} method.

    - */ -public abstract class Callback implements Pointer, NativeResource { - - private static final boolean DEBUG_ALLOCATOR = Configuration.DEBUG_MEMORY_ALLOCATOR.get(false); - - private static final ClosureRegistry CLOSURE_REGISTRY; - - private interface ClosureRegistry { - void put(long executableAddress, FFIClosure closure); - FFIClosure get(long executableAddress); - FFIClosure remove(long executableAddress); - } - - static { - // Detect whether we need to maintain a mapping from executable addresses to FFIClosure structs. - try (MemoryStack stack = stackPush()) { - PointerBuffer code = stack.mallocPointer(1); - - FFIClosure closure = ffi_closure_alloc(FFIClosure.SIZEOF, code); - if (closure == null) { - throw new OutOfMemoryError(); - } - - if (code.get(0) == closure.address()) { - apiLog("Closure Registry: simple"); - - // When the closure address matches the executable address, we don't have to maintain any mappings. - // We can simply cast the executable address to ffi_closure. This is true on many platforms. - CLOSURE_REGISTRY = new ClosureRegistry() { - @Override - public void put(long executableAddress, FFIClosure closure) { - // no-op - } - @Override - public FFIClosure get(long executableAddress) { - return FFIClosure.create(executableAddress); - } - @Override - public FFIClosure remove(long executableAddress) { - return get(executableAddress); - } - }; - } else { - apiLog("Closure Registry: ConcurrentHashMap"); - - CLOSURE_REGISTRY = new ClosureRegistry() { - private final ConcurrentHashMap map = new ConcurrentHashMap<>(); - - @Override - public void put(long executableAddress, FFIClosure closure) { - map.put(executableAddress, closure); - } - @Override - public FFIClosure get(long executableAddress) { - return map.get(executableAddress); - } - @Override - public FFIClosure remove(long executableAddress) { - return map.remove(executableAddress); - } - }; - } - ffi_closure_free(closure); - } - } - - /** Address of the native callback handler that will call the Java method when the native callback function is invoked. */ - private static final long CALLBACK_HANDLER; - - static { - // Setup the native callback handler. - try { - CALLBACK_HANDLER = getCallbackHandler(CallbackI.class.getDeclaredMethod("callback", long.class, long.class)); - } catch (Exception e) { - throw new IllegalStateException("Failed to initialize the native callback handler.", e); - } - - MemoryUtil.getAllocator(); - } - - private long address; - - /** - * Creates a callback instance using the specified libffi CIF. - * - * @param cif the libffi CIF - */ - protected Callback(FFICIF cif) { - this.address = create(cif, this); - } - - /** - * Creates a callback instance using the specified function address - * - * @param address the function address - */ - protected Callback(long address) { - if (CHECKS) { - check(address); - } - this.address = address; - } - - @Override - public long address() { - return address; - } - - @Override - public void free() { - free(address()); - } - - private static native long getCallbackHandler(Method callback); - - /** - * Creates a native function that delegates to the specified instance when called. - * - *

    The native function uses the default calling convention.

    - * - * @param cif the {@code libffi} CIF - * @param instance the callback instance - * - * @return the dynamically generated native function - */ - static long create(FFICIF cif, Object instance) { - FFIClosure closure; - - long executableAddress; - try (MemoryStack stack = stackPush()) { - PointerBuffer code = stack.mallocPointer(1); - - closure = ffi_closure_alloc(FFIClosure.SIZEOF, code); - if (closure == null) { - throw new OutOfMemoryError(); - } - executableAddress = code.get(0); - if (DEBUG_ALLOCATOR) { - MemoryManage.DebugAllocator.track(executableAddress, FFIClosure.SIZEOF); - } - } - - long user_data = NewGlobalRef(instance); - - int errcode = ffi_prep_closure_loc(closure, cif, CALLBACK_HANDLER, user_data, executableAddress); - if (errcode != FFI_OK) { - DeleteGlobalRef(user_data); - ffi_closure_free(closure); - throw new RuntimeException("Failed to prepare the libffi closure"); - } - - CLOSURE_REGISTRY.put(executableAddress, closure); - - return executableAddress; - } - - /** - * Converts the specified function pointer to the {@code CallbackI} instance associated with it. - * - * @param functionPointer a function pointer - * @param the {@code CallbackI} instance type - * - * @return the {@code CallbackI} instance - */ - public static T get(long functionPointer) { - return memGlobalRefToObject(CLOSURE_REGISTRY.get(functionPointer).user_data()); - } - - /** Like {@link #get}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static T getSafe(long functionPointer) { - return functionPointer == NULL ? null : get(functionPointer); - } - - /** - * Frees any resources held by the specified function pointer. - * - * @param functionPointer the function pointer - */ - public static void free(long functionPointer) { - if (DEBUG_ALLOCATOR) { - MemoryManage.DebugAllocator.untrack(functionPointer); - } - - FFIClosure closure = CLOSURE_REGISTRY.get(functionPointer); - - DeleteGlobalRef(closure.user_data()); - ffi_closure_free(closure); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof Callback)) { - return false; - } - - Callback that = (Callback)o; - - return address == that.address(); - } - - public int hashCode() { - return (int)(address ^ (address >>> 32)); - } - - @Override - public String toString() { - return String.format("%s pointer [0x%X]", getClass().getSimpleName(), address); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/CallbackI.java b/LWJGL/src/main/java/org/lwjgl/system/CallbackI.java deleted file mode 100644 index 040d89ff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/CallbackI.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.system.libffi.*; - -/** - * Interface for dynamically created native functions that call into Java code (upcalls). - * - *

    Pointers to such functions can be passed to native APIs as callbacks.

    - */ -public interface CallbackI extends Pointer { - - /** - * Returns the libffi Call Interface for this callback function. [INTERNAL API] - * - * @return the CIF structure for this callback function - */ - FFICIF getCallInterface(); - - @Override - default long address() { - return Callback.create(getCallInterface(), this); - } - - /** - * The Java method that will be called from native code when the native callback function is invoked. - * - * @param ret a pointer to the memory used for the function's return value. - * - *

    If the function is declared as returning {@code void}, then this value is garbage and should not be used.

    - * - *

    Otherwise, the callback must fill the object to which this points, following the same special promotion behavior as - * {@link LibFFI#ffi_call}. That is, in most cases, {@code ret} points to an object of exactly the size of the type specified when {@code CIF} - * was constructed. However, integral types narrower than the system register size are widened. In these cases your program may assume that - * {@code ret} points to an {@code ffi_arg} object.

    - * @param args a vector of pointers to memory holding the arguments to the function - */ - void callback(long ret, long args); - -} diff --git a/LWJGL/src/main/java/org/lwjgl/system/CheckIntrinsics.java b/LWJGL/src/main/java/org/lwjgl/system/CheckIntrinsics.java deleted file mode 100644 index 1aa3f14b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/CheckIntrinsics.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -/** - * Simple index checks. - * - *

    On Java 9 these checks are replaced with the corresponding {@link java.util.Objects} methods, which perform better.

    - */ -public final class CheckIntrinsics { - - private CheckIntrinsics() { - } - - public static int checkIndex(int index, int length) { - if (index < 0 || length <= index) { - throw new IndexOutOfBoundsException(); - } - return index; - } - - public static int checkFromToIndex(int fromIndex, int toIndex, int length) { - if (fromIndex < 0 || toIndex < fromIndex || length < toIndex) { - throw new IndexOutOfBoundsException(); - } - return fromIndex; - } - - public static int checkFromIndexSize(int fromIndex, int size, int length) { - if ((length | fromIndex | size) < 0 || length - fromIndex < size) { - throw new IndexOutOfBoundsException(); - } - return fromIndex; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/Checks.java b/LWJGL/src/main/java/org/lwjgl/system/Checks.java deleted file mode 100644 index 330f1168..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/Checks.java +++ /dev/null @@ -1,552 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.CheckIntrinsics.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A class to check buffer boundaries in general. If there is insufficient 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.

    - * - * @see Configuration#DISABLE_CHECKS - * @see Configuration#DEBUG - * @see Configuration#DEBUG_FUNCTIONS - */ -public final class Checks { - - /** - * Runtime checks flag. - * - *

    When enabled, LWJGL will perform basic checks during its operation, mainly to avoid crashes in native code. Examples of such checks are: - * context-specific function address validation, buffer capacity checks, null-termination checks, etc. These checks are generally low-overhead and should - * not have a measurable effect on performance, so its recommended to have them enabled both during development and in production releases.

    - * - *

    If maximum performance is required, they can be disabled by setting {@link Configuration#DISABLE_CHECKS} to true.

    - */ - public static final boolean CHECKS = !Configuration.DISABLE_CHECKS.get(false); - - /** - * Debug mode flag. - * - *

    When enabled, LWJGL will perform additional checks during its operation. These checks are more expensive than the ones enabled with {@link #CHECKS} - * and will have a noticeable effect on performance, so they are disabled by default. Examples of such checks are: buffer object binding state check (GL), - * buffer capacity checks for texture images (GL & CL), etc. LWJGL will also print additional information, mainly during start-up.

    - * - *

    Can be enabled by setting {@link Configuration#DEBUG} to true.

    - */ - public static final boolean DEBUG = Configuration.DEBUG.get(false); - - /** - * Debug functions flag. - * - *

    When enabled, a warning message will be output to the debug stream when LWJGL fails to retrieve a function pointer.

    - * - *

    Can be enabled by setting {@link Configuration#DEBUG_FUNCTIONS} to true.

    - */ - public static final boolean DEBUG_FUNCTIONS = Configuration.DEBUG_FUNCTIONS.get(false); - - static { - if (DEBUG_FUNCTIONS && !DEBUG) { - APIUtil.DEBUG_STREAM.println("[LWJGL] The DEBUG_FUNCTIONS option requires DEBUG to produce output."); - } - } - - private Checks() { - } - - public static int lengthSafe(@Nullable short[] array) { return array == null ? 0 : array.length;} - public static int lengthSafe(@Nullable int[] array) { return array == null ? 0 : array.length;} - public static int lengthSafe(@Nullable long[] array) { return array == null ? 0 : array.length; } - public static int lengthSafe(@Nullable float[] array) { return array == null ? 0 : array.length;} - public static int lengthSafe(@Nullable double[] array) { return array == null ? 0 : array.length;} - public static int remainingSafe(@Nullable Buffer buffer) { return buffer == null ? 0 : buffer.remaining(); } - public static int remainingSafe(@Nullable CustomBuffer buffer) { return buffer == null ? 0 : buffer.remaining(); } - - /** - * Checks if any of the specified functions pointers is {@code NULL}. - * - * @param functions the function pointers to check - * - * @return true if all function pointers are valid, false otherwise. - */ - public static boolean checkFunctions(long... functions) { - for (long pointer : functions) { - if (pointer == NULL) { - return false; - } - } - return true; - } - - /** - * Checks if all functions are available in the function provider. - * - * @param provider the function address provider - * @param caps the function address buffer - * @param indices the function indices - * @param functions the function names - * - * @return true if all functions are available, false otherwise - */ - public static boolean checkFunctions(FunctionProvider provider, PointerBuffer caps, int[] indices, String... functions) { - boolean available = true; - for (int i = 0; i < indices.length; i++) { - int index = indices[i]; - if (index < 0 || caps.get(index) != NULL) { - continue; - } - long address = provider.getFunctionAddress(functions[i]); - if (address == NULL) { - available = false; - continue; - } - caps.put(index, address); - } - return available; - } - - /** - * Checks if all functions are available in the function provider. - * - * @param provider the function address provider - * @param handle the handle to a platform/device/context - * @param caps the function address buffer - * @param indices the function indices - * @param functions the function names - * - * @return true if all functions are available, false otherwise - */ - public static boolean checkFunctions(FunctionProviderLocal provider, long handle, PointerBuffer caps, int[] indices, String... functions) { - boolean available = true; - for (int i = 0; i < indices.length; i++) { - int index = indices[i]; - if (index < 0 || caps.get(index) != NULL) { - continue; - } - long address = provider.getFunctionAddress(handle, functions[i]); - if (address != NULL) { - caps.put(index, address); - continue; - } - available = false; - } - return available; - } - - /** - * Checks if all functions are available in the function provider. - * - * @param provider the function address provider - * @param caps the function address buffer - * @param indices the function indices - * @param functions the function names - * - * @return true if all functions are available, false otherwise - */ - public static boolean checkFunctions(FunctionProvider provider, long[] caps, int[] indices, String... functions) { - boolean available = true; - for (int i = 0; i < indices.length; i++) { - int index = indices[i]; - if (index < 0 || caps[index] != NULL) { - continue; - } - long address = provider.getFunctionAddress(functions[i]); - if (address == NULL) { - available = false; - continue; - } - caps[index] = address; - } - return available; - } - - public static boolean reportMissing(String api, String extension) { - apiLog("[" + api + "] " + extension + " was reported as available but an entry point is missing."); - return false; - } - - /** - * Ensures that the specified pointer is not {@code NULL} (0L). - * - * @param pointer the pointer to check - * - * @throws NullPointerException if {@code pointer} is {@code NULL} - */ - public static long check(long pointer) { - if (pointer == NULL) { - throw new NullPointerException(); - } - - return pointer; - } - - private static void assertNT(boolean found) { - if (!found) { - throw new IllegalArgumentException("Missing termination"); - } - } - - /** Ensures that the specified array is null-terminated. */ - public static void checkNT(int[] buf) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == 0); - } - - /** Ensures that the specified array is terminated with the specified terminator. */ - public static void checkNT(int[] buf, int terminator) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == terminator); - } - - /** Ensures that the specified array is null-terminated. */ - public static void checkNT(long[] buf) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == NULL); - } - - /** Ensures that the specified array is null-terminated. */ - public static void checkNT(float[] buf) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == 0.0f); - } - - /** Ensures that the specified ByteBuffer is null-terminated (last byte equal to 0). */ - public static void checkNT1(ByteBuffer buf) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == 0); - } - - /** Ensures that the specified ByteBuffer is null-terminated (last 2 bytes equal to 0). */ - public static void checkNT2(ByteBuffer buf) { - checkBuffer(buf.remaining(), 2); - assertNT(buf.get(buf.limit() - 2) == 0); - } - - /** Ensures that the specified IntBuffer is null-terminated. */ - public static void checkNT(IntBuffer buf) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == 0); - } - - /** Ensures that the specified IntBuffer is terminated with the specified terminator. */ - public static void checkNT(IntBuffer buf, int terminator) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == terminator); - } - - /** Ensures that the specified LongBuffer is null-terminated. */ - public static void checkNT(LongBuffer buf) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == NULL); - } - - /** Ensures that the specified FloatBuffer is null-terminated. */ - public static void checkNT(FloatBuffer buf) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == 0.0f); - } - - /** Ensures that the specified PointerBuffer is null-terminated. */ - public static void checkNT(PointerBuffer buf) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == NULL); - } - - /** Ensures that the specified PointerBuffer is terminated with the specified terminator. */ - public static void checkNT(PointerBuffer buf, long terminator) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == terminator); - } - - public static void checkNTSafe(@Nullable int[] buf) { - if (buf != null) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == 0); - } - } - public static void checkNTSafe(@Nullable int[] buf, int terminator) { - if (buf != null) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == terminator); - } - } - public static void checkNTSafe(@Nullable long[] buf) { - if (buf != null) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == NULL); - } - } - public static void checkNTSafe(@Nullable float[] buf) { - if (buf != null) { - checkBuffer(buf.length, 1); - assertNT(buf[buf.length - 1] == 0.0f); - } - } - public static void checkNT1Safe(@Nullable ByteBuffer buf) { - if (buf != null) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == 0); - } - } - public static void checkNT2Safe(@Nullable ByteBuffer buf) { - if (buf != null) { - checkBuffer(buf.remaining(), 2); - assertNT(buf.get(buf.limit() - 2) == 0); - } - } - public static void checkNTSafe(@Nullable IntBuffer buf) { - if (buf != null) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == 0); - } - } - public static void checkNTSafe(@Nullable IntBuffer buf, int terminator) { - if (buf != null) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == terminator); - } - } - public static void checkNTSafe(@Nullable LongBuffer buf) { - if (buf != null) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == NULL); - } - } - public static void checkNTSafe(@Nullable FloatBuffer buf) { - if (buf != null) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == 0.0f); - } - } - public static void checkNTSafe(@Nullable PointerBuffer buf) { - if (buf != null) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == NULL); - } - } - public static void checkNTSafe(@Nullable PointerBuffer buf, long terminator) { - if (buf != null) { - checkBuffer(buf.remaining(), 1); - assertNT(buf.get(buf.limit() - 1) == terminator); - } - } - - private static void checkBuffer(int bufferSize, int minimumSize) { - if (bufferSize < minimumSize) { - throwIAE(bufferSize, minimumSize); - } - } - - /** - * Helper method to ensure a array has enough capacity. - * - * @param buf the array to check - * @param size the minimum array capacity - * - * @throws IllegalArgumentException if {@code buf.length < size} - */ - public static void check(byte[] buf, int size) { - checkBuffer(buf.length, size); - } - - /** - * Helper method to ensure a array has enough capacity. - * - * @param buf the array to check - * @param size the minimum array capacity - * - * @throws IllegalArgumentException if {@code buf.length < size} - */ - public static void check(short[] buf, int size) { - checkBuffer(buf.length, size); - } - - /** - * Helper method to ensure a array has enough capacity. - * - * @param buf the array to check - * @param size the minimum array capacity - * - * @throws IllegalArgumentException if {@code buf.length < size} - */ - public static void check(int[] buf, int size) { - checkBuffer(buf.length, size); - } - - /** - * Helper method to ensure a array has enough capacity. - * - * @param buf the array to check - * @param size the minimum array capacity - * - * @throws IllegalArgumentException if {@code buf.length < size} - */ - public static void check(long[] buf, int size) { - checkBuffer(buf.length, size); - } - - /** - * Helper method to ensure a array has enough capacity. - * - * @param buf the array to check - * @param size the minimum array capacity - * - * @throws IllegalArgumentException if {@code buf.length < size} - */ - public static void check(float[] buf, int size) { - checkBuffer(buf.length, size); - } - - /** - * Helper method to ensure a array has enough capacity. - * - * @param buf the array to check - * @param size the minimum array capacity - * - * @throws IllegalArgumentException if {@code buf.length < size} - */ - public static void check(double[] buf, int size) { - checkBuffer(buf.length, size); - } - - /** - * Helper method to ensure a CharSequence has enough characters. - * - * @param text the text to check - * @param size the minimum number of characters - * - * @throws IllegalArgumentException if {@code text.length() < size} - */ - public static void check(CharSequence text, int size) { - checkBuffer(text.length(), size); - } - - /** - * Helper method to ensure a buffer has enough capacity. - * - * @param buf the buffer to check - * @param size the minimum buffer capacity - * - * @throws IllegalArgumentException if {@code buf.remaining() < size} - */ - public static void check(Buffer buf, int size) { - checkBuffer(buf.remaining(), size); - } - - /** @see #check(Buffer, int) */ - public static void check(Buffer buf, long size) { - checkBuffer(buf.remaining(), (int)size); - } - - /** - * Helper method to ensure a {@link CustomBuffer} has enough capacity. - * - * @param buf the buffer to check - * @param size the minimum buffer capacity - * - * @throws IllegalArgumentException if {@code buf.remaining() < size} - */ - public static void check(CustomBuffer buf, int size) { - checkBuffer(buf.remaining(), size); - } - - /** @see #check(CustomBuffer, int) */ - public static void check(CustomBuffer buf, long size) { - checkBuffer(buf.remaining(), (int)size); - } - - public static void checkSafe(@Nullable short[] buf, int size) { - if (buf != null) { - checkBuffer(buf.length, size); - } - } - public static void checkSafe(@Nullable int[] buf, int size) { - if (buf != null) { - checkBuffer(buf.length, size); - } - } - public static void checkSafe(@Nullable long[] buf, int size) { - if (buf != null) { - checkBuffer(buf.length, size); - } - } - public static void checkSafe(@Nullable float[] buf, int size) { - if (buf != null) { - checkBuffer(buf.length, size); - } - } - public static void checkSafe(@Nullable double[] buf, int size) { - if (buf != null) { - checkBuffer(buf.length, size); - } - } - public static void checkSafe(@Nullable Buffer buf, int size) { - if (buf != null) { - checkBuffer(buf.remaining(), size); - } - } - public static void checkSafe(@Nullable Buffer buf, long size) { - if (buf != null) { - checkBuffer(buf.remaining(), (int)size); - } - } - public static void checkSafe(@Nullable CustomBuffer buf, int size) { - if (buf != null) { - checkBuffer(buf.remaining(), size); - } - } - public static void checkSafe(@Nullable CustomBuffer buf, long size) { - if (buf != null) { - checkBuffer(buf.remaining(), (int)size); - } - } - - public static void check(Object[] array, int size) { - checkBuffer(array.length, size); - } - - private static void checkBufferGT(int bufferSize, int maximumSize) { - if (maximumSize < bufferSize) { - throwIAEGT(bufferSize, maximumSize); - } - } - - public static void checkGT(Buffer buf, int size) { - checkBufferGT(buf.remaining(), size); - } - - public static void checkGT(CustomBuffer buf, int size) { - checkBufferGT(buf.remaining(), size); - } - - public static long check(int index, int length) { - if (CHECKS) { - checkIndex(index, length); - } - // Convert to long to support addressing up to 2^31-1 elements, regardless of sizeof(element). - // The unsigned conversion helps the JIT produce code that is as fast as if int was returned. - return Integer.toUnsignedLong(index); - } - - // Separate calls to help inline check. - - private static void throwIAE(int bufferSize, int minimumSize) { - throw new IllegalArgumentException("Number of remaining elements is " + bufferSize + ", must be at least " + minimumSize); - } - - private static void throwIAEGT(int bufferSize, int maximumSize) { - throw new IllegalArgumentException("Number of remaining buffer elements is " + bufferSize + ", must be at most " + maximumSize); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/Configuration.java b/LWJGL/src/main/java/org/lwjgl/system/Configuration.java deleted file mode 100644 index 7e36d610..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/Configuration.java +++ /dev/null @@ -1,723 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.system.MemoryUtil.*; - -import javax.annotation.*; -import java.io.*; -import java.util.function.*; - -/** - * This class can be used to programmatically set the LWJGL runtime configuration. It is an alternative to using system properties. - * - *

    Care must be taken when setting static options. Such options are only read once or cached in {@code static final} fields. They must be - * configured through this class before touching any other LWJGL class.

    - */ -public class Configuration { - - /** - * Takes priority over {@code java.library.path}. - * - *

    It may contain one or more directory paths, separated by {@link File#pathSeparator}.

    - * - *

    - * Property: org.lwjgl.librarypath
    - *    Usage: Dynamic
    - */ - public static final Configuration LIBRARY_PATH = new Configuration<>("org.lwjgl.librarypath", StateInit.STRING); - - /** - * Sets the mapping algorithm used to resolve the name of bundled shared libraries. - * - *

    Supported values:

    - *
      - *
    • default - Maps {@code } to {@code }.
    • - *
    • legacy - Maps {@code } to {@code is64bit(arch) ? : 32}.
    • - *
    • <classpath> - A class that implements the {@link Function Function<String, String>} interface. It will be instantiated using reflection.
    • - *
    - * - *

    When set programmatically, it can also be a {@link Function Function<String, String>} instance.

    - * - *

    - * Property: org.lwjgl.system.bundledLibrary.nameMapper
    - *     Type: String or a {@link Function Function<String, String>} instance
    - *    Usage: Static

    - */ - public static final Configuration BUNDLED_LIBRARY_NAME_MAPPER = - new Configuration<>("org.lwjgl.system.bundledLibrary.nameMapper", StateInit.STRING); - - /** - * Sets the mapping algorithm used to resolve bundled shared libraries in the classpath/modulepath. - * - *

    Supported values:

    - *
      - *
    • default - Maps {@code } to {@code /}.
    • - *
    • legacy - Maps {@code } to {@code }.
    • - *
    • <classpath> - A class that implements the {@link Function Function<String, String>} interface. It will be instantiated using reflection.
    • - *
    - * - *

    When set programmatically, it can also be a {@link Function Function<String, String>} instance.

    - * - *

    - * Property: org.lwjgl.system.bundledLibrary.nameMapper
    - *     Type: String or a {@link Function Function<String, String>} instance
    - *    Usage: Static

    - */ - public static final Configuration BUNDLED_LIBRARY_PATH_MAPPER = - new Configuration<>("org.lwjgl.system.bundledLibrary.pathMapper", StateInit.STRING); - - /** - * Changes the temporary directory name created by LWJGL when extracting shared libraries from JAR files. - * - *

    If this option is not set, it defaults to lwjgl_<user name>.

    - * - *

    - * Property: org.lwjgl.system.SharedLibraryExtractDirectory
    - *    Usage: Dynamic
    - */ - public static final Configuration SHARED_LIBRARY_EXTRACT_DIRECTORY = new Configuration<>( - "org.lwjgl.system.SharedLibraryExtractDirectory", - StateInit.STRING - ); - - /** - * Changes the path where LWJGL extracts shared libraries from JAR files. - * - *

    If this option is not set, LWJGL will try the following paths and the first successful will be used:

    - *
      - *
    • {@code System.getProperty("java.io.tmpdir")}/extractDir/version/arch/
    • - *
    • <working directory>/.extractDir/version/arch/
    • - *
    • {@code System.getProperty("user.home")}/.extractDir/version/arch/
    • - *
    • {@code Files.createTempDirectory("lwjgl", "")}
    • - *
    - * - * where: - * - *
    
    -     * extractDir = Configuration.SHARED_LIBRARY_EXTRACT_DIRECTORY
    -     * version = Version.getVersion().replace(' ', '-')
    -     * 
    - * - *

    - * Property: org.lwjgl.system.SharedLibraryExtractPath
    - *    Usage: Dynamic

    - */ - public static final Configuration SHARED_LIBRARY_EXTRACT_PATH = new Configuration<>( - "org.lwjgl.system.SharedLibraryExtractPath", - StateInit.STRING - ); - - /** - * When enabled, shared libraries found as regular files (not inside a JAR file) in the classpath will first be copied to the - * {@link #SHARED_LIBRARY_EXTRACT_PATH}, then loaded from there. - * - *

    - * Property: org.lwjgl.system.SharedLibraryExtractForce
    - *    Usage: Dynamic

    - */ - public static final Configuration SHARED_LIBRARY_EXTRACT_FORCE = new Configuration<>( - "org.lwjgl.system.SharedLibraryExtractForce", - StateInit.BOOLEAN - ); - - /** - * EXPERIMENTAL: Emulates {@link System#loadLibrary} behavior in {@link Library#loadNative(Class, String, String, boolean) Library.loadNative}. - * - *

    - * Property: org.lwjgl.system.EmulateSystemLoadLibrary
    - *    Usage: Dynamic

    - */ - public static final Configuration EMULATE_SYSTEM_LOADLIBRARY = new Configuration<>( - "org.lwjgl.system.EmulateSystemLoadLibrary", - StateInit.BOOLEAN - ); - - /** - * Can be used to override the LWJGL library name. - * - *

    It can be an absolute path.

    - * - *

    - * Property: org.lwjgl.libname
    - *    Usage: Dynamic

    - */ - public static final Configuration LIBRARY_NAME = new Configuration<>("org.lwjgl.libname", StateInit.STRING); - - /** - * Sets the allocator used for the {@link MemoryUtil} explicit memory management API - * ({@link MemoryUtil#memAlloc memAlloc}/{@link MemoryUtil#memFree memFree}/etc). - * - *

    Supported values:

    - *
      - *
    • jemalloc - The allocator provided by the jemalloc library.
    • - *
    • rpmalloc - The allocator provided by the rpmalloc library.
      - *

      LWJGL calls {@code rpmalloc_initialize} once, when the allocator is - * created. It never calls {@code rpmalloc_finalize}. The user is responsible for calling {@code rpmalloc_thread_initialize} and - * {@code rpmalloc_thread_finalize} when appropriate.

    • - *
    • system - The default system memory allocator
    • - *
    • <classpath> - A class that implements the {@link MemoryAllocator MemoryAllocator} interface. It will be instantiated using reflection.
    • - *
    - * - *

    When set programmatically, it can also be a {@link MemoryAllocator MemoryAllocator} instance.

    - * - *

    - * Property: org.lwjgl.system.allocator
    - *     Type: String or a {@link MemoryAllocator} instance
    - *    Usage: Static

    - */ - public static final Configuration MEMORY_ALLOCATOR = new Configuration<>("org.lwjgl.system.allocator", StateInit.STRING); - - /** - * Sets the stack size, in kilobytes, that will be used in the default {@link MemoryStack} constructor. - * - *

    This value is also used for the LWJGL-managed, thread-local, {@link MemoryStack} instances. If this option is not set, it defaults to 64.

    - * - *

    - * Property: org.lwjgl.system.stackSize
    - *    Usage: Static

    - */ - public static final Configuration STACK_SIZE = new Configuration<>("org.lwjgl.system.stackSize", StateInit.INT); - - /** - * Sets the size of arrays cached in thread-local storage to minimize allocations while decoding text. - * - *

    The memory cost for the cache is up to two arrays per thread that does text decoding. When the text length is up to this value, a cached array will - * be used. When the text length is longer than this value, a new array buffer will be allocated.

    - * - *

    If this option is not set, it defaults to 8192. Setting the value to 0 will disable the array cache.

    - * - *

    - * Property: org.lwjgl.system.arrayTLCSize
    - *    Usage: Static

    - */ - public static final Configuration ARRAY_TLC_SIZE = new Configuration<>("org.lwjgl.system.arrayTLCSize", StateInit.INT); - - /** - * Overrides the number of functions in the {@code JNINativeInterface_} struct. - * - *

    This is only necessary when LWJGL runs on a JVM with a newer, unsupported JNI version, that has introduced new JNI functions. The function count - * must be accurate in order to use the OpenGL, OpenGL ES, or OpenAL bindings.

    - * - *

    The currently known values are:

    - *
      - *
    • 229 for Java 8
    • - *
    • 230 for Java 9 to Java 18
    • - *
    • 231 for Java 19 or higher
    • - *
    - * - *

    - * Property: org.lwjgl.system.JNINativeInterfaceSize
    - *    Usage: Static

    - */ - public static final Configuration JNI_NATIVE_INTERFACE_FUNCTION_COUNT = new Configuration<>("org.lwjgl.system.JNINativeInterfaceSize", StateInit.INT); - - /** - * Set to true to disable LWJGL's basic checks. - * - *

    These are trivial checks that LWJGL performs to avoid JVM crashes, very useful during development. Their performance impact is usually minimal, but - * they may be disabled for release builds.

    - * - *

    - * Property: org.lwjgl.util.NoChecks
    - *    Usage: Static

    - */ - public static final Configuration DISABLE_CHECKS = new Configuration<>("org.lwjgl.util.NoChecks", StateInit.BOOLEAN); - - /** - * Set to true to disable LWJGL's function lookup checks. - * - *

    These checks ensure that required functions are not missing from dynamically loaded shared libraries. This setting is useful when a trusted - * incompatible library must be loaded.

    - * - *

    - * Property: org.lwjgl.util.NoFunctionChecks
    - *    Usage: Dynamic

    - */ - public static final Configuration DISABLE_FUNCTION_CHECKS = new Configuration<>("org.lwjgl.util.NoFunctionChecks", StateInit.BOOLEAN); - - /** - * Set to true to enable LWJGL's debug mode. - * - *

    Information messages will be printed to the {@link APIUtil#DEBUG_STREAM} and extra runtime checks will be performed (some potentially expensive, - * performance-wise).

    - * - *

    - * Property: org.lwjgl.util.Debug
    - *    Usage: Static

    - */ - public static final Configuration DEBUG = new Configuration<>("org.lwjgl.util.Debug", StateInit.BOOLEAN); - - /** - * When enabled, {@code SharedLibraryLoader} exceptions will be printed to the {@link #DEBUG_STREAM}. - * - *

    This option requires {@link #DEBUG} to be enabled.

    - * - *

    - * Property: org.lwjgl.util.DebugLoader
    - *    Usage: Static

    - */ - public static final Configuration DEBUG_LOADER = new Configuration<>("org.lwjgl.util.DebugLoader", StateInit.BOOLEAN); - - /** - * Can be set to override the default {@link APIUtil#DEBUG_STREAM}. - * - *

    It must be the name of a class that implements the {@link Supplier Supplier<PrintStream>} interface. The class will be instantiated using - * reflection and the result of {@link Supplier#get get} will become the {@code #DEBUG_STREAM} used by LWJGL.

    - * - *

    When set programmatically, it can also be a {@link PrintStream} instance.

    - * - *

    - * Property: org.lwjgl.util.DebugStream
    - *     Type: String or a {@link PrintStream} instance
    - *    Usage: Static

    - */ - public static final Configuration DEBUG_STREAM = new Configuration<>("org.lwjgl.util.DebugStream", StateInit.STRING); - - /** - * Set to true to enable LWJGL's debug mode for the {@link MemoryUtil} explicit memory management API - * ({@link MemoryUtil#memAlloc memAlloc}/{@link MemoryUtil#memFree memFree}/etc). - * - *

    All memory allocations through that API will be tracked and leaks will be reported on JVM exit. The {@code memReport} methods can also be used.

    - * - *

    When this option is enabled, a stacktrace is generated on every allocation, which may negatively impact performance. If this becomes a serious issue, - * the JVM option {@code -XX:MaxJavaStackTraceDepth=d} (where {@code d >= 6}) can be used to reduce the overhead.

    - * - *

    - * Property: org.lwjgl.util.DebugAllocator
    - *    Usage: Static

    - */ - public static final Configuration DEBUG_MEMORY_ALLOCATOR = new Configuration<>("org.lwjgl.util.DebugAllocator", StateInit.BOOLEAN); - - /** - * Set to false to disable tracking of internal memory allocations, in native shared libraries that have been set up to use the LWJGL memory allocator. - * - *

    If this option is not set, it defaults to true.

    - * - *

    - * Property: org.lwjgl.util.DebugAllocator.internal
    - *    Usage: Static

    - */ - public static final Configuration DEBUG_MEMORY_ALLOCATOR_INTERNAL = new Configuration<>("org.lwjgl.util.DebugAllocator.internal", StateInit.BOOLEAN); - - /** - * Set to true to skip stacktrace generation on each tracked allocation. - * - *

    When enabled, this option dramatically reduces the performance overhead of memory leak detection. After a leak is detected, disable this option and - * rerun the application to get the offending allocation's stacktrace.

    - * - *

    This option can also be dynamically toggled on and off, to limit the performance impact in specific portions of the application that are prime - * suspects for memory leaks.

    - * - *

    When reporting memory allocation aggregates, with - * {@link MemoryUtil#memReport(MemoryAllocationReport, MemoryAllocationReport.Aggregate, boolean) memReport} and the options - * {@link MemoryAllocationReport.Aggregate#GROUP_BY_METHOD GROUP_BY_METHOD} or - * {@link MemoryAllocationReport.Aggregate#GROUP_BY_STACKTRACE GROUP_BY_STACKTRACE}, memory allocations without an associated stacktrace will not be - * included.

    - * - *

    - * Property: org.lwjgl.util.DebugAllocator.fast
    - *    Usage: Dynamic

    - */ - public static final Configuration DEBUG_MEMORY_ALLOCATOR_FAST = new Configuration<>("org.lwjgl.util.DebugAllocator.fast", StateInit.BOOLEAN); - - /** - * Set to true to enable LWJGL's debug mode for the {@link MemoryStack}. - * - *

    When using the stack, each frame should be popped in the same method that pushed it. If this symmetry is broken, this mode will report it - * immediately.

    - * - *

    When this option is enabled, a stacktrace is generated on every push or pop to the stack, which may negatively impact performance. If this becomes a - * serious issue, the JVM option {@code -XX:MaxJavaStackTraceDepth=d} (where {@code d >= 5}) can be used to reduce the overhead.

    - * - *

    - * Property: org.lwjgl.util.DebugStack
    - *    Usage: Static

    - */ - public static final Configuration DEBUG_STACK = new Configuration<>("org.lwjgl.util.DebugStack", StateInit.BOOLEAN); - - /** - * When enabled, a warning message will be output to {@link #DEBUG_STREAM} when LWJGL fails to retrieve a function pointer. - * - *

    This option may generate a lot of output and false negatives for functions in unused classes.

    - * - *

    This option requires {@link #DEBUG} to be enabled.

    - * - *

    - * Property: org.lwjgl.util.DebugFunctions
    - *    Usage: Static

    - */ - public static final Configuration DEBUG_FUNCTIONS = new Configuration<>("org.lwjgl.util.DebugFunctions", StateInit.BOOLEAN); - - // -- ASSIMP - - /** Similar to {@link #LIBRARY_NAME} for the AssImp library (org.lwjgl.assimp.libname). */ - public static final Configuration ASSIMP_LIBRARY_NAME = new Configuration<>("org.lwjgl.assimp.libname", StateInit.STRING); - - /** Similar to {@link #LIBRARY_NAME} for the Draco library (org.lwjgl.assimp.draco.libname). */ - public static final Configuration ASSIMP_DRACO_LIBRARY_NAME = new Configuration<>("org.lwjgl.assimp.draco.libname", StateInit.STRING); - - // -- BGFX - - /** Similar to {@link #LIBRARY_NAME} for the BGFX library (org.lwjgl.bgfx.libname). */ - public static final Configuration BGFX_LIBRARY_NAME = new Configuration<>("org.lwjgl.bgfx.libname", StateInit.STRING); - - // -- CUDA - - /** Similar to {@link #LIBRARY_NAME} for the CUDA Driver library – nvcuda (org.lwjgl.cuda.libname). */ - public static final Configuration CUDA_LIBRARY_NAME = new Configuration<>("org.lwjgl.cuda.libname", StateInit.STRING); - - /** - * This option can be used to force a specific CUDA Toolkit version. - * - *

    By default, when LWJGL detects multiple CUDA Toolkits, it will use the toolkit with the greatest version.

    - * - *

    - * Property: org.lwjgl.cuda.toolkit.version
    - *    Usage: Static

    - */ - public static final Configuration CUDA_TOOLKIT_VERSION = new Configuration<>("org.lwjgl.cuda.toolkit.version", StateInit.STRING); - - /** - * This option can be used to load toolkit libraries from a non-standard installation folder. - * - *

    By default, LWJGL will try to detect CUDA Toolkits in the default installation folder.

    - * - *

    - * Property: org.lwjgl.cuda.toolkit.path
    - *    Usage: Static

    - */ - public static final Configuration CUDA_TOOLKIT_PATH = new Configuration<>("org.lwjgl.cuda.toolkit.path", StateInit.STRING); - - /** Similar to {@link #LIBRARY_NAME} for the CUDA NVRTC library (org.lwjgl.cuda.nvrtc.libname). */ - public static final Configuration CUDA_NVRTC_LIBRARY_NAME = new Configuration<>("org.lwjgl.cuda.nvrtc.libname", StateInit.STRING); - - /** Similar to {@link #LIBRARY_NAME} for the CUDA NVRTC Builtins library (org.lwjgl.cuda.nvrtc-builtins.libname). */ - public static final Configuration CUDA_NVRTC_BUILTINS_LIBRARY_NAME = new Configuration<>("org.lwjgl.cuda.nvrtc-builtins.libname", StateInit.STRING); - - /** - * To enable per-thread synchronization, set this option to {@code true} before initializing the CUDA driver. - * - *

    By default, CUDA uses the legacy default stream. To check if the CUDA driver supports PTDS, call - * {@code org.lwjgl.cuda.CUDA.isPerThreadDefaultStreamSupported()}

    - * - *

    - * Property: org.lwjgl.cuda.ptds
    - *    Usage: Static

    - */ - public static final Configuration CUDA_API_PER_THREAD_DEFAULT_STREAM = new Configuration<>("org.lwjgl.cuda.ptds", StateInit.BOOLEAN); - - // -- EGL - - /** - * Set this property to false to disable automatic initialization of the EGL library. - * - *

    By default, LWJGL will automatically initialize the EGL library when it is first accessed.

    - * - *

    - * Property: org.lwjgl.egl.explicitInit
    - *    Usage: Static

    - */ - public static final Configuration EGL_EXPLICIT_INIT = new Configuration<>("org.lwjgl.egl.explicitInit", StateInit.BOOLEAN); - - /** Similar to {@link #LIBRARY_NAME} for the EGL library (org.lwjgl.egl.libname). */ - public static final Configuration EGL_LIBRARY_NAME = new Configuration<>("org.lwjgl.egl.libname", StateInit.STRING); - - /** Similar to {@link #OPENGL_EXTENSION_FILTER} for the EGL library (org.lwjgl.egl.extensionFilter). */ - public static final Configuration EGL_EXTENSION_FILTER = new Configuration<>("org.lwjgl.egl.extensionFilter", StateInit.STRING); - - // -- FMOD - - /** Similar to {@link #LIBRARY_NAME} for the FMOD Core library (org.lwjgl.fmod.libname). */ - public static final Configuration FMOD_LIBRARY_NAME = new Configuration<>("org.lwjgl.fmod.libname", StateInit.STRING); - - /** Similar to {@link #LIBRARY_NAME} for the FMOD Studio library (org.lwjgl.fmod.studio.libname). */ - public static final Configuration FMOD_STUDIO_LIBRARY_NAME = new Configuration<>("org.lwjgl.fmod.studio.libname", StateInit.STRING); - - /** Similar to {@link #LIBRARY_NAME} for the FMOD FSBank library (org.lwjgl.fmod.fsbank.libname). */ - public static final Configuration FMOD_FSBANK_LIBRARY_NAME = new Configuration<>("org.lwjgl.fmod.fsbank.libname", StateInit.STRING); - - // -- FREETYPE - /** Similar to {@link #LIBRARY_NAME} for the FreeType library (org.lwjgl.freetype.libname). */ - public static final Configuration FREETYPE_LIBRARY_NAME = new Configuration<>("org.lwjgl.freetype.libname", StateInit.STRING); - - // -- GLFW - - /** Similar to {@link #LIBRARY_NAME} for the GLFW library (org.lwjgl.glfw.libname). */ - public static final Configuration GLFW_LIBRARY_NAME = new Configuration<>("org.lwjgl.glfw.libname", StateInit.STRING); - - /** - * macOS only: Set this property to false to disable first thread detection on {@code glfwInit}. - * - *

    By default, LWJGL will check if {@code glfwInit} is called on the first thread of the process. If not, an {@link IllegalStateException} will be - * thrown.

    - * - *

    The JVM can be launched with {@code -XstartOnFirstThread} to make the main thread the first thread of the process.

    - * - *

    - * Property: org.lwjgl.glfw.checkThread0
    - *    Usage: Dynamic

    - */ - public static final Configuration GLFW_CHECK_THREAD0 = new Configuration<>("org.lwjgl.glfw.checkThread0", StateInit.BOOLEAN); - - // -- HARFBUZZ - - /** - * Similar to {@link #LIBRARY_NAME} for the HarfBuzz library (org.lwjgl.harfbuzz.libname). - * - *

    The default LWJGL HarfBuzz build does not include FreeType support and the {@code hb_ft_*} functions will not be available. However, LWJGL's FreeType - * build includes HarfBuzz and exports its full API. When working with both HarfBuzz and FreeType, the HarfBuzz bindings can be made to use FreeType's - * shared library, with one of the following ways:

    - * - *
      - *
    • launch the JVM with {@code -Dorg.lwjgl.harfbuzz.libname=freetype}
    • - *
    • run {@code Configuration.HARFBUZZ_LIBRARY_NAME.set("freetype")}
    • - *
    • run {@code Configuration.HARFBUZZ_LIBRARY_NAME.set(FreeType.getLibrary())} - recommended
    • - *
    - * - *

    The {@code org.lwjgl.harfbuzz.natives} module is not necessary when enabling the above.

    - * - *

    - * Property: org.lwjgl.harfbuzz.libname
    - *     Type: String or a {@link SharedLibrary} instance
    - *    Usage: Dynamic

    - */ - public static final Configuration HARFBUZZ_LIBRARY_NAME = new Configuration<>("org.lwjgl.harfbuzz.libname", StateInit.STRING); - - // -- HWLOC - - /** Similar to {@link #LIBRARY_NAME} for the hwloc library (org.lwjgl.hwloc.libname). */ - public static final Configuration HWLOC_LIBRARY_NAME = new Configuration<>("org.lwjgl.hwloc.libname", StateInit.STRING); - - // -- JAWT - - /** Similar to {@link #LIBRARY_NAME} for the jawt library (org.lwjgl.system.jawt.libname). */ - public static final Configuration JAWT_LIBRARY_NAME = new Configuration<>("org.lwjgl.system.jawt.libname", StateInit.STRING); - - // -- JEMALLOC - - /** Similar to {@link #LIBRARY_NAME} for the jemalloc library (org.lwjgl.system.jemalloc.libname). */ - public static final Configuration JEMALLOC_LIBRARY_NAME = new Configuration<>("org.lwjgl.system.jemalloc.libname", StateInit.STRING); - - // -- KTX - - /** Similar to {@link #LIBRARY_NAME} for the KTX library (org.lwjgl.ktx.libname). */ - public static final Configuration KTX_LIBRARY_NAME = new Configuration<>("org.lwjgl.ktx.libname", StateInit.STRING); - - // -- LLVM - - /** Similar to {@link #LIBRARY_NAME} for the LLVM library (org.lwjgl.llvm.libname). */ - public static final Configuration LLVM_LIBRARY_NAME = new Configuration<>("org.lwjgl.llvm.libname", StateInit.STRING); - - /** Similar to {@link #LIBRARY_NAME} for the LLVM/Clang Library (org.lwjgl.llvm.clang.libname). */ - public static final Configuration LLVM_CLANG_LIBRARY_NAME = new Configuration<>("org.lwjgl.llvm.clang.libname", StateInit.STRING); - - /** Similar to {@link #LIBRARY_NAME} for the LLVM/LTO library (org.lwjgl.llvm.clang.libname). */ - public static final Configuration LLVM_LTO_LIBRARY_NAME = new Configuration<>("org.lwjgl.llvm.lto.libname", StateInit.STRING); - - // -- NativeFileDialog - /** - * Set to true to enable NativeFileDialog's XDG Desktop Portal backend on Linux. - * - *

    - * Property: org.lwjgl.nfd.linux.portal
    - *    Usage: Static

    - */ - public static final Configuration NFD_LINUX_PORTAL = new Configuration<>("org.lwjgl.nfd.linux.portal", StateInit.BOOLEAN); - - // -- ODBC - - /** Similar to {@link #LIBRARY_NAME} for the ODBC library (org.lwjgl.odbc.libname). */ - public static final Configuration ODBC_LIBRARY_NAME = new Configuration<>("org.lwjgl.odbc.libname", StateInit.STRING); - - // -- OPENAL - - /** Similar to {@link #EGL_EXPLICIT_INIT} for the OpenAL library (org.lwjgl.openal.explicitInit). */ - public static final Configuration OPENAL_EXPLICIT_INIT = new Configuration<>("org.lwjgl.openal.explicitInit", StateInit.BOOLEAN); - - /** Similar to {@link #LIBRARY_NAME} for the OpenAL library (org.lwjgl.openal.libname). */ - public static final Configuration OPENAL_LIBRARY_NAME = new Configuration<>("org.lwjgl.openal.libname", StateInit.STRING); - - /** Similar to {@link #OPENGL_EXTENSION_FILTER} for the OpenAL library (org.lwjgl.openal.extensionFilter). */ - public static final Configuration OPENAL_EXTENSION_FILTER = new Configuration<>("org.lwjgl.openal.extensionFilter", StateInit.STRING); - - // -- OPENCL - - /** Similar to {@link #EGL_EXPLICIT_INIT} for the OpenCL library (org.lwjgl.opencl.explicitInit). */ - public static final Configuration OPENCL_EXPLICIT_INIT = new Configuration<>("org.lwjgl.opencl.explicitInit", StateInit.BOOLEAN); - - /** Similar to {@link #LIBRARY_NAME} for the OpenCL library (org.lwjgl.opencl.libname). */ - public static final Configuration OPENCL_LIBRARY_NAME = new Configuration<>("org.lwjgl.opencl.libname", StateInit.STRING); - - /** Similar to {@link #OPENGL_EXTENSION_FILTER} for the OpenCL library (org.lwjgl.opencl.extensionFilter). */ - public static final Configuration OPENCL_EXTENSION_FILTER = new Configuration<>("org.lwjgl.opencl.extensionFilter", StateInit.STRING); - - // -- OPENGL - - /** Similar to {@link #EGL_EXPLICIT_INIT} for the OpenGL library (org.lwjgl.opengl.explicitInit). */ - public static final Configuration OPENGL_EXPLICIT_INIT = new Configuration<>("org.lwjgl.opengl.explicitInit", StateInit.BOOLEAN); - - /** Similar to {@link #LIBRARY_NAME} for the OpenGL library (org.lwjgl.opengl.libname). */ - public static final Configuration OPENGL_LIBRARY_NAME = new Configuration<>("org.lwjgl.opengl.libname", StateInit.STRING); - - /** - * Can be used to limit the maximum available OpenGL version. - * - *

    This can be useful to ensure that an application has not accidentally used features only available in a higher OpenGL version. When set - * programmatically, it can also be an {@link APIUtil.APIVersion} instance.

    - * - *

    - * Property: org.lwjgl.opengl.maxVersion
    - *     Type: String (M.n) or an {@link APIUtil.APIVersion} instance
    - *    Usage: Static

    - */ - public static final Configuration OPENGL_MAXVERSION = new Configuration<>("org.lwjgl.opengl.maxVersion", StateInit.STRING); - - /** - * Can be used to disable specific extensions. - * - *

    This can be useful to ensure that an application behaves correctly with or without an extension. Supported values:

    - *
      - *
    • comma-delimited string - A list of extension names to disable.
    • - *
    • <classpath> - A class that implements the {@link Predicate Predicate<String>} interface. It will be instantiated using reflection.
    • - *
    - * - *

    When set programmatically, it can also be:

    - *
      - *
    • a {@link java.util.List List<String>} instance - A list of extension names to disable.
    • - *
    • a {@link Predicate}<String> instance - A predicate that accepts an extension name and returns true if it should be disabled.
    • - *
    - */ - public static final Configuration OPENGL_EXTENSION_FILTER = new Configuration<>("org.lwjgl.opengl.extensionFilter", StateInit.STRING); - - // -- OPENGL ES - - /** Similar to {@link #EGL_EXPLICIT_INIT} for the OpenGL ES library (org.lwjgl.opengles.explicitInit). */ - public static final Configuration OPENGLES_EXPLICIT_INIT = new Configuration<>("org.lwjgl.opengles.explicitInit", StateInit.BOOLEAN); - - /** Similar to {@link #LIBRARY_NAME} for the OpenGL ES library (org.lwjgl.opengles.libname). */ - public static final Configuration OPENGLES_LIBRARY_NAME = new Configuration<>("org.lwjgl.opengles.libname", StateInit.STRING); - - /** Similar to {@link #OPENGL_MAXVERSION} for the OpenGL ES library (org.lwjgl.opengles.maxVersion). */ - public static final Configuration OPENGLES_MAXVERSION = new Configuration<>("org.lwjgl.opengles.maxVersion", StateInit.STRING); - - /** Similar to {@link #OPENGL_EXTENSION_FILTER} for the OpenGL ES library (org.lwjgl.opengles.extensionFilter). */ - public static final Configuration OPENGLES_EXTENSION_FILTER = new Configuration<>("org.lwjgl.opengles.extensionFilter", StateInit.STRING); - - /** - * Defines the API that manages OpenGL ES contexts. - * - *

    Supported values:

    - *
      - *
    • EGL - context management is provided by EGL.
    • - *
    • native - context management is provided by the native platform.
      - *
    - * - *

    If this option is not set, LWJGL will first attempt to use EGL. If EGL is not available, it will attempt to use the native platform API.

    - * - *

    - * Property: org.lwjgl.opengl.contextAPI
    - *     Type: String
    - *    Usage: Dynamic

    - */ - public static final Configuration OPENGLES_CONTEXT_API = new Configuration<>("org.lwjgl.opengles.contextAPI", StateInit.STRING); - - // -- OPENVR - - /** Similar to {@link #LIBRARY_NAME} for the OpenVR library (org.lwjgl.openvr.libname). */ - public static final Configuration OPENVR_LIBRARY_NAME = new Configuration<>("org.lwjgl.openvr.libname", StateInit.STRING); - - // -- OpenXR - - /** Similar to {@link #EGL_EXPLICIT_INIT} for the OpenXR library (org.lwjgl.openxr.explicitInit). */ - public static final Configuration OPENXR_EXPLICIT_INIT = new Configuration<>("org.lwjgl.openxr.explicitInit", StateInit.BOOLEAN); - - /** Similar to {@link #LIBRARY_NAME} for the OpenXR library (org.lwjgl.openxr.libname). */ - public static final Configuration OPENXR_LIBRARY_NAME = new Configuration<>("org.lwjgl.openxr.libname", StateInit.STRING); - - // -- OPUS - - /** Similar to {@link #LIBRARY_NAME} for the Opus library (org.lwjgl.opus.libname). */ - public static final Configuration OPUS_LIBRARY_NAME = new Configuration<>("org.lwjgl.opus.libname", StateInit.STRING); - - // -- SHADERC - - /** Similar to {@link #LIBRARY_NAME} for the Shaderc libshaderc library (org.lwjgl.shaderc.libname). */ - public static final Configuration SHADERC_LIBRARY_NAME = new Configuration<>("org.lwjgl.shaderc.libname", StateInit.STRING); - - // -- SPVC - - /** Similar to {@link #LIBRARY_NAME} for the SPIRV-Cross library (org.lwjgl.spvc.libname). */ - public static final Configuration SPVC_LIBRARY_NAME = new Configuration<>("org.lwjgl.spvc.libname", StateInit.STRING); - - // -- VULKAN - - /** Similar to {@link #EGL_EXPLICIT_INIT} for the Vulkan library (org.lwjgl.vulkan.explicitInit). */ - public static final Configuration VULKAN_EXPLICIT_INIT = new Configuration<>("org.lwjgl.vulkan.explicitInit", StateInit.BOOLEAN); - - /** Similar to {@link #LIBRARY_NAME} for the Vulkan library (org.lwjgl.vulkan.libname). */ - public static final Configuration VULKAN_LIBRARY_NAME = new Configuration<>("org.lwjgl.vulkan.libname", StateInit.STRING); - - private interface StateInit extends Function { - StateInit BOOLEAN = property -> { - String value = System.getProperty(property); - return value == null ? null : Boolean.parseBoolean(value); - }; - - StateInit INT = Integer::getInteger; - - StateInit STRING = System::getProperty; - } - - private final String property; - - @Nullable - private volatile T state; - - Configuration(String property, StateInit init) { - this.property = property; - this.state = init.apply(property); - } - - public String getProperty() { - return property; - } - - /** - * Sets the option value. - * - * @param value the value to set - */ - public void set(@Nullable T value) { - this.state = value; - } - - /** - * Returns the option value. - * - *

    If the option value has not been set, null will be returned.

    - */ - @Nullable - public T get() { - return state; - } - - /** - * Returns the option value. - * - *

    If the option value has not been set, the specified default value will be returned.

    - * - * @param defaultValue the default value - */ - public T get(T defaultValue) { - T state = this.state; - if (state == null) { - state = defaultValue; - } - - return state; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/system/CustomBuffer.java b/LWJGL/src/main/java/org/lwjgl/system/CustomBuffer.java deleted file mode 100644 index ae914cb2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/CustomBuffer.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Base class of custom buffers with an API that mirrors {@code java.nio} for convenience. */ -public abstract class CustomBuffer> extends Pointer.Default { - - @Nullable - protected ByteBuffer container; - - protected int - mark, - position, - limit, - capacity; - - protected CustomBuffer(long address, @Nullable ByteBuffer container, int mark, int position, int limit, int capacity) { - super(address); - - this.container = container; - - this.mark = mark; - this.position = position; - this.limit = limit; - this.capacity = capacity; - } - - /** Returns the {@code sizeof} a single element in the buffer. */ - public abstract int sizeof(); - - /** Returns the buffer's base address. [INTERNAL USE ONLY] */ - public long address0() { - return address; - } - - /** Returns the memory address at the current buffer position. */ - @Override - public long address() { - return address + Integer.toUnsignedLong(position) * sizeof(); - } - - /** Returns the memory address at the specified buffer position. */ - public long address(int position) { - return address + Integer.toUnsignedLong(position) * sizeof(); - } - - /** - * Frees the buffer allocation. - * - *

    This method should not be used if the memory backing this buffer is not owned by the buffer.

    - */ - public void free() { - nmemFree(address); - } - - /** - * Returns this buffer's capacity. - * - * @return the capacity of this buffer - */ - public int capacity() { - return capacity; - } - - /** - * Returns this buffer's position. - * - * @return the position of this buffer - */ - public int position() { - return position; - } - - /** - * Sets this buffer's position. If the mark is defined and larger than the new position then it is discarded. - * - * @param position the new position value; must be non-negative and no larger than the current limit - * - * @return This buffer - * - * @throws IllegalArgumentException If the preconditions on {@code newPosition} do not hold - */ - public SELF position(int position) { - if (position < 0 || limit < position) { - throw new IllegalArgumentException(); - } - this.position = position; - if (position < mark) { - mark = -1; - } - return self(); - } - - /** - * Returns this buffer's limit. - * - * @return the limit of this buffer - */ - public int limit() { - return limit; - } - - /** - * Sets this buffer's limit. If the position is larger than the new limit then it is set to the new limit. If the mark is defined and larger than the new - * limit then it is discarded. - * - * @param limit the new limit value; must be non-negative and no larger than this buffer's capacity - * - * @return This buffer - * - * @throws IllegalArgumentException If the preconditions on {@code newLimit} do not hold - */ - public SELF limit(int limit) { - if (limit < 0 || capacity < limit) { - throw new IllegalArgumentException(); - } - this.limit = limit; - if (limit < position) { - position = limit; - } - if (limit < mark) { - mark = -1; - } - return self(); - } - - /** - * Sets this buffer's mark at its position. - * - * @return This buffer - */ - public SELF mark() { - mark = position; - return self(); - } - - /** - * Resets this buffer's position to the previously-marked position. - * - *

    Invoking this method neither changes nor discards the mark's value.

    - * - * @return This buffer - * - * @throws InvalidMarkException If the mark has not been set - */ - public SELF reset() { - int m = mark; - if (m < 0) { - throw new InvalidMarkException(); - } - position = m; - return self(); - } - - /** - * Clears this buffer. The position is set to zero, the limit is set to the capacity, and the mark is discarded. - * - *

    Invoke this method before using a sequence of channel-read or put operations to fill this buffer. For example:

    - * - *
    -     * buf.clear();     // Prepare buffer for reading
    -     * in.read(buf);    // Read data
    - * - *

    This method does not actually erase the data in the buffer, but it is named as if it did because it will most often be used in situations in which - * that might as well be the case.

    - * - * @return This buffer - */ - public SELF clear() { - position = 0; - limit = capacity; - mark = -1; - return self(); - } - - /** - * Flips this buffer. The limit is set to the current position and then the position is set to zero. If the mark is defined then it is discarded. - * - *

    After a sequence of channel-read or put operations, invoke this method to prepare for a sequence of channel-write or relative get - * operations. For example:

    - * - *
    -     * buf.put(magic);    // Prepend header
    -     * in.read(buf);      // Read data into rest of buffer
    -     * buf.flip();        // Flip buffer
    -     * out.write(buf);    // Write header + data to channel
    - * - *

    This method is often used in conjunction with the {@link #compact} method when transferring data from one place to another.

    - * - * @return This buffer - */ - public SELF flip() { - limit = position; - position = 0; - mark = -1; - return self(); - } - - /** - * Rewinds this buffer. The position is set to zero and the mark is discarded. - * - *

    Invoke this method before a sequence of channel-write or get operations, assuming that the limit has already been set appropriately. For - * example:

    - * - *
    -     * out.write(buf);    // Write remaining data
    -     * buf.rewind();      // Rewind buffer
    -     * buf.get(array);    // Copy data into array
    - * - * @return This buffer - */ - public SELF rewind() { - position = 0; - mark = -1; - return self(); - } - - /** - * Returns the number of elements between the current position and the limit. - * - * @return the number of elements remaining in this buffer - */ - public int remaining() { - return limit - position; - } - - /** - * Tells whether there are any elements between the current position and the limit. - * - * @return {@code true} if, and only if, there is at least one element remaining in this buffer - */ - public boolean hasRemaining() { - return position < limit; - } - - /** - * Creates a new buffer whose content is a shared subsequence of this buffer's content. - * - *

    The content of the new buffer will start at this buffer's current position. Changes to this buffer's content will be visible in the new buffer, and - * vice versa; the two buffers' position, limit, and mark values will be independent.

    - * - *

    The new buffer's position will be zero, its capacity and its limit will be the number of elements remaining in this buffer, and its mark will be - * undefined. The new buffer will be read-only if, and only if, this buffer is read-only.

    - * - * @return the new buffer - */ - @SuppressWarnings("unchecked") - public SELF slice() { - SELF slice; - try { - slice = (SELF)UNSAFE.allocateInstance(this.getClass()); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(slice, ADDRESS, address + Integer.toUnsignedLong(position) * sizeof()); - UNSAFE.putInt(slice, BUFFER_MARK, -1); - UNSAFE.putInt(slice, BUFFER_LIMIT, remaining()); - UNSAFE.putInt(slice, BUFFER_CAPACITY, remaining()); - UNSAFE.putObject(slice, BUFFER_CONTAINER, container); - - return slice; - } - - /** - * Returns a slice of this buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of this buffer are preserved after a call to this method.

    - * - * @param offset the slice offset, it must be ≤ {@code this.remaining()} - * @param capacity the slice length, it must be ≤ {@code this.capacity() - (this.position() + offset)} - * - * @return the sliced buffer - */ - @SuppressWarnings("unchecked") - public SELF slice(int offset, int capacity) { - int position = this.position + offset; - if (offset < 0 || this.limit < offset) { - throw new IllegalArgumentException(); - } - - if (capacity < 0 || this.capacity - position < capacity) { - throw new IllegalArgumentException(); - } - - SELF slice; - try { - slice = (SELF)UNSAFE.allocateInstance(this.getClass()); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(slice, ADDRESS, address + Integer.toUnsignedLong(position) * sizeof()); - UNSAFE.putInt(slice, BUFFER_MARK, -1); - UNSAFE.putInt(slice, BUFFER_LIMIT, capacity); - UNSAFE.putInt(slice, BUFFER_CAPACITY, capacity); - UNSAFE.putObject(slice, BUFFER_CONTAINER, container); - - return slice; - } - - /** - * Creates a new buffer that shares this buffer's content. - * - *

    The content of the new buffer will be that of this buffer. Changes to this buffer's content will be visible in the new buffer, and vice versa; the - * two buffers' position, limit, and mark values will be independent. - * - *

    The new buffer's capacity, limit and position will be identical to those of this buffer.

    - * - * @return the new buffer - */ - @SuppressWarnings("unchecked") - public SELF duplicate() { - SELF dup; - try { - dup = (SELF)UNSAFE.allocateInstance(this.getClass()); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(dup, ADDRESS, address); - UNSAFE.putInt(dup, BUFFER_MARK, mark); - UNSAFE.putInt(dup, BUFFER_POSITION, position); - UNSAFE.putInt(dup, BUFFER_LIMIT, limit); - UNSAFE.putInt(dup, BUFFER_CAPACITY, capacity); - UNSAFE.putObject(dup, BUFFER_CONTAINER, container); - - return dup; - } - - // -- Bulk get operations -- - - /** - * Relative bulk put method  (optional operation). - * - *

    This method transfers the elements remaining in the specified source buffer into this buffer. If there are more elements remaining in the source - * buffer than in this buffer, that is, if {@code src.remaining()} {@code >} {@code remaining()}, then no elements are transferred and a - * {@link BufferOverflowException} is thrown. - * - *

    Otherwise, this method copies n = {@code src.remaining()} elements from the specified buffer into this buffer, starting at each - * buffer's current position. The positions of both buffers are then incremented by n.

    - * - *

    In other words, an invocation of this method of the form {@code dst.put(src)} has exactly the same effect as the loop

    - * - *
    -     *     while (src.hasRemaining())
    -     *         dst.put(src.get()); 
    - * - *

    except that it first checks that there is sufficient space in this buffer and it is potentially much more efficient.

    - * - * @param src the source buffer from which elements are to be read; must not be this buffer - * - * @return This buffer - * - * @throws BufferOverflowException If there is insufficient space in this buffer for the remaining elements in the source buffer - * @throws IllegalArgumentException If the source buffer is this buffer - * @throws ReadOnlyBufferException If this buffer is read-only - */ - public SELF put(SELF src) { - if (src == this) { - throw new IllegalArgumentException(); - } - int n = src.remaining(); - if (remaining() < n) { - throw new BufferOverflowException(); - } - - memCopy(src.address(), this.address(), Integer.toUnsignedLong(n) * sizeof()); - position += n; - - return self(); - } - - /** - * Compacts this buffer  (optional operation). - * - *

    The elements between the buffer's current position and its limit, if any, are copied to the beginning of the buffer. That is, the element at index - * p = {@code position()} is copied to index zero, the element at index p + 1 is copied to index one, and so forth until - * the element at index {@code limit()} - 1 is copied to index n = {@code limit()} - {@code 1} -  - * p. - * The buffer's position is then set to n+1 and its limit is set to its capacity. The mark, if defined, is discarded. - * - *

    The buffer's position is set to the number of elements copied, rather than to zero, so that an invocation of this method can be followed - * immediately by an invocation of another relative put method.

    - * - * @return This buffer - * - * @throws ReadOnlyBufferException If this buffer is read-only - */ - public SELF compact() { - memCopy(address(), address, Integer.toUnsignedLong(remaining()) * sizeof()); - position(remaining()); - limit(capacity()); - mark = -1; - - return self(); - } - - /** - * Returns a string summarizing the state of this buffer. - * - * @return A summary string - */ - public String toString() { - return getClass().getName() + "[pos=" + position() + " lim=" + limit() + " cap=" + capacity() + "]"; - } - - // ----------------------------- - - protected abstract SELF self(); - - protected final int nextGetIndex() { - if (position < limit) { - return position++; - } - throw new BufferUnderflowException(); - } - - protected final int nextPutIndex() { - if (position < limit) { - return position++; - } - throw new BufferOverflowException(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/FunctionProvider.java b/LWJGL/src/main/java/org/lwjgl/system/FunctionProvider.java deleted file mode 100644 index 51483ad7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/FunctionProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import java.nio.*; - -import static org.lwjgl.system.MemoryStack.*; - -/** A provider of native function addresses. */ -@FunctionalInterface -public interface FunctionProvider { - - /** {@link CharSequence} version of {@link #getFunctionAddress(ByteBuffer)}. */ - default long getFunctionAddress(CharSequence functionName) { - try (MemoryStack stack = stackPush()) { - return getFunctionAddress(stack.ASCII(functionName)); - } - } - - /** - * Returns the function address of the specified function. If the function is not supported, returns 0L. - * - * @param functionName the encoded name of the function to query - * - * @return the function address or 0L if the function is not supported - */ - long getFunctionAddress(ByteBuffer functionName); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/FunctionProviderLocal.java b/LWJGL/src/main/java/org/lwjgl/system/FunctionProviderLocal.java deleted file mode 100644 index 4242c4a9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/FunctionProviderLocal.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import java.nio.*; - -import static org.lwjgl.system.MemoryStack.*; - -/** A platform/device/context specific provider of native function addresses. */ -public interface FunctionProviderLocal extends FunctionProvider { - - /** {@link CharSequence} version of {@link #getFunctionAddress(long, ByteBuffer)}. */ - default long getFunctionAddress(long handle, CharSequence functionName) { - try (MemoryStack stack = stackPush()) { - return getFunctionAddress(handle, stack.ASCII(functionName)); - } - } - - /** - * Returns the function address of the specified function for the specified {@code handle}. If the function is not supported, returns 0L. - * - * @param handle the handle to a platform/device/context - * @param functionName the encoded name of the function to query - * - * @return the function address or 0L if the function is not supported - */ - long getFunctionAddress(long handle, ByteBuffer functionName); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/JNI.java b/LWJGL/src/main/java/org/lwjgl/system/JNI.java deleted file mode 100644 index 06122bab..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/JNI.java +++ /dev/null @@ -1,1088 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system; - -import javax.annotation.*; - -/** - * This class contains native methods that can be used to call dynamically loaded functions. It is used internally by the LWJGL bindings, but can also - * be used to call other dynamically loaded functions. Not all possible signatures are available, only those needed by the LWJGL bindings. To call a - * function that does not have a matching JNI method, {@link org.lwjgl.system.libffi.LibFFI LibFFI} can used. - * - *

    All JNI methods in this class take an extra parameter, called {@code __functionAddress}. This must be a valid pointer to a native function with a - * matching signature. Due to overloading, method names are partially mangled:

    - * - *
      - *
    • {@code call} or {@code invoke} - * - *

      Methods with the {@code invoke} prefix will invoke the native function with the default calling convention. Methods with the {@code call} - * prefix will invoke the native function with the {@code __stdcall} calling convention on Windows and the default calling convention on other - * systems.

    • - *
    • a {@code U} (unsigned) or a {@code B} (signed) for each {@code byte} parameter
    • - *
    • a {@code C} (unsigned) or an {@code S} (signed) for each {@code short} parameter
    • - *
    • a {@code J}, a {@code N} or a {@code P} for each {@code long} parameter - * - *

      {@code J} parameters represent 64-bit integer values. {@code N} parameters represent C long values, which may be 32-bit or 64-bit integers - * depending on the platform. {@code P} parameters represent pointer addresses, which maybe 32-bit or 64-bit values depending on the JVM.

    • - *
    • the return value JNI type signature
    • - *
    - */ -public final class JNI { - - static { - Library.initialize(); - } - - private JNI() {} - - // Pointer API - - public static native short invokePC(long param0, long __functionAddress); - public static native double invokeD(long __functionAddress); - public static native double invokeD(int param0, long __functionAddress); - public static native double invokePD(long param0, int param1, long __functionAddress); - public static native double invokePD(long param0, int param1, int param2, long __functionAddress); - public static native float invokeF(int param0, long __functionAddress); - public static native float invokePF(long param0, long __functionAddress); - public static native float invokePF(long param0, int param1, long __functionAddress); - public static native float invokePF(long param0, int param1, int param2, long __functionAddress); - public static native int invokeI(long __functionAddress); - public static native int invokeI(int param0, long __functionAddress); - public static native int invokeI(int param0, int param1, long __functionAddress); - public static native int invokeI(int param0, int param1, int param2, long __functionAddress); - public static native int invokePI(long param0, long __functionAddress); - public static native int invokePI(int param0, long param1, long __functionAddress); - public static native int invokePI(long param0, int param1, long __functionAddress); - public static native int invokePI(long param0, int param1, int param2, long __functionAddress); - public static native int invokePI(long param0, int param1, boolean param2, long __functionAddress); - public static native int invokePI(long param0, int param1, int param2, int param3, long __functionAddress); - public static native int invokePNI(long param0, long param1, long __functionAddress); - public static native int invokePPI(long param0, long param1, long __functionAddress); - public static native int invokePNI(long param0, int param1, long param2, long __functionAddress); - public static native int invokePNI(long param0, long param1, int param2, long __functionAddress); - public static native int invokePPI(int param0, long param1, long param2, long __functionAddress); - public static native int invokePPI(long param0, int param1, long param2, long __functionAddress); - public static native int invokePPI(long param0, long param1, int param2, long __functionAddress); - public static native int invokePPI(long param0, long param1, boolean param2, long __functionAddress); - public static native int invokePPI(long param0, boolean param1, long param2, long __functionAddress); - public static native int invokePPI(long param0, int param1, int param2, long param3, long __functionAddress); - public static native int invokePPI(long param0, int param1, long param2, int param3, long __functionAddress); - public static native int invokePPI(long param0, int param1, long param2, boolean param3, long __functionAddress); - public static native int invokePPI(long param0, int param1, boolean param2, long param3, long __functionAddress); - public static native int invokePPI(long param0, long param1, int param2, int param3, long __functionAddress); - public static native int invokePPI(long param0, long param1, boolean param2, boolean param3, long __functionAddress); - public static native int invokePPI(long param0, int param1, int param2, int param3, long param4, long __functionAddress); - public static native int invokePPI(long param0, int param1, long param2, int param3, int param4, long __functionAddress); - public static native int invokePPI(long param0, int param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native int invokePCPI(long param0, short param1, long param2, long __functionAddress); - public static native int invokePNNI(long param0, long param1, long param2, long __functionAddress); - public static native int invokePNPI(long param0, long param1, long param2, long __functionAddress); - public static native int invokePPNI(long param0, long param1, long param2, long __functionAddress); - public static native int invokePPPI(long param0, long param1, long param2, long __functionAddress); - public static native int invokePNPI(long param0, long param1, int param2, long param3, long __functionAddress); - public static native int invokePNPI(long param0, long param1, long param2, int param3, long __functionAddress); - public static native int invokePPNI(long param0, int param1, long param2, long param3, long __functionAddress); - public static native int invokePPPI(long param0, int param1, long param2, long param3, long __functionAddress); - public static native int invokePPPI(long param0, long param1, int param2, long param3, long __functionAddress); - public static native int invokePPPI(long param0, long param1, long param2, int param3, long __functionAddress); - public static native int invokePNNI(long param0, long param1, long param2, int param3, int param4, long __functionAddress); - public static native int invokePPPI(long param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native int invokePPPI(long param0, int param1, long param2, int param3, long param4, long __functionAddress); - public static native int invokePPPI(long param0, int param1, long param2, long param3, int param4, long __functionAddress); - public static native int invokePPPI(long param0, long param1, int param2, int param3, long param4, long __functionAddress); - public static native int invokePPPI(long param0, long param1, int param2, long param3, int param4, long __functionAddress); - public static native int invokePPPI(long param0, long param1, long param2, int param3, int param4, long __functionAddress); - public static native int invokePPPI(long param0, int param1, int param2, int param3, long param4, long param5, long __functionAddress); - public static native int invokePPPI(long param0, int param1, long param2, int param3, long param4, int param5, long __functionAddress); - public static native int invokePPPI(long param0, int param1, int param2, int param3, int param4, long param5, long param6, long __functionAddress); - public static native int invokePPPI(long param0, int param1, int param2, long param3, int param4, long param5, int param6, int param7, long __functionAddress); - public static native int invokePNPPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int invokePPNNI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int invokePPNPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int invokePPPNI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int invokePNNPI(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native int invokePPPNI(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native int invokePPPPI(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, long param2, int param3, long param4, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, long param2, long param3, int param4, long __functionAddress); - public static native int invokePPPPI(long param0, int param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, int param2, int param3, long param4, long param5, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, int param2, long param3, int param4, long param5, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, int param2, long param3, long param4, int param5, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, long param2, long param3, int param4, int param5, long __functionAddress); - public static native int invokePPPPI(long param0, int param1, int param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native int invokePPPPI(long param0, int param1, int param2, long param3, int param4, long param5, long param6, int param7, int param8, long __functionAddress); - public static native int invokePNNPPI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int invokePPNNPI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int invokePPPNNI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int invokePPPPNI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int invokePPPPPI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int invokePJPPNI(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPNPPI(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPNPPI(long param0, long param1, long param2, int param3, long param4, long param5, long __functionAddress); - public static native int invokePPPNJI(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPPNNI(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPPNPI(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPPPNI(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPPPNI(long param0, long param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPPPPI(long param0, long param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPPPPI(long param0, long param1, long param2, int param3, long param4, long param5, long __functionAddress); - public static native int invokePPPPPI(long param0, long param1, long param2, long param3, long param4, int param5, long __functionAddress); - public static native int invokePNPPPI(long param0, int param1, int param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native int invokePPPPPI(long param0, long param1, int param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native int invokePPPPPI(long param0, long param1, int param2, long param3, int param4, long param5, int param6, long param7, long __functionAddress); - public static native int invokePPPPPI(long param0, long param1, long param2, int param3, int param4, int param5, float param6, long param7, long param8, long __functionAddress); - public static native int invokePPPPPPI(long param0, long param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int invokePPNPPPI(long param0, int param1, long param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native int invokePPPPPPI(long param0, int param1, long param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native int invokePNNPPPI(long param0, long param1, long param2, int param3, int param4, long param5, long param6, long param7, long __functionAddress); - public static native int invokePPPPPPI(long param0, int param1, int param2, long param3, long param4, long param5, long param6, long param7, long __functionAddress); - public static native int invokePPPPPPPI(long param0, long param1, long param2, int param3, long param4, float param5, float param6, long param7, long param8, long param9, long __functionAddress); - public static native long invokeJ(long __functionAddress); - public static native long invokePJ(long param0, long __functionAddress); - public static native long invokePJ(long param0, int param1, long __functionAddress); - public static native long invokeNN(long param0, long __functionAddress); - public static native long invokePN(long param0, long __functionAddress); - public static native long invokePN(long param0, int param1, long __functionAddress); - public static native long invokeNNN(long param0, long param1, long __functionAddress); - public static native long invokePPN(long param0, long param1, long __functionAddress); - public static native long invokeNNNN(long param0, long param1, long param2, long __functionAddress); - public static native long invokePNPN(long param0, long param1, long param2, long __functionAddress); - public static native long invokePNPN(long param0, long param1, long param2, int param3, long __functionAddress); - public static native long invokePPNN(long param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native long invokePNPNN(long param0, long param1, long param2, long param3, long __functionAddress); - public static native long invokePNPNPN(long param0, long param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, long param9, long param10, long param11, long __functionAddress); - public static native long invokeP(long __functionAddress); - public static native long invokeP(int param0, long __functionAddress); - public static native long invokeP(int param0, int param1, long __functionAddress); - public static native long invokePP(long param0, long __functionAddress); - public static native long invokePP(int param0, long param1, long __functionAddress); - public static native long invokePP(long param0, int param1, long __functionAddress); - public static native long invokePP(int param0, int param1, long param2, long __functionAddress); - public static native long invokePP(long param0, int param1, int param2, long __functionAddress); - public static native long invokePP(long param0, int param1, int param2, int param3, long __functionAddress); - public static native long invokePP(long param0, int param1, int param2, int param3, int param4, int param5, long __functionAddress); - public static native long invokePNP(long param0, long param1, long __functionAddress); - public static native long invokePPP(long param0, long param1, long __functionAddress); - public static native long invokePCP(long param0, short param1, boolean param2, long __functionAddress); - public static native long invokePPP(long param0, int param1, long param2, long __functionAddress); - public static native long invokePPP(long param0, long param1, int param2, long __functionAddress); - public static native long invokePPP(long param0, int param1, long param2, int param3, long __functionAddress); - public static native long invokePPP(long param0, long param1, boolean param2, boolean param3, long __functionAddress); - public static native long invokePPP(long param0, boolean param1, boolean param2, long param3, long __functionAddress); - public static native long invokePPPP(long param0, long param1, long param2, long __functionAddress); - public static native long invokePPPP(long param0, int param1, long param2, long param3, long __functionAddress); - public static native long invokePPPP(long param0, long param1, long param2, int param3, long __functionAddress); - public static native long invokePPPP(int param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native long invokePPPP(long param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native long invokePPPP(long param0, long param1, long param2, int param3, int param4, long __functionAddress); - public static native long invokeJPPP(int param0, int param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native long invokePNNPP(long param0, long param1, long param2, long param3, long __functionAddress); - public static native long invokePPNNP(long param0, long param1, long param2, long param3, long __functionAddress); - public static native long invokePPPPP(long param0, long param1, long param2, long param3, long __functionAddress); - public static native long invokePPPPP(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native long invokePPPPP(long param0, long param1, long param2, int param3, long param4, long __functionAddress); - public static native long invokePJPPP(long param0, int param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native long invokePNNNPP(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native long invokePPPPNP(long param0, long param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native long invokePPPPPP(long param0, long param1, long param2, int param3, long param4, int param5, long param6, long __functionAddress); - public static native long invokePPPPPPP(long param0, long param1, long param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native long invokePPPPPPP(long param0, long param1, long param2, long param3, long param4, long param5, int param6, long __functionAddress); - public static native byte invokeU(int param0, long __functionAddress); - public static native void invokeV(long __functionAddress); - public static native void invokeV(double param0, long __functionAddress); - public static native void invokeV(float param0, long __functionAddress); - public static native void invokeV(int param0, long __functionAddress); - public static native void invokeV(int param0, float param1, long __functionAddress); - public static native void invokeV(int param0, int param1, long __functionAddress); - public static native void invokeV(int param0, int param1, double param2, long __functionAddress); - public static native void invokeV(int param0, int param1, float param2, long __functionAddress); - public static native void invokeV(int param0, int param1, int param2, long __functionAddress); - public static native void invokeV(int param0, float param1, float param2, float param3, long __functionAddress); - public static native void invokeV(int param0, int param1, int param2, int param3, long __functionAddress); - public static native void invokeV(int param0, int param1, double param2, double param3, double param4, long __functionAddress); - public static native void invokeV(int param0, int param1, float param2, float param3, float param4, long __functionAddress); - public static native void invokeV(int param0, int param1, int param2, int param3, int param4, long __functionAddress); - public static native void invokePV(long param0, long __functionAddress); - public static native void invokeJV(int param0, long param1, long __functionAddress); - public static native void invokePV(int param0, long param1, long __functionAddress); - public static native void invokePV(long param0, float param1, long __functionAddress); - public static native void invokePV(long param0, int param1, long __functionAddress); - public static native void invokePV(long param0, boolean param1, long __functionAddress); - public static native void invokeJV(int param0, int param1, long param2, long __functionAddress); - public static native void invokePV(int param0, int param1, long param2, long __functionAddress); - public static native void invokePV(int param0, long param1, boolean param2, long __functionAddress); - public static native void invokePV(long param0, double param1, double param2, long __functionAddress); - public static native void invokePV(long param0, float param1, float param2, long __functionAddress); - public static native void invokePV(long param0, int param1, double param2, long __functionAddress); - public static native void invokePV(long param0, int param1, float param2, long __functionAddress); - public static native void invokePV(long param0, int param1, int param2, long __functionAddress); - public static native void invokePV(long param0, float param1, float param2, int param3, long __functionAddress); - public static native void invokePV(long param0, int param1, int param2, double param3, long __functionAddress); - public static native void invokePV(long param0, int param1, int param2, float param3, long __functionAddress); - public static native void invokePV(long param0, int param1, int param2, int param3, long __functionAddress); - public static native void invokePV(int param0, int param1, long param2, int param3, int param4, long __functionAddress); - public static native void invokePV(long param0, int param1, int param2, int param3, int param4, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, int param5, long param6, long __functionAddress); - public static native void invokePJV(long param0, long param1, long __functionAddress); - public static native void invokePNV(long param0, long param1, long __functionAddress); - public static native void invokePPV(long param0, long param1, long __functionAddress); - public static native void invokePJV(int param0, long param1, long param2, long __functionAddress); - public static native void invokePJV(long param0, int param1, long param2, long __functionAddress); - public static native void invokePPV(long param0, int param1, long param2, long __functionAddress); - public static native void invokePPV(long param0, long param1, int param2, long __functionAddress); - public static native void invokePPV(long param0, long param1, boolean param2, long __functionAddress); - public static native void invokePBV(long param0, int param1, int param2, byte param3, long __functionAddress); - public static native void invokePCV(long param0, int param1, int param2, short param3, long __functionAddress); - public static native void invokePPV(int param0, int param1, long param2, long param3, long __functionAddress); - public static native void invokePPV(long param0, int param1, int param2, long param3, long __functionAddress); - public static native void invokePPV(long param0, int param1, long param2, int param3, long __functionAddress); - public static native void invokePPV(long param0, long param1, int param2, int param3, long __functionAddress); - public static native void invokePSV(long param0, int param1, int param2, short param3, long __functionAddress); - public static native void invokePUV(long param0, int param1, int param2, byte param3, long __functionAddress); - public static native void invokePPV(int param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native void invokePPV(long param0, int param1, int param2, int param3, long param4, long __functionAddress); - public static native void invokePPV(long param0, long param1, int param2, int param3, int param4, long __functionAddress); - public static native void invokePPV(int param0, int param1, int param2, int param3, long param4, long param5, long __functionAddress); - public static native void invokePPV(long param0, int param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native void invokePPV(long param0, long param1, float param2, float param3, float param4, float param5, long __functionAddress); - public static native void invokePPV(long param0, long param1, int param2, int param3, int param4, int param5, int param6, long __functionAddress); - public static native void invokePPV(long param0, long param1, float param2, float param3, float param4, float param5, float param6, float param7, long __functionAddress); - public static native void invokePNNV(long param0, long param1, long param2, long __functionAddress); - public static native void invokePNPV(long param0, long param1, long param2, long __functionAddress); - public static native void invokePPNV(long param0, long param1, long param2, long __functionAddress); - public static native void invokePPPV(long param0, long param1, long param2, long __functionAddress); - public static native void invokePPPV(int param0, long param1, long param2, long param3, long __functionAddress); - public static native void invokePPPV(long param0, int param1, long param2, long param3, long __functionAddress); - public static native void invokePPPV(long param0, long param1, int param2, long param3, long __functionAddress); - public static native void invokePPPV(long param0, long param1, long param2, int param3, long __functionAddress); - public static native void invokeJJJV(int param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native void invokePNNV(long param0, long param1, int param2, int param3, long param4, long __functionAddress); - public static native void invokePPPV(int param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native void invokePPPV(long param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native void invokePPPV(long param0, long param1, int param2, int param3, long param4, long __functionAddress); - public static native void invokePPPV(long param0, long param1, int param2, long param3, int param4, long __functionAddress); - public static native void invokePPPV(long param0, long param1, long param2, float param3, float param4, long __functionAddress); - public static native void invokePPPV(long param0, long param1, long param2, boolean param3, boolean param4, long __functionAddress); - public static native void invokePPPV(long param0, int param1, int param2, int param3, long param4, long param5, long __functionAddress); - public static native void invokePPPV(long param0, int param1, long param2, int param3, long param4, int param5, long __functionAddress); - public static native void invokePPPV(long param0, int param1, long param2, long param3, int param4, int param5, long __functionAddress); - public static native void invokePPPV(long param0, long param1, long param2, int param3, boolean param4, boolean param5, long __functionAddress); - public static native void invokePPPV(long param0, int param1, int param2, long param3, int param4, long param5, int param6, long __functionAddress); - public static native void invokePPPV(long param0, long param1, float param2, float param3, float param4, float param5, long param6, long __functionAddress); - public static native void invokePPPV(long param0, long param1, long param2, float param3, float param4, float param5, float param6, long __functionAddress); - public static native void invokePPPV(long param0, long param1, float param2, float param3, float param4, float param5, float param6, float param7, long param8, long __functionAddress); - public static native void invokePPPV(long param0, long param1, long param2, float param3, float param4, float param5, float param6, float param7, float param8, long __functionAddress); - public static native void invokePNPPV(long param0, long param1, long param2, long param3, long __functionAddress); - public static native void invokePPPPV(long param0, long param1, long param2, long param3, long __functionAddress); - public static native void invokePPPPV(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native void invokePPPPV(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native void invokePPPPV(long param0, long param1, long param2, int param3, long param4, long __functionAddress); - public static native void invokePPPPV(long param0, long param1, long param2, float param3, float param4, long param5, long __functionAddress); - public static native void invokePPPPV(long param0, long param1, long param2, float param3, float param4, float param5, float param6, long param7, long __functionAddress); - public static native void invokePPPPV(long param0, long param1, long param2, int param3, int param4, int param5, float param6, long param7, long __functionAddress); - public static native void invokePPPPV(long param0, long param1, long param2, float param3, float param4, float param5, float param6, float param7, float param8, long param9, long __functionAddress); - public static native void invokePPPPPV(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native void invokePPPPPV(int param0, long param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native void invokePPPPPV(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native void invokePPPPPV(long param0, long param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native void invokePPPPPV(long param0, int param1, int param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native void invokePPPPPV(long param0, long param1, int param2, long param3, int param4, long param5, int param6, long param7, long __functionAddress); - public static native void invokePPPPPV(long param0, long param1, int param2, long param3, long param4, int param5, int param6, long param7, long __functionAddress); - public static native boolean invokeZ(int param0, long __functionAddress); - public static native boolean invokePZ(long param0, long __functionAddress); - public static native boolean invokePZ(long param0, int param1, long __functionAddress); - public static native boolean invokePZ(long param0, boolean param1, long __functionAddress); - public static native boolean invokePZ(long param0, int param1, int param2, long __functionAddress); - public static native boolean invokePZ(long param0, int param1, int param2, int param3, long __functionAddress); - public static native boolean invokePPZ(long param0, long param1, long __functionAddress); - public static native boolean invokePPZ(long param0, int param1, long param2, long __functionAddress); - public static native boolean invokePPZ(long param0, int param1, int param2, long param3, long __functionAddress); - public static native boolean invokePPPZ(long param0, long param1, long param2, long __functionAddress); - public static native boolean invokePPPZ(long param0, long param1, long param2, int param3, long __functionAddress); - public static native boolean invokePPPZ(long param0, long param1, long param2, boolean param3, int param4, long __functionAddress); - public static native boolean invokePPPPZ(long param0, long param1, long param2, long param3, long __functionAddress); - public static native boolean invokePPPPZ(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native boolean invokePPPUPZ(long param0, long param1, long param2, byte param3, long param4, long __functionAddress); - public static native boolean invokePPPPPZ(long param0, long param1, long param2, long param3, long param4, int param5, long __functionAddress); - public static native boolean invokePPPPPZ(long param0, long param1, long param2, long param3, long param4, boolean param5, int param6, long __functionAddress); - public static native short callC(int param0, long __functionAddress); - public static native float callF(int param0, int param1, int param2, long __functionAddress); - public static native float callPF(long param0, float param1, long __functionAddress); - public static native int callI(long __functionAddress); - public static native int callI(int param0, long __functionAddress); - public static native int callI(int param0, int param1, long __functionAddress); - public static native int callI(int param0, int param1, int param2, long __functionAddress); - public static native int callPI(long param0, long __functionAddress); - public static native int callPI(int param0, long param1, long __functionAddress); - public static native int callPI(long param0, float param1, long __functionAddress); - public static native int callPI(long param0, int param1, long __functionAddress); - public static native int callPI(int param0, int param1, long param2, long __functionAddress); - public static native int callPI(int param0, long param1, int param2, long __functionAddress); - public static native int callPI(long param0, float param1, float param2, long __functionAddress); - public static native int callPI(long param0, float param1, int param2, long __functionAddress); - public static native int callPI(long param0, int param1, float param2, long __functionAddress); - public static native int callPI(long param0, int param1, int param2, long __functionAddress); - public static native int callJI(int param0, long param1, int param2, int param3, long __functionAddress); - public static native int callPI(int param0, int param1, int param2, long param3, long __functionAddress); - public static native int callPI(long param0, float param1, float param2, float param3, long __functionAddress); - public static native int callPI(long param0, int param1, float param2, float param3, long __functionAddress); - public static native int callPI(long param0, int param1, int param2, int param3, long __functionAddress); - public static native int callPI(long param0, int param1, int param2, boolean param3, long __functionAddress); - public static native int callPI(int param0, int param1, int param2, int param3, long param4, long __functionAddress); - public static native int callPI(long param0, int param1, float param2, float param3, int param4, long __functionAddress); - public static native int callPI(long param0, int param1, int param2, int param3, int param4, long __functionAddress); - public static native int callPI(int param0, int param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native int callPI(int param0, long param1, int param2, int param3, float param4, int param5, long __functionAddress); - public static native int callPI(long param0, int param1, int param2, int param3, int param4, int param5, long __functionAddress); - public static native int callPI(long param0, int param1, int param2, int param3, int param4, int param5, int param6, long __functionAddress); - public static native int callPI(int param0, int param1, long param2, int param3, int param4, int param5, int param6, float param7, long __functionAddress); - public static native int callPI(long param0, float param1, float param2, float param3, float param4, float param5, float param6, float param7, float param8, long __functionAddress); - public static native int callPJI(long param0, long param1, long __functionAddress); - public static native int callPPI(long param0, long param1, long __functionAddress); - public static native int callPJI(long param0, int param1, long param2, long __functionAddress); - public static native int callPJI(long param0, long param1, float param2, long __functionAddress); - public static native int callPJI(long param0, long param1, int param2, long __functionAddress); - public static native int callPPI(int param0, long param1, long param2, long __functionAddress); - public static native int callPPI(long param0, float param1, long param2, long __functionAddress); - public static native int callPPI(long param0, int param1, long param2, long __functionAddress); - public static native int callPPI(long param0, long param1, float param2, long __functionAddress); - public static native int callPPI(long param0, long param1, int param2, long __functionAddress); - public static native int callPPI(int param0, int param1, long param2, long param3, long __functionAddress); - public static native int callPPI(long param0, int param1, float param2, long param3, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, long param3, long __functionAddress); - public static native int callPPI(long param0, int param1, long param2, int param3, long __functionAddress); - public static native int callPPI(long param0, long param1, float param2, float param3, long __functionAddress); - public static native int callPPI(long param0, long param1, float param2, int param3, long __functionAddress); - public static native int callPPI(long param0, long param1, int param2, int param3, long __functionAddress); - public static native int callPPI(long param0, int param1, float param2, float param3, long param4, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, int param3, long param4, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, long param3, int param4, long __functionAddress); - public static native int callPPI(long param0, long param1, int param2, int param3, int param4, long __functionAddress); - public static native int callPPI(long param0, long param1, int param2, int param3, boolean param4, long __functionAddress); - public static native int callPPI(int param0, long param1, int param2, int param3, float param4, long param5, long __functionAddress); - public static native int callPPI(long param0, int param1, float param2, float param3, float param4, long param5, long __functionAddress); - public static native int callPPI(long param0, long param1, int param2, int param3, int param4, int param5, long __functionAddress); - public static native int callPPI(long param0, int param1, float param2, float param3, float param4, int param5, long param6, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, int param3, int param4, int param5, long param6, long __functionAddress); - public static native int callPPI(long param0, int param1, float param2, float param3, float param4, float param5, int param6, long param7, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, int param3, int param4, int param5, int param6, long param7, long __functionAddress); - public static native int callPPI(int param0, int param1, long param2, long param3, int param4, int param5, int param6, int param7, float param8, long __functionAddress); - public static native int callPPI(long param0, int param1, float param2, float param3, float param4, float param5, float param6, int param7, long param8, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, float param3, float param4, float param5, float param6, float param7, int param8, long param9, int param10, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, int param3, int param4, int param5, int param6, long param7, int param8, int param9, int param10, int param11, int param12, int param13, int param14, int param15, int param16, long __functionAddress); - public static native int callPJJI(long param0, long param1, long param2, long __functionAddress); - public static native int callPJPI(long param0, long param1, long param2, long __functionAddress); - public static native int callPPJI(long param0, long param1, long param2, long __functionAddress); - public static native int callPPPI(long param0, long param1, long param2, long __functionAddress); - public static native int callPJJI(long param0, long param1, long param2, float param3, long __functionAddress); - public static native int callPJJI(long param0, long param1, long param2, int param3, long __functionAddress); - public static native int callPJPI(long param0, int param1, long param2, long param3, long __functionAddress); - public static native int callPJPI(long param0, long param1, int param2, long param3, long __functionAddress); - public static native int callPPJI(long param0, int param1, long param2, long param3, long __functionAddress); - public static native int callPPJI(long param0, long param1, int param2, long param3, long __functionAddress); - public static native int callPPNI(long param0, int param1, long param2, long param3, long __functionAddress); - public static native int callPPPI(long param0, int param1, long param2, long param3, long __functionAddress); - public static native int callPPPI(long param0, long param1, int param2, long param3, long __functionAddress); - public static native int callPPPI(long param0, long param1, long param2, int param3, long __functionAddress); - public static native int callPJJI(long param0, long param1, int param2, long param3, int param4, long __functionAddress); - public static native int callPJPI(long param0, int param1, long param2, long param3, int param4, long __functionAddress); - public static native int callPPJI(long param0, int param1, long param2, int param3, long param4, long __functionAddress); - public static native int callPPPI(int param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native int callPPPI(long param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native int callPPPI(long param0, int param1, long param2, long param3, int param4, long __functionAddress); - public static native int callPPPI(long param0, long param1, int param2, long param3, int param4, long __functionAddress); - public static native int callPPPI(long param0, long param1, long param2, int param3, int param4, long __functionAddress); - public static native int callPPPI(long param0, int param1, int param2, int param3, long param4, long param5, long __functionAddress); - public static native int callPPPI(long param0, int param1, int param2, long param3, int param4, long param5, long __functionAddress); - public static native int callPPPI(long param0, int param1, long param2, long param3, int param4, int param5, long __functionAddress); - public static native int callPPPI(long param0, long param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native int callPPPI(long param0, long param1, long param2, int param3, int param4, int param5, long __functionAddress); - public static native int callPPPI(long param0, float param1, float param2, int param3, int param4, long param5, long param6, long __functionAddress); - public static native int callPPPI(long param0, int param1, int param2, int param3, int param4, long param5, long param6, long __functionAddress); - public static native int callPPPI(long param0, int param1, long param2, long param3, int param4, int param5, int param6, long __functionAddress); - public static native int callPPPI(long param0, long param1, int param2, int param3, int param4, int param5, long param6, long __functionAddress); - public static native int callJPPI(int param0, int param1, int param2, int param3, int param4, long param5, long param6, long param7, long __functionAddress); - public static native int callJJPPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int callPJJJI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int callPJJPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int callPJPPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int callPPJPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int callPPNPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int callPPPPI(long param0, long param1, long param2, long param3, long __functionAddress); - public static native int callPJJJI(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native int callPJPPI(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native int callPPPPI(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native int callPPPPI(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native int callPPPPI(long param0, long param1, long param2, int param3, long param4, long __functionAddress); - public static native int callPPPPI(long param0, long param1, long param2, long param3, int param4, long __functionAddress); - public static native int callPJPPI(long param0, long param1, int param2, int param3, long param4, long param5, long __functionAddress); - public static native int callPPPPI(long param0, int param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native int callPPPPI(long param0, int param1, long param2, long param3, int param4, long param5, long __functionAddress); - public static native int callPPPPI(long param0, int param1, long param2, long param3, long param4, int param5, long __functionAddress); - public static native int callPPPPI(long param0, long param1, int param2, long param3, int param4, long param5, long __functionAddress); - public static native int callPPPPI(long param0, long param1, long param2, int param3, int param4, long param5, long __functionAddress); - public static native int callPPPPI(long param0, long param1, long param2, int param3, long param4, int param5, long __functionAddress); - public static native int callPPPPI(long param0, int param1, int param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native int callPPPPI(int param0, long param1, long param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, int param11, int param12, int param13, int param14, int param15, int param16, int param17, int param18, int param19, int param20, long param21, long param22, long __functionAddress); - public static native int callPJJPPI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int callPJPPPI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int callPPJPPI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int callPPPPPI(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native int callPJJJPI(long param0, long param1, long param2, long param3, int param4, long param5, long __functionAddress); - public static native int callPJPPPI(long param0, long param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native int callPPPPPI(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int callPPPPPI(long param0, long param1, long param2, int param3, long param4, long param5, long __functionAddress); - public static native int callPPPPPI(long param0, long param1, long param2, long param3, int param4, long param5, long __functionAddress); - public static native int callPPPPPI(int param0, int param1, long param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native int callPPPPPI(long param0, int param1, int param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native int callPPPPPI(long param0, int param1, long param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native int callPPPPPI(long param0, int param1, long param2, long param3, int param4, long param5, long param6, long __functionAddress); - public static native int callJPPPPI(int param0, int param1, long param2, long param3, int param4, long param5, long param6, long param7, long __functionAddress); - public static native int callPJPPJI(long param0, long param1, int param2, int param3, long param4, long param5, long param6, int param7, long __functionAddress); - public static native int callPJJJJPI(long param0, long param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int callPPPPJPI(long param0, long param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int callPPPPPPI(long param0, long param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native int callPJJPPPI(long param0, long param1, long param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native int callPJPPPPI(long param0, int param1, long param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native int callPPPPPPI(int param0, int param1, long param2, long param3, long param4, long param5, long param6, long param7, long __functionAddress); - public static native int callPPPPPPI(long param0, int param1, long param2, int param3, long param4, long param5, long param6, long param7, long __functionAddress); - public static native int callPPPPPPPI(long param0, long param1, long param2, long param3, long param4, long param5, long param6, int param7, long __functionAddress); - public static native int callPPPPPPPI(long param0, int param1, long param2, int param3, long param4, long param5, long param6, long param7, long param8, long __functionAddress); - public static native int callPPPPPJPPI(long param0, long param1, long param2, long param3, long param4, long param5, long param6, long param7, long __functionAddress); - public static native int callPPPPPPPPI(long param0, int param1, int param2, long param3, long param4, long param5, long param6, int param7, long param8, long param9, long param10, long __functionAddress); - public static native long callJ(long __functionAddress); - public static native long callJ(int param0, long __functionAddress); - public static native long callJ(int param0, int param1, long __functionAddress); - public static native long callJ(int param0, int param1, boolean param2, int param3, int param4, long __functionAddress); - public static native long callPPJ(long param0, long param1, long __functionAddress); - public static native long callPJJ(long param0, long param1, int param2, int param3, long __functionAddress); - public static native long callPN(long param0, long __functionAddress); - public static native long callP(long __functionAddress); - public static native long callP(int param0, long __functionAddress); - public static native long callP(int param0, int param1, long __functionAddress); - public static native long callP(int param0, float param1, float param2, float param3, long __functionAddress); - public static native long callPP(long param0, long __functionAddress); - public static native long callPP(int param0, long param1, long __functionAddress); - public static native long callPP(long param0, int param1, long __functionAddress); - public static native long callPP(int param0, int param1, long param2, long __functionAddress); - public static native long callPP(int param0, long param1, int param2, long __functionAddress); - public static native long callPP(long param0, int param1, int param2, long __functionAddress); - public static native long callPP(int param0, int param1, long param2, int param3, long __functionAddress); - public static native long callPNP(long param0, long param1, long __functionAddress); - public static native long callPPP(long param0, long param1, long __functionAddress); - public static native long callPPP(int param0, long param1, long param2, long __functionAddress); - public static native long callPPP(long param0, int param1, long param2, long __functionAddress); - public static native long callPPP(long param0, long param1, int param2, long __functionAddress); - public static native long callPPP(int param0, long param1, long param2, int param3, long __functionAddress); - public static native long callPPP(long param0, int param1, int param2, long param3, long __functionAddress); - public static native long callPPP(int param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native long callPPP(long param0, int param1, int param2, int param3, long param4, long __functionAddress); - public static native long callPPP(long param0, long param1, int param2, int param3, int param4, long __functionAddress); - public static native long callPPNP(long param0, long param1, long param2, long __functionAddress); - public static native long callPPPP(long param0, long param1, long param2, long __functionAddress); - public static native long callPPPP(long param0, int param1, long param2, long param3, long __functionAddress); - public static native long callPPPP(long param0, long param1, int param2, long param3, long __functionAddress); - public static native long callPPPP(long param0, long param1, long param2, int param3, long __functionAddress); - public static native long callPPPP(long param0, long param1, int param2, int param3, long param4, long __functionAddress); - public static native long callPPPP(long param0, long param1, int param2, long param3, int param4, long __functionAddress); - public static native long callPPNPP(long param0, long param1, long param2, long param3, long __functionAddress); - public static native long callPPPPP(long param0, long param1, long param2, long param3, long __functionAddress); - public static native long callPPPPP(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native long callPPPPP(long param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native long callPPPPP(long param0, long param1, long param2, int param3, long param4, long __functionAddress); - public static native long callPPPPP(long param0, long param1, long param2, long param3, int param4, long __functionAddress); - public static native long callPPPJPP(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native long callPPPPJPPP(long param0, long param1, long param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native long callPPPPPPPP(int param0, long param1, long param2, int param3, int param4, int param5, int param6, long param7, long param8, long param9, int param10, long param11, long param12, long __functionAddress); - public static native short callS(int param0, long __functionAddress); - public static native void callV(long __functionAddress); - public static native void callV(double param0, long __functionAddress); - public static native void callV(float param0, long __functionAddress); - public static native void callV(int param0, long __functionAddress); - public static native void callV(boolean param0, long __functionAddress); - public static native void callV(double param0, double param1, long __functionAddress); - public static native void callV(float param0, float param1, long __functionAddress); - public static native void callV(float param0, boolean param1, long __functionAddress); - public static native void callV(int param0, double param1, long __functionAddress); - public static native void callV(int param0, float param1, long __functionAddress); - public static native void callV(int param0, int param1, long __functionAddress); - public static native void callV(int param0, boolean param1, long __functionAddress); - public static native void callV(double param0, double param1, double param2, long __functionAddress); - public static native void callV(float param0, float param1, float param2, long __functionAddress); - public static native void callV(int param0, double param1, double param2, long __functionAddress); - public static native void callV(int param0, float param1, float param2, long __functionAddress); - public static native void callV(int param0, int param1, double param2, long __functionAddress); - public static native void callV(int param0, int param1, float param2, long __functionAddress); - public static native void callV(int param0, int param1, int param2, long __functionAddress); - public static native void callV(int param0, int param1, boolean param2, long __functionAddress); - public static native void callV(double param0, double param1, double param2, double param3, long __functionAddress); - public static native void callV(float param0, float param1, float param2, float param3, long __functionAddress); - public static native void callV(int param0, double param1, double param2, double param3, long __functionAddress); - public static native void callV(int param0, float param1, float param2, float param3, long __functionAddress); - public static native void callV(int param0, int param1, double param2, double param3, long __functionAddress); - public static native void callV(int param0, int param1, float param2, float param3, long __functionAddress); - public static native void callV(int param0, int param1, float param2, int param3, long __functionAddress); - public static native void callV(int param0, int param1, int param2, double param3, long __functionAddress); - public static native void callV(int param0, int param1, int param2, float param3, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, long __functionAddress); - public static native void callV(int param0, int param1, int param2, boolean param3, long __functionAddress); - public static native void callV(int param0, int param1, boolean param2, int param3, long __functionAddress); - public static native void callV(boolean param0, boolean param1, boolean param2, boolean param3, long __functionAddress); - public static native void callV(int param0, double param1, double param2, double param3, double param4, long __functionAddress); - public static native void callV(int param0, float param1, float param2, float param3, float param4, long __functionAddress); - public static native void callV(int param0, int param1, double param2, double param3, double param4, long __functionAddress); - public static native void callV(int param0, int param1, float param2, float param3, float param4, long __functionAddress); - public static native void callV(int param0, int param1, int param2, float param3, int param4, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, long __functionAddress); - public static native void callV(int param0, int param1, int param2, boolean param3, int param4, long __functionAddress); - public static native void callV(int param0, boolean param1, boolean param2, boolean param3, boolean param4, long __functionAddress); - public static native void callV(double param0, double param1, double param2, double param3, double param4, double param5, long __functionAddress); - public static native void callV(int param0, double param1, double param2, int param3, double param4, double param5, long __functionAddress); - public static native void callV(int param0, float param1, float param2, int param3, float param4, float param5, long __functionAddress); - public static native void callV(int param0, int param1, double param2, double param3, double param4, double param5, long __functionAddress); - public static native void callV(int param0, int param1, float param2, float param3, float param4, float param5, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, boolean param5, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, boolean param4, int param5, long __functionAddress); - public static native void callV(int param0, double param1, double param2, double param3, double param4, double param5, double param6, long __functionAddress); - public static native void callV(int param0, int param1, int param2, double param3, double param4, double param5, double param6, long __functionAddress); - public static native void callV(int param0, int param1, int param2, float param3, float param4, float param5, float param6, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, boolean param6, long __functionAddress); - public static native void callV(int param0, int param1, int param2, boolean param3, int param4, int param5, int param6, long __functionAddress); - public static native void callV(float param0, float param1, float param2, float param3, float param4, float param5, float param6, float param7, long __functionAddress); - public static native void callV(int param0, int param1, int param2, float param3, float param4, float param5, float param6, float param7, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, boolean param7, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, boolean param8, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, long __functionAddress); - public static native void callV(int param0, int param1, float param2, float param3, float param4, float param5, float param6, float param7, float param8, float param9, float param10, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, int param11, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, int param11, int param12, int param13, int param14, long __functionAddress); - public static native void callV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, int param11, int param12, int param13, int param14, int param15, int param16, long __functionAddress); - public static native void callJV(long param0, long __functionAddress); - public static native void callPV(long param0, long __functionAddress); - public static native void callSV(short param0, long __functionAddress); - public static native void callUV(byte param0, long __functionAddress); - public static native void callCV(int param0, short param1, long __functionAddress); - public static native void callJV(int param0, long param1, long __functionAddress); - public static native void callJV(long param0, int param1, long __functionAddress); - public static native void callPV(int param0, long param1, long __functionAddress); - public static native void callPV(long param0, float param1, long __functionAddress); - public static native void callPV(long param0, int param1, long __functionAddress); - public static native void callSV(int param0, short param1, long __functionAddress); - public static native void callJV(int param0, int param1, long param2, long __functionAddress); - public static native void callPV(int param0, int param1, long param2, long __functionAddress); - public static native void callPV(int param0, long param1, int param2, long __functionAddress); - public static native void callPV(long param0, float param1, float param2, long __functionAddress); - public static native void callPV(long param0, int param1, int param2, long __functionAddress); - public static native void callJV(int param0, long param1, int param2, int param3, long __functionAddress); - public static native void callNV(long param0, int param1, int param2, int param3, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, long param3, long __functionAddress); - public static native void callPV(int param0, int param1, long param2, int param3, long __functionAddress); - public static native void callPV(int param0, int param1, boolean param2, long param3, long __functionAddress); - public static native void callPV(int param0, long param1, int param2, int param3, long __functionAddress); - public static native void callPV(long param0, float param1, float param2, float param3, long __functionAddress); - public static native void callPV(long param0, int param1, int param2, int param3, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, long param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, long param3, int param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, long param3, boolean param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, boolean param3, long param4, long __functionAddress); - public static native void callPV(int param0, int param1, long param2, int param3, int param4, long __functionAddress); - public static native void callPV(int param0, long param1, int param2, int param3, int param4, long __functionAddress); - public static native void callPV(int param0, boolean param1, int param2, int param3, long param4, long __functionAddress); - public static native void callPV(long param0, int param1, int param2, int param3, int param4, long __functionAddress); - public static native void callJV(int param0, int param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPV(int param0, double param1, double param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPV(int param0, float param1, float param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, long param4, boolean param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, long param3, int param4, int param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, boolean param3, int param4, long param5, long __functionAddress); - public static native void callPV(int param0, int param1, long param2, int param3, int param4, int param5, long __functionAddress); - public static native void callPV(int param0, boolean param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPV(long param0, int param1, int param2, int param3, int param4, int param5, long __functionAddress); - public static native void callJV(int param0, int param1, int param2, int param3, int param4, int param5, long param6, long __functionAddress); - public static native void callPV(int param0, int param1, float param2, float param3, float param4, float param5, long param6, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, long param6, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, long param5, int param6, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, long param3, int param4, int param5, int param6, long __functionAddress); - public static native void callPV(int param0, int param1, long param2, int param3, int param4, int param5, int param6, long __functionAddress); - public static native void callPV(long param0, int param1, int param2, int param3, int param4, int param5, int param6, long __functionAddress); - public static native void callJV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, long param7, long __functionAddress); - public static native void callJV(int param0, int param1, int param2, int param3, int param4, boolean param5, int param6, long param7, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, long param7, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, boolean param5, int param6, long param7, long __functionAddress); - public static native void callJV(int param0, int param1, int param2, int param3, int param4, int param5, boolean param6, int param7, long param8, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, long param8, long __functionAddress); - public static native void callPV(int param0, int param1, long param2, int param3, int param4, int param5, int param6, int param7, float param8, long __functionAddress); - public static native void callPV(int param0, double param1, double param2, int param3, int param4, double param5, double param6, int param7, int param8, long param9, long __functionAddress); - public static native void callPV(int param0, float param1, float param2, int param3, int param4, float param5, float param6, int param7, int param8, long param9, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, long param9, long __functionAddress); - public static native void callJV(long param0, int param1, float param2, float param3, float param4, float param5, float param6, float param7, float param8, float param9, float param10, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, long param10, long __functionAddress); - public static native void callPV(long param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, long __functionAddress); - public static native void callJV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, long param10, boolean param11, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, long param11, long __functionAddress); - public static native void callPJV(long param0, long param1, long __functionAddress); - public static native void callPPV(long param0, long param1, long __functionAddress); - public static native void callSSV(short param0, short param1, long __functionAddress); - public static native void callJJV(int param0, long param1, long param2, long __functionAddress); - public static native void callPCV(long param0, int param1, short param2, long __functionAddress); - public static native void callPJV(long param0, int param1, long param2, long __functionAddress); - public static native void callPJV(long param0, long param1, float param2, long __functionAddress); - public static native void callPJV(long param0, long param1, int param2, long __functionAddress); - public static native void callPPV(int param0, long param1, long param2, long __functionAddress); - public static native void callPPV(long param0, int param1, long param2, long __functionAddress); - public static native void callPPV(long param0, long param1, int param2, long __functionAddress); - public static native void callSSV(int param0, short param1, short param2, long __functionAddress); - public static native void callJJV(int param0, int param1, long param2, long param3, long __functionAddress); - public static native void callJPV(int param0, int param1, long param2, long param3, long __functionAddress); - public static native void callJPV(int param0, long param1, int param2, long param3, long __functionAddress); - public static native void callPJV(int param0, long param1, int param2, long param3, long __functionAddress); - public static native void callPJV(long param0, int param1, long param2, int param3, long __functionAddress); - public static native void callPJV(long param0, long param1, int param2, int param3, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, long param3, long __functionAddress); - public static native void callPPV(int param0, long param1, int param2, long param3, long __functionAddress); - public static native void callPPV(int param0, long param1, long param2, int param3, long __functionAddress); - public static native void callPPV(int param0, long param1, long param2, boolean param3, long __functionAddress); - public static native void callPPV(long param0, int param1, int param2, long param3, long __functionAddress); - public static native void callPPV(long param0, long param1, int param2, int param3, long __functionAddress); - public static native void callPJV(long param0, long param1, int param2, int param3, int param4, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, long param4, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, long param3, int param4, long __functionAddress); - public static native void callPPV(int param0, long param1, int param2, long param3, int param4, long __functionAddress); - public static native void callPPV(int param0, long param1, long param2, int param3, int param4, long __functionAddress); - public static native void callPPV(long param0, int param1, int param2, int param3, long param4, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, int param3, long param4, long param5, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, long param3, int param4, int param5, long __functionAddress); - public static native void callPPV(int param0, long param1, long param2, int param3, int param4, int param5, long __functionAddress); - public static native void callPPV(long param0, int param1, long param2, int param3, int param4, int param5, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, int param3, int param4, long param5, long param6, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, long param3, int param4, int param5, long param6, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, int param5, long param6, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, long param3, int param4, int param5, int param6, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, int param3, int param4, int param5, long param6, long param7, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, int param3, long param4, int param5, int param6, long param7, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, int param5, int param6, long param7, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, long param3, int param4, float param5, float param6, int param7, long param8, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, int param5, int param6, int param7, long param8, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, int param5, long param6, int param7, int param8, float param9, long __functionAddress); - public static native void callBBBV(byte param0, byte param1, byte param2, long __functionAddress); - public static native void callCCCV(short param0, short param1, short param2, long __functionAddress); - public static native void callPJJV(long param0, long param1, long param2, long __functionAddress); - public static native void callPJPV(long param0, long param1, long param2, long __functionAddress); - public static native void callPPNV(long param0, long param1, long param2, long __functionAddress); - public static native void callPPPV(long param0, long param1, long param2, long __functionAddress); - public static native void callSSSV(short param0, short param1, short param2, long __functionAddress); - public static native void callUUUV(byte param0, byte param1, byte param2, long __functionAddress); - public static native void callJJJV(int param0, long param1, long param2, long param3, long __functionAddress); - public static native void callPJJV(long param0, long param1, long param2, int param3, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, long param3, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, long param3, long __functionAddress); - public static native void callPPPV(long param0, int param1, long param2, long param3, long __functionAddress); - public static native void callPPPV(long param0, long param1, int param2, long param3, long __functionAddress); - public static native void callSSSV(int param0, short param1, short param2, short param3, long __functionAddress); - public static native void callJJJV(int param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native void callPJJV(long param0, int param1, long param2, long param3, int param4, long __functionAddress); - public static native void callPJJV(long param0, long param1, long param2, int param3, int param4, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native void callPPPV(int param0, long param1, int param2, long param3, long param4, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, int param3, long param4, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, long param3, int param4, long __functionAddress); - public static native void callPPPV(long param0, int param1, int param2, long param3, long param4, long __functionAddress); - public static native void callPPPV(long param0, int param1, long param2, int param3, long param4, long __functionAddress); - public static native void callPJPV(long param0, int param1, long param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPPJV(int param0, long param1, long param2, int param3, long param4, boolean param5, long __functionAddress); - public static native void callPPJV(long param0, int param1, long param2, int param3, long param4, int param5, long __functionAddress); - public static native void callPPPV(int param0, int param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, int param3, long param4, long param5, long __functionAddress); - public static native void callPPPV(int param0, long param1, int param2, long param3, int param4, long param5, long __functionAddress); - public static native void callPJJV(long param0, int param1, int param2, long param3, long param4, int param5, int param6, long __functionAddress); - public static native void callPPPV(int param0, int param1, int param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, int param4, int param5, long param6, long __functionAddress); - public static native void callPPPV(long param0, int param1, long param2, int param3, int param4, int param5, long param6, long __functionAddress); - public static native void callPPPV(int param0, int param1, int param2, int param3, long param4, int param5, long param6, long param7, long __functionAddress); - public static native void callPPPV(long param0, int param1, int param2, int param3, int param4, int param5, long param6, long param7, long __functionAddress); - public static native void callPPPV(long param0, long param1, int param2, int param3, int param4, int param5, int param6, int param7, long param8, int param9, int param10, int param11, int param12, int param13, int param14, int param15, int param16, int param17, long __functionAddress); - public static native void callBBBBV(byte param0, byte param1, byte param2, byte param3, long __functionAddress); - public static native void callCCCCV(short param0, short param1, short param2, short param3, long __functionAddress); - public static native void callPJJPV(long param0, long param1, long param2, long param3, long __functionAddress); - public static native void callPJPPV(long param0, long param1, long param2, long param3, long __functionAddress); - public static native void callPPPNV(long param0, long param1, long param2, long param3, long __functionAddress); - public static native void callPPPPV(long param0, long param1, long param2, long param3, long __functionAddress); - public static native void callSSSSV(short param0, short param1, short param2, short param3, long __functionAddress); - public static native void callUUUUV(byte param0, byte param1, byte param2, byte param3, long __functionAddress); - public static native void callJJJJV(int param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native void callPJJJV(long param0, long param1, long param2, long param3, int param4, long __functionAddress); - public static native void callPJJPV(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native void callPJJPV(long param0, long param1, long param2, int param3, long param4, long __functionAddress); - public static native void callPPPPV(long param0, int param1, long param2, long param3, long param4, long __functionAddress); - public static native void callPPPPV(long param0, long param1, long param2, long param3, int param4, long __functionAddress); - public static native void callSSSSV(int param0, short param1, short param2, short param3, short param4, long __functionAddress); - public static native void callUUUUV(int param0, byte param1, byte param2, byte param3, byte param4, long __functionAddress); - public static native void callJJJJV(int param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native void callPJJPV(long param0, long param1, int param2, long param3, int param4, long param5, long __functionAddress); - public static native void callPJJPV(long param0, long param1, long param2, int param3, int param4, long param5, long __functionAddress); - public static native void callPJPPV(long param0, long param1, int param2, long param3, int param4, long param5, long __functionAddress); - public static native void callPPPPV(int param0, long param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native void callPPPPV(int param0, long param1, long param2, long param3, long param4, int param5, long __functionAddress); - public static native void callPPPPV(long param0, int param1, int param2, long param3, long param4, long param5, long __functionAddress); - public static native void callPJJPV(long param0, long param1, int param2, int param3, long param4, int param5, long param6, long __functionAddress); - public static native void callPJJPV(long param0, long param1, int param2, long param3, int param4, int param5, long param6, long __functionAddress); - public static native void callPJPPV(long param0, int param1, long param2, int param3, int param4, long param5, long param6, long __functionAddress); - public static native void callPPPPV(int param0, int param1, int param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native void callPPPPV(int param0, int param1, long param2, long param3, long param4, long param5, int param6, long __functionAddress); - public static native void callPJJPV(long param0, long param1, int param2, long param3, int param4, int param5, long param6, int param7, long __functionAddress); - public static native void callPJPPV(long param0, int param1, long param2, int param3, int param4, long param5, int param6, long param7, long __functionAddress); - public static native void callPPPPV(long param0, int param1, int param2, int param3, int param4, long param5, int param6, long param7, int param8, long param9, long __functionAddress); - public static native void callPJJJPV(long param0, long param1, long param2, long param3, long param4, long __functionAddress); - public static native void callPPPPPV(long param0, int param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native void callPJJJJV(long param0, long param1, long param2, long param3, long param4, int param5, int param6, long __functionAddress); - public static native void callPPPPPV(int param0, int param1, long param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native void callPPPPPV(long param0, int param1, int param2, long param3, long param4, long param5, long param6, long __functionAddress); - public static native void callPJJJJV(long param0, long param1, int param2, int param3, long param4, long param5, long param6, int param7, long __functionAddress); - public static native void callPJPPPV(long param0, int param1, int param2, long param3, long param4, int param5, long param6, long param7, long __functionAddress); - public static native void callPPPPPV(long param0, long param1, long param2, long param3, long param4, int param5, int param6, int param7, long __functionAddress); - public static native void callPPPPPV(long param0, int param1, long param2, int param3, int param4, int param5, long param6, int param7, long param8, int param9, long param10, long __functionAddress); - public static native void callPPPPPJV(long param0, long param1, long param2, long param3, long param4, long param5, long __functionAddress); - public static native void callPPPPPPV(long param0, long param1, long param2, int param3, int param4, long param5, long param6, long param7, long __functionAddress); - public static native void callPPPPPPPV(int param0, int param1, int param2, long param3, int param4, long param5, long param6, long param7, long param8, long param9, long param10, long __functionAddress); - public static native void callPPJJJJJJV(long param0, long param1, long param2, long param3, int param4, long param5, long param6, long param7, long param8, long __functionAddress); - public static native void callPJJJJJJJJJJJV(long param0, long param1, long param2, long param3, long param4, long param5, long param6, long param7, long param8, long param9, long param10, long param11, int param12, int param13, int param14, long __functionAddress); - public static native boolean callZ(int param0, long __functionAddress); - public static native boolean callZ(int param0, int param1, long __functionAddress); - public static native boolean callZ(int param0, float param1, float param2, long __functionAddress); - public static native boolean callZ(int param0, int param1, float param2, float param3, long __functionAddress); - public static native boolean callJZ(long param0, long __functionAddress); - public static native boolean callPZ(long param0, long __functionAddress); - public static native boolean callJZ(int param0, long param1, long __functionAddress); - public static native boolean callPZ(int param0, long param1, long __functionAddress); - public static native boolean callJZ(int param0, long param1, int param2, long __functionAddress); - public static native boolean callPPZ(int param0, long param1, long param2, long __functionAddress); - public static native boolean callPPPPZ(int param0, int param1, int param2, float param3, long param4, long param5, long param6, long param7, long __functionAddress); - - // Array API - - public static native int invokePPI(int param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native int invokePPPPI(long param0, long param1, long param2, @Nullable long[] param3, long __functionAddress); - public static native int invokePPPPPI(long param0, @Nullable int[] param1, @Nullable int[] param2, @Nullable int[] param3, long param4, long __functionAddress); - public static native int invokePNNPPPI(long param0, long param1, long param2, int param3, int param4, @Nullable int[] param5, @Nullable int[] param6, long param7, long __functionAddress); - public static native long invokePPP(long param0, @Nullable int[] param1, long __functionAddress); - public static native void invokePV(int param0, @Nullable double[] param1, long __functionAddress); - public static native void invokePV(int param0, @Nullable float[] param1, long __functionAddress); - public static native void invokePV(int param0, @Nullable int[] param1, long __functionAddress); - public static native void invokePV(int param0, int param1, @Nullable double[] param2, long __functionAddress); - public static native void invokePV(int param0, int param1, @Nullable float[] param2, long __functionAddress); - public static native void invokePV(int param0, int param1, @Nullable int[] param2, long __functionAddress); - public static native void invokePV(int param0, int param1, @Nullable long[] param2, long __functionAddress); - public static native void invokePV(int param0, @Nullable int[] param1, boolean param2, long __functionAddress); - public static native void invokePV(int param0, int param1, @Nullable float[] param2, int param3, int param4, long __functionAddress); - public static native void invokePV(int param0, int param1, @Nullable int[] param2, int param3, int param4, long __functionAddress); - public static native void invokePV(int param0, int param1, @Nullable short[] param2, int param3, int param4, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, @Nullable double[] param5, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, @Nullable float[] param5, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, @Nullable int[] param5, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, @Nullable short[] param5, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable double[] param6, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable float[] param6, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable int[] param6, long __functionAddress); - public static native void invokePV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable short[] param6, long __functionAddress); - public static native void invokePJV(int param0, @Nullable int[] param1, long param2, long __functionAddress); - public static native void invokePPV(long param0, @Nullable float[] param1, int param2, long __functionAddress); - public static native void invokePPV(long param0, @Nullable int[] param1, int param2, long __functionAddress); - public static native void invokePPV(long param0, @Nullable short[] param1, int param2, long __functionAddress); - public static native void invokePPV(long param0, int param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native void invokePPV(long param0, int param1, int param2, @Nullable long[] param3, long __functionAddress); - public static native void invokePNPV(long param0, long param1, @Nullable short[] param2, long __functionAddress); - public static native void invokePPPV(long param0, @Nullable double[] param1, @Nullable double[] param2, long __functionAddress); - public static native void invokePPPV(long param0, @Nullable float[] param1, @Nullable float[] param2, long __functionAddress); - public static native void invokePPPV(long param0, @Nullable int[] param1, @Nullable int[] param2, long __functionAddress); - public static native void invokePPPV(@Nullable int[] param0, @Nullable int[] param1, @Nullable int[] param2, long __functionAddress); - public static native void invokePPPV(int param0, @Nullable float[] param1, @Nullable float[] param2, @Nullable float[] param3, long __functionAddress); - public static native void invokePPPV(int param0, int param1, @Nullable double[] param2, @Nullable double[] param3, @Nullable double[] param4, long __functionAddress); - public static native void invokePPPV(int param0, int param1, @Nullable float[] param2, @Nullable float[] param3, @Nullable float[] param4, long __functionAddress); - public static native void invokePPPV(int param0, int param1, @Nullable long[] param2, @Nullable long[] param3, @Nullable long[] param4, long __functionAddress); - public static native void invokePNPPV(long param0, long param1, long param2, @Nullable short[] param3, long __functionAddress); - public static native void invokePPPPPV(long param0, @Nullable int[] param1, @Nullable int[] param2, @Nullable int[] param3, @Nullable int[] param4, long __functionAddress); - public static native boolean invokePPZ(long param0, @Nullable int[] param1, long __functionAddress); - public static native boolean invokePPPZ(long param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native int callPI(@Nullable int[] param0, long __functionAddress); - public static native int callPI(int param0, @Nullable int[] param1, long __functionAddress); - public static native int callPI(@Nullable int[] param0, int param1, long __functionAddress); - public static native int callPI(int param0, int param1, @Nullable int[] param2, long __functionAddress); - public static native int callPI(int param0, @Nullable int[] param1, int param2, long __functionAddress); - public static native int callPI(int param0, int param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native int callPI(int param0, int param1, int param2, int param3, @Nullable float[] param4, long __functionAddress); - public static native int callPI(int param0, int param1, int param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native int callPPI(long param0, @Nullable int[] param1, long __functionAddress); - public static native int callPPI(@Nullable int[] param0, long param1, long __functionAddress); - public static native int callPPI(int param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native int callPPI(long param0, int param1, @Nullable int[] param2, long __functionAddress); - public static native int callPPI(long param0, int param1, @Nullable long[] param2, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native int callPPI(long param0, int param1, int param2, @Nullable long[] param3, long __functionAddress); - public static native int callPPI(int param0, long param1, int param2, int param3, float param4, @Nullable int[] param5, long __functionAddress); - public static native int callPJPI(long param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native int callPJPI(long param0, long param1, @Nullable long[] param2, long __functionAddress); - public static native int callPPPI(long param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native int callPPPI(long param0, long param1, @Nullable long[] param2, long __functionAddress); - public static native int callPPPI(long param0, @Nullable int[] param1, long param2, long __functionAddress); - public static native int callPPPI(long param0, @Nullable int[] param1, @Nullable int[] param2, long __functionAddress); - public static native int callPPPI(@Nullable int[] param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native int callPJPI(long param0, int param1, long param2, @Nullable int[] param3, long __functionAddress); - public static native int callPJPI(long param0, long param1, int param2, @Nullable long[] param3, long __functionAddress); - public static native int callPPPI(long param0, int param1, @Nullable int[] param2, @Nullable int[] param3, long __functionAddress); - public static native int callPPPI(long param0, int param1, @Nullable int[] param2, @Nullable long[] param3, long __functionAddress); - public static native int callPPPI(long param0, long param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native int callPPPI(long param0, long param1, int param2, @Nullable long[] param3, long __functionAddress); - public static native int callPPPI(long param0, long param1, @Nullable int[] param2, int param3, long __functionAddress); - public static native int callPPJI(long param0, int param1, @Nullable long[] param2, int param3, long param4, long __functionAddress); - public static native int callPPPI(long param0, int param1, int param2, long param3, @Nullable int[] param4, long __functionAddress); - public static native int callPPPI(long param0, int param1, int param2, int param3, @Nullable int[] param4, @Nullable float[] param5, long __functionAddress); - public static native int callPPPI(long param0, int param1, int param2, int param3, @Nullable int[] param4, @Nullable int[] param5, long __functionAddress); - public static native int callPJPPI(long param0, long param1, long param2, @Nullable int[] param3, long __functionAddress); - public static native int callPJPPI(long param0, long param1, long param2, @Nullable long[] param3, long __functionAddress); - public static native int callPJPPI(long param0, long param1, @Nullable int[] param2, long param3, long __functionAddress); - public static native int callPJPPI(long param0, long param1, @Nullable int[] param2, @Nullable int[] param3, long __functionAddress); - public static native int callPJPPI(long param0, long param1, @Nullable int[] param2, @Nullable long[] param3, long __functionAddress); - public static native int callPPNPI(long param0, long param1, long param2, @Nullable long[] param3, long __functionAddress); - public static native int callPPPPI(long param0, long param1, long param2, @Nullable long[] param3, long __functionAddress); - public static native int callPPPPI(long param0, long param1, @Nullable int[] param2, long param3, long __functionAddress); - public static native int callPPPPI(long param0, long param1, @Nullable int[] param2, @Nullable int[] param3, long __functionAddress); - public static native int callPPPPI(long param0, int param1, long param2, long param3, @Nullable long[] param4, long __functionAddress); - public static native int callPPPPI(long param0, int param1, long param2, @Nullable long[] param3, @Nullable long[] param4, long __functionAddress); - public static native int callPPPPI(long param0, int param1, @Nullable int[] param2, long param3, long param4, long __functionAddress); - public static native int callPPPPI(long param0, long param1, int param2, @Nullable long[] param3, long param4, long __functionAddress); - public static native int callPPPPI(long param0, long param1, long param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native int callPPPPI(long param0, @Nullable int[] param1, long param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native int callPPPPI(long param0, int param1, int param2, @Nullable long[] param3, @Nullable int[] param4, @Nullable int[] param5, long __functionAddress); - public static native int callPPPPI(int param0, @Nullable int[] param1, @Nullable long[] param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, int param11, int param12, int param13, int param14, int param15, int param16, int param17, int param18, int param19, int param20, @Nullable int[] param21, @Nullable long[] param22, long __functionAddress); - public static native int callPJPPPI(long param0, long param1, long param2, long param3, @Nullable long[] param4, long __functionAddress); - public static native int callPPJPPI(long param0, long param1, long param2, @Nullable int[] param3, long param4, long __functionAddress); - public static native int callPPPPPI(long param0, long param1, @Nullable int[] param2, @Nullable int[] param3, @Nullable int[] param4, long __functionAddress); - public static native int callPPPPPI(long param0, long param1, @Nullable int[] param2, @Nullable int[] param3, @Nullable long[] param4, long __functionAddress); - public static native int callPPPPPI(long param0, @Nullable int[] param1, @Nullable int[] param2, @Nullable int[] param3, long param4, long __functionAddress); - public static native int callPJPPPI(long param0, long param1, int param2, long param3, long param4, @Nullable long[] param5, long __functionAddress); - public static native int callPPPPPI(long param0, long param1, long param2, @Nullable int[] param3, int param4, @Nullable int[] param5, long __functionAddress); - public static native int callPPPPPI(long param0, @Nullable int[] param1, @Nullable float[] param2, int param3, @Nullable int[] param4, @Nullable int[] param5, long __functionAddress); - public static native int callPPPPPI(int param0, int param1, @Nullable int[] param2, @Nullable int[] param3, @Nullable int[] param4, @Nullable int[] param5, long param6, long __functionAddress); - public static native int callPPPPPI(long param0, int param1, @Nullable long[] param2, int param3, long param4, long param5, long param6, long __functionAddress); - public static native int callPJPPJI(long param0, long param1, int param2, int param3, long param4, @Nullable int[] param5, long param6, int param7, long __functionAddress); - public static native int callPJPPJI(long param0, long param1, int param2, int param3, long param4, @Nullable long[] param5, long param6, int param7, long __functionAddress); - public static native int callPJJJJPI(long param0, long param1, long param2, long param3, long param4, @Nullable int[] param5, long __functionAddress); - public static native int callPPPPPPI(long param0, @Nullable int[] param1, @Nullable int[] param2, @Nullable int[] param3, @Nullable int[] param4, @Nullable int[] param5, long __functionAddress); - public static native int callPJJPPPI(long param0, long param1, long param2, int param3, long param4, long param5, @Nullable long[] param6, long __functionAddress); - public static native int callPPPPPPI(int param0, int param1, @Nullable int[] param2, @Nullable int[] param3, @Nullable int[] param4, @Nullable int[] param5, @Nullable int[] param6, long param7, long __functionAddress); - public static native long callPP(@Nullable int[] param0, long __functionAddress); - public static native long callPPP(long param0, @Nullable int[] param1, long __functionAddress); - public static native long callPPP(int param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native long callPPP(long param0, int param1, @Nullable int[] param2, long __functionAddress); - public static native long callPPP(int param0, int param1, int param2, @Nullable int[] param3, @Nullable int[] param4, long __functionAddress); - public static native long callPPP(long param0, int param1, int param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native long callPPPP(long param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native long callPPPP(long param0, int param1, @Nullable int[] param2, long param3, long __functionAddress); - public static native long callPPPP(long param0, long param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native long callPPPP(long param0, long param1, int param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native long callPPNPP(long param0, long param1, long param2, @Nullable int[] param3, long __functionAddress); - public static native long callPPPPP(long param0, long param1, long param2, @Nullable int[] param3, long __functionAddress); - public static native long callPPPPP(long param0, int param1, long param2, long param3, @Nullable int[] param4, long __functionAddress); - public static native long callPPPPP(long param0, long param1, int param2, long param3, @Nullable int[] param4, long __functionAddress); - public static native long callPPPPP(long param0, long param1, long param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native long callPPPPPPPP(int param0, @Nullable int[] param1, @Nullable long[] param2, int param3, int param4, int param5, int param6, long param7, long param8, long param9, int param10, @Nullable int[] param11, @Nullable long[] param12, long __functionAddress); - public static native void callPV(@Nullable double[] param0, long __functionAddress); - public static native void callPV(@Nullable float[] param0, long __functionAddress); - public static native void callPV(@Nullable int[] param0, long __functionAddress); - public static native void callPV(@Nullable short[] param0, long __functionAddress); - public static native void callPV(int param0, @Nullable double[] param1, long __functionAddress); - public static native void callPV(int param0, @Nullable float[] param1, long __functionAddress); - public static native void callPV(int param0, @Nullable int[] param1, long __functionAddress); - public static native void callPV(int param0, @Nullable long[] param1, long __functionAddress); - public static native void callPV(int param0, @Nullable short[] param1, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable double[] param2, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable float[] param2, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable int[] param2, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable long[] param2, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable short[] param2, long __functionAddress); - public static native void callPV(int param0, @Nullable int[] param1, int param2, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, @Nullable double[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, @Nullable float[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, @Nullable long[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, @Nullable short[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, boolean param2, @Nullable double[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, boolean param2, @Nullable float[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, boolean param2, @Nullable int[] param3, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable int[] param2, int param3, long __functionAddress); - public static native void callPV(int param0, @Nullable int[] param1, int param2, int param3, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, @Nullable double[] param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, @Nullable float[] param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, @Nullable long[] param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, @Nullable short[] param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, boolean param3, @Nullable double[] param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, boolean param3, @Nullable float[] param4, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, @Nullable int[] param3, boolean param4, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable int[] param2, int param3, int param4, long __functionAddress); - public static native void callPV(int param0, boolean param1, int param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native void callPV(int param0, double param1, double param2, int param3, int param4, @Nullable double[] param5, long __functionAddress); - public static native void callPV(int param0, float param1, float param2, int param3, int param4, @Nullable float[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, @Nullable double[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, @Nullable float[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, @Nullable int[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, @Nullable short[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, @Nullable int[] param4, boolean param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, boolean param3, int param4, @Nullable float[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, boolean param3, int param4, @Nullable int[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, boolean param3, int param4, @Nullable short[] param5, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable double[] param6, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable float[] param6, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable int[] param6, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, @Nullable short[] param6, long __functionAddress); - public static native void callPV(int param0, int param1, @Nullable int[] param2, int param3, int param4, int param5, int param6, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, @Nullable double[] param7, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, @Nullable float[] param7, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, @Nullable int[] param7, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, @Nullable short[] param7, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, @Nullable double[] param8, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, @Nullable float[] param8, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, @Nullable int[] param8, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, @Nullable short[] param8, long __functionAddress); - public static native void callPV(int param0, double param1, double param2, int param3, int param4, double param5, double param6, int param7, int param8, @Nullable double[] param9, long __functionAddress); - public static native void callPV(int param0, float param1, float param2, int param3, int param4, float param5, float param6, int param7, int param8, @Nullable float[] param9, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, @Nullable double[] param9, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, @Nullable float[] param9, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, @Nullable int[] param9, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, @Nullable short[] param9, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, @Nullable double[] param10, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, @Nullable float[] param10, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, @Nullable int[] param10, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, @Nullable short[] param10, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, @Nullable double[] param11, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, @Nullable float[] param11, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, @Nullable int[] param11, long __functionAddress); - public static native void callPV(int param0, int param1, int param2, int param3, int param4, int param5, int param6, int param7, int param8, int param9, int param10, @Nullable short[] param11, long __functionAddress); - public static native void callPPV(long param0, @Nullable float[] param1, long __functionAddress); - public static native void callPPV(long param0, @Nullable int[] param1, long __functionAddress); - public static native void callPPV(@Nullable double[] param0, @Nullable double[] param1, long __functionAddress); - public static native void callPPV(@Nullable float[] param0, @Nullable float[] param1, long __functionAddress); - public static native void callPPV(@Nullable int[] param0, @Nullable int[] param1, long __functionAddress); - public static native void callPPV(@Nullable short[] param0, @Nullable short[] param1, long __functionAddress); - public static native void callPPV(int param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native void callPPV(int param0, @Nullable int[] param1, @Nullable float[] param2, long __functionAddress); - public static native void callPPV(int param0, @Nullable int[] param1, @Nullable int[] param2, long __functionAddress); - public static native void callPPV(int param0, @Nullable int[] param1, @Nullable long[] param2, long __functionAddress); - public static native void callPPV(long param0, int param1, @Nullable float[] param2, long __functionAddress); - public static native void callPPV(long param0, int param1, @Nullable int[] param2, long __functionAddress); - public static native void callPPV(@Nullable int[] param0, int param1, @Nullable int[] param2, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, @Nullable int[] param3, long __functionAddress); - public static native void callPPV(int param0, int param1, @Nullable int[] param2, long param3, long __functionAddress); - public static native void callPPV(int param0, int param1, @Nullable int[] param2, @Nullable float[] param3, long __functionAddress); - public static native void callPPV(int param0, int param1, @Nullable int[] param2, @Nullable int[] param3, long __functionAddress); - public static native void callPPV(int param0, int param1, @Nullable int[] param2, @Nullable long[] param3, long __functionAddress); - public static native void callPPV(int param0, long param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native void callPPV(int param0, long param1, @Nullable double[] param2, int param3, long __functionAddress); - public static native void callPPV(int param0, long param1, @Nullable float[] param2, int param3, long __functionAddress); - public static native void callPPV(int param0, long param1, @Nullable int[] param2, int param3, long __functionAddress); - public static native void callPPV(int param0, long param1, @Nullable long[] param2, int param3, long __functionAddress); - public static native void callPPV(int param0, long param1, @Nullable short[] param2, int param3, long __functionAddress); - public static native void callPPV(int param0, @Nullable int[] param1, @Nullable int[] param2, int param3, long __functionAddress); - public static native void callPPV(int param0, @Nullable long[] param1, @Nullable int[] param2, int param3, long __functionAddress); - public static native void callPPV(long param0, int param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, long param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, @Nullable int[] param3, long param4, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, @Nullable int[] param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, @Nullable int[] param3, int param4, long __functionAddress); - public static native void callPPV(int param0, int param1, @Nullable int[] param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPV(int param0, @Nullable int[] param1, int param2, long param3, int param4, long __functionAddress); - public static native void callPPV(int param0, @Nullable int[] param1, int param2, @Nullable int[] param3, int param4, long __functionAddress); - public static native void callPPV(int param0, @Nullable int[] param1, long param2, int param3, int param4, long __functionAddress); - public static native void callPPV(long param0, int param1, int param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, int param3, @Nullable int[] param4, long param5, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, @Nullable float[] param5, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, @Nullable short[] param5, long __functionAddress); - public static native void callPPV(int param0, int param1, @Nullable int[] param2, long param3, int param4, int param5, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, long param3, int param4, int param5, @Nullable float[] param6, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, int param5, @Nullable float[] param6, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, int param3, long param4, int param5, int param6, @Nullable float[] param7, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, int param3, long param4, int param5, int param6, @Nullable short[] param7, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, int param5, int param6, @Nullable float[] param7, long __functionAddress); - public static native void callPPV(int param0, int param1, int param2, long param3, int param4, float param5, float param6, int param7, @Nullable float[] param8, long __functionAddress); - public static native void callPPV(int param0, int param1, long param2, int param3, int param4, int param5, int param6, int param7, @Nullable float[] param8, long __functionAddress); - public static native void callPJPV(long param0, long param1, @Nullable long[] param2, long __functionAddress); - public static native void callPPPV(long param0, long param1, @Nullable int[] param2, long __functionAddress); - public static native void callPPPV(long param0, @Nullable int[] param1, long param2, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, @Nullable long[] param3, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, @Nullable double[] param3, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, @Nullable float[] param3, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, @Nullable int[] param3, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, @Nullable long[] param3, long __functionAddress); - public static native void callPPPV(int param0, long param1, long param2, @Nullable short[] param3, long __functionAddress); - public static native void callPPPV(long param0, int param1, @Nullable int[] param2, long param3, long __functionAddress); - public static native void callPPPV(long param0, int param1, @Nullable int[] param2, @Nullable long[] param3, long __functionAddress); - public static native void callPPPV(long param0, int param1, @Nullable long[] param2, long param3, long __functionAddress); - public static native void callPPPV(long param0, long param1, int param2, @Nullable int[] param3, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, @Nullable double[] param4, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, @Nullable float[] param4, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, @Nullable short[] param4, long __functionAddress); - public static native void callPPPV(int param0, int param1, @Nullable int[] param2, long param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPPV(int param0, int param1, @Nullable int[] param2, @Nullable int[] param3, long param4, long __functionAddress); - public static native void callPPPV(int param0, long param1, int param2, @Nullable int[] param3, long param4, long __functionAddress); - public static native void callPPPV(int param0, long param1, int param2, @Nullable int[] param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPPV(int param0, @Nullable int[] param1, @Nullable int[] param2, int param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPPV(long param0, int param1, int param2, @Nullable int[] param3, @Nullable int[] param4, long __functionAddress); - public static native void callPPPV(long param0, int param1, int param2, @Nullable long[] param3, @Nullable long[] param4, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, int param3, int param4, @Nullable double[] param5, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, int param3, int param4, @Nullable float[] param5, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, int param3, int param4, @Nullable int[] param5, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, int param3, int param4, @Nullable long[] param5, long __functionAddress); - public static native void callPJPV(long param0, long param1, int param2, int param3, int param4, @Nullable short[] param5, long __functionAddress); - public static native void callPPJV(long param0, int param1, @Nullable long[] param2, int param3, long param4, int param5, long __functionAddress); - public static native void callPPPV(int param0, int param1, int param2, @Nullable int[] param3, long param4, long param5, long __functionAddress); - public static native void callPPPV(int param0, int param1, int param2, @Nullable int[] param3, long param4, @Nullable int[] param5, long __functionAddress); - public static native void callPPPV(int param0, int param1, @Nullable int[] param2, int param3, @Nullable int[] param4, @Nullable int[] param5, long __functionAddress); - public static native void callPPPV(int param0, @Nullable int[] param1, int param2, long param3, int param4, @Nullable int[] param5, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, int param4, int param5, @Nullable float[] param6, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, int param4, int param5, @Nullable int[] param6, long __functionAddress); - public static native void callPPPV(int param0, int param1, long param2, long param3, int param4, int param5, @Nullable short[] param6, long __functionAddress); - public static native void callPPPV(long param0, int param1, long param2, int param3, int param4, int param5, @Nullable int[] param6, long __functionAddress); - public static native void callPPPV(int param0, int param1, int param2, int param3, @Nullable int[] param4, int param5, @Nullable int[] param6, @Nullable float[] param7, long __functionAddress); - public static native void callPPPV(int param0, int param1, int param2, int param3, @Nullable int[] param4, int param5, @Nullable int[] param6, @Nullable int[] param7, long __functionAddress); - public static native void callPPPV(long param0, int param1, int param2, int param3, int param4, int param5, @Nullable int[] param6, long param7, long __functionAddress); - public static native void callPJPPV(long param0, long param1, @Nullable int[] param2, long param3, long __functionAddress); - public static native void callPPPPV(long param0, long param1, @Nullable int[] param2, long param3, long __functionAddress); - public static native void callPJJPV(long param0, int param1, long param2, long param3, @Nullable long[] param4, long __functionAddress); - public static native void callPPPPV(long param0, int param1, long param2, @Nullable int[] param3, long param4, long __functionAddress); - public static native void callPPPPV(@Nullable long[] param0, @Nullable int[] param1, @Nullable int[] param2, @Nullable int[] param3, int param4, long __functionAddress); - public static native void callPPPPV(int param0, long param1, @Nullable int[] param2, @Nullable int[] param3, @Nullable int[] param4, int param5, long __functionAddress); - public static native void callPPPPV(long param0, int param1, int param2, @Nullable long[] param3, @Nullable long[] param4, @Nullable long[] param5, long __functionAddress); - public static native void callPJPPV(long param0, int param1, long param2, int param3, int param4, @Nullable int[] param5, @Nullable long[] param6, long __functionAddress); - public static native void callPPPPV(int param0, int param1, int param2, @Nullable int[] param3, @Nullable int[] param4, @Nullable int[] param5, long param6, long __functionAddress); - public static native void callPPPPV(int param0, int param1, long param2, @Nullable int[] param3, @Nullable int[] param4, @Nullable int[] param5, int param6, long __functionAddress); - public static native void callPJPPV(long param0, int param1, long param2, int param3, int param4, @Nullable long[] param5, int param6, @Nullable int[] param7, long __functionAddress); - public static native void callPJJJPV(long param0, long param1, long param2, long param3, @Nullable double[] param4, long __functionAddress); - public static native void callPJJJPV(long param0, long param1, long param2, long param3, @Nullable float[] param4, long __functionAddress); - public static native void callPJJJPV(long param0, long param1, long param2, long param3, @Nullable int[] param4, long __functionAddress); - public static native void callPJJJPV(long param0, long param1, long param2, long param3, @Nullable long[] param4, long __functionAddress); - public static native void callPJJJPV(long param0, long param1, long param2, long param3, @Nullable short[] param4, long __functionAddress); - public static native void callPPPPPV(long param0, int param1, long param2, @Nullable long[] param3, @Nullable int[] param4, long param5, long __functionAddress); - public static native void callPPPPPV(int param0, int param1, long param2, @Nullable int[] param3, @Nullable int[] param4, @Nullable int[] param5, @Nullable int[] param6, long __functionAddress); - public static native void callPPPPPV(long param0, int param1, int param2, @Nullable long[] param3, @Nullable long[] param4, @Nullable long[] param5, @Nullable long[] param6, long __functionAddress); - public static native void callPPPPPV(long param0, int param1, @Nullable long[] param2, int param3, int param4, int param5, long param6, int param7, long param8, int param9, long param10, long __functionAddress); - public static native void callPPPPPPPV(int param0, int param1, int param2, long param3, int param4, long param5, @Nullable int[] param6, @Nullable int[] param7, @Nullable int[] param8, @Nullable int[] param9, @Nullable long[] param10, long __functionAddress); - public static native boolean callPPZ(int param0, @Nullable int[] param1, long param2, long __functionAddress); - public static native boolean callPPPPZ(int param0, int param1, int param2, float param3, @Nullable float[] param4, @Nullable float[] param5, @Nullable float[] param6, @Nullable float[] param7, long __functionAddress); - -} diff --git a/LWJGL/src/main/java/org/lwjgl/system/Library.java b/LWJGL/src/main/java/org/lwjgl/system/Library.java deleted file mode 100644 index 414e4616..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/Library.java +++ /dev/null @@ -1,642 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; - -import javax.annotation.*; -import java.io.*; -import java.lang.reflect.*; -import java.net.*; -import java.nio.channels.*; -import java.nio.file.*; -import java.security.*; -import java.util.*; -import java.util.function.*; -import java.util.jar.*; -import java.util.regex.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; - -/** - * Initializes the LWJGL shared library and handles loading additional shared libraries. - * - * @see Configuration#LIBRARY_NAME - * @see Configuration#LIBRARY_PATH - */ -public final class Library { - - /** The LWJGL shared library name. */ - public static final String JNI_LIBRARY_NAME = Configuration.LIBRARY_NAME.get(Platform.mapLibraryNameBundled("lwjgl")); - - static final String JAVA_LIBRARY_PATH = "java.library.path"; - - private static final Pattern PATH_SEPARATOR = Pattern.compile(File.pathSeparator); - - private static final Pattern NATIVES_JAR = Pattern.compile("/[\\w-]+?-natives-\\w+.jar!/"); - - static { - if (DEBUG) { - DEBUG_STREAM.print( - "[LWJGL] Version: " + Version.getVersion() + - "\n\t OS: " + System.getProperty("os.name") + " v" + System.getProperty("os.version") + - "\n\tJRE: " + Platform.get().getName() + " " + System.getProperty("os.arch") + " " + System.getProperty("java.version") + - "\n\tJVM: " + System.getProperty("java.vm.name") + " v" + System.getProperty("java.vm.version") + " by " + System.getProperty("java.vm.vendor") + - "\n" - ); - } - - loadSystem("org.lwjgl", JNI_LIBRARY_NAME); - } - - private Library() {} - - /** Ensures that the LWJGL shared library has been loaded. */ - public static void initialize() { - // intentionally empty to trigger static initializer - } - - /** Calls {@link #loadSystem(Consumer, Consumer, Class, String, String)} using {@code Library.class} as the context parameter. */ - public static void loadSystem(String module, String name) throws UnsatisfiedLinkError { - loadSystem(System::load, System::loadLibrary, Library.class, module, name); - } - - /** - * Loads a JNI shared library. - * - * @param load should be the {@code System::load} expression. This ensures that {@code System.load} has the same caller as this method. - * @param loadLibrary should be the {@code System::loadLibrary} expression. This ensures that {@code System.loadLibrary} has the same caller as this - * method. - * @param context the class to use to discover the shared library in the classpath - * @param module the module to which the shared library belongs - * @param name the library name. If not an absolute path, it must be the plain library name, without an OS specific prefix or file extension (e.g. - * GL, not libGL.so) - * - * @throws UnsatisfiedLinkError if the library could not be loaded - */ - @SuppressWarnings("try") - public static void loadSystem( - Consumer load, - Consumer loadLibrary, - Class context, - String module, - String name - ) throws UnsatisfiedLinkError { - if (DEBUG) { - DEBUG_STREAM.print( - "[LWJGL] Loading JNI library: " + name + - "\n\tModule: " + module + - "\n" - ); - } - - // METHOD 1: absolute path - if (Paths.get(name).isAbsolute()) { - load.accept(name); - apiLogMore("Success"); - return; - } - - String libName = Platform.get().mapLibraryName(name); - - boolean bundledWithLWJGL = name.contains("lwjgl"); - - // METHOD 2: org.lwjgl.librarypath - URL libURL = findResource(context, module, libName, bundledWithLWJGL); - if (libURL == null) { - if (loadSystemFromLibraryPath(load, context, module, libName, bundledWithLWJGL)) { - return; - } - } else { - boolean debugLoader = Configuration.DEBUG_LOADER.get(false); - try { - if (!Configuration.SHARED_LIBRARY_EXTRACT_FORCE.get(false)) { - String regular = getRegularFilePath(libURL); - if (regular != null) { - load.accept(regular); - apiLogMore("Loaded from classpath: " + regular); - return; - } - } - - // Always use the SLL if the library is found in the classpath, - // so that newer versions can be detected. - if (debugLoader) { - apiLogMore("Using SharedLibraryLoader..."); - } - // Extract from classpath and try org.lwjgl.librarypath - try (FileChannel ignored = SharedLibraryLoader.load(name, libName, libURL, load)) { - if (loadSystemFromLibraryPath(load, context, module, libName, bundledWithLWJGL)) { - return; - } - } - } catch (Exception e) { - if (debugLoader) { - e.printStackTrace(DEBUG_STREAM); - } - } - } - - String javaLibraryPath = System.getProperty(JAVA_LIBRARY_PATH); - - // METHOD 3: java.library.path (bundled only) - if (bundledWithLWJGL && javaLibraryPath != null) { - if (loadSystem(load, context, module, getBundledPath(module, libName), false, JAVA_LIBRARY_PATH, javaLibraryPath)) { - return; - } - } - - // METHOD 4: System.loadLibrary - try { - loadLibrary.accept(name); - - // Success, but java.library.path might be empty, or not include the library. - // In that case, ClassLoader::findLibrary was used to return the library path (e.g. OSGi does this with native libraries in bundles). - Path libFile = javaLibraryPath == null ? null : findFile(javaLibraryPath, module, libName, bundledWithLWJGL); - if (libFile != null) { - apiLogMore(String.format("Loaded from %s: %s", JAVA_LIBRARY_PATH, libFile)); - if (bundledWithLWJGL) { - checkHash(context, libFile, module, libName); - } - } else { - apiLogMore("Loaded from a ClassLoader provided path."); - } - return; - } catch (Throwable t) { - apiLogMore(libName + " not found in " + JAVA_LIBRARY_PATH); - } - - detectPlatformMismatch(context, module); - printError(true); - throw new UnsatisfiedLinkError("Failed to locate library: " + libName); - } - - private static boolean loadSystemFromLibraryPath(Consumer load, Class context, String module, String libName, boolean bundledWithLWJGL) { - String paths = Configuration.LIBRARY_PATH.get(); - return paths != null && loadSystem(load, context, module, libName, bundledWithLWJGL, Configuration.LIBRARY_PATH.getProperty(), paths); - } - - private static boolean loadSystem(Consumer load, Class context, String module, String libName, boolean bundledWithLWJGL, String property, String paths) { - Path libFile = findFile(paths, module, libName, bundledWithLWJGL); - if (libFile == null) { - apiLogMore(libName + " not found in " + property + "=" + paths); - return false; - } - - load.accept(libFile.toAbsolutePath().toString()); - apiLogMore("Loaded from " + property + ": " + libFile); - if (bundledWithLWJGL) { - checkHash(context, libFile, module, libName); - } - return true; - } - - /** Calls {@link #loadNative(Class, String, String)} using {@code Library.class} as the context parameter. */ - public static SharedLibrary loadNative(String module, String name) { - return loadNative(Library.class, module, name); - } - - /** - * Loads a shared library using OS-specific APIs (e.g. {@link org.lwjgl.system.windows.WinBase#LoadLibrary LoadLibrary} or - * {@link org.lwjgl.system.linux.DynamicLinkLoader#dlopen dlopen}). - * - * @param context the class to use to discover the shared library in the classpath - * @param module the module to which the shared library belongs - * @param name the library name. OS-specific prefixes and file extensions are optional (e.g. both {@code "GL"} and {@code "libGL.so.1"} are - * valid on Linux) - * - * @return the shared library - * - * @throws UnsatisfiedLinkError if the library could not be loaded - */ - @SuppressWarnings("try") - public static SharedLibrary loadNative(Class context, String module, String name) { - return loadNative(context, module, name, false); - } - - /** - * Loads a shared library using OS-specific APIs (e.g. {@link org.lwjgl.system.windows.WinBase#LoadLibrary LoadLibrary} or - * {@link org.lwjgl.system.linux.DynamicLinkLoader#dlopen dlopen}). - * - * @param context the class to use to discover the shared library in the classpath - * @param module the module to which the shared library belongs - * @param name the library name. OS-specific prefixes and file extensions are optional (e.g. both {@code "GL"} and {@code "libGL.so.1"} are - * valid on Linux) - * @param bundledWithLWJGL whether the default LWJGL distribution includes the shared library. If true, LWJGL will also try to find the shared library under - * the {@code //} subfolder. - * - * @return the shared library - * - * @throws UnsatisfiedLinkError if the library could not be loaded - */ - public static SharedLibrary loadNative(Class context, String module, String name, boolean bundledWithLWJGL) { - return loadNative(context, module, name, bundledWithLWJGL, true); - } - - @SuppressWarnings("try") - private static SharedLibrary loadNative(Class context, String module, String name, boolean bundledWithLWJGL, boolean printError) { - if (DEBUG) { - DEBUG_STREAM.print( - "[LWJGL] Loading library: " + name + - "\n\tModule: " + module + - "\n" - ); - } - - // METHOD 1: absolute path - if (Paths.get(name).isAbsolute()) { - SharedLibrary lib = apiCreateLibrary(name); - apiLogMore("Success"); - return lib; - } - - String libName = Platform.get().mapLibraryName(name); - SharedLibrary lib; - - // METHOD 2: org.lwjgl.librarypath - URL libURL = findResource(context, module, libName, bundledWithLWJGL); - if (libURL == null) { - lib = loadNativeFromLibraryPath(context, module, libName, bundledWithLWJGL); - if (lib != null) { - return lib; - } - } else { - boolean debugLoader = Configuration.DEBUG_LOADER.get(false); - try { - if (!Configuration.SHARED_LIBRARY_EXTRACT_FORCE.get(false)) { - String regular = getRegularFilePath(libURL); - if (regular != null) { - lib = apiCreateLibrary(regular); - apiLogMore("Loaded from classpath: " + regular); - return lib; - } - } - - // Always use the SLL if the library is found in the classpath, - // so that newer versions can be detected. - if (debugLoader) { - apiLogMore("Using SharedLibraryLoader..."); - } - // Extract from classpath and try org.lwjgl.librarypath - try (FileChannel ignored = SharedLibraryLoader.load(name, libName, libURL, null)) { - lib = loadNativeFromLibraryPath(context, module, libName, bundledWithLWJGL); - if (lib != null) { - return lib; - } - } - } catch (Exception e) { - if (debugLoader) { - e.printStackTrace(DEBUG_STREAM); - } - } - } - - // Use method 4 before 3 for libraries not bundled with LWJGL. - if (!bundledWithLWJGL) { - lib = loadNativeFromSystem(libName); - if (lib != null) { - return lib; - } - } - - // METHOD 3: System.loadLibrary (emulated) - { - if (Configuration.EMULATE_SYSTEM_LOADLIBRARY.get(false)) { - // Try ClassLoader::findLibrary (e.g. OSGi bundle) - try { - Method findLibrary = ClassLoader.class.getDeclaredMethod("findLibrary", String.class); - findLibrary.setAccessible(true); - - String libPath = (String)findLibrary.invoke(context.getClassLoader(), name); - if (libPath != null) { - lib = apiCreateLibrary(libPath); - apiLogMore("Loaded from ClassLoader provided path: " + libPath); - return lib; - } - } catch (Exception ignored) { - // This will fail on JDK 9 without --add-opens java.base/java.lang=ALL-UNNAMED - } - } - - // Then java.library.path - String paths = System.getProperty(JAVA_LIBRARY_PATH); - if (paths != null) { - lib = loadNative(context, module, libName, bundledWithLWJGL, JAVA_LIBRARY_PATH, paths); - if (lib != null) { - return lib; - } - } - } - - // METHOD 4: system-specific - if (bundledWithLWJGL) { - lib = loadNativeFromSystem(libName); - if (lib != null) { - return lib; - } - } - - if (printError) { - detectPlatformMismatch(context, module); - printError(bundledWithLWJGL); - } - throw new UnsatisfiedLinkError("Failed to locate library: " + libName); - } - - @Nullable - private static SharedLibrary loadNativeFromSystem(String libName) { - SharedLibrary lib; - try { - lib = apiCreateLibrary(libName); - String path = lib.getPath(); - apiLogMore(path == null - ? "Loaded from system paths" - : "Loaded from system paths: " + path); - } catch (UnsatisfiedLinkError e) { - lib = null; - apiLogMore(libName + " not found in system paths"); - } - return lib; - } - - @Nullable - private static SharedLibrary loadNativeFromLibraryPath(Class context, String module, String libName, boolean bundledWithLWJGL) { - String paths = Configuration.LIBRARY_PATH.get(); - if (paths == null) { - return null; - } - return loadNative(context, module, libName, bundledWithLWJGL, Configuration.LIBRARY_PATH.getProperty(), paths); - } - - @Nullable - private static SharedLibrary loadNative(Class context, String module, String libName, boolean bundledWithLWJGL, String property, String paths) { - Path libFile = findFile(paths, module, libName, bundledWithLWJGL); - if (libFile == null) { - apiLogMore(libName + " not found in " + property + "=" + paths); - return null; - } - - SharedLibrary lib = apiCreateLibrary(libFile.toAbsolutePath().toString()); - apiLogMore("Loaded from " + property + ": " + libFile); - if (bundledWithLWJGL) { - checkHash(context, libFile, module, libName); - } - return lib; - } - - /** - * Loads a shared library using {@link #loadNative(String, String)} with the name specified by {@code name}. If {@code name} is not set, - * {@link #loadNative(String, String)} will be called with the names specified by {@code defaultNames}. The first successful will be returned. - * - * @param name a {@link Configuration} that specifies the library name - * @param defaultNames the default library name(s) - * - * @return the shared library - * - * @throws UnsatisfiedLinkError if the library could not be loaded - */ - public static SharedLibrary loadNative(Class context, String module, @Nullable Configuration name, String... defaultNames) { - return loadNative(context, module, name, null, defaultNames); - } - - /** - * Loads a shared library using {@link #loadNative(String, String)} with the name specified by {@code name}. If {@code name} is not set, - * {@link #loadNative(String, String)} will be called with the names specified by {@code defaultNames}. The first successful will be returned. If the library could - * not be loaded, the {@code fallback} will be called. - * - * @param name a {@link Configuration} that specifies the library name - * @param fallback fallback to use if everything else fails - * @param defaultNames the default library name(s) - * - * @return the shared library - * - * @throws UnsatisfiedLinkError if the library could not be loaded - */ - public static SharedLibrary loadNative(Class context, String module, @Nullable Configuration name, @Nullable Supplier fallback, String... defaultNames) { - if (defaultNames.length == 0) { - throw new IllegalArgumentException("No default names specified."); - } - - if (name != null) { - String libraryName = name.get(); - if (libraryName != null) { - return loadNative(context, module, libraryName); - } - } - - if (fallback == null && defaultNames.length <= 1) { - return loadNative(context, module, defaultNames[0]); - } - - try { - return loadNative(context, module, defaultNames[0], false, false); // try first - } catch (Throwable t) { - for (int i = 1; i < defaultNames.length; i++) { // try alternatives - try { - return loadNative(context, module, defaultNames[i], false, fallback == null && i == defaultNames.length - 1); - } catch (Throwable ignored) { - } - } - if (fallback != null) { - return fallback.get(); - } - throw t; // original error - } - } - - private static String getBundledPath(String module, String resource) { - return Platform.mapLibraryPathBundled(module.replace('.', '/') + "/" + resource); - } - - @Nullable - static URL findResource(Class context, String module, String resource, boolean bundledWithLWJGL) { - URL url = null; - if (bundledWithLWJGL) { - String bundledResource = getBundledPath(module, resource); - if (!bundledResource.equals(resource)) { - url = context.getClassLoader().getResource(bundledResource); - } - } - return url == null ? context.getClassLoader().getResource(resource) : url; - } - - @Nullable - static String getRegularFilePath(URL url) { - if (url.getProtocol().equals("file")) { - try { - Path path = Paths.get(url.toURI()); - if (path.isAbsolute() && Files.isReadable(path)) { - return path.toString(); - } - } catch (URISyntaxException ignored) { - } - } - return null; - } - - @Nullable - static Path findFile(String path, String module, String file, boolean bundledWithLWJGL) { - if (bundledWithLWJGL) { - String bundledFile = getBundledPath(module, file); - if (!bundledFile.equals(file)) { - Path p = findFile(path, bundledFile); - if (p != null) { - return p; - } - } - } - return findFile(path, file); - } - - @Nullable - private static Path findFile(String path, String file) { - for (String directory : PATH_SEPARATOR.split(path)) { - Path p = Paths.get(directory, file); - if (Files.isReadable(p)) { - return p; - } - } - return null; - } - - private static void detectPlatformMismatch(Class context, String module) { - if (!module.startsWith("org.lwjgl")) { - return; - } - - String moduleTitle = module.equals("org.lwjgl") ? "lwjgl" : "lwjgl-" + module.substring("org.lwjgl.".length()); - - List platforms = new ArrayList<>(8); - try { - Enumeration manifests = context.getClassLoader().getResources(JarFile.MANIFEST_NAME); - while (manifests.hasMoreElements()) { - try (InputStream is = manifests.nextElement().openStream()) { - Manifest manifest = new Manifest(is); - Attributes attribs = manifest.getMainAttributes(); - - if (moduleTitle.equals(attribs.getValue("Implementation-Title"))) { - String jarPlatform = attribs.getValue("LWJGL-Platform"); - if (jarPlatform != null) { - platforms.add(jarPlatform); - } - } - } - } - } catch (IOException ignored) { - } - - if (!platforms.isEmpty()) { - DEBUG_STREAM.print( - "[LWJGL] Platform/architecture mismatch detected for module: " + module + - "\n\tJVM platform:" + - "\t\t" + Platform.get().getName() + " " + System.getProperty("os.arch") + " " + System.getProperty("java.version") + "\n" + - "\t\t" + System.getProperty("java.vm.name") + " v" + System.getProperty("java.vm.version") + " by " + System.getProperty("java.vm.vendor") + "\n" + - "\tPlatform" + (platforms.size() == 1 ? "" : "s") + " available on classpath:\n\t\t" + String.join("\n\t\t", platforms) + "\n" - ); - } - } - - private static void printError(boolean bundledWithLWJGL) { - printError( - "[LWJGL] Failed to load a library. Possible solutions:\n" + (bundledWithLWJGL - ? "\ta) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.\n" + - "\tb) Add the JAR that contains the shared library to the classpath." - : "\ta) Install the library or the driver that provides the library.\n" + - "\tb) Ensure that the library is accessible from the system library paths." - ) - ); - } - - static void printError(String message) { - StringBuilder sb = new StringBuilder(message); - sb.append("\n"); - - if (!DEBUG) { - sb.append("[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.\n"); - if (!Configuration.DEBUG_LOADER.get(false)) { - sb.append("[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.\n"); - } - } - - DEBUG_STREAM.print(sb); - } - - /** - * Compares the shared library hash stored in the classpath, with the hash of the actual library loaded at runtime. - * - *

    This check prints a simple warning when there's a hash mismatch, to help diagnose installation/classpath issues. It is not a security feature.

    - * - * @param context the class to use to discover the shared library hash in the classpath - * @param libFile the library file loaded - */ - private static void checkHash(Class context, Path libFile, String module, String libName) { - if (!CHECKS) { - return; - } - - try { - URL classesURL = null; - URL nativesURL = null; - - Enumeration resources = context.getClassLoader().getResources("META-INF/" + getBundledPath(module, libName) + ".sha1"); - while (resources.hasMoreElements()) { - URL url = resources.nextElement(); - if (NATIVES_JAR.matcher(url.toExternalForm()).find()) { - nativesURL = url; - } else { - classesURL = url; - } - } - if (classesURL == null) { - return; - } - - byte[] expected = getSHA1(classesURL); - byte[] actual = DEBUG || nativesURL == null - ? getSHA1(libFile) - : getSHA1(nativesURL); - - if (!Arrays.equals(expected, actual)) { - DEBUG_STREAM.println( - "[LWJGL] [ERROR] Incompatible Java and native library versions detected.\n" + - "Possible reasons:\n" + - "\ta) -Djava.library.path is set to a folder containing shared libraries of an older LWJGL version.\n" + - "\tb) The classpath contains jar files of an older LWJGL version.\n" + - "Possible solutions:\n" + - "\ta) Make sure to not set -Djava.library.path (it is not needed for developing with LWJGL 3) or make\n" + - "\t sure the folder it points to contains the shared libraries of the correct LWJGL version.\n" + - "\tb) Check the classpath and make sure to only have jar files of the same LWJGL version in it."); - } - } catch (Throwable t) { - if (DEBUG) { - apiLog("Failed to verify native library."); - t.printStackTrace(); - } - } - } - - private static byte[] getSHA1(URL hashURL) throws IOException { - byte[] hash = new byte[20]; - try (InputStream sha1 = hashURL.openStream()) { - for (int i = 0; i < 20; i++) { - hash[i] = (byte)((Character.digit(sha1.read(), 16) << 4) | Character.digit(sha1.read(), 16)); - } - } - return hash; - } - - private static byte[] getSHA1(Path libFile) throws NoSuchAlgorithmException, IOException { - MessageDigest digest = MessageDigest.getInstance("SHA-1"); - try (InputStream input = Files.newInputStream(libFile)) { - byte[] buffer = new byte[8 * 1024]; - for (int n; (n = input.read(buffer)) != -1; ) { - digest.update(buffer, 0, n); - } - } - return digest.digest(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/LibraryResource.java b/LWJGL/src/main/java/org/lwjgl/system/LibraryResource.java deleted file mode 100644 index cfec1d8a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/LibraryResource.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import java.net.*; -import java.nio.channels.*; -import java.nio.file.*; -import java.util.function.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; - -/** - * Handles loading of native resources in LWJGL. [INTERNAL USE ONLY] - * - *

    This class uses the same mechanism as {@link Library} for loading shared libraries. The resource name could be an absolute path, or a relative path that - * is resolved via {@code org.lwjgl.librarypath}, {@code java.library.path}, or even the class/module-path. When the resource is detected in the - * class/module-path, it is extracted automatically to {@code org.lwjgl.librarypath} via the {@code SharedLibraryLoader}.

    - */ -public final class LibraryResource { - - static { - Library.initialize(); - } - - private LibraryResource() {} - - /** Calls {@link #load(Class, String, String)} using {@code LibraryResource.class} as the context parameter. */ - public static Path load(String module, String name) { - return load(LibraryResource.class, module, name); - } - - /** - * Loads a library resource. - * - * @param context the class to use to discover the library resource in the classpath - * @param module the module to which the resource belongs - * @param name the resource name - * - * @return the library resource path - * - * @throws IllegalStateException if the resource could not be found - */ - @SuppressWarnings("try") - public static Path load(Class context, String module, String name) { - return load(context, module, name, false, true); - } - - /** - * Loads a library resource. - * - * @param context the class to use to discover the library resource in the classpath - * @param module the module to which the resource belongs - * @param name the resource name - * @param bundledWithLWJGL whether the default LWJGL distribution includes the resource. If true, LWJGL will also try to find the shared library under the - * {@code //} subfolder. - * - * @return the library resource path - * - * @throws IllegalStateException if the resource could not be found - */ - @SuppressWarnings("try") - public static Path load(Class context, String module, String name, boolean bundledWithLWJGL) { - return load(context, module, name, bundledWithLWJGL, true); - } - - @SuppressWarnings("try") - private static Path load(Class context, String module, String name, boolean bundledWithLWJGL, boolean printError) { - if (DEBUG) { - DEBUG_STREAM.print( - "[LWJGL] Loading library resource: " + name + - "\n\tModule: " + module + - "\n" - ); - } - - // METHOD 1: absolute path - Path path = Paths.get(name); - if (path.isAbsolute()) { - if (!Files.exists(path)) { - if (printError) { - printError(); - } - throw new IllegalStateException("Failed to locate library resource: " + name); - } - apiLogMore("Success"); - return path; - } - - // METHOD 2: org.lwjgl.librarypath - URL resourceURL = Library.findResource(context, module, name, bundledWithLWJGL); - if (resourceURL == null) { - path = loadFromLibraryPath(module, name, bundledWithLWJGL); - if (path != null) { - return path; - } - } else { - boolean debugLoader = Configuration.DEBUG_LOADER.get(false); - try { - String regular = Library.getRegularFilePath(resourceURL); - if (regular != null) { - apiLogMore("Loaded from classpath: " + regular); - return Paths.get(regular); - } - - // Always use the SLL if the resource is found in the classpath, - // so that newer versions can be detected. - if (debugLoader) { - apiLogMore("Using SharedLibraryLoader..."); - } - // Extract from classpath and try org.lwjgl.librarypath - try (FileChannel ignored = SharedLibraryLoader.load(name, name, resourceURL, null)) { - path = loadFromLibraryPath(module, name, bundledWithLWJGL); - if (path != null) { - return path; - } - } - } catch (Exception e) { - if (debugLoader) { - e.printStackTrace(DEBUG_STREAM); - } - } - } - - // METHOD 3: java.library.path - String paths = System.getProperty(Library.JAVA_LIBRARY_PATH); - if (paths != null) { - path = load(module, name, bundledWithLWJGL, Library.JAVA_LIBRARY_PATH, paths); - if (path != null) { - return path; - } - } - - if (printError) { - printError(); - } - throw new IllegalStateException("Failed to locate library resource: " + name); - } - - @Nullable - private static Path loadFromLibraryPath(String module, String libName, boolean bundledWithLWJGL) { - String paths = Configuration.LIBRARY_PATH.get(); - if (paths == null) { - return null; - } - return load(module, libName, bundledWithLWJGL, Configuration.LIBRARY_PATH.getProperty(), paths); - } - - @Nullable - private static Path load(String module, String name, boolean bundledWithLWJGL, String property, String paths) { - Path resource = Library.findFile(paths, module, name, bundledWithLWJGL); - if (resource == null) { - apiLogMore(name + " not found in " + property + "=" + paths); - return null; - } - - apiLogMore("Loaded from " + property + ": " + resource); - return resource; - } - - /** - * Loads a library resource using {@link #load(String, String)} with the name specified by {@code name}. If {@code name} is not set, - * {@link #load(String, String)} will be called with the names specified by {@code defaultNames}. The first successful will be returned. - * - * @param name a {@link Configuration} that specifies the resource name - * @param defaultNames the default resource name(s) - * - * @return the library resource path - * - * @throws IllegalStateException if the resource could not be found - */ - public static Path load(Class context, String module, Configuration name, String... defaultNames) { - return load(context, module, name, null, defaultNames); - } - - /** - * Loads a library resource using {@link #load(Class, String, String) load} with the name specified by {@code name}. If {@code name} is not set, - * {@code load} will be called with the names specified by {@code defaultNames}. The first successful will be returned. If the resource could - * not be found, the {@code fallback} will be called. - * - * @param name a {@link Configuration} that specifies the resource name - * @param fallback fallback to use if everything else fails - * @param defaultNames the default resource name(s) - * - * @return the library resource path - * - * @throws UnsatisfiedLinkError if the resource could not be found - */ - public static Path load(Class context, String module, Configuration name, @Nullable Supplier fallback, String... defaultNames) { - if (defaultNames.length == 0) { - throw new IllegalArgumentException("No default names specified."); - } - - String resourceName = name.get(); - if (resourceName != null) { - return load(context, module, resourceName); - } - - if (fallback == null && defaultNames.length <= 1) { - return load(context, module, defaultNames[0]); - } - - try { - return load(context, module, defaultNames[0], false, false); // try first - } catch (Throwable t) { - for (int i = 1; i < defaultNames.length; i++) { // try alternatives - try { - return load(context, module, defaultNames[i], false, fallback == null && i == defaultNames.length - 1); - } catch (Throwable ignored) { - } - } - if (fallback != null) { - return fallback.get(); - } - throw t; // original error - } - } - - private static void printError() { - Library.printError( - "[LWJGL] Failed to load a library resource. Possible solutions:\n" + - "\ta) Add the directory that contains the resource to -Djava.library.path or -Dorg.lwjgl.librarypath.\n" + - "\tb) Add the JAR that contains the resource to the classpath." - ); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/MathUtil.java b/LWJGL/src/main/java/org/lwjgl/system/MathUtil.java deleted file mode 100644 index e0fdf2ea..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/MathUtil.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import java.math.*; - -/** - * Math utility class. - * - *

    Method names in this class are prefixed with {@code math} to avoid ambiguities when used with static imports.

    - */ -public final class MathUtil { - - private MathUtil() { - } - - /** - * Returns true if the specified integer {@code value} is a power-of-two - * number. - * - * @param value the value to test - * - * @return true if the value if a power-of-two number. - */ - public static boolean mathIsPoT(int value) { - return Integer.bitCount(value) == 1; - } - - /** - * Rounds the specified integer {@code value} up to the next power-of-two - * number. The returned value will be equal to {@code value} if it already - * is a power-of-two number. - * - * @param value the value to round-up. Must be a number between {@code 1} and - * 1 << 30. - * - * @return the power-of-two rounded value - */ - public static int mathRoundPoT(int value) { - return 1 << (32 - Integer.numberOfLeadingZeros(value - 1)); - } - - public static boolean mathHasZeroByte(int value) { - return ((value - 0x01010101) & ~value & 0x80808080) != 0; - } - - public static boolean mathHasZeroByte(long value) { - return ((value - 0x0101010101010101L) & ~value & 0x8080808080808080L) != 0L; - } - - public static boolean mathHasZeroShort(int value) { - return ((value - 0x00010001) & ~value & 0x80008000) != 0; - } - - public static boolean mathHasZeroShort(long value) { - return ((value - 0x0001000100010001L) & ~value & 0x8000800080008000L) != 0L; - } - - /** - * Returns as a {@code long} the most significant 64 bits of the 128-bit product of two {@code uint64_t} factors. - * - * @param x the first value - * @param y the second value - * - * @return the result - */ - public static long mathMultiplyHighU64(long x, long y) { - long x0 = x & 0xFFFF_FFFFL; - long x1 = x >>> 32; - long y0 = y & 0xFFFF_FFFFL; - long y1 = y >>> 32; - - long t = x1 * y0 + ((x0 * y0) >>> 32); - - return x1 * y1 + (t >>> 32) + (((t & 0xFFFF_FFFFL) + x0 * y1) >>> 32); - } - - /** - * Returns as a {@code long} the most significant 64 bits of the 128-bit product of two {@code int64_t} factors. - * - * @param x the first value - * @param y the second value - * - * @return the result - */ - public static long mathMultiplyHighS64(long x, long y) { - long x0 = x & 0xFFFF_FFFFL; - long x1 = x >> 32; - long y0 = y & 0xFFFF_FFFFL; - long y1 = y >> 32; - - long t = x1 * y0 + ((x0 * y0) >>> 32); - - return x1 * y1 + (t >> 32) + (((t & 0xFFFF_FFFFL) + x0 * y1) >> 32); - } - - /** - * Returns the unsigned quotient of dividing the first argument by the second where each argument and the result is interpreted as an unsigned value. - * - *

    When either argument is negative (i.e. a {@code uint64_t} value higher than {@code 0x8000_0000_0000_0000L}), this method uses bit twiddling to - * implement the division. The JDK implementation uses {@link BigInteger} for this case, which has a negative impact on performance.

    - * - * @param dividend the value to be divided - * @param divisor the value doing the dividing - * - * @return the unsigned quotient of the first argument divided by the second argument - */ - public static long mathDivideUnsigned(long dividend, long divisor) { - if (0L <= divisor) { - return 0L <= dividend - ? dividend / divisor - : udivdi3(dividend, divisor); - } else { - return Long.compareUnsigned(dividend, divisor) < 0 ? 0L : 1L; - } - } - - /** - * Returns the unsigned remainder from dividing the first argument by the second where each argument and the result is interpreted as an unsigned value. - * - *

    When either argument is negative (i.e. a {@code uint64_t} value higher than {@code 0x8000_0000_0000_0000L}), this method uses bit twiddling to - * implement the remainder. The JDK implementation uses {@link BigInteger} for this case, which has a negative impact on performance.

    - * - * @param dividend the value to be divided - * @param divisor the value doing the dividing - * - * @return the unsigned remainder of the first argument divided by the second argument - */ - public static long mathRemainderUnsigned(long dividend, long divisor) { - if (0L < dividend && 0L < divisor) { - return dividend % divisor; - } else { - return Long.compareUnsigned(dividend, divisor) < 0 - ? dividend - : dividend - divisor * udivdi3(dividend, divisor); - } - } - - // Implements uint64_t / uint64_t ==> uint64_t division - // Ported from Hacker's Delight (https://github.com/hcs0/Hackers-Delight/blob/master/divDouble.c.txt) - private static long udivdi3(long u, long v) { - if (v >>> 32 == 0) { - // u < 0L in here - if (u >>> 32 < v) { - long q0 = (((u >>> 1) / v) << Long.numberOfLeadingZeros(v)) >>> 31; - if ((u - q0 * v) >= v) { - q0++; - } - return q0; - } else { - long u1 = u >>> 32; - long q1 = u1 / v; - long q0 = (((u1 - q1 * v) << 32) | (u & 0xFFFF_FFFFL)) / v; - return (q1 << 32) | q0; - } - } - - int n = Long.numberOfLeadingZeros(v); - long q0 = (((u >>> 1) / ((v << n) >>> 32)) << n) >>> 31; - if (q0 != 0) { - q0--; - } - if (Long.compareUnsigned((u - q0 * v), v) >= 0) { - q0++; - } - return q0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/MemoryAccessJNI.java b/LWJGL/src/main/java/org/lwjgl/system/MemoryAccessJNI.java deleted file mode 100644 index f8f79e42..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/MemoryAccessJNI.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system; - - -import static org.lwjgl.system.Checks.*; - -/** Memory access utilities. */ -final class MemoryAccessJNI { - - static { Library.initialize(); } - - private MemoryAccessJNI() { - throw new UnsupportedOperationException(); - } - - // --- [ getPointerSize ] --- - - /** Returns the {@code sizeof(void *)}. */ - static native int getPointerSize(); - - // --- [ malloc ] --- - - @NativeType("void * (*) (size_t)") - private static native long malloc(); - - /** Returns the address of the stdlib {@code malloc} function. */ - static final long malloc = malloc(); - - // --- [ calloc ] --- - - @NativeType("void * (*) (size_t, size_t)") - private static native long calloc(); - - /** Returns the address of the stdlib {@code calloc} function. */ - static final long calloc = calloc(); - - // --- [ realloc ] --- - - @NativeType("void * (*) (void *, size_t)") - private static native long realloc(); - - /** Returns the address of the stdlib {@code realloc} function. */ - static final long realloc = realloc(); - - // --- [ free ] --- - - @NativeType("void (*) (void *)") - private static native long free(); - - /** Returns the address of the stdlib {@code free} function. */ - static final long free = free(); - - // --- [ aligned_alloc ] --- - - @NativeType("void * (*) (size_t, size_t)") - private static native long aligned_alloc(); - - /** Returns the address of the stdlib {@code aligned_alloc} function. */ - static final long aligned_alloc = aligned_alloc(); - - // --- [ aligned_free ] --- - - @NativeType("void (*) (void *)") - private static native long aligned_free(); - - /** Returns the address of the stdlib {@code aligned_free} function. */ - static final long aligned_free = aligned_free(); - - // --- [ getByte ] --- - - /** Unsafe version of: {@link #getByte} */ - static native byte ngetByte(long ptr); - - /** - * Reads a byte value from the specified memory address. - * - * @param ptr the memory address to read - */ - @NativeType("int8_t") - static byte getByte(@NativeType("void *") long ptr) { - if (CHECKS) { - check(ptr); - } - return ngetByte(ptr); - } - - // --- [ getShort ] --- - - /** Unsafe version of: {@link #getShort} */ - static native short ngetShort(long ptr); - - /** - * Reads a short value from the specified memory address. - * - * @param ptr the memory address to read - */ - @NativeType("int16_t") - static short getShort(@NativeType("void *") long ptr) { - if (CHECKS) { - check(ptr); - } - return ngetShort(ptr); - } - - // --- [ getInt ] --- - - /** Unsafe version of: {@link #getInt} */ - static native int ngetInt(long ptr); - - /** - * Reads an int value from the specified memory address. - * - * @param ptr the memory address to read - */ - @NativeType("int32_t") - static int getInt(@NativeType("void *") long ptr) { - if (CHECKS) { - check(ptr); - } - return ngetInt(ptr); - } - - // --- [ getLong ] --- - - /** Unsafe version of: {@link #getLong} */ - static native long ngetLong(long ptr); - - /** - * Reads a long value from the specified memory address. - * - * @param ptr the memory address to read - */ - @NativeType("int64_t") - static long getLong(@NativeType("void *") long ptr) { - if (CHECKS) { - check(ptr); - } - return ngetLong(ptr); - } - - // --- [ getFloat ] --- - - /** Unsafe version of: {@link #getFloat} */ - static native float ngetFloat(long ptr); - - /** - * Reads a float value from the specified memory address. - * - * @param ptr the memory address to read - */ - static float getFloat(@NativeType("void *") long ptr) { - if (CHECKS) { - check(ptr); - } - return ngetFloat(ptr); - } - - // --- [ getDouble ] --- - - /** Unsafe version of: {@link #getDouble} */ - static native double ngetDouble(long ptr); - - /** - * Reads a double value from the specified memory address. - * - * @param ptr the memory address to read - */ - static double getDouble(@NativeType("void *") long ptr) { - if (CHECKS) { - check(ptr); - } - return ngetDouble(ptr); - } - - // --- [ getAddress ] --- - - /** Unsafe version of: {@link #getAddress} */ - static native long ngetAddress(long ptr); - - /** - * Reads a pointer address from the specified memory address. - * - * @param ptr the memory address to read - */ - @NativeType("uintptr_t") - static long getAddress(@NativeType("void *") long ptr) { - if (CHECKS) { - check(ptr); - } - return ngetAddress(ptr); - } - - // --- [ putByte ] --- - - /** Unsafe version of: {@link #putByte} */ - static native void nputByte(long ptr, byte value); - - /** - * Writes a byte value to the specified memory address. - * - * @param ptr the memory address to write - * @param value the value to write - */ - static void putByte(@NativeType("void *") long ptr, @NativeType("int8_t") byte value) { - if (CHECKS) { - check(ptr); - } - nputByte(ptr, value); - } - - // --- [ putShort ] --- - - /** Unsafe version of: {@link #putShort} */ - static native void nputShort(long ptr, short value); - - /** - * Writes a short value to the specified memory address. - * - * @param ptr the memory address to write - * @param value the value to write - */ - static void putShort(@NativeType("void *") long ptr, @NativeType("int16_t") short value) { - if (CHECKS) { - check(ptr); - } - nputShort(ptr, value); - } - - // --- [ putInt ] --- - - /** Unsafe version of: {@link #putInt} */ - static native void nputInt(long ptr, int value); - - /** - * Writes an int value to the specified memory address. - * - * @param ptr the memory address to write - * @param value the value to write - */ - static void putInt(@NativeType("void *") long ptr, @NativeType("int32_t") int value) { - if (CHECKS) { - check(ptr); - } - nputInt(ptr, value); - } - - // --- [ putLong ] --- - - /** Unsafe version of: {@link #putLong} */ - static native void nputLong(long ptr, long value); - - /** - * Writes a long value to the specified memory address. - * - * @param ptr the memory address to write - * @param value the value to write - */ - static void putLong(@NativeType("void *") long ptr, @NativeType("int64_t") long value) { - if (CHECKS) { - check(ptr); - } - nputLong(ptr, value); - } - - // --- [ putFloat ] --- - - /** Unsafe version of: {@link #putFloat} */ - static native void nputFloat(long ptr, float value); - - /** - * Writes a float value to the specified memory address. - * - * @param ptr the memory address to write - * @param value the value to write - */ - static void putFloat(@NativeType("void *") long ptr, float value) { - if (CHECKS) { - check(ptr); - } - nputFloat(ptr, value); - } - - // --- [ putDouble ] --- - - /** Unsafe version of: {@link #putDouble} */ - static native void nputDouble(long ptr, double value); - - /** - * Writes a double value to the specified memory address. - * - * @param ptr the memory address to write - * @param value the value to write - */ - static void putDouble(@NativeType("void *") long ptr, double value) { - if (CHECKS) { - check(ptr); - } - nputDouble(ptr, value); - } - - // --- [ putAddress ] --- - - /** Unsafe version of: {@link #putAddress} */ - static native void nputAddress(long ptr, long value); - - /** - * Writes a pointer address to the specified memory address. - * - * @param ptr the memory address to write - * @param value the value to write - */ - static void putAddress(@NativeType("void *") long ptr, @NativeType("uintptr_t") long value) { - if (CHECKS) { - check(ptr); - } - nputAddress(ptr, value); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/MemoryManage.java b/LWJGL/src/main/java/org/lwjgl/system/MemoryManage.java deleted file mode 100644 index b71af09d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/MemoryManage.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.system.libffi.*; - -import javax.annotation.*; -import java.util.*; -import java.util.Map.*; -import java.util.concurrent.*; -import java.util.concurrent.atomic.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.StackWalkUtil.*; -import static org.lwjgl.system.libc.LibCStdlib.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** Provides {@link MemoryAllocator} implementations for {@link MemoryUtil} to use. */ -final class MemoryManage { - - private MemoryManage() { - } - - static MemoryAllocator getInstance() { - Object allocator = Configuration.MEMORY_ALLOCATOR.get(); - if (allocator instanceof MemoryAllocator) { - return (MemoryAllocator)allocator; - } - - if (!"system".equals(allocator)) { - String className; - if (allocator == null || "jemalloc".equals(allocator)) { - className = "org.lwjgl.system.jemalloc.JEmallocAllocator"; - } else if ("rpmalloc".equals(allocator)) { - className = "org.lwjgl.system.rpmalloc.RPmallocAllocator"; - } else { - className = allocator.toString(); - } - - try { - Class allocatorClass = Class.forName(className); - return (MemoryAllocator)allocatorClass.getConstructor().newInstance(); - } catch (Throwable t) { - if (Checks.DEBUG && allocator != null) { - t.printStackTrace(DEBUG_STREAM); - } - apiLog(String.format("Warning: Failed to instantiate memory allocator: %s. Using the system default.", className)); - } - } - - return new StdlibAllocator(); - } - - /** stdlib memory allocator. */ - private static class StdlibAllocator implements MemoryAllocator { - - @Override public long getMalloc() { return MemoryAccessJNI.malloc; } - @Override public long getCalloc() { return MemoryAccessJNI.calloc; } - @Override public long getRealloc() { return MemoryAccessJNI.realloc; } - @Override public long getFree() { return MemoryAccessJNI.free; } - @Override public long getAlignedAlloc() { return MemoryAccessJNI.aligned_alloc; } - @Override public long getAlignedFree() { return MemoryAccessJNI.aligned_free; } - - @Override public long malloc(long size) { return nmalloc(size); } - @Override public long calloc(long num, long size) { return ncalloc(num, size); } - @Override public long realloc(long ptr, long size) { return nrealloc(ptr, size); } - @Override public void free(long ptr) { nfree(ptr); } - @Override public long aligned_alloc(long alignment, long size) { return naligned_alloc(alignment, size); } - @Override public void aligned_free(long ptr) { naligned_free(ptr); } - - } - - /** Wraps a MemoryAllocator to track allocations and detect memory leaks. */ - static class DebugAllocator implements MemoryAllocator { - - private static final ConcurrentMap ALLOCATIONS = new ConcurrentHashMap<>(); - private static final ConcurrentMap THREADS = new ConcurrentHashMap<>(); - - private final MemoryAllocator allocator; - - private final long[] callbacks; - - DebugAllocator(MemoryAllocator allocator) { - this.allocator = allocator; - - this.callbacks = new long[] { - new CallbackI() { - @Override public FFICIF getCallInterface() { - return apiCreateCIF(FFI_DEFAULT_ABI, ffi_type_pointer, ffi_type_pointer); - } - @Override public void callback(long ret, long args) { - long size = memGetAddress(memGetAddress(args)); - memPutAddress(ret, malloc(size)); - } - }.address(), - new CallbackI() { - @Override public FFICIF getCallInterface() { - return apiCreateCIF(FFI_DEFAULT_ABI, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer); - } - @Override public void callback(long ret, long args) { - long num = memGetAddress(memGetAddress(args)); - long size = memGetAddress(memGetAddress(args + POINTER_SIZE)); - memPutAddress(ret, calloc(num, size)); - } - }.address(), - new CallbackI() { - @Override public FFICIF getCallInterface() { - return apiCreateCIF(FFI_DEFAULT_ABI, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer); - } - @Override public void callback(long ret, long args) { - long ptr = memGetAddress(memGetAddress(args)); - long size = memGetAddress(memGetAddress(args + POINTER_SIZE)); - memPutAddress(ret, realloc(ptr, size)); - } - }.address(), - new CallbackI() { - @Override public FFICIF getCallInterface() { - return apiCreateCIF(FFI_DEFAULT_ABI, ffi_type_void, ffi_type_pointer); - } - @Override public void callback(long ret, long args) { - long ptr = memGetAddress(memGetAddress(args)); - free(ptr); - } - }.address(), - new CallbackI() { - @Override public FFICIF getCallInterface() { - return apiCreateCIF(FFI_DEFAULT_ABI, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer); - } - @Override public void callback(long ret, long args) { - long alignment = memGetAddress(memGetAddress(args)); - long size = memGetAddress(memGetAddress(args + POINTER_SIZE)); - memPutAddress(ret, aligned_alloc(alignment, size)); - } - }.address(), - new CallbackI() { - @Override public FFICIF getCallInterface() { - return apiCreateCIF(FFI_DEFAULT_ABI, ffi_type_void, ffi_type_pointer); - } - @Override public void callback(long ret, long args) { - long ptr = memGetAddress(memGetAddress(args)); - aligned_free(ptr); - } - }.address() - }; - - Runtime.getRuntime().addShutdownHook(new Thread(() -> { - for (long callback : callbacks) { - Callback.free(callback); - } - - if (ALLOCATIONS.isEmpty()) { - return; - } - - boolean missingStacktrace = false; - for (Allocation allocation : ALLOCATIONS.keySet()) { - StringBuilder sb = new StringBuilder(512); - - sb - .append("[LWJGL] ") - .append(allocation.size) - .append(" bytes leaked, thread ") - .append(allocation.threadId) - .append(" (") - .append(THREADS.get(allocation.threadId)) - .append("), address: 0x") - .append(Long.toHexString(allocation.address).toUpperCase()) - .append("\n"); - - StackTraceElement[] stackTrace = allocation.getElements(); - if (stackTrace != null) { - for (Object el : stackTrace) { - sb - .append("\tat ") - .append(el.toString()) - .append("\n"); - } - } else { - missingStacktrace = true; - } - - DEBUG_STREAM.print(sb); - } - - if (missingStacktrace) { - DEBUG_STREAM.print("[LWJGL] Reminder: disable Configuration.DEBUG_MEMORY_ALLOCATOR_FAST to get stacktraces of leaking allocations.\n"); - } - })); - } - - @Override public long getMalloc() { return callbacks[0]; } - @Override public long getCalloc() { return callbacks[1]; } - @Override public long getRealloc() { return callbacks[2]; } - @Override public long getFree() { return callbacks[3]; } - @Override public long getAlignedAlloc() { return callbacks[4]; } - @Override public long getAlignedFree() { return callbacks[5]; } - - @Override public long malloc(long size) { - return track(allocator.malloc(size), size); - } - - @Override - public long calloc(long num, long size) { - return track(allocator.calloc(num, size), num * size); - } - - @Override - public long realloc(long ptr, long size) { - /* - realloc semantics: - a) if size == 0 and ptr != NULL => free(ptr), return NULL - b) if size != 0 and ptr == NULL => malloc(size), return new address - c) if ptr != NULL and size < oldSize => - 1) reduce size, return ptr - 2) malloc new address, memcpy, free(ptr), return new address - d) if ptr != NULL and oldSize < size => - 1) expand size, return ptr - 2) malloc new address, memcpy, free(ptr), return new address - 3) malloc fails, return NULL - */ - - long oldSize = untrack(ptr); - - long address = allocator.realloc(ptr, size); - - if (address != NULL) { - track(address, size); - } else if (size != 0L) { - track(ptr, oldSize); // d3 - } - - return address; - } - - @Override - public void free(long ptr) { - untrack(ptr); - allocator.free(ptr); - } - - @Override - public long aligned_alloc(long alignment, long size) { - return track(allocator.aligned_alloc(alignment, size), size); - } - - @Override - public void aligned_free(long ptr) { - untrack(ptr); - allocator.aligned_free(ptr); - } - - static long track(long address, long size) { - if (address != NULL) { - Thread t = Thread.currentThread(); - THREADS.putIfAbsent(t.getId(), t.getName()); - - Allocation allocationNew = new Allocation( - address, - size, - t.getId(), - Configuration.DEBUG_MEMORY_ALLOCATOR_FAST.get(false) ? null : stackWalkGetTrace() - ); - - Allocation allocationOld = ALLOCATIONS.put(allocationNew, allocationNew); - if (allocationOld != null) { - trackAbort(address, allocationOld, allocationNew); - } - } - - return address; - } - private static void trackAbort(long address, Allocation allocationOld, Allocation allocationNew) { - String addressHex = Long.toHexString(address).toUpperCase(); - - trackAbortPrint(allocationOld, "Old", addressHex); - trackAbortPrint(allocationNew, "New", addressHex); - - throw new IllegalStateException("The memory address specified is already being tracked: 0x" + addressHex); - } - private static void trackAbortPrint(Allocation allocation, String name, String address) { - StringBuilder sb = new StringBuilder(512); - - sb - .append("[LWJGL] ") - .append(name) - .append(" allocation with size ") - .append(allocation.size) - .append(", thread ") - .append(allocation.threadId) - .append(" (") - .append(THREADS.get(allocation.threadId)) - .append("), address: 0x") - .append(address) - .append("\n"); - - StackTraceElement[] stackTrace = allocation.getElements(); - if (stackTrace != null) { - for (Object el : stackTrace) { - sb - .append("\tat ") - .append(el.toString()) - .append("\n"); - } - } - - DEBUG_STREAM.print(sb); - } - - static long untrack(long address) { - if (address == NULL) { - return 0L; - } - - Allocation allocation = ALLOCATIONS.remove(new Allocation(address, 0L, NULL, null)); - if (allocation == null) { - untrackAbort(address); - } - - return allocation.size; - } - private static void untrackAbort(long address) { - String addressHex = Long.toHexString(address).toUpperCase(); - - throw new IllegalStateException("The memory address specified is not being tracked: 0x" + addressHex); - } - - private static class Allocation { - - final long address; - final long size; - final long threadId; - - @Nullable - private final Object[] stacktrace; - - Allocation(long address, long size, long threadId, @Nullable Object[] stacktrace) { - this.address = address; - this.size = size; - this.threadId = threadId; - this.stacktrace = stacktrace; - } - - @Nullable - private StackTraceElement[] getElements() { - return stacktrace == null ? null : stackWalkArray(stacktrace); - } - - @SuppressWarnings("EqualsWhichDoesntCheckParameterClass") - @Override - public boolean equals(Object other) { - return this.address == ((Allocation)other).address; - } - - @Override - public int hashCode() { - return Long.hashCode(address); - } - - } - - static void report(MemoryAllocationReport report) { - for (Allocation allocation : ALLOCATIONS.keySet()) { - report.invoke(allocation.address, allocation.size, allocation.threadId, THREADS.get(allocation.threadId), allocation.getElements()); - } - } - - private static void aggregate(T t, long size, Map map) { - AtomicLong node = map.computeIfAbsent(t, k -> new AtomicLong()); - node.set(node.get() + size); - } - - static void report( - MemoryAllocationReport report, - MemoryAllocationReport.Aggregate groupByStackTrace, - boolean groupByThread - ) { - switch (groupByStackTrace) { - case ALL: - reportAll(report, groupByThread); - break; - case GROUP_BY_METHOD: - reportByMethod(report, groupByThread); - break; - case GROUP_BY_STACKTRACE: - reportByStacktrace(report, groupByThread); - break; - } - } - private static void reportAll(MemoryAllocationReport report, boolean groupByThread) { - if (groupByThread) { - Map mapThread = new HashMap<>(); - for (Allocation allocation : ALLOCATIONS.values()) { - aggregate(allocation.threadId, allocation.size, mapThread); - } - for (Entry entry : mapThread.entrySet()) { - report.invoke(NULL, entry.getValue().get(), entry.getKey(), THREADS.get(entry.getKey()), (StackTraceElement[])null); - } - } else { - long total = 0L; - for (Allocation allocation : ALLOCATIONS.values()) { - total += allocation.size; - } - report.invoke(NULL, total, NULL, null, (StackTraceElement[])null); - } - } - private static void reportByMethod(MemoryAllocationReport report, boolean groupByThread) { - // Group by stackTrace[0] - if (groupByThread) { - Map> mapThreadMethod = new HashMap<>(); - for (Allocation allocation : ALLOCATIONS.keySet()) { - StackTraceElement[] elements = allocation.getElements(); - if (elements != null) { - Map mapMethod = mapThreadMethod.computeIfAbsent(allocation.threadId, k -> new HashMap<>()); - aggregate(elements[0], allocation.size, mapMethod); - } - } - - for (Entry> tms : mapThreadMethod.entrySet()) { - long threadId = tms.getKey(); - String threadName = THREADS.get(threadId); - for (Entry ms : tms.getValue().entrySet()) { - report.invoke(NULL, ms.getValue().get(), threadId, threadName, ms.getKey()); - } - } - } else { - Map mapMethod = new HashMap<>(); - for (Allocation allocation : ALLOCATIONS.keySet()) { - StackTraceElement[] elements = allocation.getElements(); - if (elements != null) { - aggregate(elements[0], allocation.size, mapMethod); - } - } - for (Entry ms : mapMethod.entrySet()) { - report.invoke(NULL, ms.getValue().get(), NULL, null, ms.getKey()); - } - } - } - private static void reportByStacktrace(MemoryAllocationReport report, boolean groupByThread) { - // Group by stackTrace[] - if (groupByThread) { - Map> mapThreadStackTrace = new HashMap<>(); - for (Allocation allocation : ALLOCATIONS.keySet()) { - StackTraceElement[] elements = allocation.getElements(); - if (elements != null) { - Map mapStackTrace = mapThreadStackTrace.computeIfAbsent(allocation.threadId, k -> new HashMap<>()); - aggregate(new AllocationKey(elements), allocation.size, mapStackTrace); - } - - } - - for (Entry> tss : mapThreadStackTrace.entrySet()) { - long threadId = tss.getKey(); - for (Entry ss : tss.getValue().entrySet()) { - report.invoke(NULL, ss.getValue().get(), threadId, THREADS.get(threadId), ss.getKey().elements); - } - } - } else { - Map mapStackTrace = new HashMap<>(); - for (Allocation allocation : ALLOCATIONS.keySet()) { - StackTraceElement[] elements = allocation.getElements(); - if (elements != null) { - aggregate(new AllocationKey(elements), allocation.size, mapStackTrace); - } - } - for (Entry ss : mapStackTrace.entrySet()) { - report.invoke(NULL, ss.getValue().get(), NULL, null, ss.getKey().elements); - } - } - } - // Used by GROUP_BY_STACKTRACE only. - private static class AllocationKey { - - final StackTraceElement[] elements; - - AllocationKey(StackTraceElement[] elements) { - this.elements = elements; - } - - @SuppressWarnings("EqualsWhichDoesntCheckParameterClass") - @Override public boolean equals(Object other) { - return this == other || Arrays.equals(elements, ((AllocationKey)other).elements); - } - - @Override public int hashCode() { - return Arrays.hashCode(elements); - } - - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/MemoryStack.java b/LWJGL/src/main/java/org/lwjgl/system/MemoryStack.java deleted file mode 100644 index b5eea83c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/MemoryStack.java +++ /dev/null @@ -1,1127 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; - -import javax.annotation.*; -import java.nio.*; -import java.util.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.StackWalkUtil.*; - -/** - * An off-heap memory stack. - * - *

    This class should be used in a thread-local manner for stack allocations.

    - * - * @see Configuration#STACK_SIZE - * @see Configuration#DEBUG_STACK - */ -public class MemoryStack extends Pointer.Default implements AutoCloseable { - - private static final int DEFAULT_STACK_SIZE = Configuration.STACK_SIZE.get(64) * 1024; - private static final int DEFAULT_STACK_FRAMES = 8; - - private static final ThreadLocal TLS = ThreadLocal.withInitial(MemoryStack::create); - - static { - if (DEFAULT_STACK_SIZE < 0) { - throw new IllegalStateException("Invalid stack size."); - } - } - - @SuppressWarnings({"FieldCanBeLocal", "unused"}) - @Nullable - private final ByteBuffer container; - - private final int size; - - private int pointer; - - private int[] frames; - protected int frameIndex; - - /** - * Creates a new {@code MemoryStack} backed by the specified memory region. - * - *

    In the initial state, there is no active stack frame. The {@link #push} method must be used before any allocations.

    - * - * @param container the backing memory buffer, may be null - * @param address the backing memory address - * @param size the backing memory size - */ - protected MemoryStack(@Nullable ByteBuffer container, long address, int size) { - super(address); - this.container = container; - - this.size = size; - this.pointer = size; - - this.frames = new int[DEFAULT_STACK_FRAMES]; - } - - /** - * Creates a new {@code MemoryStack} with the default size. - * - *

    In the initial state, there is no active stack frame. The {@link #push} method must be used before any allocations.

    - */ - public static MemoryStack create() { - return create(DEFAULT_STACK_SIZE); - } - - /** - * Creates a new {@code MemoryStack} with the specified size. - * - *

    In the initial state, there is no active stack frame. The {@link #push} method must be used before any allocations.

    - * - * @param capacity the maximum number of bytes that may be allocated on the stack - */ - public static MemoryStack create(int capacity) { - return create(BufferUtils.createByteBuffer(capacity)); - } - - /** - * Creates a new {@code MemoryStack} backed by the specified memory buffer. - * - *

    In the initial state, there is no active stack frame. The {@link #push} method must be used before any allocations.

    - * - * @param buffer the backing memory buffer - */ - public static MemoryStack create(ByteBuffer buffer) { - long address = memAddress(buffer); - int size = buffer.remaining(); - return Configuration.DEBUG_STACK.get(false) - ? new DebugMemoryStack(buffer, address, size) - : new MemoryStack(buffer, address, size); - } - - /** - * Creates a new {@code MemoryStack} backed by the specified memory region. - * - *

    In the initial state, there is no active stack frame. The {@link #push} method must be used before any allocations.

    - * - * @param address the backing memory address - * @param size the backing memory size - */ - public static MemoryStack ncreate(long address, int size) { - return Configuration.DEBUG_STACK.get(false) - ? new DebugMemoryStack(null, address, size) - : new MemoryStack(null, address, size); - } - - /** - * Stores the current stack pointer and pushes a new frame to the stack. - * - *

    This method should be called when entering a method, before doing any stack allocations. When exiting a method, call the {@link #pop} method to - * restore the previous stack frame.

    - * - *

    Pairs of push/pop calls may be nested. Care must be taken to:

    - *
      - *
    • match every push with a pop
    • - *
    • not call pop before push has been called at least once
    • - *
    • not nest push calls to more than the maximum supported depth
    • - *
    - * - * @return this stack - */ - public MemoryStack push() { - if (frameIndex == frames.length) { - frameOverflow(); - } - - frames[frameIndex++] = pointer; - return this; - } - - private void frameOverflow() { - if (DEBUG) { - apiLog("[WARNING] Out of frame stack space (" + frames.length + ") in thread: " + Thread.currentThread()); - } - frames = Arrays.copyOf(frames, frames.length * 3 / 2); - } - - /** - * Pops the current stack frame and moves the stack pointer to the end of the previous stack frame. - * - * @return this stack - */ - public MemoryStack pop() { - pointer = frames[--frameIndex]; - return this; - } - - /** - * Calls {@link #pop} on this {@code MemoryStack}. - * - *

    This method should not be used directly. It is called automatically when the {@code MemoryStack} is used as a resource in a try-with-resources - * statement.

    - */ - @Override - public void close() { - //noinspection resource - pop(); - } - - /** Stores the method that pushed a frame and checks if it is the same method when the frame is popped. */ - private static class DebugMemoryStack extends MemoryStack { - - private Object[] debugFrames; - - DebugMemoryStack(@Nullable ByteBuffer buffer, long address, int size) { - super(buffer, address, size); - debugFrames = new Object[DEFAULT_STACK_FRAMES]; - } - - @Override - public MemoryStack push() { - if (frameIndex == debugFrames.length) { - frameOverflow(); - } - - debugFrames[frameIndex] = stackWalkGetMethod(MemoryStack.class); - - return super.push(); - } - - private void frameOverflow() { - debugFrames = Arrays.copyOf(debugFrames, debugFrames.length * 3 / 2); - } - - @Override - public MemoryStack pop() { - Object pushed = debugFrames[frameIndex - 1]; - Object popped = stackWalkCheckPop(MemoryStack.class, pushed); - if (popped != null) { - reportAsymmetricPop(pushed, popped); - } - - debugFrames[frameIndex - 1] = null; - return super.pop(); - } - - // No need to check pop in try-with-resources - @Override - public void close() { - debugFrames[frameIndex - 1] = null; - super.pop(); - } - - private static void reportAsymmetricPop(Object pushed, Object popped) { - DEBUG_STREAM.format( - "[LWJGL] Asymmetric pop detected:\n\tPUSHED: %s\n\tPOPPED: %s\n\tTHREAD: %s\n", - pushed, - popped, - Thread.currentThread() - ); - } - - } - - /** - * Returns the address of the backing off-heap memory. - * - *

    The stack grows "downwards", so the bottom of the stack is at {@code address + size}, while the top is at {@code address}.

    - */ - public long getAddress() { - return address; - } - - /** - * Returns the size of the backing off-heap memory. - * - *

    This is the maximum number of bytes that may be allocated on the stack.

    - */ - public int getSize() { - return size; - } - - /** - * Returns the current frame index. - * - *

    This is the current number of nested {@link #push} calls.

    - */ - public int getFrameIndex() { - return frameIndex; - } - - /** Returns the memory address at the current stack pointer. */ - public long getPointerAddress() { - return address + (pointer & 0xFFFF_FFFFL); - } - - /** - * Returns the current stack pointer. - * - *

    The stack grows "downwards", so when the stack is empty {@code pointer} is equal to {@code size}. On every allocation {@code pointer} is reduced by - * the allocated size (after alignment) and {@code address + pointer} points to the first byte of the last allocation.

    - * - *

    Effectively, this methods returns how many more bytes may be allocated on the stack.

    - */ - public int getPointer() { - return pointer; - } - - /** - * Sets the current stack pointer. - * - *

    This method directly manipulates the stack pointer. Using it irresponsibly may break the internal state of the stack. It should only be used in rare - * cases or in auto-generated code.

    - */ - public void setPointer(int pointer) { - if (CHECKS) { - checkPointer(pointer); - } - - this.pointer = pointer; - } - - private void checkPointer(int pointer) { - if (pointer < 0 || size < pointer) { - throw new IndexOutOfBoundsException("Invalid stack pointer"); - } - } - - private static void checkAlignment(int alignment) { - if (Integer.bitCount(alignment) != 1) { - throw new IllegalArgumentException("Alignment must be a power-of-two value."); - } - } - - /** - * Calls {@link #nmalloc(int, int)} with {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}. - * - * @param size the allocation size - * - * @return the memory address on the stack for the requested allocation - */ - public long nmalloc(int size) { - return nmalloc(POINTER_SIZE, size); - } - - /** - * Allocates a block of {@code size} bytes of memory on the stack. The content of the newly allocated block of memory is not initialized, remaining with - * indeterminate values. - * - * @param alignment the required alignment - * @param size the allocation size - * - * @return the memory address on the stack for the requested allocation - */ - public long nmalloc(int alignment, int size) { - // Align address to the specified alignment - long address = (this.address + pointer - size) & ~Integer.toUnsignedLong(alignment - 1); - - pointer = (int)(address - this.address); - if (CHECKS && pointer < 0) { - throw new OutOfMemoryError("Out of stack space."); - } - - return address; - } - - /** - * Allocates a block of memory on the stack for an array of {@code num} elements, each of them {@code size} bytes long, and initializes all its bits to - * zero. - * - * @param alignment the required element alignment - * @param num num the number of elements to allocate - * @param size the size of each element - * - * @return the memory address on the stack for the requested allocation - */ - public long ncalloc(int alignment, int num, int size) { - int bytes = num * size; - long address = nmalloc(alignment, bytes); - memSet(address, 0, bytes); - return address; - } - - // ------------------------------------------------- - - /** - * Allocates an aligned {@link ByteBuffer} on the stack. - * - * @param alignment the required buffer alignment - * @param size the number of elements in the buffer - * - * @return the allocated buffer - */ - public ByteBuffer malloc(int alignment, int size) { - if (DEBUG) { - checkAlignment(alignment); - } - return MemoryUtil.wrap(BUFFER_BYTE, nmalloc(alignment, size), size).order(NATIVE_ORDER); - } - /** Calloc version of {@link #malloc(int, int)}. */ - public ByteBuffer calloc(int alignment, int size) { - if (DEBUG) { - checkAlignment(alignment); - } - return MemoryUtil.wrap(BUFFER_BYTE, ncalloc(alignment, size, 1), size).order(NATIVE_ORDER); - } - - /** - * Allocates a {@link ByteBuffer} on the stack with {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}. - * - * @param size the number of elements in the buffer - * - * @return the allocated buffer - */ - public ByteBuffer malloc(int size) { - return MemoryUtil.wrap(BUFFER_BYTE, nmalloc(POINTER_SIZE, size), size).order(NATIVE_ORDER); - } - /** Calloc version of {@link #malloc(int)}. */ - public ByteBuffer calloc(int size) { - return MemoryUtil.wrap(BUFFER_BYTE, ncalloc(POINTER_SIZE, size, 1), size).order(NATIVE_ORDER); - } - - /** Unsafe version of {@link #bytes(byte)}. */ - public long nbyte(byte value) { - long a = nmalloc(1, 1); - memPutByte(a, value); - return a; - } - /** Single value version of {@link #malloc}. */ - public ByteBuffer bytes(byte x) { return malloc(1, 1).put(0, x); } - /** Two value version of {@link #malloc}. */ - public ByteBuffer bytes(byte x, byte y) { return malloc(1, 2).put(0, x).put(1, y); } - /** Three value version of {@link #malloc}. */ - public ByteBuffer bytes(byte x, byte y, byte z) { return malloc(1, 3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #malloc}. */ - public ByteBuffer bytes(byte x, byte y, byte z, byte w) { return malloc(1, 4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #malloc}. */ - public ByteBuffer bytes(byte... values) { - ByteBuffer buffer = malloc(1, values.length).put(values); - buffer.flip(); - return buffer; - } - - // ------------------------------------------------- - - /** Short version of {@link #malloc(int)}. */ - public ShortBuffer mallocShort(int size) { return MemoryUtil.wrap(BUFFER_SHORT, nmalloc(2, size << 1), size); } - /** Short version of {@link #calloc(int)}. */ - public ShortBuffer callocShort(int size) { - int bytes = size * 2; - long address = nmalloc(2, bytes); - memSet(address, 0, bytes); - return MemoryUtil.wrap(BUFFER_SHORT, address, size); - } - - /** Unsafe version of {@link #shorts(short)}. */ - public long nshort(short value) { - long a = nmalloc(2, 2); - memPutShort(a, value); - return a; - } - /** Single value version of {@link #mallocShort}. */ - public ShortBuffer shorts(short x) { return mallocShort(1).put(0, x); } - /** Two value version of {@link #mallocShort}. */ - public ShortBuffer shorts(short x, short y) { return mallocShort(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocShort}. */ - public ShortBuffer shorts(short x, short y, short z) { return mallocShort(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocShort}. */ - public ShortBuffer shorts(short x, short y, short z, short w) { return mallocShort(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocShort}. */ - public ShortBuffer shorts(short... values) { - ShortBuffer buffer = mallocShort(values.length).put(values); - buffer.flip(); - return buffer; - } - - // ------------------------------------------------- - - /** Int version of {@link #malloc(int)}. */ - public IntBuffer mallocInt(int size) { return MemoryUtil.wrap(BUFFER_INT, nmalloc(4, size << 2), size); } - /** Int version of {@link #calloc(int)}. */ - public IntBuffer callocInt(int size) { - int bytes = size * 4; - long address = nmalloc(4, bytes); - memSet(address, 0, bytes); - return MemoryUtil.wrap(BUFFER_INT, address, size); - } - - /** Unsafe version of {@link #ints(int)}. */ - public long nint(int value) { - long a = nmalloc(4, 4); - memPutInt(a, value); - return a; - } - /** Single value version of {@link #mallocInt}. */ - public IntBuffer ints(int x) { return mallocInt(1).put(0, x); } - /** Two value version of {@link #mallocInt}. */ - public IntBuffer ints(int x, int y) { return mallocInt(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocInt}. */ - public IntBuffer ints(int x, int y, int z) { return mallocInt(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocInt}. */ - public IntBuffer ints(int x, int y, int z, int w) { return mallocInt(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocInt}. */ - public IntBuffer ints(int... values) { - IntBuffer buffer = mallocInt(values.length).put(values); - buffer.flip(); - return buffer; - } - - // ------------------------------------------------- - - /** Long version of {@link #malloc(int)}. */ - public LongBuffer mallocLong(int size) { return MemoryUtil.wrap(BUFFER_LONG, nmalloc(8, size << 3), size); } - /** Long version of {@link #calloc(int)}. */ - public LongBuffer callocLong(int size) { - int bytes = size * 8; - long address = nmalloc(8, bytes); - memSet(address, 0, bytes); - return MemoryUtil.wrap(BUFFER_LONG, address, size); - } - - /** Unsafe version of {@link #longs(long)}. */ - public long nlong(long value) { - long a = nmalloc(8, 8); - memPutLong(a, value); - return a; - } - /** Single value version of {@link #mallocLong}. */ - public LongBuffer longs(long x) { return mallocLong(1).put(0, x); } - /** Two value version of {@link #mallocLong}. */ - public LongBuffer longs(long x, long y) { return mallocLong(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocLong}. */ - public LongBuffer longs(long x, long y, long z) { return mallocLong(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocLong}. */ - public LongBuffer longs(long x, long y, long z, long w) { return mallocLong(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocLong}. */ - public LongBuffer longs(long... more) { - LongBuffer buffer = mallocLong(more.length).put(more); - buffer.flip(); - return buffer; - } - - // ------------------------------------------------- - - /** CLong version of {@link #malloc(int)}. */ - public CLongBuffer mallocCLong(int size) { return CLongBuffer.create(nmalloc(CLONG_SIZE, size << CLONG_SHIFT), size); } - /** CLong version of {@link #calloc(int)}. */ - public CLongBuffer callocCLong(int size) { - int bytes = size * CLONG_SIZE; - long address = nmalloc(CLONG_SIZE, bytes); - memSet(address, 0, bytes); - return CLongBuffer.create(address, size); - } - - /** Unsafe version of {@link #clongs(long)}. */ - public long nclong(long value) { - long a = nmalloc(CLONG_SIZE, CLONG_SIZE); - memPutCLong(a, value); - return a; - } - /** Single value version of {@link #mallocCLong}. */ - public CLongBuffer clongs(long x) { return mallocCLong(1).put(0, x); } - /** Two value version of {@link #mallocCLong}. */ - public CLongBuffer clongs(long x, long y) { return mallocCLong(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocCLong}. */ - public CLongBuffer clongs(long x, long y, long z) { return mallocCLong(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocCLong}. */ - public CLongBuffer clongs(long x, long y, long z, long w) { return mallocCLong(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocCLong}. */ - public CLongBuffer clongs(long... values) { - CLongBuffer buffer = mallocCLong(values.length).put(values); - buffer.flip(); - return buffer; - } - - // ------------------------------------------------- - - /** Float version of {@link #malloc(int)}. */ - public FloatBuffer mallocFloat(int size) { return MemoryUtil.wrap(BUFFER_FLOAT, nmalloc(4, size << 2), size); } - /** Float version of {@link #calloc(int)}. */ - public FloatBuffer callocFloat(int size) { - int bytes = size * 4; - long address = nmalloc(4, bytes); - memSet(address, 0, bytes); - return MemoryUtil.wrap(BUFFER_FLOAT, address, size); - } - - /** Unsafe version of {@link #floats(float)}. */ - public long nfloat(float value) { - long a = nmalloc(4, 4); - memPutFloat(a, value); - return a; - } - /** Single value version of {@link #mallocFloat}. */ - public FloatBuffer floats(float x) { return mallocFloat(1).put(0, x); } - /** Two value version of {@link #mallocFloat}. */ - public FloatBuffer floats(float x, float y) { return mallocFloat(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocFloat}. */ - public FloatBuffer floats(float x, float y, float z) { return mallocFloat(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocFloat}. */ - public FloatBuffer floats(float x, float y, float z, float w) { return mallocFloat(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocFloat}. */ - public FloatBuffer floats(float... values) { - FloatBuffer buffer = mallocFloat(values.length).put(values); - buffer.flip(); - return buffer; - } - - // ------------------------------------------------- - - /** Double version of {@link #malloc(int)}. */ - public DoubleBuffer mallocDouble(int size) { return MemoryUtil.wrap(BUFFER_DOUBLE, nmalloc(8, size << 3), size); } - /** Double version of {@link #calloc(int)}. */ - public DoubleBuffer callocDouble(int size) { - int bytes = size * 8; - long address = nmalloc(8, bytes); - memSet(address, 0, bytes); - return MemoryUtil.wrap(BUFFER_DOUBLE, address, size); - } - - /** Unsafe version of {@link #doubles(double)}. */ - public long ndouble(double value) { - long a = nmalloc(8, 8); - memPutDouble(a, value); - return a; - } - /** Single value version of {@link #mallocDouble}. */ - public DoubleBuffer doubles(double x) { return mallocDouble(1).put(0, x); } - /** Two value version of {@link #mallocDouble}. */ - public DoubleBuffer doubles(double x, double y) { return mallocDouble(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocDouble}. */ - public DoubleBuffer doubles(double x, double y, double z) { return mallocDouble(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocDouble}. */ - public DoubleBuffer doubles(double x, double y, double z, double w) { return mallocDouble(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocDouble}. */ - public DoubleBuffer doubles(double... values) { - DoubleBuffer buffer = mallocDouble(values.length).put(values); - buffer.flip(); - return buffer; - } - - // ------------------------------------------------- - - /** Pointer version of {@link #malloc(int)}. */ - public PointerBuffer mallocPointer(int size) { return PointerBuffer.create(nmalloc(POINTER_SIZE, size << POINTER_SHIFT), size); } - /** Pointer version of {@link #calloc(int)}. */ - public PointerBuffer callocPointer(int size) { - int bytes = size * POINTER_SIZE; - long address = nmalloc(POINTER_SIZE, bytes); - memSet(address, 0, bytes); - return PointerBuffer.create(address, size); - } - - /** Unsafe version of {@link #pointers(long)}. */ - public long npointer(long value) { - long a = nmalloc(POINTER_SIZE, POINTER_SIZE); - memPutAddress(a, value); - return a; - } - /** Single value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(long x) { return mallocPointer(1).put(0, x); } - /** Two value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(long x, long y) { return mallocPointer(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(long x, long y, long z) { return mallocPointer(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(long x, long y, long z, long w) { return mallocPointer(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocPointer}. */ - public PointerBuffer pointers(long... values) { - PointerBuffer buffer = mallocPointer(values.length).put(values); - buffer.flip(); - return buffer; - } - - /** Unsafe version of {@link #pointers(Pointer)}. */ - public long npointer(Pointer value) { - long a = nmalloc(POINTER_SIZE, POINTER_SIZE); - memPutAddress(a, value.address()); - return a; - } - /** Single value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Pointer x) { return mallocPointer(1).put(0, x); } - /** Two value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Pointer x, Pointer y) { return mallocPointer(2).put(0, x).put(1, y); } - /** Three value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Pointer x, Pointer y, Pointer z) { return mallocPointer(3).put(0, x).put(1, y).put(2, z); } - /** Four value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Pointer x, Pointer y, Pointer z, Pointer w) { return mallocPointer(4).put(0, x).put(1, y).put(2, z).put(3, w); } - /** Vararg version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Pointer... values) { - PointerBuffer buffer = mallocPointer(values.length); - for (int i = 0; i < values.length; i++) { - buffer.put(i, values[i]); - } - return buffer; - } - - /** Unsafe version of {@link #pointers(Buffer)}. */ - public long npointer(Buffer value) { - long a = nmalloc(POINTER_SIZE, POINTER_SIZE); - memPutAddress(a, memAddress(value)); - return a; - } - /** Single value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Buffer x) { - return mallocPointer(1) - .put(0, memAddress(x)); - } - /** Two value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Buffer x, Buffer y) { - return mallocPointer(2) - .put(0, memAddress(x)) - .put(1, memAddress(y)); - } - /** Three value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Buffer x, Buffer y, Buffer z) { - return mallocPointer(3) - .put(0, memAddress(x)) - .put(1, memAddress(y)) - .put(2, memAddress(z)); - } - /** Four value version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Buffer x, Buffer y, Buffer z, Buffer w) { - return mallocPointer(4) - .put(0, memAddress(x)) - .put(1, memAddress(y)) - .put(2, memAddress(z)) - .put(3, memAddress(w)); - } - /** Vararg version of {@link #mallocPointer}. */ - public PointerBuffer pointers(Buffer... values) { - PointerBuffer buffer = mallocPointer(values.length); - for (int i = 0; i < values.length; i++) { - buffer.put(i, memAddress(values[i])); - } - return buffer; - } - - // ------------------------------------------------- - - /** - * Allocates a new {@link PointerBuffer} of size {@code buffer.remaining()} - * and fills it with the addresses of the values within the provided {@link CustomBuffer} - * starting at {@code buffer.position()}. - * - * @param buffer the {@link CustomBuffer} to obtain its element addresses of - * - * @return a {@link PointerBuffer} containing the buffer's element addresses - */ - public PointerBuffer pointersOfElements(CustomBuffer buffer) { - int remaining = buffer.remaining(); - long addr = buffer.address(); - long sizeof = buffer.sizeof(); - - PointerBuffer pointerBuffer = mallocPointer(remaining); - for (int i = 0; i < remaining; i++) { - pointerBuffer.put(i, addr + sizeof * i); - } - - return pointerBuffer; - } - - // ------------------------------------------------- - - /** - * Encodes the specified text on the stack using ASCII encoding and returns a {@code ByteBuffer} that points to the encoded text, including a - * null-terminator. - * - *

    The buffer will have {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - */ - public ByteBuffer ASCII(CharSequence text) { - return ASCII(text, true); - } - - /** - * Encodes the specified text on the stack using ASCII encoding and returns a {@code ByteBuffer} that points to the encoded text. - * - *

    The buffer will have {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - * @param nullTerminated if true, a null-terminator is included at the end of the encoded text - */ - public ByteBuffer ASCII(CharSequence text, boolean nullTerminated) { - int length = memLengthASCII(text, nullTerminated); - long target = nmalloc(POINTER_SIZE, length); - encodeASCIIUnsafe(text, nullTerminated, target); - return MemoryUtil.wrap(BUFFER_BYTE, target, length).order(NATIVE_ORDER); - } - - /** - * Encodes the specified text on the stack using ASCII encoding and returns the encoded text length, in bytes. - * - *

    Use {@link #getPointerAddress} immediately after this method to get the encoded text address, which will have {@code alignment} equal to - * {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - * @param nullTerminated if true, a null-terminator is included at the end of the encoded text - */ - public int nASCII(CharSequence text, boolean nullTerminated) { - long target = nmalloc(POINTER_SIZE, memLengthASCII(text, nullTerminated)); - return encodeASCIIUnsafe(text, nullTerminated, target); - } - - /** Like {@link #ASCII(CharSequence) ASCII}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public ByteBuffer ASCIISafe(@Nullable CharSequence text) { - return ASCIISafe(text, true); - } - - /** Like {@link #ASCII(CharSequence, boolean) ASCII}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public ByteBuffer ASCIISafe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? null : ASCII(text, nullTerminated); - } - - /** Like {@link #nASCII(CharSequence, boolean) nASCII}, but returns 0 if {@code text} is {@code null}. */ - public int nASCIISafe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? 0 : nASCII(text, nullTerminated); - } - - /** - * Encodes the specified text on the stack using UTF8 encoding and returns a {@code ByteBuffer} that points to the encoded text, including a - * null-terminator. - * - *

    The buffer will have {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - */ - public ByteBuffer UTF8(CharSequence text) { - return UTF8(text, true); - } - - /** - * Encodes the specified text on the stack using UTF8 encoding and returns a {@code ByteBuffer} that points to the encoded text. - * - *

    The buffer will have {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - * @param nullTerminated if true, a null-terminator is included at the end of the encoded text - */ - public ByteBuffer UTF8(CharSequence text, boolean nullTerminated) { - int length = memLengthUTF8(text, nullTerminated); - long target = nmalloc(POINTER_SIZE, length); - encodeUTF8Unsafe(text, nullTerminated, target); - return MemoryUtil.wrap(BUFFER_BYTE, target, length).order(NATIVE_ORDER); - } - - /** - * Encodes the specified text on the stack using UTF8 encoding and returns the encoded text length, in bytes. - * - *

    Use {@link #getPointerAddress} immediately after this method to get the encoded text address, which will have {@code alignment} equal to - * {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - * @param nullTerminated if true, a null-terminator is included at the end of the encoded text - */ - public int nUTF8(CharSequence text, boolean nullTerminated) { - long target = nmalloc(POINTER_SIZE, memLengthUTF8(text, nullTerminated)); - return encodeUTF8Unsafe(text, nullTerminated, target); - } - - /** Like {@link #UTF8(CharSequence) UTF8}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public ByteBuffer UTF8Safe(@Nullable CharSequence text) { - return UTF8Safe(text, true); - } - - /** Like {@link #UTF8(CharSequence, boolean) UTF8}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public ByteBuffer UTF8Safe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? null : UTF8(text, nullTerminated); - } - - /** Like {@link #nUTF8(CharSequence, boolean) nUTF8}, but returns 0 if {@code text} is {@code null}. */ - public int nUTF8Safe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? 0 : nUTF8(text, nullTerminated); - } - - /** - * Encodes the specified text on the stack using UTF16 encoding and returns a {@code ByteBuffer} that points to the encoded text, including a - * null-terminator. - * - *

    The buffer will have {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - */ - public ByteBuffer UTF16(CharSequence text) { - return UTF16(text, true); - } - - /** - * Encodes the specified text on the stack using UTF16 encoding and returns a {@code ByteBuffer} that points to the encoded text. - * - *

    The buffer will have {@code alignment} equal to {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - * @param nullTerminated if true, a null-terminator is included at the end of the encoded text - */ - public ByteBuffer UTF16(CharSequence text, boolean nullTerminated) { - int length = memLengthUTF16(text, nullTerminated); - long target = nmalloc(POINTER_SIZE, length); - encodeUTF16Unsafe(text, nullTerminated, target); - return MemoryUtil.wrap(BUFFER_BYTE, target, length).order(NATIVE_ORDER); - } - - /** - * Encodes the specified text on the stack using UTF16 encoding and returns the encoded text length, in bytes. - * - *

    Use {@link #getPointerAddress} immediately after this method to get the encoded text address, which will have {@code alignment} equal to - * {@link Pointer#POINTER_SIZE POINTER_SIZE}.

    - * - * @param text the text to encode - * @param nullTerminated if true, a null-terminator is included at the end of the encoded text - */ - public int nUTF16(CharSequence text, boolean nullTerminated) { - long target = nmalloc(POINTER_SIZE, memLengthUTF16(text, nullTerminated)); - return encodeUTF16Unsafe(text, nullTerminated, target); - } - - /** Like {@link #UTF16(CharSequence) UTF16}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public ByteBuffer UTF16Safe(@Nullable CharSequence text) { - return UTF16Safe(text, true); - } - - /** Like {@link #UTF16(CharSequence, boolean) UTF16}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public ByteBuffer UTF16Safe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? null : UTF16(text, nullTerminated); - } - - /** Like {@link #nUTF16(CharSequence, boolean) nUTF16}, but returns 0 if {@code text} is {@code null}. */ - public int nUTF16Safe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? 0 : nUTF16(text, nullTerminated); - } - - // ----------------------------------------------------- - // ----------------------------------------------------- - // ----------------------------------------------------- - - /** Returns the stack of the current thread. */ - public static MemoryStack stackGet() { - return TLS.get(); - } - - /** - * Calls {@link #push} on the stack of the current thread. - * - * @return the stack of the current thread. - */ - public static MemoryStack stackPush() { - return stackGet().push(); - } - - /** - * Calls {@link #pop} on the stack of the current thread. - * - * @return the stack of the current thread. - */ - public static MemoryStack stackPop() { - return stackGet().pop(); - } - - /** Thread-local version of {@link #nmalloc(int)}. */ - public static long nstackMalloc(int size) { return stackGet().nmalloc(size); } - /** Thread-local version of {@link #nmalloc(int, int)}. */ - public static long nstackMalloc(int alignment, int size) { return stackGet().nmalloc(alignment, size); } - /** Thread-local version of {@link #ncalloc}. */ - public static long nstackCalloc(int alignment, int num, int size) { return stackGet().ncalloc(alignment, num, size); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #malloc(int) malloc}. */ - public static ByteBuffer stackMalloc(int size) { return stackGet().malloc(size); } - /** Thread-local version of {@link #calloc(int) calloc}. */ - public static ByteBuffer stackCalloc(int size) { return stackGet().calloc(size); } - - /** Thread-local version of {@link #bytes(byte)}. */ - public static ByteBuffer stackBytes(byte x) { return stackGet().bytes(x); } - /** Thread-local version of {@link #bytes(byte, byte)}. */ - public static ByteBuffer stackBytes(byte x, byte y) { return stackGet().bytes(x, y); } - /** Thread-local version of {@link #bytes(byte, byte, byte)}. */ - public static ByteBuffer stackBytes(byte x, byte y, byte z) { return stackGet().bytes(x, y, z); } - /** Thread-local version of {@link #bytes(byte, byte, byte, byte)}. */ - public static ByteBuffer stackBytes(byte x, byte y, byte z, byte w) { return stackGet().bytes(x, y, z, w); } - /** Thread-local version of {@link #bytes(byte...)}. */ - public static ByteBuffer stackBytes(byte... values) { return stackGet().bytes(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #mallocShort}. */ - public static ShortBuffer stackMallocShort(int size) { return stackGet().mallocShort(size); } - /** Thread-local version of {@link #callocShort}. */ - public static ShortBuffer stackCallocShort(int size) { return stackGet().callocShort(size); } - - /** Thread-local version of {@link #shorts(short)}. */ - public static ShortBuffer stackShorts(short x) { return stackGet().shorts(x); } - /** Thread-local version of {@link #shorts(short, short)}. */ - public static ShortBuffer stackShorts(short x, short y) { return stackGet().shorts(x, y); } - /** Thread-local version of {@link #shorts(short, short, short)}. */ - public static ShortBuffer stackShorts(short x, short y, short z) { return stackGet().shorts(x, y, z); } - /** Thread-local version of {@link #shorts(short, short, short, short)}. */ - public static ShortBuffer stackShorts(short x, short y, short z, short w) { return stackGet().shorts(x, y, z, w); } - /** Thread-local version of {@link #shorts(short...)}. */ - public static ShortBuffer stackShorts(short... values) { return stackGet().shorts(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #mallocInt}. */ - public static IntBuffer stackMallocInt(int size) { return stackGet().mallocInt(size); } - /** Thread-local version of {@link #callocInt}. */ - public static IntBuffer stackCallocInt(int size) { return stackGet().callocInt(size); } - - /** Thread-local version of {@link #ints(int)}. */ - public static IntBuffer stackInts(int x) { return stackGet().ints(x); } - /** Thread-local version of {@link #ints(int, int)}. */ - public static IntBuffer stackInts(int x, int y) { return stackGet().ints(x, y); } - /** Thread-local version of {@link #ints(int, int, int)}. */ - public static IntBuffer stackInts(int x, int y, int z) { return stackGet().ints(x, y, z); } - /** Thread-local version of {@link #ints(int, int, int, int)}. */ - public static IntBuffer stackInts(int x, int y, int z, int w) { return stackGet().ints(x, y, z, w); } - /** Thread-local version of {@link #ints(int...)}. */ - public static IntBuffer stackInts(int... values) { return stackGet().ints(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #mallocLong}. */ - public static LongBuffer stackMallocLong(int size) { return stackGet().mallocLong(size); } - /** Thread-local version of {@link #callocLong}. */ - public static LongBuffer stackCallocLong(int size) { return stackGet().callocLong(size); } - - /** Thread-local version of {@link #longs(long)}. */ - public static LongBuffer stackLongs(long x) { return stackGet().longs(x); } - /** Thread-local version of {@link #longs(long, long)}. */ - public static LongBuffer stackLongs(long x, long y) { return stackGet().longs(x, y); } - /** Thread-local version of {@link #longs(long, long, long)}. */ - public static LongBuffer stackLongs(long x, long y, long z) { return stackGet().longs(x, y, z); } - /** Thread-local version of {@link #longs(long, long, long, long)}. */ - public static LongBuffer stackLongs(long x, long y, long z, long w) { return stackGet().longs(x, y, z, w); } - /** Thread-local version of {@link #longs(long...)}. */ - public static LongBuffer stackLongs(long... values) { return stackGet().longs(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #mallocCLong}. */ - public static CLongBuffer stackMallocCLong(int size) { return stackGet().mallocCLong(size); } - /** Thread-local version of {@link #callocCLong}. */ - public static CLongBuffer stackCallocCLong(int size) { return stackGet().callocCLong(size); } - - /** Thread-local version of {@link #longs(long)}. */ - public static CLongBuffer stackCLongs(long x) { return stackGet().clongs(x); } - /** Thread-local version of {@link #longs(long, long)}. */ - public static CLongBuffer stackCLongs(long x, long y) { return stackGet().clongs(x, y); } - /** Thread-local version of {@link #longs(long, long, long)}. */ - public static CLongBuffer stackCLongs(long x, long y, long z) { return stackGet().clongs(x, y, z); } - /** Thread-local version of {@link #longs(long, long, long, long)}. */ - public static CLongBuffer stackCLongs(long x, long y, long z, long w) { return stackGet().clongs(x, y, z, w); } - /** Thread-local version of {@link #longs(long...)}. */ - public static CLongBuffer stackCLongs(long... values) { return stackGet().clongs(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #mallocFloat}. */ - public static FloatBuffer stackMallocFloat(int size) { return stackGet().mallocFloat(size); } - /** Thread-local version of {@link #callocFloat}. */ - public static FloatBuffer stackCallocFloat(int size) { return stackGet().callocFloat(size); } - - /** Thread-local version of {@link #floats(float)}. */ - public static FloatBuffer stackFloats(float x) { return stackGet().floats(x); } - /** Thread-local version of {@link #floats(float, float)}. */ - public static FloatBuffer stackFloats(float x, float y) { return stackGet().floats(x, y); } - /** Thread-local version of {@link #floats(float, float, float)}. */ - public static FloatBuffer stackFloats(float x, float y, float z) { return stackGet().floats(x, y, z); } - /** Thread-local version of {@link #floats(float, float, float, float)}. */ - public static FloatBuffer stackFloats(float x, float y, float z, float w) { return stackGet().floats(x, y, z, w); } - /** Thread-local version of {@link #floats(float...)}. */ - public static FloatBuffer stackFloats(float... values) { return stackGet().floats(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #mallocDouble}. */ - public static DoubleBuffer stackMallocDouble(int size) { return stackGet().mallocDouble(size); } - /** Thread-local version of {@link #callocDouble}. */ - public static DoubleBuffer stackCallocDouble(int size) { return stackGet().callocDouble(size); } - - /** Thread-local version of {@link #doubles(double)}. */ - public static DoubleBuffer stackDoubles(double x) { return stackGet().doubles(x); } - /** Thread-local version of {@link #doubles(double, double)}. */ - public static DoubleBuffer stackDoubles(double x, double y) { return stackGet().doubles(x, y); } - /** Thread-local version of {@link #doubles(double, double, double)}. */ - public static DoubleBuffer stackDoubles(double x, double y, double z) { return stackGet().doubles(x, y, z); } - /** Thread-local version of {@link #doubles(double, double, double, double)}. */ - public static DoubleBuffer stackDoubles(double x, double y, double z, double w) { return stackGet().doubles(x, y, z, w); } - /** Thread-local version of {@link #doubles(double...)}. */ - public static DoubleBuffer stackDoubles(double... values) { return stackGet().doubles(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #mallocPointer}. */ - public static PointerBuffer stackMallocPointer(int size) { return stackGet().mallocPointer(size); } - /** Thread-local version of {@link #callocPointer}. */ - public static PointerBuffer stackCallocPointer(int size) { return stackGet().callocPointer(size); } - - /** Thread-local version of {@link #pointers(long)}. */ - public static PointerBuffer stackPointers(long x) { return stackGet().pointers(x); } - /** Thread-local version of {@link #pointers(long, long)}. */ - public static PointerBuffer stackPointers(long x, long y) { return stackGet().pointers(x, y); } - /** Thread-local version of {@link #pointers(long, long, long)}. */ - public static PointerBuffer stackPointers(long x, long y, long z) { return stackGet().pointers(x, y, z); } - /** Thread-local version of {@link #pointers(long, long, long, long)}. */ - public static PointerBuffer stackPointers(long x, long y, long z, long w) { return stackGet().pointers(x, y, z, w); } - /** Thread-local version of {@link #pointers(long...)}. */ - public static PointerBuffer stackPointers(long... values) { return stackGet().pointers(values); } - - /** Thread-local version of {@link #pointers(Pointer)}. */ - public static PointerBuffer stackPointers(Pointer x) { return stackGet().pointers(x); } - /** Thread-local version of {@link #pointers(Pointer, Pointer)}. */ - public static PointerBuffer stackPointers(Pointer x, Pointer y) { return stackGet().pointers(x, y); } - /** Thread-local version of {@link #pointers(Pointer, Pointer, Pointer)}. */ - public static PointerBuffer stackPointers(Pointer x, Pointer y, Pointer z) { return stackGet().pointers(x, y, z); } - /** Thread-local version of {@link #pointers(Pointer, Pointer, Pointer, Pointer)}. */ - public static PointerBuffer stackPointers(Pointer x, Pointer y, Pointer z, Pointer w) { return stackGet().pointers(x, y, z, w); } - /** Thread-local version of {@link #pointers(Pointer...)}. */ - public static PointerBuffer stackPointers(Pointer... values) { return stackGet().pointers(values); } - - // ------------------------------------------------- - - /** Thread-local version of {@link #ASCII(CharSequence)}. */ - public static ByteBuffer stackASCII(CharSequence text) { return stackGet().ASCII(text); } - - /** Thread-local version of {@link #ASCII(CharSequence, boolean)}. */ - public static ByteBuffer stackASCII(CharSequence text, boolean nullTerminated) { return stackGet().ASCII(text, nullTerminated); } - - /** Thread-local version of {@link #UTF8(CharSequence)}. */ - public static ByteBuffer stackUTF8(CharSequence text) { return stackGet().UTF8(text); } - - /** Thread-local version of {@link #UTF8(CharSequence, boolean)}. */ - public static ByteBuffer stackUTF8(CharSequence text, boolean nullTerminated) { return stackGet().UTF8(text, nullTerminated); } - - /** Thread-local version of {@link #UTF16(CharSequence)}. */ - public static ByteBuffer stackUTF16(CharSequence text) { return stackGet().UTF16(text); } - - /** Thread-local version of {@link #UTF16(CharSequence, boolean)}. */ - public static ByteBuffer stackUTF16(CharSequence text, boolean nullTerminated) { return stackGet().UTF16(text, nullTerminated); } - - /** Thread-local version of {@link #ASCII(CharSequence)}. */ - @Nullable public static ByteBuffer stackASCIISafe(@Nullable CharSequence text) { return stackGet().ASCIISafe(text); } - - /** Thread-local version of {@link #ASCII(CharSequence, boolean)}. */ - @Nullable public static ByteBuffer stackASCIISafe(@Nullable CharSequence text, boolean nullTerminated) { return stackGet().ASCIISafe(text, nullTerminated); } - - /** Thread-local version of {@link #UTF8(CharSequence)}. */ - @Nullable public static ByteBuffer stackUTF8Safe(@Nullable CharSequence text) { return stackGet().UTF8Safe(text); } - - /** Thread-local version of {@link #UTF8(CharSequence, boolean)}. */ - @Nullable public static ByteBuffer stackUTF8Safe(@Nullable CharSequence text, boolean nullTerminated) { return stackGet().UTF8Safe(text, nullTerminated); } - - /** Thread-local version of {@link #UTF16(CharSequence)}. */ - @Nullable public static ByteBuffer stackUTF16Safe(@Nullable CharSequence text) { return stackGet().UTF16Safe(text); } - - /** Thread-local version of {@link #UTF16(CharSequence, boolean)}. */ - @Nullable public static ByteBuffer stackUTF16Safe(@Nullable CharSequence text, boolean nullTerminated) { return stackGet().UTF16Safe(text, nullTerminated); } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/MemoryUtil.java b/LWJGL/src/main/java/org/lwjgl/system/MemoryUtil.java deleted file mode 100644 index b8b9e353..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/MemoryUtil.java +++ /dev/null @@ -1,3127 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; -import org.lwjgl.system.MemoryManage.*; -import org.lwjgl.system.MemoryUtil.MemoryAllocationReport.*; - -import javax.annotation.*; -import java.lang.reflect.*; -import java.nio.*; -import java.nio.charset.*; -import java.util.*; -import java.util.function.*; - -import static java.lang.Character.*; -import static java.lang.Math.*; -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MathUtil.*; -import static org.lwjgl.system.MemoryUtil.LazyInit.*; -import static org.lwjgl.system.Pointer.*; -import static org.lwjgl.system.jni.JNINativeInterface.*; -import static org.lwjgl.system.libc.LibCString.*; - -/** - * This class provides functionality for managing native memory. - * - *

    All methods in this class will make use of {@link sun.misc.Unsafe} if it's available, for performance. If Unsafe is not available, the fallback - * implementations make use of reflection and, in the worst-case, JNI.

    - * - *

    Method names in this class are prefixed with {@code mem} to avoid ambiguities when used with static imports.

    - * - *

    Text encoding/decoding

    - * - * Three codecs are available, each with a different postfix: - *
      - *
    • UTF16 - Direct mapping of 2 bytes to Java char and vice versa
    • - *
    • UTF8 - custom UTF-8 codec without intermediate allocations
    • - *
    • ASCII - Not the original 7bit ASCII, but any character set with a single byte encoding (ISO 8859-1, Windows-1252, etc.)
    • - *
    - * - *

    The codec implementations do no codepoint validation, for improved performance. Therefore, if malformed input or unmappable characters are expected, the - * JDK {@link CharsetEncoder}/{@link CharsetDecoder} classes should be used instead. Methods in bindings that accept/return {@code CharSequence}/{@code String} - * also support {@code ByteBuffer}, so custom codecs can be used if necessary.

    - * - * @see Configuration#MEMORY_ALLOCATOR - * @see Configuration#DEBUG_MEMORY_ALLOCATOR - */ -public final class MemoryUtil { - - /** Alias for the null pointer address. */ - public static final long NULL = 0L; - - /** The memory page size, in bytes. This value is always a power-of-two. */ - public static final int PAGE_SIZE; - - /** The cache-line size, in bytes. This value is always a power-of-two. */ - public static final int CACHE_LINE_SIZE; - - static final int ARRAY_TLC_SIZE = Configuration.ARRAY_TLC_SIZE.get(8192); - - static final ThreadLocal ARRAY_TLC_BYTE = ThreadLocal.withInitial(() -> new byte[ARRAY_TLC_SIZE]); - static final ThreadLocal ARRAY_TLC_CHAR = ThreadLocal.withInitial(() -> new char[ARRAY_TLC_SIZE]); - - static final sun.misc.Unsafe UNSAFE; - - static final ByteOrder NATIVE_ORDER = ByteOrder.nativeOrder(); - - private static final Charset UTF16 = NATIVE_ORDER == ByteOrder.LITTLE_ENDIAN - ? StandardCharsets.UTF_16LE - : StandardCharsets.UTF_16BE; - - static final Class BUFFER_BYTE; - static final Class BUFFER_SHORT; - static final Class BUFFER_CHAR; - static final Class BUFFER_INT; - static final Class BUFFER_LONG; - static final Class BUFFER_FLOAT; - static final Class BUFFER_DOUBLE; - - private static final long MARK; - private static final long POSITION; - private static final long LIMIT; - private static final long CAPACITY; - - private static final long ADDRESS; - - private static final long PARENT_BYTE; - private static final long PARENT_SHORT; - private static final long PARENT_CHAR; - private static final long PARENT_INT; - private static final long PARENT_LONG; - private static final long PARENT_FLOAT; - private static final long PARENT_DOUBLE; - - static { - Library.initialize(); - - ByteBuffer bb = ByteBuffer.allocateDirect(0).order(NATIVE_ORDER); - - BUFFER_BYTE = bb.getClass(); - BUFFER_SHORT = bb.asShortBuffer().getClass(); - BUFFER_CHAR = bb.asCharBuffer().getClass(); - BUFFER_INT = bb.asIntBuffer().getClass(); - BUFFER_LONG = bb.asLongBuffer().getClass(); - BUFFER_FLOAT = bb.asFloatBuffer().getClass(); - BUFFER_DOUBLE = bb.asDoubleBuffer().getClass(); - - UNSAFE = getUnsafeInstance(); - - try { - MARK = getMarkOffset(); - POSITION = getPositionOffset(); - LIMIT = getLimitOffset(); - CAPACITY = getCapacityOffset(); - - ADDRESS = getAddressOffset(); - - PARENT_BYTE = getFieldOffsetObject(bb.duplicate().order(bb.order()), bb); - PARENT_SHORT = getFieldOffsetObject(bb.asShortBuffer(), bb); - PARENT_CHAR = getFieldOffsetObject(bb.asCharBuffer(), bb); - PARENT_INT = getFieldOffsetObject(bb.asIntBuffer(), bb); - PARENT_LONG = getFieldOffsetObject(bb.asLongBuffer(), bb); - PARENT_FLOAT = getFieldOffsetObject(bb.asFloatBuffer(), bb); - PARENT_DOUBLE = getFieldOffsetObject(bb.asDoubleBuffer(), bb); - } catch (Throwable t) { - throw new UnsupportedOperationException(t); - } - - PAGE_SIZE = UNSAFE.pageSize(); - CACHE_LINE_SIZE = 64; // TODO: Can we do better? - } - - static final class LazyInit { - - private LazyInit() { - } - - static final MemoryAllocator ALLOCATOR_IMPL; - static final MemoryAllocator ALLOCATOR; - - static { - boolean debug = Configuration.DEBUG_MEMORY_ALLOCATOR.get(false); - - ALLOCATOR_IMPL = MemoryManage.getInstance(); - ALLOCATOR = debug - ? new DebugAllocator(ALLOCATOR_IMPL) - : ALLOCATOR_IMPL; - - apiLog("MemoryUtil allocator: " + ALLOCATOR.getClass().getSimpleName()); - if (debug && !Configuration.DEBUG_MEMORY_ALLOCATOR_FAST.get(false)) { - apiLogMore("Reminder: enable Configuration.DEBUG_MEMORY_ALLOCATOR_FAST for low overhead allocation tracking."); - } - } - } - - private MemoryUtil() { - } - - /* ------------------------------------- - ------------------------------------- - EXPLICIT MEMORY MANAGEMENT API - ------------------------------------- - ------------------------------------- */ - - /** The interface implemented by the memory allocator used by the explicit memory management API ({@link #memAlloc}, {@link #memFree}, etc). */ - public interface MemoryAllocator { - - /** Returns a pointer to the malloc function. */ - long getMalloc(); - /** Returns a pointer to the calloc function. */ - long getCalloc(); - /** Returns a pointer to the realloc function. */ - long getRealloc(); - /** Returns a pointer to the free function. */ - long getFree(); - /** Returns a pointer to the aligned_alloc function. */ - long getAlignedAlloc(); - /** Returns a pointer to the aligned_free function. */ - long getAlignedFree(); - - /** Called by {@link MemoryUtil#memAlloc}. */ - long malloc(long size); - /** Called by {@link MemoryUtil#memCalloc}. */ - long calloc(long num, long size); - /** Called by {@link MemoryUtil#memRealloc}. */ - long realloc(long ptr, long size); - /** Called by {@link MemoryUtil#memFree}. */ - void free(long ptr); - - /** Called by {@link MemoryUtil#memAlignedAlloc}. */ - long aligned_alloc(long alignment, long size); - /** Called by {@link MemoryUtil#memAlignedFree}. */ - void aligned_free(long ptr); - - } - - /** - * Returns the {@link MemoryAllocator} instance used internally by the explicit memory management API ({@link #memAlloc}, {@link #memFree}, etc). - * - *

    Allocations made through the returned instance will not be tracked for memory leaks, even if {@link Configuration#DEBUG_MEMORY_ALLOCATOR} is enabled. - * This can be useful for {@code static final} allocations that live throughout the application's lifetime and will never be freed until the process is - * terminated. Normally such allocations would be reported as memory leaks by the debug allocator.

    - * - *

    The expectation is that this method will rarely be used, so it does not have the {@code mem} prefix to avoid pollution of auto-complete lists.

    - * - * @return the {@link MemoryAllocator} instance - */ - public static MemoryAllocator getAllocator() { - return getAllocator(false); - } - - /** - * Returns the {@link MemoryAllocator} instance used internally by the explicit memory management API ({@link #memAlloc}, {@link #memFree}, etc). - * - * @param tracked whether allocations will be tracked for memory leaks, if {@link Configuration#DEBUG_MEMORY_ALLOCATOR} is enabled. - * - * @return the {@link MemoryAllocator} instance - */ - public static MemoryAllocator getAllocator(boolean tracked) { - return tracked - ? ALLOCATOR - : ALLOCATOR_IMPL; - } - - // --- [ memAlloc ] --- - - /** Unsafe version of {@link #memAlloc}. May return {@link #NULL} if {@code size} is zero or the allocation failed. */ - public static long nmemAlloc(long size) { - return ALLOCATOR.malloc(size); - } - - /** - * Unsafe version of {@link #memAlloc} that checks the returned pointer. - * - * @return a pointer to the memory block allocated by the function on success. This pointer will never be {@link #NULL}, even if {@code size} is zero. - * - * @throws OutOfMemoryError if the function failed to allocate the requested block of memory - */ - public static long nmemAllocChecked(long size) { - long address = nmemAlloc(size != 0 ? size : 1L); - if (CHECKS && address == NULL) { - throw new OutOfMemoryError(); - } - return address; - } - - private static long getAllocationSize(int elements, int elementShift) { - return apiCheckAllocation(elements, Integer.toUnsignedLong(elements) << elementShift, BITS64 ? Long.MAX_VALUE : 0xFFFF_FFFFL); - } - - /** - * The standard C malloc function. - * - *

    Allocates a block of {@code size} bytes of memory, returning a pointer to the beginning of the block. The content of the newly allocated block of - * memory is not initialized, remaining with indeterminate values.

    - * - *

    Memory allocated with this method must be freed with {@link #memFree}.

    - * - * @param size the size of the memory block to allocate, in bytes. If {@code size} is zero, the returned pointer shall not be dereferenced. - * - * @return on success, a pointer to the memory block allocated by the function - * - * @throws OutOfMemoryError if the function failed to allocate the requested block of memory - */ - public static ByteBuffer memAlloc(int size) { - return wrap(BUFFER_BYTE, nmemAllocChecked(size), size).order(NATIVE_ORDER); - } - - /** - * ShortBuffer version of {@link #memAlloc}. - * - * @param size the number of short values to allocate. - */ - public static ShortBuffer memAllocShort(int size) { - return wrap(BUFFER_SHORT, nmemAllocChecked(getAllocationSize(size, 1)), size); - } - - /** - * IntBuffer version of {@link #memAlloc}. - * - * @param size the number of int values to allocate. - */ - public static IntBuffer memAllocInt(int size) { - return wrap(BUFFER_INT, nmemAllocChecked(getAllocationSize(size, 2)), size); - } - - /** - * FloatBuffer version of {@link #memAlloc}. - * - * @param size the number of float values to allocate. - */ - public static FloatBuffer memAllocFloat(int size) { - return wrap(BUFFER_FLOAT, nmemAllocChecked(getAllocationSize(size, 2)), size); - } - - /** - * LongBuffer version of {@link #memAlloc}. - * - * @param size the number of long values to allocate. - */ - public static LongBuffer memAllocLong(int size) { - return wrap(BUFFER_LONG, nmemAllocChecked(getAllocationSize(size, 3)), size); - } - - /** - * {@code CLongBuffer} version of {@link #memAlloc}. - * - * @param size the number of C long values to allocate. - */ - public static CLongBuffer memAllocCLong(int size) { - return CLongBuffer.create(nmemAllocChecked(getAllocationSize(size, CLONG_SHIFT)), size); - } - - /** - * DoubleBuffer version of {@link #memAlloc}. - * - * @param size the number of double values to allocate. - */ - public static DoubleBuffer memAllocDouble(int size) { - return wrap(BUFFER_DOUBLE, nmemAllocChecked(getAllocationSize(size, 3)), size); - } - - /** - * PointerBuffer version of {@link #memAlloc}. - * - * @param size the number of pointer values to allocate. - */ - public static PointerBuffer memAllocPointer(int size) { - return PointerBuffer.create(nmemAllocChecked(getAllocationSize(size, POINTER_SHIFT)), size); - } - - /** Unsafe version of {@link #memFree}. */ - public static void nmemFree(long ptr) { - ALLOCATOR.free(ptr); - } - - /** - * The standard C free function. - * - *

    A block of memory previously allocated by a call to {@link #memAlloc}, {@link #memCalloc} or {@link #memRealloc} is deallocated, making it available - * again for further allocations.

    - * - * @param ptr pointer to a memory block previously allocated with {@link #memAlloc}, {@link #memCalloc} or {@link #memRealloc}. If {@code ptr} does not - * point to a block of memory allocated with the above functions, it causes undefined behavior. If {@code ptr} is a {@link #NULL} pointer, the - * function does nothing. - */ - public static void memFree(@Nullable Buffer ptr) { - if (ptr != null) { - nmemFree(UNSAFE.getLong(ptr, ADDRESS)); - } - } - - /** {@code CustomBuffer} version of {@link #memFree}. */ - public static void memFree(@Nullable CustomBuffer ptr) { - if (ptr != null) { - nmemFree(ptr.address); - } - } - - // from LWJGL 3.2.2 - /** {@code PointerBuffer} version of {@link #memFree}. */ - public static void memFree(@Nullable PointerBuffer ptr) { - if (ptr != null) { - nmemFree(ptr.address); - } - } - - // --- [ memCalloc ] --- - - /** Unsafe version of {@link #memCalloc}. May return {@link #NULL} if {@code num} or {@code size} are zero or the allocation failed. */ - public static long nmemCalloc(long num, long size) { - return ALLOCATOR.calloc(num, size); - } - - /** - * Unsafe version of {@link #memCalloc} that checks the returned pointer. - * - * @return a pointer to the memory block allocated by the function on success. This pointer will never be {@link #NULL}, even if {@code num} or - * {@code size} are zero. - * - * @throws OutOfMemoryError if the function failed to allocate the requested block of memory - */ - public static long nmemCallocChecked(long num, long size) { - if (num == 0L || size == 0L) { - num = 1L; - size = 1L; - } - - long address = nmemCalloc(num, size); - if (CHECKS && address == NULL) { - throw new OutOfMemoryError(); - } - return address; - } - - /** - * The standard C calloc function. - * - *

    Allocates a block of memory for an array of {@code num} elements, each of them {@code size} bytes long, and initializes all its bits to zero. The - * effective result is the allocation of a zero-initialized memory block of {@code (num*size)} bytes.

    - * - *

    Memory allocated with this method must be freed with {@link #memFree}.

    - * - * @param num the number of elements to allocate. - * @param size the size of each element. If {@code size} is zero, the return value depends on the particular library implementation (it may or may not be - * a null pointer), but the returned pointer shall not be dereferenced. - * - * @return on success, a pointer to the memory block allocated by the function - * - * @throws OutOfMemoryError if the function failed to allocate the requested block of memory - */ - public static ByteBuffer memCalloc(int num, int size) { - return wrap(BUFFER_BYTE, nmemCallocChecked(num, size), num * size).order(NATIVE_ORDER); - } - - /** - * Alternative version of {@link #memCalloc}. - * - * @param num the number of bytes to allocate. - */ - public static ByteBuffer memCalloc(int num) { - return wrap(BUFFER_BYTE, nmemCallocChecked(num, 1), num).order(NATIVE_ORDER); - } - - /** - * ShortBuffer version of {@link #memCalloc}. - * - * @param num the number of short values to allocate. - */ - public static ShortBuffer memCallocShort(int num) { - return wrap(BUFFER_SHORT, nmemCallocChecked(num, 2), num); - } - - /** - * IntBuffer version of {@link #memCalloc}. - * - * @param num the number of int values to allocate. - */ - public static IntBuffer memCallocInt(int num) { - return wrap(BUFFER_INT, nmemCallocChecked(num, 4), num); - } - - /** - * FloatBuffer version of {@link #memCalloc}. - * - * @param num the number of float values to allocate. - */ - public static FloatBuffer memCallocFloat(int num) { - return wrap(BUFFER_FLOAT, nmemCallocChecked(num, 4), num); - } - - /** - * LongBuffer version of {@link #memCalloc}. - * - * @param num the number of long values to allocate. - */ - public static LongBuffer memCallocLong(int num) { - return wrap(BUFFER_LONG, nmemCallocChecked(num, 8), num); - } - - /** - * {@code CLongBuffer} version of {@link #memCalloc}. - * - * @param num the number of C long values to allocate. - */ - public static CLongBuffer memCallocCLong(int num) { - return CLongBuffer.create(nmemCallocChecked(num, CLONG_SIZE), num); - } - - /** - * DoubleBuffer version of {@link #memCalloc}. - * - * @param num the number of double values to allocate. - */ - public static DoubleBuffer memCallocDouble(int num) { - return wrap(BUFFER_DOUBLE, nmemCallocChecked(num, 8), num); - } - - /** - * PointerBuffer version of {@link #memCalloc}. - * - * @param num the number of pointer values to allocate. - */ - public static PointerBuffer memCallocPointer(int num) { - return PointerBuffer.create(nmemCallocChecked(num, POINTER_SIZE), num); - } - - // --- [ memRealloc] --- - - /** Unsafe version of {@link #memRealloc}. May return {@link #NULL} if {@code size} is zero or the allocation failed. */ - public static long nmemRealloc(long ptr, long size) { - return ALLOCATOR.realloc(ptr, size); - } - - /** - * Unsafe version of {@link #memRealloc} that checks the returned pointer. - * - * @return a pointer to the memory block reallocated by the function on success. This pointer will never be {@link #NULL}, even if {@code size} is zero. - * - * @throws OutOfMemoryError if the function failed to allocate the requested block of memory - */ - public static long nmemReallocChecked(long ptr, long size) { - long address = nmemRealloc(ptr, size != 0 ? size : 1L); - if (CHECKS && address == NULL) { - throw new OutOfMemoryError(); - } - return address; - } - - private static T realloc(@Nullable T old_p, T new_p, int size) { - if (old_p != null) { - new_p.position(min(old_p.position(), size)); - } - return new_p; - } - - /** - * The standard C realloc function. - * - *

    Changes the size of the memory block pointed to by {@code ptr}. The function may move the memory block to a new location (whose address is returned - * by the function). The content of the memory block is preserved up to the lesser of the new and old sizes, even if the block is moved to a new location. - * If the new size is larger, the value of the newly allocated portion is indeterminate.

    - * - *

    The memory address used is always the address at the start of {@code ptr}, so the current position of {@code ptr} does not need to be set to 0 for - * this function to work. The current position is preserved, even if the memory block is moved to a new location, unless {@code size} is less than the - * current position in which case position will be equal to capacity. The limit is set to the capacity, and the mark is discarded.

    - * - * @param ptr a pointer to a memory block previously allocated with {@link #memAlloc}, {@link #memCalloc} or {@link #memRealloc}. Alternatively, this can - * be a {@link #NULL} pointer, in which case a new block is allocated (as if {@link #memAlloc} was called). - * @param size the new size for the memory block, in bytes. - * - * @return a pointer to the reallocated memory block, which may be either the same as {@code ptr} or a new location - * - * @throws OutOfMemoryError if the function failed to allocate the requested block of memory. The memory block pointed to by argument {@code ptr} is not - * deallocated (it is still valid, and with its contents unchanged). - */ - public static ByteBuffer memRealloc(@Nullable ByteBuffer ptr, int size) { - return realloc(ptr, memByteBuffer(nmemReallocChecked(ptr == null ? NULL : UNSAFE.getLong(ptr, ADDRESS), size), size), size); - } - - /** - * ShortBuffer version of {@link #memRealloc}. - * - * @param size the number of short values to allocate. - */ - public static ShortBuffer memRealloc(@Nullable ShortBuffer ptr, int size) { - return realloc(ptr, memShortBuffer(nmemReallocChecked(ptr == null ? NULL : UNSAFE.getLong(ptr, ADDRESS), getAllocationSize(size, 1)), size), size); - } - - /** - * IntBuffer version of {@link #memRealloc}. - * - * @param size the number of int values to allocate. - */ - public static IntBuffer memRealloc(@Nullable IntBuffer ptr, int size) { - return realloc(ptr, memIntBuffer(nmemReallocChecked(ptr == null ? NULL : UNSAFE.getLong(ptr, ADDRESS), getAllocationSize(size, 2)), size), size); - } - - /** - * LongBuffer version of {@link #memRealloc}. - * - * @param size the number of long values to allocate. - */ - public static LongBuffer memRealloc(@Nullable LongBuffer ptr, int size) { - return realloc(ptr, memLongBuffer(nmemReallocChecked(ptr == null ? NULL : UNSAFE.getLong(ptr, ADDRESS), getAllocationSize(size, 3)), size), size); - } - - /** - * {@code CLongBuffer} version of {@link #memRealloc}. - * - * @param size the number of C long values to allocate. - */ - public static CLongBuffer memRealloc(@Nullable CLongBuffer ptr, int size) { - CLongBuffer buffer = memCLongBuffer(nmemReallocChecked(ptr == null ? NULL : ptr.address, getAllocationSize(size, CLONG_SIZE)), size); - if (ptr != null) { - buffer.position(min(ptr.position(), size)); - } - return buffer; - } - - /** - * FloatBuffer version of {@link #memRealloc}. - * - * @param size the number of float values to allocate. - */ - public static FloatBuffer memRealloc(@Nullable FloatBuffer ptr, int size) { - return realloc(ptr, memFloatBuffer(nmemReallocChecked(ptr == null ? NULL : UNSAFE.getLong(ptr, ADDRESS), getAllocationSize(size, 2)), size), size); - } - - /** - * DoubleBuffer version of {@link #memRealloc}. - * - * @param size the number of double values to allocate. - */ - public static DoubleBuffer memRealloc(@Nullable DoubleBuffer ptr, int size) { - return realloc(ptr, memDoubleBuffer(nmemReallocChecked(ptr == null ? NULL : UNSAFE.getLong(ptr, ADDRESS), getAllocationSize(size, 3)), size), size); - } - - /** - * PointerBuffer version of {@link #memRealloc}. - * - * @param size the number of pointer values to allocate. - */ - public static PointerBuffer memRealloc(@Nullable PointerBuffer ptr, int size) { - PointerBuffer buffer = memPointerBuffer(nmemReallocChecked(ptr == null ? NULL : ptr.address, getAllocationSize(size, POINTER_SHIFT)), size); - if (ptr != null) { - buffer.position(min(ptr.position(), size)); - } - return buffer; - } - - // --- [ memAlignedAlloc ] --- - - /** Unsafe version of {@link #memAlignedAlloc}. May return {@link #NULL} if {@code size} is zero or the allocation failed. */ - public static long nmemAlignedAlloc(long alignment, long size) { - return ALLOCATOR.aligned_alloc(alignment, size); - } - - /** - * Unsafe version of {@link #memAlignedAlloc} that checks the returned pointer. - * - * @return a pointer to the memory block allocated by the function on success. This pointer will never be {@link #NULL}, even if {@code size} is zero. - * - * @throws OutOfMemoryError if the function failed to allocate the requested block of memory - */ - public static long nmemAlignedAllocChecked(long alignment, long size) { - long address = nmemAlignedAlloc(alignment, size != 0 ? size : 1L); - if (CHECKS && address == NULL) { - throw new OutOfMemoryError(); - } - return address; - } - - /** - * The standard C aligned_alloc function. - * - *

    Allocate {@code size} bytes of uninitialized storage whose alignment is specified by {@code alignment}. The size parameter must be an integral - * multiple of alignment. Memory allocated with memAlignedAlloc() must be freed with {@link #memAlignedFree}.

    - * - * @param alignment the alignment. Must be a power of two value and a multiple of {@code sizeof(void *)}. - * @param size the number of bytes to allocate. Must be a multiple of {@code alignment}. - */ - public static ByteBuffer memAlignedAlloc(int alignment, int size) { - return wrap(BUFFER_BYTE, nmemAlignedAllocChecked(alignment, size), size).order(NATIVE_ORDER); - } - - // --- [ memAlignedFree ] --- - - /** Unsafe version of {@link #memAlignedFree}. */ - public static void nmemAlignedFree(long ptr) { - ALLOCATOR.aligned_free(ptr); - } - - /** - * Frees a block of memory that was allocated with {@link #memAlignedAlloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void memAlignedFree(@Nullable ByteBuffer ptr) { - if (ptr != null) { - nmemAlignedFree(UNSAFE.getLong(ptr, ADDRESS)); - } - } - - // --- [ DebugAllocator ] --- - - /** The memory allocation report callback. */ - public interface MemoryAllocationReport { - - /** - * Reports allocated memory. - * - * @param address the address of the memory allocated. May be {@link #NULL}. - * @param memory the amount of memory allocated, in bytes - * @param threadId id of the thread that allocated the memory. May be {@link #NULL}. - * @param threadName name of the thread that allocated the memory. May be {@code null}. - * @param stacktrace the allocation stacktrace. May be {@code null}. - */ - void invoke(long address, long memory, long threadId, @Nullable String threadName, @Nullable StackTraceElement... stacktrace); - - /** Specifies how to aggregate the reported allocations. */ - enum Aggregate { - /** Allocations are aggregated over the whole process or thread. */ - ALL, - /** - * Allocations are aggregated based on the first stack trace element. This will return an allocation aggregate per method/line number, regardless - * of how many different code paths lead to that specific method and line number. - */ - GROUP_BY_METHOD, - /** The allocations are aggregated based on the full stack trace chain. */ - GROUP_BY_STACKTRACE - } - } - - /** - * Reports all live allocations. - * - *

    This method can only be used if the {@link Configuration#DEBUG_MEMORY_ALLOCATOR} option has been set to true.

    - * - * @param report the report callback - */ - public static void memReport(MemoryAllocationReport report) { - DebugAllocator.report(report); - } - - /** - * Reports aggregates for the live allocations. - * - *

    This method can only be used if the {@link Configuration#DEBUG_MEMORY_ALLOCATOR} option has been set to true.

    - * - * @param report the report callback - * @param groupByStackTrace how to aggregate the reported allocations - * @param groupByThread if the reported allocations should be grouped by thread - */ - public static void memReport(MemoryAllocationReport report, Aggregate groupByStackTrace, boolean groupByThread) { - DebugAllocator.report(report, groupByStackTrace, groupByThread); - } - - /* ------------------------------------- - ------------------------------------- - BUFFER MANAGEMENT API - ------------------------------------- - ------------------------------------- */ - - // --- [ memAddress0 ] --- - - /** - * Returns the memory address of the specified buffer. [INTERNAL USE ONLY] - * - * @param buffer the buffer - * - * @return the memory address - */ - public static long memAddress0(Buffer buffer) { return UNSAFE.getLong(buffer, ADDRESS); } - - // --- [ Buffer address ] --- - - /** - * Returns the memory address at the current position of the specified buffer. This is effectively a pointer value that can be used in native function - * calls. - * - * @param buffer the buffer - * - * @return the memory address - */ - public static long memAddress(ByteBuffer buffer) { return buffer.position() + memAddress0(buffer); } - - /** - * Returns the memory address at the specified position of the specified buffer. - * - * @param buffer the buffer - * @param position the buffer position - * - * @return the memory address - * - * @see #memAddress(ByteBuffer) - */ - public static long memAddress(ByteBuffer buffer, int position) { - Objects.requireNonNull(buffer); - return memAddress0(buffer) + Integer.toUnsignedLong(position); - } - - private static long address(int position, int elementShift, long address) { - return address + ((position & 0xFFFF_FFFFL) << elementShift); - } - - /** ShortBuffer version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(ShortBuffer buffer) { return address(buffer.position(), 1, memAddress0(buffer)); } - /** ShortBuffer version of {@link #memAddress(ByteBuffer, int)}. */ - public static long memAddress(ShortBuffer buffer, int position) { - Objects.requireNonNull(buffer); - return address(position, 1, memAddress0(buffer)); - } - - /** CharBuffer version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(CharBuffer buffer) { return address(buffer.position(), 1, memAddress0(buffer)); } - /** CharBuffer version of {@link #memAddress(ByteBuffer, int)}. */ - public static long memAddress(CharBuffer buffer, int position) { - Objects.requireNonNull(buffer); - return address(position, 1, memAddress0(buffer)); - } - - /** IntBuffer version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(IntBuffer buffer) { return address(buffer.position(), 2, memAddress0(buffer)); } - /** IntBuffer version of {@link #memAddress(ByteBuffer, int)}. */ - public static long memAddress(IntBuffer buffer, int position) { - Objects.requireNonNull(buffer); - return address(position, 2, memAddress0(buffer)); - } - - /** FloatBuffer version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(FloatBuffer buffer) { return address(buffer.position(), 2, memAddress0(buffer)); } - /** FloatBuffer version of {@link #memAddress(ByteBuffer, int)}. */ - public static long memAddress(FloatBuffer buffer, int position) { - Objects.requireNonNull(buffer); - return address(position, 2, memAddress0(buffer)); - } - - /** LongBuffer version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(LongBuffer buffer) { return address(buffer.position(), 3, memAddress0(buffer)); } - /** LongBuffer version of {@link #memAddress(ByteBuffer, int)}. */ - public static long memAddress(LongBuffer buffer, int position) { - Objects.requireNonNull(buffer); - return address(position, 3, memAddress0(buffer)); - } - - /** DoubleBuffer version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(DoubleBuffer buffer) { return address(buffer.position(), 3, memAddress0(buffer)); } - /** DoubleBuffer version of {@link #memAddress(ByteBuffer, int)}. */ - public static long memAddress(DoubleBuffer buffer, int position) { - Objects.requireNonNull(buffer); - return address(position, 3, memAddress0(buffer)); - } - - /** Polymorphic version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(Buffer buffer) { - int elementShift; - if (buffer instanceof ByteBuffer) { - elementShift = 0; - } else if (buffer instanceof ShortBuffer || buffer instanceof CharBuffer) { - elementShift = 1; - } else if (buffer instanceof IntBuffer || buffer instanceof FloatBuffer) { - elementShift = 2; - } else { - elementShift = 3; - } - return address(buffer.position(), elementShift, memAddress0(buffer)); - } - - /** CustomBuffer version of {@link #memAddress(ByteBuffer)}. */ - public static long memAddress(CustomBuffer buffer) { return buffer.address(); } - /** CustomBuffer version of {@link #memAddress(ByteBuffer, int)}. */ - public static long memAddress(CustomBuffer buffer, int position) { return buffer.address(position); } - - // --- [ Buffer address - Safe ] --- - - /** Null-safe version of {@link #memAddress(ByteBuffer)}. Returns {@link #NULL} if the specified buffer is null. */ - public static long memAddressSafe(@Nullable ByteBuffer buffer) { return buffer == null ? NULL : memAddress0(buffer) + buffer.position(); } - - /** ShortBuffer version of {@link #memAddressSafe(ByteBuffer)}. */ - public static long memAddressSafe(@Nullable ShortBuffer buffer) { return buffer == null ? NULL : address(buffer.position(), 1, memAddress0(buffer)); } - - /** CharBuffer version of {@link #memAddressSafe(ByteBuffer)}. */ - public static long memAddressSafe(@Nullable CharBuffer buffer) { return buffer == null ? NULL : address(buffer.position(), 1, memAddress0(buffer)); } - - /** IntBuffer version of {@link #memAddressSafe(ByteBuffer)}. */ - public static long memAddressSafe(@Nullable IntBuffer buffer) { return buffer == null ? NULL : address(buffer.position(), 2, memAddress0(buffer)); } - - /** FloatBuffer version of {@link #memAddressSafe(ByteBuffer)}. */ - public static long memAddressSafe(@Nullable FloatBuffer buffer) { return buffer == null ? NULL : address(buffer.position(), 2, memAddress0(buffer)); } - - /** LongBuffer version of {@link #memAddressSafe(ByteBuffer)}. */ - public static long memAddressSafe(@Nullable LongBuffer buffer) { return buffer == null ? NULL : address(buffer.position(), 3, memAddress0(buffer)); } - - /** DoubleBuffer version of {@link #memAddressSafe(ByteBuffer)}. */ - public static long memAddressSafe(@Nullable DoubleBuffer buffer) { return buffer == null ? NULL : address(buffer.position(), 3, memAddress0(buffer)); } - - /** Pointer version of {@link #memAddressSafe(ByteBuffer)}. */ - public static long memAddressSafe(@Nullable Pointer pointer) { return pointer == null ? NULL : pointer.address(); } - - // --- [ Buffer allocation ] --- - - /** - * Creates a new direct ByteBuffer that starts at the specified memory address and has the specified capacity. The returned ByteBuffer instance will be set - * to the native {@link ByteOrder}. - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new ByteBuffer - */ - public static ByteBuffer memByteBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return wrap(BUFFER_BYTE, address, capacity).order(NATIVE_ORDER); - } - - /** Like {@link #memByteBuffer(long, int) memByteBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static ByteBuffer memByteBufferSafe(long address, int capacity) { - return address == NULL ? null : wrap(BUFFER_BYTE, address, capacity).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link ShortBuffer} between its current position and limit. - * - *

    This operation is the inverse of {@link ByteBuffer#asShortBuffer()}. The returned {@code ByteBuffer} instance will be set to the native - * {@link ByteOrder}.

    - * - * @param buffer the source buffer - * - * @return the {@code ByteBuffer} view - */ - public static ByteBuffer memByteBuffer(ShortBuffer buffer) { - if (CHECKS && (Integer.MAX_VALUE >> 1) < buffer.remaining()) { - throw new IllegalArgumentException("The source buffer range is too wide"); - } - return wrap(BUFFER_BYTE, memAddress(buffer), buffer.remaining() << 1).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link CharBuffer} between its current position and limit. - * - *

    This operation is the inverse of {@link ByteBuffer#asCharBuffer()}. The returned {@code ByteBuffer} instance will be set to the native - * {@link ByteOrder}.

    - * - * @param buffer the source buffer - * - * @return the {@code ByteBuffer} view - */ - public static ByteBuffer memByteBuffer(CharBuffer buffer) { - if (CHECKS && (Integer.MAX_VALUE >> 1) < buffer.remaining()) { - throw new IllegalArgumentException("The source buffer range is too wide"); - } - return wrap(BUFFER_BYTE, memAddress(buffer), buffer.remaining() << 1).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link IntBuffer} between its current position and limit. - * - *

    This operation is the inverse of {@link ByteBuffer#asIntBuffer()}. The returned {@code ByteBuffer} instance will be set to the native - * {@link ByteOrder}.

    - * - * @param buffer the source buffer - * - * @return the {@code ByteBuffer} view - */ - public static ByteBuffer memByteBuffer(IntBuffer buffer) { - if (CHECKS && (Integer.MAX_VALUE >> 2) < buffer.remaining()) { - throw new IllegalArgumentException("The source buffer range is too wide"); - } - return wrap(BUFFER_BYTE, memAddress(buffer), buffer.remaining() << 2).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link LongBuffer} between its current position and limit. - * - *

    This operation is the inverse of {@link ByteBuffer#asLongBuffer()}. The returned {@code ByteBuffer} instance will be set to the native - * {@link ByteOrder}.

    - * - * @param buffer the source buffer - * - * @return the {@code ByteBuffer} view - */ - public static ByteBuffer memByteBuffer(LongBuffer buffer) { - if (CHECKS && (Integer.MAX_VALUE >> 3) < buffer.remaining()) { - throw new IllegalArgumentException("The source buffer range is too wide"); - } - return wrap(BUFFER_BYTE, memAddress(buffer), buffer.remaining() << 3).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link FloatBuffer} between its current position and limit. - * - *

    This operation is the inverse of {@link ByteBuffer#asFloatBuffer()}. The returned {@code ByteBuffer} instance will be set to the native - * {@link ByteOrder}.

    - * - * @param buffer the source buffer - * - * @return the {@code ByteBuffer} view - */ - public static ByteBuffer memByteBuffer(FloatBuffer buffer) { - if (CHECKS && (Integer.MAX_VALUE >> 2) < buffer.remaining()) { - throw new IllegalArgumentException("The source buffer range is too wide"); - } - return wrap(BUFFER_BYTE, memAddress(buffer), buffer.remaining() << 2).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link DoubleBuffer} between its current position and limit. - * - *

    This operation is the inverse of {@link ByteBuffer#asDoubleBuffer()}. The returned {@code ByteBuffer} instance will be set to the native - * {@link ByteOrder}.

    - * - * @param buffer the source buffer - * - * @return the {@code ByteBuffer} view - */ - public static ByteBuffer memByteBuffer(DoubleBuffer buffer) { - if (CHECKS && (Integer.MAX_VALUE >> 3) < buffer.remaining()) { - throw new IllegalArgumentException("The source buffer range is too wide"); - } - return wrap(BUFFER_BYTE, memAddress(buffer), buffer.remaining() << 3).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link CustomBuffer} between its current position and limit. - * - *

    The returned {@code ByteBuffer} instance will be set to the native {@link ByteOrder}.

    - * - * @param buffer the source buffer - * - * @return the {@code ByteBuffer} view - */ - public static ByteBuffer memByteBuffer(CustomBuffer buffer) { - if (CHECKS && (Integer.MAX_VALUE / buffer.sizeof()) < buffer.remaining()) { - throw new IllegalArgumentException("The source buffer range is too wide"); - } - return wrap(BUFFER_BYTE, memAddress(buffer), buffer.remaining() * buffer.sizeof()).order(NATIVE_ORDER); - } - - /** - * Creates a {@link ByteBuffer} instance as a view of the specified {@link Struct}. - * - *

    The returned {@code ByteBuffer} instance will be set to the native {@link ByteOrder}.

    - * - * @param value the struct value - * - * @return the {@code ByteBuffer} view - */ - public static > ByteBuffer memByteBuffer(T value) { - return wrap(BUFFER_BYTE, value.address, value.sizeof()).order(NATIVE_ORDER); - } - - /** - * Creates a new direct ShortBuffer that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to 2 bytes. If not, use {@code memByteBuffer(address, capacity * 2).asShortBuffer()}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new ShortBuffer - */ - public static ShortBuffer memShortBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return wrap(BUFFER_SHORT, address, capacity); - } - - /** Like {@link #memShortBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static ShortBuffer memShortBufferSafe(long address, int capacity) { - return address == NULL ? null : wrap(BUFFER_SHORT, address, capacity); - } - - /** - * Creates a new direct CharBuffer that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to 2 bytes. If not, use {@code memByteBuffer(address, capacity * 2).asCharBuffer()}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new CharBuffer - */ - public static CharBuffer memCharBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return wrap(BUFFER_CHAR, address, capacity); - } - - /** Like {@link #memCharBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static CharBuffer memCharBufferSafe(long address, int capacity) { - return address == NULL ? null : wrap(BUFFER_CHAR, address, capacity); - } - - /** - * Creates a new direct IntBuffer that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to 4 bytes. If not, use {@code memByteBuffer(address, capacity * 4).asIntBuffer()}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new IntBuffer - */ - public static IntBuffer memIntBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return wrap(BUFFER_INT, address, capacity); - } - - /** Like {@link #memIntBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static IntBuffer memIntBufferSafe(long address, int capacity) { - return address == NULL ? null : wrap(BUFFER_INT, address, capacity); - } - - /** - * Creates a new direct LongBuffer that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to 8 bytes. If not, use {@code memByteBuffer(address, capacity * 8).asLongBuffer()}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new LongBuffer - */ - public static LongBuffer memLongBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return wrap(BUFFER_LONG, address, capacity); - } - - /** Like {@link #memLongBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static LongBuffer memLongBufferSafe(long address, int capacity) { - return address == NULL ? null : wrap(BUFFER_LONG, address, capacity); - } - - /** - * Creates a new direct {@code CLongBuffer} that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to 8 bytes. If not, use {@code memByteBuffer(address, capacity * 8).asLongBuffer()}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new {@code CLongBuffer} - */ - public static CLongBuffer memCLongBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return CLongBuffer.create(address, capacity); - } - - /** Like {@link #memCLongBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static CLongBuffer memCLongBufferSafe(long address, int capacity) { - return address == NULL ? null : CLongBuffer.create(address, capacity); - } - - /** - * Creates a new direct FloatBuffer that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to 4 bytes. If not, use {@code memByteBuffer(address, capacity * 4).asFloatBuffer()}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new FloatBuffer - */ - public static FloatBuffer memFloatBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return wrap(BUFFER_FLOAT, address, capacity); - } - - /** Like {@link #memFloatBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static FloatBuffer memFloatBufferSafe(long address, int capacity) { - return address == NULL ? null : wrap(BUFFER_FLOAT, address, capacity); - } - - /** - * Creates a new direct DoubleBuffer that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to 8 bytes. If not, use {@code memByteBuffer(address, capacity * 8).asDoubleBuffer()}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new DoubleBuffer - */ - public static DoubleBuffer memDoubleBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return wrap(BUFFER_DOUBLE, address, capacity); - } - - /** Like {@link #memDoubleBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static DoubleBuffer memDoubleBufferSafe(long address, int capacity) { - return address == NULL ? null : wrap(BUFFER_DOUBLE, address, capacity); - } - - /** - * Creates a new PointerBuffer that starts at the specified memory address and has the specified capacity. - * - *

    The {@code address} specified must be aligned to the pointer size. If not, use {@code PointerBuffer.create(memByteBuffer(address, capacity * - * POINTER_SIZE))}.

    - * - * @param address the starting memory address - * @param capacity the buffer capacity - * - * @return the new PointerBuffer - */ - public static PointerBuffer memPointerBuffer(long address, int capacity) { - if (CHECKS) { - check(address); - } - return PointerBuffer.create(address, capacity); - } - - /** Like {@link #memPointerBuffer}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static PointerBuffer memPointerBufferSafe(long address, int capacity) { - return address == NULL ? null : PointerBuffer.create(address, capacity); - } - - // --- [ Buffer duplication ] --- - - /** - * Duplicates the specified buffer. The returned buffer will have the same {@link ByteOrder} as the source buffer. - * - *

    This method should be preferred over {@link ByteBuffer#duplicate} because it has a much shorter call chain. Long call chains may fail to inline due - * to JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to duplicate - * - * @return the duplicated buffer - */ - public static ByteBuffer memDuplicate(ByteBuffer buffer) { - ByteBuffer target; - try { - target = (ByteBuffer)UNSAFE.allocateInstance(BUFFER_BYTE); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(target, ADDRESS, UNSAFE.getLong(buffer, ADDRESS)); - UNSAFE.putInt(target, MARK, UNSAFE.getInt(buffer, MARK)); - UNSAFE.putInt(target, POSITION, UNSAFE.getInt(buffer, POSITION)); - UNSAFE.putInt(target, LIMIT, UNSAFE.getInt(buffer, LIMIT)); - UNSAFE.putInt(target, CAPACITY, UNSAFE.getInt(buffer, CAPACITY)); - - Object attachment = UNSAFE.getObject(buffer, PARENT_BYTE); - UNSAFE.putObject(target, PARENT_BYTE, attachment == null ? buffer : attachment); - - return target.order(buffer.order()); - } - - /** - * Duplicates the specified buffer. - * - *

    This method should be preferred over {@link ShortBuffer#duplicate} because it has a much shorter call chain. Long call chains may fail to inline due - * to JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to duplicate - * - * @return the duplicated buffer - */ - public static ShortBuffer memDuplicate(ShortBuffer buffer) { return duplicate(BUFFER_SHORT, buffer, PARENT_SHORT); } - - /** - * Duplicates the specified buffer. - * - *

    This method should be preferred over {@link CharBuffer#duplicate} because it has a much shorter call chain. Long call chains may fail to inline due - * to JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to duplicate - * - * @return the duplicated buffer - */ - public static CharBuffer memDuplicate(CharBuffer buffer) { return duplicate(BUFFER_CHAR, buffer, PARENT_CHAR); } - - /** - * Duplicates the specified buffer. - * - *

    This method should be preferred over {@link IntBuffer#duplicate} because it has a much shorter call chain. Long call chains may fail to inline due - * to JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to duplicate - * - * @return the duplicated buffer - */ - public static IntBuffer memDuplicate(IntBuffer buffer) { return duplicate(BUFFER_INT, buffer, PARENT_INT); } - - /** - * Duplicates the specified buffer. - * - *

    This method should be preferred over {@link LongBuffer#duplicate} because it has a much shorter call chain. Long call chains may fail to inline due - * to JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to duplicate - * - * @return the duplicated buffer - */ - public static LongBuffer memDuplicate(LongBuffer buffer) { return duplicate(BUFFER_LONG, buffer, PARENT_LONG); } - - /** - * Duplicates the specified buffer. - * - *

    This method should be preferred over {@link FloatBuffer#duplicate} because it has a much shorter call chain. Long call chains may fail to inline due - * to JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to duplicate - * - * @return the duplicated buffer - */ - public static FloatBuffer memDuplicate(FloatBuffer buffer) { return duplicate(BUFFER_FLOAT, buffer, PARENT_FLOAT); } - - /** - * Duplicates the specified buffer. - * - *

    This method should be preferred over {@link DoubleBuffer#duplicate} because it has a much shorter call chain. Long call chains may fail to inline due - * to JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to duplicate - * - * @return the duplicated buffer - */ - public static DoubleBuffer memDuplicate(DoubleBuffer buffer) { return duplicate(BUFFER_DOUBLE, buffer, PARENT_DOUBLE); } - - // --- [ Buffer slicing ] --- - - /** - * Slices the specified buffer. The returned buffer will have the same {@link ByteOrder} as the source buffer. - * - *

    This method should be preferred over {@link ByteBuffer#slice} because it has a much shorter call chain. Long call chains may fail to inline due to - * JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to slice - * - * @return the sliced buffer - */ - public static ByteBuffer memSlice(ByteBuffer buffer) { - return slice(buffer, memAddress0(buffer) + buffer.position(), buffer.remaining()); - } - - /** - * Slices the specified buffer. - * - *

    This method should be preferred over {@link ShortBuffer#slice} because it has a much shorter call chain. Long call chains may fail to inline due to - * JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to slice - * - * @return the sliced buffer - */ - public static ShortBuffer memSlice(ShortBuffer buffer) { - return slice(BUFFER_SHORT, buffer, address(buffer.position(), 1, memAddress0(buffer)), buffer.remaining(), PARENT_SHORT); - } - - /** - * Slices the specified buffer. - * - *

    This method should be preferred over {@link CharBuffer#slice} because it has a much shorter call chain. Long call chains may fail to inline due to - * JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to slice - * - * @return the sliced buffer - */ - public static CharBuffer memSlice(CharBuffer buffer) { - return slice(BUFFER_CHAR, buffer, address(buffer.position(), 1, memAddress0(buffer)), buffer.remaining(), PARENT_CHAR); - } - - /** - * Slices the specified buffer. - * - *

    This method should be preferred over {@link IntBuffer#slice} because it has a much shorter call chain. Long call chains may fail to inline due to - * JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to slice - * - * @return the sliced buffer - */ - public static IntBuffer memSlice(IntBuffer buffer) { - return slice(BUFFER_INT, buffer, address(buffer.position(), 2, memAddress0(buffer)), buffer.remaining(), PARENT_INT); - } - - /** - * Slices the specified buffer. - * - *

    This method should be preferred over {@link LongBuffer#slice} because it has a much shorter call chain. Long call chains may fail to inline due to - * JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to slice - * - * @return the sliced buffer - */ - public static LongBuffer memSlice(LongBuffer buffer) { - return slice(BUFFER_LONG, buffer, address(buffer.position(), 3, memAddress0(buffer)), buffer.remaining(), PARENT_LONG); - } - - /** - * Slices the specified buffer. - * - *

    This method should be preferred over {@link FloatBuffer#slice} because it has a much shorter call chain. Long call chains may fail to inline due to - * JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to slice - * - * @return the sliced buffer - */ - public static FloatBuffer memSlice(FloatBuffer buffer) { - return slice(BUFFER_FLOAT, buffer, address(buffer.position(), 2, memAddress0(buffer)), buffer.remaining(), PARENT_FLOAT); - } - - /** - * Slices the specified buffer. - * - *

    This method should be preferred over {@link DoubleBuffer#slice} because it has a much shorter call chain. Long call chains may fail to inline due to - * JVM limits, disabling important optimizations (e.g. scalar replacement via Escape Analysis).

    - * - * @param buffer the buffer to slice - * - * @return the sliced buffer - */ - public static DoubleBuffer memSlice(DoubleBuffer buffer) { - return slice(BUFFER_DOUBLE, buffer, address(buffer.position(), 3, memAddress0(buffer)), buffer.remaining(), PARENT_DOUBLE); - } - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. The returned - * buffer will have the same {@link ByteOrder} as the original buffer. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static ByteBuffer memSlice(ByteBuffer buffer, int offset, int capacity) { - int position = buffer.position() + offset; - if (offset < 0 || buffer.limit() < position) { - throw new IllegalArgumentException(); - } - if (capacity < 0 || buffer.capacity() - position < capacity) { - throw new IllegalArgumentException(); - } - return slice(buffer, memAddress0(buffer) + position, capacity); - } - - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static ShortBuffer memSlice(ShortBuffer buffer, int offset, int capacity) { - int position = buffer.position() + offset; - if (offset < 0 || buffer.limit() < position) { - throw new IllegalArgumentException(); - } - if (capacity < 0 || buffer.capacity() - position < capacity) { - throw new IllegalArgumentException(); - } - return slice(BUFFER_SHORT, buffer, address(position, 1, memAddress0(buffer)), capacity, PARENT_SHORT); - } - - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static CharBuffer memSlice(CharBuffer buffer, int offset, int capacity) { - int position = buffer.position() + offset; - if (offset < 0 || buffer.limit() < position) { - throw new IllegalArgumentException(); - } - if (capacity < 0 || buffer.capacity() - position < capacity) { - throw new IllegalArgumentException(); - } - return slice(BUFFER_CHAR, buffer, address(position, 1, memAddress0(buffer)), capacity, PARENT_CHAR); - } - - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static IntBuffer memSlice(IntBuffer buffer, int offset, int capacity) { - int position = buffer.position() + offset; - if (offset < 0 || buffer.limit() < position) { - throw new IllegalArgumentException(); - } - if (capacity < 0 || buffer.capacity() - position < capacity) { - throw new IllegalArgumentException(); - } - return slice(BUFFER_INT, buffer, address(position, 2, memAddress0(buffer)), capacity, PARENT_INT); - } - - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static LongBuffer memSlice(LongBuffer buffer, int offset, int capacity) { - int position = buffer.position() + offset; - if (offset < 0 || buffer.limit() < position) { - throw new IllegalArgumentException(); - } - if (capacity < 0 || buffer.capacity() - position < capacity) { - throw new IllegalArgumentException(); - } - return slice(BUFFER_LONG, buffer, address(position, 3, memAddress0(buffer)), capacity, PARENT_LONG); - } - - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static FloatBuffer memSlice(FloatBuffer buffer, int offset, int capacity) { - int position = buffer.position() + offset; - if (offset < 0 || buffer.limit() < position) { - throw new IllegalArgumentException(); - } - if (capacity < 0 || buffer.capacity() - position < capacity) { - throw new IllegalArgumentException(); - } - return slice(BUFFER_FLOAT, buffer, address(position, 2, memAddress0(buffer)), capacity, PARENT_FLOAT); - } - - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static DoubleBuffer memSlice(DoubleBuffer buffer, int offset, int capacity) { - int position = buffer.position() + offset; - if (offset < 0 || buffer.limit() < position) { - throw new IllegalArgumentException(); - } - if (capacity < 0 || buffer.capacity() - position < capacity) { - throw new IllegalArgumentException(); - } - return slice(BUFFER_DOUBLE, buffer, address(position, 3, memAddress0(buffer)), capacity, PARENT_DOUBLE); - } - - /** - * Returns a slice of the specified buffer between {@code (buffer.position() + offset)} and {@code (buffer.position() + offset + capacity)}. - * - *

    The position and limit of the original buffer are preserved after a call to this method.

    - * - * @param buffer the buffer to slice - * @param offset the slice offset, it must be ≤ {@code buffer.remaining()} - * @param capacity the slice length, it must be ≤ {@code buffer.capacity() - (buffer.position() + offset)} - * - * @return the sliced buffer - */ - public static > T memSlice(T buffer, int offset, int capacity) { return buffer.slice(offset, capacity); } - - // --- [ memset ] --- - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - */ - public static void memSet(ByteBuffer ptr, int value) { memSet(memAddress(ptr), value, ptr.remaining()); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - */ - public static void memSet(ShortBuffer ptr, int value) { memSet(memAddress(ptr), value, apiGetBytes(ptr.remaining(), 1)); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - */ - public static void memSet(CharBuffer ptr, int value) { memSet(memAddress(ptr), value, apiGetBytes(ptr.remaining(), 1)); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - */ - public static void memSet(IntBuffer ptr, int value) { memSet(memAddress(ptr), value, apiGetBytes(ptr.remaining(), 2)); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - */ - public static void memSet(LongBuffer ptr, int value) { memSet(memAddress(ptr), value, apiGetBytes(ptr.remaining(), 3)); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - */ - public static void memSet(FloatBuffer ptr, int value) { memSet(memAddress(ptr), value, apiGetBytes(ptr.remaining(), 2)); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - */ - public static void memSet(DoubleBuffer ptr, int value) { memSet(memAddress(ptr), value, apiGetBytes(ptr.remaining(), 3)); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - * @param the buffer type - */ - public static > void memSet(T ptr, int value) { memSet(memAddress(ptr), value, Integer.toUnsignedLong(ptr.remaining()) * ptr.sizeof()); } - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - * @param the struct type - */ - public static > void memSet(T ptr, int value) { memSet(ptr.address, value, ptr.sizeof()); } - - // --- [ memcpy ] --- - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - */ - public static void memCopy(ByteBuffer src, ByteBuffer dst) { - if (CHECKS) { - check(dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), src.remaining()); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - */ - public static void memCopy(ShortBuffer src, ShortBuffer dst) { - if (CHECKS) { - check(dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), apiGetBytes(src.remaining(), 1)); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - */ - public static void memCopy(CharBuffer src, CharBuffer dst) { - if (CHECKS) { - check((Buffer)dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), apiGetBytes(src.remaining(), 1)); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - */ - public static void memCopy(IntBuffer src, IntBuffer dst) { - if (CHECKS) { - check(dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), apiGetBytes(src.remaining(), 2)); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - */ - public static void memCopy(LongBuffer src, LongBuffer dst) { - if (CHECKS) { - check(dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), apiGetBytes(src.remaining(), 3)); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - */ - public static void memCopy(FloatBuffer src, FloatBuffer dst) { - if (CHECKS) { - check(dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), apiGetBytes(src.remaining(), 2)); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - */ - public static void memCopy(DoubleBuffer src, DoubleBuffer dst) { - if (CHECKS) { - check(dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), apiGetBytes(src.remaining(), 3)); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - * @param the buffer type - */ - public static > void memCopy(T src, T dst) { - if (CHECKS) { - check(dst, src.remaining()); - } - MultiReleaseMemCopy.copy(memAddress(src), memAddress(dst), Integer.toUnsignedLong(src.remaining()) * src.sizeof()); - } - - /** - * Sets all bytes of a struct to a copy of another struct. - * - * @param src the source struct - * @param dst the destination struct - * @param the struct type - */ - public static > void memCopy(T src, T dst) { - MultiReleaseMemCopy.copy(src.address, dst.address, src.sizeof()); - } - - /* ------------------------------------- - ------------------------------------- - UNSAFE MEMORY ACCESS API - ------------------------------------- - ------------------------------------- */ - - private static final int FILL_PATTERN_32 = Integer.divideUnsigned(-1, 255); - private static final long FILL_PATTERN_64 = Long.divideUnsigned(-1L, 255L); - - /** - * Sets all bytes in a specified block of memory to a fixed value (usually zero). - * - * @param ptr the starting memory address - * @param value the value to set (memSet will convert it to unsigned byte) - * @param bytes the number of bytes to set - */ - public static void memSet(long ptr, int value, long bytes) { - if (DEBUG && (ptr == NULL || bytes < 0)) { - throw new IllegalArgumentException(); - } - - /* - - Unsafe.setMemory is very slow. - - A custom Java loop is fastest at small sizes, approximately up to 256 bytes. - - The native memset becomes fastest at bigger sizes, when the JNI overhead becomes negligible. - */ - - //UNSAFE.setMemory(ptr, bytes, (byte)(value & 0xFF)); - if (bytes < 256L) { - int p = (int)ptr; - if (BITS64) { - if ((p & 7) == 0) { - memSet64(ptr, value, (int)bytes & 0xFF); - return; - } - } else { - if ((p & 3) == 0) { - memSet32(p, value, (int)bytes & 0xFF); - return; - } - } - } - nmemset(ptr, value, bytes); - } - private static void memSet64(long ptr, int value, int bytes) { - int aligned = bytes & ~7; - - // Aligned body - long valuel = (value & 0xFF) * FILL_PATTERN_64; - for (int i = 0; i < aligned; i += 8) { - UNSAFE.putLong(null, ptr + i, valuel); - } - - // Unaligned tail - byte valueb = (byte)(value & 0xFF); - for (int i = aligned; i < bytes; i++) { - UNSAFE.putByte(null, ptr + i, valueb); - } - } - private static void memSet32(int ptr, int value, int bytes) { - int aligned = bytes & ~3; - - // Aligned body - int vi = (value & 0xFF) * FILL_PATTERN_32; - for (int i = 0; i < aligned; i += 4) { - UNSAFE.putInt(null, (ptr + i) & 0xFFFF_FFFFL, vi); - } - - // Unaligned tail - byte vb = (byte)(value & 0xFF); - for (int i = aligned; i < bytes; i++) { - UNSAFE.putByte(null, (ptr + i) & 0xFFFF_FFFFL, vb); - } - } - - // from LWJGL 3.1.2 - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - * @param bytes the number of bytes to copy - */ - public static void memCopy(long src, long dst, int bytes) { - memCopy(src, dst, (long)bytes); - } - - /** - * Sets all bytes in a specified block of memory to a copy of another block. - * - * @param src the source memory address - * @param dst the destination memory address - * @param bytes the number of bytes to copy - */ - public static void memCopy(long src, long dst, long bytes) { - if (DEBUG && (src == NULL || dst == NULL || bytes < 0)) { - throw new IllegalArgumentException(); - } - - MultiReleaseMemCopy.copy(src, dst, bytes); - } - - static void memCopyAligned64(long src, long dst, int bytes) { - int aligned = bytes & ~7; - - // Aligned body - for (int i = 0; i < aligned; i += 8) { - UNSAFE.putLong(null, dst + i, UNSAFE.getLong(null, src + i)); - } - - // Unaligned tail - for (int i = aligned; i < bytes; i++) { - UNSAFE.putByte(null, dst + i, UNSAFE.getByte(null, src + i)); - } - } - static void memCopyAligned32(int src, int dst, int bytes) { - int aligned = bytes & ~3; - - // Aligned body - for (int i = 0; i < aligned; i += 4) { - UNSAFE.putInt(null, (dst + i) & 0xFFFF_FFFFL, UNSAFE.getInt(null, (src + i) & 0xFFFF_FFFFL)); - } - - // Unaligned tail - for (int i = aligned; i < bytes; i++) { - UNSAFE.putByte(null, (dst + i) & 0xFFFF_FFFFL, UNSAFE.getByte(null, (src + i) & 0xFFFF_FFFFL)); - } - } - - public static boolean memGetBoolean(long ptr) { return UNSAFE.getByte(null, ptr) != 0; } - public static byte memGetByte(long ptr) { return UNSAFE.getByte(null, ptr); } - public static short memGetShort(long ptr) { return UNSAFE.getShort(null, ptr); } - public static int memGetInt(long ptr) { return UNSAFE.getInt(null, ptr); } - public static long memGetLong(long ptr) { return UNSAFE.getLong(null, ptr); } - public static float memGetFloat(long ptr) { return UNSAFE.getFloat(null, ptr); } - public static double memGetDouble(long ptr) { return UNSAFE.getDouble(null, ptr); } - public static long memGetCLong(long ptr) { - return CLONG_SIZE == 8 - ? UNSAFE.getLong(null, ptr) - : UNSAFE.getInt(null, ptr); - } - - public static long memGetAddress(long ptr) { - return BITS64 - ? UNSAFE.getLong(null, ptr) - : UNSAFE.getInt(null, ptr) & 0xFFFF_FFFFL; - } - - public static void memPutByte(long ptr, byte value) { UNSAFE.putByte(null, ptr, value); } - public static void memPutShort(long ptr, short value) { UNSAFE.putShort(null, ptr, value); } - public static void memPutInt(long ptr, int value) { UNSAFE.putInt(null, ptr, value); } - public static void memPutLong(long ptr, long value) { UNSAFE.putLong(null, ptr, value); } - public static void memPutFloat(long ptr, float value) { UNSAFE.putFloat(null, ptr, value); } - public static void memPutDouble(long ptr, double value) { UNSAFE.putDouble(null, ptr, value); } - public static void memPutCLong(long ptr, long value) { - if (CLONG_SIZE == 8) { - UNSAFE.putLong(null, ptr, value); - } else { - UNSAFE.putInt(null, ptr, (int)value); - } - } - - public static void memPutAddress(long ptr, long value) { - if (BITS64) { - UNSAFE.putLong(null, ptr, value); - } else { - UNSAFE.putInt(null, ptr, (int)value); - } - } - - /* ------------------------------------- - ------------------------------------- - JNI UTILITIES API - ------------------------------------- - ------------------------------------- */ - - /** - * Returns the object that the specified global reference points to. - * - * @param globalRef the global reference - * @param the object type - * - * @return the object pointed to by {@code globalRef} - */ - public static native T memGlobalRefToObject(long globalRef); - - /* ------------------------------------- - ------------------------------------- - TEXT ENCODING API - ------------------------------------- - ------------------------------------- */ - - private static int write8(long target, int offset, int value) { - UNSAFE.putByte(null, target + Integer.toUnsignedLong(offset), (byte)value); - return offset + 1; - } - private static int write8Safe(long target, int offset, int maxLength, int value) { - if (offset == maxLength) { - throw new BufferOverflowException(); - } - UNSAFE.putByte(null, target + Integer.toUnsignedLong(offset), (byte)value); - return offset + 1; - } - private static int write16(long target, int offset, char value) { - UNSAFE.putShort(null, target + Integer.toUnsignedLong(offset), (short)value); - return offset + 2; - } - - /** - * Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. - * - * @param text the text to encode - * - * @return the encoded text. The returned buffer must be deallocated manually with {@link #memFree}. - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static ByteBuffer memASCII(CharSequence text) { - return memASCII(text, true); - } - - /** Like {@link #memASCII(CharSequence) memASCII}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public static ByteBuffer memASCIISafe(@Nullable CharSequence text) { - return text == null ? null : memASCII(text, true); - } - - /** - * Returns a {@link ByteBuffer} containing the specified text ASCII encoded and optionally null-terminated. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * - * @return the encoded text. The returned buffer must be deallocated manually with {@link #memFree}. - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static ByteBuffer memASCII(CharSequence text, boolean nullTerminated) { - int length = memLengthASCII(text, nullTerminated); - long target = nmemAlloc(length); - if (CHECKS && target == NULL) { - throw new OutOfMemoryError(); - } - encodeASCIIUnsafe(text, nullTerminated, target); - return wrap(BUFFER_BYTE, target, length).order(NATIVE_ORDER); - } - - /** Like {@link #memASCII(CharSequence, boolean) memASCII}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public static ByteBuffer memASCIISafe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? null : memASCII(text, nullTerminated); - } - - /** - * Encodes and optionally null-terminates the specified text using ASCII encoding. The encoded text is stored in the specified {@link ByteBuffer}, at the - * current buffer position. The current buffer position is not modified by this operation. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0' - * @param target the buffer where the encoded text should be stored - * - * @return the number of bytes of the encoded string - * - * @throws BufferOverflowException if more than {@code target.remaining()} bytes are required to encode the text. - */ - public static int memASCII(CharSequence text, boolean nullTerminated, ByteBuffer target) { - if (target.remaining() < memLengthASCII(text, nullTerminated)) { - throw new BufferOverflowException(); - } - long address = memAddress(target); - return encodeASCIIUnsafe(text, nullTerminated, address); - } - - /** - * Encodes and optionally null-terminates the specified text using ASCII encoding. The encoded text is stored in the specified {@link ByteBuffer} at the - * specified {@code position} offset. The current buffer position is not modified by this operation. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * @param offset the buffer position to which the string will be encoded - * - * @return the number of bytes of the encoded string - * - * @throws BufferOverflowException if more than {@code target.capacity() - offset} bytes are required to encode the text. - */ - public static int memASCII(CharSequence text, boolean nullTerminated, ByteBuffer target, int offset) { - if (target.capacity() - offset < memLengthASCII(text, nullTerminated)) { - throw new BufferOverflowException(); - } - return encodeASCIIUnsafe(text, nullTerminated, memAddress(target, offset)); - } - - static int encodeASCIIUnsafe(CharSequence text, boolean nullTerminated, long target) { - int i = 0, len = text.length(); - - while (i < len) { - i = write8(target, i, text.charAt(i)); - } - - if (nullTerminated) { - i = write8(target, i, 0); - } - - return i; - } - - /** - * Returns the number of bytes required to encode the specified text in the ASCII encoding. - * - * @param value the text to encode - * @param nullTerminated if true, add the number of bytes required for null-termination - * - * @return the number of bytes - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static int memLengthASCII(CharSequence value, boolean nullTerminated) { - int len = value.length() + (nullTerminated ? 1 : 0); - if (len < 0) { - throw new BufferOverflowException(); - } - return len; - } - - /** - * Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. - * - * @param text the text to encode - * - * @return the encoded text. The returned buffer must be deallocated manually with {@link #memFree}. - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static ByteBuffer memUTF8(CharSequence text) { - return memUTF8(text, true); - } - - /** Like {@link #memUTF8(CharSequence) memUTF8}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public static ByteBuffer memUTF8Safe(@Nullable CharSequence text) { - return text == null ? null : memUTF8(text, true); - } - - /** - * Returns a ByteBuffer containing the specified text UTF-8 encoded and optionally null-terminated. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * - * @return the encoded text. The returned buffer must be deallocated manually with {@link #memFree}. - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static ByteBuffer memUTF8(CharSequence text, boolean nullTerminated) { - int length = memLengthUTF8(text, nullTerminated); - long target = nmemAlloc(length); - if (CHECKS && target == NULL) { - throw new OutOfMemoryError(); - } - encodeUTF8Unsafe(text, nullTerminated, target); - return wrap(BUFFER_BYTE, target, length).order(NATIVE_ORDER); - } - - /** Like {@link #memUTF8(CharSequence, boolean) memUTF8}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public static ByteBuffer memUTF8Safe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? null : memUTF8(text, nullTerminated); - } - - /** - * Encodes and optionally null-terminates the specified text using UTF-8 encoding. The encoded text is stored in the specified {@link ByteBuffer}, at the - * current buffer position. The current buffer position is not modified by this operation. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * @param target the buffer in which to store the encoded text - * - * @return the number of bytes of the encoded string - * - * @throws BufferOverflowException if more than {@code target.remaining} bytes are required to encode the text. - */ - public static int memUTF8(CharSequence text, boolean nullTerminated, ByteBuffer target) { - if (target.remaining() < memLengthASCII(text, nullTerminated)) { - throw new BufferOverflowException(); - } - return encodeUTF8Safe(text, nullTerminated, memAddress(target), target.remaining()); - } - - /** - * Encodes and optionally null-terminates the specified text using UTF-8 encoding. The encoded text is stored in the specified {@link ByteBuffer}, at the - * specified {@code position} offset. The current buffer position is not modified by this operation. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * @param target the buffer in which to store the encoded text - * @param offset the buffer position to which the string will be encoded - * - * @return the number of bytes of the encoded string - * - * @throws BufferOverflowException if more than {@code target.capacity() - offset} bytes are required to encode the text. - */ - public static int memUTF8(CharSequence text, boolean nullTerminated, ByteBuffer target, int offset) { - if (target.capacity() - offset < memLengthASCII(text, nullTerminated)) { - throw new BufferOverflowException(); - } - return encodeUTF8Safe(text, nullTerminated, memAddress(target, offset), target.capacity() - offset); - } - - static int encodeUTF8Unsafe(CharSequence text, boolean nullTerminated, long target) { - int p = 0, i = 0, len = text.length(); - - while (i < len) { - char c = text.charAt(i++); - if (c < 0x80) { - p = write8(target, p, c); - } else { - int cp = c; - if (c < 0x800) { - p = write8(target, p, 0xC0 | cp >> 6); - } else { - if (!isHighSurrogate(c)) { - p = write8(target, p, 0xE0 | cp >> 12); - } else { - cp = toCodePoint(c, text.charAt(i++)); - - p = write8(target, p, 0xF0 | cp >> 18); - p = write8(target, p, 0x80 | cp >> 12 & 0x3F); - } - p = write8(target, p, 0x80 | cp >> 6 & 0x3F); - } - p = write8(target, p, 0x80 | cp & 0x3F); - } - } - - if (nullTerminated) { - p = write8(target, p, 0); - } - - return p; - } - - static int encodeUTF8Safe(CharSequence text, boolean nullTerminated, long target, int maxLength) { - int p = 0, i = 0, length = text.length(); - - // ASCII fast path - while (i < length) { - char c = text.charAt(i); - if (0x80 <= c) { - break; - } - p = write8(target, p, c); // have already checked that text.length() <= maxLength - i++; - } - - // Slow path - while (i < length) { - char c = text.charAt(i++); - if (c < 0x80) { - p = write8Safe(target, p, maxLength, c); - } else { - int cp = c; - if (c < 0x800) { - p = write8Safe(target, p, maxLength, 0xC0 | cp >> 6); - } else { - if (!isHighSurrogate(c)) { - p = write8Safe(target, p, maxLength, 0xE0 | cp >> 12); - } else { - cp = toCodePoint(c, text.charAt(i++)); - - p = write8Safe(target, p, maxLength, 0xF0 | cp >> 18); - p = write8Safe(target, p, maxLength, 0x80 | cp >> 12 & 0x3F); - } - p = write8Safe(target, p, maxLength, 0x80 | cp >> 6 & 0x3F); - } - p = write8Safe(target, p, maxLength, 0x80 | cp & 0x3F); - } - } - - if (nullTerminated) { - p = write8Safe(target, p, maxLength, 0); - } - - return p; - } - - /** - * Returns the number of bytes required to encode the specified text in the UTF-8 encoding. - * - * @param value the text to encode - * @param nullTerminated if true, add the number of bytes required for null-termination - * - * @return the number of bytes - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static int memLengthUTF8(CharSequence value, boolean nullTerminated) { - int len = value.length(); - int bytes = len + (nullTerminated ? 1 : 0); // start with 1:1 - - for (int i = 0; i < len; i++) { - char c = value.charAt(i); - - if (c < 0x80) { - // 1 input char -> 1 output byte - } else { - if (c < 0x800) { - // c <= 127: 0 (1 input char -> 1 output byte) - // c >= 128: 1 (1 input char -> 2 output bytes) - bytes += (0x7F - c) >>> 31; - } else { - // non-high-surrogate: 1 input char -> 3 output bytes - // surrogate-pair: 2 input chars -> 4 output bytes - bytes += 2; - if (isHighSurrogate(c)) { - i++; - } - } - if (bytes < 0) { - throw new BufferOverflowException(); - } - } - } - - if (bytes < 0) { - throw new BufferOverflowException(); - } - - return bytes; - } - - /** - * Returns a ByteBuffer containing the specified text UTF-16 encoded and null-terminated. - * - * @param text the text to encode - * - * @return the encoded text. The returned buffer must be deallocated manually with {@link #memFree}. - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static ByteBuffer memUTF16(CharSequence text) { - return memUTF16(text, true); - } - - /** Like {@link #memUTF16(CharSequence) memUTF16}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public static ByteBuffer memUTF16Safe(@Nullable CharSequence text) { - return text == null ? null : memUTF16(text, true); - } - - /** - * Returns a ByteBuffer containing the specified text UTF-16 encoded and optionally null-terminated. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * - * @return the encoded text. The returned buffer must be deallocated manually with {@link #memFree}. - * - * @throws BufferOverflowException if more than {@link Integer#MAX_VALUE} bytes are required to encode the text. - */ - public static ByteBuffer memUTF16(CharSequence text, boolean nullTerminated) { - int length = memLengthUTF16(text, nullTerminated); - long target = nmemAlloc(length); - if (CHECKS && target == NULL) { - throw new OutOfMemoryError(); - } - encodeUTF16Unsafe(text, nullTerminated, target); - return wrap(BUFFER_BYTE, target, length).order(NATIVE_ORDER); - } - - /** Like {@link #memUTF16(CharSequence, boolean) memUTF16}, but returns {@code null} if {@code text} is {@code null}. */ - @Nullable - public static ByteBuffer memUTF16Safe(@Nullable CharSequence text, boolean nullTerminated) { - return text == null ? null : memUTF16(text, nullTerminated); - } - - /** - * Encodes and optionally null-terminates the specified text using UTF-16 encoding. The encoded text is stored in the specified {@link ByteBuffer}, at the - * current buffer position. The current buffer position is not modified by this operation. The {@code target} buffer is assumed to have enough remaining - * space to store the encoded text. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * @param target the buffer in which to store the encoded text - * - * @return the number of bytes of the encoded string - * - * @throws BufferOverflowException if more than {@code target.remaining()} bytes are required to encode the text. - */ - public static int memUTF16(CharSequence text, boolean nullTerminated, ByteBuffer target) { - if (target.remaining() < memLengthUTF16(text, nullTerminated)) { - throw new BufferOverflowException(); - } - long address = memAddress(target); - return encodeUTF16Unsafe(text, nullTerminated, address); - } - - /** - * Encodes and optionally null-terminates the specified text using UTF-16 encoding. The encoded text is stored in the specified {@link ByteBuffer} at the - * specified {@code position} offset. The current buffer position is not modified by this operation. The {@code target} buffer is assumed to have enough - * remaining space to store the encoded text. - * - * @param text the text to encode - * @param nullTerminated if true, the text will be terminated with a '\0'. - * @param target the buffer in which to store the encoded text - * @param offset the buffer position to which the string will be encoded - * - * @return the number of bytes of the encoded string - * - * @throws BufferOverflowException if more than {@code target.capacity() - offset} bytes are required to encode the text. - */ - public static int memUTF16(CharSequence text, boolean nullTerminated, ByteBuffer target, int offset) { - if (target.capacity() - offset < memLengthUTF16(text, nullTerminated)) { - throw new BufferOverflowException(); - } - long address = memAddress(target, offset); - return encodeUTF16Unsafe(text, nullTerminated, address); - } - - static int encodeUTF16Unsafe(CharSequence text, boolean nullTerminated, long target) { - int p = 0, i = 0, len = text.length(); - - while (i < len) { - p = write16(target, p, text.charAt(i++)); - } - - if (nullTerminated) { - p = write16(target, p, '\0'); - } - - return p; - } - - /** - * Returns the number of bytes required to encode the specified text in the UTF-16 encoding. - * - * @param value the text to encode - * @param nullTerminated if true, add the number of bytes required for null-termination - * - * @return the number of bytes - */ - public static int memLengthUTF16(CharSequence value, boolean nullTerminated) { - int len = value.length() + (nullTerminated ? 1 : 0); - if (len < 0 || 0x3FFFFFFF < len) { - throw new BufferOverflowException(); - } - return len << 1; - } - - /* ------------------------------------- - ------------------------------------- - TEXT DECODING API - ------------------------------------- - ------------------------------------- */ - - private static int memLengthNT1(long address, int maxLength) { - if (CHECKS) { - check(address); - } - return BITS64 - ? strlen64NT1(address, maxLength) - : strlen32NT1(address, maxLength); - } - - private static int strlen64NT1(long address, int maxLength) { - int i = 0; - - if (8 <= maxLength) { - int misalignment = (int)address & 7; - if (misalignment != 0) { - // Align to 8 bytes - for (int len = 8 - misalignment; i < len; i++) { - if (UNSAFE.getByte(null, address + i) == 0) { - return i; - } - } - } - - // Aligned longs for performance - for (; i <= maxLength - 8; i += 8) { - if (mathHasZeroByte(UNSAFE.getLong(null, address + i))) { - break; - } - } - } - - // Tail - for (; i < maxLength; i++) { - if (UNSAFE.getByte(null, address + i) == 0) { - break; - } - } - - return i; - } - - private static int strlen32NT1(long address, int maxLength) { - int i = 0; - - if (4 <= maxLength) { - int misalignment = (int)address & 3; - if (misalignment != 0) { - // Align to 4 bytes - for (int len = 4 - misalignment; i < len; i++) { - if (UNSAFE.getByte(null, address + i) == 0) { - return i; - } - } - } - - // Aligned ints for performance - for (; i <= maxLength - 4; i += 4) { - if (mathHasZeroByte(UNSAFE.getInt(null, address + i))) { - break; - } - } - } - - // Tail - for (; i < maxLength; i++) { - if (UNSAFE.getByte(null, address + i) == 0) { - break; - } - } - - return i; - } - - /** - * Calculates the length, in bytes, of the null-terminated string that starts at the current position of the specified buffer. A single \0 character will - * terminate the string. The returned length will NOT include the \0 byte. - * - *

    This method is useful for reading ASCII and UTF8 encoded text.

    - * - * @param buffer the buffer containing the null-terminated string - * - * @return the string length, in bytes - */ - public static int memLengthNT1(ByteBuffer buffer) { - return memLengthNT1(memAddress(buffer), buffer.remaining()); - } - - private static int memLengthNT2(long address, int maxLength) { - if (CHECKS) { - check(address); - } - return BITS64 - ? strlen64NT2(address, maxLength) - : strlen32NT2((int)address, maxLength); - } - - private static int strlen64NT2(long address, int maxLength) { - int i = 0; - - if (8 <= maxLength) { - int misalignment = (int)address & 7; - if (misalignment != 0) { - // Align to 8 bytes - for (int len = 8 - misalignment; i < len; i += 2) { - if (UNSAFE.getShort(null, address + i) == 0) { - return i; - } - } - } - - // Aligned longs for performance - for (; i <= maxLength - 8; i += 8) { - if (mathHasZeroShort(UNSAFE.getLong(null, address + i))) { - break; - } - } - } - - // Tail - for (; i < maxLength; i += 2) { - if (UNSAFE.getShort(null, address + i) == 0) { - break; - } - } - - return i; - } - - private static int strlen32NT2(long address, int maxLength) { - int i = 0; - - if (4 <= maxLength) { - int misalignment = (int)address & 3; - if (misalignment != 0) { - // Align to 4 bytes - for (int len = 4 - misalignment; i < len; i += 2) { - if (UNSAFE.getShort(null, address + i) == 0) { - return i; - } - } - } - - // Aligned longs for performance - while (i <= maxLength - 4) { - if (mathHasZeroShort(UNSAFE.getInt(null, address + i))) { - break; - } - i += 4; - } - } - - // Tail - for (; i < maxLength; i += 2) { - if (UNSAFE.getShort(null, address + i) == 0) { - break; - } - } - - return i; - } - - /** - * Calculates the length, in bytes, of the null-terminated string that starts at the current position of the specified buffer. Two \0 characters will - * terminate the string. The returned buffer will NOT include the \0 bytes. - * - *

    This method is useful for reading UTF16 encoded text.

    - * - * @param buffer the buffer containing the null-terminated string - * - * @return the string length, in bytes - */ - public static int memLengthNT2(ByteBuffer buffer) { - return memLengthNT2(memAddress(buffer), buffer.remaining()); - } - - /** - * Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that - * address. A single \0 character will terminate the string. The returned buffer will NOT include the \0 byte. - * - *

    This method is useful for reading ASCII and UTF8 encoded text.

    - * - * @param address the starting memory address - * - * @return the new ByteBuffer - */ - public static ByteBuffer memByteBufferNT1(long address) { - return memByteBuffer(address, memLengthNT1(address, Integer.MAX_VALUE)); - } - - /** - * Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that - * address, up to a maximum of {@code maxLength} bytes. A single \0 character will terminate the string. The returned buffer will NOT include the \0 byte. - * - *

    This method is useful for reading ASCII and UTF8 encoded text.

    - * - * @param address the starting memory address - * @param maxLength the maximum string length, in bytes - * - * @return the new ByteBuffer - */ - public static ByteBuffer memByteBufferNT1(long address, int maxLength) { - return memByteBuffer(address, memLengthNT1(address, maxLength)); - } - - /** Like {@link #memByteBufferNT1(long) memByteBufferNT1}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static ByteBuffer memByteBufferNT1Safe(long address) { - return address == NULL ? null : memByteBuffer(address, memLengthNT1(address, Integer.MAX_VALUE)); - } - - /** Like {@link #memByteBufferNT1(long, int) memByteBufferNT1}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static ByteBuffer memByteBufferNT1Safe(long address, int maxLength) { - return address == NULL ? null : memByteBuffer(address, memLengthNT1(address, maxLength)); - } - - /** - * Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that - * address. Two \0 characters will terminate the string. The returned buffer will NOT include the \0 bytes. - * - *

    This method is useful for reading UTF16 encoded text.

    - * - * @param address the starting memory address - * - * @return the new ByteBuffer - */ - public static ByteBuffer memByteBufferNT2(long address) { - return memByteBufferNT2(address, Integer.MAX_VALUE - 1); - } - - /** - * Creates a new direct ByteBuffer that starts at the specified memory address and has capacity equal to the null-terminated string starting at that - * address, up to a maximum of {@code maxLength} bytes. Two \0 characters will terminate the string. The returned buffer will NOT include the \0 bytes. - * - *

    This method is useful for reading UTF16 encoded text.

    - * - * @param address the starting memory address - * - * @return the new ByteBuffer - */ - public static ByteBuffer memByteBufferNT2(long address, int maxLength) { - if (DEBUG) { - if ((maxLength & 1) != 0) { - throw new IllegalArgumentException("The maximum length must be an even number."); - } - } - return memByteBuffer(address, memLengthNT2(address, maxLength)); - } - - /** Like {@link #memByteBufferNT2(long) memByteBufferNT2}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static ByteBuffer memByteBufferNT2Safe(long address) { - return address == NULL ? null : memByteBufferNT2(address, Integer.MAX_VALUE - 1); - } - - /** Like {@link #memByteBufferNT2(long, int) memByteBufferNT2}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static ByteBuffer memByteBufferNT2Safe(long address, int maxLength) { - return address == NULL ? null : memByteBufferNT2(address, maxLength); - } - - /** - * Converts the null-terminated ASCII encoded string at the specified memory address to a {@link String}. - * - * @param address the string memory address - * - * @return the decoded {@link String} - */ - public static String memASCII(long address) { - return memASCII(address, memLengthNT1(address, Integer.MAX_VALUE)); - } - - /** - * Converts the ASCII encoded string at the specified memory address to a {@link String}. - * - * @param address the string memory address - * @param length the number of bytes to decode - * - * @return the decoded {@link String} - */ - @SuppressWarnings("deprecation") - public static String memASCII(long address, int length) { - if (length <= 0) { - return ""; - } - - byte[] ascii = length <= ARRAY_TLC_SIZE ? ARRAY_TLC_BYTE.get() : new byte[length]; - memByteBuffer(address, length).get(ascii, 0, length); - return new String(ascii, 0, 0, length); - } - - /** - * Decodes the bytes with index {@code [position(), position()+remaining()}) in {@code buffer}, as an ASCII string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * - * @return the decoded {@link String} - */ - public static String memASCII(ByteBuffer buffer) { - return memASCII(memAddress(buffer), buffer.remaining()); - } - - /** Like {@link #memASCII(long) memASCII}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static String memASCIISafe(long address) { - return address == NULL ? null : memASCII(address, memLengthNT1(address, Integer.MAX_VALUE)); - } - - /** Like {@link #memASCII(long, int) memASCII}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static String memASCIISafe(long address, int length) { - return address == NULL ? null : memASCII(address, length); - } - - /** Like {@link #memASCII(ByteBuffer) memASCII}, but returns {@code null} if {@code buffer} is {@code null}. */ - @Nullable - public static String memASCIISafe(@Nullable ByteBuffer buffer) { - return buffer == null ? null : memASCII(memAddress(buffer), buffer.remaining()); - } - - /** - * Decodes the bytes with index {@code [position(), position()+length}) in {@code buffer}, as an ASCII string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * @param length the number of bytes to decode - * - * @return the decoded {@link String} - */ - public static String memASCII(ByteBuffer buffer, int length) { - return memASCII(memAddress(buffer), length); - } - - /** - * Decodes the bytes with index {@code [offset, offset+length}) in {@code buffer}, as an ASCII string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * @param length the number of bytes to decode - * @param offset the offset at which to start decoding. - * - * @return the decoded {@link String} - */ - public static String memASCII(ByteBuffer buffer, int length, int offset) { - return memASCII(memAddress(buffer, offset), length); - } - - /** - * Converts the null-terminated UTF-8 encoded string at the specified memory address to a {@link String}. - * - * @param address the string memory address - * - * @return the decoded {@link String} - */ - public static String memUTF8(long address) { - return MultiReleaseTextDecoding.decodeUTF8(address, memLengthNT1(address, Integer.MAX_VALUE)); - } - - /** - * Converts the UTF-8 encoded string at the specified memory address to a {@link String}. - * - * @param address the string memory address - * @param length the number of bytes to decode - * - * @return the decoded {@link String} - */ - public static String memUTF8(long address, int length) { - return MultiReleaseTextDecoding.decodeUTF8(address, length); - } - - /** - * Decodes the bytes with index {@code [position(), position()+remaining()}) in {@code buffer}, as a UTF-8 string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * - * @return the decoded {@link String} - */ - public static String memUTF8(ByteBuffer buffer) { - return MultiReleaseTextDecoding.decodeUTF8(memAddress(buffer), buffer.remaining()); - } - - /** Like {@link #memUTF8(long) memUTF8}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static String memUTF8Safe(long address) { - return address == NULL ? null : MultiReleaseTextDecoding.decodeUTF8(address, memLengthNT1(address, Integer.MAX_VALUE)); - } - - /** Like {@link #memUTF8(long, int) memUTF8}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static String memUTF8Safe(long address, int length) { - return address == NULL ? null : MultiReleaseTextDecoding.decodeUTF8(address, length); - } - - /** Like {@link #memUTF8(ByteBuffer) memUTF8}, but returns {@code null} if {@code buffer} is {@code null}. */ - @Nullable - public static String memUTF8Safe(@Nullable ByteBuffer buffer) { - return buffer == null ? null : MultiReleaseTextDecoding.decodeUTF8(memAddress(buffer), buffer.remaining()); - } - - /** - * Decodes the bytes with index {@code [position(), position()+length}) in {@code buffer}, as a UTF-8 string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * @param length the number of bytes to decode - * - * @return the decoded {@link String} - */ - public static String memUTF8(ByteBuffer buffer, int length) { - return MultiReleaseTextDecoding.decodeUTF8(memAddress(buffer), length); - } - - /** - * Decodes the bytes with index {@code [offset, offset+length}) in {@code buffer}, as a UTF-8 string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * @param length the number of bytes to decode - * @param offset the offset at which to start decoding. - * - * @return the decoded {@link String} - */ - public static String memUTF8(ByteBuffer buffer, int length, int offset) { - return MultiReleaseTextDecoding.decodeUTF8(memAddress(buffer, offset), length); - } - - /** - * Converts the null-terminated UTF-16 encoded string at the specified memory address to a {@link String}. - * - * @param address the string memory address - * - * @return the decoded {@link String} - */ - public static String memUTF16(long address) { - return memUTF16(address, memLengthNT2(address, Integer.MAX_VALUE - 1) >> 1); - } - - /** - * Converts the UTF-16 encoded string at the specified memory address to a {@link String}. - * - * @param address the string memory address - * @param length the number of characters to decode - * - * @return the decoded {@link String} - */ - public static String memUTF16(long address, int length) { - if (length <= 0) { - return ""; - } - - if (DEBUG) { - // The implementation below does no codepoint validation. - int len = length << 1; - byte[] bytes = len <= ARRAY_TLC_SIZE ? ARRAY_TLC_BYTE.get() : new byte[len]; - memByteBuffer(address, len).get(bytes, 0, len); - return new String(bytes, 0, len, UTF16); - } - - char[] chars = length <= ARRAY_TLC_SIZE ? ARRAY_TLC_CHAR.get() : new char[length]; - memCharBuffer(address, length).get(chars, 0, length); - return new String(chars, 0, length); - } - - /** - * Decodes the bytes with index {@code [position(), position()+remaining()}) in {@code buffer}, as a UTF-16 string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * - * @return the decoded {@link String} - */ - public static String memUTF16(ByteBuffer buffer) { - return memUTF16(memAddress(buffer), buffer.remaining() >> 1); - } - - /** Like {@link #memUTF16(long) memUTF16}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static String memUTF16Safe(long address) { - return address == NULL ? null : memUTF16(address, memLengthNT2(address, Integer.MAX_VALUE - 1) >> 1); - } - - /** Like {@link #memUTF16(long, int) memUTF16}, but returns {@code null} if {@code address} is {@link #NULL}. */ - @Nullable - public static String memUTF16Safe(long address, int length) { - return address == NULL ? null : memUTF16(address, length); - } - - /** Like {@link #memUTF16(ByteBuffer) memUTF16}, but returns {@code null} if {@code buffer} is {@code null}. */ - @Nullable - public static String memUTF16Safe(@Nullable ByteBuffer buffer) { - return buffer == null ? null : memUTF16(memAddress(buffer), buffer.remaining() >> 1); - } - - /** - * Decodes the bytes with index {@code [position(), position()+(length*2)}) in {@code buffer}, as a UTF-16 string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * @param length the number of characters to decode - * - * @return the decoded {@link String} - */ - public static String memUTF16(ByteBuffer buffer, int length) { - return memUTF16(memAddress(buffer), length); - } - - /** - * Decodes the bytes with index {@code [offset, offset+(length*2)}) in {@code buffer}, as a UTF-16 string. - * - *

    The current {@code position} and {@code limit} of the specified {@code buffer} are not affected by this operation.

    - * - * @param buffer the {@link ByteBuffer} to decode - * @param length the number of characters to decode - * @param offset the offset at which to start decoding, in bytes. - * - * @return the decoded {@link String} - */ - public static String memUTF16(ByteBuffer buffer, int length, int offset) { - return memUTF16(memAddress(buffer, offset), length); - } - - // ------------------------------------------------- - // ------------------------------------------------- - // ------------------------------------------------- - - private static sun.misc.Unsafe getUnsafeInstance() { - Field[] fields = sun.misc.Unsafe.class.getDeclaredFields(); - - /* - Different runtimes use different names for the Unsafe singleton, - so we cannot use .getDeclaredField and we scan instead. For example: - - Oracle: theUnsafe - PERC : m_unsafe_instance - Android: THE_ONE - */ - for (Field field : fields) { - if (!field.getType().equals(sun.misc.Unsafe.class)) { - continue; - } - - int modifiers = field.getModifiers(); - if (!(Modifier.isStatic(modifiers) && Modifier.isFinal(modifiers))) { - continue; - } - - try { - field.setAccessible(true); - return (sun.misc.Unsafe)field.get(null); - } catch (Exception ignored) { - } - break; - } - - throw new UnsupportedOperationException("LWJGL requires sun.misc.Unsafe to be available."); - } - - private static long getFieldOffset(Class containerType, Class fieldType, LongPredicate predicate) { - Class c = containerType; - while (c != Object.class) { - Field[] fields = c.getDeclaredFields(); - for (Field field : fields) { - if (!field.getType().isAssignableFrom(fieldType) || Modifier.isStatic(field.getModifiers()) || field.isSynthetic()) { - continue; - } - - long offset = UNSAFE.objectFieldOffset(field); - if (predicate.test(offset)) { - return offset; - } - } - c = c.getSuperclass(); - } - throw new UnsupportedOperationException("Failed to find field offset in class."); - } - - private static long getFieldOffsetInt(Object container, int value) { - return getFieldOffset(container.getClass(), int.class, offset -> UNSAFE.getInt(container, offset) == value); - } - - private static long getFieldOffsetObject(Object container, Object value) { - return getFieldOffset(container.getClass(), value.getClass(), offset -> UNSAFE.getObject(container, offset) == value); - } - - private static long getAddressOffset() { - long MAGIC_ADDRESS = 0xDEADBEEF8BADF00DL & (BITS32 ? 0xFFFF_FFFFL : 0xFFFF_FFFF_FFFF_FFFFL); - - ByteBuffer bb = Objects.requireNonNull(NewDirectByteBuffer(MAGIC_ADDRESS, 0)); - - return getFieldOffset(bb.getClass(), long.class, offset -> UNSAFE.getLong(bb, offset) == MAGIC_ADDRESS); - } - - private static final int MAGIC_CAPACITY = 0x0D15EA5E; - private static final int MAGIC_POSITION = 0x00FACADE; - - private static long getMarkOffset() { - ByteBuffer bb = Objects.requireNonNull(NewDirectByteBuffer(1L, 0)); - return getFieldOffsetInt(bb, -1); - } - - private static long getPositionOffset() { - ByteBuffer bb = Objects.requireNonNull(NewDirectByteBuffer(-1L, MAGIC_CAPACITY)); - bb.position(MAGIC_POSITION); - return getFieldOffsetInt(bb, MAGIC_POSITION); - } - - private static long getLimitOffset() { - ByteBuffer bb = Objects.requireNonNull(NewDirectByteBuffer(-1L, MAGIC_CAPACITY)); - bb.limit(MAGIC_POSITION); - return getFieldOffsetInt(bb, MAGIC_POSITION); - } - - private static long getCapacityOffset() { - ByteBuffer bb = Objects.requireNonNull(NewDirectByteBuffer(-1L, MAGIC_CAPACITY)); - bb.limit(0); - return getFieldOffsetInt(bb, MAGIC_CAPACITY); - } - - @SuppressWarnings("unchecked") - static T wrap(Class clazz, long address, int capacity) { - T buffer; - try { - buffer = (T)UNSAFE.allocateInstance(clazz); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(buffer, ADDRESS, address); - UNSAFE.putInt(buffer, MARK, -1); - UNSAFE.putInt(buffer, LIMIT, capacity); - UNSAFE.putInt(buffer, CAPACITY, capacity); - - return buffer; - } - - static ByteBuffer slice(ByteBuffer source, long address, int capacity) { - ByteBuffer target; - try { - target = (ByteBuffer)UNSAFE.allocateInstance(BUFFER_BYTE); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(target, ADDRESS, address); - UNSAFE.putInt(target, MARK, -1); - UNSAFE.putInt(target, LIMIT, capacity); - UNSAFE.putInt(target, CAPACITY, capacity); - - Object attachment = UNSAFE.getObject(source, PARENT_BYTE); - UNSAFE.putObject(target, PARENT_BYTE, attachment == null ? source : attachment); - - return target.order(source.order()); - } - - @SuppressWarnings("unchecked") - static T slice(Class clazz, T source, long address, int capacity, long attachmentOffset) { - T target; - try { - target = (T)UNSAFE.allocateInstance(clazz); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(target, ADDRESS, address); - UNSAFE.putInt(target, MARK, -1); - UNSAFE.putInt(target, LIMIT, capacity); - UNSAFE.putInt(target, CAPACITY, capacity); - - UNSAFE.putObject(target, attachmentOffset, UNSAFE.getObject(source, attachmentOffset)); - - return target; - } - - @SuppressWarnings("unchecked") - static T duplicate(Class clazz, T source, long attachmentOffset) { - T target; - try { - target = (T)UNSAFE.allocateInstance(clazz); - } catch (InstantiationException e) { - throw new UnsupportedOperationException(e); - } - - UNSAFE.putLong(target, ADDRESS, UNSAFE.getLong(source, ADDRESS)); - UNSAFE.putInt(target, MARK, UNSAFE.getInt(source, MARK)); - UNSAFE.putInt(target, POSITION, UNSAFE.getInt(source, POSITION)); - UNSAFE.putInt(target, LIMIT, UNSAFE.getInt(source, LIMIT)); - UNSAFE.putInt(target, CAPACITY, UNSAFE.getInt(source, CAPACITY)); - - UNSAFE.putObject(target, attachmentOffset, UNSAFE.getObject(source, attachmentOffset)); - - return target; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/system/MultiReleaseMemCopy.java b/LWJGL/src/main/java/org/lwjgl/system/MultiReleaseMemCopy.java deleted file mode 100644 index f6a75997..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/MultiReleaseMemCopy.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.Pointer.*; -import static org.lwjgl.system.libc.LibCString.*; - -final class MultiReleaseMemCopy { - - private MultiReleaseMemCopy() { - } - - static void copy(long src, long dst, long bytes) { - if (bytes <= 160) { - // A custom Java loop is fastest at small sizes, approximately up to 160 bytes. - if (BITS64 && ((src | dst) & 7) == 0) { - // both src and dst are aligned to 8 bytes - memCopyAligned64(src, dst, (int)bytes & 0xFF); - } else { - // Unaligned fallback. Poor performance until Java 16. - UNSAFE.copyMemory(null, src, null, dst, bytes); - } - return; - } - - // Fastest at bigger sizes, when the JNI overhead becomes negligible. - nmemcpy(dst, src, bytes); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/system/MultiReleaseTextDecoding.java b/LWJGL/src/main/java/org/lwjgl/system/MultiReleaseTextDecoding.java deleted file mode 100644 index 7b8cb407..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/MultiReleaseTextDecoding.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import java.nio.*; -import java.nio.charset.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * String decoding utilities. - * - *

    On Java 9 different implementations are used that work better with compact strings (JEP 254).

    - */ -final class MultiReleaseTextDecoding { - - private MultiReleaseTextDecoding() { - } - - /** @see MemoryUtil#memUTF8(ByteBuffer, int, int) */ - static String decodeUTF8(long source, int length) { - if (length <= 0) { - return ""; - } - - if (DEBUG) { - // The implementation below does no codepoint validation. - byte[] bytes = length <= ARRAY_TLC_SIZE ? ARRAY_TLC_BYTE.get() : new byte[length]; - memByteBuffer(source, length).get(bytes, 0, length); - return new String(bytes, 0, length, StandardCharsets.UTF_8); - } - - char[] string = length <= ARRAY_TLC_SIZE ? ARRAY_TLC_CHAR.get() : new char[length]; - - int i = 0, position = 0; - - while (position < length) { - char c; - - int b0 = UNSAFE.getByte(null, source + position++) & 0xFF; - if (b0 < 0x80) { - c = (char)b0; - } else { - int b1 = UNSAFE.getByte(null, source + position++) & 0x3F; - if ((b0 & 0xE0) == 0xC0) { - c = (char)(((b0 & 0x1F) << 6) | b1); - } else { - int b2 = UNSAFE.getByte(null, source + position++) & 0x3F; - if ((b0 & 0xF0) == 0xE0) { - c = (char)(((b0 & 0x0F) << 12) | (b1 << 6) | b2); - } else { - int b3 = UNSAFE.getByte(null, source + position++) & 0x3F; - int cp = ((b0 & 0x07) << 18) | (b1 << 12) | (b2 << 6) | b3; - - if (i < length) { - string[i++] = (char)((cp >>> 10) + 0xD7C0); - } - c = (char)((cp & 0x3FF) + 0xDC00); - } - } - } - if (i < length) { - string[i++] = c; - } - } - - return new String(string, 0, Math.min(i, length)); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/NativeResource.java b/LWJGL/src/main/java/org/lwjgl/system/NativeResource.java deleted file mode 100644 index ae8462bb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/NativeResource.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -/** - * Classes that implement this interface are associated with one or more native resources. These resources must be explicitly freed when a class instance is - * no longer used, by calling the {@link #free} method. - * - *

    This interface extends {@link AutoCloseable}, which means that implementations may be used as resources in try-with-resources statements.

    - */ -public interface NativeResource extends AutoCloseable { - - /** Frees any native resources held by this object. */ - void free(); - - @Override - default void close() { - free(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/NativeType.java b/LWJGL/src/main/java/org/lwjgl/system/NativeType.java deleted file mode 100644 index f8894cc3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/NativeType.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import java.lang.annotation.*; - -/** Annotates parameter and return types in LWJGL bindings with the C type as defined in the native function. */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER}) -public @interface NativeType { - String value(); -} diff --git a/LWJGL/src/main/java/org/lwjgl/system/NonnullDefault.java b/LWJGL/src/main/java/org/lwjgl/system/NonnullDefault.java deleted file mode 100644 index 7ceef49e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/NonnullDefault.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import javax.annotation.meta.*; -import java.lang.annotation.*; - -@Documented -@Nonnull -@TypeQualifierDefault({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER }) -@Retention(RetentionPolicy.RUNTIME) -public @interface NonnullDefault {} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/Platform.java b/LWJGL/src/main/java/org/lwjgl/system/Platform.java deleted file mode 100644 index 1babac91..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/Platform.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import java.util.function.*; -import java.util.regex.*; - -import static org.lwjgl.system.APIUtil.*; - -/** The platforms supported by LWJGL. */ -public enum Platform { - - LINUX("Linux", "linux") { - private final Pattern SO = Pattern.compile("(?:^|/)lib\\w+[.]so(?:[.]\\d+)*$"); - - @Override - String mapLibraryName(String name) { - if (SO.matcher(name).find()) { - return name; - } - - return System.mapLibraryName(name); - } - }, - // TODO: Rename to MACOS in LWJGL 4 - MACOSX("macOS", "macos") { - private final Pattern DYLIB = Pattern.compile("(?:^|/)lib\\w+(?:[.]\\d+)*[.]dylib$"); - - @Override - String mapLibraryName(String name) { - if (DYLIB.matcher(name).find()) { - return name; - } - - return System.mapLibraryName(name); - } - }, - WINDOWS("Windows", "windows") { - @Override - String mapLibraryName(String name) { - if (name.endsWith(".dll")) { - return name; - } - - return System.mapLibraryName(name); - } - }; - - /** The architectures supported by LWJGL. */ - public enum Architecture { - X64(true), - X86(false), - ARM64(true), - ARM32(false); - - static final Architecture current; - - final boolean is64Bit; - - static { - String osArch = System.getProperty("os.arch"); - boolean is64Bit = osArch.contains("64") || osArch.startsWith("armv8"); - - current = osArch.startsWith("arm") || osArch.startsWith("aarch64") - ? (is64Bit ? Architecture.ARM64 : Architecture.ARM32) - : (is64Bit ? Architecture.X64 : Architecture.X86); - } - - Architecture(boolean is64Bit) { - this.is64Bit = is64Bit; - } - } - - private static final Platform current; - - private static final Function bundledLibraryNameMapper; - private static final Function bundledLibraryPathMapper; - - static { - String osName = System.getProperty("os.name"); - if (osName.startsWith("Windows")) { - current = WINDOWS; - } else if (osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("SunOS") || osName.startsWith("Unix")) { - current = LINUX; - } else if (osName.startsWith("Mac OS X") || osName.startsWith("Darwin")) { - current = MACOSX; - } else { - throw new LinkageError("Unknown platform: " + osName); - } - - bundledLibraryNameMapper = getMapper( - Configuration.BUNDLED_LIBRARY_NAME_MAPPER.get("default"), - name -> name, - name -> Architecture.current.is64Bit ? name : name + "32" - ); - bundledLibraryPathMapper = getMapper( - Configuration.BUNDLED_LIBRARY_PATH_MAPPER.get("default"), - name -> current.nativePath + "/" + Architecture.current.name().toLowerCase() + "/" + name, - name -> name.substring(name.lastIndexOf('/')) - ); - } - - private final String name; - private final String nativePath; - - Platform(String name, String nativePath) { - this.name = name; - this.nativePath = nativePath; - } - - /** Returns the platform name. */ - public String getName() { - return name; - } - - abstract String mapLibraryName(String name); - - /** Returns the platform on which the library is running. */ - public static Platform get() { - return current; - } - - /** Returns the architecture on which the library is running. */ - public static Architecture getArchitecture() { - return Architecture.current; - } - - public static String mapLibraryNameBundled(String name) { - return bundledLibraryNameMapper.apply(name); - } - - static String mapLibraryPathBundled(String name) { - return bundledLibraryPathMapper.apply(name); - } - - @SuppressWarnings("unchecked") - private static Function getMapper( - @Nullable Object mapper, - Function defaultMapper, - Function legacyMapper - ) { - if (mapper == null || "default".equals(mapper)) { - return defaultMapper; - } - - if ("legacy".equals(mapper)) { - return legacyMapper; - } - - if (mapper instanceof Function) { - return (Function)mapper; - } - - String className = mapper.toString(); - try { - return (Function)Class - .forName(className) - .getConstructor() - .newInstance(); - } catch (Throwable t) { - if (Checks.DEBUG) { - t.printStackTrace(DEBUG_STREAM); - } - apiLog(String.format("Warning: Failed to instantiate bundled library mapper: %s. Using the default.", className)); - return defaultMapper; - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/Pointer.java b/LWJGL/src/main/java/org/lwjgl/system/Pointer.java deleted file mode 100644 index 2fe10e04..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/Pointer.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Pointer interface. - * - *

    LWJGL can run on both 32bit and 64bit architectures. Since LWJGL applications deal with native memory directly, this interface provides necessary - * information about the underlying architecture of the running JVM process.

    - * - *

    When interacting with native functions, pointer values are mapped to Java {@code long}. LWJGL automatically converts long values to the correct pointer - * addresses when used in native code. Native functions sometimes require arrays of pointer values; the {@link PointerBuffer} class may be used for that - * purpose. It has an API similar to a {@link LongBuffer} but handles pointer casts automatically.

    - */ -public interface Pointer { - - /** The pointer size in bytes. Will be 4 on a 32bit JVM and 8 on a 64bit one. */ - int POINTER_SIZE = MemoryAccessJNI.getPointerSize(); - - /** The pointer size power-of-two. Will be 2 on a 32bit JVM and 3 on a 64bit one. */ - int POINTER_SHIFT = POINTER_SIZE == 8 ? 3 : 2; - - /** The value of {@code sizeof(long)} for the current platform. */ - int CLONG_SIZE = POINTER_SIZE == 8 && Platform.get() == Platform.WINDOWS ? 4 : POINTER_SIZE; - - /** The value of {@code sizeof(long)} as a power-of-two. */ - int CLONG_SHIFT = CLONG_SIZE == 8 ? 3 : 2; - - /** Will be true on a 32bit JVM. */ - boolean BITS32 = POINTER_SIZE * 8 == 32; - - /** Will be true on a 64bit JVM. */ - boolean BITS64 = POINTER_SIZE * 8 == 64; - - /** - * Returns the raw pointer address as a {@code long} value. - * - * @return the pointer address - */ - long address(); - - /** Default {@link Pointer} implementation. */ - abstract class Default implements Pointer { - - protected static final sun.misc.Unsafe UNSAFE; - - protected static final long ADDRESS; - - protected static final long BUFFER_CONTAINER; - - protected static final long BUFFER_MARK; - protected static final long BUFFER_POSITION; - protected static final long BUFFER_LIMIT; - protected static final long BUFFER_CAPACITY; - - static { - UNSAFE = MemoryUtil.UNSAFE; - - try { - ADDRESS = UNSAFE.objectFieldOffset(Default.class.getDeclaredField("address")); - - BUFFER_CONTAINER = UNSAFE.objectFieldOffset(CustomBuffer.class.getDeclaredField("container")); - - BUFFER_MARK = UNSAFE.objectFieldOffset(CustomBuffer.class.getDeclaredField("mark")); - BUFFER_POSITION = UNSAFE.objectFieldOffset(CustomBuffer.class.getDeclaredField("position")); - BUFFER_LIMIT = UNSAFE.objectFieldOffset(CustomBuffer.class.getDeclaredField("limit")); - BUFFER_CAPACITY = UNSAFE.objectFieldOffset(CustomBuffer.class.getDeclaredField("capacity")); - } catch (Throwable t) { - throw new UnsupportedOperationException(t); - } - } - - // Removed final due to JDK-8139758. TODO: Restore if the fix is backported to JDK 8. - protected long address; - - protected Default(long address) { - if (CHECKS && address == NULL) { - throw new NullPointerException(); - } - this.address = address; - } - - @Override - public long address() { - return address; - } - - public boolean equals(@Nullable Object o) { - if (this == o) { - return true; - } - if (!(o instanceof Pointer)) { - return false; - } - - Pointer that = (Pointer)o; - - return address == that.address(); - } - - public int hashCode() { - return (int)(address ^ (address >>> 32)); - } - - @Override - public String toString() { - return String.format("%s pointer [0x%X]", getClass().getSimpleName(), address); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/SharedLibrary.java b/LWJGL/src/main/java/org/lwjgl/system/SharedLibrary.java deleted file mode 100644 index 3772eaa7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/SharedLibrary.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; - -/** A {@link FunctionProvider} implementation that opens a platform-specific shared library and returns functions pointers from it. */ -public interface SharedLibrary extends FunctionProvider, NativeResource, Pointer { - - /** Returns the library name. */ - String getName(); - - /** - * Returns the library path, if available. - * - * @return the library path, or {@code null} if the path is not available. - */ - @Nullable - String getPath(); - - abstract class Default extends Pointer.Default implements SharedLibrary { - - private final String name; - - protected Default(String name, long handle) { - super(handle); - this.name = name; - } - - @Override - public String getName() { - return name; - } - - } - - abstract class Delegate implements SharedLibrary { - - protected final SharedLibrary library; - - protected Delegate(SharedLibrary library) { - this.library = library; - } - - @Override - public String getName() { - return library.getName(); - } - - @Nullable - @Override public String getPath() { - return library.getPath(); - } - - @Override - public long address() { - return library.address(); - } - - @Override - public void free() { - library.free(); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/SharedLibraryLoader.java b/LWJGL/src/main/java/org/lwjgl/system/SharedLibraryLoader.java deleted file mode 100644 index ec1b1ab5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/SharedLibraryLoader.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; - -import javax.annotation.*; -import javax.annotation.concurrent.*; -import java.io.*; -import java.net.*; -import java.nio.channels.*; -import java.nio.file.*; -import java.util.*; -import java.util.concurrent.locks.*; -import java.util.function.*; -import java.util.stream.*; -import java.util.zip.*; - -import static org.lwjgl.system.APIUtil.*; - -/** - * Loads shared libraries and native resources from the classpath. - * - *

    The libraries may be packed in JAR files, in which case they will be extracted to a temporary directory and that directory will be prepended to - * {@link Configuration#LIBRARY_PATH}. - *

    - * - * @author Mario Zechner (https://github.com/badlogic) - * @author Nathan Sweet (https://github.com/NathanSweet) - * @see Configuration#SHARED_LIBRARY_EXTRACT_DIRECTORY - * @see Configuration#SHARED_LIBRARY_EXTRACT_PATH - */ -final class SharedLibraryLoader { - - private static final Lock EXTRACT_PATH_LOCK = new ReentrantLock(); - - @GuardedBy("EXTRACT_PATH_LOCK") - @Nullable - private static Path extractPath; - - private static HashSet extractPaths = new HashSet<>(4); - - private static boolean checkedJDK8195129; - - private SharedLibraryLoader() { - } - - /** - * Extracts the specified shared library or native resource from the classpath to a temporary directory. - * - * @param name the resource name - * @param filename the resource filename - * @param resource the classpath {@link URL} were the resource can be found - * @param load should call {@code System::load} in the context of the appropriate ClassLoader - * - * @return a {@link FileChannel} that has locked the resource file - */ - static FileChannel load(String name, String filename, URL resource, @Nullable Consumer load) { - try { - Path extractedFile; - - EXTRACT_PATH_LOCK.lock(); - try { - if (extractPath != null) { - // This path is already tested and safe to use - extractedFile = extractPath.resolve(filename); - } else { - extractedFile = getExtractPath(filename, resource, load); - - Path parent = extractedFile.getParent(); - // Do not store unless the test for JDK-8195129 has passed. - // This means that in the worst case org.lwjgl.librarypath - // will contain multiple directories. (Windows only) - // ----------------- - // Example scenario: - // ----------------- - // * load lwjgl.dll - already extracted and in classpath (SLL not used) - // * load library with loadNative - extracted to a directory with unicode characters - // * then another with loadSystem - this will hit LoadLibraryA in the JVM, need an ANSI-safe directory. - if (Platform.get() != Platform.WINDOWS || checkedJDK8195129) { - extractPath = parent; - } - initExtractPath(parent); - } - } finally { - EXTRACT_PATH_LOCK.unlock(); - } - - return extract(extractedFile, resource); - } catch (Exception e) { - throw new RuntimeException("\tFailed to extract " + name + " library", e); - } - } - - private static void initExtractPath(Path extractPath) { - if (extractPaths.contains(extractPath)) { - return; - } - extractPaths.add(extractPath); - - String newLibPath = extractPath.toAbsolutePath().toString(); - - // Prepend the path in which the libraries were extracted to org.lwjgl.librarypath - String libPath = Configuration.LIBRARY_PATH.get(); - if (libPath != null && !libPath.isEmpty()) { - newLibPath += File.pathSeparator + libPath; - } - - System.setProperty(Configuration.LIBRARY_PATH.getProperty(), newLibPath); - Configuration.LIBRARY_PATH.set(newLibPath); - } - - /** - * Returns a path to a file that can be written. Tries multiple locations and verifies writing succeeds. - * - * @param filename the resource filename - * - * @return the extracted library - */ - private static Path getExtractPath(String filename, URL resource, @Nullable Consumer load) { - Path root, file; - - String override = Configuration.SHARED_LIBRARY_EXTRACT_PATH.get(); - if (override != null) { - file = (root = Paths.get(override)).resolve(filename); - if (canWrite(root, file, resource, load)) { - return file; - } - apiLogMore("The path " + override + " is not accessible. Trying other paths."); - } - - String version = Version.getVersion().replace(' ', '-'); - String arch = Platform.getArchitecture().name().toLowerCase(); - - // Temp directory with username in path - file = (root = Paths.get(System.getProperty("java.io.tmpdir"))) - .resolve(Paths.get(Configuration.SHARED_LIBRARY_EXTRACT_DIRECTORY.get("lwjgl_" + System.getProperty("user.name").trim()), version, arch, filename)); - if (canWrite(root, file, resource, load)) { - return file; - } - - Path lwjgl_version_filename = Paths.get("." + Configuration.SHARED_LIBRARY_EXTRACT_DIRECTORY.get("lwjgl"), version, arch, filename); - - // Working directory - file = (root = Paths.get("").toAbsolutePath()).resolve(lwjgl_version_filename); - if (canWrite(root, file, resource, load)) { - return file; - } - - // User home - file = (root = Paths.get(System.getProperty("user.home"))).resolve(lwjgl_version_filename); - if (canWrite(root, file, resource, load)) { - return file; - } - - if (Platform.get() == Platform.WINDOWS) { - // C:\Windows\Temp - String env = System.getenv("SystemRoot"); - if (env != null) { - file = (root = Paths.get(env, "Temp")).resolve(lwjgl_version_filename); - if (canWrite(root, file, resource, load)) { - return file; - } - } - - // C:\Temp - env = System.getenv("SystemDrive"); - if (env != null) { - file = (root = Paths.get(env + "/")).resolve(Paths.get("Temp").resolve(lwjgl_version_filename)); - if (canWrite(root, file, resource, load)) { - return file; - } - } - } - - // System provided temp directory (in java.io.tmpdir) - try { - file = Files.createTempDirectory("lwjgl"); - root = file.getParent(); - file = file.resolve(filename); - if (canWrite(root, file, resource, load)) { - return file; - } - } catch (IOException ignored) { - } - - throw new RuntimeException("Failed to find an appropriate directory to extract the native library"); - } - - /** - * Extracts a native library resource if it does not already exist or the CRC does not match. - * - * @param resource the resource to extract - * @param file the extracted file - * - * @return a {@link FileChannel} that has locked the resource - * - * @throws IOException if an IO error occurs - */ - private static FileChannel extract(Path file, URL resource) throws IOException { - if (Files.exists(file)) { - try ( - InputStream source = resource.openStream(); - InputStream target = Files.newInputStream(file) - ) { - if (crc(source) == crc(target)) { - if (Configuration.DEBUG_LOADER.get(false)) { - apiLogMore("Found at: " + file); - } - return lock(file); - } - } - } - - // If file doesn't exist or the CRC doesn't match, extract it to the temp dir. - apiLogMore("Extracting: " + resource.getPath()); - //noinspection FieldAccessNotGuarded (already inside the lock) - if (extractPath == null) { - apiLogMore(" to: " + file); - } - - Files.createDirectories(file.getParent()); - try (InputStream source = resource.openStream()) { - Files.copy(source, file, StandardCopyOption.REPLACE_EXISTING); - } - - return lock(file); - } - - /** - * Locks a file. - * - * @param file the file to lock - */ - private static FileChannel lock(Path file) { - // Wait for other processes (usually antivirus software) to unlock the extracted file - // before attempting to load it. - try { - FileChannel fc = FileChannel.open(file); - - if (fc.tryLock(0L, Long.MAX_VALUE, true) == null) { - if (Configuration.DEBUG_LOADER.get(false)) { - apiLogMore("File is locked by another process, waiting..."); - } - - fc.lock(0L, Long.MAX_VALUE, true); // this will block until the file is locked - } - - // the lock will be released when the channel is closed - return fc; - } catch (Exception e) { - throw new RuntimeException("Failed to lock file.", e); - } - } - - /** - * Returns a CRC of the remaining bytes in a stream. - * - * @param input the stream - * - * @return the CRC - */ - private static long crc(InputStream input) throws IOException { - CRC32 crc = new CRC32(); - - byte[] buffer = new byte[8 * 1024]; - for (int n; (n = input.read(buffer)) != -1; ) { - crc.update(buffer, 0, n); - } - - return crc.getValue(); - } - - /** - * Returns true if the parent directories of the file can be created and the file can be written. - * - * @param file the file to test - * - * @return true if the file is writable - */ - private static boolean canWrite(Path root, Path file, URL resource, @Nullable Consumer load) { - Path testFile; - if (Files.exists(file)) { - if (!Files.isWritable(file)) { - return false; - } - - // Don't overwrite existing file just to check if we can write to directory. - testFile = file.getParent().resolve(".lwjgl.test"); - } else { - try { - Files.createDirectories(file.getParent()); - } catch (IOException ignored) { - return false; - } - testFile = file; - } - - try { - Files.write(testFile, new byte[0]); - Files.delete(testFile); - - if (load != null && Platform.get() == Platform.WINDOWS) { - workaroundJDK8195129(file, resource, load); - } - - return true; - } catch (Throwable ignored) { - if (file == testFile) { - canWriteCleanup(root, file); - } - return false; - } - } - - private static void canWriteCleanup(Path root, Path file) { - try { - // remove any files or directories created by canWrite - Files.deleteIfExists(file); - - // delete empty directories from parent down to root (exclusive) - Path parent = file.getParent(); - while (!Files.isSameFile(parent, root)) { - try (Stream dir = Files.list(parent)) { - if (dir.findAny().isPresent()) { - break; - } - } - Files.delete(parent); - parent = parent.getParent(); - } - } catch (IOException ignored) { - } - } - - private static void workaroundJDK8195129(Path file, URL resource, @Nonnull Consumer load) throws Throwable { - String filepath = file.toAbsolutePath().toString(); - if (filepath.endsWith(".dll")) { - boolean mustCheck = false; - for (int i = 0; i < filepath.length(); i++) { - if (0x80 <= filepath.charAt(i)) { - mustCheck = true; - } - } - if (mustCheck) { - // We have full access, the JVM has locked the file, but System.load can still fail if - // the path contains unicode characters, due to JDK-8195129. Test for this here and - // try other paths if it fails. - try (FileChannel ignored = extract(file, resource)) { - load.accept(file.toAbsolutePath().toString()); - } - } - checkedJDK8195129 = true; - } - } - - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/SharedLibraryUtil.java b/LWJGL/src/main/java/org/lwjgl/system/SharedLibraryUtil.java deleted file mode 100644 index be1113db..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/SharedLibraryUtil.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.MemoryUtil.*; - -public final class SharedLibraryUtil { - - private static native int getLibraryPath(long pLib, long sOut, int bufSize); - - @Nullable - public static String getLibraryPath(long pLib) { - int maxLen = 256; - - ByteBuffer buffer = memAlloc(maxLen); - try { - while (true) { - int len = getLibraryPath(pLib, memAddress(buffer), maxLen); - if (len == 0) { - return null; - } - if (len < maxLen) { - return memUTF8(buffer, len - 1); // drop the null-terminator - } - buffer = memRealloc(buffer, maxLen = maxLen * 3 / 2); - } - } finally { - memFree(buffer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/StackWalkUtil.java b/LWJGL/src/main/java/org/lwjgl/system/StackWalkUtil.java deleted file mode 100644 index cf3be0f3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/StackWalkUtil.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import java.util.*; - -/** - * Stack-walking utilities. - * - *

    On Java 9 these methods are implemented using {@code java.lang.StackWalker}, which has much lower overhead.

    - */ -final class StackWalkUtil { - - private StackWalkUtil() { - } - - static StackTraceElement[] stackWalkArray(Object[] a) { - return (StackTraceElement[])a; - } - - static Object stackWalkGetMethod(Class after) { - StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); - - for (int i = 3; i < stackTrace.length; i++) { - if (!stackTrace[i].getClassName().startsWith(after.getName())) { - return stackTrace[i]; - } - } - - throw new IllegalStateException(); - } - - private static boolean isSameMethod(StackTraceElement a, StackTraceElement b) { - return isSameMethod(a, b, b.getMethodName()); - } - - private static boolean isSameMethod(StackTraceElement a, StackTraceElement b, String methodName) { - return a.getMethodName().equals(methodName) && - a.getClassName().equals(b.getClassName()) && - Objects.equals(a.getFileName(), b.getFileName()); - } - - private static boolean isAutoCloseable(StackTraceElement element, StackTraceElement pushed) { - // Java 9 try-with-resources: synthetic $closeResource - if (isSameMethod(element, pushed, "$closeResource")) { - return true; - } - - // Kotlin T.use: kotlin.AutoCloseable::closeFinally - if ("closeFinally".equals(element.getMethodName()) && "AutoCloseable.kt".equals(element.getFileName())) { - return true; - } - - return false; - } - - @Nullable - static Object stackWalkCheckPop(Class after, Object pushedObj) { - StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); - - for (int i = 3; i < stackTrace.length; i++) { - StackTraceElement element = stackTrace[i]; - if (element.getClassName().startsWith(after.getName())) { - continue; - } - - StackTraceElement pushed = (StackTraceElement)pushedObj; - if (isSameMethod(element, pushed)) { - return null; - } - - if (isAutoCloseable(element, pushed) && i + 1 < stackTrace.length) { - // Some runtimes use a separate method to call AutoCloseable::close in try-with-resources blocks. - // That method suppresses any exceptions thrown by close if necessary. - // When that happens, the pop is 1 level deeper than expected. - element = stackTrace[i + 1]; - if (isSameMethod(pushed, stackTrace[i + 1])) { - return null; - } - } - - return element; - } - - throw new IllegalStateException(); - } - - static Object[] stackWalkGetTrace() { - StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); - - int i = 3; - for (; i < stackTrace.length; i++) { - if (!stackTrace[i].getClassName().startsWith("org.lwjgl.system.Memory")) { - break; - } - } - - return Arrays.copyOfRange(stackTrace, i, stackTrace.length); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/Struct.java b/LWJGL/src/main/java/org/lwjgl/system/Struct.java deleted file mode 100644 index 2ff9be28..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/Struct.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import java.nio.*; -import java.util.*; - -import static java.lang.Math.*; -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Base class of all struct implementations. */ -public abstract class Struct> extends Pointer.Default { - - protected static final int DEFAULT_PACK_ALIGNMENT = Platform.get() == Platform.WINDOWS ? 8 : 0x4000_0000; - protected static final int DEFAULT_ALIGN_AS = 0; - - static { - Library.initialize(); - } - - @SuppressWarnings({"unused", "FieldCanBeLocal"}) - @Nullable - protected ByteBuffer container; - - /** - * Creates a struct instance at the specified address. - * - * @param address the struct memory address - * @param container an optional container buffer, to be referenced strongly by the struct instance. - */ - protected Struct(long address, @Nullable ByteBuffer container) { - super(address); - this.container = container; - } - - /** - * Similar to {@link #Struct(long, ByteBuffer) the constructor}, but returns the exact type of the {@code Struct} subclass. - * - *

    Effectively, every {@code Struct} instance is a factory for more instances of the same type. This is used by {@link StructBuffer}.

    - * - * @param address the struct memory address - * @param container an optional container buffer, to be referenced strongly by the struct instance. - */ - protected abstract SELF create(long address, @Nullable ByteBuffer container); - - /** Returns {@code sizeof(struct)}. */ - public abstract int sizeof(); - - /** Zeroes-out the struct data. */ - public void clear() { - memSet(address(), 0, sizeof()); - } - - /** - * Frees the struct allocation. - * - *

    This method should not be used if the memory backing this struct is not owned by the struct.

    - */ - public void free() { - nmemFree(address()); - } - - /** - * Returns true if the pointer member that corresponds to the specified {@code memberOffset} is {@code NULL}. - * - *

    This is useful to verify that not nullable members of an untrusted struct instance are indeed not {@code NULL}.

    - * - * @param memberOffset the byte offset of the member to query - * - * @return true if the member is {@code NULL} - */ - public boolean isNull(int memberOffset) { - if (DEBUG) { - checkMemberOffset(memberOffset); - } - return memGetAddress(address() + memberOffset) == NULL; - } - - // ---------------- Implementation utilities ---------------- - - private void checkMemberOffset(int memberOffset) { - if (memberOffset < 0 || sizeof() - memberOffset < POINTER_SIZE) { - throw new IllegalArgumentException("Invalid member offset."); - } - } - - protected static ByteBuffer __checkContainer(ByteBuffer container, int sizeof) { - if (CHECKS) { - check(container, sizeof); - } - return container; - } - - private static long getBytes(int elements, int elementSize) { - return (elements & 0xFFFF_FFFFL) * elementSize; - } - - protected static long __checkMalloc(int elements, int elementSize) { - long bytes = (elements & 0xFFFF_FFFFL) * elementSize; - if (DEBUG) { - if (elements < 0) { - throw new IllegalArgumentException("Invalid number of elements"); - } - if (BITS32 && 0xFFFF_FFFFL < bytes) { - throw new IllegalArgumentException("The request allocation is too large"); - } - } - return bytes; - } - - protected static ByteBuffer __create(int elements, int elementSize) { - apiCheckAllocation(elements, getBytes(elements, elementSize), 0x7FFF_FFFFL); - return ByteBuffer.allocateDirect(elements * elementSize).order(ByteOrder.nativeOrder()); - } - - @Nullable - protected static > ByteBuffer __getContainer(T struct) { - return struct.container; - } - - @Nullable - protected static ByteBuffer __getContainer(StructBuffer struct) { - return struct.container; - } - - - /** A functional interface that enables lambda expressions to be passed to the {@link #validate} method. [INTERNAL USE ONLY] */ - @FunctionalInterface - public interface StructValidation { - void validate(long struct); - } - - /** - * Validates each struct contained in the specified struct array. [INTERNAL USE ONLY] - * - * @param array the struct array to validate - * @param count the number of structs in {@code array} - * @param SIZEOF the size of each struct, in bytes - */ - public static void validate(long array, int count, int SIZEOF, StructValidation validation) { - for (int i = 0; i < count; i++) { - validation.validate(array + Integer.toUnsignedLong(i) * SIZEOF); - } - } - - // ---------------- Struct Member Layout ---------------- - - protected static class Member { - final int size; - final int alignment; - final boolean forcedAlignment; - - int offset; - - Member(int size, int alignment, boolean forcedAlignment) { - this.size = size; - this.alignment = alignment; - this.forcedAlignment = forcedAlignment; - } - - public int getSize() { - return size; - } - - public int getAlignment() { - return alignment; - } - - public int getAlignment(int packAlignment) { - return forcedAlignment ? alignment : min(alignment, packAlignment); - } - } - - protected static class Layout extends Member { - final Member[] members; - - Layout(int size, int alignment, boolean forceAlignment, Member[] members) { - super(size, alignment, forceAlignment); - this.members = members; - } - - public int offsetof(int member) { - return members[member].offset; - } - } - - protected static Member __padding(int num, boolean condition) { - return __padding(num, 1, condition); - } - - protected static Member __padding(int num, int size, boolean condition) { - return __member(condition ? num * size : 0, size); - } - - protected static Member __member(int size) { - return __member(size, size); - } - - protected static Member __member(int size, int alignment) { - return __member(size, alignment, false); - } - - protected static Member __member(int size, int alignment, boolean forceAlignment) { - return new Member(size, alignment, forceAlignment); - } - - protected static Member __array(int size, int length) { - return __array(size, size, length); - } - protected static Member __array(int size, int alignment, int length) { - return new Member(size * length, alignment, false); - } - protected static Member __array(int size, int alignment, boolean forceAlignment, int length) { - return new Member(size * length, alignment, forceAlignment); - } - - protected static Layout __union(Member... members) { return __union(DEFAULT_PACK_ALIGNMENT, DEFAULT_ALIGN_AS, members); } - protected static Layout __union(int packAlignment, int alignas, Member... members) { - List union = new ArrayList<>(members.length); - - int size = 0; - int alignment = alignas; - for (Member m : members) { - size = max(size, m.size); - alignment = max(alignment, m.getAlignment(packAlignment)); - - m.offset = 0; - union.add(m); - if (m instanceof Layout) { - addNestedMembers(m, union, 0); - } - } - - return new Layout(size, alignment, alignas != 0, union.toArray(new Member[0])); - } - - protected static Layout __struct(Member... members) { return __struct(DEFAULT_PACK_ALIGNMENT, DEFAULT_ALIGN_AS, members); } - protected static Layout __struct(int packAlignment, int alignas, Member... members) { - List struct = new ArrayList<>(members.length); - - int size = 0; - int alignment = alignas; - for (Member m : members) { - int memberAlignment = m.getAlignment(packAlignment); - - m.offset = align(size, memberAlignment); - - size = m.offset + m.size; - alignment = max(alignment, memberAlignment); - - struct.add(m); - if (m instanceof Layout) { - addNestedMembers(m, struct, m.offset); - } - } - - // tail padding - size = align(size, alignment); - - return new Layout(size, alignment, alignas != 0, struct.toArray(new Member[0])); - } - - private static void addNestedMembers(Member nested, List members, int offset) { - Layout layout = (Layout)nested; - - for (Member m : layout.members) { - m.offset += offset; - members.add(m); - } - } - - private static int align(int offset, int alignment) { - return ((offset - 1) | (alignment - 1)) + 1; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/StructBuffer.java b/LWJGL/src/main/java/org/lwjgl/system/StructBuffer.java deleted file mode 100644 index 3e64ef21..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/StructBuffer.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import javax.annotation.*; -import java.nio.*; -import java.util.*; -import java.util.function.*; -import java.util.stream.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Base class of struct custom buffers. */ -public abstract class StructBuffer, SELF extends StructBuffer> extends CustomBuffer implements Iterable { - - protected StructBuffer(ByteBuffer container, int remaining) { - super(memAddress(container), container, -1, 0, remaining, remaining); - } - - protected StructBuffer(long address, @Nullable ByteBuffer container, int mark, int position, int limit, int capacity) { - super(address, container, mark, position, limit, capacity); - } - - @Override - public int sizeof() { - return getElementFactory().sizeof(); - } - - /** - * Relative get method. Reads the struct at this buffer's current position, and then increments the position. - * - *

    The struct instance returned is a view of the buffer at the current position. Changes to this buffer's content will be visible in the struct instance - * and vice versa.

    - * - * @return the struct at the buffer's current position - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public T get() { - T factory = getElementFactory(); - return factory.create(address + Integer.toUnsignedLong(nextGetIndex()) * factory.sizeof(), container); - } - - /** - * Relative get method. Reads the struct data at this buffer's current position into the specified struct, and then increments the position. - * - * @return the struct at the buffer's current position - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public SELF get(T value) { - int sizeof = getElementFactory().sizeof(); - memCopy(address + Integer.toUnsignedLong(nextGetIndex()) * sizeof, value.address(), sizeof); - return self(); - } - - /** - * Relative put method  (optional operation). - * - *

    Writes the specified struct into this buffer at the current position, and then increments the position.

    - * - * @param value the struct to be written - * - * @return This buffer - * - * @throws BufferOverflowException If this buffer's current position is not smaller than its limit - * @throws ReadOnlyBufferException If this buffer is read-only - */ - public SELF put(T value) { - int sizeof = getElementFactory().sizeof(); - memCopy(value.address(), address + Integer.toUnsignedLong(nextPutIndex()) * sizeof, sizeof); - return self(); - } - - /** - * Absolute get method. Reads the struct at the specified index. - * - *

    The struct instance returned is a view of the buffer at the specified position. Changes to this buffer's content will be visible in the struct - * instance and vice versa.

    - * - * @param index the index from which the struct will be read - * - * @return the struct at the specified index - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - */ - public T get(int index) { - T factory = getElementFactory(); - return factory.create(address + Integer.toUnsignedLong(check(index, limit)) * factory.sizeof(), container); - } - - /** - * Absolute get method. Reads the struct data at the specified index into the specified struct. - * - * @param index the index from which the struct will be read - * - * @return the struct at the specified index - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - */ - public SELF get(int index, T value) { - int sizeof = getElementFactory().sizeof(); - memCopy(address + Checks.check(index, limit) * sizeof, value.address(), sizeof); - return self(); - } - - /** - * Absolute put method  (optional operation). - * - *

    Writes the specified struct into this buffer at the specified index.

    - * - * @param index the index at which the struct will be written - * @param value the struct value to be written - * - * @return This buffer - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - * @throws ReadOnlyBufferException If this buffer is read-only - */ - public SELF put(int index, T value) { - int sizeof = getElementFactory().sizeof(); - memCopy(value.address(), address + Checks.check(index, limit) * sizeof, sizeof); - return self(); - } - - /** - * Relative apply method. - * - *

    Passes the struct at the buffer's current position to the specified {@link Consumer}, and then increments the position.

    - * - * @return This buffer - * - * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit - */ - public SELF apply(Consumer consumer) { - consumer.accept(get()); - return self(); - } - - /** - * Absolute apply method. - * - *

    Passes the struct at the specified position to the specified {@link Consumer}.

    - * - * @param index the index where the {@code consumer} will be applied. - * - * @return This buffer - * - * @throws IndexOutOfBoundsException If {@code index} is negative or not smaller than the buffer's limit - */ - public SELF apply(int index, Consumer consumer) { - consumer.accept(get(index)); - return self(); - } - - // -------------------------------------- - - @Override - public Iterator iterator() { - return new StructIterator<>(address, container, getElementFactory(), position, limit); - } - - // This class is static to avoid capturing the StructBuffer instance. Hotspot trivially marks the instance - // as escaping when this happens, even if the iterator instance is not escaping and scalar replaced. This - // is not a problem on Graal. Also, see JDK-8166840. - private static class StructIterator> implements Iterator { - private long address; - - @Nullable - private ByteBuffer container; - - private T factory; - - private int index; - private int fence; - - StructIterator(long address, @Nullable ByteBuffer container, T factory, int position, int limit) { - this.address = address; - this.container = container; - this.factory = factory; - this.index = position; - this.fence = limit; - } - - @Override public boolean hasNext() { - return index < fence; - } - - @Override public T next() { - if (CHECKS && fence <= index) { - throw new NoSuchElementException(); - } - return factory.create(address + Integer.toUnsignedLong(index++) * factory.sizeof(), container); - } - - @Override public void forEachRemaining(Consumer action) { - Objects.requireNonNull(action); - int i = index; - try { - for (int sizeof = factory.sizeof(); i < fence; i++) { - action.accept(factory.create(address + Integer.toUnsignedLong(i) * sizeof, container)); - } - } finally { - index = i; - } - } - } - - @Override - public void forEach(Consumer action) { - Objects.requireNonNull(action); - T factory = getElementFactory(); - for (int i = position, fence = limit, sizeof = factory.sizeof(); i < fence; i++) { - action.accept(factory.create(address + Integer.toUnsignedLong(i) * sizeof(), container)); - } - } - - @Override - public Spliterator spliterator() { - return new StructSpliterator<>(address, container, getElementFactory(), position, limit); - } - - private static class StructSpliterator> implements Spliterator { - private long address; - - @Nullable - private ByteBuffer container; - - private T factory; - - private int index; - private int fence; - - StructSpliterator(long address, @Nullable ByteBuffer container, T factory, int position, int limit) { - this.address = address; - this.container = container; - this.factory = factory; - this.index = position; - this.fence = limit; - } - - @Override - public boolean tryAdvance(Consumer action) { - Objects.requireNonNull(action); - - if (index < fence) { - action.accept(factory.create(address + Integer.toUnsignedLong(index++) * factory.sizeof(), container)); - return true; - } - - return false; - } - - @Override - @Nullable - public Spliterator trySplit() { - int lo = index, - mid = (lo + fence) >>> 1; - - return lo < mid - ? new StructSpliterator<>(address, container, factory, lo, index = mid) - : null; - } - - @Override - public long estimateSize() { - return fence - index; - } - - @Override - public int characteristics() { - return Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL | Spliterator.SIZED | Spliterator.SUBSIZED; - } - - @Override - public void forEachRemaining(Consumer action) { - Objects.requireNonNull(action); - int i = index; - try { - for (int sizeof = factory.sizeof(); i < fence; i++) { - action.accept(factory.create(address + Integer.toUnsignedLong(i) * sizeof, container)); - } - } finally { - index = i; - } - } - - @Override - public Comparator getComparator() { - throw new IllegalStateException(); - } - } - - /** Returns a sequential {@code Stream} with this struct buffer as its source. */ - public Stream stream() { - return StreamSupport.stream(spliterator(), false); - } - - /** Returns a parallel {@code Stream} with this struct buffer as its source. */ - public Stream parallelStream() { - return StreamSupport.stream(spliterator(), true); - } - - // -------------------------------------- - - protected abstract T getElementFactory(); - - private static int check(int index, int length) { - if (CHECKS && (index < 0 || length <= index)) { - throw new IndexOutOfBoundsException(); - } - return index; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/ThreadLocalUtil.java b/LWJGL/src/main/java/org/lwjgl/system/ThreadLocalUtil.java deleted file mode 100644 index 65d7666d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/ThreadLocalUtil.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system; - -import org.lwjgl.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.Pointer.*; -import static org.lwjgl.system.jni.JNINativeInterface.*; - -/** This class supports bindings with thread-local data. [INTERNAL USE ONLY] */ -public final class ThreadLocalUtil { - - /* - The following applies to GL and GLES only: - - OpenGL contexts may have different capabilities (core versions, supported extensions, deprecated functionality) and different function pointers (usually - in multi-GPU setups). A ThreadLocal is used to store the current capabilities instance for each thread. The thread-local lookup that is required for each - function call hurts JIT code generation. We employ two strategies to eliminate this overhead: - - 1) The first capabilities instance encountered is stored in a static write-once holder. This is optimistically assumed to be compatible with all other (if - any) instances we encounter, which is indeed the case for the vast majority of programs. If an incompatible instance is encountered, there is a fall back - to the thread-local lookup. - - The above applies to array overload methods only. All other methods use the following technique: - - 2) The function pointers of a capabilities instance are stored in an off-heap array, which is then stored in one of the reserved members of the - jniNativeInterface struct. This struct is then injected to the Hotspot native thread that corresponds to the Java thread in which the capabilities instance - was made current. When a JNI method is invoked in that thread, it passes its JNIEnv copy to the JNI function, which can then retrieve the correct function - pointer. - - It works like so: - - typedef struct JNINativeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - void *reserved3; - - // JNI function pointers - } jniNativeInterface; - - typedef const jniNativeInterface *JNIEnv; - - // Hotspot C++ class - class JavaThread: public Thread { - ... - JNIEnv _jni_environment; - JNIEnv* jni_environment() { return &_jni_environment; } - .. - } - - The injection works because what we get in the JNI function is not a direct pointer to the struct, but a pointer to the JavaThread field that contains the - pointer to the struct. - - Note that all threads point to the same jniNativeInterface struct. Also note that even though reserved0-3 is public API, the size of the struct is not - known. New Java versions may add new function pointers at the end of the struct. JVMTI's GetJNIFunctionTable function could be used to return a valid copy, - but JVMTI is an optional JVM feature and may not be available (e.g. with AOT compilation). The workaround is to call JNI's GetVersion and assume the struct - has as many function pointers as were available in the corresponding JNI version. - - - On startup, a pointer to the global jniNativeInterface is stored. - - On setCapabilities: - * If necessary, a jniNativeInterface copy is created and injected to the current thread (JavaThread::_jni_environment points to the copy). - * A pointer to the capabilities function pointer array is set to jniNativeInterface::reserved3. - - On setCapabilities(null): - * JavaThread::_jni_environment is reset to the global jniNativeInterface. - * The jniNativeInterface copy is freed. - - The above has the following advantages: - - - Eliminates the thread-local lookup. - - Less bytecode and perfectly clean JITed code. - - Works when different threads have incompatible contexts. - - And the following disadvantages: - - - Depends on Hotspot implementation details. - - Requires custom JNI code for each function. - - (minor) Function pointers are not checked anymore. Calling an unsupported function causes a segfault. - - (minor) JVMTI has the ability to intercept JNI functions with SetJNIFunctionTable. This interacts badly with the jniNativeInterface copies, but it should - be easy to workaround (attaching the agent at startup, making sure no contexts are current when the agent is attached, clearing and setting again the - capabilities instance). - - Since 3.3.1: the JNIEnv copies are now also used for storing/retrieving the thread-local errno/LastError values. - */ - - /** The global JNIEnv. */ - private static final long JNI_NATIVE_INTERFACE = memGetAddress(getThreadJNIEnv()); - - /** The number of pointers in the JNIEnv struct. */ - private static final int JNI_NATIVE_INTERFACE_FUNCTION_COUNT; - - /** A function to delegate to when an unsupported function is called. */ - private static final long FUNCTION_MISSING_ABORT = getFunctionMissingAbort(); - - /** - * An array filled with {@link #FUNCTION_MISSING_ABORT}. - * - *

    The array size depends on whether OpenGL or OpenGL ES is used.

    - */ - private static long FUNCTION_MISSING_ABORT_TABLE = NULL; - - /** The offset in JNIEnv at which to store the pointer to the capabilities array. */ - private static final int CAPABILITIES_OFFSET = 3 * POINTER_SIZE; - - static { - int JNI_VERSION = GetVersion(); - - int reservedCount; - switch (JNI_VERSION) { - case JNI_VERSION_1_1: - reservedCount = 12; - break; - default: - reservedCount = 4; - } - - int jniCallCount; - switch (JNI_VERSION) { - case JNI_VERSION_1_1: - jniCallCount = 208; - break; - case JNI_VERSION_1_2: - jniCallCount = 225; - break; - case JNI_VERSION_1_4: - jniCallCount = 228; - break; - case JNI_VERSION_1_6: - case JNI_VERSION_1_8: - jniCallCount = 229; - break; - case JNI_VERSION_9: - case JNI_VERSION_10: - jniCallCount = 230; - break; - case JNI_VERSION_19: - case JNI_VERSION_20: - jniCallCount = 231; - break; - case JNI_VERSION_21: - jniCallCount = 232; - break; - default: - jniCallCount = 232; - DEBUG_STREAM - .println("[LWJGL] [ThreadLocalUtil] Unsupported JNI version detected, this may result in a crash. Please inform LWJGL developers."); - } - JNI_NATIVE_INTERFACE_FUNCTION_COUNT = reservedCount + Configuration.JNI_NATIVE_INTERFACE_FUNCTION_COUNT.get(jniCallCount); - } - - private ThreadLocalUtil() { - } - - private static native long getThreadJNIEnv(); - - private static native long getFunctionMissingAbort(); - - private static native long nsetupEnvData(int functionCount); - public static long setupEnvData() { - return nsetupEnvData(JNI_NATIVE_INTERFACE_FUNCTION_COUNT); - } - - public static void setCapabilities(long capabilities) { - // Get thread's JNIEnv - long env_pp = getThreadJNIEnv(); - long env_p = memGetAddress(env_pp); - - if (capabilities == NULL) { - if (env_p != JNI_NATIVE_INTERFACE) { - memPutAddress(env_p + CAPABILITIES_OFFSET, FUNCTION_MISSING_ABORT_TABLE); - } - } else { - if (env_p == JNI_NATIVE_INTERFACE) { - setupEnvData(); - env_p = memGetAddress(env_pp); - } - memPutAddress(env_p + CAPABILITIES_OFFSET, capabilities); - } - } - - // Ensures FUNCTION_MISSING_ABORT will be called even if no context is current, - public static void setFunctionMissingAddresses(int functionCount) { - // OpenJDK: NULL - // GraalVM Native Image: pointer to UnimplementedWithJNIEnvArgument function (see #875) - long RESERVED0_NULL = memGetAddress(JNI_NATIVE_INTERFACE); - - long ptr = JNI_NATIVE_INTERFACE + CAPABILITIES_OFFSET; - - long currentTable = memGetAddress(ptr); - if (functionCount == 0) { - if (currentTable != RESERVED0_NULL) { - FUNCTION_MISSING_ABORT_TABLE = NULL; - getAllocator().free(currentTable); - memPutAddress(ptr, NULL); - } - } else { - if (currentTable != RESERVED0_NULL) { - throw new IllegalStateException("setFunctionMissingAddresses has been called already"); - } - if (currentTable != NULL) { - // silently abort on Native Image, the global JNIEnv object lives in read-only memory by default. (see #875) - return; - } - - FUNCTION_MISSING_ABORT_TABLE = getAllocator().malloc(Integer.toUnsignedLong(functionCount) * POINTER_SIZE); - for (int i = 0; i < functionCount; i++) { - memPutAddress(FUNCTION_MISSING_ABORT_TABLE + Integer.toUnsignedLong(i) * POINTER_SIZE, FUNCTION_MISSING_ABORT); - } - - memPutAddress(ptr, FUNCTION_MISSING_ABORT_TABLE); - } - } - - public static PointerBuffer setupAddressBuffer(PointerBuffer addresses) { - for (int i = addresses.position(); i < addresses.limit(); i++) { - if (addresses.get(i) == NULL) { - addresses.put(i, FUNCTION_MISSING_ABORT); - } - } - return addresses; - } - - public static boolean areCapabilitiesDifferent(PointerBuffer ref, PointerBuffer caps) { - for (int i = 0; i < ref.remaining(); i++) { - if (ref.get(i) != caps.get(i) && caps.get(i) != NULL) { - return true; - } - } - return false; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/fcl/DynamicLinkLoader.java b/LWJGL/src/main/java/org/lwjgl/system/fcl/DynamicLinkLoader.java deleted file mode 100644 index 718c0c20..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/fcl/DynamicLinkLoader.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.fcl; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <dlfcn.h>. */ -public class DynamicLinkLoader { - - static { Library.initialize(); } - - /** The {@code mode} argument to {@link #dlopen} contains one of the following. */ - public static final int - RTLD_LAZY = 0x1, - RTLD_NOW = 0x2, - RTLD_BINDING_MASK = 0x3, - RTLD_NOLOAD = 0x4, - RTLD_DEEPBIND = 0x8; - - /** - * If the following bit is set in the {@code mode} argument to {@link #dlopen}, the symbols of the loaded object and its dependencies are made visible as - * if the object were linked directly into the program. - */ - public static final int RTLD_GLOBAL = 0x100; - - /** - * Unix98 demands the following flag which is the inverse to {@link #RTLD_GLOBAL}. The implementation does this by default and so we can define the value - * to zero. - */ - public static final int RTLD_LOCAL = 0; - - /** Do not delete object when closed. */ - public static final int RTLD_NODELETE = 0x1000; - - protected DynamicLinkLoader() { - throw new UnsupportedOperationException(); - } - - // --- [ dlopen ] --- - - /** Unsafe version of: {@link #dlopen} */ - public static native long ndlopen(long filename, int mode); - - /** - * Loads the dynamic library file named by the null-terminated string {@code filename} and returns an opaque "handle" for the dynamic library. If - * {@code filename} is {@code NULL}, then the returned handle is for the main program. - * - * @param filename the name of the dynamic library to open, or {@code NULL} - * @param mode a bitfield. One or more of:
    {@link #RTLD_LAZY}{@link #RTLD_NOW}{@link #RTLD_BINDING_MASK}{@link #RTLD_NOLOAD}{@link #RTLD_DEEPBIND}{@link #RTLD_GLOBAL}
    {@link #RTLD_LOCAL}{@link #RTLD_NODELETE}
    - */ - @NativeType("void *") - public static long dlopen(@Nullable @NativeType("char const *") ByteBuffer filename, int mode) { - if (CHECKS) { - checkNT1Safe(filename); - } - return ndlopen(memAddressSafe(filename), mode); - } - - /** - * Loads the dynamic library file named by the null-terminated string {@code filename} and returns an opaque "handle" for the dynamic library. If - * {@code filename} is {@code NULL}, then the returned handle is for the main program. - * - * @param filename the name of the dynamic library to open, or {@code NULL} - * @param mode a bitfield. One or more of:
    {@link #RTLD_LAZY}{@link #RTLD_NOW}{@link #RTLD_BINDING_MASK}{@link #RTLD_NOLOAD}{@link #RTLD_DEEPBIND}{@link #RTLD_GLOBAL}
    {@link #RTLD_LOCAL}{@link #RTLD_NODELETE}
    - */ - @NativeType("void *") - public static long dlopen(@Nullable @NativeType("char const *") CharSequence filename, int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(filename, true); - long filenameEncoded = filename == null ? NULL : stack.getPointerAddress(); - return ndlopen(filenameEncoded, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ dlerror ] --- - - /** Unsafe version of: {@link #dlerror} */ - public static native long ndlerror(); - - /** - * Returns a human readable string describing the most recent error that occurred from {@link #dlopen}, {@link #dlsym} or {@link #dlclose} since - * the last call to {@code dlerror()}. It returns {@code NULL} if no errors have occurred since initialization or since it was last called. - */ - @Nullable - @NativeType("char *") - public static String dlerror() { - long __result = ndlerror(); - return memUTF8Safe(__result); - } - - // --- [ dlsym ] --- - - /** Unsafe version of: {@link #dlsym} */ - public static native long ndlsym(long handle, long name); - - /** - * Takes a "handle" of a dynamic library returned by {@link #dlopen} and the null-terminated symbol name, returning the address where that symbol is loaded - * into memory. If the symbol is not found, in the specified library or any of the libraries that were automatically loaded by {@link #dlopen} when that - * library was loaded, {@code dlsym()} returns {@code NULL}. - * - * @param handle the dynamic library handle - * @param name the symbol name - */ - @NativeType("void *") - public static long dlsym(@NativeType("void *") long handle, @NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - check(handle); - checkNT1(name); - } - return ndlsym(handle, memAddress(name)); - } - - /** - * Takes a "handle" of a dynamic library returned by {@link #dlopen} and the null-terminated symbol name, returning the address where that symbol is loaded - * into memory. If the symbol is not found, in the specified library or any of the libraries that were automatically loaded by {@link #dlopen} when that - * library was loaded, {@code dlsym()} returns {@code NULL}. - * - * @param handle the dynamic library handle - * @param name the symbol name - */ - @NativeType("void *") - public static long dlsym(@NativeType("void *") long handle, @NativeType("char const *") CharSequence name) { - if (CHECKS) { - check(handle); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return ndlsym(handle, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ dlclose ] --- - - /** Unsafe version of: {@link #dlclose} */ - public static native int ndlclose(long handle); - - /** - * Decrements the reference count on the dynamic library handle handle. If the reference count drops to zero and no other loaded libraries use symbols in - * it, then the dynamic library is unloaded. - * - * @param handle the dynamic library to close - */ - public static int dlclose(@NativeType("void *") long handle) { - if (CHECKS) { - check(handle); - } - return ndlclose(handle); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/fcl/FCLLibrary.java b/LWJGL/src/main/java/org/lwjgl/system/fcl/FCLLibrary.java deleted file mode 100644 index 503a270e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/fcl/FCLLibrary.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system.fcl; - -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.fcl.DynamicLinkLoader.*; - -/** Implements a {@link SharedLibrary} on the Linux OS. */ -public class FCLLibrary extends SharedLibrary.Default { - - public FCLLibrary(String name) { - this(name, loadLibrary(name)); - } - - public FCLLibrary(String name, long handle) { - super(name, handle); - } - - private static long loadLibrary(String name) { - long handle; - try (MemoryStack stack = stackPush()) { - handle = dlopen(stack.UTF8(name), RTLD_LAZY | RTLD_LOCAL); - } - if (handle == NULL) { - throw new UnsatisfiedLinkError("Failed to dynamically load library: " + name + "(error = " + dlerror() + ")"); - } - return handle; - } - - @Nullable - @Override - public String getPath() { - return SharedLibraryUtil.getLibraryPath(address()); - } - - @Override - public long getFunctionAddress(ByteBuffer functionName) { - return dlsym(address(), functionName); - } - - @Override - public void free() { - dlclose(address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentAlloc.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentAlloc.java deleted file mode 100644 index 34c9be2d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentAlloc.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *new_addr,
    - *     size_t size,
    - *     size_t alignment,
    - *     bool *zero,
    - *     bool *commit,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentAlloc extends Callback implements ExtentAllocI { - - /** - * Creates a {@code ExtentAlloc} instance from the specified function pointer. - * - * @return the new {@code ExtentAlloc} - */ - public static ExtentAlloc create(long functionPointer) { - ExtentAllocI instance = Callback.get(functionPointer); - return instance instanceof ExtentAlloc - ? (ExtentAlloc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentAlloc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentAlloc} instance that delegates to the specified {@code ExtentAllocI} instance. */ - public static ExtentAlloc create(ExtentAllocI instance) { - return instance instanceof ExtentAlloc - ? (ExtentAlloc)instance - : new Container(instance.address(), instance); - } - - protected ExtentAlloc() { - super(CIF); - } - - ExtentAlloc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentAlloc { - - private final ExtentAllocI delegate; - - Container(long functionPointer, ExtentAllocI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long extent_hooks, long new_addr, long size, long alignment, long zero, long commit, int arena_ind) { - return delegate.invoke(extent_hooks, new_addr, size, alignment, zero, commit, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentAllocI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentAllocI.java deleted file mode 100644 index dd498388..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentAllocI.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *new_addr,
    - *     size_t size,
    - *     size_t alignment,
    - *     bool *zero,
    - *     bool *commit,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_alloc_t") -public interface ExtentAllocI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 5 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 6 * POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** - * Extent allocation hook. - * - *

    An extent allocation function conforms to the {@code extent_alloc_t} type and upon success returns a pointer to {@code size} bytes of mapped memory on - * behalf of arena {@code arena_ind} such that the extent's base address is a multiple of {@code alignment}, as well as setting {@code *zero} to indicate - * whether the extent is zeroed and {@code *commit} to indicate whether the extent is committed. Upon error the function returns {@code NULL} and leaves - * {@code *zero} and {@code *commit} unmodified. The {@code size} parameter is always a multiple of the page size. The {@code alignment} parameter is always a - * power of two at least as large as the page size. Zeroing is mandatory if {@code *zero} is true upon function entry. Committing is mandatory if - * {@code *commit} is true upon function entry. If {@code new_addr} is not {@code NULL}, the returned pointer must be {@code new_addr} on success or {@code NULL} on error. - * Committed memory may be committed in absolute terms as on a system that does not overcommit, or in implicit terms as on a system that overcommits and - * satisfies physical memory needs on demand via soft page faults. Note that replacing the default extent allocation function makes the arena's - * {@code arena.i.dss} setting irrelevant.

    - */ - @NativeType("void *") long invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long new_addr, @NativeType("size_t") long size, @NativeType("size_t") long alignment, @NativeType("bool *") long zero, @NativeType("bool *") long commit, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentCommit.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentCommit.java deleted file mode 100644 index 2c79195f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentCommit.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t offset,
    - *     size_t length,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentCommit extends Callback implements ExtentCommitI { - - /** - * Creates a {@code ExtentCommit} instance from the specified function pointer. - * - * @return the new {@code ExtentCommit} - */ - public static ExtentCommit create(long functionPointer) { - ExtentCommitI instance = Callback.get(functionPointer); - return instance instanceof ExtentCommit - ? (ExtentCommit)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentCommit createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentCommit} instance that delegates to the specified {@code ExtentCommitI} instance. */ - public static ExtentCommit create(ExtentCommitI instance) { - return instance instanceof ExtentCommit - ? (ExtentCommit)instance - : new Container(instance.address(), instance); - } - - protected ExtentCommit() { - super(CIF); - } - - ExtentCommit(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentCommit { - - private final ExtentCommitI delegate; - - Container(long functionPointer, ExtentCommitI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public boolean invoke(long extent_hooks, long addr, long size, long offset, long length, int arena_ind) { - return delegate.invoke(extent_hooks, addr, size, offset, length, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentCommitI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentCommitI.java deleted file mode 100644 index 4a44e098..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentCommitI.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t offset,
    - *     size_t length,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_commit_t") -public interface ExtentCommitI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_uint8, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - boolean __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 5 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * Extent commit hook. - * - *

    An extent commit function conforms to the {@code extent_commit_t} type and commits zeroed physical memory to back pages within an extent at given - * {@code addr} and {@code size} at {@code offset} bytes, extending for {@code length} on behalf of arena {@code arena_ind}, returning false upon success. - * Committed memory may be committed in absolute terms as on a system that does not overcommit, or in implicit terms as on a system that overcommits and - * satisfies physical memory needs on demand via soft page faults. If the function returns true, this indicates insufficient physical memory to satisfy the - * request.

    - */ - @NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr, @NativeType("size_t") long size, @NativeType("size_t") long offset, @NativeType("size_t") long length, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDalloc.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDalloc.java deleted file mode 100644 index db13881a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDalloc.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentDalloc extends Callback implements ExtentDallocI { - - /** - * Creates a {@code ExtentDalloc} instance from the specified function pointer. - * - * @return the new {@code ExtentDalloc} - */ - public static ExtentDalloc create(long functionPointer) { - ExtentDallocI instance = Callback.get(functionPointer); - return instance instanceof ExtentDalloc - ? (ExtentDalloc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentDalloc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentDalloc} instance that delegates to the specified {@code ExtentDallocI} instance. */ - public static ExtentDalloc create(ExtentDallocI instance) { - return instance instanceof ExtentDalloc - ? (ExtentDalloc)instance - : new Container(instance.address(), instance); - } - - protected ExtentDalloc() { - super(CIF); - } - - ExtentDalloc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentDalloc { - - private final ExtentDallocI delegate; - - Container(long functionPointer, ExtentDallocI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public boolean invoke(long extent_hooks, long addr, long size, boolean committed, int arena_ind) { - return delegate.invoke(extent_hooks, addr, size, committed, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDallocI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDallocI.java deleted file mode 100644 index 6b2b7ac9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDallocI.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_dalloc_t") -public interface ExtentDallocI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_uint8, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint8, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - boolean __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetByte(memGetAddress(args + 3 * POINTER_SIZE)) != 0, - memGetInt(memGetAddress(args + 4 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * Extent deallocation hook. - * - *

    An extent deallocation function conforms to the {@code extent_dalloc_t} type and deallocates an extent at given {@code addr} and {@code size} with - * {@code committed}/decommited memory as indicated, on behalf of arena {@code arena_ind}, returning false upon success. If the function returns true, this - * indicates opt-out from deallocation; the virtual memory mapping associated with the extent remains mapped, in the same commit state, and available for - * future use, in which case it will be automatically retained for later reuse.

    - */ - @NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr, @NativeType("size_t") long size, @NativeType("bool") boolean committed, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDecommit.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDecommit.java deleted file mode 100644 index bdc49b30..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDecommit.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t offset,
    - *     size_t length,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentDecommit extends Callback implements ExtentDecommitI { - - /** - * Creates a {@code ExtentDecommit} instance from the specified function pointer. - * - * @return the new {@code ExtentDecommit} - */ - public static ExtentDecommit create(long functionPointer) { - ExtentDecommitI instance = Callback.get(functionPointer); - return instance instanceof ExtentDecommit - ? (ExtentDecommit)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentDecommit createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentDecommit} instance that delegates to the specified {@code ExtentDecommitI} instance. */ - public static ExtentDecommit create(ExtentDecommitI instance) { - return instance instanceof ExtentDecommit - ? (ExtentDecommit)instance - : new Container(instance.address(), instance); - } - - protected ExtentDecommit() { - super(CIF); - } - - ExtentDecommit(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentDecommit { - - private final ExtentDecommitI delegate; - - Container(long functionPointer, ExtentDecommitI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public boolean invoke(long extent_hooks, long addr, long size, long offset, long length, int arena_ind) { - return delegate.invoke(extent_hooks, addr, size, offset, length, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDecommitI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDecommitI.java deleted file mode 100644 index b950f757..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDecommitI.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t offset,
    - *     size_t length,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_decommit_t") -public interface ExtentDecommitI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_uint8, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - boolean __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 5 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * Extent decommit hook. - * - *

    An extent decommit function conforms to the {@code extent_decommit_t} type and decommits any physical memory that is backing pages within an extent at - * given {@code addr} and {@code size} at {@code offset} bytes, extending for {@code length} on behalf of arena {@code arena_ind}, returning false upon - * success, in which case the pages will be committed via the extent commit function before being reused. If the function returns true, this indicates - * opt-out from decommit; the memory remains committed and available for future use, in which case it will be automatically retained for later reuse.

    - */ - @NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr, @NativeType("size_t") long size, @NativeType("size_t") long offset, @NativeType("size_t") long length, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDestroy.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDestroy.java deleted file mode 100644 index 69f7cd01..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDestroy.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentDestroy extends Callback implements ExtentDestroyI { - - /** - * Creates a {@code ExtentDestroy} instance from the specified function pointer. - * - * @return the new {@code ExtentDestroy} - */ - public static ExtentDestroy create(long functionPointer) { - ExtentDestroyI instance = Callback.get(functionPointer); - return instance instanceof ExtentDestroy - ? (ExtentDestroy)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentDestroy createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentDestroy} instance that delegates to the specified {@code ExtentDestroyI} instance. */ - public static ExtentDestroy create(ExtentDestroyI instance) { - return instance instanceof ExtentDestroy - ? (ExtentDestroy)instance - : new Container(instance.address(), instance); - } - - protected ExtentDestroy() { - super(CIF); - } - - ExtentDestroy(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentDestroy { - - private final ExtentDestroyI delegate; - - Container(long functionPointer, ExtentDestroyI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public boolean invoke(long extent_hooks, long addr, long size, boolean committed, int arena_ind) { - return delegate.invoke(extent_hooks, addr, size, committed, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDestroyI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDestroyI.java deleted file mode 100644 index 6dd0c5a9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentDestroyI.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_destroy_t") -public interface ExtentDestroyI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_uint8, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint8, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - boolean __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetByte(memGetAddress(args + 3 * POINTER_SIZE)) != 0, - memGetInt(memGetAddress(args + 4 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * Extent destruction hook. - * - *

    An extent destruction function conforms to the {@code extent_destroy_t} type and unconditionally destroys an extent at given {@code addr} and {@code size} - * with {@code committed}/decommited memory as indicated, on behalf of arena {@code arena_ind}. This function may be called to destroy retained extents during - * arena destruction (see {@code arena.i.destroy}).

    - */ - @NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr, @NativeType("size_t") long size, @NativeType("bool") boolean committed, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentHooks.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentHooks.java deleted file mode 100644 index 781622a1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentHooks.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * The {@code extent_hooks_t} structure comprises function pointers which are described individually below. jemalloc uses these functions to manage extent - * lifetime, which starts off with allocation of mapped committed memory, in the simplest case followed by deallocation. However, there are performance - * and platform reasons to retain extents for later reuse. Cleanup attempts cascade from deallocation to decommit to forced purging to lazy purging, which - * gives the extent management functions opportunities to reject the most permanent cleanup operations in favor of less permanent (and often less costly) - * operations. All operations except allocation can be universally opted out of by setting the hook pointers to {@code NULL}, or selectively opted out of by - * returning failure. - * - *

    Layout

    - * - *
    
    - * struct extent_hooks_t {
    - *     {@link ExtentAllocI extent_alloc_t} {@link #alloc};
    - *     {@link ExtentDallocI extent_dalloc_t} {@link #dalloc};
    - *     {@link ExtentDestroyI extent_destroy_t} {@link #destroy};
    - *     {@link ExtentCommitI extent_commit_t} {@link #commit};
    - *     {@link ExtentDecommitI extent_decommit_t} {@link #decommit};
    - *     {@link ExtentPurgeI extent_purge_t} {@link #purge_lazy};
    - *     {@link ExtentPurgeI extent_purge_t} {@link #purge_forced};
    - *     {@link ExtentSplitI extent_split_t} {@link #split};
    - *     {@link ExtentMergeI extent_merge_t} {@link #merge};
    - * }
    - */ -@NativeType("struct extent_hooks_t") -public class ExtentHooks extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ALLOC, - DALLOC, - DESTROY, - COMMIT, - DECOMMIT, - PURGE_LAZY, - PURGE_FORCED, - SPLIT, - MERGE; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ALLOC = layout.offsetof(0); - DALLOC = layout.offsetof(1); - DESTROY = layout.offsetof(2); - COMMIT = layout.offsetof(3); - DECOMMIT = layout.offsetof(4); - PURGE_LAZY = layout.offsetof(5); - PURGE_FORCED = layout.offsetof(6); - SPLIT = layout.offsetof(7); - MERGE = layout.offsetof(8); - } - - protected ExtentHooks(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected ExtentHooks create(long address, @Nullable ByteBuffer container) { - return new ExtentHooks(address, container); - } - - /** - * Creates a {@code ExtentHooks} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public ExtentHooks(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the extent allocation hook */ - @NativeType("extent_alloc_t") - public ExtentAlloc alloc() { return nalloc(address()); } - /** the extent deallocation hook */ - @Nullable - @NativeType("extent_dalloc_t") - public ExtentDalloc dalloc() { return ndalloc(address()); } - /** the extent destruction hook */ - @Nullable - @NativeType("extent_destroy_t") - public ExtentDestroy destroy() { return ndestroy(address()); } - /** the extent commit hook */ - @Nullable - @NativeType("extent_commit_t") - public ExtentCommit commit() { return ncommit(address()); } - /** the extent decommit hook */ - @Nullable - @NativeType("extent_decommit_t") - public ExtentDecommit decommit() { return ndecommit(address()); } - /** the extent lazy purge hook */ - @Nullable - @NativeType("extent_purge_t") - public ExtentPurge purge_lazy() { return npurge_lazy(address()); } - /** the extent forced purge hook */ - @Nullable - @NativeType("extent_purge_t") - public ExtentPurge purge_forced() { return npurge_forced(address()); } - /** the extent split hook */ - @Nullable - @NativeType("extent_split_t") - public ExtentSplit split() { return nsplit(address()); } - /** the extent merge hook */ - @Nullable - @NativeType("extent_merge_t") - public ExtentMerge merge() { return nmerge(address()); } - - /** Sets the specified value to the {@link #alloc} field. */ - public ExtentHooks alloc(@NativeType("extent_alloc_t") ExtentAllocI value) { nalloc(address(), value); return this; } - /** Sets the specified value to the {@link #dalloc} field. */ - public ExtentHooks dalloc(@Nullable @NativeType("extent_dalloc_t") ExtentDallocI value) { ndalloc(address(), value); return this; } - /** Sets the specified value to the {@link #destroy} field. */ - public ExtentHooks destroy(@Nullable @NativeType("extent_destroy_t") ExtentDestroyI value) { ndestroy(address(), value); return this; } - /** Sets the specified value to the {@link #commit} field. */ - public ExtentHooks commit(@Nullable @NativeType("extent_commit_t") ExtentCommitI value) { ncommit(address(), value); return this; } - /** Sets the specified value to the {@link #decommit} field. */ - public ExtentHooks decommit(@Nullable @NativeType("extent_decommit_t") ExtentDecommitI value) { ndecommit(address(), value); return this; } - /** Sets the specified value to the {@link #purge_lazy} field. */ - public ExtentHooks purge_lazy(@Nullable @NativeType("extent_purge_t") ExtentPurgeI value) { npurge_lazy(address(), value); return this; } - /** Sets the specified value to the {@link #purge_forced} field. */ - public ExtentHooks purge_forced(@Nullable @NativeType("extent_purge_t") ExtentPurgeI value) { npurge_forced(address(), value); return this; } - /** Sets the specified value to the {@link #split} field. */ - public ExtentHooks split(@Nullable @NativeType("extent_split_t") ExtentSplitI value) { nsplit(address(), value); return this; } - /** Sets the specified value to the {@link #merge} field. */ - public ExtentHooks merge(@Nullable @NativeType("extent_merge_t") ExtentMergeI value) { nmerge(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public ExtentHooks set( - ExtentAllocI alloc, - ExtentDallocI dalloc, - ExtentDestroyI destroy, - ExtentCommitI commit, - ExtentDecommitI decommit, - ExtentPurgeI purge_lazy, - ExtentPurgeI purge_forced, - ExtentSplitI split, - ExtentMergeI merge - ) { - alloc(alloc); - dalloc(dalloc); - destroy(destroy); - commit(commit); - decommit(decommit); - purge_lazy(purge_lazy); - purge_forced(purge_forced); - split(split); - merge(merge); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public ExtentHooks set(ExtentHooks src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code ExtentHooks} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static ExtentHooks malloc() { - return new ExtentHooks(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code ExtentHooks} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static ExtentHooks calloc() { - return new ExtentHooks(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code ExtentHooks} instance allocated with {@link BufferUtils}. */ - public static ExtentHooks create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new ExtentHooks(memAddress(container), container); - } - - /** Returns a new {@code ExtentHooks} instance for the specified memory address. */ - public static ExtentHooks create(long address) { - return new ExtentHooks(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static ExtentHooks createSafe(long address) { - return address == NULL ? null : new ExtentHooks(address, null); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static ExtentHooks mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static ExtentHooks callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static ExtentHooks mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static ExtentHooks callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - - /** - * Returns a new {@code ExtentHooks} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static ExtentHooks malloc(MemoryStack stack) { - return new ExtentHooks(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code ExtentHooks} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static ExtentHooks calloc(MemoryStack stack) { - return new ExtentHooks(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - // ----------------------------------- - - /** Unsafe version of {@link #alloc}. */ - public static ExtentAlloc nalloc(long struct) { return ExtentAlloc.create(memGetAddress(struct + ExtentHooks.ALLOC)); } - /** Unsafe version of {@link #dalloc}. */ - @Nullable public static ExtentDalloc ndalloc(long struct) { return ExtentDalloc.createSafe(memGetAddress(struct + ExtentHooks.DALLOC)); } - /** Unsafe version of {@link #destroy}. */ - @Nullable public static ExtentDestroy ndestroy(long struct) { return ExtentDestroy.createSafe(memGetAddress(struct + ExtentHooks.DESTROY)); } - /** Unsafe version of {@link #commit}. */ - @Nullable public static ExtentCommit ncommit(long struct) { return ExtentCommit.createSafe(memGetAddress(struct + ExtentHooks.COMMIT)); } - /** Unsafe version of {@link #decommit}. */ - @Nullable public static ExtentDecommit ndecommit(long struct) { return ExtentDecommit.createSafe(memGetAddress(struct + ExtentHooks.DECOMMIT)); } - /** Unsafe version of {@link #purge_lazy}. */ - @Nullable public static ExtentPurge npurge_lazy(long struct) { return ExtentPurge.createSafe(memGetAddress(struct + ExtentHooks.PURGE_LAZY)); } - /** Unsafe version of {@link #purge_forced}. */ - @Nullable public static ExtentPurge npurge_forced(long struct) { return ExtentPurge.createSafe(memGetAddress(struct + ExtentHooks.PURGE_FORCED)); } - /** Unsafe version of {@link #split}. */ - @Nullable public static ExtentSplit nsplit(long struct) { return ExtentSplit.createSafe(memGetAddress(struct + ExtentHooks.SPLIT)); } - /** Unsafe version of {@link #merge}. */ - @Nullable public static ExtentMerge nmerge(long struct) { return ExtentMerge.createSafe(memGetAddress(struct + ExtentHooks.MERGE)); } - - /** Unsafe version of {@link #alloc(ExtentAllocI) alloc}. */ - public static void nalloc(long struct, ExtentAllocI value) { memPutAddress(struct + ExtentHooks.ALLOC, value.address()); } - /** Unsafe version of {@link #dalloc(ExtentDallocI) dalloc}. */ - public static void ndalloc(long struct, @Nullable ExtentDallocI value) { memPutAddress(struct + ExtentHooks.DALLOC, memAddressSafe(value)); } - /** Unsafe version of {@link #destroy(ExtentDestroyI) destroy}. */ - public static void ndestroy(long struct, @Nullable ExtentDestroyI value) { memPutAddress(struct + ExtentHooks.DESTROY, memAddressSafe(value)); } - /** Unsafe version of {@link #commit(ExtentCommitI) commit}. */ - public static void ncommit(long struct, @Nullable ExtentCommitI value) { memPutAddress(struct + ExtentHooks.COMMIT, memAddressSafe(value)); } - /** Unsafe version of {@link #decommit(ExtentDecommitI) decommit}. */ - public static void ndecommit(long struct, @Nullable ExtentDecommitI value) { memPutAddress(struct + ExtentHooks.DECOMMIT, memAddressSafe(value)); } - /** Unsafe version of {@link #purge_lazy(ExtentPurgeI) purge_lazy}. */ - public static void npurge_lazy(long struct, @Nullable ExtentPurgeI value) { memPutAddress(struct + ExtentHooks.PURGE_LAZY, memAddressSafe(value)); } - /** Unsafe version of {@link #purge_forced(ExtentPurgeI) purge_forced}. */ - public static void npurge_forced(long struct, @Nullable ExtentPurgeI value) { memPutAddress(struct + ExtentHooks.PURGE_FORCED, memAddressSafe(value)); } - /** Unsafe version of {@link #split(ExtentSplitI) split}. */ - public static void nsplit(long struct, @Nullable ExtentSplitI value) { memPutAddress(struct + ExtentHooks.SPLIT, memAddressSafe(value)); } - /** Unsafe version of {@link #merge(ExtentMergeI) merge}. */ - public static void nmerge(long struct, @Nullable ExtentMergeI value) { memPutAddress(struct + ExtentHooks.MERGE, memAddressSafe(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + ExtentHooks.ALLOC)); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentMerge.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentMerge.java deleted file mode 100644 index 89ea03ad..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentMerge.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr_a,
    - *     size_t size_a,
    - *     void *addr_b,
    - *     size_t size_b,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentMerge extends Callback implements ExtentMergeI { - - /** - * Creates a {@code ExtentMerge} instance from the specified function pointer. - * - * @return the new {@code ExtentMerge} - */ - public static ExtentMerge create(long functionPointer) { - ExtentMergeI instance = Callback.get(functionPointer); - return instance instanceof ExtentMerge - ? (ExtentMerge)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentMerge createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentMerge} instance that delegates to the specified {@code ExtentMergeI} instance. */ - public static ExtentMerge create(ExtentMergeI instance) { - return instance instanceof ExtentMerge - ? (ExtentMerge)instance - : new Container(instance.address(), instance); - } - - protected ExtentMerge() { - super(CIF); - } - - ExtentMerge(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentMerge { - - private final ExtentMergeI delegate; - - Container(long functionPointer, ExtentMergeI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public boolean invoke(long extent_hooks, long addr_a, long size_a, long addr_b, long size_b, boolean committed, int arena_ind) { - return delegate.invoke(extent_hooks, addr_a, size_a, addr_b, size_b, committed, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentMergeI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentMergeI.java deleted file mode 100644 index f1438c6d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentMergeI.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr_a,
    - *     size_t size_a,
    - *     void *addr_b,
    - *     size_t size_b,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_merge_t") -public interface ExtentMergeI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_uint8, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint8, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - boolean __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetByte(memGetAddress(args + 5 * POINTER_SIZE)) != 0, - memGetInt(memGetAddress(args + 6 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * Extent merge hook. - * - *

    An extent merge function conforms to the {@code extent_merge_t} type and optionally merges adjacent extents, at given {@code addr_a} and {@code size_a} - * with given {@code addr_b} and {@code size_b} into one contiguous extent, operating on {@code committed}/decommitted memory as indicated, on behalf of arena - * {@code arena_ind}, returning false upon success. If the function returns true, this indicates that the extents remain distinct mappings and therefore - * should continue to be operated on independently.

    - */ - @NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr_a, @NativeType("size_t") long size_a, @NativeType("void *") long addr_b, @NativeType("size_t") long size_b, @NativeType("bool") boolean committed, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentPurge.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentPurge.java deleted file mode 100644 index 4726b9c4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentPurge.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t offset,
    - *     size_t length,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentPurge extends Callback implements ExtentPurgeI { - - /** - * Creates a {@code ExtentPurge} instance from the specified function pointer. - * - * @return the new {@code ExtentPurge} - */ - public static ExtentPurge create(long functionPointer) { - ExtentPurgeI instance = Callback.get(functionPointer); - return instance instanceof ExtentPurge - ? (ExtentPurge)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentPurge createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentPurge} instance that delegates to the specified {@code ExtentPurgeI} instance. */ - public static ExtentPurge create(ExtentPurgeI instance) { - return instance instanceof ExtentPurge - ? (ExtentPurge)instance - : new Container(instance.address(), instance); - } - - protected ExtentPurge() { - super(CIF); - } - - ExtentPurge(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentPurge { - - private final ExtentPurgeI delegate; - - Container(long functionPointer, ExtentPurgeI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public boolean invoke(long extent_hooks, long addr, long size, long offset, long length, int arena_ind) { - return delegate.invoke(extent_hooks, addr, size, offset, length, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentPurgeI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentPurgeI.java deleted file mode 100644 index 3d6304bb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentPurgeI.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t offset,
    - *     size_t length,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_purge_t") -public interface ExtentPurgeI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_uint8, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - boolean __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetInt(memGetAddress(args + 5 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * Extent purge hook. - * - *

    An extent purge function conforms to the {@code extent_purge_t} type and discards physical pages within the virtual memory mapping associated with an - * extent at given {@code addr} and {@code size} at {@code offset} bytes, extending for {@code length} on behalf of arena {@code arena_ind}. A lazy extent - * purge function (e.g. implemented via {@code madvise(..., MADV_FREE)}) can delay purging indefinitely and leave the pages within the purged virtual memory - * range in an indeterminite state, whereas a forced extent purge function immediately purges, and the pages within the virtual memory range will be - * zero-filled the next time they are accessed. If the function returns true, this indicates failure to purge.

    - */ - @NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr, @NativeType("size_t") long size, @NativeType("size_t") long offset, @NativeType("size_t") long length, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentSplit.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentSplit.java deleted file mode 100644 index cebf2ba2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentSplit.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t size_a,
    - *     size_t size_b,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -public abstract class ExtentSplit extends Callback implements ExtentSplitI { - - /** - * Creates a {@code ExtentSplit} instance from the specified function pointer. - * - * @return the new {@code ExtentSplit} - */ - public static ExtentSplit create(long functionPointer) { - ExtentSplitI instance = Callback.get(functionPointer); - return instance instanceof ExtentSplit - ? (ExtentSplit)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static ExtentSplit createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code ExtentSplit} instance that delegates to the specified {@code ExtentSplitI} instance. */ - public static ExtentSplit create(ExtentSplitI instance) { - return instance instanceof ExtentSplit - ? (ExtentSplit)instance - : new Container(instance.address(), instance); - } - - protected ExtentSplit() { - super(CIF); - } - - ExtentSplit(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends ExtentSplit { - - private final ExtentSplitI delegate; - - Container(long functionPointer, ExtentSplitI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public boolean invoke(long extent_hooks, long addr, long size, long size_a, long size_b, boolean committed, int arena_ind) { - return delegate.invoke(extent_hooks, addr, size, size_a, size_b, committed, arena_ind); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentSplitI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentSplitI.java deleted file mode 100644 index bab3b673..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/ExtentSplitI.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be set to the {@link ExtentHooks} struct. - * - *

    Type

    - * - *
    
    - * bool (*{@link #invoke}) (
    - *     extent_hooks_t *extent_hooks,
    - *     void *addr,
    - *     size_t size,
    - *     size_t size_a,
    - *     size_t size_b,
    - *     bool committed,
    - *     unsigned int arena_ind
    - * )
    - */ -@FunctionalInterface -@NativeType("extent_split_t") -public interface ExtentSplitI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_uint8, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_uint8, ffi_type_uint32 - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - boolean __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 4 * POINTER_SIZE)), - memGetByte(memGetAddress(args + 5 * POINTER_SIZE)) != 0, - memGetInt(memGetAddress(args + 6 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * Extent split hook. - * - *

    An extent split function conforms to the {@code extent_split_t} type and optionally splits an extent at given {@code addr} and {@code size} into two - * adjacent extents, the first of {@code size_a} bytes, and the second of {@code size_b} bytes, operating on {@code committed}/decommitted memory as - * indicated, on behalf of arena {@code arena_ind}, returning false upon success. If the function returns true, this indicates that the extent remains unsplit - * and therefore should continue to be operated on as a whole.

    - */ - @NativeType("bool") boolean invoke(@NativeType("extent_hooks_t *") long extent_hooks, @NativeType("void *") long addr, @NativeType("size_t") long size, @NativeType("size_t") long size_a, @NativeType("size_t") long size_b, @NativeType("bool") boolean committed, @NativeType("unsigned int") int arena_ind); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/JEmalloc.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/JEmalloc.java deleted file mode 100644 index 6054511b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/JEmalloc.java +++ /dev/null @@ -1,1011 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to jemalloc. - * - *

    jemalloc is a general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support. jemalloc first came into - * use as the FreeBSD libc allocator in 2005, and since then it has found its way into numerous applications that rely on its predictable behavior. In - * 2010 jemalloc development efforts broadened to include developer support features such as heap profiling, Valgrind integration, and extensive - * monitoring/tuning hooks. Modern jemalloc releases continue to be integrated back into FreeBSD, and therefore versatility remains critical. Ongoing - * development efforts trend toward making jemalloc among the best allocators for a broad range of demanding applications, and eliminating/mitigating - * weaknesses that have practical repercussions for real world applications.

    - */ -public class JEmalloc { - - private static final SharedLibrary JEMALLOC = Library.loadNative(JEmalloc.class, "org.lwjgl.jemalloc", Configuration.JEMALLOC_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("jemalloc")), true); - - /** Contains the function pointers loaded from the jemalloc {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - malloc_message = apiGetFunctionAddress(JEMALLOC, "je_malloc_message"), - malloc = apiGetFunctionAddress(JEMALLOC, "je_malloc"), - calloc = apiGetFunctionAddress(JEMALLOC, "je_calloc"), - posix_memalign = apiGetFunctionAddress(JEMALLOC, "je_posix_memalign"), - aligned_alloc = apiGetFunctionAddress(JEMALLOC, "je_aligned_alloc"), - realloc = apiGetFunctionAddress(JEMALLOC, "je_realloc"), - free = apiGetFunctionAddress(JEMALLOC, "je_free"), - free_sized = apiGetFunctionAddress(JEMALLOC, "je_free_sized"), - free_aligned_sized = apiGetFunctionAddress(JEMALLOC, "je_free_aligned_sized"), - mallocx = apiGetFunctionAddress(JEMALLOC, "je_mallocx"), - rallocx = apiGetFunctionAddress(JEMALLOC, "je_rallocx"), - xallocx = apiGetFunctionAddress(JEMALLOC, "je_xallocx"), - sallocx = apiGetFunctionAddress(JEMALLOC, "je_sallocx"), - dallocx = apiGetFunctionAddress(JEMALLOC, "je_dallocx"), - sdallocx = apiGetFunctionAddress(JEMALLOC, "je_sdallocx"), - nallocx = apiGetFunctionAddress(JEMALLOC, "je_nallocx"), - mallctl = apiGetFunctionAddress(JEMALLOC, "je_mallctl"), - mallctlnametomib = apiGetFunctionAddress(JEMALLOC, "je_mallctlnametomib"), - mallctlbymib = apiGetFunctionAddress(JEMALLOC, "je_mallctlbymib"), - malloc_stats_print = apiGetFunctionAddress(JEMALLOC, "je_malloc_stats_print"), - malloc_usable_size = apiGetFunctionAddress(JEMALLOC, "je_malloc_usable_size"); - - } - - /** Returns the jemalloc {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return JEMALLOC; - } - - /** The major version. */ - public static final int JEMALLOC_VERSION_MAJOR = 5; - - /** The minor version. */ - public static final int JEMALLOC_VERSION_MINOR = 2; - - /** The bugfix version. */ - public static final int JEMALLOC_VERSION_BUGFIX = 1; - - /** The revision number. */ - public static final int JEMALLOC_VERSION_NREV = 0; - - /** The globally unique identifier (git commit hash). */ - public static final String JEMALLOC_VERSION_GID = "ea6b3e973b477b8061e0076bb257dbd7f3faa756"; - - /** The version string. */ - public static final String JEMALLOC_VERSION = JEMALLOC_VERSION_MAJOR + "." + JEMALLOC_VERSION_MINOR + "." + JEMALLOC_VERSION_BUGFIX + "-" + JEMALLOC_VERSION_NREV + "-g" + JEMALLOC_VERSION_GID; - - /** - * Initialize newly allocated memory to contain zero bytes. In the growing reallocation case, the real size prior to reallocation defines the boundary - * between untouched bytes and those that are initialized to contain zero bytes. If this macro is absent, newly allocated memory is uninitialized. - */ - public static final int MALLOCX_ZERO = 0x40; - - /** - * Do not use a thread-specific cache (tcache). Unless {@link #MALLOCX_TCACHE} or {@code MALLOCX_TCACHE_NONE} is specified, an automatically managed - * tcache will be used under many circumstances. This macro cannot be used in the same {@code flags} argument as {@code MALLOCX_TCACHE(tc)}. - */ - public static final int MALLOCX_TCACHE_NONE = MALLOCX_TCACHE(-1); - - /** Use as arena index in "arena.<i>.{purge,decay,dss}" and "stats.arenas.<i>.*" mallctl interfaces to select all arenas. */ - public static final int MALLCTL_ARENAS_ALL = 0x1000; - - /** Use as arena index in "stats.arenas.<i>.*" mallctl interfaces to select destroyed arenas. */ - public static final int MALLCTL_ARENAS_DESTROYED = 0x1001; - - static { - // Force jemalloc to initialize before anyone else uses it. - // This avoids a dangerous race when the first jemalloc functions are called concurrently. - if (Platform.get() == Platform.WINDOWS) { - invokePV(invokePP(8L, apiGetFunctionAddress(JEMALLOC, "je_malloc")), apiGetFunctionAddress(JEMALLOC, "je_free")); - } - } - - protected JEmalloc() { - throw new UnsupportedOperationException(); - } - - // --- [ je_malloc_message ] --- - - /** Returns the {@code je_malloc_message} variable. */ - @NativeType("void (*) (void *, char const *) *") - public static PointerBuffer je_malloc_message() { - long __result = Functions.malloc_message; - return memPointerBuffer(__result, 1); - } - - // --- [ je_malloc ] --- - - /** Unsafe version of: {@link #je_malloc malloc} */ - public static long nje_malloc(long size) { - long __functionAddress = Functions.malloc; - return invokePP(size, __functionAddress); - } - - /** - * Allocates {@code size} bytes of uninitialized memory. The allocated space is suitably aligned (after possible pointer coercion) for storage of any type - * of object. - * - * @param size the number of bytes to allocate - */ - @Nullable - @NativeType("void *") - public static ByteBuffer je_malloc(@NativeType("size_t") long size) { - long __result = nje_malloc(size); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ je_calloc ] --- - - /** Unsafe version of: {@link #je_calloc calloc} */ - public static long nje_calloc(long num, long size) { - long __functionAddress = Functions.calloc; - return invokePPP(num, size, __functionAddress); - } - - /** - * Allocates space for {@code num} objects, each {@code size} bytes in length. The result is identical to calling {@link #je_malloc malloc} with an argument of - * {@code num * size}, with the exception that the allocated memory is explicitly initialized to zero bytes. - * - * @param num the number of objects to allocate - * @param size the size of each object, in bytes - */ - @Nullable - @NativeType("void *") - public static ByteBuffer je_calloc(@NativeType("size_t") long num, @NativeType("size_t") long size) { - long __result = nje_calloc(num, size); - return memByteBufferSafe(__result, (int)num * (int)size); - } - - // --- [ je_posix_memalign ] --- - - /** Unsafe version of: {@link #je_posix_memalign posix_memalign} */ - public static int nje_posix_memalign(long memptr, long alignment, long size) { - long __functionAddress = Functions.posix_memalign; - return invokePPPI(memptr, alignment, size, __functionAddress); - } - - /** - * Allocates {@code size} bytes of memory such that the allocation's base address is an even multiple of {@code alignment}, and returns the allocation in - * the value pointed to by {@code memptr}. The requested alignment must be a power of 2 at least as large as {@code sizeof(void *)}. - * - * @param memptr returns the allocated memory - * @param alignment the allocation alignment, in bytes - * @param size the number of bytes to allocate - */ - public static int je_posix_memalign(@NativeType("void **") PointerBuffer memptr, @NativeType("size_t") long alignment, @NativeType("size_t") long size) { - if (CHECKS) { - check(memptr, 1); - } - return nje_posix_memalign(memAddress(memptr), alignment, size); - } - - // --- [ je_aligned_alloc ] --- - - /** Unsafe version of: {@link #je_aligned_alloc aligned_alloc} */ - public static long nje_aligned_alloc(long alignment, long size) { - long __functionAddress = Functions.aligned_alloc; - return invokePPP(alignment, size, __functionAddress); - } - - /** - * Allocates {@code size} bytes of memory such that the allocation's base address is an even multiple of {@code alignment}. The requested alignment must - * be a power of 2. Behavior is undefined if {@code size} is not an integral multiple of {@code alignment}. - * - * @param alignment the allocation alignment, in bytes - * @param size the number of bytes to allocate - */ - @Nullable - @NativeType("void *") - public static ByteBuffer je_aligned_alloc(@NativeType("size_t") long alignment, @NativeType("size_t") long size) { - long __result = nje_aligned_alloc(alignment, size); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ je_realloc ] --- - - /** Unsafe version of: {@link #je_realloc realloc} */ - public static long nje_realloc(long ptr, long size) { - long __functionAddress = Functions.realloc; - return invokePPP(ptr, size, __functionAddress); - } - - /** - * Changes the size of the previously allocated memory referenced by {@code ptr} to {@code size} bytes. The contents of the memory are unchanged up to the - * lesser of the new and old sizes. If the new size is larger, the contents of the newly allocated portion of the memory are undefined. Upon success, the - * memory referenced by {@code ptr} is freed and a pointer to the newly allocated memory is returned. Note that realloc() may move the memory allocation, - * resulting in a different return value than {@code ptr}. If {@code ptr} is {@code NULL}, the realloc() function behaves identically to malloc() for the - * specified size. - * - * @param ptr the previously allocated memory or {@code NULL} - * @param size the number of bytes to allocate - */ - @Nullable - @NativeType("void *") - public static ByteBuffer je_realloc(@Nullable @NativeType("void *") ByteBuffer ptr, @NativeType("size_t") long size) { - long __result = nje_realloc(memAddressSafe(ptr), size); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ je_free ] --- - - /** Unsafe version of: {@link #je_free free} */ - public static void nje_free(long ptr) { - long __functionAddress = Functions.free; - invokePV(ptr, __functionAddress); - } - - /** - * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. - * - * @param ptr the allocated memory to free - */ - public static void je_free(@Nullable @NativeType("void *") ByteBuffer ptr) { - nje_free(memAddressSafe(ptr)); - } - - /** - * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. - * - * @param ptr the allocated memory to free - */ - public static void je_free(@Nullable @NativeType("void *") ShortBuffer ptr) { - nje_free(memAddressSafe(ptr)); - } - - /** - * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. - * - * @param ptr the allocated memory to free - */ - public static void je_free(@Nullable @NativeType("void *") IntBuffer ptr) { - nje_free(memAddressSafe(ptr)); - } - - /** - * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. - * - * @param ptr the allocated memory to free - */ - public static void je_free(@Nullable @NativeType("void *") LongBuffer ptr) { - nje_free(memAddressSafe(ptr)); - } - - /** - * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. - * - * @param ptr the allocated memory to free - */ - public static void je_free(@Nullable @NativeType("void *") FloatBuffer ptr) { - nje_free(memAddressSafe(ptr)); - } - - /** - * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. - * - * @param ptr the allocated memory to free - */ - public static void je_free(@Nullable @NativeType("void *") DoubleBuffer ptr) { - nje_free(memAddressSafe(ptr)); - } - - /** - * Causes the allocated memory referenced by {@code ptr} to be made available for future allocations. If {@code ptr} is {@code NULL}, no action occurs. - * - * @param ptr the allocated memory to free - */ - public static void je_free(@Nullable @NativeType("void *") PointerBuffer ptr) { - nje_free(memAddressSafe(ptr)); - } - - // --- [ je_free_sized ] --- - - /** Unsafe version of: {@link #je_free_sized free_sized} */ - public static void nje_free_sized(long ptr, long size) { - long __functionAddress = Functions.free_sized; - invokePPV(ptr, size, __functionAddress); - } - - /** - * The {@code free_sized()} function is an extension of {@link #je_free free} with a {@code size} parameter to allow the caller to pass in the allocation size as an - * optimization. - */ - public static void je_free_sized(@Nullable @NativeType("void *") ByteBuffer ptr) { - nje_free_sized(memAddressSafe(ptr), remainingSafe(ptr)); - } - - /** - * The {@code free_sized()} function is an extension of {@link #je_free free} with a {@code size} parameter to allow the caller to pass in the allocation size as an - * optimization. - */ - public static void je_free_sized(@Nullable @NativeType("void *") ShortBuffer ptr) { - nje_free_sized(memAddressSafe(ptr), Integer.toUnsignedLong(remainingSafe(ptr)) << 1); - } - - /** - * The {@code free_sized()} function is an extension of {@link #je_free free} with a {@code size} parameter to allow the caller to pass in the allocation size as an - * optimization. - */ - public static void je_free_sized(@Nullable @NativeType("void *") IntBuffer ptr) { - nje_free_sized(memAddressSafe(ptr), Integer.toUnsignedLong(remainingSafe(ptr)) << 2); - } - - /** - * The {@code free_sized()} function is an extension of {@link #je_free free} with a {@code size} parameter to allow the caller to pass in the allocation size as an - * optimization. - */ - public static void je_free_sized(@Nullable @NativeType("void *") LongBuffer ptr) { - nje_free_sized(memAddressSafe(ptr), Integer.toUnsignedLong(remainingSafe(ptr)) << 3); - } - - /** - * The {@code free_sized()} function is an extension of {@link #je_free free} with a {@code size} parameter to allow the caller to pass in the allocation size as an - * optimization. - */ - public static void je_free_sized(@Nullable @NativeType("void *") FloatBuffer ptr) { - nje_free_sized(memAddressSafe(ptr), Integer.toUnsignedLong(remainingSafe(ptr)) << 2); - } - - /** - * The {@code free_sized()} function is an extension of {@link #je_free free} with a {@code size} parameter to allow the caller to pass in the allocation size as an - * optimization. - */ - public static void je_free_sized(@Nullable @NativeType("void *") DoubleBuffer ptr) { - nje_free_sized(memAddressSafe(ptr), Integer.toUnsignedLong(remainingSafe(ptr)) << 3); - } - - /** - * The {@code free_sized()} function is an extension of {@link #je_free free} with a {@code size} parameter to allow the caller to pass in the allocation size as an - * optimization. - */ - public static void je_free_sized(@Nullable @NativeType("void *") PointerBuffer ptr) { - nje_free_sized(memAddressSafe(ptr), Integer.toUnsignedLong(remainingSafe(ptr)) << POINTER_SHIFT); - } - - // --- [ je_free_aligned_sized ] --- - - /** Unsafe version of: {@link #je_free_aligned_sized free_aligned_sized} */ - public static void nje_free_aligned_sized(long ptr, long alignment, long size) { - long __functionAddress = Functions.free_aligned_sized; - invokePPPV(ptr, alignment, size, __functionAddress); - } - - /** - * The {@code free_aligned_sized()} function accepts a {@code ptr} which was allocated with a requested {@code size} and {@code alignment}, causing the - * allocated memory referenced by {@code ptr} to be made available for future allocations. - */ - public static void je_free_aligned_sized(@Nullable @NativeType("void *") ByteBuffer ptr, @NativeType("size_t") long alignment) { - nje_free_aligned_sized(memAddressSafe(ptr), alignment, remainingSafe(ptr)); - } - - /** - * The {@code free_aligned_sized()} function accepts a {@code ptr} which was allocated with a requested {@code size} and {@code alignment}, causing the - * allocated memory referenced by {@code ptr} to be made available for future allocations. - */ - public static void je_free_aligned_sized(@Nullable @NativeType("void *") ShortBuffer ptr, @NativeType("size_t") long alignment) { - nje_free_aligned_sized(memAddressSafe(ptr), alignment, Integer.toUnsignedLong(remainingSafe(ptr)) << 1); - } - - /** - * The {@code free_aligned_sized()} function accepts a {@code ptr} which was allocated with a requested {@code size} and {@code alignment}, causing the - * allocated memory referenced by {@code ptr} to be made available for future allocations. - */ - public static void je_free_aligned_sized(@Nullable @NativeType("void *") IntBuffer ptr, @NativeType("size_t") long alignment) { - nje_free_aligned_sized(memAddressSafe(ptr), alignment, Integer.toUnsignedLong(remainingSafe(ptr)) << 2); - } - - /** - * The {@code free_aligned_sized()} function accepts a {@code ptr} which was allocated with a requested {@code size} and {@code alignment}, causing the - * allocated memory referenced by {@code ptr} to be made available for future allocations. - */ - public static void je_free_aligned_sized(@Nullable @NativeType("void *") LongBuffer ptr, @NativeType("size_t") long alignment) { - nje_free_aligned_sized(memAddressSafe(ptr), alignment, Integer.toUnsignedLong(remainingSafe(ptr)) << 3); - } - - /** - * The {@code free_aligned_sized()} function accepts a {@code ptr} which was allocated with a requested {@code size} and {@code alignment}, causing the - * allocated memory referenced by {@code ptr} to be made available for future allocations. - */ - public static void je_free_aligned_sized(@Nullable @NativeType("void *") FloatBuffer ptr, @NativeType("size_t") long alignment) { - nje_free_aligned_sized(memAddressSafe(ptr), alignment, Integer.toUnsignedLong(remainingSafe(ptr)) << 2); - } - - /** - * The {@code free_aligned_sized()} function accepts a {@code ptr} which was allocated with a requested {@code size} and {@code alignment}, causing the - * allocated memory referenced by {@code ptr} to be made available for future allocations. - */ - public static void je_free_aligned_sized(@Nullable @NativeType("void *") DoubleBuffer ptr, @NativeType("size_t") long alignment) { - nje_free_aligned_sized(memAddressSafe(ptr), alignment, Integer.toUnsignedLong(remainingSafe(ptr)) << 3); - } - - /** - * The {@code free_aligned_sized()} function accepts a {@code ptr} which was allocated with a requested {@code size} and {@code alignment}, causing the - * allocated memory referenced by {@code ptr} to be made available for future allocations. - */ - public static void je_free_aligned_sized(@Nullable @NativeType("void *") PointerBuffer ptr, @NativeType("size_t") long alignment) { - nje_free_aligned_sized(memAddressSafe(ptr), alignment, Integer.toUnsignedLong(remainingSafe(ptr)) << POINTER_SHIFT); - } - - // --- [ je_mallocx ] --- - - /** Unsafe version of: {@link #je_mallocx mallocx} */ - public static long nje_mallocx(long size, int flags) { - long __functionAddress = Functions.mallocx; - return invokePP(size, flags, __functionAddress); - } - - /** - * Allocates at least {@code size} bytes of memory, and returns a pointer to the base address of the allocation. Behavior is undefined if {@code size} is - * 0, or if request size overflows due to size class and/or alignment constraints. - * - * @param size the number of bytes to allocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - @Nullable - @NativeType("void *") - public static ByteBuffer je_mallocx(@NativeType("size_t") long size, int flags) { - long __result = nje_mallocx(size, flags); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ je_rallocx ] --- - - /** Unsafe version of: {@link #je_rallocx rallocx} */ - public static long nje_rallocx(long ptr, long size, int flags) { - long __functionAddress = Functions.rallocx; - return invokePPP(ptr, size, flags, __functionAddress); - } - - /** - * Resizes the allocation at {@code ptr} to be at least {@code size} bytes, and returns a pointer to the base address of the resulting allocation, which - * may or may not have moved from its original location. Behavior is undefined if {@code size} is 0, or if request size overflows due to size class and/or - * alignment constraints. - * - * @param ptr the previously allocated memory or {@code NULL} - * @param size the number of bytes to allocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - @Nullable - @NativeType("void *") - public static ByteBuffer je_rallocx(@Nullable @NativeType("void *") ByteBuffer ptr, @NativeType("size_t") long size, int flags) { - long __result = nje_rallocx(memAddressSafe(ptr), size, flags); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ je_xallocx ] --- - - /** Unsafe version of: {@link #je_xallocx xallocx} */ - public static long nje_xallocx(long ptr, long size, long extra, int flags) { - long __functionAddress = Functions.xallocx; - return invokePPPP(ptr, size, extra, flags, __functionAddress); - } - - /** - * Resizes the allocation at {@code ptr} in place to be at least size bytes, and returns the real size of the allocation. If {@code extra} is non-zero, an - * attempt is made to resize the allocation to be at least {@code (size + extra)} bytes, though inability to allocate the extra byte(s) will not by itself - * result in failure to resize. Behavior is undefined if {@code size} is 0, or if {@code (size + extra > SIZE_T_MAX)}. - * - * @param ptr the previously allocated memory or {@code NULL} - * @param size the number of bytes to allocate - * @param extra the number of extra bytes to allocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - @NativeType("size_t") - public static long je_xallocx(@Nullable @NativeType("void *") ByteBuffer ptr, @NativeType("size_t") long size, @NativeType("size_t") long extra, int flags) { - return nje_xallocx(memAddressSafe(ptr), size, extra, flags); - } - - // --- [ je_sallocx ] --- - - /** Unsafe version of: {@link #je_sallocx sallocx} */ - public static long nje_sallocx(long ptr, int flags) { - long __functionAddress = Functions.sallocx; - return invokePP(ptr, flags, __functionAddress); - } - - /** - * Returns the real size of the allocation at {@code ptr}. - * - * @param ptr the allocated memory to query - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - @NativeType("size_t") - public static long je_sallocx(@NativeType("void const *") ByteBuffer ptr, int flags) { - return nje_sallocx(memAddress(ptr), flags); - } - - // --- [ je_dallocx ] --- - - /** Unsafe version of: {@link #je_dallocx dallocx} */ - public static void nje_dallocx(long ptr, int flags) { - long __functionAddress = Functions.dallocx; - invokePV(ptr, flags, __functionAddress); - } - - /** - * Causes the memory referenced by {@code ptr} to be made available for future allocations. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_dallocx(@NativeType("void *") ByteBuffer ptr, int flags) { - nje_dallocx(memAddress(ptr), flags); - } - - /** - * Causes the memory referenced by {@code ptr} to be made available for future allocations. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_dallocx(@NativeType("void *") ShortBuffer ptr, int flags) { - nje_dallocx(memAddress(ptr), flags); - } - - /** - * Causes the memory referenced by {@code ptr} to be made available for future allocations. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_dallocx(@NativeType("void *") IntBuffer ptr, int flags) { - nje_dallocx(memAddress(ptr), flags); - } - - /** - * Causes the memory referenced by {@code ptr} to be made available for future allocations. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_dallocx(@NativeType("void *") LongBuffer ptr, int flags) { - nje_dallocx(memAddress(ptr), flags); - } - - /** - * Causes the memory referenced by {@code ptr} to be made available for future allocations. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_dallocx(@NativeType("void *") FloatBuffer ptr, int flags) { - nje_dallocx(memAddress(ptr), flags); - } - - /** - * Causes the memory referenced by {@code ptr} to be made available for future allocations. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_dallocx(@NativeType("void *") DoubleBuffer ptr, int flags) { - nje_dallocx(memAddress(ptr), flags); - } - - /** - * Causes the memory referenced by {@code ptr} to be made available for future allocations. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_dallocx(@NativeType("void *") PointerBuffer ptr, int flags) { - nje_dallocx(memAddress(ptr), flags); - } - - // --- [ je_sdallocx ] --- - - /** - * Unsafe version of: {@link #je_sdallocx sdallocx} - * - * @param size the number of bytes in {@code ptr} - */ - public static void nje_sdallocx(long ptr, long size, int flags) { - long __functionAddress = Functions.sdallocx; - invokePPV(ptr, size, flags, __functionAddress); - } - - /** - * Sized version of {@link #je_dallocx dallocx}. The primary optimization over {@code dallocx()} is the removal of a metadata read, which often suffers an L1 cache miss. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_sdallocx(@NativeType("void *") ByteBuffer ptr, int flags) { - nje_sdallocx(memAddress(ptr), ptr.remaining(), flags); - } - - /** - * Sized version of {@link #je_dallocx dallocx}. The primary optimization over {@code dallocx()} is the removal of a metadata read, which often suffers an L1 cache miss. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_sdallocx(@NativeType("void *") ShortBuffer ptr, int flags) { - nje_sdallocx(memAddress(ptr), Integer.toUnsignedLong(ptr.remaining()) << 1, flags); - } - - /** - * Sized version of {@link #je_dallocx dallocx}. The primary optimization over {@code dallocx()} is the removal of a metadata read, which often suffers an L1 cache miss. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_sdallocx(@NativeType("void *") IntBuffer ptr, int flags) { - nje_sdallocx(memAddress(ptr), Integer.toUnsignedLong(ptr.remaining()) << 2, flags); - } - - /** - * Sized version of {@link #je_dallocx dallocx}. The primary optimization over {@code dallocx()} is the removal of a metadata read, which often suffers an L1 cache miss. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_sdallocx(@NativeType("void *") LongBuffer ptr, int flags) { - nje_sdallocx(memAddress(ptr), Integer.toUnsignedLong(ptr.remaining()) << 3, flags); - } - - /** - * Sized version of {@link #je_dallocx dallocx}. The primary optimization over {@code dallocx()} is the removal of a metadata read, which often suffers an L1 cache miss. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_sdallocx(@NativeType("void *") FloatBuffer ptr, int flags) { - nje_sdallocx(memAddress(ptr), Integer.toUnsignedLong(ptr.remaining()) << 2, flags); - } - - /** - * Sized version of {@link #je_dallocx dallocx}. The primary optimization over {@code dallocx()} is the removal of a metadata read, which often suffers an L1 cache miss. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_sdallocx(@NativeType("void *") DoubleBuffer ptr, int flags) { - nje_sdallocx(memAddress(ptr), Integer.toUnsignedLong(ptr.remaining()) << 3, flags); - } - - /** - * Sized version of {@link #je_dallocx dallocx}. The primary optimization over {@code dallocx()} is the removal of a metadata read, which often suffers an L1 cache miss. - * - * @param ptr the allocated memory to deallocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - public static void je_sdallocx(@NativeType("void *") PointerBuffer ptr, int flags) { - nje_sdallocx(memAddress(ptr), Integer.toUnsignedLong(ptr.remaining()) << POINTER_SHIFT, flags); - } - - // --- [ je_nallocx ] --- - - /** Unsafe version of: {@link #je_nallocx nallocx} */ - public static long nje_nallocx(long size, int flags) { - long __functionAddress = Functions.nallocx; - return invokePP(size, flags, __functionAddress); - } - - /** - * Allocates no memory, but it performs the same size computation as the {@link #je_mallocx mallocx} function, and returns the real size of the allocation that would - * result from the equivalent {@code mallocx()} function call. Behavior is undefined if {@code size} is 0, or if request size overflows due to size class - * and/or alignment constraints. - * - * @param size the number of bytes to allocate - * @param flags a bitfield of zero or more of the {@code MALLOCX} macros - */ - @Nullable - @NativeType("void *") - public static ByteBuffer je_nallocx(@NativeType("size_t") long size, int flags) { - long __result = nje_nallocx(size, flags); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ je_mallctl ] --- - - /** - * Unsafe version of: {@link #je_mallctl mallctl} - * - * @param newlen the new value length - */ - public static int nje_mallctl(long name, long oldp, long oldlenp, long newp, long newlen) { - long __functionAddress = Functions.mallctl; - return invokePPPPPI(name, oldp, oldlenp, newp, newlen, __functionAddress); - } - - /** - * Provides a general interface for introspecting the memory allocator, as well as setting modifiable parameters and triggering actions. The - * period-separated {@code name} argument specifies a location in a tree-structured namespace; see the - * MALLCTL NAMESPACE section for - * documentation on the tree contents. To read a value, pass a pointer via {@code oldp} to adequate space to contain the value, and a pointer to its - * length via {@code oldlenp}; otherwise pass {@code NULL} and {@code NULL}. Similarly, to write a value, pass a pointer to the value via {@code newp}, and its length - * via {@code newlen}; otherwise pass {@code NULL} and {@code 0}. - * - * @param name the namespace location - * @param oldp returns a value - * @param oldlenp returns the value length - * @param newp the new value - */ - public static int je_mallctl(@NativeType("char const *") ByteBuffer name, @Nullable @NativeType("void *") ByteBuffer oldp, @Nullable @NativeType("size_t *") PointerBuffer oldlenp, @Nullable @NativeType("void *") ByteBuffer newp) { - if (CHECKS) { - checkNT1(name); - checkSafe(oldlenp, 1); - } - return nje_mallctl(memAddress(name), memAddressSafe(oldp), memAddressSafe(oldlenp), memAddressSafe(newp), remainingSafe(newp)); - } - - /** - * Provides a general interface for introspecting the memory allocator, as well as setting modifiable parameters and triggering actions. The - * period-separated {@code name} argument specifies a location in a tree-structured namespace; see the - * MALLCTL NAMESPACE section for - * documentation on the tree contents. To read a value, pass a pointer via {@code oldp} to adequate space to contain the value, and a pointer to its - * length via {@code oldlenp}; otherwise pass {@code NULL} and {@code NULL}. Similarly, to write a value, pass a pointer to the value via {@code newp}, and its length - * via {@code newlen}; otherwise pass {@code NULL} and {@code 0}. - * - * @param name the namespace location - * @param oldp returns a value - * @param oldlenp returns the value length - * @param newp the new value - */ - public static int je_mallctl(@NativeType("char const *") CharSequence name, @Nullable @NativeType("void *") ByteBuffer oldp, @Nullable @NativeType("size_t *") PointerBuffer oldlenp, @Nullable @NativeType("void *") ByteBuffer newp) { - if (CHECKS) { - checkSafe(oldlenp, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nje_mallctl(nameEncoded, memAddressSafe(oldp), memAddressSafe(oldlenp), memAddressSafe(newp), remainingSafe(newp)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ je_mallctlnametomib ] --- - - /** - * Unsafe version of: {@link #je_mallctlnametomib mallctlnametomib} - * - * @param miblenp the number of components in {@code mibp} - */ - public static int nje_mallctlnametomib(long name, long mibp, long miblenp) { - long __functionAddress = Functions.mallctlnametomib; - return invokePPPI(name, mibp, miblenp, __functionAddress); - } - - /** - * Provides a way to avoid repeated name lookups for applications that repeatedly query the same portion of the namespace, by translating a name to a - * “Management Information Base” (MIB) that can be passed repeatedly to {@link #je_mallctlbymib mallctlbymib}. Upon successful return from {@code mallctlnametomib()}, - * {@code mibp} contains an array of {@code *miblenp} integers, where {@code *miblenp} is the lesser of the number of components in name and the input - * value of {@code *miblenp}. Thus it is possible to pass a {@code *miblenp} that is smaller than the number of period-separated name components, which - * results in a partial MIB that can be used as the basis for constructing a complete MIB. For name components that are integers (e.g. the 2 in - * "arenas.bin.2.size"), the corresponding MIB component will always be that integer. Therefore, it is legitimate to construct code like the following: - * - *
    
    -     * unsigned nbins, i;
    -     * size_t mib[4];
    -     * size_t len, miblen;
    -     * 
    -     * len = sizeof(nbins);
    -     * mallctl("arenas.nbins", &nbins, &len, NULL, 0);
    -     * 
    -     * miblen = 4;
    -     * mallctlnametomib("arenas.bin.0.size", mib, &miblen);
    -     * for (i = 0; i < nbins; i++) {
    -     *     size_t bin_size;
    -     * 
    -     *     mib[2] = i;
    -     *     len = sizeof(bin_size);
    -     *     mallctlbymib(mib, miblen, &bin_size, &len, NULL, 0);
    -     *     // Do something with bin_size...
    -     * }
    - * - * @param name the namespace location - * @param mibp an array of integers - * @param miblenp the number of components in {@code mibp} - */ - public static int je_mallctlnametomib(@NativeType("char const *") ByteBuffer name, @NativeType("size_t *") PointerBuffer mibp, @NativeType("size_t *") PointerBuffer miblenp) { - if (CHECKS) { - checkNT1(name); - check(miblenp, 1); - check(mibp, miblenp.get(miblenp.position())); - } - return nje_mallctlnametomib(memAddress(name), memAddress(mibp), memAddress(miblenp)); - } - - /** - * Provides a way to avoid repeated name lookups for applications that repeatedly query the same portion of the namespace, by translating a name to a - * “Management Information Base” (MIB) that can be passed repeatedly to {@link #je_mallctlbymib mallctlbymib}. Upon successful return from {@code mallctlnametomib()}, - * {@code mibp} contains an array of {@code *miblenp} integers, where {@code *miblenp} is the lesser of the number of components in name and the input - * value of {@code *miblenp}. Thus it is possible to pass a {@code *miblenp} that is smaller than the number of period-separated name components, which - * results in a partial MIB that can be used as the basis for constructing a complete MIB. For name components that are integers (e.g. the 2 in - * "arenas.bin.2.size"), the corresponding MIB component will always be that integer. Therefore, it is legitimate to construct code like the following: - * - *
    
    -     * unsigned nbins, i;
    -     * size_t mib[4];
    -     * size_t len, miblen;
    -     * 
    -     * len = sizeof(nbins);
    -     * mallctl("arenas.nbins", &nbins, &len, NULL, 0);
    -     * 
    -     * miblen = 4;
    -     * mallctlnametomib("arenas.bin.0.size", mib, &miblen);
    -     * for (i = 0; i < nbins; i++) {
    -     *     size_t bin_size;
    -     * 
    -     *     mib[2] = i;
    -     *     len = sizeof(bin_size);
    -     *     mallctlbymib(mib, miblen, &bin_size, &len, NULL, 0);
    -     *     // Do something with bin_size...
    -     * }
    - * - * @param name the namespace location - * @param mibp an array of integers - * @param miblenp the number of components in {@code mibp} - */ - public static int je_mallctlnametomib(@NativeType("char const *") CharSequence name, @NativeType("size_t *") PointerBuffer mibp, @NativeType("size_t *") PointerBuffer miblenp) { - if (CHECKS) { - check(miblenp, 1); - check(mibp, miblenp.get(miblenp.position())); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nje_mallctlnametomib(nameEncoded, memAddress(mibp), memAddress(miblenp)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ je_mallctlbymib ] --- - - /** - * Unsafe version of: {@link #je_mallctlbymib mallctlbymib} - * - * @param miblen the number of elements in {@code mib} - * @param newlen the new value length - */ - public static int nje_mallctlbymib(long mib, long miblen, long oldp, long oldlenp, long newp, long newlen) { - long __functionAddress = Functions.mallctlbymib; - return invokePPPPPPI(mib, miblen, oldp, oldlenp, newp, newlen, __functionAddress); - } - - /** - * Similar to {@link #je_mallctl mallctl}, but uses MIBs instead of names. See {@link #je_mallctlnametomib mallctlnametomib} for details. - * - * @param mib a MIB - * @param oldp returns a value - * @param oldlenp returns the value length - * @param newp the new value - */ - public static int je_mallctlbymib(@NativeType("size_t const *") PointerBuffer mib, @Nullable @NativeType("void *") ByteBuffer oldp, @Nullable @NativeType("size_t *") PointerBuffer oldlenp, @Nullable @NativeType("void *") ByteBuffer newp) { - if (CHECKS) { - checkSafe(oldlenp, 1); - } - return nje_mallctlbymib(memAddress(mib), mib.remaining(), memAddressSafe(oldp), memAddressSafe(oldlenp), memAddressSafe(newp), remainingSafe(newp)); - } - - // --- [ je_malloc_stats_print ] --- - - /** Unsafe version of: {@link #je_malloc_stats_print malloc_stats_print} */ - public static void nje_malloc_stats_print(long write_cb, long cbopaque, long opts) { - long __functionAddress = Functions.malloc_stats_print; - invokePPPV(write_cb, cbopaque, opts, __functionAddress); - } - - /** - * Writes human-readable summary statistics via the {@code write_cb} callback function pointer and {@code cbopaque} data passed to {@code write_cb}, or - * {@code malloc_message()} if {@code write_cb} is {@code NULL}. This function can be called repeatedly. General information that never changes during execution - * can be omitted by specifying "g" as a character within the {@code opts} string. Note that {@code malloc_message()} uses the {@code mallctl*()} - * functions internally, so inconsistent statistics can be reported if multiple threads use these functions simultaneously. If {@code --enable-stats} is - * specified during configuration, “m” and “a” can be specified to omit merged arena and per arena statistics, respectively; “b” and “l” can be specified to - * omit per size class statistics for bins and large objects, respectively. Unrecognized characters are silently ignored. Note that thread caching may - * prevent some statistics from being completely up to date, since extra locking would be required to merge counters that track thread cache operations. - * - * @param write_cb the print callback, or {@code NULL} to use {@code malloc_message()} - * @param cbopaque an opaque pointer that will be passed to {@code write_cb} - * @param opts an options string - */ - public static void je_malloc_stats_print(@Nullable @NativeType("void (*) (void *, char const *)") MallocMessageCallbackI write_cb, @NativeType("void *") long cbopaque, @Nullable @NativeType("char const *") ByteBuffer opts) { - if (CHECKS) { - checkNT1Safe(opts); - } - nje_malloc_stats_print(memAddressSafe(write_cb), cbopaque, memAddressSafe(opts)); - } - - /** - * Writes human-readable summary statistics via the {@code write_cb} callback function pointer and {@code cbopaque} data passed to {@code write_cb}, or - * {@code malloc_message()} if {@code write_cb} is {@code NULL}. This function can be called repeatedly. General information that never changes during execution - * can be omitted by specifying "g" as a character within the {@code opts} string. Note that {@code malloc_message()} uses the {@code mallctl*()} - * functions internally, so inconsistent statistics can be reported if multiple threads use these functions simultaneously. If {@code --enable-stats} is - * specified during configuration, “m” and “a” can be specified to omit merged arena and per arena statistics, respectively; “b” and “l” can be specified to - * omit per size class statistics for bins and large objects, respectively. Unrecognized characters are silently ignored. Note that thread caching may - * prevent some statistics from being completely up to date, since extra locking would be required to merge counters that track thread cache operations. - * - * @param write_cb the print callback, or {@code NULL} to use {@code malloc_message()} - * @param cbopaque an opaque pointer that will be passed to {@code write_cb} - * @param opts an options string - */ - public static void je_malloc_stats_print(@Nullable @NativeType("void (*) (void *, char const *)") MallocMessageCallbackI write_cb, @NativeType("void *") long cbopaque, @Nullable @NativeType("char const *") CharSequence opts) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCIISafe(opts, true); - long optsEncoded = opts == null ? NULL : stack.getPointerAddress(); - nje_malloc_stats_print(memAddressSafe(write_cb), cbopaque, optsEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ je_malloc_usable_size ] --- - - /** Unsafe version of: {@link #je_malloc_usable_size malloc_usable_size} */ - public static long nje_malloc_usable_size(long ptr) { - long __functionAddress = Functions.malloc_usable_size; - return invokePP(ptr, __functionAddress); - } - - /** - * Returns the usable size of the allocation pointed to by {@code ptr}. The return value may be larger than the size that was requested during allocation. - * The {@code malloc_usable_size()} function is not a mechanism for in-place {@link #je_realloc realloc}; rather it is provided solely as a tool for introspection - * purposes. Any discrepancy between the requested allocation size and the size reported by {@code malloc_usable_size()} should not be depended on, since - * such behavior is entirely implementation-dependent. - * - * @param ptr the allocated memory to query - */ - @NativeType("size_t") - public static long je_malloc_usable_size(@NativeType("void const *") ByteBuffer ptr) { - return nje_malloc_usable_size(memAddress(ptr)); - } - - /** - * Align the memory allocation to start at an address that is a multiple of {@code (1 << la)}. This macro does not validate that {@code la} is within the - * valid range. - * - * @param la the alignment shift - */ - public static int MALLOCX_LG_ALIGN(int la) { - return la; - } - - /** - * Align the memory allocation to start at an address that is a multiple of {@code a}, where {@code a} is a power of two. This macro does not validate - * that {@code a} is a power of 2. - * - * @param a the alignment - */ - public static int MALLOCX_ALIGN(int a) { - return Integer.numberOfTrailingZeros(a); - } - - /** - * Use the thread-specific cache (tcache) specified by the identifier {@code tc}, which must have been acquired via the {@code tcache.create} mallctl. - * This macro does not validate that {@code tc} specifies a valid identifier. - * - * @param tc the thread-specific cache - */ - public static int MALLOCX_TCACHE(int tc) { - return (tc + 2) << 8; - } - - /** - * Use the arena specified by the index {@code a} (and by necessity bypass the thread cache). This macro has no effect for huge regions, nor for regions - * that were allocated via an arena other than the one specified. This macro does not validate that {@code a} specifies an arena index in the valid range. - * - * @param a the arena index - */ - public static int MALLOCX_ARENA(int a) { - return (a + 1) << 20; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/JEmallocAllocator.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/JEmallocAllocator.java deleted file mode 100644 index 83efa997..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/JEmallocAllocator.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.MemoryUtil.*; - -import static org.lwjgl.system.jemalloc.JEmalloc.*; - -/** A {@link MemoryAllocator} implementation using the jemalloc library. */ -public class JEmallocAllocator implements MemoryAllocator { - - static { - // initialize jemalloc - JEmalloc.getLibrary(); - } - - @Override - public long getMalloc() { return Functions.malloc; } - - @Override - public long getCalloc() { return Functions.calloc; } - - @Override - public long getRealloc() { return Functions.realloc; } - - @Override - public long getFree() { return Functions.free; } - - @Override - public long getAlignedAlloc() { return Functions.aligned_alloc; } - - @Override - public long getAlignedFree() { return Functions.free; } - - @Override - public long malloc(long size) { - return nje_malloc(size); - } - - @Override - public long calloc(long num, long size) { - return nje_calloc(num, size); - } - - @Override - public long realloc(long ptr, long size) { - return nje_realloc(ptr, size); - } - - @Override - public void free(long ptr) { - nje_free(ptr); - } - - @Override - public long aligned_alloc(long alignment, long size) { - return nje_aligned_alloc(alignment, size); - } - - @Override - public void aligned_free(long ptr) { - nje_free(ptr); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/MallocMessageCallback.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/MallocMessageCallback.java deleted file mode 100644 index 4539db4e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/MallocMessageCallback.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be passed to the {@link JEmalloc#je_malloc_usable_size malloc_usable_size} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *cbopaque,
    - *     char const *s
    - * )
    - */ -public abstract class MallocMessageCallback extends Callback implements MallocMessageCallbackI { - - /** - * Creates a {@code MallocMessageCallback} instance from the specified function pointer. - * - * @return the new {@code MallocMessageCallback} - */ - public static MallocMessageCallback create(long functionPointer) { - MallocMessageCallbackI instance = Callback.get(functionPointer); - return instance instanceof MallocMessageCallback - ? (MallocMessageCallback)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static MallocMessageCallback createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code MallocMessageCallback} instance that delegates to the specified {@code MallocMessageCallbackI} instance. */ - public static MallocMessageCallback create(MallocMessageCallbackI instance) { - return instance instanceof MallocMessageCallback - ? (MallocMessageCallback)instance - : new Container(instance.address(), instance); - } - - protected MallocMessageCallback() { - super(CIF); - } - - MallocMessageCallback(long functionPointer) { - super(functionPointer); - } - - /** - * Converts the specified {@link MallocMessageCallback} arguments to a String. - * - *

    This method may only be used inside a MallocMessageCallback invocation.

    - * - * @param s the MallocMessageCallback {@code s} argument - * - * @return the message as a String - */ - public static String getMessage(long s) { - return memASCII(s); - } - - private static final class Container extends MallocMessageCallback { - - private final MallocMessageCallbackI delegate; - - Container(long functionPointer, MallocMessageCallbackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long cbopaque, long s) { - delegate.invoke(cbopaque, s); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/MallocMessageCallbackI.java b/LWJGL/src/main/java/org/lwjgl/system/jemalloc/MallocMessageCallbackI.java deleted file mode 100644 index c7cf1aa8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jemalloc/MallocMessageCallbackI.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jemalloc; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link JEmalloc#je_malloc_usable_size malloc_usable_size} method. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *cbopaque,
    - *     char const *s
    - * )
    - */ -@FunctionalInterface -@NativeType("void (*) (void *, char const *)") -public interface MallocMessageCallbackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** - * Will be called by the {@link JEmalloc#je_malloc_usable_size malloc_usable_size} method. - * - * @param cbopaque the opaque pointer passed to {@link JEmalloc#je_malloc_usable_size malloc_usable_size} - * @param s the message - */ - void invoke(@NativeType("void *") long cbopaque, @NativeType("char const *") long s); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jni/JNINativeInterface.java b/LWJGL/src/main/java/org/lwjgl/system/jni/JNINativeInterface.java deleted file mode 100644 index d431387f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jni/JNINativeInterface.java +++ /dev/null @@ -1,1141 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jni; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -import java.lang.reflect.*; - -/** - * Bindings to the Java Native Interface (JNI). - * - *

    The JNI is a native programming interface. It allows Java code that runs inside a Java Virtual Machine (VM) to interoperate with applications and - * libraries written in other programming languages, such as C, C++, and assembly.

    - * - *

    The most important benefit of the JNI is that it imposes no restrictions on the implementation of the underlying Java VM. Therefore, Java VM vendors - * can add support for the JNI without affecting other parts of the VM. Programmers can write one version of a native application or library and expect it - * to work with all Java VMs supporting the JNI.

    - * - *

    LWJGL: Only functions that can reasonably be called from Java are exposed.

    - */ -public class JNINativeInterface { - - static { Library.initialize(); } - - /** JNI versions. */ - public static final int - JNI_VERSION_1_1 = 0x10001, - JNI_VERSION_1_2 = 0x10002, - JNI_VERSION_1_4 = 0x10004, - JNI_VERSION_1_6 = 0x10006, - JNI_VERSION_1_8 = 0x10008, - JNI_VERSION_9 = 0x90000, - JNI_VERSION_10 = 0xA0000, - JNI_VERSION_19 = 0x130000, - JNI_VERSION_20 = 0x140000, - JNI_VERSION_21 = 0x150000; - - /** - * {@code jobjectRefType}: Return values from {@link #GetObjectRefType}. - * - *
    Enum values:
    - * - *
      - *
    • {@link #JNIInvalidRefType JNIInvalidRefType}
    • - *
    • {@link #JNILocalRefType JNILocalRefType}
    • - *
    • {@link #JNIGlobalRefType JNIGlobalRefType}
    • - *
    • {@link #JNIWeakGlobalRefType JNIWeakGlobalRefType}
    • - *
    - */ - public static final int - JNIInvalidRefType = 0, - JNILocalRefType = 1, - JNIGlobalRefType = 2, - JNIWeakGlobalRefType = 3; - - /** jboolean constants. */ - public static final int - JNI_FALSE = 0, - JNI_TRUE = 1; - - /** - * Possible return values for JNI functions. - * - *
    Enum values:
    - * - *
      - *
    • {@link #JNI_OK OK} - success
    • - *
    • {@link #JNI_ERR ERR} - unknown error
    • - *
    • {@link #JNI_EDETACHED EDETACHED} - thread detached from the VM
    • - *
    • {@link #JNI_EVERSION EVERSION} - JNI version error
    • - *
    • {@link #JNI_ENOMEM ENOMEM} - not enough memory
    • - *
    • {@link #JNI_EEXIST EEXIST} - VM already created
    • - *
    • {@link #JNI_EINVAL EINVAL} - invalid arguments
    • - *
    - */ - public static final int - JNI_OK = 0, - JNI_ERR = (-1), - JNI_EDETACHED = (-2), - JNI_EVERSION = (-3), - JNI_ENOMEM = (-4), - JNI_EEXIST = (-5), - JNI_EINVAL = (-6); - - /** Used in {@code ReleaseScalarArrayElements}. */ - public static final int - JNI_COMMIT = 1, - JNI_ABORT = 2; - - protected JNINativeInterface() { - throw new UnsupportedOperationException(); - } - - // --- [ GetVersion ] --- - - /** - * Returns the version of the native method interface. - * - * @return the major version number in the higher 16 bits and the minor version number in the lower 16 bits - */ - @NativeType("jint") - public static native int GetVersion(); - - // --- [ FromReflectedMethod ] --- - - /** Converts a {@link Method} or {@link Constructor} object to a method ID. */ - @NativeType("jmethodID") - public static native long FromReflectedMethod(@NativeType("jobject") Method method); - - // --- [ FromReflectedField ] --- - - /** Converts a {@link Field} to a field ID. */ - @NativeType("jfieldID") - public static native long FromReflectedField(@NativeType("jobject") Field field); - - // --- [ ToReflectedMethod ] --- - - /** Unsafe version of: {@link #ToReflectedMethod} */ - @Nullable - public static native Method nToReflectedMethod(Class cls, long methodID, boolean isStatic); - - /** - * Converts a method ID derived from {@code cls} to a {@link Method} or {@link Constructor} object. - * - * @param isStatic must be set to {@link #JNI_TRUE TRUE} if the method ID refers to a static field, and # FALSE otherwise - */ - @Nullable - @NativeType("jobject") - public static Method ToReflectedMethod(@NativeType("jclass") Class cls, @NativeType("jmethodID") long methodID, @NativeType("jboolean") boolean isStatic) { - if (CHECKS) { - check(methodID); - } - return nToReflectedMethod(cls, methodID, isStatic); - } - - // --- [ ToReflectedField ] --- - - /** Unsafe version of: {@link #ToReflectedField} */ - @Nullable - public static native Field nToReflectedField(Class cls, long fieldID, boolean isStatic); - - /** - * Converts a field ID derived from {@code cls} to a {@link Field} object. - * - * @param isStatic must be set to {@link #JNI_TRUE TRUE} if {@code fieldID} refers to a static field, and {@link #JNI_FALSE FALSE} otherwise - */ - @Nullable - @NativeType("jobject") - public static Field ToReflectedField(@NativeType("jclass") Class cls, @NativeType("jfieldID") long fieldID, @NativeType("jboolean") boolean isStatic) { - if (CHECKS) { - check(fieldID); - } - return nToReflectedField(cls, fieldID, isStatic); - } - - // --- [ NewGlobalRef ] --- - - /** - * Creates a new global reference to the object referred to by the {@code obj} argument. The {@code obj} argument may be a global or local reference. - * Global references must be explicitly disposed of by calling {@link #DeleteGlobalRef}. - * - * @param obj a global or local reference - * - * @return a global reference, or {@code NULL} if the system runs out of memory - */ - @NativeType("void *") - public static native long NewGlobalRef(@NativeType("jobject") Object obj); - - // --- [ DeleteGlobalRef ] --- - - /** Unsafe version of: {@link #DeleteGlobalRef} */ - public static native void nDeleteGlobalRef(long globalRef); - - /** - * Deletes the global reference pointed to by {@code globalRef}. - * - * @param globalRef a global reference - */ - public static void DeleteGlobalRef(@NativeType("void *") long globalRef) { - if (CHECKS) { - check(globalRef); - } - nDeleteGlobalRef(globalRef); - } - - // --- [ GetBooleanArrayElements ] --- - - /** Unsafe version of: {@link #GetBooleanArrayElements} */ - public static native long nGetBooleanArrayElements(byte[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseBooleanArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseBooleanArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jboolean *") - public static ByteBuffer GetBooleanArrayElements(@NativeType("jbooleanArray") byte[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetBooleanArrayElements(array, memAddressSafe(isCopy)); - return memByteBufferSafe(__result, array.length); - } - - // --- [ ReleaseBooleanArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseBooleanArrayElements} */ - public static native void nReleaseBooleanArrayElements(byte[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetBooleanArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseBooleanArrayElements(@NativeType("jbooleanArray") byte[] array, @NativeType("jboolean *") ByteBuffer elems, @NativeType("jint") int mode) { - nReleaseBooleanArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetByteArrayElements ] --- - - /** Unsafe version of: {@link #GetByteArrayElements} */ - public static native long nGetByteArrayElements(byte[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseByteArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseByteArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jbyte *") - public static ByteBuffer GetByteArrayElements(@NativeType("jbyteArray") byte[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetByteArrayElements(array, memAddressSafe(isCopy)); - return memByteBufferSafe(__result, array.length); - } - - // --- [ ReleaseByteArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseByteArrayElements} */ - public static native void nReleaseByteArrayElements(byte[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetByteArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseByteArrayElements(@NativeType("jbyteArray") byte[] array, @NativeType("jbyte *") ByteBuffer elems, @NativeType("jint") int mode) { - nReleaseByteArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetCharArrayElements ] --- - - /** Unsafe version of: {@link #GetCharArrayElements} */ - public static native long nGetCharArrayElements(char[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseCharArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseCharArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jchar *") - public static ShortBuffer GetCharArrayElements(@NativeType("jcharArray") char[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetCharArrayElements(array, memAddressSafe(isCopy)); - return memShortBufferSafe(__result, array.length); - } - - // --- [ ReleaseCharArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseCharArrayElements} */ - public static native void nReleaseCharArrayElements(char[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetCharArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseCharArrayElements(@NativeType("jcharArray") char[] array, @NativeType("jchar *") ShortBuffer elems, @NativeType("jint") int mode) { - nReleaseCharArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetShortArrayElements ] --- - - /** Unsafe version of: {@link #GetShortArrayElements} */ - public static native long nGetShortArrayElements(short[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseShortArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseShortArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jshort *") - public static ShortBuffer GetShortArrayElements(@NativeType("jshortArray") short[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetShortArrayElements(array, memAddressSafe(isCopy)); - return memShortBufferSafe(__result, array.length); - } - - // --- [ ReleaseShortArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseShortArrayElements} */ - public static native void nReleaseShortArrayElements(short[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetShortArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseShortArrayElements(@NativeType("jshortArray") short[] array, @NativeType("jshort *") ShortBuffer elems, @NativeType("jint") int mode) { - nReleaseShortArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetIntArrayElements ] --- - - /** Unsafe version of: {@link #GetIntArrayElements} */ - public static native long nGetIntArrayElements(int[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseIntArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseIntArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jint *") - public static IntBuffer GetIntArrayElements(@NativeType("jintArray") int[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetIntArrayElements(array, memAddressSafe(isCopy)); - return memIntBufferSafe(__result, array.length); - } - - // --- [ ReleaseIntArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseIntArrayElements} */ - public static native void nReleaseIntArrayElements(int[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetIntArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseIntArrayElements(@NativeType("jintArray") int[] array, @NativeType("jint *") IntBuffer elems, @NativeType("jint") int mode) { - nReleaseIntArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetLongArrayElements ] --- - - /** Unsafe version of: {@link #GetLongArrayElements} */ - public static native long nGetLongArrayElements(long[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseLongArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseLongArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jlong *") - public static LongBuffer GetLongArrayElements(@NativeType("jlongArray") long[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetLongArrayElements(array, memAddressSafe(isCopy)); - return memLongBufferSafe(__result, array.length); - } - - // --- [ ReleaseLongArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseLongArrayElements} */ - public static native void nReleaseLongArrayElements(long[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetLongArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseLongArrayElements(@NativeType("jlongArray") long[] array, @NativeType("jlong *") LongBuffer elems, @NativeType("jint") int mode) { - nReleaseLongArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetFloatArrayElements ] --- - - /** Unsafe version of: {@link #GetFloatArrayElements} */ - public static native long nGetFloatArrayElements(float[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseFloatArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseFloatArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jfloat *") - public static FloatBuffer GetFloatArrayElements(@NativeType("jfloatArray") float[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetFloatArrayElements(array, memAddressSafe(isCopy)); - return memFloatBufferSafe(__result, array.length); - } - - // --- [ ReleaseFloatArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseFloatArrayElements} */ - public static native void nReleaseFloatArrayElements(float[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetFloatArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseFloatArrayElements(@NativeType("jfloatArray") float[] array, @NativeType("jfloat *") FloatBuffer elems, @NativeType("jint") int mode) { - nReleaseFloatArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetDoubleArrayElements ] --- - - /** Unsafe version of: {@link #GetDoubleArrayElements} */ - public static native long nGetDoubleArrayElements(double[] array, long isCopy); - - /** - * Returns the body of the primitive array. The result is valid until the {@link #ReleaseDoubleArrayElements} function is called. Since the returned array - * may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until - * {@link #ReleaseDoubleArrayElements} is called. - * - *

    If {@code isCopy} is not {@code NULL}, then {@code *isCopy} is set to {@link #JNI_TRUE TRUE} if a copy is made; or it is set to {@link #JNI_FALSE FALSE} if no copy is made.

    - * - * @param array the primitive array - * @param isCopy a pointer to a boolean - * - * @return a pointer to the array elements, or {@code NULL} if the operation fails - */ - @Nullable - @NativeType("jdouble *") - public static DoubleBuffer GetDoubleArrayElements(@NativeType("jdoubleArray") double[] array, @Nullable @NativeType("jboolean *") ByteBuffer isCopy) { - if (CHECKS) { - checkSafe(isCopy, 1); - } - long __result = nGetDoubleArrayElements(array, memAddressSafe(isCopy)); - return memDoubleBufferSafe(__result, array.length); - } - - // --- [ ReleaseDoubleArrayElements ] --- - - /** Unsafe version of: {@link #ReleaseDoubleArrayElements} */ - public static native void nReleaseDoubleArrayElements(double[] array, long elems, int mode); - - /** - * Informs the VM that the native code no longer needs access to {@code elems}. The {@code elems} argument is a pointer derived from array using the - * {@link #GetDoubleArrayElements} function. If necessary, this function copies back all changes made to elems to the original array. - * - *

    The {@code mode} argument provides information on how the array buffer should be released. {@code mode} has no effect if {@code elems} is not a - * copy of the elements in array. Otherwise, mode has the following impact, as shown in the following table:

    - * - * - * - * - * - * - *
    modeactions
    0copy back the content and free the elems buffer
    {@link #JNI_COMMIT COMMIT}copy back the content but do not free the elems buffer
    {@link #JNI_ABORT ABORT}free the buffer without copying back the possible changes
    - * - *

    In most cases, programmers pass “0” to the mode argument to ensure consistent behavior for both pinned and copied arrays. The other options give - * the programmer more control over memory management and should be used with extreme care.

    - * - * @param array a Java array object - * @param elems a pointer to array elements - * @param mode the release mode. One of:
    0{@link #JNI_COMMIT COMMIT}{@link #JNI_ABORT ABORT}
    - */ - public static void ReleaseDoubleArrayElements(@NativeType("jdoubleArray") double[] array, @NativeType("jdouble *") DoubleBuffer elems, @NativeType("jint") int mode) { - nReleaseDoubleArrayElements(array, memAddress(elems), mode); - } - - // --- [ GetBooleanArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetBooleanArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetBooleanArrayRegion(byte[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetBooleanArrayRegion(@NativeType("jbooleanArray") byte[] array, @NativeType("jsize") int start, @NativeType("jboolean *") ByteBuffer buf) { - nGetBooleanArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetBooleanArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetBooleanArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetBooleanArrayRegion(byte[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetBooleanArrayRegion(@NativeType("jbooleanArray") byte[] array, @NativeType("jsize") int start, @NativeType("jboolean const *") ByteBuffer buf) { - nSetBooleanArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ GetByteArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetByteArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetByteArrayRegion(byte[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetByteArrayRegion(@NativeType("jbyteArray") byte[] array, @NativeType("jsize") int start, @NativeType("jbyte *") ByteBuffer buf) { - nGetByteArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetByteArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetByteArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetByteArrayRegion(byte[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetByteArrayRegion(@NativeType("jbyteArray") byte[] array, @NativeType("jsize") int start, @NativeType("jbyte const *") ByteBuffer buf) { - nSetByteArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ GetCharArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetCharArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetCharArrayRegion(char[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetCharArrayRegion(@NativeType("jcharArray") char[] array, @NativeType("jsize") int start, @NativeType("jchar *") ShortBuffer buf) { - nGetCharArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetCharArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetCharArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetCharArrayRegion(char[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetCharArrayRegion(@NativeType("jcharArray") char[] array, @NativeType("jsize") int start, @NativeType("jchar const *") ShortBuffer buf) { - nSetCharArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ GetShortArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetShortArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetShortArrayRegion(short[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetShortArrayRegion(@NativeType("jshortArray") short[] array, @NativeType("jsize") int start, @NativeType("jshort *") ShortBuffer buf) { - nGetShortArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetShortArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetShortArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetShortArrayRegion(short[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetShortArrayRegion(@NativeType("jshortArray") short[] array, @NativeType("jsize") int start, @NativeType("jshort const *") ShortBuffer buf) { - nSetShortArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ GetIntArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetIntArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetIntArrayRegion(int[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetIntArrayRegion(@NativeType("jintArray") int[] array, @NativeType("jsize") int start, @NativeType("jint *") IntBuffer buf) { - nGetIntArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetIntArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetIntArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetIntArrayRegion(int[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetIntArrayRegion(@NativeType("jintArray") int[] array, @NativeType("jsize") int start, @NativeType("jint const *") IntBuffer buf) { - nSetIntArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ GetLongArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetLongArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetLongArrayRegion(long[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetLongArrayRegion(@NativeType("jlongArray") long[] array, @NativeType("jsize") int start, @NativeType("jlong *") LongBuffer buf) { - nGetLongArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetLongArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetLongArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetLongArrayRegion(long[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetLongArrayRegion(@NativeType("jlongArray") long[] array, @NativeType("jsize") int start, @NativeType("jlong const *") LongBuffer buf) { - nSetLongArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ GetFloatArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetFloatArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetFloatArrayRegion(float[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetFloatArrayRegion(@NativeType("jfloatArray") float[] array, @NativeType("jsize") int start, @NativeType("jfloat *") FloatBuffer buf) { - nGetFloatArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetFloatArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetFloatArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetFloatArrayRegion(float[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetFloatArrayRegion(@NativeType("jfloatArray") float[] array, @NativeType("jsize") int start, @NativeType("jfloat const *") FloatBuffer buf) { - nSetFloatArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ GetDoubleArrayRegion ] --- - - /** - * Unsafe version of: {@link #GetDoubleArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nGetDoubleArrayRegion(double[] array, int start, int len, long buf); - - /** - * Copies a region of a primitive array into a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the destination buffer - */ - public static void GetDoubleArrayRegion(@NativeType("jdoubleArray") double[] array, @NativeType("jsize") int start, @NativeType("jdouble *") DoubleBuffer buf) { - nGetDoubleArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ SetDoubleArrayRegion ] --- - - /** - * Unsafe version of: {@link #SetDoubleArrayRegion} - * - * @param len the number of elements to be copied - */ - public static native void nSetDoubleArrayRegion(double[] array, int start, int len, long buf); - - /** - * Copies back a region of a primitive array from a buffer. - * - * @param array a Java array - * @param start the starting index - * @param buf the source buffer - */ - public static void SetDoubleArrayRegion(@NativeType("jdoubleArray") double[] array, @NativeType("jsize") int start, @NativeType("jdouble const *") DoubleBuffer buf) { - nSetDoubleArrayRegion(array, start, buf.remaining(), memAddress(buf)); - } - - // --- [ RegisterNatives ] --- - - /** - * Unsafe version of: {@link #RegisterNatives} - * - * @param nMethods the number of native methods in the class - */ - public static native int nRegisterNatives(Class targetClass, long methods, int nMethods); - - /** - * Registers native methods with the class specified by the {@code targetClass} argument. The methods parameter specifies an array of JNINativeMethod - * structures that contain the names, signatures, and function pointers of the native methods. The name and signature fields of the {@link JNINativeMethod} - * structure are pointers to modified UTF-8 strings. The {@code nMethods} parameter specifies the number of native methods in the array. - * - * @param methods the native methods in the class - * - * @return “0” on success; returns a negative value on failure - */ - @NativeType("jint") - public static int RegisterNatives(@NativeType("jclass") Class targetClass, @NativeType("JNINativeMethod const *") JNINativeMethod.Buffer methods) { - if (CHECKS) { - Struct.validate(methods.address(), methods.remaining(), JNINativeMethod.SIZEOF, JNINativeMethod::validate); - } - return nRegisterNatives(targetClass, methods.address(), methods.remaining()); - } - - // --- [ UnregisterNatives ] --- - - /** - * Unregisters native methods of a class. The class goes back to the state before it was linked or registered with its native method functions. - * - *

    This function should not be used in normal native code. Instead, it provides special programs a way to reload and relink native libraries.

    - * - * @param targetClass a Java class object - * - * @return “0” on success; returns a negative value on failure - */ - @NativeType("jint") - public static native int UnregisterNatives(@NativeType("jclass") Class targetClass); - - // --- [ GetJavaVM ] --- - - /** Unsafe version of: {@link #GetJavaVM} */ - public static native int nGetJavaVM(long vm); - - /** - * Returns the Java VM interface (used in the Invocation API) associated with the current thread. The result is placed at the location pointed to by the - * second argument, {@code vm}. - * - * @param vm a pointer to where the result should be placed - */ - @NativeType("jint") - public static int GetJavaVM(@NativeType("JavaVM **") PointerBuffer vm) { - if (CHECKS) { - check(vm, 1); - } - return nGetJavaVM(memAddress(vm)); - } - - // --- [ GetStringRegion ] --- - - /** Unsafe version of: {@link #GetStringRegion} */ - public static native void nGetStringRegion(String str, int start, int len, long buf); - - /** Copies {@code len} number of Unicode characters beginning at offset {@code start} to the given buffer {@code buf}. */ - public static void GetStringRegion(@NativeType("jstring") String str, @NativeType("jsize") int start, @NativeType("jchar *") ByteBuffer buf) { - nGetStringRegion(str, start, buf.remaining() >> 1, memAddress(buf)); - } - - // --- [ GetStringUTFRegion ] --- - - /** Unsafe version of: {@link #GetStringUTFRegion} */ - public static native void nGetStringUTFRegion(String str, int start, int len, long buf); - - /** - * Translates {@code len} number of Unicode characters beginning at offset start into modified UTF-8 encoding and place the result in the given buffer - * {@code buf}. - */ - public static void GetStringUTFRegion(@NativeType("jstring") String str, @NativeType("jsize") int start, @NativeType("jsize") int len, @NativeType("char *") ByteBuffer buf) { - if (CHECKS) { - check(buf, len); - } - nGetStringUTFRegion(str, start, len, memAddress(buf)); - } - - // --- [ NewWeakGlobalRef ] --- - - /** - * Creates a new weak global reference. Returns {@code NULL} if {@code obj} refers to null, or if the VM runs out of memory. If the VM runs out of memory, an - * {@code OutOfMemoryError} will be thrown. - */ - @NativeType("void *") - public static native long NewWeakGlobalRef(@NativeType("jobject") Object obj); - - // --- [ DeleteWeakGlobalRef ] --- - - /** Unsafe version of: {@link #DeleteWeakGlobalRef} */ - public static native void nDeleteWeakGlobalRef(long weakGlobalRef); - - /** Delete the VM resources needed for the given weak global reference. */ - public static void DeleteWeakGlobalRef(@NativeType("void *") long weakGlobalRef) { - if (CHECKS) { - check(weakGlobalRef); - } - nDeleteWeakGlobalRef(weakGlobalRef); - } - - // --- [ NewDirectByteBuffer ] --- - - /** Unsafe version of: {@link #NewDirectByteBuffer} */ - @Nullable - public static native ByteBuffer nNewDirectByteBuffer(long address, long capacity); - - /** - * Allocates and returns a direct {@code java.nio.ByteBuffer} referring to the block of memory starting at the memory address address and extending - * capacity bytes. - * - *

    Native code that calls this function and returns the resulting byte-buffer object to Java-level code should ensure that the buffer refers to a valid - * region of memory that is accessible for reading and, if appropriate, writing. An attempt to access an invalid memory location from Java code will - * either return an arbitrary value, have no visible effect, or cause an unspecified exception to be thrown.

    - * - * @param address the starting address of the memory region (must not be {@code NULL}) - * @param capacity the size in bytes of the memory region (must be positive) - * - * @return a local reference to the newly-instantiated {@code java.nio.ByteBuffer} object. Returns {@code NULL} if an exception occurs, or if JNI access to direct - * buffers is not supported by this virtual machine. - */ - @Nullable - @NativeType("jobject") - public static ByteBuffer NewDirectByteBuffer(@NativeType("void *") long address, @NativeType("jlong") long capacity) { - if (CHECKS) { - check(address); - } - return nNewDirectByteBuffer(address, capacity); - } - - // --- [ GetDirectBufferAddress ] --- - - /** - * Fetches and returns the starting address of the memory region referenced by the given direct {@code java.nio.Buffer}. - * - *

    This function allows native code to access the same memory region that is accessible to Java code via the buffer object.

    - * - * @param buf a direct {@code java.nio.Buffer} object (must not be {@code NULL}) - * - * @return the starting address of the memory region referenced by the buffer. Returns {@code NULL} if the memory region is undefined, if the given object is not a - * direct {@code java.nio.Buffer}, or if JNI access to direct buffers is not supported by this virtual machine. - */ - @NativeType("void *") - public static native long GetDirectBufferAddress(@NativeType("jobject") Buffer buf); - - // --- [ GetObjectRefType ] --- - - /** - * Returns the type of the object referred to by the {@code obj} argument. The argument {@code obj} can either be a local, global or weak global - * reference. - * - * @param obj a local, global or weak global reference - */ - @NativeType("jobjectRefType") - public static native int GetObjectRefType(@NativeType("jobject") Object obj); - - // --- [ noop ] --- - - /** No-op JNI function for benchmarking. */ - public static native void noop(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/jni/JNINativeMethod.java b/LWJGL/src/main/java/org/lwjgl/system/jni/JNINativeMethod.java deleted file mode 100644 index 8a572aaf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/jni/JNINativeMethod.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.jni; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct JNINativeMethod {
    - *     char * name;
    - *     char * signature;
    - *     void * fnPtr;
    - * }
    - */ -public class JNINativeMethod extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NAME, - SIGNATURE, - FNPTR; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NAME = layout.offsetof(0); - SIGNATURE = layout.offsetof(1); - FNPTR = layout.offsetof(2); - } - - protected JNINativeMethod(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected JNINativeMethod create(long address, @Nullable ByteBuffer container) { - return new JNINativeMethod(address, container); - } - - /** - * Creates a {@code JNINativeMethod} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public JNINativeMethod(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code name} field. */ - @NativeType("char *") - public ByteBuffer name() { return nname(address()); } - /** @return the null-terminated string pointed to by the {@code name} field. */ - @NativeType("char *") - public String nameString() { return nnameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code signature} field. */ - @NativeType("char *") - public ByteBuffer signature() { return nsignature(address()); } - /** @return the null-terminated string pointed to by the {@code signature} field. */ - @NativeType("char *") - public String signatureString() { return nsignatureString(address()); } - /** @return the value of the {@code fnPtr} field. */ - @NativeType("void *") - public long fnPtr() { return nfnPtr(address()); } - - /** Sets the address of the specified encoded string to the {@code name} field. */ - public JNINativeMethod name(@NativeType("char *") ByteBuffer value) { nname(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code signature} field. */ - public JNINativeMethod signature(@NativeType("char *") ByteBuffer value) { nsignature(address(), value); return this; } - /** Sets the specified value to the {@code fnPtr} field. */ - public JNINativeMethod fnPtr(@NativeType("void *") long value) { nfnPtr(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public JNINativeMethod set( - ByteBuffer name, - ByteBuffer signature, - long fnPtr - ) { - name(name); - signature(signature); - fnPtr(fnPtr); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public JNINativeMethod set(JNINativeMethod src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code JNINativeMethod} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static JNINativeMethod malloc() { - return new JNINativeMethod(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code JNINativeMethod} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static JNINativeMethod calloc() { - return new JNINativeMethod(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code JNINativeMethod} instance allocated with {@link BufferUtils}. */ - public static JNINativeMethod create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new JNINativeMethod(memAddress(container), container); - } - - /** Returns a new {@code JNINativeMethod} instance for the specified memory address. */ - public static JNINativeMethod create(long address) { - return new JNINativeMethod(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static JNINativeMethod createSafe(long address) { - return address == NULL ? null : new JNINativeMethod(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static JNINativeMethod mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static JNINativeMethod callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static JNINativeMethod mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static JNINativeMethod callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code JNINativeMethod} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static JNINativeMethod malloc(MemoryStack stack) { - return new JNINativeMethod(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code JNINativeMethod} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static JNINativeMethod calloc(MemoryStack stack) { - return new JNINativeMethod(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #name}. */ - public static ByteBuffer nname(long struct) { return memByteBufferNT1(memGetAddress(struct + JNINativeMethod.NAME)); } - /** Unsafe version of {@link #nameString}. */ - public static String nnameString(long struct) { return memUTF8(memGetAddress(struct + JNINativeMethod.NAME)); } - /** Unsafe version of {@link #signature}. */ - public static ByteBuffer nsignature(long struct) { return memByteBufferNT1(memGetAddress(struct + JNINativeMethod.SIGNATURE)); } - /** Unsafe version of {@link #signatureString}. */ - public static String nsignatureString(long struct) { return memUTF8(memGetAddress(struct + JNINativeMethod.SIGNATURE)); } - /** Unsafe version of {@link #fnPtr}. */ - public static long nfnPtr(long struct) { return memGetAddress(struct + JNINativeMethod.FNPTR); } - - /** Unsafe version of {@link #name(ByteBuffer) name}. */ - public static void nname(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + JNINativeMethod.NAME, memAddress(value)); - } - /** Unsafe version of {@link #signature(ByteBuffer) signature}. */ - public static void nsignature(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + JNINativeMethod.SIGNATURE, memAddress(value)); - } - /** Unsafe version of {@link #fnPtr(long) fnPtr}. */ - public static void nfnPtr(long struct, long value) { memPutAddress(struct + JNINativeMethod.FNPTR, check(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + JNINativeMethod.NAME)); - check(memGetAddress(struct + JNINativeMethod.SIGNATURE)); - check(memGetAddress(struct + JNINativeMethod.FNPTR)); - } - - // ----------------------------------- - - /** An array of {@link JNINativeMethod} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final JNINativeMethod ELEMENT_FACTORY = JNINativeMethod.create(-1L); - - /** - * Creates a new {@code JNINativeMethod.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link JNINativeMethod#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected JNINativeMethod getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code name} field. */ - @NativeType("char *") - public ByteBuffer name() { return JNINativeMethod.nname(address()); } - /** @return the null-terminated string pointed to by the {@code name} field. */ - @NativeType("char *") - public String nameString() { return JNINativeMethod.nnameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code signature} field. */ - @NativeType("char *") - public ByteBuffer signature() { return JNINativeMethod.nsignature(address()); } - /** @return the null-terminated string pointed to by the {@code signature} field. */ - @NativeType("char *") - public String signatureString() { return JNINativeMethod.nsignatureString(address()); } - /** @return the value of the {@code fnPtr} field. */ - @NativeType("void *") - public long fnPtr() { return JNINativeMethod.nfnPtr(address()); } - - /** Sets the address of the specified encoded string to the {@code name} field. */ - public Buffer name(@NativeType("char *") ByteBuffer value) { JNINativeMethod.nname(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code signature} field. */ - public Buffer signature(@NativeType("char *") ByteBuffer value) { JNINativeMethod.nsignature(address(), value); return this; } - /** Sets the specified value to the {@code fnPtr} field. */ - public Buffer fnPtr(@NativeType("void *") long value) { JNINativeMethod.nfnPtr(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCErrno.java b/LWJGL/src/main/java/org/lwjgl/system/libc/LibCErrno.java deleted file mode 100644 index 46e1b229..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCErrno.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libc; - -import org.lwjgl.system.*; - -/** Native bindings to errno.h. */ -public class LibCErrno { - - static { Library.initialize(); } - - /** - * Standard error codes. - * - *
    Enum values:
    - * - *
      - *
    • {@link #EPERM EPERM} - Operation not permitted
    • - *
    • {@link #ENOENT ENOENT} - No such file or directory
    • - *
    • {@link #ESRCH ESRCH} - No such process
    • - *
    • {@link #EINTR EINTR} - Interrupted function
    • - *
    • {@link #EIO EIO} - I/O error
    • - *
    • {@link #ENXIO ENXIO} - No such device or address
    • - *
    • {@link #E2BIG E2BIG} - Argument list too long
    • - *
    • {@link #ENOEXEC ENOEXEC} - Exec format error
    • - *
    • {@link #EBADF EBADF} - Bad file number
    • - *
    • {@link #ECHILD ECHILD} - No spawned processes
    • - *
    • {@link #EAGAIN EAGAIN} - No more processes or not enough memory or maximum nesting level reached
    • - *
    • {@link #ENOMEM ENOMEM} - Not enough memory
    • - *
    • {@link #EACCES EACCES} - Permission denied
    • - *
    • {@link #EFAULT EFAULT} - Bad address
    • - *
    • {@link #EBUSY EBUSY} - Device or resource busy
    • - *
    • {@link #EEXIST EEXIST} - File exists
    • - *
    • {@link #EXDEV EXDEV} - Cross-device link
    • - *
    • {@link #ENODEV ENODEV} - No such device
    • - *
    • {@link #ENOTDIR ENOTDIR} - Not a directory
    • - *
    • {@link #EISDIR EISDIR} - Is a directory
    • - *
    • {@link #EINVAL EINVAL} - Invalid argument
    • - *
    • {@link #ENFILE ENFILE} - Too many files open in system
    • - *
    • {@link #EMFILE EMFILE} - Too many open files
    • - *
    • {@link #ENOTTY ENOTTY} - Inappropriate I/O control operation
    • - *
    • {@link #EFBIG EFBIG} - File too large
    • - *
    • {@link #ENOSPC ENOSPC} - No space left on device
    • - *
    • {@link #ESPIPE ESPIPE} - Invalid seek
    • - *
    • {@link #EROFS EROFS} - Read-only file system
    • - *
    • {@link #EMLINK EMLINK} - Too many links
    • - *
    • {@link #EPIPE EPIPE} - Broken pipe
    • - *
    • {@link #EDOM EDOM} - Math argument
    • - *
    • {@link #ERANGE ERANGE} - Result too large
    • - *
    • {@link #EDEADLK EDEADLK} - Resource deadlock would occur
    • - *
    • {@link #EDEADLOCK EDEADLOCK} - Same as EDEADLK for compatibility with older Microsoft C versions
    • - *
    • {@link #ENAMETOOLONG ENAMETOOLONG} - Filename too long
    • - *
    • {@link #ENOLCK ENOLCK} - No locks available
    • - *
    • {@link #ENOSYS ENOSYS} - Function not supported
    • - *
    • {@link #ENOTEMPTY ENOTEMPTY} - Directory not empty
    • - *
    • {@link #EILSEQ EILSEQ} - Illegal byte sequence
    • - *
    • {@link #STRUNCATE STRUNCATE} - String was truncated
    • - *
    - */ - public static final int - EPERM = 0x1, - ENOENT = 0x2, - ESRCH = 0x3, - EINTR = 0x4, - EIO = 0x5, - ENXIO = 0x6, - E2BIG = 0x7, - ENOEXEC = 0x8, - EBADF = 0x9, - ECHILD = 0xA, - EAGAIN = 0xB, - ENOMEM = 0xC, - EACCES = 0xD, - EFAULT = 0xE, - EBUSY = 0x10, - EEXIST = 0x11, - EXDEV = 0x12, - ENODEV = 0x13, - ENOTDIR = 0x14, - EISDIR = 0x15, - EINVAL = 0x16, - ENFILE = 0x17, - EMFILE = 0x18, - ENOTTY = 0x19, - EFBIG = 0x1B, - ENOSPC = 0x1C, - ESPIPE = 0x1D, - EROFS = 0x1E, - EMLINK = 0x1F, - EPIPE = 0x20, - EDOM = 0x21, - ERANGE = 0x22, - EDEADLK = 0x24, - EDEADLOCK = 0x24, - ENAMETOOLONG = 0x26, - ENOLCK = 0x27, - ENOSYS = 0x28, - ENOTEMPTY = 0x29, - EILSEQ = 0x2A, - STRUNCATE = 0x50; - - protected LibCErrno() { - throw new UnsupportedOperationException(); - } - - // --- [ errno ] --- - - /** - * Returns the integer variable {@code errno}, which is set by system calls and some library functions in the event of an error to indicate what went - * wrong. Its value is significant only when the return value of the call indicated an error (i.e., -1 from most system calls; -1 or {@code NULL} from most - * library functions); a function that succeeds is allowed to change errno. - * - *

    LWJGL note: This function cannot be used after another JNI call to a function, because the last error resets before that call returns. For this - * reason, LWJGL stores the last error in thread-local storage, you can use {@link #getErrno} to access it.

    - */ - public static native int errno(); - - // --- [ getErrno ] --- - - /** - * Returns the integer variable {@code errno}, which is set by system calls and some library functions in the event of an error to indicate what went - * wrong. Its value is significant only when the return value of the call indicated an error (i.e., -1 from most system calls; -1 or {@code NULL} from most - * library functions); a function that succeeds is allowed to change errno. - * - *

    LWJGL note: This method has a meaningful value only after another LWJGL JNI call. It does not return {@code errno} from errno.h, but the - * thread-local error code stored by a previous JNI call.

    - */ - public static native int getErrno(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCLocale.java b/LWJGL/src/main/java/org/lwjgl/system/libc/LibCLocale.java deleted file mode 100644 index 31751d57..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCLocale.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libc; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to locale.h. */ -public class LibCLocale { - - static { Library.initialize(); } - - protected LibCLocale() { - throw new UnsupportedOperationException(); - } - - // --- [ LC_ALL ] --- - - private static native int LC_ALL(); - - /** Selects the entire C locale. */ - public static final int LC_ALL = LC_ALL(); - - // --- [ LC_COLLATE ] --- - - private static native int LC_COLLATE(); - - /** Selects the collation category of the C locale. */ - public static final int LC_COLLATE = LC_COLLATE(); - - // --- [ LC_CTYPE ] --- - - private static native int LC_CTYPE(); - - /** Selects the character classification category of the C locale. */ - public static final int LC_CTYPE = LC_CTYPE(); - - // --- [ LC_MONETARY ] --- - - private static native int LC_MONETARY(); - - /** Selects the monetary formatting category of the C locale. */ - public static final int LC_MONETARY = LC_MONETARY(); - - // --- [ LC_NUMERIC ] --- - - private static native int LC_NUMERIC(); - - /** Selects the numeric formatting category of the C locale. */ - public static final int LC_NUMERIC = LC_NUMERIC(); - - // --- [ LC_TIME ] --- - - private static native int LC_TIME(); - - /** Selects the time formatting category of the C locale. */ - public static final int LC_TIME = LC_TIME(); - - // --- [ setlocale ] --- - - /** Unsafe version of: {@link #setlocale} */ - public static native long nsetlocale(int category, long locale); - - /** - * Gets and sets the current C locale. - * - *

    The {@code setlocale} function installs the specified system locale or its portion as the new C locale. The modifications remain in effect and - * influences the execution of all locale-sensitive C library functions until the next call to {@code setlocale}. If {@code locale} is a null pointer, - * {@code setlocale} queries the current C locale without modifying it.

    - * - * @param category the locale category identifier, may by null. One of:
    {@link #LC_ALL}{@link #LC_COLLATE}{@link #LC_CTYPE}{@link #LC_MONETARY}{@link #LC_NUMERIC}{@link #LC_TIME}
    - * @param locale system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale. - * - * @return a pointer to a narrow null-terminated string identifying the C locale after applying the changes, if any, or null pointer on failure. - * - *

    A copy of the returned string along with the category used in this call to {@code setlocale} may be used later in the program to restore the locale - * back to the state at the end of this call.

    - */ - @Nullable - @NativeType("char *") - public static String setlocale(int category, @NativeType("char const *") ByteBuffer locale) { - if (CHECKS) { - checkNT1(locale); - } - long __result = nsetlocale(category, memAddress(locale)); - return memASCIISafe(__result); - } - - /** - * Gets and sets the current C locale. - * - *

    The {@code setlocale} function installs the specified system locale or its portion as the new C locale. The modifications remain in effect and - * influences the execution of all locale-sensitive C library functions until the next call to {@code setlocale}. If {@code locale} is a null pointer, - * {@code setlocale} queries the current C locale without modifying it.

    - * - * @param category the locale category identifier, may by null. One of:
    {@link #LC_ALL}{@link #LC_COLLATE}{@link #LC_CTYPE}{@link #LC_MONETARY}{@link #LC_NUMERIC}{@link #LC_TIME}
    - * @param locale system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale. - * - * @return a pointer to a narrow null-terminated string identifying the C locale after applying the changes, if any, or null pointer on failure. - * - *

    A copy of the returned string along with the category used in this call to {@code setlocale} may be used later in the program to restore the locale - * back to the state at the end of this call.

    - */ - @Nullable - @NativeType("char *") - public static String setlocale(int category, @NativeType("char const *") CharSequence locale) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(locale, true); - long localeEncoded = stack.getPointerAddress(); - long __result = nsetlocale(category, localeEncoded); - return memASCIISafe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCStdio.java b/LWJGL/src/main/java/org/lwjgl/system/libc/LibCStdio.java deleted file mode 100644 index d242732b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCStdio.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libc; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to stdio.h. */ -public class LibCStdio { - - static { Library.initialize(); } - - protected LibCStdio() { - throw new UnsupportedOperationException(); - } - - // --- [ sscanf ] --- - - @NativeType("void *") - private static native long sscanf(); - - /** The address of the {@code sscanf} function. */ - public static final long sscanf = sscanf(); - - // --- [ vsscanf ] --- - - /** Unsafe version of: {@link #vsscanf} */ - public static native int nvsscanf(long buffer, long format, long vlist); - - /** - * Reads data from the null-terminated character string {@code buffer}, interprets it according to {@code format} and stores the results into locations - * defined by {@code vlist}. - * - * @param buffer pointer to a null-terminated character string to read from - * @param format pointer to a null-terminated character string specifying how to read the input - * @param vlist variable argument list containing the receiving arguments - * - * @return the number of receiving arguments successfully assigned, or {@code EOF} if read failure occurs before the first receiving argument was assigned - */ - public static int vsscanf(@NativeType("char const *") ByteBuffer buffer, @NativeType("char const *") ByteBuffer format, @NativeType("va_list") long vlist) { - if (CHECKS) { - checkNT1(buffer); - checkNT1(format); - check(vlist); - } - return nvsscanf(memAddress(buffer), memAddress(format), vlist); - } - - /** - * Reads data from the null-terminated character string {@code buffer}, interprets it according to {@code format} and stores the results into locations - * defined by {@code vlist}. - * - * @param buffer pointer to a null-terminated character string to read from - * @param format pointer to a null-terminated character string specifying how to read the input - * @param vlist variable argument list containing the receiving arguments - * - * @return the number of receiving arguments successfully assigned, or {@code EOF} if read failure occurs before the first receiving argument was assigned - */ - public static int vsscanf(@NativeType("char const *") CharSequence buffer, @NativeType("char const *") CharSequence format, @NativeType("va_list") long vlist) { - if (CHECKS) { - check(vlist); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(buffer, true); - long bufferEncoded = stack.getPointerAddress(); - stack.nASCII(format, true); - long formatEncoded = stack.getPointerAddress(); - return nvsscanf(bufferEncoded, formatEncoded, vlist); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ snprintf ] --- - - @NativeType("void *") - private static native long snprintf(); - - /** The address of the {@code snprintf} function. */ - public static final long snprintf = snprintf(); - - // --- [ vsnprintf ] --- - - /** - * Unsafe version of: {@link #vsnprintf} - * - * @param buf_size up to {@code buf_size - 1} characters may be written, plus the null terminator - */ - public static native int nvsnprintf(long buffer, long buf_size, long format, long vlist); - - /** - * Loads the data from the locations, defined by {@code vlist}, converts them to character string equivalents and writes the results to a character string - * buffer. - * - * @param buffer pointer to a character string to write to - * @param format pointer to a null-terminated character string specifying how to interpret the data - * @param vlist variable argument list containing the data to print - * - * @return the number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to {@code buf_size} - * limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not - * imposed. - */ - public static int vsnprintf(@Nullable @NativeType("char *") ByteBuffer buffer, @NativeType("char const *") ByteBuffer format, @NativeType("va_list") long vlist) { - if (CHECKS) { - checkNT1(format); - check(vlist); - } - return nvsnprintf(memAddressSafe(buffer), remainingSafe(buffer), memAddress(format), vlist); - } - - /** - * Loads the data from the locations, defined by {@code vlist}, converts them to character string equivalents and writes the results to a character string - * buffer. - * - * @param buffer pointer to a character string to write to - * @param format pointer to a null-terminated character string specifying how to interpret the data - * @param vlist variable argument list containing the data to print - * - * @return the number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to {@code buf_size} - * limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not - * imposed. - */ - public static int vsnprintf(@Nullable @NativeType("char *") ByteBuffer buffer, @NativeType("char const *") CharSequence format, @NativeType("va_list") long vlist) { - if (CHECKS) { - check(vlist); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(format, true); - long formatEncoded = stack.getPointerAddress(); - return nvsnprintf(memAddressSafe(buffer), remainingSafe(buffer), formatEncoded, vlist); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCStdlib.java b/LWJGL/src/main/java/org/lwjgl/system/libc/LibCStdlib.java deleted file mode 100644 index 1b67d78f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCStdlib.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libc; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to stdlib.h. */ -public class LibCStdlib { - - static { Library.initialize(); } - - protected LibCStdlib() { - throw new UnsupportedOperationException(); - } - - // --- [ malloc ] --- - - /** Unsafe version of: {@link #malloc} */ - public static native long nmalloc(long size); - - /** - * Allocates {@code size} bytes and returns a pointer to the allocated memory. The memory is not initialized. If {@code size} is 0, then malloc() returns - * either {@code NULL}, or a unique pointer value that can later be successfully passed to {@link #free}. - * - * @param size the number of bytes to allocate - */ - @Nullable - @NativeType("void *") - public static ByteBuffer malloc(@NativeType("size_t") long size) { - long __result = nmalloc(size); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ calloc ] --- - - /** Unsafe version of: {@link #calloc} */ - public static native long ncalloc(long nmemb, long size); - - /** - * Allocates memory for an array of {@code nmemb} elements of {@code size} bytes each and returns a pointer to the allocated memory. The memory is set to - * zero. If {@code nmemb} or {@code size} is 0, then calloc() returns either {@code NULL}, or a unique pointer value that can later be successfully passed to - * {@link #free}. - * - * @param nmemb the number of elements to allocate - * @param size the number of bytes to allocate per element - */ - @Nullable - @NativeType("void *") - public static ByteBuffer calloc(@NativeType("size_t") long nmemb, @NativeType("size_t") long size) { - long __result = ncalloc(nmemb, size); - return memByteBufferSafe(__result, (int)nmemb * (int)size); - } - - // --- [ realloc ] --- - - /** Unsafe version of: {@link #realloc} */ - public static native long nrealloc(long ptr, long size); - - /** - * Changes the size of the memory block pointed to by {@code ptr} to {@code size} bytes The contents will be unchanged in the range from the start of the - * region up to the minimum of the old and new sizes. If the new size is larger than the old size, the added memory will not be initialized. If - * {@code ptr} is {@code NULL}, then the call is equivalent to {@code malloc(size)}, for all values of {@code size}; if {@code size} is equal to zero, and - * {@code ptr} is not {@code NULL}, then the call is equivalent to {@code free(ptr)}. Unless {@code ptr} is {@code NULL}, it must have been returned by an earlier call - * to {@link #malloc}, {@link #calloc} or {@link #realloc}. If the area pointed to was moved, a {@code free(ptr)} is done. - * - * @param ptr the memory block to reallocate - * @param size the new memory block size, in bytes - */ - @Nullable - @NativeType("void *") - public static ByteBuffer realloc(@Nullable @NativeType("void *") ByteBuffer ptr, @NativeType("size_t") long size) { - long __result = nrealloc(memAddressSafe(ptr), size); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ free ] --- - - /** Unsafe version of: {@link #free} */ - public static native void nfree(long ptr); - - /** - * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, - * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the memory space to free - */ - public static void free(@Nullable @NativeType("void *") ByteBuffer ptr) { - nfree(memAddressSafe(ptr)); - } - - /** - * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, - * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the memory space to free - */ - public static void free(@Nullable @NativeType("void *") ShortBuffer ptr) { - nfree(memAddressSafe(ptr)); - } - - /** - * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, - * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the memory space to free - */ - public static void free(@Nullable @NativeType("void *") IntBuffer ptr) { - nfree(memAddressSafe(ptr)); - } - - /** - * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, - * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the memory space to free - */ - public static void free(@Nullable @NativeType("void *") LongBuffer ptr) { - nfree(memAddressSafe(ptr)); - } - - /** - * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, - * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the memory space to free - */ - public static void free(@Nullable @NativeType("void *") FloatBuffer ptr) { - nfree(memAddressSafe(ptr)); - } - - /** - * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, - * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the memory space to free - */ - public static void free(@Nullable @NativeType("void *") DoubleBuffer ptr) { - nfree(memAddressSafe(ptr)); - } - - /** - * Frees the memory space pointed to by {@code ptr}, which must have been returned by a previous call to {@link #malloc}, {@link #calloc}, or {@link #realloc}. Otherwise, - * or if {@code free(ptr)} has already been called before, undefined behavior occurs. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the memory space to free - */ - public static void free(@Nullable @NativeType("void *") PointerBuffer ptr) { - nfree(memAddressSafe(ptr)); - } - - // --- [ aligned_alloc ] --- - - /** Unsafe version of: {@link #aligned_alloc} */ - public static native long naligned_alloc(long alignment, long size); - - /** - * Allocates {@code size} bytes of uninitialized storage whose alignment is specified by {@code alignment}. The size parameter must be an integral multiple - * of alignment. Memory allocated with aligned_alloc() must be freed with {@link #aligned_free}. - * - * @param alignment the alignment. Must be a power of two value. - * @param size the number of bytes to allocate. Must be a multiple of {@code alignment}. - */ - @Nullable - @NativeType("void *") - public static ByteBuffer aligned_alloc(@NativeType("size_t") long alignment, @NativeType("size_t") long size) { - long __result = naligned_alloc(alignment, size); - return memByteBufferSafe(__result, (int)size); - } - - // --- [ aligned_free ] --- - - /** Unsafe version of: {@link #aligned_free} */ - public static native void naligned_free(long ptr); - - /** - * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void aligned_free(@Nullable @NativeType("void *") ByteBuffer ptr) { - naligned_free(memAddressSafe(ptr)); - } - - /** - * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void aligned_free(@Nullable @NativeType("void *") ShortBuffer ptr) { - naligned_free(memAddressSafe(ptr)); - } - - /** - * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void aligned_free(@Nullable @NativeType("void *") IntBuffer ptr) { - naligned_free(memAddressSafe(ptr)); - } - - /** - * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void aligned_free(@Nullable @NativeType("void *") LongBuffer ptr) { - naligned_free(memAddressSafe(ptr)); - } - - /** - * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void aligned_free(@Nullable @NativeType("void *") FloatBuffer ptr) { - naligned_free(memAddressSafe(ptr)); - } - - /** - * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void aligned_free(@Nullable @NativeType("void *") DoubleBuffer ptr) { - naligned_free(memAddressSafe(ptr)); - } - - /** - * Frees a block of memory that was allocated with {@link #aligned_alloc}. If ptr is {@code NULL}, no operation is performed. - * - * @param ptr the aligned block of memory to free - */ - public static void aligned_free(@Nullable @NativeType("void *") PointerBuffer ptr) { - naligned_free(memAddressSafe(ptr)); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCString.java b/LWJGL/src/main/java/org/lwjgl/system/libc/LibCString.java deleted file mode 100644 index 3faec602..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libc/LibCString.java +++ /dev/null @@ -1,612 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libc; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to string.h. */ -public class LibCString { - - static { Library.initialize(); } - - protected LibCString() { - throw new UnsupportedOperationException(); - } - - // --- [ memset ] --- - - /** - * Unsafe version of: {@link #memset} - * - * @param count number of bytes to fill - */ - public static native long nmemset(long dest, int c, long count); - - /** - * Fills a memory area with a constant byte. - * - * @param dest pointer to the memory area to fill - * @param c byte to set - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memset(@NativeType("void *") ByteBuffer dest, int c) { - return nmemset(memAddress(dest), c, dest.remaining()); - } - - /** - * Fills a memory area with a constant byte. - * - * @param dest pointer to the memory area to fill - * @param c byte to set - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memset(@NativeType("void *") ShortBuffer dest, int c) { - return nmemset(memAddress(dest), c, Integer.toUnsignedLong(dest.remaining()) << 1); - } - - /** - * Fills a memory area with a constant byte. - * - * @param dest pointer to the memory area to fill - * @param c byte to set - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memset(@NativeType("void *") IntBuffer dest, int c) { - return nmemset(memAddress(dest), c, Integer.toUnsignedLong(dest.remaining()) << 2); - } - - /** - * Fills a memory area with a constant byte. - * - * @param dest pointer to the memory area to fill - * @param c byte to set - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memset(@NativeType("void *") LongBuffer dest, int c) { - return nmemset(memAddress(dest), c, Integer.toUnsignedLong(dest.remaining()) << 3); - } - - /** - * Fills a memory area with a constant byte. - * - * @param dest pointer to the memory area to fill - * @param c byte to set - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memset(@NativeType("void *") FloatBuffer dest, int c) { - return nmemset(memAddress(dest), c, Integer.toUnsignedLong(dest.remaining()) << 2); - } - - /** - * Fills a memory area with a constant byte. - * - * @param dest pointer to the memory area to fill - * @param c byte to set - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memset(@NativeType("void *") DoubleBuffer dest, int c) { - return nmemset(memAddress(dest), c, Integer.toUnsignedLong(dest.remaining()) << 3); - } - - // --- [ memcpy ] --- - - /** - * Unsafe version of: {@link #memcpy} - * - * @param count the number of bytes to be copied - */ - public static native long nmemcpy(long dest, long src, long count); - - /** - * Copies bytes between memory areas that must not overlap. - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") ByteBuffer dest, @NativeType("void const *") ByteBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemcpy(memAddress(dest), memAddress(src), src.remaining()); - } - - /** - * Copies bytes between memory areas that must not overlap. - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") ShortBuffer dest, @NativeType("void const *") ShortBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemcpy(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 1); - } - - /** - * Copies bytes between memory areas that must not overlap. - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") IntBuffer dest, @NativeType("void const *") IntBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemcpy(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 2); - } - - /** - * Copies bytes between memory areas that must not overlap. - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") LongBuffer dest, @NativeType("void const *") LongBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemcpy(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 3); - } - - /** - * Copies bytes between memory areas that must not overlap. - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") FloatBuffer dest, @NativeType("void const *") FloatBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemcpy(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 2); - } - - /** - * Copies bytes between memory areas that must not overlap. - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") DoubleBuffer dest, @NativeType("void const *") DoubleBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemcpy(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 3); - } - - // --- [ memmove ] --- - - /** - * Unsafe version of: {@link #memmove} - * - * @param count the number of bytes to be copied - */ - public static native long nmemmove(long dest, long src, long count); - - /** - * Copies {@code count} bytes from memory area {@code src} to memory area {@code dest}. - * - *

    The memory areas may overlap: copying takes place as though the bytes in {@code src} are first copied into a temporary array that does not overlap - * {@code src} or {@code dest}, and the bytes are then copied from the temporary array to {@code dest}.

    - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memmove(@NativeType("void *") ByteBuffer dest, @NativeType("void const *") ByteBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemmove(memAddress(dest), memAddress(src), src.remaining()); - } - - /** - * Copies {@code count} bytes from memory area {@code src} to memory area {@code dest}. - * - *

    The memory areas may overlap: copying takes place as though the bytes in {@code src} are first copied into a temporary array that does not overlap - * {@code src} or {@code dest}, and the bytes are then copied from the temporary array to {@code dest}.

    - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memmove(@NativeType("void *") ShortBuffer dest, @NativeType("void const *") ShortBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemmove(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 1); - } - - /** - * Copies {@code count} bytes from memory area {@code src} to memory area {@code dest}. - * - *

    The memory areas may overlap: copying takes place as though the bytes in {@code src} are first copied into a temporary array that does not overlap - * {@code src} or {@code dest}, and the bytes are then copied from the temporary array to {@code dest}.

    - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memmove(@NativeType("void *") IntBuffer dest, @NativeType("void const *") IntBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemmove(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 2); - } - - /** - * Copies {@code count} bytes from memory area {@code src} to memory area {@code dest}. - * - *

    The memory areas may overlap: copying takes place as though the bytes in {@code src} are first copied into a temporary array that does not overlap - * {@code src} or {@code dest}, and the bytes are then copied from the temporary array to {@code dest}.

    - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memmove(@NativeType("void *") LongBuffer dest, @NativeType("void const *") LongBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemmove(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 3); - } - - /** - * Copies {@code count} bytes from memory area {@code src} to memory area {@code dest}. - * - *

    The memory areas may overlap: copying takes place as though the bytes in {@code src} are first copied into a temporary array that does not overlap - * {@code src} or {@code dest}, and the bytes are then copied from the temporary array to {@code dest}.

    - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memmove(@NativeType("void *") FloatBuffer dest, @NativeType("void const *") FloatBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemmove(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 2); - } - - /** - * Copies {@code count} bytes from memory area {@code src} to memory area {@code dest}. - * - *

    The memory areas may overlap: copying takes place as though the bytes in {@code src} are first copied into a temporary array that does not overlap - * {@code src} or {@code dest}, and the bytes are then copied from the temporary array to {@code dest}.

    - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static long memmove(@NativeType("void *") DoubleBuffer dest, @NativeType("void const *") DoubleBuffer src) { - if (CHECKS) { - check(dest, src.remaining()); - } - return nmemmove(memAddress(dest), memAddress(src), Integer.toUnsignedLong(src.remaining()) << 3); - } - - // --- [ strlen ] --- - - public static native long nstrlen(long str); - - @NativeType("size_t") - public static long strlen(@NativeType("char const *") ByteBuffer str) { - if (CHECKS) { - checkNT1(str); - } - return nstrlen(memAddress(str)); - } - - // --- [ strerror ] --- - - /** Unsafe version of: {@link #strerror} */ - public static native long nstrerror(int errnum); - - /** Returns string describing error number. */ - @Nullable - @NativeType("char *") - public static String strerror(int errnum) { - long __result = nstrerror(errnum); - return memASCIISafe(__result); - } - - /** Array version of: {@link #nmemset} */ - public static native long nmemset(byte[] dest, int c, long count); - - /** Array version of: {@link #memset} */ - @NativeType("void *") - public static long memset(@NativeType("void *") byte[] dest, int c) { - return nmemset(dest, c, Integer.toUnsignedLong(dest.length) << 0); - } - - /** Array version of: {@link #nmemset} */ - public static native long nmemset(short[] dest, int c, long count); - - /** Array version of: {@link #memset} */ - @NativeType("void *") - public static long memset(@NativeType("void *") short[] dest, int c) { - return nmemset(dest, c, Integer.toUnsignedLong(dest.length) << 1); - } - - /** Array version of: {@link #nmemset} */ - public static native long nmemset(int[] dest, int c, long count); - - /** Array version of: {@link #memset} */ - @NativeType("void *") - public static long memset(@NativeType("void *") int[] dest, int c) { - return nmemset(dest, c, Integer.toUnsignedLong(dest.length) << 2); - } - - /** Array version of: {@link #nmemset} */ - public static native long nmemset(long[] dest, int c, long count); - - /** Array version of: {@link #memset} */ - @NativeType("void *") - public static long memset(@NativeType("void *") long[] dest, int c) { - return nmemset(dest, c, Integer.toUnsignedLong(dest.length) << 3); - } - - /** Array version of: {@link #nmemset} */ - public static native long nmemset(float[] dest, int c, long count); - - /** Array version of: {@link #memset} */ - @NativeType("void *") - public static long memset(@NativeType("void *") float[] dest, int c) { - return nmemset(dest, c, Integer.toUnsignedLong(dest.length) << 2); - } - - /** Array version of: {@link #nmemset} */ - public static native long nmemset(double[] dest, int c, long count); - - /** Array version of: {@link #memset} */ - @NativeType("void *") - public static long memset(@NativeType("void *") double[] dest, int c) { - return nmemset(dest, c, Integer.toUnsignedLong(dest.length) << 3); - } - - /** Array version of: {@link #nmemcpy} */ - public static native long nmemcpy(byte[] dest, byte[] src, long count); - - /** Array version of: {@link #memcpy} */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") byte[] dest, @NativeType("void const *") byte[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemcpy(dest, src, Integer.toUnsignedLong(src.length) << 0); - } - - /** Array version of: {@link #nmemcpy} */ - public static native long nmemcpy(short[] dest, short[] src, long count); - - /** Array version of: {@link #memcpy} */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") short[] dest, @NativeType("void const *") short[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemcpy(dest, src, Integer.toUnsignedLong(src.length) << 1); - } - - /** Array version of: {@link #nmemcpy} */ - public static native long nmemcpy(int[] dest, int[] src, long count); - - /** Array version of: {@link #memcpy} */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") int[] dest, @NativeType("void const *") int[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemcpy(dest, src, Integer.toUnsignedLong(src.length) << 2); - } - - /** Array version of: {@link #nmemcpy} */ - public static native long nmemcpy(long[] dest, long[] src, long count); - - /** Array version of: {@link #memcpy} */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") long[] dest, @NativeType("void const *") long[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemcpy(dest, src, Integer.toUnsignedLong(src.length) << 3); - } - - /** Array version of: {@link #nmemcpy} */ - public static native long nmemcpy(float[] dest, float[] src, long count); - - /** Array version of: {@link #memcpy} */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") float[] dest, @NativeType("void const *") float[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemcpy(dest, src, Integer.toUnsignedLong(src.length) << 2); - } - - /** Array version of: {@link #nmemcpy} */ - public static native long nmemcpy(double[] dest, double[] src, long count); - - /** Array version of: {@link #memcpy} */ - @NativeType("void *") - public static long memcpy(@NativeType("void *") double[] dest, @NativeType("void const *") double[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemcpy(dest, src, Integer.toUnsignedLong(src.length) << 3); - } - - /** Array version of: {@link #nmemmove} */ - public static native long nmemmove(byte[] dest, byte[] src, long count); - - /** Array version of: {@link #memmove} */ - @NativeType("void *") - public static long memmove(@NativeType("void *") byte[] dest, @NativeType("void const *") byte[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemmove(dest, src, Integer.toUnsignedLong(src.length) << 0); - } - - /** Array version of: {@link #nmemmove} */ - public static native long nmemmove(short[] dest, short[] src, long count); - - /** Array version of: {@link #memmove} */ - @NativeType("void *") - public static long memmove(@NativeType("void *") short[] dest, @NativeType("void const *") short[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemmove(dest, src, Integer.toUnsignedLong(src.length) << 1); - } - - /** Array version of: {@link #nmemmove} */ - public static native long nmemmove(int[] dest, int[] src, long count); - - /** Array version of: {@link #memmove} */ - @NativeType("void *") - public static long memmove(@NativeType("void *") int[] dest, @NativeType("void const *") int[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemmove(dest, src, Integer.toUnsignedLong(src.length) << 2); - } - - /** Array version of: {@link #nmemmove} */ - public static native long nmemmove(long[] dest, long[] src, long count); - - /** Array version of: {@link #memmove} */ - @NativeType("void *") - public static long memmove(@NativeType("void *") long[] dest, @NativeType("void const *") long[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemmove(dest, src, Integer.toUnsignedLong(src.length) << 3); - } - - /** Array version of: {@link #nmemmove} */ - public static native long nmemmove(float[] dest, float[] src, long count); - - /** Array version of: {@link #memmove} */ - @NativeType("void *") - public static long memmove(@NativeType("void *") float[] dest, @NativeType("void const *") float[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemmove(dest, src, Integer.toUnsignedLong(src.length) << 2); - } - - /** Array version of: {@link #nmemmove} */ - public static native long nmemmove(double[] dest, double[] src, long count); - - /** Array version of: {@link #memmove} */ - @NativeType("void *") - public static long memmove(@NativeType("void *") double[] dest, @NativeType("void const *") double[] src) { - if (CHECKS) { - check(dest, src.length); - } - return nmemmove(dest, src, Integer.toUnsignedLong(src.length) << 3); - } - - /** - * Fills memory with a constant byte. - * - * @param dest pointer to destination - * @param c character to set - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static > long memset(@NativeType("void *") T dest, @NativeType("int") int c) { - return nmemset(memAddress(dest), c, Integer.toUnsignedLong(dest.remaining()) * dest.sizeof()); - } - - /** - * Copies bytes between memory areas that must not overlap. - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static > long memcpy(@NativeType("void *") T dest, @NativeType("void const *") T src) { - if (CHECKS) { - check(src, dest.remaining()); - } - return nmemcpy(memAddress(dest), memAddress(src), (long)src.remaining() * src.sizeof()); - } - - /** - * Copies {@code count} bytes from memory area {@code src} to memory area {@code dest}. - * - *

    The memory areas may overlap: copying takes place as though the bytes in {@code src} are first copied into a temporary array that does not overlap - * {@code src} or {@code dest}, and the bytes are then copied from the temporary array to {@code dest}.

    - * - * @param dest pointer to the destination memory area - * @param src pointer to the source memory area - * - * @return the value of {@code dest} - */ - @NativeType("void *") - public static > long memmove(@NativeType("void *") T dest, @NativeType("void const *") T src) { - if (CHECKS) { - check(src, dest.remaining()); - } - return nmemmove(memAddress(dest), memAddress(src), (long)src.remaining() * src.sizeof()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libffi/FFICIF.java b/LWJGL/src/main/java/org/lwjgl/system/libffi/FFICIF.java deleted file mode 100644 index f13fd7d2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libffi/FFICIF.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libffi; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about a libffi call interface. - * - *

    Layout

    - * - *
    
    - * struct ffi_cif {
    - *     ffi_abi abi;
    - *     unsigned nargs;
    - *     {@link FFIType ffi_type} ** arg_types;
    - *     {@link FFIType ffi_type} * rtype;
    - *     unsigned bytes;
    - *     unsigned flags;
    - * }
    - */ -@NativeType("struct ffi_cif") -public class FFICIF extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ABI, - NARGS, - ARG_TYPES, - RTYPE, - BYTES, - FLAGS; - - static { - try (MemoryStack stack = stackPush()) { - IntBuffer offsets = stack.mallocInt(7); - SIZEOF = offsets(memAddress(offsets)); - - ABI = offsets.get(0); - NARGS = offsets.get(1); - ARG_TYPES = offsets.get(2); - RTYPE = offsets.get(3); - BYTES = offsets.get(4); - FLAGS = offsets.get(5); - - ALIGNOF = offsets.get(6); - } - } - - private static native int offsets(long buffer); - - protected FFICIF(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FFICIF create(long address, @Nullable ByteBuffer container) { - return new FFICIF(address, container); - } - - /** - * Creates a {@code FFICIF} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FFICIF(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code abi} field. */ - @NativeType("ffi_abi") - public int abi() { return nabi(address()); } - /** @return the value of the {@code nargs} field. */ - @NativeType("unsigned") - public int nargs() { return nnargs(address()); } - /** - * @return a {@link PointerBuffer} view of the data pointed to by the {@code arg_types} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("ffi_type **") - public PointerBuffer arg_types(int capacity) { return narg_types(address(), capacity); } - /** @return a {@link FFIType} view of the struct pointed to by the {@code rtype} field. */ - @NativeType("ffi_type *") - public FFIType rtype() { return nrtype(address()); } - /** @return the value of the {@code bytes} field. */ - @NativeType("unsigned") - public int bytes() { return nbytes(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("unsigned") - public int flags() { return nflags(address()); } - - // ----------------------------------- - - /** Returns a new {@code FFICIF} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FFICIF malloc() { - return new FFICIF(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FFICIF} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FFICIF calloc() { - return new FFICIF(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FFICIF} instance allocated with {@link BufferUtils}. */ - public static FFICIF create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FFICIF(memAddress(container), container); - } - - /** Returns a new {@code FFICIF} instance for the specified memory address. */ - public static FFICIF create(long address) { - return new FFICIF(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FFICIF createSafe(long address) { - return address == NULL ? null : new FFICIF(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FFICIF} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FFICIF malloc(MemoryStack stack) { - return new FFICIF(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FFICIF} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FFICIF calloc(MemoryStack stack) { - return new FFICIF(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #abi}. */ - public static int nabi(long struct) { return UNSAFE.getInt(null, struct + FFICIF.ABI); } - /** Unsafe version of {@link #nargs}. */ - public static int nnargs(long struct) { return UNSAFE.getInt(null, struct + FFICIF.NARGS); } - /** Unsafe version of {@link #arg_types(int) arg_types}. */ - public static PointerBuffer narg_types(long struct, int capacity) { return memPointerBuffer(memGetAddress(struct + FFICIF.ARG_TYPES), capacity); } - /** Unsafe version of {@link #rtype}. */ - public static FFIType nrtype(long struct) { return FFIType.create(memGetAddress(struct + FFICIF.RTYPE)); } - /** Unsafe version of {@link #bytes}. */ - public static int nbytes(long struct) { return UNSAFE.getInt(null, struct + FFICIF.BYTES); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + FFICIF.FLAGS); } - - // ----------------------------------- - - /** An array of {@link FFICIF} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FFICIF ELEMENT_FACTORY = FFICIF.create(-1L); - - /** - * Creates a new {@code FFICIF.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FFICIF#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FFICIF getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code abi} field. */ - @NativeType("ffi_abi") - public int abi() { return FFICIF.nabi(address()); } - /** @return the value of the {@code nargs} field. */ - @NativeType("unsigned") - public int nargs() { return FFICIF.nnargs(address()); } - /** - * @return a {@link PointerBuffer} view of the data pointed to by the {@code arg_types} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("ffi_type **") - public PointerBuffer arg_types(int capacity) { return FFICIF.narg_types(address(), capacity); } - /** @return a {@link FFIType} view of the struct pointed to by the {@code rtype} field. */ - @NativeType("ffi_type *") - public FFIType rtype() { return FFICIF.nrtype(address()); } - /** @return the value of the {@code bytes} field. */ - @NativeType("unsigned") - public int bytes() { return FFICIF.nbytes(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("unsigned") - public int flags() { return FFICIF.nflags(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libffi/FFIClosure.java b/LWJGL/src/main/java/org/lwjgl/system/libffi/FFIClosure.java deleted file mode 100644 index 1616ab0a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libffi/FFIClosure.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libffi; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * The libffi closure structure. - * - *

    Layout

    - * - *
    
    - * struct ffi_closure {
    - *     {@link FFICIF ffi_cif} * {@link #cif};
    - *     void (*)(ffi_cif*,void*,void**,void*) {@link #fun};
    - *     void * {@link #user_data};
    - * }
    - */ -@NativeType("struct ffi_closure") -public class FFIClosure extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CIF, - FUN, - USER_DATA; - - static { - try (MemoryStack stack = stackPush()) { - IntBuffer offsets = stack.mallocInt(4); - SIZEOF = offsets(memAddress(offsets)); - - CIF = offsets.get(0); - FUN = offsets.get(1); - USER_DATA = offsets.get(2); - - ALIGNOF = offsets.get(3); - } - } - - private static native int offsets(long buffer); - - protected FFIClosure(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FFIClosure create(long address, @Nullable ByteBuffer container) { - return new FFIClosure(address, container); - } - - /** - * Creates a {@code FFIClosure} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FFIClosure(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** a pointer to an {@code ffi_cif} structure */ - @NativeType("ffi_cif *") - public FFICIF cif() { return ncif(address()); } - /** a pointer to a function */ - @NativeType("void (*)(ffi_cif*,void*,void**,void*)") - public long fun() { return nfun(address()); } - /** a pointer to user-specified data */ - @NativeType("void *") - public long user_data() { return nuser_data(address()); } - - // ----------------------------------- - - /** Returns a new {@code FFIClosure} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FFIClosure malloc() { - return new FFIClosure(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FFIClosure} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FFIClosure calloc() { - return new FFIClosure(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FFIClosure} instance allocated with {@link BufferUtils}. */ - public static FFIClosure create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FFIClosure(memAddress(container), container); - } - - /** Returns a new {@code FFIClosure} instance for the specified memory address. */ - public static FFIClosure create(long address) { - return new FFIClosure(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FFIClosure createSafe(long address) { - return address == NULL ? null : new FFIClosure(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FFIClosure} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FFIClosure malloc(MemoryStack stack) { - return new FFIClosure(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FFIClosure} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FFIClosure calloc(MemoryStack stack) { - return new FFIClosure(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cif}. */ - public static FFICIF ncif(long struct) { return FFICIF.create(memGetAddress(struct + FFIClosure.CIF)); } - /** Unsafe version of {@link #fun}. */ - public static long nfun(long struct) { return memGetAddress(struct + FFIClosure.FUN); } - /** Unsafe version of {@link #user_data}. */ - public static long nuser_data(long struct) { return memGetAddress(struct + FFIClosure.USER_DATA); } - - // ----------------------------------- - - /** An array of {@link FFIClosure} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FFIClosure ELEMENT_FACTORY = FFIClosure.create(-1L); - - /** - * Creates a new {@code FFIClosure.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FFIClosure#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FFIClosure getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FFICIF} view of the struct pointed to by the {@link FFIClosure#cif} field. */ - @NativeType("ffi_cif *") - public FFICIF cif() { return FFIClosure.ncif(address()); } - /** @return the value of the {@link FFIClosure#fun} field. */ - @NativeType("void (*)(ffi_cif*,void*,void**,void*)") - public long fun() { return FFIClosure.nfun(address()); } - /** @return the value of the {@link FFIClosure#user_data} field. */ - @NativeType("void *") - public long user_data() { return FFIClosure.nuser_data(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libffi/FFIType.java b/LWJGL/src/main/java/org/lwjgl/system/libffi/FFIType.java deleted file mode 100644 index 496e253a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libffi/FFIType.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libffi; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about a libffi type. - * - *

    Layout

    - * - *
    
    - * struct ffi_type {
    - *     size_t {@link #size};
    - *     unsigned short {@link #alignment};
    - *     unsigned short {@link #type};
    - *     ffi_type * {@link #elements};
    - * }
    - */ -@NativeType("struct ffi_type") -public class FFIType extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SIZE, - ALIGNMENT, - TYPE, - ELEMENTS; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(2), - __member(2), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SIZE = layout.offsetof(0); - ALIGNMENT = layout.offsetof(1); - TYPE = layout.offsetof(2); - ELEMENTS = layout.offsetof(3); - } - - protected FFIType(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FFIType create(long address, @Nullable ByteBuffer container) { - return new FFIType(address, container); - } - - /** - * Creates a {@code FFIType} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FFIType(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** set by libffi; you should initialize it to zero. */ - @NativeType("size_t") - public long size() { return nsize(address()); } - /** set by libffi; you should initialize it to zero. */ - @NativeType("unsigned short") - public short alignment() { return nalignment(address()); } - /** for a structure, this should be set to {@link LibFFI#FFI_TYPE_STRUCT TYPE_STRUCT}. */ - @NativeType("unsigned short") - public short type() { return ntype(address()); } - /** - * @param capacity the number of elements in the returned buffer - * - * @return a null-terminated array of pointers to {@code ffi_type} objects. There is one element per field of the struct. - */ - @Nullable - @NativeType("ffi_type *") - public PointerBuffer elements(int capacity) { return nelements(address(), capacity); } - - /** Sets the specified value to the {@link #size} field. */ - public FFIType size(@NativeType("size_t") long value) { nsize(address(), value); return this; } - /** Sets the specified value to the {@link #alignment} field. */ - public FFIType alignment(@NativeType("unsigned short") short value) { nalignment(address(), value); return this; } - /** Sets the specified value to the {@link #type} field. */ - public FFIType type(@NativeType("unsigned short") short value) { ntype(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@link #elements} field. */ - public FFIType elements(@Nullable @NativeType("ffi_type *") PointerBuffer value) { nelements(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FFIType set( - long size, - short alignment, - short type, - @Nullable PointerBuffer elements - ) { - size(size); - alignment(alignment); - type(type); - elements(elements); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FFIType set(FFIType src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FFIType} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FFIType malloc() { - return new FFIType(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FFIType} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FFIType calloc() { - return new FFIType(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FFIType} instance allocated with {@link BufferUtils}. */ - public static FFIType create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FFIType(memAddress(container), container); - } - - /** Returns a new {@code FFIType} instance for the specified memory address. */ - public static FFIType create(long address) { - return new FFIType(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FFIType createSafe(long address) { - return address == NULL ? null : new FFIType(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FFIType} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FFIType malloc(MemoryStack stack) { - return new FFIType(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FFIType} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FFIType calloc(MemoryStack stack) { - return new FFIType(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #size}. */ - public static long nsize(long struct) { return memGetAddress(struct + FFIType.SIZE); } - /** Unsafe version of {@link #alignment}. */ - public static short nalignment(long struct) { return UNSAFE.getShort(null, struct + FFIType.ALIGNMENT); } - /** Unsafe version of {@link #type}. */ - public static short ntype(long struct) { return UNSAFE.getShort(null, struct + FFIType.TYPE); } - /** Unsafe version of {@link #elements(int) elements}. */ - @Nullable public static PointerBuffer nelements(long struct, int capacity) { return memPointerBufferSafe(memGetAddress(struct + FFIType.ELEMENTS), capacity); } - - /** Unsafe version of {@link #size(long) size}. */ - public static void nsize(long struct, long value) { memPutAddress(struct + FFIType.SIZE, value); } - /** Unsafe version of {@link #alignment(short) alignment}. */ - public static void nalignment(long struct, short value) { UNSAFE.putShort(null, struct + FFIType.ALIGNMENT, value); } - /** Unsafe version of {@link #type(short) type}. */ - public static void ntype(long struct, short value) { UNSAFE.putShort(null, struct + FFIType.TYPE, value); } - /** Unsafe version of {@link #elements(PointerBuffer) elements}. */ - public static void nelements(long struct, @Nullable PointerBuffer value) { memPutAddress(struct + FFIType.ELEMENTS, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link FFIType} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FFIType ELEMENT_FACTORY = FFIType.create(-1L); - - /** - * Creates a new {@code FFIType.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FFIType#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FFIType getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link FFIType#size} field. */ - @NativeType("size_t") - public long size() { return FFIType.nsize(address()); } - /** @return the value of the {@link FFIType#alignment} field. */ - @NativeType("unsigned short") - public short alignment() { return FFIType.nalignment(address()); } - /** @return the value of the {@link FFIType#type} field. */ - @NativeType("unsigned short") - public short type() { return FFIType.ntype(address()); } - /** - * @return a {@link PointerBuffer} view of the data pointed to by the {@link FFIType#elements} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("ffi_type *") - public PointerBuffer elements(int capacity) { return FFIType.nelements(address(), capacity); } - - /** Sets the specified value to the {@link FFIType#size} field. */ - public Buffer size(@NativeType("size_t") long value) { FFIType.nsize(address(), value); return this; } - /** Sets the specified value to the {@link FFIType#alignment} field. */ - public Buffer alignment(@NativeType("unsigned short") short value) { FFIType.nalignment(address(), value); return this; } - /** Sets the specified value to the {@link FFIType#type} field. */ - public Buffer type(@NativeType("unsigned short") short value) { FFIType.ntype(address(), value); return this; } - /** Sets the address of the specified {@link PointerBuffer} to the {@link FFIType#elements} field. */ - public Buffer elements(@Nullable @NativeType("ffi_type *") PointerBuffer value) { FFIType.nelements(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/libffi/LibFFI.java b/LWJGL/src/main/java/org/lwjgl/system/libffi/LibFFI.java deleted file mode 100644 index d0d6d83f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/libffi/LibFFI.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.libffi; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the libffi library. - * - *

    The foreign function interface provides a mechanism by which a function can generate a call to another function at runtime without requiring knowledge - * of the called function's interface at compile time. This enables use of native libraries that LWJGL does not provide bindings for.

    - * - *

    libffi assumes that you have a pointer to the function you wish to call and that you know the number and types of arguments to pass it, as well as the - * return type of the function.

    - * - *

    The first thing you must do is create an {@link FFICIF} object that matches the signature of the function you wish to call. This is a separate step - * because it is common to make multiple calls using a single {@link FFICIF}. The {@code cif} in {@code ffi_cif} stands for Call InterFace. To prepare a - * call interface object, use the function {@link #ffi_prep_cif prep_cif}. To call a function using an initialized {@code ffi_cif}, use the {@link #ffi_call call} function.

    - */ -public class LibFFI { - - static { Library.initialize(); } - - /** Types used to create custom {@link FFICIF}. */ - public static final short - FFI_TYPE_VOID = 0, - FFI_TYPE_INT = 1, - FFI_TYPE_FLOAT = 2, - FFI_TYPE_DOUBLE = 3, - FFI_TYPE_LONGDOUBLE = FFI_TYPE_DOUBLE(), - FFI_TYPE_UINT8 = 5, - FFI_TYPE_SINT8 = 6, - FFI_TYPE_UINT16 = 7, - FFI_TYPE_SINT16 = 8, - FFI_TYPE_UINT32 = 9, - FFI_TYPE_SINT32 = 10, - FFI_TYPE_UINT64 = 11, - FFI_TYPE_SINT64 = 12, - FFI_TYPE_STRUCT = 13, - FFI_TYPE_POINTER = 14; - - /** - * ABI enumeration. - * - *

    LWJGL note: ABIs that are not applicable to the current platform will have a value of -1 and should not be used.

    - * - *
    Enum values:
    - * - *
      - *
    • {@link #FFI_FIRST_ABI FIRST_ABI}
    • - *
    • {@link #FFI_WIN64 WIN64}
    • - *
    • {@link #FFI_GNUW64 GNUW64}
    • - *
    • {@link #FFI_UNIX64 UNIX64}
    • - *
    • {@link #FFI_EFI64 EFI64}
    • - *
    • {@link #FFI_SYSV SYSV}
    • - *
    • {@link #FFI_STDCALL STDCALL}
    • - *
    • {@link #FFI_THISCALL THISCALL}
    • - *
    • {@link #FFI_FASTCALL FASTCALL}
    • - *
    • {@link #FFI_MS_CDECL MS_CDECL}
    • - *
    • {@link #FFI_PASCAL PASCAL}
    • - *
    • {@link #FFI_REGISTER REGISTER}
    • - *
    • {@link #FFI_VFP VFP}
    • - *
    • {@link #FFI_LAST_ABI LAST_ABI}
    • - *
    • {@link #FFI_DEFAULT_ABI DEFAULT_ABI}
    • - *
    - */ - public static final int - FFI_FIRST_ABI = FFI_FIRST_ABI(), - FFI_WIN64 = FFI_WIN64(), - FFI_GNUW64 = FFI_GNUW64(), - FFI_UNIX64 = FFI_UNIX64(), - FFI_EFI64 = FFI_EFI64(), - FFI_SYSV = FFI_SYSV(), - FFI_STDCALL = FFI_STDCALL(), - FFI_THISCALL = FFI_THISCALL(), - FFI_FASTCALL = FFI_FASTCALL(), - FFI_MS_CDECL = FFI_MS_CDECL(), - FFI_PASCAL = FFI_PASCAL(), - FFI_REGISTER = FFI_REGISTER(), - FFI_VFP = FFI_VFP(), - FFI_LAST_ABI = FFI_LAST_ABI(), - FFI_DEFAULT_ABI = FFI_DEFAULT_ABI(); - - /** - * Status codes. - * - *
    Enum values:
    - * - *
      - *
    • {@link #FFI_OK OK}
    • - *
    • {@link #FFI_BAD_TYPEDEF BAD_TYPEDEF}
    • - *
    • {@link #FFI_BAD_ABI BAD_ABI}
    • - *
    • {@link #FFI_BAD_ARGTYPE BAD_ARGTYPE}
    • - *
    - */ - public static final int - FFI_OK = 0, - FFI_BAD_TYPEDEF = 1, - FFI_BAD_ABI = 2, - FFI_BAD_ARGTYPE = 3; - - protected LibFFI() { - throw new UnsupportedOperationException(); - } - - // --- [ FFI_TYPE_DOUBLE ] --- - - /** The double type. */ - private static native short FFI_TYPE_DOUBLE(); - - // --- [ FFI_WIN64 ] --- - - private static native int FFI_WIN64(); - - // --- [ FFI_GNUW64 ] --- - - private static native int FFI_GNUW64(); - - // --- [ FFI_UNIX64 ] --- - - private static native int FFI_UNIX64(); - - // --- [ FFI_EFI64 ] --- - - private static native int FFI_EFI64(); - - // --- [ FFI_SYSV ] --- - - private static native int FFI_SYSV(); - - // --- [ FFI_STDCALL ] --- - - private static native int FFI_STDCALL(); - - // --- [ FFI_THISCALL ] --- - - private static native int FFI_THISCALL(); - - // --- [ FFI_FASTCALL ] --- - - private static native int FFI_FASTCALL(); - - // --- [ FFI_MS_CDECL ] --- - - private static native int FFI_MS_CDECL(); - - // --- [ FFI_PASCAL ] --- - - private static native int FFI_PASCAL(); - - // --- [ FFI_REGISTER ] --- - - private static native int FFI_REGISTER(); - - // --- [ FFI_VFP ] --- - - private static native int FFI_VFP(); - - // --- [ FFI_FIRST_ABI ] --- - - private static native int FFI_FIRST_ABI(); - - // --- [ FFI_LAST_ABI ] --- - - private static native int FFI_LAST_ABI(); - - // --- [ FFI_DEFAULT_ABI ] --- - - private static native int FFI_DEFAULT_ABI(); - - // --- [ ffi_type_void ] --- - - private static native long nffi_type_void(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_void() { - long __result = nffi_type_void(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_void} struct. */ - public static final FFIType ffi_type_void = ffi_type_void(); - - // --- [ ffi_type_uint8 ] --- - - private static native long nffi_type_uint8(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_uint8() { - long __result = nffi_type_uint8(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_uint8} struct. */ - public static final FFIType ffi_type_uint8 = ffi_type_uint8(); - - // --- [ ffi_type_sint8 ] --- - - private static native long nffi_type_sint8(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_sint8() { - long __result = nffi_type_sint8(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_sint8} struct. */ - public static final FFIType ffi_type_sint8 = ffi_type_sint8(); - - // --- [ ffi_type_uint16 ] --- - - private static native long nffi_type_uint16(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_uint16() { - long __result = nffi_type_uint16(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_uint16} struct. */ - public static final FFIType ffi_type_uint16 = ffi_type_uint16(); - - // --- [ ffi_type_sint16 ] --- - - private static native long nffi_type_sint16(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_sint16() { - long __result = nffi_type_sint16(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_sint16} struct. */ - public static final FFIType ffi_type_sint16 = ffi_type_sint16(); - - // --- [ ffi_type_uint32 ] --- - - private static native long nffi_type_uint32(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_uint32() { - long __result = nffi_type_uint32(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_uint32} struct. */ - public static final FFIType ffi_type_uint32 = ffi_type_uint32(); - - // --- [ ffi_type_sint32 ] --- - - private static native long nffi_type_sint32(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_sint32() { - long __result = nffi_type_sint32(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_sint32} struct. */ - public static final FFIType ffi_type_sint32 = ffi_type_sint32(); - - // --- [ ffi_type_uint64 ] --- - - private static native long nffi_type_uint64(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_uint64() { - long __result = nffi_type_uint64(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_uint64} struct. */ - public static final FFIType ffi_type_uint64 = ffi_type_uint64(); - - // --- [ ffi_type_sint64 ] --- - - private static native long nffi_type_sint64(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_sint64() { - long __result = nffi_type_sint64(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_sint64} struct. */ - public static final FFIType ffi_type_sint64 = ffi_type_sint64(); - - // --- [ ffi_type_uchar ] --- - - private static native long nffi_type_uchar(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_uchar() { - long __result = nffi_type_uchar(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_uchar} struct. */ - public static final FFIType ffi_type_uchar = ffi_type_uchar(); - - // --- [ ffi_type_schar ] --- - - private static native long nffi_type_schar(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_schar() { - long __result = nffi_type_schar(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_schar} struct. */ - public static final FFIType ffi_type_schar = ffi_type_schar(); - - // --- [ ffi_type_ushort ] --- - - private static native long nffi_type_ushort(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_ushort() { - long __result = nffi_type_ushort(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_ushort} struct. */ - public static final FFIType ffi_type_ushort = ffi_type_ushort(); - - // --- [ ffi_type_sshort ] --- - - private static native long nffi_type_sshort(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_sshort() { - long __result = nffi_type_sshort(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_sshort} struct. */ - public static final FFIType ffi_type_sshort = ffi_type_sshort(); - - // --- [ ffi_type_uint ] --- - - private static native long nffi_type_uint(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_uint() { - long __result = nffi_type_uint(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_uint} struct. */ - public static final FFIType ffi_type_uint = ffi_type_uint(); - - // --- [ ffi_type_sint ] --- - - private static native long nffi_type_sint(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_sint() { - long __result = nffi_type_sint(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_sint} struct. */ - public static final FFIType ffi_type_sint = ffi_type_sint(); - - // --- [ ffi_type_ulong ] --- - - private static native long nffi_type_ulong(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_ulong() { - long __result = nffi_type_ulong(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_ulong} struct. */ - public static final FFIType ffi_type_ulong = ffi_type_ulong(); - - // --- [ ffi_type_slong ] --- - - private static native long nffi_type_slong(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_slong() { - long __result = nffi_type_slong(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_slong} struct. */ - public static final FFIType ffi_type_slong = ffi_type_slong(); - - // --- [ ffi_type_float ] --- - - private static native long nffi_type_float(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_float() { - long __result = nffi_type_float(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_float} struct. */ - public static final FFIType ffi_type_float = ffi_type_float(); - - // --- [ ffi_type_double ] --- - - private static native long nffi_type_double(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_double() { - long __result = nffi_type_double(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_double} struct. */ - public static final FFIType ffi_type_double = ffi_type_double(); - - // --- [ ffi_type_longdouble ] --- - - private static native long nffi_type_longdouble(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_longdouble() { - long __result = nffi_type_longdouble(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_longdouble} struct. */ - public static final FFIType ffi_type_longdouble = ffi_type_longdouble(); - - // --- [ ffi_type_pointer ] --- - - private static native long nffi_type_pointer(); - - @NativeType("ffi_type *") - private static FFIType ffi_type_pointer() { - long __result = nffi_type_pointer(); - return FFIType.create(__result); - } - - /** The {@code ffi_type_pointer} struct. */ - public static final FFIType ffi_type_pointer = ffi_type_pointer(); - - // --- [ ffi_prep_cif ] --- - - /** - * Unsafe version of: {@link #ffi_prep_cif prep_cif} - * - * @param nargs the number of arguments that this function accepts - */ - public static native int nffi_prep_cif(long cif, int abi, int nargs, long rtype, long atypes); - - /** - * Initializes the specified Call Interface (CIF) according to the given parameters. - * - *

    The resulting {@code ffi_cif} holds pointers to all the {@code ffi_type} objects that were used during initialization. You must ensure that these type - * objects have a lifetime at least as long as that of the {@code ffi_cif}.

    - * - * @param cif the {@code ffi_cif} structure to prepare - * @param abi the ABI to use; normally {@link #FFI_DEFAULT_ABI DEFAULT_ABI} is what you want. One of:
    {@link #FFI_FIRST_ABI FIRST_ABI}{@link #FFI_WIN64 WIN64}{@link #FFI_GNUW64 GNUW64}{@link #FFI_UNIX64 UNIX64}{@link #FFI_EFI64 EFI64}{@link #FFI_SYSV SYSV}{@link #FFI_STDCALL STDCALL}{@link #FFI_THISCALL THISCALL}{@link #FFI_FASTCALL FASTCALL}{@link #FFI_MS_CDECL MS_CDECL}{@link #FFI_PASCAL PASCAL}
    {@link #FFI_REGISTER REGISTER}{@link #FFI_VFP VFP}{@link #FFI_LAST_ABI LAST_ABI}{@link #FFI_DEFAULT_ABI DEFAULT_ABI}
    - * @param rtype a pointer to an {@code ffi_type} structure that describes the return type of the function - * @param atypes a vector of {@code ffi_type} pointers. {@code atypes} must have {@code nargs} elements. If {@code nargs} is 0, this argument is ignored. - * - * @return a status code, of type {@code ffi_status}. - * - *

    This will be either {@link #FFI_OK OK} if everything worked properly; {@link #FFI_BAD_TYPEDEF BAD_TYPEDEF} if one of the {@code ffi_type} objects is incorrect; or {@link #FFI_BAD_ABI BAD_ABI} if the ABI - * parameter is invalid.

    - */ - @NativeType("ffi_status") - public static int ffi_prep_cif(@NativeType("ffi_cif *") FFICIF cif, @NativeType("ffi_abi") int abi, @NativeType("ffi_type *") FFIType rtype, @Nullable @NativeType("ffi_type **") PointerBuffer atypes) { - return nffi_prep_cif(cif.address(), abi, remainingSafe(atypes), rtype.address(), memAddressSafe(atypes)); - } - - // --- [ ffi_prep_cif_var ] --- - - /** - * Unsafe version of: {@link #ffi_prep_cif_var prep_cif_var} - * - * @param ntotalargs the total number of arguments, including variadic and fixed arguments - */ - public static native int nffi_prep_cif_var(long cif, int abi, int nfixedargs, int ntotalargs, long rtype, long atypes); - - /** - * Initializes the specified Call Interface (CIF) according to the given parameters for a call to a variadic function. - * - *

    Different CIF's must be prepped for calls to the same function when different numbers of arguments are passed. A call to {@code ffi_prep_cif_var} with - * {@code nfixedargs == ntotalargs} is NOT equivalent to a call to {@link #ffi_prep_cif prep_cif}.

    - * - *

    The resulting {@code ffi_cif} holds pointers to all the {@code ffi_type} objects that were used during initialization. You must ensure that these type - * objects have a lifetime at least as long as that of the {@code ffi_cif}.

    - * - * @param cif the {@code ffi_cif} structure to prepare - * @param abi the ABI to use; normally {@link #FFI_DEFAULT_ABI DEFAULT_ABI} is what you want. One of:
    {@link #FFI_FIRST_ABI FIRST_ABI}{@link #FFI_WIN64 WIN64}{@link #FFI_GNUW64 GNUW64}{@link #FFI_UNIX64 UNIX64}{@link #FFI_EFI64 EFI64}{@link #FFI_SYSV SYSV}{@link #FFI_STDCALL STDCALL}{@link #FFI_THISCALL THISCALL}{@link #FFI_FASTCALL FASTCALL}{@link #FFI_MS_CDECL MS_CDECL}{@link #FFI_PASCAL PASCAL}
    {@link #FFI_REGISTER REGISTER}{@link #FFI_VFP VFP}{@link #FFI_LAST_ABI LAST_ABI}{@link #FFI_DEFAULT_ABI DEFAULT_ABI}
    - * @param nfixedargs the number of fixed arguments, prior to any variadic arguments. It must be greater than zero. - * @param rtype a pointer to an {@code ffi_type} structure that describes the return type of the function - * @param atypes a vector of {@code ffi_type} pointers. {@code atypes} must have {@code ntotalargs} elements. - * - * @return a status code, of type {@code ffi_status}. - * - *

    This will be either {@link #FFI_OK OK} if everything worked properly; {@link #FFI_BAD_TYPEDEF BAD_TYPEDEF} if one of the {@code ffi_type} objects is incorrect; or {@link #FFI_BAD_ABI BAD_ABI} if the ABI - * parameter is invalid.

    - */ - @NativeType("ffi_status") - public static int ffi_prep_cif_var(@NativeType("ffi_cif *") FFICIF cif, @NativeType("ffi_abi") int abi, @NativeType("unsigned int") int nfixedargs, @NativeType("ffi_type *") FFIType rtype, @NativeType("ffi_type **") PointerBuffer atypes) { - return nffi_prep_cif_var(cif.address(), abi, nfixedargs, atypes.remaining(), rtype.address(), memAddress(atypes)); - } - - // --- [ ffi_call ] --- - - /** Unsafe version of: {@link #ffi_call call} */ - public static native void nffi_call(long cif, long fn, long rvalue, long avalues); - - /** - * Calls the function {@code fn} according to the description given in {@code cif}. - * - *

    {@code cif} must have already been prepared using {@link #ffi_prep_cif prep_cif}.

    - * - * @param cif a {@link FFICIF} structure. It must be initialized with {@link #ffi_prep_cif prep_cif} or {@link #ffi_prep_cif_var prep_cif_var} before it is used with {@code ffi_call}. - * @param fn the function to call - * @param rvalue a pointer to a chunk of memory that will hold the result of the function call. - * - *

    This must be large enough to hold the result, no smaller than the system register size (generally 32 or 64 bits), and must be suitably aligned; it - * is the caller's responsibility to ensure this. If CIF declares that the function returns {@code void} (using {@link #ffi_type_void type_void}), then {@code rvalue} is - * ignored.

    - * - *

    In most situations, libffi will handle promotion according to the ABI. However, for historical reasons, there is a special case with return values - * that must be handled by your code. In particular, for integral (not {@code struct}) types that are narrower than the system register size, the - * return value will be widened by libffi. libffi provides a type, {@code ffi_arg}, that can be used as the return type. For example, if the CIF was - * defined with a return type of {@code char}, libffi will try to store a full {@code ffi_arg} into the return value.

    - * @param avalues a vector of {@code void *} pointers that point to the memory locations holding the argument values for a call. - * - *

    If {@code cif} declares that the function has no arguments (i.e., {@code nargs} was 0), then {@code avalues} is ignored. Note that argument values - * may be modified by the callee (for instance, structs passed by value); the burden of copying pass-by-value arguments is placed on the caller.

    - * - *

    Note that while the return value must be register-sized, arguments should exactly match their declared type. For example, if an argument is a - * {@code short}, then the entry in {@code avalues} should point to an object declared as {@code short}; but if the return type is {@code short}, then - * {@code rvalue} should point to an object declared as a larger type - usually {@code ffi_arg}.

    - */ - public static void ffi_call(@NativeType("ffi_cif *") FFICIF cif, @NativeType("FFI_FN_TYPE") long fn, @Nullable @NativeType("void *") ByteBuffer rvalue, @Nullable @NativeType("void **") PointerBuffer avalues) { - if (CHECKS) { - check(fn); - } - nffi_call(cif.address(), fn, memAddressSafe(rvalue), memAddressSafe(avalues)); - } - - // --- [ ffi_get_struct_offsets ] --- - - /** Unsafe version of: {@link #ffi_get_struct_offsets get_struct_offsets} */ - public static native int nffi_get_struct_offsets(int abi, long struct_type, long offsets); - - /** - * Computes the offset of each element of the given structure type. - * - * @param abi the ABI to use; this is needed because in some cases the layout depends on the ABI - * @param offsets an out parameter. The caller is responsible for providing enough space for all the results to be written - one element per element type in - * {@code struct_type}. If {@code offsets} is {@code NULL}, then the type will be laid out but not otherwise modified. This can be useful for accessing the - * type's size or layout. - * - * @return returns {@link #FFI_OK OK} on success; {@link #FFI_BAD_ABI BAD_ABI} if {@code abi} is invalid; or {@link #FFI_BAD_TYPEDEF BAD_TYPEDEF} if {@code struct_type} is invalid in some way. Note that only - * {@code FFI_STRUCT} types are valid here. - */ - @NativeType("ffi_status") - public static int ffi_get_struct_offsets(@NativeType("ffi_abi") int abi, @NativeType("ffi_type *") FFIType struct_type, @Nullable @NativeType("size_t *") PointerBuffer offsets) { - return nffi_get_struct_offsets(abi, struct_type.address(), memAddressSafe(offsets)); - } - - // --- [ ffi_closure_alloc ] --- - - /** Unsafe version of: {@link #ffi_closure_alloc closure_alloc} */ - public static native long nffi_closure_alloc(long size, long code); - - /** - * Allocates a chunk of memory holding {@code size} bytes. - * - *

    Returns a pointer to the writable address, and sets {@code *code} to the corresponding executable address.

    - * - * @param size the number of bytes to allocate. Should be sufficient to hold an {@code ffi_closure} object ({@link FFIClosure#SIZEOF}). - * @param code a buffer in which to place the returned executable address - * - * @return a pointer to the writable address - */ - @Nullable - @NativeType("ffi_closure *") - public static FFIClosure ffi_closure_alloc(@NativeType("size_t") long size, @NativeType("void **") PointerBuffer code) { - if (CHECKS) { - check(code, 1); - } - long __result = nffi_closure_alloc(size, memAddress(code)); - return FFIClosure.createSafe(__result); - } - - // --- [ ffi_closure_free ] --- - - /** Unsafe version of: {@link #ffi_closure_free closure_free} */ - public static native void nffi_closure_free(long writable); - - /** - * Frees memory allocated using {@link #ffi_closure_alloc closure_alloc}. - * - * @param writable the address of an {@link FFIClosure} structure - */ - public static void ffi_closure_free(@NativeType("ffi_closure *") FFIClosure writable) { - nffi_closure_free(writable.address()); - } - - // --- [ ffi_prep_closure_loc ] --- - - /** Unsafe version of: {@link #ffi_prep_closure_loc prep_closure_loc} */ - public static native int nffi_prep_closure_loc(long closure, long cif, long fun, long user_data, long codeloc); - - /** - * Prepares a closure function. - * - *

    After calling {@code ffi_prep_closure_loc,} you can cast {@code codeloc} to the appropriate pointer-to-function type.

    - * - * @param closure the address of an {@code ffi_closure} object; this is the writable address returned by {@link #ffi_closure_alloc closure_alloc}. - * @param cif the {@code ffi_cif} describing the function parameters - * @param fun the function which will be called when the closure is invoked. It is called with the arguments: - * - *
      - *
    • {@code cif} - The {@code ffi_cif} passed to {@code ffi_prep_closure_loc}.
    • - *
    • {@code ret} - a pointer to the memory used for the function's return value. - * - *

      If the function is declared as returning {@code void}, then this value is garbage and should not be used.

      - * - *

      Otherwise, {@code fun} must fill the object to which this points, following the same special promotion behavior as {@code ffi_call}. That is, - * in most cases, {@code ret} points to an object of exactly the size of the type specified when {@code cif} was constructed. However, integral - * types narrower than the system register size are widened. In these cases your program may assume that {@code ret} points to an {@code ffi_arg} - * object.

    • - *
    • {@code args} - a vector of pointers to memory holding the arguments to the function.
    • - *
    • {@code user_data} - the same USER_DATA that was passed to {@code ffi_prep_closure_loc}.
    • - *
    - * @param user_data an arbitrary datum that is passed, uninterpreted, to your closure function - * @param codeloc the executable address returned by {@link #ffi_closure_alloc closure_alloc}. - * - * @return {@link #FFI_OK OK} if everything went ok, and one of the other {@code ffi_status} values on error - */ - @NativeType("ffi_status") - public static int ffi_prep_closure_loc(@NativeType("ffi_closure *") FFIClosure closure, @NativeType("ffi_cif *") FFICIF cif, @NativeType("FFI_CLOSURE_FUN") long fun, @NativeType("void *") long user_data, @NativeType("void *") long codeloc) { - if (CHECKS) { - check(fun); - check(codeloc); - } - return nffi_prep_closure_loc(closure.address(), cif.address(), fun, user_data, codeloc); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/CMsghdr.java b/LWJGL/src/main/java/org/lwjgl/system/linux/CMsghdr.java deleted file mode 100644 index 1d829c7e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/CMsghdr.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct cmsghdr {
    - *     socklen_t {@link #cmsg_len};
    - *     int {@link #cmsg_level};
    - *     int {@link #cmsg_type};
    - *     char cmsg_data[0];
    - * }
    - */ -@NativeType("struct cmsghdr") -public class CMsghdr extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CMSG_LEN, - CMSG_LEVEL, - CMSG_TYPE, - CMSG_DATA; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __array(1, 0) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CMSG_LEN = layout.offsetof(0); - CMSG_LEVEL = layout.offsetof(1); - CMSG_TYPE = layout.offsetof(2); - CMSG_DATA = layout.offsetof(3); - } - - protected CMsghdr(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected CMsghdr create(long address, @Nullable ByteBuffer container) { - return new CMsghdr(address, container); - } - - /** - * Creates a {@code CMsghdr} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public CMsghdr(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** data byte count, including header */ - @NativeType("socklen_t") - public int cmsg_len() { return ncmsg_len(address()); } - /** originating protocol */ - public int cmsg_level() { return ncmsg_level(address()); } - /** protocol-specific type */ - public int cmsg_type() { return ncmsg_type(address()); } - /** @return a {@link ByteBuffer} view of the {@code cmsg_data} field. */ - @NativeType("char[0]") - public ByteBuffer cmsg_data() { return ncmsg_data(address()); } - /** @return the value at the specified index of the {@code cmsg_data} field. */ - @NativeType("char") - public byte cmsg_data(int index) { return ncmsg_data(address(), index); } - - /** Sets the specified value to the {@link #cmsg_len} field. */ - public CMsghdr cmsg_len(@NativeType("socklen_t") int value) { ncmsg_len(address(), value); return this; } - /** Sets the specified value to the {@link #cmsg_level} field. */ - public CMsghdr cmsg_level(int value) { ncmsg_level(address(), value); return this; } - /** Sets the specified value to the {@link #cmsg_type} field. */ - public CMsghdr cmsg_type(int value) { ncmsg_type(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code cmsg_data} field. */ - public CMsghdr cmsg_data(@NativeType("char[0]") ByteBuffer value) { ncmsg_data(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code cmsg_data} field. */ - public CMsghdr cmsg_data(int index, @NativeType("char") byte value) { ncmsg_data(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public CMsghdr set( - int cmsg_len, - int cmsg_level, - int cmsg_type, - ByteBuffer cmsg_data - ) { - cmsg_len(cmsg_len); - cmsg_level(cmsg_level); - cmsg_type(cmsg_type); - cmsg_data(cmsg_data); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public CMsghdr set(CMsghdr src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code CMsghdr} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static CMsghdr malloc() { - return new CMsghdr(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code CMsghdr} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static CMsghdr calloc() { - return new CMsghdr(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code CMsghdr} instance allocated with {@link BufferUtils}. */ - public static CMsghdr create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new CMsghdr(memAddress(container), container); - } - - /** Returns a new {@code CMsghdr} instance for the specified memory address. */ - public static CMsghdr create(long address) { - return new CMsghdr(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static CMsghdr createSafe(long address) { - return address == NULL ? null : new CMsghdr(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code CMsghdr} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static CMsghdr malloc(MemoryStack stack) { - return new CMsghdr(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code CMsghdr} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static CMsghdr calloc(MemoryStack stack) { - return new CMsghdr(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cmsg_len}. */ - public static int ncmsg_len(long struct) { return UNSAFE.getInt(null, struct + CMsghdr.CMSG_LEN); } - /** Unsafe version of {@link #cmsg_level}. */ - public static int ncmsg_level(long struct) { return UNSAFE.getInt(null, struct + CMsghdr.CMSG_LEVEL); } - /** Unsafe version of {@link #cmsg_type}. */ - public static int ncmsg_type(long struct) { return UNSAFE.getInt(null, struct + CMsghdr.CMSG_TYPE); } - /** Unsafe version of {@link #cmsg_data}. */ - public static ByteBuffer ncmsg_data(long struct) { return memByteBuffer(struct + CMsghdr.CMSG_DATA, 0); } - /** Unsafe version of {@link #cmsg_data(int) cmsg_data}. */ - public static byte ncmsg_data(long struct, int index) { - return UNSAFE.getByte(null, struct + CMsghdr.CMSG_DATA + check(index, 0) * 1); - } - - /** Unsafe version of {@link #cmsg_len(int) cmsg_len}. */ - public static void ncmsg_len(long struct, int value) { UNSAFE.putInt(null, struct + CMsghdr.CMSG_LEN, value); } - /** Unsafe version of {@link #cmsg_level(int) cmsg_level}. */ - public static void ncmsg_level(long struct, int value) { UNSAFE.putInt(null, struct + CMsghdr.CMSG_LEVEL, value); } - /** Unsafe version of {@link #cmsg_type(int) cmsg_type}. */ - public static void ncmsg_type(long struct, int value) { UNSAFE.putInt(null, struct + CMsghdr.CMSG_TYPE, value); } - /** Unsafe version of {@link #cmsg_data(ByteBuffer) cmsg_data}. */ - public static void ncmsg_data(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 0); } - memCopy(memAddress(value), struct + CMsghdr.CMSG_DATA, value.remaining() * 1); - } - /** Unsafe version of {@link #cmsg_data(int, byte) cmsg_data}. */ - public static void ncmsg_data(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + CMsghdr.CMSG_DATA + check(index, 0) * 1, value); - } - - // ----------------------------------- - - /** An array of {@link CMsghdr} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final CMsghdr ELEMENT_FACTORY = CMsghdr.create(-1L); - - /** - * Creates a new {@code CMsghdr.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link CMsghdr#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected CMsghdr getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link CMsghdr#cmsg_len} field. */ - @NativeType("socklen_t") - public int cmsg_len() { return CMsghdr.ncmsg_len(address()); } - /** @return the value of the {@link CMsghdr#cmsg_level} field. */ - public int cmsg_level() { return CMsghdr.ncmsg_level(address()); } - /** @return the value of the {@link CMsghdr#cmsg_type} field. */ - public int cmsg_type() { return CMsghdr.ncmsg_type(address()); } - /** @return a {@link ByteBuffer} view of the {@code cmsg_data} field. */ - @NativeType("char[0]") - public ByteBuffer cmsg_data() { return CMsghdr.ncmsg_data(address()); } - /** @return the value at the specified index of the {@code cmsg_data} field. */ - @NativeType("char") - public byte cmsg_data(int index) { return CMsghdr.ncmsg_data(address(), index); } - - /** Sets the specified value to the {@link CMsghdr#cmsg_len} field. */ - public Buffer cmsg_len(@NativeType("socklen_t") int value) { CMsghdr.ncmsg_len(address(), value); return this; } - /** Sets the specified value to the {@link CMsghdr#cmsg_level} field. */ - public Buffer cmsg_level(int value) { CMsghdr.ncmsg_level(address(), value); return this; } - /** Sets the specified value to the {@link CMsghdr#cmsg_type} field. */ - public Buffer cmsg_type(int value) { CMsghdr.ncmsg_type(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code cmsg_data} field. */ - public Buffer cmsg_data(@NativeType("char[0]") ByteBuffer value) { CMsghdr.ncmsg_data(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code cmsg_data} field. */ - public Buffer cmsg_data(int index, @NativeType("char") byte value) { CMsghdr.ncmsg_data(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/DynamicLinkLoader.java b/LWJGL/src/main/java/org/lwjgl/system/linux/DynamicLinkLoader.java deleted file mode 100644 index 785aaffb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/DynamicLinkLoader.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <dlfcn.h>. */ -public class DynamicLinkLoader { - - static { Library.initialize(); } - - /** The {@code mode} argument to {@link #dlopen} contains one of the following. */ - public static final int - RTLD_LAZY = 0x1, - RTLD_NOW = 0x2, - RTLD_BINDING_MASK = 0x3, - RTLD_NOLOAD = 0x4, - RTLD_DEEPBIND = 0x8; - - /** - * If the following bit is set in the {@code mode} argument to {@link #dlopen}, the symbols of the loaded object and its dependencies are made visible as - * if the object were linked directly into the program. - */ - public static final int RTLD_GLOBAL = 0x100; - - /** - * Unix98 demands the following flag which is the inverse to {@link #RTLD_GLOBAL}. The implementation does this by default and so we can define the value - * to zero. - */ - public static final int RTLD_LOCAL = 0; - - /** Do not delete object when closed. */ - public static final int RTLD_NODELETE = 0x1000; - - protected DynamicLinkLoader() { - throw new UnsupportedOperationException(); - } - - // --- [ dlopen ] --- - - /** Unsafe version of: {@link #dlopen} */ - public static native long ndlopen(long filename, int mode); - - /** - * Loads the dynamic library file named by the null-terminated string {@code filename} and returns an opaque "handle" for the dynamic library. If - * {@code filename} is {@code NULL}, then the returned handle is for the main program. - * - * @param filename the name of the dynamic library to open, or {@code NULL} - * @param mode a bitfield. One or more of:
    {@link #RTLD_LAZY}{@link #RTLD_NOW}{@link #RTLD_BINDING_MASK}{@link #RTLD_NOLOAD}{@link #RTLD_DEEPBIND}{@link #RTLD_GLOBAL}
    {@link #RTLD_LOCAL}{@link #RTLD_NODELETE}
    - */ - @NativeType("void *") - public static long dlopen(@Nullable @NativeType("char const *") ByteBuffer filename, int mode) { - if (CHECKS) { - checkNT1Safe(filename); - } - return ndlopen(memAddressSafe(filename), mode); - } - - /** - * Loads the dynamic library file named by the null-terminated string {@code filename} and returns an opaque "handle" for the dynamic library. If - * {@code filename} is {@code NULL}, then the returned handle is for the main program. - * - * @param filename the name of the dynamic library to open, or {@code NULL} - * @param mode a bitfield. One or more of:
    {@link #RTLD_LAZY}{@link #RTLD_NOW}{@link #RTLD_BINDING_MASK}{@link #RTLD_NOLOAD}{@link #RTLD_DEEPBIND}{@link #RTLD_GLOBAL}
    {@link #RTLD_LOCAL}{@link #RTLD_NODELETE}
    - */ - @NativeType("void *") - public static long dlopen(@Nullable @NativeType("char const *") CharSequence filename, int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(filename, true); - long filenameEncoded = filename == null ? NULL : stack.getPointerAddress(); - return ndlopen(filenameEncoded, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ dlerror ] --- - - /** Unsafe version of: {@link #dlerror} */ - public static native long ndlerror(); - - /** - * Returns a human readable string describing the most recent error that occurred from {@link #dlopen}, {@link #dlsym} or {@link #dlclose} since - * the last call to {@code dlerror()}. It returns {@code NULL} if no errors have occurred since initialization or since it was last called. - */ - @Nullable - @NativeType("char *") - public static String dlerror() { - long __result = ndlerror(); - return memUTF8Safe(__result); - } - - // --- [ dlsym ] --- - - /** Unsafe version of: {@link #dlsym} */ - public static native long ndlsym(long handle, long name); - - /** - * Takes a "handle" of a dynamic library returned by {@link #dlopen} and the null-terminated symbol name, returning the address where that symbol is loaded - * into memory. If the symbol is not found, in the specified library or any of the libraries that were automatically loaded by {@link #dlopen} when that - * library was loaded, {@code dlsym()} returns {@code NULL}. - * - * @param handle the dynamic library handle - * @param name the symbol name - */ - @NativeType("void *") - public static long dlsym(@NativeType("void *") long handle, @NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - check(handle); - checkNT1(name); - } - return ndlsym(handle, memAddress(name)); - } - - /** - * Takes a "handle" of a dynamic library returned by {@link #dlopen} and the null-terminated symbol name, returning the address where that symbol is loaded - * into memory. If the symbol is not found, in the specified library or any of the libraries that were automatically loaded by {@link #dlopen} when that - * library was loaded, {@code dlsym()} returns {@code NULL}. - * - * @param handle the dynamic library handle - * @param name the symbol name - */ - @NativeType("void *") - public static long dlsym(@NativeType("void *") long handle, @NativeType("char const *") CharSequence name) { - if (CHECKS) { - check(handle); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return ndlsym(handle, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ dlclose ] --- - - /** Unsafe version of: {@link #dlclose} */ - public static native int ndlclose(long handle); - - /** - * Decrements the reference count on the dynamic library handle handle. If the reference count drops to zero and no other loaded libraries use symbols in - * it, then the dynamic library is unloaded. - * - * @param handle the dynamic library to close - */ - public static int dlclose(@NativeType("void *") long handle) { - if (CHECKS) { - check(handle); - } - return ndlclose(handle); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/EpollData.java b/LWJGL/src/main/java/org/lwjgl/system/linux/EpollData.java deleted file mode 100644 index 3d913117..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/EpollData.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * union epoll_data_t {
    - *     void * ptr;
    - *     int fd;
    - *     uint32_t u32;
    - *     uint64_t u64;
    - * }
    - */ -@NativeType("union epoll_data_t") -public class EpollData extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PTR, - FD, - U32, - U64; - - static { - Layout layout = __union( - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PTR = layout.offsetof(0); - FD = layout.offsetof(1); - U32 = layout.offsetof(2); - U64 = layout.offsetof(3); - } - - protected EpollData(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected EpollData create(long address, @Nullable ByteBuffer container) { - return new EpollData(address, container); - } - - /** - * Creates a {@code EpollData} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public EpollData(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code ptr} field. */ - @NativeType("void *") - public long ptr() { return nptr(address()); } - /** @return the value of the {@code fd} field. */ - public int fd() { return nfd(address()); } - /** @return the value of the {@code u32} field. */ - @NativeType("uint32_t") - public int u32() { return nu32(address()); } - /** @return the value of the {@code u64} field. */ - @NativeType("uint64_t") - public long u64() { return nu64(address()); } - - /** Sets the specified value to the {@code ptr} field. */ - public EpollData ptr(@NativeType("void *") long value) { nptr(address(), value); return this; } - /** Sets the specified value to the {@code fd} field. */ - public EpollData fd(int value) { nfd(address(), value); return this; } - /** Sets the specified value to the {@code u32} field. */ - public EpollData u32(@NativeType("uint32_t") int value) { nu32(address(), value); return this; } - /** Sets the specified value to the {@code u64} field. */ - public EpollData u64(@NativeType("uint64_t") long value) { nu64(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public EpollData set(EpollData src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code EpollData} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static EpollData malloc() { - return new EpollData(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code EpollData} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static EpollData calloc() { - return new EpollData(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code EpollData} instance allocated with {@link BufferUtils}. */ - public static EpollData create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new EpollData(memAddress(container), container); - } - - /** Returns a new {@code EpollData} instance for the specified memory address. */ - public static EpollData create(long address) { - return new EpollData(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static EpollData createSafe(long address) { - return address == NULL ? null : new EpollData(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code EpollData} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static EpollData malloc(MemoryStack stack) { - return new EpollData(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code EpollData} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static EpollData calloc(MemoryStack stack) { - return new EpollData(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #ptr}. */ - public static long nptr(long struct) { return memGetAddress(struct + EpollData.PTR); } - /** Unsafe version of {@link #fd}. */ - public static int nfd(long struct) { return UNSAFE.getInt(null, struct + EpollData.FD); } - /** Unsafe version of {@link #u32}. */ - public static int nu32(long struct) { return UNSAFE.getInt(null, struct + EpollData.U32); } - /** Unsafe version of {@link #u64}. */ - public static long nu64(long struct) { return UNSAFE.getLong(null, struct + EpollData.U64); } - - /** Unsafe version of {@link #ptr(long) ptr}. */ - public static void nptr(long struct, long value) { memPutAddress(struct + EpollData.PTR, check(value)); } - /** Unsafe version of {@link #fd(int) fd}. */ - public static void nfd(long struct, int value) { UNSAFE.putInt(null, struct + EpollData.FD, value); } - /** Unsafe version of {@link #u32(int) u32}. */ - public static void nu32(long struct, int value) { UNSAFE.putInt(null, struct + EpollData.U32, value); } - /** Unsafe version of {@link #u64(long) u64}. */ - public static void nu64(long struct, long value) { UNSAFE.putLong(null, struct + EpollData.U64, value); } - - // ----------------------------------- - - /** An array of {@link EpollData} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final EpollData ELEMENT_FACTORY = EpollData.create(-1L); - - /** - * Creates a new {@code EpollData.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link EpollData#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected EpollData getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code ptr} field. */ - @NativeType("void *") - public long ptr() { return EpollData.nptr(address()); } - /** @return the value of the {@code fd} field. */ - public int fd() { return EpollData.nfd(address()); } - /** @return the value of the {@code u32} field. */ - @NativeType("uint32_t") - public int u32() { return EpollData.nu32(address()); } - /** @return the value of the {@code u64} field. */ - @NativeType("uint64_t") - public long u64() { return EpollData.nu64(address()); } - - /** Sets the specified value to the {@code ptr} field. */ - public Buffer ptr(@NativeType("void *") long value) { EpollData.nptr(address(), value); return this; } - /** Sets the specified value to the {@code fd} field. */ - public Buffer fd(int value) { EpollData.nfd(address(), value); return this; } - /** Sets the specified value to the {@code u32} field. */ - public Buffer u32(@NativeType("uint32_t") int value) { EpollData.nu32(address(), value); return this; } - /** Sets the specified value to the {@code u64} field. */ - public Buffer u64(@NativeType("uint64_t") long value) { EpollData.nu64(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/EpollEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/EpollEvent.java deleted file mode 100644 index 5dd89d8d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/EpollEvent.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct epoll_event {
    - *     uint32_t {@link #events};
    - *     {@link EpollData epoll_data_t} {@link #data};
    - * }
    - */ -@NativeType("struct epoll_event") -public class EpollEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - EVENTS, - DATA; - - static { - Layout layout = __struct( - __member(4), - __member(EpollData.SIZEOF, EpollData.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - EVENTS = layout.offsetof(0); - DATA = layout.offsetof(1); - } - - protected EpollEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected EpollEvent create(long address, @Nullable ByteBuffer container) { - return new EpollEvent(address, container); - } - - /** - * Creates a {@code EpollEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public EpollEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** epoll events */ - @NativeType("uint32_t") - public int events() { return nevents(address()); } - /** user data variable */ - @NativeType("epoll_data_t") - public EpollData data() { return ndata(address()); } - - /** Sets the specified value to the {@link #events} field. */ - public EpollEvent events(@NativeType("uint32_t") int value) { nevents(address(), value); return this; } - /** Copies the specified {@link EpollData} to the {@link #data} field. */ - public EpollEvent data(@NativeType("epoll_data_t") EpollData value) { ndata(address(), value); return this; } - /** Passes the {@link #data} field to the specified {@link java.util.function.Consumer Consumer}. */ - public EpollEvent data(java.util.function.Consumer consumer) { consumer.accept(data()); return this; } - - /** Initializes this struct with the specified values. */ - public EpollEvent set( - int events, - EpollData data - ) { - events(events); - data(data); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public EpollEvent set(EpollEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code EpollEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static EpollEvent malloc() { - return new EpollEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code EpollEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static EpollEvent calloc() { - return new EpollEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code EpollEvent} instance allocated with {@link BufferUtils}. */ - public static EpollEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new EpollEvent(memAddress(container), container); - } - - /** Returns a new {@code EpollEvent} instance for the specified memory address. */ - public static EpollEvent create(long address) { - return new EpollEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static EpollEvent createSafe(long address) { - return address == NULL ? null : new EpollEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code EpollEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static EpollEvent malloc(MemoryStack stack) { - return new EpollEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code EpollEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static EpollEvent calloc(MemoryStack stack) { - return new EpollEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #events}. */ - public static int nevents(long struct) { return UNSAFE.getInt(null, struct + EpollEvent.EVENTS); } - /** Unsafe version of {@link #data}. */ - public static EpollData ndata(long struct) { return EpollData.create(struct + EpollEvent.DATA); } - - /** Unsafe version of {@link #events(int) events}. */ - public static void nevents(long struct, int value) { UNSAFE.putInt(null, struct + EpollEvent.EVENTS, value); } - /** Unsafe version of {@link #data(EpollData) data}. */ - public static void ndata(long struct, EpollData value) { memCopy(value.address(), struct + EpollEvent.DATA, EpollData.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link EpollEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final EpollEvent ELEMENT_FACTORY = EpollEvent.create(-1L); - - /** - * Creates a new {@code EpollEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link EpollEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected EpollEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link EpollEvent#events} field. */ - @NativeType("uint32_t") - public int events() { return EpollEvent.nevents(address()); } - /** @return a {@link EpollData} view of the {@link EpollEvent#data} field. */ - @NativeType("epoll_data_t") - public EpollData data() { return EpollEvent.ndata(address()); } - - /** Sets the specified value to the {@link EpollEvent#events} field. */ - public Buffer events(@NativeType("uint32_t") int value) { EpollEvent.nevents(address(), value); return this; } - /** Copies the specified {@link EpollData} to the {@link EpollEvent#data} field. */ - public Buffer data(@NativeType("epoll_data_t") EpollData value) { EpollEvent.ndata(address(), value); return this; } - /** Passes the {@link EpollEvent#data} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer data(java.util.function.Consumer consumer) { consumer.accept(data()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/FCNTL.java b/LWJGL/src/main/java/org/lwjgl/system/linux/FCNTL.java deleted file mode 100644 index 5a9d3d39..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/FCNTL.java +++ /dev/null @@ -1,858 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <fcntl.h>. */ -public class FCNTL { - - static { Library.initialize(); } - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #O_ACCMODE O_ACCMODE}
    • - *
    • {@link #O_RDONLY O_RDONLY}
    • - *
    • {@link #O_WRONLY O_WRONLY}
    • - *
    • {@link #O_RDWR O_RDWR}
    • - *
    • {@link #O_APPEND O_APPEND} - - * The file is opened in append mode. - * - *

      Before each {@code write(2)}, the file offset is positioned at the end of the file, as if with {@code lseek(2)}. {@code O_APPEND} may lead to - * corrupted files on NFS file systems if more than one process appends data to a file at once. This is because NFS does not support appending to a - * file, so the client kernel has to simulate it, which can't be done without a race condition.

      - *
    • - *
    • {@link #O_ASYNC O_ASYNC} - - * Enable signal-driven I/O: generate a signal ({@code SIGIO} by default, but this can be changed via {@code fcntl(2)}) when input or output becomes - * possible on this file descriptor. - * - *

      This feature is only available for terminals, pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs. See {@code fcntl(2)} for further - * details.

      - *
    • - *
    • {@link #O_CLOEXEC O_CLOEXEC} - - * Enable the close-on-exec flag for the new file descriptor. - * - *

      Specifying this flag permits a program to avoid additional {@code fcntl(2) F_SETFD} operations to set the {@code FD_CLOEXEC} flag. Additionally, - * use of this flag is essential in some multithreaded programs since using a separate {@code fcntl(2) F_SETFD} operation to set the - * {@code FD_CLOEXEC} flag does not suffice to avoid race conditions where one thread opens a file descriptor at the same time as another thread does - * a {@code fork(2)} plus {@code execve(2)}.

      - *
    • - *
    • {@link #O_CREAT O_CREAT} - - * If the file does not exist it will be created. - * - *

      The owner (user ID) of the file is set to the effective user ID of the process. The group ownership (group ID) is set either to the effective group - * ID of the process or to the group ID of the parent directory (depending on file system type and mount options, and the mode of the parent - * directory, see the mount options {@code bsdgroups} and {@code sysvgroups} described in {@code mount(8)}).

      - *
    • - *
    • {@link #O_DIRECT O_DIRECT} - - * Try to minimize cache effects of the I/O to and from this file. - * - *

      In general this will degrade performance, but it is useful in special situations, such as when applications do their own caching. File I/O is done - * directly to/from user-space buffers. The {@code O_DIRECT} flag on its own makes an effort to transfer data synchronously, but does not give the - * guarantees of the {@code O_SYNC} flag that data and necessary metadata are transferred. To guarantee synchronous I/O, {@code O_SYNC} must be used - * in addition to {@code O_DIRECT}.

      - * - *

      A semantically similar (but deprecated) interface for block devices is described in {@code raw(8)}.

      - *
    • - *
    • {@link #O_DIRECTORY O_DIRECTORY} - - * If pathname is not a directory, cause the open to fail. - * - *

      This flag is Linux-specific, and was added in kernel version 2.1.126, to avoid denial-of-service problems if {@code opendir(3)} is called on a FIFO - * or tape device, but should not be used outside of the implementation of {@code opendir(3)}.

      - *
    • - *
    • {@link #O_DSYNC O_DSYNC}
    • - *
    • {@link #O_EXCL O_EXCL} - - * Ensure that this call creates the file: if this flag is specified in conjunction with {@code O_CREAT}, and pathname already exists, then - * {@code open()} will fail. - * - *

      When these two flags are specified, symbolic links are not followed: if {@code pathname} is a symbolic link, then {@code open()} fails regardless - * of where the symbolic link points to.

      - * - *

      In general, the behavior of {@code O_EXCL} is undefined if it is used without {@code O_CREAT}. There is one exception: on Linux 2.6 and later, - * {@code O_EXCL} can be used without {@code O_CREAT} if {@code pathname} refers to a block device. If the block device is in use by the system (e.g., - * mounted), {@code open()} fails with the error {@code EBUSY}.

      - * - *

      On NFS, {@code O_EXCL} is only supported when using NFSv3 or later on kernel 2.6 or later. In NFS environments where {@code O_EXCL} support is not - * provided, programs that rely on it for performing locking tasks will contain a race condition. Portable programs that want to perform atomic file - * locking using a lockfile, and need to avoid reliance on NFS support for {@code O_EXCL}, can create a unique file on the same file system (e.g., - * incorporating hostname and PID), and use {@code link(2)} to make a link to the lockfile. If {@code link(2)} returns 0, the lock is successful. - * Otherwise, use {@code stat(2)} on the unique file to check if its link count has increased to 2, in which case the lock is also successful.

      - *
    • - *
    • {@link #O_LARGEFILE O_LARGEFILE} - - * (LFS) Allow files whose sizes cannot be represented in an {@code off_t} (but can be represented in an {@code off64_t}) to be opened. - * - *

      The {@code _LARGEFILE64_SOURCE} macro must be defined (before including any header files) in order to obtain this definition. Setting the - * {@code _FILE_OFFSET_BITS} feature test macro to 64 (rather than using {@code O_LARGEFILE}) is the preferred method of accessing large files on - * 32-bit systems (see {@code feature_test_macros(7)}).

      - *
    • - *
    • {@link #O_NOATIME O_NOATIME} - - * Do not update the file last access time ({@code st_atime} in the {@code inode}) when the file is {@code read(2)}. - * - *

      This flag is intended for use by indexing or backup programs, where its use can significantly reduce the amount of disk activity. This flag may not - * be effective on all file systems. One example is NFS, where the server maintains the access time.

      - *
    • - *
    • {@link #O_NOCTTY O_NOCTTY} - - * If {@code pathname} refers to a terminal device --see {@code tty(4)}-- it will not become the process's controlling terminal even if the process - * does not have one. - *
    • - *
    • {@link #O_NOFOLLOW O_NOFOLLOW} - - * If {@code pathname} is a symbolic link, then the open fails. - * - *

      This is a FreeBSD extension, which was added to Linux in version 2.1.126. Symbolic links in earlier components of the {@code pathname} will still - * be followed.

      - *
    • - *
    • {@link #O_NONBLOCK O_NONBLOCK} - - * When possible, the file is opened in nonblocking mode. - * - *

      Neither the {@code open()} nor any subsequent operations on the file descriptor which is returned will cause the calling process to wait. For the - * handling of FIFOs (named pipes), see also {@code fifo(7)}. For a discussion of the effect of {@code O_NONBLOCK} in conjunction with mandatory file - * locks and with file leases, see {@code fcntl(2)}.

      - *
    • - *
    • {@link #O_NDELAY O_NDELAY}
    • - *
    • {@link #O_PATH O_PATH}
    • - *
    • {@link #O_SYNC O_SYNC} - - * The file is opened for synchronous I/O. - * - *

      Any {@code write(2)}s on the resulting file descriptor will block the calling process until the data has been physically written to the underlying - * hardware.

      - *
    • - *
    • {@link #O_TMPFILE O_TMPFILE}
    • - *
    • {@link #O_TRUNC O_TRUNC} - - * If the file already exists and is a regular file and the open mode allows writing (i.e., is {@code O_RDWR} or {@code O_WRONLY}) it will be - * truncated to length 0. - * - *

      If the file is a FIFO or terminal device file, the {@code O_TRUNC} flag is ignored. Otherwise the effect of {@code O_TRUNC} is unspecified.

      - *
    • - *
    - */ - public static final int - O_ACCMODE = 00000003, - O_RDONLY = 00000000, - O_WRONLY = 00000001, - O_RDWR = 00000002, - O_APPEND = 00002000, - O_ASYNC = 020000, - O_CLOEXEC = 02000000, - O_CREAT = 00000100, - O_DIRECT = 040000, - O_DIRECTORY = 0200000, - O_DSYNC = 00010000, - O_EXCL = 00000200, - O_LARGEFILE = 00100000, - O_NOATIME = 01000000, - O_NOCTTY = 00000400, - O_NOFOLLOW = 00400000, - O_NONBLOCK = 00004000, - O_NDELAY = O_NONBLOCK, - O_PATH = 010000000, - O_SYNC = 04010000, - O_TMPFILE = 020000000 | O_DIRECTORY, - O_TRUNC = 00001000; - - /** - * File types encoded in type {@code mode_t}. - * - *
    Enum values:
    - * - *
      - *
    • {@link #S_IFMT S_IFMT} - Type of file.
    • - *
    • {@link #S_IFBLK S_IFBLK} - Block special.
    • - *
    • {@link #S_IFCHR S_IFCHR} - Character special.
    • - *
    • {@link #S_IFIFO S_IFIFO} - FIFO special.
    • - *
    • {@link #S_IFREG S_IFREG} - Regular.
    • - *
    • {@link #S_IFDIR S_IFDIR} - Directory.
    • - *
    • {@link #S_IFLNK S_IFLNK} - Symbolic link.
    • - *
    • {@link #S_IFSOCK S_IFSOCK} - Socket.
    • - *
    - */ - public static final int - S_IFMT = 00170000, - S_IFBLK = 0060000, - S_IFCHR = 0020000, - S_IFIFO = 0010000, - S_IFREG = 0100000, - S_IFDIR = 0040000, - S_IFLNK = 0120000, - S_IFSOCK = 0140000; - - /** - * File mode bits encoded in type {@code mode_t}. - * - *
    Enum values:
    - * - *
      - *
    • {@link #S_IRWXU S_IRWXU} - Read, write, execute/search by owner.
    • - *
    • {@link #S_IRUSR S_IRUSR} - Read permission, owner.
    • - *
    • {@link #S_IWUSR S_IWUSR} - Write permission, owner.
    • - *
    • {@link #S_IXUSR S_IXUSR} - Execute/search permission, owner.
    • - *
    • {@link #S_IRWXG S_IRWXG} - Read, write, execute/search by group.
    • - *
    • {@link #S_IRGRP S_IRGRP} - Read permission, group.
    • - *
    • {@link #S_IWGRP S_IWGRP} - Write permission, group.
    • - *
    • {@link #S_IXGRP S_IXGRP} - Execute/search permission, group.
    • - *
    • {@link #S_IRWXO S_IRWXO} - Read, write, execute/search by others.
    • - *
    • {@link #S_IROTH S_IROTH} - Read permission, others.
    • - *
    • {@link #S_IWOTH S_IWOTH} - Write permission, others.
    • - *
    • {@link #S_IXOTH S_IXOTH} - Execute/search permission, others.
    • - *
    • {@link #S_ISUID S_ISUID} - Set-user-ID on execution.
    • - *
    • {@link #S_ISGID S_ISGID} - Set-group-ID on execution.
    • - *
    • {@link #S_ISVTX S_ISVTX} - On directories, restricted deletion flag.
    • - *
    - */ - public static final int - S_IRWXU = 0700, - S_IRUSR = 0400, - S_IWUSR = 0200, - S_IXUSR = 0100, - S_IRWXG = 070, - S_IRGRP = 040, - S_IWGRP = 020, - S_IXGRP = 010, - S_IRWXO = 07, - S_IROTH = 04, - S_IWOTH = 02, - S_IXOTH = 01, - S_ISUID = 04000, - S_ISGID = 02000, - S_ISVTX = 01000; - - /** - * {@link #fcntl} commands. - * - *
    Enum values:
    - * - *
      - *
    • {@link #F_DUPFD F_DUPFD} - - * Duplicate the file descriptor {@code fd} using the lowest-numbered available file descriptor greater than or equal to {@code arg}. - * - *

      This is different from {@code dup2(2)}, which uses exactly the file descriptor specified.

      - * - *

      On success, the new file descriptor is returned.

      - * - *

      See {@code dup(2)} for further details.

      - *
    • - *
    • {@link #F_GETFD F_GETFD} - Return (as the function result) the file descriptor flags; {@code arg} is ignored.
    • - *
    • {@link #F_SETFD F_SETFD} - Set the file descriptor flags to the value specified by {@code arg}.
    • - *
    • {@link #F_GETFL F_GETFL} - Return (as the function result) the file access mode and the file status flags; {@code arg} is ignored.
    • - *
    • {@link #F_SETFL F_SETFL} - - * Set the file status flags to the value specified by {@code arg}. - * - *

      File access mode ({@link #O_RDONLY}, {@link #O_WRONLY}, {@link #O_RDWR}) and file creation flags (i.e., {@link #O_CREAT}, {@link #O_EXCL}, {@link #O_NOCTTY}, {@link #O_TRUNC}) in {@code arg} are ignored. - * On Linux, this command can change only the {@link #O_APPEND}, {@link #O_ASYNC}, {@link #O_DIRECT}, {@link #O_NOATIME}, and {@link #O_NONBLOCK} flags. It is not possible to change the - * {@link #O_DSYNC} and {@link #O_SYNC} flags; see BUGS, below.

      - *
    • - *
    • {@link #F_GETLK F_GETLK} - - * On input to this call, lock describes a lock we would like to place on the file. - * - *

      If the lock could be placed, {@code fcntl()} does not actually place it, but returns {@link #F_UNLCK} in the {@code l_type} field of lock and leaves the - * other fields of the structure unchanged.

      - * - *

      If one or more incompatible locks would prevent this lock being placed, then {@code fcntl()} returns details about one of those locks in the - * {@code l_type}, {@code l_whence}, {@code l_start}, and {@code l_len} fields of lock. If the conflicting lock is a traditional (process-associated) - * record lock, then the {@code l_pid} field is set to the {@code PID} of the process holding that lock. If the conflicting lock is an open file - * description lock, then {@code l_pid} is set to -1. Note that the returned information may already be out of date by the time the caller inspects - * it.

      - *
    • - *
    • {@link #F_SETLK F_SETLK} - - * Acquire a lock (when {@code l_type} is {@link #F_RDLCK} or {@link #F_WRLCK}) or release a lock (when {@code l_type} is {@link #F_UNLCK}) on the bytes specified by the - * {@code l_whence}, {@code l_start}, and {@code l_len} fields of lock. - * - *

      If a conflicting lock is held by another process, this call returns -1 and sets {@code errno} to {@code EACCES} or {@code EAGAIN}. (The error - * returned in this case differs across implementations, so POSIX requires a portable application to check for both errors.)

      - *
    • - *
    • {@link #F_SETLKW F_SETLKW} - - * As for {@link #F_SETLK}, but if a conflicting lock is held on the file, then wait for that lock to be released. - * - *

      If a signal is caught while waiting, then the call is interrupted and (after the signal handler has returned) returns immediately (with return - * value -1 and errno set to {@code EINTR}; see {@code signal(7)}).

      - *
    • - *
    • {@link #F_SETOWN F_SETOWN} - - * Set the process ID or process group ID that will receive {@code SIGIO} and {@code SIGURG} signals for events on the file descriptor {@code fd}. - * - *

      The target process or process group ID is specified in {@code arg}. A process ID is specified as a positive value; a process group ID is specified - * as a negative value. Most commonly, the calling process specifies itself as the owner (that is, {@code arg} is specified as {@code getpid(2)}).

      - * - *

      As well as setting the file descriptor owner, one must also enable generation of signals on the file descriptor. This is done by using the - * {@code fcntl()} {@link #F_SETFL} command to set the {@link #O_ASYNC} file status flag on the file descriptor. Subsequently, a {@code SIGIO} signal is sent whenever - * input or output becomes possible on the file descriptor. The {@code fcntl()} {@link #F_SETSIG} command can be used to obtain delivery of a signal other - * than {@code SIGIO}.

      - * - *

      Sending a signal to the owner process (group) specified by {@code F_SETOWN} is subject to the same permissions checks as are described for - * {@code kill(2)}, where the sending process is the one that employs {@code F_SETOWN} (but see BUGS below). If this permission check fails, then the - * signal is silently discarded. Note: The {@code F_SETOWN} operation records the caller's credentials at the time of the {@code fcntl()} call, and it - * is these saved credentials that are used for the permission checks.

      - * - *

      If the file descriptor {@code fd} refers to a socket, {@code F_SETOWN} also selects the recipient of {@code SIGURG} signals that are delivered when - * out-of-band data arrives on that socket. ({@code SIGURG} is sent in any situation where {@code select(2)} would report the socket as having an - * "exceptional condition".)

      - * - *

      The following was true in 2.6.x kernels up to and including kernel 2.6.11:

      - * - *

      If a nonzero value is given to {@link #F_SETSIG} in a multithreaded process running with a threading library that supports thread groups (e.g., NPTL), then - * a positive value given to {@code F_SETOWN} has a different meaning: instead of being a process ID identifying a whole process, it is a thread ID - * identifying a specific thread within a process. Consequently, it may be necessary to pass {@code F_SETOWN} the result of {@code gettid(2)} instead - * of {@code getpid(2)} to get sensible results when {@code F_SETSIG} is used. (In current Linux threading implementations, a main thread's thread ID - * is the same as its process ID. This means that a single-threaded program can equally use {@code gettid(2)} or {@code getpid(2)} in this scenario.) - * Note, however, that the statements in this paragraph do not apply to the {@code SIGURG} signal generated for out-of-band data on a socket: this - * signal is always sent to either a process or a process group, depending on the value given to {@code F_SETOWN}.

      - * - *

      The above behavior was accidentally dropped in Linux 2.6.12, and won't be restored. From Linux 2.6.32 onward, use {@link #F_SETOWN_EX} to target - * {@code SIGIO} and {@code SIGURG} signals at a particular thread.

      - *
    • - *
    • {@link #F_GETOWN F_GETOWN} - - * Return (as the function result) the process ID or process group ID currently receiving {@code SIGIO} and {@code SIGURG} signals for events on file - * descriptor {@code fd}. - * - *

      Process IDs are returned as positive values; process group IDs are returned as negative values (but see BUGS below). {@code arg} is ignored.

      - *
    • - *
    • {@link #F_SETSIG F_SETSIG} - - * Set the signal sent when input or output becomes possible to the value given in {@code arg}. - * - *

      A value of zero means to send the default {@code SIGIO} signal. Any other value (including {@code SIGIO}) is the signal to send instead, and in - * this case additional info is available to the signal handler if installed with {@code SA_SIGINFO}.

      - * - *

      By using {@code F_SETSIG} with a nonzero value, and setting {@code SA_SIGINFO} for the signal handler (see {@code sigaction(2)}), extra information - * about I/O events is passed to the handler in a {@code siginfo_t} structure. If the {@code si_code} field indicates the source is {@code SI_SIGIO}, - * the {@code si_fd} field gives the file descriptor associated with the event. Otherwise, there is no indication which file descriptors are pending, - * and you should use the usual mechanisms ({@code select(2)}, {@code poll(2)}, {@code read(2)} with {@code O_NONBLOCK} set etc.) to determine which - * file descriptors are available for I/O.

      - * - *

      Note that the file descriptor provided in {@code si_fd} is the one that was specified during the {@code F_SETSIG} operation. This can lead to an - * unusual corner case. If the file descriptor is duplicated ({@code dup(2)} or similar), and the original file descriptor is closed, then I/O events - * will continue to be generated, but the {@code si_fd} field will contain the number of the now closed file descriptor.

      - * - *

      By selecting a real time signal (value ≥ {@code SIGRTMIN}), multiple I/O events may be queued using the same signal numbers. (Queuing is - * dependent on available memory.) Extra information is available if {@code SA_SIGINFO} is set for the signal handler, as above.

      - * - *

      Note that Linux imposes a limit on the number of real-time signals that may be queued to a process (see {@code getrlimit(2)} and {@code signal(7)}) - * and if this limit is reached, then the kernel reverts to delivering {@code SIGIO}, and this signal is delivered to the entire process rather than - * to a specific thread.

      - *
    • - *
    • {@link #F_GETSIG F_GETSIG} - - * Return (as the function result) the signal sent when input or output becomes possible. - * - *

      A value of zero means {@code SIGIO} is sent. Any other value (including {@code SIGIO}) is the signal sent instead, and in this case additional info - * is available to the signal handler if installed with {@code SA_SIGINFO}. {@code arg} is ignored.

      - *
    • - *
    • {@link #F_SETOWN_EX F_SETOWN_EX} - - * This operation performs a similar task to {@link #F_SETOWN}. It allows the caller to direct I/O availability signals to a specific thread, process, or - * process group. - * - *

      The caller specifies the target of signals via {@code arg}, which is a pointer to a {@link FOwnerEx} structure. The type field has one of the following - * values, which define how pid is interpreted: {@link #F_OWNER_TID}, {@link #F_OWNER_PID}, {@link #F_OWNER_PGRP}.

      - *
    • - *
    • {@link #F_GETOWN_EX F_GETOWN_EX} - - * Return the current file descriptor owner settings as defined by a previous {@link #F_SETOWN_EX} operation. - * - *

      The information is returned in the {@link FOwnerEx} structure pointed to by {@code arg}.

      - * - *

      The type field will have one of the values {@link #F_OWNER_TID}, {@link #F_OWNER_PID}, or {@link #F_OWNER_PGRP}. The {@code pid} field is a positive integer representing a - * thread ID, process ID, or process group ID. See {@link #F_SETOWN_EX} for more details.

      - *
    • - *
    • {@link #F_OFD_GETLK F_OFD_GETLK} - - * On input to this call, {@code lock} describes an open file description lock we would like to place on the file. - * - *

      If the lock could be placed, {@code fcntl()} does not actually place it, but returns {@link #F_UNLCK} in the {@code l_type} field of {@code lock} and - * leaves the other fields of the structure unchanged. If one or more incompatible locks would prevent this lock being placed, then details about one - * of these locks are returned via {@code lock}, as described above for {@link #F_GETLK}.

      - *
    • - *
    • {@link #F_OFD_SETLK F_OFD_SETLK} - - * Acquire an open file description lock (when {@code l_type} is {@link #F_RDLCK} or {@link #F_WRLCK}) or release an open file description lock (when {@code l_type} - * is {@link #F_UNLCK}) on the bytes specified by the {@code l_whence}, {@code l_start}, and {@code l_len} fields of {@code lock}. - * - *

      If a conflicting lock is held by another process, this call returns -1 and sets {@code errno} to {@code EAGAIN}.

      - *
    • - *
    • {@link #F_OFD_SETLKW F_OFD_SETLKW} - - * As for {@link #F_OFD_SETLK}, but if a conflicting lock is held on the file, then wait for that lock to be released. - * - *

      If a signal is caught while waiting, then the call is interrupted and (after the signal handler has returned) returns immediately (with return - * value -1 and {@code errno} set to {@code EINTR}; see {@code signal(7)}).

      - *
    • - *
    • {@link #F_SETLEASE F_SETLEASE} - Set or remove a file lease according to which of the following values is specified in the integer {@code arg}: {@link #F_RDLCK}, {@link #F_WRLCK}, {@link #F_UNLCK}
    • - *
    • {@link #F_GETLEASE F_GETLEASE} - - * Indicates what type of lease is associated with the file descriptor {@code fd} by returning either {@link #F_RDLCK}, {@link #F_WRLCK}, or {@link #F_UNLCK}, indicating, - * respectively, a read lease, a write lease, or no lease. {@code arg} is ignored. - *
    • - *
    • {@link #F_NOTIFY F_NOTIFY} - - * (Linux 2.4 onward) Provide notification when the directory referred to by {@code fd} or any of the files that it contains is changed. - * - *

      The events to be notified are specified in {@code arg}, which is a bit mask specified by ORing together zero or more of the following bits: - * {@link #DN_ACCESS}, {@link #DN_MODIFY}, {@link #DN_CREATE}, {@link #DN_DELETE}, {@link #DN_RENAME}, {@link #DN_ATTRIB}

      - * - *

      (In order to obtain these definitions, the {@code _GNU_SOURCE} feature test macro must be defined before including any header files.)

      - * - *

      Directory notifications are normally "one-shot", and the application must reregister to receive further notifications. Alternatively, if - * {@link #DN_MULTISHOT} is included in {@code arg}, then notification will remain in effect until explicitly removed.

      - * - *

      A series of {@code F_NOTIFY} requests is cumulative, with the events in {@code arg} being added to the set already monitored. To disable - * notification of all events, make an {@code F_NOTIFY} call specifying {@code arg} as 0.

      - * - *

      Notification occurs via delivery of a signal. The default signal is {@code SIGIO}, but this can be changed using the {@link #F_SETSIG} command to - * {@code fcntl()}. (Note that {@code SIGIO} is one of the nonqueuing standard signals; switching to the use of a real-time signal means that multiple - * notifications can be queued to the process.) In the latter case, the signal handler receives a {@code siginfo_t} structure as its second argument - * (if the handler was established using {@code SA_SIGINFO}) and the {@code si_fd} field of this structure contains the file descriptor which - * generated the notification (useful when establishing notification on multiple directories).

      - * - *

      Especially when using {@code DN_MULTISHOT}, a real time signal should be used for notification, so that multiple notifications can be queued.

      - * - *

      NOTE: New applications should use the {@code inotify} interface (available since kernel 2.6.13), which provides a much superior interface for - * obtaining notifications of filesystem events. See {@code inotify(7)}.

      - *
    • - *
    • {@link #F_SETPIPE_SZ F_SETPIPE_SZ} - - * Change the capacity of the pipe referred to by {@code fd} to be at least {@code arg} bytes. - * - *

      An unprivileged process can adjust the pipe capacity to any value between the system page size and the limit defined in - * {@code /proc/sys/fs/pipe-max-size} (see {@code proc(5)}). Attempts to set the pipe capacity below the page size are silently rounded up to the page - * size. Attempts by an unprivileged process to set the pipe capacity above the limit in {@code /proc/sys/fs/pipe-max-size} yield the error - * {@code EPERM}; a privileged process ({@code CAP_SYS_RESOURCE}) can override the limit.

      - * - *

      When allocating the buffer for the pipe, the kernel may use a capacity larger than {@code arg}, if that is convenient for the implementation. (In - * the current implementation, the allocation is the next higher power-of-two page-size multiple of the requested size.) The actual capacity (in - * bytes) that is set is returned as the function result.

      - * - *

      Attempting to set the pipe capacity smaller than the amount of buffer space currently used to store data produces the error {@code EBUSY}.

      - * - *

      Note that because of the way the pages of the pipe buffer are employed when data is written to the pipe, the number of bytes that can be written - * may be less than the nominal size, depending on the size of the writes.

      - *
    • - *
    • {@link #F_GETPIPE_SZ F_GETPIPE_SZ} - Return (as the function result) the capacity of the pipe referred to by {@code fd}.
    • - *
    • {@link #F_ADD_SEALS F_ADD_SEALS} - - * Add the seals given in the bit-mask argument {@code arg} to the set of seals of the {@code inode} referred to by the file descriptor {@code fd}. - * - *

      Seals cannot be removed again. Once this call succeeds, the seals are enforced by the kernel immediately. If the current set of seals includes - * {@link #F_SEAL_SEAL} (see below), then this call will be rejected with {@code EPERM}. Adding a seal that is already set is a no-op, in case - * {@code F_SEAL_SEAL} is not set already. In order to place a seal, the file descriptor {@code fd} must be writable.

      - *
    • - *
    • {@link #F_GET_SEALS F_GET_SEALS} - - * Return (as the function result) the current set of seals of the {@code inode} referred to by {@code fd}. - * - *

      If no seals are set, 0 is returned. If the file does not support sealing, -1 is returned and {@code errno} is set to {@code EINVAL}.

      - *
    • - *
    • {@link #F_GET_RW_HINT F_GET_RW_HINT} - Returns the value of the read/write hint associated with the underlying {@code inode} referred to by {@code fd}.
    • - *
    • {@link #F_SET_RW_HINT F_SET_RW_HINT} - - * Sets the read/write hint value associated with the underlying {@code inode} referred to by {@code fd}. - * - *

      This hint persists until either it is explicitly modified or the underlying filesystem is unmounted.

      - *
    • - *
    • {@link #F_GET_FILE_RW_HINT F_GET_FILE_RW_HINT} - Returns the value of the read/write hint associated with the open file description referred to by {@code fd}.
    • - *
    • {@link #F_SET_FILE_RW_HINT F_SET_FILE_RW_HINT} - Sets the read/write hint value associated with the open file description referred to by {@code fd}.
    • - *
    • {@link #F_DUPFD_CLOEXEC F_DUPFD_CLOEXEC} - - * As for {@link #F_DUPFD}, but additionally set the close-on-exec flag for the duplicate file descriptor. - * - *

      Specifying this flag permits a program to avoid an additional {@code fcntl()} {@link #F_SETFD} operation to set the {@link #FD_CLOEXEC} flag. For an explanation of - * why this flag is useful, see the description of {@link #O_CLOEXEC} in {@code open(2)}.

      - *
    • - *
    - */ - public static final int - F_DUPFD = 0, - F_GETFD = 1, - F_SETFD = 2, - F_GETFL = 3, - F_SETFL = 4, - F_GETLK = 5, - F_SETLK = 8, - F_SETLKW = 7, - F_SETOWN = 8, - F_GETOWN = 9, - F_SETSIG = 10, - F_GETSIG = 11, - F_SETOWN_EX = 15, - F_GETOWN_EX = 16, - F_OFD_GETLK = 36, - F_OFD_SETLK = 37, - F_OFD_SETLKW = 38, - F_SETLEASE = 1024, - F_GETLEASE = 1025, - F_NOTIFY = 1026, - F_SETPIPE_SZ = 1031, - F_GETPIPE_SZ = 1032, - F_ADD_SEALS = 1033, - F_GET_SEALS = 1034, - F_GET_RW_HINT = 1035, - F_SET_RW_HINT = 1036, - F_GET_FILE_RW_HINT = 1037, - F_SET_FILE_RW_HINT = 1038, - F_DUPFD_CLOEXEC = 1030; - - public static final int FD_CLOEXEC = 1; - - /** - * For posix {@link #fcntl} and {@code l_type} field of an {@link Flock} for {@code lockf()}. - * - *
    Enum values:
    - * - *
      - *
    • {@link #F_RDLCK F_RDLCK} - - * Take out a read lease. - * - *

      This will cause the calling process to be notified when the file is opened for writing or is truncated. A read lease can be placed only on a file - * descriptor that is opened read-only.

      - *
    • - *
    • {@link #F_WRLCK F_WRLCK} - - * Take out a write lease. - * - *

      This will cause the caller to be notified when the file is opened for reading or writing or is truncated. A write lease may be placed on a file - * only if there are no other open file descriptors for the file.

      - *
    • - *
    • {@link #F_UNLCK F_UNLCK} - Remove our lease from the file.
    • - *
    • {@link #F_EXLCK F_EXLCK}
    • - *
    • {@link #F_SHLCK F_SHLCK}
    • - *
    - */ - public static final int - F_RDLCK = 0, - F_WRLCK = 1, - F_UNLCK = 2, - F_EXLCK = 4, - F_SHLCK = 8; - - /** - * {@link FOwnerEx}{@code ::type} values. - * - *
    Enum values:
    - * - *
      - *
    • {@link #F_OWNER_TID F_OWNER_TID} - - * Send the signal to the thread whose thread ID (the value returned by a call to {@code clone(2)} or {@code gettid(2)}) is specified in {@code pid}. - *
    • - *
    • {@link #F_OWNER_PID F_OWNER_PID} - Send the signal to the process whose ID is specified in {@code pid}.
    • - *
    • {@link #F_OWNER_PGRP F_OWNER_PGRP} - - * Send the signal to the process group whose ID is specified in {@code pid}. - * - *

      (Note that, unlike with {@link #F_SETOWN}, a process group ID is specified as a positive value here.)

      - *
    • - *
    - */ - public static final int - F_OWNER_TID = 0, - F_OWNER_PID = 1, - F_OWNER_PGRP = 2; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #LOCK_SH LOCK_SH} - shared lock
    • - *
    • {@link #LOCK_EX LOCK_EX} - exclusive lock
    • - *
    • {@link #LOCK_NB LOCK_NB} - or'd with one of the above to prevent blocking
    • - *
    • {@link #LOCK_UN LOCK_UN} - remove lock
    • - *
    • {@link #LOCK_MAND LOCK_MAND} - This is a mandatory flock...
    • - *
    • {@link #LOCK_READ LOCK_READ} - which allows concurrent read operations
    • - *
    • {@link #LOCK_WRITE LOCK_WRITE} - which allows concurrent write operations
    • - *
    • {@link #LOCK_RW LOCK_RW} - which allows concurrent read & writes ops
    • - *
    - */ - public static final int - LOCK_SH = 1, - LOCK_EX = 2, - LOCK_NB = 4, - LOCK_UN = 8, - LOCK_MAND = 32, - LOCK_READ = 64, - LOCK_WRITE = 128, - LOCK_RW = 192; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #DN_ACCESS DN_ACCESS} - A file was accessed ({@code read(2)}, {@code pread(2)}, {@code readv(2)}, and similar).
    • - *
    • {@link #DN_MODIFY DN_MODIFY} - A file was modified ({@code write(2)}, {@code pwrite(2)}, {@code writev(2)}, {@code truncate(2)}, {@code ftruncate(2)}, and similar).
    • - *
    • {@link #DN_CREATE DN_CREATE} - - * A file was created ({@code open(2)}, {@code creat(2)}, {@code mknod(2)}, {@code mkdir(2)}, {@code link(2)}, {@code symlink(2)}, {@code rename(2)} - * into this directory). - *
    • - *
    • {@link #DN_DELETE DN_DELETE} - A file was unlinked ({@code unlink(2)}, {@code rename(2)} to another directory, {@code rmdir(2)}).
    • - *
    • {@link #DN_RENAME DN_RENAME} - A file was renamed within this directory ({@code rename(2)}).
    • - *
    • {@link #DN_ATTRIB DN_ATTRIB} - The attributes of a file were changed ({@code chown(2)}, {@code chmod(2)}, {@code utime(2)}, {@code utimensat(2)}, and similar).
    • - *
    • {@link #DN_MULTISHOT DN_MULTISHOT} - Don't remove notifier
    • - *
    - */ - public static final int - DN_ACCESS = 0x1, - DN_MODIFY = 0x2, - DN_CREATE = 0x4, - DN_DELETE = 0x8, - DN_RENAME = 0x10, - DN_ATTRIB = 0x20, - DN_MULTISHOT = 0x80000000; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #F_SEAL_SEAL F_SEAL_SEAL} - - * If this seal is set, any further call to {@code fcntl()} with {@link #F_ADD_SEALS} fails with the error {@code EPERM}. - * - *

      Therefore, this seal prevents any modifications to the set of seals itself. If the initial set of seals of a file includes {@code F_SEAL_SEAL}, - * then this effectively causes the set of seals to be constant and locked.

      - *
    • - *
    • {@link #F_SEAL_SHRINK F_SEAL_SHRINK} - - * If this seal is set, the file in question cannot be reduced in size. - * - *

      This affects {@code open(2)} with the {@link #O_TRUNC} flag as well as {@code truncate(2)} and {@code ftruncate(2)}. Those calls fail with {@code EPERM} if - * you try to shrink the file in question. Increasing the file size is still possible.

      - *
    • - *
    • {@link #F_SEAL_GROW F_SEAL_GROW} - - * If this seal is set, the size of the file in question cannot be increased. - * - *

      This affects {@code write(2)} beyond the end of the file, {@code truncate(2)}, {@code ftruncate(2)}, and {@code fallocate(2)}. These calls fail - * with {@code EPERM} if you use them to increase the file size. If you keep the size or shrink it, those calls still work as expected.

      - *
    • - *
    • {@link #F_SEAL_WRITE F_SEAL_WRITE} - - * If this seal is set, you cannot modify the contents of the file. - * - *

      Note that shrinking or growing the size of the file is still possible and allowed. Thus, this seal is normally used in combination with one of the - * other seals. This seal affects {@code write(2)} and {@code fallocate(2)} (only in combination with the {@code FALLOC_FL_PUNCH_HOLE} flag). Those - * calls fail with {@code EPERM} if this seal is set. Furthermore, trying to create new shared, writable memory-mappings via {@code mmap(2)} will also - * fail with {@code EPERM}.

      - * - *

      Using the {@link #F_ADD_SEALS} operation to set the {@code F_SEAL_WRITE} seal fails with {@code EBUSY} if any writable, shared mapping exists. Such - * mappings must be unmapped before you can add this seal. Furthermore, if there are any asynchronous I/O operations ({@code io_submit(2)}) pending on - * the file, all outstanding writes will be discarded.

      - *
    • - *
    • {@link #F_SEAL_FUTURE_WRITE F_SEAL_FUTURE_WRITE} - - * The effect of this seal is similar to {@link #F_SEAL_WRITE}, but the contents of the file can still be modified via shared writable mappings that were - * created prior to the seal being set. - * - *

      Any attempt to create a new writable mapping on the file via {@code mmap(2)} will fail with {@code EPERM}. Likewise, an attempt to write to the - * file via {@code write(2)} will fail with {@code EPERM}.

      - * - *

      Using this seal, one process can create a memory buffer that it can continue to modify while sharing that buffer on a "read-only" basis with other - * processes.

      - * - *

      (since Linux 5.1)

      - *
    • - *
    - */ - public static final int - F_SEAL_SEAL = 0x0001, - F_SEAL_SHRINK = 0x0002, - F_SEAL_GROW = 0x0004, - F_SEAL_WRITE = 0x0008, - F_SEAL_FUTURE_WRITE = 0x0010; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #RWH_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET} - No specific hint has been set. This is the default value.
    • - *
    • {@link #RWH_WRITE_LIFE_NONE RWH_WRITE_LIFE_NONE} - No specific write lifetime is associated with this file or {@code inode}.
    • - *
    • {@link #RWH_WRITE_LIFE_SHORT RWH_WRITE_LIFE_SHORT} - Data written to this {@code inode} or via this open file description is expected to have a short lifetime.
    • - *
    • {@link #RWH_WRITE_LIFE_MEDIUM RWH_WRITE_LIFE_MEDIUM} - - * Data written to this {@code inode} or via this open file description is expected to have a lifetime longer than data written with - * {@link #RWH_WRITE_LIFE_SHORT}. - *
    • - *
    • {@link #RWH_WRITE_LIFE_LONG RWH_WRITE_LIFE_LONG} - - * Data written to this {@code inode} or via this open file description is expected to have a lifetime longer than data written with - * {@link #RWH_WRITE_LIFE_MEDIUM}. - *
    • - *
    • {@link #RWH_WRITE_LIFE_EXTREME RWH_WRITE_LIFE_EXTREME} - - * Data written to this {@code inode} or via this open file description is expected to have a lifetime longer than data written with - * {@link #RWH_WRITE_LIFE_LONG}. - *
    • - *
    - */ - public static final int - RWH_WRITE_LIFE_NOT_SET = 0, - RWH_WRITE_LIFE_NONE = 1, - RWH_WRITE_LIFE_SHORT = 2, - RWH_WRITE_LIFE_MEDIUM = 3, - RWH_WRITE_LIFE_LONG = 4, - RWH_WRITE_LIFE_EXTREME = 5; - - protected FCNTL() { - throw new UnsupportedOperationException(); - } - - // --- [ open ] --- - - /** Unsafe version of: {@link #open} */ - public static native int nopen(long pathname, int flags, int mode); - - /** - * Given a {@code pathname} for a file, {@code open()} returns a file descriptor, a small, nonnegative integer for use in subsequent system calls - * ({@code read(2)}, {@code write(2)}, {@code lseek(2)}, {@code fcntl(2)}, etc.). - * - *

    The file descriptor returned by a successful call will be the lowest-numbered file descriptor not currently open for the process.

    - * - * @param mode one or more of:
    {@link #S_IRWXU}{@link #S_IRUSR}{@link #S_IWUSR}{@link #S_IXUSR}{@link #S_IRWXG}{@link #S_IRGRP}{@link #S_IWGRP}{@link #S_IXGRP}{@link #S_IRWXO}{@link #S_IROTH}{@link #S_IWOTH}
    {@link #S_IXOTH}{@link #S_ISUID}{@link #S_ISGID}{@link #S_ISVTX}
    - * - * @return the new file descriptor, or -1 if an error occurred (in which case, {@code errno} is set appropriately). - */ - public static int open(@NativeType("char const *") ByteBuffer pathname, int flags, @NativeType("mode_t") int mode) { - if (CHECKS) { - checkNT1(pathname); - } - return nopen(memAddress(pathname), flags, mode); - } - - /** - * Given a {@code pathname} for a file, {@code open()} returns a file descriptor, a small, nonnegative integer for use in subsequent system calls - * ({@code read(2)}, {@code write(2)}, {@code lseek(2)}, {@code fcntl(2)}, etc.). - * - *

    The file descriptor returned by a successful call will be the lowest-numbered file descriptor not currently open for the process.

    - * - * @param mode one or more of:
    {@link #S_IRWXU}{@link #S_IRUSR}{@link #S_IWUSR}{@link #S_IXUSR}{@link #S_IRWXG}{@link #S_IRGRP}{@link #S_IWGRP}{@link #S_IXGRP}{@link #S_IRWXO}{@link #S_IROTH}{@link #S_IWOTH}
    {@link #S_IXOTH}{@link #S_ISUID}{@link #S_ISGID}{@link #S_ISVTX}
    - * - * @return the new file descriptor, or -1 if an error occurred (in which case, {@code errno} is set appropriately). - */ - public static int open(@NativeType("char const *") CharSequence pathname, int flags, @NativeType("mode_t") int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pathname, true); - long pathnameEncoded = stack.getPointerAddress(); - return nopen(pathnameEncoded, flags, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ openat ] --- - - /** Unsafe version of: {@link #openat} */ - public static native int nopenat(int dirfd, long pathname, int flags, int mode); - - /** - * The {@code openat()} system call operates in exactly the same way as {@code open(2)}, except for the differences described in this manual page. - * - *

    If the pathname given in {@code pathname} is relative, then it is interpreted relative to the directory referred to by the file descriptor - * {@code dirfd} (rather than relative to the current working directory of the calling process, as is done by {@code open(2)} for a relative pathname).

    - * - *

    If {@code pathname} is relative and {@code dirfd} is the special value {@code AT_FDCWD}, then pathname is interpreted relative to the current working - * directory of the calling process (like {@code open(2)}).

    - * - *

    If {@code pathname} is absolute, then {@code dirfd} is ignored.

    - * - * @param mode one or more of:
    {@link #S_IRWXU}{@link #S_IRUSR}{@link #S_IWUSR}{@link #S_IXUSR}{@link #S_IRWXG}{@link #S_IRGRP}{@link #S_IWGRP}{@link #S_IXGRP}{@link #S_IRWXO}{@link #S_IROTH}{@link #S_IWOTH}
    {@link #S_IXOTH}{@link #S_ISUID}{@link #S_ISGID}{@link #S_ISVTX}
    - * - * @return a new file descriptor on success. On error, -1 is returned and {@code errno} is set to indicate the error. - */ - public static int openat(int dirfd, @NativeType("char const *") ByteBuffer pathname, int flags, @NativeType("mode_t") int mode) { - if (CHECKS) { - checkNT1(pathname); - } - return nopenat(dirfd, memAddress(pathname), flags, mode); - } - - /** - * The {@code openat()} system call operates in exactly the same way as {@code open(2)}, except for the differences described in this manual page. - * - *

    If the pathname given in {@code pathname} is relative, then it is interpreted relative to the directory referred to by the file descriptor - * {@code dirfd} (rather than relative to the current working directory of the calling process, as is done by {@code open(2)} for a relative pathname).

    - * - *

    If {@code pathname} is relative and {@code dirfd} is the special value {@code AT_FDCWD}, then pathname is interpreted relative to the current working - * directory of the calling process (like {@code open(2)}).

    - * - *

    If {@code pathname} is absolute, then {@code dirfd} is ignored.

    - * - * @param mode one or more of:
    {@link #S_IRWXU}{@link #S_IRUSR}{@link #S_IWUSR}{@link #S_IXUSR}{@link #S_IRWXG}{@link #S_IRGRP}{@link #S_IWGRP}{@link #S_IXGRP}{@link #S_IRWXO}{@link #S_IROTH}{@link #S_IWOTH}
    {@link #S_IXOTH}{@link #S_ISUID}{@link #S_ISGID}{@link #S_ISVTX}
    - * - * @return a new file descriptor on success. On error, -1 is returned and {@code errno} is set to indicate the error. - */ - public static int openat(int dirfd, @NativeType("char const *") CharSequence pathname, int flags, @NativeType("mode_t") int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pathname, true); - long pathnameEncoded = stack.getPointerAddress(); - return nopenat(dirfd, pathnameEncoded, flags, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ creat ] --- - - /** Unsafe version of: {@link #creat} */ - public static native int ncreat(long pathname, int mode); - - /** - * Equivalent to {@code open()} with {@code flags} equal to {@code O_CREAT|O_WRONLY|O_TRUNC}. - * - * @param mode one or more of:
    {@link #S_IRWXU}{@link #S_IRUSR}{@link #S_IWUSR}{@link #S_IXUSR}{@link #S_IRWXG}{@link #S_IRGRP}{@link #S_IWGRP}{@link #S_IXGRP}{@link #S_IRWXO}{@link #S_IROTH}{@link #S_IWOTH}
    {@link #S_IXOTH}{@link #S_ISUID}{@link #S_ISGID}{@link #S_ISVTX}
    - */ - public static int creat(@NativeType("char const *") ByteBuffer pathname, @NativeType("mode_t") int mode) { - if (CHECKS) { - checkNT1(pathname); - } - return ncreat(memAddress(pathname), mode); - } - - /** - * Equivalent to {@code open()} with {@code flags} equal to {@code O_CREAT|O_WRONLY|O_TRUNC}. - * - * @param mode one or more of:
    {@link #S_IRWXU}{@link #S_IRUSR}{@link #S_IWUSR}{@link #S_IXUSR}{@link #S_IRWXG}{@link #S_IRGRP}{@link #S_IWGRP}{@link #S_IXGRP}{@link #S_IRWXO}{@link #S_IROTH}{@link #S_IWOTH}
    {@link #S_IXOTH}{@link #S_ISUID}{@link #S_ISGID}{@link #S_ISVTX}
    - */ - public static int creat(@NativeType("char const *") CharSequence pathname, @NativeType("mode_t") int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(pathname, true); - long pathnameEncoded = stack.getPointerAddress(); - return ncreat(pathnameEncoded, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ fcntl ] --- - - /** - * Performs one of the operations determined by {@code cmd} on the open file descriptor {@code fd}. - * - *

    {@code fcntl()} can take an optional third argument. Whether or not this argument is required is determined by {@code cmd}. The required argument type - * is indicated in parentheses after each {@code cmd} name (in most cases, the required type is {@code int}, and we identify the argument using the name - * {@code arg}), or {@code void} is specified if the argument is not required.

    - * - *

    LWJGL note: Use {@link #fcntli} or {@link #fcntlp} to pass a third argument of the appropriate type.

    - * - *

    Certain of the operations below are supported only since a particular Linux kernel version. The preferred method of checking whether the host kernel - * supports a particular operation is to invoke {@code fcntl()} with the desired {@code cmd} value and then test whether the call failed with - * {@code EINVAL}, indicating that the kernel does not recognize this value.

    - * - * @param cmd one of:
    {@link #F_DUPFD}{@link #F_GETFD}{@link #F_SETFD}{@link #F_GETFL}{@link #F_SETFL}{@link #F_GETLK}{@link #F_SETLK}{@link #F_SETLKW}
    {@link #F_SETOWN}{@link #F_GETOWN}{@link #F_SETSIG}{@link #F_GETSIG}{@link #F_SETOWN_EX}{@link #F_GETOWN_EX}{@link #F_OFD_GETLK}{@link #F_OFD_SETLK}
    {@link #F_OFD_SETLKW}{@link #F_SETLEASE}{@link #F_GETLEASE}{@link #F_NOTIFY}{@link #F_SETPIPE_SZ}{@link #F_GETPIPE_SZ}{@link #F_ADD_SEALS}{@link #F_GET_SEALS}
    {@link #F_GET_RW_HINT}{@link #F_SET_RW_HINT}{@link #F_GET_FILE_RW_HINT}{@link #F_SET_FILE_RW_HINT}{@link #F_DUPFD_CLOEXEC}
    - */ - public static native int fcntl(int fd, int cmd); - - // --- [ fcntli ] --- - - /** Unsafe version of: {@link #fcntli} */ - public static native int nfcntli(int fd, int cmd, int arg); - - /** - * {@link #fcntl} overload that takes a third argument of type {@code int}. - * - * @param cmd one of:
    {@link #F_DUPFD}{@link #F_GETFD}{@link #F_SETFD}{@link #F_GETFL}{@link #F_SETFL}{@link #F_GETLK}{@link #F_SETLK}{@link #F_SETLKW}
    {@link #F_SETOWN}{@link #F_GETOWN}{@link #F_SETSIG}{@link #F_GETSIG}{@link #F_SETOWN_EX}{@link #F_GETOWN_EX}{@link #F_OFD_GETLK}{@link #F_OFD_SETLK}
    {@link #F_OFD_SETLKW}{@link #F_SETLEASE}{@link #F_GETLEASE}{@link #F_NOTIFY}{@link #F_SETPIPE_SZ}{@link #F_GETPIPE_SZ}{@link #F_ADD_SEALS}{@link #F_GET_SEALS}
    {@link #F_GET_RW_HINT}{@link #F_SET_RW_HINT}{@link #F_GET_FILE_RW_HINT}{@link #F_SET_FILE_RW_HINT}{@link #F_DUPFD_CLOEXEC}
    - */ - public static int fcntli(int fd, int cmd, int arg) { - return nfcntli(fd, cmd, arg); - } - - // --- [ fcntlp ] --- - - /** Unsafe version of: {@link #fcntlp} */ - public static native int nfcntlp(int fd, int cmd, long arg); - - /** - * {@link #fcntl} overload that takes a third argument of type {@code void *}. - * - * @param cmd one of:
    {@link #F_DUPFD}{@link #F_GETFD}{@link #F_SETFD}{@link #F_GETFL}{@link #F_SETFL}{@link #F_GETLK}{@link #F_SETLK}{@link #F_SETLKW}
    {@link #F_SETOWN}{@link #F_GETOWN}{@link #F_SETSIG}{@link #F_GETSIG}{@link #F_SETOWN_EX}{@link #F_GETOWN_EX}{@link #F_OFD_GETLK}{@link #F_OFD_SETLK}
    {@link #F_OFD_SETLKW}{@link #F_SETLEASE}{@link #F_GETLEASE}{@link #F_NOTIFY}{@link #F_SETPIPE_SZ}{@link #F_GETPIPE_SZ}{@link #F_ADD_SEALS}{@link #F_GET_SEALS}
    {@link #F_GET_RW_HINT}{@link #F_SET_RW_HINT}{@link #F_GET_FILE_RW_HINT}{@link #F_SET_FILE_RW_HINT}{@link #F_DUPFD_CLOEXEC}
    - */ - public static int fcntlp(int fd, int cmd, @NativeType("void *") long arg) { - if (CHECKS) { - check(arg); - } - return nfcntlp(fd, cmd, arg); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/FOwnerEx.java b/LWJGL/src/main/java/org/lwjgl/system/linux/FOwnerEx.java deleted file mode 100644 index c42a523c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/FOwnerEx.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct f_owner_ex {
    - *     int type;
    - *     pid_t pid;
    - * }
    - */ -@NativeType("struct f_owner_ex") -public class FOwnerEx extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - PID; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - PID = layout.offsetof(1); - } - - protected FOwnerEx(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FOwnerEx create(long address, @Nullable ByteBuffer container) { - return new FOwnerEx(address, container); - } - - /** - * Creates a {@code FOwnerEx} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FOwnerEx(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** @return the value of the {@code pid} field. */ - @NativeType("pid_t") - public int pid() { return npid(address()); } - - /** Sets the specified value to the {@code type} field. */ - public FOwnerEx type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code pid} field. */ - public FOwnerEx pid(@NativeType("pid_t") int value) { npid(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FOwnerEx set( - int type, - int pid - ) { - type(type); - pid(pid); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FOwnerEx set(FOwnerEx src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FOwnerEx} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FOwnerEx malloc() { - return new FOwnerEx(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FOwnerEx} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FOwnerEx calloc() { - return new FOwnerEx(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FOwnerEx} instance allocated with {@link BufferUtils}. */ - public static FOwnerEx create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FOwnerEx(memAddress(container), container); - } - - /** Returns a new {@code FOwnerEx} instance for the specified memory address. */ - public static FOwnerEx create(long address) { - return new FOwnerEx(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FOwnerEx createSafe(long address) { - return address == NULL ? null : new FOwnerEx(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FOwnerEx} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FOwnerEx malloc(MemoryStack stack) { - return new FOwnerEx(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FOwnerEx} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FOwnerEx calloc(MemoryStack stack) { - return new FOwnerEx(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + FOwnerEx.TYPE); } - /** Unsafe version of {@link #pid}. */ - public static int npid(long struct) { return UNSAFE.getInt(null, struct + FOwnerEx.PID); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + FOwnerEx.TYPE, value); } - /** Unsafe version of {@link #pid(int) pid}. */ - public static void npid(long struct, int value) { UNSAFE.putInt(null, struct + FOwnerEx.PID, value); } - - // ----------------------------------- - - /** An array of {@link FOwnerEx} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FOwnerEx ELEMENT_FACTORY = FOwnerEx.create(-1L); - - /** - * Creates a new {@code FOwnerEx.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FOwnerEx#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FOwnerEx getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return FOwnerEx.ntype(address()); } - /** @return the value of the {@code pid} field. */ - @NativeType("pid_t") - public int pid() { return FOwnerEx.npid(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { FOwnerEx.ntype(address(), value); return this; } - /** Sets the specified value to the {@code pid} field. */ - public Buffer pid(@NativeType("pid_t") int value) { FOwnerEx.npid(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/Flock.java b/LWJGL/src/main/java/org/lwjgl/system/linux/Flock.java deleted file mode 100644 index ab1210f7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/Flock.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct flock64 {
    - *     short {@link #l_type};
    - *     short {@link #l_whence};
    - *     off_t {@link #l_start};
    - *     off_t {@link #l_len};
    - *     pid_t {@link #l_pid};
    - * }
    - */ -@NativeType("struct flock64") -public class Flock extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - L_TYPE, - L_WHENCE, - L_START, - L_LEN, - L_PID; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(8), - __member(8), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - L_TYPE = layout.offsetof(0); - L_WHENCE = layout.offsetof(1); - L_START = layout.offsetof(2); - L_LEN = layout.offsetof(3); - L_PID = layout.offsetof(4); - } - - protected Flock(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected Flock create(long address, @Nullable ByteBuffer container) { - return new Flock(address, container); - } - - /** - * Creates a {@code Flock} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public Flock(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** type of lock. One of:
    {@link FCNTL#F_RDLCK}{@link FCNTL#F_WRLCK}{@link FCNTL#F_UNLCK}
    */ - public short l_type() { return nl_type(address()); } - /** where {@code l_start} is relative to (like {@code lseek}) */ - public short l_whence() { return nl_whence(address()); } - /** offset where the lock begins */ - @NativeType("off_t") - public long l_start() { return nl_start(address()); } - /** size of the locked area; zero means until EOF */ - @NativeType("off_t") - public long l_len() { return nl_len(address()); } - /** process holding the lock */ - @NativeType("pid_t") - public int l_pid() { return nl_pid(address()); } - - /** Sets the specified value to the {@link #l_type} field. */ - public Flock l_type(short value) { nl_type(address(), value); return this; } - /** Sets the specified value to the {@link #l_whence} field. */ - public Flock l_whence(short value) { nl_whence(address(), value); return this; } - /** Sets the specified value to the {@link #l_start} field. */ - public Flock l_start(@NativeType("off_t") long value) { nl_start(address(), value); return this; } - /** Sets the specified value to the {@link #l_len} field. */ - public Flock l_len(@NativeType("off_t") long value) { nl_len(address(), value); return this; } - /** Sets the specified value to the {@link #l_pid} field. */ - public Flock l_pid(@NativeType("pid_t") int value) { nl_pid(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public Flock set( - short l_type, - short l_whence, - long l_start, - long l_len, - int l_pid - ) { - l_type(l_type); - l_whence(l_whence); - l_start(l_start); - l_len(l_len); - l_pid(l_pid); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public Flock set(Flock src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code Flock} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static Flock malloc() { - return new Flock(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code Flock} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static Flock calloc() { - return new Flock(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code Flock} instance allocated with {@link BufferUtils}. */ - public static Flock create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new Flock(memAddress(container), container); - } - - /** Returns a new {@code Flock} instance for the specified memory address. */ - public static Flock create(long address) { - return new Flock(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Flock createSafe(long address) { - return address == NULL ? null : new Flock(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code Flock} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static Flock malloc(MemoryStack stack) { - return new Flock(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code Flock} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static Flock calloc(MemoryStack stack) { - return new Flock(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #l_type}. */ - public static short nl_type(long struct) { return UNSAFE.getShort(null, struct + Flock.L_TYPE); } - /** Unsafe version of {@link #l_whence}. */ - public static short nl_whence(long struct) { return UNSAFE.getShort(null, struct + Flock.L_WHENCE); } - /** Unsafe version of {@link #l_start}. */ - public static long nl_start(long struct) { return UNSAFE.getLong(null, struct + Flock.L_START); } - /** Unsafe version of {@link #l_len}. */ - public static long nl_len(long struct) { return UNSAFE.getLong(null, struct + Flock.L_LEN); } - /** Unsafe version of {@link #l_pid}. */ - public static int nl_pid(long struct) { return UNSAFE.getInt(null, struct + Flock.L_PID); } - - /** Unsafe version of {@link #l_type(short) l_type}. */ - public static void nl_type(long struct, short value) { UNSAFE.putShort(null, struct + Flock.L_TYPE, value); } - /** Unsafe version of {@link #l_whence(short) l_whence}. */ - public static void nl_whence(long struct, short value) { UNSAFE.putShort(null, struct + Flock.L_WHENCE, value); } - /** Unsafe version of {@link #l_start(long) l_start}. */ - public static void nl_start(long struct, long value) { UNSAFE.putLong(null, struct + Flock.L_START, value); } - /** Unsafe version of {@link #l_len(long) l_len}. */ - public static void nl_len(long struct, long value) { UNSAFE.putLong(null, struct + Flock.L_LEN, value); } - /** Unsafe version of {@link #l_pid(int) l_pid}. */ - public static void nl_pid(long struct, int value) { UNSAFE.putInt(null, struct + Flock.L_PID, value); } - - // ----------------------------------- - - /** An array of {@link Flock} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final Flock ELEMENT_FACTORY = Flock.create(-1L); - - /** - * Creates a new {@code Flock.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link Flock#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected Flock getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link Flock#l_type} field. */ - public short l_type() { return Flock.nl_type(address()); } - /** @return the value of the {@link Flock#l_whence} field. */ - public short l_whence() { return Flock.nl_whence(address()); } - /** @return the value of the {@link Flock#l_start} field. */ - @NativeType("off_t") - public long l_start() { return Flock.nl_start(address()); } - /** @return the value of the {@link Flock#l_len} field. */ - @NativeType("off_t") - public long l_len() { return Flock.nl_len(address()); } - /** @return the value of the {@link Flock#l_pid} field. */ - @NativeType("pid_t") - public int l_pid() { return Flock.nl_pid(address()); } - - /** Sets the specified value to the {@link Flock#l_type} field. */ - public Buffer l_type(short value) { Flock.nl_type(address(), value); return this; } - /** Sets the specified value to the {@link Flock#l_whence} field. */ - public Buffer l_whence(short value) { Flock.nl_whence(address(), value); return this; } - /** Sets the specified value to the {@link Flock#l_start} field. */ - public Buffer l_start(@NativeType("off_t") long value) { Flock.nl_start(address(), value); return this; } - /** Sets the specified value to the {@link Flock#l_len} field. */ - public Buffer l_len(@NativeType("off_t") long value) { Flock.nl_len(address(), value); return this; } - /** Sets the specified value to the {@link Flock#l_pid} field. */ - public Buffer l_pid(@NativeType("pid_t") int value) { Flock.nl_pid(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/IOVec.java b/LWJGL/src/main/java/org/lwjgl/system/linux/IOVec.java deleted file mode 100644 index fa86763b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/IOVec.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct iovec {
    - *     void * {@link #iov_base};
    - *     size_t {@link #iov_len};
    - * }
    - */ -@NativeType("struct iovec") -public class IOVec extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - IOV_BASE, - IOV_LEN; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - IOV_BASE = layout.offsetof(0); - IOV_LEN = layout.offsetof(1); - } - - protected IOVec(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOVec create(long address, @Nullable ByteBuffer container) { - return new IOVec(address, container); - } - - /** - * Creates a {@code IOVec} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOVec(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** starting address */ - @Nullable - @NativeType("void *") - public ByteBuffer iov_base() { return niov_base(address()); } - /** number of bytes to transfer */ - @NativeType("size_t") - public long iov_len() { return niov_len(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@link #iov_base} field. */ - public IOVec iov_base(@Nullable @NativeType("void *") ByteBuffer value) { niov_base(address(), value); return this; } - /** Sets the specified value to the {@link #iov_len} field. */ - public IOVec iov_len(@NativeType("size_t") long value) { niov_len(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOVec set( - @Nullable ByteBuffer iov_base, - long iov_len - ) { - iov_base(iov_base); - iov_len(iov_len); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOVec set(IOVec src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOVec} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOVec malloc() { - return new IOVec(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOVec} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOVec calloc() { - return new IOVec(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOVec} instance allocated with {@link BufferUtils}. */ - public static IOVec create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOVec(memAddress(container), container); - } - - /** Returns a new {@code IOVec} instance for the specified memory address. */ - public static IOVec create(long address) { - return new IOVec(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOVec createSafe(long address) { - return address == NULL ? null : new IOVec(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOVec} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOVec malloc(MemoryStack stack) { - return new IOVec(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOVec} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOVec calloc(MemoryStack stack) { - return new IOVec(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #iov_base() iov_base}. */ - @Nullable public static ByteBuffer niov_base(long struct) { return memByteBufferSafe(memGetAddress(struct + IOVec.IOV_BASE), (int)niov_len(struct)); } - /** Unsafe version of {@link #iov_len}. */ - public static long niov_len(long struct) { return memGetAddress(struct + IOVec.IOV_LEN); } - - /** Unsafe version of {@link #iov_base(ByteBuffer) iov_base}. */ - public static void niov_base(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + IOVec.IOV_BASE, memAddressSafe(value)); } - /** Unsafe version of {@link #iov_len(long) iov_len}. */ - public static void niov_len(long struct, long value) { memPutAddress(struct + IOVec.IOV_LEN, value); } - - // ----------------------------------- - - /** An array of {@link IOVec} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOVec ELEMENT_FACTORY = IOVec.create(-1L); - - /** - * Creates a new {@code IOVec.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOVec#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOVec getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@link IOVec#iov_base} field. */ - @Nullable - @NativeType("void *") - public ByteBuffer iov_base() { return IOVec.niov_base(address()); } - /** @return the value of the {@link IOVec#iov_len} field. */ - @NativeType("size_t") - public long iov_len() { return IOVec.niov_len(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@link IOVec#iov_base} field. */ - public Buffer iov_base(@Nullable @NativeType("void *") ByteBuffer value) { IOVec.niov_base(address(), value); return this; } - /** Sets the specified value to the {@link IOVec#iov_len} field. */ - public Buffer iov_len(@NativeType("size_t") long value) { IOVec.niov_len(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/KernelTimespec.java b/LWJGL/src/main/java/org/lwjgl/system/linux/KernelTimespec.java deleted file mode 100644 index aaa99c1c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/KernelTimespec.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct __kernel_timespec {
    - *     int64_t {@link #tv_sec};
    - *     long long {@link #tv_nsec};
    - * }
    - */ -@NativeType("struct __kernel_timespec") -public class KernelTimespec extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TV_SEC, - TV_NSEC; - - static { - Layout layout = __struct( - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TV_SEC = layout.offsetof(0); - TV_NSEC = layout.offsetof(1); - } - - protected KernelTimespec(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected KernelTimespec create(long address, @Nullable ByteBuffer container) { - return new KernelTimespec(address, container); - } - - /** - * Creates a {@code KernelTimespec} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public KernelTimespec(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** seconds */ - @NativeType("int64_t") - public long tv_sec() { return ntv_sec(address()); } - /** nanoseconds */ - @NativeType("long long") - public long tv_nsec() { return ntv_nsec(address()); } - - /** Sets the specified value to the {@link #tv_sec} field. */ - public KernelTimespec tv_sec(@NativeType("int64_t") long value) { ntv_sec(address(), value); return this; } - /** Sets the specified value to the {@link #tv_nsec} field. */ - public KernelTimespec tv_nsec(@NativeType("long long") long value) { ntv_nsec(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public KernelTimespec set( - long tv_sec, - long tv_nsec - ) { - tv_sec(tv_sec); - tv_nsec(tv_nsec); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public KernelTimespec set(KernelTimespec src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code KernelTimespec} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static KernelTimespec malloc() { - return new KernelTimespec(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code KernelTimespec} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static KernelTimespec calloc() { - return new KernelTimespec(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code KernelTimespec} instance allocated with {@link BufferUtils}. */ - public static KernelTimespec create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new KernelTimespec(memAddress(container), container); - } - - /** Returns a new {@code KernelTimespec} instance for the specified memory address. */ - public static KernelTimespec create(long address) { - return new KernelTimespec(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static KernelTimespec createSafe(long address) { - return address == NULL ? null : new KernelTimespec(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code KernelTimespec} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static KernelTimespec malloc(MemoryStack stack) { - return new KernelTimespec(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code KernelTimespec} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static KernelTimespec calloc(MemoryStack stack) { - return new KernelTimespec(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #tv_sec}. */ - public static long ntv_sec(long struct) { return UNSAFE.getLong(null, struct + KernelTimespec.TV_SEC); } - /** Unsafe version of {@link #tv_nsec}. */ - public static long ntv_nsec(long struct) { return UNSAFE.getLong(null, struct + KernelTimespec.TV_NSEC); } - - /** Unsafe version of {@link #tv_sec(long) tv_sec}. */ - public static void ntv_sec(long struct, long value) { UNSAFE.putLong(null, struct + KernelTimespec.TV_SEC, value); } - /** Unsafe version of {@link #tv_nsec(long) tv_nsec}. */ - public static void ntv_nsec(long struct, long value) { UNSAFE.putLong(null, struct + KernelTimespec.TV_NSEC, value); } - - // ----------------------------------- - - /** An array of {@link KernelTimespec} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final KernelTimespec ELEMENT_FACTORY = KernelTimespec.create(-1L); - - /** - * Creates a new {@code KernelTimespec.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link KernelTimespec#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected KernelTimespec getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link KernelTimespec#tv_sec} field. */ - @NativeType("int64_t") - public long tv_sec() { return KernelTimespec.ntv_sec(address()); } - /** @return the value of the {@link KernelTimespec#tv_nsec} field. */ - @NativeType("long long") - public long tv_nsec() { return KernelTimespec.ntv_nsec(address()); } - - /** Sets the specified value to the {@link KernelTimespec#tv_sec} field. */ - public Buffer tv_sec(@NativeType("int64_t") long value) { KernelTimespec.ntv_sec(address(), value); return this; } - /** Sets the specified value to the {@link KernelTimespec#tv_nsec} field. */ - public Buffer tv_nsec(@NativeType("long long") long value) { KernelTimespec.ntv_nsec(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/LinuxLibrary.java b/LWJGL/src/main/java/org/lwjgl/system/linux/LinuxLibrary.java deleted file mode 100644 index 0148a731..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/LinuxLibrary.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system.linux; - -import org.lwjgl.PointerBuffer; -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.linux.DynamicLinkLoader.*; - -/** Implements a {@link SharedLibrary} on the Linux OS. */ -public class LinuxLibrary extends SharedLibrary.Default { - - public LinuxLibrary(String name) { - this(name, loadLibrary(name)); - } - - public LinuxLibrary(String name, long handle) { - super(name, handle); - } - - private static long loadLibrary(String name) { - long handle; - try (MemoryStack stack = stackPush()) { - handle = dlopen(stack.UTF8(name), RTLD_LAZY | (PointerBuffer.is64Bit() ? RTLD_GLOBAL : 2)); - } - if (handle == NULL) { - throw new UnsatisfiedLinkError("Failed to dynamically load library: " + name + "(error = " + dlerror() + ")"); - } - return handle; - } - - @Nullable - @Override - public String getPath() { - return SharedLibraryUtil.getLibraryPath(address()); - } - - @Override - public long getFunctionAddress(ByteBuffer functionName) { - return dlsym(address(), functionName); - } - - @Override - public void free() { - dlclose(address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/MMAN.java b/LWJGL/src/main/java/org/lwjgl/system/linux/MMAN.java deleted file mode 100644 index 76a46367..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/MMAN.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <sys/mman.h>. */ -public class MMAN { - - static { Library.initialize(); } - - /** Return value of {@link #mmap} in case of an error. */ - public static final long MAP_FAILED = -1L; - - /** - * The {@code prot} argument describes the desired memory protection of the mapping (and must not conflict with the open mode of the file). - * - *

    It is either {@code PROT_NONE} or the bitwise OR of one or more of the following flags.

    - * - *
    Enum values:
    - * - *
      - *
    • {@link #PROT_EXEC PROT_EXEC} - Pages may be executed.
    • - *
    • {@link #PROT_READ PROT_READ} - Pages may be read.
    • - *
    • {@link #PROT_WRITE PROT_WRITE} - Pages may be written.
    • - *
    • {@link #PROT_NONE PROT_NONE} - Pages may not be accessed.
    • - *
    • {@link #PROT_GROWSDOWN PROT_GROWSDOWN} - Extend change to start of {@code growsdown} vma ({@code mprotect} only).
    • - *
    • {@link #PROT_GROWSUP PROT_GROWSUP} - Extend change to start of {@code growsup} vma ({@code mprotect} only).
    • - *
    - */ - public static final int - PROT_EXEC = 0x4, - PROT_READ = 0x1, - PROT_WRITE = 0x2, - PROT_NONE = 0x0, - PROT_GROWSDOWN = 0x01000000, - PROT_GROWSUP = 0x02000000; - - /** - * The flags argument determines whether updates to the mapping are visible to other processes mapping the same region, and whether updates are carried - * through to the underlying file. - * - *

    This behavior is determined by including exactly one of the following values in {@code flags}.

    - * - *
    Enum values:
    - * - *
      - *
    • {@link #MAP_SHARED MAP_SHARED} - - * Share this mapping. - * - *

      Updates to the mapping are visible to other processes mapping the same region, and (in the case of file-backed mappings) are carried through to the - * underlying file. (To precisely control when updates are carried through to the underlying file requires the use of {@code msync(2)}.)

      - *
    • - *
    • {@link #MAP_SHARED_VALIDATE MAP_SHARED_VALIDATE} - - * This flag provides the same behavior as {@link #MAP_SHARED} except that {@code MAP_SHARED} mappings ignore unknown flags in {@code flags}. - * - *

      By contrast, when creating a mapping using {@code MAP_SHARED_VALIDATE}, the kernel verifies all passed flags are known and fails the mapping with - * the error {@code EOPNOTSUPP} for unknown flags. This mapping type is also required to be able to use some mapping flags (e.g., {@code MAP_SYNC}).

      - *
    • - *
    • {@link #MAP_PRIVATE MAP_PRIVATE} - - * Create a private copy-on-write mapping. - * - *

      Updates to the mapping are not visible to other processes mapping the same file, and are not carried through to the underlying file. It is - * unspecified whether changes made to the file after the {@link #mmap} call are visible in the mapped region.

      - *
    • - *
    - */ - public static final int - MAP_SHARED = 0x01, - MAP_SHARED_VALIDATE = 0x03, - MAP_PRIVATE = 0x02; - - public static final int MAP_HUGE_SHIFT = 26; - - public static final int MAP_HUGE_MASK = 0x3f; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #MAP_32BIT MAP_32BIT} - - * Put the mapping into the first 2 Gigabytes of the process address space. - * - *

      This flag is supported only on x86-64, for 64-bit programs. It was added to allow thread stacks to be allocated somewhere in the first 2 GB of - * memory, so as to improve context-switch performance on some early 64-bit processors. Modern x86-64 processors no longer have this performance - * problem, so use of this flag is not required on those systems. The {@code MAP_32BIT} flag is ignored when {@link #MAP_FIXED} is set.

      - *
    • - *
    • {@link #MAP_ANONYMOUS MAP_ANONYMOUS} - - * The mapping is not backed by any file; its contents are initialized to zero. - * - *

      The {@code fd} argument is ignored; however, some implementations require {@code fd} to be -1 if {@code MAP_ANONYMOUS} (or {@link #MAP_ANON}) is specified, - * and portable applications should ensure this. The {@code offset} argument should be zero. The use of {@code MAP_ANONYMOUS} in conjunction with - * {@code MAP_SHARED} is supported on Linux only since kernel 2.4.

      - *
    • - *
    • {@link #MAP_ANON MAP_ANON} - Synonym for MAP_ANONYMOUS; provided for compatibility with other implementations.
    • - *
    • {@link #MAP_DENYWRITE MAP_DENYWRITE} - - * This flag is ignored. - * - *

      (Long ago —Linux 2.0 and earlier— it signaled that attempts to write to the underlying file should fail with {@code ETXTBSY}. But this was a source - * of denial-of-service attacks.)

      - *
    • - *
    • {@link #MAP_EXECUTABLE MAP_EXECUTABLE} - This flag is ignored.
    • - *
    • {@link #MAP_FILE MAP_FILE} - Compatibility flag. Ignored.
    • - *
    • {@link #MAP_FIXED MAP_FIXED} - - * Don't interpret {@code addr} as a hint: place the mapping at exactly that address. - * - *

      {@code addr} must be suitably aligned: for most architectures a multiple of the page size is sufficient; however, some architectures may impose - * additional restrictions. If the memory region specified by {@code addr} and {@code length} overlaps pages of any existing mapping(s), then the - * overlapped part of the existing mapping(s) will be discarded. If the specified address cannot be used, {@link #mmap} will fail.

      - * - *

      Software that aspires to be portable should use the {@code MAP_FIXED} flag with care, keeping in mind that the exact layout of a process's memory - * mappings is allowed to change significantly between kernel versions, C library versions, and operating system releases. Carefully read the - * discussion of this flag in NOTES!

      - *
    • - *
    • {@link #MAP_FIXED_NOREPLACE MAP_FIXED_NOREPLACE} - - * This flag provides behavior that is similar to {@link #MAP_FIXED} with respect to the {@code addr} enforcement, but differs in that - * {@code MAP_FIXED_NOREPLACE} never clobbers a preexisting mapped range. - * - *

      If the requested range would collide with an existing mapping, then this call fails with the error {@code EEXIST}. This flag can therefore be used - * as a way to atomically (with respect to other threads) attempt to map an address range: one thread will succeed; all others will report failure.

      - * - *

      Note that older kernels which do not recognize the {@code MAP_FIXED_NOREPLACE} flag will typically (upon detecting a collision with a preexisting - * mapping) fall back to a "non-{@code MAP_FIXED}" type of behavior: they will return an address that is different from the requested address. - * Therefore, backward-compatible software should check the returned address against the requested address.

      - * - *

      (since Linux 4.17)

      - *
    • - *
    • {@link #MAP_GROWSDOWN MAP_GROWSDOWN} - - * This flag is used for stacks. It indicates to the kernel virtual memory system that the mapping should extend downward in memory. - * - *

      The return address is one page lower than the memory area that is actually created in the process's virtual address space. Touching an address in - * the "guard" page below the mapping will cause the mapping to grow by a page. This growth can be repeated until the mapping grows to within a page - * of the high end of the next lower mapping, at which point touching the "guard" page will result in a {@code SIGSEGV} signal.

      - *
    • - *
    • {@link #MAP_HUGETLB MAP_HUGETLB} - - * Allocate the mapping using "huge" pages. - * - *

      See the Linux kernel source file {@code Documentation/admin-guide/mm/hugetlbpage.rst} for further information, as well as NOTES, below.

      - * - *

      (since Linux 2.6.32)

      - *
    • - *
    • {@link #MAP_HUGE_2MB MAP_HUGE_2MB} - - * Used in conjunction with {@link #MAP_HUGETLB} to select alternative {@code hugetlb} page sizes (respectively, 2 MB and 1 GB) on systems that support - * multiple {@code hugetlb} page sizes. - * - *

      More generally, the desired huge page size can be configured by encoding the base-2 logarithm of the desired page size in the six bits at the - * offset {@link #MAP_HUGE_SHIFT}. (A value of zero in this bit field provides the default huge page size; the default huge page size can be discovered via - * the {@code Hugepagesize} field exposed by {@code /proc/meminfo}.) Thus, the above two constants are defined as:

      - * - *
      
      -     * #define MAP_HUGE_2MB    (21 << MAP_HUGE_SHIFT)
      -     * #define MAP_HUGE_1GB    (30 << MAP_HUGE_SHIFT)
      - * - *

      The range of huge page sizes that are supported by the system can be discovered by listing the subdirectories in {@code /sys/kernel/mm/hugepages}.

      - * - *

      (since Linux 3.8)

      - *
    • - *
    • {@link #MAP_HUGE_1GB MAP_HUGE_1GB} - See {@link #MAP_HUGE_2MB}.
    • - *
    • {@link #MAP_LOCKED MAP_LOCKED} - - *
    • - *
    • {@link #MAP_NONBLOCK MAP_NONBLOCK} - - *
    • - *
    • {@link #MAP_NORESERVE MAP_NORESERVE} - - *
    • - *
    • {@link #MAP_POPULATE MAP_POPULATE} - - *
    • - *
    • {@link #MAP_STACK MAP_STACK} - - *
    • - *
    • {@link #MAP_SYNC MAP_SYNC} - - *
    • - *
    • {@link #MAP_UNINITIALIZED MAP_UNINITIALIZED} - - *
    • - *
    - */ - public static final int - MAP_32BIT = 0x40, - MAP_ANONYMOUS = 0x20, - MAP_ANON = MAP_ANONYMOUS, - MAP_DENYWRITE = 0x00800, - MAP_EXECUTABLE = 0x01000, - MAP_FILE = 0, - MAP_FIXED = 0x10, - MAP_FIXED_NOREPLACE = 0x100000, - MAP_GROWSDOWN = 0x00100, - MAP_HUGETLB = 0x40000, - MAP_HUGE_2MB = 21 << MAP_HUGE_SHIFT, - MAP_HUGE_1GB = 30 << MAP_HUGE_SHIFT, - MAP_LOCKED = 0x02000, - MAP_NONBLOCK = 0x10000, - MAP_NORESERVE = 0x04000, - MAP_POPULATE = 0x08000, - MAP_STACK = 0x20000, - MAP_SYNC = 0x80000, - MAP_UNINITIALIZED = 0x4000000; - - protected MMAN() { - throw new UnsupportedOperationException(); - } - - // --- [ mmap ] --- - - /** - * Creates a new mapping in the virtual address space of the calling process. - * - *

    The starting address for the new mapping is specified in {@code addr}. The {@code length} argument specifies the length of the mapping (which must be - * greater than 0).

    - * - *

    If {@code addr} is {@code NULL}, then the kernel chooses the (page-aligned) address at which to create the mapping; this is the most portable method of - * creating a new mapping. If {@code addr} is not {@code NULL}, then the kernel takes it as a hint about where to place the mapping; on Linux, the kernel will - * pick a nearby page boundary (but always above or equal to the value specified by {@code /proc/sys/vm/mmap_min_addr}) and attempt to create the mapping - * there. If another mapping already exists there, the kernel picks a new address that may or may not depend on the hint. The address of the new mapping - * is returned as the result of the call.

    - * - *

    The contents of a file mapping (as opposed to an anonymous mapping; see {@code MAP_ANONYMOUS} below), are initialized using {@code length} bytes - * starting at offset {@code offset} in the file (or other object) referred to by the file descriptor {@code fd}. {@code offset} must be a multiple of the - * page size as returned by {@code sysconf(_SC_PAGE_SIZE)}.

    - * - *

    After the {@code mmap()} call has returned, the file descriptor, {@code fd}, can be closed immediately without invalidating the mapping.

    - * - * @param prot describes the desired memory protection of the mapping (and must not conflict with the open mode of the file). One or more of:
    {@link #PROT_EXEC}{@link #PROT_READ}{@link #PROT_WRITE}{@link #PROT_NONE}{@link #PROT_GROWSDOWN}{@link #PROT_GROWSUP}
    - * @param flags one or more of:
    {@link #MAP_FAILED}{@link #MAP_SHARED}{@link #MAP_SHARED_VALIDATE}{@link #MAP_PRIVATE}{@link #MAP_HUGE_SHIFT}{@link #MAP_HUGE_MASK}
    {@link #MAP_32BIT}{@link #MAP_ANONYMOUS}{@link #MAP_ANON}{@link #MAP_DENYWRITE}{@link #MAP_EXECUTABLE}{@link #MAP_FILE}
    {@link #MAP_FIXED}{@link #MAP_FIXED_NOREPLACE}{@link #MAP_GROWSDOWN}{@link #MAP_HUGETLB}{@link #MAP_HUGE_2MB}{@link #MAP_HUGE_1GB}
    {@link #MAP_LOCKED}{@link #MAP_NONBLOCK}{@link #MAP_NORESERVE}{@link #MAP_POPULATE}{@link #MAP_STACK}{@link #MAP_SYNC}
    {@link #MAP_UNINITIALIZED}
    - * - * @return on success, returns a pointer to the mapped area. On error, the value {@link #MAP_FAILED} is returned, and {@code errno} is set to indicate the error. - */ - @NativeType("void *") - public static native long mmap(@NativeType("void *") long addr, @NativeType("size_t") long length, int prot, int flags, int fd, @NativeType("off_t") long offset); - - // --- [ munmap ] --- - - /** Unsafe version of: {@link #munmap} */ - public static native int nmunmap(long addr, long length); - - /** - * Deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory - * references. - * - *

    The region is also automatically unmapped when the process is terminated. On the other hand, closing the file descriptor does not unmap the region.

    - * - *

    The address {@code addr} must be a multiple of the page size (but {@code length} need not be). All pages containing a part of the indicated range are - * unmapped, and subsequent references to these pages will generate {@code SIGSEGV}. It is not an error if the indicated range does not contain any mapped - * pages.

    - * - * @return on success, returns 0. On failure, it returns -1, and {@code errno} is set to indicate the error (probably to {@code EINVAL}). - */ - public static int munmap(@NativeType("void *") ByteBuffer addr) { - return nmunmap(memAddress(addr), addr.remaining()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/Msghdr.java b/LWJGL/src/main/java/org/lwjgl/system/linux/Msghdr.java deleted file mode 100644 index b615a1f6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/Msghdr.java +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct msghdr {
    - *     void * {@link #msg_name};
    - *     socklen_t {@link #msg_namelen};
    - *     {@link IOVec struct iovec} * {@link #msg_iov};
    - *     size_t {@link #msg_iovlen};
    - *     void * {@link #msg_control};
    - *     size_t {@link #msg_controllen};
    - *     int {@link #msg_flags};
    - * }
    - */ -@NativeType("struct msghdr") -public class Msghdr extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - MSG_NAME, - MSG_NAMELEN, - MSG_IOV, - MSG_IOVLEN, - MSG_CONTROL, - MSG_CONTROLLEN, - MSG_FLAGS; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - MSG_NAME = layout.offsetof(0); - MSG_NAMELEN = layout.offsetof(1); - MSG_IOV = layout.offsetof(2); - MSG_IOVLEN = layout.offsetof(3); - MSG_CONTROL = layout.offsetof(4); - MSG_CONTROLLEN = layout.offsetof(5); - MSG_FLAGS = layout.offsetof(6); - } - - protected Msghdr(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected Msghdr create(long address, @Nullable ByteBuffer container) { - return new Msghdr(address, container); - } - - /** - * Creates a {@code Msghdr} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public Msghdr(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** address to send to/receive from */ - @NativeType("void *") - public ByteBuffer msg_name() { return nmsg_name(address()); } - /** length of {@code address} data */ - @NativeType("socklen_t") - public int msg_namelen() { return nmsg_namelen(address()); } - /** vector of data to send/receive into */ - @NativeType("struct iovec *") - public IOVec.Buffer msg_iov() { return nmsg_iov(address()); } - /** number of elements in the vector */ - @NativeType("size_t") - public long msg_iovlen() { return nmsg_iovlen(address()); } - /** ancillary data (eg BSD filedesc passing) */ - @NativeType("void *") - public ByteBuffer msg_control() { return nmsg_control(address()); } - /** ancillary data buffer length */ - @NativeType("size_t") - public long msg_controllen() { return nmsg_controllen(address()); } - /** flags on received message */ - public int msg_flags() { return nmsg_flags(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@link #msg_name} field. */ - public Msghdr msg_name(@NativeType("void *") ByteBuffer value) { nmsg_name(address(), value); return this; } - /** Sets the address of the specified {@link IOVec.Buffer} to the {@link #msg_iov} field. */ - public Msghdr msg_iov(@NativeType("struct iovec *") IOVec.Buffer value) { nmsg_iov(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@link #msg_control} field. */ - public Msghdr msg_control(@NativeType("void *") ByteBuffer value) { nmsg_control(address(), value); return this; } - /** Sets the specified value to the {@link #msg_flags} field. */ - public Msghdr msg_flags(int value) { nmsg_flags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public Msghdr set( - ByteBuffer msg_name, - IOVec.Buffer msg_iov, - ByteBuffer msg_control, - int msg_flags - ) { - msg_name(msg_name); - msg_iov(msg_iov); - msg_control(msg_control); - msg_flags(msg_flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public Msghdr set(Msghdr src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code Msghdr} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static Msghdr malloc() { - return new Msghdr(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code Msghdr} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static Msghdr calloc() { - return new Msghdr(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code Msghdr} instance allocated with {@link BufferUtils}. */ - public static Msghdr create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new Msghdr(memAddress(container), container); - } - - /** Returns a new {@code Msghdr} instance for the specified memory address. */ - public static Msghdr create(long address) { - return new Msghdr(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Msghdr createSafe(long address) { - return address == NULL ? null : new Msghdr(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code Msghdr} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static Msghdr malloc(MemoryStack stack) { - return new Msghdr(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code Msghdr} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static Msghdr calloc(MemoryStack stack) { - return new Msghdr(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #msg_name() msg_name}. */ - public static ByteBuffer nmsg_name(long struct) { return memByteBuffer(memGetAddress(struct + Msghdr.MSG_NAME), nmsg_namelen(struct)); } - /** Unsafe version of {@link #msg_namelen}. */ - public static int nmsg_namelen(long struct) { return UNSAFE.getInt(null, struct + Msghdr.MSG_NAMELEN); } - /** Unsafe version of {@link #msg_iov}. */ - public static IOVec.Buffer nmsg_iov(long struct) { return IOVec.create(memGetAddress(struct + Msghdr.MSG_IOV), (int)nmsg_iovlen(struct)); } - /** Unsafe version of {@link #msg_iovlen}. */ - public static long nmsg_iovlen(long struct) { return memGetAddress(struct + Msghdr.MSG_IOVLEN); } - /** Unsafe version of {@link #msg_control() msg_control}. */ - public static ByteBuffer nmsg_control(long struct) { return memByteBuffer(memGetAddress(struct + Msghdr.MSG_CONTROL), (int)nmsg_controllen(struct)); } - /** Unsafe version of {@link #msg_controllen}. */ - public static long nmsg_controllen(long struct) { return memGetAddress(struct + Msghdr.MSG_CONTROLLEN); } - /** Unsafe version of {@link #msg_flags}. */ - public static int nmsg_flags(long struct) { return UNSAFE.getInt(null, struct + Msghdr.MSG_FLAGS); } - - /** Unsafe version of {@link #msg_name(ByteBuffer) msg_name}. */ - public static void nmsg_name(long struct, ByteBuffer value) { memPutAddress(struct + Msghdr.MSG_NAME, memAddress(value)); nmsg_namelen(struct, value.remaining()); } - /** Sets the specified value to the {@code msg_namelen} field of the specified {@code struct}. */ - public static void nmsg_namelen(long struct, int value) { UNSAFE.putInt(null, struct + Msghdr.MSG_NAMELEN, value); } - /** Unsafe version of {@link #msg_iov(IOVec.Buffer) msg_iov}. */ - public static void nmsg_iov(long struct, IOVec.Buffer value) { memPutAddress(struct + Msghdr.MSG_IOV, value.address()); nmsg_iovlen(struct, value.remaining()); } - /** Sets the specified value to the {@code msg_iovlen} field of the specified {@code struct}. */ - public static void nmsg_iovlen(long struct, long value) { memPutAddress(struct + Msghdr.MSG_IOVLEN, value); } - /** Unsafe version of {@link #msg_control(ByteBuffer) msg_control}. */ - public static void nmsg_control(long struct, ByteBuffer value) { memPutAddress(struct + Msghdr.MSG_CONTROL, memAddress(value)); nmsg_controllen(struct, value.remaining()); } - /** Sets the specified value to the {@code msg_controllen} field of the specified {@code struct}. */ - public static void nmsg_controllen(long struct, long value) { memPutAddress(struct + Msghdr.MSG_CONTROLLEN, value); } - /** Unsafe version of {@link #msg_flags(int) msg_flags}. */ - public static void nmsg_flags(long struct, int value) { UNSAFE.putInt(null, struct + Msghdr.MSG_FLAGS, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + Msghdr.MSG_NAME)); - check(memGetAddress(struct + Msghdr.MSG_IOV)); - check(memGetAddress(struct + Msghdr.MSG_CONTROL)); - } - - // ----------------------------------- - - /** An array of {@link Msghdr} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final Msghdr ELEMENT_FACTORY = Msghdr.create(-1L); - - /** - * Creates a new {@code Msghdr.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link Msghdr#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected Msghdr getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@link Msghdr#msg_name} field. */ - @NativeType("void *") - public ByteBuffer msg_name() { return Msghdr.nmsg_name(address()); } - /** @return the value of the {@link Msghdr#msg_namelen} field. */ - @NativeType("socklen_t") - public int msg_namelen() { return Msghdr.nmsg_namelen(address()); } - /** @return a {@link IOVec.Buffer} view of the struct array pointed to by the {@link Msghdr#msg_iov} field. */ - @NativeType("struct iovec *") - public IOVec.Buffer msg_iov() { return Msghdr.nmsg_iov(address()); } - /** @return the value of the {@link Msghdr#msg_iovlen} field. */ - @NativeType("size_t") - public long msg_iovlen() { return Msghdr.nmsg_iovlen(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@link Msghdr#msg_control} field. */ - @NativeType("void *") - public ByteBuffer msg_control() { return Msghdr.nmsg_control(address()); } - /** @return the value of the {@link Msghdr#msg_controllen} field. */ - @NativeType("size_t") - public long msg_controllen() { return Msghdr.nmsg_controllen(address()); } - /** @return the value of the {@link Msghdr#msg_flags} field. */ - public int msg_flags() { return Msghdr.nmsg_flags(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@link Msghdr#msg_name} field. */ - public Buffer msg_name(@NativeType("void *") ByteBuffer value) { Msghdr.nmsg_name(address(), value); return this; } - /** Sets the address of the specified {@link IOVec.Buffer} to the {@link Msghdr#msg_iov} field. */ - public Buffer msg_iov(@NativeType("struct iovec *") IOVec.Buffer value) { Msghdr.nmsg_iov(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@link Msghdr#msg_control} field. */ - public Buffer msg_control(@NativeType("void *") ByteBuffer value) { Msghdr.nmsg_control(address(), value); return this; } - /** Sets the specified value to the {@link Msghdr#msg_flags} field. */ - public Buffer msg_flags(int value) { Msghdr.nmsg_flags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/OpenHow.java b/LWJGL/src/main/java/org/lwjgl/system/linux/OpenHow.java deleted file mode 100644 index c27263c6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/OpenHow.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Arguments for how {@code openat2(2)} should open the target path. - * - *

    If only {@code flags} and {@code @}mode are non-zero, then {@code openat2(2)} operates very similarly to {@code openat(2)}.

    - * - *

    However, unlike {@code openat(2)}, unknown or invalid bits in {@code flags} result in {@code -EINVAL} rather than being silently ignored. {@code mode} - * must be zero unless one of {@link FCNTL#O_CREAT}, {@link FCNTL#O_TMPFILE} are set.

    - * - *

    Layout

    - * - *
    
    - * struct open_how {
    - *     __u64 flags;
    - *     __u64 mode;
    - *     __u64 resolve;
    - * }
    - */ -@NativeType("struct open_how") -public class OpenHow extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FLAGS, - MODE, - RESOLVE; - - static { - Layout layout = __struct( - __member(8), - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FLAGS = layout.offsetof(0); - MODE = layout.offsetof(1); - RESOLVE = layout.offsetof(2); - } - - protected OpenHow(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected OpenHow create(long address, @Nullable ByteBuffer container) { - return new OpenHow(address, container); - } - - /** - * Creates a {@code OpenHow} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public OpenHow(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code flags} field. */ - @NativeType("__u64") - public long flags() { return nflags(address()); } - /** @return the value of the {@code mode} field. */ - @NativeType("__u64") - public long mode() { return nmode(address()); } - /** @return the value of the {@code resolve} field. */ - @NativeType("__u64") - public long resolve() { return nresolve(address()); } - - /** Sets the specified value to the {@code flags} field. */ - public OpenHow flags(@NativeType("__u64") long value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code mode} field. */ - public OpenHow mode(@NativeType("__u64") long value) { nmode(address(), value); return this; } - /** Sets the specified value to the {@code resolve} field. */ - public OpenHow resolve(@NativeType("__u64") long value) { nresolve(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public OpenHow set( - long flags, - long mode, - long resolve - ) { - flags(flags); - mode(mode); - resolve(resolve); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public OpenHow set(OpenHow src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code OpenHow} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static OpenHow malloc() { - return new OpenHow(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code OpenHow} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static OpenHow calloc() { - return new OpenHow(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code OpenHow} instance allocated with {@link BufferUtils}. */ - public static OpenHow create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new OpenHow(memAddress(container), container); - } - - /** Returns a new {@code OpenHow} instance for the specified memory address. */ - public static OpenHow create(long address) { - return new OpenHow(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static OpenHow createSafe(long address) { - return address == NULL ? null : new OpenHow(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code OpenHow} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static OpenHow malloc(MemoryStack stack) { - return new OpenHow(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code OpenHow} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static OpenHow calloc(MemoryStack stack) { - return new OpenHow(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #flags}. */ - public static long nflags(long struct) { return UNSAFE.getLong(null, struct + OpenHow.FLAGS); } - /** Unsafe version of {@link #mode}. */ - public static long nmode(long struct) { return UNSAFE.getLong(null, struct + OpenHow.MODE); } - /** Unsafe version of {@link #resolve}. */ - public static long nresolve(long struct) { return UNSAFE.getLong(null, struct + OpenHow.RESOLVE); } - - /** Unsafe version of {@link #flags(long) flags}. */ - public static void nflags(long struct, long value) { UNSAFE.putLong(null, struct + OpenHow.FLAGS, value); } - /** Unsafe version of {@link #mode(long) mode}. */ - public static void nmode(long struct, long value) { UNSAFE.putLong(null, struct + OpenHow.MODE, value); } - /** Unsafe version of {@link #resolve(long) resolve}. */ - public static void nresolve(long struct, long value) { UNSAFE.putLong(null, struct + OpenHow.RESOLVE, value); } - - // ----------------------------------- - - /** An array of {@link OpenHow} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final OpenHow ELEMENT_FACTORY = OpenHow.create(-1L); - - /** - * Creates a new {@code OpenHow.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link OpenHow#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected OpenHow getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code flags} field. */ - @NativeType("__u64") - public long flags() { return OpenHow.nflags(address()); } - /** @return the value of the {@code mode} field. */ - @NativeType("__u64") - public long mode() { return OpenHow.nmode(address()); } - /** @return the value of the {@code resolve} field. */ - @NativeType("__u64") - public long resolve() { return OpenHow.nresolve(address()); } - - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("__u64") long value) { OpenHow.nflags(address(), value); return this; } - /** Sets the specified value to the {@code mode} field. */ - public Buffer mode(@NativeType("__u64") long value) { OpenHow.nmode(address(), value); return this; } - /** Sets the specified value to the {@code resolve} field. */ - public Buffer resolve(@NativeType("__u64") long value) { OpenHow.nresolve(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/PThread.java b/LWJGL/src/main/java/org/lwjgl/system/linux/PThread.java deleted file mode 100644 index ef1dc1ba..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/PThread.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import org.lwjgl.system.*; - -/** Native bindings to <pthread.h>. */ -public class PThread { - - static { Library.initialize(); } - - protected PThread() { - throw new UnsupportedOperationException(); - } - - // --- [ pthread_self ] --- - - @NativeType("pthread_t") - public static native long pthread_self(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/Sockaddr.java b/LWJGL/src/main/java/org/lwjgl/system/linux/Sockaddr.java deleted file mode 100644 index 5c2f5eaf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/Sockaddr.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Structure describing a generic socket address. - * - *

    Layout

    - * - *
    
    - * struct sockaddr {
    - *     sa_family_t {@link #sa_family};
    - *     char {@link #sa_data}[14];
    - * }
    - */ -@NativeType("struct sockaddr") -public class Sockaddr extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SA_FAMILY, - SA_DATA; - - static { - Layout layout = __struct( - __member(2), - __array(1, 14) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SA_FAMILY = layout.offsetof(0); - SA_DATA = layout.offsetof(1); - } - - protected Sockaddr(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected Sockaddr create(long address, @Nullable ByteBuffer container) { - return new Sockaddr(address, container); - } - - /** - * Creates a {@code Sockaddr} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public Sockaddr(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** address family and length */ - @NativeType("sa_family_t") - public short sa_family() { return nsa_family(address()); } - /** address data */ - @NativeType("char[14]") - public ByteBuffer sa_data() { return nsa_data(address()); } - /** address data */ - @NativeType("char") - public byte sa_data(int index) { return nsa_data(address(), index); } - - /** Sets the specified value to the {@link #sa_family} field. */ - public Sockaddr sa_family(@NativeType("sa_family_t") short value) { nsa_family(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@link #sa_data} field. */ - public Sockaddr sa_data(@NativeType("char[14]") ByteBuffer value) { nsa_data(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #sa_data} field. */ - public Sockaddr sa_data(int index, @NativeType("char") byte value) { nsa_data(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public Sockaddr set( - short sa_family, - ByteBuffer sa_data - ) { - sa_family(sa_family); - sa_data(sa_data); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public Sockaddr set(Sockaddr src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code Sockaddr} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static Sockaddr malloc() { - return new Sockaddr(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code Sockaddr} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static Sockaddr calloc() { - return new Sockaddr(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code Sockaddr} instance allocated with {@link BufferUtils}. */ - public static Sockaddr create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new Sockaddr(memAddress(container), container); - } - - /** Returns a new {@code Sockaddr} instance for the specified memory address. */ - public static Sockaddr create(long address) { - return new Sockaddr(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Sockaddr createSafe(long address) { - return address == NULL ? null : new Sockaddr(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code Sockaddr} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static Sockaddr malloc(MemoryStack stack) { - return new Sockaddr(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code Sockaddr} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static Sockaddr calloc(MemoryStack stack) { - return new Sockaddr(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #sa_family}. */ - public static short nsa_family(long struct) { return UNSAFE.getShort(null, struct + Sockaddr.SA_FAMILY); } - /** Unsafe version of {@link #sa_data}. */ - public static ByteBuffer nsa_data(long struct) { return memByteBuffer(struct + Sockaddr.SA_DATA, 14); } - /** Unsafe version of {@link #sa_data(int) sa_data}. */ - public static byte nsa_data(long struct, int index) { - return UNSAFE.getByte(null, struct + Sockaddr.SA_DATA + check(index, 14) * 1); - } - - /** Unsafe version of {@link #sa_family(short) sa_family}. */ - public static void nsa_family(long struct, short value) { UNSAFE.putShort(null, struct + Sockaddr.SA_FAMILY, value); } - /** Unsafe version of {@link #sa_data(ByteBuffer) sa_data}. */ - public static void nsa_data(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 14); } - memCopy(memAddress(value), struct + Sockaddr.SA_DATA, value.remaining() * 1); - } - /** Unsafe version of {@link #sa_data(int, byte) sa_data}. */ - public static void nsa_data(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + Sockaddr.SA_DATA + check(index, 14) * 1, value); - } - - // ----------------------------------- - - /** An array of {@link Sockaddr} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final Sockaddr ELEMENT_FACTORY = Sockaddr.create(-1L); - - /** - * Creates a new {@code Sockaddr.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link Sockaddr#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected Sockaddr getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link Sockaddr#sa_family} field. */ - @NativeType("sa_family_t") - public short sa_family() { return Sockaddr.nsa_family(address()); } - /** @return a {@link ByteBuffer} view of the {@link Sockaddr#sa_data} field. */ - @NativeType("char[14]") - public ByteBuffer sa_data() { return Sockaddr.nsa_data(address()); } - /** @return the value at the specified index of the {@link Sockaddr#sa_data} field. */ - @NativeType("char") - public byte sa_data(int index) { return Sockaddr.nsa_data(address(), index); } - - /** Sets the specified value to the {@link Sockaddr#sa_family} field. */ - public Buffer sa_family(@NativeType("sa_family_t") short value) { Sockaddr.nsa_family(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@link Sockaddr#sa_data} field. */ - public Buffer sa_data(@NativeType("char[14]") ByteBuffer value) { Sockaddr.nsa_data(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link Sockaddr#sa_data} field. */ - public Buffer sa_data(int index, @NativeType("char") byte value) { Sockaddr.nsa_data(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/Socket.java b/LWJGL/src/main/java/org/lwjgl/system/linux/Socket.java deleted file mode 100644 index 43c895d8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/Socket.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import org.lwjgl.system.*; - -/** Native bindings to <sys/socket.h>. */ -public class Socket { - - static { Library.initialize(); } - - /** - * The following constants should be used for the second parameter of {@code shutdown}. - * - *
    Enum values:
    - * - *
      - *
    • {@link #SHUT_RD SHUT_RD} - No more receptions.
    • - *
    • {@link #SHUT_WR SHUT_WR} - No more transmissions.
    • - *
    • {@link #SHUT_RDWR SHUT_RDWR} - No more receptions or transmissions.
    • - *
    - */ - public static final int - SHUT_RD = 0, - SHUT_WR = 1, - SHUT_RDWR = 2; - - protected Socket() { - throw new UnsupportedOperationException(); - } - - // --- [ socket ] --- - - /** - * Create a new socket of type {@code __type} in domain {@code __domain}, using protocol {@code __protocol}. - * - *

    If {@code __protocol} is zero, one is chosen automatically.

    - * - * @return a file descriptor for the new socket, or -1 for errors - */ - public static native int socket(int __domain, int __type, int __protocol); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/Stat.java b/LWJGL/src/main/java/org/lwjgl/system/linux/Stat.java deleted file mode 100644 index d0a4aac2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/Stat.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <sys/stat.h>. */ -public class Stat { - - static { Library.initialize(); } - - protected Stat() { - throw new UnsupportedOperationException(); - } - - // --- [ stat ] --- - - public static native int nstat(long __file, long __buf); - - public static int stat(@NativeType("char const *") ByteBuffer __file, @NativeType("struct stat *") long __buf) { - if (CHECKS) { - checkNT1(__file); - check(__buf); - } - return nstat(memAddress(__file), __buf); - } - - public static int stat(@NativeType("char const *") CharSequence __file, @NativeType("struct stat *") long __buf) { - if (CHECKS) { - check(__buf); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(__file, true); - long __fileEncoded = stack.getPointerAddress(); - return nstat(__fileEncoded, __buf); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ fstat ] --- - - public static native int nfstat(int __fd, long __buf); - - public static int fstat(int __fd, @NativeType("struct stat *") long __buf) { - if (CHECKS) { - check(__buf); - } - return nfstat(__fd, __buf); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/Statx.java b/LWJGL/src/main/java/org/lwjgl/system/linux/Statx.java deleted file mode 100644 index 02b8f625..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/Statx.java +++ /dev/null @@ -1,699 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct statx {
    - *     __u32 {@link #stx_mask};
    - *     __u32 {@link #stx_blksize};
    - *     __u64 {@link #stx_attributes};
    - *     __u32 {@link #stx_nlink};
    - *     __u32 {@link #stx_uid};
    - *     __u32 {@link #stx_gid};
    - *     __u16 {@link #stx_mode};
    - *     __u16 __spare0[1];
    - *     __u64 {@link #stx_ino};
    - *     __u64 {@link #stx_size};
    - *     __u64 {@link #stx_blocks};
    - *     __u64 {@link #stx_attributes_mask};
    - *     {@link StatxTimestamp struct statx_timestamp} {@link #stx_atime};
    - *     {@link StatxTimestamp struct statx_timestamp} {@link #stx_btime};
    - *     {@link StatxTimestamp struct statx_timestamp} {@link #stx_ctime};
    - *     {@link StatxTimestamp struct statx_timestamp} {@link #stx_mtime};
    - *     __u32 {@link #stx_rdev_major};
    - *     __u32 stx_rdev_minor;
    - *     __u32 {@link #stx_dev_major};
    - *     __u32 stx_dev_minor;
    - *     __u64 stx_mnt_id;
    - *     __u64 __spare2;
    - *     __u64 __spare3[12];
    - * }
    - */ -@NativeType("struct statx") -public class Statx extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - STX_MASK, - STX_BLKSIZE, - STX_ATTRIBUTES, - STX_NLINK, - STX_UID, - STX_GID, - STX_MODE, - __SPARE0, - STX_INO, - STX_SIZE, - STX_BLOCKS, - STX_ATTRIBUTES_MASK, - STX_ATIME, - STX_BTIME, - STX_CTIME, - STX_MTIME, - STX_RDEV_MAJOR, - STX_RDEV_MINOR, - STX_DEV_MAJOR, - STX_DEV_MINOR, - STX_MNT_ID, - __SPARE2, - __SPARE3; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(8), - __member(4), - __member(4), - __member(4), - __member(2), - __array(2, 1), - __member(8), - __member(8), - __member(8), - __member(8), - __member(StatxTimestamp.SIZEOF, StatxTimestamp.ALIGNOF), - __member(StatxTimestamp.SIZEOF, StatxTimestamp.ALIGNOF), - __member(StatxTimestamp.SIZEOF, StatxTimestamp.ALIGNOF), - __member(StatxTimestamp.SIZEOF, StatxTimestamp.ALIGNOF), - __member(4), - __member(4), - __member(4), - __member(4), - __member(8), - __member(8), - __array(8, 12) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - STX_MASK = layout.offsetof(0); - STX_BLKSIZE = layout.offsetof(1); - STX_ATTRIBUTES = layout.offsetof(2); - STX_NLINK = layout.offsetof(3); - STX_UID = layout.offsetof(4); - STX_GID = layout.offsetof(5); - STX_MODE = layout.offsetof(6); - __SPARE0 = layout.offsetof(7); - STX_INO = layout.offsetof(8); - STX_SIZE = layout.offsetof(9); - STX_BLOCKS = layout.offsetof(10); - STX_ATTRIBUTES_MASK = layout.offsetof(11); - STX_ATIME = layout.offsetof(12); - STX_BTIME = layout.offsetof(13); - STX_CTIME = layout.offsetof(14); - STX_MTIME = layout.offsetof(15); - STX_RDEV_MAJOR = layout.offsetof(16); - STX_RDEV_MINOR = layout.offsetof(17); - STX_DEV_MAJOR = layout.offsetof(18); - STX_DEV_MINOR = layout.offsetof(19); - STX_MNT_ID = layout.offsetof(20); - __SPARE2 = layout.offsetof(21); - __SPARE3 = layout.offsetof(22); - } - - protected Statx(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected Statx create(long address, @Nullable ByteBuffer container) { - return new Statx(address, container); - } - - /** - * Creates a {@code Statx} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public Statx(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** what results were written [uncond] */ - @NativeType("__u32") - public int stx_mask() { return nstx_mask(address()); } - /** preferred general I/O size [uncond] */ - @NativeType("__u32") - public int stx_blksize() { return nstx_blksize(address()); } - /** flags conveying information about the file [uncond] */ - @NativeType("__u64") - public long stx_attributes() { return nstx_attributes(address()); } - /** number of hard links */ - @NativeType("__u32") - public int stx_nlink() { return nstx_nlink(address()); } - /** user ID of owner */ - @NativeType("__u32") - public int stx_uid() { return nstx_uid(address()); } - /** group ID of owner */ - @NativeType("__u32") - public int stx_gid() { return nstx_gid(address()); } - /** file mode */ - @NativeType("__u16") - public short stx_mode() { return nstx_mode(address()); } - /** {@code inode} number */ - @NativeType("__u64") - public long stx_ino() { return nstx_ino(address()); } - /** file size */ - @NativeType("__u64") - public long stx_size() { return nstx_size(address()); } - /** number of 512-byte blocks allocated */ - @NativeType("__u64") - public long stx_blocks() { return nstx_blocks(address()); } - /** mask to show what's supported in {@code stx_attributes} */ - @NativeType("__u64") - public long stx_attributes_mask() { return nstx_attributes_mask(address()); } - /** last access time */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_atime() { return nstx_atime(address()); } - /** file creation time */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_btime() { return nstx_btime(address()); } - /** last attribute change time */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_ctime() { return nstx_ctime(address()); } - /** last data modification time */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_mtime() { return nstx_mtime(address()); } - /** device ID of special file [if bdev/cdev] */ - @NativeType("__u32") - public int stx_rdev_major() { return nstx_rdev_major(address()); } - /** @return the value of the {@code stx_rdev_minor} field. */ - @NativeType("__u32") - public int stx_rdev_minor() { return nstx_rdev_minor(address()); } - /** ID of device containing file [uncond] */ - @NativeType("__u32") - public int stx_dev_major() { return nstx_dev_major(address()); } - /** @return the value of the {@code stx_dev_minor} field. */ - @NativeType("__u32") - public int stx_dev_minor() { return nstx_dev_minor(address()); } - /** @return the value of the {@code stx_mnt_id} field. */ - @NativeType("__u64") - public long stx_mnt_id() { return nstx_mnt_id(address()); } - - /** Sets the specified value to the {@link #stx_mask} field. */ - public Statx stx_mask(@NativeType("__u32") int value) { nstx_mask(address(), value); return this; } - /** Sets the specified value to the {@link #stx_blksize} field. */ - public Statx stx_blksize(@NativeType("__u32") int value) { nstx_blksize(address(), value); return this; } - /** Sets the specified value to the {@link #stx_attributes} field. */ - public Statx stx_attributes(@NativeType("__u64") long value) { nstx_attributes(address(), value); return this; } - /** Sets the specified value to the {@link #stx_nlink} field. */ - public Statx stx_nlink(@NativeType("__u32") int value) { nstx_nlink(address(), value); return this; } - /** Sets the specified value to the {@link #stx_uid} field. */ - public Statx stx_uid(@NativeType("__u32") int value) { nstx_uid(address(), value); return this; } - /** Sets the specified value to the {@link #stx_gid} field. */ - public Statx stx_gid(@NativeType("__u32") int value) { nstx_gid(address(), value); return this; } - /** Sets the specified value to the {@link #stx_mode} field. */ - public Statx stx_mode(@NativeType("__u16") short value) { nstx_mode(address(), value); return this; } - /** Sets the specified value to the {@link #stx_ino} field. */ - public Statx stx_ino(@NativeType("__u64") long value) { nstx_ino(address(), value); return this; } - /** Sets the specified value to the {@link #stx_size} field. */ - public Statx stx_size(@NativeType("__u64") long value) { nstx_size(address(), value); return this; } - /** Sets the specified value to the {@link #stx_blocks} field. */ - public Statx stx_blocks(@NativeType("__u64") long value) { nstx_blocks(address(), value); return this; } - /** Sets the specified value to the {@link #stx_attributes_mask} field. */ - public Statx stx_attributes_mask(@NativeType("__u64") long value) { nstx_attributes_mask(address(), value); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link #stx_atime} field. */ - public Statx stx_atime(@NativeType("struct statx_timestamp") StatxTimestamp value) { nstx_atime(address(), value); return this; } - /** Passes the {@link #stx_atime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Statx stx_atime(java.util.function.Consumer consumer) { consumer.accept(stx_atime()); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link #stx_btime} field. */ - public Statx stx_btime(@NativeType("struct statx_timestamp") StatxTimestamp value) { nstx_btime(address(), value); return this; } - /** Passes the {@link #stx_btime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Statx stx_btime(java.util.function.Consumer consumer) { consumer.accept(stx_btime()); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link #stx_ctime} field. */ - public Statx stx_ctime(@NativeType("struct statx_timestamp") StatxTimestamp value) { nstx_ctime(address(), value); return this; } - /** Passes the {@link #stx_ctime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Statx stx_ctime(java.util.function.Consumer consumer) { consumer.accept(stx_ctime()); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link #stx_mtime} field. */ - public Statx stx_mtime(@NativeType("struct statx_timestamp") StatxTimestamp value) { nstx_mtime(address(), value); return this; } - /** Passes the {@link #stx_mtime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Statx stx_mtime(java.util.function.Consumer consumer) { consumer.accept(stx_mtime()); return this; } - /** Sets the specified value to the {@link #stx_rdev_major} field. */ - public Statx stx_rdev_major(@NativeType("__u32") int value) { nstx_rdev_major(address(), value); return this; } - /** Sets the specified value to the {@code stx_rdev_minor} field. */ - public Statx stx_rdev_minor(@NativeType("__u32") int value) { nstx_rdev_minor(address(), value); return this; } - /** Sets the specified value to the {@link #stx_dev_major} field. */ - public Statx stx_dev_major(@NativeType("__u32") int value) { nstx_dev_major(address(), value); return this; } - /** Sets the specified value to the {@code stx_dev_minor} field. */ - public Statx stx_dev_minor(@NativeType("__u32") int value) { nstx_dev_minor(address(), value); return this; } - /** Sets the specified value to the {@code stx_mnt_id} field. */ - public Statx stx_mnt_id(@NativeType("__u64") long value) { nstx_mnt_id(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public Statx set( - int stx_mask, - int stx_blksize, - long stx_attributes, - int stx_nlink, - int stx_uid, - int stx_gid, - short stx_mode, - long stx_ino, - long stx_size, - long stx_blocks, - long stx_attributes_mask, - StatxTimestamp stx_atime, - StatxTimestamp stx_btime, - StatxTimestamp stx_ctime, - StatxTimestamp stx_mtime, - int stx_rdev_major, - int stx_rdev_minor, - int stx_dev_major, - int stx_dev_minor, - long stx_mnt_id - ) { - stx_mask(stx_mask); - stx_blksize(stx_blksize); - stx_attributes(stx_attributes); - stx_nlink(stx_nlink); - stx_uid(stx_uid); - stx_gid(stx_gid); - stx_mode(stx_mode); - stx_ino(stx_ino); - stx_size(stx_size); - stx_blocks(stx_blocks); - stx_attributes_mask(stx_attributes_mask); - stx_atime(stx_atime); - stx_btime(stx_btime); - stx_ctime(stx_ctime); - stx_mtime(stx_mtime); - stx_rdev_major(stx_rdev_major); - stx_rdev_minor(stx_rdev_minor); - stx_dev_major(stx_dev_major); - stx_dev_minor(stx_dev_minor); - stx_mnt_id(stx_mnt_id); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public Statx set(Statx src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code Statx} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static Statx malloc() { - return new Statx(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code Statx} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static Statx calloc() { - return new Statx(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code Statx} instance allocated with {@link BufferUtils}. */ - public static Statx create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new Statx(memAddress(container), container); - } - - /** Returns a new {@code Statx} instance for the specified memory address. */ - public static Statx create(long address) { - return new Statx(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Statx createSafe(long address) { - return address == NULL ? null : new Statx(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code Statx} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static Statx malloc(MemoryStack stack) { - return new Statx(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code Statx} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static Statx calloc(MemoryStack stack) { - return new Statx(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #stx_mask}. */ - public static int nstx_mask(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_MASK); } - /** Unsafe version of {@link #stx_blksize}. */ - public static int nstx_blksize(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_BLKSIZE); } - /** Unsafe version of {@link #stx_attributes}. */ - public static long nstx_attributes(long struct) { return UNSAFE.getLong(null, struct + Statx.STX_ATTRIBUTES); } - /** Unsafe version of {@link #stx_nlink}. */ - public static int nstx_nlink(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_NLINK); } - /** Unsafe version of {@link #stx_uid}. */ - public static int nstx_uid(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_UID); } - /** Unsafe version of {@link #stx_gid}. */ - public static int nstx_gid(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_GID); } - /** Unsafe version of {@link #stx_mode}. */ - public static short nstx_mode(long struct) { return UNSAFE.getShort(null, struct + Statx.STX_MODE); } - public static ShortBuffer n__spare0(long struct) { return memShortBuffer(struct + Statx.__SPARE0, 1); } - public static short n__spare0(long struct, int index) { - return UNSAFE.getShort(null, struct + Statx.__SPARE0 + check(index, 1) * 2); - } - /** Unsafe version of {@link #stx_ino}. */ - public static long nstx_ino(long struct) { return UNSAFE.getLong(null, struct + Statx.STX_INO); } - /** Unsafe version of {@link #stx_size}. */ - public static long nstx_size(long struct) { return UNSAFE.getLong(null, struct + Statx.STX_SIZE); } - /** Unsafe version of {@link #stx_blocks}. */ - public static long nstx_blocks(long struct) { return UNSAFE.getLong(null, struct + Statx.STX_BLOCKS); } - /** Unsafe version of {@link #stx_attributes_mask}. */ - public static long nstx_attributes_mask(long struct) { return UNSAFE.getLong(null, struct + Statx.STX_ATTRIBUTES_MASK); } - /** Unsafe version of {@link #stx_atime}. */ - public static StatxTimestamp nstx_atime(long struct) { return StatxTimestamp.create(struct + Statx.STX_ATIME); } - /** Unsafe version of {@link #stx_btime}. */ - public static StatxTimestamp nstx_btime(long struct) { return StatxTimestamp.create(struct + Statx.STX_BTIME); } - /** Unsafe version of {@link #stx_ctime}. */ - public static StatxTimestamp nstx_ctime(long struct) { return StatxTimestamp.create(struct + Statx.STX_CTIME); } - /** Unsafe version of {@link #stx_mtime}. */ - public static StatxTimestamp nstx_mtime(long struct) { return StatxTimestamp.create(struct + Statx.STX_MTIME); } - /** Unsafe version of {@link #stx_rdev_major}. */ - public static int nstx_rdev_major(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_RDEV_MAJOR); } - /** Unsafe version of {@link #stx_rdev_minor}. */ - public static int nstx_rdev_minor(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_RDEV_MINOR); } - /** Unsafe version of {@link #stx_dev_major}. */ - public static int nstx_dev_major(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_DEV_MAJOR); } - /** Unsafe version of {@link #stx_dev_minor}. */ - public static int nstx_dev_minor(long struct) { return UNSAFE.getInt(null, struct + Statx.STX_DEV_MINOR); } - /** Unsafe version of {@link #stx_mnt_id}. */ - public static long nstx_mnt_id(long struct) { return UNSAFE.getLong(null, struct + Statx.STX_MNT_ID); } - public static long n__spare2(long struct) { return UNSAFE.getLong(null, struct + Statx.__SPARE2); } - public static LongBuffer n__spare3(long struct) { return memLongBuffer(struct + Statx.__SPARE3, 12); } - public static long n__spare3(long struct, int index) { - return UNSAFE.getLong(null, struct + Statx.__SPARE3 + check(index, 12) * 8); - } - - /** Unsafe version of {@link #stx_mask(int) stx_mask}. */ - public static void nstx_mask(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_MASK, value); } - /** Unsafe version of {@link #stx_blksize(int) stx_blksize}. */ - public static void nstx_blksize(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_BLKSIZE, value); } - /** Unsafe version of {@link #stx_attributes(long) stx_attributes}. */ - public static void nstx_attributes(long struct, long value) { UNSAFE.putLong(null, struct + Statx.STX_ATTRIBUTES, value); } - /** Unsafe version of {@link #stx_nlink(int) stx_nlink}. */ - public static void nstx_nlink(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_NLINK, value); } - /** Unsafe version of {@link #stx_uid(int) stx_uid}. */ - public static void nstx_uid(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_UID, value); } - /** Unsafe version of {@link #stx_gid(int) stx_gid}. */ - public static void nstx_gid(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_GID, value); } - /** Unsafe version of {@link #stx_mode(short) stx_mode}. */ - public static void nstx_mode(long struct, short value) { UNSAFE.putShort(null, struct + Statx.STX_MODE, value); } - public static void n__spare0(long struct, ShortBuffer value) { - if (CHECKS) { checkGT(value, 1); } - memCopy(memAddress(value), struct + Statx.__SPARE0, value.remaining() * 2); - } - public static void n__spare0(long struct, int index, short value) { - UNSAFE.putShort(null, struct + Statx.__SPARE0 + check(index, 1) * 2, value); - } - /** Unsafe version of {@link #stx_ino(long) stx_ino}. */ - public static void nstx_ino(long struct, long value) { UNSAFE.putLong(null, struct + Statx.STX_INO, value); } - /** Unsafe version of {@link #stx_size(long) stx_size}. */ - public static void nstx_size(long struct, long value) { UNSAFE.putLong(null, struct + Statx.STX_SIZE, value); } - /** Unsafe version of {@link #stx_blocks(long) stx_blocks}. */ - public static void nstx_blocks(long struct, long value) { UNSAFE.putLong(null, struct + Statx.STX_BLOCKS, value); } - /** Unsafe version of {@link #stx_attributes_mask(long) stx_attributes_mask}. */ - public static void nstx_attributes_mask(long struct, long value) { UNSAFE.putLong(null, struct + Statx.STX_ATTRIBUTES_MASK, value); } - /** Unsafe version of {@link #stx_atime(StatxTimestamp) stx_atime}. */ - public static void nstx_atime(long struct, StatxTimestamp value) { memCopy(value.address(), struct + Statx.STX_ATIME, StatxTimestamp.SIZEOF); } - /** Unsafe version of {@link #stx_btime(StatxTimestamp) stx_btime}. */ - public static void nstx_btime(long struct, StatxTimestamp value) { memCopy(value.address(), struct + Statx.STX_BTIME, StatxTimestamp.SIZEOF); } - /** Unsafe version of {@link #stx_ctime(StatxTimestamp) stx_ctime}. */ - public static void nstx_ctime(long struct, StatxTimestamp value) { memCopy(value.address(), struct + Statx.STX_CTIME, StatxTimestamp.SIZEOF); } - /** Unsafe version of {@link #stx_mtime(StatxTimestamp) stx_mtime}. */ - public static void nstx_mtime(long struct, StatxTimestamp value) { memCopy(value.address(), struct + Statx.STX_MTIME, StatxTimestamp.SIZEOF); } - /** Unsafe version of {@link #stx_rdev_major(int) stx_rdev_major}. */ - public static void nstx_rdev_major(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_RDEV_MAJOR, value); } - /** Unsafe version of {@link #stx_rdev_minor(int) stx_rdev_minor}. */ - public static void nstx_rdev_minor(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_RDEV_MINOR, value); } - /** Unsafe version of {@link #stx_dev_major(int) stx_dev_major}. */ - public static void nstx_dev_major(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_DEV_MAJOR, value); } - /** Unsafe version of {@link #stx_dev_minor(int) stx_dev_minor}. */ - public static void nstx_dev_minor(long struct, int value) { UNSAFE.putInt(null, struct + Statx.STX_DEV_MINOR, value); } - /** Unsafe version of {@link #stx_mnt_id(long) stx_mnt_id}. */ - public static void nstx_mnt_id(long struct, long value) { UNSAFE.putLong(null, struct + Statx.STX_MNT_ID, value); } - public static void n__spare2(long struct, long value) { UNSAFE.putLong(null, struct + Statx.__SPARE2, value); } - public static void n__spare3(long struct, LongBuffer value) { - if (CHECKS) { checkGT(value, 12); } - memCopy(memAddress(value), struct + Statx.__SPARE3, value.remaining() * 8); - } - public static void n__spare3(long struct, int index, long value) { - UNSAFE.putLong(null, struct + Statx.__SPARE3 + check(index, 12) * 8, value); - } - - // ----------------------------------- - - /** An array of {@link Statx} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final Statx ELEMENT_FACTORY = Statx.create(-1L); - - /** - * Creates a new {@code Statx.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link Statx#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected Statx getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link Statx#stx_mask} field. */ - @NativeType("__u32") - public int stx_mask() { return Statx.nstx_mask(address()); } - /** @return the value of the {@link Statx#stx_blksize} field. */ - @NativeType("__u32") - public int stx_blksize() { return Statx.nstx_blksize(address()); } - /** @return the value of the {@link Statx#stx_attributes} field. */ - @NativeType("__u64") - public long stx_attributes() { return Statx.nstx_attributes(address()); } - /** @return the value of the {@link Statx#stx_nlink} field. */ - @NativeType("__u32") - public int stx_nlink() { return Statx.nstx_nlink(address()); } - /** @return the value of the {@link Statx#stx_uid} field. */ - @NativeType("__u32") - public int stx_uid() { return Statx.nstx_uid(address()); } - /** @return the value of the {@link Statx#stx_gid} field. */ - @NativeType("__u32") - public int stx_gid() { return Statx.nstx_gid(address()); } - /** @return the value of the {@link Statx#stx_mode} field. */ - @NativeType("__u16") - public short stx_mode() { return Statx.nstx_mode(address()); } - /** @return the value of the {@link Statx#stx_ino} field. */ - @NativeType("__u64") - public long stx_ino() { return Statx.nstx_ino(address()); } - /** @return the value of the {@link Statx#stx_size} field. */ - @NativeType("__u64") - public long stx_size() { return Statx.nstx_size(address()); } - /** @return the value of the {@link Statx#stx_blocks} field. */ - @NativeType("__u64") - public long stx_blocks() { return Statx.nstx_blocks(address()); } - /** @return the value of the {@link Statx#stx_attributes_mask} field. */ - @NativeType("__u64") - public long stx_attributes_mask() { return Statx.nstx_attributes_mask(address()); } - /** @return a {@link StatxTimestamp} view of the {@link Statx#stx_atime} field. */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_atime() { return Statx.nstx_atime(address()); } - /** @return a {@link StatxTimestamp} view of the {@link Statx#stx_btime} field. */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_btime() { return Statx.nstx_btime(address()); } - /** @return a {@link StatxTimestamp} view of the {@link Statx#stx_ctime} field. */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_ctime() { return Statx.nstx_ctime(address()); } - /** @return a {@link StatxTimestamp} view of the {@link Statx#stx_mtime} field. */ - @NativeType("struct statx_timestamp") - public StatxTimestamp stx_mtime() { return Statx.nstx_mtime(address()); } - /** @return the value of the {@link Statx#stx_rdev_major} field. */ - @NativeType("__u32") - public int stx_rdev_major() { return Statx.nstx_rdev_major(address()); } - /** @return the value of the {@code stx_rdev_minor} field. */ - @NativeType("__u32") - public int stx_rdev_minor() { return Statx.nstx_rdev_minor(address()); } - /** @return the value of the {@link Statx#stx_dev_major} field. */ - @NativeType("__u32") - public int stx_dev_major() { return Statx.nstx_dev_major(address()); } - /** @return the value of the {@code stx_dev_minor} field. */ - @NativeType("__u32") - public int stx_dev_minor() { return Statx.nstx_dev_minor(address()); } - /** @return the value of the {@code stx_mnt_id} field. */ - @NativeType("__u64") - public long stx_mnt_id() { return Statx.nstx_mnt_id(address()); } - - /** Sets the specified value to the {@link Statx#stx_mask} field. */ - public Buffer stx_mask(@NativeType("__u32") int value) { Statx.nstx_mask(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_blksize} field. */ - public Buffer stx_blksize(@NativeType("__u32") int value) { Statx.nstx_blksize(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_attributes} field. */ - public Buffer stx_attributes(@NativeType("__u64") long value) { Statx.nstx_attributes(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_nlink} field. */ - public Buffer stx_nlink(@NativeType("__u32") int value) { Statx.nstx_nlink(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_uid} field. */ - public Buffer stx_uid(@NativeType("__u32") int value) { Statx.nstx_uid(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_gid} field. */ - public Buffer stx_gid(@NativeType("__u32") int value) { Statx.nstx_gid(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_mode} field. */ - public Buffer stx_mode(@NativeType("__u16") short value) { Statx.nstx_mode(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_ino} field. */ - public Buffer stx_ino(@NativeType("__u64") long value) { Statx.nstx_ino(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_size} field. */ - public Buffer stx_size(@NativeType("__u64") long value) { Statx.nstx_size(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_blocks} field. */ - public Buffer stx_blocks(@NativeType("__u64") long value) { Statx.nstx_blocks(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_attributes_mask} field. */ - public Buffer stx_attributes_mask(@NativeType("__u64") long value) { Statx.nstx_attributes_mask(address(), value); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link Statx#stx_atime} field. */ - public Buffer stx_atime(@NativeType("struct statx_timestamp") StatxTimestamp value) { Statx.nstx_atime(address(), value); return this; } - /** Passes the {@link Statx#stx_atime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer stx_atime(java.util.function.Consumer consumer) { consumer.accept(stx_atime()); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link Statx#stx_btime} field. */ - public Buffer stx_btime(@NativeType("struct statx_timestamp") StatxTimestamp value) { Statx.nstx_btime(address(), value); return this; } - /** Passes the {@link Statx#stx_btime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer stx_btime(java.util.function.Consumer consumer) { consumer.accept(stx_btime()); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link Statx#stx_ctime} field. */ - public Buffer stx_ctime(@NativeType("struct statx_timestamp") StatxTimestamp value) { Statx.nstx_ctime(address(), value); return this; } - /** Passes the {@link Statx#stx_ctime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer stx_ctime(java.util.function.Consumer consumer) { consumer.accept(stx_ctime()); return this; } - /** Copies the specified {@link StatxTimestamp} to the {@link Statx#stx_mtime} field. */ - public Buffer stx_mtime(@NativeType("struct statx_timestamp") StatxTimestamp value) { Statx.nstx_mtime(address(), value); return this; } - /** Passes the {@link Statx#stx_mtime} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer stx_mtime(java.util.function.Consumer consumer) { consumer.accept(stx_mtime()); return this; } - /** Sets the specified value to the {@link Statx#stx_rdev_major} field. */ - public Buffer stx_rdev_major(@NativeType("__u32") int value) { Statx.nstx_rdev_major(address(), value); return this; } - /** Sets the specified value to the {@code stx_rdev_minor} field. */ - public Buffer stx_rdev_minor(@NativeType("__u32") int value) { Statx.nstx_rdev_minor(address(), value); return this; } - /** Sets the specified value to the {@link Statx#stx_dev_major} field. */ - public Buffer stx_dev_major(@NativeType("__u32") int value) { Statx.nstx_dev_major(address(), value); return this; } - /** Sets the specified value to the {@code stx_dev_minor} field. */ - public Buffer stx_dev_minor(@NativeType("__u32") int value) { Statx.nstx_dev_minor(address(), value); return this; } - /** Sets the specified value to the {@code stx_mnt_id} field. */ - public Buffer stx_mnt_id(@NativeType("__u64") long value) { Statx.nstx_mnt_id(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/StatxTimestamp.java b/LWJGL/src/main/java/org/lwjgl/system/linux/StatxTimestamp.java deleted file mode 100644 index 8fdb4810..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/StatxTimestamp.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Timestamp structure for the timestamps in {@code struct statx}. - * - *

    Layout

    - * - *
    
    - * struct statx_timestamp {
    - *     __s64 {@link #tv_sec};
    - *     __u32 {@link #tv_nsec};
    - *     __s32 __reserved;
    - * }
    - */ -@NativeType("struct statx_timestamp") -public class StatxTimestamp extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TV_SEC, - TV_NSEC, - __RESERVED; - - static { - Layout layout = __struct( - __member(8), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TV_SEC = layout.offsetof(0); - TV_NSEC = layout.offsetof(1); - __RESERVED = layout.offsetof(2); - } - - protected StatxTimestamp(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected StatxTimestamp create(long address, @Nullable ByteBuffer container) { - return new StatxTimestamp(address, container); - } - - /** - * Creates a {@code StatxTimestamp} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public StatxTimestamp(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the number of seconds before (negative) or after (positive) {@code 00:00:00 1st January 1970 UTC} */ - @NativeType("__s64") - public long tv_sec() { return ntv_sec(address()); } - /** a number of nanoseconds (0..999,999,999) after the {@code tv_sec} time */ - @NativeType("__u32") - public int tv_nsec() { return ntv_nsec(address()); } - - /** Sets the specified value to the {@link #tv_sec} field. */ - public StatxTimestamp tv_sec(@NativeType("__s64") long value) { ntv_sec(address(), value); return this; } - /** Sets the specified value to the {@link #tv_nsec} field. */ - public StatxTimestamp tv_nsec(@NativeType("__u32") int value) { ntv_nsec(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public StatxTimestamp set( - long tv_sec, - int tv_nsec - ) { - tv_sec(tv_sec); - tv_nsec(tv_nsec); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public StatxTimestamp set(StatxTimestamp src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code StatxTimestamp} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static StatxTimestamp malloc() { - return new StatxTimestamp(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code StatxTimestamp} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static StatxTimestamp calloc() { - return new StatxTimestamp(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code StatxTimestamp} instance allocated with {@link BufferUtils}. */ - public static StatxTimestamp create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new StatxTimestamp(memAddress(container), container); - } - - /** Returns a new {@code StatxTimestamp} instance for the specified memory address. */ - public static StatxTimestamp create(long address) { - return new StatxTimestamp(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static StatxTimestamp createSafe(long address) { - return address == NULL ? null : new StatxTimestamp(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code StatxTimestamp} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static StatxTimestamp malloc(MemoryStack stack) { - return new StatxTimestamp(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code StatxTimestamp} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static StatxTimestamp calloc(MemoryStack stack) { - return new StatxTimestamp(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #tv_sec}. */ - public static long ntv_sec(long struct) { return UNSAFE.getLong(null, struct + StatxTimestamp.TV_SEC); } - /** Unsafe version of {@link #tv_nsec}. */ - public static int ntv_nsec(long struct) { return UNSAFE.getInt(null, struct + StatxTimestamp.TV_NSEC); } - public static int n__reserved(long struct) { return UNSAFE.getInt(null, struct + StatxTimestamp.__RESERVED); } - - /** Unsafe version of {@link #tv_sec(long) tv_sec}. */ - public static void ntv_sec(long struct, long value) { UNSAFE.putLong(null, struct + StatxTimestamp.TV_SEC, value); } - /** Unsafe version of {@link #tv_nsec(int) tv_nsec}. */ - public static void ntv_nsec(long struct, int value) { UNSAFE.putInt(null, struct + StatxTimestamp.TV_NSEC, value); } - public static void n__reserved(long struct, int value) { UNSAFE.putInt(null, struct + StatxTimestamp.__RESERVED, value); } - - // ----------------------------------- - - /** An array of {@link StatxTimestamp} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final StatxTimestamp ELEMENT_FACTORY = StatxTimestamp.create(-1L); - - /** - * Creates a new {@code StatxTimestamp.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link StatxTimestamp#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected StatxTimestamp getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link StatxTimestamp#tv_sec} field. */ - @NativeType("__s64") - public long tv_sec() { return StatxTimestamp.ntv_sec(address()); } - /** @return the value of the {@link StatxTimestamp#tv_nsec} field. */ - @NativeType("__u32") - public int tv_nsec() { return StatxTimestamp.ntv_nsec(address()); } - - /** Sets the specified value to the {@link StatxTimestamp#tv_sec} field. */ - public Buffer tv_sec(@NativeType("__s64") long value) { StatxTimestamp.ntv_sec(address(), value); return this; } - /** Sets the specified value to the {@link StatxTimestamp#tv_nsec} field. */ - public Buffer tv_nsec(@NativeType("__u32") int value) { StatxTimestamp.ntv_nsec(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/UIO.java b/LWJGL/src/main/java/org/lwjgl/system/linux/UIO.java deleted file mode 100644 index 5154ba51..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/UIO.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import org.lwjgl.system.*; - -/** Native bindings to <sys/uio.h>. */ -public class UIO { - - static { Library.initialize(); } - - public static final int UIO_FASTIOV = 8; - - public static final int UIO_MAXIOV = 1024; - - /** - * Flags for {@code preadv2}/{@code pwritev2}. - * - *
    Enum values:
    - * - *
      - *
    • {@link #RWF_HIPRI RWF_HIPRI} - High priority request.
    • - *
    • {@link #RWF_DSYNC RWF_DSYNC} - per-IO {@link FCNTL#O_DSYNC}
    • - *
    • {@link #RWF_SYNC RWF_SYNC} - per-IO {@link FCNTL#O_SYNC}
    • - *
    • {@link #RWF_NOWAIT RWF_NOWAIT} - per-IO nonblocking mode
    • - *
    • {@link #RWF_APPEND RWF_APPEND} - per-IO {@link FCNTL#O_APPEND}
    • - *
    - */ - public static final int - RWF_HIPRI = 0x1, - RWF_DSYNC = 0x2, - RWF_SYNC = 0x4, - RWF_NOWAIT = 0x8, - RWF_APPEND = 0x10; - - protected UIO() { - throw new UnsupportedOperationException(); - } - - // --- [ readv ] --- - - public static native long nreadv(int __fd, long __iovec, int __count); - - @NativeType("ssize_t") - public static long readv(int __fd, @NativeType("struct iovec const *") IOVec __iovec, int __count) { - return nreadv(__fd, __iovec.address(), __count); - } - - // --- [ writev ] --- - - public static native long nwritev(int __fd, long __iovec, int __count); - - @NativeType("ssize_t") - public static long writev(int __fd, @NativeType("struct iovec const *") IOVec __iovec, int __count) { - return nwritev(__fd, __iovec.address(), __count); - } - - // --- [ preadv ] --- - - public static native long npreadv(int __fd, long __iovec, int __count, long __offset); - - @NativeType("ssize_t") - public static long preadv(int __fd, @NativeType("struct iovec const *") IOVec __iovec, int __count, @NativeType("off_t") long __offset) { - return npreadv(__fd, __iovec.address(), __count, __offset); - } - - // --- [ pwritev ] --- - - public static native long npwritev(int __fd, long __iovec, int __count, long __offset); - - @NativeType("ssize_t") - public static long pwritev(int __fd, @NativeType("struct iovec const *") IOVec __iovec, int __count, @NativeType("off_t") long __offset) { - return npwritev(__fd, __iovec.address(), __count, __offset); - } - - // --- [ process_vm_readv ] --- - - /** Unsafe version of: {@link #process_vm_readv} */ - public static native long nprocess_vm_readv(int __pid, long __lvec, long __liovcnt, long __rvec, long __riovcnt, long __flags); - - /** Read from another process' address space. */ - @NativeType("ssize_t") - public static long process_vm_readv(@NativeType("pid_t") int __pid, @NativeType("struct iovec const *") IOVec __lvec, @NativeType("unsigned long int") long __liovcnt, @NativeType("struct iovec const *") IOVec __rvec, @NativeType("unsigned long int") long __riovcnt, @NativeType("unsigned long int") long __flags) { - return nprocess_vm_readv(__pid, __lvec.address(), __liovcnt, __rvec.address(), __riovcnt, __flags); - } - - // --- [ process_vm_writev ] --- - - /** Unsafe version of: {@link #process_vm_writev} */ - public static native long nprocess_vm_writev(int __pid, long __lvec, long __liovcnt, long __rvec, long __riovcnt, long __flags); - - /** Write to another process' address space. */ - @NativeType("ssize_t") - public static long process_vm_writev(@NativeType("pid_t") int __pid, @NativeType("struct iovec const *") IOVec __lvec, @NativeType("unsigned long int") long __liovcnt, @NativeType("struct iovec const *") IOVec __rvec, @NativeType("unsigned long int") long __riovcnt, @NativeType("unsigned long int") long __flags) { - return nprocess_vm_writev(__pid, __lvec.address(), __liovcnt, __rvec.address(), __riovcnt, __flags); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/UNISTD.java b/LWJGL/src/main/java/org/lwjgl/system/linux/UNISTD.java deleted file mode 100644 index 26e81dd1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/UNISTD.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <unistd.h>. */ -public class UNISTD { - - static { Library.initialize(); } - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #_SC_OPEN_MAX _SC_OPEN_MAX}
    • - *
    • {@link #_SC_PAGE_SIZE _SC_PAGE_SIZE}
    • - *
    • {@link #_SC_IOV_MAX _SC_IOV_MAX}
    • - *
    - */ - public static final int - _SC_OPEN_MAX = 4, - _SC_PAGE_SIZE = 30, - _SC_IOV_MAX = 60; - - protected UNISTD() { - throw new UnsupportedOperationException(); - } - - // --- [ close ] --- - - /** */ - public static native int close(int fd); - - // --- [ sysconf ] --- - - /** */ - public static native long sysconf(int name); - - // --- [ read ] --- - - public static native long nread(int fd, long buf, long count); - - @NativeType("ssize_t") - public static long read(int fd, @NativeType("void *") ByteBuffer buf) { - return nread(fd, memAddress(buf), buf.remaining()); - } - - // --- [ getpid ] --- - - @NativeType("pid_t") - public static native int getpid(); - - // --- [ getppid ] --- - - @NativeType("pid_t") - public static native int getppid(); - - // --- [ gettid ] --- - - @NativeType("pid_t") - public static native int gettid(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/Visual.java b/LWJGL/src/main/java/org/lwjgl/system/linux/Visual.java deleted file mode 100644 index 6bb11d35..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/Visual.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Visual structure; contains information about colormapping possible. - * - *

    Layout

    - * - *
    
    - * struct Visual {
    - *     void * ext_data;
    - *     VisualID visualid;
    - *     int class;
    - *     unsigned long red_mask;
    - *     unsigned long green_mask;
    - *     unsigned long blue_mask;
    - *     int bits_per_rgb;
    - *     int map_entries;
    - * }
    - */ -public class Visual extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - EXT_DATA, - VISUALID, - CLASS, - RED_MASK, - GREEN_MASK, - BLUE_MASK, - BITS_PER_RGB, - MAP_ENTRIES; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - EXT_DATA = layout.offsetof(0); - VISUALID = layout.offsetof(1); - CLASS = layout.offsetof(2); - RED_MASK = layout.offsetof(3); - GREEN_MASK = layout.offsetof(4); - BLUE_MASK = layout.offsetof(5); - BITS_PER_RGB = layout.offsetof(6); - MAP_ENTRIES = layout.offsetof(7); - } - - protected Visual(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected Visual create(long address, @Nullable ByteBuffer container) { - return new Visual(address, container); - } - - /** - * Creates a {@code Visual} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public Visual(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code ext_data} field. */ - @NativeType("void *") - public long ext_data() { return next_data(address()); } - /** @return the value of the {@code visualid} field. */ - @NativeType("VisualID") - public long visualid() { return nvisualid(address()); } - /** @return the value of the {@code class} field. */ - public int class$() { return nclass$(address()); } - /** @return the value of the {@code red_mask} field. */ - @NativeType("unsigned long") - public long red_mask() { return nred_mask(address()); } - /** @return the value of the {@code green_mask} field. */ - @NativeType("unsigned long") - public long green_mask() { return ngreen_mask(address()); } - /** @return the value of the {@code blue_mask} field. */ - @NativeType("unsigned long") - public long blue_mask() { return nblue_mask(address()); } - /** @return the value of the {@code bits_per_rgb} field. */ - public int bits_per_rgb() { return nbits_per_rgb(address()); } - /** @return the value of the {@code map_entries} field. */ - public int map_entries() { return nmap_entries(address()); } - - /** Sets the specified value to the {@code ext_data} field. */ - public Visual ext_data(@NativeType("void *") long value) { next_data(address(), value); return this; } - /** Sets the specified value to the {@code visualid} field. */ - public Visual visualid(@NativeType("VisualID") long value) { nvisualid(address(), value); return this; } - /** Sets the specified value to the {@code class} field. */ - public Visual class$(int value) { nclass$(address(), value); return this; } - /** Sets the specified value to the {@code red_mask} field. */ - public Visual red_mask(@NativeType("unsigned long") long value) { nred_mask(address(), value); return this; } - /** Sets the specified value to the {@code green_mask} field. */ - public Visual green_mask(@NativeType("unsigned long") long value) { ngreen_mask(address(), value); return this; } - /** Sets the specified value to the {@code blue_mask} field. */ - public Visual blue_mask(@NativeType("unsigned long") long value) { nblue_mask(address(), value); return this; } - /** Sets the specified value to the {@code bits_per_rgb} field. */ - public Visual bits_per_rgb(int value) { nbits_per_rgb(address(), value); return this; } - /** Sets the specified value to the {@code map_entries} field. */ - public Visual map_entries(int value) { nmap_entries(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public Visual set( - long ext_data, - long visualid, - int class$, - long red_mask, - long green_mask, - long blue_mask, - int bits_per_rgb, - int map_entries - ) { - ext_data(ext_data); - visualid(visualid); - class$(class$); - red_mask(red_mask); - green_mask(green_mask); - blue_mask(blue_mask); - bits_per_rgb(bits_per_rgb); - map_entries(map_entries); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public Visual set(Visual src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code Visual} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static Visual malloc() { - return new Visual(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code Visual} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static Visual calloc() { - return new Visual(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code Visual} instance allocated with {@link BufferUtils}. */ - public static Visual create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new Visual(memAddress(container), container); - } - - /** Returns a new {@code Visual} instance for the specified memory address. */ - public static Visual create(long address) { - return new Visual(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Visual createSafe(long address) { - return address == NULL ? null : new Visual(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static Visual mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static Visual callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static Visual mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static Visual callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code Visual} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static Visual malloc(MemoryStack stack) { - return new Visual(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code Visual} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static Visual calloc(MemoryStack stack) { - return new Visual(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #ext_data}. */ - public static long next_data(long struct) { return memGetAddress(struct + Visual.EXT_DATA); } - /** Unsafe version of {@link #visualid}. */ - public static long nvisualid(long struct) { return memGetCLong(struct + Visual.VISUALID); } - /** Unsafe version of {@link #class$}. */ - public static int nclass$(long struct) { return UNSAFE.getInt(null, struct + Visual.CLASS); } - /** Unsafe version of {@link #red_mask}. */ - public static long nred_mask(long struct) { return memGetCLong(struct + Visual.RED_MASK); } - /** Unsafe version of {@link #green_mask}. */ - public static long ngreen_mask(long struct) { return memGetCLong(struct + Visual.GREEN_MASK); } - /** Unsafe version of {@link #blue_mask}. */ - public static long nblue_mask(long struct) { return memGetCLong(struct + Visual.BLUE_MASK); } - /** Unsafe version of {@link #bits_per_rgb}. */ - public static int nbits_per_rgb(long struct) { return UNSAFE.getInt(null, struct + Visual.BITS_PER_RGB); } - /** Unsafe version of {@link #map_entries}. */ - public static int nmap_entries(long struct) { return UNSAFE.getInt(null, struct + Visual.MAP_ENTRIES); } - - /** Unsafe version of {@link #ext_data(long) ext_data}. */ - public static void next_data(long struct, long value) { memPutAddress(struct + Visual.EXT_DATA, value); } - /** Unsafe version of {@link #visualid(long) visualid}. */ - public static void nvisualid(long struct, long value) { memPutCLong(struct + Visual.VISUALID, value); } - /** Unsafe version of {@link #class$(int) class$}. */ - public static void nclass$(long struct, int value) { UNSAFE.putInt(null, struct + Visual.CLASS, value); } - /** Unsafe version of {@link #red_mask(long) red_mask}. */ - public static void nred_mask(long struct, long value) { memPutCLong(struct + Visual.RED_MASK, value); } - /** Unsafe version of {@link #green_mask(long) green_mask}. */ - public static void ngreen_mask(long struct, long value) { memPutCLong(struct + Visual.GREEN_MASK, value); } - /** Unsafe version of {@link #blue_mask(long) blue_mask}. */ - public static void nblue_mask(long struct, long value) { memPutCLong(struct + Visual.BLUE_MASK, value); } - /** Unsafe version of {@link #bits_per_rgb(int) bits_per_rgb}. */ - public static void nbits_per_rgb(long struct, int value) { UNSAFE.putInt(null, struct + Visual.BITS_PER_RGB, value); } - /** Unsafe version of {@link #map_entries(int) map_entries}. */ - public static void nmap_entries(long struct, int value) { UNSAFE.putInt(null, struct + Visual.MAP_ENTRIES, value); } - - // ----------------------------------- - - /** An array of {@link Visual} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final Visual ELEMENT_FACTORY = Visual.create(-1L); - - /** - * Creates a new {@code Visual.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link Visual#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected Visual getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code ext_data} field. */ - @NativeType("void *") - public long ext_data() { return Visual.next_data(address()); } - /** @return the value of the {@code visualid} field. */ - @NativeType("VisualID") - public long visualid() { return Visual.nvisualid(address()); } - /** @return the value of the {@code class} field. */ - public int class$() { return Visual.nclass$(address()); } - /** @return the value of the {@code red_mask} field. */ - @NativeType("unsigned long") - public long red_mask() { return Visual.nred_mask(address()); } - /** @return the value of the {@code green_mask} field. */ - @NativeType("unsigned long") - public long green_mask() { return Visual.ngreen_mask(address()); } - /** @return the value of the {@code blue_mask} field. */ - @NativeType("unsigned long") - public long blue_mask() { return Visual.nblue_mask(address()); } - /** @return the value of the {@code bits_per_rgb} field. */ - public int bits_per_rgb() { return Visual.nbits_per_rgb(address()); } - /** @return the value of the {@code map_entries} field. */ - public int map_entries() { return Visual.nmap_entries(address()); } - - /** Sets the specified value to the {@code ext_data} field. */ - public Buffer ext_data(@NativeType("void *") long value) { Visual.next_data(address(), value); return this; } - /** Sets the specified value to the {@code visualid} field. */ - public Buffer visualid(@NativeType("VisualID") long value) { Visual.nvisualid(address(), value); return this; } - /** Sets the specified value to the {@code class} field. */ - public Buffer class$(int value) { Visual.nclass$(address(), value); return this; } - /** Sets the specified value to the {@code red_mask} field. */ - public Buffer red_mask(@NativeType("unsigned long") long value) { Visual.nred_mask(address(), value); return this; } - /** Sets the specified value to the {@code green_mask} field. */ - public Buffer green_mask(@NativeType("unsigned long") long value) { Visual.ngreen_mask(address(), value); return this; } - /** Sets the specified value to the {@code blue_mask} field. */ - public Buffer blue_mask(@NativeType("unsigned long") long value) { Visual.nblue_mask(address(), value); return this; } - /** Sets the specified value to the {@code bits_per_rgb} field. */ - public Buffer bits_per_rgb(int value) { Visual.nbits_per_rgb(address(), value); return this; } - /** Sets the specified value to the {@code map_entries} field. */ - public Buffer map_entries(int value) { Visual.nmap_entries(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/X11.java b/LWJGL/src/main/java/org/lwjgl/system/linux/X11.java deleted file mode 100644 index 2cc4bf71..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/X11.java +++ /dev/null @@ -1,839 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to libX11. */ -public class X11 { - - private static final SharedLibrary X11 = Library.loadNative(X11.class, "org.lwjgl", null, "libX11.so.6", "libX11.so"); - - /** Contains the function pointers loaded from the X11 {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - XOpenDisplay = apiGetFunctionAddress(X11, "XOpenDisplay"), - XCloseDisplay = apiGetFunctionAddress(X11, "XCloseDisplay"), - XDefaultScreen = apiGetFunctionAddress(X11, "XDefaultScreen"), - XRootWindow = apiGetFunctionAddress(X11, "XRootWindow"), - XCreateColormap = apiGetFunctionAddress(X11, "XCreateColormap"), - XFreeColormap = apiGetFunctionAddress(X11, "XFreeColormap"), - XCreateWindow = apiGetFunctionAddress(X11, "XCreateWindow"), - XDestroyWindow = apiGetFunctionAddress(X11, "XDestroyWindow"), - XFree = apiGetFunctionAddress(X11, "XFree"), - XSendEvent = apiGetFunctionAddress(X11, "XSendEvent"), - XDisplayMotionBufferSize = apiGetFunctionAddress(X11, "XDisplayMotionBufferSize"), - XGetMotionEvents = apiGetFunctionAddress(X11, "XGetMotionEvents"), - XTranslateCoordinates = apiGetFunctionAddress(X11, "XTranslateCoordinates"); - - } - - /** Returns the X11 {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return X11; - } - - /** Boolean values */ - public static final int - True = 1, - False = 0; - - /** RESERVED RESOURCE AND CONSTANT DEFINITIONS */ - public static final int - None = 0, - ParentRelative = 1, - CopyFromParent = 0, - PointerWindow = 0, - InputFocus = 1, - PointerRoot = 1, - AnyPropertyType = 0, - AnyKey = 0, - AnyButton = 0, - AllTemporary = 0, - CurrentTime = 0, - NoSymbol = 0; - - /** ERROR CODES */ - public static final int - Success = 0, - BadRequest = 1, - BadValue = 2, - BadWindow = 3, - BadPixmap = 4, - BadAtom = 5, - BadCursor = 6, - BadFont = 7, - BadMatch = 8, - BadDrawable = 9, - BadAccess = 10, - BadAlloc = 11, - BadColor = 12, - BadGC = 13, - BadIDChoice = 14, - BadName = 15, - BadLength = 16, - BadImplementation = 17, - FirstExtensionError = 128, - LastExtensionError = 255; - - /** Window attributes for CreateWindow and ChangeWindowAttributes */ - public static final int - CWBackPixmap = 1 << 0, - CWBackPixel = 1 << 1, - CWBorderPixmap = 1 << 2, - CWBorderPixel = 1 << 3, - CWBitGravity = 1 << 4, - CWWinGravity = 1 << 5, - CWBackingStore = 1 << 6, - CWBackingPlanes = 1 << 7, - CWBackingPixel = 1 << 8, - CWOverrideRedirect = 1 << 9, - CWSaveUnder = 1 << 10, - CWEventMask = 1 << 11, - CWDontPropagate = 1 << 12, - CWColormap = 1 << 13, - CWCursor = 1 << 14; - - /** Input Event Masks. Used as event-mask window attribute and as arguments to Grab requests. Not to be confused with event names. */ - public static final int - NoEventMask = 0, - KeyPressMask = 1 << 0, - KeyReleaseMask = 1 << 1, - ButtonPressMask = 1 << 2, - ButtonReleaseMask = 1 << 3, - EnterWindowMask = 1 << 4, - LeaveWindowMask = 1 << 5, - PointerMotionMask = 1 << 6, - PointerMotionHintMask = 1 << 7, - Button1MotionMask = 1 << 8, - Button2MotionMask = 1 << 9, - Button3MotionMask = 1 << 10, - Button4MotionMask = 1 << 11, - Button5MotionMask = 1 << 12, - ButtonMotionMask = 1 << 13, - KeymapStateMask = 1 << 14, - ExposureMask = 1 << 15, - VisibilityChangeMask = 1 << 16, - StructureNotifyMask = 1 << 17, - ResizeRedirectMask = 1 << 18, - SubstructureNotifyMask = 1 << 19, - SubstructureRedirectMask = 1 << 20, - FocusChangeMask = 1 << 21, - PropertyChangeMask = 1 << 22, - ColormapChangeMask = 1 << 23, - OwnerGrabButtonMask = 1 << 24; - - /** - * Event names. Used in "type" field in {@code XEvent} structures. Not to be confused with event masks above. They start from 2 because 0 and 1 are reserved in - * the protocol for errors and replies. - */ - public static final int - KeyPress = 2, - KeyRelease = 3, - ButtonPress = 4, - ButtonRelease = 5, - MotionNotify = 6, - EnterNotify = 7, - LeaveNotify = 8, - FocusIn = 9, - FocusOut = 10, - KeymapNotify = 11, - Expose = 12, - GraphicsExpose = 13, - NoExpose = 14, - VisibilityNotify = 15, - CreateNotify = 16, - DestroyNotify = 17, - UnmapNotify = 18, - MapNotify = 19, - MapRequest = 20, - ReparentNotify = 21, - ConfigureNotify = 22, - ConfigureRequest = 23, - GravityNotify = 24, - ResizeRequest = 25, - CirculateNotify = 26, - CirculateRequest = 27, - PropertyNotify = 28, - SelectionClear = 29, - SelectionRequest = 30, - SelectionNotify = 31, - ColormapNotify = 32, - ClientMessage = 33, - MappingNotify = 34, - GenericEvent = 35, - LASTEvent = 36; - - /** Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, state in various key-, mouse-, and button-related events. */ - public static final int - ShiftMask = 1<<0, - LockMask = 1<<1, - ControlMask = 1<<2, - Mod1Mask = 1<<3, - Mod2Mask = 1<<4, - Mod3Mask = 1<<5, - Mod4Mask = 1<<6, - Mod5Mask = 1<<7; - - /** modifier names. Used to build a SetModifierMapping request or to read a GetModifierMapping request. These correspond to the masks defined above. */ - public static final int - ShiftMapIndex = 0, - LockMapIndex = 1, - ControlMapIndex = 2, - Mod1MapIndex = 3, - Mod2MapIndex = 4, - Mod3MapIndex = 5, - Mod4MapIndex = 6, - Mod5MapIndex = 7; - - /** button masks. Used in same manner as Key masks above. Not to be confused with button names below. */ - public static final int - Button1Mask = 1<<8, - Button2Mask = 1<<9, - Button3Mask = 1<<10, - Button4Mask = 1<<11, - Button5Mask = 1<<12, - AnyModifier = 1<<15; - - /** - * button names. Used as arguments to GrabButton and as detail in ButtonPress and ButtonRelease events. Not to be confused with button masks above. Note - * that 0 is already defined above as "AnyButton". - */ - public static final int - Button1 = 1, - Button2 = 2, - Button3 = 3, - Button4 = 4, - Button5 = 5; - - /** Notify modes */ - public static final int - NotifyNormal = 0, - NotifyGrab = 1, - NotifyUngrab = 2, - NotifyWhileGrabbed = 3, - NotifyHint = 1; - - /** Notify detail */ - public static final int - NotifyAncestor = 0, - NotifyVirtual = 1, - NotifyInferior = 2, - NotifyNonlinear = 3, - NotifyNonlinearVirtual = 4, - NotifyPointer = 5, - NotifyPointerRoot = 6, - NotifyDetailNone = 7; - - /** Visibility notify */ - public static final int - VisibilityUnobscured = 0, - VisibilityPartiallyObscured = 1, - VisibilityFullyObscured = 2; - - /** Circulation request */ - public static final int - PlaceOnTop = 0, - PlaceOnBottom = 1; - - /** Property notification */ - public static final int - PropertyNewValue = 0, - PropertyDelete = 1; - - /** Color Map notification */ - public static final int - ColormapUninstalled = 0, - ColormapInstalled = 1; - - /** GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */ - public static final int - GrabModeSync = 0, - GrabModeAsync = 1; - - /** GrabPointer, GrabKeyboard reply status */ - public static final int - GrabSuccess = 0, - AlreadyGrabbed = 1, - GrabInvalidTime = 2, - GrabNotViewable = 3, - GrabFrozen = 4; - - /** AllowEvents modes */ - public static final int - AsyncPointer = 0, - SyncPointer = 1, - ReplayPointer = 2, - AsyncKeyboard = 3, - SyncKeyboard = 4, - ReplayKeyboard = 5, - AsyncBoth = 6, - SyncBoth = 7; - - /** For {@link #XCreateColormap}. */ - public static final int - AllocNone = 0, - AllocAll = 1; - - /** Used in XSetInputFocus(), XGetInputFocus(). */ - public static final int - RevertToNone = None, - RevertToPointerRoot = PointerRoot, - RevertToParent = 2; - - /** Window classes used by {@link #XCreateWindow}. */ - public static final int - InputOutput = 1, - InputOnly = 2; - - /** SCREEN SAVER STUFF */ - public static final int - DontPreferBlanking = 0, - PreferBlanking = 1, - DefaultBlanking = 2, - DisableScreenSaver = 0, - DisableScreenInterval = 0, - DontAllowExposures = 0, - AllowExposures = 1, - DefaultExposures = 2, - ScreenSaverReset = 0, - ScreenSaverActive = 1; - - /** Property modes */ - public static final int - PropModeReplace = 0, - PropModePrepend = 1, - PropModeAppend = 2; - - /** graphics functions, as in GC.alu */ - public static final int - GXclear = 0x0, - GXand = 0x1, - GXandReverse = 0x2, - GXcopy = 0x3, - GXandInverted = 0x4, - GXnoop = 0x5, - GXxor = 0x6, - GXor = 0x7, - GXnor = 0x8, - GXequiv = 0x9, - GXinvert = 0xA, - GXorReverse = 0xB, - GXcopyInverted = 0xC, - GXorInverted = 0xD, - GXnand = 0xE, - GXset = 0xF; - - /** LineStyle */ - public static final int - LineSolid = 0, - LineOnOffDash = 1, - LineDoubleDash = 2; - - /** capStyle */ - public static final int - CapNotLast = 0, - CapButt = 1, - CapRound = 2, - CapProjecting = 3; - - /** joinStyle */ - public static final int - JoinMiter = 0, - JoinRound = 1, - JoinBevel = 2; - - /** fillStyle */ - public static final int - FillSolid = 0, - FillTiled = 1, - FillStippled = 2, - FillOpaqueStippled = 3; - - /** fillRule */ - public static final int - EvenOddRule = 0, - WindingRule = 1; - - /** subwindow mode */ - public static final int - ClipByChildren = 0, - IncludeInferiors = 1; - - /** SetClipRectangles ordering */ - public static final int - Unsorted = 0, - YSorted = 1, - YXSorted = 2, - YXBanded = 3; - - /** CoordinateMode for drawing routines */ - public static final int - CoordModeOrigin = 0, - CoordModePrevious = 1; - - /** Polygon shapes */ - public static final int - Complex = 0, - Nonconvex = 1, - Convex = 2; - - /** Arc modes for PolyFillArc */ - public static final int - ArcChord = 0, - ArcPieSlice = 1; - - /** GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into GC.stateChanges */ - public static final int - GCFunction = 1<<0, - GCPlaneMask = 1<<1, - GCForeground = 1<<2, - GCBackground = 1<<3, - GCLineWidth = 1<<4, - GCLineStyle = 1<<5, - GCCapStyle = 1<<6, - GCJoinStyle = 1<<7, - GCFillStyle = 1<<8, - GCFillRule = 1<<9, - GCTile = 1<<10, - GCStipple = 1<<11, - GCTileStipXOrigin = 1<<12, - GCTileStipYOrigin = 1<<13, - GCFont = 1<<14, - GCSubwindowMode = 1<<15, - GCGraphicsExposures = 1<<16, - GCClipXOrigin = 1<<17, - GCClipYOrigin = 1<<18, - GCClipMask = 1<<19, - GCDashOffset = 1<<20, - GCDashList = 1<<21, - GCArcMode = 1<<22, - GCLastBit = 22; - - public static final int - Above = 0, - Below = 1, - TopIf = 2, - BottomIf = 3, - Opposite = 4; - - public static final int - MappingModifier = 0, - MappingKeyboard = 1, - MappingPointer = 2; - - protected X11() { - throw new UnsupportedOperationException(); - } - - // --- [ XOpenDisplay ] --- - - /** Unsafe version of: {@link #XOpenDisplay} */ - public static long nXOpenDisplay(long display_name) { - long __functionAddress = Functions.XOpenDisplay; - return invokePP(display_name, __functionAddress); - } - - /** - * Returns a Display structure that serves as the connection to the X server and that contains all the information about that X server. {@code XOpenDisplay} - * connects your application to the X server through TCP or DECnet communications protocols, or through some local inter-process communication protocol. - * If the hostname is a host machine name and a single colon (:) separates the hostname and display number, {@code XOpenDisplay} connects using TCP streams. - * If the hostname is not specified, Xlib uses whatever it believes is the fastest transport. If the hostname is a host machine name and a double colon - * (::) separates the hostname and display number, {@code XOpenDisplay} connects using DECnet. A single X server can support any or all of these transport - * mechanisms simultaneously. A particular Xlib implementation can support many more of these transport mechanisms. - * - * @param display_name the hardware display name, which determines the display and communications domain to be used. On a POSIX-conformant system, if the - * {@code display_name} is {@code NULL}, it defaults to the value of the DISPLAY environment variable. - */ - @NativeType("Display *") - public static long XOpenDisplay(@Nullable @NativeType("char const *") ByteBuffer display_name) { - if (CHECKS) { - checkNT1Safe(display_name); - } - return nXOpenDisplay(memAddressSafe(display_name)); - } - - /** - * Returns a Display structure that serves as the connection to the X server and that contains all the information about that X server. {@code XOpenDisplay} - * connects your application to the X server through TCP or DECnet communications protocols, or through some local inter-process communication protocol. - * If the hostname is a host machine name and a single colon (:) separates the hostname and display number, {@code XOpenDisplay} connects using TCP streams. - * If the hostname is not specified, Xlib uses whatever it believes is the fastest transport. If the hostname is a host machine name and a double colon - * (::) separates the hostname and display number, {@code XOpenDisplay} connects using DECnet. A single X server can support any or all of these transport - * mechanisms simultaneously. A particular Xlib implementation can support many more of these transport mechanisms. - * - * @param display_name the hardware display name, which determines the display and communications domain to be used. On a POSIX-conformant system, if the - * {@code display_name} is {@code NULL}, it defaults to the value of the DISPLAY environment variable. - */ - @NativeType("Display *") - public static long XOpenDisplay(@Nullable @NativeType("char const *") CharSequence display_name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCIISafe(display_name, true); - long display_nameEncoded = display_name == null ? NULL : stack.getPointerAddress(); - return nXOpenDisplay(display_nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ XCloseDisplay ] --- - - /** - * Closes the connection to the X server for the display specified in the {@code Display} structure and destroys all windows, resource IDs (Window, Font, - * Pixmap, Colormap, Cursor, and GContext), or other resources that the client has created on this display, unless the close-down mode of the resource has - * been changed (see {@code XSetCloseDownMode()}). Therefore, these windows, resource IDs, and other resources should never be referenced again or an error will - * be generated. Before exiting, you should call {@code XCloseDisplay()} explicitly so that any pending errors are reported as {@code XCloseDisplay()} - * performs a final {@code XSync()} operation. - * - * @param display the connection to the X server - */ - public static void XCloseDisplay(@NativeType("Display *") long display) { - long __functionAddress = Functions.XCloseDisplay; - if (CHECKS) { - check(display); - } - invokePV(display, __functionAddress); - } - - // --- [ XDefaultScreen ] --- - - /** - * Returns a pointer to the default screen. - * - * @param display the connection to the X server - */ - public static int XDefaultScreen(@NativeType("Display *") long display) { - long __functionAddress = Functions.XDefaultScreen; - if (CHECKS) { - check(display); - } - return invokePI(display, __functionAddress); - } - - // --- [ XRootWindow ] --- - - /** - * Returns the root window of the specified screen. - * - * @param display the connection to the X server - * @param screen_number the appropriate screen number on the host server - */ - @NativeType("Window") - public static long XRootWindow(@NativeType("Display *") long display, int screen_number) { - long __functionAddress = Functions.XRootWindow; - if (CHECKS) { - check(display); - } - return invokePN(display, screen_number, __functionAddress); - } - - // --- [ XCreateColormap ] --- - - /** Unsafe version of: {@link #XCreateColormap} */ - public static long nXCreateColormap(long display, long w, long visual, int alloc) { - long __functionAddress = Functions.XCreateColormap; - if (CHECKS) { - check(display); - } - return invokePNPN(display, w, visual, alloc, __functionAddress); - } - - /** - * Creates a colormap of the specified visual type for the screen on which the specified window resides and returns the colormap ID associated with it. - * Note that the specified window is only used to determine the screen. - * - * @param display the connection to the X server - * @param w the window - * @param visual a visual type supported on the screen. If the visual type is not one supported by the screen, a {@code BadMatch} error results. - * @param alloc the colormap entries to be allocated. You can pass AllocNone or AllocAll. - */ - @NativeType("Colormap") - public static long XCreateColormap(@NativeType("Display *") long display, @NativeType("Window") long w, @NativeType("Visual *") Visual visual, int alloc) { - return nXCreateColormap(display, w, visual.address(), alloc); - } - - // --- [ XFreeColormap ] --- - - /** - * Deletes the association between the {@code colormap} resource ID and the {@code colormap} and frees the {@code colormap} storage. However, this function - * has no effect on the default colormap for a screen. If the specified {@code colormap} is an installed map for a screen, it is uninstalled. If the - * specified {@code colormap} is defined as the {@code colormap} for a window, {@code XFreeColormap()} changes the colormap associated with the window to - * {@link #None} and generates a {@code ColormapNotify} event. X does not define the colors displayed for a window with a colormap of {@link #None}. - * - * @param display the connection to the X server - * @param colormap the colormap to destroy - */ - public static int XFreeColormap(@NativeType("Display *") long display, @NativeType("Colormap") long colormap) { - long __functionAddress = Functions.XFreeColormap; - if (CHECKS) { - check(display); - } - return invokePNI(display, colormap, __functionAddress); - } - - // --- [ XCreateWindow ] --- - - /** Unsafe version of: {@link #XCreateWindow} */ - public static long nXCreateWindow(long display, long parent, int x, int y, int width, int height, int border_width, int depth, int windowClass, long visual, long valuemask, long attributes) { - long __functionAddress = Functions.XCreateWindow; - if (CHECKS) { - check(display); - } - return invokePNPNPN(display, parent, x, y, width, height, border_width, depth, windowClass, visual, valuemask, attributes, __functionAddress); - } - - /** - * Creates an unmapped subwindow for a specified parent window, returns the window ID of the created window, and causes the X server to generate a - * {@code CreateNotify }event. The created window is placed on top in the stacking order with respect to siblings. - * - *

    The coordinate system has the X axis horizontal and the Y axis vertical with the origin [0, 0] at the upper-left corner. Coordinates are integral, in - * terms of pixels, and coincide with pixel centers. Each window and pixmap has its own coordinate system. For a window, the origin is inside the border at - * the inside, upper-left corner.

    - * - *

    The x and y coordinates are the top-left outside corner of the window's borders and are relative to the inside of the parent window's borders.

    - * - *

    The width and height are the created window's inside dimensions and do not include the created window's borders.

    - * - * @param display the connection to the X server - * @param parent the parent window - * @param x the window x-coordinate - * @param y the window y-coordinate - * @param width the window width - * @param height the window height - * @param border_width the border width - * @param depth the window's depth. A depth of {@link #CopyFromParent} means the depth is taken from the parent. - * @param windowClass the created window's class. One of:
    {@link #InputOutput}{@link #InputOnly}{@link #CopyFromParent}
    - * @param visual the visual type. A visual of {@link #CopyFromParent} means the visual type is taken from the parent. - * @param valuemask which window attributes are defined in the attributes argument. This mask is the bitwise inclusive OR of the valid attribute mask bits. If - * {@code valuemask} is zero, the attributes are ignored and are not referenced. - * @param attributes the structure from which the values (as specified by the value mask) are to be taken - */ - @NativeType("Window") - public static long XCreateWindow(@NativeType("Display *") long display, @NativeType("Window") long parent, int x, int y, @NativeType("unsigned int") int width, @NativeType("unsigned int") int height, @NativeType("unsigned int") int border_width, int depth, @NativeType("unsigned int") int windowClass, @NativeType("Visual *") Visual visual, @NativeType("unsigned long") long valuemask, @NativeType("XSetWindowAttributes *") XSetWindowAttributes attributes) { - return nXCreateWindow(display, parent, x, y, width, height, border_width, depth, windowClass, visual.address(), valuemask, attributes.address()); - } - - // --- [ XDestroyWindow ] --- - - /** - * Destroys the specified window as well as all of its subwindows and causes the X server to generate a {@code DestroyNotify} event for each window. The - * window should never be referenced again. If the window specified by the {@code w} argument is mapped, it is unmapped automatically. The ordering of the - * {@code DestroyNotify} events is such that for any given window being destroyed, {@code DestroyNotify} is generated on any inferiors of the window before - * being generated on the window itself. The ordering among siblings and across subhierarchies is not otherwise constrained. If the window you specified is - * a root window, no windows are destroyed. Destroying a mapped window will generate {@code Expose} events on other windows that were obscured by the - * window being destroyed. - * - * @param display the connection to the X server - * @param w the window - */ - public static int XDestroyWindow(@NativeType("Display *") long display, @NativeType("Window") long w) { - long __functionAddress = Functions.XDestroyWindow; - if (CHECKS) { - check(display); - } - return invokePNI(display, w, __functionAddress); - } - - // --- [ XFree ] --- - - /** Unsafe version of: {@link #XFree} */ - public static int nXFree(long data) { - long __functionAddress = Functions.XFree; - return invokePI(data, __functionAddress); - } - - /** - * Free in-memory data that was created by an Xlib function. - * - * @param data the data that is to be freed - */ - public static int XFree(@NativeType("void *") ByteBuffer data) { - return nXFree(memAddress(data)); - } - - /** - * Free in-memory data that was created by an Xlib function. - * - * @param data the data that is to be freed - */ - public static int XFree(@NativeType("void *") PointerBuffer data) { - return nXFree(memAddress(data)); - } - - // --- [ XSendEvent ] --- - - /** Unsafe version of: {@link #XSendEvent} */ - public static int nXSendEvent(long display, long w, int propagate, long event_mask, long event_send) { - long __functionAddress = Functions.XSendEvent; - if (CHECKS) { - check(display); - } - return invokePNNPI(display, w, propagate, event_mask, event_send, __functionAddress); - } - - /** - * The {@code XSendEvent} function identifies the destination window, determines which clients should receive the specified events, and ignores any active - * grabs. This function requires you to pass an event mask. This function uses the {@code w} argument to identify the destination window as follows: - * - *
      - *
    • If {@code w} is {@code PointerWindow}, the destination window is the window that contains the pointer.
    • - *
    • If {@code w} is {@code InputFocus} and if the focus window contains the pointer, the destination window is the window that contains the pointer; - * otherwise, the destination window is the focus window.
    • - *
    - * - *

    To determine which clients should receive the specified events, {@code XSendEvent} uses the propagate argument as follows:

    - * - *
      - *
    • If {@code event_mask} is the empty set, the event is sent to the client that created the destination window. If that client no longer exists, no - * event is sent.
    • - *
    • If {@code propagate} is {@link #False}, the event is sent to every client selecting on destination any of the event types in the {@code event_mask} - * argument.
    • - *
    • If {@code propagate} is {@link #True} and no clients have selected on destination any of the event types in event-mask, the destination is replaced with - * the closest ancestor of destination for which some client has selected a type in event-mask and for which no intervening window has that type in - * its do-not-propagate-mask. If no such window exists or if the window is an ancestor of the focus window and {@link #InputFocus} was originally specified as - * the destination, the event is not sent to any clients. Otherwise, the event is reported to every client selecting on the final destination any of - * the types specified in {@code event_mask}.
    • - *
    - * - *

    The event in the {@code XEvent} structure must be one of the core events or one of the events defined by an extension (or a {@link #BadValue} error results) so - * that the X server can correctly byte-swap the contents as necessary. The contents of the event are otherwise unaltered and unchecked by the X server - * except to force {@code send_event} to {@link #True} in the forwarded event and to set the serial number in the event correctly; therefore these fields and the - * display field are ignored by {@code XSendEvent}.

    - * - *

    {@code XSendEvent} returns zero if the conversion to wire protocol format failed and returns nonzero otherwise. {@code XSendEvent} can generate - * {@link #BadValue} and {@link #BadWindow} errors.

    - * - *

    The server may retain the recent history of the pointer motion and do so to a finer granularity than is reported by {@link #MotionNotify} events. The - * {@link #XGetMotionEvents} function makes this history available.

    - * - * @param display the connection to the X server - * @param w specifies the window the event is to be sent to - * @param propagate specifies a {@code Boolean} value - * @param event_mask specifies the event mask - * @param event_send specifies the event that is to be sent - */ - @NativeType("Status") - public static int XSendEvent(@NativeType("Display *") long display, @NativeType("Window") long w, @NativeType("Bool") boolean propagate, long event_mask, @NativeType("XEvent *") XEvent event_send) { - return nXSendEvent(display, w, propagate ? 1 : 0, event_mask, event_send.address()); - } - - // --- [ XDisplayMotionBufferSize ] --- - - /** @param display the connection to the X server */ - @NativeType("unsigned long") - public static long XDisplayMotionBufferSize(@NativeType("Display *") long display) { - long __functionAddress = Functions.XDisplayMotionBufferSize; - if (CHECKS) { - check(display); - } - return invokePN(display, __functionAddress); - } - - // --- [ XGetMotionEvents ] --- - - /** Unsafe version of: {@link #XGetMotionEvents} */ - public static long nXGetMotionEvents(long display, long w, long start, long stop, long nevents_return) { - long __functionAddress = Functions.XGetMotionEvents; - if (CHECKS) { - check(display); - } - return invokePNNNPP(display, w, start, stop, nevents_return, __functionAddress); - } - - /** - * The {@code XGetMotionEvents} function returns all events in the motion history buffer that fall between the specified start and stop times, inclusive, - * and that have coordinates that lie within the specified window (including its borders) at its present placement. - * - *

    If the server does not support motion history, if the start time is later than the stop time, or if the start time is in the future, no events are - * returned; {@code XGetMotionEvents} returns {@code NULL}. If the stop time is in the future, it is equivalent to specifying {@link #CurrentTime}. - * {@code XGetMotionEvents} can generate a {@link #BadWindow} error.

    - * - * @param display the connection to the X server - */ - @Nullable - @NativeType("XTimeCoord *") - public static XTimeCoord.Buffer XGetMotionEvents(@NativeType("Display *") long display, @NativeType("Window") long w, @NativeType("Time") long start, @NativeType("Time") long stop) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer nevents_return = stack.callocInt(1); - try { - long __result = nXGetMotionEvents(display, w, start, stop, memAddress(nevents_return)); - return XTimeCoord.createSafe(__result, nevents_return.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ XTranslateCoordinates ] --- - - /** Unsafe version of: {@link #XTranslateCoordinates} */ - public static int nXTranslateCoordinates(long display, long src_w, long dest_w, int src_x, int src_y, long dest_x_return, long dest_y_return, long child_return) { - long __functionAddress = Functions.XTranslateCoordinates; - if (CHECKS) { - check(display); - } - return invokePNNPPPI(display, src_w, dest_w, src_x, src_y, dest_x_return, dest_y_return, child_return, __functionAddress); - } - - /** - * Translates window coordinates. - * - *

    If {@code XTranslateCoordinates} returns {@link #True}, it takes the {@code src_x} and {@code src_y} coordinates relative to the source window's origin and - * returns these coordinates to {@code dest_x_return} and {@code dest_y_return} relative to the destination window's origin. If - * {@code XTranslateCoordinates} returns {@link #False}, {@code src_w} and {@code dest_w} are on different screens, and {@code dest_x_return} and - * {@code dest_y_return} are zero. If the coordinates are contained in a mapped child of {@code dest_w}, that child is returned to {@code child_return}. - * Otherwise, {@code child_return} is set to {@link #None}.

    - * - *

    {@code XTranslateCoordinates} can generate a {@link #BadWindow} error.

    - * - * @param display the connection to the X server - * @param src_w specifies the source window - * @param dest_w specifies the destination window - * @param src_x specifies the x coordinate within the source window - * @param src_y specifies the x coordinate within the source window - * @param dest_x_return returns the x coordinate within the destination window - * @param dest_y_return returns the y coordinate within the destination window - * @param child_return returns the child if the coordinates are contained in a mapped child of the destination window - */ - @NativeType("Bool") - public static boolean XTranslateCoordinates(@NativeType("Display *") long display, @NativeType("Window") long src_w, @NativeType("Window") long dest_w, int src_x, int src_y, @NativeType("int *") IntBuffer dest_x_return, @NativeType("int *") IntBuffer dest_y_return, @NativeType("Window *") CLongBuffer child_return) { - if (CHECKS) { - check(dest_x_return, 1); - check(dest_y_return, 1); - check(child_return, 1); - } - return nXTranslateCoordinates(display, src_w, dest_w, src_x, src_y, memAddress(dest_x_return), memAddress(dest_y_return), memAddress(child_return)) != 0; - } - - /** Array version of: {@link #XTranslateCoordinates} */ - @NativeType("Bool") - public static boolean XTranslateCoordinates(@NativeType("Display *") long display, @NativeType("Window") long src_w, @NativeType("Window") long dest_w, int src_x, int src_y, @NativeType("int *") int[] dest_x_return, @NativeType("int *") int[] dest_y_return, @NativeType("Window *") CLongBuffer child_return) { - long __functionAddress = Functions.XTranslateCoordinates; - if (CHECKS) { - check(display); - check(dest_x_return, 1); - check(dest_y_return, 1); - check(child_return, 1); - } - return invokePNNPPPI(display, src_w, dest_w, src_x, src_y, dest_x_return, dest_y_return, memAddress(child_return), __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XAnyEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XAnyEvent.java deleted file mode 100644 index 1d9462db..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XAnyEvent.java +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Generic X event. - * - *

    Layout

    - * - *
    
    - * struct XAnyEvent {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - * }
    - */ -public class XAnyEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - } - - protected XAnyEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XAnyEvent create(long address, @Nullable ByteBuffer container) { - return new XAnyEvent(address, container); - } - - /** - * Creates a {@code XAnyEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XAnyEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the event type constant name that uniquely identifies it */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - - /** Sets the specified value to the {@link #type} field. */ - public XAnyEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XAnyEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XAnyEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XAnyEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XAnyEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XAnyEvent set( - int type, - long serial, - boolean send_event, - long display, - long window - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XAnyEvent set(XAnyEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XAnyEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XAnyEvent malloc() { - return new XAnyEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XAnyEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XAnyEvent calloc() { - return new XAnyEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XAnyEvent} instance allocated with {@link BufferUtils}. */ - public static XAnyEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XAnyEvent(memAddress(container), container); - } - - /** Returns a new {@code XAnyEvent} instance for the specified memory address. */ - public static XAnyEvent create(long address) { - return new XAnyEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XAnyEvent createSafe(long address) { - return address == NULL ? null : new XAnyEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XAnyEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XAnyEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XAnyEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XAnyEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XAnyEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XAnyEvent malloc(MemoryStack stack) { - return new XAnyEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XAnyEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XAnyEvent calloc(MemoryStack stack) { - return new XAnyEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XAnyEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XAnyEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XAnyEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XAnyEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XAnyEvent.WINDOW); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XAnyEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XAnyEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XAnyEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XAnyEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XAnyEvent.WINDOW, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XAnyEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XAnyEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XAnyEvent ELEMENT_FACTORY = XAnyEvent.create(-1L); - - /** - * Creates a new {@code XAnyEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XAnyEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XAnyEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XAnyEvent#type} field. */ - public int type() { return XAnyEvent.ntype(address()); } - /** @return the value of the {@link XAnyEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XAnyEvent.nserial(address()); } - /** @return the value of the {@link XAnyEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XAnyEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XAnyEvent#display} field. */ - @NativeType("Display *") - public long display() { return XAnyEvent.ndisplay(address()); } - /** @return the value of the {@link XAnyEvent#window} field. */ - @NativeType("Window") - public long window() { return XAnyEvent.nwindow(address()); } - - /** Sets the specified value to the {@link XAnyEvent#type} field. */ - public Buffer type(int value) { XAnyEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XAnyEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XAnyEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XAnyEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XAnyEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XAnyEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XAnyEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XAnyEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XAnyEvent.nwindow(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XButtonEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XButtonEvent.java deleted file mode 100644 index ecf5b74b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XButtonEvent.java +++ /dev/null @@ -1,566 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Button event. - * - *

    Layout

    - * - *
    
    - * struct XButtonEvent {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Window {@link #root};
    - *     Window {@link #subwindow};
    - *     Time {@link #time};
    - *     int {@link #x};
    - *     int {@link #y};
    - *     int {@link #x_root};
    - *     int {@link #y_root};
    - *     unsigned int {@link #state};
    - *     unsigned int {@link #button};
    - *     Bool {@link #same_screen};
    - * }
    - */ -public class XButtonEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - ROOT, - SUBWINDOW, - TIME, - X, - Y, - X_ROOT, - Y_ROOT, - STATE, - BUTTON, - SAME_SCREEN; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - ROOT = layout.offsetof(5); - SUBWINDOW = layout.offsetof(6); - TIME = layout.offsetof(7); - X = layout.offsetof(8); - Y = layout.offsetof(9); - X_ROOT = layout.offsetof(10); - Y_ROOT = layout.offsetof(11); - STATE = layout.offsetof(12); - BUTTON = layout.offsetof(13); - SAME_SCREEN = layout.offsetof(14); - } - - protected XButtonEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XButtonEvent create(long address, @Nullable ByteBuffer container) { - return new XButtonEvent(address, container); - } - - /** - * Creates a {@code XButtonEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XButtonEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the event type. One of:
    {@link X11#ButtonPress}{@link X11#ButtonRelease}
    */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** root window that the event occurred on */ - @NativeType("Window") - public long root() { return nroot(address()); } - /** child window */ - @NativeType("Window") - public long subwindow() { return nsubwindow(address()); } - /** milliseconds */ - @NativeType("Time") - public long time() { return ntime(address()); } - /** pointer x coordinate in event window */ - public int x() { return nx(address()); } - /** pointer y coordinate in event window */ - public int y() { return ny(address()); } - /** x coordinate relative to {@code root} */ - public int x_root() { return nx_root(address()); } - /** y coordinate relative to {@code root} */ - public int y_root() { return ny_root(address()); } - /** button mask */ - @NativeType("unsigned int") - public int state() { return nstate(address()); } - /** detail */ - @NativeType("unsigned int") - public int button() { return nbutton(address()); } - /** same screen flag */ - @NativeType("Bool") - public boolean same_screen() { return nsame_screen(address()) != 0; } - - /** Sets the specified value to the {@link #type} field. */ - public XButtonEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XButtonEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XButtonEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XButtonEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XButtonEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #root} field. */ - public XButtonEvent root(@NativeType("Window") long value) { nroot(address(), value); return this; } - /** Sets the specified value to the {@link #subwindow} field. */ - public XButtonEvent subwindow(@NativeType("Window") long value) { nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link #time} field. */ - public XButtonEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@link #x} field. */ - public XButtonEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public XButtonEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@link #x_root} field. */ - public XButtonEvent x_root(int value) { nx_root(address(), value); return this; } - /** Sets the specified value to the {@link #y_root} field. */ - public XButtonEvent y_root(int value) { ny_root(address(), value); return this; } - /** Sets the specified value to the {@link #state} field. */ - public XButtonEvent state(@NativeType("unsigned int") int value) { nstate(address(), value); return this; } - /** Sets the specified value to the {@link #button} field. */ - public XButtonEvent button(@NativeType("unsigned int") int value) { nbutton(address(), value); return this; } - /** Sets the specified value to the {@link #same_screen} field. */ - public XButtonEvent same_screen(@NativeType("Bool") boolean value) { nsame_screen(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XButtonEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long root, - long subwindow, - long time, - int x, - int y, - int x_root, - int y_root, - int state, - int button, - boolean same_screen - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - root(root); - subwindow(subwindow); - time(time); - x(x); - y(y); - x_root(x_root); - y_root(y_root); - state(state); - button(button); - same_screen(same_screen); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XButtonEvent set(XButtonEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XButtonEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XButtonEvent malloc() { - return new XButtonEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XButtonEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XButtonEvent calloc() { - return new XButtonEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XButtonEvent} instance allocated with {@link BufferUtils}. */ - public static XButtonEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XButtonEvent(memAddress(container), container); - } - - /** Returns a new {@code XButtonEvent} instance for the specified memory address. */ - public static XButtonEvent create(long address) { - return new XButtonEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XButtonEvent createSafe(long address) { - return address == NULL ? null : new XButtonEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XButtonEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XButtonEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XButtonEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XButtonEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XButtonEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XButtonEvent malloc(MemoryStack stack) { - return new XButtonEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XButtonEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XButtonEvent calloc(MemoryStack stack) { - return new XButtonEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XButtonEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XButtonEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XButtonEvent.WINDOW); } - /** Unsafe version of {@link #root}. */ - public static long nroot(long struct) { return memGetCLong(struct + XButtonEvent.ROOT); } - /** Unsafe version of {@link #subwindow}. */ - public static long nsubwindow(long struct) { return memGetCLong(struct + XButtonEvent.SUBWINDOW); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XButtonEvent.TIME); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.Y); } - /** Unsafe version of {@link #x_root}. */ - public static int nx_root(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.X_ROOT); } - /** Unsafe version of {@link #y_root}. */ - public static int ny_root(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.Y_ROOT); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.STATE); } - /** Unsafe version of {@link #button}. */ - public static int nbutton(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.BUTTON); } - /** Unsafe version of {@link #same_screen}. */ - public static int nsame_screen(long struct) { return UNSAFE.getInt(null, struct + XButtonEvent.SAME_SCREEN); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XButtonEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XButtonEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XButtonEvent.WINDOW, value); } - /** Unsafe version of {@link #root(long) root}. */ - public static void nroot(long struct, long value) { memPutCLong(struct + XButtonEvent.ROOT, value); } - /** Unsafe version of {@link #subwindow(long) subwindow}. */ - public static void nsubwindow(long struct, long value) { memPutCLong(struct + XButtonEvent.SUBWINDOW, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XButtonEvent.TIME, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.Y, value); } - /** Unsafe version of {@link #x_root(int) x_root}. */ - public static void nx_root(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.X_ROOT, value); } - /** Unsafe version of {@link #y_root(int) y_root}. */ - public static void ny_root(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.Y_ROOT, value); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.STATE, value); } - /** Unsafe version of {@link #button(int) button}. */ - public static void nbutton(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.BUTTON, value); } - /** Unsafe version of {@link #same_screen(boolean) same_screen}. */ - public static void nsame_screen(long struct, int value) { UNSAFE.putInt(null, struct + XButtonEvent.SAME_SCREEN, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XButtonEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XButtonEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XButtonEvent ELEMENT_FACTORY = XButtonEvent.create(-1L); - - /** - * Creates a new {@code XButtonEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XButtonEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XButtonEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XButtonEvent#type} field. */ - public int type() { return XButtonEvent.ntype(address()); } - /** @return the value of the {@link XButtonEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XButtonEvent.nserial(address()); } - /** @return the value of the {@link XButtonEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XButtonEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XButtonEvent#display} field. */ - @NativeType("Display *") - public long display() { return XButtonEvent.ndisplay(address()); } - /** @return the value of the {@link XButtonEvent#window} field. */ - @NativeType("Window") - public long window() { return XButtonEvent.nwindow(address()); } - /** @return the value of the {@link XButtonEvent#root} field. */ - @NativeType("Window") - public long root() { return XButtonEvent.nroot(address()); } - /** @return the value of the {@link XButtonEvent#subwindow} field. */ - @NativeType("Window") - public long subwindow() { return XButtonEvent.nsubwindow(address()); } - /** @return the value of the {@link XButtonEvent#time} field. */ - @NativeType("Time") - public long time() { return XButtonEvent.ntime(address()); } - /** @return the value of the {@link XButtonEvent#x} field. */ - public int x() { return XButtonEvent.nx(address()); } - /** @return the value of the {@link XButtonEvent#y} field. */ - public int y() { return XButtonEvent.ny(address()); } - /** @return the value of the {@link XButtonEvent#x_root} field. */ - public int x_root() { return XButtonEvent.nx_root(address()); } - /** @return the value of the {@link XButtonEvent#y_root} field. */ - public int y_root() { return XButtonEvent.ny_root(address()); } - /** @return the value of the {@link XButtonEvent#state} field. */ - @NativeType("unsigned int") - public int state() { return XButtonEvent.nstate(address()); } - /** @return the value of the {@link XButtonEvent#button} field. */ - @NativeType("unsigned int") - public int button() { return XButtonEvent.nbutton(address()); } - /** @return the value of the {@link XButtonEvent#same_screen} field. */ - @NativeType("Bool") - public boolean same_screen() { return XButtonEvent.nsame_screen(address()) != 0; } - - /** Sets the specified value to the {@link XButtonEvent#type} field. */ - public Buffer type(int value) { XButtonEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XButtonEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XButtonEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XButtonEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XButtonEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XButtonEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#root} field. */ - public Buffer root(@NativeType("Window") long value) { XButtonEvent.nroot(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#subwindow} field. */ - public Buffer subwindow(@NativeType("Window") long value) { XButtonEvent.nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#time} field. */ - public Buffer time(@NativeType("Time") long value) { XButtonEvent.ntime(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#x} field. */ - public Buffer x(int value) { XButtonEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#y} field. */ - public Buffer y(int value) { XButtonEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#x_root} field. */ - public Buffer x_root(int value) { XButtonEvent.nx_root(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#y_root} field. */ - public Buffer y_root(int value) { XButtonEvent.ny_root(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#state} field. */ - public Buffer state(@NativeType("unsigned int") int value) { XButtonEvent.nstate(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#button} field. */ - public Buffer button(@NativeType("unsigned int") int value) { XButtonEvent.nbutton(address(), value); return this; } - /** Sets the specified value to the {@link XButtonEvent#same_screen} field. */ - public Buffer same_screen(@NativeType("Bool") boolean value) { XButtonEvent.nsame_screen(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XCirculateEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XCirculateEvent.java deleted file mode 100644 index defd4e35..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XCirculateEvent.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XCirculateEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window event;
    - *     Window window;
    - *     int {@link #place};
    - * }
    - */ -public class XCirculateEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EVENT, - WINDOW, - PLACE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EVENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - PLACE = layout.offsetof(6); - } - - protected XCirculateEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XCirculateEvent create(long address, @Nullable ByteBuffer container) { - return new XCirculateEvent(address, container); - } - - /** - * Creates a {@code XCirculateEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XCirculateEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** one of:
    {@link X11#PlaceOnTop}{@link X11#PlaceOnBottom}
    */ - public int place() { return nplace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XCirculateEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XCirculateEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XCirculateEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XCirculateEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public XCirculateEvent event(@NativeType("Window") long value) { nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XCirculateEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #place} field. */ - public XCirculateEvent place(int value) { nplace(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XCirculateEvent set( - int type, - long serial, - boolean send_event, - long display, - long event, - long window, - int place - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - event(event); - window(window); - place(place); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XCirculateEvent set(XCirculateEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XCirculateEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XCirculateEvent malloc() { - return new XCirculateEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XCirculateEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XCirculateEvent calloc() { - return new XCirculateEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XCirculateEvent} instance allocated with {@link BufferUtils}. */ - public static XCirculateEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XCirculateEvent(memAddress(container), container); - } - - /** Returns a new {@code XCirculateEvent} instance for the specified memory address. */ - public static XCirculateEvent create(long address) { - return new XCirculateEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XCirculateEvent createSafe(long address) { - return address == NULL ? null : new XCirculateEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XCirculateEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XCirculateEvent malloc(MemoryStack stack) { - return new XCirculateEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XCirculateEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XCirculateEvent calloc(MemoryStack stack) { - return new XCirculateEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XCirculateEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XCirculateEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XCirculateEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XCirculateEvent.DISPLAY); } - /** Unsafe version of {@link #event}. */ - public static long nevent(long struct) { return memGetCLong(struct + XCirculateEvent.EVENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XCirculateEvent.WINDOW); } - /** Unsafe version of {@link #place}. */ - public static int nplace(long struct) { return UNSAFE.getInt(null, struct + XCirculateEvent.PLACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XCirculateEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XCirculateEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XCirculateEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XCirculateEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #event(long) event}. */ - public static void nevent(long struct, long value) { memPutCLong(struct + XCirculateEvent.EVENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XCirculateEvent.WINDOW, value); } - /** Unsafe version of {@link #place(int) place}. */ - public static void nplace(long struct, int value) { UNSAFE.putInt(null, struct + XCirculateEvent.PLACE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XCirculateEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XCirculateEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XCirculateEvent ELEMENT_FACTORY = XCirculateEvent.create(-1L); - - /** - * Creates a new {@code XCirculateEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XCirculateEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XCirculateEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XCirculateEvent.ntype(address()); } - /** @return the value of the {@link XCirculateEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XCirculateEvent.nserial(address()); } - /** @return the value of the {@link XCirculateEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XCirculateEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XCirculateEvent#display} field. */ - @NativeType("Display *") - public long display() { return XCirculateEvent.ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return XCirculateEvent.nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XCirculateEvent.nwindow(address()); } - /** @return the value of the {@link XCirculateEvent#place} field. */ - public int place() { return XCirculateEvent.nplace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XCirculateEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XCirculateEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XCirculateEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XCirculateEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XCirculateEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XCirculateEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XCirculateEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public Buffer event(@NativeType("Window") long value) { XCirculateEvent.nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XCirculateEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XCirculateEvent#place} field. */ - public Buffer place(int value) { XCirculateEvent.nplace(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XCirculateRequestEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XCirculateRequestEvent.java deleted file mode 100644 index 69da3634..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XCirculateRequestEvent.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XCirculateRequestEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window parent;
    - *     Window window;
    - *     int {@link #place};
    - * }
    - */ -public class XCirculateRequestEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - PARENT, - WINDOW, - PLACE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - PARENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - PLACE = layout.offsetof(6); - } - - protected XCirculateRequestEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XCirculateRequestEvent create(long address, @Nullable ByteBuffer container) { - return new XCirculateRequestEvent(address, container); - } - - /** - * Creates a {@code XCirculateRequestEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XCirculateRequestEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return nparent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** one of:
    {@link X11#PlaceOnTop}{@link X11#PlaceOnBottom}
    */ - public int place() { return nplace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XCirculateRequestEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XCirculateRequestEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XCirculateRequestEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XCirculateRequestEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public XCirculateRequestEvent parent(@NativeType("Window") long value) { nparent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XCirculateRequestEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #place} field. */ - public XCirculateRequestEvent place(int value) { nplace(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XCirculateRequestEvent set( - int type, - long serial, - boolean send_event, - long display, - long parent, - long window, - int place - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - parent(parent); - window(window); - place(place); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XCirculateRequestEvent set(XCirculateRequestEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XCirculateRequestEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XCirculateRequestEvent malloc() { - return new XCirculateRequestEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XCirculateRequestEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XCirculateRequestEvent calloc() { - return new XCirculateRequestEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XCirculateRequestEvent} instance allocated with {@link BufferUtils}. */ - public static XCirculateRequestEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XCirculateRequestEvent(memAddress(container), container); - } - - /** Returns a new {@code XCirculateRequestEvent} instance for the specified memory address. */ - public static XCirculateRequestEvent create(long address) { - return new XCirculateRequestEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XCirculateRequestEvent createSafe(long address) { - return address == NULL ? null : new XCirculateRequestEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateRequestEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateRequestEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateRequestEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCirculateRequestEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XCirculateRequestEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XCirculateRequestEvent malloc(MemoryStack stack) { - return new XCirculateRequestEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XCirculateRequestEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XCirculateRequestEvent calloc(MemoryStack stack) { - return new XCirculateRequestEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XCirculateRequestEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XCirculateRequestEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XCirculateRequestEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XCirculateRequestEvent.DISPLAY); } - /** Unsafe version of {@link #parent}. */ - public static long nparent(long struct) { return memGetCLong(struct + XCirculateRequestEvent.PARENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XCirculateRequestEvent.WINDOW); } - /** Unsafe version of {@link #place}. */ - public static int nplace(long struct) { return UNSAFE.getInt(null, struct + XCirculateRequestEvent.PLACE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XCirculateRequestEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XCirculateRequestEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XCirculateRequestEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XCirculateRequestEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #parent(long) parent}. */ - public static void nparent(long struct, long value) { memPutCLong(struct + XCirculateRequestEvent.PARENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XCirculateRequestEvent.WINDOW, value); } - /** Unsafe version of {@link #place(int) place}. */ - public static void nplace(long struct, int value) { UNSAFE.putInt(null, struct + XCirculateRequestEvent.PLACE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XCirculateRequestEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XCirculateRequestEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XCirculateRequestEvent ELEMENT_FACTORY = XCirculateRequestEvent.create(-1L); - - /** - * Creates a new {@code XCirculateRequestEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XCirculateRequestEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XCirculateRequestEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XCirculateRequestEvent.ntype(address()); } - /** @return the value of the {@link XCirculateRequestEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XCirculateRequestEvent.nserial(address()); } - /** @return the value of the {@link XCirculateRequestEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XCirculateRequestEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XCirculateRequestEvent#display} field. */ - @NativeType("Display *") - public long display() { return XCirculateRequestEvent.ndisplay(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return XCirculateRequestEvent.nparent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XCirculateRequestEvent.nwindow(address()); } - /** @return the value of the {@link XCirculateRequestEvent#place} field. */ - public int place() { return XCirculateRequestEvent.nplace(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XCirculateRequestEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XCirculateRequestEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XCirculateRequestEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XCirculateRequestEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XCirculateRequestEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XCirculateRequestEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XCirculateRequestEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public Buffer parent(@NativeType("Window") long value) { XCirculateRequestEvent.nparent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XCirculateRequestEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XCirculateRequestEvent#place} field. */ - public Buffer place(int value) { XCirculateRequestEvent.nplace(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XClientMessageEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XClientMessageEvent.java deleted file mode 100644 index df5283f8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XClientMessageEvent.java +++ /dev/null @@ -1,543 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Client message event. - * - *

    The {@code message_type} member is set to an atom that indicates how the data should be interpreted by the receiving client. The {@code format} - * member is set to 8, 16, or 32 and specifies whether the data should be viewed as a list of bytes, shorts, or longs. The {@code data} member is a - * union that contains the members {@code b}, {@code s}, and {@code l}. The {@code b}, {@code s}, and {@code l} members represent data of twenty 8-bit - * values, ten 16-bit values, and five 32-bit values. Particular message types might not make use of all these values. The X server places no - * interpretation on the values in the {@code window}, {@code message_type}, or {@code data} members.

    - * - *

    Layout

    - * - *
    
    - * struct XClientMessageEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Atom message_type;
    - *     int format;
    - *     struct {
    - *         char b[20];
    - *         short s[10];
    - *         long l[5];
    - *     } data;
    - * }
    - */ -public class XClientMessageEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - MESSAGE_TYPE, - FORMAT, - DATA, - DATA_B, - DATA_S, - DATA_L; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __struct( - __array(1, 20), - __array(2, 10), - __array(CLONG_SIZE, 5) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - MESSAGE_TYPE = layout.offsetof(5); - FORMAT = layout.offsetof(6); - DATA = layout.offsetof(7); - DATA_B = layout.offsetof(8); - DATA_S = layout.offsetof(9); - DATA_L = layout.offsetof(10); - } - - protected XClientMessageEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XClientMessageEvent create(long address, @Nullable ByteBuffer container) { - return new XClientMessageEvent(address, container); - } - - /** - * Creates a {@code XClientMessageEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XClientMessageEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code message_type} field. */ - @NativeType("Atom") - public long message_type() { return nmessage_type(address()); } - /** @return the value of the {@code format} field. */ - public int format() { return nformat(address()); } - /** @return a {@link ByteBuffer} view of the {@code data.b} field. */ - @NativeType("char[20]") - public ByteBuffer data_b() { return ndata_b(address()); } - /** @return the value at the specified index of the {@code data.b} field. */ - @NativeType("char") - public byte data_b(int index) { return ndata_b(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code data.s} field. */ - @NativeType("short[10]") - public ShortBuffer data_s() { return ndata_s(address()); } - /** @return the value at the specified index of the {@code data.s} field. */ - public short data_s(int index) { return ndata_s(address(), index); } - /** @return a {@link CLongBuffer} view of the {@code data.l} field. */ - @NativeType("long[5]") - public CLongBuffer data_l() { return ndata_l(address()); } - /** @return the value at the specified index of the {@code data.l} field. */ - public long data_l(int index) { return ndata_l(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public XClientMessageEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XClientMessageEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XClientMessageEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XClientMessageEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XClientMessageEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code message_type} field. */ - public XClientMessageEvent message_type(@NativeType("Atom") long value) { nmessage_type(address(), value); return this; } - /** Sets the specified value to the {@code format} field. */ - public XClientMessageEvent format(int value) { nformat(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code b} field. */ - public XClientMessageEvent data_b(@NativeType("char[20]") ByteBuffer value) { ndata_b(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code b} field. */ - public XClientMessageEvent data_b(int index, @NativeType("char") byte value) { ndata_b(address(), index, value); return this; } - /** Copies the specified {@link ShortBuffer} to the {@code s} field. */ - public XClientMessageEvent data_s(@NativeType("short[10]") ShortBuffer value) { ndata_s(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code s} field. */ - public XClientMessageEvent data_s(int index, short value) { ndata_s(address(), index, value); return this; } - /** Copies the specified {@link CLongBuffer} to the {@code l} field. */ - public XClientMessageEvent data_l(@NativeType("long[5]") CLongBuffer value) { ndata_l(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code l} field. */ - public XClientMessageEvent data_l(int index, long value) { ndata_l(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public XClientMessageEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long message_type, - int format, - ByteBuffer data_b, - ShortBuffer data_s, - CLongBuffer data_l - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - message_type(message_type); - format(format); - data_b(data_b); - data_s(data_s); - data_l(data_l); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XClientMessageEvent set(XClientMessageEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XClientMessageEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XClientMessageEvent malloc() { - return new XClientMessageEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XClientMessageEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XClientMessageEvent calloc() { - return new XClientMessageEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XClientMessageEvent} instance allocated with {@link BufferUtils}. */ - public static XClientMessageEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XClientMessageEvent(memAddress(container), container); - } - - /** Returns a new {@code XClientMessageEvent} instance for the specified memory address. */ - public static XClientMessageEvent create(long address) { - return new XClientMessageEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XClientMessageEvent createSafe(long address) { - return address == NULL ? null : new XClientMessageEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XClientMessageEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XClientMessageEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XClientMessageEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XClientMessageEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XClientMessageEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XClientMessageEvent malloc(MemoryStack stack) { - return new XClientMessageEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XClientMessageEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XClientMessageEvent calloc(MemoryStack stack) { - return new XClientMessageEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XClientMessageEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XClientMessageEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XClientMessageEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XClientMessageEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XClientMessageEvent.WINDOW); } - /** Unsafe version of {@link #message_type}. */ - public static long nmessage_type(long struct) { return memGetCLong(struct + XClientMessageEvent.MESSAGE_TYPE); } - /** Unsafe version of {@link #format}. */ - public static int nformat(long struct) { return UNSAFE.getInt(null, struct + XClientMessageEvent.FORMAT); } - /** Unsafe version of {@link #data_b}. */ - public static ByteBuffer ndata_b(long struct) { return memByteBuffer(struct + XClientMessageEvent.DATA_B, 20); } - /** Unsafe version of {@link #data_b(int) data_b}. */ - public static byte ndata_b(long struct, int index) { - return UNSAFE.getByte(null, struct + XClientMessageEvent.DATA_B + check(index, 20) * 1); - } - /** Unsafe version of {@link #data_s}. */ - public static ShortBuffer ndata_s(long struct) { return memShortBuffer(struct + XClientMessageEvent.DATA_S, 10); } - /** Unsafe version of {@link #data_s(int) data_s}. */ - public static short ndata_s(long struct, int index) { - return UNSAFE.getShort(null, struct + XClientMessageEvent.DATA_S + check(index, 10) * 2); - } - /** Unsafe version of {@link #data_l}. */ - public static CLongBuffer ndata_l(long struct) { return memCLongBuffer(struct + XClientMessageEvent.DATA_L, 5); } - /** Unsafe version of {@link #data_l(int) data_l}. */ - public static long ndata_l(long struct, int index) { - return memGetCLong(struct + XClientMessageEvent.DATA_L + check(index, 5) * CLONG_SIZE); - } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XClientMessageEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XClientMessageEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XClientMessageEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XClientMessageEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XClientMessageEvent.WINDOW, value); } - /** Unsafe version of {@link #message_type(long) message_type}. */ - public static void nmessage_type(long struct, long value) { memPutCLong(struct + XClientMessageEvent.MESSAGE_TYPE, value); } - /** Unsafe version of {@link #format(int) format}. */ - public static void nformat(long struct, int value) { UNSAFE.putInt(null, struct + XClientMessageEvent.FORMAT, value); } - /** Unsafe version of {@link #data_b(ByteBuffer) data_b}. */ - public static void ndata_b(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 20); } - memCopy(memAddress(value), struct + XClientMessageEvent.DATA_B, value.remaining() * 1); - } - /** Unsafe version of {@link #data_b(int, byte) data_b}. */ - public static void ndata_b(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + XClientMessageEvent.DATA_B + check(index, 20) * 1, value); - } - /** Unsafe version of {@link #data_s(ShortBuffer) data_s}. */ - public static void ndata_s(long struct, ShortBuffer value) { - if (CHECKS) { checkGT(value, 10); } - memCopy(memAddress(value), struct + XClientMessageEvent.DATA_S, value.remaining() * 2); - } - /** Unsafe version of {@link #data_s(int, short) data_s}. */ - public static void ndata_s(long struct, int index, short value) { - UNSAFE.putShort(null, struct + XClientMessageEvent.DATA_S + check(index, 10) * 2, value); - } - /** Unsafe version of {@link #data_l(CLongBuffer) data_l}. */ - public static void ndata_l(long struct, CLongBuffer value) { - if (CHECKS) { checkGT(value, 5); } - memCopy(memAddress(value), struct + XClientMessageEvent.DATA_L, value.remaining() * CLONG_SIZE); - } - /** Unsafe version of {@link #data_l(int, long) data_l}. */ - public static void ndata_l(long struct, int index, long value) { - memPutCLong(struct + XClientMessageEvent.DATA_L + check(index, 5) * CLONG_SIZE, value); - } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XClientMessageEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XClientMessageEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XClientMessageEvent ELEMENT_FACTORY = XClientMessageEvent.create(-1L); - - /** - * Creates a new {@code XClientMessageEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XClientMessageEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XClientMessageEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XClientMessageEvent.ntype(address()); } - /** @return the value of the {@link XClientMessageEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XClientMessageEvent.nserial(address()); } - /** @return the value of the {@link XClientMessageEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XClientMessageEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XClientMessageEvent#display} field. */ - @NativeType("Display *") - public long display() { return XClientMessageEvent.ndisplay(address()); } - /** @return the value of the {@link XClientMessageEvent#window} field. */ - @NativeType("Window") - public long window() { return XClientMessageEvent.nwindow(address()); } - /** @return the value of the {@code message_type} field. */ - @NativeType("Atom") - public long message_type() { return XClientMessageEvent.nmessage_type(address()); } - /** @return the value of the {@code format} field. */ - public int format() { return XClientMessageEvent.nformat(address()); } - /** @return a {@link ByteBuffer} view of the {@code data.b} field. */ - @NativeType("char[20]") - public ByteBuffer data_b() { return XClientMessageEvent.ndata_b(address()); } - /** @return the value at the specified index of the {@code data.b} field. */ - @NativeType("char") - public byte data_b(int index) { return XClientMessageEvent.ndata_b(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code data.s} field. */ - @NativeType("short[10]") - public ShortBuffer data_s() { return XClientMessageEvent.ndata_s(address()); } - /** @return the value at the specified index of the {@code data.s} field. */ - public short data_s(int index) { return XClientMessageEvent.ndata_s(address(), index); } - /** @return a {@link CLongBuffer} view of the {@code data.l} field. */ - @NativeType("long[5]") - public CLongBuffer data_l() { return XClientMessageEvent.ndata_l(address()); } - /** @return the value at the specified index of the {@code data.l} field. */ - public long data_l(int index) { return XClientMessageEvent.ndata_l(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XClientMessageEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XClientMessageEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XClientMessageEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XClientMessageEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XClientMessageEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XClientMessageEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XClientMessageEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XClientMessageEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XClientMessageEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code message_type} field. */ - public Buffer message_type(@NativeType("Atom") long value) { XClientMessageEvent.nmessage_type(address(), value); return this; } - /** Sets the specified value to the {@code format} field. */ - public Buffer format(int value) { XClientMessageEvent.nformat(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code b} field. */ - public Buffer data_b(@NativeType("char[20]") ByteBuffer value) { XClientMessageEvent.ndata_b(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code b} field. */ - public Buffer data_b(int index, @NativeType("char") byte value) { XClientMessageEvent.ndata_b(address(), index, value); return this; } - /** Copies the specified {@link ShortBuffer} to the {@code s} field. */ - public Buffer data_s(@NativeType("short[10]") ShortBuffer value) { XClientMessageEvent.ndata_s(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code s} field. */ - public Buffer data_s(int index, short value) { XClientMessageEvent.ndata_s(address(), index, value); return this; } - /** Copies the specified {@link CLongBuffer} to the {@code l} field. */ - public Buffer data_l(@NativeType("long[5]") CLongBuffer value) { XClientMessageEvent.ndata_l(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code l} field. */ - public Buffer data_l(int index, long value) { XClientMessageEvent.ndata_l(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XColormapEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XColormapEvent.java deleted file mode 100644 index 83575b93..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XColormapEvent.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XColormapEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Colormap {@link #colormap};
    - *     int new;
    - *     int {@link #state};
    - * }
    - */ -public class XColormapEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - COLORMAP, - NEW, - STATE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - COLORMAP = layout.offsetof(5); - NEW = layout.offsetof(6); - STATE = layout.offsetof(7); - } - - protected XColormapEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XColormapEvent create(long address, @Nullable ByteBuffer container) { - return new XColormapEvent(address, container); - } - - /** - * Creates a {@code XColormapEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XColormapEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** colormap or {@link X11#None} */ - @NativeType("Colormap") - public long colormap() { return ncolormap(address()); } - /** @return the value of the {@code new} field. */ - public int new$() { return nnew$(address()); } - /** one of:
    {@link X11#ColormapInstalled}{@link X11#ColormapUninstalled}
    */ - public int state() { return nstate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XColormapEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XColormapEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XColormapEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XColormapEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XColormapEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #colormap} field. */ - public XColormapEvent colormap(@NativeType("Colormap") long value) { ncolormap(address(), value); return this; } - /** Sets the specified value to the {@code new} field. */ - public XColormapEvent new$(int value) { nnew$(address(), value); return this; } - /** Sets the specified value to the {@link #state} field. */ - public XColormapEvent state(int value) { nstate(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XColormapEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long colormap, - int new$, - int state - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - colormap(colormap); - new$(new$); - state(state); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XColormapEvent set(XColormapEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XColormapEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XColormapEvent malloc() { - return new XColormapEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XColormapEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XColormapEvent calloc() { - return new XColormapEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XColormapEvent} instance allocated with {@link BufferUtils}. */ - public static XColormapEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XColormapEvent(memAddress(container), container); - } - - /** Returns a new {@code XColormapEvent} instance for the specified memory address. */ - public static XColormapEvent create(long address) { - return new XColormapEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XColormapEvent createSafe(long address) { - return address == NULL ? null : new XColormapEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XColormapEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XColormapEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XColormapEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XColormapEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XColormapEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XColormapEvent malloc(MemoryStack stack) { - return new XColormapEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XColormapEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XColormapEvent calloc(MemoryStack stack) { - return new XColormapEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XColormapEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XColormapEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XColormapEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XColormapEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XColormapEvent.WINDOW); } - /** Unsafe version of {@link #colormap}. */ - public static long ncolormap(long struct) { return memGetCLong(struct + XColormapEvent.COLORMAP); } - /** Unsafe version of {@link #new$}. */ - public static int nnew$(long struct) { return UNSAFE.getInt(null, struct + XColormapEvent.NEW); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XColormapEvent.STATE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XColormapEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XColormapEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XColormapEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XColormapEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XColormapEvent.WINDOW, value); } - /** Unsafe version of {@link #colormap(long) colormap}. */ - public static void ncolormap(long struct, long value) { memPutCLong(struct + XColormapEvent.COLORMAP, value); } - /** Unsafe version of {@link #new$(int) new$}. */ - public static void nnew$(long struct, int value) { UNSAFE.putInt(null, struct + XColormapEvent.NEW, value); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XColormapEvent.STATE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XColormapEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XColormapEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XColormapEvent ELEMENT_FACTORY = XColormapEvent.create(-1L); - - /** - * Creates a new {@code XColormapEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XColormapEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XColormapEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XColormapEvent.ntype(address()); } - /** @return the value of the {@link XColormapEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XColormapEvent.nserial(address()); } - /** @return the value of the {@link XColormapEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XColormapEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XColormapEvent#display} field. */ - @NativeType("Display *") - public long display() { return XColormapEvent.ndisplay(address()); } - /** @return the value of the {@link XColormapEvent#window} field. */ - @NativeType("Window") - public long window() { return XColormapEvent.nwindow(address()); } - /** @return the value of the {@link XColormapEvent#colormap} field. */ - @NativeType("Colormap") - public long colormap() { return XColormapEvent.ncolormap(address()); } - /** @return the value of the {@code new} field. */ - public int new$() { return XColormapEvent.nnew$(address()); } - /** @return the value of the {@link XColormapEvent#state} field. */ - public int state() { return XColormapEvent.nstate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XColormapEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XColormapEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XColormapEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XColormapEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XColormapEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XColormapEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XColormapEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XColormapEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XColormapEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XColormapEvent#colormap} field. */ - public Buffer colormap(@NativeType("Colormap") long value) { XColormapEvent.ncolormap(address(), value); return this; } - /** Sets the specified value to the {@code new} field. */ - public Buffer new$(int value) { XColormapEvent.nnew$(address(), value); return this; } - /** Sets the specified value to the {@link XColormapEvent#state} field. */ - public Buffer state(int value) { XColormapEvent.nstate(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XConfigureEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XConfigureEvent.java deleted file mode 100644 index e8f158b7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XConfigureEvent.java +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Motion event. - * - *

    Layout

    - * - *
    
    - * struct XConfigureEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     int x;
    - *     int y;
    - *     int width;
    - *     int height;
    - *     int border_width;
    - *     Window above;
    - *     Bool override_redirect;
    - * }
    - */ -public class XConfigureEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - X, - Y, - WIDTH, - HEIGHT, - BORDER_WIDTH, - ABOVE, - OVERRIDE_REDIRECT; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - X = layout.offsetof(5); - Y = layout.offsetof(6); - WIDTH = layout.offsetof(7); - HEIGHT = layout.offsetof(8); - BORDER_WIDTH = layout.offsetof(9); - ABOVE = layout.offsetof(10); - OVERRIDE_REDIRECT = layout.offsetof(11); - } - - protected XConfigureEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XConfigureEvent create(long address, @Nullable ByteBuffer container) { - return new XConfigureEvent(address, container); - } - - /** - * Creates a {@code XConfigureEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XConfigureEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return nheight(address()); } - /** @return the value of the {@code border_width} field. */ - public int border_width() { return nborder_width(address()); } - /** @return the value of the {@code above} field. */ - @NativeType("Window") - public long above() { return nabove(address()); } - /** @return the value of the {@code override_redirect} field. */ - @NativeType("Bool") - public boolean override_redirect() { return noverride_redirect(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public XConfigureEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XConfigureEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XConfigureEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XConfigureEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XConfigureEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public XConfigureEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XConfigureEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public XConfigureEvent width(int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XConfigureEvent height(int value) { nheight(address(), value); return this; } - /** Sets the specified value to the {@code border_width} field. */ - public XConfigureEvent border_width(int value) { nborder_width(address(), value); return this; } - /** Sets the specified value to the {@code above} field. */ - public XConfigureEvent above(@NativeType("Window") long value) { nabove(address(), value); return this; } - /** Sets the specified value to the {@code override_redirect} field. */ - public XConfigureEvent override_redirect(@NativeType("Bool") boolean value) { noverride_redirect(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XConfigureEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - int x, - int y, - int width, - int height, - int border_width, - long above, - boolean override_redirect - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - x(x); - y(y); - width(width); - height(height); - border_width(border_width); - above(above); - override_redirect(override_redirect); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XConfigureEvent set(XConfigureEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XConfigureEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XConfigureEvent malloc() { - return new XConfigureEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XConfigureEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XConfigureEvent calloc() { - return new XConfigureEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XConfigureEvent} instance allocated with {@link BufferUtils}. */ - public static XConfigureEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XConfigureEvent(memAddress(container), container); - } - - /** Returns a new {@code XConfigureEvent} instance for the specified memory address. */ - public static XConfigureEvent create(long address) { - return new XConfigureEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XConfigureEvent createSafe(long address) { - return address == NULL ? null : new XConfigureEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XConfigureEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XConfigureEvent malloc(MemoryStack stack) { - return new XConfigureEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XConfigureEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XConfigureEvent calloc(MemoryStack stack) { - return new XConfigureEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XConfigureEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XConfigureEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XConfigureEvent.WINDOW); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.Y); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.HEIGHT); } - /** Unsafe version of {@link #border_width}. */ - public static int nborder_width(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.BORDER_WIDTH); } - /** Unsafe version of {@link #above}. */ - public static long nabove(long struct) { return memGetCLong(struct + XConfigureEvent.ABOVE); } - /** Unsafe version of {@link #override_redirect}. */ - public static int noverride_redirect(long struct) { return UNSAFE.getInt(null, struct + XConfigureEvent.OVERRIDE_REDIRECT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XConfigureEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XConfigureEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XConfigureEvent.WINDOW, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.Y, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.HEIGHT, value); } - /** Unsafe version of {@link #border_width(int) border_width}. */ - public static void nborder_width(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.BORDER_WIDTH, value); } - /** Unsafe version of {@link #above(long) above}. */ - public static void nabove(long struct, long value) { memPutCLong(struct + XConfigureEvent.ABOVE, value); } - /** Unsafe version of {@link #override_redirect(boolean) override_redirect}. */ - public static void noverride_redirect(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureEvent.OVERRIDE_REDIRECT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XConfigureEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XConfigureEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XConfigureEvent ELEMENT_FACTORY = XConfigureEvent.create(-1L); - - /** - * Creates a new {@code XConfigureEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XConfigureEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XConfigureEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XConfigureEvent.ntype(address()); } - /** @return the value of the {@link XConfigureEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XConfigureEvent.nserial(address()); } - /** @return the value of the {@link XConfigureEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XConfigureEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XConfigureEvent#display} field. */ - @NativeType("Display *") - public long display() { return XConfigureEvent.ndisplay(address()); } - /** @return the value of the {@link XConfigureEvent#window} field. */ - @NativeType("Window") - public long window() { return XConfigureEvent.nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return XConfigureEvent.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return XConfigureEvent.ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return XConfigureEvent.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return XConfigureEvent.nheight(address()); } - /** @return the value of the {@code border_width} field. */ - public int border_width() { return XConfigureEvent.nborder_width(address()); } - /** @return the value of the {@code above} field. */ - @NativeType("Window") - public long above() { return XConfigureEvent.nabove(address()); } - /** @return the value of the {@code override_redirect} field. */ - @NativeType("Bool") - public boolean override_redirect() { return XConfigureEvent.noverride_redirect(address()) != 0; } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XConfigureEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XConfigureEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XConfigureEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XConfigureEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XConfigureEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XConfigureEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XConfigureEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XConfigureEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XConfigureEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { XConfigureEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { XConfigureEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(int value) { XConfigureEvent.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(int value) { XConfigureEvent.nheight(address(), value); return this; } - /** Sets the specified value to the {@code border_width} field. */ - public Buffer border_width(int value) { XConfigureEvent.nborder_width(address(), value); return this; } - /** Sets the specified value to the {@code above} field. */ - public Buffer above(@NativeType("Window") long value) { XConfigureEvent.nabove(address(), value); return this; } - /** Sets the specified value to the {@code override_redirect} field. */ - public Buffer override_redirect(@NativeType("Bool") boolean value) { XConfigureEvent.noverride_redirect(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XConfigureRequestEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XConfigureRequestEvent.java deleted file mode 100644 index a55fc5ef..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XConfigureRequestEvent.java +++ /dev/null @@ -1,540 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XConfigureRequestEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window parent;
    - *     Window window;
    - *     int x;
    - *     int y;
    - *     int width;
    - *     int height;
    - *     int border_width;
    - *     Window above;
    - *     int {@link #detail};
    - *     unsigned long value_mask;
    - * }
    - */ -public class XConfigureRequestEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - PARENT, - WINDOW, - X, - Y, - WIDTH, - HEIGHT, - BORDER_WIDTH, - ABOVE, - DETAIL, - VALUE_MASK; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - PARENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - X = layout.offsetof(6); - Y = layout.offsetof(7); - WIDTH = layout.offsetof(8); - HEIGHT = layout.offsetof(9); - BORDER_WIDTH = layout.offsetof(10); - ABOVE = layout.offsetof(11); - DETAIL = layout.offsetof(12); - VALUE_MASK = layout.offsetof(13); - } - - protected XConfigureRequestEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XConfigureRequestEvent create(long address, @Nullable ByteBuffer container) { - return new XConfigureRequestEvent(address, container); - } - - /** - * Creates a {@code XConfigureRequestEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XConfigureRequestEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return nparent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return nheight(address()); } - /** @return the value of the {@code border_width} field. */ - public int border_width() { return nborder_width(address()); } - /** @return the value of the {@code above} field. */ - @NativeType("Window") - public long above() { return nabove(address()); } - /** one of:
    {@link X11#Above}{@link X11#Below}{@link X11#TopIf}{@link X11#BottomIf}{@link X11#Opposite}
    */ - public int detail() { return ndetail(address()); } - /** @return the value of the {@code value_mask} field. */ - @NativeType("unsigned long") - public long value_mask() { return nvalue_mask(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XConfigureRequestEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XConfigureRequestEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XConfigureRequestEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XConfigureRequestEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public XConfigureRequestEvent parent(@NativeType("Window") long value) { nparent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XConfigureRequestEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public XConfigureRequestEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XConfigureRequestEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public XConfigureRequestEvent width(int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XConfigureRequestEvent height(int value) { nheight(address(), value); return this; } - /** Sets the specified value to the {@code border_width} field. */ - public XConfigureRequestEvent border_width(int value) { nborder_width(address(), value); return this; } - /** Sets the specified value to the {@code above} field. */ - public XConfigureRequestEvent above(@NativeType("Window") long value) { nabove(address(), value); return this; } - /** Sets the specified value to the {@link #detail} field. */ - public XConfigureRequestEvent detail(int value) { ndetail(address(), value); return this; } - /** Sets the specified value to the {@code value_mask} field. */ - public XConfigureRequestEvent value_mask(@NativeType("unsigned long") long value) { nvalue_mask(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XConfigureRequestEvent set( - int type, - long serial, - boolean send_event, - long display, - long parent, - long window, - int x, - int y, - int width, - int height, - int border_width, - long above, - int detail, - long value_mask - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - parent(parent); - window(window); - x(x); - y(y); - width(width); - height(height); - border_width(border_width); - above(above); - detail(detail); - value_mask(value_mask); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XConfigureRequestEvent set(XConfigureRequestEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XConfigureRequestEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XConfigureRequestEvent malloc() { - return new XConfigureRequestEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XConfigureRequestEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XConfigureRequestEvent calloc() { - return new XConfigureRequestEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XConfigureRequestEvent} instance allocated with {@link BufferUtils}. */ - public static XConfigureRequestEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XConfigureRequestEvent(memAddress(container), container); - } - - /** Returns a new {@code XConfigureRequestEvent} instance for the specified memory address. */ - public static XConfigureRequestEvent create(long address) { - return new XConfigureRequestEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XConfigureRequestEvent createSafe(long address) { - return address == NULL ? null : new XConfigureRequestEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureRequestEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureRequestEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureRequestEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XConfigureRequestEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XConfigureRequestEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XConfigureRequestEvent malloc(MemoryStack stack) { - return new XConfigureRequestEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XConfigureRequestEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XConfigureRequestEvent calloc(MemoryStack stack) { - return new XConfigureRequestEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XConfigureRequestEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XConfigureRequestEvent.DISPLAY); } - /** Unsafe version of {@link #parent}. */ - public static long nparent(long struct) { return memGetCLong(struct + XConfigureRequestEvent.PARENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XConfigureRequestEvent.WINDOW); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.Y); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.HEIGHT); } - /** Unsafe version of {@link #border_width}. */ - public static int nborder_width(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.BORDER_WIDTH); } - /** Unsafe version of {@link #above}. */ - public static long nabove(long struct) { return memGetCLong(struct + XConfigureRequestEvent.ABOVE); } - /** Unsafe version of {@link #detail}. */ - public static int ndetail(long struct) { return UNSAFE.getInt(null, struct + XConfigureRequestEvent.DETAIL); } - /** Unsafe version of {@link #value_mask}. */ - public static long nvalue_mask(long struct) { return memGetCLong(struct + XConfigureRequestEvent.VALUE_MASK); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XConfigureRequestEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XConfigureRequestEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #parent(long) parent}. */ - public static void nparent(long struct, long value) { memPutCLong(struct + XConfigureRequestEvent.PARENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XConfigureRequestEvent.WINDOW, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.Y, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.HEIGHT, value); } - /** Unsafe version of {@link #border_width(int) border_width}. */ - public static void nborder_width(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.BORDER_WIDTH, value); } - /** Unsafe version of {@link #above(long) above}. */ - public static void nabove(long struct, long value) { memPutCLong(struct + XConfigureRequestEvent.ABOVE, value); } - /** Unsafe version of {@link #detail(int) detail}. */ - public static void ndetail(long struct, int value) { UNSAFE.putInt(null, struct + XConfigureRequestEvent.DETAIL, value); } - /** Unsafe version of {@link #value_mask(long) value_mask}. */ - public static void nvalue_mask(long struct, long value) { memPutCLong(struct + XConfigureRequestEvent.VALUE_MASK, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XConfigureRequestEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XConfigureRequestEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XConfigureRequestEvent ELEMENT_FACTORY = XConfigureRequestEvent.create(-1L); - - /** - * Creates a new {@code XConfigureRequestEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XConfigureRequestEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XConfigureRequestEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XConfigureRequestEvent.ntype(address()); } - /** @return the value of the {@link XConfigureRequestEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XConfigureRequestEvent.nserial(address()); } - /** @return the value of the {@link XConfigureRequestEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XConfigureRequestEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XConfigureRequestEvent#display} field. */ - @NativeType("Display *") - public long display() { return XConfigureRequestEvent.ndisplay(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return XConfigureRequestEvent.nparent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XConfigureRequestEvent.nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return XConfigureRequestEvent.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return XConfigureRequestEvent.ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return XConfigureRequestEvent.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return XConfigureRequestEvent.nheight(address()); } - /** @return the value of the {@code border_width} field. */ - public int border_width() { return XConfigureRequestEvent.nborder_width(address()); } - /** @return the value of the {@code above} field. */ - @NativeType("Window") - public long above() { return XConfigureRequestEvent.nabove(address()); } - /** @return the value of the {@link XConfigureRequestEvent#detail} field. */ - public int detail() { return XConfigureRequestEvent.ndetail(address()); } - /** @return the value of the {@code value_mask} field. */ - @NativeType("unsigned long") - public long value_mask() { return XConfigureRequestEvent.nvalue_mask(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XConfigureRequestEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XConfigureRequestEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XConfigureRequestEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XConfigureRequestEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XConfigureRequestEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XConfigureRequestEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XConfigureRequestEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public Buffer parent(@NativeType("Window") long value) { XConfigureRequestEvent.nparent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XConfigureRequestEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { XConfigureRequestEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { XConfigureRequestEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(int value) { XConfigureRequestEvent.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(int value) { XConfigureRequestEvent.nheight(address(), value); return this; } - /** Sets the specified value to the {@code border_width} field. */ - public Buffer border_width(int value) { XConfigureRequestEvent.nborder_width(address(), value); return this; } - /** Sets the specified value to the {@code above} field. */ - public Buffer above(@NativeType("Window") long value) { XConfigureRequestEvent.nabove(address(), value); return this; } - /** Sets the specified value to the {@link XConfigureRequestEvent#detail} field. */ - public Buffer detail(int value) { XConfigureRequestEvent.ndetail(address(), value); return this; } - /** Sets the specified value to the {@code value_mask} field. */ - public Buffer value_mask(@NativeType("unsigned long") long value) { XConfigureRequestEvent.nvalue_mask(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XCreateWindowEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XCreateWindowEvent.java deleted file mode 100644 index 9549d32c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XCreateWindowEvent.java +++ /dev/null @@ -1,500 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XCreateWindowEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #parent};
    - *     Window {@link #window};
    - *     int {@link #x};
    - *     int {@link #y};
    - *     int {@link #width};
    - *     int {@link #height};
    - *     int {@link #border_width};
    - *     int {@link #override_redirect};
    - * }
    - */ -public class XCreateWindowEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - PARENT, - WINDOW, - X, - Y, - WIDTH, - HEIGHT, - BORDER_WIDTH, - OVERRIDE_REDIRECT; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - PARENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - X = layout.offsetof(6); - Y = layout.offsetof(7); - WIDTH = layout.offsetof(8); - HEIGHT = layout.offsetof(9); - BORDER_WIDTH = layout.offsetof(10); - OVERRIDE_REDIRECT = layout.offsetof(11); - } - - protected XCreateWindowEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XCreateWindowEvent create(long address, @Nullable ByteBuffer container) { - return new XCreateWindowEvent(address, container); - } - - /** - * Creates a {@code XCreateWindowEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XCreateWindowEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** parent of the window */ - @NativeType("Window") - public long parent() { return nparent(address()); } - /** window id of window created */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** window location */ - public int x() { return nx(address()); } - /** window location */ - public int y() { return ny(address()); } - /** size of window */ - public int width() { return nwidth(address()); } - /** size of window */ - public int height() { return nheight(address()); } - /** border width */ - public int border_width() { return nborder_width(address()); } - /** creation should be overridden */ - public int override_redirect() { return noverride_redirect(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XCreateWindowEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XCreateWindowEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XCreateWindowEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XCreateWindowEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #parent} field. */ - public XCreateWindowEvent parent(@NativeType("Window") long value) { nparent(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XCreateWindowEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #x} field. */ - public XCreateWindowEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public XCreateWindowEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@link #width} field. */ - public XCreateWindowEvent width(int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@link #height} field. */ - public XCreateWindowEvent height(int value) { nheight(address(), value); return this; } - /** Sets the specified value to the {@link #border_width} field. */ - public XCreateWindowEvent border_width(int value) { nborder_width(address(), value); return this; } - /** Sets the specified value to the {@link #override_redirect} field. */ - public XCreateWindowEvent override_redirect(int value) { noverride_redirect(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XCreateWindowEvent set( - int type, - long serial, - boolean send_event, - long display, - long parent, - long window, - int x, - int y, - int width, - int height, - int border_width, - int override_redirect - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - parent(parent); - window(window); - x(x); - y(y); - width(width); - height(height); - border_width(border_width); - override_redirect(override_redirect); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XCreateWindowEvent set(XCreateWindowEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XCreateWindowEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XCreateWindowEvent malloc() { - return new XCreateWindowEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XCreateWindowEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XCreateWindowEvent calloc() { - return new XCreateWindowEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XCreateWindowEvent} instance allocated with {@link BufferUtils}. */ - public static XCreateWindowEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XCreateWindowEvent(memAddress(container), container); - } - - /** Returns a new {@code XCreateWindowEvent} instance for the specified memory address. */ - public static XCreateWindowEvent create(long address) { - return new XCreateWindowEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XCreateWindowEvent createSafe(long address) { - return address == NULL ? null : new XCreateWindowEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCreateWindowEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCreateWindowEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCreateWindowEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCreateWindowEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XCreateWindowEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XCreateWindowEvent malloc(MemoryStack stack) { - return new XCreateWindowEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XCreateWindowEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XCreateWindowEvent calloc(MemoryStack stack) { - return new XCreateWindowEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XCreateWindowEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XCreateWindowEvent.DISPLAY); } - /** Unsafe version of {@link #parent}. */ - public static long nparent(long struct) { return memGetCLong(struct + XCreateWindowEvent.PARENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XCreateWindowEvent.WINDOW); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.Y); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.HEIGHT); } - /** Unsafe version of {@link #border_width}. */ - public static int nborder_width(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.BORDER_WIDTH); } - /** Unsafe version of {@link #override_redirect}. */ - public static int noverride_redirect(long struct) { return UNSAFE.getInt(null, struct + XCreateWindowEvent.OVERRIDE_REDIRECT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XCreateWindowEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XCreateWindowEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #parent(long) parent}. */ - public static void nparent(long struct, long value) { memPutCLong(struct + XCreateWindowEvent.PARENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XCreateWindowEvent.WINDOW, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.Y, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.HEIGHT, value); } - /** Unsafe version of {@link #border_width(int) border_width}. */ - public static void nborder_width(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.BORDER_WIDTH, value); } - /** Unsafe version of {@link #override_redirect(int) override_redirect}. */ - public static void noverride_redirect(long struct, int value) { UNSAFE.putInt(null, struct + XCreateWindowEvent.OVERRIDE_REDIRECT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XCreateWindowEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XCreateWindowEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XCreateWindowEvent ELEMENT_FACTORY = XCreateWindowEvent.create(-1L); - - /** - * Creates a new {@code XCreateWindowEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XCreateWindowEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XCreateWindowEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XCreateWindowEvent.ntype(address()); } - /** @return the value of the {@link XCreateWindowEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XCreateWindowEvent.nserial(address()); } - /** @return the value of the {@link XCreateWindowEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XCreateWindowEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XCreateWindowEvent#display} field. */ - @NativeType("Display *") - public long display() { return XCreateWindowEvent.ndisplay(address()); } - /** @return the value of the {@link XCreateWindowEvent#parent} field. */ - @NativeType("Window") - public long parent() { return XCreateWindowEvent.nparent(address()); } - /** @return the value of the {@link XCreateWindowEvent#window} field. */ - @NativeType("Window") - public long window() { return XCreateWindowEvent.nwindow(address()); } - /** @return the value of the {@link XCreateWindowEvent#x} field. */ - public int x() { return XCreateWindowEvent.nx(address()); } - /** @return the value of the {@link XCreateWindowEvent#y} field. */ - public int y() { return XCreateWindowEvent.ny(address()); } - /** @return the value of the {@link XCreateWindowEvent#width} field. */ - public int width() { return XCreateWindowEvent.nwidth(address()); } - /** @return the value of the {@link XCreateWindowEvent#height} field. */ - public int height() { return XCreateWindowEvent.nheight(address()); } - /** @return the value of the {@link XCreateWindowEvent#border_width} field. */ - public int border_width() { return XCreateWindowEvent.nborder_width(address()); } - /** @return the value of the {@link XCreateWindowEvent#override_redirect} field. */ - public int override_redirect() { return XCreateWindowEvent.noverride_redirect(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XCreateWindowEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XCreateWindowEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XCreateWindowEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XCreateWindowEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#parent} field. */ - public Buffer parent(@NativeType("Window") long value) { XCreateWindowEvent.nparent(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XCreateWindowEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#x} field. */ - public Buffer x(int value) { XCreateWindowEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#y} field. */ - public Buffer y(int value) { XCreateWindowEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#width} field. */ - public Buffer width(int value) { XCreateWindowEvent.nwidth(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#height} field. */ - public Buffer height(int value) { XCreateWindowEvent.nheight(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#border_width} field. */ - public Buffer border_width(int value) { XCreateWindowEvent.nborder_width(address(), value); return this; } - /** Sets the specified value to the {@link XCreateWindowEvent#override_redirect} field. */ - public Buffer override_redirect(int value) { XCreateWindowEvent.noverride_redirect(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XCrossingEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XCrossingEvent.java deleted file mode 100644 index 8a9d2326..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XCrossingEvent.java +++ /dev/null @@ -1,596 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XCrossingEvent {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Window {@link #root};
    - *     Window {@link #subwindow};
    - *     Time {@link #time};
    - *     int {@link #x};
    - *     int {@link #y};
    - *     int {@link #x_root};
    - *     int {@link #y_root};
    - *     int {@link #mode};
    - *     int detail;
    - *     int {@link #same_screen};
    - *     int {@link #focus};
    - *     unsigned int {@link #state};
    - * }
    - */ -public class XCrossingEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - ROOT, - SUBWINDOW, - TIME, - X, - Y, - X_ROOT, - Y_ROOT, - MODE, - DETAIL, - SAME_SCREEN, - FOCUS, - STATE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - ROOT = layout.offsetof(5); - SUBWINDOW = layout.offsetof(6); - TIME = layout.offsetof(7); - X = layout.offsetof(8); - Y = layout.offsetof(9); - X_ROOT = layout.offsetof(10); - Y_ROOT = layout.offsetof(11); - MODE = layout.offsetof(12); - DETAIL = layout.offsetof(13); - SAME_SCREEN = layout.offsetof(14); - FOCUS = layout.offsetof(15); - STATE = layout.offsetof(16); - } - - protected XCrossingEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XCrossingEvent create(long address, @Nullable ByteBuffer container) { - return new XCrossingEvent(address, container); - } - - /** - * Creates a {@code XCrossingEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XCrossingEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** of event */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** root window that the event occurred on */ - @NativeType("Window") - public long root() { return nroot(address()); } - /** child window */ - @NativeType("Window") - public long subwindow() { return nsubwindow(address()); } - /** milliseconds */ - @NativeType("Time") - public long time() { return ntime(address()); } - /** pointer x coordinate in event window */ - public int x() { return nx(address()); } - /** pointer y coordinate in event window */ - public int y() { return ny(address()); } - /** x coordinate relative to {@code root} */ - public int x_root() { return nx_root(address()); } - /** y coordinate relative to {@code root} */ - public int y_root() { return ny_root(address()); } - /** one of:
    {@link X11#NotifyNormal}{@link X11#NotifyGrab}{@link X11#NotifyUngrab}
    */ - public int mode() { return nmode(address()); } - /** @return the value of the {@code detail} field. */ - public int detail() { return ndetail(address()); } - /** same screen flag */ - public int same_screen() { return nsame_screen(address()); } - /** boolean focus */ - public int focus() { return nfocus(address()); } - /** key or button mask */ - @NativeType("unsigned int") - public int state() { return nstate(address()); } - - /** Sets the specified value to the {@link #type} field. */ - public XCrossingEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XCrossingEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XCrossingEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XCrossingEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XCrossingEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #root} field. */ - public XCrossingEvent root(@NativeType("Window") long value) { nroot(address(), value); return this; } - /** Sets the specified value to the {@link #subwindow} field. */ - public XCrossingEvent subwindow(@NativeType("Window") long value) { nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link #time} field. */ - public XCrossingEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@link #x} field. */ - public XCrossingEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public XCrossingEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@link #x_root} field. */ - public XCrossingEvent x_root(int value) { nx_root(address(), value); return this; } - /** Sets the specified value to the {@link #y_root} field. */ - public XCrossingEvent y_root(int value) { ny_root(address(), value); return this; } - /** Sets the specified value to the {@link #mode} field. */ - public XCrossingEvent mode(int value) { nmode(address(), value); return this; } - /** Sets the specified value to the {@code detail} field. */ - public XCrossingEvent detail(int value) { ndetail(address(), value); return this; } - /** Sets the specified value to the {@link #same_screen} field. */ - public XCrossingEvent same_screen(int value) { nsame_screen(address(), value); return this; } - /** Sets the specified value to the {@link #focus} field. */ - public XCrossingEvent focus(int value) { nfocus(address(), value); return this; } - /** Sets the specified value to the {@link #state} field. */ - public XCrossingEvent state(@NativeType("unsigned int") int value) { nstate(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XCrossingEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long root, - long subwindow, - long time, - int x, - int y, - int x_root, - int y_root, - int mode, - int detail, - int same_screen, - int focus, - int state - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - root(root); - subwindow(subwindow); - time(time); - x(x); - y(y); - x_root(x_root); - y_root(y_root); - mode(mode); - detail(detail); - same_screen(same_screen); - focus(focus); - state(state); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XCrossingEvent set(XCrossingEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XCrossingEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XCrossingEvent malloc() { - return new XCrossingEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XCrossingEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XCrossingEvent calloc() { - return new XCrossingEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XCrossingEvent} instance allocated with {@link BufferUtils}. */ - public static XCrossingEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XCrossingEvent(memAddress(container), container); - } - - /** Returns a new {@code XCrossingEvent} instance for the specified memory address. */ - public static XCrossingEvent create(long address) { - return new XCrossingEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XCrossingEvent createSafe(long address) { - return address == NULL ? null : new XCrossingEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCrossingEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCrossingEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XCrossingEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XCrossingEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XCrossingEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XCrossingEvent malloc(MemoryStack stack) { - return new XCrossingEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XCrossingEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XCrossingEvent calloc(MemoryStack stack) { - return new XCrossingEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XCrossingEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XCrossingEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XCrossingEvent.WINDOW); } - /** Unsafe version of {@link #root}. */ - public static long nroot(long struct) { return memGetCLong(struct + XCrossingEvent.ROOT); } - /** Unsafe version of {@link #subwindow}. */ - public static long nsubwindow(long struct) { return memGetCLong(struct + XCrossingEvent.SUBWINDOW); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XCrossingEvent.TIME); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.Y); } - /** Unsafe version of {@link #x_root}. */ - public static int nx_root(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.X_ROOT); } - /** Unsafe version of {@link #y_root}. */ - public static int ny_root(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.Y_ROOT); } - /** Unsafe version of {@link #mode}. */ - public static int nmode(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.MODE); } - /** Unsafe version of {@link #detail}. */ - public static int ndetail(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.DETAIL); } - /** Unsafe version of {@link #same_screen}. */ - public static int nsame_screen(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.SAME_SCREEN); } - /** Unsafe version of {@link #focus}. */ - public static int nfocus(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.FOCUS); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XCrossingEvent.STATE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XCrossingEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XCrossingEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XCrossingEvent.WINDOW, value); } - /** Unsafe version of {@link #root(long) root}. */ - public static void nroot(long struct, long value) { memPutCLong(struct + XCrossingEvent.ROOT, value); } - /** Unsafe version of {@link #subwindow(long) subwindow}. */ - public static void nsubwindow(long struct, long value) { memPutCLong(struct + XCrossingEvent.SUBWINDOW, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XCrossingEvent.TIME, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.Y, value); } - /** Unsafe version of {@link #x_root(int) x_root}. */ - public static void nx_root(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.X_ROOT, value); } - /** Unsafe version of {@link #y_root(int) y_root}. */ - public static void ny_root(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.Y_ROOT, value); } - /** Unsafe version of {@link #mode(int) mode}. */ - public static void nmode(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.MODE, value); } - /** Unsafe version of {@link #detail(int) detail}. */ - public static void ndetail(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.DETAIL, value); } - /** Unsafe version of {@link #same_screen(int) same_screen}. */ - public static void nsame_screen(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.SAME_SCREEN, value); } - /** Unsafe version of {@link #focus(int) focus}. */ - public static void nfocus(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.FOCUS, value); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XCrossingEvent.STATE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XCrossingEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XCrossingEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XCrossingEvent ELEMENT_FACTORY = XCrossingEvent.create(-1L); - - /** - * Creates a new {@code XCrossingEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XCrossingEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XCrossingEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XCrossingEvent#type} field. */ - public int type() { return XCrossingEvent.ntype(address()); } - /** @return the value of the {@link XCrossingEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XCrossingEvent.nserial(address()); } - /** @return the value of the {@link XCrossingEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XCrossingEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XCrossingEvent#display} field. */ - @NativeType("Display *") - public long display() { return XCrossingEvent.ndisplay(address()); } - /** @return the value of the {@link XCrossingEvent#window} field. */ - @NativeType("Window") - public long window() { return XCrossingEvent.nwindow(address()); } - /** @return the value of the {@link XCrossingEvent#root} field. */ - @NativeType("Window") - public long root() { return XCrossingEvent.nroot(address()); } - /** @return the value of the {@link XCrossingEvent#subwindow} field. */ - @NativeType("Window") - public long subwindow() { return XCrossingEvent.nsubwindow(address()); } - /** @return the value of the {@link XCrossingEvent#time} field. */ - @NativeType("Time") - public long time() { return XCrossingEvent.ntime(address()); } - /** @return the value of the {@link XCrossingEvent#x} field. */ - public int x() { return XCrossingEvent.nx(address()); } - /** @return the value of the {@link XCrossingEvent#y} field. */ - public int y() { return XCrossingEvent.ny(address()); } - /** @return the value of the {@link XCrossingEvent#x_root} field. */ - public int x_root() { return XCrossingEvent.nx_root(address()); } - /** @return the value of the {@link XCrossingEvent#y_root} field. */ - public int y_root() { return XCrossingEvent.ny_root(address()); } - /** @return the value of the {@link XCrossingEvent#mode} field. */ - public int mode() { return XCrossingEvent.nmode(address()); } - /** @return the value of the {@code detail} field. */ - public int detail() { return XCrossingEvent.ndetail(address()); } - /** @return the value of the {@link XCrossingEvent#same_screen} field. */ - public int same_screen() { return XCrossingEvent.nsame_screen(address()); } - /** @return the value of the {@link XCrossingEvent#focus} field. */ - public int focus() { return XCrossingEvent.nfocus(address()); } - /** @return the value of the {@link XCrossingEvent#state} field. */ - @NativeType("unsigned int") - public int state() { return XCrossingEvent.nstate(address()); } - - /** Sets the specified value to the {@link XCrossingEvent#type} field. */ - public Buffer type(int value) { XCrossingEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XCrossingEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XCrossingEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XCrossingEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XCrossingEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XCrossingEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#root} field. */ - public Buffer root(@NativeType("Window") long value) { XCrossingEvent.nroot(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#subwindow} field. */ - public Buffer subwindow(@NativeType("Window") long value) { XCrossingEvent.nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#time} field. */ - public Buffer time(@NativeType("Time") long value) { XCrossingEvent.ntime(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#x} field. */ - public Buffer x(int value) { XCrossingEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#y} field. */ - public Buffer y(int value) { XCrossingEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#x_root} field. */ - public Buffer x_root(int value) { XCrossingEvent.nx_root(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#y_root} field. */ - public Buffer y_root(int value) { XCrossingEvent.ny_root(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#mode} field. */ - public Buffer mode(int value) { XCrossingEvent.nmode(address(), value); return this; } - /** Sets the specified value to the {@code detail} field. */ - public Buffer detail(int value) { XCrossingEvent.ndetail(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#same_screen} field. */ - public Buffer same_screen(int value) { XCrossingEvent.nsame_screen(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#focus} field. */ - public Buffer focus(int value) { XCrossingEvent.nfocus(address(), value); return this; } - /** Sets the specified value to the {@link XCrossingEvent#state} field. */ - public Buffer state(@NativeType("unsigned int") int value) { XCrossingEvent.nstate(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XDestroyWindowEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XDestroyWindowEvent.java deleted file mode 100644 index f9acaaec..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XDestroyWindowEvent.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XDestroyWindowEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window event;
    - *     Window window;
    - * }
    - */ -public class XDestroyWindowEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EVENT, - WINDOW; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EVENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - } - - protected XDestroyWindowEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XDestroyWindowEvent create(long address, @Nullable ByteBuffer container) { - return new XDestroyWindowEvent(address, container); - } - - /** - * Creates a {@code XDestroyWindowEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XDestroyWindowEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XDestroyWindowEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XDestroyWindowEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XDestroyWindowEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XDestroyWindowEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public XDestroyWindowEvent event(@NativeType("Window") long value) { nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XDestroyWindowEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XDestroyWindowEvent set( - int type, - long serial, - boolean send_event, - long display, - long event, - long window - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - event(event); - window(window); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XDestroyWindowEvent set(XDestroyWindowEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XDestroyWindowEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XDestroyWindowEvent malloc() { - return new XDestroyWindowEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XDestroyWindowEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XDestroyWindowEvent calloc() { - return new XDestroyWindowEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XDestroyWindowEvent} instance allocated with {@link BufferUtils}. */ - public static XDestroyWindowEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XDestroyWindowEvent(memAddress(container), container); - } - - /** Returns a new {@code XDestroyWindowEvent} instance for the specified memory address. */ - public static XDestroyWindowEvent create(long address) { - return new XDestroyWindowEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XDestroyWindowEvent createSafe(long address) { - return address == NULL ? null : new XDestroyWindowEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XDestroyWindowEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XDestroyWindowEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XDestroyWindowEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XDestroyWindowEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XDestroyWindowEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XDestroyWindowEvent malloc(MemoryStack stack) { - return new XDestroyWindowEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XDestroyWindowEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XDestroyWindowEvent calloc(MemoryStack stack) { - return new XDestroyWindowEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XDestroyWindowEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XDestroyWindowEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XDestroyWindowEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XDestroyWindowEvent.DISPLAY); } - /** Unsafe version of {@link #event}. */ - public static long nevent(long struct) { return memGetCLong(struct + XDestroyWindowEvent.EVENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XDestroyWindowEvent.WINDOW); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XDestroyWindowEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XDestroyWindowEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XDestroyWindowEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XDestroyWindowEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #event(long) event}. */ - public static void nevent(long struct, long value) { memPutCLong(struct + XDestroyWindowEvent.EVENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XDestroyWindowEvent.WINDOW, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XDestroyWindowEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XDestroyWindowEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XDestroyWindowEvent ELEMENT_FACTORY = XDestroyWindowEvent.create(-1L); - - /** - * Creates a new {@code XDestroyWindowEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XDestroyWindowEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XDestroyWindowEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XDestroyWindowEvent.ntype(address()); } - /** @return the value of the {@link XDestroyWindowEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XDestroyWindowEvent.nserial(address()); } - /** @return the value of the {@link XDestroyWindowEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XDestroyWindowEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XDestroyWindowEvent#display} field. */ - @NativeType("Display *") - public long display() { return XDestroyWindowEvent.ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return XDestroyWindowEvent.nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XDestroyWindowEvent.nwindow(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XDestroyWindowEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XDestroyWindowEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XDestroyWindowEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XDestroyWindowEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XDestroyWindowEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XDestroyWindowEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XDestroyWindowEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public Buffer event(@NativeType("Window") long value) { XDestroyWindowEvent.nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XDestroyWindowEvent.nwindow(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XErrorEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XErrorEvent.java deleted file mode 100644 index b0750f43..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XErrorEvent.java +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Error event. - * - *

    Layout

    - * - *
    
    - * struct XErrorEvent {
    - *     int type;
    - *     Display * {@link #display};
    - *     XID {@link #resourceid};
    - *     unsigned long {@link #serial};
    - *     unsigned char {@link #error_code};
    - *     unsigned char {@link #request_code};
    - *     unsigned char {@link #minor_code};
    - * }
    - */ -public class XErrorEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - DISPLAY, - RESOURCEID, - SERIAL, - ERROR_CODE, - REQUEST_CODE, - MINOR_CODE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(1), - __member(1), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - DISPLAY = layout.offsetof(1); - RESOURCEID = layout.offsetof(2); - SERIAL = layout.offsetof(3); - ERROR_CODE = layout.offsetof(4); - REQUEST_CODE = layout.offsetof(5); - MINOR_CODE = layout.offsetof(6); - } - - protected XErrorEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XErrorEvent create(long address, @Nullable ByteBuffer container) { - return new XErrorEvent(address, container); - } - - /** - * Creates a {@code XErrorEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XErrorEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** display the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** resource id */ - @NativeType("XID") - public long resourceid() { return nresourceid(address()); } - /** serial number of failed request */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** error code of failed request */ - @NativeType("unsigned char") - public byte error_code() { return nerror_code(address()); } - /** major op-code of failed request */ - @NativeType("unsigned char") - public byte request_code() { return nrequest_code(address()); } - /** minor op-code of failed request */ - @NativeType("unsigned char") - public byte minor_code() { return nminor_code(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XErrorEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XErrorEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #resourceid} field. */ - public XErrorEvent resourceid(@NativeType("XID") long value) { nresourceid(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XErrorEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #error_code} field. */ - public XErrorEvent error_code(@NativeType("unsigned char") byte value) { nerror_code(address(), value); return this; } - /** Sets the specified value to the {@link #request_code} field. */ - public XErrorEvent request_code(@NativeType("unsigned char") byte value) { nrequest_code(address(), value); return this; } - /** Sets the specified value to the {@link #minor_code} field. */ - public XErrorEvent minor_code(@NativeType("unsigned char") byte value) { nminor_code(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XErrorEvent set( - int type, - long display, - long resourceid, - long serial, - byte error_code, - byte request_code, - byte minor_code - ) { - type(type); - display(display); - resourceid(resourceid); - serial(serial); - error_code(error_code); - request_code(request_code); - minor_code(minor_code); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XErrorEvent set(XErrorEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XErrorEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XErrorEvent malloc() { - return new XErrorEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XErrorEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XErrorEvent calloc() { - return new XErrorEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XErrorEvent} instance allocated with {@link BufferUtils}. */ - public static XErrorEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XErrorEvent(memAddress(container), container); - } - - /** Returns a new {@code XErrorEvent} instance for the specified memory address. */ - public static XErrorEvent create(long address) { - return new XErrorEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XErrorEvent createSafe(long address) { - return address == NULL ? null : new XErrorEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XErrorEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XErrorEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XErrorEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XErrorEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XErrorEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XErrorEvent malloc(MemoryStack stack) { - return new XErrorEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XErrorEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XErrorEvent calloc(MemoryStack stack) { - return new XErrorEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XErrorEvent.TYPE); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XErrorEvent.DISPLAY); } - /** Unsafe version of {@link #resourceid}. */ - public static long nresourceid(long struct) { return memGetCLong(struct + XErrorEvent.RESOURCEID); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XErrorEvent.SERIAL); } - /** Unsafe version of {@link #error_code}. */ - public static byte nerror_code(long struct) { return UNSAFE.getByte(null, struct + XErrorEvent.ERROR_CODE); } - /** Unsafe version of {@link #request_code}. */ - public static byte nrequest_code(long struct) { return UNSAFE.getByte(null, struct + XErrorEvent.REQUEST_CODE); } - /** Unsafe version of {@link #minor_code}. */ - public static byte nminor_code(long struct) { return UNSAFE.getByte(null, struct + XErrorEvent.MINOR_CODE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XErrorEvent.TYPE, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XErrorEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #resourceid(long) resourceid}. */ - public static void nresourceid(long struct, long value) { memPutCLong(struct + XErrorEvent.RESOURCEID, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XErrorEvent.SERIAL, value); } - /** Unsafe version of {@link #error_code(byte) error_code}. */ - public static void nerror_code(long struct, byte value) { UNSAFE.putByte(null, struct + XErrorEvent.ERROR_CODE, value); } - /** Unsafe version of {@link #request_code(byte) request_code}. */ - public static void nrequest_code(long struct, byte value) { UNSAFE.putByte(null, struct + XErrorEvent.REQUEST_CODE, value); } - /** Unsafe version of {@link #minor_code(byte) minor_code}. */ - public static void nminor_code(long struct, byte value) { UNSAFE.putByte(null, struct + XErrorEvent.MINOR_CODE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XErrorEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XErrorEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XErrorEvent ELEMENT_FACTORY = XErrorEvent.create(-1L); - - /** - * Creates a new {@code XErrorEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XErrorEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XErrorEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XErrorEvent.ntype(address()); } - /** @return the value of the {@link XErrorEvent#display} field. */ - @NativeType("Display *") - public long display() { return XErrorEvent.ndisplay(address()); } - /** @return the value of the {@link XErrorEvent#resourceid} field. */ - @NativeType("XID") - public long resourceid() { return XErrorEvent.nresourceid(address()); } - /** @return the value of the {@link XErrorEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XErrorEvent.nserial(address()); } - /** @return the value of the {@link XErrorEvent#error_code} field. */ - @NativeType("unsigned char") - public byte error_code() { return XErrorEvent.nerror_code(address()); } - /** @return the value of the {@link XErrorEvent#request_code} field. */ - @NativeType("unsigned char") - public byte request_code() { return XErrorEvent.nrequest_code(address()); } - /** @return the value of the {@link XErrorEvent#minor_code} field. */ - @NativeType("unsigned char") - public byte minor_code() { return XErrorEvent.nminor_code(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XErrorEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XErrorEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XErrorEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XErrorEvent#resourceid} field. */ - public Buffer resourceid(@NativeType("XID") long value) { XErrorEvent.nresourceid(address(), value); return this; } - /** Sets the specified value to the {@link XErrorEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XErrorEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XErrorEvent#error_code} field. */ - public Buffer error_code(@NativeType("unsigned char") byte value) { XErrorEvent.nerror_code(address(), value); return this; } - /** Sets the specified value to the {@link XErrorEvent#request_code} field. */ - public Buffer request_code(@NativeType("unsigned char") byte value) { XErrorEvent.nrequest_code(address(), value); return this; } - /** Sets the specified value to the {@link XErrorEvent#minor_code} field. */ - public Buffer minor_code(@NativeType("unsigned char") byte value) { XErrorEvent.nminor_code(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XEvent.java deleted file mode 100644 index 05047e1d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XEvent.java +++ /dev/null @@ -1,586 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * This union is defined so Xlib can always use the same sized event structure internally, to avoid memory fragmentation. - * - *

    Layout

    - * - *
    
    - * union XEvent {
    - *     int type;
    - *     {@link XAnyEvent XAnyEvent} xany;
    - *     {@link XKeyEvent XKeyEvent} xkey;
    - *     {@link XButtonEvent XButtonEvent} xbutton;
    - *     {@link XMotionEvent XMotionEvent} xmotion;
    - *     {@link XCrossingEvent XCrossingEvent} xcrossing;
    - *     {@link XFocusChangeEvent XFocusChangeEvent} xfocus;
    - *     {@link XExposeEvent XExposeEvent} xexpose;
    - *     {@link XGraphicsExposeEvent XGraphicsExposeEvent} xgraphicsexpose;
    - *     {@link XNoExposeEvent XNoExposeEvent} xnoexpose;
    - *     {@link XVisibilityEvent XVisibilityEvent} xvisibility;
    - *     {@link XCreateWindowEvent XCreateWindowEvent} xcreatewindow;
    - *     {@link XDestroyWindowEvent XDestroyWindowEvent} xdestroywindow;
    - *     {@link XUnmapEvent XUnmapEvent} xunmap;
    - *     {@link XMapEvent XMapEvent} xmap;
    - *     {@link XMapRequestEvent XMapRequestEvent} xmaprequest;
    - *     {@link XReparentEvent XReparentEvent} xreparent;
    - *     {@link XConfigureEvent XConfigureEvent} xconfigure;
    - *     {@link XGravityEvent XGravityEvent} xgravity;
    - *     {@link XResizeRequestEvent XResizeRequestEvent} xresizerequest;
    - *     {@link XConfigureRequestEvent XConfigureRequestEvent} xconfigurerequest;
    - *     {@link XCirculateEvent XCirculateEvent} xcirculate;
    - *     {@link XCirculateRequestEvent XCirculateRequestEvent} xcirculaterequest;
    - *     {@link XPropertyEvent XPropertyEvent} xproperty;
    - *     {@link XSelectionClearEvent XSelectionClearEvent} xselectionclear;
    - *     {@link XSelectionRequestEvent XSelectionRequestEvent} xselectionrequest;
    - *     {@link XSelectionEvent XSelectionEvent} xselection;
    - *     {@link XColormapEvent XColormapEvent} xcolormap;
    - *     {@link XClientMessageEvent XClientMessageEvent} xclient;
    - *     {@link XMappingEvent XMappingEvent} xmapping;
    - *     {@link XErrorEvent XErrorEvent} xerror;
    - *     {@link XKeymapEvent XKeymapEvent} xkeymap;
    - *     {@link XGenericEvent XGenericEvent} xgeneric;
    - *     {@link XGenericEventCookie XGenericEventCookie} xcookie;
    - *     long[24];
    - * }
    - */ -public class XEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - XANY, - XKEY, - XBUTTON, - XMOTION, - XCROSSING, - XFOCUS, - XEXPOSE, - XGRAPHICSEXPOSE, - XNOEXPOSE, - XVISIBILITY, - XCREATEWINDOW, - XDESTROYWINDOW, - XUNMAP, - XMAP, - XMAPREQUEST, - XREPARENT, - XCONFIGURE, - XGRAVITY, - XRESIZEREQUEST, - XCONFIGUREREQUEST, - XCIRCULATE, - XCIRCULATEREQUEST, - XPROPERTY, - XSELECTIONCLEAR, - XSELECTIONREQUEST, - XSELECTION, - XCOLORMAP, - XCLIENT, - XMAPPING, - XERROR, - XKEYMAP, - XGENERIC, - XCOOKIE; - - static { - Layout layout = __union( - __member(4), - __member(XAnyEvent.SIZEOF, XAnyEvent.ALIGNOF), - __member(XKeyEvent.SIZEOF, XKeyEvent.ALIGNOF), - __member(XButtonEvent.SIZEOF, XButtonEvent.ALIGNOF), - __member(XMotionEvent.SIZEOF, XMotionEvent.ALIGNOF), - __member(XCrossingEvent.SIZEOF, XCrossingEvent.ALIGNOF), - __member(XFocusChangeEvent.SIZEOF, XFocusChangeEvent.ALIGNOF), - __member(XExposeEvent.SIZEOF, XExposeEvent.ALIGNOF), - __member(XGraphicsExposeEvent.SIZEOF, XGraphicsExposeEvent.ALIGNOF), - __member(XNoExposeEvent.SIZEOF, XNoExposeEvent.ALIGNOF), - __member(XVisibilityEvent.SIZEOF, XVisibilityEvent.ALIGNOF), - __member(XCreateWindowEvent.SIZEOF, XCreateWindowEvent.ALIGNOF), - __member(XDestroyWindowEvent.SIZEOF, XDestroyWindowEvent.ALIGNOF), - __member(XUnmapEvent.SIZEOF, XUnmapEvent.ALIGNOF), - __member(XMapEvent.SIZEOF, XMapEvent.ALIGNOF), - __member(XMapRequestEvent.SIZEOF, XMapRequestEvent.ALIGNOF), - __member(XReparentEvent.SIZEOF, XReparentEvent.ALIGNOF), - __member(XConfigureEvent.SIZEOF, XConfigureEvent.ALIGNOF), - __member(XGravityEvent.SIZEOF, XGravityEvent.ALIGNOF), - __member(XResizeRequestEvent.SIZEOF, XResizeRequestEvent.ALIGNOF), - __member(XConfigureRequestEvent.SIZEOF, XConfigureRequestEvent.ALIGNOF), - __member(XCirculateEvent.SIZEOF, XCirculateEvent.ALIGNOF), - __member(XCirculateRequestEvent.SIZEOF, XCirculateRequestEvent.ALIGNOF), - __member(XPropertyEvent.SIZEOF, XPropertyEvent.ALIGNOF), - __member(XSelectionClearEvent.SIZEOF, XSelectionClearEvent.ALIGNOF), - __member(XSelectionRequestEvent.SIZEOF, XSelectionRequestEvent.ALIGNOF), - __member(XSelectionEvent.SIZEOF, XSelectionEvent.ALIGNOF), - __member(XColormapEvent.SIZEOF, XColormapEvent.ALIGNOF), - __member(XClientMessageEvent.SIZEOF, XClientMessageEvent.ALIGNOF), - __member(XMappingEvent.SIZEOF, XMappingEvent.ALIGNOF), - __member(XErrorEvent.SIZEOF, XErrorEvent.ALIGNOF), - __member(XKeymapEvent.SIZEOF, XKeymapEvent.ALIGNOF), - __member(XGenericEvent.SIZEOF, XGenericEvent.ALIGNOF), - __member(XGenericEventCookie.SIZEOF, XGenericEventCookie.ALIGNOF), - __padding(24, CLONG_SIZE, true) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - XANY = layout.offsetof(1); - XKEY = layout.offsetof(2); - XBUTTON = layout.offsetof(3); - XMOTION = layout.offsetof(4); - XCROSSING = layout.offsetof(5); - XFOCUS = layout.offsetof(6); - XEXPOSE = layout.offsetof(7); - XGRAPHICSEXPOSE = layout.offsetof(8); - XNOEXPOSE = layout.offsetof(9); - XVISIBILITY = layout.offsetof(10); - XCREATEWINDOW = layout.offsetof(11); - XDESTROYWINDOW = layout.offsetof(12); - XUNMAP = layout.offsetof(13); - XMAP = layout.offsetof(14); - XMAPREQUEST = layout.offsetof(15); - XREPARENT = layout.offsetof(16); - XCONFIGURE = layout.offsetof(17); - XGRAVITY = layout.offsetof(18); - XRESIZEREQUEST = layout.offsetof(19); - XCONFIGUREREQUEST = layout.offsetof(20); - XCIRCULATE = layout.offsetof(21); - XCIRCULATEREQUEST = layout.offsetof(22); - XPROPERTY = layout.offsetof(23); - XSELECTIONCLEAR = layout.offsetof(24); - XSELECTIONREQUEST = layout.offsetof(25); - XSELECTION = layout.offsetof(26); - XCOLORMAP = layout.offsetof(27); - XCLIENT = layout.offsetof(28); - XMAPPING = layout.offsetof(29); - XERROR = layout.offsetof(30); - XKEYMAP = layout.offsetof(31); - XGENERIC = layout.offsetof(32); - XCOOKIE = layout.offsetof(33); - } - - protected XEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XEvent create(long address, @Nullable ByteBuffer container) { - return new XEvent(address, container); - } - - /** - * Creates a {@code XEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** @return a {@link XAnyEvent} view of the {@code xany} field. */ - public XAnyEvent xany() { return nxany(address()); } - /** @return a {@link XKeyEvent} view of the {@code xkey} field. */ - public XKeyEvent xkey() { return nxkey(address()); } - /** @return a {@link XButtonEvent} view of the {@code xbutton} field. */ - public XButtonEvent xbutton() { return nxbutton(address()); } - /** @return a {@link XMotionEvent} view of the {@code xmotion} field. */ - public XMotionEvent xmotion() { return nxmotion(address()); } - /** @return a {@link XCrossingEvent} view of the {@code xcrossing} field. */ - public XCrossingEvent xcrossing() { return nxcrossing(address()); } - /** @return a {@link XFocusChangeEvent} view of the {@code xfocus} field. */ - public XFocusChangeEvent xfocus() { return nxfocus(address()); } - /** @return a {@link XExposeEvent} view of the {@code xexpose} field. */ - public XExposeEvent xexpose() { return nxexpose(address()); } - /** @return a {@link XGraphicsExposeEvent} view of the {@code xgraphicsexpose} field. */ - public XGraphicsExposeEvent xgraphicsexpose() { return nxgraphicsexpose(address()); } - /** @return a {@link XNoExposeEvent} view of the {@code xnoexpose} field. */ - public XNoExposeEvent xnoexpose() { return nxnoexpose(address()); } - /** @return a {@link XVisibilityEvent} view of the {@code xvisibility} field. */ - public XVisibilityEvent xvisibility() { return nxvisibility(address()); } - /** @return a {@link XCreateWindowEvent} view of the {@code xcreatewindow} field. */ - public XCreateWindowEvent xcreatewindow() { return nxcreatewindow(address()); } - /** @return a {@link XDestroyWindowEvent} view of the {@code xdestroywindow} field. */ - public XDestroyWindowEvent xdestroywindow() { return nxdestroywindow(address()); } - /** @return a {@link XUnmapEvent} view of the {@code xunmap} field. */ - public XUnmapEvent xunmap() { return nxunmap(address()); } - /** @return a {@link XMapEvent} view of the {@code xmap} field. */ - public XMapEvent xmap() { return nxmap(address()); } - /** @return a {@link XMapRequestEvent} view of the {@code xmaprequest} field. */ - public XMapRequestEvent xmaprequest() { return nxmaprequest(address()); } - /** @return a {@link XReparentEvent} view of the {@code xreparent} field. */ - public XReparentEvent xreparent() { return nxreparent(address()); } - /** @return a {@link XConfigureEvent} view of the {@code xconfigure} field. */ - public XConfigureEvent xconfigure() { return nxconfigure(address()); } - /** @return a {@link XGravityEvent} view of the {@code xgravity} field. */ - public XGravityEvent xgravity() { return nxgravity(address()); } - /** @return a {@link XResizeRequestEvent} view of the {@code xresizerequest} field. */ - public XResizeRequestEvent xresizerequest() { return nxresizerequest(address()); } - /** @return a {@link XConfigureRequestEvent} view of the {@code xconfigurerequest} field. */ - public XConfigureRequestEvent xconfigurerequest() { return nxconfigurerequest(address()); } - /** @return a {@link XCirculateEvent} view of the {@code xcirculate} field. */ - public XCirculateEvent xcirculate() { return nxcirculate(address()); } - /** @return a {@link XCirculateRequestEvent} view of the {@code xcirculaterequest} field. */ - public XCirculateRequestEvent xcirculaterequest() { return nxcirculaterequest(address()); } - /** @return a {@link XPropertyEvent} view of the {@code xproperty} field. */ - public XPropertyEvent xproperty() { return nxproperty(address()); } - /** @return a {@link XSelectionClearEvent} view of the {@code xselectionclear} field. */ - public XSelectionClearEvent xselectionclear() { return nxselectionclear(address()); } - /** @return a {@link XSelectionRequestEvent} view of the {@code xselectionrequest} field. */ - public XSelectionRequestEvent xselectionrequest() { return nxselectionrequest(address()); } - /** @return a {@link XSelectionEvent} view of the {@code xselection} field. */ - public XSelectionEvent xselection() { return nxselection(address()); } - /** @return a {@link XColormapEvent} view of the {@code xcolormap} field. */ - public XColormapEvent xcolormap() { return nxcolormap(address()); } - /** @return a {@link XClientMessageEvent} view of the {@code xclient} field. */ - public XClientMessageEvent xclient() { return nxclient(address()); } - /** @return a {@link XMappingEvent} view of the {@code xmapping} field. */ - public XMappingEvent xmapping() { return nxmapping(address()); } - /** @return a {@link XErrorEvent} view of the {@code xerror} field. */ - public XErrorEvent xerror() { return nxerror(address()); } - /** @return a {@link XKeymapEvent} view of the {@code xkeymap} field. */ - public XKeymapEvent xkeymap() { return nxkeymap(address()); } - /** @return a {@link XGenericEvent} view of the {@code xgeneric} field. */ - public XGenericEvent xgeneric() { return nxgeneric(address()); } - /** @return a {@link XGenericEventCookie} view of the {@code xcookie} field. */ - public XGenericEventCookie xcookie() { return nxcookie(address()); } - - // ----------------------------------- - - /** Returns a new {@code XEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XEvent malloc() { - return new XEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XEvent calloc() { - return new XEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XEvent} instance allocated with {@link BufferUtils}. */ - public static XEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XEvent(memAddress(container), container); - } - - /** Returns a new {@code XEvent} instance for the specified memory address. */ - public static XEvent create(long address) { - return new XEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XEvent createSafe(long address) { - return address == NULL ? null : new XEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XEvent malloc(MemoryStack stack) { - return new XEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XEvent calloc(MemoryStack stack) { - return new XEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XEvent.TYPE); } - /** Unsafe version of {@link #xany}. */ - public static XAnyEvent nxany(long struct) { return XAnyEvent.create(struct + XEvent.XANY); } - /** Unsafe version of {@link #xkey}. */ - public static XKeyEvent nxkey(long struct) { return XKeyEvent.create(struct + XEvent.XKEY); } - /** Unsafe version of {@link #xbutton}. */ - public static XButtonEvent nxbutton(long struct) { return XButtonEvent.create(struct + XEvent.XBUTTON); } - /** Unsafe version of {@link #xmotion}. */ - public static XMotionEvent nxmotion(long struct) { return XMotionEvent.create(struct + XEvent.XMOTION); } - /** Unsafe version of {@link #xcrossing}. */ - public static XCrossingEvent nxcrossing(long struct) { return XCrossingEvent.create(struct + XEvent.XCROSSING); } - /** Unsafe version of {@link #xfocus}. */ - public static XFocusChangeEvent nxfocus(long struct) { return XFocusChangeEvent.create(struct + XEvent.XFOCUS); } - /** Unsafe version of {@link #xexpose}. */ - public static XExposeEvent nxexpose(long struct) { return XExposeEvent.create(struct + XEvent.XEXPOSE); } - /** Unsafe version of {@link #xgraphicsexpose}. */ - public static XGraphicsExposeEvent nxgraphicsexpose(long struct) { return XGraphicsExposeEvent.create(struct + XEvent.XGRAPHICSEXPOSE); } - /** Unsafe version of {@link #xnoexpose}. */ - public static XNoExposeEvent nxnoexpose(long struct) { return XNoExposeEvent.create(struct + XEvent.XNOEXPOSE); } - /** Unsafe version of {@link #xvisibility}. */ - public static XVisibilityEvent nxvisibility(long struct) { return XVisibilityEvent.create(struct + XEvent.XVISIBILITY); } - /** Unsafe version of {@link #xcreatewindow}. */ - public static XCreateWindowEvent nxcreatewindow(long struct) { return XCreateWindowEvent.create(struct + XEvent.XCREATEWINDOW); } - /** Unsafe version of {@link #xdestroywindow}. */ - public static XDestroyWindowEvent nxdestroywindow(long struct) { return XDestroyWindowEvent.create(struct + XEvent.XDESTROYWINDOW); } - /** Unsafe version of {@link #xunmap}. */ - public static XUnmapEvent nxunmap(long struct) { return XUnmapEvent.create(struct + XEvent.XUNMAP); } - /** Unsafe version of {@link #xmap}. */ - public static XMapEvent nxmap(long struct) { return XMapEvent.create(struct + XEvent.XMAP); } - /** Unsafe version of {@link #xmaprequest}. */ - public static XMapRequestEvent nxmaprequest(long struct) { return XMapRequestEvent.create(struct + XEvent.XMAPREQUEST); } - /** Unsafe version of {@link #xreparent}. */ - public static XReparentEvent nxreparent(long struct) { return XReparentEvent.create(struct + XEvent.XREPARENT); } - /** Unsafe version of {@link #xconfigure}. */ - public static XConfigureEvent nxconfigure(long struct) { return XConfigureEvent.create(struct + XEvent.XCONFIGURE); } - /** Unsafe version of {@link #xgravity}. */ - public static XGravityEvent nxgravity(long struct) { return XGravityEvent.create(struct + XEvent.XGRAVITY); } - /** Unsafe version of {@link #xresizerequest}. */ - public static XResizeRequestEvent nxresizerequest(long struct) { return XResizeRequestEvent.create(struct + XEvent.XRESIZEREQUEST); } - /** Unsafe version of {@link #xconfigurerequest}. */ - public static XConfigureRequestEvent nxconfigurerequest(long struct) { return XConfigureRequestEvent.create(struct + XEvent.XCONFIGUREREQUEST); } - /** Unsafe version of {@link #xcirculate}. */ - public static XCirculateEvent nxcirculate(long struct) { return XCirculateEvent.create(struct + XEvent.XCIRCULATE); } - /** Unsafe version of {@link #xcirculaterequest}. */ - public static XCirculateRequestEvent nxcirculaterequest(long struct) { return XCirculateRequestEvent.create(struct + XEvent.XCIRCULATEREQUEST); } - /** Unsafe version of {@link #xproperty}. */ - public static XPropertyEvent nxproperty(long struct) { return XPropertyEvent.create(struct + XEvent.XPROPERTY); } - /** Unsafe version of {@link #xselectionclear}. */ - public static XSelectionClearEvent nxselectionclear(long struct) { return XSelectionClearEvent.create(struct + XEvent.XSELECTIONCLEAR); } - /** Unsafe version of {@link #xselectionrequest}. */ - public static XSelectionRequestEvent nxselectionrequest(long struct) { return XSelectionRequestEvent.create(struct + XEvent.XSELECTIONREQUEST); } - /** Unsafe version of {@link #xselection}. */ - public static XSelectionEvent nxselection(long struct) { return XSelectionEvent.create(struct + XEvent.XSELECTION); } - /** Unsafe version of {@link #xcolormap}. */ - public static XColormapEvent nxcolormap(long struct) { return XColormapEvent.create(struct + XEvent.XCOLORMAP); } - /** Unsafe version of {@link #xclient}. */ - public static XClientMessageEvent nxclient(long struct) { return XClientMessageEvent.create(struct + XEvent.XCLIENT); } - /** Unsafe version of {@link #xmapping}. */ - public static XMappingEvent nxmapping(long struct) { return XMappingEvent.create(struct + XEvent.XMAPPING); } - /** Unsafe version of {@link #xerror}. */ - public static XErrorEvent nxerror(long struct) { return XErrorEvent.create(struct + XEvent.XERROR); } - /** Unsafe version of {@link #xkeymap}. */ - public static XKeymapEvent nxkeymap(long struct) { return XKeymapEvent.create(struct + XEvent.XKEYMAP); } - /** Unsafe version of {@link #xgeneric}. */ - public static XGenericEvent nxgeneric(long struct) { return XGenericEvent.create(struct + XEvent.XGENERIC); } - /** Unsafe version of {@link #xcookie}. */ - public static XGenericEventCookie nxcookie(long struct) { return XGenericEventCookie.create(struct + XEvent.XCOOKIE); } - - // ----------------------------------- - - /** An array of {@link XEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XEvent ELEMENT_FACTORY = XEvent.create(-1L); - - /** - * Creates a new {@code XEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XEvent.ntype(address()); } - /** @return a {@link XAnyEvent} view of the {@code xany} field. */ - public XAnyEvent xany() { return XEvent.nxany(address()); } - /** @return a {@link XKeyEvent} view of the {@code xkey} field. */ - public XKeyEvent xkey() { return XEvent.nxkey(address()); } - /** @return a {@link XButtonEvent} view of the {@code xbutton} field. */ - public XButtonEvent xbutton() { return XEvent.nxbutton(address()); } - /** @return a {@link XMotionEvent} view of the {@code xmotion} field. */ - public XMotionEvent xmotion() { return XEvent.nxmotion(address()); } - /** @return a {@link XCrossingEvent} view of the {@code xcrossing} field. */ - public XCrossingEvent xcrossing() { return XEvent.nxcrossing(address()); } - /** @return a {@link XFocusChangeEvent} view of the {@code xfocus} field. */ - public XFocusChangeEvent xfocus() { return XEvent.nxfocus(address()); } - /** @return a {@link XExposeEvent} view of the {@code xexpose} field. */ - public XExposeEvent xexpose() { return XEvent.nxexpose(address()); } - /** @return a {@link XGraphicsExposeEvent} view of the {@code xgraphicsexpose} field. */ - public XGraphicsExposeEvent xgraphicsexpose() { return XEvent.nxgraphicsexpose(address()); } - /** @return a {@link XNoExposeEvent} view of the {@code xnoexpose} field. */ - public XNoExposeEvent xnoexpose() { return XEvent.nxnoexpose(address()); } - /** @return a {@link XVisibilityEvent} view of the {@code xvisibility} field. */ - public XVisibilityEvent xvisibility() { return XEvent.nxvisibility(address()); } - /** @return a {@link XCreateWindowEvent} view of the {@code xcreatewindow} field. */ - public XCreateWindowEvent xcreatewindow() { return XEvent.nxcreatewindow(address()); } - /** @return a {@link XDestroyWindowEvent} view of the {@code xdestroywindow} field. */ - public XDestroyWindowEvent xdestroywindow() { return XEvent.nxdestroywindow(address()); } - /** @return a {@link XUnmapEvent} view of the {@code xunmap} field. */ - public XUnmapEvent xunmap() { return XEvent.nxunmap(address()); } - /** @return a {@link XMapEvent} view of the {@code xmap} field. */ - public XMapEvent xmap() { return XEvent.nxmap(address()); } - /** @return a {@link XMapRequestEvent} view of the {@code xmaprequest} field. */ - public XMapRequestEvent xmaprequest() { return XEvent.nxmaprequest(address()); } - /** @return a {@link XReparentEvent} view of the {@code xreparent} field. */ - public XReparentEvent xreparent() { return XEvent.nxreparent(address()); } - /** @return a {@link XConfigureEvent} view of the {@code xconfigure} field. */ - public XConfigureEvent xconfigure() { return XEvent.nxconfigure(address()); } - /** @return a {@link XGravityEvent} view of the {@code xgravity} field. */ - public XGravityEvent xgravity() { return XEvent.nxgravity(address()); } - /** @return a {@link XResizeRequestEvent} view of the {@code xresizerequest} field. */ - public XResizeRequestEvent xresizerequest() { return XEvent.nxresizerequest(address()); } - /** @return a {@link XConfigureRequestEvent} view of the {@code xconfigurerequest} field. */ - public XConfigureRequestEvent xconfigurerequest() { return XEvent.nxconfigurerequest(address()); } - /** @return a {@link XCirculateEvent} view of the {@code xcirculate} field. */ - public XCirculateEvent xcirculate() { return XEvent.nxcirculate(address()); } - /** @return a {@link XCirculateRequestEvent} view of the {@code xcirculaterequest} field. */ - public XCirculateRequestEvent xcirculaterequest() { return XEvent.nxcirculaterequest(address()); } - /** @return a {@link XPropertyEvent} view of the {@code xproperty} field. */ - public XPropertyEvent xproperty() { return XEvent.nxproperty(address()); } - /** @return a {@link XSelectionClearEvent} view of the {@code xselectionclear} field. */ - public XSelectionClearEvent xselectionclear() { return XEvent.nxselectionclear(address()); } - /** @return a {@link XSelectionRequestEvent} view of the {@code xselectionrequest} field. */ - public XSelectionRequestEvent xselectionrequest() { return XEvent.nxselectionrequest(address()); } - /** @return a {@link XSelectionEvent} view of the {@code xselection} field. */ - public XSelectionEvent xselection() { return XEvent.nxselection(address()); } - /** @return a {@link XColormapEvent} view of the {@code xcolormap} field. */ - public XColormapEvent xcolormap() { return XEvent.nxcolormap(address()); } - /** @return a {@link XClientMessageEvent} view of the {@code xclient} field. */ - public XClientMessageEvent xclient() { return XEvent.nxclient(address()); } - /** @return a {@link XMappingEvent} view of the {@code xmapping} field. */ - public XMappingEvent xmapping() { return XEvent.nxmapping(address()); } - /** @return a {@link XErrorEvent} view of the {@code xerror} field. */ - public XErrorEvent xerror() { return XEvent.nxerror(address()); } - /** @return a {@link XKeymapEvent} view of the {@code xkeymap} field. */ - public XKeymapEvent xkeymap() { return XEvent.nxkeymap(address()); } - /** @return a {@link XGenericEvent} view of the {@code xgeneric} field. */ - public XGenericEvent xgeneric() { return XEvent.nxgeneric(address()); } - /** @return a {@link XGenericEventCookie} view of the {@code xcookie} field. */ - public XGenericEventCookie xcookie() { return XEvent.nxcookie(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XExposeEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XExposeEvent.java deleted file mode 100644 index d1a258c7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XExposeEvent.java +++ /dev/null @@ -1,462 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XExposeEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     int x;
    - *     int y;
    - *     int width;
    - *     int height;
    - *     int {@link #count};
    - * }
    - */ -public class XExposeEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - X, - Y, - WIDTH, - HEIGHT, - COUNT; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - X = layout.offsetof(5); - Y = layout.offsetof(6); - WIDTH = layout.offsetof(7); - HEIGHT = layout.offsetof(8); - COUNT = layout.offsetof(9); - } - - protected XExposeEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XExposeEvent create(long address, @Nullable ByteBuffer container) { - return new XExposeEvent(address, container); - } - - /** - * Creates a {@code XExposeEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XExposeEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return nheight(address()); } - /** if non-zero, at least this many more */ - public int count() { return ncount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XExposeEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XExposeEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XExposeEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XExposeEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XExposeEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public XExposeEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XExposeEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public XExposeEvent width(int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XExposeEvent height(int value) { nheight(address(), value); return this; } - /** Sets the specified value to the {@link #count} field. */ - public XExposeEvent count(int value) { ncount(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XExposeEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - int x, - int y, - int width, - int height, - int count - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - x(x); - y(y); - width(width); - height(height); - count(count); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XExposeEvent set(XExposeEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XExposeEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XExposeEvent malloc() { - return new XExposeEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XExposeEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XExposeEvent calloc() { - return new XExposeEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XExposeEvent} instance allocated with {@link BufferUtils}. */ - public static XExposeEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XExposeEvent(memAddress(container), container); - } - - /** Returns a new {@code XExposeEvent} instance for the specified memory address. */ - public static XExposeEvent create(long address) { - return new XExposeEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XExposeEvent createSafe(long address) { - return address == NULL ? null : new XExposeEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XExposeEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XExposeEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XExposeEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XExposeEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XExposeEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XExposeEvent malloc(MemoryStack stack) { - return new XExposeEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XExposeEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XExposeEvent calloc(MemoryStack stack) { - return new XExposeEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XExposeEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XExposeEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XExposeEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XExposeEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XExposeEvent.WINDOW); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XExposeEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XExposeEvent.Y); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XExposeEvent.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XExposeEvent.HEIGHT); } - /** Unsafe version of {@link #count}. */ - public static int ncount(long struct) { return UNSAFE.getInt(null, struct + XExposeEvent.COUNT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XExposeEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XExposeEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XExposeEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XExposeEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XExposeEvent.WINDOW, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XExposeEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XExposeEvent.Y, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XExposeEvent.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XExposeEvent.HEIGHT, value); } - /** Unsafe version of {@link #count(int) count}. */ - public static void ncount(long struct, int value) { UNSAFE.putInt(null, struct + XExposeEvent.COUNT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XExposeEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XExposeEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XExposeEvent ELEMENT_FACTORY = XExposeEvent.create(-1L); - - /** - * Creates a new {@code XExposeEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XExposeEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XExposeEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XExposeEvent.ntype(address()); } - /** @return the value of the {@link XExposeEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XExposeEvent.nserial(address()); } - /** @return the value of the {@link XExposeEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XExposeEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XExposeEvent#display} field. */ - @NativeType("Display *") - public long display() { return XExposeEvent.ndisplay(address()); } - /** @return the value of the {@link XExposeEvent#window} field. */ - @NativeType("Window") - public long window() { return XExposeEvent.nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return XExposeEvent.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return XExposeEvent.ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return XExposeEvent.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return XExposeEvent.nheight(address()); } - /** @return the value of the {@link XExposeEvent#count} field. */ - public int count() { return XExposeEvent.ncount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XExposeEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XExposeEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XExposeEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XExposeEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XExposeEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XExposeEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XExposeEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XExposeEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XExposeEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { XExposeEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { XExposeEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(int value) { XExposeEvent.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(int value) { XExposeEvent.nheight(address(), value); return this; } - /** Sets the specified value to the {@link XExposeEvent#count} field. */ - public Buffer count(int value) { XExposeEvent.ncount(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XFocusChangeEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XFocusChangeEvent.java deleted file mode 100644 index be23f15d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XFocusChangeEvent.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XFocusChangeEvent {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     int {@link #mode};
    - *     int {@link #detail};
    - * }
    - */ -public class XFocusChangeEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - MODE, - DETAIL; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - MODE = layout.offsetof(5); - DETAIL = layout.offsetof(6); - } - - protected XFocusChangeEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XFocusChangeEvent create(long address, @Nullable ByteBuffer container) { - return new XFocusChangeEvent(address, container); - } - - /** - * Creates a {@code XFocusChangeEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XFocusChangeEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** one of:
    {@link X11#FocusIn}{@link X11#FocusOut}
    */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** one of:
    {@link X11#NotifyNormal}{@link X11#NotifyWhileGrabbed}{@link X11#NotifyGrab}{@link X11#NotifyUngrab}
    */ - public int mode() { return nmode(address()); } - /** one of:
    {@link X11#NotifyAncestor}{@link X11#NotifyVirtual}{@link X11#NotifyInferior}{@link X11#NotifyNonlinear}{@link X11#NotifyNonlinearVirtual}
    {@link X11#NotifyPointer}{@link X11#NotifyPointerRoot}{@link X11#NotifyDetailNone}
    */ - public int detail() { return ndetail(address()); } - - /** Sets the specified value to the {@link #type} field. */ - public XFocusChangeEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XFocusChangeEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XFocusChangeEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XFocusChangeEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XFocusChangeEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #mode} field. */ - public XFocusChangeEvent mode(int value) { nmode(address(), value); return this; } - /** Sets the specified value to the {@link #detail} field. */ - public XFocusChangeEvent detail(int value) { ndetail(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XFocusChangeEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - int mode, - int detail - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - mode(mode); - detail(detail); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XFocusChangeEvent set(XFocusChangeEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XFocusChangeEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XFocusChangeEvent malloc() { - return new XFocusChangeEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XFocusChangeEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XFocusChangeEvent calloc() { - return new XFocusChangeEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XFocusChangeEvent} instance allocated with {@link BufferUtils}. */ - public static XFocusChangeEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XFocusChangeEvent(memAddress(container), container); - } - - /** Returns a new {@code XFocusChangeEvent} instance for the specified memory address. */ - public static XFocusChangeEvent create(long address) { - return new XFocusChangeEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XFocusChangeEvent createSafe(long address) { - return address == NULL ? null : new XFocusChangeEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XFocusChangeEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XFocusChangeEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XFocusChangeEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XFocusChangeEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XFocusChangeEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XFocusChangeEvent malloc(MemoryStack stack) { - return new XFocusChangeEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XFocusChangeEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XFocusChangeEvent calloc(MemoryStack stack) { - return new XFocusChangeEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XFocusChangeEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XFocusChangeEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XFocusChangeEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XFocusChangeEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XFocusChangeEvent.WINDOW); } - /** Unsafe version of {@link #mode}. */ - public static int nmode(long struct) { return UNSAFE.getInt(null, struct + XFocusChangeEvent.MODE); } - /** Unsafe version of {@link #detail}. */ - public static int ndetail(long struct) { return UNSAFE.getInt(null, struct + XFocusChangeEvent.DETAIL); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XFocusChangeEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XFocusChangeEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XFocusChangeEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XFocusChangeEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XFocusChangeEvent.WINDOW, value); } - /** Unsafe version of {@link #mode(int) mode}. */ - public static void nmode(long struct, int value) { UNSAFE.putInt(null, struct + XFocusChangeEvent.MODE, value); } - /** Unsafe version of {@link #detail(int) detail}. */ - public static void ndetail(long struct, int value) { UNSAFE.putInt(null, struct + XFocusChangeEvent.DETAIL, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XFocusChangeEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XFocusChangeEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XFocusChangeEvent ELEMENT_FACTORY = XFocusChangeEvent.create(-1L); - - /** - * Creates a new {@code XFocusChangeEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XFocusChangeEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XFocusChangeEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XFocusChangeEvent#type} field. */ - public int type() { return XFocusChangeEvent.ntype(address()); } - /** @return the value of the {@link XFocusChangeEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XFocusChangeEvent.nserial(address()); } - /** @return the value of the {@link XFocusChangeEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XFocusChangeEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XFocusChangeEvent#display} field. */ - @NativeType("Display *") - public long display() { return XFocusChangeEvent.ndisplay(address()); } - /** @return the value of the {@link XFocusChangeEvent#window} field. */ - @NativeType("Window") - public long window() { return XFocusChangeEvent.nwindow(address()); } - /** @return the value of the {@link XFocusChangeEvent#mode} field. */ - public int mode() { return XFocusChangeEvent.nmode(address()); } - /** @return the value of the {@link XFocusChangeEvent#detail} field. */ - public int detail() { return XFocusChangeEvent.ndetail(address()); } - - /** Sets the specified value to the {@link XFocusChangeEvent#type} field. */ - public Buffer type(int value) { XFocusChangeEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XFocusChangeEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XFocusChangeEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XFocusChangeEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XFocusChangeEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XFocusChangeEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XFocusChangeEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XFocusChangeEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XFocusChangeEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XFocusChangeEvent#mode} field. */ - public Buffer mode(int value) { XFocusChangeEvent.nmode(address(), value); return this; } - /** Sets the specified value to the {@link XFocusChangeEvent#detail} field. */ - public Buffer detail(int value) { XFocusChangeEvent.ndetail(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XGenericEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XGenericEvent.java deleted file mode 100644 index 06c53385..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XGenericEvent.java +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * GenericEvent. This event is the standard event for all newer extensions. - * - *

    Layout

    - * - *
    
    - * struct XGenericEvent {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     int {@link #extension};
    - *     int {@link #evtype};
    - * }
    - */ -public class XGenericEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EXTENSION, - EVTYPE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EXTENSION = layout.offsetof(4); - EVTYPE = layout.offsetof(5); - } - - protected XGenericEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XGenericEvent create(long address, @Nullable ByteBuffer container) { - return new XGenericEvent(address, container); - } - - /** - * Creates a {@code XGenericEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XGenericEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** of event. Must be:
    {@link X11#GenericEvent}
    */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** major opcode of extension that caused the event */ - public int extension() { return nextension(address()); } - /** actual event type */ - public int evtype() { return nevtype(address()); } - - /** Sets the specified value to the {@link #type} field. */ - public XGenericEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XGenericEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XGenericEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XGenericEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #extension} field. */ - public XGenericEvent extension(int value) { nextension(address(), value); return this; } - /** Sets the specified value to the {@link #evtype} field. */ - public XGenericEvent evtype(int value) { nevtype(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XGenericEvent set( - int type, - long serial, - boolean send_event, - long display, - int extension, - int evtype - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - extension(extension); - evtype(evtype); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XGenericEvent set(XGenericEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XGenericEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XGenericEvent malloc() { - return new XGenericEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XGenericEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XGenericEvent calloc() { - return new XGenericEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XGenericEvent} instance allocated with {@link BufferUtils}. */ - public static XGenericEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XGenericEvent(memAddress(container), container); - } - - /** Returns a new {@code XGenericEvent} instance for the specified memory address. */ - public static XGenericEvent create(long address) { - return new XGenericEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XGenericEvent createSafe(long address) { - return address == NULL ? null : new XGenericEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XGenericEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XGenericEvent malloc(MemoryStack stack) { - return new XGenericEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XGenericEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XGenericEvent calloc(MemoryStack stack) { - return new XGenericEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XGenericEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XGenericEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XGenericEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XGenericEvent.DISPLAY); } - /** Unsafe version of {@link #extension}. */ - public static int nextension(long struct) { return UNSAFE.getInt(null, struct + XGenericEvent.EXTENSION); } - /** Unsafe version of {@link #evtype}. */ - public static int nevtype(long struct) { return UNSAFE.getInt(null, struct + XGenericEvent.EVTYPE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XGenericEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XGenericEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #extension(int) extension}. */ - public static void nextension(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEvent.EXTENSION, value); } - /** Unsafe version of {@link #evtype(int) evtype}. */ - public static void nevtype(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEvent.EVTYPE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XGenericEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XGenericEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XGenericEvent ELEMENT_FACTORY = XGenericEvent.create(-1L); - - /** - * Creates a new {@code XGenericEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XGenericEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XGenericEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XGenericEvent#type} field. */ - public int type() { return XGenericEvent.ntype(address()); } - /** @return the value of the {@link XGenericEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XGenericEvent.nserial(address()); } - /** @return the value of the {@link XGenericEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XGenericEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XGenericEvent#display} field. */ - @NativeType("Display *") - public long display() { return XGenericEvent.ndisplay(address()); } - /** @return the value of the {@link XGenericEvent#extension} field. */ - public int extension() { return XGenericEvent.nextension(address()); } - /** @return the value of the {@link XGenericEvent#evtype} field. */ - public int evtype() { return XGenericEvent.nevtype(address()); } - - /** Sets the specified value to the {@link XGenericEvent#type} field. */ - public Buffer type(int value) { XGenericEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XGenericEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XGenericEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XGenericEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XGenericEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEvent#extension} field. */ - public Buffer extension(int value) { XGenericEvent.nextension(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEvent#evtype} field. */ - public Buffer evtype(int value) { XGenericEvent.nevtype(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XGenericEventCookie.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XGenericEventCookie.java deleted file mode 100644 index 01ea98e2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XGenericEventCookie.java +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Additional information for an {@code XGenericEvent}. - * - *

    Layout

    - * - *
    
    - * struct XGenericEventCookie {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     int {@link #extension};
    - *     int {@link #evtype};
    - *     unsigned int cookie;
    - *     void * data;
    - * }
    - */ -public class XGenericEventCookie extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EXTENSION, - EVTYPE, - COOKIE, - DATA; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EXTENSION = layout.offsetof(4); - EVTYPE = layout.offsetof(5); - COOKIE = layout.offsetof(6); - DATA = layout.offsetof(7); - } - - protected XGenericEventCookie(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XGenericEventCookie create(long address, @Nullable ByteBuffer container) { - return new XGenericEventCookie(address, container); - } - - /** - * Creates a {@code XGenericEventCookie} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XGenericEventCookie(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** of event. Must be:
    {@link X11#GenericEvent}
    */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** major opcode of extension that caused the event */ - public int extension() { return nextension(address()); } - /** actual event type */ - public int evtype() { return nevtype(address()); } - /** @return the value of the {@code cookie} field. */ - @NativeType("unsigned int") - public int cookie() { return ncookie(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code data} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("void *") - public ByteBuffer data(int capacity) { return ndata(address(), capacity); } - - /** Sets the specified value to the {@link #type} field. */ - public XGenericEventCookie type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XGenericEventCookie serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XGenericEventCookie send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XGenericEventCookie display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #extension} field. */ - public XGenericEventCookie extension(int value) { nextension(address(), value); return this; } - /** Sets the specified value to the {@link #evtype} field. */ - public XGenericEventCookie evtype(int value) { nevtype(address(), value); return this; } - /** Sets the specified value to the {@code cookie} field. */ - public XGenericEventCookie cookie(@NativeType("unsigned int") int value) { ncookie(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code data} field. */ - public XGenericEventCookie data(@NativeType("void *") ByteBuffer value) { ndata(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XGenericEventCookie set( - int type, - long serial, - boolean send_event, - long display, - int extension, - int evtype, - int cookie, - ByteBuffer data - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - extension(extension); - evtype(evtype); - cookie(cookie); - data(data); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XGenericEventCookie set(XGenericEventCookie src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XGenericEventCookie} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XGenericEventCookie malloc() { - return new XGenericEventCookie(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XGenericEventCookie} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XGenericEventCookie calloc() { - return new XGenericEventCookie(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XGenericEventCookie} instance allocated with {@link BufferUtils}. */ - public static XGenericEventCookie create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XGenericEventCookie(memAddress(container), container); - } - - /** Returns a new {@code XGenericEventCookie} instance for the specified memory address. */ - public static XGenericEventCookie create(long address) { - return new XGenericEventCookie(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XGenericEventCookie createSafe(long address) { - return address == NULL ? null : new XGenericEventCookie(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEventCookie mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEventCookie callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEventCookie mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGenericEventCookie callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XGenericEventCookie} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XGenericEventCookie malloc(MemoryStack stack) { - return new XGenericEventCookie(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XGenericEventCookie} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XGenericEventCookie calloc(MemoryStack stack) { - return new XGenericEventCookie(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XGenericEventCookie.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XGenericEventCookie.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XGenericEventCookie.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XGenericEventCookie.DISPLAY); } - /** Unsafe version of {@link #extension}. */ - public static int nextension(long struct) { return UNSAFE.getInt(null, struct + XGenericEventCookie.EXTENSION); } - /** Unsafe version of {@link #evtype}. */ - public static int nevtype(long struct) { return UNSAFE.getInt(null, struct + XGenericEventCookie.EVTYPE); } - /** Unsafe version of {@link #cookie}. */ - public static int ncookie(long struct) { return UNSAFE.getInt(null, struct + XGenericEventCookie.COOKIE); } - /** Unsafe version of {@link #data(int) data}. */ - public static ByteBuffer ndata(long struct, int capacity) { return memByteBuffer(memGetAddress(struct + XGenericEventCookie.DATA), capacity); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEventCookie.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XGenericEventCookie.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEventCookie.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XGenericEventCookie.DISPLAY, check(value)); } - /** Unsafe version of {@link #extension(int) extension}. */ - public static void nextension(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEventCookie.EXTENSION, value); } - /** Unsafe version of {@link #evtype(int) evtype}. */ - public static void nevtype(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEventCookie.EVTYPE, value); } - /** Unsafe version of {@link #cookie(int) cookie}. */ - public static void ncookie(long struct, int value) { UNSAFE.putInt(null, struct + XGenericEventCookie.COOKIE, value); } - /** Unsafe version of {@link #data(ByteBuffer) data}. */ - public static void ndata(long struct, ByteBuffer value) { memPutAddress(struct + XGenericEventCookie.DATA, memAddress(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XGenericEventCookie.DISPLAY)); - check(memGetAddress(struct + XGenericEventCookie.DATA)); - } - - // ----------------------------------- - - /** An array of {@link XGenericEventCookie} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XGenericEventCookie ELEMENT_FACTORY = XGenericEventCookie.create(-1L); - - /** - * Creates a new {@code XGenericEventCookie.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XGenericEventCookie#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XGenericEventCookie getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XGenericEventCookie#type} field. */ - public int type() { return XGenericEventCookie.ntype(address()); } - /** @return the value of the {@link XGenericEventCookie#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XGenericEventCookie.nserial(address()); } - /** @return the value of the {@link XGenericEventCookie#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XGenericEventCookie.nsend_event(address()) != 0; } - /** @return the value of the {@link XGenericEventCookie#display} field. */ - @NativeType("Display *") - public long display() { return XGenericEventCookie.ndisplay(address()); } - /** @return the value of the {@link XGenericEventCookie#extension} field. */ - public int extension() { return XGenericEventCookie.nextension(address()); } - /** @return the value of the {@link XGenericEventCookie#evtype} field. */ - public int evtype() { return XGenericEventCookie.nevtype(address()); } - /** @return the value of the {@code cookie} field. */ - @NativeType("unsigned int") - public int cookie() { return XGenericEventCookie.ncookie(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code data} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("void *") - public ByteBuffer data(int capacity) { return XGenericEventCookie.ndata(address(), capacity); } - - /** Sets the specified value to the {@link XGenericEventCookie#type} field. */ - public Buffer type(int value) { XGenericEventCookie.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEventCookie#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XGenericEventCookie.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEventCookie#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XGenericEventCookie.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XGenericEventCookie#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XGenericEventCookie.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEventCookie#extension} field. */ - public Buffer extension(int value) { XGenericEventCookie.nextension(address(), value); return this; } - /** Sets the specified value to the {@link XGenericEventCookie#evtype} field. */ - public Buffer evtype(int value) { XGenericEventCookie.nevtype(address(), value); return this; } - /** Sets the specified value to the {@code cookie} field. */ - public Buffer cookie(@NativeType("unsigned int") int value) { XGenericEventCookie.ncookie(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code data} field. */ - public Buffer data(@NativeType("void *") ByteBuffer value) { XGenericEventCookie.ndata(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XGraphicsExposeEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XGraphicsExposeEvent.java deleted file mode 100644 index cde4de66..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XGraphicsExposeEvent.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XGraphicsExposeEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Drawable drawable;
    - *     int x;
    - *     int y;
    - *     int width;
    - *     int height;
    - *     int {@link #count};
    - *     int {@link #major_code};
    - *     int {@link #minor_code};
    - * }
    - */ -public class XGraphicsExposeEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - DRAWABLE, - X, - Y, - WIDTH, - HEIGHT, - COUNT, - MAJOR_CODE, - MINOR_CODE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - DRAWABLE = layout.offsetof(4); - X = layout.offsetof(5); - Y = layout.offsetof(6); - WIDTH = layout.offsetof(7); - HEIGHT = layout.offsetof(8); - COUNT = layout.offsetof(9); - MAJOR_CODE = layout.offsetof(10); - MINOR_CODE = layout.offsetof(11); - } - - protected XGraphicsExposeEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XGraphicsExposeEvent create(long address, @Nullable ByteBuffer container) { - return new XGraphicsExposeEvent(address, container); - } - - /** - * Creates a {@code XGraphicsExposeEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XGraphicsExposeEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code drawable} field. */ - @NativeType("Drawable") - public long drawable() { return ndrawable(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return nheight(address()); } - /** if non-zero, at least this many more */ - public int count() { return ncount(address()); } - /** core is {@code CopyArea} or {@code CopyPlane} */ - public int major_code() { return nmajor_code(address()); } - /** not defined in the core */ - public int minor_code() { return nminor_code(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XGraphicsExposeEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XGraphicsExposeEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XGraphicsExposeEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XGraphicsExposeEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code drawable} field. */ - public XGraphicsExposeEvent drawable(@NativeType("Drawable") long value) { ndrawable(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public XGraphicsExposeEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XGraphicsExposeEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public XGraphicsExposeEvent width(int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XGraphicsExposeEvent height(int value) { nheight(address(), value); return this; } - /** Sets the specified value to the {@link #count} field. */ - public XGraphicsExposeEvent count(int value) { ncount(address(), value); return this; } - /** Sets the specified value to the {@link #major_code} field. */ - public XGraphicsExposeEvent major_code(int value) { nmajor_code(address(), value); return this; } - /** Sets the specified value to the {@link #minor_code} field. */ - public XGraphicsExposeEvent minor_code(int value) { nminor_code(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XGraphicsExposeEvent set( - int type, - long serial, - boolean send_event, - long display, - long drawable, - int x, - int y, - int width, - int height, - int count, - int major_code, - int minor_code - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - drawable(drawable); - x(x); - y(y); - width(width); - height(height); - count(count); - major_code(major_code); - minor_code(minor_code); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XGraphicsExposeEvent set(XGraphicsExposeEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XGraphicsExposeEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XGraphicsExposeEvent malloc() { - return new XGraphicsExposeEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XGraphicsExposeEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XGraphicsExposeEvent calloc() { - return new XGraphicsExposeEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XGraphicsExposeEvent} instance allocated with {@link BufferUtils}. */ - public static XGraphicsExposeEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XGraphicsExposeEvent(memAddress(container), container); - } - - /** Returns a new {@code XGraphicsExposeEvent} instance for the specified memory address. */ - public static XGraphicsExposeEvent create(long address) { - return new XGraphicsExposeEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XGraphicsExposeEvent createSafe(long address) { - return address == NULL ? null : new XGraphicsExposeEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGraphicsExposeEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGraphicsExposeEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGraphicsExposeEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGraphicsExposeEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XGraphicsExposeEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XGraphicsExposeEvent malloc(MemoryStack stack) { - return new XGraphicsExposeEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XGraphicsExposeEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XGraphicsExposeEvent calloc(MemoryStack stack) { - return new XGraphicsExposeEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XGraphicsExposeEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XGraphicsExposeEvent.DISPLAY); } - /** Unsafe version of {@link #drawable}. */ - public static long ndrawable(long struct) { return memGetCLong(struct + XGraphicsExposeEvent.DRAWABLE); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.Y); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.HEIGHT); } - /** Unsafe version of {@link #count}. */ - public static int ncount(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.COUNT); } - /** Unsafe version of {@link #major_code}. */ - public static int nmajor_code(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.MAJOR_CODE); } - /** Unsafe version of {@link #minor_code}. */ - public static int nminor_code(long struct) { return UNSAFE.getInt(null, struct + XGraphicsExposeEvent.MINOR_CODE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XGraphicsExposeEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XGraphicsExposeEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #drawable(long) drawable}. */ - public static void ndrawable(long struct, long value) { memPutCLong(struct + XGraphicsExposeEvent.DRAWABLE, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.Y, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.HEIGHT, value); } - /** Unsafe version of {@link #count(int) count}. */ - public static void ncount(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.COUNT, value); } - /** Unsafe version of {@link #major_code(int) major_code}. */ - public static void nmajor_code(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.MAJOR_CODE, value); } - /** Unsafe version of {@link #minor_code(int) minor_code}. */ - public static void nminor_code(long struct, int value) { UNSAFE.putInt(null, struct + XGraphicsExposeEvent.MINOR_CODE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XGraphicsExposeEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XGraphicsExposeEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XGraphicsExposeEvent ELEMENT_FACTORY = XGraphicsExposeEvent.create(-1L); - - /** - * Creates a new {@code XGraphicsExposeEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XGraphicsExposeEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XGraphicsExposeEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XGraphicsExposeEvent.ntype(address()); } - /** @return the value of the {@link XGraphicsExposeEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XGraphicsExposeEvent.nserial(address()); } - /** @return the value of the {@link XGraphicsExposeEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XGraphicsExposeEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XGraphicsExposeEvent#display} field. */ - @NativeType("Display *") - public long display() { return XGraphicsExposeEvent.ndisplay(address()); } - /** @return the value of the {@code drawable} field. */ - @NativeType("Drawable") - public long drawable() { return XGraphicsExposeEvent.ndrawable(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return XGraphicsExposeEvent.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return XGraphicsExposeEvent.ny(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return XGraphicsExposeEvent.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return XGraphicsExposeEvent.nheight(address()); } - /** @return the value of the {@link XGraphicsExposeEvent#count} field. */ - public int count() { return XGraphicsExposeEvent.ncount(address()); } - /** @return the value of the {@link XGraphicsExposeEvent#major_code} field. */ - public int major_code() { return XGraphicsExposeEvent.nmajor_code(address()); } - /** @return the value of the {@link XGraphicsExposeEvent#minor_code} field. */ - public int minor_code() { return XGraphicsExposeEvent.nminor_code(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XGraphicsExposeEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XGraphicsExposeEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XGraphicsExposeEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XGraphicsExposeEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XGraphicsExposeEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XGraphicsExposeEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XGraphicsExposeEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code drawable} field. */ - public Buffer drawable(@NativeType("Drawable") long value) { XGraphicsExposeEvent.ndrawable(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { XGraphicsExposeEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { XGraphicsExposeEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(int value) { XGraphicsExposeEvent.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(int value) { XGraphicsExposeEvent.nheight(address(), value); return this; } - /** Sets the specified value to the {@link XGraphicsExposeEvent#count} field. */ - public Buffer count(int value) { XGraphicsExposeEvent.ncount(address(), value); return this; } - /** Sets the specified value to the {@link XGraphicsExposeEvent#major_code} field. */ - public Buffer major_code(int value) { XGraphicsExposeEvent.nmajor_code(address(), value); return this; } - /** Sets the specified value to the {@link XGraphicsExposeEvent#minor_code} field. */ - public Buffer minor_code(int value) { XGraphicsExposeEvent.nminor_code(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XGravityEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XGravityEvent.java deleted file mode 100644 index 65e05eb4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XGravityEvent.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XGravityEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window event;
    - *     Window window;
    - *     int x;
    - *     int y;
    - * }
    - */ -public class XGravityEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EVENT, - WINDOW, - X, - Y; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EVENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - X = layout.offsetof(6); - Y = layout.offsetof(7); - } - - protected XGravityEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XGravityEvent create(long address, @Nullable ByteBuffer container) { - return new XGravityEvent(address, container); - } - - /** - * Creates a {@code XGravityEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XGravityEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XGravityEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XGravityEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XGravityEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XGravityEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public XGravityEvent event(@NativeType("Window") long value) { nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XGravityEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public XGravityEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XGravityEvent y(int value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XGravityEvent set( - int type, - long serial, - boolean send_event, - long display, - long event, - long window, - int x, - int y - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - event(event); - window(window); - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XGravityEvent set(XGravityEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XGravityEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XGravityEvent malloc() { - return new XGravityEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XGravityEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XGravityEvent calloc() { - return new XGravityEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XGravityEvent} instance allocated with {@link BufferUtils}. */ - public static XGravityEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XGravityEvent(memAddress(container), container); - } - - /** Returns a new {@code XGravityEvent} instance for the specified memory address. */ - public static XGravityEvent create(long address) { - return new XGravityEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XGravityEvent createSafe(long address) { - return address == NULL ? null : new XGravityEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGravityEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGravityEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XGravityEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XGravityEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XGravityEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XGravityEvent malloc(MemoryStack stack) { - return new XGravityEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XGravityEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XGravityEvent calloc(MemoryStack stack) { - return new XGravityEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XGravityEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XGravityEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XGravityEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XGravityEvent.DISPLAY); } - /** Unsafe version of {@link #event}. */ - public static long nevent(long struct) { return memGetCLong(struct + XGravityEvent.EVENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XGravityEvent.WINDOW); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XGravityEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XGravityEvent.Y); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XGravityEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XGravityEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XGravityEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XGravityEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #event(long) event}. */ - public static void nevent(long struct, long value) { memPutCLong(struct + XGravityEvent.EVENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XGravityEvent.WINDOW, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XGravityEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XGravityEvent.Y, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XGravityEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XGravityEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XGravityEvent ELEMENT_FACTORY = XGravityEvent.create(-1L); - - /** - * Creates a new {@code XGravityEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XGravityEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XGravityEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XGravityEvent.ntype(address()); } - /** @return the value of the {@link XGravityEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XGravityEvent.nserial(address()); } - /** @return the value of the {@link XGravityEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XGravityEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XGravityEvent#display} field. */ - @NativeType("Display *") - public long display() { return XGravityEvent.ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return XGravityEvent.nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XGravityEvent.nwindow(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return XGravityEvent.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return XGravityEvent.ny(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XGravityEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XGravityEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XGravityEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XGravityEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XGravityEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XGravityEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XGravityEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public Buffer event(@NativeType("Window") long value) { XGravityEvent.nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XGravityEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { XGravityEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { XGravityEvent.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XKeyEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XKeyEvent.java deleted file mode 100644 index a79b5dff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XKeyEvent.java +++ /dev/null @@ -1,566 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Key event. - * - *

    Layout

    - * - *
    
    - * struct XKeyEvent {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Window {@link #root};
    - *     Window {@link #subwindow};
    - *     Time {@link #time};
    - *     int {@link #x};
    - *     int {@link #y};
    - *     int {@link #x_root};
    - *     int {@link #y_root};
    - *     unsigned int {@link #state};
    - *     unsigned int {@link #keycode};
    - *     Bool {@link #same_screen};
    - * }
    - */ -public class XKeyEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - ROOT, - SUBWINDOW, - TIME, - X, - Y, - X_ROOT, - Y_ROOT, - STATE, - KEYCODE, - SAME_SCREEN; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - ROOT = layout.offsetof(5); - SUBWINDOW = layout.offsetof(6); - TIME = layout.offsetof(7); - X = layout.offsetof(8); - Y = layout.offsetof(9); - X_ROOT = layout.offsetof(10); - Y_ROOT = layout.offsetof(11); - STATE = layout.offsetof(12); - KEYCODE = layout.offsetof(13); - SAME_SCREEN = layout.offsetof(14); - } - - protected XKeyEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XKeyEvent create(long address, @Nullable ByteBuffer container) { - return new XKeyEvent(address, container); - } - - /** - * Creates a {@code XKeyEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XKeyEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the event type. One of:
    {@link X11#KeyPress}{@link X11#KeyRelease}
    */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** root window that the event occurred on */ - @NativeType("Window") - public long root() { return nroot(address()); } - /** child window */ - @NativeType("Window") - public long subwindow() { return nsubwindow(address()); } - /** milliseconds */ - @NativeType("Time") - public long time() { return ntime(address()); } - /** pointer x coordinate in event window */ - public int x() { return nx(address()); } - /** pointer y coordinate in event window */ - public int y() { return ny(address()); } - /** x coordinate relative to {@code root} */ - public int x_root() { return nx_root(address()); } - /** y coordinate relative to {@code root} */ - public int y_root() { return ny_root(address()); } - /** key mask */ - @NativeType("unsigned int") - public int state() { return nstate(address()); } - /** detail */ - @NativeType("unsigned int") - public int keycode() { return nkeycode(address()); } - /** same screen flag */ - @NativeType("Bool") - public boolean same_screen() { return nsame_screen(address()) != 0; } - - /** Sets the specified value to the {@link #type} field. */ - public XKeyEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XKeyEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XKeyEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XKeyEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XKeyEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #root} field. */ - public XKeyEvent root(@NativeType("Window") long value) { nroot(address(), value); return this; } - /** Sets the specified value to the {@link #subwindow} field. */ - public XKeyEvent subwindow(@NativeType("Window") long value) { nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link #time} field. */ - public XKeyEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@link #x} field. */ - public XKeyEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public XKeyEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@link #x_root} field. */ - public XKeyEvent x_root(int value) { nx_root(address(), value); return this; } - /** Sets the specified value to the {@link #y_root} field. */ - public XKeyEvent y_root(int value) { ny_root(address(), value); return this; } - /** Sets the specified value to the {@link #state} field. */ - public XKeyEvent state(@NativeType("unsigned int") int value) { nstate(address(), value); return this; } - /** Sets the specified value to the {@link #keycode} field. */ - public XKeyEvent keycode(@NativeType("unsigned int") int value) { nkeycode(address(), value); return this; } - /** Sets the specified value to the {@link #same_screen} field. */ - public XKeyEvent same_screen(@NativeType("Bool") boolean value) { nsame_screen(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XKeyEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long root, - long subwindow, - long time, - int x, - int y, - int x_root, - int y_root, - int state, - int keycode, - boolean same_screen - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - root(root); - subwindow(subwindow); - time(time); - x(x); - y(y); - x_root(x_root); - y_root(y_root); - state(state); - keycode(keycode); - same_screen(same_screen); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XKeyEvent set(XKeyEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XKeyEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XKeyEvent malloc() { - return new XKeyEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XKeyEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XKeyEvent calloc() { - return new XKeyEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XKeyEvent} instance allocated with {@link BufferUtils}. */ - public static XKeyEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XKeyEvent(memAddress(container), container); - } - - /** Returns a new {@code XKeyEvent} instance for the specified memory address. */ - public static XKeyEvent create(long address) { - return new XKeyEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XKeyEvent createSafe(long address) { - return address == NULL ? null : new XKeyEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XKeyEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XKeyEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XKeyEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XKeyEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XKeyEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XKeyEvent malloc(MemoryStack stack) { - return new XKeyEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XKeyEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XKeyEvent calloc(MemoryStack stack) { - return new XKeyEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XKeyEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XKeyEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XKeyEvent.WINDOW); } - /** Unsafe version of {@link #root}. */ - public static long nroot(long struct) { return memGetCLong(struct + XKeyEvent.ROOT); } - /** Unsafe version of {@link #subwindow}. */ - public static long nsubwindow(long struct) { return memGetCLong(struct + XKeyEvent.SUBWINDOW); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XKeyEvent.TIME); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.Y); } - /** Unsafe version of {@link #x_root}. */ - public static int nx_root(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.X_ROOT); } - /** Unsafe version of {@link #y_root}. */ - public static int ny_root(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.Y_ROOT); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.STATE); } - /** Unsafe version of {@link #keycode}. */ - public static int nkeycode(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.KEYCODE); } - /** Unsafe version of {@link #same_screen}. */ - public static int nsame_screen(long struct) { return UNSAFE.getInt(null, struct + XKeyEvent.SAME_SCREEN); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XKeyEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XKeyEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XKeyEvent.WINDOW, value); } - /** Unsafe version of {@link #root(long) root}. */ - public static void nroot(long struct, long value) { memPutCLong(struct + XKeyEvent.ROOT, value); } - /** Unsafe version of {@link #subwindow(long) subwindow}. */ - public static void nsubwindow(long struct, long value) { memPutCLong(struct + XKeyEvent.SUBWINDOW, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XKeyEvent.TIME, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.Y, value); } - /** Unsafe version of {@link #x_root(int) x_root}. */ - public static void nx_root(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.X_ROOT, value); } - /** Unsafe version of {@link #y_root(int) y_root}. */ - public static void ny_root(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.Y_ROOT, value); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.STATE, value); } - /** Unsafe version of {@link #keycode(int) keycode}. */ - public static void nkeycode(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.KEYCODE, value); } - /** Unsafe version of {@link #same_screen(boolean) same_screen}. */ - public static void nsame_screen(long struct, int value) { UNSAFE.putInt(null, struct + XKeyEvent.SAME_SCREEN, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XKeyEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XKeyEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XKeyEvent ELEMENT_FACTORY = XKeyEvent.create(-1L); - - /** - * Creates a new {@code XKeyEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XKeyEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XKeyEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XKeyEvent#type} field. */ - public int type() { return XKeyEvent.ntype(address()); } - /** @return the value of the {@link XKeyEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XKeyEvent.nserial(address()); } - /** @return the value of the {@link XKeyEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XKeyEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XKeyEvent#display} field. */ - @NativeType("Display *") - public long display() { return XKeyEvent.ndisplay(address()); } - /** @return the value of the {@link XKeyEvent#window} field. */ - @NativeType("Window") - public long window() { return XKeyEvent.nwindow(address()); } - /** @return the value of the {@link XKeyEvent#root} field. */ - @NativeType("Window") - public long root() { return XKeyEvent.nroot(address()); } - /** @return the value of the {@link XKeyEvent#subwindow} field. */ - @NativeType("Window") - public long subwindow() { return XKeyEvent.nsubwindow(address()); } - /** @return the value of the {@link XKeyEvent#time} field. */ - @NativeType("Time") - public long time() { return XKeyEvent.ntime(address()); } - /** @return the value of the {@link XKeyEvent#x} field. */ - public int x() { return XKeyEvent.nx(address()); } - /** @return the value of the {@link XKeyEvent#y} field. */ - public int y() { return XKeyEvent.ny(address()); } - /** @return the value of the {@link XKeyEvent#x_root} field. */ - public int x_root() { return XKeyEvent.nx_root(address()); } - /** @return the value of the {@link XKeyEvent#y_root} field. */ - public int y_root() { return XKeyEvent.ny_root(address()); } - /** @return the value of the {@link XKeyEvent#state} field. */ - @NativeType("unsigned int") - public int state() { return XKeyEvent.nstate(address()); } - /** @return the value of the {@link XKeyEvent#keycode} field. */ - @NativeType("unsigned int") - public int keycode() { return XKeyEvent.nkeycode(address()); } - /** @return the value of the {@link XKeyEvent#same_screen} field. */ - @NativeType("Bool") - public boolean same_screen() { return XKeyEvent.nsame_screen(address()) != 0; } - - /** Sets the specified value to the {@link XKeyEvent#type} field. */ - public Buffer type(int value) { XKeyEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XKeyEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XKeyEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XKeyEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XKeyEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XKeyEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#root} field. */ - public Buffer root(@NativeType("Window") long value) { XKeyEvent.nroot(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#subwindow} field. */ - public Buffer subwindow(@NativeType("Window") long value) { XKeyEvent.nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#time} field. */ - public Buffer time(@NativeType("Time") long value) { XKeyEvent.ntime(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#x} field. */ - public Buffer x(int value) { XKeyEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#y} field. */ - public Buffer y(int value) { XKeyEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#x_root} field. */ - public Buffer x_root(int value) { XKeyEvent.nx_root(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#y_root} field. */ - public Buffer y_root(int value) { XKeyEvent.ny_root(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#state} field. */ - public Buffer state(@NativeType("unsigned int") int value) { XKeyEvent.nstate(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#keycode} field. */ - public Buffer keycode(@NativeType("unsigned int") int value) { XKeyEvent.nkeycode(address(), value); return this; } - /** Sets the specified value to the {@link XKeyEvent#same_screen} field. */ - public Buffer same_screen(@NativeType("Bool") boolean value) { XKeyEvent.nsame_screen(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XKeymapEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XKeymapEvent.java deleted file mode 100644 index dbd89f12..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XKeymapEvent.java +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Generated on {@code EnterWindow} and {@code FocusIn} when {@code KeyMapState} selected. - * - *

    Layout

    - * - *
    
    - * struct XKeymapEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     char key_vector[32];
    - * }
    - */ -public class XKeymapEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - KEY_VECTOR; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __array(1, 32) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - KEY_VECTOR = layout.offsetof(5); - } - - protected XKeymapEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XKeymapEvent create(long address, @Nullable ByteBuffer container) { - return new XKeymapEvent(address, container); - } - - /** - * Creates a {@code XKeymapEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XKeymapEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return a {@link ByteBuffer} view of the {@code key_vector} field. */ - @NativeType("char[32]") - public ByteBuffer key_vector() { return nkey_vector(address()); } - /** @return the value at the specified index of the {@code key_vector} field. */ - @NativeType("char") - public byte key_vector(int index) { return nkey_vector(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public XKeymapEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XKeymapEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XKeymapEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XKeymapEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XKeymapEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code key_vector} field. */ - public XKeymapEvent key_vector(@NativeType("char[32]") ByteBuffer value) { nkey_vector(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code key_vector} field. */ - public XKeymapEvent key_vector(int index, @NativeType("char") byte value) { nkey_vector(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public XKeymapEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - ByteBuffer key_vector - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - key_vector(key_vector); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XKeymapEvent set(XKeymapEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XKeymapEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XKeymapEvent malloc() { - return new XKeymapEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XKeymapEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XKeymapEvent calloc() { - return new XKeymapEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XKeymapEvent} instance allocated with {@link BufferUtils}. */ - public static XKeymapEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XKeymapEvent(memAddress(container), container); - } - - /** Returns a new {@code XKeymapEvent} instance for the specified memory address. */ - public static XKeymapEvent create(long address) { - return new XKeymapEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XKeymapEvent createSafe(long address) { - return address == NULL ? null : new XKeymapEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XKeymapEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XKeymapEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XKeymapEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XKeymapEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XKeymapEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XKeymapEvent malloc(MemoryStack stack) { - return new XKeymapEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XKeymapEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XKeymapEvent calloc(MemoryStack stack) { - return new XKeymapEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XKeymapEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XKeymapEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XKeymapEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XKeymapEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XKeymapEvent.WINDOW); } - /** Unsafe version of {@link #key_vector}. */ - public static ByteBuffer nkey_vector(long struct) { return memByteBuffer(struct + XKeymapEvent.KEY_VECTOR, 32); } - /** Unsafe version of {@link #key_vector(int) key_vector}. */ - public static byte nkey_vector(long struct, int index) { - return UNSAFE.getByte(null, struct + XKeymapEvent.KEY_VECTOR + check(index, 32) * 1); - } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XKeymapEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XKeymapEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XKeymapEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XKeymapEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XKeymapEvent.WINDOW, value); } - /** Unsafe version of {@link #key_vector(ByteBuffer) key_vector}. */ - public static void nkey_vector(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 32); } - memCopy(memAddress(value), struct + XKeymapEvent.KEY_VECTOR, value.remaining() * 1); - } - /** Unsafe version of {@link #key_vector(int, byte) key_vector}. */ - public static void nkey_vector(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + XKeymapEvent.KEY_VECTOR + check(index, 32) * 1, value); - } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XKeymapEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XKeymapEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XKeymapEvent ELEMENT_FACTORY = XKeymapEvent.create(-1L); - - /** - * Creates a new {@code XKeymapEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XKeymapEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XKeymapEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XKeymapEvent.ntype(address()); } - /** @return the value of the {@link XKeymapEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XKeymapEvent.nserial(address()); } - /** @return the value of the {@link XKeymapEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XKeymapEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XKeymapEvent#display} field. */ - @NativeType("Display *") - public long display() { return XKeymapEvent.ndisplay(address()); } - /** @return the value of the {@link XKeymapEvent#window} field. */ - @NativeType("Window") - public long window() { return XKeymapEvent.nwindow(address()); } - /** @return a {@link ByteBuffer} view of the {@code key_vector} field. */ - @NativeType("char[32]") - public ByteBuffer key_vector() { return XKeymapEvent.nkey_vector(address()); } - /** @return the value at the specified index of the {@code key_vector} field. */ - @NativeType("char") - public byte key_vector(int index) { return XKeymapEvent.nkey_vector(address(), index); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XKeymapEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XKeymapEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XKeymapEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XKeymapEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XKeymapEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XKeymapEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XKeymapEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XKeymapEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XKeymapEvent.nwindow(address(), value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@code key_vector} field. */ - public Buffer key_vector(@NativeType("char[32]") ByteBuffer value) { XKeymapEvent.nkey_vector(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code key_vector} field. */ - public Buffer key_vector(int index, @NativeType("char") byte value) { XKeymapEvent.nkey_vector(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XMapEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XMapEvent.java deleted file mode 100644 index 91779940..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XMapEvent.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XMapEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window event;
    - *     Window window;
    - *     int {@link #override_redirect};
    - * }
    - */ -public class XMapEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EVENT, - WINDOW, - OVERRIDE_REDIRECT; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EVENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - OVERRIDE_REDIRECT = layout.offsetof(6); - } - - protected XMapEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XMapEvent create(long address, @Nullable ByteBuffer container) { - return new XMapEvent(address, container); - } - - /** - * Creates a {@code XMapEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XMapEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** boolean, is override set... */ - public int override_redirect() { return noverride_redirect(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XMapEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XMapEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XMapEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XMapEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public XMapEvent event(@NativeType("Window") long value) { nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XMapEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #override_redirect} field. */ - public XMapEvent override_redirect(int value) { noverride_redirect(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XMapEvent set( - int type, - long serial, - boolean send_event, - long display, - long event, - long window, - int override_redirect - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - event(event); - window(window); - override_redirect(override_redirect); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XMapEvent set(XMapEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XMapEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XMapEvent malloc() { - return new XMapEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XMapEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XMapEvent calloc() { - return new XMapEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XMapEvent} instance allocated with {@link BufferUtils}. */ - public static XMapEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XMapEvent(memAddress(container), container); - } - - /** Returns a new {@code XMapEvent} instance for the specified memory address. */ - public static XMapEvent create(long address) { - return new XMapEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XMapEvent createSafe(long address) { - return address == NULL ? null : new XMapEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMapEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMapEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMapEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMapEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XMapEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XMapEvent malloc(MemoryStack stack) { - return new XMapEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XMapEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XMapEvent calloc(MemoryStack stack) { - return new XMapEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XMapEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XMapEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XMapEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XMapEvent.DISPLAY); } - /** Unsafe version of {@link #event}. */ - public static long nevent(long struct) { return memGetCLong(struct + XMapEvent.EVENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XMapEvent.WINDOW); } - /** Unsafe version of {@link #override_redirect}. */ - public static int noverride_redirect(long struct) { return UNSAFE.getInt(null, struct + XMapEvent.OVERRIDE_REDIRECT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XMapEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XMapEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XMapEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XMapEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #event(long) event}. */ - public static void nevent(long struct, long value) { memPutCLong(struct + XMapEvent.EVENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XMapEvent.WINDOW, value); } - /** Unsafe version of {@link #override_redirect(int) override_redirect}. */ - public static void noverride_redirect(long struct, int value) { UNSAFE.putInt(null, struct + XMapEvent.OVERRIDE_REDIRECT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XMapEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XMapEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XMapEvent ELEMENT_FACTORY = XMapEvent.create(-1L); - - /** - * Creates a new {@code XMapEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XMapEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XMapEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XMapEvent.ntype(address()); } - /** @return the value of the {@link XMapEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XMapEvent.nserial(address()); } - /** @return the value of the {@link XMapEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XMapEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XMapEvent#display} field. */ - @NativeType("Display *") - public long display() { return XMapEvent.ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return XMapEvent.nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XMapEvent.nwindow(address()); } - /** @return the value of the {@link XMapEvent#override_redirect} field. */ - public int override_redirect() { return XMapEvent.noverride_redirect(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XMapEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XMapEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XMapEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XMapEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XMapEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XMapEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XMapEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public Buffer event(@NativeType("Window") long value) { XMapEvent.nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XMapEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XMapEvent#override_redirect} field. */ - public Buffer override_redirect(int value) { XMapEvent.noverride_redirect(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XMapRequestEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XMapRequestEvent.java deleted file mode 100644 index 0216ef59..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XMapRequestEvent.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XMapRequestEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window parent;
    - *     Window window;
    - * }
    - */ -public class XMapRequestEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - PARENT, - WINDOW; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - PARENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - } - - protected XMapRequestEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XMapRequestEvent create(long address, @Nullable ByteBuffer container) { - return new XMapRequestEvent(address, container); - } - - /** - * Creates a {@code XMapRequestEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XMapRequestEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return nparent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XMapRequestEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XMapRequestEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XMapRequestEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XMapRequestEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public XMapRequestEvent parent(@NativeType("Window") long value) { nparent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XMapRequestEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XMapRequestEvent set( - int type, - long serial, - boolean send_event, - long display, - long parent, - long window - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - parent(parent); - window(window); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XMapRequestEvent set(XMapRequestEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XMapRequestEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XMapRequestEvent malloc() { - return new XMapRequestEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XMapRequestEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XMapRequestEvent calloc() { - return new XMapRequestEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XMapRequestEvent} instance allocated with {@link BufferUtils}. */ - public static XMapRequestEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XMapRequestEvent(memAddress(container), container); - } - - /** Returns a new {@code XMapRequestEvent} instance for the specified memory address. */ - public static XMapRequestEvent create(long address) { - return new XMapRequestEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XMapRequestEvent createSafe(long address) { - return address == NULL ? null : new XMapRequestEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMapRequestEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMapRequestEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMapRequestEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMapRequestEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XMapRequestEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XMapRequestEvent malloc(MemoryStack stack) { - return new XMapRequestEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XMapRequestEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XMapRequestEvent calloc(MemoryStack stack) { - return new XMapRequestEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XMapRequestEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XMapRequestEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XMapRequestEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XMapRequestEvent.DISPLAY); } - /** Unsafe version of {@link #parent}. */ - public static long nparent(long struct) { return memGetCLong(struct + XMapRequestEvent.PARENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XMapRequestEvent.WINDOW); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XMapRequestEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XMapRequestEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XMapRequestEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XMapRequestEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #parent(long) parent}. */ - public static void nparent(long struct, long value) { memPutCLong(struct + XMapRequestEvent.PARENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XMapRequestEvent.WINDOW, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XMapRequestEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XMapRequestEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XMapRequestEvent ELEMENT_FACTORY = XMapRequestEvent.create(-1L); - - /** - * Creates a new {@code XMapRequestEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XMapRequestEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XMapRequestEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XMapRequestEvent.ntype(address()); } - /** @return the value of the {@link XMapRequestEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XMapRequestEvent.nserial(address()); } - /** @return the value of the {@link XMapRequestEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XMapRequestEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XMapRequestEvent#display} field. */ - @NativeType("Display *") - public long display() { return XMapRequestEvent.ndisplay(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return XMapRequestEvent.nparent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XMapRequestEvent.nwindow(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XMapRequestEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XMapRequestEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XMapRequestEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XMapRequestEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XMapRequestEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XMapRequestEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XMapRequestEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public Buffer parent(@NativeType("Window") long value) { XMapRequestEvent.nparent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XMapRequestEvent.nwindow(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XMappingEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XMappingEvent.java deleted file mode 100644 index cef4a8f3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XMappingEvent.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XMappingEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     int {@link #request};
    - *     int {@link #first_keycode};
    - *     int {@link #count};
    - * }
    - */ -public class XMappingEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - REQUEST, - FIRST_KEYCODE, - COUNT; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - REQUEST = layout.offsetof(5); - FIRST_KEYCODE = layout.offsetof(6); - COUNT = layout.offsetof(7); - } - - protected XMappingEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XMappingEvent create(long address, @Nullable ByteBuffer container) { - return new XMappingEvent(address, container); - } - - /** - * Creates a {@code XMappingEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XMappingEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** one of:
    {@link X11#MappingModifier}{@link X11#MappingKeyboard}{@link X11#MappingPointer}
    */ - public int request() { return nrequest(address()); } - /** first keycode */ - public int first_keycode() { return nfirst_keycode(address()); } - /** defines range of change w. {@code first_keycode} */ - public int count() { return ncount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XMappingEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XMappingEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XMappingEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XMappingEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XMappingEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #request} field. */ - public XMappingEvent request(int value) { nrequest(address(), value); return this; } - /** Sets the specified value to the {@link #first_keycode} field. */ - public XMappingEvent first_keycode(int value) { nfirst_keycode(address(), value); return this; } - /** Sets the specified value to the {@link #count} field. */ - public XMappingEvent count(int value) { ncount(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XMappingEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - int request, - int first_keycode, - int count - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - request(request); - first_keycode(first_keycode); - count(count); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XMappingEvent set(XMappingEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XMappingEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XMappingEvent malloc() { - return new XMappingEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XMappingEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XMappingEvent calloc() { - return new XMappingEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XMappingEvent} instance allocated with {@link BufferUtils}. */ - public static XMappingEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XMappingEvent(memAddress(container), container); - } - - /** Returns a new {@code XMappingEvent} instance for the specified memory address. */ - public static XMappingEvent create(long address) { - return new XMappingEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XMappingEvent createSafe(long address) { - return address == NULL ? null : new XMappingEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMappingEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMappingEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMappingEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMappingEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XMappingEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XMappingEvent malloc(MemoryStack stack) { - return new XMappingEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XMappingEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XMappingEvent calloc(MemoryStack stack) { - return new XMappingEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XMappingEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XMappingEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XMappingEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XMappingEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XMappingEvent.WINDOW); } - /** Unsafe version of {@link #request}. */ - public static int nrequest(long struct) { return UNSAFE.getInt(null, struct + XMappingEvent.REQUEST); } - /** Unsafe version of {@link #first_keycode}. */ - public static int nfirst_keycode(long struct) { return UNSAFE.getInt(null, struct + XMappingEvent.FIRST_KEYCODE); } - /** Unsafe version of {@link #count}. */ - public static int ncount(long struct) { return UNSAFE.getInt(null, struct + XMappingEvent.COUNT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XMappingEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XMappingEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XMappingEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XMappingEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XMappingEvent.WINDOW, value); } - /** Unsafe version of {@link #request(int) request}. */ - public static void nrequest(long struct, int value) { UNSAFE.putInt(null, struct + XMappingEvent.REQUEST, value); } - /** Unsafe version of {@link #first_keycode(int) first_keycode}. */ - public static void nfirst_keycode(long struct, int value) { UNSAFE.putInt(null, struct + XMappingEvent.FIRST_KEYCODE, value); } - /** Unsafe version of {@link #count(int) count}. */ - public static void ncount(long struct, int value) { UNSAFE.putInt(null, struct + XMappingEvent.COUNT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XMappingEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XMappingEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XMappingEvent ELEMENT_FACTORY = XMappingEvent.create(-1L); - - /** - * Creates a new {@code XMappingEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XMappingEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XMappingEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XMappingEvent.ntype(address()); } - /** @return the value of the {@link XMappingEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XMappingEvent.nserial(address()); } - /** @return the value of the {@link XMappingEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XMappingEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XMappingEvent#display} field. */ - @NativeType("Display *") - public long display() { return XMappingEvent.ndisplay(address()); } - /** @return the value of the {@link XMappingEvent#window} field. */ - @NativeType("Window") - public long window() { return XMappingEvent.nwindow(address()); } - /** @return the value of the {@link XMappingEvent#request} field. */ - public int request() { return XMappingEvent.nrequest(address()); } - /** @return the value of the {@link XMappingEvent#first_keycode} field. */ - public int first_keycode() { return XMappingEvent.nfirst_keycode(address()); } - /** @return the value of the {@link XMappingEvent#count} field. */ - public int count() { return XMappingEvent.ncount(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XMappingEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XMappingEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XMappingEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XMappingEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XMappingEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XMappingEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XMappingEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XMappingEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XMappingEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XMappingEvent#request} field. */ - public Buffer request(int value) { XMappingEvent.nrequest(address(), value); return this; } - /** Sets the specified value to the {@link XMappingEvent#first_keycode} field. */ - public Buffer first_keycode(int value) { XMappingEvent.nfirst_keycode(address(), value); return this; } - /** Sets the specified value to the {@link XMappingEvent#count} field. */ - public Buffer count(int value) { XMappingEvent.ncount(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XMotionEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XMotionEvent.java deleted file mode 100644 index df34e014..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XMotionEvent.java +++ /dev/null @@ -1,566 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Motion event. - * - *

    Layout

    - * - *
    
    - * struct XMotionEvent {
    - *     int {@link #type};
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Window {@link #root};
    - *     Window {@link #subwindow};
    - *     Time {@link #time};
    - *     int {@link #x};
    - *     int {@link #y};
    - *     int {@link #x_root};
    - *     int {@link #y_root};
    - *     unsigned int {@link #state};
    - *     char {@link #is_hint};
    - *     Bool {@link #same_screen};
    - * }
    - */ -public class XMotionEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - ROOT, - SUBWINDOW, - TIME, - X, - Y, - X_ROOT, - Y_ROOT, - STATE, - IS_HINT, - SAME_SCREEN; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(1), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - ROOT = layout.offsetof(5); - SUBWINDOW = layout.offsetof(6); - TIME = layout.offsetof(7); - X = layout.offsetof(8); - Y = layout.offsetof(9); - X_ROOT = layout.offsetof(10); - Y_ROOT = layout.offsetof(11); - STATE = layout.offsetof(12); - IS_HINT = layout.offsetof(13); - SAME_SCREEN = layout.offsetof(14); - } - - protected XMotionEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XMotionEvent create(long address, @Nullable ByteBuffer container) { - return new XMotionEvent(address, container); - } - - /** - * Creates a {@code XMotionEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XMotionEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the event type. Must be:
    {@link X11#MotionNotify}
    */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** root window that the event occurred on */ - @NativeType("Window") - public long root() { return nroot(address()); } - /** child window */ - @NativeType("Window") - public long subwindow() { return nsubwindow(address()); } - /** milliseconds */ - @NativeType("Time") - public long time() { return ntime(address()); } - /** pointer x coordinate in event window */ - public int x() { return nx(address()); } - /** pointer y coordinate in event window */ - public int y() { return ny(address()); } - /** x coordinate relative to {@code root} */ - public int x_root() { return nx_root(address()); } - /** y coordinate relative to {@code root} */ - public int y_root() { return ny_root(address()); } - /** key or button mask */ - @NativeType("unsigned int") - public int state() { return nstate(address()); } - /** detail */ - @NativeType("char") - public byte is_hint() { return nis_hint(address()); } - /** same screen flag */ - @NativeType("Bool") - public boolean same_screen() { return nsame_screen(address()) != 0; } - - /** Sets the specified value to the {@link #type} field. */ - public XMotionEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XMotionEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XMotionEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XMotionEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XMotionEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #root} field. */ - public XMotionEvent root(@NativeType("Window") long value) { nroot(address(), value); return this; } - /** Sets the specified value to the {@link #subwindow} field. */ - public XMotionEvent subwindow(@NativeType("Window") long value) { nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link #time} field. */ - public XMotionEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@link #x} field. */ - public XMotionEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public XMotionEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@link #x_root} field. */ - public XMotionEvent x_root(int value) { nx_root(address(), value); return this; } - /** Sets the specified value to the {@link #y_root} field. */ - public XMotionEvent y_root(int value) { ny_root(address(), value); return this; } - /** Sets the specified value to the {@link #state} field. */ - public XMotionEvent state(@NativeType("unsigned int") int value) { nstate(address(), value); return this; } - /** Sets the specified value to the {@link #is_hint} field. */ - public XMotionEvent is_hint(@NativeType("char") byte value) { nis_hint(address(), value); return this; } - /** Sets the specified value to the {@link #same_screen} field. */ - public XMotionEvent same_screen(@NativeType("Bool") boolean value) { nsame_screen(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public XMotionEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long root, - long subwindow, - long time, - int x, - int y, - int x_root, - int y_root, - int state, - byte is_hint, - boolean same_screen - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - root(root); - subwindow(subwindow); - time(time); - x(x); - y(y); - x_root(x_root); - y_root(y_root); - state(state); - is_hint(is_hint); - same_screen(same_screen); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XMotionEvent set(XMotionEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XMotionEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XMotionEvent malloc() { - return new XMotionEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XMotionEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XMotionEvent calloc() { - return new XMotionEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XMotionEvent} instance allocated with {@link BufferUtils}. */ - public static XMotionEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XMotionEvent(memAddress(container), container); - } - - /** Returns a new {@code XMotionEvent} instance for the specified memory address. */ - public static XMotionEvent create(long address) { - return new XMotionEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XMotionEvent createSafe(long address) { - return address == NULL ? null : new XMotionEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMotionEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMotionEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XMotionEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XMotionEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XMotionEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XMotionEvent malloc(MemoryStack stack) { - return new XMotionEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XMotionEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XMotionEvent calloc(MemoryStack stack) { - return new XMotionEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XMotionEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XMotionEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XMotionEvent.WINDOW); } - /** Unsafe version of {@link #root}. */ - public static long nroot(long struct) { return memGetCLong(struct + XMotionEvent.ROOT); } - /** Unsafe version of {@link #subwindow}. */ - public static long nsubwindow(long struct) { return memGetCLong(struct + XMotionEvent.SUBWINDOW); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XMotionEvent.TIME); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.Y); } - /** Unsafe version of {@link #x_root}. */ - public static int nx_root(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.X_ROOT); } - /** Unsafe version of {@link #y_root}. */ - public static int ny_root(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.Y_ROOT); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.STATE); } - /** Unsafe version of {@link #is_hint}. */ - public static byte nis_hint(long struct) { return UNSAFE.getByte(null, struct + XMotionEvent.IS_HINT); } - /** Unsafe version of {@link #same_screen}. */ - public static int nsame_screen(long struct) { return UNSAFE.getInt(null, struct + XMotionEvent.SAME_SCREEN); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XMotionEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XMotionEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XMotionEvent.WINDOW, value); } - /** Unsafe version of {@link #root(long) root}. */ - public static void nroot(long struct, long value) { memPutCLong(struct + XMotionEvent.ROOT, value); } - /** Unsafe version of {@link #subwindow(long) subwindow}. */ - public static void nsubwindow(long struct, long value) { memPutCLong(struct + XMotionEvent.SUBWINDOW, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XMotionEvent.TIME, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.Y, value); } - /** Unsafe version of {@link #x_root(int) x_root}. */ - public static void nx_root(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.X_ROOT, value); } - /** Unsafe version of {@link #y_root(int) y_root}. */ - public static void ny_root(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.Y_ROOT, value); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.STATE, value); } - /** Unsafe version of {@link #is_hint(byte) is_hint}. */ - public static void nis_hint(long struct, byte value) { UNSAFE.putByte(null, struct + XMotionEvent.IS_HINT, value); } - /** Unsafe version of {@link #same_screen(boolean) same_screen}. */ - public static void nsame_screen(long struct, int value) { UNSAFE.putInt(null, struct + XMotionEvent.SAME_SCREEN, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XMotionEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XMotionEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XMotionEvent ELEMENT_FACTORY = XMotionEvent.create(-1L); - - /** - * Creates a new {@code XMotionEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XMotionEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XMotionEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XMotionEvent#type} field. */ - public int type() { return XMotionEvent.ntype(address()); } - /** @return the value of the {@link XMotionEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XMotionEvent.nserial(address()); } - /** @return the value of the {@link XMotionEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XMotionEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XMotionEvent#display} field. */ - @NativeType("Display *") - public long display() { return XMotionEvent.ndisplay(address()); } - /** @return the value of the {@link XMotionEvent#window} field. */ - @NativeType("Window") - public long window() { return XMotionEvent.nwindow(address()); } - /** @return the value of the {@link XMotionEvent#root} field. */ - @NativeType("Window") - public long root() { return XMotionEvent.nroot(address()); } - /** @return the value of the {@link XMotionEvent#subwindow} field. */ - @NativeType("Window") - public long subwindow() { return XMotionEvent.nsubwindow(address()); } - /** @return the value of the {@link XMotionEvent#time} field. */ - @NativeType("Time") - public long time() { return XMotionEvent.ntime(address()); } - /** @return the value of the {@link XMotionEvent#x} field. */ - public int x() { return XMotionEvent.nx(address()); } - /** @return the value of the {@link XMotionEvent#y} field. */ - public int y() { return XMotionEvent.ny(address()); } - /** @return the value of the {@link XMotionEvent#x_root} field. */ - public int x_root() { return XMotionEvent.nx_root(address()); } - /** @return the value of the {@link XMotionEvent#y_root} field. */ - public int y_root() { return XMotionEvent.ny_root(address()); } - /** @return the value of the {@link XMotionEvent#state} field. */ - @NativeType("unsigned int") - public int state() { return XMotionEvent.nstate(address()); } - /** @return the value of the {@link XMotionEvent#is_hint} field. */ - @NativeType("char") - public byte is_hint() { return XMotionEvent.nis_hint(address()); } - /** @return the value of the {@link XMotionEvent#same_screen} field. */ - @NativeType("Bool") - public boolean same_screen() { return XMotionEvent.nsame_screen(address()) != 0; } - - /** Sets the specified value to the {@link XMotionEvent#type} field. */ - public Buffer type(int value) { XMotionEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XMotionEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XMotionEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XMotionEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XMotionEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XMotionEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#root} field. */ - public Buffer root(@NativeType("Window") long value) { XMotionEvent.nroot(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#subwindow} field. */ - public Buffer subwindow(@NativeType("Window") long value) { XMotionEvent.nsubwindow(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#time} field. */ - public Buffer time(@NativeType("Time") long value) { XMotionEvent.ntime(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#x} field. */ - public Buffer x(int value) { XMotionEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#y} field. */ - public Buffer y(int value) { XMotionEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#x_root} field. */ - public Buffer x_root(int value) { XMotionEvent.nx_root(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#y_root} field. */ - public Buffer y_root(int value) { XMotionEvent.ny_root(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#state} field. */ - public Buffer state(@NativeType("unsigned int") int value) { XMotionEvent.nstate(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#is_hint} field. */ - public Buffer is_hint(@NativeType("char") byte value) { XMotionEvent.nis_hint(address(), value); return this; } - /** Sets the specified value to the {@link XMotionEvent#same_screen} field. */ - public Buffer same_screen(@NativeType("Bool") boolean value) { XMotionEvent.nsame_screen(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XNoExposeEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XNoExposeEvent.java deleted file mode 100644 index 475d1271..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XNoExposeEvent.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XNoExposeEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Drawable drawable;
    - *     int {@link #major_code};
    - *     int {@link #minor_code};
    - * }
    - */ -public class XNoExposeEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - DRAWABLE, - MAJOR_CODE, - MINOR_CODE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - DRAWABLE = layout.offsetof(4); - MAJOR_CODE = layout.offsetof(5); - MINOR_CODE = layout.offsetof(6); - } - - protected XNoExposeEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XNoExposeEvent create(long address, @Nullable ByteBuffer container) { - return new XNoExposeEvent(address, container); - } - - /** - * Creates a {@code XNoExposeEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XNoExposeEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code drawable} field. */ - @NativeType("Drawable") - public long drawable() { return ndrawable(address()); } - /** core is {@code CopyArea} or {@code CopyPlane} */ - public int major_code() { return nmajor_code(address()); } - /** not defined in the core */ - public int minor_code() { return nminor_code(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XNoExposeEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XNoExposeEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XNoExposeEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XNoExposeEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code drawable} field. */ - public XNoExposeEvent drawable(@NativeType("Drawable") long value) { ndrawable(address(), value); return this; } - /** Sets the specified value to the {@link #major_code} field. */ - public XNoExposeEvent major_code(int value) { nmajor_code(address(), value); return this; } - /** Sets the specified value to the {@link #minor_code} field. */ - public XNoExposeEvent minor_code(int value) { nminor_code(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XNoExposeEvent set( - int type, - long serial, - boolean send_event, - long display, - long drawable, - int major_code, - int minor_code - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - drawable(drawable); - major_code(major_code); - minor_code(minor_code); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XNoExposeEvent set(XNoExposeEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XNoExposeEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XNoExposeEvent malloc() { - return new XNoExposeEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XNoExposeEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XNoExposeEvent calloc() { - return new XNoExposeEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XNoExposeEvent} instance allocated with {@link BufferUtils}. */ - public static XNoExposeEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XNoExposeEvent(memAddress(container), container); - } - - /** Returns a new {@code XNoExposeEvent} instance for the specified memory address. */ - public static XNoExposeEvent create(long address) { - return new XNoExposeEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XNoExposeEvent createSafe(long address) { - return address == NULL ? null : new XNoExposeEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XNoExposeEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XNoExposeEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XNoExposeEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XNoExposeEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XNoExposeEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XNoExposeEvent malloc(MemoryStack stack) { - return new XNoExposeEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XNoExposeEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XNoExposeEvent calloc(MemoryStack stack) { - return new XNoExposeEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XNoExposeEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XNoExposeEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XNoExposeEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XNoExposeEvent.DISPLAY); } - /** Unsafe version of {@link #drawable}. */ - public static long ndrawable(long struct) { return memGetCLong(struct + XNoExposeEvent.DRAWABLE); } - /** Unsafe version of {@link #major_code}. */ - public static int nmajor_code(long struct) { return UNSAFE.getInt(null, struct + XNoExposeEvent.MAJOR_CODE); } - /** Unsafe version of {@link #minor_code}. */ - public static int nminor_code(long struct) { return UNSAFE.getInt(null, struct + XNoExposeEvent.MINOR_CODE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XNoExposeEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XNoExposeEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XNoExposeEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XNoExposeEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #drawable(long) drawable}. */ - public static void ndrawable(long struct, long value) { memPutCLong(struct + XNoExposeEvent.DRAWABLE, value); } - /** Unsafe version of {@link #major_code(int) major_code}. */ - public static void nmajor_code(long struct, int value) { UNSAFE.putInt(null, struct + XNoExposeEvent.MAJOR_CODE, value); } - /** Unsafe version of {@link #minor_code(int) minor_code}. */ - public static void nminor_code(long struct, int value) { UNSAFE.putInt(null, struct + XNoExposeEvent.MINOR_CODE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XNoExposeEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XNoExposeEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XNoExposeEvent ELEMENT_FACTORY = XNoExposeEvent.create(-1L); - - /** - * Creates a new {@code XNoExposeEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XNoExposeEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XNoExposeEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XNoExposeEvent.ntype(address()); } - /** @return the value of the {@link XNoExposeEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XNoExposeEvent.nserial(address()); } - /** @return the value of the {@link XNoExposeEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XNoExposeEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XNoExposeEvent#display} field. */ - @NativeType("Display *") - public long display() { return XNoExposeEvent.ndisplay(address()); } - /** @return the value of the {@code drawable} field. */ - @NativeType("Drawable") - public long drawable() { return XNoExposeEvent.ndrawable(address()); } - /** @return the value of the {@link XNoExposeEvent#major_code} field. */ - public int major_code() { return XNoExposeEvent.nmajor_code(address()); } - /** @return the value of the {@link XNoExposeEvent#minor_code} field. */ - public int minor_code() { return XNoExposeEvent.nminor_code(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XNoExposeEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XNoExposeEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XNoExposeEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XNoExposeEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XNoExposeEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XNoExposeEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XNoExposeEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code drawable} field. */ - public Buffer drawable(@NativeType("Drawable") long value) { XNoExposeEvent.ndrawable(address(), value); return this; } - /** Sets the specified value to the {@link XNoExposeEvent#major_code} field. */ - public Buffer major_code(int value) { XNoExposeEvent.nmajor_code(address(), value); return this; } - /** Sets the specified value to the {@link XNoExposeEvent#minor_code} field. */ - public Buffer minor_code(int value) { XNoExposeEvent.nminor_code(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XPropertyEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XPropertyEvent.java deleted file mode 100644 index 53fb9dc8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XPropertyEvent.java +++ /dev/null @@ -1,432 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Property event. - * - *

    Layout

    - * - *
    
    - * struct XPropertyEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Atom atom;
    - *     Time time;
    - *     int {@link #state};
    - * }
    - */ -public class XPropertyEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - ATOM, - TIME, - STATE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - ATOM = layout.offsetof(5); - TIME = layout.offsetof(6); - STATE = layout.offsetof(7); - } - - protected XPropertyEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XPropertyEvent create(long address, @Nullable ByteBuffer container) { - return new XPropertyEvent(address, container); - } - - /** - * Creates a {@code XPropertyEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XPropertyEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code atom} field. */ - @NativeType("Atom") - public long atom() { return natom(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return ntime(address()); } - /** one of:
    {@link X11#PropertyNewValue}{@link X11#PropertyDelete}
    */ - public int state() { return nstate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XPropertyEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XPropertyEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XPropertyEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XPropertyEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XPropertyEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code atom} field. */ - public XPropertyEvent atom(@NativeType("Atom") long value) { natom(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XPropertyEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@link #state} field. */ - public XPropertyEvent state(int value) { nstate(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XPropertyEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long atom, - long time, - int state - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - atom(atom); - time(time); - state(state); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XPropertyEvent set(XPropertyEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XPropertyEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XPropertyEvent malloc() { - return new XPropertyEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XPropertyEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XPropertyEvent calloc() { - return new XPropertyEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XPropertyEvent} instance allocated with {@link BufferUtils}. */ - public static XPropertyEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XPropertyEvent(memAddress(container), container); - } - - /** Returns a new {@code XPropertyEvent} instance for the specified memory address. */ - public static XPropertyEvent create(long address) { - return new XPropertyEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XPropertyEvent createSafe(long address) { - return address == NULL ? null : new XPropertyEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XPropertyEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XPropertyEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XPropertyEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XPropertyEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XPropertyEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XPropertyEvent malloc(MemoryStack stack) { - return new XPropertyEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XPropertyEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XPropertyEvent calloc(MemoryStack stack) { - return new XPropertyEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XPropertyEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XPropertyEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XPropertyEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XPropertyEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XPropertyEvent.WINDOW); } - /** Unsafe version of {@link #atom}. */ - public static long natom(long struct) { return memGetCLong(struct + XPropertyEvent.ATOM); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XPropertyEvent.TIME); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XPropertyEvent.STATE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XPropertyEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XPropertyEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XPropertyEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XPropertyEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XPropertyEvent.WINDOW, value); } - /** Unsafe version of {@link #atom(long) atom}. */ - public static void natom(long struct, long value) { memPutCLong(struct + XPropertyEvent.ATOM, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XPropertyEvent.TIME, value); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XPropertyEvent.STATE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XPropertyEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XPropertyEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XPropertyEvent ELEMENT_FACTORY = XPropertyEvent.create(-1L); - - /** - * Creates a new {@code XPropertyEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XPropertyEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XPropertyEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XPropertyEvent.ntype(address()); } - /** @return the value of the {@link XPropertyEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XPropertyEvent.nserial(address()); } - /** @return the value of the {@link XPropertyEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XPropertyEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XPropertyEvent#display} field. */ - @NativeType("Display *") - public long display() { return XPropertyEvent.ndisplay(address()); } - /** @return the value of the {@link XPropertyEvent#window} field. */ - @NativeType("Window") - public long window() { return XPropertyEvent.nwindow(address()); } - /** @return the value of the {@code atom} field. */ - @NativeType("Atom") - public long atom() { return XPropertyEvent.natom(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return XPropertyEvent.ntime(address()); } - /** @return the value of the {@link XPropertyEvent#state} field. */ - public int state() { return XPropertyEvent.nstate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XPropertyEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XPropertyEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XPropertyEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XPropertyEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XPropertyEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XPropertyEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XPropertyEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XPropertyEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XPropertyEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code atom} field. */ - public Buffer atom(@NativeType("Atom") long value) { XPropertyEvent.natom(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("Time") long value) { XPropertyEvent.ntime(address(), value); return this; } - /** Sets the specified value to the {@link XPropertyEvent#state} field. */ - public Buffer state(int value) { XPropertyEvent.nstate(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XReparentEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XReparentEvent.java deleted file mode 100644 index 3e60573d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XReparentEvent.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XReparentEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window event;
    - *     Window window;
    - *     Window parent;
    - *     int x;
    - *     int y;
    - *     int override_redirect;
    - * }
    - */ -public class XReparentEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EVENT, - WINDOW, - PARENT, - X, - Y, - OVERRIDE_REDIRECT; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EVENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - PARENT = layout.offsetof(6); - X = layout.offsetof(7); - Y = layout.offsetof(8); - OVERRIDE_REDIRECT = layout.offsetof(9); - } - - protected XReparentEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XReparentEvent create(long address, @Nullable ByteBuffer container) { - return new XReparentEvent(address, container); - } - - /** - * Creates a {@code XReparentEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XReparentEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return nparent(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return ny(address()); } - /** @return the value of the {@code override_redirect} field. */ - public int override_redirect() { return noverride_redirect(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XReparentEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XReparentEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XReparentEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XReparentEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public XReparentEvent event(@NativeType("Window") long value) { nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XReparentEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public XReparentEvent parent(@NativeType("Window") long value) { nparent(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public XReparentEvent x(int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public XReparentEvent y(int value) { ny(address(), value); return this; } - /** Sets the specified value to the {@code override_redirect} field. */ - public XReparentEvent override_redirect(int value) { noverride_redirect(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XReparentEvent set( - int type, - long serial, - boolean send_event, - long display, - long event, - long window, - long parent, - int x, - int y, - int override_redirect - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - event(event); - window(window); - parent(parent); - x(x); - y(y); - override_redirect(override_redirect); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XReparentEvent set(XReparentEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XReparentEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XReparentEvent malloc() { - return new XReparentEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XReparentEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XReparentEvent calloc() { - return new XReparentEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XReparentEvent} instance allocated with {@link BufferUtils}. */ - public static XReparentEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XReparentEvent(memAddress(container), container); - } - - /** Returns a new {@code XReparentEvent} instance for the specified memory address. */ - public static XReparentEvent create(long address) { - return new XReparentEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XReparentEvent createSafe(long address) { - return address == NULL ? null : new XReparentEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XReparentEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XReparentEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XReparentEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XReparentEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XReparentEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XReparentEvent malloc(MemoryStack stack) { - return new XReparentEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XReparentEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XReparentEvent calloc(MemoryStack stack) { - return new XReparentEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XReparentEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XReparentEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XReparentEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XReparentEvent.DISPLAY); } - /** Unsafe version of {@link #event}. */ - public static long nevent(long struct) { return memGetCLong(struct + XReparentEvent.EVENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XReparentEvent.WINDOW); } - /** Unsafe version of {@link #parent}. */ - public static long nparent(long struct) { return memGetCLong(struct + XReparentEvent.PARENT); } - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + XReparentEvent.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + XReparentEvent.Y); } - /** Unsafe version of {@link #override_redirect}. */ - public static int noverride_redirect(long struct) { return UNSAFE.getInt(null, struct + XReparentEvent.OVERRIDE_REDIRECT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XReparentEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XReparentEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XReparentEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XReparentEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #event(long) event}. */ - public static void nevent(long struct, long value) { memPutCLong(struct + XReparentEvent.EVENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XReparentEvent.WINDOW, value); } - /** Unsafe version of {@link #parent(long) parent}. */ - public static void nparent(long struct, long value) { memPutCLong(struct + XReparentEvent.PARENT, value); } - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + XReparentEvent.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + XReparentEvent.Y, value); } - /** Unsafe version of {@link #override_redirect(int) override_redirect}. */ - public static void noverride_redirect(long struct, int value) { UNSAFE.putInt(null, struct + XReparentEvent.OVERRIDE_REDIRECT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XReparentEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XReparentEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XReparentEvent ELEMENT_FACTORY = XReparentEvent.create(-1L); - - /** - * Creates a new {@code XReparentEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XReparentEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XReparentEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XReparentEvent.ntype(address()); } - /** @return the value of the {@link XReparentEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XReparentEvent.nserial(address()); } - /** @return the value of the {@link XReparentEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XReparentEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XReparentEvent#display} field. */ - @NativeType("Display *") - public long display() { return XReparentEvent.ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return XReparentEvent.nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XReparentEvent.nwindow(address()); } - /** @return the value of the {@code parent} field. */ - @NativeType("Window") - public long parent() { return XReparentEvent.nparent(address()); } - /** @return the value of the {@code x} field. */ - public int x() { return XReparentEvent.nx(address()); } - /** @return the value of the {@code y} field. */ - public int y() { return XReparentEvent.ny(address()); } - /** @return the value of the {@code override_redirect} field. */ - public int override_redirect() { return XReparentEvent.noverride_redirect(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XReparentEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XReparentEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XReparentEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XReparentEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XReparentEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XReparentEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XReparentEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public Buffer event(@NativeType("Window") long value) { XReparentEvent.nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XReparentEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code parent} field. */ - public Buffer parent(@NativeType("Window") long value) { XReparentEvent.nparent(address(), value); return this; } - /** Sets the specified value to the {@code x} field. */ - public Buffer x(int value) { XReparentEvent.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(int value) { XReparentEvent.ny(address(), value); return this; } - /** Sets the specified value to the {@code override_redirect} field. */ - public Buffer override_redirect(int value) { XReparentEvent.noverride_redirect(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XResizeRequestEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XResizeRequestEvent.java deleted file mode 100644 index 7fa7bf4b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XResizeRequestEvent.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XResizeRequestEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     int width;
    - *     int height;
    - * }
    - */ -public class XResizeRequestEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - WIDTH, - HEIGHT; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - WIDTH = layout.offsetof(5); - HEIGHT = layout.offsetof(6); - } - - protected XResizeRequestEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XResizeRequestEvent create(long address, @Nullable ByteBuffer container) { - return new XResizeRequestEvent(address, container); - } - - /** - * Creates a {@code XResizeRequestEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XResizeRequestEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return nheight(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XResizeRequestEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XResizeRequestEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XResizeRequestEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XResizeRequestEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XResizeRequestEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public XResizeRequestEvent width(int value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public XResizeRequestEvent height(int value) { nheight(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XResizeRequestEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - int width, - int height - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - width(width); - height(height); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XResizeRequestEvent set(XResizeRequestEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XResizeRequestEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XResizeRequestEvent malloc() { - return new XResizeRequestEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XResizeRequestEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XResizeRequestEvent calloc() { - return new XResizeRequestEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XResizeRequestEvent} instance allocated with {@link BufferUtils}. */ - public static XResizeRequestEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XResizeRequestEvent(memAddress(container), container); - } - - /** Returns a new {@code XResizeRequestEvent} instance for the specified memory address. */ - public static XResizeRequestEvent create(long address) { - return new XResizeRequestEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XResizeRequestEvent createSafe(long address) { - return address == NULL ? null : new XResizeRequestEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XResizeRequestEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XResizeRequestEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XResizeRequestEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XResizeRequestEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XResizeRequestEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XResizeRequestEvent malloc(MemoryStack stack) { - return new XResizeRequestEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XResizeRequestEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XResizeRequestEvent calloc(MemoryStack stack) { - return new XResizeRequestEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XResizeRequestEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XResizeRequestEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XResizeRequestEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XResizeRequestEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XResizeRequestEvent.WINDOW); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + XResizeRequestEvent.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + XResizeRequestEvent.HEIGHT); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XResizeRequestEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XResizeRequestEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XResizeRequestEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XResizeRequestEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XResizeRequestEvent.WINDOW, value); } - /** Unsafe version of {@link #width(int) width}. */ - public static void nwidth(long struct, int value) { UNSAFE.putInt(null, struct + XResizeRequestEvent.WIDTH, value); } - /** Unsafe version of {@link #height(int) height}. */ - public static void nheight(long struct, int value) { UNSAFE.putInt(null, struct + XResizeRequestEvent.HEIGHT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XResizeRequestEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XResizeRequestEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XResizeRequestEvent ELEMENT_FACTORY = XResizeRequestEvent.create(-1L); - - /** - * Creates a new {@code XResizeRequestEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XResizeRequestEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XResizeRequestEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XResizeRequestEvent.ntype(address()); } - /** @return the value of the {@link XResizeRequestEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XResizeRequestEvent.nserial(address()); } - /** @return the value of the {@link XResizeRequestEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XResizeRequestEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XResizeRequestEvent#display} field. */ - @NativeType("Display *") - public long display() { return XResizeRequestEvent.ndisplay(address()); } - /** @return the value of the {@link XResizeRequestEvent#window} field. */ - @NativeType("Window") - public long window() { return XResizeRequestEvent.nwindow(address()); } - /** @return the value of the {@code width} field. */ - public int width() { return XResizeRequestEvent.nwidth(address()); } - /** @return the value of the {@code height} field. */ - public int height() { return XResizeRequestEvent.nheight(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XResizeRequestEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XResizeRequestEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XResizeRequestEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XResizeRequestEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XResizeRequestEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XResizeRequestEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XResizeRequestEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XResizeRequestEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XResizeRequestEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(int value) { XResizeRequestEvent.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(int value) { XResizeRequestEvent.nheight(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionClearEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionClearEvent.java deleted file mode 100644 index 39764d60..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionClearEvent.java +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XSelectionClearEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     Atom selection;
    - *     Time time;
    - * }
    - */ -public class XSelectionClearEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - SELECTION, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - SELECTION = layout.offsetof(5); - TIME = layout.offsetof(6); - } - - protected XSelectionClearEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XSelectionClearEvent create(long address, @Nullable ByteBuffer container) { - return new XSelectionClearEvent(address, container); - } - - /** - * Creates a {@code XSelectionClearEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XSelectionClearEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code selection} field. */ - @NativeType("Atom") - public long selection() { return nselection(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XSelectionClearEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XSelectionClearEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XSelectionClearEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XSelectionClearEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XSelectionClearEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code selection} field. */ - public XSelectionClearEvent selection(@NativeType("Atom") long value) { nselection(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XSelectionClearEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XSelectionClearEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - long selection, - long time - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - selection(selection); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XSelectionClearEvent set(XSelectionClearEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XSelectionClearEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XSelectionClearEvent malloc() { - return new XSelectionClearEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XSelectionClearEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XSelectionClearEvent calloc() { - return new XSelectionClearEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XSelectionClearEvent} instance allocated with {@link BufferUtils}. */ - public static XSelectionClearEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XSelectionClearEvent(memAddress(container), container); - } - - /** Returns a new {@code XSelectionClearEvent} instance for the specified memory address. */ - public static XSelectionClearEvent create(long address) { - return new XSelectionClearEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XSelectionClearEvent createSafe(long address) { - return address == NULL ? null : new XSelectionClearEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionClearEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionClearEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionClearEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionClearEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XSelectionClearEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XSelectionClearEvent malloc(MemoryStack stack) { - return new XSelectionClearEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XSelectionClearEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XSelectionClearEvent calloc(MemoryStack stack) { - return new XSelectionClearEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XSelectionClearEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XSelectionClearEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XSelectionClearEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XSelectionClearEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XSelectionClearEvent.WINDOW); } - /** Unsafe version of {@link #selection}. */ - public static long nselection(long struct) { return memGetCLong(struct + XSelectionClearEvent.SELECTION); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XSelectionClearEvent.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XSelectionClearEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XSelectionClearEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XSelectionClearEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XSelectionClearEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XSelectionClearEvent.WINDOW, value); } - /** Unsafe version of {@link #selection(long) selection}. */ - public static void nselection(long struct, long value) { memPutCLong(struct + XSelectionClearEvent.SELECTION, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XSelectionClearEvent.TIME, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XSelectionClearEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XSelectionClearEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XSelectionClearEvent ELEMENT_FACTORY = XSelectionClearEvent.create(-1L); - - /** - * Creates a new {@code XSelectionClearEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XSelectionClearEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XSelectionClearEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XSelectionClearEvent.ntype(address()); } - /** @return the value of the {@link XSelectionClearEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XSelectionClearEvent.nserial(address()); } - /** @return the value of the {@link XSelectionClearEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XSelectionClearEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XSelectionClearEvent#display} field. */ - @NativeType("Display *") - public long display() { return XSelectionClearEvent.ndisplay(address()); } - /** @return the value of the {@link XSelectionClearEvent#window} field. */ - @NativeType("Window") - public long window() { return XSelectionClearEvent.nwindow(address()); } - /** @return the value of the {@code selection} field. */ - @NativeType("Atom") - public long selection() { return XSelectionClearEvent.nselection(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return XSelectionClearEvent.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XSelectionClearEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionClearEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XSelectionClearEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionClearEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XSelectionClearEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XSelectionClearEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XSelectionClearEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionClearEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XSelectionClearEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code selection} field. */ - public Buffer selection(@NativeType("Atom") long value) { XSelectionClearEvent.nselection(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("Time") long value) { XSelectionClearEvent.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionEvent.java deleted file mode 100644 index 372ad0b5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionEvent.java +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Selection event structure. - * - *

    Layout

    - * - *
    
    - * struct XSelectionEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window requestor;
    - *     Atom selection;
    - *     Atom target;
    - *     Atom {@link #property};
    - *     Time time;
    - * }
    - */ -public class XSelectionEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - REQUESTOR, - SELECTION, - TARGET, - PROPERTY, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - REQUESTOR = layout.offsetof(4); - SELECTION = layout.offsetof(5); - TARGET = layout.offsetof(6); - PROPERTY = layout.offsetof(7); - TIME = layout.offsetof(8); - } - - protected XSelectionEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XSelectionEvent create(long address, @Nullable ByteBuffer container) { - return new XSelectionEvent(address, container); - } - - /** - * Creates a {@code XSelectionEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XSelectionEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code requestor} field. */ - @NativeType("Window") - public long requestor() { return nrequestor(address()); } - /** @return the value of the {@code selection} field. */ - @NativeType("Atom") - public long selection() { return nselection(address()); } - /** @return the value of the {@code target} field. */ - @NativeType("Atom") - public long target() { return ntarget(address()); } - /** atom or {@link X11#None} */ - @NativeType("Atom") - public long property() { return nproperty(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XSelectionEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XSelectionEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XSelectionEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XSelectionEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code requestor} field. */ - public XSelectionEvent requestor(@NativeType("Window") long value) { nrequestor(address(), value); return this; } - /** Sets the specified value to the {@code selection} field. */ - public XSelectionEvent selection(@NativeType("Atom") long value) { nselection(address(), value); return this; } - /** Sets the specified value to the {@code target} field. */ - public XSelectionEvent target(@NativeType("Atom") long value) { ntarget(address(), value); return this; } - /** Sets the specified value to the {@link #property} field. */ - public XSelectionEvent property(@NativeType("Atom") long value) { nproperty(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XSelectionEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XSelectionEvent set( - int type, - long serial, - boolean send_event, - long display, - long requestor, - long selection, - long target, - long property, - long time - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - requestor(requestor); - selection(selection); - target(target); - property(property); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XSelectionEvent set(XSelectionEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XSelectionEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XSelectionEvent malloc() { - return new XSelectionEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XSelectionEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XSelectionEvent calloc() { - return new XSelectionEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XSelectionEvent} instance allocated with {@link BufferUtils}. */ - public static XSelectionEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XSelectionEvent(memAddress(container), container); - } - - /** Returns a new {@code XSelectionEvent} instance for the specified memory address. */ - public static XSelectionEvent create(long address) { - return new XSelectionEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XSelectionEvent createSafe(long address) { - return address == NULL ? null : new XSelectionEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XSelectionEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XSelectionEvent malloc(MemoryStack stack) { - return new XSelectionEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XSelectionEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XSelectionEvent calloc(MemoryStack stack) { - return new XSelectionEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XSelectionEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XSelectionEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XSelectionEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XSelectionEvent.DISPLAY); } - /** Unsafe version of {@link #requestor}. */ - public static long nrequestor(long struct) { return memGetCLong(struct + XSelectionEvent.REQUESTOR); } - /** Unsafe version of {@link #selection}. */ - public static long nselection(long struct) { return memGetCLong(struct + XSelectionEvent.SELECTION); } - /** Unsafe version of {@link #target}. */ - public static long ntarget(long struct) { return memGetCLong(struct + XSelectionEvent.TARGET); } - /** Unsafe version of {@link #property}. */ - public static long nproperty(long struct) { return memGetCLong(struct + XSelectionEvent.PROPERTY); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XSelectionEvent.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XSelectionEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XSelectionEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XSelectionEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XSelectionEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #requestor(long) requestor}. */ - public static void nrequestor(long struct, long value) { memPutCLong(struct + XSelectionEvent.REQUESTOR, value); } - /** Unsafe version of {@link #selection(long) selection}. */ - public static void nselection(long struct, long value) { memPutCLong(struct + XSelectionEvent.SELECTION, value); } - /** Unsafe version of {@link #target(long) target}. */ - public static void ntarget(long struct, long value) { memPutCLong(struct + XSelectionEvent.TARGET, value); } - /** Unsafe version of {@link #property(long) property}. */ - public static void nproperty(long struct, long value) { memPutCLong(struct + XSelectionEvent.PROPERTY, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XSelectionEvent.TIME, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XSelectionEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XSelectionEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XSelectionEvent ELEMENT_FACTORY = XSelectionEvent.create(-1L); - - /** - * Creates a new {@code XSelectionEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XSelectionEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XSelectionEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XSelectionEvent.ntype(address()); } - /** @return the value of the {@link XSelectionEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XSelectionEvent.nserial(address()); } - /** @return the value of the {@link XSelectionEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XSelectionEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XSelectionEvent#display} field. */ - @NativeType("Display *") - public long display() { return XSelectionEvent.ndisplay(address()); } - /** @return the value of the {@code requestor} field. */ - @NativeType("Window") - public long requestor() { return XSelectionEvent.nrequestor(address()); } - /** @return the value of the {@code selection} field. */ - @NativeType("Atom") - public long selection() { return XSelectionEvent.nselection(address()); } - /** @return the value of the {@code target} field. */ - @NativeType("Atom") - public long target() { return XSelectionEvent.ntarget(address()); } - /** @return the value of the {@link XSelectionEvent#property} field. */ - @NativeType("Atom") - public long property() { return XSelectionEvent.nproperty(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return XSelectionEvent.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XSelectionEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XSelectionEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XSelectionEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XSelectionEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XSelectionEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code requestor} field. */ - public Buffer requestor(@NativeType("Window") long value) { XSelectionEvent.nrequestor(address(), value); return this; } - /** Sets the specified value to the {@code selection} field. */ - public Buffer selection(@NativeType("Atom") long value) { XSelectionEvent.nselection(address(), value); return this; } - /** Sets the specified value to the {@code target} field. */ - public Buffer target(@NativeType("Atom") long value) { XSelectionEvent.ntarget(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionEvent#property} field. */ - public Buffer property(@NativeType("Atom") long value) { XSelectionEvent.nproperty(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("Time") long value) { XSelectionEvent.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionRequestEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionRequestEvent.java deleted file mode 100644 index aec6799c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XSelectionRequestEvent.java +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * SelectionRequest event structure. - * - *

    Layout

    - * - *
    
    - * struct XSelectionRequestEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window owner;
    - *     Window requestor;
    - *     Atom selection;
    - *     Atom target;
    - *     Atom property;
    - *     Time time;
    - * }
    - */ -public class XSelectionRequestEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - OWNER, - REQUESTOR, - SELECTION, - TARGET, - PROPERTY, - TIME; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - OWNER = layout.offsetof(4); - REQUESTOR = layout.offsetof(5); - SELECTION = layout.offsetof(6); - TARGET = layout.offsetof(7); - PROPERTY = layout.offsetof(8); - TIME = layout.offsetof(9); - } - - protected XSelectionRequestEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XSelectionRequestEvent create(long address, @Nullable ByteBuffer container) { - return new XSelectionRequestEvent(address, container); - } - - /** - * Creates a {@code XSelectionRequestEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XSelectionRequestEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code owner} field. */ - @NativeType("Window") - public long owner() { return nowner(address()); } - /** @return the value of the {@code requestor} field. */ - @NativeType("Window") - public long requestor() { return nrequestor(address()); } - /** @return the value of the {@code selection} field. */ - @NativeType("Atom") - public long selection() { return nselection(address()); } - /** @return the value of the {@code target} field. */ - @NativeType("Atom") - public long target() { return ntarget(address()); } - /** @return the value of the {@code property} field. */ - @NativeType("Atom") - public long property() { return nproperty(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XSelectionRequestEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XSelectionRequestEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XSelectionRequestEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XSelectionRequestEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code owner} field. */ - public XSelectionRequestEvent owner(@NativeType("Window") long value) { nowner(address(), value); return this; } - /** Sets the specified value to the {@code requestor} field. */ - public XSelectionRequestEvent requestor(@NativeType("Window") long value) { nrequestor(address(), value); return this; } - /** Sets the specified value to the {@code selection} field. */ - public XSelectionRequestEvent selection(@NativeType("Atom") long value) { nselection(address(), value); return this; } - /** Sets the specified value to the {@code target} field. */ - public XSelectionRequestEvent target(@NativeType("Atom") long value) { ntarget(address(), value); return this; } - /** Sets the specified value to the {@code property} field. */ - public XSelectionRequestEvent property(@NativeType("Atom") long value) { nproperty(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public XSelectionRequestEvent time(@NativeType("Time") long value) { ntime(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XSelectionRequestEvent set( - int type, - long serial, - boolean send_event, - long display, - long owner, - long requestor, - long selection, - long target, - long property, - long time - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - owner(owner); - requestor(requestor); - selection(selection); - target(target); - property(property); - time(time); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XSelectionRequestEvent set(XSelectionRequestEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XSelectionRequestEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XSelectionRequestEvent malloc() { - return new XSelectionRequestEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XSelectionRequestEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XSelectionRequestEvent calloc() { - return new XSelectionRequestEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XSelectionRequestEvent} instance allocated with {@link BufferUtils}. */ - public static XSelectionRequestEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XSelectionRequestEvent(memAddress(container), container); - } - - /** Returns a new {@code XSelectionRequestEvent} instance for the specified memory address. */ - public static XSelectionRequestEvent create(long address) { - return new XSelectionRequestEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XSelectionRequestEvent createSafe(long address) { - return address == NULL ? null : new XSelectionRequestEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionRequestEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionRequestEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionRequestEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSelectionRequestEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XSelectionRequestEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XSelectionRequestEvent malloc(MemoryStack stack) { - return new XSelectionRequestEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XSelectionRequestEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XSelectionRequestEvent calloc(MemoryStack stack) { - return new XSelectionRequestEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XSelectionRequestEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XSelectionRequestEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XSelectionRequestEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XSelectionRequestEvent.DISPLAY); } - /** Unsafe version of {@link #owner}. */ - public static long nowner(long struct) { return memGetCLong(struct + XSelectionRequestEvent.OWNER); } - /** Unsafe version of {@link #requestor}. */ - public static long nrequestor(long struct) { return memGetCLong(struct + XSelectionRequestEvent.REQUESTOR); } - /** Unsafe version of {@link #selection}. */ - public static long nselection(long struct) { return memGetCLong(struct + XSelectionRequestEvent.SELECTION); } - /** Unsafe version of {@link #target}. */ - public static long ntarget(long struct) { return memGetCLong(struct + XSelectionRequestEvent.TARGET); } - /** Unsafe version of {@link #property}. */ - public static long nproperty(long struct) { return memGetCLong(struct + XSelectionRequestEvent.PROPERTY); } - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XSelectionRequestEvent.TIME); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XSelectionRequestEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XSelectionRequestEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XSelectionRequestEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XSelectionRequestEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #owner(long) owner}. */ - public static void nowner(long struct, long value) { memPutCLong(struct + XSelectionRequestEvent.OWNER, value); } - /** Unsafe version of {@link #requestor(long) requestor}. */ - public static void nrequestor(long struct, long value) { memPutCLong(struct + XSelectionRequestEvent.REQUESTOR, value); } - /** Unsafe version of {@link #selection(long) selection}. */ - public static void nselection(long struct, long value) { memPutCLong(struct + XSelectionRequestEvent.SELECTION, value); } - /** Unsafe version of {@link #target(long) target}. */ - public static void ntarget(long struct, long value) { memPutCLong(struct + XSelectionRequestEvent.TARGET, value); } - /** Unsafe version of {@link #property(long) property}. */ - public static void nproperty(long struct, long value) { memPutCLong(struct + XSelectionRequestEvent.PROPERTY, value); } - /** Unsafe version of {@link #time(long) time}. */ - public static void ntime(long struct, long value) { memPutCLong(struct + XSelectionRequestEvent.TIME, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XSelectionRequestEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XSelectionRequestEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XSelectionRequestEvent ELEMENT_FACTORY = XSelectionRequestEvent.create(-1L); - - /** - * Creates a new {@code XSelectionRequestEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XSelectionRequestEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XSelectionRequestEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XSelectionRequestEvent.ntype(address()); } - /** @return the value of the {@link XSelectionRequestEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XSelectionRequestEvent.nserial(address()); } - /** @return the value of the {@link XSelectionRequestEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XSelectionRequestEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XSelectionRequestEvent#display} field. */ - @NativeType("Display *") - public long display() { return XSelectionRequestEvent.ndisplay(address()); } - /** @return the value of the {@code owner} field. */ - @NativeType("Window") - public long owner() { return XSelectionRequestEvent.nowner(address()); } - /** @return the value of the {@code requestor} field. */ - @NativeType("Window") - public long requestor() { return XSelectionRequestEvent.nrequestor(address()); } - /** @return the value of the {@code selection} field. */ - @NativeType("Atom") - public long selection() { return XSelectionRequestEvent.nselection(address()); } - /** @return the value of the {@code target} field. */ - @NativeType("Atom") - public long target() { return XSelectionRequestEvent.ntarget(address()); } - /** @return the value of the {@code property} field. */ - @NativeType("Atom") - public long property() { return XSelectionRequestEvent.nproperty(address()); } - /** @return the value of the {@code time} field. */ - @NativeType("Time") - public long time() { return XSelectionRequestEvent.ntime(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XSelectionRequestEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionRequestEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XSelectionRequestEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XSelectionRequestEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XSelectionRequestEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XSelectionRequestEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XSelectionRequestEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code owner} field. */ - public Buffer owner(@NativeType("Window") long value) { XSelectionRequestEvent.nowner(address(), value); return this; } - /** Sets the specified value to the {@code requestor} field. */ - public Buffer requestor(@NativeType("Window") long value) { XSelectionRequestEvent.nrequestor(address(), value); return this; } - /** Sets the specified value to the {@code selection} field. */ - public Buffer selection(@NativeType("Atom") long value) { XSelectionRequestEvent.nselection(address(), value); return this; } - /** Sets the specified value to the {@code target} field. */ - public Buffer target(@NativeType("Atom") long value) { XSelectionRequestEvent.ntarget(address(), value); return this; } - /** Sets the specified value to the {@code property} field. */ - public Buffer property(@NativeType("Atom") long value) { XSelectionRequestEvent.nproperty(address(), value); return this; } - /** Sets the specified value to the {@code time} field. */ - public Buffer time(@NativeType("Time") long value) { XSelectionRequestEvent.ntime(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XSetWindowAttributes.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XSetWindowAttributes.java deleted file mode 100644 index a2f582c3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XSetWindowAttributes.java +++ /dev/null @@ -1,556 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Data structure for setting window attributes. - * - *

    Layout

    - * - *
    
    - * struct XSetWindowAttributes {
    - *     Pixmap background_pixmap;
    - *     unsigned long background_pixel;
    - *     Pixmap border_pixmap;
    - *     unsigned long border_pixel;
    - *     int bit_gravity;
    - *     int win_gravity;
    - *     int backing_store;
    - *     unsigned long backing_planes;
    - *     unsigned long backing_pixel;
    - *     Bool save_under;
    - *     long event_mask;
    - *     long do_not_propagate_mask;
    - *     Bool override_redirect;
    - *     Colormap colormap;
    - *     Cursor cursor;
    - * }
    - */ -public class XSetWindowAttributes extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BACKGROUND_PIXMAP, - BACKGROUND_PIXEL, - BORDER_PIXMAP, - BORDER_PIXEL, - BIT_GRAVITY, - WIN_GRAVITY, - BACKING_STORE, - BACKING_PLANES, - BACKING_PIXEL, - SAVE_UNDER, - EVENT_MASK, - DO_NOT_PROPAGATE_MASK, - OVERRIDE_REDIRECT, - COLORMAP, - CURSOR; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BACKGROUND_PIXMAP = layout.offsetof(0); - BACKGROUND_PIXEL = layout.offsetof(1); - BORDER_PIXMAP = layout.offsetof(2); - BORDER_PIXEL = layout.offsetof(3); - BIT_GRAVITY = layout.offsetof(4); - WIN_GRAVITY = layout.offsetof(5); - BACKING_STORE = layout.offsetof(6); - BACKING_PLANES = layout.offsetof(7); - BACKING_PIXEL = layout.offsetof(8); - SAVE_UNDER = layout.offsetof(9); - EVENT_MASK = layout.offsetof(10); - DO_NOT_PROPAGATE_MASK = layout.offsetof(11); - OVERRIDE_REDIRECT = layout.offsetof(12); - COLORMAP = layout.offsetof(13); - CURSOR = layout.offsetof(14); - } - - protected XSetWindowAttributes(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XSetWindowAttributes create(long address, @Nullable ByteBuffer container) { - return new XSetWindowAttributes(address, container); - } - - /** - * Creates a {@code XSetWindowAttributes} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XSetWindowAttributes(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code background_pixmap} field. */ - @NativeType("Pixmap") - public long background_pixmap() { return nbackground_pixmap(address()); } - /** @return the value of the {@code background_pixel} field. */ - @NativeType("unsigned long") - public long background_pixel() { return nbackground_pixel(address()); } - /** @return the value of the {@code border_pixmap} field. */ - @NativeType("Pixmap") - public long border_pixmap() { return nborder_pixmap(address()); } - /** @return the value of the {@code border_pixel} field. */ - @NativeType("unsigned long") - public long border_pixel() { return nborder_pixel(address()); } - /** @return the value of the {@code bit_gravity} field. */ - public int bit_gravity() { return nbit_gravity(address()); } - /** @return the value of the {@code win_gravity} field. */ - public int win_gravity() { return nwin_gravity(address()); } - /** @return the value of the {@code backing_store} field. */ - public int backing_store() { return nbacking_store(address()); } - /** @return the value of the {@code backing_planes} field. */ - @NativeType("unsigned long") - public long backing_planes() { return nbacking_planes(address()); } - /** @return the value of the {@code backing_pixel} field. */ - @NativeType("unsigned long") - public long backing_pixel() { return nbacking_pixel(address()); } - /** @return the value of the {@code save_under} field. */ - @NativeType("Bool") - public boolean save_under() { return nsave_under(address()) != 0; } - /** @return the value of the {@code event_mask} field. */ - public long event_mask() { return nevent_mask(address()); } - /** @return the value of the {@code do_not_propagate_mask} field. */ - public long do_not_propagate_mask() { return ndo_not_propagate_mask(address()); } - /** @return the value of the {@code override_redirect} field. */ - @NativeType("Bool") - public boolean override_redirect() { return noverride_redirect(address()) != 0; } - /** @return the value of the {@code colormap} field. */ - @NativeType("Colormap") - public long colormap() { return ncolormap(address()); } - /** @return the value of the {@code cursor} field. */ - @NativeType("Cursor") - public long cursor() { return ncursor(address()); } - - /** Sets the specified value to the {@code background_pixmap} field. */ - public XSetWindowAttributes background_pixmap(@NativeType("Pixmap") long value) { nbackground_pixmap(address(), value); return this; } - /** Sets the specified value to the {@code background_pixel} field. */ - public XSetWindowAttributes background_pixel(@NativeType("unsigned long") long value) { nbackground_pixel(address(), value); return this; } - /** Sets the specified value to the {@code border_pixmap} field. */ - public XSetWindowAttributes border_pixmap(@NativeType("Pixmap") long value) { nborder_pixmap(address(), value); return this; } - /** Sets the specified value to the {@code border_pixel} field. */ - public XSetWindowAttributes border_pixel(@NativeType("unsigned long") long value) { nborder_pixel(address(), value); return this; } - /** Sets the specified value to the {@code bit_gravity} field. */ - public XSetWindowAttributes bit_gravity(int value) { nbit_gravity(address(), value); return this; } - /** Sets the specified value to the {@code win_gravity} field. */ - public XSetWindowAttributes win_gravity(int value) { nwin_gravity(address(), value); return this; } - /** Sets the specified value to the {@code backing_store} field. */ - public XSetWindowAttributes backing_store(int value) { nbacking_store(address(), value); return this; } - /** Sets the specified value to the {@code backing_planes} field. */ - public XSetWindowAttributes backing_planes(@NativeType("unsigned long") long value) { nbacking_planes(address(), value); return this; } - /** Sets the specified value to the {@code backing_pixel} field. */ - public XSetWindowAttributes backing_pixel(@NativeType("unsigned long") long value) { nbacking_pixel(address(), value); return this; } - /** Sets the specified value to the {@code save_under} field. */ - public XSetWindowAttributes save_under(@NativeType("Bool") boolean value) { nsave_under(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code event_mask} field. */ - public XSetWindowAttributes event_mask(long value) { nevent_mask(address(), value); return this; } - /** Sets the specified value to the {@code do_not_propagate_mask} field. */ - public XSetWindowAttributes do_not_propagate_mask(long value) { ndo_not_propagate_mask(address(), value); return this; } - /** Sets the specified value to the {@code override_redirect} field. */ - public XSetWindowAttributes override_redirect(@NativeType("Bool") boolean value) { noverride_redirect(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code colormap} field. */ - public XSetWindowAttributes colormap(@NativeType("Colormap") long value) { ncolormap(address(), value); return this; } - /** Sets the specified value to the {@code cursor} field. */ - public XSetWindowAttributes cursor(@NativeType("Cursor") long value) { ncursor(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XSetWindowAttributes set( - long background_pixmap, - long background_pixel, - long border_pixmap, - long border_pixel, - int bit_gravity, - int win_gravity, - int backing_store, - long backing_planes, - long backing_pixel, - boolean save_under, - long event_mask, - long do_not_propagate_mask, - boolean override_redirect, - long colormap, - long cursor - ) { - background_pixmap(background_pixmap); - background_pixel(background_pixel); - border_pixmap(border_pixmap); - border_pixel(border_pixel); - bit_gravity(bit_gravity); - win_gravity(win_gravity); - backing_store(backing_store); - backing_planes(backing_planes); - backing_pixel(backing_pixel); - save_under(save_under); - event_mask(event_mask); - do_not_propagate_mask(do_not_propagate_mask); - override_redirect(override_redirect); - colormap(colormap); - cursor(cursor); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XSetWindowAttributes set(XSetWindowAttributes src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XSetWindowAttributes} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XSetWindowAttributes malloc() { - return new XSetWindowAttributes(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XSetWindowAttributes} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XSetWindowAttributes calloc() { - return new XSetWindowAttributes(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XSetWindowAttributes} instance allocated with {@link BufferUtils}. */ - public static XSetWindowAttributes create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XSetWindowAttributes(memAddress(container), container); - } - - /** Returns a new {@code XSetWindowAttributes} instance for the specified memory address. */ - public static XSetWindowAttributes create(long address) { - return new XSetWindowAttributes(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XSetWindowAttributes createSafe(long address) { - return address == NULL ? null : new XSetWindowAttributes(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSetWindowAttributes mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSetWindowAttributes callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XSetWindowAttributes mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XSetWindowAttributes callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XSetWindowAttributes} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XSetWindowAttributes malloc(MemoryStack stack) { - return new XSetWindowAttributes(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XSetWindowAttributes} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XSetWindowAttributes calloc(MemoryStack stack) { - return new XSetWindowAttributes(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #background_pixmap}. */ - public static long nbackground_pixmap(long struct) { return memGetCLong(struct + XSetWindowAttributes.BACKGROUND_PIXMAP); } - /** Unsafe version of {@link #background_pixel}. */ - public static long nbackground_pixel(long struct) { return memGetCLong(struct + XSetWindowAttributes.BACKGROUND_PIXEL); } - /** Unsafe version of {@link #border_pixmap}. */ - public static long nborder_pixmap(long struct) { return memGetCLong(struct + XSetWindowAttributes.BORDER_PIXMAP); } - /** Unsafe version of {@link #border_pixel}. */ - public static long nborder_pixel(long struct) { return memGetCLong(struct + XSetWindowAttributes.BORDER_PIXEL); } - /** Unsafe version of {@link #bit_gravity}. */ - public static int nbit_gravity(long struct) { return UNSAFE.getInt(null, struct + XSetWindowAttributes.BIT_GRAVITY); } - /** Unsafe version of {@link #win_gravity}. */ - public static int nwin_gravity(long struct) { return UNSAFE.getInt(null, struct + XSetWindowAttributes.WIN_GRAVITY); } - /** Unsafe version of {@link #backing_store}. */ - public static int nbacking_store(long struct) { return UNSAFE.getInt(null, struct + XSetWindowAttributes.BACKING_STORE); } - /** Unsafe version of {@link #backing_planes}. */ - public static long nbacking_planes(long struct) { return memGetCLong(struct + XSetWindowAttributes.BACKING_PLANES); } - /** Unsafe version of {@link #backing_pixel}. */ - public static long nbacking_pixel(long struct) { return memGetCLong(struct + XSetWindowAttributes.BACKING_PIXEL); } - /** Unsafe version of {@link #save_under}. */ - public static int nsave_under(long struct) { return UNSAFE.getInt(null, struct + XSetWindowAttributes.SAVE_UNDER); } - /** Unsafe version of {@link #event_mask}. */ - public static long nevent_mask(long struct) { return memGetCLong(struct + XSetWindowAttributes.EVENT_MASK); } - /** Unsafe version of {@link #do_not_propagate_mask}. */ - public static long ndo_not_propagate_mask(long struct) { return memGetCLong(struct + XSetWindowAttributes.DO_NOT_PROPAGATE_MASK); } - /** Unsafe version of {@link #override_redirect}. */ - public static int noverride_redirect(long struct) { return UNSAFE.getInt(null, struct + XSetWindowAttributes.OVERRIDE_REDIRECT); } - /** Unsafe version of {@link #colormap}. */ - public static long ncolormap(long struct) { return memGetCLong(struct + XSetWindowAttributes.COLORMAP); } - /** Unsafe version of {@link #cursor}. */ - public static long ncursor(long struct) { return memGetCLong(struct + XSetWindowAttributes.CURSOR); } - - /** Unsafe version of {@link #background_pixmap(long) background_pixmap}. */ - public static void nbackground_pixmap(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.BACKGROUND_PIXMAP, value); } - /** Unsafe version of {@link #background_pixel(long) background_pixel}. */ - public static void nbackground_pixel(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.BACKGROUND_PIXEL, value); } - /** Unsafe version of {@link #border_pixmap(long) border_pixmap}. */ - public static void nborder_pixmap(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.BORDER_PIXMAP, value); } - /** Unsafe version of {@link #border_pixel(long) border_pixel}. */ - public static void nborder_pixel(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.BORDER_PIXEL, value); } - /** Unsafe version of {@link #bit_gravity(int) bit_gravity}. */ - public static void nbit_gravity(long struct, int value) { UNSAFE.putInt(null, struct + XSetWindowAttributes.BIT_GRAVITY, value); } - /** Unsafe version of {@link #win_gravity(int) win_gravity}. */ - public static void nwin_gravity(long struct, int value) { UNSAFE.putInt(null, struct + XSetWindowAttributes.WIN_GRAVITY, value); } - /** Unsafe version of {@link #backing_store(int) backing_store}. */ - public static void nbacking_store(long struct, int value) { UNSAFE.putInt(null, struct + XSetWindowAttributes.BACKING_STORE, value); } - /** Unsafe version of {@link #backing_planes(long) backing_planes}. */ - public static void nbacking_planes(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.BACKING_PLANES, value); } - /** Unsafe version of {@link #backing_pixel(long) backing_pixel}. */ - public static void nbacking_pixel(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.BACKING_PIXEL, value); } - /** Unsafe version of {@link #save_under(boolean) save_under}. */ - public static void nsave_under(long struct, int value) { UNSAFE.putInt(null, struct + XSetWindowAttributes.SAVE_UNDER, value); } - /** Unsafe version of {@link #event_mask(long) event_mask}. */ - public static void nevent_mask(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.EVENT_MASK, value); } - /** Unsafe version of {@link #do_not_propagate_mask(long) do_not_propagate_mask}. */ - public static void ndo_not_propagate_mask(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.DO_NOT_PROPAGATE_MASK, value); } - /** Unsafe version of {@link #override_redirect(boolean) override_redirect}. */ - public static void noverride_redirect(long struct, int value) { UNSAFE.putInt(null, struct + XSetWindowAttributes.OVERRIDE_REDIRECT, value); } - /** Unsafe version of {@link #colormap(long) colormap}. */ - public static void ncolormap(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.COLORMAP, value); } - /** Unsafe version of {@link #cursor(long) cursor}. */ - public static void ncursor(long struct, long value) { memPutCLong(struct + XSetWindowAttributes.CURSOR, value); } - - // ----------------------------------- - - /** An array of {@link XSetWindowAttributes} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XSetWindowAttributes ELEMENT_FACTORY = XSetWindowAttributes.create(-1L); - - /** - * Creates a new {@code XSetWindowAttributes.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XSetWindowAttributes#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XSetWindowAttributes getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code background_pixmap} field. */ - @NativeType("Pixmap") - public long background_pixmap() { return XSetWindowAttributes.nbackground_pixmap(address()); } - /** @return the value of the {@code background_pixel} field. */ - @NativeType("unsigned long") - public long background_pixel() { return XSetWindowAttributes.nbackground_pixel(address()); } - /** @return the value of the {@code border_pixmap} field. */ - @NativeType("Pixmap") - public long border_pixmap() { return XSetWindowAttributes.nborder_pixmap(address()); } - /** @return the value of the {@code border_pixel} field. */ - @NativeType("unsigned long") - public long border_pixel() { return XSetWindowAttributes.nborder_pixel(address()); } - /** @return the value of the {@code bit_gravity} field. */ - public int bit_gravity() { return XSetWindowAttributes.nbit_gravity(address()); } - /** @return the value of the {@code win_gravity} field. */ - public int win_gravity() { return XSetWindowAttributes.nwin_gravity(address()); } - /** @return the value of the {@code backing_store} field. */ - public int backing_store() { return XSetWindowAttributes.nbacking_store(address()); } - /** @return the value of the {@code backing_planes} field. */ - @NativeType("unsigned long") - public long backing_planes() { return XSetWindowAttributes.nbacking_planes(address()); } - /** @return the value of the {@code backing_pixel} field. */ - @NativeType("unsigned long") - public long backing_pixel() { return XSetWindowAttributes.nbacking_pixel(address()); } - /** @return the value of the {@code save_under} field. */ - @NativeType("Bool") - public boolean save_under() { return XSetWindowAttributes.nsave_under(address()) != 0; } - /** @return the value of the {@code event_mask} field. */ - public long event_mask() { return XSetWindowAttributes.nevent_mask(address()); } - /** @return the value of the {@code do_not_propagate_mask} field. */ - public long do_not_propagate_mask() { return XSetWindowAttributes.ndo_not_propagate_mask(address()); } - /** @return the value of the {@code override_redirect} field. */ - @NativeType("Bool") - public boolean override_redirect() { return XSetWindowAttributes.noverride_redirect(address()) != 0; } - /** @return the value of the {@code colormap} field. */ - @NativeType("Colormap") - public long colormap() { return XSetWindowAttributes.ncolormap(address()); } - /** @return the value of the {@code cursor} field. */ - @NativeType("Cursor") - public long cursor() { return XSetWindowAttributes.ncursor(address()); } - - /** Sets the specified value to the {@code background_pixmap} field. */ - public Buffer background_pixmap(@NativeType("Pixmap") long value) { XSetWindowAttributes.nbackground_pixmap(address(), value); return this; } - /** Sets the specified value to the {@code background_pixel} field. */ - public Buffer background_pixel(@NativeType("unsigned long") long value) { XSetWindowAttributes.nbackground_pixel(address(), value); return this; } - /** Sets the specified value to the {@code border_pixmap} field. */ - public Buffer border_pixmap(@NativeType("Pixmap") long value) { XSetWindowAttributes.nborder_pixmap(address(), value); return this; } - /** Sets the specified value to the {@code border_pixel} field. */ - public Buffer border_pixel(@NativeType("unsigned long") long value) { XSetWindowAttributes.nborder_pixel(address(), value); return this; } - /** Sets the specified value to the {@code bit_gravity} field. */ - public Buffer bit_gravity(int value) { XSetWindowAttributes.nbit_gravity(address(), value); return this; } - /** Sets the specified value to the {@code win_gravity} field. */ - public Buffer win_gravity(int value) { XSetWindowAttributes.nwin_gravity(address(), value); return this; } - /** Sets the specified value to the {@code backing_store} field. */ - public Buffer backing_store(int value) { XSetWindowAttributes.nbacking_store(address(), value); return this; } - /** Sets the specified value to the {@code backing_planes} field. */ - public Buffer backing_planes(@NativeType("unsigned long") long value) { XSetWindowAttributes.nbacking_planes(address(), value); return this; } - /** Sets the specified value to the {@code backing_pixel} field. */ - public Buffer backing_pixel(@NativeType("unsigned long") long value) { XSetWindowAttributes.nbacking_pixel(address(), value); return this; } - /** Sets the specified value to the {@code save_under} field. */ - public Buffer save_under(@NativeType("Bool") boolean value) { XSetWindowAttributes.nsave_under(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code event_mask} field. */ - public Buffer event_mask(long value) { XSetWindowAttributes.nevent_mask(address(), value); return this; } - /** Sets the specified value to the {@code do_not_propagate_mask} field. */ - public Buffer do_not_propagate_mask(long value) { XSetWindowAttributes.ndo_not_propagate_mask(address(), value); return this; } - /** Sets the specified value to the {@code override_redirect} field. */ - public Buffer override_redirect(@NativeType("Bool") boolean value) { XSetWindowAttributes.noverride_redirect(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@code colormap} field. */ - public Buffer colormap(@NativeType("Colormap") long value) { XSetWindowAttributes.ncolormap(address(), value); return this; } - /** Sets the specified value to the {@code cursor} field. */ - public Buffer cursor(@NativeType("Cursor") long value) { XSetWindowAttributes.ncursor(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XTimeCoord.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XTimeCoord.java deleted file mode 100644 index 9696559e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XTimeCoord.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct XTimeCoord {
    - *     Time {@link #time};
    - *     short {@link #x};
    - *     short {@link #y};
    - * }
    - */ -public class XTimeCoord extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TIME, - X, - Y; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TIME = layout.offsetof(0); - X = layout.offsetof(1); - Y = layout.offsetof(2); - } - - protected XTimeCoord(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XTimeCoord create(long address, @Nullable ByteBuffer container) { - return new XTimeCoord(address, container); - } - - /** - * Creates a {@code XTimeCoord} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XTimeCoord(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the time, in milliseconds */ - @NativeType("Time") - public long time() { return ntime(address()); } - /** the x coordinate of the pointer relative to the origin of the specified window */ - public short x() { return nx(address()); } - /** the y coordinate of the pointer relative to the origin of the specified window */ - public short y() { return ny(address()); } - - // ----------------------------------- - - /** Returns a new {@code XTimeCoord} instance for the specified memory address. */ - public static XTimeCoord create(long address) { - return new XTimeCoord(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XTimeCoord createSafe(long address) { - return address == NULL ? null : new XTimeCoord(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #time}. */ - public static long ntime(long struct) { return memGetCLong(struct + XTimeCoord.TIME); } - /** Unsafe version of {@link #x}. */ - public static short nx(long struct) { return UNSAFE.getShort(null, struct + XTimeCoord.X); } - /** Unsafe version of {@link #y}. */ - public static short ny(long struct) { return UNSAFE.getShort(null, struct + XTimeCoord.Y); } - - // ----------------------------------- - - /** An array of {@link XTimeCoord} structs. */ - public static class Buffer extends StructBuffer { - - private static final XTimeCoord ELEMENT_FACTORY = XTimeCoord.create(-1L); - - /** - * Creates a new {@code XTimeCoord.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XTimeCoord#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XTimeCoord getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link XTimeCoord#time} field. */ - @NativeType("Time") - public long time() { return XTimeCoord.ntime(address()); } - /** @return the value of the {@link XTimeCoord#x} field. */ - public short x() { return XTimeCoord.nx(address()); } - /** @return the value of the {@link XTimeCoord#y} field. */ - public short y() { return XTimeCoord.ny(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XUnmapEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XUnmapEvent.java deleted file mode 100644 index b9f3c4a6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XUnmapEvent.java +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XUnmapEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window event;
    - *     Window window;
    - *     int from_configure;
    - * }
    - */ -public class XUnmapEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - EVENT, - WINDOW, - FROM_CONFIGURE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - EVENT = layout.offsetof(4); - WINDOW = layout.offsetof(5); - FROM_CONFIGURE = layout.offsetof(6); - } - - protected XUnmapEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XUnmapEvent create(long address, @Nullable ByteBuffer container) { - return new XUnmapEvent(address, container); - } - - /** - * Creates a {@code XUnmapEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XUnmapEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** @return the value of the {@code from_configure} field. */ - public int from_configure() { return nfrom_configure(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XUnmapEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XUnmapEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XUnmapEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XUnmapEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public XUnmapEvent event(@NativeType("Window") long value) { nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public XUnmapEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@code from_configure} field. */ - public XUnmapEvent from_configure(int value) { nfrom_configure(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XUnmapEvent set( - int type, - long serial, - boolean send_event, - long display, - long event, - long window, - int from_configure - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - event(event); - window(window); - from_configure(from_configure); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XUnmapEvent set(XUnmapEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XUnmapEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XUnmapEvent malloc() { - return new XUnmapEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XUnmapEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XUnmapEvent calloc() { - return new XUnmapEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XUnmapEvent} instance allocated with {@link BufferUtils}. */ - public static XUnmapEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XUnmapEvent(memAddress(container), container); - } - - /** Returns a new {@code XUnmapEvent} instance for the specified memory address. */ - public static XUnmapEvent create(long address) { - return new XUnmapEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XUnmapEvent createSafe(long address) { - return address == NULL ? null : new XUnmapEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XUnmapEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XUnmapEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XUnmapEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XUnmapEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XUnmapEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XUnmapEvent malloc(MemoryStack stack) { - return new XUnmapEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XUnmapEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XUnmapEvent calloc(MemoryStack stack) { - return new XUnmapEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XUnmapEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XUnmapEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XUnmapEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XUnmapEvent.DISPLAY); } - /** Unsafe version of {@link #event}. */ - public static long nevent(long struct) { return memGetCLong(struct + XUnmapEvent.EVENT); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XUnmapEvent.WINDOW); } - /** Unsafe version of {@link #from_configure}. */ - public static int nfrom_configure(long struct) { return UNSAFE.getInt(null, struct + XUnmapEvent.FROM_CONFIGURE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XUnmapEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XUnmapEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XUnmapEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XUnmapEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #event(long) event}. */ - public static void nevent(long struct, long value) { memPutCLong(struct + XUnmapEvent.EVENT, value); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XUnmapEvent.WINDOW, value); } - /** Unsafe version of {@link #from_configure(int) from_configure}. */ - public static void nfrom_configure(long struct, int value) { UNSAFE.putInt(null, struct + XUnmapEvent.FROM_CONFIGURE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XUnmapEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XUnmapEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XUnmapEvent ELEMENT_FACTORY = XUnmapEvent.create(-1L); - - /** - * Creates a new {@code XUnmapEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XUnmapEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XUnmapEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XUnmapEvent.ntype(address()); } - /** @return the value of the {@link XUnmapEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XUnmapEvent.nserial(address()); } - /** @return the value of the {@link XUnmapEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XUnmapEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XUnmapEvent#display} field. */ - @NativeType("Display *") - public long display() { return XUnmapEvent.ndisplay(address()); } - /** @return the value of the {@code event} field. */ - @NativeType("Window") - public long event() { return XUnmapEvent.nevent(address()); } - /** @return the value of the {@code window} field. */ - @NativeType("Window") - public long window() { return XUnmapEvent.nwindow(address()); } - /** @return the value of the {@code from_configure} field. */ - public int from_configure() { return XUnmapEvent.nfrom_configure(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XUnmapEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XUnmapEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XUnmapEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XUnmapEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XUnmapEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XUnmapEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XUnmapEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@code event} field. */ - public Buffer event(@NativeType("Window") long value) { XUnmapEvent.nevent(address(), value); return this; } - /** Sets the specified value to the {@code window} field. */ - public Buffer window(@NativeType("Window") long value) { XUnmapEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@code from_configure} field. */ - public Buffer from_configure(int value) { XUnmapEvent.nfrom_configure(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XVisibilityEvent.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XVisibilityEvent.java deleted file mode 100644 index dd6632f3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XVisibilityEvent.java +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct XVisibilityEvent {
    - *     int type;
    - *     unsigned long {@link #serial};
    - *     Bool {@link #send_event};
    - *     Display * {@link #display};
    - *     Window {@link #window};
    - *     int {@link #state};
    - * }
    - */ -public class XVisibilityEvent extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - SERIAL, - SEND_EVENT, - DISPLAY, - WINDOW, - STATE; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - SERIAL = layout.offsetof(1); - SEND_EVENT = layout.offsetof(2); - DISPLAY = layout.offsetof(3); - WINDOW = layout.offsetof(4); - STATE = layout.offsetof(5); - } - - protected XVisibilityEvent(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XVisibilityEvent create(long address, @Nullable ByteBuffer container) { - return new XVisibilityEvent(address, container); - } - - /** - * Creates a {@code XVisibilityEvent} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XVisibilityEvent(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - public int type() { return ntype(address()); } - /** # of last request processed by server */ - @NativeType("unsigned long") - public long serial() { return nserial(address()); } - /** true if this came from an {@link X11#XSendEvent} request */ - @NativeType("Bool") - public boolean send_event() { return nsend_event(address()) != 0; } - /** {@code Display} the event was read from */ - @NativeType("Display *") - public long display() { return ndisplay(address()); } - /** window it reported relative to */ - @NativeType("Window") - public long window() { return nwindow(address()); } - /** visibility state */ - public int state() { return nstate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public XVisibilityEvent type(int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@link #serial} field. */ - public XVisibilityEvent serial(@NativeType("unsigned long") long value) { nserial(address(), value); return this; } - /** Sets the specified value to the {@link #send_event} field. */ - public XVisibilityEvent send_event(@NativeType("Bool") boolean value) { nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link #display} field. */ - public XVisibilityEvent display(@NativeType("Display *") long value) { ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link #window} field. */ - public XVisibilityEvent window(@NativeType("Window") long value) { nwindow(address(), value); return this; } - /** Sets the specified value to the {@link #state} field. */ - public XVisibilityEvent state(int value) { nstate(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XVisibilityEvent set( - int type, - long serial, - boolean send_event, - long display, - long window, - int state - ) { - type(type); - serial(serial); - send_event(send_event); - display(display); - window(window); - state(state); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XVisibilityEvent set(XVisibilityEvent src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XVisibilityEvent} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XVisibilityEvent malloc() { - return new XVisibilityEvent(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XVisibilityEvent} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XVisibilityEvent calloc() { - return new XVisibilityEvent(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XVisibilityEvent} instance allocated with {@link BufferUtils}. */ - public static XVisibilityEvent create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XVisibilityEvent(memAddress(container), container); - } - - /** Returns a new {@code XVisibilityEvent} instance for the specified memory address. */ - public static XVisibilityEvent create(long address) { - return new XVisibilityEvent(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XVisibilityEvent createSafe(long address) { - return address == NULL ? null : new XVisibilityEvent(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XVisibilityEvent mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XVisibilityEvent callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XVisibilityEvent mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XVisibilityEvent callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XVisibilityEvent} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XVisibilityEvent malloc(MemoryStack stack) { - return new XVisibilityEvent(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XVisibilityEvent} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XVisibilityEvent calloc(MemoryStack stack) { - return new XVisibilityEvent(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + XVisibilityEvent.TYPE); } - /** Unsafe version of {@link #serial}. */ - public static long nserial(long struct) { return memGetCLong(struct + XVisibilityEvent.SERIAL); } - /** Unsafe version of {@link #send_event}. */ - public static int nsend_event(long struct) { return UNSAFE.getInt(null, struct + XVisibilityEvent.SEND_EVENT); } - /** Unsafe version of {@link #display}. */ - public static long ndisplay(long struct) { return memGetAddress(struct + XVisibilityEvent.DISPLAY); } - /** Unsafe version of {@link #window}. */ - public static long nwindow(long struct) { return memGetCLong(struct + XVisibilityEvent.WINDOW); } - /** Unsafe version of {@link #state}. */ - public static int nstate(long struct) { return UNSAFE.getInt(null, struct + XVisibilityEvent.STATE); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + XVisibilityEvent.TYPE, value); } - /** Unsafe version of {@link #serial(long) serial}. */ - public static void nserial(long struct, long value) { memPutCLong(struct + XVisibilityEvent.SERIAL, value); } - /** Unsafe version of {@link #send_event(boolean) send_event}. */ - public static void nsend_event(long struct, int value) { UNSAFE.putInt(null, struct + XVisibilityEvent.SEND_EVENT, value); } - /** Unsafe version of {@link #display(long) display}. */ - public static void ndisplay(long struct, long value) { memPutAddress(struct + XVisibilityEvent.DISPLAY, check(value)); } - /** Unsafe version of {@link #window(long) window}. */ - public static void nwindow(long struct, long value) { memPutCLong(struct + XVisibilityEvent.WINDOW, value); } - /** Unsafe version of {@link #state(int) state}. */ - public static void nstate(long struct, int value) { UNSAFE.putInt(null, struct + XVisibilityEvent.STATE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XVisibilityEvent.DISPLAY)); - } - - // ----------------------------------- - - /** An array of {@link XVisibilityEvent} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XVisibilityEvent ELEMENT_FACTORY = XVisibilityEvent.create(-1L); - - /** - * Creates a new {@code XVisibilityEvent.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XVisibilityEvent#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XVisibilityEvent getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - public int type() { return XVisibilityEvent.ntype(address()); } - /** @return the value of the {@link XVisibilityEvent#serial} field. */ - @NativeType("unsigned long") - public long serial() { return XVisibilityEvent.nserial(address()); } - /** @return the value of the {@link XVisibilityEvent#send_event} field. */ - @NativeType("Bool") - public boolean send_event() { return XVisibilityEvent.nsend_event(address()) != 0; } - /** @return the value of the {@link XVisibilityEvent#display} field. */ - @NativeType("Display *") - public long display() { return XVisibilityEvent.ndisplay(address()); } - /** @return the value of the {@link XVisibilityEvent#window} field. */ - @NativeType("Window") - public long window() { return XVisibilityEvent.nwindow(address()); } - /** @return the value of the {@link XVisibilityEvent#state} field. */ - public int state() { return XVisibilityEvent.nstate(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(int value) { XVisibilityEvent.ntype(address(), value); return this; } - /** Sets the specified value to the {@link XVisibilityEvent#serial} field. */ - public Buffer serial(@NativeType("unsigned long") long value) { XVisibilityEvent.nserial(address(), value); return this; } - /** Sets the specified value to the {@link XVisibilityEvent#send_event} field. */ - public Buffer send_event(@NativeType("Bool") boolean value) { XVisibilityEvent.nsend_event(address(), value ? 1 : 0); return this; } - /** Sets the specified value to the {@link XVisibilityEvent#display} field. */ - public Buffer display(@NativeType("Display *") long value) { XVisibilityEvent.ndisplay(address(), value); return this; } - /** Sets the specified value to the {@link XVisibilityEvent#window} field. */ - public Buffer window(@NativeType("Window") long value) { XVisibilityEvent.nwindow(address(), value); return this; } - /** Sets the specified value to the {@link XVisibilityEvent#state} field. */ - public Buffer state(int value) { XVisibilityEvent.nstate(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/XVisualInfo.java b/LWJGL/src/main/java/org/lwjgl/system/linux/XVisualInfo.java deleted file mode 100644 index bac705d3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/XVisualInfo.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Information used by the visual utility routines to find desired visual type from the many visuals a display may support. - * - *

    Layout

    - * - *
    
    - * struct XVisualInfo {
    - *     {@link Visual Visual} * visual;
    - *     VisualID visualid;
    - *     int screen;
    - *     int depth;
    - *     int class;
    - *     unsigned long red_mask;
    - *     unsigned long green_mask;
    - *     unsigned long blue_mask;
    - *     int colormap_size;
    - *     int bits_per_rgb;
    - * }
    - */ -public class XVisualInfo extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VISUAL, - VISUALID, - SCREEN, - DEPTH, - CLASS, - RED_MASK, - GREEN_MASK, - BLUE_MASK, - COLORMAP_SIZE, - BITS_PER_RGB; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(4), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VISUAL = layout.offsetof(0); - VISUALID = layout.offsetof(1); - SCREEN = layout.offsetof(2); - DEPTH = layout.offsetof(3); - CLASS = layout.offsetof(4); - RED_MASK = layout.offsetof(5); - GREEN_MASK = layout.offsetof(6); - BLUE_MASK = layout.offsetof(7); - COLORMAP_SIZE = layout.offsetof(8); - BITS_PER_RGB = layout.offsetof(9); - } - - protected XVisualInfo(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected XVisualInfo create(long address, @Nullable ByteBuffer container) { - return new XVisualInfo(address, container); - } - - /** - * Creates a {@code XVisualInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public XVisualInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link Visual} view of the struct pointed to by the {@code visual} field. */ - @NativeType("Visual *") - public Visual visual() { return nvisual(address()); } - /** @return the value of the {@code visualid} field. */ - @NativeType("VisualID") - public long visualid() { return nvisualid(address()); } - /** @return the value of the {@code screen} field. */ - public int screen() { return nscreen(address()); } - /** @return the value of the {@code depth} field. */ - public int depth() { return ndepth(address()); } - /** @return the value of the {@code class} field. */ - public int class$() { return nclass$(address()); } - /** @return the value of the {@code red_mask} field. */ - @NativeType("unsigned long") - public long red_mask() { return nred_mask(address()); } - /** @return the value of the {@code green_mask} field. */ - @NativeType("unsigned long") - public long green_mask() { return ngreen_mask(address()); } - /** @return the value of the {@code blue_mask} field. */ - @NativeType("unsigned long") - public long blue_mask() { return nblue_mask(address()); } - /** @return the value of the {@code colormap_size} field. */ - public int colormap_size() { return ncolormap_size(address()); } - /** @return the value of the {@code bits_per_rgb} field. */ - public int bits_per_rgb() { return nbits_per_rgb(address()); } - - /** Sets the address of the specified {@link Visual} to the {@code visual} field. */ - public XVisualInfo visual(@NativeType("Visual *") Visual value) { nvisual(address(), value); return this; } - /** Sets the specified value to the {@code visualid} field. */ - public XVisualInfo visualid(@NativeType("VisualID") long value) { nvisualid(address(), value); return this; } - /** Sets the specified value to the {@code screen} field. */ - public XVisualInfo screen(int value) { nscreen(address(), value); return this; } - /** Sets the specified value to the {@code depth} field. */ - public XVisualInfo depth(int value) { ndepth(address(), value); return this; } - /** Sets the specified value to the {@code class} field. */ - public XVisualInfo class$(int value) { nclass$(address(), value); return this; } - /** Sets the specified value to the {@code red_mask} field. */ - public XVisualInfo red_mask(@NativeType("unsigned long") long value) { nred_mask(address(), value); return this; } - /** Sets the specified value to the {@code green_mask} field. */ - public XVisualInfo green_mask(@NativeType("unsigned long") long value) { ngreen_mask(address(), value); return this; } - /** Sets the specified value to the {@code blue_mask} field. */ - public XVisualInfo blue_mask(@NativeType("unsigned long") long value) { nblue_mask(address(), value); return this; } - /** Sets the specified value to the {@code colormap_size} field. */ - public XVisualInfo colormap_size(int value) { ncolormap_size(address(), value); return this; } - /** Sets the specified value to the {@code bits_per_rgb} field. */ - public XVisualInfo bits_per_rgb(int value) { nbits_per_rgb(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public XVisualInfo set( - Visual visual, - long visualid, - int screen, - int depth, - int class$, - long red_mask, - long green_mask, - long blue_mask, - int colormap_size, - int bits_per_rgb - ) { - visual(visual); - visualid(visualid); - screen(screen); - depth(depth); - class$(class$); - red_mask(red_mask); - green_mask(green_mask); - blue_mask(blue_mask); - colormap_size(colormap_size); - bits_per_rgb(bits_per_rgb); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public XVisualInfo set(XVisualInfo src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code XVisualInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static XVisualInfo malloc() { - return new XVisualInfo(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code XVisualInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static XVisualInfo calloc() { - return new XVisualInfo(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code XVisualInfo} instance allocated with {@link BufferUtils}. */ - public static XVisualInfo create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new XVisualInfo(memAddress(container), container); - } - - /** Returns a new {@code XVisualInfo} instance for the specified memory address. */ - public static XVisualInfo create(long address) { - return new XVisualInfo(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static XVisualInfo createSafe(long address) { - return address == NULL ? null : new XVisualInfo(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XVisualInfo mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XVisualInfo callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static XVisualInfo mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static XVisualInfo callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code XVisualInfo} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static XVisualInfo malloc(MemoryStack stack) { - return new XVisualInfo(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code XVisualInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static XVisualInfo calloc(MemoryStack stack) { - return new XVisualInfo(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #visual}. */ - public static Visual nvisual(long struct) { return Visual.create(memGetAddress(struct + XVisualInfo.VISUAL)); } - /** Unsafe version of {@link #visualid}. */ - public static long nvisualid(long struct) { return memGetCLong(struct + XVisualInfo.VISUALID); } - /** Unsafe version of {@link #screen}. */ - public static int nscreen(long struct) { return UNSAFE.getInt(null, struct + XVisualInfo.SCREEN); } - /** Unsafe version of {@link #depth}. */ - public static int ndepth(long struct) { return UNSAFE.getInt(null, struct + XVisualInfo.DEPTH); } - /** Unsafe version of {@link #class$}. */ - public static int nclass$(long struct) { return UNSAFE.getInt(null, struct + XVisualInfo.CLASS); } - /** Unsafe version of {@link #red_mask}. */ - public static long nred_mask(long struct) { return memGetCLong(struct + XVisualInfo.RED_MASK); } - /** Unsafe version of {@link #green_mask}. */ - public static long ngreen_mask(long struct) { return memGetCLong(struct + XVisualInfo.GREEN_MASK); } - /** Unsafe version of {@link #blue_mask}. */ - public static long nblue_mask(long struct) { return memGetCLong(struct + XVisualInfo.BLUE_MASK); } - /** Unsafe version of {@link #colormap_size}. */ - public static int ncolormap_size(long struct) { return UNSAFE.getInt(null, struct + XVisualInfo.COLORMAP_SIZE); } - /** Unsafe version of {@link #bits_per_rgb}. */ - public static int nbits_per_rgb(long struct) { return UNSAFE.getInt(null, struct + XVisualInfo.BITS_PER_RGB); } - - /** Unsafe version of {@link #visual(Visual) visual}. */ - public static void nvisual(long struct, Visual value) { memPutAddress(struct + XVisualInfo.VISUAL, value.address()); } - /** Unsafe version of {@link #visualid(long) visualid}. */ - public static void nvisualid(long struct, long value) { memPutCLong(struct + XVisualInfo.VISUALID, value); } - /** Unsafe version of {@link #screen(int) screen}. */ - public static void nscreen(long struct, int value) { UNSAFE.putInt(null, struct + XVisualInfo.SCREEN, value); } - /** Unsafe version of {@link #depth(int) depth}. */ - public static void ndepth(long struct, int value) { UNSAFE.putInt(null, struct + XVisualInfo.DEPTH, value); } - /** Unsafe version of {@link #class$(int) class$}. */ - public static void nclass$(long struct, int value) { UNSAFE.putInt(null, struct + XVisualInfo.CLASS, value); } - /** Unsafe version of {@link #red_mask(long) red_mask}. */ - public static void nred_mask(long struct, long value) { memPutCLong(struct + XVisualInfo.RED_MASK, value); } - /** Unsafe version of {@link #green_mask(long) green_mask}. */ - public static void ngreen_mask(long struct, long value) { memPutCLong(struct + XVisualInfo.GREEN_MASK, value); } - /** Unsafe version of {@link #blue_mask(long) blue_mask}. */ - public static void nblue_mask(long struct, long value) { memPutCLong(struct + XVisualInfo.BLUE_MASK, value); } - /** Unsafe version of {@link #colormap_size(int) colormap_size}. */ - public static void ncolormap_size(long struct, int value) { UNSAFE.putInt(null, struct + XVisualInfo.COLORMAP_SIZE, value); } - /** Unsafe version of {@link #bits_per_rgb(int) bits_per_rgb}. */ - public static void nbits_per_rgb(long struct, int value) { UNSAFE.putInt(null, struct + XVisualInfo.BITS_PER_RGB, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + XVisualInfo.VISUAL)); - } - - // ----------------------------------- - - /** An array of {@link XVisualInfo} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final XVisualInfo ELEMENT_FACTORY = XVisualInfo.create(-1L); - - /** - * Creates a new {@code XVisualInfo.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link XVisualInfo#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected XVisualInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link Visual} view of the struct pointed to by the {@code visual} field. */ - @NativeType("Visual *") - public Visual visual() { return XVisualInfo.nvisual(address()); } - /** @return the value of the {@code visualid} field. */ - @NativeType("VisualID") - public long visualid() { return XVisualInfo.nvisualid(address()); } - /** @return the value of the {@code screen} field. */ - public int screen() { return XVisualInfo.nscreen(address()); } - /** @return the value of the {@code depth} field. */ - public int depth() { return XVisualInfo.ndepth(address()); } - /** @return the value of the {@code class} field. */ - public int class$() { return XVisualInfo.nclass$(address()); } - /** @return the value of the {@code red_mask} field. */ - @NativeType("unsigned long") - public long red_mask() { return XVisualInfo.nred_mask(address()); } - /** @return the value of the {@code green_mask} field. */ - @NativeType("unsigned long") - public long green_mask() { return XVisualInfo.ngreen_mask(address()); } - /** @return the value of the {@code blue_mask} field. */ - @NativeType("unsigned long") - public long blue_mask() { return XVisualInfo.nblue_mask(address()); } - /** @return the value of the {@code colormap_size} field. */ - public int colormap_size() { return XVisualInfo.ncolormap_size(address()); } - /** @return the value of the {@code bits_per_rgb} field. */ - public int bits_per_rgb() { return XVisualInfo.nbits_per_rgb(address()); } - - /** Sets the address of the specified {@link Visual} to the {@code visual} field. */ - public Buffer visual(@NativeType("Visual *") Visual value) { XVisualInfo.nvisual(address(), value); return this; } - /** Sets the specified value to the {@code visualid} field. */ - public Buffer visualid(@NativeType("VisualID") long value) { XVisualInfo.nvisualid(address(), value); return this; } - /** Sets the specified value to the {@code screen} field. */ - public Buffer screen(int value) { XVisualInfo.nscreen(address(), value); return this; } - /** Sets the specified value to the {@code depth} field. */ - public Buffer depth(int value) { XVisualInfo.ndepth(address(), value); return this; } - /** Sets the specified value to the {@code class} field. */ - public Buffer class$(int value) { XVisualInfo.nclass$(address(), value); return this; } - /** Sets the specified value to the {@code red_mask} field. */ - public Buffer red_mask(@NativeType("unsigned long") long value) { XVisualInfo.nred_mask(address(), value); return this; } - /** Sets the specified value to the {@code green_mask} field. */ - public Buffer green_mask(@NativeType("unsigned long") long value) { XVisualInfo.ngreen_mask(address(), value); return this; } - /** Sets the specified value to the {@code blue_mask} field. */ - public Buffer blue_mask(@NativeType("unsigned long") long value) { XVisualInfo.nblue_mask(address(), value); return this; } - /** Sets the specified value to the {@code colormap_size} field. */ - public Buffer colormap_size(int value) { XVisualInfo.ncolormap_size(address(), value); return this; } - /** Sets the specified value to the {@code bits_per_rgb} field. */ - public Buffer bits_per_rgb(int value) { XVisualInfo.nbits_per_rgb(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOCQRingOffsets.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOCQRingOffsets.java deleted file mode 100644 index 8ee99f92..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOCQRingOffsets.java +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_cqring_offsets {
    - *     __u32 head;
    - *     __u32 tail;
    - *     __u32 ring_mask;
    - *     __u32 ring_entries;
    - *     __u32 overflow;
    - *     __u32 cqes;
    - *     __u32 flags;
    - *     __u32 resv1;
    - *     __u64 resv2;
    - * }
    - */ -@NativeType("struct io_cqring_offsets") -public class IOCQRingOffsets extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - HEAD, - TAIL, - RING_MASK, - RING_ENTRIES, - OVERFLOW, - CQES, - FLAGS, - RESV1, - RESV2; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - HEAD = layout.offsetof(0); - TAIL = layout.offsetof(1); - RING_MASK = layout.offsetof(2); - RING_ENTRIES = layout.offsetof(3); - OVERFLOW = layout.offsetof(4); - CQES = layout.offsetof(5); - FLAGS = layout.offsetof(6); - RESV1 = layout.offsetof(7); - RESV2 = layout.offsetof(8); - } - - protected IOCQRingOffsets(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOCQRingOffsets create(long address, @Nullable ByteBuffer container) { - return new IOCQRingOffsets(address, container); - } - - /** - * Creates a {@code IOCQRingOffsets} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOCQRingOffsets(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code head} field. */ - @NativeType("__u32") - public int head() { return nhead(address()); } - /** @return the value of the {@code tail} field. */ - @NativeType("__u32") - public int tail() { return ntail(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("__u32") - public int ring_mask() { return nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("__u32") - public int ring_entries() { return nring_entries(address()); } - /** @return the value of the {@code overflow} field. */ - @NativeType("__u32") - public int overflow() { return noverflow(address()); } - /** @return the value of the {@code cqes} field. */ - @NativeType("__u32") - public int cqes() { return ncqes(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return nflags(address()); } - - /** Sets the specified value to the {@code head} field. */ - public IOCQRingOffsets head(@NativeType("__u32") int value) { nhead(address(), value); return this; } - /** Sets the specified value to the {@code tail} field. */ - public IOCQRingOffsets tail(@NativeType("__u32") int value) { ntail(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public IOCQRingOffsets ring_mask(@NativeType("__u32") int value) { nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public IOCQRingOffsets ring_entries(@NativeType("__u32") int value) { nring_entries(address(), value); return this; } - /** Sets the specified value to the {@code overflow} field. */ - public IOCQRingOffsets overflow(@NativeType("__u32") int value) { noverflow(address(), value); return this; } - /** Sets the specified value to the {@code cqes} field. */ - public IOCQRingOffsets cqes(@NativeType("__u32") int value) { ncqes(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public IOCQRingOffsets flags(@NativeType("__u32") int value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOCQRingOffsets set( - int head, - int tail, - int ring_mask, - int ring_entries, - int overflow, - int cqes, - int flags - ) { - head(head); - tail(tail); - ring_mask(ring_mask); - ring_entries(ring_entries); - overflow(overflow); - cqes(cqes); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOCQRingOffsets set(IOCQRingOffsets src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOCQRingOffsets} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOCQRingOffsets malloc() { - return new IOCQRingOffsets(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOCQRingOffsets} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOCQRingOffsets calloc() { - return new IOCQRingOffsets(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOCQRingOffsets} instance allocated with {@link BufferUtils}. */ - public static IOCQRingOffsets create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOCQRingOffsets(memAddress(container), container); - } - - /** Returns a new {@code IOCQRingOffsets} instance for the specified memory address. */ - public static IOCQRingOffsets create(long address) { - return new IOCQRingOffsets(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOCQRingOffsets createSafe(long address) { - return address == NULL ? null : new IOCQRingOffsets(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOCQRingOffsets} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOCQRingOffsets malloc(MemoryStack stack) { - return new IOCQRingOffsets(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOCQRingOffsets} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOCQRingOffsets calloc(MemoryStack stack) { - return new IOCQRingOffsets(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #head}. */ - public static int nhead(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.HEAD); } - /** Unsafe version of {@link #tail}. */ - public static int ntail(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.TAIL); } - /** Unsafe version of {@link #ring_mask}. */ - public static int nring_mask(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.RING_MASK); } - /** Unsafe version of {@link #ring_entries}. */ - public static int nring_entries(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.RING_ENTRIES); } - /** Unsafe version of {@link #overflow}. */ - public static int noverflow(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.OVERFLOW); } - /** Unsafe version of {@link #cqes}. */ - public static int ncqes(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.CQES); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.FLAGS); } - public static int nresv1(long struct) { return UNSAFE.getInt(null, struct + IOCQRingOffsets.RESV1); } - public static long nresv2(long struct) { return UNSAFE.getLong(null, struct + IOCQRingOffsets.RESV2); } - - /** Unsafe version of {@link #head(int) head}. */ - public static void nhead(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.HEAD, value); } - /** Unsafe version of {@link #tail(int) tail}. */ - public static void ntail(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.TAIL, value); } - /** Unsafe version of {@link #ring_mask(int) ring_mask}. */ - public static void nring_mask(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.RING_MASK, value); } - /** Unsafe version of {@link #ring_entries(int) ring_entries}. */ - public static void nring_entries(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.RING_ENTRIES, value); } - /** Unsafe version of {@link #overflow(int) overflow}. */ - public static void noverflow(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.OVERFLOW, value); } - /** Unsafe version of {@link #cqes(int) cqes}. */ - public static void ncqes(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.CQES, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.FLAGS, value); } - public static void nresv1(long struct, int value) { UNSAFE.putInt(null, struct + IOCQRingOffsets.RESV1, value); } - public static void nresv2(long struct, long value) { UNSAFE.putLong(null, struct + IOCQRingOffsets.RESV2, value); } - - // ----------------------------------- - - /** An array of {@link IOCQRingOffsets} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOCQRingOffsets ELEMENT_FACTORY = IOCQRingOffsets.create(-1L); - - /** - * Creates a new {@code IOCQRingOffsets.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOCQRingOffsets#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOCQRingOffsets getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code head} field. */ - @NativeType("__u32") - public int head() { return IOCQRingOffsets.nhead(address()); } - /** @return the value of the {@code tail} field. */ - @NativeType("__u32") - public int tail() { return IOCQRingOffsets.ntail(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("__u32") - public int ring_mask() { return IOCQRingOffsets.nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("__u32") - public int ring_entries() { return IOCQRingOffsets.nring_entries(address()); } - /** @return the value of the {@code overflow} field. */ - @NativeType("__u32") - public int overflow() { return IOCQRingOffsets.noverflow(address()); } - /** @return the value of the {@code cqes} field. */ - @NativeType("__u32") - public int cqes() { return IOCQRingOffsets.ncqes(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return IOCQRingOffsets.nflags(address()); } - - /** Sets the specified value to the {@code head} field. */ - public Buffer head(@NativeType("__u32") int value) { IOCQRingOffsets.nhead(address(), value); return this; } - /** Sets the specified value to the {@code tail} field. */ - public Buffer tail(@NativeType("__u32") int value) { IOCQRingOffsets.ntail(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public Buffer ring_mask(@NativeType("__u32") int value) { IOCQRingOffsets.nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public Buffer ring_entries(@NativeType("__u32") int value) { IOCQRingOffsets.nring_entries(address(), value); return this; } - /** Sets the specified value to the {@code overflow} field. */ - public Buffer overflow(@NativeType("__u32") int value) { IOCQRingOffsets.noverflow(address(), value); return this; } - /** Sets the specified value to the {@code cqes} field. */ - public Buffer cqes(@NativeType("__u32") int value) { IOCQRingOffsets.ncqes(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("__u32") int value) { IOCQRingOffsets.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOSQRingOffsets.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOSQRingOffsets.java deleted file mode 100644 index 2c28bf6c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOSQRingOffsets.java +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Filled with the offset for {@code mmap(2)}. - * - *

    Layout

    - * - *
    
    - * struct io_sqring_offsets {
    - *     __u32 head;
    - *     __u32 tail;
    - *     __u32 ring_mask;
    - *     __u32 ring_entries;
    - *     __u32 flags;
    - *     __u32 dropped;
    - *     __u32 array;
    - *     __u32 resv1;
    - *     __u64 resv2;
    - * }
    - */ -@NativeType("struct io_sqring_offsets") -public class IOSQRingOffsets extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - HEAD, - TAIL, - RING_MASK, - RING_ENTRIES, - FLAGS, - DROPPED, - ARRAY, - RESV1, - RESV2; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - HEAD = layout.offsetof(0); - TAIL = layout.offsetof(1); - RING_MASK = layout.offsetof(2); - RING_ENTRIES = layout.offsetof(3); - FLAGS = layout.offsetof(4); - DROPPED = layout.offsetof(5); - ARRAY = layout.offsetof(6); - RESV1 = layout.offsetof(7); - RESV2 = layout.offsetof(8); - } - - protected IOSQRingOffsets(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOSQRingOffsets create(long address, @Nullable ByteBuffer container) { - return new IOSQRingOffsets(address, container); - } - - /** - * Creates a {@code IOSQRingOffsets} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOSQRingOffsets(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code head} field. */ - @NativeType("__u32") - public int head() { return nhead(address()); } - /** @return the value of the {@code tail} field. */ - @NativeType("__u32") - public int tail() { return ntail(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("__u32") - public int ring_mask() { return nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("__u32") - public int ring_entries() { return nring_entries(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return nflags(address()); } - /** @return the value of the {@code dropped} field. */ - @NativeType("__u32") - public int dropped() { return ndropped(address()); } - /** @return the value of the {@code array} field. */ - @NativeType("__u32") - public int array() { return narray(address()); } - - /** Sets the specified value to the {@code head} field. */ - public IOSQRingOffsets head(@NativeType("__u32") int value) { nhead(address(), value); return this; } - /** Sets the specified value to the {@code tail} field. */ - public IOSQRingOffsets tail(@NativeType("__u32") int value) { ntail(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public IOSQRingOffsets ring_mask(@NativeType("__u32") int value) { nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public IOSQRingOffsets ring_entries(@NativeType("__u32") int value) { nring_entries(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public IOSQRingOffsets flags(@NativeType("__u32") int value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code dropped} field. */ - public IOSQRingOffsets dropped(@NativeType("__u32") int value) { ndropped(address(), value); return this; } - /** Sets the specified value to the {@code array} field. */ - public IOSQRingOffsets array(@NativeType("__u32") int value) { narray(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOSQRingOffsets set( - int head, - int tail, - int ring_mask, - int ring_entries, - int flags, - int dropped, - int array - ) { - head(head); - tail(tail); - ring_mask(ring_mask); - ring_entries(ring_entries); - flags(flags); - dropped(dropped); - array(array); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOSQRingOffsets set(IOSQRingOffsets src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOSQRingOffsets} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOSQRingOffsets malloc() { - return new IOSQRingOffsets(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOSQRingOffsets} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOSQRingOffsets calloc() { - return new IOSQRingOffsets(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOSQRingOffsets} instance allocated with {@link BufferUtils}. */ - public static IOSQRingOffsets create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOSQRingOffsets(memAddress(container), container); - } - - /** Returns a new {@code IOSQRingOffsets} instance for the specified memory address. */ - public static IOSQRingOffsets create(long address) { - return new IOSQRingOffsets(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOSQRingOffsets createSafe(long address) { - return address == NULL ? null : new IOSQRingOffsets(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOSQRingOffsets} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOSQRingOffsets malloc(MemoryStack stack) { - return new IOSQRingOffsets(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOSQRingOffsets} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOSQRingOffsets calloc(MemoryStack stack) { - return new IOSQRingOffsets(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #head}. */ - public static int nhead(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.HEAD); } - /** Unsafe version of {@link #tail}. */ - public static int ntail(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.TAIL); } - /** Unsafe version of {@link #ring_mask}. */ - public static int nring_mask(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.RING_MASK); } - /** Unsafe version of {@link #ring_entries}. */ - public static int nring_entries(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.RING_ENTRIES); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.FLAGS); } - /** Unsafe version of {@link #dropped}. */ - public static int ndropped(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.DROPPED); } - /** Unsafe version of {@link #array}. */ - public static int narray(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.ARRAY); } - public static int nresv1(long struct) { return UNSAFE.getInt(null, struct + IOSQRingOffsets.RESV1); } - public static long nresv2(long struct) { return UNSAFE.getLong(null, struct + IOSQRingOffsets.RESV2); } - - /** Unsafe version of {@link #head(int) head}. */ - public static void nhead(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.HEAD, value); } - /** Unsafe version of {@link #tail(int) tail}. */ - public static void ntail(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.TAIL, value); } - /** Unsafe version of {@link #ring_mask(int) ring_mask}. */ - public static void nring_mask(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.RING_MASK, value); } - /** Unsafe version of {@link #ring_entries(int) ring_entries}. */ - public static void nring_entries(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.RING_ENTRIES, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.FLAGS, value); } - /** Unsafe version of {@link #dropped(int) dropped}. */ - public static void ndropped(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.DROPPED, value); } - /** Unsafe version of {@link #array(int) array}. */ - public static void narray(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.ARRAY, value); } - public static void nresv1(long struct, int value) { UNSAFE.putInt(null, struct + IOSQRingOffsets.RESV1, value); } - public static void nresv2(long struct, long value) { UNSAFE.putLong(null, struct + IOSQRingOffsets.RESV2, value); } - - // ----------------------------------- - - /** An array of {@link IOSQRingOffsets} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOSQRingOffsets ELEMENT_FACTORY = IOSQRingOffsets.create(-1L); - - /** - * Creates a new {@code IOSQRingOffsets.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOSQRingOffsets#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOSQRingOffsets getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code head} field. */ - @NativeType("__u32") - public int head() { return IOSQRingOffsets.nhead(address()); } - /** @return the value of the {@code tail} field. */ - @NativeType("__u32") - public int tail() { return IOSQRingOffsets.ntail(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("__u32") - public int ring_mask() { return IOSQRingOffsets.nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("__u32") - public int ring_entries() { return IOSQRingOffsets.nring_entries(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return IOSQRingOffsets.nflags(address()); } - /** @return the value of the {@code dropped} field. */ - @NativeType("__u32") - public int dropped() { return IOSQRingOffsets.ndropped(address()); } - /** @return the value of the {@code array} field. */ - @NativeType("__u32") - public int array() { return IOSQRingOffsets.narray(address()); } - - /** Sets the specified value to the {@code head} field. */ - public Buffer head(@NativeType("__u32") int value) { IOSQRingOffsets.nhead(address(), value); return this; } - /** Sets the specified value to the {@code tail} field. */ - public Buffer tail(@NativeType("__u32") int value) { IOSQRingOffsets.ntail(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public Buffer ring_mask(@NativeType("__u32") int value) { IOSQRingOffsets.nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public Buffer ring_entries(@NativeType("__u32") int value) { IOSQRingOffsets.nring_entries(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("__u32") int value) { IOSQRingOffsets.nflags(address(), value); return this; } - /** Sets the specified value to the {@code dropped} field. */ - public Buffer dropped(@NativeType("__u32") int value) { IOSQRingOffsets.ndropped(address(), value); return this; } - /** Sets the specified value to the {@code array} field. */ - public Buffer array(@NativeType("__u32") int value) { IOSQRingOffsets.narray(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURing.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURing.java deleted file mode 100644 index ccf4c1a3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURing.java +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring {
    - *     {@link IOURingSQ struct io_uring_sq} sq;
    - *     {@link IOURingCQ struct io_uring_cq} cq;
    - *     unsigned int flags;
    - *     int ring_fd;
    - *     unsigned int features;
    - *     int enter_ring_fd;
    - *     __u8 int_flags;
    - *     __u8 pad[3];
    - *     unsigned pad2;
    - * }
    - */ -@NativeType("struct io_uring") -public class IOURing extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SQ, - CQ, - FLAGS, - RING_FD, - FEATURES, - ENTER_RING_FD, - INT_FLAGS, - PAD, - PAD2; - - static { - Layout layout = __struct( - __member(IOURingSQ.SIZEOF, IOURingSQ.ALIGNOF), - __member(IOURingCQ.SIZEOF, IOURingCQ.ALIGNOF), - __member(4), - __member(4), - __member(4), - __member(4), - __member(1), - __array(1, 3), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SQ = layout.offsetof(0); - CQ = layout.offsetof(1); - FLAGS = layout.offsetof(2); - RING_FD = layout.offsetof(3); - FEATURES = layout.offsetof(4); - ENTER_RING_FD = layout.offsetof(5); - INT_FLAGS = layout.offsetof(6); - PAD = layout.offsetof(7); - PAD2 = layout.offsetof(8); - } - - protected IOURing(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURing create(long address, @Nullable ByteBuffer container) { - return new IOURing(address, container); - } - - /** - * Creates a {@code IOURing} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURing(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link IOURingSQ} view of the {@code sq} field. */ - @NativeType("struct io_uring_sq") - public IOURingSQ sq() { return nsq(address()); } - /** @return a {@link IOURingCQ} view of the {@code cq} field. */ - @NativeType("struct io_uring_cq") - public IOURingCQ cq() { return ncq(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("unsigned int") - public int flags() { return nflags(address()); } - /** @return the value of the {@code ring_fd} field. */ - public int ring_fd() { return nring_fd(address()); } - /** @return the value of the {@code features} field. */ - @NativeType("unsigned int") - public int features() { return nfeatures(address()); } - /** @return the value of the {@code enter_ring_fd} field. */ - public int enter_ring_fd() { return nenter_ring_fd(address()); } - /** @return the value of the {@code int_flags} field. */ - @NativeType("__u8") - public byte int_flags() { return nint_flags(address()); } - - /** Copies the specified {@link IOURingSQ} to the {@code sq} field. */ - public IOURing sq(@NativeType("struct io_uring_sq") IOURingSQ value) { nsq(address(), value); return this; } - /** Passes the {@code sq} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURing sq(java.util.function.Consumer consumer) { consumer.accept(sq()); return this; } - /** Copies the specified {@link IOURingCQ} to the {@code cq} field. */ - public IOURing cq(@NativeType("struct io_uring_cq") IOURingCQ value) { ncq(address(), value); return this; } - /** Passes the {@code cq} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURing cq(java.util.function.Consumer consumer) { consumer.accept(cq()); return this; } - /** Sets the specified value to the {@code flags} field. */ - public IOURing flags(@NativeType("unsigned int") int value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code ring_fd} field. */ - public IOURing ring_fd(int value) { nring_fd(address(), value); return this; } - /** Sets the specified value to the {@code features} field. */ - public IOURing features(@NativeType("unsigned int") int value) { nfeatures(address(), value); return this; } - /** Sets the specified value to the {@code enter_ring_fd} field. */ - public IOURing enter_ring_fd(int value) { nenter_ring_fd(address(), value); return this; } - /** Sets the specified value to the {@code int_flags} field. */ - public IOURing int_flags(@NativeType("__u8") byte value) { nint_flags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURing set( - IOURingSQ sq, - IOURingCQ cq, - int flags, - int ring_fd, - int features, - int enter_ring_fd, - byte int_flags - ) { - sq(sq); - cq(cq); - flags(flags); - ring_fd(ring_fd); - features(features); - enter_ring_fd(enter_ring_fd); - int_flags(int_flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURing set(IOURing src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURing} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURing malloc() { - return new IOURing(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURing} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURing calloc() { - return new IOURing(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURing} instance allocated with {@link BufferUtils}. */ - public static IOURing create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURing(memAddress(container), container); - } - - /** Returns a new {@code IOURing} instance for the specified memory address. */ - public static IOURing create(long address) { - return new IOURing(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURing createSafe(long address) { - return address == NULL ? null : new IOURing(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURing} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURing malloc(MemoryStack stack) { - return new IOURing(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURing} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURing calloc(MemoryStack stack) { - return new IOURing(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #sq}. */ - public static IOURingSQ nsq(long struct) { return IOURingSQ.create(struct + IOURing.SQ); } - /** Unsafe version of {@link #cq}. */ - public static IOURingCQ ncq(long struct) { return IOURingCQ.create(struct + IOURing.CQ); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOURing.FLAGS); } - /** Unsafe version of {@link #ring_fd}. */ - public static int nring_fd(long struct) { return UNSAFE.getInt(null, struct + IOURing.RING_FD); } - /** Unsafe version of {@link #features}. */ - public static int nfeatures(long struct) { return UNSAFE.getInt(null, struct + IOURing.FEATURES); } - /** Unsafe version of {@link #enter_ring_fd}. */ - public static int nenter_ring_fd(long struct) { return UNSAFE.getInt(null, struct + IOURing.ENTER_RING_FD); } - /** Unsafe version of {@link #int_flags}. */ - public static byte nint_flags(long struct) { return UNSAFE.getByte(null, struct + IOURing.INT_FLAGS); } - public static ByteBuffer npad(long struct) { return memByteBuffer(struct + IOURing.PAD, 3); } - public static byte npad(long struct, int index) { - return UNSAFE.getByte(null, struct + IOURing.PAD + check(index, 3) * 1); - } - public static int npad2(long struct) { return UNSAFE.getInt(null, struct + IOURing.PAD2); } - - /** Unsafe version of {@link #sq(IOURingSQ) sq}. */ - public static void nsq(long struct, IOURingSQ value) { memCopy(value.address(), struct + IOURing.SQ, IOURingSQ.SIZEOF); } - /** Unsafe version of {@link #cq(IOURingCQ) cq}. */ - public static void ncq(long struct, IOURingCQ value) { memCopy(value.address(), struct + IOURing.CQ, IOURingCQ.SIZEOF); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOURing.FLAGS, value); } - /** Unsafe version of {@link #ring_fd(int) ring_fd}. */ - public static void nring_fd(long struct, int value) { UNSAFE.putInt(null, struct + IOURing.RING_FD, value); } - /** Unsafe version of {@link #features(int) features}. */ - public static void nfeatures(long struct, int value) { UNSAFE.putInt(null, struct + IOURing.FEATURES, value); } - /** Unsafe version of {@link #enter_ring_fd(int) enter_ring_fd}. */ - public static void nenter_ring_fd(long struct, int value) { UNSAFE.putInt(null, struct + IOURing.ENTER_RING_FD, value); } - /** Unsafe version of {@link #int_flags(byte) int_flags}. */ - public static void nint_flags(long struct, byte value) { UNSAFE.putByte(null, struct + IOURing.INT_FLAGS, value); } - public static void npad(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 3); } - memCopy(memAddress(value), struct + IOURing.PAD, value.remaining() * 1); - } - public static void npad(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + IOURing.PAD + check(index, 3) * 1, value); - } - public static void npad2(long struct, int value) { UNSAFE.putInt(null, struct + IOURing.PAD2, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - IOURingSQ.validate(struct + IOURing.SQ); - IOURingCQ.validate(struct + IOURing.CQ); - } - - // ----------------------------------- - - /** An array of {@link IOURing} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURing ELEMENT_FACTORY = IOURing.create(-1L); - - /** - * Creates a new {@code IOURing.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURing#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURing getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link IOURingSQ} view of the {@code sq} field. */ - @NativeType("struct io_uring_sq") - public IOURingSQ sq() { return IOURing.nsq(address()); } - /** @return a {@link IOURingCQ} view of the {@code cq} field. */ - @NativeType("struct io_uring_cq") - public IOURingCQ cq() { return IOURing.ncq(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("unsigned int") - public int flags() { return IOURing.nflags(address()); } - /** @return the value of the {@code ring_fd} field. */ - public int ring_fd() { return IOURing.nring_fd(address()); } - /** @return the value of the {@code features} field. */ - @NativeType("unsigned int") - public int features() { return IOURing.nfeatures(address()); } - /** @return the value of the {@code enter_ring_fd} field. */ - public int enter_ring_fd() { return IOURing.nenter_ring_fd(address()); } - /** @return the value of the {@code int_flags} field. */ - @NativeType("__u8") - public byte int_flags() { return IOURing.nint_flags(address()); } - - /** Copies the specified {@link IOURingSQ} to the {@code sq} field. */ - public Buffer sq(@NativeType("struct io_uring_sq") IOURingSQ value) { IOURing.nsq(address(), value); return this; } - /** Passes the {@code sq} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer sq(java.util.function.Consumer consumer) { consumer.accept(sq()); return this; } - /** Copies the specified {@link IOURingCQ} to the {@code cq} field. */ - public Buffer cq(@NativeType("struct io_uring_cq") IOURingCQ value) { IOURing.ncq(address(), value); return this; } - /** Passes the {@code cq} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer cq(java.util.function.Consumer consumer) { consumer.accept(cq()); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("unsigned int") int value) { IOURing.nflags(address(), value); return this; } - /** Sets the specified value to the {@code ring_fd} field. */ - public Buffer ring_fd(int value) { IOURing.nring_fd(address(), value); return this; } - /** Sets the specified value to the {@code features} field. */ - public Buffer features(@NativeType("unsigned int") int value) { IOURing.nfeatures(address(), value); return this; } - /** Sets the specified value to the {@code enter_ring_fd} field. */ - public Buffer enter_ring_fd(int value) { IOURing.nenter_ring_fd(address(), value); return this; } - /** Sets the specified value to the {@code int_flags} field. */ - public Buffer int_flags(@NativeType("__u8") byte value) { IOURing.nint_flags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBuf.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBuf.java deleted file mode 100644 index e0e7c58d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBuf.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_buf {
    - *     __u64 addr;
    - *     __u32 len;
    - *     __u16 bid;
    - *     __u16 resv;
    - * }
    - */ -@NativeType("struct io_uring_buf") -public class IOURingBuf extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ADDR, - LEN, - BID, - RESV; - - static { - Layout layout = __struct( - __member(8), - __member(4), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ADDR = layout.offsetof(0); - LEN = layout.offsetof(1); - BID = layout.offsetof(2); - RESV = layout.offsetof(3); - } - - protected IOURingBuf(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingBuf create(long address, @Nullable ByteBuffer container) { - return new IOURingBuf(address, container); - } - - /** - * Creates a {@code IOURingBuf} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingBuf(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code addr} field. */ - @NativeType("__u64") - public long addr() { return naddr(address()); } - /** @return the value of the {@code len} field. */ - @NativeType("__u32") - public int len() { return nlen(address()); } - /** @return the value of the {@code bid} field. */ - @NativeType("__u16") - public short bid() { return nbid(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u16") - public short resv() { return nresv(address()); } - - /** Sets the specified value to the {@code addr} field. */ - public IOURingBuf addr(@NativeType("__u64") long value) { naddr(address(), value); return this; } - /** Sets the specified value to the {@code len} field. */ - public IOURingBuf len(@NativeType("__u32") int value) { nlen(address(), value); return this; } - /** Sets the specified value to the {@code bid} field. */ - public IOURingBuf bid(@NativeType("__u16") short value) { nbid(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public IOURingBuf resv(@NativeType("__u16") short value) { nresv(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingBuf set( - long addr, - int len, - short bid, - short resv - ) { - addr(addr); - len(len); - bid(bid); - resv(resv); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingBuf set(IOURingBuf src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingBuf} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingBuf malloc() { - return new IOURingBuf(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingBuf} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingBuf calloc() { - return new IOURingBuf(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingBuf} instance allocated with {@link BufferUtils}. */ - public static IOURingBuf create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingBuf(memAddress(container), container); - } - - /** Returns a new {@code IOURingBuf} instance for the specified memory address. */ - public static IOURingBuf create(long address) { - return new IOURingBuf(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingBuf createSafe(long address) { - return address == NULL ? null : new IOURingBuf(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingBuf} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingBuf malloc(MemoryStack stack) { - return new IOURingBuf(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingBuf} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingBuf calloc(MemoryStack stack) { - return new IOURingBuf(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #addr}. */ - public static long naddr(long struct) { return UNSAFE.getLong(null, struct + IOURingBuf.ADDR); } - /** Unsafe version of {@link #len}. */ - public static int nlen(long struct) { return UNSAFE.getInt(null, struct + IOURingBuf.LEN); } - /** Unsafe version of {@link #bid}. */ - public static short nbid(long struct) { return UNSAFE.getShort(null, struct + IOURingBuf.BID); } - /** Unsafe version of {@link #resv}. */ - public static short nresv(long struct) { return UNSAFE.getShort(null, struct + IOURingBuf.RESV); } - - /** Unsafe version of {@link #addr(long) addr}. */ - public static void naddr(long struct, long value) { UNSAFE.putLong(null, struct + IOURingBuf.ADDR, value); } - /** Unsafe version of {@link #len(int) len}. */ - public static void nlen(long struct, int value) { UNSAFE.putInt(null, struct + IOURingBuf.LEN, value); } - /** Unsafe version of {@link #bid(short) bid}. */ - public static void nbid(long struct, short value) { UNSAFE.putShort(null, struct + IOURingBuf.BID, value); } - /** Unsafe version of {@link #resv(short) resv}. */ - public static void nresv(long struct, short value) { UNSAFE.putShort(null, struct + IOURingBuf.RESV, value); } - - // ----------------------------------- - - /** An array of {@link IOURingBuf} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingBuf ELEMENT_FACTORY = IOURingBuf.create(-1L); - - /** - * Creates a new {@code IOURingBuf.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingBuf#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingBuf getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code addr} field. */ - @NativeType("__u64") - public long addr() { return IOURingBuf.naddr(address()); } - /** @return the value of the {@code len} field. */ - @NativeType("__u32") - public int len() { return IOURingBuf.nlen(address()); } - /** @return the value of the {@code bid} field. */ - @NativeType("__u16") - public short bid() { return IOURingBuf.nbid(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u16") - public short resv() { return IOURingBuf.nresv(address()); } - - /** Sets the specified value to the {@code addr} field. */ - public Buffer addr(@NativeType("__u64") long value) { IOURingBuf.naddr(address(), value); return this; } - /** Sets the specified value to the {@code len} field. */ - public Buffer len(@NativeType("__u32") int value) { IOURingBuf.nlen(address(), value); return this; } - /** Sets the specified value to the {@code bid} field. */ - public Buffer bid(@NativeType("__u16") short value) { IOURingBuf.nbid(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public Buffer resv(@NativeType("__u16") short value) { IOURingBuf.nresv(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBufReg.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBufReg.java deleted file mode 100644 index 9d70a5fa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBufReg.java +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Argument for {@code IORING_(UN)REGISTER_PBUF_RING}. - * - *

    Layout

    - * - *
    
    - * struct io_uring_buf_reg {
    - *     __u64 ring_addr;
    - *     __u32 ring_entries;
    - *     __u16 bgid;
    - *     __u16 flags;
    - *     __u64 resv[3];
    - * }
    - */ -@NativeType("struct io_uring_buf_reg") -public class IOURingBufReg extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - RING_ADDR, - RING_ENTRIES, - BGID, - FLAGS, - RESV; - - static { - Layout layout = __struct( - __member(8), - __member(4), - __member(2), - __member(2), - __array(8, 3) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - RING_ADDR = layout.offsetof(0); - RING_ENTRIES = layout.offsetof(1); - BGID = layout.offsetof(2); - FLAGS = layout.offsetof(3); - RESV = layout.offsetof(4); - } - - protected IOURingBufReg(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingBufReg create(long address, @Nullable ByteBuffer container) { - return new IOURingBufReg(address, container); - } - - /** - * Creates a {@code IOURingBufReg} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingBufReg(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code ring_addr} field. */ - @NativeType("__u64") - public long ring_addr() { return nring_addr(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("__u32") - public int ring_entries() { return nring_entries(address()); } - /** @return the value of the {@code bgid} field. */ - @NativeType("__u16") - public short bgid() { return nbgid(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u16") - public short flags() { return nflags(address()); } - /** @return a {@link LongBuffer} view of the {@code resv} field. */ - @NativeType("__u64[3]") - public LongBuffer resv() { return nresv(address()); } - /** @return the value at the specified index of the {@code resv} field. */ - @NativeType("__u64") - public long resv(int index) { return nresv(address(), index); } - - /** Sets the specified value to the {@code ring_addr} field. */ - public IOURingBufReg ring_addr(@NativeType("__u64") long value) { nring_addr(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public IOURingBufReg ring_entries(@NativeType("__u32") int value) { nring_entries(address(), value); return this; } - /** Sets the specified value to the {@code bgid} field. */ - public IOURingBufReg bgid(@NativeType("__u16") short value) { nbgid(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public IOURingBufReg flags(@NativeType("__u16") short value) { nflags(address(), value); return this; } - /** Copies the specified {@link LongBuffer} to the {@code resv} field. */ - public IOURingBufReg resv(@NativeType("__u64[3]") LongBuffer value) { nresv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code resv} field. */ - public IOURingBufReg resv(int index, @NativeType("__u64") long value) { nresv(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingBufReg set( - long ring_addr, - int ring_entries, - short bgid, - short flags, - LongBuffer resv - ) { - ring_addr(ring_addr); - ring_entries(ring_entries); - bgid(bgid); - flags(flags); - resv(resv); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingBufReg set(IOURingBufReg src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingBufReg} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingBufReg malloc() { - return new IOURingBufReg(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingBufReg} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingBufReg calloc() { - return new IOURingBufReg(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingBufReg} instance allocated with {@link BufferUtils}. */ - public static IOURingBufReg create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingBufReg(memAddress(container), container); - } - - /** Returns a new {@code IOURingBufReg} instance for the specified memory address. */ - public static IOURingBufReg create(long address) { - return new IOURingBufReg(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingBufReg createSafe(long address) { - return address == NULL ? null : new IOURingBufReg(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingBufReg} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingBufReg malloc(MemoryStack stack) { - return new IOURingBufReg(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingBufReg} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingBufReg calloc(MemoryStack stack) { - return new IOURingBufReg(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #ring_addr}. */ - public static long nring_addr(long struct) { return UNSAFE.getLong(null, struct + IOURingBufReg.RING_ADDR); } - /** Unsafe version of {@link #ring_entries}. */ - public static int nring_entries(long struct) { return UNSAFE.getInt(null, struct + IOURingBufReg.RING_ENTRIES); } - /** Unsafe version of {@link #bgid}. */ - public static short nbgid(long struct) { return UNSAFE.getShort(null, struct + IOURingBufReg.BGID); } - /** Unsafe version of {@link #flags}. */ - public static short nflags(long struct) { return UNSAFE.getShort(null, struct + IOURingBufReg.FLAGS); } - /** Unsafe version of {@link #resv}. */ - public static LongBuffer nresv(long struct) { return memLongBuffer(struct + IOURingBufReg.RESV, 3); } - /** Unsafe version of {@link #resv(int) resv}. */ - public static long nresv(long struct, int index) { - return UNSAFE.getLong(null, struct + IOURingBufReg.RESV + check(index, 3) * 8); - } - - /** Unsafe version of {@link #ring_addr(long) ring_addr}. */ - public static void nring_addr(long struct, long value) { UNSAFE.putLong(null, struct + IOURingBufReg.RING_ADDR, value); } - /** Unsafe version of {@link #ring_entries(int) ring_entries}. */ - public static void nring_entries(long struct, int value) { UNSAFE.putInt(null, struct + IOURingBufReg.RING_ENTRIES, value); } - /** Unsafe version of {@link #bgid(short) bgid}. */ - public static void nbgid(long struct, short value) { UNSAFE.putShort(null, struct + IOURingBufReg.BGID, value); } - /** Unsafe version of {@link #flags(short) flags}. */ - public static void nflags(long struct, short value) { UNSAFE.putShort(null, struct + IOURingBufReg.FLAGS, value); } - /** Unsafe version of {@link #resv(LongBuffer) resv}. */ - public static void nresv(long struct, LongBuffer value) { - if (CHECKS) { checkGT(value, 3); } - memCopy(memAddress(value), struct + IOURingBufReg.RESV, value.remaining() * 8); - } - /** Unsafe version of {@link #resv(int, long) resv}. */ - public static void nresv(long struct, int index, long value) { - UNSAFE.putLong(null, struct + IOURingBufReg.RESV + check(index, 3) * 8, value); - } - - // ----------------------------------- - - /** An array of {@link IOURingBufReg} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingBufReg ELEMENT_FACTORY = IOURingBufReg.create(-1L); - - /** - * Creates a new {@code IOURingBufReg.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingBufReg#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingBufReg getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code ring_addr} field. */ - @NativeType("__u64") - public long ring_addr() { return IOURingBufReg.nring_addr(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("__u32") - public int ring_entries() { return IOURingBufReg.nring_entries(address()); } - /** @return the value of the {@code bgid} field. */ - @NativeType("__u16") - public short bgid() { return IOURingBufReg.nbgid(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u16") - public short flags() { return IOURingBufReg.nflags(address()); } - /** @return a {@link LongBuffer} view of the {@code resv} field. */ - @NativeType("__u64[3]") - public LongBuffer resv() { return IOURingBufReg.nresv(address()); } - /** @return the value at the specified index of the {@code resv} field. */ - @NativeType("__u64") - public long resv(int index) { return IOURingBufReg.nresv(address(), index); } - - /** Sets the specified value to the {@code ring_addr} field. */ - public Buffer ring_addr(@NativeType("__u64") long value) { IOURingBufReg.nring_addr(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public Buffer ring_entries(@NativeType("__u32") int value) { IOURingBufReg.nring_entries(address(), value); return this; } - /** Sets the specified value to the {@code bgid} field. */ - public Buffer bgid(@NativeType("__u16") short value) { IOURingBufReg.nbgid(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("__u16") short value) { IOURingBufReg.nflags(address(), value); return this; } - /** Copies the specified {@link LongBuffer} to the {@code resv} field. */ - public Buffer resv(@NativeType("__u64[3]") LongBuffer value) { IOURingBufReg.nresv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code resv} field. */ - public Buffer resv(int index, @NativeType("__u64") long value) { IOURingBufReg.nresv(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBufRing.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBufRing.java deleted file mode 100644 index 72b90c02..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingBufRing.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_buf_ring {
    - *     union {
    - *         struct {
    - *             __u64 resv1;
    - *             __u32 resv2;
    - *             __u16 resv3;
    - *             __u16 tail;
    - *         };
    - *         {@link IOURingBuf struct io_uring_buf} bufs[0];
    - *     };
    - * }
    - */ -@NativeType("struct io_uring_buf_ring") -public class IOURingBufRing extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - RESV1, - RESV2, - RESV3, - TAIL, - BUFS; - - static { - Layout layout = __struct( - __union( - __struct( - __member(8), - __member(4), - __member(2), - __member(2) - ), - __array(IOURingBuf.SIZEOF, IOURingBuf.ALIGNOF, 0) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - RESV1 = layout.offsetof(2); - RESV2 = layout.offsetof(3); - RESV3 = layout.offsetof(4); - TAIL = layout.offsetof(5); - BUFS = layout.offsetof(6); - } - - protected IOURingBufRing(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingBufRing create(long address, @Nullable ByteBuffer container) { - return new IOURingBufRing(address, container); - } - - /** - * Creates a {@code IOURingBufRing} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingBufRing(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code resv1} field. */ - @NativeType("__u64") - public long resv1() { return nresv1(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u32") - public int resv2() { return nresv2(address()); } - /** @return the value of the {@code resv3} field. */ - @NativeType("__u16") - public short resv3() { return nresv3(address()); } - /** @return the value of the {@code tail} field. */ - @NativeType("__u16") - public short tail() { return ntail(address()); } - /** @return a {@link IOURingBuf}.Buffer view of the {@code bufs} field. */ - @NativeType("struct io_uring_buf[0]") - public IOURingBuf.Buffer bufs() { return nbufs(address()); } - /** @return a {@link IOURingBuf} view of the struct at the specified index of the {@code bufs} field. */ - @NativeType("struct io_uring_buf") - public IOURingBuf bufs(int index) { return nbufs(address(), index); } - - /** Sets the specified value to the {@code resv1} field. */ - public IOURingBufRing resv1(@NativeType("__u64") long value) { nresv1(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public IOURingBufRing resv2(@NativeType("__u32") int value) { nresv2(address(), value); return this; } - /** Sets the specified value to the {@code resv3} field. */ - public IOURingBufRing resv3(@NativeType("__u16") short value) { nresv3(address(), value); return this; } - /** Sets the specified value to the {@code tail} field. */ - public IOURingBufRing tail(@NativeType("__u16") short value) { ntail(address(), value); return this; } - /** Copies the specified {@link IOURingBuf.Buffer} to the {@code bufs} field. */ - public IOURingBufRing bufs(@NativeType("struct io_uring_buf[0]") IOURingBuf.Buffer value) { nbufs(address(), value); return this; } - /** Copies the specified {@link IOURingBuf} at the specified index of the {@code bufs} field. */ - public IOURingBufRing bufs(int index, @NativeType("struct io_uring_buf") IOURingBuf value) { nbufs(address(), index, value); return this; } - /** Passes the {@code bufs} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURingBufRing bufs(java.util.function.Consumer consumer) { consumer.accept(bufs()); return this; } - /** Passes the element at {@code index} of the {@code bufs} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURingBufRing bufs(int index, java.util.function.Consumer consumer) { consumer.accept(bufs(index)); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingBufRing set(IOURingBufRing src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingBufRing} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingBufRing malloc() { - return new IOURingBufRing(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingBufRing} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingBufRing calloc() { - return new IOURingBufRing(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingBufRing} instance allocated with {@link BufferUtils}. */ - public static IOURingBufRing create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingBufRing(memAddress(container), container); - } - - /** Returns a new {@code IOURingBufRing} instance for the specified memory address. */ - public static IOURingBufRing create(long address) { - return new IOURingBufRing(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingBufRing createSafe(long address) { - return address == NULL ? null : new IOURingBufRing(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingBufRing} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingBufRing malloc(MemoryStack stack) { - return new IOURingBufRing(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingBufRing} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingBufRing calloc(MemoryStack stack) { - return new IOURingBufRing(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #resv1}. */ - public static long nresv1(long struct) { return UNSAFE.getLong(null, struct + IOURingBufRing.RESV1); } - /** Unsafe version of {@link #resv2}. */ - public static int nresv2(long struct) { return UNSAFE.getInt(null, struct + IOURingBufRing.RESV2); } - /** Unsafe version of {@link #resv3}. */ - public static short nresv3(long struct) { return UNSAFE.getShort(null, struct + IOURingBufRing.RESV3); } - /** Unsafe version of {@link #tail}. */ - public static short ntail(long struct) { return UNSAFE.getShort(null, struct + IOURingBufRing.TAIL); } - /** Unsafe version of {@link #bufs}. */ - public static IOURingBuf.Buffer nbufs(long struct) { return IOURingBuf.create(struct + IOURingBufRing.BUFS, 0); } - /** Unsafe version of {@link #bufs(int) bufs}. */ - public static IOURingBuf nbufs(long struct, int index) { - return IOURingBuf.create(struct + IOURingBufRing.BUFS + check(index, 0) * IOURingBuf.SIZEOF); - } - - /** Unsafe version of {@link #resv1(long) resv1}. */ - public static void nresv1(long struct, long value) { UNSAFE.putLong(null, struct + IOURingBufRing.RESV1, value); } - /** Unsafe version of {@link #resv2(int) resv2}. */ - public static void nresv2(long struct, int value) { UNSAFE.putInt(null, struct + IOURingBufRing.RESV2, value); } - /** Unsafe version of {@link #resv3(short) resv3}. */ - public static void nresv3(long struct, short value) { UNSAFE.putShort(null, struct + IOURingBufRing.RESV3, value); } - /** Unsafe version of {@link #tail(short) tail}. */ - public static void ntail(long struct, short value) { UNSAFE.putShort(null, struct + IOURingBufRing.TAIL, value); } - /** Unsafe version of {@link #bufs(IOURingBuf.Buffer) bufs}. */ - public static void nbufs(long struct, IOURingBuf.Buffer value) { - if (CHECKS) { checkGT(value, 0); } - memCopy(value.address(), struct + IOURingBufRing.BUFS, value.remaining() * IOURingBuf.SIZEOF); - } - /** Unsafe version of {@link #bufs(int, IOURingBuf) bufs}. */ - public static void nbufs(long struct, int index, IOURingBuf value) { - memCopy(value.address(), struct + IOURingBufRing.BUFS + check(index, 0) * IOURingBuf.SIZEOF, IOURingBuf.SIZEOF); - } - - // ----------------------------------- - - /** An array of {@link IOURingBufRing} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingBufRing ELEMENT_FACTORY = IOURingBufRing.create(-1L); - - /** - * Creates a new {@code IOURingBufRing.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingBufRing#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingBufRing getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code resv1} field. */ - @NativeType("__u64") - public long resv1() { return IOURingBufRing.nresv1(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u32") - public int resv2() { return IOURingBufRing.nresv2(address()); } - /** @return the value of the {@code resv3} field. */ - @NativeType("__u16") - public short resv3() { return IOURingBufRing.nresv3(address()); } - /** @return the value of the {@code tail} field. */ - @NativeType("__u16") - public short tail() { return IOURingBufRing.ntail(address()); } - /** @return a {@link IOURingBuf}.Buffer view of the {@code bufs} field. */ - @NativeType("struct io_uring_buf[0]") - public IOURingBuf.Buffer bufs() { return IOURingBufRing.nbufs(address()); } - /** @return a {@link IOURingBuf} view of the struct at the specified index of the {@code bufs} field. */ - @NativeType("struct io_uring_buf") - public IOURingBuf bufs(int index) { return IOURingBufRing.nbufs(address(), index); } - - /** Sets the specified value to the {@code resv1} field. */ - public Buffer resv1(@NativeType("__u64") long value) { IOURingBufRing.nresv1(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public Buffer resv2(@NativeType("__u32") int value) { IOURingBufRing.nresv2(address(), value); return this; } - /** Sets the specified value to the {@code resv3} field. */ - public Buffer resv3(@NativeType("__u16") short value) { IOURingBufRing.nresv3(address(), value); return this; } - /** Sets the specified value to the {@code tail} field. */ - public Buffer tail(@NativeType("__u16") short value) { IOURingBufRing.ntail(address(), value); return this; } - /** Copies the specified {@link IOURingBuf.Buffer} to the {@code bufs} field. */ - public Buffer bufs(@NativeType("struct io_uring_buf[0]") IOURingBuf.Buffer value) { IOURingBufRing.nbufs(address(), value); return this; } - /** Copies the specified {@link IOURingBuf} at the specified index of the {@code bufs} field. */ - public Buffer bufs(int index, @NativeType("struct io_uring_buf") IOURingBuf value) { IOURingBufRing.nbufs(address(), index, value); return this; } - /** Passes the {@code bufs} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer bufs(java.util.function.Consumer consumer) { consumer.accept(bufs()); return this; } - /** Passes the element at {@code index} of the {@code bufs} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer bufs(int index, java.util.function.Consumer consumer) { consumer.accept(bufs(index)); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingCQ.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingCQ.java deleted file mode 100644 index 1777330e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingCQ.java +++ /dev/null @@ -1,540 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_cq {
    - *     unsigned * khead;
    - *     unsigned * ktail;
    - *     unsigned * {@link #kring_mask};
    - *     unsigned * {@link #kring_entries};
    - *     unsigned * kflags;
    - *     unsigned * koverflow;
    - *     {@link IOURingCQE struct io_uring_cqe} * cqes;
    - *     size_t ring_sz;
    - *     void * ring_ptr;
    - *     unsigned ring_mask;
    - *     unsigned ring_entries;
    - *     unsigned int pad[2];
    - * }
    - */ -@NativeType("struct io_uring_cq") -public class IOURingCQ extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - KHEAD, - KTAIL, - KRING_MASK, - KRING_ENTRIES, - KFLAGS, - KOVERFLOW, - CQES, - RING_SZ, - RING_PTR, - RING_MASK, - RING_ENTRIES, - PAD; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4), - __array(4, 2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - KHEAD = layout.offsetof(0); - KTAIL = layout.offsetof(1); - KRING_MASK = layout.offsetof(2); - KRING_ENTRIES = layout.offsetof(3); - KFLAGS = layout.offsetof(4); - KOVERFLOW = layout.offsetof(5); - CQES = layout.offsetof(6); - RING_SZ = layout.offsetof(7); - RING_PTR = layout.offsetof(8); - RING_MASK = layout.offsetof(9); - RING_ENTRIES = layout.offsetof(10); - PAD = layout.offsetof(11); - } - - protected IOURingCQ(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingCQ create(long address, @Nullable ByteBuffer container) { - return new IOURingCQ(address, container); - } - - /** - * Creates a {@code IOURingCQ} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingCQ(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code khead} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer khead(int capacity) { return nkhead(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code ktail} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer ktail(int capacity) { return nktail(address(), capacity); } - /** - * @param capacity the number of elements in the returned buffer - * - * @return Deprecated: use {@code ring_mask} instead of {@code *kring_mask} - */ - @NativeType("unsigned *") - public IntBuffer kring_mask(int capacity) { return nkring_mask(address(), capacity); } - /** - * @param capacity the number of elements in the returned buffer - * - * @return Deprecated: use {@code ring_entries} instead of {@code *kring_entries} - */ - @NativeType("unsigned *") - public IntBuffer kring_entries(int capacity) { return nkring_entries(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code kflags} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kflags(int capacity) { return nkflags(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code koverflow} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer koverflow(int capacity) { return nkoverflow(address(), capacity); } - /** @return a {@link IOURingCQE} view of the struct pointed to by the {@code cqes} field. */ - @NativeType("struct io_uring_cqe *") - public IOURingCQE cqes() { return ncqes(address()); } - /** @return the value of the {@code ring_sz} field. */ - @NativeType("size_t") - public long ring_sz() { return nring_sz(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code ring_ptr} field. */ - @NativeType("void *") - public ByteBuffer ring_ptr() { return nring_ptr(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("unsigned") - public int ring_mask() { return nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("unsigned") - public int ring_entries() { return nring_entries(address()); } - - /** Sets the address of the specified {@link IntBuffer} to the {@code khead} field. */ - public IOURingCQ khead(@NativeType("unsigned *") IntBuffer value) { nkhead(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code ktail} field. */ - public IOURingCQ ktail(@NativeType("unsigned *") IntBuffer value) { nktail(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link #kring_mask} field. */ - public IOURingCQ kring_mask(@NativeType("unsigned *") IntBuffer value) { nkring_mask(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link #kring_entries} field. */ - public IOURingCQ kring_entries(@NativeType("unsigned *") IntBuffer value) { nkring_entries(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code kflags} field. */ - public IOURingCQ kflags(@NativeType("unsigned *") IntBuffer value) { nkflags(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code koverflow} field. */ - public IOURingCQ koverflow(@NativeType("unsigned *") IntBuffer value) { nkoverflow(address(), value); return this; } - /** Sets the address of the specified {@link IOURingCQE} to the {@code cqes} field. */ - public IOURingCQ cqes(@NativeType("struct io_uring_cqe *") IOURingCQE value) { ncqes(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code ring_ptr} field. */ - public IOURingCQ ring_ptr(@NativeType("void *") ByteBuffer value) { nring_ptr(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public IOURingCQ ring_mask(@NativeType("unsigned") int value) { nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public IOURingCQ ring_entries(@NativeType("unsigned") int value) { nring_entries(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingCQ set( - IntBuffer khead, - IntBuffer ktail, - IntBuffer kring_mask, - IntBuffer kring_entries, - IntBuffer kflags, - IntBuffer koverflow, - IOURingCQE cqes, - ByteBuffer ring_ptr, - int ring_mask, - int ring_entries - ) { - khead(khead); - ktail(ktail); - kring_mask(kring_mask); - kring_entries(kring_entries); - kflags(kflags); - koverflow(koverflow); - cqes(cqes); - ring_ptr(ring_ptr); - ring_mask(ring_mask); - ring_entries(ring_entries); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingCQ set(IOURingCQ src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingCQ} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingCQ malloc() { - return new IOURingCQ(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingCQ} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingCQ calloc() { - return new IOURingCQ(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingCQ} instance allocated with {@link BufferUtils}. */ - public static IOURingCQ create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingCQ(memAddress(container), container); - } - - /** Returns a new {@code IOURingCQ} instance for the specified memory address. */ - public static IOURingCQ create(long address) { - return new IOURingCQ(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingCQ createSafe(long address) { - return address == NULL ? null : new IOURingCQ(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingCQ} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingCQ malloc(MemoryStack stack) { - return new IOURingCQ(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingCQ} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingCQ calloc(MemoryStack stack) { - return new IOURingCQ(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #khead(int) khead}. */ - public static IntBuffer nkhead(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingCQ.KHEAD), capacity); } - /** Unsafe version of {@link #ktail(int) ktail}. */ - public static IntBuffer nktail(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingCQ.KTAIL), capacity); } - /** Unsafe version of {@link #kring_mask(int) kring_mask}. */ - public static IntBuffer nkring_mask(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingCQ.KRING_MASK), capacity); } - /** Unsafe version of {@link #kring_entries(int) kring_entries}. */ - public static IntBuffer nkring_entries(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingCQ.KRING_ENTRIES), capacity); } - /** Unsafe version of {@link #kflags(int) kflags}. */ - public static IntBuffer nkflags(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingCQ.KFLAGS), capacity); } - /** Unsafe version of {@link #koverflow(int) koverflow}. */ - public static IntBuffer nkoverflow(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingCQ.KOVERFLOW), capacity); } - /** Unsafe version of {@link #cqes}. */ - public static IOURingCQE ncqes(long struct) { return IOURingCQE.create(memGetAddress(struct + IOURingCQ.CQES)); } - /** Unsafe version of {@link #ring_sz}. */ - public static long nring_sz(long struct) { return memGetAddress(struct + IOURingCQ.RING_SZ); } - /** Unsafe version of {@link #ring_ptr() ring_ptr}. */ - public static ByteBuffer nring_ptr(long struct) { return memByteBuffer(memGetAddress(struct + IOURingCQ.RING_PTR), (int)nring_sz(struct)); } - /** Unsafe version of {@link #ring_mask}. */ - public static int nring_mask(long struct) { return UNSAFE.getInt(null, struct + IOURingCQ.RING_MASK); } - /** Unsafe version of {@link #ring_entries}. */ - public static int nring_entries(long struct) { return UNSAFE.getInt(null, struct + IOURingCQ.RING_ENTRIES); } - public static IntBuffer npad(long struct) { return memIntBuffer(struct + IOURingCQ.PAD, 2); } - public static int npad(long struct, int index) { - return UNSAFE.getInt(null, struct + IOURingCQ.PAD + check(index, 2) * 4); - } - - /** Unsafe version of {@link #khead(IntBuffer) khead}. */ - public static void nkhead(long struct, IntBuffer value) { memPutAddress(struct + IOURingCQ.KHEAD, memAddress(value)); } - /** Unsafe version of {@link #ktail(IntBuffer) ktail}. */ - public static void nktail(long struct, IntBuffer value) { memPutAddress(struct + IOURingCQ.KTAIL, memAddress(value)); } - /** Unsafe version of {@link #kring_mask(IntBuffer) kring_mask}. */ - public static void nkring_mask(long struct, IntBuffer value) { memPutAddress(struct + IOURingCQ.KRING_MASK, memAddress(value)); } - /** Unsafe version of {@link #kring_entries(IntBuffer) kring_entries}. */ - public static void nkring_entries(long struct, IntBuffer value) { memPutAddress(struct + IOURingCQ.KRING_ENTRIES, memAddress(value)); } - /** Unsafe version of {@link #kflags(IntBuffer) kflags}. */ - public static void nkflags(long struct, IntBuffer value) { memPutAddress(struct + IOURingCQ.KFLAGS, memAddress(value)); } - /** Unsafe version of {@link #koverflow(IntBuffer) koverflow}. */ - public static void nkoverflow(long struct, IntBuffer value) { memPutAddress(struct + IOURingCQ.KOVERFLOW, memAddress(value)); } - /** Unsafe version of {@link #cqes(IOURingCQE) cqes}. */ - public static void ncqes(long struct, IOURingCQE value) { memPutAddress(struct + IOURingCQ.CQES, value.address()); } - /** Sets the specified value to the {@code ring_sz} field of the specified {@code struct}. */ - public static void nring_sz(long struct, long value) { memPutAddress(struct + IOURingCQ.RING_SZ, value); } - /** Unsafe version of {@link #ring_ptr(ByteBuffer) ring_ptr}. */ - public static void nring_ptr(long struct, ByteBuffer value) { memPutAddress(struct + IOURingCQ.RING_PTR, memAddress(value)); nring_sz(struct, value.remaining()); } - /** Unsafe version of {@link #ring_mask(int) ring_mask}. */ - public static void nring_mask(long struct, int value) { UNSAFE.putInt(null, struct + IOURingCQ.RING_MASK, value); } - /** Unsafe version of {@link #ring_entries(int) ring_entries}. */ - public static void nring_entries(long struct, int value) { UNSAFE.putInt(null, struct + IOURingCQ.RING_ENTRIES, value); } - public static void npad(long struct, IntBuffer value) { - if (CHECKS) { checkGT(value, 2); } - memCopy(memAddress(value), struct + IOURingCQ.PAD, value.remaining() * 4); - } - public static void npad(long struct, int index, int value) { - UNSAFE.putInt(null, struct + IOURingCQ.PAD + check(index, 2) * 4, value); - } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + IOURingCQ.KHEAD)); - check(memGetAddress(struct + IOURingCQ.KTAIL)); - check(memGetAddress(struct + IOURingCQ.KRING_MASK)); - check(memGetAddress(struct + IOURingCQ.KRING_ENTRIES)); - check(memGetAddress(struct + IOURingCQ.KFLAGS)); - check(memGetAddress(struct + IOURingCQ.KOVERFLOW)); - check(memGetAddress(struct + IOURingCQ.CQES)); - check(memGetAddress(struct + IOURingCQ.RING_PTR)); - } - - // ----------------------------------- - - /** An array of {@link IOURingCQ} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingCQ ELEMENT_FACTORY = IOURingCQ.create(-1L); - - /** - * Creates a new {@code IOURingCQ.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingCQ#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingCQ getElementFactory() { - return ELEMENT_FACTORY; - } - - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code khead} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer khead(int capacity) { return IOURingCQ.nkhead(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code ktail} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer ktail(int capacity) { return IOURingCQ.nktail(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@link IOURingCQ#kring_mask} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kring_mask(int capacity) { return IOURingCQ.nkring_mask(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@link IOURingCQ#kring_entries} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kring_entries(int capacity) { return IOURingCQ.nkring_entries(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code kflags} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kflags(int capacity) { return IOURingCQ.nkflags(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code koverflow} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer koverflow(int capacity) { return IOURingCQ.nkoverflow(address(), capacity); } - /** @return a {@link IOURingCQE} view of the struct pointed to by the {@code cqes} field. */ - @NativeType("struct io_uring_cqe *") - public IOURingCQE cqes() { return IOURingCQ.ncqes(address()); } - /** @return the value of the {@code ring_sz} field. */ - @NativeType("size_t") - public long ring_sz() { return IOURingCQ.nring_sz(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code ring_ptr} field. */ - @NativeType("void *") - public ByteBuffer ring_ptr() { return IOURingCQ.nring_ptr(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("unsigned") - public int ring_mask() { return IOURingCQ.nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("unsigned") - public int ring_entries() { return IOURingCQ.nring_entries(address()); } - - /** Sets the address of the specified {@link IntBuffer} to the {@code khead} field. */ - public Buffer khead(@NativeType("unsigned *") IntBuffer value) { IOURingCQ.nkhead(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code ktail} field. */ - public Buffer ktail(@NativeType("unsigned *") IntBuffer value) { IOURingCQ.nktail(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link IOURingCQ#kring_mask} field. */ - public Buffer kring_mask(@NativeType("unsigned *") IntBuffer value) { IOURingCQ.nkring_mask(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link IOURingCQ#kring_entries} field. */ - public Buffer kring_entries(@NativeType("unsigned *") IntBuffer value) { IOURingCQ.nkring_entries(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code kflags} field. */ - public Buffer kflags(@NativeType("unsigned *") IntBuffer value) { IOURingCQ.nkflags(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code koverflow} field. */ - public Buffer koverflow(@NativeType("unsigned *") IntBuffer value) { IOURingCQ.nkoverflow(address(), value); return this; } - /** Sets the address of the specified {@link IOURingCQE} to the {@code cqes} field. */ - public Buffer cqes(@NativeType("struct io_uring_cqe *") IOURingCQE value) { IOURingCQ.ncqes(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code ring_ptr} field. */ - public Buffer ring_ptr(@NativeType("void *") ByteBuffer value) { IOURingCQ.nring_ptr(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public Buffer ring_mask(@NativeType("unsigned") int value) { IOURingCQ.nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public Buffer ring_entries(@NativeType("unsigned") int value) { IOURingCQ.nring_entries(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingCQE.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingCQE.java deleted file mode 100644 index 3cc08fb8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingCQE.java +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * IO completion data structure (Completion Queue Entry). - * - *

    Layout

    - * - *
    
    - * struct io_uring_cqe {
    - *     __u64 {@link #user_data};
    - *     __s32 {@link #res};
    - *     __u32 {@link #flags};
    - *     __u64 {@link #big_cqe}[0];
    - * }
    - */ -@NativeType("struct io_uring_cqe") -public class IOURingCQE extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - USER_DATA, - RES, - FLAGS, - BIG_CQE; - - static { - Layout layout = __struct( - __member(8), - __member(4), - __member(4), - __array(8, 0) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - USER_DATA = layout.offsetof(0); - RES = layout.offsetof(1); - FLAGS = layout.offsetof(2); - BIG_CQE = layout.offsetof(3); - } - - protected IOURingCQE(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingCQE create(long address, @Nullable ByteBuffer container) { - return new IOURingCQE(address, container); - } - - /** - * Creates a {@code IOURingCQE} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingCQE(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * is copied from the field of the same name in the submission queue entry. - * - *

    The primary use case is to store data that the application will need to access upon completion of this particular I/O.

    - */ - @NativeType("__u64") - public long user_data() { return nuser_data(address()); } - /** - * is the operation-specific result, but {@code io_uring}-specific errors (e.g. {@code flags} or {@code opcode} invalid) are returned through this field. - * - *

    For read and write {@code opcodes}, the return values match {@code errno} values documented in the {@code preadv2(2)} and {@code pwritev2(2)} man - * pages, with {@code res} holding the equivalent of {@code -errno} for error cases, or the transferred number of bytes in case the operation is - * successful. Hence both error and success return can be found in that field in the CQE. For other request types, the return values are documented in the - * matching man page for that type, or in the {@code opcodes} section for {@code io_uring}-specific {@code opcodes}.

    - */ - @NativeType("__s32") - public int res() { return nres(address()); } - /** is used for certain commands, like {@link LibIOURing#IORING_OP_POLL_ADD OP_POLL_ADD} or in conjunction with {@link LibIOURing#IOSQE_BUFFER_SELECT}, see those entries */ - @NativeType("__u32") - public int flags() { return nflags(address()); } - /** If the ring is initialized with {@link LibIOURing#IORING_SETUP_CQE32 SETUP_CQE32}, then this field contains 16-bytes of padding, doubling the size of the CQE. */ - @NativeType("__u64[0]") - public LongBuffer big_cqe() { return nbig_cqe(address()); } - /** If the ring is initialized with {@link LibIOURing#IORING_SETUP_CQE32 SETUP_CQE32}, then this field contains 16-bytes of padding, doubling the size of the CQE. */ - @NativeType("__u64") - public long big_cqe(int index) { return nbig_cqe(address(), index); } - - /** Sets the specified value to the {@link #user_data} field. */ - public IOURingCQE user_data(@NativeType("__u64") long value) { nuser_data(address(), value); return this; } - /** Sets the specified value to the {@link #res} field. */ - public IOURingCQE res(@NativeType("__s32") int value) { nres(address(), value); return this; } - /** Sets the specified value to the {@link #flags} field. */ - public IOURingCQE flags(@NativeType("__u32") int value) { nflags(address(), value); return this; } - /** Copies the specified {@link LongBuffer} to the {@link #big_cqe} field. */ - public IOURingCQE big_cqe(@NativeType("__u64[0]") LongBuffer value) { nbig_cqe(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #big_cqe} field. */ - public IOURingCQE big_cqe(int index, @NativeType("__u64") long value) { nbig_cqe(address(), index, value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingCQE set( - long user_data, - int res, - int flags, - LongBuffer big_cqe - ) { - user_data(user_data); - res(res); - flags(flags); - big_cqe(big_cqe); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingCQE set(IOURingCQE src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingCQE} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingCQE malloc() { - return new IOURingCQE(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingCQE} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingCQE calloc() { - return new IOURingCQE(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingCQE} instance allocated with {@link BufferUtils}. */ - public static IOURingCQE create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingCQE(memAddress(container), container); - } - - /** Returns a new {@code IOURingCQE} instance for the specified memory address. */ - public static IOURingCQE create(long address) { - return new IOURingCQE(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingCQE createSafe(long address) { - return address == NULL ? null : new IOURingCQE(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingCQE} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingCQE malloc(MemoryStack stack) { - return new IOURingCQE(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingCQE} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingCQE calloc(MemoryStack stack) { - return new IOURingCQE(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #user_data}. */ - public static long nuser_data(long struct) { return UNSAFE.getLong(null, struct + IOURingCQE.USER_DATA); } - /** Unsafe version of {@link #res}. */ - public static int nres(long struct) { return UNSAFE.getInt(null, struct + IOURingCQE.RES); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOURingCQE.FLAGS); } - /** Unsafe version of {@link #big_cqe}. */ - public static LongBuffer nbig_cqe(long struct) { return memLongBuffer(struct + IOURingCQE.BIG_CQE, 0); } - /** Unsafe version of {@link #big_cqe(int) big_cqe}. */ - public static long nbig_cqe(long struct, int index) { - return UNSAFE.getLong(null, struct + IOURingCQE.BIG_CQE + check(index, 0) * 8); - } - - /** Unsafe version of {@link #user_data(long) user_data}. */ - public static void nuser_data(long struct, long value) { UNSAFE.putLong(null, struct + IOURingCQE.USER_DATA, value); } - /** Unsafe version of {@link #res(int) res}. */ - public static void nres(long struct, int value) { UNSAFE.putInt(null, struct + IOURingCQE.RES, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingCQE.FLAGS, value); } - /** Unsafe version of {@link #big_cqe(LongBuffer) big_cqe}. */ - public static void nbig_cqe(long struct, LongBuffer value) { - if (CHECKS) { checkGT(value, 0); } - memCopy(memAddress(value), struct + IOURingCQE.BIG_CQE, value.remaining() * 8); - } - /** Unsafe version of {@link #big_cqe(int, long) big_cqe}. */ - public static void nbig_cqe(long struct, int index, long value) { - UNSAFE.putLong(null, struct + IOURingCQE.BIG_CQE + check(index, 0) * 8, value); - } - - // ----------------------------------- - - /** An array of {@link IOURingCQE} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingCQE ELEMENT_FACTORY = IOURingCQE.create(-1L); - - /** - * Creates a new {@code IOURingCQE.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingCQE#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingCQE getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link IOURingCQE#user_data} field. */ - @NativeType("__u64") - public long user_data() { return IOURingCQE.nuser_data(address()); } - /** @return the value of the {@link IOURingCQE#res} field. */ - @NativeType("__s32") - public int res() { return IOURingCQE.nres(address()); } - /** @return the value of the {@link IOURingCQE#flags} field. */ - @NativeType("__u32") - public int flags() { return IOURingCQE.nflags(address()); } - /** @return a {@link LongBuffer} view of the {@link IOURingCQE#big_cqe} field. */ - @NativeType("__u64[0]") - public LongBuffer big_cqe() { return IOURingCQE.nbig_cqe(address()); } - /** @return the value at the specified index of the {@link IOURingCQE#big_cqe} field. */ - @NativeType("__u64") - public long big_cqe(int index) { return IOURingCQE.nbig_cqe(address(), index); } - - /** Sets the specified value to the {@link IOURingCQE#user_data} field. */ - public Buffer user_data(@NativeType("__u64") long value) { IOURingCQE.nuser_data(address(), value); return this; } - /** Sets the specified value to the {@link IOURingCQE#res} field. */ - public Buffer res(@NativeType("__s32") int value) { IOURingCQE.nres(address(), value); return this; } - /** Sets the specified value to the {@link IOURingCQE#flags} field. */ - public Buffer flags(@NativeType("__u32") int value) { IOURingCQE.nflags(address(), value); return this; } - /** Copies the specified {@link LongBuffer} to the {@link IOURingCQE#big_cqe} field. */ - public Buffer big_cqe(@NativeType("__u64[0]") LongBuffer value) { IOURingCQE.nbig_cqe(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link IOURingCQE#big_cqe} field. */ - public Buffer big_cqe(int index, @NativeType("__u64") long value) { IOURingCQE.nbig_cqe(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingFileIndexRange.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingFileIndexRange.java deleted file mode 100644 index 83b179ab..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingFileIndexRange.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Argument for {@link LibIOURing#IORING_REGISTER_FILE_ALLOC_RANGE REGISTER_FILE_ALLOC_RANGE}. - * - *

    The range is specified as {@code [off, off + len)}.

    - * - *

    Layout

    - * - *
    
    - * struct io_uring_file_index_range {
    - *     __u32 off;
    - *     __u32 len;
    - *     __u64 resv;
    - * }
    - */ -@NativeType("struct io_uring_file_index_range") -public class IOURingFileIndexRange extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OFF, - LEN, - RESV; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OFF = layout.offsetof(0); - LEN = layout.offsetof(1); - RESV = layout.offsetof(2); - } - - protected IOURingFileIndexRange(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingFileIndexRange create(long address, @Nullable ByteBuffer container) { - return new IOURingFileIndexRange(address, container); - } - - /** - * Creates a {@code IOURingFileIndexRange} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingFileIndexRange(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code off} field. */ - @NativeType("__u32") - public int off() { return noff(address()); } - /** @return the value of the {@code len} field. */ - @NativeType("__u32") - public int len() { return nlen(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u64") - public long resv() { return nresv(address()); } - - /** Sets the specified value to the {@code off} field. */ - public IOURingFileIndexRange off(@NativeType("__u32") int value) { noff(address(), value); return this; } - /** Sets the specified value to the {@code len} field. */ - public IOURingFileIndexRange len(@NativeType("__u32") int value) { nlen(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public IOURingFileIndexRange resv(@NativeType("__u64") long value) { nresv(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingFileIndexRange set( - int off, - int len, - long resv - ) { - off(off); - len(len); - resv(resv); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingFileIndexRange set(IOURingFileIndexRange src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingFileIndexRange} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingFileIndexRange malloc() { - return new IOURingFileIndexRange(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingFileIndexRange} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingFileIndexRange calloc() { - return new IOURingFileIndexRange(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingFileIndexRange} instance allocated with {@link BufferUtils}. */ - public static IOURingFileIndexRange create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingFileIndexRange(memAddress(container), container); - } - - /** Returns a new {@code IOURingFileIndexRange} instance for the specified memory address. */ - public static IOURingFileIndexRange create(long address) { - return new IOURingFileIndexRange(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingFileIndexRange createSafe(long address) { - return address == NULL ? null : new IOURingFileIndexRange(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingFileIndexRange} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingFileIndexRange malloc(MemoryStack stack) { - return new IOURingFileIndexRange(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingFileIndexRange} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingFileIndexRange calloc(MemoryStack stack) { - return new IOURingFileIndexRange(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #off}. */ - public static int noff(long struct) { return UNSAFE.getInt(null, struct + IOURingFileIndexRange.OFF); } - /** Unsafe version of {@link #len}. */ - public static int nlen(long struct) { return UNSAFE.getInt(null, struct + IOURingFileIndexRange.LEN); } - /** Unsafe version of {@link #resv}. */ - public static long nresv(long struct) { return UNSAFE.getLong(null, struct + IOURingFileIndexRange.RESV); } - - /** Unsafe version of {@link #off(int) off}. */ - public static void noff(long struct, int value) { UNSAFE.putInt(null, struct + IOURingFileIndexRange.OFF, value); } - /** Unsafe version of {@link #len(int) len}. */ - public static void nlen(long struct, int value) { UNSAFE.putInt(null, struct + IOURingFileIndexRange.LEN, value); } - /** Unsafe version of {@link #resv(long) resv}. */ - public static void nresv(long struct, long value) { UNSAFE.putLong(null, struct + IOURingFileIndexRange.RESV, value); } - - // ----------------------------------- - - /** An array of {@link IOURingFileIndexRange} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingFileIndexRange ELEMENT_FACTORY = IOURingFileIndexRange.create(-1L); - - /** - * Creates a new {@code IOURingFileIndexRange.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingFileIndexRange#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingFileIndexRange getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code off} field. */ - @NativeType("__u32") - public int off() { return IOURingFileIndexRange.noff(address()); } - /** @return the value of the {@code len} field. */ - @NativeType("__u32") - public int len() { return IOURingFileIndexRange.nlen(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u64") - public long resv() { return IOURingFileIndexRange.nresv(address()); } - - /** Sets the specified value to the {@code off} field. */ - public Buffer off(@NativeType("__u32") int value) { IOURingFileIndexRange.noff(address(), value); return this; } - /** Sets the specified value to the {@code len} field. */ - public Buffer len(@NativeType("__u32") int value) { IOURingFileIndexRange.nlen(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public Buffer resv(@NativeType("__u64") long value) { IOURingFileIndexRange.nresv(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingGeteventsArg.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingGeteventsArg.java deleted file mode 100644 index 54f8e88c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingGeteventsArg.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_getevents_arg {
    - *     __u64 sigmask;
    - *     __u32 sigmask_sz;
    - *     __u32 pad;
    - *     __u64 ts;
    - * }
    - */ -@NativeType("struct io_uring_getevents_arg") -public class IOURingGeteventsArg extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SIGMASK, - SIGMASK_SZ, - PAD, - TS; - - static { - Layout layout = __struct( - __member(8), - __member(4), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SIGMASK = layout.offsetof(0); - SIGMASK_SZ = layout.offsetof(1); - PAD = layout.offsetof(2); - TS = layout.offsetof(3); - } - - protected IOURingGeteventsArg(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingGeteventsArg create(long address, @Nullable ByteBuffer container) { - return new IOURingGeteventsArg(address, container); - } - - /** - * Creates a {@code IOURingGeteventsArg} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingGeteventsArg(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code sigmask} field. */ - @NativeType("__u64") - public long sigmask() { return nsigmask(address()); } - /** @return the value of the {@code sigmask_sz} field. */ - @NativeType("__u32") - public int sigmask_sz() { return nsigmask_sz(address()); } - /** @return the value of the {@code pad} field. */ - @NativeType("__u32") - public int pad() { return npad(address()); } - /** @return the value of the {@code ts} field. */ - @NativeType("__u64") - public long ts() { return nts(address()); } - - /** Sets the specified value to the {@code sigmask} field. */ - public IOURingGeteventsArg sigmask(@NativeType("__u64") long value) { nsigmask(address(), value); return this; } - /** Sets the specified value to the {@code sigmask_sz} field. */ - public IOURingGeteventsArg sigmask_sz(@NativeType("__u32") int value) { nsigmask_sz(address(), value); return this; } - /** Sets the specified value to the {@code pad} field. */ - public IOURingGeteventsArg pad(@NativeType("__u32") int value) { npad(address(), value); return this; } - /** Sets the specified value to the {@code ts} field. */ - public IOURingGeteventsArg ts(@NativeType("__u64") long value) { nts(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingGeteventsArg set( - long sigmask, - int sigmask_sz, - int pad, - long ts - ) { - sigmask(sigmask); - sigmask_sz(sigmask_sz); - pad(pad); - ts(ts); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingGeteventsArg set(IOURingGeteventsArg src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingGeteventsArg} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingGeteventsArg malloc() { - return new IOURingGeteventsArg(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingGeteventsArg} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingGeteventsArg calloc() { - return new IOURingGeteventsArg(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingGeteventsArg} instance allocated with {@link BufferUtils}. */ - public static IOURingGeteventsArg create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingGeteventsArg(memAddress(container), container); - } - - /** Returns a new {@code IOURingGeteventsArg} instance for the specified memory address. */ - public static IOURingGeteventsArg create(long address) { - return new IOURingGeteventsArg(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingGeteventsArg createSafe(long address) { - return address == NULL ? null : new IOURingGeteventsArg(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingGeteventsArg} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingGeteventsArg malloc(MemoryStack stack) { - return new IOURingGeteventsArg(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingGeteventsArg} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingGeteventsArg calloc(MemoryStack stack) { - return new IOURingGeteventsArg(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #sigmask}. */ - public static long nsigmask(long struct) { return UNSAFE.getLong(null, struct + IOURingGeteventsArg.SIGMASK); } - /** Unsafe version of {@link #sigmask_sz}. */ - public static int nsigmask_sz(long struct) { return UNSAFE.getInt(null, struct + IOURingGeteventsArg.SIGMASK_SZ); } - /** Unsafe version of {@link #pad}. */ - public static int npad(long struct) { return UNSAFE.getInt(null, struct + IOURingGeteventsArg.PAD); } - /** Unsafe version of {@link #ts}. */ - public static long nts(long struct) { return UNSAFE.getLong(null, struct + IOURingGeteventsArg.TS); } - - /** Unsafe version of {@link #sigmask(long) sigmask}. */ - public static void nsigmask(long struct, long value) { UNSAFE.putLong(null, struct + IOURingGeteventsArg.SIGMASK, value); } - /** Unsafe version of {@link #sigmask_sz(int) sigmask_sz}. */ - public static void nsigmask_sz(long struct, int value) { UNSAFE.putInt(null, struct + IOURingGeteventsArg.SIGMASK_SZ, value); } - /** Unsafe version of {@link #pad(int) pad}. */ - public static void npad(long struct, int value) { UNSAFE.putInt(null, struct + IOURingGeteventsArg.PAD, value); } - /** Unsafe version of {@link #ts(long) ts}. */ - public static void nts(long struct, long value) { UNSAFE.putLong(null, struct + IOURingGeteventsArg.TS, value); } - - // ----------------------------------- - - /** An array of {@link IOURingGeteventsArg} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingGeteventsArg ELEMENT_FACTORY = IOURingGeteventsArg.create(-1L); - - /** - * Creates a new {@code IOURingGeteventsArg.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingGeteventsArg#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingGeteventsArg getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code sigmask} field. */ - @NativeType("__u64") - public long sigmask() { return IOURingGeteventsArg.nsigmask(address()); } - /** @return the value of the {@code sigmask_sz} field. */ - @NativeType("__u32") - public int sigmask_sz() { return IOURingGeteventsArg.nsigmask_sz(address()); } - /** @return the value of the {@code pad} field. */ - @NativeType("__u32") - public int pad() { return IOURingGeteventsArg.npad(address()); } - /** @return the value of the {@code ts} field. */ - @NativeType("__u64") - public long ts() { return IOURingGeteventsArg.nts(address()); } - - /** Sets the specified value to the {@code sigmask} field. */ - public Buffer sigmask(@NativeType("__u64") long value) { IOURingGeteventsArg.nsigmask(address(), value); return this; } - /** Sets the specified value to the {@code sigmask_sz} field. */ - public Buffer sigmask_sz(@NativeType("__u32") int value) { IOURingGeteventsArg.nsigmask_sz(address(), value); return this; } - /** Sets the specified value to the {@code pad} field. */ - public Buffer pad(@NativeType("__u32") int value) { IOURingGeteventsArg.npad(address(), value); return this; } - /** Sets the specified value to the {@code ts} field. */ - public Buffer ts(@NativeType("__u64") long value) { IOURingGeteventsArg.nts(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingParams.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingParams.java deleted file mode 100644 index 002e6444..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingParams.java +++ /dev/null @@ -1,528 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Passed in for {@link LibURing#io_uring_setup setup}. Copied back with updated info on success. - * - *

    The {@code flags}, {@code sq_thread_cpu}, and {@code sq_thread_idle} fields are used to configure the {@code io_uring} instance. If no {@code flags} - * are specified, the {@code io_uring} instance is setup for interrupt driven I/O. I/O may be submitted using {@link LibURing#io_uring_enter enter} and can be reaped by polling the - * completion queue.

    - * - *

    The rest of the fields are filled in by the kernel, and provide the information necessary to memory map the submission queue, completion queue, and the - * array of submission queue entries.

    - * - *

    {@code sq_off} describes the offsets of various ring buffer fields. Taken together, {@code sq_entries} and {@code sq_off} provide all of the - * information necessary for accessing the submission queue ring buffer and the submission queue entry array. The submission queue can be mapped with a - * call like:

    - * - *
    
    - * ptr = mmap(0, sq_off.array + sq_entries * sizeof(__u32),
    - *            PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE,
    - *            ring_fd, IORING_OFF_SQ_RING);
    - * - *

    where {@code sq_off} is the {@code io_sqring_offsets} structure, and {@code ring_fd} is the file descriptor returned from {@link LibURing#io_uring_setup setup}. The addition of - * {@code sq_off.array} to the length of the region accounts for the fact that the ring located at the end of the data structure. As an example, the ring - * buffer head pointer can be accessed by adding {@code sq_off.head} to the address returned from {@code mmap(2)}:

    - * - *
    
    - * head = ptr + sq_off.head;
    - * - *

    The array of submission queue entries is mapped with:

    - * - *
    
    - * sqentries = mmap(0, sq_entries * sizeof(struct io_uring_sqe),
    - *                  PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE,
    - *                  ring_fd, IORING_OFF_SQES);
    - * - *

    The completion queue is described by {@code cq_entries} and {@code cq_off}. The completion queue is simpler, since the entries are not separated from - * the queue itself, and can be mapped with:

    - * - *
    
    - * ptr = mmap(0, cq_off.cqes + cq_entries * sizeof(struct io_uring_cqe),        
    - *            PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, ring_fd,
    - *            IORING_OFF_CQ_RING);
    - * - *

    Layout

    - * - *
    
    - * struct io_uring_params {
    - *     __u32 {@link #sq_entries};
    - *     __u32 cq_entries;
    - *     __u32 {@link #flags};
    - *     __u32 sq_thread_cpu;
    - *     __u32 sq_thread_idle;
    - *     __u32 {@link #features};
    - *     __u32 wq_fd;
    - *     __u32 resv[3];
    - *     {@link IOSQRingOffsets struct io_sqring_offsets} {@link #sq_off};
    - *     {@link IOCQRingOffsets struct io_cqring_offsets} cq_off;
    - * }
    - */ -@NativeType("struct io_uring_params") -public class IOURingParams extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SQ_ENTRIES, - CQ_ENTRIES, - FLAGS, - SQ_THREAD_CPU, - SQ_THREAD_IDLE, - FEATURES, - WQ_FD, - RESV, - SQ_OFF, - CQ_OFF; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __array(4, 3), - __member(IOSQRingOffsets.SIZEOF, IOSQRingOffsets.ALIGNOF), - __member(IOCQRingOffsets.SIZEOF, IOCQRingOffsets.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SQ_ENTRIES = layout.offsetof(0); - CQ_ENTRIES = layout.offsetof(1); - FLAGS = layout.offsetof(2); - SQ_THREAD_CPU = layout.offsetof(3); - SQ_THREAD_IDLE = layout.offsetof(4); - FEATURES = layout.offsetof(5); - WQ_FD = layout.offsetof(6); - RESV = layout.offsetof(7); - SQ_OFF = layout.offsetof(8); - CQ_OFF = layout.offsetof(9); - } - - protected IOURingParams(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingParams create(long address, @Nullable ByteBuffer container) { - return new IOURingParams(address, container); - } - - /** - * Creates a {@code IOURingParams} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingParams(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the number of submission queue entries allocated */ - @NativeType("__u32") - public int sq_entries() { return nsq_entries(address()); } - /** @return the value of the {@code cq_entries} field. */ - @NativeType("__u32") - public int cq_entries() { return ncq_entries(address()); } - /** one or more of:
    {@link LibIOURing#IORING_SETUP_IOPOLL SETUP_IOPOLL}{@link LibIOURing#IORING_SETUP_SQPOLL SETUP_SQPOLL}{@link LibIOURing#IORING_SETUP_SQ_AFF SETUP_SQ_AFF}{@link LibIOURing#IORING_SETUP_CQSIZE SETUP_CQSIZE}{@link LibIOURing#IORING_SETUP_CLAMP SETUP_CLAMP}
    {@link LibIOURing#IORING_SETUP_ATTACH_WQ SETUP_ATTACH_WQ}{@link LibIOURing#IORING_SETUP_R_DISABLED SETUP_R_DISABLED}{@link LibIOURing#IORING_SETUP_SUBMIT_ALL SETUP_SUBMIT_ALL}{@link LibIOURing#IORING_SETUP_COOP_TASKRUN SETUP_COOP_TASKRUN}{@link LibIOURing#IORING_SETUP_TASKRUN_FLAG SETUP_TASKRUN_FLAG}
    {@link LibIOURing#IORING_SETUP_SQE128 SETUP_SQE128}{@link LibIOURing#IORING_SETUP_CQE32 SETUP_CQE32}{@link LibIOURing#IORING_SETUP_SINGLE_ISSUER SETUP_SINGLE_ISSUER}{@link LibIOURing#IORING_SETUP_DEFER_TASKRUN SETUP_DEFER_TASKRUN}
    */ - @NativeType("__u32") - public int flags() { return nflags(address()); } - /** @return the value of the {@code sq_thread_cpu} field. */ - @NativeType("__u32") - public int sq_thread_cpu() { return nsq_thread_cpu(address()); } - /** @return the value of the {@code sq_thread_idle} field. */ - @NativeType("__u32") - public int sq_thread_idle() { return nsq_thread_idle(address()); } - /** filled in by the kernel, which specifies various features supported by current kernel version. One or more of:
    {@link LibIOURing#IORING_FEAT_SINGLE_MMAP FEAT_SINGLE_MMAP}{@link LibIOURing#IORING_FEAT_NODROP FEAT_NODROP}{@link LibIOURing#IORING_FEAT_SUBMIT_STABLE FEAT_SUBMIT_STABLE}{@link LibIOURing#IORING_FEAT_RW_CUR_POS FEAT_RW_CUR_POS}{@link LibIOURing#IORING_FEAT_CUR_PERSONALITY FEAT_CUR_PERSONALITY}
    {@link LibIOURing#IORING_FEAT_FAST_POLL FEAT_FAST_POLL}{@link LibIOURing#IORING_FEAT_POLL_32BITS FEAT_POLL_32BITS}{@link LibIOURing#IORING_FEAT_SQPOLL_NONFIXED FEAT_SQPOLL_NONFIXED}{@link LibIOURing#IORING_FEAT_EXT_ARG FEAT_EXT_ARG}{@link LibIOURing#IORING_FEAT_NATIVE_WORKERS FEAT_NATIVE_WORKERS}
    {@link LibIOURing#IORING_FEAT_RSRC_TAGS FEAT_RSRC_TAGS}{@link LibIOURing#IORING_FEAT_CQE_SKIP FEAT_CQE_SKIP}{@link LibIOURing#IORING_FEAT_LINKED_FILE FEAT_LINKED_FILE}{@link LibIOURing#IORING_FEAT_REG_REG_RING FEAT_REG_REG_RING}
    */ - @NativeType("__u32") - public int features() { return nfeatures(address()); } - /** @return the value of the {@code wq_fd} field. */ - @NativeType("__u32") - public int wq_fd() { return nwq_fd(address()); } - /** @return a {@link IntBuffer} view of the {@code resv} field. */ - @NativeType("__u32[3]") - public IntBuffer resv() { return nresv(address()); } - /** @return the value at the specified index of the {@code resv} field. */ - @NativeType("__u32") - public int resv(int index) { return nresv(address(), index); } - /** - * The {@code flags} field is used by the kernel to communicate state information to the application. Currently, it is used to inform the application when - * a call to {@link LibURing#io_uring_enter enter} is necessary. - * - *

    The {@code dropped} member is incremented for each invalid submission queue entry encountered in the ring buffer.

    - * - *

    The {@code head} and {@code tail} track the ring buffer state. The {@code tail} is incremented by the application when submitting new I/O, and the - * {@code head} is incremented by the kernel when the I/O has been successfully submitted. Determining the index of the {@code head} or {@code tail} into - * the ring is accomplished by applying a mask:

    - * - *
    
    -     * index = tail & ring_mask;
    - */ - @NativeType("struct io_sqring_offsets") - public IOSQRingOffsets sq_off() { return nsq_off(address()); } - /** @return a {@link IOCQRingOffsets} view of the {@code cq_off} field. */ - @NativeType("struct io_cqring_offsets") - public IOCQRingOffsets cq_off() { return ncq_off(address()); } - - /** Sets the specified value to the {@link #sq_entries} field. */ - public IOURingParams sq_entries(@NativeType("__u32") int value) { nsq_entries(address(), value); return this; } - /** Sets the specified value to the {@code cq_entries} field. */ - public IOURingParams cq_entries(@NativeType("__u32") int value) { ncq_entries(address(), value); return this; } - /** Sets the specified value to the {@link #flags} field. */ - public IOURingParams flags(@NativeType("__u32") int value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code sq_thread_cpu} field. */ - public IOURingParams sq_thread_cpu(@NativeType("__u32") int value) { nsq_thread_cpu(address(), value); return this; } - /** Sets the specified value to the {@code sq_thread_idle} field. */ - public IOURingParams sq_thread_idle(@NativeType("__u32") int value) { nsq_thread_idle(address(), value); return this; } - /** Sets the specified value to the {@link #features} field. */ - public IOURingParams features(@NativeType("__u32") int value) { nfeatures(address(), value); return this; } - /** Sets the specified value to the {@code wq_fd} field. */ - public IOURingParams wq_fd(@NativeType("__u32") int value) { nwq_fd(address(), value); return this; } - /** Copies the specified {@link IntBuffer} to the {@code resv} field. */ - public IOURingParams resv(@NativeType("__u32[3]") IntBuffer value) { nresv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code resv} field. */ - public IOURingParams resv(int index, @NativeType("__u32") int value) { nresv(address(), index, value); return this; } - /** Copies the specified {@link IOSQRingOffsets} to the {@link #sq_off} field. */ - public IOURingParams sq_off(@NativeType("struct io_sqring_offsets") IOSQRingOffsets value) { nsq_off(address(), value); return this; } - /** Passes the {@link #sq_off} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURingParams sq_off(java.util.function.Consumer consumer) { consumer.accept(sq_off()); return this; } - /** Copies the specified {@link IOCQRingOffsets} to the {@code cq_off} field. */ - public IOURingParams cq_off(@NativeType("struct io_cqring_offsets") IOCQRingOffsets value) { ncq_off(address(), value); return this; } - /** Passes the {@code cq_off} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURingParams cq_off(java.util.function.Consumer consumer) { consumer.accept(cq_off()); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingParams set( - int sq_entries, - int cq_entries, - int flags, - int sq_thread_cpu, - int sq_thread_idle, - int features, - int wq_fd, - IntBuffer resv, - IOSQRingOffsets sq_off, - IOCQRingOffsets cq_off - ) { - sq_entries(sq_entries); - cq_entries(cq_entries); - flags(flags); - sq_thread_cpu(sq_thread_cpu); - sq_thread_idle(sq_thread_idle); - features(features); - wq_fd(wq_fd); - resv(resv); - sq_off(sq_off); - cq_off(cq_off); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingParams set(IOURingParams src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingParams} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingParams malloc() { - return new IOURingParams(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingParams} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingParams calloc() { - return new IOURingParams(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingParams} instance allocated with {@link BufferUtils}. */ - public static IOURingParams create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingParams(memAddress(container), container); - } - - /** Returns a new {@code IOURingParams} instance for the specified memory address. */ - public static IOURingParams create(long address) { - return new IOURingParams(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingParams createSafe(long address) { - return address == NULL ? null : new IOURingParams(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingParams} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingParams malloc(MemoryStack stack) { - return new IOURingParams(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingParams} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingParams calloc(MemoryStack stack) { - return new IOURingParams(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #sq_entries}. */ - public static int nsq_entries(long struct) { return UNSAFE.getInt(null, struct + IOURingParams.SQ_ENTRIES); } - /** Unsafe version of {@link #cq_entries}. */ - public static int ncq_entries(long struct) { return UNSAFE.getInt(null, struct + IOURingParams.CQ_ENTRIES); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOURingParams.FLAGS); } - /** Unsafe version of {@link #sq_thread_cpu}. */ - public static int nsq_thread_cpu(long struct) { return UNSAFE.getInt(null, struct + IOURingParams.SQ_THREAD_CPU); } - /** Unsafe version of {@link #sq_thread_idle}. */ - public static int nsq_thread_idle(long struct) { return UNSAFE.getInt(null, struct + IOURingParams.SQ_THREAD_IDLE); } - /** Unsafe version of {@link #features}. */ - public static int nfeatures(long struct) { return UNSAFE.getInt(null, struct + IOURingParams.FEATURES); } - /** Unsafe version of {@link #wq_fd}. */ - public static int nwq_fd(long struct) { return UNSAFE.getInt(null, struct + IOURingParams.WQ_FD); } - /** Unsafe version of {@link #resv}. */ - public static IntBuffer nresv(long struct) { return memIntBuffer(struct + IOURingParams.RESV, 3); } - /** Unsafe version of {@link #resv(int) resv}. */ - public static int nresv(long struct, int index) { - return UNSAFE.getInt(null, struct + IOURingParams.RESV + check(index, 3) * 4); - } - /** Unsafe version of {@link #sq_off}. */ - public static IOSQRingOffsets nsq_off(long struct) { return IOSQRingOffsets.create(struct + IOURingParams.SQ_OFF); } - /** Unsafe version of {@link #cq_off}. */ - public static IOCQRingOffsets ncq_off(long struct) { return IOCQRingOffsets.create(struct + IOURingParams.CQ_OFF); } - - /** Unsafe version of {@link #sq_entries(int) sq_entries}. */ - public static void nsq_entries(long struct, int value) { UNSAFE.putInt(null, struct + IOURingParams.SQ_ENTRIES, value); } - /** Unsafe version of {@link #cq_entries(int) cq_entries}. */ - public static void ncq_entries(long struct, int value) { UNSAFE.putInt(null, struct + IOURingParams.CQ_ENTRIES, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingParams.FLAGS, value); } - /** Unsafe version of {@link #sq_thread_cpu(int) sq_thread_cpu}. */ - public static void nsq_thread_cpu(long struct, int value) { UNSAFE.putInt(null, struct + IOURingParams.SQ_THREAD_CPU, value); } - /** Unsafe version of {@link #sq_thread_idle(int) sq_thread_idle}. */ - public static void nsq_thread_idle(long struct, int value) { UNSAFE.putInt(null, struct + IOURingParams.SQ_THREAD_IDLE, value); } - /** Unsafe version of {@link #features(int) features}. */ - public static void nfeatures(long struct, int value) { UNSAFE.putInt(null, struct + IOURingParams.FEATURES, value); } - /** Unsafe version of {@link #wq_fd(int) wq_fd}. */ - public static void nwq_fd(long struct, int value) { UNSAFE.putInt(null, struct + IOURingParams.WQ_FD, value); } - /** Unsafe version of {@link #resv(IntBuffer) resv}. */ - public static void nresv(long struct, IntBuffer value) { - if (CHECKS) { checkGT(value, 3); } - memCopy(memAddress(value), struct + IOURingParams.RESV, value.remaining() * 4); - } - /** Unsafe version of {@link #resv(int, int) resv}. */ - public static void nresv(long struct, int index, int value) { - UNSAFE.putInt(null, struct + IOURingParams.RESV + check(index, 3) * 4, value); - } - /** Unsafe version of {@link #sq_off(IOSQRingOffsets) sq_off}. */ - public static void nsq_off(long struct, IOSQRingOffsets value) { memCopy(value.address(), struct + IOURingParams.SQ_OFF, IOSQRingOffsets.SIZEOF); } - /** Unsafe version of {@link #cq_off(IOCQRingOffsets) cq_off}. */ - public static void ncq_off(long struct, IOCQRingOffsets value) { memCopy(value.address(), struct + IOURingParams.CQ_OFF, IOCQRingOffsets.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link IOURingParams} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingParams ELEMENT_FACTORY = IOURingParams.create(-1L); - - /** - * Creates a new {@code IOURingParams.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingParams#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingParams getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link IOURingParams#sq_entries} field. */ - @NativeType("__u32") - public int sq_entries() { return IOURingParams.nsq_entries(address()); } - /** @return the value of the {@code cq_entries} field. */ - @NativeType("__u32") - public int cq_entries() { return IOURingParams.ncq_entries(address()); } - /** @return the value of the {@link IOURingParams#flags} field. */ - @NativeType("__u32") - public int flags() { return IOURingParams.nflags(address()); } - /** @return the value of the {@code sq_thread_cpu} field. */ - @NativeType("__u32") - public int sq_thread_cpu() { return IOURingParams.nsq_thread_cpu(address()); } - /** @return the value of the {@code sq_thread_idle} field. */ - @NativeType("__u32") - public int sq_thread_idle() { return IOURingParams.nsq_thread_idle(address()); } - /** @return the value of the {@link IOURingParams#features} field. */ - @NativeType("__u32") - public int features() { return IOURingParams.nfeatures(address()); } - /** @return the value of the {@code wq_fd} field. */ - @NativeType("__u32") - public int wq_fd() { return IOURingParams.nwq_fd(address()); } - /** @return a {@link IntBuffer} view of the {@code resv} field. */ - @NativeType("__u32[3]") - public IntBuffer resv() { return IOURingParams.nresv(address()); } - /** @return the value at the specified index of the {@code resv} field. */ - @NativeType("__u32") - public int resv(int index) { return IOURingParams.nresv(address(), index); } - /** @return a {@link IOSQRingOffsets} view of the {@link IOURingParams#sq_off} field. */ - @NativeType("struct io_sqring_offsets") - public IOSQRingOffsets sq_off() { return IOURingParams.nsq_off(address()); } - /** @return a {@link IOCQRingOffsets} view of the {@code cq_off} field. */ - @NativeType("struct io_cqring_offsets") - public IOCQRingOffsets cq_off() { return IOURingParams.ncq_off(address()); } - - /** Sets the specified value to the {@link IOURingParams#sq_entries} field. */ - public Buffer sq_entries(@NativeType("__u32") int value) { IOURingParams.nsq_entries(address(), value); return this; } - /** Sets the specified value to the {@code cq_entries} field. */ - public Buffer cq_entries(@NativeType("__u32") int value) { IOURingParams.ncq_entries(address(), value); return this; } - /** Sets the specified value to the {@link IOURingParams#flags} field. */ - public Buffer flags(@NativeType("__u32") int value) { IOURingParams.nflags(address(), value); return this; } - /** Sets the specified value to the {@code sq_thread_cpu} field. */ - public Buffer sq_thread_cpu(@NativeType("__u32") int value) { IOURingParams.nsq_thread_cpu(address(), value); return this; } - /** Sets the specified value to the {@code sq_thread_idle} field. */ - public Buffer sq_thread_idle(@NativeType("__u32") int value) { IOURingParams.nsq_thread_idle(address(), value); return this; } - /** Sets the specified value to the {@link IOURingParams#features} field. */ - public Buffer features(@NativeType("__u32") int value) { IOURingParams.nfeatures(address(), value); return this; } - /** Sets the specified value to the {@code wq_fd} field. */ - public Buffer wq_fd(@NativeType("__u32") int value) { IOURingParams.nwq_fd(address(), value); return this; } - /** Copies the specified {@link IntBuffer} to the {@code resv} field. */ - public Buffer resv(@NativeType("__u32[3]") IntBuffer value) { IOURingParams.nresv(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code resv} field. */ - public Buffer resv(int index, @NativeType("__u32") int value) { IOURingParams.nresv(address(), index, value); return this; } - /** Copies the specified {@link IOSQRingOffsets} to the {@link IOURingParams#sq_off} field. */ - public Buffer sq_off(@NativeType("struct io_sqring_offsets") IOSQRingOffsets value) { IOURingParams.nsq_off(address(), value); return this; } - /** Passes the {@link IOURingParams#sq_off} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer sq_off(java.util.function.Consumer consumer) { consumer.accept(sq_off()); return this; } - /** Copies the specified {@link IOCQRingOffsets} to the {@code cq_off} field. */ - public Buffer cq_off(@NativeType("struct io_cqring_offsets") IOCQRingOffsets value) { IOURingParams.ncq_off(address(), value); return this; } - /** Passes the {@code cq_off} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer cq_off(java.util.function.Consumer consumer) { consumer.accept(cq_off()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingProbe.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingProbe.java deleted file mode 100644 index c7bd7f31..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingProbe.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_probe {
    - *     __u8 last_op;
    - *     __u8 ops_len;
    - *     __u16 resv;
    - *     __u32 resv2[3];
    - *     {@link IOURingProbeOp struct io_uring_probe_op} ops[0];
    - * }
    - */ -@NativeType("struct io_uring_probe") -public class IOURingProbe extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - LAST_OP, - OPS_LEN, - RESV, - RESV2, - OPS; - - static { - Layout layout = __struct( - __member(1), - __member(1), - __member(2), - __array(4, 3), - __array(IOURingProbeOp.SIZEOF, IOURingProbeOp.ALIGNOF, 0) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - LAST_OP = layout.offsetof(0); - OPS_LEN = layout.offsetof(1); - RESV = layout.offsetof(2); - RESV2 = layout.offsetof(3); - OPS = layout.offsetof(4); - } - - protected IOURingProbe(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingProbe create(long address, @Nullable ByteBuffer container) { - return new IOURingProbe(address, container); - } - - /** - * Creates a {@code IOURingProbe} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingProbe(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code last_op} field. */ - @NativeType("__u8") - public byte last_op() { return nlast_op(address()); } - /** @return the value of the {@code ops_len} field. */ - @NativeType("__u8") - public byte ops_len() { return nops_len(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u16") - public short resv() { return nresv(address()); } - /** @return a {@link IOURingProbeOp}.Buffer view of the {@code ops} field. */ - @NativeType("struct io_uring_probe_op[0]") - public IOURingProbeOp.Buffer ops() { return nops(address()); } - /** @return a {@link IOURingProbeOp} view of the struct at the specified index of the {@code ops} field. */ - @NativeType("struct io_uring_probe_op") - public IOURingProbeOp ops(int index) { return nops(address(), index); } - - /** Sets the specified value to the {@code last_op} field. */ - public IOURingProbe last_op(@NativeType("__u8") byte value) { nlast_op(address(), value); return this; } - /** Sets the specified value to the {@code ops_len} field. */ - public IOURingProbe ops_len(@NativeType("__u8") byte value) { nops_len(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public IOURingProbe resv(@NativeType("__u16") short value) { nresv(address(), value); return this; } - /** Copies the specified {@link IOURingProbeOp.Buffer} to the {@code ops} field. */ - public IOURingProbe ops(@NativeType("struct io_uring_probe_op[0]") IOURingProbeOp.Buffer value) { nops(address(), value); return this; } - /** Copies the specified {@link IOURingProbeOp} at the specified index of the {@code ops} field. */ - public IOURingProbe ops(int index, @NativeType("struct io_uring_probe_op") IOURingProbeOp value) { nops(address(), index, value); return this; } - /** Passes the {@code ops} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURingProbe ops(java.util.function.Consumer consumer) { consumer.accept(ops()); return this; } - /** Passes the element at {@code index} of the {@code ops} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURingProbe ops(int index, java.util.function.Consumer consumer) { consumer.accept(ops(index)); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingProbe set( - byte last_op, - byte ops_len, - short resv, - IOURingProbeOp.Buffer ops - ) { - last_op(last_op); - ops_len(ops_len); - resv(resv); - ops(ops); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingProbe set(IOURingProbe src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingProbe} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingProbe malloc() { - return new IOURingProbe(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingProbe} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingProbe calloc() { - return new IOURingProbe(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingProbe} instance allocated with {@link BufferUtils}. */ - public static IOURingProbe create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingProbe(memAddress(container), container); - } - - /** Returns a new {@code IOURingProbe} instance for the specified memory address. */ - public static IOURingProbe create(long address) { - return new IOURingProbe(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingProbe createSafe(long address) { - return address == NULL ? null : new IOURingProbe(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingProbe} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingProbe malloc(MemoryStack stack) { - return new IOURingProbe(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingProbe} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingProbe calloc(MemoryStack stack) { - return new IOURingProbe(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #last_op}. */ - public static byte nlast_op(long struct) { return UNSAFE.getByte(null, struct + IOURingProbe.LAST_OP); } - /** Unsafe version of {@link #ops_len}. */ - public static byte nops_len(long struct) { return UNSAFE.getByte(null, struct + IOURingProbe.OPS_LEN); } - /** Unsafe version of {@link #resv}. */ - public static short nresv(long struct) { return UNSAFE.getShort(null, struct + IOURingProbe.RESV); } - public static IntBuffer nresv2(long struct) { return memIntBuffer(struct + IOURingProbe.RESV2, 3); } - public static int nresv2(long struct, int index) { - return UNSAFE.getInt(null, struct + IOURingProbe.RESV2 + check(index, 3) * 4); - } - /** Unsafe version of {@link #ops}. */ - public static IOURingProbeOp.Buffer nops(long struct) { return IOURingProbeOp.create(struct + IOURingProbe.OPS, 0); } - /** Unsafe version of {@link #ops(int) ops}. */ - public static IOURingProbeOp nops(long struct, int index) { - return IOURingProbeOp.create(struct + IOURingProbe.OPS + check(index, 0) * IOURingProbeOp.SIZEOF); - } - - /** Unsafe version of {@link #last_op(byte) last_op}. */ - public static void nlast_op(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingProbe.LAST_OP, value); } - /** Unsafe version of {@link #ops_len(byte) ops_len}. */ - public static void nops_len(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingProbe.OPS_LEN, value); } - /** Unsafe version of {@link #resv(short) resv}. */ - public static void nresv(long struct, short value) { UNSAFE.putShort(null, struct + IOURingProbe.RESV, value); } - public static void nresv2(long struct, IntBuffer value) { - if (CHECKS) { checkGT(value, 3); } - memCopy(memAddress(value), struct + IOURingProbe.RESV2, value.remaining() * 4); - } - public static void nresv2(long struct, int index, int value) { - UNSAFE.putInt(null, struct + IOURingProbe.RESV2 + check(index, 3) * 4, value); - } - /** Unsafe version of {@link #ops(IOURingProbeOp.Buffer) ops}. */ - public static void nops(long struct, IOURingProbeOp.Buffer value) { - if (CHECKS) { checkGT(value, 0); } - memCopy(value.address(), struct + IOURingProbe.OPS, value.remaining() * IOURingProbeOp.SIZEOF); - } - /** Unsafe version of {@link #ops(int, IOURingProbeOp) ops}. */ - public static void nops(long struct, int index, IOURingProbeOp value) { - memCopy(value.address(), struct + IOURingProbe.OPS + check(index, 0) * IOURingProbeOp.SIZEOF, IOURingProbeOp.SIZEOF); - } - - // ----------------------------------- - - /** An array of {@link IOURingProbe} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingProbe ELEMENT_FACTORY = IOURingProbe.create(-1L); - - /** - * Creates a new {@code IOURingProbe.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingProbe#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingProbe getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code last_op} field. */ - @NativeType("__u8") - public byte last_op() { return IOURingProbe.nlast_op(address()); } - /** @return the value of the {@code ops_len} field. */ - @NativeType("__u8") - public byte ops_len() { return IOURingProbe.nops_len(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u16") - public short resv() { return IOURingProbe.nresv(address()); } - /** @return a {@link IOURingProbeOp}.Buffer view of the {@code ops} field. */ - @NativeType("struct io_uring_probe_op[0]") - public IOURingProbeOp.Buffer ops() { return IOURingProbe.nops(address()); } - /** @return a {@link IOURingProbeOp} view of the struct at the specified index of the {@code ops} field. */ - @NativeType("struct io_uring_probe_op") - public IOURingProbeOp ops(int index) { return IOURingProbe.nops(address(), index); } - - /** Sets the specified value to the {@code last_op} field. */ - public Buffer last_op(@NativeType("__u8") byte value) { IOURingProbe.nlast_op(address(), value); return this; } - /** Sets the specified value to the {@code ops_len} field. */ - public Buffer ops_len(@NativeType("__u8") byte value) { IOURingProbe.nops_len(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public Buffer resv(@NativeType("__u16") short value) { IOURingProbe.nresv(address(), value); return this; } - /** Copies the specified {@link IOURingProbeOp.Buffer} to the {@code ops} field. */ - public Buffer ops(@NativeType("struct io_uring_probe_op[0]") IOURingProbeOp.Buffer value) { IOURingProbe.nops(address(), value); return this; } - /** Copies the specified {@link IOURingProbeOp} at the specified index of the {@code ops} field. */ - public Buffer ops(int index, @NativeType("struct io_uring_probe_op") IOURingProbeOp value) { IOURingProbe.nops(address(), index, value); return this; } - /** Passes the {@code ops} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer ops(java.util.function.Consumer consumer) { consumer.accept(ops()); return this; } - /** Passes the element at {@code index} of the {@code ops} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer ops(int index, java.util.function.Consumer consumer) { consumer.accept(ops(index)); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingProbeOp.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingProbeOp.java deleted file mode 100644 index adc2f81b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingProbeOp.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_probe_op {
    - *     __u8 op;
    - *     __u8 resv;
    - *     __u16 {@link #flags};
    - *     __u32 resv2;
    - * }
    - */ -@NativeType("struct io_uring_probe_op") -public class IOURingProbeOp extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OP, - RESV, - FLAGS, - RESV2; - - static { - Layout layout = __struct( - __member(1), - __member(1), - __member(2), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OP = layout.offsetof(0); - RESV = layout.offsetof(1); - FLAGS = layout.offsetof(2); - RESV2 = layout.offsetof(3); - } - - protected IOURingProbeOp(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingProbeOp create(long address, @Nullable ByteBuffer container) { - return new IOURingProbeOp(address, container); - } - - /** - * Creates a {@code IOURingProbeOp} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingProbeOp(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code op} field. */ - @NativeType("__u8") - public byte op() { return nop(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u8") - public byte resv() { return nresv(address()); } - /** one or more of:
    {@link LibIOURing#IO_URING_OP_SUPPORTED}
    */ - @NativeType("__u16") - public short flags() { return nflags(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u32") - public int resv2() { return nresv2(address()); } - - /** Sets the specified value to the {@code op} field. */ - public IOURingProbeOp op(@NativeType("__u8") byte value) { nop(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public IOURingProbeOp resv(@NativeType("__u8") byte value) { nresv(address(), value); return this; } - /** Sets the specified value to the {@link #flags} field. */ - public IOURingProbeOp flags(@NativeType("__u16") short value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public IOURingProbeOp resv2(@NativeType("__u32") int value) { nresv2(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingProbeOp set( - byte op, - byte resv, - short flags, - int resv2 - ) { - op(op); - resv(resv); - flags(flags); - resv2(resv2); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingProbeOp set(IOURingProbeOp src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingProbeOp} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingProbeOp malloc() { - return new IOURingProbeOp(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingProbeOp} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingProbeOp calloc() { - return new IOURingProbeOp(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingProbeOp} instance allocated with {@link BufferUtils}. */ - public static IOURingProbeOp create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingProbeOp(memAddress(container), container); - } - - /** Returns a new {@code IOURingProbeOp} instance for the specified memory address. */ - public static IOURingProbeOp create(long address) { - return new IOURingProbeOp(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingProbeOp createSafe(long address) { - return address == NULL ? null : new IOURingProbeOp(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingProbeOp} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingProbeOp malloc(MemoryStack stack) { - return new IOURingProbeOp(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingProbeOp} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingProbeOp calloc(MemoryStack stack) { - return new IOURingProbeOp(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #op}. */ - public static byte nop(long struct) { return UNSAFE.getByte(null, struct + IOURingProbeOp.OP); } - /** Unsafe version of {@link #resv}. */ - public static byte nresv(long struct) { return UNSAFE.getByte(null, struct + IOURingProbeOp.RESV); } - /** Unsafe version of {@link #flags}. */ - public static short nflags(long struct) { return UNSAFE.getShort(null, struct + IOURingProbeOp.FLAGS); } - /** Unsafe version of {@link #resv2}. */ - public static int nresv2(long struct) { return UNSAFE.getInt(null, struct + IOURingProbeOp.RESV2); } - - /** Unsafe version of {@link #op(byte) op}. */ - public static void nop(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingProbeOp.OP, value); } - /** Unsafe version of {@link #resv(byte) resv}. */ - public static void nresv(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingProbeOp.RESV, value); } - /** Unsafe version of {@link #flags(short) flags}. */ - public static void nflags(long struct, short value) { UNSAFE.putShort(null, struct + IOURingProbeOp.FLAGS, value); } - /** Unsafe version of {@link #resv2(int) resv2}. */ - public static void nresv2(long struct, int value) { UNSAFE.putInt(null, struct + IOURingProbeOp.RESV2, value); } - - // ----------------------------------- - - /** An array of {@link IOURingProbeOp} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingProbeOp ELEMENT_FACTORY = IOURingProbeOp.create(-1L); - - /** - * Creates a new {@code IOURingProbeOp.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingProbeOp#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingProbeOp getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code op} field. */ - @NativeType("__u8") - public byte op() { return IOURingProbeOp.nop(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u8") - public byte resv() { return IOURingProbeOp.nresv(address()); } - /** @return the value of the {@link IOURingProbeOp#flags} field. */ - @NativeType("__u16") - public short flags() { return IOURingProbeOp.nflags(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u32") - public int resv2() { return IOURingProbeOp.nresv2(address()); } - - /** Sets the specified value to the {@code op} field. */ - public Buffer op(@NativeType("__u8") byte value) { IOURingProbeOp.nop(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public Buffer resv(@NativeType("__u8") byte value) { IOURingProbeOp.nresv(address(), value); return this; } - /** Sets the specified value to the {@link IOURingProbeOp#flags} field. */ - public Buffer flags(@NativeType("__u16") short value) { IOURingProbeOp.nflags(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public Buffer resv2(@NativeType("__u32") int value) { IOURingProbeOp.nresv2(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCRegister.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCRegister.java deleted file mode 100644 index d6846614..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCRegister.java +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_rsrc_register {
    - *     __u32 nr;
    - *     __u32 flags;
    - *     __u64 resv2;
    - *     __u64 data;
    - *     __u64 tags;
    - * }
    - */ -@NativeType("struct io_uring_rsrc_register") -public class IOURingRSRCRegister extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NR, - FLAGS, - RESV2, - DATA, - TAGS; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(8), - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NR = layout.offsetof(0); - FLAGS = layout.offsetof(1); - RESV2 = layout.offsetof(2); - DATA = layout.offsetof(3); - TAGS = layout.offsetof(4); - } - - protected IOURingRSRCRegister(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingRSRCRegister create(long address, @Nullable ByteBuffer container) { - return new IOURingRSRCRegister(address, container); - } - - /** - * Creates a {@code IOURingRSRCRegister} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingRSRCRegister(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code nr} field. */ - @NativeType("__u32") - public int nr() { return nnr(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return nflags(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u64") - public long resv2() { return nresv2(address()); } - /** @return the value of the {@code data} field. */ - @NativeType("__u64") - public long data() { return ndata(address()); } - /** @return the value of the {@code tags} field. */ - @NativeType("__u64") - public long tags() { return ntags(address()); } - - /** Sets the specified value to the {@code nr} field. */ - public IOURingRSRCRegister nr(@NativeType("__u32") int value) { nnr(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public IOURingRSRCRegister flags(@NativeType("__u32") int value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public IOURingRSRCRegister resv2(@NativeType("__u64") long value) { nresv2(address(), value); return this; } - /** Sets the specified value to the {@code data} field. */ - public IOURingRSRCRegister data(@NativeType("__u64") long value) { ndata(address(), value); return this; } - /** Sets the specified value to the {@code tags} field. */ - public IOURingRSRCRegister tags(@NativeType("__u64") long value) { ntags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingRSRCRegister set( - int nr, - int flags, - long resv2, - long data, - long tags - ) { - nr(nr); - flags(flags); - resv2(resv2); - data(data); - tags(tags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingRSRCRegister set(IOURingRSRCRegister src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingRSRCRegister} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingRSRCRegister malloc() { - return new IOURingRSRCRegister(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingRSRCRegister} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingRSRCRegister calloc() { - return new IOURingRSRCRegister(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingRSRCRegister} instance allocated with {@link BufferUtils}. */ - public static IOURingRSRCRegister create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingRSRCRegister(memAddress(container), container); - } - - /** Returns a new {@code IOURingRSRCRegister} instance for the specified memory address. */ - public static IOURingRSRCRegister create(long address) { - return new IOURingRSRCRegister(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingRSRCRegister createSafe(long address) { - return address == NULL ? null : new IOURingRSRCRegister(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingRSRCRegister} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingRSRCRegister malloc(MemoryStack stack) { - return new IOURingRSRCRegister(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingRSRCRegister} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingRSRCRegister calloc(MemoryStack stack) { - return new IOURingRSRCRegister(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #nr}. */ - public static int nnr(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCRegister.NR); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCRegister.FLAGS); } - /** Unsafe version of {@link #resv2}. */ - public static long nresv2(long struct) { return UNSAFE.getLong(null, struct + IOURingRSRCRegister.RESV2); } - /** Unsafe version of {@link #data}. */ - public static long ndata(long struct) { return UNSAFE.getLong(null, struct + IOURingRSRCRegister.DATA); } - /** Unsafe version of {@link #tags}. */ - public static long ntags(long struct) { return UNSAFE.getLong(null, struct + IOURingRSRCRegister.TAGS); } - - /** Unsafe version of {@link #nr(int) nr}. */ - public static void nnr(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCRegister.NR, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCRegister.FLAGS, value); } - /** Unsafe version of {@link #resv2(long) resv2}. */ - public static void nresv2(long struct, long value) { UNSAFE.putLong(null, struct + IOURingRSRCRegister.RESV2, value); } - /** Unsafe version of {@link #data(long) data}. */ - public static void ndata(long struct, long value) { UNSAFE.putLong(null, struct + IOURingRSRCRegister.DATA, value); } - /** Unsafe version of {@link #tags(long) tags}. */ - public static void ntags(long struct, long value) { UNSAFE.putLong(null, struct + IOURingRSRCRegister.TAGS, value); } - - // ----------------------------------- - - /** An array of {@link IOURingRSRCRegister} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingRSRCRegister ELEMENT_FACTORY = IOURingRSRCRegister.create(-1L); - - /** - * Creates a new {@code IOURingRSRCRegister.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingRSRCRegister#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingRSRCRegister getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code nr} field. */ - @NativeType("__u32") - public int nr() { return IOURingRSRCRegister.nnr(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return IOURingRSRCRegister.nflags(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u64") - public long resv2() { return IOURingRSRCRegister.nresv2(address()); } - /** @return the value of the {@code data} field. */ - @NativeType("__u64") - public long data() { return IOURingRSRCRegister.ndata(address()); } - /** @return the value of the {@code tags} field. */ - @NativeType("__u64") - public long tags() { return IOURingRSRCRegister.ntags(address()); } - - /** Sets the specified value to the {@code nr} field. */ - public Buffer nr(@NativeType("__u32") int value) { IOURingRSRCRegister.nnr(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("__u32") int value) { IOURingRSRCRegister.nflags(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public Buffer resv2(@NativeType("__u64") long value) { IOURingRSRCRegister.nresv2(address(), value); return this; } - /** Sets the specified value to the {@code data} field. */ - public Buffer data(@NativeType("__u64") long value) { IOURingRSRCRegister.ndata(address(), value); return this; } - /** Sets the specified value to the {@code tags} field. */ - public Buffer tags(@NativeType("__u64") long value) { IOURingRSRCRegister.ntags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCUpdate.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCUpdate.java deleted file mode 100644 index 574af926..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCUpdate.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_rsrc_update {
    - *     __u32 offset;
    - *     __u32 resv;
    - *     __u64 data;
    - * }
    - */ -@NativeType("struct io_uring_rsrc_update") -public class IOURingRSRCUpdate extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OFFSET, - RESV, - DATA; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OFFSET = layout.offsetof(0); - RESV = layout.offsetof(1); - DATA = layout.offsetof(2); - } - - protected IOURingRSRCUpdate(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingRSRCUpdate create(long address, @Nullable ByteBuffer container) { - return new IOURingRSRCUpdate(address, container); - } - - /** - * Creates a {@code IOURingRSRCUpdate} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingRSRCUpdate(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code offset} field. */ - @NativeType("__u32") - public int offset() { return noffset(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u32") - public int resv() { return nresv(address()); } - /** @return the value of the {@code data} field. */ - @NativeType("__u64") - public long data() { return ndata(address()); } - - /** Sets the specified value to the {@code offset} field. */ - public IOURingRSRCUpdate offset(@NativeType("__u32") int value) { noffset(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public IOURingRSRCUpdate resv(@NativeType("__u32") int value) { nresv(address(), value); return this; } - /** Sets the specified value to the {@code data} field. */ - public IOURingRSRCUpdate data(@NativeType("__u64") long value) { ndata(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingRSRCUpdate set( - int offset, - int resv, - long data - ) { - offset(offset); - resv(resv); - data(data); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingRSRCUpdate set(IOURingRSRCUpdate src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingRSRCUpdate} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingRSRCUpdate malloc() { - return new IOURingRSRCUpdate(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingRSRCUpdate} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingRSRCUpdate calloc() { - return new IOURingRSRCUpdate(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingRSRCUpdate} instance allocated with {@link BufferUtils}. */ - public static IOURingRSRCUpdate create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingRSRCUpdate(memAddress(container), container); - } - - /** Returns a new {@code IOURingRSRCUpdate} instance for the specified memory address. */ - public static IOURingRSRCUpdate create(long address) { - return new IOURingRSRCUpdate(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingRSRCUpdate createSafe(long address) { - return address == NULL ? null : new IOURingRSRCUpdate(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingRSRCUpdate} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingRSRCUpdate malloc(MemoryStack stack) { - return new IOURingRSRCUpdate(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingRSRCUpdate} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingRSRCUpdate calloc(MemoryStack stack) { - return new IOURingRSRCUpdate(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #offset}. */ - public static int noffset(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCUpdate.OFFSET); } - /** Unsafe version of {@link #resv}. */ - public static int nresv(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCUpdate.RESV); } - /** Unsafe version of {@link #data}. */ - public static long ndata(long struct) { return UNSAFE.getLong(null, struct + IOURingRSRCUpdate.DATA); } - - /** Unsafe version of {@link #offset(int) offset}. */ - public static void noffset(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCUpdate.OFFSET, value); } - /** Unsafe version of {@link #resv(int) resv}. */ - public static void nresv(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCUpdate.RESV, value); } - /** Unsafe version of {@link #data(long) data}. */ - public static void ndata(long struct, long value) { UNSAFE.putLong(null, struct + IOURingRSRCUpdate.DATA, value); } - - // ----------------------------------- - - /** An array of {@link IOURingRSRCUpdate} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingRSRCUpdate ELEMENT_FACTORY = IOURingRSRCUpdate.create(-1L); - - /** - * Creates a new {@code IOURingRSRCUpdate.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingRSRCUpdate#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingRSRCUpdate getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code offset} field. */ - @NativeType("__u32") - public int offset() { return IOURingRSRCUpdate.noffset(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u32") - public int resv() { return IOURingRSRCUpdate.nresv(address()); } - /** @return the value of the {@code data} field. */ - @NativeType("__u64") - public long data() { return IOURingRSRCUpdate.ndata(address()); } - - /** Sets the specified value to the {@code offset} field. */ - public Buffer offset(@NativeType("__u32") int value) { IOURingRSRCUpdate.noffset(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public Buffer resv(@NativeType("__u32") int value) { IOURingRSRCUpdate.nresv(address(), value); return this; } - /** Sets the specified value to the {@code data} field. */ - public Buffer data(@NativeType("__u64") long value) { IOURingRSRCUpdate.ndata(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCUpdate2.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCUpdate2.java deleted file mode 100644 index c0f47b9f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRSRCUpdate2.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_rsrc_update2 {
    - *     __u32 offset;
    - *     __u32 resv;
    - *     __u64 data;
    - *     __u64 tags;
    - *     __u32 nr;
    - *     __u32 resv2;
    - * }
    - */ -@NativeType("struct io_uring_rsrc_update2") -public class IOURingRSRCUpdate2 extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OFFSET, - RESV, - DATA, - TAGS, - NR, - RESV2; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(8), - __member(8), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OFFSET = layout.offsetof(0); - RESV = layout.offsetof(1); - DATA = layout.offsetof(2); - TAGS = layout.offsetof(3); - NR = layout.offsetof(4); - RESV2 = layout.offsetof(5); - } - - protected IOURingRSRCUpdate2(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingRSRCUpdate2 create(long address, @Nullable ByteBuffer container) { - return new IOURingRSRCUpdate2(address, container); - } - - /** - * Creates a {@code IOURingRSRCUpdate2} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingRSRCUpdate2(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code offset} field. */ - @NativeType("__u32") - public int offset() { return noffset(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u32") - public int resv() { return nresv(address()); } - /** @return the value of the {@code data} field. */ - @NativeType("__u64") - public long data() { return ndata(address()); } - /** @return the value of the {@code tags} field. */ - @NativeType("__u64") - public long tags() { return ntags(address()); } - /** @return the value of the {@code nr} field. */ - @NativeType("__u32") - public int nr() { return nnr(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u32") - public int resv2() { return nresv2(address()); } - - /** Sets the specified value to the {@code offset} field. */ - public IOURingRSRCUpdate2 offset(@NativeType("__u32") int value) { noffset(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public IOURingRSRCUpdate2 resv(@NativeType("__u32") int value) { nresv(address(), value); return this; } - /** Sets the specified value to the {@code data} field. */ - public IOURingRSRCUpdate2 data(@NativeType("__u64") long value) { ndata(address(), value); return this; } - /** Sets the specified value to the {@code tags} field. */ - public IOURingRSRCUpdate2 tags(@NativeType("__u64") long value) { ntags(address(), value); return this; } - /** Sets the specified value to the {@code nr} field. */ - public IOURingRSRCUpdate2 nr(@NativeType("__u32") int value) { nnr(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public IOURingRSRCUpdate2 resv2(@NativeType("__u32") int value) { nresv2(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingRSRCUpdate2 set( - int offset, - int resv, - long data, - long tags, - int nr, - int resv2 - ) { - offset(offset); - resv(resv); - data(data); - tags(tags); - nr(nr); - resv2(resv2); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingRSRCUpdate2 set(IOURingRSRCUpdate2 src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingRSRCUpdate2} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingRSRCUpdate2 malloc() { - return new IOURingRSRCUpdate2(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingRSRCUpdate2} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingRSRCUpdate2 calloc() { - return new IOURingRSRCUpdate2(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingRSRCUpdate2} instance allocated with {@link BufferUtils}. */ - public static IOURingRSRCUpdate2 create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingRSRCUpdate2(memAddress(container), container); - } - - /** Returns a new {@code IOURingRSRCUpdate2} instance for the specified memory address. */ - public static IOURingRSRCUpdate2 create(long address) { - return new IOURingRSRCUpdate2(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingRSRCUpdate2 createSafe(long address) { - return address == NULL ? null : new IOURingRSRCUpdate2(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingRSRCUpdate2} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingRSRCUpdate2 malloc(MemoryStack stack) { - return new IOURingRSRCUpdate2(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingRSRCUpdate2} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingRSRCUpdate2 calloc(MemoryStack stack) { - return new IOURingRSRCUpdate2(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #offset}. */ - public static int noffset(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCUpdate2.OFFSET); } - /** Unsafe version of {@link #resv}. */ - public static int nresv(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCUpdate2.RESV); } - /** Unsafe version of {@link #data}. */ - public static long ndata(long struct) { return UNSAFE.getLong(null, struct + IOURingRSRCUpdate2.DATA); } - /** Unsafe version of {@link #tags}. */ - public static long ntags(long struct) { return UNSAFE.getLong(null, struct + IOURingRSRCUpdate2.TAGS); } - /** Unsafe version of {@link #nr}. */ - public static int nnr(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCUpdate2.NR); } - /** Unsafe version of {@link #resv2}. */ - public static int nresv2(long struct) { return UNSAFE.getInt(null, struct + IOURingRSRCUpdate2.RESV2); } - - /** Unsafe version of {@link #offset(int) offset}. */ - public static void noffset(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCUpdate2.OFFSET, value); } - /** Unsafe version of {@link #resv(int) resv}. */ - public static void nresv(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCUpdate2.RESV, value); } - /** Unsafe version of {@link #data(long) data}. */ - public static void ndata(long struct, long value) { UNSAFE.putLong(null, struct + IOURingRSRCUpdate2.DATA, value); } - /** Unsafe version of {@link #tags(long) tags}. */ - public static void ntags(long struct, long value) { UNSAFE.putLong(null, struct + IOURingRSRCUpdate2.TAGS, value); } - /** Unsafe version of {@link #nr(int) nr}. */ - public static void nnr(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCUpdate2.NR, value); } - /** Unsafe version of {@link #resv2(int) resv2}. */ - public static void nresv2(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRSRCUpdate2.RESV2, value); } - - // ----------------------------------- - - /** An array of {@link IOURingRSRCUpdate2} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingRSRCUpdate2 ELEMENT_FACTORY = IOURingRSRCUpdate2.create(-1L); - - /** - * Creates a new {@code IOURingRSRCUpdate2.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingRSRCUpdate2#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingRSRCUpdate2 getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code offset} field. */ - @NativeType("__u32") - public int offset() { return IOURingRSRCUpdate2.noffset(address()); } - /** @return the value of the {@code resv} field. */ - @NativeType("__u32") - public int resv() { return IOURingRSRCUpdate2.nresv(address()); } - /** @return the value of the {@code data} field. */ - @NativeType("__u64") - public long data() { return IOURingRSRCUpdate2.ndata(address()); } - /** @return the value of the {@code tags} field. */ - @NativeType("__u64") - public long tags() { return IOURingRSRCUpdate2.ntags(address()); } - /** @return the value of the {@code nr} field. */ - @NativeType("__u32") - public int nr() { return IOURingRSRCUpdate2.nnr(address()); } - /** @return the value of the {@code resv2} field. */ - @NativeType("__u32") - public int resv2() { return IOURingRSRCUpdate2.nresv2(address()); } - - /** Sets the specified value to the {@code offset} field. */ - public Buffer offset(@NativeType("__u32") int value) { IOURingRSRCUpdate2.noffset(address(), value); return this; } - /** Sets the specified value to the {@code resv} field. */ - public Buffer resv(@NativeType("__u32") int value) { IOURingRSRCUpdate2.nresv(address(), value); return this; } - /** Sets the specified value to the {@code data} field. */ - public Buffer data(@NativeType("__u64") long value) { IOURingRSRCUpdate2.ndata(address(), value); return this; } - /** Sets the specified value to the {@code tags} field. */ - public Buffer tags(@NativeType("__u64") long value) { IOURingRSRCUpdate2.ntags(address(), value); return this; } - /** Sets the specified value to the {@code nr} field. */ - public Buffer nr(@NativeType("__u32") int value) { IOURingRSRCUpdate2.nnr(address(), value); return this; } - /** Sets the specified value to the {@code resv2} field. */ - public Buffer resv2(@NativeType("__u32") int value) { IOURingRSRCUpdate2.nresv2(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRecvmsgOut.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRecvmsgOut.java deleted file mode 100644 index 92b6e157..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRecvmsgOut.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_recvmsg_out {
    - *     __u32 namelen;
    - *     __u32 controllen;
    - *     __u32 payloadlen;
    - *     __u32 flags;
    - * }
    - */ -@NativeType("struct io_uring_recvmsg_out") -public class IOURingRecvmsgOut extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NAMELEN, - CONTROLLEN, - PAYLOADLEN, - FLAGS; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NAMELEN = layout.offsetof(0); - CONTROLLEN = layout.offsetof(1); - PAYLOADLEN = layout.offsetof(2); - FLAGS = layout.offsetof(3); - } - - protected IOURingRecvmsgOut(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingRecvmsgOut create(long address, @Nullable ByteBuffer container) { - return new IOURingRecvmsgOut(address, container); - } - - /** - * Creates a {@code IOURingRecvmsgOut} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingRecvmsgOut(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code namelen} field. */ - @NativeType("__u32") - public int namelen() { return nnamelen(address()); } - /** @return the value of the {@code controllen} field. */ - @NativeType("__u32") - public int controllen() { return ncontrollen(address()); } - /** @return the value of the {@code payloadlen} field. */ - @NativeType("__u32") - public int payloadlen() { return npayloadlen(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return nflags(address()); } - - /** Sets the specified value to the {@code namelen} field. */ - public IOURingRecvmsgOut namelen(@NativeType("__u32") int value) { nnamelen(address(), value); return this; } - /** Sets the specified value to the {@code controllen} field. */ - public IOURingRecvmsgOut controllen(@NativeType("__u32") int value) { ncontrollen(address(), value); return this; } - /** Sets the specified value to the {@code payloadlen} field. */ - public IOURingRecvmsgOut payloadlen(@NativeType("__u32") int value) { npayloadlen(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public IOURingRecvmsgOut flags(@NativeType("__u32") int value) { nflags(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingRecvmsgOut set( - int namelen, - int controllen, - int payloadlen, - int flags - ) { - namelen(namelen); - controllen(controllen); - payloadlen(payloadlen); - flags(flags); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingRecvmsgOut set(IOURingRecvmsgOut src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingRecvmsgOut} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingRecvmsgOut malloc() { - return new IOURingRecvmsgOut(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingRecvmsgOut} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingRecvmsgOut calloc() { - return new IOURingRecvmsgOut(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingRecvmsgOut} instance allocated with {@link BufferUtils}. */ - public static IOURingRecvmsgOut create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingRecvmsgOut(memAddress(container), container); - } - - /** Returns a new {@code IOURingRecvmsgOut} instance for the specified memory address. */ - public static IOURingRecvmsgOut create(long address) { - return new IOURingRecvmsgOut(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingRecvmsgOut createSafe(long address) { - return address == NULL ? null : new IOURingRecvmsgOut(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingRecvmsgOut} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingRecvmsgOut malloc(MemoryStack stack) { - return new IOURingRecvmsgOut(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingRecvmsgOut} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingRecvmsgOut calloc(MemoryStack stack) { - return new IOURingRecvmsgOut(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #namelen}. */ - public static int nnamelen(long struct) { return UNSAFE.getInt(null, struct + IOURingRecvmsgOut.NAMELEN); } - /** Unsafe version of {@link #controllen}. */ - public static int ncontrollen(long struct) { return UNSAFE.getInt(null, struct + IOURingRecvmsgOut.CONTROLLEN); } - /** Unsafe version of {@link #payloadlen}. */ - public static int npayloadlen(long struct) { return UNSAFE.getInt(null, struct + IOURingRecvmsgOut.PAYLOADLEN); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOURingRecvmsgOut.FLAGS); } - - /** Unsafe version of {@link #namelen(int) namelen}. */ - public static void nnamelen(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRecvmsgOut.NAMELEN, value); } - /** Unsafe version of {@link #controllen(int) controllen}. */ - public static void ncontrollen(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRecvmsgOut.CONTROLLEN, value); } - /** Unsafe version of {@link #payloadlen(int) payloadlen}. */ - public static void npayloadlen(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRecvmsgOut.PAYLOADLEN, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingRecvmsgOut.FLAGS, value); } - - // ----------------------------------- - - /** An array of {@link IOURingRecvmsgOut} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingRecvmsgOut ELEMENT_FACTORY = IOURingRecvmsgOut.create(-1L); - - /** - * Creates a new {@code IOURingRecvmsgOut.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingRecvmsgOut#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingRecvmsgOut getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code namelen} field. */ - @NativeType("__u32") - public int namelen() { return IOURingRecvmsgOut.nnamelen(address()); } - /** @return the value of the {@code controllen} field. */ - @NativeType("__u32") - public int controllen() { return IOURingRecvmsgOut.ncontrollen(address()); } - /** @return the value of the {@code payloadlen} field. */ - @NativeType("__u32") - public int payloadlen() { return IOURingRecvmsgOut.npayloadlen(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return IOURingRecvmsgOut.nflags(address()); } - - /** Sets the specified value to the {@code namelen} field. */ - public Buffer namelen(@NativeType("__u32") int value) { IOURingRecvmsgOut.nnamelen(address(), value); return this; } - /** Sets the specified value to the {@code controllen} field. */ - public Buffer controllen(@NativeType("__u32") int value) { IOURingRecvmsgOut.ncontrollen(address(), value); return this; } - /** Sets the specified value to the {@code payloadlen} field. */ - public Buffer payloadlen(@NativeType("__u32") int value) { IOURingRecvmsgOut.npayloadlen(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("__u32") int value) { IOURingRecvmsgOut.nflags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRestriction.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRestriction.java deleted file mode 100644 index 30316140..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingRestriction.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_restriction {
    - *     __u16 opcode;
    - *     union {
    - *         __u8 register_op;
    - *         __u8 sqe_op;
    - *         __u8 sqe_flags;
    - *     };
    - *     __u8 resv;
    - *     __u32 resv2[3];
    - * }
    - */ -@NativeType("struct io_uring_restriction") -public class IOURingRestriction extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OPCODE, - REGISTER_OP, - SQE_OP, - SQE_FLAGS, - RESV, - RESV2; - - static { - Layout layout = __struct( - __member(2), - __union( - __member(1), - __member(1), - __member(1) - ), - __member(1), - __array(4, 3) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OPCODE = layout.offsetof(0); - REGISTER_OP = layout.offsetof(2); - SQE_OP = layout.offsetof(3); - SQE_FLAGS = layout.offsetof(4); - RESV = layout.offsetof(5); - RESV2 = layout.offsetof(6); - } - - protected IOURingRestriction(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingRestriction create(long address, @Nullable ByteBuffer container) { - return new IOURingRestriction(address, container); - } - - /** - * Creates a {@code IOURingRestriction} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingRestriction(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code opcode} field. */ - @NativeType("__u16") - public short opcode() { return nopcode(address()); } - /** @return the value of the {@code register_op} field. */ - @NativeType("__u8") - public byte register_op() { return nregister_op(address()); } - /** @return the value of the {@code sqe_op} field. */ - @NativeType("__u8") - public byte sqe_op() { return nsqe_op(address()); } - /** @return the value of the {@code sqe_flags} field. */ - @NativeType("__u8") - public byte sqe_flags() { return nsqe_flags(address()); } - - /** Sets the specified value to the {@code opcode} field. */ - public IOURingRestriction opcode(@NativeType("__u16") short value) { nopcode(address(), value); return this; } - /** Sets the specified value to the {@code register_op} field. */ - public IOURingRestriction register_op(@NativeType("__u8") byte value) { nregister_op(address(), value); return this; } - /** Sets the specified value to the {@code sqe_op} field. */ - public IOURingRestriction sqe_op(@NativeType("__u8") byte value) { nsqe_op(address(), value); return this; } - /** Sets the specified value to the {@code sqe_flags} field. */ - public IOURingRestriction sqe_flags(@NativeType("__u8") byte value) { nsqe_flags(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingRestriction set(IOURingRestriction src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingRestriction} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingRestriction malloc() { - return new IOURingRestriction(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingRestriction} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingRestriction calloc() { - return new IOURingRestriction(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingRestriction} instance allocated with {@link BufferUtils}. */ - public static IOURingRestriction create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingRestriction(memAddress(container), container); - } - - /** Returns a new {@code IOURingRestriction} instance for the specified memory address. */ - public static IOURingRestriction create(long address) { - return new IOURingRestriction(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingRestriction createSafe(long address) { - return address == NULL ? null : new IOURingRestriction(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingRestriction} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingRestriction malloc(MemoryStack stack) { - return new IOURingRestriction(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingRestriction} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingRestriction calloc(MemoryStack stack) { - return new IOURingRestriction(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #opcode}. */ - public static short nopcode(long struct) { return UNSAFE.getShort(null, struct + IOURingRestriction.OPCODE); } - /** Unsafe version of {@link #register_op}. */ - public static byte nregister_op(long struct) { return UNSAFE.getByte(null, struct + IOURingRestriction.REGISTER_OP); } - /** Unsafe version of {@link #sqe_op}. */ - public static byte nsqe_op(long struct) { return UNSAFE.getByte(null, struct + IOURingRestriction.SQE_OP); } - /** Unsafe version of {@link #sqe_flags}. */ - public static byte nsqe_flags(long struct) { return UNSAFE.getByte(null, struct + IOURingRestriction.SQE_FLAGS); } - public static byte nresv(long struct) { return UNSAFE.getByte(null, struct + IOURingRestriction.RESV); } - public static IntBuffer nresv2(long struct) { return memIntBuffer(struct + IOURingRestriction.RESV2, 3); } - public static int nresv2(long struct, int index) { - return UNSAFE.getInt(null, struct + IOURingRestriction.RESV2 + check(index, 3) * 4); - } - - /** Unsafe version of {@link #opcode(short) opcode}. */ - public static void nopcode(long struct, short value) { UNSAFE.putShort(null, struct + IOURingRestriction.OPCODE, value); } - /** Unsafe version of {@link #register_op(byte) register_op}. */ - public static void nregister_op(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingRestriction.REGISTER_OP, value); } - /** Unsafe version of {@link #sqe_op(byte) sqe_op}. */ - public static void nsqe_op(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingRestriction.SQE_OP, value); } - /** Unsafe version of {@link #sqe_flags(byte) sqe_flags}. */ - public static void nsqe_flags(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingRestriction.SQE_FLAGS, value); } - public static void nresv(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingRestriction.RESV, value); } - public static void nresv2(long struct, IntBuffer value) { - if (CHECKS) { checkGT(value, 3); } - memCopy(memAddress(value), struct + IOURingRestriction.RESV2, value.remaining() * 4); - } - public static void nresv2(long struct, int index, int value) { - UNSAFE.putInt(null, struct + IOURingRestriction.RESV2 + check(index, 3) * 4, value); - } - - // ----------------------------------- - - /** An array of {@link IOURingRestriction} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingRestriction ELEMENT_FACTORY = IOURingRestriction.create(-1L); - - /** - * Creates a new {@code IOURingRestriction.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingRestriction#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingRestriction getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code opcode} field. */ - @NativeType("__u16") - public short opcode() { return IOURingRestriction.nopcode(address()); } - /** @return the value of the {@code register_op} field. */ - @NativeType("__u8") - public byte register_op() { return IOURingRestriction.nregister_op(address()); } - /** @return the value of the {@code sqe_op} field. */ - @NativeType("__u8") - public byte sqe_op() { return IOURingRestriction.nsqe_op(address()); } - /** @return the value of the {@code sqe_flags} field. */ - @NativeType("__u8") - public byte sqe_flags() { return IOURingRestriction.nsqe_flags(address()); } - - /** Sets the specified value to the {@code opcode} field. */ - public Buffer opcode(@NativeType("__u16") short value) { IOURingRestriction.nopcode(address(), value); return this; } - /** Sets the specified value to the {@code register_op} field. */ - public Buffer register_op(@NativeType("__u8") byte value) { IOURingRestriction.nregister_op(address(), value); return this; } - /** Sets the specified value to the {@code sqe_op} field. */ - public Buffer sqe_op(@NativeType("__u8") byte value) { IOURingRestriction.nsqe_op(address(), value); return this; } - /** Sets the specified value to the {@code sqe_flags} field. */ - public Buffer sqe_flags(@NativeType("__u8") byte value) { IOURingRestriction.nsqe_flags(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSQ.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSQ.java deleted file mode 100644 index 7895baae..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSQ.java +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct io_uring_sq {
    - *     unsigned * khead;
    - *     unsigned * ktail;
    - *     unsigned * {@link #kring_mask};
    - *     unsigned * {@link #kring_entries};
    - *     unsigned * kflags;
    - *     unsigned * kdropped;
    - *     unsigned * array;
    - *     {@link IOURingSQE struct io_uring_sqe} * sqes;
    - *     unsigned sqe_head;
    - *     unsigned sqe_tail;
    - *     size_t ring_sz;
    - *     void * ring_ptr;
    - *     unsigned ring_mask;
    - *     unsigned ring_entries;
    - *     unsigned pad[2];
    - * }
    - */ -@NativeType("struct io_uring_sq") -public class IOURingSQ extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - KHEAD, - KTAIL, - KRING_MASK, - KRING_ENTRIES, - KFLAGS, - KDROPPED, - ARRAY, - SQES, - SQE_HEAD, - SQE_TAIL, - RING_SZ, - RING_PTR, - RING_MASK, - RING_ENTRIES, - PAD; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(4), - __array(4, 2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - KHEAD = layout.offsetof(0); - KTAIL = layout.offsetof(1); - KRING_MASK = layout.offsetof(2); - KRING_ENTRIES = layout.offsetof(3); - KFLAGS = layout.offsetof(4); - KDROPPED = layout.offsetof(5); - ARRAY = layout.offsetof(6); - SQES = layout.offsetof(7); - SQE_HEAD = layout.offsetof(8); - SQE_TAIL = layout.offsetof(9); - RING_SZ = layout.offsetof(10); - RING_PTR = layout.offsetof(11); - RING_MASK = layout.offsetof(12); - RING_ENTRIES = layout.offsetof(13); - PAD = layout.offsetof(14); - } - - protected IOURingSQ(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingSQ create(long address, @Nullable ByteBuffer container) { - return new IOURingSQ(address, container); - } - - /** - * Creates a {@code IOURingSQ} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingSQ(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code khead} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer khead(int capacity) { return nkhead(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code ktail} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer ktail(int capacity) { return nktail(address(), capacity); } - /** - * @param capacity the number of elements in the returned buffer - * - * @return Deprecated: use {@code ring_mask} instead of {@code *kring_mask} - */ - @NativeType("unsigned *") - public IntBuffer kring_mask(int capacity) { return nkring_mask(address(), capacity); } - /** - * @param capacity the number of elements in the returned buffer - * - * @return Deprecated: use {@code ring_entries} instead of {@code *kring_entries} - */ - @NativeType("unsigned *") - public IntBuffer kring_entries(int capacity) { return nkring_entries(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code kflags} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kflags(int capacity) { return nkflags(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code kdropped} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kdropped(int capacity) { return nkdropped(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code array} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer array(int capacity) { return narray(address(), capacity); } - /** @return a {@link IOURingSQE} view of the struct pointed to by the {@code sqes} field. */ - @NativeType("struct io_uring_sqe *") - public IOURingSQE sqes() { return nsqes(address()); } - /** @return the value of the {@code sqe_head} field. */ - @NativeType("unsigned") - public int sqe_head() { return nsqe_head(address()); } - /** @return the value of the {@code sqe_tail} field. */ - @NativeType("unsigned") - public int sqe_tail() { return nsqe_tail(address()); } - /** @return the value of the {@code ring_sz} field. */ - @NativeType("size_t") - public long ring_sz() { return nring_sz(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code ring_ptr} field. */ - @NativeType("void *") - public ByteBuffer ring_ptr() { return nring_ptr(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("unsigned") - public int ring_mask() { return nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("unsigned") - public int ring_entries() { return nring_entries(address()); } - - /** Sets the address of the specified {@link IntBuffer} to the {@code khead} field. */ - public IOURingSQ khead(@NativeType("unsigned *") IntBuffer value) { nkhead(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code ktail} field. */ - public IOURingSQ ktail(@NativeType("unsigned *") IntBuffer value) { nktail(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link #kring_mask} field. */ - public IOURingSQ kring_mask(@NativeType("unsigned *") IntBuffer value) { nkring_mask(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link #kring_entries} field. */ - public IOURingSQ kring_entries(@NativeType("unsigned *") IntBuffer value) { nkring_entries(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code kflags} field. */ - public IOURingSQ kflags(@NativeType("unsigned *") IntBuffer value) { nkflags(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code kdropped} field. */ - public IOURingSQ kdropped(@NativeType("unsigned *") IntBuffer value) { nkdropped(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code array} field. */ - public IOURingSQ array(@NativeType("unsigned *") IntBuffer value) { narray(address(), value); return this; } - /** Sets the address of the specified {@link IOURingSQE} to the {@code sqes} field. */ - public IOURingSQ sqes(@NativeType("struct io_uring_sqe *") IOURingSQE value) { nsqes(address(), value); return this; } - /** Sets the specified value to the {@code sqe_head} field. */ - public IOURingSQ sqe_head(@NativeType("unsigned") int value) { nsqe_head(address(), value); return this; } - /** Sets the specified value to the {@code sqe_tail} field. */ - public IOURingSQ sqe_tail(@NativeType("unsigned") int value) { nsqe_tail(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code ring_ptr} field. */ - public IOURingSQ ring_ptr(@NativeType("void *") ByteBuffer value) { nring_ptr(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public IOURingSQ ring_mask(@NativeType("unsigned") int value) { nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public IOURingSQ ring_entries(@NativeType("unsigned") int value) { nring_entries(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingSQ set( - IntBuffer khead, - IntBuffer ktail, - IntBuffer kring_mask, - IntBuffer kring_entries, - IntBuffer kflags, - IntBuffer kdropped, - IntBuffer array, - IOURingSQE sqes, - int sqe_head, - int sqe_tail, - ByteBuffer ring_ptr, - int ring_mask, - int ring_entries - ) { - khead(khead); - ktail(ktail); - kring_mask(kring_mask); - kring_entries(kring_entries); - kflags(kflags); - kdropped(kdropped); - array(array); - sqes(sqes); - sqe_head(sqe_head); - sqe_tail(sqe_tail); - ring_ptr(ring_ptr); - ring_mask(ring_mask); - ring_entries(ring_entries); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingSQ set(IOURingSQ src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingSQ} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingSQ malloc() { - return new IOURingSQ(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingSQ} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingSQ calloc() { - return new IOURingSQ(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingSQ} instance allocated with {@link BufferUtils}. */ - public static IOURingSQ create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingSQ(memAddress(container), container); - } - - /** Returns a new {@code IOURingSQ} instance for the specified memory address. */ - public static IOURingSQ create(long address) { - return new IOURingSQ(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingSQ createSafe(long address) { - return address == NULL ? null : new IOURingSQ(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingSQ} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingSQ malloc(MemoryStack stack) { - return new IOURingSQ(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingSQ} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingSQ calloc(MemoryStack stack) { - return new IOURingSQ(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #khead(int) khead}. */ - public static IntBuffer nkhead(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingSQ.KHEAD), capacity); } - /** Unsafe version of {@link #ktail(int) ktail}. */ - public static IntBuffer nktail(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingSQ.KTAIL), capacity); } - /** Unsafe version of {@link #kring_mask(int) kring_mask}. */ - public static IntBuffer nkring_mask(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingSQ.KRING_MASK), capacity); } - /** Unsafe version of {@link #kring_entries(int) kring_entries}. */ - public static IntBuffer nkring_entries(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingSQ.KRING_ENTRIES), capacity); } - /** Unsafe version of {@link #kflags(int) kflags}. */ - public static IntBuffer nkflags(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingSQ.KFLAGS), capacity); } - /** Unsafe version of {@link #kdropped(int) kdropped}. */ - public static IntBuffer nkdropped(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingSQ.KDROPPED), capacity); } - /** Unsafe version of {@link #array(int) array}. */ - public static IntBuffer narray(long struct, int capacity) { return memIntBuffer(memGetAddress(struct + IOURingSQ.ARRAY), capacity); } - /** Unsafe version of {@link #sqes}. */ - public static IOURingSQE nsqes(long struct) { return IOURingSQE.create(memGetAddress(struct + IOURingSQ.SQES)); } - /** Unsafe version of {@link #sqe_head}. */ - public static int nsqe_head(long struct) { return UNSAFE.getInt(null, struct + IOURingSQ.SQE_HEAD); } - /** Unsafe version of {@link #sqe_tail}. */ - public static int nsqe_tail(long struct) { return UNSAFE.getInt(null, struct + IOURingSQ.SQE_TAIL); } - /** Unsafe version of {@link #ring_sz}. */ - public static long nring_sz(long struct) { return memGetAddress(struct + IOURingSQ.RING_SZ); } - /** Unsafe version of {@link #ring_ptr() ring_ptr}. */ - public static ByteBuffer nring_ptr(long struct) { return memByteBuffer(memGetAddress(struct + IOURingSQ.RING_PTR), (int)nring_sz(struct)); } - /** Unsafe version of {@link #ring_mask}. */ - public static int nring_mask(long struct) { return UNSAFE.getInt(null, struct + IOURingSQ.RING_MASK); } - /** Unsafe version of {@link #ring_entries}. */ - public static int nring_entries(long struct) { return UNSAFE.getInt(null, struct + IOURingSQ.RING_ENTRIES); } - public static IntBuffer npad(long struct) { return memIntBuffer(struct + IOURingSQ.PAD, 2); } - public static int npad(long struct, int index) { - return UNSAFE.getInt(null, struct + IOURingSQ.PAD + check(index, 2) * 4); - } - - /** Unsafe version of {@link #khead(IntBuffer) khead}. */ - public static void nkhead(long struct, IntBuffer value) { memPutAddress(struct + IOURingSQ.KHEAD, memAddress(value)); } - /** Unsafe version of {@link #ktail(IntBuffer) ktail}. */ - public static void nktail(long struct, IntBuffer value) { memPutAddress(struct + IOURingSQ.KTAIL, memAddress(value)); } - /** Unsafe version of {@link #kring_mask(IntBuffer) kring_mask}. */ - public static void nkring_mask(long struct, IntBuffer value) { memPutAddress(struct + IOURingSQ.KRING_MASK, memAddress(value)); } - /** Unsafe version of {@link #kring_entries(IntBuffer) kring_entries}. */ - public static void nkring_entries(long struct, IntBuffer value) { memPutAddress(struct + IOURingSQ.KRING_ENTRIES, memAddress(value)); } - /** Unsafe version of {@link #kflags(IntBuffer) kflags}. */ - public static void nkflags(long struct, IntBuffer value) { memPutAddress(struct + IOURingSQ.KFLAGS, memAddress(value)); } - /** Unsafe version of {@link #kdropped(IntBuffer) kdropped}. */ - public static void nkdropped(long struct, IntBuffer value) { memPutAddress(struct + IOURingSQ.KDROPPED, memAddress(value)); } - /** Unsafe version of {@link #array(IntBuffer) array}. */ - public static void narray(long struct, IntBuffer value) { memPutAddress(struct + IOURingSQ.ARRAY, memAddress(value)); } - /** Unsafe version of {@link #sqes(IOURingSQE) sqes}. */ - public static void nsqes(long struct, IOURingSQE value) { memPutAddress(struct + IOURingSQ.SQES, value.address()); } - /** Unsafe version of {@link #sqe_head(int) sqe_head}. */ - public static void nsqe_head(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQ.SQE_HEAD, value); } - /** Unsafe version of {@link #sqe_tail(int) sqe_tail}. */ - public static void nsqe_tail(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQ.SQE_TAIL, value); } - /** Sets the specified value to the {@code ring_sz} field of the specified {@code struct}. */ - public static void nring_sz(long struct, long value) { memPutAddress(struct + IOURingSQ.RING_SZ, value); } - /** Unsafe version of {@link #ring_ptr(ByteBuffer) ring_ptr}. */ - public static void nring_ptr(long struct, ByteBuffer value) { memPutAddress(struct + IOURingSQ.RING_PTR, memAddress(value)); nring_sz(struct, value.remaining()); } - /** Unsafe version of {@link #ring_mask(int) ring_mask}. */ - public static void nring_mask(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQ.RING_MASK, value); } - /** Unsafe version of {@link #ring_entries(int) ring_entries}. */ - public static void nring_entries(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQ.RING_ENTRIES, value); } - public static void npad(long struct, IntBuffer value) { - if (CHECKS) { checkGT(value, 2); } - memCopy(memAddress(value), struct + IOURingSQ.PAD, value.remaining() * 4); - } - public static void npad(long struct, int index, int value) { - UNSAFE.putInt(null, struct + IOURingSQ.PAD + check(index, 2) * 4, value); - } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + IOURingSQ.KHEAD)); - check(memGetAddress(struct + IOURingSQ.KTAIL)); - check(memGetAddress(struct + IOURingSQ.KRING_MASK)); - check(memGetAddress(struct + IOURingSQ.KRING_ENTRIES)); - check(memGetAddress(struct + IOURingSQ.KFLAGS)); - check(memGetAddress(struct + IOURingSQ.KDROPPED)); - check(memGetAddress(struct + IOURingSQ.ARRAY)); - check(memGetAddress(struct + IOURingSQ.SQES)); - check(memGetAddress(struct + IOURingSQ.RING_PTR)); - } - - // ----------------------------------- - - /** An array of {@link IOURingSQ} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingSQ ELEMENT_FACTORY = IOURingSQ.create(-1L); - - /** - * Creates a new {@code IOURingSQ.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingSQ#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingSQ getElementFactory() { - return ELEMENT_FACTORY; - } - - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code khead} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer khead(int capacity) { return IOURingSQ.nkhead(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code ktail} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer ktail(int capacity) { return IOURingSQ.nktail(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@link IOURingSQ#kring_mask} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kring_mask(int capacity) { return IOURingSQ.nkring_mask(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@link IOURingSQ#kring_entries} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kring_entries(int capacity) { return IOURingSQ.nkring_entries(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code kflags} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kflags(int capacity) { return IOURingSQ.nkflags(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code kdropped} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer kdropped(int capacity) { return IOURingSQ.nkdropped(address(), capacity); } - /** - * @return a {@link IntBuffer} view of the data pointed to by the {@code array} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("unsigned *") - public IntBuffer array(int capacity) { return IOURingSQ.narray(address(), capacity); } - /** @return a {@link IOURingSQE} view of the struct pointed to by the {@code sqes} field. */ - @NativeType("struct io_uring_sqe *") - public IOURingSQE sqes() { return IOURingSQ.nsqes(address()); } - /** @return the value of the {@code sqe_head} field. */ - @NativeType("unsigned") - public int sqe_head() { return IOURingSQ.nsqe_head(address()); } - /** @return the value of the {@code sqe_tail} field. */ - @NativeType("unsigned") - public int sqe_tail() { return IOURingSQ.nsqe_tail(address()); } - /** @return the value of the {@code ring_sz} field. */ - @NativeType("size_t") - public long ring_sz() { return IOURingSQ.nring_sz(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code ring_ptr} field. */ - @NativeType("void *") - public ByteBuffer ring_ptr() { return IOURingSQ.nring_ptr(address()); } - /** @return the value of the {@code ring_mask} field. */ - @NativeType("unsigned") - public int ring_mask() { return IOURingSQ.nring_mask(address()); } - /** @return the value of the {@code ring_entries} field. */ - @NativeType("unsigned") - public int ring_entries() { return IOURingSQ.nring_entries(address()); } - - /** Sets the address of the specified {@link IntBuffer} to the {@code khead} field. */ - public Buffer khead(@NativeType("unsigned *") IntBuffer value) { IOURingSQ.nkhead(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code ktail} field. */ - public Buffer ktail(@NativeType("unsigned *") IntBuffer value) { IOURingSQ.nktail(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link IOURingSQ#kring_mask} field. */ - public Buffer kring_mask(@NativeType("unsigned *") IntBuffer value) { IOURingSQ.nkring_mask(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@link IOURingSQ#kring_entries} field. */ - public Buffer kring_entries(@NativeType("unsigned *") IntBuffer value) { IOURingSQ.nkring_entries(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code kflags} field. */ - public Buffer kflags(@NativeType("unsigned *") IntBuffer value) { IOURingSQ.nkflags(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code kdropped} field. */ - public Buffer kdropped(@NativeType("unsigned *") IntBuffer value) { IOURingSQ.nkdropped(address(), value); return this; } - /** Sets the address of the specified {@link IntBuffer} to the {@code array} field. */ - public Buffer array(@NativeType("unsigned *") IntBuffer value) { IOURingSQ.narray(address(), value); return this; } - /** Sets the address of the specified {@link IOURingSQE} to the {@code sqes} field. */ - public Buffer sqes(@NativeType("struct io_uring_sqe *") IOURingSQE value) { IOURingSQ.nsqes(address(), value); return this; } - /** Sets the specified value to the {@code sqe_head} field. */ - public Buffer sqe_head(@NativeType("unsigned") int value) { IOURingSQ.nsqe_head(address(), value); return this; } - /** Sets the specified value to the {@code sqe_tail} field. */ - public Buffer sqe_tail(@NativeType("unsigned") int value) { IOURingSQ.nsqe_tail(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code ring_ptr} field. */ - public Buffer ring_ptr(@NativeType("void *") ByteBuffer value) { IOURingSQ.nring_ptr(address(), value); return this; } - /** Sets the specified value to the {@code ring_mask} field. */ - public Buffer ring_mask(@NativeType("unsigned") int value) { IOURingSQ.nring_mask(address(), value); return this; } - /** Sets the specified value to the {@code ring_entries} field. */ - public Buffer ring_entries(@NativeType("unsigned") int value) { IOURingSQ.nring_entries(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSQE.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSQE.java deleted file mode 100644 index 18e062ae..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSQE.java +++ /dev/null @@ -1,1080 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * IO submission data structure (Submission Queue Entry). - * - *

    Once the submission queue entry is initialized, I/O is submitted by placing the index of the submission queue entry into the tail of the submission - * queue. After one or more indexes are added to the queue, and the queue tail is advanced, the {@link LibURing#io_uring_enter enter} system call can be invoked to initiate the I/O.

    - * - *

    Layout

    - * - *
    
    - * struct io_uring_sqe {
    - *     __u8 {@link #opcode};
    - *     __u8 {@link #flags};
    - *     __u16 {@link #ioprio};
    - *     __s32 {@link #fd};
    - *     union {
    - *         __u64 {@link #off};
    - *         __u64 addr2;
    - *         struct {
    - *             __u32 cmd_op;
    - *             __u32 __pad1;
    - *         };
    - *     };
    - *     union {
    - *         __u64 {@link #addr};
    - *         __u64 splice_off_in;
    - *     };
    - *     __u32 {@link #len};
    - *     union {
    - *         __kernel_rwf_t {@link #rw_flags};
    - *         __u32 {@link #fsync_flags};
    - *         __u16 {@link #poll_events};
    - *         __u32 {@link #poll32_events};
    - *         __u32 sync_range_flags;
    - *         __u32 msg_flags;
    - *         __u32 timeout_flags;
    - *         __u32 accept_flags;
    - *         __u32 cancel_flags;
    - *         __u32 open_flags;
    - *         __u32 statx_flags;
    - *         __u32 fadvise_advice;
    - *         __u32 splice_flags;
    - *         __u32 rename_flags;
    - *         __u32 unlink_flags;
    - *         __u32 hardlink_flags;
    - *         __u32 xattr_flags;
    - *         __u32 msg_ring_flags;
    - *         __u32 uring_cmd_flags;
    - *     };
    - *     __u64 {@link #user_data};
    - *     union {
    - *         __u16 {@link #buf_index};
    - *         __u16 {@link #buf_group};
    - *     };
    - *     __u16 {@link #personality};
    - *     union {
    - *         __s32 splice_fd_in;
    - *         __u32 file_index;
    - *         struct {
    - *             __u16 addr_len;
    - *             __u16 __pad3[1];
    - *         };
    - *     };
    - *     union {
    - *         struct {
    - *             __u64 addr3;
    - *             __u64 __pad2[1];
    - *         };
    - *         __u8 {@link #cmd}[0];
    - *     };
    - * }
    - */ -@NativeType("struct io_uring_sqe") -public class IOURingSQE extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - OPCODE, - FLAGS, - IOPRIO, - FD, - OFF, - ADDR2, - CMD_OP, - __PAD1, - ADDR, - SPLICE_OFF_IN, - LEN, - RW_FLAGS, - FSYNC_FLAGS, - POLL_EVENTS, - POLL32_EVENTS, - SYNC_RANGE_FLAGS, - MSG_FLAGS, - TIMEOUT_FLAGS, - ACCEPT_FLAGS, - CANCEL_FLAGS, - OPEN_FLAGS, - STATX_FLAGS, - FADVISE_ADVICE, - SPLICE_FLAGS, - RENAME_FLAGS, - UNLINK_FLAGS, - HARDLINK_FLAGS, - XATTR_FLAGS, - MSG_RING_FLAGS, - URING_CMD_FLAGS, - USER_DATA, - BUF_INDEX, - BUF_GROUP, - PERSONALITY, - SPLICE_FD_IN, - FILE_INDEX, - ADDR_LEN, - __PAD3, - ADDR3, - __PAD2, - CMD; - - static { - Layout layout = __struct( - __member(1), - __member(1), - __member(2), - __member(4), - __union( - __member(8), - __member(8), - __struct( - __member(4), - __member(4) - ) - ), - __union( - __member(8), - __member(8) - ), - __member(4), - __union( - __member(4), - __member(4), - __member(2), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ), - __member(8), - __union( - __member(2), - __member(2) - ), - __member(2), - __union( - __member(4), - __member(4), - __struct( - __member(2), - __array(2, 1) - ) - ), - __union( - __struct( - __member(8), - __array(8, 1) - ), - __array(1, 0) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - OPCODE = layout.offsetof(0); - FLAGS = layout.offsetof(1); - IOPRIO = layout.offsetof(2); - FD = layout.offsetof(3); - OFF = layout.offsetof(5); - ADDR2 = layout.offsetof(6); - CMD_OP = layout.offsetof(8); - __PAD1 = layout.offsetof(9); - ADDR = layout.offsetof(11); - SPLICE_OFF_IN = layout.offsetof(12); - LEN = layout.offsetof(13); - RW_FLAGS = layout.offsetof(15); - FSYNC_FLAGS = layout.offsetof(16); - POLL_EVENTS = layout.offsetof(17); - POLL32_EVENTS = layout.offsetof(18); - SYNC_RANGE_FLAGS = layout.offsetof(19); - MSG_FLAGS = layout.offsetof(20); - TIMEOUT_FLAGS = layout.offsetof(21); - ACCEPT_FLAGS = layout.offsetof(22); - CANCEL_FLAGS = layout.offsetof(23); - OPEN_FLAGS = layout.offsetof(24); - STATX_FLAGS = layout.offsetof(25); - FADVISE_ADVICE = layout.offsetof(26); - SPLICE_FLAGS = layout.offsetof(27); - RENAME_FLAGS = layout.offsetof(28); - UNLINK_FLAGS = layout.offsetof(29); - HARDLINK_FLAGS = layout.offsetof(30); - XATTR_FLAGS = layout.offsetof(31); - MSG_RING_FLAGS = layout.offsetof(32); - URING_CMD_FLAGS = layout.offsetof(33); - USER_DATA = layout.offsetof(34); - BUF_INDEX = layout.offsetof(36); - BUF_GROUP = layout.offsetof(37); - PERSONALITY = layout.offsetof(38); - SPLICE_FD_IN = layout.offsetof(40); - FILE_INDEX = layout.offsetof(41); - ADDR_LEN = layout.offsetof(43); - __PAD3 = layout.offsetof(44); - ADDR3 = layout.offsetof(47); - __PAD2 = layout.offsetof(48); - CMD = layout.offsetof(49); - } - - protected IOURingSQE(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingSQE create(long address, @Nullable ByteBuffer container) { - return new IOURingSQE(address, container); - } - - /** - * Creates a {@code IOURingSQE} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingSQE(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** type of operation for this sqe */ - @NativeType("__u8") - public byte opcode() { return nopcode(address()); } - /** {@code IOSQE_} flags. One or more of:
    {@link LibIOURing#IOSQE_FIXED_FILE_BIT}{@link LibIOURing#IOSQE_IO_DRAIN_BIT}{@link LibIOURing#IOSQE_IO_LINK_BIT}{@link LibIOURing#IOSQE_IO_HARDLINK_BIT}
    {@link LibIOURing#IOSQE_ASYNC_BIT}{@link LibIOURing#IOSQE_BUFFER_SELECT_BIT}{@link LibIOURing#IOSQE_CQE_SKIP_SUCCESS_BIT}{@link LibIOURing#IOSQE_FIXED_FILE}
    {@link LibIOURing#IOSQE_IO_DRAIN}{@link LibIOURing#IOSQE_IO_LINK}{@link LibIOURing#IOSQE_IO_HARDLINK}{@link LibIOURing#IOSQE_ASYNC}
    {@link LibIOURing#IOSQE_BUFFER_SELECT}{@link LibIOURing#IOSQE_CQE_SKIP_SUCCESS}
    */ - @NativeType("__u8") - public byte flags() { return nflags(address()); } - /** specifies the I/O priority. See {@code ioprio_get(2)} for a description of Linux I/O priorities. */ - @NativeType("__u16") - public short ioprio() { return nioprio(address()); } - /** specifies the file descriptor against which the operation will be performed */ - @NativeType("__s32") - public int fd() { return nfd(address()); } - /** offset into file */ - @NativeType("__u64") - public long off() { return noff(address()); } - /** @return the value of the {@code addr2} field. */ - @NativeType("__u64") - public long addr2() { return naddr2(address()); } - /** @return the value of the {@code cmd_op} field. */ - @NativeType("__u32") - public int cmd_op() { return ncmd_op(address()); } - /** @return the value of the {@code __pad1} field. */ - @NativeType("__u32") - public int __pad1() { return n__pad1(address()); } - /** pointer to buffer or {@code iovecs} */ - @NativeType("__u64") - public long addr() { return naddr(address()); } - /** @return the value of the {@code splice_off_in} field. */ - @NativeType("__u64") - public long splice_off_in() { return nsplice_off_in(address()); } - /** buffer size or number of {@code iovecs} */ - @NativeType("__u32") - public int len() { return nlen(address()); } - /** specified for read and write operations, contains a bitwise OR of per-I/O flags, as described in the {@code preadv2(2)} man page */ - @NativeType("__kernel_rwf_t") - public int rw_flags() { return nrw_flags(address()); } - /** - * may contain either 0, for a normal file integrity sync, or {@link LibIOURing#IORING_FSYNC_DATASYNC FSYNC_DATASYNC} to provide data sync only semantics. - * - *

    See the descriptions of {@code O_SYNC} and {@code O_DSYNC} in the {@code open(2)} manual page for more information.

    - */ - @NativeType("__u32") - public int fsync_flags() { return nfsync_flags(address()); } - /** the bits that may be set in {@code poll_events} are defined in {@code }, and documented in {@code poll(2)} */ - @NativeType("__u16") - public short poll_events() { return npoll_events(address()); } - /** word-reversed for BE */ - @NativeType("__u32") - public int poll32_events() { return npoll32_events(address()); } - /** @return the value of the {@code sync_range_flags} field. */ - @NativeType("__u32") - public int sync_range_flags() { return nsync_range_flags(address()); } - /** @return the value of the {@code msg_flags} field. */ - @NativeType("__u32") - public int msg_flags() { return nmsg_flags(address()); } - /** @return the value of the {@code timeout_flags} field. */ - @NativeType("__u32") - public int timeout_flags() { return ntimeout_flags(address()); } - /** @return the value of the {@code accept_flags} field. */ - @NativeType("__u32") - public int accept_flags() { return naccept_flags(address()); } - /** @return the value of the {@code cancel_flags} field. */ - @NativeType("__u32") - public int cancel_flags() { return ncancel_flags(address()); } - /** @return the value of the {@code open_flags} field. */ - @NativeType("__u32") - public int open_flags() { return nopen_flags(address()); } - /** @return the value of the {@code statx_flags} field. */ - @NativeType("__u32") - public int statx_flags() { return nstatx_flags(address()); } - /** @return the value of the {@code fadvise_advice} field. */ - @NativeType("__u32") - public int fadvise_advice() { return nfadvise_advice(address()); } - /** @return the value of the {@code splice_flags} field. */ - @NativeType("__u32") - public int splice_flags() { return nsplice_flags(address()); } - /** @return the value of the {@code rename_flags} field. */ - @NativeType("__u32") - public int rename_flags() { return nrename_flags(address()); } - /** @return the value of the {@code unlink_flags} field. */ - @NativeType("__u32") - public int unlink_flags() { return nunlink_flags(address()); } - /** @return the value of the {@code hardlink_flags} field. */ - @NativeType("__u32") - public int hardlink_flags() { return nhardlink_flags(address()); } - /** @return the value of the {@code xattr_flags} field. */ - @NativeType("__u32") - public int xattr_flags() { return nxattr_flags(address()); } - /** @return the value of the {@code msg_ring_flags} field. */ - @NativeType("__u32") - public int msg_ring_flags() { return nmsg_ring_flags(address()); } - /** @return the value of the {@code uring_cmd_flags} field. */ - @NativeType("__u32") - public int uring_cmd_flags() { return nuring_cmd_flags(address()); } - /** an application-supplied value that will be copied into the completion queue entry */ - @NativeType("__u64") - public long user_data() { return nuser_data(address()); } - /** an index into an array of fixed buffers, and is only valid if fixed buffers were registered */ - @NativeType("__u16") - public short buf_index() { return nbuf_index(address()); } - /** for grouped buffer selection */ - @NativeType("__u16") - public short buf_group() { return nbuf_group(address()); } - /** - * the credentials id to use for this operation. - * - *

    See {@link LibURing#io_uring_register register} for how to register personalities with {@code io_uring}. If set to 0, the current personality of the submitting task is used.

    - */ - @NativeType("__u16") - public short personality() { return npersonality(address()); } - /** @return the value of the {@code splice_fd_in} field. */ - @NativeType("__s32") - public int splice_fd_in() { return nsplice_fd_in(address()); } - /** @return the value of the {@code file_index} field. */ - @NativeType("__u32") - public int file_index() { return nfile_index(address()); } - /** @return the value of the {@code addr_len} field. */ - @NativeType("__u16") - public short addr_len() { return naddr_len(address()); } - /** @return a {@link ShortBuffer} view of the {@code __pad3} field. */ - @NativeType("__u16[1]") - public ShortBuffer __pad3() { return n__pad3(address()); } - /** @return the value at the specified index of the {@code __pad3} field. */ - @NativeType("__u16") - public short __pad3(int index) { return n__pad3(address(), index); } - /** @return the value of the {@code addr3} field. */ - @NativeType("__u64") - public long addr3() { return naddr3(address()); } - /** @return a {@link LongBuffer} view of the {@code __pad2} field. */ - @NativeType("__u64[1]") - public LongBuffer __pad2() { return n__pad2(address()); } - /** @return the value at the specified index of the {@code __pad2} field. */ - @NativeType("__u64") - public long __pad2(int index) { return n__pad2(address(), index); } - /** If the ring is initialized with {@link LibIOURing#IORING_SETUP_SQE128 SETUP_SQE128}, then this field is used for 80 bytes of arbitrary command data */ - @NativeType("__u8[0]") - public ByteBuffer cmd() { return ncmd(address()); } - /** If the ring is initialized with {@link LibIOURing#IORING_SETUP_SQE128 SETUP_SQE128}, then this field is used for 80 bytes of arbitrary command data */ - @NativeType("__u8") - public byte cmd(int index) { return ncmd(address(), index); } - - /** Sets the specified value to the {@link #opcode} field. */ - public IOURingSQE opcode(@NativeType("__u8") byte value) { nopcode(address(), value); return this; } - /** Sets the specified value to the {@link #flags} field. */ - public IOURingSQE flags(@NativeType("__u8") byte value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@link #ioprio} field. */ - public IOURingSQE ioprio(@NativeType("__u16") short value) { nioprio(address(), value); return this; } - /** Sets the specified value to the {@link #fd} field. */ - public IOURingSQE fd(@NativeType("__s32") int value) { nfd(address(), value); return this; } - /** Sets the specified value to the {@link #off} field. */ - public IOURingSQE off(@NativeType("__u64") long value) { noff(address(), value); return this; } - /** Sets the specified value to the {@code addr2} field. */ - public IOURingSQE addr2(@NativeType("__u64") long value) { naddr2(address(), value); return this; } - /** Sets the specified value to the {@code cmd_op} field. */ - public IOURingSQE cmd_op(@NativeType("__u32") int value) { ncmd_op(address(), value); return this; } - /** Sets the specified value to the {@code __pad1} field. */ - public IOURingSQE __pad1(@NativeType("__u32") int value) { n__pad1(address(), value); return this; } - /** Sets the specified value to the {@link #addr} field. */ - public IOURingSQE addr(@NativeType("__u64") long value) { naddr(address(), value); return this; } - /** Sets the specified value to the {@code splice_off_in} field. */ - public IOURingSQE splice_off_in(@NativeType("__u64") long value) { nsplice_off_in(address(), value); return this; } - /** Sets the specified value to the {@link #len} field. */ - public IOURingSQE len(@NativeType("__u32") int value) { nlen(address(), value); return this; } - /** Sets the specified value to the {@link #rw_flags} field. */ - public IOURingSQE rw_flags(@NativeType("__kernel_rwf_t") int value) { nrw_flags(address(), value); return this; } - /** Sets the specified value to the {@link #fsync_flags} field. */ - public IOURingSQE fsync_flags(@NativeType("__u32") int value) { nfsync_flags(address(), value); return this; } - /** Sets the specified value to the {@link #poll_events} field. */ - public IOURingSQE poll_events(@NativeType("__u16") short value) { npoll_events(address(), value); return this; } - /** Sets the specified value to the {@link #poll32_events} field. */ - public IOURingSQE poll32_events(@NativeType("__u32") int value) { npoll32_events(address(), value); return this; } - /** Sets the specified value to the {@code sync_range_flags} field. */ - public IOURingSQE sync_range_flags(@NativeType("__u32") int value) { nsync_range_flags(address(), value); return this; } - /** Sets the specified value to the {@code msg_flags} field. */ - public IOURingSQE msg_flags(@NativeType("__u32") int value) { nmsg_flags(address(), value); return this; } - /** Sets the specified value to the {@code timeout_flags} field. */ - public IOURingSQE timeout_flags(@NativeType("__u32") int value) { ntimeout_flags(address(), value); return this; } - /** Sets the specified value to the {@code accept_flags} field. */ - public IOURingSQE accept_flags(@NativeType("__u32") int value) { naccept_flags(address(), value); return this; } - /** Sets the specified value to the {@code cancel_flags} field. */ - public IOURingSQE cancel_flags(@NativeType("__u32") int value) { ncancel_flags(address(), value); return this; } - /** Sets the specified value to the {@code open_flags} field. */ - public IOURingSQE open_flags(@NativeType("__u32") int value) { nopen_flags(address(), value); return this; } - /** Sets the specified value to the {@code statx_flags} field. */ - public IOURingSQE statx_flags(@NativeType("__u32") int value) { nstatx_flags(address(), value); return this; } - /** Sets the specified value to the {@code fadvise_advice} field. */ - public IOURingSQE fadvise_advice(@NativeType("__u32") int value) { nfadvise_advice(address(), value); return this; } - /** Sets the specified value to the {@code splice_flags} field. */ - public IOURingSQE splice_flags(@NativeType("__u32") int value) { nsplice_flags(address(), value); return this; } - /** Sets the specified value to the {@code rename_flags} field. */ - public IOURingSQE rename_flags(@NativeType("__u32") int value) { nrename_flags(address(), value); return this; } - /** Sets the specified value to the {@code unlink_flags} field. */ - public IOURingSQE unlink_flags(@NativeType("__u32") int value) { nunlink_flags(address(), value); return this; } - /** Sets the specified value to the {@code hardlink_flags} field. */ - public IOURingSQE hardlink_flags(@NativeType("__u32") int value) { nhardlink_flags(address(), value); return this; } - /** Sets the specified value to the {@code xattr_flags} field. */ - public IOURingSQE xattr_flags(@NativeType("__u32") int value) { nxattr_flags(address(), value); return this; } - /** Sets the specified value to the {@code msg_ring_flags} field. */ - public IOURingSQE msg_ring_flags(@NativeType("__u32") int value) { nmsg_ring_flags(address(), value); return this; } - /** Sets the specified value to the {@code uring_cmd_flags} field. */ - public IOURingSQE uring_cmd_flags(@NativeType("__u32") int value) { nuring_cmd_flags(address(), value); return this; } - /** Sets the specified value to the {@link #user_data} field. */ - public IOURingSQE user_data(@NativeType("__u64") long value) { nuser_data(address(), value); return this; } - /** Sets the specified value to the {@link #buf_index} field. */ - public IOURingSQE buf_index(@NativeType("__u16") short value) { nbuf_index(address(), value); return this; } - /** Sets the specified value to the {@link #buf_group} field. */ - public IOURingSQE buf_group(@NativeType("__u16") short value) { nbuf_group(address(), value); return this; } - /** Sets the specified value to the {@link #personality} field. */ - public IOURingSQE personality(@NativeType("__u16") short value) { npersonality(address(), value); return this; } - /** Sets the specified value to the {@code splice_fd_in} field. */ - public IOURingSQE splice_fd_in(@NativeType("__s32") int value) { nsplice_fd_in(address(), value); return this; } - /** Sets the specified value to the {@code file_index} field. */ - public IOURingSQE file_index(@NativeType("__u32") int value) { nfile_index(address(), value); return this; } - /** Sets the specified value to the {@code addr_len} field. */ - public IOURingSQE addr_len(@NativeType("__u16") short value) { naddr_len(address(), value); return this; } - /** Copies the specified {@link ShortBuffer} to the {@code __pad3} field. */ - public IOURingSQE __pad3(@NativeType("__u16[1]") ShortBuffer value) { n__pad3(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code __pad3} field. */ - public IOURingSQE __pad3(int index, @NativeType("__u16") short value) { n__pad3(address(), index, value); return this; } - /** Sets the specified value to the {@code addr3} field. */ - public IOURingSQE addr3(@NativeType("__u64") long value) { naddr3(address(), value); return this; } - /** Copies the specified {@link LongBuffer} to the {@code __pad2} field. */ - public IOURingSQE __pad2(@NativeType("__u64[1]") LongBuffer value) { n__pad2(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code __pad2} field. */ - public IOURingSQE __pad2(int index, @NativeType("__u64") long value) { n__pad2(address(), index, value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@link #cmd} field. */ - public IOURingSQE cmd(@NativeType("__u8[0]") ByteBuffer value) { ncmd(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link #cmd} field. */ - public IOURingSQE cmd(int index, @NativeType("__u8") byte value) { ncmd(address(), index, value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingSQE set(IOURingSQE src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingSQE} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingSQE malloc() { - return new IOURingSQE(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingSQE} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingSQE calloc() { - return new IOURingSQE(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingSQE} instance allocated with {@link BufferUtils}. */ - public static IOURingSQE create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingSQE(memAddress(container), container); - } - - /** Returns a new {@code IOURingSQE} instance for the specified memory address. */ - public static IOURingSQE create(long address) { - return new IOURingSQE(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingSQE createSafe(long address) { - return address == NULL ? null : new IOURingSQE(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingSQE} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingSQE malloc(MemoryStack stack) { - return new IOURingSQE(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingSQE} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingSQE calloc(MemoryStack stack) { - return new IOURingSQE(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #opcode}. */ - public static byte nopcode(long struct) { return UNSAFE.getByte(null, struct + IOURingSQE.OPCODE); } - /** Unsafe version of {@link #flags}. */ - public static byte nflags(long struct) { return UNSAFE.getByte(null, struct + IOURingSQE.FLAGS); } - /** Unsafe version of {@link #ioprio}. */ - public static short nioprio(long struct) { return UNSAFE.getShort(null, struct + IOURingSQE.IOPRIO); } - /** Unsafe version of {@link #fd}. */ - public static int nfd(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.FD); } - /** Unsafe version of {@link #off}. */ - public static long noff(long struct) { return UNSAFE.getLong(null, struct + IOURingSQE.OFF); } - /** Unsafe version of {@link #addr2}. */ - public static long naddr2(long struct) { return UNSAFE.getLong(null, struct + IOURingSQE.ADDR2); } - /** Unsafe version of {@link #cmd_op}. */ - public static int ncmd_op(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.CMD_OP); } - public static int n__pad1(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.__PAD1); } - /** Unsafe version of {@link #addr}. */ - public static long naddr(long struct) { return UNSAFE.getLong(null, struct + IOURingSQE.ADDR); } - /** Unsafe version of {@link #splice_off_in}. */ - public static long nsplice_off_in(long struct) { return UNSAFE.getLong(null, struct + IOURingSQE.SPLICE_OFF_IN); } - /** Unsafe version of {@link #len}. */ - public static int nlen(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.LEN); } - /** Unsafe version of {@link #rw_flags}. */ - public static int nrw_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.RW_FLAGS); } - /** Unsafe version of {@link #fsync_flags}. */ - public static int nfsync_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.FSYNC_FLAGS); } - /** Unsafe version of {@link #poll_events}. */ - public static short npoll_events(long struct) { return UNSAFE.getShort(null, struct + IOURingSQE.POLL_EVENTS); } - /** Unsafe version of {@link #poll32_events}. */ - public static int npoll32_events(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.POLL32_EVENTS); } - /** Unsafe version of {@link #sync_range_flags}. */ - public static int nsync_range_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.SYNC_RANGE_FLAGS); } - /** Unsafe version of {@link #msg_flags}. */ - public static int nmsg_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.MSG_FLAGS); } - /** Unsafe version of {@link #timeout_flags}. */ - public static int ntimeout_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.TIMEOUT_FLAGS); } - /** Unsafe version of {@link #accept_flags}. */ - public static int naccept_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.ACCEPT_FLAGS); } - /** Unsafe version of {@link #cancel_flags}. */ - public static int ncancel_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.CANCEL_FLAGS); } - /** Unsafe version of {@link #open_flags}. */ - public static int nopen_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.OPEN_FLAGS); } - /** Unsafe version of {@link #statx_flags}. */ - public static int nstatx_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.STATX_FLAGS); } - /** Unsafe version of {@link #fadvise_advice}. */ - public static int nfadvise_advice(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.FADVISE_ADVICE); } - /** Unsafe version of {@link #splice_flags}. */ - public static int nsplice_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.SPLICE_FLAGS); } - /** Unsafe version of {@link #rename_flags}. */ - public static int nrename_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.RENAME_FLAGS); } - /** Unsafe version of {@link #unlink_flags}. */ - public static int nunlink_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.UNLINK_FLAGS); } - /** Unsafe version of {@link #hardlink_flags}. */ - public static int nhardlink_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.HARDLINK_FLAGS); } - /** Unsafe version of {@link #xattr_flags}. */ - public static int nxattr_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.XATTR_FLAGS); } - /** Unsafe version of {@link #msg_ring_flags}. */ - public static int nmsg_ring_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.MSG_RING_FLAGS); } - /** Unsafe version of {@link #uring_cmd_flags}. */ - public static int nuring_cmd_flags(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.URING_CMD_FLAGS); } - /** Unsafe version of {@link #user_data}. */ - public static long nuser_data(long struct) { return UNSAFE.getLong(null, struct + IOURingSQE.USER_DATA); } - /** Unsafe version of {@link #buf_index}. */ - public static short nbuf_index(long struct) { return UNSAFE.getShort(null, struct + IOURingSQE.BUF_INDEX); } - /** Unsafe version of {@link #buf_group}. */ - public static short nbuf_group(long struct) { return UNSAFE.getShort(null, struct + IOURingSQE.BUF_GROUP); } - /** Unsafe version of {@link #personality}. */ - public static short npersonality(long struct) { return UNSAFE.getShort(null, struct + IOURingSQE.PERSONALITY); } - /** Unsafe version of {@link #splice_fd_in}. */ - public static int nsplice_fd_in(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.SPLICE_FD_IN); } - /** Unsafe version of {@link #file_index}. */ - public static int nfile_index(long struct) { return UNSAFE.getInt(null, struct + IOURingSQE.FILE_INDEX); } - /** Unsafe version of {@link #addr_len}. */ - public static short naddr_len(long struct) { return UNSAFE.getShort(null, struct + IOURingSQE.ADDR_LEN); } - public static ShortBuffer n__pad3(long struct) { return memShortBuffer(struct + IOURingSQE.__PAD3, 1); } - public static short n__pad3(long struct, int index) { - return UNSAFE.getShort(null, struct + IOURingSQE.__PAD3 + check(index, 1) * 2); - } - /** Unsafe version of {@link #addr3}. */ - public static long naddr3(long struct) { return UNSAFE.getLong(null, struct + IOURingSQE.ADDR3); } - public static LongBuffer n__pad2(long struct) { return memLongBuffer(struct + IOURingSQE.__PAD2, 1); } - public static long n__pad2(long struct, int index) { - return UNSAFE.getLong(null, struct + IOURingSQE.__PAD2 + check(index, 1) * 8); - } - /** Unsafe version of {@link #cmd}. */ - public static ByteBuffer ncmd(long struct) { return memByteBuffer(struct + IOURingSQE.CMD, 0); } - /** Unsafe version of {@link #cmd(int) cmd}. */ - public static byte ncmd(long struct, int index) { - return UNSAFE.getByte(null, struct + IOURingSQE.CMD + check(index, 0) * 1); - } - - /** Unsafe version of {@link #opcode(byte) opcode}. */ - public static void nopcode(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingSQE.OPCODE, value); } - /** Unsafe version of {@link #flags(byte) flags}. */ - public static void nflags(long struct, byte value) { UNSAFE.putByte(null, struct + IOURingSQE.FLAGS, value); } - /** Unsafe version of {@link #ioprio(short) ioprio}. */ - public static void nioprio(long struct, short value) { UNSAFE.putShort(null, struct + IOURingSQE.IOPRIO, value); } - /** Unsafe version of {@link #fd(int) fd}. */ - public static void nfd(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.FD, value); } - /** Unsafe version of {@link #off(long) off}. */ - public static void noff(long struct, long value) { UNSAFE.putLong(null, struct + IOURingSQE.OFF, value); } - /** Unsafe version of {@link #addr2(long) addr2}. */ - public static void naddr2(long struct, long value) { UNSAFE.putLong(null, struct + IOURingSQE.ADDR2, value); } - /** Unsafe version of {@link #cmd_op(int) cmd_op}. */ - public static void ncmd_op(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.CMD_OP, value); } - public static void n__pad1(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.__PAD1, value); } - /** Unsafe version of {@link #addr(long) addr}. */ - public static void naddr(long struct, long value) { UNSAFE.putLong(null, struct + IOURingSQE.ADDR, value); } - /** Unsafe version of {@link #splice_off_in(long) splice_off_in}. */ - public static void nsplice_off_in(long struct, long value) { UNSAFE.putLong(null, struct + IOURingSQE.SPLICE_OFF_IN, value); } - /** Unsafe version of {@link #len(int) len}. */ - public static void nlen(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.LEN, value); } - /** Unsafe version of {@link #rw_flags(int) rw_flags}. */ - public static void nrw_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.RW_FLAGS, value); } - /** Unsafe version of {@link #fsync_flags(int) fsync_flags}. */ - public static void nfsync_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.FSYNC_FLAGS, value); } - /** Unsafe version of {@link #poll_events(short) poll_events}. */ - public static void npoll_events(long struct, short value) { UNSAFE.putShort(null, struct + IOURingSQE.POLL_EVENTS, value); } - /** Unsafe version of {@link #poll32_events(int) poll32_events}. */ - public static void npoll32_events(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.POLL32_EVENTS, value); } - /** Unsafe version of {@link #sync_range_flags(int) sync_range_flags}. */ - public static void nsync_range_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.SYNC_RANGE_FLAGS, value); } - /** Unsafe version of {@link #msg_flags(int) msg_flags}. */ - public static void nmsg_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.MSG_FLAGS, value); } - /** Unsafe version of {@link #timeout_flags(int) timeout_flags}. */ - public static void ntimeout_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.TIMEOUT_FLAGS, value); } - /** Unsafe version of {@link #accept_flags(int) accept_flags}. */ - public static void naccept_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.ACCEPT_FLAGS, value); } - /** Unsafe version of {@link #cancel_flags(int) cancel_flags}. */ - public static void ncancel_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.CANCEL_FLAGS, value); } - /** Unsafe version of {@link #open_flags(int) open_flags}. */ - public static void nopen_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.OPEN_FLAGS, value); } - /** Unsafe version of {@link #statx_flags(int) statx_flags}. */ - public static void nstatx_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.STATX_FLAGS, value); } - /** Unsafe version of {@link #fadvise_advice(int) fadvise_advice}. */ - public static void nfadvise_advice(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.FADVISE_ADVICE, value); } - /** Unsafe version of {@link #splice_flags(int) splice_flags}. */ - public static void nsplice_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.SPLICE_FLAGS, value); } - /** Unsafe version of {@link #rename_flags(int) rename_flags}. */ - public static void nrename_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.RENAME_FLAGS, value); } - /** Unsafe version of {@link #unlink_flags(int) unlink_flags}. */ - public static void nunlink_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.UNLINK_FLAGS, value); } - /** Unsafe version of {@link #hardlink_flags(int) hardlink_flags}. */ - public static void nhardlink_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.HARDLINK_FLAGS, value); } - /** Unsafe version of {@link #xattr_flags(int) xattr_flags}. */ - public static void nxattr_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.XATTR_FLAGS, value); } - /** Unsafe version of {@link #msg_ring_flags(int) msg_ring_flags}. */ - public static void nmsg_ring_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.MSG_RING_FLAGS, value); } - /** Unsafe version of {@link #uring_cmd_flags(int) uring_cmd_flags}. */ - public static void nuring_cmd_flags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.URING_CMD_FLAGS, value); } - /** Unsafe version of {@link #user_data(long) user_data}. */ - public static void nuser_data(long struct, long value) { UNSAFE.putLong(null, struct + IOURingSQE.USER_DATA, value); } - /** Unsafe version of {@link #buf_index(short) buf_index}. */ - public static void nbuf_index(long struct, short value) { UNSAFE.putShort(null, struct + IOURingSQE.BUF_INDEX, value); } - /** Unsafe version of {@link #buf_group(short) buf_group}. */ - public static void nbuf_group(long struct, short value) { UNSAFE.putShort(null, struct + IOURingSQE.BUF_GROUP, value); } - /** Unsafe version of {@link #personality(short) personality}. */ - public static void npersonality(long struct, short value) { UNSAFE.putShort(null, struct + IOURingSQE.PERSONALITY, value); } - /** Unsafe version of {@link #splice_fd_in(int) splice_fd_in}. */ - public static void nsplice_fd_in(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.SPLICE_FD_IN, value); } - /** Unsafe version of {@link #file_index(int) file_index}. */ - public static void nfile_index(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSQE.FILE_INDEX, value); } - /** Unsafe version of {@link #addr_len(short) addr_len}. */ - public static void naddr_len(long struct, short value) { UNSAFE.putShort(null, struct + IOURingSQE.ADDR_LEN, value); } - public static void n__pad3(long struct, ShortBuffer value) { - if (CHECKS) { checkGT(value, 1); } - memCopy(memAddress(value), struct + IOURingSQE.__PAD3, value.remaining() * 2); - } - public static void n__pad3(long struct, int index, short value) { - UNSAFE.putShort(null, struct + IOURingSQE.__PAD3 + check(index, 1) * 2, value); - } - /** Unsafe version of {@link #addr3(long) addr3}. */ - public static void naddr3(long struct, long value) { UNSAFE.putLong(null, struct + IOURingSQE.ADDR3, value); } - public static void n__pad2(long struct, LongBuffer value) { - if (CHECKS) { checkGT(value, 1); } - memCopy(memAddress(value), struct + IOURingSQE.__PAD2, value.remaining() * 8); - } - public static void n__pad2(long struct, int index, long value) { - UNSAFE.putLong(null, struct + IOURingSQE.__PAD2 + check(index, 1) * 8, value); - } - /** Unsafe version of {@link #cmd(ByteBuffer) cmd}. */ - public static void ncmd(long struct, ByteBuffer value) { - if (CHECKS) { checkGT(value, 0); } - memCopy(memAddress(value), struct + IOURingSQE.CMD, value.remaining() * 1); - } - /** Unsafe version of {@link #cmd(int, byte) cmd}. */ - public static void ncmd(long struct, int index, byte value) { - UNSAFE.putByte(null, struct + IOURingSQE.CMD + check(index, 0) * 1, value); - } - - // ----------------------------------- - - /** An array of {@link IOURingSQE} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingSQE ELEMENT_FACTORY = IOURingSQE.create(-1L); - - /** - * Creates a new {@code IOURingSQE.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingSQE#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingSQE getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link IOURingSQE#opcode} field. */ - @NativeType("__u8") - public byte opcode() { return IOURingSQE.nopcode(address()); } - /** @return the value of the {@link IOURingSQE#flags} field. */ - @NativeType("__u8") - public byte flags() { return IOURingSQE.nflags(address()); } - /** @return the value of the {@link IOURingSQE#ioprio} field. */ - @NativeType("__u16") - public short ioprio() { return IOURingSQE.nioprio(address()); } - /** @return the value of the {@link IOURingSQE#fd} field. */ - @NativeType("__s32") - public int fd() { return IOURingSQE.nfd(address()); } - /** @return the value of the {@link IOURingSQE#off} field. */ - @NativeType("__u64") - public long off() { return IOURingSQE.noff(address()); } - /** @return the value of the {@code addr2} field. */ - @NativeType("__u64") - public long addr2() { return IOURingSQE.naddr2(address()); } - /** @return the value of the {@code cmd_op} field. */ - @NativeType("__u32") - public int cmd_op() { return IOURingSQE.ncmd_op(address()); } - /** @return the value of the {@code __pad1} field. */ - @NativeType("__u32") - public int __pad1() { return IOURingSQE.n__pad1(address()); } - /** @return the value of the {@link IOURingSQE#addr} field. */ - @NativeType("__u64") - public long addr() { return IOURingSQE.naddr(address()); } - /** @return the value of the {@code splice_off_in} field. */ - @NativeType("__u64") - public long splice_off_in() { return IOURingSQE.nsplice_off_in(address()); } - /** @return the value of the {@link IOURingSQE#len} field. */ - @NativeType("__u32") - public int len() { return IOURingSQE.nlen(address()); } - /** @return the value of the {@link IOURingSQE#rw_flags} field. */ - @NativeType("__kernel_rwf_t") - public int rw_flags() { return IOURingSQE.nrw_flags(address()); } - /** @return the value of the {@link IOURingSQE#fsync_flags} field. */ - @NativeType("__u32") - public int fsync_flags() { return IOURingSQE.nfsync_flags(address()); } - /** @return the value of the {@link IOURingSQE#poll_events} field. */ - @NativeType("__u16") - public short poll_events() { return IOURingSQE.npoll_events(address()); } - /** @return the value of the {@link IOURingSQE#poll32_events} field. */ - @NativeType("__u32") - public int poll32_events() { return IOURingSQE.npoll32_events(address()); } - /** @return the value of the {@code sync_range_flags} field. */ - @NativeType("__u32") - public int sync_range_flags() { return IOURingSQE.nsync_range_flags(address()); } - /** @return the value of the {@code msg_flags} field. */ - @NativeType("__u32") - public int msg_flags() { return IOURingSQE.nmsg_flags(address()); } - /** @return the value of the {@code timeout_flags} field. */ - @NativeType("__u32") - public int timeout_flags() { return IOURingSQE.ntimeout_flags(address()); } - /** @return the value of the {@code accept_flags} field. */ - @NativeType("__u32") - public int accept_flags() { return IOURingSQE.naccept_flags(address()); } - /** @return the value of the {@code cancel_flags} field. */ - @NativeType("__u32") - public int cancel_flags() { return IOURingSQE.ncancel_flags(address()); } - /** @return the value of the {@code open_flags} field. */ - @NativeType("__u32") - public int open_flags() { return IOURingSQE.nopen_flags(address()); } - /** @return the value of the {@code statx_flags} field. */ - @NativeType("__u32") - public int statx_flags() { return IOURingSQE.nstatx_flags(address()); } - /** @return the value of the {@code fadvise_advice} field. */ - @NativeType("__u32") - public int fadvise_advice() { return IOURingSQE.nfadvise_advice(address()); } - /** @return the value of the {@code splice_flags} field. */ - @NativeType("__u32") - public int splice_flags() { return IOURingSQE.nsplice_flags(address()); } - /** @return the value of the {@code rename_flags} field. */ - @NativeType("__u32") - public int rename_flags() { return IOURingSQE.nrename_flags(address()); } - /** @return the value of the {@code unlink_flags} field. */ - @NativeType("__u32") - public int unlink_flags() { return IOURingSQE.nunlink_flags(address()); } - /** @return the value of the {@code hardlink_flags} field. */ - @NativeType("__u32") - public int hardlink_flags() { return IOURingSQE.nhardlink_flags(address()); } - /** @return the value of the {@code xattr_flags} field. */ - @NativeType("__u32") - public int xattr_flags() { return IOURingSQE.nxattr_flags(address()); } - /** @return the value of the {@code msg_ring_flags} field. */ - @NativeType("__u32") - public int msg_ring_flags() { return IOURingSQE.nmsg_ring_flags(address()); } - /** @return the value of the {@code uring_cmd_flags} field. */ - @NativeType("__u32") - public int uring_cmd_flags() { return IOURingSQE.nuring_cmd_flags(address()); } - /** @return the value of the {@link IOURingSQE#user_data} field. */ - @NativeType("__u64") - public long user_data() { return IOURingSQE.nuser_data(address()); } - /** @return the value of the {@link IOURingSQE#buf_index} field. */ - @NativeType("__u16") - public short buf_index() { return IOURingSQE.nbuf_index(address()); } - /** @return the value of the {@link IOURingSQE#buf_group} field. */ - @NativeType("__u16") - public short buf_group() { return IOURingSQE.nbuf_group(address()); } - /** @return the value of the {@link IOURingSQE#personality} field. */ - @NativeType("__u16") - public short personality() { return IOURingSQE.npersonality(address()); } - /** @return the value of the {@code splice_fd_in} field. */ - @NativeType("__s32") - public int splice_fd_in() { return IOURingSQE.nsplice_fd_in(address()); } - /** @return the value of the {@code file_index} field. */ - @NativeType("__u32") - public int file_index() { return IOURingSQE.nfile_index(address()); } - /** @return the value of the {@code addr_len} field. */ - @NativeType("__u16") - public short addr_len() { return IOURingSQE.naddr_len(address()); } - /** @return a {@link ShortBuffer} view of the {@code __pad3} field. */ - @NativeType("__u16[1]") - public ShortBuffer __pad3() { return IOURingSQE.n__pad3(address()); } - /** @return the value at the specified index of the {@code __pad3} field. */ - @NativeType("__u16") - public short __pad3(int index) { return IOURingSQE.n__pad3(address(), index); } - /** @return the value of the {@code addr3} field. */ - @NativeType("__u64") - public long addr3() { return IOURingSQE.naddr3(address()); } - /** @return a {@link LongBuffer} view of the {@code __pad2} field. */ - @NativeType("__u64[1]") - public LongBuffer __pad2() { return IOURingSQE.n__pad2(address()); } - /** @return the value at the specified index of the {@code __pad2} field. */ - @NativeType("__u64") - public long __pad2(int index) { return IOURingSQE.n__pad2(address(), index); } - /** @return a {@link ByteBuffer} view of the {@link IOURingSQE#cmd} field. */ - @NativeType("__u8[0]") - public ByteBuffer cmd() { return IOURingSQE.ncmd(address()); } - /** @return the value at the specified index of the {@link IOURingSQE#cmd} field. */ - @NativeType("__u8") - public byte cmd(int index) { return IOURingSQE.ncmd(address(), index); } - - /** Sets the specified value to the {@link IOURingSQE#opcode} field. */ - public Buffer opcode(@NativeType("__u8") byte value) { IOURingSQE.nopcode(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#flags} field. */ - public Buffer flags(@NativeType("__u8") byte value) { IOURingSQE.nflags(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#ioprio} field. */ - public Buffer ioprio(@NativeType("__u16") short value) { IOURingSQE.nioprio(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#fd} field. */ - public Buffer fd(@NativeType("__s32") int value) { IOURingSQE.nfd(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#off} field. */ - public Buffer off(@NativeType("__u64") long value) { IOURingSQE.noff(address(), value); return this; } - /** Sets the specified value to the {@code addr2} field. */ - public Buffer addr2(@NativeType("__u64") long value) { IOURingSQE.naddr2(address(), value); return this; } - /** Sets the specified value to the {@code cmd_op} field. */ - public Buffer cmd_op(@NativeType("__u32") int value) { IOURingSQE.ncmd_op(address(), value); return this; } - /** Sets the specified value to the {@code __pad1} field. */ - public Buffer __pad1(@NativeType("__u32") int value) { IOURingSQE.n__pad1(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#addr} field. */ - public Buffer addr(@NativeType("__u64") long value) { IOURingSQE.naddr(address(), value); return this; } - /** Sets the specified value to the {@code splice_off_in} field. */ - public Buffer splice_off_in(@NativeType("__u64") long value) { IOURingSQE.nsplice_off_in(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#len} field. */ - public Buffer len(@NativeType("__u32") int value) { IOURingSQE.nlen(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#rw_flags} field. */ - public Buffer rw_flags(@NativeType("__kernel_rwf_t") int value) { IOURingSQE.nrw_flags(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#fsync_flags} field. */ - public Buffer fsync_flags(@NativeType("__u32") int value) { IOURingSQE.nfsync_flags(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#poll_events} field. */ - public Buffer poll_events(@NativeType("__u16") short value) { IOURingSQE.npoll_events(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#poll32_events} field. */ - public Buffer poll32_events(@NativeType("__u32") int value) { IOURingSQE.npoll32_events(address(), value); return this; } - /** Sets the specified value to the {@code sync_range_flags} field. */ - public Buffer sync_range_flags(@NativeType("__u32") int value) { IOURingSQE.nsync_range_flags(address(), value); return this; } - /** Sets the specified value to the {@code msg_flags} field. */ - public Buffer msg_flags(@NativeType("__u32") int value) { IOURingSQE.nmsg_flags(address(), value); return this; } - /** Sets the specified value to the {@code timeout_flags} field. */ - public Buffer timeout_flags(@NativeType("__u32") int value) { IOURingSQE.ntimeout_flags(address(), value); return this; } - /** Sets the specified value to the {@code accept_flags} field. */ - public Buffer accept_flags(@NativeType("__u32") int value) { IOURingSQE.naccept_flags(address(), value); return this; } - /** Sets the specified value to the {@code cancel_flags} field. */ - public Buffer cancel_flags(@NativeType("__u32") int value) { IOURingSQE.ncancel_flags(address(), value); return this; } - /** Sets the specified value to the {@code open_flags} field. */ - public Buffer open_flags(@NativeType("__u32") int value) { IOURingSQE.nopen_flags(address(), value); return this; } - /** Sets the specified value to the {@code statx_flags} field. */ - public Buffer statx_flags(@NativeType("__u32") int value) { IOURingSQE.nstatx_flags(address(), value); return this; } - /** Sets the specified value to the {@code fadvise_advice} field. */ - public Buffer fadvise_advice(@NativeType("__u32") int value) { IOURingSQE.nfadvise_advice(address(), value); return this; } - /** Sets the specified value to the {@code splice_flags} field. */ - public Buffer splice_flags(@NativeType("__u32") int value) { IOURingSQE.nsplice_flags(address(), value); return this; } - /** Sets the specified value to the {@code rename_flags} field. */ - public Buffer rename_flags(@NativeType("__u32") int value) { IOURingSQE.nrename_flags(address(), value); return this; } - /** Sets the specified value to the {@code unlink_flags} field. */ - public Buffer unlink_flags(@NativeType("__u32") int value) { IOURingSQE.nunlink_flags(address(), value); return this; } - /** Sets the specified value to the {@code hardlink_flags} field. */ - public Buffer hardlink_flags(@NativeType("__u32") int value) { IOURingSQE.nhardlink_flags(address(), value); return this; } - /** Sets the specified value to the {@code xattr_flags} field. */ - public Buffer xattr_flags(@NativeType("__u32") int value) { IOURingSQE.nxattr_flags(address(), value); return this; } - /** Sets the specified value to the {@code msg_ring_flags} field. */ - public Buffer msg_ring_flags(@NativeType("__u32") int value) { IOURingSQE.nmsg_ring_flags(address(), value); return this; } - /** Sets the specified value to the {@code uring_cmd_flags} field. */ - public Buffer uring_cmd_flags(@NativeType("__u32") int value) { IOURingSQE.nuring_cmd_flags(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#user_data} field. */ - public Buffer user_data(@NativeType("__u64") long value) { IOURingSQE.nuser_data(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#buf_index} field. */ - public Buffer buf_index(@NativeType("__u16") short value) { IOURingSQE.nbuf_index(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#buf_group} field. */ - public Buffer buf_group(@NativeType("__u16") short value) { IOURingSQE.nbuf_group(address(), value); return this; } - /** Sets the specified value to the {@link IOURingSQE#personality} field. */ - public Buffer personality(@NativeType("__u16") short value) { IOURingSQE.npersonality(address(), value); return this; } - /** Sets the specified value to the {@code splice_fd_in} field. */ - public Buffer splice_fd_in(@NativeType("__s32") int value) { IOURingSQE.nsplice_fd_in(address(), value); return this; } - /** Sets the specified value to the {@code file_index} field. */ - public Buffer file_index(@NativeType("__u32") int value) { IOURingSQE.nfile_index(address(), value); return this; } - /** Sets the specified value to the {@code addr_len} field. */ - public Buffer addr_len(@NativeType("__u16") short value) { IOURingSQE.naddr_len(address(), value); return this; } - /** Copies the specified {@link ShortBuffer} to the {@code __pad3} field. */ - public Buffer __pad3(@NativeType("__u16[1]") ShortBuffer value) { IOURingSQE.n__pad3(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code __pad3} field. */ - public Buffer __pad3(int index, @NativeType("__u16") short value) { IOURingSQE.n__pad3(address(), index, value); return this; } - /** Sets the specified value to the {@code addr3} field. */ - public Buffer addr3(@NativeType("__u64") long value) { IOURingSQE.naddr3(address(), value); return this; } - /** Copies the specified {@link LongBuffer} to the {@code __pad2} field. */ - public Buffer __pad2(@NativeType("__u64[1]") LongBuffer value) { IOURingSQE.n__pad2(address(), value); return this; } - /** Sets the specified value at the specified index of the {@code __pad2} field. */ - public Buffer __pad2(int index, @NativeType("__u64") long value) { IOURingSQE.n__pad2(address(), index, value); return this; } - /** Copies the specified {@link ByteBuffer} to the {@link IOURingSQE#cmd} field. */ - public Buffer cmd(@NativeType("__u8[0]") ByteBuffer value) { IOURingSQE.ncmd(address(), value); return this; } - /** Sets the specified value at the specified index of the {@link IOURingSQE#cmd} field. */ - public Buffer cmd(int index, @NativeType("__u8") byte value) { IOURingSQE.ncmd(address(), index, value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSyncCancelReg.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSyncCancelReg.java deleted file mode 100644 index e314ae93..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/IOURingSyncCancelReg.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -import org.lwjgl.system.linux.*; - -/** - * Argument for {@link LibIOURing#IORING_REGISTER_SYNC_CANCEL REGISTER_SYNC_CANCEL}. - * - *

    Layout

    - * - *
    
    - * struct io_uring_sync_cancel_reg {
    - *     __u64 addr;
    - *     __s32 fd;
    - *     __u32 flags;
    - *     {@link KernelTimespec struct __kernel_timespec} timeout;
    - *     __u64 pad[4];
    - * }
    - */ -@NativeType("struct io_uring_sync_cancel_reg") -public class IOURingSyncCancelReg extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ADDR, - FD, - FLAGS, - TIMEOUT, - PAD; - - static { - Layout layout = __struct( - __member(8), - __member(4), - __member(4), - __member(KernelTimespec.SIZEOF, KernelTimespec.ALIGNOF), - __array(8, 4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ADDR = layout.offsetof(0); - FD = layout.offsetof(1); - FLAGS = layout.offsetof(2); - TIMEOUT = layout.offsetof(3); - PAD = layout.offsetof(4); - } - - protected IOURingSyncCancelReg(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected IOURingSyncCancelReg create(long address, @Nullable ByteBuffer container) { - return new IOURingSyncCancelReg(address, container); - } - - /** - * Creates a {@code IOURingSyncCancelReg} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public IOURingSyncCancelReg(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code addr} field. */ - @NativeType("__u64") - public long addr() { return naddr(address()); } - /** @return the value of the {@code fd} field. */ - @NativeType("__s32") - public int fd() { return nfd(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return nflags(address()); } - /** @return a {@link KernelTimespec} view of the {@code timeout} field. */ - @NativeType("struct __kernel_timespec") - public KernelTimespec timeout() { return ntimeout(address()); } - - /** Sets the specified value to the {@code addr} field. */ - public IOURingSyncCancelReg addr(@NativeType("__u64") long value) { naddr(address(), value); return this; } - /** Sets the specified value to the {@code fd} field. */ - public IOURingSyncCancelReg fd(@NativeType("__s32") int value) { nfd(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public IOURingSyncCancelReg flags(@NativeType("__u32") int value) { nflags(address(), value); return this; } - /** Copies the specified {@link KernelTimespec} to the {@code timeout} field. */ - public IOURingSyncCancelReg timeout(@NativeType("struct __kernel_timespec") KernelTimespec value) { ntimeout(address(), value); return this; } - /** Passes the {@code timeout} field to the specified {@link java.util.function.Consumer Consumer}. */ - public IOURingSyncCancelReg timeout(java.util.function.Consumer consumer) { consumer.accept(timeout()); return this; } - - /** Initializes this struct with the specified values. */ - public IOURingSyncCancelReg set( - long addr, - int fd, - int flags, - KernelTimespec timeout - ) { - addr(addr); - fd(fd); - flags(flags); - timeout(timeout); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public IOURingSyncCancelReg set(IOURingSyncCancelReg src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code IOURingSyncCancelReg} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static IOURingSyncCancelReg malloc() { - return new IOURingSyncCancelReg(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code IOURingSyncCancelReg} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static IOURingSyncCancelReg calloc() { - return new IOURingSyncCancelReg(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code IOURingSyncCancelReg} instance allocated with {@link BufferUtils}. */ - public static IOURingSyncCancelReg create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new IOURingSyncCancelReg(memAddress(container), container); - } - - /** Returns a new {@code IOURingSyncCancelReg} instance for the specified memory address. */ - public static IOURingSyncCancelReg create(long address) { - return new IOURingSyncCancelReg(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static IOURingSyncCancelReg createSafe(long address) { - return address == NULL ? null : new IOURingSyncCancelReg(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code IOURingSyncCancelReg} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static IOURingSyncCancelReg malloc(MemoryStack stack) { - return new IOURingSyncCancelReg(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code IOURingSyncCancelReg} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static IOURingSyncCancelReg calloc(MemoryStack stack) { - return new IOURingSyncCancelReg(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #addr}. */ - public static long naddr(long struct) { return UNSAFE.getLong(null, struct + IOURingSyncCancelReg.ADDR); } - /** Unsafe version of {@link #fd}. */ - public static int nfd(long struct) { return UNSAFE.getInt(null, struct + IOURingSyncCancelReg.FD); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + IOURingSyncCancelReg.FLAGS); } - /** Unsafe version of {@link #timeout}. */ - public static KernelTimespec ntimeout(long struct) { return KernelTimespec.create(struct + IOURingSyncCancelReg.TIMEOUT); } - public static LongBuffer npad(long struct) { return memLongBuffer(struct + IOURingSyncCancelReg.PAD, 4); } - public static long npad(long struct, int index) { - return UNSAFE.getLong(null, struct + IOURingSyncCancelReg.PAD + check(index, 4) * 8); - } - - /** Unsafe version of {@link #addr(long) addr}. */ - public static void naddr(long struct, long value) { UNSAFE.putLong(null, struct + IOURingSyncCancelReg.ADDR, value); } - /** Unsafe version of {@link #fd(int) fd}. */ - public static void nfd(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSyncCancelReg.FD, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + IOURingSyncCancelReg.FLAGS, value); } - /** Unsafe version of {@link #timeout(KernelTimespec) timeout}. */ - public static void ntimeout(long struct, KernelTimespec value) { memCopy(value.address(), struct + IOURingSyncCancelReg.TIMEOUT, KernelTimespec.SIZEOF); } - public static void npad(long struct, LongBuffer value) { - if (CHECKS) { checkGT(value, 4); } - memCopy(memAddress(value), struct + IOURingSyncCancelReg.PAD, value.remaining() * 8); - } - public static void npad(long struct, int index, long value) { - UNSAFE.putLong(null, struct + IOURingSyncCancelReg.PAD + check(index, 4) * 8, value); - } - - // ----------------------------------- - - /** An array of {@link IOURingSyncCancelReg} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final IOURingSyncCancelReg ELEMENT_FACTORY = IOURingSyncCancelReg.create(-1L); - - /** - * Creates a new {@code IOURingSyncCancelReg.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link IOURingSyncCancelReg#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected IOURingSyncCancelReg getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code addr} field. */ - @NativeType("__u64") - public long addr() { return IOURingSyncCancelReg.naddr(address()); } - /** @return the value of the {@code fd} field. */ - @NativeType("__s32") - public int fd() { return IOURingSyncCancelReg.nfd(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("__u32") - public int flags() { return IOURingSyncCancelReg.nflags(address()); } - /** @return a {@link KernelTimespec} view of the {@code timeout} field. */ - @NativeType("struct __kernel_timespec") - public KernelTimespec timeout() { return IOURingSyncCancelReg.ntimeout(address()); } - - /** Sets the specified value to the {@code addr} field. */ - public Buffer addr(@NativeType("__u64") long value) { IOURingSyncCancelReg.naddr(address(), value); return this; } - /** Sets the specified value to the {@code fd} field. */ - public Buffer fd(@NativeType("__s32") int value) { IOURingSyncCancelReg.nfd(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("__u32") int value) { IOURingSyncCancelReg.nflags(address(), value); return this; } - /** Copies the specified {@link KernelTimespec} to the {@code timeout} field. */ - public Buffer timeout(@NativeType("struct __kernel_timespec") KernelTimespec value) { IOURingSyncCancelReg.ntimeout(address(), value); return this; } - /** Passes the {@code timeout} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer timeout(java.util.function.Consumer consumer) { consumer.accept(timeout()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/LibIOURing.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/LibIOURing.java deleted file mode 100644 index 98cafd0f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/LibIOURing.java +++ /dev/null @@ -1,1787 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import org.lwjgl.system.*; - -/** - * Native bindings to io_uring, a Linux-specific API for asynchronous I/O. - * - *

    It allows the user to submit one or more I/O requests, which are processed asynchronously without blocking the calling process. {@code io_uring} gets - * its name from ring buffers which are shared between user space and kernel space. This arrangement allows for efficient I/O, while avoiding the overhead - * of copying buffers between them, where possible. This interface makes {@code io_uring} different from other UNIX I/O APIs, wherein, rather than just - * communicate between kernel and user space with system calls, ring buffers are used as the main mode of communication. This arrangement has various - * performance benefits which are discussed in a separate section below. This man page uses the terms shared buffers, shared ring buffers and queues - * interchangeably.

    - * - *

    The general programming model you need to follow for io_uring is outlined below

    - * - *
      - *
    • Set up shared buffers with {@link #io_uring_setup setup} and {@code mmap(2)}, mapping into user space shared buffers for the submission queue (SQ) and the completion - * queue (CQ). You place I/O requests you want to make on the SQ, while the kernel places the results of those operations on the CQ.
    • - *
    • For every I/O request you need to make (like to read a file, write a file, accept a socket connection, etc), you create a submission queue entry, - * or SQE, describe the I/O operation you need to get done and add it to the tail of the submission queue (SQ). Each I/O operation is, in essence, the - * equivalent of a system call you would have made otherwise, if you were not using {@code io_uring}. You can add more than one SQE to the queue - * depending on the number of operations you want to request.
    • - *
    • After you add one or more SQEs, you need to call {@link #io_uring_enter enter} to tell the kernel to dequeue your I/O requests off the SQ and begin processing them.
    • - *
    • For each SQE you submit, once it is done processing the request, the kernel places a completion queue event or CQE at the tail of the completion - * queue or CQ. The kernel places exactly one matching CQE in the CQ for every SQE you submit on the SQ. After you retrieve a CQE, minimally, you - * might be interested in checking the res field of the CQE structure, which corresponds to the return value of the system call's equivalent, had you - * used it directly without using {@code io_uring}. For instance, a read operation under {@code io_uring}, started with the {@link #IORING_OP_READ OP_READ} operation, which - * issues the equivalent of the {@code read(2)} system call, would return as part of {@code res} what {@code read(2)} would have returned if called - * directly, without using {@code io_uring}.
    • - *
    • Optionally, {@link #io_uring_enter enter} can also wait for a specified number of requests to be processed by the kernel before it returns. If you specified a certain - * number of completions to wait for, the kernel would have placed at least those many number of CQEs on the CQ, which you can then readily read, - * right after the return from {@code io_uring_enter(2)}.
    • - *
    • It is important to remember that I/O requests submitted to the kernel can complete in any order. It is not necessary for the kernel to process one - * request after another, in the order you placed them. Given that the interface is a ring, the requests are attempted in order, however that doesn't - * imply any sort of ordering on their completion. When more than one request is in flight, it is not possible to determine which one will complete - * first. When you dequeue CQEs off the CQ, you should always check which submitted request it corresponds to. The most common method for doing so is - * utilizing the {@code user_data} field in the request, which is passed back on the completion side.
    • - *
    - * - *

    Adding to and reading from the queues:

    - * - *
      - *
    • You add SQEs to the tail of the SQ. The kernel reads SQEs off the head of the queue.
    • - *
    • The kernel adds CQEs to the tail of the CQ. You read CQEs off the head of the queue.
    • - *
    - * - *

    Submission queue polling

    - * - *

    One of the goals of {@code io_uring} is to provide a means for efficient I/O. To this end, {@code io_uring} supports a polling mode that lets you avoid - * the call to {@link #io_uring_enter enter}, which you use to inform the kernel that you have queued SQEs on to the SQ. With SQ Polling, {@code io_uring} starts a kernel - * thread that polls the submission queue for any I/O requests you submit by adding SQEs. With SQ Polling enabled, there is no need for you to call - * {@code io_uring_enter(2)}, letting you avoid the overhead of system calls. A designated kernel thread dequeues SQEs off the SQ as you add them and - * dispatches them for asynchronous processing.

    - * - *

    Setting up io_uring

    - * - *

    The main steps in setting up {@code io_uring} consist of mapping in the shared buffers with {@code mmap(2)} calls.

    - * - *

    Submitting I/O requests

    - * - *

    The process of submitting a request consists of describing the I/O operation you need to get done using an {@code io_uring_sqe} structure instance. - * These details describe the equivalent system call and its parameters. Because the range of I/O operations Linux supports are very varied and the - * {@code io_uring_sqe} structure needs to be able to describe them, it has several fields, some packed into unions for space efficiency.

    - * - *

    To submit an I/O request to {@code io_uring}, you need to acquire a submission queue entry (SQE) from the submission queue (SQ), fill it up with - * details of the operation you want to submit and call {@link #io_uring_enter enter}. If you want to avoid calling {@code io_uring_enter(2)}, you have the option of setting - * up Submission Queue Polling.

    - * - *

    SQEs are added to the tail of the submission queue. The kernel picks up SQEs off the head of the SQ. The general algorithm to get the next available - * SQE and update the tail is as follows.

    - * - *
    
    - * struct io_uring_sqe *sqe;
    - * unsigned tail, index;
    - * tail = *sqring->tail;
    - * index = tail & (*sqring->ring_mask);
    - * sqe = &sqring->sqes[index];
    - * // fill up details about this I/O request
    - * describe_io(sqe);
    - * // fill the sqe index into the SQ ring array
    - * sqring->array[index] = index;
    - * tail++;
    - * atomic_store_release(sqring->tail, tail);
    - * - *

    To get the index of an entry, the application must mask the current tail index with the size mask of the ring. This holds true for both SQs and CQs. - * Once the SQE is acquired, the necessary fields are filled in, describing the request. While the CQ ring directly indexes the shared array of CQEs, the - * submission side has an indirection array between them. The submission side ring buffer is an index into this array, which in turn contains the index - * into the SQEs.

    - * - *

    The following code snippet demonstrates how a read operation, an equivalent of a preadv2(2) system call is described by filling up an SQE with the - * necessary parameters.

    - * - *
    
    - * struct iovec iovecs[16];
    - *  ...
    - * sqe->opcode = IORING_OP_READV;
    - * sqe->fd = fd;
    - * sqe->addr = (unsigned long) iovecs;
    - * sqe->len = 16;
    - * sqe->off = offset;
    - * sqe->flags = 0;
    - * - *

    Memory ordering

    - * - *

    Modern compilers and CPUs freely reorder reads and writes without affecting the program's outcome to optimize performance. Some aspects of this need to - * be kept in mind on SMP systems since {@code io_uring} involves buffers shared between kernel and user space. These buffers are both visible and - * modifiable from kernel and user space. As heads and tails belonging to these shared buffers are updated by kernel and user space, changes need to be - * coherently visible on either side, irrespective of whether a CPU switch took place after the kernel-user mode switch happened. We use memory barriers - * to enforce this coherency. Being significantly large subjects on their own, memory barriers are out of scope for further discussion on this man page.

    - * - *

    Letting the kernel know about I/O submissions

    - * - *

    Once you place one or more SQEs on to the SQ, you need to let the kernel know that you've done so. You can do this by calling the {@link #io_uring_enter enter} system call. - * This system call is also capable of waiting for a specified count of events to complete. This way, you can be sure to find completion events in the - * completion queue without having to poll it for events later.

    - * - *

    Reading completion events

    - * - *

    Similar to the submission queue (SQ), the completion queue (CQ) is a shared buffer between the kernel and user space. Whereas you placed submission - * queue entries on the tail of the SQ and the kernel read off the head, when it comes to the CQ, the kernel places completion queue events or CQEs on the - * tail of the CQ and you read off its head.

    - * - *

    Submission is flexible (and thus a bit more complicated) since it needs to be able to encode different types of system calls that take various - * parameters. Completion, on the other hand is simpler since we're looking only for a return value back from the kernel. This is easily understood by - * looking at the completion queue event structure, {@link IOURingCQE}.

    - * - *

    Here, {@code user_data} is custom data that is passed unchanged from submission to completion. That is, from SQEs to CQEs. This field can be used to - * set context, uniquely identifying submissions that got completed. Given that I/O requests can complete in any order, this field can be used to - * correlate a submission with a completion. {@code res} is the result from the system call that was performed as part of the submission; its return - * value. The {@code flags} field could carry request-specific metadata in the future, but is currently unused.

    - * - *

    The general sequence to read completion events off the completion queue is as follows:

    - * - *
    
    - * unsigned head;
    - * head = *cqring->head;
    - * if (head != atomic_load_acquire(cqring->tail)) {
    - *     struct io_uring_cqe *cqe;
    - * 
    - *     unsigned index;
    - * 
    - *     index = head & (cqring->mask);
    - * 
    - *     cqe = &cqring->cqes[index];
    - * 
    - *     // process completed CQE
    - * 
    - *     process_cqe(cqe);
    - * 
    - *     // CQE consumption complete
    - * 
    - *     head++;
    - * }
    - * atomic_store_release(cqring->head, head);
    - * - *

    It helps to be reminded that the kernel adds CQEs to the tail of the CQ, while you need to dequeue them off the head. To get the index of an entry at - * the head, the application must mask the current head index with the size mask of the ring. Once the CQE has been consumed or processed, the head needs - * to be updated to reflect the consumption of the CQE. Attention should be paid to the read and write barriers to ensure successful read and update of - * the head.

    - * - *

    io_uring performance

    - * - *

    Because of the shared ring buffers between kernel and user space, {@code io_uring} can be a zero-copy system. Copying buffers to and from becomes - * necessary when system calls that transfer data between kernel and user space are involved. But since the bulk of the communication in {@code io_uring} - * is via buffers shared between the kernel and user space, this huge performance overhead is completely avoided.

    - * - *

    While system calls may not seem like a significant overhead, in high performance applications, making a lot of them will begin to matter. While - * workarounds the operating system has in place to deal with Spectre and Meltdown are ideally best done away with, unfortunately, some of these - * workarounds are around the system call interface, making system calls not as cheap as before on affected hardware. While newer hardware should not need - * these workarounds, hardware with these vulnerabilities can be expected to be in the wild for a long time. While using synchronous programming - * interfaces or even when using asynchronous programming interfaces under Linux, there is at least one system call involved in the submission of each - * request. In {@code io_uring}, on the other hand, you can batch several requests in one go, simply by queueing up multiple SQEs, each describing an I/O - * operation you want and make a single call to {@link #io_uring_enter enter}. This is possible due to {@code io_uring}'s shared buffers based design.

    - * - *

    While this batching in itself can avoid the overhead associated with potentially multiple and frequent system calls, you can reduce even this overhead - * further with Submission Queue Polling, by having the kernel poll and pick up your SQEs for processing as you add them to the submission queue. This - * avoids the {@code io_uring_enter(2)} call you need to make to tell the kernel to pick SQEs up. For high-performance applications, this means even - * lesser system call overheads.

    - */ -public class LibIOURing { - - static { Library.initialize(); } - - /** - * If {@code sqe->file_index} is set to this for opcodes that instantiate a new direct descriptor (like {@code openat/openat2/accept}), then io_uring will - * allocate an available direct descriptor instead of having the application pass one in. - * - *

    The picked direct descriptor will be returned in {@code cqe->res}, or {@code -ENFILE} if the space is full.

    - */ - public static final int IORING_FILE_INDEX_ALLOC = ~0; - - public static final int IORING_MAX_ENTRIES = 4096; - - /** - * {@code io_uring_sqe->flags} bits - * - *
    Enum values:
    - * - *
      - *
    • {@link #IOSQE_FIXED_FILE_BIT IOSQE_FIXED_FILE_BIT}
    • - *
    • {@link #IOSQE_IO_DRAIN_BIT IOSQE_IO_DRAIN_BIT}
    • - *
    • {@link #IOSQE_IO_LINK_BIT IOSQE_IO_LINK_BIT}
    • - *
    • {@link #IOSQE_IO_HARDLINK_BIT IOSQE_IO_HARDLINK_BIT}
    • - *
    • {@link #IOSQE_ASYNC_BIT IOSQE_ASYNC_BIT}
    • - *
    • {@link #IOSQE_BUFFER_SELECT_BIT IOSQE_BUFFER_SELECT_BIT}
    • - *
    • {@link #IOSQE_CQE_SKIP_SUCCESS_BIT IOSQE_CQE_SKIP_SUCCESS_BIT}
    • - *
    - */ - public static final int - IOSQE_FIXED_FILE_BIT = 0, - IOSQE_IO_DRAIN_BIT = 1, - IOSQE_IO_LINK_BIT = 2, - IOSQE_IO_HARDLINK_BIT = 3, - IOSQE_ASYNC_BIT = 4, - IOSQE_BUFFER_SELECT_BIT = 5, - IOSQE_CQE_SKIP_SUCCESS_BIT = 6; - - /** - * {@code io_uring_sqe->flags} bitfield values - * - *
    Enum values:
    - * - *
      - *
    • {@link #IOSQE_FIXED_FILE IOSQE_FIXED_FILE} - - * When this flag is specified, {@code fd} is an index into the files array registered with the {@code io_uring} instance (see the {@link #IORING_REGISTER_FILES REGISTER_FILES} - * section of the {@link #io_uring_register register} man page). - * - *

      Note that this isn't always available for all commands. If used on a command that doesn't support fixed files, the SQE will error with - * {@code -EBADF}.

      - * - *

      Available since 5.1.

      - *
    • - *
    • {@link #IOSQE_IO_DRAIN IOSQE_IO_DRAIN} - - * When this flag is specified, the SQE will not be started before previously submitted SQEs have completed, and new SQEs will not be started before - * this one completes. - * - *

      Available since 5.2.

      - *
    • - *
    • {@link #IOSQE_IO_LINK IOSQE_IO_LINK} - - * When this flag is specified, it forms a link with the next SQE in the submission ring. - * - *

      That next SQE will not be started before the previous request completes. This, in effect, forms a chain of SQEs, which can be arbitrarily long. The - * tail of the chain is denoted by the first SQE that does not have this flag set. Chains are not supported across submission boundaries. Even if the - * last SQE in a submission has this flag set, it will still terminate the current chain. This flag has no effect on previous SQE submissions, nor - * does it impact SQEs that are outside of the chain tail. This means that multiple chains can be executing in parallel, or chains and individual - * SQEs. Only members inside the chain are serialized. A chain of SQEs will be broken, if any request in that chain ends in error. {@code io_uring} - * considers any unexpected result an error. This means that, eg, a short read will also terminate the remainder of the chain. If a chain of SQE links - * is broken, the remaining unstarted part of the chain will be terminated and completed with {@code -ECANCELED} as the error code.

      - * - *

      Available since 5.3.

      - *
    • - *
    • {@link #IOSQE_IO_HARDLINK IOSQE_IO_HARDLINK} - - * Like {@link #IOSQE_IO_LINK}, but it doesn't sever regardless of the completion result. - * - *

      Note that the link will still sever if we fail submitting the parent request, hard links are only resilient in the presence of completion results - * for requests that did submit correctly. {@code IOSQE_IO_HARDLINK} implies {@code IOSQE_IO_LINK}.

      - * - *

      Available since 5.5.

      - *
    • - *
    • {@link #IOSQE_ASYNC IOSQE_ASYNC} - - * Normal operation for {@code io_uring} is to try and issue an sqe as non-blocking first, and if that fails, execute it in an async manner. - * - *

      To support more efficient overlapped operation of requests that the application knows/assumes will always (or most of the time) block, the - * application can ask for an sqe to be issued async from the start.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IOSQE_BUFFER_SELECT IOSQE_BUFFER_SELECT} - - * Used in conjunction with the {@link #IORING_OP_PROVIDE_BUFFERS OP_PROVIDE_BUFFERS} command, which registers a pool of buffers to be used by commands that read or receive data. - * - *

      When buffers are registered for this use case, and this flag is set in the command, {@code io_uring} will grab a buffer from this pool when the - * request is ready to receive or read data. If successful, the resulting CQE will have {@link #IORING_CQE_F_BUFFER CQE_F_BUFFER} set in the flags part of the struct, and the - * upper {@link #IORING_CQE_BUFFER_SHIFT CQE_BUFFER_SHIFT} bits will contain the ID of the selected buffers. This allows the application to know exactly which buffer was selected for - * the operation. If no buffers are available and this flag is set, then the request will fail with {@code -ENOBUFS} as the error code. Once a buffer - * has been used, it is no longer available in the kernel pool. The application must re-register the given buffer again when it is ready to recycle it - * (eg has completed using it).

      - * - *

      Available since 5.7.

      - *
    • - *
    • {@link #IOSQE_CQE_SKIP_SUCCESS IOSQE_CQE_SKIP_SUCCESS} - - * Don't generate a CQE if the request completes successfully. - * - *

      If the request fails, an appropriate CQE will be posted as usual and if there is no {@link #IOSQE_IO_HARDLINK}, CQEs for all linked requests will be - * omitted. The notion of failure/success is {@code opcode} specific and is the same as with breaking chains of {@link #IOSQE_IO_LINK}. One special case is - * when the request has a linked timeout, then the CQE generation for the linked timeout is decided solely by whether it has - * {@code IOSQE_CQE_SKIP_SUCCESS} set, regardless whether it timed out or was cancelled. In other words, if a linked timeout has the flag set, it's - * guaranteed to not post a CQE.

      - * - *

      The semantics are chosen to accommodate several use cases. First, when all but the last request of a normal link without linked timeouts are marked - * with the flag, only one CQE per link is posted. Additionally, it enables supression of CQEs in cases where the side effects of a successfully - * executed operation is enough for userspace to know the state of the system. One such example would be writing to a synchronisation file.

      - * - *

      This flag is incompatible with {@link #IOSQE_IO_DRAIN}. Using both of them in a single ring is undefined behavior, even when they are not used together in - * a single request. Currently, after the first request with {@code IOSQE_CQE_SKIP_SUCCESS}, all subsequent requests marked with drain will be failed - * at submission time. Note that the error reporting is best effort only, and restrictions may change in the future.

      - * - *

      Available since 5.17.

      - *
    • - *
    - */ - public static final int - IOSQE_FIXED_FILE = 1 << IOSQE_FIXED_FILE_BIT, - IOSQE_IO_DRAIN = 1 << IOSQE_IO_DRAIN_BIT, - IOSQE_IO_LINK = 1 << IOSQE_IO_LINK_BIT, - IOSQE_IO_HARDLINK = 1 << IOSQE_IO_HARDLINK_BIT, - IOSQE_ASYNC = 1 << IOSQE_ASYNC_BIT, - IOSQE_BUFFER_SELECT = 1 << IOSQE_BUFFER_SELECT_BIT, - IOSQE_CQE_SKIP_SUCCESS = 1 << IOSQE_CQE_SKIP_SUCCESS_BIT; - - /** - * {@code io_uring_setup()} flags - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_SETUP_IOPOLL SETUP_IOPOLL} - - * Perform busy-waiting for an I/O completion, as opposed to getting notifications via an asynchronous IRQ (Interrupt Request). - * - *

      The file system (if any) and block device must support polling in order for this to work. Busy-waiting provides lower latency, but may consume more - * CPU resources than interrupt driven I/O. Currently, this feature is usable only on a file descriptor opened using the {@code O_DIRECT} flag. When a - * read or write is submitted to a polled context, the application must poll for completions on the CQ ring by calling {@link #io_uring_enter enter}. It is illegal to mix - * and match polled and non-polled I/O on an io_uring instance.

      - *
    • - *
    • {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL} - - * When this flag is specified, a kernel thread is created to perform submission queue polling. - * - *

      An {@code io_uring} instance configured in this way enables an application to issue I/O without ever context switching into the kernel. By using - * the submission queue to fill in new submission queue entries and watching for completions on the completion queue, the application can submit and - * reap I/Os without doing a single system call.

      - * - *

      If the kernel thread is idle for more than {@code sq_thread_idle} milliseconds, it will set the {@link #IORING_SQ_NEED_WAKEUP SQ_NEED_WAKEUP} bit in the flags field of the - * struct {@code io_sq_ring}. When this happens, the application must call {@link #io_uring_enter enter} to wake the kernel thread. If I/O is kept busy, the kernel thread - * will never sleep. An application making use of this feature will need to guard the {@code io_uring_enter()} call with the following code sequence:

      - * - *
      
      -     * // Ensure that the wakeup flag is read after the tail pointer
      -     * // has been written. It's important to use memory load acquire
      -     * // semantics for the flags read, as otherwise the application
      -     * // and the kernel might not agree on the consistency of the
      -     * // wakeup flag.
      -     * unsigned flags = atomic_load_relaxed(sq_ring->flags);
      -     * if (flags & IORING_SQ_NEED_WAKEUP)
      -     *     io_uring_enter(fd, 0, 0, IORING_ENTER_SQ_WAKEUP);
      - * - *

      where {@code sq_ring} is a submission queue ring setup using the struct {@code io_sqring_offsets} described below.

      - * - *

      Before version 5.11 of the Linux kernel, to successfully use this feature, the application must register a set of files to be used for IO through - * {@link #io_uring_register register} using the {@link #IORING_REGISTER_FILES REGISTER_FILES} opcode. Failure to do so will result in submitted IO being errored with {@code EBADF}. The presence of this - * feature can be detected by the {@link #IORING_FEAT_SQPOLL_NONFIXED FEAT_SQPOLL_NONFIXED} feature flag. In version 5.11 and later, it is no longer necessary to register files to use - * this feature. 5.11 also allows using this as non-root, if the user has the {@code CAP_SYS_NICE} capability.

      - *
    • - *
    • {@link #IORING_SETUP_SQ_AFF SETUP_SQ_AFF} - - * If this flag is specified, then the poll thread will be bound to the cpu set in the {@code sq_thread_cpu} field of the struct - * {@code io_uring_params}. This flag is only meaningful when {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL} is specified. When {@code cgroup} setting {@code cpuset.cpus} changes - * (typically in container environment), the bounded cpu set may be changed as well. - *
    • - *
    • {@link #IORING_SETUP_CQSIZE SETUP_CQSIZE} - - * Create the completion queue with struct {@code io_uring_params.cq_entries} entries. - * - *

      The value must be greater than entries, and may be rounded up to the next power-of-two.

      - *
    • - *
    • {@link #IORING_SETUP_CLAMP SETUP_CLAMP} - - * If this flag is specified, and if entries exceeds {@link #IORING_MAX_ENTRIES MAX_ENTRIES}, then entries will be clamped at {@code IORING_MAX_ENTRIES}. - * - *

      If the flag {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL} is set, and if the value of struct {@code io_uring_params.cq_entries} exceeds {@code IORING_MAX_CQ_ENTRIES}, then it will - * be clamped at {@code IORING_MAX_CQ_ENTRIES}.

      - *
    • - *
    • {@link #IORING_SETUP_ATTACH_WQ SETUP_ATTACH_WQ} - - * This flag should be set in conjunction with struct {@code io_uring_params.wq_fd} being set to an existing {@code io_uring} ring file descriptor. - * - *

      When set, the {@code io_uring} instance being created will share the asynchronous worker thread backend of the specified {@code io_uring} ring, - * rather than create a new separate thread pool.

      - *
    • - *
    • {@link #IORING_SETUP_R_DISABLED SETUP_R_DISABLED} - - * If this flag is specified, the io_uring ring starts in a disabled state. - * - *

      In this state, restrictions can be registered, but submissions are not allowed. See {@link #io_uring_register register} for details on how to enable the ring.

      - * - *

      Available since 5.10.

      - *
    • - *
    • {@link #IORING_SETUP_SUBMIT_ALL SETUP_SUBMIT_ALL} - - * Continue submit on error. - * - *

      Normally io_uring stops submitting a batch of request, if one of these requests results in an error. This can cause submission of less than what is - * expected, if a request ends in error while being submitted. If the ring is created with this flag, {@link #io_uring_enter enter} will continue submitting requests even - * if it encounters an error submitting a request. CQEs are still posted for errored request regardless of whether or not this flag is set at ring - * creation time, the only difference is if the submit sequence is halted or continued when an error is observed.

      - * - *

      Available since 5.18.

      - *
    • - *
    • {@link #IORING_SETUP_COOP_TASKRUN SETUP_COOP_TASKRUN} - - * Cooperative task running. - * - *

      By default, io_uring will interrupt a task running in userspace when a completion event comes in. This is to ensure that completions run in a - * timely manner. For a lot of use cases, this is overkill and can cause reduced performance from both the inter-processor interrupt used to do this, - * the kernel/user transition, the needless interruption of the tasks userspace activities, and reduced batching if completions come in at a rapid - * rate. Most applications don't need the forceful interruption, as the events are processed at any kernel/user transition. The exception are setups - * where the application uses multiple threads operating on the same ring, where the application waiting on completions isn't the one that submitted - * them. For most other use cases, setting this flag will improve performance.

      - * - *

      Available since 5.19.

      - *
    • - *
    • {@link #IORING_SETUP_TASKRUN_FLAG SETUP_TASKRUN_FLAG} - - * Used in conjunction with {@link #IORING_SETUP_COOP_TASKRUN SETUP_COOP_TASKRUN}, this provides a flag, {@link #IORING_SQ_TASKRUN SQ_TASKRUN}, which is set in the SQ ring {@code flags} whenever completions are - * pending that should be processed. liburing will check for this flag even when doing {@link LibURing#io_uring_peek_cqe peek_cqe} and enter the kernel to process them, and - * applications can do the same. This makes {@code IORING_SETUP_TASKRUN_FLAG} safe to use even when applications rely on a peek style operation on the - * CQ ring to see if anything might be pending to reap. - * - *

      Available since 5.19.

      - *
    • - *
    • {@link #IORING_SETUP_SQE128 SETUP_SQE128} - - * If set, io_uring will use 128-byte SQEs rather than the normal 64-byte sized variant. - * - *

      This is a requirement for using certain request types, as of 5.19 only the {@link #IORING_OP_URING_CMD OP_URING_CMD} passthrough command for NVMe passthrough needs this.

      - * - *

      Available since 5.19.

      - *
    • - *
    • {@link #IORING_SETUP_CQE32 SETUP_CQE32} - - * If set, io_uring will use 32-byte CQEs rather than the normal 32-byte sized variant. - * - *

      This is a requirement for using certain request types, as of 5.19 only the {@link #IORING_OP_URING_CMD OP_URING_CMD} passthrough command for NVMe passthrough needs this.

      - * - *

      Available since 5.19.

      - *
    • - *
    • {@link #IORING_SETUP_SINGLE_ISSUER SETUP_SINGLE_ISSUER} - - * A hint to the kernel that only a single task can submit requests, which is used for internal optimisations. - * - *

      The kernel enforces the rule, which only affects {@link #io_uring_enter enter} calls submitting requests and will fail them with {@code -EEXIST} if the restriction is - * violated. The submitter task may differ from the task that created the ring. Note that when {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL} is set it is considered that the polling - * task is doing all submissions on behalf of the userspace and so it always complies with the rule disregarding how many userspace tasks do - * {@code io_uring_enter}.

      - * - *

      Available since 5.20.

      - *
    • - *
    • {@link #IORING_SETUP_DEFER_TASKRUN SETUP_DEFER_TASKRUN} - - * Defer running task work to get events. - * - *

      By default, io_uring will process all outstanding work at the end of any system call or thread interrupt. This can delay the application from - * making other progress. Setting this flag will hint to io_uring that it should defer work until an {@link #io_uring_enter enter} call with the {@link #IORING_ENTER_GETEVENTS ENTER_GETEVENTS} flag set. - * This allows the application to request work to run just before it wants to process completions. This flag requires the {@link #IORING_SETUP_SINGLE_ISSUER SETUP_SINGLE_ISSUER} flag to - * be set, and also enforces that the call to {@code io_uring_enter} is called from the same thread that submitted requests. Note that if this flag is - * set then it is the application's responsibility to periodically trigger work (for example via any of the CQE waiting functions) or else completions - * may not be delivered.

      - * - *

      Available since 6.1.

      - *
    • - *
    - */ - public static final int - IORING_SETUP_IOPOLL = 1 << 0, - IORING_SETUP_SQPOLL = 1 << 1, - IORING_SETUP_SQ_AFF = 1 << 2, - IORING_SETUP_CQSIZE = 1 << 3, - IORING_SETUP_CLAMP = 1 << 4, - IORING_SETUP_ATTACH_WQ = 1 << 5, - IORING_SETUP_R_DISABLED = 1 << 6, - IORING_SETUP_SUBMIT_ALL = 1 << 7, - IORING_SETUP_COOP_TASKRUN = 1 << 8, - IORING_SETUP_TASKRUN_FLAG = 1 << 9, - IORING_SETUP_SQE128 = 1 << 10, - IORING_SETUP_CQE32 = 1 << 11, - IORING_SETUP_SINGLE_ISSUER = 1 << 12, - IORING_SETUP_DEFER_TASKRUN = 1 << 13; - - /** - * {@code io_uring_op} - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_OP_NOP OP_NOP} - Do not perform any I/O. This is useful for testing the performance of the {@code io_uring} implementation itself.
    • - *
    • {@link #IORING_OP_READV OP_READV} - Vectored read operation, similar to {@code preadv2(2)}. If the file is not seekable, {@code off} must be set to zero.
    • - *
    • {@link #IORING_OP_WRITEV OP_WRITEV} - Vectored write operation, similar to {@code pwritev2(2)}. If the file is not seekable, {@code off} must be set to zero.
    • - *
    • {@link #IORING_OP_FSYNC OP_FSYNC} - - * File sync. See also {@code fsync(2)}. - * - *

      Note that, while I/O is initiated in the order in which it appears inthe submission queue, completions are unordered. For example, an application - * which places a write I/O followed by an fsync in the submission queue cannot expect the fsync to apply to the write. The two operations execute in - * parallel, so the fsync may complete before the write is issued to the storage. The same is also true for previously issued writes that have not - * completed prior to the fsync.

      - *
    • - *
    • {@link #IORING_OP_READ_FIXED OP_READ_FIXED} - Read from pre-mapped buffers. See {@link #io_uring_register register} for details on how to setup a context for fixed reads.
    • - *
    • {@link #IORING_OP_WRITE_FIXED OP_WRITE_FIXED} - Write to pre-mapped buffers. See {@link #io_uring_register register} for details on how to setup a context for fixed writes.
    • - *
    • {@link #IORING_OP_POLL_ADD OP_POLL_ADD} - - * Poll the {@code fd} specified in the submission queue entry for the events specified in the {@code poll_events} field. - * - *

      Unlike poll or epoll without {@code EPOLLONESHOT}, by default this interface always works in one shot mode. That is, once the poll operation is - * completed, it will have to be resubmitted.

      - * - *

      If {@link #IORING_POLL_ADD_MULTI POLL_ADD_MULTI} is set in the SQE {@code len} field, then the poll will work in multi shot mode instead. That means it'll repatedly trigger when - * the requested event becomes true, and hence multiple CQEs can be generated from this single SQE. The CQE {@code flags} field will have {@link #IORING_CQE_F_MORE CQE_F_MORE} - * set on completion if the application should expect further CQE entries from the original request. If this flag isn't set on completion, then the - * poll request has been terminated and no further events will be generated. This mode is available since 5.13.

      - * - *

      If {@link #IORING_POLL_UPDATE_EVENTS POLL_UPDATE_EVENTS} is set in the SQE {@code len} field, then the request will update an existing poll request with the mask of events passed in - * with this request. The lookup is based on the {@code user_data} field of the original SQE submitted, and this values is passed in the {@code addr} - * field of the SQE. This mode is available since 5.13.

      - * - *

      If {@link #IORING_POLL_UPDATE_USER_DATA POLL_UPDATE_USER_DATA} is set in the SQE {@code len} field, then the request will update the {@code user_data} of an existing poll request based - * on the value passed in the {@code off} field. This mode is available since 5.13.

      - * - *

      This command works like an {@code asyncpoll(2)} and the completion event result is the returned mask of events. For the variants that update - * {@code user_data} or {@code events}, the completion result will be similar to {@link #IORING_OP_POLL_REMOVE OP_POLL_REMOVE}.

      - *
    • - *
    • {@link #IORING_OP_POLL_REMOVE OP_POLL_REMOVE} - - * Remove an existing poll request. - * - *

      If found, the {@code res} field of the struct {@code io_uring_cqe} will contain 0. If not found, {@code res} will contain {@code -ENOENT}, or - * {@code -EALREADY} if the poll request was in the process of completing already.

      - *
    • - *
    • {@link #IORING_OP_SYNC_FILE_RANGE OP_SYNC_FILE_RANGE} - - * Issue the equivalent of a {@code sync_file_range(2)} on the file descriptor. - * - *

      The {@code fd} field is the file descriptor to sync, the {@code off} field holds the offset in bytes, the {@code len} field holds the length in - * bytes, and the {@code sync_range_flags} field holds the flags for the command. See also {@code sync_file_range(2)} for the general description of - * the related system call.

      - * - *

      Available since 5.2.

      - *
    • - *
    • {@link #IORING_OP_SENDMSG OP_SENDMSG} - - * Issue the equivalent of a {@code sendmsg(2)} system call. - * - *

      {@code fd} must be set to the socket file descriptor, {@code addr} must contain a pointer to the {@code msghdr} structure, and {@code msg_flags} - * holds the flags associated with the system call. See also {@code sendmsg(2)} for the general description of the related system call.

      - * - *

      Available since 5.3.

      - *
    • - *
    • {@link #IORING_OP_RECVMSG OP_RECVMSG} - - * Works just like {@link #IORING_OP_SENDMSG OP_SENDMSG}, except for {@code recvmsg(2)} instead. See the description of {@code IORING_OP_SENDMSG}. - * - *

      Available since 5.3.

      - *
    • - *
    • {@link #IORING_OP_TIMEOUT OP_TIMEOUT} - - * This command will register a timeout operation. - * - *

      The {@code addr} field must contain a pointer to a {@code struct timespec64} structure, {@code len} must contain 1 to signify one - * {@code timespec64} structure, {@code timeout_flags} may contain {@link #IORING_TIMEOUT_ABS TIMEOUT_ABS} for an absolute timeout value, or 0 for a relative timeout. - * {@code off} may contain a completion event count. A timeout will trigger a wakeup event on the completion ring for anyone waiting for events. A - * timeout condition is met when either the specified timeout expires, or the specified number of events have completed. Either condition will trigger - * the event. If set to 0, completed events are not counted, which effectively acts like a timer. {@code io_uring} timeouts use the - * {@code CLOCK_MONOTONIC} clock source. The request will complete with {@code -ETIME} if the timeout got completed through expiration of the timer, - * or 0 if the timeout got completed through requests completing on their own. If the timeout was cancelled before it expired, the request will - * complete with {@code -ECANCELED}.

      - * - *

      Available since 5.4.

      - * - *

      Since 5.15, this command also supports the following modifiers in {@code timeout_flags}:

      - * - *
        - *
      • {@link #IORING_TIMEOUT_BOOTTIME TIMEOUT_BOOTTIME}: If set, then the clock source used is {@code CLOCK_BOOTTIME} instead of {@code CLOCK_MONOTONIC}. This clock source differs - * in that it includes time elapsed if the system was suspend while having a timeout request in-flight.
      • - *
      • {@link #IORING_TIMEOUT_REALTIME TIMEOUT_REALTIME}: If set, then the clock source used is {@code CLOCK_BOOTTIME} instead of {@code CLOCK_MONOTONIC}.
      • - *
      - *
    • - *
    • {@link #IORING_OP_TIMEOUT_REMOVE OP_TIMEOUT_REMOVE} - - * If {@code timeout_flags} are zero, then it attempts to remove an existing timeout operation. {@code addr} must contain the {@code user_data} field - * of the previously issued timeout operation. If the specified timeout request is found and cancelled successfully, this request will terminate with - * a result value of 0. If the timeout request was found but expiration was already in progress, this request will terminate with a result value of - * {@code -EBUSY}. If the timeout request wasn't found, the request will terminate with a result value of {@code -ENOENT}. - * - *

      Available since 5.5.

      - * - *

      If {@code timeout_flags} contain {@link #IORING_TIMEOUT_UPDATE TIMEOUT_UPDATE}, instead of removing an existing operation, it updates it. {@code addr} and return values are same - * as before. {@code addr2} field must contain a pointer to a {@code struct timespec64} structure. {@code timeout_flags} may also contain - * {@link #IORING_TIMEOUT_ABS TIMEOUT_ABS}, in which case the value given is an absolute one, not a relative one.

      - * - *

      Available since 5.11.

      - *
    • - *
    • {@link #IORING_OP_ACCEPT OP_ACCEPT} - - * Issue the equivalent of an {@code accept4(2)} system call. - * - *

      {@code fd} must be set to the socket file descriptor, {@code addr} must contain the pointer to the {@code sockaddr} structure, and {@code addr2} - * must contain a pointer to the {@code socklen_t} {@code addrlen} field. Flags can be passed using the {@code accept_flags} field. See also - * {@code accept4(2)} for the general description of the related system call.

      - * - *

      Available since 5.5.

      - * - *

      If the {@code file_index} field is set to a positive number, the file won't be installed into the normal file table as usual but will be placed - * into the fixed file table at index {@code file_index - 1}. In this case, instead of returning a file descriptor, the result will contain either 0 - * on success or an error. If the index points to a valid empty slot, the installation is guaranteed to not fail. If there is already a file in the - * slot, it will be replaced, similar to {@link #IORING_OP_FILES_UPDATE OP_FILES_UPDATE}. Please note that only {@code io_uring} has access to such files and no other syscall can - * use them. See {@link #IOSQE_FIXED_FILE} and {@link #IORING_REGISTER_FILES REGISTER_FILES}.

      - * - *

      Available since 5.5.

      - *
    • - *
    • {@link #IORING_OP_ASYNC_CANCEL OP_ASYNC_CANCEL} - - * Attempt to cancel an already issued request. - * - *

      {@code addr} must contain the {@code user_data} field of the request that should be cancelled. The cancellation request will complete with one of - * the following results codes. If found, the {@code res} field of the cqe will contain 0. If not found, {@code res} will contain {@code -ENOENT}. If - * found and attempted cancelled, the {@code res} field will contain {@code -EALREADY}. In this case, the request may or may not terminate. In - * general, requests that are interruptible (like socket IO) will get cancelled, while disk IO requests cannot be cancelled if already started.

      - * - *

      Available since 5.5.

      - *
    • - *
    • {@link #IORING_OP_LINK_TIMEOUT OP_LINK_TIMEOUT} - - * This request must be linked with another request through {@link #IOSQE_IO_LINK} which is described below. - * - *

      Unlike {@link #IORING_OP_TIMEOUT OP_TIMEOUT}, {@code IORING_OP_LINK_TIMEOUT} acts on the linked request, not the completion queue. The format of the command is otherwise - * like {@code IORING_OP_TIMEOUT}, except there's no completion event count as it's tied to a specific request. If used, the timeout specified in the - * command will cancel the linked command, unless the linked command completes before the timeout. The timeout will complete with {@code -ETIME} if - * the timer expired and the linked request was attempted cancelled, or {@code -ECANCELED} if the timer got cancelled because of completion of the - * linked request. Like {@code IORING_OP_TIMEOUT} the clock source used is {@code CLOCK_MONOTONIC}.

      - * - *

      Available since 5.5.

      - *
    • - *
    • {@link #IORING_OP_CONNECT OP_CONNECT} - - * Issue the equivalent of a {@code connect(2)} system call. - * - *

      {@code fd} must be set to the socket file descriptor, {@code addr} must contain the const pointer to the {@code sockaddr} structure, and - * {@code off} must contain the {@code socklen_t} {@code addrlen} field. See also {@code connect(2)} for the general description of the related system - * call.

      - * - *

      Available since 5.5.

      - *
    • - *
    • {@link #IORING_OP_FALLOCATE OP_FALLOCATE} - - * Issue the equivalent of a {@code fallocate(2)} system call. - * - *

      {@code fd} must be set to the file descriptor, {@code len} must contain the mode associated with the operation, {@code off} must contain the offset - * on which to operate, and {@code addr} must contain the length. See also {@code fallocate(2)} for the general description of the related system - * call.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_OPENAT OP_OPENAT} - - * Issue the equivalent of a {@code openat(2)} system call. - * - *

      {@code fd} is the {@code dirfd} argument, {@code addr} must contain a pointer to the {@code *pathname} argument, {@code open_flags} should contain - * any flags passed in, and {@code len} is access mode of the file. See also {@code openat(2)} for the general description of the related system call.

      - * - *

      Available since 5.6.

      - * - *

      If the {@code file_index} field is set to a positive number, the file won't be installed into the normal file table as usual but will be placed - * into the fixed file table at index {@code file_index - 1}. In this case, instead of returning a file descriptor, the result will contain either 0 - * on success or an error. If there is already a file registered at this index, the request will fail with {@code -EBADF}. Only {@code io_uring} has - * access to such files and no other syscall can use them. See {@link #IOSQE_FIXED_FILE} and {@link #IORING_REGISTER_FILES REGISTER_FILES}.

      - * - *

      Available since 5.15.

      - *
    • - *
    • {@link #IORING_OP_CLOSE OP_CLOSE} - - * Issue the equivalent of a {@code close(2)} system call. - * - *

      {@code fd} is the file descriptor to be closed. See also {@code close(2)} for the general description of the related system call.

      - * - *

      Available since 5.6.

      - * - *

      If the {@code file_index} field is set to a positive number, this command can be used to close files that were direct opened through {@link #IORING_OP_OPENAT OP_OPENAT}, - * {@link #IORING_OP_OPENAT2 OP_OPENAT2}, or {@link #IORING_OP_ACCEPT OP_ACCEPT} using the {@code io_uring} specific direct descriptors. Note that only one of the descriptor fields may be set. The - * direct close feature is available since the 5.15 kernel, where direct descriptors were introduced.

      - *
    • - *
    • {@link #IORING_OP_FILES_UPDATE OP_FILES_UPDATE} - - * This command is an alternative to using {@link #IORING_REGISTER_FILES_UPDATE REGISTER_FILES_UPDATE} which then works in an async fashion, like the rest of the {@code io_uring} - * commands. - * - *

      The arguments passed in are the same. {@code addr} must contain a pointer to the array of file descriptors, {@code len} must contain the length of - * the array, and {@code off} must contain the offset at which to operate. Note that the array of file descriptors pointed to in {@code addr} must - * remain valid until this operation has completed.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_STATX OP_STATX} - - * Issue the equivalent of a {@code statx(2)} system call. - * - *

      {@code fd} is the {@code dirfd} argument, {@code addr} must contain a pointer to the {@code *pathname} string, {@code statx_flags} is the - * {@code flags} argument, {@code len} should be the {@code mask} argument, and {@code off} must contain a pointer to the {@code statxbuf} to be - * filled in. See also {@code statx(2)} for the general description of the related system call.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_READ OP_READ} - - * Issue the equivalent of a {@code pread(2)} or {@code pwrite(2)} system call. - * - *

      {@code fd} is the file descriptor to be operated on, {@code addr} contains the buffer in question, {@code len} contains the length of the IO - * operation, and {@code offs} contains the read or write offset. If {@code fd} does not refer to a seekable file, {@code off} must be set to zero. - * If {@code offs} is set to -1, the offset will use (and advance) the file position, like the {@code read(2)} and {@code write(2)} system calls. - * These are non-vectored versions of the {@link #IORING_OP_READV OP_READV} and {@link #IORING_OP_WRITEV OP_WRITEV} opcodes. See also {@code read(2)} and {@code write(2)} for the general description - * of the related system call.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_WRITE OP_WRITE} - See {@link #IORING_OP_READ OP_READ}.
    • - *
    • {@link #IORING_OP_FADVISE OP_FADVISE} - - * Issue the equivalent of a {@code posix_fadvise(2)} system call. - * - *

      {@code fd} must be set to the file descriptor, {@code off} must contain the offset on which to operate, {@code len} must contain the length, and - * {@code fadvise_advice} must contain the advice associated with the operation. See also {@code posix_fadvise(2)} for the general description of the - * related system call.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_MADVISE OP_MADVISE} - - * Issue the equivalent of a {@code madvise(2)} system call. - * - *

      {@code addr} must contain the address to operate on, {@code len} must contain the length on which to operate, and {@code fadvise_advice} must - * contain the advice associated with the operation. See also {@code madvise(2)} for the general description of the related system call.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_SEND OP_SEND} - - * Issue the equivalent of a {@code send(2)} system call. - * - *

      {@code fd} must be set to the socket file descriptor, {@code addr} must contain a pointer to the buffer, {@code len} denotes the length of the - * buffer to send, and {@code msg_flags} holds the flags associated with the system call. See also {@code send(2)} for the general description of the - * related system call.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_RECV OP_RECV} - - * Works just like {@link #IORING_OP_SEND OP_SEND}, except for {@code recv(2)} instead. See the description of {@code IORING_OP_SEND}. - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_OPENAT2 OP_OPENAT2} - - * Issue the equivalent of a {@code openat2(2)} system call. - * - *

      {@code fd} is the {@code dirfd} argument, {@code addr} must contain a pointer to the {@code *pathname} argument, {@code len} should contain the - * size of the {@code open_how} structure, and {@code off} should be set to the address of the {@code open_how} structure. See also {@code openat2(2)} - * for the general description of the related system call.

      - * - *

      Available since 5.6.

      - * - *

      If the {@code file_index} field is set to a positive number, the file won't be installed into the normal file table as usual but will be placed - * into the fixed file table at index {@code file_index - 1}. In this case, instead of returning a file descriptor, the result will contain either 0 - * on success or an error. If there is already a file registered at this index, the request will fail with {@code -EBADF}. Only {@code io_uring} has - * access to such files and no other syscall can use them. See {@link #IOSQE_FIXED_FILE} and {@link #IORING_REGISTER_FILES REGISTER_FILES}.

      - * - *

      Available since 5.15.

      - *
    • - *
    • {@link #IORING_OP_EPOLL_CTL OP_EPOLL_CTL} - - * Add, remove or modify entries in the interest list of {@code epoll(7)}. See {@code epoll_ctl(2)} for details of the system call. - * - *

      {@code fd} holds the file descriptor that represents the epoll instance, {@code addr} holds the file descriptor to add, remove or modify, - * {@code len} holds the operation ({@code EPOLL_CTL_ADD}, {@code EPOLL_CTL_DEL}, {@code EPOLL_CTL_MOD}) to perform and, {@code off} holds a pointer - * to the {@code epoll_events} structure.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_OP_SPLICE OP_SPLICE} - - * Issue the equivalent of a {@code splice(2)} system call. - * - *

      {@code splice_fd_in} is the file descriptor to read from, {@code splice_off_in} is an offset to read from, {@code fd} is the file descriptor to - * write to, {@code off} is an offset from which to start writing to. A sentinel value of -1 is used to pass the equivalent of a {@code NULL} for the offsets - * to {@code splice(2)}. {@code len} contains the number of bytes to copy. {@code splice_flags} contains a bit mask for the flag field associated with - * the system call. Please note that one of the file descriptors must refer to a pipe. See also {@code splice(2)} for the general description of the - * related system call.

      - * - *

      Available since 5.7.

      - *
    • - *
    • {@link #IORING_OP_PROVIDE_BUFFERS OP_PROVIDE_BUFFERS} - - * This command allows an application to register a group of buffers to be used by commands that read/receive data. - * - *

      Using buffers in this manner can eliminate the need to separate the poll + read, which provides a convenient point in time to allocate a buffer for - * a given request. It's often infeasible to have as many buffers available as pending reads or receive. With this feature, the application can have - * its pool of buffers ready in the kernel, and when the file or socket is ready to read/receive data, a buffer can be selected for the operation.

      - * - *

      {@code fd} must contain the number of buffers to provide, {@code addr} must contain the starting address to add buffers from, {@code len} must - * contain the length of each buffer to add from the range, {@code buf_group} must contain the group ID of this range of buffers, and {@code off} must - * contain the starting buffer ID of this range of buffers. With that set, the kernel adds buffers starting with the memory address in {@code addr}, - * each with a length of {@code len}. Hence the application should provide {@code len * fd} worth of memory in {@code addr}. Buffers are grouped by - * the group ID, and each buffer within this group will be identical in size according to the above arguments. This allows the application to provide - * different groups of buffers, and this is often used to have differently sized buffers available depending on what the expectations are of the - * individual request. When submitting a request that should use a provided buffer, the {@link #IOSQE_BUFFER_SELECT} flag must be set, and {@code buf_group} - * must be set to the desired buffer group ID where the buffer should be selected from.

      - * - *

      Available since 5.7.

      - *
    • - *
    • {@link #IORING_OP_REMOVE_BUFFERS OP_REMOVE_BUFFERS} - - * Remove buffers previously registered with {@link #IORING_OP_PROVIDE_BUFFERS OP_PROVIDE_BUFFERS}. - * - *

      {@code fd} must contain the number of buffers to remove, and {@code buf_group} must contain the buffer group ID from which to remove the buffers.

      - * - *

      Available since 5.7.

      - *
    • - *
    • {@link #IORING_OP_TEE OP_TEE} - - * Issue the equivalent of a {@code tee(2)} system call. - * - *

      {@code splice_fd_in} is the file descriptor to read from, {@code fd} is the file descriptor to write to, {@code len} contains the number of bytes - * to copy, and {@code splice_flags} contains a bit mask for the flag field associated with the system call. Please note that both of the file - * descriptors must refer to a pipe. See also {@code tee(2)} for the general description of the related system call.

      - * - *

      Available since 5.8.

      - *
    • - *
    • {@link #IORING_OP_SHUTDOWN OP_SHUTDOWN} - - * Issue the equivalent of a {@code shutdown(2)} system call. - * - *

      {@code fd} is the file descriptor to the socket being shutdown and {@code len} must be set to the {@code how} argument. No other fields should be - * set.

      - * - *

      Available since 5.11.

      - *
    • - *
    • {@link #IORING_OP_RENAMEAT OP_RENAMEAT} - - * Issue the equivalent of a {@code renameat2(2)} system call. - * - *

      {@code fd} should be set to the {@code olddirfd}, {@code addr} should be set to the {@code oldpath}, {@code len} should be set to the - * {@code newdirfd}, {@code addr} should be set to the {@code oldpath}, {@code addr2} should be set to the {@code newpath}, and finally - * {@code rename_flags} should be set to the {@code flags} passed in to {@code renameat2(2)}.

      - * - *

      Available since 5.11.

      - *
    • - *
    • {@link #IORING_OP_UNLINKAT OP_UNLINKAT} - - * Issue the equivalent of a {@code unlinkat2(2)} system call. - * - *

      {@code fd} should be set to the {@code dirfd}, {@code addr} should be set to the {@code pathname}, and {@code unlink_flags} should be set to the - * {@code flags} being passed in to {@code unlinkat(2)}.

      - * - *

      Available since 5.11.

      - *
    • - *
    • {@link #IORING_OP_MKDIRAT OP_MKDIRAT} - - * Issue the equivalent of a {@code mkdirat2(2)} system call. - * - *

      {@code fd} should be set to the {@code dirfd}, {@code addr} should be set to the {@code pathname}, and {@code len} should be set to the - * {@code mode} being passed in to {@code mkdirat(2)}.

      - * - *

      Available since 5.15.

      - *
    • - *
    • {@link #IORING_OP_SYMLINKAT OP_SYMLINKAT} - - * Issue the equivalent of a {@code symlinkat2(2)} system call. - * - *

      {@code fd} should be set to the {@code newdirfd}, {@code addr} should be set to the {@code target} and {@code addr2} should be set to the - * {@code linkpath} being passed in to {@code symlinkat(2)}.

      - * - *

      Available since 5.15.

      - *
    • - *
    • {@link #IORING_OP_LINKAT OP_LINKAT} - - * Issue the equivalent of a {@code linkat2(2)} system call. - * - *

      {@code fd} should be set to the {@code olddirfd}, {@code addr} should be set to the {@code oldpath}, {@code len} should be set to the - * {@code newdirfd}, {@code addr2} should be set to the {@code newpath}, and {@code hardlink_flags} should be set to the {@code flags} being passed in - * {@code tolinkat(2)}.

      - * - *

      Available since 5.15.

      - *
    • - *
    • {@link #IORING_OP_MSG_RING OP_MSG_RING} - - * Send a message to an io_uring. - * - *

      {@code fd} must be set to a file descriptor of a ring that the application has access to, {@code len} can be set to any 32-bit value that the - * application wishes to pass on, and {@code off} should be set any 64-bit value that the application wishes to send. On the target ring, a CQE will - * be posted with the {@code res} field matching the {@code len} set, and a {@code user_data} field matching the {@code off} value being passed in. - * This request type can be used to either just wake or interrupt anyone waiting for completions on the target ring, or it can be used to pass - * messages via the two fields.

      - * - *

      Available since 5.18.

      - *
    • - *
    • {@link #IORING_OP_FSETXATTR OP_FSETXATTR}
    • - *
    • {@link #IORING_OP_SETXATTR OP_SETXATTR}
    • - *
    • {@link #IORING_OP_FGETXATTR OP_FGETXATTR}
    • - *
    • {@link #IORING_OP_GETXATTR OP_GETXATTR}
    • - *
    • {@link #IORING_OP_SOCKET OP_SOCKET}
    • - *
    • {@link #IORING_OP_URING_CMD OP_URING_CMD}
    • - *
    • {@link #IORING_OP_SEND_ZC OP_SEND_ZC} - - * Issue the zerocopy equivalent of a {@code send(2)} system call. - * - *

      Similar to {@link #IORING_OP_SEND OP_SEND}, but tries to avoid making intermediate copies of data. Zerocopy execution is not guaranteed and it may fall back to copying.

      - * - *

      The {@code flags} field of the first {@code "struct io_uring_cqe"} may likely contain {@link #IORING_CQE_F_MORE CQE_F_MORE}, which means that there will be a second - * completion event / notification for the request, with the {@code user_data} field set to the same value. The user must not modify the data buffer - * until the notification is posted. The first cqe follows the usual rules and so its {@code res} field will contain the number of bytes sent or a - * negative error code. The notification's {@code res} field will be set to zero and the {@code flags} field will contain {@link #IORING_CQE_F_NOTIF CQE_F_NOTIF}. The two step - * model is needed because the kernel may hold on to buffers for a long time, e.g. waiting for a TCP ACK, and having a separate cqe for request - * completions allows userspace to push more data without extra delays. Note, notifications are only responsible for controlling the lifetime of the - * buffers, and as such don't mean anything about whether the data has atually been sent out or received by the other end.

      - * - *

      {@code fd} must be set to the socket file descriptor, {@code addr} must contain a pointer to the buffer, {@code len} denotes the length of the - * buffer to send, and {@code msg_flags} holds the flags associated with the system call. When {@code addr2} is non-zero it points to the address of - * the target with {@code addr_len} specifying its size, turning the request into a {@code sendto(2)} system call equivalent.

      - * - *

      Available since 6.0.

      - *
    • - *
    • {@link #IORING_OP_SENDMSG_ZC OP_SENDMSG_ZC}
    • - *
    • {@link #IORING_OP_LAST OP_LAST}
    • - *
    - */ - public static final byte - IORING_OP_NOP = 0, - IORING_OP_READV = 1, - IORING_OP_WRITEV = 2, - IORING_OP_FSYNC = 3, - IORING_OP_READ_FIXED = 4, - IORING_OP_WRITE_FIXED = 5, - IORING_OP_POLL_ADD = 6, - IORING_OP_POLL_REMOVE = 7, - IORING_OP_SYNC_FILE_RANGE = 8, - IORING_OP_SENDMSG = 9, - IORING_OP_RECVMSG = 10, - IORING_OP_TIMEOUT = 11, - IORING_OP_TIMEOUT_REMOVE = 12, - IORING_OP_ACCEPT = 13, - IORING_OP_ASYNC_CANCEL = 14, - IORING_OP_LINK_TIMEOUT = 15, - IORING_OP_CONNECT = 16, - IORING_OP_FALLOCATE = 17, - IORING_OP_OPENAT = 18, - IORING_OP_CLOSE = 19, - IORING_OP_FILES_UPDATE = 20, - IORING_OP_STATX = 21, - IORING_OP_READ = 22, - IORING_OP_WRITE = 23, - IORING_OP_FADVISE = 24, - IORING_OP_MADVISE = 25, - IORING_OP_SEND = 26, - IORING_OP_RECV = 27, - IORING_OP_OPENAT2 = 28, - IORING_OP_EPOLL_CTL = 29, - IORING_OP_SPLICE = 30, - IORING_OP_PROVIDE_BUFFERS = 31, - IORING_OP_REMOVE_BUFFERS = 32, - IORING_OP_TEE = 33, - IORING_OP_SHUTDOWN = 34, - IORING_OP_RENAMEAT = 35, - IORING_OP_UNLINKAT = 36, - IORING_OP_MKDIRAT = 37, - IORING_OP_SYMLINKAT = 38, - IORING_OP_LINKAT = 39, - IORING_OP_MSG_RING = 40, - IORING_OP_FSETXATTR = 41, - IORING_OP_SETXATTR = 42, - IORING_OP_FGETXATTR = 43, - IORING_OP_GETXATTR = 44, - IORING_OP_SOCKET = 45, - IORING_OP_URING_CMD = 46, - IORING_OP_SEND_ZC = 47, - IORING_OP_SENDMSG_ZC = 48, - IORING_OP_LAST = 49; - - public static final int IORING_URING_CMD_FIXED = 1 << 0; - - /** {@code sqe->fsync_flags} */ - public static final int IORING_FSYNC_DATASYNC = 1 << 0; - - /** - * {@code sqe->timeout_flags} - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_TIMEOUT_ABS TIMEOUT_ABS}
    • - *
    • {@link #IORING_TIMEOUT_UPDATE TIMEOUT_UPDATE}
    • - *
    • {@link #IORING_TIMEOUT_BOOTTIME TIMEOUT_BOOTTIME}
    • - *
    • {@link #IORING_TIMEOUT_REALTIME TIMEOUT_REALTIME}
    • - *
    • {@link #IORING_LINK_TIMEOUT_UPDATE LINK_TIMEOUT_UPDATE}
    • - *
    • {@link #IORING_TIMEOUT_ETIME_SUCCESS TIMEOUT_ETIME_SUCCESS}
    • - *
    • {@link #IORING_TIMEOUT_MULTISHOT TIMEOUT_MULTISHOT}
    • - *
    • {@link #IORING_TIMEOUT_CLOCK_MASK TIMEOUT_CLOCK_MASK}
    • - *
    • {@link #IORING_TIMEOUT_UPDATE_MASK TIMEOUT_UPDATE_MASK}
    • - *
    - */ - public static final int - IORING_TIMEOUT_ABS = 1 << 0, - IORING_TIMEOUT_UPDATE = 1 << 1, - IORING_TIMEOUT_BOOTTIME = 1 << 2, - IORING_TIMEOUT_REALTIME = 1 << 3, - IORING_LINK_TIMEOUT_UPDATE = 1 << 4, - IORING_TIMEOUT_ETIME_SUCCESS = 1 << 5, - IORING_TIMEOUT_MULTISHOT = 1 << 6, - IORING_TIMEOUT_CLOCK_MASK = IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME, - IORING_TIMEOUT_UPDATE_MASK = IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE; - - /** {@code sqe->splice_flags}, extends {@code splice(2)} flags */ - public static final int IORING_SPLICE_F_FD_IN_FIXED = 1 << 31; - - /** - * {@code POLL_ADD} flags. Note that since {@code sqe->poll_events} is the flag space, the command flags for {@code POLL_ADD} are stored in - * {@code sqe->len}. - * - *

    {@code IORING_POLL_UPDATE}: Update existing poll request, matching {@code sqe->addr} as the old {@code user_data} field.

    - * - *

    {@code IORING_POLL_LEVEL}: Level triggered poll.

    - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_POLL_ADD_MULTI POLL_ADD_MULTI} - Multishot poll. Sets {@code IORING_CQE_F_MORE} if the poll handler will continue to report CQEs on behalf of the same SQE.
    • - *
    • {@link #IORING_POLL_UPDATE_EVENTS POLL_UPDATE_EVENTS}
    • - *
    • {@link #IORING_POLL_UPDATE_USER_DATA POLL_UPDATE_USER_DATA}
    • - *
    • {@link #IORING_POLL_ADD_LEVEL POLL_ADD_LEVEL}
    • - *
    - */ - public static final int - IORING_POLL_ADD_MULTI = 1 << 0, - IORING_POLL_UPDATE_EVENTS = 1 << 1, - IORING_POLL_UPDATE_USER_DATA = 1 << 2, - IORING_POLL_ADD_LEVEL = 1 << 3; - - /** - * {@code ASYNC_CANCEL} flags. - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_ASYNC_CANCEL_ALL ASYNC_CANCEL_ALL} - - * Cancel all requests that match the given criteria, rather than just canceling the first one found. - * - *

      Available since 5.19.

      - *
    • - *
    • {@link #IORING_ASYNC_CANCEL_FD ASYNC_CANCEL_FD} - - * Match based on the file descriptor used in the original request rather than the {@code user_data}. - * - *

      This is what {@link LibURing#io_uring_prep_cancel_fd prep_cancel_fd} sets up.

      - * - *

      Available since 5.19.

      - *
    • - *
    • {@link #IORING_ASYNC_CANCEL_ANY ASYNC_CANCEL_ANY} - - * Match any request in the ring, regardless of {@code user_data} or file descriptor. - * - *

      Can be used to cancel any pending request in the ring.

      - * - *

      Available since 5.19.

      - *
    • - *
    • {@link #IORING_ASYNC_CANCEL_FD_FIXED ASYNC_CANCEL_FD_FIXED} - {@code fd} passed in is a fixed descriptor
    • - *
    - */ - public static final int - IORING_ASYNC_CANCEL_ALL = 1 << 0, - IORING_ASYNC_CANCEL_FD = 1 << 1, - IORING_ASYNC_CANCEL_ANY = 1 << 2, - IORING_ASYNC_CANCEL_FD_FIXED = 1 << 3; - - /** - * {@code send/sendmsg} and {@code recv/recvmsg} flags ({@code sqe->ioprio}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_RECVSEND_POLL_FIRST RECVSEND_POLL_FIRST} - - * If set, io_uring will assume the socket is currently empty and attempting to receive data will be unsuccessful. - * - *

      For this case, io_uring will arm internal poll and trigger a receive of the data when the socket has data to be read. This initial receive attempt - * can be wasteful for the case where the socket is expected to be empty, setting this flag will bypass the initial receive attempt and go straight to - * arming poll. If poll does indicate that data is ready to be received, the operation will proceed.

      - * - *

      Can be used with the CQE {@link #IORING_CQE_F_SOCK_NONEMPTY CQE_F_SOCK_NONEMPTY} flag, which io_uring will set on CQEs after a {@code recv(2)} or {@code recvmsg(2)} operation. If - * set, the socket still had data to be read after the operation completed.

      - * - *

      Both these flags are available since 5.19.

      - *
    • - *
    • {@link #IORING_RECV_MULTISHOT RECV_MULTISHOT} - - * Multishot {@code recv}. - * - *

      Sets {@link #IORING_CQE_F_MORE CQE_F_MORE} if the handler will continue to report CQEs on behalf of the same SQE.

      - *
    • - *
    • {@link #IORING_RECVSEND_FIXED_BUF RECVSEND_FIXED_BUF} - Use registered buffers, the index is stored in the {@code buf_index} field.
    • - *
    • {@link #IORING_SEND_ZC_REPORT_USAGE SEND_ZC_REPORT_USAGE}
    • - *
    - */ - public static final int - IORING_RECVSEND_POLL_FIRST = 1 << 0, - IORING_RECV_MULTISHOT = 1 << 1, - IORING_RECVSEND_FIXED_BUF = 1 << 2, - IORING_SEND_ZC_REPORT_USAGE = 1 << 3; - - public static final int IORING_NOTIF_USAGE_ZC_COPIED = 1 << 31; - - /** Accept flags stored in {@code sqe->ioprio} */ - public static final int IORING_ACCEPT_MULTISHOT = 1 << 0; - - /** - * {@link #IORING_OP_MSG_RING OP_MSG_RING} command types, stored in {@code sqe->addr} - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_MSG_DATA MSG_DATA} - pass {@code sqe->len} as {@code res} and {@code off} as {@code user_data}
    • - *
    • {@link #IORING_MSG_SEND_FD MSG_SEND_FD} - send a registered fd to another ring
    • - *
    - */ - public static final int - IORING_MSG_DATA = 0, - IORING_MSG_SEND_FD = 1; - - /** - * {@link #IORING_OP_MSG_RING OP_MSG_RING} flags ({@code sqe->msg_ring_flags}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_MSG_RING_CQE_SKIP MSG_RING_CQE_SKIP} - Don't post a CQE to the target ring. Not applicable for {@link #IORING_MSG_DATA MSG_DATA}, obviously.
    • - *
    • {@link #IORING_MSG_RING_FLAGS_PASS MSG_RING_FLAGS_PASS}
    • - *
    - */ - public static final int - IORING_MSG_RING_CQE_SKIP = 1 << 0, - IORING_MSG_RING_FLAGS_PASS = 1 << 1; - - /** - * {@code cqe->flags} - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_CQE_F_BUFFER CQE_F_BUFFER} - If set, the upper 16 bits are the buffer ID
    • - *
    • {@link #IORING_CQE_F_MORE CQE_F_MORE} - If set, parent SQE will generate more CQE entries
    • - *
    • {@link #IORING_CQE_F_SOCK_NONEMPTY CQE_F_SOCK_NONEMPTY} - If set, more data to read after socket {@code recv}.
    • - *
    • {@link #IORING_CQE_F_NOTIF CQE_F_NOTIF} - Set for notification CQEs. Can be used to distinct them from sends.
    • - *
    - */ - public static final int - IORING_CQE_F_BUFFER = 1 << 0, - IORING_CQE_F_MORE = 1 << 1, - IORING_CQE_F_SOCK_NONEMPTY = 1 << 2, - IORING_CQE_F_NOTIF = 1 << 3; - - public static final int IORING_CQE_BUFFER_SHIFT = 16; - - /** Magic offsets for the application to {@code mmap} the data it needs */ - public static final long - IORING_OFF_SQ_RING = 0L, - IORING_OFF_CQ_RING = 0x8000000L, - IORING_OFF_SQES = 0x10000000L, - IORING_OFF_PBUF_RING = 0x80000000L, - IORING_OFF_PBUF_SHIFT = 16, - IORING_OFF_MMAP_MASK = 0xf8000000L; - - /** - * {@code sq_ring->flags} - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_SQ_NEED_WAKEUP SQ_NEED_WAKEUP} - needs {@code io_uring_enter} wakeup
    • - *
    • {@link #IORING_SQ_CQ_OVERFLOW SQ_CQ_OVERFLOW} - CQ ring is overflown
    • - *
    • {@link #IORING_SQ_TASKRUN SQ_TASKRUN} - task should enter the kernel
    • - *
    - */ - public static final int - IORING_SQ_NEED_WAKEUP = 1 << 0, - IORING_SQ_CQ_OVERFLOW = 1 << 1, - IORING_SQ_TASKRUN = 1 << 2; - - /** - * {@code cq_ring->flags} - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_CQ_EVENTFD_DISABLED CQ_EVENTFD_DISABLED} - disable {@code eventfd} notifications
    • - *
    - */ - public static final int IORING_CQ_EVENTFD_DISABLED = 1 << 0; - - /** - * {@code io_uring_enter(2)} flags - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_ENTER_GETEVENTS ENTER_GETEVENTS} - - * If this flag is set, then the system call will wait for the specificied number of events in {@code min_complete} before returning. - * - *

      This flag can be set along with {@code to_submit} to both submit and complete events in a single system call.

      - *
    • - *
    • {@link #IORING_ENTER_SQ_WAKEUP ENTER_SQ_WAKEUP} - If the ring has been created with {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL}, then this flag asks the kernel to wakeup the SQ kernel thread to submit IO.
    • - *
    • {@link #IORING_ENTER_SQ_WAIT ENTER_SQ_WAIT} - - * If the ring has been created with {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL}, then the application has no real insight into when the SQ kernel thread has consumed entries from - * the SQ ring. This can lead to a situation where the application can no longer get a free SQE entry to submit, without knowing when it one becomes - * available as the SQ kernel thread consumes them. If the system call is used with this flag set, then it will wait until at least one entry is free - * in the SQ ring. - *
    • - *
    • {@link #IORING_ENTER_EXT_ARG ENTER_EXT_ARG} - - * Since kernel 5.11, the system calls arguments have been modified to look like the following: - * - *
      
      -     * int io_uring_enter(unsigned int fd, unsigned int to_submit,
      -     *                    unsigned int min_complete, unsigned int flags,
      -     *                    const void *arg, size_t argsz);
      - * - *

      which is behaves just like the original definition by default. However, if {@code IORING_ENTER_EXT_ARG} is set, then instead of a {@code sigset_t} - * being passed in, a pointer to a struct {@code io_uring_getevents_arg} is used instead and {@code argsz} must be set to the size of this structure.

      - * - *

      The definition is {@link IOURingGeteventsArg} which allows passing in both a signal mask as well as pointer to a struct {@code __kernel_timespec} timeout - * value. If {@code ts} is set to a valid pointer, then this time value indicates the timeout for waiting on events. If an application is waiting on - * events and wishes to stop waiting after a specified amount of time, then this can be accomplished directly in version 5.11 and newer by using this - * feature.

      - *
    • - *
    • {@link #IORING_ENTER_REGISTERED_RING ENTER_REGISTERED_RING} - - * If the ring file descriptor has been registered through use of {@link #IORING_REGISTER_RING_FDS REGISTER_RING_FDS}, then setting this flag will tell the kernel that the - * {@code ring_fd} passed in is the registered ring offset rather than a normal file descriptor. - *
    • - *
    - */ - public static final int - IORING_ENTER_GETEVENTS = 1 << 0, - IORING_ENTER_SQ_WAKEUP = 1 << 1, - IORING_ENTER_SQ_WAIT = 1 << 2, - IORING_ENTER_EXT_ARG = 1 << 3, - IORING_ENTER_REGISTERED_RING = 1 << 4; - - /** - * {@code io_uring_params->features} flags - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_FEAT_SINGLE_MMAP FEAT_SINGLE_MMAP} - - * If this flag is set, the two SQ and CQ rings can be mapped with a single {@code mmap(2)} call. - * - *

      The SQEs must still be allocated separately. This brings the necessary {@code mmap(2)} calls down from three to two.

      - * - *

      Available since kernel 5.4.

      - *
    • - *
    • {@link #IORING_FEAT_NODROP FEAT_NODROP} - - * If this flag is set, {@code io_uring} supports never dropping completion events. - * - *

      If a completion event occurs and the CQ ring is full, the kernel stores the event internally until such a time that the CQ ring has room for more - * entries. If this overflow condition is entered, attempting to submit more IO will fail with the {@code -EBUSY} error value, if it can't flush the - * overflown events to the CQ ring. If this happens, the application must reap events from the CQ ring and attempt the submit again.

      - * - *

      Available since kernel 5.5.

      - *
    • - *
    • {@link #IORING_FEAT_SUBMIT_STABLE FEAT_SUBMIT_STABLE} - - * If this flag is set, applications can be certain that any data for async offload has been consumed when the kernel has consumed the SQE. - * - *

      Available since kernel 5.5.

      - *
    • - *
    • {@link #IORING_FEAT_RW_CUR_POS FEAT_RW_CUR_POS} - - * If this flag is set, applications can specify {@code offset == -1} with {@code IORING_OP_{READV,WRITEV}}, {@code IORING_OP_{READ,WRITE}_FIXED}, and - * {@code IORING_OP_{READ,WRITE}} to mean current file position, which behaves like {@code preadv2(2)} and {@code pwritev2(2)} with - * {@code offset == -1}. - * - *

      It'll use (and update) the current file position. This obviously comes with the caveat that if the application has multiple reads or writes in - * flight, then the end result will not be as expected. This is similar to threads sharing a file descriptor and doing IO using the current file - * position.

      - * - *

      Available since kernel 5.6.

      - *
    • - *
    • {@link #IORING_FEAT_CUR_PERSONALITY FEAT_CUR_PERSONALITY} - - * If this flag is set, then {@code io_uring} guarantees that both sync and async execution of a request assumes the credentials of the task that - * called {@link #io_uring_enter enter} to queue the requests. - * - *

      If this flag isn't set, then requests are issued with the credentials of the task that originally registered the {@code io_uring}. If only one task - * is using a ring, then this flag doesn't matter as the credentials will always be the same. Note that this is the default behavior, tasks can still - * register different personalities through {@link #io_uring_register register} with {@link #IORING_REGISTER_PERSONALITY REGISTER_PERSONALITY} and specify the personality to use in the sqe.

      - * - *

      Available since kernel 5.6.

      - *
    • - *
    • {@link #IORING_FEAT_FAST_POLL FEAT_FAST_POLL} - - * If this flag is set, then {@code io_uring} supports using an internal poll mechanism to drive data/space readiness. - * - *

      This means that requests that cannot read or write data to a file no longer need to be punted to an async thread for handling, instead they will - * begin operation when the file is ready. This is similar to doing poll + read/write in userspace, but eliminates the need to do so. If this flag is - * set, requests waiting on space/data consume a lot less resources doing so as they are not blocking a thread.

      - * - *

      Available since kernel 5.7.

      - *
    • - *
    • {@link #IORING_FEAT_POLL_32BITS FEAT_POLL_32BITS} - - * If this flag is set, the {@link #IORING_OP_POLL_ADD OP_POLL_ADD} command accepts the full 32-bit range of epoll based flags. - * - *

      Most notably {@code EPOLLEXCLUSIVE} which allows exclusive (waking single waiters) behavior.

      - * - *

      Available since kernel 5.9.

      - *
    • - *
    • {@link #IORING_FEAT_SQPOLL_NONFIXED FEAT_SQPOLL_NONFIXED} - - * If this flag is set, the {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL} feature no longer requires the use of fixed files. - * - *

      Any normal file descriptor can be used for IO commands without needing registration.

      - * - *

      Available since kernel 5.11.

      - *
    • - *
    • {@link #IORING_FEAT_EXT_ARG FEAT_EXT_ARG} - - * If this flag is set, then the {@link #io_uring_enter enter} system call supports passing in an extended argument instead of just the {@code sigset_t} of earlier - * kernels. - * - *

      This extended argument is of type {@code struct io_uring_getevents_arg} and allows the caller to pass in both a {@code sigset_t} and a timeout - * argument for waiting on events. A pointer to this struct must be passed in if {@link #IORING_ENTER_EXT_ARG ENTER_EXT_ARG} is set in the flags for the enter system call.

      - * - *

      Available since kernel 5.11.

      - *
    • - *
    • {@link #IORING_FEAT_NATIVE_WORKERS FEAT_NATIVE_WORKERS} - - * If this flag is set, {@code io_uring} is using native workers for its async helpers. - * - *

      Previous kernels used kernel threads that assumed the identity of the original {@code io_uring} owning task, but later kernels will actively create - * what looks more like regular process threads instead.

      - * - *

      Available since kernel 5.12.

      - *
    • - *
    • {@link #IORING_FEAT_RSRC_TAGS FEAT_RSRC_TAGS} - - * If this flag is set, then {@code io_uring} supports a variety of features related to fixed files and buffers. - * - *

      In particular, it indicates that registered buffers can be updated in-place, whereas before the full set would have to be unregistered first.

      - * - *

      Available since kernel 5.13.

      - *
    • - *
    • {@link #IORING_FEAT_CQE_SKIP FEAT_CQE_SKIP} - - * If this flag is set, then io_uring supports setting {@link #IOSQE_CQE_SKIP_SUCCESS} in the submitted SQE, indicating that no CQE should be generated for - * this SQE if it executes normally. If an error happens processing the SQE, a CQE with the appropriate error value will still be generated. - * - *

      Available since kernel 5.17.

      - *
    • - *
    • {@link #IORING_FEAT_LINKED_FILE FEAT_LINKED_FILE} - - * If this flag is set, then io_uring supports sane assignment of files for SQEs that have dependencies. For example, if a chain of SQEs are submitted - * with {@link #IOSQE_IO_LINK}, then kernels without this flag will prepare the file for each link upfront. If a previous link opens a file with a known - * index, eg if direct descriptors are used with open or accept, then file assignment needs to happen post execution of that SQE. If this flag is set, - * then the kernel will defer file assignment until execution of a given request is started. - * - *

      Available since kernel 5.17.

      - *
    • - *
    • {@link #IORING_FEAT_REG_REG_RING FEAT_REG_REG_RING}
    • - *
    - */ - public static final int - IORING_FEAT_SINGLE_MMAP = 1 << 0, - IORING_FEAT_NODROP = 1 << 1, - IORING_FEAT_SUBMIT_STABLE = 1 << 2, - IORING_FEAT_RW_CUR_POS = 1 << 3, - IORING_FEAT_CUR_PERSONALITY = 1 << 4, - IORING_FEAT_FAST_POLL = 1 << 5, - IORING_FEAT_POLL_32BITS = 1 << 6, - IORING_FEAT_SQPOLL_NONFIXED = 1 << 7, - IORING_FEAT_EXT_ARG = 1 << 8, - IORING_FEAT_NATIVE_WORKERS = 1 << 9, - IORING_FEAT_RSRC_TAGS = 1 << 10, - IORING_FEAT_CQE_SKIP = 1 << 11, - IORING_FEAT_LINKED_FILE = 1 << 12, - IORING_FEAT_REG_REG_RING = 1 << 13; - - /** - * {@link #io_uring_register register} {@code opcodes} and arguments - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_REGISTER_BUFFERS REGISTER_BUFFERS} - - * {@code arg} points to a struct {@code iovec} array of {@code nr_args} entries. - * - *

      The buffers associated with the {@code iovecs} will be locked in memory and charged against the user's {@code RLIMIT_MEMLOCK} resource limit. - * See {@code getrlimit(2)} for more information. Additionally, there is a size limit of 1GiB per buffer. Currently, the buffers must be anonymous, - * non-file-backed memory, such as that returned by {@code malloc(3)} or {@code mmap(2)} with the {@code MAP_ANONYMOUS} flag set. It is expected that - * this limitation will be lifted in the future. Huge pages are supported as well. Note that the entire huge page will be pinned in the kernel, even - * if only a portion of it is used.

      - * - *

      After a successful call, the supplied buffers are mapped into the kernel and eligible for I/O. To make use of them, the application must specify - * the {@link #IORING_OP_READ_FIXED OP_READ_FIXED} or {@link #IORING_OP_WRITE_FIXED OP_WRITE_FIXED} {@code opcodes} in the submission queue entry (see the struct {@code io_uring_sqe} definition in {@link #io_uring_enter enter}), - * and set the {@code buf_index} field to the desired buffer index. The memory range described by the submission queue entry's {@code addr} and - * {@code len} fields must fall within the indexed buffer.

      - * - *

      It is perfectly valid to setup a large buffer and then only use part of it for an I/O, as long as the range is within the originally mapped region.

      - * - *

      An application can increase or decrease the size or number of registered buffers by first unregistering the existing buffers, and then issuing a - * new call to {@code io_uring_register()} with the new buffers.

      - * - *

      Note that before 5.13 registering buffers would wait for the ring to idle. If the application currently has requests in-flight, the registration - * will wait for those to finish before proceeding.

      - * - *

      An application need not unregister buffers explicitly before shutting down the io_uring instance.

      - * - *

      Available since 5.1.

      - *
    • - *
    • {@link #IORING_UNREGISTER_BUFFERS UNREGISTER_BUFFERS} - - * This operation takes no argument, and {@code arg} must be passed as {@code NULL}. - * - *

      All previously registered buffers associated with the {@code io_uring} instance will be released.

      - * - *

      Available since 5.1.

      - *
    • - *
    • {@link #IORING_REGISTER_FILES REGISTER_FILES} - - * Register files for I/O. - * - *

      {@code arg} contains a pointer to an array of {@code nr_args} file descriptors (signed 32 bit integers). To make use of the registered files, the - * {@link #IOSQE_FIXED_FILE} flag must be set in the {@code flags} member of the struct {@code io_uring_sqe}, and the {@code fd} member is set to the index of - * the file in the file descriptor array.

      - * - *

      The file set may be sparse, meaning that the {@code fd} field in the array may be set to -1. See {@link #IORING_REGISTER_FILES_UPDATE REGISTER_FILES_UPDATE} for how to update files in - * place.

      - * - *

      Note that before 5.13 registering files would wait for the ring to idle. If the application currently has requests in-flight, the registration will - * wait for those to finish before proceeding. See {@link #IORING_REGISTER_FILES_UPDATE REGISTER_FILES_UPDATE} for how to update an existing set without that limitation.

      - * - *

      Files are automatically unregistered when the io_uring instance is torn down. An application needs only unregister if it wishes to register a new - * set of fds.

      - * - *

      Available since 5.1.

      - *
    • - *
    • {@link #IORING_UNREGISTER_FILES UNREGISTER_FILES} - - * This operation requires no argument, and {@code arg} must be passed as {@code NULL}. - * - *

      All previously registered files associated with the {@code io_uring} instance will be unregistered.

      - * - *

      Available since 5.1.

      - *
    • - *
    • {@link #IORING_REGISTER_EVENTFD REGISTER_EVENTFD} - - * It's possible to use {@code eventfd(2)} to get notified of completion events on an {@code io_uring} instance. If this is desired, an eventfd file - * descriptor can be registered through this operation. - * - *

      {@code arg} must contain a pointer to the eventfd file descriptor, and {@code nr_args} must be 1.

      - * - *

      Available since 5.2.

      - * - *

      An application can temporarily disable notifications, coming through the registered eventfd, by setting the {@link #IORING_CQ_EVENTFD_DISABLED CQ_EVENTFD_DISABLED} bit in the - * {@code flags} field of the CQ ring.

      - * - *

      Available since 5.8.

      - *
    • - *
    • {@link #IORING_UNREGISTER_EVENTFD UNREGISTER_EVENTFD} - - * Unregister an eventfd file descriptor to stop notifications. - * - *

      Since only one eventfd descriptor is currently supported, this operation takes no argument, and {@code arg} must be passed as {@code NULL} and - * {@code nr_args} must be zero.

      - * - *

      Available since 5.2.

      - *
    • - *
    • {@link #IORING_REGISTER_FILES_UPDATE REGISTER_FILES_UPDATE} - - * This operation replaces existing files in the registered file set with new ones, either turning a sparse entry (one where {@code fd} is equal to - * -1) into a real one, removing an existing entry (new one is set to -1), or replacing an existing entry with a new existing entry. - * - *

      {@code arg} must contain a pointer to a struct {@code io_uring_files_update}, which contains an offset on which to start the update, and an array - * of file descriptors to use for the update. {@code nr_args} must contain the number of descriptors in the passed in array.

      - * - *

      Available since 5.5.

      - * - *

      File descriptors can be skipped if they are set to {@link #IORING_REGISTER_FILES_SKIP REGISTER_FILES_SKIP}. Skipping an fd will not touch the file associated with the previous fd at - * that index.

      - * - *

      Available since 5.12.

      - *
    • - *
    • {@link #IORING_REGISTER_EVENTFD_ASYNC REGISTER_EVENTFD_ASYNC} - - * This works just like {@link #IORING_REGISTER_EVENTFD REGISTER_EVENTFD}, except notifications are only posted for events that complete in an async manner. - * - *

      This means that events that complete inline while being submitted do not trigger a notification event. The arguments supplied are the same as for - * {@code IORING_REGISTER_EVENTFD}.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_REGISTER_PROBE REGISTER_PROBE} - - * This operation returns a structure, {@code io_uring_probe}, which contains information about the {@code opcodes} supported by {@code io_uring} on - * the running kernel. - * - *

      {@code arg} must contain a pointer to a struct {@code io_uring_probe}, and {@code nr_args} must contain the size of the ops array in that probe - * struct. The {@code ops} array is of the type {@code io_uring_probe_op}, which holds the value of the {@code opcode} and a {@code flags} field. If - * the flags field has {@link #IO_URING_OP_SUPPORTED} set, then this opcode is supported on the running kernel.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_REGISTER_PERSONALITY REGISTER_PERSONALITY} - - * This operation registers credentials of the running application with {@code io_uring}, and returns an id associated with these credentials. - * - *

      Applications wishing to share a ring between separate users/processes can pass in this credential id in the sqe personality field. If set, that - * particular sqe will be issued with these credentials. Must be invoked with {@code arg} set to {@code NULL} and {@code nr_args} set to zero.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_UNREGISTER_PERSONALITY UNREGISTER_PERSONALITY} - - * This operation unregisters a previously registered personality with {@code io_uring}. - * - *

      {@code nr_args} must be set to the id in question, and {@code arg} must be set to {@code NULL}.

      - * - *

      Available since 5.6.

      - *
    • - *
    • {@link #IORING_REGISTER_RESTRICTIONS REGISTER_RESTRICTIONS} - - * {@code arg} points to a struct {@code io_uring_restriction} array of {@code nr_args} entries. - * - *

      With an entry it is possible to allow an {@link #io_uring_register register} {@code opcode}, or specify which {@code opcode} and flags of the submission queue entry are - * allowed, or require certain flags to be specified (these flags must be set on each submission queue entry).

      - * - *

      All the restrictions must be submitted with a single {@code io_uring_register()} call and they are handled as an allowlist ({@code opcodes} and - * flags not registered, are not allowed).

      - * - *

      Restrictions can be registered only if the {@code io_uring} ring started in a disabled state ({@link #IORING_SETUP_R_DISABLED SETUP_R_DISABLED} must be specified in the call to - * {@link #io_uring_setup setup}).

      - * - *

      Available since 5.10.

      - *
    • - *
    • {@link #IORING_REGISTER_ENABLE_RINGS REGISTER_ENABLE_RINGS} - - * This operation enables an {@code io_uring} ring started in a disabled state ({@link #IORING_SETUP_R_DISABLED SETUP_R_DISABLED} was specified in the call to {@link #io_uring_setup setup}). - * - *

      While the {@code io_uring} ring is disabled, submissions are not allowed and registrations are not restricted. After the execution of this - * operation, the {@code io_uring} ring is enabled: submissions and registration are allowed, but they will be validated following the registered - * restrictions (if any). This operation takes no argument, must be invoked with {@code arg} set to {@code NULL} and {@code nr_args} set to zero.

      - * - *

      Available since 5.10.

      - *
    • - *
    • {@link #IORING_REGISTER_FILES2 REGISTER_FILES2} - - * Register files for I/O. Similar to {@link #IORING_REGISTER_FILES REGISTER_FILES}. - * - *

      {@code arg} points to a struct {@code io_uring_rsrc_register}, and {@code nr_args} should be set to the number of bytes in the structure.

      - * - *

      The {@code data} field contains a pointer to an array of {@code nr} file descriptors (signed 32 bit integers). {@code tags} field should either be - * 0 or or point to an array of {@code nr} "tags" (unsigned 64 bit integers). See {@link #IORING_REGISTER_BUFFERS2 REGISTER_BUFFERS2} for more info on resource tagging.

      - * - *

      Note that resource updates, e.g. {@link #IORING_REGISTER_FILES_UPDATE REGISTER_FILES_UPDATE}, don't necessarily deallocate resources, they might be held until all requests using that - * resource complete.

      - * - *

      Available since 5.13.

      - *
    • - *
    • {@link #IORING_REGISTER_FILES_UPDATE2 REGISTER_FILES_UPDATE2} - - * Similar to {@link #IORING_REGISTER_FILES_UPDATE REGISTER_FILES_UPDATE}, replaces existing files in the registered file set with new ones, either turning a sparse entry (one where fd is - * equal to -1) into a real one, removing an existing entry (new one is set to -1), or replacing an existing entry with a new existing entry. - * - *

      {@code arg} must contain a pointer to a struct {@code io_uring_rsrc_update2}, which contains an offset on which to start the update, and an array - * of file descriptors to use for the update stored in data. {@code tags} points to an array of tags. {@code nr} must contain the number of - * descriptors in the passed in arrays. See {@link #IORING_REGISTER_BUFFERS2 REGISTER_BUFFERS2} for the resource tagging description.

      - * - *

      Available since 5.13.

      - *
    • - *
    • {@link #IORING_REGISTER_BUFFERS2 REGISTER_BUFFERS2} - - * Register buffers for I/O. - * - *

      Similar to {@link #IORING_REGISTER_BUFFERS REGISTER_BUFFERS} but aims to have a more extensible ABI. {@code arg} points to a struct {@code io_uring_rsrc_register}, and - * {@code nr_args} should be set to the number of bytes in the structure.

      - * - *

      The data field contains a pointer to a struct {@code iovec} array of {@code nr} entries. The {@code tags} field should either be 0, then tagging is - * disabled, or point to an array of {@code nr} "tags" (unsigned 64 bit integers). If a tag is zero, then tagging for this particular resource (a - * buffer in this case) is disabled. Otherwise, after the resource had been unregistered and it's not used anymore, a CQE will be posted with - * {@code user_data} set to the specified tag and all other fields zeroed.

      - * - *

      Note that resource updates, e.g. {@link #IORING_REGISTER_BUFFERS_UPDATE REGISTER_BUFFERS_UPDATE}, don't necessarily deallocate resources by the time it returns, but they might be held - * alive until all requests using it complete.

      - * - *

      Available since 5.13.

      - *
    • - *
    • {@link #IORING_REGISTER_BUFFERS_UPDATE REGISTER_BUFFERS_UPDATE} - - * Updates registered buffers with new ones, either turning a sparse entry into a real one, or replacing an existing entry. - * - *

      {@code arg} must contain a pointer to a struct {@code io_uring_rsrc_update2}, which contains an offset on which to start the update, and an array - * of struct {@code iovec}. {@code tags} points to an array of tags. {@code nr} must contain the number of descriptors in the passed in arrays. See - * {@link #IORING_REGISTER_BUFFERS2 REGISTER_BUFFERS2} for the resource tagging description.

      - * - *

      Available since 5.13.

      - *
    • - *
    • {@link #IORING_REGISTER_IOWQ_AFF REGISTER_IOWQ_AFF} - - * By default, async workers created by {@code io_uring} will inherit the CPU mask of its parent. - * - *

      This is usually all the CPUs in the system, unless the parent is being run with a limited set. If this isn't the desired outcome, the application - * may explicitly tell {@code io_uring} what CPUs the async workers may run on.

      - * - *

      {@code arg} must point to a {@code cpu_set_t} mask, and {@code nr_args} the byte size of that mask.

      - * - *

      Available since 5.14.

      - *
    • - *
    • {@link #IORING_UNREGISTER_IOWQ_AFF UNREGISTER_IOWQ_AFF} - - * Undoes a CPU mask previously set with {@link #IORING_REGISTER_IOWQ_AFF REGISTER_IOWQ_AFF}. - * - *

      Must not have {@code arg} or {@code nr_args} set.

      - * - *

      Available since 5.14.

      - *
    • - *
    • {@link #IORING_REGISTER_IOWQ_MAX_WORKERS REGISTER_IOWQ_MAX_WORKERS} - - * By default, {@code io_uring} limits the unbounded workers created to the maximum processor count set by {@code RLIMIT_NPROC} and the bounded - * workers is a function of the SQ ring size and the number of CPUs in the system. Sometimes this can be excessive (or too little, for bounded), and - * this command provides a way to change the count per ring (per NUMA node) instead. - * - *

      {@code arg} must be set to an unsigned int pointer to an array of two values, with the values in the array being set to the maximum count of - * workers per NUMA node. Index 0 holds the bounded worker count, and index 1 holds the unbounded worker count. On successful return, the passed in - * array will contain the previous maximum valyes for each type. If the count being passed in is 0, then this command returns the current maximum - * values and doesn't modify the current setting. {@code nr_args} must be set to 2, as the command takes two values.

      - * - *

      Available since 5.15.

      - *
    • - *
    • {@link #IORING_REGISTER_RING_FDS REGISTER_RING_FDS} - - * Whenever {@link #io_uring_enter enter} is called to submit request or wait for completions, the kernel must grab a reference to the file descriptor. If the application - * using io_uring is threaded, the file table is marked as shared, and the reference grab and put of the file descriptor count is more expensive than - * it is for a non-threaded application. - * - *

      Similarly to how io_uring allows registration of files, this allow registration of the ring file descriptor itself. This reduces the overhead of - * the {@code io_uring_enter (2)} system call.

      - * - *

      {@code arg} must be set to an unsigned int pointer to an array of type {@code struct io_uring_rsrc_register} of {@code nr_args} number of entries. - * The {@code data} field of this struct must point to an io_uring file descriptor, and the {@code offset} field can be either {@code -1} or an - * explicit offset desired for the registered file descriptor value. If {@code -1} is used, then upon successful return of this system call, the field - * will contain the value of the registered file descriptor to be used for future {@code io_uring_enter (2)} system calls.

      - * - *

      On successful completion of this request, the returned descriptors may be used instead of the real file descriptor for {@code io_uring_enter (2)}, - * provided that {@code IORING_ENTER_REGISTERED_RING} is set in the {@code flags} for the system call. This flag tells the kernel that a registered - * descriptor is used rather than a real file descriptor.

      - * - *

      Each thread or process using a ring must register the file descriptor directly by issuing this request.

      - * - *

      The maximum number of supported registered ring descriptors is currently limited to {@code 16}.

      - * - *

      Available since 5.18.

      - *
    • - *
    • {@link #IORING_UNREGISTER_RING_FDS UNREGISTER_RING_FDS} - - * Unregister descriptors previously registered with {@link #IORING_REGISTER_RING_FDS REGISTER_RING_FDS}. - * - *

      {@code arg} must be set to an unsigned int pointer to an array of type {@code struct io_uring_rsrc_register} of {@code nr_args} number of entries. - * Only the {@code offset} field should be set in the structure, containing the registered file descriptor offset previously returned from - * {@code IORING_REGISTER_RING_FDS} that the application wishes to unregister.

      - * - *

      Note that this isn't done automatically on ring exit, if the thread or task that previously registered a ring file descriptor isn't exiting. It is - * recommended to manually unregister any previously registered ring descriptors if the ring is closed and the task persists. This will free up a - * registration slot, making it available for future use.

      - * - *

      Available since 5.18.

      - *
    • - *
    • {@link #IORING_REGISTER_PBUF_RING REGISTER_PBUF_RING} - register ring based provide buffer group
    • - *
    • {@link #IORING_UNREGISTER_PBUF_RING UNREGISTER_PBUF_RING} - unregister ring based provide buffer group
    • - *
    • {@link #IORING_REGISTER_SYNC_CANCEL REGISTER_SYNC_CANCEL} - sync cancelation API
    • - *
    • {@link #IORING_REGISTER_FILE_ALLOC_RANGE REGISTER_FILE_ALLOC_RANGE} - register a range of fixed file slots for automatic slot allocation
    • - *
    • {@link #IORING_REGISTER_LAST REGISTER_LAST}
    • - *
    • {@link #IORING_REGISTER_USE_REGISTERED_RING REGISTER_USE_REGISTERED_RING}
    • - *
    - */ - public static final int - IORING_REGISTER_BUFFERS = 0, - IORING_UNREGISTER_BUFFERS = 1, - IORING_REGISTER_FILES = 2, - IORING_UNREGISTER_FILES = 3, - IORING_REGISTER_EVENTFD = 4, - IORING_UNREGISTER_EVENTFD = 5, - IORING_REGISTER_FILES_UPDATE = 6, - IORING_REGISTER_EVENTFD_ASYNC = 7, - IORING_REGISTER_PROBE = 8, - IORING_REGISTER_PERSONALITY = 9, - IORING_UNREGISTER_PERSONALITY = 10, - IORING_REGISTER_RESTRICTIONS = 11, - IORING_REGISTER_ENABLE_RINGS = 12, - IORING_REGISTER_FILES2 = 13, - IORING_REGISTER_FILES_UPDATE2 = 14, - IORING_REGISTER_BUFFERS2 = 15, - IORING_REGISTER_BUFFERS_UPDATE = 16, - IORING_REGISTER_IOWQ_AFF = 17, - IORING_UNREGISTER_IOWQ_AFF = 18, - IORING_REGISTER_IOWQ_MAX_WORKERS = 19, - IORING_REGISTER_RING_FDS = 20, - IORING_UNREGISTER_RING_FDS = 21, - IORING_REGISTER_PBUF_RING = 22, - IORING_UNREGISTER_PBUF_RING = 23, - IORING_REGISTER_SYNC_CANCEL = 24, - IORING_REGISTER_FILE_ALLOC_RANGE = 25, - IORING_REGISTER_LAST = 26, - IORING_REGISTER_USE_REGISTERED_RING = 1 << 31; - - /** Register a fully sparse file space, rather than pass in an array of all -1 file descriptors. */ - public static final int IORING_RSRC_REGISTER_SPARSE = 1 << 0; - - /** - * {@code io-wq} worker categories - * - *
    Enum values:
    - * - *
      - *
    • {@link #IO_WQ_BOUND IO_WQ_BOUND}
    • - *
    • {@link #IO_WQ_UNBOUND IO_WQ_UNBOUND}
    • - *
    - */ - public static final int - IO_WQ_BOUND = 0, - IO_WQ_UNBOUND = 1; - - /** Skip updating fd indexes set to this value in the fd table. */ - public static final int IORING_REGISTER_FILES_SKIP = -2; - - public static final int IO_URING_OP_SUPPORTED = 1 << 0; - - public static final int IOU_PBUF_RING_MMAP = 1; - - /** - * {@code io_uring_restriction->opcode} values - * - *
    Enum values:
    - * - *
      - *
    • {@link #IORING_RESTRICTION_REGISTER_OP RESTRICTION_REGISTER_OP} - Allow an {@code io_uring_register(2)} opcode
    • - *
    • {@link #IORING_RESTRICTION_SQE_OP RESTRICTION_SQE_OP} - Allow an sqe opcode
    • - *
    • {@link #IORING_RESTRICTION_SQE_FLAGS_ALLOWED RESTRICTION_SQE_FLAGS_ALLOWED} - Allow sqe flags
    • - *
    • {@link #IORING_RESTRICTION_SQE_FLAGS_REQUIRED RESTRICTION_SQE_FLAGS_REQUIRED} - Require sqe flags (these flags must be set on each submission)
    • - *
    • {@link #IORING_RESTRICTION_LAST RESTRICTION_LAST} - Require sqe flags (these flags must be set on each submission)
    • - *
    - */ - public static final int - IORING_RESTRICTION_REGISTER_OP = 0, - IORING_RESTRICTION_SQE_OP = 1, - IORING_RESTRICTION_SQE_FLAGS_ALLOWED = 2, - IORING_RESTRICTION_SQE_FLAGS_REQUIRED = 3, - IORING_RESTRICTION_LAST = 4; - - protected LibIOURing() { - throw new UnsupportedOperationException(); - } - - // --- [ io_uring_setup ] --- - - /** Unsafe version of: {@link #io_uring_setup setup} */ - public static native int nio_uring_setup(int entries, long p); - - /** - * The {@code io_uring_setup()} system call sets up a submission queue (SQ) and completion queue (CQ) with at least {@code entries} entries, and returns a - * file descriptor which can be used to perform subsequent operations on the {@code io_uring} instance. - * - *

    The submission and completion queues are shared between userspace and the kernel, which eliminates the need to copy data when initiating and completing - * I/O.

    - * - *

    Closing the file descriptor returned by {@code io_uring_setup(2)} will free all resources associated with the {@code io_uring} context.

    - * - * @param p used by the application to pass options to the kernel, and by the kernel to convey information about the ring buffers - * - * @return a new file descriptor on success. - * - *

    The application may then provide the file descriptor in a subsequent {@code mmap(2)} call to map the submission and completion queues, or to the - * {@link #io_uring_register register} or {@link #io_uring_enter enter} system calls.

    - * - *

    On error, {@code -1} is returned and {@code errno} is set appropriately.

    - */ - public static int io_uring_setup(@NativeType("unsigned") int entries, @NativeType("struct io_uring_params *") IOURingParams p) { - return nio_uring_setup(entries, p.address()); - } - - // --- [ io_uring_register ] --- - - /** Unsafe version of: {@link #io_uring_register register} */ - public static native int nio_uring_register(int fd, int opcode, long arg, int nr_args); - - /** - * The {@code io_uring_register()} system call registers resources (e.g. user buffers, files, eventfd, personality, restrictions) for use in an - * {@code io_uring} instance referenced by {@code fd}. - * - *

    Registering files or user buffers allows the kernel to take long term references to internal data structures or create long term mappings of - * application memory, greatly reducing per-I/O overhead.

    - * - * @param fd the file descriptor returned by a call to {@link #io_uring_setup setup} - * @param opcode one of:
    {@link #IORING_REGISTER_BUFFERS REGISTER_BUFFERS}{@link #IORING_REGISTER_FILES REGISTER_FILES}{@link #IORING_REGISTER_EVENTFD REGISTER_EVENTFD}{@link #IORING_REGISTER_FILES_UPDATE REGISTER_FILES_UPDATE}
    {@link #IORING_REGISTER_EVENTFD_ASYNC REGISTER_EVENTFD_ASYNC}{@link #IORING_REGISTER_PROBE REGISTER_PROBE}{@link #IORING_REGISTER_PERSONALITY REGISTER_PERSONALITY}{@link #IORING_REGISTER_RESTRICTIONS REGISTER_RESTRICTIONS}
    {@link #IORING_REGISTER_ENABLE_RINGS REGISTER_ENABLE_RINGS}{@link #IORING_REGISTER_FILES2 REGISTER_FILES2}{@link #IORING_REGISTER_FILES_UPDATE2 REGISTER_FILES_UPDATE2}{@link #IORING_REGISTER_BUFFERS2 REGISTER_BUFFERS2}
    {@link #IORING_REGISTER_BUFFERS_UPDATE REGISTER_BUFFERS_UPDATE}{@link #IORING_REGISTER_IOWQ_AFF REGISTER_IOWQ_AFF}{@link #IORING_REGISTER_IOWQ_MAX_WORKERS REGISTER_IOWQ_MAX_WORKERS}{@link #IORING_REGISTER_RING_FDS REGISTER_RING_FDS}
    {@link #IORING_REGISTER_PBUF_RING REGISTER_PBUF_RING}{@link #IORING_REGISTER_SYNC_CANCEL REGISTER_SYNC_CANCEL}{@link #IORING_REGISTER_FILE_ALLOC_RANGE REGISTER_FILE_ALLOC_RANGE}{@link #IORING_REGISTER_LAST REGISTER_LAST}
    {@link #IORING_REGISTER_USE_REGISTERED_RING REGISTER_USE_REGISTERED_RING}{@link #IORING_REGISTER_FILES_SKIP REGISTER_FILES_SKIP}
    - * - * @return on success, returns 0. On error, -1 is returned, and {@code errno} is set accordingly. - */ - public static int io_uring_register(int fd, @NativeType("unsigned") int opcode, @NativeType("void *") long arg, @NativeType("unsigned") int nr_args) { - return nio_uring_register(fd, opcode, arg, nr_args); - } - - // --- [ io_uring_enter2 ] --- - - public static native int nio_uring_enter2(int fd, int to_submit, int min_complete, int flags, long sig, int sz); - - public static int io_uring_enter2(int fd, @NativeType("unsigned") int to_submit, @NativeType("unsigned") int min_complete, @NativeType("unsigned") int flags, @NativeType("sigset_t *") long sig, int sz) { - return nio_uring_enter2(fd, to_submit, min_complete, flags, sig, sz); - } - - // --- [ io_uring_enter ] --- - - /** Unsafe version of: {@link #io_uring_enter enter} */ - public static native int nio_uring_enter(int fd, int to_submit, int min_complete, int flags, long sig); - - /** - * {@code io_uring_enter()} is used to initiate and complete I/O using the shared submission and completion queues setup by a call to {@link #io_uring_setup setup}. - * - *

    A single call can both submit new I/O and wait for completions of I/O initiated by this call or previous calls to {@code io_uring_enter()}.

    - * - *

    If the {@code io_uring} instance was configured for polling, by specifying {@link #IORING_SETUP_IOPOLL SETUP_IOPOLL} in the call to {@code io_uring_setup()}, then - * {@code min_complete} has a slightly different meaning. Passing a value of 0 instructs the kernel to return any events which are already complete, - * without blocking. If {@code min_complete} is a non-zero value, the kernel will still return immediately if any completion events are available. If no - * event completions are available, then the call will poll either until one or more completions become available, or until the process has exceeded its - * scheduler time slice.

    - * - *

    Note that, for interrupt driven I/O (where {@code IORING_SETUP_IOPOLL} was not specified in the call to {@code io_uring_setup()}), an application may - * check the completion queue for event completions without entering the kernel at all.

    - * - *

    When the system call returns that a certain amount of SQEs have been consumed and submitted, it's safe to reuse SQE entries in the ring. This is true - * even if the actual IO submission had to be punted to async context, which means that the SQE may in fact not have been submitted yet. If the kernel - * requires later use of a particular SQE entry, it will have made a private copy of it.

    - * - * @param fd the file descriptor returned by {@link #io_uring_setup setup} - * @param to_submit the number of I/Os to submit from the submission queue - * @param flags one or more of:
    {@link #IORING_ENTER_GETEVENTS ENTER_GETEVENTS}{@link #IORING_ENTER_SQ_WAKEUP ENTER_SQ_WAKEUP}{@link #IORING_ENTER_SQ_WAIT ENTER_SQ_WAIT}{@link #IORING_ENTER_EXT_ARG ENTER_EXT_ARG}{@link #IORING_ENTER_REGISTERED_RING ENTER_REGISTERED_RING}
    - * @param sig a pointer to a signal mask (see {@code sigprocmask(2)}); if {@code sig} is not {@code NULL}, {@code io_uring_enter()} first replaces the current signal - * mask by the one pointed to by sig, then waits for events to become available in the completion queue, and then restores the original signal mask. - * The following {@code io_uring_enter()} call: - * - *
    
    -     *                  ret = io_uring_enter(fd, 0, 1, IORING_ENTER_GETEVENTS, &sig);
    - * - *

    is equivalent to atomically executing the following calls:

    - * - *
    
    -     *                  pthread_sigmask(SIG_SETMASK, &sig, &orig);
    -     *                  ret = io_uring_enter(fd, 0, 1, IORING_ENTER_GETEVENTS, NULL);
    -     *                  pthread_sigmask(SIG_SETMASK, &orig, NULL);
    - * - *

    See the description of {@code pselect(2)} for an explanation of why the {@code sig} parameter is necessary.

    - * - * @return the number of I/Os successfully consumed. - * - *

    This can be zero if {@code to_submit} was zero or if the submission queue was empty. Note that if the ring was created with {@link #IORING_SETUP_SQPOLL SETUP_SQPOLL} specified, - * then the return value will generally be the same as {@code to_submit} as submission happens outside the context of the system call.

    - * - *

    The errors related to a submission queue entry will be returned through a completion queue entry, rather than through the system call itself.

    - * - *

    Errors that occur not on behalf of a submission queue entry are returned via the system call directly. On such an error, -1 is returned and - * {@code errno} is set appropriately.

    - */ - public static int io_uring_enter(int fd, @NativeType("unsigned") int to_submit, @NativeType("unsigned") int min_complete, @NativeType("unsigned") int flags, @NativeType("sigset_t *") long sig) { - return nio_uring_enter(fd, to_submit, min_complete, flags, sig); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/LibURing.java b/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/LibURing.java deleted file mode 100644 index 9328a9c5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/linux/liburing/LibURing.java +++ /dev/null @@ -1,2237 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.linux.liburing; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -import org.lwjgl.system.linux.*; - -/** Native bindings to liburing. */ -public class LibURing { - - static { Library.initialize(); } - - public static final long LIBURING_UDATA_TIMEOUT = -1L; - - protected LibURing() { - throw new UnsupportedOperationException(); - } - - // --- [ io_uring_get_probe_ring ] --- - - /** Unsafe version of: {@link #io_uring_get_probe_ring get_probe_ring} */ - public static native long nio_uring_get_probe_ring(long ring); - - /** - * Return an allocated {@code io_uring_probe} structure, or {@code NULL} if probe fails (for example, if it is not available). - * - *

    The caller is responsible for freeing it.

    - */ - @Nullable - @NativeType("struct io_uring_probe *") - public static IOURingProbe io_uring_get_probe_ring(@NativeType("struct io_uring *") IOURing ring) { - long __result = nio_uring_get_probe_ring(ring.address()); - return IOURingProbe.createSafe(__result); - } - - // --- [ io_uring_get_probe ] --- - - /** Unsafe version of: {@link #io_uring_get_probe get_probe} */ - public static native long nio_uring_get_probe(); - - /** - * Returns an allocated {@code io_uring_probe} structure to the caller. - * - *

    The caller is responsible for freeing the structure with the function {@link #io_uring_free_probe free_probe}.

    - * - *

    Note: Earlier versions of the Linux kernel (≤ 5.5) do not support probe. If the kernel doesn't support probe, this function will return {@code NULL}.

    - */ - @Nullable - @NativeType("struct io_uring_probe *") - public static IOURingProbe io_uring_get_probe() { - long __result = nio_uring_get_probe(); - return IOURingProbe.createSafe(__result); - } - - // --- [ io_uring_free_probe ] --- - - /** Unsafe version of: {@link #io_uring_free_probe free_probe} */ - public static native void nio_uring_free_probe(long probe); - - /** Frees the {@code probe} instance allocated with the {@link #io_uring_get_probe get_probe} function. */ - public static void io_uring_free_probe(@NativeType("struct io_uring_probe *") IOURingProbe probe) { - nio_uring_free_probe(probe.address()); - } - - // --- [ io_uring_opcode_supported ] --- - - /** Unsafe version of: {@link #io_uring_opcode_supported opcode_supported} */ - public static native int nio_uring_opcode_supported(long p, int op); - - /** - * Allows the caller to determine if the passed in {@code opcode} belonging to the {@code probe} param is supported. - * - *

    An instance of the {@code io_uring_probe} instance can be obtained by calling the function {@link #io_uring_get_probe get_probe}.

    - */ - public static int io_uring_opcode_supported(@NativeType("struct io_uring_probe const *") IOURingProbe p, int op) { - return nio_uring_opcode_supported(p.address(), op); - } - - // --- [ io_uring_queue_init_params ] --- - - public static native int nio_uring_queue_init_params(int entries, long ring, long p); - - public static int io_uring_queue_init_params(@NativeType("unsigned") int entries, @NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_params *") IOURingParams p) { - return nio_uring_queue_init_params(entries, ring.address(), p.address()); - } - - // --- [ io_uring_queue_init ] --- - - /** Unsafe version of: {@link #io_uring_queue_init queue_init} */ - public static native int nio_uring_queue_init(int entries, long ring, int flags); - - /** - * Executes the {@link #io_uring_setup setup} syscall to initialize the submission and completion queues in the kernel with at least {@code entries} entries and then maps the - * resulting file descriptor to memory shared between the application and the kernel. - * - *

    On success, the resources held by {@code ring} should be released via a corresponding call to {@link #io_uring_queue_exit queue_exit}.

    - * - * @param flags will be passed through to the {@link #io_uring_setup setup} syscall - * - * @return 0 on success and {@code ring} will point to the shared memory containing the {@code io_uring} queues. On failure {@code -errno} is returned. - */ - public static int io_uring_queue_init(@NativeType("unsigned") int entries, @NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int flags) { - return nio_uring_queue_init(entries, ring.address(), flags); - } - - // --- [ io_uring_queue_mmap ] --- - - /** Unsafe version of: {@link #io_uring_queue_mmap queue_mmap} */ - public static native int nio_uring_queue_mmap(int fd, long p, long ring); - - /** - * For users that want to specify {@code sq_thread_cpu} or {@code sq_thread_idle}, this interface is a convenient helper for {@code mmap()}ing the rings. - * - * @param fd a file descriptor returned by {@link #io_uring_setup setup} - * @param ring on success, contains the necessary information to read/write to the rings - * - * @return {@code -errno} on error, or zero on success - */ - public static int io_uring_queue_mmap(int fd, @NativeType("struct io_uring_params *") IOURingParams p, @NativeType("struct io_uring *") IOURing ring) { - return nio_uring_queue_mmap(fd, p.address(), ring.address()); - } - - // --- [ io_uring_ring_dontfork ] --- - - /** Unsafe version of: {@link #io_uring_ring_dontfork ring_dontfork} */ - public static native int nio_uring_ring_dontfork(long ring); - - /** - * Ensure that the {@code mmap}'ed rings aren't available to a child after a {@code fork(2)}. - * - *

    This uses {@code madvise(..., MADV_DONTFORK)} on the {@code mmap}'ed ranges.

    - */ - public static int io_uring_ring_dontfork(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_ring_dontfork(ring.address()); - } - - // --- [ io_uring_queue_exit ] --- - - /** Unsafe version of: {@link #io_uring_queue_exit queue_exit} */ - public static native void nio_uring_queue_exit(long ring); - - /** - * Will release all resources acquired and initialized by {@link #io_uring_queue_init queue_init}. - * - *

    It first unmaps the memory shared between the application and the kernel and then closes the {@code io_uring} file descriptor.

    - */ - public static void io_uring_queue_exit(@NativeType("struct io_uring *") IOURing ring) { - nio_uring_queue_exit(ring.address()); - } - - // --- [ io_uring_peek_batch_cqe ] --- - - /** Unsafe version of: {@link #io_uring_peek_batch_cqe peek_batch_cqe} */ - public static native int nio_uring_peek_batch_cqe(long ring, long cqes, int count); - - /** - * Fill in an array of IO completions up to count, if any are available. - * - * @return the amount of IO completions filled - */ - @NativeType("unsigned") - public static int io_uring_peek_batch_cqe(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe **") PointerBuffer cqes) { - return nio_uring_peek_batch_cqe(ring.address(), memAddress(cqes), cqes.remaining()); - } - - // --- [ io_uring_wait_cqes ] --- - - /** Unsafe version of: {@link #io_uring_wait_cqes wait_cqes} */ - public static native int nio_uring_wait_cqes(long ring, long cqe_ptr, int wait_nr, long ts, long sigmask); - - /** - * Returns {@code wait_nr} IO completions from the queue belonging to the {@code ring} param, waiting for it if necessary or until the timeout {@code ts} - * expires. - * - *

    If {@code ts} is specified, the application does not need to call {@link #io_uring_submit submit} before calling {@code io_uring_wait_cqes()}.

    - * - * @param cqe_ptr filled in on success - * @param sigmask the set of signals to block. The prevailing signal mask is restored before returning. - * - * @return 0 on success and the {@code cqe_ptr} param is filled in. On failure it returns {@code -errno}. - */ - public static int io_uring_wait_cqes(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe **") PointerBuffer cqe_ptr, @Nullable @NativeType("struct __kernel_timespec *") KernelTimespec ts, @NativeType("sigset_t *") long sigmask) { - return nio_uring_wait_cqes(ring.address(), memAddress(cqe_ptr), cqe_ptr.remaining(), memAddressSafe(ts), sigmask); - } - - // --- [ io_uring_wait_cqe_timeout ] --- - - /** Unsafe version of: {@link #io_uring_wait_cqe_timeout wait_cqe_timeout} */ - public static native int nio_uring_wait_cqe_timeout(long ring, long cqe_ptr, long ts); - - /** - * Returns one IO completion from the queue belonging to the {@code ring} param, waiting for it if necessary or until the timeout {@code ts} expires. - * - *

    If {@code ts} is specified, the application does not need to call {@link #io_uring_submit submit} before calling {@code io_uring_wait_cqe_timeout()}.

    - * - * @param cqe_ptr filled in on success - * - * @return 0 on success and the {@code cqe_ptr} param is filled in. On failure it returns {@code -errno}. - */ - public static int io_uring_wait_cqe_timeout(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe **") PointerBuffer cqe_ptr, @Nullable @NativeType("struct __kernel_timespec *") KernelTimespec ts) { - if (CHECKS) { - check(cqe_ptr, 1); - } - return nio_uring_wait_cqe_timeout(ring.address(), memAddress(cqe_ptr), memAddressSafe(ts)); - } - - // --- [ io_uring_submit ] --- - - /** Unsafe version of: {@link #io_uring_submit submit} */ - public static native int nio_uring_submit(long ring); - - /** - * Submits the next events to the submission queue belonging to the {@code ring}. - * - *

    After the caller retrieves a submission queue entry (SQE) with {@link #io_uring_get_sqe get_sqe}, prepares the SQE, it can be submitted with {@code io_uring_submit()}.

    - * - * @return the number of submitted submission queue entries on success. On failure it returns {@code -errno}. - */ - public static int io_uring_submit(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_submit(ring.address()); - } - - // --- [ io_uring_submit_and_wait ] --- - - /** Unsafe version of: {@link #io_uring_submit_and_wait submit_and_wait} */ - public static native int nio_uring_submit_and_wait(long ring, int wait_nr); - - /** - * Submits the next events to the submission queue belonging to the {@code ring} and waits for {@code wait_nr} completion events. - * - *

    After the caller retrieves a submission queue entry (SQE) with {@link #io_uring_get_sqe get_sqe}, prepares the SQE, it can be submitted with - * {@code io_uring_submit_and_wait()}.

    - * - * @return the number of submitted submission queue entries on success. On failure it returns {@code -errno}. - */ - public static int io_uring_submit_and_wait(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int wait_nr) { - return nio_uring_submit_and_wait(ring.address(), wait_nr); - } - - // --- [ io_uring_submit_and_wait_timeout ] --- - - /** Unsafe version of: {@link #io_uring_submit_and_wait_timeout submit_and_wait_timeout} */ - public static native int nio_uring_submit_and_wait_timeout(long ring, long cqe_ptr, int wait_nr, long ts, long sigmask); - - /** - * Submits the next events to the submission queue belonging to the {@code ring} and waits for {@code wait_nr} completion events or until the timeout - * {@code ts} expires.The completion events are stored in the {@code cqe_ptr} array. - * - *

    After the caller retrieves a submission queue entry (SQE) with {@link #io_uring_get_sqe get_sqe}, prepares the SQE, it can be submitted with - * {@code io_uring_submit_and_wait_timeout()}.

    - * - * @param sigmask the set of signals to block. The prevailing signal mask is restored before returning. - * - * @return the number of submitted submission queue entries on success. On failure it returns {@code -errno}. - */ - public static int io_uring_submit_and_wait_timeout(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe **") PointerBuffer cqe_ptr, @Nullable @NativeType("struct __kernel_timespec *") KernelTimespec ts, @NativeType("sigset_t *") long sigmask) { - return nio_uring_submit_and_wait_timeout(ring.address(), memAddress(cqe_ptr), cqe_ptr.remaining(), memAddressSafe(ts), sigmask); - } - - // --- [ io_uring_register_buffers ] --- - - /** Unsafe version of: {@link #io_uring_register_buffers register_buffers} */ - public static native int nio_uring_register_buffers(long ring, long iovecs, int nr_iovecs); - - /** - * Registers {@code nr_iovecs} number of buffers defined by the array {@code iovecs} belonging to the {@code ring}. - * - *

    After the caller has registered the buffers, they can be used with one of the fixed buffers functions.

    - * - *

    Registered buffers is an optimization that is useful in conjunction with {@code O_DIRECT} reads and writes, where maps the specified range into the - * kernel once when the buffer is registered, rather than doing a map and unmap for each IO every time IO is performed to that region. Additionally, it - * also avoids manipulating the page reference counts for each IO.

    - * - * @return 0 on success. On failure it returns {@code -errno}. - */ - public static int io_uring_register_buffers(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct iovec const *") IOVec.Buffer iovecs) { - return nio_uring_register_buffers(ring.address(), iovecs.address(), iovecs.remaining()); - } - - // --- [ io_uring_register_buffers_tags ] --- - - public static native int nio_uring_register_buffers_tags(long ring, long iovecs, long tags, int nr); - - public static int io_uring_register_buffers_tags(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct iovec const *") IOVec.Buffer iovecs, @NativeType("__u64 const *") LongBuffer tags) { - if (CHECKS) { - check(tags, iovecs.remaining()); - } - return nio_uring_register_buffers_tags(ring.address(), iovecs.address(), memAddress(tags), iovecs.remaining()); - } - - // --- [ io_uring_register_buffers_sparse ] --- - - /** Unsafe version of: {@link #io_uring_register_buffers_sparse register_buffers_sparse} */ - public static native int nio_uring_register_buffers_sparse(long ring, int nr_iovecs); - - /** - * Registers {@code nr_iovecs} empty buffers belonging to the {@code ring}. - * - *

    These buffers must be updated before use, using eg {@link #io_uring_register_buffers_update_tag register_buffers_update_tag}.

    - * - *

    After the caller has registered the buffers, they can be used with one of the fixed buffers functions.

    - * - *

    Registered buffers is an optimization that is useful in conjunction with {@code O_DIRECT} reads and writes, where it maps the specified range into the - * kernel once when the buffer is registered rather than doing a map and unmap for each IO every time IO is performed to that region. Additionally, it - * also avoids manipulating the page reference counts for each IO.

    - */ - public static int io_uring_register_buffers_sparse(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int nr_iovecs) { - return nio_uring_register_buffers_sparse(ring.address(), nr_iovecs); - } - - // --- [ io_uring_register_buffers_update_tag ] --- - - public static native int nio_uring_register_buffers_update_tag(long ring, int off, long iovecs, long tags, int nr); - - public static int io_uring_register_buffers_update_tag(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int off, @NativeType("struct iovec const *") IOVec.Buffer iovecs, @NativeType("__u64 const *") LongBuffer tags) { - if (CHECKS) { - check(tags, iovecs.remaining()); - } - return nio_uring_register_buffers_update_tag(ring.address(), off, iovecs.address(), memAddress(tags), iovecs.remaining()); - } - - // --- [ io_uring_unregister_buffers ] --- - - /** Unsafe version of: {@link #io_uring_unregister_buffers unregister_buffers} */ - public static native int nio_uring_unregister_buffers(long ring); - - /** - * Unregisters the fixed buffers previously registered to the {@code ring}. - * - * @return 0 on success. On failure it returns {@code -errno}. - */ - public static int io_uring_unregister_buffers(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_unregister_buffers(ring.address()); - } - - // --- [ io_uring_register_files ] --- - - /** Unsafe version of: {@link #io_uring_register_files register_files} */ - public static native int nio_uring_register_files(long ring, long files, int nr_files); - - /** - * Registers {@code nr_files} number of file descriptors defined by the array {@code files} belonging to the {@code ring} for subsequent operations. - * - *

    After the caller has registered the buffers, they can be used with the submission queue polling operations.

    - * - * @return 0 on success. On failure it returns {@code -errno}. - */ - public static int io_uring_register_files(@NativeType("struct io_uring *") IOURing ring, @NativeType("int const *") IntBuffer files) { - return nio_uring_register_files(ring.address(), memAddress(files), files.remaining()); - } - - // --- [ io_uring_register_files_tags ] --- - - public static native int nio_uring_register_files_tags(long ring, long files, long tags, int nr); - - public static int io_uring_register_files_tags(@NativeType("struct io_uring *") IOURing ring, @NativeType("int const *") IntBuffer files, @NativeType("__u64 const *") LongBuffer tags) { - if (CHECKS) { - check(tags, files.remaining()); - } - return nio_uring_register_files_tags(ring.address(), memAddress(files), memAddress(tags), files.remaining()); - } - - // --- [ io_uring_register_files_sparse ] --- - - /** Unsafe version of: {@link #io_uring_register_files_sparse register_files_sparse} */ - public static native int nio_uring_register_files_sparse(long ring, int nr_files); - - /** - * Registers an empty file table of {@code nr_files} number of file descriptors. - * - *

    Registering a file table is a prerequisite for using any request that uses direct descriptors.

    - * - *

    The sparse variant is available in kernels 5.19 and later.

    - */ - public static int io_uring_register_files_sparse(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int nr_files) { - return nio_uring_register_files_sparse(ring.address(), nr_files); - } - - // --- [ io_uring_register_files_update_tag ] --- - - public static native int nio_uring_register_files_update_tag(long ring, int off, long files, long tags, int nr_files); - - public static int io_uring_register_files_update_tag(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int off, @NativeType("int const *") IntBuffer files, @NativeType("__u64 const *") LongBuffer tags) { - if (CHECKS) { - check(tags, files.remaining()); - } - return nio_uring_register_files_update_tag(ring.address(), off, memAddress(files), memAddress(tags), files.remaining()); - } - - // --- [ io_uring_unregister_files ] --- - - public static native int nio_uring_unregister_files(long ring); - - public static int io_uring_unregister_files(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_unregister_files(ring.address()); - } - - // --- [ io_uring_register_files_update ] --- - - public static native int nio_uring_register_files_update(long ring, int off, long files, int nr_files); - - public static int io_uring_register_files_update(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int off, @NativeType("int const *") IntBuffer files) { - return nio_uring_register_files_update(ring.address(), off, memAddress(files), files.remaining()); - } - - // --- [ io_uring_register_eventfd ] --- - - public static native int nio_uring_register_eventfd(long ring, int fd); - - public static int io_uring_register_eventfd(@NativeType("struct io_uring *") IOURing ring, int fd) { - return nio_uring_register_eventfd(ring.address(), fd); - } - - // --- [ io_uring_register_eventfd_async ] --- - - public static native int nio_uring_register_eventfd_async(long ring, int fd); - - public static int io_uring_register_eventfd_async(@NativeType("struct io_uring *") IOURing ring, int fd) { - return nio_uring_register_eventfd_async(ring.address(), fd); - } - - // --- [ io_uring_unregister_eventfd ] --- - - public static native int nio_uring_unregister_eventfd(long ring); - - public static int io_uring_unregister_eventfd(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_unregister_eventfd(ring.address()); - } - - // --- [ io_uring_register_probe ] --- - - public static native int nio_uring_register_probe(long ring, long p, int nr); - - public static int io_uring_register_probe(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_probe *") IOURingProbe p, @NativeType("unsigned") int nr) { - return nio_uring_register_probe(ring.address(), p.address(), nr); - } - - // --- [ io_uring_register_personality ] --- - - public static native int nio_uring_register_personality(long ring); - - public static int io_uring_register_personality(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_register_personality(ring.address()); - } - - // --- [ io_uring_unregister_personality ] --- - - public static native int nio_uring_unregister_personality(long ring, int id); - - public static int io_uring_unregister_personality(@NativeType("struct io_uring *") IOURing ring, int id) { - return nio_uring_unregister_personality(ring.address(), id); - } - - // --- [ io_uring_register_restrictions ] --- - - public static native int nio_uring_register_restrictions(long ring, long res, int nr_res); - - public static int io_uring_register_restrictions(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_restriction *") IOURingRestriction.Buffer res) { - return nio_uring_register_restrictions(ring.address(), res.address(), res.remaining()); - } - - // --- [ io_uring_enable_rings ] --- - - public static native int nio_uring_enable_rings(long ring); - - public static int io_uring_enable_rings(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_enable_rings(ring.address()); - } - - // --- [ __io_uring_sqring_wait ] --- - - public static native int n__io_uring_sqring_wait(long ring); - - public static int __io_uring_sqring_wait(@NativeType("struct io_uring *") IOURing ring) { - return n__io_uring_sqring_wait(ring.address()); - } - - // --- [ io_uring_register_iowq_aff ] --- - - public static native int nio_uring_register_iowq_aff(long ring, long cpusz, long mask); - - public static int io_uring_register_iowq_aff(@NativeType("struct io_uring *") IOURing ring, @NativeType("size_t") long cpusz, @NativeType("cpu_set_t const *") long mask) { - if (CHECKS) { - check(mask); - } - return nio_uring_register_iowq_aff(ring.address(), cpusz, mask); - } - - // --- [ io_uring_unregister_iowq_aff ] --- - - public static native int nio_uring_unregister_iowq_aff(long ring); - - public static int io_uring_unregister_iowq_aff(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_unregister_iowq_aff(ring.address()); - } - - // --- [ io_uring_register_iowq_max_workers ] --- - - public static native int nio_uring_register_iowq_max_workers(long ring, long values); - - public static int io_uring_register_iowq_max_workers(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned int *") IntBuffer values) { - if (CHECKS) { - check(values, 2); - } - return nio_uring_register_iowq_max_workers(ring.address(), memAddress(values)); - } - - // --- [ io_uring_register_ring_fd ] --- - - /** Unsafe version of: {@link #io_uring_register_ring_fd register_ring_fd} */ - public static native int nio_uring_register_ring_fd(long ring); - - /** - * Registers the file descriptor of the ring. - * - *

    Whenever {@link #io_uring_enter enter} is called to submit request or wait for completions, the kernel must grab a reference to the file descriptor. If the application - * using io_uring is threaded, the file table is marked as shared, and the reference grab and put of the file descriptor count is more expensive than it - * is for a non-threaded application.

    - * - *

    Similarly to how io_uring allows registration of files, this allow registration of the ring file descriptor itself. This reduces the overhead of the - * {@code io_uring_enter (2)} system call.

    - * - *

    If an application using liburing is threaded, then an application should call this function to register the ring descriptor when a ring is set up. See - * NOTES for restrictions when a ring is shared.

    - * - *
    Note
    - * - *

    When the ring descriptor is registered, it is stored internally in the {@code struct io_uring} structure. For applications that share a ring between - * threads, for example having one thread do submits and another reap events, then this optimization cannot be used as each thread may have a different - * index for the registered ring fd.

    - *
    - * - * @return 1 on success, indicating that one file descriptor was registered, or {@code -errno} on error - */ - public static int io_uring_register_ring_fd(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_register_ring_fd(ring.address()); - } - - // --- [ io_uring_unregister_ring_fd ] --- - - /** Unsafe version of: {@link #io_uring_unregister_ring_fd unregister_ring_fd} */ - public static native int nio_uring_unregister_ring_fd(long ring); - - /** - * Unregisters the file descriptor of the ring. - * - *

    Unregisters a ring descriptor previously registered with the task. This is done automatically when {@link #io_uring_queue_exit queue_exit} is called, but can also be done to - * free up space for new ring registrations. For more information on ring descriptor registration, see {@link #io_uring_register_ring_fd register_ring_fd}.

    - * - * @return 1 on success, indicating that one file descriptor was unregistered, or {@code -errno} on error - */ - public static int io_uring_unregister_ring_fd(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_unregister_ring_fd(ring.address()); - } - - // --- [ io_uring_close_ring_fd ] --- - - public static native int nio_uring_close_ring_fd(long ring); - - public static int io_uring_close_ring_fd(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_close_ring_fd(ring.address()); - } - - // --- [ io_uring_register_buf_ring ] --- - - /** Unsafe version of: {@link #io_uring_register_buf_ring register_buf_ring} */ - public static native int nio_uring_register_buf_ring(long ring, long reg, int flags); - - /** - * Registers a shared buffer ring to be used with provided buffers. - * - *

    For the request types that support it, provided buffers are given to the ring and one is selected by a request if it has {@link LibIOURing#IOSQE_BUFFER_SELECT} set in - * the SQE {@code flags}, when the request is ready to receive data. This allows both clear ownership of the buffer lifetime, and a way to have more - * read/receive type of operations in flight than buffers available.

    - * - *

    The {@code reg} argument must be filled in with the appropriate information. It looks as follows:

    - * - *
    
    -     * struct io_uring_buf_reg {
    -     *     __u64 ring_addr;
    -     *     __u32 ring_entries;
    -     *     __u16 bgid;
    -     *     __u16 pad;
    -     *     __u64 resv[3];
    -     * };
    - * - *

    The {@code ring_addr} field must contain the address to the memory allocated to fit this ring. The memory must be page aligned and hence allocated - * appropriately using eg {@code posix_memalign (3)} or similar. The size of the ring is the product of {@code ring_entries} and the size of - * {@code "struct io_uring_buf"}. {@code ring_entries} is the desired size of the ring, and must be a power-of-2 in size. {@code bgid} is the buffer group - * ID associated with this ring. SQEs that select a buffer has a buffer group associated with them in their {@code buf_group} field, and the associated - * CQE will have {@link LibIOURing#IORING_CQE_F_BUFFER} set in their {@code flags} member, which will also contain the specific ID of the buffer selected. The - * rest of the fields are reserved and must be cleared to zero.

    - * - *

    The {@code flags} argument is currently unused and must be set to zero.

    - * - *

    A shared buffer ring looks as follows:

    - * - *
    
    -     * struct io_uring_buf_ring {
    -     *     union {
    -     *     struct {
    -     *             __u64 resv1;
    -     *             __u32 resv2;
    -     *             __u16 resv3;
    -     *             __u16 tail;
    -     *     };
    -     *     struct io_uring_buf bufs[0];
    -     *     };
    -     * };
    - * - *

    where {@code tail} is the index at which the application can insert new buffers for consumption by requests, and {@code struct io_uring_buf} is buffer - * definition:

    - * - *
    
    -     * struct io_uring_buf {
    -     *     __u64 addr;
    -     *     __u32 len;
    -     *     __u16 bid;
    -     *     __u16 resv;
    -     * };
    - * - *

    where {@code addr} is the address for the buffer, {@code len} is the length of the buffer in bytes, and {@code bid} is the buffer ID that will be - * returned in the CQE once consumed.

    - * - *

    Reserved fields must not be touched. Applications must use {@link #io_uring_buf_ring_init buf_ring_init} to initialise the buffer ring. Applications may use - * {@link #io_uring_buf_ring_add buf_ring_add} and {@link #io_uring_buf_ring_advance buf_ring_advance} or {@link #io_uring_buf_ring_advance buf_ring_advance} to provide buffers, which will set these fields and update the tail.

    - * - *

    Available since 5.19.

    - * - * @return 0 on success, {@code -errno} on failure - */ - public static int io_uring_register_buf_ring(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_buf_reg *") IOURingBufReg reg, @NativeType("unsigned int") int flags) { - return nio_uring_register_buf_ring(ring.address(), reg.address(), flags); - } - - // --- [ io_uring_unregister_buf_ring ] --- - - /** Unsafe version of: {@link #io_uring_unregister_buf_ring unregister_buf_ring} */ - public static native int nio_uring_unregister_buf_ring(long ring, int bgid); - - /** - * Function unregisters a previously registered shared buffer ring indicated by {@code bgid}. - * - * @return 0 on success, {@code -errno} on failure - */ - public static int io_uring_unregister_buf_ring(@NativeType("struct io_uring *") IOURing ring, int bgid) { - return nio_uring_unregister_buf_ring(ring.address(), bgid); - } - - // --- [ io_uring_register_sync_cancel ] --- - - public static native int nio_uring_register_sync_cancel(long ring, long reg); - - public static int io_uring_register_sync_cancel(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_sync_cancel_reg *") IOURingSyncCancelReg reg) { - return nio_uring_register_sync_cancel(ring.address(), reg.address()); - } - - // --- [ io_uring_register_file_alloc_range ] --- - - public static native int nio_uring_register_file_alloc_range(long ring, int off, int len); - - public static int io_uring_register_file_alloc_range(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned") int off, @NativeType("unsigned") int len) { - return nio_uring_register_file_alloc_range(ring.address(), off, len); - } - - // --- [ io_uring_get_events ] --- - - /** Unsafe version of: {@link #io_uring_get_events get_events} */ - public static native int nio_uring_get_events(long ring); - - /** - * Runs outstanding work and flushes completion events to the CQE ring. - * - *

    There can be events needing to be flushed if the ring was full and had overflowed. Alternatively if the ring was setup with the {@link LibIOURing#IORING_SETUP_DEFER_TASKRUN SETUP_DEFER_TASKRUN} - * flag then this will process outstanding tasks, possibly resulting in more CQEs.

    - * - * @return 0 on success, {@code -errno} on failure - */ - public static int io_uring_get_events(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_get_events(ring.address()); - } - - // --- [ io_uring_submit_and_get_events ] --- - - /** Unsafe version of: {@link #io_uring_submit_and_get_events submit_and_get_events} */ - public static native int nio_uring_submit_and_get_events(long ring); - - /** - * Submits the next events to the submission queue as with {@link #io_uring_submit submit}. - * - *

    After submission it will flush CQEs as with {@link #io_uring_get_events get_events}.

    - * - *

    The benefit of this function is that it does both with only one system call.

    - * - * @return the number of submitted submission queue entries on success, {@code -errno} on failure - */ - public static int io_uring_submit_and_get_events(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_submit_and_get_events(ring.address()); - } - - // --- [ io_uring_enter ] --- - - /** Unsafe version of: {@link #io_uring_enter enter} */ - public static native int nio_uring_enter(int fd, int to_submit, int min_complete, int flags, long sig); - - /** See {@link LibIOURing#io_uring_enter enter}. */ - public static int io_uring_enter(@NativeType("unsigned int") int fd, @NativeType("unsigned int") int to_submit, @NativeType("unsigned int") int min_complete, @NativeType("unsigned int") int flags, @NativeType("sigset_t *") long sig) { - if (CHECKS) { - check(sig); - } - return nio_uring_enter(fd, to_submit, min_complete, flags, sig); - } - - // --- [ io_uring_enter2 ] --- - - /** Unsafe version of: {@link #io_uring_enter2 enter2} */ - public static native int nio_uring_enter2(int fd, int to_submit, int min_complete, int flags, long sig, long sz); - - /** See {@link LibIOURing#io_uring_enter2 enter2}. */ - public static int io_uring_enter2(@NativeType("unsigned int") int fd, @NativeType("unsigned int") int to_submit, @NativeType("unsigned int") int min_complete, @NativeType("unsigned int") int flags, @NativeType("sigset_t *") long sig, @NativeType("size_t") long sz) { - if (CHECKS) { - check(sig); - } - return nio_uring_enter2(fd, to_submit, min_complete, flags, sig, sz); - } - - // --- [ io_uring_setup ] --- - - /** Unsafe version of: {@link #io_uring_setup setup} */ - public static native int nio_uring_setup(int entries, long p); - - /** See {@link LibIOURing#io_uring_setup setup}. */ - public static int io_uring_setup(@NativeType("unsigned int") int entries, @NativeType("struct io_uring_params *") IOURingParams p) { - return nio_uring_setup(entries, p.address()); - } - - // --- [ io_uring_register ] --- - - /** See {@link LibIOURing#io_uring_register register}. */ - public static native int io_uring_register(@NativeType("unsigned int") int fd, @NativeType("unsigned int") int opcode, @NativeType("void *") long arg, @NativeType("unsigned int") int nr_args); - - // --- [ io_uring_setup_buf_ring ] --- - - public static native long nio_uring_setup_buf_ring(long ring, int nentries, int bgid, int flags, long ret); - - @Nullable - @NativeType("struct io_uring_buf_ring *") - public static IOURingBufRing io_uring_setup_buf_ring(@NativeType("struct io_uring *") IOURing ring, @NativeType("unsigned int") int nentries, int bgid, @NativeType("unsigned int") int flags, @NativeType("int *") IntBuffer ret) { - if (CHECKS) { - check(ret, 1); - } - long __result = nio_uring_setup_buf_ring(ring.address(), nentries, bgid, flags, memAddress(ret)); - return IOURingBufRing.createSafe(__result); - } - - // --- [ io_uring_free_buf_ring ] --- - - public static native int nio_uring_free_buf_ring(long ring, long br, int nentries, int bgid); - - public static int io_uring_free_buf_ring(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_buf_ring *") IOURingBufRing br, @NativeType("unsigned int") int nentries, int bgid) { - return nio_uring_free_buf_ring(ring.address(), br.address(), nentries, bgid); - } - - // --- [ io_uring_cqe_seen ] --- - - /** Unsafe version of: {@link #io_uring_cqe_seen cqe_seen} */ - public static native void nio_uring_cqe_seen(long ring, long cqe); - - /** - * Marks the IO completion {@code cqe} belonging to the {@code ring} param as processed. - * - *

    After the caller has submitted a request with {@link #io_uring_submit submit}, they can retrieve the completion with {@link #io_uring_wait_cqe wait_cqe} and mark it then as processed with - * {@code io_uring_cqe_seen()}.

    - * - *

    Completions must be marked as completed, so their slot can get reused.

    - */ - public static void io_uring_cqe_seen(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe *") IOURingCQE cqe) { - nio_uring_cqe_seen(ring.address(), cqe.address()); - } - - // --- [ io_uring_sqe_set_data ] --- - - /** Unsafe version of: {@link #io_uring_sqe_set_data sqe_set_data} */ - public static native void nio_uring_sqe_set_data(long sqe, long data); - - /** - * Stores a {@code user_data} pointer with the submission queue entry {@code sqe}. - * - *

    After the caller has requested an submission queue entry (SQE) with {@link #io_uring_get_sqe get_sqe}, they can associate a data pointer with the SQE. Once the completion - * arrives, the function {@link #io_uring_cqe_get_data cqe_get_data} can be called to identify the user request.

    - */ - public static void io_uring_sqe_set_data(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("void *") long data) { - if (CHECKS) { - check(data); - } - nio_uring_sqe_set_data(sqe.address(), data); - } - - // --- [ io_uring_cqe_get_data ] --- - - /** Unsafe version of: {@link #io_uring_cqe_get_data cqe_get_data} */ - public static native long nio_uring_cqe_get_data(long cqe); - - /** - * Returns the {@code user_data} with the completion queue entry {@code cqe}. - * - *

    After the caller has received a completion queue entry (CQE) with {@link #io_uring_wait_cqe wait_cqe}, they can call the {@code io_uring_cqe_get_data()} function to retrieve - * the {@code user_data} value. This requires that {@code user_data} has been set earlier with the function {@link #io_uring_sqe_set_data sqe_set_data}.

    - */ - @NativeType("void *") - public static long io_uring_cqe_get_data(@NativeType("struct io_uring_cqe const *") IOURingCQE cqe) { - return nio_uring_cqe_get_data(cqe.address()); - } - - // --- [ io_uring_sqe_set_data64 ] --- - - /** Unsafe version of: {@link #io_uring_sqe_set_data64 sqe_set_data64} */ - public static native void nio_uring_sqe_set_data64(long sqe, long data); - - /** - * Assign a 64-bit value to this {@code sqe}, which can get retrieved at completion time with {@link #io_uring_cqe_get_data64 cqe_get_data64}. - * - *

    Just like the non-64 variants, except these store a 64-bit type rather than a data pointer.

    - */ - public static void io_uring_sqe_set_data64(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("__u64") long data) { - nio_uring_sqe_set_data64(sqe.address(), data); - } - - // --- [ io_uring_cqe_get_data64 ] --- - - /** Unsafe version of: {@link #io_uring_cqe_get_data64 cqe_get_data64} */ - public static native long nio_uring_cqe_get_data64(long cqe); - - /** See {@link #io_uring_sqe_set_data64 sqe_set_data64}. */ - @NativeType("__u64") - public static long io_uring_cqe_get_data64(@NativeType("struct io_uring_cqe const *") IOURingCQE cqe) { - return nio_uring_cqe_get_data64(cqe.address()); - } - - // --- [ io_uring_sqe_set_flags ] --- - - /** Unsafe version of: {@link #io_uring_sqe_set_flags sqe_set_flags} */ - public static native void nio_uring_sqe_set_flags(long sqe, int flags); - - /** - * Allows the caller to change the behavior of the submission queue entry by specifying flags. - * - *

    It enables the {@code flags} belonging to the {@code sqe} submission queue entry param.

    - */ - public static void io_uring_sqe_set_flags(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("unsigned int") int flags) { - nio_uring_sqe_set_flags(sqe.address(), flags); - } - - // --- [ io_uring_prep_splice ] --- - - /** Unsafe version of: {@link #io_uring_prep_splice prep_splice} */ - public static native void nio_uring_prep_splice(long sqe, int fd_in, long off_in, int fd_out, long off_out, int nbytes, int splice_flags); - - /** - * Precondition: Either {@code fd_in} or {@code fd_out} must be a pipe. - * - *

    This splice operation can be used to implement {@code sendfile} by splicing to an intermediate pipe first, then splice to the final destination. In - * fact, the implementation of {@code sendfile} in kernel uses {@code splice} internally.

    - * - *

    NOTE that even if {@code fd_in} or {@code fd_out} refers to a pipe, the splice operation can still fail with {@code EINVAL} if one of the fd doesn't - * explicitly support splice operation, e.g. reading from terminal is unsupported from kernel 5.7 to 5.11. Check issue #291 for more information.

    - * - * @param off_in if {@code fd_in} refers to a pipe, {@code off_in} must be {@code (int64_t) -1}; If {@code fd_in} does not refer to a pipe and {@code off_in} is - * {@code (int64_t) -1}, then bytes are read from {@code fd_in} starting from the file offset and it is adjust appropriately; If {@code fd_in} does - * not refer to a pipe and {@code off_in} is not {@code (int64_t) -1}, then the starting {@code offset} of {@code fd_in} will be {@code off_in}. - * @param off_out the description of {@code off_in} also applied to {@code off_out} - * @param splice_flags see man {@code splice(2)} for description of flags - */ - public static void io_uring_prep_splice(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd_in, @NativeType("int64_t") long off_in, int fd_out, @NativeType("int64_t") long off_out, @NativeType("unsigned int") int nbytes, @NativeType("unsigned int") int splice_flags) { - nio_uring_prep_splice(sqe.address(), fd_in, off_in, fd_out, off_out, nbytes, splice_flags); - } - - // --- [ io_uring_prep_tee ] --- - - public static native void nio_uring_prep_tee(long sqe, int fd_in, int fd_out, int nbytes, int splice_flags); - - public static void io_uring_prep_tee(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd_in, int fd_out, @NativeType("unsigned int") int nbytes, @NativeType("unsigned int") int splice_flags) { - nio_uring_prep_tee(sqe.address(), fd_in, fd_out, nbytes, splice_flags); - } - - // --- [ io_uring_prep_readv ] --- - - /** Unsafe version of: {@link #io_uring_prep_readv prep_readv} */ - public static native void nio_uring_prep_readv(long sqe, int fd, long iovecs, int nr_vecs, int offset); - - /** - * Prepares a vectored IO read request. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start reading {@code nr_vecs} into the {@code iovecs} array at - * the specified {@code offset}.

    - * - *

    On files that support seeking, if the {@code offset} is set to -1, the read operation commences at the file offset, and the file offset is incremented - * by the number of bytes read. See {@code read(2)} for more details.

    - * - *

    On files that are not capable of seeking, the offset is ignored.

    - * - *

    After the write has been prepared it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_readv(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct iovec const *") IOVec.Buffer iovecs, int offset) { - nio_uring_prep_readv(sqe.address(), fd, iovecs.address(), iovecs.remaining(), offset); - } - - // --- [ io_uring_prep_readv2 ] --- - - /** Unsafe version of: {@link #io_uring_prep_readv2 prep_readv2} */ - public static native void nio_uring_prep_readv2(long sqe, int fd, long iovecs, int nr_vecs, int offset, int flags); - - /** - * Prepares a vectored IO read request. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start reading {@code nr_vecs} into the {@code iovecs} array at - * the specified {@code offset}.

    - * - *

    The behavior of the function can be controlled with the {@code flags} parameter. Supported values for flags are:

    - * - *
      - *
    • {@code RWF_HIPRI} - High priority request, poll if possible
    • - *
    • {@code RWF_DSYNC} - per-IO {@code O_DSYNC}
    • - *
    • {@code RWF_SYNC} - per-IO {@code O_SYNC}
    • - *
    • {@code RWF_NOWAIT} - per-IO, return {@code -EAGAIN} if operation would block
    • - *
    • {@code RWF_APPEND} - per-IO {@code O_APPEND}
    • - *
    - * - *

    On files that support seeking, if the {@code offset} is set to -1, the read operation commences at the file offset, and the file offset is incremented - * by the number of bytes read. See {@code read(2)} for more details.

    - * - *

    On files that are not capable of seeking, the offset is ignored.

    - * - *

    After the write has been prepared, it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_readv2(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct iovec const *") IOVec.Buffer iovecs, int offset, int flags) { - nio_uring_prep_readv2(sqe.address(), fd, iovecs.address(), iovecs.remaining(), offset, flags); - } - - // --- [ io_uring_prep_read_fixed ] --- - - /** Unsafe version of: {@link #io_uring_prep_read_fixed prep_read_fixed} */ - public static native void nio_uring_prep_read_fixed(long sqe, int fd, long buf, int nbytes, int offset, int buf_index); - - /** - * Prepares an IO read request with a previously registered IO buffer. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start reading {@code nbytes} into the buffer {@code buf} at - * the specified {@code offset}, and with the buffer matching the registered index of {@code buf_index}.

    - * - *

    This work just like {@link #io_uring_prep_read prep_read} except it requires the user of buffers that have been registered with {@link #io_uring_register_buffers register_buffers}. The {@code buf} and - * {@code nbytes} arguments must fall within a region specificed by {@code buf_index} in the previously registered buffer. The buffer need not be aligned - * with the start of the registered buffer.

    - * - *

    After the read has been prepared it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_read_fixed(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("void *") ByteBuffer buf, int offset, int buf_index) { - nio_uring_prep_read_fixed(sqe.address(), fd, memAddress(buf), buf.remaining(), offset, buf_index); - } - - // --- [ io_uring_prep_writev ] --- - - /** Unsafe version of: {@link #io_uring_prep_writev prep_writev} */ - public static native void nio_uring_prep_writev(long sqe, int fd, long iovecs, int nr_vecs, int offset); - - /** - * Prepares a vectored IO write request. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start writing {@code nr_vecs} from the {@code iovecs} array at - * the specified {@code offset}.

    - * - *

    On files that support seeking, if the {@code offset} is set to -1, the write operation commences at the file offset, and the file offset is incremented - * by the number of bytes written. See {@code write(2)} for more details.

    - * - *

    On files that are not capable of seeking, the offset is ignored.

    - * - *

    After the write has been prepared it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_writev(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct iovec const *") IOVec.Buffer iovecs, int offset) { - nio_uring_prep_writev(sqe.address(), fd, iovecs.address(), iovecs.remaining(), offset); - } - - // --- [ io_uring_prep_writev2 ] --- - - /** Unsafe version of: {@link #io_uring_prep_writev2 prep_writev2} */ - public static native void nio_uring_prep_writev2(long sqe, int fd, long iovecs, int nr_vecs, int offset, int flags); - - /** - * Prepares a vectored IO write request. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start writing {@code nr_vecs} from the {@code iovecs} array at - * the specified {@code offset}.

    - * - *

    The behavior of the function can be controlled with the {@code flags} parameter. Supported values for flags are:

    - * - *
      - *
    • {@code RWF_HIPRI} - High priority request, poll if possible
    • - *
    • {@code RWF_DSYNC} - per-IO {@code O_DSYNC}
    • - *
    • {@code RWF_SYNC} - per-IO {@code O_SYNC}
    • - *
    • {@code RWF_NOWAIT} - per-IO, return {@code -EAGAIN} if operation would block
    • - *
    • {@code RWF_APPEND} - per-IO {@code O_APPEND}
    • - *
    - * - *

    On files that support seeking, if the {@code offset} is set to -1, the write operation commences at the file offset, and the file offset is incremented - * by the number of bytes written. See {@code write(2)} for more details.

    - * - *

    On files that are not capable of seeking, the offset is ignored.

    - * - *

    After the write has been prepared, it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_writev2(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct iovec const *") IOVec.Buffer iovecs, int offset, int flags) { - nio_uring_prep_writev2(sqe.address(), fd, iovecs.address(), iovecs.remaining(), offset, flags); - } - - // --- [ io_uring_prep_write_fixed ] --- - - /** Unsafe version of: {@link #io_uring_prep_write_fixed prep_write_fixed} */ - public static native void nio_uring_prep_write_fixed(long sqe, int fd, long buf, int nbytes, int offset, int buf_index); - - /** - * Prepares an IO write request with a previously registered IO buffer. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start writing {@code nbytes} from the buffer {@code buf} at - * the specified {@code offset}, and with the buffer matching the registered index of {@code buf_index}.

    - * - *

    This work just like {@link #io_uring_prep_write prep_write} except it requires the user of buffers that have been registered with {@link #io_uring_register_buffers register_buffers}. The {@code buf} and - * {@code nbytes} arguments must fall within a region specificed by {@code buf_index} in the previously registered buffer. The buffer need not be aligned - * with the start of the registered buffer.

    - * - *

    After the read has been prepared it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_write_fixed(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("void const *") ByteBuffer buf, int offset, int buf_index) { - nio_uring_prep_write_fixed(sqe.address(), fd, memAddress(buf), buf.remaining(), offset, buf_index); - } - - // --- [ io_uring_prep_recvmsg ] --- - - public static native void nio_uring_prep_recvmsg(long sqe, int fd, long msg, int flags); - - public static void io_uring_prep_recvmsg(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct msghdr *") Msghdr msg, @NativeType("unsigned int") int flags) { - nio_uring_prep_recvmsg(sqe.address(), fd, msg.address(), flags); - } - - // --- [ io_uring_prep_recvmsg_multishot ] --- - - public static native void nio_uring_prep_recvmsg_multishot(long sqe, int fd, long msg, int flags); - - public static void io_uring_prep_recvmsg_multishot(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct msghdr *") Msghdr msg, @NativeType("unsigned") int flags) { - nio_uring_prep_recvmsg_multishot(sqe.address(), fd, msg.address(), flags); - } - - // --- [ io_uring_prep_sendmsg ] --- - - public static native void nio_uring_prep_sendmsg(long sqe, int fd, long msg, int flags); - - public static void io_uring_prep_sendmsg(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct msghdr const *") Msghdr msg, @NativeType("unsigned int") int flags) { - if (CHECKS) { - Msghdr.validate(msg.address()); - } - nio_uring_prep_sendmsg(sqe.address(), fd, msg.address(), flags); - } - - // --- [ io_uring_prep_poll_add ] --- - - public static native void nio_uring_prep_poll_add(long sqe, int fd, int poll_mask); - - public static void io_uring_prep_poll_add(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("unsigned int") int poll_mask) { - nio_uring_prep_poll_add(sqe.address(), fd, poll_mask); - } - - // --- [ io_uring_prep_poll_multishot ] --- - - public static native void nio_uring_prep_poll_multishot(long sqe, int fd, int poll_mask); - - public static void io_uring_prep_poll_multishot(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("unsigned int") int poll_mask) { - nio_uring_prep_poll_multishot(sqe.address(), fd, poll_mask); - } - - // --- [ io_uring_prep_poll_remove ] --- - - public static native void nio_uring_prep_poll_remove(long sqe, long user_data); - - public static void io_uring_prep_poll_remove(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("__u64") long user_data) { - nio_uring_prep_poll_remove(sqe.address(), user_data); - } - - // --- [ io_uring_prep_poll_update ] --- - - public static native void nio_uring_prep_poll_update(long sqe, long old_user_data, long new_user_data, int poll_mask, int flags); - - public static void io_uring_prep_poll_update(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("__u64") long old_user_data, @NativeType("__u64") long new_user_data, @NativeType("unsigned int") int poll_mask, @NativeType("unsigned int") int flags) { - nio_uring_prep_poll_update(sqe.address(), old_user_data, new_user_data, poll_mask, flags); - } - - // --- [ io_uring_prep_fsync ] --- - - public static native void nio_uring_prep_fsync(long sqe, int fd, int fsync_flags); - - public static void io_uring_prep_fsync(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("unsigned int") int fsync_flags) { - nio_uring_prep_fsync(sqe.address(), fd, fsync_flags); - } - - // --- [ io_uring_prep_nop ] --- - - public static native void nio_uring_prep_nop(long sqe); - - public static void io_uring_prep_nop(@NativeType("struct io_uring_sqe *") IOURingSQE sqe) { - nio_uring_prep_nop(sqe.address()); - } - - // --- [ io_uring_prep_timeout ] --- - - public static native void nio_uring_prep_timeout(long sqe, long ts, int count, int flags); - - public static void io_uring_prep_timeout(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("struct __kernel_timespec *") KernelTimespec ts, @NativeType("unsigned int") int count, @NativeType("unsigned int") int flags) { - nio_uring_prep_timeout(sqe.address(), ts.address(), count, flags); - } - - // --- [ io_uring_prep_timeout_remove ] --- - - public static native void nio_uring_prep_timeout_remove(long sqe, long user_data, int flags); - - public static void io_uring_prep_timeout_remove(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("__u64") long user_data, @NativeType("unsigned int") int flags) { - nio_uring_prep_timeout_remove(sqe.address(), user_data, flags); - } - - // --- [ io_uring_prep_timeout_update ] --- - - public static native void nio_uring_prep_timeout_update(long sqe, long ts, long user_data, int flags); - - public static void io_uring_prep_timeout_update(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("struct __kernel_timespec *") KernelTimespec ts, @NativeType("__u64") long user_data, @NativeType("unsigned int") int flags) { - nio_uring_prep_timeout_update(sqe.address(), ts.address(), user_data, flags); - } - - // --- [ io_uring_prep_accept ] --- - - public static native void nio_uring_prep_accept(long sqe, int fd, long addr, long addrlen, int flags); - - public static void io_uring_prep_accept(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct sockaddr *") Sockaddr addr, @NativeType("socklen_t *") IntBuffer addrlen, int flags) { - if (CHECKS) { - check(addrlen, 1); - } - nio_uring_prep_accept(sqe.address(), fd, addr.address(), memAddress(addrlen), flags); - } - - // --- [ io_uring_prep_accept_direct ] --- - - public static native void nio_uring_prep_accept_direct(long sqe, int fd, long addr, long addrlen, int flags, int file_index); - - public static void io_uring_prep_accept_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct sockaddr *") Sockaddr addr, @NativeType("socklen_t *") IntBuffer addrlen, int flags, @NativeType("unsigned int") int file_index) { - if (CHECKS) { - check(addrlen, 1); - } - nio_uring_prep_accept_direct(sqe.address(), fd, addr.address(), memAddress(addrlen), flags, file_index); - } - - // --- [ io_uring_prep_multishot_accept ] --- - - public static native void nio_uring_prep_multishot_accept(long sqe, int fd, long addr, long addrlen, int flags); - - public static void io_uring_prep_multishot_accept(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct sockaddr *") Sockaddr addr, @NativeType("socklen_t *") IntBuffer addrlen, int flags) { - if (CHECKS) { - check(addrlen, 1); - } - nio_uring_prep_multishot_accept(sqe.address(), fd, addr.address(), memAddress(addrlen), flags); - } - - // --- [ io_uring_prep_multishot_accept_direct ] --- - - public static native void nio_uring_prep_multishot_accept_direct(long sqe, int fd, long addr, long addrlen, int flags); - - public static void io_uring_prep_multishot_accept_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct sockaddr *") Sockaddr addr, @NativeType("socklen_t *") IntBuffer addrlen, int flags) { - if (CHECKS) { - check(addrlen, 1); - } - nio_uring_prep_multishot_accept_direct(sqe.address(), fd, addr.address(), memAddress(addrlen), flags); - } - - // --- [ io_uring_prep_cancel64 ] --- - - public static native void nio_uring_prep_cancel64(long sqe, long user_data, int flags); - - public static void io_uring_prep_cancel64(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("__u64") long user_data, int flags) { - nio_uring_prep_cancel64(sqe.address(), user_data, flags); - } - - // --- [ io_uring_prep_cancel ] --- - - public static native void nio_uring_prep_cancel(long sqe, long user_data, int flags); - - public static void io_uring_prep_cancel(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("void *") long user_data, int flags) { - if (CHECKS) { - check(user_data); - } - nio_uring_prep_cancel(sqe.address(), user_data, flags); - } - - // --- [ io_uring_prep_cancel_fd ] --- - - public static native void nio_uring_prep_cancel_fd(long sqe, int fd, int flags); - - public static void io_uring_prep_cancel_fd(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("unsigned int") int flags) { - nio_uring_prep_cancel_fd(sqe.address(), fd, flags); - } - - // --- [ io_uring_prep_link_timeout ] --- - - public static native void nio_uring_prep_link_timeout(long sqe, long ts, int flags); - - public static void io_uring_prep_link_timeout(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("struct __kernel_timespec *") KernelTimespec ts, @NativeType("unsigned int") int flags) { - nio_uring_prep_link_timeout(sqe.address(), ts.address(), flags); - } - - // --- [ io_uring_prep_connect ] --- - - public static native void nio_uring_prep_connect(long sqe, int fd, long addr, int addrlen); - - public static void io_uring_prep_connect(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct sockaddr const *") Sockaddr addr, @NativeType("socklen_t") int addrlen) { - nio_uring_prep_connect(sqe.address(), fd, addr.address(), addrlen); - } - - // --- [ io_uring_prep_files_update ] --- - - public static native void nio_uring_prep_files_update(long sqe, long fds, int nr_fds, int offset); - - public static void io_uring_prep_files_update(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("int *") IntBuffer fds, int offset) { - nio_uring_prep_files_update(sqe.address(), memAddress(fds), fds.remaining(), offset); - } - - // --- [ io_uring_prep_fallocate ] --- - - public static native void nio_uring_prep_fallocate(long sqe, int fd, int mode, long offset, long len); - - public static void io_uring_prep_fallocate(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, int mode, @NativeType("off_t") long offset, @NativeType("off_t") long len) { - nio_uring_prep_fallocate(sqe.address(), fd, mode, offset, len); - } - - // --- [ io_uring_prep_openat ] --- - - public static native void nio_uring_prep_openat(long sqe, int dfd, long path, int flags, int mode); - - public static void io_uring_prep_openat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") ByteBuffer path, int flags, int mode) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_openat(sqe.address(), dfd, memAddress(path), flags, mode); - } - - public static void io_uring_prep_openat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") CharSequence path, int flags, int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_openat(sqe.address(), dfd, pathEncoded, flags, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_openat_direct ] --- - - public static native void nio_uring_prep_openat_direct(long sqe, int dfd, long path, int flags, int mode, int file_index); - - public static void io_uring_prep_openat_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") ByteBuffer path, int flags, int mode, @NativeType("unsigned int") int file_index) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_openat_direct(sqe.address(), dfd, memAddress(path), flags, mode, file_index); - } - - public static void io_uring_prep_openat_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") CharSequence path, int flags, int mode, @NativeType("unsigned int") int file_index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_openat_direct(sqe.address(), dfd, pathEncoded, flags, mode, file_index); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_close ] --- - - public static native void nio_uring_prep_close(long sqe, int fd); - - public static void io_uring_prep_close(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd) { - nio_uring_prep_close(sqe.address(), fd); - } - - // --- [ io_uring_prep_close_direct ] --- - - public static native void nio_uring_prep_close_direct(long sqe, int file_index); - - public static void io_uring_prep_close_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("unsigned int") int file_index) { - nio_uring_prep_close_direct(sqe.address(), file_index); - } - - // --- [ io_uring_prep_read ] --- - - /** Unsafe version of: {@link #io_uring_prep_read prep_read} */ - public static native void nio_uring_prep_read(long sqe, int fd, long buf, int nbytes, int offset); - - /** - * Prepares an IO read request. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start reading {@code nbytes} into the buffer {@code buf} at - * the specified {@code offset}.

    - * - *

    On files that support seeking, if the {@code offset} is set to -1, the read operation commences at the file offset, and the file offset is incremented - * by the number of bytes read. See {@code read(2)} for more details.

    - * - *

    On files that are not capable of seeking, the {@code offset} is ignored.

    - * - *

    After the read has been prepared it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_read(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("void *") ByteBuffer buf, int offset) { - nio_uring_prep_read(sqe.address(), fd, memAddress(buf), buf.remaining(), offset); - } - - // --- [ io_uring_prep_write ] --- - - /** Unsafe version of: {@link #io_uring_prep_write prep_write} */ - public static native void nio_uring_prep_write(long sqe, int fd, long buf, int nbytes, int offset); - - /** - * Prepares an IO write request. - * - *

    The submission queue entry {@code sqe} is setup to use the file descriptor {@code fd} to start writing {@code nbytes} from the buffer {@code buf} at - * the specified {@code offset}.

    - * - *

    On files that support seeking, if the {@code offset} is set to -1, the write operation commences at the file offset, and the file offset is incremented - * by the number of bytes written. See {@code write(2)} for more details.

    - * - *

    On files that are not capable of seeking, the offset is ignored.

    - * - *

    After the write has been prepared, it can be submitted with one of the submit functions.

    - */ - public static void io_uring_prep_write(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("void const *") ByteBuffer buf, int offset) { - nio_uring_prep_write(sqe.address(), fd, memAddress(buf), buf.remaining(), offset); - } - - // --- [ io_uring_prep_statx ] --- - - public static native void nio_uring_prep_statx(long sqe, int dfd, long path, int flags, int mask, long statxbuf); - - public static void io_uring_prep_statx(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") ByteBuffer path, int flags, @NativeType("unsigned int") int mask, @NativeType("struct statx *") Statx statxbuf) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_statx(sqe.address(), dfd, memAddress(path), flags, mask, statxbuf.address()); - } - - public static void io_uring_prep_statx(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") CharSequence path, int flags, @NativeType("unsigned int") int mask, @NativeType("struct statx *") Statx statxbuf) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_statx(sqe.address(), dfd, pathEncoded, flags, mask, statxbuf.address()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_fadvise ] --- - - public static native void nio_uring_prep_fadvise(long sqe, int fd, int offset, long len, int advice); - - public static void io_uring_prep_fadvise(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, int offset, @NativeType("off_t") long len, int advice) { - nio_uring_prep_fadvise(sqe.address(), fd, offset, len, advice); - } - - // --- [ io_uring_prep_madvise ] --- - - public static native void nio_uring_prep_madvise(long sqe, long addr, long length, int advice); - - public static void io_uring_prep_madvise(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("void *") ByteBuffer addr, int advice) { - nio_uring_prep_madvise(sqe.address(), memAddress(addr), addr.remaining(), advice); - } - - // --- [ io_uring_prep_send ] --- - - public static native void nio_uring_prep_send(long sqe, int sockfd, long buf, long len, int flags); - - public static void io_uring_prep_send(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int sockfd, @NativeType("void const *") ByteBuffer buf, int flags) { - nio_uring_prep_send(sqe.address(), sockfd, memAddress(buf), buf.remaining(), flags); - } - - // --- [ io_uring_prep_send_set_addr ] --- - - public static native void nio_uring_prep_send_set_addr(long sqe, long dest_addr, short addr_len); - - public static void io_uring_prep_send_set_addr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("struct sockaddr const *") Sockaddr dest_addr, @NativeType("__u16") short addr_len) { - nio_uring_prep_send_set_addr(sqe.address(), dest_addr.address(), addr_len); - } - - // --- [ io_uring_prep_sendto ] --- - - public static native void nio_uring_prep_sendto(long sqe, int sockfd, long buf, long len, int flags, long addr, int addrlen); - - public static void io_uring_prep_sendto(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int sockfd, @NativeType("void const *") ByteBuffer buf, int flags, @NativeType("struct sockaddr const *") Sockaddr addr, @NativeType("socklen_t") int addrlen) { - nio_uring_prep_sendto(sqe.address(), sockfd, memAddress(buf), buf.remaining(), flags, addr.address(), addrlen); - } - - // --- [ io_uring_prep_send_zc ] --- - - public static native void nio_uring_prep_send_zc(long sqe, int sockfd, long buf, long len, int flags, int zc_flags); - - public static void io_uring_prep_send_zc(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int sockfd, @NativeType("void const *") ByteBuffer buf, int flags, @NativeType("unsigned") int zc_flags) { - nio_uring_prep_send_zc(sqe.address(), sockfd, memAddress(buf), buf.remaining(), flags, zc_flags); - } - - // --- [ io_uring_prep_send_zc_fixed ] --- - - public static native void nio_uring_prep_send_zc_fixed(long sqe, int sockfd, long buf, long len, int flags, int zc_flags, int buf_index); - - public static void io_uring_prep_send_zc_fixed(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int sockfd, @NativeType("void const *") ByteBuffer buf, int flags, @NativeType("unsigned") int zc_flags, @NativeType("unsigned") int buf_index) { - nio_uring_prep_send_zc_fixed(sqe.address(), sockfd, memAddress(buf), buf.remaining(), flags, zc_flags, buf_index); - } - - // --- [ io_uring_prep_sendmsg_zc ] --- - - public static native void nio_uring_prep_sendmsg_zc(long sqe, int fd, long msg, int flags); - - public static void io_uring_prep_sendmsg_zc(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("struct msghdr const *") Msghdr msg, @NativeType("unsigned") int flags) { - if (CHECKS) { - Msghdr.validate(msg.address()); - } - nio_uring_prep_sendmsg_zc(sqe.address(), fd, msg.address(), flags); - } - - // --- [ io_uring_prep_recv ] --- - - public static native void nio_uring_prep_recv(long sqe, int sockfd, long buf, long len, int flags); - - public static void io_uring_prep_recv(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int sockfd, @NativeType("void *") ByteBuffer buf, int flags) { - nio_uring_prep_recv(sqe.address(), sockfd, memAddress(buf), buf.remaining(), flags); - } - - // --- [ io_uring_prep_recv_multishot ] --- - - public static native void nio_uring_prep_recv_multishot(long sqe, int sockfd, long buf, long len, int flags); - - public static void io_uring_prep_recv_multishot(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int sockfd, @NativeType("void *") ByteBuffer buf, int flags) { - nio_uring_prep_recv_multishot(sqe.address(), sockfd, memAddress(buf), buf.remaining(), flags); - } - - // --- [ io_uring_recvmsg_validate ] --- - - public static native long nio_uring_recvmsg_validate(long buf, int buf_len, long msgh); - - @Nullable - @NativeType("struct io_uring_recvmsg_out *") - public static IOURingRecvmsgOut io_uring_recvmsg_validate(@NativeType("void *") ByteBuffer buf, @NativeType("struct msghdr *") Msghdr msgh) { - long __result = nio_uring_recvmsg_validate(memAddress(buf), buf.remaining(), msgh.address()); - return IOURingRecvmsgOut.createSafe(__result); - } - - // --- [ io_uring_recvmsg_name ] --- - - public static native long nio_uring_recvmsg_name(long o); - - @NativeType("void *") - public static long io_uring_recvmsg_name(@NativeType("struct io_uring_recvmsg_out *") IOURingRecvmsgOut o) { - return nio_uring_recvmsg_name(o.address()); - } - - // --- [ io_uring_recvmsg_cmsg_firsthdr ] --- - - public static native long nio_uring_recvmsg_cmsg_firsthdr(long o, long msgh); - - @Nullable - @NativeType("struct cmsghdr *") - public static CMsghdr io_uring_recvmsg_cmsg_firsthdr(@NativeType("struct io_uring_recvmsg_out *") IOURingRecvmsgOut o, @NativeType("struct msghdr *") Msghdr msgh) { - long __result = nio_uring_recvmsg_cmsg_firsthdr(o.address(), msgh.address()); - return CMsghdr.createSafe(__result); - } - - // --- [ io_uring_recvmsg_cmsg_nexthdr ] --- - - public static native long nio_uring_recvmsg_cmsg_nexthdr(long o, long msgh, long cmsg); - - @Nullable - @NativeType("struct cmsghdr *") - public static CMsghdr io_uring_recvmsg_cmsg_nexthdr(@NativeType("struct io_uring_recvmsg_out *") IOURingRecvmsgOut o, @NativeType("struct msghdr *") Msghdr msgh, @NativeType("struct cmsghdr *") CMsghdr cmsg) { - long __result = nio_uring_recvmsg_cmsg_nexthdr(o.address(), msgh.address(), cmsg.address()); - return CMsghdr.createSafe(__result); - } - - // --- [ io_uring_recvmsg_payload ] --- - - public static native long nio_uring_recvmsg_payload(long o, long msgh); - - @NativeType("void *") - public static long io_uring_recvmsg_payload(@NativeType("struct io_uring_recvmsg_out *") IOURingRecvmsgOut o, @NativeType("struct msghdr *") Msghdr msgh) { - return nio_uring_recvmsg_payload(o.address(), msgh.address()); - } - - // --- [ io_uring_recvmsg_payload_length ] --- - - public static native int nio_uring_recvmsg_payload_length(long o, int buf_len, long msgh); - - @NativeType("unsigned int") - public static int io_uring_recvmsg_payload_length(@NativeType("struct io_uring_recvmsg_out *") IOURingRecvmsgOut o, int buf_len, @NativeType("struct msghdr *") Msghdr msgh) { - return nio_uring_recvmsg_payload_length(o.address(), buf_len, msgh.address()); - } - - // --- [ io_uring_prep_openat2 ] --- - - public static native void nio_uring_prep_openat2(long sqe, int dfd, long path, long how); - - public static void io_uring_prep_openat2(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") ByteBuffer path, @NativeType("struct open_how *") OpenHow how) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_openat2(sqe.address(), dfd, memAddress(path), how.address()); - } - - public static void io_uring_prep_openat2(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") CharSequence path, @NativeType("struct open_how *") OpenHow how) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_openat2(sqe.address(), dfd, pathEncoded, how.address()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_openat2_direct ] --- - - /** Unsafe version of: {@link #io_uring_prep_openat2_direct prep_openat2_direct} */ - public static native void nio_uring_prep_openat2_direct(long sqe, int dfd, long path, long how, int file_index); - - /** open directly into the fixed file table */ - public static void io_uring_prep_openat2_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") ByteBuffer path, @NativeType("struct open_how *") OpenHow how, @NativeType("unsigned int") int file_index) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_openat2_direct(sqe.address(), dfd, memAddress(path), how.address(), file_index); - } - - /** open directly into the fixed file table */ - public static void io_uring_prep_openat2_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") CharSequence path, @NativeType("struct open_how *") OpenHow how, @NativeType("unsigned int") int file_index) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_openat2_direct(sqe.address(), dfd, pathEncoded, how.address(), file_index); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_epoll_ctl ] --- - - public static native void nio_uring_prep_epoll_ctl(long sqe, int epfd, int fd, int op, long ev); - - public static void io_uring_prep_epoll_ctl(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int epfd, int fd, int op, @NativeType("struct epoll_event *") EpollEvent ev) { - nio_uring_prep_epoll_ctl(sqe.address(), epfd, fd, op, ev.address()); - } - - // --- [ io_uring_prep_provide_buffers ] --- - - public static native void nio_uring_prep_provide_buffers(long sqe, long addr, int len, int nr, int bgid, int bid); - - public static void io_uring_prep_provide_buffers(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("void *") ByteBuffer addr, int nr, int bgid, int bid) { - nio_uring_prep_provide_buffers(sqe.address(), memAddress(addr), addr.remaining(), nr, bgid, bid); - } - - // --- [ io_uring_prep_remove_buffers ] --- - - public static native void nio_uring_prep_remove_buffers(long sqe, int nr, int bgid); - - public static void io_uring_prep_remove_buffers(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int nr, int bgid) { - nio_uring_prep_remove_buffers(sqe.address(), nr, bgid); - } - - // --- [ io_uring_prep_shutdown ] --- - - public static native void nio_uring_prep_shutdown(long sqe, int fd, int how); - - public static void io_uring_prep_shutdown(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, int how) { - nio_uring_prep_shutdown(sqe.address(), fd, how); - } - - // --- [ io_uring_prep_unlinkat ] --- - - public static native void nio_uring_prep_unlinkat(long sqe, int dfd, long path, int flags); - - public static void io_uring_prep_unlinkat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") ByteBuffer path, int flags) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_unlinkat(sqe.address(), dfd, memAddress(path), flags); - } - - public static void io_uring_prep_unlinkat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") CharSequence path, int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_unlinkat(sqe.address(), dfd, pathEncoded, flags); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_unlink ] --- - - public static native void nio_uring_prep_unlink(long sqe, long path, int flags); - - public static void io_uring_prep_unlink(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer path, int flags) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_unlink(sqe.address(), memAddress(path), flags); - } - - public static void io_uring_prep_unlink(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence path, int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_unlink(sqe.address(), pathEncoded, flags); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_renameat ] --- - - public static native void nio_uring_prep_renameat(long sqe, int olddfd, long oldpath, int newdfd, long newpath, int flags); - - public static void io_uring_prep_renameat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int olddfd, @NativeType("char const *") ByteBuffer oldpath, int newdfd, @NativeType("char const *") ByteBuffer newpath, @NativeType("unsigned int") int flags) { - if (CHECKS) { - checkNT1(oldpath); - checkNT1(newpath); - } - nio_uring_prep_renameat(sqe.address(), olddfd, memAddress(oldpath), newdfd, memAddress(newpath), flags); - } - - public static void io_uring_prep_renameat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int olddfd, @NativeType("char const *") CharSequence oldpath, int newdfd, @NativeType("char const *") CharSequence newpath, @NativeType("unsigned int") int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(oldpath, true); - long oldpathEncoded = stack.getPointerAddress(); - stack.nUTF8(newpath, true); - long newpathEncoded = stack.getPointerAddress(); - nio_uring_prep_renameat(sqe.address(), olddfd, oldpathEncoded, newdfd, newpathEncoded, flags); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_rename ] --- - - public static native void nio_uring_prep_rename(long sqe, long oldpath, long newpath); - - public static void io_uring_prep_rename(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer oldpath, @NativeType("char const *") ByteBuffer newpath) { - if (CHECKS) { - checkNT1(oldpath); - checkNT1(newpath); - } - nio_uring_prep_rename(sqe.address(), memAddress(oldpath), memAddress(newpath)); - } - - public static void io_uring_prep_rename(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence oldpath, @NativeType("char const *") CharSequence newpath) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(oldpath, true); - long oldpathEncoded = stack.getPointerAddress(); - stack.nUTF8(newpath, true); - long newpathEncoded = stack.getPointerAddress(); - nio_uring_prep_rename(sqe.address(), oldpathEncoded, newpathEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_sync_file_range ] --- - - public static native void nio_uring_prep_sync_file_range(long sqe, int fd, int len, int offset, int flags); - - public static void io_uring_prep_sync_file_range(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("unsigned int") int len, int offset, int flags) { - nio_uring_prep_sync_file_range(sqe.address(), fd, len, offset, flags); - } - - // --- [ io_uring_prep_mkdirat ] --- - - public static native void nio_uring_prep_mkdirat(long sqe, int dfd, long path, int mode); - - public static void io_uring_prep_mkdirat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") ByteBuffer path, int mode) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_mkdirat(sqe.address(), dfd, memAddress(path), mode); - } - - public static void io_uring_prep_mkdirat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int dfd, @NativeType("char const *") CharSequence path, int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_mkdirat(sqe.address(), dfd, pathEncoded, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_mkdir ] --- - - public static native void nio_uring_prep_mkdir(long sqe, long path, int mode); - - public static void io_uring_prep_mkdir(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer path, int mode) { - if (CHECKS) { - checkNT1(path); - } - nio_uring_prep_mkdir(sqe.address(), memAddress(path), mode); - } - - public static void io_uring_prep_mkdir(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence path, int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_mkdir(sqe.address(), pathEncoded, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_symlinkat ] --- - - public static native void nio_uring_prep_symlinkat(long sqe, long target, int newdirfd, long linkpath); - - public static void io_uring_prep_symlinkat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer target, int newdirfd, @NativeType("char const *") ByteBuffer linkpath) { - if (CHECKS) { - checkNT1(target); - checkNT1(linkpath); - } - nio_uring_prep_symlinkat(sqe.address(), memAddress(target), newdirfd, memAddress(linkpath)); - } - - public static void io_uring_prep_symlinkat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence target, int newdirfd, @NativeType("char const *") CharSequence linkpath) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(target, true); - long targetEncoded = stack.getPointerAddress(); - stack.nUTF8(linkpath, true); - long linkpathEncoded = stack.getPointerAddress(); - nio_uring_prep_symlinkat(sqe.address(), targetEncoded, newdirfd, linkpathEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_symlink ] --- - - public static native void nio_uring_prep_symlink(long sqe, long target, long linkpath); - - public static void io_uring_prep_symlink(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer target, @NativeType("char const *") ByteBuffer linkpath) { - if (CHECKS) { - checkNT1(target); - checkNT1(linkpath); - } - nio_uring_prep_symlink(sqe.address(), memAddress(target), memAddress(linkpath)); - } - - public static void io_uring_prep_symlink(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence target, @NativeType("char const *") CharSequence linkpath) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(target, true); - long targetEncoded = stack.getPointerAddress(); - stack.nUTF8(linkpath, true); - long linkpathEncoded = stack.getPointerAddress(); - nio_uring_prep_symlink(sqe.address(), targetEncoded, linkpathEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_linkat ] --- - - public static native void nio_uring_prep_linkat(long sqe, int olddfd, long oldpath, int newdfd, long newpath, int flags); - - public static void io_uring_prep_linkat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int olddfd, @NativeType("char const *") ByteBuffer oldpath, int newdfd, @NativeType("char const *") ByteBuffer newpath, int flags) { - if (CHECKS) { - checkNT1(oldpath); - checkNT1(newpath); - } - nio_uring_prep_linkat(sqe.address(), olddfd, memAddress(oldpath), newdfd, memAddress(newpath), flags); - } - - public static void io_uring_prep_linkat(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int olddfd, @NativeType("char const *") CharSequence oldpath, int newdfd, @NativeType("char const *") CharSequence newpath, int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(oldpath, true); - long oldpathEncoded = stack.getPointerAddress(); - stack.nUTF8(newpath, true); - long newpathEncoded = stack.getPointerAddress(); - nio_uring_prep_linkat(sqe.address(), olddfd, oldpathEncoded, newdfd, newpathEncoded, flags); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_link ] --- - - public static native void nio_uring_prep_link(long sqe, long oldpath, long newpath, int flags); - - public static void io_uring_prep_link(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer oldpath, @NativeType("char const *") ByteBuffer newpath, int flags) { - if (CHECKS) { - checkNT1(oldpath); - checkNT1(newpath); - } - nio_uring_prep_link(sqe.address(), memAddress(oldpath), memAddress(newpath), flags); - } - - public static void io_uring_prep_link(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence oldpath, @NativeType("char const *") CharSequence newpath, int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(oldpath, true); - long oldpathEncoded = stack.getPointerAddress(); - stack.nUTF8(newpath, true); - long newpathEncoded = stack.getPointerAddress(); - nio_uring_prep_link(sqe.address(), oldpathEncoded, newpathEncoded, flags); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_msg_ring_cqe_flags ] --- - - public static native void nio_uring_prep_msg_ring_cqe_flags(long sqe, int fd, int len, long data, int flags, int cqe_flags); - - public static void io_uring_prep_msg_ring_cqe_flags(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("unsigned int") int len, @NativeType("__u64") long data, @NativeType("unsigned int") int flags, @NativeType("unsigned int") int cqe_flags) { - nio_uring_prep_msg_ring_cqe_flags(sqe.address(), fd, len, data, flags, cqe_flags); - } - - // --- [ io_uring_prep_msg_ring ] --- - - public static native void nio_uring_prep_msg_ring(long sqe, int fd, int len, long data, int flags); - - public static void io_uring_prep_msg_ring(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("unsigned int") int len, @NativeType("__u64") long data, @NativeType("unsigned int") int flags) { - nio_uring_prep_msg_ring(sqe.address(), fd, len, data, flags); - } - - // --- [ io_uring_prep_msg_ring_fd ] --- - - public static native void nio_uring_prep_msg_ring_fd(long sqe, int fd, int source_fd, int target_fd, long data, int flags); - - public static void io_uring_prep_msg_ring_fd(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, int source_fd, int target_fd, @NativeType("__u64") long data, @NativeType("unsigned int") int flags) { - nio_uring_prep_msg_ring_fd(sqe.address(), fd, source_fd, target_fd, data, flags); - } - - // --- [ io_uring_prep_msg_ring_fd_alloc ] --- - - public static native void nio_uring_prep_msg_ring_fd_alloc(long sqe, int fd, int source_fd, long data, int flags); - - public static void io_uring_prep_msg_ring_fd_alloc(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, int source_fd, @NativeType("__u64") long data, @NativeType("unsigned int") int flags) { - nio_uring_prep_msg_ring_fd_alloc(sqe.address(), fd, source_fd, data, flags); - } - - // --- [ io_uring_prep_getxattr ] --- - - public static native void nio_uring_prep_getxattr(long sqe, long name, long value, long path, int len); - - public static void io_uring_prep_getxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer name, @NativeType("char *") ByteBuffer value, @NativeType("char const *") ByteBuffer path) { - if (CHECKS) { - checkNT1(name); - checkNT1(path); - } - nio_uring_prep_getxattr(sqe.address(), memAddress(name), memAddress(value), memAddress(path), value.remaining()); - } - - public static void io_uring_prep_getxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence name, @NativeType("char *") ByteBuffer value, @NativeType("char const *") CharSequence path) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_getxattr(sqe.address(), nameEncoded, memAddress(value), pathEncoded, value.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_setxattr ] --- - - public static native void nio_uring_prep_setxattr(long sqe, long name, long value, long path, int flags, int len); - - public static void io_uring_prep_setxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") ByteBuffer name, @NativeType("char const *") ByteBuffer value, @NativeType("char const *") ByteBuffer path, int flags) { - if (CHECKS) { - checkNT1(name); - checkNT1(path); - } - nio_uring_prep_setxattr(sqe.address(), memAddress(name), memAddress(value), memAddress(path), flags, value.remaining()); - } - - public static void io_uring_prep_setxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, @NativeType("char const *") CharSequence name, @NativeType("char const *") ByteBuffer value, @NativeType("char const *") CharSequence path, int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - stack.nUTF8(path, true); - long pathEncoded = stack.getPointerAddress(); - nio_uring_prep_setxattr(sqe.address(), nameEncoded, memAddress(value), pathEncoded, flags, value.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_fgetxattr ] --- - - public static native void nio_uring_prep_fgetxattr(long sqe, int fd, long name, long value, int len); - - public static void io_uring_prep_fgetxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("char const *") ByteBuffer name, @NativeType("char *") ByteBuffer value) { - if (CHECKS) { - checkNT1(name); - } - nio_uring_prep_fgetxattr(sqe.address(), fd, memAddress(name), memAddress(value), value.remaining()); - } - - public static void io_uring_prep_fgetxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("char const *") CharSequence name, @NativeType("char *") ByteBuffer value) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - nio_uring_prep_fgetxattr(sqe.address(), fd, nameEncoded, memAddress(value), value.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_fsetxattr ] --- - - public static native void nio_uring_prep_fsetxattr(long sqe, int fd, long name, long value, int flags, int len); - - public static void io_uring_prep_fsetxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("char const *") ByteBuffer name, @NativeType("char const *") ByteBuffer value, int flags) { - if (CHECKS) { - checkNT1(name); - } - nio_uring_prep_fsetxattr(sqe.address(), fd, memAddress(name), memAddress(value), flags, value.remaining()); - } - - public static void io_uring_prep_fsetxattr(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int fd, @NativeType("char const *") CharSequence name, @NativeType("char const *") ByteBuffer value, int flags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - nio_uring_prep_fsetxattr(sqe.address(), fd, nameEncoded, memAddress(value), flags, value.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ io_uring_prep_socket ] --- - - public static native void nio_uring_prep_socket(long sqe, int domain, int type, int protocol, int flags); - - public static void io_uring_prep_socket(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int domain, int type, int protocol, @NativeType("unsigned int") int flags) { - nio_uring_prep_socket(sqe.address(), domain, type, protocol, flags); - } - - // --- [ io_uring_prep_socket_direct ] --- - - public static native void nio_uring_prep_socket_direct(long sqe, int domain, int type, int protocol, int file_index, int flags); - - public static void io_uring_prep_socket_direct(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int domain, int type, int protocol, @NativeType("unsigned int") int file_index, @NativeType("unsigned int") int flags) { - nio_uring_prep_socket_direct(sqe.address(), domain, type, protocol, file_index, flags); - } - - // --- [ io_uring_prep_socket_direct_alloc ] --- - - public static native void nio_uring_prep_socket_direct_alloc(long sqe, int domain, int type, int protocol, int flags); - - public static void io_uring_prep_socket_direct_alloc(@NativeType("struct io_uring_sqe *") IOURingSQE sqe, int domain, int type, int protocol, @NativeType("unsigned int") int flags) { - nio_uring_prep_socket_direct_alloc(sqe.address(), domain, type, protocol, flags); - } - - // --- [ io_uring_sq_ready ] --- - - /** Unsafe version of: {@link #io_uring_sq_ready sq_ready} */ - public static native int nio_uring_sq_ready(long ring); - - /** Returns the number of unconsumed (if {@code SQPOLL}) or unsubmitted entries that exist in the SQ ring belonging to the {@code ring} param. */ - @NativeType("unsigned int") - public static int io_uring_sq_ready(@NativeType("struct io_uring const *") IOURing ring) { - if (CHECKS) { - IOURing.validate(ring.address()); - } - return nio_uring_sq_ready(ring.address()); - } - - // --- [ io_uring_sq_space_left ] --- - - /** Unsafe version of: {@link #io_uring_sq_space_left sq_space_left} */ - public static native int nio_uring_sq_space_left(long ring); - - /** Returns how much space is left in the SQ ring belonging to the {@code ring} param. */ - @NativeType("unsigned int") - public static int io_uring_sq_space_left(@NativeType("struct io_uring const *") IOURing ring) { - if (CHECKS) { - IOURing.validate(ring.address()); - } - return nio_uring_sq_space_left(ring.address()); - } - - // --- [ io_uring_sqring_wait ] --- - - /** Unsafe version of: {@link #io_uring_sqring_wait sqring_wait} */ - public static native int nio_uring_sqring_wait(long ring); - - /** - * Allows the caller to wait for space to free up in the SQ ring belonging to the {@code ring} param, which happens when the kernel side thread has - * consumed one or more entries. - * - *

    If the SQ ring is currently non-full, no action is taken.

    - * - *

    This feature can only be used when {@code SQPOLL} is enabled.

    - */ - public static int io_uring_sqring_wait(@NativeType("struct io_uring *") IOURing ring) { - return nio_uring_sqring_wait(ring.address()); - } - - // --- [ io_uring_cq_ready ] --- - - /** Unsafe version of: {@link #io_uring_cq_ready cq_ready} */ - public static native int nio_uring_cq_ready(long ring); - - /** Retuns the number of unconsumed entries that are ready belonging to the {@code ring} param. */ - @NativeType("unsigned int") - public static int io_uring_cq_ready(@NativeType("struct io_uring const *") IOURing ring) { - if (CHECKS) { - IOURing.validate(ring.address()); - } - return nio_uring_cq_ready(ring.address()); - } - - // --- [ io_uring_cq_has_overflow ] --- - - /** Unsafe version of: {@link #io_uring_cq_has_overflow cq_has_overflow} */ - public static native boolean nio_uring_cq_has_overflow(long ring); - - /** Returns true if there are overflow entries waiting to be flushed onto the CQ ring */ - @NativeType("bool") - public static boolean io_uring_cq_has_overflow(@NativeType("struct io_uring const *") IOURing ring) { - if (CHECKS) { - IOURing.validate(ring.address()); - } - return nio_uring_cq_has_overflow(ring.address()); - } - - // --- [ io_uring_cq_eventfd_enabled ] --- - - /** Unsafe version of: {@link #io_uring_cq_eventfd_enabled cq_eventfd_enabled} */ - public static native boolean nio_uring_cq_eventfd_enabled(long ring); - - /** Returns true if the {@code eventfd} notification is currently enabled. */ - @NativeType("bool") - public static boolean io_uring_cq_eventfd_enabled(@NativeType("struct io_uring const *") IOURing ring) { - if (CHECKS) { - IOURing.validate(ring.address()); - } - return nio_uring_cq_eventfd_enabled(ring.address()); - } - - // --- [ io_uring_cq_eventfd_toggle ] --- - - /** Unsafe version of: {@link #io_uring_cq_eventfd_toggle cq_eventfd_toggle} */ - public static native int nio_uring_cq_eventfd_toggle(long ring, boolean enabled); - - /** Toggle {@code eventfd} notification on or off, if an {@code eventfd} is registered with the ring. */ - public static int io_uring_cq_eventfd_toggle(@NativeType("struct io_uring *") IOURing ring, @NativeType("bool") boolean enabled) { - return nio_uring_cq_eventfd_toggle(ring.address(), enabled); - } - - // --- [ io_uring_wait_cqe_nr ] --- - - /** Unsafe version of: {@link #io_uring_wait_cqe_nr wait_cqe_nr} */ - public static native int nio_uring_wait_cqe_nr(long ring, long cqe_ptr, int wait_nr); - - /** - * Returns {@code wait_nr} IO completion events from the queue belonging to the {@code ring} param, waiting for it if necessary. The {@code cqe_ptr} param - * is filled in on success. - * - *

    After the caller has submitted a request with {@link #io_uring_submit submit}, they can retrieve the completion with {@code io_uring_wait_cqe_nr()}.

    - * - * @return 0 on success and the {@code cqe_ptr} param is filled in. On failure it returns {@code -errno}. - */ - public static int io_uring_wait_cqe_nr(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe **") PointerBuffer cqe_ptr) { - return nio_uring_wait_cqe_nr(ring.address(), memAddress(cqe_ptr), cqe_ptr.remaining()); - } - - // --- [ io_uring_peek_cqe ] --- - - /** Unsafe version of: {@link #io_uring_peek_cqe peek_cqe} */ - public static native int nio_uring_peek_cqe(long ring, long cqe_ptr); - - /** - * Returns an IO completion, if one is readily available. - * - * @return 0 with {@code cqe_ptr} filled in on success, {@code -errno} on failure - */ - public static int io_uring_peek_cqe(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe **") PointerBuffer cqe_ptr) { - if (CHECKS) { - check(cqe_ptr, 1); - } - return nio_uring_peek_cqe(ring.address(), memAddress(cqe_ptr)); - } - - // --- [ io_uring_wait_cqe ] --- - - /** Unsafe version of: {@link #io_uring_wait_cqe wait_cqe} */ - public static native int nio_uring_wait_cqe(long ring, long cqe_ptr); - - /** - * Returns an IO completion from the queue belonging to the {@code ring} param, waiting for it if necessary. The {@code cqe_ptr} param is filled in on - * success. - * - *

    After the caller has submitted a request with {@link #io_uring_submit submit}, they can retrieve the completion with {@code io_uring_wait_cqe()}.

    - * - * @return 0 on success and the {@code cqe_ptr} param is filled in. On failure it returns {@code -errno}. - */ - public static int io_uring_wait_cqe(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_cqe **") PointerBuffer cqe_ptr) { - if (CHECKS) { - check(cqe_ptr, 1); - } - return nio_uring_wait_cqe(ring.address(), memAddress(cqe_ptr)); - } - - // --- [ io_uring_buf_ring_advance ] --- - - public static native void nio_uring_buf_ring_advance(long br, int count); - - public static void io_uring_buf_ring_advance(@NativeType("struct io_uring_buf_ring *") IOURingBufRing br, int count) { - nio_uring_buf_ring_advance(br.address(), count); - } - - // --- [ io_uring_buf_ring_cq_advance ] --- - - public static native void nio_uring_buf_ring_cq_advance(long ring, long br, int count); - - public static void io_uring_buf_ring_cq_advance(@NativeType("struct io_uring *") IOURing ring, @NativeType("struct io_uring_buf_ring *") IOURingBufRing br, int count) { - nio_uring_buf_ring_cq_advance(ring.address(), br.address(), count); - } - - // --- [ io_uring_get_sqe ] --- - - /** Unsafe version of: {@link #io_uring_get_sqe get_sqe} */ - public static native long nio_uring_get_sqe(long ring); - - /** - * Gets the next available submission queue entry from the submission queue belonging to the {@code ring} param. - * - *

    If a submission queue event is returned, it should be filled out via one of the prep functions such as {@link #io_uring_prep_read prep_read} and submitted via {@link #io_uring_submit submit}.

    - * - * @return a pointer to the next submission queue event on success and {@code NULL} on failure - */ - @Nullable - @NativeType("struct io_uring_sqe *") - public static IOURingSQE io_uring_get_sqe(@NativeType("struct io_uring *") IOURing ring) { - long __result = nio_uring_get_sqe(ring.address()); - return IOURingSQE.createSafe(__result); - } - - // --- [ io_uring_mlock_size ] --- - - /** - * Return required {@code ulimit -l} memory space for a given ring setup. See {@link #io_uring_mlock_size_params mlock_size_params}. - * - * @param flags {@code io_uring_params} flags - */ - public static native int io_uring_mlock_size(@NativeType("unsigned") int entries, @NativeType("unsigned") int flags); - - // --- [ io_uring_mlock_size_params ] --- - - /** Unsafe version of: {@link #io_uring_mlock_size_params mlock_size_params} */ - public static native int nio_uring_mlock_size_params(int entries, long p); - - /** - * Returns the required {@code ulimit -l memlock} memory required for a given ring setup, in bytes. - * - *

    May return {@code -errno} on error. On newer (5.12+) kernels, {@code io_uring} no longer requires any {@code memlock} memory, and hence this function - * will return 0 for that case. On older (5.11 and prior) kernels, this will return the required memory so that the caller can ensure that enough space is - * available before setting up a ring with the specified parameters.

    - */ - public static int io_uring_mlock_size_params(@NativeType("unsigned") int entries, @NativeType("struct io_uring_params *") IOURingParams p) { - return nio_uring_mlock_size_params(entries, p.address()); - } - - // --- [ io_uring_major_version ] --- - - public static native int io_uring_major_version(); - - // --- [ io_uring_minor_version ] --- - - public static native int io_uring_minor_version(); - - // --- [ io_uring_check_version ] --- - - @NativeType("bool") - public static native boolean io_uring_check_version(int major, int minor); - - /** Return the appropriate mask for a buffer ring of size {@code ring_entries} */ - public static int io_uring_buf_ring_mask(@NativeType("__u32") int ring_entries) { - return ring_entries - 1; - } - - public static void io_uring_buf_ring_init(@NativeType("struct io_uring_buf_ring *") IOURingBufRing br) { - br.tail((short)0); - } - - public static void io_uring_buf_ring_add(@NativeType("struct io_uring_buf_ring *") IOURingBufRing br, @NativeType("void *") ByteBuffer addr, @NativeType("unsigned short") short bid, int mask, int buf_offset) { - IOURingBuf buf = br.bufs((br.tail() + buf_offset) & mask); - - buf.addr(memAddress(addr)); - buf.len(addr.remaining()); - buf.bid(bid); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapCallBack.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapCallBack.java deleted file mode 100644 index 8b3b542d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapCallBack.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Instances of this class may be passed to the {@link CoreGraphics#CGEventTapCreate EventTapCreate} method. - * - *

    Type

    - * - *
    
    - * CGEventRef (*{@link #invoke}) (
    - *     CGEventTapProxy proxy,
    - *     CGEventType type,
    - *     CGEventRef event,
    - *     void *userInfo
    - * )
    - */ -public abstract class CGEventTapCallBack extends Callback implements CGEventTapCallBackI { - - /** - * Creates a {@code CGEventTapCallBack} instance from the specified function pointer. - * - * @return the new {@code CGEventTapCallBack} - */ - public static CGEventTapCallBack create(long functionPointer) { - CGEventTapCallBackI instance = Callback.get(functionPointer); - return instance instanceof CGEventTapCallBack - ? (CGEventTapCallBack)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static CGEventTapCallBack createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code CGEventTapCallBack} instance that delegates to the specified {@code CGEventTapCallBackI} instance. */ - public static CGEventTapCallBack create(CGEventTapCallBackI instance) { - return instance instanceof CGEventTapCallBack - ? (CGEventTapCallBack)instance - : new Container(instance.address(), instance); - } - - protected CGEventTapCallBack() { - super(CIF); - } - - CGEventTapCallBack(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends CGEventTapCallBack { - - private final CGEventTapCallBackI delegate; - - Container(long functionPointer, CGEventTapCallBackI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long proxy, int type, long event, long userInfo) { - return delegate.invoke(proxy, type, event, userInfo); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapCallBackI.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapCallBackI.java deleted file mode 100644 index ed6fdc4a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapCallBackI.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * Instances of this interface may be passed to the {@link CoreGraphics#CGEventTapCreate EventTapCreate} method. - * - *

    Type

    - * - *
    
    - * CGEventRef (*{@link #invoke}) (
    - *     CGEventTapProxy proxy,
    - *     CGEventType type,
    - *     CGEventRef event,
    - *     void *userInfo
    - * )
    - */ -@FunctionalInterface -@NativeType("CGEventRef (*) (CGEventTapProxy, CGEventType, CGEventRef, void *)") -public interface CGEventTapCallBackI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_uint32, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** - * A client-supplied callback function that’s invoked whenever an associated event tap receives a Quartz event. - * - *

    The callback is passed a proxy for the tap, the event type, the incoming event, and the user-defined data specified when the event tap was created. The - * function should return the (possibly modified) passed-in event, a newly constructed event, or {@code NULL} if the event is to be deleted. The event passed to - * the callback is retained by the calling code, and is released after the callback returns and the data is passed back to the event system. If a - * different event is returned by the callback function, then that event will be released by the calling code along with the original event, after the - * event data has been passed back to the event system.

    - */ - @NativeType("CGEventRef") long invoke(@NativeType("CGEventTapProxy") long proxy, @NativeType("CGEventType") int type, @NativeType("CGEventRef") long event, @NativeType("void *") long userInfo); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapInformation.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapInformation.java deleted file mode 100644 index 3085e47a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGEventTapInformation.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * The structure used to report information about event taps. - * - *

    Layout

    - * - *
    
    - * struct CGEventTapInformation {
    - *     uint32_t eventTapID;
    - *     CGEventTapLocation {@link #tapPoint};
    - *     CGEventTapOptions {@link #options};
    - *     CGEventMask {@link #eventsOfInterest};
    - *     pid_t {@link #tappingProcess};
    - *     pid_t {@link #processBeingTapped};
    - *     bool {@link #enabled};
    - *     float {@link #minUsecLatency};
    - *     float {@link #avgUsecLatency};
    - *     float {@link #maxUsecLatency};
    - * }
    - */ -public class CGEventTapInformation extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - EVENTTAPID, - TAPPOINT, - OPTIONS, - EVENTSOFINTEREST, - TAPPINGPROCESS, - PROCESSBEINGTAPPED, - ENABLED, - MINUSECLATENCY, - AVGUSECLATENCY, - MAXUSECLATENCY; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(8), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(1), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - EVENTTAPID = layout.offsetof(0); - TAPPOINT = layout.offsetof(1); - OPTIONS = layout.offsetof(2); - EVENTSOFINTEREST = layout.offsetof(3); - TAPPINGPROCESS = layout.offsetof(4); - PROCESSBEINGTAPPED = layout.offsetof(5); - ENABLED = layout.offsetof(6); - MINUSECLATENCY = layout.offsetof(7); - AVGUSECLATENCY = layout.offsetof(8); - MAXUSECLATENCY = layout.offsetof(9); - } - - protected CGEventTapInformation(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected CGEventTapInformation create(long address, @Nullable ByteBuffer container) { - return new CGEventTapInformation(address, container); - } - - /** - * Creates a {@code CGEventTapInformation} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public CGEventTapInformation(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code eventTapID} field. */ - @NativeType("uint32_t") - public int eventTapID() { return neventTapID(address()); } - /** HID, session, annotated session */ - @NativeType("CGEventTapLocation") - public int tapPoint() { return ntapPoint(address()); } - /** listener, filter */ - @NativeType("CGEventTapOptions") - public int options() { return noptions(address()); } - /** mask of events being tapped */ - @NativeType("CGEventMask") - public long eventsOfInterest() { return neventsOfInterest(address()); } - /** process that is tapping events */ - @NativeType("pid_t") - public long tappingProcess() { return ntappingProcess(address()); } - /** zero if not a per-process tap */ - @NativeType("pid_t") - public long processBeingTapped() { return nprocessBeingTapped(address()); } - /** true if tap is enabled */ - @NativeType("bool") - public boolean enabled() { return nenabled(address()); } - /** minimum latency in microseconds */ - public float minUsecLatency() { return nminUsecLatency(address()); } - /** average latency in microseconds */ - public float avgUsecLatency() { return navgUsecLatency(address()); } - /** maximum latency in microseconds */ - public float maxUsecLatency() { return nmaxUsecLatency(address()); } - - // ----------------------------------- - - /** Returns a new {@code CGEventTapInformation} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static CGEventTapInformation malloc() { - return new CGEventTapInformation(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code CGEventTapInformation} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static CGEventTapInformation calloc() { - return new CGEventTapInformation(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code CGEventTapInformation} instance allocated with {@link BufferUtils}. */ - public static CGEventTapInformation create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new CGEventTapInformation(memAddress(container), container); - } - - /** Returns a new {@code CGEventTapInformation} instance for the specified memory address. */ - public static CGEventTapInformation create(long address) { - return new CGEventTapInformation(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static CGEventTapInformation createSafe(long address) { - return address == NULL ? null : new CGEventTapInformation(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static CGEventTapInformation mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static CGEventTapInformation callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static CGEventTapInformation mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static CGEventTapInformation callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code CGEventTapInformation} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static CGEventTapInformation malloc(MemoryStack stack) { - return new CGEventTapInformation(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code CGEventTapInformation} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static CGEventTapInformation calloc(MemoryStack stack) { - return new CGEventTapInformation(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #eventTapID}. */ - public static int neventTapID(long struct) { return UNSAFE.getInt(null, struct + CGEventTapInformation.EVENTTAPID); } - /** Unsafe version of {@link #tapPoint}. */ - public static int ntapPoint(long struct) { return UNSAFE.getInt(null, struct + CGEventTapInformation.TAPPOINT); } - /** Unsafe version of {@link #options}. */ - public static int noptions(long struct) { return UNSAFE.getInt(null, struct + CGEventTapInformation.OPTIONS); } - /** Unsafe version of {@link #eventsOfInterest}. */ - public static long neventsOfInterest(long struct) { return UNSAFE.getLong(null, struct + CGEventTapInformation.EVENTSOFINTEREST); } - /** Unsafe version of {@link #tappingProcess}. */ - public static long ntappingProcess(long struct) { return memGetAddress(struct + CGEventTapInformation.TAPPINGPROCESS); } - /** Unsafe version of {@link #processBeingTapped}. */ - public static long nprocessBeingTapped(long struct) { return memGetAddress(struct + CGEventTapInformation.PROCESSBEINGTAPPED); } - /** Unsafe version of {@link #enabled}. */ - public static boolean nenabled(long struct) { return UNSAFE.getByte(null, struct + CGEventTapInformation.ENABLED) != 0; } - /** Unsafe version of {@link #minUsecLatency}. */ - public static float nminUsecLatency(long struct) { return UNSAFE.getFloat(null, struct + CGEventTapInformation.MINUSECLATENCY); } - /** Unsafe version of {@link #avgUsecLatency}. */ - public static float navgUsecLatency(long struct) { return UNSAFE.getFloat(null, struct + CGEventTapInformation.AVGUSECLATENCY); } - /** Unsafe version of {@link #maxUsecLatency}. */ - public static float nmaxUsecLatency(long struct) { return UNSAFE.getFloat(null, struct + CGEventTapInformation.MAXUSECLATENCY); } - - // ----------------------------------- - - /** An array of {@link CGEventTapInformation} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final CGEventTapInformation ELEMENT_FACTORY = CGEventTapInformation.create(-1L); - - /** - * Creates a new {@code CGEventTapInformation.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link CGEventTapInformation#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected CGEventTapInformation getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code eventTapID} field. */ - @NativeType("uint32_t") - public int eventTapID() { return CGEventTapInformation.neventTapID(address()); } - /** @return the value of the {@link CGEventTapInformation#tapPoint} field. */ - @NativeType("CGEventTapLocation") - public int tapPoint() { return CGEventTapInformation.ntapPoint(address()); } - /** @return the value of the {@link CGEventTapInformation#options} field. */ - @NativeType("CGEventTapOptions") - public int options() { return CGEventTapInformation.noptions(address()); } - /** @return the value of the {@link CGEventTapInformation#eventsOfInterest} field. */ - @NativeType("CGEventMask") - public long eventsOfInterest() { return CGEventTapInformation.neventsOfInterest(address()); } - /** @return the value of the {@link CGEventTapInformation#tappingProcess} field. */ - @NativeType("pid_t") - public long tappingProcess() { return CGEventTapInformation.ntappingProcess(address()); } - /** @return the value of the {@link CGEventTapInformation#processBeingTapped} field. */ - @NativeType("pid_t") - public long processBeingTapped() { return CGEventTapInformation.nprocessBeingTapped(address()); } - /** @return the value of the {@link CGEventTapInformation#enabled} field. */ - @NativeType("bool") - public boolean enabled() { return CGEventTapInformation.nenabled(address()); } - /** @return the value of the {@link CGEventTapInformation#minUsecLatency} field. */ - public float minUsecLatency() { return CGEventTapInformation.nminUsecLatency(address()); } - /** @return the value of the {@link CGEventTapInformation#avgUsecLatency} field. */ - public float avgUsecLatency() { return CGEventTapInformation.navgUsecLatency(address()); } - /** @return the value of the {@link CGEventTapInformation#maxUsecLatency} field. */ - public float maxUsecLatency() { return CGEventTapInformation.nmaxUsecLatency(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGPoint.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/CGPoint.java deleted file mode 100644 index 63d1ddb8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/CGPoint.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure that contains a point in a two-dimensional coordinate system. - * - *

    Layout

    - * - *
    
    - * struct CGPoint {
    - *     CGFloat {@link #x};
    - *     CGFloat {@link #y};
    - * }
    - */ -public class CGPoint extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(8), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - protected CGPoint(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected CGPoint create(long address, @Nullable ByteBuffer container) { - return new CGPoint(address, container); - } - - /** - * Creates a {@code CGPoint} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public CGPoint(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the x-coordinate of the point */ - @NativeType("CGFloat") - public double x() { return nx(address()); } - /** the y-coordinate of the point */ - @NativeType("CGFloat") - public double y() { return ny(address()); } - - /** Sets the specified value to the {@link #x} field. */ - public CGPoint x(@NativeType("CGFloat") double value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public CGPoint y(@NativeType("CGFloat") double value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public CGPoint set( - double x, - double y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public CGPoint set(CGPoint src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code CGPoint} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static CGPoint malloc() { - return new CGPoint(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code CGPoint} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static CGPoint calloc() { - return new CGPoint(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code CGPoint} instance allocated with {@link BufferUtils}. */ - public static CGPoint create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new CGPoint(memAddress(container), container); - } - - /** Returns a new {@code CGPoint} instance for the specified memory address. */ - public static CGPoint create(long address) { - return new CGPoint(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static CGPoint createSafe(long address) { - return address == NULL ? null : new CGPoint(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static CGPoint mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static CGPoint callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static CGPoint mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static CGPoint callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code CGPoint} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static CGPoint malloc(MemoryStack stack) { - return new CGPoint(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code CGPoint} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static CGPoint calloc(MemoryStack stack) { - return new CGPoint(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static double nx(long struct) { return UNSAFE.getDouble(null, struct + CGPoint.X); } - /** Unsafe version of {@link #y}. */ - public static double ny(long struct) { return UNSAFE.getDouble(null, struct + CGPoint.Y); } - - /** Unsafe version of {@link #x(double) x}. */ - public static void nx(long struct, double value) { UNSAFE.putDouble(null, struct + CGPoint.X, value); } - /** Unsafe version of {@link #y(double) y}. */ - public static void ny(long struct, double value) { UNSAFE.putDouble(null, struct + CGPoint.Y, value); } - - // ----------------------------------- - - /** An array of {@link CGPoint} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final CGPoint ELEMENT_FACTORY = CGPoint.create(-1L); - - /** - * Creates a new {@code CGPoint.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link CGPoint#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected CGPoint getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link CGPoint#x} field. */ - @NativeType("CGFloat") - public double x() { return CGPoint.nx(address()); } - /** @return the value of the {@link CGPoint#y} field. */ - @NativeType("CGFloat") - public double y() { return CGPoint.ny(address()); } - - /** Sets the specified value to the {@link CGPoint#x} field. */ - public Buffer x(@NativeType("CGFloat") double value) { CGPoint.nx(address(), value); return this; } - /** Sets the specified value to the {@link CGPoint#y} field. */ - public Buffer y(@NativeType("CGFloat") double value) { CGPoint.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/CoreFoundation.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/CoreFoundation.java deleted file mode 100644 index 30b25508..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/CoreFoundation.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <CoreFoundation.h>. */ -public class CoreFoundation { - - static { Library.initialize(); } - - /** Boolean values. */ - public static final byte - TRUE = 1, - FALSE = 0; - - /** Platform-independent built-in encodings; always available on all platforms. */ - public static final int - kCFStringEncodingMacRoman = 0, - kCFStringEncodingWindowsLatin1 = 0x500, - kCFStringEncodingISOLatin1 = 0x201, - kCFStringEncodingNextStepLatin = 0xB01, - kCFStringEncodingASCII = 0x600, - kCFStringEncodingUnicode = 0x100, - kCFStringEncodingUTF8 = 0x8000100, - kCFStringEncodingNonLossyASCII = 0xBFF, - kCFStringEncodingUTF16 = 0x100, - kCFStringEncodingUTF16BE = 0x10000100, - kCFStringEncodingUTF16LE = 0x14000100, - kCFStringEncodingUTF32 = 0xC000100, - kCFStringEncodingUTF32BE = 0x18000100, - kCFStringEncodingUTF32LE = 0x1C000100; - - /** URL path styles. */ - public static final int - kCFURLPOSIXPathStyle = 0, - kCFURLHFSPathStyle = 1, - kCFURLWindowsPathStyle = 2; - - protected CoreFoundation() { - throw new UnsupportedOperationException(); - } - - // --- [ kCFAllocatorDefault ] --- - - @NativeType("CFAllocatorRef") - private static native long kCFAllocatorDefault(); - - /** This is a synonym for {@code NULL}, if you'd rather use a named constant. */ - public static final long kCFAllocatorDefault = kCFAllocatorDefault(); - - // --- [ kCFAllocatorSystemDefault ] --- - - @NativeType("CFAllocatorRef") - private static native long kCFAllocatorSystemDefault(); - - /** Default system allocator; you rarely need to use this. */ - public static final long kCFAllocatorSystemDefault = kCFAllocatorSystemDefault(); - - // --- [ kCFAllocatorMalloc ] --- - - @NativeType("CFAllocatorRef") - private static native long kCFAllocatorMalloc(); - - /** - * This allocator uses {@code malloc()}, {@code realloc()}, and {@code free()}. This should not be generally used; stick to {@link #kCFAllocatorDefault} - * whenever possible. This allocator is useful as the "bytesDeallocator" in {@code CFData} or "contentsDeallocator" in {@code CFString} where the memory - * was obtained as a result of {@code malloc()} type functions. - */ - public static final long kCFAllocatorMalloc = kCFAllocatorMalloc(); - - // --- [ kCFAllocatorMallocZone ] --- - - @NativeType("CFAllocatorRef") - private static native long kCFAllocatorMallocZone(); - - /** - * This allocator explicitly uses the default malloc zone, returned by {@code malloc_default_zone()}. It should only be used when an object is safe to be - * allocated in non-scanned memory. - */ - public static final long kCFAllocatorMallocZone = kCFAllocatorMallocZone(); - - // --- [ kCFAllocatorNull ] --- - - @NativeType("CFAllocatorRef") - private static native long kCFAllocatorNull(); - - /** - * Null allocator which does nothing and allocates no memory. This allocator is useful as the "bytesDeallocator" in {@code CFData} or "contentsDeallocator" - * in {@code CFString} where the memory should not be freed. - */ - public static final long kCFAllocatorNull = kCFAllocatorNull(); - - // --- [ kCFAllocatorUseContext ] --- - - @NativeType("CFAllocatorRef") - private static native long kCFAllocatorUseContext(); - - /** Special allocator argument to CFAllocatorCreate which means "use the functions given in the context to allocate the allocator itself as well". */ - public static final long kCFAllocatorUseContext = kCFAllocatorUseContext(); - - // --- [ CFRetain ] --- - - /** Unsafe version of: {@link #CFRetain} */ - public static native long nCFRetain(long cf); - - /** - * Retains a Core Foundation object. - * - *

    You should retain a Core Foundation object when you receive it from elsewhere (that is, you did not create or copy it) and you want it to persist. If - * you retain a Core Foundation object you are responsible for releasing it.

    - * - * @param cf the CFType object to retain - */ - @NativeType("CFTypeRef") - public static long CFRetain(@NativeType("CFTypeRef") long cf) { - if (CHECKS) { - check(cf); - } - return nCFRetain(cf); - } - - // --- [ CFRelease ] --- - - /** Unsafe version of: {@link #CFRelease} */ - public static native void nCFRelease(long cf); - - /** - * Releases a Core Foundation object. - * - *

    If the retain count of {@code cf} becomes zero the memory allocated to the object is deallocated and the object is destroyed. If you create, copy, or - * explicitly retain (see the {@link #CFRetain} function) a Core Foundation object, you are responsible for releasing it when you no longer need it.

    - * - * @param cf the CFType object to release - */ - public static void CFRelease(@NativeType("CFTypeRef") long cf) { - if (CHECKS) { - check(cf); - } - nCFRelease(cf); - } - - // --- [ CFBundleCreate ] --- - - /** Unsafe version of: {@link #CFBundleCreate} */ - public static native long nCFBundleCreate(long allocator, long bundleURL); - - /** - * Creates a {@code CFBundle} object. - * - * @param allocator the allocator to use to allocate memory for the new object. Pass {@code NULL} or {@code kCFAllocatorDefault} to use the current default allocator. - * @param bundleURL the location of the bundle for which to create a {@code CFBundle} object - */ - @NativeType("CFBundleRef") - public static long CFBundleCreate(@NativeType("CFAllocatorRef") long allocator, @NativeType("CFURLRef") long bundleURL) { - if (CHECKS) { - check(bundleURL); - } - return nCFBundleCreate(allocator, bundleURL); - } - - // --- [ CFBundleGetBundleWithIdentifier ] --- - - /** Unsafe version of: {@link #CFBundleGetBundleWithIdentifier} */ - public static native long nCFBundleGetBundleWithIdentifier(long bundleID); - - /** - * Locates a bundle given its program-defined identifier. - * - * @param bundleID the identifier of the bundle to locate. Note that identifier names are case-sensitive. - */ - @NativeType("CFBundleRef") - public static long CFBundleGetBundleWithIdentifier(@NativeType("CFStringRef") long bundleID) { - if (CHECKS) { - check(bundleID); - } - return nCFBundleGetBundleWithIdentifier(bundleID); - } - - // --- [ CFBundleGetFunctionPointerForName ] --- - - /** Unsafe version of: {@link #CFBundleGetFunctionPointerForName} */ - public static native long nCFBundleGetFunctionPointerForName(long bundle, long functionName); - - /** - * Returns a pointer to a function in a bundle’s executable code using the function name as the search key. - * - * @param bundle the bundle to examine - * @param functionName the name of the function to locate - */ - @NativeType("void *") - public static long CFBundleGetFunctionPointerForName(@NativeType("CFBundleRef") long bundle, @NativeType("CFStringRef") long functionName) { - if (CHECKS) { - check(bundle); - check(functionName); - } - return nCFBundleGetFunctionPointerForName(bundle, functionName); - } - - // --- [ CFStringCreateWithCString ] --- - - /** Unsafe version of: {@link #CFStringCreateWithCString} */ - public static native long nCFStringCreateWithCString(long allocator, long cStr, int encoding); - - /** - * Creates an immutable string from a C string. - * - * @param allocator the allocator to use to allocate memory for the new object. Pass {@code NULL} or {@code kCFAllocatorDefault} to use the current default allocator. - * @param cStr the {@code NULL}-terminated C string to be used to create the {@code CFString} object. The string must use an 8-bit encoding. - * @param encoding the encoding of the characters in the C string. The encoding must specify an 8-bit encoding. One of:
    {@link #kCFStringEncodingMacRoman}{@link #kCFStringEncodingWindowsLatin1}{@link #kCFStringEncodingISOLatin1}
    {@link #kCFStringEncodingNextStepLatin}{@link #kCFStringEncodingASCII}{@link #kCFStringEncodingUnicode}
    {@link #kCFStringEncodingUTF8}{@link #kCFStringEncodingNonLossyASCII}{@link #kCFStringEncodingUTF16}
    {@link #kCFStringEncodingUTF16BE}{@link #kCFStringEncodingUTF16LE}{@link #kCFStringEncodingUTF32}
    {@link #kCFStringEncodingUTF32BE}{@link #kCFStringEncodingUTF32LE}
    - */ - @NativeType("CFStringRef") - public static long CFStringCreateWithCString(@NativeType("CFAllocatorRef") long allocator, @NativeType("char const *") ByteBuffer cStr, @NativeType("CFStringEncoding") int encoding) { - return nCFStringCreateWithCString(allocator, memAddress(cStr), encoding); - } - - // --- [ CFStringCreateWithCStringNoCopy ] --- - - /** Unsafe version of: {@link #CFStringCreateWithCStringNoCopy} */ - public static native long nCFStringCreateWithCStringNoCopy(long allocator, long cStr, int encoding, long contentsDeallocator); - - /** - * Creates a CFString object from an external C string buffer that might serve as the backing store for the object. - * - * @param allocator the allocator to use to allocate memory for the new object. Pass {@code NULL} or {@code kCFAllocatorDefault} to use the current default allocator. - * @param cStr the {@code NULL}-terminated C string to be used to create the {@code CFString} object. The string must use an 8-bit encoding. - * @param encoding the encoding of the characters in the C string. The encoding must specify an 8-bit encoding. One of:
    {@link #kCFStringEncodingMacRoman}{@link #kCFStringEncodingWindowsLatin1}{@link #kCFStringEncodingISOLatin1}
    {@link #kCFStringEncodingNextStepLatin}{@link #kCFStringEncodingASCII}{@link #kCFStringEncodingUnicode}
    {@link #kCFStringEncodingUTF8}{@link #kCFStringEncodingNonLossyASCII}{@link #kCFStringEncodingUTF16}
    {@link #kCFStringEncodingUTF16BE}{@link #kCFStringEncodingUTF16LE}{@link #kCFStringEncodingUTF32}
    {@link #kCFStringEncodingUTF32BE}{@link #kCFStringEncodingUTF32LE}
    - * @param contentsDeallocator the {@code CFAllocator} object to use to deallocate the external string buffer when it is no longer needed. You can pass {@code NULL} or - * {@code kCFAllocatorDefault} to request the default allocator for this purpose. If the buffer does not need to be deallocated, or if you want to - * assume responsibility for deallocating the buffer (and not have the {@code CFString} object deallocate it), pass {@code kCFAllocatorNull}. - */ - @NativeType("CFStringRef") - public static long CFStringCreateWithCStringNoCopy(@NativeType("CFAllocatorRef") long allocator, @NativeType("char const *") ByteBuffer cStr, @NativeType("CFStringEncoding") int encoding, @NativeType("CFAllocatorRef") long contentsDeallocator) { - return nCFStringCreateWithCStringNoCopy(allocator, memAddress(cStr), encoding, contentsDeallocator); - } - - // --- [ CFURLCreateWithFileSystemPath ] --- - - /** Unsafe version of: {@link #CFURLCreateWithFileSystemPath} */ - public static native long nCFURLCreateWithFileSystemPath(long allocator, long filePath, long pathStyle, boolean isDirectory); - - /** - * Creates a {@code CFURL} object using a local file system path string. - * - * @param allocator the allocator to use to allocate memory for the new object. Pass {@code NULL} or {@code kCFAllocatorDefault} to use the current default allocator. - * @param filePath the path string to convert to a {@code CFURL} object. If {@code filePath} is not absolute, the resulting URL will be considered relative to the - * current working directory (evaluated when this function is being invoked). - * @param pathStyle the operating system path style used in {@code filePath}. One of:
    {@link #kCFURLPOSIXPathStyle}{@link #kCFURLHFSPathStyle}{@link #kCFURLWindowsPathStyle}
    - * @param isDirectory a Boolean value that specifies whether filePath is treated as a directory path when resolving against relative path components. Pass true if the - * pathname indicates a directory, false otherwise. - */ - @NativeType("CFURLRef") - public static long CFURLCreateWithFileSystemPath(@NativeType("CFAllocatorRef") long allocator, @NativeType("CFStringRef") long filePath, @NativeType("CFURLPathStyle") long pathStyle, @NativeType("Boolean") boolean isDirectory) { - if (CHECKS) { - check(filePath); - } - return nCFURLCreateWithFileSystemPath(allocator, filePath, pathStyle, isDirectory); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/CoreGraphics.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/CoreGraphics.java deleted file mode 100644 index 8fd7bbd1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/CoreGraphics.java +++ /dev/null @@ -1,1001 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <CoreGraphics.h>. */ -public class CoreGraphics { - - private static final SharedLibrary COREGRAPHICS = Library.loadNative(CoreGraphics.class, "org.lwjgl", "/System/Library/Frameworks/CoreGraphics.framework"); - - /** Contains the function pointers loaded from the CoreGraphics {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - EventGetTypeID = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetTypeID"), - EventCreate = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreate"), - EventCreateData = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreateData"), - EventCreateFromData = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreateFromData"), - EventCreateMouseEvent = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreateMouseEvent"), - EventCreateKeyboardEvent = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreateKeyboardEvent"), - EventCreateScrollWheelEvent = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreateScrollWheelEvent"), - EventCreateScrollWheelEvent2 = apiGetFunctionAddressOptional(COREGRAPHICS, "CGEventCreateScrollWheelEvent2"), - EventCreateCopy = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreateCopy"), - EventCreateSourceFromEvent = apiGetFunctionAddress(COREGRAPHICS, "CGEventCreateSourceFromEvent"), - EventSetSource = apiGetFunctionAddress(COREGRAPHICS, "CGEventSetSource"), - EventGetType = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetType"), - EventSetType = apiGetFunctionAddress(COREGRAPHICS, "CGEventSetType"), - EventGetTimestamp = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetTimestamp"), - EventSetTimestamp = apiGetFunctionAddress(COREGRAPHICS, "CGEventSetTimestamp"), - EventGetLocation = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetLocation"), - EventGetUnflippedLocation = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetUnflippedLocation"), - EventSetLocation = apiGetFunctionAddress(COREGRAPHICS, "CGEventSetLocation"), - EventGetFlags = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetFlags"), - EventSetFlags = apiGetFunctionAddress(COREGRAPHICS, "CGEventSetFlags"), - EventKeyboardGetUnicodeString = apiGetFunctionAddress(COREGRAPHICS, "CGEventKeyboardGetUnicodeString"), - EventKeyboardSetUnicodeString = apiGetFunctionAddress(COREGRAPHICS, "CGEventKeyboardSetUnicodeString"), - EventGetIntegerValueField = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetIntegerValueField"), - EventSetIntegerValueField = apiGetFunctionAddress(COREGRAPHICS, "CGEventSetIntegerValueField"), - EventGetDoubleValueField = apiGetFunctionAddress(COREGRAPHICS, "CGEventGetDoubleValueField"), - EventSetDoubleValueField = apiGetFunctionAddress(COREGRAPHICS, "CGEventSetDoubleValueField"), - EventTapCreate = apiGetFunctionAddress(COREGRAPHICS, "CGEventTapCreate"), - EventTapCreateForPid = apiGetFunctionAddressOptional(COREGRAPHICS, "CGEventTapCreateForPid"), - EventTapEnable = apiGetFunctionAddress(COREGRAPHICS, "CGEventTapEnable"), - EventTapIsEnabled = apiGetFunctionAddress(COREGRAPHICS, "CGEventTapIsEnabled"), - EventTapPostEvent = apiGetFunctionAddress(COREGRAPHICS, "CGEventTapPostEvent"), - EventPost = apiGetFunctionAddress(COREGRAPHICS, "CGEventPost"), - EventPostToPid = apiGetFunctionAddressOptional(COREGRAPHICS, "CGEventPostToPid"), - GetEventTapList = apiGetFunctionAddress(COREGRAPHICS, "CGGetEventTapList"); - - } - - /** Returns the CoreGraphics {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return COREGRAPHICS; - } - - /** - * Types used for errors and error handlers. ({@code CGError}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #kCGErrorSuccess ErrorSuccess}
    • - *
    • {@link #kCGErrorFailure ErrorFailure}
    • - *
    • {@link #kCGErrorIllegalArgument ErrorIllegalArgument}
    • - *
    • {@link #kCGErrorInvalidConnection ErrorInvalidConnection}
    • - *
    • {@link #kCGErrorInvalidContext ErrorInvalidContext}
    • - *
    • {@link #kCGErrorCannotComplete ErrorCannotComplete}
    • - *
    • {@link #kCGErrorNotImplemented ErrorNotImplemented}
    • - *
    • {@link #kCGErrorRangeCheck ErrorRangeCheck}
    • - *
    • {@link #kCGErrorTypeCheck ErrorTypeCheck}
    • - *
    • {@link #kCGErrorInvalidOperation ErrorInvalidOperation}
    • - *
    • {@link #kCGErrorNoneAvailable ErrorNoneAvailable}
    • - *
    - */ - public static final int - kCGErrorSuccess = 0, - kCGErrorFailure = 1000, - kCGErrorIllegalArgument = 1001, - kCGErrorInvalidConnection = 1002, - kCGErrorInvalidContext = 1003, - kCGErrorCannotComplete = 1004, - kCGErrorNotImplemented = 1006, - kCGErrorRangeCheck = 1007, - kCGErrorTypeCheck = 1008, - kCGErrorInvalidOperation = 1010, - kCGErrorNoneAvailable = 1011; - - /** - * Event types. ({@code CGEventType}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #kCGEventNull EventNull}
    • - *
    • {@link #kCGEventLeftMouseDown EventLeftMouseDown}
    • - *
    • {@link #kCGEventLeftMouseUp EventLeftMouseUp}
    • - *
    • {@link #kCGEventRightMouseDown EventRightMouseDown}
    • - *
    • {@link #kCGEventRightMouseUp EventRightMouseUp}
    • - *
    • {@link #kCGEventMouseMoved EventMouseMoved}
    • - *
    • {@link #kCGEventLeftMouseDragged EventLeftMouseDragged}
    • - *
    • {@link #kCGEventRightMouseDragged EventRightMouseDragged}
    • - *
    • {@link #kCGEventKeyDown EventKeyDown}
    • - *
    • {@link #kCGEventKeyUp EventKeyUp}
    • - *
    • {@link #kCGEventFlagsChanged EventFlagsChanged}
    • - *
    • {@link #kCGEventScrollWheel EventScrollWheel}
    • - *
    • {@link #kCGEventTabletPointer EventTabletPointer}
    • - *
    • {@link #kCGEventTabletProximity EventTabletProximity}
    • - *
    • {@link #kCGEventOtherMouseDown EventOtherMouseDown}
    • - *
    • {@link #kCGEventOtherMouseUp EventOtherMouseUp}
    • - *
    • {@link #kCGEventOtherMouseDragged EventOtherMouseDragged}
    • - *
    • {@link #kCGEventTapDisabledByTimeout EventTapDisabledByTimeout}
    • - *
    • {@link #kCGEventTapDisabledByUserInput EventTapDisabledByUserInput}
    • - *
    - */ - public static final int - kCGEventNull = 0, - kCGEventLeftMouseDown = 1, - kCGEventLeftMouseUp = 2, - kCGEventRightMouseDown = 3, - kCGEventRightMouseUp = 4, - kCGEventMouseMoved = 5, - kCGEventLeftMouseDragged = 6, - kCGEventRightMouseDragged = 7, - kCGEventKeyDown = 0xA, - kCGEventKeyUp = 0xB, - kCGEventFlagsChanged = 0xC, - kCGEventScrollWheel = 0x16, - kCGEventTabletPointer = 0x17, - kCGEventTabletProximity = 0x18, - kCGEventOtherMouseDown = 0x19, - kCGEventOtherMouseUp = 0x1A, - kCGEventOtherMouseDragged = 0x1B, - kCGEventTapDisabledByTimeout = 0xFFFFFFFE, - kCGEventTapDisabledByUserInput = 0xFFFFFFFF; - - /** - * Constants that specify buttons on a one, two, or three-button mouse. ({@code CGMouseButton}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #kCGMouseButtonLeft MouseButtonLeft}
    • - *
    • {@link #kCGMouseButtonRight MouseButtonRight}
    • - *
    • {@link #kCGMouseButtonCenter MouseButtonCenter}
    • - *
    - */ - public static final int - kCGMouseButtonLeft = 0, - kCGMouseButtonRight = 1, - kCGMouseButtonCenter = 2; - - /** - * {@code CGEventTapLocation} - * - *
    Enum values:
    - * - *
      - *
    • {@link #kCGHIDEventTap HIDEventTap} - Specifies that an event tap is placed at the point where HID system events enter the window server.
    • - *
    • {@link #kCGSessionEventTap SessionEventTap} - Specifies that an event tap is placed at the point where HID system and remote control events enter a login session.
    • - *
    • {@link #kCGAnnotatedSessionEventTap AnnotatedSessionEventTap} - Specifies that an event tap is placed at the point where session events have been annotated to flow to an application.
    • - *
    - */ - public static final int - kCGHIDEventTap = 0x0, - kCGSessionEventTap = 0x1, - kCGAnnotatedSessionEventTap = 0x2; - - /** - * Constants that specify the unit of measurement for a scrolling event. ({@code CGScrollEventUnit}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #kCGScrollEventUnitPixel ScrollEventUnitPixel} - Specifies that the unit of measurement is pixels.
    • - *
    • {@link #kCGScrollEventUnitLine ScrollEventUnitLine} - Specifies that the unit of measurement is lines.
    • - *
    - */ - public static final int - kCGScrollEventUnitPixel = 0, - kCGScrollEventUnitLine = 1; - - /** - * Constants used as keys to access specialized fields in low-level events. ({@code CGEventField}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #kCGMouseEventNumber MouseEventNumber} - - * Key to access an integer field that contains the mouse button event number. - * - *

      Matching mouse-down and mouse-up events will have the same event number.

      - *
    • - *
    • {@link #kCGMouseEventClickState MouseEventClickState} - - * Key to access an integer field that contains the mouse button click state. - * - *

      A click state of 1 represents a single click. A click state of 2 represents a double-click. A click state of 3 represents a triple-click.

      - *
    • - *
    • {@link #kCGMouseEventPressure MouseEventPressure} - - * Key to access a double field that contains the mouse button pressure. - * - *

      The pressure value may range from 0 to 1, with 0 representing the mouse being up. This value is commonly set by tablet pens mimicking a mouse.

      - *
    • - *
    • {@link #kCGMouseEventButtonNumber MouseEventButtonNumber} - Key to access an integer field that contains the mouse button number.
    • - *
    • {@link #kCGMouseEventDeltaX MouseEventDeltaX} - Key to access an integer field that contains the horizontal mouse delta since the last mouse movement event.
    • - *
    • {@link #kCGMouseEventDeltaY MouseEventDeltaY} - Key to access an integer field that contains the vertical mouse delta since the last mouse movement event.
    • - *
    • {@link #kCGMouseEventInstantMouser MouseEventInstantMouser} - Key to access an integer field. The value is non-zero if the event should be ignored by the Inkwell subsystem.
    • - *
    • {@link #kCGMouseEventSubtype MouseEventSubtype} - Key to access an integer field that encodes the mouse event subtype as a {@code kCFNumberIntType}.
    • - *
    • {@link #kCGKeyboardEventAutorepeat KeyboardEventAutorepeat} - Key to access an integer field, non-zero when this is an autorepeat of a key-down, and zero otherwise.
    • - *
    • {@link #kCGKeyboardEventKeycode KeyboardEventKeycode} - Key to access an integer field that contains the virtual keycode of the key-down or key-up event.
    • - *
    • {@link #kCGKeyboardEventKeyboardType KeyboardEventKeyboardType} - Key to access an integer field that contains the keyboard type identifier.
    • - *
    • {@link #kCGScrollWheelEventDeltaAxis1 ScrollWheelEventDeltaAxis1} - - * Key to access an integer field that contains scrolling data. - * - *

      This field typically contains the change in vertical position since the last scrolling event from a Mighty Mouse scroller or a single-wheel mouse - * scroller.

      - *
    • - *
    • {@link #kCGScrollWheelEventDeltaAxis2 ScrollWheelEventDeltaAxis2} - - * Key to access an integer field that contains scrolling data. - * - *

      This field typically contains the change in horizontal position since the last scrolling event from a Mighty Mouse scroller.

      - *
    • - *
    • {@link #kCGScrollWheelEventDeltaAxis3 ScrollWheelEventDeltaAxis3} - This field is not used.
    • - *
    • {@link #kCGScrollWheelEventFixedPtDeltaAxis1 ScrollWheelEventFixedPtDeltaAxis1} - - * Key to access a field that contains scrolling data. - * - *

      The scrolling data represents a line-based or pixel-based change in vertical position since the last scrolling event from a Mighty Mouse scroller - * or a single-wheel mouse scroller. The scrolling data uses a fixed-point 16.16 signed integer format. If this key is passed to - * {@link #CGEventGetDoubleValueField EventGetDoubleValueField}, the fixed-point value is converted to a double value.

      - *
    • - *
    • {@link #kCGScrollWheelEventFixedPtDeltaAxis2 ScrollWheelEventFixedPtDeltaAxis2} - - * Key to access a field that contains scrolling data. - * - *

      The scrolling data represents a line-based or pixel-based change in horizontal position since the last scrolling event from a Mighty Mouse - * scroller. The scrolling data uses a fixed-point 16.16 signed integer format. If this key is passed to {@link #CGEventGetDoubleValueField EventGetDoubleValueField}, the fixed-point - * value is converted to a double value.

      - *
    • - *
    • {@link #kCGScrollWheelEventFixedPtDeltaAxis3 ScrollWheelEventFixedPtDeltaAxis3} - This field is not used.
    • - *
    • {@link #kCGScrollWheelEventPointDeltaAxis1 ScrollWheelEventPointDeltaAxis1} - - * Key to access an integer field that contains pixel-based scrolling data. - * - *

      The scrolling data represents the change in vertical position since the last scrolling event from a Mighty Mouse scroller or a single-wheel mouse - * scroller.

      - *
    • - *
    • {@link #kCGScrollWheelEventPointDeltaAxis2 ScrollWheelEventPointDeltaAxis2} - - * Key to access an integer field that contains pixel-based scrolling data. - * - *

      The scrolling data represents the change in horizontal position since the last scrolling event from a Mighty Mouse scroller.

      - *
    • - *
    • {@link #kCGScrollWheelEventPointDeltaAxis3 ScrollWheelEventPointDeltaAxis3} - This field is not used.
    • - *
    • {@link #kCGScrollWheelEventScrollPhase ScrollWheelEventScrollPhase}
    • - *
    • {@link #kCGScrollWheelEventScrollCount ScrollWheelEventScrollCount} - rdar://11259169
    • - *
    • {@link #kCGScrollWheelEventMomentumPhase ScrollWheelEventMomentumPhase}
    • - *
    • {@link #kCGScrollWheelEventInstantMouser ScrollWheelEventInstantMouser} - - * Key to access an integer field that indicates whether the event should be ignored by the Inkwell subsystem. - * - *

      If the value is non-zero, the event should be ignored.

      - *
    • - *
    • {@link #kCGTabletEventPointX TabletEventPointX} - Key to access an integer field that contains the absolute X coordinate in tablet space at full tablet resolution.
    • - *
    • {@link #kCGTabletEventPointY TabletEventPointY} - Key to access an integer field that contains the absolute Y coordinate in tablet space at full tablet resolution.
    • - *
    • {@link #kCGTabletEventPointZ TabletEventPointZ} - Key to access an integer field that contains the absolute Z coordinate in tablet space at full tablet resolution.
    • - *
    • {@link #kCGTabletEventPointButtons TabletEventPointButtons} - - * Key to access an integer field that contains the tablet button state. - * - *

      Bit 0 is the first button, and a set bit represents a closed or pressed button. Up to 16 buttons are supported.

      - *
    • - *
    • {@link #kCGTabletEventPointPressure TabletEventPointPressure} - - * Key to access a double field that contains the tablet pen pressure. - * - *

      A value of 0.0 represents no pressure, and 1.0 represents maximum pressure.

      - *
    • - *
    • {@link #kCGTabletEventTiltX TabletEventTiltX} - - * Key to access a double field that contains the horizontal tablet pen tilt. - * - *

      A value of 0 represents no tilt, and 1 represents maximum tilt.

      - *
    • - *
    • {@link #kCGTabletEventTiltY TabletEventTiltY} - - * Key to access a double field that contains the vertical tablet pen tilt. - * - *

      A value of 0 represents no tilt, and 1 represents maximum tilt.

      - *
    • - *
    • {@link #kCGTabletEventRotation TabletEventRotation} - Key to access a double field that contains the tablet pen rotation.
    • - *
    • {@link #kCGTabletEventTangentialPressure TabletEventTangentialPressure} - - * Key to access a double field that contains the tangential pressure on the device. - * - *

      A value of 0.0 represents no pressure, and 1.0 represents maximum pressure.

      - *
    • - *
    • {@link #kCGTabletEventDeviceID TabletEventDeviceID} - Key to access an integer field that contains the system-assigned unique device ID.
    • - *
    • {@link #kCGTabletEventVendor1 TabletEventVendor1} - Key to access an integer field that contains a vendor-specified value.
    • - *
    • {@link #kCGTabletEventVendor2 TabletEventVendor2} - Key to access an integer field that contains a vendor-specified value.
    • - *
    • {@link #kCGTabletEventVendor3 TabletEventVendor3} - Key to access an integer field that contains a vendor-specified value.
    • - *
    • {@link #kCGTabletProximityEventVendorID TabletProximityEventVendorID} - Key to access an integer field that contains the vendor-defined ID, typically the USB vendor ID.
    • - *
    • {@link #kCGTabletProximityEventTabletID TabletProximityEventTabletID} - Key to access an integer field that contains the vendor-defined tablet ID, typically the USB product ID.
    • - *
    • {@link #kCGTabletProximityEventPointerID TabletProximityEventPointerID} - Key to access an integer field that contains the vendor-defined ID of the pointing device.
    • - *
    • {@link #kCGTabletProximityEventDeviceID TabletProximityEventDeviceID} - Key to access an integer field that contains the system-assigned device ID.
    • - *
    • {@link #kCGTabletProximityEventSystemTabletID TabletProximityEventSystemTabletID} - Key to access an integer field that contains the system-assigned unique tablet ID.
    • - *
    • {@link #kCGTabletProximityEventVendorPointerType TabletProximityEventVendorPointerType} - Key to access an integer field that contains the vendor-assigned pointer type.
    • - *
    • {@link #kCGTabletProximityEventVendorPointerSerialNumber TabletProximityEventVendorPointerSerialNumber} - Key to access an integer field that contains the vendor-defined pointer serial number.
    • - *
    • {@link #kCGTabletProximityEventVendorUniqueID TabletProximityEventVendorUniqueID} - Key to access an integer field that contains the vendor-defined unique ID.
    • - *
    • {@link #kCGTabletProximityEventCapabilityMask TabletProximityEventCapabilityMask} - Key to access an integer field that contains the device capabilities mask.
    • - *
    • {@link #kCGTabletProximityEventPointerType TabletProximityEventPointerType} - Key to access an integer field that contains the pointer type.
    • - *
    • {@link #kCGTabletProximityEventEnterProximity TabletProximityEventEnterProximity} - - * Key to access an integer field that indicates whether the pen is in proximity to the tablet. - * - *

      The value is non-zero if the pen is in proximity to the tablet and zero when leaving the tablet.

      - *
    • - *
    • {@link #kCGEventTargetProcessSerialNumber EventTargetProcessSerialNumber} - Key to access a field that contains the event target process serial number. The value is a 64-bit value.
    • - *
    • {@link #kCGEventTargetUnixProcessID EventTargetUnixProcessID} - Key to access a field that contains the event target Unix process ID.
    • - *
    • {@link #kCGEventSourceUnixProcessID EventSourceUnixProcessID} - Key to access a field that contains the event source Unix process ID.
    • - *
    • {@link #kCGEventSourceUserData EventSourceUserData} - Key to access a field that contains the event source user-supplied data, up to 64 bits.
    • - *
    • {@link #kCGEventSourceUserID EventSourceUserID} - Key to access a field that contains the event source Unix effective UID.
    • - *
    • {@link #kCGEventSourceGroupID EventSourceGroupID} - Key to access a field that contains the event source Unix effective GID.
    • - *
    • {@link #kCGEventSourceStateID EventSourceStateID} - Key to access a field that contains the event source state ID used to create this event.
    • - *
    • {@link #kCGScrollWheelEventIsContinuous ScrollWheelEventIsContinuous} - - * Key to access an integer field that indicates whether a scrolling event contains continuous, pixel-based scrolling data. - * - *

      The value is non-zero when the scrolling data is pixel-based and zero when the scrolling data is line-based.

      - *
    • - *
    • {@link #kCGMouseEventWindowUnderMousePointer MouseEventWindowUnderMousePointer}
    • - *
    • {@link #kCGMouseEventWindowUnderMousePointerThatCanHandleThisEvent MouseEventWindowUnderMousePointerThatCanHandleThisEvent}
    • - *
    - */ - public static final int - kCGMouseEventNumber = 0, - kCGMouseEventClickState = 1, - kCGMouseEventPressure = 2, - kCGMouseEventButtonNumber = 3, - kCGMouseEventDeltaX = 4, - kCGMouseEventDeltaY = 5, - kCGMouseEventInstantMouser = 6, - kCGMouseEventSubtype = 7, - kCGKeyboardEventAutorepeat = 8, - kCGKeyboardEventKeycode = 9, - kCGKeyboardEventKeyboardType = 10, - kCGScrollWheelEventDeltaAxis1 = 11, - kCGScrollWheelEventDeltaAxis2 = 12, - kCGScrollWheelEventDeltaAxis3 = 13, - kCGScrollWheelEventFixedPtDeltaAxis1 = 93, - kCGScrollWheelEventFixedPtDeltaAxis2 = 94, - kCGScrollWheelEventFixedPtDeltaAxis3 = 95, - kCGScrollWheelEventPointDeltaAxis1 = 96, - kCGScrollWheelEventPointDeltaAxis2 = 97, - kCGScrollWheelEventPointDeltaAxis3 = 98, - kCGScrollWheelEventScrollPhase = 99, - kCGScrollWheelEventScrollCount = 100, - kCGScrollWheelEventMomentumPhase = 123, - kCGScrollWheelEventInstantMouser = 14, - kCGTabletEventPointX = 15, - kCGTabletEventPointY = 16, - kCGTabletEventPointZ = 17, - kCGTabletEventPointButtons = 18, - kCGTabletEventPointPressure = 19, - kCGTabletEventTiltX = 20, - kCGTabletEventTiltY = 21, - kCGTabletEventRotation = 22, - kCGTabletEventTangentialPressure = 23, - kCGTabletEventDeviceID = 24, - kCGTabletEventVendor1 = 25, - kCGTabletEventVendor2 = 26, - kCGTabletEventVendor3 = 27, - kCGTabletProximityEventVendorID = 28, - kCGTabletProximityEventTabletID = 29, - kCGTabletProximityEventPointerID = 30, - kCGTabletProximityEventDeviceID = 31, - kCGTabletProximityEventSystemTabletID = 32, - kCGTabletProximityEventVendorPointerType = 33, - kCGTabletProximityEventVendorPointerSerialNumber = 34, - kCGTabletProximityEventVendorUniqueID = 35, - kCGTabletProximityEventCapabilityMask = 36, - kCGTabletProximityEventPointerType = 37, - kCGTabletProximityEventEnterProximity = 38, - kCGEventTargetProcessSerialNumber = 39, - kCGEventTargetUnixProcessID = 40, - kCGEventSourceUnixProcessID = 41, - kCGEventSourceUserData = 42, - kCGEventSourceUserID = 43, - kCGEventSourceGroupID = 44, - kCGEventSourceStateID = 45, - kCGScrollWheelEventIsContinuous = 88, - kCGMouseEventWindowUnderMousePointer = 91, - kCGMouseEventWindowUnderMousePointerThatCanHandleThisEvent = 92; - - /** - * Constants used with the {@link #kCGMouseEventSubtype MouseEventSubtype} event field. ({@code CGEventMouseSubtype}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #kCGEventMouseSubtypeDefault EventMouseSubtypeDefault}
    • - *
    • {@link #kCGEventMouseSubtypeTabletPoint EventMouseSubtypeTabletPoint}
    • - *
    • {@link #kCGEventMouseSubtypeTabletProximity EventMouseSubtypeTabletProximity}
    • - *
    - */ - public static final int - kCGEventMouseSubtypeDefault = 0, - kCGEventMouseSubtypeTabletPoint = 1, - kCGEventMouseSubtypeTabletProximity = 2; - - protected CoreGraphics() { - throw new UnsupportedOperationException(); - } - - // --- [ CGEventGetTypeID ] --- - - /** Returns the type identifier for the opaque type {@code CGEventRef}. */ - @NativeType("CFTypeID") - public static long CGEventGetTypeID() { - long __functionAddress = Functions.EventGetTypeID; - return invokeJ(__functionAddress); - } - - // --- [ CGEventCreate ] --- - - /** Returns a new event using the event source {@code source}. If {@code source} is {@code NULL}, the default source is used. */ - @NativeType("CGEventRef") - public static long CGEventCreate(@NativeType("CGEventSourceRef") long source) { - long __functionAddress = Functions.EventCreate; - return invokePP(source, __functionAddress); - } - - // --- [ CGEventCreateData ] --- - - /** Return a "flattened" data representation of an event. */ - @NativeType("CFDataRef") - public static long CGEventCreateData(@NativeType("CFAllocatorRef") long allocator, @NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventCreateData; - return invokePPP(allocator, event, __functionAddress); - } - - // --- [ CGEventCreateFromData ] --- - - /** Returns an event created from a "flattened" data representation of the event. */ - @NativeType("CGEventRef") - public static long CGEventCreateFromData(@NativeType("CFAllocatorRef") long allocator, @NativeType("CFDataRef") long data) { - long __functionAddress = Functions.EventCreateFromData; - return invokePPP(allocator, data, __functionAddress); - } - - // --- [ CGEventCreateMouseEvent ] --- - - /** Unsafe version of: {@link #CGEventCreateMouseEvent EventCreateMouseEvent} */ - public static native long nCGEventCreateMouseEvent(long source, int mouseType, long mouseCursorPosition, int mouseButton, long __functionAddress); - - /** Unsafe version of: {@link #CGEventCreateMouseEvent EventCreateMouseEvent} */ - public static long nCGEventCreateMouseEvent(long source, int mouseType, long mouseCursorPosition, int mouseButton) { - long __functionAddress = Functions.EventCreateMouseEvent; - return nCGEventCreateMouseEvent(source, mouseType, mouseCursorPosition, mouseButton, __functionAddress); - } - - /** - * Returns a new mouse event. - * - *

    The event source may be taken from another event, or may be {@code NULL}. {@code mouseType} should be one of the mouse event types. - * {@code mouseCursorPosition} should be the position of the mouse cursor in global coordinates. {@code mouseButton} should be the button that's changing - * state; {@code mouseButton} is ignored unless {@code mouseType} is one of {@link #kCGEventOtherMouseDown EventOtherMouseDown}, {@link #kCGEventOtherMouseDragged EventOtherMouseDragged}, or {@link #kCGEventOtherMouseUp EventOtherMouseUp}.

    - * - *

    The current implemementation of the event system supports a maximum of thirty-two buttons. Mouse button 0 is the primary button on the mouse. Mouse - * button 1 is the secondary mouse button (right). Mouse button 2 is the center button, and the remaining buttons are in USB device order.

    - */ - @NativeType("CGEventRef") - public static long CGEventCreateMouseEvent(@NativeType("CGEventSourceRef") long source, @NativeType("CGEventType") int mouseType, CGPoint mouseCursorPosition, @NativeType("CGMouseButton") int mouseButton) { - return nCGEventCreateMouseEvent(source, mouseType, mouseCursorPosition.address(), mouseButton); - } - - // --- [ CGEventCreateKeyboardEvent ] --- - - /** - * Returns a new keyboard event. - * - *

    The event source may be taken from another event, or may be {@code NULL}. Based on the virtual key code values entered, the appropriate key down, key up, or - * flags changed events are generated.

    - * - *

    All keystrokes needed to generate a character must be entered, including SHIFT, CONTROL, OPTION, and COMMAND keys. For example, to produce a 'Z', the - * SHIFT key must be down, the 'z' key must go down, and then the SHIFT and 'z' key must be released:

    - * - *
    
    -     * CGEventCreateKeyboardEvent(source, (CGKeyCode)56, true);  // shift down
    -     * CGEventCreateKeyboardEvent(source, (CGKeyCode) 6, true);  // 'z' down
    -     * CGEventCreateKeyboardEvent(source, (CGKeyCode) 6, false); // 'z' up
    -     * CGEventCreateKeyboardEvent(source, (CGKeyCode)56, false); // 'shift up
    - */ - @NativeType("CGEventRef") - public static long CGEventCreateKeyboardEvent(@NativeType("CGEventSourceRef") long source, @NativeType("CGKeyCode") short virtualKey, @NativeType("bool") boolean keyDown) { - long __functionAddress = Functions.EventCreateKeyboardEvent; - return invokePCP(source, virtualKey, keyDown, __functionAddress); - } - - // --- [ CGEventCreateScrollWheelEvent ] --- - - /** - * Returns a new scrollwheel event. - * - *

    The event source may be taken from another event, or may be {@code NULL}. The scrolling units may be specified in lines using {@link #kCGScrollEventUnitLine ScrollEventUnitLine} or in - * pixels using {@link #kCGScrollEventUnitPixel ScrollEventUnitPixel}. {@link #kCGScrollEventUnitPixel ScrollEventUnitPixel} will produce an event that most applications interpret as a smooth scrolling event.

    - * - *

    One or more wheels must be specified. The current implementation supports up to three wheels.

    - * - *

    Every scrollwheel event can be interpreted to be scrolling by pixel or by line. The scale between the two is about 10 pixels per line by default. - * The scale can be altered by setting a custom value for the event source, using {@code CGEventSourceSetPixelsPerLine}.

    - */ - @NativeType("CGEventRef") - public static long CGEventCreateScrollWheelEvent(@NativeType("CGEventSourceRef") long source, @NativeType("CGScrollEventUnit") int units, @NativeType("uint32_t") int wheelCount, @NativeType("int32_t") int wheel1) { - long __functionAddress = Functions.EventCreateScrollWheelEvent; - return invokePP(source, units, wheelCount, wheel1, __functionAddress); - } - - /** - * Returns a new scrollwheel event. - * - *

    The event source may be taken from another event, or may be {@code NULL}. The scrolling units may be specified in lines using {@link #kCGScrollEventUnitLine ScrollEventUnitLine} or in - * pixels using {@link #kCGScrollEventUnitPixel ScrollEventUnitPixel}. {@link #kCGScrollEventUnitPixel ScrollEventUnitPixel} will produce an event that most applications interpret as a smooth scrolling event.

    - * - *

    One or more wheels must be specified. The current implementation supports up to three wheels.

    - * - *

    Every scrollwheel event can be interpreted to be scrolling by pixel or by line. The scale between the two is about 10 pixels per line by default. - * The scale can be altered by setting a custom value for the event source, using {@code CGEventSourceSetPixelsPerLine}.

    - */ - @NativeType("CGEventRef") - public static long CGEventCreateScrollWheelEvent(@NativeType("CGEventSourceRef") long source, @NativeType("CGScrollEventUnit") int units, @NativeType("int32_t") int wheel1) { - long __functionAddress = Functions.EventCreateScrollWheelEvent; - return invokePP(source, units, 1, wheel1, __functionAddress); - } - - // --- [ CGEventCreateScrollWheelEvent2 ] --- - - /** - * A non-variadic variant version of {@link #CGEventCreateScrollWheelEvent EventCreateScrollWheelEvent}. - * - * @since macOS 10.13 - */ - @NativeType("CGEventRef") - public static long CGEventCreateScrollWheelEvent2(@NativeType("CGEventSourceRef") long source, @NativeType("CGScrollEventUnit") int units, @NativeType("uint32_t") int wheelCount, @NativeType("int32_t") int wheel1, @NativeType("int32_t") int wheel2, @NativeType("int32_t") int wheel3) { - long __functionAddress = Functions.EventCreateScrollWheelEvent2; - if (CHECKS) { - check(__functionAddress); - } - return invokePP(source, units, wheelCount, wheel1, wheel2, wheel3, __functionAddress); - } - - // --- [ CGEventCreateCopy ] --- - - /** Return a copy of {@code event}. */ - @NativeType("CGEventRef") - public static long CGEventCreateCopy(@NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventCreateCopy; - return invokePP(event, __functionAddress); - } - - // --- [ CGEventCreateSourceFromEvent ] --- - - /** - * Returns an event source created from an existing event. - * - *

    Event filters may use the event source to generate events that are compatible with an event being filtered.

    - * - *

    Note that {@code CGEventCreateSourceFromEvent} may return {@code NULL} if the event was generated with a private {@code CGEventSourceStateID} owned by another - * process. Such events should be filtered based on the public state.

    - */ - @NativeType("CGEventSourceRef") - public static long CGEventCreateSourceFromEvent(@NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventCreateSourceFromEvent; - return invokePP(event, __functionAddress); - } - - // --- [ CGEventSetSource ] --- - - /** Set the event source of an event. */ - public static void CGEventSetSource(@NativeType("CGEventRef") long event, @NativeType("CGEventSourceRef") long source) { - long __functionAddress = Functions.EventSetSource; - invokePPV(event, source, __functionAddress); - } - - // --- [ CGEventGetType ] --- - - /** Returns the event type of an event (left mouse down, for example). */ - @NativeType("CGEventType") - public static int CGEventGetType(@NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventGetType; - return invokePI(event, __functionAddress); - } - - // --- [ CGEventSetType ] --- - - /** Sets the event type of an event. */ - public static void CGEventSetType(@NativeType("CGEventRef") long event, @NativeType("CGEventType") int type) { - long __functionAddress = Functions.EventSetType; - invokePV(event, type, __functionAddress); - } - - // --- [ CGEventGetTimestamp ] --- - - /** Returns the timestamp of an event. */ - @NativeType("CGEventTimestamp") - public static long CGEventGetTimestamp(@NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventGetTimestamp; - return invokePJ(event, __functionAddress); - } - - // --- [ CGEventSetTimestamp ] --- - - /** Sets the timestamp of an event. */ - public static void CGEventSetTimestamp(@NativeType("CGEventRef") long event, @NativeType("CGEventTimestamp") long timestamp) { - long __functionAddress = Functions.EventSetTimestamp; - invokePJV(event, timestamp, __functionAddress); - } - - // --- [ CGEventGetLocation ] --- - - /** Unsafe version of: {@link #CGEventGetLocation EventGetLocation} */ - public static native void nCGEventGetLocation(long event, long __functionAddress, long __result); - - /** Unsafe version of: {@link #CGEventGetLocation EventGetLocation} */ - public static void nCGEventGetLocation(long event, long __result) { - long __functionAddress = Functions.EventGetLocation; - nCGEventGetLocation(event, __functionAddress, __result); - } - - /** - * Returns the location of an event in global display coordinates. - * - *

    {@code CGPointZero} is returned if {@code event} is not a valid {@code CGEventRef}.

    - */ - public static CGPoint CGEventGetLocation(@NativeType("CGEventRef") long event, CGPoint __result) { - nCGEventGetLocation(event, __result.address()); - return __result; - } - - // --- [ CGEventGetUnflippedLocation ] --- - - /** Unsafe version of: {@link #CGEventGetUnflippedLocation EventGetUnflippedLocation} */ - public static native void nCGEventGetUnflippedLocation(long event, long __functionAddress, long __result); - - /** Unsafe version of: {@link #CGEventGetUnflippedLocation EventGetUnflippedLocation} */ - public static void nCGEventGetUnflippedLocation(long event, long __result) { - long __functionAddress = Functions.EventGetUnflippedLocation; - nCGEventGetUnflippedLocation(event, __functionAddress, __result); - } - - /** - * Return the location of an event relative to the lower-left corner of the main display. - * - *

    {@code CGPointZero} is returned if {@code event} is not a valid {@code CGEventRef}.

    - */ - public static CGPoint CGEventGetUnflippedLocation(@NativeType("CGEventRef") long event, CGPoint __result) { - nCGEventGetUnflippedLocation(event, __result.address()); - return __result; - } - - // --- [ CGEventSetLocation ] --- - - /** Unsafe version of: {@link #CGEventSetLocation EventSetLocation} */ - public static native void nCGEventSetLocation(long event, long location, long __functionAddress); - - /** Unsafe version of: {@link #CGEventSetLocation EventSetLocation} */ - public static void nCGEventSetLocation(long event, long location) { - long __functionAddress = Functions.EventSetLocation; - nCGEventSetLocation(event, location, __functionAddress); - } - - /** Sets the location of an event in global display coordinates. */ - public static void CGEventSetLocation(@NativeType("CGEventRef") long event, CGPoint location) { - nCGEventSetLocation(event, location.address()); - } - - // --- [ CGEventGetFlags ] --- - - /** - * Returns the event flags of an event. - * - *

    {@code (CGEventFlags)0} if {@code event} is not a valid {@code CGEventRef}.

    - */ - @NativeType("CGEventFlags") - public static long CGEventGetFlags(@NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventGetFlags; - return invokePJ(event, __functionAddress); - } - - // --- [ CGEventSetFlags ] --- - - /** Sets the event flags of an event. */ - public static void CGEventSetFlags(@NativeType("CGEventRef") long event, @NativeType("CGEventFlags") long flags) { - long __functionAddress = Functions.EventSetFlags; - invokePJV(event, flags, __functionAddress); - } - - // --- [ CGEventKeyboardGetUnicodeString ] --- - - /** Unsafe version of: {@link #CGEventKeyboardGetUnicodeString EventKeyboardGetUnicodeString} */ - public static void nCGEventKeyboardGetUnicodeString(long event, long maxStringLength, long actualStringLength, long unicodeString) { - long __functionAddress = Functions.EventKeyboardGetUnicodeString; - invokePNPPV(event, maxStringLength, actualStringLength, unicodeString, __functionAddress); - } - - /** - * Returns the Unicode string associated with a keyboard event. - * - *

    When you call this function with a {@code NULL} string or a maximum string length of 0, the function still returns the actual count of Unicode characters in - * the event.

    - */ - public static void CGEventKeyboardGetUnicodeString(@NativeType("CGEventRef") long event, @Nullable @NativeType("UniCharCount *") CLongBuffer actualStringLength, @Nullable @NativeType("UniChar *") ShortBuffer unicodeString) { - if (CHECKS) { - checkSafe(actualStringLength, 1); - } - nCGEventKeyboardGetUnicodeString(event, remainingSafe(unicodeString), memAddressSafe(actualStringLength), memAddressSafe(unicodeString)); - } - - // --- [ CGEventKeyboardSetUnicodeString ] --- - - /** Unsafe version of: {@link #CGEventKeyboardSetUnicodeString EventKeyboardSetUnicodeString} */ - public static void nCGEventKeyboardSetUnicodeString(long event, long stringLength, long unicodeString) { - long __functionAddress = Functions.EventKeyboardSetUnicodeString; - invokePNPV(event, stringLength, unicodeString, __functionAddress); - } - - /** - * Sets the Unicode string associated with a keyboard event. - * - *

    By default, the system translates the virtual key code in a keyboard event into a Unicode string based on the keyboard ID in the event source. This - * function allows you to manually override this string. Note that application frameworks may ignore the Unicode string in a keyboard event and do their - * own translation based on the virtual keycode and perceived event state.

    - */ - public static void CGEventKeyboardSetUnicodeString(@NativeType("CGEventRef") long event, @NativeType("UniChar const *") ShortBuffer unicodeString) { - nCGEventKeyboardSetUnicodeString(event, unicodeString.remaining(), memAddress(unicodeString)); - } - - // --- [ CGEventGetIntegerValueField ] --- - - /** Returns the integer value of a field in an event. */ - @NativeType("int64_t") - public static long CGEventGetIntegerValueField(@NativeType("CGEventRef") long event, @NativeType("CGEventField") int field) { - long __functionAddress = Functions.EventGetIntegerValueField; - return invokePJ(event, field, __functionAddress); - } - - // --- [ CGEventSetIntegerValueField ] --- - - /** - * Sets the integer value of a field in an event. - * - *

    Before calling this function, the event type must be set using a typed event creation function such as {@link #CGEventCreateMouseEvent EventCreateMouseEvent}, or by calling - * {@link #CGEventSetType EventSetType}.

    - * - *

    If you are creating a mouse event generated by a tablet, call this function and specify the field {@link #kCGMouseEventSubtype MouseEventSubtype} with a value of - * {@link #kCGEventMouseSubtypeTabletPoint EventMouseSubtypeTabletPoint} or {@link #kCGEventMouseSubtypeTabletProximity EventMouseSubtypeTabletProximity} before setting other parameters.

    - */ - public static void CGEventSetIntegerValueField(@NativeType("CGEventRef") long event, @NativeType("CGEventField") int field, @NativeType("int64_t") long value) { - long __functionAddress = Functions.EventSetIntegerValueField; - invokePJV(event, field, value, __functionAddress); - } - - // --- [ CGEventGetDoubleValueField ] --- - - /** - * Returns the floating-point value of a field in an event. - * - *

    In cases where the field value is represented within the event by a fixed point number or an integer, the result is scaled to the appropriate range as - * part of creating the floating-point representation.

    - */ - public static double CGEventGetDoubleValueField(@NativeType("CGEventRef") long event, @NativeType("CGEventField") int field) { - long __functionAddress = Functions.EventGetDoubleValueField; - return invokePD(event, field, __functionAddress); - } - - // --- [ CGEventSetDoubleValueField ] --- - - /** - * Sets the floating-point value of a field in an event. - * - *

    Before calling this function, the event type must be set using a typed event creation function such as {@link #CGEventCreateMouseEvent EventCreateMouseEvent}, or by calling - * {@link #CGEventSetType EventSetType}.

    - * - *

    In cases where the field’s value is represented within the event by a fixed point number or integer, the value parameter is scaled as needed and - * converted to the appropriate type.

    - */ - public static void CGEventSetDoubleValueField(@NativeType("CGEventRef") long event, @NativeType("CGEventField") int field, double value) { - long __functionAddress = Functions.EventSetDoubleValueField; - invokePV(event, field, value, __functionAddress); - } - - // --- [ CGEventTapCreate ] --- - - /** Unsafe version of: {@link #CGEventTapCreate EventTapCreate} */ - public static long nCGEventTapCreate(int tap, int place, int options, long eventsOfInterest, long callback, long userInfo) { - long __functionAddress = Functions.EventTapCreate; - return invokeJPPP(tap, place, options, eventsOfInterest, callback, userInfo, __functionAddress); - } - - /** - * Creates an event tap. - * - *

    Taps may be placed at the point where {@code HIDSystem} events enter the server, at the point where {@code HIDSystem} and remote control events enter a - * session, at the point where events have been annotated to flow to a specific application, or at the point where events are delivered to the - * application. Taps may be inserted at a specified point at the head of pre-existing filters, or appended after any pre-existing filters.

    - * - *

    Taps may be passive event listeners, or active filters. An active filter may pass an event through unmodified, modify an event, or discard an event. - * When a tap is registered, it identifies the set of events to be observed with a mask, and indicates if it is a passive or active event filter. Multiple - * event type bitmasks may be ORed together.

    - * - *

    Taps may only be placed at {@link #kCGHIDEventTap HIDEventTap} by a process running as the root user. {@code NULL} is returned for other users.

    - * - *

    Taps placed at {@link #kCGHIDEventTap HIDEventTap}, {@link #kCGSessionEventTap SessionEventTap}, {@link #kCGAnnotatedSessionEventTap AnnotatedSessionEventTap}, or on a specific process may only receive key up and down events if access - * for assistive devices is enabled (Preferences Accessibility panel, Keyboard view) or the caller is enabled for assistive device access, as by - * {@code AXMakeProcessTrusted}. If the tap is not permitted to monitor these events when the tap is created, then the appropriate bits in the mask are - * cleared. If that results in an empty mask, then {@code NULL} is returned.

    - * - *

    An event tap is represented as a {@code CFMachPortRef}. The event tap may be added to an appropriate run loop by calling {@code CFRunLoopAddSource}.

    - * - *

    Releasing the {@code CFMachPortRef} will release the tap.

    - * - *

    A {@code CGEventTapProxy} is an opaque reference to state within the client application associated with the tap. The tap function may pass this - * reference to other functions, such as the event-posting routines.

    - * - *

    The event tap callback runs from the {@code CFRunLoop} to which the tap {@code CFMachPort} is added as a source. Thread safety is defined by the - * {@code CFRunLoop} and its environment.

    - */ - @NativeType("CFMachPortRef") - public static long CGEventTapCreate(@NativeType("CGEventTapLocation") int tap, @NativeType("CGEventTapPlacement") int place, @NativeType("CGEventTapOptions") int options, @NativeType("CGEventMask") long eventsOfInterest, @NativeType("CGEventRef (*) (CGEventTapProxy, CGEventType, CGEventRef, void *)") CGEventTapCallBackI callback, @NativeType("void *") long userInfo) { - return nCGEventTapCreate(tap, place, options, eventsOfInterest, callback.address(), userInfo); - } - - // --- [ CGEventTapCreateForPid ] --- - - /** Unsafe version of: {@link #CGEventTapCreateForPid EventTapCreateForPid} */ - public static long nCGEventTapCreateForPid(long pid, int place, int options, long eventsOfInterest, long callback, long userInfo) { - long __functionAddress = Functions.EventTapCreateForPid; - if (CHECKS) { - check(__functionAddress); - check(pid); - } - return invokePJPPP(pid, place, options, eventsOfInterest, callback, userInfo, __functionAddress); - } - - /** - * Create an event tap for a specified process. - * - *

    Events routed to individual applications may be tapped using another function. {@code CGEventTapCreateForPSN} will report all events routed to the - * specified application.

    - * - * @since macOS 10.11 - */ - @NativeType("CFMachPortRef") - public static long CGEventTapCreateForPid(@NativeType("pid_t") long pid, @NativeType("CGEventTapPlacement") int place, @NativeType("CGEventTapOptions") int options, @NativeType("CGEventMask") long eventsOfInterest, @NativeType("CGEventRef (*) (CGEventTapProxy, CGEventType, CGEventRef, void *)") CGEventTapCallBackI callback, @NativeType("void *") long userInfo) { - return nCGEventTapCreateForPid(pid, place, options, eventsOfInterest, callback.address(), userInfo); - } - - // --- [ CGEventTapEnable ] --- - - /** - * Enables or disables an event tap. - * - *

    Taps are normally enabled when created. If a tap becomes unresponsive or a user requests taps be disabled, an appropriate - * {@code kCGEventTapDisabled...} event is passed to the registered {@link CGEventTapCallBack} function. An event tap may be re-enabled by calling this - * function.

    - */ - public static void CGEventTapEnable(@NativeType("CFMachPortRef") long tap, @NativeType("bool") boolean enable) { - long __functionAddress = Functions.EventTapEnable; - if (CHECKS) { - check(tap); - } - invokePV(tap, enable, __functionAddress); - } - - // --- [ CGEventTapIsEnabled ] --- - - /** Return true if {@code tap} is enabled; false otherwise. */ - @NativeType("bool") - public static boolean CGEventTapIsEnabled(@NativeType("CFMachPortRef") long tap) { - long __functionAddress = Functions.EventTapIsEnabled; - if (CHECKS) { - check(tap); - } - return invokePZ(tap, __functionAddress); - } - - // --- [ CGEventTapPostEvent ] --- - - /** - * Post an event from an event tap into the event stream. - * - *

    You can use this function to post a new event at the same point to which an event returned from an event tap callback function would be posted. The new - * event enters the system before the event returned by the callback enters the system. Events posted into the system will be seen by all taps placed - * after the tap posting the event.

    - */ - public static void CGEventTapPostEvent(@NativeType("CGEventTapProxy") long proxy, @NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventTapPostEvent; - invokePPV(proxy, event, __functionAddress); - } - - // --- [ CGEventPost ] --- - - /** - * Posts an event into the event stream at a specified location. - * - *

    This function posts the specified event immediately before any event taps instantiated for that location, and the event passes through any such - * taps.

    - * - * @param tap the location at which to post the event - * @param event the event to post - */ - public static void CGEventPost(@NativeType("CGEventTapLocation") int tap, @NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventPost; - if (CHECKS) { - check(event); - } - invokePV(tap, event, __functionAddress); - } - - // --- [ CGEventPostToPid ] --- - - /** - * Post an event into the event stream for a specific application. - * - *

    This function makes it possible for an application to establish an event routing policy, for example, by tapping events at the - * {@link #kCGAnnotatedSessionEventTap AnnotatedSessionEventTap} location and then posting the events to another desired process.

    - * - *

    This function posts the specified event immediately before any event taps instantiated for the specified process, and the event passes through any such - * taps.

    - * - * @since macOS 10.11 - */ - public static void CGEventPostToPid(@NativeType("pid_t") long pid, @NativeType("CGEventRef") long event) { - long __functionAddress = Functions.EventPostToPid; - if (CHECKS) { - check(__functionAddress); - check(pid); - } - invokePPV(pid, event, __functionAddress); - } - - // --- [ CGGetEventTapList ] --- - - /** Unsafe version of: {@link #CGGetEventTapList GetEventTapList} */ - public static int nCGGetEventTapList(int maxNumberOfTaps, long tapList, long eventTapCount) { - long __functionAddress = Functions.GetEventTapList; - return invokePPI(maxNumberOfTaps, tapList, eventTapCount, __functionAddress); - } - - /** - * Gets a list of currently installed event taps. - * - *

    {@code tapList} is an array of event tap information structures of length {@code maxNumberOfTaps}. You are responsible for allocating storage for this - * array. On return, your array contains a list of currently installed event taps. On return, the number of event taps that are currently installed is - * stored in {@code eventTapCount}. If you pass {@code NULL} in this parameter, the {@code maxNumberOfTaps} parameter is ignored, and the number of event taps - * that are currently installed is stored in {@code eventTapCount}.

    - * - *

    Each call to this function has the side effect of resetting the minimum and maximum latencies in the {@code tapList} parameter to the corresponding - * average values. Values reported in these fields reflect the minimum and maximum values seen since the preceding call, or the instantiation of the tap. - * This allows a monitoring tool to evaluate the best and worst case latency over time and under various operating conditions.

    - */ - @NativeType("CGError") - public static int CGGetEventTapList(@Nullable @NativeType("CGEventTapInformation *") CGEventTapInformation.Buffer tapList, @Nullable @NativeType("uint32_t *") IntBuffer eventTapCount) { - if (CHECKS) { - checkSafe(eventTapCount, 1); - } - return nCGGetEventTapList(remainingSafe(tapList), memAddressSafe(tapList), memAddressSafe(eventTapCount)); - } - - /** Array version of: {@link #CGEventKeyboardGetUnicodeString EventKeyboardGetUnicodeString} */ - public static void CGEventKeyboardGetUnicodeString(@NativeType("CGEventRef") long event, @Nullable @NativeType("UniCharCount *") CLongBuffer actualStringLength, @Nullable @NativeType("UniChar *") short[] unicodeString) { - long __functionAddress = Functions.EventKeyboardGetUnicodeString; - if (CHECKS) { - checkSafe(actualStringLength, 1); - } - invokePNPPV(event, (long)lengthSafe(unicodeString), memAddressSafe(actualStringLength), unicodeString, __functionAddress); - } - - /** Array version of: {@link #CGEventKeyboardSetUnicodeString EventKeyboardSetUnicodeString} */ - public static void CGEventKeyboardSetUnicodeString(@NativeType("CGEventRef") long event, @NativeType("UniChar const *") short[] unicodeString) { - long __functionAddress = Functions.EventKeyboardSetUnicodeString; - invokePNPV(event, (long)unicodeString.length, unicodeString, __functionAddress); - } - - /** Array version of: {@link #CGGetEventTapList GetEventTapList} */ - @NativeType("CGError") - public static int CGGetEventTapList(@Nullable @NativeType("CGEventTapInformation *") CGEventTapInformation.Buffer tapList, @Nullable @NativeType("uint32_t *") int[] eventTapCount) { - long __functionAddress = Functions.GetEventTapList; - if (CHECKS) { - checkSafe(eventTapCount, 1); - } - return invokePPI(remainingSafe(tapList), memAddressSafe(tapList), eventTapCount, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/DynamicLinkLoader.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/DynamicLinkLoader.java deleted file mode 100644 index 73d702a1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/DynamicLinkLoader.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to <dlfcn.h>. */ -public class DynamicLinkLoader { - - static { Library.initialize(); } - - /** The {@code mode} argument to {@link #dlopen} contains one of the following. */ - public static final int - RTLD_LAZY = 0x1, - RTLD_NOW = 0x2, - RTLD_LOCAL = 0x4, - RTLD_GLOBAL = 0x8; - - /** Special-handle values for {@link #dlsym}. */ - public static final long - RTLD_NEXT = 0xFFFFFFFFFFFFFFFFL, - RTLD_DEFAULT = 0xFFFFFFFFFFFFFFFEL, - RTLD_SELF = 0xFFFFFFFFFFFFFFFDL, - RTLD_MAIN_ONLY = 0xFFFFFFFFFFFFFFFBL; - - protected DynamicLinkLoader() { - throw new UnsupportedOperationException(); - } - - // --- [ dlopen ] --- - - /** Unsafe version of: {@link #dlopen} */ - public static native long ndlopen(long path, int mode); - - /** - * Loads and links a dynamic library or bundle. - * - *

    This function examines the Mach-O file specified by path. If the image is compatible with the current process and has not already been loaded into the - * process, the image is loaded and linked. If the image contains initializer functions, they are executed before this function returns.

    - * - *

    Subsequent calls to {@code dlopen} to load the same image return the same handle, but the internal reference count for the handle is incremented. - * Therefore, all {@code dlopen} calls must be balanced with {@link #dlclose} calls.

    - * - *

    For efficiency, the {@link #RTLD_LAZY} binding mode is preferred over {@link #RTLD_NOW}. However, using {@link #RTLD_NOW} ensures that any undefined - * symbols are discovered during the call to {@code dlopen}.

    - * - *

    The dynamic loader looks in the paths specified by a set of environment variables, and in the process's current directory, when it searches for a - * library. These paths are called dynamic loader search paths. The environment variables are {@code LD_LIBRARY_PATH}, {@code DYLD_LIBRARY_PATH}, and - * {@code DYLD_FALLBACK_LIBRARY_PATH}. The default value of {@code DYLD_FALLBACK_LIBRARY_PATH} (used when this variable is not set), is - * {@code $HOME/lib;/usr/local/lib;/usr/lib}.

    - * - *

    The order in which the search paths are searched depends on whether path is a filename (it does not contain a slash) or a pathname (it contains at least - * one slash).

    - * - *

    When path is a filename, the dynamic loader searches for the library in the search paths in the following order:

    - * - *
      - *
    • $LD_LIBRARY_PATH
    • - *
    • $DYLD_LIBRARY_PATH
    • - *
    • The process's working directory
    • - *
    • $DYLD_FALLBACK_LIBRARY_PATH
    • - *
    - * - *

    When path is a pathname, the dynamic loader searches for the library in the search paths in the following order:

    - * - *
      - *
    • $DYLD_LIBRARY_PATH
    • - *
    • The given pathname
    • - *
    • $DYLD_FALLBACK_LIBRARY_PATH using the filename
    • - *
    - * - * @param path path to the image to open - * @param mode specifies when the loaded image's external symbols are bound to their definitions in dependent libraries (lazy or at load time) and the visibility - * of the image's exported symbols (global or local). The value of this parameter is made up by ORing one binding behavior value with one visibility - * specification value. - * - *

    The following values specify the binding behavior:

    - * - *
      - *
    • {@link #RTLD_LAZY} (default): Each external symbol reference is bound the first time it's used.
    • - *
    • {@link #RTLD_NOW}: All external symbol references are bound immediately.
    • - *
    - * - *

    The following values specify external symbol visibility:

    - * - *
      - *
    • {@link #RTLD_GLOBAL} (default): The loaded image's exported symbols are available to any images that use a flat namespace or to calls to - * dlsym when using a special handle (see {@link #dlsym} for details).
    • - *
    • {@link #RTLD_LOCAL}: The loaded image's exported symbols are generally hidden. They are available only to {@link #dlsym} invocations that - * use the handle returned by this function.
    • - *
    - */ - @NativeType("void *") - public static long dlopen(@Nullable @NativeType("char const *") ByteBuffer path, int mode) { - if (CHECKS) { - checkNT1Safe(path); - } - return ndlopen(memAddressSafe(path), mode); - } - - /** - * Loads and links a dynamic library or bundle. - * - *

    This function examines the Mach-O file specified by path. If the image is compatible with the current process and has not already been loaded into the - * process, the image is loaded and linked. If the image contains initializer functions, they are executed before this function returns.

    - * - *

    Subsequent calls to {@code dlopen} to load the same image return the same handle, but the internal reference count for the handle is incremented. - * Therefore, all {@code dlopen} calls must be balanced with {@link #dlclose} calls.

    - * - *

    For efficiency, the {@link #RTLD_LAZY} binding mode is preferred over {@link #RTLD_NOW}. However, using {@link #RTLD_NOW} ensures that any undefined - * symbols are discovered during the call to {@code dlopen}.

    - * - *

    The dynamic loader looks in the paths specified by a set of environment variables, and in the process's current directory, when it searches for a - * library. These paths are called dynamic loader search paths. The environment variables are {@code LD_LIBRARY_PATH}, {@code DYLD_LIBRARY_PATH}, and - * {@code DYLD_FALLBACK_LIBRARY_PATH}. The default value of {@code DYLD_FALLBACK_LIBRARY_PATH} (used when this variable is not set), is - * {@code $HOME/lib;/usr/local/lib;/usr/lib}.

    - * - *

    The order in which the search paths are searched depends on whether path is a filename (it does not contain a slash) or a pathname (it contains at least - * one slash).

    - * - *

    When path is a filename, the dynamic loader searches for the library in the search paths in the following order:

    - * - *
      - *
    • $LD_LIBRARY_PATH
    • - *
    • $DYLD_LIBRARY_PATH
    • - *
    • The process's working directory
    • - *
    • $DYLD_FALLBACK_LIBRARY_PATH
    • - *
    - * - *

    When path is a pathname, the dynamic loader searches for the library in the search paths in the following order:

    - * - *
      - *
    • $DYLD_LIBRARY_PATH
    • - *
    • The given pathname
    • - *
    • $DYLD_FALLBACK_LIBRARY_PATH using the filename
    • - *
    - * - * @param path path to the image to open - * @param mode specifies when the loaded image's external symbols are bound to their definitions in dependent libraries (lazy or at load time) and the visibility - * of the image's exported symbols (global or local). The value of this parameter is made up by ORing one binding behavior value with one visibility - * specification value. - * - *

    The following values specify the binding behavior:

    - * - *
      - *
    • {@link #RTLD_LAZY} (default): Each external symbol reference is bound the first time it's used.
    • - *
    • {@link #RTLD_NOW}: All external symbol references are bound immediately.
    • - *
    - * - *

    The following values specify external symbol visibility:

    - * - *
      - *
    • {@link #RTLD_GLOBAL} (default): The loaded image's exported symbols are available to any images that use a flat namespace or to calls to - * dlsym when using a special handle (see {@link #dlsym} for details).
    • - *
    • {@link #RTLD_LOCAL}: The loaded image's exported symbols are generally hidden. They are available only to {@link #dlsym} invocations that - * use the handle returned by this function.
    • - *
    - */ - @NativeType("void *") - public static long dlopen(@Nullable @NativeType("char const *") CharSequence path, int mode) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(path, true); - long pathEncoded = path == null ? NULL : stack.getPointerAddress(); - return ndlopen(pathEncoded, mode); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ dlerror ] --- - - /** Unsafe version of: {@link #dlerror} */ - public static native long ndlerror(); - - /** - * Provides diagnostic information corresponding to problems with calls to {@link #dlopen}, {@link #dlsym}, and {@link #dlclose} in the same thread. - * - *

    When there's a problem to report, this function returns a pointer to a null-terminated string describing the problem. Otherwise, this function returns - * {@code NULL}.

    - * - *

    Each call to {@code dlerror} resets its diagnostic buffer. If a program needs to keep a record of past error messages, it must store them itself. - * Subsequent calls to {@code dlerror} in the same thread with no calls to {@link #dlopen}, {@link #dlsym}, or {@link #dlclose}, return {@code NULL}.

    - */ - @Nullable - @NativeType("char const *") - public static String dlerror() { - long __result = ndlerror(); - return memUTF8Safe(__result); - } - - // --- [ dlsym ] --- - - /** Unsafe version of: {@link #dlsym} */ - public static native long ndlsym(long handle, long name); - - /** - * Returns the address of a symbol. - * - *

    The value of handle specifies what images this function searches for to locate the symbol specified by the symbol parameter. The following table - * describes the possible values for the handle parameter:

    - * - * - * - * - * - * - *
    Handle valueSearch scope
    {@code dlopen} handleImage associated with the {@link #dlopen} handle.
    {@link #RTLD_DEFAULT}Every dependent library or {@link #RTLD_GLOBAL}–opened library in the current process, in the order they were loaded.
    {@link #RTLD_NEXT}Dependent libraries that were loaded after the one calling this function. Libraries opened with {@link #dlopen} are not searched.
    - * - *

    Unlike in the NS... functions, the symbol parameter doesn't require a leading underscore to be part of the symbol name.

    - * - * @param handle a handle obtained by a call to {@link #dlopen}, or a special handle. If the handle was obtained by a call to {@link #dlopen}, it must not have been - * closed with a call to {@link #dlclose}. These are the possible special-handle values: {@link #RTLD_DEFAULT}, and {@link #RTLD_NEXT}. - * @param name the null-terminated character string containing the C name of the symbol being sought - */ - @NativeType("void *") - public static long dlsym(@NativeType("void *") long handle, @NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - check(handle); - checkNT1(name); - } - return ndlsym(handle, memAddress(name)); - } - - /** - * Returns the address of a symbol. - * - *

    The value of handle specifies what images this function searches for to locate the symbol specified by the symbol parameter. The following table - * describes the possible values for the handle parameter:

    - * - * - * - * - * - * - *
    Handle valueSearch scope
    {@code dlopen} handleImage associated with the {@link #dlopen} handle.
    {@link #RTLD_DEFAULT}Every dependent library or {@link #RTLD_GLOBAL}–opened library in the current process, in the order they were loaded.
    {@link #RTLD_NEXT}Dependent libraries that were loaded after the one calling this function. Libraries opened with {@link #dlopen} are not searched.
    - * - *

    Unlike in the NS... functions, the symbol parameter doesn't require a leading underscore to be part of the symbol name.

    - * - * @param handle a handle obtained by a call to {@link #dlopen}, or a special handle. If the handle was obtained by a call to {@link #dlopen}, it must not have been - * closed with a call to {@link #dlclose}. These are the possible special-handle values: {@link #RTLD_DEFAULT}, and {@link #RTLD_NEXT}. - * @param name the null-terminated character string containing the C name of the symbol being sought - */ - @NativeType("void *") - public static long dlsym(@NativeType("void *") long handle, @NativeType("char const *") CharSequence name) { - if (CHECKS) { - check(handle); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return ndlsym(handle, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ dlclose ] --- - - /** Unsafe version of: {@link #dlclose} */ - public static native int ndlclose(long handle); - - /** - * Closes a dynamic library or bundle. - * - *

    This function decreases the reference count of the image referenced by handle. When the reference count for handle becomes 0, the termination routines - * in the image are called, and the image is removed from the address space of the current process. After that point, handle is rendered invalid.

    - * - * @param handle a handle obtained through a call to {@link #dlopen}. - */ - public static int dlclose(@NativeType("void *") long handle) { - if (CHECKS) { - check(handle); - } - return ndlclose(handle); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/EnumerationMutationHandler.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/EnumerationMutationHandler.java deleted file mode 100644 index da8de774..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/EnumerationMutationHandler.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A mutation handler. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     id id
    - * )
    - */ -public abstract class EnumerationMutationHandler extends Callback implements EnumerationMutationHandlerI { - - /** - * Creates a {@code EnumerationMutationHandler} instance from the specified function pointer. - * - * @return the new {@code EnumerationMutationHandler} - */ - public static EnumerationMutationHandler create(long functionPointer) { - EnumerationMutationHandlerI instance = Callback.get(functionPointer); - return instance instanceof EnumerationMutationHandler - ? (EnumerationMutationHandler)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static EnumerationMutationHandler createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code EnumerationMutationHandler} instance that delegates to the specified {@code EnumerationMutationHandlerI} instance. */ - public static EnumerationMutationHandler create(EnumerationMutationHandlerI instance) { - return instance instanceof EnumerationMutationHandler - ? (EnumerationMutationHandler)instance - : new Container(instance.address(), instance); - } - - protected EnumerationMutationHandler() { - super(CIF); - } - - EnumerationMutationHandler(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends EnumerationMutationHandler { - - private final EnumerationMutationHandlerI delegate; - - Container(long functionPointer, EnumerationMutationHandlerI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long id) { - delegate.invoke(id); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/EnumerationMutationHandlerI.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/EnumerationMutationHandlerI.java deleted file mode 100644 index 58ea9a74..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/EnumerationMutationHandlerI.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * A mutation handler. - * - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     id id
    - * )
    - */ -@FunctionalInterface -@NativeType("EnumerationMutationHandler") -public interface EnumerationMutationHandlerI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - /** - * Will be called when an object is mutated during a foreach iteration. - * - * @param id the object that was mutated - */ - void invoke(@NativeType("id") long id); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/LibC.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/LibC.java deleted file mode 100644 index dcf2aa57..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/LibC.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.JNI.*; - -/** Native bindings to libc, the Standard C Library. */ -public class LibC { - - /** Contains the function pointers loaded from {@code LibSystem.getLibrary()}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - getpid = apiGetFunctionAddress(LibSystem.getLibrary(), "getpid"); - - } - - protected LibC() { - throw new UnsupportedOperationException(); - } - - // --- [ getpid ] --- - - /** Returns the process ID of the calling process. */ - @NativeType("pid_t") - public static long getpid() { - long __functionAddress = Functions.getpid; - return invokeP(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/LibSystem.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/LibSystem.java deleted file mode 100644 index 65338faf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/LibSystem.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import org.lwjgl.system.*; - -/** - * Native bindings to libSystem, the MacOS system library. - * - *

    This class contains no functionality and is only responsible for loading the system library. Other libraries (contained in libSystem) reuse the library - * handle loaded by this class.

    - */ -public final class LibSystem { - - private static final SharedLibrary SYSTEM = Library.loadNative(LibSystem.class, "org.lwjgl", "System"); - - /** Returns the System {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return SYSTEM; - } - - private LibSystem() { - throw new UnsupportedOperationException(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibrary.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibrary.java deleted file mode 100644 index 75bf3718..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibrary.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system.macosx; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; - -/** Implements a {@link SharedLibrary} on the macOS. */ -public abstract class MacOSXLibrary extends SharedLibrary.Default { - - protected MacOSXLibrary(String name, long handle) { - super(name, handle); - } - - public static MacOSXLibrary getWithIdentifier(String bundleID) { - apiLog("Loading library: " + bundleID); - MacOSXLibraryBundle lib = MacOSXLibraryBundle.getWithIdentifier(bundleID); - apiLogMore("Success"); - return lib; - } - - public static MacOSXLibrary create(String name) { - return name.endsWith(".framework") - ? MacOSXLibraryBundle.create(name) - : new MacOSXLibraryDL(name); - } - -} - diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibraryBundle.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibraryBundle.java deleted file mode 100644 index 536b6a06..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibraryBundle.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system.macosx; - -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.macosx.CoreFoundation.*; - -/** Implements a {@link SharedLibrary} on the macOS using {@code CFBundle}. */ -public class MacOSXLibraryBundle extends MacOSXLibrary { - - public MacOSXLibraryBundle(String name, long bundleRef) { - super(name, bundleRef); - } - - public static MacOSXLibraryBundle getWithIdentifier(String bundleID) { - long filePath = NULL; - try (MemoryStack stack = stackPush()) { - filePath = CString2CFString(stack.UTF8(bundleID), kCFStringEncodingUTF8); - - long bundleRef = CFBundleGetBundleWithIdentifier(filePath); - if (bundleRef == NULL) { - throw new UnsatisfiedLinkError("Failed to retrieve bundle with identifier: " + bundleID); - } - - CFRetain(bundleRef); - return new MacOSXLibraryBundle(bundleID, bundleRef); - } finally { - if (filePath != NULL) { - CFRelease(filePath); - } - } - } - - public static MacOSXLibraryBundle create(String path) { - long filePath = NULL; - long url = NULL; - try (MemoryStack stack = stackPush()) { - filePath = CString2CFString(stack.UTF8(path), kCFStringEncodingUTF8); - url = check(CFURLCreateWithFileSystemPath(NULL, filePath, kCFURLPOSIXPathStyle, true)); - - long bundleRef = CFBundleCreate(NULL, url); - if (bundleRef == NULL) { - throw new UnsatisfiedLinkError("Failed to create bundle: " + path); - } - - return new MacOSXLibraryBundle(path, bundleRef); - } finally { - if (url != NULL) { - CFRelease(url); - } - if (filePath != NULL) { - CFRelease(filePath); - } - } - } - - @Nullable - @Override public String getPath() { - return null; - } - - @Override - public long getFunctionAddress(ByteBuffer functionName) { - long nameRef = CString2CFString(functionName, kCFStringEncodingASCII); - try { - return CFBundleGetFunctionPointerForName(address(), nameRef); - } finally { - CFRelease(nameRef); - } - } - - private static long CString2CFString(ByteBuffer name, int encoding) { - return check(CFStringCreateWithCStringNoCopy(NULL, name, encoding, kCFAllocatorNull)); - } - - @Override - public void free() { - CFRelease(address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibraryDL.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibraryDL.java deleted file mode 100644 index 8acb3089..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/MacOSXLibraryDL.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system.macosx; - -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.macosx.DynamicLinkLoader.*; - -/** Implements a {@link SharedLibrary} on the macOS using {@link DynamicLinkLoader#dlopen dlopen}. */ -public class MacOSXLibraryDL extends MacOSXLibrary { - - public MacOSXLibraryDL(String name) { - this(name, loadLibrary(name)); - } - - public MacOSXLibraryDL(String name, long handle) { - super(name, handle); - } - - private static long loadLibrary(String name) { - long handle; - try (MemoryStack stack = stackPush()) { - handle = dlopen(stack.UTF8(name), RTLD_LAZY | RTLD_LOCAL); - } - if (handle == NULL) { - throw new UnsatisfiedLinkError("Failed to dynamically load library: " + name + "(error = " + dlerror() + ")"); - } - return handle; - } - - @Nullable - @Override - public String getPath() { - return SharedLibraryUtil.getLibraryPath(address()); - } - - @Override - public long getFunctionAddress(ByteBuffer functionName) { - return dlsym(address(), functionName); - } - - @Override - public void free() { - dlclose(address()); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCMethodDescription.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCMethodDescription.java deleted file mode 100644 index 2c07c4df..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCMethodDescription.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Defines a method. - * - *

    Layout

    - * - *
    
    - * struct objc_method_description {
    - *     SEL {@link #name};
    - *     char * {@link #types};
    - * }
    - */ -@NativeType("struct objc_method_description") -public class ObjCMethodDescription extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NAME, - TYPES; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NAME = layout.offsetof(0); - TYPES = layout.offsetof(1); - } - - protected ObjCMethodDescription(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected ObjCMethodDescription create(long address, @Nullable ByteBuffer container) { - return new ObjCMethodDescription(address, container); - } - - /** - * Creates a {@code ObjCMethodDescription} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public ObjCMethodDescription(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the name of the method at runtime */ - @NativeType("SEL") - public long name() { return nname(address()); } - /** the types of the method arguments */ - @NativeType("char *") - public ByteBuffer types() { return ntypes(address()); } - /** the types of the method arguments */ - @NativeType("char *") - public String typesString() { return ntypesString(address()); } - - // ----------------------------------- - - /** Returns a new {@code ObjCMethodDescription} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static ObjCMethodDescription malloc() { - return new ObjCMethodDescription(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code ObjCMethodDescription} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static ObjCMethodDescription calloc() { - return new ObjCMethodDescription(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code ObjCMethodDescription} instance allocated with {@link BufferUtils}. */ - public static ObjCMethodDescription create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new ObjCMethodDescription(memAddress(container), container); - } - - /** Returns a new {@code ObjCMethodDescription} instance for the specified memory address. */ - public static ObjCMethodDescription create(long address) { - return new ObjCMethodDescription(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static ObjCMethodDescription createSafe(long address) { - return address == NULL ? null : new ObjCMethodDescription(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static ObjCMethodDescription mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static ObjCMethodDescription callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static ObjCMethodDescription mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static ObjCMethodDescription callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code ObjCMethodDescription} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static ObjCMethodDescription malloc(MemoryStack stack) { - return new ObjCMethodDescription(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code ObjCMethodDescription} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static ObjCMethodDescription calloc(MemoryStack stack) { - return new ObjCMethodDescription(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #name}. */ - public static long nname(long struct) { return memGetAddress(struct + ObjCMethodDescription.NAME); } - /** Unsafe version of {@link #types}. */ - public static ByteBuffer ntypes(long struct) { return memByteBufferNT1(memGetAddress(struct + ObjCMethodDescription.TYPES)); } - /** Unsafe version of {@link #typesString}. */ - public static String ntypesString(long struct) { return memUTF8(memGetAddress(struct + ObjCMethodDescription.TYPES)); } - - // ----------------------------------- - - /** An array of {@link ObjCMethodDescription} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final ObjCMethodDescription ELEMENT_FACTORY = ObjCMethodDescription.create(-1L); - - /** - * Creates a new {@code ObjCMethodDescription.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link ObjCMethodDescription#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected ObjCMethodDescription getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link ObjCMethodDescription#name} field. */ - @NativeType("SEL") - public long name() { return ObjCMethodDescription.nname(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@link ObjCMethodDescription#types} field. */ - @NativeType("char *") - public ByteBuffer types() { return ObjCMethodDescription.ntypes(address()); } - /** @return the null-terminated string pointed to by the {@link ObjCMethodDescription#types} field. */ - @NativeType("char *") - public String typesString() { return ObjCMethodDescription.ntypesString(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCPropertyAttribute.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCPropertyAttribute.java deleted file mode 100644 index 1e30fb27..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCPropertyAttribute.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Defines a property attribute. - * - *

    Layout

    - * - *
    
    - * struct objc_property_attribute_t {
    - *     char * {@link #name};
    - *     char * {@link #value};
    - * }
    - */ -@NativeType("struct objc_property_attribute_t") -public class ObjCPropertyAttribute extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NAME, - VALUE; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NAME = layout.offsetof(0); - VALUE = layout.offsetof(1); - } - - protected ObjCPropertyAttribute(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected ObjCPropertyAttribute create(long address, @Nullable ByteBuffer container) { - return new ObjCPropertyAttribute(address, container); - } - - /** - * Creates a {@code ObjCPropertyAttribute} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public ObjCPropertyAttribute(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the name of the attribute */ - @NativeType("char *") - public ByteBuffer name() { return nname(address()); } - /** the name of the attribute */ - @NativeType("char *") - public String nameString() { return nnameString(address()); } - /** the value of the attribute (usually empty) */ - @NativeType("char *") - public ByteBuffer value() { return nvalue(address()); } - /** the value of the attribute (usually empty) */ - @NativeType("char *") - public String valueString() { return nvalueString(address()); } - - /** Sets the address of the specified encoded string to the {@link #name} field. */ - public ObjCPropertyAttribute name(@NativeType("char *") ByteBuffer value) { nname(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@link #value} field. */ - public ObjCPropertyAttribute value(@NativeType("char *") ByteBuffer value) { nvalue(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public ObjCPropertyAttribute set( - ByteBuffer name, - ByteBuffer value - ) { - name(name); - value(value); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public ObjCPropertyAttribute set(ObjCPropertyAttribute src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code ObjCPropertyAttribute} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static ObjCPropertyAttribute malloc() { - return new ObjCPropertyAttribute(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code ObjCPropertyAttribute} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static ObjCPropertyAttribute calloc() { - return new ObjCPropertyAttribute(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code ObjCPropertyAttribute} instance allocated with {@link BufferUtils}. */ - public static ObjCPropertyAttribute create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new ObjCPropertyAttribute(memAddress(container), container); - } - - /** Returns a new {@code ObjCPropertyAttribute} instance for the specified memory address. */ - public static ObjCPropertyAttribute create(long address) { - return new ObjCPropertyAttribute(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static ObjCPropertyAttribute createSafe(long address) { - return address == NULL ? null : new ObjCPropertyAttribute(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static ObjCPropertyAttribute mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static ObjCPropertyAttribute callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static ObjCPropertyAttribute mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static ObjCPropertyAttribute callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code ObjCPropertyAttribute} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static ObjCPropertyAttribute malloc(MemoryStack stack) { - return new ObjCPropertyAttribute(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code ObjCPropertyAttribute} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static ObjCPropertyAttribute calloc(MemoryStack stack) { - return new ObjCPropertyAttribute(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #name}. */ - public static ByteBuffer nname(long struct) { return memByteBufferNT1(memGetAddress(struct + ObjCPropertyAttribute.NAME)); } - /** Unsafe version of {@link #nameString}. */ - public static String nnameString(long struct) { return memUTF8(memGetAddress(struct + ObjCPropertyAttribute.NAME)); } - /** Unsafe version of {@link #value}. */ - public static ByteBuffer nvalue(long struct) { return memByteBufferNT1(memGetAddress(struct + ObjCPropertyAttribute.VALUE)); } - /** Unsafe version of {@link #valueString}. */ - public static String nvalueString(long struct) { return memUTF8(memGetAddress(struct + ObjCPropertyAttribute.VALUE)); } - - /** Unsafe version of {@link #name(ByteBuffer) name}. */ - public static void nname(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + ObjCPropertyAttribute.NAME, memAddress(value)); - } - /** Unsafe version of {@link #value(ByteBuffer) value}. */ - public static void nvalue(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + ObjCPropertyAttribute.VALUE, memAddress(value)); - } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + ObjCPropertyAttribute.NAME)); - check(memGetAddress(struct + ObjCPropertyAttribute.VALUE)); - } - - // ----------------------------------- - - /** An array of {@link ObjCPropertyAttribute} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final ObjCPropertyAttribute ELEMENT_FACTORY = ObjCPropertyAttribute.create(-1L); - - /** - * Creates a new {@code ObjCPropertyAttribute.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link ObjCPropertyAttribute#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected ObjCPropertyAttribute getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@link ObjCPropertyAttribute#name} field. */ - @NativeType("char *") - public ByteBuffer name() { return ObjCPropertyAttribute.nname(address()); } - /** @return the null-terminated string pointed to by the {@link ObjCPropertyAttribute#name} field. */ - @NativeType("char *") - public String nameString() { return ObjCPropertyAttribute.nnameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@link ObjCPropertyAttribute#value} field. */ - @NativeType("char *") - public ByteBuffer value() { return ObjCPropertyAttribute.nvalue(address()); } - /** @return the null-terminated string pointed to by the {@link ObjCPropertyAttribute#value} field. */ - @NativeType("char *") - public String valueString() { return ObjCPropertyAttribute.nvalueString(address()); } - - /** Sets the address of the specified encoded string to the {@link ObjCPropertyAttribute#name} field. */ - public Buffer name(@NativeType("char *") ByteBuffer value) { ObjCPropertyAttribute.nname(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@link ObjCPropertyAttribute#value} field. */ - public Buffer value(@NativeType("char *") ByteBuffer value) { ObjCPropertyAttribute.nvalue(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCRuntime.java b/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCRuntime.java deleted file mode 100644 index 34812a5c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/macosx/ObjCRuntime.java +++ /dev/null @@ -1,3405 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.macosx; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to the Objective-C Runtime. - * - *

    Due to the nature of the {@code objc_msgSend*} functions, they are not directly exposed in this binding. Advanced users with good understanding of the - * complexity involved with using these functions, may access them via the {@link #getLibrary} method:

    - * - *
    
    - * SharedLibrary objc = ObjCRuntime.getLibrary();
    - * long objc_msgSend = objc.getFunctionAddress("objc_msgSend");
    - * 
    - * // example usage
    - * long NSThread = objc_getClass("NSThread");
    - * long currentThread = invokePPP(NSThread, sel_getUid("currentThread"), objc_msgSend);
    - * - *

    The safe way to use objc_msgSend in C code is to cast it to an appropriate function pointer. This is exactly what the {@link JNI JNI} - * class does. If a particular function signature is not available, {@link org.lwjgl.system.libffi.LibFFI LibFFI} may be used to invoke it.

    - * - *

    The functions not exposed are:

    - * - *
      - *
    • objc_msgSend
    • - *
    • objc_msgSend_stret
    • - *
    • objc_msgSendSuper
    • - *
    • objc_msgSendSuper_stret
    • - *
    - */ -public class ObjCRuntime { - - private static final SharedLibrary OBJC = Library.loadNative(ObjCRuntime.class, "org.lwjgl", "objc"); - - /** Contains the function pointers loaded from the objc {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - object_copy = apiGetFunctionAddress(OBJC, "object_copy"), - object_dispose = apiGetFunctionAddress(OBJC, "object_dispose"), - object_getClass = apiGetFunctionAddress(OBJC, "object_getClass"), - object_setClass = apiGetFunctionAddress(OBJC, "object_setClass"), - object_getClassName = apiGetFunctionAddress(OBJC, "object_getClassName"), - object_getIndexedIvars = apiGetFunctionAddress(OBJC, "object_getIndexedIvars"), - object_getIvar = apiGetFunctionAddress(OBJC, "object_getIvar"), - object_setIvar = apiGetFunctionAddress(OBJC, "object_setIvar"), - object_setInstanceVariable = apiGetFunctionAddress(OBJC, "object_setInstanceVariable"), - object_getInstanceVariable = apiGetFunctionAddress(OBJC, "object_getInstanceVariable"), - objc_getClass = apiGetFunctionAddress(OBJC, "objc_getClass"), - objc_getMetaClass = apiGetFunctionAddress(OBJC, "objc_getMetaClass"), - objc_lookUpClass = apiGetFunctionAddress(OBJC, "objc_lookUpClass"), - objc_getRequiredClass = apiGetFunctionAddress(OBJC, "objc_getRequiredClass"), - objc_getClassList = apiGetFunctionAddress(OBJC, "objc_getClassList"), - objc_copyClassList = apiGetFunctionAddress(OBJC, "objc_copyClassList"), - class_getName = apiGetFunctionAddress(OBJC, "class_getName"), - class_isMetaClass = apiGetFunctionAddress(OBJC, "class_isMetaClass"), - class_getSuperclass = apiGetFunctionAddress(OBJC, "class_getSuperclass"), - class_getVersion = apiGetFunctionAddress(OBJC, "class_getVersion"), - class_setVersion = apiGetFunctionAddress(OBJC, "class_setVersion"), - class_getInstanceSize = apiGetFunctionAddress(OBJC, "class_getInstanceSize"), - class_getInstanceVariable = apiGetFunctionAddress(OBJC, "class_getInstanceVariable"), - class_getClassVariable = apiGetFunctionAddress(OBJC, "class_getClassVariable"), - class_copyIvarList = apiGetFunctionAddress(OBJC, "class_copyIvarList"), - class_getInstanceMethod = apiGetFunctionAddress(OBJC, "class_getInstanceMethod"), - class_getClassMethod = apiGetFunctionAddress(OBJC, "class_getClassMethod"), - class_getMethodImplementation = apiGetFunctionAddress(OBJC, "class_getMethodImplementation"), - class_respondsToSelector = apiGetFunctionAddress(OBJC, "class_respondsToSelector"), - class_copyMethodList = apiGetFunctionAddress(OBJC, "class_copyMethodList"), - class_conformsToProtocol = apiGetFunctionAddress(OBJC, "class_conformsToProtocol"), - class_copyProtocolList = apiGetFunctionAddress(OBJC, "class_copyProtocolList"), - class_getProperty = apiGetFunctionAddress(OBJC, "class_getProperty"), - class_copyPropertyList = apiGetFunctionAddress(OBJC, "class_copyPropertyList"), - class_getIvarLayout = apiGetFunctionAddress(OBJC, "class_getIvarLayout"), - class_getWeakIvarLayout = apiGetFunctionAddress(OBJC, "class_getWeakIvarLayout"), - class_addMethod = apiGetFunctionAddress(OBJC, "class_addMethod"), - class_replaceMethod = apiGetFunctionAddress(OBJC, "class_replaceMethod"), - class_addIvar = apiGetFunctionAddress(OBJC, "class_addIvar"), - class_addProtocol = apiGetFunctionAddress(OBJC, "class_addProtocol"), - class_addProperty = apiGetFunctionAddress(OBJC, "class_addProperty"), - class_replaceProperty = apiGetFunctionAddress(OBJC, "class_replaceProperty"), - class_setIvarLayout = apiGetFunctionAddress(OBJC, "class_setIvarLayout"), - class_setWeakIvarLayout = apiGetFunctionAddress(OBJC, "class_setWeakIvarLayout"), - class_createInstance = apiGetFunctionAddress(OBJC, "class_createInstance"), - objc_constructInstance = apiGetFunctionAddress(OBJC, "objc_constructInstance"), - objc_destructInstance = apiGetFunctionAddress(OBJC, "objc_destructInstance"), - objc_allocateClassPair = apiGetFunctionAddress(OBJC, "objc_allocateClassPair"), - objc_registerClassPair = apiGetFunctionAddress(OBJC, "objc_registerClassPair"), - objc_disposeClassPair = apiGetFunctionAddress(OBJC, "objc_disposeClassPair"), - method_getName = apiGetFunctionAddress(OBJC, "method_getName"), - method_getImplementation = apiGetFunctionAddress(OBJC, "method_getImplementation"), - method_getTypeEncoding = apiGetFunctionAddress(OBJC, "method_getTypeEncoding"), - method_getNumberOfArguments = apiGetFunctionAddress(OBJC, "method_getNumberOfArguments"), - method_copyReturnType = apiGetFunctionAddress(OBJC, "method_copyReturnType"), - method_copyArgumentType = apiGetFunctionAddress(OBJC, "method_copyArgumentType"), - method_getReturnType = apiGetFunctionAddress(OBJC, "method_getReturnType"), - method_getArgumentType = apiGetFunctionAddress(OBJC, "method_getArgumentType"), - method_setImplementation = apiGetFunctionAddress(OBJC, "method_setImplementation"), - method_exchangeImplementations = apiGetFunctionAddress(OBJC, "method_exchangeImplementations"), - ivar_getName = apiGetFunctionAddress(OBJC, "ivar_getName"), - ivar_getTypeEncoding = apiGetFunctionAddress(OBJC, "ivar_getTypeEncoding"), - ivar_getOffset = apiGetFunctionAddress(OBJC, "ivar_getOffset"), - property_getName = apiGetFunctionAddress(OBJC, "property_getName"), - property_getAttributes = apiGetFunctionAddress(OBJC, "property_getAttributes"), - property_copyAttributeList = apiGetFunctionAddress(OBJC, "property_copyAttributeList"), - property_copyAttributeValue = apiGetFunctionAddress(OBJC, "property_copyAttributeValue"), - objc_getProtocol = apiGetFunctionAddress(OBJC, "objc_getProtocol"), - objc_copyProtocolList = apiGetFunctionAddress(OBJC, "objc_copyProtocolList"), - protocol_conformsToProtocol = apiGetFunctionAddress(OBJC, "protocol_conformsToProtocol"), - protocol_isEqual = apiGetFunctionAddress(OBJC, "protocol_isEqual"), - protocol_getName = apiGetFunctionAddress(OBJC, "protocol_getName"), - protocol_getMethodDescription = apiGetFunctionAddress(OBJC, "protocol_getMethodDescription"), - protocol_copyMethodDescriptionList = apiGetFunctionAddress(OBJC, "protocol_copyMethodDescriptionList"), - protocol_getProperty = apiGetFunctionAddress(OBJC, "protocol_getProperty"), - protocol_copyPropertyList = apiGetFunctionAddress(OBJC, "protocol_copyPropertyList"), - protocol_copyProtocolList = apiGetFunctionAddress(OBJC, "protocol_copyProtocolList"), - objc_allocateProtocol = apiGetFunctionAddress(OBJC, "objc_allocateProtocol"), - objc_registerProtocol = apiGetFunctionAddress(OBJC, "objc_registerProtocol"), - protocol_addMethodDescription = apiGetFunctionAddress(OBJC, "protocol_addMethodDescription"), - protocol_addProtocol = apiGetFunctionAddress(OBJC, "protocol_addProtocol"), - protocol_addProperty = apiGetFunctionAddress(OBJC, "protocol_addProperty"), - objc_copyImageNames = apiGetFunctionAddress(OBJC, "objc_copyImageNames"), - class_getImageName = apiGetFunctionAddress(OBJC, "class_getImageName"), - objc_copyClassNamesForImage = apiGetFunctionAddress(OBJC, "objc_copyClassNamesForImage"), - sel_getName = apiGetFunctionAddress(OBJC, "sel_getName"), - sel_getUid = apiGetFunctionAddress(OBJC, "sel_getUid"), - sel_registerName = apiGetFunctionAddress(OBJC, "sel_registerName"), - sel_isEqual = apiGetFunctionAddress(OBJC, "sel_isEqual"), - objc_enumerationMutation = apiGetFunctionAddress(OBJC, "objc_enumerationMutation"), - objc_setEnumerationMutationHandler = apiGetFunctionAddress(OBJC, "objc_setEnumerationMutationHandler"), - imp_implementationWithBlock = apiGetFunctionAddress(OBJC, "imp_implementationWithBlock"), - imp_getBlock = apiGetFunctionAddress(OBJC, "imp_getBlock"), - imp_removeBlock = apiGetFunctionAddress(OBJC, "imp_removeBlock"), - objc_loadWeak = apiGetFunctionAddress(OBJC, "objc_loadWeak"), - objc_storeWeak = apiGetFunctionAddress(OBJC, "objc_storeWeak"), - objc_setAssociatedObject = apiGetFunctionAddress(OBJC, "objc_setAssociatedObject"), - objc_getAssociatedObject = apiGetFunctionAddress(OBJC, "objc_getAssociatedObject"), - objc_removeAssociatedObjects = apiGetFunctionAddress(OBJC, "objc_removeAssociatedObjects"); - - } - - /** Returns the objc {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return OBJC; - } - - /** Nil value. */ - public static final long nil = 0x0L; - - /** Boolean values. */ - public static final byte - YES = 1, - NO = 0; - - /** Types. */ - public static final char - _C_ID = '@', - _C_CLASS = '#', - _C_SEL = ':', - _C_CHR = 'c', - _C_UCHR = 'C', - _C_SHT = 's', - _C_USHT = 'S', - _C_INT = 'i', - _C_UINT = 'I', - _C_LNG = 'l', - _C_ULNG = 'L', - _C_LNG_LNG = 'q', - _C_ULNG_LNG = 'Q', - _C_FLT = 'f', - _C_DBL = 'd', - _C_BFLD = 'b', - _C_BOOL = 'B', - _C_VOID = 'v', - _C_UNDEF = '?', - _C_PTR = '^', - _C_CHARPTR = '*', - _C_ATOM = '%', - _C_ARY_B = '[', - _C_ARY_E = ']', - _C_UNION_B = '(', - _C_UNION_E = ')', - _C_STRUCT_B = '{', - _C_STRUCT_E = '}', - _C_VECTOR = '!', - _C_CONST = 'r'; - - /** Policies related to associative references. */ - public static final int - OBJC_ASSOCIATION_ASSIGN = 0, - OBJC_ASSOCIATION_RETAIN_NONATOMIC = 1, - OBJC_ASSOCIATION_COPY_NONATOMIC = 3, - OBJC_ASSOCIATION_RETAIN = 1401, - OBJC_ASSOCIATION_COPY = 1403; - - protected ObjCRuntime() { - throw new UnsupportedOperationException(); - } - - // --- [ object_copy ] --- - - /** - * Returns a copy of a given object. - * - * @param obj an Objective-C object - * @param size the size of the object {@code obj} - * - * @return a copy of obj - */ - @NativeType("id") - public static long object_copy(@NativeType("id") long obj, @NativeType("size_t") long size) { - long __functionAddress = Functions.object_copy; - if (CHECKS) { - check(obj); - } - return invokePPP(obj, size, __functionAddress); - } - - // --- [ object_dispose ] --- - - /** - * Frees the memory occupied by a given object. - * - * @param obj an Objective-C object - * - * @return {@link #nil} - */ - @NativeType("id") - public static long object_dispose(@NativeType("id") long obj) { - long __functionAddress = Functions.object_dispose; - if (CHECKS) { - check(obj); - } - return invokePP(obj, __functionAddress); - } - - // --- [ object_getClass ] --- - - /** - * Returns the class of an object. - * - * @param obj an Objective-C object - * - * @return the class object of which object is an instance, or Nil if {@code obj} is {@link #nil} - */ - @NativeType("Class") - public static long object_getClass(@NativeType("id") long obj) { - long __functionAddress = Functions.object_getClass; - return invokePP(obj, __functionAddress); - } - - // --- [ object_setClass ] --- - - /** - * Sets the class of an object. - * - * @param obj the object to modify - * @param cls a class object - * - * @return the previous value of object's class, or Nil if {@code obj} is {@link #nil} - */ - @NativeType("Class") - public static long object_setClass(@NativeType("id") long obj, @NativeType("Class") long cls) { - long __functionAddress = Functions.object_setClass; - if (CHECKS) { - check(cls); - } - return invokePPP(obj, cls, __functionAddress); - } - - // --- [ object_getClassName ] --- - - /** Unsafe version of: {@link #object_getClassName} */ - public static long nobject_getClassName(long obj) { - long __functionAddress = Functions.object_getClassName; - return invokePP(obj, __functionAddress); - } - - /** - * Returns the class name of a given object. - * - * @param obj an Objective-C object - * - * @return the name of the class of which {@code obj} is an instance - */ - @Nullable - @NativeType("char const *") - public static String object_getClassName(@NativeType("id") long obj) { - long __result = nobject_getClassName(obj); - return memUTF8Safe(__result); - } - - // --- [ object_getIndexedIvars ] --- - - /** - * This function returns a pointer to any extra bytes allocated with the instance (as specified by {@link #class_createInstance} with extraBytes>0). This - * memory follows the object's ordinary ivars, but may not be adjacent to the last ivar. - * - *

    The returned pointer is guaranteed to be pointer-size aligned, even if the area following the object's last ivar is less aligned than that. Alignment - * greater than pointer-size is never guaranteed, even if the area following the object's last ivar is more aligned than that.

    - * - *

    In a garbage-collected environment, the memory is scanned conservatively.

    - * - * @param obj an Objective-C object - * - * @return a pointer to any extra bytes allocated with {@code obj}. If {@code obj} was not allocated with any extra bytes, then dereferencing the returned pointer - * is undefined. - */ - @NativeType("void *") - public static long object_getIndexedIvars(@NativeType("id") long obj) { - long __functionAddress = Functions.object_getIndexedIvars; - if (CHECKS) { - check(obj); - } - return invokePP(obj, __functionAddress); - } - - // --- [ object_getIvar ] --- - - /** - * Reads the value of an instance variable in an object. - * - * @param obj the object containing the instance variable whose value you want to read - * @param ivar the Ivar describing the instance variable whose value you want to read - * - * @return the value of the instance variable specified by {@code ivar}, or {@link #nil} if {@code obj} is {@link #nil} - */ - @NativeType("id") - public static long object_getIvar(@NativeType("id") long obj, @NativeType("Ivar") long ivar) { - long __functionAddress = Functions.object_getIvar; - if (CHECKS) { - check(ivar); - } - return invokePPP(obj, ivar, __functionAddress); - } - - // --- [ object_setIvar ] --- - - /** - * Sets the value of an instance variable in an object. - * - *

    object_setIvar is faster than {@link #object_setInstanceVariable} if the Ivar for the instance variable is already known.

    - * - * @param obj the object containing the instance variable whose value you want to set - * @param ivar the Ivar describing the instance variable whose value you want to set - * @param value the new value for the instance variable - */ - public static void object_setIvar(@NativeType("id") long obj, @NativeType("Ivar") long ivar, @NativeType("id") long value) { - long __functionAddress = Functions.object_setIvar; - if (CHECKS) { - check(obj); - check(ivar); - check(value); - } - invokePPPV(obj, ivar, value, __functionAddress); - } - - // --- [ object_setInstanceVariable ] --- - - /** Unsafe version of: {@link #object_setInstanceVariable} */ - public static long nobject_setInstanceVariable(long obj, long name, long value) { - long __functionAddress = Functions.object_setInstanceVariable; - if (CHECKS) { - check(obj); - } - return invokePPPP(obj, name, value, __functionAddress); - } - - /** - * Changes the value of an instance variable of a class instance. - * - * @param obj a pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to modify - * @param name a C string. Pass the name of the instance variable whose value you wish to modify - * @param value the new value for the instance variable - * - * @return a pointer to the Ivar data structure that defines the type and name of the instance variable specified by name - */ - @NativeType("Ivar") - public static long object_setInstanceVariable(@NativeType("id") long obj, @NativeType("char const *") ByteBuffer name, @NativeType("void *") ByteBuffer value) { - if (CHECKS) { - checkNT1(name); - } - return nobject_setInstanceVariable(obj, memAddress(name), memAddress(value)); - } - - /** - * Changes the value of an instance variable of a class instance. - * - * @param obj a pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to modify - * @param name a C string. Pass the name of the instance variable whose value you wish to modify - * @param value the new value for the instance variable - * - * @return a pointer to the Ivar data structure that defines the type and name of the instance variable specified by name - */ - @NativeType("Ivar") - public static long object_setInstanceVariable(@NativeType("id") long obj, @NativeType("char const *") CharSequence name, @NativeType("void *") ByteBuffer value) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobject_setInstanceVariable(obj, nameEncoded, memAddress(value)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ object_getInstanceVariable ] --- - - /** Unsafe version of: {@link #object_getInstanceVariable} */ - public static long nobject_getInstanceVariable(long obj, long name, long outValue) { - long __functionAddress = Functions.object_getInstanceVariable; - if (CHECKS) { - check(obj); - } - return invokePPPP(obj, name, outValue, __functionAddress); - } - - /** - * Obtains the value of an instance variable of a class instance. - * - * @param obj a pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to obtain - * @param name a C string. Pass the name of the instance variable whose value you wish to obtain - * @param outValue on return, contains a pointer to the value of the instance variable - * - * @return a pointer to the Ivar data structure that defines the type and name of the instance variable specified by name - */ - @NativeType("Ivar") - public static long object_getInstanceVariable(@NativeType("id") long obj, @NativeType("char const *") ByteBuffer name, @NativeType("void **") PointerBuffer outValue) { - if (CHECKS) { - checkNT1(name); - check(outValue, 1); - } - return nobject_getInstanceVariable(obj, memAddress(name), memAddress(outValue)); - } - - /** - * Obtains the value of an instance variable of a class instance. - * - * @param obj a pointer to an instance of a class. Pass the object containing the instance variable whose value you wish to obtain - * @param name a C string. Pass the name of the instance variable whose value you wish to obtain - * @param outValue on return, contains a pointer to the value of the instance variable - * - * @return a pointer to the Ivar data structure that defines the type and name of the instance variable specified by name - */ - @NativeType("Ivar") - public static long object_getInstanceVariable(@NativeType("id") long obj, @NativeType("char const *") CharSequence name, @NativeType("void **") PointerBuffer outValue) { - if (CHECKS) { - check(outValue, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobject_getInstanceVariable(obj, nameEncoded, memAddress(outValue)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_getClass ] --- - - /** Unsafe version of: {@link #objc_getClass} */ - public static long nobjc_getClass(long name) { - long __functionAddress = Functions.objc_getClass; - return invokePP(name, __functionAddress); - } - - /** - * Returns the class definition of a specified class. - * - *

    objc_getClass is different from {@link #objc_lookUpClass} in that if the class is not registered, objc_getClass calls the class handler callback and then - * checks a second time to see whether the class is registered. objc_lookUpClass does not call the class handler callback.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the named class, or {@link #nil} if the class is not registered with the Objective-C runtime - */ - @NativeType("Class") - public static long objc_getClass(@NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nobjc_getClass(memAddress(name)); - } - - /** - * Returns the class definition of a specified class. - * - *

    objc_getClass is different from {@link #objc_lookUpClass} in that if the class is not registered, objc_getClass calls the class handler callback and then - * checks a second time to see whether the class is registered. objc_lookUpClass does not call the class handler callback.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the named class, or {@link #nil} if the class is not registered with the Objective-C runtime - */ - @NativeType("Class") - public static long objc_getClass(@NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobjc_getClass(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_getMetaClass ] --- - - /** Unsafe version of: {@link #objc_getMetaClass} */ - public static long nobjc_getMetaClass(long name) { - long __functionAddress = Functions.objc_getMetaClass; - return invokePP(name, __functionAddress); - } - - /** - * Returns the metaclass definition of a specified class. - * - *

    If the definition for the named class is not registered, this function calls the class handler callback and then checks a second time to see if the - * class is registered. However, every class definition must have a valid metaclass definition, and so the metaclass definition is always returned, - * whether it’s valid or not.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the metaclass of the named class, or {@link #nil} if the class is not registered with the Objective-C runtime - */ - @NativeType("Class") - public static long objc_getMetaClass(@NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nobjc_getMetaClass(memAddress(name)); - } - - /** - * Returns the metaclass definition of a specified class. - * - *

    If the definition for the named class is not registered, this function calls the class handler callback and then checks a second time to see if the - * class is registered. However, every class definition must have a valid metaclass definition, and so the metaclass definition is always returned, - * whether it’s valid or not.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the metaclass of the named class, or {@link #nil} if the class is not registered with the Objective-C runtime - */ - @NativeType("Class") - public static long objc_getMetaClass(@NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobjc_getMetaClass(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_lookUpClass ] --- - - /** Unsafe version of: {@link #objc_lookUpClass} */ - public static long nobjc_lookUpClass(long name) { - long __functionAddress = Functions.objc_lookUpClass; - return invokePP(name, __functionAddress); - } - - /** - * Returns the class definition of a specified class. - * - *

    {@link #objc_getClass} is different from this function in that if the class is not registered, objc_getClass calls the class handler callback and then checks - * a second time to see whether the class is registered. This function does not call the class handler callback.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the named class, or {@link #nil} if the class is not registered with the Objective-C runtime - */ - @NativeType("Class") - public static long objc_lookUpClass(@NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nobjc_lookUpClass(memAddress(name)); - } - - /** - * Returns the class definition of a specified class. - * - *

    {@link #objc_getClass} is different from this function in that if the class is not registered, objc_getClass calls the class handler callback and then checks - * a second time to see whether the class is registered. This function does not call the class handler callback.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the named class, or {@link #nil} if the class is not registered with the Objective-C runtime - */ - @NativeType("Class") - public static long objc_lookUpClass(@NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobjc_lookUpClass(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_getRequiredClass ] --- - - /** Unsafe version of: {@link #objc_getRequiredClass} */ - public static long nobjc_getRequiredClass(long name) { - long __functionAddress = Functions.objc_getRequiredClass; - return invokePP(name, __functionAddress); - } - - /** - * Returns the class definition of a specified class. - * - *

    This function is the same as {@link #objc_getClass}, but kills the process if the class is not found.

    - * - *

    This function is used by ZeroLink, where failing to find a class would be a compile-time link error without ZeroLink.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the named class - */ - @NativeType("Class") - public static long objc_getRequiredClass(@NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nobjc_getRequiredClass(memAddress(name)); - } - - /** - * Returns the class definition of a specified class. - * - *

    This function is the same as {@link #objc_getClass}, but kills the process if the class is not found.

    - * - *

    This function is used by ZeroLink, where failing to find a class would be a compile-time link error without ZeroLink.

    - * - * @param name the name of the class to look up - * - * @return the Class object for the named class - */ - @NativeType("Class") - public static long objc_getRequiredClass(@NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobjc_getRequiredClass(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_getClassList ] --- - - /** - * Unsafe version of: {@link #objc_getClassList} - * - * @param bufferCount the number of pointers for which you have allocated space in buffer. On return, this function fills in only this number of elements. If this number - * is less than the number of registered classes, this function returns an arbitrary subset of the registered classes. - */ - public static int nobjc_getClassList(long buffer, int bufferCount) { - long __functionAddress = Functions.objc_getClassList; - return invokePI(buffer, bufferCount, __functionAddress); - } - - /** - * Obtains the list of registered class definitions. - * - *

    The Objective-C runtime library automatically registers all the classes defined in your source code. You can create class definitions at runtime and - * register them with the {@link #objc_allocateClassPair} and {@link #objc_registerClassPair} functions.

    - * - *
    Special Considerations
    - * - *

    You cannot assume that class objects you get from this function are classes that inherit from NSObject, so you cannot safely call any methods on such - * classes without detecting that the method is implemented first.

    - * - * @param buffer an array of Class values. On output, each Class value points to one class definition, up to either {@code bufferCount} or the total number of - * registered classes, whichever is less. You can pass {@code NULL} to obtain the total number of registered class definitions without actually retrieving - * any class definitions. - * - * @return an integer value indicating the total number of registered classes - */ - public static int objc_getClassList(@Nullable @NativeType("Class *") PointerBuffer buffer) { - return nobjc_getClassList(memAddressSafe(buffer), remainingSafe(buffer)); - } - - // --- [ objc_copyClassList ] --- - - /** - * Unsafe version of: {@link #objc_copyClassList} - * - * @param outCount an integer pointer used to store the number of classes returned by this function in the list. This parameter may be {@link #nil} - */ - public static long nobjc_copyClassList(long outCount) { - long __functionAddress = Functions.objc_copyClassList; - return invokePP(outCount, __functionAddress); - } - - /** - * Creates and returns a list of pointers to all registered class definitions. - * - * @return a {@link #nil} terminated array of classes. You must free the array with free() - */ - @Nullable - @NativeType("Class *") - public static PointerBuffer objc_copyClassList() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nobjc_copyClassList(memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_getName ] --- - - /** Unsafe version of: {@link #class_getName} */ - public static long nclass_getName(long cls) { - long __functionAddress = Functions.class_getName; - return invokePP(cls, __functionAddress); - } - - /** - * Returns the name of a class. - * - * @param cls a class object - * - * @return the name of the class, or the empty string if cls is Nil - */ - @Nullable - @NativeType("char const *") - public static String class_getName(@NativeType("Class") long cls) { - long __result = nclass_getName(cls); - return memUTF8Safe(__result); - } - - // --- [ class_isMetaClass ] --- - - /** - * Returns a Boolean value that indicates whether a class object is a metaclass. - * - * @param cls a class object - * - * @return {@link #YES} if cls is a metaclass, {@link #NO} if cls is a non-meta class, {@link #NO} if cls is Nil - */ - @NativeType("BOOL") - public static boolean class_isMetaClass(@NativeType("Class") long cls) { - long __functionAddress = Functions.class_isMetaClass; - return invokePZ(cls, __functionAddress); - } - - // --- [ class_getSuperclass ] --- - - /** - * Returns the superclass of a class. - * - * @param cls a class object - * - * @return the superclass of the class, or Nil if cls is a root class, or Nil if cls is Nil - */ - @NativeType("Class") - public static long class_getSuperclass(@NativeType("Class") long cls) { - long __functionAddress = Functions.class_getSuperclass; - return invokePP(cls, __functionAddress); - } - - // --- [ class_getVersion ] --- - - /** - * Returns the version number of a class definition. - * - *

    You can use the version number of the class definition to provide versioning of the interface that your class represents to other classes. This is - * especially useful for object serialization (that is, archiving of the object in a flattened form), where it is important to recognize changes to the - * layout of the instance variables in different class-definition versions.

    - * - *

    Classes derived from the Foundation framework NSObject class can obtain the class-definition version number using the getVersion class method, which is - * implemented using the class_getVersion function.

    - * - * @param cls a pointer to an Class data structure. Pass the class definition for which you wish to obtain the version - * - * @return an integer indicating the version number of the class definition - */ - public static int class_getVersion(@NativeType("Class") long cls) { - long __functionAddress = Functions.class_getVersion; - if (CHECKS) { - check(cls); - } - return invokePI(cls, __functionAddress); - } - - // --- [ class_setVersion ] --- - - /** - * Sets the version number of a class definition. - * - *

    You can use the version number of the class definition to provide versioning of the interface that your class represents to other classes. This is - * especially useful for object serialization (that is, archiving of the object in a flattened form), where it is important to recognize changes to the - * layout of the instance variables in different class-definition versions.

    - * - *

    Classes derived from the Foundation framework NSObject class can set the class-definition version number using the setVersion: class method, which is - * implemented using the class_setVersion function.

    - * - * @param cls a pointer to an Class data structure. Pass the class definition for which you wish to set the version - * @param version the new version number of the class definition - */ - public static void class_setVersion(@NativeType("Class") long cls, int version) { - long __functionAddress = Functions.class_setVersion; - if (CHECKS) { - check(cls); - } - invokePV(cls, version, __functionAddress); - } - - // --- [ class_getInstanceSize ] --- - - /** - * Returns the size of instances of a class. - * - * @param cls a class object - * - * @return the size in bytes of instances of the class {@code cls}, or 0 if {@code cls} is Nil - */ - @NativeType("size_t") - public static long class_getInstanceSize(@NativeType("Class") long cls) { - long __functionAddress = Functions.class_getInstanceSize; - return invokePP(cls, __functionAddress); - } - - // --- [ class_getInstanceVariable ] --- - - /** Unsafe version of: {@link #class_getInstanceVariable} */ - public static long nclass_getInstanceVariable(long cls, long name) { - long __functionAddress = Functions.class_getInstanceVariable; - if (CHECKS) { - check(cls); - } - return invokePPP(cls, name, __functionAddress); - } - - /** - * Returns the Ivar for a specified instance variable of a given class. - * - * @param cls the class whose instance variable you wish to obtain - * @param name the name of the instance variable definition to obtain - * - * @return a pointer to an Ivar data structure containing information about the instance variable specified by name - */ - @NativeType("Ivar") - public static long class_getInstanceVariable(@NativeType("Class") long cls, @NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nclass_getInstanceVariable(cls, memAddress(name)); - } - - /** - * Returns the Ivar for a specified instance variable of a given class. - * - * @param cls the class whose instance variable you wish to obtain - * @param name the name of the instance variable definition to obtain - * - * @return a pointer to an Ivar data structure containing information about the instance variable specified by name - */ - @NativeType("Ivar") - public static long class_getInstanceVariable(@NativeType("Class") long cls, @NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nclass_getInstanceVariable(cls, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_getClassVariable ] --- - - /** Unsafe version of: {@link #class_getClassVariable} */ - public static long nclass_getClassVariable(long cls, long name) { - long __functionAddress = Functions.class_getClassVariable; - if (CHECKS) { - check(cls); - } - return invokePPP(cls, name, __functionAddress); - } - - /** - * Returns the Ivar for a specified class variable of a given class. - * - * @param cls the class definition whose class variable you wish to obtain - * @param name the name of the class variable definition to obtain - * - * @return a pointer to an Ivar data structure containing information about the class variable specified by name - */ - @NativeType("Ivar") - public static long class_getClassVariable(@NativeType("Class") long cls, @NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nclass_getClassVariable(cls, memAddress(name)); - } - - /** - * Returns the Ivar for a specified class variable of a given class. - * - * @param cls the class definition whose class variable you wish to obtain - * @param name the name of the class variable definition to obtain - * - * @return a pointer to an Ivar data structure containing information about the class variable specified by name - */ - @NativeType("Ivar") - public static long class_getClassVariable(@NativeType("Class") long cls, @NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nclass_getClassVariable(cls, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_copyIvarList ] --- - - /** - * Unsafe version of: {@link #class_copyIvarList} - * - * @param outCount on return, contains the length of the returned array. If {@code outCount} is {@code NULL}, the length is not returned - */ - public static long nclass_copyIvarList(long cls, long outCount) { - long __functionAddress = Functions.class_copyIvarList; - return invokePPP(cls, outCount, __functionAddress); - } - - /** - * Describes the instance variables declared by a class. - * - * @param cls the class to inspect - * - * @return an array of pointers of type Ivar describing the instance variables declared by the class. Any instance variables declared by superclasses are not - * included. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the array with free(). - * - *

    If the class declares no instance variables, or {@code cls} is Nil, {@code NULL} is returned and {@code *outCount} is 0.

    - */ - @Nullable - @NativeType("Ivar *") - public static PointerBuffer class_copyIvarList(@NativeType("Class") long cls) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nclass_copyIvarList(cls, memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_getInstanceMethod ] --- - - /** - * Returns a specified instance method for a given class. - * - *

    Note that this function searches superclasses for implementations, whereas {@link #class_copyMethodList} does not.

    - * - * @param cls the class you want to inspect - * @param name the selector of the method you want to retrieve - * - * @return the method that corresponds to the implementation of the selector specified by aSelector for the class specified by {@code cls}, or {@code NULL} if the - * specified class or its superclasses do not contain an instance method with the specified selector. - */ - @NativeType("Method") - public static long class_getInstanceMethod(@NativeType("Class") long cls, @NativeType("SEL") long name) { - long __functionAddress = Functions.class_getInstanceMethod; - if (CHECKS) { - check(cls); - check(name); - } - return invokePPP(cls, name, __functionAddress); - } - - // --- [ class_getClassMethod ] --- - - /** - * Returns a pointer to the data structure describing a given class method for a given class. - * - *

    Note that this function searches superclasses for implementations, whereas {@link #class_copyMethodList} does not.

    - * - * @param cls a pointer to a class definition. Pass the class that contains the method you want to retrieve - * @param name a pointer of type SEL. Pass the selector of the method you want to retrieve - * - * @return a pointer to the Method data structure that corresponds to the implementation of the selector specified by {@code name} for the class specified by - * {@code cls}, or {@code NULL} if the specified class or its superclasses do not contain a class method with the specified selector. - */ - @NativeType("Method") - public static long class_getClassMethod(@NativeType("Class") long cls, @NativeType("SEL") long name) { - long __functionAddress = Functions.class_getClassMethod; - if (CHECKS) { - check(cls); - check(name); - } - return invokePPP(cls, name, __functionAddress); - } - - // --- [ class_getMethodImplementation ] --- - - /** - * Returns the function pointer that would be called if a particular message were sent to an instance of a class. - * - *

    class_getMethodImplementation may be faster than {@code method_getImplementation(class_getInstanceMethod(cls, name))}.

    - * - *

    The function pointer returned may be a function internal to the runtime instead of an actual method implementation. For example, if instances of the - * class do not respond to the selector, the function pointer returned will be part of the runtime's message forwarding machinery.

    - * - * @param cls the class you want to inspect - * @param name a selector - * - * @return the function pointer that would be called if {@code [object name]} were called with an instance of the class, or {@code NULL} if {@code cls} is Nil - */ - @NativeType("IMP") - public static long class_getMethodImplementation(@NativeType("Class") long cls, @NativeType("SEL") long name) { - long __functionAddress = Functions.class_getMethodImplementation; - if (CHECKS) { - check(name); - } - return invokePPP(cls, name, __functionAddress); - } - - // --- [ class_respondsToSelector ] --- - - /** - * Returns a Boolean value that indicates whether instances of a class respond to a particular selector. - * - *

    You should usually use NSObject's respondsToSelector: or instancesRespondToSelector: methods instead of this function.

    - * - * @param cls the class you want to inspect - * @param name a selector - * - * @return {@link #YES} if instances of the class respond to the selector, otherwise {@link #NO} - */ - @NativeType("BOOL") - public static boolean class_respondsToSelector(@NativeType("Class") long cls, @NativeType("SEL") long name) { - long __functionAddress = Functions.class_respondsToSelector; - if (CHECKS) { - check(cls); - check(name); - } - return invokePPZ(cls, name, __functionAddress); - } - - // --- [ class_copyMethodList ] --- - - /** - * Unsafe version of: {@link #class_copyMethodList} - * - * @param outCount on return, contains the length of the returned array. If {@code outCount} is {@code NULL}, the length is not returned - */ - public static long nclass_copyMethodList(long cls, long outCount) { - long __functionAddress = Functions.class_copyMethodList; - return invokePPP(cls, outCount, __functionAddress); - } - - /** - * Describes the instance methods implemented by a class. - * - * @param cls the class you want to inspect - * - * @return an array of pointers of type Method describing the instance methods implemented by the class—any instance methods implemented by superclasses are not - * included. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the array with free(). - * - *

    If {@code cls} implements no instance methods, or {@code cls} is Nil, returns {@code NULL} and {@code *outCount} is 0.

    - */ - @Nullable - @NativeType("Method *") - public static PointerBuffer class_copyMethodList(@NativeType("Class") long cls) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nclass_copyMethodList(cls, memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_conformsToProtocol ] --- - - /** - * Returns a Boolean value that indicates whether a class conforms to a given protocol. - * - *

    You should usually use NSObject's conformsToProtocol: method instead of this function.

    - * - * @param cls the class you want to inspect - * @param protocol a protocol - * - * @return {@link #YES} if {@code cls} conforms to {@code protocol}, otherwise {@link #NO} - */ - @NativeType("BOOL") - public static boolean class_conformsToProtocol(@NativeType("Class") long cls, @NativeType("Protocol *") long protocol) { - long __functionAddress = Functions.class_conformsToProtocol; - if (CHECKS) { - check(cls); - check(protocol); - } - return invokePPZ(cls, protocol, __functionAddress); - } - - // --- [ class_copyProtocolList ] --- - - /** - * Unsafe version of: {@link #class_copyProtocolList} - * - * @param outCount on return, contains the length of the returned array. If {@code outCount} is {@code NULL}, the length is not returned - */ - public static long nclass_copyProtocolList(long cls, long outCount) { - long __functionAddress = Functions.class_copyProtocolList; - return invokePPP(cls, outCount, __functionAddress); - } - - /** - * Describes the protocols adopted by a class. - * - * @param cls the class you want to inspect - * - * @return an array of pointers of type Protocol* describing the protocols adopted by the class. Any protocols adopted by superclasses or other protocols are not - * included. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the array with free(). - * - *

    If {@code cls} adopts no protocols, or {@code cls} is Nil, returns {@code NULL} and {@code *outCount} is 0.

    - */ - @Nullable - @NativeType("Protocol **") - public static PointerBuffer class_copyProtocolList(@NativeType("Class") long cls) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nclass_copyProtocolList(cls, memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_getProperty ] --- - - /** Unsafe version of: {@link #class_getProperty} */ - public static long nclass_getProperty(long cls, long name) { - long __functionAddress = Functions.class_getProperty; - return invokePPP(cls, name, __functionAddress); - } - - /** - * Returns a property with a given name of a given class. - * - * @param cls the class you want to inspect - * @param name a C string. Pass the name of the instance variable whose value you wish to modify. - * - * @return a pointer of type {@code objc_property_t} describing the property, or {@code NULL} if the class does not declare a property with that name, or {@code NULL} if - * {@code cls} is Nil. - */ - @NativeType("objc_property_t") - public static long class_getProperty(@NativeType("Class") long cls, @NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nclass_getProperty(cls, memAddress(name)); - } - - /** - * Returns a property with a given name of a given class. - * - * @param cls the class you want to inspect - * @param name a C string. Pass the name of the instance variable whose value you wish to modify. - * - * @return a pointer of type {@code objc_property_t} describing the property, or {@code NULL} if the class does not declare a property with that name, or {@code NULL} if - * {@code cls} is Nil. - */ - @NativeType("objc_property_t") - public static long class_getProperty(@NativeType("Class") long cls, @NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nclass_getProperty(cls, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_copyPropertyList ] --- - - /** - * Unsafe version of: {@link #class_copyPropertyList} - * - * @param outCount on return, contains the length of the returned array. If {@code outCount} is {@code NULL}, the length is not returned - */ - public static long nclass_copyPropertyList(long cls, long outCount) { - long __functionAddress = Functions.class_copyPropertyList; - return invokePPP(cls, outCount, __functionAddress); - } - - /** - * Describes the properties declared by a class. - * - * @param cls the class you want to inspect - * - * @return an array of pointers of type {@code objc_property_t} describing the properties declared by the class. Any properties declared by superclasses are not - * included. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the array with free(). - * - *

    If {@code cls} declares no properties, or {@code cls} is Nil, returns {@code NULL} and {@code *outCount} is 0.

    - */ - @Nullable - @NativeType("objc_property_t *") - public static PointerBuffer class_copyPropertyList(@NativeType("Class") long cls) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nclass_copyPropertyList(cls, memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_getIvarLayout ] --- - - /** Unsafe version of: {@link #class_getIvarLayout} */ - public static long nclass_getIvarLayout(long cls) { - long __functionAddress = Functions.class_getIvarLayout; - if (CHECKS) { - check(cls); - } - return invokePP(cls, __functionAddress); - } - - /** - * Returns a description of the Ivar layout for a given class. - * - * @param cls the class to inspect - * - * @return a description of the Ivar layout for {@code cls} - */ - @Nullable - @NativeType("uint8_t const *") - public static String class_getIvarLayout(@NativeType("Class") long cls) { - long __result = nclass_getIvarLayout(cls); - return memASCIISafe(__result); - } - - // --- [ class_getWeakIvarLayout ] --- - - /** Unsafe version of: {@link #class_getWeakIvarLayout} */ - public static long nclass_getWeakIvarLayout(long cls) { - long __functionAddress = Functions.class_getWeakIvarLayout; - if (CHECKS) { - check(cls); - } - return invokePP(cls, __functionAddress); - } - - /** - * Returns a description of the layout of weak Ivars for a given class. - * - * @param cls the class to inspect - * - * @return a description of the layout of the weak Ivars for {@code cls} - */ - @Nullable - @NativeType("uint8_t const *") - public static String class_getWeakIvarLayout(@NativeType("Class") long cls) { - long __result = nclass_getWeakIvarLayout(cls); - return memASCIISafe(__result); - } - - // --- [ class_addMethod ] --- - - /** Unsafe version of: {@link #class_addMethod} */ - public static boolean nclass_addMethod(long cls, long name, long imp, long types) { - long __functionAddress = Functions.class_addMethod; - if (CHECKS) { - check(cls); - check(name); - check(imp); - } - return invokePPPPZ(cls, name, imp, types, __functionAddress); - } - - /** - * Adds a new method to a class with a given name and implementation. - * - *
    Discussion
    - * - *

    class_addMethod will add an override of a superclass's implementation, but will not replace an existing implementation in this class. To change an - * existing implementation, use {@link #method_setImplementation}.

    - * - *

    An Objective-C method is simply a C function that takes at least two arguments – {@code self} and {@code _cmd}. For example, given the following - * function:

    - * - *
    
    -     * void myMethodIMP(id self, SEL _cmd)
    -     * {
    -     *     // implementation ....
    -     * }
    - * - *

    you can dynamically add it to a class as a method (called {@code resolveThisMethodDynamically}) like this:

    - * - *
    
    -     * class_addMethod([self class], @selector(resolveThisMethodDynamically), (IMP) myMethodIMP, "v@:");
    - * - * @param cls the class to which to add a method - * @param name a selector that specifies the name of the method being added - * @param imp a function which is the implementation of the new method. The function must take at least two arguments – {@code self} and {@code _cmd}. - * @param types an array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming - * Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – {@code self} - * and {@code _cmd}, the second and third characters must be “@:” (the first character is the return type). - * - * @return {@link #YES} if the method was added successfully, otherwise {@link #NO} (for example, the class already contains a method implementation with that name) - */ - @NativeType("BOOL") - public static boolean class_addMethod(@NativeType("Class") long cls, @NativeType("SEL") long name, @NativeType("IMP") long imp, @NativeType("char const *") ByteBuffer types) { - if (CHECKS) { - checkNT1(types); - } - return nclass_addMethod(cls, name, imp, memAddress(types)); - } - - /** - * Adds a new method to a class with a given name and implementation. - * - *
    Discussion
    - * - *

    class_addMethod will add an override of a superclass's implementation, but will not replace an existing implementation in this class. To change an - * existing implementation, use {@link #method_setImplementation}.

    - * - *

    An Objective-C method is simply a C function that takes at least two arguments – {@code self} and {@code _cmd}. For example, given the following - * function:

    - * - *
    
    -     * void myMethodIMP(id self, SEL _cmd)
    -     * {
    -     *     // implementation ....
    -     * }
    - * - *

    you can dynamically add it to a class as a method (called {@code resolveThisMethodDynamically}) like this:

    - * - *
    
    -     * class_addMethod([self class], @selector(resolveThisMethodDynamically), (IMP) myMethodIMP, "v@:");
    - * - * @param cls the class to which to add a method - * @param name a selector that specifies the name of the method being added - * @param imp a function which is the implementation of the new method. The function must take at least two arguments – {@code self} and {@code _cmd}. - * @param types an array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming - * Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – {@code self} - * and {@code _cmd}, the second and third characters must be “@:” (the first character is the return type). - * - * @return {@link #YES} if the method was added successfully, otherwise {@link #NO} (for example, the class already contains a method implementation with that name) - */ - @NativeType("BOOL") - public static boolean class_addMethod(@NativeType("Class") long cls, @NativeType("SEL") long name, @NativeType("IMP") long imp, @NativeType("char const *") CharSequence types) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(types, true); - long typesEncoded = stack.getPointerAddress(); - return nclass_addMethod(cls, name, imp, typesEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_replaceMethod ] --- - - /** Unsafe version of: {@link #class_replaceMethod} */ - public static long nclass_replaceMethod(long cls, long name, long imp, long types) { - long __functionAddress = Functions.class_replaceMethod; - if (CHECKS) { - check(cls); - check(name); - check(imp); - } - return invokePPPPP(cls, name, imp, types, __functionAddress); - } - - /** - * Replaces the implementation of a method for a given class. - * - *
    Discussion
    - * - *

    This function behaves in two different ways:

    - * - *
      - *
    • If the method identified by name does not yet exist, it is added as if class_addMethod were called. The type encoding specified by types is used as - * given.
    • - *
    • If the method identified by name does exist, its IMP is replaced as if method_setImplementation were called. The type encoding specified by types - * is ignored.
    • - *
    - * - * @param cls the class you want to modify - * @param name a selector that identifies the method whose implementation you want to replace - * @param imp the new implementation for the method identified by {@code name} for the class identified by {@code cls} - * @param types an array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming - * Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – {@code self} - * and {@code _cmd}, the second and third characters must be “@:” (the first character is the return type). - * - * @return the previous implementation of the method identified by {@code name} for the class identified by {@code cls} - */ - @NativeType("IMP") - public static long class_replaceMethod(@NativeType("Class") long cls, @NativeType("SEL") long name, @NativeType("IMP") long imp, @NativeType("char const *") ByteBuffer types) { - if (CHECKS) { - checkNT1(types); - } - return nclass_replaceMethod(cls, name, imp, memAddress(types)); - } - - /** - * Replaces the implementation of a method for a given class. - * - *
    Discussion
    - * - *

    This function behaves in two different ways:

    - * - *
      - *
    • If the method identified by name does not yet exist, it is added as if class_addMethod were called. The type encoding specified by types is used as - * given.
    • - *
    • If the method identified by name does exist, its IMP is replaced as if method_setImplementation were called. The type encoding specified by types - * is ignored.
    • - *
    - * - * @param cls the class you want to modify - * @param name a selector that identifies the method whose implementation you want to replace - * @param imp the new implementation for the method identified by {@code name} for the class identified by {@code cls} - * @param types an array of characters that describe the types of the arguments to the method. For possible values, see Objective-C Runtime Programming - * Guide > Type Encodings in Objective-C Runtime Programming Guide. Since the function must take at least two arguments – {@code self} - * and {@code _cmd}, the second and third characters must be “@:” (the first character is the return type). - * - * @return the previous implementation of the method identified by {@code name} for the class identified by {@code cls} - */ - @NativeType("IMP") - public static long class_replaceMethod(@NativeType("Class") long cls, @NativeType("SEL") long name, @NativeType("IMP") long imp, @NativeType("char const *") CharSequence types) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(types, true); - long typesEncoded = stack.getPointerAddress(); - return nclass_replaceMethod(cls, name, imp, typesEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_addIvar ] --- - - /** Unsafe version of: {@link #class_addIvar} */ - public static boolean nclass_addIvar(long cls, long name, long size, byte alignment, long types) { - long __functionAddress = Functions.class_addIvar; - if (CHECKS) { - check(cls); - } - return invokePPPUPZ(cls, name, size, alignment, types, __functionAddress); - } - - /** - * Adds a new instance variable to a class. - * - *

    This function may only be called after {@link #objc_allocateClassPair} and before {@link #objc_registerClassPair}. Adding an instance variable to an existing class - * is not supported.

    - * - *

    The class must not be a metaclass. Adding an instance variable to a metaclass is not supported.

    - * - *

    The instance variable's minimum alignment in bytes is {@code 1< - * - * @return {@link #YES} if the instance variable was added successfully, otherwise {@link #NO} (for example, the class already contains an instance variable with that name) - */ - @NativeType("BOOL") - public static boolean class_addIvar(@NativeType("Class") long cls, @NativeType("char const *") ByteBuffer name, @NativeType("size_t") long size, @NativeType("uint8_t") byte alignment, @NativeType("char const *") ByteBuffer types) { - if (CHECKS) { - checkNT1(name); - checkNT1(types); - } - return nclass_addIvar(cls, memAddress(name), size, alignment, memAddress(types)); - } - - /** - * Adds a new instance variable to a class. - * - *

    This function may only be called after {@link #objc_allocateClassPair} and before {@link #objc_registerClassPair}. Adding an instance variable to an existing class - * is not supported.

    - * - *

    The class must not be a metaclass. Adding an instance variable to a metaclass is not supported.

    - * - *

    The instance variable's minimum alignment in bytes is {@code 1< - * - * @return {@link #YES} if the instance variable was added successfully, otherwise {@link #NO} (for example, the class already contains an instance variable with that name) - */ - @NativeType("BOOL") - public static boolean class_addIvar(@NativeType("Class") long cls, @NativeType("char const *") CharSequence name, @NativeType("size_t") long size, @NativeType("uint8_t") byte alignment, @NativeType("char const *") CharSequence types) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - stack.nUTF8(types, true); - long typesEncoded = stack.getPointerAddress(); - return nclass_addIvar(cls, nameEncoded, size, alignment, typesEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_addProtocol ] --- - - /** - * Adds a protocol to a class. - * - * @param cls the class to modify - * @param protocol the protocol to add to {@code cls} - * - * @return {@link #YES} if the protocol was added successfully, otherwise {@link #NO} (for example, the class already conforms to that protocol) - */ - @NativeType("BOOL") - public static boolean class_addProtocol(@NativeType("Class") long cls, @NativeType("Protocol *") long protocol) { - long __functionAddress = Functions.class_addProtocol; - if (CHECKS) { - check(cls); - check(protocol); - } - return invokePPZ(cls, protocol, __functionAddress); - } - - // --- [ class_addProperty ] --- - - /** - * Unsafe version of: {@link #class_addProperty} - * - * @param attributeCount the number of attributes in {@code attributes} - */ - public static boolean nclass_addProperty(long cls, long name, long attributes, int attributeCount) { - long __functionAddress = Functions.class_addProperty; - if (CHECKS) { - check(cls); - Struct.validate(attributes, attributeCount, ObjCPropertyAttribute.SIZEOF, ObjCPropertyAttribute::validate); - } - return invokePPPZ(cls, name, attributes, attributeCount, __functionAddress); - } - - /** - * Adds a property to a class. - * - * @param cls the class to modify - * @param name the name of the property - * @param attributes an array of property attributes - * - * @return {@link #YES} if the property was added successfully; otherwise {@link #NO} (for example, this function returns {@link #NO} if the class already has that property) - */ - @NativeType("BOOL") - public static boolean class_addProperty(@NativeType("Class") long cls, @NativeType("char const *") ByteBuffer name, @NativeType("objc_property_attribute_t const *") ObjCPropertyAttribute.Buffer attributes) { - if (CHECKS) { - checkNT1(name); - } - return nclass_addProperty(cls, memAddress(name), attributes.address(), attributes.remaining()); - } - - /** - * Adds a property to a class. - * - * @param cls the class to modify - * @param name the name of the property - * @param attributes an array of property attributes - * - * @return {@link #YES} if the property was added successfully; otherwise {@link #NO} (for example, this function returns {@link #NO} if the class already has that property) - */ - @NativeType("BOOL") - public static boolean class_addProperty(@NativeType("Class") long cls, @NativeType("char const *") CharSequence name, @NativeType("objc_property_attribute_t const *") ObjCPropertyAttribute.Buffer attributes) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nclass_addProperty(cls, nameEncoded, attributes.address(), attributes.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_replaceProperty ] --- - - /** - * Unsafe version of: {@link #class_replaceProperty} - * - * @param attributeCount the number of attributes in {@code attributes} - */ - public static void nclass_replaceProperty(long cls, long name, long attributes, int attributeCount) { - long __functionAddress = Functions.class_replaceProperty; - if (CHECKS) { - check(cls); - Struct.validate(attributes, attributeCount, ObjCPropertyAttribute.SIZEOF, ObjCPropertyAttribute::validate); - } - invokePPPV(cls, name, attributes, attributeCount, __functionAddress); - } - - /** - * Replaces a property of a class. - * - * @param cls the class to modify - * @param name the name of the property - * @param attributes an array of property attributes - */ - public static void class_replaceProperty(@NativeType("Class") long cls, @NativeType("char const *") ByteBuffer name, @NativeType("objc_property_attribute_t const *") ObjCPropertyAttribute.Buffer attributes) { - if (CHECKS) { - checkNT1(name); - } - nclass_replaceProperty(cls, memAddress(name), attributes.address(), attributes.remaining()); - } - - /** - * Replaces a property of a class. - * - * @param cls the class to modify - * @param name the name of the property - * @param attributes an array of property attributes - */ - public static void class_replaceProperty(@NativeType("Class") long cls, @NativeType("char const *") CharSequence name, @NativeType("objc_property_attribute_t const *") ObjCPropertyAttribute.Buffer attributes) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - nclass_replaceProperty(cls, nameEncoded, attributes.address(), attributes.remaining()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_setIvarLayout ] --- - - /** Unsafe version of: {@link #class_setIvarLayout} */ - public static void nclass_setIvarLayout(long cls, long layout) { - long __functionAddress = Functions.class_setIvarLayout; - if (CHECKS) { - check(cls); - } - invokePPV(cls, layout, __functionAddress); - } - - /** - * Sets the Ivar layout for a given class. - * - * @param cls the class to modify - * @param layout the layout of the Ivars for {@code cls} - */ - public static void class_setIvarLayout(@NativeType("Class") long cls, @NativeType("uint8_t const *") ByteBuffer layout) { - if (CHECKS) { - checkNT1(layout); - } - nclass_setIvarLayout(cls, memAddress(layout)); - } - - /** - * Sets the Ivar layout for a given class. - * - * @param cls the class to modify - * @param layout the layout of the Ivars for {@code cls} - */ - public static void class_setIvarLayout(@NativeType("Class") long cls, @NativeType("uint8_t const *") CharSequence layout) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(layout, true); - long layoutEncoded = stack.getPointerAddress(); - nclass_setIvarLayout(cls, layoutEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_setWeakIvarLayout ] --- - - /** Unsafe version of: {@link #class_setWeakIvarLayout} */ - public static void nclass_setWeakIvarLayout(long cls, long layout) { - long __functionAddress = Functions.class_setWeakIvarLayout; - if (CHECKS) { - check(cls); - } - invokePPV(cls, layout, __functionAddress); - } - - /** - * Sets the layout for weak Ivars for a given class. - * - * @param cls the class to modify - * @param layout the layout of the weak Ivars for {@code cls} - */ - public static void class_setWeakIvarLayout(@NativeType("Class") long cls, @NativeType("uint8_t const *") ByteBuffer layout) { - if (CHECKS) { - checkNT1(layout); - } - nclass_setWeakIvarLayout(cls, memAddress(layout)); - } - - /** - * Sets the layout for weak Ivars for a given class. - * - * @param cls the class to modify - * @param layout the layout of the weak Ivars for {@code cls} - */ - public static void class_setWeakIvarLayout(@NativeType("Class") long cls, @NativeType("uint8_t const *") CharSequence layout) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(layout, true); - long layoutEncoded = stack.getPointerAddress(); - nclass_setWeakIvarLayout(cls, layoutEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_createInstance ] --- - - /** - * Creates an instance of a class, allocating memory for the class in the default malloc memory zone. - * - * @param cls the class that you want to allocate an instance of - * @param extraBytes an integer indicating the number of extra bytes to allocate. The additional bytes can be used to store additional instance variables beyond those - * defined in the class definition. - * - * @return an instance of the class {@code cls} - */ - @NativeType("id") - public static long class_createInstance(@NativeType("Class") long cls, @NativeType("size_t") long extraBytes) { - long __functionAddress = Functions.class_createInstance; - if (CHECKS) { - check(cls); - } - return invokePPP(cls, extraBytes, __functionAddress); - } - - // --- [ objc_constructInstance ] --- - - /** Unsafe version of: {@link #objc_constructInstance} */ - public static long nobjc_constructInstance(long cls, long bytes) { - long __functionAddress = Functions.objc_constructInstance; - return invokePPP(cls, bytes, __functionAddress); - } - - /** - * Creates an instance of a class at the specified location. - * - * @param cls the class that you want to allocate an instance of - * @param bytes the location at which to allocate an instance of the {@code cls} class. {@code bytes} must point to at least {@code class_getInstanceSize(cls)} - * bytes of well-aligned, zero-filled memory. - * - * @return an instance of the class {@code cls} at {@code bytes}, if successful; otherwise {@link #nil} (for example, if {@code cls} or {@code bytes} are themselves {@link #nil}) - */ - @NativeType("id") - public static long objc_constructInstance(@NativeType("Class") long cls, @Nullable @NativeType("void *") ByteBuffer bytes) { - if (CHECKS) { - if (DEBUG) { - checkSafe(bytes, class_getInstanceSize(cls)); - } - } - return nobjc_constructInstance(cls, memAddressSafe(bytes)); - } - - // --- [ objc_destructInstance ] --- - - /** - * Destroys an instance of a class without freeing memory and removes any of its associated references. - * - *

    This method does nothing if obj is {@link #nil}.

    - * - *
    Important
    - * - *

    The garbage collector does not call this function. As a result, if you edit this function, you should also edit finalize. That said, Core Foundation - * and other clients do call this function under garbage collection.

    - * - * @param obj the instance to destroy - */ - @NativeType("void *") - public static long objc_destructInstance(@NativeType("id") long obj) { - long __functionAddress = Functions.objc_destructInstance; - if (CHECKS) { - check(obj); - } - return invokePP(obj, __functionAddress); - } - - // --- [ objc_allocateClassPair ] --- - - /** Unsafe version of: {@link #objc_allocateClassPair} */ - public static long nobjc_allocateClassPair(long superclass, long name, long extraBytes) { - long __functionAddress = Functions.objc_allocateClassPair; - return invokePPPP(superclass, name, extraBytes, __functionAddress); - } - - /** - * Creates a new class and metaclass. - * - *

    You can get a pointer to the new metaclass by calling {@code object_getClass(newClass)}.

    - * - *

    To create a new class, start by calling objc_allocateClassPair. Then set the class's attributes with functions like {@link #class_addMethod} and - * {@link #class_addIvar}. When you are done building the class, call {@link #objc_registerClassPair}. The new class is now ready for use.

    - * - *

    Instance methods and instance variables should be added to the class itself. Class methods should be added to the metaclass.

    - * - * @param superclass the class to use as the new class's superclass, or Nil to create a new root class - * @param name the string to use as the new class's name. The string will be copied. - * @param extraBytes the number of bytes to allocate for indexed ivars at the end of the class and metaclass objects. This should usually be 0. - * - * @return the new class, or Nil if the class could not be created (for example, the desired name is already in use) - */ - @NativeType("Class") - public static long objc_allocateClassPair(@NativeType("Class") long superclass, @NativeType("char const *") ByteBuffer name, @NativeType("size_t") long extraBytes) { - if (CHECKS) { - checkNT1(name); - } - return nobjc_allocateClassPair(superclass, memAddress(name), extraBytes); - } - - /** - * Creates a new class and metaclass. - * - *

    You can get a pointer to the new metaclass by calling {@code object_getClass(newClass)}.

    - * - *

    To create a new class, start by calling objc_allocateClassPair. Then set the class's attributes with functions like {@link #class_addMethod} and - * {@link #class_addIvar}. When you are done building the class, call {@link #objc_registerClassPair}. The new class is now ready for use.

    - * - *

    Instance methods and instance variables should be added to the class itself. Class methods should be added to the metaclass.

    - * - * @param superclass the class to use as the new class's superclass, or Nil to create a new root class - * @param name the string to use as the new class's name. The string will be copied. - * @param extraBytes the number of bytes to allocate for indexed ivars at the end of the class and metaclass objects. This should usually be 0. - * - * @return the new class, or Nil if the class could not be created (for example, the desired name is already in use) - */ - @NativeType("Class") - public static long objc_allocateClassPair(@NativeType("Class") long superclass, @NativeType("char const *") CharSequence name, @NativeType("size_t") long extraBytes) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobjc_allocateClassPair(superclass, nameEncoded, extraBytes); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_registerClassPair ] --- - - /** - * Registers a class that was allocated using {@link #objc_allocateClassPair}. - * - * @param cls the class you want to register - */ - public static void objc_registerClassPair(@NativeType("Class") long cls) { - long __functionAddress = Functions.objc_registerClassPair; - if (CHECKS) { - check(cls); - } - invokePV(cls, __functionAddress); - } - - // --- [ objc_disposeClassPair ] --- - - /** - * Destroys a class and its associated metaclass. - * - *

    Do not call this function if instances of the {@code cls} class or any subclass exist.

    - * - * @param cls the class to be destroyed. This class must have been allocated using {@link #objc_allocateClassPair}. - */ - public static void objc_disposeClassPair(@NativeType("Class") long cls) { - long __functionAddress = Functions.objc_disposeClassPair; - if (CHECKS) { - check(cls); - } - invokePV(cls, __functionAddress); - } - - // --- [ method_getName ] --- - - /** - * Returns the name of a method. - * - *

    To get the method name as a C string, call {@code sel_getName(method_getName(method))}.

    - * - * @param m the method to inspect - * - * @return a pointer of type SEL - */ - @NativeType("SEL") - public static long method_getName(@NativeType("Method") long m) { - long __functionAddress = Functions.method_getName; - if (CHECKS) { - check(m); - } - return invokePP(m, __functionAddress); - } - - // --- [ method_getImplementation ] --- - - /** - * Returns the implementation of a method. - * - * @param m the method to inspect - * - * @return a function pointer of type IMP - */ - @NativeType("IMP") - public static long method_getImplementation(@NativeType("Method") long m) { - long __functionAddress = Functions.method_getImplementation; - if (CHECKS) { - check(m); - } - return invokePP(m, __functionAddress); - } - - // --- [ method_getTypeEncoding ] --- - - /** Unsafe version of: {@link #method_getTypeEncoding} */ - public static long nmethod_getTypeEncoding(long m) { - long __functionAddress = Functions.method_getTypeEncoding; - if (CHECKS) { - check(m); - } - return invokePP(m, __functionAddress); - } - - /** - * Returns a string describing a method's parameter and return types. - * - * @param m the method to inspect - * - * @return a C string. The string may be {@code NULL} - */ - @Nullable - @NativeType("char const *") - public static String method_getTypeEncoding(@NativeType("Method") long m) { - long __result = nmethod_getTypeEncoding(m); - return memUTF8Safe(__result); - } - - // --- [ method_getNumberOfArguments ] --- - - /** - * Returns the number of arguments accepted by a method. - * - * @param m a pointer to a Method data structure. Pass the method in question. - * - * @return an integer containing the number of arguments accepted by the given method - */ - @NativeType("unsigned int") - public static int method_getNumberOfArguments(@NativeType("Method") long m) { - long __functionAddress = Functions.method_getNumberOfArguments; - if (CHECKS) { - check(m); - } - return invokePI(m, __functionAddress); - } - - // --- [ method_copyReturnType ] --- - - /** Unsafe version of: {@link #method_copyReturnType} */ - public static long nmethod_copyReturnType(long m) { - long __functionAddress = Functions.method_copyReturnType; - if (CHECKS) { - check(m); - } - return invokePP(m, __functionAddress); - } - - /** - * Returns a string describing a method's return type. - * - * @param m the method to inspect - * - * @return a C string describing the return type. You must free the string with free(). - */ - @Nullable - @NativeType("char *") - public static String method_copyReturnType(@NativeType("Method") long m) { - long __result = nmethod_copyReturnType(m); - return memUTF8Safe(__result); - } - - // --- [ method_copyArgumentType ] --- - - /** Unsafe version of: {@link #method_copyArgumentType} */ - public static long nmethod_copyArgumentType(long m, int index) { - long __functionAddress = Functions.method_copyArgumentType; - if (CHECKS) { - check(m); - } - return invokePP(m, index, __functionAddress); - } - - /** - * Returns a string describing a single parameter type of a method. - * - * @param m the method to inspect - * @param index the index of the parameter to inspect - * - * @return a C string describing the type of the parameter at index {@code index}, or {@code NULL} if method has no parameter index {@code index}. You must free the - * string with free(). - */ - @Nullable - @NativeType("char *") - public static String method_copyArgumentType(@NativeType("Method") long m, @NativeType("unsigned int") int index) { - long __result = NULL; - try { - __result = nmethod_copyArgumentType(m, index); - return memUTF8Safe(__result); - } finally { - if (__result != NULL) org.lwjgl.system.libc.LibCStdlib.nfree(__result); - } - } - - // --- [ method_getReturnType ] --- - - /** - * Unsafe version of: {@link #method_getReturnType} - * - * @param dst_len the maximum number of characters that can be stored in {@code dst} - */ - public static void nmethod_getReturnType(long m, long dst, long dst_len) { - long __functionAddress = Functions.method_getReturnType; - if (CHECKS) { - check(m); - } - invokePPPV(m, dst, dst_len, __functionAddress); - } - - /** - * Returns by reference a string describing a method's return type. - * - *

    The method's return type string is copied to {@code dst}. {@code dst} is filled as if {@code strncpy(dst, parameter_type, dst_len)} were called.

    - * - * @param m the method to inspect - * @param dst the reference string to store the description - */ - public static void method_getReturnType(@NativeType("Method") long m, @NativeType("char *") ByteBuffer dst) { - nmethod_getReturnType(m, memAddress(dst), dst.remaining()); - } - - /** - * Returns by reference a string describing a method's return type. - * - *

    The method's return type string is copied to {@code dst}. {@code dst} is filled as if {@code strncpy(dst, parameter_type, dst_len)} were called.

    - * - * @param m the method to inspect - * @param dst_len the maximum number of characters that can be stored in {@code dst} - */ - @NativeType("void") - public static String method_getReturnType(@NativeType("Method") long m, @NativeType("size_t") long dst_len) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - ByteBuffer dst = stack.malloc((int)dst_len); - nmethod_getReturnType(m, memAddress(dst), dst_len); - return memUTF8(memByteBufferNT1(memAddress(dst), (int)dst_len)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ method_getArgumentType ] --- - - /** - * Unsafe version of: {@link #method_getArgumentType} - * - * @param dst_len the maximum number of characters that can be stored in {@code dst} - */ - public static void nmethod_getArgumentType(long m, int index, long dst, long dst_len) { - long __functionAddress = Functions.method_getArgumentType; - if (CHECKS) { - check(m); - } - invokePPPV(m, index, dst, dst_len, __functionAddress); - } - - /** - * Returns by reference a string describing a single parameter type of a method. - * - *

    The parameter type string is copied to {@code dst}. {@code dst} is filled as if {@code strncpy(dst, parameter_type, dst_len)} were called. If the - * method contains no parameter with that index, {@code dst} is filled as if {@code strncpy(dst, "", dst_len)} were called.

    - * - * @param m the method you want to inquire about - * @param index the index of the parameter you want to inquire about - * @param dst the reference string to store the description - */ - public static void method_getArgumentType(@NativeType("Method") long m, @NativeType("unsigned int") int index, @NativeType("char *") ByteBuffer dst) { - nmethod_getArgumentType(m, index, memAddress(dst), dst.remaining()); - } - - /** - * Returns by reference a string describing a single parameter type of a method. - * - *

    The parameter type string is copied to {@code dst}. {@code dst} is filled as if {@code strncpy(dst, parameter_type, dst_len)} were called. If the - * method contains no parameter with that index, {@code dst} is filled as if {@code strncpy(dst, "", dst_len)} were called.

    - * - * @param m the method you want to inquire about - * @param index the index of the parameter you want to inquire about - * @param dst_len the maximum number of characters that can be stored in {@code dst} - */ - @NativeType("void") - public static String method_getArgumentType(@NativeType("Method") long m, @NativeType("unsigned int") int index, @NativeType("size_t") long dst_len) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - ByteBuffer dst = stack.malloc((int)dst_len); - nmethod_getArgumentType(m, index, memAddress(dst), dst_len); - return memUTF8(memByteBufferNT1(memAddress(dst), (int)dst_len)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ method_setImplementation ] --- - - /** - * Sets the implementation of a method. - * - * @param m the method for which to set an implementation - * @param imp the implemention to set to this method - * - * @return the previous implementation of the method - */ - @NativeType("IMP") - public static long method_setImplementation(@NativeType("Method") long m, @NativeType("IMP") long imp) { - long __functionAddress = Functions.method_setImplementation; - if (CHECKS) { - check(m); - check(imp); - } - return invokePPP(m, imp, __functionAddress); - } - - // --- [ method_exchangeImplementations ] --- - - /** - * Exchanges the implementations of two methods. - * - * @param m1 the method to exchange with second method - * @param m2 the method to exchange with first method - */ - public static void method_exchangeImplementations(@NativeType("Method") long m1, @NativeType("Method") long m2) { - long __functionAddress = Functions.method_exchangeImplementations; - if (CHECKS) { - check(m1); - check(m2); - } - invokePPV(m1, m2, __functionAddress); - } - - // --- [ ivar_getName ] --- - - /** Unsafe version of: {@link #ivar_getName} */ - public static long nivar_getName(long v) { - long __functionAddress = Functions.ivar_getName; - if (CHECKS) { - check(v); - } - return invokePP(v, __functionAddress); - } - - /** - * Returns the name of an instance variable. - * - * @param v the instance variable - * - * @return a C string containing the instance variable's name - */ - @Nullable - @NativeType("char const *") - public static String ivar_getName(@NativeType("Ivar") long v) { - long __result = nivar_getName(v); - return memUTF8Safe(__result); - } - - // --- [ ivar_getTypeEncoding ] --- - - /** Unsafe version of: {@link #ivar_getTypeEncoding} */ - public static long nivar_getTypeEncoding(long v) { - long __functionAddress = Functions.ivar_getTypeEncoding; - if (CHECKS) { - check(v); - } - return invokePP(v, __functionAddress); - } - - /** - * Returns the type string of an instance variable. - * - * @param v the instance variable - * - * @return a C string containing the instance variable's type encoding - */ - @Nullable - @NativeType("char const *") - public static String ivar_getTypeEncoding(@NativeType("Ivar") long v) { - long __result = nivar_getTypeEncoding(v); - return memUTF8Safe(__result); - } - - // --- [ ivar_getOffset ] --- - - /** - * Returns the offset of an instance variable. - * - *

    For instance variables of type {@code id} or other object types, call {@link #object_getIvar} and {@link #object_setIvar} instead of using this offset to access - * the instance variable data directly.

    - * - * @param v the instance variable - * - * @return the offset of {@code v} - */ - @NativeType("ptrdiff_t") - public static long ivar_getOffset(@NativeType("Ivar") long v) { - long __functionAddress = Functions.ivar_getOffset; - if (CHECKS) { - check(v); - } - return invokePP(v, __functionAddress); - } - - // --- [ property_getName ] --- - - /** Unsafe version of: {@link #property_getName} */ - public static long nproperty_getName(long property) { - long __functionAddress = Functions.property_getName; - if (CHECKS) { - check(property); - } - return invokePP(property, __functionAddress); - } - - /** - * Returns the name of a property. - * - * @param property the property you want to inquire about - * - * @return a C string containing the property's name - */ - @Nullable - @NativeType("char const *") - public static String property_getName(@NativeType("objc_property_t") long property) { - long __result = nproperty_getName(property); - return memUTF8Safe(__result); - } - - // --- [ property_getAttributes ] --- - - /** Unsafe version of: {@link #property_getAttributes} */ - public static long nproperty_getAttributes(long property) { - long __functionAddress = Functions.property_getAttributes; - if (CHECKS) { - check(property); - } - return invokePP(property, __functionAddress); - } - - /** - * Returns the attribute string of a property. - * - * @param property a property - * - * @return a C string containing the property's attributes - */ - @Nullable - @NativeType("char const *") - public static String property_getAttributes(@NativeType("objc_property_t") long property) { - long __result = nproperty_getAttributes(property); - return memUTF8Safe(__result); - } - - // --- [ property_copyAttributeList ] --- - - /** - * Unsafe version of: {@link #property_copyAttributeList} - * - * @param outCount the number of attributes returned in the array - */ - public static long nproperty_copyAttributeList(long property, long outCount) { - long __functionAddress = Functions.property_copyAttributeList; - if (CHECKS) { - check(property); - } - return invokePPP(property, outCount, __functionAddress); - } - - /** - * Returns an array of property attributes for a given property. - * - * @param property the property whose attributes you want to copy - * - * @return an array of property attributes. You must free the array with free(). - */ - @Nullable - @NativeType("objc_property_attribute_t *") - public static ObjCPropertyAttribute.Buffer property_copyAttributeList(@NativeType("objc_property_t") long property) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nproperty_copyAttributeList(property, memAddress(outCount)); - return ObjCPropertyAttribute.createSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ property_copyAttributeValue ] --- - - /** Unsafe version of: {@link #property_copyAttributeValue} */ - public static long nproperty_copyAttributeValue(long property, long attributeName) { - long __functionAddress = Functions.property_copyAttributeValue; - if (CHECKS) { - check(property); - } - return invokePPP(property, attributeName, __functionAddress); - } - - /** - * Returns the value of a property attribute given the attribute name. - * - * @param property the property whose value you are interested in - * @param attributeName a C string representing the name of the attribute - * - * @return The value string of the {@code attributeName} attribute, if one exists in {@code property}; otherwise, {@link #nil}. You must free the returned value string - * with free(). - */ - @Nullable - @NativeType("char *") - public static String property_copyAttributeValue(@NativeType("objc_property_t") long property, @NativeType("char const *") ByteBuffer attributeName) { - if (CHECKS) { - checkNT1(attributeName); - } - long __result = NULL; - try { - __result = nproperty_copyAttributeValue(property, memAddress(attributeName)); - return memUTF8Safe(__result); - } finally { - if (__result != NULL) org.lwjgl.system.libc.LibCStdlib.nfree(__result); - } - } - - /** - * Returns the value of a property attribute given the attribute name. - * - * @param property the property whose value you are interested in - * @param attributeName a C string representing the name of the attribute - * - * @return The value string of the {@code attributeName} attribute, if one exists in {@code property}; otherwise, {@link #nil}. You must free the returned value string - * with free(). - */ - @Nullable - @NativeType("char *") - public static String property_copyAttributeValue(@NativeType("objc_property_t") long property, @NativeType("char const *") CharSequence attributeName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - long __result = NULL; - try { - stack.nUTF8(attributeName, true); - long attributeNameEncoded = stack.getPointerAddress(); - __result = nproperty_copyAttributeValue(property, attributeNameEncoded); - return memUTF8Safe(__result); - } finally { - if (__result != NULL) org.lwjgl.system.libc.LibCStdlib.nfree(__result); - stack.setPointer(stackPointer); - } - } - - // --- [ objc_getProtocol ] --- - - /** Unsafe version of: {@link #objc_getProtocol} */ - public static long nobjc_getProtocol(long name) { - long __functionAddress = Functions.objc_getProtocol; - return invokePP(name, __functionAddress); - } - - /** - * Returns a specified protocol. - * - *

    This function acquires the runtime lock.

    - * - * @param name the name of a protocol - * - * @return the protocol named {@code name}{, or {@code NULL} if no protocol named name could be found - */ - @NativeType("Protocol *") - public static long objc_getProtocol(@NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nobjc_getProtocol(memAddress(name)); - } - - /** - * Returns a specified protocol. - * - *

    This function acquires the runtime lock.

    - * - * @param name the name of a protocol - * - * @return the protocol named {@code name}{, or {@code NULL} if no protocol named name could be found - */ - @NativeType("Protocol *") - public static long objc_getProtocol(@NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobjc_getProtocol(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_copyProtocolList ] --- - - /** - * Unsafe version of: {@link #objc_copyProtocolList} - * - * @param outCount upon return, contains the number of protocols in the returned array - */ - public static long nobjc_copyProtocolList(long outCount) { - long __functionAddress = Functions.objc_copyProtocolList; - return invokePP(outCount, __functionAddress); - } - - /** - * Returns an array of all the protocols known to the runtime. - * - * @return a C array of all the protocols known to the runtime. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the - * list with free(). - */ - @Nullable - @NativeType("Protocol **") - public static PointerBuffer objc_copyProtocolList() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nobjc_copyProtocolList(memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ protocol_conformsToProtocol ] --- - - /** - * Returns a Boolean value that indicates whether one protocol conforms to another protocol. - * - *
    Discussion
    - * - *

    One protocol can incorporate other protocols using the same syntax that classes use to adopt a protocol:

    - * - *

    {@code @protocol ProtocolName < protocol list >}

    - * - *

    All the protocols listed between angle brackets are considered part of the {@code ProtocolName} protocol.

    - * - * @param proto a protocol - * @param other a protocol - * - * @return {@link #YES} if {@code proto} conforms to {@code other}, otherwise {@link #NO} - */ - @NativeType("BOOL") - public static boolean protocol_conformsToProtocol(@NativeType("Protocol *") long proto, @NativeType("Protocol *") long other) { - long __functionAddress = Functions.protocol_conformsToProtocol; - if (CHECKS) { - check(proto); - check(other); - } - return invokePPZ(proto, other, __functionAddress); - } - - // --- [ protocol_isEqual ] --- - - /** - * Returns a Boolean value that indicates whether two protocols are equal. - * - * @param proto a protocol - * @param other a protocol - * - * @return {@link #YES} if proto is the same as other, otherwise {@link #NO} - */ - @NativeType("BOOL") - public static boolean protocol_isEqual(@NativeType("Protocol *") long proto, @NativeType("Protocol *") long other) { - long __functionAddress = Functions.protocol_isEqual; - if (CHECKS) { - check(proto); - check(other); - } - return invokePPZ(proto, other, __functionAddress); - } - - // --- [ protocol_getName ] --- - - /** Unsafe version of: {@link #protocol_getName} */ - public static long nprotocol_getName(long p) { - long __functionAddress = Functions.protocol_getName; - if (CHECKS) { - check(p); - } - return invokePP(p, __functionAddress); - } - - /** - * Returns a the name of a protocol. - * - * @param p a protocol - * - * @return the name of the protocol {@code p} as a C string - */ - @Nullable - @NativeType("char const *") - public static String protocol_getName(@NativeType("Protocol *") long p) { - long __result = nprotocol_getName(p); - return memUTF8Safe(__result); - } - - // --- [ protocol_getMethodDescription ] --- - - /** Unsafe version of: {@link #protocol_getMethodDescription} */ - public static native void nprotocol_getMethodDescription(long p, long aSel, boolean isRequiredMethod, boolean isInstanceMethod, long __functionAddress, long __result); - - /** Unsafe version of: {@link #protocol_getMethodDescription} */ - public static void nprotocol_getMethodDescription(long p, long aSel, boolean isRequiredMethod, boolean isInstanceMethod, long __result) { - long __functionAddress = Functions.protocol_getMethodDescription; - if (CHECKS) { - check(p); - check(aSel); - } - nprotocol_getMethodDescription(p, aSel, isRequiredMethod, isInstanceMethod, __functionAddress, __result); - } - - /** - * Returns a method description structure for a specified method of a given protocol. - * - * @param p a protocol - * @param aSel a selector - * @param isRequiredMethod a Boolean value that indicates whether {@code aSel} is a required method - * @param isInstanceMethod a Boolean value that indicates whether {@code aSel} is a instance method - * @param __result an objc_method_description structure that describes the method specified by {@code aSel}, {@code isRequiredMethod}, and {@code isInstanceMethod} for - * the protocol {@code p}. - * - *

    If the protocol does not contain the specified method, returns an objc_method_description structure with the value {@code {NULL, NULL}}.

    - */ - @NativeType("struct objc_method_description") - public static ObjCMethodDescription protocol_getMethodDescription(@NativeType("Protocol *") long p, @NativeType("SEL") long aSel, @NativeType("BOOL") boolean isRequiredMethod, @NativeType("BOOL") boolean isInstanceMethod, @NativeType("struct objc_method_description") ObjCMethodDescription __result) { - nprotocol_getMethodDescription(p, aSel, isRequiredMethod, isInstanceMethod, __result.address()); - return __result; - } - - // --- [ protocol_copyMethodDescriptionList ] --- - - /** - * Unsafe version of: {@link #protocol_copyMethodDescriptionList} - * - * @param outCount upon return, contains the number of method description structures in the returned array - */ - public static long nprotocol_copyMethodDescriptionList(long p, boolean isRequiredMethod, boolean isInstanceMethod, long outCount) { - long __functionAddress = Functions.protocol_copyMethodDescriptionList; - if (CHECKS) { - check(p); - } - return invokePPP(p, isRequiredMethod, isInstanceMethod, outCount, __functionAddress); - } - - /** - * Returns an array of method descriptions of methods meeting a given specification for a given protocol. - * - *

    Methods in other protocols adopted by this protocol are not included.

    - * - * @param p a protocol - * @param isRequiredMethod a Boolean value that indicates whether returned methods should be required methods (pass {@link #YES} to specify required methods) - * @param isInstanceMethod a Boolean value that indicates whether returned methods should be instance methods (pass {@link #YES} to specify instance methods) - * - * @return a C array of objc_method_description structures containing the names and types of {@code p}'s methods specified by {@code isRequiredMethod} and - * {@code isInstanceMethod}. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the list with free(). - * - *

    If the protocol declares no methods that meet the specification, {@code NULL} is returned and {@code *outCount} is 0.

    - */ - @Nullable - @NativeType("struct objc_method_description *") - public static ObjCMethodDescription.Buffer protocol_copyMethodDescriptionList(@NativeType("Protocol *") long p, @NativeType("BOOL") boolean isRequiredMethod, @NativeType("BOOL") boolean isInstanceMethod) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nprotocol_copyMethodDescriptionList(p, isRequiredMethod, isInstanceMethod, memAddress(outCount)); - return ObjCMethodDescription.createSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ protocol_getProperty ] --- - - /** Unsafe version of: {@link #protocol_getProperty} */ - public static long nprotocol_getProperty(long proto, long name, boolean isRequiredProperty, boolean isInstanceProperty) { - long __functionAddress = Functions.protocol_getProperty; - if (CHECKS) { - check(proto); - } - return invokePPP(proto, name, isRequiredProperty, isInstanceProperty, __functionAddress); - } - - /** - * Returns the specified property of a given protocol. - * - * @param proto a protocol - * @param name the name of a property - * @param isRequiredProperty a Boolean value that indicates whether {@code name} is a required property - * @param isInstanceProperty a Boolean value that indicates whether {@code name} is a instance property - * - * @return the property specified by {@code name}, {@code isRequiredProperty}, and {@code isInstanceProperty} for {@code proto}, or {@code NULL} if none of - * {@code proto}'s properties meets the specification - */ - @NativeType("objc_property_t") - public static long protocol_getProperty(@NativeType("Protocol *") long proto, @NativeType("char const *") ByteBuffer name, @NativeType("BOOL") boolean isRequiredProperty, @NativeType("BOOL") boolean isInstanceProperty) { - if (CHECKS) { - checkNT1(name); - } - return nprotocol_getProperty(proto, memAddress(name), isRequiredProperty, isInstanceProperty); - } - - /** - * Returns the specified property of a given protocol. - * - * @param proto a protocol - * @param name the name of a property - * @param isRequiredProperty a Boolean value that indicates whether {@code name} is a required property - * @param isInstanceProperty a Boolean value that indicates whether {@code name} is a instance property - * - * @return the property specified by {@code name}, {@code isRequiredProperty}, and {@code isInstanceProperty} for {@code proto}, or {@code NULL} if none of - * {@code proto}'s properties meets the specification - */ - @NativeType("objc_property_t") - public static long protocol_getProperty(@NativeType("Protocol *") long proto, @NativeType("char const *") CharSequence name, @NativeType("BOOL") boolean isRequiredProperty, @NativeType("BOOL") boolean isInstanceProperty) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nprotocol_getProperty(proto, nameEncoded, isRequiredProperty, isInstanceProperty); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ protocol_copyPropertyList ] --- - - /** - * Unsafe version of: {@link #protocol_copyPropertyList} - * - * @param outCount upon return, contains the number of elements in the returned array - */ - public static long nprotocol_copyPropertyList(long proto, long outCount) { - long __functionAddress = Functions.protocol_copyPropertyList; - if (CHECKS) { - check(proto); - } - return invokePPP(proto, outCount, __functionAddress); - } - - /** - * Returns an array of the properties declared by a protocol. - * - * @param proto a protocol - * - * @return a C array of pointers of type objc_property_t describing the properties declared by {@code proto}. Any properties declared by other protocols adopted - * by this protocol are not included. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the array with free(). - * - *

    If the protocol declares no properties, {@code NULL} is returned and {@code *outCount} is 0.

    - */ - @Nullable - @NativeType("objc_property_t *") - public static PointerBuffer protocol_copyPropertyList(@NativeType("Protocol *") long proto) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nprotocol_copyPropertyList(proto, memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ protocol_copyProtocolList ] --- - - /** - * Unsafe version of: {@link #protocol_copyProtocolList} - * - * @param outCount upon return, contains the number of elements in the returned array - */ - public static long nprotocol_copyProtocolList(long proto, long outCount) { - long __functionAddress = Functions.protocol_copyProtocolList; - if (CHECKS) { - check(proto); - } - return invokePPP(proto, outCount, __functionAddress); - } - - /** - * eturns an array of the protocols adopted by a protocol. - * - * @param proto a protocol - * - * @return a C array of protocols adopted by {@code proto}. The array contains {@code *outCount} pointers followed by a {@code NULL} terminator. You must free the array - * with free(). - * - *

    If the protocol declares no properties, {@code NULL} is returned and {@code *outCount} is 0.

    - */ - @Nullable - @NativeType("Protocol **") - public static PointerBuffer protocol_copyProtocolList(@NativeType("Protocol *") long proto) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nprotocol_copyProtocolList(proto, memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_allocateProtocol ] --- - - /** Unsafe version of: {@link #objc_allocateProtocol} */ - public static long nobjc_allocateProtocol(long name) { - long __functionAddress = Functions.objc_allocateProtocol; - return invokePP(name, __functionAddress); - } - - /** - * Creates a new protocol instance. - * - *

    You must register the returned protocol instance with the {@link #objc_registerProtocol} function before you can use it.

    - * - *

    There is no dispose method associated with this function.

    - * - * @param name the name of the protocol you want to create - * - * @return a new protocol instance or {@link #nil} if a protocol with the same name as {@code name} already exists - */ - @NativeType("Protocol *") - public static long objc_allocateProtocol(@NativeType("char const *") ByteBuffer name) { - if (CHECKS) { - checkNT1(name); - } - return nobjc_allocateProtocol(memAddress(name)); - } - - /** - * Creates a new protocol instance. - * - *

    You must register the returned protocol instance with the {@link #objc_registerProtocol} function before you can use it.

    - * - *

    There is no dispose method associated with this function.

    - * - * @param name the name of the protocol you want to create - * - * @return a new protocol instance or {@link #nil} if a protocol with the same name as {@code name} already exists - */ - @NativeType("Protocol *") - public static long objc_allocateProtocol(@NativeType("char const *") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - return nobjc_allocateProtocol(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_registerProtocol ] --- - - /** - * Registers a newly created protocol with the Objective-C runtime. - * - *

    When you create a new protocol using the {@link #objc_allocateProtocol}, you then register it with the Objective-C runtime by calling this function. After a - * protocol is successfully registered, it is immutable and ready to use.

    - * - * @param proto the protocol you want to register with the Objective-C runtime - */ - public static void objc_registerProtocol(@NativeType("Protocol *") long proto) { - long __functionAddress = Functions.objc_registerProtocol; - if (CHECKS) { - check(proto); - } - invokePV(proto, __functionAddress); - } - - // --- [ protocol_addMethodDescription ] --- - - /** Unsafe version of: {@link #protocol_addMethodDescription} */ - public static void nprotocol_addMethodDescription(long proto, long name, long types, boolean isRequiredMethod, boolean isInstanceMethod) { - long __functionAddress = Functions.protocol_addMethodDescription; - if (CHECKS) { - check(proto); - check(name); - } - invokePPPV(proto, name, types, isRequiredMethod, isInstanceMethod, __functionAddress); - } - - /** - * Adds a method to a protocol. - * - *

    To add a method to a protocol using this function, the protocol must be under construction. That is, you must add any methods to proto before you - * register it with the Objective-C runtime (via the {@link #objc_registerProtocol} function).

    - * - * @param proto the protocol you want to add a method to - * @param name the name of the method you want to add - * @param types a C string representing the signature of the method you want to add - * @param isRequiredMethod a Boolean indicating whether the method is a required method of the {@code proto} protocol. If {@link #YES}, the method is a required method; if {@link #NO}, the - * method is an optional method. - * @param isInstanceMethod a Boolean indicating whether the method is an instance method. If {@link #YES}, the method is an instance method; if {@link #NO}, the method is a class method. - */ - public static void protocol_addMethodDescription(@NativeType("Protocol *") long proto, @NativeType("SEL") long name, @NativeType("char const *") ByteBuffer types, @NativeType("BOOL") boolean isRequiredMethod, @NativeType("BOOL") boolean isInstanceMethod) { - if (CHECKS) { - checkNT1(types); - } - nprotocol_addMethodDescription(proto, name, memAddress(types), isRequiredMethod, isInstanceMethod); - } - - /** - * Adds a method to a protocol. - * - *

    To add a method to a protocol using this function, the protocol must be under construction. That is, you must add any methods to proto before you - * register it with the Objective-C runtime (via the {@link #objc_registerProtocol} function).

    - * - * @param proto the protocol you want to add a method to - * @param name the name of the method you want to add - * @param types a C string representing the signature of the method you want to add - * @param isRequiredMethod a Boolean indicating whether the method is a required method of the {@code proto} protocol. If {@link #YES}, the method is a required method; if {@link #NO}, the - * method is an optional method. - * @param isInstanceMethod a Boolean indicating whether the method is an instance method. If {@link #YES}, the method is an instance method; if {@link #NO}, the method is a class method. - */ - public static void protocol_addMethodDescription(@NativeType("Protocol *") long proto, @NativeType("SEL") long name, @NativeType("char const *") CharSequence types, @NativeType("BOOL") boolean isRequiredMethod, @NativeType("BOOL") boolean isInstanceMethod) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(types, true); - long typesEncoded = stack.getPointerAddress(); - nprotocol_addMethodDescription(proto, name, typesEncoded, isRequiredMethod, isInstanceMethod); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ protocol_addProtocol ] --- - - /** - * Adds a registered protocol to another protocol that is under construction. - * - *

    The protocol you want to add to ({@code proto}) must be under construction – allocated but not yet registered with the Objective-C runtime. The - * protocol you want to add ({@code addition}) must be registered already.

    - * - * @param proto the protocol you want to add the registered protocol to - * @param addition the registered protocol you want to add to {@code proto} - */ - public static void protocol_addProtocol(@NativeType("Protocol *") long proto, @NativeType("Protocol *") long addition) { - long __functionAddress = Functions.protocol_addProtocol; - if (CHECKS) { - check(proto); - check(addition); - } - invokePPV(proto, addition, __functionAddress); - } - - // --- [ protocol_addProperty ] --- - - /** - * Unsafe version of: {@link #protocol_addProperty} - * - * @param attributeCount the number of properties in {@code attributes} - */ - public static void nprotocol_addProperty(long proto, long name, long attributes, int attributeCount, boolean isRequiredProperty, boolean isInstanceProperty) { - long __functionAddress = Functions.protocol_addProperty; - if (CHECKS) { - check(proto); - Struct.validate(attributes, attributeCount, ObjCPropertyAttribute.SIZEOF, ObjCPropertyAttribute::validate); - } - invokePPPV(proto, name, attributes, attributeCount, isRequiredProperty, isInstanceProperty, __functionAddress); - } - - /** - * Adds a property to a protocol that is under construction. - * - *

    The protocol you want to add the property to must be under construction – allocated but not yet registered with the Objective-C runtime (via the - * {@link #objc_registerProtocol} function).

    - * - * @param proto the protocol you want to add a property to - * @param name the name of the property you want to add. - * @param attributes an array of property attributes - * @param isRequiredProperty a Boolean indicating whether the property's accessor methods are required methods of the {@code proto} protocol. If {@link #YES}, the property's accessor - * methods are required methods; if {@link #NO}, the property's accessor methods are optional methods. - * @param isInstanceProperty a Boolean indicating whether the property's accessor methods are instance methods. If {@link #YES}, the property's accessor methods are instance methods. - * {@link #YES} is the only value allowed for a property. As a result, if you set this value to {@link #NO}, the property will not be added to the protocol. - */ - public static void protocol_addProperty(@NativeType("Protocol *") long proto, @NativeType("char const *") ByteBuffer name, @NativeType("objc_property_attribute_t const *") ObjCPropertyAttribute.Buffer attributes, @NativeType("BOOL") boolean isRequiredProperty, @NativeType("BOOL") boolean isInstanceProperty) { - if (CHECKS) { - checkNT1(name); - } - nprotocol_addProperty(proto, memAddress(name), attributes.address(), attributes.remaining(), isRequiredProperty, isInstanceProperty); - } - - /** - * Adds a property to a protocol that is under construction. - * - *

    The protocol you want to add the property to must be under construction – allocated but not yet registered with the Objective-C runtime (via the - * {@link #objc_registerProtocol} function).

    - * - * @param proto the protocol you want to add a property to - * @param name the name of the property you want to add. - * @param attributes an array of property attributes - * @param isRequiredProperty a Boolean indicating whether the property's accessor methods are required methods of the {@code proto} protocol. If {@link #YES}, the property's accessor - * methods are required methods; if {@link #NO}, the property's accessor methods are optional methods. - * @param isInstanceProperty a Boolean indicating whether the property's accessor methods are instance methods. If {@link #YES}, the property's accessor methods are instance methods. - * {@link #YES} is the only value allowed for a property. As a result, if you set this value to {@link #NO}, the property will not be added to the protocol. - */ - public static void protocol_addProperty(@NativeType("Protocol *") long proto, @NativeType("char const *") CharSequence name, @NativeType("objc_property_attribute_t const *") ObjCPropertyAttribute.Buffer attributes, @NativeType("BOOL") boolean isRequiredProperty, @NativeType("BOOL") boolean isInstanceProperty) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(name, true); - long nameEncoded = stack.getPointerAddress(); - nprotocol_addProperty(proto, nameEncoded, attributes.address(), attributes.remaining(), isRequiredProperty, isInstanceProperty); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ objc_copyImageNames ] --- - - /** - * Unsafe version of: {@link #objc_copyImageNames} - * - * @param outCount the number of names in the returned array - */ - public static long nobjc_copyImageNames(long outCount) { - long __functionAddress = Functions.objc_copyImageNames; - return invokePP(outCount, __functionAddress); - } - - /** - * Returns the names of all the loaded Objective-C frameworks and dynamic libraries. - * - * @return an array of C strings representing the names of all the loaded Objective-C frameworks and dynamic libraries - */ - @Nullable - @NativeType("char const **") - public static PointerBuffer objc_copyImageNames() { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nobjc_copyImageNames(memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ class_getImageName ] --- - - /** Unsafe version of: {@link #class_getImageName} */ - public static long nclass_getImageName(long cls) { - long __functionAddress = Functions.class_getImageName; - if (CHECKS) { - check(cls); - } - return invokePP(cls, __functionAddress); - } - - /** - * Returns the name of the dynamic library a class originated from. - * - * @param cls the class you are inquiring about - * - * @return a C string representing the name of the library containing the {@code cls} class. - */ - @Nullable - @NativeType("char const *") - public static String class_getImageName(@NativeType("Class") long cls) { - long __result = nclass_getImageName(cls); - return memUTF8Safe(__result); - } - - // --- [ objc_copyClassNamesForImage ] --- - - /** - * Unsafe version of: {@link #objc_copyClassNamesForImage} - * - * @param outCount the number of names in the returned array - */ - public static long nobjc_copyClassNamesForImage(long image, long outCount) { - long __functionAddress = Functions.objc_copyClassNamesForImage; - return invokePPP(image, outCount, __functionAddress); - } - - /** - * Returns the names of all the classes within a specified library or framework. - * - * @param image the library or framework you are inquiring about - * - * @return an array of C strings representing all of the class names within the specified library or framework - */ - @Nullable - @NativeType("char const **") - public static PointerBuffer objc_copyClassNamesForImage(@NativeType("char const *") ByteBuffer image) { - if (CHECKS) { - checkNT1(image); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - IntBuffer outCount = stack.callocInt(1); - try { - long __result = nobjc_copyClassNamesForImage(memAddress(image), memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - /** - * Returns the names of all the classes within a specified library or framework. - * - * @param image the library or framework you are inquiring about - * - * @return an array of C strings representing all of the class names within the specified library or framework - */ - @Nullable - @NativeType("char const **") - public static PointerBuffer objc_copyClassNamesForImage(@NativeType("char const *") CharSequence image) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - IntBuffer outCount = stack.callocInt(1); - stack.nUTF8(image, true); - long imageEncoded = stack.getPointerAddress(); - long __result = nobjc_copyClassNamesForImage(imageEncoded, memAddress(outCount)); - return memPointerBufferSafe(__result, outCount.get(0)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ sel_getName ] --- - - /** Unsafe version of: {@link #sel_getName} */ - public static long nsel_getName(long sel) { - long __functionAddress = Functions.sel_getName; - if (CHECKS) { - check(sel); - } - return invokePP(sel, __functionAddress); - } - - /** - * Returns the name of the method specified by a given selector. - * - * @param sel a pointer of type SEL. Pass the selector whose name you wish to determine. - * - * @return a C string indicating the name of the selector - */ - @Nullable - @NativeType("char const *") - public static String sel_getName(@NativeType("SEL") long sel) { - long __result = nsel_getName(sel); - return memUTF8Safe(__result); - } - - // --- [ sel_getUid ] --- - - /** Unsafe version of: {@link #sel_getUid} */ - public static long nsel_getUid(long str) { - long __functionAddress = Functions.sel_getUid; - return invokePP(str, __functionAddress); - } - - /** - * Registers a method name with the Objective-C runtime system. - * - *

    The implementation of this method is identical to the implementation of {@link #sel_registerName}.

    - * - * @param str a pointer to a C string. Pass the name of the method you wish to register - * - * @return a pointer of type SEL specifying the selector for the named method - */ - @NativeType("SEL") - public static long sel_getUid(@NativeType("char const *") ByteBuffer str) { - if (CHECKS) { - checkNT1(str); - } - return nsel_getUid(memAddress(str)); - } - - /** - * Registers a method name with the Objective-C runtime system. - * - *

    The implementation of this method is identical to the implementation of {@link #sel_registerName}.

    - * - * @param str a pointer to a C string. Pass the name of the method you wish to register - * - * @return a pointer of type SEL specifying the selector for the named method - */ - @NativeType("SEL") - public static long sel_getUid(@NativeType("char const *") CharSequence str) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(str, true); - long strEncoded = stack.getPointerAddress(); - return nsel_getUid(strEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ sel_registerName ] --- - - /** Unsafe version of: {@link #sel_registerName} */ - public static long nsel_registerName(long str) { - long __functionAddress = Functions.sel_registerName; - return invokePP(str, __functionAddress); - } - - /** - * Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value. - * - *

    You must register a method name with the Objective-C runtime system to obtain the method’s selector before you can add the method to a class - * definition. If the method name has already been registered, this function simply returns the selector.

    - * - * @param str a pointer to a C string. Pass the name of the method you wish to register - * - * @return a pointer of type SEL specifying the selector for the named method - */ - @NativeType("SEL") - public static long sel_registerName(@NativeType("char const *") ByteBuffer str) { - if (CHECKS) { - checkNT1(str); - } - return nsel_registerName(memAddress(str)); - } - - /** - * Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value. - * - *

    You must register a method name with the Objective-C runtime system to obtain the method’s selector before you can add the method to a class - * definition. If the method name has already been registered, this function simply returns the selector.

    - * - * @param str a pointer to a C string. Pass the name of the method you wish to register - * - * @return a pointer of type SEL specifying the selector for the named method - */ - @NativeType("SEL") - public static long sel_registerName(@NativeType("char const *") CharSequence str) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(str, true); - long strEncoded = stack.getPointerAddress(); - return nsel_registerName(strEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ sel_isEqual ] --- - - /** - * Returns a Boolean value that indicates whether two selectors are equal. - * - *

    sel_isEqual is equivalent to {@code ==}.

    - * - * @param lhs the selector to compare with {@code rhs} - * @param rhs the selector to compare with {@code lhs} - * - * @return {@link #YES} if rhs and rhs are equal, otherwise {@link #NO} - */ - @NativeType("BOOL") - public static boolean sel_isEqual(@NativeType("SEL") long lhs, @NativeType("SEL") long rhs) { - long __functionAddress = Functions.sel_isEqual; - if (CHECKS) { - check(lhs); - check(rhs); - } - return invokePPZ(lhs, rhs, __functionAddress); - } - - // --- [ objc_enumerationMutation ] --- - - /** - * Inserted by the compiler when a mutation is detected during a foreach iteration. - * - *

    The compiler inserts this function when it detects that an object is mutated during a foreach iteration. The function is called when a mutation occurs, - * and the enumeration mutation handler is enacted if it is set up (via the {@link #objc_setEnumerationMutationHandler} function). If the handler is not set up, - * a fatal error occurs.

    - * - * @param obj the object being mutated - */ - public static void objc_enumerationMutation(@NativeType("id") long obj) { - long __functionAddress = Functions.objc_enumerationMutation; - if (CHECKS) { - check(obj); - } - invokePV(obj, __functionAddress); - } - - // --- [ objc_setEnumerationMutationHandler ] --- - - /** Unsafe version of: {@link #objc_setEnumerationMutationHandler} */ - public static void nobjc_setEnumerationMutationHandler(long handler) { - long __functionAddress = Functions.objc_setEnumerationMutationHandler; - invokePV(handler, __functionAddress); - } - - /** - * Sets the current mutation handler. - * - * @param handler a function pointer to the new mutation handler - */ - public static void objc_setEnumerationMutationHandler(@NativeType("EnumerationMutationHandler") EnumerationMutationHandlerI handler) { - nobjc_setEnumerationMutationHandler(handler.address()); - } - - // --- [ imp_implementationWithBlock ] --- - - /** - * Creates a pointer to a function that calls the specified block when the method is called. - * - * @param block the block that implements this method. The signature of {@code block} should be {@code method_return_type ^(id self, self, method_args …)}. The - * selector of the method is not available to {@code block}. {@code block} is copied with {@code Block_copy()}. - * - * @return the IMP that calls {@code block}. You must dispose of the returned IMP using the function. - */ - @NativeType("IMP") - public static long imp_implementationWithBlock(@NativeType("id") long block) { - long __functionAddress = Functions.imp_implementationWithBlock; - if (CHECKS) { - check(block); - } - return invokePP(block, __functionAddress); - } - - // --- [ imp_getBlock ] --- - - /** - * Returns the block associated with an IMP that was created using {@link #imp_implementationWithBlock}. - * - * @param anImp the IMP that calls this block - * - * @return the block called by {@code anImp} - */ - @NativeType("id") - public static long imp_getBlock(@NativeType("IMP") long anImp) { - long __functionAddress = Functions.imp_getBlock; - if (CHECKS) { - check(anImp); - } - return invokePP(anImp, __functionAddress); - } - - // --- [ imp_removeBlock ] --- - - /** - * Disassociates a block from an IMP that was created using {@link #imp_implementationWithBlock}, and releases the copy of the block that was created. - * - * @param anImp an IMP that was created using the {@link #imp_implementationWithBlock} function. - * - * @return {@link #YES} if the block was released successfully; otherwise, {@link #NO} (for example, the function returns {@link #NO} if the block was not used to create {@code anImp} - * previously). - */ - @NativeType("BOOL") - public static boolean imp_removeBlock(@NativeType("IMP") long anImp) { - long __functionAddress = Functions.imp_removeBlock; - if (CHECKS) { - check(anImp); - } - return invokePZ(anImp, __functionAddress); - } - - // --- [ objc_loadWeak ] --- - - /** Unsafe version of: {@link #objc_loadWeak} */ - public static long nobjc_loadWeak(long location) { - long __functionAddress = Functions.objc_loadWeak; - return invokePP(location, __functionAddress); - } - - /** - * Loads the object referenced by a weak pointer and returns it. - * - *

    This function loads the object referenced by a weak pointer and returns it after retaining and autoreleasing the object. As a result, the object stays - * alive long enough for the caller to use it. This function is typically used anywhere a {@code __weak} variable is used in an expression.

    - * - * @param location the address of the weak pointer - * - * @return the object pointed to by location, or {@link #nil} if location is {@link #nil} - */ - @NativeType("id") - public static long objc_loadWeak(@Nullable @NativeType("id *") PointerBuffer location) { - if (CHECKS) { - checkSafe(location, 1); - } - return nobjc_loadWeak(memAddressSafe(location)); - } - - // --- [ objc_storeWeak ] --- - - /** Unsafe version of: {@link #objc_storeWeak} */ - public static long nobjc_storeWeak(long location, long obj) { - long __functionAddress = Functions.objc_storeWeak; - if (CHECKS) { - check(obj); - } - return invokePPP(location, obj, __functionAddress); - } - - /** - * Stores a new value in a {@code __weak} variable. - * - *

    This function is typically used anywhere a {@code __weak} variable is the target of an assignment.

    - * - * @param location the address of the weak pointer - * @param obj the new object you want the weak pointer to now point to - * - * @return the value stored in location (that is, {@code obj}) - */ - @NativeType("id") - public static long objc_storeWeak(@NativeType("id *") PointerBuffer location, @NativeType("id") long obj) { - if (CHECKS) { - check(location, 1); - } - return nobjc_storeWeak(memAddress(location), obj); - } - - // --- [ objc_setAssociatedObject ] --- - - /** - * Sets an associated value for a given object using a given key and association policy. - * - * @param object the source object for the association - * @param key the key for the association - * @param value the value to associate with the key {@code key} for {@code object}. Pass {@link #nil} to clear an existing association. - * @param policy the policy for the association. One of:
    {@link #OBJC_ASSOCIATION_ASSIGN}{@link #OBJC_ASSOCIATION_RETAIN_NONATOMIC}{@link #OBJC_ASSOCIATION_COPY_NONATOMIC}
    {@link #OBJC_ASSOCIATION_RETAIN}{@link #OBJC_ASSOCIATION_COPY}
    - */ - public static void objc_setAssociatedObject(@NativeType("id") long object, @NativeType("void const *") long key, @NativeType("id") long value, @NativeType("objc_AssociationPolicy") long policy) { - long __functionAddress = Functions.objc_setAssociatedObject; - if (CHECKS) { - check(object); - check(key); - check(value); - } - invokePPPPV(object, key, value, policy, __functionAddress); - } - - // --- [ objc_getAssociatedObject ] --- - - /** - * Returns the value associated with a given object for a given key. - * - * @param object the source object for the association - * @param key the key for the association - * - * @return the value associated with the key {@code key} for {@code object}. - */ - @NativeType("id") - public static long objc_getAssociatedObject(@NativeType("id") long object, @NativeType("void const *") long key) { - long __functionAddress = Functions.objc_getAssociatedObject; - if (CHECKS) { - check(object); - check(key); - } - return invokePPP(object, key, __functionAddress); - } - - // --- [ objc_removeAssociatedObjects ] --- - - /** - * Removes all associations for a given object. - * - *

    The main purpose of this function is to make it easy to return an object to a "pristine state". You should not use this function for general removal of - * associations from objects, since it also removes associations that other clients may have added to the object. Typically you should use - * {@link #objc_setAssociatedObject} with a {@link #nil} value to clear an association.

    - * - * @param object an object that maintains associated objects - */ - public static void objc_removeAssociatedObjects(@NativeType("id") long object) { - long __functionAddress = Functions.objc_removeAssociatedObjects; - if (CHECKS) { - check(object); - } - invokePV(object, __functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/CRYPTPROTECT_PROMPTSTRUCT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/CRYPTPROTECT_PROMPTSTRUCT.java deleted file mode 100644 index dab5b969..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/CRYPTPROTECT_PROMPTSTRUCT.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Provides the text of a prompt and information about when and where that prompt is to be displayed when using the {@link Crypt32#CryptProtectData} and - * {@link Crypt32#CryptUnprotectData} functions. - * - *

    Layout

    - * - *
    
    - * struct CRYPTPROTECT_PROMPTSTRUCT {
    - *     DWORD {@link #cbSize};
    - *     DWORD {@link #dwPromptFlags};
    - *     HWND {@link #hwndApp};
    - *     LPCWSTR {@link #szPrompt};
    - * }
    - */ -public class CRYPTPROTECT_PROMPTSTRUCT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CBSIZE, - DWPROMPTFLAGS, - HWNDAPP, - SZPROMPT; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CBSIZE = layout.offsetof(0); - DWPROMPTFLAGS = layout.offsetof(1); - HWNDAPP = layout.offsetof(2); - SZPROMPT = layout.offsetof(3); - } - - protected CRYPTPROTECT_PROMPTSTRUCT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected CRYPTPROTECT_PROMPTSTRUCT create(long address, @Nullable ByteBuffer container) { - return new CRYPTPROTECT_PROMPTSTRUCT(address, container); - } - - /** - * Creates a {@code CRYPTPROTECT_PROMPTSTRUCT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public CRYPTPROTECT_PROMPTSTRUCT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the size, in bytes, of this structure */ - @NativeType("DWORD") - public int cbSize() { return ncbSize(address()); } - /** flags that indicate when prompts to the user are to be displayed. One or more of:
    {@link Crypt32#CRYPTPROTECT_PROMPT_ON_UNPROTECT}{@link Crypt32#CRYPTPROTECT_PROMPT_ON_PROTECT}
    */ - @NativeType("DWORD") - public int dwPromptFlags() { return ndwPromptFlags(address()); } - /** window handle to the parent window */ - @NativeType("HWND") - public long hwndApp() { return nhwndApp(address()); } - /** a string containing the text of a prompt to be displayed */ - @NativeType("LPCWSTR") - public ByteBuffer szPrompt() { return nszPrompt(address()); } - /** a string containing the text of a prompt to be displayed */ - @NativeType("LPCWSTR") - public String szPromptString() { return nszPromptString(address()); } - - /** Sets the specified value to the {@link #cbSize} field. */ - public CRYPTPROTECT_PROMPTSTRUCT cbSize(@NativeType("DWORD") int value) { ncbSize(address(), value); return this; } - /** Sets the default value to the {@link #cbSize} field. */ - public CRYPTPROTECT_PROMPTSTRUCT cbSize$Default() { return cbSize(SIZEOF); } - /** Sets the specified value to the {@link #dwPromptFlags} field. */ - public CRYPTPROTECT_PROMPTSTRUCT dwPromptFlags(@NativeType("DWORD") int value) { ndwPromptFlags(address(), value); return this; } - /** Sets the specified value to the {@link #hwndApp} field. */ - public CRYPTPROTECT_PROMPTSTRUCT hwndApp(@NativeType("HWND") long value) { nhwndApp(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@link #szPrompt} field. */ - public CRYPTPROTECT_PROMPTSTRUCT szPrompt(@NativeType("LPCWSTR") ByteBuffer value) { nszPrompt(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public CRYPTPROTECT_PROMPTSTRUCT set( - int cbSize, - int dwPromptFlags, - long hwndApp, - ByteBuffer szPrompt - ) { - cbSize(cbSize); - dwPromptFlags(dwPromptFlags); - hwndApp(hwndApp); - szPrompt(szPrompt); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public CRYPTPROTECT_PROMPTSTRUCT set(CRYPTPROTECT_PROMPTSTRUCT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code CRYPTPROTECT_PROMPTSTRUCT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static CRYPTPROTECT_PROMPTSTRUCT malloc() { - return new CRYPTPROTECT_PROMPTSTRUCT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code CRYPTPROTECT_PROMPTSTRUCT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static CRYPTPROTECT_PROMPTSTRUCT calloc() { - return new CRYPTPROTECT_PROMPTSTRUCT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code CRYPTPROTECT_PROMPTSTRUCT} instance allocated with {@link BufferUtils}. */ - public static CRYPTPROTECT_PROMPTSTRUCT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new CRYPTPROTECT_PROMPTSTRUCT(memAddress(container), container); - } - - /** Returns a new {@code CRYPTPROTECT_PROMPTSTRUCT} instance for the specified memory address. */ - public static CRYPTPROTECT_PROMPTSTRUCT create(long address) { - return new CRYPTPROTECT_PROMPTSTRUCT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static CRYPTPROTECT_PROMPTSTRUCT createSafe(long address) { - return address == NULL ? null : new CRYPTPROTECT_PROMPTSTRUCT(address, null); - } - - /** - * Returns a new {@code CRYPTPROTECT_PROMPTSTRUCT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static CRYPTPROTECT_PROMPTSTRUCT malloc(MemoryStack stack) { - return new CRYPTPROTECT_PROMPTSTRUCT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code CRYPTPROTECT_PROMPTSTRUCT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static CRYPTPROTECT_PROMPTSTRUCT calloc(MemoryStack stack) { - return new CRYPTPROTECT_PROMPTSTRUCT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cbSize}. */ - public static int ncbSize(long struct) { return UNSAFE.getInt(null, struct + CRYPTPROTECT_PROMPTSTRUCT.CBSIZE); } - /** Unsafe version of {@link #dwPromptFlags}. */ - public static int ndwPromptFlags(long struct) { return UNSAFE.getInt(null, struct + CRYPTPROTECT_PROMPTSTRUCT.DWPROMPTFLAGS); } - /** Unsafe version of {@link #hwndApp}. */ - public static long nhwndApp(long struct) { return memGetAddress(struct + CRYPTPROTECT_PROMPTSTRUCT.HWNDAPP); } - /** Unsafe version of {@link #szPrompt}. */ - public static ByteBuffer nszPrompt(long struct) { return memByteBufferNT2(memGetAddress(struct + CRYPTPROTECT_PROMPTSTRUCT.SZPROMPT)); } - /** Unsafe version of {@link #szPromptString}. */ - public static String nszPromptString(long struct) { return memUTF16(memGetAddress(struct + CRYPTPROTECT_PROMPTSTRUCT.SZPROMPT)); } - - /** Unsafe version of {@link #cbSize(int) cbSize}. */ - public static void ncbSize(long struct, int value) { UNSAFE.putInt(null, struct + CRYPTPROTECT_PROMPTSTRUCT.CBSIZE, value); } - /** Unsafe version of {@link #dwPromptFlags(int) dwPromptFlags}. */ - public static void ndwPromptFlags(long struct, int value) { UNSAFE.putInt(null, struct + CRYPTPROTECT_PROMPTSTRUCT.DWPROMPTFLAGS, value); } - /** Unsafe version of {@link #hwndApp(long) hwndApp}. */ - public static void nhwndApp(long struct, long value) { memPutAddress(struct + CRYPTPROTECT_PROMPTSTRUCT.HWNDAPP, check(value)); } - /** Unsafe version of {@link #szPrompt(ByteBuffer) szPrompt}. */ - public static void nszPrompt(long struct, ByteBuffer value) { - if (CHECKS) { checkNT2(value); } - memPutAddress(struct + CRYPTPROTECT_PROMPTSTRUCT.SZPROMPT, memAddress(value)); - } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + CRYPTPROTECT_PROMPTSTRUCT.HWNDAPP)); - check(memGetAddress(struct + CRYPTPROTECT_PROMPTSTRUCT.SZPROMPT)); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/Crypt32.java b/LWJGL/src/main/java/org/lwjgl/system/windows/Crypt32.java deleted file mode 100644 index c3f5756c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/Crypt32.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to {@code dpapi.h} and {@code crypt32.dll}. */ -public class Crypt32 { - - private static final SharedLibrary CRYPT32 = Library.loadNative(Crypt32.class, "org.lwjgl", "crypt32"); - - /** Contains the function pointers loaded from the crypt32 {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - CryptProtectData = apiGetFunctionAddress(CRYPT32, "CryptProtectData"), - CryptProtectMemory = apiGetFunctionAddressOptional(CRYPT32, "CryptProtectMemory"), - CryptUnprotectData = apiGetFunctionAddress(CRYPT32, "CryptUnprotectData"), - CryptUnprotectMemory = apiGetFunctionAddressOptional(CRYPT32, "CryptUnprotectMemory"); - - } - - /** Returns the crypt32 {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return CRYPT32; - } - - /** Flags for the {@code dwFlags} parameter of {@link #CryptProtectData} and/or {@link #CryptUnprotectData}. */ - public static final int - CRYPTPROTECT_UI_FORBIDDEN = 0x1, - CRYPTPROTECT_LOCAL_MACHINE = 0x4, - CRYPTPROTECT_AUDIT = 0x10, - CRYPTPROTECT_VERIFY_PROTECTION = 0x40; - - /** Flags for the {@code dwFlags} parameter of {@link #CryptProtectMemory} and {@link #CryptUnprotectMemory}. */ - public static final int - CRYPTPROTECTMEMORY_SAME_PROCESS = 0x0, - CRYPTPROTECTMEMORY_CROSS_PROCESS = 0x1, - CRYPTPROTECTMEMORY_SAME_LOGON = 0x2; - - /** Flags for the {@code dwPromptFlags} member of {@link DATA_BLOB}. */ - public static final int - CRYPTPROTECT_PROMPT_ON_UNPROTECT = 0x1, - CRYPTPROTECT_PROMPT_ON_PROTECT = 0x2; - - /** The block size for data encrypted via {@link #CryptProtectMemory}. */ - public static final int CRYPTPROTECTMEMORY_BLOCK_SIZE = 16; - - protected Crypt32() { - throw new UnsupportedOperationException(); - } - - // --- [ CryptProtectData ] --- - - /** Unsafe version of: {@link #CryptProtectData} */ - public static native int nCryptProtectData(long pDataIn, long szDataDescr, long pOptionalEntropy, long pvReserved, long pPromptStruct, int dwFlags, long pDataOut, long __functionAddress); - - /** Unsafe version of: {@link #CryptProtectData} */ - public static int nCryptProtectData(long pDataIn, long szDataDescr, long pOptionalEntropy, long pvReserved, long pPromptStruct, int dwFlags, long pDataOut) { - long __functionAddress = Functions.CryptProtectData; - return nCryptProtectData(pDataIn, szDataDescr, pOptionalEntropy, pvReserved, pPromptStruct, dwFlags, pDataOut, __functionAddress); - } - - /** - * The {@code CryptProtectData} function performs encryption on the data in a {@link DATA_BLOB} structure. - * - *

    Typically, only a user with the same logon credential as the user who encrypted the data can decrypt the data. In addition, the encryption and - * decryption usually must be done on the same computer.

    - * - * @param pDataIn a pointer to a {@link DATA_BLOB} structure that contains the plaintext to be encrypted - * @param szDataDescr a string with a readable description of the data to be encrypted. - * - *

    This description string is included with the encrypted data. This parameter is optional and can be set to {@code NULL}.

    - * @param pOptionalEntropy a pointer to a {@link DATA_BLOB} structure that contains a password or other additional entropy used to encrypt the data. - * - *

    The {@code DATA_BLOB} structure used in the encryption phase must also be used in the decryption phase. This parameter can be set to {@code NULL} for no - * additional entropy.

    - * @param pvReserved reserved for future use and must be set to {@code NULL} - * @param pPromptStruct a pointer to a {@link CRYPTPROTECT_PROMPTSTRUCT} structure that provides information about where and when prompts are to be displayed and what the - * content of those prompts should be. - * - *

    This parameter can be set to {@code NULL} in both the encryption and decryption phases.

    - * @param dwFlags one or more of:
    {@link #CRYPTPROTECT_LOCAL_MACHINE},{@link #CRYPTPROTECT_UI_FORBIDDEN},{@link #CRYPTPROTECT_AUDIT}
    - * @param pDataOut a pointer to a {@link DATA_BLOB} structure that receives the encrypted data. - * - *

    When you have finished using the {@code DATA_BLOB} structure, free its {@code pbData} member by calling the {@link WinBase#LocalFree} function.

    - */ - @NativeType("BOOL") - public static boolean CryptProtectData(@NativeType("DATA_BLOB *") DATA_BLOB pDataIn, @Nullable @NativeType("LPCWSTR") ByteBuffer szDataDescr, @Nullable @NativeType("DATA_BLOB *") DATA_BLOB pOptionalEntropy, @NativeType("PVOID") long pvReserved, @Nullable @NativeType("CRYPTPROTECT_PROMPTSTRUCT *") CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, @NativeType("DWORD") int dwFlags, @NativeType("DATA_BLOB *") DATA_BLOB pDataOut) { - if (CHECKS) { - checkNT2Safe(szDataDescr); - } - return nCryptProtectData(pDataIn.address(), memAddressSafe(szDataDescr), memAddressSafe(pOptionalEntropy), pvReserved, memAddressSafe(pPromptStruct), dwFlags, pDataOut.address()) != 0; - } - - /** - * The {@code CryptProtectData} function performs encryption on the data in a {@link DATA_BLOB} structure. - * - *

    Typically, only a user with the same logon credential as the user who encrypted the data can decrypt the data. In addition, the encryption and - * decryption usually must be done on the same computer.

    - * - * @param pDataIn a pointer to a {@link DATA_BLOB} structure that contains the plaintext to be encrypted - * @param szDataDescr a string with a readable description of the data to be encrypted. - * - *

    This description string is included with the encrypted data. This parameter is optional and can be set to {@code NULL}.

    - * @param pOptionalEntropy a pointer to a {@link DATA_BLOB} structure that contains a password or other additional entropy used to encrypt the data. - * - *

    The {@code DATA_BLOB} structure used in the encryption phase must also be used in the decryption phase. This parameter can be set to {@code NULL} for no - * additional entropy.

    - * @param pvReserved reserved for future use and must be set to {@code NULL} - * @param pPromptStruct a pointer to a {@link CRYPTPROTECT_PROMPTSTRUCT} structure that provides information about where and when prompts are to be displayed and what the - * content of those prompts should be. - * - *

    This parameter can be set to {@code NULL} in both the encryption and decryption phases.

    - * @param dwFlags one or more of:
    {@link #CRYPTPROTECT_LOCAL_MACHINE},{@link #CRYPTPROTECT_UI_FORBIDDEN},{@link #CRYPTPROTECT_AUDIT}
    - * @param pDataOut a pointer to a {@link DATA_BLOB} structure that receives the encrypted data. - * - *

    When you have finished using the {@code DATA_BLOB} structure, free its {@code pbData} member by calling the {@link WinBase#LocalFree} function.

    - */ - @NativeType("BOOL") - public static boolean CryptProtectData(@NativeType("DATA_BLOB *") DATA_BLOB pDataIn, @Nullable @NativeType("LPCWSTR") CharSequence szDataDescr, @Nullable @NativeType("DATA_BLOB *") DATA_BLOB pOptionalEntropy, @NativeType("PVOID") long pvReserved, @Nullable @NativeType("CRYPTPROTECT_PROMPTSTRUCT *") CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, @NativeType("DWORD") int dwFlags, @NativeType("DATA_BLOB *") DATA_BLOB pDataOut) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16Safe(szDataDescr, true); - long szDataDescrEncoded = szDataDescr == null ? NULL : stack.getPointerAddress(); - return nCryptProtectData(pDataIn.address(), szDataDescrEncoded, memAddressSafe(pOptionalEntropy), pvReserved, memAddressSafe(pPromptStruct), dwFlags, pDataOut.address()) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ CryptProtectMemory ] --- - - /** - * Unsafe version of: {@link #CryptProtectMemory} - * - * @param cbDataIn number of bytes of memory pointed to by the {@code pData} parameter to encrypt. - * - *

    The number of bytes must be a multiple of the {@link #CRYPTPROTECTMEMORY_BLOCK_SIZE} constant.

    - */ - public static native int nCryptProtectMemory(long pDataIn, int cbDataIn, int dwFlags, long __functionAddress); - - /** - * Unsafe version of: {@link #CryptProtectMemory} - * - * @param cbDataIn number of bytes of memory pointed to by the {@code pData} parameter to encrypt. - * - *

    The number of bytes must be a multiple of the {@link #CRYPTPROTECTMEMORY_BLOCK_SIZE} constant.

    - */ - public static int nCryptProtectMemory(long pDataIn, int cbDataIn, int dwFlags) { - long __functionAddress = Functions.CryptProtectMemory; - if (CHECKS) { - check(__functionAddress); - } - return nCryptProtectMemory(pDataIn, cbDataIn, dwFlags, __functionAddress); - } - - /** - * Encrypts memory to prevent others from viewing sensitive information in your process. - * - *

    For example, use the {@code CryptProtectMemory} function to encrypt memory that contains a password. Encrypting the password prevents others from - * viewing it when the process is paged out to the swap file. Otherwise, the password is in plaintext and viewable by others.

    - * - * @param pDataIn a pointer to the block of memory to encrypt - * @param dwFlags this parameter can be one of the following flags. You must specify the same flag when encrypting and decrypting the memory. One of:
    {@link #CRYPTPROTECTMEMORY_SAME_PROCESS}{@link #CRYPTPROTECTMEMORY_CROSS_PROCESS}
    {@link #CRYPTPROTECTMEMORY_SAME_LOGON}
    - */ - @NativeType("BOOL") - public static boolean CryptProtectMemory(@NativeType("LPVOID") ByteBuffer pDataIn, @NativeType("DWORD") int dwFlags) { - return nCryptProtectMemory(memAddress(pDataIn), pDataIn.remaining(), dwFlags) != 0; - } - - // --- [ CryptUnprotectData ] --- - - /** Unsafe version of: {@link #CryptUnprotectData} */ - public static native int nCryptUnprotectData(long pDataIn, long ppszDataDescr, long pOptionalEntropy, long pvReserved, long pPromptStruct, int dwFlags, long pDataOut, long __functionAddress); - - /** Unsafe version of: {@link #CryptUnprotectData} */ - public static int nCryptUnprotectData(long pDataIn, long ppszDataDescr, long pOptionalEntropy, long pvReserved, long pPromptStruct, int dwFlags, long pDataOut) { - long __functionAddress = Functions.CryptUnprotectData; - return nCryptUnprotectData(pDataIn, ppszDataDescr, pOptionalEntropy, pvReserved, pPromptStruct, dwFlags, pDataOut, __functionAddress); - } - - /** - * The {@code CryptUnprotectData} function decrypts and does an integrity check of the data in a {@link DATA_BLOB} structure. - * - *

    Usually, the only user who can decrypt the data is a user with the same logon credentials as the user who encrypted the data. In addition, the - * encryption and decryption must be done on the same computer.

    - * - * @param pDataIn a pointer to a {@link DATA_BLOB} structure that holds the encrypted data - * @param ppszDataDescr a pointer to a string-readable description of the encrypted data included with the encrypted data. - * - *

    This parameter can be set to {@code NULL}. When you have finished using {@code ppszDataDescr}, free it by calling the {@link WinBase#LocalFree} function.

    - * @param pOptionalEntropy a pointer to a {@link DATA_BLOB} structure that contains a password or other additional entropy used when the data was encrypted. - * - *

    This parameter can be set to {@code NULL}; however, if an optional entropy {@code DATA_BLOB} structure was used in the encryption phase, that same - * {@code DATA_BLOB} structure must be used for the decryption phase.

    - * @param pvReserved reserved for future use and must be set to {@code NULL} - * @param pPromptStruct a pointer to a {@link CRYPTPROTECT_PROMPTSTRUCT} structure that provides information about where and when prompts are to be displayed and what the content - * of those prompts should be. - * - *

    This parameter can be set to {@code NULL}.

    - * @param dwFlags one or more of:
    {@link #CRYPTPROTECT_UI_FORBIDDEN}{@link #CRYPTPROTECT_VERIFY_PROTECTION}
    - * @param pDataOut a pointer to a {@link DATA_BLOB} structure where the function stores the decrypted data. - * - *

    When you have finished using the {@code DATA_BLOB} structure, free its {@code pbData} member by calling the {@link WinBase#LocalFree} function.

    - */ - @NativeType("BOOL") - public static boolean CryptUnprotectData(@NativeType("DATA_BLOB *") DATA_BLOB pDataIn, @Nullable @NativeType("LPWSTR *") PointerBuffer ppszDataDescr, @Nullable @NativeType("DATA_BLOB *") DATA_BLOB pOptionalEntropy, @NativeType("PVOID") long pvReserved, @Nullable @NativeType("CRYPTPROTECT_PROMPTSTRUCT *") CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, @NativeType("DWORD") int dwFlags, @NativeType("DATA_BLOB *") DATA_BLOB pDataOut) { - if (CHECKS) { - checkSafe(ppszDataDescr, 1); - } - return nCryptUnprotectData(pDataIn.address(), memAddressSafe(ppszDataDescr), memAddressSafe(pOptionalEntropy), pvReserved, memAddressSafe(pPromptStruct), dwFlags, pDataOut.address()) != 0; - } - - // --- [ CryptUnprotectMemory ] --- - - /** - * Unsafe version of: {@link #CryptUnprotectMemory} - * - * @param cbDataIn number of bytes of memory pointed to by the {@code pData} parameter to decrypt. - * - *

    The number of bytes must be a multiple of the {@link #CRYPTPROTECTMEMORY_BLOCK_SIZE} constant.

    - */ - public static native int nCryptUnprotectMemory(long pDataIn, int cbDataIn, int dwFlags, long __functionAddress); - - /** - * Unsafe version of: {@link #CryptUnprotectMemory} - * - * @param cbDataIn number of bytes of memory pointed to by the {@code pData} parameter to decrypt. - * - *

    The number of bytes must be a multiple of the {@link #CRYPTPROTECTMEMORY_BLOCK_SIZE} constant.

    - */ - public static int nCryptUnprotectMemory(long pDataIn, int cbDataIn, int dwFlags) { - long __functionAddress = Functions.CryptUnprotectMemory; - if (CHECKS) { - check(__functionAddress); - } - return nCryptUnprotectMemory(pDataIn, cbDataIn, dwFlags, __functionAddress); - } - - /** - * The {@code CryptUnprotectMemory} function decrypts memory that was encrypted using the {@link #CryptProtectMemory} function. - * - * @param pDataIn a pointer to the block of memory to decrypt - * @param dwFlags this parameter can be one of the following flags. You must specify the same flag when encrypting and decrypting the memory. One of:
    {@link #CRYPTPROTECTMEMORY_SAME_PROCESS}{@link #CRYPTPROTECTMEMORY_CROSS_PROCESS}
    {@link #CRYPTPROTECTMEMORY_SAME_LOGON}
    - */ - @NativeType("BOOL") - public static boolean CryptUnprotectMemory(@NativeType("LPVOID") ByteBuffer pDataIn, @NativeType("DWORD") int dwFlags) { - return nCryptUnprotectMemory(memAddress(pDataIn), pDataIn.remaining(), dwFlags) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/DATA_BLOB.java b/LWJGL/src/main/java/org/lwjgl/system/windows/DATA_BLOB.java deleted file mode 100644 index 96fe914f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/DATA_BLOB.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * The {@code DATA_BLOB} structure contains an arbitrary array of bytes. - * - *

    Layout

    - * - *
    
    - * struct DATA_BLOB {
    - *     DWORD {@link #cbData};
    - *     BYTE * {@link #pbData};
    - * }
    - */ -public class DATA_BLOB extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CBDATA, - PBDATA; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CBDATA = layout.offsetof(0); - PBDATA = layout.offsetof(1); - } - - protected DATA_BLOB(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected DATA_BLOB create(long address, @Nullable ByteBuffer container) { - return new DATA_BLOB(address, container); - } - - /** - * Creates a {@code DATA_BLOB} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public DATA_BLOB(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the count, in bytes, of data */ - @NativeType("DWORD") - public int cbData() { return ncbData(address()); } - /** a pointer to the data buffer */ - @NativeType("BYTE *") - public ByteBuffer pbData() { return npbData(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@link #pbData} field. */ - public DATA_BLOB pbData(@NativeType("BYTE *") ByteBuffer value) { npbData(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public DATA_BLOB set(DATA_BLOB src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code DATA_BLOB} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static DATA_BLOB malloc() { - return new DATA_BLOB(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code DATA_BLOB} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static DATA_BLOB calloc() { - return new DATA_BLOB(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code DATA_BLOB} instance allocated with {@link BufferUtils}. */ - public static DATA_BLOB create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new DATA_BLOB(memAddress(container), container); - } - - /** Returns a new {@code DATA_BLOB} instance for the specified memory address. */ - public static DATA_BLOB create(long address) { - return new DATA_BLOB(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static DATA_BLOB createSafe(long address) { - return address == NULL ? null : new DATA_BLOB(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code DATA_BLOB} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static DATA_BLOB malloc(MemoryStack stack) { - return new DATA_BLOB(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code DATA_BLOB} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static DATA_BLOB calloc(MemoryStack stack) { - return new DATA_BLOB(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cbData}. */ - public static int ncbData(long struct) { return UNSAFE.getInt(null, struct + DATA_BLOB.CBDATA); } - /** Unsafe version of {@link #pbData() pbData}. */ - public static ByteBuffer npbData(long struct) { return memByteBuffer(memGetAddress(struct + DATA_BLOB.PBDATA), ncbData(struct)); } - - /** Sets the specified value to the {@code cbData} field of the specified {@code struct}. */ - public static void ncbData(long struct, int value) { UNSAFE.putInt(null, struct + DATA_BLOB.CBDATA, value); } - /** Unsafe version of {@link #pbData(ByteBuffer) pbData}. */ - public static void npbData(long struct, ByteBuffer value) { memPutAddress(struct + DATA_BLOB.PBDATA, memAddress(value)); ncbData(struct, value.remaining()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + DATA_BLOB.PBDATA)); - } - - // ----------------------------------- - - /** An array of {@link DATA_BLOB} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final DATA_BLOB ELEMENT_FACTORY = DATA_BLOB.create(-1L); - - /** - * Creates a new {@code DATA_BLOB.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link DATA_BLOB#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected DATA_BLOB getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link DATA_BLOB#cbData} field. */ - @NativeType("DWORD") - public int cbData() { return DATA_BLOB.ncbData(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@link DATA_BLOB#pbData} field. */ - @NativeType("BYTE *") - public ByteBuffer pbData() { return DATA_BLOB.npbData(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@link DATA_BLOB#pbData} field. */ - public Buffer pbData(@NativeType("BYTE *") ByteBuffer value) { DATA_BLOB.npbData(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/DEVMODE.java b/LWJGL/src/main/java/org/lwjgl/system/windows/DEVMODE.java deleted file mode 100644 index 172c07f5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/DEVMODE.java +++ /dev/null @@ -1,780 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about the initialization and environment of a printer or a display device. - * - *

    Layout

    - * - *
    
    - * struct DEVMODE {
    - *     TCHAR {@link #dmDeviceName}[32];
    - *     WORD {@link #dmSpecVersion};
    - *     WORD {@link #dmDriverVersion};
    - *     WORD {@link #dmSize};
    - *     WORD {@link #dmDriverExtra};
    - *     DWORD {@link #dmFields};
    - *     union {
    - *         struct {
    - *             short {@link #dmOrientation};
    - *             short {@link #dmPaperSize};
    - *             short {@link #dmPaperLength};
    - *             short {@link #dmPaperWidth};
    - *             short {@link #dmScale};
    - *             short {@link #dmCopies};
    - *             short {@link #dmDefaultSource};
    - *             short {@link #dmPrintQuality};
    - *         };
    - *         struct {
    - *             {@link POINTL POINTL} {@link #dmPosition};
    - *             DWORD {@link #dmDisplayOrientation};
    - *             DWORD {@link #dmDisplayFixedOutput};
    - *         };
    - *     };
    - *     short {@link #dmColor};
    - *     short {@link #dmDuplex};
    - *     short {@link #dmYResolution};
    - *     short {@link #dmTTOption};
    - *     short {@link #dmCollate};
    - *     TCHAR {@link #dmFormName}[32];
    - *     WORD {@link #dmLogPixels};
    - *     DWORD {@link #dmBitsPerPel};
    - *     DWORD {@link #dmPelsWidth};
    - *     DWORD {@link #dmPelsHeight};
    - *     union {
    - *         DWORD {@link #dmDisplayFlags};
    - *         DWORD {@link #dmNup};
    - *     };
    - *     DWORD {@link #dmDisplayFrequency};
    - *     DWORD {@link #dmICMMethod};
    - *     DWORD {@link #dmICMIntent};
    - *     DWORD {@link #dmMediaType};
    - *     DWORD {@link #dmDitherType};
    - *     DWORD {@link #dmReserved1};
    - *     DWORD {@link #dmReserved2};
    - *     DWORD {@link #dmPanningWidth};
    - *     DWORD {@link #dmPanningHeight};
    - * }
    - */ -public class DEVMODE extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - DMDEVICENAME, - DMSPECVERSION, - DMDRIVERVERSION, - DMSIZE, - DMDRIVEREXTRA, - DMFIELDS, - DMORIENTATION, - DMPAPERSIZE, - DMPAPERLENGTH, - DMPAPERWIDTH, - DMSCALE, - DMCOPIES, - DMDEFAULTSOURCE, - DMPRINTQUALITY, - DMPOSITION, - DMDISPLAYORIENTATION, - DMDISPLAYFIXEDOUTPUT, - DMCOLOR, - DMDUPLEX, - DMYRESOLUTION, - DMTTOPTION, - DMCOLLATE, - DMFORMNAME, - DMLOGPIXELS, - DMBITSPERPEL, - DMPELSWIDTH, - DMPELSHEIGHT, - DMDISPLAYFLAGS, - DMNUP, - DMDISPLAYFREQUENCY, - DMICMMETHOD, - DMICMINTENT, - DMMEDIATYPE, - DMDITHERTYPE, - DMRESERVED1, - DMRESERVED2, - DMPANNINGWIDTH, - DMPANNINGHEIGHT; - - static { - Layout layout = __struct( - __array(2, 32), - __member(2), - __member(2), - __member(2), - __member(2), - __member(4), - __union( - __struct( - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2) - ), - __struct( - __member(POINTL.SIZEOF, POINTL.ALIGNOF), - __member(4), - __member(4) - ) - ), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __array(2, 32), - __member(2), - __member(4), - __member(4), - __member(4), - __union( - __member(4), - __member(4) - ), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - DMDEVICENAME = layout.offsetof(0); - DMSPECVERSION = layout.offsetof(1); - DMDRIVERVERSION = layout.offsetof(2); - DMSIZE = layout.offsetof(3); - DMDRIVEREXTRA = layout.offsetof(4); - DMFIELDS = layout.offsetof(5); - DMORIENTATION = layout.offsetof(8); - DMPAPERSIZE = layout.offsetof(9); - DMPAPERLENGTH = layout.offsetof(10); - DMPAPERWIDTH = layout.offsetof(11); - DMSCALE = layout.offsetof(12); - DMCOPIES = layout.offsetof(13); - DMDEFAULTSOURCE = layout.offsetof(14); - DMPRINTQUALITY = layout.offsetof(15); - DMPOSITION = layout.offsetof(17); - DMDISPLAYORIENTATION = layout.offsetof(18); - DMDISPLAYFIXEDOUTPUT = layout.offsetof(19); - DMCOLOR = layout.offsetof(20); - DMDUPLEX = layout.offsetof(21); - DMYRESOLUTION = layout.offsetof(22); - DMTTOPTION = layout.offsetof(23); - DMCOLLATE = layout.offsetof(24); - DMFORMNAME = layout.offsetof(25); - DMLOGPIXELS = layout.offsetof(26); - DMBITSPERPEL = layout.offsetof(27); - DMPELSWIDTH = layout.offsetof(28); - DMPELSHEIGHT = layout.offsetof(29); - DMDISPLAYFLAGS = layout.offsetof(31); - DMNUP = layout.offsetof(32); - DMDISPLAYFREQUENCY = layout.offsetof(33); - DMICMMETHOD = layout.offsetof(34); - DMICMINTENT = layout.offsetof(35); - DMMEDIATYPE = layout.offsetof(36); - DMDITHERTYPE = layout.offsetof(37); - DMRESERVED1 = layout.offsetof(38); - DMRESERVED2 = layout.offsetof(39); - DMPANNINGWIDTH = layout.offsetof(40); - DMPANNINGHEIGHT = layout.offsetof(41); - } - - protected DEVMODE(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected DEVMODE create(long address, @Nullable ByteBuffer container) { - return new DEVMODE(address, container); - } - - /** - * Creates a {@code DEVMODE} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public DEVMODE(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * A zero-terminated character array that specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP - * LaserJet. This string is unique among device drivers. Note that this name may be truncated to fit in the {@code dmDeviceName} array. - */ - @NativeType("TCHAR[32]") - public ByteBuffer dmDeviceName() { return ndmDeviceName(address()); } - /** - * A zero-terminated character array that specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP - * LaserJet. This string is unique among device drivers. Note that this name may be truncated to fit in the {@code dmDeviceName} array. - */ - @NativeType("TCHAR[32]") - public String dmDeviceNameString() { return ndmDeviceNameString(address()); } - /** - * the version number of the initialization data specification on which the structure is based. To ensure the correct version is used for any operating - * system, use {@link GDI32#DM_SPECVERSION}. - */ - @NativeType("WORD") - public short dmSpecVersion() { return ndmSpecVersion(address()); } - /** the driver version number assigned by the driver developer */ - @NativeType("WORD") - public short dmDriverVersion() { return ndmDriverVersion(address()); } - /** - * specifies the size, in bytes, of the {@code DEVMODE} structure, not including any private driver-specific data that might follow the structure's - * public members. Set this member to {@link #SIZEOF} to indicate the version of the {@code DEVMODE} structure being used. - */ - @NativeType("WORD") - public short dmSize() { return ndmSize(address()); } - /** - * contains the number of bytes of private driver-data that follow this structure. If a device driver does not use device-specific information, set this - * member to zero. - */ - @NativeType("WORD") - public short dmDriverExtra() { return ndmDriverExtra(address()); } - /** - * specifies whether certain members of the {@code DEVMODE} structure have been initialized. If a member is initialized, its corresponding bit is set - * otherwise the bit is clear. A driver supports only those {@code DEVMODE} members that are appropriate for the printer or display technology. - */ - @NativeType("DWORD") - public int dmFields() { return ndmFields(address()); } - /** for printer devices only */ - public short dmOrientation() { return ndmOrientation(address()); } - /** for printer devices only */ - public short dmPaperSize() { return ndmPaperSize(address()); } - /** for printer devices only */ - public short dmPaperLength() { return ndmPaperLength(address()); } - /** for printer devices only */ - public short dmPaperWidth() { return ndmPaperWidth(address()); } - /** for printer devices only */ - public short dmScale() { return ndmScale(address()); } - /** for printer devices only */ - public short dmCopies() { return ndmCopies(address()); } - /** for printer devices only */ - public short dmDefaultSource() { return ndmDefaultSource(address()); } - /** for printer devices only */ - public short dmPrintQuality() { return ndmPrintQuality(address()); } - /** - * for display devices only, a {@link POINTL} structure that indicates the positional coordinates of the display device in reference to the desktop - * area. The primary display device is always located at coordinates (0,0). - */ - public POINTL dmPosition() { return ndmPosition(address()); } - /** - * for display devices only, the orientation at which images should be presented. If {@link GDI32#DM_DISPLAYORIENTATION} is not set, this member must be - * zero. If {@link GDI32#DM_DISPLAYORIENTATION} is set, this member must be one of the following values:
    {@link GDI32#DMDO_DEFAULT}, {@link GDI32#DMDO_90}, {@link GDI32#DMDO_180}, {@link GDI32#DMDO_270} - * - *

    To determine whether the display orientation is portrait or landscape orientation, check the ratio of {@code dmPelsWidth} to - * {@code dmPelsHeight}.

    - */ - @NativeType("DWORD") - public int dmDisplayOrientation() { return ndmDisplayOrientation(address()); } - /** - * for fixed-resolution display devices only, how the display presents a low-resolution mode on a higher-resolution display. For example, if a - * display device's resolution is fixed at 1024 x 768 pixels but its mode is set to 640 x 480 pixels, the device can either display a 640 x 480 - * image somewhere in the interior of the 1024 x 768 screen space or stretch the 640 x 480 image to fill the larger screen space. If - * {@link GDI32#DM_DISPLAYFIXEDOUTPUT} is not set, this member must be zero. If {@link GDI32#DM_DISPLAYFIXEDOUTPUT} is set, this member must be one of the - * following values:
    {@link GDI32#DMDFO_DEFAULT}, {@link GDI32#DMDFO_CENTER}, {@link GDI32#DMDFO_STRETCH} - */ - @NativeType("DWORD") - public int dmDisplayFixedOutput() { return ndmDisplayFixedOutput(address()); } - /** for printer devices only */ - public short dmColor() { return ndmColor(address()); } - /** for printer devices only */ - public short dmDuplex() { return ndmDuplex(address()); } - /** for printer devices only */ - public short dmYResolution() { return ndmYResolution(address()); } - /** for printer devices only */ - public short dmTTOption() { return ndmTTOption(address()); } - /** for printer devices only */ - public short dmCollate() { return ndmCollate(address()); } - /** for printer devices only */ - @NativeType("TCHAR[32]") - public ByteBuffer dmFormName() { return ndmFormName(address()); } - /** for printer devices only */ - @NativeType("TCHAR[32]") - public String dmFormNameString() { return ndmFormNameString(address()); } - /** the number of pixels per logical inch */ - @NativeType("WORD") - public short dmLogPixels() { return ndmLogPixels(address()); } - /** - * specifies the color resolution, in bits per pixel, of the display device (for example: 4 bits for 16 colors, 8 bits for 256 colors, or 16 bits for - * 65,536 colors) - */ - @NativeType("DWORD") - public int dmBitsPerPel() { return ndmBitsPerPel(address()); } - /** specifies the width, in pixels, of the visible device surface */ - @NativeType("DWORD") - public int dmPelsWidth() { return ndmPelsWidth(address()); } - /** specifies the height, in pixels, of the visible device surface */ - @NativeType("DWORD") - public int dmPelsHeight() { return ndmPelsHeight(address()); } - /** specifies the device's display mode, one or more of:
    {@link GDI32#DM_INTERLACED}, {@link GDI32#DMDISPLAYFLAGS_TEXTMODE} */ - @NativeType("DWORD") - public int dmDisplayFlags() { return ndmDisplayFlags(address()); } - /** for printer devices only */ - @NativeType("DWORD") - public int dmNup() { return ndmNup(address()); } - /** - * specifies the frequency, in hertz (cycles per second), of the display device in a particular mode. This value is also known as the display device's - * vertical refresh rate. - * - *

    When you call the {@link User32#EnumDisplaySettingsEx} function, the {@code dmDisplayFrequency} member may return with the value 0 or 1. These values - * represent the display hardware's default refresh rate. This default rate is typically set by switches on a display card or computer motherboard, or by - * a configuration program that does not use display functions such as {@code ChangeDisplaySettingsEx}.

    - */ - @NativeType("DWORD") - public int dmDisplayFrequency() { return ndmDisplayFrequency(address()); } - /** for printer devices only */ - @NativeType("DWORD") - public int dmICMMethod() { return ndmICMMethod(address()); } - /** for printer devices only */ - @NativeType("DWORD") - public int dmICMIntent() { return ndmICMIntent(address()); } - /** for printer devices only */ - @NativeType("DWORD") - public int dmMediaType() { return ndmMediaType(address()); } - /** for printer devices only */ - @NativeType("DWORD") - public int dmDitherType() { return ndmDitherType(address()); } - /** not used; must be zero */ - @NativeType("DWORD") - public int dmReserved1() { return ndmReserved1(address()); } - /** not used; must be zero */ - @NativeType("DWORD") - public int dmReserved2() { return ndmReserved2(address()); } - /** this member must be zero */ - @NativeType("DWORD") - public int dmPanningWidth() { return ndmPanningWidth(address()); } - /** this member must be zero */ - @NativeType("DWORD") - public int dmPanningHeight() { return ndmPanningHeight(address()); } - - /** Sets the specified value to the {@link #dmSpecVersion} field. */ - public DEVMODE dmSpecVersion(@NativeType("WORD") short value) { ndmSpecVersion(address(), value); return this; } - /** Sets the specified value to the {@link #dmSize} field. */ - public DEVMODE dmSize(@NativeType("WORD") short value) { ndmSize(address(), value); return this; } - /** Sets the specified value to the {@link #dmDriverExtra} field. */ - public DEVMODE dmDriverExtra(@NativeType("WORD") short value) { ndmDriverExtra(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public DEVMODE set(DEVMODE src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code DEVMODE} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static DEVMODE malloc() { - return new DEVMODE(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code DEVMODE} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static DEVMODE calloc() { - return new DEVMODE(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code DEVMODE} instance allocated with {@link BufferUtils}. */ - public static DEVMODE create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new DEVMODE(memAddress(container), container); - } - - /** Returns a new {@code DEVMODE} instance for the specified memory address. */ - public static DEVMODE create(long address) { - return new DEVMODE(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static DEVMODE createSafe(long address) { - return address == NULL ? null : new DEVMODE(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static DEVMODE mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static DEVMODE callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static DEVMODE mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static DEVMODE callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code DEVMODE} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static DEVMODE malloc(MemoryStack stack) { - return new DEVMODE(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code DEVMODE} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static DEVMODE calloc(MemoryStack stack) { - return new DEVMODE(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #dmDeviceName}. */ - public static ByteBuffer ndmDeviceName(long struct) { return memByteBuffer(struct + DEVMODE.DMDEVICENAME, 32 * 2); } - /** Unsafe version of {@link #dmDeviceNameString}. */ - public static String ndmDeviceNameString(long struct) { return memUTF16(struct + DEVMODE.DMDEVICENAME); } - /** Unsafe version of {@link #dmSpecVersion}. */ - public static short ndmSpecVersion(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMSPECVERSION); } - /** Unsafe version of {@link #dmDriverVersion}. */ - public static short ndmDriverVersion(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMDRIVERVERSION); } - /** Unsafe version of {@link #dmSize}. */ - public static short ndmSize(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMSIZE); } - /** Unsafe version of {@link #dmDriverExtra}. */ - public static short ndmDriverExtra(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMDRIVEREXTRA); } - /** Unsafe version of {@link #dmFields}. */ - public static int ndmFields(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMFIELDS); } - /** Unsafe version of {@link #dmOrientation}. */ - public static short ndmOrientation(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMORIENTATION); } - /** Unsafe version of {@link #dmPaperSize}. */ - public static short ndmPaperSize(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMPAPERSIZE); } - /** Unsafe version of {@link #dmPaperLength}. */ - public static short ndmPaperLength(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMPAPERLENGTH); } - /** Unsafe version of {@link #dmPaperWidth}. */ - public static short ndmPaperWidth(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMPAPERWIDTH); } - /** Unsafe version of {@link #dmScale}. */ - public static short ndmScale(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMSCALE); } - /** Unsafe version of {@link #dmCopies}. */ - public static short ndmCopies(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMCOPIES); } - /** Unsafe version of {@link #dmDefaultSource}. */ - public static short ndmDefaultSource(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMDEFAULTSOURCE); } - /** Unsafe version of {@link #dmPrintQuality}. */ - public static short ndmPrintQuality(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMPRINTQUALITY); } - /** Unsafe version of {@link #dmPosition}. */ - public static POINTL ndmPosition(long struct) { return POINTL.create(struct + DEVMODE.DMPOSITION); } - /** Unsafe version of {@link #dmDisplayOrientation}. */ - public static int ndmDisplayOrientation(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMDISPLAYORIENTATION); } - /** Unsafe version of {@link #dmDisplayFixedOutput}. */ - public static int ndmDisplayFixedOutput(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMDISPLAYFIXEDOUTPUT); } - /** Unsafe version of {@link #dmColor}. */ - public static short ndmColor(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMCOLOR); } - /** Unsafe version of {@link #dmDuplex}. */ - public static short ndmDuplex(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMDUPLEX); } - /** Unsafe version of {@link #dmYResolution}. */ - public static short ndmYResolution(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMYRESOLUTION); } - /** Unsafe version of {@link #dmTTOption}. */ - public static short ndmTTOption(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMTTOPTION); } - /** Unsafe version of {@link #dmCollate}. */ - public static short ndmCollate(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMCOLLATE); } - /** Unsafe version of {@link #dmFormName}. */ - public static ByteBuffer ndmFormName(long struct) { return memByteBuffer(struct + DEVMODE.DMFORMNAME, 32 * 2); } - /** Unsafe version of {@link #dmFormNameString}. */ - public static String ndmFormNameString(long struct) { return memUTF16(struct + DEVMODE.DMFORMNAME); } - /** Unsafe version of {@link #dmLogPixels}. */ - public static short ndmLogPixels(long struct) { return UNSAFE.getShort(null, struct + DEVMODE.DMLOGPIXELS); } - /** Unsafe version of {@link #dmBitsPerPel}. */ - public static int ndmBitsPerPel(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMBITSPERPEL); } - /** Unsafe version of {@link #dmPelsWidth}. */ - public static int ndmPelsWidth(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMPELSWIDTH); } - /** Unsafe version of {@link #dmPelsHeight}. */ - public static int ndmPelsHeight(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMPELSHEIGHT); } - /** Unsafe version of {@link #dmDisplayFlags}. */ - public static int ndmDisplayFlags(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMDISPLAYFLAGS); } - /** Unsafe version of {@link #dmNup}. */ - public static int ndmNup(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMNUP); } - /** Unsafe version of {@link #dmDisplayFrequency}. */ - public static int ndmDisplayFrequency(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMDISPLAYFREQUENCY); } - /** Unsafe version of {@link #dmICMMethod}. */ - public static int ndmICMMethod(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMICMMETHOD); } - /** Unsafe version of {@link #dmICMIntent}. */ - public static int ndmICMIntent(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMICMINTENT); } - /** Unsafe version of {@link #dmMediaType}. */ - public static int ndmMediaType(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMMEDIATYPE); } - /** Unsafe version of {@link #dmDitherType}. */ - public static int ndmDitherType(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMDITHERTYPE); } - /** Unsafe version of {@link #dmReserved1}. */ - public static int ndmReserved1(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMRESERVED1); } - /** Unsafe version of {@link #dmReserved2}. */ - public static int ndmReserved2(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMRESERVED2); } - /** Unsafe version of {@link #dmPanningWidth}. */ - public static int ndmPanningWidth(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMPANNINGWIDTH); } - /** Unsafe version of {@link #dmPanningHeight}. */ - public static int ndmPanningHeight(long struct) { return UNSAFE.getInt(null, struct + DEVMODE.DMPANNINGHEIGHT); } - - /** Unsafe version of {@link #dmSpecVersion(short) dmSpecVersion}. */ - public static void ndmSpecVersion(long struct, short value) { UNSAFE.putShort(null, struct + DEVMODE.DMSPECVERSION, value); } - /** Unsafe version of {@link #dmSize(short) dmSize}. */ - public static void ndmSize(long struct, short value) { UNSAFE.putShort(null, struct + DEVMODE.DMSIZE, value); } - /** Unsafe version of {@link #dmDriverExtra(short) dmDriverExtra}. */ - public static void ndmDriverExtra(long struct, short value) { UNSAFE.putShort(null, struct + DEVMODE.DMDRIVEREXTRA, value); } - - // ----------------------------------- - - /** An array of {@link DEVMODE} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final DEVMODE ELEMENT_FACTORY = DEVMODE.create(-1L); - - /** - * Creates a new {@code DEVMODE.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link DEVMODE#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected DEVMODE getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the {@link DEVMODE#dmDeviceName} field. */ - @NativeType("TCHAR[32]") - public ByteBuffer dmDeviceName() { return DEVMODE.ndmDeviceName(address()); } - /** @return the null-terminated string stored in the {@link DEVMODE#dmDeviceName} field. */ - @NativeType("TCHAR[32]") - public String dmDeviceNameString() { return DEVMODE.ndmDeviceNameString(address()); } - /** @return the value of the {@link DEVMODE#dmSpecVersion} field. */ - @NativeType("WORD") - public short dmSpecVersion() { return DEVMODE.ndmSpecVersion(address()); } - /** @return the value of the {@link DEVMODE#dmDriverVersion} field. */ - @NativeType("WORD") - public short dmDriverVersion() { return DEVMODE.ndmDriverVersion(address()); } - /** @return the value of the {@link DEVMODE#dmSize} field. */ - @NativeType("WORD") - public short dmSize() { return DEVMODE.ndmSize(address()); } - /** @return the value of the {@link DEVMODE#dmDriverExtra} field. */ - @NativeType("WORD") - public short dmDriverExtra() { return DEVMODE.ndmDriverExtra(address()); } - /** @return the value of the {@link DEVMODE#dmFields} field. */ - @NativeType("DWORD") - public int dmFields() { return DEVMODE.ndmFields(address()); } - /** @return the value of the {@link DEVMODE#dmOrientation} field. */ - public short dmOrientation() { return DEVMODE.ndmOrientation(address()); } - /** @return the value of the {@link DEVMODE#dmPaperSize} field. */ - public short dmPaperSize() { return DEVMODE.ndmPaperSize(address()); } - /** @return the value of the {@link DEVMODE#dmPaperLength} field. */ - public short dmPaperLength() { return DEVMODE.ndmPaperLength(address()); } - /** @return the value of the {@link DEVMODE#dmPaperWidth} field. */ - public short dmPaperWidth() { return DEVMODE.ndmPaperWidth(address()); } - /** @return the value of the {@link DEVMODE#dmScale} field. */ - public short dmScale() { return DEVMODE.ndmScale(address()); } - /** @return the value of the {@link DEVMODE#dmCopies} field. */ - public short dmCopies() { return DEVMODE.ndmCopies(address()); } - /** @return the value of the {@link DEVMODE#dmDefaultSource} field. */ - public short dmDefaultSource() { return DEVMODE.ndmDefaultSource(address()); } - /** @return the value of the {@link DEVMODE#dmPrintQuality} field. */ - public short dmPrintQuality() { return DEVMODE.ndmPrintQuality(address()); } - /** @return a {@link POINTL} view of the {@link DEVMODE#dmPosition} field. */ - public POINTL dmPosition() { return DEVMODE.ndmPosition(address()); } - /** @return the value of the {@link DEVMODE#dmDisplayOrientation} field. */ - @NativeType("DWORD") - public int dmDisplayOrientation() { return DEVMODE.ndmDisplayOrientation(address()); } - /** @return the value of the {@link DEVMODE#dmDisplayFixedOutput} field. */ - @NativeType("DWORD") - public int dmDisplayFixedOutput() { return DEVMODE.ndmDisplayFixedOutput(address()); } - /** @return the value of the {@link DEVMODE#dmColor} field. */ - public short dmColor() { return DEVMODE.ndmColor(address()); } - /** @return the value of the {@link DEVMODE#dmDuplex} field. */ - public short dmDuplex() { return DEVMODE.ndmDuplex(address()); } - /** @return the value of the {@link DEVMODE#dmYResolution} field. */ - public short dmYResolution() { return DEVMODE.ndmYResolution(address()); } - /** @return the value of the {@link DEVMODE#dmTTOption} field. */ - public short dmTTOption() { return DEVMODE.ndmTTOption(address()); } - /** @return the value of the {@link DEVMODE#dmCollate} field. */ - public short dmCollate() { return DEVMODE.ndmCollate(address()); } - /** @return a {@link ByteBuffer} view of the {@link DEVMODE#dmFormName} field. */ - @NativeType("TCHAR[32]") - public ByteBuffer dmFormName() { return DEVMODE.ndmFormName(address()); } - /** @return the null-terminated string stored in the {@link DEVMODE#dmFormName} field. */ - @NativeType("TCHAR[32]") - public String dmFormNameString() { return DEVMODE.ndmFormNameString(address()); } - /** @return the value of the {@link DEVMODE#dmLogPixels} field. */ - @NativeType("WORD") - public short dmLogPixels() { return DEVMODE.ndmLogPixels(address()); } - /** @return the value of the {@link DEVMODE#dmBitsPerPel} field. */ - @NativeType("DWORD") - public int dmBitsPerPel() { return DEVMODE.ndmBitsPerPel(address()); } - /** @return the value of the {@link DEVMODE#dmPelsWidth} field. */ - @NativeType("DWORD") - public int dmPelsWidth() { return DEVMODE.ndmPelsWidth(address()); } - /** @return the value of the {@link DEVMODE#dmPelsHeight} field. */ - @NativeType("DWORD") - public int dmPelsHeight() { return DEVMODE.ndmPelsHeight(address()); } - /** @return the value of the {@link DEVMODE#dmDisplayFlags} field. */ - @NativeType("DWORD") - public int dmDisplayFlags() { return DEVMODE.ndmDisplayFlags(address()); } - /** @return the value of the {@link DEVMODE#dmNup} field. */ - @NativeType("DWORD") - public int dmNup() { return DEVMODE.ndmNup(address()); } - /** @return the value of the {@link DEVMODE#dmDisplayFrequency} field. */ - @NativeType("DWORD") - public int dmDisplayFrequency() { return DEVMODE.ndmDisplayFrequency(address()); } - /** @return the value of the {@link DEVMODE#dmICMMethod} field. */ - @NativeType("DWORD") - public int dmICMMethod() { return DEVMODE.ndmICMMethod(address()); } - /** @return the value of the {@link DEVMODE#dmICMIntent} field. */ - @NativeType("DWORD") - public int dmICMIntent() { return DEVMODE.ndmICMIntent(address()); } - /** @return the value of the {@link DEVMODE#dmMediaType} field. */ - @NativeType("DWORD") - public int dmMediaType() { return DEVMODE.ndmMediaType(address()); } - /** @return the value of the {@link DEVMODE#dmDitherType} field. */ - @NativeType("DWORD") - public int dmDitherType() { return DEVMODE.ndmDitherType(address()); } - /** @return the value of the {@link DEVMODE#dmReserved1} field. */ - @NativeType("DWORD") - public int dmReserved1() { return DEVMODE.ndmReserved1(address()); } - /** @return the value of the {@link DEVMODE#dmReserved2} field. */ - @NativeType("DWORD") - public int dmReserved2() { return DEVMODE.ndmReserved2(address()); } - /** @return the value of the {@link DEVMODE#dmPanningWidth} field. */ - @NativeType("DWORD") - public int dmPanningWidth() { return DEVMODE.ndmPanningWidth(address()); } - /** @return the value of the {@link DEVMODE#dmPanningHeight} field. */ - @NativeType("DWORD") - public int dmPanningHeight() { return DEVMODE.ndmPanningHeight(address()); } - - /** Sets the specified value to the {@link DEVMODE#dmSpecVersion} field. */ - public Buffer dmSpecVersion(@NativeType("WORD") short value) { DEVMODE.ndmSpecVersion(address(), value); return this; } - /** Sets the specified value to the {@link DEVMODE#dmSize} field. */ - public Buffer dmSize(@NativeType("WORD") short value) { DEVMODE.ndmSize(address(), value); return this; } - /** Sets the specified value to the {@link DEVMODE#dmDriverExtra} field. */ - public Buffer dmDriverExtra(@NativeType("WORD") short value) { DEVMODE.ndmDriverExtra(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/DISPLAY_DEVICE.java b/LWJGL/src/main/java/org/lwjgl/system/windows/DISPLAY_DEVICE.java deleted file mode 100644 index 8addcb4b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/DISPLAY_DEVICE.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Receives information about the display device specified by the {@code iDevNum} parameter of the {@link User32#EnumDisplayDevices} function. - * - *

    The four string members are set based on the parameters passed to {@code EnumDisplayDevices}. If the {@code lpDevice} param is {@code NULL}, then - * {@code DISPLAY_DEVICE} is filled in with information about the display adapter(s). If it is a valid device name, then it is filled in with information - * about the monitor(s) for that device.

    - * - *

    Layout

    - * - *
    
    - * struct DISPLAY_DEVICE {
    - *     DWORD {@link #cb};
    - *     TCHAR {@link #DeviceName}[32];
    - *     TCHAR {@link #DeviceString}[128];
    - *     DWORD {@link #StateFlags};
    - *     TCHAR {@link #DeviceID}[128];
    - *     TCHAR {@link #DeviceKey}[128];
    - * }
    - */ -public class DISPLAY_DEVICE extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CB, - DEVICENAME, - DEVICESTRING, - STATEFLAGS, - DEVICEID, - DEVICEKEY; - - static { - Layout layout = __struct( - __member(4), - __array(2, 32), - __array(2, 128), - __member(4), - __array(2, 128), - __array(2, 128) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CB = layout.offsetof(0); - DEVICENAME = layout.offsetof(1); - DEVICESTRING = layout.offsetof(2); - STATEFLAGS = layout.offsetof(3); - DEVICEID = layout.offsetof(4); - DEVICEKEY = layout.offsetof(5); - } - - protected DISPLAY_DEVICE(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected DISPLAY_DEVICE create(long address, @Nullable ByteBuffer container) { - return new DISPLAY_DEVICE(address, container); - } - - /** - * Creates a {@code DISPLAY_DEVICE} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public DISPLAY_DEVICE(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** size, in bytes, of the {@code DISPLAY_DEVICE} structure. This must be initialized prior to calling {@link User32#EnumDisplayDevices}. */ - @NativeType("DWORD") - public int cb() { return ncb(address()); } - /** an array of characters identifying the device name. This is either the adapter device or the monitor device. */ - @NativeType("TCHAR[32]") - public ByteBuffer DeviceName() { return nDeviceName(address()); } - /** an array of characters identifying the device name. This is either the adapter device or the monitor device. */ - @NativeType("TCHAR[32]") - public String DeviceNameString() { return nDeviceNameString(address()); } - /** an array of characters containing the device context string. This is either a description of the display adapter or of the display monitor. */ - @NativeType("TCHAR[128]") - public ByteBuffer DeviceString() { return nDeviceString(address()); } - /** an array of characters containing the device context string. This is either a description of the display adapter or of the display monitor. */ - @NativeType("TCHAR[128]") - public String DeviceStringString() { return nDeviceStringString(address()); } - /** device state flags */ - @NativeType("DWORD") - public int StateFlags() { return nStateFlags(address()); } - /** not used */ - @NativeType("TCHAR[128]") - public ByteBuffer DeviceID() { return nDeviceID(address()); } - /** not used */ - @NativeType("TCHAR[128]") - public String DeviceIDString() { return nDeviceIDString(address()); } - /** reserved */ - @NativeType("TCHAR[128]") - public ByteBuffer DeviceKey() { return nDeviceKey(address()); } - /** reserved */ - @NativeType("TCHAR[128]") - public String DeviceKeyString() { return nDeviceKeyString(address()); } - - /** Sets the specified value to the {@link #cb} field. */ - public DISPLAY_DEVICE cb(@NativeType("DWORD") int value) { ncb(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public DISPLAY_DEVICE set(DISPLAY_DEVICE src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code DISPLAY_DEVICE} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static DISPLAY_DEVICE malloc() { - return new DISPLAY_DEVICE(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code DISPLAY_DEVICE} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static DISPLAY_DEVICE calloc() { - return new DISPLAY_DEVICE(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code DISPLAY_DEVICE} instance allocated with {@link BufferUtils}. */ - public static DISPLAY_DEVICE create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new DISPLAY_DEVICE(memAddress(container), container); - } - - /** Returns a new {@code DISPLAY_DEVICE} instance for the specified memory address. */ - public static DISPLAY_DEVICE create(long address) { - return new DISPLAY_DEVICE(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static DISPLAY_DEVICE createSafe(long address) { - return address == NULL ? null : new DISPLAY_DEVICE(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static DISPLAY_DEVICE mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static DISPLAY_DEVICE callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static DISPLAY_DEVICE mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static DISPLAY_DEVICE callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code DISPLAY_DEVICE} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static DISPLAY_DEVICE malloc(MemoryStack stack) { - return new DISPLAY_DEVICE(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code DISPLAY_DEVICE} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static DISPLAY_DEVICE calloc(MemoryStack stack) { - return new DISPLAY_DEVICE(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cb}. */ - public static int ncb(long struct) { return UNSAFE.getInt(null, struct + DISPLAY_DEVICE.CB); } - /** Unsafe version of {@link #DeviceName}. */ - public static ByteBuffer nDeviceName(long struct) { return memByteBuffer(struct + DISPLAY_DEVICE.DEVICENAME, 32 * 2); } - /** Unsafe version of {@link #DeviceNameString}. */ - public static String nDeviceNameString(long struct) { return memUTF16(struct + DISPLAY_DEVICE.DEVICENAME); } - /** Unsafe version of {@link #DeviceString}. */ - public static ByteBuffer nDeviceString(long struct) { return memByteBuffer(struct + DISPLAY_DEVICE.DEVICESTRING, 128 * 2); } - /** Unsafe version of {@link #DeviceStringString}. */ - public static String nDeviceStringString(long struct) { return memUTF16(struct + DISPLAY_DEVICE.DEVICESTRING); } - /** Unsafe version of {@link #StateFlags}. */ - public static int nStateFlags(long struct) { return UNSAFE.getInt(null, struct + DISPLAY_DEVICE.STATEFLAGS); } - /** Unsafe version of {@link #DeviceID}. */ - public static ByteBuffer nDeviceID(long struct) { return memByteBuffer(struct + DISPLAY_DEVICE.DEVICEID, 128 * 2); } - /** Unsafe version of {@link #DeviceIDString}. */ - public static String nDeviceIDString(long struct) { return memUTF16(struct + DISPLAY_DEVICE.DEVICEID); } - /** Unsafe version of {@link #DeviceKey}. */ - public static ByteBuffer nDeviceKey(long struct) { return memByteBuffer(struct + DISPLAY_DEVICE.DEVICEKEY, 128 * 2); } - /** Unsafe version of {@link #DeviceKeyString}. */ - public static String nDeviceKeyString(long struct) { return memUTF16(struct + DISPLAY_DEVICE.DEVICEKEY); } - - /** Unsafe version of {@link #cb(int) cb}. */ - public static void ncb(long struct, int value) { UNSAFE.putInt(null, struct + DISPLAY_DEVICE.CB, value); } - - // ----------------------------------- - - /** An array of {@link DISPLAY_DEVICE} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final DISPLAY_DEVICE ELEMENT_FACTORY = DISPLAY_DEVICE.create(-1L); - - /** - * Creates a new {@code DISPLAY_DEVICE.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link DISPLAY_DEVICE#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected DISPLAY_DEVICE getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link DISPLAY_DEVICE#cb} field. */ - @NativeType("DWORD") - public int cb() { return DISPLAY_DEVICE.ncb(address()); } - /** @return a {@link ByteBuffer} view of the {@link DISPLAY_DEVICE#DeviceName} field. */ - @NativeType("TCHAR[32]") - public ByteBuffer DeviceName() { return DISPLAY_DEVICE.nDeviceName(address()); } - /** @return the null-terminated string stored in the {@link DISPLAY_DEVICE#DeviceName} field. */ - @NativeType("TCHAR[32]") - public String DeviceNameString() { return DISPLAY_DEVICE.nDeviceNameString(address()); } - /** @return a {@link ByteBuffer} view of the {@link DISPLAY_DEVICE#DeviceString} field. */ - @NativeType("TCHAR[128]") - public ByteBuffer DeviceString() { return DISPLAY_DEVICE.nDeviceString(address()); } - /** @return the null-terminated string stored in the {@link DISPLAY_DEVICE#DeviceString} field. */ - @NativeType("TCHAR[128]") - public String DeviceStringString() { return DISPLAY_DEVICE.nDeviceStringString(address()); } - /** @return the value of the {@link DISPLAY_DEVICE#StateFlags} field. */ - @NativeType("DWORD") - public int StateFlags() { return DISPLAY_DEVICE.nStateFlags(address()); } - /** @return a {@link ByteBuffer} view of the {@link DISPLAY_DEVICE#DeviceID} field. */ - @NativeType("TCHAR[128]") - public ByteBuffer DeviceID() { return DISPLAY_DEVICE.nDeviceID(address()); } - /** @return the null-terminated string stored in the {@link DISPLAY_DEVICE#DeviceID} field. */ - @NativeType("TCHAR[128]") - public String DeviceIDString() { return DISPLAY_DEVICE.nDeviceIDString(address()); } - /** @return a {@link ByteBuffer} view of the {@link DISPLAY_DEVICE#DeviceKey} field. */ - @NativeType("TCHAR[128]") - public ByteBuffer DeviceKey() { return DISPLAY_DEVICE.nDeviceKey(address()); } - /** @return the null-terminated string stored in the {@link DISPLAY_DEVICE#DeviceKey} field. */ - @NativeType("TCHAR[128]") - public String DeviceKeyString() { return DISPLAY_DEVICE.nDeviceKeyString(address()); } - - /** Sets the specified value to the {@link DISPLAY_DEVICE#cb} field. */ - public Buffer cb(@NativeType("DWORD") int value) { DISPLAY_DEVICE.ncb(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/GDI32.java b/LWJGL/src/main/java/org/lwjgl/system/windows/GDI32.java deleted file mode 100644 index 97b6edd3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/GDI32.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to wingdi.h and gdi32.dll. */ -public class GDI32 { - - private static final SharedLibrary GDI32 = Library.loadNative(GDI32.class, "org.lwjgl", "gdi32"); - - /** Contains the function pointers loaded from the gdi32 {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - ChoosePixelFormat = apiGetFunctionAddress(GDI32, "ChoosePixelFormat"), - DescribePixelFormat = apiGetFunctionAddress(GDI32, "DescribePixelFormat"), - GetPixelFormat = apiGetFunctionAddress(GDI32, "GetPixelFormat"), - SetPixelFormat = apiGetFunctionAddress(GDI32, "SetPixelFormat"), - SwapBuffers = apiGetFunctionAddress(GDI32, "SwapBuffers"); - - } - - /** Returns the gdi32 {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return GDI32; - } - - /** Display device state flags. */ - public static final int - DISPLAY_DEVICE_ATTACHED_TO_DESKTOP = 0x1, - DISPLAY_DEVICE_MULTI_DRIVER = 0x2, - DISPLAY_DEVICE_PRIMARY_DEVICE = 0x4, - DISPLAY_DEVICE_MIRRORING_DRIVER = 0x8, - DISPLAY_DEVICE_VGA_COMPATIBLE = 0x10, - DISPLAY_DEVICE_REMOVABLE = 0x20, - DISPLAY_DEVICE_MODESPRUNED = 0x8000000, - DISPLAY_DEVICE_REMOTE = 0x4000000, - DISPLAY_DEVICE_DISCONNECT = 0x2000000, - DISPLAY_DEVICE_TS_COMPATIBLE = 0x200000, - DISPLAY_DEVICE_UNSAFE_MODES_ON = 0x80000; - - /** Child display device state flags. */ - public static final int - DISPLAY_DEVICE_ACTIVE = 0x1, - DISPLAY_DEVICE_ATTACHED = 0x2; - - /** {@link DEVMODE} specification version. */ - public static final int DM_SPECVERSION = 0x401; - - /** {@link DEVMODE} field selection bits. */ - public static final int - DM_ORIENTATION = 0x1, - DM_PAPERSIZE = 0x2, - DM_PAPERLENGTH = 0x4, - DM_PAPERWIDTH = 0x8, - DM_SCALE = 0x10, - DM_POSITION = 0x20, - DM_NUP = 0x40, - DM_DISPLAYORIENTATION = 0x80, - DM_COPIES = 0x100, - DM_DEFAULTSOURCE = 0x200, - DM_PRINTQUALITY = 0x400, - DM_COLOR = 0x800, - DM_DUPLEX = 0x1000, - DM_YRESOLUTION = 0x2000, - DM_TTOPTION = 0x4000, - DM_COLLATE = 0x8000, - DM_FORMNAME = 0x10000, - DM_LOGPIXELS = 0x20000, - DM_BITSPERPEL = 0x40000, - DM_PELSWIDTH = 0x80000, - DM_PELSHEIGHT = 0x100000, - DM_DISPLAYFLAGS = 0x200000, - DM_DISPLAYFREQUENCY = 0x400000, - DM_ICMMETHOD = 0x800000, - DM_ICMINTENT = 0x1000000, - DM_MEDIATYPE = 0x2000000, - DM_DITHERTYPE = 0x4000000, - DM_PANNINGWIDTH = 0x8000000, - DM_PANNINGHEIGHT = 0x10000000, - DM_DISPLAYFIXEDOUTPUT = 0x20000000; - - /** {@link DEVMODE} {@code dmDisplayOrientation} specifications. */ - public static final int - DMDO_DEFAULT = 0, - DMDO_90 = 1, - DMDO_180 = 2, - DMDO_270 = 3; - - /** {@link DEVMODE} {@code dmDisplayFixedOutput} specifications. */ - public static final int - DMDFO_DEFAULT = 0, - DMDFO_STRETCH = 1, - DMDFO_CENTER = 2; - - /** {@link DEVMODE} {@code dmDisplayFlags} flags. */ - public static final int - DM_INTERLACED = 0x2, - DMDISPLAYFLAGS_TEXTMODE = 0x4; - - /** {@link PIXELFORMATDESCRIPTOR} flags. */ - public static final int - PFD_DOUBLEBUFFER = 0x1, - PFD_STEREO = 0x2, - PFD_DRAW_TO_WINDOW = 0x4, - PFD_DRAW_TO_BITMAP = 0x8, - PFD_SUPPORT_GDI = 0x10, - PFD_SUPPORT_OPENGL = 0x20, - PFD_GENERIC_FORMAT = 0x40, - PFD_NEED_PALETTE = 0x80, - PFD_NEED_SYSTEM_PALETTE = 0x100, - PFD_SWAP_EXCHANGE = 0x200, - PFD_SWAP_COPY = 0x400, - PFD_SWAP_LAYER_BUFFERS = 0x800, - PFD_GENERIC_ACCELERATED = 0x1000, - PFD_SUPPORT_DIRECTDRAW = 0x2000, - PFD_DIRECT3D_ACCELERATED = 0x4000, - PFD_SUPPORT_COMPOSITION = 0x8000, - PFD_DEPTH_DONTCARE = 0x20000000, - PFD_DOUBLEBUFFER_DONTCARE = 0x40000000, - PFD_STEREO_DONTCARE = 0x80000000; - - /** {@link PIXELFORMATDESCRIPTOR} pixel types. */ - public static final byte - PFD_TYPE_RGBA = 0, - PFD_TYPE_COLORINDEX = 1; - - /** {@link PIXELFORMATDESCRIPTOR} layer types. */ - public static final byte - PFD_MAIN_PLANE = 0, - PFD_OVERLAY_PLANE = 1, - PFD_UNDERLAY_PLANE = (byte)-1; - - protected GDI32() { - throw new UnsupportedOperationException(); - } - - // --- [ ChoosePixelFormat ] --- - - /** Unsafe version of: {@link #ChoosePixelFormat} */ - public static native int nChoosePixelFormat(long hdc, long pixelFormatDescriptor, long __functionAddress); - - /** Unsafe version of: {@link #ChoosePixelFormat} */ - public static int nChoosePixelFormat(long hdc, long pixelFormatDescriptor) { - long __functionAddress = Functions.ChoosePixelFormat; - if (CHECKS) { - check(hdc); - } - return nChoosePixelFormat(hdc, pixelFormatDescriptor, __functionAddress); - } - - /** - * Attempts to match an appropriate pixel format supported by a device context to a given pixel format specification. - * - * @param hdc the device context that the function examines to determine the best match for the pixel format descriptor pointed to by {@code pixelFormatDescriptor} - * @param pixelFormatDescriptor a {@link PIXELFORMATDESCRIPTOR} structure that specifies the requested pixel format - */ - public static int ChoosePixelFormat(@NativeType("HDC") long hdc, @NativeType("PIXELFORMATDESCRIPTOR const *") PIXELFORMATDESCRIPTOR pixelFormatDescriptor) { - return nChoosePixelFormat(hdc, pixelFormatDescriptor.address()); - } - - // --- [ DescribePixelFormat ] --- - - /** Unsafe version of: {@link #DescribePixelFormat} */ - public static native int nDescribePixelFormat(long hdc, int pixelFormat, int bytes, long pixelFormatDescriptor, long __functionAddress); - - /** Unsafe version of: {@link #DescribePixelFormat} */ - public static int nDescribePixelFormat(long hdc, int pixelFormat, int bytes, long pixelFormatDescriptor) { - long __functionAddress = Functions.DescribePixelFormat; - if (CHECKS) { - check(hdc); - } - return nDescribePixelFormat(hdc, pixelFormat, bytes, pixelFormatDescriptor, __functionAddress); - } - - /** - * Obtains information about the pixel format identified by pixelFormat of the device associated with dc. The function sets the members of the - * {@link PIXELFORMATDESCRIPTOR} structure pointed to by pixelFormatDescriptor with that pixel format data. The return value is the maximum pixel format - * index of the device context. - * - * @param hdc the device context - * @param pixelFormat index that specifies the pixel format. The pixel formats that a device context supports are identified by positive one-based integer indexes. - * @param bytes the size, in bytes, of the structure pointed to by {@code pixelFormatDescriptor}. The {@code wglDescribePixelFormat} function stores no more than - * {@code bytes} bytes of data to that structure. Set this value to {@link PIXELFORMATDESCRIPTOR#SIZEOF}. - * @param pixelFormatDescriptor a {@link PIXELFORMATDESCRIPTOR} structure whose members the function sets with pixel format data. The function stores the number of bytes copied to - * the structure in the structure's {@code size} member. If, upon entry, {@code pixelFormatDescriptor} is {@code NULL}, the function writes no data to the - * structure. This is useful when you only want to obtain the maximum pixel format index of a device context. - */ - public static int DescribePixelFormat(@NativeType("HDC") long hdc, int pixelFormat, @NativeType("UINT") int bytes, @Nullable @NativeType("LPPIXELFORMATDESCRIPTOR") PIXELFORMATDESCRIPTOR pixelFormatDescriptor) { - return nDescribePixelFormat(hdc, pixelFormat, bytes, memAddressSafe(pixelFormatDescriptor)); - } - - /** - * Obtains information about the pixel format identified by pixelFormat of the device associated with dc. The function sets the members of the - * {@link PIXELFORMATDESCRIPTOR} structure pointed to by pixelFormatDescriptor with that pixel format data. The return value is the maximum pixel format - * index of the device context. - * - * @param hdc the device context - * @param pixelFormat index that specifies the pixel format. The pixel formats that a device context supports are identified by positive one-based integer indexes. - * @param pixelFormatDescriptor a {@link PIXELFORMATDESCRIPTOR} structure whose members the function sets with pixel format data. The function stores the number of bytes copied to - * the structure in the structure's {@code size} member. If, upon entry, {@code pixelFormatDescriptor} is {@code NULL}, the function writes no data to the - * structure. This is useful when you only want to obtain the maximum pixel format index of a device context. - */ - public static int DescribePixelFormat(@NativeType("HDC") long hdc, int pixelFormat, @Nullable @NativeType("LPPIXELFORMATDESCRIPTOR") PIXELFORMATDESCRIPTOR pixelFormatDescriptor) { - return nDescribePixelFormat(hdc, pixelFormat, PIXELFORMATDESCRIPTOR.SIZEOF, memAddressSafe(pixelFormatDescriptor)); - } - - // --- [ GetPixelFormat ] --- - - /** Unsafe version of: {@link #GetPixelFormat} */ - public static native int nGetPixelFormat(long hdc, long __functionAddress); - - /** - * Obtains the index of the currently selected pixel format of the specified device context. - * - * @param hdc the device context of the currently selected pixel format index returned by the function - */ - public static int GetPixelFormat(@NativeType("HDC") long hdc) { - long __functionAddress = Functions.GetPixelFormat; - if (CHECKS) { - check(hdc); - } - return nGetPixelFormat(hdc, __functionAddress); - } - - // --- [ SetPixelFormat ] --- - - /** Unsafe version of: {@link #SetPixelFormat} */ - public static native int nSetPixelFormat(long hdc, int pixelFormat, long pixelFormatDescriptor, long __functionAddress); - - /** Unsafe version of: {@link #SetPixelFormat} */ - public static int nSetPixelFormat(long hdc, int pixelFormat, long pixelFormatDescriptor) { - long __functionAddress = Functions.SetPixelFormat; - if (CHECKS) { - check(hdc); - } - return nSetPixelFormat(hdc, pixelFormat, pixelFormatDescriptor, __functionAddress); - } - - /** - * Sets the pixel format of the specified device context to the format specified by the pixelFormat index. - * - * @param hdc the device context whose pixel format the function attempts to set - * @param pixelFormat index that identifies the pixel format to set. The various pixel formats supported by a device context are identified by one-based indexes. - * @param pixelFormatDescriptor a {@link PIXELFORMATDESCRIPTOR} structure that contains the logical pixel format specification. The system's metafile component uses this structure - * to record the logical pixel format specification. The structure has no other effect upon the behavior of the SetPixelFormat function. - */ - @NativeType("BOOL") - public static boolean SetPixelFormat(@NativeType("HDC") long hdc, int pixelFormat, @Nullable @NativeType("PIXELFORMATDESCRIPTOR const *") PIXELFORMATDESCRIPTOR pixelFormatDescriptor) { - return nSetPixelFormat(hdc, pixelFormat, memAddressSafe(pixelFormatDescriptor)) != 0; - } - - // --- [ SwapBuffers ] --- - - /** Unsafe version of: {@link #SwapBuffers} */ - public static native int nSwapBuffers(long dc, long __functionAddress); - - /** - * Exchanges the front and back buffers if the current pixel format for the window referenced by the specified device context includes a back buffer. - * - * @param dc a device context. If the current pixel format for the window referenced by this device context includes a back buffer, the function exchanges the - * front and back buffers. - */ - @NativeType("BOOL") - public static boolean SwapBuffers(@NativeType("HDC") long dc) { - long __functionAddress = Functions.SwapBuffers; - if (CHECKS) { - check(dc); - } - return nSwapBuffers(dc, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/HARDWAREINPUT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/HARDWAREINPUT.java deleted file mode 100644 index b3dd4991..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/HARDWAREINPUT.java +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about a simulated message generated by an input device other than a keyboard or mouse. - * - *

    Layout

    - * - *
    
    - * struct HARDWAREINPUT {
    - *     DWORD {@link #uMsg};
    - *     WORD {@link #wParamL};
    - *     WORD {@link #wParamH};
    - * }
    - */ -public class HARDWAREINPUT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - UMSG, - WPARAML, - WPARAMH; - - static { - Layout layout = __struct( - __member(4), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - UMSG = layout.offsetof(0); - WPARAML = layout.offsetof(1); - WPARAMH = layout.offsetof(2); - } - - protected HARDWAREINPUT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected HARDWAREINPUT create(long address, @Nullable ByteBuffer container) { - return new HARDWAREINPUT(address, container); - } - - /** - * Creates a {@code HARDWAREINPUT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public HARDWAREINPUT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the message generated by the input hardware */ - @NativeType("DWORD") - public int uMsg() { return nuMsg(address()); } - /** the low-order word of the {@code lParam} parameter for {@code uMsg} */ - @NativeType("WORD") - public short wParamL() { return nwParamL(address()); } - /** the high-order word of the {@code lParam} parameter for {@code uMsg} */ - @NativeType("WORD") - public short wParamH() { return nwParamH(address()); } - - /** Sets the specified value to the {@link #uMsg} field. */ - public HARDWAREINPUT uMsg(@NativeType("DWORD") int value) { nuMsg(address(), value); return this; } - /** Sets the specified value to the {@link #wParamL} field. */ - public HARDWAREINPUT wParamL(@NativeType("WORD") short value) { nwParamL(address(), value); return this; } - /** Sets the specified value to the {@link #wParamH} field. */ - public HARDWAREINPUT wParamH(@NativeType("WORD") short value) { nwParamH(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public HARDWAREINPUT set( - int uMsg, - short wParamL, - short wParamH - ) { - uMsg(uMsg); - wParamL(wParamL); - wParamH(wParamH); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public HARDWAREINPUT set(HARDWAREINPUT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code HARDWAREINPUT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static HARDWAREINPUT malloc() { - return new HARDWAREINPUT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code HARDWAREINPUT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static HARDWAREINPUT calloc() { - return new HARDWAREINPUT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code HARDWAREINPUT} instance allocated with {@link BufferUtils}. */ - public static HARDWAREINPUT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new HARDWAREINPUT(memAddress(container), container); - } - - /** Returns a new {@code HARDWAREINPUT} instance for the specified memory address. */ - public static HARDWAREINPUT create(long address) { - return new HARDWAREINPUT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static HARDWAREINPUT createSafe(long address) { - return address == NULL ? null : new HARDWAREINPUT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static HARDWAREINPUT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static HARDWAREINPUT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static HARDWAREINPUT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static HARDWAREINPUT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code HARDWAREINPUT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static HARDWAREINPUT malloc(MemoryStack stack) { - return new HARDWAREINPUT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code HARDWAREINPUT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static HARDWAREINPUT calloc(MemoryStack stack) { - return new HARDWAREINPUT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #uMsg}. */ - public static int nuMsg(long struct) { return UNSAFE.getInt(null, struct + HARDWAREINPUT.UMSG); } - /** Unsafe version of {@link #wParamL}. */ - public static short nwParamL(long struct) { return UNSAFE.getShort(null, struct + HARDWAREINPUT.WPARAML); } - /** Unsafe version of {@link #wParamH}. */ - public static short nwParamH(long struct) { return UNSAFE.getShort(null, struct + HARDWAREINPUT.WPARAMH); } - - /** Unsafe version of {@link #uMsg(int) uMsg}. */ - public static void nuMsg(long struct, int value) { UNSAFE.putInt(null, struct + HARDWAREINPUT.UMSG, value); } - /** Unsafe version of {@link #wParamL(short) wParamL}. */ - public static void nwParamL(long struct, short value) { UNSAFE.putShort(null, struct + HARDWAREINPUT.WPARAML, value); } - /** Unsafe version of {@link #wParamH(short) wParamH}. */ - public static void nwParamH(long struct, short value) { UNSAFE.putShort(null, struct + HARDWAREINPUT.WPARAMH, value); } - - // ----------------------------------- - - /** An array of {@link HARDWAREINPUT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final HARDWAREINPUT ELEMENT_FACTORY = HARDWAREINPUT.create(-1L); - - /** - * Creates a new {@code HARDWAREINPUT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link HARDWAREINPUT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected HARDWAREINPUT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link HARDWAREINPUT#uMsg} field. */ - @NativeType("DWORD") - public int uMsg() { return HARDWAREINPUT.nuMsg(address()); } - /** @return the value of the {@link HARDWAREINPUT#wParamL} field. */ - @NativeType("WORD") - public short wParamL() { return HARDWAREINPUT.nwParamL(address()); } - /** @return the value of the {@link HARDWAREINPUT#wParamH} field. */ - @NativeType("WORD") - public short wParamH() { return HARDWAREINPUT.nwParamH(address()); } - - /** Sets the specified value to the {@link HARDWAREINPUT#uMsg} field. */ - public Buffer uMsg(@NativeType("DWORD") int value) { HARDWAREINPUT.nuMsg(address(), value); return this; } - /** Sets the specified value to the {@link HARDWAREINPUT#wParamL} field. */ - public Buffer wParamL(@NativeType("WORD") short value) { HARDWAREINPUT.nwParamL(address(), value); return this; } - /** Sets the specified value to the {@link HARDWAREINPUT#wParamH} field. */ - public Buffer wParamH(@NativeType("WORD") short value) { HARDWAREINPUT.nwParamH(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/INPUT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/INPUT.java deleted file mode 100644 index 96cd5fdf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/INPUT.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Used by {@link User32#SendInput} to store information for synthesizing input events such as keystrokes, mouse movement, and mouse clicks. - * - *

    Layout

    - * - *
    
    - * struct INPUT {
    - *     DWORD {@link #type};
    - *     union {
    - *         {@link MOUSEINPUT MOUSEINPUT} {@link #DUMMYUNIONNAME_mi mi};
    - *         {@link KEYBDINPUT KEYBDINPUT} {@link #DUMMYUNIONNAME_ki ki};
    - *         {@link HARDWAREINPUT HARDWAREINPUT} {@link #DUMMYUNIONNAME_hi hi};
    - *     } DUMMYUNIONNAME;
    - * }
    - */ -public class INPUT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - DUMMYUNIONNAME, - DUMMYUNIONNAME_MI, - DUMMYUNIONNAME_KI, - DUMMYUNIONNAME_HI; - - static { - Layout layout = __struct( - __member(4), - __union( - __member(MOUSEINPUT.SIZEOF, MOUSEINPUT.ALIGNOF), - __member(KEYBDINPUT.SIZEOF, KEYBDINPUT.ALIGNOF), - __member(HARDWAREINPUT.SIZEOF, HARDWAREINPUT.ALIGNOF) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - DUMMYUNIONNAME = layout.offsetof(1); - DUMMYUNIONNAME_MI = layout.offsetof(2); - DUMMYUNIONNAME_KI = layout.offsetof(3); - DUMMYUNIONNAME_HI = layout.offsetof(4); - } - - protected INPUT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected INPUT create(long address, @Nullable ByteBuffer container) { - return new INPUT(address, container); - } - - /** - * Creates a {@code INPUT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public INPUT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the type of the input event. One of:
    {@link User32#INPUT_MOUSE}{@link User32#INPUT_KEYBOARD}{@link User32#INPUT_HARDWARE}
    */ - @NativeType("DWORD") - public int type() { return ntype(address()); } - /** the information about a simulated mouse event */ - public MOUSEINPUT DUMMYUNIONNAME_mi() { return nDUMMYUNIONNAME_mi(address()); } - /** the information about a simulated keyboard event */ - public KEYBDINPUT DUMMYUNIONNAME_ki() { return nDUMMYUNIONNAME_ki(address()); } - /** the information about a simulated hardware event */ - public HARDWAREINPUT DUMMYUNIONNAME_hi() { return nDUMMYUNIONNAME_hi(address()); } - - /** Sets the specified value to the {@link #type} field. */ - public INPUT type(@NativeType("DWORD") int value) { ntype(address(), value); return this; } - /** Copies the specified {@link MOUSEINPUT} to the {@link #DUMMYUNIONNAME_mi} field. */ - public INPUT DUMMYUNIONNAME_mi(MOUSEINPUT value) { nDUMMYUNIONNAME_mi(address(), value); return this; } - /** Passes the {@link #DUMMYUNIONNAME_mi} field to the specified {@link java.util.function.Consumer Consumer}. */ - public INPUT DUMMYUNIONNAME_mi(java.util.function.Consumer consumer) { consumer.accept(DUMMYUNIONNAME_mi()); return this; } - /** Copies the specified {@link KEYBDINPUT} to the {@link #DUMMYUNIONNAME_ki} field. */ - public INPUT DUMMYUNIONNAME_ki(KEYBDINPUT value) { nDUMMYUNIONNAME_ki(address(), value); return this; } - /** Passes the {@link #DUMMYUNIONNAME_ki} field to the specified {@link java.util.function.Consumer Consumer}. */ - public INPUT DUMMYUNIONNAME_ki(java.util.function.Consumer consumer) { consumer.accept(DUMMYUNIONNAME_ki()); return this; } - /** Copies the specified {@link HARDWAREINPUT} to the {@link #DUMMYUNIONNAME_hi} field. */ - public INPUT DUMMYUNIONNAME_hi(HARDWAREINPUT value) { nDUMMYUNIONNAME_hi(address(), value); return this; } - /** Passes the {@link #DUMMYUNIONNAME_hi} field to the specified {@link java.util.function.Consumer Consumer}. */ - public INPUT DUMMYUNIONNAME_hi(java.util.function.Consumer consumer) { consumer.accept(DUMMYUNIONNAME_hi()); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public INPUT set(INPUT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code INPUT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static INPUT malloc() { - return new INPUT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code INPUT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static INPUT calloc() { - return new INPUT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code INPUT} instance allocated with {@link BufferUtils}. */ - public static INPUT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new INPUT(memAddress(container), container); - } - - /** Returns a new {@code INPUT} instance for the specified memory address. */ - public static INPUT create(long address) { - return new INPUT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static INPUT createSafe(long address) { - return address == NULL ? null : new INPUT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static INPUT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static INPUT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static INPUT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static INPUT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code INPUT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static INPUT malloc(MemoryStack stack) { - return new INPUT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code INPUT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static INPUT calloc(MemoryStack stack) { - return new INPUT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + INPUT.TYPE); } - /** Unsafe version of {@link #DUMMYUNIONNAME_mi}. */ - public static MOUSEINPUT nDUMMYUNIONNAME_mi(long struct) { return MOUSEINPUT.create(struct + INPUT.DUMMYUNIONNAME_MI); } - /** Unsafe version of {@link #DUMMYUNIONNAME_ki}. */ - public static KEYBDINPUT nDUMMYUNIONNAME_ki(long struct) { return KEYBDINPUT.create(struct + INPUT.DUMMYUNIONNAME_KI); } - /** Unsafe version of {@link #DUMMYUNIONNAME_hi}. */ - public static HARDWAREINPUT nDUMMYUNIONNAME_hi(long struct) { return HARDWAREINPUT.create(struct + INPUT.DUMMYUNIONNAME_HI); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + INPUT.TYPE, value); } - /** Unsafe version of {@link #DUMMYUNIONNAME_mi(MOUSEINPUT) DUMMYUNIONNAME_mi}. */ - public static void nDUMMYUNIONNAME_mi(long struct, MOUSEINPUT value) { memCopy(value.address(), struct + INPUT.DUMMYUNIONNAME_MI, MOUSEINPUT.SIZEOF); } - /** Unsafe version of {@link #DUMMYUNIONNAME_ki(KEYBDINPUT) DUMMYUNIONNAME_ki}. */ - public static void nDUMMYUNIONNAME_ki(long struct, KEYBDINPUT value) { memCopy(value.address(), struct + INPUT.DUMMYUNIONNAME_KI, KEYBDINPUT.SIZEOF); } - /** Unsafe version of {@link #DUMMYUNIONNAME_hi(HARDWAREINPUT) DUMMYUNIONNAME_hi}. */ - public static void nDUMMYUNIONNAME_hi(long struct, HARDWAREINPUT value) { memCopy(value.address(), struct + INPUT.DUMMYUNIONNAME_HI, HARDWAREINPUT.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link INPUT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final INPUT ELEMENT_FACTORY = INPUT.create(-1L); - - /** - * Creates a new {@code INPUT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link INPUT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected INPUT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link INPUT#type} field. */ - @NativeType("DWORD") - public int type() { return INPUT.ntype(address()); } - /** @return a {@link MOUSEINPUT} view of the {@link INPUT#DUMMYUNIONNAME_mi} field. */ - public MOUSEINPUT DUMMYUNIONNAME_mi() { return INPUT.nDUMMYUNIONNAME_mi(address()); } - /** @return a {@link KEYBDINPUT} view of the {@link INPUT#DUMMYUNIONNAME_ki} field. */ - public KEYBDINPUT DUMMYUNIONNAME_ki() { return INPUT.nDUMMYUNIONNAME_ki(address()); } - /** @return a {@link HARDWAREINPUT} view of the {@link INPUT#DUMMYUNIONNAME_hi} field. */ - public HARDWAREINPUT DUMMYUNIONNAME_hi() { return INPUT.nDUMMYUNIONNAME_hi(address()); } - - /** Sets the specified value to the {@link INPUT#type} field. */ - public Buffer type(@NativeType("DWORD") int value) { INPUT.ntype(address(), value); return this; } - /** Copies the specified {@link MOUSEINPUT} to the {@link INPUT#DUMMYUNIONNAME_mi} field. */ - public Buffer DUMMYUNIONNAME_mi(MOUSEINPUT value) { INPUT.nDUMMYUNIONNAME_mi(address(), value); return this; } - /** Passes the {@link INPUT#DUMMYUNIONNAME_mi} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer DUMMYUNIONNAME_mi(java.util.function.Consumer consumer) { consumer.accept(DUMMYUNIONNAME_mi()); return this; } - /** Copies the specified {@link KEYBDINPUT} to the {@link INPUT#DUMMYUNIONNAME_ki} field. */ - public Buffer DUMMYUNIONNAME_ki(KEYBDINPUT value) { INPUT.nDUMMYUNIONNAME_ki(address(), value); return this; } - /** Passes the {@link INPUT#DUMMYUNIONNAME_ki} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer DUMMYUNIONNAME_ki(java.util.function.Consumer consumer) { consumer.accept(DUMMYUNIONNAME_ki()); return this; } - /** Copies the specified {@link HARDWAREINPUT} to the {@link INPUT#DUMMYUNIONNAME_hi} field. */ - public Buffer DUMMYUNIONNAME_hi(HARDWAREINPUT value) { INPUT.nDUMMYUNIONNAME_hi(address(), value); return this; } - /** Passes the {@link INPUT#DUMMYUNIONNAME_hi} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer DUMMYUNIONNAME_hi(java.util.function.Consumer consumer) { consumer.accept(DUMMYUNIONNAME_hi()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/KEYBDINPUT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/KEYBDINPUT.java deleted file mode 100644 index 52ed6f7c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/KEYBDINPUT.java +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about a simulated keyboard event. - * - *

    Layout

    - * - *
    
    - * struct KEYBDINPUT {
    - *     WORD {@link #wVk};
    - *     WORD {@link #wScan};
    - *     DWORD {@link #dwFlags};
    - *     DWORD {@link #time};
    - *     ULONG_PTR {@link #dwExtraInfo};
    - * }
    - */ -public class KEYBDINPUT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WVK, - WSCAN, - DWFLAGS, - TIME, - DWEXTRAINFO; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WVK = layout.offsetof(0); - WSCAN = layout.offsetof(1); - DWFLAGS = layout.offsetof(2); - TIME = layout.offsetof(3); - DWEXTRAINFO = layout.offsetof(4); - } - - protected KEYBDINPUT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected KEYBDINPUT create(long address, @Nullable ByteBuffer container) { - return new KEYBDINPUT(address, container); - } - - /** - * Creates a {@code KEYBDINPUT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public KEYBDINPUT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * A virtual-key code. - * - *

    The code must be a value in the range 1 to 254. If the {@code dwFlags} member specifies {@link User32#KEYEVENTF_UNICODE}, {@code wVk} must be 0.

    - */ - @NativeType("WORD") - public short wVk() { return nwVk(address()); } - /** - * A hardware scan code for the key. - * - *

    If {@code dwFlags} specifies {@link User32#KEYEVENTF_UNICODE}, {@code wScan} specifies a Unicode character which is to be sent to the foreground application.

    - */ - @NativeType("WORD") - public short wScan() { return nwScan(address()); } - /** specifies various aspects of a keystroke. One of:
    {@link User32#KEYEVENTF_EXTENDEDKEY}{@link User32#KEYEVENTF_KEYUP}{@link User32#KEYEVENTF_SCANCODE}{@link User32#KEYEVENTF_UNICODE}
    */ - @NativeType("DWORD") - public int dwFlags() { return ndwFlags(address()); } - /** the time stamp for the event, in milliseconds. If this parameter is zero, the system will provide its own time stamp. */ - @NativeType("DWORD") - public int time() { return ntime(address()); } - /** an additional value associated with the keystroke. Use the {@link User32#GetMessageExtraInfo} function to obtain this information. */ - @NativeType("ULONG_PTR") - public long dwExtraInfo() { return ndwExtraInfo(address()); } - - /** Sets the specified value to the {@link #wVk} field. */ - public KEYBDINPUT wVk(@NativeType("WORD") short value) { nwVk(address(), value); return this; } - /** Sets the specified value to the {@link #wScan} field. */ - public KEYBDINPUT wScan(@NativeType("WORD") short value) { nwScan(address(), value); return this; } - /** Sets the specified value to the {@link #dwFlags} field. */ - public KEYBDINPUT dwFlags(@NativeType("DWORD") int value) { ndwFlags(address(), value); return this; } - /** Sets the specified value to the {@link #time} field. */ - public KEYBDINPUT time(@NativeType("DWORD") int value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@link #dwExtraInfo} field. */ - public KEYBDINPUT dwExtraInfo(@NativeType("ULONG_PTR") long value) { ndwExtraInfo(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public KEYBDINPUT set( - short wVk, - short wScan, - int dwFlags, - int time, - long dwExtraInfo - ) { - wVk(wVk); - wScan(wScan); - dwFlags(dwFlags); - time(time); - dwExtraInfo(dwExtraInfo); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public KEYBDINPUT set(KEYBDINPUT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code KEYBDINPUT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static KEYBDINPUT malloc() { - return new KEYBDINPUT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code KEYBDINPUT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static KEYBDINPUT calloc() { - return new KEYBDINPUT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code KEYBDINPUT} instance allocated with {@link BufferUtils}. */ - public static KEYBDINPUT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new KEYBDINPUT(memAddress(container), container); - } - - /** Returns a new {@code KEYBDINPUT} instance for the specified memory address. */ - public static KEYBDINPUT create(long address) { - return new KEYBDINPUT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static KEYBDINPUT createSafe(long address) { - return address == NULL ? null : new KEYBDINPUT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static KEYBDINPUT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static KEYBDINPUT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static KEYBDINPUT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static KEYBDINPUT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code KEYBDINPUT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static KEYBDINPUT malloc(MemoryStack stack) { - return new KEYBDINPUT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code KEYBDINPUT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static KEYBDINPUT calloc(MemoryStack stack) { - return new KEYBDINPUT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #wVk}. */ - public static short nwVk(long struct) { return UNSAFE.getShort(null, struct + KEYBDINPUT.WVK); } - /** Unsafe version of {@link #wScan}. */ - public static short nwScan(long struct) { return UNSAFE.getShort(null, struct + KEYBDINPUT.WSCAN); } - /** Unsafe version of {@link #dwFlags}. */ - public static int ndwFlags(long struct) { return UNSAFE.getInt(null, struct + KEYBDINPUT.DWFLAGS); } - /** Unsafe version of {@link #time}. */ - public static int ntime(long struct) { return UNSAFE.getInt(null, struct + KEYBDINPUT.TIME); } - /** Unsafe version of {@link #dwExtraInfo}. */ - public static long ndwExtraInfo(long struct) { return memGetAddress(struct + KEYBDINPUT.DWEXTRAINFO); } - - /** Unsafe version of {@link #wVk(short) wVk}. */ - public static void nwVk(long struct, short value) { UNSAFE.putShort(null, struct + KEYBDINPUT.WVK, value); } - /** Unsafe version of {@link #wScan(short) wScan}. */ - public static void nwScan(long struct, short value) { UNSAFE.putShort(null, struct + KEYBDINPUT.WSCAN, value); } - /** Unsafe version of {@link #dwFlags(int) dwFlags}. */ - public static void ndwFlags(long struct, int value) { UNSAFE.putInt(null, struct + KEYBDINPUT.DWFLAGS, value); } - /** Unsafe version of {@link #time(int) time}. */ - public static void ntime(long struct, int value) { UNSAFE.putInt(null, struct + KEYBDINPUT.TIME, value); } - /** Unsafe version of {@link #dwExtraInfo(long) dwExtraInfo}. */ - public static void ndwExtraInfo(long struct, long value) { memPutAddress(struct + KEYBDINPUT.DWEXTRAINFO, value); } - - // ----------------------------------- - - /** An array of {@link KEYBDINPUT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final KEYBDINPUT ELEMENT_FACTORY = KEYBDINPUT.create(-1L); - - /** - * Creates a new {@code KEYBDINPUT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link KEYBDINPUT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected KEYBDINPUT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link KEYBDINPUT#wVk} field. */ - @NativeType("WORD") - public short wVk() { return KEYBDINPUT.nwVk(address()); } - /** @return the value of the {@link KEYBDINPUT#wScan} field. */ - @NativeType("WORD") - public short wScan() { return KEYBDINPUT.nwScan(address()); } - /** @return the value of the {@link KEYBDINPUT#dwFlags} field. */ - @NativeType("DWORD") - public int dwFlags() { return KEYBDINPUT.ndwFlags(address()); } - /** @return the value of the {@link KEYBDINPUT#time} field. */ - @NativeType("DWORD") - public int time() { return KEYBDINPUT.ntime(address()); } - /** @return the value of the {@link KEYBDINPUT#dwExtraInfo} field. */ - @NativeType("ULONG_PTR") - public long dwExtraInfo() { return KEYBDINPUT.ndwExtraInfo(address()); } - - /** Sets the specified value to the {@link KEYBDINPUT#wVk} field. */ - public Buffer wVk(@NativeType("WORD") short value) { KEYBDINPUT.nwVk(address(), value); return this; } - /** Sets the specified value to the {@link KEYBDINPUT#wScan} field. */ - public Buffer wScan(@NativeType("WORD") short value) { KEYBDINPUT.nwScan(address(), value); return this; } - /** Sets the specified value to the {@link KEYBDINPUT#dwFlags} field. */ - public Buffer dwFlags(@NativeType("DWORD") int value) { KEYBDINPUT.ndwFlags(address(), value); return this; } - /** Sets the specified value to the {@link KEYBDINPUT#time} field. */ - public Buffer time(@NativeType("DWORD") int value) { KEYBDINPUT.ntime(address(), value); return this; } - /** Sets the specified value to the {@link KEYBDINPUT#dwExtraInfo} field. */ - public Buffer dwExtraInfo(@NativeType("ULONG_PTR") long value) { KEYBDINPUT.ndwExtraInfo(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/Kernel32.java b/LWJGL/src/main/java/org/lwjgl/system/windows/Kernel32.java deleted file mode 100644 index 74e14a63..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/Kernel32.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; - -/** Native bindings to Kernel32 library. */ -public class Kernel32 { - - private static final SharedLibrary KERNEL32 = Library.loadNative(Kernel32.class, "org.lwjgl", "kernel32"); - - /** Contains the function pointers loaded from the kernel32 {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - GetCurrentProcess = apiGetFunctionAddress(KERNEL32, "GetCurrentProcess"), - GetCurrentProcessId = apiGetFunctionAddress(KERNEL32, "GetCurrentProcessId"), - GetProcessId = apiGetFunctionAddress(KERNEL32, "GetProcessId"), - GetCurrentThread = apiGetFunctionAddress(KERNEL32, "GetCurrentThread"), - GetCurrentThreadId = apiGetFunctionAddress(KERNEL32, "GetCurrentThreadId"), - GetThreadId = apiGetFunctionAddressOptional(KERNEL32, "GetThreadId"), - GetProcessIdOfThread = apiGetFunctionAddressOptional(KERNEL32, "GetProcessIdOfThread"), - GetCurrentProcessorNumber = apiGetFunctionAddressOptional(KERNEL32, "GetCurrentProcessorNumber"); - - } - - /** Returns the kernel32 {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return KERNEL32; - } - - protected Kernel32() { - throw new UnsupportedOperationException(); - } - - // --- [ GetCurrentProcess ] --- - - @NativeType("HANDLE") - public static long GetCurrentProcess() { - long __functionAddress = Functions.GetCurrentProcess; - return callP(__functionAddress); - } - - // --- [ GetCurrentProcessId ] --- - - @NativeType("DWORD") - public static int GetCurrentProcessId() { - long __functionAddress = Functions.GetCurrentProcessId; - return callI(__functionAddress); - } - - // --- [ GetProcessId ] --- - - @NativeType("DWORD") - public static int GetProcessId(@NativeType("HANDLE") long Process) { - long __functionAddress = Functions.GetProcessId; - if (CHECKS) { - check(Process); - } - return callPI(Process, __functionAddress); - } - - // --- [ GetCurrentThread ] --- - - @NativeType("HANDLE") - public static long GetCurrentThread() { - long __functionAddress = Functions.GetCurrentThread; - return callP(__functionAddress); - } - - // --- [ GetCurrentThreadId ] --- - - @NativeType("DWORD") - public static int GetCurrentThreadId() { - long __functionAddress = Functions.GetCurrentThreadId; - return callI(__functionAddress); - } - - // --- [ GetThreadId ] --- - - @NativeType("DWORD") - public static int GetThreadId(@NativeType("HANDLE") long Thread) { - long __functionAddress = Functions.GetThreadId; - if (CHECKS) { - check(__functionAddress); - check(Thread); - } - return callPI(Thread, __functionAddress); - } - - // --- [ GetProcessIdOfThread ] --- - - @NativeType("DWORD") - public static int GetProcessIdOfThread(@NativeType("HANDLE") long Thread) { - long __functionAddress = Functions.GetProcessIdOfThread; - if (CHECKS) { - check(__functionAddress); - check(Thread); - } - return callPI(Thread, __functionAddress); - } - - // --- [ GetCurrentProcessorNumber ] --- - - @NativeType("DWORD") - public static int GetCurrentProcessorNumber() { - long __functionAddress = Functions.GetCurrentProcessorNumber; - if (CHECKS) { - check(__functionAddress); - } - return callI(__functionAddress); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/LARGE_INTEGER.java b/LWJGL/src/main/java/org/lwjgl/system/windows/LARGE_INTEGER.java deleted file mode 100644 index bea27f7e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/LARGE_INTEGER.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * union LARGE_INTEGER {
    - *     struct {
    - *         DWORD LowPart;
    - *         LONG HighPart;
    - *     } u;
    - *     LONGLONG QuadPart;
    - * }
    - */ -public class LARGE_INTEGER extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - U, - U_LOWPART, - U_HIGHPART, - QUADPART; - - static { - Layout layout = __union( - __struct( - __member(4), - __member(4) - ), - __member(8) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - U = layout.offsetof(0); - U_LOWPART = layout.offsetof(1); - U_HIGHPART = layout.offsetof(2); - QUADPART = layout.offsetof(3); - } - - protected LARGE_INTEGER(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected LARGE_INTEGER create(long address, @Nullable ByteBuffer container) { - return new LARGE_INTEGER(address, container); - } - - /** - * Creates a {@code LARGE_INTEGER} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public LARGE_INTEGER(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code u.LowPart} field. */ - @NativeType("DWORD") - public int u_LowPart() { return nu_LowPart(address()); } - /** @return the value of the {@code u.HighPart} field. */ - @NativeType("LONG") - public int u_HighPart() { return nu_HighPart(address()); } - /** @return the value of the {@code QuadPart} field. */ - @NativeType("LONGLONG") - public long QuadPart() { return nQuadPart(address()); } - - /** Sets the specified value to the {@code LowPart} field. */ - public LARGE_INTEGER u_LowPart(@NativeType("DWORD") int value) { nu_LowPart(address(), value); return this; } - /** Sets the specified value to the {@code HighPart} field. */ - public LARGE_INTEGER u_HighPart(@NativeType("LONG") int value) { nu_HighPart(address(), value); return this; } - /** Sets the specified value to the {@code QuadPart} field. */ - public LARGE_INTEGER QuadPart(@NativeType("LONGLONG") long value) { nQuadPart(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public LARGE_INTEGER set(LARGE_INTEGER src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code LARGE_INTEGER} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static LARGE_INTEGER malloc() { - return new LARGE_INTEGER(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code LARGE_INTEGER} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static LARGE_INTEGER calloc() { - return new LARGE_INTEGER(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code LARGE_INTEGER} instance allocated with {@link BufferUtils}. */ - public static LARGE_INTEGER create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new LARGE_INTEGER(memAddress(container), container); - } - - /** Returns a new {@code LARGE_INTEGER} instance for the specified memory address. */ - public static LARGE_INTEGER create(long address) { - return new LARGE_INTEGER(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static LARGE_INTEGER createSafe(long address) { - return address == NULL ? null : new LARGE_INTEGER(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code LARGE_INTEGER} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static LARGE_INTEGER malloc(MemoryStack stack) { - return new LARGE_INTEGER(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code LARGE_INTEGER} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static LARGE_INTEGER calloc(MemoryStack stack) { - return new LARGE_INTEGER(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #u_LowPart}. */ - public static int nu_LowPart(long struct) { return UNSAFE.getInt(null, struct + LARGE_INTEGER.U_LOWPART); } - /** Unsafe version of {@link #u_HighPart}. */ - public static int nu_HighPart(long struct) { return UNSAFE.getInt(null, struct + LARGE_INTEGER.U_HIGHPART); } - /** Unsafe version of {@link #QuadPart}. */ - public static long nQuadPart(long struct) { return UNSAFE.getLong(null, struct + LARGE_INTEGER.QUADPART); } - - /** Unsafe version of {@link #u_LowPart(int) u_LowPart}. */ - public static void nu_LowPart(long struct, int value) { UNSAFE.putInt(null, struct + LARGE_INTEGER.U_LOWPART, value); } - /** Unsafe version of {@link #u_HighPart(int) u_HighPart}. */ - public static void nu_HighPart(long struct, int value) { UNSAFE.putInt(null, struct + LARGE_INTEGER.U_HIGHPART, value); } - /** Unsafe version of {@link #QuadPart(long) QuadPart}. */ - public static void nQuadPart(long struct, long value) { UNSAFE.putLong(null, struct + LARGE_INTEGER.QUADPART, value); } - - // ----------------------------------- - - /** An array of {@link LARGE_INTEGER} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final LARGE_INTEGER ELEMENT_FACTORY = LARGE_INTEGER.create(-1L); - - /** - * Creates a new {@code LARGE_INTEGER.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link LARGE_INTEGER#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected LARGE_INTEGER getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code u.LowPart} field. */ - @NativeType("DWORD") - public int u_LowPart() { return LARGE_INTEGER.nu_LowPart(address()); } - /** @return the value of the {@code u.HighPart} field. */ - @NativeType("LONG") - public int u_HighPart() { return LARGE_INTEGER.nu_HighPart(address()); } - /** @return the value of the {@code QuadPart} field. */ - @NativeType("LONGLONG") - public long QuadPart() { return LARGE_INTEGER.nQuadPart(address()); } - - /** Sets the specified value to the {@code LowPart} field. */ - public Buffer u_LowPart(@NativeType("DWORD") int value) { LARGE_INTEGER.nu_LowPart(address(), value); return this; } - /** Sets the specified value to the {@code HighPart} field. */ - public Buffer u_HighPart(@NativeType("LONG") int value) { LARGE_INTEGER.nu_HighPart(address(), value); return this; } - /** Sets the specified value to the {@code QuadPart} field. */ - public Buffer QuadPart(@NativeType("LONGLONG") long value) { LARGE_INTEGER.nQuadPart(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/MONITORINFOEX.java b/LWJGL/src/main/java/org/lwjgl/system/windows/MONITORINFOEX.java deleted file mode 100644 index 9bfeb11c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/MONITORINFOEX.java +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about a display monitor. - * - *

    Layout

    - * - *
    
    - * struct MONITORINFOEX {
    - *     DWORD {@link #cbSize};
    - *     {@link RECT RECT} {@link #rcMonitor};
    - *     {@link RECT RECT} {@link #rcWork};
    - *     DWORD {@link #dwFlags};
    - *     TCHAR {@link #szDevice}[32];
    - * }
    - */ -public class MONITORINFOEX extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CBSIZE, - RCMONITOR, - RCWORK, - DWFLAGS, - SZDEVICE; - - static { - Layout layout = __struct( - __member(4), - __member(RECT.SIZEOF, RECT.ALIGNOF), - __member(RECT.SIZEOF, RECT.ALIGNOF), - __member(4), - __array(2, 32) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CBSIZE = layout.offsetof(0); - RCMONITOR = layout.offsetof(1); - RCWORK = layout.offsetof(2); - DWFLAGS = layout.offsetof(3); - SZDEVICE = layout.offsetof(4); - } - - protected MONITORINFOEX(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected MONITORINFOEX create(long address, @Nullable ByteBuffer container) { - return new MONITORINFOEX(address, container); - } - - /** - * Creates a {@code MONITORINFOEX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public MONITORINFOEX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * the size, in bytes, of the structure. - * - *

    Set this member to {@link #SIZEOF} before calling the {@link User32#GetMonitorInfo} function. Doing so lets the function determine the type of structure you - * are passing to it.

    - */ - @NativeType("DWORD") - public int cbSize() { return ncbSize(address()); } - /** - * a {@link RECT} structure that specifies the display monitor rectangle, expressed in virtual-screen coordinates. Note that if the monitor is not the primary - * display monitor, some of the rectangle's coordinates may be negative values. - */ - public RECT rcMonitor() { return nrcMonitor(address()); } - /** - * a {@link RECT} structure that specifies the work area rectangle of the display monitor that can be used by applications, expressed in virtual-screen - * coordinates. Windows uses this rectangle to maximize an application on the monitor. The rest of the area in {@code rcMonitor} contains system windows - * such as the task bar and side bars. Note that if the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative - * values. - */ - public RECT rcWork() { return nrcWork(address()); } - /** the attributes of the display monitor. May be:
    {@link User32#MONITORINFOF_PRIMARY} */ - @NativeType("DWORD") - public int dwFlags() { return ndwFlags(address()); } - /** a string that specifies the device name of the monitor being used */ - @NativeType("TCHAR[32]") - public ByteBuffer szDevice() { return nszDevice(address()); } - /** a string that specifies the device name of the monitor being used */ - @NativeType("TCHAR[32]") - public String szDeviceString() { return nszDeviceString(address()); } - - /** Sets the specified value to the {@link #cbSize} field. */ - public MONITORINFOEX cbSize(@NativeType("DWORD") int value) { ncbSize(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public MONITORINFOEX set(MONITORINFOEX src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code MONITORINFOEX} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static MONITORINFOEX malloc() { - return new MONITORINFOEX(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code MONITORINFOEX} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static MONITORINFOEX calloc() { - return new MONITORINFOEX(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code MONITORINFOEX} instance allocated with {@link BufferUtils}. */ - public static MONITORINFOEX create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new MONITORINFOEX(memAddress(container), container); - } - - /** Returns a new {@code MONITORINFOEX} instance for the specified memory address. */ - public static MONITORINFOEX create(long address) { - return new MONITORINFOEX(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static MONITORINFOEX createSafe(long address) { - return address == NULL ? null : new MONITORINFOEX(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static MONITORINFOEX mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static MONITORINFOEX callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static MONITORINFOEX mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static MONITORINFOEX callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code MONITORINFOEX} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static MONITORINFOEX malloc(MemoryStack stack) { - return new MONITORINFOEX(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code MONITORINFOEX} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static MONITORINFOEX calloc(MemoryStack stack) { - return new MONITORINFOEX(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cbSize}. */ - public static int ncbSize(long struct) { return UNSAFE.getInt(null, struct + MONITORINFOEX.CBSIZE); } - /** Unsafe version of {@link #rcMonitor}. */ - public static RECT nrcMonitor(long struct) { return RECT.create(struct + MONITORINFOEX.RCMONITOR); } - /** Unsafe version of {@link #rcWork}. */ - public static RECT nrcWork(long struct) { return RECT.create(struct + MONITORINFOEX.RCWORK); } - /** Unsafe version of {@link #dwFlags}. */ - public static int ndwFlags(long struct) { return UNSAFE.getInt(null, struct + MONITORINFOEX.DWFLAGS); } - /** Unsafe version of {@link #szDevice}. */ - public static ByteBuffer nszDevice(long struct) { return memByteBuffer(struct + MONITORINFOEX.SZDEVICE, 32 * 2); } - /** Unsafe version of {@link #szDeviceString}. */ - public static String nszDeviceString(long struct) { return memUTF16(struct + MONITORINFOEX.SZDEVICE); } - - /** Unsafe version of {@link #cbSize(int) cbSize}. */ - public static void ncbSize(long struct, int value) { UNSAFE.putInt(null, struct + MONITORINFOEX.CBSIZE, value); } - - // ----------------------------------- - - /** An array of {@link MONITORINFOEX} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final MONITORINFOEX ELEMENT_FACTORY = MONITORINFOEX.create(-1L); - - /** - * Creates a new {@code MONITORINFOEX.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link MONITORINFOEX#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected MONITORINFOEX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link MONITORINFOEX#cbSize} field. */ - @NativeType("DWORD") - public int cbSize() { return MONITORINFOEX.ncbSize(address()); } - /** @return a {@link RECT} view of the {@link MONITORINFOEX#rcMonitor} field. */ - public RECT rcMonitor() { return MONITORINFOEX.nrcMonitor(address()); } - /** @return a {@link RECT} view of the {@link MONITORINFOEX#rcWork} field. */ - public RECT rcWork() { return MONITORINFOEX.nrcWork(address()); } - /** @return the value of the {@link MONITORINFOEX#dwFlags} field. */ - @NativeType("DWORD") - public int dwFlags() { return MONITORINFOEX.ndwFlags(address()); } - /** @return a {@link ByteBuffer} view of the {@link MONITORINFOEX#szDevice} field. */ - @NativeType("TCHAR[32]") - public ByteBuffer szDevice() { return MONITORINFOEX.nszDevice(address()); } - /** @return the null-terminated string stored in the {@link MONITORINFOEX#szDevice} field. */ - @NativeType("TCHAR[32]") - public String szDeviceString() { return MONITORINFOEX.nszDeviceString(address()); } - - /** Sets the specified value to the {@link MONITORINFOEX#cbSize} field. */ - public Buffer cbSize(@NativeType("DWORD") int value) { MONITORINFOEX.ncbSize(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/MOUSEINPUT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/MOUSEINPUT.java deleted file mode 100644 index 5d6242fc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/MOUSEINPUT.java +++ /dev/null @@ -1,418 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about a simulated mouse event. - * - *

    Layout

    - * - *
    
    - * struct MOUSEINPUT {
    - *     LONG {@link #dx};
    - *     LONG {@link #dy};
    - *     DWORD {@link #mouseData};
    - *     DWORD {@link #dwFlags};
    - *     DWORD {@link #time};
    - *     ULONG_PTR {@link #dwExtraInfo};
    - * }
    - */ -public class MOUSEINPUT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - DX, - DY, - MOUSEDATA, - DWFLAGS, - TIME, - DWEXTRAINFO; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - DX = layout.offsetof(0); - DY = layout.offsetof(1); - MOUSEDATA = layout.offsetof(2); - DWFLAGS = layout.offsetof(3); - TIME = layout.offsetof(4); - DWEXTRAINFO = layout.offsetof(5); - } - - protected MOUSEINPUT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected MOUSEINPUT create(long address, @Nullable ByteBuffer container) { - return new MOUSEINPUT(address, container); - } - - /** - * Creates a {@code MOUSEINPUT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public MOUSEINPUT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the {@code dwFlags} - * member. - * - *

    Absolute data is specified as the x coordinate of the mouse; relative data is specified as the number of pixels moved.

    - */ - @NativeType("LONG") - public int dx() { return ndx(address()); } - /** - * the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the {@code dwFlags} - * member. - * - *

    Absolute data is specified as the y coordinate of the mouse; relative data is specified as the number of pixels moved.

    - */ - @NativeType("LONG") - public int dy() { return ndy(address()); } - /** - * If {@code dwFlags} contains {@link User32#MOUSEEVENTF_WHEEL}, then {@code mouseData} specifies the amount of wheel movement. A positive value indicates that the - * wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is - * defined as {@link User32#WHEEL_DELTA}, which is 120. - * - *

    Windows Vista: If {@code dwFlags} contains {@link User32#MOUSEEVENTF_HWHEEL}, then {@code dwData} specifies the amount of wheel movement. A positive value indicates - * that the wheel was rotated to the right; a negative value indicates that the wheel was rotated to the left. One wheel click is defined as - * {@code WHEEL_DELTA}, which is 120.

    - * - *

    If {@code dwFlags} does not contain {@link User32#MOUSEEVENTF_WHEEL}, {@link User32#MOUSEEVENTF_XDOWN}, or {@link User32#MOUSEEVENTF_XUP}, then {@code mouseData} should be zero.

    - * - *

    If {@code dwFlags} contains {@link User32#MOUSEEVENTF_XDOWN} or {@link User32#MOUSEEVENTF_XUP}, then {@code mouseData} specifies which X buttons were pressed or released. This - * value may be any combination of the following flags: {@link User32#XBUTTON1}, {@link User32#XBUTTON2}. One of:

    {@link User32#XBUTTON1}{@link User32#XBUTTON2}
    - */ - @NativeType("DWORD") - public int mouseData() { return nmouseData(address()); } - /** - * A set of bit flags that specify various aspects of mouse motion and button clicks. - * - *

    The bit flags that specify mouse button status are set to indicate changes in status, not ongoing conditions. For example, if the left mouse button is - * pressed and held down, {@link User32#MOUSEEVENTF_LEFTDOWN} is set when the left button is first pressed, but not for subsequent motions. Similarly, - * {@link User32#MOUSEEVENTF_LEFTUP} is set only when the button is first released.

    - * - *

    You cannot specify both the {@link User32#MOUSEEVENTF_WHEEL} flag and either {@link User32#MOUSEEVENTF_XDOWN} or {@link User32#MOUSEEVENTF_XUP} flags simultaneously in the {@code dwFlags} - * parameter, because they both require use of the {@code mouseData} field. One of:

    {@link User32#MOUSEEVENTF_ABSOLUTE}{@link User32#MOUSEEVENTF_HWHEEL}{@link User32#MOUSEEVENTF_MOVE}{@link User32#MOUSEEVENTF_MOVE_NOCOALESCE}
    {@link User32#MOUSEEVENTF_LEFTDOWN}{@link User32#MOUSEEVENTF_LEFTUP}{@link User32#MOUSEEVENTF_RIGHTDOWN}{@link User32#MOUSEEVENTF_RIGHTUP}
    {@link User32#MOUSEEVENTF_MIDDLEDOWN}{@link User32#MOUSEEVENTF_MIDDLEUP}{@link User32#MOUSEEVENTF_VIRTUALDESK}{@link User32#MOUSEEVENTF_WHEEL}
    {@link User32#MOUSEEVENTF_XDOWN}{@link User32#MOUSEEVENTF_XUP}
    - */ - @NativeType("DWORD") - public int dwFlags() { return ndwFlags(address()); } - /** the time stamp for the event, in milliseconds. If this parameter is 0, the system will provide its own time stamp. */ - @NativeType("DWORD") - public int time() { return ntime(address()); } - /** an additional value associated with the mouse event. An application calls {@link User32#GetMessageExtraInfo} to obtain this extra information. */ - @NativeType("ULONG_PTR") - public long dwExtraInfo() { return ndwExtraInfo(address()); } - - /** Sets the specified value to the {@link #dx} field. */ - public MOUSEINPUT dx(@NativeType("LONG") int value) { ndx(address(), value); return this; } - /** Sets the specified value to the {@link #dy} field. */ - public MOUSEINPUT dy(@NativeType("LONG") int value) { ndy(address(), value); return this; } - /** Sets the specified value to the {@link #mouseData} field. */ - public MOUSEINPUT mouseData(@NativeType("DWORD") int value) { nmouseData(address(), value); return this; } - /** Sets the specified value to the {@link #dwFlags} field. */ - public MOUSEINPUT dwFlags(@NativeType("DWORD") int value) { ndwFlags(address(), value); return this; } - /** Sets the specified value to the {@link #time} field. */ - public MOUSEINPUT time(@NativeType("DWORD") int value) { ntime(address(), value); return this; } - /** Sets the specified value to the {@link #dwExtraInfo} field. */ - public MOUSEINPUT dwExtraInfo(@NativeType("ULONG_PTR") long value) { ndwExtraInfo(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public MOUSEINPUT set( - int dx, - int dy, - int mouseData, - int dwFlags, - int time, - long dwExtraInfo - ) { - dx(dx); - dy(dy); - mouseData(mouseData); - dwFlags(dwFlags); - time(time); - dwExtraInfo(dwExtraInfo); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public MOUSEINPUT set(MOUSEINPUT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code MOUSEINPUT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static MOUSEINPUT malloc() { - return new MOUSEINPUT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code MOUSEINPUT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static MOUSEINPUT calloc() { - return new MOUSEINPUT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code MOUSEINPUT} instance allocated with {@link BufferUtils}. */ - public static MOUSEINPUT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new MOUSEINPUT(memAddress(container), container); - } - - /** Returns a new {@code MOUSEINPUT} instance for the specified memory address. */ - public static MOUSEINPUT create(long address) { - return new MOUSEINPUT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static MOUSEINPUT createSafe(long address) { - return address == NULL ? null : new MOUSEINPUT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static MOUSEINPUT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static MOUSEINPUT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static MOUSEINPUT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static MOUSEINPUT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code MOUSEINPUT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static MOUSEINPUT malloc(MemoryStack stack) { - return new MOUSEINPUT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code MOUSEINPUT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static MOUSEINPUT calloc(MemoryStack stack) { - return new MOUSEINPUT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #dx}. */ - public static int ndx(long struct) { return UNSAFE.getInt(null, struct + MOUSEINPUT.DX); } - /** Unsafe version of {@link #dy}. */ - public static int ndy(long struct) { return UNSAFE.getInt(null, struct + MOUSEINPUT.DY); } - /** Unsafe version of {@link #mouseData}. */ - public static int nmouseData(long struct) { return UNSAFE.getInt(null, struct + MOUSEINPUT.MOUSEDATA); } - /** Unsafe version of {@link #dwFlags}. */ - public static int ndwFlags(long struct) { return UNSAFE.getInt(null, struct + MOUSEINPUT.DWFLAGS); } - /** Unsafe version of {@link #time}. */ - public static int ntime(long struct) { return UNSAFE.getInt(null, struct + MOUSEINPUT.TIME); } - /** Unsafe version of {@link #dwExtraInfo}. */ - public static long ndwExtraInfo(long struct) { return memGetAddress(struct + MOUSEINPUT.DWEXTRAINFO); } - - /** Unsafe version of {@link #dx(int) dx}. */ - public static void ndx(long struct, int value) { UNSAFE.putInt(null, struct + MOUSEINPUT.DX, value); } - /** Unsafe version of {@link #dy(int) dy}. */ - public static void ndy(long struct, int value) { UNSAFE.putInt(null, struct + MOUSEINPUT.DY, value); } - /** Unsafe version of {@link #mouseData(int) mouseData}. */ - public static void nmouseData(long struct, int value) { UNSAFE.putInt(null, struct + MOUSEINPUT.MOUSEDATA, value); } - /** Unsafe version of {@link #dwFlags(int) dwFlags}. */ - public static void ndwFlags(long struct, int value) { UNSAFE.putInt(null, struct + MOUSEINPUT.DWFLAGS, value); } - /** Unsafe version of {@link #time(int) time}. */ - public static void ntime(long struct, int value) { UNSAFE.putInt(null, struct + MOUSEINPUT.TIME, value); } - /** Unsafe version of {@link #dwExtraInfo(long) dwExtraInfo}. */ - public static void ndwExtraInfo(long struct, long value) { memPutAddress(struct + MOUSEINPUT.DWEXTRAINFO, value); } - - // ----------------------------------- - - /** An array of {@link MOUSEINPUT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final MOUSEINPUT ELEMENT_FACTORY = MOUSEINPUT.create(-1L); - - /** - * Creates a new {@code MOUSEINPUT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link MOUSEINPUT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected MOUSEINPUT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link MOUSEINPUT#dx} field. */ - @NativeType("LONG") - public int dx() { return MOUSEINPUT.ndx(address()); } - /** @return the value of the {@link MOUSEINPUT#dy} field. */ - @NativeType("LONG") - public int dy() { return MOUSEINPUT.ndy(address()); } - /** @return the value of the {@link MOUSEINPUT#mouseData} field. */ - @NativeType("DWORD") - public int mouseData() { return MOUSEINPUT.nmouseData(address()); } - /** @return the value of the {@link MOUSEINPUT#dwFlags} field. */ - @NativeType("DWORD") - public int dwFlags() { return MOUSEINPUT.ndwFlags(address()); } - /** @return the value of the {@link MOUSEINPUT#time} field. */ - @NativeType("DWORD") - public int time() { return MOUSEINPUT.ntime(address()); } - /** @return the value of the {@link MOUSEINPUT#dwExtraInfo} field. */ - @NativeType("ULONG_PTR") - public long dwExtraInfo() { return MOUSEINPUT.ndwExtraInfo(address()); } - - /** Sets the specified value to the {@link MOUSEINPUT#dx} field. */ - public Buffer dx(@NativeType("LONG") int value) { MOUSEINPUT.ndx(address(), value); return this; } - /** Sets the specified value to the {@link MOUSEINPUT#dy} field. */ - public Buffer dy(@NativeType("LONG") int value) { MOUSEINPUT.ndy(address(), value); return this; } - /** Sets the specified value to the {@link MOUSEINPUT#mouseData} field. */ - public Buffer mouseData(@NativeType("DWORD") int value) { MOUSEINPUT.nmouseData(address(), value); return this; } - /** Sets the specified value to the {@link MOUSEINPUT#dwFlags} field. */ - public Buffer dwFlags(@NativeType("DWORD") int value) { MOUSEINPUT.ndwFlags(address(), value); return this; } - /** Sets the specified value to the {@link MOUSEINPUT#time} field. */ - public Buffer time(@NativeType("DWORD") int value) { MOUSEINPUT.ntime(address(), value); return this; } - /** Sets the specified value to the {@link MOUSEINPUT#dwExtraInfo} field. */ - public Buffer dwExtraInfo(@NativeType("ULONG_PTR") long value) { MOUSEINPUT.ndwExtraInfo(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/MSG.java b/LWJGL/src/main/java/org/lwjgl/system/windows/MSG.java deleted file mode 100644 index 0c378ebf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/MSG.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains message information from a thread's message queue. - * - *

    Layout

    - * - *
    
    - * struct MSG {
    - *     HWND {@link #hwnd};
    - *     UINT {@link #message};
    - *     WPARAM {@link #wParam};
    - *     LPARAM {@link #lParam};
    - *     DWORD {@link #time};
    - *     {@link POINT POINT} {@link #pt};
    - * }
    - */ -public class MSG extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - HWND, - MESSAGE, - WPARAM, - LPARAM, - TIME, - PT; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(POINT.SIZEOF, POINT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - HWND = layout.offsetof(0); - MESSAGE = layout.offsetof(1); - WPARAM = layout.offsetof(2); - LPARAM = layout.offsetof(3); - TIME = layout.offsetof(4); - PT = layout.offsetof(5); - } - - protected MSG(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected MSG create(long address, @Nullable ByteBuffer container) { - return new MSG(address, container); - } - - /** - * Creates a {@code MSG} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public MSG(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** a handle to the window whose window procedure receives the message. This member is {@code NULL} when the message is a thread message. */ - @NativeType("HWND") - public long hwnd() { return nhwnd(address()); } - /** the message identifier. Applications can only use the low word; the high word is reserved by the system. */ - @NativeType("UINT") - public int message() { return nmessage(address()); } - /** additional information about the message. The exact meaning depends on the value of the message member. */ - @NativeType("WPARAM") - public long wParam() { return nwParam(address()); } - /** additional information about the message. The exact meaning depends on the value of the message member. */ - @NativeType("LPARAM") - public long lParam() { return nlParam(address()); } - /** the time at which the message was posted */ - @NativeType("DWORD") - public int time() { return ntime(address()); } - /** the cursor position, in screen coordinates, when the message was posted. */ - public POINT pt() { return npt(address()); } - - /** Sets the specified value to the {@link #hwnd} field. */ - public MSG hwnd(@NativeType("HWND") long value) { nhwnd(address(), value); return this; } - /** Sets the specified value to the {@link #message} field. */ - public MSG message(@NativeType("UINT") int value) { nmessage(address(), value); return this; } - /** Sets the specified value to the {@link #wParam} field. */ - public MSG wParam(@NativeType("WPARAM") long value) { nwParam(address(), value); return this; } - /** Sets the specified value to the {@link #lParam} field. */ - public MSG lParam(@NativeType("LPARAM") long value) { nlParam(address(), value); return this; } - /** Sets the specified value to the {@link #time} field. */ - public MSG time(@NativeType("DWORD") int value) { ntime(address(), value); return this; } - /** Copies the specified {@link POINT} to the {@link #pt} field. */ - public MSG pt(POINT value) { npt(address(), value); return this; } - /** Passes the {@link #pt} field to the specified {@link java.util.function.Consumer Consumer}. */ - public MSG pt(java.util.function.Consumer consumer) { consumer.accept(pt()); return this; } - - /** Initializes this struct with the specified values. */ - public MSG set( - long hwnd, - int message, - long wParam, - long lParam, - int time, - POINT pt - ) { - hwnd(hwnd); - message(message); - wParam(wParam); - lParam(lParam); - time(time); - pt(pt); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public MSG set(MSG src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code MSG} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static MSG malloc() { - return new MSG(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code MSG} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static MSG calloc() { - return new MSG(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code MSG} instance allocated with {@link BufferUtils}. */ - public static MSG create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new MSG(memAddress(container), container); - } - - /** Returns a new {@code MSG} instance for the specified memory address. */ - public static MSG create(long address) { - return new MSG(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static MSG createSafe(long address) { - return address == NULL ? null : new MSG(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static MSG mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static MSG callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static MSG mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static MSG callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code MSG} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static MSG malloc(MemoryStack stack) { - return new MSG(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code MSG} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static MSG calloc(MemoryStack stack) { - return new MSG(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #hwnd}. */ - public static long nhwnd(long struct) { return memGetAddress(struct + MSG.HWND); } - /** Unsafe version of {@link #message}. */ - public static int nmessage(long struct) { return UNSAFE.getInt(null, struct + MSG.MESSAGE); } - /** Unsafe version of {@link #wParam}. */ - public static long nwParam(long struct) { return memGetAddress(struct + MSG.WPARAM); } - /** Unsafe version of {@link #lParam}. */ - public static long nlParam(long struct) { return memGetAddress(struct + MSG.LPARAM); } - /** Unsafe version of {@link #time}. */ - public static int ntime(long struct) { return UNSAFE.getInt(null, struct + MSG.TIME); } - /** Unsafe version of {@link #pt}. */ - public static POINT npt(long struct) { return POINT.create(struct + MSG.PT); } - - /** Unsafe version of {@link #hwnd(long) hwnd}. */ - public static void nhwnd(long struct, long value) { memPutAddress(struct + MSG.HWND, value); } - /** Unsafe version of {@link #message(int) message}. */ - public static void nmessage(long struct, int value) { UNSAFE.putInt(null, struct + MSG.MESSAGE, value); } - /** Unsafe version of {@link #wParam(long) wParam}. */ - public static void nwParam(long struct, long value) { memPutAddress(struct + MSG.WPARAM, value); } - /** Unsafe version of {@link #lParam(long) lParam}. */ - public static void nlParam(long struct, long value) { memPutAddress(struct + MSG.LPARAM, value); } - /** Unsafe version of {@link #time(int) time}. */ - public static void ntime(long struct, int value) { UNSAFE.putInt(null, struct + MSG.TIME, value); } - /** Unsafe version of {@link #pt(POINT) pt}. */ - public static void npt(long struct, POINT value) { memCopy(value.address(), struct + MSG.PT, POINT.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link MSG} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final MSG ELEMENT_FACTORY = MSG.create(-1L); - - /** - * Creates a new {@code MSG.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link MSG#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected MSG getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link MSG#hwnd} field. */ - @NativeType("HWND") - public long hwnd() { return MSG.nhwnd(address()); } - /** @return the value of the {@link MSG#message} field. */ - @NativeType("UINT") - public int message() { return MSG.nmessage(address()); } - /** @return the value of the {@link MSG#wParam} field. */ - @NativeType("WPARAM") - public long wParam() { return MSG.nwParam(address()); } - /** @return the value of the {@link MSG#lParam} field. */ - @NativeType("LPARAM") - public long lParam() { return MSG.nlParam(address()); } - /** @return the value of the {@link MSG#time} field. */ - @NativeType("DWORD") - public int time() { return MSG.ntime(address()); } - /** @return a {@link POINT} view of the {@link MSG#pt} field. */ - public POINT pt() { return MSG.npt(address()); } - - /** Sets the specified value to the {@link MSG#hwnd} field. */ - public Buffer hwnd(@NativeType("HWND") long value) { MSG.nhwnd(address(), value); return this; } - /** Sets the specified value to the {@link MSG#message} field. */ - public Buffer message(@NativeType("UINT") int value) { MSG.nmessage(address(), value); return this; } - /** Sets the specified value to the {@link MSG#wParam} field. */ - public Buffer wParam(@NativeType("WPARAM") long value) { MSG.nwParam(address(), value); return this; } - /** Sets the specified value to the {@link MSG#lParam} field. */ - public Buffer lParam(@NativeType("LPARAM") long value) { MSG.nlParam(address(), value); return this; } - /** Sets the specified value to the {@link MSG#time} field. */ - public Buffer time(@NativeType("DWORD") int value) { MSG.ntime(address(), value); return this; } - /** Copies the specified {@link POINT} to the {@link MSG#pt} field. */ - public Buffer pt(POINT value) { MSG.npt(address(), value); return this; } - /** Passes the {@link MSG#pt} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pt(java.util.function.Consumer consumer) { consumer.accept(pt()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/PIXELFORMATDESCRIPTOR.java b/LWJGL/src/main/java/org/lwjgl/system/windows/PIXELFORMATDESCRIPTOR.java deleted file mode 100644 index 5f130f94..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/PIXELFORMATDESCRIPTOR.java +++ /dev/null @@ -1,795 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Describes the pixel format of a drawing surface. - * - *

    Layout

    - * - *
    
    - * struct PIXELFORMATDESCRIPTOR {
    - *     WORD {@link #nSize};
    - *     WORD {@link #nVersion};
    - *     DWORD {@link #dwFlags};
    - *     BYTE {@link #iPixelType};
    - *     BYTE {@link #cColorBits};
    - *     BYTE {@link #cRedBits};
    - *     BYTE {@link #cRedShift};
    - *     BYTE {@link #cGreenBits};
    - *     BYTE {@link #cGreenShift};
    - *     BYTE {@link #cBlueBits};
    - *     BYTE {@link #cBlueShift};
    - *     BYTE {@link #cAlphaBits};
    - *     BYTE {@link #cAlphaShift};
    - *     BYTE {@link #cAccumBits};
    - *     BYTE {@link #cAccumRedBits};
    - *     BYTE {@link #cAccumGreenBits};
    - *     BYTE {@link #cAccumBlueBits};
    - *     BYTE {@link #cAccumAlphaBits};
    - *     BYTE {@link #cDepthBits};
    - *     BYTE {@link #cStencilBits};
    - *     BYTE {@link #cAuxBuffers};
    - *     BYTE {@link #iLayerType};
    - *     BYTE {@link #bReserved};
    - *     DWORD {@link #dwLayerMask};
    - *     DWORD {@link #dwVisibleMask};
    - *     DWORD {@link #dwDamageMask};
    - * }
    - */ -public class PIXELFORMATDESCRIPTOR extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NSIZE, - NVERSION, - DWFLAGS, - IPIXELTYPE, - CCOLORBITS, - CREDBITS, - CREDSHIFT, - CGREENBITS, - CGREENSHIFT, - CBLUEBITS, - CBLUESHIFT, - CALPHABITS, - CALPHASHIFT, - CACCUMBITS, - CACCUMREDBITS, - CACCUMGREENBITS, - CACCUMBLUEBITS, - CACCUMALPHABITS, - CDEPTHBITS, - CSTENCILBITS, - CAUXBUFFERS, - ILAYERTYPE, - BRESERVED, - DWLAYERMASK, - DWVISIBLEMASK, - DWDAMAGEMASK; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(4), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NSIZE = layout.offsetof(0); - NVERSION = layout.offsetof(1); - DWFLAGS = layout.offsetof(2); - IPIXELTYPE = layout.offsetof(3); - CCOLORBITS = layout.offsetof(4); - CREDBITS = layout.offsetof(5); - CREDSHIFT = layout.offsetof(6); - CGREENBITS = layout.offsetof(7); - CGREENSHIFT = layout.offsetof(8); - CBLUEBITS = layout.offsetof(9); - CBLUESHIFT = layout.offsetof(10); - CALPHABITS = layout.offsetof(11); - CALPHASHIFT = layout.offsetof(12); - CACCUMBITS = layout.offsetof(13); - CACCUMREDBITS = layout.offsetof(14); - CACCUMGREENBITS = layout.offsetof(15); - CACCUMBLUEBITS = layout.offsetof(16); - CACCUMALPHABITS = layout.offsetof(17); - CDEPTHBITS = layout.offsetof(18); - CSTENCILBITS = layout.offsetof(19); - CAUXBUFFERS = layout.offsetof(20); - ILAYERTYPE = layout.offsetof(21); - BRESERVED = layout.offsetof(22); - DWLAYERMASK = layout.offsetof(23); - DWVISIBLEMASK = layout.offsetof(24); - DWDAMAGEMASK = layout.offsetof(25); - } - - protected PIXELFORMATDESCRIPTOR(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected PIXELFORMATDESCRIPTOR create(long address, @Nullable ByteBuffer container) { - return new PIXELFORMATDESCRIPTOR(address, container); - } - - /** - * Creates a {@code PIXELFORMATDESCRIPTOR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public PIXELFORMATDESCRIPTOR(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** specifies the size of this data structure. This value should be set to {@link #SIZEOF}. */ - @NativeType("WORD") - public short nSize() { return nnSize(address()); } - /** specifies the version of this data structure. This value should be set to 1 */ - @NativeType("WORD") - public short nVersion() { return nnVersion(address()); } - /** a set of bit flags that specify properties of the pixel buffer */ - @NativeType("DWORD") - public int dwFlags() { return ndwFlags(address()); } - /** specifies the type of pixel data */ - @NativeType("BYTE") - public byte iPixelType() { return niPixelType(address()); } - /** - * specifies the number of color bitplanes in each color buffer. For RGBA pixel types, it is the size of the color buffer, excluding the alpha bitplanes. - * For color-index pixels, it is the size of the color-index buffer. - */ - @NativeType("BYTE") - public byte cColorBits() { return ncColorBits(address()); } - /** specifies the number of red bitplanes in each RGBA color buffer */ - @NativeType("BYTE") - public byte cRedBits() { return ncRedBits(address()); } - /** specifies the shift count for red bitplanes in each RGBA color buffer */ - @NativeType("BYTE") - public byte cRedShift() { return ncRedShift(address()); } - /** specifies the number of green bitplanes in each RGBA color buffer */ - @NativeType("BYTE") - public byte cGreenBits() { return ncGreenBits(address()); } - /** specifies the shift count for green bitplanes in each RGBA color buffer */ - @NativeType("BYTE") - public byte cGreenShift() { return ncGreenShift(address()); } - /** specifies the number of blue bitplanes in each RGBA color buffer */ - @NativeType("BYTE") - public byte cBlueBits() { return ncBlueBits(address()); } - /** specifies the shift count for blue bitplanes in each RGBA color buffer */ - @NativeType("BYTE") - public byte cBlueShift() { return ncBlueShift(address()); } - /** specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported */ - @NativeType("BYTE") - public byte cAlphaBits() { return ncAlphaBits(address()); } - /** specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported */ - @NativeType("BYTE") - public byte cAlphaShift() { return ncAlphaShift(address()); } - /** specifies the total number of bitplanes in the accumulation buffer */ - @NativeType("BYTE") - public byte cAccumBits() { return ncAccumBits(address()); } - /** specifies the number of red bitplanes in the accumulation buffer */ - @NativeType("BYTE") - public byte cAccumRedBits() { return ncAccumRedBits(address()); } - /** specifies the number of green bitplanes in the accumulation buffer */ - @NativeType("BYTE") - public byte cAccumGreenBits() { return ncAccumGreenBits(address()); } - /** specifies the number of blue bitplanes in the accumulation buffer */ - @NativeType("BYTE") - public byte cAccumBlueBits() { return ncAccumBlueBits(address()); } - /** specifies the number of alpha bitplanes in the accumulation buffer */ - @NativeType("BYTE") - public byte cAccumAlphaBits() { return ncAccumAlphaBits(address()); } - /** specifies the depth of the depth (z-axis) buffer */ - @NativeType("BYTE") - public byte cDepthBits() { return ncDepthBits(address()); } - /** specifies the depth of the stencil buffer */ - @NativeType("BYTE") - public byte cStencilBits() { return ncStencilBits(address()); } - /** specifies the number of auxiliary buffers. Auxiliary buffers are not supported */ - @NativeType("BYTE") - public byte cAuxBuffers() { return ncAuxBuffers(address()); } - /** Ignored. Earlier implementations of OpenGL used this member, but it is no longer used. */ - @NativeType("BYTE") - public byte iLayerType() { return niLayerType(address()); } - /** - * specifies the number of overlay and underlay planes. Bits 0 through 3 specify up to 15 overlay planes and bits 4 through 7 specify up to 15 underlay - * planes - */ - @NativeType("BYTE") - public byte bReserved() { return nbReserved(address()); } - /** Ignored. Earlier implementations of OpenGL used this member, but it is no longer used. */ - @NativeType("DWORD") - public int dwLayerMask() { return ndwLayerMask(address()); } - /** - * specifies the transparent color or index of an underlay plane. When the pixel type is RGBA, {@code dwVisibleMask} is a transparent RGB color value. - * When the pixel type is color index, it is a transparent index value. - */ - @NativeType("DWORD") - public int dwVisibleMask() { return ndwVisibleMask(address()); } - /** Ignored. Earlier implementations of OpenGL used this member, but it is no longer used. */ - @NativeType("DWORD") - public int dwDamageMask() { return ndwDamageMask(address()); } - - /** Sets the specified value to the {@link #nSize} field. */ - public PIXELFORMATDESCRIPTOR nSize(@NativeType("WORD") short value) { nnSize(address(), value); return this; } - /** Sets the specified value to the {@link #nVersion} field. */ - public PIXELFORMATDESCRIPTOR nVersion(@NativeType("WORD") short value) { nnVersion(address(), value); return this; } - /** Sets the specified value to the {@link #dwFlags} field. */ - public PIXELFORMATDESCRIPTOR dwFlags(@NativeType("DWORD") int value) { ndwFlags(address(), value); return this; } - /** Sets the specified value to the {@link #iPixelType} field. */ - public PIXELFORMATDESCRIPTOR iPixelType(@NativeType("BYTE") byte value) { niPixelType(address(), value); return this; } - /** Sets the specified value to the {@link #cColorBits} field. */ - public PIXELFORMATDESCRIPTOR cColorBits(@NativeType("BYTE") byte value) { ncColorBits(address(), value); return this; } - /** Sets the specified value to the {@link #cRedBits} field. */ - public PIXELFORMATDESCRIPTOR cRedBits(@NativeType("BYTE") byte value) { ncRedBits(address(), value); return this; } - /** Sets the specified value to the {@link #cRedShift} field. */ - public PIXELFORMATDESCRIPTOR cRedShift(@NativeType("BYTE") byte value) { ncRedShift(address(), value); return this; } - /** Sets the specified value to the {@link #cGreenBits} field. */ - public PIXELFORMATDESCRIPTOR cGreenBits(@NativeType("BYTE") byte value) { ncGreenBits(address(), value); return this; } - /** Sets the specified value to the {@link #cGreenShift} field. */ - public PIXELFORMATDESCRIPTOR cGreenShift(@NativeType("BYTE") byte value) { ncGreenShift(address(), value); return this; } - /** Sets the specified value to the {@link #cBlueBits} field. */ - public PIXELFORMATDESCRIPTOR cBlueBits(@NativeType("BYTE") byte value) { ncBlueBits(address(), value); return this; } - /** Sets the specified value to the {@link #cBlueShift} field. */ - public PIXELFORMATDESCRIPTOR cBlueShift(@NativeType("BYTE") byte value) { ncBlueShift(address(), value); return this; } - /** Sets the specified value to the {@link #cAlphaBits} field. */ - public PIXELFORMATDESCRIPTOR cAlphaBits(@NativeType("BYTE") byte value) { ncAlphaBits(address(), value); return this; } - /** Sets the specified value to the {@link #cAlphaShift} field. */ - public PIXELFORMATDESCRIPTOR cAlphaShift(@NativeType("BYTE") byte value) { ncAlphaShift(address(), value); return this; } - /** Sets the specified value to the {@link #cAccumBits} field. */ - public PIXELFORMATDESCRIPTOR cAccumBits(@NativeType("BYTE") byte value) { ncAccumBits(address(), value); return this; } - /** Sets the specified value to the {@link #cAccumRedBits} field. */ - public PIXELFORMATDESCRIPTOR cAccumRedBits(@NativeType("BYTE") byte value) { ncAccumRedBits(address(), value); return this; } - /** Sets the specified value to the {@link #cAccumGreenBits} field. */ - public PIXELFORMATDESCRIPTOR cAccumGreenBits(@NativeType("BYTE") byte value) { ncAccumGreenBits(address(), value); return this; } - /** Sets the specified value to the {@link #cAccumBlueBits} field. */ - public PIXELFORMATDESCRIPTOR cAccumBlueBits(@NativeType("BYTE") byte value) { ncAccumBlueBits(address(), value); return this; } - /** Sets the specified value to the {@link #cAccumAlphaBits} field. */ - public PIXELFORMATDESCRIPTOR cAccumAlphaBits(@NativeType("BYTE") byte value) { ncAccumAlphaBits(address(), value); return this; } - /** Sets the specified value to the {@link #cDepthBits} field. */ - public PIXELFORMATDESCRIPTOR cDepthBits(@NativeType("BYTE") byte value) { ncDepthBits(address(), value); return this; } - /** Sets the specified value to the {@link #cStencilBits} field. */ - public PIXELFORMATDESCRIPTOR cStencilBits(@NativeType("BYTE") byte value) { ncStencilBits(address(), value); return this; } - /** Sets the specified value to the {@link #cAuxBuffers} field. */ - public PIXELFORMATDESCRIPTOR cAuxBuffers(@NativeType("BYTE") byte value) { ncAuxBuffers(address(), value); return this; } - /** Sets the specified value to the {@link #iLayerType} field. */ - public PIXELFORMATDESCRIPTOR iLayerType(@NativeType("BYTE") byte value) { niLayerType(address(), value); return this; } - /** Sets the specified value to the {@link #bReserved} field. */ - public PIXELFORMATDESCRIPTOR bReserved(@NativeType("BYTE") byte value) { nbReserved(address(), value); return this; } - /** Sets the specified value to the {@link #dwLayerMask} field. */ - public PIXELFORMATDESCRIPTOR dwLayerMask(@NativeType("DWORD") int value) { ndwLayerMask(address(), value); return this; } - /** Sets the specified value to the {@link #dwVisibleMask} field. */ - public PIXELFORMATDESCRIPTOR dwVisibleMask(@NativeType("DWORD") int value) { ndwVisibleMask(address(), value); return this; } - /** Sets the specified value to the {@link #dwDamageMask} field. */ - public PIXELFORMATDESCRIPTOR dwDamageMask(@NativeType("DWORD") int value) { ndwDamageMask(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public PIXELFORMATDESCRIPTOR set( - short nSize, - short nVersion, - int dwFlags, - byte iPixelType, - byte cColorBits, - byte cRedBits, - byte cRedShift, - byte cGreenBits, - byte cGreenShift, - byte cBlueBits, - byte cBlueShift, - byte cAlphaBits, - byte cAlphaShift, - byte cAccumBits, - byte cAccumRedBits, - byte cAccumGreenBits, - byte cAccumBlueBits, - byte cAccumAlphaBits, - byte cDepthBits, - byte cStencilBits, - byte cAuxBuffers, - byte iLayerType, - byte bReserved, - int dwLayerMask, - int dwVisibleMask, - int dwDamageMask - ) { - nSize(nSize); - nVersion(nVersion); - dwFlags(dwFlags); - iPixelType(iPixelType); - cColorBits(cColorBits); - cRedBits(cRedBits); - cRedShift(cRedShift); - cGreenBits(cGreenBits); - cGreenShift(cGreenShift); - cBlueBits(cBlueBits); - cBlueShift(cBlueShift); - cAlphaBits(cAlphaBits); - cAlphaShift(cAlphaShift); - cAccumBits(cAccumBits); - cAccumRedBits(cAccumRedBits); - cAccumGreenBits(cAccumGreenBits); - cAccumBlueBits(cAccumBlueBits); - cAccumAlphaBits(cAccumAlphaBits); - cDepthBits(cDepthBits); - cStencilBits(cStencilBits); - cAuxBuffers(cAuxBuffers); - iLayerType(iLayerType); - bReserved(bReserved); - dwLayerMask(dwLayerMask); - dwVisibleMask(dwVisibleMask); - dwDamageMask(dwDamageMask); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public PIXELFORMATDESCRIPTOR set(PIXELFORMATDESCRIPTOR src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code PIXELFORMATDESCRIPTOR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static PIXELFORMATDESCRIPTOR malloc() { - return new PIXELFORMATDESCRIPTOR(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code PIXELFORMATDESCRIPTOR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static PIXELFORMATDESCRIPTOR calloc() { - return new PIXELFORMATDESCRIPTOR(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code PIXELFORMATDESCRIPTOR} instance allocated with {@link BufferUtils}. */ - public static PIXELFORMATDESCRIPTOR create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new PIXELFORMATDESCRIPTOR(memAddress(container), container); - } - - /** Returns a new {@code PIXELFORMATDESCRIPTOR} instance for the specified memory address. */ - public static PIXELFORMATDESCRIPTOR create(long address) { - return new PIXELFORMATDESCRIPTOR(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static PIXELFORMATDESCRIPTOR createSafe(long address) { - return address == NULL ? null : new PIXELFORMATDESCRIPTOR(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static PIXELFORMATDESCRIPTOR mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static PIXELFORMATDESCRIPTOR callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static PIXELFORMATDESCRIPTOR mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static PIXELFORMATDESCRIPTOR callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code PIXELFORMATDESCRIPTOR} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static PIXELFORMATDESCRIPTOR malloc(MemoryStack stack) { - return new PIXELFORMATDESCRIPTOR(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code PIXELFORMATDESCRIPTOR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static PIXELFORMATDESCRIPTOR calloc(MemoryStack stack) { - return new PIXELFORMATDESCRIPTOR(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #nSize}. */ - public static short nnSize(long struct) { return UNSAFE.getShort(null, struct + PIXELFORMATDESCRIPTOR.NSIZE); } - /** Unsafe version of {@link #nVersion}. */ - public static short nnVersion(long struct) { return UNSAFE.getShort(null, struct + PIXELFORMATDESCRIPTOR.NVERSION); } - /** Unsafe version of {@link #dwFlags}. */ - public static int ndwFlags(long struct) { return UNSAFE.getInt(null, struct + PIXELFORMATDESCRIPTOR.DWFLAGS); } - /** Unsafe version of {@link #iPixelType}. */ - public static byte niPixelType(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.IPIXELTYPE); } - /** Unsafe version of {@link #cColorBits}. */ - public static byte ncColorBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CCOLORBITS); } - /** Unsafe version of {@link #cRedBits}. */ - public static byte ncRedBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CREDBITS); } - /** Unsafe version of {@link #cRedShift}. */ - public static byte ncRedShift(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CREDSHIFT); } - /** Unsafe version of {@link #cGreenBits}. */ - public static byte ncGreenBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CGREENBITS); } - /** Unsafe version of {@link #cGreenShift}. */ - public static byte ncGreenShift(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CGREENSHIFT); } - /** Unsafe version of {@link #cBlueBits}. */ - public static byte ncBlueBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CBLUEBITS); } - /** Unsafe version of {@link #cBlueShift}. */ - public static byte ncBlueShift(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CBLUESHIFT); } - /** Unsafe version of {@link #cAlphaBits}. */ - public static byte ncAlphaBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CALPHABITS); } - /** Unsafe version of {@link #cAlphaShift}. */ - public static byte ncAlphaShift(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CALPHASHIFT); } - /** Unsafe version of {@link #cAccumBits}. */ - public static byte ncAccumBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMBITS); } - /** Unsafe version of {@link #cAccumRedBits}. */ - public static byte ncAccumRedBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMREDBITS); } - /** Unsafe version of {@link #cAccumGreenBits}. */ - public static byte ncAccumGreenBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMGREENBITS); } - /** Unsafe version of {@link #cAccumBlueBits}. */ - public static byte ncAccumBlueBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMBLUEBITS); } - /** Unsafe version of {@link #cAccumAlphaBits}. */ - public static byte ncAccumAlphaBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMALPHABITS); } - /** Unsafe version of {@link #cDepthBits}. */ - public static byte ncDepthBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CDEPTHBITS); } - /** Unsafe version of {@link #cStencilBits}. */ - public static byte ncStencilBits(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CSTENCILBITS); } - /** Unsafe version of {@link #cAuxBuffers}. */ - public static byte ncAuxBuffers(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.CAUXBUFFERS); } - /** Unsafe version of {@link #iLayerType}. */ - public static byte niLayerType(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.ILAYERTYPE); } - /** Unsafe version of {@link #bReserved}. */ - public static byte nbReserved(long struct) { return UNSAFE.getByte(null, struct + PIXELFORMATDESCRIPTOR.BRESERVED); } - /** Unsafe version of {@link #dwLayerMask}. */ - public static int ndwLayerMask(long struct) { return UNSAFE.getInt(null, struct + PIXELFORMATDESCRIPTOR.DWLAYERMASK); } - /** Unsafe version of {@link #dwVisibleMask}. */ - public static int ndwVisibleMask(long struct) { return UNSAFE.getInt(null, struct + PIXELFORMATDESCRIPTOR.DWVISIBLEMASK); } - /** Unsafe version of {@link #dwDamageMask}. */ - public static int ndwDamageMask(long struct) { return UNSAFE.getInt(null, struct + PIXELFORMATDESCRIPTOR.DWDAMAGEMASK); } - - /** Unsafe version of {@link #nSize(short) nSize}. */ - public static void nnSize(long struct, short value) { UNSAFE.putShort(null, struct + PIXELFORMATDESCRIPTOR.NSIZE, value); } - /** Unsafe version of {@link #nVersion(short) nVersion}. */ - public static void nnVersion(long struct, short value) { UNSAFE.putShort(null, struct + PIXELFORMATDESCRIPTOR.NVERSION, value); } - /** Unsafe version of {@link #dwFlags(int) dwFlags}. */ - public static void ndwFlags(long struct, int value) { UNSAFE.putInt(null, struct + PIXELFORMATDESCRIPTOR.DWFLAGS, value); } - /** Unsafe version of {@link #iPixelType(byte) iPixelType}. */ - public static void niPixelType(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.IPIXELTYPE, value); } - /** Unsafe version of {@link #cColorBits(byte) cColorBits}. */ - public static void ncColorBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CCOLORBITS, value); } - /** Unsafe version of {@link #cRedBits(byte) cRedBits}. */ - public static void ncRedBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CREDBITS, value); } - /** Unsafe version of {@link #cRedShift(byte) cRedShift}. */ - public static void ncRedShift(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CREDSHIFT, value); } - /** Unsafe version of {@link #cGreenBits(byte) cGreenBits}. */ - public static void ncGreenBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CGREENBITS, value); } - /** Unsafe version of {@link #cGreenShift(byte) cGreenShift}. */ - public static void ncGreenShift(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CGREENSHIFT, value); } - /** Unsafe version of {@link #cBlueBits(byte) cBlueBits}. */ - public static void ncBlueBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CBLUEBITS, value); } - /** Unsafe version of {@link #cBlueShift(byte) cBlueShift}. */ - public static void ncBlueShift(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CBLUESHIFT, value); } - /** Unsafe version of {@link #cAlphaBits(byte) cAlphaBits}. */ - public static void ncAlphaBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CALPHABITS, value); } - /** Unsafe version of {@link #cAlphaShift(byte) cAlphaShift}. */ - public static void ncAlphaShift(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CALPHASHIFT, value); } - /** Unsafe version of {@link #cAccumBits(byte) cAccumBits}. */ - public static void ncAccumBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMBITS, value); } - /** Unsafe version of {@link #cAccumRedBits(byte) cAccumRedBits}. */ - public static void ncAccumRedBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMREDBITS, value); } - /** Unsafe version of {@link #cAccumGreenBits(byte) cAccumGreenBits}. */ - public static void ncAccumGreenBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMGREENBITS, value); } - /** Unsafe version of {@link #cAccumBlueBits(byte) cAccumBlueBits}. */ - public static void ncAccumBlueBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMBLUEBITS, value); } - /** Unsafe version of {@link #cAccumAlphaBits(byte) cAccumAlphaBits}. */ - public static void ncAccumAlphaBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CACCUMALPHABITS, value); } - /** Unsafe version of {@link #cDepthBits(byte) cDepthBits}. */ - public static void ncDepthBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CDEPTHBITS, value); } - /** Unsafe version of {@link #cStencilBits(byte) cStencilBits}. */ - public static void ncStencilBits(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CSTENCILBITS, value); } - /** Unsafe version of {@link #cAuxBuffers(byte) cAuxBuffers}. */ - public static void ncAuxBuffers(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.CAUXBUFFERS, value); } - /** Unsafe version of {@link #iLayerType(byte) iLayerType}. */ - public static void niLayerType(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.ILAYERTYPE, value); } - /** Unsafe version of {@link #bReserved(byte) bReserved}. */ - public static void nbReserved(long struct, byte value) { UNSAFE.putByte(null, struct + PIXELFORMATDESCRIPTOR.BRESERVED, value); } - /** Unsafe version of {@link #dwLayerMask(int) dwLayerMask}. */ - public static void ndwLayerMask(long struct, int value) { UNSAFE.putInt(null, struct + PIXELFORMATDESCRIPTOR.DWLAYERMASK, value); } - /** Unsafe version of {@link #dwVisibleMask(int) dwVisibleMask}. */ - public static void ndwVisibleMask(long struct, int value) { UNSAFE.putInt(null, struct + PIXELFORMATDESCRIPTOR.DWVISIBLEMASK, value); } - /** Unsafe version of {@link #dwDamageMask(int) dwDamageMask}. */ - public static void ndwDamageMask(long struct, int value) { UNSAFE.putInt(null, struct + PIXELFORMATDESCRIPTOR.DWDAMAGEMASK, value); } - - // ----------------------------------- - - /** An array of {@link PIXELFORMATDESCRIPTOR} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final PIXELFORMATDESCRIPTOR ELEMENT_FACTORY = PIXELFORMATDESCRIPTOR.create(-1L); - - /** - * Creates a new {@code PIXELFORMATDESCRIPTOR.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link PIXELFORMATDESCRIPTOR#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected PIXELFORMATDESCRIPTOR getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#nSize} field. */ - @NativeType("WORD") - public short nSize() { return PIXELFORMATDESCRIPTOR.nnSize(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#nVersion} field. */ - @NativeType("WORD") - public short nVersion() { return PIXELFORMATDESCRIPTOR.nnVersion(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#dwFlags} field. */ - @NativeType("DWORD") - public int dwFlags() { return PIXELFORMATDESCRIPTOR.ndwFlags(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#iPixelType} field. */ - @NativeType("BYTE") - public byte iPixelType() { return PIXELFORMATDESCRIPTOR.niPixelType(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cColorBits} field. */ - @NativeType("BYTE") - public byte cColorBits() { return PIXELFORMATDESCRIPTOR.ncColorBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cRedBits} field. */ - @NativeType("BYTE") - public byte cRedBits() { return PIXELFORMATDESCRIPTOR.ncRedBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cRedShift} field. */ - @NativeType("BYTE") - public byte cRedShift() { return PIXELFORMATDESCRIPTOR.ncRedShift(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cGreenBits} field. */ - @NativeType("BYTE") - public byte cGreenBits() { return PIXELFORMATDESCRIPTOR.ncGreenBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cGreenShift} field. */ - @NativeType("BYTE") - public byte cGreenShift() { return PIXELFORMATDESCRIPTOR.ncGreenShift(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cBlueBits} field. */ - @NativeType("BYTE") - public byte cBlueBits() { return PIXELFORMATDESCRIPTOR.ncBlueBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cBlueShift} field. */ - @NativeType("BYTE") - public byte cBlueShift() { return PIXELFORMATDESCRIPTOR.ncBlueShift(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAlphaBits} field. */ - @NativeType("BYTE") - public byte cAlphaBits() { return PIXELFORMATDESCRIPTOR.ncAlphaBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAlphaShift} field. */ - @NativeType("BYTE") - public byte cAlphaShift() { return PIXELFORMATDESCRIPTOR.ncAlphaShift(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAccumBits} field. */ - @NativeType("BYTE") - public byte cAccumBits() { return PIXELFORMATDESCRIPTOR.ncAccumBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAccumRedBits} field. */ - @NativeType("BYTE") - public byte cAccumRedBits() { return PIXELFORMATDESCRIPTOR.ncAccumRedBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAccumGreenBits} field. */ - @NativeType("BYTE") - public byte cAccumGreenBits() { return PIXELFORMATDESCRIPTOR.ncAccumGreenBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAccumBlueBits} field. */ - @NativeType("BYTE") - public byte cAccumBlueBits() { return PIXELFORMATDESCRIPTOR.ncAccumBlueBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAccumAlphaBits} field. */ - @NativeType("BYTE") - public byte cAccumAlphaBits() { return PIXELFORMATDESCRIPTOR.ncAccumAlphaBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cDepthBits} field. */ - @NativeType("BYTE") - public byte cDepthBits() { return PIXELFORMATDESCRIPTOR.ncDepthBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cStencilBits} field. */ - @NativeType("BYTE") - public byte cStencilBits() { return PIXELFORMATDESCRIPTOR.ncStencilBits(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#cAuxBuffers} field. */ - @NativeType("BYTE") - public byte cAuxBuffers() { return PIXELFORMATDESCRIPTOR.ncAuxBuffers(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#iLayerType} field. */ - @NativeType("BYTE") - public byte iLayerType() { return PIXELFORMATDESCRIPTOR.niLayerType(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#bReserved} field. */ - @NativeType("BYTE") - public byte bReserved() { return PIXELFORMATDESCRIPTOR.nbReserved(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#dwLayerMask} field. */ - @NativeType("DWORD") - public int dwLayerMask() { return PIXELFORMATDESCRIPTOR.ndwLayerMask(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#dwVisibleMask} field. */ - @NativeType("DWORD") - public int dwVisibleMask() { return PIXELFORMATDESCRIPTOR.ndwVisibleMask(address()); } - /** @return the value of the {@link PIXELFORMATDESCRIPTOR#dwDamageMask} field. */ - @NativeType("DWORD") - public int dwDamageMask() { return PIXELFORMATDESCRIPTOR.ndwDamageMask(address()); } - - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#nSize} field. */ - public Buffer nSize(@NativeType("WORD") short value) { PIXELFORMATDESCRIPTOR.nnSize(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#nVersion} field. */ - public Buffer nVersion(@NativeType("WORD") short value) { PIXELFORMATDESCRIPTOR.nnVersion(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#dwFlags} field. */ - public Buffer dwFlags(@NativeType("DWORD") int value) { PIXELFORMATDESCRIPTOR.ndwFlags(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#iPixelType} field. */ - public Buffer iPixelType(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.niPixelType(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cColorBits} field. */ - public Buffer cColorBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncColorBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cRedBits} field. */ - public Buffer cRedBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncRedBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cRedShift} field. */ - public Buffer cRedShift(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncRedShift(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cGreenBits} field. */ - public Buffer cGreenBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncGreenBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cGreenShift} field. */ - public Buffer cGreenShift(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncGreenShift(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cBlueBits} field. */ - public Buffer cBlueBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncBlueBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cBlueShift} field. */ - public Buffer cBlueShift(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncBlueShift(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAlphaBits} field. */ - public Buffer cAlphaBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAlphaBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAlphaShift} field. */ - public Buffer cAlphaShift(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAlphaShift(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAccumBits} field. */ - public Buffer cAccumBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAccumBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAccumRedBits} field. */ - public Buffer cAccumRedBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAccumRedBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAccumGreenBits} field. */ - public Buffer cAccumGreenBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAccumGreenBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAccumBlueBits} field. */ - public Buffer cAccumBlueBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAccumBlueBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAccumAlphaBits} field. */ - public Buffer cAccumAlphaBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAccumAlphaBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cDepthBits} field. */ - public Buffer cDepthBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncDepthBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cStencilBits} field. */ - public Buffer cStencilBits(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncStencilBits(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#cAuxBuffers} field. */ - public Buffer cAuxBuffers(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.ncAuxBuffers(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#iLayerType} field. */ - public Buffer iLayerType(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.niLayerType(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#bReserved} field. */ - public Buffer bReserved(@NativeType("BYTE") byte value) { PIXELFORMATDESCRIPTOR.nbReserved(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#dwLayerMask} field. */ - public Buffer dwLayerMask(@NativeType("DWORD") int value) { PIXELFORMATDESCRIPTOR.ndwLayerMask(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#dwVisibleMask} field. */ - public Buffer dwVisibleMask(@NativeType("DWORD") int value) { PIXELFORMATDESCRIPTOR.ndwVisibleMask(address(), value); return this; } - /** Sets the specified value to the {@link PIXELFORMATDESCRIPTOR#dwDamageMask} field. */ - public Buffer dwDamageMask(@NativeType("DWORD") int value) { PIXELFORMATDESCRIPTOR.ndwDamageMask(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/POINT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/POINT.java deleted file mode 100644 index a90b9545..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/POINT.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Defines the x- and y- coordinates of a point. - * - *

    Layout

    - * - *
    
    - * struct POINT {
    - *     LONG {@link #x};
    - *     LONG {@link #y};
    - * }
    - */ -public class POINT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - protected POINT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected POINT create(long address, @Nullable ByteBuffer container) { - return new POINT(address, container); - } - - /** - * Creates a {@code POINT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public POINT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the x-coordinate of the point */ - @NativeType("LONG") - public int x() { return nx(address()); } - /** the y-coordinate of the point */ - @NativeType("LONG") - public int y() { return ny(address()); } - - /** Sets the specified value to the {@link #x} field. */ - public POINT x(@NativeType("LONG") int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public POINT y(@NativeType("LONG") int value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public POINT set( - int x, - int y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public POINT set(POINT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code POINT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static POINT malloc() { - return new POINT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code POINT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static POINT calloc() { - return new POINT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code POINT} instance allocated with {@link BufferUtils}. */ - public static POINT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new POINT(memAddress(container), container); - } - - /** Returns a new {@code POINT} instance for the specified memory address. */ - public static POINT create(long address) { - return new POINT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static POINT createSafe(long address) { - return address == NULL ? null : new POINT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static POINT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static POINT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static POINT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static POINT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code POINT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static POINT malloc(MemoryStack stack) { - return new POINT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code POINT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static POINT calloc(MemoryStack stack) { - return new POINT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + POINT.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + POINT.Y); } - - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + POINT.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + POINT.Y, value); } - - // ----------------------------------- - - /** An array of {@link POINT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final POINT ELEMENT_FACTORY = POINT.create(-1L); - - /** - * Creates a new {@code POINT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link POINT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected POINT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link POINT#x} field. */ - @NativeType("LONG") - public int x() { return POINT.nx(address()); } - /** @return the value of the {@link POINT#y} field. */ - @NativeType("LONG") - public int y() { return POINT.ny(address()); } - - /** Sets the specified value to the {@link POINT#x} field. */ - public Buffer x(@NativeType("LONG") int value) { POINT.nx(address(), value); return this; } - /** Sets the specified value to the {@link POINT#y} field. */ - public Buffer y(@NativeType("LONG") int value) { POINT.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/POINTL.java b/LWJGL/src/main/java/org/lwjgl/system/windows/POINTL.java deleted file mode 100644 index f79f563f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/POINTL.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains the coordinates of a point. - * - *

    Layout

    - * - *
    
    - * struct POINTL {
    - *     LONG {@link #x};
    - *     LONG {@link #y};
    - * }
    - */ -public class POINTL extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - protected POINTL(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected POINTL create(long address, @Nullable ByteBuffer container) { - return new POINTL(address, container); - } - - /** - * Creates a {@code POINTL} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public POINTL(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the horizontal (x) coordinate of the point */ - @NativeType("LONG") - public int x() { return nx(address()); } - /** the vertical (y) coordinate of the point. */ - @NativeType("LONG") - public int y() { return ny(address()); } - - /** Sets the specified value to the {@link #x} field. */ - public POINTL x(@NativeType("LONG") int value) { nx(address(), value); return this; } - /** Sets the specified value to the {@link #y} field. */ - public POINTL y(@NativeType("LONG") int value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public POINTL set( - int x, - int y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public POINTL set(POINTL src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code POINTL} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static POINTL malloc() { - return new POINTL(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code POINTL} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static POINTL calloc() { - return new POINTL(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code POINTL} instance allocated with {@link BufferUtils}. */ - public static POINTL create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new POINTL(memAddress(container), container); - } - - /** Returns a new {@code POINTL} instance for the specified memory address. */ - public static POINTL create(long address) { - return new POINTL(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static POINTL createSafe(long address) { - return address == NULL ? null : new POINTL(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static POINTL mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static POINTL callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static POINTL mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static POINTL callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code POINTL} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static POINTL malloc(MemoryStack stack) { - return new POINTL(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code POINTL} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static POINTL calloc(MemoryStack stack) { - return new POINTL(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + POINTL.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + POINTL.Y); } - - /** Unsafe version of {@link #x(int) x}. */ - public static void nx(long struct, int value) { UNSAFE.putInt(null, struct + POINTL.X, value); } - /** Unsafe version of {@link #y(int) y}. */ - public static void ny(long struct, int value) { UNSAFE.putInt(null, struct + POINTL.Y, value); } - - // ----------------------------------- - - /** An array of {@link POINTL} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final POINTL ELEMENT_FACTORY = POINTL.create(-1L); - - /** - * Creates a new {@code POINTL.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link POINTL#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected POINTL getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link POINTL#x} field. */ - @NativeType("LONG") - public int x() { return POINTL.nx(address()); } - /** @return the value of the {@link POINTL#y} field. */ - @NativeType("LONG") - public int y() { return POINTL.ny(address()); } - - /** Sets the specified value to the {@link POINTL#x} field. */ - public Buffer x(@NativeType("LONG") int value) { POINTL.nx(address(), value); return this; } - /** Sets the specified value to the {@link POINTL#y} field. */ - public Buffer y(@NativeType("LONG") int value) { POINTL.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/RECT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/RECT.java deleted file mode 100644 index 473723ae..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/RECT.java +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Defines the coordinates of the upper-left and lower-right corners of a rectangle. - * - *

    Layout

    - * - *
    
    - * struct RECT {
    - *     LONG {@link #left};
    - *     LONG {@link #top};
    - *     LONG {@link #right};
    - *     LONG {@link #bottom};
    - * }
    - */ -public class RECT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - LEFT, - TOP, - RIGHT, - BOTTOM; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - LEFT = layout.offsetof(0); - TOP = layout.offsetof(1); - RIGHT = layout.offsetof(2); - BOTTOM = layout.offsetof(3); - } - - protected RECT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected RECT create(long address, @Nullable ByteBuffer container) { - return new RECT(address, container); - } - - /** - * Creates a {@code RECT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public RECT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the x-coordinate of the upper-left corner of the rectangle */ - @NativeType("LONG") - public int left() { return nleft(address()); } - /** the y-coordinate of the upper-left corner of the rectangle */ - @NativeType("LONG") - public int top() { return ntop(address()); } - /** the x-coordinate of the lower-right corner of the rectangle */ - @NativeType("LONG") - public int right() { return nright(address()); } - /** the y-coordinate of the lower-right corner of the rectangle */ - @NativeType("LONG") - public int bottom() { return nbottom(address()); } - - /** Sets the specified value to the {@link #left} field. */ - public RECT left(@NativeType("LONG") int value) { nleft(address(), value); return this; } - /** Sets the specified value to the {@link #top} field. */ - public RECT top(@NativeType("LONG") int value) { ntop(address(), value); return this; } - /** Sets the specified value to the {@link #right} field. */ - public RECT right(@NativeType("LONG") int value) { nright(address(), value); return this; } - /** Sets the specified value to the {@link #bottom} field. */ - public RECT bottom(@NativeType("LONG") int value) { nbottom(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public RECT set( - int left, - int top, - int right, - int bottom - ) { - left(left); - top(top); - right(right); - bottom(bottom); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public RECT set(RECT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code RECT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static RECT malloc() { - return new RECT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code RECT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static RECT calloc() { - return new RECT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code RECT} instance allocated with {@link BufferUtils}. */ - public static RECT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new RECT(memAddress(container), container); - } - - /** Returns a new {@code RECT} instance for the specified memory address. */ - public static RECT create(long address) { - return new RECT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static RECT createSafe(long address) { - return address == NULL ? null : new RECT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static RECT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static RECT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static RECT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static RECT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code RECT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static RECT malloc(MemoryStack stack) { - return new RECT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code RECT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static RECT calloc(MemoryStack stack) { - return new RECT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #left}. */ - public static int nleft(long struct) { return UNSAFE.getInt(null, struct + RECT.LEFT); } - /** Unsafe version of {@link #top}. */ - public static int ntop(long struct) { return UNSAFE.getInt(null, struct + RECT.TOP); } - /** Unsafe version of {@link #right}. */ - public static int nright(long struct) { return UNSAFE.getInt(null, struct + RECT.RIGHT); } - /** Unsafe version of {@link #bottom}. */ - public static int nbottom(long struct) { return UNSAFE.getInt(null, struct + RECT.BOTTOM); } - - /** Unsafe version of {@link #left(int) left}. */ - public static void nleft(long struct, int value) { UNSAFE.putInt(null, struct + RECT.LEFT, value); } - /** Unsafe version of {@link #top(int) top}. */ - public static void ntop(long struct, int value) { UNSAFE.putInt(null, struct + RECT.TOP, value); } - /** Unsafe version of {@link #right(int) right}. */ - public static void nright(long struct, int value) { UNSAFE.putInt(null, struct + RECT.RIGHT, value); } - /** Unsafe version of {@link #bottom(int) bottom}. */ - public static void nbottom(long struct, int value) { UNSAFE.putInt(null, struct + RECT.BOTTOM, value); } - - // ----------------------------------- - - /** An array of {@link RECT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final RECT ELEMENT_FACTORY = RECT.create(-1L); - - /** - * Creates a new {@code RECT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link RECT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected RECT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link RECT#left} field. */ - @NativeType("LONG") - public int left() { return RECT.nleft(address()); } - /** @return the value of the {@link RECT#top} field. */ - @NativeType("LONG") - public int top() { return RECT.ntop(address()); } - /** @return the value of the {@link RECT#right} field. */ - @NativeType("LONG") - public int right() { return RECT.nright(address()); } - /** @return the value of the {@link RECT#bottom} field. */ - @NativeType("LONG") - public int bottom() { return RECT.nbottom(address()); } - - /** Sets the specified value to the {@link RECT#left} field. */ - public Buffer left(@NativeType("LONG") int value) { RECT.nleft(address(), value); return this; } - /** Sets the specified value to the {@link RECT#top} field. */ - public Buffer top(@NativeType("LONG") int value) { RECT.ntop(address(), value); return this; } - /** Sets the specified value to the {@link RECT#right} field. */ - public Buffer right(@NativeType("LONG") int value) { RECT.nright(address(), value); return this; } - /** Sets the specified value to the {@link RECT#bottom} field. */ - public Buffer bottom(@NativeType("LONG") int value) { RECT.nbottom(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/SECURITY_ATTRIBUTES.java b/LWJGL/src/main/java/org/lwjgl/system/windows/SECURITY_ATTRIBUTES.java deleted file mode 100644 index 7af9ef18..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/SECURITY_ATTRIBUTES.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable. This structure - * provides security settings for objects created by various functions, such as {@code CreateFile}, {@code CreatePipe}, {@code CreateProcess}, - * {@code RegCreateKeyEx}, or {@code RegSaveKeyEx}. - * - *

    Layout

    - * - *
    
    - * struct SECURITY_ATTRIBUTES {
    - *     DWORD {@link #nLength};
    - *     LPVOID {@link #lpSecurityDescriptor};
    - *     BOOL {@link #bInheritHandle};
    - * }
    - */ -public class SECURITY_ATTRIBUTES extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NLENGTH, - LPSECURITYDESCRIPTOR, - BINHERITHANDLE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NLENGTH = layout.offsetof(0); - LPSECURITYDESCRIPTOR = layout.offsetof(1); - BINHERITHANDLE = layout.offsetof(2); - } - - protected SECURITY_ATTRIBUTES(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected SECURITY_ATTRIBUTES create(long address, @Nullable ByteBuffer container) { - return new SECURITY_ATTRIBUTES(address, container); - } - - /** - * Creates a {@code SECURITY_ATTRIBUTES} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public SECURITY_ATTRIBUTES(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the size, in bytes, of this structure. Set this value to {@link #SIZEOF}. */ - @NativeType("DWORD") - public int nLength() { return nnLength(address()); } - /** - * a pointer to a {@code SECURITY_DESCRIPTOR} structure that controls access to the object. If the value of this member is {@code NULL}, the object is assigned - * the default security descriptor associated with the access token of the calling process. This is not the same as granting access to everyone by - * assigning a {@code NULL} discretionary access control list (DACL). By default, the default DACL in the access token of a process allows access only to the - * user represented by the access token. - */ - @NativeType("LPVOID") - public long lpSecurityDescriptor() { return nlpSecurityDescriptor(address()); } - /** specifies whether the returned handle is inherited when a new process is created. If this member is {@code TRUE}, the new process inherits the handle. */ - @NativeType("BOOL") - public boolean bInheritHandle() { return nbInheritHandle(address()) != 0; } - - /** Sets the specified value to the {@link #nLength} field. */ - public SECURITY_ATTRIBUTES nLength(@NativeType("DWORD") int value) { nnLength(address(), value); return this; } - /** Sets the specified value to the {@link #lpSecurityDescriptor} field. */ - public SECURITY_ATTRIBUTES lpSecurityDescriptor(@NativeType("LPVOID") long value) { nlpSecurityDescriptor(address(), value); return this; } - /** Sets the specified value to the {@link #bInheritHandle} field. */ - public SECURITY_ATTRIBUTES bInheritHandle(@NativeType("BOOL") boolean value) { nbInheritHandle(address(), value ? 1 : 0); return this; } - - /** Initializes this struct with the specified values. */ - public SECURITY_ATTRIBUTES set( - int nLength, - long lpSecurityDescriptor, - boolean bInheritHandle - ) { - nLength(nLength); - lpSecurityDescriptor(lpSecurityDescriptor); - bInheritHandle(bInheritHandle); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public SECURITY_ATTRIBUTES set(SECURITY_ATTRIBUTES src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code SECURITY_ATTRIBUTES} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static SECURITY_ATTRIBUTES malloc() { - return new SECURITY_ATTRIBUTES(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code SECURITY_ATTRIBUTES} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static SECURITY_ATTRIBUTES calloc() { - return new SECURITY_ATTRIBUTES(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code SECURITY_ATTRIBUTES} instance allocated with {@link BufferUtils}. */ - public static SECURITY_ATTRIBUTES create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new SECURITY_ATTRIBUTES(memAddress(container), container); - } - - /** Returns a new {@code SECURITY_ATTRIBUTES} instance for the specified memory address. */ - public static SECURITY_ATTRIBUTES create(long address) { - return new SECURITY_ATTRIBUTES(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static SECURITY_ATTRIBUTES createSafe(long address) { - return address == NULL ? null : new SECURITY_ATTRIBUTES(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static SECURITY_ATTRIBUTES mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static SECURITY_ATTRIBUTES callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static SECURITY_ATTRIBUTES mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static SECURITY_ATTRIBUTES callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code SECURITY_ATTRIBUTES} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static SECURITY_ATTRIBUTES malloc(MemoryStack stack) { - return new SECURITY_ATTRIBUTES(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code SECURITY_ATTRIBUTES} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static SECURITY_ATTRIBUTES calloc(MemoryStack stack) { - return new SECURITY_ATTRIBUTES(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #nLength}. */ - public static int nnLength(long struct) { return UNSAFE.getInt(null, struct + SECURITY_ATTRIBUTES.NLENGTH); } - /** Unsafe version of {@link #lpSecurityDescriptor}. */ - public static long nlpSecurityDescriptor(long struct) { return memGetAddress(struct + SECURITY_ATTRIBUTES.LPSECURITYDESCRIPTOR); } - /** Unsafe version of {@link #bInheritHandle}. */ - public static int nbInheritHandle(long struct) { return UNSAFE.getInt(null, struct + SECURITY_ATTRIBUTES.BINHERITHANDLE); } - - /** Unsafe version of {@link #nLength(int) nLength}. */ - public static void nnLength(long struct, int value) { UNSAFE.putInt(null, struct + SECURITY_ATTRIBUTES.NLENGTH, value); } - /** Unsafe version of {@link #lpSecurityDescriptor(long) lpSecurityDescriptor}. */ - public static void nlpSecurityDescriptor(long struct, long value) { memPutAddress(struct + SECURITY_ATTRIBUTES.LPSECURITYDESCRIPTOR, check(value)); } - /** Unsafe version of {@link #bInheritHandle(boolean) bInheritHandle}. */ - public static void nbInheritHandle(long struct, int value) { UNSAFE.putInt(null, struct + SECURITY_ATTRIBUTES.BINHERITHANDLE, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + SECURITY_ATTRIBUTES.LPSECURITYDESCRIPTOR)); - } - - // ----------------------------------- - - /** An array of {@link SECURITY_ATTRIBUTES} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final SECURITY_ATTRIBUTES ELEMENT_FACTORY = SECURITY_ATTRIBUTES.create(-1L); - - /** - * Creates a new {@code SECURITY_ATTRIBUTES.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link SECURITY_ATTRIBUTES#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected SECURITY_ATTRIBUTES getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link SECURITY_ATTRIBUTES#nLength} field. */ - @NativeType("DWORD") - public int nLength() { return SECURITY_ATTRIBUTES.nnLength(address()); } - /** @return the value of the {@link SECURITY_ATTRIBUTES#lpSecurityDescriptor} field. */ - @NativeType("LPVOID") - public long lpSecurityDescriptor() { return SECURITY_ATTRIBUTES.nlpSecurityDescriptor(address()); } - /** @return the value of the {@link SECURITY_ATTRIBUTES#bInheritHandle} field. */ - @NativeType("BOOL") - public boolean bInheritHandle() { return SECURITY_ATTRIBUTES.nbInheritHandle(address()) != 0; } - - /** Sets the specified value to the {@link SECURITY_ATTRIBUTES#nLength} field. */ - public Buffer nLength(@NativeType("DWORD") int value) { SECURITY_ATTRIBUTES.nnLength(address(), value); return this; } - /** Sets the specified value to the {@link SECURITY_ATTRIBUTES#lpSecurityDescriptor} field. */ - public Buffer lpSecurityDescriptor(@NativeType("LPVOID") long value) { SECURITY_ATTRIBUTES.nlpSecurityDescriptor(address(), value); return this; } - /** Sets the specified value to the {@link SECURITY_ATTRIBUTES#bInheritHandle} field. */ - public Buffer bInheritHandle(@NativeType("BOOL") boolean value) { SECURITY_ATTRIBUTES.nbInheritHandle(address(), value ? 1 : 0); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/TOUCHINPUT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/TOUCHINPUT.java deleted file mode 100644 index 66e16a34..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/TOUCHINPUT.java +++ /dev/null @@ -1,384 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Encapsulates data for touch input. - * - *

    Layout

    - * - *
    
    - * struct TOUCHINPUT {
    - *     LONG {@link #x};
    - *     LONG {@link #y};
    - *     HANDLE {@link #hSource};
    - *     DWORD {@link #dwID};
    - *     DWORD {@link #dwFlags};
    - *     DWORD {@link #dwMask};
    - *     DWORD {@link #dwTime};
    - *     ULONG_PTR {@link #dwExtraInfo};
    - *     DWORD {@link #cxContact};
    - *     DWORD {@link #cyContact};
    - * }
    - */ -public class TOUCHINPUT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y, - HSOURCE, - DWID, - DWFLAGS, - DWMASK, - DWTIME, - DWEXTRAINFO, - CXCONTACT, - CYCONTACT; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - HSOURCE = layout.offsetof(2); - DWID = layout.offsetof(3); - DWFLAGS = layout.offsetof(4); - DWMASK = layout.offsetof(5); - DWTIME = layout.offsetof(6); - DWEXTRAINFO = layout.offsetof(7); - CXCONTACT = layout.offsetof(8); - CYCONTACT = layout.offsetof(9); - } - - protected TOUCHINPUT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TOUCHINPUT create(long address, @Nullable ByteBuffer container) { - return new TOUCHINPUT(address, container); - } - - /** - * Creates a {@code TOUCHINPUT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TOUCHINPUT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the x-coordinate (horizontal point) of the touch input. This member is indicated in hundredths of a pixel of physical screen coordinates. */ - @NativeType("LONG") - public int x() { return nx(address()); } - /** the y-coordinate (vertical point) of the touch input. This member is indicated in hundredths of a pixel of physical screen coordinates. */ - @NativeType("LONG") - public int y() { return ny(address()); } - /** a device handle for the source input device. Each device is given a unique provider at run time by the touch input provider. */ - @NativeType("HANDLE") - public long hSource() { return nhSource(address()); } - /** - * a touch point identifier that distinguishes a particular touch input. This value stays consistent in a touch contact sequence from the point a contact - * comes down until it comes back up. An ID may be reused later for subsequent contacts. - */ - @NativeType("DWORD") - public int dwID() { return ndwID(address()); } - /** - * a set of bit flags that specify various aspects of touch point press, release, and motion. The bits in this member can be any reasonable combination of - * the values in the Remarks section. - */ - @NativeType("DWORD") - public int dwFlags() { return ndwFlags(address()); } - /** - * a set of bit flags that specify which of the optional fields in the structure contain valid values. The availability of valid information in the - * optional fields is device-specific. Applications should use an optional field value only when the corresponding bit is set in {@code dwMask}. This - * field may contain a combination of the {@code dwMask} flags mentioned in the Remarks section. - */ - @NativeType("DWORD") - public int dwMask() { return ndwMask(address()); } - /** - * the time stamp for the event, in milliseconds. The consuming application should note that the system performs no validation on this field; when the - * {@link User32#TOUCHINPUTMASKF_TIMEFROMSYSTEM} flag is not set, the accuracy and sequencing of values in this field are completely dependent on the touch input - * provider. - */ - @NativeType("DWORD") - public int dwTime() { return ndwTime(address()); } - /** an additional value associated with the touch event. */ - @NativeType("ULONG_PTR") - public long dwExtraInfo() { return ndwExtraInfo(address()); } - /** - * the width of the touch contact area in hundredths of a pixel in physical screen coordinates. This value is only valid if the {@code dwMask} member has - * the {@link User32#TOUCHINPUTMASKF_CONTACTAREA} flag set. - */ - @NativeType("DWORD") - public int cxContact() { return ncxContact(address()); } - /** - * the height of the touch contact area in hundredths of a pixel in physical screen coordinates. This value is only valid if the {@code dwMask} member has - * the {@link User32#TOUCHINPUTMASKF_CONTACTAREA} flag set. - */ - @NativeType("DWORD") - public int cyContact() { return ncyContact(address()); } - - // ----------------------------------- - - /** Returns a new {@code TOUCHINPUT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static TOUCHINPUT malloc() { - return new TOUCHINPUT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code TOUCHINPUT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static TOUCHINPUT calloc() { - return new TOUCHINPUT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code TOUCHINPUT} instance allocated with {@link BufferUtils}. */ - public static TOUCHINPUT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new TOUCHINPUT(memAddress(container), container); - } - - /** Returns a new {@code TOUCHINPUT} instance for the specified memory address. */ - public static TOUCHINPUT create(long address) { - return new TOUCHINPUT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TOUCHINPUT createSafe(long address) { - return address == NULL ? null : new TOUCHINPUT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static TOUCHINPUT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static TOUCHINPUT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static TOUCHINPUT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static TOUCHINPUT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code TOUCHINPUT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static TOUCHINPUT malloc(MemoryStack stack) { - return new TOUCHINPUT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code TOUCHINPUT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static TOUCHINPUT calloc(MemoryStack stack) { - return new TOUCHINPUT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static int nx(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.X); } - /** Unsafe version of {@link #y}. */ - public static int ny(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.Y); } - /** Unsafe version of {@link #hSource}. */ - public static long nhSource(long struct) { return memGetAddress(struct + TOUCHINPUT.HSOURCE); } - /** Unsafe version of {@link #dwID}. */ - public static int ndwID(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.DWID); } - /** Unsafe version of {@link #dwFlags}. */ - public static int ndwFlags(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.DWFLAGS); } - /** Unsafe version of {@link #dwMask}. */ - public static int ndwMask(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.DWMASK); } - /** Unsafe version of {@link #dwTime}. */ - public static int ndwTime(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.DWTIME); } - /** Unsafe version of {@link #dwExtraInfo}. */ - public static long ndwExtraInfo(long struct) { return memGetAddress(struct + TOUCHINPUT.DWEXTRAINFO); } - /** Unsafe version of {@link #cxContact}. */ - public static int ncxContact(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.CXCONTACT); } - /** Unsafe version of {@link #cyContact}. */ - public static int ncyContact(long struct) { return UNSAFE.getInt(null, struct + TOUCHINPUT.CYCONTACT); } - - // ----------------------------------- - - /** An array of {@link TOUCHINPUT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final TOUCHINPUT ELEMENT_FACTORY = TOUCHINPUT.create(-1L); - - /** - * Creates a new {@code TOUCHINPUT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TOUCHINPUT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TOUCHINPUT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link TOUCHINPUT#x} field. */ - @NativeType("LONG") - public int x() { return TOUCHINPUT.nx(address()); } - /** @return the value of the {@link TOUCHINPUT#y} field. */ - @NativeType("LONG") - public int y() { return TOUCHINPUT.ny(address()); } - /** @return the value of the {@link TOUCHINPUT#hSource} field. */ - @NativeType("HANDLE") - public long hSource() { return TOUCHINPUT.nhSource(address()); } - /** @return the value of the {@link TOUCHINPUT#dwID} field. */ - @NativeType("DWORD") - public int dwID() { return TOUCHINPUT.ndwID(address()); } - /** @return the value of the {@link TOUCHINPUT#dwFlags} field. */ - @NativeType("DWORD") - public int dwFlags() { return TOUCHINPUT.ndwFlags(address()); } - /** @return the value of the {@link TOUCHINPUT#dwMask} field. */ - @NativeType("DWORD") - public int dwMask() { return TOUCHINPUT.ndwMask(address()); } - /** @return the value of the {@link TOUCHINPUT#dwTime} field. */ - @NativeType("DWORD") - public int dwTime() { return TOUCHINPUT.ndwTime(address()); } - /** @return the value of the {@link TOUCHINPUT#dwExtraInfo} field. */ - @NativeType("ULONG_PTR") - public long dwExtraInfo() { return TOUCHINPUT.ndwExtraInfo(address()); } - /** @return the value of the {@link TOUCHINPUT#cxContact} field. */ - @NativeType("DWORD") - public int cxContact() { return TOUCHINPUT.ncxContact(address()); } - /** @return the value of the {@link TOUCHINPUT#cyContact} field. */ - @NativeType("DWORD") - public int cyContact() { return TOUCHINPUT.ncyContact(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/User32.java b/LWJGL/src/main/java/org/lwjgl/system/windows/User32.java deleted file mode 100644 index e2a81af8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/User32.java +++ /dev/null @@ -1,2842 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to WinUser.h and user32.dll. */ -public class User32 { - - private static final SharedLibrary USER32 = Library.loadNative(User32.class, "org.lwjgl", "user32"); - - /** Contains the function pointers loaded from the user32 {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - RegisterClassEx = apiGetFunctionAddress(USER32, "RegisterClassExW"), - UnregisterClass = apiGetFunctionAddress(USER32, "UnregisterClassW"), - CreateWindowEx = apiGetFunctionAddress(USER32, "CreateWindowExW"), - DestroyWindow = apiGetFunctionAddress(USER32, "DestroyWindow"), - DefWindowProc = apiGetFunctionAddress(USER32, "DefWindowProcW"), - CallWindowProc = apiGetFunctionAddress(USER32, "CallWindowProcW"), - ShowWindow = apiGetFunctionAddress(USER32, "ShowWindow"), - UpdateWindow = apiGetFunctionAddress(USER32, "UpdateWindow"), - SetWindowPos = apiGetFunctionAddress(USER32, "SetWindowPos"), - SetWindowText = apiGetFunctionAddress(USER32, "SetWindowTextW"), - GetMessage = apiGetFunctionAddress(USER32, "GetMessageW"), - PeekMessage = apiGetFunctionAddress(USER32, "PeekMessageW"), - TranslateMessage = apiGetFunctionAddress(USER32, "TranslateMessage"), - WaitMessage = apiGetFunctionAddress(USER32, "WaitMessage"), - DispatchMessage = apiGetFunctionAddress(USER32, "DispatchMessageW"), - PostMessage = apiGetFunctionAddress(USER32, "PostMessageW"), - SendMessage = apiGetFunctionAddress(USER32, "SendMessageW"), - AdjustWindowRectEx = apiGetFunctionAddress(USER32, "AdjustWindowRectEx"), - GetWindowRect = apiGetFunctionAddress(USER32, "GetWindowRect"), - MoveWindow = apiGetFunctionAddress(USER32, "MoveWindow"), - GetWindowPlacement = apiGetFunctionAddress(USER32, "GetWindowPlacement"), - SetWindowPlacement = apiGetFunctionAddress(USER32, "SetWindowPlacement"), - IsWindowVisible = apiGetFunctionAddress(USER32, "IsWindowVisible"), - IsIconic = apiGetFunctionAddress(USER32, "IsIconic"), - IsZoomed = apiGetFunctionAddress(USER32, "IsZoomed"), - BringWindowToTop = apiGetFunctionAddress(USER32, "BringWindowToTop"), - SetWindowLongPtr = apiGetFunctionAddress(USER32, Pointer.BITS64 ? "SetWindowLongPtrW" : "SetWindowLongW"), - GetWindowLongPtr = apiGetFunctionAddress(USER32, Pointer.BITS64 ? "GetWindowLongPtrW" : "GetWindowLongW"), - SetClassLongPtr = apiGetFunctionAddress(USER32, Pointer.BITS64 ? "SetClassLongPtrW" : "SetClassLongW"), - GetClassLongPtr = apiGetFunctionAddress(USER32, Pointer.BITS64 ? "GetClassLongPtrW" : "GetClassLongW"), - SetLayeredWindowAttributes = apiGetFunctionAddress(USER32, "SetLayeredWindowAttributes"), - LoadIcon = apiGetFunctionAddress(USER32, "LoadIconW"), - LoadCursor = apiGetFunctionAddress(USER32, "LoadCursorW"), - GetDC = apiGetFunctionAddress(USER32, "GetDC"), - ReleaseDC = apiGetFunctionAddress(USER32, "ReleaseDC"), - GetSystemMetrics = apiGetFunctionAddress(USER32, "GetSystemMetrics"), - RegisterTouchWindow = apiGetFunctionAddressOptional(USER32, "RegisterTouchWindow"), - UnregisterTouchWindow = apiGetFunctionAddressOptional(USER32, "UnregisterTouchWindow"), - IsTouchWindow = apiGetFunctionAddressOptional(USER32, "IsTouchWindow"), - GetTouchInputInfo = apiGetFunctionAddressOptional(USER32, "GetTouchInputInfo"), - CloseTouchInputHandle = apiGetFunctionAddressOptional(USER32, "CloseTouchInputHandle"), - MonitorFromWindow = apiGetFunctionAddress(USER32, "MonitorFromWindow"), - GetMonitorInfo = apiGetFunctionAddress(USER32, "GetMonitorInfoW"), - EnumDisplayDevices = apiGetFunctionAddress(USER32, "EnumDisplayDevicesW"), - EnumDisplaySettingsEx = apiGetFunctionAddress(USER32, "EnumDisplaySettingsExW"), - ChangeDisplaySettingsEx = apiGetFunctionAddress(USER32, "ChangeDisplaySettingsExW"), - GetCursorPos = apiGetFunctionAddress(USER32, "GetCursorPos"), - SetCursorPos = apiGetFunctionAddress(USER32, "SetCursorPos"), - ClipCursor = apiGetFunctionAddress(USER32, "ClipCursor"), - ShowCursor = apiGetFunctionAddress(USER32, "ShowCursor"), - SetCursor = apiGetFunctionAddress(USER32, "SetCursor"), - ClientToScreen = apiGetFunctionAddress(USER32, "ClientToScreen"), - GetAsyncKeyState = apiGetFunctionAddress(USER32, "GetAsyncKeyState"), - GetMessageExtraInfo = apiGetFunctionAddress(USER32, "GetMessageExtraInfo"), - SendInput = apiGetFunctionAddress(USER32, "SendInput"), - GetDpiForSystem = apiGetFunctionAddressOptional(USER32, "GetDpiForSystem"), - GetDpiForWindow = apiGetFunctionAddressOptional(USER32, "GetDpiForWindow"), - GetAwarenessFromDpiAwarenessContext = apiGetFunctionAddressOptional(USER32, "GetAwarenessFromDpiAwarenessContext"), - GetThreadDpiAwarenessContext = apiGetFunctionAddressOptional(USER32, "GetThreadDpiAwarenessContext"), - GetWindowDpiAwarenessContext = apiGetFunctionAddressOptional(USER32, "GetWindowDpiAwarenessContext"), - IsValidDpiAwarenessContext = apiGetFunctionAddressOptional(USER32, "IsValidDpiAwarenessContext"), - SetThreadDpiAwarenessContext = apiGetFunctionAddressOptional(USER32, "SetThreadDpiAwarenessContext"); - - } - - /** Returns the user32 {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return USER32; - } - - /** Window Styles */ - public static final int - WS_OVERLAPPED = 0x0, - WS_POPUP = 0x80000000, - WS_CHILD = 0x40000000, - WS_MINIMIZE = 0x20000000, - WS_VISIBLE = 0x10000000, - WS_DISABLED = 0x8000000, - WS_CLIPSIBLINGS = 0x4000000, - WS_CLIPCHILDREN = 0x2000000, - WS_MAXIMIZE = 0x1000000, - WS_CAPTION = 0xC00000, - WS_BORDER = 0x800000, - WS_DLGFRAME = 0x400000, - WS_VSCROLL = 0x200000, - WS_HSCROLL = 0x100000, - WS_SYSMENU = 0x80000, - WS_THICKFRAME = 0x40000, - WS_GROUP = 0x20000, - WS_TABSTOP = 0x10000, - WS_MINIMIZEBOX = 0x20000, - WS_MAXIMIZEBOX = 0x10000, - WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, - WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU, - WS_CHILDWINDOW = WS_CHILD, - WS_TILED = WS_OVERLAPPED, - WS_ICONIC = WS_MINIMIZE, - WS_SIZEBOX = WS_THICKFRAME, - WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW; - - /** Extended Window Styles */ - public static final int - WS_EX_DLGMODALFRAME = 0x1, - WS_EX_NOPARENTNOTIFY = 0x4, - WS_EX_TOPMOST = 0x8, - WS_EX_ACCEPTFILES = 0x10, - WS_EX_TRANSPARENT = 0x20, - WS_EX_MDICHILD = 0x40, - WS_EX_TOOLWINDOW = 0x80, - WS_EX_WINDOWEDGE = 0x100, - WS_EX_CLIENTEDGE = 0x200, - WS_EX_CONTEXTHELP = 0x400, - WS_EX_RIGHT = 0x1000, - WS_EX_LEFT = 0x0, - WS_EX_RTLREADING = 0x2000, - WS_EX_LTRREADING = 0x0, - WS_EX_LEFTSCROLLBAR = 0x4000, - WS_EX_RIGHTSCROLLBAR = 0x0, - WS_EX_CONTROLPARENT = 0x10000, - WS_EX_STATICEDGE = 0x20000, - WS_EX_APPWINDOW = 0x40000, - WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE, - WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST, - WS_EX_LAYERED = 0x80000, - WS_EX_NOINHERITLAYOUT = 0x100000, - WS_EX_LAYOUTRTL = 0x400000, - WS_EX_COMPOSITED = 0x2000000, - WS_EX_NOACTIVATE = 0x8000000; - - /** May be used in {@link #CreateWindowEx} for the x, y, width, height parameters. */ - public static final int CW_USEDEFAULT = 0x80000000; - - /** Class styles */ - public static final int - CS_VREDRAW = 0x1, - CS_HREDRAW = 0x2, - CS_DBLCLKS = 0x8, - CS_OWNDC = 0x20, - CS_CLASSDC = 0x40, - CS_PARENTDC = 0x80, - CS_NOCLOSE = 0x200, - CS_SAVEBITS = 0x800, - CS_BYTEALIGNCLIENT = 0x1000, - CS_BYTEALIGNWINDOW = 0x2000, - CS_GLOBALCLASS = 0x4000, - CS_IME = 0x10000, - CS_DROPSHADOW = 0x20000; - - /** Windows messages. */ - public static final int - WM_NULL = 0x0, - WM_CREATE = 0x1, - WM_DESTROY = 0x2, - WM_MOVE = 0x3, - WM_SIZE = 0x5, - WM_ACTIVATE = 0x6, - WM_SETFOCUS = 0x7, - WM_KILLFOCUS = 0x8, - WM_ENABLE = 0xA, - WM_SETREDRAW = 0xB, - WM_SETTEXT = 0xC, - WM_GETTEXT = 0xD, - WM_GETTEXTLENGTH = 0xE, - WM_PAINT = 0xF, - WM_CLOSE = 0x10, - WM_QUERYENDSESSION = 0x11, - WM_QUERYOPEN = 0x13, - WM_ENDSESSION = 0x16, - WM_QUIT = 0x12, - WM_ERASEBKGND = 0x14, - WM_SYSCOLORCHANGE = 0x15, - WM_SHOWWINDOW = 0x18, - WM_WININICHANGE = 0x1A, - WM_SETTINGCHANGE = WM_WININICHANGE, - WM_DEVMODECHANGE = 0x1B, - WM_ACTIVATEAPP = 0x1C, - WM_FONTCHANGE = 0x1D, - WM_TIMECHANGE = 0x1E, - WM_CANCELMODE = 0x1F, - WM_SETCURSOR = 0x20, - WM_MOUSEACTIVATE = 0x21, - WM_CHILDACTIVATE = 0x22, - WM_QUEUESYNC = 0x23, - WM_GETMINMAXINFO = 0x24, - WM_PAINTICON = 0x26, - WM_ICONERASEBKGND = 0x27, - WM_NEXTDLGCTL = 0x28, - WM_SPOOLERSTATUS = 0x2A, - WM_DRAWITEM = 0x2B, - WM_MEASUREITEM = 0x2C, - WM_DELETEITEM = 0x2D, - WM_VKEYTOITEM = 0x2E, - WM_CHARTOITEM = 0x2F, - WM_SETFONT = 0x30, - WM_GETFONT = 0x31, - WM_SETHOTKEY = 0x32, - WM_GETHOTKEY = 0x33, - WM_QUERYDRAGICON = 0x37, - WM_COMPAREITEM = 0x39, - WM_GETOBJECT = 0x3D, - WM_COMPACTING = 0x41, - WM_COMMNOTIFY = 0x44, - WM_WINDOWPOSCHANGING = 0x46, - WM_WINDOWPOSCHANGED = 0x47, - WM_POWER = 0x48, - WM_COPYDATA = 0x4A, - WM_CANCELJOURNAL = 0x4B, - WM_NOTIFY = 0x4E, - WM_INPUTLANGCHANGEREQUEST = 0x50, - WM_INPUTLANGCHANGE = 0x51, - WM_TCARD = 0x52, - WM_HELP = 0x53, - WM_USERCHANGED = 0x54, - WM_NOTIFYFORMAT = 0x55, - WM_CONTEXTMENU = 0x7B, - WM_STYLECHANGING = 0x7C, - WM_STYLECHANGED = 0x7D, - WM_DISPLAYCHANGE = 0x7E, - WM_GETICON = 0x7F, - WM_SETICON = 0x80, - WM_NCCREATE = 0x81, - WM_NCDESTROY = 0x82, - WM_NCCALCSIZE = 0x83, - WM_NCHITTEST = 0x84, - WM_NCPAINT = 0x85, - WM_NCACTIVATE = 0x86, - WM_GETDLGCODE = 0x87, - WM_SYNCPAINT = 0x88, - WM_NCMOUSEMOVE = 0xA0, - WM_NCLBUTTONDOWN = 0xA1, - WM_NCLBUTTONUP = 0xA2, - WM_NCLBUTTONDBLCLK = 0xA3, - WM_NCRBUTTONDOWN = 0xA4, - WM_NCRBUTTONUP = 0xA5, - WM_NCRBUTTONDBLCLK = 0xA6, - WM_NCMBUTTONDOWN = 0xA7, - WM_NCMBUTTONUP = 0xA8, - WM_NCMBUTTONDBLCLK = 0xA9, - WM_NCXBUTTONDOWN = 0xAB, - WM_NCXBUTTONUP = 0xAC, - WM_NCXBUTTONDBLCLK = 0xAD, - WM_INPUT_DEVICE_CHANGE = 0xFE, - WM_INPUT = 0xFF, - WM_KEYFIRST = 0x100, - WM_KEYDOWN = 0x100, - WM_KEYUP = 0x101, - WM_CHAR = 0x102, - WM_DEADCHAR = 0x103, - WM_SYSKEYDOWN = 0x104, - WM_SYSKEYUP = 0x105, - WM_SYSCHAR = 0x106, - WM_SYSDEADCHAR = 0x107, - WM_UNICHAR = 0x109, - UNICODE_NOCHAR = 0xFFFF, - WM_IME_STARTCOMPOSITION = 0x10D, - WM_IME_ENDCOMPOSITION = 0x10E, - WM_IME_COMPOSITION = 0x10F, - WM_IME_KEYLAST = 0x10F, - WM_INITDIALOG = 0x110, - WM_COMMAND = 0x111, - WM_SYSCOMMAND = 0x112, - WM_TIMER = 0x113, - WM_HSCROLL = 0x114, - WM_VSCROLL = 0x115, - WM_INITMENU = 0x116, - WM_INITMENUPOPUP = 0x117, - WM_GESTURE = 0x119, - WM_GESTURENOTIFY = 0x11A, - WM_MENUSELECT = 0x11F, - WM_MENUCHAR = 0x120, - WM_ENTERIDLE = 0x121, - WM_MENURBUTTONUP = 0x122, - WM_MENUDRAG = 0x123, - WM_MENUGETOBJECT = 0x124, - WM_UNINITMENUPOPUP = 0x125, - WM_MENUCOMMAND = 0x126, - WM_CHANGEUISTATE = 0x127, - WM_UPDATEUISTATE = 0x128, - WM_QUERYUISTATE = 0x129, - WM_CTLCOLORMSGBOX = 0x132, - WM_CTLCOLOREDIT = 0x133, - WM_CTLCOLORLISTBOX = 0x134, - WM_CTLCOLORBTN = 0x135, - WM_CTLCOLORDLG = 0x136, - WM_CTLCOLORSCROLLBAR = 0x137, - WM_CTLCOLORSTATIC = 0x138, - MN_GETHMENU = 0x1E1, - WM_MOUSEFIRST = 0x200, - WM_MOUSEMOVE = 0x200, - WM_LBUTTONDOWN = 0x201, - WM_LBUTTONUP = 0x202, - WM_LBUTTONDBLCLK = 0x203, - WM_RBUTTONDOWN = 0x204, - WM_RBUTTONUP = 0x205, - WM_RBUTTONDBLCLK = 0x206, - WM_MBUTTONDOWN = 0x207, - WM_MBUTTONUP = 0x208, - WM_MBUTTONDBLCLK = 0x209, - WM_MOUSEWHEEL = 0x20A, - WM_XBUTTONDOWN = 0x20B, - WM_XBUTTONUP = 0x20C, - WM_XBUTTONDBLCLK = 0x20D, - WM_MOUSEHWHEEL = 0x20E, - WM_PARENTNOTIFY = 0x210, - WM_ENTERMENULOOP = 0x211, - WM_EXITMENULOOP = 0x212, - WM_NEXTMENU = 0x213, - WM_SIZING = 0x214, - WM_CAPTURECHANGED = 0x215, - WM_MOVING = 0x216, - WM_POWERBROADCAST = 0x218, - WM_DEVICECHANGE = 0x219, - WM_MDICREATE = 0x220, - WM_MDIDESTROY = 0x221, - WM_MDIACTIVATE = 0x222, - WM_MDIRESTORE = 0x223, - WM_MDINEXT = 0x224, - WM_MDIMAXIMIZE = 0x225, - WM_MDITILE = 0x226, - WM_MDICASCADE = 0x227, - WM_MDIICONARRANGE = 0x228, - WM_MDIGETACTIVE = 0x229, - WM_MDISETMENU = 0x230, - WM_ENTERSIZEMOVE = 0x231, - WM_EXITSIZEMOVE = 0x232, - WM_DROPFILES = 0x233, - WM_MDIREFRESHMENU = 0x234, - WM_TOUCH = 0x240, - WM_IME_SETCONTEXT = 0x281, - WM_IME_NOTIFY = 0x282, - WM_IME_CONTROL = 0x283, - WM_IME_COMPOSITIONFULL = 0x284, - WM_IME_SELECT = 0x285, - WM_IME_CHAR = 0x286, - WM_IME_REQUEST = 0x288, - WM_IME_KEYDOWN = 0x290, - WM_IME_KEYUP = 0x291, - WM_MOUSEHOVER = 0x2A1, - WM_MOUSELEAVE = 0x2A3, - WM_NCMOUSEHOVER = 0x2A0, - WM_NCMOUSELEAVE = 0x2A2, - WM_WTSSESSION_CHANGE = 0x2B1, - WM_TABLET_FIRST = 0x2C0, - WM_TABLET_LAST = 0x2DF, - WM_CUT = 0x300, - WM_COPY = 0x301, - WM_PASTE = 0x302, - WM_CLEAR = 0x303, - WM_UNDO = 0x304, - WM_RENDERFORMAT = 0x305, - WM_RENDERALLFORMATS = 0x306, - WM_DESTROYCLIPBOARD = 0x307, - WM_DRAWCLIPBOARD = 0x308, - WM_PAINTCLIPBOARD = 0x309, - WM_VSCROLLCLIPBOARD = 0x30A, - WM_SIZECLIPBOARD = 0x30B, - WM_ASKCBFORMATNAME = 0x30C, - WM_CHANGECBCHAIN = 0x30D, - WM_HSCROLLCLIPBOARD = 0x30E, - WM_QUERYNEWPALETTE = 0x30F, - WM_PALETTEISCHANGING = 0x310, - WM_PALETTECHANGED = 0x311, - WM_HOTKEY = 0x312, - WM_PRINT = 0x317, - WM_PRINTCLIENT = 0x318, - WM_APPCOMMAND = 0x319, - WM_THEMECHANGED = 0x31A, - WM_CLIPBOARDUPDATE = 0x31D, - WM_DWMCOMPOSITIONCHANGED = 0x31E, - WM_DWMNCRENDERINGCHANGED = 0x31F, - WM_DWMCOLORIZATIONCOLORCHANGED = 0x320, - WM_DWMWINDOWMAXIMIZEDCHANGE = 0x321, - WM_DWMSENDICONICTHUMBNAIL = 0x323, - WM_DWMSENDICONICLIVEPREVIEWBITMAP = 0x326, - WM_GETTITLEBARINFOEX = 0x33F, - WM_HANDHELDFIRST = 0x358, - WM_HANDHELDLAST = 0x35F, - WM_AFXFIRST = 0x360, - WM_AFXLAST = 0x37F, - WM_PENWINFIRST = 0x380, - WM_PENWINLAST = 0x38F, - WM_APP = 0x8000, - WM_USER = 0x400; - - /** {@link #WM_ACTIVATE} message {@code wParam} values. */ - public static final int - WA_ACTIVE = 1, - WA_CLICKACTIVE = 2, - WA_INACTIVE = 0; - - /** {@link #WM_SIZE} message {@code wParam} values. */ - public static final int - SIZE_RESTORED = 0, - SIZE_MINIMIZED = 1, - SIZE_MAXIMIZED = 2, - SIZE_MAXSHOW = 3, - SIZE_MAXHIDE = 4; - - /** {@link #WM_DEVICECHANGE} message {@code wParam} params. */ - public static final int - DBT_APPYBEGIN = 0x0, - DBT_APPYEND = 0x1, - DBT_DEVNODES_CHANGED = 0x7, - DBT_QUERYCHANGECONFIG = 0x17, - DBT_CONFIGCHANGED = 0x18, - DBT_CONFIGCHANGECANCELED = 0x19, - DBT_MONITORCHANGE = 0x1B; - - /** System menu command values. */ - public static final int - SC_SIZE = 0xF000, - SC_MOVE = 0xF010, - SC_MINIMIZE = 0xF020, - SC_MAXIMIZE = 0xF030, - SC_NEXTWINDOW = 0xF040, - SC_PREVWINDOW = 0xF050, - SC_CLOSE = 0xF060, - SC_VSCROLL = 0xF070, - SC_HSCROLL = 0xF080, - SC_MOUSEMENU = 0xF090, - SC_KEYMENU = 0xF100, - SC_ARRANGE = 0xF110, - SC_RESTORE = 0xF120, - SC_TASKLIST = 0xF130, - SC_SCREENSAVE = 0xF140, - SC_HOTKEY = 0xF150, - SC_DEFAULT = 0xF160, - SC_MONITORPOWER = 0xF170, - SC_CONTEXTHELP = 0xF180, - SC_SEPARATOR = 0xF00F; - - /** Key state masks for mouse messages. */ - public static final int - MK_LBUTTON = 0x1, - MK_RBUTTON = 0x2, - MK_SHIFT = 0x4, - MK_CONTROL = 0x8, - MK_MBUTTON = 0x10, - MK_XBUTTON1 = 0x20, - MK_XBUTTON2 = 0x40; - - /** Mouse position codes. */ - public static final int - HTERROR = -2, - HTTRANSPARENT = -1, - HTNOWHERE = 0, - HTCLIENT = 1, - HTCAPTION = 2, - HTSYSMENU = 3, - HTGROWBOX = 4, - HTSIZE = HTGROWBOX, - HTMENU = 5, - HTHSCROLL = 6, - HTVSCROLL = 7, - HTMINBUTTON = 8, - HTMAXBUTTON = 9, - HTLEFT = 10, - HTRIGHT = 11, - HTTOP = 12, - HTTOPLEFT = 13, - HTTOPRIGHT = 14, - HTBOTTOM = 15, - HTBOTTOMLEFT = 16, - HTBOTTOMRIGHT = 17, - HTBORDER = 18, - HTREDUCE = HTMINBUTTON, - HTZOOM = HTMAXBUTTON, - HTSIZEFIRST = HTLEFT, - HTSIZELAST = HTBOTTOMRIGHT, - HTOBJECT = 19, - HTCLOSE = 20, - HTHELP = 21; - - /** Window field offsets for {@link #GetWindowLongPtr}. */ - public static final int - GWL_WNDPROC = -4, - GWL_HINSTANCE = -6, - GWL_HWNDPARENT = -8, - GWL_STYLE = -16, - GWL_EXSTYLE = -20, - GWL_USERDATA = -21, - GWL_ID = -12; - - /** {@link #ShowWindow} commands. */ - public static final int - SW_HIDE = 0, - SW_SHOWNORMAL = 1, - SW_NORMAL = 1, - SW_SHOWMINIMIZED = 2, - SW_SHOWMAXIMIZED = 3, - SW_MAXIMIZE = 3, - SW_SHOWNOACTIVATE = 4, - SW_SHOW = 5, - SW_MINIMIZE = 6, - SW_SHOWMINNOACTIVE = 7, - SW_SHOWNA = 8, - SW_RESTORE = 9, - SW_SHOWDEFAULT = 10, - SW_FORCEMINIMIZE = 11, - SW_MAX = 11; - - /** Virtual window handles used by the {@link #SetWindowPos} insertAfter argument. */ - public static final long - HWND_TOP = 0x0L, - HWND_BOTTOM = 0x1L, - HWND_TOPMOST = 0xFFFFFFFFFFFFFFFFL, - HWND_NOTOPMOST = 0xFFFFFFFFFFFFFFFEL; - - /** - * Virtual window handle used by {@link #PostMessage} that matches all top-level windows in the system, including disabled or invisible unowned windows, - * overlapped windows, and pop-up windows. - */ - public static final long HWND_BROADCAST = 0xFFFFL; - - /** Window sizing and positiong flags used by the {@link #SetWindowPos} flags argument. */ - public static final int - SWP_NOSIZE = 0x1, - SWP_NOMOVE = 0x2, - SWP_NOZORDER = 0x4, - SWP_NOREDRAW = 0x8, - SWP_NOACTIVATE = 0x10, - SWP_FRAMECHANGED = 0x20, - SWP_SHOWWINDOW = 0x40, - SWP_HIDEWINDOW = 0x80, - SWP_NOCOPYBITS = 0x100, - SWP_NOOWNERZORDER = 0x200, - SWP_NOSENDCHANGING = 0x400, - SWP_DRAWFRAME = SWP_FRAMECHANGED, - SWP_NOREPOSITION = SWP_NOOWNERZORDER, - SWP_DEFERERASE = 0x2000, - SWP_ASYNCWINDOWPOS = 0x4000; - - /** Standard Icon IDs. Use with {@link #LoadIcon}. */ - public static final int - IDI_APPLICATION = 32512, - IDI_HAND = 32513, - IDI_QUESTION = 32514, - IDI_EXCLAMATION = 32515, - IDI_ASTERISK = 32516, - IDI_WINLOGO = 32517, - IDI_SHIELD = 32518, - IDI_WARNING = IDI_EXCLAMATION, - IDI_ERROR = IDI_HAND, - IDI_INFORMATION = IDI_ASTERISK; - - /** Standard Cursor IDs. Use with {@link #LoadCursor}. */ - public static final int - IDC_ARROW = 32512, - IDC_IBEAM = 32513, - IDC_WAIT = 32514, - IDC_CROSS = 32515, - IDC_UPARROW = 32516, - IDC_SIZE = 32640, - IDC_ICON = 32641, - IDC_SIZENWSE = 32642, - IDC_SIZENESW = 32643, - IDC_SIZEWE = 32644, - IDC_SIZENS = 32645, - IDC_SIZEALL = 32646, - IDC_NO = 32648, - IDC_HAND = 32649, - IDC_APPSTARTING = 32650, - IDC_HELP = 32651; - - /** Class field offsets for {@link #GetClassLongPtr}. */ - public static final int - GCL_MENUNAME = -8, - GCL_HBRBACKGROUND = -10, - GCL_HCURSOR = -12, - GCL_HICON = -14, - GCL_HMODULE = -16, - GCL_CBWNDEXTRA = -18, - GCL_CBCLSEXTRA = -20, - GCL_WNDPROC = -24, - GCL_STYLE = -26, - GCW_ATOM = -32, - GCL_HICONSM = -34; - - /** Queue status flags for {@code GetQueueStatus} and {@code MsgWaitForMultipleObjects} */ - public static final int - QS_KEY = 0x1, - QS_MOUSEMOVE = 0x2, - QS_MOUSEBUTTON = 0x4, - QS_POSTMESSAGE = 0x8, - QS_TIMER = 0x10, - QS_PAINT = 0x20, - QS_SENDMESSAGE = 0x40, - QS_HOTKEY = 0x80, - QS_ALLPOSTMESSAGE = 0x100, - QS_RAWINPUT = 0x400, - QS_MOUSE = QS_MOUSEMOVE | QS_MOUSEBUTTON, - QS_INPUT = QS_MOUSE | QS_KEY, - QS_ALLEVENTS = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY, - QS_ALLINPUT = QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE; - - /** Remove message flags for {@link #PeekMessage}. */ - public static final int - PM_NOREMOVE = 0x0, - PM_REMOVE = 0x1, - PM_NOYIELD = 0x2, - PM_QS_INPUT = QS_INPUT << 16, - PM_QS_POSTMESSAGE = (QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16, - PM_QS_PAINT = QS_PAINT << 16, - PM_QS_SENDMESSAGE = QS_SENDMESSAGE << 16; - - /** Virtual Keys. */ - public static final int - VK_LBUTTON = 0x1, - VK_RBUTTON = 0x2, - VK_CANCEL = 0x3, - VK_MBUTTON = 0x4, - VK_XBUTTON1 = 0x5, - VK_XBUTTON2 = 0x6, - VK_BACK = 0x8, - VK_TAB = 0x9, - VK_CLEAR = 0xC, - VK_RETURN = 0xD, - VK_SHIFT = 0x10, - VK_CONTROL = 0x11, - VK_MENU = 0x12, - VK_PAUSE = 0x13, - VK_CAPITAL = 0x14, - VK_KANA = 0x15, - VK_HANGEUL = 0x15, - VK_HANGUL = 0x15, - VK_JUNJA = 0x17, - VK_FINAL = 0x18, - VK_HANJA = 0x19, - VK_KANJI = 0x19, - VK_ESCAPE = 0x1B, - VK_CONVERT = 0x1C, - VK_NONCONVERT = 0x1D, - VK_ACCEPT = 0x1E, - VK_MODECHANGE = 0x1F, - VK_SPACE = 0x20, - VK_PRIOR = 0x21, - VK_NEXT = 0x22, - VK_END = 0x23, - VK_HOME = 0x24, - VK_LEFT = 0x25, - VK_UP = 0x26, - VK_RIGHT = 0x27, - VK_DOWN = 0x28, - VK_SELECT = 0x29, - VK_PRINT = 0x2A, - VK_EXECUTE = 0x2B, - VK_SNAPSHOT = 0x2C, - VK_INSERT = 0x2D, - VK_DELETE = 0x2E, - VK_HELP = 0x2F, - VK_LWIN = 0x5B, - VK_RWIN = 0x5C, - VK_APPS = 0x5D, - VK_SLEEP = 0x5F, - VK_NUMPAD0 = 0x60, - VK_NUMPAD1 = 0x61, - VK_NUMPAD2 = 0x62, - VK_NUMPAD3 = 0x63, - VK_NUMPAD4 = 0x64, - VK_NUMPAD5 = 0x65, - VK_NUMPAD6 = 0x66, - VK_NUMPAD7 = 0x67, - VK_NUMPAD8 = 0x68, - VK_NUMPAD9 = 0x69, - VK_MULTIPLY = 0x6A, - VK_ADD = 0x6B, - VK_SEPARATOR = 0x6C, - VK_SUBTRACT = 0x6D, - VK_DECIMAL = 0x6E, - VK_DIVIDE = 0x6F, - VK_F1 = 0x70, - VK_F2 = 0x71, - VK_F3 = 0x72, - VK_F4 = 0x73, - VK_F5 = 0x74, - VK_F6 = 0x75, - VK_F7 = 0x76, - VK_F8 = 0x77, - VK_F9 = 0x78, - VK_F10 = 0x79, - VK_F11 = 0x7A, - VK_F12 = 0x7B, - VK_F13 = 0x7C, - VK_F14 = 0x7D, - VK_F15 = 0x7E, - VK_F16 = 0x7F, - VK_F17 = 0x80, - VK_F18 = 0x81, - VK_F19 = 0x82, - VK_F20 = 0x83, - VK_F21 = 0x84, - VK_F22 = 0x85, - VK_F23 = 0x86, - VK_F24 = 0x87, - VK_NUMLOCK = 0x90, - VK_SCROLL = 0x91, - VK_OEM_NEC_EQUAL = 0x92, - VK_OEM_FJ_JISHO = 0x92, - VK_OEM_FJ_MASSHOU = 0x93, - VK_OEM_FJ_TOUROKU = 0x94, - VK_OEM_FJ_LOYA = 0x95, - VK_OEM_FJ_ROYA = 0x96, - VK_LSHIFT = 0xA0, - VK_RSHIFT = 0xA1, - VK_LCONTROL = 0xA2, - VK_RCONTROL = 0xA3, - VK_LMENU = 0xA4, - VK_RMENU = 0xA5, - VK_BROWSER_BACK = 0xA6, - VK_BROWSER_FORWARD = 0xA7, - VK_BROWSER_REFRESH = 0xA8, - VK_BROWSER_STOP = 0xA9, - VK_BROWSER_SEARCH = 0xAA, - VK_BROWSER_FAVORITES = 0xAB, - VK_BROWSER_HOME = 0xAC, - VK_VOLUME_MUTE = 0xAD, - VK_VOLUME_DOWN = 0xAE, - VK_VOLUME_UP = 0xAF, - VK_MEDIA_NEXT_TRACK = 0xB0, - VK_MEDIA_PREV_TRACK = 0xB1, - VK_MEDIA_STOP = 0xB2, - VK_MEDIA_PLAY_PAUSE = 0xB3, - VK_LAUNCH_MAIL = 0xB4, - VK_LAUNCH_MEDIA_SELECT = 0xB5, - VK_LAUNCH_APP1 = 0xB6, - VK_LAUNCH_APP2 = 0xB7, - VK_OEM_1 = 0xBA, - VK_OEM_PLUS = 0xBB, - VK_OEM_COMMA = 0xBC, - VK_OEM_MINUS = 0xBD, - VK_OEM_PERIOD = 0xBE, - VK_OEM_2 = 0xBF, - VK_OEM_3 = 0xC0, - VK_OEM_4 = 0xDB, - VK_OEM_5 = 0xDC, - VK_OEM_6 = 0xDD, - VK_OEM_7 = 0xDE, - VK_OEM_8 = 0xDF, - VK_OEM_AX = 0xE1, - VK_OEM_102 = 0xE2, - VK_ICO_HELP = 0xE3, - VK_ICO_00 = 0xE4, - VK_PROCESSKEY = 0xE5, - VK_ICO_CLEAR = 0xE6, - VK_PACKET = 0xE7, - VK_OEM_RESET = 0xE9, - VK_OEM_JUMP = 0xEA, - VK_OEM_PA1 = 0xEB, - VK_OEM_PA2 = 0xEC, - VK_OEM_PA3 = 0xED, - VK_OEM_WSCTRL = 0xEE, - VK_OEM_CUSEL = 0xEF, - VK_OEM_ATTN = 0xF0, - VK_OEM_FINISH = 0xF1, - VK_OEM_COPY = 0xF2, - VK_OEM_AUTO = 0xF3, - VK_OEM_ENLW = 0xF4, - VK_OEM_BACKTAB = 0xF5, - VK_ATTN = 0xF6, - VK_CRSEL = 0xF7, - VK_EXSEL = 0xF8, - VK_EREOF = 0xF9, - VK_PLAY = 0xFA, - VK_ZOOM = 0xFB, - VK_NONAME = 0xFC, - VK_PA1 = 0xFD, - VK_OEM_CLEAR = 0xFE; - - /** XButton values. */ - public static final int - XBUTTON1 = 0x1, - XBUTTON2 = 0x2; - - /** Value for rolling one detent. */ - public static final int WHEEL_DELTA = 120; - - /** - * Identifies the dots per inch (dpi) setting for a thread, process, or window. ({@code DPI_AWARENESS}) - * - *
    Enum values:
    - * - *
      - *
    • {@link #DPI_AWARENESS_INVALID DPI_AWARENESS_INVALID} - - * Invalid DPI awareness. - * - *

      This is an invalid DPI awareness value.

      - *
    • - *
    • {@link #DPI_AWARENESS_UNAWARE DPI_AWARENESS_UNAWARE} - - * DPI unaware. - * - *

      This process does not scale for DPI changes and is always assumed to have a scale factor of 100% (96 DPI). It will be automatically scaled by the - * system on any other DPI setting.

      - *
    • - *
    • {@link #DPI_AWARENESS_SYSTEM_AWARE DPI_AWARENESS_SYSTEM_AWARE} - - * System DPI aware. - * - *

      This process does not scale for DPI changes. It will query for the DPI once and use that value for the lifetime of the process. If the DPI changes, - * the process will not adjust to the new DPI value. It will be automatically scaled up or down by the system when the DPI changes from the system - * value.

      - *
    • - *
    • {@link #DPI_AWARENESS_PER_MONITOR_AWARE DPI_AWARENESS_PER_MONITOR_AWARE} - - * Per monitor DPI aware. - * - *

      This process checks for the DPI when it is created and adjusts the scale factor whenever the DPI changes. These processes are not automatically - * scaled by the system.

      - *
    • - *
    - */ - public static final int - DPI_AWARENESS_INVALID = -1, - DPI_AWARENESS_UNAWARE = 0, - DPI_AWARENESS_SYSTEM_AWARE = 1, - DPI_AWARENESS_PER_MONITOR_AWARE = 2; - - /** - * DPI unaware. - * - *

    This window does not scale for DPI changes and is always assumed to have a scale factor of 100% (96 DPI). It will be automatically scaled by the system - * on any other DPI setting.

    - */ - public static final long DPI_AWARENESS_CONTEXT_UNAWARE = -1L; - - /** - * System DPI aware. - * - *

    This window does not scale for DPI changes. It will query for the DPI once and use that value for the lifetime of the process. If the DPI changes, the - * process will not adjust to the new DPI value. It will be automatically scaled up or down by the system when the DPI changes from the system value.

    - */ - public static final long DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = -2L; - - /** - * Per monitor DPI aware. - * - *

    This window checks for the DPI when it is created and adjusts the scale factor whenever the DPI changes. These processes are not automatically scaled - * by the system.

    - */ - public static final long DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = -3L; - - /** - * Also known as Per Monitor v2. - * - *

    An advancement over the original per-monitor DPI awareness mode, which enables applications to access new DPI-related scaling behaviors on a per - * top-level window basis.

    - * - *

    Per Monitor v2 was made available in the Creators Update of Windows 10, and is not available on earlier versions of the operating system.

    - * - *

    The additional behaviors introduced are as follows:

    - * - *
      - *
    • Child window DPI change notifications - In Per Monitor v2 contexts, the entire window tree is notified of any DPI changes that occur.
    • - *
    • Scaling of non-client area - All windows will automatically have their non-client area drawn in a DPI sensitive fashion. Calls to - * {@code EnableNonClientDpiScaling} are unnecessary.
    • - *
    • Scaling of Win32 menus - All {@code NTUSER} menus created in Per Monitor v2 contexts will be scaling in a per-monitor fashion.
    • - *
    • Dialog Scaling - Win32 dialogs created in Per Monitor v2 contexts will automatically respond to DPI changes.
    • - *
    • Improved scaling of {@code comctl32} controls - Various {@code comctl32} controls have improved DPI scaling behavior in Per Monitor v2 contexts.
    • - *
    • Improved theming behavior - {@code UxTheme} handles opened in the context of a Per Monitor v2 window will operate in terms of the DPI associated - * with that window.
    • - *
    - */ - public static final long DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = -4L; - - /** {@link WINDOWPLACEMENT} flags. */ - public static final int - WPF_SETMINPOSITION = 0x1, - WPF_RESTORETOMAXIMIZED = 0x2, - WPF_ASYNCWINDOWPLACEMENT = 0x4; - - /** Actions for {@link #SetLayeredWindowAttributes}. */ - public static final int - LWA_COLORKEY = 0x1, - LWA_ALPHA = 0x2; - - /** {@link #GetSystemMetrics} codes. */ - public static final int - SM_CXSCREEN = 0, - SM_CYSCREEN = 1, - SM_CXVSCROLL = 2, - SM_CYHSCROLL = 3, - SM_CYCAPTION = 4, - SM_CXBORDER = 5, - SM_CYBORDER = 6, - SM_CXDLGFRAME = 7, - SM_CYDLGFRAME = 8, - SM_CYVTHUMB = 9, - SM_CXHTHUMB = 10, - SM_CXICON = 11, - SM_CYICON = 12, - SM_CXCURSOR = 13, - SM_CYCURSOR = 14, - SM_CYMENU = 15, - SM_CXFULLSCREEN = 16, - SM_CYFULLSCREEN = 17, - SM_CYKANJIWINDOW = 18, - SM_MOUSEPRESENT = 19, - SM_CYVSCROLL = 20, - SM_CXHSCROLL = 21, - SM_DEBUG = 22, - SM_SWAPBUTTON = 23, - SM_RESERVED1 = 24, - SM_RESERVED2 = 25, - SM_RESERVED3 = 26, - SM_RESERVED4 = 27, - SM_CXMIN = 28, - SM_CYMIN = 29, - SM_CXSIZE = 30, - SM_CYSIZE = 31, - SM_CXFRAME = 32, - SM_CYFRAME = 33, - SM_CXMINTRACK = 34, - SM_CYMINTRACK = 35, - SM_CXDOUBLECLK = 36, - SM_CYDOUBLECLK = 37, - SM_CXICONSPACING = 38, - SM_CYICONSPACING = 39, - SM_MENUDROPALIGNMENT = 40, - SM_PENWINDOWS = 41, - SM_DBCSENABLED = 42, - SM_CMOUSEBUTTONS = 43, - SM_CXFIXEDFRAME = SM_CXDLGFRAME, - SM_CYFIXEDFRAME = SM_CYDLGFRAME, - SM_CXSIZEFRAME = SM_CXFRAME, - SM_CYSIZEFRAME = SM_CYFRAME, - SM_SECURE = 44, - SM_CXEDGE = 45, - SM_CYEDGE = 46, - SM_CXMINSPACING = 47, - SM_CYMINSPACING = 48, - SM_CXSMICON = 49, - SM_CYSMICON = 50, - SM_CYSMCAPTION = 51, - SM_CXSMSIZE = 52, - SM_CYSMSIZE = 53, - SM_CXMENUSIZE = 54, - SM_CYMENUSIZE = 55, - SM_ARRANGE = 56, - SM_CXMINIMIZED = 57, - SM_CYMINIMIZED = 58, - SM_CXMAXTRACK = 59, - SM_CYMAXTRACK = 60, - SM_CXMAXIMIZED = 61, - SM_CYMAXIMIZED = 62, - SM_NETWORK = 63, - SM_CLEANBOOT = 67, - SM_CXDRAG = 68, - SM_CYDRAG = 69, - SM_SHOWSOUNDS = 70, - SM_CXMENUCHECK = 71, - SM_CYMENUCHECK = 72, - SM_SLOWMACHINE = 73, - SM_MIDEASTENABLED = 74, - SM_MOUSEWHEELPRESENT = 75, - SM_XVIRTUALSCREEN = 76, - SM_YVIRTUALSCREEN = 77, - SM_CXVIRTUALSCREEN = 78, - SM_CYVIRTUALSCREEN = 79, - SM_CMONITORS = 80, - SM_SAMEDISPLAYFORMAT = 81, - SM_IMMENABLED = 82, - SM_REMOTESESSION = 0x1000, - SM_SHUTTINGDOWN = 0x2000, - SM_REMOTECONTROL = 0x2001, - SM_CARETBLINKINGENABLED = 0x2002, - SM_CXFOCUSBORDER = 83, - SM_CYFOCUSBORDER = 84, - SM_TABLETPC = 86, - SM_MEDIACENTER = 87, - SM_STARTER = 88, - SM_SERVERR2 = 89, - SM_MOUSEHORIZONTALWHEELPRESENT = 91, - SM_CXPADDEDBORDER = 92, - SM_DIGITIZER = 94, - SM_MAXIMUMTOUCHES = 95; - - /** {@link #RegisterTouchWindow} flags. */ - public static final int - TWF_FINETOUCH = 0x1, - TWF_WANTPALM = 0x2; - - /** Touch input flag values ({@link TOUCHINPUT#dwFlags}). */ - public static final int - TOUCHEVENTF_MOVE = 0x1, - TOUCHEVENTF_DOWN = 0x2, - TOUCHEVENTF_UP = 0x4, - TOUCHEVENTF_INRANGE = 0x8, - TOUCHEVENTF_PRIMARY = 0x10, - TOUCHEVENTF_NOCOALESCE = 0x20, - TOUCHEVENTF_PEN = 0x40, - TOUCHEVENTF_PALM = 0x80; - - /** Touch input mask values ({@link TOUCHINPUT#dwMask}). */ - public static final int - TOUCHINPUTMASKF_TIMEFROMSYSTEM = 0x1, - TOUCHINPUTMASKF_EXTRAINFO = 0x2, - TOUCHINPUTMASKF_CONTACTAREA = 0x4; - - /** {@link #MonitorFromWindow} flags. */ - public static final int - MONITOR_DEFAULTTONULL = 0x0, - MONITOR_DEFAULTTOPRIMARY = 0x1, - MONITOR_DEFAULTTONEAREST = 0x2; - - /** {@link MONITORINFOEX} flags. */ - public static final int MONITORINFOF_PRIMARY = 0x1; - - /** Flag for {@link #EnumDisplayDevices}. */ - public static final int EDD_GET_DEVICE_INTERFACE_NAME = 0x1; - - /** {@link #EnumDisplaySettingsEx} mode. */ - public static final int - ENUM_CURRENT_SETTINGS = -1, - ENUM_REGISTRY_SETTINGS = -2; - - /** Flags for {@link #EnumDisplaySettingsEx}. */ - public static final int - EDS_RAWMODE = 0x2, - EDS_ROTATEDMODE = 0x4; - - /** Flags for {@link #ChangeDisplaySettingsEx}. */ - public static final int - CDS_UPDATEREGISTRY = 0x1, - CDS_TEST = 0x2, - CDS_FULLSCREEN = 0x4, - CDS_GLOBAL = 0x8, - CDS_SET_PRIMARY = 0x10, - CDS_VIDEOPARAMETERS = 0x20, - CDS_ENABLE_UNSAFE_MODES = 0x100, - CDS_DISABLE_UNSAFE_MODES = 0x200, - CDS_RESET = 0x40000000, - CDS_RESET_EX = 0x20000000, - CDS_NORESET = 0x10000000; - - /** Return values for {@link #ChangeDisplaySettingsEx}. */ - public static final int - DISP_CHANGE_SUCCESSFUL = 0, - DISP_CHANGE_RESTART = 1, - DISP_CHANGE_FAILED = -1, - DISP_CHANGE_BADMODE = -2, - DISP_CHANGE_NOTUPDATED = -3, - DISP_CHANGE_BADFLAGS = -4, - DISP_CHANGE_BADPARAM = -5, - DISP_CHANGE_BADDUALVIEW = -6; - - /** The type of input event. */ - public static final int - INPUT_MOUSE = 0, - INPUT_KEYBOARD = 1, - INPUT_HARDWARE = 2; - - /** {@link MOUSEINPUT} flags. */ - public static final int - MOUSEEVENTF_ABSOLUTE = 0x8000, - MOUSEEVENTF_HWHEEL = 0x1000, - MOUSEEVENTF_MOVE = 0x1, - MOUSEEVENTF_MOVE_NOCOALESCE = 0x2000, - MOUSEEVENTF_LEFTDOWN = 0x2, - MOUSEEVENTF_LEFTUP = 0x4, - MOUSEEVENTF_RIGHTDOWN = 0x8, - MOUSEEVENTF_RIGHTUP = 0x10, - MOUSEEVENTF_MIDDLEDOWN = 0x20, - MOUSEEVENTF_MIDDLEUP = 0x40, - MOUSEEVENTF_VIRTUALDESK = 0x4000, - MOUSEEVENTF_WHEEL = 0x800, - MOUSEEVENTF_XDOWN = 0x80, - MOUSEEVENTF_XUP = 0x100; - - /** {@link KEYBDINPUT} flags. */ - public static final int - KEYEVENTF_EXTENDEDKEY = 0x1, - KEYEVENTF_KEYUP = 0x2, - KEYEVENTF_SCANCODE = 0x8, - KEYEVENTF_UNICODE = 0x4; - - protected User32() { - throw new UnsupportedOperationException(); - } - - // --- [ RegisterClassEx ] --- - - /** Unsafe version of: {@link #RegisterClassEx} */ - public static native short nRegisterClassEx(long lpwcx, long __functionAddress); - - /** Unsafe version of: {@link #RegisterClassEx} */ - public static short nRegisterClassEx(long lpwcx) { - long __functionAddress = Functions.RegisterClassEx; - if (CHECKS) { - WNDCLASSEX.validate(lpwcx); - } - return nRegisterClassEx(lpwcx, __functionAddress); - } - - /** - * Registers a window class for subsequent use in calls to the {@link #CreateWindowEx} function. - * - * @param lpwcx a {@link WNDCLASSEX} structure. You must fill the structure with the appropriate class attributes before passing it to the function. - */ - @NativeType("ATOM") - public static short RegisterClassEx(@NativeType("WNDCLASSEX const *") WNDCLASSEX lpwcx) { - return nRegisterClassEx(lpwcx.address()); - } - - // --- [ UnregisterClass ] --- - - /** Unsafe version of: {@link #UnregisterClass} */ - public static native int nUnregisterClass(long lpClassName, long hInstance, long __functionAddress); - - /** Unsafe version of: {@link #UnregisterClass} */ - public static int nUnregisterClass(long lpClassName, long hInstance) { - long __functionAddress = Functions.UnregisterClass; - return nUnregisterClass(lpClassName, hInstance, __functionAddress); - } - - /** - * Unregisters a window class, freeing the memory required for the class. - * - * @param lpClassName a null-terminated string or a class atom. If {@code lpClassName} is a string, it specifies the window class name. This class name must have been - * registered by a previous call to the {@link #RegisterClassEx} function. System classes, such as dialog box controls, cannot be unregistered. If this - * parameter is an atom, it must be a class atom created by a previous call to the {@link #RegisterClassEx} function. The atom must be in the low-order - * word of {@code lpClassName}; the high-order word must be zero. - * @param hInstance a handle to the instance of the module that created the class - */ - @NativeType("BOOL") - public static boolean UnregisterClass(@NativeType("LPCTSTR") ByteBuffer lpClassName, @NativeType("HINSTANCE") long hInstance) { - if (CHECKS) { - checkNT2(lpClassName); - } - return nUnregisterClass(memAddress(lpClassName), hInstance) != 0; - } - - /** - * Unregisters a window class, freeing the memory required for the class. - * - * @param lpClassName a null-terminated string or a class atom. If {@code lpClassName} is a string, it specifies the window class name. This class name must have been - * registered by a previous call to the {@link #RegisterClassEx} function. System classes, such as dialog box controls, cannot be unregistered. If this - * parameter is an atom, it must be a class atom created by a previous call to the {@link #RegisterClassEx} function. The atom must be in the low-order - * word of {@code lpClassName}; the high-order word must be zero. - * @param hInstance a handle to the instance of the module that created the class - */ - @NativeType("BOOL") - public static boolean UnregisterClass(@NativeType("LPCTSTR") CharSequence lpClassName, @NativeType("HINSTANCE") long hInstance) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16(lpClassName, true); - long lpClassNameEncoded = stack.getPointerAddress(); - return nUnregisterClass(lpClassNameEncoded, hInstance) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ CreateWindowEx ] --- - - /** Unsafe version of: {@link #CreateWindowEx} */ - public static native long nCreateWindowEx(int dwExStyle, long lpClassName, long lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, long hWndParent, long hMenu, long hInstance, long lpParam, long __functionAddress); - - /** Unsafe version of: {@link #CreateWindowEx} */ - public static long nCreateWindowEx(int dwExStyle, long lpClassName, long lpWindowName, int dwStyle, int x, int y, int nWidth, int nHeight, long hWndParent, long hMenu, long hInstance, long lpParam) { - long __functionAddress = Functions.CreateWindowEx; - return nCreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam, __functionAddress); - } - - /** - * Creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function. - * - * @param dwExStyle the extended window style of the window being created - * @param lpClassName a null-terminated string or a class atom created by a previous call to the {@link #RegisterClassEx(WNDCLASSEX)} function. - * @param lpWindowName the window name. If the window style specifies a title bar, the window title pointed to by {@code lpWindowName} is displayed in the title bar. - * @param dwStyle the style of the window being created - * @param x the initial horizontal position of the window - * @param y the initial vertical position of the window - * @param nWidth the width, in device units, of the window - * @param nHeight the height, in device units, of the window - * @param hWndParent a handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. - * @param hMenu a handle to a menu, or specifies a child-window identifier, depending on the window style - * @param hInstance a handle to the instance of the module to be associated with the window - * @param lpParam a value to be passed to the window through the {@code CREATESTRUCT} structure ({@code createParams} member) pointed to by the {@code lParam} param - * of the {@link #WM_CREATE} message. - */ - @NativeType("HWND") - public static long CreateWindowEx(@NativeType("DWORD") int dwExStyle, @Nullable @NativeType("LPCTSTR") ByteBuffer lpClassName, @Nullable @NativeType("LPCTSTR") ByteBuffer lpWindowName, @NativeType("DWORD") int dwStyle, int x, int y, int nWidth, int nHeight, @NativeType("HWND") long hWndParent, @NativeType("HMENU") long hMenu, @NativeType("HINSTANCE") long hInstance, @NativeType("LPVOID") long lpParam) { - if (CHECKS) { - checkNT2Safe(lpClassName); - checkNT2Safe(lpWindowName); - } - return nCreateWindowEx(dwExStyle, memAddressSafe(lpClassName), memAddressSafe(lpWindowName), dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); - } - - /** - * Creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function. - * - * @param dwExStyle the extended window style of the window being created - * @param lpClassName a null-terminated string or a class atom created by a previous call to the {@link #RegisterClassEx(WNDCLASSEX)} function. - * @param lpWindowName the window name. If the window style specifies a title bar, the window title pointed to by {@code lpWindowName} is displayed in the title bar. - * @param dwStyle the style of the window being created - * @param x the initial horizontal position of the window - * @param y the initial vertical position of the window - * @param nWidth the width, in device units, of the window - * @param nHeight the height, in device units, of the window - * @param hWndParent a handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. - * @param hMenu a handle to a menu, or specifies a child-window identifier, depending on the window style - * @param hInstance a handle to the instance of the module to be associated with the window - * @param lpParam a value to be passed to the window through the {@code CREATESTRUCT} structure ({@code createParams} member) pointed to by the {@code lParam} param - * of the {@link #WM_CREATE} message. - */ - @NativeType("HWND") - public static long CreateWindowEx(@NativeType("DWORD") int dwExStyle, @Nullable @NativeType("LPCTSTR") CharSequence lpClassName, @Nullable @NativeType("LPCTSTR") CharSequence lpWindowName, @NativeType("DWORD") int dwStyle, int x, int y, int nWidth, int nHeight, @NativeType("HWND") long hWndParent, @NativeType("HMENU") long hMenu, @NativeType("HINSTANCE") long hInstance, @NativeType("LPVOID") long lpParam) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16Safe(lpClassName, true); - long lpClassNameEncoded = lpClassName == null ? NULL : stack.getPointerAddress(); - stack.nUTF16Safe(lpWindowName, true); - long lpWindowNameEncoded = lpWindowName == null ? NULL : stack.getPointerAddress(); - return nCreateWindowEx(dwExStyle, lpClassNameEncoded, lpWindowNameEncoded, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ DestroyWindow ] --- - - /** Unsafe version of: {@link #DestroyWindow} */ - public static native int nDestroyWindow(long hWnd, long __functionAddress); - - /** - * Destroys the specified window. The function sends {@link #WM_DESTROY} and {@link #WM_NCDESTROY} messages to the window to deactivate it and remove the keyboard focus - * from it. The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the - * clipboard viewer chain (if the window is at the top of the viewer chain). - * - *

    If the specified window is a parent or owner window, DestroyWindow automatically destroys the associated child or owned windows when it destroys the - * parent or owner window. The function first destroys child or owned windows, and then it destroys the parent or owner window.

    - * - * @param hWnd a handle to the window to be destroyed - */ - @NativeType("BOOL") - public static boolean DestroyWindow(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.DestroyWindow; - if (CHECKS) { - check(hWnd); - } - return nDestroyWindow(hWnd, __functionAddress) != 0; - } - - // --- [ DefWindowProc ] --- - - /** - * Calls the default window procedure to provide default processing for any window messages that an application does not process. This function ensures - * that every message is processed. DefWindowProc is called with the same parameters received by the window procedure. - * - * @param hWnd a handle to the window that received the message - * @param Msg the message - * @param wParam additional message information. The content of this parameter depends on the value of the {@code Msg} parameter. - * @param lParam additional message information. The content of this parameter depends on the value of the {@code Msg} parameter. - */ - @NativeType("LRESULT") - public static long DefWindowProc(@NativeType("HWND") long hWnd, @NativeType("UINT") int Msg, @NativeType("WPARAM") long wParam, @NativeType("LPARAM") long lParam) { - long __functionAddress = Functions.DefWindowProc; - if (CHECKS) { - check(hWnd); - } - return callPPPP(hWnd, Msg, wParam, lParam, __functionAddress); - } - - // --- [ CallWindowProc ] --- - - /** Unsafe version of: {@link #CallWindowProc} */ - public static long nCallWindowProc(long lpPrevWndFunc, long hWnd, int Msg, long wParam, long lParam) { - long __functionAddress = Functions.CallWindowProc; - if (CHECKS) { - check(hWnd); - } - return callPPPPP(lpPrevWndFunc, hWnd, Msg, wParam, lParam, __functionAddress); - } - - /** - * Passes message information to the specified window procedure. - * - * @param lpPrevWndFunc the previous window procedure. - * - *

    If this value is obtained by calling the {@link #GetWindowLongPtr} function with the {@code nIndex} parameter set to {@link #GWL_WNDPROC} or {@code DWL_DLGPROC}, - * it is actually either the address of a window or dialog box procedure, or a special internal value meaningful only to {@code CallWindowProc}.

    - * @param hWnd a handle to the window procedure to receive the message - * @param Msg the message - * @param wParam additional message information. The content of this parameter depends on the value of the {@code Msg} parameter. - * @param lParam additional message information. The content of this parameter depends on the value of the {@code Msg} parameter. - */ - @NativeType("LRESULT") - public static long CallWindowProc(@NativeType("WNDPROC") WindowProcI lpPrevWndFunc, @NativeType("HWND") long hWnd, @NativeType("UINT") int Msg, @NativeType("WPARAM") long wParam, @NativeType("LPARAM") long lParam) { - return nCallWindowProc(lpPrevWndFunc.address(), hWnd, Msg, wParam, lParam); - } - - // --- [ ShowWindow ] --- - - /** - * Sets the specified window's show state. - * - * @param hWnd a handle to the window - * @param nCmdShow controls how the window is to be shown. This parameter is ignored the first time an application calls {@code ShowWindow}, if the program that - * launched the application provides a {@code STARTUPINFO} structure. Otherwise, the first time {@code ShowWindow} is called, the value should be the - * value obtained by the {@code WinMain} function in its {@code nCmdShow} parameter. In subsequent calls, this parameter can be one of:
    {@link #SW_HIDE}{@link #SW_SHOWNORMAL}{@link #SW_NORMAL}{@link #SW_SHOWMINIMIZED}{@link #SW_SHOWMAXIMIZED}{@link #SW_MAXIMIZE}
    {@link #SW_SHOWNOACTIVATE}{@link #SW_SHOW}{@link #SW_MINIMIZE}{@link #SW_SHOWMINNOACTIVE}{@link #SW_SHOWNA}{@link #SW_RESTORE}
    {@link #SW_SHOWDEFAULT}{@link #SW_FORCEMINIMIZE}{@link #SW_MAX}
    - */ - @NativeType("BOOL") - public static boolean ShowWindow(@NativeType("HWND") long hWnd, int nCmdShow) { - long __functionAddress = Functions.ShowWindow; - if (CHECKS) { - check(hWnd); - } - return callPI(hWnd, nCmdShow, __functionAddress) != 0; - } - - // --- [ UpdateWindow ] --- - - /** - * Updates the client area of the specified window by sending a {@link #WM_PAINT} message to the window if the window's update region is not empty. The function - * sends a {@link #WM_PAINT} message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no - * message is sent. - * - * @param hWnd handle to the window to be updated - */ - @NativeType("BOOL") - public static boolean UpdateWindow(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.UpdateWindow; - if (CHECKS) { - check(hWnd); - } - return callPI(hWnd, __functionAddress) != 0; - } - - // --- [ SetWindowPos ] --- - - /** Unsafe version of: {@link #SetWindowPos} */ - public static native int nSetWindowPos(long hWnd, long hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags, long __functionAddress); - - /** - * Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are ordered according to their appearance on the screen. - * The topmost window receives the highest rank and is the first window in the Z order. - * - * @param hWnd a handle to the window - * @param hWndInsertAfter a handle to the window to precede the positioned window in the Z order. This parameter must be a window handle or one of:
    {@link #HWND_TOP}{@link #HWND_BOTTOM}{@link #HWND_TOPMOST}{@link #HWND_NOTOPMOST}
    - * @param X the new position of the left side of the window, in client coordinates - * @param Y the new position of the top of the window, in client coordinates - * @param cx the new width of the window, in pixels - * @param cy the new height of the window, in pixels - * @param uFlags the window sizing and positioning flags. One or more of:
    {@link #SWP_NOSIZE}{@link #SWP_NOMOVE}{@link #SWP_NOZORDER}{@link #SWP_NOREDRAW}{@link #SWP_NOACTIVATE}
    {@link #SWP_FRAMECHANGED}{@link #SWP_SHOWWINDOW}{@link #SWP_HIDEWINDOW}{@link #SWP_NOCOPYBITS}{@link #SWP_NOOWNERZORDER}
    {@link #SWP_NOSENDCHANGING}{@link #SWP_DRAWFRAME}{@link #SWP_NOREPOSITION}{@link #SWP_DEFERERASE}{@link #SWP_ASYNCWINDOWPOS}
    - */ - @NativeType("BOOL") - public static boolean SetWindowPos(@NativeType("HWND") long hWnd, @NativeType("HWND") long hWndInsertAfter, int X, int Y, int cx, int cy, @NativeType("UINT") int uFlags) { - long __functionAddress = Functions.SetWindowPos; - if (CHECKS) { - check(hWnd); - } - return nSetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags, __functionAddress) != 0; - } - - // --- [ SetWindowText ] --- - - /** Unsafe version of: {@link #SetWindowText} */ - public static native int nSetWindowText(long hWnd, long lpString, long __functionAddress); - - /** Unsafe version of: {@link #SetWindowText} */ - public static int nSetWindowText(long hWnd, long lpString) { - long __functionAddress = Functions.SetWindowText; - if (CHECKS) { - check(hWnd); - } - return nSetWindowText(hWnd, lpString, __functionAddress); - } - - /** - * Changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. - * However, {@code SetWindowText} cannot change the text of a control in another application. - * - * @param hWnd a handle to the window or control whose text is to be changed - * @param lpString the new title or control text - */ - @NativeType("BOOL") - public static boolean SetWindowText(@NativeType("HWND") long hWnd, @NativeType("LPCTSTR") ByteBuffer lpString) { - if (CHECKS) { - checkNT2(lpString); - } - return nSetWindowText(hWnd, memAddress(lpString)) != 0; - } - - /** - * Changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. - * However, {@code SetWindowText} cannot change the text of a control in another application. - * - * @param hWnd a handle to the window or control whose text is to be changed - * @param lpString the new title or control text - */ - @NativeType("BOOL") - public static boolean SetWindowText(@NativeType("HWND") long hWnd, @NativeType("LPCTSTR") CharSequence lpString) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16(lpString, true); - long lpStringEncoded = stack.getPointerAddress(); - return nSetWindowText(hWnd, lpStringEncoded) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ GetMessage ] --- - - /** Unsafe version of: {@link #GetMessage} */ - public static native int nGetMessage(long lpMsg, long hWnd, int wMsgFilterMin, int wMsgFilterMax, long __functionAddress); - - /** Unsafe version of: {@link #GetMessage} */ - public static int nGetMessage(long lpMsg, long hWnd, int wMsgFilterMin, int wMsgFilterMax) { - long __functionAddress = Functions.GetMessage; - return nGetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, __functionAddress); - } - - /** - * Retrieves a message from the calling thread's message queue. The function dispatches incoming sent messages until a posted message is available for - * retrieval. Unlike GetMessage, the {@link #PeekMessage} function does not wait for a message to be posted before returning. - * - * @param lpMsg a pointer to an {@link MSG} structure that receives message information from the thread's message queue - * @param hWnd a handle to the window whose messages are to be retrieved. The window must belong to the current thread. - * - *

    If {@code hWnd} is {@code NULL}, {@code GetMessage} retrieves messages for any window that belongs to the current thread, and any messages on the current - * thread's message queue whose {@code hwnd} value is {@code NULL} (see the {@link MSG} structure). Therefore if {@code hWnd} is {@code NULL}, both window messages and - * thread messages are processed.

    - * - *

    If {@code hWnd} is -1, {@code GetMessage} retrieves only messages on the current thread's message queue whose {@code hwnd} value is {@code NULL}, that is, - * thread messages as posted by {@link #PostMessage} (when the {@code hWnd} parameter is {@code NULL}) or {@code PostThreadMessage}.

    - * @param wMsgFilterMin the integer value of the lowest message value to be retrieved - * @param wMsgFilterMax the integer value of the highest message value to be retrieved - */ - @NativeType("BOOL") - public static boolean GetMessage(@NativeType("LPMSG") MSG lpMsg, @NativeType("HWND") long hWnd, @NativeType("UINT") int wMsgFilterMin, @NativeType("UINT") int wMsgFilterMax) { - return nGetMessage(lpMsg.address(), hWnd, wMsgFilterMin, wMsgFilterMax) != 0; - } - - // --- [ PeekMessage ] --- - - /** Unsafe version of: {@link #PeekMessage} */ - public static int nPeekMessage(long lpMsg, long hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg) { - long __functionAddress = Functions.PeekMessage; - return callPPI(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg, __functionAddress); - } - - /** - * Dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist). - * - * @param lpMsg a pointer to an {@link MSG} structure that receives message information - * @param hWnd a handle to the window whose messages are to be retrieved. The window must belong to the current thread. - * - *

    If {@code hWnd} is {@code NULL}, {@code GetMessage} retrieves messages for any window that belongs to the current thread, and any messages on the current - * thread's message queue whose {@code hwnd} value is {@code NULL} (see the {@link MSG} structure). Therefore if {@code hWnd} is {@code NULL}, both window messages and - * thread messages are processed.

    - * - *

    If {@code hWnd} is -1, {@code GetMessage} retrieves only messages on the current thread's message queue whose {@code hwnd} value is {@code NULL}, that is, - * thread messages as posted by {@link #PostMessage} (when the {@code hWnd} parameter is {@code NULL}) or {@code PostThreadMessage}.

    - * @param wMsgFilterMin the integer value of the lowest message value to be retrieved - * @param wMsgFilterMax the integer value of the highest message value to be retrieved - * @param wRemoveMsg specifies how messages are to be handled. One of:
    {@link #PM_NOREMOVE}{@link #PM_REMOVE}{@link #PM_NOYIELD}
    - */ - @NativeType("BOOL") - public static boolean PeekMessage(@NativeType("LPMSG") MSG lpMsg, @NativeType("HWND") long hWnd, @NativeType("UINT") int wMsgFilterMin, @NativeType("UINT") int wMsgFilterMax, @NativeType("UINT") int wRemoveMsg) { - return nPeekMessage(lpMsg.address(), hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg) != 0; - } - - // --- [ TranslateMessage ] --- - - /** Unsafe version of: {@link #TranslateMessage} */ - public static int nTranslateMessage(long lpMsg) { - long __functionAddress = Functions.TranslateMessage; - return callPI(lpMsg, __functionAddress); - } - - /** - * Translates virtual-key messages into character messages. The character messages are posted to the calling thread's message queue, to be read the next - * time the thread calls the {@link #GetMessage} or {@link #PeekMessage} function. - * - * @param lpMsg an {@link MSG} structure that contains message information retrieved from the calling thread's message queue by using the {@link #GetMessage} or {@link #PeekMessage} - * function. - */ - @NativeType("BOOL") - public static boolean TranslateMessage(@NativeType("MSG const *") MSG lpMsg) { - return nTranslateMessage(lpMsg.address()) != 0; - } - - // --- [ WaitMessage ] --- - - /** Unsafe version of: {@link #WaitMessage} */ - public static native int nWaitMessage(long __functionAddress); - - /** - * Yields control to other threads when a thread has no other messages in its message queue. The WaitMessage function suspends the thread and does not - * return until a new message is placed in the thread's message queue. - */ - @NativeType("BOOL") - public static boolean WaitMessage() { - long __functionAddress = Functions.WaitMessage; - return nWaitMessage(__functionAddress) != 0; - } - - // --- [ DispatchMessage ] --- - - /** Unsafe version of: {@link #DispatchMessage} */ - public static long nDispatchMessage(long lpmsg) { - long __functionAddress = Functions.DispatchMessage; - return callPP(lpmsg, __functionAddress); - } - - /** - * Dispatches a message to a window procedure. It is typically used to dispatch a message retrieved by the {@link #GetMessage} function. - * - * @param lpmsg a pointer to a structure that contains the message. - */ - @NativeType("LRESULT") - public static long DispatchMessage(@NativeType("MSG const *") MSG lpmsg) { - return nDispatchMessage(lpmsg.address()); - } - - // --- [ PostMessage ] --- - - /** Unsafe version of: {@link #PostMessage} */ - public static native int nPostMessage(long hWnd, int Msg, long wParam, long lParam, long __functionAddress); - - /** - * Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread - * to process the message. - * - * @param hWnd a handle to the window whose window procedure is to receive the message. The following values have special meanings: - * - *
      - *
    • {@link #HWND_BROADCAST} - The message is posted to all top-level windows in the system, including disabled or invisible unowned windows, overlapped - * windows, and pop-up windows. The message is not posted to child windows.
    • - *
    • {@code NULL} - The function behaves like a call to PostThreadMessage with the dwThreadId parameter set to the identifier of the current thread.
    • - *
    - * @param Msg the message to be posted - * @param wParam additional message-specific information - * @param lParam additional message-specific information - */ - @NativeType("BOOL") - public static boolean PostMessage(@NativeType("HWND") long hWnd, @NativeType("UINT") int Msg, @NativeType("WPARAM") long wParam, @NativeType("LPARAM") long lParam) { - long __functionAddress = Functions.PostMessage; - return nPostMessage(hWnd, Msg, wParam, lParam, __functionAddress) != 0; - } - - // --- [ SendMessage ] --- - - /** Unsafe version of: {@link #SendMessage} */ - public static native int nSendMessage(long hWnd, int Msg, long wParam, long lParam, long __functionAddress); - - /** - * Sends the specified message to a window or windows. The {@code SendMessage} function calls the window procedure for the specified window and does not - * return until the window procedure has processed the message. - * - * @param hWnd a handle to the window whose window procedure will receive the message. If this parameter is {@link #HWND_BROADCAST}, the message is sent to all top-level - * windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to - * child windows. - * - *

    Message sending is subject to UIPI. The thread of a process can send messages only to message queues of threads in processes of lesser or equal - * integrity level.

    - * @param Msg the message to be sent - * @param wParam additional message-specific information - * @param lParam additional message-specific information - */ - @NativeType("BOOL") - public static boolean SendMessage(@NativeType("HWND") long hWnd, @NativeType("UINT") int Msg, @NativeType("WPARAM") long wParam, @NativeType("LPARAM") long lParam) { - long __functionAddress = Functions.SendMessage; - if (CHECKS) { - check(hWnd); - } - return nSendMessage(hWnd, Msg, wParam, lParam, __functionAddress) != 0; - } - - // --- [ AdjustWindowRectEx ] --- - - /** Unsafe version of: {@link #AdjustWindowRectEx} */ - public static native int nAdjustWindowRectEx(long lpRect, int dwStyle, int bMenu, int dwExStyle, long __functionAddress); - - /** Unsafe version of: {@link #AdjustWindowRectEx} */ - public static int nAdjustWindowRectEx(long lpRect, int dwStyle, int bMenu, int dwExStyle) { - long __functionAddress = Functions.AdjustWindowRectEx; - return nAdjustWindowRectEx(lpRect, dwStyle, bMenu, dwExStyle, __functionAddress); - } - - /** - * Calculates the required size of the window rectangle, based on the desired size of the client rectangle. The window rectangle can then be passed to the - * {@link #CreateWindowEx} function to create a window whose client area is the desired size. - * - * @param lpRect a pointer to a {@link RECT} structure that contains the coordinates of the top-left and bottom-right corners of the desired client area. When the - * function returns, the structure contains the coordinates of the top-left and bottom-right corners of the window to accommodate the desired client - * area. - * @param dwStyle the window style of the window whose required size is to be calculated. Note that you cannot specify the {@link #WS_OVERLAPPED} style. - * @param bMenu indicates whether the window has a menu - * @param dwExStyle the extended window style of the window whose required size is to be calculated - */ - @NativeType("BOOL") - public static boolean AdjustWindowRectEx(@NativeType("LPRECT") RECT lpRect, @NativeType("DWORD") int dwStyle, @NativeType("BOOL") boolean bMenu, @NativeType("DWORD") int dwExStyle) { - return nAdjustWindowRectEx(lpRect.address(), dwStyle, bMenu ? 1 : 0, dwExStyle) != 0; - } - - // --- [ GetWindowRect ] --- - - /** Unsafe version of: {@link #GetWindowRect} */ - public static native int nGetWindowRect(long hWnd, long lpRect, long __functionAddress); - - /** Unsafe version of: {@link #GetWindowRect} */ - public static int nGetWindowRect(long hWnd, long lpRect) { - long __functionAddress = Functions.GetWindowRect; - if (CHECKS) { - check(hWnd); - } - return nGetWindowRect(hWnd, lpRect, __functionAddress); - } - - /** - * Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the - * upper-left corner of the screen. - * - * @param hWnd a handle to the window - * @param lpRect a pointer to a {@link RECT} structure that receives the screen coordinates of the upper-left and lower-right corners of the window - */ - @NativeType("BOOL") - public static boolean GetWindowRect(@NativeType("HWND") long hWnd, @NativeType("LPRECT") RECT lpRect) { - return nGetWindowRect(hWnd, lpRect.address()) != 0; - } - - // --- [ MoveWindow ] --- - - /** Unsafe version of: {@link #MoveWindow} */ - public static native int nMoveWindow(long hWnd, int X, int Y, int nWidth, int nHeight, int bRepaint, long __functionAddress); - - /** - * Changes the position and dimensions of the specified window. For a top-level window, the position and dimensions are relative to the upper-left corner - * of the screen. For a child window, they are relative to the upper-left corner of the parent window's client area. - * - * @param hWnd a handle to the window - * @param X the new position of the left side of the window - * @param Y the new position of the top of the window - * @param nWidth the new width of the window - * @param nHeight the new height of the window - * @param bRepaint indicates whether the window is to be repainted. If this parameter is TRUE, the window receives a message. If the parameter is FALSE, no repainting - * of any kind occurs. This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent - * window uncovered as a result of moving a child window. - */ - @NativeType("BOOL") - public static boolean MoveWindow(@NativeType("HWND") long hWnd, int X, int Y, int nWidth, int nHeight, @NativeType("BOOL") boolean bRepaint) { - long __functionAddress = Functions.MoveWindow; - if (CHECKS) { - check(hWnd); - } - return nMoveWindow(hWnd, X, Y, nWidth, nHeight, bRepaint ? 1 : 0, __functionAddress) != 0; - } - - // --- [ GetWindowPlacement ] --- - - /** Unsafe version of: {@link #GetWindowPlacement} */ - public static native int nGetWindowPlacement(long hWnd, long lpwndpl, long __functionAddress); - - /** Unsafe version of: {@link #GetWindowPlacement} */ - public static int nGetWindowPlacement(long hWnd, long lpwndpl) { - long __functionAddress = Functions.GetWindowPlacement; - if (CHECKS) { - check(hWnd); - } - return nGetWindowPlacement(hWnd, lpwndpl, __functionAddress); - } - - /** - * Retrieves the show state and the restored, minimized, and maximized positions of the specified window. - * - * @param hWnd a handle to the window - * @param lpwndpl a pointer to the {@link WINDOWPLACEMENT} structure that receives the show state and position information. - * - *

    Before calling {@code GetWindowPlacement}, set the length member to {@link WINDOWPLACEMENT#SIZEOF}. {@code GetWindowPlacement} fails if - * {@code lpwndpl->length} is not set correctly.

    - */ - @NativeType("BOOL") - public static boolean GetWindowPlacement(@NativeType("HWND") long hWnd, @NativeType("WINDOWPLACEMENT *") WINDOWPLACEMENT lpwndpl) { - return nGetWindowPlacement(hWnd, lpwndpl.address()) != 0; - } - - // --- [ SetWindowPlacement ] --- - - /** Unsafe version of: {@link #SetWindowPlacement} */ - public static native int nSetWindowPlacement(long hWnd, long lpwndpl, long __functionAddress); - - /** Unsafe version of: {@link #SetWindowPlacement} */ - public static int nSetWindowPlacement(long hWnd, long lpwndpl) { - long __functionAddress = Functions.SetWindowPlacement; - if (CHECKS) { - check(hWnd); - } - return nSetWindowPlacement(hWnd, lpwndpl, __functionAddress); - } - - /** - * Sets the show state and the restored, minimized, and maximized positions of the specified window. - * - * @param hWnd a handle to the window - * @param lpwndpl a pointer to the {@link WINDOWPLACEMENT} structure that specifies the new show state and window positions. - * - *

    Before calling {@code SetWindowPlacement}, set the {@code length} member of the {@code WINDOWPLACEMENT} structure to {@link WINDOWPLACEMENT#SIZEOF}. - * {@code SetWindowPlacement} fails if the length member is not set correctly.

    - */ - @NativeType("BOOL") - public static boolean SetWindowPlacement(@NativeType("HWND") long hWnd, @NativeType("WINDOWPLACEMENT const *") WINDOWPLACEMENT lpwndpl) { - return nSetWindowPlacement(hWnd, lpwndpl.address()) != 0; - } - - // --- [ IsWindowVisible ] --- - - /** - * Determines the visibility state of the specified window. - * - * @param hWnd a handle to the window to be tested - */ - @NativeType("BOOL") - public static boolean IsWindowVisible(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.IsWindowVisible; - if (CHECKS) { - check(hWnd); - } - return callPI(hWnd, __functionAddress) != 0; - } - - // --- [ IsIconic ] --- - - /** - * Determines whether the specified window is minimized (iconic). - * - * @param hWnd a handle to the window to be tested - */ - @NativeType("BOOL") - public static boolean IsIconic(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.IsIconic; - if (CHECKS) { - check(hWnd); - } - return callPI(hWnd, __functionAddress) != 0; - } - - // --- [ IsZoomed ] --- - - /** - * Determines whether a window is maximized. - * - * @param hWnd a handle to the window to be tested - */ - @NativeType("BOOL") - public static boolean IsZoomed(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.IsZoomed; - if (CHECKS) { - check(hWnd); - } - return callPI(hWnd, __functionAddress) != 0; - } - - // --- [ BringWindowToTop ] --- - - /** - * Brings the specified window to the top of the Z order. If the window is a top-level window, it is activated. If the window is a child window, the - * top-level parent window associated with the child window is activated. - * - * @param hWnd a handle to the window to bring to the top of the Z order - */ - @NativeType("BOOL") - public static boolean BringWindowToTop(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.BringWindowToTop; - if (CHECKS) { - check(hWnd); - } - return callPI(hWnd, __functionAddress) != 0; - } - - // --- [ SetWindowLongPtr ] --- - - /** Unsafe version of: {@link #SetWindowLongPtr} */ - public static native long nSetWindowLongPtr(long hWnd, int nIndex, long dwNewLong, long __functionAddress); - - /** - * Changes an attribute of the specified window. The function also sets a value at the specified offset in the extra window memory. - * - * @param hWnd a handle to the window and, indirectly, the class to which the window belongs - * @param nIndex the zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus the size - * of an integer. To set any other value, specify one of:
    {@link #GWL_WNDPROC}{@link #GWL_HINSTANCE}{@link #GWL_HWNDPARENT}{@link #GWL_STYLE}{@link #GWL_EXSTYLE}{@link #GWL_USERDATA}{@link #GWL_ID}
    - * @param dwNewLong the replacement value - * - * @return the previous value at the given {@code index} - */ - @NativeType("LONG_PTR") - public static long SetWindowLongPtr(@NativeType("HWND") long hWnd, int nIndex, @NativeType("LONG_PTR") long dwNewLong) { - long __functionAddress = Functions.SetWindowLongPtr; - if (CHECKS) { - check(hWnd); - } - return nSetWindowLongPtr(hWnd, nIndex, dwNewLong, __functionAddress); - } - - // --- [ GetWindowLongPtr ] --- - - /** Unsafe version of: {@link #GetWindowLongPtr} */ - public static native long nGetWindowLongPtr(long hWnd, int nIndex, long __functionAddress); - - /** - * Retrieves information about the specified window. The function also retrieves the value at a specified offset into the extra window memory. - * - * @param hWnd a handle to the window and, indirectly, the class to which the window belongs - * @param nIndex the zero-based offset to the value to be set. Valid values are in the range zero through the number of bytes of extra window memory, minus the size - * of an integer. To set any other value, specify one of:
    {@link #GWL_WNDPROC}{@link #GWL_HINSTANCE}{@link #GWL_HWNDPARENT}{@link #GWL_STYLE}{@link #GWL_EXSTYLE}{@link #GWL_USERDATA}{@link #GWL_ID}
    - */ - @NativeType("LONG_PTR") - public static long GetWindowLongPtr(@NativeType("HWND") long hWnd, int nIndex) { - long __functionAddress = Functions.GetWindowLongPtr; - if (CHECKS) { - check(hWnd); - } - return nGetWindowLongPtr(hWnd, nIndex, __functionAddress); - } - - // --- [ SetClassLongPtr ] --- - - /** Unsafe version of: {@link #SetClassLongPtr} */ - public static native long nSetClassLongPtr(long hWnd, int nIndex, long dwNewLong, long __functionAddress); - - /** - * Replaces the specified value at the specified offset in the extra class memory or the {@link WNDCLASSEX} structure for the class to which the specified - * window belongs. - * - * @param hWnd a handle to the window and, indirectly, the class to which the window belongs - * @param nIndex the value to be replaced. To set a value in the extra class memory, specify the positive, zero-based byte offset of the value to be set. Valid - * values are in the range zero through the number of bytes of extra class memory, minus eight; for example, if you specified 24 or more bytes of - * extra class memory, a value of 16 would be an index to the third integer. To set a value other than the {@link WNDCLASSEX} structure, specify one of:
    {@link #GCL_MENUNAME}{@link #GCL_HBRBACKGROUND}{@link #GCL_HCURSOR}{@link #GCL_HICON}{@link #GCL_HMODULE}{@link #GCL_CBWNDEXTRA}
    {@link #GCL_CBCLSEXTRA}{@link #GCL_WNDPROC}{@link #GCL_STYLE}{@link #GCW_ATOM}{@link #GCL_HICONSM}
    - * @param dwNewLong the replacement value - * - * @return if the function succeeds, the return value is the previous value of the specified offset. If this was not previously set, the return value is zero. - * - *

    If the function fails, the return value is zero. To get extended error information, call {@link WinBase#getLastError}.

    - */ - @NativeType("LONG_PTR") - public static long SetClassLongPtr(@NativeType("HWND") long hWnd, int nIndex, @NativeType("LONG_PTR") long dwNewLong) { - long __functionAddress = Functions.SetClassLongPtr; - if (CHECKS) { - check(hWnd); - } - return nSetClassLongPtr(hWnd, nIndex, dwNewLong, __functionAddress); - } - - // --- [ GetClassLongPtr ] --- - - /** Unsafe version of: {@link #GetClassLongPtr} */ - public static native long nGetClassLongPtr(long hWnd, int nIndex, long __functionAddress); - - /** - * Retrieves the specified value from the {@link WNDCLASSEX} structure associated with the specified window. - * - * @param hWnd a handle to the window and, indirectly, the class to which the window belongs - * @param nIndex the value to be retrieved. To retrieve a value from the extra class memory, specify the positive, zero-based byte offset of the value to be - * retrieved. Valid values are in the range zero through the number of bytes of extra class memory, minus eight; for example, if you specified 24 or - * more bytes of extra class memory, a value of 16 would be an index to the third integer. To retrieve any other value from the {@link WNDCLASSEX} - * structure, specify one of:
    {@link #GCL_MENUNAME}{@link #GCL_HBRBACKGROUND}{@link #GCL_HCURSOR}{@link #GCL_HICON}{@link #GCL_HMODULE}{@link #GCL_CBWNDEXTRA}
    {@link #GCL_CBCLSEXTRA}{@link #GCL_WNDPROC}{@link #GCL_STYLE}{@link #GCW_ATOM}{@link #GCL_HICONSM}
    - */ - @NativeType("LONG_PTR") - public static long GetClassLongPtr(@NativeType("HWND") long hWnd, int nIndex) { - long __functionAddress = Functions.GetClassLongPtr; - if (CHECKS) { - check(hWnd); - } - return nGetClassLongPtr(hWnd, nIndex, __functionAddress); - } - - // --- [ SetLayeredWindowAttributes ] --- - - /** Unsafe version of: {@link #SetLayeredWindowAttributes} */ - public static native int nSetLayeredWindowAttributes(long hwnd, int crKey, byte bAlpha, int dwFlags, long __functionAddress); - - /** - * @param hwnd a handle to the layered window. A layered window is created by specifying {@link #WS_EX_LAYERED} when creating the window with the {@link #CreateWindowEx} - * function or by setting {@link #WS_EX_LAYERED} via {@link #SetWindowLongPtr} after the window has been created. - * @param crKey the transparency color key (0x00bbggrr) to be used when composing the layered window. All pixels painted by the window in this color will be - * transparent. - * @param bAlpha the alpha value used to describe the opacity of the layered window. When {@code bAlpha} is 0, the window is completely transparent. When - * {@code bAlpha} is 255, the window is opaque. - * @param dwFlags an action to be taken. One or more of:
    {@link #LWA_COLORKEY}{@link #LWA_ALPHA}
    - */ - @NativeType("BOOL") - public static boolean SetLayeredWindowAttributes(@NativeType("HWND") long hwnd, @NativeType("COLORREF") int crKey, @NativeType("BYTE") byte bAlpha, @NativeType("DWORD") int dwFlags) { - long __functionAddress = Functions.SetLayeredWindowAttributes; - if (CHECKS) { - check(hwnd); - } - return nSetLayeredWindowAttributes(hwnd, crKey, bAlpha, dwFlags, __functionAddress) != 0; - } - - // --- [ LoadIcon ] --- - - /** Unsafe version of: {@link #LoadIcon} */ - public static native long nLoadIcon(long instance, long iconName, long __functionAddress); - - /** Unsafe version of: {@link #LoadIcon} */ - public static long nLoadIcon(long instance, long iconName) { - long __functionAddress = Functions.LoadIcon; - return nLoadIcon(instance, iconName, __functionAddress); - } - - /** - * Loads the specified icon resource from the executable (.exe) file associated with an application instance. - * - * @param instance a handle to an instance of the module whose executable file contains the icon to be loaded. This parameter must be {@code NULL} when a standard icon is - * being loaded. - * @param iconName the name of the icon resource to be loaded or one of:
    {@link #IDI_APPLICATION}{@link #IDI_HAND}{@link #IDI_QUESTION}{@link #IDI_EXCLAMATION}{@link #IDI_ASTERISK}{@link #IDI_WINLOGO}
    {@link #IDI_SHIELD}{@link #IDI_WARNING}{@link #IDI_ERROR}{@link #IDI_INFORMATION}
    - */ - @NativeType("HICON") - public static long LoadIcon(@NativeType("HINSTANCE") long instance, @NativeType("LPCTSTR") ByteBuffer iconName) { - if (CHECKS) { - checkNT2(iconName); - } - return nLoadIcon(instance, memAddress(iconName)); - } - - /** - * Loads the specified icon resource from the executable (.exe) file associated with an application instance. - * - * @param instance a handle to an instance of the module whose executable file contains the icon to be loaded. This parameter must be {@code NULL} when a standard icon is - * being loaded. - * @param iconName the name of the icon resource to be loaded or one of:
    {@link #IDI_APPLICATION}{@link #IDI_HAND}{@link #IDI_QUESTION}{@link #IDI_EXCLAMATION}{@link #IDI_ASTERISK}{@link #IDI_WINLOGO}
    {@link #IDI_SHIELD}{@link #IDI_WARNING}{@link #IDI_ERROR}{@link #IDI_INFORMATION}
    - */ - @NativeType("HICON") - public static long LoadIcon(@NativeType("HINSTANCE") long instance, @NativeType("LPCTSTR") CharSequence iconName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16(iconName, true); - long iconNameEncoded = stack.getPointerAddress(); - return nLoadIcon(instance, iconNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ LoadCursor ] --- - - /** Unsafe version of: {@link #LoadCursor} */ - public static native long nLoadCursor(long instance, long cursorName, long __functionAddress); - - /** Unsafe version of: {@link #LoadCursor} */ - public static long nLoadCursor(long instance, long cursorName) { - long __functionAddress = Functions.LoadCursor; - return nLoadCursor(instance, cursorName, __functionAddress); - } - - /** - * Loads the specified cursor resource from the executable (.EXE) file associated with an application instance. - * - * @param instance a handle to an instance of the module whose executable file contains the cursor to be loaded. - * @param cursorName the name of the cursor resource to be loaded or one of:
    {@link #IDC_ARROW}{@link #IDC_IBEAM}{@link #IDC_WAIT}{@link #IDC_CROSS}{@link #IDC_UPARROW}{@link #IDC_SIZE}{@link #IDC_ICON}{@link #IDC_SIZENWSE}
    {@link #IDC_SIZENESW}{@link #IDC_SIZEWE}{@link #IDC_SIZENS}{@link #IDC_SIZEALL}{@link #IDC_NO}{@link #IDC_HAND}{@link #IDC_APPSTARTING}{@link #IDC_HELP}
    - */ - @NativeType("HCURSOR") - public static long LoadCursor(@NativeType("HINSTANCE") long instance, @NativeType("LPCTSTR") ByteBuffer cursorName) { - if (CHECKS) { - checkNT2(cursorName); - } - return nLoadCursor(instance, memAddress(cursorName)); - } - - /** - * Loads the specified cursor resource from the executable (.EXE) file associated with an application instance. - * - * @param instance a handle to an instance of the module whose executable file contains the cursor to be loaded. - * @param cursorName the name of the cursor resource to be loaded or one of:
    {@link #IDC_ARROW}{@link #IDC_IBEAM}{@link #IDC_WAIT}{@link #IDC_CROSS}{@link #IDC_UPARROW}{@link #IDC_SIZE}{@link #IDC_ICON}{@link #IDC_SIZENWSE}
    {@link #IDC_SIZENESW}{@link #IDC_SIZEWE}{@link #IDC_SIZENS}{@link #IDC_SIZEALL}{@link #IDC_NO}{@link #IDC_HAND}{@link #IDC_APPSTARTING}{@link #IDC_HELP}
    - */ - @NativeType("HCURSOR") - public static long LoadCursor(@NativeType("HINSTANCE") long instance, @NativeType("LPCTSTR") CharSequence cursorName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16(cursorName, true); - long cursorNameEncoded = stack.getPointerAddress(); - return nLoadCursor(instance, cursorNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ GetDC ] --- - - /** - * Retrieves a handle to a device context (DC) for the client area of a specified window or for the entire screen. You can use the returned handle in - * subsequent GDI functions to draw in the DC. The device context is an opaque data structure, whose values are used internally by GDI. - * - * @param hWnd a handle to the window whose DC is to be retrieved. If this value is {@code NULL}, GetDC retrieves the DC for the entire screen. - */ - @NativeType("HDC") - public static long GetDC(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.GetDC; - return callPP(hWnd, __functionAddress); - } - - // --- [ ReleaseDC ] --- - - /** - * Releases a device context (DC), freeing it for use by other applications. The effect of the ReleaseDC function depends on the type of DC. It frees only - * common and window DCs. It has no effect on class or private DCs. - * - * @param hWnd a handle to the window whose DC is to be released - * @param hDC a handle to the DC to be released - */ - @NativeType("BOOL") - public static boolean ReleaseDC(@NativeType("HWND") long hWnd, @NativeType("HDC") long hDC) { - long __functionAddress = Functions.ReleaseDC; - if (CHECKS) { - check(hWnd); - check(hDC); - } - return callPPI(hWnd, hDC, __functionAddress) != 0; - } - - // --- [ GetSystemMetrics ] --- - - /** - * Retrieves the specified system metric or system configuration setting. - * - * @param index the system metric or configuration setting to be retrieved. One of:
    {@link #SM_CXSCREEN}{@link #SM_CYSCREEN}{@link #SM_CXVSCROLL}{@link #SM_CYHSCROLL}{@link #SM_CYCAPTION}{@link #SM_CXBORDER}
    {@link #SM_CYBORDER}{@link #SM_CXDLGFRAME}{@link #SM_CYDLGFRAME}{@link #SM_CYVTHUMB}{@link #SM_CXHTHUMB}{@link #SM_CXICON}
    {@link #SM_CYICON}{@link #SM_CXCURSOR}{@link #SM_CYCURSOR}{@link #SM_CYMENU}{@link #SM_CXFULLSCREEN}{@link #SM_CYFULLSCREEN}
    {@link #SM_CYKANJIWINDOW}{@link #SM_MOUSEPRESENT}{@link #SM_CYVSCROLL}{@link #SM_CXHSCROLL}{@link #SM_DEBUG}{@link #SM_SWAPBUTTON}
    {@link #SM_RESERVED1}{@link #SM_RESERVED2}{@link #SM_RESERVED3}{@link #SM_RESERVED4}{@link #SM_CXMIN}{@link #SM_CYMIN}
    {@link #SM_CXSIZE}{@link #SM_CYSIZE}{@link #SM_CXFRAME}{@link #SM_CYFRAME}{@link #SM_CXMINTRACK}{@link #SM_CYMINTRACK}
    {@link #SM_CXDOUBLECLK}{@link #SM_CYDOUBLECLK}{@link #SM_CXICONSPACING}{@link #SM_CYICONSPACING}{@link #SM_MENUDROPALIGNMENT}{@link #SM_PENWINDOWS}
    {@link #SM_DBCSENABLED}{@link #SM_CMOUSEBUTTONS}{@link #SM_CXFIXEDFRAME}{@link #SM_CYFIXEDFRAME}{@link #SM_CXSIZEFRAME}{@link #SM_CYSIZEFRAME}
    {@link #SM_SECURE}{@link #SM_CXEDGE}{@link #SM_CYEDGE}{@link #SM_CXMINSPACING}{@link #SM_CYMINSPACING}{@link #SM_CXSMICON}
    {@link #SM_CYSMICON}{@link #SM_CYSMCAPTION}{@link #SM_CXSMSIZE}{@link #SM_CYSMSIZE}{@link #SM_CXMENUSIZE}{@link #SM_CYMENUSIZE}
    {@link #SM_ARRANGE}{@link #SM_CXMINIMIZED}{@link #SM_CYMINIMIZED}{@link #SM_CXMAXTRACK}{@link #SM_CYMAXTRACK}{@link #SM_CXMAXIMIZED}
    {@link #SM_CYMAXIMIZED}{@link #SM_NETWORK}{@link #SM_CLEANBOOT}{@link #SM_CXDRAG}{@link #SM_CYDRAG}{@link #SM_SHOWSOUNDS}
    {@link #SM_CXMENUCHECK}{@link #SM_CYMENUCHECK}{@link #SM_SLOWMACHINE}{@link #SM_MIDEASTENABLED}{@link #SM_MOUSEWHEELPRESENT}{@link #SM_XVIRTUALSCREEN}
    {@link #SM_YVIRTUALSCREEN}{@link #SM_CXVIRTUALSCREEN}{@link #SM_CYVIRTUALSCREEN}{@link #SM_CMONITORS}{@link #SM_SAMEDISPLAYFORMAT}{@link #SM_IMMENABLED}
    {@link #SM_REMOTESESSION}{@link #SM_SHUTTINGDOWN}{@link #SM_REMOTECONTROL}{@link #SM_CARETBLINKINGENABLED}{@link #SM_CXFOCUSBORDER}{@link #SM_CYFOCUSBORDER}
    {@link #SM_TABLETPC}{@link #SM_MEDIACENTER}{@link #SM_STARTER}{@link #SM_SERVERR2}{@link #SM_MOUSEHORIZONTALWHEELPRESENT}{@link #SM_CXPADDEDBORDER}
    {@link #SM_DIGITIZER}{@link #SM_MAXIMUMTOUCHES}
    - */ - public static int GetSystemMetrics(int index) { - long __functionAddress = Functions.GetSystemMetrics; - return callI(index, __functionAddress); - } - - // --- [ RegisterTouchWindow ] --- - - /** Unsafe version of: {@link #RegisterTouchWindow} */ - public static native int nRegisterTouchWindow(long hWnd, int ulFlags, long __functionAddress); - - /** - * Registers a window as being touch-capable. - * - *

    {@code RegisterTouchWindow} must be called on every window that will be used for touch input. This means that if you have an application that has - * multiple windows within it, {@code RegisterTouchWindow} must be called on every window in that application that uses touch features. Also, an - * application can call {@code RegisterTouchWindow} any number of times for the same window if it desires to change the modifier flags. A window can be - * marked as no longer requiring touch input using the {@link #UnregisterTouchWindow} function.

    - * - * @param hWnd the handle of the window being registered. The function fails with {@code ERROR_ACCESS_DENIED} if the calling thread does not own the specified - * window. - * @param ulFlags a set of bit flags that specify optional modifications. This field may contain 0 or one or more of:
    {@link #TWF_FINETOUCH}{@link #TWF_WANTPALM}
    - * - * @since Windows 7 (desktop apps only) - */ - @NativeType("BOOL") - public static boolean RegisterTouchWindow(@NativeType("HWND") long hWnd, @NativeType("ULONG") int ulFlags) { - long __functionAddress = Functions.RegisterTouchWindow; - if (CHECKS) { - check(__functionAddress); - check(hWnd); - } - return nRegisterTouchWindow(hWnd, ulFlags, __functionAddress) != 0; - } - - // --- [ UnregisterTouchWindow ] --- - - /** Unsafe version of: {@link #UnregisterTouchWindow} */ - public static native int nUnregisterTouchWindow(long hWnd, long __functionAddress); - - /** - * Registers a window as no longer being touch-capable. - * - * @param hWnd the handle of the window. The function fails with {@code ERROR_ACCESS_DENIED} if the calling thread does not own the specified window. - * - * @since Windows 7 (desktop apps only) - */ - @NativeType("BOOL") - public static boolean UnregisterTouchWindow(@NativeType("HWND") long hWnd) { - long __functionAddress = Functions.UnregisterTouchWindow; - if (CHECKS) { - check(__functionAddress); - check(hWnd); - } - return nUnregisterTouchWindow(hWnd, __functionAddress) != 0; - } - - // --- [ IsTouchWindow ] --- - - /** Unsafe version of: {@link #IsTouchWindow} */ - public static int nIsTouchWindow(long hWnd, long pulFlags) { - long __functionAddress = Functions.IsTouchWindow; - if (CHECKS) { - check(__functionAddress); - check(hWnd); - } - return callPPI(hWnd, pulFlags, __functionAddress); - } - - /** - * Checks whether a specified window is touch-capable and, optionally, retrieves the modifier flags set for the window's touch capability. - * - * @param hWnd the handle of the window. The function fails with {@code ERROR_ACCESS_DENIED} if the calling thread is not on the same desktop as the specified - * window. - * @param pulFlags an optional address of the {@code ULONG} variable to receive the modifier flags for the specified window's touch capability. - * - * @since Windows 7 (desktop apps only) - */ - @NativeType("BOOL") - public static boolean IsTouchWindow(@NativeType("HWND") long hWnd, @Nullable @NativeType("PULONG") IntBuffer pulFlags) { - if (CHECKS) { - checkSafe(pulFlags, 1); - } - return nIsTouchWindow(hWnd, memAddressSafe(pulFlags)) != 0; - } - - // --- [ GetTouchInputInfo ] --- - - /** - * Unsafe version of: {@link #GetTouchInputInfo} - * - * @param cInputs The number of structures in the {@code pInputs} array. This should ideally be at least equal to the number of touch points associated with the - * message as indicated in the message {@code WPARAM}. If {@code cInputs} is less than the number of touch points, the function will still succeed and - * populate the {@code pInputs} buffer with information about {@code cInputs} touch points. - */ - public static native int nGetTouchInputInfo(long hTouchInput, int cInputs, long pInputs, int cbSize, long __functionAddress); - - /** - * Unsafe version of: {@link #GetTouchInputInfo} - * - * @param cInputs The number of structures in the {@code pInputs} array. This should ideally be at least equal to the number of touch points associated with the - * message as indicated in the message {@code WPARAM}. If {@code cInputs} is less than the number of touch points, the function will still succeed and - * populate the {@code pInputs} buffer with information about {@code cInputs} touch points. - */ - public static int nGetTouchInputInfo(long hTouchInput, int cInputs, long pInputs, int cbSize) { - long __functionAddress = Functions.GetTouchInputInfo; - if (CHECKS) { - check(__functionAddress); - check(hTouchInput); - } - return nGetTouchInputInfo(hTouchInput, cInputs, pInputs, cbSize, __functionAddress); - } - - /** - * Retrieves detailed information about touch inputs associated with a particular touch input handle. - * - * @param hTouchInput the touch input handle received in the {@code LPARAM} of a touch message. The function fails with {@code ERROR_INVALID_HANDLE} if this handle is - * not valid. Note that the handle is not valid after it has been used in a successful call to {@link #CloseTouchInputHandle} or after it has been passed to - * {@link #DefWindowProc}, {@link #PostMessage}, {@link #SendMessage} or one of their variants. - * @param pInputs a pointer to an array of {@link TOUCHINPUT} structures to receive information about the touch points associated with the specified touch input handle - * @param cbSize the size, in bytes, of a single {@link TOUCHINPUT} structure. If {@code cbSize} is not the size of a single {@code TOUCHINPUT} structure, the function - * fails with {@code ERROR_INVALID_PARAMETER}. - * - * @since Windows 7 (desktop apps only) - */ - @NativeType("BOOL") - public static boolean GetTouchInputInfo(@NativeType("HTOUCHINPUT") long hTouchInput, @NativeType("PTOUCHINPUT") TOUCHINPUT.Buffer pInputs, int cbSize) { - return nGetTouchInputInfo(hTouchInput, pInputs.remaining(), pInputs.address(), cbSize) != 0; - } - - // --- [ CloseTouchInputHandle ] --- - - /** Unsafe version of: {@link #CloseTouchInputHandle} */ - public static native int nCloseTouchInputHandle(long hTouchInput, long __functionAddress); - - /** - * Closes a touch input handle, frees process memory associated with it, and invalidates the handle. - * - * @param hTouchInput the touch input handle received in the {@code LPARAM} of a touch message. The function fails with {@code ERROR_INVALID_HANDLE} if this handle is - * not valid. Note that the handle is not valid after it has been used in a successful call to {@link #CloseTouchInputHandle} or after it has been passed to - * {@link #DefWindowProc}, {@link #PostMessage}, {@link #SendMessage} or one of their variants. - * - * @since Windows 7 (desktop apps only) - */ - @NativeType("BOOL") - public static boolean CloseTouchInputHandle(@NativeType("HTOUCHINPUT") long hTouchInput) { - long __functionAddress = Functions.CloseTouchInputHandle; - if (CHECKS) { - check(__functionAddress); - check(hTouchInput); - } - return nCloseTouchInputHandle(hTouchInput, __functionAddress) != 0; - } - - // --- [ MonitorFromWindow ] --- - - /** - * Retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window. - * - * @param hWnd a handle to the window of interest - * @param dwFlags determines the function's return value if the window does not intersect any display monitor. One of:
    {@link #MONITOR_DEFAULTTONULL}{@link #MONITOR_DEFAULTTOPRIMARY}{@link #MONITOR_DEFAULTTONEAREST}
    - */ - @NativeType("HMONITOR") - public static long MonitorFromWindow(@NativeType("HWND") long hWnd, @NativeType("DWORD") int dwFlags) { - long __functionAddress = Functions.MonitorFromWindow; - if (CHECKS) { - check(hWnd); - } - return callPP(hWnd, dwFlags, __functionAddress); - } - - // --- [ GetMonitorInfo ] --- - - /** Unsafe version of: {@link #GetMonitorInfo} */ - public static int nGetMonitorInfo(long hMonitor, long lpmi) { - long __functionAddress = Functions.GetMonitorInfo; - if (CHECKS) { - check(hMonitor); - } - return callPPI(hMonitor, lpmi, __functionAddress); - } - - /** - * Retrieves information about a display monitor. - * - * @param hMonitor a handle to the display monitor of interest - * @param lpmi a pointer to a {@link MONITORINFOEX} structure that receives information about the specified display monitor. - * - *

    You must set the {@code cbSize} member of the structure to {@link MONITORINFOEX#SIZEOF} before calling the {@code GetMonitorInfo} function. Doing so lets - * the function determine the type of structure you are passing to it.

    - */ - @NativeType("BOOL") - public static boolean GetMonitorInfo(@NativeType("HMONITOR") long hMonitor, @NativeType("LPMONITORINFOEX") MONITORINFOEX lpmi) { - return nGetMonitorInfo(hMonitor, lpmi.address()) != 0; - } - - // --- [ EnumDisplayDevices ] --- - - /** Unsafe version of: {@link #EnumDisplayDevices} */ - public static int nEnumDisplayDevices(long lpDevice, int iDevNum, long lpDisplayDevice, int dwFlags) { - long __functionAddress = Functions.EnumDisplayDevices; - return callPPI(lpDevice, iDevNum, lpDisplayDevice, dwFlags, __functionAddress); - } - - /** - * Obtains information about the display devices in the current session. - * - * @param lpDevice the device name. If {@code NULL}, function returns information for the display adapter(s) on the machine, based on {@code devNum}. - * @param iDevNum an index value that specifies the display device of interest. - * - *

    The operating system identifies each display device in the current session with an index value. The index values are consecutive integers, starting - * at 0. If the current session has three display devices, for example, they are specified by the index values 0, 1, and 2.

    - * @param lpDisplayDevice a pointer to a {@link DISPLAY_DEVICE} structure that receives information about the display device specified by {@code iDevNum}. - * - *

    Before calling {@code EnumDisplayDevices}, you must initialize the {@code cb} member of {@code DISPLAY_DEVICE} to the size, in bytes, of - * {@code DISPLAY_DEVICE}.

    - * @param dwFlags set this flag to {@link #EDD_GET_DEVICE_INTERFACE_NAME} to retrieve the device interface name for {@code GUID_DEVINTERFACE_MONITOR}, which is registered by - * the operating system on a per monitor basis. The value is placed in the {@code DeviceID} member of the {@link DISPLAY_DEVICE} structure returned in - * {@code lpDisplayDevice}. The resulting device interface name can be used with SetupAPI functions and serves as a link between GDI monitor devices - * and SetupAPI monitor devices. - */ - @NativeType("BOOL") - public static boolean EnumDisplayDevices(@Nullable @NativeType("LPCTSTR") ByteBuffer lpDevice, @NativeType("DWORD") int iDevNum, @NativeType("PDISPLAY_DEVICE") DISPLAY_DEVICE lpDisplayDevice, @NativeType("DWORD") int dwFlags) { - if (CHECKS) { - checkNT2Safe(lpDevice); - } - return nEnumDisplayDevices(memAddressSafe(lpDevice), iDevNum, lpDisplayDevice.address(), dwFlags) != 0; - } - - /** - * Obtains information about the display devices in the current session. - * - * @param lpDevice the device name. If {@code NULL}, function returns information for the display adapter(s) on the machine, based on {@code devNum}. - * @param iDevNum an index value that specifies the display device of interest. - * - *

    The operating system identifies each display device in the current session with an index value. The index values are consecutive integers, starting - * at 0. If the current session has three display devices, for example, they are specified by the index values 0, 1, and 2.

    - * @param lpDisplayDevice a pointer to a {@link DISPLAY_DEVICE} structure that receives information about the display device specified by {@code iDevNum}. - * - *

    Before calling {@code EnumDisplayDevices}, you must initialize the {@code cb} member of {@code DISPLAY_DEVICE} to the size, in bytes, of - * {@code DISPLAY_DEVICE}.

    - * @param dwFlags set this flag to {@link #EDD_GET_DEVICE_INTERFACE_NAME} to retrieve the device interface name for {@code GUID_DEVINTERFACE_MONITOR}, which is registered by - * the operating system on a per monitor basis. The value is placed in the {@code DeviceID} member of the {@link DISPLAY_DEVICE} structure returned in - * {@code lpDisplayDevice}. The resulting device interface name can be used with SetupAPI functions and serves as a link between GDI monitor devices - * and SetupAPI monitor devices. - */ - @NativeType("BOOL") - public static boolean EnumDisplayDevices(@Nullable @NativeType("LPCTSTR") CharSequence lpDevice, @NativeType("DWORD") int iDevNum, @NativeType("PDISPLAY_DEVICE") DISPLAY_DEVICE lpDisplayDevice, @NativeType("DWORD") int dwFlags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16Safe(lpDevice, true); - long lpDeviceEncoded = lpDevice == null ? NULL : stack.getPointerAddress(); - return nEnumDisplayDevices(lpDeviceEncoded, iDevNum, lpDisplayDevice.address(), dwFlags) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ EnumDisplaySettingsEx ] --- - - /** Unsafe version of: {@link #EnumDisplaySettingsEx} */ - public static int nEnumDisplaySettingsEx(long lpszDeviceName, int iModeNum, long lpDevMode, int dwFlags) { - long __functionAddress = Functions.EnumDisplaySettingsEx; - return callPPI(lpszDeviceName, iModeNum, lpDevMode, dwFlags, __functionAddress); - } - - /** - * Retrieves information about one of the graphics modes for a display device. To retrieve information for all the graphics modes for a display device, - * make a series of calls to this function. - * - * @param lpszDeviceName a pointer to a null-terminated string that specifies the display device about which graphics mode the function will obtain information. - * - *

    This parameter is either {@code NULL} or a {@link DISPLAY_DEVICE#DeviceName} returned from {@link #EnumDisplayDevices}. A {@code NULL} value specifies the current display - * device on the computer that the calling thread is running on.

    - * @param iModeNum indicates the type of information to be retrieved. - * - *

    Graphics mode indexes start at zero. To obtain information for all of a display device's graphics modes, make a series of calls to - * {@code EnumDisplaySettingsEx}, as follows: Set {@code iModeNum} to zero for the first call, and increment {@code iModeNum} by one for each - * subsequent call. Continue calling the function until the return value is zero.

    - * - *

    When you call {@code EnumDisplaySettingsEx} with {@code iModeNum} set to zero, the operating system initializes and caches information about the - * display device. When you call {@code EnumDisplaySettingsEx} with {@code iModeNum} set to a nonzero value, the function returns the information that - * was cached the last time the function was called with {@code iModeNum} set to zero.

    - * - *

    This value can be a graphics mode index or one of:

    {@link #ENUM_CURRENT_SETTINGS}{@link #ENUM_REGISTRY_SETTINGS}
    - * @param lpDevMode a pointer to a {@link DEVMODE} structure into which the function stores information about the specified graphics mode. Before calling - * {@code EnumDisplaySettingsEx}, set the {@code dmSize} member to {@link DEVMODE#SIZEOF}, and set the {@code dmDriverExtra} member to indicate the size, in - * bytes, of the additional space available to receive private driver data. - * - *

    The {@code EnumDisplaySettingsEx} function will populate the {@code dmFields} member of the {@code lpDevMode} and one or more other members of the - * {@code DEVMODE} structure. To determine which members were set by the call to {@code EnumDisplaySettingsEx}, inspect the {@code dmFields} bitmask.

    - * @param dwFlags this parameter can be one of:
    {@link #EDS_RAWMODE}{@link #EDS_ROTATEDMODE}
    - */ - @NativeType("BOOL") - public static boolean EnumDisplaySettingsEx(@Nullable @NativeType("LPCTSTR") ByteBuffer lpszDeviceName, @NativeType("DWORD") int iModeNum, @NativeType("DEVMODE *") DEVMODE lpDevMode, @NativeType("DWORD") int dwFlags) { - if (CHECKS) { - checkNT2Safe(lpszDeviceName); - } - return nEnumDisplaySettingsEx(memAddressSafe(lpszDeviceName), iModeNum, lpDevMode.address(), dwFlags) != 0; - } - - /** - * Retrieves information about one of the graphics modes for a display device. To retrieve information for all the graphics modes for a display device, - * make a series of calls to this function. - * - * @param lpszDeviceName a pointer to a null-terminated string that specifies the display device about which graphics mode the function will obtain information. - * - *

    This parameter is either {@code NULL} or a {@link DISPLAY_DEVICE#DeviceName} returned from {@link #EnumDisplayDevices}. A {@code NULL} value specifies the current display - * device on the computer that the calling thread is running on.

    - * @param iModeNum indicates the type of information to be retrieved. - * - *

    Graphics mode indexes start at zero. To obtain information for all of a display device's graphics modes, make a series of calls to - * {@code EnumDisplaySettingsEx}, as follows: Set {@code iModeNum} to zero for the first call, and increment {@code iModeNum} by one for each - * subsequent call. Continue calling the function until the return value is zero.

    - * - *

    When you call {@code EnumDisplaySettingsEx} with {@code iModeNum} set to zero, the operating system initializes and caches information about the - * display device. When you call {@code EnumDisplaySettingsEx} with {@code iModeNum} set to a nonzero value, the function returns the information that - * was cached the last time the function was called with {@code iModeNum} set to zero.

    - * - *

    This value can be a graphics mode index or one of:

    {@link #ENUM_CURRENT_SETTINGS}{@link #ENUM_REGISTRY_SETTINGS}
    - * @param lpDevMode a pointer to a {@link DEVMODE} structure into which the function stores information about the specified graphics mode. Before calling - * {@code EnumDisplaySettingsEx}, set the {@code dmSize} member to {@link DEVMODE#SIZEOF}, and set the {@code dmDriverExtra} member to indicate the size, in - * bytes, of the additional space available to receive private driver data. - * - *

    The {@code EnumDisplaySettingsEx} function will populate the {@code dmFields} member of the {@code lpDevMode} and one or more other members of the - * {@code DEVMODE} structure. To determine which members were set by the call to {@code EnumDisplaySettingsEx}, inspect the {@code dmFields} bitmask.

    - * @param dwFlags this parameter can be one of:
    {@link #EDS_RAWMODE}{@link #EDS_ROTATEDMODE}
    - */ - @NativeType("BOOL") - public static boolean EnumDisplaySettingsEx(@Nullable @NativeType("LPCTSTR") CharSequence lpszDeviceName, @NativeType("DWORD") int iModeNum, @NativeType("DEVMODE *") DEVMODE lpDevMode, @NativeType("DWORD") int dwFlags) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16Safe(lpszDeviceName, true); - long lpszDeviceNameEncoded = lpszDeviceName == null ? NULL : stack.getPointerAddress(); - return nEnumDisplaySettingsEx(lpszDeviceNameEncoded, iModeNum, lpDevMode.address(), dwFlags) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ ChangeDisplaySettingsEx ] --- - - /** Unsafe version of: {@link #ChangeDisplaySettingsEx} */ - public static int nChangeDisplaySettingsEx(long lpszDeviceName, long lpDevMode, long hwnd, int dwflags, long lParam) { - long __functionAddress = Functions.ChangeDisplaySettingsEx; - return callPPPPI(lpszDeviceName, lpDevMode, hwnd, dwflags, lParam, __functionAddress); - } - - /** - * Changes the settings of the specified display device to the specified graphics mode. - * - * @param lpszDeviceName a pointer to a null-terminated string that specifies the display device whose graphics mode will change. Only display device names as returned by - * {@link #EnumDisplayDevices} are valid. - * - *

    The {@code lpszDeviceName} parameter can be {@code NULL}. A {@code NULL} value specifies the default display device. The default device can be determined by - * calling {@code EnumDisplayDevices} and checking for the {@link GDI32#DISPLAY_DEVICE_PRIMARY_DEVICE} flag.

    - * @param lpDevMode a pointer to a {@link DEVMODE} structure that describes the new graphics mode. If {@code lpDevMode} is {@code NULL}, all the values currently in the registry - * will be used for the display setting. Passing {@code NULL} for the {@code lpDevMode} parameter and 0 for the {@code dwFlags} parameter is the easiest way - * to return to the default mode after a dynamic mode change. - * - *

    The {@code dmSize} member must be initialized to the size, in bytes, of the {@code DEVMODE} structure. The {@code dmDriverExtra} member must be - * initialized to indicate the number of bytes of private driver data following the {@code DEVMODE} structure.

    - * @param hwnd reserved; must be {@code NULL} - * @param dwflags indicates how the graphics mode should be changed. One of:
    {@link #CDS_UPDATEREGISTRY}{@link #CDS_TEST}{@link #CDS_FULLSCREEN}{@link #CDS_GLOBAL}{@link #CDS_SET_PRIMARY}
    {@link #CDS_VIDEOPARAMETERS}{@link #CDS_ENABLE_UNSAFE_MODES}{@link #CDS_DISABLE_UNSAFE_MODES}{@link #CDS_RESET}{@link #CDS_RESET_EX}
    {@link #CDS_NORESET}
    - * @param lParam if {@code flags} is {@link #CDS_VIDEOPARAMETERS}, {@code lParam} is a pointer to a {@code VIDEOPARAMETERS} structure. Otherwise {@code lParam} must be {@code NULL}. - * - * @return one of the following values: {@link #DISP_CHANGE_SUCCESSFUL} {@link #DISP_CHANGE_RESTART} {@link #DISP_CHANGE_FAILED} {@link #DISP_CHANGE_BADMODE} {@link #DISP_CHANGE_NOTUPDATED} {@link #DISP_CHANGE_BADFLAGS} {@link #DISP_CHANGE_BADPARAM} {@link #DISP_CHANGE_BADDUALVIEW} - */ - @NativeType("LONG") - public static int ChangeDisplaySettingsEx(@Nullable @NativeType("LPCTSTR") ByteBuffer lpszDeviceName, @Nullable @NativeType("DEVMODE *") DEVMODE lpDevMode, @NativeType("HWND") long hwnd, @NativeType("DWORD") int dwflags, @NativeType("LPVOID") long lParam) { - if (CHECKS) { - checkNT2Safe(lpszDeviceName); - } - return nChangeDisplaySettingsEx(memAddressSafe(lpszDeviceName), memAddressSafe(lpDevMode), hwnd, dwflags, lParam); - } - - /** - * Changes the settings of the specified display device to the specified graphics mode. - * - * @param lpszDeviceName a pointer to a null-terminated string that specifies the display device whose graphics mode will change. Only display device names as returned by - * {@link #EnumDisplayDevices} are valid. - * - *

    The {@code lpszDeviceName} parameter can be {@code NULL}. A {@code NULL} value specifies the default display device. The default device can be determined by - * calling {@code EnumDisplayDevices} and checking for the {@link GDI32#DISPLAY_DEVICE_PRIMARY_DEVICE} flag.

    - * @param lpDevMode a pointer to a {@link DEVMODE} structure that describes the new graphics mode. If {@code lpDevMode} is {@code NULL}, all the values currently in the registry - * will be used for the display setting. Passing {@code NULL} for the {@code lpDevMode} parameter and 0 for the {@code dwFlags} parameter is the easiest way - * to return to the default mode after a dynamic mode change. - * - *

    The {@code dmSize} member must be initialized to the size, in bytes, of the {@code DEVMODE} structure. The {@code dmDriverExtra} member must be - * initialized to indicate the number of bytes of private driver data following the {@code DEVMODE} structure.

    - * @param hwnd reserved; must be {@code NULL} - * @param dwflags indicates how the graphics mode should be changed. One of:
    {@link #CDS_UPDATEREGISTRY}{@link #CDS_TEST}{@link #CDS_FULLSCREEN}{@link #CDS_GLOBAL}{@link #CDS_SET_PRIMARY}
    {@link #CDS_VIDEOPARAMETERS}{@link #CDS_ENABLE_UNSAFE_MODES}{@link #CDS_DISABLE_UNSAFE_MODES}{@link #CDS_RESET}{@link #CDS_RESET_EX}
    {@link #CDS_NORESET}
    - * @param lParam if {@code flags} is {@link #CDS_VIDEOPARAMETERS}, {@code lParam} is a pointer to a {@code VIDEOPARAMETERS} structure. Otherwise {@code lParam} must be {@code NULL}. - * - * @return one of the following values: {@link #DISP_CHANGE_SUCCESSFUL} {@link #DISP_CHANGE_RESTART} {@link #DISP_CHANGE_FAILED} {@link #DISP_CHANGE_BADMODE} {@link #DISP_CHANGE_NOTUPDATED} {@link #DISP_CHANGE_BADFLAGS} {@link #DISP_CHANGE_BADPARAM} {@link #DISP_CHANGE_BADDUALVIEW} - */ - @NativeType("LONG") - public static int ChangeDisplaySettingsEx(@Nullable @NativeType("LPCTSTR") CharSequence lpszDeviceName, @Nullable @NativeType("DEVMODE *") DEVMODE lpDevMode, @NativeType("HWND") long hwnd, @NativeType("DWORD") int dwflags, @NativeType("LPVOID") long lParam) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16Safe(lpszDeviceName, true); - long lpszDeviceNameEncoded = lpszDeviceName == null ? NULL : stack.getPointerAddress(); - return nChangeDisplaySettingsEx(lpszDeviceNameEncoded, memAddressSafe(lpDevMode), hwnd, dwflags, lParam); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ GetCursorPos ] --- - - /** Unsafe version of: {@link #GetCursorPos} */ - public static int nGetCursorPos(long point) { - long __functionAddress = Functions.GetCursorPos; - return callPI(point, __functionAddress); - } - - /** - * Retrieves the position of the mouse cursor, in screen coordinates. - * - * @param point a pointer to a {@link POINT} structure that receives the screen coordinates of the cursor - */ - @NativeType("BOOL") - public static boolean GetCursorPos(@NativeType("LPPOINT") POINT point) { - return nGetCursorPos(point.address()) != 0; - } - - // --- [ SetCursorPos ] --- - - /** - * Moves the cursor to the specified screen coordinates. If the new coordinates are not within the screen rectangle set by the most recent {@link #ClipCursor} - * function call, the system automatically adjusts the coordinates so that the cursor stays within the rectangle. - * - * @param X the new x-coordinate of the cursor, in screen coordinates. - * @param Y the new y-coordinate of the cursor, in screen coordinates. - */ - @NativeType("BOOL") - public static boolean SetCursorPos(int X, int Y) { - long __functionAddress = Functions.SetCursorPos; - return callI(X, Y, __functionAddress) != 0; - } - - // --- [ ClipCursor ] --- - - /** Unsafe version of: {@link #ClipCursor} */ - public static int nClipCursor(long rect) { - long __functionAddress = Functions.ClipCursor; - return callPI(rect, __functionAddress); - } - - /** - * Confines the cursor to a rectangular area on the screen. If a subsequent cursor position (set by the {@link #SetCursorPos} function or the mouse) lies - * outside the rectangle, the system automatically adjusts the position to keep the cursor inside the rectangular area. - * - * @param rect a pointer to the structure that contains the screen coordinates of the upper-left and lower-right corners of the confining rectangle. If this - * parameter is {@code NULL}, the cursor is free to move anywhere on the screen. - */ - @NativeType("BOOL") - public static boolean ClipCursor(@Nullable @NativeType("RECT const *") RECT rect) { - return nClipCursor(memAddressSafe(rect)) != 0; - } - - // --- [ ShowCursor ] --- - - /** - * Displays or hides the cursor. - * - *

    This function sets an internal display counter that determines whether the cursor should be displayed. The cursor is displayed only if the display - * count is greater than or equal to 0. If a mouse is installed, the initial display count is 0. If no mouse is installed, the display count is –1.

    - * - * @param show If {@code show} is {@link WinBase#TRUE}, the display count is incremented by one. If {@code show} is {@link WinBase#FALSE}, the display count is decremented by one. - * - * @return the new display counter - */ - public static int ShowCursor(@NativeType("BOOL") boolean show) { - long __functionAddress = Functions.ShowCursor; - return callI(show ? 1 : 0, __functionAddress); - } - - // --- [ SetCursor ] --- - - /** - * Sets the cursor shape. - * - *

    The cursor is set only if the new cursor is different from the previous cursor; otherwise, the function returns immediately.

    - * - *

    The cursor is a shared resource. A window should set the cursor shape only when the cursor is in its client area or when the window is capturing mouse - * input. In systems without a mouse, the window should restore the previous cursor before the cursor leaves the client area or before it relinquishes - * control to another window.

    - * - *

    If your application must set the cursor while it is in a window, make sure the class cursor for the specified window's class is set to {@code NULL}. If the - * class cursor is not {@code NULL}, the system restores the class cursor each time the mouse is moved.

    - * - *

    The cursor is not shown on the screen if the internal cursor display count is less than zero. This occurs if the application uses the {@link #ShowCursor} - * function to hide the cursor more times than to show the cursor.

    - * - * @param hCursor a handle to the cursor. The cursor must have been created by the {@code CreateCursor} function or loaded by the {@link #LoadCursor} or {@code LoadImage} - * function. If this parameter is {@code NULL}, the cursor is removed from the screen. - * - * @return the handle to the previous cursor, if there was one - */ - @NativeType("HCURSOR") - public static long SetCursor(@NativeType("HCURSOR") long hCursor) { - long __functionAddress = Functions.SetCursor; - return callPP(hCursor, __functionAddress); - } - - // --- [ ClientToScreen ] --- - - /** Unsafe version of: {@link #ClientToScreen} */ - public static int nClientToScreen(long hWnd, long lpPoint) { - long __functionAddress = Functions.ClientToScreen; - if (CHECKS) { - check(hWnd); - } - return callPPI(hWnd, lpPoint, __functionAddress); - } - - /** - * Converts the client-area coordinates of a specified point to screen coordinates. - * - *

    The {@code ClientToScreen} function replaces the client-area coordinates in the {@link POINT} structure with the screen coordinates. The screen coordinates - * are relative to the upper-left corner of the screen. Note, a screen-coordinate point that is above the window's client area has a negative - * y-coordinate. Similarly, a screen coordinate to the left of a client area has a negative x-coordinate.

    - * - *

    All coordinates are device coordinates.

    - * - * @param hWnd a handle to the window whose client area is used for the conversion - * @param lpPoint a pointer to a {@code POINT} structure that contains the client coordinates to be converted. The new screen coordinates are copied into this - * structure if the function succeeds. - */ - @NativeType("BOOL") - public static boolean ClientToScreen(@NativeType("HWND") long hWnd, @NativeType("LPPOINT") POINT lpPoint) { - return nClientToScreen(hWnd, lpPoint.address()) != 0; - } - - // --- [ GetAsyncKeyState ] --- - - /** - * Determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to - * {@code GetAsyncKeyState}. - * - *

    The {@code GetAsyncKeyState} function works with mouse buttons. However, it checks on the state of the physical mouse buttons, not on the logical mouse - * buttons that the physical buttons are mapped to. For example, the call {@code GetAsyncKeyState(VK_LBUTTON)} always returns the state of the left - * physical mouse button, regardless of whether it is mapped to the left or right logical mouse button. You can determine the system's current mapping of - * physical mouse buttons to logical mouse buttons by calling {@code GetSystemMetrics(SM_SWAPBUTTON)} which returns {@link WinBase#TRUE} if the mouse buttons have been - * swapped.

    - * - *

    Although the least significant bit of the return value indicates whether the key has been pressed since the last query, due to the pre-emptive - * multitasking nature of Windows, another application can call {@code GetAsyncKeyState} and receive the "recently pressed" bit instead of your - * application. The behavior of the least significant bit of the return value is retained strictly for compatibility with 16-bit Windows applications - * (which are non-preemptive) and should not be relied upon.

    - * - *

    You can use the virtual-key code constants {@link #VK_SHIFT}, {@link #VK_CONTROL}, and {@link #VK_MENU} as values for the {@code vKey} parameter. This gives the state of the - * SHIFT, CTRL, or ALT keys without distinguishing between left and right.

    - * - * @param vKey the virtual-key code. You can use left- and right-distinguishing constants to specify certain keys. - * - * @return if the function succeeds, the return value specifies whether the key was pressed since the last call to {@code GetAsyncKeyState}, and whether the key - * is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the - * previous call to {@code GetAsyncKeyState}. However, you should not rely on this last behavior; for more information, see the Remarks. - * - *

    The return value is zero for the following cases:

    - * - *
      - *
    • The current desktop is not the active desktop
    • - *
    • The foreground thread belongs to another process and the desktop does not allow the hook or the journal record.
    • - *
    - */ - @NativeType("SHORT") - public static short GetAsyncKeyState(int vKey) { - long __functionAddress = Functions.GetAsyncKeyState; - return callS(vKey, __functionAddress); - } - - // --- [ GetMessageExtraInfo ] --- - - /** - * Retrieves the extra message information for the current thread. - * - *

    Extra message information is an application- or driver-defined value associated with the current thread's message queue.

    - * - * @return the extra information. The meaning of the extra information is device specific. - */ - @NativeType("LPARAM") - public static long GetMessageExtraInfo() { - long __functionAddress = Functions.GetMessageExtraInfo; - return callP(__functionAddress); - } - - // --- [ SendInput ] --- - - /** - * Unsafe version of: {@link #SendInput} - * - * @param cInputs the number of structures in the {@code pInputs} array - */ - public static int nSendInput(int cInputs, long pInputs, int cbSize) { - long __functionAddress = Functions.SendInput; - return callPI(cInputs, pInputs, cbSize, __functionAddress); - } - - /** - * Synthesizes keystrokes, mouse motions, and button clicks. - * - *

    This function is subject to UIPI. Applications are permitted to inject input only into applications that are at an equal or lesser integrity level.

    - * - *

    The {@code SendInput} function inserts the events in the {@link INPUT} structures serially into the keyboard or mouse input stream. These events are not - * interspersed with other keyboard or mouse input events inserted either by the user (with the keyboard or mouse) or by calls to {@code keybd_event}, - * {@code mouse_event}, or other calls to {@code SendInput}.

    - * - *

    This function does not reset the keyboard's current state. Any keys that are already pressed when the function is called might interfere with the - * events that this function generates. To avoid this problem, check the keyboard's state with the {@link #GetAsyncKeyState} function and correct as necessary.

    - * - *

    Because the touch keyboard uses the surrogate macros defined in {@code winnls.h} to send input to the system, a listener on the keyboard event hook - * must decode input originating from the touch keyboard.

    - * - *

    An accessibility application can use {@code SendInput} to inject keystrokes corresponding to application launch shortcut keys that are handled by the - * shell. This functionality is not guaranteed to work for other types of applications.

    - * - * @param pInputs an array of {@code INPUT} structures. Each structure represents an event to be inserted into the keyboard or mouse input stream. - * @param cbSize the size, in bytes, of an {@code INPUT} structure. If {@code cbSiz}e is not the size of an {@code INPUT} structure, the function fails. - * - * @return the number of events that it successfully inserted into the keyboard or mouse input stream. If the function returns zero, the input was already blocked - * by another thread. To get extended error information, call {@link WinBase#GetLastError}. - * - *

    This function fails when it is blocked by UIPI. Note that neither GetLastError nor the return value will indicate the failure was caused by UIPI - * blocking.

    - */ - @NativeType("UINT") - public static int SendInput(@NativeType("PINPUT") INPUT.Buffer pInputs, int cbSize) { - return nSendInput(pInputs.remaining(), pInputs.address(), cbSize); - } - - // --- [ GetDpiForSystem ] --- - - /** - * Returns the system DPI. - * - *

    The return value will be dependent based upon the calling context. If the current thread has a {@code DPI_AWARENESS} value of {@link #DPI_AWARENESS_UNAWARE}, - * the return value will be 96. That is because the current context always assumes a DPI of 96. For any other {@code DPI_AWARENESS} value, the return - * value will be the actual system DPI.

    - * - *

    You should not cache the system DPI, but should use {@code GetDpiForSystem} whenever you need the system DPI value.

    - * - * @return the system DPI value - * - * @since Windows 10 - */ - @NativeType("UINT") - public static int GetDpiForSystem() { - long __functionAddress = Functions.GetDpiForSystem; - if (CHECKS) { - check(__functionAddress); - } - return callI(__functionAddress); - } - - // --- [ GetDpiForWindow ] --- - - /** - * Returns the dots per inch (dpi) value for the associated window. - * - * @param hwnd the window you want to get information about - * - * @return the DPI for the window which depends on the {@code DPI_AWARENESS} of the window. An invalid {@code hwnd} value will result in a return value of 0. - * - * @since Windows 10 - */ - @NativeType("UINT") - public static int GetDpiForWindow(@NativeType("HWND") long hwnd) { - long __functionAddress = Functions.GetDpiForWindow; - if (CHECKS) { - check(__functionAddress); - check(hwnd); - } - return callPI(hwnd, __functionAddress); - } - - // --- [ GetAwarenessFromDpiAwarenessContext ] --- - - /** - * Retrieves the {@code DPI_AWARENESS} value from a {@code DPI_AWARENESS_CONTEXT}. - * - * @param value the {@code DPI_AWARENESS_CONTEXT} you want to examine - * - * @return the {@code DPI_AWARENESS}. If the provided value is null or invalid, this method will return {@link #DPI_AWARENESS_INVALID}. - * - * @since Windows 10 - */ - @NativeType("DPI_AWARENESS") - public static int GetAwarenessFromDpiAwarenessContext(@NativeType("DPI_AWARENESS_CONTEXT") long value) { - long __functionAddress = Functions.GetAwarenessFromDpiAwarenessContext; - if (CHECKS) { - check(__functionAddress); - check(value); - } - return callPI(value, __functionAddress); - } - - // --- [ GetThreadDpiAwarenessContext ] --- - - /** - * Gets the {@code DPI_AWARENESS_CONTEXT} for the current thread. - * - *

    If {@link #SetThreadDpiAwarenessContext} was never called for this thread, then the return value will equal the default {@code DPI_AWARENESS_CONTEXT} for the - * process.

    - * - * @return the current {@code DPI_AWARENESS_CONTEXT} for the thread. - * - * @since Windows 10 - */ - @NativeType("DPI_AWARENESS_CONTEXT") - public static long GetThreadDpiAwarenessContext() { - long __functionAddress = Functions.GetThreadDpiAwarenessContext; - if (CHECKS) { - check(__functionAddress); - } - return callP(__functionAddress); - } - - // --- [ GetWindowDpiAwarenessContext ] --- - - /** - * Returns the {@code DPI_AWARENESS_CONTEXT} associated with a window. - * - * @param hwnd the window to query - * - * @return the {@code DPI_AWARENESS_CONTEXT} for the provided window. If the window is not valid, the return value is {@code NULL}. - * - * @since Windows 10 - */ - @NativeType("DPI_AWARENESS_CONTEXT") - public static long GetWindowDpiAwarenessContext(@NativeType("HWND") long hwnd) { - long __functionAddress = Functions.GetWindowDpiAwarenessContext; - if (CHECKS) { - check(__functionAddress); - check(hwnd); - } - return callPP(hwnd, __functionAddress); - } - - // --- [ IsValidDpiAwarenessContext ] --- - - /** - * Determines if a specified {@code DPI_AWARENESS_CONTEXT} is valid and supported by the current system. - * - * @param value the context that you want to determine if it is supported - * - * @return {@link WinBase#TRUE} if the provided context is supported, otherwise {@link WinBase#FALSE} - * - * @since Windows 10 - */ - @NativeType("BOOL") - public static boolean IsValidDpiAwarenessContext(@NativeType("DPI_AWARENESS_CONTEXT") long value) { - long __functionAddress = Functions.IsValidDpiAwarenessContext; - if (CHECKS) { - check(__functionAddress); - } - return callPI(value, __functionAddress) != 0; - } - - // --- [ SetThreadDpiAwarenessContext ] --- - - /** - * Set the DPI awareness for the current thread to the provided value. - * - * @param dpiContext the DPI awareness value to set - * - * @return The old {@code DPI_AWARENESS_CONTEXT} for the thread. If the {@code dpiContext} is invalid, the thread will not be updated and the return value will be - * {@code NULL}. You can use this value to restore the old {@code DPI_AWARENESS_CONTEXT} after overriding it with a predefined value. - * - * @since Windows 10 - */ - @NativeType("DPI_AWARENESS_CONTEXT") - public static long SetThreadDpiAwarenessContext(@NativeType("DPI_AWARENESS_CONTEXT") long dpiContext) { - long __functionAddress = Functions.SetThreadDpiAwarenessContext; - if (CHECKS) { - check(__functionAddress); - check(dpiContext); - } - return callPP(dpiContext, __functionAddress); - } - - /** Array version of: {@link #IsTouchWindow} */ - @NativeType("BOOL") - public static boolean IsTouchWindow(@NativeType("HWND") long hWnd, @Nullable @NativeType("PULONG") int[] pulFlags) { - long __functionAddress = Functions.IsTouchWindow; - if (CHECKS) { - check(__functionAddress); - check(hWnd); - checkSafe(pulFlags, 1); - } - return callPPI(hWnd, pulFlags, __functionAddress) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/WINDOWPLACEMENT.java b/LWJGL/src/main/java/org/lwjgl/system/windows/WINDOWPLACEMENT.java deleted file mode 100644 index 97b90cbb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/WINDOWPLACEMENT.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains information about the placement of a window on the screen. - * - *

    Layout

    - * - *
    
    - * struct WINDOWPLACEMENT {
    - *     UINT {@link #length};
    - *     UINT {@link #flags};
    - *     UINT {@link #showCmd};
    - *     {@link POINT POINT} {@link #ptMinPosition};
    - *     {@link POINT POINT} {@link #ptMaxPosition};
    - *     {@link RECT RECT} {@link #rcNormalPosition};
    - * }
    - */ -public class WINDOWPLACEMENT extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - LENGTH, - FLAGS, - SHOWCMD, - PTMINPOSITION, - PTMAXPOSITION, - RCNORMALPOSITION; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(POINT.SIZEOF, POINT.ALIGNOF), - __member(POINT.SIZEOF, POINT.ALIGNOF), - __member(RECT.SIZEOF, RECT.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - LENGTH = layout.offsetof(0); - FLAGS = layout.offsetof(1); - SHOWCMD = layout.offsetof(2); - PTMINPOSITION = layout.offsetof(3); - PTMAXPOSITION = layout.offsetof(4); - RCNORMALPOSITION = layout.offsetof(5); - } - - protected WINDOWPLACEMENT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected WINDOWPLACEMENT create(long address, @Nullable ByteBuffer container) { - return new WINDOWPLACEMENT(address, container); - } - - /** - * Creates a {@code WINDOWPLACEMENT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public WINDOWPLACEMENT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * the length of the structure, in bytes. Before calling the {@link User32#GetWindowPlacement} or {@link User32#SetWindowPlacement} functions, set this member to - * {@link #SIZEOF}. - */ - @NativeType("UINT") - public int length() { return nlength(address()); } - /** the flags that control the position of the minimized window and the method by which the window is restored. This member can be one or more of thefollowing values:
    {@link User32#WPF_SETMINPOSITION} {@link User32#WPF_RESTORETOMAXIMIZED} {@link User32#WPF_ASYNCWINDOWPLACEMENT} */ - @NativeType("UINT") - public int flags() { return nflags(address()); } - /** the current show state of the window */ - @NativeType("UINT") - public int showCmd() { return nshowCmd(address()); } - /** the coordinates of the window's upper-left corner when the window is minimized */ - public POINT ptMinPosition() { return nptMinPosition(address()); } - /** the coordinates of the window's upper-left corner when the window is maximized */ - public POINT ptMaxPosition() { return nptMaxPosition(address()); } - /** the window's coordinates when the window is in the restored position */ - public RECT rcNormalPosition() { return nrcNormalPosition(address()); } - - /** Sets the specified value to the {@link #length} field. */ - public WINDOWPLACEMENT length(@NativeType("UINT") int value) { nlength(address(), value); return this; } - /** Sets the specified value to the {@link #flags} field. */ - public WINDOWPLACEMENT flags(@NativeType("UINT") int value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@link #showCmd} field. */ - public WINDOWPLACEMENT showCmd(@NativeType("UINT") int value) { nshowCmd(address(), value); return this; } - /** Copies the specified {@link POINT} to the {@link #ptMinPosition} field. */ - public WINDOWPLACEMENT ptMinPosition(POINT value) { nptMinPosition(address(), value); return this; } - /** Passes the {@link #ptMinPosition} field to the specified {@link java.util.function.Consumer Consumer}. */ - public WINDOWPLACEMENT ptMinPosition(java.util.function.Consumer consumer) { consumer.accept(ptMinPosition()); return this; } - /** Copies the specified {@link POINT} to the {@link #ptMaxPosition} field. */ - public WINDOWPLACEMENT ptMaxPosition(POINT value) { nptMaxPosition(address(), value); return this; } - /** Passes the {@link #ptMaxPosition} field to the specified {@link java.util.function.Consumer Consumer}. */ - public WINDOWPLACEMENT ptMaxPosition(java.util.function.Consumer consumer) { consumer.accept(ptMaxPosition()); return this; } - /** Copies the specified {@link RECT} to the {@link #rcNormalPosition} field. */ - public WINDOWPLACEMENT rcNormalPosition(RECT value) { nrcNormalPosition(address(), value); return this; } - /** Passes the {@link #rcNormalPosition} field to the specified {@link java.util.function.Consumer Consumer}. */ - public WINDOWPLACEMENT rcNormalPosition(java.util.function.Consumer consumer) { consumer.accept(rcNormalPosition()); return this; } - - /** Initializes this struct with the specified values. */ - public WINDOWPLACEMENT set( - int length, - int flags, - int showCmd, - POINT ptMinPosition, - POINT ptMaxPosition, - RECT rcNormalPosition - ) { - length(length); - flags(flags); - showCmd(showCmd); - ptMinPosition(ptMinPosition); - ptMaxPosition(ptMaxPosition); - rcNormalPosition(rcNormalPosition); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public WINDOWPLACEMENT set(WINDOWPLACEMENT src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code WINDOWPLACEMENT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static WINDOWPLACEMENT malloc() { - return new WINDOWPLACEMENT(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code WINDOWPLACEMENT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static WINDOWPLACEMENT calloc() { - return new WINDOWPLACEMENT(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code WINDOWPLACEMENT} instance allocated with {@link BufferUtils}. */ - public static WINDOWPLACEMENT create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new WINDOWPLACEMENT(memAddress(container), container); - } - - /** Returns a new {@code WINDOWPLACEMENT} instance for the specified memory address. */ - public static WINDOWPLACEMENT create(long address) { - return new WINDOWPLACEMENT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static WINDOWPLACEMENT createSafe(long address) { - return address == NULL ? null : new WINDOWPLACEMENT(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static WINDOWPLACEMENT mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static WINDOWPLACEMENT callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static WINDOWPLACEMENT mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static WINDOWPLACEMENT callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code WINDOWPLACEMENT} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static WINDOWPLACEMENT malloc(MemoryStack stack) { - return new WINDOWPLACEMENT(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code WINDOWPLACEMENT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static WINDOWPLACEMENT calloc(MemoryStack stack) { - return new WINDOWPLACEMENT(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #length}. */ - public static int nlength(long struct) { return UNSAFE.getInt(null, struct + WINDOWPLACEMENT.LENGTH); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + WINDOWPLACEMENT.FLAGS); } - /** Unsafe version of {@link #showCmd}. */ - public static int nshowCmd(long struct) { return UNSAFE.getInt(null, struct + WINDOWPLACEMENT.SHOWCMD); } - /** Unsafe version of {@link #ptMinPosition}. */ - public static POINT nptMinPosition(long struct) { return POINT.create(struct + WINDOWPLACEMENT.PTMINPOSITION); } - /** Unsafe version of {@link #ptMaxPosition}. */ - public static POINT nptMaxPosition(long struct) { return POINT.create(struct + WINDOWPLACEMENT.PTMAXPOSITION); } - /** Unsafe version of {@link #rcNormalPosition}. */ - public static RECT nrcNormalPosition(long struct) { return RECT.create(struct + WINDOWPLACEMENT.RCNORMALPOSITION); } - - /** Unsafe version of {@link #length(int) length}. */ - public static void nlength(long struct, int value) { UNSAFE.putInt(null, struct + WINDOWPLACEMENT.LENGTH, value); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + WINDOWPLACEMENT.FLAGS, value); } - /** Unsafe version of {@link #showCmd(int) showCmd}. */ - public static void nshowCmd(long struct, int value) { UNSAFE.putInt(null, struct + WINDOWPLACEMENT.SHOWCMD, value); } - /** Unsafe version of {@link #ptMinPosition(POINT) ptMinPosition}. */ - public static void nptMinPosition(long struct, POINT value) { memCopy(value.address(), struct + WINDOWPLACEMENT.PTMINPOSITION, POINT.SIZEOF); } - /** Unsafe version of {@link #ptMaxPosition(POINT) ptMaxPosition}. */ - public static void nptMaxPosition(long struct, POINT value) { memCopy(value.address(), struct + WINDOWPLACEMENT.PTMAXPOSITION, POINT.SIZEOF); } - /** Unsafe version of {@link #rcNormalPosition(RECT) rcNormalPosition}. */ - public static void nrcNormalPosition(long struct, RECT value) { memCopy(value.address(), struct + WINDOWPLACEMENT.RCNORMALPOSITION, RECT.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link WINDOWPLACEMENT} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final WINDOWPLACEMENT ELEMENT_FACTORY = WINDOWPLACEMENT.create(-1L); - - /** - * Creates a new {@code WINDOWPLACEMENT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link WINDOWPLACEMENT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected WINDOWPLACEMENT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link WINDOWPLACEMENT#length} field. */ - @NativeType("UINT") - public int length() { return WINDOWPLACEMENT.nlength(address()); } - /** @return the value of the {@link WINDOWPLACEMENT#flags} field. */ - @NativeType("UINT") - public int flags() { return WINDOWPLACEMENT.nflags(address()); } - /** @return the value of the {@link WINDOWPLACEMENT#showCmd} field. */ - @NativeType("UINT") - public int showCmd() { return WINDOWPLACEMENT.nshowCmd(address()); } - /** @return a {@link POINT} view of the {@link WINDOWPLACEMENT#ptMinPosition} field. */ - public POINT ptMinPosition() { return WINDOWPLACEMENT.nptMinPosition(address()); } - /** @return a {@link POINT} view of the {@link WINDOWPLACEMENT#ptMaxPosition} field. */ - public POINT ptMaxPosition() { return WINDOWPLACEMENT.nptMaxPosition(address()); } - /** @return a {@link RECT} view of the {@link WINDOWPLACEMENT#rcNormalPosition} field. */ - public RECT rcNormalPosition() { return WINDOWPLACEMENT.nrcNormalPosition(address()); } - - /** Sets the specified value to the {@link WINDOWPLACEMENT#length} field. */ - public Buffer length(@NativeType("UINT") int value) { WINDOWPLACEMENT.nlength(address(), value); return this; } - /** Sets the specified value to the {@link WINDOWPLACEMENT#flags} field. */ - public Buffer flags(@NativeType("UINT") int value) { WINDOWPLACEMENT.nflags(address(), value); return this; } - /** Sets the specified value to the {@link WINDOWPLACEMENT#showCmd} field. */ - public Buffer showCmd(@NativeType("UINT") int value) { WINDOWPLACEMENT.nshowCmd(address(), value); return this; } - /** Copies the specified {@link POINT} to the {@link WINDOWPLACEMENT#ptMinPosition} field. */ - public Buffer ptMinPosition(POINT value) { WINDOWPLACEMENT.nptMinPosition(address(), value); return this; } - /** Passes the {@link WINDOWPLACEMENT#ptMinPosition} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer ptMinPosition(java.util.function.Consumer consumer) { consumer.accept(ptMinPosition()); return this; } - /** Copies the specified {@link POINT} to the {@link WINDOWPLACEMENT#ptMaxPosition} field. */ - public Buffer ptMaxPosition(POINT value) { WINDOWPLACEMENT.nptMaxPosition(address(), value); return this; } - /** Passes the {@link WINDOWPLACEMENT#ptMaxPosition} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer ptMaxPosition(java.util.function.Consumer consumer) { consumer.accept(ptMaxPosition()); return this; } - /** Copies the specified {@link RECT} to the {@link WINDOWPLACEMENT#rcNormalPosition} field. */ - public Buffer rcNormalPosition(RECT value) { WINDOWPLACEMENT.nrcNormalPosition(address(), value); return this; } - /** Passes the {@link WINDOWPLACEMENT#rcNormalPosition} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer rcNormalPosition(java.util.function.Consumer consumer) { consumer.accept(rcNormalPosition()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/WNDCLASSEX.java b/LWJGL/src/main/java/org/lwjgl/system/windows/WNDCLASSEX.java deleted file mode 100644 index 0e25349c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/WNDCLASSEX.java +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Contains the window class attributes that are registered by the {@link User32#RegisterClassEx} function. - * - *

    Layout

    - * - *
    
    - * struct WNDCLASSEX {
    - *     UINT {@link #cbSize};
    - *     UINT {@link #style};
    - *     {@link WindowProcI WNDPROC} {@link #lpfnWndProc};
    - *     int {@link #cbClsExtra};
    - *     int {@link #cbWndExtra};
    - *     HINSTANCE {@link #hInstance};
    - *     HICON {@link #hIcon};
    - *     HCURSOR {@link #hCursor};
    - *     HBRUSH {@link #hbrBackground};
    - *     LPCTSTR {@link #lpszMenuName};
    - *     LPCTSTR {@link #lpszClassName};
    - *     HICON {@link #hIconSm};
    - * }
    - */ -public class WNDCLASSEX extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CBSIZE, - STYLE, - LPFNWNDPROC, - CBCLSEXTRA, - CBWNDEXTRA, - HINSTANCE, - HICON, - HCURSOR, - HBRBACKGROUND, - LPSZMENUNAME, - LPSZCLASSNAME, - HICONSM; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CBSIZE = layout.offsetof(0); - STYLE = layout.offsetof(1); - LPFNWNDPROC = layout.offsetof(2); - CBCLSEXTRA = layout.offsetof(3); - CBWNDEXTRA = layout.offsetof(4); - HINSTANCE = layout.offsetof(5); - HICON = layout.offsetof(6); - HCURSOR = layout.offsetof(7); - HBRBACKGROUND = layout.offsetof(8); - LPSZMENUNAME = layout.offsetof(9); - LPSZCLASSNAME = layout.offsetof(10); - HICONSM = layout.offsetof(11); - } - - protected WNDCLASSEX(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected WNDCLASSEX create(long address, @Nullable ByteBuffer container) { - return new WNDCLASSEX(address, container); - } - - /** - * Creates a {@code WNDCLASSEX} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public WNDCLASSEX(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the size, in bytes, of this structure */ - @NativeType("UINT") - public int cbSize() { return ncbSize(address()); } - /** the class style(s) */ - @NativeType("UINT") - public int style() { return nstyle(address()); } - /** a pointer to the window procedure */ - @NativeType("WNDPROC") - public WindowProc lpfnWndProc() { return nlpfnWndProc(address()); } - /** the number of extra bytes to allocate following the window-class structure. The system initializes the bytes to zero. */ - public int cbClsExtra() { return ncbClsExtra(address()); } - /** the number of extra bytes to allocate following the window instance. The system initializes the bytes to zero. */ - public int cbWndExtra() { return ncbWndExtra(address()); } - /** a handle to the instance that contains the window procedure for the class */ - @NativeType("HINSTANCE") - public long hInstance() { return nhInstance(address()); } - /** a handle to the class icon. This member must be a handle to an icon resource. If this member is {@code NULL}, the system provides a default icon. */ - @NativeType("HICON") - public long hIcon() { return nhIcon(address()); } - /** - * a handle to the class cursor. This member must be a handle to a cursor resource. If this member is {@code NULL}, an application must explicitly set the cursor - * shape whenever the mouse moves into the application's window. - */ - @NativeType("HCURSOR") - public long hCursor() { return nhCursor(address()); } - /** - * a handle to the class background brush. This member can be a handle to the brush to be used for painting the background, or it can be a color value. - * When this member is {@code NULL}, an application must paint its own background whenever it is requested to paint in its client area. - */ - @NativeType("HBRUSH") - public long hbrBackground() { return nhbrBackground(address()); } - /** - * pointer to a null-terminated character string that specifies the resource name of the class menu, as the name appears in the resource file. If this - * member is {@code NULL}, windows belonging to this class have no default menu. - */ - @Nullable - @NativeType("LPCTSTR") - public ByteBuffer lpszMenuName() { return nlpszMenuName(address()); } - /** - * pointer to a null-terminated character string that specifies the resource name of the class menu, as the name appears in the resource file. If this - * member is {@code NULL}, windows belonging to this class have no default menu. - */ - @Nullable - @NativeType("LPCTSTR") - public String lpszMenuNameString() { return nlpszMenuNameString(address()); } - /** a pointer to a null-terminated string or is an atom */ - @NativeType("LPCTSTR") - public ByteBuffer lpszClassName() { return nlpszClassName(address()); } - /** a pointer to a null-terminated string or is an atom */ - @NativeType("LPCTSTR") - public String lpszClassNameString() { return nlpszClassNameString(address()); } - /** - * a handle to a small icon that is associated with the window class. If this member is {@code NULL}, the system searches the icon resource specified by the - * {@code hIcon} member for an icon of the appropriate size to use as the small icon. - */ - @NativeType("HICON") - public long hIconSm() { return nhIconSm(address()); } - - /** Sets the specified value to the {@link #cbSize} field. */ - public WNDCLASSEX cbSize(@NativeType("UINT") int value) { ncbSize(address(), value); return this; } - /** Sets the specified value to the {@link #style} field. */ - public WNDCLASSEX style(@NativeType("UINT") int value) { nstyle(address(), value); return this; } - /** Sets the specified value to the {@link #lpfnWndProc} field. */ - public WNDCLASSEX lpfnWndProc(@NativeType("WNDPROC") WindowProcI value) { nlpfnWndProc(address(), value); return this; } - /** Sets the specified value to the {@link #cbClsExtra} field. */ - public WNDCLASSEX cbClsExtra(int value) { ncbClsExtra(address(), value); return this; } - /** Sets the specified value to the {@link #cbWndExtra} field. */ - public WNDCLASSEX cbWndExtra(int value) { ncbWndExtra(address(), value); return this; } - /** Sets the specified value to the {@link #hInstance} field. */ - public WNDCLASSEX hInstance(@NativeType("HINSTANCE") long value) { nhInstance(address(), value); return this; } - /** Sets the specified value to the {@link #hIcon} field. */ - public WNDCLASSEX hIcon(@NativeType("HICON") long value) { nhIcon(address(), value); return this; } - /** Sets the specified value to the {@link #hCursor} field. */ - public WNDCLASSEX hCursor(@NativeType("HCURSOR") long value) { nhCursor(address(), value); return this; } - /** Sets the specified value to the {@link #hbrBackground} field. */ - public WNDCLASSEX hbrBackground(@NativeType("HBRUSH") long value) { nhbrBackground(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@link #lpszMenuName} field. */ - public WNDCLASSEX lpszMenuName(@Nullable @NativeType("LPCTSTR") ByteBuffer value) { nlpszMenuName(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@link #lpszClassName} field. */ - public WNDCLASSEX lpszClassName(@NativeType("LPCTSTR") ByteBuffer value) { nlpszClassName(address(), value); return this; } - /** Sets the specified value to the {@link #hIconSm} field. */ - public WNDCLASSEX hIconSm(@NativeType("HICON") long value) { nhIconSm(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public WNDCLASSEX set( - int cbSize, - int style, - WindowProcI lpfnWndProc, - int cbClsExtra, - int cbWndExtra, - long hInstance, - long hIcon, - long hCursor, - long hbrBackground, - @Nullable ByteBuffer lpszMenuName, - ByteBuffer lpszClassName, - long hIconSm - ) { - cbSize(cbSize); - style(style); - lpfnWndProc(lpfnWndProc); - cbClsExtra(cbClsExtra); - cbWndExtra(cbWndExtra); - hInstance(hInstance); - hIcon(hIcon); - hCursor(hCursor); - hbrBackground(hbrBackground); - lpszMenuName(lpszMenuName); - lpszClassName(lpszClassName); - hIconSm(hIconSm); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public WNDCLASSEX set(WNDCLASSEX src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code WNDCLASSEX} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static WNDCLASSEX malloc() { - return new WNDCLASSEX(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code WNDCLASSEX} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static WNDCLASSEX calloc() { - return new WNDCLASSEX(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code WNDCLASSEX} instance allocated with {@link BufferUtils}. */ - public static WNDCLASSEX create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new WNDCLASSEX(memAddress(container), container); - } - - /** Returns a new {@code WNDCLASSEX} instance for the specified memory address. */ - public static WNDCLASSEX create(long address) { - return new WNDCLASSEX(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static WNDCLASSEX createSafe(long address) { - return address == NULL ? null : new WNDCLASSEX(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static WNDCLASSEX mallocStack() { return malloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static WNDCLASSEX callocStack() { return calloc(stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(MemoryStack)} instead. */ - @Deprecated public static WNDCLASSEX mallocStack(MemoryStack stack) { return malloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(MemoryStack)} instead. */ - @Deprecated public static WNDCLASSEX callocStack(MemoryStack stack) { return calloc(stack); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity) { return malloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity) { return calloc(capacity, stackGet()); } - /** Deprecated for removal in 3.4.0. Use {@link #malloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer mallocStack(int capacity, MemoryStack stack) { return malloc(capacity, stack); } - /** Deprecated for removal in 3.4.0. Use {@link #calloc(int, MemoryStack)} instead. */ - @Deprecated public static Buffer callocStack(int capacity, MemoryStack stack) { return calloc(capacity, stack); } - - /** - * Returns a new {@code WNDCLASSEX} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static WNDCLASSEX malloc(MemoryStack stack) { - return new WNDCLASSEX(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code WNDCLASSEX} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static WNDCLASSEX calloc(MemoryStack stack) { - return new WNDCLASSEX(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cbSize}. */ - public static int ncbSize(long struct) { return UNSAFE.getInt(null, struct + WNDCLASSEX.CBSIZE); } - /** Unsafe version of {@link #style}. */ - public static int nstyle(long struct) { return UNSAFE.getInt(null, struct + WNDCLASSEX.STYLE); } - /** Unsafe version of {@link #lpfnWndProc}. */ - public static WindowProc nlpfnWndProc(long struct) { return WindowProc.create(memGetAddress(struct + WNDCLASSEX.LPFNWNDPROC)); } - /** Unsafe version of {@link #cbClsExtra}. */ - public static int ncbClsExtra(long struct) { return UNSAFE.getInt(null, struct + WNDCLASSEX.CBCLSEXTRA); } - /** Unsafe version of {@link #cbWndExtra}. */ - public static int ncbWndExtra(long struct) { return UNSAFE.getInt(null, struct + WNDCLASSEX.CBWNDEXTRA); } - /** Unsafe version of {@link #hInstance}. */ - public static long nhInstance(long struct) { return memGetAddress(struct + WNDCLASSEX.HINSTANCE); } - /** Unsafe version of {@link #hIcon}. */ - public static long nhIcon(long struct) { return memGetAddress(struct + WNDCLASSEX.HICON); } - /** Unsafe version of {@link #hCursor}. */ - public static long nhCursor(long struct) { return memGetAddress(struct + WNDCLASSEX.HCURSOR); } - /** Unsafe version of {@link #hbrBackground}. */ - public static long nhbrBackground(long struct) { return memGetAddress(struct + WNDCLASSEX.HBRBACKGROUND); } - /** Unsafe version of {@link #lpszMenuName}. */ - @Nullable public static ByteBuffer nlpszMenuName(long struct) { return memByteBufferNT2Safe(memGetAddress(struct + WNDCLASSEX.LPSZMENUNAME)); } - /** Unsafe version of {@link #lpszMenuNameString}. */ - @Nullable public static String nlpszMenuNameString(long struct) { return memUTF16Safe(memGetAddress(struct + WNDCLASSEX.LPSZMENUNAME)); } - /** Unsafe version of {@link #lpszClassName}. */ - public static ByteBuffer nlpszClassName(long struct) { return memByteBufferNT2(memGetAddress(struct + WNDCLASSEX.LPSZCLASSNAME)); } - /** Unsafe version of {@link #lpszClassNameString}. */ - public static String nlpszClassNameString(long struct) { return memUTF16(memGetAddress(struct + WNDCLASSEX.LPSZCLASSNAME)); } - /** Unsafe version of {@link #hIconSm}. */ - public static long nhIconSm(long struct) { return memGetAddress(struct + WNDCLASSEX.HICONSM); } - - /** Unsafe version of {@link #cbSize(int) cbSize}. */ - public static void ncbSize(long struct, int value) { UNSAFE.putInt(null, struct + WNDCLASSEX.CBSIZE, value); } - /** Unsafe version of {@link #style(int) style}. */ - public static void nstyle(long struct, int value) { UNSAFE.putInt(null, struct + WNDCLASSEX.STYLE, value); } - /** Unsafe version of {@link #lpfnWndProc(WindowProcI) lpfnWndProc}. */ - public static void nlpfnWndProc(long struct, WindowProcI value) { memPutAddress(struct + WNDCLASSEX.LPFNWNDPROC, value.address()); } - /** Unsafe version of {@link #cbClsExtra(int) cbClsExtra}. */ - public static void ncbClsExtra(long struct, int value) { UNSAFE.putInt(null, struct + WNDCLASSEX.CBCLSEXTRA, value); } - /** Unsafe version of {@link #cbWndExtra(int) cbWndExtra}. */ - public static void ncbWndExtra(long struct, int value) { UNSAFE.putInt(null, struct + WNDCLASSEX.CBWNDEXTRA, value); } - /** Unsafe version of {@link #hInstance(long) hInstance}. */ - public static void nhInstance(long struct, long value) { memPutAddress(struct + WNDCLASSEX.HINSTANCE, value); } - /** Unsafe version of {@link #hIcon(long) hIcon}. */ - public static void nhIcon(long struct, long value) { memPutAddress(struct + WNDCLASSEX.HICON, value); } - /** Unsafe version of {@link #hCursor(long) hCursor}. */ - public static void nhCursor(long struct, long value) { memPutAddress(struct + WNDCLASSEX.HCURSOR, value); } - /** Unsafe version of {@link #hbrBackground(long) hbrBackground}. */ - public static void nhbrBackground(long struct, long value) { memPutAddress(struct + WNDCLASSEX.HBRBACKGROUND, value); } - /** Unsafe version of {@link #lpszMenuName(ByteBuffer) lpszMenuName}. */ - public static void nlpszMenuName(long struct, @Nullable ByteBuffer value) { - if (CHECKS) { checkNT2Safe(value); } - memPutAddress(struct + WNDCLASSEX.LPSZMENUNAME, memAddressSafe(value)); - } - /** Unsafe version of {@link #lpszClassName(ByteBuffer) lpszClassName}. */ - public static void nlpszClassName(long struct, ByteBuffer value) { - if (CHECKS) { checkNT2(value); } - memPutAddress(struct + WNDCLASSEX.LPSZCLASSNAME, memAddress(value)); - } - /** Unsafe version of {@link #hIconSm(long) hIconSm}. */ - public static void nhIconSm(long struct, long value) { memPutAddress(struct + WNDCLASSEX.HICONSM, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + WNDCLASSEX.LPFNWNDPROC)); - check(memGetAddress(struct + WNDCLASSEX.LPSZCLASSNAME)); - } - - // ----------------------------------- - - /** An array of {@link WNDCLASSEX} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final WNDCLASSEX ELEMENT_FACTORY = WNDCLASSEX.create(-1L); - - /** - * Creates a new {@code WNDCLASSEX.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link WNDCLASSEX#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected WNDCLASSEX getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link WNDCLASSEX#cbSize} field. */ - @NativeType("UINT") - public int cbSize() { return WNDCLASSEX.ncbSize(address()); } - /** @return the value of the {@link WNDCLASSEX#style} field. */ - @NativeType("UINT") - public int style() { return WNDCLASSEX.nstyle(address()); } - /** @return the value of the {@link WNDCLASSEX#lpfnWndProc} field. */ - @NativeType("WNDPROC") - public WindowProc lpfnWndProc() { return WNDCLASSEX.nlpfnWndProc(address()); } - /** @return the value of the {@link WNDCLASSEX#cbClsExtra} field. */ - public int cbClsExtra() { return WNDCLASSEX.ncbClsExtra(address()); } - /** @return the value of the {@link WNDCLASSEX#cbWndExtra} field. */ - public int cbWndExtra() { return WNDCLASSEX.ncbWndExtra(address()); } - /** @return the value of the {@link WNDCLASSEX#hInstance} field. */ - @NativeType("HINSTANCE") - public long hInstance() { return WNDCLASSEX.nhInstance(address()); } - /** @return the value of the {@link WNDCLASSEX#hIcon} field. */ - @NativeType("HICON") - public long hIcon() { return WNDCLASSEX.nhIcon(address()); } - /** @return the value of the {@link WNDCLASSEX#hCursor} field. */ - @NativeType("HCURSOR") - public long hCursor() { return WNDCLASSEX.nhCursor(address()); } - /** @return the value of the {@link WNDCLASSEX#hbrBackground} field. */ - @NativeType("HBRUSH") - public long hbrBackground() { return WNDCLASSEX.nhbrBackground(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@link WNDCLASSEX#lpszMenuName} field. */ - @Nullable - @NativeType("LPCTSTR") - public ByteBuffer lpszMenuName() { return WNDCLASSEX.nlpszMenuName(address()); } - /** @return the null-terminated string pointed to by the {@link WNDCLASSEX#lpszMenuName} field. */ - @Nullable - @NativeType("LPCTSTR") - public String lpszMenuNameString() { return WNDCLASSEX.nlpszMenuNameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@link WNDCLASSEX#lpszClassName} field. */ - @NativeType("LPCTSTR") - public ByteBuffer lpszClassName() { return WNDCLASSEX.nlpszClassName(address()); } - /** @return the null-terminated string pointed to by the {@link WNDCLASSEX#lpszClassName} field. */ - @NativeType("LPCTSTR") - public String lpszClassNameString() { return WNDCLASSEX.nlpszClassNameString(address()); } - /** @return the value of the {@link WNDCLASSEX#hIconSm} field. */ - @NativeType("HICON") - public long hIconSm() { return WNDCLASSEX.nhIconSm(address()); } - - /** Sets the specified value to the {@link WNDCLASSEX#cbSize} field. */ - public Buffer cbSize(@NativeType("UINT") int value) { WNDCLASSEX.ncbSize(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#style} field. */ - public Buffer style(@NativeType("UINT") int value) { WNDCLASSEX.nstyle(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#lpfnWndProc} field. */ - public Buffer lpfnWndProc(@NativeType("WNDPROC") WindowProcI value) { WNDCLASSEX.nlpfnWndProc(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#cbClsExtra} field. */ - public Buffer cbClsExtra(int value) { WNDCLASSEX.ncbClsExtra(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#cbWndExtra} field. */ - public Buffer cbWndExtra(int value) { WNDCLASSEX.ncbWndExtra(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#hInstance} field. */ - public Buffer hInstance(@NativeType("HINSTANCE") long value) { WNDCLASSEX.nhInstance(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#hIcon} field. */ - public Buffer hIcon(@NativeType("HICON") long value) { WNDCLASSEX.nhIcon(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#hCursor} field. */ - public Buffer hCursor(@NativeType("HCURSOR") long value) { WNDCLASSEX.nhCursor(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#hbrBackground} field. */ - public Buffer hbrBackground(@NativeType("HBRUSH") long value) { WNDCLASSEX.nhbrBackground(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@link WNDCLASSEX#lpszMenuName} field. */ - public Buffer lpszMenuName(@Nullable @NativeType("LPCTSTR") ByteBuffer value) { WNDCLASSEX.nlpszMenuName(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@link WNDCLASSEX#lpszClassName} field. */ - public Buffer lpszClassName(@NativeType("LPCTSTR") ByteBuffer value) { WNDCLASSEX.nlpszClassName(address(), value); return this; } - /** Sets the specified value to the {@link WNDCLASSEX#hIconSm} field. */ - public Buffer hIconSm(@NativeType("HICON") long value) { WNDCLASSEX.nhIconSm(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/WinBase.java b/LWJGL/src/main/java/org/lwjgl/system/windows/WinBase.java deleted file mode 100644 index b6a7bab1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/WinBase.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** Native bindings to WinBase.h. */ -public class WinBase { - - static { Library.initialize(); } - - /** BOOL return values. */ - public static final int - FALSE = 0, - TRUE = 1; - - protected WinBase() { - throw new UnsupportedOperationException(); - } - - // --- [ LocalFree ] --- - - /** Unsafe version of: {@link #LocalFree} */ - public static native long nLocalFree(long hMem); - - /** - * Frees the specified local memory object and invalidates its handle. - * - * @param hMem a handle to the local memory object - * - * @return if the function succeeds, the return value is {@code NULL}. - * - *

    If the function fails, the return value is equal to a handle to the local memory object. To get extended error information, call {@link #GetLastError}.

    - */ - @NativeType("HLOCAL") - public static long LocalFree(@NativeType("HLOCAL") long hMem) { - if (CHECKS) { - check(hMem); - } - return nLocalFree(hMem); - } - - // --- [ GetLastError ] --- - - /** - * Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. Multiple threads do not overwrite each - * other's last-error code. - * - *

    LWJGL note: This function cannot be used after another JNI call to a Windows function, because the last error resets before that call returns. - * For this reason, LWJGL stores the last error in thread-local storage, you can use {@link #getLastError} to access it.

    - */ - @NativeType("DWORD") - public static native int GetLastError(); - - // --- [ getLastError ] --- - - /** - * Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. Multiple threads do not overwrite each - * other's last-error code. - * - *

    LWJGL note: This method has a meaningful value only after another LWJGL JNI call. It does not call {@code GetLastError()} from WinBase.h, it - * returns the thread-local error code stored by a previous JNI call.

    - */ - @NativeType("DWORD") - public static native int getLastError(); - - // --- [ GetModuleHandle ] --- - - /** Unsafe version of: {@link #GetModuleHandle} */ - public static native long nGetModuleHandle(long moduleName); - - /** - * Retrieves a module handle for the specified module. The module must have been loaded by the calling process. - * - * @param moduleName the name of the loaded module (either a .dll or .exe file). If the file name extension is omitted, the default library extension .dll is appended. - * The file name string can include a trailing point character (.) to indicate that the module name has no extension. The string does not have to - * specify a path. When specifying a path, be sure to use backslashes (\), not forward slashes (/). The name is compared (case independently) to the - * names of modules currently mapped into the address space of the calling process. - * - *

    If this parameter is {@code NULL}, {@code GetModuleHandle} returns a handle to the file used to create the calling process (.exe file).

    - */ - @NativeType("HMODULE") - public static long GetModuleHandle(@Nullable @NativeType("LPCTSTR") ByteBuffer moduleName) { - if (CHECKS) { - checkNT2Safe(moduleName); - } - return nGetModuleHandle(memAddressSafe(moduleName)); - } - - /** - * Retrieves a module handle for the specified module. The module must have been loaded by the calling process. - * - * @param moduleName the name of the loaded module (either a .dll or .exe file). If the file name extension is omitted, the default library extension .dll is appended. - * The file name string can include a trailing point character (.) to indicate that the module name has no extension. The string does not have to - * specify a path. When specifying a path, be sure to use backslashes (\), not forward slashes (/). The name is compared (case independently) to the - * names of modules currently mapped into the address space of the calling process. - * - *

    If this parameter is {@code NULL}, {@code GetModuleHandle} returns a handle to the file used to create the calling process (.exe file).

    - */ - @NativeType("HMODULE") - public static long GetModuleHandle(@Nullable @NativeType("LPCTSTR") CharSequence moduleName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16Safe(moduleName, true); - long moduleNameEncoded = moduleName == null ? NULL : stack.getPointerAddress(); - return nGetModuleHandle(moduleNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ GetModuleFileName ] --- - - /** - * Unsafe version of: {@link #GetModuleFileName} - * - * @param nSize the size of the {@code lpFilename} buffer, in {@code TCHAR}s. - */ - public static native int nGetModuleFileName(long hModule, long lpFilename, int nSize); - - /** - * Retrieves the fully qualified path for the file that contains the specified module. The module must have been loaded by the current process. - * - * @param hModule a handle to the loaded module whose path is being requested. - * - *

    If this parameter is NULL, {@code GetModuleFileName} retrieves the path of the executable file of the current process.

    - * @param lpFilename a pointer to a buffer that receives the fully qualified path of the module. - * - *

    If the length of the path is less than the size that the {@code nSize} parameter specifies, the function succeeds and the path is returned as a - * null-terminated string.

    - * - *

    If the length of the path exceeds the size that the {@code nSize} parameter specifies, the function succeeds and the string is truncated to - * {@code nSize} characters including the terminating null character.

    - * - *

    The string returned will use the same format that was specified when the module was loaded. Therefore, the path can be a long or short file name, - * and can use the prefix "\?".

    - * - * @return if the function succeeds, the return value is the length of the string that is copied to the buffer, in characters, not including the terminating null - * character. - * - *

    If the buffer is too small to hold the module name, the string is truncated to {@code nSize} characters including the terminating null character, the - * function returns {@code nSize}, and the function sets the last error to {@code ERROR_INSUFFICIENT_BUFFER}.

    - * - *

    If the function fails, the return value is 0 (zero). To get extended error information, call {@link #GetLastError}.

    - */ - @NativeType("DWORD") - public static int GetModuleFileName(@NativeType("HMODULE") long hModule, @NativeType("LPTSTR") ByteBuffer lpFilename) { - return nGetModuleFileName(hModule, memAddress(lpFilename), lpFilename.remaining() >> 1); - } - - /** - * Retrieves the fully qualified path for the file that contains the specified module. The module must have been loaded by the current process. - * - * @param hModule a handle to the loaded module whose path is being requested. - * - *

    If this parameter is NULL, {@code GetModuleFileName} retrieves the path of the executable file of the current process.

    - * @param nSize the size of the {@code lpFilename} buffer, in {@code TCHAR}s. - * - * @return if the function succeeds, the return value is the length of the string that is copied to the buffer, in characters, not including the terminating null - * character. - * - *

    If the buffer is too small to hold the module name, the string is truncated to {@code nSize} characters including the terminating null character, the - * function returns {@code nSize}, and the function sets the last error to {@code ERROR_INSUFFICIENT_BUFFER}.

    - * - *

    If the function fails, the return value is 0 (zero). To get extended error information, call {@link #GetLastError}.

    - */ - @NativeType("DWORD") - public static String GetModuleFileName(@NativeType("HMODULE") long hModule, @NativeType("DWORD") int nSize) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - ByteBuffer lpFilename = stack.malloc(nSize); - int __result = nGetModuleFileName(hModule, memAddress(lpFilename), nSize); - return memUTF16(lpFilename, __result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ LoadLibrary ] --- - - /** Unsafe version of: {@link #LoadLibrary} */ - public static native long nLoadLibrary(long name); - - /** - * Loads the specified module into the address space of the calling process. The specified module may cause other modules to be loaded. - * - * @param name the name of the module. This can be either a library module (a .dll file) or an executable module (an .exe file). The name specified is the file - * name of the module and is not related to the name stored in the library module itself, as specified by the LIBRARY keyword in the module-definition - * (.def) file. - * - *

    If the string specifies a full path, the function searches only that path for the module.

    - * - *

    If the string specifies a relative path or a module name without a path, the function uses a standard search strategy to find the module.

    - * - *

    If the function cannot find the module, the function fails. When specifying a path, be sure to use backslashes (\), not forward slashes (/).

    - * - *

    If the string specifies a module name without a path and the file name extension is omitted, the function appends the default library extension - * .dll to the module name. To prevent the function from appending .dll to the module name, include a trailing point character (.) in the module name - * string.

    - */ - @NativeType("HMODULE") - public static long LoadLibrary(@NativeType("LPCTSTR") ByteBuffer name) { - if (CHECKS) { - checkNT2(name); - } - return nLoadLibrary(memAddress(name)); - } - - /** - * Loads the specified module into the address space of the calling process. The specified module may cause other modules to be loaded. - * - * @param name the name of the module. This can be either a library module (a .dll file) or an executable module (an .exe file). The name specified is the file - * name of the module and is not related to the name stored in the library module itself, as specified by the LIBRARY keyword in the module-definition - * (.def) file. - * - *

    If the string specifies a full path, the function searches only that path for the module.

    - * - *

    If the string specifies a relative path or a module name without a path, the function uses a standard search strategy to find the module.

    - * - *

    If the function cannot find the module, the function fails. When specifying a path, be sure to use backslashes (\), not forward slashes (/).

    - * - *

    If the string specifies a module name without a path and the file name extension is omitted, the function appends the default library extension - * .dll to the module name. To prevent the function from appending .dll to the module name, include a trailing point character (.) in the module name - * string.

    - */ - @NativeType("HMODULE") - public static long LoadLibrary(@NativeType("LPCTSTR") CharSequence name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF16(name, true); - long nameEncoded = stack.getPointerAddress(); - return nLoadLibrary(nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ GetProcAddress ] --- - - /** Unsafe version of: {@link #GetProcAddress} */ - public static native long nGetProcAddress(long handle, long name); - - /** - * Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL). - * - * @param handle a handle to the DLL module that contains the function or variable - * @param name the function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the - * high-order word must be zero. - */ - @NativeType("FARPROC") - public static long GetProcAddress(@NativeType("HMODULE") long handle, @NativeType("LPCSTR") ByteBuffer name) { - if (CHECKS) { - check(handle); - checkNT1(name); - } - return nGetProcAddress(handle, memAddress(name)); - } - - /** - * Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL). - * - * @param handle a handle to the DLL module that contains the function or variable - * @param name the function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the - * high-order word must be zero. - */ - @NativeType("FARPROC") - public static long GetProcAddress(@NativeType("HMODULE") long handle, @NativeType("LPCSTR") CharSequence name) { - if (CHECKS) { - check(handle); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(name, true); - long nameEncoded = stack.getPointerAddress(); - return nGetProcAddress(handle, nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FreeLibrary ] --- - - /** Unsafe version of: {@link #FreeLibrary} */ - public static native int nFreeLibrary(long handle); - - /** - * Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count. When the reference count reaches zero, the module - * is unloaded from the address space of the calling process and the handle is no longer valid. - * - * @param handle a handle to the loaded library module - */ - @NativeType("BOOL") - public static boolean FreeLibrary(@NativeType("HMODULE") long handle) { - if (CHECKS) { - check(handle); - } - return nFreeLibrary(handle) != 0; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowProc.java b/LWJGL/src/main/java/org/lwjgl/system/windows/WindowProc.java deleted file mode 100644 index c5e5d3c9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowProc.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * An application-defined function that processes messages sent to a window. - * - *

    Type

    - * - *
    
    - * LRESULT (*{@link #invoke}) (
    - *     HWND hwnd,
    - *     UINT uMsg,
    - *     WPARAM wParam,
    - *     LPARAM lParam
    - * )
    - */ -public abstract class WindowProc extends Callback implements WindowProcI { - - /** - * Creates a {@code WindowProc} instance from the specified function pointer. - * - * @return the new {@code WindowProc} - */ - public static WindowProc create(long functionPointer) { - WindowProcI instance = Callback.get(functionPointer); - return instance instanceof WindowProc - ? (WindowProc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static WindowProc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code WindowProc} instance that delegates to the specified {@code WindowProcI} instance. */ - public static WindowProc create(WindowProcI instance) { - return instance instanceof WindowProc - ? (WindowProc)instance - : new Container(instance.address(), instance); - } - - protected WindowProc() { - super(CIF); - } - - WindowProc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends WindowProc { - - private final WindowProcI delegate; - - Container(long functionPointer, WindowProcI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long hwnd, int uMsg, long wParam, long lParam) { - return delegate.invoke(hwnd, uMsg, wParam, lParam); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowProcI.java b/LWJGL/src/main/java/org/lwjgl/system/windows/WindowProcI.java deleted file mode 100644 index ab7c37c1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowProcI.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.system.windows; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - * An application-defined function that processes messages sent to a window. - * - *

    Type

    - * - *
    
    - * LRESULT (*{@link #invoke}) (
    - *     HWND hwnd,
    - *     UINT uMsg,
    - *     WPARAM wParam,
    - *     LPARAM lParam
    - * )
    - */ -@FunctionalInterface -@NativeType("WNDPROC") -public interface WindowProcI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - apiStdcall(), - ffi_type_pointer, - ffi_type_pointer, ffi_type_uint32, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** - * Will be called for each message sent to the window. - * - * @param hwnd a handle to the window procedure that received the message - * @param uMsg the message - * @param wParam additional message information. The content of this parameter depends on the value of the {@code uMsg} parameter. - * @param lParam additional message information. The content of this parameter depends on the value of the {@code uMsg} parameter. - */ - @NativeType("LRESULT") long invoke(@NativeType("HWND") long hwnd, @NativeType("UINT") int uMsg, @NativeType("WPARAM") long wParam, @NativeType("LPARAM") long lParam); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowsLibrary.java b/LWJGL/src/main/java/org/lwjgl/system/windows/WindowsLibrary.java deleted file mode 100644 index f3e51cde..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowsLibrary.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system.windows; - -import org.lwjgl.system.*; - -import javax.annotation.*; -import java.nio.*; - -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.windows.WinBase.*; -import static org.lwjgl.system.windows.WindowsUtil.*; - -/** Implements a {@link SharedLibrary} on the Windows OS. */ -public class WindowsLibrary extends SharedLibrary.Default { - - /** The LWJGL dll handle. */ - public static final long HINSTANCE; - - static { - try (MemoryStack stack = stackPush()) { - HINSTANCE = GetModuleHandle(stack.UTF16(Library.JNI_LIBRARY_NAME)); - if (HINSTANCE == NULL) { - throw new RuntimeException("Failed to retrieve LWJGL module handle."); - } - } - } - - public WindowsLibrary(String name) { - this(name, loadLibrary(name)); - } - - public WindowsLibrary(String name, long handle) { - super(name, handle); - } - - private static long loadLibrary(String name) { - long handle; - try (MemoryStack stack = stackPush()) { - handle = LoadLibrary(stack.UTF16(name)); - } - if (handle == NULL) { - throw new UnsatisfiedLinkError("Failed to load library: " + name + " (error code = " + getLastError() + ")"); - } - return handle; - } - - @Nullable - @Override - public String getPath() { - int maxLen = 256; - - ByteBuffer buffer = memAlloc(maxLen); - try { - while (true) { - int len = GetModuleFileName(address(), buffer); - int err = getLastError(); - if (err == 0) { - return len == 0 ? null : memUTF16(buffer, len); - } - if (err != 0x7A/*ERROR_INSUFFICIENT_BUFFER*/) { - return null; - } - buffer = memRealloc(buffer, maxLen = maxLen * 3 / 2); - } - } finally { - memFree(buffer); - } - } - - @Override - public long getFunctionAddress(ByteBuffer functionName) { - return GetProcAddress(address(), functionName); - } - - @Override - public void free() { - if (!FreeLibrary(address())) { - windowsThrowException("Failed to unload library: " + getName()); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowsUtil.java b/LWJGL/src/main/java/org/lwjgl/system/windows/WindowsUtil.java deleted file mode 100644 index e61aa0c1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/system/windows/WindowsUtil.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - */ -package org.lwjgl.system.windows; - -import static org.lwjgl.system.windows.WinBase.*; - -public final class WindowsUtil { - - private WindowsUtil() { - } - - public static void windowsThrowException(String msg) { - throw new RuntimeException(msg + " (error code = " + getLastError() + ")"); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/Color.java b/LWJGL/src/main/java/org/lwjgl/util/Color.java deleted file mode 100644 index 8e03aaf0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/Color.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * 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; -import java.io.Serializable; -import java.nio.ByteBuffer; - -/** - * A mutable Color class - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -public final class Color implements ReadableColor, Serializable, WritableColor { - - static final long serialVersionUID = 1L; - - /** Color components, publicly accessible */ - private byte red, green, blue, alpha; - - /** - * Constructor for Color. - */ - public Color() { - this(0, 0, 0, 255); - } - - /** - * Constructor for Color. Alpha defaults to 255. - */ - public Color(int r, int g, int b) { - this(r, g, b, 255); - } - - /** - * Constructor for Color. Alpha defaults to 255. - */ - public Color(byte r, byte g, byte b) { - this(r, g, b, (byte) 255); - } - - /** - * Constructor for Color. - */ - public Color(int r, int g, int b, int a) { - set(r, g, b, a); - } - - /** - * Constructor for Color. - */ - public Color(byte r, byte g, byte b, byte a) { - set(r, g, b, a); - } - - /** - * Constructor for Color - */ - public Color(ReadableColor c) { - setColor(c); - } - - /** - * Set a color - */ - public void set(int r, int g, int b, int a) { - red = (byte) r; - green = (byte) g; - blue = (byte) b; - alpha = (byte) a; - } - - /** - * Set a color - */ - public void set(byte r, byte g, byte b, byte a) { - this.red = r; - this.green = g; - this.blue = b; - this.alpha = a; - } - - /** - * Set a color - */ - public void set(int r, int g, int b) { - set(r, g, b, 255); - } - - /** - * Set a color - */ - public void set(byte r, byte g, byte b) { - set(r, g, b, (byte) 255); - } - - /** - * Accessor - */ - public int getRed() { - return red & 0xFF; - } - - /** - * Accessor - */ - public int getGreen() { - return green & 0xFF; - } - - /** - * Accessor - */ - public int getBlue() { - return blue & 0xFF; - } - - /** - * Accessor - */ - public int getAlpha() { - return alpha & 0xFF; - } - - /** - * Set the Red component - */ - public void setRed(int red) { - this.red = (byte) red; - } - - /** - * Set the Green component - */ - public void setGreen(int green) { - this.green = (byte) green; - } - - /** - * Set the Blue component - */ - public void setBlue(int blue) { - this.blue = (byte) blue; - } - - /** - * Set the Alpha component - */ - public void setAlpha(int alpha) { - this.alpha = (byte) alpha; - } - - /** - * Set the Red component - */ - public void setRed(byte red) { - this.red = red; - } - - /** - * Set the Green component - */ - public void setGreen(byte green) { - this.green = green; - } - - /** - * Set the Blue component - */ - public void setBlue(byte blue) { - this.blue = blue; - } - - /** - * Set the Alpha component - */ - public void setAlpha(byte alpha) { - this.alpha = alpha; - } - - /** - * Stringify - */ - public String toString() { - return "Color [" + getRed() + ", " + getGreen() + ", " + getBlue() + ", " + getAlpha() + "]"; - } - - /** - * Equals - */ - public boolean equals(Object o) { - return (o != null) - && (o instanceof ReadableColor) - && (((ReadableColor) o).getRed() == this.getRed()) - && (((ReadableColor) o).getGreen() == this.getGreen()) - && (((ReadableColor) o).getBlue() == this.getBlue()) - && (((ReadableColor) o).getAlpha() == this.getAlpha()); - } - - /** - * Hashcode - */ - public int hashCode() { - return (red << 24) | (green << 16) | (blue << 8) | alpha; - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getAlphaByte() - */ - public byte getAlphaByte() { - return alpha; - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getBlueByte() - */ - public byte getBlueByte() { - return blue; - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getGreenByte() - */ - public byte getGreenByte() { - return green; - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#getRedByte() - */ - public byte getRedByte() { - return red; - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeRGBA(java.nio.ByteBuffer) - */ - public void writeRGBA(ByteBuffer dest) { - dest.put(red); - dest.put(green); - dest.put(blue); - dest.put(alpha); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeRGB(java.nio.ByteBuffer) - */ - public void writeRGB(ByteBuffer dest) { - dest.put(red); - dest.put(green); - dest.put(blue); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeABGR(java.nio.ByteBuffer) - */ - public void writeABGR(ByteBuffer dest) { - dest.put(alpha); - dest.put(blue); - dest.put(green); - dest.put(red); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeARGB(java.nio.ByteBuffer) - */ - public void writeARGB(ByteBuffer dest) { - dest.put(alpha); - dest.put(red); - dest.put(green); - dest.put(blue); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeBGR(java.nio.ByteBuffer) - */ - public void writeBGR(ByteBuffer dest) { - dest.put(blue); - dest.put(green); - dest.put(red); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableColor#writeBGRA(java.nio.ByteBuffer) - */ - public void writeBGRA(ByteBuffer dest) { - dest.put(blue); - dest.put(green); - dest.put(red); - dest.put(alpha); - } - - /** - * Read a color from a byte buffer - * @param src The source buffer - */ - public void readRGBA(ByteBuffer src) { - red = src.get(); - green = src.get(); - blue = src.get(); - alpha = src.get(); - } - - /** - * Read a color from a byte buffer - * @param src The source buffer - */ - public void readRGB(ByteBuffer src) { - red = src.get(); - green = src.get(); - blue = src.get(); - } - - /** - * Read a color from a byte buffer - * @param src The source buffer - */ - public void readARGB(ByteBuffer src) { - alpha = src.get(); - red = src.get(); - green = src.get(); - blue = src.get(); - } - - /** - * Read a color from a byte buffer - * @param src The source buffer - */ - public void readBGRA(ByteBuffer src) { - blue = src.get(); - green = src.get(); - red = src.get(); - alpha = src.get(); - } - - /** - * Read a color from a byte buffer - * @param src The source buffer - */ - public void readBGR(ByteBuffer src) { - blue = src.get(); - green = src.get(); - red = src.get(); - } - - /** - * Read a color from a byte buffer - * @param src The source buffer - */ - public void readABGR(ByteBuffer src) { - alpha = src.get(); - blue = src.get(); - green = src.get(); - red = src.get(); - } - - /** - * Set this color's color by copying another color - * @param src The source color - */ - public void setColor(ReadableColor src) { - red = src.getRedByte(); - green = src.getGreenByte(); - blue = src.getBlueByte(); - alpha = src.getAlphaByte(); - } - - /** - * HSB to RGB conversion, pinched from java.awt.Color. - * @param hue (0..1.0f) - * @param saturation (0..1.0f) - * @param brightness (0..1.0f) - */ - public void fromHSB(float hue, float saturation, float brightness) { - if (saturation == 0.0F) { - red = green = blue = (byte) (brightness * 255F + 0.5F); - } else { - float f3 = (hue - (float) Math.floor(hue)) * 6F; - float f4 = f3 - (float) Math.floor(f3); - float f5 = brightness * (1.0F - saturation); - float f6 = brightness * (1.0F - saturation * f4); - float f7 = brightness * (1.0F - saturation * (1.0F - f4)); - switch ((int) f3) { - case 0 : - red = (byte) (brightness * 255F + 0.5F); - green = (byte) (f7 * 255F + 0.5F); - blue = (byte) (f5 * 255F + 0.5F); - break; - case 1 : - red = (byte) (f6 * 255F + 0.5F); - green = (byte) (brightness * 255F + 0.5F); - blue = (byte) (f5 * 255F + 0.5F); - break; - case 2 : - red = (byte) (f5 * 255F + 0.5F); - green = (byte) (brightness * 255F + 0.5F); - blue = (byte) (f7 * 255F + 0.5F); - break; - case 3 : - red = (byte) (f5 * 255F + 0.5F); - green = (byte) (f6 * 255F + 0.5F); - blue = (byte) (brightness * 255F + 0.5F); - break; - case 4 : - red = (byte) (f7 * 255F + 0.5F); - green = (byte) (f5 * 255F + 0.5F); - blue = (byte) (brightness * 255F + 0.5F); - break; - case 5 : - red = (byte) (brightness * 255F + 0.5F); - green = (byte) (f5 * 255F + 0.5F); - blue = (byte) (f6 * 255F + 0.5F); - break; - } - } - } - - /** - * 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 - */ - public float[] toHSB(float dest[]) { - int r = getRed(); - int g = getGreen(); - int b = getBlue(); - if (dest == null) - dest = new float[3]; - int l = r <= g ? g : r; - if (b > l) - l = b; - int i1 = r >= g ? g : r; - if (b < i1) - i1 = b; - float brightness = l / 255F; - float saturation; - if (l != 0) - saturation = (float) (l - i1) / (float) l; - else - saturation = 0.0F; - float hue; - if (saturation == 0.0F) { - hue = 0.0F; - } else { - float f3 = (float) (l - r) / (float) (l - i1); - float f4 = (float) (l - g) / (float) (l - i1); - float f5 = (float) (l - b) / (float) (l - i1); - if (r == l) - hue = f5 - f4; - else if (g == l) - hue = (2.0F + f3) - f5; - else - hue = (4F + f4) - f3; - hue /= 6F; - if (hue < 0.0F) - hue++; - } - dest[0] = hue; - dest[1] = saturation; - dest[2] = brightness; - return dest; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/Dimension.java b/LWJGL/src/main/java/org/lwjgl/util/Dimension.java deleted file mode 100644 index 1b8ae7c3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/Dimension.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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; - -import java.io.Serializable; - -/** - * A 2D integer Dimension class, which looks remarkably like an AWT one. - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -public final class Dimension implements Serializable, ReadableDimension, WritableDimension { - - static final long serialVersionUID = 1L; - - /** The dimensions! */ - private int width, height; - - /** - * Constructor for Dimension. - */ - public Dimension() { - super(); - } - - /** - * Constructor for Dimension. - */ - public Dimension(int w, int h) { - this.width = w; - this.height = h; - } - - /** - * Constructor for Dimension. - */ - public Dimension(ReadableDimension d) { - setSize(d); - } - - public void setSize(int w, int h) { - this.width = w; - this.height = h; - } - - public void setSize(ReadableDimension d) { - this.width = d.getWidth(); - this.height = d.getHeight(); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) - */ - public void getSize(WritableDimension dest) { - dest.setSize(this); - } - - /** - * Checks whether two dimension objects have equal values. - */ - public boolean equals(Object obj) { - if (obj instanceof ReadableDimension) { - ReadableDimension d = (ReadableDimension) obj; - return (width == d.getWidth()) && (height == d.getHeight()); - } - return false; - } - - /** - * Returns the hash code for this Dimension. - * - * @return a hash code for this Dimension - */ - public int hashCode() { - int sum = width + height; - return sum * (sum + 1) / 2 + width; - } - - /** - * 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 - */ - public String toString() { - return getClass().getName() + "[width=" + width + ",height=" + height + "]"; - } - - /** - * Gets the height. - * @return Returns a int - */ - public int getHeight() { - return height; - } - - /** - * Sets the height. - * @param height The height to set - */ - public void setHeight(int height) { - this.height = height; - } - - /** - * Gets the width. - * @return Returns a int - */ - public int getWidth() { - return width; - } - - /** - * Sets the width. - * @param width The width to set - */ - public void setWidth(int width) { - this.width = width; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/Display.java b/LWJGL/src/main/java/org/lwjgl/util/Display.java deleted file mode 100644 index 2279429d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/Display.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * 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; - -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.opengl.DisplayMode; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; - -/** - * Display initialization utility, that can be used to find display modes and pick - * one for you based on your criteria. - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -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. - * - * @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 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 - * @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 - { - // First get the available display modes - DisplayMode[] modes = org.lwjgl.opengl.Display.getAvailableDisplayModes(); - - if (LWJGLUtil.DEBUG || DEBUG) { - System.out.println("Available screen modes:"); - for ( DisplayMode mode : modes ) { - System.out.println(mode); - } - } - - ArrayList matches = new ArrayList(modes.length); - - for (int i = 0; i < modes.length; i ++) { - assert modes[i] != null : ""+i+" "+modes.length; - if (minWidth != -1 && modes[i].getWidth() < minWidth) - continue; - if (maxWidth != -1 && modes[i].getWidth() > maxWidth) - continue; - if (minHeight != -1 && modes[i].getHeight() < minHeight) - continue; - if (maxHeight != -1 && modes[i].getHeight() > maxHeight) - continue; - if (minBPP != -1 && modes[i].getBitsPerPixel() < minBPP) - continue; - if (maxBPP != -1 && modes[i].getBitsPerPixel() > maxBPP) - continue; - //if (modes[i].bpp == 24) - // continue; - if (modes[i].getFrequency() != 0) { - if (minFreq != -1 && modes[i].getFrequency() < minFreq) - continue; - if (maxFreq != -1 && modes[i].getFrequency() > maxFreq) - continue; - } - matches.add(modes[i]); - } - - DisplayMode[] ret = new DisplayMode[matches.size()]; - matches.toArray(ret); - if (LWJGLUtil.DEBUG && DEBUG) { - System.out.println("Filtered screen modes:"); - for ( DisplayMode mode : ret ) { - System.out.println(mode); - } - } - - return ret; - } - - /** - * 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 - * @see DisplayMode - */ - public static DisplayMode setDisplayMode(DisplayMode[] dm, final String[] param) throws Exception { - - class FieldAccessor { - final String fieldName; - final int order; - final int preferred; - final boolean usePreferred; - FieldAccessor(String fieldName, int order, int preferred, boolean usePreferred) { - this.fieldName = fieldName; - this.order = order; - this.preferred = preferred; - this.usePreferred = usePreferred; - } - int getInt(DisplayMode mode) { - if ("width".equals(fieldName)) { - return mode.getWidth(); - } - if ("height".equals(fieldName)) { - return mode.getHeight(); - } - if ("freq".equals(fieldName)) { - return mode.getFrequency(); - } - if ("bpp".equals(fieldName)) { - return mode.getBitsPerPixel(); - } - throw new IllegalArgumentException("Unknown field "+fieldName); - } - } - - class Sorter implements Comparator { - - final FieldAccessor[] accessors; - - Sorter() { - accessors = new FieldAccessor[param.length]; - for (int i = 0; i < accessors.length; i ++) { - int idx = param[i].indexOf('='); - if (idx > 0) { - accessors[i] = new FieldAccessor(param[i].substring(0, idx), 0, Integer.parseInt(param[i].substring(idx + 1, param[i].length())), true); - } else if (param[i].charAt(0) == '-') { - accessors[i] = new FieldAccessor(param[i].substring(1), -1, 0, false); - } else { - accessors[i] = new FieldAccessor(param[i], 1, 0, false); - } - } - } - - /** - * @see Comparator#compare(Object, Object) - */ - public int compare(DisplayMode dm1, DisplayMode dm2) { - for ( FieldAccessor accessor : accessors ) { - int f1 = accessor.getInt(dm1); - int f2 = accessor.getInt(dm2); - - if ( accessor.usePreferred && f1 != f2 ) { - if ( f1 == accessor.preferred ) - return -1; - else if ( f2 == accessor.preferred ) - return 1; - else { - // Score according to the difference between the values - int absf1 = Math.abs(f1 - accessor.preferred); - int absf2 = Math.abs(f2 - accessor.preferred); - if ( absf1 < absf2 ) - return -1; - else if ( absf1 > absf2 ) - return 1; - else - continue; - } - } else if ( f1 < f2 ) - return accessor.order; - else if ( f1 == f2 ) - continue; - else - return -accessor.order; - } - - return 0; - } - } - - // Sort the display modes - Arrays.sort(dm, new Sorter()); - - // Try them out in the appropriate order - if (LWJGLUtil.DEBUG || DEBUG) { - System.out.println("Sorted display modes:"); - for ( DisplayMode aDm : dm ) { - System.out.println(aDm); - } - } - for ( DisplayMode aDm : dm ) { - try { - if ( LWJGLUtil.DEBUG || DEBUG ) - System.out.println("Attempting to set displaymode: " + aDm); - org.lwjgl.opengl.Display.setDisplayMode(aDm); - return aDm; - } catch (Exception e) { - if ( LWJGLUtil.DEBUG || DEBUG ) { - System.out.println("Failed to set display mode to " + aDm); - e.printStackTrace(); - } - } - } - - throw new Exception("Failed to set display mode."); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/Point.java b/LWJGL/src/main/java/org/lwjgl/util/Point.java deleted file mode 100644 index 5d17362e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/Point.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 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; - -import java.io.Serializable; - -/** - * A 2D integer point class, which looks remarkably like an AWT one. - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -public final class Point implements ReadablePoint, WritablePoint, Serializable { - - static final long serialVersionUID = 1L; - - /** The location */ - private int x, y; - - /** - * Constructor for Point. - */ - public Point() { - super(); - } - - /** - * Constructor for Point. - */ - public Point(int x, int y) { - setLocation(x, y); - } - - /** - * Constructor for Point. - */ - public Point(ReadablePoint p) { - setLocation(p); - } - - public void setLocation(int x, int y) { - this.x = x; - this.y = y; - } - - public void setLocation(ReadablePoint p) { - this.x = p.getX(); - this.y = p.getY(); - } - - public void setX(int x) { - this.x = x; - } - - public void setY(int y) { - this.y = y; - } - - /** - * Translate a point. - * @param dx The translation to apply - * @param dy The translation to apply - */ - public void translate(int dx, int dy) { - this.x += dx; - this.y += dy; - } - - /** - * Translate a point. - * @param p The translation to apply - */ - public void translate(ReadablePoint p) { - this.x += p.getX(); - this.y += p.getY(); - } - - /** - * Un-translate a point. - * @param p The translation to apply - */ - public void untranslate(ReadablePoint p) { - this.x -= p.getX(); - this.y -= p.getY(); - } - - /** - * 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) { - Point pt = (Point) obj; - return (x == pt.x) && (y == pt.y); - } - return super.equals(obj); - } - - /** - * Returns a string representation of this point and its location - * in the (xy) 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 - */ - public String toString() { - return getClass().getName() + "[x=" + x + ",y=" + y + "]"; - } - - /** - * Returns the hash code for this Point. - * - * @return a hash code for this Point - */ - public int hashCode() { - int sum = x + y; - return sum * (sum + 1) / 2 + x; - } - - public int getX() { - return x; - } - - public int getY() { - return y; - } - - public void getLocation(WritablePoint dest) { - dest.setLocation(x, y); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/ReadableColor.java b/LWJGL/src/main/java/org/lwjgl/util/ReadableColor.java deleted file mode 100644 index 9371cc87..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/ReadableColor.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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; - -import java.nio.ByteBuffer; - -/** - * Readonly interface for Colors - * @author $Author$ - * @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); - - /* - * Some standard colors - */ - ReadableColor RED = new Color(255, 0, 0); - ReadableColor ORANGE = new Color(255, 128, 0); - ReadableColor YELLOW = new Color(255, 255, 0); - ReadableColor GREEN = new Color(0, 255, 0); - ReadableColor CYAN = new Color(0, 255, 255); - ReadableColor BLUE = new Color(0, 0, 255); - ReadableColor PURPLE = new Color(255, 0, 255); - ReadableColor WHITE = new Color(255, 255, 255); - ReadableColor BLACK = new Color(0, 0, 0); - ReadableColor LTGREY = new Color(192, 192, 192); - ReadableColor DKGREY = new Color(64, 64, 64); - ReadableColor GREY = new Color(128, 128, 128); - - - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/ReadableDimension.java b/LWJGL/src/main/java/org/lwjgl/util/ReadableDimension.java deleted file mode 100644 index cb38a0a9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/ReadableDimension.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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; - -/** - * Readonly interface for Dimensions - * @author $Author$ - * @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/LWJGL/src/main/java/org/lwjgl/util/ReadablePoint.java b/LWJGL/src/main/java/org/lwjgl/util/ReadablePoint.java deleted file mode 100644 index a256459d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/ReadablePoint.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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; - -/** - * Readonly interface for Points - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -public interface ReadablePoint { - - /** - * @return int - */ - int getX(); - - /** - * @return int - */ - int getY(); - - /** - * 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/LWJGL/src/main/java/org/lwjgl/util/ReadableRectangle.java b/LWJGL/src/main/java/org/lwjgl/util/ReadableRectangle.java deleted file mode 100644 index cced54f2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/ReadableRectangle.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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; - -/** - * Readonly interface for Rectangles - * @author $Author$ - * @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/LWJGL/src/main/java/org/lwjgl/util/Rectangle.java b/LWJGL/src/main/java/org/lwjgl/util/Rectangle.java deleted file mode 100644 index 88d23348..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/Rectangle.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * 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; - -import java.io.Serializable; - -/** - * A 2D integer Rectangle class which looks remarkably like an AWT one. - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -public final class Rectangle implements ReadableRectangle, WritableRectangle, Serializable { - - static final long serialVersionUID = 1L; - - /** Rectangle's bounds */ - private int x, y, width, height; - - /** - * Constructor for Rectangle. - */ - public Rectangle() { - super(); - } - /** - * Constructor for Rectangle. - */ - public Rectangle(int x, int y, int w, int h) { - this.x = x; - this.y = y; - this.width = w; - this.height = h; - } - /** - * Constructor for Rectangle. - */ - public Rectangle(ReadablePoint p, ReadableDimension d) { - x = p.getX(); - y = p.getY(); - width = d.getWidth(); - height = d.getHeight(); - } - /** - * Constructor for Rectangle. - */ - public Rectangle(ReadableRectangle r) { - x = r.getX(); - y = r.getY(); - width = r.getWidth(); - height = r.getHeight(); - } - - public void setLocation(int x, int y) { - this.x = x; - this.y = y; - } - - public void setLocation(ReadablePoint p) { - this.x = p.getX(); - this.y = p.getY(); - } - - public void setSize(int w, int h) { - this.width = w; - this.height = h; - } - - public void setSize(ReadableDimension d) { - this.width = d.getWidth(); - this.height = d.getHeight(); - } - - public void setBounds(int x, int y, int w, int h) { - this.x = x; - this.y = y; - this.width = w; - this.height = h; - } - - public void setBounds(ReadablePoint p, ReadableDimension d) { - x = p.getX(); - y = p.getY(); - width = d.getWidth(); - height = d.getHeight(); - } - - public void setBounds(ReadableRectangle r) { - x = r.getX(); - y = r.getY(); - width = r.getWidth(); - height = r.getHeight(); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableRectangle#getBounds(com.shavenpuppy.jglib.Rectangle) - */ - public void getBounds(WritableRectangle dest) { - dest.setBounds(x, y, width, height); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadablePoint#getLocation(com.shavenpuppy.jglib.Point) - */ - public void getLocation(WritablePoint dest) { - dest.setLocation(x, y); - } - - /* (Overrides) - * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) - */ - public void getSize(WritableDimension dest) { - dest.setSize(width, height); - } - - /** - * Translate the rectangle by an amount. - * @param x The translation amount on the x axis - * @param y The translation amount on the y axis - */ - public void translate(int x, int y) { - this.x += x; - this.y += y; - } - - /** - * Translate the rectangle by an amount. - * @param point The translation amount - */ - public void translate(ReadablePoint point) { - this.x += point.getX(); - this.y += point.getY(); - } - - /** - * Un-translate the rectangle by an amount. - * @param point The translation amount - */ - public void untranslate(ReadablePoint point) { - this.x -= point.getX(); - this.y -= point.getY(); - } - - /** - * Checks whether or not this Rectangle contains the - * specified Point. - * @param p the Point to test - * @return true if the Point - * (xy) 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 - * (xy). - * @param X the specified x coordinate - * @param Y the specified y coordinate - * @return true if the point - * (xy) is inside this - * Rectangle; - * false otherwise. - */ - public boolean contains(int X, int Y) { - int w = this.width; - int h = this.height; - if ((w | h) < 0) { - // At least one of the dimensions is negative... - return false; - } - // Note: if either dimension is zero, tests below must return false... - int x = this.x; - int y = this.y; - if (X < x || Y < y) { - return false; - } - w += x; - h += y; - // 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. - */ - 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 (XY) with the - * specified dimensions (WH). - * @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 - * (XYWH) - * is entirely enclosed inside this Rectangle; - * false otherwise. - */ - public boolean contains(int X, int Y, int W, int H) { - int w = this.width; - int h = this.height; - if ((w | h | W | H) < 0) { - // At least one of the dimensions is negative... - return false; - } - // Note: if any dimension is zero, tests below must return false... - int x = this.x; - int y = this.y; - if (X < x || Y < y) { - return false; - } - w += x; - W += X; - if (W <= X) { - // X+W overflowed or W was zero, return false if... - // either original w or W was zero or - // x+w did not overflow or - // the overflowed x+w is smaller than the overflowed X+W - if (w >= x || W > w) - return false; - } else { - // X+W did not overflow and W was not zero, return false if... - // original w was zero or - // x+w did not overflow and x+w is smaller than X+W - if (w >= x && W > w) - return false; - } - h += y; - H += Y; - if (H <= Y) { - if (h >= y || H > h) - return false; - } else { - if (h >= y && H > h) - return false; - } - return true; - } - - /** - * 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. - */ - public boolean intersects(ReadableRectangle r) { - int tw = this.width; - int th = this.height; - int rw = r.getWidth(); - int rh = r.getHeight(); - if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) { - return false; - } - int tx = this.x; - int ty = this.y; - int rx = r.getX(); - int ry = r.getY(); - rw += rx; - rh += ry; - tw += tx; - th += ty; - // 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. - * - * @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; - int ty1 = this.y; - int rx1 = r.getX(); - int ry1 = r.getY(); - long tx2 = tx1; - tx2 += this.width; - long ty2 = ty1; - ty2 += this.height; - long rx2 = rx1; - rx2 += r.getWidth(); - long ry2 = ry1; - ry2 += r.getHeight(); - if (tx1 < rx1) - tx1 = rx1; - if (ty1 < ry1) - ty1 = ry1; - if (tx2 > rx2) - tx2 = rx2; - if (ty2 > ry2) - ty2 = ry2; - tx2 -= tx1; - ty2 -= ty1; - // tx2,ty2 will never overflow (they will never be - // larger than the smallest of the two source w,h) - // they might underflow, though... - if (tx2 < Integer.MIN_VALUE) - tx2 = Integer.MIN_VALUE; - if (ty2 < Integer.MIN_VALUE) - ty2 = Integer.MIN_VALUE; - if (dest == null) - dest = new Rectangle(tx1, ty1, (int) tx2, (int) ty2); - else - dest.setBounds(tx1, ty1, (int) tx2, (int) ty2); - return dest; - - } - - /** - * 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. - */ - public WritableRectangle union(ReadableRectangle r, WritableRectangle dest) { - int x1 = Math.min(x, r.getX()); - int x2 = Math.max(x + width, r.getX() + r.getWidth()); - int y1 = Math.min(y, r.getY()); - int y2 = Math.max(y + height, r.getY() + r.getHeight()); - dest.setBounds(x1, y1, x2 - x1, y2 - y1); - return dest; - } - - /** - * 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. - * @param newx the x coordinates of the new point - * @param newy the y coordinates of the new point - */ - public void add(int newx, int newy) { - int x1 = Math.min(x, newx); - int x2 = Math.max(x + width, newx); - int y1 = Math.min(y, newy); - int y2 = Math.max(y + height, newy); - x = x1; - y = y1; - width = x2 - x1; - height = y2 - y1; - } - - /** - * 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 - */ - 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 - */ - public void add(ReadableRectangle r) { - int x1 = Math.min(x, r.getX()); - int x2 = Math.max(x + width, r.getX() + r.getWidth()); - int y1 = Math.min(y, r.getY()); - int y2 = Math.max(y + height, r.getY() + r.getHeight()); - x = x1; - y = y1; - width = x2 - x1; - height = y2 - y1; - } - - /** - * 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. - *

    - * 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. - * @param h the horizontal expansion - * @param v the vertical expansion - */ - public void grow(int h, int v) { - x -= h; - y -= v; - width += h * 2; - height += v * 2; - } - - /** - * 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. - */ - public boolean equals(Object obj) { - if (obj instanceof Rectangle) { - Rectangle r = (Rectangle) obj; - return ((x == r.x) && (y == r.y) && (width == r.width) && (height == r.height)); - } - return super.equals(obj); - } - - /** - * 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() { - return height; - } - - /** - * Sets the height. - * @param height The height to set - */ - public void setHeight(int height) { - this.height = height; - } - - /** - * Gets the width. - * @return Returns a int - */ - public int getWidth() { - return width; - } - - /** - * Sets the width. - * @param width The width to set - */ - public void setWidth(int width) { - this.width = width; - } - - /** - * Gets the x. - * @return Returns a int - */ - public int getX() { - return x; - } - - /** - * Sets the x. - * @param x The x to set - */ - public void setX(int x) { - this.x = x; - } - - /** - * Gets the y. - * @return Returns a int - */ - public int getY() { - return y; - } - - /** - * Sets the y. - * @param y The y to set - */ - public void setY(int y) { - this.y = y; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/Renderable.java b/LWJGL/src/main/java/org/lwjgl/util/Renderable.java deleted file mode 100644 index fcb73ea7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/Renderable.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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; - -/** - * - * Simple interface to things that can be Rendered. - * - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -public interface Renderable { - - /** - * "Render" this thing. This will involve calls to the GL. - */ - void render(); - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/Timer.java b/LWJGL/src/main/java/org/lwjgl/util/Timer.java deleted file mode 100644 index df148e91..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/Timer.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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; - -import org.lwjgl.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. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ -public class Timer { - - // Record the timer resolution on classload - private static long resolution = Sys.getTimerResolution(); - - // Every so often we will re-query the timer resolution - private static final int QUERY_INTERVAL = 50; // in calls to tick() - private static int queryCount; - - // Globally keeps track of time for all instances of Timer - private static long currentTime; - - // When the timer was started - private long startTime; - - // The last time recorded by getTime() - private long lastTime; - - // Whether the timer is paused - private boolean paused; - - static { - tick(); - } - - /** - * Constructs a timer. The timer will be reset to 0.0 and resumed immediately. - */ - public Timer() { - reset(); - resume(); - } - - /** - * @return the time in seconds, as a float - */ - public float getTime() { - if (!paused) { - lastTime = currentTime - startTime; - } - - return (float) ((double) lastTime / (double) resolution); - } - /** - * @return whether this timer is paused - */ - public boolean isPaused() { - return paused; - } - - /** - * Pause the timer. Whilst paused the time will not change for this timer - * when tick() is called. - * - * @see #resume() - */ - public void pause() { - paused = true; - } - - /** - * Reset the timer. Equivalent to set(0.0f); - * @see #set(float) - */ - public void reset() { - set(0.0f); - } - - /** - * Resume the timer. - * @see #pause() - */ - public void resume() { - paused = false; - startTime = currentTime - lastTime; - } - - /** - * Set the time of this timer - * @param newTime the new time, in seconds - */ - public void set(float newTime) { - long newTimeInTicks = (long) ((double) newTime * (double) resolution); - startTime = currentTime - newTimeInTicks; - lastTime = newTimeInTicks; - } - - /** - * 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(); - - // Periodically refresh the timer resolution: - queryCount ++; - if (queryCount > QUERY_INTERVAL) { - queryCount = 0; - resolution = Sys.getTimerResolution(); - } - } - - /** - * Debug output. - */ - public String toString() { - return "Timer[Time=" + getTime() + ", Paused=" + paused + "]"; - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/WaveData.java b/LWJGL/src/main/java/org/lwjgl/util/WaveData.java deleted file mode 100644 index dc62ad7d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/WaveData.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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; - -import com.sun.media.sound.WaveFileReader; - -import org.lwjgl.openal.AL10; - -import java.io.BufferedInputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -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; - -/** - * - * Utitlity class for loading wavefiles. - * - * @author Brian Matzon - * @version $Revision$ - * $Id$ - */ -public class WaveData { - /** actual wave data */ - public final ByteBuffer data; - - /** format type of data */ - public final int format; - - /** sample rate of data */ - public final int samplerate; - - /** - * Creates a new WaveData - * - * @param data actual wavedata - * @param format format of wave data - * @param samplerate sample rate of data - */ - private WaveData(ByteBuffer data, int format, int samplerate) { - this.data = data; - this.format = format; - this.samplerate = samplerate; - } - - /** - * Disposes the wavedata - */ - public void dispose() { - data.clear(); - } - - /** - * Creates a WaveData container from the specified url - * - * @param path URL to file - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(URL path) { - try { - // due to an issue with AudioSystem.getAudioInputStream - // and mixing unsigned and signed code - // we will use the reader directly - WaveFileReader wfr = new WaveFileReader(); - return create(wfr.getAudioInputStream(new BufferedInputStream(path.openStream()))); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from: " + path + ", " + e.getMessage()); - return null; - } - } - - /** - * Creates a WaveData container from the specified in the classpath - * - * @param path path to file (relative, and in classpath) - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(String path) { - return create(Thread.currentThread().getContextClassLoader().getResource(path)); - } - - /** - * Creates a WaveData container from the specified inputstream - * - * @param is InputStream to read from - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(InputStream is) { - try { - return create( - AudioSystem.getAudioInputStream(is)); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from inputstream, " + e.getMessage()); - return null; - } - } - - /** - * Creates a WaveData container from the specified bytes - * - * @param buffer array of bytes containing the complete wave file - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(byte[] buffer) { - try { - return create( - AudioSystem.getAudioInputStream( - new BufferedInputStream(new ByteArrayInputStream(buffer)))); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from byte array, " + e.getMessage()); - return null; - } - } - - /** - * 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 - */ - public static WaveData create(ByteBuffer buffer) { - try { - byte[] bytes = null; - - if(buffer.hasArray()) { - bytes = buffer.array(); - } else { - bytes = new byte[buffer.capacity()]; - buffer.get(bytes); - } - return create(bytes); - } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from ByteBuffer, " + e.getMessage()); - return null; - } - } - - /** - * Creates a WaveData container from the specified stream - * - * @param ais AudioInputStream to read from - * @return WaveData containing data, or null if a failure occured - */ - public static WaveData create(AudioInputStream ais) { - //get format of data - AudioFormat audioformat = ais.getFormat(); - - // get channels - int channels = 0; - if (audioformat.getChannels() == 1) { - if (audioformat.getSampleSizeInBits() == 8) { - channels = AL10.AL_FORMAT_MONO8; - } else if (audioformat.getSampleSizeInBits() == 16) { - channels = AL10.AL_FORMAT_MONO16; - } else { - assert false : "Illegal sample size"; - } - } else if (audioformat.getChannels() == 2) { - if (audioformat.getSampleSizeInBits() == 8) { - channels = AL10.AL_FORMAT_STEREO8; - } else if (audioformat.getSampleSizeInBits() == 16) { - channels = AL10.AL_FORMAT_STEREO16; - } else { - assert false : "Illegal sample size"; - } - } else { - assert false : "Only mono or stereo is supported"; - } - - //read data into buffer - ByteBuffer buffer = null; - try { - int available = ais.available(); - if(available <= 0) { - available = ais.getFormat().getChannels() * (int) ais.getFrameLength() * ais.getFormat().getSampleSizeInBits() / 8; - } - byte[] buf = new byte[ais.available()]; - int read = 0, total = 0; - while ((read = ais.read(buf, total, buf.length - total)) != -1 - && total < buf.length) { - total += read; - } - buffer = convertAudioBytes(buf, audioformat.getSampleSizeInBits() == 16, audioformat.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); - } catch (IOException ioe) { - return null; - } - - - //create our result - WaveData wavedata = - new WaveData(buffer, channels, (int) audioformat.getSampleRate()); - - //close stream - try { - ais.close(); - } catch (IOException ioe) { - } - - return wavedata; - } - - private static ByteBuffer convertAudioBytes(byte[] audio_bytes, boolean two_bytes_data, ByteOrder order) { - ByteBuffer dest = ByteBuffer.allocateDirect(audio_bytes.length); - dest.order(ByteOrder.nativeOrder()); - ByteBuffer src = ByteBuffer.wrap(audio_bytes); - src.order(order); - if (two_bytes_data) { - ShortBuffer dest_short = dest.asShortBuffer(); - ShortBuffer src_short = src.asShortBuffer(); - while (src_short.hasRemaining()) - dest_short.put(src_short.get()); - } else { - while (src.hasRemaining()) - dest.put(src.get()); - } - dest.rewind(); - return dest; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/WritableColor.java b/LWJGL/src/main/java/org/lwjgl/util/WritableColor.java deleted file mode 100644 index a1fb49ca..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/WritableColor.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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; - -import java.nio.ByteBuffer; - -/** - * Write interface for Colors - * @author $Author$ - * @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); -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/WritableDimension.java b/LWJGL/src/main/java/org/lwjgl/util/WritableDimension.java deleted file mode 100644 index 5e049769..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/WritableDimension.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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; - -/** - * Write interface for Dimensions - * @author $Author$ - * @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); -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/WritablePoint.java b/LWJGL/src/main/java/org/lwjgl/util/WritablePoint.java deleted file mode 100644 index 6a398cb0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/WritablePoint.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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; - -/** - * Write interface for Points - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -public interface WritablePoint { - void setLocation(int x, int y); - void setLocation(ReadablePoint p); - void setX(int x); - void setY(int y); -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/WritableRectangle.java b/LWJGL/src/main/java/org/lwjgl/util/WritableRectangle.java deleted file mode 100644 index 2b1da168..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/WritableRectangle.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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; - -/** - * Write interface for Rectangles - * @author $Author$ - * @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 height Height of rectangle - */ - void setBounds(int x, int y, int width, int height); - - /** - * Sets the bounds of the rectangle - * @param location - * @param size - */ - void setBounds(ReadablePoint location, ReadableDimension size); - - /** - * Sets the bounds of the rectangle - * @param src - */ - void setBounds(ReadableRectangle src); -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/XPMFile.java b/LWJGL/src/main/java/org/lwjgl/util/XPMFile.java deleted file mode 100644 index 9b71de0d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/XPMFile.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * 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; - -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.LineNumberReader; -import java.util.HashMap; -import java.util.StringTokenizer; - -/** - *

    - * NOTE: This simple XPM reader does not support extensions nor hotspots - *

    - * - * @author Brian Matzon - * @author Jos Hirth - * @version $Revision$ - * $Id$ - */ - -public class XPMFile { - - /** Array of bytes (RGBA) */ - private byte bytes[]; - - private static final int WIDTH = 0; - - private static final int HEIGHT = 1; - - private static final int NUMBER_OF_COLORS = 2; - - private static final int CHARACTERS_PER_PIXEL = 3; - - private static int[] format = new int[4]; - - /* - * Private constructor, use load(String filename) - */ - private XPMFile() { - } - - /** - * Loads the XPM file - * - * @param file - * path to file - * @return XPMFile loaded, or exception - * @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))); - } - - /** - * Loads the XPM file - * - * @param is - * InputStream to read file from - * @return XPMFile loaded, or exception - */ - public static XPMFile load(InputStream is) { - XPMFile xFile = new XPMFile(); - xFile.readImage(is); - return xFile; - } - - /** - * @return the height of the image. - */ - public int getHeight() { - return format[HEIGHT]; - } - - /** - * @return the width of the image. - */ - public int getWidth() { - return format[WIDTH]; - } - - /** - * @return The data of the image. - */ - public byte[] getBytes() { - return bytes; - } - - /** - * Read the image from the specified file. - */ - private void readImage(InputStream is) { - try { - LineNumberReader reader = new LineNumberReader( - new InputStreamReader(is)); - HashMap colors = new HashMap(); - - format = parseFormat(nextLineOfInterest(reader)); - - // setup color mapping - for (int i = 0; i < format[NUMBER_OF_COLORS]; i++) { - Object[] colorDefinition = parseColor(nextLineOfInterest(reader)); - colors.put((String)colorDefinition[0], (Integer)colorDefinition[1]); - } - - // read actual image (convert to RGBA) - bytes = new byte[format[WIDTH] * format[HEIGHT] * 4]; - for (int i = 0; i < format[HEIGHT]; i++) { - parseImageLine(nextLineOfInterest(reader), format, colors, i); - } - } catch (Exception e) { - e.printStackTrace(); - throw new IllegalArgumentException("Unable to parse XPM File"); - } - } - - /** - * Finds the next interesting line of text. - * - * @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 - */ - private static String nextLineOfInterest(LineNumberReader reader) - throws IOException { - String ret; - do { - ret = reader.readLine(); - } while (!ret.startsWith("\"")); - // lacks sanity check - return ret.substring(1, ret.lastIndexOf('\"')); - } - - /** - * Parses the format of the xpm file given a format string - * - * @param format - * String to parse - * @return Array specifying width, height, colors, characters per pixel - */ - private static int[] parseFormat(String format) { - // format should look like this: - // 16 16 122 2 - - // 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 */ - }; - } - - /** - * Given a line defining a color/pixel, parses this into an array containing - * a key and a color - * - * @param line - * Line to parse - * @return Array containing a key (String) and a color (Integer) - */ - private static Object[] parseColor(String line) { - // line should look like this: - // # c #0A0A0A - - // NOTE: will break if the color is something like "black" or "gray50" - // etc (instead of #rrggbb). - - String key = line.substring(0, format[CHARACTERS_PER_PIXEL]); - // since we always assume color as type we dont need to read it - // String type = line.substring(format[CHARACTERS_PER_PIXEL] + 1, - // format[CHARACTERS_PER_PIXEL] + 2); - 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) }; - } - - /** - * 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 - */ - private void parseImageLine(String line, int[] format, HashMap colors, - int index) { - // offset for next line - int offset = index * 4 * format[WIDTH]; - - // read characters times, - // each iteration equals one pixel - for (int i = 0; i < format[WIDTH]; i++) { - String key = line - .substring( - i * format[CHARACTERS_PER_PIXEL], - (i * format[CHARACTERS_PER_PIXEL] + format[CHARACTERS_PER_PIXEL])); - int color = colors.get(key); - bytes[offset + (i * 4)] = (byte) ((color & 0x00ff0000) >> 16); - bytes[offset + ((i * 4) + 1)] = (byte) ((color & 0x0000ff00) >> 8); - bytes[offset + ((i * 4) + 2)] = (byte) ((color & 0x000000ff) >> 0); // looks - // better - // :) - bytes[offset + ((i * 4) + 3)] = (byte) 0xff; // always 0xff alpha - } - } - - /** - * @param args - */ - public static void main(String[] args) { - if (args.length != 1) { - System.out.println("usage:\nXPMFile "); - } - - try { - String out = args[0].substring(0, args[0].indexOf(".")) + ".raw"; - XPMFile file = XPMFile.load(args[0]); - BufferedOutputStream bos = new BufferedOutputStream( - new FileOutputStream(new File(out))); - bos.write(file.getBytes()); - bos.close(); - - // showResult(file.getBytes()); - } catch (Exception e) { - e.printStackTrace(); - } - } - /* - 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); - }*/ -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/BDF_Property.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/BDF_Property.java deleted file mode 100644 index 4ff56604..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/BDF_Property.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * This structure models a given BDF/PCF property. - * - *

    Layout

    - * - *
    
    - * struct BDF_PropertyRec {
    - *     BDF_PropertyType type;
    - *     union {
    - *         char const * atom;
    - *         FT_Int32 integer;
    - *         FT_UInt32 cardinal;
    - *     } u;
    - * }
    - */ -@NativeType("struct BDF_PropertyRec") -public class BDF_Property extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - U, - U_ATOM, - U_INTEGER, - U_CARDINAL; - - static { - Layout layout = __struct( - __member(4), - __union( - __member(POINTER_SIZE), - __member(4), - __member(4) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - U = layout.offsetof(1); - U_ATOM = layout.offsetof(2); - U_INTEGER = layout.offsetof(3); - U_CARDINAL = layout.offsetof(4); - } - - protected BDF_Property(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected BDF_Property create(long address, @Nullable ByteBuffer container) { - return new BDF_Property(address, container); - } - - /** - * Creates a {@code BDF_Property} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public BDF_Property(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("BDF_PropertyType") - public int type() { return ntype(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code u.atom} field. */ - @Nullable - @NativeType("char const *") - public ByteBuffer u_atom() { return nu_atom(address()); } - /** @return the null-terminated string pointed to by the {@code u.atom} field. */ - @Nullable - @NativeType("char const *") - public String u_atomString() { return nu_atomString(address()); } - /** @return the value of the {@code u.integer} field. */ - @NativeType("FT_Int32") - public int u_integer() { return nu_integer(address()); } - /** @return the value of the {@code u.cardinal} field. */ - @NativeType("FT_UInt32") - public int u_cardinal() { return nu_cardinal(address()); } - - // ----------------------------------- - - /** Returns a new {@code BDF_Property} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static BDF_Property malloc() { - return new BDF_Property(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code BDF_Property} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static BDF_Property calloc() { - return new BDF_Property(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code BDF_Property} instance allocated with {@link BufferUtils}. */ - public static BDF_Property create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new BDF_Property(memAddress(container), container); - } - - /** Returns a new {@code BDF_Property} instance for the specified memory address. */ - public static BDF_Property create(long address) { - return new BDF_Property(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static BDF_Property createSafe(long address) { - return address == NULL ? null : new BDF_Property(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code BDF_Property} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static BDF_Property malloc(MemoryStack stack) { - return new BDF_Property(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code BDF_Property} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static BDF_Property calloc(MemoryStack stack) { - return new BDF_Property(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + BDF_Property.TYPE); } - /** Unsafe version of {@link #u_atom}. */ - @Nullable public static ByteBuffer nu_atom(long struct) { return memByteBufferNT1Safe(memGetAddress(struct + BDF_Property.U_ATOM)); } - /** Unsafe version of {@link #u_atomString}. */ - @Nullable public static String nu_atomString(long struct) { return memASCIISafe(memGetAddress(struct + BDF_Property.U_ATOM)); } - /** Unsafe version of {@link #u_integer}. */ - public static int nu_integer(long struct) { return UNSAFE.getInt(null, struct + BDF_Property.U_INTEGER); } - /** Unsafe version of {@link #u_cardinal}. */ - public static int nu_cardinal(long struct) { return UNSAFE.getInt(null, struct + BDF_Property.U_CARDINAL); } - - // ----------------------------------- - - /** An array of {@link BDF_Property} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final BDF_Property ELEMENT_FACTORY = BDF_Property.create(-1L); - - /** - * Creates a new {@code BDF_Property.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link BDF_Property#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected BDF_Property getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("BDF_PropertyType") - public int type() { return BDF_Property.ntype(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code u.atom} field. */ - @Nullable - @NativeType("char const *") - public ByteBuffer u_atom() { return BDF_Property.nu_atom(address()); } - /** @return the null-terminated string pointed to by the {@code u.atom} field. */ - @Nullable - @NativeType("char const *") - public String u_atomString() { return BDF_Property.nu_atomString(address()); } - /** @return the value of the {@code u.integer} field. */ - @NativeType("FT_Int32") - public int u_integer() { return BDF_Property.nu_integer(address()); } - /** @return the value of the {@code u.cardinal} field. */ - @NativeType("FT_UInt32") - public int u_cardinal() { return BDF_Property.nu_cardinal(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/CID_FaceDict.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/CID_FaceDict.java deleted file mode 100644 index 97280f40..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/CID_FaceDict.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to represent data in a CID top-level dictionary. - * - *

    Layout

    - * - *
    
    - * struct CID_FaceDictRec {
    - *     {@link PS_Private PS_PrivateRec} private_dict;
    - *     FT_UInt len_buildchar;
    - *     FT_Fixed forcebold_threshold;
    - *     FT_Pos stroke_width;
    - *     FT_Fixed expansion_factor;
    - *     FT_Byte paint_type;
    - *     FT_Byte font_type;
    - *     {@link FT_Matrix FT_Matrix} font_matrix;
    - *     {@link FT_Vector FT_Vector} font_offset;
    - *     FT_UInt num_subrs;
    - *     FT_ULong subrmap_offset;
    - *     FT_UInt sd_bytes;
    - * }
    - */ -@NativeType("struct CID_FaceDictRec") -public class CID_FaceDict extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PRIVATE_DICT, - LEN_BUILDCHAR, - FORCEBOLD_THRESHOLD, - STROKE_WIDTH, - EXPANSION_FACTOR, - PAINT_TYPE, - FONT_TYPE, - FONT_MATRIX, - FONT_OFFSET, - NUM_SUBRS, - SUBRMAP_OFFSET, - SD_BYTES; - - static { - Layout layout = __struct( - __member(PS_Private.SIZEOF, PS_Private.ALIGNOF), - __member(4), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(1), - __member(1), - __member(FT_Matrix.SIZEOF, FT_Matrix.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(4), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PRIVATE_DICT = layout.offsetof(0); - LEN_BUILDCHAR = layout.offsetof(1); - FORCEBOLD_THRESHOLD = layout.offsetof(2); - STROKE_WIDTH = layout.offsetof(3); - EXPANSION_FACTOR = layout.offsetof(4); - PAINT_TYPE = layout.offsetof(5); - FONT_TYPE = layout.offsetof(6); - FONT_MATRIX = layout.offsetof(7); - FONT_OFFSET = layout.offsetof(8); - NUM_SUBRS = layout.offsetof(9); - SUBRMAP_OFFSET = layout.offsetof(10); - SD_BYTES = layout.offsetof(11); - } - - protected CID_FaceDict(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected CID_FaceDict create(long address, @Nullable ByteBuffer container) { - return new CID_FaceDict(address, container); - } - - /** - * Creates a {@code CID_FaceDict} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public CID_FaceDict(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link PS_Private} view of the {@code private_dict} field. */ - @NativeType("PS_PrivateRec") - public PS_Private private_dict() { return nprivate_dict(address()); } - /** @return the value of the {@code len_buildchar} field. */ - @NativeType("FT_UInt") - public int len_buildchar() { return nlen_buildchar(address()); } - /** @return the value of the {@code forcebold_threshold} field. */ - @NativeType("FT_Fixed") - public long forcebold_threshold() { return nforcebold_threshold(address()); } - /** @return the value of the {@code stroke_width} field. */ - @NativeType("FT_Pos") - public long stroke_width() { return nstroke_width(address()); } - /** @return the value of the {@code expansion_factor} field. */ - @NativeType("FT_Fixed") - public long expansion_factor() { return nexpansion_factor(address()); } - /** @return the value of the {@code paint_type} field. */ - @NativeType("FT_Byte") - public byte paint_type() { return npaint_type(address()); } - /** @return the value of the {@code font_type} field. */ - @NativeType("FT_Byte") - public byte font_type() { return nfont_type(address()); } - /** @return a {@link FT_Matrix} view of the {@code font_matrix} field. */ - public FT_Matrix font_matrix() { return nfont_matrix(address()); } - /** @return a {@link FT_Vector} view of the {@code font_offset} field. */ - public FT_Vector font_offset() { return nfont_offset(address()); } - /** @return the value of the {@code num_subrs} field. */ - @NativeType("FT_UInt") - public int num_subrs() { return nnum_subrs(address()); } - /** @return the value of the {@code subrmap_offset} field. */ - @NativeType("FT_ULong") - public long subrmap_offset() { return nsubrmap_offset(address()); } - /** @return the value of the {@code sd_bytes} field. */ - @NativeType("FT_UInt") - public int sd_bytes() { return nsd_bytes(address()); } - - // ----------------------------------- - - /** Returns a new {@code CID_FaceDict} instance for the specified memory address. */ - public static CID_FaceDict create(long address) { - return new CID_FaceDict(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static CID_FaceDict createSafe(long address) { - return address == NULL ? null : new CID_FaceDict(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #private_dict}. */ - public static PS_Private nprivate_dict(long struct) { return PS_Private.create(struct + CID_FaceDict.PRIVATE_DICT); } - /** Unsafe version of {@link #len_buildchar}. */ - public static int nlen_buildchar(long struct) { return UNSAFE.getInt(null, struct + CID_FaceDict.LEN_BUILDCHAR); } - /** Unsafe version of {@link #forcebold_threshold}. */ - public static long nforcebold_threshold(long struct) { return memGetCLong(struct + CID_FaceDict.FORCEBOLD_THRESHOLD); } - /** Unsafe version of {@link #stroke_width}. */ - public static long nstroke_width(long struct) { return memGetCLong(struct + CID_FaceDict.STROKE_WIDTH); } - /** Unsafe version of {@link #expansion_factor}. */ - public static long nexpansion_factor(long struct) { return memGetCLong(struct + CID_FaceDict.EXPANSION_FACTOR); } - /** Unsafe version of {@link #paint_type}. */ - public static byte npaint_type(long struct) { return UNSAFE.getByte(null, struct + CID_FaceDict.PAINT_TYPE); } - /** Unsafe version of {@link #font_type}. */ - public static byte nfont_type(long struct) { return UNSAFE.getByte(null, struct + CID_FaceDict.FONT_TYPE); } - /** Unsafe version of {@link #font_matrix}. */ - public static FT_Matrix nfont_matrix(long struct) { return FT_Matrix.create(struct + CID_FaceDict.FONT_MATRIX); } - /** Unsafe version of {@link #font_offset}. */ - public static FT_Vector nfont_offset(long struct) { return FT_Vector.create(struct + CID_FaceDict.FONT_OFFSET); } - /** Unsafe version of {@link #num_subrs}. */ - public static int nnum_subrs(long struct) { return UNSAFE.getInt(null, struct + CID_FaceDict.NUM_SUBRS); } - /** Unsafe version of {@link #subrmap_offset}. */ - public static long nsubrmap_offset(long struct) { return memGetCLong(struct + CID_FaceDict.SUBRMAP_OFFSET); } - /** Unsafe version of {@link #sd_bytes}. */ - public static int nsd_bytes(long struct) { return UNSAFE.getInt(null, struct + CID_FaceDict.SD_BYTES); } - - // ----------------------------------- - - /** An array of {@link CID_FaceDict} structs. */ - public static class Buffer extends StructBuffer { - - private static final CID_FaceDict ELEMENT_FACTORY = CID_FaceDict.create(-1L); - - /** - * Creates a new {@code CID_FaceDict.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link CID_FaceDict#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected CID_FaceDict getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link PS_Private} view of the {@code private_dict} field. */ - @NativeType("PS_PrivateRec") - public PS_Private private_dict() { return CID_FaceDict.nprivate_dict(address()); } - /** @return the value of the {@code len_buildchar} field. */ - @NativeType("FT_UInt") - public int len_buildchar() { return CID_FaceDict.nlen_buildchar(address()); } - /** @return the value of the {@code forcebold_threshold} field. */ - @NativeType("FT_Fixed") - public long forcebold_threshold() { return CID_FaceDict.nforcebold_threshold(address()); } - /** @return the value of the {@code stroke_width} field. */ - @NativeType("FT_Pos") - public long stroke_width() { return CID_FaceDict.nstroke_width(address()); } - /** @return the value of the {@code expansion_factor} field. */ - @NativeType("FT_Fixed") - public long expansion_factor() { return CID_FaceDict.nexpansion_factor(address()); } - /** @return the value of the {@code paint_type} field. */ - @NativeType("FT_Byte") - public byte paint_type() { return CID_FaceDict.npaint_type(address()); } - /** @return the value of the {@code font_type} field. */ - @NativeType("FT_Byte") - public byte font_type() { return CID_FaceDict.nfont_type(address()); } - /** @return a {@link FT_Matrix} view of the {@code font_matrix} field. */ - public FT_Matrix font_matrix() { return CID_FaceDict.nfont_matrix(address()); } - /** @return a {@link FT_Vector} view of the {@code font_offset} field. */ - public FT_Vector font_offset() { return CID_FaceDict.nfont_offset(address()); } - /** @return the value of the {@code num_subrs} field. */ - @NativeType("FT_UInt") - public int num_subrs() { return CID_FaceDict.nnum_subrs(address()); } - /** @return the value of the {@code subrmap_offset} field. */ - @NativeType("FT_ULong") - public long subrmap_offset() { return CID_FaceDict.nsubrmap_offset(address()); } - /** @return the value of the {@code sd_bytes} field. */ - @NativeType("FT_UInt") - public int sd_bytes() { return CID_FaceDict.nsd_bytes(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/CID_FaceInfo.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/CID_FaceInfo.java deleted file mode 100644 index 98703847..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/CID_FaceInfo.java +++ /dev/null @@ -1,390 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to represent CID Face information. - * - *

    Layout

    - * - *
    
    - * struct CID_FaceInfoRec {
    - *     FT_String * cid_font_name;
    - *     FT_Fixed cid_version;
    - *     FT_Int cid_font_type;
    - *     FT_String * registry;
    - *     FT_String * ordering;
    - *     FT_Int supplement;
    - *     {@link PS_FontInfo PS_FontInfoRec} font_info;
    - *     {@link FT_BBox FT_BBox} font_bbox;
    - *     FT_ULong uid_base;
    - *     FT_Int num_xuid;
    - *     FT_ULong xuid[16];
    - *     FT_ULong cidmap_offset;
    - *     FT_UInt fd_bytes;
    - *     FT_UInt gd_bytes;
    - *     FT_ULong cid_count;
    - *     FT_UInt num_dicts;
    - *     {@link CID_FaceDict CID_FaceDict} font_dicts;
    - *     FT_ULong data_offset;
    - * }
    - */ -@NativeType("struct CID_FaceInfoRec") -public class CID_FaceInfo extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - CID_FONT_NAME, - CID_VERSION, - CID_FONT_TYPE, - REGISTRY, - ORDERING, - SUPPLEMENT, - FONT_INFO, - FONT_BBOX, - UID_BASE, - NUM_XUID, - XUID, - CIDMAP_OFFSET, - FD_BYTES, - GD_BYTES, - CID_COUNT, - NUM_DICTS, - FONT_DICTS, - DATA_OFFSET; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(PS_FontInfo.SIZEOF, PS_FontInfo.ALIGNOF), - __member(FT_BBox.SIZEOF, FT_BBox.ALIGNOF), - __member(CLONG_SIZE), - __member(4), - __array(CLONG_SIZE, 16), - __member(CLONG_SIZE), - __member(4), - __member(4), - __member(CLONG_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - CID_FONT_NAME = layout.offsetof(0); - CID_VERSION = layout.offsetof(1); - CID_FONT_TYPE = layout.offsetof(2); - REGISTRY = layout.offsetof(3); - ORDERING = layout.offsetof(4); - SUPPLEMENT = layout.offsetof(5); - FONT_INFO = layout.offsetof(6); - FONT_BBOX = layout.offsetof(7); - UID_BASE = layout.offsetof(8); - NUM_XUID = layout.offsetof(9); - XUID = layout.offsetof(10); - CIDMAP_OFFSET = layout.offsetof(11); - FD_BYTES = layout.offsetof(12); - GD_BYTES = layout.offsetof(13); - CID_COUNT = layout.offsetof(14); - NUM_DICTS = layout.offsetof(15); - FONT_DICTS = layout.offsetof(16); - DATA_OFFSET = layout.offsetof(17); - } - - protected CID_FaceInfo(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected CID_FaceInfo create(long address, @Nullable ByteBuffer container) { - return new CID_FaceInfo(address, container); - } - - /** - * Creates a {@code CID_FaceInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public CID_FaceInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code cid_font_name} field. */ - @NativeType("FT_String *") - public ByteBuffer cid_font_name() { return ncid_font_name(address()); } - /** @return the null-terminated string pointed to by the {@code cid_font_name} field. */ - @NativeType("FT_String *") - public String cid_font_nameString() { return ncid_font_nameString(address()); } - /** @return the value of the {@code cid_version} field. */ - @NativeType("FT_Fixed") - public long cid_version() { return ncid_version(address()); } - /** @return the value of the {@code cid_font_type} field. */ - @NativeType("FT_Int") - public int cid_font_type() { return ncid_font_type(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code registry} field. */ - @NativeType("FT_String *") - public ByteBuffer registry() { return nregistry(address()); } - /** @return the null-terminated string pointed to by the {@code registry} field. */ - @NativeType("FT_String *") - public String registryString() { return nregistryString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code ordering} field. */ - @NativeType("FT_String *") - public ByteBuffer ordering() { return nordering(address()); } - /** @return the null-terminated string pointed to by the {@code ordering} field. */ - @NativeType("FT_String *") - public String orderingString() { return norderingString(address()); } - /** @return the value of the {@code supplement} field. */ - @NativeType("FT_Int") - public int supplement() { return nsupplement(address()); } - /** @return a {@link PS_FontInfo} view of the {@code font_info} field. */ - @NativeType("PS_FontInfoRec") - public PS_FontInfo font_info() { return nfont_info(address()); } - /** @return a {@link FT_BBox} view of the {@code font_bbox} field. */ - public FT_BBox font_bbox() { return nfont_bbox(address()); } - /** @return the value of the {@code uid_base} field. */ - @NativeType("FT_ULong") - public long uid_base() { return nuid_base(address()); } - /** @return the value of the {@code num_xuid} field. */ - @NativeType("FT_Int") - public int num_xuid() { return nnum_xuid(address()); } - /** @return a {@link CLongBuffer} view of the {@code xuid} field. */ - @NativeType("FT_ULong[16]") - public CLongBuffer xuid() { return nxuid(address()); } - /** @return the value at the specified index of the {@code xuid} field. */ - @NativeType("FT_ULong") - public long xuid(int index) { return nxuid(address(), index); } - /** @return the value of the {@code cidmap_offset} field. */ - @NativeType("FT_ULong") - public long cidmap_offset() { return ncidmap_offset(address()); } - /** @return the value of the {@code fd_bytes} field. */ - @NativeType("FT_UInt") - public int fd_bytes() { return nfd_bytes(address()); } - /** @return the value of the {@code gd_bytes} field. */ - @NativeType("FT_UInt") - public int gd_bytes() { return ngd_bytes(address()); } - /** @return the value of the {@code cid_count} field. */ - @NativeType("FT_ULong") - public long cid_count() { return ncid_count(address()); } - /** @return the value of the {@code num_dicts} field. */ - @NativeType("FT_UInt") - public int num_dicts() { return nnum_dicts(address()); } - /** @return a {@link CID_FaceDict} view of the struct pointed to by the {@code font_dicts} field. */ - public CID_FaceDict font_dicts() { return nfont_dicts(address()); } - /** @return the value of the {@code data_offset} field. */ - @NativeType("FT_ULong") - public long data_offset() { return ndata_offset(address()); } - - // ----------------------------------- - - /** Returns a new {@code CID_FaceInfo} instance for the specified memory address. */ - public static CID_FaceInfo create(long address) { - return new CID_FaceInfo(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static CID_FaceInfo createSafe(long address) { - return address == NULL ? null : new CID_FaceInfo(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #cid_font_name}. */ - public static ByteBuffer ncid_font_name(long struct) { return memByteBufferNT1(memGetAddress(struct + CID_FaceInfo.CID_FONT_NAME)); } - /** Unsafe version of {@link #cid_font_nameString}. */ - public static String ncid_font_nameString(long struct) { return memUTF8(memGetAddress(struct + CID_FaceInfo.CID_FONT_NAME)); } - /** Unsafe version of {@link #cid_version}. */ - public static long ncid_version(long struct) { return memGetCLong(struct + CID_FaceInfo.CID_VERSION); } - /** Unsafe version of {@link #cid_font_type}. */ - public static int ncid_font_type(long struct) { return UNSAFE.getInt(null, struct + CID_FaceInfo.CID_FONT_TYPE); } - /** Unsafe version of {@link #registry}. */ - public static ByteBuffer nregistry(long struct) { return memByteBufferNT1(memGetAddress(struct + CID_FaceInfo.REGISTRY)); } - /** Unsafe version of {@link #registryString}. */ - public static String nregistryString(long struct) { return memUTF8(memGetAddress(struct + CID_FaceInfo.REGISTRY)); } - /** Unsafe version of {@link #ordering}. */ - public static ByteBuffer nordering(long struct) { return memByteBufferNT1(memGetAddress(struct + CID_FaceInfo.ORDERING)); } - /** Unsafe version of {@link #orderingString}. */ - public static String norderingString(long struct) { return memUTF8(memGetAddress(struct + CID_FaceInfo.ORDERING)); } - /** Unsafe version of {@link #supplement}. */ - public static int nsupplement(long struct) { return UNSAFE.getInt(null, struct + CID_FaceInfo.SUPPLEMENT); } - /** Unsafe version of {@link #font_info}. */ - public static PS_FontInfo nfont_info(long struct) { return PS_FontInfo.create(struct + CID_FaceInfo.FONT_INFO); } - /** Unsafe version of {@link #font_bbox}. */ - public static FT_BBox nfont_bbox(long struct) { return FT_BBox.create(struct + CID_FaceInfo.FONT_BBOX); } - /** Unsafe version of {@link #uid_base}. */ - public static long nuid_base(long struct) { return memGetCLong(struct + CID_FaceInfo.UID_BASE); } - /** Unsafe version of {@link #num_xuid}. */ - public static int nnum_xuid(long struct) { return UNSAFE.getInt(null, struct + CID_FaceInfo.NUM_XUID); } - /** Unsafe version of {@link #xuid}. */ - public static CLongBuffer nxuid(long struct) { return memCLongBuffer(struct + CID_FaceInfo.XUID, 16); } - /** Unsafe version of {@link #xuid(int) xuid}. */ - public static long nxuid(long struct, int index) { - return memGetCLong(struct + CID_FaceInfo.XUID + check(index, 16) * CLONG_SIZE); - } - /** Unsafe version of {@link #cidmap_offset}. */ - public static long ncidmap_offset(long struct) { return memGetCLong(struct + CID_FaceInfo.CIDMAP_OFFSET); } - /** Unsafe version of {@link #fd_bytes}. */ - public static int nfd_bytes(long struct) { return UNSAFE.getInt(null, struct + CID_FaceInfo.FD_BYTES); } - /** Unsafe version of {@link #gd_bytes}. */ - public static int ngd_bytes(long struct) { return UNSAFE.getInt(null, struct + CID_FaceInfo.GD_BYTES); } - /** Unsafe version of {@link #cid_count}. */ - public static long ncid_count(long struct) { return memGetCLong(struct + CID_FaceInfo.CID_COUNT); } - /** Unsafe version of {@link #num_dicts}. */ - public static int nnum_dicts(long struct) { return UNSAFE.getInt(null, struct + CID_FaceInfo.NUM_DICTS); } - /** Unsafe version of {@link #font_dicts}. */ - public static CID_FaceDict nfont_dicts(long struct) { return CID_FaceDict.create(memGetAddress(struct + CID_FaceInfo.FONT_DICTS)); } - /** Unsafe version of {@link #data_offset}. */ - public static long ndata_offset(long struct) { return memGetCLong(struct + CID_FaceInfo.DATA_OFFSET); } - - // ----------------------------------- - - /** An array of {@link CID_FaceInfo} structs. */ - public static class Buffer extends StructBuffer { - - private static final CID_FaceInfo ELEMENT_FACTORY = CID_FaceInfo.create(-1L); - - /** - * Creates a new {@code CID_FaceInfo.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link CID_FaceInfo#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected CID_FaceInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code cid_font_name} field. */ - @NativeType("FT_String *") - public ByteBuffer cid_font_name() { return CID_FaceInfo.ncid_font_name(address()); } - /** @return the null-terminated string pointed to by the {@code cid_font_name} field. */ - @NativeType("FT_String *") - public String cid_font_nameString() { return CID_FaceInfo.ncid_font_nameString(address()); } - /** @return the value of the {@code cid_version} field. */ - @NativeType("FT_Fixed") - public long cid_version() { return CID_FaceInfo.ncid_version(address()); } - /** @return the value of the {@code cid_font_type} field. */ - @NativeType("FT_Int") - public int cid_font_type() { return CID_FaceInfo.ncid_font_type(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code registry} field. */ - @NativeType("FT_String *") - public ByteBuffer registry() { return CID_FaceInfo.nregistry(address()); } - /** @return the null-terminated string pointed to by the {@code registry} field. */ - @NativeType("FT_String *") - public String registryString() { return CID_FaceInfo.nregistryString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code ordering} field. */ - @NativeType("FT_String *") - public ByteBuffer ordering() { return CID_FaceInfo.nordering(address()); } - /** @return the null-terminated string pointed to by the {@code ordering} field. */ - @NativeType("FT_String *") - public String orderingString() { return CID_FaceInfo.norderingString(address()); } - /** @return the value of the {@code supplement} field. */ - @NativeType("FT_Int") - public int supplement() { return CID_FaceInfo.nsupplement(address()); } - /** @return a {@link PS_FontInfo} view of the {@code font_info} field. */ - @NativeType("PS_FontInfoRec") - public PS_FontInfo font_info() { return CID_FaceInfo.nfont_info(address()); } - /** @return a {@link FT_BBox} view of the {@code font_bbox} field. */ - public FT_BBox font_bbox() { return CID_FaceInfo.nfont_bbox(address()); } - /** @return the value of the {@code uid_base} field. */ - @NativeType("FT_ULong") - public long uid_base() { return CID_FaceInfo.nuid_base(address()); } - /** @return the value of the {@code num_xuid} field. */ - @NativeType("FT_Int") - public int num_xuid() { return CID_FaceInfo.nnum_xuid(address()); } - /** @return a {@link CLongBuffer} view of the {@code xuid} field. */ - @NativeType("FT_ULong[16]") - public CLongBuffer xuid() { return CID_FaceInfo.nxuid(address()); } - /** @return the value at the specified index of the {@code xuid} field. */ - @NativeType("FT_ULong") - public long xuid(int index) { return CID_FaceInfo.nxuid(address(), index); } - /** @return the value of the {@code cidmap_offset} field. */ - @NativeType("FT_ULong") - public long cidmap_offset() { return CID_FaceInfo.ncidmap_offset(address()); } - /** @return the value of the {@code fd_bytes} field. */ - @NativeType("FT_UInt") - public int fd_bytes() { return CID_FaceInfo.nfd_bytes(address()); } - /** @return the value of the {@code gd_bytes} field. */ - @NativeType("FT_UInt") - public int gd_bytes() { return CID_FaceInfo.ngd_bytes(address()); } - /** @return the value of the {@code cid_count} field. */ - @NativeType("FT_ULong") - public long cid_count() { return CID_FaceInfo.ncid_count(address()); } - /** @return the value of the {@code num_dicts} field. */ - @NativeType("FT_UInt") - public int num_dicts() { return CID_FaceInfo.nnum_dicts(address()); } - /** @return a {@link CID_FaceDict} view of the struct pointed to by the {@code font_dicts} field. */ - public CID_FaceDict font_dicts() { return CID_FaceInfo.nfont_dicts(address()); } - /** @return the value of the {@code data_offset} field. */ - @NativeType("FT_ULong") - public long data_offset() { return CID_FaceInfo.ndata_offset(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Face_Requester.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Face_Requester.java deleted file mode 100644 index 4c0c968f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Face_Requester.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FTC_FaceID face_id,
    - *     FT_Library library,
    - *     FT_Pointer req_data,
    - *     FT_Face *aface
    - * )
    - */ -public abstract class FTC_Face_Requester extends Callback implements FTC_Face_RequesterI { - - /** - * Creates a {@code FTC_Face_Requester} instance from the specified function pointer. - * - * @return the new {@code FTC_Face_Requester} - */ - public static FTC_Face_Requester create(long functionPointer) { - FTC_Face_RequesterI instance = Callback.get(functionPointer); - return instance instanceof FTC_Face_Requester - ? (FTC_Face_Requester)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FTC_Face_Requester createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FTC_Face_Requester} instance that delegates to the specified {@code FTC_Face_RequesterI} instance. */ - public static FTC_Face_Requester create(FTC_Face_RequesterI instance) { - return instance instanceof FTC_Face_Requester - ? (FTC_Face_Requester)instance - : new Container(instance.address(), instance); - } - - protected FTC_Face_Requester() { - super(CIF); - } - - FTC_Face_Requester(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FTC_Face_Requester { - - private final FTC_Face_RequesterI delegate; - - Container(long functionPointer, FTC_Face_RequesterI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long face_id, long library, long req_data, long aface) { - return delegate.invoke(face_id, library, req_data, aface); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Face_RequesterI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Face_RequesterI.java deleted file mode 100644 index 2176716c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Face_RequesterI.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FTC_FaceID face_id,
    - *     FT_Library library,
    - *     FT_Pointer req_data,
    - *     FT_Face *aface
    - * )
    - */ -@FunctionalInterface -@NativeType("FTC_Face_Requester") -public interface FTC_Face_RequesterI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * A callback function provided by client applications. It is used by the cache manager to translate a given FTC _FaceID into a new valid {@code FT_Face} - * object, on demand. - */ - @NativeType("FT_Error") int invoke(@NativeType("FTC_FaceID") long face_id, @NativeType("FT_Library") long library, @NativeType("FT_Pointer") long req_data, @NativeType("FT_Face *") long aface); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_ImageType.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_ImageType.java deleted file mode 100644 index 64156f10..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_ImageType.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to model the type of images in a glyph cache. - * - *

    Layout

    - * - *
    
    - * struct FTC_ImageTypeRec {
    - *     FTC_FaceID face_id;
    - *     FT_UInt width;
    - *     FT_UInt height;
    - *     FT_Int32 flags;
    - * }
    - */ -@NativeType("struct FTC_ImageTypeRec") -public class FTC_ImageType extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FACE_ID, - WIDTH, - HEIGHT, - FLAGS; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FACE_ID = layout.offsetof(0); - WIDTH = layout.offsetof(1); - HEIGHT = layout.offsetof(2); - FLAGS = layout.offsetof(3); - } - - protected FTC_ImageType(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FTC_ImageType create(long address, @Nullable ByteBuffer container) { - return new FTC_ImageType(address, container); - } - - /** - * Creates a {@code FTC_ImageType} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FTC_ImageType(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code face_id} field. */ - @NativeType("FTC_FaceID") - public long face_id() { return nface_id(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("FT_UInt") - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_UInt") - public int height() { return nheight(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("FT_Int32") - public int flags() { return nflags(address()); } - - // ----------------------------------- - - /** Returns a new {@code FTC_ImageType} instance for the specified memory address. */ - public static FTC_ImageType create(long address) { - return new FTC_ImageType(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FTC_ImageType createSafe(long address) { - return address == NULL ? null : new FTC_ImageType(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #face_id}. */ - public static long nface_id(long struct) { return memGetAddress(struct + FTC_ImageType.FACE_ID); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + FTC_ImageType.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + FTC_ImageType.HEIGHT); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + FTC_ImageType.FLAGS); } - - // ----------------------------------- - - /** An array of {@link FTC_ImageType} structs. */ - public static class Buffer extends StructBuffer { - - private static final FTC_ImageType ELEMENT_FACTORY = FTC_ImageType.create(-1L); - - /** - * Creates a new {@code FTC_ImageType.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FTC_ImageType#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FTC_ImageType getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code face_id} field. */ - @NativeType("FTC_FaceID") - public long face_id() { return FTC_ImageType.nface_id(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("FT_UInt") - public int width() { return FTC_ImageType.nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_UInt") - public int height() { return FTC_ImageType.nheight(address()); } - /** @return the value of the {@code flags} field. */ - @NativeType("FT_Int32") - public int flags() { return FTC_ImageType.nflags(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_SBit.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_SBit.java deleted file mode 100644 index d8b32a49..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_SBit.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A very compact structure used to describe a small glyph bitmap. - * - *

    Layout

    - * - *
    
    - * struct FTC_SBitRec {
    - *     FT_Byte width;
    - *     FT_Byte height;
    - *     FT_Char left;
    - *     FT_Char top;
    - *     FT_Byte format;
    - *     FT_Byte max_grays;
    - *     FT_Short pitch;
    - *     FT_Char xadvance;
    - *     FT_Char yadvance;
    - *     FT_Byte * buffer;
    - * }
    - */ -@NativeType("struct FTC_SBitRec") -public class FTC_SBit extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT, - LEFT, - TOP, - FORMAT, - MAX_GRAYS, - PITCH, - XADVANCE, - YADVANCE, - BUFFER; - - static { - Layout layout = __struct( - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(1), - __member(2), - __member(1), - __member(1), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - LEFT = layout.offsetof(2); - TOP = layout.offsetof(3); - FORMAT = layout.offsetof(4); - MAX_GRAYS = layout.offsetof(5); - PITCH = layout.offsetof(6); - XADVANCE = layout.offsetof(7); - YADVANCE = layout.offsetof(8); - BUFFER = layout.offsetof(9); - } - - protected FTC_SBit(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FTC_SBit create(long address, @Nullable ByteBuffer container) { - return new FTC_SBit(address, container); - } - - /** - * Creates a {@code FTC_SBit} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FTC_SBit(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code width} field. */ - @NativeType("FT_Byte") - public byte width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_Byte") - public byte height() { return nheight(address()); } - /** @return the value of the {@code left} field. */ - @NativeType("FT_Char") - public byte left() { return nleft(address()); } - /** @return the value of the {@code top} field. */ - @NativeType("FT_Char") - public byte top() { return ntop(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("FT_Byte") - public byte format() { return nformat(address()); } - /** @return the value of the {@code max_grays} field. */ - @NativeType("FT_Byte") - public byte max_grays() { return nmax_grays(address()); } - /** @return the value of the {@code pitch} field. */ - @NativeType("FT_Short") - public short pitch() { return npitch(address()); } - /** @return the value of the {@code xadvance} field. */ - @NativeType("FT_Char") - public byte xadvance() { return nxadvance(address()); } - /** @return the value of the {@code yadvance} field. */ - @NativeType("FT_Char") - public byte yadvance() { return nyadvance(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code buffer} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("FT_Byte *") - public ByteBuffer buffer(int capacity) { return nbuffer(address(), capacity); } - - // ----------------------------------- - - /** Returns a new {@code FTC_SBit} instance for the specified memory address. */ - public static FTC_SBit create(long address) { - return new FTC_SBit(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FTC_SBit createSafe(long address) { - return address == NULL ? null : new FTC_SBit(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static byte nwidth(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static byte nheight(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.HEIGHT); } - /** Unsafe version of {@link #left}. */ - public static byte nleft(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.LEFT); } - /** Unsafe version of {@link #top}. */ - public static byte ntop(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.TOP); } - /** Unsafe version of {@link #format}. */ - public static byte nformat(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.FORMAT); } - /** Unsafe version of {@link #max_grays}. */ - public static byte nmax_grays(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.MAX_GRAYS); } - /** Unsafe version of {@link #pitch}. */ - public static short npitch(long struct) { return UNSAFE.getShort(null, struct + FTC_SBit.PITCH); } - /** Unsafe version of {@link #xadvance}. */ - public static byte nxadvance(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.XADVANCE); } - /** Unsafe version of {@link #yadvance}. */ - public static byte nyadvance(long struct) { return UNSAFE.getByte(null, struct + FTC_SBit.YADVANCE); } - /** Unsafe version of {@link #buffer(int) buffer}. */ - public static ByteBuffer nbuffer(long struct, int capacity) { return memByteBuffer(memGetAddress(struct + FTC_SBit.BUFFER), capacity); } - - // ----------------------------------- - - /** An array of {@link FTC_SBit} structs. */ - public static class Buffer extends StructBuffer { - - private static final FTC_SBit ELEMENT_FACTORY = FTC_SBit.create(-1L); - - /** - * Creates a new {@code FTC_SBit.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FTC_SBit#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FTC_SBit getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code width} field. */ - @NativeType("FT_Byte") - public byte width() { return FTC_SBit.nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_Byte") - public byte height() { return FTC_SBit.nheight(address()); } - /** @return the value of the {@code left} field. */ - @NativeType("FT_Char") - public byte left() { return FTC_SBit.nleft(address()); } - /** @return the value of the {@code top} field. */ - @NativeType("FT_Char") - public byte top() { return FTC_SBit.ntop(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("FT_Byte") - public byte format() { return FTC_SBit.nformat(address()); } - /** @return the value of the {@code max_grays} field. */ - @NativeType("FT_Byte") - public byte max_grays() { return FTC_SBit.nmax_grays(address()); } - /** @return the value of the {@code pitch} field. */ - @NativeType("FT_Short") - public short pitch() { return FTC_SBit.npitch(address()); } - /** @return the value of the {@code xadvance} field. */ - @NativeType("FT_Char") - public byte xadvance() { return FTC_SBit.nxadvance(address()); } - /** @return the value of the {@code yadvance} field. */ - @NativeType("FT_Char") - public byte yadvance() { return FTC_SBit.nyadvance(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code buffer} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("FT_Byte *") - public ByteBuffer buffer(int capacity) { return FTC_SBit.nbuffer(address(), capacity); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Scaler.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Scaler.java deleted file mode 100644 index 563f5dd3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FTC_Scaler.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to describe a given character size in either pixels or points to the cache manager. See {@link FreeType#FTC_Manager_LookupSize}. - * - *

    Layout

    - * - *
    
    - * struct FTC_ScalerRec {
    - *     FTC_FaceID face_id;
    - *     FT_UInt width;
    - *     FT_UInt height;
    - *     FT_Int pixel;
    - *     FT_UInt x_res;
    - *     FT_UInt y_res;
    - * }
    - */ -@NativeType("struct FTC_ScalerRec") -public class FTC_Scaler extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FACE_ID, - WIDTH, - HEIGHT, - PIXEL, - X_RES, - Y_RES; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(4), - __member(4), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FACE_ID = layout.offsetof(0); - WIDTH = layout.offsetof(1); - HEIGHT = layout.offsetof(2); - PIXEL = layout.offsetof(3); - X_RES = layout.offsetof(4); - Y_RES = layout.offsetof(5); - } - - protected FTC_Scaler(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FTC_Scaler create(long address, @Nullable ByteBuffer container) { - return new FTC_Scaler(address, container); - } - - /** - * Creates a {@code FTC_Scaler} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FTC_Scaler(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code face_id} field. */ - @NativeType("FTC_FaceID") - public long face_id() { return nface_id(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("FT_UInt") - public int width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_UInt") - public int height() { return nheight(address()); } - /** @return the value of the {@code pixel} field. */ - @NativeType("FT_Int") - public int pixel() { return npixel(address()); } - /** @return the value of the {@code x_res} field. */ - @NativeType("FT_UInt") - public int x_res() { return nx_res(address()); } - /** @return the value of the {@code y_res} field. */ - @NativeType("FT_UInt") - public int y_res() { return ny_res(address()); } - - // ----------------------------------- - - /** Returns a new {@code FTC_Scaler} instance for the specified memory address. */ - public static FTC_Scaler create(long address) { - return new FTC_Scaler(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FTC_Scaler createSafe(long address) { - return address == NULL ? null : new FTC_Scaler(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #face_id}. */ - public static long nface_id(long struct) { return memGetAddress(struct + FTC_Scaler.FACE_ID); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + FTC_Scaler.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static int nheight(long struct) { return UNSAFE.getInt(null, struct + FTC_Scaler.HEIGHT); } - /** Unsafe version of {@link #pixel}. */ - public static int npixel(long struct) { return UNSAFE.getInt(null, struct + FTC_Scaler.PIXEL); } - /** Unsafe version of {@link #x_res}. */ - public static int nx_res(long struct) { return UNSAFE.getInt(null, struct + FTC_Scaler.X_RES); } - /** Unsafe version of {@link #y_res}. */ - public static int ny_res(long struct) { return UNSAFE.getInt(null, struct + FTC_Scaler.Y_RES); } - - // ----------------------------------- - - /** An array of {@link FTC_Scaler} structs. */ - public static class Buffer extends StructBuffer { - - private static final FTC_Scaler ELEMENT_FACTORY = FTC_Scaler.create(-1L); - - /** - * Creates a new {@code FTC_Scaler.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FTC_Scaler#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FTC_Scaler getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code face_id} field. */ - @NativeType("FTC_FaceID") - public long face_id() { return FTC_Scaler.nface_id(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("FT_UInt") - public int width() { return FTC_Scaler.nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_UInt") - public int height() { return FTC_Scaler.nheight(address()); } - /** @return the value of the {@code pixel} field. */ - @NativeType("FT_Int") - public int pixel() { return FTC_Scaler.npixel(address()); } - /** @return the value of the {@code x_res} field. */ - @NativeType("FT_UInt") - public int x_res() { return FTC_Scaler.nx_res(address()); } - /** @return the value of the {@code y_res} field. */ - @NativeType("FT_UInt") - public int y_res() { return FTC_Scaler.ny_res(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Affine23.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Affine23.java deleted file mode 100644 index fdf9fdd4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Affine23.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to store a 2x3 matrix. Coefficients are in 16.16 fixed-point format. - * - *

    Layout

    - * - *
    
    - * struct FT_Affine23 {
    - *     FT_Fixed xx;
    - *     FT_Fixed xy;
    - *     FT_Fixed dx;
    - *     FT_Fixed yx;
    - *     FT_Fixed yy;
    - *     FT_Fixed dy;
    - * }
    - */ -public class FT_Affine23 extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - XX, - XY, - DX, - YX, - YY, - DY; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - XX = layout.offsetof(0); - XY = layout.offsetof(1); - DX = layout.offsetof(2); - YX = layout.offsetof(3); - YY = layout.offsetof(4); - DY = layout.offsetof(5); - } - - protected FT_Affine23(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Affine23 create(long address, @Nullable ByteBuffer container) { - return new FT_Affine23(address, container); - } - - /** - * Creates a {@code FT_Affine23} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Affine23(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code xx} field. */ - @NativeType("FT_Fixed") - public long xx() { return nxx(address()); } - /** @return the value of the {@code xy} field. */ - @NativeType("FT_Fixed") - public long xy() { return nxy(address()); } - /** @return the value of the {@code dx} field. */ - @NativeType("FT_Fixed") - public long dx() { return ndx(address()); } - /** @return the value of the {@code yx} field. */ - @NativeType("FT_Fixed") - public long yx() { return nyx(address()); } - /** @return the value of the {@code yy} field. */ - @NativeType("FT_Fixed") - public long yy() { return nyy(address()); } - /** @return the value of the {@code dy} field. */ - @NativeType("FT_Fixed") - public long dy() { return ndy(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Affine23} instance for the specified memory address. */ - public static FT_Affine23 create(long address) { - return new FT_Affine23(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Affine23 createSafe(long address) { - return address == NULL ? null : new FT_Affine23(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #xx}. */ - public static long nxx(long struct) { return memGetCLong(struct + FT_Affine23.XX); } - /** Unsafe version of {@link #xy}. */ - public static long nxy(long struct) { return memGetCLong(struct + FT_Affine23.XY); } - /** Unsafe version of {@link #dx}. */ - public static long ndx(long struct) { return memGetCLong(struct + FT_Affine23.DX); } - /** Unsafe version of {@link #yx}. */ - public static long nyx(long struct) { return memGetCLong(struct + FT_Affine23.YX); } - /** Unsafe version of {@link #yy}. */ - public static long nyy(long struct) { return memGetCLong(struct + FT_Affine23.YY); } - /** Unsafe version of {@link #dy}. */ - public static long ndy(long struct) { return memGetCLong(struct + FT_Affine23.DY); } - - // ----------------------------------- - - /** An array of {@link FT_Affine23} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Affine23 ELEMENT_FACTORY = FT_Affine23.create(-1L); - - /** - * Creates a new {@code FT_Affine23.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Affine23#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Affine23 getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code xx} field. */ - @NativeType("FT_Fixed") - public long xx() { return FT_Affine23.nxx(address()); } - /** @return the value of the {@code xy} field. */ - @NativeType("FT_Fixed") - public long xy() { return FT_Affine23.nxy(address()); } - /** @return the value of the {@code dx} field. */ - @NativeType("FT_Fixed") - public long dx() { return FT_Affine23.ndx(address()); } - /** @return the value of the {@code yx} field. */ - @NativeType("FT_Fixed") - public long yx() { return FT_Affine23.nyx(address()); } - /** @return the value of the {@code yy} field. */ - @NativeType("FT_Fixed") - public long yy() { return FT_Affine23.nyy(address()); } - /** @return the value of the {@code dy} field. */ - @NativeType("FT_Fixed") - public long dy() { return FT_Affine23.ndy(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Alloc_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Alloc_Func.java deleted file mode 100644 index c712461b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Alloc_Func.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     long size
    - * )
    - */ -public abstract class FT_Alloc_Func extends Callback implements FT_Alloc_FuncI { - - /** - * Creates a {@code FT_Alloc_Func} instance from the specified function pointer. - * - * @return the new {@code FT_Alloc_Func} - */ - public static FT_Alloc_Func create(long functionPointer) { - FT_Alloc_FuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Alloc_Func - ? (FT_Alloc_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Alloc_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Alloc_Func} instance that delegates to the specified {@code FT_Alloc_FuncI} instance. */ - public static FT_Alloc_Func create(FT_Alloc_FuncI instance) { - return instance instanceof FT_Alloc_Func - ? (FT_Alloc_Func)instance - : new Container(instance.address(), instance); - } - - protected FT_Alloc_Func() { - super(CIF); - } - - FT_Alloc_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Alloc_Func { - - private final FT_Alloc_FuncI delegate; - - Container(long functionPointer, FT_Alloc_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long memory, long size) { - return delegate.invoke(memory, size); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Alloc_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Alloc_FuncI.java deleted file mode 100644 index e5dea4c4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Alloc_FuncI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     long size
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Alloc_Func") -public interface FT_Alloc_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_slong - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetCLong(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** A function used to allocate {@code size} bytes from {@code memory}. */ - @NativeType("void *") long invoke(@NativeType("FT_Memory") long memory, long size); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_BBox.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_BBox.java deleted file mode 100644 index 138ccff7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_BBox.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions. - * - *

    Layout

    - * - *
    
    - * struct FT_BBox {
    - *     FT_Pos xMin;
    - *     FT_Pos yMin;
    - *     FT_Pos xMax;
    - *     FT_Pos yMax;
    - * }
    - */ -public class FT_BBox extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - XMIN, - YMIN, - XMAX, - YMAX; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - XMIN = layout.offsetof(0); - YMIN = layout.offsetof(1); - XMAX = layout.offsetof(2); - YMAX = layout.offsetof(3); - } - - protected FT_BBox(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_BBox create(long address, @Nullable ByteBuffer container) { - return new FT_BBox(address, container); - } - - /** - * Creates a {@code FT_BBox} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_BBox(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code xMin} field. */ - @NativeType("FT_Pos") - public long xMin() { return nxMin(address()); } - /** @return the value of the {@code yMin} field. */ - @NativeType("FT_Pos") - public long yMin() { return nyMin(address()); } - /** @return the value of the {@code xMax} field. */ - @NativeType("FT_Pos") - public long xMax() { return nxMax(address()); } - /** @return the value of the {@code yMax} field. */ - @NativeType("FT_Pos") - public long yMax() { return nyMax(address()); } - - /** Sets the specified value to the {@code xMin} field. */ - public FT_BBox xMin(@NativeType("FT_Pos") long value) { nxMin(address(), value); return this; } - /** Sets the specified value to the {@code yMin} field. */ - public FT_BBox yMin(@NativeType("FT_Pos") long value) { nyMin(address(), value); return this; } - /** Sets the specified value to the {@code xMax} field. */ - public FT_BBox xMax(@NativeType("FT_Pos") long value) { nxMax(address(), value); return this; } - /** Sets the specified value to the {@code yMax} field. */ - public FT_BBox yMax(@NativeType("FT_Pos") long value) { nyMax(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_BBox set( - long xMin, - long yMin, - long xMax, - long yMax - ) { - xMin(xMin); - yMin(yMin); - xMax(xMax); - yMax(yMax); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_BBox set(FT_BBox src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_BBox} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_BBox malloc() { - return new FT_BBox(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_BBox} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_BBox calloc() { - return new FT_BBox(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_BBox} instance allocated with {@link BufferUtils}. */ - public static FT_BBox create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_BBox(memAddress(container), container); - } - - /** Returns a new {@code FT_BBox} instance for the specified memory address. */ - public static FT_BBox create(long address) { - return new FT_BBox(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_BBox createSafe(long address) { - return address == NULL ? null : new FT_BBox(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_BBox} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_BBox malloc(MemoryStack stack) { - return new FT_BBox(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_BBox} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_BBox calloc(MemoryStack stack) { - return new FT_BBox(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #xMin}. */ - public static long nxMin(long struct) { return memGetCLong(struct + FT_BBox.XMIN); } - /** Unsafe version of {@link #yMin}. */ - public static long nyMin(long struct) { return memGetCLong(struct + FT_BBox.YMIN); } - /** Unsafe version of {@link #xMax}. */ - public static long nxMax(long struct) { return memGetCLong(struct + FT_BBox.XMAX); } - /** Unsafe version of {@link #yMax}. */ - public static long nyMax(long struct) { return memGetCLong(struct + FT_BBox.YMAX); } - - /** Unsafe version of {@link #xMin(long) xMin}. */ - public static void nxMin(long struct, long value) { memPutCLong(struct + FT_BBox.XMIN, value); } - /** Unsafe version of {@link #yMin(long) yMin}. */ - public static void nyMin(long struct, long value) { memPutCLong(struct + FT_BBox.YMIN, value); } - /** Unsafe version of {@link #xMax(long) xMax}. */ - public static void nxMax(long struct, long value) { memPutCLong(struct + FT_BBox.XMAX, value); } - /** Unsafe version of {@link #yMax(long) yMax}. */ - public static void nyMax(long struct, long value) { memPutCLong(struct + FT_BBox.YMAX, value); } - - // ----------------------------------- - - /** An array of {@link FT_BBox} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_BBox ELEMENT_FACTORY = FT_BBox.create(-1L); - - /** - * Creates a new {@code FT_BBox.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_BBox#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_BBox getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code xMin} field. */ - @NativeType("FT_Pos") - public long xMin() { return FT_BBox.nxMin(address()); } - /** @return the value of the {@code yMin} field. */ - @NativeType("FT_Pos") - public long yMin() { return FT_BBox.nyMin(address()); } - /** @return the value of the {@code xMax} field. */ - @NativeType("FT_Pos") - public long xMax() { return FT_BBox.nxMax(address()); } - /** @return the value of the {@code yMax} field. */ - @NativeType("FT_Pos") - public long yMax() { return FT_BBox.nyMax(address()); } - - /** Sets the specified value to the {@code xMin} field. */ - public Buffer xMin(@NativeType("FT_Pos") long value) { FT_BBox.nxMin(address(), value); return this; } - /** Sets the specified value to the {@code yMin} field. */ - public Buffer yMin(@NativeType("FT_Pos") long value) { FT_BBox.nyMin(address(), value); return this; } - /** Sets the specified value to the {@code xMax} field. */ - public Buffer xMax(@NativeType("FT_Pos") long value) { FT_BBox.nxMax(address(), value); return this; } - /** Sets the specified value to the {@code yMax} field. */ - public Buffer yMax(@NativeType("FT_Pos") long value) { FT_BBox.nyMax(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Bitmap.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Bitmap.java deleted file mode 100644 index 0f0c365c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Bitmap.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the {@code pixel_mode} field. - * - *

    Layout

    - * - *
    
    - * struct FT_Bitmap {
    - *     unsigned int rows;
    - *     unsigned int width;
    - *     int pitch;
    - *     unsigned char * buffer;
    - *     unsigned short num_grays;
    - *     unsigned char pixel_mode;
    - *     unsigned char palette_mode;
    - *     void * palette;
    - * }
    - */ -public class FT_Bitmap extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ROWS, - WIDTH, - PITCH, - BUFFER, - NUM_GRAYS, - PIXEL_MODE, - PALETTE_MODE, - PALETTE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(2), - __member(1), - __member(1), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ROWS = layout.offsetof(0); - WIDTH = layout.offsetof(1); - PITCH = layout.offsetof(2); - BUFFER = layout.offsetof(3); - NUM_GRAYS = layout.offsetof(4); - PIXEL_MODE = layout.offsetof(5); - PALETTE_MODE = layout.offsetof(6); - PALETTE = layout.offsetof(7); - } - - protected FT_Bitmap(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Bitmap create(long address, @Nullable ByteBuffer container) { - return new FT_Bitmap(address, container); - } - - /** - * Creates a {@code FT_Bitmap} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Bitmap(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code rows} field. */ - @NativeType("unsigned int") - public int rows() { return nrows(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("unsigned int") - public int width() { return nwidth(address()); } - /** @return the value of the {@code pitch} field. */ - public int pitch() { return npitch(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code buffer} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("unsigned char *") - public ByteBuffer buffer(int capacity) { return nbuffer(address(), capacity); } - /** @return the value of the {@code num_grays} field. */ - @NativeType("unsigned short") - public short num_grays() { return nnum_grays(address()); } - /** @return the value of the {@code pixel_mode} field. */ - @NativeType("unsigned char") - public byte pixel_mode() { return npixel_mode(address()); } - /** @return the value of the {@code palette_mode} field. */ - @NativeType("unsigned char") - public byte palette_mode() { return npalette_mode(address()); } - /** @return the value of the {@code palette} field. */ - @NativeType("void *") - public long palette() { return npalette(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Bitmap} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Bitmap malloc() { - return new FT_Bitmap(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Bitmap} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Bitmap calloc() { - return new FT_Bitmap(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Bitmap} instance allocated with {@link BufferUtils}. */ - public static FT_Bitmap create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Bitmap(memAddress(container), container); - } - - /** Returns a new {@code FT_Bitmap} instance for the specified memory address. */ - public static FT_Bitmap create(long address) { - return new FT_Bitmap(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Bitmap createSafe(long address) { - return address == NULL ? null : new FT_Bitmap(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Bitmap} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Bitmap malloc(MemoryStack stack) { - return new FT_Bitmap(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Bitmap} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Bitmap calloc(MemoryStack stack) { - return new FT_Bitmap(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #rows}. */ - public static int nrows(long struct) { return UNSAFE.getInt(null, struct + FT_Bitmap.ROWS); } - /** Unsafe version of {@link #width}. */ - public static int nwidth(long struct) { return UNSAFE.getInt(null, struct + FT_Bitmap.WIDTH); } - /** Unsafe version of {@link #pitch}. */ - public static int npitch(long struct) { return UNSAFE.getInt(null, struct + FT_Bitmap.PITCH); } - /** Unsafe version of {@link #buffer(int) buffer}. */ - @Nullable public static ByteBuffer nbuffer(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_Bitmap.BUFFER), capacity); } - /** Unsafe version of {@link #num_grays}. */ - public static short nnum_grays(long struct) { return UNSAFE.getShort(null, struct + FT_Bitmap.NUM_GRAYS); } - /** Unsafe version of {@link #pixel_mode}. */ - public static byte npixel_mode(long struct) { return UNSAFE.getByte(null, struct + FT_Bitmap.PIXEL_MODE); } - /** Unsafe version of {@link #palette_mode}. */ - public static byte npalette_mode(long struct) { return UNSAFE.getByte(null, struct + FT_Bitmap.PALETTE_MODE); } - /** Unsafe version of {@link #palette}. */ - public static long npalette(long struct) { return memGetAddress(struct + FT_Bitmap.PALETTE); } - - // ----------------------------------- - - /** An array of {@link FT_Bitmap} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Bitmap ELEMENT_FACTORY = FT_Bitmap.create(-1L); - - /** - * Creates a new {@code FT_Bitmap.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Bitmap#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Bitmap getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code rows} field. */ - @NativeType("unsigned int") - public int rows() { return FT_Bitmap.nrows(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("unsigned int") - public int width() { return FT_Bitmap.nwidth(address()); } - /** @return the value of the {@code pitch} field. */ - public int pitch() { return FT_Bitmap.npitch(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code buffer} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("unsigned char *") - public ByteBuffer buffer(int capacity) { return FT_Bitmap.nbuffer(address(), capacity); } - /** @return the value of the {@code num_grays} field. */ - @NativeType("unsigned short") - public short num_grays() { return FT_Bitmap.nnum_grays(address()); } - /** @return the value of the {@code pixel_mode} field. */ - @NativeType("unsigned char") - public byte pixel_mode() { return FT_Bitmap.npixel_mode(address()); } - /** @return the value of the {@code palette_mode} field. */ - @NativeType("unsigned char") - public byte palette_mode() { return FT_Bitmap.npalette_mode(address()); } - /** @return the value of the {@code palette} field. */ - @NativeType("void *") - public long palette() { return FT_Bitmap.npalette(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_BitmapGlyph.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_BitmapGlyph.java deleted file mode 100644 index 0fc8efe5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_BitmapGlyph.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used for bitmap glyph images. This really is a 'sub-class' of {@link FT_Glyph}. - * - *

    Layout

    - * - *
    
    - * struct FT_BitmapGlyphRec {
    - *     {@link FT_Glyph FT_GlyphRec} root;
    - *     FT_Int left;
    - *     FT_Int top;
    - *     {@link FT_Bitmap FT_Bitmap} bitmap;
    - * }
    - */ -@NativeType("struct FT_BitmapGlyphRec") -public class FT_BitmapGlyph extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ROOT, - LEFT, - TOP, - BITMAP; - - static { - Layout layout = __struct( - __member(FT_Glyph.SIZEOF, FT_Glyph.ALIGNOF), - __member(4), - __member(4), - __member(FT_Bitmap.SIZEOF, FT_Bitmap.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ROOT = layout.offsetof(0); - LEFT = layout.offsetof(1); - TOP = layout.offsetof(2); - BITMAP = layout.offsetof(3); - } - - protected FT_BitmapGlyph(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_BitmapGlyph create(long address, @Nullable ByteBuffer container) { - return new FT_BitmapGlyph(address, container); - } - - /** - * Creates a {@code FT_BitmapGlyph} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_BitmapGlyph(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Glyph} view of the {@code root} field. */ - @NativeType("FT_GlyphRec") - public FT_Glyph root() { return nroot(address()); } - /** @return the value of the {@code left} field. */ - @NativeType("FT_Int") - public int left() { return nleft(address()); } - /** @return the value of the {@code top} field. */ - @NativeType("FT_Int") - public int top() { return ntop(address()); } - /** @return a {@link FT_Bitmap} view of the {@code bitmap} field. */ - public FT_Bitmap bitmap() { return nbitmap(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_BitmapGlyph} instance for the specified memory address. */ - public static FT_BitmapGlyph create(long address) { - return new FT_BitmapGlyph(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_BitmapGlyph createSafe(long address) { - return address == NULL ? null : new FT_BitmapGlyph(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #root}. */ - public static FT_Glyph nroot(long struct) { return FT_Glyph.create(struct + FT_BitmapGlyph.ROOT); } - /** Unsafe version of {@link #left}. */ - public static int nleft(long struct) { return UNSAFE.getInt(null, struct + FT_BitmapGlyph.LEFT); } - /** Unsafe version of {@link #top}. */ - public static int ntop(long struct) { return UNSAFE.getInt(null, struct + FT_BitmapGlyph.TOP); } - /** Unsafe version of {@link #bitmap}. */ - public static FT_Bitmap nbitmap(long struct) { return FT_Bitmap.create(struct + FT_BitmapGlyph.BITMAP); } - - // ----------------------------------- - - /** An array of {@link FT_BitmapGlyph} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_BitmapGlyph ELEMENT_FACTORY = FT_BitmapGlyph.create(-1L); - - /** - * Creates a new {@code FT_BitmapGlyph.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_BitmapGlyph#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_BitmapGlyph getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Glyph} view of the {@code root} field. */ - @NativeType("FT_GlyphRec") - public FT_Glyph root() { return FT_BitmapGlyph.nroot(address()); } - /** @return the value of the {@code left} field. */ - @NativeType("FT_Int") - public int left() { return FT_BitmapGlyph.nleft(address()); } - /** @return the value of the {@code top} field. */ - @NativeType("FT_Int") - public int top() { return FT_BitmapGlyph.ntop(address()); } - /** @return a {@link FT_Bitmap} view of the {@code bitmap} field. */ - public FT_Bitmap bitmap() { return FT_BitmapGlyph.nbitmap(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Bitmap_Size.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Bitmap_Size.java deleted file mode 100644 index ca0a5f08..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Bitmap_Size.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * This structure models the metrics of a bitmap strike (i.e., a set of glyphs for a given point size and resolution) in a bitmap font. It - * is used for the {@code available_sizes} field of {@code FT_Face}. - * - *
    Note
    - * - *

    Windows FNT: The nominal size given in a FNT font is not reliable. If the driver finds it incorrect, it sets {@code size} to some calculated - * values, and {@code x_ppem} and {@code y_ppem} to the pixel width and height given in the font, respectively.

    - * - *
    Note
    - * - *

    TrueType embedded bitmaps: {@code size}, {@code width}, and {@code height} values are not contained in the bitmap strike itself. They are - * computed from the global font parameters.

    - * - *

    Layout

    - * - *
    
    - * struct FT_Bitmap_Size {
    - *     FT_Short {@link #height};
    - *     FT_Short {@link #width};
    - *     FT_Pos {@link #size};
    - *     FT_Pos {@link #x_ppem};
    - *     FT_Pos {@link #y_ppem};
    - * }
    - */ -public class FT_Bitmap_Size extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - HEIGHT, - WIDTH, - SIZE, - X_PPEM, - Y_PPEM; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - HEIGHT = layout.offsetof(0); - WIDTH = layout.offsetof(1); - SIZE = layout.offsetof(2); - X_PPEM = layout.offsetof(3); - Y_PPEM = layout.offsetof(4); - } - - protected FT_Bitmap_Size(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Bitmap_Size create(long address, @Nullable ByteBuffer container) { - return new FT_Bitmap_Size(address, container); - } - - /** - * Creates a {@code FT_Bitmap_Size} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Bitmap_Size(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the vertical distance, in pixels, between two consecutive baselines. It is always positive. */ - @NativeType("FT_Short") - public short height() { return nheight(address()); } - /** the average width, in pixels, of all glyphs in the strike */ - @NativeType("FT_Short") - public short width() { return nwidth(address()); } - /** the nominal size of the strike in 26.6 fractional points. This field is not very useful. */ - @NativeType("FT_Pos") - public long size() { return nsize(address()); } - /** the horizontal ppem (nominal width) in 26.6 fractional pixels */ - @NativeType("FT_Pos") - public long x_ppem() { return nx_ppem(address()); } - /** the vertical ppem (nominal height) in 26.6 fractional pixels */ - @NativeType("FT_Pos") - public long y_ppem() { return ny_ppem(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Bitmap_Size} instance for the specified memory address. */ - public static FT_Bitmap_Size create(long address) { - return new FT_Bitmap_Size(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Bitmap_Size createSafe(long address) { - return address == NULL ? null : new FT_Bitmap_Size(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #height}. */ - public static short nheight(long struct) { return UNSAFE.getShort(null, struct + FT_Bitmap_Size.HEIGHT); } - /** Unsafe version of {@link #width}. */ - public static short nwidth(long struct) { return UNSAFE.getShort(null, struct + FT_Bitmap_Size.WIDTH); } - /** Unsafe version of {@link #size}. */ - public static long nsize(long struct) { return memGetCLong(struct + FT_Bitmap_Size.SIZE); } - /** Unsafe version of {@link #x_ppem}. */ - public static long nx_ppem(long struct) { return memGetCLong(struct + FT_Bitmap_Size.X_PPEM); } - /** Unsafe version of {@link #y_ppem}. */ - public static long ny_ppem(long struct) { return memGetCLong(struct + FT_Bitmap_Size.Y_PPEM); } - - // ----------------------------------- - - /** An array of {@link FT_Bitmap_Size} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Bitmap_Size ELEMENT_FACTORY = FT_Bitmap_Size.create(-1L); - - /** - * Creates a new {@code FT_Bitmap_Size.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Bitmap_Size#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Bitmap_Size getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link FT_Bitmap_Size#height} field. */ - @NativeType("FT_Short") - public short height() { return FT_Bitmap_Size.nheight(address()); } - /** @return the value of the {@link FT_Bitmap_Size#width} field. */ - @NativeType("FT_Short") - public short width() { return FT_Bitmap_Size.nwidth(address()); } - /** @return the value of the {@link FT_Bitmap_Size#size} field. */ - @NativeType("FT_Pos") - public long size() { return FT_Bitmap_Size.nsize(address()); } - /** @return the value of the {@link FT_Bitmap_Size#x_ppem} field. */ - @NativeType("FT_Pos") - public long x_ppem() { return FT_Bitmap_Size.nx_ppem(address()); } - /** @return the value of the {@link FT_Bitmap_Size#y_ppem} field. */ - @NativeType("FT_Pos") - public long y_ppem() { return FT_Bitmap_Size.ny_ppem(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_COLR_Paint.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_COLR_Paint.java deleted file mode 100644 index 97fca11b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_COLR_Paint.java +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A union object representing format and details of a paint table of a {@code COLR} v1 font. - * - *

    Layout

    - * - *
    
    - * struct FT_COLR_Paint {
    - *     FT_PaintFormat format;
    - *     union {
    - *         {@link FT_PaintColrLayers FT_PaintColrLayers} colr_layers;
    - *         {@link FT_PaintGlyph FT_PaintGlyph} glyph;
    - *         {@link FT_PaintSolid FT_PaintSolid} solid;
    - *         {@link FT_PaintLinearGradient FT_PaintLinearGradient} linear_gradient;
    - *         {@link FT_PaintRadialGradient FT_PaintRadialGradient} radial_gradient;
    - *         {@link FT_PaintSweepGradient FT_PaintSweepGradient} sweep_gradient;
    - *         {@link FT_PaintTransform FT_PaintTransform} transform;
    - *         {@link FT_PaintTranslate FT_PaintTranslate} translate;
    - *         {@link FT_PaintScale FT_PaintScale} scale;
    - *         {@link FT_PaintRotate FT_PaintRotate} rotate;
    - *         {@link FT_PaintSkew FT_PaintSkew} skew;
    - *         {@link FT_PaintComposite FT_PaintComposite} composite;
    - *         {@link FT_PaintColrGlyph FT_PaintColrGlyph} colr_glyph;
    - *     } u;
    - * }
    - */ -public class FT_COLR_Paint extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FORMAT, - U, - U_COLR_LAYERS, - U_GLYPH, - U_SOLID, - U_LINEAR_GRADIENT, - U_RADIAL_GRADIENT, - U_SWEEP_GRADIENT, - U_TRANSFORM, - U_TRANSLATE, - U_SCALE, - U_ROTATE, - U_SKEW, - U_COMPOSITE, - U_COLR_GLYPH; - - static { - Layout layout = __struct( - __member(4), - __union( - __member(FT_PaintColrLayers.SIZEOF, FT_PaintColrLayers.ALIGNOF), - __member(FT_PaintGlyph.SIZEOF, FT_PaintGlyph.ALIGNOF), - __member(FT_PaintSolid.SIZEOF, FT_PaintSolid.ALIGNOF), - __member(FT_PaintLinearGradient.SIZEOF, FT_PaintLinearGradient.ALIGNOF), - __member(FT_PaintRadialGradient.SIZEOF, FT_PaintRadialGradient.ALIGNOF), - __member(FT_PaintSweepGradient.SIZEOF, FT_PaintSweepGradient.ALIGNOF), - __member(FT_PaintTransform.SIZEOF, FT_PaintTransform.ALIGNOF), - __member(FT_PaintTranslate.SIZEOF, FT_PaintTranslate.ALIGNOF), - __member(FT_PaintScale.SIZEOF, FT_PaintScale.ALIGNOF), - __member(FT_PaintRotate.SIZEOF, FT_PaintRotate.ALIGNOF), - __member(FT_PaintSkew.SIZEOF, FT_PaintSkew.ALIGNOF), - __member(FT_PaintComposite.SIZEOF, FT_PaintComposite.ALIGNOF), - __member(FT_PaintColrGlyph.SIZEOF, FT_PaintColrGlyph.ALIGNOF) - ) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FORMAT = layout.offsetof(0); - U = layout.offsetof(1); - U_COLR_LAYERS = layout.offsetof(2); - U_GLYPH = layout.offsetof(3); - U_SOLID = layout.offsetof(4); - U_LINEAR_GRADIENT = layout.offsetof(5); - U_RADIAL_GRADIENT = layout.offsetof(6); - U_SWEEP_GRADIENT = layout.offsetof(7); - U_TRANSFORM = layout.offsetof(8); - U_TRANSLATE = layout.offsetof(9); - U_SCALE = layout.offsetof(10); - U_ROTATE = layout.offsetof(11); - U_SKEW = layout.offsetof(12); - U_COMPOSITE = layout.offsetof(13); - U_COLR_GLYPH = layout.offsetof(14); - } - - protected FT_COLR_Paint(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_COLR_Paint create(long address, @Nullable ByteBuffer container) { - return new FT_COLR_Paint(address, container); - } - - /** - * Creates a {@code FT_COLR_Paint} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_COLR_Paint(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code format} field. */ - @NativeType("FT_PaintFormat") - public int format() { return nformat(address()); } - /** @return a {@link FT_PaintColrLayers} view of the {@code u.colr_layers} field. */ - public FT_PaintColrLayers u_colr_layers() { return nu_colr_layers(address()); } - /** @return a {@link FT_PaintGlyph} view of the {@code u.glyph} field. */ - public FT_PaintGlyph u_glyph() { return nu_glyph(address()); } - /** @return a {@link FT_PaintSolid} view of the {@code u.solid} field. */ - public FT_PaintSolid u_solid() { return nu_solid(address()); } - /** @return a {@link FT_PaintLinearGradient} view of the {@code u.linear_gradient} field. */ - public FT_PaintLinearGradient u_linear_gradient() { return nu_linear_gradient(address()); } - /** @return a {@link FT_PaintRadialGradient} view of the {@code u.radial_gradient} field. */ - public FT_PaintRadialGradient u_radial_gradient() { return nu_radial_gradient(address()); } - /** @return a {@link FT_PaintSweepGradient} view of the {@code u.sweep_gradient} field. */ - public FT_PaintSweepGradient u_sweep_gradient() { return nu_sweep_gradient(address()); } - /** @return a {@link FT_PaintTransform} view of the {@code u.transform} field. */ - public FT_PaintTransform u_transform() { return nu_transform(address()); } - /** @return a {@link FT_PaintTranslate} view of the {@code u.translate} field. */ - public FT_PaintTranslate u_translate() { return nu_translate(address()); } - /** @return a {@link FT_PaintScale} view of the {@code u.scale} field. */ - public FT_PaintScale u_scale() { return nu_scale(address()); } - /** @return a {@link FT_PaintRotate} view of the {@code u.rotate} field. */ - public FT_PaintRotate u_rotate() { return nu_rotate(address()); } - /** @return a {@link FT_PaintSkew} view of the {@code u.skew} field. */ - public FT_PaintSkew u_skew() { return nu_skew(address()); } - /** @return a {@link FT_PaintComposite} view of the {@code u.composite} field. */ - public FT_PaintComposite u_composite() { return nu_composite(address()); } - /** @return a {@link FT_PaintColrGlyph} view of the {@code u.colr_glyph} field. */ - public FT_PaintColrGlyph u_colr_glyph() { return nu_colr_glyph(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_COLR_Paint} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_COLR_Paint malloc() { - return new FT_COLR_Paint(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_COLR_Paint} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_COLR_Paint calloc() { - return new FT_COLR_Paint(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_COLR_Paint} instance allocated with {@link BufferUtils}. */ - public static FT_COLR_Paint create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_COLR_Paint(memAddress(container), container); - } - - /** Returns a new {@code FT_COLR_Paint} instance for the specified memory address. */ - public static FT_COLR_Paint create(long address) { - return new FT_COLR_Paint(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_COLR_Paint createSafe(long address) { - return address == NULL ? null : new FT_COLR_Paint(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_COLR_Paint} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_COLR_Paint malloc(MemoryStack stack) { - return new FT_COLR_Paint(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_COLR_Paint} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_COLR_Paint calloc(MemoryStack stack) { - return new FT_COLR_Paint(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #format}. */ - public static int nformat(long struct) { return UNSAFE.getInt(null, struct + FT_COLR_Paint.FORMAT); } - /** Unsafe version of {@link #u_colr_layers}. */ - public static FT_PaintColrLayers nu_colr_layers(long struct) { return FT_PaintColrLayers.create(struct + FT_COLR_Paint.U_COLR_LAYERS); } - /** Unsafe version of {@link #u_glyph}. */ - public static FT_PaintGlyph nu_glyph(long struct) { return FT_PaintGlyph.create(struct + FT_COLR_Paint.U_GLYPH); } - /** Unsafe version of {@link #u_solid}. */ - public static FT_PaintSolid nu_solid(long struct) { return FT_PaintSolid.create(struct + FT_COLR_Paint.U_SOLID); } - /** Unsafe version of {@link #u_linear_gradient}. */ - public static FT_PaintLinearGradient nu_linear_gradient(long struct) { return FT_PaintLinearGradient.create(struct + FT_COLR_Paint.U_LINEAR_GRADIENT); } - /** Unsafe version of {@link #u_radial_gradient}. */ - public static FT_PaintRadialGradient nu_radial_gradient(long struct) { return FT_PaintRadialGradient.create(struct + FT_COLR_Paint.U_RADIAL_GRADIENT); } - /** Unsafe version of {@link #u_sweep_gradient}. */ - public static FT_PaintSweepGradient nu_sweep_gradient(long struct) { return FT_PaintSweepGradient.create(struct + FT_COLR_Paint.U_SWEEP_GRADIENT); } - /** Unsafe version of {@link #u_transform}. */ - public static FT_PaintTransform nu_transform(long struct) { return FT_PaintTransform.create(struct + FT_COLR_Paint.U_TRANSFORM); } - /** Unsafe version of {@link #u_translate}. */ - public static FT_PaintTranslate nu_translate(long struct) { return FT_PaintTranslate.create(struct + FT_COLR_Paint.U_TRANSLATE); } - /** Unsafe version of {@link #u_scale}. */ - public static FT_PaintScale nu_scale(long struct) { return FT_PaintScale.create(struct + FT_COLR_Paint.U_SCALE); } - /** Unsafe version of {@link #u_rotate}. */ - public static FT_PaintRotate nu_rotate(long struct) { return FT_PaintRotate.create(struct + FT_COLR_Paint.U_ROTATE); } - /** Unsafe version of {@link #u_skew}. */ - public static FT_PaintSkew nu_skew(long struct) { return FT_PaintSkew.create(struct + FT_COLR_Paint.U_SKEW); } - /** Unsafe version of {@link #u_composite}. */ - public static FT_PaintComposite nu_composite(long struct) { return FT_PaintComposite.create(struct + FT_COLR_Paint.U_COMPOSITE); } - /** Unsafe version of {@link #u_colr_glyph}. */ - public static FT_PaintColrGlyph nu_colr_glyph(long struct) { return FT_PaintColrGlyph.create(struct + FT_COLR_Paint.U_COLR_GLYPH); } - - // ----------------------------------- - - /** An array of {@link FT_COLR_Paint} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_COLR_Paint ELEMENT_FACTORY = FT_COLR_Paint.create(-1L); - - /** - * Creates a new {@code FT_COLR_Paint.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_COLR_Paint#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_COLR_Paint getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code format} field. */ - @NativeType("FT_PaintFormat") - public int format() { return FT_COLR_Paint.nformat(address()); } - /** @return a {@link FT_PaintColrLayers} view of the {@code u.colr_layers} field. */ - public FT_PaintColrLayers u_colr_layers() { return FT_COLR_Paint.nu_colr_layers(address()); } - /** @return a {@link FT_PaintGlyph} view of the {@code u.glyph} field. */ - public FT_PaintGlyph u_glyph() { return FT_COLR_Paint.nu_glyph(address()); } - /** @return a {@link FT_PaintSolid} view of the {@code u.solid} field. */ - public FT_PaintSolid u_solid() { return FT_COLR_Paint.nu_solid(address()); } - /** @return a {@link FT_PaintLinearGradient} view of the {@code u.linear_gradient} field. */ - public FT_PaintLinearGradient u_linear_gradient() { return FT_COLR_Paint.nu_linear_gradient(address()); } - /** @return a {@link FT_PaintRadialGradient} view of the {@code u.radial_gradient} field. */ - public FT_PaintRadialGradient u_radial_gradient() { return FT_COLR_Paint.nu_radial_gradient(address()); } - /** @return a {@link FT_PaintSweepGradient} view of the {@code u.sweep_gradient} field. */ - public FT_PaintSweepGradient u_sweep_gradient() { return FT_COLR_Paint.nu_sweep_gradient(address()); } - /** @return a {@link FT_PaintTransform} view of the {@code u.transform} field. */ - public FT_PaintTransform u_transform() { return FT_COLR_Paint.nu_transform(address()); } - /** @return a {@link FT_PaintTranslate} view of the {@code u.translate} field. */ - public FT_PaintTranslate u_translate() { return FT_COLR_Paint.nu_translate(address()); } - /** @return a {@link FT_PaintScale} view of the {@code u.scale} field. */ - public FT_PaintScale u_scale() { return FT_COLR_Paint.nu_scale(address()); } - /** @return a {@link FT_PaintRotate} view of the {@code u.rotate} field. */ - public FT_PaintRotate u_rotate() { return FT_COLR_Paint.nu_rotate(address()); } - /** @return a {@link FT_PaintSkew} view of the {@code u.skew} field. */ - public FT_PaintSkew u_skew() { return FT_COLR_Paint.nu_skew(address()); } - /** @return a {@link FT_PaintComposite} view of the {@code u.composite} field. */ - public FT_PaintComposite u_composite() { return FT_COLR_Paint.nu_composite(address()); } - /** @return a {@link FT_PaintColrGlyph} view of the {@code u.colr_glyph} field. */ - public FT_PaintColrGlyph u_colr_glyph() { return FT_COLR_Paint.nu_colr_glyph(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_CharMap.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_CharMap.java deleted file mode 100644 index f6d543a3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_CharMap.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The base charmap structure. - * - *

    Layout

    - * - *
    
    - * struct FT_CharMapRec {
    - *     {@link FT_Face FT_Face} {@link #face};
    - *     FT_Encoding {@link #encoding};
    - *     FT_UShort {@link #platform_id};
    - *     FT_UShort {@link #encoding_id};
    - * }
    - */ -@NativeType("struct FT_CharMapRec") -public class FT_CharMap extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FACE, - ENCODING, - PLATFORM_ID, - ENCODING_ID; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FACE = layout.offsetof(0); - ENCODING = layout.offsetof(1); - PLATFORM_ID = layout.offsetof(2); - ENCODING_ID = layout.offsetof(3); - } - - protected FT_CharMap(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_CharMap create(long address, @Nullable ByteBuffer container) { - return new FT_CharMap(address, container); - } - - /** - * Creates a {@code FT_CharMap} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_CharMap(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** a handle to the parent face object */ - public FT_Face face() { return nface(address()); } - /** an {@code FT_Encoding} tag identifying the charmap. Use this with {@link FreeType#FT_Select_Charmap Select_Charmap}. */ - @NativeType("FT_Encoding") - public int encoding() { return nencoding(address()); } - /** - * an ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and gets emulated for other - * formats. - */ - @NativeType("FT_UShort") - public short platform_id() { return nplatform_id(address()); } - /** a platform-specific encoding number. This also comes from the TrueType specification and gets emulated similarly. */ - @NativeType("FT_UShort") - public short encoding_id() { return nencoding_id(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_CharMap} instance for the specified memory address. */ - public static FT_CharMap create(long address) { - return new FT_CharMap(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_CharMap createSafe(long address) { - return address == NULL ? null : new FT_CharMap(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #face}. */ - public static FT_Face nface(long struct) { return FT_Face.create(memGetAddress(struct + FT_CharMap.FACE)); } - /** Unsafe version of {@link #encoding}. */ - public static int nencoding(long struct) { return UNSAFE.getInt(null, struct + FT_CharMap.ENCODING); } - /** Unsafe version of {@link #platform_id}. */ - public static short nplatform_id(long struct) { return UNSAFE.getShort(null, struct + FT_CharMap.PLATFORM_ID); } - /** Unsafe version of {@link #encoding_id}. */ - public static short nencoding_id(long struct) { return UNSAFE.getShort(null, struct + FT_CharMap.ENCODING_ID); } - - // ----------------------------------- - - /** An array of {@link FT_CharMap} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_CharMap ELEMENT_FACTORY = FT_CharMap.create(-1L); - - /** - * Creates a new {@code FT_CharMap.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_CharMap#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_CharMap getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Face} view of the struct pointed to by the {@link FT_CharMap#face} field. */ - public FT_Face face() { return FT_CharMap.nface(address()); } - /** @return the value of the {@link FT_CharMap#encoding} field. */ - @NativeType("FT_Encoding") - public int encoding() { return FT_CharMap.nencoding(address()); } - /** @return the value of the {@link FT_CharMap#platform_id} field. */ - @NativeType("FT_UShort") - public short platform_id() { return FT_CharMap.nplatform_id(address()); } - /** @return the value of the {@link FT_CharMap#encoding_id} field. */ - @NativeType("FT_UShort") - public short encoding_id() { return FT_CharMap.nencoding_id(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ClipBox.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ClipBox.java deleted file mode 100644 index c1411a9a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ClipBox.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure representing a {@code COLR} v1 {@code ClipBox} table. - * - *

    Layout

    - * - *
    
    - * struct FT_ClipBox {
    - *     {@link FT_Vector FT_Vector} bottom_left;
    - *     {@link FT_Vector FT_Vector} top_left;
    - *     {@link FT_Vector FT_Vector} top_right;
    - *     {@link FT_Vector FT_Vector} bottom_right;
    - * }
    - */ -public class FT_ClipBox extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BOTTOM_LEFT, - TOP_LEFT, - TOP_RIGHT, - BOTTOM_RIGHT; - - static { - Layout layout = __struct( - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BOTTOM_LEFT = layout.offsetof(0); - TOP_LEFT = layout.offsetof(1); - TOP_RIGHT = layout.offsetof(2); - BOTTOM_RIGHT = layout.offsetof(3); - } - - protected FT_ClipBox(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_ClipBox create(long address, @Nullable ByteBuffer container) { - return new FT_ClipBox(address, container); - } - - /** - * Creates a {@code FT_ClipBox} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_ClipBox(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Vector} view of the {@code bottom_left} field. */ - public FT_Vector bottom_left() { return nbottom_left(address()); } - /** @return a {@link FT_Vector} view of the {@code top_left} field. */ - public FT_Vector top_left() { return ntop_left(address()); } - /** @return a {@link FT_Vector} view of the {@code top_right} field. */ - public FT_Vector top_right() { return ntop_right(address()); } - /** @return a {@link FT_Vector} view of the {@code bottom_right} field. */ - public FT_Vector bottom_right() { return nbottom_right(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_ClipBox} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_ClipBox malloc() { - return new FT_ClipBox(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_ClipBox} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_ClipBox calloc() { - return new FT_ClipBox(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_ClipBox} instance allocated with {@link BufferUtils}. */ - public static FT_ClipBox create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_ClipBox(memAddress(container), container); - } - - /** Returns a new {@code FT_ClipBox} instance for the specified memory address. */ - public static FT_ClipBox create(long address) { - return new FT_ClipBox(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_ClipBox createSafe(long address) { - return address == NULL ? null : new FT_ClipBox(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_ClipBox} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_ClipBox malloc(MemoryStack stack) { - return new FT_ClipBox(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_ClipBox} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_ClipBox calloc(MemoryStack stack) { - return new FT_ClipBox(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #bottom_left}. */ - public static FT_Vector nbottom_left(long struct) { return FT_Vector.create(struct + FT_ClipBox.BOTTOM_LEFT); } - /** Unsafe version of {@link #top_left}. */ - public static FT_Vector ntop_left(long struct) { return FT_Vector.create(struct + FT_ClipBox.TOP_LEFT); } - /** Unsafe version of {@link #top_right}. */ - public static FT_Vector ntop_right(long struct) { return FT_Vector.create(struct + FT_ClipBox.TOP_RIGHT); } - /** Unsafe version of {@link #bottom_right}. */ - public static FT_Vector nbottom_right(long struct) { return FT_Vector.create(struct + FT_ClipBox.BOTTOM_RIGHT); } - - // ----------------------------------- - - /** An array of {@link FT_ClipBox} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_ClipBox ELEMENT_FACTORY = FT_ClipBox.create(-1L); - - /** - * Creates a new {@code FT_ClipBox.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_ClipBox#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_ClipBox getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Vector} view of the {@code bottom_left} field. */ - public FT_Vector bottom_left() { return FT_ClipBox.nbottom_left(address()); } - /** @return a {@link FT_Vector} view of the {@code top_left} field. */ - public FT_Vector top_left() { return FT_ClipBox.ntop_left(address()); } - /** @return a {@link FT_Vector} view of the {@code top_right} field. */ - public FT_Vector top_right() { return FT_ClipBox.ntop_right(address()); } - /** @return a {@link FT_Vector} view of the {@code bottom_right} field. */ - public FT_Vector bottom_right() { return FT_ClipBox.nbottom_right(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Color.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Color.java deleted file mode 100644 index 50a33d60..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Color.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * This structure models a BGRA color value of a {@code CPAL} palette entry. - * - *

    Layout

    - * - *
    
    - * struct FT_Color {
    - *     FT_Byte blue;
    - *     FT_Byte green;
    - *     FT_Byte red;
    - *     FT_Byte alpha;
    - * }
    - */ -public class FT_Color extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BLUE, - GREEN, - RED, - ALPHA; - - static { - Layout layout = __struct( - __member(1), - __member(1), - __member(1), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BLUE = layout.offsetof(0); - GREEN = layout.offsetof(1); - RED = layout.offsetof(2); - ALPHA = layout.offsetof(3); - } - - protected FT_Color(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Color create(long address, @Nullable ByteBuffer container) { - return new FT_Color(address, container); - } - - /** - * Creates a {@code FT_Color} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Color(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code blue} field. */ - @NativeType("FT_Byte") - public byte blue() { return nblue(address()); } - /** @return the value of the {@code green} field. */ - @NativeType("FT_Byte") - public byte green() { return ngreen(address()); } - /** @return the value of the {@code red} field. */ - @NativeType("FT_Byte") - public byte red() { return nred(address()); } - /** @return the value of the {@code alpha} field. */ - @NativeType("FT_Byte") - public byte alpha() { return nalpha(address()); } - - /** Sets the specified value to the {@code blue} field. */ - public FT_Color blue(@NativeType("FT_Byte") byte value) { nblue(address(), value); return this; } - /** Sets the specified value to the {@code green} field. */ - public FT_Color green(@NativeType("FT_Byte") byte value) { ngreen(address(), value); return this; } - /** Sets the specified value to the {@code red} field. */ - public FT_Color red(@NativeType("FT_Byte") byte value) { nred(address(), value); return this; } - /** Sets the specified value to the {@code alpha} field. */ - public FT_Color alpha(@NativeType("FT_Byte") byte value) { nalpha(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Color set( - byte blue, - byte green, - byte red, - byte alpha - ) { - blue(blue); - green(green); - red(red); - alpha(alpha); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Color set(FT_Color src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Color} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Color malloc() { - return new FT_Color(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Color} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Color calloc() { - return new FT_Color(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Color} instance allocated with {@link BufferUtils}. */ - public static FT_Color create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Color(memAddress(container), container); - } - - /** Returns a new {@code FT_Color} instance for the specified memory address. */ - public static FT_Color create(long address) { - return new FT_Color(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Color createSafe(long address) { - return address == NULL ? null : new FT_Color(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Color} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Color malloc(MemoryStack stack) { - return new FT_Color(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Color} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Color calloc(MemoryStack stack) { - return new FT_Color(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #blue}. */ - public static byte nblue(long struct) { return UNSAFE.getByte(null, struct + FT_Color.BLUE); } - /** Unsafe version of {@link #green}. */ - public static byte ngreen(long struct) { return UNSAFE.getByte(null, struct + FT_Color.GREEN); } - /** Unsafe version of {@link #red}. */ - public static byte nred(long struct) { return UNSAFE.getByte(null, struct + FT_Color.RED); } - /** Unsafe version of {@link #alpha}. */ - public static byte nalpha(long struct) { return UNSAFE.getByte(null, struct + FT_Color.ALPHA); } - - /** Unsafe version of {@link #blue(byte) blue}. */ - public static void nblue(long struct, byte value) { UNSAFE.putByte(null, struct + FT_Color.BLUE, value); } - /** Unsafe version of {@link #green(byte) green}. */ - public static void ngreen(long struct, byte value) { UNSAFE.putByte(null, struct + FT_Color.GREEN, value); } - /** Unsafe version of {@link #red(byte) red}. */ - public static void nred(long struct, byte value) { UNSAFE.putByte(null, struct + FT_Color.RED, value); } - /** Unsafe version of {@link #alpha(byte) alpha}. */ - public static void nalpha(long struct, byte value) { UNSAFE.putByte(null, struct + FT_Color.ALPHA, value); } - - // ----------------------------------- - - /** An array of {@link FT_Color} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Color ELEMENT_FACTORY = FT_Color.create(-1L); - - /** - * Creates a new {@code FT_Color.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Color#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Color getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code blue} field. */ - @NativeType("FT_Byte") - public byte blue() { return FT_Color.nblue(address()); } - /** @return the value of the {@code green} field. */ - @NativeType("FT_Byte") - public byte green() { return FT_Color.ngreen(address()); } - /** @return the value of the {@code red} field. */ - @NativeType("FT_Byte") - public byte red() { return FT_Color.nred(address()); } - /** @return the value of the {@code alpha} field. */ - @NativeType("FT_Byte") - public byte alpha() { return FT_Color.nalpha(address()); } - - /** Sets the specified value to the {@code blue} field. */ - public Buffer blue(@NativeType("FT_Byte") byte value) { FT_Color.nblue(address(), value); return this; } - /** Sets the specified value to the {@code green} field. */ - public Buffer green(@NativeType("FT_Byte") byte value) { FT_Color.ngreen(address(), value); return this; } - /** Sets the specified value to the {@code red} field. */ - public Buffer red(@NativeType("FT_Byte") byte value) { FT_Color.nred(address(), value); return this; } - /** Sets the specified value to the {@code alpha} field. */ - public Buffer alpha(@NativeType("FT_Byte") byte value) { FT_Color.nalpha(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorIndex.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorIndex.java deleted file mode 100644 index 48c23923..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorIndex.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code ColorIndex} value of the {@code COLR} v1 extensions. - * - *

    Layout

    - * - *
    
    - * struct FT_ColorIndex {
    - *     FT_UInt16 palette_index;
    - *     FT_F2Dot14 alpha;
    - * }
    - */ -public class FT_ColorIndex extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PALETTE_INDEX, - ALPHA; - - static { - Layout layout = __struct( - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PALETTE_INDEX = layout.offsetof(0); - ALPHA = layout.offsetof(1); - } - - protected FT_ColorIndex(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_ColorIndex create(long address, @Nullable ByteBuffer container) { - return new FT_ColorIndex(address, container); - } - - /** - * Creates a {@code FT_ColorIndex} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_ColorIndex(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code palette_index} field. */ - @NativeType("FT_UInt16") - public short palette_index() { return npalette_index(address()); } - /** @return the value of the {@code alpha} field. */ - @NativeType("FT_F2Dot14") - public short alpha() { return nalpha(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_ColorIndex} instance for the specified memory address. */ - public static FT_ColorIndex create(long address) { - return new FT_ColorIndex(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_ColorIndex createSafe(long address) { - return address == NULL ? null : new FT_ColorIndex(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #palette_index}. */ - public static short npalette_index(long struct) { return UNSAFE.getShort(null, struct + FT_ColorIndex.PALETTE_INDEX); } - /** Unsafe version of {@link #alpha}. */ - public static short nalpha(long struct) { return UNSAFE.getShort(null, struct + FT_ColorIndex.ALPHA); } - - // ----------------------------------- - - /** An array of {@link FT_ColorIndex} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_ColorIndex ELEMENT_FACTORY = FT_ColorIndex.create(-1L); - - /** - * Creates a new {@code FT_ColorIndex.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_ColorIndex#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_ColorIndex getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code palette_index} field. */ - @NativeType("FT_UInt16") - public short palette_index() { return FT_ColorIndex.npalette_index(address()); } - /** @return the value of the {@code alpha} field. */ - @NativeType("FT_F2Dot14") - public short alpha() { return FT_ColorIndex.nalpha(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorLine.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorLine.java deleted file mode 100644 index c0b3712a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorLine.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code ColorLine} value of the {@code COLR} v1 extensions. - * - *

    Layout

    - * - *
    
    - * struct FT_ColorLine {
    - *     FT_PaintExtend extend;
    - *     {@link FT_ColorStopIterator FT_ColorStopIterator} color_stop_iterator;
    - * }
    - */ -public class FT_ColorLine extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - EXTEND, - COLOR_STOP_ITERATOR; - - static { - Layout layout = __struct( - __member(4), - __member(FT_ColorStopIterator.SIZEOF, FT_ColorStopIterator.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - EXTEND = layout.offsetof(0); - COLOR_STOP_ITERATOR = layout.offsetof(1); - } - - protected FT_ColorLine(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_ColorLine create(long address, @Nullable ByteBuffer container) { - return new FT_ColorLine(address, container); - } - - /** - * Creates a {@code FT_ColorLine} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_ColorLine(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code extend} field. */ - @NativeType("FT_PaintExtend") - public int extend() { return nextend(address()); } - /** @return a {@link FT_ColorStopIterator} view of the {@code color_stop_iterator} field. */ - public FT_ColorStopIterator color_stop_iterator() { return ncolor_stop_iterator(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_ColorLine} instance for the specified memory address. */ - public static FT_ColorLine create(long address) { - return new FT_ColorLine(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_ColorLine createSafe(long address) { - return address == NULL ? null : new FT_ColorLine(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #extend}. */ - public static int nextend(long struct) { return UNSAFE.getInt(null, struct + FT_ColorLine.EXTEND); } - /** Unsafe version of {@link #color_stop_iterator}. */ - public static FT_ColorStopIterator ncolor_stop_iterator(long struct) { return FT_ColorStopIterator.create(struct + FT_ColorLine.COLOR_STOP_ITERATOR); } - - // ----------------------------------- - - /** An array of {@link FT_ColorLine} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_ColorLine ELEMENT_FACTORY = FT_ColorLine.create(-1L); - - /** - * Creates a new {@code FT_ColorLine.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_ColorLine#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_ColorLine getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code extend} field. */ - @NativeType("FT_PaintExtend") - public int extend() { return FT_ColorLine.nextend(address()); } - /** @return a {@link FT_ColorStopIterator} view of the {@code color_stop_iterator} field. */ - public FT_ColorStopIterator color_stop_iterator() { return FT_ColorLine.ncolor_stop_iterator(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorStop.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorStop.java deleted file mode 100644 index 3b3b8399..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorStop.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure representing a {@code ColorStop} value of the 'COLR' v1 extensions. - * - *

    Layout

    - * - *
    
    - * struct FT_ColorStop {
    - *     FT_Fixed stop_offset;
    - *     {@link FT_ColorIndex FT_ColorIndex} color;
    - * }
    - */ -public class FT_ColorStop extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - STOP_OFFSET, - COLOR; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(FT_ColorIndex.SIZEOF, FT_ColorIndex.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - STOP_OFFSET = layout.offsetof(0); - COLOR = layout.offsetof(1); - } - - protected FT_ColorStop(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_ColorStop create(long address, @Nullable ByteBuffer container) { - return new FT_ColorStop(address, container); - } - - /** - * Creates a {@code FT_ColorStop} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_ColorStop(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code stop_offset} field. */ - @NativeType("FT_Fixed") - public long stop_offset() { return nstop_offset(address()); } - /** @return a {@link FT_ColorIndex} view of the {@code color} field. */ - public FT_ColorIndex color() { return ncolor(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_ColorStop} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_ColorStop malloc() { - return new FT_ColorStop(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_ColorStop} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_ColorStop calloc() { - return new FT_ColorStop(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_ColorStop} instance allocated with {@link BufferUtils}. */ - public static FT_ColorStop create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_ColorStop(memAddress(container), container); - } - - /** Returns a new {@code FT_ColorStop} instance for the specified memory address. */ - public static FT_ColorStop create(long address) { - return new FT_ColorStop(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_ColorStop createSafe(long address) { - return address == NULL ? null : new FT_ColorStop(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_ColorStop} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_ColorStop malloc(MemoryStack stack) { - return new FT_ColorStop(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_ColorStop} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_ColorStop calloc(MemoryStack stack) { - return new FT_ColorStop(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #stop_offset}. */ - public static long nstop_offset(long struct) { return memGetCLong(struct + FT_ColorStop.STOP_OFFSET); } - /** Unsafe version of {@link #color}. */ - public static FT_ColorIndex ncolor(long struct) { return FT_ColorIndex.create(struct + FT_ColorStop.COLOR); } - - // ----------------------------------- - - /** An array of {@link FT_ColorStop} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_ColorStop ELEMENT_FACTORY = FT_ColorStop.create(-1L); - - /** - * Creates a new {@code FT_ColorStop.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_ColorStop#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_ColorStop getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code stop_offset} field. */ - @NativeType("FT_Fixed") - public long stop_offset() { return FT_ColorStop.nstop_offset(address()); } - /** @return a {@link FT_ColorIndex} view of the {@code color} field. */ - public FT_ColorIndex color() { return FT_ColorStop.ncolor(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorStopIterator.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorStopIterator.java deleted file mode 100644 index b6a852b2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ColorStopIterator.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * This iterator object is needed for {@link FreeType#FT_Get_Colorline_Stops Get_Colorline_Stops}. - * - *

    Layout

    - * - *
    
    - * struct FT_ColorStopIterator {
    - *     FT_UInt num_color_stops;
    - *     FT_UInt current_color_stop;
    - *     FT_Byte * p;
    - *     FT_Bool read_variable;
    - * }
    - */ -public class FT_ColorStopIterator extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NUM_COLOR_STOPS, - CURRENT_COLOR_STOP, - P, - READ_VARIABLE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NUM_COLOR_STOPS = layout.offsetof(0); - CURRENT_COLOR_STOP = layout.offsetof(1); - P = layout.offsetof(2); - READ_VARIABLE = layout.offsetof(3); - } - - protected FT_ColorStopIterator(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_ColorStopIterator create(long address, @Nullable ByteBuffer container) { - return new FT_ColorStopIterator(address, container); - } - - /** - * Creates a {@code FT_ColorStopIterator} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_ColorStopIterator(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code num_color_stops} field. */ - @NativeType("FT_UInt") - public int num_color_stops() { return nnum_color_stops(address()); } - /** @return the value of the {@code current_color_stop} field. */ - @NativeType("FT_UInt") - public int current_color_stop() { return ncurrent_color_stop(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code p} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Byte *") - public ByteBuffer p(int capacity) { return np(address(), capacity); } - /** @return the value of the {@code read_variable} field. */ - @NativeType("FT_Bool") - public boolean read_variable() { return nread_variable(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_ColorStopIterator} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_ColorStopIterator malloc() { - return new FT_ColorStopIterator(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_ColorStopIterator} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_ColorStopIterator calloc() { - return new FT_ColorStopIterator(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_ColorStopIterator} instance allocated with {@link BufferUtils}. */ - public static FT_ColorStopIterator create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_ColorStopIterator(memAddress(container), container); - } - - /** Returns a new {@code FT_ColorStopIterator} instance for the specified memory address. */ - public static FT_ColorStopIterator create(long address) { - return new FT_ColorStopIterator(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_ColorStopIterator createSafe(long address) { - return address == NULL ? null : new FT_ColorStopIterator(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_ColorStopIterator} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_ColorStopIterator malloc(MemoryStack stack) { - return new FT_ColorStopIterator(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_ColorStopIterator} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_ColorStopIterator calloc(MemoryStack stack) { - return new FT_ColorStopIterator(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #num_color_stops}. */ - public static int nnum_color_stops(long struct) { return UNSAFE.getInt(null, struct + FT_ColorStopIterator.NUM_COLOR_STOPS); } - /** Unsafe version of {@link #current_color_stop}. */ - public static int ncurrent_color_stop(long struct) { return UNSAFE.getInt(null, struct + FT_ColorStopIterator.CURRENT_COLOR_STOP); } - /** Unsafe version of {@link #p(int) p}. */ - @Nullable public static ByteBuffer np(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_ColorStopIterator.P), capacity); } - /** Unsafe version of {@link #read_variable}. */ - public static boolean nread_variable(long struct) { return UNSAFE.getByte(null, struct + FT_ColorStopIterator.READ_VARIABLE) != 0; } - - // ----------------------------------- - - /** An array of {@link FT_ColorStopIterator} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_ColorStopIterator ELEMENT_FACTORY = FT_ColorStopIterator.create(-1L); - - /** - * Creates a new {@code FT_ColorStopIterator.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_ColorStopIterator#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_ColorStopIterator getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code num_color_stops} field. */ - @NativeType("FT_UInt") - public int num_color_stops() { return FT_ColorStopIterator.nnum_color_stops(address()); } - /** @return the value of the {@code current_color_stop} field. */ - @NativeType("FT_UInt") - public int current_color_stop() { return FT_ColorStopIterator.ncurrent_color_stop(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code p} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Byte *") - public ByteBuffer p(int capacity) { return FT_ColorStopIterator.np(address(), capacity); } - /** @return the value of the {@code read_variable} field. */ - @NativeType("FT_Bool") - public boolean read_variable() { return FT_ColorStopIterator.nread_variable(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Data.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Data.java deleted file mode 100644 index 3484e6a6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Data.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Read-only binary data represented as a pointer and a length. - * - *

    Layout

    - * - *
    
    - * struct FT_Data {
    - *     FT_Byte const * pointer;
    - *     FT_UInt length;
    - * }
    - */ -public class FT_Data extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - POINTER, - LENGTH; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - POINTER = layout.offsetof(0); - LENGTH = layout.offsetof(1); - } - - protected FT_Data(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Data create(long address, @Nullable ByteBuffer container) { - return new FT_Data(address, container); - } - - /** - * Creates a {@code FT_Data} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Data(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code pointer} field. */ - @NativeType("FT_Byte const *") - public ByteBuffer pointer() { return npointer(address()); } - /** @return the value of the {@code length} field. */ - @NativeType("FT_UInt") - public int length() { return nlength(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@code pointer} field. */ - public FT_Data pointer(@NativeType("FT_Byte const *") ByteBuffer value) { npointer(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Data set(FT_Data src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Data} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Data malloc() { - return new FT_Data(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Data} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Data calloc() { - return new FT_Data(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Data} instance allocated with {@link BufferUtils}. */ - public static FT_Data create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Data(memAddress(container), container); - } - - /** Returns a new {@code FT_Data} instance for the specified memory address. */ - public static FT_Data create(long address) { - return new FT_Data(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Data createSafe(long address) { - return address == NULL ? null : new FT_Data(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Data} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Data malloc(MemoryStack stack) { - return new FT_Data(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Data} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Data calloc(MemoryStack stack) { - return new FT_Data(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #pointer() pointer}. */ - public static ByteBuffer npointer(long struct) { return memByteBuffer(memGetAddress(struct + FT_Data.POINTER), nlength(struct)); } - /** Unsafe version of {@link #length}. */ - public static int nlength(long struct) { return UNSAFE.getInt(null, struct + FT_Data.LENGTH); } - - /** Unsafe version of {@link #pointer(ByteBuffer) pointer}. */ - public static void npointer(long struct, ByteBuffer value) { memPutAddress(struct + FT_Data.POINTER, memAddress(value)); nlength(struct, value.remaining()); } - /** Sets the specified value to the {@code length} field of the specified {@code struct}. */ - public static void nlength(long struct, int value) { UNSAFE.putInt(null, struct + FT_Data.LENGTH, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + FT_Data.POINTER)); - } - - // ----------------------------------- - - /** An array of {@link FT_Data} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Data ELEMENT_FACTORY = FT_Data.create(-1L); - - /** - * Creates a new {@code FT_Data.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Data#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Data getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code pointer} field. */ - @NativeType("FT_Byte const *") - public ByteBuffer pointer() { return FT_Data.npointer(address()); } - /** @return the value of the {@code length} field. */ - @NativeType("FT_UInt") - public int length() { return FT_Data.nlength(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@code pointer} field. */ - public Buffer pointer(@NativeType("FT_Byte const *") ByteBuffer value) { FT_Data.npointer(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_DebugHook_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_DebugHook_Func.java deleted file mode 100644 index 4e755a4d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_DebugHook_Func.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     void *arg
    - * )
    - */ -public abstract class FT_DebugHook_Func extends Callback implements FT_DebugHook_FuncI { - - /** - * Creates a {@code FT_DebugHook_Func} instance from the specified function pointer. - * - * @return the new {@code FT_DebugHook_Func} - */ - public static FT_DebugHook_Func create(long functionPointer) { - FT_DebugHook_FuncI instance = Callback.get(functionPointer); - return instance instanceof FT_DebugHook_Func - ? (FT_DebugHook_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_DebugHook_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_DebugHook_Func} instance that delegates to the specified {@code FT_DebugHook_FuncI} instance. */ - public static FT_DebugHook_Func create(FT_DebugHook_FuncI instance) { - return instance instanceof FT_DebugHook_Func - ? (FT_DebugHook_Func)instance - : new Container(instance.address(), instance); - } - - protected FT_DebugHook_Func() { - super(CIF); - } - - FT_DebugHook_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_DebugHook_Func { - - private final FT_DebugHook_FuncI delegate; - - Container(long functionPointer, FT_DebugHook_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long arg) { - return delegate.invoke(arg); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_DebugHook_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_DebugHook_FuncI.java deleted file mode 100644 index c4518d08..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_DebugHook_FuncI.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     void *arg
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_DebugHook_Func") -public interface FT_DebugHook_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)) - ); - apiClosureRet(ret, __result); - } - - /** A drop-in replacement (or rather a wrapper) for the bytecode or charstring interpreter's main loop function. */ - @NativeType("FT_Error") int invoke(@NativeType("void *") long arg); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Face.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Face.java deleted file mode 100644 index 23c30bf9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Face.java +++ /dev/null @@ -1,480 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * FreeType root face class structure. A face object models a typeface in a font file. - * - *

    Layout

    - * - *
    
    - * struct FT_FaceRec {
    - *     FT_Long num_faces;
    - *     FT_Long face_index;
    - *     FT_Long face_flags;
    - *     FT_Long style_flags;
    - *     FT_Long num_glyphs;
    - *     FT_String * family_name;
    - *     FT_String * style_name;
    - *     FT_Int num_fixed_sizes;
    - *     {@link FT_Bitmap_Size FT_Bitmap_Size} * available_sizes;
    - *     FT_Int num_charmaps;
    - *     {@link FT_CharMap FT_CharMap} * charmaps;
    - *     {@link FT_Generic FT_Generic} generic;
    - *     {@link FT_BBox FT_BBox} bbox;
    - *     FT_UShort units_per_EM;
    - *     FT_Short ascender;
    - *     FT_Short descender;
    - *     FT_Short height;
    - *     FT_Short max_advance_width;
    - *     FT_Short max_advance_height;
    - *     FT_Short underline_position;
    - *     FT_Short underline_thickness;
    - *     {@link FT_GlyphSlot FT_GlyphSlot} glyph;
    - *     {@link FT_Size FT_Size} size;
    - *     {@link FT_CharMap FT_CharMap} charmap;
    - *     FT_Driver driver;
    - *     FT_Memory memory;
    - *     {@link FT_Stream FT_Stream} stream;
    - *     {@link FT_List FT_ListRec} sizes_list;
    - *     {@link FT_Generic FT_Generic} autohint;
    - *     void * extensions;
    - *     FT_Face_Internal internal;
    - * }
    - */ -@NativeType("struct FT_FaceRec") -public class FT_Face extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NUM_FACES, - FACE_INDEX, - FACE_FLAGS, - STYLE_FLAGS, - NUM_GLYPHS, - FAMILY_NAME, - STYLE_NAME, - NUM_FIXED_SIZES, - AVAILABLE_SIZES, - NUM_CHARMAPS, - CHARMAPS, - GENERIC, - BBOX, - UNITS_PER_EM, - ASCENDER, - DESCENDER, - HEIGHT, - MAX_ADVANCE_WIDTH, - MAX_ADVANCE_HEIGHT, - UNDERLINE_POSITION, - UNDERLINE_THICKNESS, - GLYPH, - SIZE, - CHARMAP, - DRIVER, - MEMORY, - STREAM, - SIZES_LIST, - AUTOHINT, - EXTENSIONS, - INTERNAL; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(FT_Generic.SIZEOF, FT_Generic.ALIGNOF), - __member(FT_BBox.SIZEOF, FT_BBox.ALIGNOF), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(FT_List.SIZEOF, FT_List.ALIGNOF), - __member(FT_Generic.SIZEOF, FT_Generic.ALIGNOF), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NUM_FACES = layout.offsetof(0); - FACE_INDEX = layout.offsetof(1); - FACE_FLAGS = layout.offsetof(2); - STYLE_FLAGS = layout.offsetof(3); - NUM_GLYPHS = layout.offsetof(4); - FAMILY_NAME = layout.offsetof(5); - STYLE_NAME = layout.offsetof(6); - NUM_FIXED_SIZES = layout.offsetof(7); - AVAILABLE_SIZES = layout.offsetof(8); - NUM_CHARMAPS = layout.offsetof(9); - CHARMAPS = layout.offsetof(10); - GENERIC = layout.offsetof(11); - BBOX = layout.offsetof(12); - UNITS_PER_EM = layout.offsetof(13); - ASCENDER = layout.offsetof(14); - DESCENDER = layout.offsetof(15); - HEIGHT = layout.offsetof(16); - MAX_ADVANCE_WIDTH = layout.offsetof(17); - MAX_ADVANCE_HEIGHT = layout.offsetof(18); - UNDERLINE_POSITION = layout.offsetof(19); - UNDERLINE_THICKNESS = layout.offsetof(20); - GLYPH = layout.offsetof(21); - SIZE = layout.offsetof(22); - CHARMAP = layout.offsetof(23); - DRIVER = layout.offsetof(24); - MEMORY = layout.offsetof(25); - STREAM = layout.offsetof(26); - SIZES_LIST = layout.offsetof(27); - AUTOHINT = layout.offsetof(28); - EXTENSIONS = layout.offsetof(29); - INTERNAL = layout.offsetof(30); - } - - protected FT_Face(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Face create(long address, @Nullable ByteBuffer container) { - return new FT_Face(address, container); - } - - /** - * Creates a {@code FT_Face} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Face(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code num_faces} field. */ - @NativeType("FT_Long") - public long num_faces() { return nnum_faces(address()); } - /** @return the value of the {@code face_index} field. */ - @NativeType("FT_Long") - public long face_index() { return nface_index(address()); } - /** @return the value of the {@code face_flags} field. */ - @NativeType("FT_Long") - public long face_flags() { return nface_flags(address()); } - /** @return the value of the {@code style_flags} field. */ - @NativeType("FT_Long") - public long style_flags() { return nstyle_flags(address()); } - /** @return the value of the {@code num_glyphs} field. */ - @NativeType("FT_Long") - public long num_glyphs() { return nnum_glyphs(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public ByteBuffer family_name() { return nfamily_name(address()); } - /** @return the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public String family_nameString() { return nfamily_nameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code style_name} field. */ - @NativeType("FT_String *") - public ByteBuffer style_name() { return nstyle_name(address()); } - /** @return the null-terminated string pointed to by the {@code style_name} field. */ - @NativeType("FT_String *") - public String style_nameString() { return nstyle_nameString(address()); } - /** @return the value of the {@code num_fixed_sizes} field. */ - @NativeType("FT_Int") - public int num_fixed_sizes() { return nnum_fixed_sizes(address()); } - /** @return a {@link FT_Bitmap_Size.Buffer} view of the struct array pointed to by the {@code available_sizes} field. */ - @Nullable - @NativeType("FT_Bitmap_Size *") - public FT_Bitmap_Size.Buffer available_sizes() { return navailable_sizes(address()); } - /** @return the value of the {@code num_charmaps} field. */ - @NativeType("FT_Int") - public int num_charmaps() { return nnum_charmaps(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code charmaps} field. */ - @NativeType("FT_CharMap *") - public PointerBuffer charmaps() { return ncharmaps(address()); } - /** @return a {@link FT_Generic} view of the {@code generic} field. */ - public FT_Generic generic() { return ngeneric(address()); } - /** @return a {@link FT_BBox} view of the {@code bbox} field. */ - public FT_BBox bbox() { return nbbox(address()); } - /** @return the value of the {@code units_per_EM} field. */ - @NativeType("FT_UShort") - public short units_per_EM() { return nunits_per_EM(address()); } - /** @return the value of the {@code ascender} field. */ - @NativeType("FT_Short") - public short ascender() { return nascender(address()); } - /** @return the value of the {@code descender} field. */ - @NativeType("FT_Short") - public short descender() { return ndescender(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_Short") - public short height() { return nheight(address()); } - /** @return the value of the {@code max_advance_width} field. */ - @NativeType("FT_Short") - public short max_advance_width() { return nmax_advance_width(address()); } - /** @return the value of the {@code max_advance_height} field. */ - @NativeType("FT_Short") - public short max_advance_height() { return nmax_advance_height(address()); } - /** @return the value of the {@code underline_position} field. */ - @NativeType("FT_Short") - public short underline_position() { return nunderline_position(address()); } - /** @return the value of the {@code underline_thickness} field. */ - @NativeType("FT_Short") - public short underline_thickness() { return nunderline_thickness(address()); } - /** @return a {@link FT_GlyphSlot} view of the struct pointed to by the {@code glyph} field. */ - @Nullable - public FT_GlyphSlot glyph() { return nglyph(address()); } - /** @return a {@link FT_Size} view of the struct pointed to by the {@code size} field. */ - @Nullable - public FT_Size size() { return nsize(address()); } - /** @return a {@link FT_CharMap} view of the struct pointed to by the {@code charmap} field. */ - @Nullable - public FT_CharMap charmap() { return ncharmap(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Face} instance for the specified memory address. */ - public static FT_Face create(long address) { - return new FT_Face(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Face createSafe(long address) { - return address == NULL ? null : new FT_Face(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #num_faces}. */ - public static long nnum_faces(long struct) { return memGetCLong(struct + FT_Face.NUM_FACES); } - /** Unsafe version of {@link #face_index}. */ - public static long nface_index(long struct) { return memGetCLong(struct + FT_Face.FACE_INDEX); } - /** Unsafe version of {@link #face_flags}. */ - public static long nface_flags(long struct) { return memGetCLong(struct + FT_Face.FACE_FLAGS); } - /** Unsafe version of {@link #style_flags}. */ - public static long nstyle_flags(long struct) { return memGetCLong(struct + FT_Face.STYLE_FLAGS); } - /** Unsafe version of {@link #num_glyphs}. */ - public static long nnum_glyphs(long struct) { return memGetCLong(struct + FT_Face.NUM_GLYPHS); } - /** Unsafe version of {@link #family_name}. */ - public static ByteBuffer nfamily_name(long struct) { return memByteBufferNT1(memGetAddress(struct + FT_Face.FAMILY_NAME)); } - /** Unsafe version of {@link #family_nameString}. */ - public static String nfamily_nameString(long struct) { return memUTF8(memGetAddress(struct + FT_Face.FAMILY_NAME)); } - /** Unsafe version of {@link #style_name}. */ - public static ByteBuffer nstyle_name(long struct) { return memByteBufferNT1(memGetAddress(struct + FT_Face.STYLE_NAME)); } - /** Unsafe version of {@link #style_nameString}. */ - public static String nstyle_nameString(long struct) { return memUTF8(memGetAddress(struct + FT_Face.STYLE_NAME)); } - /** Unsafe version of {@link #num_fixed_sizes}. */ - public static int nnum_fixed_sizes(long struct) { return UNSAFE.getInt(null, struct + FT_Face.NUM_FIXED_SIZES); } - /** Unsafe version of {@link #available_sizes}. */ - @Nullable public static FT_Bitmap_Size.Buffer navailable_sizes(long struct) { return FT_Bitmap_Size.createSafe(memGetAddress(struct + FT_Face.AVAILABLE_SIZES), nnum_fixed_sizes(struct)); } - /** Unsafe version of {@link #num_charmaps}. */ - public static int nnum_charmaps(long struct) { return UNSAFE.getInt(null, struct + FT_Face.NUM_CHARMAPS); } - /** Unsafe version of {@link #charmaps() charmaps}. */ - public static PointerBuffer ncharmaps(long struct) { return memPointerBuffer(memGetAddress(struct + FT_Face.CHARMAPS), nnum_charmaps(struct)); } - /** Unsafe version of {@link #generic}. */ - public static FT_Generic ngeneric(long struct) { return FT_Generic.create(struct + FT_Face.GENERIC); } - /** Unsafe version of {@link #bbox}. */ - public static FT_BBox nbbox(long struct) { return FT_BBox.create(struct + FT_Face.BBOX); } - /** Unsafe version of {@link #units_per_EM}. */ - public static short nunits_per_EM(long struct) { return UNSAFE.getShort(null, struct + FT_Face.UNITS_PER_EM); } - /** Unsafe version of {@link #ascender}. */ - public static short nascender(long struct) { return UNSAFE.getShort(null, struct + FT_Face.ASCENDER); } - /** Unsafe version of {@link #descender}. */ - public static short ndescender(long struct) { return UNSAFE.getShort(null, struct + FT_Face.DESCENDER); } - /** Unsafe version of {@link #height}. */ - public static short nheight(long struct) { return UNSAFE.getShort(null, struct + FT_Face.HEIGHT); } - /** Unsafe version of {@link #max_advance_width}. */ - public static short nmax_advance_width(long struct) { return UNSAFE.getShort(null, struct + FT_Face.MAX_ADVANCE_WIDTH); } - /** Unsafe version of {@link #max_advance_height}. */ - public static short nmax_advance_height(long struct) { return UNSAFE.getShort(null, struct + FT_Face.MAX_ADVANCE_HEIGHT); } - /** Unsafe version of {@link #underline_position}. */ - public static short nunderline_position(long struct) { return UNSAFE.getShort(null, struct + FT_Face.UNDERLINE_POSITION); } - /** Unsafe version of {@link #underline_thickness}. */ - public static short nunderline_thickness(long struct) { return UNSAFE.getShort(null, struct + FT_Face.UNDERLINE_THICKNESS); } - /** Unsafe version of {@link #glyph}. */ - @Nullable public static FT_GlyphSlot nglyph(long struct) { return FT_GlyphSlot.createSafe(memGetAddress(struct + FT_Face.GLYPH)); } - /** Unsafe version of {@link #size}. */ - @Nullable public static FT_Size nsize(long struct) { return FT_Size.createSafe(memGetAddress(struct + FT_Face.SIZE)); } - /** Unsafe version of {@link #charmap}. */ - @Nullable public static FT_CharMap ncharmap(long struct) { return FT_CharMap.createSafe(memGetAddress(struct + FT_Face.CHARMAP)); } - public static long ndriver(long struct) { return memGetAddress(struct + FT_Face.DRIVER); } - @Nullable public static FT_Memory nmemory(long struct) { return FT_Memory.createSafe(memGetAddress(struct + FT_Face.MEMORY)); } - @Nullable public static FT_Stream nstream$(long struct) { return FT_Stream.createSafe(memGetAddress(struct + FT_Face.STREAM)); } - public static FT_List nsizes_list(long struct) { return FT_List.create(struct + FT_Face.SIZES_LIST); } - public static FT_Generic nautohint(long struct) { return FT_Generic.create(struct + FT_Face.AUTOHINT); } - public static long nextensions(long struct) { return memGetAddress(struct + FT_Face.EXTENSIONS); } - public static long ninternal(long struct) { return memGetAddress(struct + FT_Face.INTERNAL); } - - // ----------------------------------- - - /** An array of {@link FT_Face} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Face ELEMENT_FACTORY = FT_Face.create(-1L); - - /** - * Creates a new {@code FT_Face.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Face#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Face getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code num_faces} field. */ - @NativeType("FT_Long") - public long num_faces() { return FT_Face.nnum_faces(address()); } - /** @return the value of the {@code face_index} field. */ - @NativeType("FT_Long") - public long face_index() { return FT_Face.nface_index(address()); } - /** @return the value of the {@code face_flags} field. */ - @NativeType("FT_Long") - public long face_flags() { return FT_Face.nface_flags(address()); } - /** @return the value of the {@code style_flags} field. */ - @NativeType("FT_Long") - public long style_flags() { return FT_Face.nstyle_flags(address()); } - /** @return the value of the {@code num_glyphs} field. */ - @NativeType("FT_Long") - public long num_glyphs() { return FT_Face.nnum_glyphs(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public ByteBuffer family_name() { return FT_Face.nfamily_name(address()); } - /** @return the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public String family_nameString() { return FT_Face.nfamily_nameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code style_name} field. */ - @NativeType("FT_String *") - public ByteBuffer style_name() { return FT_Face.nstyle_name(address()); } - /** @return the null-terminated string pointed to by the {@code style_name} field. */ - @NativeType("FT_String *") - public String style_nameString() { return FT_Face.nstyle_nameString(address()); } - /** @return the value of the {@code num_fixed_sizes} field. */ - @NativeType("FT_Int") - public int num_fixed_sizes() { return FT_Face.nnum_fixed_sizes(address()); } - /** @return a {@link FT_Bitmap_Size.Buffer} view of the struct array pointed to by the {@code available_sizes} field. */ - @Nullable - @NativeType("FT_Bitmap_Size *") - public FT_Bitmap_Size.Buffer available_sizes() { return FT_Face.navailable_sizes(address()); } - /** @return the value of the {@code num_charmaps} field. */ - @NativeType("FT_Int") - public int num_charmaps() { return FT_Face.nnum_charmaps(address()); } - /** @return a {@link PointerBuffer} view of the data pointed to by the {@code charmaps} field. */ - @NativeType("FT_CharMap *") - public PointerBuffer charmaps() { return FT_Face.ncharmaps(address()); } - /** @return a {@link FT_Generic} view of the {@code generic} field. */ - public FT_Generic generic() { return FT_Face.ngeneric(address()); } - /** @return a {@link FT_BBox} view of the {@code bbox} field. */ - public FT_BBox bbox() { return FT_Face.nbbox(address()); } - /** @return the value of the {@code units_per_EM} field. */ - @NativeType("FT_UShort") - public short units_per_EM() { return FT_Face.nunits_per_EM(address()); } - /** @return the value of the {@code ascender} field. */ - @NativeType("FT_Short") - public short ascender() { return FT_Face.nascender(address()); } - /** @return the value of the {@code descender} field. */ - @NativeType("FT_Short") - public short descender() { return FT_Face.ndescender(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_Short") - public short height() { return FT_Face.nheight(address()); } - /** @return the value of the {@code max_advance_width} field. */ - @NativeType("FT_Short") - public short max_advance_width() { return FT_Face.nmax_advance_width(address()); } - /** @return the value of the {@code max_advance_height} field. */ - @NativeType("FT_Short") - public short max_advance_height() { return FT_Face.nmax_advance_height(address()); } - /** @return the value of the {@code underline_position} field. */ - @NativeType("FT_Short") - public short underline_position() { return FT_Face.nunderline_position(address()); } - /** @return the value of the {@code underline_thickness} field. */ - @NativeType("FT_Short") - public short underline_thickness() { return FT_Face.nunderline_thickness(address()); } - /** @return a {@link FT_GlyphSlot} view of the struct pointed to by the {@code glyph} field. */ - @Nullable - public FT_GlyphSlot glyph() { return FT_Face.nglyph(address()); } - /** @return a {@link FT_Size} view of the struct pointed to by the {@code size} field. */ - @Nullable - public FT_Size size() { return FT_Face.nsize(address()); } - /** @return a {@link FT_CharMap} view of the struct pointed to by the {@code charmap} field. */ - @Nullable - public FT_CharMap charmap() { return FT_Face.ncharmap(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Free_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Free_Func.java deleted file mode 100644 index dc0a5e03..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Free_Func.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     void *block
    - * )
    - */ -public abstract class FT_Free_Func extends Callback implements FT_Free_FuncI { - - /** - * Creates a {@code FT_Free_Func} instance from the specified function pointer. - * - * @return the new {@code FT_Free_Func} - */ - public static FT_Free_Func create(long functionPointer) { - FT_Free_FuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Free_Func - ? (FT_Free_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Free_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Free_Func} instance that delegates to the specified {@code FT_Free_FuncI} instance. */ - public static FT_Free_Func create(FT_Free_FuncI instance) { - return instance instanceof FT_Free_Func - ? (FT_Free_Func)instance - : new Container(instance.address(), instance); - } - - protected FT_Free_Func() { - super(CIF); - } - - FT_Free_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Free_Func { - - private final FT_Free_FuncI delegate; - - Container(long functionPointer, FT_Free_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long memory, long block) { - delegate.invoke(memory, block); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Free_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Free_FuncI.java deleted file mode 100644 index a018838c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Free_FuncI.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     void *block
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Free_Func") -public interface FT_Free_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** A function used to release a given block of memory. */ - void invoke(@NativeType("FT_Memory") long memory, @NativeType("void *") long block); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic.java deleted file mode 100644 index 2124f7f9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might - * want to associate a glyph cache to a given size object. - * - *

    Layout

    - * - *
    
    - * struct FT_Generic {
    - *     void * data;
    - *     {@link FT_Generic_FinalizerI FT_Generic_Finalizer} finalizer;
    - * }
    - */ -public class FT_Generic extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - DATA, - FINALIZER; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - DATA = layout.offsetof(0); - FINALIZER = layout.offsetof(1); - } - - protected FT_Generic(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Generic create(long address, @Nullable ByteBuffer container) { - return new FT_Generic(address, container); - } - - /** - * Creates a {@code FT_Generic} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Generic(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code data} field. */ - @NativeType("void *") - public long data() { return ndata(address()); } - /** @return the value of the {@code finalizer} field. */ - public FT_Generic_Finalizer finalizer() { return nfinalizer(address()); } - - /** Sets the specified value to the {@code data} field. */ - public FT_Generic data(@NativeType("void *") long value) { ndata(address(), value); return this; } - /** Sets the specified value to the {@code finalizer} field. */ - public FT_Generic finalizer(@NativeType("FT_Generic_Finalizer") FT_Generic_FinalizerI value) { nfinalizer(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Generic set( - long data, - FT_Generic_FinalizerI finalizer - ) { - data(data); - finalizer(finalizer); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Generic set(FT_Generic src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Generic} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Generic malloc() { - return new FT_Generic(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Generic} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Generic calloc() { - return new FT_Generic(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Generic} instance allocated with {@link BufferUtils}. */ - public static FT_Generic create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Generic(memAddress(container), container); - } - - /** Returns a new {@code FT_Generic} instance for the specified memory address. */ - public static FT_Generic create(long address) { - return new FT_Generic(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Generic createSafe(long address) { - return address == NULL ? null : new FT_Generic(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Generic} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Generic malloc(MemoryStack stack) { - return new FT_Generic(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Generic} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Generic calloc(MemoryStack stack) { - return new FT_Generic(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #data}. */ - public static long ndata(long struct) { return memGetAddress(struct + FT_Generic.DATA); } - /** Unsafe version of {@link #finalizer}. */ - public static FT_Generic_Finalizer nfinalizer(long struct) { return FT_Generic_Finalizer.create(memGetAddress(struct + FT_Generic.FINALIZER)); } - - /** Unsafe version of {@link #data(long) data}. */ - public static void ndata(long struct, long value) { memPutAddress(struct + FT_Generic.DATA, value); } - /** Unsafe version of {@link #finalizer(FT_Generic_FinalizerI) finalizer}. */ - public static void nfinalizer(long struct, FT_Generic_FinalizerI value) { memPutAddress(struct + FT_Generic.FINALIZER, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + FT_Generic.FINALIZER)); - } - - // ----------------------------------- - - /** An array of {@link FT_Generic} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Generic ELEMENT_FACTORY = FT_Generic.create(-1L); - - /** - * Creates a new {@code FT_Generic.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Generic#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Generic getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code data} field. */ - @NativeType("void *") - public long data() { return FT_Generic.ndata(address()); } - /** @return the value of the {@code finalizer} field. */ - public FT_Generic_Finalizer finalizer() { return FT_Generic.nfinalizer(address()); } - - /** Sets the specified value to the {@code data} field. */ - public Buffer data(@NativeType("void *") long value) { FT_Generic.ndata(address(), value); return this; } - /** Sets the specified value to the {@code finalizer} field. */ - public Buffer finalizer(@NativeType("FT_Generic_Finalizer") FT_Generic_FinalizerI value) { FT_Generic.nfinalizer(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic_Finalizer.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic_Finalizer.java deleted file mode 100644 index e7a98696..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic_Finalizer.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *object
    - * )
    - */ -public abstract class FT_Generic_Finalizer extends Callback implements FT_Generic_FinalizerI { - - /** - * Creates a {@code FT_Generic_Finalizer} instance from the specified function pointer. - * - * @return the new {@code FT_Generic_Finalizer} - */ - public static FT_Generic_Finalizer create(long functionPointer) { - FT_Generic_FinalizerI instance = Callback.get(functionPointer); - return instance instanceof FT_Generic_Finalizer - ? (FT_Generic_Finalizer)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Generic_Finalizer createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Generic_Finalizer} instance that delegates to the specified {@code FT_Generic_FinalizerI} instance. */ - public static FT_Generic_Finalizer create(FT_Generic_FinalizerI instance) { - return instance instanceof FT_Generic_Finalizer - ? (FT_Generic_Finalizer)instance - : new Container(instance.address(), instance); - } - - protected FT_Generic_Finalizer() { - super(CIF); - } - - FT_Generic_Finalizer(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Generic_Finalizer { - - private final FT_Generic_FinalizerI delegate; - - Container(long functionPointer, FT_Generic_FinalizerI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long object) { - delegate.invoke(object); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic_FinalizerI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic_FinalizerI.java deleted file mode 100644 index dd032ace..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Generic_FinalizerI.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     void *object
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Generic_Finalizer") -public interface FT_Generic_FinalizerI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - /** - * Describe a function used to destroy the {@code client} data of any FreeType object. - * - * @param object the address of the FreeType object that is under finalization. Its client data is accessed through its {@code generic} field. - */ - void invoke(@NativeType("void *") long object); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Glyph.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Glyph.java deleted file mode 100644 index 77fbbcff..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Glyph.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed-point format. - * - *

    Layout

    - * - *
    
    - * struct FT_GlyphRec {
    - *     FT_Library library;
    - *     FT_Glyph_Class const * clazz;
    - *     FT_Glyph_Format format;
    - *     {@link FT_Vector FT_Vector} advance;
    - * }
    - */ -@NativeType("struct FT_GlyphRec") -public class FT_Glyph extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - LIBRARY, - CLAZZ, - FORMAT, - ADVANCE; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - LIBRARY = layout.offsetof(0); - CLAZZ = layout.offsetof(1); - FORMAT = layout.offsetof(2); - ADVANCE = layout.offsetof(3); - } - - protected FT_Glyph(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Glyph create(long address, @Nullable ByteBuffer container) { - return new FT_Glyph(address, container); - } - - /** - * Creates a {@code FT_Glyph} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Glyph(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code library} field. */ - @NativeType("FT_Library") - public long library() { return nlibrary(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("FT_Glyph_Format") - public int format() { return nformat(address()); } - /** @return a {@link FT_Vector} view of the {@code advance} field. */ - public FT_Vector advance() { return nadvance(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Glyph} instance for the specified memory address. */ - public static FT_Glyph create(long address) { - return new FT_Glyph(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Glyph createSafe(long address) { - return address == NULL ? null : new FT_Glyph(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #library}. */ - public static long nlibrary(long struct) { return memGetAddress(struct + FT_Glyph.LIBRARY); } - public static long nclazz(long struct) { return memGetAddress(struct + FT_Glyph.CLAZZ); } - /** Unsafe version of {@link #format}. */ - public static int nformat(long struct) { return UNSAFE.getInt(null, struct + FT_Glyph.FORMAT); } - /** Unsafe version of {@link #advance}. */ - public static FT_Vector nadvance(long struct) { return FT_Vector.create(struct + FT_Glyph.ADVANCE); } - - // ----------------------------------- - - /** An array of {@link FT_Glyph} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Glyph ELEMENT_FACTORY = FT_Glyph.create(-1L); - - /** - * Creates a new {@code FT_Glyph.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Glyph#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Glyph getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code library} field. */ - @NativeType("FT_Library") - public long library() { return FT_Glyph.nlibrary(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("FT_Glyph_Format") - public int format() { return FT_Glyph.nformat(address()); } - /** @return a {@link FT_Vector} view of the {@code advance} field. */ - public FT_Vector advance() { return FT_Glyph.nadvance(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_GlyphSlot.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_GlyphSlot.java deleted file mode 100644 index cf0f922d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_GlyphSlot.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * FreeType root glyph slot class structure. A glyph slot is a container where individual glyphs can be loaded, be they in outline or bitmap format. - * - *

    Layout

    - * - *
    
    - * struct FT_GlyphSlotRec {
    - *     FT_Library library;
    - *     {@link FT_Face FT_Face} face;
    - *     {@link FT_GlyphSlot FT_GlyphSlot} next;
    - *     FT_UInt glyph_index;
    - *     {@link FT_Generic FT_Generic} generic;
    - *     {@link FT_Glyph_Metrics FT_Glyph_Metrics} metrics;
    - *     FT_Fixed linearHoriAdvance;
    - *     FT_Fixed linearVertAdvance;
    - *     {@link FT_Vector FT_Vector} advance;
    - *     FT_Glyph_Format format;
    - *     {@link FT_Bitmap FT_Bitmap} bitmap;
    - *     FT_Int bitmap_left;
    - *     FT_Int bitmap_top;
    - *     {@link FT_Outline FT_Outline} outline;
    - *     FT_UInt num_subglyphs;
    - *     FT_SubGlyph subglyphs;
    - *     void * control_data;
    - *     long control_len;
    - *     FT_Pos lsb_delta;
    - *     FT_Pos rsb_delta;
    - *     void * other;
    - *     FT_Slot_Internal internal;
    - * }
    - */ -@NativeType("struct FT_GlyphSlotRec") -public class FT_GlyphSlot extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - LIBRARY, - FACE, - NEXT, - GLYPH_INDEX, - GENERIC, - METRICS, - LINEARHORIADVANCE, - LINEARVERTADVANCE, - ADVANCE, - FORMAT, - BITMAP, - BITMAP_LEFT, - BITMAP_TOP, - OUTLINE, - NUM_SUBGLYPHS, - SUBGLYPHS, - CONTROL_DATA, - CONTROL_LEN, - LSB_DELTA, - RSB_DELTA, - OTHER, - INTERNAL; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(FT_Generic.SIZEOF, FT_Generic.ALIGNOF), - __member(FT_Glyph_Metrics.SIZEOF, FT_Glyph_Metrics.ALIGNOF), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(4), - __member(FT_Bitmap.SIZEOF, FT_Bitmap.ALIGNOF), - __member(4), - __member(4), - __member(FT_Outline.SIZEOF, FT_Outline.ALIGNOF), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - LIBRARY = layout.offsetof(0); - FACE = layout.offsetof(1); - NEXT = layout.offsetof(2); - GLYPH_INDEX = layout.offsetof(3); - GENERIC = layout.offsetof(4); - METRICS = layout.offsetof(5); - LINEARHORIADVANCE = layout.offsetof(6); - LINEARVERTADVANCE = layout.offsetof(7); - ADVANCE = layout.offsetof(8); - FORMAT = layout.offsetof(9); - BITMAP = layout.offsetof(10); - BITMAP_LEFT = layout.offsetof(11); - BITMAP_TOP = layout.offsetof(12); - OUTLINE = layout.offsetof(13); - NUM_SUBGLYPHS = layout.offsetof(14); - SUBGLYPHS = layout.offsetof(15); - CONTROL_DATA = layout.offsetof(16); - CONTROL_LEN = layout.offsetof(17); - LSB_DELTA = layout.offsetof(18); - RSB_DELTA = layout.offsetof(19); - OTHER = layout.offsetof(20); - INTERNAL = layout.offsetof(21); - } - - protected FT_GlyphSlot(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_GlyphSlot create(long address, @Nullable ByteBuffer container) { - return new FT_GlyphSlot(address, container); - } - - /** - * Creates a {@code FT_GlyphSlot} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_GlyphSlot(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code library} field. */ - @NativeType("FT_Library") - public long library() { return nlibrary(address()); } - /** @return a {@link FT_Face} view of the struct pointed to by the {@code face} field. */ - public FT_Face face() { return nface(address()); } - /** @return a {@link FT_GlyphSlot} view of the struct pointed to by the {@code next} field. */ - @Nullable - public FT_GlyphSlot next() { return nnext(address()); } - /** @return the value of the {@code glyph_index} field. */ - @NativeType("FT_UInt") - public int glyph_index() { return nglyph_index(address()); } - /** @return a {@link FT_Generic} view of the {@code generic} field. */ - public FT_Generic generic() { return ngeneric(address()); } - /** @return a {@link FT_Glyph_Metrics} view of the {@code metrics} field. */ - public FT_Glyph_Metrics metrics() { return nmetrics(address()); } - /** @return the value of the {@code linearHoriAdvance} field. */ - @NativeType("FT_Fixed") - public long linearHoriAdvance() { return nlinearHoriAdvance(address()); } - /** @return the value of the {@code linearVertAdvance} field. */ - @NativeType("FT_Fixed") - public long linearVertAdvance() { return nlinearVertAdvance(address()); } - /** @return a {@link FT_Vector} view of the {@code advance} field. */ - public FT_Vector advance() { return nadvance(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("FT_Glyph_Format") - public int format() { return nformat(address()); } - /** @return a {@link FT_Bitmap} view of the {@code bitmap} field. */ - public FT_Bitmap bitmap() { return nbitmap(address()); } - /** @return the value of the {@code bitmap_left} field. */ - @NativeType("FT_Int") - public int bitmap_left() { return nbitmap_left(address()); } - /** @return the value of the {@code bitmap_top} field. */ - @NativeType("FT_Int") - public int bitmap_top() { return nbitmap_top(address()); } - /** @return a {@link FT_Outline} view of the {@code outline} field. */ - public FT_Outline outline() { return noutline(address()); } - /** @return the value of the {@code lsb_delta} field. */ - @NativeType("FT_Pos") - public long lsb_delta() { return nlsb_delta(address()); } - /** @return the value of the {@code rsb_delta} field. */ - @NativeType("FT_Pos") - public long rsb_delta() { return nrsb_delta(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_GlyphSlot} instance for the specified memory address. */ - public static FT_GlyphSlot create(long address) { - return new FT_GlyphSlot(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_GlyphSlot createSafe(long address) { - return address == NULL ? null : new FT_GlyphSlot(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #library}. */ - public static long nlibrary(long struct) { return memGetAddress(struct + FT_GlyphSlot.LIBRARY); } - /** Unsafe version of {@link #face}. */ - public static FT_Face nface(long struct) { return FT_Face.create(memGetAddress(struct + FT_GlyphSlot.FACE)); } - /** Unsafe version of {@link #next}. */ - @Nullable public static FT_GlyphSlot nnext(long struct) { return FT_GlyphSlot.createSafe(memGetAddress(struct + FT_GlyphSlot.NEXT)); } - /** Unsafe version of {@link #glyph_index}. */ - public static int nglyph_index(long struct) { return UNSAFE.getInt(null, struct + FT_GlyphSlot.GLYPH_INDEX); } - /** Unsafe version of {@link #generic}. */ - public static FT_Generic ngeneric(long struct) { return FT_Generic.create(struct + FT_GlyphSlot.GENERIC); } - /** Unsafe version of {@link #metrics}. */ - public static FT_Glyph_Metrics nmetrics(long struct) { return FT_Glyph_Metrics.create(struct + FT_GlyphSlot.METRICS); } - /** Unsafe version of {@link #linearHoriAdvance}. */ - public static long nlinearHoriAdvance(long struct) { return memGetCLong(struct + FT_GlyphSlot.LINEARHORIADVANCE); } - /** Unsafe version of {@link #linearVertAdvance}. */ - public static long nlinearVertAdvance(long struct) { return memGetCLong(struct + FT_GlyphSlot.LINEARVERTADVANCE); } - /** Unsafe version of {@link #advance}. */ - public static FT_Vector nadvance(long struct) { return FT_Vector.create(struct + FT_GlyphSlot.ADVANCE); } - /** Unsafe version of {@link #format}. */ - public static int nformat(long struct) { return UNSAFE.getInt(null, struct + FT_GlyphSlot.FORMAT); } - /** Unsafe version of {@link #bitmap}. */ - public static FT_Bitmap nbitmap(long struct) { return FT_Bitmap.create(struct + FT_GlyphSlot.BITMAP); } - /** Unsafe version of {@link #bitmap_left}. */ - public static int nbitmap_left(long struct) { return UNSAFE.getInt(null, struct + FT_GlyphSlot.BITMAP_LEFT); } - /** Unsafe version of {@link #bitmap_top}. */ - public static int nbitmap_top(long struct) { return UNSAFE.getInt(null, struct + FT_GlyphSlot.BITMAP_TOP); } - /** Unsafe version of {@link #outline}. */ - public static FT_Outline noutline(long struct) { return FT_Outline.create(struct + FT_GlyphSlot.OUTLINE); } - public static int nnum_subglyphs(long struct) { return UNSAFE.getInt(null, struct + FT_GlyphSlot.NUM_SUBGLYPHS); } - public static long nsubglyphs(long struct) { return memGetAddress(struct + FT_GlyphSlot.SUBGLYPHS); } - @Nullable public static ByteBuffer ncontrol_data(long struct) { return memByteBufferSafe(memGetAddress(struct + FT_GlyphSlot.CONTROL_DATA), (int)ncontrol_len(struct)); } - public static long ncontrol_len(long struct) { return memGetCLong(struct + FT_GlyphSlot.CONTROL_LEN); } - /** Unsafe version of {@link #lsb_delta}. */ - public static long nlsb_delta(long struct) { return memGetCLong(struct + FT_GlyphSlot.LSB_DELTA); } - /** Unsafe version of {@link #rsb_delta}. */ - public static long nrsb_delta(long struct) { return memGetCLong(struct + FT_GlyphSlot.RSB_DELTA); } - public static long nother(long struct) { return memGetAddress(struct + FT_GlyphSlot.OTHER); } - public static long ninternal(long struct) { return memGetAddress(struct + FT_GlyphSlot.INTERNAL); } - - // ----------------------------------- - - /** An array of {@link FT_GlyphSlot} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_GlyphSlot ELEMENT_FACTORY = FT_GlyphSlot.create(-1L); - - /** - * Creates a new {@code FT_GlyphSlot.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_GlyphSlot#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_GlyphSlot getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code library} field. */ - @NativeType("FT_Library") - public long library() { return FT_GlyphSlot.nlibrary(address()); } - /** @return a {@link FT_Face} view of the struct pointed to by the {@code face} field. */ - public FT_Face face() { return FT_GlyphSlot.nface(address()); } - /** @return a {@link FT_GlyphSlot} view of the struct pointed to by the {@code next} field. */ - @Nullable - public FT_GlyphSlot next() { return FT_GlyphSlot.nnext(address()); } - /** @return the value of the {@code glyph_index} field. */ - @NativeType("FT_UInt") - public int glyph_index() { return FT_GlyphSlot.nglyph_index(address()); } - /** @return a {@link FT_Generic} view of the {@code generic} field. */ - public FT_Generic generic() { return FT_GlyphSlot.ngeneric(address()); } - /** @return a {@link FT_Glyph_Metrics} view of the {@code metrics} field. */ - public FT_Glyph_Metrics metrics() { return FT_GlyphSlot.nmetrics(address()); } - /** @return the value of the {@code linearHoriAdvance} field. */ - @NativeType("FT_Fixed") - public long linearHoriAdvance() { return FT_GlyphSlot.nlinearHoriAdvance(address()); } - /** @return the value of the {@code linearVertAdvance} field. */ - @NativeType("FT_Fixed") - public long linearVertAdvance() { return FT_GlyphSlot.nlinearVertAdvance(address()); } - /** @return a {@link FT_Vector} view of the {@code advance} field. */ - public FT_Vector advance() { return FT_GlyphSlot.nadvance(address()); } - /** @return the value of the {@code format} field. */ - @NativeType("FT_Glyph_Format") - public int format() { return FT_GlyphSlot.nformat(address()); } - /** @return a {@link FT_Bitmap} view of the {@code bitmap} field. */ - public FT_Bitmap bitmap() { return FT_GlyphSlot.nbitmap(address()); } - /** @return the value of the {@code bitmap_left} field. */ - @NativeType("FT_Int") - public int bitmap_left() { return FT_GlyphSlot.nbitmap_left(address()); } - /** @return the value of the {@code bitmap_top} field. */ - @NativeType("FT_Int") - public int bitmap_top() { return FT_GlyphSlot.nbitmap_top(address()); } - /** @return a {@link FT_Outline} view of the {@code outline} field. */ - public FT_Outline outline() { return FT_GlyphSlot.noutline(address()); } - /** @return the value of the {@code lsb_delta} field. */ - @NativeType("FT_Pos") - public long lsb_delta() { return FT_GlyphSlot.nlsb_delta(address()); } - /** @return the value of the {@code rsb_delta} field. */ - @NativeType("FT_Pos") - public long rsb_delta() { return FT_GlyphSlot.nrsb_delta(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Glyph_Metrics.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Glyph_Metrics.java deleted file mode 100644 index 6642ed8d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Glyph_Metrics.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model the metrics of a single glyph. - * - *

    The values are expressed in 26.6 fractional pixel format; if the flag {@link FreeType#FT_LOAD_NO_SCALE LOAD_NO_SCALE} has been used while loading the glyph, values are expressed in - * font units instead.

    - * - *
    Note
    - * - *

    If not disabled with {@link FreeType#FT_LOAD_NO_HINTING LOAD_NO_HINTING}, the values represent dimensions of the hinted glyph (in case hinting is applicable).

    - * - *

    Stroking a glyph with an outside border does not increase {@code horiAdvance} or {@code vertAdvance}; you have to manually adjust these values to - * account for the added width and height.

    - * - *

    FreeType doesn't use the {@code VORG} table data for CFF fonts because it doesn't have an interface to quickly retrieve the glyph height. The - * y~coordinate of the vertical origin can be simply computed as {@code vertBearingY + height} after loading a glyph.

    - * - *

    Layout

    - * - *
    
    - * struct FT_Glyph_Metrics {
    - *     FT_Pos {@link #width};
    - *     FT_Pos {@link #height};
    - *     FT_Pos {@link #horiBearingX};
    - *     FT_Pos {@link #horiBearingY};
    - *     FT_Pos {@link #horiAdvance};
    - *     FT_Pos {@link #vertBearingX};
    - *     FT_Pos {@link #vertBearingY};
    - *     FT_Pos {@link #vertAdvance};
    - * }
    - */ -public class FT_Glyph_Metrics extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - WIDTH, - HEIGHT, - HORIBEARINGX, - HORIBEARINGY, - HORIADVANCE, - VERTBEARINGX, - VERTBEARINGY, - VERTADVANCE; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - WIDTH = layout.offsetof(0); - HEIGHT = layout.offsetof(1); - HORIBEARINGX = layout.offsetof(2); - HORIBEARINGY = layout.offsetof(3); - HORIADVANCE = layout.offsetof(4); - VERTBEARINGX = layout.offsetof(5); - VERTBEARINGY = layout.offsetof(6); - VERTADVANCE = layout.offsetof(7); - } - - protected FT_Glyph_Metrics(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Glyph_Metrics create(long address, @Nullable ByteBuffer container) { - return new FT_Glyph_Metrics(address, container); - } - - /** - * Creates a {@code FT_Glyph_Metrics} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Glyph_Metrics(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** the glyph's width */ - @NativeType("FT_Pos") - public long width() { return nwidth(address()); } - /** the glyph's height */ - @NativeType("FT_Pos") - public long height() { return nheight(address()); } - /** left side bearing for horizontal layout */ - @NativeType("FT_Pos") - public long horiBearingX() { return nhoriBearingX(address()); } - /** top side bearing for horizontal layout */ - @NativeType("FT_Pos") - public long horiBearingY() { return nhoriBearingY(address()); } - /** advance width for horizontal layout */ - @NativeType("FT_Pos") - public long horiAdvance() { return nhoriAdvance(address()); } - /** left side bearing for vertical layout */ - @NativeType("FT_Pos") - public long vertBearingX() { return nvertBearingX(address()); } - /** top side bearing for vertical layout. Larger positive values mean further below the vertical glyph origin */ - @NativeType("FT_Pos") - public long vertBearingY() { return nvertBearingY(address()); } - /** advance height for vertical layout. Positive values mean the glyph has a positive advance downward */ - @NativeType("FT_Pos") - public long vertAdvance() { return nvertAdvance(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Glyph_Metrics} instance for the specified memory address. */ - public static FT_Glyph_Metrics create(long address) { - return new FT_Glyph_Metrics(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Glyph_Metrics createSafe(long address) { - return address == NULL ? null : new FT_Glyph_Metrics(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #width}. */ - public static long nwidth(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static long nheight(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.HEIGHT); } - /** Unsafe version of {@link #horiBearingX}. */ - public static long nhoriBearingX(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.HORIBEARINGX); } - /** Unsafe version of {@link #horiBearingY}. */ - public static long nhoriBearingY(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.HORIBEARINGY); } - /** Unsafe version of {@link #horiAdvance}. */ - public static long nhoriAdvance(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.HORIADVANCE); } - /** Unsafe version of {@link #vertBearingX}. */ - public static long nvertBearingX(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.VERTBEARINGX); } - /** Unsafe version of {@link #vertBearingY}. */ - public static long nvertBearingY(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.VERTBEARINGY); } - /** Unsafe version of {@link #vertAdvance}. */ - public static long nvertAdvance(long struct) { return memGetCLong(struct + FT_Glyph_Metrics.VERTADVANCE); } - - // ----------------------------------- - - /** An array of {@link FT_Glyph_Metrics} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Glyph_Metrics ELEMENT_FACTORY = FT_Glyph_Metrics.create(-1L); - - /** - * Creates a new {@code FT_Glyph_Metrics.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Glyph_Metrics#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Glyph_Metrics getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link FT_Glyph_Metrics#width} field. */ - @NativeType("FT_Pos") - public long width() { return FT_Glyph_Metrics.nwidth(address()); } - /** @return the value of the {@link FT_Glyph_Metrics#height} field. */ - @NativeType("FT_Pos") - public long height() { return FT_Glyph_Metrics.nheight(address()); } - /** @return the value of the {@link FT_Glyph_Metrics#horiBearingX} field. */ - @NativeType("FT_Pos") - public long horiBearingX() { return FT_Glyph_Metrics.nhoriBearingX(address()); } - /** @return the value of the {@link FT_Glyph_Metrics#horiBearingY} field. */ - @NativeType("FT_Pos") - public long horiBearingY() { return FT_Glyph_Metrics.nhoriBearingY(address()); } - /** @return the value of the {@link FT_Glyph_Metrics#horiAdvance} field. */ - @NativeType("FT_Pos") - public long horiAdvance() { return FT_Glyph_Metrics.nhoriAdvance(address()); } - /** @return the value of the {@link FT_Glyph_Metrics#vertBearingX} field. */ - @NativeType("FT_Pos") - public long vertBearingX() { return FT_Glyph_Metrics.nvertBearingX(address()); } - /** @return the value of the {@link FT_Glyph_Metrics#vertBearingY} field. */ - @NativeType("FT_Pos") - public long vertBearingY() { return FT_Glyph_Metrics.nvertBearingY(address()); } - /** @return the value of the {@link FT_Glyph_Metrics#vertAdvance} field. */ - @NativeType("FT_Pos") - public long vertAdvance() { return FT_Glyph_Metrics.nvertAdvance(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_FreeGlyphDataFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_FreeGlyphDataFunc.java deleted file mode 100644 index 94dfe4ed..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_FreeGlyphDataFunc.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Incremental incremental,
    - *     FT_Data *data
    - * )
    - */ -public abstract class FT_Incremental_FreeGlyphDataFunc extends Callback implements FT_Incremental_FreeGlyphDataFuncI { - - /** - * Creates a {@code FT_Incremental_FreeGlyphDataFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Incremental_FreeGlyphDataFunc} - */ - public static FT_Incremental_FreeGlyphDataFunc create(long functionPointer) { - FT_Incremental_FreeGlyphDataFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Incremental_FreeGlyphDataFunc - ? (FT_Incremental_FreeGlyphDataFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Incremental_FreeGlyphDataFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Incremental_FreeGlyphDataFunc} instance that delegates to the specified {@code FT_Incremental_FreeGlyphDataFuncI} instance. */ - public static FT_Incremental_FreeGlyphDataFunc create(FT_Incremental_FreeGlyphDataFuncI instance) { - return instance instanceof FT_Incremental_FreeGlyphDataFunc - ? (FT_Incremental_FreeGlyphDataFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Incremental_FreeGlyphDataFunc() { - super(CIF); - } - - FT_Incremental_FreeGlyphDataFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Incremental_FreeGlyphDataFunc { - - private final FT_Incremental_FreeGlyphDataFuncI delegate; - - Container(long functionPointer, FT_Incremental_FreeGlyphDataFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long incremental, long data) { - delegate.invoke(incremental, data); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_FreeGlyphDataFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_FreeGlyphDataFuncI.java deleted file mode 100644 index e70c4bd3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_FreeGlyphDataFuncI.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Incremental incremental,
    - *     FT_Data *data
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Incremental_FreeGlyphDataFunc") -public interface FT_Incremental_FreeGlyphDataFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - } - - /** A function used to release the glyph data bytes returned by a successful call to {@link FT_Incremental_GetGlyphDataFunc}. */ - void invoke(@NativeType("FT_Incremental") long incremental, @NativeType("FT_Data *") long data); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Funcs.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Funcs.java deleted file mode 100644 index 30df7fed..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Funcs.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A table of functions for accessing fonts that load data incrementally. Used in {@link FT_Incremental_Interface}. - * - *

    Layout

    - * - *
    
    - * struct FT_Incremental_FuncsRec {
    - *     {@link FT_Incremental_GetGlyphDataFuncI FT_Incremental_GetGlyphDataFunc} get_glyph_data;
    - *     {@link FT_Incremental_FreeGlyphDataFuncI FT_Incremental_FreeGlyphDataFunc} free_glyph_data;
    - *     {@link FT_Incremental_GetGlyphMetricsFuncI FT_Incremental_GetGlyphMetricsFunc} get_glyph_metrics;
    - * }
    - */ -@NativeType("struct FT_Incremental_FuncsRec") -public class FT_Incremental_Funcs extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - GET_GLYPH_DATA, - FREE_GLYPH_DATA, - GET_GLYPH_METRICS; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - GET_GLYPH_DATA = layout.offsetof(0); - FREE_GLYPH_DATA = layout.offsetof(1); - GET_GLYPH_METRICS = layout.offsetof(2); - } - - protected FT_Incremental_Funcs(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Incremental_Funcs create(long address, @Nullable ByteBuffer container) { - return new FT_Incremental_Funcs(address, container); - } - - /** - * Creates a {@code FT_Incremental_Funcs} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Incremental_Funcs(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code get_glyph_data} field. */ - public FT_Incremental_GetGlyphDataFunc get_glyph_data() { return nget_glyph_data(address()); } - /** @return the value of the {@code free_glyph_data} field. */ - public FT_Incremental_FreeGlyphDataFunc free_glyph_data() { return nfree_glyph_data(address()); } - /** @return the value of the {@code get_glyph_metrics} field. */ - @Nullable - public FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics() { return nget_glyph_metrics(address()); } - - /** Sets the specified value to the {@code get_glyph_data} field. */ - public FT_Incremental_Funcs get_glyph_data(@NativeType("FT_Incremental_GetGlyphDataFunc") FT_Incremental_GetGlyphDataFuncI value) { nget_glyph_data(address(), value); return this; } - /** Sets the specified value to the {@code free_glyph_data} field. */ - public FT_Incremental_Funcs free_glyph_data(@NativeType("FT_Incremental_FreeGlyphDataFunc") FT_Incremental_FreeGlyphDataFuncI value) { nfree_glyph_data(address(), value); return this; } - /** Sets the specified value to the {@code get_glyph_metrics} field. */ - public FT_Incremental_Funcs get_glyph_metrics(@Nullable @NativeType("FT_Incremental_GetGlyphMetricsFunc") FT_Incremental_GetGlyphMetricsFuncI value) { nget_glyph_metrics(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Incremental_Funcs set( - FT_Incremental_GetGlyphDataFuncI get_glyph_data, - FT_Incremental_FreeGlyphDataFuncI free_glyph_data, - FT_Incremental_GetGlyphMetricsFuncI get_glyph_metrics - ) { - get_glyph_data(get_glyph_data); - free_glyph_data(free_glyph_data); - get_glyph_metrics(get_glyph_metrics); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Incremental_Funcs set(FT_Incremental_Funcs src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Incremental_Funcs} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Incremental_Funcs malloc() { - return new FT_Incremental_Funcs(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Incremental_Funcs} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Incremental_Funcs calloc() { - return new FT_Incremental_Funcs(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Incremental_Funcs} instance allocated with {@link BufferUtils}. */ - public static FT_Incremental_Funcs create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Incremental_Funcs(memAddress(container), container); - } - - /** Returns a new {@code FT_Incremental_Funcs} instance for the specified memory address. */ - public static FT_Incremental_Funcs create(long address) { - return new FT_Incremental_Funcs(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Incremental_Funcs createSafe(long address) { - return address == NULL ? null : new FT_Incremental_Funcs(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Incremental_Funcs} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Incremental_Funcs malloc(MemoryStack stack) { - return new FT_Incremental_Funcs(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Incremental_Funcs} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Incremental_Funcs calloc(MemoryStack stack) { - return new FT_Incremental_Funcs(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #get_glyph_data}. */ - public static FT_Incremental_GetGlyphDataFunc nget_glyph_data(long struct) { return FT_Incremental_GetGlyphDataFunc.create(memGetAddress(struct + FT_Incremental_Funcs.GET_GLYPH_DATA)); } - /** Unsafe version of {@link #free_glyph_data}. */ - public static FT_Incremental_FreeGlyphDataFunc nfree_glyph_data(long struct) { return FT_Incremental_FreeGlyphDataFunc.create(memGetAddress(struct + FT_Incremental_Funcs.FREE_GLYPH_DATA)); } - /** Unsafe version of {@link #get_glyph_metrics}. */ - @Nullable public static FT_Incremental_GetGlyphMetricsFunc nget_glyph_metrics(long struct) { return FT_Incremental_GetGlyphMetricsFunc.createSafe(memGetAddress(struct + FT_Incremental_Funcs.GET_GLYPH_METRICS)); } - - /** Unsafe version of {@link #get_glyph_data(FT_Incremental_GetGlyphDataFuncI) get_glyph_data}. */ - public static void nget_glyph_data(long struct, FT_Incremental_GetGlyphDataFuncI value) { memPutAddress(struct + FT_Incremental_Funcs.GET_GLYPH_DATA, value.address()); } - /** Unsafe version of {@link #free_glyph_data(FT_Incremental_FreeGlyphDataFuncI) free_glyph_data}. */ - public static void nfree_glyph_data(long struct, FT_Incremental_FreeGlyphDataFuncI value) { memPutAddress(struct + FT_Incremental_Funcs.FREE_GLYPH_DATA, value.address()); } - /** Unsafe version of {@link #get_glyph_metrics(FT_Incremental_GetGlyphMetricsFuncI) get_glyph_metrics}. */ - public static void nget_glyph_metrics(long struct, @Nullable FT_Incremental_GetGlyphMetricsFuncI value) { memPutAddress(struct + FT_Incremental_Funcs.GET_GLYPH_METRICS, memAddressSafe(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + FT_Incremental_Funcs.GET_GLYPH_DATA)); - check(memGetAddress(struct + FT_Incremental_Funcs.FREE_GLYPH_DATA)); - } - - // ----------------------------------- - - /** An array of {@link FT_Incremental_Funcs} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Incremental_Funcs ELEMENT_FACTORY = FT_Incremental_Funcs.create(-1L); - - /** - * Creates a new {@code FT_Incremental_Funcs.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Incremental_Funcs#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Incremental_Funcs getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code get_glyph_data} field. */ - public FT_Incremental_GetGlyphDataFunc get_glyph_data() { return FT_Incremental_Funcs.nget_glyph_data(address()); } - /** @return the value of the {@code free_glyph_data} field. */ - public FT_Incremental_FreeGlyphDataFunc free_glyph_data() { return FT_Incremental_Funcs.nfree_glyph_data(address()); } - /** @return the value of the {@code get_glyph_metrics} field. */ - @Nullable - public FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics() { return FT_Incremental_Funcs.nget_glyph_metrics(address()); } - - /** Sets the specified value to the {@code get_glyph_data} field. */ - public Buffer get_glyph_data(@NativeType("FT_Incremental_GetGlyphDataFunc") FT_Incremental_GetGlyphDataFuncI value) { FT_Incremental_Funcs.nget_glyph_data(address(), value); return this; } - /** Sets the specified value to the {@code free_glyph_data} field. */ - public Buffer free_glyph_data(@NativeType("FT_Incremental_FreeGlyphDataFunc") FT_Incremental_FreeGlyphDataFuncI value) { FT_Incremental_Funcs.nfree_glyph_data(address(), value); return this; } - /** Sets the specified value to the {@code get_glyph_metrics} field. */ - public Buffer get_glyph_metrics(@Nullable @NativeType("FT_Incremental_GetGlyphMetricsFunc") FT_Incremental_GetGlyphMetricsFuncI value) { FT_Incremental_Funcs.nget_glyph_metrics(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphDataFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphDataFunc.java deleted file mode 100644 index 74ae8b85..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphDataFunc.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Incremental incremental,
    - *     FT_UInt glyph_index,
    - *     FT_Data *adata
    - * )
    - */ -public abstract class FT_Incremental_GetGlyphDataFunc extends Callback implements FT_Incremental_GetGlyphDataFuncI { - - /** - * Creates a {@code FT_Incremental_GetGlyphDataFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Incremental_GetGlyphDataFunc} - */ - public static FT_Incremental_GetGlyphDataFunc create(long functionPointer) { - FT_Incremental_GetGlyphDataFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Incremental_GetGlyphDataFunc - ? (FT_Incremental_GetGlyphDataFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Incremental_GetGlyphDataFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Incremental_GetGlyphDataFunc} instance that delegates to the specified {@code FT_Incremental_GetGlyphDataFuncI} instance. */ - public static FT_Incremental_GetGlyphDataFunc create(FT_Incremental_GetGlyphDataFuncI instance) { - return instance instanceof FT_Incremental_GetGlyphDataFunc - ? (FT_Incremental_GetGlyphDataFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Incremental_GetGlyphDataFunc() { - super(CIF); - } - - FT_Incremental_GetGlyphDataFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Incremental_GetGlyphDataFunc { - - private final FT_Incremental_GetGlyphDataFuncI delegate; - - Container(long functionPointer, FT_Incremental_GetGlyphDataFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long incremental, int glyph_index, long adata) { - return delegate.invoke(incremental, glyph_index, adata); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphDataFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphDataFuncI.java deleted file mode 100644 index 1fa3ad8e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphDataFuncI.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Incremental incremental,
    - *     FT_UInt glyph_index,
    - *     FT_Data *adata
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Incremental_GetGlyphDataFunc") -public interface FT_Incremental_GetGlyphDataFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_uint32, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function called by FreeType to access a given glyph's data bytes during {@link FreeType#FT_Load_Glyph Load_Glyph} or {@link FreeType#FT_Load_Char Load_Char} if incremental loading is enabled. */ - @NativeType("FT_Error") int invoke(@NativeType("FT_Incremental") long incremental, @NativeType("FT_UInt") int glyph_index, @NativeType("FT_Data *") long adata); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphMetricsFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphMetricsFunc.java deleted file mode 100644 index ad6b6ab3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphMetricsFunc.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Incremental incremental,
    - *     FT_UInt glyph_index,
    - *     FT_Bool vertical,
    - *     FT_Incremental_MetricsRec *ametrics
    - * )
    - */ -public abstract class FT_Incremental_GetGlyphMetricsFunc extends Callback implements FT_Incremental_GetGlyphMetricsFuncI { - - /** - * Creates a {@code FT_Incremental_GetGlyphMetricsFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Incremental_GetGlyphMetricsFunc} - */ - public static FT_Incremental_GetGlyphMetricsFunc create(long functionPointer) { - FT_Incremental_GetGlyphMetricsFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Incremental_GetGlyphMetricsFunc - ? (FT_Incremental_GetGlyphMetricsFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Incremental_GetGlyphMetricsFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Incremental_GetGlyphMetricsFunc} instance that delegates to the specified {@code FT_Incremental_GetGlyphMetricsFuncI} instance. */ - public static FT_Incremental_GetGlyphMetricsFunc create(FT_Incremental_GetGlyphMetricsFuncI instance) { - return instance instanceof FT_Incremental_GetGlyphMetricsFunc - ? (FT_Incremental_GetGlyphMetricsFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Incremental_GetGlyphMetricsFunc() { - super(CIF); - } - - FT_Incremental_GetGlyphMetricsFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Incremental_GetGlyphMetricsFunc { - - private final FT_Incremental_GetGlyphMetricsFuncI delegate; - - Container(long functionPointer, FT_Incremental_GetGlyphMetricsFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long incremental, int glyph_index, boolean vertical, long ametrics) { - return delegate.invoke(incremental, glyph_index, vertical, ametrics); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphMetricsFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphMetricsFuncI.java deleted file mode 100644 index b0d0ed1a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_GetGlyphMetricsFuncI.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Incremental incremental,
    - *     FT_UInt glyph_index,
    - *     FT_Bool vertical,
    - *     FT_Incremental_MetricsRec *ametrics
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Incremental_GetGlyphMetricsFunc") -public interface FT_Incremental_GetGlyphMetricsFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_uint32, ffi_type_uint8, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetByte(memGetAddress(args + 2 * POINTER_SIZE)) != 0, - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function used to retrieve the basic metrics of a given glyph index before accessing its data. */ - @NativeType("FT_Error") int invoke(@NativeType("FT_Incremental") long incremental, @NativeType("FT_UInt") int glyph_index, @NativeType("FT_Bool") boolean vertical, @NativeType("FT_Incremental_MetricsRec *") long ametrics); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Interface.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Interface.java deleted file mode 100644 index e993128a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Interface.java +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure to be used with {@link FreeType#FT_Open_Face Open_Face} to indicate that the user wants to support incremental glyph loading. - * - *

    Layout

    - * - *
    
    - * struct FT_Incremental_InterfaceRec {
    - *     {@link FT_Incremental_Funcs FT_Incremental_FuncsRec} const * funcs;
    - *     FT_Incremental object;
    - * }
    - */ -@NativeType("struct FT_Incremental_InterfaceRec") -public class FT_Incremental_Interface extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FUNCS, - OBJECT; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FUNCS = layout.offsetof(0); - OBJECT = layout.offsetof(1); - } - - protected FT_Incremental_Interface(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Incremental_Interface create(long address, @Nullable ByteBuffer container) { - return new FT_Incremental_Interface(address, container); - } - - /** - * Creates a {@code FT_Incremental_Interface} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Incremental_Interface(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Incremental_Funcs} view of the struct pointed to by the {@code funcs} field. */ - @NativeType("FT_Incremental_FuncsRec const *") - public FT_Incremental_Funcs funcs() { return nfuncs(address()); } - /** @return the value of the {@code object} field. */ - @NativeType("FT_Incremental") - public long object() { return nobject(address()); } - - /** Sets the address of the specified {@link FT_Incremental_Funcs} to the {@code funcs} field. */ - public FT_Incremental_Interface funcs(@NativeType("FT_Incremental_FuncsRec const *") FT_Incremental_Funcs value) { nfuncs(address(), value); return this; } - /** Sets the specified value to the {@code object} field. */ - public FT_Incremental_Interface object(@NativeType("FT_Incremental") long value) { nobject(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Incremental_Interface set( - FT_Incremental_Funcs funcs, - long object - ) { - funcs(funcs); - object(object); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Incremental_Interface set(FT_Incremental_Interface src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Incremental_Interface} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Incremental_Interface malloc() { - return new FT_Incremental_Interface(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Incremental_Interface} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Incremental_Interface calloc() { - return new FT_Incremental_Interface(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Incremental_Interface} instance allocated with {@link BufferUtils}. */ - public static FT_Incremental_Interface create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Incremental_Interface(memAddress(container), container); - } - - /** Returns a new {@code FT_Incremental_Interface} instance for the specified memory address. */ - public static FT_Incremental_Interface create(long address) { - return new FT_Incremental_Interface(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Incremental_Interface createSafe(long address) { - return address == NULL ? null : new FT_Incremental_Interface(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Incremental_Interface} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Incremental_Interface malloc(MemoryStack stack) { - return new FT_Incremental_Interface(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Incremental_Interface} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Incremental_Interface calloc(MemoryStack stack) { - return new FT_Incremental_Interface(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #funcs}. */ - public static FT_Incremental_Funcs nfuncs(long struct) { return FT_Incremental_Funcs.create(memGetAddress(struct + FT_Incremental_Interface.FUNCS)); } - /** Unsafe version of {@link #object}. */ - public static long nobject(long struct) { return memGetAddress(struct + FT_Incremental_Interface.OBJECT); } - - /** Unsafe version of {@link #funcs(FT_Incremental_Funcs) funcs}. */ - public static void nfuncs(long struct, FT_Incremental_Funcs value) { memPutAddress(struct + FT_Incremental_Interface.FUNCS, value.address()); } - /** Unsafe version of {@link #object(long) object}. */ - public static void nobject(long struct, long value) { memPutAddress(struct + FT_Incremental_Interface.OBJECT, value); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - long funcs = memGetAddress(struct + FT_Incremental_Interface.FUNCS); - check(funcs); - FT_Incremental_Funcs.validate(funcs); - } - - // ----------------------------------- - - /** An array of {@link FT_Incremental_Interface} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Incremental_Interface ELEMENT_FACTORY = FT_Incremental_Interface.create(-1L); - - /** - * Creates a new {@code FT_Incremental_Interface.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Incremental_Interface#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Incremental_Interface getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Incremental_Funcs} view of the struct pointed to by the {@code funcs} field. */ - @NativeType("FT_Incremental_FuncsRec const *") - public FT_Incremental_Funcs funcs() { return FT_Incremental_Interface.nfuncs(address()); } - /** @return the value of the {@code object} field. */ - @NativeType("FT_Incremental") - public long object() { return FT_Incremental_Interface.nobject(address()); } - - /** Sets the address of the specified {@link FT_Incremental_Funcs} to the {@code funcs} field. */ - public Buffer funcs(@NativeType("FT_Incremental_FuncsRec const *") FT_Incremental_Funcs value) { FT_Incremental_Interface.nfuncs(address(), value); return this; } - /** Sets the specified value to the {@code object} field. */ - public Buffer object(@NativeType("FT_Incremental") long value) { FT_Incremental_Interface.nobject(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Metrics.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Metrics.java deleted file mode 100644 index 700d8851..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Incremental_Metrics.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A small structure used to contain the basic glyph metrics returned by the {@link FT_Incremental_GetGlyphMetricsFunc} method. - * - *

    Layout

    - * - *
    
    - * struct FT_Incremental_MetricsRec {
    - *     FT_Long bearing_x;
    - *     FT_Long bearing_y;
    - *     FT_Long advance;
    - *     FT_Long advance_v;
    - * }
    - */ -@NativeType("struct FT_Incremental_MetricsRec") -public class FT_Incremental_Metrics extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BEARING_X, - BEARING_Y, - ADVANCE, - ADVANCE_V; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BEARING_X = layout.offsetof(0); - BEARING_Y = layout.offsetof(1); - ADVANCE = layout.offsetof(2); - ADVANCE_V = layout.offsetof(3); - } - - protected FT_Incremental_Metrics(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Incremental_Metrics create(long address, @Nullable ByteBuffer container) { - return new FT_Incremental_Metrics(address, container); - } - - /** - * Creates a {@code FT_Incremental_Metrics} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Incremental_Metrics(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code bearing_x} field. */ - @NativeType("FT_Long") - public long bearing_x() { return nbearing_x(address()); } - /** @return the value of the {@code bearing_y} field. */ - @NativeType("FT_Long") - public long bearing_y() { return nbearing_y(address()); } - /** @return the value of the {@code advance} field. */ - @NativeType("FT_Long") - public long advance() { return nadvance(address()); } - /** @return the value of the {@code advance_v} field. */ - @NativeType("FT_Long") - public long advance_v() { return nadvance_v(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Incremental_Metrics} instance for the specified memory address. */ - public static FT_Incremental_Metrics create(long address) { - return new FT_Incremental_Metrics(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Incremental_Metrics createSafe(long address) { - return address == NULL ? null : new FT_Incremental_Metrics(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #bearing_x}. */ - public static long nbearing_x(long struct) { return memGetCLong(struct + FT_Incremental_Metrics.BEARING_X); } - /** Unsafe version of {@link #bearing_y}. */ - public static long nbearing_y(long struct) { return memGetCLong(struct + FT_Incremental_Metrics.BEARING_Y); } - /** Unsafe version of {@link #advance}. */ - public static long nadvance(long struct) { return memGetCLong(struct + FT_Incremental_Metrics.ADVANCE); } - /** Unsafe version of {@link #advance_v}. */ - public static long nadvance_v(long struct) { return memGetCLong(struct + FT_Incremental_Metrics.ADVANCE_V); } - - // ----------------------------------- - - /** An array of {@link FT_Incremental_Metrics} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Incremental_Metrics ELEMENT_FACTORY = FT_Incremental_Metrics.create(-1L); - - /** - * Creates a new {@code FT_Incremental_Metrics.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Incremental_Metrics#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Incremental_Metrics getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code bearing_x} field. */ - @NativeType("FT_Long") - public long bearing_x() { return FT_Incremental_Metrics.nbearing_x(address()); } - /** @return the value of the {@code bearing_y} field. */ - @NativeType("FT_Long") - public long bearing_y() { return FT_Incremental_Metrics.nbearing_y(address()); } - /** @return the value of the {@code advance} field. */ - @NativeType("FT_Long") - public long advance() { return FT_Incremental_Metrics.nadvance(address()); } - /** @return the value of the {@code advance_v} field. */ - @NativeType("FT_Long") - public long advance_v() { return FT_Incremental_Metrics.nadvance_v(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_LayerIterator.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_LayerIterator.java deleted file mode 100644 index 465c8245..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_LayerIterator.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * This iterator object is needed for {@link FreeType#FT_Get_Color_Glyph_Layer Get_Color_Glyph_Layer}. - * - *

    Layout

    - * - *
    
    - * struct FT_LayerIterator {
    - *     FT_UInt num_layers;
    - *     FT_UInt layer;
    - *     FT_Byte * p;
    - * }
    - */ -public class FT_LayerIterator extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NUM_LAYERS, - LAYER, - P; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NUM_LAYERS = layout.offsetof(0); - LAYER = layout.offsetof(1); - P = layout.offsetof(2); - } - - protected FT_LayerIterator(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_LayerIterator create(long address, @Nullable ByteBuffer container) { - return new FT_LayerIterator(address, container); - } - - /** - * Creates a {@code FT_LayerIterator} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_LayerIterator(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code num_layers} field. */ - @NativeType("FT_UInt") - public int num_layers() { return nnum_layers(address()); } - /** @return the value of the {@code layer} field. */ - @NativeType("FT_UInt") - public int layer() { return nlayer(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code p} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Byte *") - public ByteBuffer p(int capacity) { return np(address(), capacity); } - - // ----------------------------------- - - /** Returns a new {@code FT_LayerIterator} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_LayerIterator malloc() { - return new FT_LayerIterator(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_LayerIterator} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_LayerIterator calloc() { - return new FT_LayerIterator(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_LayerIterator} instance allocated with {@link BufferUtils}. */ - public static FT_LayerIterator create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_LayerIterator(memAddress(container), container); - } - - /** Returns a new {@code FT_LayerIterator} instance for the specified memory address. */ - public static FT_LayerIterator create(long address) { - return new FT_LayerIterator(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_LayerIterator createSafe(long address) { - return address == NULL ? null : new FT_LayerIterator(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_LayerIterator} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_LayerIterator malloc(MemoryStack stack) { - return new FT_LayerIterator(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_LayerIterator} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_LayerIterator calloc(MemoryStack stack) { - return new FT_LayerIterator(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #num_layers}. */ - public static int nnum_layers(long struct) { return UNSAFE.getInt(null, struct + FT_LayerIterator.NUM_LAYERS); } - /** Unsafe version of {@link #layer}. */ - public static int nlayer(long struct) { return UNSAFE.getInt(null, struct + FT_LayerIterator.LAYER); } - /** Unsafe version of {@link #p(int) p}. */ - @Nullable public static ByteBuffer np(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_LayerIterator.P), capacity); } - - // ----------------------------------- - - /** An array of {@link FT_LayerIterator} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_LayerIterator ELEMENT_FACTORY = FT_LayerIterator.create(-1L); - - /** - * Creates a new {@code FT_LayerIterator.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_LayerIterator#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_LayerIterator getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code num_layers} field. */ - @NativeType("FT_UInt") - public int num_layers() { return FT_LayerIterator.nnum_layers(address()); } - /** @return the value of the {@code layer} field. */ - @NativeType("FT_UInt") - public int layer() { return FT_LayerIterator.nlayer(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code p} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Byte *") - public ByteBuffer p(int capacity) { return FT_LayerIterator.np(address(), capacity); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List.java deleted file mode 100644 index 1ffee56b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to hold a simple doubly-linked list. These are used in many parts of FreeType. - * - *

    Layout

    - * - *
    
    - * struct FT_ListRec {
    - *     {@link FT_ListNode FT_ListNode} head;
    - *     {@link FT_ListNode FT_ListNode} tail;
    - * }
    - */ -@NativeType("struct FT_ListRec") -public class FT_List extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - HEAD, - TAIL; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - HEAD = layout.offsetof(0); - TAIL = layout.offsetof(1); - } - - protected FT_List(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_List create(long address, @Nullable ByteBuffer container) { - return new FT_List(address, container); - } - - /** - * Creates a {@code FT_List} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_List(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code head} field. */ - @Nullable - public FT_ListNode head() { return nhead(address()); } - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code tail} field. */ - @Nullable - public FT_ListNode tail() { return ntail(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_List} instance for the specified memory address. */ - public static FT_List create(long address) { - return new FT_List(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_List createSafe(long address) { - return address == NULL ? null : new FT_List(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #head}. */ - @Nullable public static FT_ListNode nhead(long struct) { return FT_ListNode.createSafe(memGetAddress(struct + FT_List.HEAD)); } - /** Unsafe version of {@link #tail}. */ - @Nullable public static FT_ListNode ntail(long struct) { return FT_ListNode.createSafe(memGetAddress(struct + FT_List.TAIL)); } - - // ----------------------------------- - - /** An array of {@link FT_List} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_List ELEMENT_FACTORY = FT_List.create(-1L); - - /** - * Creates a new {@code FT_List.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_List#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_List getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code head} field. */ - @Nullable - public FT_ListNode head() { return FT_List.nhead(address()); } - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code tail} field. */ - @Nullable - public FT_ListNode tail() { return FT_List.ntail(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ListNode.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ListNode.java deleted file mode 100644 index d43d5e2c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_ListNode.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to hold a single list element. - * - *

    Layout

    - * - *
    
    - * struct FT_ListNodeRec {
    - *     {@link FT_ListNode FT_ListNode} prev;
    - *     {@link FT_ListNode FT_ListNode} next;
    - *     void * data;
    - * }
    - */ -@NativeType("struct FT_ListNodeRec") -public class FT_ListNode extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PREV, - NEXT, - DATA; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PREV = layout.offsetof(0); - NEXT = layout.offsetof(1); - DATA = layout.offsetof(2); - } - - protected FT_ListNode(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_ListNode create(long address, @Nullable ByteBuffer container) { - return new FT_ListNode(address, container); - } - - /** - * Creates a {@code FT_ListNode} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_ListNode(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code prev} field. */ - @Nullable - public FT_ListNode prev() { return nprev(address()); } - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code next} field. */ - @Nullable - public FT_ListNode next() { return nnext(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code data} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("void *") - public ByteBuffer data(int capacity) { return ndata(address(), capacity); } - - // ----------------------------------- - - /** Returns a new {@code FT_ListNode} instance for the specified memory address. */ - public static FT_ListNode create(long address) { - return new FT_ListNode(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_ListNode createSafe(long address) { - return address == NULL ? null : new FT_ListNode(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #prev}. */ - @Nullable public static FT_ListNode nprev(long struct) { return FT_ListNode.createSafe(memGetAddress(struct + FT_ListNode.PREV)); } - /** Unsafe version of {@link #next}. */ - @Nullable public static FT_ListNode nnext(long struct) { return FT_ListNode.createSafe(memGetAddress(struct + FT_ListNode.NEXT)); } - /** Unsafe version of {@link #data(int) data}. */ - public static ByteBuffer ndata(long struct, int capacity) { return memByteBuffer(memGetAddress(struct + FT_ListNode.DATA), capacity); } - - // ----------------------------------- - - /** An array of {@link FT_ListNode} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_ListNode ELEMENT_FACTORY = FT_ListNode.create(-1L); - - /** - * Creates a new {@code FT_ListNode.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_ListNode#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_ListNode getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code prev} field. */ - @Nullable - public FT_ListNode prev() { return FT_ListNode.nprev(address()); } - /** @return a {@link FT_ListNode} view of the struct pointed to by the {@code next} field. */ - @Nullable - public FT_ListNode next() { return FT_ListNode.nnext(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code data} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("void *") - public ByteBuffer data(int capacity) { return FT_ListNode.ndata(address(), capacity); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_Destructor.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_Destructor.java deleted file mode 100644 index a71a7ab2..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_Destructor.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     void *data,
    - *     void *user
    - * )
    - */ -public abstract class FT_List_Destructor extends Callback implements FT_List_DestructorI { - - /** - * Creates a {@code FT_List_Destructor} instance from the specified function pointer. - * - * @return the new {@code FT_List_Destructor} - */ - public static FT_List_Destructor create(long functionPointer) { - FT_List_DestructorI instance = Callback.get(functionPointer); - return instance instanceof FT_List_Destructor - ? (FT_List_Destructor)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_List_Destructor createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_List_Destructor} instance that delegates to the specified {@code FT_List_DestructorI} instance. */ - public static FT_List_Destructor create(FT_List_DestructorI instance) { - return instance instanceof FT_List_Destructor - ? (FT_List_Destructor)instance - : new Container(instance.address(), instance); - } - - protected FT_List_Destructor() { - super(CIF); - } - - FT_List_Destructor(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_List_Destructor { - - private final FT_List_DestructorI delegate; - - Container(long functionPointer, FT_List_DestructorI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long memory, long data, long user) { - delegate.invoke(memory, data, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_DestructorI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_DestructorI.java deleted file mode 100644 index 30361d64..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_DestructorI.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     void *data,
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_List_Destructor") -public interface FT_List_DestructorI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** An {@code FT_List} iterator function that is called during a list finalization by {@link FreeType#FT_List_Finalize List_Finalize} to destroy all elements in a given list. */ - void invoke(@NativeType("FT_Memory") long memory, @NativeType("void *") long data, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_Iterator.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_Iterator.java deleted file mode 100644 index 15679d7c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_Iterator.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_ListNode node,
    - *     void *user
    - * )
    - */ -public abstract class FT_List_Iterator extends Callback implements FT_List_IteratorI { - - /** - * Creates a {@code FT_List_Iterator} instance from the specified function pointer. - * - * @return the new {@code FT_List_Iterator} - */ - public static FT_List_Iterator create(long functionPointer) { - FT_List_IteratorI instance = Callback.get(functionPointer); - return instance instanceof FT_List_Iterator - ? (FT_List_Iterator)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_List_Iterator createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_List_Iterator} instance that delegates to the specified {@code FT_List_IteratorI} instance. */ - public static FT_List_Iterator create(FT_List_IteratorI instance) { - return instance instanceof FT_List_Iterator - ? (FT_List_Iterator)instance - : new Container(instance.address(), instance); - } - - protected FT_List_Iterator() { - super(CIF); - } - - FT_List_Iterator(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_List_Iterator { - - private final FT_List_IteratorI delegate; - - Container(long functionPointer, FT_List_IteratorI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long node, long user) { - return delegate.invoke(node, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_IteratorI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_IteratorI.java deleted file mode 100644 index 86ed1a1f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_List_IteratorI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_ListNode node,
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_List_Iterator") -public interface FT_List_IteratorI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** An {@code FT_List} iterator function that is called during a list parse by {@link FreeType#FT_List_Iterate List_Iterate}. */ - @NativeType("FT_Error") int invoke(@NativeType("FT_ListNode") long node, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_MM_Axis.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_MM_Axis.java deleted file mode 100644 index 262d05dd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_MM_Axis.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a given axis in design space for Multiple Masters fonts. - * - *

    Layout

    - * - *
    
    - * struct FT_MM_Axis {
    - *     FT_String * name;
    - *     FT_Long minimum;
    - *     FT_Long maximum;
    - * }
    - */ -public class FT_MM_Axis extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NAME, - MINIMUM, - MAXIMUM; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NAME = layout.offsetof(0); - MINIMUM = layout.offsetof(1); - MAXIMUM = layout.offsetof(2); - } - - protected FT_MM_Axis(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_MM_Axis create(long address, @Nullable ByteBuffer container) { - return new FT_MM_Axis(address, container); - } - - /** - * Creates a {@code FT_MM_Axis} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_MM_Axis(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public ByteBuffer name() { return nname(address()); } - /** @return the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public String nameString() { return nnameString(address()); } - /** @return the value of the {@code minimum} field. */ - @NativeType("FT_Long") - public long minimum() { return nminimum(address()); } - /** @return the value of the {@code maximum} field. */ - @NativeType("FT_Long") - public long maximum() { return nmaximum(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_MM_Axis} instance for the specified memory address. */ - public static FT_MM_Axis create(long address) { - return new FT_MM_Axis(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_MM_Axis createSafe(long address) { - return address == NULL ? null : new FT_MM_Axis(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #name}. */ - public static ByteBuffer nname(long struct) { return memByteBufferNT1(memGetAddress(struct + FT_MM_Axis.NAME)); } - /** Unsafe version of {@link #nameString}. */ - public static String nnameString(long struct) { return memUTF8(memGetAddress(struct + FT_MM_Axis.NAME)); } - /** Unsafe version of {@link #minimum}. */ - public static long nminimum(long struct) { return memGetCLong(struct + FT_MM_Axis.MINIMUM); } - /** Unsafe version of {@link #maximum}. */ - public static long nmaximum(long struct) { return memGetCLong(struct + FT_MM_Axis.MAXIMUM); } - - // ----------------------------------- - - /** An array of {@link FT_MM_Axis} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_MM_Axis ELEMENT_FACTORY = FT_MM_Axis.create(-1L); - - /** - * Creates a new {@code FT_MM_Axis.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_MM_Axis#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_MM_Axis getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public ByteBuffer name() { return FT_MM_Axis.nname(address()); } - /** @return the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public String nameString() { return FT_MM_Axis.nnameString(address()); } - /** @return the value of the {@code minimum} field. */ - @NativeType("FT_Long") - public long minimum() { return FT_MM_Axis.nminimum(address()); } - /** @return the value of the {@code maximum} field. */ - @NativeType("FT_Long") - public long maximum() { return FT_MM_Axis.nmaximum(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_MM_Var.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_MM_Var.java deleted file mode 100644 index 1d392209..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_MM_Var.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure to model the axes and space of an Adobe MM, TrueType GX, or OpenType variation font. - * - *

    Layout

    - * - *
    
    - * struct FT_MM_Var {
    - *     FT_UInt num_axis;
    - *     FT_UInt num_designs;
    - *     FT_UInt num_namedstyles;
    - *     {@link FT_Var_Axis FT_Var_Axis} * axis;
    - *     {@link FT_Var_Named_Style FT_Var_Named_Style} * namedstyle;
    - * }
    - */ -public class FT_MM_Var extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NUM_AXIS, - NUM_DESIGNS, - NUM_NAMEDSTYLES, - AXIS, - NAMEDSTYLE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NUM_AXIS = layout.offsetof(0); - NUM_DESIGNS = layout.offsetof(1); - NUM_NAMEDSTYLES = layout.offsetof(2); - AXIS = layout.offsetof(3); - NAMEDSTYLE = layout.offsetof(4); - } - - protected FT_MM_Var(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_MM_Var create(long address, @Nullable ByteBuffer container) { - return new FT_MM_Var(address, container); - } - - /** - * Creates a {@code FT_MM_Var} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_MM_Var(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code num_axis} field. */ - @NativeType("FT_UInt") - public int num_axis() { return nnum_axis(address()); } - /** @return the value of the {@code num_designs} field. */ - @NativeType("FT_UInt") - public int num_designs() { return nnum_designs(address()); } - /** @return the value of the {@code num_namedstyles} field. */ - @NativeType("FT_UInt") - public int num_namedstyles() { return nnum_namedstyles(address()); } - /** @return a {@link FT_Var_Axis.Buffer} view of the struct array pointed to by the {@code axis} field. */ - @NativeType("FT_Var_Axis *") - public FT_Var_Axis.Buffer axis() { return naxis(address()); } - /** @return a {@link FT_Var_Named_Style.Buffer} view of the struct array pointed to by the {@code namedstyle} field. */ - @NativeType("FT_Var_Named_Style *") - public FT_Var_Named_Style.Buffer namedstyle() { return nnamedstyle(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_MM_Var} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_MM_Var malloc() { - return new FT_MM_Var(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_MM_Var} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_MM_Var calloc() { - return new FT_MM_Var(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_MM_Var} instance allocated with {@link BufferUtils}. */ - public static FT_MM_Var create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_MM_Var(memAddress(container), container); - } - - /** Returns a new {@code FT_MM_Var} instance for the specified memory address. */ - public static FT_MM_Var create(long address) { - return new FT_MM_Var(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_MM_Var createSafe(long address) { - return address == NULL ? null : new FT_MM_Var(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_MM_Var} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_MM_Var malloc(MemoryStack stack) { - return new FT_MM_Var(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_MM_Var} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_MM_Var calloc(MemoryStack stack) { - return new FT_MM_Var(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #num_axis}. */ - public static int nnum_axis(long struct) { return UNSAFE.getInt(null, struct + FT_MM_Var.NUM_AXIS); } - /** Unsafe version of {@link #num_designs}. */ - public static int nnum_designs(long struct) { return UNSAFE.getInt(null, struct + FT_MM_Var.NUM_DESIGNS); } - /** Unsafe version of {@link #num_namedstyles}. */ - public static int nnum_namedstyles(long struct) { return UNSAFE.getInt(null, struct + FT_MM_Var.NUM_NAMEDSTYLES); } - /** Unsafe version of {@link #axis}. */ - public static FT_Var_Axis.Buffer naxis(long struct) { return FT_Var_Axis.create(memGetAddress(struct + FT_MM_Var.AXIS), nnum_axis(struct)); } - /** Unsafe version of {@link #namedstyle}. */ - public static FT_Var_Named_Style.Buffer nnamedstyle(long struct) { return FT_Var_Named_Style.create(memGetAddress(struct + FT_MM_Var.NAMEDSTYLE), nnum_namedstyles(struct)); } - - // ----------------------------------- - - /** An array of {@link FT_MM_Var} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_MM_Var ELEMENT_FACTORY = FT_MM_Var.create(-1L); - - /** - * Creates a new {@code FT_MM_Var.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_MM_Var#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_MM_Var getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code num_axis} field. */ - @NativeType("FT_UInt") - public int num_axis() { return FT_MM_Var.nnum_axis(address()); } - /** @return the value of the {@code num_designs} field. */ - @NativeType("FT_UInt") - public int num_designs() { return FT_MM_Var.nnum_designs(address()); } - /** @return the value of the {@code num_namedstyles} field. */ - @NativeType("FT_UInt") - public int num_namedstyles() { return FT_MM_Var.nnum_namedstyles(address()); } - /** @return a {@link FT_Var_Axis.Buffer} view of the struct array pointed to by the {@code axis} field. */ - @NativeType("FT_Var_Axis *") - public FT_Var_Axis.Buffer axis() { return FT_MM_Var.naxis(address()); } - /** @return a {@link FT_Var_Named_Style.Buffer} view of the struct array pointed to by the {@code namedstyle} field. */ - @NativeType("FT_Var_Named_Style *") - public FT_Var_Named_Style.Buffer namedstyle() { return FT_MM_Var.nnamedstyle(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Matrix.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Matrix.java deleted file mode 100644 index a3102191..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Matrix.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed-point format. - * - *

    Layout

    - * - *
    
    - * struct FT_Matrix {
    - *     FT_Fixed xx;
    - *     FT_Fixed xy;
    - *     FT_Fixed yx;
    - *     FT_Fixed yy;
    - * }
    - */ -public class FT_Matrix extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - XX, - XY, - YX, - YY; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - XX = layout.offsetof(0); - XY = layout.offsetof(1); - YX = layout.offsetof(2); - YY = layout.offsetof(3); - } - - protected FT_Matrix(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Matrix create(long address, @Nullable ByteBuffer container) { - return new FT_Matrix(address, container); - } - - /** - * Creates a {@code FT_Matrix} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Matrix(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code xx} field. */ - @NativeType("FT_Fixed") - public long xx() { return nxx(address()); } - /** @return the value of the {@code xy} field. */ - @NativeType("FT_Fixed") - public long xy() { return nxy(address()); } - /** @return the value of the {@code yx} field. */ - @NativeType("FT_Fixed") - public long yx() { return nyx(address()); } - /** @return the value of the {@code yy} field. */ - @NativeType("FT_Fixed") - public long yy() { return nyy(address()); } - - /** Sets the specified value to the {@code xx} field. */ - public FT_Matrix xx(@NativeType("FT_Fixed") long value) { nxx(address(), value); return this; } - /** Sets the specified value to the {@code xy} field. */ - public FT_Matrix xy(@NativeType("FT_Fixed") long value) { nxy(address(), value); return this; } - /** Sets the specified value to the {@code yx} field. */ - public FT_Matrix yx(@NativeType("FT_Fixed") long value) { nyx(address(), value); return this; } - /** Sets the specified value to the {@code yy} field. */ - public FT_Matrix yy(@NativeType("FT_Fixed") long value) { nyy(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Matrix set( - long xx, - long xy, - long yx, - long yy - ) { - xx(xx); - xy(xy); - yx(yx); - yy(yy); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Matrix set(FT_Matrix src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Matrix} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Matrix malloc() { - return new FT_Matrix(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Matrix} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Matrix calloc() { - return new FT_Matrix(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Matrix} instance allocated with {@link BufferUtils}. */ - public static FT_Matrix create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Matrix(memAddress(container), container); - } - - /** Returns a new {@code FT_Matrix} instance for the specified memory address. */ - public static FT_Matrix create(long address) { - return new FT_Matrix(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Matrix createSafe(long address) { - return address == NULL ? null : new FT_Matrix(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Matrix} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Matrix malloc(MemoryStack stack) { - return new FT_Matrix(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Matrix} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Matrix calloc(MemoryStack stack) { - return new FT_Matrix(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #xx}. */ - public static long nxx(long struct) { return memGetCLong(struct + FT_Matrix.XX); } - /** Unsafe version of {@link #xy}. */ - public static long nxy(long struct) { return memGetCLong(struct + FT_Matrix.XY); } - /** Unsafe version of {@link #yx}. */ - public static long nyx(long struct) { return memGetCLong(struct + FT_Matrix.YX); } - /** Unsafe version of {@link #yy}. */ - public static long nyy(long struct) { return memGetCLong(struct + FT_Matrix.YY); } - - /** Unsafe version of {@link #xx(long) xx}. */ - public static void nxx(long struct, long value) { memPutCLong(struct + FT_Matrix.XX, value); } - /** Unsafe version of {@link #xy(long) xy}. */ - public static void nxy(long struct, long value) { memPutCLong(struct + FT_Matrix.XY, value); } - /** Unsafe version of {@link #yx(long) yx}. */ - public static void nyx(long struct, long value) { memPutCLong(struct + FT_Matrix.YX, value); } - /** Unsafe version of {@link #yy(long) yy}. */ - public static void nyy(long struct, long value) { memPutCLong(struct + FT_Matrix.YY, value); } - - // ----------------------------------- - - /** An array of {@link FT_Matrix} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Matrix ELEMENT_FACTORY = FT_Matrix.create(-1L); - - /** - * Creates a new {@code FT_Matrix.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Matrix#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Matrix getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code xx} field. */ - @NativeType("FT_Fixed") - public long xx() { return FT_Matrix.nxx(address()); } - /** @return the value of the {@code xy} field. */ - @NativeType("FT_Fixed") - public long xy() { return FT_Matrix.nxy(address()); } - /** @return the value of the {@code yx} field. */ - @NativeType("FT_Fixed") - public long yx() { return FT_Matrix.nyx(address()); } - /** @return the value of the {@code yy} field. */ - @NativeType("FT_Fixed") - public long yy() { return FT_Matrix.nyy(address()); } - - /** Sets the specified value to the {@code xx} field. */ - public Buffer xx(@NativeType("FT_Fixed") long value) { FT_Matrix.nxx(address(), value); return this; } - /** Sets the specified value to the {@code xy} field. */ - public Buffer xy(@NativeType("FT_Fixed") long value) { FT_Matrix.nxy(address(), value); return this; } - /** Sets the specified value to the {@code yx} field. */ - public Buffer yx(@NativeType("FT_Fixed") long value) { FT_Matrix.nyx(address(), value); return this; } - /** Sets the specified value to the {@code yy} field. */ - public Buffer yy(@NativeType("FT_Fixed") long value) { FT_Matrix.nyy(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Memory.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Memory.java deleted file mode 100644 index b22dc128..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Memory.java +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure used to describe a given memory manager to FreeType~2. - * - *

    Layout

    - * - *
    
    - * struct FT_MemoryRec_ {
    - *     void * user;
    - *     {@link FT_Alloc_FuncI FT_Alloc_Func} alloc;
    - *     {@link FT_Free_FuncI FT_Free_Func} free;
    - *     {@link FT_Realloc_FuncI FT_Realloc_Func} realloc;
    - * }
    - */ -@NativeType("struct FT_MemoryRec_") -public class FT_Memory extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - USER, - ALLOC, - FREE, - REALLOC; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - USER = layout.offsetof(0); - ALLOC = layout.offsetof(1); - FREE = layout.offsetof(2); - REALLOC = layout.offsetof(3); - } - - protected FT_Memory(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Memory create(long address, @Nullable ByteBuffer container) { - return new FT_Memory(address, container); - } - - /** - * Creates a {@code FT_Memory} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Memory(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code user} field. */ - @NativeType("void *") - public long user() { return nuser(address()); } - /** @return the value of the {@code alloc} field. */ - @Nullable - public FT_Alloc_Func alloc() { return nalloc(address()); } - /** @return the value of the {@code free} field. */ - @Nullable - public FT_Free_Func free$() { return nfree$(address()); } - /** @return the value of the {@code realloc} field. */ - @Nullable - public FT_Realloc_Func realloc() { return nrealloc(address()); } - - /** Sets the specified value to the {@code user} field. */ - public FT_Memory user(@NativeType("void *") long value) { nuser(address(), value); return this; } - /** Sets the specified value to the {@code alloc} field. */ - public FT_Memory alloc(@Nullable @NativeType("FT_Alloc_Func") FT_Alloc_FuncI value) { nalloc(address(), value); return this; } - /** Sets the specified value to the {@code free} field. */ - public FT_Memory free$(@Nullable @NativeType("FT_Free_Func") FT_Free_FuncI value) { nfree$(address(), value); return this; } - /** Sets the specified value to the {@code realloc} field. */ - public FT_Memory realloc(@Nullable @NativeType("FT_Realloc_Func") FT_Realloc_FuncI value) { nrealloc(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Memory set( - long user, - FT_Alloc_FuncI alloc, - FT_Free_FuncI free$, - FT_Realloc_FuncI realloc - ) { - user(user); - alloc(alloc); - free$(free$); - realloc(realloc); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Memory set(FT_Memory src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Memory} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Memory malloc() { - return new FT_Memory(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Memory} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Memory calloc() { - return new FT_Memory(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Memory} instance allocated with {@link BufferUtils}. */ - public static FT_Memory create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Memory(memAddress(container), container); - } - - /** Returns a new {@code FT_Memory} instance for the specified memory address. */ - public static FT_Memory create(long address) { - return new FT_Memory(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Memory createSafe(long address) { - return address == NULL ? null : new FT_Memory(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Memory} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Memory malloc(MemoryStack stack) { - return new FT_Memory(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Memory} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Memory calloc(MemoryStack stack) { - return new FT_Memory(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #user}. */ - public static long nuser(long struct) { return memGetAddress(struct + FT_Memory.USER); } - /** Unsafe version of {@link #alloc}. */ - @Nullable public static FT_Alloc_Func nalloc(long struct) { return FT_Alloc_Func.createSafe(memGetAddress(struct + FT_Memory.ALLOC)); } - /** Unsafe version of {@link #free$}. */ - @Nullable public static FT_Free_Func nfree$(long struct) { return FT_Free_Func.createSafe(memGetAddress(struct + FT_Memory.FREE)); } - /** Unsafe version of {@link #realloc}. */ - @Nullable public static FT_Realloc_Func nrealloc(long struct) { return FT_Realloc_Func.createSafe(memGetAddress(struct + FT_Memory.REALLOC)); } - - /** Unsafe version of {@link #user(long) user}. */ - public static void nuser(long struct, long value) { memPutAddress(struct + FT_Memory.USER, value); } - /** Unsafe version of {@link #alloc(FT_Alloc_FuncI) alloc}. */ - public static void nalloc(long struct, @Nullable FT_Alloc_FuncI value) { memPutAddress(struct + FT_Memory.ALLOC, memAddressSafe(value)); } - /** Unsafe version of {@link #free$(FT_Free_FuncI) free$}. */ - public static void nfree$(long struct, @Nullable FT_Free_FuncI value) { memPutAddress(struct + FT_Memory.FREE, memAddressSafe(value)); } - /** Unsafe version of {@link #realloc(FT_Realloc_FuncI) realloc}. */ - public static void nrealloc(long struct, @Nullable FT_Realloc_FuncI value) { memPutAddress(struct + FT_Memory.REALLOC, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link FT_Memory} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Memory ELEMENT_FACTORY = FT_Memory.create(-1L); - - /** - * Creates a new {@code FT_Memory.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Memory#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Memory getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code user} field. */ - @NativeType("void *") - public long user() { return FT_Memory.nuser(address()); } - /** @return the value of the {@code alloc} field. */ - @Nullable - public FT_Alloc_Func alloc() { return FT_Memory.nalloc(address()); } - /** @return the value of the {@code free} field. */ - @Nullable - public FT_Free_Func free$() { return FT_Memory.nfree$(address()); } - /** @return the value of the {@code realloc} field. */ - @Nullable - public FT_Realloc_Func realloc() { return FT_Memory.nrealloc(address()); } - - /** Sets the specified value to the {@code user} field. */ - public Buffer user(@NativeType("void *") long value) { FT_Memory.nuser(address(), value); return this; } - /** Sets the specified value to the {@code alloc} field. */ - public Buffer alloc(@Nullable @NativeType("FT_Alloc_Func") FT_Alloc_FuncI value) { FT_Memory.nalloc(address(), value); return this; } - /** Sets the specified value to the {@code free} field. */ - public Buffer free$(@Nullable @NativeType("FT_Free_Func") FT_Free_FuncI value) { FT_Memory.nfree$(address(), value); return this; } - /** Sets the specified value to the {@code realloc} field. */ - public Buffer realloc(@Nullable @NativeType("FT_Realloc_Func") FT_Realloc_FuncI value) { FT_Memory.nrealloc(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Class.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Class.java deleted file mode 100644 index a634970e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Class.java +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * The module class descriptor. - * - *

    Layout

    - * - *
    
    - * struct FT_Module_Class {
    - *     FT_ULong module_flags;
    - *     FT_Long module_size;
    - *     FT_String const * module_name;
    - *     FT_Fixed module_version;
    - *     FT_Fixed module_requires;
    - *     void const * module_interface;
    - *     {@link FT_Module_ConstructorI FT_Module_Constructor} module_init;
    - *     {@link FT_Module_DestructorI FT_Module_Destructor} module_done;
    - *     {@link FT_Module_RequesterI FT_Module_Requester} get_interface;
    - * }
    - */ -public class FT_Module_Class extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - MODULE_FLAGS, - MODULE_SIZE, - MODULE_NAME, - MODULE_VERSION, - MODULE_REQUIRES, - MODULE_INTERFACE, - MODULE_INIT, - MODULE_DONE, - GET_INTERFACE; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - MODULE_FLAGS = layout.offsetof(0); - MODULE_SIZE = layout.offsetof(1); - MODULE_NAME = layout.offsetof(2); - MODULE_VERSION = layout.offsetof(3); - MODULE_REQUIRES = layout.offsetof(4); - MODULE_INTERFACE = layout.offsetof(5); - MODULE_INIT = layout.offsetof(6); - MODULE_DONE = layout.offsetof(7); - GET_INTERFACE = layout.offsetof(8); - } - - protected FT_Module_Class(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Module_Class create(long address, @Nullable ByteBuffer container) { - return new FT_Module_Class(address, container); - } - - /** - * Creates a {@code FT_Module_Class} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Module_Class(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code module_flags} field. */ - @NativeType("FT_ULong") - public long module_flags() { return nmodule_flags(address()); } - /** @return the value of the {@code module_size} field. */ - @NativeType("FT_Long") - public long module_size() { return nmodule_size(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code module_name} field. */ - @NativeType("FT_String const *") - public ByteBuffer module_name() { return nmodule_name(address()); } - /** @return the null-terminated string pointed to by the {@code module_name} field. */ - @NativeType("FT_String const *") - public String module_nameString() { return nmodule_nameString(address()); } - /** @return the value of the {@code module_version} field. */ - @NativeType("FT_Fixed") - public long module_version() { return nmodule_version(address()); } - /** @return the value of the {@code module_requires} field. */ - @NativeType("FT_Fixed") - public long module_requires() { return nmodule_requires(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code module_interface} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void const *") - public ByteBuffer module_interface(int capacity) { return nmodule_interface(address(), capacity); } - /** @return the value of the {@code module_init} field. */ - @Nullable - public FT_Module_Constructor module_init() { return nmodule_init(address()); } - /** @return the value of the {@code module_done} field. */ - @Nullable - public FT_Module_Destructor module_done() { return nmodule_done(address()); } - /** @return the value of the {@code get_interface} field. */ - @Nullable - public FT_Module_Requester get_interface() { return nget_interface(address()); } - - /** Sets the specified value to the {@code module_flags} field. */ - public FT_Module_Class module_flags(@NativeType("FT_ULong") long value) { nmodule_flags(address(), value); return this; } - /** Sets the specified value to the {@code module_size} field. */ - public FT_Module_Class module_size(@NativeType("FT_Long") long value) { nmodule_size(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code module_name} field. */ - public FT_Module_Class module_name(@NativeType("FT_String const *") ByteBuffer value) { nmodule_name(address(), value); return this; } - /** Sets the specified value to the {@code module_version} field. */ - public FT_Module_Class module_version(@NativeType("FT_Fixed") long value) { nmodule_version(address(), value); return this; } - /** Sets the specified value to the {@code module_requires} field. */ - public FT_Module_Class module_requires(@NativeType("FT_Fixed") long value) { nmodule_requires(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code module_interface} field. */ - public FT_Module_Class module_interface(@Nullable @NativeType("void const *") ByteBuffer value) { nmodule_interface(address(), value); return this; } - /** Sets the specified value to the {@code module_init} field. */ - public FT_Module_Class module_init(@Nullable @NativeType("FT_Module_Constructor") FT_Module_ConstructorI value) { nmodule_init(address(), value); return this; } - /** Sets the specified value to the {@code module_done} field. */ - public FT_Module_Class module_done(@Nullable @NativeType("FT_Module_Destructor") FT_Module_DestructorI value) { nmodule_done(address(), value); return this; } - /** Sets the specified value to the {@code get_interface} field. */ - public FT_Module_Class get_interface(@Nullable @NativeType("FT_Module_Requester") FT_Module_RequesterI value) { nget_interface(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Module_Class set( - long module_flags, - long module_size, - ByteBuffer module_name, - long module_version, - long module_requires, - @Nullable ByteBuffer module_interface, - @Nullable FT_Module_ConstructorI module_init, - @Nullable FT_Module_DestructorI module_done, - @Nullable FT_Module_RequesterI get_interface - ) { - module_flags(module_flags); - module_size(module_size); - module_name(module_name); - module_version(module_version); - module_requires(module_requires); - module_interface(module_interface); - module_init(module_init); - module_done(module_done); - get_interface(get_interface); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Module_Class set(FT_Module_Class src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Module_Class} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Module_Class malloc() { - return new FT_Module_Class(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Module_Class} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Module_Class calloc() { - return new FT_Module_Class(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Module_Class} instance allocated with {@link BufferUtils}. */ - public static FT_Module_Class create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Module_Class(memAddress(container), container); - } - - /** Returns a new {@code FT_Module_Class} instance for the specified memory address. */ - public static FT_Module_Class create(long address) { - return new FT_Module_Class(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Module_Class createSafe(long address) { - return address == NULL ? null : new FT_Module_Class(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Module_Class} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Module_Class malloc(MemoryStack stack) { - return new FT_Module_Class(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Module_Class} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Module_Class calloc(MemoryStack stack) { - return new FT_Module_Class(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #module_flags}. */ - public static long nmodule_flags(long struct) { return memGetCLong(struct + FT_Module_Class.MODULE_FLAGS); } - /** Unsafe version of {@link #module_size}. */ - public static long nmodule_size(long struct) { return memGetCLong(struct + FT_Module_Class.MODULE_SIZE); } - /** Unsafe version of {@link #module_name}. */ - public static ByteBuffer nmodule_name(long struct) { return memByteBufferNT1(memGetAddress(struct + FT_Module_Class.MODULE_NAME)); } - /** Unsafe version of {@link #module_nameString}. */ - public static String nmodule_nameString(long struct) { return memUTF8(memGetAddress(struct + FT_Module_Class.MODULE_NAME)); } - /** Unsafe version of {@link #module_version}. */ - public static long nmodule_version(long struct) { return memGetCLong(struct + FT_Module_Class.MODULE_VERSION); } - /** Unsafe version of {@link #module_requires}. */ - public static long nmodule_requires(long struct) { return memGetCLong(struct + FT_Module_Class.MODULE_REQUIRES); } - /** Unsafe version of {@link #module_interface(int) module_interface}. */ - @Nullable public static ByteBuffer nmodule_interface(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_Module_Class.MODULE_INTERFACE), capacity); } - /** Unsafe version of {@link #module_init}. */ - @Nullable public static FT_Module_Constructor nmodule_init(long struct) { return FT_Module_Constructor.createSafe(memGetAddress(struct + FT_Module_Class.MODULE_INIT)); } - /** Unsafe version of {@link #module_done}. */ - @Nullable public static FT_Module_Destructor nmodule_done(long struct) { return FT_Module_Destructor.createSafe(memGetAddress(struct + FT_Module_Class.MODULE_DONE)); } - /** Unsafe version of {@link #get_interface}. */ - @Nullable public static FT_Module_Requester nget_interface(long struct) { return FT_Module_Requester.createSafe(memGetAddress(struct + FT_Module_Class.GET_INTERFACE)); } - - /** Unsafe version of {@link #module_flags(long) module_flags}. */ - public static void nmodule_flags(long struct, long value) { memPutCLong(struct + FT_Module_Class.MODULE_FLAGS, value); } - /** Unsafe version of {@link #module_size(long) module_size}. */ - public static void nmodule_size(long struct, long value) { memPutCLong(struct + FT_Module_Class.MODULE_SIZE, value); } - /** Unsafe version of {@link #module_name(ByteBuffer) module_name}. */ - public static void nmodule_name(long struct, ByteBuffer value) { - if (CHECKS) { checkNT1(value); } - memPutAddress(struct + FT_Module_Class.MODULE_NAME, memAddress(value)); - } - /** Unsafe version of {@link #module_version(long) module_version}. */ - public static void nmodule_version(long struct, long value) { memPutCLong(struct + FT_Module_Class.MODULE_VERSION, value); } - /** Unsafe version of {@link #module_requires(long) module_requires}. */ - public static void nmodule_requires(long struct, long value) { memPutCLong(struct + FT_Module_Class.MODULE_REQUIRES, value); } - /** Unsafe version of {@link #module_interface(ByteBuffer) module_interface}. */ - public static void nmodule_interface(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + FT_Module_Class.MODULE_INTERFACE, memAddressSafe(value)); } - /** Unsafe version of {@link #module_init(FT_Module_ConstructorI) module_init}. */ - public static void nmodule_init(long struct, @Nullable FT_Module_ConstructorI value) { memPutAddress(struct + FT_Module_Class.MODULE_INIT, memAddressSafe(value)); } - /** Unsafe version of {@link #module_done(FT_Module_DestructorI) module_done}. */ - public static void nmodule_done(long struct, @Nullable FT_Module_DestructorI value) { memPutAddress(struct + FT_Module_Class.MODULE_DONE, memAddressSafe(value)); } - /** Unsafe version of {@link #get_interface(FT_Module_RequesterI) get_interface}. */ - public static void nget_interface(long struct, @Nullable FT_Module_RequesterI value) { memPutAddress(struct + FT_Module_Class.GET_INTERFACE, memAddressSafe(value)); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + FT_Module_Class.MODULE_NAME)); - } - - // ----------------------------------- - - /** An array of {@link FT_Module_Class} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Module_Class ELEMENT_FACTORY = FT_Module_Class.create(-1L); - - /** - * Creates a new {@code FT_Module_Class.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Module_Class#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Module_Class getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code module_flags} field. */ - @NativeType("FT_ULong") - public long module_flags() { return FT_Module_Class.nmodule_flags(address()); } - /** @return the value of the {@code module_size} field. */ - @NativeType("FT_Long") - public long module_size() { return FT_Module_Class.nmodule_size(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code module_name} field. */ - @NativeType("FT_String const *") - public ByteBuffer module_name() { return FT_Module_Class.nmodule_name(address()); } - /** @return the null-terminated string pointed to by the {@code module_name} field. */ - @NativeType("FT_String const *") - public String module_nameString() { return FT_Module_Class.nmodule_nameString(address()); } - /** @return the value of the {@code module_version} field. */ - @NativeType("FT_Fixed") - public long module_version() { return FT_Module_Class.nmodule_version(address()); } - /** @return the value of the {@code module_requires} field. */ - @NativeType("FT_Fixed") - public long module_requires() { return FT_Module_Class.nmodule_requires(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code module_interface} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void const *") - public ByteBuffer module_interface(int capacity) { return FT_Module_Class.nmodule_interface(address(), capacity); } - /** @return the value of the {@code module_init} field. */ - @Nullable - public FT_Module_Constructor module_init() { return FT_Module_Class.nmodule_init(address()); } - /** @return the value of the {@code module_done} field. */ - @Nullable - public FT_Module_Destructor module_done() { return FT_Module_Class.nmodule_done(address()); } - /** @return the value of the {@code get_interface} field. */ - @Nullable - public FT_Module_Requester get_interface() { return FT_Module_Class.nget_interface(address()); } - - /** Sets the specified value to the {@code module_flags} field. */ - public Buffer module_flags(@NativeType("FT_ULong") long value) { FT_Module_Class.nmodule_flags(address(), value); return this; } - /** Sets the specified value to the {@code module_size} field. */ - public Buffer module_size(@NativeType("FT_Long") long value) { FT_Module_Class.nmodule_size(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code module_name} field. */ - public Buffer module_name(@NativeType("FT_String const *") ByteBuffer value) { FT_Module_Class.nmodule_name(address(), value); return this; } - /** Sets the specified value to the {@code module_version} field. */ - public Buffer module_version(@NativeType("FT_Fixed") long value) { FT_Module_Class.nmodule_version(address(), value); return this; } - /** Sets the specified value to the {@code module_requires} field. */ - public Buffer module_requires(@NativeType("FT_Fixed") long value) { FT_Module_Class.nmodule_requires(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code module_interface} field. */ - public Buffer module_interface(@Nullable @NativeType("void const *") ByteBuffer value) { FT_Module_Class.nmodule_interface(address(), value); return this; } - /** Sets the specified value to the {@code module_init} field. */ - public Buffer module_init(@Nullable @NativeType("FT_Module_Constructor") FT_Module_ConstructorI value) { FT_Module_Class.nmodule_init(address(), value); return this; } - /** Sets the specified value to the {@code module_done} field. */ - public Buffer module_done(@Nullable @NativeType("FT_Module_Destructor") FT_Module_DestructorI value) { FT_Module_Class.nmodule_done(address(), value); return this; } - /** Sets the specified value to the {@code get_interface} field. */ - public Buffer get_interface(@Nullable @NativeType("FT_Module_Requester") FT_Module_RequesterI value) { FT_Module_Class.nget_interface(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Constructor.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Constructor.java deleted file mode 100644 index 9a688163..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Constructor.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Module module
    - * )
    - */ -public abstract class FT_Module_Constructor extends Callback implements FT_Module_ConstructorI { - - /** - * Creates a {@code FT_Module_Constructor} instance from the specified function pointer. - * - * @return the new {@code FT_Module_Constructor} - */ - public static FT_Module_Constructor create(long functionPointer) { - FT_Module_ConstructorI instance = Callback.get(functionPointer); - return instance instanceof FT_Module_Constructor - ? (FT_Module_Constructor)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Module_Constructor createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Module_Constructor} instance that delegates to the specified {@code FT_Module_ConstructorI} instance. */ - public static FT_Module_Constructor create(FT_Module_ConstructorI instance) { - return instance instanceof FT_Module_Constructor - ? (FT_Module_Constructor)instance - : new Container(instance.address(), instance); - } - - protected FT_Module_Constructor() { - super(CIF); - } - - FT_Module_Constructor(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Module_Constructor { - - private final FT_Module_ConstructorI delegate; - - Container(long functionPointer, FT_Module_ConstructorI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long module) { - return delegate.invoke(module); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_ConstructorI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_ConstructorI.java deleted file mode 100644 index bcf5e91f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_ConstructorI.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Module module
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Module_Constructor") -public interface FT_Module_ConstructorI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)) - ); - apiClosureRet(ret, __result); - } - - /** A function used to initialize (not create) a new module object. */ - @NativeType("FT_Error") int invoke(@NativeType("FT_Module") long module); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Destructor.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Destructor.java deleted file mode 100644 index c19f5ac3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Destructor.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Module module
    - * )
    - */ -public abstract class FT_Module_Destructor extends Callback implements FT_Module_DestructorI { - - /** - * Creates a {@code FT_Module_Destructor} instance from the specified function pointer. - * - * @return the new {@code FT_Module_Destructor} - */ - public static FT_Module_Destructor create(long functionPointer) { - FT_Module_DestructorI instance = Callback.get(functionPointer); - return instance instanceof FT_Module_Destructor - ? (FT_Module_Destructor)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Module_Destructor createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Module_Destructor} instance that delegates to the specified {@code FT_Module_DestructorI} instance. */ - public static FT_Module_Destructor create(FT_Module_DestructorI instance) { - return instance instanceof FT_Module_Destructor - ? (FT_Module_Destructor)instance - : new Container(instance.address(), instance); - } - - protected FT_Module_Destructor() { - super(CIF); - } - - FT_Module_Destructor(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Module_Destructor { - - private final FT_Module_DestructorI delegate; - - Container(long functionPointer, FT_Module_DestructorI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long module) { - delegate.invoke(module); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_DestructorI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_DestructorI.java deleted file mode 100644 index 96a5b185..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_DestructorI.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Module module
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Module_Destructor") -public interface FT_Module_DestructorI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - /** A function used to finalize (not destroy) a given module object. */ - void invoke(@NativeType("FT_Module") long module); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Requester.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Requester.java deleted file mode 100644 index 2aed1f41..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_Requester.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Module_Interface (*{@link #invoke}) (
    - *     FT_Module module,
    - *     char const *name
    - * )
    - */ -public abstract class FT_Module_Requester extends Callback implements FT_Module_RequesterI { - - /** - * Creates a {@code FT_Module_Requester} instance from the specified function pointer. - * - * @return the new {@code FT_Module_Requester} - */ - public static FT_Module_Requester create(long functionPointer) { - FT_Module_RequesterI instance = Callback.get(functionPointer); - return instance instanceof FT_Module_Requester - ? (FT_Module_Requester)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Module_Requester createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Module_Requester} instance that delegates to the specified {@code FT_Module_RequesterI} instance. */ - public static FT_Module_Requester create(FT_Module_RequesterI instance) { - return instance instanceof FT_Module_Requester - ? (FT_Module_Requester)instance - : new Container(instance.address(), instance); - } - - protected FT_Module_Requester() { - super(CIF); - } - - FT_Module_Requester(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Module_Requester { - - private final FT_Module_RequesterI delegate; - - Container(long functionPointer, FT_Module_RequesterI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long module, long name) { - return delegate.invoke(module, name); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_RequesterI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_RequesterI.java deleted file mode 100644 index f11dae5d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Module_RequesterI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Module_Interface (*{@link #invoke}) (
    - *     FT_Module module,
    - *     char const *name
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Module_Requester") -public interface FT_Module_RequesterI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** A function used to query a given module for a specific interface. */ - @NativeType("FT_Module_Interface") long invoke(@NativeType("FT_Module") long module, @NativeType("char const *") long name); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Multi_Master.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Multi_Master.java deleted file mode 100644 index 28b4d0dc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Multi_Master.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -import static org.lwjgl.util.freetype.FreeType.*; - -/** - * A structure to model the axes and space of a Multiple Masters font. - * - *

    Layout

    - * - *
    
    - * struct FT_Multi_Master {
    - *     FT_UInt num_axis;
    - *     FT_UInt num_designs;
    - *     {@link FT_MM_Axis FT_MM_Axis} axis[T1_MAX_MM_AXIS];
    - * }
    - */ -public class FT_Multi_Master extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NUM_AXIS, - NUM_DESIGNS, - AXIS; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __array(FT_MM_Axis.SIZEOF, FT_MM_Axis.ALIGNOF, T1_MAX_MM_AXIS) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NUM_AXIS = layout.offsetof(0); - NUM_DESIGNS = layout.offsetof(1); - AXIS = layout.offsetof(2); - } - - protected FT_Multi_Master(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Multi_Master create(long address, @Nullable ByteBuffer container) { - return new FT_Multi_Master(address, container); - } - - /** - * Creates a {@code FT_Multi_Master} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Multi_Master(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code num_axis} field. */ - @NativeType("FT_UInt") - public int num_axis() { return nnum_axis(address()); } - /** @return the value of the {@code num_designs} field. */ - @NativeType("FT_UInt") - public int num_designs() { return nnum_designs(address()); } - /** @return a {@link FT_MM_Axis}.Buffer view of the {@code axis} field. */ - @NativeType("FT_MM_Axis[T1_MAX_MM_AXIS]") - public FT_MM_Axis.Buffer axis() { return naxis(address()); } - /** @return a {@link FT_MM_Axis} view of the struct at the specified index of the {@code axis} field. */ - public FT_MM_Axis axis(int index) { return naxis(address(), index); } - - // ----------------------------------- - - /** Returns a new {@code FT_Multi_Master} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Multi_Master malloc() { - return new FT_Multi_Master(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Multi_Master} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Multi_Master calloc() { - return new FT_Multi_Master(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Multi_Master} instance allocated with {@link BufferUtils}. */ - public static FT_Multi_Master create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Multi_Master(memAddress(container), container); - } - - /** Returns a new {@code FT_Multi_Master} instance for the specified memory address. */ - public static FT_Multi_Master create(long address) { - return new FT_Multi_Master(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Multi_Master createSafe(long address) { - return address == NULL ? null : new FT_Multi_Master(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Multi_Master} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Multi_Master malloc(MemoryStack stack) { - return new FT_Multi_Master(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Multi_Master} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Multi_Master calloc(MemoryStack stack) { - return new FT_Multi_Master(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #num_axis}. */ - public static int nnum_axis(long struct) { return UNSAFE.getInt(null, struct + FT_Multi_Master.NUM_AXIS); } - /** Unsafe version of {@link #num_designs}. */ - public static int nnum_designs(long struct) { return UNSAFE.getInt(null, struct + FT_Multi_Master.NUM_DESIGNS); } - /** Unsafe version of {@link #axis}. */ - public static FT_MM_Axis.Buffer naxis(long struct) { return FT_MM_Axis.create(struct + FT_Multi_Master.AXIS, T1_MAX_MM_AXIS); } - /** Unsafe version of {@link #axis(int) axis}. */ - public static FT_MM_Axis naxis(long struct, int index) { - return FT_MM_Axis.create(struct + FT_Multi_Master.AXIS + check(index, T1_MAX_MM_AXIS) * FT_MM_Axis.SIZEOF); - } - - // ----------------------------------- - - /** An array of {@link FT_Multi_Master} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Multi_Master ELEMENT_FACTORY = FT_Multi_Master.create(-1L); - - /** - * Creates a new {@code FT_Multi_Master.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Multi_Master#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Multi_Master getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code num_axis} field. */ - @NativeType("FT_UInt") - public int num_axis() { return FT_Multi_Master.nnum_axis(address()); } - /** @return the value of the {@code num_designs} field. */ - @NativeType("FT_UInt") - public int num_designs() { return FT_Multi_Master.nnum_designs(address()); } - /** @return a {@link FT_MM_Axis}.Buffer view of the {@code axis} field. */ - @NativeType("FT_MM_Axis[T1_MAX_MM_AXIS]") - public FT_MM_Axis.Buffer axis() { return FT_Multi_Master.naxis(address()); } - /** @return a {@link FT_MM_Axis} view of the struct at the specified index of the {@code axis} field. */ - public FT_MM_Axis axis(int index) { return FT_Multi_Master.naxis(address(), index); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_OpaquePaint.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_OpaquePaint.java deleted file mode 100644 index 8f321de8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_OpaquePaint.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure representing an offset to a {@code Paint} value stored in any of the paint tables of a {@code COLR} v1 font. - * - *

    Layout

    - * - *
    
    - * struct FT_OpaquePaintRec {
    - *     FT_Byte * p;
    - *     FT_Bool insert_root_transform;
    - * }
    - */ -@NativeType("struct FT_OpaquePaintRec") -public class FT_OpaquePaint extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - P, - INSERT_ROOT_TRANSFORM; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - P = layout.offsetof(0); - INSERT_ROOT_TRANSFORM = layout.offsetof(1); - } - - protected FT_OpaquePaint(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_OpaquePaint create(long address, @Nullable ByteBuffer container) { - return new FT_OpaquePaint(address, container); - } - - /** - * Creates a {@code FT_OpaquePaint} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_OpaquePaint(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code p} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Byte *") - public ByteBuffer p(int capacity) { return np(address(), capacity); } - /** @return the value of the {@code insert_root_transform} field. */ - @NativeType("FT_Bool") - public boolean insert_root_transform() { return ninsert_root_transform(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_OpaquePaint} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_OpaquePaint malloc() { - return new FT_OpaquePaint(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_OpaquePaint} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_OpaquePaint calloc() { - return new FT_OpaquePaint(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_OpaquePaint} instance allocated with {@link BufferUtils}. */ - public static FT_OpaquePaint create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_OpaquePaint(memAddress(container), container); - } - - /** Returns a new {@code FT_OpaquePaint} instance for the specified memory address. */ - public static FT_OpaquePaint create(long address) { - return new FT_OpaquePaint(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_OpaquePaint createSafe(long address) { - return address == NULL ? null : new FT_OpaquePaint(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_OpaquePaint} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_OpaquePaint malloc(MemoryStack stack) { - return new FT_OpaquePaint(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_OpaquePaint} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_OpaquePaint calloc(MemoryStack stack) { - return new FT_OpaquePaint(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #p(int) p}. */ - @Nullable public static ByteBuffer np(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_OpaquePaint.P), capacity); } - /** Unsafe version of {@link #insert_root_transform}. */ - public static boolean ninsert_root_transform(long struct) { return UNSAFE.getByte(null, struct + FT_OpaquePaint.INSERT_ROOT_TRANSFORM) != 0; } - - // ----------------------------------- - - /** An array of {@link FT_OpaquePaint} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_OpaquePaint ELEMENT_FACTORY = FT_OpaquePaint.create(-1L); - - /** - * Creates a new {@code FT_OpaquePaint.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_OpaquePaint#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_OpaquePaint getElementFactory() { - return ELEMENT_FACTORY; - } - - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code p} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Byte *") - public ByteBuffer p(int capacity) { return FT_OpaquePaint.np(address(), capacity); } - /** @return the value of the {@code insert_root_transform} field. */ - @NativeType("FT_Bool") - public boolean insert_root_transform() { return FT_OpaquePaint.ninsert_root_transform(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Open_Args.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Open_Args.java deleted file mode 100644 index 952e2b70..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Open_Args.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions - * {@link FreeType#FT_Open_Face Open_Face} and {@link FreeType#FT_Attach_Stream Attach_Stream}. - * - *

    Layout

    - * - *
    
    - * struct FT_Open_Args {
    - *     FT_UInt flags;
    - *     FT_Byte const * memory_base;
    - *     FT_Long memory_size;
    - *     FT_String * pathname;
    - *     {@link FT_Stream FT_Stream} stream;
    - *     FT_Module driver;
    - *     FT_Int num_params;
    - *     {@link FT_Parameter FT_Parameter} * params;
    - * }
    - */ -public class FT_Open_Args extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FLAGS, - MEMORY_BASE, - MEMORY_SIZE, - PATHNAME, - STREAM, - DRIVER, - NUM_PARAMS, - PARAMS; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FLAGS = layout.offsetof(0); - MEMORY_BASE = layout.offsetof(1); - MEMORY_SIZE = layout.offsetof(2); - PATHNAME = layout.offsetof(3); - STREAM = layout.offsetof(4); - DRIVER = layout.offsetof(5); - NUM_PARAMS = layout.offsetof(6); - PARAMS = layout.offsetof(7); - } - - protected FT_Open_Args(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Open_Args create(long address, @Nullable ByteBuffer container) { - return new FT_Open_Args(address, container); - } - - /** - * Creates a {@code FT_Open_Args} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Open_Args(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code flags} field. */ - @NativeType("FT_UInt") - public int flags() { return nflags(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code memory_base} field. */ - @Nullable - @NativeType("FT_Byte const *") - public ByteBuffer memory_base() { return nmemory_base(address()); } - /** @return the value of the {@code memory_size} field. */ - @NativeType("FT_Long") - public long memory_size() { return nmemory_size(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code pathname} field. */ - @Nullable - @NativeType("FT_String *") - public ByteBuffer pathname() { return npathname(address()); } - /** @return the null-terminated string pointed to by the {@code pathname} field. */ - @Nullable - @NativeType("FT_String *") - public String pathnameString() { return npathnameString(address()); } - /** @return a {@link FT_Stream} view of the struct pointed to by the {@code stream} field. */ - @Nullable - public FT_Stream stream$() { return nstream$(address()); } - /** @return the value of the {@code driver} field. */ - @NativeType("FT_Module") - public long driver() { return ndriver(address()); } - /** @return the value of the {@code num_params} field. */ - @NativeType("FT_Int") - public int num_params() { return nnum_params(address()); } - /** @return a {@link FT_Parameter.Buffer} view of the struct array pointed to by the {@code params} field. */ - @Nullable - @NativeType("FT_Parameter *") - public FT_Parameter.Buffer params() { return nparams(address()); } - - /** Sets the specified value to the {@code flags} field. */ - public FT_Open_Args flags(@NativeType("FT_UInt") int value) { nflags(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code memory_base} field. */ - public FT_Open_Args memory_base(@Nullable @NativeType("FT_Byte const *") ByteBuffer value) { nmemory_base(address(), value); return this; } - /** Sets the specified value to the {@code memory_size} field. */ - public FT_Open_Args memory_size(@NativeType("FT_Long") long value) { nmemory_size(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code pathname} field. */ - public FT_Open_Args pathname(@Nullable @NativeType("FT_String *") ByteBuffer value) { npathname(address(), value); return this; } - /** Sets the address of the specified {@link FT_Stream} to the {@code stream} field. */ - public FT_Open_Args stream$(@Nullable FT_Stream value) { nstream$(address(), value); return this; } - /** Sets the specified value to the {@code driver} field. */ - public FT_Open_Args driver(@NativeType("FT_Module") long value) { ndriver(address(), value); return this; } - /** Sets the specified value to the {@code num_params} field. */ - public FT_Open_Args num_params(@NativeType("FT_Int") int value) { nnum_params(address(), value); return this; } - /** Sets the address of the specified {@link FT_Parameter.Buffer} to the {@code params} field. */ - public FT_Open_Args params(@Nullable @NativeType("FT_Parameter *") FT_Parameter.Buffer value) { nparams(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Open_Args set( - int flags, - @Nullable ByteBuffer memory_base, - long memory_size, - @Nullable ByteBuffer pathname, - @Nullable FT_Stream stream$, - long driver, - int num_params, - @Nullable FT_Parameter.Buffer params - ) { - flags(flags); - memory_base(memory_base); - memory_size(memory_size); - pathname(pathname); - stream$(stream$); - driver(driver); - num_params(num_params); - params(params); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Open_Args set(FT_Open_Args src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Open_Args} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Open_Args malloc() { - return new FT_Open_Args(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Open_Args} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Open_Args calloc() { - return new FT_Open_Args(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Open_Args} instance allocated with {@link BufferUtils}. */ - public static FT_Open_Args create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Open_Args(memAddress(container), container); - } - - /** Returns a new {@code FT_Open_Args} instance for the specified memory address. */ - public static FT_Open_Args create(long address) { - return new FT_Open_Args(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Open_Args createSafe(long address) { - return address == NULL ? null : new FT_Open_Args(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Open_Args} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Open_Args malloc(MemoryStack stack) { - return new FT_Open_Args(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Open_Args} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Open_Args calloc(MemoryStack stack) { - return new FT_Open_Args(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + FT_Open_Args.FLAGS); } - /** Unsafe version of {@link #memory_base() memory_base}. */ - @Nullable public static ByteBuffer nmemory_base(long struct) { return memByteBufferSafe(memGetAddress(struct + FT_Open_Args.MEMORY_BASE), (int)nmemory_size(struct)); } - /** Unsafe version of {@link #memory_size}. */ - public static long nmemory_size(long struct) { return memGetCLong(struct + FT_Open_Args.MEMORY_SIZE); } - /** Unsafe version of {@link #pathname}. */ - @Nullable public static ByteBuffer npathname(long struct) { return memByteBufferNT1Safe(memGetAddress(struct + FT_Open_Args.PATHNAME)); } - /** Unsafe version of {@link #pathnameString}. */ - @Nullable public static String npathnameString(long struct) { return memUTF8Safe(memGetAddress(struct + FT_Open_Args.PATHNAME)); } - /** Unsafe version of {@link #stream$}. */ - @Nullable public static FT_Stream nstream$(long struct) { return FT_Stream.createSafe(memGetAddress(struct + FT_Open_Args.STREAM)); } - /** Unsafe version of {@link #driver}. */ - public static long ndriver(long struct) { return memGetAddress(struct + FT_Open_Args.DRIVER); } - /** Unsafe version of {@link #num_params}. */ - public static int nnum_params(long struct) { return UNSAFE.getInt(null, struct + FT_Open_Args.NUM_PARAMS); } - /** Unsafe version of {@link #params}. */ - @Nullable public static FT_Parameter.Buffer nparams(long struct) { return FT_Parameter.createSafe(memGetAddress(struct + FT_Open_Args.PARAMS), nnum_params(struct)); } - - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + FT_Open_Args.FLAGS, value); } - /** Unsafe version of {@link #memory_base(ByteBuffer) memory_base}. */ - public static void nmemory_base(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + FT_Open_Args.MEMORY_BASE, memAddressSafe(value)); nmemory_size(struct, value == null ? 0 : value.remaining()); } - /** Sets the specified value to the {@code memory_size} field of the specified {@code struct}. */ - public static void nmemory_size(long struct, long value) { memPutCLong(struct + FT_Open_Args.MEMORY_SIZE, value); } - /** Unsafe version of {@link #pathname(ByteBuffer) pathname}. */ - public static void npathname(long struct, @Nullable ByteBuffer value) { - if (CHECKS) { checkNT1Safe(value); } - memPutAddress(struct + FT_Open_Args.PATHNAME, memAddressSafe(value)); - } - /** Unsafe version of {@link #stream$(FT_Stream) stream$}. */ - public static void nstream$(long struct, @Nullable FT_Stream value) { memPutAddress(struct + FT_Open_Args.STREAM, memAddressSafe(value)); } - /** Unsafe version of {@link #driver(long) driver}. */ - public static void ndriver(long struct, long value) { memPutAddress(struct + FT_Open_Args.DRIVER, value); } - /** Sets the specified value to the {@code num_params} field of the specified {@code struct}. */ - public static void nnum_params(long struct, int value) { UNSAFE.putInt(null, struct + FT_Open_Args.NUM_PARAMS, value); } - /** Unsafe version of {@link #params(FT_Parameter.Buffer) params}. */ - public static void nparams(long struct, @Nullable FT_Parameter.Buffer value) { memPutAddress(struct + FT_Open_Args.PARAMS, memAddressSafe(value)); nnum_params(struct, value == null ? 0 : value.remaining()); } - - // ----------------------------------- - - /** An array of {@link FT_Open_Args} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Open_Args ELEMENT_FACTORY = FT_Open_Args.create(-1L); - - /** - * Creates a new {@code FT_Open_Args.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Open_Args#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Open_Args getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code flags} field. */ - @NativeType("FT_UInt") - public int flags() { return FT_Open_Args.nflags(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code memory_base} field. */ - @Nullable - @NativeType("FT_Byte const *") - public ByteBuffer memory_base() { return FT_Open_Args.nmemory_base(address()); } - /** @return the value of the {@code memory_size} field. */ - @NativeType("FT_Long") - public long memory_size() { return FT_Open_Args.nmemory_size(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code pathname} field. */ - @Nullable - @NativeType("FT_String *") - public ByteBuffer pathname() { return FT_Open_Args.npathname(address()); } - /** @return the null-terminated string pointed to by the {@code pathname} field. */ - @Nullable - @NativeType("FT_String *") - public String pathnameString() { return FT_Open_Args.npathnameString(address()); } - /** @return a {@link FT_Stream} view of the struct pointed to by the {@code stream} field. */ - @Nullable - public FT_Stream stream$() { return FT_Open_Args.nstream$(address()); } - /** @return the value of the {@code driver} field. */ - @NativeType("FT_Module") - public long driver() { return FT_Open_Args.ndriver(address()); } - /** @return the value of the {@code num_params} field. */ - @NativeType("FT_Int") - public int num_params() { return FT_Open_Args.nnum_params(address()); } - /** @return a {@link FT_Parameter.Buffer} view of the struct array pointed to by the {@code params} field. */ - @Nullable - @NativeType("FT_Parameter *") - public FT_Parameter.Buffer params() { return FT_Open_Args.nparams(address()); } - - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(@NativeType("FT_UInt") int value) { FT_Open_Args.nflags(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code memory_base} field. */ - public Buffer memory_base(@Nullable @NativeType("FT_Byte const *") ByteBuffer value) { FT_Open_Args.nmemory_base(address(), value); return this; } - /** Sets the specified value to the {@code memory_size} field. */ - public Buffer memory_size(@NativeType("FT_Long") long value) { FT_Open_Args.nmemory_size(address(), value); return this; } - /** Sets the address of the specified encoded string to the {@code pathname} field. */ - public Buffer pathname(@Nullable @NativeType("FT_String *") ByteBuffer value) { FT_Open_Args.npathname(address(), value); return this; } - /** Sets the address of the specified {@link FT_Stream} to the {@code stream} field. */ - public Buffer stream$(@Nullable FT_Stream value) { FT_Open_Args.nstream$(address(), value); return this; } - /** Sets the specified value to the {@code driver} field. */ - public Buffer driver(@NativeType("FT_Module") long value) { FT_Open_Args.ndriver(address(), value); return this; } - /** Sets the specified value to the {@code num_params} field. */ - public Buffer num_params(@NativeType("FT_Int") int value) { FT_Open_Args.nnum_params(address(), value); return this; } - /** Sets the address of the specified {@link FT_Parameter.Buffer} to the {@code params} field. */ - public Buffer params(@Nullable @NativeType("FT_Parameter *") FT_Parameter.Buffer value) { FT_Open_Args.nparams(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline.java deleted file mode 100644 index 76f53300..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * This structure is used to describe an outline to the scan-line converter. - * - *

    Layout

    - * - *
    
    - * struct FT_Outline {
    - *     short {@link #n_contours};
    - *     short {@link #n_points};
    - *     {@link FT_Vector FT_Vector} * {@link #points};
    - *     char * {@link #tags};
    - *     short * {@link #contours};
    - *     int {@link #flags};
    - * }
    - */ -public class FT_Outline extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - N_CONTOURS, - N_POINTS, - POINTS, - TAGS, - CONTOURS, - FLAGS; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - N_CONTOURS = layout.offsetof(0); - N_POINTS = layout.offsetof(1); - POINTS = layout.offsetof(2); - TAGS = layout.offsetof(3); - CONTOURS = layout.offsetof(4); - FLAGS = layout.offsetof(5); - } - - protected FT_Outline(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Outline create(long address, @Nullable ByteBuffer container) { - return new FT_Outline(address, container); - } - - /** - * Creates a {@code FT_Outline} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Outline(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** number of contours in glyph */ - public short n_contours() { return nn_contours(address()); } - /** number of points in the glyph */ - public short n_points() { return nn_points(address()); } - /** the outline's points */ - @NativeType("FT_Vector *") - public FT_Vector.Buffer points() { return npoints(address()); } - /** the points flags */ - @NativeType("char *") - public ByteBuffer tags() { return ntags(address()); } - /** the contour end points */ - @NativeType("short *") - public ShortBuffer contours() { return ncontours(address()); } - /** outline masks */ - public int flags() { return nflags(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Outline} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Outline malloc() { - return new FT_Outline(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Outline} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Outline calloc() { - return new FT_Outline(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Outline} instance allocated with {@link BufferUtils}. */ - public static FT_Outline create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Outline(memAddress(container), container); - } - - /** Returns a new {@code FT_Outline} instance for the specified memory address. */ - public static FT_Outline create(long address) { - return new FT_Outline(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Outline createSafe(long address) { - return address == NULL ? null : new FT_Outline(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Outline} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Outline malloc(MemoryStack stack) { - return new FT_Outline(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Outline} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Outline calloc(MemoryStack stack) { - return new FT_Outline(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #n_contours}. */ - public static short nn_contours(long struct) { return UNSAFE.getShort(null, struct + FT_Outline.N_CONTOURS); } - /** Unsafe version of {@link #n_points}. */ - public static short nn_points(long struct) { return UNSAFE.getShort(null, struct + FT_Outline.N_POINTS); } - /** Unsafe version of {@link #points}. */ - public static FT_Vector.Buffer npoints(long struct) { return FT_Vector.create(memGetAddress(struct + FT_Outline.POINTS), nn_points(struct)); } - /** Unsafe version of {@link #tags() tags}. */ - public static ByteBuffer ntags(long struct) { return memByteBuffer(memGetAddress(struct + FT_Outline.TAGS), nn_points(struct)); } - /** Unsafe version of {@link #contours() contours}. */ - public static ShortBuffer ncontours(long struct) { return memShortBuffer(memGetAddress(struct + FT_Outline.CONTOURS), nn_contours(struct)); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + FT_Outline.FLAGS); } - - // ----------------------------------- - - /** An array of {@link FT_Outline} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Outline ELEMENT_FACTORY = FT_Outline.create(-1L); - - /** - * Creates a new {@code FT_Outline.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Outline#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Outline getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link FT_Outline#n_contours} field. */ - public short n_contours() { return FT_Outline.nn_contours(address()); } - /** @return the value of the {@link FT_Outline#n_points} field. */ - public short n_points() { return FT_Outline.nn_points(address()); } - /** @return a {@link FT_Vector.Buffer} view of the struct array pointed to by the {@link FT_Outline#points} field. */ - @NativeType("FT_Vector *") - public FT_Vector.Buffer points() { return FT_Outline.npoints(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@link FT_Outline#tags} field. */ - @NativeType("char *") - public ByteBuffer tags() { return FT_Outline.ntags(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@link FT_Outline#contours} field. */ - @NativeType("short *") - public ShortBuffer contours() { return FT_Outline.ncontours(address()); } - /** @return the value of the {@link FT_Outline#flags} field. */ - public int flags() { return FT_Outline.nflags(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_OutlineGlyph.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_OutlineGlyph.java deleted file mode 100644 index 5a314bef..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_OutlineGlyph.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used for outline (vectorial) glyph images. This really is a 'sub-class' of {@link FT_Glyph}. - * - *

    Layout

    - * - *
    
    - * struct FT_OutlineGlyphRec {
    - *     {@link FT_Glyph FT_GlyphRec} root;
    - *     {@link FT_Outline FT_Outline} outline;
    - * }
    - */ -@NativeType("struct FT_OutlineGlyphRec") -public class FT_OutlineGlyph extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ROOT, - OUTLINE; - - static { - Layout layout = __struct( - __member(FT_Glyph.SIZEOF, FT_Glyph.ALIGNOF), - __member(FT_Outline.SIZEOF, FT_Outline.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ROOT = layout.offsetof(0); - OUTLINE = layout.offsetof(1); - } - - protected FT_OutlineGlyph(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_OutlineGlyph create(long address, @Nullable ByteBuffer container) { - return new FT_OutlineGlyph(address, container); - } - - /** - * Creates a {@code FT_OutlineGlyph} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_OutlineGlyph(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Glyph} view of the {@code root} field. */ - @NativeType("FT_GlyphRec") - public FT_Glyph root() { return nroot(address()); } - /** @return a {@link FT_Outline} view of the {@code outline} field. */ - public FT_Outline outline() { return noutline(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_OutlineGlyph} instance for the specified memory address. */ - public static FT_OutlineGlyph create(long address) { - return new FT_OutlineGlyph(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_OutlineGlyph createSafe(long address) { - return address == NULL ? null : new FT_OutlineGlyph(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #root}. */ - public static FT_Glyph nroot(long struct) { return FT_Glyph.create(struct + FT_OutlineGlyph.ROOT); } - /** Unsafe version of {@link #outline}. */ - public static FT_Outline noutline(long struct) { return FT_Outline.create(struct + FT_OutlineGlyph.OUTLINE); } - - // ----------------------------------- - - /** An array of {@link FT_OutlineGlyph} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_OutlineGlyph ELEMENT_FACTORY = FT_OutlineGlyph.create(-1L); - - /** - * Creates a new {@code FT_OutlineGlyph.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_OutlineGlyph#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_OutlineGlyph getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Glyph} view of the {@code root} field. */ - @NativeType("FT_GlyphRec") - public FT_Glyph root() { return FT_OutlineGlyph.nroot(address()); } - /** @return a {@link FT_Outline} view of the {@code outline} field. */ - public FT_Outline outline() { return FT_OutlineGlyph.noutline(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_ConicToFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_ConicToFunc.java deleted file mode 100644 index 324fe0c7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_ConicToFunc.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *control,
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -public abstract class FT_Outline_ConicToFunc extends Callback implements FT_Outline_ConicToFuncI { - - /** - * Creates a {@code FT_Outline_ConicToFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Outline_ConicToFunc} - */ - public static FT_Outline_ConicToFunc create(long functionPointer) { - FT_Outline_ConicToFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Outline_ConicToFunc - ? (FT_Outline_ConicToFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Outline_ConicToFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Outline_ConicToFunc} instance that delegates to the specified {@code FT_Outline_ConicToFuncI} instance. */ - public static FT_Outline_ConicToFunc create(FT_Outline_ConicToFuncI instance) { - return instance instanceof FT_Outline_ConicToFunc - ? (FT_Outline_ConicToFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Outline_ConicToFunc() { - super(CIF); - } - - FT_Outline_ConicToFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Outline_ConicToFunc { - - private final FT_Outline_ConicToFuncI delegate; - - Container(long functionPointer, FT_Outline_ConicToFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long control, long to, long user) { - return delegate.invoke(control, to, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_ConicToFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_ConicToFuncI.java deleted file mode 100644 index 2f708327..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_ConicToFuncI.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *control,
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Outline_ConicToFunc") -public interface FT_Outline_ConicToFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function pointer type used to describe the signature of a 'conic to' function during outline walking or decomposition. */ - int invoke(@NativeType("FT_Vector const *") long control, @NativeType("FT_Vector const *") long to, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_CubicToFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_CubicToFunc.java deleted file mode 100644 index 964b8658..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_CubicToFunc.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *control1,
    - *     FT_Vector const *control2,
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -public abstract class FT_Outline_CubicToFunc extends Callback implements FT_Outline_CubicToFuncI { - - /** - * Creates a {@code FT_Outline_CubicToFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Outline_CubicToFunc} - */ - public static FT_Outline_CubicToFunc create(long functionPointer) { - FT_Outline_CubicToFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Outline_CubicToFunc - ? (FT_Outline_CubicToFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Outline_CubicToFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Outline_CubicToFunc} instance that delegates to the specified {@code FT_Outline_CubicToFuncI} instance. */ - public static FT_Outline_CubicToFunc create(FT_Outline_CubicToFuncI instance) { - return instance instanceof FT_Outline_CubicToFunc - ? (FT_Outline_CubicToFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Outline_CubicToFunc() { - super(CIF); - } - - FT_Outline_CubicToFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Outline_CubicToFunc { - - private final FT_Outline_CubicToFuncI delegate; - - Container(long functionPointer, FT_Outline_CubicToFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long control1, long control2, long to, long user) { - return delegate.invoke(control1, control2, to, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_CubicToFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_CubicToFuncI.java deleted file mode 100644 index b5eeb9db..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_CubicToFuncI.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *control1,
    - *     FT_Vector const *control2,
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Outline_CubicToFunc") -public interface FT_Outline_CubicToFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function pointer type used to describe the signature of a 'cubic to' function during outline walking or decomposition. */ - int invoke(@NativeType("FT_Vector const *") long control1, @NativeType("FT_Vector const *") long control2, @NativeType("FT_Vector const *") long to, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_Funcs.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_Funcs.java deleted file mode 100644 index be744ffa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_Funcs.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers. - * - *

    Layout

    - * - *
    
    - * struct FT_Outline_Funcs {
    - *     {@link FT_Outline_MoveToFuncI FT_Outline_MoveToFunc} move_to;
    - *     {@link FT_Outline_LineToFuncI FT_Outline_LineToFunc} line_to;
    - *     {@link FT_Outline_ConicToFuncI FT_Outline_ConicToFunc} conic_to;
    - *     {@link FT_Outline_CubicToFuncI FT_Outline_CubicToFunc} cubic_to;
    - *     int shift;
    - *     FT_Pos delta;
    - * }
    - */ -public class FT_Outline_Funcs extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - MOVE_TO, - LINE_TO, - CONIC_TO, - CUBIC_TO, - SHIFT, - DELTA; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - MOVE_TO = layout.offsetof(0); - LINE_TO = layout.offsetof(1); - CONIC_TO = layout.offsetof(2); - CUBIC_TO = layout.offsetof(3); - SHIFT = layout.offsetof(4); - DELTA = layout.offsetof(5); - } - - protected FT_Outline_Funcs(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Outline_Funcs create(long address, @Nullable ByteBuffer container) { - return new FT_Outline_Funcs(address, container); - } - - /** - * Creates a {@code FT_Outline_Funcs} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Outline_Funcs(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code move_to} field. */ - @Nullable - public FT_Outline_MoveToFunc move_to() { return nmove_to(address()); } - /** @return the value of the {@code line_to} field. */ - @Nullable - public FT_Outline_LineToFunc line_to() { return nline_to(address()); } - /** @return the value of the {@code conic_to} field. */ - @Nullable - public FT_Outline_ConicToFunc conic_to() { return nconic_to(address()); } - /** @return the value of the {@code cubic_to} field. */ - @Nullable - public FT_Outline_CubicToFunc cubic_to() { return ncubic_to(address()); } - /** @return the value of the {@code shift} field. */ - public int shift() { return nshift(address()); } - /** @return the value of the {@code delta} field. */ - @NativeType("FT_Pos") - public long delta() { return ndelta(address()); } - - /** Sets the specified value to the {@code move_to} field. */ - public FT_Outline_Funcs move_to(@Nullable @NativeType("FT_Outline_MoveToFunc") FT_Outline_MoveToFuncI value) { nmove_to(address(), value); return this; } - /** Sets the specified value to the {@code line_to} field. */ - public FT_Outline_Funcs line_to(@Nullable @NativeType("FT_Outline_LineToFunc") FT_Outline_LineToFuncI value) { nline_to(address(), value); return this; } - /** Sets the specified value to the {@code conic_to} field. */ - public FT_Outline_Funcs conic_to(@Nullable @NativeType("FT_Outline_ConicToFunc") FT_Outline_ConicToFuncI value) { nconic_to(address(), value); return this; } - /** Sets the specified value to the {@code cubic_to} field. */ - public FT_Outline_Funcs cubic_to(@Nullable @NativeType("FT_Outline_CubicToFunc") FT_Outline_CubicToFuncI value) { ncubic_to(address(), value); return this; } - /** Sets the specified value to the {@code shift} field. */ - public FT_Outline_Funcs shift(int value) { nshift(address(), value); return this; } - /** Sets the specified value to the {@code delta} field. */ - public FT_Outline_Funcs delta(@NativeType("FT_Pos") long value) { ndelta(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Outline_Funcs set( - FT_Outline_MoveToFuncI move_to, - FT_Outline_LineToFuncI line_to, - FT_Outline_ConicToFuncI conic_to, - FT_Outline_CubicToFuncI cubic_to, - int shift, - long delta - ) { - move_to(move_to); - line_to(line_to); - conic_to(conic_to); - cubic_to(cubic_to); - shift(shift); - delta(delta); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Outline_Funcs set(FT_Outline_Funcs src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Outline_Funcs} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Outline_Funcs malloc() { - return new FT_Outline_Funcs(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Outline_Funcs} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Outline_Funcs calloc() { - return new FT_Outline_Funcs(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Outline_Funcs} instance allocated with {@link BufferUtils}. */ - public static FT_Outline_Funcs create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Outline_Funcs(memAddress(container), container); - } - - /** Returns a new {@code FT_Outline_Funcs} instance for the specified memory address. */ - public static FT_Outline_Funcs create(long address) { - return new FT_Outline_Funcs(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Outline_Funcs createSafe(long address) { - return address == NULL ? null : new FT_Outline_Funcs(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Outline_Funcs} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Outline_Funcs malloc(MemoryStack stack) { - return new FT_Outline_Funcs(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Outline_Funcs} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Outline_Funcs calloc(MemoryStack stack) { - return new FT_Outline_Funcs(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #move_to}. */ - @Nullable public static FT_Outline_MoveToFunc nmove_to(long struct) { return FT_Outline_MoveToFunc.createSafe(memGetAddress(struct + FT_Outline_Funcs.MOVE_TO)); } - /** Unsafe version of {@link #line_to}. */ - @Nullable public static FT_Outline_LineToFunc nline_to(long struct) { return FT_Outline_LineToFunc.createSafe(memGetAddress(struct + FT_Outline_Funcs.LINE_TO)); } - /** Unsafe version of {@link #conic_to}. */ - @Nullable public static FT_Outline_ConicToFunc nconic_to(long struct) { return FT_Outline_ConicToFunc.createSafe(memGetAddress(struct + FT_Outline_Funcs.CONIC_TO)); } - /** Unsafe version of {@link #cubic_to}. */ - @Nullable public static FT_Outline_CubicToFunc ncubic_to(long struct) { return FT_Outline_CubicToFunc.createSafe(memGetAddress(struct + FT_Outline_Funcs.CUBIC_TO)); } - /** Unsafe version of {@link #shift}. */ - public static int nshift(long struct) { return UNSAFE.getInt(null, struct + FT_Outline_Funcs.SHIFT); } - /** Unsafe version of {@link #delta}. */ - public static long ndelta(long struct) { return memGetCLong(struct + FT_Outline_Funcs.DELTA); } - - /** Unsafe version of {@link #move_to(FT_Outline_MoveToFuncI) move_to}. */ - public static void nmove_to(long struct, @Nullable FT_Outline_MoveToFuncI value) { memPutAddress(struct + FT_Outline_Funcs.MOVE_TO, memAddressSafe(value)); } - /** Unsafe version of {@link #line_to(FT_Outline_LineToFuncI) line_to}. */ - public static void nline_to(long struct, @Nullable FT_Outline_LineToFuncI value) { memPutAddress(struct + FT_Outline_Funcs.LINE_TO, memAddressSafe(value)); } - /** Unsafe version of {@link #conic_to(FT_Outline_ConicToFuncI) conic_to}. */ - public static void nconic_to(long struct, @Nullable FT_Outline_ConicToFuncI value) { memPutAddress(struct + FT_Outline_Funcs.CONIC_TO, memAddressSafe(value)); } - /** Unsafe version of {@link #cubic_to(FT_Outline_CubicToFuncI) cubic_to}. */ - public static void ncubic_to(long struct, @Nullable FT_Outline_CubicToFuncI value) { memPutAddress(struct + FT_Outline_Funcs.CUBIC_TO, memAddressSafe(value)); } - /** Unsafe version of {@link #shift(int) shift}. */ - public static void nshift(long struct, int value) { UNSAFE.putInt(null, struct + FT_Outline_Funcs.SHIFT, value); } - /** Unsafe version of {@link #delta(long) delta}. */ - public static void ndelta(long struct, long value) { memPutCLong(struct + FT_Outline_Funcs.DELTA, value); } - - // ----------------------------------- - - /** An array of {@link FT_Outline_Funcs} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Outline_Funcs ELEMENT_FACTORY = FT_Outline_Funcs.create(-1L); - - /** - * Creates a new {@code FT_Outline_Funcs.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Outline_Funcs#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Outline_Funcs getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code move_to} field. */ - @Nullable - public FT_Outline_MoveToFunc move_to() { return FT_Outline_Funcs.nmove_to(address()); } - /** @return the value of the {@code line_to} field. */ - @Nullable - public FT_Outline_LineToFunc line_to() { return FT_Outline_Funcs.nline_to(address()); } - /** @return the value of the {@code conic_to} field. */ - @Nullable - public FT_Outline_ConicToFunc conic_to() { return FT_Outline_Funcs.nconic_to(address()); } - /** @return the value of the {@code cubic_to} field. */ - @Nullable - public FT_Outline_CubicToFunc cubic_to() { return FT_Outline_Funcs.ncubic_to(address()); } - /** @return the value of the {@code shift} field. */ - public int shift() { return FT_Outline_Funcs.nshift(address()); } - /** @return the value of the {@code delta} field. */ - @NativeType("FT_Pos") - public long delta() { return FT_Outline_Funcs.ndelta(address()); } - - /** Sets the specified value to the {@code move_to} field. */ - public Buffer move_to(@Nullable @NativeType("FT_Outline_MoveToFunc") FT_Outline_MoveToFuncI value) { FT_Outline_Funcs.nmove_to(address(), value); return this; } - /** Sets the specified value to the {@code line_to} field. */ - public Buffer line_to(@Nullable @NativeType("FT_Outline_LineToFunc") FT_Outline_LineToFuncI value) { FT_Outline_Funcs.nline_to(address(), value); return this; } - /** Sets the specified value to the {@code conic_to} field. */ - public Buffer conic_to(@Nullable @NativeType("FT_Outline_ConicToFunc") FT_Outline_ConicToFuncI value) { FT_Outline_Funcs.nconic_to(address(), value); return this; } - /** Sets the specified value to the {@code cubic_to} field. */ - public Buffer cubic_to(@Nullable @NativeType("FT_Outline_CubicToFunc") FT_Outline_CubicToFuncI value) { FT_Outline_Funcs.ncubic_to(address(), value); return this; } - /** Sets the specified value to the {@code shift} field. */ - public Buffer shift(int value) { FT_Outline_Funcs.nshift(address(), value); return this; } - /** Sets the specified value to the {@code delta} field. */ - public Buffer delta(@NativeType("FT_Pos") long value) { FT_Outline_Funcs.ndelta(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_LineToFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_LineToFunc.java deleted file mode 100644 index 8b215288..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_LineToFunc.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -public abstract class FT_Outline_LineToFunc extends Callback implements FT_Outline_LineToFuncI { - - /** - * Creates a {@code FT_Outline_LineToFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Outline_LineToFunc} - */ - public static FT_Outline_LineToFunc create(long functionPointer) { - FT_Outline_LineToFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Outline_LineToFunc - ? (FT_Outline_LineToFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Outline_LineToFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Outline_LineToFunc} instance that delegates to the specified {@code FT_Outline_LineToFuncI} instance. */ - public static FT_Outline_LineToFunc create(FT_Outline_LineToFuncI instance) { - return instance instanceof FT_Outline_LineToFunc - ? (FT_Outline_LineToFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Outline_LineToFunc() { - super(CIF); - } - - FT_Outline_LineToFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Outline_LineToFunc { - - private final FT_Outline_LineToFuncI delegate; - - Container(long functionPointer, FT_Outline_LineToFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long to, long user) { - return delegate.invoke(to, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_LineToFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_LineToFuncI.java deleted file mode 100644 index 7043291d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_LineToFuncI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Outline_LineToFunc") -public interface FT_Outline_LineToFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function pointer type used to describe the signature of a 'line to' function during outline walking/decomposition. */ - int invoke(@NativeType("FT_Vector const *") long to, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_MoveToFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_MoveToFunc.java deleted file mode 100644 index dbf091d1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_MoveToFunc.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -public abstract class FT_Outline_MoveToFunc extends Callback implements FT_Outline_MoveToFuncI { - - /** - * Creates a {@code FT_Outline_MoveToFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Outline_MoveToFunc} - */ - public static FT_Outline_MoveToFunc create(long functionPointer) { - FT_Outline_MoveToFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Outline_MoveToFunc - ? (FT_Outline_MoveToFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Outline_MoveToFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Outline_MoveToFunc} instance that delegates to the specified {@code FT_Outline_MoveToFuncI} instance. */ - public static FT_Outline_MoveToFunc create(FT_Outline_MoveToFuncI instance) { - return instance instanceof FT_Outline_MoveToFunc - ? (FT_Outline_MoveToFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Outline_MoveToFunc() { - super(CIF); - } - - FT_Outline_MoveToFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Outline_MoveToFunc { - - private final FT_Outline_MoveToFuncI delegate; - - Container(long functionPointer, FT_Outline_MoveToFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long to, long user) { - return delegate.invoke(to, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_MoveToFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_MoveToFuncI.java deleted file mode 100644 index b6019594..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Outline_MoveToFuncI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Vector const *to,
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Outline_MoveToFunc") -public interface FT_Outline_MoveToFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function pointer type used to describe the signature of a 'move to' function during outline walking/decomposition. */ - int invoke(@NativeType("FT_Vector const *") long to, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintColrGlyph.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintColrGlyph.java deleted file mode 100644 index 8ae8f5bf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintColrGlyph.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code COLR} v1 {@code PaintColorGlyph} paint table. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintColrGlyph {
    - *     FT_UInt glyphID;
    - * }
    - */ -public class FT_PaintColrGlyph extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - GLYPHID; - - static { - Layout layout = __struct( - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - GLYPHID = layout.offsetof(0); - } - - protected FT_PaintColrGlyph(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintColrGlyph create(long address, @Nullable ByteBuffer container) { - return new FT_PaintColrGlyph(address, container); - } - - /** - * Creates a {@code FT_PaintColrGlyph} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintColrGlyph(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code glyphID} field. */ - @NativeType("FT_UInt") - public int glyphID() { return nglyphID(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintColrGlyph} instance for the specified memory address. */ - public static FT_PaintColrGlyph create(long address) { - return new FT_PaintColrGlyph(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintColrGlyph createSafe(long address) { - return address == NULL ? null : new FT_PaintColrGlyph(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #glyphID}. */ - public static int nglyphID(long struct) { return UNSAFE.getInt(null, struct + FT_PaintColrGlyph.GLYPHID); } - - // ----------------------------------- - - /** An array of {@link FT_PaintColrGlyph} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintColrGlyph ELEMENT_FACTORY = FT_PaintColrGlyph.create(-1L); - - /** - * Creates a new {@code FT_PaintColrGlyph.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintColrGlyph#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintColrGlyph getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code glyphID} field. */ - @NativeType("FT_UInt") - public int glyphID() { return FT_PaintColrGlyph.nglyphID(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintColrLayers.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintColrLayers.java deleted file mode 100644 index ed941bb5..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintColrLayers.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code PaintColrLayers} table of a {@code COLR} v1 font. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintColrLayers {
    - *     {@link FT_LayerIterator FT_LayerIterator} layer_iterator;
    - * }
    - */ -public class FT_PaintColrLayers extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - LAYER_ITERATOR; - - static { - Layout layout = __struct( - __member(FT_LayerIterator.SIZEOF, FT_LayerIterator.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - LAYER_ITERATOR = layout.offsetof(0); - } - - protected FT_PaintColrLayers(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintColrLayers create(long address, @Nullable ByteBuffer container) { - return new FT_PaintColrLayers(address, container); - } - - /** - * Creates a {@code FT_PaintColrLayers} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintColrLayers(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_LayerIterator} view of the {@code layer_iterator} field. */ - public FT_LayerIterator layer_iterator() { return nlayer_iterator(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintColrLayers} instance for the specified memory address. */ - public static FT_PaintColrLayers create(long address) { - return new FT_PaintColrLayers(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintColrLayers createSafe(long address) { - return address == NULL ? null : new FT_PaintColrLayers(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #layer_iterator}. */ - public static FT_LayerIterator nlayer_iterator(long struct) { return FT_LayerIterator.create(struct + FT_PaintColrLayers.LAYER_ITERATOR); } - - // ----------------------------------- - - /** An array of {@link FT_PaintColrLayers} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintColrLayers ELEMENT_FACTORY = FT_PaintColrLayers.create(-1L); - - /** - * Creates a new {@code FT_PaintColrLayers.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintColrLayers#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintColrLayers getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_LayerIterator} view of the {@code layer_iterator} field. */ - public FT_LayerIterator layer_iterator() { return FT_PaintColrLayers.nlayer_iterator(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintComposite.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintComposite.java deleted file mode 100644 index f3ec4ba1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintComposite.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code COLR} v1 {@code PaintComposite} paint table. Used for compositing two paints in a {@code COLR} v1 directed acyclic - * graph. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintComposite {
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} source_paint;
    - *     FT_Composite_Mode composite_mode;
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} backdrop_paint;
    - * }
    - */ -public class FT_PaintComposite extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SOURCE_PAINT, - COMPOSITE_MODE, - BACKDROP_PAINT; - - static { - Layout layout = __struct( - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF), - __member(4), - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SOURCE_PAINT = layout.offsetof(0); - COMPOSITE_MODE = layout.offsetof(1); - BACKDROP_PAINT = layout.offsetof(2); - } - - protected FT_PaintComposite(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintComposite create(long address, @Nullable ByteBuffer container) { - return new FT_PaintComposite(address, container); - } - - /** - * Creates a {@code FT_PaintComposite} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintComposite(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_OpaquePaint} view of the {@code source_paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint source_paint() { return nsource_paint(address()); } - /** @return the value of the {@code composite_mode} field. */ - @NativeType("FT_Composite_Mode") - public int composite_mode() { return ncomposite_mode(address()); } - /** @return a {@link FT_OpaquePaint} view of the {@code backdrop_paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint backdrop_paint() { return nbackdrop_paint(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintComposite} instance for the specified memory address. */ - public static FT_PaintComposite create(long address) { - return new FT_PaintComposite(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintComposite createSafe(long address) { - return address == NULL ? null : new FT_PaintComposite(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #source_paint}. */ - public static FT_OpaquePaint nsource_paint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintComposite.SOURCE_PAINT); } - /** Unsafe version of {@link #composite_mode}. */ - public static int ncomposite_mode(long struct) { return UNSAFE.getInt(null, struct + FT_PaintComposite.COMPOSITE_MODE); } - /** Unsafe version of {@link #backdrop_paint}. */ - public static FT_OpaquePaint nbackdrop_paint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintComposite.BACKDROP_PAINT); } - - // ----------------------------------- - - /** An array of {@link FT_PaintComposite} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintComposite ELEMENT_FACTORY = FT_PaintComposite.create(-1L); - - /** - * Creates a new {@code FT_PaintComposite.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintComposite#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintComposite getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_OpaquePaint} view of the {@code source_paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint source_paint() { return FT_PaintComposite.nsource_paint(address()); } - /** @return the value of the {@code composite_mode} field. */ - @NativeType("FT_Composite_Mode") - public int composite_mode() { return FT_PaintComposite.ncomposite_mode(address()); } - /** @return a {@link FT_OpaquePaint} view of the {@code backdrop_paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint backdrop_paint() { return FT_PaintComposite.nbackdrop_paint(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintGlyph.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintGlyph.java deleted file mode 100644 index 397c0009..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintGlyph.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code COLR} v1 {@code PaintGlyph} paint table. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintGlyph {
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} paint;
    - *     FT_UInt glyphID;
    - * }
    - */ -public class FT_PaintGlyph extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PAINT, - GLYPHID; - - static { - Layout layout = __struct( - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PAINT = layout.offsetof(0); - GLYPHID = layout.offsetof(1); - } - - protected FT_PaintGlyph(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintGlyph create(long address, @Nullable ByteBuffer container) { - return new FT_PaintGlyph(address, container); - } - - /** - * Creates a {@code FT_PaintGlyph} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintGlyph(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return npaint(address()); } - /** @return the value of the {@code glyphID} field. */ - @NativeType("FT_UInt") - public int glyphID() { return nglyphID(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintGlyph} instance for the specified memory address. */ - public static FT_PaintGlyph create(long address) { - return new FT_PaintGlyph(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintGlyph createSafe(long address) { - return address == NULL ? null : new FT_PaintGlyph(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #paint}. */ - public static FT_OpaquePaint npaint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintGlyph.PAINT); } - /** Unsafe version of {@link #glyphID}. */ - public static int nglyphID(long struct) { return UNSAFE.getInt(null, struct + FT_PaintGlyph.GLYPHID); } - - // ----------------------------------- - - /** An array of {@link FT_PaintGlyph} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintGlyph ELEMENT_FACTORY = FT_PaintGlyph.create(-1L); - - /** - * Creates a new {@code FT_PaintGlyph.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintGlyph#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintGlyph getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return FT_PaintGlyph.npaint(address()); } - /** @return the value of the {@code glyphID} field. */ - @NativeType("FT_UInt") - public int glyphID() { return FT_PaintGlyph.nglyphID(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintLinearGradient.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintLinearGradient.java deleted file mode 100644 index 55a94298..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintLinearGradient.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code PaintLinearGradient} value of the {@code COLR} v1 extensions. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintLinearGradient {
    - *     {@link FT_ColorLine FT_ColorLine} colorline;
    - *     {@link FT_Vector FT_Vector} p0;
    - *     {@link FT_Vector FT_Vector} p1;
    - *     {@link FT_Vector FT_Vector} p2;
    - * }
    - */ -public class FT_PaintLinearGradient extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - COLORLINE, - P0, - P1, - P2; - - static { - Layout layout = __struct( - __member(FT_ColorLine.SIZEOF, FT_ColorLine.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - COLORLINE = layout.offsetof(0); - P0 = layout.offsetof(1); - P1 = layout.offsetof(2); - P2 = layout.offsetof(3); - } - - protected FT_PaintLinearGradient(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintLinearGradient create(long address, @Nullable ByteBuffer container) { - return new FT_PaintLinearGradient(address, container); - } - - /** - * Creates a {@code FT_PaintLinearGradient} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintLinearGradient(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_ColorLine} view of the {@code colorline} field. */ - public FT_ColorLine colorline() { return ncolorline(address()); } - /** @return a {@link FT_Vector} view of the {@code p0} field. */ - public FT_Vector p0() { return np0(address()); } - /** @return a {@link FT_Vector} view of the {@code p1} field. */ - public FT_Vector p1() { return np1(address()); } - /** @return a {@link FT_Vector} view of the {@code p2} field. */ - public FT_Vector p2() { return np2(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintLinearGradient} instance for the specified memory address. */ - public static FT_PaintLinearGradient create(long address) { - return new FT_PaintLinearGradient(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintLinearGradient createSafe(long address) { - return address == NULL ? null : new FT_PaintLinearGradient(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #colorline}. */ - public static FT_ColorLine ncolorline(long struct) { return FT_ColorLine.create(struct + FT_PaintLinearGradient.COLORLINE); } - /** Unsafe version of {@link #p0}. */ - public static FT_Vector np0(long struct) { return FT_Vector.create(struct + FT_PaintLinearGradient.P0); } - /** Unsafe version of {@link #p1}. */ - public static FT_Vector np1(long struct) { return FT_Vector.create(struct + FT_PaintLinearGradient.P1); } - /** Unsafe version of {@link #p2}. */ - public static FT_Vector np2(long struct) { return FT_Vector.create(struct + FT_PaintLinearGradient.P2); } - - // ----------------------------------- - - /** An array of {@link FT_PaintLinearGradient} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintLinearGradient ELEMENT_FACTORY = FT_PaintLinearGradient.create(-1L); - - /** - * Creates a new {@code FT_PaintLinearGradient.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintLinearGradient#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintLinearGradient getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_ColorLine} view of the {@code colorline} field. */ - public FT_ColorLine colorline() { return FT_PaintLinearGradient.ncolorline(address()); } - /** @return a {@link FT_Vector} view of the {@code p0} field. */ - public FT_Vector p0() { return FT_PaintLinearGradient.np0(address()); } - /** @return a {@link FT_Vector} view of the {@code p1} field. */ - public FT_Vector p1() { return FT_PaintLinearGradient.np1(address()); } - /** @return a {@link FT_Vector} view of the {@code p2} field. */ - public FT_Vector p2() { return FT_PaintLinearGradient.np2(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintRadialGradient.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintRadialGradient.java deleted file mode 100644 index e251bfd1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintRadialGradient.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code PaintRadialGradient} value of the {@code COLR} v1 extensions. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintRadialGradient {
    - *     {@link FT_ColorLine FT_ColorLine} colorline;
    - *     {@link FT_Vector FT_Vector} c0;
    - *     FT_Pos r0;
    - *     {@link FT_Vector FT_Vector} c1;
    - *     FT_Pos r1;
    - * }
    - */ -public class FT_PaintRadialGradient extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - COLORLINE, - C0, - R0, - C1, - R1; - - static { - Layout layout = __struct( - __member(FT_ColorLine.SIZEOF, FT_ColorLine.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(CLONG_SIZE), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - COLORLINE = layout.offsetof(0); - C0 = layout.offsetof(1); - R0 = layout.offsetof(2); - C1 = layout.offsetof(3); - R1 = layout.offsetof(4); - } - - protected FT_PaintRadialGradient(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintRadialGradient create(long address, @Nullable ByteBuffer container) { - return new FT_PaintRadialGradient(address, container); - } - - /** - * Creates a {@code FT_PaintRadialGradient} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintRadialGradient(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_ColorLine} view of the {@code colorline} field. */ - public FT_ColorLine colorline() { return ncolorline(address()); } - /** @return a {@link FT_Vector} view of the {@code c0} field. */ - public FT_Vector c0() { return nc0(address()); } - /** @return the value of the {@code r0} field. */ - @NativeType("FT_Pos") - public long r0() { return nr0(address()); } - /** @return a {@link FT_Vector} view of the {@code c1} field. */ - public FT_Vector c1() { return nc1(address()); } - /** @return the value of the {@code r1} field. */ - @NativeType("FT_Pos") - public long r1() { return nr1(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintRadialGradient} instance for the specified memory address. */ - public static FT_PaintRadialGradient create(long address) { - return new FT_PaintRadialGradient(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintRadialGradient createSafe(long address) { - return address == NULL ? null : new FT_PaintRadialGradient(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #colorline}. */ - public static FT_ColorLine ncolorline(long struct) { return FT_ColorLine.create(struct + FT_PaintRadialGradient.COLORLINE); } - /** Unsafe version of {@link #c0}. */ - public static FT_Vector nc0(long struct) { return FT_Vector.create(struct + FT_PaintRadialGradient.C0); } - /** Unsafe version of {@link #r0}. */ - public static long nr0(long struct) { return memGetCLong(struct + FT_PaintRadialGradient.R0); } - /** Unsafe version of {@link #c1}. */ - public static FT_Vector nc1(long struct) { return FT_Vector.create(struct + FT_PaintRadialGradient.C1); } - /** Unsafe version of {@link #r1}. */ - public static long nr1(long struct) { return memGetCLong(struct + FT_PaintRadialGradient.R1); } - - // ----------------------------------- - - /** An array of {@link FT_PaintRadialGradient} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintRadialGradient ELEMENT_FACTORY = FT_PaintRadialGradient.create(-1L); - - /** - * Creates a new {@code FT_PaintRadialGradient.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintRadialGradient#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintRadialGradient getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_ColorLine} view of the {@code colorline} field. */ - public FT_ColorLine colorline() { return FT_PaintRadialGradient.ncolorline(address()); } - /** @return a {@link FT_Vector} view of the {@code c0} field. */ - public FT_Vector c0() { return FT_PaintRadialGradient.nc0(address()); } - /** @return the value of the {@code r0} field. */ - @NativeType("FT_Pos") - public long r0() { return FT_PaintRadialGradient.nr0(address()); } - /** @return a {@link FT_Vector} view of the {@code c1} field. */ - public FT_Vector c1() { return FT_PaintRadialGradient.nc1(address()); } - /** @return the value of the {@code r1} field. */ - @NativeType("FT_Pos") - public long r1() { return FT_PaintRadialGradient.nr1(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintRotate.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintRotate.java deleted file mode 100644 index 3458d154..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintRotate.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code COLR} v1 {@code PaintRotate} paint table. Used for rotating downstream paints with a given center and angle. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintRotate {
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} paint;
    - *     FT_Fixed angle;
    - *     FT_Fixed center_x;
    - *     FT_Fixed center_y;
    - * }
    - */ -public class FT_PaintRotate extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PAINT, - ANGLE, - CENTER_X, - CENTER_Y; - - static { - Layout layout = __struct( - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PAINT = layout.offsetof(0); - ANGLE = layout.offsetof(1); - CENTER_X = layout.offsetof(2); - CENTER_Y = layout.offsetof(3); - } - - protected FT_PaintRotate(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintRotate create(long address, @Nullable ByteBuffer container) { - return new FT_PaintRotate(address, container); - } - - /** - * Creates a {@code FT_PaintRotate} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintRotate(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return npaint(address()); } - /** @return the value of the {@code angle} field. */ - @NativeType("FT_Fixed") - public long angle() { return nangle(address()); } - /** @return the value of the {@code center_x} field. */ - @NativeType("FT_Fixed") - public long center_x() { return ncenter_x(address()); } - /** @return the value of the {@code center_y} field. */ - @NativeType("FT_Fixed") - public long center_y() { return ncenter_y(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintRotate} instance for the specified memory address. */ - public static FT_PaintRotate create(long address) { - return new FT_PaintRotate(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintRotate createSafe(long address) { - return address == NULL ? null : new FT_PaintRotate(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #paint}. */ - public static FT_OpaquePaint npaint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintRotate.PAINT); } - /** Unsafe version of {@link #angle}. */ - public static long nangle(long struct) { return memGetCLong(struct + FT_PaintRotate.ANGLE); } - /** Unsafe version of {@link #center_x}. */ - public static long ncenter_x(long struct) { return memGetCLong(struct + FT_PaintRotate.CENTER_X); } - /** Unsafe version of {@link #center_y}. */ - public static long ncenter_y(long struct) { return memGetCLong(struct + FT_PaintRotate.CENTER_Y); } - - // ----------------------------------- - - /** An array of {@link FT_PaintRotate} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintRotate ELEMENT_FACTORY = FT_PaintRotate.create(-1L); - - /** - * Creates a new {@code FT_PaintRotate.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintRotate#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintRotate getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return FT_PaintRotate.npaint(address()); } - /** @return the value of the {@code angle} field. */ - @NativeType("FT_Fixed") - public long angle() { return FT_PaintRotate.nangle(address()); } - /** @return the value of the {@code center_x} field. */ - @NativeType("FT_Fixed") - public long center_x() { return FT_PaintRotate.ncenter_x(address()); } - /** @return the value of the {@code center_y} field. */ - @NativeType("FT_Fixed") - public long center_y() { return FT_PaintRotate.ncenter_y(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintScale.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintScale.java deleted file mode 100644 index c8b59995..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintScale.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing all of the {@code COLR} v1 {@code PaintScale*} paint tables. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintScale {
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} paint;
    - *     FT_Fixed scale_x;
    - *     FT_Fixed scale_y;
    - *     FT_Fixed center_x;
    - *     FT_Fixed center_y;
    - * }
    - */ -public class FT_PaintScale extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PAINT, - SCALE_X, - SCALE_Y, - CENTER_X, - CENTER_Y; - - static { - Layout layout = __struct( - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PAINT = layout.offsetof(0); - SCALE_X = layout.offsetof(1); - SCALE_Y = layout.offsetof(2); - CENTER_X = layout.offsetof(3); - CENTER_Y = layout.offsetof(4); - } - - protected FT_PaintScale(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintScale create(long address, @Nullable ByteBuffer container) { - return new FT_PaintScale(address, container); - } - - /** - * Creates a {@code FT_PaintScale} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintScale(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return npaint(address()); } - /** @return the value of the {@code scale_x} field. */ - @NativeType("FT_Fixed") - public long scale_x() { return nscale_x(address()); } - /** @return the value of the {@code scale_y} field. */ - @NativeType("FT_Fixed") - public long scale_y() { return nscale_y(address()); } - /** @return the value of the {@code center_x} field. */ - @NativeType("FT_Fixed") - public long center_x() { return ncenter_x(address()); } - /** @return the value of the {@code center_y} field. */ - @NativeType("FT_Fixed") - public long center_y() { return ncenter_y(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintScale} instance for the specified memory address. */ - public static FT_PaintScale create(long address) { - return new FT_PaintScale(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintScale createSafe(long address) { - return address == NULL ? null : new FT_PaintScale(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #paint}. */ - public static FT_OpaquePaint npaint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintScale.PAINT); } - /** Unsafe version of {@link #scale_x}. */ - public static long nscale_x(long struct) { return memGetCLong(struct + FT_PaintScale.SCALE_X); } - /** Unsafe version of {@link #scale_y}. */ - public static long nscale_y(long struct) { return memGetCLong(struct + FT_PaintScale.SCALE_Y); } - /** Unsafe version of {@link #center_x}. */ - public static long ncenter_x(long struct) { return memGetCLong(struct + FT_PaintScale.CENTER_X); } - /** Unsafe version of {@link #center_y}. */ - public static long ncenter_y(long struct) { return memGetCLong(struct + FT_PaintScale.CENTER_Y); } - - // ----------------------------------- - - /** An array of {@link FT_PaintScale} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintScale ELEMENT_FACTORY = FT_PaintScale.create(-1L); - - /** - * Creates a new {@code FT_PaintScale.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintScale#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintScale getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return FT_PaintScale.npaint(address()); } - /** @return the value of the {@code scale_x} field. */ - @NativeType("FT_Fixed") - public long scale_x() { return FT_PaintScale.nscale_x(address()); } - /** @return the value of the {@code scale_y} field. */ - @NativeType("FT_Fixed") - public long scale_y() { return FT_PaintScale.nscale_y(address()); } - /** @return the value of the {@code center_x} field. */ - @NativeType("FT_Fixed") - public long center_x() { return FT_PaintScale.ncenter_x(address()); } - /** @return the value of the {@code center_y} field. */ - @NativeType("FT_Fixed") - public long center_y() { return FT_PaintScale.ncenter_y(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSkew.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSkew.java deleted file mode 100644 index cd8f4424..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSkew.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code COLR} v1 {@code PaintSkew} paint table. Used for skewing or shearing downstream paints by a given center and angle. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintSkew {
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} paint;
    - *     FT_Fixed x_skew_angle;
    - *     FT_Fixed y_skew_angle;
    - *     FT_Fixed center_x;
    - *     FT_Fixed center_y;
    - * }
    - */ -public class FT_PaintSkew extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PAINT, - X_SKEW_ANGLE, - Y_SKEW_ANGLE, - CENTER_X, - CENTER_Y; - - static { - Layout layout = __struct( - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PAINT = layout.offsetof(0); - X_SKEW_ANGLE = layout.offsetof(1); - Y_SKEW_ANGLE = layout.offsetof(2); - CENTER_X = layout.offsetof(3); - CENTER_Y = layout.offsetof(4); - } - - protected FT_PaintSkew(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintSkew create(long address, @Nullable ByteBuffer container) { - return new FT_PaintSkew(address, container); - } - - /** - * Creates a {@code FT_PaintSkew} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintSkew(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return npaint(address()); } - /** @return the value of the {@code x_skew_angle} field. */ - @NativeType("FT_Fixed") - public long x_skew_angle() { return nx_skew_angle(address()); } - /** @return the value of the {@code y_skew_angle} field. */ - @NativeType("FT_Fixed") - public long y_skew_angle() { return ny_skew_angle(address()); } - /** @return the value of the {@code center_x} field. */ - @NativeType("FT_Fixed") - public long center_x() { return ncenter_x(address()); } - /** @return the value of the {@code center_y} field. */ - @NativeType("FT_Fixed") - public long center_y() { return ncenter_y(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintSkew} instance for the specified memory address. */ - public static FT_PaintSkew create(long address) { - return new FT_PaintSkew(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintSkew createSafe(long address) { - return address == NULL ? null : new FT_PaintSkew(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #paint}. */ - public static FT_OpaquePaint npaint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintSkew.PAINT); } - /** Unsafe version of {@link #x_skew_angle}. */ - public static long nx_skew_angle(long struct) { return memGetCLong(struct + FT_PaintSkew.X_SKEW_ANGLE); } - /** Unsafe version of {@link #y_skew_angle}. */ - public static long ny_skew_angle(long struct) { return memGetCLong(struct + FT_PaintSkew.Y_SKEW_ANGLE); } - /** Unsafe version of {@link #center_x}. */ - public static long ncenter_x(long struct) { return memGetCLong(struct + FT_PaintSkew.CENTER_X); } - /** Unsafe version of {@link #center_y}. */ - public static long ncenter_y(long struct) { return memGetCLong(struct + FT_PaintSkew.CENTER_Y); } - - // ----------------------------------- - - /** An array of {@link FT_PaintSkew} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintSkew ELEMENT_FACTORY = FT_PaintSkew.create(-1L); - - /** - * Creates a new {@code FT_PaintSkew.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintSkew#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintSkew getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return FT_PaintSkew.npaint(address()); } - /** @return the value of the {@code x_skew_angle} field. */ - @NativeType("FT_Fixed") - public long x_skew_angle() { return FT_PaintSkew.nx_skew_angle(address()); } - /** @return the value of the {@code y_skew_angle} field. */ - @NativeType("FT_Fixed") - public long y_skew_angle() { return FT_PaintSkew.ny_skew_angle(address()); } - /** @return the value of the {@code center_x} field. */ - @NativeType("FT_Fixed") - public long center_x() { return FT_PaintSkew.ncenter_x(address()); } - /** @return the value of the {@code center_y} field. */ - @NativeType("FT_Fixed") - public long center_y() { return FT_PaintSkew.ncenter_y(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSolid.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSolid.java deleted file mode 100644 index 16fc4126..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSolid.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code PaintSolid} value of the {@code COLR} v1 extensions. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintSolid {
    - *     {@link FT_ColorIndex FT_ColorIndex} color;
    - * }
    - */ -public class FT_PaintSolid extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - COLOR; - - static { - Layout layout = __struct( - __member(FT_ColorIndex.SIZEOF, FT_ColorIndex.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - COLOR = layout.offsetof(0); - } - - protected FT_PaintSolid(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintSolid create(long address, @Nullable ByteBuffer container) { - return new FT_PaintSolid(address, container); - } - - /** - * Creates a {@code FT_PaintSolid} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintSolid(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_ColorIndex} view of the {@code color} field. */ - public FT_ColorIndex color() { return ncolor(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintSolid} instance for the specified memory address. */ - public static FT_PaintSolid create(long address) { - return new FT_PaintSolid(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintSolid createSafe(long address) { - return address == NULL ? null : new FT_PaintSolid(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #color}. */ - public static FT_ColorIndex ncolor(long struct) { return FT_ColorIndex.create(struct + FT_PaintSolid.COLOR); } - - // ----------------------------------- - - /** An array of {@link FT_PaintSolid} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintSolid ELEMENT_FACTORY = FT_PaintSolid.create(-1L); - - /** - * Creates a new {@code FT_PaintSolid.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintSolid#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintSolid getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_ColorIndex} view of the {@code color} field. */ - public FT_ColorIndex color() { return FT_PaintSolid.ncolor(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSweepGradient.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSweepGradient.java deleted file mode 100644 index b95f6b1c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintSweepGradient.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code PaintSweepGradient} value of the {@code COLR} v1 extensions. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintSweepGradient {
    - *     {@link FT_ColorLine FT_ColorLine} colorline;
    - *     {@link FT_Vector FT_Vector} center;
    - *     FT_Fixed start_angle;
    - *     FT_Fixed end_angle;
    - * }
    - */ -public class FT_PaintSweepGradient extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - COLORLINE, - CENTER, - START_ANGLE, - END_ANGLE; - - static { - Layout layout = __struct( - __member(FT_ColorLine.SIZEOF, FT_ColorLine.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - COLORLINE = layout.offsetof(0); - CENTER = layout.offsetof(1); - START_ANGLE = layout.offsetof(2); - END_ANGLE = layout.offsetof(3); - } - - protected FT_PaintSweepGradient(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintSweepGradient create(long address, @Nullable ByteBuffer container) { - return new FT_PaintSweepGradient(address, container); - } - - /** - * Creates a {@code FT_PaintSweepGradient} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintSweepGradient(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_ColorLine} view of the {@code colorline} field. */ - public FT_ColorLine colorline() { return ncolorline(address()); } - /** @return a {@link FT_Vector} view of the {@code center} field. */ - public FT_Vector center() { return ncenter(address()); } - /** @return the value of the {@code start_angle} field. */ - @NativeType("FT_Fixed") - public long start_angle() { return nstart_angle(address()); } - /** @return the value of the {@code end_angle} field. */ - @NativeType("FT_Fixed") - public long end_angle() { return nend_angle(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintSweepGradient} instance for the specified memory address. */ - public static FT_PaintSweepGradient create(long address) { - return new FT_PaintSweepGradient(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintSweepGradient createSafe(long address) { - return address == NULL ? null : new FT_PaintSweepGradient(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #colorline}. */ - public static FT_ColorLine ncolorline(long struct) { return FT_ColorLine.create(struct + FT_PaintSweepGradient.COLORLINE); } - /** Unsafe version of {@link #center}. */ - public static FT_Vector ncenter(long struct) { return FT_Vector.create(struct + FT_PaintSweepGradient.CENTER); } - /** Unsafe version of {@link #start_angle}. */ - public static long nstart_angle(long struct) { return memGetCLong(struct + FT_PaintSweepGradient.START_ANGLE); } - /** Unsafe version of {@link #end_angle}. */ - public static long nend_angle(long struct) { return memGetCLong(struct + FT_PaintSweepGradient.END_ANGLE); } - - // ----------------------------------- - - /** An array of {@link FT_PaintSweepGradient} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintSweepGradient ELEMENT_FACTORY = FT_PaintSweepGradient.create(-1L); - - /** - * Creates a new {@code FT_PaintSweepGradient.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintSweepGradient#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintSweepGradient getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_ColorLine} view of the {@code colorline} field. */ - public FT_ColorLine colorline() { return FT_PaintSweepGradient.ncolorline(address()); } - /** @return a {@link FT_Vector} view of the {@code center} field. */ - public FT_Vector center() { return FT_PaintSweepGradient.ncenter(address()); } - /** @return the value of the {@code start_angle} field. */ - @NativeType("FT_Fixed") - public long start_angle() { return FT_PaintSweepGradient.nstart_angle(address()); } - /** @return the value of the {@code end_angle} field. */ - @NativeType("FT_Fixed") - public long end_angle() { return FT_PaintSweepGradient.nend_angle(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintTransform.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintTransform.java deleted file mode 100644 index bfffeacf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintTransform.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code COLR} v1 {@code PaintTransform} paint table. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintTransform {
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} paint;
    - *     {@link FT_Affine23 FT_Affine23} affine;
    - * }
    - */ -public class FT_PaintTransform extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PAINT, - AFFINE; - - static { - Layout layout = __struct( - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF), - __member(FT_Affine23.SIZEOF, FT_Affine23.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PAINT = layout.offsetof(0); - AFFINE = layout.offsetof(1); - } - - protected FT_PaintTransform(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintTransform create(long address, @Nullable ByteBuffer container) { - return new FT_PaintTransform(address, container); - } - - /** - * Creates a {@code FT_PaintTransform} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintTransform(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return npaint(address()); } - /** @return a {@link FT_Affine23} view of the {@code affine} field. */ - public FT_Affine23 affine() { return naffine(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintTransform} instance for the specified memory address. */ - public static FT_PaintTransform create(long address) { - return new FT_PaintTransform(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintTransform createSafe(long address) { - return address == NULL ? null : new FT_PaintTransform(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #paint}. */ - public static FT_OpaquePaint npaint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintTransform.PAINT); } - /** Unsafe version of {@link #affine}. */ - public static FT_Affine23 naffine(long struct) { return FT_Affine23.create(struct + FT_PaintTransform.AFFINE); } - - // ----------------------------------- - - /** An array of {@link FT_PaintTransform} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintTransform ELEMENT_FACTORY = FT_PaintTransform.create(-1L); - - /** - * Creates a new {@code FT_PaintTransform.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintTransform#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintTransform getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return FT_PaintTransform.npaint(address()); } - /** @return a {@link FT_Affine23} view of the {@code affine} field. */ - public FT_Affine23 affine() { return FT_PaintTransform.naffine(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintTranslate.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintTranslate.java deleted file mode 100644 index f68064c3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_PaintTranslate.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure representing a {@code COLR} v1 {@code PaintTranslate} paint table. Used for translating downstream paints by a given x and y~delta. - * - *

    Layout

    - * - *
    
    - * struct FT_PaintTranslate {
    - *     {@link FT_OpaquePaint FT_OpaquePaintRec} paint;
    - *     FT_Fixed dx;
    - *     FT_Fixed dy;
    - * }
    - */ -public class FT_PaintTranslate extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PAINT, - DX, - DY; - - static { - Layout layout = __struct( - __member(FT_OpaquePaint.SIZEOF, FT_OpaquePaint.ALIGNOF), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PAINT = layout.offsetof(0); - DX = layout.offsetof(1); - DY = layout.offsetof(2); - } - - protected FT_PaintTranslate(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_PaintTranslate create(long address, @Nullable ByteBuffer container) { - return new FT_PaintTranslate(address, container); - } - - /** - * Creates a {@code FT_PaintTranslate} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_PaintTranslate(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return npaint(address()); } - /** @return the value of the {@code dx} field. */ - @NativeType("FT_Fixed") - public long dx() { return ndx(address()); } - /** @return the value of the {@code dy} field. */ - @NativeType("FT_Fixed") - public long dy() { return ndy(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_PaintTranslate} instance for the specified memory address. */ - public static FT_PaintTranslate create(long address) { - return new FT_PaintTranslate(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_PaintTranslate createSafe(long address) { - return address == NULL ? null : new FT_PaintTranslate(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #paint}. */ - public static FT_OpaquePaint npaint(long struct) { return FT_OpaquePaint.create(struct + FT_PaintTranslate.PAINT); } - /** Unsafe version of {@link #dx}. */ - public static long ndx(long struct) { return memGetCLong(struct + FT_PaintTranslate.DX); } - /** Unsafe version of {@link #dy}. */ - public static long ndy(long struct) { return memGetCLong(struct + FT_PaintTranslate.DY); } - - // ----------------------------------- - - /** An array of {@link FT_PaintTranslate} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_PaintTranslate ELEMENT_FACTORY = FT_PaintTranslate.create(-1L); - - /** - * Creates a new {@code FT_PaintTranslate.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_PaintTranslate#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_PaintTranslate getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_OpaquePaint} view of the {@code paint} field. */ - @NativeType("FT_OpaquePaintRec") - public FT_OpaquePaint paint() { return FT_PaintTranslate.npaint(address()); } - /** @return the value of the {@code dx} field. */ - @NativeType("FT_Fixed") - public long dx() { return FT_PaintTranslate.ndx(address()); } - /** @return the value of the {@code dy} field. */ - @NativeType("FT_Fixed") - public long dy() { return FT_PaintTranslate.ndy(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Palette_Data.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Palette_Data.java deleted file mode 100644 index 399f30bb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Palette_Data.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * This structure holds the data of the {@code CPAL} table. - * - *

    Layout

    - * - *
    
    - * struct FT_Palette_Data {
    - *     FT_UShort num_palettes;
    - *     FT_UShort const * palette_name_ids;
    - *     FT_UShort const * palette_flags;
    - *     FT_UShort num_palette_entries;
    - *     FT_UShort const * palette_entry_name_ids;
    - * }
    - */ -public class FT_Palette_Data extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NUM_PALETTES, - PALETTE_NAME_IDS, - PALETTE_FLAGS, - NUM_PALETTE_ENTRIES, - PALETTE_ENTRY_NAME_IDS; - - static { - Layout layout = __struct( - __member(2), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(2), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NUM_PALETTES = layout.offsetof(0); - PALETTE_NAME_IDS = layout.offsetof(1); - PALETTE_FLAGS = layout.offsetof(2); - NUM_PALETTE_ENTRIES = layout.offsetof(3); - PALETTE_ENTRY_NAME_IDS = layout.offsetof(4); - } - - protected FT_Palette_Data(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Palette_Data create(long address, @Nullable ByteBuffer container) { - return new FT_Palette_Data(address, container); - } - - /** - * Creates a {@code FT_Palette_Data} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Palette_Data(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code num_palettes} field. */ - @NativeType("FT_UShort") - public short num_palettes() { return nnum_palettes(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code palette_name_ids} field. */ - @Nullable - @NativeType("FT_UShort const *") - public ShortBuffer palette_name_ids() { return npalette_name_ids(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code palette_flags} field. */ - @Nullable - @NativeType("FT_UShort const *") - public ShortBuffer palette_flags() { return npalette_flags(address()); } - /** @return the value of the {@code num_palette_entries} field. */ - @NativeType("FT_UShort") - public short num_palette_entries() { return nnum_palette_entries(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code palette_entry_name_ids} field. */ - @Nullable - @NativeType("FT_UShort const *") - public ShortBuffer palette_entry_name_ids() { return npalette_entry_name_ids(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Palette_Data} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Palette_Data malloc() { - return new FT_Palette_Data(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Palette_Data} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Palette_Data calloc() { - return new FT_Palette_Data(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Palette_Data} instance allocated with {@link BufferUtils}. */ - public static FT_Palette_Data create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Palette_Data(memAddress(container), container); - } - - /** Returns a new {@code FT_Palette_Data} instance for the specified memory address. */ - public static FT_Palette_Data create(long address) { - return new FT_Palette_Data(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Palette_Data createSafe(long address) { - return address == NULL ? null : new FT_Palette_Data(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Palette_Data} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Palette_Data malloc(MemoryStack stack) { - return new FT_Palette_Data(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Palette_Data} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Palette_Data calloc(MemoryStack stack) { - return new FT_Palette_Data(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #num_palettes}. */ - public static short nnum_palettes(long struct) { return UNSAFE.getShort(null, struct + FT_Palette_Data.NUM_PALETTES); } - /** Unsafe version of {@link #palette_name_ids() palette_name_ids}. */ - @Nullable public static ShortBuffer npalette_name_ids(long struct) { return memShortBufferSafe(memGetAddress(struct + FT_Palette_Data.PALETTE_NAME_IDS), Short.toUnsignedInt(nnum_palettes(struct))); } - /** Unsafe version of {@link #palette_flags() palette_flags}. */ - @Nullable public static ShortBuffer npalette_flags(long struct) { return memShortBufferSafe(memGetAddress(struct + FT_Palette_Data.PALETTE_FLAGS), Short.toUnsignedInt(nnum_palettes(struct))); } - /** Unsafe version of {@link #num_palette_entries}. */ - public static short nnum_palette_entries(long struct) { return UNSAFE.getShort(null, struct + FT_Palette_Data.NUM_PALETTE_ENTRIES); } - /** Unsafe version of {@link #palette_entry_name_ids() palette_entry_name_ids}. */ - @Nullable public static ShortBuffer npalette_entry_name_ids(long struct) { return memShortBufferSafe(memGetAddress(struct + FT_Palette_Data.PALETTE_ENTRY_NAME_IDS), Short.toUnsignedInt(nnum_palette_entries(struct))); } - - // ----------------------------------- - - /** An array of {@link FT_Palette_Data} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Palette_Data ELEMENT_FACTORY = FT_Palette_Data.create(-1L); - - /** - * Creates a new {@code FT_Palette_Data.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Palette_Data#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Palette_Data getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code num_palettes} field. */ - @NativeType("FT_UShort") - public short num_palettes() { return FT_Palette_Data.nnum_palettes(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code palette_name_ids} field. */ - @Nullable - @NativeType("FT_UShort const *") - public ShortBuffer palette_name_ids() { return FT_Palette_Data.npalette_name_ids(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code palette_flags} field. */ - @Nullable - @NativeType("FT_UShort const *") - public ShortBuffer palette_flags() { return FT_Palette_Data.npalette_flags(address()); } - /** @return the value of the {@code num_palette_entries} field. */ - @NativeType("FT_UShort") - public short num_palette_entries() { return FT_Palette_Data.nnum_palette_entries(address()); } - /** @return a {@link ShortBuffer} view of the data pointed to by the {@code palette_entry_name_ids} field. */ - @Nullable - @NativeType("FT_UShort const *") - public ShortBuffer palette_entry_name_ids() { return FT_Palette_Data.npalette_entry_name_ids(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Parameter.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Parameter.java deleted file mode 100644 index 153604a4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Parameter.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A simple structure to pass more or less generic parameters to {@link FreeType#FT_Open_Face Open_Face} and {@link FreeType#FT_Face_Properties Face_Properties}. - * - *

    Layout

    - * - *
    
    - * struct FT_Parameter {
    - *     FT_ULong tag;
    - *     FT_Pointer data;
    - * }
    - */ -public class FT_Parameter extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TAG, - DATA; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TAG = layout.offsetof(0); - DATA = layout.offsetof(1); - } - - protected FT_Parameter(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Parameter create(long address, @Nullable ByteBuffer container) { - return new FT_Parameter(address, container); - } - - /** - * Creates a {@code FT_Parameter} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Parameter(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code tag} field. */ - @NativeType("FT_ULong") - public long tag() { return ntag(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code data} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Pointer") - public ByteBuffer data(int capacity) { return ndata(address(), capacity); } - - /** Sets the specified value to the {@code tag} field. */ - public FT_Parameter tag(@NativeType("FT_ULong") long value) { ntag(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code data} field. */ - public FT_Parameter data(@Nullable @NativeType("FT_Pointer") ByteBuffer value) { ndata(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Parameter set( - long tag, - @Nullable ByteBuffer data - ) { - tag(tag); - data(data); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Parameter set(FT_Parameter src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Parameter} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Parameter malloc() { - return new FT_Parameter(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Parameter} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Parameter calloc() { - return new FT_Parameter(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Parameter} instance allocated with {@link BufferUtils}. */ - public static FT_Parameter create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Parameter(memAddress(container), container); - } - - /** Returns a new {@code FT_Parameter} instance for the specified memory address. */ - public static FT_Parameter create(long address) { - return new FT_Parameter(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Parameter createSafe(long address) { - return address == NULL ? null : new FT_Parameter(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Parameter} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Parameter malloc(MemoryStack stack) { - return new FT_Parameter(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Parameter} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Parameter calloc(MemoryStack stack) { - return new FT_Parameter(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #tag}. */ - public static long ntag(long struct) { return memGetCLong(struct + FT_Parameter.TAG); } - /** Unsafe version of {@link #data(int) data}. */ - @Nullable public static ByteBuffer ndata(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_Parameter.DATA), capacity); } - - /** Unsafe version of {@link #tag(long) tag}. */ - public static void ntag(long struct, long value) { memPutCLong(struct + FT_Parameter.TAG, value); } - /** Unsafe version of {@link #data(ByteBuffer) data}. */ - public static void ndata(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + FT_Parameter.DATA, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link FT_Parameter} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Parameter ELEMENT_FACTORY = FT_Parameter.create(-1L); - - /** - * Creates a new {@code FT_Parameter.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Parameter#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Parameter getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code tag} field. */ - @NativeType("FT_ULong") - public long tag() { return FT_Parameter.ntag(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code data} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_Pointer") - public ByteBuffer data(int capacity) { return FT_Parameter.ndata(address(), capacity); } - - /** Sets the specified value to the {@code tag} field. */ - public Buffer tag(@NativeType("FT_ULong") long value) { FT_Parameter.ntag(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code data} field. */ - public Buffer data(@Nullable @NativeType("FT_Pointer") ByteBuffer value) { FT_Parameter.ndata(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Prop_GlyphToScriptMap.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Prop_GlyphToScriptMap.java deleted file mode 100644 index f497b363..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Prop_GlyphToScriptMap.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The data exchange structure for the glyph -to-script-map property. - * - *

    Layout

    - * - *
    
    - * struct FT_Prop_GlyphToScriptMap {
    - *     {@link FT_Face FT_Face} face;
    - *     FT_UShort * map;
    - * }
    - */ -public class FT_Prop_GlyphToScriptMap extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FACE, - MAP; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FACE = layout.offsetof(0); - MAP = layout.offsetof(1); - } - - protected FT_Prop_GlyphToScriptMap(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Prop_GlyphToScriptMap create(long address, @Nullable ByteBuffer container) { - return new FT_Prop_GlyphToScriptMap(address, container); - } - - /** - * Creates a {@code FT_Prop_GlyphToScriptMap} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Prop_GlyphToScriptMap(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Face} view of the struct pointed to by the {@code face} field. */ - public FT_Face face() { return nface(address()); } - /** - * @return a {@link ShortBuffer} view of the data pointed to by the {@code map} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_UShort *") - public ShortBuffer map(int capacity) { return nmap(address(), capacity); } - - // ----------------------------------- - - /** Returns a new {@code FT_Prop_GlyphToScriptMap} instance for the specified memory address. */ - public static FT_Prop_GlyphToScriptMap create(long address) { - return new FT_Prop_GlyphToScriptMap(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Prop_GlyphToScriptMap createSafe(long address) { - return address == NULL ? null : new FT_Prop_GlyphToScriptMap(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #face}. */ - public static FT_Face nface(long struct) { return FT_Face.create(memGetAddress(struct + FT_Prop_GlyphToScriptMap.FACE)); } - /** Unsafe version of {@link #map(int) map}. */ - @Nullable public static ShortBuffer nmap(long struct, int capacity) { return memShortBufferSafe(memGetAddress(struct + FT_Prop_GlyphToScriptMap.MAP), capacity); } - - // ----------------------------------- - - /** An array of {@link FT_Prop_GlyphToScriptMap} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Prop_GlyphToScriptMap ELEMENT_FACTORY = FT_Prop_GlyphToScriptMap.create(-1L); - - /** - * Creates a new {@code FT_Prop_GlyphToScriptMap.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Prop_GlyphToScriptMap#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Prop_GlyphToScriptMap getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Face} view of the struct pointed to by the {@code face} field. */ - public FT_Face face() { return FT_Prop_GlyphToScriptMap.nface(address()); } - /** - * @return a {@link ShortBuffer} view of the data pointed to by the {@code map} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("FT_UShort *") - public ShortBuffer map(int capacity) { return FT_Prop_GlyphToScriptMap.nmap(address(), capacity); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Prop_IncreaseXHeight.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Prop_IncreaseXHeight.java deleted file mode 100644 index a024bb78..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Prop_IncreaseXHeight.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The data exchange structure for the {@code increase-x-height} property. - * - *

    Layout

    - * - *
    
    - * struct FT_Prop_IncreaseXHeight {
    - *     {@link FT_Face FT_Face} face;
    - *     FT_UInt limit;
    - * }
    - */ -public class FT_Prop_IncreaseXHeight extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FACE, - LIMIT; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FACE = layout.offsetof(0); - LIMIT = layout.offsetof(1); - } - - protected FT_Prop_IncreaseXHeight(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Prop_IncreaseXHeight create(long address, @Nullable ByteBuffer container) { - return new FT_Prop_IncreaseXHeight(address, container); - } - - /** - * Creates a {@code FT_Prop_IncreaseXHeight} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Prop_IncreaseXHeight(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Face} view of the struct pointed to by the {@code face} field. */ - public FT_Face face() { return nface(address()); } - /** @return the value of the {@code limit} field. */ - @NativeType("FT_UInt") - public int limit$() { return nlimit$(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Prop_IncreaseXHeight} instance for the specified memory address. */ - public static FT_Prop_IncreaseXHeight create(long address) { - return new FT_Prop_IncreaseXHeight(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Prop_IncreaseXHeight createSafe(long address) { - return address == NULL ? null : new FT_Prop_IncreaseXHeight(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #face}. */ - public static FT_Face nface(long struct) { return FT_Face.create(memGetAddress(struct + FT_Prop_IncreaseXHeight.FACE)); } - /** Unsafe version of {@link #limit$}. */ - public static int nlimit$(long struct) { return UNSAFE.getInt(null, struct + FT_Prop_IncreaseXHeight.LIMIT); } - - // ----------------------------------- - - /** An array of {@link FT_Prop_IncreaseXHeight} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Prop_IncreaseXHeight ELEMENT_FACTORY = FT_Prop_IncreaseXHeight.create(-1L); - - /** - * Creates a new {@code FT_Prop_IncreaseXHeight.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Prop_IncreaseXHeight#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Prop_IncreaseXHeight getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Face} view of the struct pointed to by the {@code face} field. */ - public FT_Face face() { return FT_Prop_IncreaseXHeight.nface(address()); } - /** @return the value of the {@code limit} field. */ - @NativeType("FT_UInt") - public int limit$() { return FT_Prop_IncreaseXHeight.nlimit$(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_DoneFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_DoneFunc.java deleted file mode 100644 index 8b51a7ad..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_DoneFunc.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Raster raster
    - * )
    - */ -public abstract class FT_Raster_DoneFunc extends Callback implements FT_Raster_DoneFuncI { - - /** - * Creates a {@code FT_Raster_DoneFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Raster_DoneFunc} - */ - public static FT_Raster_DoneFunc create(long functionPointer) { - FT_Raster_DoneFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Raster_DoneFunc - ? (FT_Raster_DoneFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Raster_DoneFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Raster_DoneFunc} instance that delegates to the specified {@code FT_Raster_DoneFuncI} instance. */ - public static FT_Raster_DoneFunc create(FT_Raster_DoneFuncI instance) { - return instance instanceof FT_Raster_DoneFunc - ? (FT_Raster_DoneFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Raster_DoneFunc() { - super(CIF); - } - - FT_Raster_DoneFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Raster_DoneFunc { - - private final FT_Raster_DoneFuncI delegate; - - Container(long functionPointer, FT_Raster_DoneFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long raster) { - delegate.invoke(raster); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_DoneFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_DoneFuncI.java deleted file mode 100644 index 830d3109..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_DoneFuncI.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Raster raster
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Raster_DoneFunc") -public interface FT_Raster_DoneFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - /** A function used to destroy a given raster object. */ - void invoke(@NativeType("FT_Raster") long raster); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_Funcs.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_Funcs.java deleted file mode 100644 index e4881cad..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_Funcs.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure used to describe a given raster class to the library. - * - *

    Layout

    - * - *
    
    - * struct FT_Raster_Funcs {
    - *     FT_Glyph_Format glyph_format;
    - *     {@link FT_Raster_NewFuncI FT_Raster_NewFunc} raster_new;
    - *     {@link FT_Raster_ResetFuncI FT_Raster_ResetFunc} raster_reset;
    - *     {@link FT_Raster_SetModeFuncI FT_Raster_SetModeFunc} raster_set_mode;
    - *     {@link FT_Raster_RenderFuncI FT_Raster_RenderFunc} raster_render;
    - *     {@link FT_Raster_DoneFuncI FT_Raster_DoneFunc} raster_done;
    - * }
    - */ -public class FT_Raster_Funcs extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - GLYPH_FORMAT, - RASTER_NEW, - RASTER_RESET, - RASTER_SET_MODE, - RASTER_RENDER, - RASTER_DONE; - - static { - Layout layout = __struct( - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - GLYPH_FORMAT = layout.offsetof(0); - RASTER_NEW = layout.offsetof(1); - RASTER_RESET = layout.offsetof(2); - RASTER_SET_MODE = layout.offsetof(3); - RASTER_RENDER = layout.offsetof(4); - RASTER_DONE = layout.offsetof(5); - } - - protected FT_Raster_Funcs(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Raster_Funcs create(long address, @Nullable ByteBuffer container) { - return new FT_Raster_Funcs(address, container); - } - - /** - * Creates a {@code FT_Raster_Funcs} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Raster_Funcs(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code glyph_format} field. */ - @NativeType("FT_Glyph_Format") - public int glyph_format() { return nglyph_format(address()); } - /** @return the value of the {@code raster_new} field. */ - @Nullable - public FT_Raster_NewFunc raster_new() { return nraster_new(address()); } - /** @return the value of the {@code raster_reset} field. */ - @Nullable - public FT_Raster_ResetFunc raster_reset() { return nraster_reset(address()); } - /** @return the value of the {@code raster_set_mode} field. */ - @Nullable - public FT_Raster_SetModeFunc raster_set_mode() { return nraster_set_mode(address()); } - /** @return the value of the {@code raster_render} field. */ - @Nullable - public FT_Raster_RenderFunc raster_render() { return nraster_render(address()); } - /** @return the value of the {@code raster_done} field. */ - @Nullable - public FT_Raster_DoneFunc raster_done() { return nraster_done(address()); } - - /** Sets the specified value to the {@code glyph_format} field. */ - public FT_Raster_Funcs glyph_format(@NativeType("FT_Glyph_Format") int value) { nglyph_format(address(), value); return this; } - /** Sets the specified value to the {@code raster_new} field. */ - public FT_Raster_Funcs raster_new(@Nullable @NativeType("FT_Raster_NewFunc") FT_Raster_NewFuncI value) { nraster_new(address(), value); return this; } - /** Sets the specified value to the {@code raster_reset} field. */ - public FT_Raster_Funcs raster_reset(@Nullable @NativeType("FT_Raster_ResetFunc") FT_Raster_ResetFuncI value) { nraster_reset(address(), value); return this; } - /** Sets the specified value to the {@code raster_set_mode} field. */ - public FT_Raster_Funcs raster_set_mode(@Nullable @NativeType("FT_Raster_SetModeFunc") FT_Raster_SetModeFuncI value) { nraster_set_mode(address(), value); return this; } - /** Sets the specified value to the {@code raster_render} field. */ - public FT_Raster_Funcs raster_render(@Nullable @NativeType("FT_Raster_RenderFunc") FT_Raster_RenderFuncI value) { nraster_render(address(), value); return this; } - /** Sets the specified value to the {@code raster_done} field. */ - public FT_Raster_Funcs raster_done(@Nullable @NativeType("FT_Raster_DoneFunc") FT_Raster_DoneFuncI value) { nraster_done(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Raster_Funcs set( - int glyph_format, - FT_Raster_NewFuncI raster_new, - FT_Raster_ResetFuncI raster_reset, - FT_Raster_SetModeFuncI raster_set_mode, - FT_Raster_RenderFuncI raster_render, - FT_Raster_DoneFuncI raster_done - ) { - glyph_format(glyph_format); - raster_new(raster_new); - raster_reset(raster_reset); - raster_set_mode(raster_set_mode); - raster_render(raster_render); - raster_done(raster_done); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Raster_Funcs set(FT_Raster_Funcs src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Raster_Funcs} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Raster_Funcs malloc() { - return new FT_Raster_Funcs(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Raster_Funcs} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Raster_Funcs calloc() { - return new FT_Raster_Funcs(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Raster_Funcs} instance allocated with {@link BufferUtils}. */ - public static FT_Raster_Funcs create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Raster_Funcs(memAddress(container), container); - } - - /** Returns a new {@code FT_Raster_Funcs} instance for the specified memory address. */ - public static FT_Raster_Funcs create(long address) { - return new FT_Raster_Funcs(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Raster_Funcs createSafe(long address) { - return address == NULL ? null : new FT_Raster_Funcs(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Raster_Funcs} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Raster_Funcs malloc(MemoryStack stack) { - return new FT_Raster_Funcs(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Raster_Funcs} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Raster_Funcs calloc(MemoryStack stack) { - return new FT_Raster_Funcs(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #glyph_format}. */ - public static int nglyph_format(long struct) { return UNSAFE.getInt(null, struct + FT_Raster_Funcs.GLYPH_FORMAT); } - /** Unsafe version of {@link #raster_new}. */ - @Nullable public static FT_Raster_NewFunc nraster_new(long struct) { return FT_Raster_NewFunc.createSafe(memGetAddress(struct + FT_Raster_Funcs.RASTER_NEW)); } - /** Unsafe version of {@link #raster_reset}. */ - @Nullable public static FT_Raster_ResetFunc nraster_reset(long struct) { return FT_Raster_ResetFunc.createSafe(memGetAddress(struct + FT_Raster_Funcs.RASTER_RESET)); } - /** Unsafe version of {@link #raster_set_mode}. */ - @Nullable public static FT_Raster_SetModeFunc nraster_set_mode(long struct) { return FT_Raster_SetModeFunc.createSafe(memGetAddress(struct + FT_Raster_Funcs.RASTER_SET_MODE)); } - /** Unsafe version of {@link #raster_render}. */ - @Nullable public static FT_Raster_RenderFunc nraster_render(long struct) { return FT_Raster_RenderFunc.createSafe(memGetAddress(struct + FT_Raster_Funcs.RASTER_RENDER)); } - /** Unsafe version of {@link #raster_done}. */ - @Nullable public static FT_Raster_DoneFunc nraster_done(long struct) { return FT_Raster_DoneFunc.createSafe(memGetAddress(struct + FT_Raster_Funcs.RASTER_DONE)); } - - /** Unsafe version of {@link #glyph_format(int) glyph_format}. */ - public static void nglyph_format(long struct, int value) { UNSAFE.putInt(null, struct + FT_Raster_Funcs.GLYPH_FORMAT, value); } - /** Unsafe version of {@link #raster_new(FT_Raster_NewFuncI) raster_new}. */ - public static void nraster_new(long struct, @Nullable FT_Raster_NewFuncI value) { memPutAddress(struct + FT_Raster_Funcs.RASTER_NEW, memAddressSafe(value)); } - /** Unsafe version of {@link #raster_reset(FT_Raster_ResetFuncI) raster_reset}. */ - public static void nraster_reset(long struct, @Nullable FT_Raster_ResetFuncI value) { memPutAddress(struct + FT_Raster_Funcs.RASTER_RESET, memAddressSafe(value)); } - /** Unsafe version of {@link #raster_set_mode(FT_Raster_SetModeFuncI) raster_set_mode}. */ - public static void nraster_set_mode(long struct, @Nullable FT_Raster_SetModeFuncI value) { memPutAddress(struct + FT_Raster_Funcs.RASTER_SET_MODE, memAddressSafe(value)); } - /** Unsafe version of {@link #raster_render(FT_Raster_RenderFuncI) raster_render}. */ - public static void nraster_render(long struct, @Nullable FT_Raster_RenderFuncI value) { memPutAddress(struct + FT_Raster_Funcs.RASTER_RENDER, memAddressSafe(value)); } - /** Unsafe version of {@link #raster_done(FT_Raster_DoneFuncI) raster_done}. */ - public static void nraster_done(long struct, @Nullable FT_Raster_DoneFuncI value) { memPutAddress(struct + FT_Raster_Funcs.RASTER_DONE, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link FT_Raster_Funcs} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Raster_Funcs ELEMENT_FACTORY = FT_Raster_Funcs.create(-1L); - - /** - * Creates a new {@code FT_Raster_Funcs.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Raster_Funcs#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Raster_Funcs getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code glyph_format} field. */ - @NativeType("FT_Glyph_Format") - public int glyph_format() { return FT_Raster_Funcs.nglyph_format(address()); } - /** @return the value of the {@code raster_new} field. */ - @Nullable - public FT_Raster_NewFunc raster_new() { return FT_Raster_Funcs.nraster_new(address()); } - /** @return the value of the {@code raster_reset} field. */ - @Nullable - public FT_Raster_ResetFunc raster_reset() { return FT_Raster_Funcs.nraster_reset(address()); } - /** @return the value of the {@code raster_set_mode} field. */ - @Nullable - public FT_Raster_SetModeFunc raster_set_mode() { return FT_Raster_Funcs.nraster_set_mode(address()); } - /** @return the value of the {@code raster_render} field. */ - @Nullable - public FT_Raster_RenderFunc raster_render() { return FT_Raster_Funcs.nraster_render(address()); } - /** @return the value of the {@code raster_done} field. */ - @Nullable - public FT_Raster_DoneFunc raster_done() { return FT_Raster_Funcs.nraster_done(address()); } - - /** Sets the specified value to the {@code glyph_format} field. */ - public Buffer glyph_format(@NativeType("FT_Glyph_Format") int value) { FT_Raster_Funcs.nglyph_format(address(), value); return this; } - /** Sets the specified value to the {@code raster_new} field. */ - public Buffer raster_new(@Nullable @NativeType("FT_Raster_NewFunc") FT_Raster_NewFuncI value) { FT_Raster_Funcs.nraster_new(address(), value); return this; } - /** Sets the specified value to the {@code raster_reset} field. */ - public Buffer raster_reset(@Nullable @NativeType("FT_Raster_ResetFunc") FT_Raster_ResetFuncI value) { FT_Raster_Funcs.nraster_reset(address(), value); return this; } - /** Sets the specified value to the {@code raster_set_mode} field. */ - public Buffer raster_set_mode(@Nullable @NativeType("FT_Raster_SetModeFunc") FT_Raster_SetModeFuncI value) { FT_Raster_Funcs.nraster_set_mode(address(), value); return this; } - /** Sets the specified value to the {@code raster_render} field. */ - public Buffer raster_render(@Nullable @NativeType("FT_Raster_RenderFunc") FT_Raster_RenderFuncI value) { FT_Raster_Funcs.nraster_render(address(), value); return this; } - /** Sets the specified value to the {@code raster_done} field. */ - public Buffer raster_done(@Nullable @NativeType("FT_Raster_DoneFunc") FT_Raster_DoneFuncI value) { FT_Raster_Funcs.nraster_done(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_NewFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_NewFunc.java deleted file mode 100644 index d033ff5a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_NewFunc.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     void *memory,
    - *     FT_Raster *raster
    - * )
    - */ -public abstract class FT_Raster_NewFunc extends Callback implements FT_Raster_NewFuncI { - - /** - * Creates a {@code FT_Raster_NewFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Raster_NewFunc} - */ - public static FT_Raster_NewFunc create(long functionPointer) { - FT_Raster_NewFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Raster_NewFunc - ? (FT_Raster_NewFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Raster_NewFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Raster_NewFunc} instance that delegates to the specified {@code FT_Raster_NewFuncI} instance. */ - public static FT_Raster_NewFunc create(FT_Raster_NewFuncI instance) { - return instance instanceof FT_Raster_NewFunc - ? (FT_Raster_NewFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Raster_NewFunc() { - super(CIF); - } - - FT_Raster_NewFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Raster_NewFunc { - - private final FT_Raster_NewFuncI delegate; - - Container(long functionPointer, FT_Raster_NewFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long memory, long raster) { - return delegate.invoke(memory, raster); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_NewFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_NewFuncI.java deleted file mode 100644 index 7b89f11c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_NewFuncI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     void *memory,
    - *     FT_Raster *raster
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Raster_NewFunc") -public interface FT_Raster_NewFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function used to create a new raster object. */ - int invoke(@NativeType("void *") long memory, @NativeType("FT_Raster *") long raster); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_Params.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_Params.java deleted file mode 100644 index 2f918945..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_Params.java +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure to hold the parameters used by a raster's render function, passed as an argument to {@link FreeType#FT_Outline_Render Outline_Render}. - * - *

    Layout

    - * - *
    
    - * struct FT_Raster_Params {
    - *     {@link FT_Bitmap FT_Bitmap} const * target;
    - *     void const * source;
    - *     int flags;
    - *     {@link FT_SpanFuncI FT_SpanFunc} gray_spans;
    - *     {@link FT_SpanFuncI FT_SpanFunc} black_spans;
    - *     FT_Raster_BitTest_Func bit_test;
    - *     FT_Raster_BitTest_Func bit_set;
    - *     void * user;
    - *     {@link FT_BBox FT_BBox} clip_box;
    - * }
    - */ -public class FT_Raster_Params extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TARGET, - SOURCE, - FLAGS, - GRAY_SPANS, - BLACK_SPANS, - BIT_TEST, - BIT_SET, - USER, - CLIP_BOX; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(4), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(FT_BBox.SIZEOF, FT_BBox.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TARGET = layout.offsetof(0); - SOURCE = layout.offsetof(1); - FLAGS = layout.offsetof(2); - GRAY_SPANS = layout.offsetof(3); - BLACK_SPANS = layout.offsetof(4); - BIT_TEST = layout.offsetof(5); - BIT_SET = layout.offsetof(6); - USER = layout.offsetof(7); - CLIP_BOX = layout.offsetof(8); - } - - protected FT_Raster_Params(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Raster_Params create(long address, @Nullable ByteBuffer container) { - return new FT_Raster_Params(address, container); - } - - /** - * Creates a {@code FT_Raster_Params} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Raster_Params(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Bitmap} view of the struct pointed to by the {@code target} field. */ - @Nullable - @NativeType("FT_Bitmap const *") - public FT_Bitmap target() { return ntarget(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code source} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void const *") - public ByteBuffer source(int capacity) { return nsource(address(), capacity); } - /** @return the value of the {@code flags} field. */ - public int flags() { return nflags(address()); } - /** @return the value of the {@code gray_spans} field. */ - @Nullable - public FT_SpanFunc gray_spans() { return ngray_spans(address()); } - /** @return the value of the {@code user} field. */ - @NativeType("void *") - public long user() { return nuser(address()); } - /** @return a {@link FT_BBox} view of the {@code clip_box} field. */ - public FT_BBox clip_box() { return nclip_box(address()); } - - /** Sets the address of the specified {@link FT_Bitmap} to the {@code target} field. */ - public FT_Raster_Params target(@Nullable @NativeType("FT_Bitmap const *") FT_Bitmap value) { ntarget(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code source} field. */ - public FT_Raster_Params source(@Nullable @NativeType("void const *") ByteBuffer value) { nsource(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public FT_Raster_Params flags(int value) { nflags(address(), value); return this; } - /** Sets the specified value to the {@code gray_spans} field. */ - public FT_Raster_Params gray_spans(@Nullable @NativeType("FT_SpanFunc") FT_SpanFuncI value) { ngray_spans(address(), value); return this; } - /** Sets the specified value to the {@code user} field. */ - public FT_Raster_Params user(@NativeType("void *") long value) { nuser(address(), value); return this; } - /** Copies the specified {@link FT_BBox} to the {@code clip_box} field. */ - public FT_Raster_Params clip_box(FT_BBox value) { nclip_box(address(), value); return this; } - /** Passes the {@code clip_box} field to the specified {@link java.util.function.Consumer Consumer}. */ - public FT_Raster_Params clip_box(java.util.function.Consumer consumer) { consumer.accept(clip_box()); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Raster_Params set( - @Nullable FT_Bitmap target, - @Nullable ByteBuffer source, - int flags, - @Nullable FT_SpanFuncI gray_spans, - long user, - FT_BBox clip_box - ) { - target(target); - source(source); - flags(flags); - gray_spans(gray_spans); - user(user); - clip_box(clip_box); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Raster_Params set(FT_Raster_Params src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Raster_Params} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Raster_Params malloc() { - return new FT_Raster_Params(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Raster_Params} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Raster_Params calloc() { - return new FT_Raster_Params(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Raster_Params} instance allocated with {@link BufferUtils}. */ - public static FT_Raster_Params create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Raster_Params(memAddress(container), container); - } - - /** Returns a new {@code FT_Raster_Params} instance for the specified memory address. */ - public static FT_Raster_Params create(long address) { - return new FT_Raster_Params(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Raster_Params createSafe(long address) { - return address == NULL ? null : new FT_Raster_Params(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Raster_Params} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Raster_Params malloc(MemoryStack stack) { - return new FT_Raster_Params(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Raster_Params} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Raster_Params calloc(MemoryStack stack) { - return new FT_Raster_Params(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #target}. */ - @Nullable public static FT_Bitmap ntarget(long struct) { return FT_Bitmap.createSafe(memGetAddress(struct + FT_Raster_Params.TARGET)); } - /** Unsafe version of {@link #source(int) source}. */ - @Nullable public static ByteBuffer nsource(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_Raster_Params.SOURCE), capacity); } - /** Unsafe version of {@link #flags}. */ - public static int nflags(long struct) { return UNSAFE.getInt(null, struct + FT_Raster_Params.FLAGS); } - /** Unsafe version of {@link #gray_spans}. */ - @Nullable public static FT_SpanFunc ngray_spans(long struct) { return FT_SpanFunc.createSafe(memGetAddress(struct + FT_Raster_Params.GRAY_SPANS)); } - @Nullable public static FT_SpanFunc nblack_spans(long struct) { return FT_SpanFunc.createSafe(memGetAddress(struct + FT_Raster_Params.BLACK_SPANS)); } - public static long nbit_test(long struct) { return memGetAddress(struct + FT_Raster_Params.BIT_TEST); } - public static long nbit_set(long struct) { return memGetAddress(struct + FT_Raster_Params.BIT_SET); } - /** Unsafe version of {@link #user}. */ - public static long nuser(long struct) { return memGetAddress(struct + FT_Raster_Params.USER); } - /** Unsafe version of {@link #clip_box}. */ - public static FT_BBox nclip_box(long struct) { return FT_BBox.create(struct + FT_Raster_Params.CLIP_BOX); } - - /** Unsafe version of {@link #target(FT_Bitmap) target}. */ - public static void ntarget(long struct, @Nullable FT_Bitmap value) { memPutAddress(struct + FT_Raster_Params.TARGET, memAddressSafe(value)); } - /** Unsafe version of {@link #source(ByteBuffer) source}. */ - public static void nsource(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + FT_Raster_Params.SOURCE, memAddressSafe(value)); } - /** Unsafe version of {@link #flags(int) flags}. */ - public static void nflags(long struct, int value) { UNSAFE.putInt(null, struct + FT_Raster_Params.FLAGS, value); } - /** Unsafe version of {@link #gray_spans(FT_SpanFuncI) gray_spans}. */ - public static void ngray_spans(long struct, @Nullable FT_SpanFuncI value) { memPutAddress(struct + FT_Raster_Params.GRAY_SPANS, memAddressSafe(value)); } - public static void nblack_spans(long struct, @Nullable FT_SpanFuncI value) { memPutAddress(struct + FT_Raster_Params.BLACK_SPANS, memAddressSafe(value)); } - public static void nbit_test(long struct, long value) { memPutAddress(struct + FT_Raster_Params.BIT_TEST, value); } - public static void nbit_set(long struct, long value) { memPutAddress(struct + FT_Raster_Params.BIT_SET, value); } - /** Unsafe version of {@link #user(long) user}. */ - public static void nuser(long struct, long value) { memPutAddress(struct + FT_Raster_Params.USER, value); } - /** Unsafe version of {@link #clip_box(FT_BBox) clip_box}. */ - public static void nclip_box(long struct, FT_BBox value) { memCopy(value.address(), struct + FT_Raster_Params.CLIP_BOX, FT_BBox.SIZEOF); } - - // ----------------------------------- - - /** An array of {@link FT_Raster_Params} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Raster_Params ELEMENT_FACTORY = FT_Raster_Params.create(-1L); - - /** - * Creates a new {@code FT_Raster_Params.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Raster_Params#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Raster_Params getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Bitmap} view of the struct pointed to by the {@code target} field. */ - @Nullable - @NativeType("FT_Bitmap const *") - public FT_Bitmap target() { return FT_Raster_Params.ntarget(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code source} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void const *") - public ByteBuffer source(int capacity) { return FT_Raster_Params.nsource(address(), capacity); } - /** @return the value of the {@code flags} field. */ - public int flags() { return FT_Raster_Params.nflags(address()); } - /** @return the value of the {@code gray_spans} field. */ - @Nullable - public FT_SpanFunc gray_spans() { return FT_Raster_Params.ngray_spans(address()); } - /** @return the value of the {@code user} field. */ - @NativeType("void *") - public long user() { return FT_Raster_Params.nuser(address()); } - /** @return a {@link FT_BBox} view of the {@code clip_box} field. */ - public FT_BBox clip_box() { return FT_Raster_Params.nclip_box(address()); } - - /** Sets the address of the specified {@link FT_Bitmap} to the {@code target} field. */ - public Buffer target(@Nullable @NativeType("FT_Bitmap const *") FT_Bitmap value) { FT_Raster_Params.ntarget(address(), value); return this; } - /** Sets the address of the specified {@link ByteBuffer} to the {@code source} field. */ - public Buffer source(@Nullable @NativeType("void const *") ByteBuffer value) { FT_Raster_Params.nsource(address(), value); return this; } - /** Sets the specified value to the {@code flags} field. */ - public Buffer flags(int value) { FT_Raster_Params.nflags(address(), value); return this; } - /** Sets the specified value to the {@code gray_spans} field. */ - public Buffer gray_spans(@Nullable @NativeType("FT_SpanFunc") FT_SpanFuncI value) { FT_Raster_Params.ngray_spans(address(), value); return this; } - /** Sets the specified value to the {@code user} field. */ - public Buffer user(@NativeType("void *") long value) { FT_Raster_Params.nuser(address(), value); return this; } - /** Copies the specified {@link FT_BBox} to the {@code clip_box} field. */ - public Buffer clip_box(FT_BBox value) { FT_Raster_Params.nclip_box(address(), value); return this; } - /** Passes the {@code clip_box} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer clip_box(java.util.function.Consumer consumer) { consumer.accept(clip_box()); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_RenderFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_RenderFunc.java deleted file mode 100644 index fb5a7840..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_RenderFunc.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Raster raster,
    - *     FT_Raster_Params const *params
    - * )
    - */ -public abstract class FT_Raster_RenderFunc extends Callback implements FT_Raster_RenderFuncI { - - /** - * Creates a {@code FT_Raster_RenderFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Raster_RenderFunc} - */ - public static FT_Raster_RenderFunc create(long functionPointer) { - FT_Raster_RenderFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Raster_RenderFunc - ? (FT_Raster_RenderFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Raster_RenderFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Raster_RenderFunc} instance that delegates to the specified {@code FT_Raster_RenderFuncI} instance. */ - public static FT_Raster_RenderFunc create(FT_Raster_RenderFuncI instance) { - return instance instanceof FT_Raster_RenderFunc - ? (FT_Raster_RenderFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Raster_RenderFunc() { - super(CIF); - } - - FT_Raster_RenderFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Raster_RenderFunc { - - private final FT_Raster_RenderFuncI delegate; - - Container(long functionPointer, FT_Raster_RenderFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long raster, long params) { - return delegate.invoke(raster, params); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_RenderFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_RenderFuncI.java deleted file mode 100644 index 144db4fa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_RenderFuncI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Raster raster,
    - *     FT_Raster_Params const *params
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Raster_RenderFunc") -public interface FT_Raster_RenderFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** Invoke a given raster to scan-convert a given glyph image into a target bitmap. */ - int invoke(@NativeType("FT_Raster") long raster, @NativeType("FT_Raster_Params const *") long params); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_ResetFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_ResetFunc.java deleted file mode 100644 index 59d7dc3e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_ResetFunc.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Raster raster,
    - *     unsigned char *pool_base,
    - *     unsigned long pool_size
    - * )
    - */ -public abstract class FT_Raster_ResetFunc extends Callback implements FT_Raster_ResetFuncI { - - /** - * Creates a {@code FT_Raster_ResetFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Raster_ResetFunc} - */ - public static FT_Raster_ResetFunc create(long functionPointer) { - FT_Raster_ResetFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Raster_ResetFunc - ? (FT_Raster_ResetFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Raster_ResetFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Raster_ResetFunc} instance that delegates to the specified {@code FT_Raster_ResetFuncI} instance. */ - public static FT_Raster_ResetFunc create(FT_Raster_ResetFuncI instance) { - return instance instanceof FT_Raster_ResetFunc - ? (FT_Raster_ResetFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Raster_ResetFunc() { - super(CIF); - } - - FT_Raster_ResetFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Raster_ResetFunc { - - private final FT_Raster_ResetFuncI delegate; - - Container(long functionPointer, FT_Raster_ResetFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long raster, long pool_base, long pool_size) { - delegate.invoke(raster, pool_base, pool_size); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_ResetFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_ResetFuncI.java deleted file mode 100644 index ff0ab45d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_ResetFuncI.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Raster raster,
    - *     unsigned char *pool_base,
    - *     unsigned long pool_size
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Raster_ResetFunc") -public interface FT_Raster_ResetFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer, ffi_type_pointer, ffi_type_ulong - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)), - memGetCLong(memGetAddress(args + 2 * POINTER_SIZE)) - ); - } - - /** - * FreeType used to provide an area of memory called the 'render pool' available to all registered rasterizers. This was not thread safe, however, and now - * FreeType never allocates this pool. - * - *

    This function is called after a new raster object is created.

    - */ - void invoke(@NativeType("FT_Raster") long raster, @NativeType("unsigned char *") long pool_base, @NativeType("unsigned long") long pool_size); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_SetModeFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_SetModeFunc.java deleted file mode 100644 index f987583c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_SetModeFunc.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Raster raster,
    - *     unsigned long mode,
    - *     void *args
    - * )
    - */ -public abstract class FT_Raster_SetModeFunc extends Callback implements FT_Raster_SetModeFuncI { - - /** - * Creates a {@code FT_Raster_SetModeFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Raster_SetModeFunc} - */ - public static FT_Raster_SetModeFunc create(long functionPointer) { - FT_Raster_SetModeFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Raster_SetModeFunc - ? (FT_Raster_SetModeFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Raster_SetModeFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Raster_SetModeFunc} instance that delegates to the specified {@code FT_Raster_SetModeFuncI} instance. */ - public static FT_Raster_SetModeFunc create(FT_Raster_SetModeFuncI instance) { - return instance instanceof FT_Raster_SetModeFunc - ? (FT_Raster_SetModeFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Raster_SetModeFunc() { - super(CIF); - } - - FT_Raster_SetModeFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Raster_SetModeFunc { - - private final FT_Raster_SetModeFuncI delegate; - - Container(long functionPointer, FT_Raster_SetModeFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long raster, long mode, long args) { - return delegate.invoke(raster, mode, args); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_SetModeFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_SetModeFuncI.java deleted file mode 100644 index d8a031c7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Raster_SetModeFuncI.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * int (*{@link #invoke}) (
    - *     FT_Raster raster,
    - *     unsigned long mode,
    - *     void *args
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Raster_SetModeFunc") -public interface FT_Raster_SetModeFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_ulong, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetCLong(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** - * This function is a generic facility to change modes or attributes in a given raster. This can be used for debugging purposes, or simply - * to allow implementation-specific 'features' in a given raster module. - */ - int invoke(@NativeType("FT_Raster") long raster, @NativeType("unsigned long") long mode, @NativeType("void *") long args); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Realloc_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Realloc_Func.java deleted file mode 100644 index dc4ed70f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Realloc_Func.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     long cur_size,
    - *     long new_size,
    - *     void *block
    - * )
    - */ -public abstract class FT_Realloc_Func extends Callback implements FT_Realloc_FuncI { - - /** - * Creates a {@code FT_Realloc_Func} instance from the specified function pointer. - * - * @return the new {@code FT_Realloc_Func} - */ - public static FT_Realloc_Func create(long functionPointer) { - FT_Realloc_FuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Realloc_Func - ? (FT_Realloc_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Realloc_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Realloc_Func} instance that delegates to the specified {@code FT_Realloc_FuncI} instance. */ - public static FT_Realloc_Func create(FT_Realloc_FuncI instance) { - return instance instanceof FT_Realloc_Func - ? (FT_Realloc_Func)instance - : new Container(instance.address(), instance); - } - - protected FT_Realloc_Func() { - super(CIF); - } - - FT_Realloc_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Realloc_Func { - - private final FT_Realloc_FuncI delegate; - - Container(long functionPointer, FT_Realloc_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long memory, long cur_size, long new_size, long block) { - return delegate.invoke(memory, cur_size, new_size, block); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Realloc_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Realloc_FuncI.java deleted file mode 100644 index ae94e191..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Realloc_FuncI.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void * (*{@link #invoke}) (
    - *     FT_Memory memory,
    - *     long cur_size,
    - *     long new_size,
    - *     void *block
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Realloc_Func") -public interface FT_Realloc_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_pointer, - ffi_type_pointer, ffi_type_slong, ffi_type_slong, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetCLong(memGetAddress(args + POINTER_SIZE)), - memGetCLong(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRetP(ret, __result); - } - - /** A function used to re-allocate a given block of memory. */ - @NativeType("void *") long invoke(@NativeType("FT_Memory") long memory, long cur_size, long new_size, @NativeType("void *") long block); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SVG_Document.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SVG_Document.java deleted file mode 100644 index c4f22acf..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SVG_Document.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure that models one SVG document. - * - *

    Layout

    - * - *
    
    - * struct FT_SVG_DocumentRec {
    - *     FT_Byte * svg_document;
    - *     FT_ULong svg_document_length;
    - *     {@link FT_Size_Metrics FT_Size_Metrics} metrics;
    - *     FT_UShort units_per_EM;
    - *     FT_UShort start_glyph_id;
    - *     FT_UShort end_glyph_id;
    - *     {@link FT_Matrix FT_Matrix} transform;
    - *     {@link FT_Vector FT_Vector} delta;
    - * }
    - */ -@NativeType("struct FT_SVG_DocumentRec") -public class FT_SVG_Document extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - SVG_DOCUMENT, - SVG_DOCUMENT_LENGTH, - METRICS, - UNITS_PER_EM, - START_GLYPH_ID, - END_GLYPH_ID, - TRANSFORM, - DELTA; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(FT_Size_Metrics.SIZEOF, FT_Size_Metrics.ALIGNOF), - __member(2), - __member(2), - __member(2), - __member(FT_Matrix.SIZEOF, FT_Matrix.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - SVG_DOCUMENT = layout.offsetof(0); - SVG_DOCUMENT_LENGTH = layout.offsetof(1); - METRICS = layout.offsetof(2); - UNITS_PER_EM = layout.offsetof(3); - START_GLYPH_ID = layout.offsetof(4); - END_GLYPH_ID = layout.offsetof(5); - TRANSFORM = layout.offsetof(6); - DELTA = layout.offsetof(7); - } - - protected FT_SVG_Document(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_SVG_Document create(long address, @Nullable ByteBuffer container) { - return new FT_SVG_Document(address, container); - } - - /** - * Creates a {@code FT_SVG_Document} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_SVG_Document(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code svg_document} field. */ - @NativeType("FT_Byte *") - public ByteBuffer svg_document() { return nsvg_document(address()); } - /** @return the value of the {@code svg_document_length} field. */ - @NativeType("FT_ULong") - public long svg_document_length() { return nsvg_document_length(address()); } - /** @return a {@link FT_Size_Metrics} view of the {@code metrics} field. */ - public FT_Size_Metrics metrics() { return nmetrics(address()); } - /** @return the value of the {@code units_per_EM} field. */ - @NativeType("FT_UShort") - public short units_per_EM() { return nunits_per_EM(address()); } - /** @return the value of the {@code start_glyph_id} field. */ - @NativeType("FT_UShort") - public short start_glyph_id() { return nstart_glyph_id(address()); } - /** @return the value of the {@code end_glyph_id} field. */ - @NativeType("FT_UShort") - public short end_glyph_id() { return nend_glyph_id(address()); } - /** @return a {@link FT_Matrix} view of the {@code transform} field. */ - public FT_Matrix transform() { return ntransform(address()); } - /** @return a {@link FT_Vector} view of the {@code delta} field. */ - public FT_Vector delta() { return ndelta(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_SVG_Document} instance for the specified memory address. */ - public static FT_SVG_Document create(long address) { - return new FT_SVG_Document(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_SVG_Document createSafe(long address) { - return address == NULL ? null : new FT_SVG_Document(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #svg_document() svg_document}. */ - public static ByteBuffer nsvg_document(long struct) { return memByteBuffer(memGetAddress(struct + FT_SVG_Document.SVG_DOCUMENT), (int)nsvg_document_length(struct)); } - /** Unsafe version of {@link #svg_document_length}. */ - public static long nsvg_document_length(long struct) { return memGetCLong(struct + FT_SVG_Document.SVG_DOCUMENT_LENGTH); } - /** Unsafe version of {@link #metrics}. */ - public static FT_Size_Metrics nmetrics(long struct) { return FT_Size_Metrics.create(struct + FT_SVG_Document.METRICS); } - /** Unsafe version of {@link #units_per_EM}. */ - public static short nunits_per_EM(long struct) { return UNSAFE.getShort(null, struct + FT_SVG_Document.UNITS_PER_EM); } - /** Unsafe version of {@link #start_glyph_id}. */ - public static short nstart_glyph_id(long struct) { return UNSAFE.getShort(null, struct + FT_SVG_Document.START_GLYPH_ID); } - /** Unsafe version of {@link #end_glyph_id}. */ - public static short nend_glyph_id(long struct) { return UNSAFE.getShort(null, struct + FT_SVG_Document.END_GLYPH_ID); } - /** Unsafe version of {@link #transform}. */ - public static FT_Matrix ntransform(long struct) { return FT_Matrix.create(struct + FT_SVG_Document.TRANSFORM); } - /** Unsafe version of {@link #delta}. */ - public static FT_Vector ndelta(long struct) { return FT_Vector.create(struct + FT_SVG_Document.DELTA); } - - // ----------------------------------- - - /** An array of {@link FT_SVG_Document} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_SVG_Document ELEMENT_FACTORY = FT_SVG_Document.create(-1L); - - /** - * Creates a new {@code FT_SVG_Document.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_SVG_Document#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_SVG_Document getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code svg_document} field. */ - @NativeType("FT_Byte *") - public ByteBuffer svg_document() { return FT_SVG_Document.nsvg_document(address()); } - /** @return the value of the {@code svg_document_length} field. */ - @NativeType("FT_ULong") - public long svg_document_length() { return FT_SVG_Document.nsvg_document_length(address()); } - /** @return a {@link FT_Size_Metrics} view of the {@code metrics} field. */ - public FT_Size_Metrics metrics() { return FT_SVG_Document.nmetrics(address()); } - /** @return the value of the {@code units_per_EM} field. */ - @NativeType("FT_UShort") - public short units_per_EM() { return FT_SVG_Document.nunits_per_EM(address()); } - /** @return the value of the {@code start_glyph_id} field. */ - @NativeType("FT_UShort") - public short start_glyph_id() { return FT_SVG_Document.nstart_glyph_id(address()); } - /** @return the value of the {@code end_glyph_id} field. */ - @NativeType("FT_UShort") - public short end_glyph_id() { return FT_SVG_Document.nend_glyph_id(address()); } - /** @return a {@link FT_Matrix} view of the {@code transform} field. */ - public FT_Matrix transform() { return FT_SVG_Document.ntransform(address()); } - /** @return a {@link FT_Vector} view of the {@code delta} field. */ - public FT_Vector delta() { return FT_SVG_Document.ndelta(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SfntLangTag.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SfntLangTag.java deleted file mode 100644 index 636bc77a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SfntLangTag.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct FT_SfntLangTag {
    - *     FT_Byte * string;
    - *     FT_UInt string_len;
    - * }
    - */ -public class FT_SfntLangTag extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - STRING, - STRING_LEN; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - STRING = layout.offsetof(0); - STRING_LEN = layout.offsetof(1); - } - - protected FT_SfntLangTag(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_SfntLangTag create(long address, @Nullable ByteBuffer container) { - return new FT_SfntLangTag(address, container); - } - - /** - * Creates a {@code FT_SfntLangTag} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_SfntLangTag(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code string} field. */ - @NativeType("FT_Byte *") - public ByteBuffer string() { return nstring(address()); } - /** @return the value of the {@code string_len} field. */ - @NativeType("FT_UInt") - public int string_len() { return nstring_len(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_SfntLangTag} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_SfntLangTag malloc() { - return new FT_SfntLangTag(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_SfntLangTag} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_SfntLangTag calloc() { - return new FT_SfntLangTag(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_SfntLangTag} instance allocated with {@link BufferUtils}. */ - public static FT_SfntLangTag create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_SfntLangTag(memAddress(container), container); - } - - /** Returns a new {@code FT_SfntLangTag} instance for the specified memory address. */ - public static FT_SfntLangTag create(long address) { - return new FT_SfntLangTag(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_SfntLangTag createSafe(long address) { - return address == NULL ? null : new FT_SfntLangTag(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_SfntLangTag} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_SfntLangTag malloc(MemoryStack stack) { - return new FT_SfntLangTag(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_SfntLangTag} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_SfntLangTag calloc(MemoryStack stack) { - return new FT_SfntLangTag(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #string() string}. */ - public static ByteBuffer nstring(long struct) { return memByteBuffer(memGetAddress(struct + FT_SfntLangTag.STRING), nstring_len(struct)); } - /** Unsafe version of {@link #string_len}. */ - public static int nstring_len(long struct) { return UNSAFE.getInt(null, struct + FT_SfntLangTag.STRING_LEN); } - - // ----------------------------------- - - /** An array of {@link FT_SfntLangTag} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_SfntLangTag ELEMENT_FACTORY = FT_SfntLangTag.create(-1L); - - /** - * Creates a new {@code FT_SfntLangTag.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_SfntLangTag#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_SfntLangTag getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code string} field. */ - @NativeType("FT_Byte *") - public ByteBuffer string() { return FT_SfntLangTag.nstring(address()); } - /** @return the value of the {@code string_len} field. */ - @NativeType("FT_UInt") - public int string_len() { return FT_SfntLangTag.nstring_len(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SfntName.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SfntName.java deleted file mode 100644 index eb26b887..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SfntName.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - *

    Layout

    - * - *
    
    - * struct FT_SfntName {
    - *     FT_UShort platform_id;
    - *     FT_UShort encoding_id;
    - *     FT_UShort language_id;
    - *     FT_UShort name_id;
    - *     FT_Byte * string;
    - *     FT_UInt string_len;
    - * }
    - */ -public class FT_SfntName extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - PLATFORM_ID, - ENCODING_ID, - LANGUAGE_ID, - NAME_ID, - STRING, - STRING_LEN; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(2), - __member(2), - __member(POINTER_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - PLATFORM_ID = layout.offsetof(0); - ENCODING_ID = layout.offsetof(1); - LANGUAGE_ID = layout.offsetof(2); - NAME_ID = layout.offsetof(3); - STRING = layout.offsetof(4); - STRING_LEN = layout.offsetof(5); - } - - protected FT_SfntName(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_SfntName create(long address, @Nullable ByteBuffer container) { - return new FT_SfntName(address, container); - } - - /** - * Creates a {@code FT_SfntName} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_SfntName(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code platform_id} field. */ - @NativeType("FT_UShort") - public short platform_id() { return nplatform_id(address()); } - /** @return the value of the {@code encoding_id} field. */ - @NativeType("FT_UShort") - public short encoding_id() { return nencoding_id(address()); } - /** @return the value of the {@code language_id} field. */ - @NativeType("FT_UShort") - public short language_id() { return nlanguage_id(address()); } - /** @return the value of the {@code name_id} field. */ - @NativeType("FT_UShort") - public short name_id() { return nname_id(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code string} field. */ - @NativeType("FT_Byte *") - public ByteBuffer string() { return nstring(address()); } - /** @return the value of the {@code string_len} field. */ - @NativeType("FT_UInt") - public int string_len() { return nstring_len(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_SfntName} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_SfntName malloc() { - return new FT_SfntName(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_SfntName} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_SfntName calloc() { - return new FT_SfntName(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_SfntName} instance allocated with {@link BufferUtils}. */ - public static FT_SfntName create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_SfntName(memAddress(container), container); - } - - /** Returns a new {@code FT_SfntName} instance for the specified memory address. */ - public static FT_SfntName create(long address) { - return new FT_SfntName(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_SfntName createSafe(long address) { - return address == NULL ? null : new FT_SfntName(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_SfntName} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_SfntName malloc(MemoryStack stack) { - return new FT_SfntName(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_SfntName} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_SfntName calloc(MemoryStack stack) { - return new FT_SfntName(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #platform_id}. */ - public static short nplatform_id(long struct) { return UNSAFE.getShort(null, struct + FT_SfntName.PLATFORM_ID); } - /** Unsafe version of {@link #encoding_id}. */ - public static short nencoding_id(long struct) { return UNSAFE.getShort(null, struct + FT_SfntName.ENCODING_ID); } - /** Unsafe version of {@link #language_id}. */ - public static short nlanguage_id(long struct) { return UNSAFE.getShort(null, struct + FT_SfntName.LANGUAGE_ID); } - /** Unsafe version of {@link #name_id}. */ - public static short nname_id(long struct) { return UNSAFE.getShort(null, struct + FT_SfntName.NAME_ID); } - /** Unsafe version of {@link #string() string}. */ - public static ByteBuffer nstring(long struct) { return memByteBuffer(memGetAddress(struct + FT_SfntName.STRING), nstring_len(struct)); } - /** Unsafe version of {@link #string_len}. */ - public static int nstring_len(long struct) { return UNSAFE.getInt(null, struct + FT_SfntName.STRING_LEN); } - - // ----------------------------------- - - /** An array of {@link FT_SfntName} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_SfntName ELEMENT_FACTORY = FT_SfntName.create(-1L); - - /** - * Creates a new {@code FT_SfntName.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_SfntName#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_SfntName getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code platform_id} field. */ - @NativeType("FT_UShort") - public short platform_id() { return FT_SfntName.nplatform_id(address()); } - /** @return the value of the {@code encoding_id} field. */ - @NativeType("FT_UShort") - public short encoding_id() { return FT_SfntName.nencoding_id(address()); } - /** @return the value of the {@code language_id} field. */ - @NativeType("FT_UShort") - public short language_id() { return FT_SfntName.nlanguage_id(address()); } - /** @return the value of the {@code name_id} field. */ - @NativeType("FT_UShort") - public short name_id() { return FT_SfntName.nname_id(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code string} field. */ - @NativeType("FT_Byte *") - public ByteBuffer string() { return FT_SfntName.nstring(address()); } - /** @return the value of the {@code string_len} field. */ - @NativeType("FT_UInt") - public int string_len() { return FT_SfntName.nstring_len(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size.java deleted file mode 100644 index bc76589c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * FreeType root size class structure. A size object models a face object at a given size. - * - *

    Layout

    - * - *
    
    - * struct FT_SizeRec {
    - *     {@link FT_Face FT_Face} {@link #face};
    - *     {@link FT_Generic FT_Generic} {@link #generic};
    - *     {@link FT_Size_Metrics FT_Size_Metrics} {@link #metrics};
    - *     {@link FT_Size_Internal FT_Size_Internal} * internal;
    - * }
    - */ -@NativeType("struct FT_SizeRec") -public class FT_Size extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FACE, - GENERIC, - METRICS, - INTERNAL; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(FT_Generic.SIZEOF, FT_Generic.ALIGNOF), - __member(FT_Size_Metrics.SIZEOF, FT_Size_Metrics.ALIGNOF), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FACE = layout.offsetof(0); - GENERIC = layout.offsetof(1); - METRICS = layout.offsetof(2); - INTERNAL = layout.offsetof(3); - } - - protected FT_Size(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Size create(long address, @Nullable ByteBuffer container) { - return new FT_Size(address, container); - } - - /** - * Creates a {@code FT_Size} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Size(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** parent face object */ - public FT_Face face() { return nface(address()); } - /** generic pointer for client uses */ - public FT_Generic generic() { return ngeneric(address()); } - /** size metrics */ - public FT_Size_Metrics metrics() { return nmetrics(address()); } - - /** Sets the address of the specified {@link FT_Face} to the {@link #face} field. */ - public FT_Size face(FT_Face value) { nface(address(), value); return this; } - /** Copies the specified {@link FT_Generic} to the {@link #generic} field. */ - public FT_Size generic(FT_Generic value) { ngeneric(address(), value); return this; } - /** Passes the {@link #generic} field to the specified {@link java.util.function.Consumer Consumer}. */ - public FT_Size generic(java.util.function.Consumer consumer) { consumer.accept(generic()); return this; } - /** Copies the specified {@link FT_Size_Metrics} to the {@link #metrics} field. */ - public FT_Size metrics(FT_Size_Metrics value) { nmetrics(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Size set( - FT_Face face, - FT_Generic generic, - FT_Size_Metrics metrics - ) { - face(face); - generic(generic); - metrics(metrics); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Size set(FT_Size src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Size} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Size malloc() { - return new FT_Size(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Size} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Size calloc() { - return new FT_Size(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Size} instance allocated with {@link BufferUtils}. */ - public static FT_Size create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Size(memAddress(container), container); - } - - /** Returns a new {@code FT_Size} instance for the specified memory address. */ - public static FT_Size create(long address) { - return new FT_Size(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Size createSafe(long address) { - return address == NULL ? null : new FT_Size(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Size} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Size malloc(MemoryStack stack) { - return new FT_Size(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Size} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Size calloc(MemoryStack stack) { - return new FT_Size(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #face}. */ - public static FT_Face nface(long struct) { return FT_Face.create(memGetAddress(struct + FT_Size.FACE)); } - /** Unsafe version of {@link #generic}. */ - public static FT_Generic ngeneric(long struct) { return FT_Generic.create(struct + FT_Size.GENERIC); } - /** Unsafe version of {@link #metrics}. */ - public static FT_Size_Metrics nmetrics(long struct) { return FT_Size_Metrics.create(struct + FT_Size.METRICS); } - public static FT_Size_Internal ninternal(long struct) { return FT_Size_Internal.create(memGetAddress(struct + FT_Size.INTERNAL)); } - - /** Unsafe version of {@link #face(FT_Face) face}. */ - public static void nface(long struct, FT_Face value) { memPutAddress(struct + FT_Size.FACE, value.address()); } - /** Unsafe version of {@link #generic(FT_Generic) generic}. */ - public static void ngeneric(long struct, FT_Generic value) { memCopy(value.address(), struct + FT_Size.GENERIC, FT_Generic.SIZEOF); } - /** Unsafe version of {@link #metrics(FT_Size_Metrics) metrics}. */ - public static void nmetrics(long struct, FT_Size_Metrics value) { memCopy(value.address(), struct + FT_Size.METRICS, FT_Size_Metrics.SIZEOF); } - public static void ninternal(long struct, FT_Size_Internal value) { memPutAddress(struct + FT_Size.INTERNAL, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + FT_Size.FACE)); - FT_Generic.validate(struct + FT_Size.GENERIC); - } - - // ----------------------------------- - - /** An array of {@link FT_Size} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Size ELEMENT_FACTORY = FT_Size.create(-1L); - - /** - * Creates a new {@code FT_Size.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Size#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Size getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Face} view of the struct pointed to by the {@link FT_Size#face} field. */ - public FT_Face face() { return FT_Size.nface(address()); } - /** @return a {@link FT_Generic} view of the {@link FT_Size#generic} field. */ - public FT_Generic generic() { return FT_Size.ngeneric(address()); } - /** @return a {@link FT_Size_Metrics} view of the {@link FT_Size#metrics} field. */ - public FT_Size_Metrics metrics() { return FT_Size.nmetrics(address()); } - - /** Sets the address of the specified {@link FT_Face} to the {@link FT_Size#face} field. */ - public Buffer face(FT_Face value) { FT_Size.nface(address(), value); return this; } - /** Copies the specified {@link FT_Generic} to the {@link FT_Size#generic} field. */ - public Buffer generic(FT_Generic value) { FT_Size.ngeneric(address(), value); return this; } - /** Passes the {@link FT_Size#generic} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer generic(java.util.function.Consumer consumer) { consumer.accept(generic()); return this; } - /** Copies the specified {@link FT_Size_Metrics} to the {@link FT_Size#metrics} field. */ - public Buffer metrics(FT_Size_Metrics value) { FT_Size.nmetrics(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Internal.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Internal.java deleted file mode 100644 index 922b88c0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Internal.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Layout

    - * - *
    
    - * struct FT_Size_Internal {
    - *     void * module_data;
    - *     FT_Render_Mode autohint_mode;
    - *     {@link FT_Size_Metrics FT_Size_Metrics} autohint_metrics;
    - * }
    - */ -public class FT_Size_Internal extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - MODULE_DATA, - AUTOHINT_MODE, - AUTOHINT_METRICS; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(FT_Size_Metrics.SIZEOF, FT_Size_Metrics.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - MODULE_DATA = layout.offsetof(0); - AUTOHINT_MODE = layout.offsetof(1); - AUTOHINT_METRICS = layout.offsetof(2); - } - - protected FT_Size_Internal(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Size_Internal create(long address, @Nullable ByteBuffer container) { - return new FT_Size_Internal(address, container); - } - - /** - * Creates a {@code FT_Size_Internal} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Size_Internal(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code module_data} field. */ - @NativeType("void *") - public long module_data() { return nmodule_data(address()); } - /** @return the value of the {@code autohint_mode} field. */ - @NativeType("FT_Render_Mode") - public int autohint_mode() { return nautohint_mode(address()); } - /** @return a {@link FT_Size_Metrics} view of the {@code autohint_metrics} field. */ - public FT_Size_Metrics autohint_metrics() { return nautohint_metrics(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Size_Internal} instance for the specified memory address. */ - public static FT_Size_Internal create(long address) { - return new FT_Size_Internal(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Size_Internal createSafe(long address) { - return address == NULL ? null : new FT_Size_Internal(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #module_data}. */ - public static long nmodule_data(long struct) { return memGetAddress(struct + FT_Size_Internal.MODULE_DATA); } - /** Unsafe version of {@link #autohint_mode}. */ - public static int nautohint_mode(long struct) { return UNSAFE.getInt(null, struct + FT_Size_Internal.AUTOHINT_MODE); } - /** Unsafe version of {@link #autohint_metrics}. */ - public static FT_Size_Metrics nautohint_metrics(long struct) { return FT_Size_Metrics.create(struct + FT_Size_Internal.AUTOHINT_METRICS); } - - // ----------------------------------- - - /** An array of {@link FT_Size_Internal} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Size_Internal ELEMENT_FACTORY = FT_Size_Internal.create(-1L); - - /** - * Creates a new {@code FT_Size_Internal.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Size_Internal#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Size_Internal getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code module_data} field. */ - @NativeType("void *") - public long module_data() { return FT_Size_Internal.nmodule_data(address()); } - /** @return the value of the {@code autohint_mode} field. */ - @NativeType("FT_Render_Mode") - public int autohint_mode() { return FT_Size_Internal.nautohint_mode(address()); } - /** @return a {@link FT_Size_Metrics} view of the {@code autohint_metrics} field. */ - public FT_Size_Metrics autohint_metrics() { return FT_Size_Internal.nautohint_metrics(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Metrics.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Metrics.java deleted file mode 100644 index 5317bf62..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Metrics.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The size metrics structure gives the metrics of a size object. - * - *

    Layout

    - * - *
    
    - * struct FT_Size_Metrics {
    - *     FT_UShort {@link #x_ppem};
    - *     FT_UShort {@link #y_ppem};
    - *     FT_Fixed {@link #x_scale};
    - *     FT_Fixed {@link #y_scale};
    - *     FT_Pos {@link #ascender};
    - *     FT_Pos {@link #descender};
    - *     FT_Pos {@link #height};
    - *     FT_Pos {@link #max_advance};
    - * }
    - */ -public class FT_Size_Metrics extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X_PPEM, - Y_PPEM, - X_SCALE, - Y_SCALE, - ASCENDER, - DESCENDER, - HEIGHT, - MAX_ADVANCE; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X_PPEM = layout.offsetof(0); - Y_PPEM = layout.offsetof(1); - X_SCALE = layout.offsetof(2); - Y_SCALE = layout.offsetof(3); - ASCENDER = layout.offsetof(4); - DESCENDER = layout.offsetof(5); - HEIGHT = layout.offsetof(6); - MAX_ADVANCE = layout.offsetof(7); - } - - protected FT_Size_Metrics(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Size_Metrics create(long address, @Nullable ByteBuffer container) { - return new FT_Size_Metrics(address, container); - } - - /** - * Creates a {@code FT_Size_Metrics} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Size_Metrics(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** horizontal pixels per EM */ - @NativeType("FT_UShort") - public short x_ppem() { return nx_ppem(address()); } - /** vertical pixels per EM */ - @NativeType("FT_UShort") - public short y_ppem() { return ny_ppem(address()); } - /** scaling values used to convert font */ - @NativeType("FT_Fixed") - public long x_scale() { return nx_scale(address()); } - /** units to 26.6 fractional pixels */ - @NativeType("FT_Fixed") - public long y_scale() { return ny_scale(address()); } - /** ascender in 26.6 frac. pixels */ - @NativeType("FT_Pos") - public long ascender() { return nascender(address()); } - /** descender in 26.6 frac. pixels */ - @NativeType("FT_Pos") - public long descender() { return ndescender(address()); } - /** text height in 26.6 frac. pixels */ - @NativeType("FT_Pos") - public long height() { return nheight(address()); } - /** max horizontal advance, in 26.6 pixels */ - @NativeType("FT_Pos") - public long max_advance() { return nmax_advance(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Size_Metrics} instance for the specified memory address. */ - public static FT_Size_Metrics create(long address) { - return new FT_Size_Metrics(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Size_Metrics createSafe(long address) { - return address == NULL ? null : new FT_Size_Metrics(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x_ppem}. */ - public static short nx_ppem(long struct) { return UNSAFE.getShort(null, struct + FT_Size_Metrics.X_PPEM); } - /** Unsafe version of {@link #y_ppem}. */ - public static short ny_ppem(long struct) { return UNSAFE.getShort(null, struct + FT_Size_Metrics.Y_PPEM); } - /** Unsafe version of {@link #x_scale}. */ - public static long nx_scale(long struct) { return memGetCLong(struct + FT_Size_Metrics.X_SCALE); } - /** Unsafe version of {@link #y_scale}. */ - public static long ny_scale(long struct) { return memGetCLong(struct + FT_Size_Metrics.Y_SCALE); } - /** Unsafe version of {@link #ascender}. */ - public static long nascender(long struct) { return memGetCLong(struct + FT_Size_Metrics.ASCENDER); } - /** Unsafe version of {@link #descender}. */ - public static long ndescender(long struct) { return memGetCLong(struct + FT_Size_Metrics.DESCENDER); } - /** Unsafe version of {@link #height}. */ - public static long nheight(long struct) { return memGetCLong(struct + FT_Size_Metrics.HEIGHT); } - /** Unsafe version of {@link #max_advance}. */ - public static long nmax_advance(long struct) { return memGetCLong(struct + FT_Size_Metrics.MAX_ADVANCE); } - - // ----------------------------------- - - /** An array of {@link FT_Size_Metrics} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Size_Metrics ELEMENT_FACTORY = FT_Size_Metrics.create(-1L); - - /** - * Creates a new {@code FT_Size_Metrics.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Size_Metrics#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Size_Metrics getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@link FT_Size_Metrics#x_ppem} field. */ - @NativeType("FT_UShort") - public short x_ppem() { return FT_Size_Metrics.nx_ppem(address()); } - /** @return the value of the {@link FT_Size_Metrics#y_ppem} field. */ - @NativeType("FT_UShort") - public short y_ppem() { return FT_Size_Metrics.ny_ppem(address()); } - /** @return the value of the {@link FT_Size_Metrics#x_scale} field. */ - @NativeType("FT_Fixed") - public long x_scale() { return FT_Size_Metrics.nx_scale(address()); } - /** @return the value of the {@link FT_Size_Metrics#y_scale} field. */ - @NativeType("FT_Fixed") - public long y_scale() { return FT_Size_Metrics.ny_scale(address()); } - /** @return the value of the {@link FT_Size_Metrics#ascender} field. */ - @NativeType("FT_Pos") - public long ascender() { return FT_Size_Metrics.nascender(address()); } - /** @return the value of the {@link FT_Size_Metrics#descender} field. */ - @NativeType("FT_Pos") - public long descender() { return FT_Size_Metrics.ndescender(address()); } - /** @return the value of the {@link FT_Size_Metrics#height} field. */ - @NativeType("FT_Pos") - public long height() { return FT_Size_Metrics.nheight(address()); } - /** @return the value of the {@link FT_Size_Metrics#max_advance} field. */ - @NativeType("FT_Pos") - public long max_advance() { return FT_Size_Metrics.nmax_advance(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Request.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Request.java deleted file mode 100644 index 6b98a129..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Size_Request.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure to model a size request. - * - *

    Layout

    - * - *
    
    - * struct FT_Size_RequestRec {
    - *     FT_Size_Request_Type type;
    - *     FT_Long width;
    - *     FT_Long height;
    - *     FT_UInt horiResolution;
    - *     FT_UInt vertResolution;
    - * }
    - */ -@NativeType("struct FT_Size_RequestRec") -public class FT_Size_Request extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TYPE, - WIDTH, - HEIGHT, - HORIRESOLUTION, - VERTRESOLUTION; - - static { - Layout layout = __struct( - __member(4), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TYPE = layout.offsetof(0); - WIDTH = layout.offsetof(1); - HEIGHT = layout.offsetof(2); - HORIRESOLUTION = layout.offsetof(3); - VERTRESOLUTION = layout.offsetof(4); - } - - protected FT_Size_Request(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Size_Request create(long address, @Nullable ByteBuffer container) { - return new FT_Size_Request(address, container); - } - - /** - * Creates a {@code FT_Size_Request} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Size_Request(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code type} field. */ - @NativeType("FT_Size_Request_Type") - public int type() { return ntype(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("FT_Long") - public long width() { return nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_Long") - public long height() { return nheight(address()); } - /** @return the value of the {@code horiResolution} field. */ - @NativeType("FT_UInt") - public int horiResolution() { return nhoriResolution(address()); } - /** @return the value of the {@code vertResolution} field. */ - @NativeType("FT_UInt") - public int vertResolution() { return nvertResolution(address()); } - - /** Sets the specified value to the {@code type} field. */ - public FT_Size_Request type(@NativeType("FT_Size_Request_Type") int value) { ntype(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public FT_Size_Request width(@NativeType("FT_Long") long value) { nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public FT_Size_Request height(@NativeType("FT_Long") long value) { nheight(address(), value); return this; } - /** Sets the specified value to the {@code horiResolution} field. */ - public FT_Size_Request horiResolution(@NativeType("FT_UInt") int value) { nhoriResolution(address(), value); return this; } - /** Sets the specified value to the {@code vertResolution} field. */ - public FT_Size_Request vertResolution(@NativeType("FT_UInt") int value) { nvertResolution(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Size_Request set( - int type, - long width, - long height, - int horiResolution, - int vertResolution - ) { - type(type); - width(width); - height(height); - horiResolution(horiResolution); - vertResolution(vertResolution); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Size_Request set(FT_Size_Request src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Size_Request} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Size_Request malloc() { - return new FT_Size_Request(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Size_Request} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Size_Request calloc() { - return new FT_Size_Request(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Size_Request} instance allocated with {@link BufferUtils}. */ - public static FT_Size_Request create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Size_Request(memAddress(container), container); - } - - /** Returns a new {@code FT_Size_Request} instance for the specified memory address. */ - public static FT_Size_Request create(long address) { - return new FT_Size_Request(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Size_Request createSafe(long address) { - return address == NULL ? null : new FT_Size_Request(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Size_Request} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Size_Request malloc(MemoryStack stack) { - return new FT_Size_Request(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Size_Request} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Size_Request calloc(MemoryStack stack) { - return new FT_Size_Request(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #type}. */ - public static int ntype(long struct) { return UNSAFE.getInt(null, struct + FT_Size_Request.TYPE); } - /** Unsafe version of {@link #width}. */ - public static long nwidth(long struct) { return memGetCLong(struct + FT_Size_Request.WIDTH); } - /** Unsafe version of {@link #height}. */ - public static long nheight(long struct) { return memGetCLong(struct + FT_Size_Request.HEIGHT); } - /** Unsafe version of {@link #horiResolution}. */ - public static int nhoriResolution(long struct) { return UNSAFE.getInt(null, struct + FT_Size_Request.HORIRESOLUTION); } - /** Unsafe version of {@link #vertResolution}. */ - public static int nvertResolution(long struct) { return UNSAFE.getInt(null, struct + FT_Size_Request.VERTRESOLUTION); } - - /** Unsafe version of {@link #type(int) type}. */ - public static void ntype(long struct, int value) { UNSAFE.putInt(null, struct + FT_Size_Request.TYPE, value); } - /** Unsafe version of {@link #width(long) width}. */ - public static void nwidth(long struct, long value) { memPutCLong(struct + FT_Size_Request.WIDTH, value); } - /** Unsafe version of {@link #height(long) height}. */ - public static void nheight(long struct, long value) { memPutCLong(struct + FT_Size_Request.HEIGHT, value); } - /** Unsafe version of {@link #horiResolution(int) horiResolution}. */ - public static void nhoriResolution(long struct, int value) { UNSAFE.putInt(null, struct + FT_Size_Request.HORIRESOLUTION, value); } - /** Unsafe version of {@link #vertResolution(int) vertResolution}. */ - public static void nvertResolution(long struct, int value) { UNSAFE.putInt(null, struct + FT_Size_Request.VERTRESOLUTION, value); } - - // ----------------------------------- - - /** An array of {@link FT_Size_Request} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Size_Request ELEMENT_FACTORY = FT_Size_Request.create(-1L); - - /** - * Creates a new {@code FT_Size_Request.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Size_Request#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Size_Request getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code type} field. */ - @NativeType("FT_Size_Request_Type") - public int type() { return FT_Size_Request.ntype(address()); } - /** @return the value of the {@code width} field. */ - @NativeType("FT_Long") - public long width() { return FT_Size_Request.nwidth(address()); } - /** @return the value of the {@code height} field. */ - @NativeType("FT_Long") - public long height() { return FT_Size_Request.nheight(address()); } - /** @return the value of the {@code horiResolution} field. */ - @NativeType("FT_UInt") - public int horiResolution() { return FT_Size_Request.nhoriResolution(address()); } - /** @return the value of the {@code vertResolution} field. */ - @NativeType("FT_UInt") - public int vertResolution() { return FT_Size_Request.nvertResolution(address()); } - - /** Sets the specified value to the {@code type} field. */ - public Buffer type(@NativeType("FT_Size_Request_Type") int value) { FT_Size_Request.ntype(address(), value); return this; } - /** Sets the specified value to the {@code width} field. */ - public Buffer width(@NativeType("FT_Long") long value) { FT_Size_Request.nwidth(address(), value); return this; } - /** Sets the specified value to the {@code height} field. */ - public Buffer height(@NativeType("FT_Long") long value) { FT_Size_Request.nheight(address(), value); return this; } - /** Sets the specified value to the {@code horiResolution} field. */ - public Buffer horiResolution(@NativeType("FT_UInt") int value) { FT_Size_Request.nhoriResolution(address(), value); return this; } - /** Sets the specified value to the {@code vertResolution} field. */ - public Buffer vertResolution(@NativeType("FT_UInt") int value) { FT_Size_Request.nvertResolution(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Span.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Span.java deleted file mode 100644 index 625e57e8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Span.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a single span of consecutive pixels when rendering an anti-aliased bitmap. - * - *

    Layout

    - * - *
    
    - * struct FT_Span {
    - *     short x;
    - *     unsigned short len;
    - *     unsigned char coverage;
    - * }
    - */ -public class FT_Span extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - LEN, - COVERAGE; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - LEN = layout.offsetof(1); - COVERAGE = layout.offsetof(2); - } - - protected FT_Span(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Span create(long address, @Nullable ByteBuffer container) { - return new FT_Span(address, container); - } - - /** - * Creates a {@code FT_Span} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Span(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - public short x() { return nx(address()); } - /** @return the value of the {@code len} field. */ - @NativeType("unsigned short") - public short len() { return nlen(address()); } - /** @return the value of the {@code coverage} field. */ - @NativeType("unsigned char") - public byte coverage() { return ncoverage(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Span} instance for the specified memory address. */ - public static FT_Span create(long address) { - return new FT_Span(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Span createSafe(long address) { - return address == NULL ? null : new FT_Span(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static short nx(long struct) { return UNSAFE.getShort(null, struct + FT_Span.X); } - /** Unsafe version of {@link #len}. */ - public static short nlen(long struct) { return UNSAFE.getShort(null, struct + FT_Span.LEN); } - /** Unsafe version of {@link #coverage}. */ - public static byte ncoverage(long struct) { return UNSAFE.getByte(null, struct + FT_Span.COVERAGE); } - - // ----------------------------------- - - /** An array of {@link FT_Span} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Span ELEMENT_FACTORY = FT_Span.create(-1L); - - /** - * Creates a new {@code FT_Span.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Span#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Span getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - public short x() { return FT_Span.nx(address()); } - /** @return the value of the {@code len} field. */ - @NativeType("unsigned short") - public short len() { return FT_Span.nlen(address()); } - /** @return the value of the {@code coverage} field. */ - @NativeType("unsigned char") - public byte coverage() { return FT_Span.ncoverage(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SpanFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SpanFunc.java deleted file mode 100644 index 708a1dea..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SpanFunc.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int y,
    - *     int count,
    - *     FT_Span const *spans,
    - *     void *user
    - * )
    - */ -public abstract class FT_SpanFunc extends Callback implements FT_SpanFuncI { - - /** - * Creates a {@code FT_SpanFunc} instance from the specified function pointer. - * - * @return the new {@code FT_SpanFunc} - */ - public static FT_SpanFunc create(long functionPointer) { - FT_SpanFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_SpanFunc - ? (FT_SpanFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_SpanFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_SpanFunc} instance that delegates to the specified {@code FT_SpanFuncI} instance. */ - public static FT_SpanFunc create(FT_SpanFuncI instance) { - return instance instanceof FT_SpanFunc - ? (FT_SpanFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_SpanFunc() { - super(CIF); - } - - FT_SpanFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_SpanFunc { - - private final FT_SpanFuncI delegate; - - Container(long functionPointer, FT_SpanFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(int y, int count, long spans, long user) { - delegate.invoke(y, count, spans, user); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SpanFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SpanFuncI.java deleted file mode 100644 index 37a84bf6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SpanFuncI.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     int y,
    - *     int count,
    - *     FT_Span const *spans,
    - *     void *user
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_SpanFunc") -public interface FT_SpanFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_sint32, ffi_type_sint32, ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetInt(memGetAddress(args)), - memGetInt(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetAddress(memGetAddress(args + 3 * POINTER_SIZE)) - ); - } - - /** A function used as a call-back by the anti-aliased renderer in order to let client applications draw themselves the pixel spans on each scan line. */ - void invoke(int y, int count, @NativeType("FT_Span const *") long spans, @NativeType("void *") long user); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream.java deleted file mode 100644 index 3ca7208b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream.java +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure used to describe an input stream. - * - *

    Layout

    - * - *
    
    - * struct FT_StreamRec {
    - *     unsigned char * base;
    - *     unsigned long size;
    - *     unsigned long pos;
    - *     {@link FT_StreamDesc FT_StreamDesc} descriptor;
    - *     {@link FT_StreamDesc FT_StreamDesc} pathname;
    - *     {@link FT_Stream_IoFuncI FT_Stream_IoFunc} read;
    - *     {@link FT_Stream_CloseFuncI FT_Stream_CloseFunc} close;
    - *     FT_Memory memory;
    - *     unsigned char * cursor;
    - *     unsigned char * limit;
    - * }
    - */ -@NativeType("struct FT_StreamRec") -public class FT_Stream extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - BASE, - SIZE, - POS, - DESCRIPTOR, - PATHNAME, - READ, - CLOSE, - MEMORY, - CURSOR, - LIMIT; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(FT_StreamDesc.SIZEOF, FT_StreamDesc.ALIGNOF), - __member(FT_StreamDesc.SIZEOF, FT_StreamDesc.ALIGNOF), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - BASE = layout.offsetof(0); - SIZE = layout.offsetof(1); - POS = layout.offsetof(2); - DESCRIPTOR = layout.offsetof(3); - PATHNAME = layout.offsetof(4); - READ = layout.offsetof(5); - CLOSE = layout.offsetof(6); - MEMORY = layout.offsetof(7); - CURSOR = layout.offsetof(8); - LIMIT = layout.offsetof(9); - } - - protected FT_Stream(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Stream create(long address, @Nullable ByteBuffer container) { - return new FT_Stream(address, container); - } - - /** - * Creates a {@code FT_Stream} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Stream(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code base} field. */ - @Nullable - @NativeType("unsigned char *") - public ByteBuffer base() { return nbase(address()); } - /** @return the value of the {@code size} field. */ - @NativeType("unsigned long") - public long size() { return nsize(address()); } - /** @return the value of the {@code pos} field. */ - @NativeType("unsigned long") - public long pos() { return npos(address()); } - /** @return a {@link FT_StreamDesc} view of the {@code descriptor} field. */ - public FT_StreamDesc descriptor() { return ndescriptor(address()); } - /** @return a {@link FT_StreamDesc} view of the {@code pathname} field. */ - public FT_StreamDesc pathname() { return npathname(address()); } - /** @return the value of the {@code read} field. */ - @Nullable - public FT_Stream_IoFunc read() { return nread(address()); } - /** @return the value of the {@code close} field. */ - @Nullable - public FT_Stream_CloseFunc close$() { return nclose$(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@code base} field. */ - public FT_Stream base(@Nullable @NativeType("unsigned char *") ByteBuffer value) { nbase(address(), value); return this; } - /** Sets the specified value to the {@code size} field. */ - public FT_Stream size(@NativeType("unsigned long") long value) { nsize(address(), value); return this; } - /** Sets the specified value to the {@code pos} field. */ - public FT_Stream pos(@NativeType("unsigned long") long value) { npos(address(), value); return this; } - /** Copies the specified {@link FT_StreamDesc} to the {@code descriptor} field. */ - public FT_Stream descriptor(FT_StreamDesc value) { ndescriptor(address(), value); return this; } - /** Passes the {@code descriptor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public FT_Stream descriptor(java.util.function.Consumer consumer) { consumer.accept(descriptor()); return this; } - /** Copies the specified {@link FT_StreamDesc} to the {@code pathname} field. */ - public FT_Stream pathname(FT_StreamDesc value) { npathname(address(), value); return this; } - /** Passes the {@code pathname} field to the specified {@link java.util.function.Consumer Consumer}. */ - public FT_Stream pathname(java.util.function.Consumer consumer) { consumer.accept(pathname()); return this; } - /** Sets the specified value to the {@code read} field. */ - public FT_Stream read(@Nullable @NativeType("FT_Stream_IoFunc") FT_Stream_IoFuncI value) { nread(address(), value); return this; } - /** Sets the specified value to the {@code close} field. */ - public FT_Stream close$(@Nullable @NativeType("FT_Stream_CloseFunc") FT_Stream_CloseFuncI value) { nclose$(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Stream set( - @Nullable ByteBuffer base, - long size, - long pos, - FT_StreamDesc descriptor, - FT_StreamDesc pathname, - @Nullable FT_Stream_IoFuncI read, - @Nullable FT_Stream_CloseFuncI close$ - ) { - base(base); - size(size); - pos(pos); - descriptor(descriptor); - pathname(pathname); - read(read); - close$(close$); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Stream set(FT_Stream src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Stream} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Stream malloc() { - return new FT_Stream(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Stream} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Stream calloc() { - return new FT_Stream(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Stream} instance allocated with {@link BufferUtils}. */ - public static FT_Stream create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Stream(memAddress(container), container); - } - - /** Returns a new {@code FT_Stream} instance for the specified memory address. */ - public static FT_Stream create(long address) { - return new FT_Stream(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Stream createSafe(long address) { - return address == NULL ? null : new FT_Stream(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Stream} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Stream malloc(MemoryStack stack) { - return new FT_Stream(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Stream} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Stream calloc(MemoryStack stack) { - return new FT_Stream(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #base() base}. */ - @Nullable public static ByteBuffer nbase(long struct) { return memByteBufferSafe(memGetAddress(struct + FT_Stream.BASE), (int)nsize(struct)); } - /** Unsafe version of {@link #size}. */ - public static long nsize(long struct) { return memGetCLong(struct + FT_Stream.SIZE); } - /** Unsafe version of {@link #pos}. */ - public static long npos(long struct) { return memGetCLong(struct + FT_Stream.POS); } - /** Unsafe version of {@link #descriptor}. */ - public static FT_StreamDesc ndescriptor(long struct) { return FT_StreamDesc.create(struct + FT_Stream.DESCRIPTOR); } - /** Unsafe version of {@link #pathname}. */ - public static FT_StreamDesc npathname(long struct) { return FT_StreamDesc.create(struct + FT_Stream.PATHNAME); } - /** Unsafe version of {@link #read}. */ - @Nullable public static FT_Stream_IoFunc nread(long struct) { return FT_Stream_IoFunc.createSafe(memGetAddress(struct + FT_Stream.READ)); } - /** Unsafe version of {@link #close$}. */ - @Nullable public static FT_Stream_CloseFunc nclose$(long struct) { return FT_Stream_CloseFunc.createSafe(memGetAddress(struct + FT_Stream.CLOSE)); } - @Nullable public static FT_Memory nmemory(long struct) { return FT_Memory.createSafe(memGetAddress(struct + FT_Stream.MEMORY)); } - @Nullable public static ByteBuffer ncursor(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_Stream.CURSOR), capacity); } - @Nullable public static ByteBuffer nlimit$(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + FT_Stream.LIMIT), capacity); } - - /** Unsafe version of {@link #base(ByteBuffer) base}. */ - public static void nbase(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + FT_Stream.BASE, memAddressSafe(value)); nsize(struct, value == null ? 0 : value.remaining()); } - /** Sets the specified value to the {@code size} field of the specified {@code struct}. */ - public static void nsize(long struct, long value) { memPutCLong(struct + FT_Stream.SIZE, value); } - /** Unsafe version of {@link #pos(long) pos}. */ - public static void npos(long struct, long value) { memPutCLong(struct + FT_Stream.POS, value); } - /** Unsafe version of {@link #descriptor(FT_StreamDesc) descriptor}. */ - public static void ndescriptor(long struct, FT_StreamDesc value) { memCopy(value.address(), struct + FT_Stream.DESCRIPTOR, FT_StreamDesc.SIZEOF); } - /** Unsafe version of {@link #pathname(FT_StreamDesc) pathname}. */ - public static void npathname(long struct, FT_StreamDesc value) { memCopy(value.address(), struct + FT_Stream.PATHNAME, FT_StreamDesc.SIZEOF); } - /** Unsafe version of {@link #read(FT_Stream_IoFuncI) read}. */ - public static void nread(long struct, @Nullable FT_Stream_IoFuncI value) { memPutAddress(struct + FT_Stream.READ, memAddressSafe(value)); } - /** Unsafe version of {@link #close$(FT_Stream_CloseFuncI) close$}. */ - public static void nclose$(long struct, @Nullable FT_Stream_CloseFuncI value) { memPutAddress(struct + FT_Stream.CLOSE, memAddressSafe(value)); } - public static void nmemory(long struct, @Nullable FT_Memory value) { memPutAddress(struct + FT_Stream.MEMORY, memAddressSafe(value)); } - public static void ncursor(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + FT_Stream.CURSOR, memAddressSafe(value)); } - public static void nlimit$(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + FT_Stream.LIMIT, memAddressSafe(value)); } - - // ----------------------------------- - - /** An array of {@link FT_Stream} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Stream ELEMENT_FACTORY = FT_Stream.create(-1L); - - /** - * Creates a new {@code FT_Stream.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Stream#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Stream getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code base} field. */ - @Nullable - @NativeType("unsigned char *") - public ByteBuffer base() { return FT_Stream.nbase(address()); } - /** @return the value of the {@code size} field. */ - @NativeType("unsigned long") - public long size() { return FT_Stream.nsize(address()); } - /** @return the value of the {@code pos} field. */ - @NativeType("unsigned long") - public long pos() { return FT_Stream.npos(address()); } - /** @return a {@link FT_StreamDesc} view of the {@code descriptor} field. */ - public FT_StreamDesc descriptor() { return FT_Stream.ndescriptor(address()); } - /** @return a {@link FT_StreamDesc} view of the {@code pathname} field. */ - public FT_StreamDesc pathname() { return FT_Stream.npathname(address()); } - /** @return the value of the {@code read} field. */ - @Nullable - public FT_Stream_IoFunc read() { return FT_Stream.nread(address()); } - /** @return the value of the {@code close} field. */ - @Nullable - public FT_Stream_CloseFunc close$() { return FT_Stream.nclose$(address()); } - - /** Sets the address of the specified {@link ByteBuffer} to the {@code base} field. */ - public Buffer base(@Nullable @NativeType("unsigned char *") ByteBuffer value) { FT_Stream.nbase(address(), value); return this; } - /** Sets the specified value to the {@code size} field. */ - public Buffer size(@NativeType("unsigned long") long value) { FT_Stream.nsize(address(), value); return this; } - /** Sets the specified value to the {@code pos} field. */ - public Buffer pos(@NativeType("unsigned long") long value) { FT_Stream.npos(address(), value); return this; } - /** Copies the specified {@link FT_StreamDesc} to the {@code descriptor} field. */ - public Buffer descriptor(FT_StreamDesc value) { FT_Stream.ndescriptor(address(), value); return this; } - /** Passes the {@code descriptor} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer descriptor(java.util.function.Consumer consumer) { consumer.accept(descriptor()); return this; } - /** Copies the specified {@link FT_StreamDesc} to the {@code pathname} field. */ - public Buffer pathname(FT_StreamDesc value) { FT_Stream.npathname(address(), value); return this; } - /** Passes the {@code pathname} field to the specified {@link java.util.function.Consumer Consumer}. */ - public Buffer pathname(java.util.function.Consumer consumer) { consumer.accept(pathname()); return this; } - /** Sets the specified value to the {@code read} field. */ - public Buffer read(@Nullable @NativeType("FT_Stream_IoFunc") FT_Stream_IoFuncI value) { FT_Stream.nread(address(), value); return this; } - /** Sets the specified value to the {@code close} field. */ - public Buffer close$(@Nullable @NativeType("FT_Stream_CloseFunc") FT_Stream_CloseFuncI value) { FT_Stream.nclose$(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_StreamDesc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_StreamDesc.java deleted file mode 100644 index 8065aa54..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_StreamDesc.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A union type used to store either a long or a pointer. This is used to store a file descriptor or a {@code FILE*} in an input stream. - * - *

    Layout

    - * - *
    
    - * union FT_StreamDesc {
    - *     long value;
    - *     void * pointer;
    - * }
    - */ -public class FT_StreamDesc extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VALUE, - POINTER; - - static { - Layout layout = __union( - __member(CLONG_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VALUE = layout.offsetof(0); - POINTER = layout.offsetof(1); - } - - protected FT_StreamDesc(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_StreamDesc create(long address, @Nullable ByteBuffer container) { - return new FT_StreamDesc(address, container); - } - - /** - * Creates a {@code FT_StreamDesc} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_StreamDesc(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code value} field. */ - public long value() { return nvalue(address()); } - /** @return the value of the {@code pointer} field. */ - @NativeType("void *") - public long pointer() { return npointer(address()); } - - /** Sets the specified value to the {@code value} field. */ - public FT_StreamDesc value(long value) { nvalue(address(), value); return this; } - /** Sets the specified value to the {@code pointer} field. */ - public FT_StreamDesc pointer(@NativeType("void *") long value) { npointer(address(), value); return this; } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_StreamDesc set(FT_StreamDesc src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_StreamDesc} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_StreamDesc malloc() { - return new FT_StreamDesc(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_StreamDesc} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_StreamDesc calloc() { - return new FT_StreamDesc(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_StreamDesc} instance allocated with {@link BufferUtils}. */ - public static FT_StreamDesc create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_StreamDesc(memAddress(container), container); - } - - /** Returns a new {@code FT_StreamDesc} instance for the specified memory address. */ - public static FT_StreamDesc create(long address) { - return new FT_StreamDesc(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_StreamDesc createSafe(long address) { - return address == NULL ? null : new FT_StreamDesc(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_StreamDesc} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_StreamDesc malloc(MemoryStack stack) { - return new FT_StreamDesc(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_StreamDesc} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_StreamDesc calloc(MemoryStack stack) { - return new FT_StreamDesc(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #value}. */ - public static long nvalue(long struct) { return memGetCLong(struct + FT_StreamDesc.VALUE); } - /** Unsafe version of {@link #pointer}. */ - public static long npointer(long struct) { return memGetAddress(struct + FT_StreamDesc.POINTER); } - - /** Unsafe version of {@link #value(long) value}. */ - public static void nvalue(long struct, long value) { memPutCLong(struct + FT_StreamDesc.VALUE, value); } - /** Unsafe version of {@link #pointer(long) pointer}. */ - public static void npointer(long struct, long value) { memPutAddress(struct + FT_StreamDesc.POINTER, value); } - - // ----------------------------------- - - /** An array of {@link FT_StreamDesc} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_StreamDesc ELEMENT_FACTORY = FT_StreamDesc.create(-1L); - - /** - * Creates a new {@code FT_StreamDesc.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_StreamDesc#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_StreamDesc getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code value} field. */ - public long value() { return FT_StreamDesc.nvalue(address()); } - /** @return the value of the {@code pointer} field. */ - @NativeType("void *") - public long pointer() { return FT_StreamDesc.npointer(address()); } - - /** Sets the specified value to the {@code value} field. */ - public Buffer value(long value) { FT_StreamDesc.nvalue(address(), value); return this; } - /** Sets the specified value to the {@code pointer} field. */ - public Buffer pointer(@NativeType("void *") long value) { FT_StreamDesc.npointer(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_CloseFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_CloseFunc.java deleted file mode 100644 index d683aac6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_CloseFunc.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Stream stream
    - * )
    - */ -public abstract class FT_Stream_CloseFunc extends Callback implements FT_Stream_CloseFuncI { - - /** - * Creates a {@code FT_Stream_CloseFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Stream_CloseFunc} - */ - public static FT_Stream_CloseFunc create(long functionPointer) { - FT_Stream_CloseFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Stream_CloseFunc - ? (FT_Stream_CloseFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Stream_CloseFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Stream_CloseFunc} instance that delegates to the specified {@code FT_Stream_CloseFuncI} instance. */ - public static FT_Stream_CloseFunc create(FT_Stream_CloseFuncI instance) { - return instance instanceof FT_Stream_CloseFunc - ? (FT_Stream_CloseFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Stream_CloseFunc() { - super(CIF); - } - - FT_Stream_CloseFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Stream_CloseFunc { - - private final FT_Stream_CloseFuncI delegate; - - Container(long functionPointer, FT_Stream_CloseFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long stream) { - delegate.invoke(stream); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_CloseFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_CloseFuncI.java deleted file mode 100644 index 3f23c139..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_CloseFuncI.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Stream stream
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Stream_CloseFunc") -public interface FT_Stream_CloseFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - void invoke(@NativeType("FT_Stream") long stream); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_IoFunc.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_IoFunc.java deleted file mode 100644 index 47155dac..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_IoFunc.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * unsigned long (*{@link #invoke}) (
    - *     FT_Stream stream,
    - *     unsigned long offset,
    - *     unsigned char *buffer,
    - *     unsigned long count
    - * )
    - */ -public abstract class FT_Stream_IoFunc extends Callback implements FT_Stream_IoFuncI { - - /** - * Creates a {@code FT_Stream_IoFunc} instance from the specified function pointer. - * - * @return the new {@code FT_Stream_IoFunc} - */ - public static FT_Stream_IoFunc create(long functionPointer) { - FT_Stream_IoFuncI instance = Callback.get(functionPointer); - return instance instanceof FT_Stream_IoFunc - ? (FT_Stream_IoFunc)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static FT_Stream_IoFunc createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code FT_Stream_IoFunc} instance that delegates to the specified {@code FT_Stream_IoFuncI} instance. */ - public static FT_Stream_IoFunc create(FT_Stream_IoFuncI instance) { - return instance instanceof FT_Stream_IoFunc - ? (FT_Stream_IoFunc)instance - : new Container(instance.address(), instance); - } - - protected FT_Stream_IoFunc() { - super(CIF); - } - - FT_Stream_IoFunc(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends FT_Stream_IoFunc { - - private final FT_Stream_IoFuncI delegate; - - Container(long functionPointer, FT_Stream_IoFuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public long invoke(long stream, long offset, long buffer, long count) { - return delegate.invoke(stream, offset, buffer, count); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_IoFuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_IoFuncI.java deleted file mode 100644 index 0a57b71c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Stream_IoFuncI.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * unsigned long (*{@link #invoke}) (
    - *     FT_Stream stream,
    - *     unsigned long offset,
    - *     unsigned char *buffer,
    - *     unsigned long count
    - * )
    - */ -@FunctionalInterface -@NativeType("FT_Stream_IoFunc") -public interface FT_Stream_IoFuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_ulong, - ffi_type_pointer, ffi_type_ulong, ffi_type_pointer, ffi_type_ulong - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - long __result = invoke( - memGetAddress(memGetAddress(args)), - memGetCLong(memGetAddress(args + POINTER_SIZE)), - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)), - memGetCLong(memGetAddress(args + 3 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A function used to seek and read data from a given input stream. */ - @NativeType("unsigned long") long invoke(@NativeType("FT_Stream") long stream, @NativeType("unsigned long") long offset, @NativeType("unsigned char *") long buffer, @NativeType("unsigned long") long count); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SvgGlyph.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SvgGlyph.java deleted file mode 100644 index 4193955e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_SvgGlyph.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used for OT-SVG glyphs. This is a 'sub-class' of {@link FT_Glyph}. - * - *

    Layout

    - * - *
    
    - * struct FT_SvgGlyphRec {
    - *     {@link FT_Glyph FT_GlyphRec} root;
    - *     FT_Byte * svg_document;
    - *     FT_ULong svg_document_length;
    - *     FT_UInt glyph_index;
    - *     {@link FT_Size_Metrics FT_Size_Metrics} metrics;
    - *     FT_UShort units_per_EM;
    - *     FT_UShort start_glyph_id;
    - *     FT_UShort end_glyph_id;
    - *     {@link FT_Matrix FT_Matrix} transform;
    - *     {@link FT_Vector FT_Vector} delta;
    - * }
    - */ -@NativeType("struct FT_SvgGlyphRec") -public class FT_SvgGlyph extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - ROOT, - SVG_DOCUMENT, - SVG_DOCUMENT_LENGTH, - GLYPH_INDEX, - METRICS, - UNITS_PER_EM, - START_GLYPH_ID, - END_GLYPH_ID, - TRANSFORM, - DELTA; - - static { - Layout layout = __struct( - __member(FT_Glyph.SIZEOF, FT_Glyph.ALIGNOF), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(4), - __member(FT_Size_Metrics.SIZEOF, FT_Size_Metrics.ALIGNOF), - __member(2), - __member(2), - __member(2), - __member(FT_Matrix.SIZEOF, FT_Matrix.ALIGNOF), - __member(FT_Vector.SIZEOF, FT_Vector.ALIGNOF) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - ROOT = layout.offsetof(0); - SVG_DOCUMENT = layout.offsetof(1); - SVG_DOCUMENT_LENGTH = layout.offsetof(2); - GLYPH_INDEX = layout.offsetof(3); - METRICS = layout.offsetof(4); - UNITS_PER_EM = layout.offsetof(5); - START_GLYPH_ID = layout.offsetof(6); - END_GLYPH_ID = layout.offsetof(7); - TRANSFORM = layout.offsetof(8); - DELTA = layout.offsetof(9); - } - - protected FT_SvgGlyph(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_SvgGlyph create(long address, @Nullable ByteBuffer container) { - return new FT_SvgGlyph(address, container); - } - - /** - * Creates a {@code FT_SvgGlyph} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_SvgGlyph(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link FT_Glyph} view of the {@code root} field. */ - @NativeType("FT_GlyphRec") - public FT_Glyph root() { return nroot(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code svg_document} field. */ - @NativeType("FT_Byte *") - public ByteBuffer svg_document() { return nsvg_document(address()); } - /** @return the value of the {@code svg_document_length} field. */ - @NativeType("FT_ULong") - public long svg_document_length() { return nsvg_document_length(address()); } - /** @return the value of the {@code glyph_index} field. */ - @NativeType("FT_UInt") - public int glyph_index() { return nglyph_index(address()); } - /** @return a {@link FT_Size_Metrics} view of the {@code metrics} field. */ - public FT_Size_Metrics metrics() { return nmetrics(address()); } - /** @return the value of the {@code units_per_EM} field. */ - @NativeType("FT_UShort") - public short units_per_EM() { return nunits_per_EM(address()); } - /** @return the value of the {@code start_glyph_id} field. */ - @NativeType("FT_UShort") - public short start_glyph_id() { return nstart_glyph_id(address()); } - /** @return the value of the {@code end_glyph_id} field. */ - @NativeType("FT_UShort") - public short end_glyph_id() { return nend_glyph_id(address()); } - /** @return a {@link FT_Matrix} view of the {@code transform} field. */ - public FT_Matrix transform() { return ntransform(address()); } - /** @return a {@link FT_Vector} view of the {@code delta} field. */ - public FT_Vector delta() { return ndelta(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_SvgGlyph} instance for the specified memory address. */ - public static FT_SvgGlyph create(long address) { - return new FT_SvgGlyph(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_SvgGlyph createSafe(long address) { - return address == NULL ? null : new FT_SvgGlyph(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #root}. */ - public static FT_Glyph nroot(long struct) { return FT_Glyph.create(struct + FT_SvgGlyph.ROOT); } - /** Unsafe version of {@link #svg_document() svg_document}. */ - public static ByteBuffer nsvg_document(long struct) { return memByteBuffer(memGetAddress(struct + FT_SvgGlyph.SVG_DOCUMENT), (int)nsvg_document_length(struct)); } - /** Unsafe version of {@link #svg_document_length}. */ - public static long nsvg_document_length(long struct) { return memGetCLong(struct + FT_SvgGlyph.SVG_DOCUMENT_LENGTH); } - /** Unsafe version of {@link #glyph_index}. */ - public static int nglyph_index(long struct) { return UNSAFE.getInt(null, struct + FT_SvgGlyph.GLYPH_INDEX); } - /** Unsafe version of {@link #metrics}. */ - public static FT_Size_Metrics nmetrics(long struct) { return FT_Size_Metrics.create(struct + FT_SvgGlyph.METRICS); } - /** Unsafe version of {@link #units_per_EM}. */ - public static short nunits_per_EM(long struct) { return UNSAFE.getShort(null, struct + FT_SvgGlyph.UNITS_PER_EM); } - /** Unsafe version of {@link #start_glyph_id}. */ - public static short nstart_glyph_id(long struct) { return UNSAFE.getShort(null, struct + FT_SvgGlyph.START_GLYPH_ID); } - /** Unsafe version of {@link #end_glyph_id}. */ - public static short nend_glyph_id(long struct) { return UNSAFE.getShort(null, struct + FT_SvgGlyph.END_GLYPH_ID); } - /** Unsafe version of {@link #transform}. */ - public static FT_Matrix ntransform(long struct) { return FT_Matrix.create(struct + FT_SvgGlyph.TRANSFORM); } - /** Unsafe version of {@link #delta}. */ - public static FT_Vector ndelta(long struct) { return FT_Vector.create(struct + FT_SvgGlyph.DELTA); } - - // ----------------------------------- - - /** An array of {@link FT_SvgGlyph} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_SvgGlyph ELEMENT_FACTORY = FT_SvgGlyph.create(-1L); - - /** - * Creates a new {@code FT_SvgGlyph.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_SvgGlyph#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_SvgGlyph getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link FT_Glyph} view of the {@code root} field. */ - @NativeType("FT_GlyphRec") - public FT_Glyph root() { return FT_SvgGlyph.nroot(address()); } - /** @return a {@link ByteBuffer} view of the data pointed to by the {@code svg_document} field. */ - @NativeType("FT_Byte *") - public ByteBuffer svg_document() { return FT_SvgGlyph.nsvg_document(address()); } - /** @return the value of the {@code svg_document_length} field. */ - @NativeType("FT_ULong") - public long svg_document_length() { return FT_SvgGlyph.nsvg_document_length(address()); } - /** @return the value of the {@code glyph_index} field. */ - @NativeType("FT_UInt") - public int glyph_index() { return FT_SvgGlyph.nglyph_index(address()); } - /** @return a {@link FT_Size_Metrics} view of the {@code metrics} field. */ - public FT_Size_Metrics metrics() { return FT_SvgGlyph.nmetrics(address()); } - /** @return the value of the {@code units_per_EM} field. */ - @NativeType("FT_UShort") - public short units_per_EM() { return FT_SvgGlyph.nunits_per_EM(address()); } - /** @return the value of the {@code start_glyph_id} field. */ - @NativeType("FT_UShort") - public short start_glyph_id() { return FT_SvgGlyph.nstart_glyph_id(address()); } - /** @return the value of the {@code end_glyph_id} field. */ - @NativeType("FT_UShort") - public short end_glyph_id() { return FT_SvgGlyph.nend_glyph_id(address()); } - /** @return a {@link FT_Matrix} view of the {@code transform} field. */ - public FT_Matrix transform() { return FT_SvgGlyph.ntransform(address()); } - /** @return a {@link FT_Vector} view of the {@code delta} field. */ - public FT_Vector delta() { return FT_SvgGlyph.ndelta(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_UnitVector.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_UnitVector.java deleted file mode 100644 index b1496741..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_UnitVector.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A simple structure used to store a 2D vector unit vector. Uses {@code FT_F2Dot14} types. - * - *

    Layout

    - * - *
    
    - * struct FT_UnitVector {
    - *     FT_F2Dot14 x;
    - *     FT_F2Dot14 y;
    - * }
    - */ -public class FT_UnitVector extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - protected FT_UnitVector(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_UnitVector create(long address, @Nullable ByteBuffer container) { - return new FT_UnitVector(address, container); - } - - /** - * Creates a {@code FT_UnitVector} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_UnitVector(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - @NativeType("FT_F2Dot14") - public short x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("FT_F2Dot14") - public short y() { return ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public FT_UnitVector x(@NativeType("FT_F2Dot14") short value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public FT_UnitVector y(@NativeType("FT_F2Dot14") short value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_UnitVector set( - short x, - short y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_UnitVector set(FT_UnitVector src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_UnitVector} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_UnitVector malloc() { - return new FT_UnitVector(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_UnitVector} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_UnitVector calloc() { - return new FT_UnitVector(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_UnitVector} instance allocated with {@link BufferUtils}. */ - public static FT_UnitVector create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_UnitVector(memAddress(container), container); - } - - /** Returns a new {@code FT_UnitVector} instance for the specified memory address. */ - public static FT_UnitVector create(long address) { - return new FT_UnitVector(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_UnitVector createSafe(long address) { - return address == NULL ? null : new FT_UnitVector(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_UnitVector} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_UnitVector malloc(MemoryStack stack) { - return new FT_UnitVector(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_UnitVector} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_UnitVector calloc(MemoryStack stack) { - return new FT_UnitVector(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static short nx(long struct) { return UNSAFE.getShort(null, struct + FT_UnitVector.X); } - /** Unsafe version of {@link #y}. */ - public static short ny(long struct) { return UNSAFE.getShort(null, struct + FT_UnitVector.Y); } - - /** Unsafe version of {@link #x(short) x}. */ - public static void nx(long struct, short value) { UNSAFE.putShort(null, struct + FT_UnitVector.X, value); } - /** Unsafe version of {@link #y(short) y}. */ - public static void ny(long struct, short value) { UNSAFE.putShort(null, struct + FT_UnitVector.Y, value); } - - // ----------------------------------- - - /** An array of {@link FT_UnitVector} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_UnitVector ELEMENT_FACTORY = FT_UnitVector.create(-1L); - - /** - * Creates a new {@code FT_UnitVector.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_UnitVector#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_UnitVector getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - @NativeType("FT_F2Dot14") - public short x() { return FT_UnitVector.nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("FT_F2Dot14") - public short y() { return FT_UnitVector.ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(@NativeType("FT_F2Dot14") short value) { FT_UnitVector.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(@NativeType("FT_F2Dot14") short value) { FT_UnitVector.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Var_Axis.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Var_Axis.java deleted file mode 100644 index fcae9a71..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Var_Axis.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a given axis in design space for Multiple Masters, TrueType GX, and OpenType variation fonts. - * - *

    Layout

    - * - *
    
    - * struct FT_Var_Axis {
    - *     FT_String * name;
    - *     FT_Fixed minimum;
    - *     FT_Fixed def;
    - *     FT_Fixed maximum;
    - *     FT_ULong tag;
    - *     FT_UInt strid;
    - * }
    - */ -public class FT_Var_Axis extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - NAME, - MINIMUM, - DEF, - MAXIMUM, - TAG, - STRID; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - NAME = layout.offsetof(0); - MINIMUM = layout.offsetof(1); - DEF = layout.offsetof(2); - MAXIMUM = layout.offsetof(3); - TAG = layout.offsetof(4); - STRID = layout.offsetof(5); - } - - protected FT_Var_Axis(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Var_Axis create(long address, @Nullable ByteBuffer container) { - return new FT_Var_Axis(address, container); - } - - /** - * Creates a {@code FT_Var_Axis} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Var_Axis(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public ByteBuffer name() { return nname(address()); } - /** @return the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public String nameString() { return nnameString(address()); } - /** @return the value of the {@code minimum} field. */ - @NativeType("FT_Fixed") - public long minimum() { return nminimum(address()); } - /** @return the value of the {@code def} field. */ - @NativeType("FT_Fixed") - public long def() { return ndef(address()); } - /** @return the value of the {@code maximum} field. */ - @NativeType("FT_Fixed") - public long maximum() { return nmaximum(address()); } - /** @return the value of the {@code tag} field. */ - @NativeType("FT_ULong") - public long tag() { return ntag(address()); } - /** @return the value of the {@code strid} field. */ - @NativeType("FT_UInt") - public int strid() { return nstrid(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Var_Axis} instance for the specified memory address. */ - public static FT_Var_Axis create(long address) { - return new FT_Var_Axis(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Var_Axis createSafe(long address) { - return address == NULL ? null : new FT_Var_Axis(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #name}. */ - public static ByteBuffer nname(long struct) { return memByteBufferNT1(memGetAddress(struct + FT_Var_Axis.NAME)); } - /** Unsafe version of {@link #nameString}. */ - public static String nnameString(long struct) { return memUTF8(memGetAddress(struct + FT_Var_Axis.NAME)); } - /** Unsafe version of {@link #minimum}. */ - public static long nminimum(long struct) { return memGetCLong(struct + FT_Var_Axis.MINIMUM); } - /** Unsafe version of {@link #def}. */ - public static long ndef(long struct) { return memGetCLong(struct + FT_Var_Axis.DEF); } - /** Unsafe version of {@link #maximum}. */ - public static long nmaximum(long struct) { return memGetCLong(struct + FT_Var_Axis.MAXIMUM); } - /** Unsafe version of {@link #tag}. */ - public static long ntag(long struct) { return memGetCLong(struct + FT_Var_Axis.TAG); } - /** Unsafe version of {@link #strid}. */ - public static int nstrid(long struct) { return UNSAFE.getInt(null, struct + FT_Var_Axis.STRID); } - - // ----------------------------------- - - /** An array of {@link FT_Var_Axis} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Var_Axis ELEMENT_FACTORY = FT_Var_Axis.create(-1L); - - /** - * Creates a new {@code FT_Var_Axis.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Var_Axis#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Var_Axis getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public ByteBuffer name() { return FT_Var_Axis.nname(address()); } - /** @return the null-terminated string pointed to by the {@code name} field. */ - @NativeType("FT_String *") - public String nameString() { return FT_Var_Axis.nnameString(address()); } - /** @return the value of the {@code minimum} field. */ - @NativeType("FT_Fixed") - public long minimum() { return FT_Var_Axis.nminimum(address()); } - /** @return the value of the {@code def} field. */ - @NativeType("FT_Fixed") - public long def() { return FT_Var_Axis.ndef(address()); } - /** @return the value of the {@code maximum} field. */ - @NativeType("FT_Fixed") - public long maximum() { return FT_Var_Axis.nmaximum(address()); } - /** @return the value of the {@code tag} field. */ - @NativeType("FT_ULong") - public long tag() { return FT_Var_Axis.ntag(address()); } - /** @return the value of the {@code strid} field. */ - @NativeType("FT_UInt") - public int strid() { return FT_Var_Axis.nstrid(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Var_Named_Style.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Var_Named_Style.java deleted file mode 100644 index 9df3cd2f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Var_Named_Style.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a named instance in a TrueType GX or OpenType variation font. - * - *

    Layout

    - * - *
    
    - * struct FT_Var_Named_Style {
    - *     FT_Fixed * coords;
    - *     FT_UInt strid;
    - *     FT_UInt psid;
    - * }
    - */ -public class FT_Var_Named_Style extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - COORDS, - STRID, - PSID; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(4), - __member(4) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - COORDS = layout.offsetof(0); - STRID = layout.offsetof(1); - PSID = layout.offsetof(2); - } - - protected FT_Var_Named_Style(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Var_Named_Style create(long address, @Nullable ByteBuffer container) { - return new FT_Var_Named_Style(address, container); - } - - /** - * Creates a {@code FT_Var_Named_Style} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Var_Named_Style(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** - * @return a {@link CLongBuffer} view of the data pointed to by the {@code coords} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("FT_Fixed *") - public CLongBuffer coords(int capacity) { return ncoords(address(), capacity); } - /** @return the value of the {@code strid} field. */ - @NativeType("FT_UInt") - public int strid() { return nstrid(address()); } - /** @return the value of the {@code psid} field. */ - @NativeType("FT_UInt") - public int psid() { return npsid(address()); } - - // ----------------------------------- - - /** Returns a new {@code FT_Var_Named_Style} instance for the specified memory address. */ - public static FT_Var_Named_Style create(long address) { - return new FT_Var_Named_Style(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Var_Named_Style createSafe(long address) { - return address == NULL ? null : new FT_Var_Named_Style(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #coords(int) coords}. */ - public static CLongBuffer ncoords(long struct, int capacity) { return memCLongBuffer(memGetAddress(struct + FT_Var_Named_Style.COORDS), capacity); } - /** Unsafe version of {@link #strid}. */ - public static int nstrid(long struct) { return UNSAFE.getInt(null, struct + FT_Var_Named_Style.STRID); } - /** Unsafe version of {@link #psid}. */ - public static int npsid(long struct) { return UNSAFE.getInt(null, struct + FT_Var_Named_Style.PSID); } - - // ----------------------------------- - - /** An array of {@link FT_Var_Named_Style} structs. */ - public static class Buffer extends StructBuffer { - - private static final FT_Var_Named_Style ELEMENT_FACTORY = FT_Var_Named_Style.create(-1L); - - /** - * Creates a new {@code FT_Var_Named_Style.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Var_Named_Style#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Var_Named_Style getElementFactory() { - return ELEMENT_FACTORY; - } - - /** - * @return a {@link CLongBuffer} view of the data pointed to by the {@code coords} field. - * - * @param capacity the number of elements in the returned buffer - */ - @NativeType("FT_Fixed *") - public CLongBuffer coords(int capacity) { return FT_Var_Named_Style.ncoords(address(), capacity); } - /** @return the value of the {@code strid} field. */ - @NativeType("FT_UInt") - public int strid() { return FT_Var_Named_Style.nstrid(address()); } - /** @return the value of the {@code psid} field. */ - @NativeType("FT_UInt") - public int psid() { return FT_Var_Named_Style.npsid(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Vector.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Vector.java deleted file mode 100644 index a54e26f6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FT_Vector.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A simple structure used to store a 2D vector; coordinates are of the {@code FT_Pos} type. - * - *

    Layout

    - * - *
    
    - * struct FT_Vector {
    - *     FT_Pos x;
    - *     FT_Pos y;
    - * }
    - */ -public class FT_Vector extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - X, - Y; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - X = layout.offsetof(0); - Y = layout.offsetof(1); - } - - protected FT_Vector(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected FT_Vector create(long address, @Nullable ByteBuffer container) { - return new FT_Vector(address, container); - } - - /** - * Creates a {@code FT_Vector} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public FT_Vector(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code x} field. */ - @NativeType("FT_Pos") - public long x() { return nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("FT_Pos") - public long y() { return ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public FT_Vector x(@NativeType("FT_Pos") long value) { nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public FT_Vector y(@NativeType("FT_Pos") long value) { ny(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public FT_Vector set( - long x, - long y - ) { - x(x); - y(y); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public FT_Vector set(FT_Vector src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code FT_Vector} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static FT_Vector malloc() { - return new FT_Vector(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code FT_Vector} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static FT_Vector calloc() { - return new FT_Vector(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code FT_Vector} instance allocated with {@link BufferUtils}. */ - public static FT_Vector create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new FT_Vector(memAddress(container), container); - } - - /** Returns a new {@code FT_Vector} instance for the specified memory address. */ - public static FT_Vector create(long address) { - return new FT_Vector(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static FT_Vector createSafe(long address) { - return address == NULL ? null : new FT_Vector(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code FT_Vector} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static FT_Vector malloc(MemoryStack stack) { - return new FT_Vector(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code FT_Vector} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static FT_Vector calloc(MemoryStack stack) { - return new FT_Vector(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #x}. */ - public static long nx(long struct) { return memGetCLong(struct + FT_Vector.X); } - /** Unsafe version of {@link #y}. */ - public static long ny(long struct) { return memGetCLong(struct + FT_Vector.Y); } - - /** Unsafe version of {@link #x(long) x}. */ - public static void nx(long struct, long value) { memPutCLong(struct + FT_Vector.X, value); } - /** Unsafe version of {@link #y(long) y}. */ - public static void ny(long struct, long value) { memPutCLong(struct + FT_Vector.Y, value); } - - // ----------------------------------- - - /** An array of {@link FT_Vector} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final FT_Vector ELEMENT_FACTORY = FT_Vector.create(-1L); - - /** - * Creates a new {@code FT_Vector.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link FT_Vector#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected FT_Vector getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code x} field. */ - @NativeType("FT_Pos") - public long x() { return FT_Vector.nx(address()); } - /** @return the value of the {@code y} field. */ - @NativeType("FT_Pos") - public long y() { return FT_Vector.ny(address()); } - - /** Sets the specified value to the {@code x} field. */ - public Buffer x(@NativeType("FT_Pos") long value) { FT_Vector.nx(address(), value); return this; } - /** Sets the specified value to the {@code y} field. */ - public Buffer y(@NativeType("FT_Pos") long value) { FT_Vector.ny(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/FreeType.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/FreeType.java deleted file mode 100644 index da644f07..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/FreeType.java +++ /dev/null @@ -1,5951 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.JNI.*; -import static org.lwjgl.system.libffi.LibFFI.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Native bindings to FreeType, a freely available software library to render fonts. - * - *

    It is written in C, designed to be small, efficient, highly customizable, and portable while capable of producing high-quality output (glyph images) of - * most vector and bitmap font formats.

    - * - *

    FreeType is a library that provides access to glyphs in font files. It scales the glyph images and their metrics to a requested size, and it rasterizes - * the glyph images to produce pixel or subpixel alpha coverage bitmaps.

    - * - *

    Note that FreeType is not a text layout engine. You have to use higher-level libraries like HarfBuzz, Pango, or ICU for that.

    - * - *

    Note also that FreeType does not perform alpha blending or compositing the resulting bitmaps or pixmaps by itself. Use your favourite graphics - * library (for example, Cairo or Skia) to further process FreeType's output.

    - * - *

    HarfBuzz interop

    - * - *

    The default LWJGL FreeType build includes HarfBuzz and exports its full API. See the HarfBuzz bindings for more information.

    - */ -public class FreeType { - - private static final SharedLibrary FREETYPE = Library.loadNative(FreeType.class, "org.lwjgl.freetype", Configuration.FREETYPE_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("freetype")), true); - - /** Contains the function pointers loaded from the freetype {@link SharedLibrary}. */ - public static final class Functions { - - private Functions() {} - - /** Function address. */ - public static final long - Init_FreeType = apiGetFunctionAddress(FREETYPE, "FT_Init_FreeType"), - Done_FreeType = apiGetFunctionAddress(FREETYPE, "FT_Done_FreeType"), - New_Face = apiGetFunctionAddress(FREETYPE, "FT_New_Face"), - New_Memory_Face = apiGetFunctionAddress(FREETYPE, "FT_New_Memory_Face"), - Open_Face = apiGetFunctionAddress(FREETYPE, "FT_Open_Face"), - Attach_File = apiGetFunctionAddress(FREETYPE, "FT_Attach_File"), - Attach_Stream = apiGetFunctionAddress(FREETYPE, "FT_Attach_Stream"), - Reference_Face = apiGetFunctionAddress(FREETYPE, "FT_Reference_Face"), - Done_Face = apiGetFunctionAddress(FREETYPE, "FT_Done_Face"), - Select_Size = apiGetFunctionAddress(FREETYPE, "FT_Select_Size"), - Request_Size = apiGetFunctionAddress(FREETYPE, "FT_Request_Size"), - Set_Char_Size = apiGetFunctionAddress(FREETYPE, "FT_Set_Char_Size"), - Set_Pixel_Sizes = apiGetFunctionAddress(FREETYPE, "FT_Set_Pixel_Sizes"), - Load_Glyph = apiGetFunctionAddress(FREETYPE, "FT_Load_Glyph"), - Load_Char = apiGetFunctionAddress(FREETYPE, "FT_Load_Char"), - Set_Transform = apiGetFunctionAddress(FREETYPE, "FT_Set_Transform"), - Get_Transform = apiGetFunctionAddress(FREETYPE, "FT_Get_Transform"), - Render_Glyph = apiGetFunctionAddress(FREETYPE, "FT_Render_Glyph"), - Get_Kerning = apiGetFunctionAddress(FREETYPE, "FT_Get_Kerning"), - Get_Track_Kerning = apiGetFunctionAddress(FREETYPE, "FT_Get_Track_Kerning"), - Select_Charmap = apiGetFunctionAddress(FREETYPE, "FT_Select_Charmap"), - Set_Charmap = apiGetFunctionAddress(FREETYPE, "FT_Set_Charmap"), - Get_Charmap_Index = apiGetFunctionAddress(FREETYPE, "FT_Get_Charmap_Index"), - Get_Char_Index = apiGetFunctionAddress(FREETYPE, "FT_Get_Char_Index"), - Get_First_Char = apiGetFunctionAddress(FREETYPE, "FT_Get_First_Char"), - Get_Next_Char = apiGetFunctionAddress(FREETYPE, "FT_Get_Next_Char"), - Face_Properties = apiGetFunctionAddress(FREETYPE, "FT_Face_Properties"), - Get_Name_Index = apiGetFunctionAddress(FREETYPE, "FT_Get_Name_Index"), - Get_Glyph_Name = apiGetFunctionAddress(FREETYPE, "FT_Get_Glyph_Name"), - Get_Postscript_Name = apiGetFunctionAddress(FREETYPE, "FT_Get_Postscript_Name"), - Get_SubGlyph_Info = apiGetFunctionAddress(FREETYPE, "FT_Get_SubGlyph_Info"), - Get_FSType_Flags = apiGetFunctionAddress(FREETYPE, "FT_Get_FSType_Flags"), - Face_GetCharVariantIndex = apiGetFunctionAddress(FREETYPE, "FT_Face_GetCharVariantIndex"), - Face_GetCharVariantIsDefault = apiGetFunctionAddress(FREETYPE, "FT_Face_GetCharVariantIsDefault"), - Face_GetVariantSelectors = apiGetFunctionAddress(FREETYPE, "FT_Face_GetVariantSelectors"), - Face_GetVariantsOfChar = apiGetFunctionAddress(FREETYPE, "FT_Face_GetVariantsOfChar"), - Face_GetCharsOfVariant = apiGetFunctionAddress(FREETYPE, "FT_Face_GetCharsOfVariant"), - MulDiv = apiGetFunctionAddress(FREETYPE, "FT_MulDiv"), - MulFix = apiGetFunctionAddress(FREETYPE, "FT_MulFix"), - DivFix = apiGetFunctionAddress(FREETYPE, "FT_DivFix"), - RoundFix = apiGetFunctionAddress(FREETYPE, "FT_RoundFix"), - CeilFix = apiGetFunctionAddress(FREETYPE, "FT_CeilFix"), - FloorFix = apiGetFunctionAddress(FREETYPE, "FT_FloorFix"), - Vector_Transform = apiGetFunctionAddress(FREETYPE, "FT_Vector_Transform"), - Library_Version = apiGetFunctionAddress(FREETYPE, "FT_Library_Version"), - Face_CheckTrueTypePatents = apiGetFunctionAddress(FREETYPE, "FT_Face_CheckTrueTypePatents"), - Face_SetUnpatentedHinting = apiGetFunctionAddress(FREETYPE, "FT_Face_SetUnpatentedHinting"), - Get_Advance = apiGetFunctionAddress(FREETYPE, "FT_Get_Advance"), - Get_Advances = apiGetFunctionAddress(FREETYPE, "FT_Get_Advances"), - Outline_Get_BBox = apiGetFunctionAddress(FREETYPE, "FT_Outline_Get_BBox"), - Get_BDF_Charset_ID = apiGetFunctionAddress(FREETYPE, "FT_Get_BDF_Charset_ID"), - Get_BDF_Property = apiGetFunctionAddress(FREETYPE, "FT_Get_BDF_Property"), - Bitmap_Init = apiGetFunctionAddress(FREETYPE, "FT_Bitmap_Init"), - Bitmap_Copy = apiGetFunctionAddress(FREETYPE, "FT_Bitmap_Copy"), - Bitmap_Embolden = apiGetFunctionAddress(FREETYPE, "FT_Bitmap_Embolden"), - Bitmap_Convert = apiGetFunctionAddress(FREETYPE, "FT_Bitmap_Convert"), - Bitmap_Blend = apiGetFunctionAddress(FREETYPE, "FT_Bitmap_Blend"), - GlyphSlot_Own_Bitmap = apiGetFunctionAddress(FREETYPE, "FT_GlyphSlot_Own_Bitmap"), - Bitmap_Done = apiGetFunctionAddress(FREETYPE, "FT_Bitmap_Done"), - Stream_OpenBzip2 = apiGetFunctionAddressOptional(FREETYPE, "FT_Stream_OpenBzip2"), - FTC_Manager_New = apiGetFunctionAddress(FREETYPE, "FTC_Manager_New"), - FTC_Manager_Reset = apiGetFunctionAddress(FREETYPE, "FTC_Manager_Reset"), - FTC_Manager_Done = apiGetFunctionAddress(FREETYPE, "FTC_Manager_Done"), - FTC_Manager_LookupFace = apiGetFunctionAddress(FREETYPE, "FTC_Manager_LookupFace"), - FTC_Manager_LookupSize = apiGetFunctionAddress(FREETYPE, "FTC_Manager_LookupSize"), - FTC_Node_Unref = apiGetFunctionAddress(FREETYPE, "FTC_Node_Unref"), - FTC_Manager_RemoveFaceID = apiGetFunctionAddress(FREETYPE, "FTC_Manager_RemoveFaceID"), - FTC_CMapCache_New = apiGetFunctionAddress(FREETYPE, "FTC_CMapCache_New"), - FTC_CMapCache_Lookup = apiGetFunctionAddress(FREETYPE, "FTC_CMapCache_Lookup"), - FTC_ImageCache_New = apiGetFunctionAddress(FREETYPE, "FTC_ImageCache_New"), - FTC_ImageCache_Lookup = apiGetFunctionAddress(FREETYPE, "FTC_ImageCache_Lookup"), - FTC_ImageCache_LookupScaler = apiGetFunctionAddress(FREETYPE, "FTC_ImageCache_LookupScaler"), - FTC_SBitCache_New = apiGetFunctionAddress(FREETYPE, "FTC_SBitCache_New"), - FTC_SBitCache_Lookup = apiGetFunctionAddress(FREETYPE, "FTC_SBitCache_Lookup"), - FTC_SBitCache_LookupScaler = apiGetFunctionAddress(FREETYPE, "FTC_SBitCache_LookupScaler"), - Get_CID_Registry_Ordering_Supplement = apiGetFunctionAddress(FREETYPE, "FT_Get_CID_Registry_Ordering_Supplement"), - Get_CID_Is_Internally_CID_Keyed = apiGetFunctionAddress(FREETYPE, "FT_Get_CID_Is_Internally_CID_Keyed"), - Get_CID_From_Glyph_Index = apiGetFunctionAddress(FREETYPE, "FT_Get_CID_From_Glyph_Index"), - Palette_Data_Get = apiGetFunctionAddress(FREETYPE, "FT_Palette_Data_Get"), - Palette_Select = apiGetFunctionAddress(FREETYPE, "FT_Palette_Select"), - Palette_Set_Foreground_Color = apiGetFunctionAddress(FREETYPE, "FT_Palette_Set_Foreground_Color"), - Get_Color_Glyph_Layer = apiGetFunctionAddress(FREETYPE, "FT_Get_Color_Glyph_Layer"), - Get_Color_Glyph_Paint = apiGetFunctionAddress(FREETYPE, "FT_Get_Color_Glyph_Paint"), - Get_Color_Glyph_ClipBox = apiGetFunctionAddress(FREETYPE, "FT_Get_Color_Glyph_ClipBox"), - Get_Paint_Layers = apiGetFunctionAddress(FREETYPE, "FT_Get_Paint_Layers"), - Get_Colorline_Stops = apiGetFunctionAddress(FREETYPE, "FT_Get_Colorline_Stops"), - Get_Paint = apiGetFunctionAddress(FREETYPE, "FT_Get_Paint"), - Error_String = apiGetFunctionAddress(FREETYPE, "FT_Error_String"), - Get_Font_Format = apiGetFunctionAddress(FREETYPE, "FT_Get_Font_Format"), - Get_Gasp = apiGetFunctionAddress(FREETYPE, "FT_Get_Gasp"), - New_Glyph = apiGetFunctionAddress(FREETYPE, "FT_New_Glyph"), - Get_Glyph = apiGetFunctionAddress(FREETYPE, "FT_Get_Glyph"), - Glyph_Copy = apiGetFunctionAddress(FREETYPE, "FT_Glyph_Copy"), - Glyph_Transform = apiGetFunctionAddress(FREETYPE, "FT_Glyph_Transform"), - Glyph_Get_CBox = apiGetFunctionAddress(FREETYPE, "FT_Glyph_Get_CBox"), - Glyph_To_Bitmap = apiGetFunctionAddress(FREETYPE, "FT_Glyph_To_Bitmap"), - Done_Glyph = apiGetFunctionAddress(FREETYPE, "FT_Done_Glyph"), - Matrix_Multiply = apiGetFunctionAddress(FREETYPE, "FT_Matrix_Multiply"), - Matrix_Invert = apiGetFunctionAddress(FREETYPE, "FT_Matrix_Invert"), - TrueTypeGX_Validate = apiGetFunctionAddress(FREETYPE, "FT_TrueTypeGX_Validate"), - TrueTypeGX_Free = apiGetFunctionAddress(FREETYPE, "FT_TrueTypeGX_Free"), - ClassicKern_Validate = apiGetFunctionAddress(FREETYPE, "FT_ClassicKern_Validate"), - ClassicKern_Free = apiGetFunctionAddress(FREETYPE, "FT_ClassicKern_Free"), - Stream_OpenGzip = apiGetFunctionAddress(FREETYPE, "FT_Stream_OpenGzip"), - Gzip_Uncompress = apiGetFunctionAddress(FREETYPE, "FT_Gzip_Uncompress"), - Library_SetLcdFilter = apiGetFunctionAddress(FREETYPE, "FT_Library_SetLcdFilter"), - Library_SetLcdFilterWeights = apiGetFunctionAddress(FREETYPE, "FT_Library_SetLcdFilterWeights"), - Library_SetLcdGeometry = apiGetFunctionAddress(FREETYPE, "FT_Library_SetLcdGeometry"), - List_Find = apiGetFunctionAddress(FREETYPE, "FT_List_Find"), - List_Add = apiGetFunctionAddress(FREETYPE, "FT_List_Add"), - List_Insert = apiGetFunctionAddress(FREETYPE, "FT_List_Insert"), - List_Remove = apiGetFunctionAddress(FREETYPE, "FT_List_Remove"), - List_Up = apiGetFunctionAddress(FREETYPE, "FT_List_Up"), - List_Iterate = apiGetFunctionAddress(FREETYPE, "FT_List_Iterate"), - List_Finalize = apiGetFunctionAddress(FREETYPE, "FT_List_Finalize"), - Stream_OpenLZW = apiGetFunctionAddress(FREETYPE, "FT_Stream_OpenLZW"), - Get_Multi_Master = apiGetFunctionAddress(FREETYPE, "FT_Get_Multi_Master"), - Get_MM_Var = apiGetFunctionAddress(FREETYPE, "FT_Get_MM_Var"), - Done_MM_Var = apiGetFunctionAddress(FREETYPE, "FT_Done_MM_Var"), - Set_MM_Design_Coordinates = apiGetFunctionAddress(FREETYPE, "FT_Set_MM_Design_Coordinates"), - Set_Var_Design_Coordinates = apiGetFunctionAddress(FREETYPE, "FT_Set_Var_Design_Coordinates"), - Get_Var_Design_Coordinates = apiGetFunctionAddress(FREETYPE, "FT_Get_Var_Design_Coordinates"), - Set_MM_Blend_Coordinates = apiGetFunctionAddress(FREETYPE, "FT_Set_MM_Blend_Coordinates"), - Get_MM_Blend_Coordinates = apiGetFunctionAddress(FREETYPE, "FT_Get_MM_Blend_Coordinates"), - Set_Var_Blend_Coordinates = apiGetFunctionAddress(FREETYPE, "FT_Set_Var_Blend_Coordinates"), - Get_Var_Blend_Coordinates = apiGetFunctionAddress(FREETYPE, "FT_Get_Var_Blend_Coordinates"), - Set_MM_WeightVector = apiGetFunctionAddress(FREETYPE, "FT_Set_MM_WeightVector"), - Get_MM_WeightVector = apiGetFunctionAddress(FREETYPE, "FT_Get_MM_WeightVector"), - Get_Var_Axis_Flags = apiGetFunctionAddress(FREETYPE, "FT_Get_Var_Axis_Flags"), - Set_Named_Instance = apiGetFunctionAddress(FREETYPE, "FT_Set_Named_Instance"), - Get_Default_Named_Instance = apiGetFunctionAddress(FREETYPE, "FT_Get_Default_Named_Instance"), - Add_Module = apiGetFunctionAddress(FREETYPE, "FT_Add_Module"), - Get_Module = apiGetFunctionAddress(FREETYPE, "FT_Get_Module"), - Remove_Module = apiGetFunctionAddress(FREETYPE, "FT_Remove_Module"), - Property_Set = apiGetFunctionAddress(FREETYPE, "FT_Property_Set"), - Property_Get = apiGetFunctionAddress(FREETYPE, "FT_Property_Get"), - Set_Default_Properties = apiGetFunctionAddress(FREETYPE, "FT_Set_Default_Properties"), - Reference_Library = apiGetFunctionAddress(FREETYPE, "FT_Reference_Library"), - New_Library = apiGetFunctionAddress(FREETYPE, "FT_New_Library"), - Done_Library = apiGetFunctionAddress(FREETYPE, "FT_Done_Library"), - Set_Debug_Hook = apiGetFunctionAddress(FREETYPE, "FT_Set_Debug_Hook"), - Add_Default_Modules = apiGetFunctionAddress(FREETYPE, "FT_Add_Default_Modules"), - Get_TrueType_Engine_Type = apiGetFunctionAddress(FREETYPE, "FT_Get_TrueType_Engine_Type"), - OpenType_Validate = apiGetFunctionAddress(FREETYPE, "FT_OpenType_Validate"), - OpenType_Free = apiGetFunctionAddress(FREETYPE, "FT_OpenType_Free"), - Outline_Decompose = apiGetFunctionAddress(FREETYPE, "FT_Outline_Decompose"), - Outline_New = apiGetFunctionAddress(FREETYPE, "FT_Outline_New"), - Outline_Done = apiGetFunctionAddress(FREETYPE, "FT_Outline_Done"), - Outline_Check = apiGetFunctionAddress(FREETYPE, "FT_Outline_Check"), - Outline_Get_CBox = apiGetFunctionAddress(FREETYPE, "FT_Outline_Get_CBox"), - Outline_Translate = apiGetFunctionAddress(FREETYPE, "FT_Outline_Translate"), - Outline_Copy = apiGetFunctionAddress(FREETYPE, "FT_Outline_Copy"), - Outline_Transform = apiGetFunctionAddress(FREETYPE, "FT_Outline_Transform"), - Outline_Embolden = apiGetFunctionAddress(FREETYPE, "FT_Outline_Embolden"), - Outline_EmboldenXY = apiGetFunctionAddress(FREETYPE, "FT_Outline_EmboldenXY"), - Outline_Reverse = apiGetFunctionAddress(FREETYPE, "FT_Outline_Reverse"), - Outline_Get_Bitmap = apiGetFunctionAddress(FREETYPE, "FT_Outline_Get_Bitmap"), - Outline_Render = apiGetFunctionAddress(FREETYPE, "FT_Outline_Render"), - Outline_Get_Orientation = apiGetFunctionAddress(FREETYPE, "FT_Outline_Get_Orientation"), - Get_PFR_Metrics = apiGetFunctionAddress(FREETYPE, "FT_Get_PFR_Metrics"), - Get_PFR_Kerning = apiGetFunctionAddress(FREETYPE, "FT_Get_PFR_Kerning"), - Get_PFR_Advance = apiGetFunctionAddress(FREETYPE, "FT_Get_PFR_Advance"), - Get_Renderer = apiGetFunctionAddress(FREETYPE, "FT_Get_Renderer"), - Set_Renderer = apiGetFunctionAddress(FREETYPE, "FT_Set_Renderer"), - New_Size = apiGetFunctionAddress(FREETYPE, "FT_New_Size"), - Done_Size = apiGetFunctionAddress(FREETYPE, "FT_Done_Size"), - Activate_Size = apiGetFunctionAddress(FREETYPE, "FT_Activate_Size"), - Get_Sfnt_Name_Count = apiGetFunctionAddress(FREETYPE, "FT_Get_Sfnt_Name_Count"), - Get_Sfnt_Name = apiGetFunctionAddress(FREETYPE, "FT_Get_Sfnt_Name"), - Get_Sfnt_LangTag = apiGetFunctionAddress(FREETYPE, "FT_Get_Sfnt_LangTag"), - Outline_GetInsideBorder = apiGetFunctionAddress(FREETYPE, "FT_Outline_GetInsideBorder"), - Outline_GetOutsideBorder = apiGetFunctionAddress(FREETYPE, "FT_Outline_GetOutsideBorder"), - Stroker_New = apiGetFunctionAddress(FREETYPE, "FT_Stroker_New"), - Stroker_Set = apiGetFunctionAddress(FREETYPE, "FT_Stroker_Set"), - Stroker_Rewind = apiGetFunctionAddress(FREETYPE, "FT_Stroker_Rewind"), - Stroker_ParseOutline = apiGetFunctionAddress(FREETYPE, "FT_Stroker_ParseOutline"), - Stroker_BeginSubPath = apiGetFunctionAddress(FREETYPE, "FT_Stroker_BeginSubPath"), - Stroker_EndSubPath = apiGetFunctionAddress(FREETYPE, "FT_Stroker_EndSubPath"), - Stroker_LineTo = apiGetFunctionAddress(FREETYPE, "FT_Stroker_LineTo"), - Stroker_ConicTo = apiGetFunctionAddress(FREETYPE, "FT_Stroker_ConicTo"), - Stroker_CubicTo = apiGetFunctionAddress(FREETYPE, "FT_Stroker_CubicTo"), - Stroker_GetBorderCounts = apiGetFunctionAddress(FREETYPE, "FT_Stroker_GetBorderCounts"), - Stroker_ExportBorder = apiGetFunctionAddress(FREETYPE, "FT_Stroker_ExportBorder"), - Stroker_GetCounts = apiGetFunctionAddress(FREETYPE, "FT_Stroker_GetCounts"), - Stroker_Export = apiGetFunctionAddress(FREETYPE, "FT_Stroker_Export"), - Stroker_Done = apiGetFunctionAddress(FREETYPE, "FT_Stroker_Done"), - Glyph_Stroke = apiGetFunctionAddress(FREETYPE, "FT_Glyph_Stroke"), - Glyph_StrokeBorder = apiGetFunctionAddress(FREETYPE, "FT_Glyph_StrokeBorder"), - GlyphSlot_Embolden = apiGetFunctionAddress(FREETYPE, "FT_GlyphSlot_Embolden"), - GlyphSlot_AdjustWeight = apiGetFunctionAddress(FREETYPE, "FT_GlyphSlot_AdjustWeight"), - GlyphSlot_Oblique = apiGetFunctionAddress(FREETYPE, "FT_GlyphSlot_Oblique"), - GlyphSlot_Slant = apiGetFunctionAddress(FREETYPE, "FT_GlyphSlot_Slant"), - Sin = apiGetFunctionAddress(FREETYPE, "FT_Sin"), - Cos = apiGetFunctionAddress(FREETYPE, "FT_Cos"), - Tan = apiGetFunctionAddress(FREETYPE, "FT_Tan"), - Atan2 = apiGetFunctionAddress(FREETYPE, "FT_Atan2"), - Angle_Diff = apiGetFunctionAddress(FREETYPE, "FT_Angle_Diff"), - Vector_Unit = apiGetFunctionAddress(FREETYPE, "FT_Vector_Unit"), - Vector_Rotate = apiGetFunctionAddress(FREETYPE, "FT_Vector_Rotate"), - Vector_Length = apiGetFunctionAddress(FREETYPE, "FT_Vector_Length"), - Vector_Polarize = apiGetFunctionAddress(FREETYPE, "FT_Vector_Polarize"), - Vector_From_Polar = apiGetFunctionAddress(FREETYPE, "FT_Vector_From_Polar"), - Has_PS_Glyph_Names = apiGetFunctionAddress(FREETYPE, "FT_Has_PS_Glyph_Names"), - Get_PS_Font_Info = apiGetFunctionAddress(FREETYPE, "FT_Get_PS_Font_Info"), - Get_PS_Font_Private = apiGetFunctionAddress(FREETYPE, "FT_Get_PS_Font_Private"), - Get_PS_Font_Value = apiGetFunctionAddress(FREETYPE, "FT_Get_PS_Font_Value"), - Get_Sfnt_Table = apiGetFunctionAddress(FREETYPE, "FT_Get_Sfnt_Table"), - Load_Sfnt_Table = apiGetFunctionAddress(FREETYPE, "FT_Load_Sfnt_Table"), - Sfnt_Table_Info = apiGetFunctionAddress(FREETYPE, "FT_Sfnt_Table_Info"), - Get_CMap_Language_ID = apiGetFunctionAddress(FREETYPE, "FT_Get_CMap_Language_ID"), - Get_CMap_Format = apiGetFunctionAddress(FREETYPE, "FT_Get_CMap_Format"); - - } - - /** Returns the freetype {@link SharedLibrary}. */ - public static SharedLibrary getLibrary() { - return FREETYPE; - } - - /** - * {@code FT_Encoding} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_ENCODING_NONE ENCODING_NONE}
    • - *
    • {@link #FT_ENCODING_MS_SYMBOL ENCODING_MS_SYMBOL}
    • - *
    • {@link #FT_ENCODING_UNICODE ENCODING_UNICODE}
    • - *
    • {@link #FT_ENCODING_SJIS ENCODING_SJIS}
    • - *
    • {@link #FT_ENCODING_PRC ENCODING_PRC}
    • - *
    • {@link #FT_ENCODING_BIG5 ENCODING_BIG5}
    • - *
    • {@link #FT_ENCODING_WANSUNG ENCODING_WANSUNG}
    • - *
    • {@link #FT_ENCODING_JOHAB ENCODING_JOHAB}
    • - *
    • {@link #FT_ENCODING_GB2312 ENCODING_GB2312} - for backward compatibility
    • - *
    • {@link #FT_ENCODING_MS_SJIS ENCODING_MS_SJIS} - for backward compatibility
    • - *
    • {@link #FT_ENCODING_MS_GB2312 ENCODING_MS_GB2312} - for backward compatibility
    • - *
    • {@link #FT_ENCODING_MS_BIG5 ENCODING_MS_BIG5} - for backward compatibility
    • - *
    • {@link #FT_ENCODING_MS_WANSUNG ENCODING_MS_WANSUNG} - for backward compatibility
    • - *
    • {@link #FT_ENCODING_MS_JOHAB ENCODING_MS_JOHAB} - for backward compatibility
    • - *
    • {@link #FT_ENCODING_ADOBE_STANDARD ENCODING_ADOBE_STANDARD}
    • - *
    • {@link #FT_ENCODING_ADOBE_EXPERT ENCODING_ADOBE_EXPERT}
    • - *
    • {@link #FT_ENCODING_ADOBE_CUSTOM ENCODING_ADOBE_CUSTOM}
    • - *
    • {@link #FT_ENCODING_ADOBE_LATIN_1 ENCODING_ADOBE_LATIN_1}
    • - *
    • {@link #FT_ENCODING_OLD_LATIN_2 ENCODING_OLD_LATIN_2}
    • - *
    • {@link #FT_ENCODING_APPLE_ROMAN ENCODING_APPLE_ROMAN}
    • - *
    - */ - public static final int - FT_ENCODING_NONE = FT_ENC_TAG( 0, 0, 0, 0 ), - FT_ENCODING_MS_SYMBOL = FT_ENC_TAG( 's', 'y', 'm', 'b' ), - FT_ENCODING_UNICODE = FT_ENC_TAG( 'u', 'n', 'i', 'c' ), - FT_ENCODING_SJIS = FT_ENC_TAG( 's', 'j', 'i', 's' ), - FT_ENCODING_PRC = FT_ENC_TAG( 'g', 'b', ' ', ' ' ), - FT_ENCODING_BIG5 = FT_ENC_TAG( 'b', 'i', 'g', '5' ), - FT_ENCODING_WANSUNG = FT_ENC_TAG( 'w', 'a', 'n', 's' ), - FT_ENCODING_JOHAB = FT_ENC_TAG( 'j', 'o', 'h', 'a' ), - FT_ENCODING_GB2312 = FT_ENCODING_PRC, - FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, - FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC, - FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, - FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, - FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, - FT_ENCODING_ADOBE_STANDARD = FT_ENC_TAG( 'A', 'D', 'O', 'B' ), - FT_ENCODING_ADOBE_EXPERT = FT_ENC_TAG( 'A', 'D', 'B', 'E' ), - FT_ENCODING_ADOBE_CUSTOM = FT_ENC_TAG( 'A', 'D', 'B', 'C' ), - FT_ENCODING_ADOBE_LATIN_1 = FT_ENC_TAG( 'l', 'a', 't', '1' ), - FT_ENCODING_OLD_LATIN_2 = FT_ENC_TAG( 'l', 'a', 't', '2' ), - FT_ENCODING_APPLE_ROMAN = FT_ENC_TAG( 'a', 'r', 'm', 'n' ); - - /** - * {@code FT_FACE_FLAG_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_FACE_FLAG_SCALABLE FACE_FLAG_SCALABLE}
    • - *
    • {@link #FT_FACE_FLAG_FIXED_SIZES FACE_FLAG_FIXED_SIZES}
    • - *
    • {@link #FT_FACE_FLAG_FIXED_WIDTH FACE_FLAG_FIXED_WIDTH}
    • - *
    • {@link #FT_FACE_FLAG_SFNT FACE_FLAG_SFNT}
    • - *
    • {@link #FT_FACE_FLAG_HORIZONTAL FACE_FLAG_HORIZONTAL}
    • - *
    • {@link #FT_FACE_FLAG_VERTICAL FACE_FLAG_VERTICAL}
    • - *
    • {@link #FT_FACE_FLAG_KERNING FACE_FLAG_KERNING}
    • - *
    • {@link #FT_FACE_FLAG_FAST_GLYPHS FACE_FLAG_FAST_GLYPHS}
    • - *
    • {@link #FT_FACE_FLAG_MULTIPLE_MASTERS FACE_FLAG_MULTIPLE_MASTERS}
    • - *
    • {@link #FT_FACE_FLAG_GLYPH_NAMES FACE_FLAG_GLYPH_NAMES}
    • - *
    • {@link #FT_FACE_FLAG_EXTERNAL_STREAM FACE_FLAG_EXTERNAL_STREAM}
    • - *
    • {@link #FT_FACE_FLAG_HINTER FACE_FLAG_HINTER}
    • - *
    • {@link #FT_FACE_FLAG_CID_KEYED FACE_FLAG_CID_KEYED}
    • - *
    • {@link #FT_FACE_FLAG_TRICKY FACE_FLAG_TRICKY}
    • - *
    • {@link #FT_FACE_FLAG_COLOR FACE_FLAG_COLOR}
    • - *
    • {@link #FT_FACE_FLAG_VARIATION FACE_FLAG_VARIATION}
    • - *
    • {@link #FT_FACE_FLAG_SVG FACE_FLAG_SVG}
    • - *
    • {@link #FT_FACE_FLAG_SBIX FACE_FLAG_SBIX}
    • - *
    • {@link #FT_FACE_FLAG_SBIX_OVERLAY FACE_FLAG_SBIX_OVERLAY}
    • - *
    - */ - public static final int - FT_FACE_FLAG_SCALABLE = 1 << 0, - FT_FACE_FLAG_FIXED_SIZES = 1 << 1, - FT_FACE_FLAG_FIXED_WIDTH = 1 << 2, - FT_FACE_FLAG_SFNT = 1 << 3, - FT_FACE_FLAG_HORIZONTAL = 1 << 4, - FT_FACE_FLAG_VERTICAL = 1 << 5, - FT_FACE_FLAG_KERNING = 1 << 6, - FT_FACE_FLAG_FAST_GLYPHS = 1 << 7, - FT_FACE_FLAG_MULTIPLE_MASTERS = 1 << 8, - FT_FACE_FLAG_GLYPH_NAMES = 1 << 9, - FT_FACE_FLAG_EXTERNAL_STREAM = 1 << 10, - FT_FACE_FLAG_HINTER = 1 << 11, - FT_FACE_FLAG_CID_KEYED = 1 << 12, - FT_FACE_FLAG_TRICKY = 1 << 13, - FT_FACE_FLAG_COLOR = 1 << 14, - FT_FACE_FLAG_VARIATION = 1 << 15, - FT_FACE_FLAG_SVG = 1 << 16, - FT_FACE_FLAG_SBIX = 1 << 17, - FT_FACE_FLAG_SBIX_OVERLAY = 1 << 18; - - /** - * {@code FT_STYLE_FLAG_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_STYLE_FLAG_ITALIC STYLE_FLAG_ITALIC}
    • - *
    • {@link #FT_STYLE_FLAG_BOLD STYLE_FLAG_BOLD}
    • - *
    - */ - public static final int - FT_STYLE_FLAG_ITALIC = 1 << 0, - FT_STYLE_FLAG_BOLD = 1 << 1; - - /** - * {@code FT_FFT_OPEN_XXXACE_FLAG_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_OPEN_MEMORY OPEN_MEMORY}
    • - *
    • {@link #FT_OPEN_STREAM OPEN_STREAM}
    • - *
    • {@link #FT_OPEN_PATHNAME OPEN_PATHNAME}
    • - *
    • {@link #FT_OPEN_DRIVER OPEN_DRIVER}
    • - *
    • {@link #FT_OPEN_PARAMS OPEN_PARAMS}
    • - *
    - */ - public static final int - FT_OPEN_MEMORY = 0x1, - FT_OPEN_STREAM = 0x2, - FT_OPEN_PATHNAME = 0x4, - FT_OPEN_DRIVER = 0x8, - FT_OPEN_PARAMS = 0x10; - - /** - * {@code FT_Size_Request_Type} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_SIZE_REQUEST_TYPE_NOMINAL SIZE_REQUEST_TYPE_NOMINAL}
    • - *
    • {@link #FT_SIZE_REQUEST_TYPE_REAL_DIM SIZE_REQUEST_TYPE_REAL_DIM}
    • - *
    • {@link #FT_SIZE_REQUEST_TYPE_BBOX SIZE_REQUEST_TYPE_BBOX}
    • - *
    • {@link #FT_SIZE_REQUEST_TYPE_CELL SIZE_REQUEST_TYPE_CELL}
    • - *
    • {@link #FT_SIZE_REQUEST_TYPE_SCALES SIZE_REQUEST_TYPE_SCALES}
    • - *
    • {@link #FT_SIZE_REQUEST_TYPE_MAX SIZE_REQUEST_TYPE_MAX}
    • - *
    - */ - public static final int - FT_SIZE_REQUEST_TYPE_NOMINAL = 0, - FT_SIZE_REQUEST_TYPE_REAL_DIM = 1, - FT_SIZE_REQUEST_TYPE_BBOX = 2, - FT_SIZE_REQUEST_TYPE_CELL = 3, - FT_SIZE_REQUEST_TYPE_SCALES = 4, - FT_SIZE_REQUEST_TYPE_MAX = 5; - - /** - * {@code FT_LOAD_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_LOAD_DEFAULT LOAD_DEFAULT}
    • - *
    • {@link #FT_LOAD_NO_SCALE LOAD_NO_SCALE}
    • - *
    • {@link #FT_LOAD_NO_HINTING LOAD_NO_HINTING}
    • - *
    • {@link #FT_LOAD_RENDER LOAD_RENDER}
    • - *
    • {@link #FT_LOAD_NO_BITMAP LOAD_NO_BITMAP}
    • - *
    • {@link #FT_LOAD_VERTICAL_LAYOUT LOAD_VERTICAL_LAYOUT}
    • - *
    • {@link #FT_LOAD_FORCE_AUTOHINT LOAD_FORCE_AUTOHINT}
    • - *
    • {@link #FT_LOAD_CROP_BITMAP LOAD_CROP_BITMAP}
    • - *
    • {@link #FT_LOAD_PEDANTIC LOAD_PEDANTIC}
    • - *
    • {@link #FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH}
    • - *
    • {@link #FT_LOAD_NO_RECURSE LOAD_NO_RECURSE}
    • - *
    • {@link #FT_LOAD_IGNORE_TRANSFORM LOAD_IGNORE_TRANSFORM}
    • - *
    • {@link #FT_LOAD_MONOCHROME LOAD_MONOCHROME}
    • - *
    • {@link #FT_LOAD_LINEAR_DESIGN LOAD_LINEAR_DESIGN}
    • - *
    • {@link #FT_LOAD_SBITS_ONLY LOAD_SBITS_ONLY}
    • - *
    • {@link #FT_LOAD_NO_AUTOHINT LOAD_NO_AUTOHINT}
    • - *
    • {@link #FT_LOAD_COLOR LOAD_COLOR}
    • - *
    • {@link #FT_LOAD_COMPUTE_METRICS LOAD_COMPUTE_METRICS}
    • - *
    • {@link #FT_LOAD_BITMAP_METRICS_ONLY LOAD_BITMAP_METRICS_ONLY}
    • - *
    • {@link #FT_LOAD_NO_SVG LOAD_NO_SVG}
    • - *
    • {@link #FT_LOAD_ADVANCE_ONLY LOAD_ADVANCE_ONLY}
    • - *
    • {@link #FT_LOAD_SVG_ONLY LOAD_SVG_ONLY}
    • - *
    - */ - public static final int - FT_LOAD_DEFAULT = 0x0, - FT_LOAD_NO_SCALE = 1 << 0, - FT_LOAD_NO_HINTING = 1 << 1, - FT_LOAD_RENDER = 1 << 2, - FT_LOAD_NO_BITMAP = 1 << 3, - FT_LOAD_VERTICAL_LAYOUT = 1 << 4, - FT_LOAD_FORCE_AUTOHINT = 1 << 5, - FT_LOAD_CROP_BITMAP = 1 << 6, - FT_LOAD_PEDANTIC = 1 << 7, - FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH = 1 << 9, - FT_LOAD_NO_RECURSE = 1 << 10, - FT_LOAD_IGNORE_TRANSFORM = 1 << 11, - FT_LOAD_MONOCHROME = 1 << 12, - FT_LOAD_LINEAR_DESIGN = 1 << 13, - FT_LOAD_SBITS_ONLY = 1 << 14, - FT_LOAD_NO_AUTOHINT = 1 << 15, - FT_LOAD_COLOR = 1 << 20, - FT_LOAD_COMPUTE_METRICS = 1 << 21, - FT_LOAD_BITMAP_METRICS_ONLY = 1 << 22, - FT_LOAD_NO_SVG = 1 << 24, - FT_LOAD_ADVANCE_ONLY = 1 << 8, - FT_LOAD_SVG_ONLY = 1 << 23; - - /** - * {@code FT_Render_Mode} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_RENDER_MODE_NORMAL RENDER_MODE_NORMAL}
    • - *
    • {@link #FT_RENDER_MODE_LIGHT RENDER_MODE_LIGHT}
    • - *
    • {@link #FT_RENDER_MODE_MONO RENDER_MODE_MONO}
    • - *
    • {@link #FT_RENDER_MODE_LCD RENDER_MODE_LCD}
    • - *
    • {@link #FT_RENDER_MODE_LCD_V RENDER_MODE_LCD_V}
    • - *
    • {@link #FT_RENDER_MODE_SDF RENDER_MODE_SDF}
    • - *
    • {@link #FT_RENDER_MODE_MAX RENDER_MODE_MAX}
    • - *
    - */ - public static final int - FT_RENDER_MODE_NORMAL = 0, - FT_RENDER_MODE_LIGHT = 1, - FT_RENDER_MODE_MONO = 2, - FT_RENDER_MODE_LCD = 3, - FT_RENDER_MODE_LCD_V = 4, - FT_RENDER_MODE_SDF = 5, - FT_RENDER_MODE_MAX = 6; - - /** - * {@code FT_LOAD_TARGET_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_NORMAL}
    • - *
    • {@link #FT_FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_LIGHT}
    • - *
    • {@link #FT_FT_LOAD_TARGET_MONO FT_LOAD_TARGET_MONO}
    • - *
    • {@link #FT_FT_LOAD_TARGET_LCD FT_LOAD_TARGET_LCD}
    • - *
    • {@link #FT_FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_LCD_V}
    • - *
    - */ - public static final int - FT_FT_LOAD_TARGET_NORMAL = FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ), - FT_FT_LOAD_TARGET_LIGHT = FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ), - FT_FT_LOAD_TARGET_MONO = FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ), - FT_FT_LOAD_TARGET_LCD = FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ), - FT_FT_LOAD_TARGET_LCD_V = FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ); - - /** - * {@code FT_Kerning_Mode} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_KERNING_DEFAULT KERNING_DEFAULT}
    • - *
    • {@link #FT_KERNING_UNFITTED KERNING_UNFITTED}
    • - *
    • {@link #FT_KERNING_UNSCALED KERNING_UNSCALED}
    • - *
    - */ - public static final int - FT_KERNING_DEFAULT = 0, - FT_KERNING_UNFITTED = 1, - FT_KERNING_UNSCALED = 2; - - /** - * {@code FT_SUBGLYPH_FLAG_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS SUBGLYPH_FLAG_ARGS_ARE_WORDS}
    • - *
    • {@link #FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES}
    • - *
    • {@link #FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID SUBGLYPH_FLAG_ROUND_XY_TO_GRID}
    • - *
    • {@link #FT_SUBGLYPH_FLAG_SCALE SUBGLYPH_FLAG_SCALE}
    • - *
    • {@link #FT_SUBGLYPH_FLAG_XY_SCALE SUBGLYPH_FLAG_XY_SCALE}
    • - *
    • {@link #FT_SUBGLYPH_FLAG_2X2 SUBGLYPH_FLAG_2X2}
    • - *
    • {@link #FT_SUBGLYPH_FLAG_USE_MY_METRICS SUBGLYPH_FLAG_USE_MY_METRICS}
    • - *
    - */ - public static final int - FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1, - FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2, - FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4, - FT_SUBGLYPH_FLAG_SCALE = 8, - FT_SUBGLYPH_FLAG_XY_SCALE = 0x40, - FT_SUBGLYPH_FLAG_2X2 = 0x80, - FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200; - - /** - * {@code FT_FSTYPE_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_FSTYPE_INSTALLABLE_EMBEDDING FSTYPE_INSTALLABLE_EMBEDDING}
    • - *
    • {@link #FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING FSTYPE_RESTRICTED_LICENSE_EMBEDDING}
    • - *
    • {@link #FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING FSTYPE_PREVIEW_AND_PRINT_EMBEDDING}
    • - *
    • {@link #FT_FSTYPE_EDITABLE_EMBEDDING FSTYPE_EDITABLE_EMBEDDING}
    • - *
    • {@link #FT_FSTYPE_NO_SUBSETTING FSTYPE_NO_SUBSETTING}
    • - *
    • {@link #FT_FSTYPE_BITMAP_EMBEDDING_ONLY FSTYPE_BITMAP_EMBEDDING_ONLY}
    • - *
    - */ - public static final int - FT_FSTYPE_INSTALLABLE_EMBEDDING = 0x0000, - FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING = 0x0002, - FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING = 0x0004, - FT_FSTYPE_EDITABLE_EMBEDDING = 0x0008, - FT_FSTYPE_NO_SUBSETTING = 0x0100, - FT_FSTYPE_BITMAP_EMBEDDING_ONLY = 0x0200; - - public static final int FREETYPE_MAJOR = 2; - - public static final int FREETYPE_MINOR = 13; - - public static final int FREETYPE_PATCH = 2; - - public static final int FT_ADVANCE_FLAG_FAST_ONLY = 0x20000000; - - /** - * {@code BDF_PropertyType} - * - *
    Enum values:
    - * - *
      - *
    • {@link #BDF_PROPERTY_TYPE_NONE BDF_PROPERTY_TYPE_NONE}
    • - *
    • {@link #BDF_PROPERTY_TYPE_ATOM BDF_PROPERTY_TYPE_ATOM}
    • - *
    • {@link #BDF_PROPERTY_TYPE_INTEGER BDF_PROPERTY_TYPE_INTEGER}
    • - *
    • {@link #BDF_PROPERTY_TYPE_CARDINAL BDF_PROPERTY_TYPE_CARDINAL}
    • - *
    - */ - public static final int - BDF_PROPERTY_TYPE_NONE = 0, - BDF_PROPERTY_TYPE_ATOM = 1, - BDF_PROPERTY_TYPE_INTEGER = 2, - BDF_PROPERTY_TYPE_CARDINAL = 3; - - /** - * {@code FT_PALETTE_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_PALETTE_FOR_LIGHT_BACKGROUND PALETTE_FOR_LIGHT_BACKGROUND}
    • - *
    • {@link #FT_PALETTE_FOR_DARK_BACKGROUND PALETTE_FOR_DARK_BACKGROUND}
    • - *
    - */ - public static final int - FT_PALETTE_FOR_LIGHT_BACKGROUND = 0x01, - FT_PALETTE_FOR_DARK_BACKGROUND = 0x02; - - /** - * {@code FT_PaintFormat} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_COLR_PAINTFORMAT_COLR_LAYERS COLR_PAINTFORMAT_COLR_LAYERS}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_SOLID COLR_PAINTFORMAT_SOLID}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_LINEAR_GRADIENT COLR_PAINTFORMAT_LINEAR_GRADIENT}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_RADIAL_GRADIENT COLR_PAINTFORMAT_RADIAL_GRADIENT}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_SWEEP_GRADIENT COLR_PAINTFORMAT_SWEEP_GRADIENT}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_GLYPH COLR_PAINTFORMAT_GLYPH}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_COLR_GLYPH COLR_PAINTFORMAT_COLR_GLYPH}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_TRANSFORM COLR_PAINTFORMAT_TRANSFORM}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_TRANSLATE COLR_PAINTFORMAT_TRANSLATE}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_SCALE COLR_PAINTFORMAT_SCALE}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_ROTATE COLR_PAINTFORMAT_ROTATE}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_SKEW COLR_PAINTFORMAT_SKEW}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_COMPOSITE COLR_PAINTFORMAT_COMPOSITE}
    • - *
    • {@link #FT_COLR_PAINT_FORMAT_MAX COLR_PAINT_FORMAT_MAX}
    • - *
    • {@link #FT_COLR_PAINTFORMAT_UNSUPPORTED COLR_PAINTFORMAT_UNSUPPORTED}
    • - *
    - */ - public static final int - FT_COLR_PAINTFORMAT_COLR_LAYERS = 1, - FT_COLR_PAINTFORMAT_SOLID = 2, - FT_COLR_PAINTFORMAT_LINEAR_GRADIENT = 4, - FT_COLR_PAINTFORMAT_RADIAL_GRADIENT = 6, - FT_COLR_PAINTFORMAT_SWEEP_GRADIENT = 8, - FT_COLR_PAINTFORMAT_GLYPH = 10, - FT_COLR_PAINTFORMAT_COLR_GLYPH = 11, - FT_COLR_PAINTFORMAT_TRANSFORM = 12, - FT_COLR_PAINTFORMAT_TRANSLATE = 14, - FT_COLR_PAINTFORMAT_SCALE = 16, - FT_COLR_PAINTFORMAT_ROTATE = 24, - FT_COLR_PAINTFORMAT_SKEW = 28, - FT_COLR_PAINTFORMAT_COMPOSITE = 32, - FT_COLR_PAINT_FORMAT_MAX = 33, - FT_COLR_PAINTFORMAT_UNSUPPORTED = 255; - - /** - * {@code FT_PaintExtend} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_COLR_PAINT_EXTEND_PAD COLR_PAINT_EXTEND_PAD}
    • - *
    • {@link #FT_COLR_PAINT_EXTEND_REPEAT COLR_PAINT_EXTEND_REPEAT}
    • - *
    • {@link #FT_COLR_PAINT_EXTEND_REFLECT COLR_PAINT_EXTEND_REFLECT}
    • - *
    - */ - public static final int - FT_COLR_PAINT_EXTEND_PAD = 0, - FT_COLR_PAINT_EXTEND_REPEAT = 1, - FT_COLR_PAINT_EXTEND_REFLECT = 2; - - /** - * {@code FT_Composite_Mode} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_COLR_COMPOSITE_CLEAR COLR_COMPOSITE_CLEAR}
    • - *
    • {@link #FT_COLR_COMPOSITE_SRC COLR_COMPOSITE_SRC}
    • - *
    • {@link #FT_COLR_COMPOSITE_DEST COLR_COMPOSITE_DEST}
    • - *
    • {@link #FT_COLR_COMPOSITE_SRC_OVER COLR_COMPOSITE_SRC_OVER}
    • - *
    • {@link #FT_COLR_COMPOSITE_DEST_OVER COLR_COMPOSITE_DEST_OVER}
    • - *
    • {@link #FT_COLR_COMPOSITE_SRC_IN COLR_COMPOSITE_SRC_IN}
    • - *
    • {@link #FT_COLR_COMPOSITE_DEST_IN COLR_COMPOSITE_DEST_IN}
    • - *
    • {@link #FT_COLR_COMPOSITE_SRC_OUT COLR_COMPOSITE_SRC_OUT}
    • - *
    • {@link #FT_COLR_COMPOSITE_DEST_OUT COLR_COMPOSITE_DEST_OUT}
    • - *
    • {@link #FT_COLR_COMPOSITE_SRC_ATOP COLR_COMPOSITE_SRC_ATOP}
    • - *
    • {@link #FT_COLR_COMPOSITE_DEST_ATOP COLR_COMPOSITE_DEST_ATOP}
    • - *
    • {@link #FT_COLR_COMPOSITE_XOR COLR_COMPOSITE_XOR}
    • - *
    • {@link #FT_COLR_COMPOSITE_PLUS COLR_COMPOSITE_PLUS}
    • - *
    • {@link #FT_COLR_COMPOSITE_SCREEN COLR_COMPOSITE_SCREEN}
    • - *
    • {@link #FT_COLR_COMPOSITE_OVERLAY COLR_COMPOSITE_OVERLAY}
    • - *
    • {@link #FT_COLR_COMPOSITE_DARKEN COLR_COMPOSITE_DARKEN}
    • - *
    • {@link #FT_COLR_COMPOSITE_LIGHTEN COLR_COMPOSITE_LIGHTEN}
    • - *
    • {@link #FT_COLR_COMPOSITE_COLOR_DODGE COLR_COMPOSITE_COLOR_DODGE}
    • - *
    • {@link #FT_COLR_COMPOSITE_COLOR_BURN COLR_COMPOSITE_COLOR_BURN}
    • - *
    • {@link #FT_COLR_COMPOSITE_HARD_LIGHT COLR_COMPOSITE_HARD_LIGHT}
    • - *
    • {@link #FT_COLR_COMPOSITE_SOFT_LIGHT COLR_COMPOSITE_SOFT_LIGHT}
    • - *
    • {@link #FT_COLR_COMPOSITE_DIFFERENCE COLR_COMPOSITE_DIFFERENCE}
    • - *
    • {@link #FT_COLR_COMPOSITE_EXCLUSION COLR_COMPOSITE_EXCLUSION}
    • - *
    • {@link #FT_COLR_COMPOSITE_MULTIPLY COLR_COMPOSITE_MULTIPLY}
    • - *
    • {@link #FT_COLR_COMPOSITE_HSL_HUE COLR_COMPOSITE_HSL_HUE}
    • - *
    • {@link #FT_COLR_COMPOSITE_HSL_SATURATION COLR_COMPOSITE_HSL_SATURATION}
    • - *
    • {@link #FT_COLR_COMPOSITE_HSL_COLOR COLR_COMPOSITE_HSL_COLOR}
    • - *
    • {@link #FT_COLR_COMPOSITE_HSL_LUMINOSITY COLR_COMPOSITE_HSL_LUMINOSITY}
    • - *
    • {@link #FT_COLR_COMPOSITE_MAX COLR_COMPOSITE_MAX}
    • - *
    - */ - public static final int - FT_COLR_COMPOSITE_CLEAR = 0, - FT_COLR_COMPOSITE_SRC = 1, - FT_COLR_COMPOSITE_DEST = 2, - FT_COLR_COMPOSITE_SRC_OVER = 3, - FT_COLR_COMPOSITE_DEST_OVER = 4, - FT_COLR_COMPOSITE_SRC_IN = 5, - FT_COLR_COMPOSITE_DEST_IN = 6, - FT_COLR_COMPOSITE_SRC_OUT = 7, - FT_COLR_COMPOSITE_DEST_OUT = 8, - FT_COLR_COMPOSITE_SRC_ATOP = 9, - FT_COLR_COMPOSITE_DEST_ATOP = 10, - FT_COLR_COMPOSITE_XOR = 11, - FT_COLR_COMPOSITE_PLUS = 12, - FT_COLR_COMPOSITE_SCREEN = 13, - FT_COLR_COMPOSITE_OVERLAY = 14, - FT_COLR_COMPOSITE_DARKEN = 15, - FT_COLR_COMPOSITE_LIGHTEN = 16, - FT_COLR_COMPOSITE_COLOR_DODGE = 17, - FT_COLR_COMPOSITE_COLOR_BURN = 18, - FT_COLR_COMPOSITE_HARD_LIGHT = 19, - FT_COLR_COMPOSITE_SOFT_LIGHT = 20, - FT_COLR_COMPOSITE_DIFFERENCE = 21, - FT_COLR_COMPOSITE_EXCLUSION = 22, - FT_COLR_COMPOSITE_MULTIPLY = 23, - FT_COLR_COMPOSITE_HSL_HUE = 24, - FT_COLR_COMPOSITE_HSL_SATURATION = 25, - FT_COLR_COMPOSITE_HSL_COLOR = 26, - FT_COLR_COMPOSITE_HSL_LUMINOSITY = 27, - FT_COLR_COMPOSITE_MAX = 28; - - /** - * {@code FT_Color_Root_Transform} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_COLOR_INCLUDE_ROOT_TRANSFORM COLOR_INCLUDE_ROOT_TRANSFORM}
    • - *
    • {@link #FT_COLOR_NO_ROOT_TRANSFORM COLOR_NO_ROOT_TRANSFORM}
    • - *
    • {@link #FT_COLOR_ROOT_TRANSFORM_MAX COLOR_ROOT_TRANSFORM_MAX}
    • - *
    - */ - public static final int - FT_COLOR_INCLUDE_ROOT_TRANSFORM = 0, - FT_COLOR_NO_ROOT_TRANSFORM = 1, - FT_COLOR_ROOT_TRANSFORM_MAX = 2; - - /** - * {@code FT_HINTING_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_HINTING_FREETYPE HINTING_FREETYPE}
    • - *
    • {@link #FT_HINTING_ADOBE HINTING_ADOBE}
    • - *
    - */ - public static final int - FT_HINTING_FREETYPE = 0, - FT_HINTING_ADOBE = 1; - - public static final int TT_INTERPRETER_VERSION_35 = 35; - - public static final int TT_INTERPRETER_VERSION_38 = 38; - - public static final int TT_INTERPRETER_VERSION_40 = 40; - - /** - * {@code FT_AUTOHINTER_SCRIPT_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_AUTOHINTER_SCRIPT_NONE AUTOHINTER_SCRIPT_NONE}
    • - *
    • {@link #FT_AUTOHINTER_SCRIPT_LATIN AUTOHINTER_SCRIPT_LATIN}
    • - *
    • {@link #FT_AUTOHINTER_SCRIPT_CJK AUTOHINTER_SCRIPT_CJK}
    • - *
    • {@link #FT_AUTOHINTER_SCRIPT_INDIC AUTOHINTER_SCRIPT_INDIC}
    • - *
    - */ - public static final int - FT_AUTOHINTER_SCRIPT_NONE = 0, - FT_AUTOHINTER_SCRIPT_LATIN = 1, - FT_AUTOHINTER_SCRIPT_CJK = 2, - FT_AUTOHINTER_SCRIPT_INDIC = 3; - - /** - * {@code FT_Err_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_Err_Ok Err_Ok}
    • - *
    • {@link #FT_Err_Cannot_Open_Resource Err_Cannot_Open_Resource}
    • - *
    • {@link #FT_Err_Unknown_File_Format Err_Unknown_File_Format}
    • - *
    • {@link #FT_Err_Invalid_File_Format Err_Invalid_File_Format}
    • - *
    • {@link #FT_Err_Invalid_Version Err_Invalid_Version}
    • - *
    • {@link #FT_Err_Lower_Module_Version Err_Lower_Module_Version}
    • - *
    • {@link #FT_Err_Invalid_Argument Err_Invalid_Argument}
    • - *
    • {@link #FT_Err_Unimplemented_Feature Err_Unimplemented_Feature}
    • - *
    • {@link #FT_Err_Invalid_Table Err_Invalid_Table}
    • - *
    • {@link #FT_Err_Invalid_Offset Err_Invalid_Offset}
    • - *
    • {@link #FT_Err_Array_Too_Large Err_Array_Too_Large}
    • - *
    • {@link #FT_Err_Missing_Module Err_Missing_Module}
    • - *
    • {@link #FT_Err_Missing_Property Err_Missing_Property}
    • - *
    • {@link #FT_Err_Invalid_Glyph_Index Err_Invalid_Glyph_Index}
    • - *
    • {@link #FT_Err_Invalid_Character_Code Err_Invalid_Character_Code}
    • - *
    • {@link #FT_Err_Invalid_Glyph_Format Err_Invalid_Glyph_Format}
    • - *
    • {@link #FT_Err_Cannot_Render_Glyph Err_Cannot_Render_Glyph}
    • - *
    • {@link #FT_Err_Invalid_Outline Err_Invalid_Outline}
    • - *
    • {@link #FT_Err_Invalid_Composite Err_Invalid_Composite}
    • - *
    • {@link #FT_Err_Too_Many_Hints Err_Too_Many_Hints}
    • - *
    • {@link #FT_Err_Invalid_Pixel_Size Err_Invalid_Pixel_Size}
    • - *
    • {@link #FT_Err_Invalid_SVG_Document Err_Invalid_SVG_Document}
    • - *
    • {@link #FT_Err_Invalid_Handle Err_Invalid_Handle}
    • - *
    • {@link #FT_Err_Invalid_Library_Handle Err_Invalid_Library_Handle}
    • - *
    • {@link #FT_Err_Invalid_Driver_Handle Err_Invalid_Driver_Handle}
    • - *
    • {@link #FT_Err_Invalid_Face_Handle Err_Invalid_Face_Handle}
    • - *
    • {@link #FT_Err_Invalid_Size_Handle Err_Invalid_Size_Handle}
    • - *
    • {@link #FT_Err_Invalid_Slot_Handle Err_Invalid_Slot_Handle}
    • - *
    • {@link #FT_Err_Invalid_CharMap_Handle Err_Invalid_CharMap_Handle}
    • - *
    • {@link #FT_Err_Invalid_Cache_Handle Err_Invalid_Cache_Handle}
    • - *
    • {@link #FT_Err_Invalid_Stream_Handle Err_Invalid_Stream_Handle}
    • - *
    • {@link #FT_Err_Too_Many_Drivers Err_Too_Many_Drivers}
    • - *
    • {@link #FT_Err_Too_Many_Extensions Err_Too_Many_Extensions}
    • - *
    • {@link #FT_Err_Out_Of_Memory Err_Out_Of_Memory}
    • - *
    • {@link #FT_Err_Unlisted_Object Err_Unlisted_Object}
    • - *
    • {@link #FT_Err_Cannot_Open_Stream Err_Cannot_Open_Stream}
    • - *
    • {@link #FT_Err_Invalid_Stream_Seek Err_Invalid_Stream_Seek}
    • - *
    • {@link #FT_Err_Invalid_Stream_Skip Err_Invalid_Stream_Skip}
    • - *
    • {@link #FT_Err_Invalid_Stream_Read Err_Invalid_Stream_Read}
    • - *
    • {@link #FT_Err_Invalid_Stream_Operation Err_Invalid_Stream_Operation}
    • - *
    • {@link #FT_Err_Invalid_Frame_Operation Err_Invalid_Frame_Operation}
    • - *
    • {@link #FT_Err_Nested_Frame_Access Err_Nested_Frame_Access}
    • - *
    • {@link #FT_Err_Invalid_Frame_Read Err_Invalid_Frame_Read}
    • - *
    • {@link #FT_Err_Raster_Uninitialized Err_Raster_Uninitialized}
    • - *
    • {@link #FT_Err_Raster_Corrupted Err_Raster_Corrupted}
    • - *
    • {@link #FT_Err_Raster_Overflow Err_Raster_Overflow}
    • - *
    • {@link #FT_Err_Raster_Negative_Height Err_Raster_Negative_Height}
    • - *
    • {@link #FT_Err_Too_Many_Caches Err_Too_Many_Caches}
    • - *
    • {@link #FT_Err_Invalid_Opcode Err_Invalid_Opcode}
    • - *
    • {@link #FT_Err_Too_Few_Arguments Err_Too_Few_Arguments}
    • - *
    • {@link #FT_Err_Stack_Overflow Err_Stack_Overflow}
    • - *
    • {@link #FT_Err_Code_Overflow Err_Code_Overflow}
    • - *
    • {@link #FT_Err_Bad_Argument Err_Bad_Argument}
    • - *
    • {@link #FT_Err_Divide_By_Zero Err_Divide_By_Zero}
    • - *
    • {@link #FT_Err_Invalid_Reference Err_Invalid_Reference}
    • - *
    • {@link #FT_Err_Debug_OpCode Err_Debug_OpCode}
    • - *
    • {@link #FT_Err_ENDF_In_Exec_Stream Err_ENDF_In_Exec_Stream}
    • - *
    • {@link #FT_Err_Nested_DEFS Err_Nested_DEFS}
    • - *
    • {@link #FT_Err_Invalid_CodeRange Err_Invalid_CodeRange}
    • - *
    • {@link #FT_Err_Execution_Too_Long Err_Execution_Too_Long}
    • - *
    • {@link #FT_Err_Too_Many_Function_Defs Err_Too_Many_Function_Defs}
    • - *
    • {@link #FT_Err_Too_Many_Instruction_Defs Err_Too_Many_Instruction_Defs}
    • - *
    • {@link #FT_Err_Table_Missing Err_Table_Missing}
    • - *
    • {@link #FT_Err_Horiz_Header_Missing Err_Horiz_Header_Missing}
    • - *
    • {@link #FT_Err_Locations_Missing Err_Locations_Missing}
    • - *
    • {@link #FT_Err_Name_Table_Missing Err_Name_Table_Missing}
    • - *
    • {@link #FT_Err_CMap_Table_Missing Err_CMap_Table_Missing}
    • - *
    • {@link #FT_Err_Hmtx_Table_Missing Err_Hmtx_Table_Missing}
    • - *
    • {@link #FT_Err_Post_Table_Missing Err_Post_Table_Missing}
    • - *
    • {@link #FT_Err_Invalid_Horiz_Metrics Err_Invalid_Horiz_Metrics}
    • - *
    • {@link #FT_Err_Invalid_CharMap_Format Err_Invalid_CharMap_Format}
    • - *
    • {@link #FT_Err_Invalid_PPem Err_Invalid_PPem}
    • - *
    • {@link #FT_Err_Invalid_Vert_Metrics Err_Invalid_Vert_Metrics}
    • - *
    • {@link #FT_Err_Could_Not_Find_Context Err_Could_Not_Find_Context}
    • - *
    • {@link #FT_Err_Invalid_Post_Table_Format Err_Invalid_Post_Table_Format}
    • - *
    • {@link #FT_Err_Invalid_Post_Table Err_Invalid_Post_Table}
    • - *
    • {@link #FT_Err_DEF_In_Glyf_Bytecode Err_DEF_In_Glyf_Bytecode}
    • - *
    • {@link #FT_Err_Missing_Bitmap Err_Missing_Bitmap}
    • - *
    • {@link #FT_Err_Missing_SVG_Hooks Err_Missing_SVG_Hooks}
    • - *
    • {@link #FT_Err_Syntax_Error Err_Syntax_Error}
    • - *
    • {@link #FT_Err_Stack_Underflow Err_Stack_Underflow}
    • - *
    • {@link #FT_Err_Ignore Err_Ignore}
    • - *
    • {@link #FT_Err_No_Unicode_Glyph_Name Err_No_Unicode_Glyph_Name}
    • - *
    • {@link #FT_Err_Glyph_Too_Big Err_Glyph_Too_Big}
    • - *
    • {@link #FT_Err_Missing_Startfont_Field Err_Missing_Startfont_Field}
    • - *
    • {@link #FT_Err_Missing_Font_Field Err_Missing_Font_Field}
    • - *
    • {@link #FT_Err_Missing_Size_Field Err_Missing_Size_Field}
    • - *
    • {@link #FT_Err_Missing_Fontboundingbox_Field Err_Missing_Fontboundingbox_Field}
    • - *
    • {@link #FT_Err_Missing_Chars_Field Err_Missing_Chars_Field}
    • - *
    • {@link #FT_Err_Missing_Startchar_Field Err_Missing_Startchar_Field}
    • - *
    • {@link #FT_Err_Missing_Encoding_Field Err_Missing_Encoding_Field}
    • - *
    • {@link #FT_Err_Missing_Bbx_Field Err_Missing_Bbx_Field}
    • - *
    • {@link #FT_Err_Bbx_Too_Big Err_Bbx_Too_Big}
    • - *
    • {@link #FT_Err_Corrupted_Font_Header Err_Corrupted_Font_Header}
    • - *
    • {@link #FT_Err_Corrupted_Font_Glyphs Err_Corrupted_Font_Glyphs}
    • - *
    • {@link #FT_Err_Max Err_Max}
    • - *
    - */ - public static final int - FT_Err_Ok = 0x00, - FT_Err_Cannot_Open_Resource = 0x01, - FT_Err_Unknown_File_Format = 0x02, - FT_Err_Invalid_File_Format = 0x03, - FT_Err_Invalid_Version = 0x04, - FT_Err_Lower_Module_Version = 0x05, - FT_Err_Invalid_Argument = 0x06, - FT_Err_Unimplemented_Feature = 0x07, - FT_Err_Invalid_Table = 0x08, - FT_Err_Invalid_Offset = 0x09, - FT_Err_Array_Too_Large = 0x0A, - FT_Err_Missing_Module = 0x0B, - FT_Err_Missing_Property = 0x0C, - FT_Err_Invalid_Glyph_Index = 0x10, - FT_Err_Invalid_Character_Code = 0x11, - FT_Err_Invalid_Glyph_Format = 0x12, - FT_Err_Cannot_Render_Glyph = 0x13, - FT_Err_Invalid_Outline = 0x14, - FT_Err_Invalid_Composite = 0x15, - FT_Err_Too_Many_Hints = 0x16, - FT_Err_Invalid_Pixel_Size = 0x17, - FT_Err_Invalid_SVG_Document = 0x18, - FT_Err_Invalid_Handle = 0x20, - FT_Err_Invalid_Library_Handle = 0x21, - FT_Err_Invalid_Driver_Handle = 0x22, - FT_Err_Invalid_Face_Handle = 0x23, - FT_Err_Invalid_Size_Handle = 0x24, - FT_Err_Invalid_Slot_Handle = 0x25, - FT_Err_Invalid_CharMap_Handle = 0x26, - FT_Err_Invalid_Cache_Handle = 0x27, - FT_Err_Invalid_Stream_Handle = 0x28, - FT_Err_Too_Many_Drivers = 0x30, - FT_Err_Too_Many_Extensions = 0x31, - FT_Err_Out_Of_Memory = 0x40, - FT_Err_Unlisted_Object = 0x41, - FT_Err_Cannot_Open_Stream = 0x51, - FT_Err_Invalid_Stream_Seek = 0x52, - FT_Err_Invalid_Stream_Skip = 0x53, - FT_Err_Invalid_Stream_Read = 0x54, - FT_Err_Invalid_Stream_Operation = 0x55, - FT_Err_Invalid_Frame_Operation = 0x56, - FT_Err_Nested_Frame_Access = 0x57, - FT_Err_Invalid_Frame_Read = 0x58, - FT_Err_Raster_Uninitialized = 0x60, - FT_Err_Raster_Corrupted = 0x61, - FT_Err_Raster_Overflow = 0x62, - FT_Err_Raster_Negative_Height = 0x63, - FT_Err_Too_Many_Caches = 0x70, - FT_Err_Invalid_Opcode = 0x80, - FT_Err_Too_Few_Arguments = 0x81, - FT_Err_Stack_Overflow = 0x82, - FT_Err_Code_Overflow = 0x83, - FT_Err_Bad_Argument = 0x84, - FT_Err_Divide_By_Zero = 0x85, - FT_Err_Invalid_Reference = 0x86, - FT_Err_Debug_OpCode = 0x87, - FT_Err_ENDF_In_Exec_Stream = 0x88, - FT_Err_Nested_DEFS = 0x89, - FT_Err_Invalid_CodeRange = 0x8A, - FT_Err_Execution_Too_Long = 0x8B, - FT_Err_Too_Many_Function_Defs = 0x8C, - FT_Err_Too_Many_Instruction_Defs = 0x8D, - FT_Err_Table_Missing = 0x8E, - FT_Err_Horiz_Header_Missing = 0x8F, - FT_Err_Locations_Missing = 0x90, - FT_Err_Name_Table_Missing = 0x91, - FT_Err_CMap_Table_Missing = 0x92, - FT_Err_Hmtx_Table_Missing = 0x93, - FT_Err_Post_Table_Missing = 0x94, - FT_Err_Invalid_Horiz_Metrics = 0x95, - FT_Err_Invalid_CharMap_Format = 0x96, - FT_Err_Invalid_PPem = 0x97, - FT_Err_Invalid_Vert_Metrics = 0x98, - FT_Err_Could_Not_Find_Context = 0x99, - FT_Err_Invalid_Post_Table_Format = 0x9A, - FT_Err_Invalid_Post_Table = 0x9B, - FT_Err_DEF_In_Glyf_Bytecode = 0x9C, - FT_Err_Missing_Bitmap = 0x9D, - FT_Err_Missing_SVG_Hooks = 0x9E, - FT_Err_Syntax_Error = 0xA0, - FT_Err_Stack_Underflow = 0xA1, - FT_Err_Ignore = 0xA2, - FT_Err_No_Unicode_Glyph_Name = 0xA3, - FT_Err_Glyph_Too_Big = 0xA4, - FT_Err_Missing_Startfont_Field = 0xB0, - FT_Err_Missing_Font_Field = 0xB1, - FT_Err_Missing_Size_Field = 0xB2, - FT_Err_Missing_Fontboundingbox_Field = 0xB3, - FT_Err_Missing_Chars_Field = 0xB4, - FT_Err_Missing_Startchar_Field = 0xB5, - FT_Err_Missing_Encoding_Field = 0xB6, - FT_Err_Missing_Bbx_Field = 0xB7, - FT_Err_Bbx_Too_Big = 0xB8, - FT_Err_Corrupted_Font_Header = 0xB9, - FT_Err_Corrupted_Font_Glyphs = 0xBA, - FT_Err_Max = 187; - - /** - * {@code FT_GASP_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_GASP_NO_TABLE GASP_NO_TABLE}
    • - *
    • {@link #FT_GASP_DO_GRIDFIT GASP_DO_GRIDFIT}
    • - *
    • {@link #FT_GASP_DO_GRAY GASP_DO_GRAY}
    • - *
    • {@link #FT_GASP_SYMMETRIC_GRIDFIT GASP_SYMMETRIC_GRIDFIT}
    • - *
    • {@link #FT_GASP_SYMMETRIC_SMOOTHING GASP_SYMMETRIC_SMOOTHING}
    • - *
    - */ - public static final int - FT_GASP_NO_TABLE = -1, - FT_GASP_DO_GRIDFIT = 0x01, - FT_GASP_DO_GRAY = 0x02, - FT_GASP_SYMMETRIC_GRIDFIT = 0x04, - FT_GASP_SYMMETRIC_SMOOTHING = 0x08; - - /** - * {@code FT_Glyph_BBox_Mode} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_GLYPH_BBOX_UNSCALED GLYPH_BBOX_UNSCALED}
    • - *
    • {@link #FT_GLYPH_BBOX_SUBPIXELS GLYPH_BBOX_SUBPIXELS}
    • - *
    • {@link #FT_GLYPH_BBOX_GRIDFIT GLYPH_BBOX_GRIDFIT}
    • - *
    • {@link #FT_GLYPH_BBOX_TRUNCATE GLYPH_BBOX_TRUNCATE}
    • - *
    • {@link #FT_GLYPH_BBOX_PIXELS GLYPH_BBOX_PIXELS}
    • - *
    - */ - public static final int - FT_GLYPH_BBOX_UNSCALED = 0, - FT_GLYPH_BBOX_SUBPIXELS = 0, - FT_GLYPH_BBOX_GRIDFIT = 1, - FT_GLYPH_BBOX_TRUNCATE = 2, - FT_GLYPH_BBOX_PIXELS = 3; - - public static final int FT_VALIDATE_feat_INDEX = 0; - - public static final int FT_VALIDATE_mort_INDEX = 1; - - public static final int FT_VALIDATE_morx_INDEX = 2; - - public static final int FT_VALIDATE_bsln_INDEX = 3; - - public static final int FT_VALIDATE_just_INDEX = 4; - - public static final int FT_VALIDATE_kern_INDEX = 5; - - public static final int FT_VALIDATE_opbd_INDEX = 6; - - public static final int FT_VALIDATE_trak_INDEX = 7; - - public static final int FT_VALIDATE_prop_INDEX = 8; - - public static final int FT_VALIDATE_lcar_INDEX = 9; - - public static final int FT_VALIDATE_GX_LAST_INDEX = FT_VALIDATE_lcar_INDEX; - - public static final int FT_VALIDATE_GX_LENGTH = FT_VALIDATE_GX_LAST_INDEX + 1; - - public static final int FT_VALIDATE_GX_START = 0x4000; - - public static final int FT_VALIDATE_feat = FT_VALIDATE_GX_START << 0; - - public static final int FT_VALIDATE_mort = FT_VALIDATE_GX_START << 1; - - public static final int FT_VALIDATE_morx = FT_VALIDATE_GX_START << 2; - - public static final int FT_VALIDATE_bsln = FT_VALIDATE_GX_START << 3; - - public static final int FT_VALIDATE_just = FT_VALIDATE_GX_START << 4; - - public static final int FT_VALIDATE_kern = FT_VALIDATE_GX_START << 5; - - public static final int FT_VALIDATE_opbd = FT_VALIDATE_GX_START << 6; - - public static final int FT_VALIDATE_trak = FT_VALIDATE_GX_START << 7; - - public static final int FT_VALIDATE_prop = FT_VALIDATE_GX_START << 8; - - public static final int FT_VALIDATE_lcar = FT_VALIDATE_GX_START << 9; - - public static final int FT_FT_VALIDATE_GX = - FT_VALIDATE_feat | - FT_VALIDATE_mort | - FT_VALIDATE_morx | - FT_VALIDATE_bsln | - FT_VALIDATE_just | - FT_VALIDATE_kern | - FT_VALIDATE_opbd | - FT_VALIDATE_trak | - FT_VALIDATE_prop | - FT_VALIDATE_lcar; - - /** - * {@code FT_VALIDATE_CKERNXXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_VALIDATE_MS VALIDATE_MS}
    • - *
    • {@link #FT_VALIDATE_APPLE VALIDATE_APPLE}
    • - *
    • {@link #FT_VALIDATE_CKERN VALIDATE_CKERN}
    • - *
    - */ - public static final int - FT_VALIDATE_MS = FT_VALIDATE_GX_START << 0, - FT_VALIDATE_APPLE = FT_VALIDATE_GX_START << 1, - FT_VALIDATE_CKERN = FT_VALIDATE_MS | FT_VALIDATE_APPLE; - - /** - * {@code FT_Pixel_Mode} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_PIXEL_MODE_NONE PIXEL_MODE_NONE}
    • - *
    • {@link #FT_PIXEL_MODE_MONO PIXEL_MODE_MONO}
    • - *
    • {@link #FT_PIXEL_MODE_GRAY PIXEL_MODE_GRAY}
    • - *
    • {@link #FT_PIXEL_MODE_GRAY2 PIXEL_MODE_GRAY2}
    • - *
    • {@link #FT_PIXEL_MODE_GRAY4 PIXEL_MODE_GRAY4}
    • - *
    • {@link #FT_PIXEL_MODE_LCD PIXEL_MODE_LCD}
    • - *
    • {@link #FT_PIXEL_MODE_LCD_V PIXEL_MODE_LCD_V}
    • - *
    • {@link #FT_PIXEL_MODE_BGRA PIXEL_MODE_BGRA}
    • - *
    • {@link #FT_PIXEL_MODE_MAX PIXEL_MODE_MAX}
    • - *
    - */ - public static final int - FT_PIXEL_MODE_NONE = 0, - FT_PIXEL_MODE_MONO = 1, - FT_PIXEL_MODE_GRAY = 2, - FT_PIXEL_MODE_GRAY2 = 3, - FT_PIXEL_MODE_GRAY4 = 4, - FT_PIXEL_MODE_LCD = 5, - FT_PIXEL_MODE_LCD_V = 6, - FT_PIXEL_MODE_BGRA = 7, - FT_PIXEL_MODE_MAX = 8; - - public static final int - FT_OUTLINE_CONTOURS_MAX = 0xFFFF, - FT_OUTLINE_POINTS_MAX = 0xFFFF; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #FT_OUTLINE_NONE OUTLINE_NONE}
    • - *
    • {@link #FT_OUTLINE_OWNER OUTLINE_OWNER}
    • - *
    • {@link #FT_OUTLINE_EVEN_ODD_FILL OUTLINE_EVEN_ODD_FILL}
    • - *
    • {@link #FT_OUTLINE_REVERSE_FILL OUTLINE_REVERSE_FILL}
    • - *
    • {@link #FT_OUTLINE_IGNORE_DROPOUTS OUTLINE_IGNORE_DROPOUTS}
    • - *
    • {@link #FT_OUTLINE_SMART_DROPOUTS OUTLINE_SMART_DROPOUTS}
    • - *
    • {@link #FT_OUTLINE_INCLUDE_STUBS OUTLINE_INCLUDE_STUBS}
    • - *
    • {@link #FT_OUTLINE_OVERLAP OUTLINE_OVERLAP}
    • - *
    • {@link #FT_OUTLINE_HIGH_PRECISION OUTLINE_HIGH_PRECISION}
    • - *
    • {@link #FT_OUTLINE_SINGLE_PASS OUTLINE_SINGLE_PASS}
    • - *
    - */ - public static final int - FT_OUTLINE_NONE = 0x0, - FT_OUTLINE_OWNER = 0x1, - FT_OUTLINE_EVEN_ODD_FILL = 0x2, - FT_OUTLINE_REVERSE_FILL = 0x4, - FT_OUTLINE_IGNORE_DROPOUTS = 0x8, - FT_OUTLINE_SMART_DROPOUTS = 0x10, - FT_OUTLINE_INCLUDE_STUBS = 0x20, - FT_OUTLINE_OVERLAP = 0x40, - FT_OUTLINE_HIGH_PRECISION = 0x100, - FT_OUTLINE_SINGLE_PASS = 0x200; - - public static final int - FT_CURVE_TAG_ON = 0x01, - FT_CURVE_TAG_CONIC = 0x00, - FT_CURVE_TAG_CUBIC = 0x02, - FT_CURVE_TAG_HAS_SCANMODE = 0x04, - FT_CURVE_TAG_TOUCH_X = 0x08, - FT_CURVE_TAG_TOUCH_Y = 0x10, - FT_CURVE_TAG_TOUCH_BOTH = FT_CURVE_TAG_TOUCH_X | FT_CURVE_TAG_TOUCH_Y; - - /** - * {@code FT_Glyph_Format} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_GLYPH_FORMAT_NONE GLYPH_FORMAT_NONE}
    • - *
    • {@link #FT_GLYPH_FORMAT_COMPOSITE GLYPH_FORMAT_COMPOSITE}
    • - *
    • {@link #FT_GLYPH_FORMAT_BITMAP GLYPH_FORMAT_BITMAP}
    • - *
    • {@link #FT_GLYPH_FORMAT_OUTLINE GLYPH_FORMAT_OUTLINE}
    • - *
    • {@link #FT_GLYPH_FORMAT_PLOTTER GLYPH_FORMAT_PLOTTER}
    • - *
    • {@link #FT_GLYPH_FORMAT_SVG GLYPH_FORMAT_SVG}
    • - *
    - */ - public static final int - FT_GLYPH_FORMAT_NONE = FT_IMAGE_TAG( 0, 0, 0, 0 ), - FT_GLYPH_FORMAT_COMPOSITE = FT_IMAGE_TAG( 'c', 'o', 'm', 'p' ), - FT_GLYPH_FORMAT_BITMAP = FT_IMAGE_TAG( 'b', 'i', 't', 's' ), - FT_GLYPH_FORMAT_OUTLINE = FT_IMAGE_TAG( 'o', 'u', 't', 'l' ), - FT_GLYPH_FORMAT_PLOTTER = FT_IMAGE_TAG( 'p', 'l', 'o', 't' ), - FT_GLYPH_FORMAT_SVG = FT_IMAGE_TAG( 'S', 'V', 'G', ' ' ); - - /** - * {@code FT_RASTER_FLAG_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_RASTER_FLAG_DEFAULT RASTER_FLAG_DEFAULT}
    • - *
    • {@link #FT_RASTER_FLAG_AA RASTER_FLAG_AA}
    • - *
    • {@link #FT_RASTER_FLAG_DIRECT RASTER_FLAG_DIRECT}
    • - *
    • {@link #FT_RASTER_FLAG_CLIP RASTER_FLAG_CLIP}
    • - *
    • {@link #FT_RASTER_FLAG_SDF RASTER_FLAG_SDF}
    • - *
    - */ - public static final int - FT_RASTER_FLAG_DEFAULT = 0x0, - FT_RASTER_FLAG_AA = 0x1, - FT_RASTER_FLAG_DIRECT = 0x2, - FT_RASTER_FLAG_CLIP = 0x4, - FT_RASTER_FLAG_SDF = 0x8; - - /** - * {@code FT_LcdFilter} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_LCD_FILTER_NONE LCD_FILTER_NONE}
    • - *
    • {@link #FT_LCD_FILTER_DEFAULT LCD_FILTER_DEFAULT}
    • - *
    • {@link #FT_LCD_FILTER_LIGHT LCD_FILTER_LIGHT}
    • - *
    • {@link #FT_LCD_FILTER_LEGACY1 LCD_FILTER_LEGACY1}
    • - *
    • {@link #FT_LCD_FILTER_LEGACY LCD_FILTER_LEGACY}
    • - *
    • {@link #FT_LCD_FILTER_MAX LCD_FILTER_MAX}
    • - *
    - */ - public static final int - FT_LCD_FILTER_NONE = 0, - FT_LCD_FILTER_DEFAULT = 1, - FT_LCD_FILTER_LIGHT = 2, - FT_LCD_FILTER_LEGACY1 = 3, - FT_LCD_FILTER_LEGACY = 16, - FT_LCD_FILTER_MAX = 17; - - public static final int FT_LCD_FILTER_FIVE_TAPS = 5; - - public static final int FT_VAR_AXIS_FLAG_HIDDEN = 1; - - public static final int FT_MODULE_FONT_DRIVER = 1; - - public static final int FT_MODULE_RENDERER = 2; - - public static final int FT_MODULE_HINTER = 4; - - public static final int FT_MODULE_STYLER = 8; - - public static final int FT_MODULE_DRIVER_SCALABLE = 0x100; - - public static final int FT_MODULE_DRIVER_NO_OUTLINES = 0x200; - - public static final int FT_MODULE_DRIVER_HAS_HINTER = 0x400; - - public static final int FT_MODULE_DRIVER_HINTS_LIGHTLY = 0x800; - - public static final int FT_DEBUG_HOOK_TRUETYPE = 0; - - /** - * {@code FT_TrueTypeEngineType} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_TRUETYPE_ENGINE_TYPE_NONE TRUETYPE_ENGINE_TYPE_NONE}
    • - *
    • {@link #FT_TRUETYPE_ENGINE_TYPE_UNPATENTED TRUETYPE_ENGINE_TYPE_UNPATENTED}
    • - *
    • {@link #FT_TRUETYPE_ENGINE_TYPE_PATENTED TRUETYPE_ENGINE_TYPE_PATENTED}
    • - *
    - */ - public static final int - FT_TRUETYPE_ENGINE_TYPE_NONE = 0, - FT_TRUETYPE_ENGINE_TYPE_UNPATENTED = 1, - FT_TRUETYPE_ENGINE_TYPE_PATENTED = 2; - - /** - * {@code FT_Mod_Err_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_Mod_Err_Base Mod_Err_Base}
    • - *
    • {@link #FT_Mod_Err_Autofit Mod_Err_Autofit}
    • - *
    • {@link #FT_Mod_Err_BDF Mod_Err_BDF}
    • - *
    • {@link #FT_Mod_Err_Bzip2 Mod_Err_Bzip2}
    • - *
    • {@link #FT_Mod_Err_Cache Mod_Err_Cache}
    • - *
    • {@link #FT_Mod_Err_CFF Mod_Err_CFF}
    • - *
    • {@link #FT_Mod_Err_CID Mod_Err_CID}
    • - *
    • {@link #FT_Mod_Err_Gzip Mod_Err_Gzip}
    • - *
    • {@link #FT_Mod_Err_LZW Mod_Err_LZW}
    • - *
    • {@link #FT_Mod_Err_OTvalid Mod_Err_OTvalid}
    • - *
    • {@link #FT_Mod_Err_PCF Mod_Err_PCF}
    • - *
    • {@link #FT_Mod_Err_PFR Mod_Err_PFR}
    • - *
    • {@link #FT_Mod_Err_PSaux Mod_Err_PSaux}
    • - *
    • {@link #FT_Mod_Err_PShinter Mod_Err_PShinter}
    • - *
    • {@link #FT_Mod_Err_PSnames Mod_Err_PSnames}
    • - *
    • {@link #FT_Mod_Err_Raster Mod_Err_Raster}
    • - *
    • {@link #FT_Mod_Err_SFNT Mod_Err_SFNT}
    • - *
    • {@link #FT_Mod_Err_Smooth Mod_Err_Smooth}
    • - *
    • {@link #FT_Mod_Err_TrueType Mod_Err_TrueType}
    • - *
    • {@link #FT_Mod_Err_Type1 Mod_Err_Type1}
    • - *
    • {@link #FT_Mod_Err_Type42 Mod_Err_Type42}
    • - *
    • {@link #FT_Mod_Err_Winfonts Mod_Err_Winfonts}
    • - *
    • {@link #FT_Mod_Err_GXvalid Mod_Err_GXvalid}
    • - *
    • {@link #FT_Mod_Err_Sdf Mod_Err_Sdf}
    • - *
    • {@link #FT_Mod_Err_Max Mod_Err_Max}
    • - *
    - */ - public static final int - FT_Mod_Err_Base = 0x00, - FT_Mod_Err_Autofit = 0x100, - FT_Mod_Err_BDF = 0x200, - FT_Mod_Err_Bzip2 = 0x300, - FT_Mod_Err_Cache = 0x400, - FT_Mod_Err_CFF = 0x500, - FT_Mod_Err_CID = 0x600, - FT_Mod_Err_Gzip = 0x700, - FT_Mod_Err_LZW = 0x800, - FT_Mod_Err_OTvalid = 0x900, - FT_Mod_Err_PCF = 0xA00, - FT_Mod_Err_PFR = 0xB00, - FT_Mod_Err_PSaux = 0xC00, - FT_Mod_Err_PShinter = 0xD00, - FT_Mod_Err_PSnames = 0xE00, - FT_Mod_Err_Raster = 0xF00, - FT_Mod_Err_SFNT = 0x1000, - FT_Mod_Err_Smooth = 0x1100, - FT_Mod_Err_TrueType = 0x1200, - FT_Mod_Err_Type1 = 0x1300, - FT_Mod_Err_Type42 = 0x1400, - FT_Mod_Err_Winfonts = 0x1500, - FT_Mod_Err_GXvalid = 0x1600, - FT_Mod_Err_Sdf = 0x1700, - FT_Mod_Err_Max = FT_Mod_Err_Sdf + 1; - - /** - * {@code FT_VALIDATE_OTXXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_VALIDATE_BASE VALIDATE_BASE}
    • - *
    • {@link #FT_VALIDATE_GDEF VALIDATE_GDEF}
    • - *
    • {@link #FT_VALIDATE_GPOS VALIDATE_GPOS}
    • - *
    • {@link #FT_VALIDATE_GSUB VALIDATE_GSUB}
    • - *
    • {@link #FT_VALIDATE_JSTF VALIDATE_JSTF}
    • - *
    • {@link #FT_VALIDATE_MATH VALIDATE_MATH}
    • - *
    • {@link #FT_VALIDATE_OT VALIDATE_OT}
    • - *
    - */ - public static final int - FT_VALIDATE_BASE = 0x0100, - FT_VALIDATE_GDEF = 0x0200, - FT_VALIDATE_GPOS = 0x0400, - FT_VALIDATE_GSUB = 0x0800, - FT_VALIDATE_JSTF = 0x1000, - FT_VALIDATE_MATH = 0x2000, - FT_VALIDATE_OT = - FT_VALIDATE_BASE | - FT_VALIDATE_GDEF | - FT_VALIDATE_GPOS | - FT_VALIDATE_GSUB | - FT_VALIDATE_JSTF | - FT_VALIDATE_MATH; - - /** - * {@code FT_Orientation} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_ORIENTATION_TRUETYPE ORIENTATION_TRUETYPE}
    • - *
    • {@link #FT_ORIENTATION_POSTSCRIPT ORIENTATION_POSTSCRIPT}
    • - *
    • {@link #FT_ORIENTATION_FILL_RIGHT ORIENTATION_FILL_RIGHT}
    • - *
    • {@link #FT_ORIENTATION_FILL_LEFT ORIENTATION_FILL_LEFT}
    • - *
    • {@link #FT_ORIENTATION_NONE ORIENTATION_NONE}
    • - *
    - */ - public static final int - FT_ORIENTATION_TRUETYPE = 0, - FT_ORIENTATION_POSTSCRIPT = 1, - FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, - FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT, - FT_ORIENTATION_NONE = 2; - - public static final int - FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY = FT_MAKE_TAG( 'i', 'g', 'p', 'f' ), - FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY = FT_MAKE_TAG( 'i', 'g', 'p', 's' ), - FT_PARAM_TAG_INCREMENTAL = FT_MAKE_TAG( 'i', 'n', 'c', 'r' ), - FT_PARAM_TAG_IGNORE_SBIX = FT_MAKE_TAG( 'i', 's', 'b', 'x' ), - FT_PARAM_TAG_LCD_FILTER_WEIGHTS = FT_MAKE_TAG( 'l', 'c', 'd', 'f' ), - FT_PARAM_TAG_RANDOM_SEED = FT_MAKE_TAG( 's', 'e', 'e', 'd' ), - FT_PARAM_TAG_STEM_DARKENING = FT_MAKE_TAG( 'd', 'a', 'r', 'k' ), - FT_PARAM_TAG_UNPATENTED_HINTING = FT_MAKE_TAG( 'u', 'n', 'p', 'a' ); - - /** - * {@code FT_Stroker_LineJoin} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_STROKER_LINEJOIN_ROUND STROKER_LINEJOIN_ROUND}
    • - *
    • {@link #FT_STROKER_LINEJOIN_BEVEL STROKER_LINEJOIN_BEVEL}
    • - *
    • {@link #FT_STROKER_LINEJOIN_MITER_VARIABLE STROKER_LINEJOIN_MITER_VARIABLE}
    • - *
    • {@link #FT_STROKER_LINEJOIN_MITER STROKER_LINEJOIN_MITER}
    • - *
    • {@link #FT_STROKER_LINEJOIN_MITER_FIXED STROKER_LINEJOIN_MITER_FIXED}
    • - *
    - */ - public static final int - FT_STROKER_LINEJOIN_ROUND = 0, - FT_STROKER_LINEJOIN_BEVEL = 1, - FT_STROKER_LINEJOIN_MITER_VARIABLE = 2, - FT_STROKER_LINEJOIN_MITER = FT_STROKER_LINEJOIN_MITER_VARIABLE, - FT_STROKER_LINEJOIN_MITER_FIXED = 3; - - /** - * {@code FT_Stroker_LineCap} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_STROKER_LINECAP_BUTT STROKER_LINECAP_BUTT}
    • - *
    • {@link #FT_STROKER_LINECAP_ROUND STROKER_LINECAP_ROUND}
    • - *
    • {@link #FT_STROKER_LINECAP_SQUARE STROKER_LINECAP_SQUARE}
    • - *
    - */ - public static final int - FT_STROKER_LINECAP_BUTT = 0, - FT_STROKER_LINECAP_ROUND = 1, - FT_STROKER_LINECAP_SQUARE = 2; - - /** - * {@code FT_StrokerBorder} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_STROKER_BORDER_LEFT STROKER_BORDER_LEFT}
    • - *
    • {@link #FT_STROKER_BORDER_RIGHT STROKER_BORDER_RIGHT}
    • - *
    - */ - public static final int - FT_STROKER_BORDER_LEFT = 0, - FT_STROKER_BORDER_RIGHT = 1; - - public static final int - FT_ANGLE_PI = 180 << 16, - FT_ANGLE_2PI = FT_ANGLE_PI * 2, - FT_ANGLE_PI2 = FT_ANGLE_PI / 2, - FT_ANGLE_PI4 = FT_ANGLE_PI / 4; - - /** - * {@code T1_Blend_Flags} - * - *
    Enum values:
    - * - *
      - *
    • {@link #T1_BLEND_UNDERLINE_POSITION T1_BLEND_UNDERLINE_POSITION}
    • - *
    • {@link #T1_BLEND_UNDERLINE_THICKNESS T1_BLEND_UNDERLINE_THICKNESS}
    • - *
    • {@link #T1_BLEND_ITALIC_ANGLE T1_BLEND_ITALIC_ANGLE}
    • - *
    • {@link #T1_BLEND_BLUE_VALUES T1_BLEND_BLUE_VALUES}
    • - *
    • {@link #T1_BLEND_OTHER_BLUES T1_BLEND_OTHER_BLUES}
    • - *
    • {@link #T1_BLEND_STANDARD_WIDTH T1_BLEND_STANDARD_WIDTH}
    • - *
    • {@link #T1_BLEND_STANDARD_HEIGHT T1_BLEND_STANDARD_HEIGHT}
    • - *
    • {@link #T1_BLEND_STEM_SNAP_WIDTHS T1_BLEND_STEM_SNAP_WIDTHS}
    • - *
    • {@link #T1_BLEND_STEM_SNAP_HEIGHTS T1_BLEND_STEM_SNAP_HEIGHTS}
    • - *
    • {@link #T1_BLEND_BLUE_SCALE T1_BLEND_BLUE_SCALE}
    • - *
    • {@link #T1_BLEND_BLUE_SHIFT T1_BLEND_BLUE_SHIFT}
    • - *
    • {@link #T1_BLEND_FAMILY_BLUES T1_BLEND_FAMILY_BLUES}
    • - *
    • {@link #T1_BLEND_FAMILY_OTHER_BLUES T1_BLEND_FAMILY_OTHER_BLUES}
    • - *
    • {@link #T1_BLEND_FORCE_BOLD T1_BLEND_FORCE_BOLD}
    • - *
    • {@link #T1_BLEND_MAX T1_BLEND_MAX}
    • - *
    - */ - public static final int - T1_BLEND_UNDERLINE_POSITION = 0, - T1_BLEND_UNDERLINE_THICKNESS = 1, - T1_BLEND_ITALIC_ANGLE = 2, - T1_BLEND_BLUE_VALUES = 3, - T1_BLEND_OTHER_BLUES = 4, - T1_BLEND_STANDARD_WIDTH = 5, - T1_BLEND_STANDARD_HEIGHT = 6, - T1_BLEND_STEM_SNAP_WIDTHS = 7, - T1_BLEND_STEM_SNAP_HEIGHTS = 8, - T1_BLEND_BLUE_SCALE = 9, - T1_BLEND_BLUE_SHIFT = 10, - T1_BLEND_FAMILY_BLUES = 11, - T1_BLEND_FAMILY_OTHER_BLUES = 12, - T1_BLEND_FORCE_BOLD = 13, - T1_BLEND_MAX = 14; - - public static final int T1_MAX_MM_DESIGNS = 16; - - public static final int T1_MAX_MM_AXIS = 4; - - public static final int T1_MAX_MM_MAP_POINTS = 20; - - /** - * {@code T1_EncodingType} - * - *
    Enum values:
    - * - *
      - *
    • {@link #T1_ENCODING_TYPE_NONE T1_ENCODING_TYPE_NONE}
    • - *
    • {@link #T1_ENCODING_TYPE_ARRAY T1_ENCODING_TYPE_ARRAY}
    • - *
    • {@link #T1_ENCODING_TYPE_STANDARD T1_ENCODING_TYPE_STANDARD}
    • - *
    • {@link #T1_ENCODING_TYPE_ISOLATIN1 T1_ENCODING_TYPE_ISOLATIN1}
    • - *
    • {@link #T1_ENCODING_TYPE_EXPERT T1_ENCODING_TYPE_EXPERT}
    • - *
    - */ - public static final int - T1_ENCODING_TYPE_NONE = 0, - T1_ENCODING_TYPE_ARRAY = 1, - T1_ENCODING_TYPE_STANDARD = 2, - T1_ENCODING_TYPE_ISOLATIN1 = 3, - T1_ENCODING_TYPE_EXPERT = 4; - - /** - * {@code PS_Dict_Keys} - * - *
    Enum values:
    - * - *
      - *
    • {@link #PS_DICT_FONT_TYPE PS_DICT_FONT_TYPE}
    • - *
    • {@link #PS_DICT_FONT_MATRIX PS_DICT_FONT_MATRIX}
    • - *
    • {@link #PS_DICT_FONT_BBOX PS_DICT_FONT_BBOX}
    • - *
    • {@link #PS_DICT_PAINT_TYPE PS_DICT_PAINT_TYPE}
    • - *
    • {@link #PS_DICT_FONT_NAME PS_DICT_FONT_NAME}
    • - *
    • {@link #PS_DICT_UNIQUE_ID PS_DICT_UNIQUE_ID}
    • - *
    • {@link #PS_DICT_NUM_CHAR_STRINGS PS_DICT_NUM_CHAR_STRINGS}
    • - *
    • {@link #PS_DICT_CHAR_STRING_KEY PS_DICT_CHAR_STRING_KEY}
    • - *
    • {@link #PS_DICT_CHAR_STRING PS_DICT_CHAR_STRING}
    • - *
    • {@link #PS_DICT_ENCODING_TYPE PS_DICT_ENCODING_TYPE}
    • - *
    • {@link #PS_DICT_ENCODING_ENTRY PS_DICT_ENCODING_ENTRY}
    • - *
    • {@link #PS_DICT_NUM_SUBRS PS_DICT_NUM_SUBRS}
    • - *
    • {@link #PS_DICT_SUBR PS_DICT_SUBR}
    • - *
    • {@link #PS_DICT_STD_HW PS_DICT_STD_HW}
    • - *
    • {@link #PS_DICT_STD_VW PS_DICT_STD_VW}
    • - *
    • {@link #PS_DICT_NUM_BLUE_VALUES PS_DICT_NUM_BLUE_VALUES}
    • - *
    • {@link #PS_DICT_BLUE_VALUE PS_DICT_BLUE_VALUE}
    • - *
    • {@link #PS_DICT_BLUE_FUZZ PS_DICT_BLUE_FUZZ}
    • - *
    • {@link #PS_DICT_NUM_OTHER_BLUES PS_DICT_NUM_OTHER_BLUES}
    • - *
    • {@link #PS_DICT_OTHER_BLUE PS_DICT_OTHER_BLUE}
    • - *
    • {@link #PS_DICT_NUM_FAMILY_BLUES PS_DICT_NUM_FAMILY_BLUES}
    • - *
    • {@link #PS_DICT_FAMILY_BLUE PS_DICT_FAMILY_BLUE}
    • - *
    • {@link #PS_DICT_NUM_FAMILY_OTHER_BLUES PS_DICT_NUM_FAMILY_OTHER_BLUES}
    • - *
    • {@link #PS_DICT_FAMILY_OTHER_BLUE PS_DICT_FAMILY_OTHER_BLUE}
    • - *
    • {@link #PS_DICT_BLUE_SCALE PS_DICT_BLUE_SCALE}
    • - *
    • {@link #PS_DICT_BLUE_SHIFT PS_DICT_BLUE_SHIFT}
    • - *
    • {@link #PS_DICT_NUM_STEM_SNAP_H PS_DICT_NUM_STEM_SNAP_H}
    • - *
    • {@link #PS_DICT_STEM_SNAP_H PS_DICT_STEM_SNAP_H}
    • - *
    • {@link #PS_DICT_NUM_STEM_SNAP_V PS_DICT_NUM_STEM_SNAP_V}
    • - *
    • {@link #PS_DICT_STEM_SNAP_V PS_DICT_STEM_SNAP_V}
    • - *
    • {@link #PS_DICT_FORCE_BOLD PS_DICT_FORCE_BOLD}
    • - *
    • {@link #PS_DICT_RND_STEM_UP PS_DICT_RND_STEM_UP}
    • - *
    • {@link #PS_DICT_MIN_FEATURE PS_DICT_MIN_FEATURE}
    • - *
    • {@link #PS_DICT_LEN_IV PS_DICT_LEN_IV}
    • - *
    • {@link #PS_DICT_PASSWORD PS_DICT_PASSWORD}
    • - *
    • {@link #PS_DICT_LANGUAGE_GROUP PS_DICT_LANGUAGE_GROUP}
    • - *
    • {@link #PS_DICT_VERSION PS_DICT_VERSION}
    • - *
    • {@link #PS_DICT_NOTICE PS_DICT_NOTICE}
    • - *
    • {@link #PS_DICT_FULL_NAME PS_DICT_FULL_NAME}
    • - *
    • {@link #PS_DICT_FAMILY_NAME PS_DICT_FAMILY_NAME}
    • - *
    • {@link #PS_DICT_WEIGHT PS_DICT_WEIGHT}
    • - *
    • {@link #PS_DICT_IS_FIXED_PITCH PS_DICT_IS_FIXED_PITCH}
    • - *
    • {@link #PS_DICT_UNDERLINE_POSITION PS_DICT_UNDERLINE_POSITION}
    • - *
    • {@link #PS_DICT_UNDERLINE_THICKNESS PS_DICT_UNDERLINE_THICKNESS}
    • - *
    • {@link #PS_DICT_FS_TYPE PS_DICT_FS_TYPE}
    • - *
    • {@link #PS_DICT_ITALIC_ANGLE PS_DICT_ITALIC_ANGLE}
    • - *
    • {@link #PS_DICT_MAX PS_DICT_MAX}
    • - *
    - */ - public static final int - PS_DICT_FONT_TYPE = 0, - PS_DICT_FONT_MATRIX = 1, - PS_DICT_FONT_BBOX = 2, - PS_DICT_PAINT_TYPE = 3, - PS_DICT_FONT_NAME = 4, - PS_DICT_UNIQUE_ID = 5, - PS_DICT_NUM_CHAR_STRINGS = 6, - PS_DICT_CHAR_STRING_KEY = 7, - PS_DICT_CHAR_STRING = 8, - PS_DICT_ENCODING_TYPE = 9, - PS_DICT_ENCODING_ENTRY = 10, - PS_DICT_NUM_SUBRS = 11, - PS_DICT_SUBR = 12, - PS_DICT_STD_HW = 13, - PS_DICT_STD_VW = 14, - PS_DICT_NUM_BLUE_VALUES = 15, - PS_DICT_BLUE_VALUE = 16, - PS_DICT_BLUE_FUZZ = 17, - PS_DICT_NUM_OTHER_BLUES = 18, - PS_DICT_OTHER_BLUE = 19, - PS_DICT_NUM_FAMILY_BLUES = 20, - PS_DICT_FAMILY_BLUE = 21, - PS_DICT_NUM_FAMILY_OTHER_BLUES = 22, - PS_DICT_FAMILY_OTHER_BLUE = 23, - PS_DICT_BLUE_SCALE = 24, - PS_DICT_BLUE_SHIFT = 25, - PS_DICT_NUM_STEM_SNAP_H = 26, - PS_DICT_STEM_SNAP_H = 27, - PS_DICT_NUM_STEM_SNAP_V = 28, - PS_DICT_STEM_SNAP_V = 29, - PS_DICT_FORCE_BOLD = 30, - PS_DICT_RND_STEM_UP = 31, - PS_DICT_MIN_FEATURE = 32, - PS_DICT_LEN_IV = 33, - PS_DICT_PASSWORD = 34, - PS_DICT_LANGUAGE_GROUP = 35, - PS_DICT_VERSION = 36, - PS_DICT_NOTICE = 37, - PS_DICT_FULL_NAME = 38, - PS_DICT_FAMILY_NAME = 39, - PS_DICT_WEIGHT = 40, - PS_DICT_IS_FIXED_PITCH = 41, - PS_DICT_UNDERLINE_POSITION = 42, - PS_DICT_UNDERLINE_THICKNESS = 43, - PS_DICT_FS_TYPE = 44, - PS_DICT_ITALIC_ANGLE = 45, - PS_DICT_MAX = PS_DICT_ITALIC_ANGLE; - - /** - * {@code TT_PLATFORM_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_PLATFORM_APPLE_UNICODE TT_PLATFORM_APPLE_UNICODE}
    • - *
    • {@link #TT_PLATFORM_MACINTOSH TT_PLATFORM_MACINTOSH}
    • - *
    • {@link #TT_PLATFORM_ISO TT_PLATFORM_ISO}
    • - *
    • {@link #TT_PLATFORM_MICROSOFT TT_PLATFORM_MICROSOFT}
    • - *
    • {@link #TT_PLATFORM_CUSTOM TT_PLATFORM_CUSTOM}
    • - *
    • {@link #TT_PLATFORM_ADOBE TT_PLATFORM_ADOBE}
    • - *
    - */ - public static final int - TT_PLATFORM_APPLE_UNICODE = 0, - TT_PLATFORM_MACINTOSH = 1, - TT_PLATFORM_ISO = 2, - TT_PLATFORM_MICROSOFT = 3, - TT_PLATFORM_CUSTOM = 4, - TT_PLATFORM_ADOBE = 7; - - /** - * {@code TT_APPLE_ID_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_APPLE_ID_DEFAULT TT_APPLE_ID_DEFAULT}
    • - *
    • {@link #TT_APPLE_ID_UNICODE_1_1 TT_APPLE_ID_UNICODE_1_1}
    • - *
    • {@link #TT_APPLE_ID_ISO_10646 TT_APPLE_ID_ISO_10646}
    • - *
    • {@link #TT_APPLE_ID_UNICODE_2_0 TT_APPLE_ID_UNICODE_2_0}
    • - *
    • {@link #TT_APPLE_ID_UNICODE_32 TT_APPLE_ID_UNICODE_32}
    • - *
    • {@link #TT_APPLE_ID_VARIANT_SELECTOR TT_APPLE_ID_VARIANT_SELECTOR}
    • - *
    • {@link #TT_APPLE_ID_FULL_UNICODE TT_APPLE_ID_FULL_UNICODE}
    • - *
    - */ - public static final int - TT_APPLE_ID_DEFAULT = 0, - TT_APPLE_ID_UNICODE_1_1 = 1, - TT_APPLE_ID_ISO_10646 = 2, - TT_APPLE_ID_UNICODE_2_0 = 3, - TT_APPLE_ID_UNICODE_32 = 4, - TT_APPLE_ID_VARIANT_SELECTOR = 5, - TT_APPLE_ID_FULL_UNICODE = 6; - - /** - * {@code TT_MAC_ID_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_MAC_ID_ROMAN TT_MAC_ID_ROMAN}
    • - *
    • {@link #TT_MAC_ID_JAPANESE TT_MAC_ID_JAPANESE}
    • - *
    • {@link #TT_MAC_ID_TRADITIONAL_CHINESE TT_MAC_ID_TRADITIONAL_CHINESE}
    • - *
    • {@link #TT_MAC_ID_KOREAN TT_MAC_ID_KOREAN}
    • - *
    • {@link #TT_MAC_ID_ARABIC TT_MAC_ID_ARABIC}
    • - *
    • {@link #TT_MAC_ID_HEBREW TT_MAC_ID_HEBREW}
    • - *
    • {@link #TT_MAC_ID_GREEK TT_MAC_ID_GREEK}
    • - *
    • {@link #TT_MAC_ID_RUSSIAN TT_MAC_ID_RUSSIAN}
    • - *
    • {@link #TT_MAC_ID_RSYMBOL TT_MAC_ID_RSYMBOL}
    • - *
    • {@link #TT_MAC_ID_DEVANAGARI TT_MAC_ID_DEVANAGARI}
    • - *
    • {@link #TT_MAC_ID_GURMUKHI TT_MAC_ID_GURMUKHI}
    • - *
    • {@link #TT_MAC_ID_GUJARATI TT_MAC_ID_GUJARATI}
    • - *
    • {@link #TT_MAC_ID_ORIYA TT_MAC_ID_ORIYA}
    • - *
    • {@link #TT_MAC_ID_BENGALI TT_MAC_ID_BENGALI}
    • - *
    • {@link #TT_MAC_ID_TAMIL TT_MAC_ID_TAMIL}
    • - *
    • {@link #TT_MAC_ID_TELUGU TT_MAC_ID_TELUGU}
    • - *
    • {@link #TT_MAC_ID_KANNADA TT_MAC_ID_KANNADA}
    • - *
    • {@link #TT_MAC_ID_MALAYALAM TT_MAC_ID_MALAYALAM}
    • - *
    • {@link #TT_MAC_ID_SINHALESE TT_MAC_ID_SINHALESE}
    • - *
    • {@link #TT_MAC_ID_BURMESE TT_MAC_ID_BURMESE}
    • - *
    • {@link #TT_MAC_ID_KHMER TT_MAC_ID_KHMER}
    • - *
    • {@link #TT_MAC_ID_THAI TT_MAC_ID_THAI}
    • - *
    • {@link #TT_MAC_ID_LAOTIAN TT_MAC_ID_LAOTIAN}
    • - *
    • {@link #TT_MAC_ID_GEORGIAN TT_MAC_ID_GEORGIAN}
    • - *
    • {@link #TT_MAC_ID_ARMENIAN TT_MAC_ID_ARMENIAN}
    • - *
    • {@link #TT_MAC_ID_MALDIVIAN TT_MAC_ID_MALDIVIAN}
    • - *
    • {@link #TT_MAC_ID_SIMPLIFIED_CHINESE TT_MAC_ID_SIMPLIFIED_CHINESE}
    • - *
    • {@link #TT_MAC_ID_TIBETAN TT_MAC_ID_TIBETAN}
    • - *
    • {@link #TT_MAC_ID_MONGOLIAN TT_MAC_ID_MONGOLIAN}
    • - *
    • {@link #TT_MAC_ID_GEEZ TT_MAC_ID_GEEZ}
    • - *
    • {@link #TT_MAC_ID_SLAVIC TT_MAC_ID_SLAVIC}
    • - *
    • {@link #TT_MAC_ID_VIETNAMESE TT_MAC_ID_VIETNAMESE}
    • - *
    • {@link #TT_MAC_ID_SINDHI TT_MAC_ID_SINDHI}
    • - *
    • {@link #TT_MAC_ID_UNINTERP TT_MAC_ID_UNINTERP}
    • - *
    - */ - public static final int - TT_MAC_ID_ROMAN = 0, - TT_MAC_ID_JAPANESE = 1, - TT_MAC_ID_TRADITIONAL_CHINESE = 2, - TT_MAC_ID_KOREAN = 3, - TT_MAC_ID_ARABIC = 4, - TT_MAC_ID_HEBREW = 5, - TT_MAC_ID_GREEK = 6, - TT_MAC_ID_RUSSIAN = 7, - TT_MAC_ID_RSYMBOL = 8, - TT_MAC_ID_DEVANAGARI = 9, - TT_MAC_ID_GURMUKHI = 10, - TT_MAC_ID_GUJARATI = 11, - TT_MAC_ID_ORIYA = 12, - TT_MAC_ID_BENGALI = 13, - TT_MAC_ID_TAMIL = 14, - TT_MAC_ID_TELUGU = 15, - TT_MAC_ID_KANNADA = 16, - TT_MAC_ID_MALAYALAM = 17, - TT_MAC_ID_SINHALESE = 18, - TT_MAC_ID_BURMESE = 19, - TT_MAC_ID_KHMER = 20, - TT_MAC_ID_THAI = 21, - TT_MAC_ID_LAOTIAN = 22, - TT_MAC_ID_GEORGIAN = 23, - TT_MAC_ID_ARMENIAN = 24, - TT_MAC_ID_MALDIVIAN = 25, - TT_MAC_ID_SIMPLIFIED_CHINESE = 26, - TT_MAC_ID_TIBETAN = 27, - TT_MAC_ID_MONGOLIAN = 28, - TT_MAC_ID_GEEZ = 29, - TT_MAC_ID_SLAVIC = 30, - TT_MAC_ID_VIETNAMESE = 31, - TT_MAC_ID_SINDHI = 32, - TT_MAC_ID_UNINTERP = 33; - - /** - * {@code TT_ISO_ID_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_ISO_ID_7BIT_ASCII TT_ISO_ID_7BIT_ASCII}
    • - *
    • {@link #TT_ISO_ID_10646 TT_ISO_ID_10646}
    • - *
    • {@link #TT_ISO_ID_8859_1 TT_ISO_ID_8859_1}
    • - *
    - */ - public static final int - TT_ISO_ID_7BIT_ASCII = 0, - TT_ISO_ID_10646 = 1, - TT_ISO_ID_8859_1 = 2; - - /** - * {@code TT_MS_ID_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_MS_ID_SYMBOL_CS TT_MS_ID_SYMBOL_CS}
    • - *
    • {@link #TT_MS_ID_UNICODE_CS TT_MS_ID_UNICODE_CS}
    • - *
    • {@link #TT_MS_ID_SJIS TT_MS_ID_SJIS}
    • - *
    • {@link #TT_MS_ID_PRC TT_MS_ID_PRC}
    • - *
    • {@link #TT_MS_ID_BIG_5 TT_MS_ID_BIG_5}
    • - *
    • {@link #TT_MS_ID_WANSUNG TT_MS_ID_WANSUNG}
    • - *
    • {@link #TT_MS_ID_JOHAB TT_MS_ID_JOHAB}
    • - *
    • {@link #TT_MS_ID_UCS_4 TT_MS_ID_UCS_4}
    • - *
    - */ - public static final int - TT_MS_ID_SYMBOL_CS = 0, - TT_MS_ID_UNICODE_CS = 1, - TT_MS_ID_SJIS = 2, - TT_MS_ID_PRC = 3, - TT_MS_ID_BIG_5 = 4, - TT_MS_ID_WANSUNG = 5, - TT_MS_ID_JOHAB = 6, - TT_MS_ID_UCS_4 = 10; - - /** - * {@code TT_ADOBE_ID_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_ADOBE_ID_STANDARD TT_ADOBE_ID_STANDARD}
    • - *
    • {@link #TT_ADOBE_ID_EXPERT TT_ADOBE_ID_EXPERT}
    • - *
    • {@link #TT_ADOBE_ID_CUSTOM TT_ADOBE_ID_CUSTOM}
    • - *
    • {@link #TT_ADOBE_ID_LATIN_1 TT_ADOBE_ID_LATIN_1}
    • - *
    - */ - public static final int - TT_ADOBE_ID_STANDARD = 0, - TT_ADOBE_ID_EXPERT = 1, - TT_ADOBE_ID_CUSTOM = 2, - TT_ADOBE_ID_LATIN_1 = 3; - - /** - * {@code TT_MAC_LANGID_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_MAC_LANGID_ENGLISH TT_MAC_LANGID_ENGLISH}
    • - *
    • {@link #TT_MAC_LANGID_FRENCH TT_MAC_LANGID_FRENCH}
    • - *
    • {@link #TT_MAC_LANGID_GERMAN TT_MAC_LANGID_GERMAN}
    • - *
    • {@link #TT_MAC_LANGID_ITALIAN TT_MAC_LANGID_ITALIAN}
    • - *
    • {@link #TT_MAC_LANGID_DUTCH TT_MAC_LANGID_DUTCH}
    • - *
    • {@link #TT_MAC_LANGID_SWEDISH TT_MAC_LANGID_SWEDISH}
    • - *
    • {@link #TT_MAC_LANGID_SPANISH TT_MAC_LANGID_SPANISH}
    • - *
    • {@link #TT_MAC_LANGID_DANISH TT_MAC_LANGID_DANISH}
    • - *
    • {@link #TT_MAC_LANGID_PORTUGUESE TT_MAC_LANGID_PORTUGUESE}
    • - *
    • {@link #TT_MAC_LANGID_NORWEGIAN TT_MAC_LANGID_NORWEGIAN}
    • - *
    • {@link #TT_MAC_LANGID_HEBREW TT_MAC_LANGID_HEBREW}
    • - *
    • {@link #TT_MAC_LANGID_JAPANESE TT_MAC_LANGID_JAPANESE}
    • - *
    • {@link #TT_MAC_LANGID_ARABIC TT_MAC_LANGID_ARABIC}
    • - *
    • {@link #TT_MAC_LANGID_FINNISH TT_MAC_LANGID_FINNISH}
    • - *
    • {@link #TT_MAC_LANGID_GREEK TT_MAC_LANGID_GREEK}
    • - *
    • {@link #TT_MAC_LANGID_ICELANDIC TT_MAC_LANGID_ICELANDIC}
    • - *
    • {@link #TT_MAC_LANGID_MALTESE TT_MAC_LANGID_MALTESE}
    • - *
    • {@link #TT_MAC_LANGID_TURKISH TT_MAC_LANGID_TURKISH}
    • - *
    • {@link #TT_MAC_LANGID_CROATIAN TT_MAC_LANGID_CROATIAN}
    • - *
    • {@link #TT_MAC_LANGID_CHINESE_TRADITIONAL TT_MAC_LANGID_CHINESE_TRADITIONAL}
    • - *
    • {@link #TT_MAC_LANGID_URDU TT_MAC_LANGID_URDU}
    • - *
    • {@link #TT_MAC_LANGID_HINDI TT_MAC_LANGID_HINDI}
    • - *
    • {@link #TT_MAC_LANGID_THAI TT_MAC_LANGID_THAI}
    • - *
    • {@link #TT_MAC_LANGID_KOREAN TT_MAC_LANGID_KOREAN}
    • - *
    • {@link #TT_MAC_LANGID_LITHUANIAN TT_MAC_LANGID_LITHUANIAN}
    • - *
    • {@link #TT_MAC_LANGID_POLISH TT_MAC_LANGID_POLISH}
    • - *
    • {@link #TT_MAC_LANGID_HUNGARIAN TT_MAC_LANGID_HUNGARIAN}
    • - *
    • {@link #TT_MAC_LANGID_ESTONIAN TT_MAC_LANGID_ESTONIAN}
    • - *
    • {@link #TT_MAC_LANGID_LETTISH TT_MAC_LANGID_LETTISH}
    • - *
    • {@link #TT_MAC_LANGID_SAAMISK TT_MAC_LANGID_SAAMISK}
    • - *
    • {@link #TT_MAC_LANGID_FAEROESE TT_MAC_LANGID_FAEROESE}
    • - *
    • {@link #TT_MAC_LANGID_FARSI TT_MAC_LANGID_FARSI}
    • - *
    • {@link #TT_MAC_LANGID_RUSSIAN TT_MAC_LANGID_RUSSIAN}
    • - *
    • {@link #TT_MAC_LANGID_CHINESE_SIMPLIFIED TT_MAC_LANGID_CHINESE_SIMPLIFIED}
    • - *
    • {@link #TT_MAC_LANGID_FLEMISH TT_MAC_LANGID_FLEMISH}
    • - *
    • {@link #TT_MAC_LANGID_IRISH TT_MAC_LANGID_IRISH}
    • - *
    • {@link #TT_MAC_LANGID_ALBANIAN TT_MAC_LANGID_ALBANIAN}
    • - *
    • {@link #TT_MAC_LANGID_ROMANIAN TT_MAC_LANGID_ROMANIAN}
    • - *
    • {@link #TT_MAC_LANGID_CZECH TT_MAC_LANGID_CZECH}
    • - *
    • {@link #TT_MAC_LANGID_SLOVAK TT_MAC_LANGID_SLOVAK}
    • - *
    • {@link #TT_MAC_LANGID_SLOVENIAN TT_MAC_LANGID_SLOVENIAN}
    • - *
    • {@link #TT_MAC_LANGID_YIDDISH TT_MAC_LANGID_YIDDISH}
    • - *
    • {@link #TT_MAC_LANGID_SERBIAN TT_MAC_LANGID_SERBIAN}
    • - *
    • {@link #TT_MAC_LANGID_MACEDONIAN TT_MAC_LANGID_MACEDONIAN}
    • - *
    • {@link #TT_MAC_LANGID_BULGARIAN TT_MAC_LANGID_BULGARIAN}
    • - *
    • {@link #TT_MAC_LANGID_UKRAINIAN TT_MAC_LANGID_UKRAINIAN}
    • - *
    • {@link #TT_MAC_LANGID_BYELORUSSIAN TT_MAC_LANGID_BYELORUSSIAN}
    • - *
    • {@link #TT_MAC_LANGID_UZBEK TT_MAC_LANGID_UZBEK}
    • - *
    • {@link #TT_MAC_LANGID_KAZAKH TT_MAC_LANGID_KAZAKH}
    • - *
    • {@link #TT_MAC_LANGID_AZERBAIJANI TT_MAC_LANGID_AZERBAIJANI}
    • - *
    • {@link #TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT}
    • - *
    • {@link #TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT}
    • - *
    • {@link #TT_MAC_LANGID_ARMENIAN TT_MAC_LANGID_ARMENIAN}
    • - *
    • {@link #TT_MAC_LANGID_GEORGIAN TT_MAC_LANGID_GEORGIAN}
    • - *
    • {@link #TT_MAC_LANGID_MOLDAVIAN TT_MAC_LANGID_MOLDAVIAN}
    • - *
    • {@link #TT_MAC_LANGID_KIRGHIZ TT_MAC_LANGID_KIRGHIZ}
    • - *
    • {@link #TT_MAC_LANGID_TAJIKI TT_MAC_LANGID_TAJIKI}
    • - *
    • {@link #TT_MAC_LANGID_TURKMEN TT_MAC_LANGID_TURKMEN}
    • - *
    • {@link #TT_MAC_LANGID_MONGOLIAN TT_MAC_LANGID_MONGOLIAN}
    • - *
    • {@link #TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT}
    • - *
    • {@link #TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT}
    • - *
    • {@link #TT_MAC_LANGID_PASHTO TT_MAC_LANGID_PASHTO}
    • - *
    • {@link #TT_MAC_LANGID_KURDISH TT_MAC_LANGID_KURDISH}
    • - *
    • {@link #TT_MAC_LANGID_KASHMIRI TT_MAC_LANGID_KASHMIRI}
    • - *
    • {@link #TT_MAC_LANGID_SINDHI TT_MAC_LANGID_SINDHI}
    • - *
    • {@link #TT_MAC_LANGID_TIBETAN TT_MAC_LANGID_TIBETAN}
    • - *
    • {@link #TT_MAC_LANGID_NEPALI TT_MAC_LANGID_NEPALI}
    • - *
    • {@link #TT_MAC_LANGID_SANSKRIT TT_MAC_LANGID_SANSKRIT}
    • - *
    • {@link #TT_MAC_LANGID_MARATHI TT_MAC_LANGID_MARATHI}
    • - *
    • {@link #TT_MAC_LANGID_BENGALI TT_MAC_LANGID_BENGALI}
    • - *
    • {@link #TT_MAC_LANGID_ASSAMESE TT_MAC_LANGID_ASSAMESE}
    • - *
    • {@link #TT_MAC_LANGID_GUJARATI TT_MAC_LANGID_GUJARATI}
    • - *
    • {@link #TT_MAC_LANGID_PUNJABI TT_MAC_LANGID_PUNJABI}
    • - *
    • {@link #TT_MAC_LANGID_ORIYA TT_MAC_LANGID_ORIYA}
    • - *
    • {@link #TT_MAC_LANGID_MALAYALAM TT_MAC_LANGID_MALAYALAM}
    • - *
    • {@link #TT_MAC_LANGID_KANNADA TT_MAC_LANGID_KANNADA}
    • - *
    • {@link #TT_MAC_LANGID_TAMIL TT_MAC_LANGID_TAMIL}
    • - *
    • {@link #TT_MAC_LANGID_TELUGU TT_MAC_LANGID_TELUGU}
    • - *
    • {@link #TT_MAC_LANGID_SINHALESE TT_MAC_LANGID_SINHALESE}
    • - *
    • {@link #TT_MAC_LANGID_BURMESE TT_MAC_LANGID_BURMESE}
    • - *
    • {@link #TT_MAC_LANGID_KHMER TT_MAC_LANGID_KHMER}
    • - *
    • {@link #TT_MAC_LANGID_LAO TT_MAC_LANGID_LAO}
    • - *
    • {@link #TT_MAC_LANGID_VIETNAMESE TT_MAC_LANGID_VIETNAMESE}
    • - *
    • {@link #TT_MAC_LANGID_INDONESIAN TT_MAC_LANGID_INDONESIAN}
    • - *
    • {@link #TT_MAC_LANGID_TAGALOG TT_MAC_LANGID_TAGALOG}
    • - *
    • {@link #TT_MAC_LANGID_MALAY_ROMAN_SCRIPT TT_MAC_LANGID_MALAY_ROMAN_SCRIPT}
    • - *
    • {@link #TT_MAC_LANGID_MALAY_ARABIC_SCRIPT TT_MAC_LANGID_MALAY_ARABIC_SCRIPT}
    • - *
    • {@link #TT_MAC_LANGID_AMHARIC TT_MAC_LANGID_AMHARIC}
    • - *
    • {@link #TT_MAC_LANGID_TIGRINYA TT_MAC_LANGID_TIGRINYA}
    • - *
    • {@link #TT_MAC_LANGID_GALLA TT_MAC_LANGID_GALLA}
    • - *
    • {@link #TT_MAC_LANGID_SOMALI TT_MAC_LANGID_SOMALI}
    • - *
    • {@link #TT_MAC_LANGID_SWAHILI TT_MAC_LANGID_SWAHILI}
    • - *
    • {@link #TT_MAC_LANGID_RUANDA TT_MAC_LANGID_RUANDA}
    • - *
    • {@link #TT_MAC_LANGID_RUNDI TT_MAC_LANGID_RUNDI}
    • - *
    • {@link #TT_MAC_LANGID_CHEWA TT_MAC_LANGID_CHEWA}
    • - *
    • {@link #TT_MAC_LANGID_MALAGASY TT_MAC_LANGID_MALAGASY}
    • - *
    • {@link #TT_MAC_LANGID_ESPERANTO TT_MAC_LANGID_ESPERANTO}
    • - *
    • {@link #TT_MAC_LANGID_WELSH TT_MAC_LANGID_WELSH}
    • - *
    • {@link #TT_MAC_LANGID_BASQUE TT_MAC_LANGID_BASQUE}
    • - *
    • {@link #TT_MAC_LANGID_CATALAN TT_MAC_LANGID_CATALAN}
    • - *
    • {@link #TT_MAC_LANGID_LATIN TT_MAC_LANGID_LATIN}
    • - *
    • {@link #TT_MAC_LANGID_QUECHUA TT_MAC_LANGID_QUECHUA}
    • - *
    • {@link #TT_MAC_LANGID_GUARANI TT_MAC_LANGID_GUARANI}
    • - *
    • {@link #TT_MAC_LANGID_AYMARA TT_MAC_LANGID_AYMARA}
    • - *
    • {@link #TT_MAC_LANGID_TATAR TT_MAC_LANGID_TATAR}
    • - *
    • {@link #TT_MAC_LANGID_UIGHUR TT_MAC_LANGID_UIGHUR}
    • - *
    • {@link #TT_MAC_LANGID_DZONGKHA TT_MAC_LANGID_DZONGKHA}
    • - *
    • {@link #TT_MAC_LANGID_JAVANESE TT_MAC_LANGID_JAVANESE}
    • - *
    • {@link #TT_MAC_LANGID_SUNDANESE TT_MAC_LANGID_SUNDANESE}
    • - *
    • {@link #TT_MAC_LANGID_GALICIAN TT_MAC_LANGID_GALICIAN}
    • - *
    • {@link #TT_MAC_LANGID_AFRIKAANS TT_MAC_LANGID_AFRIKAANS}
    • - *
    • {@link #TT_MAC_LANGID_BRETON TT_MAC_LANGID_BRETON}
    • - *
    • {@link #TT_MAC_LANGID_INUKTITUT TT_MAC_LANGID_INUKTITUT}
    • - *
    • {@link #TT_MAC_LANGID_SCOTTISH_GAELIC TT_MAC_LANGID_SCOTTISH_GAELIC}
    • - *
    • {@link #TT_MAC_LANGID_MANX_GAELIC TT_MAC_LANGID_MANX_GAELIC}
    • - *
    • {@link #TT_MAC_LANGID_IRISH_GAELIC TT_MAC_LANGID_IRISH_GAELIC}
    • - *
    • {@link #TT_MAC_LANGID_TONGAN TT_MAC_LANGID_TONGAN}
    • - *
    • {@link #TT_MAC_LANGID_GREEK_POLYTONIC TT_MAC_LANGID_GREEK_POLYTONIC}
    • - *
    • {@link #TT_MAC_LANGID_GREELANDIC TT_MAC_LANGID_GREELANDIC}
    • - *
    • {@link #TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT}
    • - *
    - */ - public static final int - TT_MAC_LANGID_ENGLISH = 0, - TT_MAC_LANGID_FRENCH = 1, - TT_MAC_LANGID_GERMAN = 2, - TT_MAC_LANGID_ITALIAN = 3, - TT_MAC_LANGID_DUTCH = 4, - TT_MAC_LANGID_SWEDISH = 5, - TT_MAC_LANGID_SPANISH = 6, - TT_MAC_LANGID_DANISH = 7, - TT_MAC_LANGID_PORTUGUESE = 8, - TT_MAC_LANGID_NORWEGIAN = 9, - TT_MAC_LANGID_HEBREW = 10, - TT_MAC_LANGID_JAPANESE = 11, - TT_MAC_LANGID_ARABIC = 12, - TT_MAC_LANGID_FINNISH = 13, - TT_MAC_LANGID_GREEK = 14, - TT_MAC_LANGID_ICELANDIC = 15, - TT_MAC_LANGID_MALTESE = 16, - TT_MAC_LANGID_TURKISH = 17, - TT_MAC_LANGID_CROATIAN = 18, - TT_MAC_LANGID_CHINESE_TRADITIONAL = 19, - TT_MAC_LANGID_URDU = 20, - TT_MAC_LANGID_HINDI = 21, - TT_MAC_LANGID_THAI = 22, - TT_MAC_LANGID_KOREAN = 23, - TT_MAC_LANGID_LITHUANIAN = 24, - TT_MAC_LANGID_POLISH = 25, - TT_MAC_LANGID_HUNGARIAN = 26, - TT_MAC_LANGID_ESTONIAN = 27, - TT_MAC_LANGID_LETTISH = 28, - TT_MAC_LANGID_SAAMISK = 29, - TT_MAC_LANGID_FAEROESE = 30, - TT_MAC_LANGID_FARSI = 31, - TT_MAC_LANGID_RUSSIAN = 32, - TT_MAC_LANGID_CHINESE_SIMPLIFIED = 33, - TT_MAC_LANGID_FLEMISH = 34, - TT_MAC_LANGID_IRISH = 35, - TT_MAC_LANGID_ALBANIAN = 36, - TT_MAC_LANGID_ROMANIAN = 37, - TT_MAC_LANGID_CZECH = 38, - TT_MAC_LANGID_SLOVAK = 39, - TT_MAC_LANGID_SLOVENIAN = 40, - TT_MAC_LANGID_YIDDISH = 41, - TT_MAC_LANGID_SERBIAN = 42, - TT_MAC_LANGID_MACEDONIAN = 43, - TT_MAC_LANGID_BULGARIAN = 44, - TT_MAC_LANGID_UKRAINIAN = 45, - TT_MAC_LANGID_BYELORUSSIAN = 46, - TT_MAC_LANGID_UZBEK = 47, - TT_MAC_LANGID_KAZAKH = 48, - TT_MAC_LANGID_AZERBAIJANI = 49, - TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT = 50, - TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT = 51, - TT_MAC_LANGID_ARMENIAN = 52, - TT_MAC_LANGID_GEORGIAN = 53, - TT_MAC_LANGID_MOLDAVIAN = 54, - TT_MAC_LANGID_KIRGHIZ = 55, - TT_MAC_LANGID_TAJIKI = 56, - TT_MAC_LANGID_TURKMEN = 57, - TT_MAC_LANGID_MONGOLIAN = 58, - TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT = 59, - TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT = 60, - TT_MAC_LANGID_PASHTO = 61, - TT_MAC_LANGID_KURDISH = 62, - TT_MAC_LANGID_KASHMIRI = 63, - TT_MAC_LANGID_SINDHI = 64, - TT_MAC_LANGID_TIBETAN = 65, - TT_MAC_LANGID_NEPALI = 66, - TT_MAC_LANGID_SANSKRIT = 67, - TT_MAC_LANGID_MARATHI = 68, - TT_MAC_LANGID_BENGALI = 69, - TT_MAC_LANGID_ASSAMESE = 70, - TT_MAC_LANGID_GUJARATI = 71, - TT_MAC_LANGID_PUNJABI = 72, - TT_MAC_LANGID_ORIYA = 73, - TT_MAC_LANGID_MALAYALAM = 74, - TT_MAC_LANGID_KANNADA = 75, - TT_MAC_LANGID_TAMIL = 76, - TT_MAC_LANGID_TELUGU = 77, - TT_MAC_LANGID_SINHALESE = 78, - TT_MAC_LANGID_BURMESE = 79, - TT_MAC_LANGID_KHMER = 80, - TT_MAC_LANGID_LAO = 81, - TT_MAC_LANGID_VIETNAMESE = 82, - TT_MAC_LANGID_INDONESIAN = 83, - TT_MAC_LANGID_TAGALOG = 84, - TT_MAC_LANGID_MALAY_ROMAN_SCRIPT = 85, - TT_MAC_LANGID_MALAY_ARABIC_SCRIPT = 86, - TT_MAC_LANGID_AMHARIC = 87, - TT_MAC_LANGID_TIGRINYA = 88, - TT_MAC_LANGID_GALLA = 89, - TT_MAC_LANGID_SOMALI = 90, - TT_MAC_LANGID_SWAHILI = 91, - TT_MAC_LANGID_RUANDA = 92, - TT_MAC_LANGID_RUNDI = 93, - TT_MAC_LANGID_CHEWA = 94, - TT_MAC_LANGID_MALAGASY = 95, - TT_MAC_LANGID_ESPERANTO = 96, - TT_MAC_LANGID_WELSH = 128, - TT_MAC_LANGID_BASQUE = 129, - TT_MAC_LANGID_CATALAN = 130, - TT_MAC_LANGID_LATIN = 131, - TT_MAC_LANGID_QUECHUA = 132, - TT_MAC_LANGID_GUARANI = 133, - TT_MAC_LANGID_AYMARA = 134, - TT_MAC_LANGID_TATAR = 135, - TT_MAC_LANGID_UIGHUR = 136, - TT_MAC_LANGID_DZONGKHA = 137, - TT_MAC_LANGID_JAVANESE = 138, - TT_MAC_LANGID_SUNDANESE = 139, - TT_MAC_LANGID_GALICIAN = 140, - TT_MAC_LANGID_AFRIKAANS = 141, - TT_MAC_LANGID_BRETON = 142, - TT_MAC_LANGID_INUKTITUT = 143, - TT_MAC_LANGID_SCOTTISH_GAELIC = 144, - TT_MAC_LANGID_MANX_GAELIC = 145, - TT_MAC_LANGID_IRISH_GAELIC = 146, - TT_MAC_LANGID_TONGAN = 147, - TT_MAC_LANGID_GREEK_POLYTONIC = 148, - TT_MAC_LANGID_GREELANDIC = 149, - TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT = 150; - - /** - * {@code TT_MS_LANGID_XXX} - * - *
    Enum values:
    - * - *
      - *
    • {@link #TT_MS_LANGID_ARABIC_SAUDI_ARABIA TT_MS_LANGID_ARABIC_SAUDI_ARABIA}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_IRAQ TT_MS_LANGID_ARABIC_IRAQ}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_EGYPT TT_MS_LANGID_ARABIC_EGYPT}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_LIBYA TT_MS_LANGID_ARABIC_LIBYA}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_ALGERIA TT_MS_LANGID_ARABIC_ALGERIA}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_MOROCCO TT_MS_LANGID_ARABIC_MOROCCO}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_TUNISIA TT_MS_LANGID_ARABIC_TUNISIA}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_OMAN TT_MS_LANGID_ARABIC_OMAN}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_YEMEN TT_MS_LANGID_ARABIC_YEMEN}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_SYRIA TT_MS_LANGID_ARABIC_SYRIA}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_JORDAN TT_MS_LANGID_ARABIC_JORDAN}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_LEBANON TT_MS_LANGID_ARABIC_LEBANON}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_KUWAIT TT_MS_LANGID_ARABIC_KUWAIT}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_UAE TT_MS_LANGID_ARABIC_UAE}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_BAHRAIN TT_MS_LANGID_ARABIC_BAHRAIN}
    • - *
    • {@link #TT_MS_LANGID_ARABIC_QATAR TT_MS_LANGID_ARABIC_QATAR}
    • - *
    • {@link #TT_MS_LANGID_BULGARIAN_BULGARIA TT_MS_LANGID_BULGARIAN_BULGARIA}
    • - *
    • {@link #TT_MS_LANGID_CATALAN_CATALAN TT_MS_LANGID_CATALAN_CATALAN}
    • - *
    • {@link #TT_MS_LANGID_CHINESE_TAIWAN TT_MS_LANGID_CHINESE_TAIWAN}
    • - *
    • {@link #TT_MS_LANGID_CHINESE_PRC TT_MS_LANGID_CHINESE_PRC}
    • - *
    • {@link #TT_MS_LANGID_CHINESE_HONG_KONG TT_MS_LANGID_CHINESE_HONG_KONG}
    • - *
    • {@link #TT_MS_LANGID_CHINESE_SINGAPORE TT_MS_LANGID_CHINESE_SINGAPORE}
    • - *
    • {@link #TT_MS_LANGID_CHINESE_MACAO TT_MS_LANGID_CHINESE_MACAO}
    • - *
    • {@link #TT_MS_LANGID_CZECH_CZECH_REPUBLIC TT_MS_LANGID_CZECH_CZECH_REPUBLIC}
    • - *
    • {@link #TT_MS_LANGID_DANISH_DENMARK TT_MS_LANGID_DANISH_DENMARK}
    • - *
    • {@link #TT_MS_LANGID_GERMAN_GERMANY TT_MS_LANGID_GERMAN_GERMANY}
    • - *
    • {@link #TT_MS_LANGID_GERMAN_SWITZERLAND TT_MS_LANGID_GERMAN_SWITZERLAND}
    • - *
    • {@link #TT_MS_LANGID_GERMAN_AUSTRIA TT_MS_LANGID_GERMAN_AUSTRIA}
    • - *
    • {@link #TT_MS_LANGID_GERMAN_LUXEMBOURG TT_MS_LANGID_GERMAN_LUXEMBOURG}
    • - *
    • {@link #TT_MS_LANGID_GERMAN_LIECHTENSTEIN TT_MS_LANGID_GERMAN_LIECHTENSTEIN}
    • - *
    • {@link #TT_MS_LANGID_GREEK_GREECE TT_MS_LANGID_GREEK_GREECE}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_UNITED_STATES TT_MS_LANGID_ENGLISH_UNITED_STATES}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_UNITED_KINGDOM TT_MS_LANGID_ENGLISH_UNITED_KINGDOM}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_AUSTRALIA TT_MS_LANGID_ENGLISH_AUSTRALIA}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_CANADA TT_MS_LANGID_ENGLISH_CANADA}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_NEW_ZEALAND TT_MS_LANGID_ENGLISH_NEW_ZEALAND}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_IRELAND TT_MS_LANGID_ENGLISH_IRELAND}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_SOUTH_AFRICA TT_MS_LANGID_ENGLISH_SOUTH_AFRICA}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_JAMAICA TT_MS_LANGID_ENGLISH_JAMAICA}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_CARIBBEAN TT_MS_LANGID_ENGLISH_CARIBBEAN}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_BELIZE TT_MS_LANGID_ENGLISH_BELIZE}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_TRINIDAD TT_MS_LANGID_ENGLISH_TRINIDAD}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_ZIMBABWE TT_MS_LANGID_ENGLISH_ZIMBABWE}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_PHILIPPINES TT_MS_LANGID_ENGLISH_PHILIPPINES}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_INDIA TT_MS_LANGID_ENGLISH_INDIA}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_MALAYSIA TT_MS_LANGID_ENGLISH_MALAYSIA}
    • - *
    • {@link #TT_MS_LANGID_ENGLISH_SINGAPORE TT_MS_LANGID_ENGLISH_SINGAPORE}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_MEXICO TT_MS_LANGID_SPANISH_MEXICO}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_GUATEMALA TT_MS_LANGID_SPANISH_GUATEMALA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_COSTA_RICA TT_MS_LANGID_SPANISH_COSTA_RICA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_PANAMA TT_MS_LANGID_SPANISH_PANAMA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_VENEZUELA TT_MS_LANGID_SPANISH_VENEZUELA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_COLOMBIA TT_MS_LANGID_SPANISH_COLOMBIA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_PERU TT_MS_LANGID_SPANISH_PERU}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_ARGENTINA TT_MS_LANGID_SPANISH_ARGENTINA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_ECUADOR TT_MS_LANGID_SPANISH_ECUADOR}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_CHILE TT_MS_LANGID_SPANISH_CHILE}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_URUGUAY TT_MS_LANGID_SPANISH_URUGUAY}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_PARAGUAY TT_MS_LANGID_SPANISH_PARAGUAY}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_BOLIVIA TT_MS_LANGID_SPANISH_BOLIVIA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_EL_SALVADOR TT_MS_LANGID_SPANISH_EL_SALVADOR}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_HONDURAS TT_MS_LANGID_SPANISH_HONDURAS}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_NICARAGUA TT_MS_LANGID_SPANISH_NICARAGUA}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_PUERTO_RICO TT_MS_LANGID_SPANISH_PUERTO_RICO}
    • - *
    • {@link #TT_MS_LANGID_SPANISH_UNITED_STATES TT_MS_LANGID_SPANISH_UNITED_STATES}
    • - *
    • {@link #TT_MS_LANGID_FINNISH_FINLAND TT_MS_LANGID_FINNISH_FINLAND}
    • - *
    • {@link #TT_MS_LANGID_FRENCH_FRANCE TT_MS_LANGID_FRENCH_FRANCE}
    • - *
    • {@link #TT_MS_LANGID_FRENCH_BELGIUM TT_MS_LANGID_FRENCH_BELGIUM}
    • - *
    • {@link #TT_MS_LANGID_FRENCH_CANADA TT_MS_LANGID_FRENCH_CANADA}
    • - *
    • {@link #TT_MS_LANGID_FRENCH_SWITZERLAND TT_MS_LANGID_FRENCH_SWITZERLAND}
    • - *
    • {@link #TT_MS_LANGID_FRENCH_LUXEMBOURG TT_MS_LANGID_FRENCH_LUXEMBOURG}
    • - *
    • {@link #TT_MS_LANGID_FRENCH_MONACO TT_MS_LANGID_FRENCH_MONACO}
    • - *
    • {@link #TT_MS_LANGID_HEBREW_ISRAEL TT_MS_LANGID_HEBREW_ISRAEL}
    • - *
    • {@link #TT_MS_LANGID_HUNGARIAN_HUNGARY TT_MS_LANGID_HUNGARIAN_HUNGARY}
    • - *
    • {@link #TT_MS_LANGID_ICELANDIC_ICELAND TT_MS_LANGID_ICELANDIC_ICELAND}
    • - *
    • {@link #TT_MS_LANGID_ITALIAN_ITALY TT_MS_LANGID_ITALIAN_ITALY}
    • - *
    • {@link #TT_MS_LANGID_ITALIAN_SWITZERLAND TT_MS_LANGID_ITALIAN_SWITZERLAND}
    • - *
    • {@link #TT_MS_LANGID_JAPANESE_JAPAN TT_MS_LANGID_JAPANESE_JAPAN}
    • - *
    • {@link #TT_MS_LANGID_KOREAN_KOREA TT_MS_LANGID_KOREAN_KOREA}
    • - *
    • {@link #TT_MS_LANGID_DUTCH_NETHERLANDS TT_MS_LANGID_DUTCH_NETHERLANDS}
    • - *
    • {@link #TT_MS_LANGID_DUTCH_BELGIUM TT_MS_LANGID_DUTCH_BELGIUM}
    • - *
    • {@link #TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL}
    • - *
    • {@link #TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK}
    • - *
    • {@link #TT_MS_LANGID_POLISH_POLAND TT_MS_LANGID_POLISH_POLAND}
    • - *
    • {@link #TT_MS_LANGID_PORTUGUESE_BRAZIL TT_MS_LANGID_PORTUGUESE_BRAZIL}
    • - *
    • {@link #TT_MS_LANGID_PORTUGUESE_PORTUGAL TT_MS_LANGID_PORTUGUESE_PORTUGAL}
    • - *
    • {@link #TT_MS_LANGID_ROMANSH_SWITZERLAND TT_MS_LANGID_ROMANSH_SWITZERLAND}
    • - *
    • {@link #TT_MS_LANGID_ROMANIAN_ROMANIA TT_MS_LANGID_ROMANIAN_ROMANIA}
    • - *
    • {@link #TT_MS_LANGID_RUSSIAN_RUSSIA TT_MS_LANGID_RUSSIAN_RUSSIA}
    • - *
    • {@link #TT_MS_LANGID_CROATIAN_CROATIA TT_MS_LANGID_CROATIAN_CROATIA}
    • - *
    • {@link #TT_MS_LANGID_SERBIAN_SERBIA_LATIN TT_MS_LANGID_SERBIAN_SERBIA_LATIN}
    • - *
    • {@link #TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC}
    • - *
    • {@link #TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA}
    • - *
    • {@link #TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA}
    • - *
    • {@link #TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN}
    • - *
    • {@link #TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC}
    • - *
    • {@link #TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC}
    • - *
    • {@link #TT_MS_LANGID_SLOVAK_SLOVAKIA TT_MS_LANGID_SLOVAK_SLOVAKIA}
    • - *
    • {@link #TT_MS_LANGID_ALBANIAN_ALBANIA TT_MS_LANGID_ALBANIAN_ALBANIA}
    • - *
    • {@link #TT_MS_LANGID_SWEDISH_SWEDEN TT_MS_LANGID_SWEDISH_SWEDEN}
    • - *
    • {@link #TT_MS_LANGID_SWEDISH_FINLAND TT_MS_LANGID_SWEDISH_FINLAND}
    • - *
    • {@link #TT_MS_LANGID_THAI_THAILAND TT_MS_LANGID_THAI_THAILAND}
    • - *
    • {@link #TT_MS_LANGID_TURKISH_TURKEY TT_MS_LANGID_TURKISH_TURKEY}
    • - *
    • {@link #TT_MS_LANGID_URDU_PAKISTAN TT_MS_LANGID_URDU_PAKISTAN}
    • - *
    • {@link #TT_MS_LANGID_INDONESIAN_INDONESIA TT_MS_LANGID_INDONESIAN_INDONESIA}
    • - *
    • {@link #TT_MS_LANGID_UKRAINIAN_UKRAINE TT_MS_LANGID_UKRAINIAN_UKRAINE}
    • - *
    • {@link #TT_MS_LANGID_BELARUSIAN_BELARUS TT_MS_LANGID_BELARUSIAN_BELARUS}
    • - *
    • {@link #TT_MS_LANGID_SLOVENIAN_SLOVENIA TT_MS_LANGID_SLOVENIAN_SLOVENIA}
    • - *
    • {@link #TT_MS_LANGID_ESTONIAN_ESTONIA TT_MS_LANGID_ESTONIAN_ESTONIA}
    • - *
    • {@link #TT_MS_LANGID_LATVIAN_LATVIA TT_MS_LANGID_LATVIAN_LATVIA}
    • - *
    • {@link #TT_MS_LANGID_LITHUANIAN_LITHUANIA TT_MS_LANGID_LITHUANIAN_LITHUANIA}
    • - *
    • {@link #TT_MS_LANGID_TAJIK_TAJIKISTAN TT_MS_LANGID_TAJIK_TAJIKISTAN}
    • - *
    • {@link #TT_MS_LANGID_VIETNAMESE_VIET_NAM TT_MS_LANGID_VIETNAMESE_VIET_NAM}
    • - *
    • {@link #TT_MS_LANGID_ARMENIAN_ARMENIA TT_MS_LANGID_ARMENIAN_ARMENIA}
    • - *
    • {@link #TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN}
    • - *
    • {@link #TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC}
    • - *
    • {@link #TT_MS_LANGID_BASQUE_BASQUE TT_MS_LANGID_BASQUE_BASQUE}
    • - *
    • {@link #TT_MS_LANGID_UPPER_SORBIAN_GERMANY TT_MS_LANGID_UPPER_SORBIAN_GERMANY}
    • - *
    • {@link #TT_MS_LANGID_LOWER_SORBIAN_GERMANY TT_MS_LANGID_LOWER_SORBIAN_GERMANY}
    • - *
    • {@link #TT_MS_LANGID_MACEDONIAN_MACEDONIA TT_MS_LANGID_MACEDONIAN_MACEDONIA}
    • - *
    • {@link #TT_MS_LANGID_SETSWANA_SOUTH_AFRICA TT_MS_LANGID_SETSWANA_SOUTH_AFRICA}
    • - *
    • {@link #TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA}
    • - *
    • {@link #TT_MS_LANGID_ISIZULU_SOUTH_AFRICA TT_MS_LANGID_ISIZULU_SOUTH_AFRICA}
    • - *
    • {@link #TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA}
    • - *
    • {@link #TT_MS_LANGID_GEORGIAN_GEORGIA TT_MS_LANGID_GEORGIAN_GEORGIA}
    • - *
    • {@link #TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS}
    • - *
    • {@link #TT_MS_LANGID_HINDI_INDIA TT_MS_LANGID_HINDI_INDIA}
    • - *
    • {@link #TT_MS_LANGID_MALTESE_MALTA TT_MS_LANGID_MALTESE_MALTA}
    • - *
    • {@link #TT_MS_LANGID_SAMI_NORTHERN_NORWAY TT_MS_LANGID_SAMI_NORTHERN_NORWAY}
    • - *
    • {@link #TT_MS_LANGID_SAMI_NORTHERN_SWEDEN TT_MS_LANGID_SAMI_NORTHERN_SWEDEN}
    • - *
    • {@link #TT_MS_LANGID_SAMI_NORTHERN_FINLAND TT_MS_LANGID_SAMI_NORTHERN_FINLAND}
    • - *
    • {@link #TT_MS_LANGID_SAMI_LULE_NORWAY TT_MS_LANGID_SAMI_LULE_NORWAY}
    • - *
    • {@link #TT_MS_LANGID_SAMI_LULE_SWEDEN TT_MS_LANGID_SAMI_LULE_SWEDEN}
    • - *
    • {@link #TT_MS_LANGID_SAMI_SOUTHERN_NORWAY TT_MS_LANGID_SAMI_SOUTHERN_NORWAY}
    • - *
    • {@link #TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN}
    • - *
    • {@link #TT_MS_LANGID_SAMI_SKOLT_FINLAND TT_MS_LANGID_SAMI_SKOLT_FINLAND}
    • - *
    • {@link #TT_MS_LANGID_SAMI_INARI_FINLAND TT_MS_LANGID_SAMI_INARI_FINLAND}
    • - *
    • {@link #TT_MS_LANGID_IRISH_IRELAND TT_MS_LANGID_IRISH_IRELAND}
    • - *
    • {@link #TT_MS_LANGID_MALAY_MALAYSIA TT_MS_LANGID_MALAY_MALAYSIA}
    • - *
    • {@link #TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM}
    • - *
    • {@link #TT_MS_LANGID_KAZAKH_KAZAKHSTAN TT_MS_LANGID_KAZAKH_KAZAKHSTAN}
    • - *
    • {@link #TT_MS_LANGID_KYRGYZ_KYRGYZSTAN TT_MS_LANGID_KYRGYZ_KYRGYZSTAN}
    • - *
    • {@link #TT_MS_LANGID_KISWAHILI_KENYA TT_MS_LANGID_KISWAHILI_KENYA}
    • - *
    • {@link #TT_MS_LANGID_TURKMEN_TURKMENISTAN TT_MS_LANGID_TURKMEN_TURKMENISTAN}
    • - *
    • {@link #TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN}
    • - *
    • {@link #TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC}
    • - *
    • {@link #TT_MS_LANGID_TATAR_RUSSIA TT_MS_LANGID_TATAR_RUSSIA}
    • - *
    • {@link #TT_MS_LANGID_BENGALI_INDIA TT_MS_LANGID_BENGALI_INDIA}
    • - *
    • {@link #TT_MS_LANGID_BENGALI_BANGLADESH TT_MS_LANGID_BENGALI_BANGLADESH}
    • - *
    • {@link #TT_MS_LANGID_PUNJABI_INDIA TT_MS_LANGID_PUNJABI_INDIA}
    • - *
    • {@link #TT_MS_LANGID_GUJARATI_INDIA TT_MS_LANGID_GUJARATI_INDIA}
    • - *
    • {@link #TT_MS_LANGID_ODIA_INDIA TT_MS_LANGID_ODIA_INDIA}
    • - *
    • {@link #TT_MS_LANGID_TAMIL_INDIA TT_MS_LANGID_TAMIL_INDIA}
    • - *
    • {@link #TT_MS_LANGID_TELUGU_INDIA TT_MS_LANGID_TELUGU_INDIA}
    • - *
    • {@link #TT_MS_LANGID_KANNADA_INDIA TT_MS_LANGID_KANNADA_INDIA}
    • - *
    • {@link #TT_MS_LANGID_MALAYALAM_INDIA TT_MS_LANGID_MALAYALAM_INDIA}
    • - *
    • {@link #TT_MS_LANGID_ASSAMESE_INDIA TT_MS_LANGID_ASSAMESE_INDIA}
    • - *
    • {@link #TT_MS_LANGID_MARATHI_INDIA TT_MS_LANGID_MARATHI_INDIA}
    • - *
    • {@link #TT_MS_LANGID_SANSKRIT_INDIA TT_MS_LANGID_SANSKRIT_INDIA}
    • - *
    • {@link #TT_MS_LANGID_MONGOLIAN_MONGOLIA TT_MS_LANGID_MONGOLIAN_MONGOLIA}
    • - *
    • {@link #TT_MS_LANGID_MONGOLIAN_PRC TT_MS_LANGID_MONGOLIAN_PRC}
    • - *
    • {@link #TT_MS_LANGID_TIBETAN_PRC TT_MS_LANGID_TIBETAN_PRC}
    • - *
    • {@link #TT_MS_LANGID_WELSH_UNITED_KINGDOM TT_MS_LANGID_WELSH_UNITED_KINGDOM}
    • - *
    • {@link #TT_MS_LANGID_KHMER_CAMBODIA TT_MS_LANGID_KHMER_CAMBODIA}
    • - *
    • {@link #TT_MS_LANGID_LAO_LAOS TT_MS_LANGID_LAO_LAOS}
    • - *
    • {@link #TT_MS_LANGID_GALICIAN_GALICIAN TT_MS_LANGID_GALICIAN_GALICIAN}
    • - *
    • {@link #TT_MS_LANGID_KONKANI_INDIA TT_MS_LANGID_KONKANI_INDIA}
    • - *
    • {@link #TT_MS_LANGID_SYRIAC_SYRIA TT_MS_LANGID_SYRIAC_SYRIA}
    • - *
    • {@link #TT_MS_LANGID_SINHALA_SRI_LANKA TT_MS_LANGID_SINHALA_SRI_LANKA}
    • - *
    • {@link #TT_MS_LANGID_INUKTITUT_CANADA TT_MS_LANGID_INUKTITUT_CANADA}
    • - *
    • {@link #TT_MS_LANGID_INUKTITUT_CANADA_LATIN TT_MS_LANGID_INUKTITUT_CANADA_LATIN}
    • - *
    • {@link #TT_MS_LANGID_AMHARIC_ETHIOPIA TT_MS_LANGID_AMHARIC_ETHIOPIA}
    • - *
    • {@link #TT_MS_LANGID_TAMAZIGHT_ALGERIA TT_MS_LANGID_TAMAZIGHT_ALGERIA}
    • - *
    • {@link #TT_MS_LANGID_NEPALI_NEPAL TT_MS_LANGID_NEPALI_NEPAL}
    • - *
    • {@link #TT_MS_LANGID_FRISIAN_NETHERLANDS TT_MS_LANGID_FRISIAN_NETHERLANDS}
    • - *
    • {@link #TT_MS_LANGID_PASHTO_AFGHANISTAN TT_MS_LANGID_PASHTO_AFGHANISTAN}
    • - *
    • {@link #TT_MS_LANGID_FILIPINO_PHILIPPINES TT_MS_LANGID_FILIPINO_PHILIPPINES}
    • - *
    • {@link #TT_MS_LANGID_DHIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES}
    • - *
    • {@link #TT_MS_LANGID_HAUSA_NIGERIA TT_MS_LANGID_HAUSA_NIGERIA}
    • - *
    • {@link #TT_MS_LANGID_YORUBA_NIGERIA TT_MS_LANGID_YORUBA_NIGERIA}
    • - *
    • {@link #TT_MS_LANGID_QUECHUA_BOLIVIA TT_MS_LANGID_QUECHUA_BOLIVIA}
    • - *
    • {@link #TT_MS_LANGID_QUECHUA_ECUADOR TT_MS_LANGID_QUECHUA_ECUADOR}
    • - *
    • {@link #TT_MS_LANGID_QUECHUA_PERU TT_MS_LANGID_QUECHUA_PERU}
    • - *
    • {@link #TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA}
    • - *
    • {@link #TT_MS_LANGID_BASHKIR_RUSSIA TT_MS_LANGID_BASHKIR_RUSSIA}
    • - *
    • {@link #TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG}
    • - *
    • {@link #TT_MS_LANGID_GREENLANDIC_GREENLAND TT_MS_LANGID_GREENLANDIC_GREENLAND}
    • - *
    • {@link #TT_MS_LANGID_IGBO_NIGERIA TT_MS_LANGID_IGBO_NIGERIA}
    • - *
    • {@link #TT_MS_LANGID_YI_PRC TT_MS_LANGID_YI_PRC}
    • - *
    • {@link #TT_MS_LANGID_MAPUDUNGUN_CHILE TT_MS_LANGID_MAPUDUNGUN_CHILE}
    • - *
    • {@link #TT_MS_LANGID_MOHAWK_MOHAWK TT_MS_LANGID_MOHAWK_MOHAWK}
    • - *
    • {@link #TT_MS_LANGID_BRETON_FRANCE TT_MS_LANGID_BRETON_FRANCE}
    • - *
    • {@link #TT_MS_LANGID_UIGHUR_PRC TT_MS_LANGID_UIGHUR_PRC}
    • - *
    • {@link #TT_MS_LANGID_MAORI_NEW_ZEALAND TT_MS_LANGID_MAORI_NEW_ZEALAND}
    • - *
    • {@link #TT_MS_LANGID_OCCITAN_FRANCE TT_MS_LANGID_OCCITAN_FRANCE}
    • - *
    • {@link #TT_MS_LANGID_CORSICAN_FRANCE TT_MS_LANGID_CORSICAN_FRANCE}
    • - *
    • {@link #TT_MS_LANGID_ALSATIAN_FRANCE TT_MS_LANGID_ALSATIAN_FRANCE}
    • - *
    • {@link #TT_MS_LANGID_YAKUT_RUSSIA TT_MS_LANGID_YAKUT_RUSSIA}
    • - *
    • {@link #TT_MS_LANGID_KICHE_GUATEMALA TT_MS_LANGID_KICHE_GUATEMALA}
    • - *
    • {@link #TT_MS_LANGID_KINYARWANDA_RWANDA TT_MS_LANGID_KINYARWANDA_RWANDA}
    • - *
    • {@link #TT_MS_LANGID_WOLOF_SENEGAL TT_MS_LANGID_WOLOF_SENEGAL}
    • - *
    • {@link #TT_MS_LANGID_DARI_AFGHANISTAN TT_MS_LANGID_DARI_AFGHANISTAN}
    • - *
    - */ - public static final int - TT_MS_LANGID_ARABIC_SAUDI_ARABIA = 0x0401, - TT_MS_LANGID_ARABIC_IRAQ = 0x0801, - TT_MS_LANGID_ARABIC_EGYPT = 0x0C01, - TT_MS_LANGID_ARABIC_LIBYA = 0x1001, - TT_MS_LANGID_ARABIC_ALGERIA = 0x1401, - TT_MS_LANGID_ARABIC_MOROCCO = 0x1801, - TT_MS_LANGID_ARABIC_TUNISIA = 0x1C01, - TT_MS_LANGID_ARABIC_OMAN = 0x2001, - TT_MS_LANGID_ARABIC_YEMEN = 0x2401, - TT_MS_LANGID_ARABIC_SYRIA = 0x2801, - TT_MS_LANGID_ARABIC_JORDAN = 0x2C01, - TT_MS_LANGID_ARABIC_LEBANON = 0x3001, - TT_MS_LANGID_ARABIC_KUWAIT = 0x3401, - TT_MS_LANGID_ARABIC_UAE = 0x3801, - TT_MS_LANGID_ARABIC_BAHRAIN = 0x3C01, - TT_MS_LANGID_ARABIC_QATAR = 0x4001, - TT_MS_LANGID_BULGARIAN_BULGARIA = 0x0402, - TT_MS_LANGID_CATALAN_CATALAN = 0x0403, - TT_MS_LANGID_CHINESE_TAIWAN = 0x0404, - TT_MS_LANGID_CHINESE_PRC = 0x0804, - TT_MS_LANGID_CHINESE_HONG_KONG = 0x0C04, - TT_MS_LANGID_CHINESE_SINGAPORE = 0x1004, - TT_MS_LANGID_CHINESE_MACAO = 0x1404, - TT_MS_LANGID_CZECH_CZECH_REPUBLIC = 0x0405, - TT_MS_LANGID_DANISH_DENMARK = 0x0406, - TT_MS_LANGID_GERMAN_GERMANY = 0x0407, - TT_MS_LANGID_GERMAN_SWITZERLAND = 0x0807, - TT_MS_LANGID_GERMAN_AUSTRIA = 0x0C07, - TT_MS_LANGID_GERMAN_LUXEMBOURG = 0x1007, - TT_MS_LANGID_GERMAN_LIECHTENSTEIN = 0x1407, - TT_MS_LANGID_GREEK_GREECE = 0x0408, - TT_MS_LANGID_ENGLISH_UNITED_STATES = 0x0409, - TT_MS_LANGID_ENGLISH_UNITED_KINGDOM = 0x0809, - TT_MS_LANGID_ENGLISH_AUSTRALIA = 0x0C09, - TT_MS_LANGID_ENGLISH_CANADA = 0x1009, - TT_MS_LANGID_ENGLISH_NEW_ZEALAND = 0x1409, - TT_MS_LANGID_ENGLISH_IRELAND = 0x1809, - TT_MS_LANGID_ENGLISH_SOUTH_AFRICA = 0x1C09, - TT_MS_LANGID_ENGLISH_JAMAICA = 0x2009, - TT_MS_LANGID_ENGLISH_CARIBBEAN = 0x2409, - TT_MS_LANGID_ENGLISH_BELIZE = 0x2809, - TT_MS_LANGID_ENGLISH_TRINIDAD = 0x2C09, - TT_MS_LANGID_ENGLISH_ZIMBABWE = 0x3009, - TT_MS_LANGID_ENGLISH_PHILIPPINES = 0x3409, - TT_MS_LANGID_ENGLISH_INDIA = 0x4009, - TT_MS_LANGID_ENGLISH_MALAYSIA = 0x4409, - TT_MS_LANGID_ENGLISH_SINGAPORE = 0x4809, - TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT = 0x040A, - TT_MS_LANGID_SPANISH_MEXICO = 0x080A, - TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT = 0x0C0A, - TT_MS_LANGID_SPANISH_GUATEMALA = 0x100A, - TT_MS_LANGID_SPANISH_COSTA_RICA = 0x140A, - TT_MS_LANGID_SPANISH_PANAMA = 0x180A, - TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC = 0x1C0A, - TT_MS_LANGID_SPANISH_VENEZUELA = 0x200A, - TT_MS_LANGID_SPANISH_COLOMBIA = 0x240A, - TT_MS_LANGID_SPANISH_PERU = 0x280A, - TT_MS_LANGID_SPANISH_ARGENTINA = 0x2C0A, - TT_MS_LANGID_SPANISH_ECUADOR = 0x300A, - TT_MS_LANGID_SPANISH_CHILE = 0x340A, - TT_MS_LANGID_SPANISH_URUGUAY = 0x380A, - TT_MS_LANGID_SPANISH_PARAGUAY = 0x3C0A, - TT_MS_LANGID_SPANISH_BOLIVIA = 0x400A, - TT_MS_LANGID_SPANISH_EL_SALVADOR = 0x440A, - TT_MS_LANGID_SPANISH_HONDURAS = 0x480A, - TT_MS_LANGID_SPANISH_NICARAGUA = 0x4C0A, - TT_MS_LANGID_SPANISH_PUERTO_RICO = 0x500A, - TT_MS_LANGID_SPANISH_UNITED_STATES = 0x540A, - TT_MS_LANGID_FINNISH_FINLAND = 0x040B, - TT_MS_LANGID_FRENCH_FRANCE = 0x040C, - TT_MS_LANGID_FRENCH_BELGIUM = 0x080C, - TT_MS_LANGID_FRENCH_CANADA = 0x0C0C, - TT_MS_LANGID_FRENCH_SWITZERLAND = 0x100C, - TT_MS_LANGID_FRENCH_LUXEMBOURG = 0x140C, - TT_MS_LANGID_FRENCH_MONACO = 0x180C, - TT_MS_LANGID_HEBREW_ISRAEL = 0x040D, - TT_MS_LANGID_HUNGARIAN_HUNGARY = 0x040E, - TT_MS_LANGID_ICELANDIC_ICELAND = 0x040F, - TT_MS_LANGID_ITALIAN_ITALY = 0x0410, - TT_MS_LANGID_ITALIAN_SWITZERLAND = 0x0810, - TT_MS_LANGID_JAPANESE_JAPAN = 0x0411, - TT_MS_LANGID_KOREAN_KOREA = 0x0412, - TT_MS_LANGID_DUTCH_NETHERLANDS = 0x0413, - TT_MS_LANGID_DUTCH_BELGIUM = 0x0813, - TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL = 0x0414, - TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK = 0x0814, - TT_MS_LANGID_POLISH_POLAND = 0x0415, - TT_MS_LANGID_PORTUGUESE_BRAZIL = 0x0416, - TT_MS_LANGID_PORTUGUESE_PORTUGAL = 0x0816, - TT_MS_LANGID_ROMANSH_SWITZERLAND = 0x0417, - TT_MS_LANGID_ROMANIAN_ROMANIA = 0x0418, - TT_MS_LANGID_RUSSIAN_RUSSIA = 0x0419, - TT_MS_LANGID_CROATIAN_CROATIA = 0x041A, - TT_MS_LANGID_SERBIAN_SERBIA_LATIN = 0x081A, - TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC = 0x0C1A, - TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA = 0x101A, - TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA = 0x141A, - TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN = 0x181A, - TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC = 0x1C1A, - TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC = 0x201A, - TT_MS_LANGID_SLOVAK_SLOVAKIA = 0x041B, - TT_MS_LANGID_ALBANIAN_ALBANIA = 0x041C, - TT_MS_LANGID_SWEDISH_SWEDEN = 0x041D, - TT_MS_LANGID_SWEDISH_FINLAND = 0x081D, - TT_MS_LANGID_THAI_THAILAND = 0x041E, - TT_MS_LANGID_TURKISH_TURKEY = 0x041F, - TT_MS_LANGID_URDU_PAKISTAN = 0x0420, - TT_MS_LANGID_INDONESIAN_INDONESIA = 0x0421, - TT_MS_LANGID_UKRAINIAN_UKRAINE = 0x0422, - TT_MS_LANGID_BELARUSIAN_BELARUS = 0x0423, - TT_MS_LANGID_SLOVENIAN_SLOVENIA = 0x0424, - TT_MS_LANGID_ESTONIAN_ESTONIA = 0x0425, - TT_MS_LANGID_LATVIAN_LATVIA = 0x0426, - TT_MS_LANGID_LITHUANIAN_LITHUANIA = 0x0427, - TT_MS_LANGID_TAJIK_TAJIKISTAN = 0x0428, - TT_MS_LANGID_VIETNAMESE_VIET_NAM = 0x042A, - TT_MS_LANGID_ARMENIAN_ARMENIA = 0x042B, - TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN = 0x042C, - TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC = 0x082C, - TT_MS_LANGID_BASQUE_BASQUE = 0x042D, - TT_MS_LANGID_UPPER_SORBIAN_GERMANY = 0x042E, - TT_MS_LANGID_LOWER_SORBIAN_GERMANY = 0x082E, - TT_MS_LANGID_MACEDONIAN_MACEDONIA = 0x042F, - TT_MS_LANGID_SETSWANA_SOUTH_AFRICA = 0x0432, - TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA = 0x0434, - TT_MS_LANGID_ISIZULU_SOUTH_AFRICA = 0x0435, - TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA = 0x0436, - TT_MS_LANGID_GEORGIAN_GEORGIA = 0x0437, - TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS = 0x0438, - TT_MS_LANGID_HINDI_INDIA = 0x0439, - TT_MS_LANGID_MALTESE_MALTA = 0x043A, - TT_MS_LANGID_SAMI_NORTHERN_NORWAY = 0x043B, - TT_MS_LANGID_SAMI_NORTHERN_SWEDEN = 0x083B, - TT_MS_LANGID_SAMI_NORTHERN_FINLAND = 0x0C3B, - TT_MS_LANGID_SAMI_LULE_NORWAY = 0x103B, - TT_MS_LANGID_SAMI_LULE_SWEDEN = 0x143B, - TT_MS_LANGID_SAMI_SOUTHERN_NORWAY = 0x183B, - TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN = 0x1C3B, - TT_MS_LANGID_SAMI_SKOLT_FINLAND = 0x203B, - TT_MS_LANGID_SAMI_INARI_FINLAND = 0x243B, - TT_MS_LANGID_IRISH_IRELAND = 0x083C, - TT_MS_LANGID_MALAY_MALAYSIA = 0x043E, - TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM = 0x083E, - TT_MS_LANGID_KAZAKH_KAZAKHSTAN = 0x043F, - TT_MS_LANGID_KYRGYZ_KYRGYZSTAN = 0x0440, - TT_MS_LANGID_KISWAHILI_KENYA = 0x0441, - TT_MS_LANGID_TURKMEN_TURKMENISTAN = 0x0442, - TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN = 0x0443, - TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC = 0x0843, - TT_MS_LANGID_TATAR_RUSSIA = 0x0444, - TT_MS_LANGID_BENGALI_INDIA = 0x0445, - TT_MS_LANGID_BENGALI_BANGLADESH = 0x0845, - TT_MS_LANGID_PUNJABI_INDIA = 0x0446, - TT_MS_LANGID_GUJARATI_INDIA = 0x0447, - TT_MS_LANGID_ODIA_INDIA = 0x0448, - TT_MS_LANGID_TAMIL_INDIA = 0x0449, - TT_MS_LANGID_TELUGU_INDIA = 0x044A, - TT_MS_LANGID_KANNADA_INDIA = 0x044B, - TT_MS_LANGID_MALAYALAM_INDIA = 0x044C, - TT_MS_LANGID_ASSAMESE_INDIA = 0x044D, - TT_MS_LANGID_MARATHI_INDIA = 0x044E, - TT_MS_LANGID_SANSKRIT_INDIA = 0x044F, - TT_MS_LANGID_MONGOLIAN_MONGOLIA = 0x0450, - TT_MS_LANGID_MONGOLIAN_PRC = 0x0850, - TT_MS_LANGID_TIBETAN_PRC = 0x0451, - TT_MS_LANGID_WELSH_UNITED_KINGDOM = 0x0452, - TT_MS_LANGID_KHMER_CAMBODIA = 0x0453, - TT_MS_LANGID_LAO_LAOS = 0x0454, - TT_MS_LANGID_GALICIAN_GALICIAN = 0x0456, - TT_MS_LANGID_KONKANI_INDIA = 0x0457, - TT_MS_LANGID_SYRIAC_SYRIA = 0x045A, - TT_MS_LANGID_SINHALA_SRI_LANKA = 0x045B, - TT_MS_LANGID_INUKTITUT_CANADA = 0x045D, - TT_MS_LANGID_INUKTITUT_CANADA_LATIN = 0x085D, - TT_MS_LANGID_AMHARIC_ETHIOPIA = 0x045E, - TT_MS_LANGID_TAMAZIGHT_ALGERIA = 0x085F, - TT_MS_LANGID_NEPALI_NEPAL = 0x0461, - TT_MS_LANGID_FRISIAN_NETHERLANDS = 0x0462, - TT_MS_LANGID_PASHTO_AFGHANISTAN = 0x0463, - TT_MS_LANGID_FILIPINO_PHILIPPINES = 0x0464, - TT_MS_LANGID_DHIVEHI_MALDIVES = 0x0465, - TT_MS_LANGID_HAUSA_NIGERIA = 0x0468, - TT_MS_LANGID_YORUBA_NIGERIA = 0x046A, - TT_MS_LANGID_QUECHUA_BOLIVIA = 0x046B, - TT_MS_LANGID_QUECHUA_ECUADOR = 0x086B, - TT_MS_LANGID_QUECHUA_PERU = 0x0C6B, - TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA = 0x046C, - TT_MS_LANGID_BASHKIR_RUSSIA = 0x046D, - TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG = 0x046E, - TT_MS_LANGID_GREENLANDIC_GREENLAND = 0x046F, - TT_MS_LANGID_IGBO_NIGERIA = 0x0470, - TT_MS_LANGID_YI_PRC = 0x0478, - TT_MS_LANGID_MAPUDUNGUN_CHILE = 0x047A, - TT_MS_LANGID_MOHAWK_MOHAWK = 0x047C, - TT_MS_LANGID_BRETON_FRANCE = 0x047E, - TT_MS_LANGID_UIGHUR_PRC = 0x0480, - TT_MS_LANGID_MAORI_NEW_ZEALAND = 0x0481, - TT_MS_LANGID_OCCITAN_FRANCE = 0x0482, - TT_MS_LANGID_CORSICAN_FRANCE = 0x0483, - TT_MS_LANGID_ALSATIAN_FRANCE = 0x0484, - TT_MS_LANGID_YAKUT_RUSSIA = 0x0485, - TT_MS_LANGID_KICHE_GUATEMALA = 0x0486, - TT_MS_LANGID_KINYARWANDA_RWANDA = 0x0487, - TT_MS_LANGID_WOLOF_SENEGAL = 0x0488, - TT_MS_LANGID_DARI_AFGHANISTAN = 0x048C; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #TT_NAME_ID_COPYRIGHT TT_NAME_ID_COPYRIGHT}
    • - *
    • {@link #TT_NAME_ID_FONT_FAMILY TT_NAME_ID_FONT_FAMILY}
    • - *
    • {@link #TT_NAME_ID_FONT_SUBFAMILY TT_NAME_ID_FONT_SUBFAMILY}
    • - *
    • {@link #TT_NAME_ID_UNIQUE_ID TT_NAME_ID_UNIQUE_ID}
    • - *
    • {@link #TT_NAME_ID_FULL_NAME TT_NAME_ID_FULL_NAME}
    • - *
    • {@link #TT_NAME_ID_VERSION_STRING TT_NAME_ID_VERSION_STRING}
    • - *
    • {@link #TT_NAME_ID_PS_NAME TT_NAME_ID_PS_NAME}
    • - *
    • {@link #TT_NAME_ID_TRADEMARK TT_NAME_ID_TRADEMARK}
    • - *
    • {@link #TT_NAME_ID_MANUFACTURER TT_NAME_ID_MANUFACTURER}
    • - *
    • {@link #TT_NAME_ID_DESIGNER TT_NAME_ID_DESIGNER}
    • - *
    • {@link #TT_NAME_ID_DESCRIPTION TT_NAME_ID_DESCRIPTION}
    • - *
    • {@link #TT_NAME_ID_VENDOR_URL TT_NAME_ID_VENDOR_URL}
    • - *
    • {@link #TT_NAME_ID_DESIGNER_URL TT_NAME_ID_DESIGNER_URL}
    • - *
    • {@link #TT_NAME_ID_LICENSE TT_NAME_ID_LICENSE}
    • - *
    • {@link #TT_NAME_ID_LICENSE_URL TT_NAME_ID_LICENSE_URL}
    • - *
    • {@link #TT_NAME_ID_TYPOGRAPHIC_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY}
    • - *
    • {@link #TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY}
    • - *
    • {@link #TT_NAME_ID_MAC_FULL_NAME TT_NAME_ID_MAC_FULL_NAME}
    • - *
    • {@link #TT_NAME_ID_SAMPLE_TEXT TT_NAME_ID_SAMPLE_TEXT}
    • - *
    • {@link #TT_NAME_ID_CID_FINDFONT_NAME TT_NAME_ID_CID_FINDFONT_NAME}
    • - *
    • {@link #TT_NAME_ID_WWS_FAMILY TT_NAME_ID_WWS_FAMILY}
    • - *
    • {@link #TT_NAME_ID_WWS_SUBFAMILY TT_NAME_ID_WWS_SUBFAMILY}
    • - *
    • {@link #TT_NAME_ID_LIGHT_BACKGROUND TT_NAME_ID_LIGHT_BACKGROUND}
    • - *
    • {@link #TT_NAME_ID_DARK_BACKGROUND TT_NAME_ID_DARK_BACKGROUND}
    • - *
    • {@link #TT_NAME_ID_VARIATIONS_PREFIX TT_NAME_ID_VARIATIONS_PREFIX}
    • - *
    - */ - public static final int - TT_NAME_ID_COPYRIGHT = 0, - TT_NAME_ID_FONT_FAMILY = 1, - TT_NAME_ID_FONT_SUBFAMILY = 2, - TT_NAME_ID_UNIQUE_ID = 3, - TT_NAME_ID_FULL_NAME = 4, - TT_NAME_ID_VERSION_STRING = 5, - TT_NAME_ID_PS_NAME = 6, - TT_NAME_ID_TRADEMARK = 7, - TT_NAME_ID_MANUFACTURER = 8, - TT_NAME_ID_DESIGNER = 9, - TT_NAME_ID_DESCRIPTION = 10, - TT_NAME_ID_VENDOR_URL = 11, - TT_NAME_ID_DESIGNER_URL = 12, - TT_NAME_ID_LICENSE = 13, - TT_NAME_ID_LICENSE_URL = 14, - TT_NAME_ID_TYPOGRAPHIC_FAMILY = 16, - TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY = 17, - TT_NAME_ID_MAC_FULL_NAME = 18, - TT_NAME_ID_SAMPLE_TEXT = 19, - TT_NAME_ID_CID_FINDFONT_NAME = 20, - TT_NAME_ID_WWS_FAMILY = 21, - TT_NAME_ID_WWS_SUBFAMILY = 22, - TT_NAME_ID_LIGHT_BACKGROUND = 23, - TT_NAME_ID_DARK_BACKGROUND = 24, - TT_NAME_ID_VARIATIONS_PREFIX = 25; - - /** - *
    Enum values:
    - * - *
      - *
    • {@link #TT_UCR_BASIC_LATIN TT_UCR_BASIC_LATIN}
    • - *
    • {@link #TT_UCR_LATIN1_SUPPLEMENT TT_UCR_LATIN1_SUPPLEMENT}
    • - *
    • {@link #TT_UCR_LATIN_EXTENDED_A TT_UCR_LATIN_EXTENDED_A}
    • - *
    • {@link #TT_UCR_LATIN_EXTENDED_B TT_UCR_LATIN_EXTENDED_B}
    • - *
    • {@link #TT_UCR_IPA_EXTENSIONS TT_UCR_IPA_EXTENSIONS}
    • - *
    • {@link #TT_UCR_SPACING_MODIFIER TT_UCR_SPACING_MODIFIER}
    • - *
    • {@link #TT_UCR_COMBINING_DIACRITICAL_MARKS TT_UCR_COMBINING_DIACRITICAL_MARKS}
    • - *
    • {@link #TT_UCR_GREEK TT_UCR_GREEK}
    • - *
    • {@link #TT_UCR_COPTIC TT_UCR_COPTIC}
    • - *
    • {@link #TT_UCR_CYRILLIC TT_UCR_CYRILLIC}
    • - *
    • {@link #TT_UCR_ARMENIAN TT_UCR_ARMENIAN}
    • - *
    • {@link #TT_UCR_HEBREW TT_UCR_HEBREW}
    • - *
    • {@link #TT_UCR_VAI TT_UCR_VAI}
    • - *
    • {@link #TT_UCR_ARABIC TT_UCR_ARABIC}
    • - *
    • {@link #TT_UCR_NKO TT_UCR_NKO}
    • - *
    • {@link #TT_UCR_DEVANAGARI TT_UCR_DEVANAGARI}
    • - *
    • {@link #TT_UCR_BENGALI TT_UCR_BENGALI}
    • - *
    • {@link #TT_UCR_GURMUKHI TT_UCR_GURMUKHI}
    • - *
    • {@link #TT_UCR_GUJARATI TT_UCR_GUJARATI}
    • - *
    • {@link #TT_UCR_ORIYA TT_UCR_ORIYA}
    • - *
    • {@link #TT_UCR_TAMIL TT_UCR_TAMIL}
    • - *
    • {@link #TT_UCR_TELUGU TT_UCR_TELUGU}
    • - *
    • {@link #TT_UCR_KANNADA TT_UCR_KANNADA}
    • - *
    • {@link #TT_UCR_MALAYALAM TT_UCR_MALAYALAM}
    • - *
    • {@link #TT_UCR_THAI TT_UCR_THAI}
    • - *
    • {@link #TT_UCR_LAO TT_UCR_LAO}
    • - *
    • {@link #TT_UCR_GEORGIAN TT_UCR_GEORGIAN}
    • - *
    • {@link #TT_UCR_BALINESE TT_UCR_BALINESE}
    • - *
    • {@link #TT_UCR_HANGUL_JAMO TT_UCR_HANGUL_JAMO}
    • - *
    • {@link #TT_UCR_LATIN_EXTENDED_ADDITIONAL TT_UCR_LATIN_EXTENDED_ADDITIONAL}
    • - *
    • {@link #TT_UCR_GREEK_EXTENDED TT_UCR_GREEK_EXTENDED}
    • - *
    • {@link #TT_UCR_GENERAL_PUNCTUATION TT_UCR_GENERAL_PUNCTUATION}
    • - *
    • {@link #TT_UCR_SUPERSCRIPTS_SUBSCRIPTS TT_UCR_SUPERSCRIPTS_SUBSCRIPTS}
    • - *
    • {@link #TT_UCR_CURRENCY_SYMBOLS TT_UCR_CURRENCY_SYMBOLS}
    • - *
    • {@link #TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB}
    • - *
    • {@link #TT_UCR_LETTERLIKE_SYMBOLS TT_UCR_LETTERLIKE_SYMBOLS}
    • - *
    • {@link #TT_UCR_NUMBER_FORMS TT_UCR_NUMBER_FORMS}
    • - *
    • {@link #TT_UCR_ARROWS TT_UCR_ARROWS}
    • - *
    • {@link #TT_UCR_MATHEMATICAL_OPERATORS TT_UCR_MATHEMATICAL_OPERATORS}
    • - *
    • {@link #TT_UCR_MISCELLANEOUS_TECHNICAL TT_UCR_MISCELLANEOUS_TECHNICAL}
    • - *
    • {@link #TT_UCR_CONTROL_PICTURES TT_UCR_CONTROL_PICTURES}
    • - *
    • {@link #TT_UCR_OCR TT_UCR_OCR}
    • - *
    • {@link #TT_UCR_ENCLOSED_ALPHANUMERICS TT_UCR_ENCLOSED_ALPHANUMERICS}
    • - *
    • {@link #TT_UCR_BOX_DRAWING TT_UCR_BOX_DRAWING}
    • - *
    • {@link #TT_UCR_BLOCK_ELEMENTS TT_UCR_BLOCK_ELEMENTS}
    • - *
    • {@link #TT_UCR_GEOMETRIC_SHAPES TT_UCR_GEOMETRIC_SHAPES}
    • - *
    • {@link #TT_UCR_MISCELLANEOUS_SYMBOLS TT_UCR_MISCELLANEOUS_SYMBOLS}
    • - *
    • {@link #TT_UCR_DINGBATS TT_UCR_DINGBATS}
    • - *
    • {@link #TT_UCR_CJK_SYMBOLS TT_UCR_CJK_SYMBOLS}
    • - *
    • {@link #TT_UCR_HIRAGANA TT_UCR_HIRAGANA}
    • - *
    • {@link #TT_UCR_KATAKANA TT_UCR_KATAKANA}
    • - *
    • {@link #TT_UCR_BOPOMOFO TT_UCR_BOPOMOFO}
    • - *
    • {@link #TT_UCR_HANGUL_COMPATIBILITY_JAMO TT_UCR_HANGUL_COMPATIBILITY_JAMO}
    • - *
    • {@link #TT_UCR_CJK_MISC TT_UCR_CJK_MISC}
    • - *
    • {@link #TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS}
    • - *
    • {@link #TT_UCR_CJK_COMPATIBILITY TT_UCR_CJK_COMPATIBILITY}
    • - *
    • {@link #TT_UCR_HANGUL TT_UCR_HANGUL}
    • - *
    • {@link #TT_UCR_SURROGATES TT_UCR_SURROGATES}
    • - *
    • {@link #TT_UCR_PHOENICIAN TT_UCR_PHOENICIAN}
    • - *
    • {@link #TT_UCR_CJK_UNIFIED_IDEOGRAPHS TT_UCR_CJK_UNIFIED_IDEOGRAPHS}
    • - *
    • {@link #TT_UCR_PRIVATE_USE TT_UCR_PRIVATE_USE}
    • - *
    • {@link #TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS}
    • - *
    • {@link #TT_UCR_ALPHABETIC_PRESENTATION_FORMS TT_UCR_ALPHABETIC_PRESENTATION_FORMS}
    • - *
    • {@link #TT_UCR_ARABIC_PRESENTATION_FORMS_A TT_UCR_ARABIC_PRESENTATION_FORMS_A}
    • - *
    • {@link #TT_UCR_COMBINING_HALF_MARKS TT_UCR_COMBINING_HALF_MARKS}
    • - *
    • {@link #TT_UCR_CJK_COMPATIBILITY_FORMS TT_UCR_CJK_COMPATIBILITY_FORMS}
    • - *
    • {@link #TT_UCR_SMALL_FORM_VARIANTS TT_UCR_SMALL_FORM_VARIANTS}
    • - *
    • {@link #TT_UCR_ARABIC_PRESENTATION_FORMS_B TT_UCR_ARABIC_PRESENTATION_FORMS_B}
    • - *
    • {@link #TT_UCR_HALFWIDTH_FULLWIDTH_FORMS TT_UCR_HALFWIDTH_FULLWIDTH_FORMS}
    • - *
    • {@link #TT_UCR_SPECIALS TT_UCR_SPECIALS}
    • - *
    • {@link #TT_UCR_TIBETAN TT_UCR_TIBETAN}
    • - *
    • {@link #TT_UCR_SYRIAC TT_UCR_SYRIAC}
    • - *
    • {@link #TT_UCR_THAANA TT_UCR_THAANA}
    • - *
    • {@link #TT_UCR_SINHALA TT_UCR_SINHALA}
    • - *
    • {@link #TT_UCR_MYANMAR TT_UCR_MYANMAR}
    • - *
    • {@link #TT_UCR_ETHIOPIC TT_UCR_ETHIOPIC}
    • - *
    • {@link #TT_UCR_CHEROKEE TT_UCR_CHEROKEE}
    • - *
    • {@link #TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS}
    • - *
    • {@link #TT_UCR_OGHAM TT_UCR_OGHAM}
    • - *
    • {@link #TT_UCR_RUNIC TT_UCR_RUNIC}
    • - *
    • {@link #TT_UCR_KHMER TT_UCR_KHMER}
    • - *
    • {@link #TT_UCR_MONGOLIAN TT_UCR_MONGOLIAN}
    • - *
    • {@link #TT_UCR_BRAILLE TT_UCR_BRAILLE}
    • - *
    • {@link #TT_UCR_YI TT_UCR_YI}
    • - *
    • {@link #TT_UCR_PHILIPPINE TT_UCR_PHILIPPINE}
    • - *
    • {@link #TT_UCR_OLD_ITALIC TT_UCR_OLD_ITALIC}
    • - *
    • {@link #TT_UCR_GOTHIC TT_UCR_GOTHIC}
    • - *
    • {@link #TT_UCR_DESERET TT_UCR_DESERET}
    • - *
    • {@link #TT_UCR_MUSICAL_SYMBOLS TT_UCR_MUSICAL_SYMBOLS}
    • - *
    • {@link #TT_UCR_MATH_ALPHANUMERIC_SYMBOLS TT_UCR_MATH_ALPHANUMERIC_SYMBOLS}
    • - *
    • {@link #TT_UCR_PRIVATE_USE_SUPPLEMENTARY TT_UCR_PRIVATE_USE_SUPPLEMENTARY}
    • - *
    • {@link #TT_UCR_VARIATION_SELECTORS TT_UCR_VARIATION_SELECTORS}
    • - *
    • {@link #TT_UCR_TAGS TT_UCR_TAGS}
    • - *
    • {@link #TT_UCR_LIMBU TT_UCR_LIMBU}
    • - *
    • {@link #TT_UCR_TAI_LE TT_UCR_TAI_LE}
    • - *
    • {@link #TT_UCR_NEW_TAI_LUE TT_UCR_NEW_TAI_LUE}
    • - *
    • {@link #TT_UCR_BUGINESE TT_UCR_BUGINESE}
    • - *
    • {@link #TT_UCR_GLAGOLITIC TT_UCR_GLAGOLITIC}
    • - *
    • {@link #TT_UCR_TIFINAGH TT_UCR_TIFINAGH}
    • - *
    • {@link #TT_UCR_YIJING TT_UCR_YIJING}
    • - *
    • {@link #TT_UCR_SYLOTI_NAGRI TT_UCR_SYLOTI_NAGRI}
    • - *
    • {@link #TT_UCR_LINEAR_B TT_UCR_LINEAR_B}
    • - *
    • {@link #TT_UCR_ANCIENT_GREEK_NUMBERS TT_UCR_ANCIENT_GREEK_NUMBERS}
    • - *
    • {@link #TT_UCR_UGARITIC TT_UCR_UGARITIC}
    • - *
    • {@link #TT_UCR_OLD_PERSIAN TT_UCR_OLD_PERSIAN}
    • - *
    • {@link #TT_UCR_SHAVIAN TT_UCR_SHAVIAN}
    • - *
    • {@link #TT_UCR_OSMANYA TT_UCR_OSMANYA}
    • - *
    • {@link #TT_UCR_CYPRIOT_SYLLABARY TT_UCR_CYPRIOT_SYLLABARY}
    • - *
    • {@link #TT_UCR_KHAROSHTHI TT_UCR_KHAROSHTHI}
    • - *
    • {@link #TT_UCR_TAI_XUAN_JING TT_UCR_TAI_XUAN_JING}
    • - *
    • {@link #TT_UCR_CUNEIFORM TT_UCR_CUNEIFORM}
    • - *
    • {@link #TT_UCR_COUNTING_ROD_NUMERALS TT_UCR_COUNTING_ROD_NUMERALS}
    • - *
    • {@link #TT_UCR_SUNDANESE TT_UCR_SUNDANESE}
    • - *
    • {@link #TT_UCR_LEPCHA TT_UCR_LEPCHA}
    • - *
    • {@link #TT_UCR_OL_CHIKI TT_UCR_OL_CHIKI}
    • - *
    • {@link #TT_UCR_SAURASHTRA TT_UCR_SAURASHTRA}
    • - *
    • {@link #TT_UCR_KAYAH_LI TT_UCR_KAYAH_LI}
    • - *
    • {@link #TT_UCR_REJANG TT_UCR_REJANG}
    • - *
    • {@link #TT_UCR_CHAM TT_UCR_CHAM}
    • - *
    • {@link #TT_UCR_ANCIENT_SYMBOLS TT_UCR_ANCIENT_SYMBOLS}
    • - *
    • {@link #TT_UCR_PHAISTOS_DISC TT_UCR_PHAISTOS_DISC}
    • - *
    • {@link #TT_UCR_OLD_ANATOLIAN TT_UCR_OLD_ANATOLIAN}
    • - *
    • {@link #TT_UCR_GAME_TILES TT_UCR_GAME_TILES}
    • - *
    - */ - public static final int - TT_UCR_BASIC_LATIN = 1 << 0, - TT_UCR_LATIN1_SUPPLEMENT = 1 << 1, - TT_UCR_LATIN_EXTENDED_A = 1 << 2, - TT_UCR_LATIN_EXTENDED_B = 1 << 3, - TT_UCR_IPA_EXTENSIONS = 1 << 4, - TT_UCR_SPACING_MODIFIER = 1 << 5, - TT_UCR_COMBINING_DIACRITICAL_MARKS = 1 << 6, - TT_UCR_GREEK = 1 << 7, - TT_UCR_COPTIC = 1 << 8, - TT_UCR_CYRILLIC = 1 << 9, - TT_UCR_ARMENIAN = 1 << 10, - TT_UCR_HEBREW = 1 << 11, - TT_UCR_VAI = 1 << 12, - TT_UCR_ARABIC = 1 << 13, - TT_UCR_NKO = 1 << 14, - TT_UCR_DEVANAGARI = 1 << 15, - TT_UCR_BENGALI = 1 << 16, - TT_UCR_GURMUKHI = 1 << 17, - TT_UCR_GUJARATI = 1 << 18, - TT_UCR_ORIYA = 1 << 19, - TT_UCR_TAMIL = 1 << 20, - TT_UCR_TELUGU = 1 << 21, - TT_UCR_KANNADA = 1 << 22, - TT_UCR_MALAYALAM = 1 << 23, - TT_UCR_THAI = 1 << 24, - TT_UCR_LAO = 1 << 25, - TT_UCR_GEORGIAN = 1 << 26, - TT_UCR_BALINESE = 1 << 27, - TT_UCR_HANGUL_JAMO = 1 << 28, - TT_UCR_LATIN_EXTENDED_ADDITIONAL = 1 << 29, - TT_UCR_GREEK_EXTENDED = 1 << 30, - TT_UCR_GENERAL_PUNCTUATION = 1 << 31, - TT_UCR_SUPERSCRIPTS_SUBSCRIPTS = 1 << 0, - TT_UCR_CURRENCY_SYMBOLS = 1 << 1, - TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB = 1 << 2, - TT_UCR_LETTERLIKE_SYMBOLS = 1 << 3, - TT_UCR_NUMBER_FORMS = 1 << 4, - TT_UCR_ARROWS = 1 << 5, - TT_UCR_MATHEMATICAL_OPERATORS = 1 << 6, - TT_UCR_MISCELLANEOUS_TECHNICAL = 1 << 7, - TT_UCR_CONTROL_PICTURES = 1 << 8, - TT_UCR_OCR = 1 << 9, - TT_UCR_ENCLOSED_ALPHANUMERICS = 1 << 10, - TT_UCR_BOX_DRAWING = 1 << 11, - TT_UCR_BLOCK_ELEMENTS = 1 << 12, - TT_UCR_GEOMETRIC_SHAPES = 1 << 13, - TT_UCR_MISCELLANEOUS_SYMBOLS = 1 << 14, - TT_UCR_DINGBATS = 1 << 15, - TT_UCR_CJK_SYMBOLS = 1 << 16, - TT_UCR_HIRAGANA = 1 << 17, - TT_UCR_KATAKANA = 1 << 18, - TT_UCR_BOPOMOFO = 1 << 19, - TT_UCR_HANGUL_COMPATIBILITY_JAMO = 1 << 20, - TT_UCR_CJK_MISC = 1 << 21, - TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS = 1 << 22, - TT_UCR_CJK_COMPATIBILITY = 1 << 23, - TT_UCR_HANGUL = 1 << 24, - TT_UCR_SURROGATES = 1 << 25, - TT_UCR_PHOENICIAN = 1 << 26, - TT_UCR_CJK_UNIFIED_IDEOGRAPHS = 1 << 27, - TT_UCR_PRIVATE_USE = 1 << 28, - TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS = 1 << 29, - TT_UCR_ALPHABETIC_PRESENTATION_FORMS = 1 << 30, - TT_UCR_ARABIC_PRESENTATION_FORMS_A = 1 << 31, - TT_UCR_COMBINING_HALF_MARKS = 1 << 0, - TT_UCR_CJK_COMPATIBILITY_FORMS = 1 << 1, - TT_UCR_SMALL_FORM_VARIANTS = 1 << 2, - TT_UCR_ARABIC_PRESENTATION_FORMS_B = 1 << 3, - TT_UCR_HALFWIDTH_FULLWIDTH_FORMS = 1 << 4, - TT_UCR_SPECIALS = 1 << 5, - TT_UCR_TIBETAN = 1 << 6, - TT_UCR_SYRIAC = 1 << 7, - TT_UCR_THAANA = 1 << 8, - TT_UCR_SINHALA = 1 << 9, - TT_UCR_MYANMAR = 1 << 10, - TT_UCR_ETHIOPIC = 1 << 11, - TT_UCR_CHEROKEE = 1 << 12, - TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS = 1 << 13, - TT_UCR_OGHAM = 1 << 14, - TT_UCR_RUNIC = 1 << 15, - TT_UCR_KHMER = 1 << 16, - TT_UCR_MONGOLIAN = 1 << 17, - TT_UCR_BRAILLE = 1 << 18, - TT_UCR_YI = 1 << 19, - TT_UCR_PHILIPPINE = 1 << 20, - TT_UCR_OLD_ITALIC = 1 << 21, - TT_UCR_GOTHIC = 1 << 22, - TT_UCR_DESERET = 1 << 23, - TT_UCR_MUSICAL_SYMBOLS = 1 << 24, - TT_UCR_MATH_ALPHANUMERIC_SYMBOLS = 1 << 25, - TT_UCR_PRIVATE_USE_SUPPLEMENTARY = 1 << 26, - TT_UCR_VARIATION_SELECTORS = 1 << 27, - TT_UCR_TAGS = 1 << 28, - TT_UCR_LIMBU = 1 << 29, - TT_UCR_TAI_LE = 1 << 30, - TT_UCR_NEW_TAI_LUE = 1 << 31, - TT_UCR_BUGINESE = 1 << 0, - TT_UCR_GLAGOLITIC = 1 << 1, - TT_UCR_TIFINAGH = 1 << 2, - TT_UCR_YIJING = 1 << 3, - TT_UCR_SYLOTI_NAGRI = 1 << 4, - TT_UCR_LINEAR_B = 1 << 5, - TT_UCR_ANCIENT_GREEK_NUMBERS = 1 << 6, - TT_UCR_UGARITIC = 1 << 7, - TT_UCR_OLD_PERSIAN = 1 << 8, - TT_UCR_SHAVIAN = 1 << 9, - TT_UCR_OSMANYA = 1 << 10, - TT_UCR_CYPRIOT_SYLLABARY = 1 << 11, - TT_UCR_KHAROSHTHI = 1 << 12, - TT_UCR_TAI_XUAN_JING = 1 << 13, - TT_UCR_CUNEIFORM = 1 << 14, - TT_UCR_COUNTING_ROD_NUMERALS = 1 << 15, - TT_UCR_SUNDANESE = 1 << 16, - TT_UCR_LEPCHA = 1 << 17, - TT_UCR_OL_CHIKI = 1 << 18, - TT_UCR_SAURASHTRA = 1 << 19, - TT_UCR_KAYAH_LI = 1 << 20, - TT_UCR_REJANG = 1 << 21, - TT_UCR_CHAM = 1 << 22, - TT_UCR_ANCIENT_SYMBOLS = 1 << 23, - TT_UCR_PHAISTOS_DISC = 1 << 24, - TT_UCR_OLD_ANATOLIAN = 1 << 25, - TT_UCR_GAME_TILES = 1 << 26; - - /** - * {@code FT_Sfnt_Tag} - * - *
    Enum values:
    - * - *
      - *
    • {@link #FT_SFNT_HEAD SFNT_HEAD}
    • - *
    • {@link #FT_SFNT_MAXP SFNT_MAXP}
    • - *
    • {@link #FT_SFNT_OS2 SFNT_OS2}
    • - *
    • {@link #FT_SFNT_HHEA SFNT_HHEA}
    • - *
    • {@link #FT_SFNT_VHEA SFNT_VHEA}
    • - *
    • {@link #FT_SFNT_POST SFNT_POST}
    • - *
    • {@link #FT_SFNT_PCLT SFNT_PCLT}
    • - *
    • {@link #FT_SFNT_MAX SFNT_MAX}
    • - *
    - */ - public static final int - FT_SFNT_HEAD = 0, - FT_SFNT_MAXP = 1, - FT_SFNT_OS2 = 2, - FT_SFNT_HHEA = 3, - FT_SFNT_VHEA = 4, - FT_SFNT_POST = 5, - FT_SFNT_PCLT = 6, - FT_SFNT_MAX = 7; - - public static final int - TTAG_avar = FT_MAKE_TAG( 'a', 'v', 'a', 'r' ), - TTAG_BASE = FT_MAKE_TAG( 'B', 'A', 'S', 'E' ), - TTAG_bdat = FT_MAKE_TAG( 'b', 'd', 'a', 't' ), - TTAG_BDF = FT_MAKE_TAG( 'B', 'D', 'F', ' ' ), - TTAG_bhed = FT_MAKE_TAG( 'b', 'h', 'e', 'd' ), - TTAG_bloc = FT_MAKE_TAG( 'b', 'l', 'o', 'c' ), - TTAG_bsln = FT_MAKE_TAG( 'b', 's', 'l', 'n' ), - TTAG_CBDT = FT_MAKE_TAG( 'C', 'B', 'D', 'T' ), - TTAG_CBLC = FT_MAKE_TAG( 'C', 'B', 'L', 'C' ), - TTAG_CFF = FT_MAKE_TAG( 'C', 'F', 'F', ' ' ), - TTAG_CFF2 = FT_MAKE_TAG( 'C', 'F', 'F', '2' ), - TTAG_CID = FT_MAKE_TAG( 'C', 'I', 'D', ' ' ), - TTAG_cmap = FT_MAKE_TAG( 'c', 'm', 'a', 'p' ), - TTAG_COLR = FT_MAKE_TAG( 'C', 'O', 'L', 'R' ), - TTAG_CPAL = FT_MAKE_TAG( 'C', 'P', 'A', 'L' ), - TTAG_cvar = FT_MAKE_TAG( 'c', 'v', 'a', 'r' ), - TTAG_cvt = FT_MAKE_TAG( 'c', 'v', 't', ' ' ), - TTAG_DSIG = FT_MAKE_TAG( 'D', 'S', 'I', 'G' ), - TTAG_EBDT = FT_MAKE_TAG( 'E', 'B', 'D', 'T' ), - TTAG_EBLC = FT_MAKE_TAG( 'E', 'B', 'L', 'C' ), - TTAG_EBSC = FT_MAKE_TAG( 'E', 'B', 'S', 'C' ), - TTAG_feat = FT_MAKE_TAG( 'f', 'e', 'a', 't' ), - TTAG_FOND = FT_MAKE_TAG( 'F', 'O', 'N', 'D' ), - TTAG_fpgm = FT_MAKE_TAG( 'f', 'p', 'g', 'm' ), - TTAG_fvar = FT_MAKE_TAG( 'f', 'v', 'a', 'r' ), - TTAG_gasp = FT_MAKE_TAG( 'g', 'a', 's', 'p' ), - TTAG_GDEF = FT_MAKE_TAG( 'G', 'D', 'E', 'F' ), - TTAG_glyf = FT_MAKE_TAG( 'g', 'l', 'y', 'f' ), - TTAG_GPOS = FT_MAKE_TAG( 'G', 'P', 'O', 'S' ), - TTAG_GSUB = FT_MAKE_TAG( 'G', 'S', 'U', 'B' ), - TTAG_gvar = FT_MAKE_TAG( 'g', 'v', 'a', 'r' ), - TTAG_HVAR = FT_MAKE_TAG( 'H', 'V', 'A', 'R' ), - TTAG_hdmx = FT_MAKE_TAG( 'h', 'd', 'm', 'x' ), - TTAG_head = FT_MAKE_TAG( 'h', 'e', 'a', 'd' ), - TTAG_hhea = FT_MAKE_TAG( 'h', 'h', 'e', 'a' ), - TTAG_hmtx = FT_MAKE_TAG( 'h', 'm', 't', 'x' ), - TTAG_JSTF = FT_MAKE_TAG( 'J', 'S', 'T', 'F' ), - TTAG_just = FT_MAKE_TAG( 'j', 'u', 's', 't' ), - TTAG_kern = FT_MAKE_TAG( 'k', 'e', 'r', 'n' ), - TTAG_lcar = FT_MAKE_TAG( 'l', 'c', 'a', 'r' ), - TTAG_loca = FT_MAKE_TAG( 'l', 'o', 'c', 'a' ), - TTAG_LTSH = FT_MAKE_TAG( 'L', 'T', 'S', 'H' ), - TTAG_LWFN = FT_MAKE_TAG( 'L', 'W', 'F', 'N' ), - TTAG_MATH = FT_MAKE_TAG( 'M', 'A', 'T', 'H' ), - TTAG_maxp = FT_MAKE_TAG( 'm', 'a', 'x', 'p' ), - TTAG_META = FT_MAKE_TAG( 'M', 'E', 'T', 'A' ), - TTAG_MMFX = FT_MAKE_TAG( 'M', 'M', 'F', 'X' ), - TTAG_MMSD = FT_MAKE_TAG( 'M', 'M', 'S', 'D' ), - TTAG_mort = FT_MAKE_TAG( 'm', 'o', 'r', 't' ), - TTAG_morx = FT_MAKE_TAG( 'm', 'o', 'r', 'x' ), - TTAG_MVAR = FT_MAKE_TAG( 'M', 'V', 'A', 'R' ), - TTAG_name = FT_MAKE_TAG( 'n', 'a', 'm', 'e' ), - TTAG_opbd = FT_MAKE_TAG( 'o', 'p', 'b', 'd' ), - TTAG_OS2 = FT_MAKE_TAG( 'O', 'S', '/', '2' ), - TTAG_OTTO = FT_MAKE_TAG( 'O', 'T', 'T', 'O' ), - TTAG_PCLT = FT_MAKE_TAG( 'P', 'C', 'L', 'T' ), - TTAG_POST = FT_MAKE_TAG( 'P', 'O', 'S', 'T' ), - TTAG_post = FT_MAKE_TAG( 'p', 'o', 's', 't' ), - TTAG_prep = FT_MAKE_TAG( 'p', 'r', 'e', 'p' ), - TTAG_prop = FT_MAKE_TAG( 'p', 'r', 'o', 'p' ), - TTAG_sbix = FT_MAKE_TAG( 's', 'b', 'i', 'x' ), - TTAG_sfnt = FT_MAKE_TAG( 's', 'f', 'n', 't' ), - TTAG_SING = FT_MAKE_TAG( 'S', 'I', 'N', 'G' ), - TTAG_SVG = FT_MAKE_TAG( 'S', 'V', 'G', ' ' ), - TTAG_trak = FT_MAKE_TAG( 't', 'r', 'a', 'k' ), - TTAG_true = FT_MAKE_TAG( 't', 'r', 'u', 'e' ), - TTAG_ttc = FT_MAKE_TAG( 't', 't', 'c', ' ' ), - TTAG_ttcf = FT_MAKE_TAG( 't', 't', 'c', 'f' ), - TTAG_TYP1 = FT_MAKE_TAG( 'T', 'Y', 'P', '1' ), - TTAG_typ1 = FT_MAKE_TAG( 't', 'y', 'p', '1' ), - TTAG_VDMX = FT_MAKE_TAG( 'V', 'D', 'M', 'X' ), - TTAG_vhea = FT_MAKE_TAG( 'v', 'h', 'e', 'a' ), - TTAG_vmtx = FT_MAKE_TAG( 'v', 'm', 't', 'x' ), - TTAG_VVAR = FT_MAKE_TAG( 'V', 'V', 'A', 'R' ), - TTAG_wOFF = FT_MAKE_TAG( 'w', 'O', 'F', 'F' ), - TTAG_wOF2 = FT_MAKE_TAG( 'w', 'O', 'F', '2' ), - TTAG_0xA5kbd = FT_MAKE_TAG( 0xA5, 'k', 'b', 'd' ), - TTAG_0xA5lst = FT_MAKE_TAG( 0xA5, 'l', 's', 't' ); - - protected FreeType() { - throw new UnsupportedOperationException(); - } - - // --- [ FT_Init_FreeType ] --- - - public static int nFT_Init_FreeType(long alibrary) { - long __functionAddress = Functions.Init_FreeType; - return invokePI(alibrary, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Init_FreeType(@NativeType("FT_Library *") PointerBuffer alibrary) { - if (CHECKS) { - check(alibrary, 1); - } - return nFT_Init_FreeType(memAddress(alibrary)); - } - - // --- [ FT_Done_FreeType ] --- - - @NativeType("FT_Error") - public static int FT_Done_FreeType(@NativeType("FT_Library") long library) { - long __functionAddress = Functions.Done_FreeType; - if (CHECKS) { - check(library); - } - return invokePI(library, __functionAddress); - } - - // --- [ FT_New_Face ] --- - - public static int nFT_New_Face(long library, long filepathname, long face_index, long aface) { - long __functionAddress = Functions.New_Face; - if (CHECKS) { - check(library); - } - return invokePPNPI(library, filepathname, face_index, aface, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_New_Face(@NativeType("FT_Library") long library, @NativeType("char const *") ByteBuffer filepathname, @NativeType("FT_Long") long face_index, @NativeType("FT_Face *") PointerBuffer aface) { - if (CHECKS) { - checkNT1(filepathname); - check(aface, 1); - } - return nFT_New_Face(library, memAddress(filepathname), face_index, memAddress(aface)); - } - - @NativeType("FT_Error") - public static int FT_New_Face(@NativeType("FT_Library") long library, @NativeType("char const *") CharSequence filepathname, @NativeType("FT_Long") long face_index, @NativeType("FT_Face *") PointerBuffer aface) { - if (CHECKS) { - check(aface, 1); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filepathname, true); - long filepathnameEncoded = stack.getPointerAddress(); - return nFT_New_Face(library, filepathnameEncoded, face_index, memAddress(aface)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FT_New_Memory_Face ] --- - - public static int nFT_New_Memory_Face(long library, long file_base, long file_size, long face_index, long aface) { - long __functionAddress = Functions.New_Memory_Face; - if (CHECKS) { - check(library); - } - return invokePPNNPI(library, file_base, file_size, face_index, aface, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_New_Memory_Face(@NativeType("FT_Library") long library, @NativeType("FT_Byte const *") ByteBuffer file_base, @NativeType("FT_Long") long face_index, @NativeType("FT_Face *") PointerBuffer aface) { - if (CHECKS) { - check(aface, 1); - } - return nFT_New_Memory_Face(library, memAddress(file_base), file_base.remaining(), face_index, memAddress(aface)); - } - - // --- [ FT_Open_Face ] --- - - public static int nFT_Open_Face(long library, long args, long face_index, long aface) { - long __functionAddress = Functions.Open_Face; - if (CHECKS) { - check(library); - } - return invokePPNPI(library, args, face_index, aface, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Open_Face(@NativeType("FT_Library") long library, @NativeType("FT_Open_Args const *") FT_Open_Args args, @NativeType("FT_Long") long face_index, @NativeType("FT_Face *") PointerBuffer aface) { - if (CHECKS) { - check(aface, 1); - } - return nFT_Open_Face(library, args.address(), face_index, memAddress(aface)); - } - - // --- [ FT_Attach_File ] --- - - public static int nFT_Attach_File(long face, long filepathname) { - long __functionAddress = Functions.Attach_File; - return invokePPI(face, filepathname, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Attach_File(FT_Face face, @NativeType("char const *") ByteBuffer filepathname) { - if (CHECKS) { - checkNT1(filepathname); - } - return nFT_Attach_File(face.address(), memAddress(filepathname)); - } - - @NativeType("FT_Error") - public static int FT_Attach_File(FT_Face face, @NativeType("char const *") CharSequence filepathname) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(filepathname, true); - long filepathnameEncoded = stack.getPointerAddress(); - return nFT_Attach_File(face.address(), filepathnameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FT_Attach_Stream ] --- - - public static int nFT_Attach_Stream(long face, long parameters) { - long __functionAddress = Functions.Attach_Stream; - return invokePPI(face, parameters, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Attach_Stream(FT_Face face, @NativeType("FT_Open_Args const *") FT_Open_Args parameters) { - return nFT_Attach_Stream(face.address(), parameters.address()); - } - - // --- [ FT_Reference_Face ] --- - - public static int nFT_Reference_Face(long face) { - long __functionAddress = Functions.Reference_Face; - return invokePI(face, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Reference_Face(FT_Face face) { - return nFT_Reference_Face(face.address()); - } - - // --- [ FT_Done_Face ] --- - - public static int nFT_Done_Face(long face) { - long __functionAddress = Functions.Done_Face; - return invokePI(face, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Done_Face(FT_Face face) { - return nFT_Done_Face(face.address()); - } - - // --- [ FT_Select_Size ] --- - - public static int nFT_Select_Size(long face, int strike_index) { - long __functionAddress = Functions.Select_Size; - return invokePI(face, strike_index, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Select_Size(FT_Face face, @NativeType("FT_Int") int strike_index) { - return nFT_Select_Size(face.address(), strike_index); - } - - // --- [ FT_Request_Size ] --- - - public static int nFT_Request_Size(long face, long req) { - long __functionAddress = Functions.Request_Size; - return invokePPI(face, req, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Request_Size(FT_Face face, FT_Size_Request req) { - return nFT_Request_Size(face.address(), req.address()); - } - - // --- [ FT_Set_Char_Size ] --- - - public static int nFT_Set_Char_Size(long face, long char_width, long char_height, int horz_resolution, int vert_resolution) { - long __functionAddress = Functions.Set_Char_Size; - return invokePNNI(face, char_width, char_height, horz_resolution, vert_resolution, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_Char_Size(FT_Face face, @NativeType("FT_F26Dot6") long char_width, @NativeType("FT_F26Dot6") long char_height, @NativeType("FT_UInt") int horz_resolution, @NativeType("FT_UInt") int vert_resolution) { - return nFT_Set_Char_Size(face.address(), char_width, char_height, horz_resolution, vert_resolution); - } - - // --- [ FT_Set_Pixel_Sizes ] --- - - public static int nFT_Set_Pixel_Sizes(long face, int pixel_width, int pixel_height) { - long __functionAddress = Functions.Set_Pixel_Sizes; - return invokePI(face, pixel_width, pixel_height, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_Pixel_Sizes(FT_Face face, @NativeType("FT_UInt") int pixel_width, @NativeType("FT_UInt") int pixel_height) { - return nFT_Set_Pixel_Sizes(face.address(), pixel_width, pixel_height); - } - - // --- [ FT_Load_Glyph ] --- - - public static int nFT_Load_Glyph(long face, int glyph_index, int load_flags) { - long __functionAddress = Functions.Load_Glyph; - return invokePI(face, glyph_index, load_flags, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Load_Glyph(FT_Face face, @NativeType("FT_UInt") int glyph_index, @NativeType("FT_Int32") int load_flags) { - return nFT_Load_Glyph(face.address(), glyph_index, load_flags); - } - - // --- [ FT_Load_Char ] --- - - public static int nFT_Load_Char(long face, long char_code, int load_flags) { - long __functionAddress = Functions.Load_Char; - return invokePNI(face, char_code, load_flags, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Load_Char(FT_Face face, @NativeType("FT_ULong") long char_code, @NativeType("FT_Int32") int load_flags) { - return nFT_Load_Char(face.address(), char_code, load_flags); - } - - // --- [ FT_Set_Transform ] --- - - public static void nFT_Set_Transform(long face, long matrix, long delta) { - long __functionAddress = Functions.Set_Transform; - invokePPPV(face, matrix, delta, __functionAddress); - } - - public static void FT_Set_Transform(FT_Face face, @Nullable @NativeType("FT_Matrix *") FT_Matrix matrix, @Nullable @NativeType("FT_Vector *") FT_Vector delta) { - nFT_Set_Transform(face.address(), memAddressSafe(matrix), memAddressSafe(delta)); - } - - // --- [ FT_Get_Transform ] --- - - public static void nFT_Get_Transform(long face, long matrix, long delta) { - long __functionAddress = Functions.Get_Transform; - invokePPPV(face, matrix, delta, __functionAddress); - } - - public static void FT_Get_Transform(FT_Face face, @Nullable @NativeType("FT_Matrix *") FT_Matrix matrix, @Nullable @NativeType("FT_Vector *") FT_Vector delta) { - nFT_Get_Transform(face.address(), memAddressSafe(matrix), memAddressSafe(delta)); - } - - // --- [ FT_Render_Glyph ] --- - - public static int nFT_Render_Glyph(long slot, int render_mode) { - long __functionAddress = Functions.Render_Glyph; - return invokePI(slot, render_mode, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Render_Glyph(FT_GlyphSlot slot, @NativeType("FT_Render_Mode") int render_mode) { - return nFT_Render_Glyph(slot.address(), render_mode); - } - - // --- [ FT_Get_Kerning ] --- - - public static int nFT_Get_Kerning(long face, int left_glyph, int right_glyph, int kern_mode, long akerning) { - long __functionAddress = Functions.Get_Kerning; - return invokePPI(face, left_glyph, right_glyph, kern_mode, akerning, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Kerning(FT_Face face, @NativeType("FT_UInt") int left_glyph, @NativeType("FT_UInt") int right_glyph, @NativeType("FT_UInt") int kern_mode, @NativeType("FT_Vector *") FT_Vector akerning) { - return nFT_Get_Kerning(face.address(), left_glyph, right_glyph, kern_mode, akerning.address()); - } - - // --- [ FT_Get_Track_Kerning ] --- - - public static int nFT_Get_Track_Kerning(long face, long point_size, int degree, long akerning) { - long __functionAddress = Functions.Get_Track_Kerning; - return invokePNPI(face, point_size, degree, akerning, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Track_Kerning(FT_Face face, @NativeType("FT_Fixed") long point_size, @NativeType("FT_Int") int degree, @NativeType("FT_Fixed *") CLongBuffer akerning) { - if (CHECKS) { - check(akerning, 1); - } - return nFT_Get_Track_Kerning(face.address(), point_size, degree, memAddress(akerning)); - } - - // --- [ FT_Select_Charmap ] --- - - public static int nFT_Select_Charmap(long face, int encoding) { - long __functionAddress = Functions.Select_Charmap; - return invokePI(face, encoding, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Select_Charmap(FT_Face face, @NativeType("FT_Encoding") int encoding) { - return nFT_Select_Charmap(face.address(), encoding); - } - - // --- [ FT_Set_Charmap ] --- - - public static int nFT_Set_Charmap(long face, long charmap) { - long __functionAddress = Functions.Set_Charmap; - return invokePPI(face, charmap, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_Charmap(FT_Face face, FT_CharMap charmap) { - return nFT_Set_Charmap(face.address(), charmap.address()); - } - - // --- [ FT_Get_Charmap_Index ] --- - - public static int nFT_Get_Charmap_Index(long charmap) { - long __functionAddress = Functions.Get_Charmap_Index; - return invokePI(charmap, __functionAddress); - } - - @NativeType("FT_Int") - public static int FT_Get_Charmap_Index(FT_CharMap charmap) { - return nFT_Get_Charmap_Index(charmap.address()); - } - - // --- [ FT_Get_Char_Index ] --- - - public static int nFT_Get_Char_Index(long face, long charcode) { - long __functionAddress = Functions.Get_Char_Index; - return invokePNI(face, charcode, __functionAddress); - } - - @NativeType("FT_UInt") - public static int FT_Get_Char_Index(FT_Face face, @NativeType("FT_ULong") long charcode) { - return nFT_Get_Char_Index(face.address(), charcode); - } - - // --- [ FT_Get_First_Char ] --- - - public static long nFT_Get_First_Char(long face, long agindex) { - long __functionAddress = Functions.Get_First_Char; - return invokePPN(face, agindex, __functionAddress); - } - - @NativeType("FT_ULong") - public static long FT_Get_First_Char(FT_Face face, @NativeType("FT_UInt *") IntBuffer agindex) { - if (CHECKS) { - check(agindex, 1); - } - return nFT_Get_First_Char(face.address(), memAddress(agindex)); - } - - // --- [ FT_Get_Next_Char ] --- - - /** Unsafe version of: {@link #FT_Get_Next_Char Get_Next_Char} */ - public static long nFT_Get_Next_Char(long face, long char_code, long agindex) { - long __functionAddress = Functions.Get_Next_Char; - return invokePNPN(face, char_code, agindex, __functionAddress); - } - - /** @return : The charmap's next character code */ - @NativeType("FT_ULong") - public static long FT_Get_Next_Char(FT_Face face, @NativeType("FT_ULong") long char_code, @NativeType("FT_UInt *") IntBuffer agindex) { - if (CHECKS) { - check(agindex, 1); - } - return nFT_Get_Next_Char(face.address(), char_code, memAddress(agindex)); - } - - // --- [ FT_Face_Properties ] --- - - public static int nFT_Face_Properties(long face, int num_properties, long properties) { - long __functionAddress = Functions.Face_Properties; - return invokePPI(face, num_properties, properties, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Face_Properties(FT_Face face, @NativeType("FT_Parameter *") FT_Parameter.Buffer properties) { - return nFT_Face_Properties(face.address(), properties.remaining(), properties.address()); - } - - // --- [ FT_Get_Name_Index ] --- - - public static int nFT_Get_Name_Index(long face, long glyph_name) { - long __functionAddress = Functions.Get_Name_Index; - return invokePPI(face, glyph_name, __functionAddress); - } - - @NativeType("FT_UInt") - public static int FT_Get_Name_Index(FT_Face face, @NativeType("FT_String const *") ByteBuffer glyph_name) { - if (CHECKS) { - checkNT1(glyph_name); - } - return nFT_Get_Name_Index(face.address(), memAddress(glyph_name)); - } - - @NativeType("FT_UInt") - public static int FT_Get_Name_Index(FT_Face face, @NativeType("FT_String const *") CharSequence glyph_name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(glyph_name, true); - long glyph_nameEncoded = stack.getPointerAddress(); - return nFT_Get_Name_Index(face.address(), glyph_nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FT_Get_Glyph_Name ] --- - - public static int nFT_Get_Glyph_Name(long face, int glyph_index, long buffer, int buffer_max) { - long __functionAddress = Functions.Get_Glyph_Name; - return invokePPI(face, glyph_index, buffer, buffer_max, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Glyph_Name(FT_Face face, @NativeType("FT_UInt") int glyph_index, @NativeType("FT_Pointer") ByteBuffer buffer) { - return nFT_Get_Glyph_Name(face.address(), glyph_index, memAddress(buffer), buffer.remaining()); - } - - // --- [ FT_Get_Postscript_Name ] --- - - public static long nFT_Get_Postscript_Name(long face) { - long __functionAddress = Functions.Get_Postscript_Name; - return invokePP(face, __functionAddress); - } - - @Nullable - @NativeType("char const *") - public static String FT_Get_Postscript_Name(FT_Face face) { - long __result = nFT_Get_Postscript_Name(face.address()); - return memASCIISafe(__result); - } - - // --- [ FT_Get_SubGlyph_Info ] --- - - public static int nFT_Get_SubGlyph_Info(long glyph, int sub_index, long p_index, long p_flags, long p_arg1, long p_arg2, long p_transform) { - long __functionAddress = Functions.Get_SubGlyph_Info; - return invokePPPPPPI(glyph, sub_index, p_index, p_flags, p_arg1, p_arg2, p_transform, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_SubGlyph_Info(FT_GlyphSlot glyph, @NativeType("FT_UInt") int sub_index, @NativeType("FT_Int *") IntBuffer p_index, @NativeType("FT_UInt *") IntBuffer p_flags, @NativeType("FT_Int *") IntBuffer p_arg1, @NativeType("FT_Int *") IntBuffer p_arg2, @NativeType("FT_Matrix *") FT_Matrix p_transform) { - if (CHECKS) { - check(p_index, 1); - check(p_flags, 1); - check(p_arg1, 1); - check(p_arg2, 1); - } - return nFT_Get_SubGlyph_Info(glyph.address(), sub_index, memAddress(p_index), memAddress(p_flags), memAddress(p_arg1), memAddress(p_arg2), p_transform.address()); - } - - // --- [ FT_Get_FSType_Flags ] --- - - public static short nFT_Get_FSType_Flags(long face) { - long __functionAddress = Functions.Get_FSType_Flags; - return invokePC(face, __functionAddress); - } - - @NativeType("FT_UShort") - public static short FT_Get_FSType_Flags(FT_Face face) { - return nFT_Get_FSType_Flags(face.address()); - } - - // --- [ FT_Face_GetCharVariantIndex ] --- - - public static int nFT_Face_GetCharVariantIndex(long face, long charcode, long variantSelector) { - long __functionAddress = Functions.Face_GetCharVariantIndex; - return invokePNNI(face, charcode, variantSelector, __functionAddress); - } - - @NativeType("FT_UInt") - public static int FT_Face_GetCharVariantIndex(FT_Face face, @NativeType("FT_ULong") long charcode, @NativeType("FT_ULong") long variantSelector) { - return nFT_Face_GetCharVariantIndex(face.address(), charcode, variantSelector); - } - - // --- [ FT_Face_GetCharVariantIsDefault ] --- - - public static int nFT_Face_GetCharVariantIsDefault(long face, long charcode, long variantSelector) { - long __functionAddress = Functions.Face_GetCharVariantIsDefault; - return invokePNNI(face, charcode, variantSelector, __functionAddress); - } - - @NativeType("FT_Int") - public static int FT_Face_GetCharVariantIsDefault(FT_Face face, @NativeType("FT_ULong") long charcode, @NativeType("FT_ULong") long variantSelector) { - return nFT_Face_GetCharVariantIsDefault(face.address(), charcode, variantSelector); - } - - // --- [ FT_Face_GetVariantSelectors ] --- - - public static long nFT_Face_GetVariantSelectors(long face) { - long __functionAddress = Functions.Face_GetVariantSelectors; - return invokePP(face, __functionAddress); - } - - @NativeType("FT_UInt32 *") - public static long FT_Face_GetVariantSelectors(FT_Face face) { - return nFT_Face_GetVariantSelectors(face.address()); - } - - // --- [ FT_Face_GetVariantsOfChar ] --- - - public static long nFT_Face_GetVariantsOfChar(long face, long charcode) { - long __functionAddress = Functions.Face_GetVariantsOfChar; - return invokePNP(face, charcode, __functionAddress); - } - - @NativeType("FT_UInt32 *") - public static long FT_Face_GetVariantsOfChar(FT_Face face, @NativeType("FT_ULong") long charcode) { - return nFT_Face_GetVariantsOfChar(face.address(), charcode); - } - - // --- [ FT_Face_GetCharsOfVariant ] --- - - public static long nFT_Face_GetCharsOfVariant(long face, long variantSelector) { - long __functionAddress = Functions.Face_GetCharsOfVariant; - return invokePNP(face, variantSelector, __functionAddress); - } - - @NativeType("FT_UInt32 *") - public static long FT_Face_GetCharsOfVariant(FT_Face face, @NativeType("FT_ULong") long variantSelector) { - return nFT_Face_GetCharsOfVariant(face.address(), variantSelector); - } - - // --- [ FT_MulDiv ] --- - - @NativeType("FT_Long") - public static long FT_MulDiv(@NativeType("FT_Long") long a, @NativeType("FT_Long") long b, @NativeType("FT_Long") long c) { - long __functionAddress = Functions.MulDiv; - return invokeNNNN(a, b, c, __functionAddress); - } - - // --- [ FT_MulFix ] --- - - @NativeType("FT_Long") - public static long FT_MulFix(@NativeType("FT_Long") long a, @NativeType("FT_Long") long b) { - long __functionAddress = Functions.MulFix; - return invokeNNN(a, b, __functionAddress); - } - - // --- [ FT_DivFix ] --- - - @NativeType("FT_Long") - public static long FT_DivFix(@NativeType("FT_Long") long a, @NativeType("FT_Long") long b) { - long __functionAddress = Functions.DivFix; - return invokeNNN(a, b, __functionAddress); - } - - // --- [ FT_RoundFix ] --- - - @NativeType("FT_Fixed") - public static long FT_RoundFix(@NativeType("FT_Fixed") long a) { - long __functionAddress = Functions.RoundFix; - return invokeNN(a, __functionAddress); - } - - // --- [ FT_CeilFix ] --- - - @NativeType("FT_Fixed") - public static long FT_CeilFix(@NativeType("FT_Fixed") long a) { - long __functionAddress = Functions.CeilFix; - return invokeNN(a, __functionAddress); - } - - // --- [ FT_FloorFix ] --- - - @NativeType("FT_Fixed") - public static long FT_FloorFix(@NativeType("FT_Fixed") long a) { - long __functionAddress = Functions.FloorFix; - return invokeNN(a, __functionAddress); - } - - // --- [ FT_Vector_Transform ] --- - - public static void nFT_Vector_Transform(long vector, long matrix) { - long __functionAddress = Functions.Vector_Transform; - invokePPV(vector, matrix, __functionAddress); - } - - public static void FT_Vector_Transform(@NativeType("FT_Vector *") FT_Vector vector, @NativeType("FT_Matrix const *") FT_Matrix matrix) { - nFT_Vector_Transform(vector.address(), matrix.address()); - } - - // --- [ FT_Library_Version ] --- - - public static void nFT_Library_Version(long library, long amajor, long aminor, long apatch) { - long __functionAddress = Functions.Library_Version; - if (CHECKS) { - check(library); - } - invokePPPPV(library, amajor, aminor, apatch, __functionAddress); - } - - public static void FT_Library_Version(@NativeType("FT_Library") long library, @NativeType("FT_Int *") IntBuffer amajor, @NativeType("FT_Int *") IntBuffer aminor, @NativeType("FT_Int *") IntBuffer apatch) { - if (CHECKS) { - check(amajor, 1); - check(aminor, 1); - check(apatch, 1); - } - nFT_Library_Version(library, memAddress(amajor), memAddress(aminor), memAddress(apatch)); - } - - // --- [ FT_Face_CheckTrueTypePatents ] --- - - public static boolean nFT_Face_CheckTrueTypePatents(long face) { - long __functionAddress = Functions.Face_CheckTrueTypePatents; - return invokePZ(face, __functionAddress); - } - - @NativeType("FT_Bool") - public static boolean FT_Face_CheckTrueTypePatents(FT_Face face) { - return nFT_Face_CheckTrueTypePatents(face.address()); - } - - // --- [ FT_Face_SetUnpatentedHinting ] --- - - public static boolean nFT_Face_SetUnpatentedHinting(long face, boolean value) { - long __functionAddress = Functions.Face_SetUnpatentedHinting; - return invokePZ(face, value, __functionAddress); - } - - @NativeType("FT_Bool") - public static boolean FT_Face_SetUnpatentedHinting(FT_Face face, @NativeType("FT_Bool") boolean value) { - return nFT_Face_SetUnpatentedHinting(face.address(), value); - } - - // --- [ FT_Get_Advance ] --- - - public static int nFT_Get_Advance(long face, int gindex, int load_flags, long padvance) { - long __functionAddress = Functions.Get_Advance; - return invokePPI(face, gindex, load_flags, padvance, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Advance(FT_Face face, @NativeType("FT_UInt") int gindex, @NativeType("FT_Int32") int load_flags, @NativeType("FT_Fixed *") CLongBuffer padvance) { - if (CHECKS) { - check(padvance, 1); - } - return nFT_Get_Advance(face.address(), gindex, load_flags, memAddress(padvance)); - } - - // --- [ FT_Get_Advances ] --- - - public static int nFT_Get_Advances(long face, int start, int count, int load_flags, long padvances) { - long __functionAddress = Functions.Get_Advances; - return invokePPI(face, start, count, load_flags, padvances, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Advances(FT_Face face, @NativeType("FT_UInt") int start, @NativeType("FT_Int32") int load_flags, @NativeType("FT_Fixed *") CLongBuffer padvances) { - return nFT_Get_Advances(face.address(), start, padvances.remaining(), load_flags, memAddress(padvances)); - } - - // --- [ FT_Outline_Get_BBox ] --- - - public static int nFT_Outline_Get_BBox(long outline, long abbox) { - long __functionAddress = Functions.Outline_Get_BBox; - return invokePPI(outline, abbox, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Get_BBox(@NativeType("FT_Outline *") FT_Outline outline, @NativeType("FT_BBox *") FT_BBox abbox) { - return nFT_Outline_Get_BBox(outline.address(), abbox.address()); - } - - // --- [ FT_Get_BDF_Charset_ID ] --- - - public static int nFT_Get_BDF_Charset_ID(long face, long acharset_encoding, long acharset_registry) { - long __functionAddress = Functions.Get_BDF_Charset_ID; - return invokePPPI(face, acharset_encoding, acharset_registry, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_BDF_Charset_ID(FT_Face face, @NativeType("char const **") PointerBuffer acharset_encoding, @NativeType("char const **") PointerBuffer acharset_registry) { - if (CHECKS) { - check(acharset_encoding, 1); - check(acharset_registry, 1); - } - return nFT_Get_BDF_Charset_ID(face.address(), memAddress(acharset_encoding), memAddress(acharset_registry)); - } - - // --- [ FT_Get_BDF_Property ] --- - - public static int nFT_Get_BDF_Property(long face, long prop_name, long aproperty) { - long __functionAddress = Functions.Get_BDF_Property; - return invokePPPI(face, prop_name, aproperty, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_BDF_Property(FT_Face face, @NativeType("char const *") ByteBuffer prop_name, @NativeType("BDF_PropertyRec *") BDF_Property aproperty) { - if (CHECKS) { - checkNT1(prop_name); - } - return nFT_Get_BDF_Property(face.address(), memAddress(prop_name), aproperty.address()); - } - - @NativeType("FT_Error") - public static int FT_Get_BDF_Property(FT_Face face, @NativeType("char const *") CharSequence prop_name, @NativeType("BDF_PropertyRec *") BDF_Property aproperty) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(prop_name, true); - long prop_nameEncoded = stack.getPointerAddress(); - return nFT_Get_BDF_Property(face.address(), prop_nameEncoded, aproperty.address()); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FT_Bitmap_Init ] --- - - public static void nFT_Bitmap_Init(long abitmap) { - long __functionAddress = Functions.Bitmap_Init; - invokePV(abitmap, __functionAddress); - } - - public static void FT_Bitmap_Init(@NativeType("FT_Bitmap *") FT_Bitmap abitmap) { - nFT_Bitmap_Init(abitmap.address()); - } - - // --- [ FT_Bitmap_Copy ] --- - - public static int nFT_Bitmap_Copy(long library, long source, long target) { - long __functionAddress = Functions.Bitmap_Copy; - if (CHECKS) { - check(library); - } - return invokePPPI(library, source, target, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Bitmap_Copy(@NativeType("FT_Library") long library, @NativeType("FT_Bitmap const *") FT_Bitmap source, @NativeType("FT_Bitmap *") FT_Bitmap target) { - return nFT_Bitmap_Copy(library, source.address(), target.address()); - } - - // --- [ FT_Bitmap_Embolden ] --- - - public static int nFT_Bitmap_Embolden(long library, long bitmap, long xStrength, long yStrength) { - long __functionAddress = Functions.Bitmap_Embolden; - if (CHECKS) { - check(library); - } - return invokePPNNI(library, bitmap, xStrength, yStrength, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Bitmap_Embolden(@NativeType("FT_Library") long library, @NativeType("FT_Bitmap *") FT_Bitmap bitmap, @NativeType("FT_Pos") long xStrength, @NativeType("FT_Pos") long yStrength) { - return nFT_Bitmap_Embolden(library, bitmap.address(), xStrength, yStrength); - } - - // --- [ FT_Bitmap_Convert ] --- - - public static int nFT_Bitmap_Convert(long library, long source, long target, int alignment) { - long __functionAddress = Functions.Bitmap_Convert; - if (CHECKS) { - check(library); - } - return invokePPPI(library, source, target, alignment, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Bitmap_Convert(@NativeType("FT_Library") long library, @NativeType("FT_Bitmap const *") FT_Bitmap source, @NativeType("FT_Bitmap *") FT_Bitmap target, @NativeType("FT_Int") int alignment) { - return nFT_Bitmap_Convert(library, source.address(), target.address(), alignment); - } - - // --- [ FT_Bitmap_Blend ] --- - - private static final FFICIF FT_Bitmap_BlendCIF = apiCreateCIF( - FFI_DEFAULT_ABI, ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer, apiCreateStruct(ffi_type_slong, ffi_type_slong), ffi_type_pointer, ffi_type_pointer, apiCreateStruct(ffi_type_uint8, ffi_type_uint8, ffi_type_uint8, ffi_type_uint8) - ); - - public static int nFT_Bitmap_Blend(long library, long source, long source_offset, long target, long atarget_offset, long color) { - long __functionAddress = Functions.Bitmap_Blend; - if (CHECKS) { - check(library); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long __result = stack.nint(0); - long arguments = stack.nmalloc(POINTER_SIZE, POINTER_SIZE * 6); - memPutAddress(arguments, stack.npointer(library)); - memPutAddress(arguments + POINTER_SIZE, stack.npointer(source)); - memPutAddress(arguments + 2 * POINTER_SIZE, source_offset); - memPutAddress(arguments + 3 * POINTER_SIZE, stack.npointer(target)); - memPutAddress(arguments + 4 * POINTER_SIZE, stack.npointer(atarget_offset)); - memPutAddress(arguments + 5 * POINTER_SIZE, color); - - nffi_call(FT_Bitmap_BlendCIF.address(), __functionAddress, __result, arguments); - - return memGetInt(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - @NativeType("FT_Error") - public static int FT_Bitmap_Blend(@NativeType("FT_Library") long library, @NativeType("FT_Bitmap const *") FT_Bitmap source, @NativeType("FT_Vector const") FT_Vector source_offset, @NativeType("FT_Bitmap *") FT_Bitmap target, @NativeType("FT_Vector *") FT_Vector atarget_offset, FT_Color color) { - return nFT_Bitmap_Blend(library, source.address(), source_offset.address(), target.address(), atarget_offset.address(), color.address()); - } - - // --- [ FT_GlyphSlot_Own_Bitmap ] --- - - public static int nFT_GlyphSlot_Own_Bitmap(long slot) { - long __functionAddress = Functions.GlyphSlot_Own_Bitmap; - return invokePI(slot, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_GlyphSlot_Own_Bitmap(FT_GlyphSlot slot) { - return nFT_GlyphSlot_Own_Bitmap(slot.address()); - } - - // --- [ FT_Bitmap_Done ] --- - - public static int nFT_Bitmap_Done(long library, long bitmap) { - long __functionAddress = Functions.Bitmap_Done; - if (CHECKS) { - check(library); - } - return invokePPI(library, bitmap, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Bitmap_Done(@NativeType("FT_Library") long library, @NativeType("FT_Bitmap *") FT_Bitmap bitmap) { - return nFT_Bitmap_Done(library, bitmap.address()); - } - - // --- [ FT_Stream_OpenBzip2 ] --- - - public static int nFT_Stream_OpenBzip2(long stream, long source) { - long __functionAddress = Functions.Stream_OpenBzip2; - if (CHECKS) { - check(__functionAddress); - } - return invokePPI(stream, source, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stream_OpenBzip2(FT_Stream stream, FT_Stream source) { - return nFT_Stream_OpenBzip2(stream.address(), source.address()); - } - - // --- [ FTC_Manager_New ] --- - - public static int nFTC_Manager_New(long library, int max_faces, int max_sizes, long max_bytes, long requester, long req_data, long amanager) { - long __functionAddress = Functions.FTC_Manager_New; - if (CHECKS) { - check(library); - } - return invokePNPPPI(library, max_faces, max_sizes, max_bytes, requester, req_data, amanager, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_Manager_New(@NativeType("FT_Library") long library, @NativeType("FT_UInt") int max_faces, @NativeType("FT_UInt") int max_sizes, @NativeType("FT_ULong") long max_bytes, @NativeType("FTC_Face_Requester") FTC_Face_RequesterI requester, @Nullable @NativeType("FT_Pointer") ByteBuffer req_data, @NativeType("FTC_Manager *") PointerBuffer amanager) { - if (CHECKS) { - check(amanager, 1); - } - return nFTC_Manager_New(library, max_faces, max_sizes, max_bytes, requester.address(), memAddressSafe(req_data), memAddress(amanager)); - } - - // --- [ FTC_Manager_Reset ] --- - - public static void FTC_Manager_Reset(@NativeType("FTC_Manager") long manager) { - long __functionAddress = Functions.FTC_Manager_Reset; - if (CHECKS) { - check(manager); - } - invokePV(manager, __functionAddress); - } - - // --- [ FTC_Manager_Done ] --- - - public static void FTC_Manager_Done(@NativeType("FTC_Manager") long manager) { - long __functionAddress = Functions.FTC_Manager_Done; - if (CHECKS) { - check(manager); - } - invokePV(manager, __functionAddress); - } - - // --- [ FTC_Manager_LookupFace ] --- - - public static int nFTC_Manager_LookupFace(long manager, long face_id, long aface) { - long __functionAddress = Functions.FTC_Manager_LookupFace; - if (CHECKS) { - check(manager); - check(face_id); - } - return invokePPPI(manager, face_id, aface, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_Manager_LookupFace(@NativeType("FTC_Manager") long manager, @NativeType("FTC_FaceID") long face_id, @NativeType("FT_Face *") PointerBuffer aface) { - if (CHECKS) { - check(aface, 1); - } - return nFTC_Manager_LookupFace(manager, face_id, memAddress(aface)); - } - - // --- [ FTC_Manager_LookupSize ] --- - - public static int nFTC_Manager_LookupSize(long manager, long scaler, long asize) { - long __functionAddress = Functions.FTC_Manager_LookupSize; - if (CHECKS) { - check(manager); - } - return invokePPPI(manager, scaler, asize, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_Manager_LookupSize(@NativeType("FTC_Manager") long manager, FTC_Scaler scaler, @NativeType("FT_Size *") PointerBuffer asize) { - if (CHECKS) { - check(asize, 1); - } - return nFTC_Manager_LookupSize(manager, scaler.address(), memAddress(asize)); - } - - // --- [ FTC_Node_Unref ] --- - - public static void FTC_Node_Unref(@NativeType("FTC_Node") long node, @NativeType("FTC_Manager") long manager) { - long __functionAddress = Functions.FTC_Node_Unref; - if (CHECKS) { - check(node); - check(manager); - } - invokePPV(node, manager, __functionAddress); - } - - // --- [ FTC_Manager_RemoveFaceID ] --- - - public static void FTC_Manager_RemoveFaceID(@NativeType("FTC_Manager") long manager, @NativeType("FTC_FaceID") long face_id) { - long __functionAddress = Functions.FTC_Manager_RemoveFaceID; - if (CHECKS) { - check(manager); - check(face_id); - } - invokePPV(manager, face_id, __functionAddress); - } - - // --- [ FTC_CMapCache_New ] --- - - public static int nFTC_CMapCache_New(long manager, long acache) { - long __functionAddress = Functions.FTC_CMapCache_New; - if (CHECKS) { - check(manager); - } - return invokePPI(manager, acache, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_CMapCache_New(@NativeType("FTC_Manager") long manager, @NativeType("FTC_CMapCache *") PointerBuffer acache) { - if (CHECKS) { - check(acache, 1); - } - return nFTC_CMapCache_New(manager, memAddress(acache)); - } - - // --- [ FTC_CMapCache_Lookup ] --- - - @NativeType("FT_UInt") - public static int FTC_CMapCache_Lookup(@NativeType("FTC_CMapCache") long cache, @NativeType("FTC_FaceID") long face_id, @NativeType("FT_Int") int cmap_index, @NativeType("FT_UInt32") int char_code) { - long __functionAddress = Functions.FTC_CMapCache_Lookup; - if (CHECKS) { - check(cache); - check(face_id); - } - return invokePPI(cache, face_id, cmap_index, char_code, __functionAddress); - } - - // --- [ FTC_ImageCache_New ] --- - - public static int nFTC_ImageCache_New(long manager, long acache) { - long __functionAddress = Functions.FTC_ImageCache_New; - if (CHECKS) { - check(manager); - } - return invokePPI(manager, acache, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_ImageCache_New(@NativeType("FTC_Manager") long manager, @NativeType("FTC_ImageCache *") PointerBuffer acache) { - if (CHECKS) { - check(acache, 1); - } - return nFTC_ImageCache_New(manager, memAddress(acache)); - } - - // --- [ FTC_ImageCache_Lookup ] --- - - public static int nFTC_ImageCache_Lookup(long cache, long type, int gindex, long aglyph, long anode) { - long __functionAddress = Functions.FTC_ImageCache_Lookup; - if (CHECKS) { - check(cache); - } - return invokePPPPI(cache, type, gindex, aglyph, anode, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_ImageCache_Lookup(@NativeType("FTC_ImageCache") long cache, FTC_ImageType type, @NativeType("FT_UInt") int gindex, @NativeType("FT_Glyph *") PointerBuffer aglyph, @Nullable @NativeType("FTC_Node *") PointerBuffer anode) { - if (CHECKS) { - check(aglyph, 1); - checkSafe(anode, 1); - } - return nFTC_ImageCache_Lookup(cache, type.address(), gindex, memAddress(aglyph), memAddressSafe(anode)); - } - - // --- [ FTC_ImageCache_LookupScaler ] --- - - public static int nFTC_ImageCache_LookupScaler(long cache, long scaler, long load_flags, int gindex, long aglyph, long anode) { - long __functionAddress = Functions.FTC_ImageCache_LookupScaler; - if (CHECKS) { - check(cache); - } - return invokePPNPPI(cache, scaler, load_flags, gindex, aglyph, anode, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_ImageCache_LookupScaler(@NativeType("FTC_ImageCache") long cache, FTC_Scaler scaler, @NativeType("FT_ULong") long load_flags, @NativeType("FT_UInt") int gindex, @NativeType("FT_Glyph *") PointerBuffer aglyph, @Nullable @NativeType("FTC_Node *") PointerBuffer anode) { - if (CHECKS) { - check(aglyph, 1); - checkSafe(anode, 1); - } - return nFTC_ImageCache_LookupScaler(cache, scaler.address(), load_flags, gindex, memAddress(aglyph), memAddressSafe(anode)); - } - - // --- [ FTC_SBitCache_New ] --- - - public static int nFTC_SBitCache_New(long manager, long acache) { - long __functionAddress = Functions.FTC_SBitCache_New; - if (CHECKS) { - check(manager); - } - return invokePPI(manager, acache, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_SBitCache_New(@NativeType("FTC_Manager") long manager, @NativeType("FTC_SBitCache *") PointerBuffer acache) { - if (CHECKS) { - check(acache, 1); - } - return nFTC_SBitCache_New(manager, memAddress(acache)); - } - - // --- [ FTC_SBitCache_Lookup ] --- - - public static int nFTC_SBitCache_Lookup(long cache, long type, int gindex, long sbit, long anode) { - long __functionAddress = Functions.FTC_SBitCache_Lookup; - if (CHECKS) { - check(cache); - } - return invokePPPPI(cache, type, gindex, sbit, anode, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_SBitCache_Lookup(@NativeType("FTC_SBitCache") long cache, FTC_ImageType type, @NativeType("FT_UInt") int gindex, @NativeType("FTC_SBit *") PointerBuffer sbit, @Nullable @NativeType("FTC_Node *") PointerBuffer anode) { - if (CHECKS) { - check(sbit, 1); - checkSafe(anode, 1); - } - return nFTC_SBitCache_Lookup(cache, type.address(), gindex, memAddress(sbit), memAddressSafe(anode)); - } - - // --- [ FTC_SBitCache_LookupScaler ] --- - - public static int nFTC_SBitCache_LookupScaler(long cache, long scaler, long load_flags, int gindex, long sbit, long anode) { - long __functionAddress = Functions.FTC_SBitCache_LookupScaler; - if (CHECKS) { - check(cache); - } - return invokePPNPPI(cache, scaler, load_flags, gindex, sbit, anode, __functionAddress); - } - - @NativeType("FT_Error") - public static int FTC_SBitCache_LookupScaler(@NativeType("FTC_SBitCache") long cache, FTC_Scaler scaler, @NativeType("FT_ULong") long load_flags, @NativeType("FT_UInt") int gindex, @NativeType("FTC_SBit *") PointerBuffer sbit, @Nullable @NativeType("FTC_Node *") PointerBuffer anode) { - if (CHECKS) { - check(sbit, 1); - checkSafe(anode, 1); - } - return nFTC_SBitCache_LookupScaler(cache, scaler.address(), load_flags, gindex, memAddress(sbit), memAddressSafe(anode)); - } - - // --- [ FT_Get_CID_Registry_Ordering_Supplement ] --- - - public static int nFT_Get_CID_Registry_Ordering_Supplement(long face, long registry, long ordering, long supplement) { - long __functionAddress = Functions.Get_CID_Registry_Ordering_Supplement; - return invokePPPPI(face, registry, ordering, supplement, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_CID_Registry_Ordering_Supplement(FT_Face face, @NativeType("char const **") PointerBuffer registry, @NativeType("char const **") PointerBuffer ordering, @NativeType("FT_Int *") IntBuffer supplement) { - if (CHECKS) { - check(registry, 1); - check(ordering, 1); - check(supplement, 1); - } - return nFT_Get_CID_Registry_Ordering_Supplement(face.address(), memAddress(registry), memAddress(ordering), memAddress(supplement)); - } - - // --- [ FT_Get_CID_Is_Internally_CID_Keyed ] --- - - public static int nFT_Get_CID_Is_Internally_CID_Keyed(long face, long is_cid) { - long __functionAddress = Functions.Get_CID_Is_Internally_CID_Keyed; - return invokePPI(face, is_cid, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_CID_Is_Internally_CID_Keyed(FT_Face face, @NativeType("FT_Bool *") ByteBuffer is_cid) { - if (CHECKS) { - check(is_cid, 1); - } - return nFT_Get_CID_Is_Internally_CID_Keyed(face.address(), memAddress(is_cid)); - } - - // --- [ FT_Get_CID_From_Glyph_Index ] --- - - public static int nFT_Get_CID_From_Glyph_Index(long face, int glyph_index, long cid) { - long __functionAddress = Functions.Get_CID_From_Glyph_Index; - return invokePPI(face, glyph_index, cid, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_CID_From_Glyph_Index(FT_Face face, @NativeType("FT_UInt") int glyph_index, @NativeType("FT_UInt *") IntBuffer cid) { - if (CHECKS) { - check(cid, 1); - } - return nFT_Get_CID_From_Glyph_Index(face.address(), glyph_index, memAddress(cid)); - } - - // --- [ FT_Palette_Data_Get ] --- - - public static int nFT_Palette_Data_Get(long face, long apalette) { - long __functionAddress = Functions.Palette_Data_Get; - return invokePPI(face, apalette, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Palette_Data_Get(FT_Face face, @NativeType("FT_Palette_Data *") FT_Palette_Data apalette) { - return nFT_Palette_Data_Get(face.address(), apalette.address()); - } - - // --- [ FT_Palette_Select ] --- - - public static int nFT_Palette_Select(long face, short palette_index, long apalette) { - long __functionAddress = Functions.Palette_Select; - return invokePCPI(face, palette_index, apalette, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Palette_Select(FT_Face face, @NativeType("FT_UShort") short palette_index, @Nullable @NativeType("FT_Color **") PointerBuffer apalette) { - if (CHECKS) { - checkSafe(apalette, 1); - } - return nFT_Palette_Select(face.address(), palette_index, memAddressSafe(apalette)); - } - - // --- [ FT_Palette_Set_Foreground_Color ] --- - - private static final FFICIF FT_Palette_Set_Foreground_ColorCIF = apiCreateCIF( - FFI_DEFAULT_ABI, ffi_type_sint32, - ffi_type_pointer, apiCreateStruct(ffi_type_uint8, ffi_type_uint8, ffi_type_uint8, ffi_type_uint8) - ); - - public static int nFT_Palette_Set_Foreground_Color(long face, long foreground_color) { - long __functionAddress = Functions.Palette_Set_Foreground_Color; - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long __result = stack.nint(0); - long arguments = stack.nmalloc(POINTER_SIZE, POINTER_SIZE * 2); - memPutAddress(arguments, stack.npointer(face)); - memPutAddress(arguments + POINTER_SIZE, foreground_color); - - nffi_call(FT_Palette_Set_Foreground_ColorCIF.address(), __functionAddress, __result, arguments); - - return memGetInt(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - @NativeType("FT_Error") - public static int FT_Palette_Set_Foreground_Color(FT_Face face, FT_Color foreground_color) { - return nFT_Palette_Set_Foreground_Color(face.address(), foreground_color.address()); - } - - // --- [ FT_Get_Color_Glyph_Layer ] --- - - public static boolean nFT_Get_Color_Glyph_Layer(long face, int base_glyph, long aglyph_index, long acolor_index, long iterator) { - long __functionAddress = Functions.Get_Color_Glyph_Layer; - return invokePPPPZ(face, base_glyph, aglyph_index, acolor_index, iterator, __functionAddress); - } - - @NativeType("FT_Bool") - public static boolean FT_Get_Color_Glyph_Layer(FT_Face face, @NativeType("FT_UInt") int base_glyph, @NativeType("FT_UInt *") IntBuffer aglyph_index, @NativeType("FT_UInt *") IntBuffer acolor_index, @NativeType("FT_LayerIterator *") FT_LayerIterator iterator) { - if (CHECKS) { - check(aglyph_index, 1); - check(acolor_index, 1); - } - return nFT_Get_Color_Glyph_Layer(face.address(), base_glyph, memAddress(aglyph_index), memAddress(acolor_index), iterator.address()); - } - - // --- [ FT_Get_Color_Glyph_Paint ] --- - - public static boolean nFT_Get_Color_Glyph_Paint(long face, int base_glyph, int root_transform, long paint) { - long __functionAddress = Functions.Get_Color_Glyph_Paint; - return invokePPZ(face, base_glyph, root_transform, paint, __functionAddress); - } - - @NativeType("FT_Bool") - public static boolean FT_Get_Color_Glyph_Paint(FT_Face face, @NativeType("FT_UInt") int base_glyph, @NativeType("FT_Color_Root_Transform") int root_transform, @NativeType("FT_OpaquePaintRec *") FT_OpaquePaint paint) { - return nFT_Get_Color_Glyph_Paint(face.address(), base_glyph, root_transform, paint.address()); - } - - // --- [ FT_Get_Color_Glyph_ClipBox ] --- - - public static boolean nFT_Get_Color_Glyph_ClipBox(long face, int base_glyph, long clip_box) { - long __functionAddress = Functions.Get_Color_Glyph_ClipBox; - return invokePPZ(face, base_glyph, clip_box, __functionAddress); - } - - @NativeType("FT_Bool") - public static boolean FT_Get_Color_Glyph_ClipBox(FT_Face face, @NativeType("FT_UInt") int base_glyph, @NativeType("FT_ClipBox *") FT_ClipBox clip_box) { - return nFT_Get_Color_Glyph_ClipBox(face.address(), base_glyph, clip_box.address()); - } - - // --- [ FT_Get_Paint_Layers ] --- - - public static boolean nFT_Get_Paint_Layers(long face, long iterator, long paint) { - long __functionAddress = Functions.Get_Paint_Layers; - return invokePPPZ(face, iterator, paint, __functionAddress); - } - - @NativeType("FT_Bool") - public static boolean FT_Get_Paint_Layers(FT_Face face, @NativeType("FT_LayerIterator *") FT_LayerIterator iterator, @NativeType("FT_OpaquePaintRec *") FT_OpaquePaint paint) { - return nFT_Get_Paint_Layers(face.address(), iterator.address(), paint.address()); - } - - // --- [ FT_Get_Colorline_Stops ] --- - - public static boolean nFT_Get_Colorline_Stops(long face, long color_stop, long iterator) { - long __functionAddress = Functions.Get_Colorline_Stops; - return invokePPPZ(face, color_stop, iterator, __functionAddress); - } - - @NativeType("FT_Bool") - public static boolean FT_Get_Colorline_Stops(FT_Face face, @NativeType("FT_ColorStop *") FT_ColorStop color_stop, @NativeType("FT_ColorStopIterator *") FT_ColorStopIterator iterator) { - return nFT_Get_Colorline_Stops(face.address(), color_stop.address(), iterator.address()); - } - - // --- [ FT_Get_Paint ] --- - - private static final FFICIF FT_Get_PaintCIF = apiCreateCIF( - FFI_DEFAULT_ABI, ffi_type_uint8, - ffi_type_pointer, apiCreateStruct(ffi_type_pointer, ffi_type_uint8), ffi_type_pointer - ); - - public static boolean nFT_Get_Paint(long face, long opaque_paint, long paint) { - long __functionAddress = Functions.Get_Paint; - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - long __result = stack.nbyte((byte)0); - long arguments = stack.nmalloc(POINTER_SIZE, POINTER_SIZE * 3); - memPutAddress(arguments, stack.npointer(face)); - memPutAddress(arguments + POINTER_SIZE, opaque_paint); - memPutAddress(arguments + 2 * POINTER_SIZE, stack.npointer(paint)); - - nffi_call(FT_Get_PaintCIF.address(), __functionAddress, __result, arguments); - - return memGetByte(__result) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - @NativeType("FT_Bool") - public static boolean FT_Get_Paint(FT_Face face, @NativeType("FT_OpaquePaintRec") FT_OpaquePaint opaque_paint, @NativeType("FT_COLR_Paint *") FT_COLR_Paint paint) { - return nFT_Get_Paint(face.address(), opaque_paint.address(), paint.address()); - } - - // --- [ FT_Error_String ] --- - - public static long nFT_Error_String(int error_code) { - long __functionAddress = Functions.Error_String; - return invokeP(error_code, __functionAddress); - } - - @Nullable - @NativeType("char const *") - public static String FT_Error_String(@NativeType("FT_Error") int error_code) { - long __result = nFT_Error_String(error_code); - return memASCIISafe(__result); - } - - // --- [ FT_Get_Font_Format ] --- - - public static long nFT_Get_Font_Format(long face) { - long __functionAddress = Functions.Get_Font_Format; - return invokePP(face, __functionAddress); - } - - @Nullable - @NativeType("char const *") - public static String FT_Get_Font_Format(FT_Face face) { - long __result = nFT_Get_Font_Format(face.address()); - return memASCIISafe(__result); - } - - // --- [ FT_Get_Gasp ] --- - - public static int nFT_Get_Gasp(long face, int ppem) { - long __functionAddress = Functions.Get_Gasp; - return invokePI(face, ppem, __functionAddress); - } - - @NativeType("FT_Int") - public static int FT_Get_Gasp(FT_Face face, @NativeType("FT_UInt") int ppem) { - return nFT_Get_Gasp(face.address(), ppem); - } - - // --- [ FT_New_Glyph ] --- - - public static int nFT_New_Glyph(long library, int format, long aglyph) { - long __functionAddress = Functions.New_Glyph; - if (CHECKS) { - check(library); - } - return invokePPI(library, format, aglyph, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_New_Glyph(@NativeType("FT_Library") long library, @NativeType("FT_Glyph_Format") int format, @NativeType("FT_Glyph *") PointerBuffer aglyph) { - if (CHECKS) { - check(aglyph, 1); - } - return nFT_New_Glyph(library, format, memAddress(aglyph)); - } - - // --- [ FT_Get_Glyph ] --- - - public static int nFT_Get_Glyph(long slot, long aglyph) { - long __functionAddress = Functions.Get_Glyph; - return invokePPI(slot, aglyph, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Glyph(FT_GlyphSlot slot, @NativeType("FT_Glyph *") PointerBuffer aglyph) { - if (CHECKS) { - check(aglyph, 1); - } - return nFT_Get_Glyph(slot.address(), memAddress(aglyph)); - } - - // --- [ FT_Glyph_Copy ] --- - - public static int nFT_Glyph_Copy(long source, long target) { - long __functionAddress = Functions.Glyph_Copy; - return invokePPI(source, target, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Glyph_Copy(FT_Glyph source, @NativeType("FT_Glyph *") PointerBuffer target) { - if (CHECKS) { - check(target, 1); - } - return nFT_Glyph_Copy(source.address(), memAddress(target)); - } - - // --- [ FT_Glyph_Transform ] --- - - public static int nFT_Glyph_Transform(long glyph, long matrix, long delta) { - long __functionAddress = Functions.Glyph_Transform; - return invokePPPI(glyph, matrix, delta, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Glyph_Transform(FT_Glyph glyph, @Nullable @NativeType("FT_Matrix const *") FT_Matrix matrix, @Nullable @NativeType("FT_Vector const *") FT_Vector delta) { - return nFT_Glyph_Transform(glyph.address(), memAddressSafe(matrix), memAddressSafe(delta)); - } - - // --- [ FT_Glyph_Get_CBox ] --- - - public static void nFT_Glyph_Get_CBox(long glyph, int bbox_mode, long acbox) { - long __functionAddress = Functions.Glyph_Get_CBox; - invokePPV(glyph, bbox_mode, acbox, __functionAddress); - } - - public static void FT_Glyph_Get_CBox(FT_Glyph glyph, @NativeType("FT_UInt") int bbox_mode, @NativeType("FT_BBox *") FT_BBox acbox) { - nFT_Glyph_Get_CBox(glyph.address(), bbox_mode, acbox.address()); - } - - // --- [ FT_Glyph_To_Bitmap ] --- - - public static int nFT_Glyph_To_Bitmap(long the_glyph, int render_mode, long origin, boolean destroy) { - long __functionAddress = Functions.Glyph_To_Bitmap; - return invokePPI(the_glyph, render_mode, origin, destroy, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Glyph_To_Bitmap(@NativeType("FT_Glyph *") PointerBuffer the_glyph, @NativeType("FT_Render_Mode") int render_mode, @Nullable @NativeType("FT_Vector const *") FT_Vector origin, @NativeType("FT_Bool") boolean destroy) { - if (CHECKS) { - check(the_glyph, 1); - } - return nFT_Glyph_To_Bitmap(memAddress(the_glyph), render_mode, memAddressSafe(origin), destroy); - } - - // --- [ FT_Done_Glyph ] --- - - public static void nFT_Done_Glyph(long glyph) { - long __functionAddress = Functions.Done_Glyph; - invokePV(glyph, __functionAddress); - } - - public static void FT_Done_Glyph(@Nullable FT_Glyph glyph) { - nFT_Done_Glyph(memAddressSafe(glyph)); - } - - // --- [ FT_Matrix_Multiply ] --- - - public static void nFT_Matrix_Multiply(long a, long b) { - long __functionAddress = Functions.Matrix_Multiply; - invokePPV(a, b, __functionAddress); - } - - public static void FT_Matrix_Multiply(@NativeType("FT_Matrix const *") FT_Matrix a, @NativeType("FT_Matrix *") FT_Matrix b) { - nFT_Matrix_Multiply(a.address(), b.address()); - } - - // --- [ FT_Matrix_Invert ] --- - - public static int nFT_Matrix_Invert(long matrix) { - long __functionAddress = Functions.Matrix_Invert; - return invokePI(matrix, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Matrix_Invert(@NativeType("FT_Matrix *") FT_Matrix matrix) { - return nFT_Matrix_Invert(matrix.address()); - } - - // --- [ FT_TrueTypeGX_Validate ] --- - - public static int nFT_TrueTypeGX_Validate(long face, int validation_flags, long tables, int table_length) { - long __functionAddress = Functions.TrueTypeGX_Validate; - return invokePPI(face, validation_flags, tables, table_length, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_TrueTypeGX_Validate(FT_Face face, @NativeType("FT_UInt") int validation_flags, @NativeType("FT_Bytes *") PointerBuffer tables) { - return nFT_TrueTypeGX_Validate(face.address(), validation_flags, memAddress(tables), tables.remaining()); - } - - // --- [ FT_TrueTypeGX_Free ] --- - - public static void nFT_TrueTypeGX_Free(long face, long table) { - long __functionAddress = Functions.TrueTypeGX_Free; - invokePPV(face, table, __functionAddress); - } - - public static void FT_TrueTypeGX_Free(FT_Face face, @NativeType("FT_Bytes") ByteBuffer table) { - nFT_TrueTypeGX_Free(face.address(), memAddress(table)); - } - - // --- [ FT_ClassicKern_Validate ] --- - - public static int nFT_ClassicKern_Validate(long face, int validation_flags, long ckern_table) { - long __functionAddress = Functions.ClassicKern_Validate; - return invokePPI(face, validation_flags, ckern_table, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_ClassicKern_Validate(FT_Face face, @NativeType("FT_UInt") int validation_flags, @NativeType("FT_Bytes *") PointerBuffer ckern_table) { - if (CHECKS) { - check(ckern_table, 1); - } - return nFT_ClassicKern_Validate(face.address(), validation_flags, memAddress(ckern_table)); - } - - // --- [ FT_ClassicKern_Free ] --- - - public static void nFT_ClassicKern_Free(long face, long table) { - long __functionAddress = Functions.ClassicKern_Free; - invokePPV(face, table, __functionAddress); - } - - public static void FT_ClassicKern_Free(FT_Face face, @NativeType("FT_Bytes") ByteBuffer table) { - nFT_ClassicKern_Free(face.address(), memAddress(table)); - } - - // --- [ FT_Stream_OpenGzip ] --- - - public static int nFT_Stream_OpenGzip(long stream, long source) { - long __functionAddress = Functions.Stream_OpenGzip; - return invokePPI(stream, source, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stream_OpenGzip(FT_Stream stream, FT_Stream source) { - return nFT_Stream_OpenGzip(stream.address(), source.address()); - } - - // --- [ FT_Gzip_Uncompress ] --- - - public static int nFT_Gzip_Uncompress(long memory, long output, long output_len, long input, long input_len) { - long __functionAddress = Functions.Gzip_Uncompress; - return invokePPPPNI(memory, output, output_len, input, input_len, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Gzip_Uncompress(FT_Memory memory, @NativeType("FT_Byte *") ByteBuffer output, @NativeType("FT_ULong *") CLongBuffer output_len, @NativeType("FT_Byte const *") ByteBuffer input) { - if (CHECKS) { - check(output_len, 1); - check(output, output_len.get(output_len.position())); - } - return nFT_Gzip_Uncompress(memory.address(), memAddress(output), memAddress(output_len), memAddress(input), input.remaining()); - } - - // --- [ FT_Library_SetLcdFilter ] --- - - @NativeType("FT_Error") - public static int FT_Library_SetLcdFilter(@NativeType("FT_Library") long library, @NativeType("FT_LcdFilter") int filter) { - long __functionAddress = Functions.Library_SetLcdFilter; - if (CHECKS) { - check(library); - } - return invokePI(library, filter, __functionAddress); - } - - // --- [ FT_Library_SetLcdFilterWeights ] --- - - public static int nFT_Library_SetLcdFilterWeights(long library, long weights) { - long __functionAddress = Functions.Library_SetLcdFilterWeights; - if (CHECKS) { - check(library); - } - return invokePPI(library, weights, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Library_SetLcdFilterWeights(@NativeType("FT_Library") long library, @NativeType("unsigned char *") ByteBuffer weights) { - if (CHECKS) { - check(weights, 5); - } - return nFT_Library_SetLcdFilterWeights(library, memAddress(weights)); - } - - // --- [ FT_Library_SetLcdGeometry ] --- - - public static int nFT_Library_SetLcdGeometry(long library, long sub) { - long __functionAddress = Functions.Library_SetLcdGeometry; - if (CHECKS) { - check(library); - } - return invokePPI(library, sub, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Library_SetLcdGeometry(@NativeType("FT_Library") long library, @NativeType("FT_Vector *") FT_Vector.Buffer sub) { - if (CHECKS) { - check(sub, 3); - } - return nFT_Library_SetLcdGeometry(library, sub.address()); - } - - // --- [ FT_List_Find ] --- - - public static long nFT_List_Find(long list, long data) { - long __functionAddress = Functions.List_Find; - if (CHECKS) { - check(data); - } - return invokePPP(list, data, __functionAddress); - } - - @Nullable - public static FT_ListNode FT_List_Find(FT_List list, @NativeType("void *") long data) { - long __result = nFT_List_Find(list.address(), data); - return FT_ListNode.createSafe(__result); - } - - // --- [ FT_List_Add ] --- - - public static void nFT_List_Add(long list, long node) { - long __functionAddress = Functions.List_Add; - invokePPV(list, node, __functionAddress); - } - - public static void FT_List_Add(FT_List list, FT_ListNode node) { - nFT_List_Add(list.address(), node.address()); - } - - // --- [ FT_List_Insert ] --- - - public static void nFT_List_Insert(long list, long node) { - long __functionAddress = Functions.List_Insert; - invokePPV(list, node, __functionAddress); - } - - public static void FT_List_Insert(FT_List list, FT_ListNode node) { - nFT_List_Insert(list.address(), node.address()); - } - - // --- [ FT_List_Remove ] --- - - public static void nFT_List_Remove(long list, long node) { - long __functionAddress = Functions.List_Remove; - invokePPV(list, node, __functionAddress); - } - - public static void FT_List_Remove(FT_List list, FT_ListNode node) { - nFT_List_Remove(list.address(), node.address()); - } - - // --- [ FT_List_Up ] --- - - public static void nFT_List_Up(long list, long node) { - long __functionAddress = Functions.List_Up; - invokePPV(list, node, __functionAddress); - } - - public static void FT_List_Up(FT_List list, FT_ListNode node) { - nFT_List_Up(list.address(), node.address()); - } - - // --- [ FT_List_Iterate ] --- - - public static int nFT_List_Iterate(long list, long iterator, long user) { - long __functionAddress = Functions.List_Iterate; - return invokePPPI(list, iterator, user, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_List_Iterate(FT_List list, @NativeType("FT_List_Iterator") FT_List_IteratorI iterator, @NativeType("void *") long user) { - return nFT_List_Iterate(list.address(), iterator.address(), user); - } - - // --- [ FT_List_Finalize ] --- - - public static void nFT_List_Finalize(long list, long destroy, long memory, long user) { - long __functionAddress = Functions.List_Finalize; - invokePPPPV(list, destroy, memory, user, __functionAddress); - } - - public static void FT_List_Finalize(FT_List list, @Nullable @NativeType("FT_List_Destructor") FT_List_DestructorI destroy, FT_Memory memory, @NativeType("void *") long user) { - nFT_List_Finalize(list.address(), memAddressSafe(destroy), memory.address(), user); - } - - // --- [ FT_Stream_OpenLZW ] --- - - public static int nFT_Stream_OpenLZW(long stream, long source) { - long __functionAddress = Functions.Stream_OpenLZW; - return invokePPI(stream, source, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stream_OpenLZW(FT_Stream stream, FT_Stream source) { - return nFT_Stream_OpenLZW(stream.address(), source.address()); - } - - // --- [ FT_Get_Multi_Master ] --- - - public static int nFT_Get_Multi_Master(long face, long amaster) { - long __functionAddress = Functions.Get_Multi_Master; - return invokePPI(face, amaster, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Multi_Master(FT_Face face, @NativeType("FT_Multi_Master *") FT_Multi_Master amaster) { - return nFT_Get_Multi_Master(face.address(), amaster.address()); - } - - // --- [ FT_Get_MM_Var ] --- - - public static int nFT_Get_MM_Var(long face, long amaster) { - long __functionAddress = Functions.Get_MM_Var; - return invokePPI(face, amaster, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_MM_Var(FT_Face face, @NativeType("FT_MM_Var **") PointerBuffer amaster) { - if (CHECKS) { - check(amaster, 1); - } - return nFT_Get_MM_Var(face.address(), memAddress(amaster)); - } - - // --- [ FT_Done_MM_Var ] --- - - public static int nFT_Done_MM_Var(long library, long amaster) { - long __functionAddress = Functions.Done_MM_Var; - if (CHECKS) { - check(library); - } - return invokePPI(library, amaster, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Done_MM_Var(@NativeType("FT_Library") long library, @NativeType("FT_MM_Var *") FT_MM_Var amaster) { - return nFT_Done_MM_Var(library, amaster.address()); - } - - // --- [ FT_Set_MM_Design_Coordinates ] --- - - public static int nFT_Set_MM_Design_Coordinates(long face, int num_coords, long coords) { - long __functionAddress = Functions.Set_MM_Design_Coordinates; - return invokePPI(face, num_coords, coords, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_MM_Design_Coordinates(FT_Face face, @NativeType("FT_Long *") CLongBuffer coords) { - return nFT_Set_MM_Design_Coordinates(face.address(), coords.remaining(), memAddress(coords)); - } - - // --- [ FT_Set_Var_Design_Coordinates ] --- - - public static int nFT_Set_Var_Design_Coordinates(long face, int num_coords, long coords) { - long __functionAddress = Functions.Set_Var_Design_Coordinates; - return invokePPI(face, num_coords, coords, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_Var_Design_Coordinates(FT_Face face, @NativeType("FT_Fixed *") CLongBuffer coords) { - return nFT_Set_Var_Design_Coordinates(face.address(), coords.remaining(), memAddress(coords)); - } - - // --- [ FT_Get_Var_Design_Coordinates ] --- - - public static int nFT_Get_Var_Design_Coordinates(long face, int num_coords, long coords) { - long __functionAddress = Functions.Get_Var_Design_Coordinates; - return invokePPI(face, num_coords, coords, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Var_Design_Coordinates(FT_Face face, @NativeType("FT_Fixed *") CLongBuffer coords) { - return nFT_Get_Var_Design_Coordinates(face.address(), coords.remaining(), memAddress(coords)); - } - - // --- [ FT_Set_MM_Blend_Coordinates ] --- - - public static int nFT_Set_MM_Blend_Coordinates(long face, int num_coords, long coords) { - long __functionAddress = Functions.Set_MM_Blend_Coordinates; - return invokePPI(face, num_coords, coords, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_MM_Blend_Coordinates(FT_Face face, @NativeType("FT_Fixed *") CLongBuffer coords) { - return nFT_Set_MM_Blend_Coordinates(face.address(), coords.remaining(), memAddress(coords)); - } - - // --- [ FT_Get_MM_Blend_Coordinates ] --- - - public static int nFT_Get_MM_Blend_Coordinates(long face, int num_coords, long coords) { - long __functionAddress = Functions.Get_MM_Blend_Coordinates; - return invokePPI(face, num_coords, coords, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_MM_Blend_Coordinates(FT_Face face, @NativeType("FT_Fixed *") CLongBuffer coords) { - return nFT_Get_MM_Blend_Coordinates(face.address(), coords.remaining(), memAddress(coords)); - } - - // --- [ FT_Set_Var_Blend_Coordinates ] --- - - public static int nFT_Set_Var_Blend_Coordinates(long face, int num_coords, long coords) { - long __functionAddress = Functions.Set_Var_Blend_Coordinates; - return invokePPI(face, num_coords, coords, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_Var_Blend_Coordinates(FT_Face face, @NativeType("FT_Fixed *") CLongBuffer coords) { - return nFT_Set_Var_Blend_Coordinates(face.address(), coords.remaining(), memAddress(coords)); - } - - // --- [ FT_Get_Var_Blend_Coordinates ] --- - - public static int nFT_Get_Var_Blend_Coordinates(long face, int num_coords, long coords) { - long __functionAddress = Functions.Get_Var_Blend_Coordinates; - return invokePPI(face, num_coords, coords, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Var_Blend_Coordinates(FT_Face face, @NativeType("FT_Fixed *") CLongBuffer coords) { - return nFT_Get_Var_Blend_Coordinates(face.address(), coords.remaining(), memAddress(coords)); - } - - // --- [ FT_Set_MM_WeightVector ] --- - - /** Unsafe version of: {@link #FT_Set_MM_WeightVector Set_MM_WeightVector} */ - public static int nFT_Set_MM_WeightVector(long face, int len, long weightvector) { - long __functionAddress = Functions.Set_MM_WeightVector; - return invokePPI(face, len, weightvector, __functionAddress); - } - - /** @return : FreeType error code. 0~means success. */ - @NativeType("FT_Error") - public static int FT_Set_MM_WeightVector(FT_Face face, @Nullable @NativeType("FT_Fixed *") CLongBuffer weightvector) { - return nFT_Set_MM_WeightVector(face.address(), remainingSafe(weightvector), memAddressSafe(weightvector)); - } - - // --- [ FT_Get_MM_WeightVector ] --- - - public static int nFT_Get_MM_WeightVector(long face, long len, long weightvector) { - long __functionAddress = Functions.Get_MM_WeightVector; - return invokePPPI(face, len, weightvector, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_MM_WeightVector(FT_Face face, @NativeType("FT_UInt *") IntBuffer len, @NativeType("FT_Fixed *") CLongBuffer weightvector) { - if (CHECKS) { - check(len, 1); - check(weightvector, len.get(len.position())); - } - return nFT_Get_MM_WeightVector(face.address(), memAddress(len), memAddress(weightvector)); - } - - // --- [ FT_Get_Var_Axis_Flags ] --- - - public static int nFT_Get_Var_Axis_Flags(long master, int axis_index, long flags) { - long __functionAddress = Functions.Get_Var_Axis_Flags; - return invokePPI(master, axis_index, flags, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Var_Axis_Flags(@NativeType("FT_MM_Var *") FT_MM_Var master, @NativeType("FT_UInt") int axis_index, @NativeType("FT_UInt *") IntBuffer flags) { - if (CHECKS) { - check(flags, 1); - } - return nFT_Get_Var_Axis_Flags(master.address(), axis_index, memAddress(flags)); - } - - // --- [ FT_Set_Named_Instance ] --- - - public static int nFT_Set_Named_Instance(long face, int instance_index) { - long __functionAddress = Functions.Set_Named_Instance; - return invokePI(face, instance_index, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_Named_Instance(FT_Face face, @NativeType("FT_UInt") int instance_index) { - return nFT_Set_Named_Instance(face.address(), instance_index); - } - - // --- [ FT_Get_Default_Named_Instance ] --- - - public static int nFT_Get_Default_Named_Instance(long face, long instance_index) { - long __functionAddress = Functions.Get_Default_Named_Instance; - return invokePPI(face, instance_index, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Default_Named_Instance(FT_Face face, @NativeType("FT_UInt *") IntBuffer instance_index) { - if (CHECKS) { - check(instance_index, 1); - } - return nFT_Get_Default_Named_Instance(face.address(), memAddress(instance_index)); - } - - // --- [ FT_Add_Module ] --- - - public static int nFT_Add_Module(long library, long clazz) { - long __functionAddress = Functions.Add_Module; - if (CHECKS) { - check(library); - FT_Module_Class.validate(clazz); - } - return invokePPI(library, clazz, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Add_Module(@NativeType("FT_Library") long library, @NativeType("FT_Module_Class const *") FT_Module_Class clazz) { - return nFT_Add_Module(library, clazz.address()); - } - - // --- [ FT_Get_Module ] --- - - public static long nFT_Get_Module(long library, long module_name) { - long __functionAddress = Functions.Get_Module; - if (CHECKS) { - check(library); - } - return invokePPP(library, module_name, __functionAddress); - } - - @NativeType("FT_Module") - public static long FT_Get_Module(@NativeType("FT_Library") long library, @NativeType("char const *") ByteBuffer module_name) { - if (CHECKS) { - checkNT1(module_name); - } - return nFT_Get_Module(library, memAddress(module_name)); - } - - @NativeType("FT_Module") - public static long FT_Get_Module(@NativeType("FT_Library") long library, @NativeType("char const *") CharSequence module_name) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(module_name, true); - long module_nameEncoded = stack.getPointerAddress(); - return nFT_Get_Module(library, module_nameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FT_Remove_Module ] --- - - @NativeType("FT_Error") - public static int FT_Remove_Module(@NativeType("FT_Library") long library, @NativeType("FT_Module") long module) { - long __functionAddress = Functions.Remove_Module; - if (CHECKS) { - check(library); - check(module); - } - return invokePPI(library, module, __functionAddress); - } - - // --- [ FT_Property_Set ] --- - - public static int nFT_Property_Set(long library, long module_name, long property_name, long value) { - long __functionAddress = Functions.Property_Set; - if (CHECKS) { - check(library); - } - return invokePPPPI(library, module_name, property_name, value, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Property_Set(@NativeType("FT_Library") long library, @NativeType("FT_String const *") ByteBuffer module_name, @NativeType("FT_String const *") ByteBuffer property_name, @NativeType("void const *") ByteBuffer value) { - if (CHECKS) { - checkNT1(module_name); - checkNT1(property_name); - } - return nFT_Property_Set(library, memAddress(module_name), memAddress(property_name), memAddress(value)); - } - - @NativeType("FT_Error") - public static int FT_Property_Set(@NativeType("FT_Library") long library, @NativeType("FT_String const *") CharSequence module_name, @NativeType("FT_String const *") CharSequence property_name, @NativeType("void const *") ByteBuffer value) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(module_name, true); - long module_nameEncoded = stack.getPointerAddress(); - stack.nUTF8(property_name, true); - long property_nameEncoded = stack.getPointerAddress(); - return nFT_Property_Set(library, module_nameEncoded, property_nameEncoded, memAddress(value)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FT_Property_Get ] --- - - public static int nFT_Property_Get(long library, long module_name, long property_name, long value) { - long __functionAddress = Functions.Property_Get; - if (CHECKS) { - check(library); - } - return invokePPPPI(library, module_name, property_name, value, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Property_Get(@NativeType("FT_Library") long library, @NativeType("FT_String const *") ByteBuffer module_name, @NativeType("FT_String const *") ByteBuffer property_name, @NativeType("void *") ByteBuffer value) { - if (CHECKS) { - checkNT1(module_name); - checkNT1(property_name); - } - return nFT_Property_Get(library, memAddress(module_name), memAddress(property_name), memAddress(value)); - } - - @NativeType("FT_Error") - public static int FT_Property_Get(@NativeType("FT_Library") long library, @NativeType("FT_String const *") CharSequence module_name, @NativeType("FT_String const *") CharSequence property_name, @NativeType("void *") ByteBuffer value) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8(module_name, true); - long module_nameEncoded = stack.getPointerAddress(); - stack.nUTF8(property_name, true); - long property_nameEncoded = stack.getPointerAddress(); - return nFT_Property_Get(library, module_nameEncoded, property_nameEncoded, memAddress(value)); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ FT_Set_Default_Properties ] --- - - public static void FT_Set_Default_Properties(@NativeType("FT_Library") long library) { - long __functionAddress = Functions.Set_Default_Properties; - if (CHECKS) { - check(library); - } - invokePV(library, __functionAddress); - } - - // --- [ FT_Reference_Library ] --- - - @NativeType("FT_Error") - public static int FT_Reference_Library(@NativeType("FT_Library") long library) { - long __functionAddress = Functions.Reference_Library; - if (CHECKS) { - check(library); - } - return invokePI(library, __functionAddress); - } - - // --- [ FT_New_Library ] --- - - public static int nFT_New_Library(long memory, long alibrary) { - long __functionAddress = Functions.New_Library; - return invokePPI(memory, alibrary, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_New_Library(FT_Memory memory, @NativeType("FT_Library *") PointerBuffer alibrary) { - if (CHECKS) { - check(alibrary, 1); - } - return nFT_New_Library(memory.address(), memAddress(alibrary)); - } - - // --- [ FT_Done_Library ] --- - - @NativeType("FT_Error") - public static int FT_Done_Library(@NativeType("FT_Library") long library) { - long __functionAddress = Functions.Done_Library; - if (CHECKS) { - check(library); - } - return invokePI(library, __functionAddress); - } - - // --- [ FT_Set_Debug_Hook ] --- - - public static void nFT_Set_Debug_Hook(long library, int hook_index, long debug_hook) { - long __functionAddress = Functions.Set_Debug_Hook; - if (CHECKS) { - check(library); - } - invokePPV(library, hook_index, debug_hook, __functionAddress); - } - - public static void FT_Set_Debug_Hook(@NativeType("FT_Library") long library, @NativeType("FT_UInt") int hook_index, @Nullable @NativeType("FT_DebugHook_Func") FT_DebugHook_FuncI debug_hook) { - nFT_Set_Debug_Hook(library, hook_index, memAddressSafe(debug_hook)); - } - - // --- [ FT_Add_Default_Modules ] --- - - public static void FT_Add_Default_Modules(@NativeType("FT_Library") long library) { - long __functionAddress = Functions.Add_Default_Modules; - if (CHECKS) { - check(library); - } - invokePV(library, __functionAddress); - } - - // --- [ FT_Get_TrueType_Engine_Type ] --- - - @NativeType("FT_TrueTypeEngineType") - public static int FT_Get_TrueType_Engine_Type(@NativeType("FT_Library") long library) { - long __functionAddress = Functions.Get_TrueType_Engine_Type; - if (CHECKS) { - check(library); - } - return invokePI(library, __functionAddress); - } - - // --- [ FT_OpenType_Validate ] --- - - public static int nFT_OpenType_Validate(long face, int validation_flags, long BASE_table, long GDEF_table, long GPOS_table, long GSUB_table, long JSTF_table) { - long __functionAddress = Functions.OpenType_Validate; - return invokePPPPPPI(face, validation_flags, BASE_table, GDEF_table, GPOS_table, GSUB_table, JSTF_table, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_OpenType_Validate(FT_Face face, @NativeType("FT_UInt") int validation_flags, @NativeType("FT_Bytes *") PointerBuffer BASE_table, @NativeType("FT_Bytes *") PointerBuffer GDEF_table, @NativeType("FT_Bytes *") PointerBuffer GPOS_table, @NativeType("FT_Bytes *") PointerBuffer GSUB_table, @NativeType("FT_Bytes *") PointerBuffer JSTF_table) { - if (CHECKS) { - check(BASE_table, 1); - check(GDEF_table, 1); - check(GPOS_table, 1); - check(GSUB_table, 1); - check(JSTF_table, 1); - } - return nFT_OpenType_Validate(face.address(), validation_flags, memAddress(BASE_table), memAddress(GDEF_table), memAddress(GPOS_table), memAddress(GSUB_table), memAddress(JSTF_table)); - } - - // --- [ FT_OpenType_Free ] --- - - public static void nFT_OpenType_Free(long face, long table) { - long __functionAddress = Functions.OpenType_Free; - invokePPV(face, table, __functionAddress); - } - - public static void FT_OpenType_Free(FT_Face face, @NativeType("FT_Bytes") ByteBuffer table) { - nFT_OpenType_Free(face.address(), memAddress(table)); - } - - // --- [ FT_Outline_Decompose ] --- - - public static int nFT_Outline_Decompose(long outline, long func_interface, long user) { - long __functionAddress = Functions.Outline_Decompose; - return invokePPPI(outline, func_interface, user, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Decompose(@NativeType("FT_Outline *") FT_Outline outline, @NativeType("FT_Outline_Funcs const *") FT_Outline_Funcs func_interface, @NativeType("void *") long user) { - return nFT_Outline_Decompose(outline.address(), func_interface.address(), user); - } - - // --- [ FT_Outline_New ] --- - - public static int nFT_Outline_New(long library, int numPoints, int numContours, long anoutline) { - long __functionAddress = Functions.Outline_New; - if (CHECKS) { - check(library); - } - return invokePPI(library, numPoints, numContours, anoutline, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_New(@NativeType("FT_Library") long library, @NativeType("FT_UInt") int numPoints, @NativeType("FT_Int") int numContours, @NativeType("FT_Outline *") FT_Outline anoutline) { - return nFT_Outline_New(library, numPoints, numContours, anoutline.address()); - } - - // --- [ FT_Outline_Done ] --- - - public static int nFT_Outline_Done(long library, long outline) { - long __functionAddress = Functions.Outline_Done; - if (CHECKS) { - check(library); - } - return invokePPI(library, outline, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Done(@NativeType("FT_Library") long library, @NativeType("FT_Outline *") FT_Outline outline) { - return nFT_Outline_Done(library, outline.address()); - } - - // --- [ FT_Outline_Check ] --- - - public static int nFT_Outline_Check(long outline) { - long __functionAddress = Functions.Outline_Check; - return invokePI(outline, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Check(@NativeType("FT_Outline *") FT_Outline outline) { - return nFT_Outline_Check(outline.address()); - } - - // --- [ FT_Outline_Get_CBox ] --- - - public static void nFT_Outline_Get_CBox(long outline, long acbox) { - long __functionAddress = Functions.Outline_Get_CBox; - invokePPV(outline, acbox, __functionAddress); - } - - public static void FT_Outline_Get_CBox(@NativeType("FT_Outline const *") FT_Outline outline, @NativeType("FT_BBox *") FT_BBox acbox) { - nFT_Outline_Get_CBox(outline.address(), acbox.address()); - } - - // --- [ FT_Outline_Translate ] --- - - public static void nFT_Outline_Translate(long outline, long xOffset, long yOffset) { - long __functionAddress = Functions.Outline_Translate; - invokePNNV(outline, xOffset, yOffset, __functionAddress); - } - - public static void FT_Outline_Translate(@NativeType("FT_Outline const *") FT_Outline outline, @NativeType("FT_Pos") long xOffset, @NativeType("FT_Pos") long yOffset) { - nFT_Outline_Translate(outline.address(), xOffset, yOffset); - } - - // --- [ FT_Outline_Copy ] --- - - public static int nFT_Outline_Copy(long source, long target) { - long __functionAddress = Functions.Outline_Copy; - return invokePPI(source, target, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Copy(@NativeType("FT_Outline const *") FT_Outline source, @NativeType("FT_Outline *") FT_Outline target) { - return nFT_Outline_Copy(source.address(), target.address()); - } - - // --- [ FT_Outline_Transform ] --- - - public static void nFT_Outline_Transform(long outline, long matrix) { - long __functionAddress = Functions.Outline_Transform; - invokePPV(outline, matrix, __functionAddress); - } - - public static void FT_Outline_Transform(@NativeType("FT_Outline const *") FT_Outline outline, @NativeType("FT_Matrix const *") FT_Matrix matrix) { - nFT_Outline_Transform(outline.address(), matrix.address()); - } - - // --- [ FT_Outline_Embolden ] --- - - public static int nFT_Outline_Embolden(long outline, long strength) { - long __functionAddress = Functions.Outline_Embolden; - return invokePNI(outline, strength, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Embolden(@NativeType("FT_Outline *") FT_Outline outline, @NativeType("FT_Pos") long strength) { - return nFT_Outline_Embolden(outline.address(), strength); - } - - // --- [ FT_Outline_EmboldenXY ] --- - - public static int nFT_Outline_EmboldenXY(long outline, long xstrength, long ystrength) { - long __functionAddress = Functions.Outline_EmboldenXY; - return invokePNNI(outline, xstrength, ystrength, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_EmboldenXY(@NativeType("FT_Outline *") FT_Outline outline, @NativeType("FT_Pos") long xstrength, @NativeType("FT_Pos") long ystrength) { - return nFT_Outline_EmboldenXY(outline.address(), xstrength, ystrength); - } - - // --- [ FT_Outline_Reverse ] --- - - public static void nFT_Outline_Reverse(long outline) { - long __functionAddress = Functions.Outline_Reverse; - invokePV(outline, __functionAddress); - } - - public static void FT_Outline_Reverse(@NativeType("FT_Outline *") FT_Outline outline) { - nFT_Outline_Reverse(outline.address()); - } - - // --- [ FT_Outline_Get_Bitmap ] --- - - public static int nFT_Outline_Get_Bitmap(long library, long outline, long abitmap) { - long __functionAddress = Functions.Outline_Get_Bitmap; - if (CHECKS) { - check(library); - } - return invokePPPI(library, outline, abitmap, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Get_Bitmap(@NativeType("FT_Library") long library, @NativeType("FT_Outline *") FT_Outline outline, @NativeType("FT_Bitmap const *") FT_Bitmap abitmap) { - return nFT_Outline_Get_Bitmap(library, outline.address(), abitmap.address()); - } - - // --- [ FT_Outline_Render ] --- - - public static int nFT_Outline_Render(long library, long outline, long params) { - long __functionAddress = Functions.Outline_Render; - if (CHECKS) { - check(library); - } - return invokePPPI(library, outline, params, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Outline_Render(@NativeType("FT_Library") long library, @NativeType("FT_Outline *") FT_Outline outline, @NativeType("FT_Raster_Params *") FT_Raster_Params params) { - return nFT_Outline_Render(library, outline.address(), params.address()); - } - - // --- [ FT_Outline_Get_Orientation ] --- - - public static int nFT_Outline_Get_Orientation(long outline) { - long __functionAddress = Functions.Outline_Get_Orientation; - return invokePI(outline, __functionAddress); - } - - @NativeType("FT_Orientation") - public static int FT_Outline_Get_Orientation(@NativeType("FT_Outline *") FT_Outline outline) { - return nFT_Outline_Get_Orientation(outline.address()); - } - - // --- [ FT_Get_PFR_Metrics ] --- - - public static int nFT_Get_PFR_Metrics(long face, long aoutline_resolution, long ametrics_resolution, long ametrics_x_scale, long ametrics_y_scale) { - long __functionAddress = Functions.Get_PFR_Metrics; - return invokePPPPPI(face, aoutline_resolution, ametrics_resolution, ametrics_x_scale, ametrics_y_scale, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_PFR_Metrics(FT_Face face, @Nullable @NativeType("FT_UInt *") IntBuffer aoutline_resolution, @Nullable @NativeType("FT_UInt *") IntBuffer ametrics_resolution, @Nullable @NativeType("FT_Fixed *") CLongBuffer ametrics_x_scale, @Nullable @NativeType("FT_Fixed *") CLongBuffer ametrics_y_scale) { - if (CHECKS) { - checkSafe(aoutline_resolution, 1); - checkSafe(ametrics_resolution, 1); - checkSafe(ametrics_x_scale, 1); - checkSafe(ametrics_y_scale, 1); - } - return nFT_Get_PFR_Metrics(face.address(), memAddressSafe(aoutline_resolution), memAddressSafe(ametrics_resolution), memAddressSafe(ametrics_x_scale), memAddressSafe(ametrics_y_scale)); - } - - // --- [ FT_Get_PFR_Kerning ] --- - - public static int nFT_Get_PFR_Kerning(long face, int left, int right, long avector) { - long __functionAddress = Functions.Get_PFR_Kerning; - return invokePPI(face, left, right, avector, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_PFR_Kerning(FT_Face face, @NativeType("FT_UInt") int left, @NativeType("FT_UInt") int right, @NativeType("FT_Vector *") FT_Vector avector) { - return nFT_Get_PFR_Kerning(face.address(), left, right, avector.address()); - } - - // --- [ FT_Get_PFR_Advance ] --- - - public static int nFT_Get_PFR_Advance(long face, int gindex, long aadvance) { - long __functionAddress = Functions.Get_PFR_Advance; - return invokePPI(face, gindex, aadvance, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_PFR_Advance(FT_Face face, @NativeType("FT_UInt") int gindex, @NativeType("FT_Pos *") CLongBuffer aadvance) { - if (CHECKS) { - check(aadvance, 1); - } - return nFT_Get_PFR_Advance(face.address(), gindex, memAddress(aadvance)); - } - - // --- [ FT_Get_Renderer ] --- - - @NativeType("FT_Renderer") - public static long FT_Get_Renderer(@NativeType("FT_Library") long library, @NativeType("FT_Glyph_Format") int format) { - long __functionAddress = Functions.Get_Renderer; - if (CHECKS) { - check(library); - } - return invokePP(library, format, __functionAddress); - } - - // --- [ FT_Set_Renderer ] --- - - public static int nFT_Set_Renderer(long library, long renderer, int num_params, long parameters) { - long __functionAddress = Functions.Set_Renderer; - if (CHECKS) { - check(library); - check(renderer); - } - return invokePPPI(library, renderer, num_params, parameters, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Set_Renderer(@NativeType("FT_Library") long library, @NativeType("FT_Renderer") long renderer, @NativeType("FT_Parameter *") FT_Parameter.Buffer parameters) { - return nFT_Set_Renderer(library, renderer, parameters.remaining(), parameters.address()); - } - - // --- [ FT_New_Size ] --- - - public static int nFT_New_Size(long face, long size) { - long __functionAddress = Functions.New_Size; - return invokePPI(face, size, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_New_Size(FT_Face face, @NativeType("FT_Size *") PointerBuffer size) { - if (CHECKS) { - check(size, 1); - } - return nFT_New_Size(face.address(), memAddress(size)); - } - - // --- [ FT_Done_Size ] --- - - public static int nFT_Done_Size(long size) { - long __functionAddress = Functions.Done_Size; - return invokePI(size, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Done_Size(FT_Size size) { - return nFT_Done_Size(size.address()); - } - - // --- [ FT_Activate_Size ] --- - - public static int nFT_Activate_Size(long size) { - long __functionAddress = Functions.Activate_Size; - return invokePI(size, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Activate_Size(FT_Size size) { - return nFT_Activate_Size(size.address()); - } - - // --- [ FT_Get_Sfnt_Name_Count ] --- - - public static int nFT_Get_Sfnt_Name_Count(long face) { - long __functionAddress = Functions.Get_Sfnt_Name_Count; - return invokePI(face, __functionAddress); - } - - @NativeType("FT_UInt") - public static int FT_Get_Sfnt_Name_Count(FT_Face face) { - return nFT_Get_Sfnt_Name_Count(face.address()); - } - - // --- [ FT_Get_Sfnt_Name ] --- - - public static int nFT_Get_Sfnt_Name(long face, int idx, long aname) { - long __functionAddress = Functions.Get_Sfnt_Name; - return invokePPI(face, idx, aname, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Sfnt_Name(FT_Face face, @NativeType("FT_UInt") int idx, @NativeType("FT_SfntName *") FT_SfntName aname) { - return nFT_Get_Sfnt_Name(face.address(), idx, aname.address()); - } - - // --- [ FT_Get_Sfnt_LangTag ] --- - - public static int nFT_Get_Sfnt_LangTag(long face, int langID, long alangTag) { - long __functionAddress = Functions.Get_Sfnt_LangTag; - return invokePPI(face, langID, alangTag, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_Sfnt_LangTag(FT_Face face, @NativeType("FT_UInt") int langID, @NativeType("FT_SfntLangTag *") FT_SfntLangTag alangTag) { - return nFT_Get_Sfnt_LangTag(face.address(), langID, alangTag.address()); - } - - // --- [ FT_Outline_GetInsideBorder ] --- - - public static int nFT_Outline_GetInsideBorder(long outline) { - long __functionAddress = Functions.Outline_GetInsideBorder; - return invokePI(outline, __functionAddress); - } - - @NativeType("FT_StrokerBorder") - public static int FT_Outline_GetInsideBorder(@NativeType("FT_Outline *") FT_Outline outline) { - return nFT_Outline_GetInsideBorder(outline.address()); - } - - // --- [ FT_Outline_GetOutsideBorder ] --- - - public static int nFT_Outline_GetOutsideBorder(long outline) { - long __functionAddress = Functions.Outline_GetOutsideBorder; - return invokePI(outline, __functionAddress); - } - - @NativeType("FT_StrokerBorder") - public static int FT_Outline_GetOutsideBorder(@NativeType("FT_Outline *") FT_Outline outline) { - return nFT_Outline_GetOutsideBorder(outline.address()); - } - - // --- [ FT_Stroker_New ] --- - - public static int nFT_Stroker_New(long library, long astroker) { - long __functionAddress = Functions.Stroker_New; - if (CHECKS) { - check(library); - } - return invokePPI(library, astroker, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_New(@NativeType("FT_Library") long library, @NativeType("FT_Stroker *") PointerBuffer astroker) { - if (CHECKS) { - check(astroker, 1); - } - return nFT_Stroker_New(library, memAddress(astroker)); - } - - // --- [ FT_Stroker_Set ] --- - - public static void FT_Stroker_Set(@NativeType("FT_Stroker") long stroker, @NativeType("FT_Fixed") long radius, @NativeType("FT_Stroker_LineCap") int line_cap, @NativeType("FT_Stroker_LineJoin") int line_join, @NativeType("FT_Fixed") long miter_limit) { - long __functionAddress = Functions.Stroker_Set; - if (CHECKS) { - check(stroker); - } - invokePNNV(stroker, radius, line_cap, line_join, miter_limit, __functionAddress); - } - - // --- [ FT_Stroker_Rewind ] --- - - public static void FT_Stroker_Rewind(@NativeType("FT_Stroker") long stroker) { - long __functionAddress = Functions.Stroker_Rewind; - if (CHECKS) { - check(stroker); - } - invokePV(stroker, __functionAddress); - } - - // --- [ FT_Stroker_ParseOutline ] --- - - public static int nFT_Stroker_ParseOutline(long stroker, long outline, boolean opened) { - long __functionAddress = Functions.Stroker_ParseOutline; - if (CHECKS) { - check(stroker); - } - return invokePPI(stroker, outline, opened, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_ParseOutline(@NativeType("FT_Stroker") long stroker, @NativeType("FT_Outline *") FT_Outline outline, @NativeType("FT_Bool") boolean opened) { - return nFT_Stroker_ParseOutline(stroker, outline.address(), opened); - } - - // --- [ FT_Stroker_BeginSubPath ] --- - - public static int nFT_Stroker_BeginSubPath(long stroker, long to, boolean open) { - long __functionAddress = Functions.Stroker_BeginSubPath; - if (CHECKS) { - check(stroker); - } - return invokePPI(stroker, to, open, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_BeginSubPath(@NativeType("FT_Stroker") long stroker, @NativeType("FT_Vector *") FT_Vector to, @NativeType("FT_Bool") boolean open) { - return nFT_Stroker_BeginSubPath(stroker, to.address(), open); - } - - // --- [ FT_Stroker_EndSubPath ] --- - - @NativeType("FT_Error") - public static int FT_Stroker_EndSubPath(@NativeType("FT_Stroker") long stroker) { - long __functionAddress = Functions.Stroker_EndSubPath; - if (CHECKS) { - check(stroker); - } - return invokePI(stroker, __functionAddress); - } - - // --- [ FT_Stroker_LineTo ] --- - - public static int nFT_Stroker_LineTo(long stroker, long to) { - long __functionAddress = Functions.Stroker_LineTo; - if (CHECKS) { - check(stroker); - } - return invokePPI(stroker, to, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_LineTo(@NativeType("FT_Stroker") long stroker, @NativeType("FT_Vector *") FT_Vector to) { - return nFT_Stroker_LineTo(stroker, to.address()); - } - - // --- [ FT_Stroker_ConicTo ] --- - - public static int nFT_Stroker_ConicTo(long stroker, long control, long to) { - long __functionAddress = Functions.Stroker_ConicTo; - if (CHECKS) { - check(stroker); - } - return invokePPPI(stroker, control, to, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_ConicTo(@NativeType("FT_Stroker") long stroker, @NativeType("FT_Vector *") FT_Vector control, @NativeType("FT_Vector *") FT_Vector to) { - return nFT_Stroker_ConicTo(stroker, control.address(), to.address()); - } - - // --- [ FT_Stroker_CubicTo ] --- - - public static int nFT_Stroker_CubicTo(long stroker, long control1, long control2, long to) { - long __functionAddress = Functions.Stroker_CubicTo; - if (CHECKS) { - check(stroker); - } - return invokePPPPI(stroker, control1, control2, to, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_CubicTo(@NativeType("FT_Stroker") long stroker, @NativeType("FT_Vector *") FT_Vector control1, @NativeType("FT_Vector *") FT_Vector control2, @NativeType("FT_Vector *") FT_Vector to) { - return nFT_Stroker_CubicTo(stroker, control1.address(), control2.address(), to.address()); - } - - // --- [ FT_Stroker_GetBorderCounts ] --- - - public static int nFT_Stroker_GetBorderCounts(long stroker, int border, long anum_points, long anum_contours) { - long __functionAddress = Functions.Stroker_GetBorderCounts; - if (CHECKS) { - check(stroker); - } - return invokePPPI(stroker, border, anum_points, anum_contours, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_GetBorderCounts(@NativeType("FT_Stroker") long stroker, @NativeType("FT_StrokerBorder") int border, @NativeType("FT_UInt *") IntBuffer anum_points, @NativeType("FT_UInt *") IntBuffer anum_contours) { - if (CHECKS) { - check(anum_points, 1); - check(anum_contours, 1); - } - return nFT_Stroker_GetBorderCounts(stroker, border, memAddress(anum_points), memAddress(anum_contours)); - } - - // --- [ FT_Stroker_ExportBorder ] --- - - public static void nFT_Stroker_ExportBorder(long stroker, int border, long outline) { - long __functionAddress = Functions.Stroker_ExportBorder; - if (CHECKS) { - check(stroker); - } - invokePPV(stroker, border, outline, __functionAddress); - } - - public static void FT_Stroker_ExportBorder(@NativeType("FT_Stroker") long stroker, @NativeType("FT_StrokerBorder") int border, @NativeType("FT_Outline *") FT_Outline outline) { - nFT_Stroker_ExportBorder(stroker, border, outline.address()); - } - - // --- [ FT_Stroker_GetCounts ] --- - - public static int nFT_Stroker_GetCounts(long stroker, long anum_points, long anum_contours) { - long __functionAddress = Functions.Stroker_GetCounts; - if (CHECKS) { - check(stroker); - } - return invokePPPI(stroker, anum_points, anum_contours, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Stroker_GetCounts(@NativeType("FT_Stroker") long stroker, @NativeType("FT_UInt *") IntBuffer anum_points, @NativeType("FT_UInt *") IntBuffer anum_contours) { - if (CHECKS) { - check(anum_points, 1); - check(anum_contours, 1); - } - return nFT_Stroker_GetCounts(stroker, memAddress(anum_points), memAddress(anum_contours)); - } - - // --- [ FT_Stroker_Export ] --- - - public static void nFT_Stroker_Export(long stroker, long outline) { - long __functionAddress = Functions.Stroker_Export; - if (CHECKS) { - check(stroker); - } - invokePPV(stroker, outline, __functionAddress); - } - - public static void FT_Stroker_Export(@NativeType("FT_Stroker") long stroker, @NativeType("FT_Outline *") FT_Outline outline) { - nFT_Stroker_Export(stroker, outline.address()); - } - - // --- [ FT_Stroker_Done ] --- - - public static void FT_Stroker_Done(@NativeType("FT_Stroker") long stroker) { - long __functionAddress = Functions.Stroker_Done; - if (CHECKS) { - check(stroker); - } - invokePV(stroker, __functionAddress); - } - - // --- [ FT_Glyph_Stroke ] --- - - public static int nFT_Glyph_Stroke(long pglyph, long stroker, boolean destroy) { - long __functionAddress = Functions.Glyph_Stroke; - if (CHECKS) { - check(stroker); - } - return invokePPI(pglyph, stroker, destroy, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Glyph_Stroke(@NativeType("FT_Glyph *") PointerBuffer pglyph, @NativeType("FT_Stroker") long stroker, @NativeType("FT_Bool") boolean destroy) { - if (CHECKS) { - check(pglyph, 1); - } - return nFT_Glyph_Stroke(memAddress(pglyph), stroker, destroy); - } - - // --- [ FT_Glyph_StrokeBorder ] --- - - public static int nFT_Glyph_StrokeBorder(long pglyph, long stroker, boolean inside, boolean destroy) { - long __functionAddress = Functions.Glyph_StrokeBorder; - if (CHECKS) { - check(stroker); - } - return invokePPI(pglyph, stroker, inside, destroy, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Glyph_StrokeBorder(@NativeType("FT_Glyph *") PointerBuffer pglyph, @NativeType("FT_Stroker") long stroker, @NativeType("FT_Bool") boolean inside, @NativeType("FT_Bool") boolean destroy) { - if (CHECKS) { - check(pglyph, 1); - } - return nFT_Glyph_StrokeBorder(memAddress(pglyph), stroker, inside, destroy); - } - - // --- [ FT_GlyphSlot_Embolden ] --- - - public static void nFT_GlyphSlot_Embolden(long slot) { - long __functionAddress = Functions.GlyphSlot_Embolden; - invokePV(slot, __functionAddress); - } - - public static void FT_GlyphSlot_Embolden(FT_GlyphSlot slot) { - nFT_GlyphSlot_Embolden(slot.address()); - } - - // --- [ FT_GlyphSlot_AdjustWeight ] --- - - public static void nFT_GlyphSlot_AdjustWeight(long slot, long xdelta, long ydelta) { - long __functionAddress = Functions.GlyphSlot_AdjustWeight; - invokePNNV(slot, xdelta, ydelta, __functionAddress); - } - - public static void FT_GlyphSlot_AdjustWeight(FT_GlyphSlot slot, @NativeType("FT_Fixed") long xdelta, @NativeType("FT_Fixed") long ydelta) { - nFT_GlyphSlot_AdjustWeight(slot.address(), xdelta, ydelta); - } - - // --- [ FT_GlyphSlot_Oblique ] --- - - public static void nFT_GlyphSlot_Oblique(long slot) { - long __functionAddress = Functions.GlyphSlot_Oblique; - invokePV(slot, __functionAddress); - } - - public static void FT_GlyphSlot_Oblique(FT_GlyphSlot slot) { - nFT_GlyphSlot_Oblique(slot.address()); - } - - // --- [ FT_GlyphSlot_Slant ] --- - - public static void nFT_GlyphSlot_Slant(long slot, long xslant, long yslant) { - long __functionAddress = Functions.GlyphSlot_Slant; - invokePNNV(slot, xslant, yslant, __functionAddress); - } - - public static void FT_GlyphSlot_Slant(FT_GlyphSlot slot, @NativeType("FT_Fixed") long xslant, @NativeType("FT_Fixed") long yslant) { - nFT_GlyphSlot_Slant(slot.address(), xslant, yslant); - } - - // --- [ FT_Sin ] --- - - @NativeType("FT_Fixed") - public static long FT_Sin(@NativeType("FT_Angle") long angle) { - long __functionAddress = Functions.Sin; - return invokeNN(angle, __functionAddress); - } - - // --- [ FT_Cos ] --- - - @NativeType("FT_Fixed") - public static long FT_Cos(@NativeType("FT_Angle") long angle) { - long __functionAddress = Functions.Cos; - return invokeNN(angle, __functionAddress); - } - - // --- [ FT_Tan ] --- - - @NativeType("FT_Fixed") - public static long FT_Tan(@NativeType("FT_Angle") long angle) { - long __functionAddress = Functions.Tan; - return invokeNN(angle, __functionAddress); - } - - // --- [ FT_Atan2 ] --- - - @NativeType("FT_Angle") - public static long FT_Atan2(@NativeType("FT_Fixed") long x, @NativeType("FT_Fixed") long y) { - long __functionAddress = Functions.Atan2; - return invokeNNN(x, y, __functionAddress); - } - - // --- [ FT_Angle_Diff ] --- - - @NativeType("FT_Angle") - public static long FT_Angle_Diff(@NativeType("FT_Angle") long angle1, @NativeType("FT_Angle") long angle2) { - long __functionAddress = Functions.Angle_Diff; - return invokeNNN(angle1, angle2, __functionAddress); - } - - // --- [ FT_Vector_Unit ] --- - - public static void nFT_Vector_Unit(long vec, long angle) { - long __functionAddress = Functions.Vector_Unit; - invokePNV(vec, angle, __functionAddress); - } - - public static void FT_Vector_Unit(@NativeType("FT_Vector *") FT_Vector vec, @NativeType("FT_Angle") long angle) { - nFT_Vector_Unit(vec.address(), angle); - } - - // --- [ FT_Vector_Rotate ] --- - - public static void nFT_Vector_Rotate(long vec, long angle) { - long __functionAddress = Functions.Vector_Rotate; - invokePNV(vec, angle, __functionAddress); - } - - public static void FT_Vector_Rotate(@NativeType("FT_Vector *") FT_Vector vec, @NativeType("FT_Angle") long angle) { - nFT_Vector_Rotate(vec.address(), angle); - } - - // --- [ FT_Vector_Length ] --- - - public static long nFT_Vector_Length(long vec) { - long __functionAddress = Functions.Vector_Length; - return invokePN(vec, __functionAddress); - } - - @NativeType("FT_Fixed") - public static long FT_Vector_Length(@NativeType("FT_Vector *") FT_Vector vec) { - return nFT_Vector_Length(vec.address()); - } - - // --- [ FT_Vector_Polarize ] --- - - public static void nFT_Vector_Polarize(long vec, long length, long angle) { - long __functionAddress = Functions.Vector_Polarize; - invokePPPV(vec, length, angle, __functionAddress); - } - - public static void FT_Vector_Polarize(@NativeType("FT_Vector *") FT_Vector vec, @NativeType("FT_Fixed *") CLongBuffer length, @NativeType("FT_Angle *") CLongBuffer angle) { - if (CHECKS) { - check(length, 1); - check(angle, 1); - } - nFT_Vector_Polarize(vec.address(), memAddress(length), memAddress(angle)); - } - - // --- [ FT_Vector_From_Polar ] --- - - public static void nFT_Vector_From_Polar(long vec, long length, long angle) { - long __functionAddress = Functions.Vector_From_Polar; - invokePNNV(vec, length, angle, __functionAddress); - } - - public static void FT_Vector_From_Polar(@NativeType("FT_Vector *") FT_Vector vec, @NativeType("FT_Fixed") long length, @NativeType("FT_Angle") long angle) { - nFT_Vector_From_Polar(vec.address(), length, angle); - } - - // --- [ FT_Has_PS_Glyph_Names ] --- - - public static int nFT_Has_PS_Glyph_Names(long face) { - long __functionAddress = Functions.Has_PS_Glyph_Names; - return invokePI(face, __functionAddress); - } - - @NativeType("FT_Int") - public static int FT_Has_PS_Glyph_Names(FT_Face face) { - return nFT_Has_PS_Glyph_Names(face.address()); - } - - // --- [ FT_Get_PS_Font_Info ] --- - - public static int nFT_Get_PS_Font_Info(long face, long afont_info) { - long __functionAddress = Functions.Get_PS_Font_Info; - return invokePPI(face, afont_info, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_PS_Font_Info(FT_Face face, PS_FontInfo afont_info) { - return nFT_Get_PS_Font_Info(face.address(), afont_info.address()); - } - - // --- [ FT_Get_PS_Font_Private ] --- - - public static int nFT_Get_PS_Font_Private(long face, long afont_private) { - long __functionAddress = Functions.Get_PS_Font_Private; - if (CHECKS) { - check(afont_private); - } - return invokePPI(face, afont_private, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Get_PS_Font_Private(FT_Face face, @NativeType("PS_Private") long afont_private) { - return nFT_Get_PS_Font_Private(face.address(), afont_private); - } - - // --- [ FT_Get_PS_Font_Value ] --- - - public static long nFT_Get_PS_Font_Value(long face, int key, int idx, long value, long value_len) { - long __functionAddress = Functions.Get_PS_Font_Value; - return invokePPNN(face, key, idx, value, value_len, __functionAddress); - } - - @NativeType("FT_Long") - public static long FT_Get_PS_Font_Value(FT_Face face, @NativeType("PS_Dict_Keys") int key, @NativeType("FT_UInt") int idx, @Nullable @NativeType("void *") ByteBuffer value) { - return nFT_Get_PS_Font_Value(face.address(), key, idx, memAddressSafe(value), remainingSafe(value)); - } - - // --- [ FT_Get_Sfnt_Table ] --- - - public static long nFT_Get_Sfnt_Table(long face, int tag) { - long __functionAddress = Functions.Get_Sfnt_Table; - return invokePP(face, tag, __functionAddress); - } - - @NativeType("void *") - public static long FT_Get_Sfnt_Table(FT_Face face, @NativeType("FT_Sfnt_Tag") int tag) { - return nFT_Get_Sfnt_Table(face.address(), tag); - } - - // --- [ FT_Load_Sfnt_Table ] --- - - public static int nFT_Load_Sfnt_Table(long face, long tag, long offset, long buffer, long length) { - long __functionAddress = Functions.Load_Sfnt_Table; - return invokePNNPPI(face, tag, offset, buffer, length, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Load_Sfnt_Table(FT_Face face, @NativeType("FT_ULong") long tag, @NativeType("FT_Long") long offset, @Nullable @NativeType("FT_Byte *") ByteBuffer buffer, @Nullable @NativeType("FT_ULong *") CLongBuffer length) { - if (CHECKS) { - checkSafe(length, 1); - } - return nFT_Load_Sfnt_Table(face.address(), tag, offset, memAddressSafe(buffer), memAddressSafe(length)); - } - - // --- [ FT_Sfnt_Table_Info ] --- - - public static int nFT_Sfnt_Table_Info(long face, int table_index, long tag, long length) { - long __functionAddress = Functions.Sfnt_Table_Info; - return invokePPPI(face, table_index, tag, length, __functionAddress); - } - - @NativeType("FT_Error") - public static int FT_Sfnt_Table_Info(FT_Face face, @NativeType("FT_UInt") int table_index, @Nullable @NativeType("FT_ULong *") CLongBuffer tag, @Nullable @NativeType("FT_ULong *") CLongBuffer length) { - if (CHECKS) { - checkSafe(length, 1); - } - return nFT_Sfnt_Table_Info(face.address(), table_index, memAddressSafe(tag), memAddressSafe(length)); - } - - // --- [ FT_Get_CMap_Language_ID ] --- - - public static long nFT_Get_CMap_Language_ID(long charmap) { - long __functionAddress = Functions.Get_CMap_Language_ID; - return invokePN(charmap, __functionAddress); - } - - @NativeType("FT_ULong") - public static long FT_Get_CMap_Language_ID(FT_CharMap charmap) { - return nFT_Get_CMap_Language_ID(charmap.address()); - } - - // --- [ FT_Get_CMap_Format ] --- - - public static long nFT_Get_CMap_Format(long charmap) { - long __functionAddress = Functions.Get_CMap_Format; - return invokePN(charmap, __functionAddress); - } - - @NativeType("FT_Long") - public static long FT_Get_CMap_Format(FT_CharMap charmap) { - return nFT_Get_CMap_Format(charmap.address()); - } - - public static int FT_ENC_TAG(int a, int b, int c, int d) { - return ((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8) | (d & 0xFF); - } - - public static boolean FT_HAS_HORIZONTAL(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_HORIZONTAL) != 0; - } - - public static boolean FT_HAS_VERTICAL(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_VERTICAL) != 0; - } - - public static boolean FT_HAS_KERNING(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_KERNING) != 0; - } - - public static boolean FT_IS_SCALABLE(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_SCALABLE) != 0; - } - - public static boolean FT_IS_SFNT(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_SFNT) != 0; - } - - public static boolean FT_IS_FIXED_WIDTH(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_FIXED_WIDTH) != 0; - } - - public static boolean FT_HAS_FIXED_SIZES(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_FIXED_SIZES) != 0; - } - - public static boolean FT_HAS_GLYPH_NAMES(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_GLYPH_NAMES) != 0; - } - - public static boolean FT_HAS_MULTIPLE_MASTERS(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_MULTIPLE_MASTERS) != 0; - } - - public static boolean FT_IS_NAMED_INSTANCE(FT_Face face) { - return (face.face_index() & 0x7FFF0000) != 0; - } - - public static boolean FT_IS_VARIATION(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_VARIATION) != 0; - } - - public static boolean FT_IS_CID_KEYED(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_CID_KEYED) != 0; - } - - public static boolean FT_IS_TRICKY(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_TRICKY) != 0; - } - - public static boolean FT_HAS_COLOR(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_COLOR) != 0; - } - - public static boolean FT_HAS_SVG(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_SVG) != 0; - } - - public static boolean FT_HAS_SBIX(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_SBIX) != 0; - } - - public static boolean FT_HAS_SBIX_OVERLAY(FT_Face face) { - return (face.face_flags() & FT_FACE_FLAG_SBIX_OVERLAY) != 0; - } - - private static int FT_LOAD_TARGET_(int x) { - return (x & 15) << 16; - } - - public static int FT_LOAD_TARGET_MODE(int x) { - return (x >> 16) & 15; - } - - public static boolean FTC_IMAGE_TYPE_COMPARE(FTC_ImageType d1, FTC_ImageType d2) { - return d1.face_id() == d2.face_id() && d1.width() == d2.width() && d1.flags() == d2.flags(); - } - - public static int FT_CURVE_TAG(int flag) { - return flag & 0x03; - } - - public static int FT_IMAGE_TAG(int _x1, int _x2, int _x3, int _x4) { - return ((_x1 & 0xFF) << 24) | ((_x2 & 0xFF) << 16) | ((_x3 & 0xFF) << 8) | (_x4 & 0xFF); - } - - public static int FT_MAKE_TAG(int _x1, int _x2, int _x3, int _x4) { - return ((_x1 & 0xFF) << 24) | ((_x2 & 0xFF) << 16) | ((_x3 & 0xFF) << 8) | (_x4 & 0xFF); - } - - public static boolean FT_IS_EMPTY(FT_List list) { - return list.head() == null; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/PS_FontInfo.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/PS_FontInfo.java deleted file mode 100644 index b76630e3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/PS_FontInfo.java +++ /dev/null @@ -1,290 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to model a Type~1 or Type~2 FontInfo dictionary. Note that for Multiple Master fonts, each instance has its own FontInfo dictionary. - * - *

    Layout

    - * - *
    
    - * struct PS_FontInfoRec {
    - *     FT_String * version;
    - *     FT_String * notice;
    - *     FT_String * full_name;
    - *     FT_String * family_name;
    - *     FT_String * weight;
    - *     FT_Long italic_angle;
    - *     FT_Bool is_fixed_pitch;
    - *     FT_Short underline_position;
    - *     FT_UShort underline_thickness;
    - * }
    - */ -@NativeType("struct PS_FontInfoRec") -public class PS_FontInfo extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VERSION, - NOTICE, - FULL_NAME, - FAMILY_NAME, - WEIGHT, - ITALIC_ANGLE, - IS_FIXED_PITCH, - UNDERLINE_POSITION, - UNDERLINE_THICKNESS; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(CLONG_SIZE), - __member(1), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VERSION = layout.offsetof(0); - NOTICE = layout.offsetof(1); - FULL_NAME = layout.offsetof(2); - FAMILY_NAME = layout.offsetof(3); - WEIGHT = layout.offsetof(4); - ITALIC_ANGLE = layout.offsetof(5); - IS_FIXED_PITCH = layout.offsetof(6); - UNDERLINE_POSITION = layout.offsetof(7); - UNDERLINE_THICKNESS = layout.offsetof(8); - } - - protected PS_FontInfo(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected PS_FontInfo create(long address, @Nullable ByteBuffer container) { - return new PS_FontInfo(address, container); - } - - /** - * Creates a {@code PS_FontInfo} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public PS_FontInfo(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code version} field. */ - @NativeType("FT_String *") - public ByteBuffer version() { return nversion(address()); } - /** @return the null-terminated string pointed to by the {@code version} field. */ - @NativeType("FT_String *") - public String versionString() { return nversionString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code notice} field. */ - @NativeType("FT_String *") - public ByteBuffer notice() { return nnotice(address()); } - /** @return the null-terminated string pointed to by the {@code notice} field. */ - @NativeType("FT_String *") - public String noticeString() { return nnoticeString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code full_name} field. */ - @NativeType("FT_String *") - public ByteBuffer full_name() { return nfull_name(address()); } - /** @return the null-terminated string pointed to by the {@code full_name} field. */ - @NativeType("FT_String *") - public String full_nameString() { return nfull_nameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public ByteBuffer family_name() { return nfamily_name(address()); } - /** @return the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public String family_nameString() { return nfamily_nameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code weight} field. */ - @NativeType("FT_String *") - public ByteBuffer weight() { return nweight(address()); } - /** @return the null-terminated string pointed to by the {@code weight} field. */ - @NativeType("FT_String *") - public String weightString() { return nweightString(address()); } - /** @return the value of the {@code italic_angle} field. */ - @NativeType("FT_Long") - public long italic_angle() { return nitalic_angle(address()); } - /** @return the value of the {@code is_fixed_pitch} field. */ - @NativeType("FT_Bool") - public boolean is_fixed_pitch() { return nis_fixed_pitch(address()); } - /** @return the value of the {@code underline_position} field. */ - @NativeType("FT_Short") - public short underline_position() { return nunderline_position(address()); } - /** @return the value of the {@code underline_thickness} field. */ - @NativeType("FT_UShort") - public short underline_thickness() { return nunderline_thickness(address()); } - - // ----------------------------------- - - /** Returns a new {@code PS_FontInfo} instance for the specified memory address. */ - public static PS_FontInfo create(long address) { - return new PS_FontInfo(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static PS_FontInfo createSafe(long address) { - return address == NULL ? null : new PS_FontInfo(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #version}. */ - public static ByteBuffer nversion(long struct) { return memByteBufferNT1(memGetAddress(struct + PS_FontInfo.VERSION)); } - /** Unsafe version of {@link #versionString}. */ - public static String nversionString(long struct) { return memUTF8(memGetAddress(struct + PS_FontInfo.VERSION)); } - /** Unsafe version of {@link #notice}. */ - public static ByteBuffer nnotice(long struct) { return memByteBufferNT1(memGetAddress(struct + PS_FontInfo.NOTICE)); } - /** Unsafe version of {@link #noticeString}. */ - public static String nnoticeString(long struct) { return memUTF8(memGetAddress(struct + PS_FontInfo.NOTICE)); } - /** Unsafe version of {@link #full_name}. */ - public static ByteBuffer nfull_name(long struct) { return memByteBufferNT1(memGetAddress(struct + PS_FontInfo.FULL_NAME)); } - /** Unsafe version of {@link #full_nameString}. */ - public static String nfull_nameString(long struct) { return memUTF8(memGetAddress(struct + PS_FontInfo.FULL_NAME)); } - /** Unsafe version of {@link #family_name}. */ - public static ByteBuffer nfamily_name(long struct) { return memByteBufferNT1(memGetAddress(struct + PS_FontInfo.FAMILY_NAME)); } - /** Unsafe version of {@link #family_nameString}. */ - public static String nfamily_nameString(long struct) { return memUTF8(memGetAddress(struct + PS_FontInfo.FAMILY_NAME)); } - /** Unsafe version of {@link #weight}. */ - public static ByteBuffer nweight(long struct) { return memByteBufferNT1(memGetAddress(struct + PS_FontInfo.WEIGHT)); } - /** Unsafe version of {@link #weightString}. */ - public static String nweightString(long struct) { return memUTF8(memGetAddress(struct + PS_FontInfo.WEIGHT)); } - /** Unsafe version of {@link #italic_angle}. */ - public static long nitalic_angle(long struct) { return memGetCLong(struct + PS_FontInfo.ITALIC_ANGLE); } - /** Unsafe version of {@link #is_fixed_pitch}. */ - public static boolean nis_fixed_pitch(long struct) { return UNSAFE.getByte(null, struct + PS_FontInfo.IS_FIXED_PITCH) != 0; } - /** Unsafe version of {@link #underline_position}. */ - public static short nunderline_position(long struct) { return UNSAFE.getShort(null, struct + PS_FontInfo.UNDERLINE_POSITION); } - /** Unsafe version of {@link #underline_thickness}. */ - public static short nunderline_thickness(long struct) { return UNSAFE.getShort(null, struct + PS_FontInfo.UNDERLINE_THICKNESS); } - - // ----------------------------------- - - /** An array of {@link PS_FontInfo} structs. */ - public static class Buffer extends StructBuffer { - - private static final PS_FontInfo ELEMENT_FACTORY = PS_FontInfo.create(-1L); - - /** - * Creates a new {@code PS_FontInfo.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link PS_FontInfo#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected PS_FontInfo getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code version} field. */ - @NativeType("FT_String *") - public ByteBuffer version() { return PS_FontInfo.nversion(address()); } - /** @return the null-terminated string pointed to by the {@code version} field. */ - @NativeType("FT_String *") - public String versionString() { return PS_FontInfo.nversionString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code notice} field. */ - @NativeType("FT_String *") - public ByteBuffer notice() { return PS_FontInfo.nnotice(address()); } - /** @return the null-terminated string pointed to by the {@code notice} field. */ - @NativeType("FT_String *") - public String noticeString() { return PS_FontInfo.nnoticeString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code full_name} field. */ - @NativeType("FT_String *") - public ByteBuffer full_name() { return PS_FontInfo.nfull_name(address()); } - /** @return the null-terminated string pointed to by the {@code full_name} field. */ - @NativeType("FT_String *") - public String full_nameString() { return PS_FontInfo.nfull_nameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public ByteBuffer family_name() { return PS_FontInfo.nfamily_name(address()); } - /** @return the null-terminated string pointed to by the {@code family_name} field. */ - @NativeType("FT_String *") - public String family_nameString() { return PS_FontInfo.nfamily_nameString(address()); } - /** @return a {@link ByteBuffer} view of the null-terminated string pointed to by the {@code weight} field. */ - @NativeType("FT_String *") - public ByteBuffer weight() { return PS_FontInfo.nweight(address()); } - /** @return the null-terminated string pointed to by the {@code weight} field. */ - @NativeType("FT_String *") - public String weightString() { return PS_FontInfo.nweightString(address()); } - /** @return the value of the {@code italic_angle} field. */ - @NativeType("FT_Long") - public long italic_angle() { return PS_FontInfo.nitalic_angle(address()); } - /** @return the value of the {@code is_fixed_pitch} field. */ - @NativeType("FT_Bool") - public boolean is_fixed_pitch() { return PS_FontInfo.nis_fixed_pitch(address()); } - /** @return the value of the {@code underline_position} field. */ - @NativeType("FT_Short") - public short underline_position() { return PS_FontInfo.nunderline_position(address()); } - /** @return the value of the {@code underline_thickness} field. */ - @NativeType("FT_UShort") - public short underline_thickness() { return PS_FontInfo.nunderline_thickness(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/PS_Private.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/PS_Private.java deleted file mode 100644 index b399ba89..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/PS_Private.java +++ /dev/null @@ -1,533 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to model a Type~1 or Type~2 private dictionary. Note that for Multiple Master fonts, each instance has its own Private dictionary. - * - *

    Layout

    - * - *
    
    - * struct PS_PrivateRec {
    - *     FT_Int unique_id;
    - *     FT_Int lenIV;
    - *     FT_Byte num_blue_values;
    - *     FT_Byte num_other_blues;
    - *     FT_Byte num_family_blues;
    - *     FT_Byte num_family_other_blues;
    - *     FT_Short blue_values[14];
    - *     FT_Short other_blues[10];
    - *     FT_Short family_blues[14];
    - *     FT_Short family_other_blues[10];
    - *     FT_Fixed blue_scale;
    - *     FT_Int blue_shift;
    - *     FT_Int blue_fuzz;
    - *     FT_UShort standard_width[1];
    - *     FT_UShort standard_height[1];
    - *     FT_Byte num_snap_widths;
    - *     FT_Byte num_snap_heights;
    - *     FT_Bool force_bold;
    - *     FT_Bool round_stem_up;
    - *     FT_Short {@link #snap_widths}[13];
    - *     FT_Short {@link #snap_heights}[13];
    - *     FT_Fixed expansion_factor;
    - *     FT_Long language_group;
    - *     FT_Long password;
    - *     FT_Short min_feature[2];
    - * }
    - */ -@NativeType("struct PS_PrivateRec") -public class PS_Private extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - UNIQUE_ID, - LENIV, - NUM_BLUE_VALUES, - NUM_OTHER_BLUES, - NUM_FAMILY_BLUES, - NUM_FAMILY_OTHER_BLUES, - BLUE_VALUES, - OTHER_BLUES, - FAMILY_BLUES, - FAMILY_OTHER_BLUES, - BLUE_SCALE, - BLUE_SHIFT, - BLUE_FUZZ, - STANDARD_WIDTH, - STANDARD_HEIGHT, - NUM_SNAP_WIDTHS, - NUM_SNAP_HEIGHTS, - FORCE_BOLD, - ROUND_STEM_UP, - SNAP_WIDTHS, - SNAP_HEIGHTS, - EXPANSION_FACTOR, - LANGUAGE_GROUP, - PASSWORD, - MIN_FEATURE; - - static { - Layout layout = __struct( - __member(4), - __member(4), - __member(1), - __member(1), - __member(1), - __member(1), - __array(2, 14), - __array(2, 10), - __array(2, 14), - __array(2, 10), - __member(CLONG_SIZE), - __member(4), - __member(4), - __array(2, 1), - __array(2, 1), - __member(1), - __member(1), - __member(1), - __member(1), - __array(2, 13), - __array(2, 13), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __array(2, 2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - UNIQUE_ID = layout.offsetof(0); - LENIV = layout.offsetof(1); - NUM_BLUE_VALUES = layout.offsetof(2); - NUM_OTHER_BLUES = layout.offsetof(3); - NUM_FAMILY_BLUES = layout.offsetof(4); - NUM_FAMILY_OTHER_BLUES = layout.offsetof(5); - BLUE_VALUES = layout.offsetof(6); - OTHER_BLUES = layout.offsetof(7); - FAMILY_BLUES = layout.offsetof(8); - FAMILY_OTHER_BLUES = layout.offsetof(9); - BLUE_SCALE = layout.offsetof(10); - BLUE_SHIFT = layout.offsetof(11); - BLUE_FUZZ = layout.offsetof(12); - STANDARD_WIDTH = layout.offsetof(13); - STANDARD_HEIGHT = layout.offsetof(14); - NUM_SNAP_WIDTHS = layout.offsetof(15); - NUM_SNAP_HEIGHTS = layout.offsetof(16); - FORCE_BOLD = layout.offsetof(17); - ROUND_STEM_UP = layout.offsetof(18); - SNAP_WIDTHS = layout.offsetof(19); - SNAP_HEIGHTS = layout.offsetof(20); - EXPANSION_FACTOR = layout.offsetof(21); - LANGUAGE_GROUP = layout.offsetof(22); - PASSWORD = layout.offsetof(23); - MIN_FEATURE = layout.offsetof(24); - } - - protected PS_Private(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected PS_Private create(long address, @Nullable ByteBuffer container) { - return new PS_Private(address, container); - } - - /** - * Creates a {@code PS_Private} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public PS_Private(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code unique_id} field. */ - @NativeType("FT_Int") - public int unique_id() { return nunique_id(address()); } - /** @return the value of the {@code lenIV} field. */ - @NativeType("FT_Int") - public int lenIV() { return nlenIV(address()); } - /** @return the value of the {@code num_blue_values} field. */ - @NativeType("FT_Byte") - public byte num_blue_values() { return nnum_blue_values(address()); } - /** @return the value of the {@code num_other_blues} field. */ - @NativeType("FT_Byte") - public byte num_other_blues() { return nnum_other_blues(address()); } - /** @return the value of the {@code num_family_blues} field. */ - @NativeType("FT_Byte") - public byte num_family_blues() { return nnum_family_blues(address()); } - /** @return the value of the {@code num_family_other_blues} field. */ - @NativeType("FT_Byte") - public byte num_family_other_blues() { return nnum_family_other_blues(address()); } - /** @return a {@link ShortBuffer} view of the {@code blue_values} field. */ - @NativeType("FT_Short[14]") - public ShortBuffer blue_values() { return nblue_values(address()); } - /** @return the value at the specified index of the {@code blue_values} field. */ - @NativeType("FT_Short") - public short blue_values(int index) { return nblue_values(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code other_blues} field. */ - @NativeType("FT_Short[10]") - public ShortBuffer other_blues() { return nother_blues(address()); } - /** @return the value at the specified index of the {@code other_blues} field. */ - @NativeType("FT_Short") - public short other_blues(int index) { return nother_blues(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code family_blues} field. */ - @NativeType("FT_Short[14]") - public ShortBuffer family_blues() { return nfamily_blues(address()); } - /** @return the value at the specified index of the {@code family_blues} field. */ - @NativeType("FT_Short") - public short family_blues(int index) { return nfamily_blues(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code family_other_blues} field. */ - @NativeType("FT_Short[10]") - public ShortBuffer family_other_blues() { return nfamily_other_blues(address()); } - /** @return the value at the specified index of the {@code family_other_blues} field. */ - @NativeType("FT_Short") - public short family_other_blues(int index) { return nfamily_other_blues(address(), index); } - /** @return the value of the {@code blue_scale} field. */ - @NativeType("FT_Fixed") - public long blue_scale() { return nblue_scale(address()); } - /** @return the value of the {@code blue_shift} field. */ - @NativeType("FT_Int") - public int blue_shift() { return nblue_shift(address()); } - /** @return the value of the {@code blue_fuzz} field. */ - @NativeType("FT_Int") - public int blue_fuzz() { return nblue_fuzz(address()); } - /** @return a {@link ShortBuffer} view of the {@code standard_width} field. */ - @NativeType("FT_UShort[1]") - public ShortBuffer standard_width() { return nstandard_width(address()); } - /** @return the value at the specified index of the {@code standard_width} field. */ - @NativeType("FT_UShort") - public short standard_width(int index) { return nstandard_width(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code standard_height} field. */ - @NativeType("FT_UShort[1]") - public ShortBuffer standard_height() { return nstandard_height(address()); } - /** @return the value at the specified index of the {@code standard_height} field. */ - @NativeType("FT_UShort") - public short standard_height(int index) { return nstandard_height(address(), index); } - /** @return the value of the {@code num_snap_widths} field. */ - @NativeType("FT_Byte") - public byte num_snap_widths() { return nnum_snap_widths(address()); } - /** @return the value of the {@code num_snap_heights} field. */ - @NativeType("FT_Byte") - public byte num_snap_heights() { return nnum_snap_heights(address()); } - /** @return the value of the {@code force_bold} field. */ - @NativeType("FT_Bool") - public boolean force_bold() { return nforce_bold(address()); } - /** @return the value of the {@code round_stem_up} field. */ - @NativeType("FT_Bool") - public boolean round_stem_up() { return nround_stem_up(address()); } - /** including std width */ - @NativeType("FT_Short[13]") - public ShortBuffer snap_widths() { return nsnap_widths(address()); } - /** including std width */ - @NativeType("FT_Short") - public short snap_widths(int index) { return nsnap_widths(address(), index); } - /** including std height */ - @NativeType("FT_Short[13]") - public ShortBuffer snap_heights() { return nsnap_heights(address()); } - /** including std height */ - @NativeType("FT_Short") - public short snap_heights(int index) { return nsnap_heights(address(), index); } - /** @return the value of the {@code expansion_factor} field. */ - @NativeType("FT_Fixed") - public long expansion_factor() { return nexpansion_factor(address()); } - /** @return the value of the {@code language_group} field. */ - @NativeType("FT_Long") - public long language_group() { return nlanguage_group(address()); } - /** @return the value of the {@code password} field. */ - @NativeType("FT_Long") - public long password() { return npassword(address()); } - /** @return a {@link ShortBuffer} view of the {@code min_feature} field. */ - @NativeType("FT_Short[2]") - public ShortBuffer min_feature() { return nmin_feature(address()); } - /** @return the value at the specified index of the {@code min_feature} field. */ - @NativeType("FT_Short") - public short min_feature(int index) { return nmin_feature(address(), index); } - - // ----------------------------------- - - /** Returns a new {@code PS_Private} instance for the specified memory address. */ - public static PS_Private create(long address) { - return new PS_Private(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static PS_Private createSafe(long address) { - return address == NULL ? null : new PS_Private(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #unique_id}. */ - public static int nunique_id(long struct) { return UNSAFE.getInt(null, struct + PS_Private.UNIQUE_ID); } - /** Unsafe version of {@link #lenIV}. */ - public static int nlenIV(long struct) { return UNSAFE.getInt(null, struct + PS_Private.LENIV); } - /** Unsafe version of {@link #num_blue_values}. */ - public static byte nnum_blue_values(long struct) { return UNSAFE.getByte(null, struct + PS_Private.NUM_BLUE_VALUES); } - /** Unsafe version of {@link #num_other_blues}. */ - public static byte nnum_other_blues(long struct) { return UNSAFE.getByte(null, struct + PS_Private.NUM_OTHER_BLUES); } - /** Unsafe version of {@link #num_family_blues}. */ - public static byte nnum_family_blues(long struct) { return UNSAFE.getByte(null, struct + PS_Private.NUM_FAMILY_BLUES); } - /** Unsafe version of {@link #num_family_other_blues}. */ - public static byte nnum_family_other_blues(long struct) { return UNSAFE.getByte(null, struct + PS_Private.NUM_FAMILY_OTHER_BLUES); } - /** Unsafe version of {@link #blue_values}. */ - public static ShortBuffer nblue_values(long struct) { return memShortBuffer(struct + PS_Private.BLUE_VALUES, 14); } - /** Unsafe version of {@link #blue_values(int) blue_values}. */ - public static short nblue_values(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.BLUE_VALUES + check(index, 14) * 2); - } - /** Unsafe version of {@link #other_blues}. */ - public static ShortBuffer nother_blues(long struct) { return memShortBuffer(struct + PS_Private.OTHER_BLUES, 10); } - /** Unsafe version of {@link #other_blues(int) other_blues}. */ - public static short nother_blues(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.OTHER_BLUES + check(index, 10) * 2); - } - /** Unsafe version of {@link #family_blues}. */ - public static ShortBuffer nfamily_blues(long struct) { return memShortBuffer(struct + PS_Private.FAMILY_BLUES, 14); } - /** Unsafe version of {@link #family_blues(int) family_blues}. */ - public static short nfamily_blues(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.FAMILY_BLUES + check(index, 14) * 2); - } - /** Unsafe version of {@link #family_other_blues}. */ - public static ShortBuffer nfamily_other_blues(long struct) { return memShortBuffer(struct + PS_Private.FAMILY_OTHER_BLUES, 10); } - /** Unsafe version of {@link #family_other_blues(int) family_other_blues}. */ - public static short nfamily_other_blues(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.FAMILY_OTHER_BLUES + check(index, 10) * 2); - } - /** Unsafe version of {@link #blue_scale}. */ - public static long nblue_scale(long struct) { return memGetCLong(struct + PS_Private.BLUE_SCALE); } - /** Unsafe version of {@link #blue_shift}. */ - public static int nblue_shift(long struct) { return UNSAFE.getInt(null, struct + PS_Private.BLUE_SHIFT); } - /** Unsafe version of {@link #blue_fuzz}. */ - public static int nblue_fuzz(long struct) { return UNSAFE.getInt(null, struct + PS_Private.BLUE_FUZZ); } - /** Unsafe version of {@link #standard_width}. */ - public static ShortBuffer nstandard_width(long struct) { return memShortBuffer(struct + PS_Private.STANDARD_WIDTH, 1); } - /** Unsafe version of {@link #standard_width(int) standard_width}. */ - public static short nstandard_width(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.STANDARD_WIDTH + check(index, 1) * 2); - } - /** Unsafe version of {@link #standard_height}. */ - public static ShortBuffer nstandard_height(long struct) { return memShortBuffer(struct + PS_Private.STANDARD_HEIGHT, 1); } - /** Unsafe version of {@link #standard_height(int) standard_height}. */ - public static short nstandard_height(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.STANDARD_HEIGHT + check(index, 1) * 2); - } - /** Unsafe version of {@link #num_snap_widths}. */ - public static byte nnum_snap_widths(long struct) { return UNSAFE.getByte(null, struct + PS_Private.NUM_SNAP_WIDTHS); } - /** Unsafe version of {@link #num_snap_heights}. */ - public static byte nnum_snap_heights(long struct) { return UNSAFE.getByte(null, struct + PS_Private.NUM_SNAP_HEIGHTS); } - /** Unsafe version of {@link #force_bold}. */ - public static boolean nforce_bold(long struct) { return UNSAFE.getByte(null, struct + PS_Private.FORCE_BOLD) != 0; } - /** Unsafe version of {@link #round_stem_up}. */ - public static boolean nround_stem_up(long struct) { return UNSAFE.getByte(null, struct + PS_Private.ROUND_STEM_UP) != 0; } - /** Unsafe version of {@link #snap_widths}. */ - public static ShortBuffer nsnap_widths(long struct) { return memShortBuffer(struct + PS_Private.SNAP_WIDTHS, 13); } - /** Unsafe version of {@link #snap_widths(int) snap_widths}. */ - public static short nsnap_widths(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.SNAP_WIDTHS + check(index, 13) * 2); - } - /** Unsafe version of {@link #snap_heights}. */ - public static ShortBuffer nsnap_heights(long struct) { return memShortBuffer(struct + PS_Private.SNAP_HEIGHTS, 13); } - /** Unsafe version of {@link #snap_heights(int) snap_heights}. */ - public static short nsnap_heights(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.SNAP_HEIGHTS + check(index, 13) * 2); - } - /** Unsafe version of {@link #expansion_factor}. */ - public static long nexpansion_factor(long struct) { return memGetCLong(struct + PS_Private.EXPANSION_FACTOR); } - /** Unsafe version of {@link #language_group}. */ - public static long nlanguage_group(long struct) { return memGetCLong(struct + PS_Private.LANGUAGE_GROUP); } - /** Unsafe version of {@link #password}. */ - public static long npassword(long struct) { return memGetCLong(struct + PS_Private.PASSWORD); } - /** Unsafe version of {@link #min_feature}. */ - public static ShortBuffer nmin_feature(long struct) { return memShortBuffer(struct + PS_Private.MIN_FEATURE, 2); } - /** Unsafe version of {@link #min_feature(int) min_feature}. */ - public static short nmin_feature(long struct, int index) { - return UNSAFE.getShort(null, struct + PS_Private.MIN_FEATURE + check(index, 2) * 2); - } - - // ----------------------------------- - - /** An array of {@link PS_Private} structs. */ - public static class Buffer extends StructBuffer { - - private static final PS_Private ELEMENT_FACTORY = PS_Private.create(-1L); - - /** - * Creates a new {@code PS_Private.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link PS_Private#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected PS_Private getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code unique_id} field. */ - @NativeType("FT_Int") - public int unique_id() { return PS_Private.nunique_id(address()); } - /** @return the value of the {@code lenIV} field. */ - @NativeType("FT_Int") - public int lenIV() { return PS_Private.nlenIV(address()); } - /** @return the value of the {@code num_blue_values} field. */ - @NativeType("FT_Byte") - public byte num_blue_values() { return PS_Private.nnum_blue_values(address()); } - /** @return the value of the {@code num_other_blues} field. */ - @NativeType("FT_Byte") - public byte num_other_blues() { return PS_Private.nnum_other_blues(address()); } - /** @return the value of the {@code num_family_blues} field. */ - @NativeType("FT_Byte") - public byte num_family_blues() { return PS_Private.nnum_family_blues(address()); } - /** @return the value of the {@code num_family_other_blues} field. */ - @NativeType("FT_Byte") - public byte num_family_other_blues() { return PS_Private.nnum_family_other_blues(address()); } - /** @return a {@link ShortBuffer} view of the {@code blue_values} field. */ - @NativeType("FT_Short[14]") - public ShortBuffer blue_values() { return PS_Private.nblue_values(address()); } - /** @return the value at the specified index of the {@code blue_values} field. */ - @NativeType("FT_Short") - public short blue_values(int index) { return PS_Private.nblue_values(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code other_blues} field. */ - @NativeType("FT_Short[10]") - public ShortBuffer other_blues() { return PS_Private.nother_blues(address()); } - /** @return the value at the specified index of the {@code other_blues} field. */ - @NativeType("FT_Short") - public short other_blues(int index) { return PS_Private.nother_blues(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code family_blues} field. */ - @NativeType("FT_Short[14]") - public ShortBuffer family_blues() { return PS_Private.nfamily_blues(address()); } - /** @return the value at the specified index of the {@code family_blues} field. */ - @NativeType("FT_Short") - public short family_blues(int index) { return PS_Private.nfamily_blues(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code family_other_blues} field. */ - @NativeType("FT_Short[10]") - public ShortBuffer family_other_blues() { return PS_Private.nfamily_other_blues(address()); } - /** @return the value at the specified index of the {@code family_other_blues} field. */ - @NativeType("FT_Short") - public short family_other_blues(int index) { return PS_Private.nfamily_other_blues(address(), index); } - /** @return the value of the {@code blue_scale} field. */ - @NativeType("FT_Fixed") - public long blue_scale() { return PS_Private.nblue_scale(address()); } - /** @return the value of the {@code blue_shift} field. */ - @NativeType("FT_Int") - public int blue_shift() { return PS_Private.nblue_shift(address()); } - /** @return the value of the {@code blue_fuzz} field. */ - @NativeType("FT_Int") - public int blue_fuzz() { return PS_Private.nblue_fuzz(address()); } - /** @return a {@link ShortBuffer} view of the {@code standard_width} field. */ - @NativeType("FT_UShort[1]") - public ShortBuffer standard_width() { return PS_Private.nstandard_width(address()); } - /** @return the value at the specified index of the {@code standard_width} field. */ - @NativeType("FT_UShort") - public short standard_width(int index) { return PS_Private.nstandard_width(address(), index); } - /** @return a {@link ShortBuffer} view of the {@code standard_height} field. */ - @NativeType("FT_UShort[1]") - public ShortBuffer standard_height() { return PS_Private.nstandard_height(address()); } - /** @return the value at the specified index of the {@code standard_height} field. */ - @NativeType("FT_UShort") - public short standard_height(int index) { return PS_Private.nstandard_height(address(), index); } - /** @return the value of the {@code num_snap_widths} field. */ - @NativeType("FT_Byte") - public byte num_snap_widths() { return PS_Private.nnum_snap_widths(address()); } - /** @return the value of the {@code num_snap_heights} field. */ - @NativeType("FT_Byte") - public byte num_snap_heights() { return PS_Private.nnum_snap_heights(address()); } - /** @return the value of the {@code force_bold} field. */ - @NativeType("FT_Bool") - public boolean force_bold() { return PS_Private.nforce_bold(address()); } - /** @return the value of the {@code round_stem_up} field. */ - @NativeType("FT_Bool") - public boolean round_stem_up() { return PS_Private.nround_stem_up(address()); } - /** @return a {@link ShortBuffer} view of the {@link PS_Private#snap_widths} field. */ - @NativeType("FT_Short[13]") - public ShortBuffer snap_widths() { return PS_Private.nsnap_widths(address()); } - /** @return the value at the specified index of the {@link PS_Private#snap_widths} field. */ - @NativeType("FT_Short") - public short snap_widths(int index) { return PS_Private.nsnap_widths(address(), index); } - /** @return a {@link ShortBuffer} view of the {@link PS_Private#snap_heights} field. */ - @NativeType("FT_Short[13]") - public ShortBuffer snap_heights() { return PS_Private.nsnap_heights(address()); } - /** @return the value at the specified index of the {@link PS_Private#snap_heights} field. */ - @NativeType("FT_Short") - public short snap_heights(int index) { return PS_Private.nsnap_heights(address(), index); } - /** @return the value of the {@code expansion_factor} field. */ - @NativeType("FT_Fixed") - public long expansion_factor() { return PS_Private.nexpansion_factor(address()); } - /** @return the value of the {@code language_group} field. */ - @NativeType("FT_Long") - public long language_group() { return PS_Private.nlanguage_group(address()); } - /** @return the value of the {@code password} field. */ - @NativeType("FT_Long") - public long password() { return PS_Private.npassword(address()); } - /** @return a {@link ShortBuffer} view of the {@code min_feature} field. */ - @NativeType("FT_Short[2]") - public ShortBuffer min_feature() { return PS_Private.nmin_feature(address()); } - /** @return the value at the specified index of the {@code min_feature} field. */ - @NativeType("FT_Short") - public short min_feature(int index) { return PS_Private.nmin_feature(address(), index); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Free_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Free_Func.java deleted file mode 100644 index b94c78aa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Free_Func.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Pointer *data_pointer
    - * )
    - */ -public abstract class SVG_Lib_Free_Func extends Callback implements SVG_Lib_Free_FuncI { - - /** - * Creates a {@code SVG_Lib_Free_Func} instance from the specified function pointer. - * - * @return the new {@code SVG_Lib_Free_Func} - */ - public static SVG_Lib_Free_Func create(long functionPointer) { - SVG_Lib_Free_FuncI instance = Callback.get(functionPointer); - return instance instanceof SVG_Lib_Free_Func - ? (SVG_Lib_Free_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static SVG_Lib_Free_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code SVG_Lib_Free_Func} instance that delegates to the specified {@code SVG_Lib_Free_FuncI} instance. */ - public static SVG_Lib_Free_Func create(SVG_Lib_Free_FuncI instance) { - return instance instanceof SVG_Lib_Free_Func - ? (SVG_Lib_Free_Func)instance - : new Container(instance.address(), instance); - } - - protected SVG_Lib_Free_Func() { - super(CIF); - } - - SVG_Lib_Free_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends SVG_Lib_Free_Func { - - private final SVG_Lib_Free_FuncI delegate; - - Container(long functionPointer, SVG_Lib_Free_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public void invoke(long data_pointer) { - delegate.invoke(data_pointer); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Free_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Free_FuncI.java deleted file mode 100644 index 5af5b89c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Free_FuncI.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * void (*{@link #invoke}) (
    - *     FT_Pointer *data_pointer
    - * )
    - */ -@FunctionalInterface -@NativeType("SVG_Lib_Free_Func") -public interface SVG_Lib_Free_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_void, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - invoke( - memGetAddress(memGetAddress(args)) - ); - } - - /** A callback that is called when the {@code ot-svg} module is being freed. */ - void invoke(@NativeType("FT_Pointer *") long data_pointer); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Init_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Init_Func.java deleted file mode 100644 index 8a040daa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Init_Func.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Pointer *data_pointer
    - * )
    - */ -public abstract class SVG_Lib_Init_Func extends Callback implements SVG_Lib_Init_FuncI { - - /** - * Creates a {@code SVG_Lib_Init_Func} instance from the specified function pointer. - * - * @return the new {@code SVG_Lib_Init_Func} - */ - public static SVG_Lib_Init_Func create(long functionPointer) { - SVG_Lib_Init_FuncI instance = Callback.get(functionPointer); - return instance instanceof SVG_Lib_Init_Func - ? (SVG_Lib_Init_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static SVG_Lib_Init_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code SVG_Lib_Init_Func} instance that delegates to the specified {@code SVG_Lib_Init_FuncI} instance. */ - public static SVG_Lib_Init_Func create(SVG_Lib_Init_FuncI instance) { - return instance instanceof SVG_Lib_Init_Func - ? (SVG_Lib_Init_Func)instance - : new Container(instance.address(), instance); - } - - protected SVG_Lib_Init_Func() { - super(CIF); - } - - SVG_Lib_Init_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends SVG_Lib_Init_Func { - - private final SVG_Lib_Init_FuncI delegate; - - Container(long functionPointer, SVG_Lib_Init_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long data_pointer) { - return delegate.invoke(data_pointer); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Init_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Init_FuncI.java deleted file mode 100644 index 78171175..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Init_FuncI.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_Pointer *data_pointer
    - * )
    - */ -@FunctionalInterface -@NativeType("SVG_Lib_Init_Func") -public interface SVG_Lib_Init_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)) - ); - apiClosureRet(ret, __result); - } - - /** A callback that is called when the first OT-SVG glyph is rendered in the lifetime of an {@code FT_Library} object. */ - @NativeType("FT_Error") int invoke(@NativeType("FT_Pointer *") long data_pointer); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Preset_Slot_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Preset_Slot_Func.java deleted file mode 100644 index fff90782..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Preset_Slot_Func.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_GlyphSlot slot,
    - *     FT_Bool cache,
    - *     FT_Pointer *state
    - * )
    - */ -public abstract class SVG_Lib_Preset_Slot_Func extends Callback implements SVG_Lib_Preset_Slot_FuncI { - - /** - * Creates a {@code SVG_Lib_Preset_Slot_Func} instance from the specified function pointer. - * - * @return the new {@code SVG_Lib_Preset_Slot_Func} - */ - public static SVG_Lib_Preset_Slot_Func create(long functionPointer) { - SVG_Lib_Preset_Slot_FuncI instance = Callback.get(functionPointer); - return instance instanceof SVG_Lib_Preset_Slot_Func - ? (SVG_Lib_Preset_Slot_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static SVG_Lib_Preset_Slot_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code SVG_Lib_Preset_Slot_Func} instance that delegates to the specified {@code SVG_Lib_Preset_Slot_FuncI} instance. */ - public static SVG_Lib_Preset_Slot_Func create(SVG_Lib_Preset_Slot_FuncI instance) { - return instance instanceof SVG_Lib_Preset_Slot_Func - ? (SVG_Lib_Preset_Slot_Func)instance - : new Container(instance.address(), instance); - } - - protected SVG_Lib_Preset_Slot_Func() { - super(CIF); - } - - SVG_Lib_Preset_Slot_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends SVG_Lib_Preset_Slot_Func { - - private final SVG_Lib_Preset_Slot_FuncI delegate; - - Container(long functionPointer, SVG_Lib_Preset_Slot_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long slot, boolean cache, long state) { - return delegate.invoke(slot, cache, state); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Preset_Slot_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Preset_Slot_FuncI.java deleted file mode 100644 index 2a49a415..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Preset_Slot_FuncI.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_GlyphSlot slot,
    - *     FT_Bool cache,
    - *     FT_Pointer *state
    - * )
    - */ -@FunctionalInterface -@NativeType("SVG_Lib_Preset_Slot_Func") -public interface SVG_Lib_Preset_Slot_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_uint8, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetByte(memGetAddress(args + POINTER_SIZE)) != 0, - memGetAddress(memGetAddress(args + 2 * POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A callback that is called to preset the glyph slot. */ - @NativeType("FT_Error") int invoke(@NativeType("FT_GlyphSlot") long slot, @NativeType("FT_Bool") boolean cache, @NativeType("FT_Pointer *") long state); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Render_Func.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Render_Func.java deleted file mode 100644 index 88c7553c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Render_Func.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_GlyphSlot slot,
    - *     FT_Pointer *data_pointer
    - * )
    - */ -public abstract class SVG_Lib_Render_Func extends Callback implements SVG_Lib_Render_FuncI { - - /** - * Creates a {@code SVG_Lib_Render_Func} instance from the specified function pointer. - * - * @return the new {@code SVG_Lib_Render_Func} - */ - public static SVG_Lib_Render_Func create(long functionPointer) { - SVG_Lib_Render_FuncI instance = Callback.get(functionPointer); - return instance instanceof SVG_Lib_Render_Func - ? (SVG_Lib_Render_Func)instance - : new Container(functionPointer, instance); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */ - @Nullable - public static SVG_Lib_Render_Func createSafe(long functionPointer) { - return functionPointer == NULL ? null : create(functionPointer); - } - - /** Creates a {@code SVG_Lib_Render_Func} instance that delegates to the specified {@code SVG_Lib_Render_FuncI} instance. */ - public static SVG_Lib_Render_Func create(SVG_Lib_Render_FuncI instance) { - return instance instanceof SVG_Lib_Render_Func - ? (SVG_Lib_Render_Func)instance - : new Container(instance.address(), instance); - } - - protected SVG_Lib_Render_Func() { - super(CIF); - } - - SVG_Lib_Render_Func(long functionPointer) { - super(functionPointer); - } - - private static final class Container extends SVG_Lib_Render_Func { - - private final SVG_Lib_Render_FuncI delegate; - - Container(long functionPointer, SVG_Lib_Render_FuncI delegate) { - super(functionPointer); - this.delegate = delegate; - } - - @Override - public int invoke(long slot, long data_pointer) { - return delegate.invoke(slot, data_pointer); - } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Render_FuncI.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Render_FuncI.java deleted file mode 100644 index 5496cb21..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_Lib_Render_FuncI.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import org.lwjgl.system.*; -import org.lwjgl.system.libffi.*; - -import static org.lwjgl.system.APIUtil.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.libffi.LibFFI.*; - -/** - *

    Type

    - * - *
    
    - * FT_Error (*{@link #invoke}) (
    - *     FT_GlyphSlot slot,
    - *     FT_Pointer *data_pointer
    - * )
    - */ -@FunctionalInterface -@NativeType("SVG_Lib_Render_Func") -public interface SVG_Lib_Render_FuncI extends CallbackI { - - FFICIF CIF = apiCreateCIF( - FFI_DEFAULT_ABI, - ffi_type_sint32, - ffi_type_pointer, ffi_type_pointer - ); - - @Override - default FFICIF getCallInterface() { return CIF; } - - @Override - default void callback(long ret, long args) { - int __result = invoke( - memGetAddress(memGetAddress(args)), - memGetAddress(memGetAddress(args + POINTER_SIZE)) - ); - apiClosureRet(ret, __result); - } - - /** A callback that is called to render an OT-SVG glyph. */ - @NativeType("FT_Error") int invoke(@NativeType("FT_GlyphSlot") long slot, @NativeType("FT_Pointer *") long data_pointer); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_RendererHooks.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_RendererHooks.java deleted file mode 100644 index 57109058..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/SVG_RendererHooks.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; -import static org.lwjgl.system.MemoryStack.*; - -/** - * A structure that stores the four hooks needed to render OT-SVG glyphs properly. - * - *

    Layout

    - * - *
    
    - * struct SVG_RendererHooks {
    - *     {@link SVG_Lib_Init_FuncI SVG_Lib_Init_Func} init_svg;
    - *     {@link SVG_Lib_Free_FuncI SVG_Lib_Free_Func} free_svg;
    - *     {@link SVG_Lib_Render_FuncI SVG_Lib_Render_Func} render_svg;
    - *     {@link SVG_Lib_Preset_Slot_FuncI SVG_Lib_Preset_Slot_Func} preset_slot;
    - * }
    - */ -public class SVG_RendererHooks extends Struct implements NativeResource { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - INIT_SVG, - FREE_SVG, - RENDER_SVG, - PRESET_SLOT; - - static { - Layout layout = __struct( - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - INIT_SVG = layout.offsetof(0); - FREE_SVG = layout.offsetof(1); - RENDER_SVG = layout.offsetof(2); - PRESET_SLOT = layout.offsetof(3); - } - - protected SVG_RendererHooks(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected SVG_RendererHooks create(long address, @Nullable ByteBuffer container) { - return new SVG_RendererHooks(address, container); - } - - /** - * Creates a {@code SVG_RendererHooks} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public SVG_RendererHooks(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code init_svg} field. */ - public SVG_Lib_Init_Func init_svg() { return ninit_svg(address()); } - /** @return the value of the {@code free_svg} field. */ - public SVG_Lib_Free_Func free_svg() { return nfree_svg(address()); } - /** @return the value of the {@code render_svg} field. */ - public SVG_Lib_Render_Func render_svg() { return nrender_svg(address()); } - /** @return the value of the {@code preset_slot} field. */ - public SVG_Lib_Preset_Slot_Func preset_slot() { return npreset_slot(address()); } - - /** Sets the specified value to the {@code init_svg} field. */ - public SVG_RendererHooks init_svg(@NativeType("SVG_Lib_Init_Func") SVG_Lib_Init_FuncI value) { ninit_svg(address(), value); return this; } - /** Sets the specified value to the {@code free_svg} field. */ - public SVG_RendererHooks free_svg(@NativeType("SVG_Lib_Free_Func") SVG_Lib_Free_FuncI value) { nfree_svg(address(), value); return this; } - /** Sets the specified value to the {@code render_svg} field. */ - public SVG_RendererHooks render_svg(@NativeType("SVG_Lib_Render_Func") SVG_Lib_Render_FuncI value) { nrender_svg(address(), value); return this; } - /** Sets the specified value to the {@code preset_slot} field. */ - public SVG_RendererHooks preset_slot(@NativeType("SVG_Lib_Preset_Slot_Func") SVG_Lib_Preset_Slot_FuncI value) { npreset_slot(address(), value); return this; } - - /** Initializes this struct with the specified values. */ - public SVG_RendererHooks set( - SVG_Lib_Init_FuncI init_svg, - SVG_Lib_Free_FuncI free_svg, - SVG_Lib_Render_FuncI render_svg, - SVG_Lib_Preset_Slot_FuncI preset_slot - ) { - init_svg(init_svg); - free_svg(free_svg); - render_svg(render_svg); - preset_slot(preset_slot); - - return this; - } - - /** - * Copies the specified struct data to this struct. - * - * @param src the source struct - * - * @return this struct - */ - public SVG_RendererHooks set(SVG_RendererHooks src) { - memCopy(src.address(), address(), SIZEOF); - return this; - } - - // ----------------------------------- - - /** Returns a new {@code SVG_RendererHooks} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ - public static SVG_RendererHooks malloc() { - return new SVG_RendererHooks(nmemAllocChecked(SIZEOF), null); - } - - /** Returns a new {@code SVG_RendererHooks} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ - public static SVG_RendererHooks calloc() { - return new SVG_RendererHooks(nmemCallocChecked(1, SIZEOF), null); - } - - /** Returns a new {@code SVG_RendererHooks} instance allocated with {@link BufferUtils}. */ - public static SVG_RendererHooks create() { - ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); - return new SVG_RendererHooks(memAddress(container), container); - } - - /** Returns a new {@code SVG_RendererHooks} instance for the specified memory address. */ - public static SVG_RendererHooks create(long address) { - return new SVG_RendererHooks(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static SVG_RendererHooks createSafe(long address) { - return address == NULL ? null : new SVG_RendererHooks(address, null); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity) { - return new Buffer(nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. - * - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity) { - return new Buffer(nmemCallocChecked(capacity, SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated with {@link BufferUtils}. - * - * @param capacity the buffer capacity - */ - public static Buffer create(int capacity) { - ByteBuffer container = __create(capacity, SIZEOF); - return new Buffer(memAddress(container), container, -1, 0, capacity, capacity); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - /** - * Returns a new {@code SVG_RendererHooks} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - */ - public static SVG_RendererHooks malloc(MemoryStack stack) { - return new SVG_RendererHooks(stack.nmalloc(ALIGNOF, SIZEOF), null); - } - - /** - * Returns a new {@code SVG_RendererHooks} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - */ - public static SVG_RendererHooks calloc(MemoryStack stack) { - return new SVG_RendererHooks(stack.ncalloc(ALIGNOF, 1, SIZEOF), null); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack}. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer malloc(int capacity, MemoryStack stack) { - return new Buffer(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); - } - - /** - * Returns a new {@link Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. - * - * @param stack the stack from which to allocate - * @param capacity the buffer capacity - */ - public static Buffer calloc(int capacity, MemoryStack stack) { - return new Buffer(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #init_svg}. */ - public static SVG_Lib_Init_Func ninit_svg(long struct) { return SVG_Lib_Init_Func.create(memGetAddress(struct + SVG_RendererHooks.INIT_SVG)); } - /** Unsafe version of {@link #free_svg}. */ - public static SVG_Lib_Free_Func nfree_svg(long struct) { return SVG_Lib_Free_Func.create(memGetAddress(struct + SVG_RendererHooks.FREE_SVG)); } - /** Unsafe version of {@link #render_svg}. */ - public static SVG_Lib_Render_Func nrender_svg(long struct) { return SVG_Lib_Render_Func.create(memGetAddress(struct + SVG_RendererHooks.RENDER_SVG)); } - /** Unsafe version of {@link #preset_slot}. */ - public static SVG_Lib_Preset_Slot_Func npreset_slot(long struct) { return SVG_Lib_Preset_Slot_Func.create(memGetAddress(struct + SVG_RendererHooks.PRESET_SLOT)); } - - /** Unsafe version of {@link #init_svg(SVG_Lib_Init_FuncI) init_svg}. */ - public static void ninit_svg(long struct, SVG_Lib_Init_FuncI value) { memPutAddress(struct + SVG_RendererHooks.INIT_SVG, value.address()); } - /** Unsafe version of {@link #free_svg(SVG_Lib_Free_FuncI) free_svg}. */ - public static void nfree_svg(long struct, SVG_Lib_Free_FuncI value) { memPutAddress(struct + SVG_RendererHooks.FREE_SVG, value.address()); } - /** Unsafe version of {@link #render_svg(SVG_Lib_Render_FuncI) render_svg}. */ - public static void nrender_svg(long struct, SVG_Lib_Render_FuncI value) { memPutAddress(struct + SVG_RendererHooks.RENDER_SVG, value.address()); } - /** Unsafe version of {@link #preset_slot(SVG_Lib_Preset_Slot_FuncI) preset_slot}. */ - public static void npreset_slot(long struct, SVG_Lib_Preset_Slot_FuncI value) { memPutAddress(struct + SVG_RendererHooks.PRESET_SLOT, value.address()); } - - /** - * Validates pointer members that should not be {@code NULL}. - * - * @param struct the struct to validate - */ - public static void validate(long struct) { - check(memGetAddress(struct + SVG_RendererHooks.INIT_SVG)); - check(memGetAddress(struct + SVG_RendererHooks.FREE_SVG)); - check(memGetAddress(struct + SVG_RendererHooks.RENDER_SVG)); - check(memGetAddress(struct + SVG_RendererHooks.PRESET_SLOT)); - } - - // ----------------------------------- - - /** An array of {@link SVG_RendererHooks} structs. */ - public static class Buffer extends StructBuffer implements NativeResource { - - private static final SVG_RendererHooks ELEMENT_FACTORY = SVG_RendererHooks.create(-1L); - - /** - * Creates a new {@code SVG_RendererHooks.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link SVG_RendererHooks#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected SVG_RendererHooks getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code init_svg} field. */ - public SVG_Lib_Init_Func init_svg() { return SVG_RendererHooks.ninit_svg(address()); } - /** @return the value of the {@code free_svg} field. */ - public SVG_Lib_Free_Func free_svg() { return SVG_RendererHooks.nfree_svg(address()); } - /** @return the value of the {@code render_svg} field. */ - public SVG_Lib_Render_Func render_svg() { return SVG_RendererHooks.nrender_svg(address()); } - /** @return the value of the {@code preset_slot} field. */ - public SVG_Lib_Preset_Slot_Func preset_slot() { return SVG_RendererHooks.npreset_slot(address()); } - - /** Sets the specified value to the {@code init_svg} field. */ - public Buffer init_svg(@NativeType("SVG_Lib_Init_Func") SVG_Lib_Init_FuncI value) { SVG_RendererHooks.ninit_svg(address(), value); return this; } - /** Sets the specified value to the {@code free_svg} field. */ - public Buffer free_svg(@NativeType("SVG_Lib_Free_Func") SVG_Lib_Free_FuncI value) { SVG_RendererHooks.nfree_svg(address(), value); return this; } - /** Sets the specified value to the {@code render_svg} field. */ - public Buffer render_svg(@NativeType("SVG_Lib_Render_Func") SVG_Lib_Render_FuncI value) { SVG_RendererHooks.nrender_svg(address(), value); return this; } - /** Sets the specified value to the {@code preset_slot} field. */ - public Buffer preset_slot(@NativeType("SVG_Lib_Preset_Slot_Func") SVG_Lib_Preset_Slot_FuncI value) { SVG_RendererHooks.npreset_slot(address(), value); return this; } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_Header.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_Header.java deleted file mode 100644 index 733eb1aa..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_Header.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a TrueType font header table. - * - *

    Layout

    - * - *
    
    - * struct TT_Header {
    - *     FT_Fixed Table_Version;
    - *     FT_Fixed Font_Revision;
    - *     FT_Long CheckSum_Adjust;
    - *     FT_Long Magic_Number;
    - *     FT_UShort Flags;
    - *     FT_UShort Units_Per_EM;
    - *     FT_ULong Created[2];
    - *     FT_ULong Modified[2];
    - *     FT_Short xMin;
    - *     FT_Short yMin;
    - *     FT_Short xMax;
    - *     FT_Short yMax;
    - *     FT_UShort Mac_Style;
    - *     FT_UShort Lowest_Rec_PPEM;
    - *     FT_Short Font_Direction;
    - *     FT_Short Index_To_Loc_Format;
    - *     FT_Short Glyph_Data_Format;
    - * }
    - */ -public class TT_Header extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - TABLE_VERSION, - FONT_REVISION, - CHECKSUM_ADJUST, - MAGIC_NUMBER, - FLAGS, - UNITS_PER_EM, - CREATED, - MODIFIED, - XMIN, - YMIN, - XMAX, - YMAX, - MAC_STYLE, - LOWEST_REC_PPEM, - FONT_DIRECTION, - INDEX_TO_LOC_FORMAT, - GLYPH_DATA_FORMAT; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(2), - __member(2), - __array(CLONG_SIZE, 2), - __array(CLONG_SIZE, 2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - TABLE_VERSION = layout.offsetof(0); - FONT_REVISION = layout.offsetof(1); - CHECKSUM_ADJUST = layout.offsetof(2); - MAGIC_NUMBER = layout.offsetof(3); - FLAGS = layout.offsetof(4); - UNITS_PER_EM = layout.offsetof(5); - CREATED = layout.offsetof(6); - MODIFIED = layout.offsetof(7); - XMIN = layout.offsetof(8); - YMIN = layout.offsetof(9); - XMAX = layout.offsetof(10); - YMAX = layout.offsetof(11); - MAC_STYLE = layout.offsetof(12); - LOWEST_REC_PPEM = layout.offsetof(13); - FONT_DIRECTION = layout.offsetof(14); - INDEX_TO_LOC_FORMAT = layout.offsetof(15); - GLYPH_DATA_FORMAT = layout.offsetof(16); - } - - protected TT_Header(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TT_Header create(long address, @Nullable ByteBuffer container) { - return new TT_Header(address, container); - } - - /** - * Creates a {@code TT_Header} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TT_Header(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code Table_Version} field. */ - @NativeType("FT_Fixed") - public long Table_Version() { return nTable_Version(address()); } - /** @return the value of the {@code Font_Revision} field. */ - @NativeType("FT_Fixed") - public long Font_Revision() { return nFont_Revision(address()); } - /** @return the value of the {@code CheckSum_Adjust} field. */ - @NativeType("FT_Long") - public long CheckSum_Adjust() { return nCheckSum_Adjust(address()); } - /** @return the value of the {@code Magic_Number} field. */ - @NativeType("FT_Long") - public long Magic_Number() { return nMagic_Number(address()); } - /** @return the value of the {@code Flags} field. */ - @NativeType("FT_UShort") - public short Flags() { return nFlags(address()); } - /** @return the value of the {@code Units_Per_EM} field. */ - @NativeType("FT_UShort") - public short Units_Per_EM() { return nUnits_Per_EM(address()); } - /** @return a {@link CLongBuffer} view of the {@code Created} field. */ - @NativeType("FT_ULong[2]") - public CLongBuffer Created() { return nCreated(address()); } - /** @return the value at the specified index of the {@code Created} field. */ - @NativeType("FT_ULong") - public long Created(int index) { return nCreated(address(), index); } - /** @return a {@link CLongBuffer} view of the {@code Modified} field. */ - @NativeType("FT_ULong[2]") - public CLongBuffer Modified() { return nModified(address()); } - /** @return the value at the specified index of the {@code Modified} field. */ - @NativeType("FT_ULong") - public long Modified(int index) { return nModified(address(), index); } - /** @return the value of the {@code xMin} field. */ - @NativeType("FT_Short") - public short xMin() { return nxMin(address()); } - /** @return the value of the {@code yMin} field. */ - @NativeType("FT_Short") - public short yMin() { return nyMin(address()); } - /** @return the value of the {@code xMax} field. */ - @NativeType("FT_Short") - public short xMax() { return nxMax(address()); } - /** @return the value of the {@code yMax} field. */ - @NativeType("FT_Short") - public short yMax() { return nyMax(address()); } - /** @return the value of the {@code Mac_Style} field. */ - @NativeType("FT_UShort") - public short Mac_Style() { return nMac_Style(address()); } - /** @return the value of the {@code Lowest_Rec_PPEM} field. */ - @NativeType("FT_UShort") - public short Lowest_Rec_PPEM() { return nLowest_Rec_PPEM(address()); } - /** @return the value of the {@code Font_Direction} field. */ - @NativeType("FT_Short") - public short Font_Direction() { return nFont_Direction(address()); } - /** @return the value of the {@code Index_To_Loc_Format} field. */ - @NativeType("FT_Short") - public short Index_To_Loc_Format() { return nIndex_To_Loc_Format(address()); } - /** @return the value of the {@code Glyph_Data_Format} field. */ - @NativeType("FT_Short") - public short Glyph_Data_Format() { return nGlyph_Data_Format(address()); } - - // ----------------------------------- - - /** Returns a new {@code TT_Header} instance for the specified memory address. */ - public static TT_Header create(long address) { - return new TT_Header(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TT_Header createSafe(long address) { - return address == NULL ? null : new TT_Header(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #Table_Version}. */ - public static long nTable_Version(long struct) { return memGetCLong(struct + TT_Header.TABLE_VERSION); } - /** Unsafe version of {@link #Font_Revision}. */ - public static long nFont_Revision(long struct) { return memGetCLong(struct + TT_Header.FONT_REVISION); } - /** Unsafe version of {@link #CheckSum_Adjust}. */ - public static long nCheckSum_Adjust(long struct) { return memGetCLong(struct + TT_Header.CHECKSUM_ADJUST); } - /** Unsafe version of {@link #Magic_Number}. */ - public static long nMagic_Number(long struct) { return memGetCLong(struct + TT_Header.MAGIC_NUMBER); } - /** Unsafe version of {@link #Flags}. */ - public static short nFlags(long struct) { return UNSAFE.getShort(null, struct + TT_Header.FLAGS); } - /** Unsafe version of {@link #Units_Per_EM}. */ - public static short nUnits_Per_EM(long struct) { return UNSAFE.getShort(null, struct + TT_Header.UNITS_PER_EM); } - /** Unsafe version of {@link #Created}. */ - public static CLongBuffer nCreated(long struct) { return memCLongBuffer(struct + TT_Header.CREATED, 2); } - /** Unsafe version of {@link #Created(int) Created}. */ - public static long nCreated(long struct, int index) { - return memGetCLong(struct + TT_Header.CREATED + check(index, 2) * CLONG_SIZE); - } - /** Unsafe version of {@link #Modified}. */ - public static CLongBuffer nModified(long struct) { return memCLongBuffer(struct + TT_Header.MODIFIED, 2); } - /** Unsafe version of {@link #Modified(int) Modified}. */ - public static long nModified(long struct, int index) { - return memGetCLong(struct + TT_Header.MODIFIED + check(index, 2) * CLONG_SIZE); - } - /** Unsafe version of {@link #xMin}. */ - public static short nxMin(long struct) { return UNSAFE.getShort(null, struct + TT_Header.XMIN); } - /** Unsafe version of {@link #yMin}. */ - public static short nyMin(long struct) { return UNSAFE.getShort(null, struct + TT_Header.YMIN); } - /** Unsafe version of {@link #xMax}. */ - public static short nxMax(long struct) { return UNSAFE.getShort(null, struct + TT_Header.XMAX); } - /** Unsafe version of {@link #yMax}. */ - public static short nyMax(long struct) { return UNSAFE.getShort(null, struct + TT_Header.YMAX); } - /** Unsafe version of {@link #Mac_Style}. */ - public static short nMac_Style(long struct) { return UNSAFE.getShort(null, struct + TT_Header.MAC_STYLE); } - /** Unsafe version of {@link #Lowest_Rec_PPEM}. */ - public static short nLowest_Rec_PPEM(long struct) { return UNSAFE.getShort(null, struct + TT_Header.LOWEST_REC_PPEM); } - /** Unsafe version of {@link #Font_Direction}. */ - public static short nFont_Direction(long struct) { return UNSAFE.getShort(null, struct + TT_Header.FONT_DIRECTION); } - /** Unsafe version of {@link #Index_To_Loc_Format}. */ - public static short nIndex_To_Loc_Format(long struct) { return UNSAFE.getShort(null, struct + TT_Header.INDEX_TO_LOC_FORMAT); } - /** Unsafe version of {@link #Glyph_Data_Format}. */ - public static short nGlyph_Data_Format(long struct) { return UNSAFE.getShort(null, struct + TT_Header.GLYPH_DATA_FORMAT); } - - // ----------------------------------- - - /** An array of {@link TT_Header} structs. */ - public static class Buffer extends StructBuffer { - - private static final TT_Header ELEMENT_FACTORY = TT_Header.create(-1L); - - /** - * Creates a new {@code TT_Header.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TT_Header#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TT_Header getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code Table_Version} field. */ - @NativeType("FT_Fixed") - public long Table_Version() { return TT_Header.nTable_Version(address()); } - /** @return the value of the {@code Font_Revision} field. */ - @NativeType("FT_Fixed") - public long Font_Revision() { return TT_Header.nFont_Revision(address()); } - /** @return the value of the {@code CheckSum_Adjust} field. */ - @NativeType("FT_Long") - public long CheckSum_Adjust() { return TT_Header.nCheckSum_Adjust(address()); } - /** @return the value of the {@code Magic_Number} field. */ - @NativeType("FT_Long") - public long Magic_Number() { return TT_Header.nMagic_Number(address()); } - /** @return the value of the {@code Flags} field. */ - @NativeType("FT_UShort") - public short Flags() { return TT_Header.nFlags(address()); } - /** @return the value of the {@code Units_Per_EM} field. */ - @NativeType("FT_UShort") - public short Units_Per_EM() { return TT_Header.nUnits_Per_EM(address()); } - /** @return a {@link CLongBuffer} view of the {@code Created} field. */ - @NativeType("FT_ULong[2]") - public CLongBuffer Created() { return TT_Header.nCreated(address()); } - /** @return the value at the specified index of the {@code Created} field. */ - @NativeType("FT_ULong") - public long Created(int index) { return TT_Header.nCreated(address(), index); } - /** @return a {@link CLongBuffer} view of the {@code Modified} field. */ - @NativeType("FT_ULong[2]") - public CLongBuffer Modified() { return TT_Header.nModified(address()); } - /** @return the value at the specified index of the {@code Modified} field. */ - @NativeType("FT_ULong") - public long Modified(int index) { return TT_Header.nModified(address(), index); } - /** @return the value of the {@code xMin} field. */ - @NativeType("FT_Short") - public short xMin() { return TT_Header.nxMin(address()); } - /** @return the value of the {@code yMin} field. */ - @NativeType("FT_Short") - public short yMin() { return TT_Header.nyMin(address()); } - /** @return the value of the {@code xMax} field. */ - @NativeType("FT_Short") - public short xMax() { return TT_Header.nxMax(address()); } - /** @return the value of the {@code yMax} field. */ - @NativeType("FT_Short") - public short yMax() { return TT_Header.nyMax(address()); } - /** @return the value of the {@code Mac_Style} field. */ - @NativeType("FT_UShort") - public short Mac_Style() { return TT_Header.nMac_Style(address()); } - /** @return the value of the {@code Lowest_Rec_PPEM} field. */ - @NativeType("FT_UShort") - public short Lowest_Rec_PPEM() { return TT_Header.nLowest_Rec_PPEM(address()); } - /** @return the value of the {@code Font_Direction} field. */ - @NativeType("FT_Short") - public short Font_Direction() { return TT_Header.nFont_Direction(address()); } - /** @return the value of the {@code Index_To_Loc_Format} field. */ - @NativeType("FT_Short") - public short Index_To_Loc_Format() { return TT_Header.nIndex_To_Loc_Format(address()); } - /** @return the value of the {@code Glyph_Data_Format} field. */ - @NativeType("FT_Short") - public short Glyph_Data_Format() { return TT_Header.nGlyph_Data_Format(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_HoriHeader.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_HoriHeader.java deleted file mode 100644 index 4cd20af4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_HoriHeader.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a TrueType horizontal header, the {@code hhea} table, as well as the corresponding horizontal metrics table, {@code hmtx}. - * - *

    Layout

    - * - *
    
    - * struct TT_HoriHeader {
    - *     FT_Fixed Version;
    - *     FT_Short Ascender;
    - *     FT_Short Descender;
    - *     FT_Short Line_Gap;
    - *     FT_UShort {@link #advance_Width_Max};
    - *     FT_Short {@link #min_Left_Side_Bearing};
    - *     FT_Short {@link #min_Right_Side_Bearing};
    - *     FT_Short {@link #xMax_Extent};
    - *     FT_Short caret_Slope_Rise;
    - *     FT_Short caret_Slope_Run;
    - *     FT_Short caret_Offset;
    - *     FT_Short Reserved[4];
    - *     FT_Short metric_Data_Format;
    - *     FT_UShort number_Of_HMetrics;
    - *     void * long_metrics;
    - *     void * short_metrics;
    - * }
    - */ -public class TT_HoriHeader extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VERSION, - ASCENDER, - DESCENDER, - LINE_GAP, - ADVANCE_WIDTH_MAX, - MIN_LEFT_SIDE_BEARING, - MIN_RIGHT_SIDE_BEARING, - XMAX_EXTENT, - CARET_SLOPE_RISE, - CARET_SLOPE_RUN, - CARET_OFFSET, - RESERVED, - METRIC_DATA_FORMAT, - NUMBER_OF_HMETRICS, - LONG_METRICS, - SHORT_METRICS; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __array(2, 4), - __member(2), - __member(2), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VERSION = layout.offsetof(0); - ASCENDER = layout.offsetof(1); - DESCENDER = layout.offsetof(2); - LINE_GAP = layout.offsetof(3); - ADVANCE_WIDTH_MAX = layout.offsetof(4); - MIN_LEFT_SIDE_BEARING = layout.offsetof(5); - MIN_RIGHT_SIDE_BEARING = layout.offsetof(6); - XMAX_EXTENT = layout.offsetof(7); - CARET_SLOPE_RISE = layout.offsetof(8); - CARET_SLOPE_RUN = layout.offsetof(9); - CARET_OFFSET = layout.offsetof(10); - RESERVED = layout.offsetof(11); - METRIC_DATA_FORMAT = layout.offsetof(12); - NUMBER_OF_HMETRICS = layout.offsetof(13); - LONG_METRICS = layout.offsetof(14); - SHORT_METRICS = layout.offsetof(15); - } - - protected TT_HoriHeader(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TT_HoriHeader create(long address, @Nullable ByteBuffer container) { - return new TT_HoriHeader(address, container); - } - - /** - * Creates a {@code TT_HoriHeader} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TT_HoriHeader(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code Version} field. */ - @NativeType("FT_Fixed") - public long Version() { return nVersion(address()); } - /** @return the value of the {@code Ascender} field. */ - @NativeType("FT_Short") - public short Ascender() { return nAscender(address()); } - /** @return the value of the {@code Descender} field. */ - @NativeType("FT_Short") - public short Descender() { return nDescender(address()); } - /** @return the value of the {@code Line_Gap} field. */ - @NativeType("FT_Short") - public short Line_Gap() { return nLine_Gap(address()); } - /** advance width maximum */ - @NativeType("FT_UShort") - public short advance_Width_Max() { return nadvance_Width_Max(address()); } - /** minimum left-sb */ - @NativeType("FT_Short") - public short min_Left_Side_Bearing() { return nmin_Left_Side_Bearing(address()); } - /** minimum right-sb */ - @NativeType("FT_Short") - public short min_Right_Side_Bearing() { return nmin_Right_Side_Bearing(address()); } - /** xmax extents */ - @NativeType("FT_Short") - public short xMax_Extent() { return nxMax_Extent(address()); } - /** @return the value of the {@code caret_Slope_Rise} field. */ - @NativeType("FT_Short") - public short caret_Slope_Rise() { return ncaret_Slope_Rise(address()); } - /** @return the value of the {@code caret_Slope_Run} field. */ - @NativeType("FT_Short") - public short caret_Slope_Run() { return ncaret_Slope_Run(address()); } - /** @return the value of the {@code caret_Offset} field. */ - @NativeType("FT_Short") - public short caret_Offset() { return ncaret_Offset(address()); } - /** @return a {@link ShortBuffer} view of the {@code Reserved} field. */ - @NativeType("FT_Short[4]") - public ShortBuffer Reserved() { return nReserved(address()); } - /** @return the value at the specified index of the {@code Reserved} field. */ - @NativeType("FT_Short") - public short Reserved(int index) { return nReserved(address(), index); } - /** @return the value of the {@code metric_Data_Format} field. */ - @NativeType("FT_Short") - public short metric_Data_Format() { return nmetric_Data_Format(address()); } - /** @return the value of the {@code number_Of_HMetrics} field. */ - @NativeType("FT_UShort") - public short number_Of_HMetrics() { return nnumber_Of_HMetrics(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code long_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer long_metrics(int capacity) { return nlong_metrics(address(), capacity); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code short_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer short_metrics(int capacity) { return nshort_metrics(address(), capacity); } - - // ----------------------------------- - - /** Returns a new {@code TT_HoriHeader} instance for the specified memory address. */ - public static TT_HoriHeader create(long address) { - return new TT_HoriHeader(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TT_HoriHeader createSafe(long address) { - return address == NULL ? null : new TT_HoriHeader(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #Version}. */ - public static long nVersion(long struct) { return memGetCLong(struct + TT_HoriHeader.VERSION); } - /** Unsafe version of {@link #Ascender}. */ - public static short nAscender(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.ASCENDER); } - /** Unsafe version of {@link #Descender}. */ - public static short nDescender(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.DESCENDER); } - /** Unsafe version of {@link #Line_Gap}. */ - public static short nLine_Gap(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.LINE_GAP); } - /** Unsafe version of {@link #advance_Width_Max}. */ - public static short nadvance_Width_Max(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.ADVANCE_WIDTH_MAX); } - /** Unsafe version of {@link #min_Left_Side_Bearing}. */ - public static short nmin_Left_Side_Bearing(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.MIN_LEFT_SIDE_BEARING); } - /** Unsafe version of {@link #min_Right_Side_Bearing}. */ - public static short nmin_Right_Side_Bearing(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.MIN_RIGHT_SIDE_BEARING); } - /** Unsafe version of {@link #xMax_Extent}. */ - public static short nxMax_Extent(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.XMAX_EXTENT); } - /** Unsafe version of {@link #caret_Slope_Rise}. */ - public static short ncaret_Slope_Rise(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.CARET_SLOPE_RISE); } - /** Unsafe version of {@link #caret_Slope_Run}. */ - public static short ncaret_Slope_Run(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.CARET_SLOPE_RUN); } - /** Unsafe version of {@link #caret_Offset}. */ - public static short ncaret_Offset(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.CARET_OFFSET); } - /** Unsafe version of {@link #Reserved}. */ - public static ShortBuffer nReserved(long struct) { return memShortBuffer(struct + TT_HoriHeader.RESERVED, 4); } - /** Unsafe version of {@link #Reserved(int) Reserved}. */ - public static short nReserved(long struct, int index) { - return UNSAFE.getShort(null, struct + TT_HoriHeader.RESERVED + check(index, 4) * 2); - } - /** Unsafe version of {@link #metric_Data_Format}. */ - public static short nmetric_Data_Format(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.METRIC_DATA_FORMAT); } - /** Unsafe version of {@link #number_Of_HMetrics}. */ - public static short nnumber_Of_HMetrics(long struct) { return UNSAFE.getShort(null, struct + TT_HoriHeader.NUMBER_OF_HMETRICS); } - /** Unsafe version of {@link #long_metrics(int) long_metrics}. */ - @Nullable public static ByteBuffer nlong_metrics(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + TT_HoriHeader.LONG_METRICS), capacity); } - /** Unsafe version of {@link #short_metrics(int) short_metrics}. */ - @Nullable public static ByteBuffer nshort_metrics(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + TT_HoriHeader.SHORT_METRICS), capacity); } - - // ----------------------------------- - - /** An array of {@link TT_HoriHeader} structs. */ - public static class Buffer extends StructBuffer { - - private static final TT_HoriHeader ELEMENT_FACTORY = TT_HoriHeader.create(-1L); - - /** - * Creates a new {@code TT_HoriHeader.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TT_HoriHeader#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TT_HoriHeader getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code Version} field. */ - @NativeType("FT_Fixed") - public long Version() { return TT_HoriHeader.nVersion(address()); } - /** @return the value of the {@code Ascender} field. */ - @NativeType("FT_Short") - public short Ascender() { return TT_HoriHeader.nAscender(address()); } - /** @return the value of the {@code Descender} field. */ - @NativeType("FT_Short") - public short Descender() { return TT_HoriHeader.nDescender(address()); } - /** @return the value of the {@code Line_Gap} field. */ - @NativeType("FT_Short") - public short Line_Gap() { return TT_HoriHeader.nLine_Gap(address()); } - /** @return the value of the {@link TT_HoriHeader#advance_Width_Max} field. */ - @NativeType("FT_UShort") - public short advance_Width_Max() { return TT_HoriHeader.nadvance_Width_Max(address()); } - /** @return the value of the {@link TT_HoriHeader#min_Left_Side_Bearing} field. */ - @NativeType("FT_Short") - public short min_Left_Side_Bearing() { return TT_HoriHeader.nmin_Left_Side_Bearing(address()); } - /** @return the value of the {@link TT_HoriHeader#min_Right_Side_Bearing} field. */ - @NativeType("FT_Short") - public short min_Right_Side_Bearing() { return TT_HoriHeader.nmin_Right_Side_Bearing(address()); } - /** @return the value of the {@link TT_HoriHeader#xMax_Extent} field. */ - @NativeType("FT_Short") - public short xMax_Extent() { return TT_HoriHeader.nxMax_Extent(address()); } - /** @return the value of the {@code caret_Slope_Rise} field. */ - @NativeType("FT_Short") - public short caret_Slope_Rise() { return TT_HoriHeader.ncaret_Slope_Rise(address()); } - /** @return the value of the {@code caret_Slope_Run} field. */ - @NativeType("FT_Short") - public short caret_Slope_Run() { return TT_HoriHeader.ncaret_Slope_Run(address()); } - /** @return the value of the {@code caret_Offset} field. */ - @NativeType("FT_Short") - public short caret_Offset() { return TT_HoriHeader.ncaret_Offset(address()); } - /** @return a {@link ShortBuffer} view of the {@code Reserved} field. */ - @NativeType("FT_Short[4]") - public ShortBuffer Reserved() { return TT_HoriHeader.nReserved(address()); } - /** @return the value at the specified index of the {@code Reserved} field. */ - @NativeType("FT_Short") - public short Reserved(int index) { return TT_HoriHeader.nReserved(address(), index); } - /** @return the value of the {@code metric_Data_Format} field. */ - @NativeType("FT_Short") - public short metric_Data_Format() { return TT_HoriHeader.nmetric_Data_Format(address()); } - /** @return the value of the {@code number_Of_HMetrics} field. */ - @NativeType("FT_UShort") - public short number_Of_HMetrics() { return TT_HoriHeader.nnumber_Of_HMetrics(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code long_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer long_metrics(int capacity) { return TT_HoriHeader.nlong_metrics(address(), capacity); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code short_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer short_metrics(int capacity) { return TT_HoriHeader.nshort_metrics(address(), capacity); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_MaxProfile.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_MaxProfile.java deleted file mode 100644 index d91de98a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_MaxProfile.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * The maximum profile ({@code maxp}) table contains many max values, which can be used to pre-allocate arrays for speeding up glyph loading and hinting. - * - *

    Layout

    - * - *
    
    - * struct TT_MaxProfile {
    - *     FT_Fixed version;
    - *     FT_UShort numGlyphs;
    - *     FT_UShort maxPoints;
    - *     FT_UShort maxContours;
    - *     FT_UShort maxCompositePoints;
    - *     FT_UShort maxCompositeContours;
    - *     FT_UShort maxZones;
    - *     FT_UShort maxTwilightPoints;
    - *     FT_UShort maxStorage;
    - *     FT_UShort maxFunctionDefs;
    - *     FT_UShort maxInstructionDefs;
    - *     FT_UShort maxStackElements;
    - *     FT_UShort maxSizeOfInstructions;
    - *     FT_UShort maxComponentElements;
    - *     FT_UShort maxComponentDepth;
    - * }
    - */ -public class TT_MaxProfile extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VERSION, - NUMGLYPHS, - MAXPOINTS, - MAXCONTOURS, - MAXCOMPOSITEPOINTS, - MAXCOMPOSITECONTOURS, - MAXZONES, - MAXTWILIGHTPOINTS, - MAXSTORAGE, - MAXFUNCTIONDEFS, - MAXINSTRUCTIONDEFS, - MAXSTACKELEMENTS, - MAXSIZEOFINSTRUCTIONS, - MAXCOMPONENTELEMENTS, - MAXCOMPONENTDEPTH; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VERSION = layout.offsetof(0); - NUMGLYPHS = layout.offsetof(1); - MAXPOINTS = layout.offsetof(2); - MAXCONTOURS = layout.offsetof(3); - MAXCOMPOSITEPOINTS = layout.offsetof(4); - MAXCOMPOSITECONTOURS = layout.offsetof(5); - MAXZONES = layout.offsetof(6); - MAXTWILIGHTPOINTS = layout.offsetof(7); - MAXSTORAGE = layout.offsetof(8); - MAXFUNCTIONDEFS = layout.offsetof(9); - MAXINSTRUCTIONDEFS = layout.offsetof(10); - MAXSTACKELEMENTS = layout.offsetof(11); - MAXSIZEOFINSTRUCTIONS = layout.offsetof(12); - MAXCOMPONENTELEMENTS = layout.offsetof(13); - MAXCOMPONENTDEPTH = layout.offsetof(14); - } - - protected TT_MaxProfile(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TT_MaxProfile create(long address, @Nullable ByteBuffer container) { - return new TT_MaxProfile(address, container); - } - - /** - * Creates a {@code TT_MaxProfile} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TT_MaxProfile(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code version} field. */ - @NativeType("FT_Fixed") - public long version() { return nversion(address()); } - /** @return the value of the {@code numGlyphs} field. */ - @NativeType("FT_UShort") - public short numGlyphs() { return nnumGlyphs(address()); } - /** @return the value of the {@code maxPoints} field. */ - @NativeType("FT_UShort") - public short maxPoints() { return nmaxPoints(address()); } - /** @return the value of the {@code maxContours} field. */ - @NativeType("FT_UShort") - public short maxContours() { return nmaxContours(address()); } - /** @return the value of the {@code maxCompositePoints} field. */ - @NativeType("FT_UShort") - public short maxCompositePoints() { return nmaxCompositePoints(address()); } - /** @return the value of the {@code maxCompositeContours} field. */ - @NativeType("FT_UShort") - public short maxCompositeContours() { return nmaxCompositeContours(address()); } - /** @return the value of the {@code maxZones} field. */ - @NativeType("FT_UShort") - public short maxZones() { return nmaxZones(address()); } - /** @return the value of the {@code maxTwilightPoints} field. */ - @NativeType("FT_UShort") - public short maxTwilightPoints() { return nmaxTwilightPoints(address()); } - /** @return the value of the {@code maxStorage} field. */ - @NativeType("FT_UShort") - public short maxStorage() { return nmaxStorage(address()); } - /** @return the value of the {@code maxFunctionDefs} field. */ - @NativeType("FT_UShort") - public short maxFunctionDefs() { return nmaxFunctionDefs(address()); } - /** @return the value of the {@code maxInstructionDefs} field. */ - @NativeType("FT_UShort") - public short maxInstructionDefs() { return nmaxInstructionDefs(address()); } - /** @return the value of the {@code maxStackElements} field. */ - @NativeType("FT_UShort") - public short maxStackElements() { return nmaxStackElements(address()); } - /** @return the value of the {@code maxSizeOfInstructions} field. */ - @NativeType("FT_UShort") - public short maxSizeOfInstructions() { return nmaxSizeOfInstructions(address()); } - /** @return the value of the {@code maxComponentElements} field. */ - @NativeType("FT_UShort") - public short maxComponentElements() { return nmaxComponentElements(address()); } - /** @return the value of the {@code maxComponentDepth} field. */ - @NativeType("FT_UShort") - public short maxComponentDepth() { return nmaxComponentDepth(address()); } - - // ----------------------------------- - - /** Returns a new {@code TT_MaxProfile} instance for the specified memory address. */ - public static TT_MaxProfile create(long address) { - return new TT_MaxProfile(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TT_MaxProfile createSafe(long address) { - return address == NULL ? null : new TT_MaxProfile(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #version}. */ - public static long nversion(long struct) { return memGetCLong(struct + TT_MaxProfile.VERSION); } - /** Unsafe version of {@link #numGlyphs}. */ - public static short nnumGlyphs(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.NUMGLYPHS); } - /** Unsafe version of {@link #maxPoints}. */ - public static short nmaxPoints(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXPOINTS); } - /** Unsafe version of {@link #maxContours}. */ - public static short nmaxContours(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXCONTOURS); } - /** Unsafe version of {@link #maxCompositePoints}. */ - public static short nmaxCompositePoints(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXCOMPOSITEPOINTS); } - /** Unsafe version of {@link #maxCompositeContours}. */ - public static short nmaxCompositeContours(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXCOMPOSITECONTOURS); } - /** Unsafe version of {@link #maxZones}. */ - public static short nmaxZones(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXZONES); } - /** Unsafe version of {@link #maxTwilightPoints}. */ - public static short nmaxTwilightPoints(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXTWILIGHTPOINTS); } - /** Unsafe version of {@link #maxStorage}. */ - public static short nmaxStorage(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXSTORAGE); } - /** Unsafe version of {@link #maxFunctionDefs}. */ - public static short nmaxFunctionDefs(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXFUNCTIONDEFS); } - /** Unsafe version of {@link #maxInstructionDefs}. */ - public static short nmaxInstructionDefs(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXINSTRUCTIONDEFS); } - /** Unsafe version of {@link #maxStackElements}. */ - public static short nmaxStackElements(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXSTACKELEMENTS); } - /** Unsafe version of {@link #maxSizeOfInstructions}. */ - public static short nmaxSizeOfInstructions(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXSIZEOFINSTRUCTIONS); } - /** Unsafe version of {@link #maxComponentElements}. */ - public static short nmaxComponentElements(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXCOMPONENTELEMENTS); } - /** Unsafe version of {@link #maxComponentDepth}. */ - public static short nmaxComponentDepth(long struct) { return UNSAFE.getShort(null, struct + TT_MaxProfile.MAXCOMPONENTDEPTH); } - - // ----------------------------------- - - /** An array of {@link TT_MaxProfile} structs. */ - public static class Buffer extends StructBuffer { - - private static final TT_MaxProfile ELEMENT_FACTORY = TT_MaxProfile.create(-1L); - - /** - * Creates a new {@code TT_MaxProfile.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TT_MaxProfile#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TT_MaxProfile getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code version} field. */ - @NativeType("FT_Fixed") - public long version() { return TT_MaxProfile.nversion(address()); } - /** @return the value of the {@code numGlyphs} field. */ - @NativeType("FT_UShort") - public short numGlyphs() { return TT_MaxProfile.nnumGlyphs(address()); } - /** @return the value of the {@code maxPoints} field. */ - @NativeType("FT_UShort") - public short maxPoints() { return TT_MaxProfile.nmaxPoints(address()); } - /** @return the value of the {@code maxContours} field. */ - @NativeType("FT_UShort") - public short maxContours() { return TT_MaxProfile.nmaxContours(address()); } - /** @return the value of the {@code maxCompositePoints} field. */ - @NativeType("FT_UShort") - public short maxCompositePoints() { return TT_MaxProfile.nmaxCompositePoints(address()); } - /** @return the value of the {@code maxCompositeContours} field. */ - @NativeType("FT_UShort") - public short maxCompositeContours() { return TT_MaxProfile.nmaxCompositeContours(address()); } - /** @return the value of the {@code maxZones} field. */ - @NativeType("FT_UShort") - public short maxZones() { return TT_MaxProfile.nmaxZones(address()); } - /** @return the value of the {@code maxTwilightPoints} field. */ - @NativeType("FT_UShort") - public short maxTwilightPoints() { return TT_MaxProfile.nmaxTwilightPoints(address()); } - /** @return the value of the {@code maxStorage} field. */ - @NativeType("FT_UShort") - public short maxStorage() { return TT_MaxProfile.nmaxStorage(address()); } - /** @return the value of the {@code maxFunctionDefs} field. */ - @NativeType("FT_UShort") - public short maxFunctionDefs() { return TT_MaxProfile.nmaxFunctionDefs(address()); } - /** @return the value of the {@code maxInstructionDefs} field. */ - @NativeType("FT_UShort") - public short maxInstructionDefs() { return TT_MaxProfile.nmaxInstructionDefs(address()); } - /** @return the value of the {@code maxStackElements} field. */ - @NativeType("FT_UShort") - public short maxStackElements() { return TT_MaxProfile.nmaxStackElements(address()); } - /** @return the value of the {@code maxSizeOfInstructions} field. */ - @NativeType("FT_UShort") - public short maxSizeOfInstructions() { return TT_MaxProfile.nmaxSizeOfInstructions(address()); } - /** @return the value of the {@code maxComponentElements} field. */ - @NativeType("FT_UShort") - public short maxComponentElements() { return TT_MaxProfile.nmaxComponentElements(address()); } - /** @return the value of the {@code maxComponentDepth} field. */ - @NativeType("FT_UShort") - public short maxComponentDepth() { return TT_MaxProfile.nmaxComponentDepth(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_OS2.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_OS2.java deleted file mode 100644 index 43de32e4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_OS2.java +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a TrueType {@code OS/2} table. - * - *

    Layout

    - * - *
    
    - * struct TT_OS2 {
    - *     FT_UShort version;
    - *     FT_Short xAvgCharWidth;
    - *     FT_UShort usWeightClass;
    - *     FT_UShort usWidthClass;
    - *     FT_UShort fsType;
    - *     FT_Short ySubscriptXSize;
    - *     FT_Short ySubscriptYSize;
    - *     FT_Short ySubscriptXOffset;
    - *     FT_Short ySubscriptYOffset;
    - *     FT_Short ySuperscriptXSize;
    - *     FT_Short ySuperscriptYSize;
    - *     FT_Short ySuperscriptXOffset;
    - *     FT_Short ySuperscriptYOffset;
    - *     FT_Short yStrikeoutSize;
    - *     FT_Short yStrikeoutPosition;
    - *     FT_Short sFamilyClass;
    - *     FT_Byte panose[10];
    - *     FT_ULong ulUnicodeRange1;
    - *     FT_ULong ulUnicodeRange2;
    - *     FT_ULong ulUnicodeRange3;
    - *     FT_ULong ulUnicodeRange4;
    - *     FT_Char achVendID[4];
    - *     FT_UShort fsSelection;
    - *     FT_UShort usFirstCharIndex;
    - *     FT_UShort usLastCharIndex;
    - *     FT_Short sTypoAscender;
    - *     FT_Short sTypoDescender;
    - *     FT_Short sTypoLineGap;
    - *     FT_UShort usWinAscent;
    - *     FT_UShort usWinDescent;
    - *     FT_ULong ulCodePageRange1;
    - *     FT_ULong ulCodePageRange2;
    - *     FT_Short sxHeight;
    - *     FT_Short sCapHeight;
    - *     FT_UShort usDefaultChar;
    - *     FT_UShort usBreakChar;
    - *     FT_UShort usMaxContext;
    - *     FT_UShort usLowerOpticalPointSize;
    - *     FT_UShort usUpperOpticalPointSize;
    - * }
    - */ -public class TT_OS2 extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VERSION, - XAVGCHARWIDTH, - USWEIGHTCLASS, - USWIDTHCLASS, - FSTYPE, - YSUBSCRIPTXSIZE, - YSUBSCRIPTYSIZE, - YSUBSCRIPTXOFFSET, - YSUBSCRIPTYOFFSET, - YSUPERSCRIPTXSIZE, - YSUPERSCRIPTYSIZE, - YSUPERSCRIPTXOFFSET, - YSUPERSCRIPTYOFFSET, - YSTRIKEOUTSIZE, - YSTRIKEOUTPOSITION, - SFAMILYCLASS, - PANOSE, - ULUNICODERANGE1, - ULUNICODERANGE2, - ULUNICODERANGE3, - ULUNICODERANGE4, - ACHVENDID, - FSSELECTION, - USFIRSTCHARINDEX, - USLASTCHARINDEX, - STYPOASCENDER, - STYPODESCENDER, - STYPOLINEGAP, - USWINASCENT, - USWINDESCENT, - ULCODEPAGERANGE1, - ULCODEPAGERANGE2, - SXHEIGHT, - SCAPHEIGHT, - USDEFAULTCHAR, - USBREAKCHAR, - USMAXCONTEXT, - USLOWEROPTICALPOINTSIZE, - USUPPEROPTICALPOINTSIZE; - - static { - Layout layout = __struct( - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __array(1, 10), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __array(1, 4), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VERSION = layout.offsetof(0); - XAVGCHARWIDTH = layout.offsetof(1); - USWEIGHTCLASS = layout.offsetof(2); - USWIDTHCLASS = layout.offsetof(3); - FSTYPE = layout.offsetof(4); - YSUBSCRIPTXSIZE = layout.offsetof(5); - YSUBSCRIPTYSIZE = layout.offsetof(6); - YSUBSCRIPTXOFFSET = layout.offsetof(7); - YSUBSCRIPTYOFFSET = layout.offsetof(8); - YSUPERSCRIPTXSIZE = layout.offsetof(9); - YSUPERSCRIPTYSIZE = layout.offsetof(10); - YSUPERSCRIPTXOFFSET = layout.offsetof(11); - YSUPERSCRIPTYOFFSET = layout.offsetof(12); - YSTRIKEOUTSIZE = layout.offsetof(13); - YSTRIKEOUTPOSITION = layout.offsetof(14); - SFAMILYCLASS = layout.offsetof(15); - PANOSE = layout.offsetof(16); - ULUNICODERANGE1 = layout.offsetof(17); - ULUNICODERANGE2 = layout.offsetof(18); - ULUNICODERANGE3 = layout.offsetof(19); - ULUNICODERANGE4 = layout.offsetof(20); - ACHVENDID = layout.offsetof(21); - FSSELECTION = layout.offsetof(22); - USFIRSTCHARINDEX = layout.offsetof(23); - USLASTCHARINDEX = layout.offsetof(24); - STYPOASCENDER = layout.offsetof(25); - STYPODESCENDER = layout.offsetof(26); - STYPOLINEGAP = layout.offsetof(27); - USWINASCENT = layout.offsetof(28); - USWINDESCENT = layout.offsetof(29); - ULCODEPAGERANGE1 = layout.offsetof(30); - ULCODEPAGERANGE2 = layout.offsetof(31); - SXHEIGHT = layout.offsetof(32); - SCAPHEIGHT = layout.offsetof(33); - USDEFAULTCHAR = layout.offsetof(34); - USBREAKCHAR = layout.offsetof(35); - USMAXCONTEXT = layout.offsetof(36); - USLOWEROPTICALPOINTSIZE = layout.offsetof(37); - USUPPEROPTICALPOINTSIZE = layout.offsetof(38); - } - - protected TT_OS2(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TT_OS2 create(long address, @Nullable ByteBuffer container) { - return new TT_OS2(address, container); - } - - /** - * Creates a {@code TT_OS2} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TT_OS2(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code version} field. */ - @NativeType("FT_UShort") - public short version() { return nversion(address()); } - /** @return the value of the {@code xAvgCharWidth} field. */ - @NativeType("FT_Short") - public short xAvgCharWidth() { return nxAvgCharWidth(address()); } - /** @return the value of the {@code usWeightClass} field. */ - @NativeType("FT_UShort") - public short usWeightClass() { return nusWeightClass(address()); } - /** @return the value of the {@code usWidthClass} field. */ - @NativeType("FT_UShort") - public short usWidthClass() { return nusWidthClass(address()); } - /** @return the value of the {@code fsType} field. */ - @NativeType("FT_UShort") - public short fsType() { return nfsType(address()); } - /** @return the value of the {@code ySubscriptXSize} field. */ - @NativeType("FT_Short") - public short ySubscriptXSize() { return nySubscriptXSize(address()); } - /** @return the value of the {@code ySubscriptYSize} field. */ - @NativeType("FT_Short") - public short ySubscriptYSize() { return nySubscriptYSize(address()); } - /** @return the value of the {@code ySubscriptXOffset} field. */ - @NativeType("FT_Short") - public short ySubscriptXOffset() { return nySubscriptXOffset(address()); } - /** @return the value of the {@code ySubscriptYOffset} field. */ - @NativeType("FT_Short") - public short ySubscriptYOffset() { return nySubscriptYOffset(address()); } - /** @return the value of the {@code ySuperscriptXSize} field. */ - @NativeType("FT_Short") - public short ySuperscriptXSize() { return nySuperscriptXSize(address()); } - /** @return the value of the {@code ySuperscriptYSize} field. */ - @NativeType("FT_Short") - public short ySuperscriptYSize() { return nySuperscriptYSize(address()); } - /** @return the value of the {@code ySuperscriptXOffset} field. */ - @NativeType("FT_Short") - public short ySuperscriptXOffset() { return nySuperscriptXOffset(address()); } - /** @return the value of the {@code ySuperscriptYOffset} field. */ - @NativeType("FT_Short") - public short ySuperscriptYOffset() { return nySuperscriptYOffset(address()); } - /** @return the value of the {@code yStrikeoutSize} field. */ - @NativeType("FT_Short") - public short yStrikeoutSize() { return nyStrikeoutSize(address()); } - /** @return the value of the {@code yStrikeoutPosition} field. */ - @NativeType("FT_Short") - public short yStrikeoutPosition() { return nyStrikeoutPosition(address()); } - /** @return the value of the {@code sFamilyClass} field. */ - @NativeType("FT_Short") - public short sFamilyClass() { return nsFamilyClass(address()); } - /** @return a {@link ByteBuffer} view of the {@code panose} field. */ - @NativeType("FT_Byte[10]") - public ByteBuffer panose() { return npanose(address()); } - /** @return the value at the specified index of the {@code panose} field. */ - @NativeType("FT_Byte") - public byte panose(int index) { return npanose(address(), index); } - /** @return the value of the {@code ulUnicodeRange1} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange1() { return nulUnicodeRange1(address()); } - /** @return the value of the {@code ulUnicodeRange2} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange2() { return nulUnicodeRange2(address()); } - /** @return the value of the {@code ulUnicodeRange3} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange3() { return nulUnicodeRange3(address()); } - /** @return the value of the {@code ulUnicodeRange4} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange4() { return nulUnicodeRange4(address()); } - /** @return a {@link ByteBuffer} view of the {@code achVendID} field. */ - @NativeType("FT_Char[4]") - public ByteBuffer achVendID() { return nachVendID(address()); } - /** @return the value at the specified index of the {@code achVendID} field. */ - @NativeType("FT_Char") - public byte achVendID(int index) { return nachVendID(address(), index); } - /** @return the value of the {@code fsSelection} field. */ - @NativeType("FT_UShort") - public short fsSelection() { return nfsSelection(address()); } - /** @return the value of the {@code usFirstCharIndex} field. */ - @NativeType("FT_UShort") - public short usFirstCharIndex() { return nusFirstCharIndex(address()); } - /** @return the value of the {@code usLastCharIndex} field. */ - @NativeType("FT_UShort") - public short usLastCharIndex() { return nusLastCharIndex(address()); } - /** @return the value of the {@code sTypoAscender} field. */ - @NativeType("FT_Short") - public short sTypoAscender() { return nsTypoAscender(address()); } - /** @return the value of the {@code sTypoDescender} field. */ - @NativeType("FT_Short") - public short sTypoDescender() { return nsTypoDescender(address()); } - /** @return the value of the {@code sTypoLineGap} field. */ - @NativeType("FT_Short") - public short sTypoLineGap() { return nsTypoLineGap(address()); } - /** @return the value of the {@code usWinAscent} field. */ - @NativeType("FT_UShort") - public short usWinAscent() { return nusWinAscent(address()); } - /** @return the value of the {@code usWinDescent} field. */ - @NativeType("FT_UShort") - public short usWinDescent() { return nusWinDescent(address()); } - /** @return the value of the {@code ulCodePageRange1} field. */ - @NativeType("FT_ULong") - public long ulCodePageRange1() { return nulCodePageRange1(address()); } - /** @return the value of the {@code ulCodePageRange2} field. */ - @NativeType("FT_ULong") - public long ulCodePageRange2() { return nulCodePageRange2(address()); } - /** @return the value of the {@code sxHeight} field. */ - @NativeType("FT_Short") - public short sxHeight() { return nsxHeight(address()); } - /** @return the value of the {@code sCapHeight} field. */ - @NativeType("FT_Short") - public short sCapHeight() { return nsCapHeight(address()); } - /** @return the value of the {@code usDefaultChar} field. */ - @NativeType("FT_UShort") - public short usDefaultChar() { return nusDefaultChar(address()); } - /** @return the value of the {@code usBreakChar} field. */ - @NativeType("FT_UShort") - public short usBreakChar() { return nusBreakChar(address()); } - /** @return the value of the {@code usMaxContext} field. */ - @NativeType("FT_UShort") - public short usMaxContext() { return nusMaxContext(address()); } - /** @return the value of the {@code usLowerOpticalPointSize} field. */ - @NativeType("FT_UShort") - public short usLowerOpticalPointSize() { return nusLowerOpticalPointSize(address()); } - /** @return the value of the {@code usUpperOpticalPointSize} field. */ - @NativeType("FT_UShort") - public short usUpperOpticalPointSize() { return nusUpperOpticalPointSize(address()); } - - // ----------------------------------- - - /** Returns a new {@code TT_OS2} instance for the specified memory address. */ - public static TT_OS2 create(long address) { - return new TT_OS2(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TT_OS2 createSafe(long address) { - return address == NULL ? null : new TT_OS2(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #version}. */ - public static short nversion(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.VERSION); } - /** Unsafe version of {@link #xAvgCharWidth}. */ - public static short nxAvgCharWidth(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.XAVGCHARWIDTH); } - /** Unsafe version of {@link #usWeightClass}. */ - public static short nusWeightClass(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USWEIGHTCLASS); } - /** Unsafe version of {@link #usWidthClass}. */ - public static short nusWidthClass(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USWIDTHCLASS); } - /** Unsafe version of {@link #fsType}. */ - public static short nfsType(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.FSTYPE); } - /** Unsafe version of {@link #ySubscriptXSize}. */ - public static short nySubscriptXSize(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUBSCRIPTXSIZE); } - /** Unsafe version of {@link #ySubscriptYSize}. */ - public static short nySubscriptYSize(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUBSCRIPTYSIZE); } - /** Unsafe version of {@link #ySubscriptXOffset}. */ - public static short nySubscriptXOffset(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUBSCRIPTXOFFSET); } - /** Unsafe version of {@link #ySubscriptYOffset}. */ - public static short nySubscriptYOffset(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUBSCRIPTYOFFSET); } - /** Unsafe version of {@link #ySuperscriptXSize}. */ - public static short nySuperscriptXSize(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUPERSCRIPTXSIZE); } - /** Unsafe version of {@link #ySuperscriptYSize}. */ - public static short nySuperscriptYSize(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUPERSCRIPTYSIZE); } - /** Unsafe version of {@link #ySuperscriptXOffset}. */ - public static short nySuperscriptXOffset(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUPERSCRIPTXOFFSET); } - /** Unsafe version of {@link #ySuperscriptYOffset}. */ - public static short nySuperscriptYOffset(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSUPERSCRIPTYOFFSET); } - /** Unsafe version of {@link #yStrikeoutSize}. */ - public static short nyStrikeoutSize(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSTRIKEOUTSIZE); } - /** Unsafe version of {@link #yStrikeoutPosition}. */ - public static short nyStrikeoutPosition(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.YSTRIKEOUTPOSITION); } - /** Unsafe version of {@link #sFamilyClass}. */ - public static short nsFamilyClass(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.SFAMILYCLASS); } - /** Unsafe version of {@link #panose}. */ - public static ByteBuffer npanose(long struct) { return memByteBuffer(struct + TT_OS2.PANOSE, 10); } - /** Unsafe version of {@link #panose(int) panose}. */ - public static byte npanose(long struct, int index) { - return UNSAFE.getByte(null, struct + TT_OS2.PANOSE + check(index, 10) * 1); - } - /** Unsafe version of {@link #ulUnicodeRange1}. */ - public static long nulUnicodeRange1(long struct) { return memGetCLong(struct + TT_OS2.ULUNICODERANGE1); } - /** Unsafe version of {@link #ulUnicodeRange2}. */ - public static long nulUnicodeRange2(long struct) { return memGetCLong(struct + TT_OS2.ULUNICODERANGE2); } - /** Unsafe version of {@link #ulUnicodeRange3}. */ - public static long nulUnicodeRange3(long struct) { return memGetCLong(struct + TT_OS2.ULUNICODERANGE3); } - /** Unsafe version of {@link #ulUnicodeRange4}. */ - public static long nulUnicodeRange4(long struct) { return memGetCLong(struct + TT_OS2.ULUNICODERANGE4); } - /** Unsafe version of {@link #achVendID}. */ - public static ByteBuffer nachVendID(long struct) { return memByteBuffer(struct + TT_OS2.ACHVENDID, 4); } - /** Unsafe version of {@link #achVendID(int) achVendID}. */ - public static byte nachVendID(long struct, int index) { - return UNSAFE.getByte(null, struct + TT_OS2.ACHVENDID + check(index, 4) * 1); - } - /** Unsafe version of {@link #fsSelection}. */ - public static short nfsSelection(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.FSSELECTION); } - /** Unsafe version of {@link #usFirstCharIndex}. */ - public static short nusFirstCharIndex(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USFIRSTCHARINDEX); } - /** Unsafe version of {@link #usLastCharIndex}. */ - public static short nusLastCharIndex(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USLASTCHARINDEX); } - /** Unsafe version of {@link #sTypoAscender}. */ - public static short nsTypoAscender(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.STYPOASCENDER); } - /** Unsafe version of {@link #sTypoDescender}. */ - public static short nsTypoDescender(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.STYPODESCENDER); } - /** Unsafe version of {@link #sTypoLineGap}. */ - public static short nsTypoLineGap(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.STYPOLINEGAP); } - /** Unsafe version of {@link #usWinAscent}. */ - public static short nusWinAscent(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USWINASCENT); } - /** Unsafe version of {@link #usWinDescent}. */ - public static short nusWinDescent(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USWINDESCENT); } - /** Unsafe version of {@link #ulCodePageRange1}. */ - public static long nulCodePageRange1(long struct) { return memGetCLong(struct + TT_OS2.ULCODEPAGERANGE1); } - /** Unsafe version of {@link #ulCodePageRange2}. */ - public static long nulCodePageRange2(long struct) { return memGetCLong(struct + TT_OS2.ULCODEPAGERANGE2); } - /** Unsafe version of {@link #sxHeight}. */ - public static short nsxHeight(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.SXHEIGHT); } - /** Unsafe version of {@link #sCapHeight}. */ - public static short nsCapHeight(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.SCAPHEIGHT); } - /** Unsafe version of {@link #usDefaultChar}. */ - public static short nusDefaultChar(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USDEFAULTCHAR); } - /** Unsafe version of {@link #usBreakChar}. */ - public static short nusBreakChar(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USBREAKCHAR); } - /** Unsafe version of {@link #usMaxContext}. */ - public static short nusMaxContext(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USMAXCONTEXT); } - /** Unsafe version of {@link #usLowerOpticalPointSize}. */ - public static short nusLowerOpticalPointSize(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USLOWEROPTICALPOINTSIZE); } - /** Unsafe version of {@link #usUpperOpticalPointSize}. */ - public static short nusUpperOpticalPointSize(long struct) { return UNSAFE.getShort(null, struct + TT_OS2.USUPPEROPTICALPOINTSIZE); } - - // ----------------------------------- - - /** An array of {@link TT_OS2} structs. */ - public static class Buffer extends StructBuffer { - - private static final TT_OS2 ELEMENT_FACTORY = TT_OS2.create(-1L); - - /** - * Creates a new {@code TT_OS2.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TT_OS2#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TT_OS2 getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code version} field. */ - @NativeType("FT_UShort") - public short version() { return TT_OS2.nversion(address()); } - /** @return the value of the {@code xAvgCharWidth} field. */ - @NativeType("FT_Short") - public short xAvgCharWidth() { return TT_OS2.nxAvgCharWidth(address()); } - /** @return the value of the {@code usWeightClass} field. */ - @NativeType("FT_UShort") - public short usWeightClass() { return TT_OS2.nusWeightClass(address()); } - /** @return the value of the {@code usWidthClass} field. */ - @NativeType("FT_UShort") - public short usWidthClass() { return TT_OS2.nusWidthClass(address()); } - /** @return the value of the {@code fsType} field. */ - @NativeType("FT_UShort") - public short fsType() { return TT_OS2.nfsType(address()); } - /** @return the value of the {@code ySubscriptXSize} field. */ - @NativeType("FT_Short") - public short ySubscriptXSize() { return TT_OS2.nySubscriptXSize(address()); } - /** @return the value of the {@code ySubscriptYSize} field. */ - @NativeType("FT_Short") - public short ySubscriptYSize() { return TT_OS2.nySubscriptYSize(address()); } - /** @return the value of the {@code ySubscriptXOffset} field. */ - @NativeType("FT_Short") - public short ySubscriptXOffset() { return TT_OS2.nySubscriptXOffset(address()); } - /** @return the value of the {@code ySubscriptYOffset} field. */ - @NativeType("FT_Short") - public short ySubscriptYOffset() { return TT_OS2.nySubscriptYOffset(address()); } - /** @return the value of the {@code ySuperscriptXSize} field. */ - @NativeType("FT_Short") - public short ySuperscriptXSize() { return TT_OS2.nySuperscriptXSize(address()); } - /** @return the value of the {@code ySuperscriptYSize} field. */ - @NativeType("FT_Short") - public short ySuperscriptYSize() { return TT_OS2.nySuperscriptYSize(address()); } - /** @return the value of the {@code ySuperscriptXOffset} field. */ - @NativeType("FT_Short") - public short ySuperscriptXOffset() { return TT_OS2.nySuperscriptXOffset(address()); } - /** @return the value of the {@code ySuperscriptYOffset} field. */ - @NativeType("FT_Short") - public short ySuperscriptYOffset() { return TT_OS2.nySuperscriptYOffset(address()); } - /** @return the value of the {@code yStrikeoutSize} field. */ - @NativeType("FT_Short") - public short yStrikeoutSize() { return TT_OS2.nyStrikeoutSize(address()); } - /** @return the value of the {@code yStrikeoutPosition} field. */ - @NativeType("FT_Short") - public short yStrikeoutPosition() { return TT_OS2.nyStrikeoutPosition(address()); } - /** @return the value of the {@code sFamilyClass} field. */ - @NativeType("FT_Short") - public short sFamilyClass() { return TT_OS2.nsFamilyClass(address()); } - /** @return a {@link ByteBuffer} view of the {@code panose} field. */ - @NativeType("FT_Byte[10]") - public ByteBuffer panose() { return TT_OS2.npanose(address()); } - /** @return the value at the specified index of the {@code panose} field. */ - @NativeType("FT_Byte") - public byte panose(int index) { return TT_OS2.npanose(address(), index); } - /** @return the value of the {@code ulUnicodeRange1} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange1() { return TT_OS2.nulUnicodeRange1(address()); } - /** @return the value of the {@code ulUnicodeRange2} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange2() { return TT_OS2.nulUnicodeRange2(address()); } - /** @return the value of the {@code ulUnicodeRange3} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange3() { return TT_OS2.nulUnicodeRange3(address()); } - /** @return the value of the {@code ulUnicodeRange4} field. */ - @NativeType("FT_ULong") - public long ulUnicodeRange4() { return TT_OS2.nulUnicodeRange4(address()); } - /** @return a {@link ByteBuffer} view of the {@code achVendID} field. */ - @NativeType("FT_Char[4]") - public ByteBuffer achVendID() { return TT_OS2.nachVendID(address()); } - /** @return the value at the specified index of the {@code achVendID} field. */ - @NativeType("FT_Char") - public byte achVendID(int index) { return TT_OS2.nachVendID(address(), index); } - /** @return the value of the {@code fsSelection} field. */ - @NativeType("FT_UShort") - public short fsSelection() { return TT_OS2.nfsSelection(address()); } - /** @return the value of the {@code usFirstCharIndex} field. */ - @NativeType("FT_UShort") - public short usFirstCharIndex() { return TT_OS2.nusFirstCharIndex(address()); } - /** @return the value of the {@code usLastCharIndex} field. */ - @NativeType("FT_UShort") - public short usLastCharIndex() { return TT_OS2.nusLastCharIndex(address()); } - /** @return the value of the {@code sTypoAscender} field. */ - @NativeType("FT_Short") - public short sTypoAscender() { return TT_OS2.nsTypoAscender(address()); } - /** @return the value of the {@code sTypoDescender} field. */ - @NativeType("FT_Short") - public short sTypoDescender() { return TT_OS2.nsTypoDescender(address()); } - /** @return the value of the {@code sTypoLineGap} field. */ - @NativeType("FT_Short") - public short sTypoLineGap() { return TT_OS2.nsTypoLineGap(address()); } - /** @return the value of the {@code usWinAscent} field. */ - @NativeType("FT_UShort") - public short usWinAscent() { return TT_OS2.nusWinAscent(address()); } - /** @return the value of the {@code usWinDescent} field. */ - @NativeType("FT_UShort") - public short usWinDescent() { return TT_OS2.nusWinDescent(address()); } - /** @return the value of the {@code ulCodePageRange1} field. */ - @NativeType("FT_ULong") - public long ulCodePageRange1() { return TT_OS2.nulCodePageRange1(address()); } - /** @return the value of the {@code ulCodePageRange2} field. */ - @NativeType("FT_ULong") - public long ulCodePageRange2() { return TT_OS2.nulCodePageRange2(address()); } - /** @return the value of the {@code sxHeight} field. */ - @NativeType("FT_Short") - public short sxHeight() { return TT_OS2.nsxHeight(address()); } - /** @return the value of the {@code sCapHeight} field. */ - @NativeType("FT_Short") - public short sCapHeight() { return TT_OS2.nsCapHeight(address()); } - /** @return the value of the {@code usDefaultChar} field. */ - @NativeType("FT_UShort") - public short usDefaultChar() { return TT_OS2.nusDefaultChar(address()); } - /** @return the value of the {@code usBreakChar} field. */ - @NativeType("FT_UShort") - public short usBreakChar() { return TT_OS2.nusBreakChar(address()); } - /** @return the value of the {@code usMaxContext} field. */ - @NativeType("FT_UShort") - public short usMaxContext() { return TT_OS2.nusMaxContext(address()); } - /** @return the value of the {@code usLowerOpticalPointSize} field. */ - @NativeType("FT_UShort") - public short usLowerOpticalPointSize() { return TT_OS2.nusLowerOpticalPointSize(address()); } - /** @return the value of the {@code usUpperOpticalPointSize} field. */ - @NativeType("FT_UShort") - public short usUpperOpticalPointSize() { return TT_OS2.nusUpperOpticalPointSize(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_PCLT.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_PCLT.java deleted file mode 100644 index e4534abc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_PCLT.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a TrueType {@code PCLT} table. - * - *

    Layout

    - * - *
    
    - * struct TT_PCLT {
    - *     FT_Fixed Version;
    - *     FT_ULong FontNumber;
    - *     FT_UShort Pitch;
    - *     FT_UShort xHeight;
    - *     FT_UShort Style;
    - *     FT_UShort TypeFamily;
    - *     FT_UShort CapHeight;
    - *     FT_UShort SymbolSet;
    - *     FT_Char TypeFace[16];
    - *     FT_Char CharacterComplement[8];
    - *     FT_Char FileName[6];
    - *     FT_Char StrokeWeight;
    - *     FT_Char WidthType;
    - *     FT_Byte SerifStyle;
    - *     FT_Byte Reserved;
    - * }
    - */ -public class TT_PCLT extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VERSION, - FONTNUMBER, - PITCH, - XHEIGHT, - STYLE, - TYPEFAMILY, - CAPHEIGHT, - SYMBOLSET, - TYPEFACE, - CHARACTERCOMPLEMENT, - FILENAME, - STROKEWEIGHT, - WIDTHTYPE, - SERIFSTYLE, - RESERVED; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __array(1, 16), - __array(1, 8), - __array(1, 6), - __member(1), - __member(1), - __member(1), - __member(1) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VERSION = layout.offsetof(0); - FONTNUMBER = layout.offsetof(1); - PITCH = layout.offsetof(2); - XHEIGHT = layout.offsetof(3); - STYLE = layout.offsetof(4); - TYPEFAMILY = layout.offsetof(5); - CAPHEIGHT = layout.offsetof(6); - SYMBOLSET = layout.offsetof(7); - TYPEFACE = layout.offsetof(8); - CHARACTERCOMPLEMENT = layout.offsetof(9); - FILENAME = layout.offsetof(10); - STROKEWEIGHT = layout.offsetof(11); - WIDTHTYPE = layout.offsetof(12); - SERIFSTYLE = layout.offsetof(13); - RESERVED = layout.offsetof(14); - } - - protected TT_PCLT(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TT_PCLT create(long address, @Nullable ByteBuffer container) { - return new TT_PCLT(address, container); - } - - /** - * Creates a {@code TT_PCLT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TT_PCLT(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code Version} field. */ - @NativeType("FT_Fixed") - public long Version() { return nVersion(address()); } - /** @return the value of the {@code FontNumber} field. */ - @NativeType("FT_ULong") - public long FontNumber() { return nFontNumber(address()); } - /** @return the value of the {@code Pitch} field. */ - @NativeType("FT_UShort") - public short Pitch() { return nPitch(address()); } - /** @return the value of the {@code xHeight} field. */ - @NativeType("FT_UShort") - public short xHeight() { return nxHeight(address()); } - /** @return the value of the {@code Style} field. */ - @NativeType("FT_UShort") - public short Style() { return nStyle(address()); } - /** @return the value of the {@code TypeFamily} field. */ - @NativeType("FT_UShort") - public short TypeFamily() { return nTypeFamily(address()); } - /** @return the value of the {@code CapHeight} field. */ - @NativeType("FT_UShort") - public short CapHeight() { return nCapHeight(address()); } - /** @return the value of the {@code SymbolSet} field. */ - @NativeType("FT_UShort") - public short SymbolSet() { return nSymbolSet(address()); } - /** @return a {@link ByteBuffer} view of the {@code TypeFace} field. */ - @NativeType("FT_Char[16]") - public ByteBuffer TypeFace() { return nTypeFace(address()); } - /** @return the value at the specified index of the {@code TypeFace} field. */ - @NativeType("FT_Char") - public byte TypeFace(int index) { return nTypeFace(address(), index); } - /** @return a {@link ByteBuffer} view of the {@code CharacterComplement} field. */ - @NativeType("FT_Char[8]") - public ByteBuffer CharacterComplement() { return nCharacterComplement(address()); } - /** @return the value at the specified index of the {@code CharacterComplement} field. */ - @NativeType("FT_Char") - public byte CharacterComplement(int index) { return nCharacterComplement(address(), index); } - /** @return a {@link ByteBuffer} view of the {@code FileName} field. */ - @NativeType("FT_Char[6]") - public ByteBuffer FileName() { return nFileName(address()); } - /** @return the value at the specified index of the {@code FileName} field. */ - @NativeType("FT_Char") - public byte FileName(int index) { return nFileName(address(), index); } - /** @return the value of the {@code StrokeWeight} field. */ - @NativeType("FT_Char") - public byte StrokeWeight() { return nStrokeWeight(address()); } - /** @return the value of the {@code WidthType} field. */ - @NativeType("FT_Char") - public byte WidthType() { return nWidthType(address()); } - /** @return the value of the {@code SerifStyle} field. */ - @NativeType("FT_Byte") - public byte SerifStyle() { return nSerifStyle(address()); } - /** @return the value of the {@code Reserved} field. */ - @NativeType("FT_Byte") - public byte Reserved() { return nReserved(address()); } - - // ----------------------------------- - - /** Returns a new {@code TT_PCLT} instance for the specified memory address. */ - public static TT_PCLT create(long address) { - return new TT_PCLT(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TT_PCLT createSafe(long address) { - return address == NULL ? null : new TT_PCLT(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #Version}. */ - public static long nVersion(long struct) { return memGetCLong(struct + TT_PCLT.VERSION); } - /** Unsafe version of {@link #FontNumber}. */ - public static long nFontNumber(long struct) { return memGetCLong(struct + TT_PCLT.FONTNUMBER); } - /** Unsafe version of {@link #Pitch}. */ - public static short nPitch(long struct) { return UNSAFE.getShort(null, struct + TT_PCLT.PITCH); } - /** Unsafe version of {@link #xHeight}. */ - public static short nxHeight(long struct) { return UNSAFE.getShort(null, struct + TT_PCLT.XHEIGHT); } - /** Unsafe version of {@link #Style}. */ - public static short nStyle(long struct) { return UNSAFE.getShort(null, struct + TT_PCLT.STYLE); } - /** Unsafe version of {@link #TypeFamily}. */ - public static short nTypeFamily(long struct) { return UNSAFE.getShort(null, struct + TT_PCLT.TYPEFAMILY); } - /** Unsafe version of {@link #CapHeight}. */ - public static short nCapHeight(long struct) { return UNSAFE.getShort(null, struct + TT_PCLT.CAPHEIGHT); } - /** Unsafe version of {@link #SymbolSet}. */ - public static short nSymbolSet(long struct) { return UNSAFE.getShort(null, struct + TT_PCLT.SYMBOLSET); } - /** Unsafe version of {@link #TypeFace}. */ - public static ByteBuffer nTypeFace(long struct) { return memByteBuffer(struct + TT_PCLT.TYPEFACE, 16); } - /** Unsafe version of {@link #TypeFace(int) TypeFace}. */ - public static byte nTypeFace(long struct, int index) { - return UNSAFE.getByte(null, struct + TT_PCLT.TYPEFACE + check(index, 16) * 1); - } - /** Unsafe version of {@link #CharacterComplement}. */ - public static ByteBuffer nCharacterComplement(long struct) { return memByteBuffer(struct + TT_PCLT.CHARACTERCOMPLEMENT, 8); } - /** Unsafe version of {@link #CharacterComplement(int) CharacterComplement}. */ - public static byte nCharacterComplement(long struct, int index) { - return UNSAFE.getByte(null, struct + TT_PCLT.CHARACTERCOMPLEMENT + check(index, 8) * 1); - } - /** Unsafe version of {@link #FileName}. */ - public static ByteBuffer nFileName(long struct) { return memByteBuffer(struct + TT_PCLT.FILENAME, 6); } - /** Unsafe version of {@link #FileName(int) FileName}. */ - public static byte nFileName(long struct, int index) { - return UNSAFE.getByte(null, struct + TT_PCLT.FILENAME + check(index, 6) * 1); - } - /** Unsafe version of {@link #StrokeWeight}. */ - public static byte nStrokeWeight(long struct) { return UNSAFE.getByte(null, struct + TT_PCLT.STROKEWEIGHT); } - /** Unsafe version of {@link #WidthType}. */ - public static byte nWidthType(long struct) { return UNSAFE.getByte(null, struct + TT_PCLT.WIDTHTYPE); } - /** Unsafe version of {@link #SerifStyle}. */ - public static byte nSerifStyle(long struct) { return UNSAFE.getByte(null, struct + TT_PCLT.SERIFSTYLE); } - /** Unsafe version of {@link #Reserved}. */ - public static byte nReserved(long struct) { return UNSAFE.getByte(null, struct + TT_PCLT.RESERVED); } - - // ----------------------------------- - - /** An array of {@link TT_PCLT} structs. */ - public static class Buffer extends StructBuffer { - - private static final TT_PCLT ELEMENT_FACTORY = TT_PCLT.create(-1L); - - /** - * Creates a new {@code TT_PCLT.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TT_PCLT#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TT_PCLT getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code Version} field. */ - @NativeType("FT_Fixed") - public long Version() { return TT_PCLT.nVersion(address()); } - /** @return the value of the {@code FontNumber} field. */ - @NativeType("FT_ULong") - public long FontNumber() { return TT_PCLT.nFontNumber(address()); } - /** @return the value of the {@code Pitch} field. */ - @NativeType("FT_UShort") - public short Pitch() { return TT_PCLT.nPitch(address()); } - /** @return the value of the {@code xHeight} field. */ - @NativeType("FT_UShort") - public short xHeight() { return TT_PCLT.nxHeight(address()); } - /** @return the value of the {@code Style} field. */ - @NativeType("FT_UShort") - public short Style() { return TT_PCLT.nStyle(address()); } - /** @return the value of the {@code TypeFamily} field. */ - @NativeType("FT_UShort") - public short TypeFamily() { return TT_PCLT.nTypeFamily(address()); } - /** @return the value of the {@code CapHeight} field. */ - @NativeType("FT_UShort") - public short CapHeight() { return TT_PCLT.nCapHeight(address()); } - /** @return the value of the {@code SymbolSet} field. */ - @NativeType("FT_UShort") - public short SymbolSet() { return TT_PCLT.nSymbolSet(address()); } - /** @return a {@link ByteBuffer} view of the {@code TypeFace} field. */ - @NativeType("FT_Char[16]") - public ByteBuffer TypeFace() { return TT_PCLT.nTypeFace(address()); } - /** @return the value at the specified index of the {@code TypeFace} field. */ - @NativeType("FT_Char") - public byte TypeFace(int index) { return TT_PCLT.nTypeFace(address(), index); } - /** @return a {@link ByteBuffer} view of the {@code CharacterComplement} field. */ - @NativeType("FT_Char[8]") - public ByteBuffer CharacterComplement() { return TT_PCLT.nCharacterComplement(address()); } - /** @return the value at the specified index of the {@code CharacterComplement} field. */ - @NativeType("FT_Char") - public byte CharacterComplement(int index) { return TT_PCLT.nCharacterComplement(address(), index); } - /** @return a {@link ByteBuffer} view of the {@code FileName} field. */ - @NativeType("FT_Char[6]") - public ByteBuffer FileName() { return TT_PCLT.nFileName(address()); } - /** @return the value at the specified index of the {@code FileName} field. */ - @NativeType("FT_Char") - public byte FileName(int index) { return TT_PCLT.nFileName(address(), index); } - /** @return the value of the {@code StrokeWeight} field. */ - @NativeType("FT_Char") - public byte StrokeWeight() { return TT_PCLT.nStrokeWeight(address()); } - /** @return the value of the {@code WidthType} field. */ - @NativeType("FT_Char") - public byte WidthType() { return TT_PCLT.nWidthType(address()); } - /** @return the value of the {@code SerifStyle} field. */ - @NativeType("FT_Byte") - public byte SerifStyle() { return TT_PCLT.nSerifStyle(address()); } - /** @return the value of the {@code Reserved} field. */ - @NativeType("FT_Byte") - public byte Reserved() { return TT_PCLT.nReserved(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_Postscript.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_Postscript.java deleted file mode 100644 index 0268220a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_Postscript.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure to model a TrueType 'post' table. - * - *

    Layout

    - * - *
    
    - * struct TT_Postscript {
    - *     FT_Fixed FormatType;
    - *     FT_Fixed italicAngle;
    - *     FT_Short underlinePosition;
    - *     FT_Short underlineThickness;
    - *     FT_ULong isFixedPitch;
    - *     FT_ULong minMemType42;
    - *     FT_ULong maxMemType42;
    - *     FT_ULong minMemType1;
    - *     FT_ULong maxMemType1;
    - * }
    - */ -public class TT_Postscript extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - FORMATTYPE, - ITALICANGLE, - UNDERLINEPOSITION, - UNDERLINETHICKNESS, - ISFIXEDPITCH, - MINMEMTYPE42, - MAXMEMTYPE42, - MINMEMTYPE1, - MAXMEMTYPE1; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(2), - __member(2), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE), - __member(CLONG_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - FORMATTYPE = layout.offsetof(0); - ITALICANGLE = layout.offsetof(1); - UNDERLINEPOSITION = layout.offsetof(2); - UNDERLINETHICKNESS = layout.offsetof(3); - ISFIXEDPITCH = layout.offsetof(4); - MINMEMTYPE42 = layout.offsetof(5); - MAXMEMTYPE42 = layout.offsetof(6); - MINMEMTYPE1 = layout.offsetof(7); - MAXMEMTYPE1 = layout.offsetof(8); - } - - protected TT_Postscript(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TT_Postscript create(long address, @Nullable ByteBuffer container) { - return new TT_Postscript(address, container); - } - - /** - * Creates a {@code TT_Postscript} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TT_Postscript(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code FormatType} field. */ - @NativeType("FT_Fixed") - public long FormatType() { return nFormatType(address()); } - /** @return the value of the {@code italicAngle} field. */ - @NativeType("FT_Fixed") - public long italicAngle() { return nitalicAngle(address()); } - /** @return the value of the {@code underlinePosition} field. */ - @NativeType("FT_Short") - public short underlinePosition() { return nunderlinePosition(address()); } - /** @return the value of the {@code underlineThickness} field. */ - @NativeType("FT_Short") - public short underlineThickness() { return nunderlineThickness(address()); } - /** @return the value of the {@code isFixedPitch} field. */ - @NativeType("FT_ULong") - public long isFixedPitch() { return nisFixedPitch(address()); } - /** @return the value of the {@code minMemType42} field. */ - @NativeType("FT_ULong") - public long minMemType42() { return nminMemType42(address()); } - /** @return the value of the {@code maxMemType42} field. */ - @NativeType("FT_ULong") - public long maxMemType42() { return nmaxMemType42(address()); } - /** @return the value of the {@code minMemType1} field. */ - @NativeType("FT_ULong") - public long minMemType1() { return nminMemType1(address()); } - /** @return the value of the {@code maxMemType1} field. */ - @NativeType("FT_ULong") - public long maxMemType1() { return nmaxMemType1(address()); } - - // ----------------------------------- - - /** Returns a new {@code TT_Postscript} instance for the specified memory address. */ - public static TT_Postscript create(long address) { - return new TT_Postscript(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TT_Postscript createSafe(long address) { - return address == NULL ? null : new TT_Postscript(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #FormatType}. */ - public static long nFormatType(long struct) { return memGetCLong(struct + TT_Postscript.FORMATTYPE); } - /** Unsafe version of {@link #italicAngle}. */ - public static long nitalicAngle(long struct) { return memGetCLong(struct + TT_Postscript.ITALICANGLE); } - /** Unsafe version of {@link #underlinePosition}. */ - public static short nunderlinePosition(long struct) { return UNSAFE.getShort(null, struct + TT_Postscript.UNDERLINEPOSITION); } - /** Unsafe version of {@link #underlineThickness}. */ - public static short nunderlineThickness(long struct) { return UNSAFE.getShort(null, struct + TT_Postscript.UNDERLINETHICKNESS); } - /** Unsafe version of {@link #isFixedPitch}. */ - public static long nisFixedPitch(long struct) { return memGetCLong(struct + TT_Postscript.ISFIXEDPITCH); } - /** Unsafe version of {@link #minMemType42}. */ - public static long nminMemType42(long struct) { return memGetCLong(struct + TT_Postscript.MINMEMTYPE42); } - /** Unsafe version of {@link #maxMemType42}. */ - public static long nmaxMemType42(long struct) { return memGetCLong(struct + TT_Postscript.MAXMEMTYPE42); } - /** Unsafe version of {@link #minMemType1}. */ - public static long nminMemType1(long struct) { return memGetCLong(struct + TT_Postscript.MINMEMTYPE1); } - /** Unsafe version of {@link #maxMemType1}. */ - public static long nmaxMemType1(long struct) { return memGetCLong(struct + TT_Postscript.MAXMEMTYPE1); } - - // ----------------------------------- - - /** An array of {@link TT_Postscript} structs. */ - public static class Buffer extends StructBuffer { - - private static final TT_Postscript ELEMENT_FACTORY = TT_Postscript.create(-1L); - - /** - * Creates a new {@code TT_Postscript.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TT_Postscript#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TT_Postscript getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code FormatType} field. */ - @NativeType("FT_Fixed") - public long FormatType() { return TT_Postscript.nFormatType(address()); } - /** @return the value of the {@code italicAngle} field. */ - @NativeType("FT_Fixed") - public long italicAngle() { return TT_Postscript.nitalicAngle(address()); } - /** @return the value of the {@code underlinePosition} field. */ - @NativeType("FT_Short") - public short underlinePosition() { return TT_Postscript.nunderlinePosition(address()); } - /** @return the value of the {@code underlineThickness} field. */ - @NativeType("FT_Short") - public short underlineThickness() { return TT_Postscript.nunderlineThickness(address()); } - /** @return the value of the {@code isFixedPitch} field. */ - @NativeType("FT_ULong") - public long isFixedPitch() { return TT_Postscript.nisFixedPitch(address()); } - /** @return the value of the {@code minMemType42} field. */ - @NativeType("FT_ULong") - public long minMemType42() { return TT_Postscript.nminMemType42(address()); } - /** @return the value of the {@code maxMemType42} field. */ - @NativeType("FT_ULong") - public long maxMemType42() { return TT_Postscript.nmaxMemType42(address()); } - /** @return the value of the {@code minMemType1} field. */ - @NativeType("FT_ULong") - public long minMemType1() { return TT_Postscript.nminMemType1(address()); } - /** @return the value of the {@code maxMemType1} field. */ - @NativeType("FT_ULong") - public long maxMemType1() { return TT_Postscript.nmaxMemType1(address()); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_VertHeader.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_VertHeader.java deleted file mode 100644 index effba0b0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/TT_VertHeader.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.freetype; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * A structure used to model a TrueType vertical header, the {@code vhea} table, as well as the corresponding vertical metrics table, {@code vmtx}. - * - *

    Layout

    - * - *
    
    - * struct TT_VertHeader {
    - *     FT_Fixed Version;
    - *     FT_Short Ascender;
    - *     FT_Short Descender;
    - *     FT_Short Line_Gap;
    - *     FT_UShort {@link #advance_Height_Max};
    - *     FT_Short {@link #min_Top_Side_Bearing};
    - *     FT_Short {@link #min_Bottom_Side_Bearing};
    - *     FT_Short {@link #yMax_Extent};
    - *     FT_Short caret_Slope_Rise;
    - *     FT_Short caret_Slope_Run;
    - *     FT_Short caret_Offset;
    - *     FT_Short Reserved[4];
    - *     FT_Short metric_Data_Format;
    - *     FT_UShort number_Of_VMetrics;
    - *     void * long_metrics;
    - *     void * short_metrics;
    - * }
    - */ -public class TT_VertHeader extends Struct { - - /** The struct size in bytes. */ - public static final int SIZEOF; - - /** The struct alignment in bytes. */ - public static final int ALIGNOF; - - /** The struct member offsets. */ - public static final int - VERSION, - ASCENDER, - DESCENDER, - LINE_GAP, - ADVANCE_HEIGHT_MAX, - MIN_TOP_SIDE_BEARING, - MIN_BOTTOM_SIDE_BEARING, - YMAX_EXTENT, - CARET_SLOPE_RISE, - CARET_SLOPE_RUN, - CARET_OFFSET, - RESERVED, - METRIC_DATA_FORMAT, - NUMBER_OF_VMETRICS, - LONG_METRICS, - SHORT_METRICS; - - static { - Layout layout = __struct( - __member(CLONG_SIZE), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __member(2), - __array(2, 4), - __member(2), - __member(2), - __member(POINTER_SIZE), - __member(POINTER_SIZE) - ); - - SIZEOF = layout.getSize(); - ALIGNOF = layout.getAlignment(); - - VERSION = layout.offsetof(0); - ASCENDER = layout.offsetof(1); - DESCENDER = layout.offsetof(2); - LINE_GAP = layout.offsetof(3); - ADVANCE_HEIGHT_MAX = layout.offsetof(4); - MIN_TOP_SIDE_BEARING = layout.offsetof(5); - MIN_BOTTOM_SIDE_BEARING = layout.offsetof(6); - YMAX_EXTENT = layout.offsetof(7); - CARET_SLOPE_RISE = layout.offsetof(8); - CARET_SLOPE_RUN = layout.offsetof(9); - CARET_OFFSET = layout.offsetof(10); - RESERVED = layout.offsetof(11); - METRIC_DATA_FORMAT = layout.offsetof(12); - NUMBER_OF_VMETRICS = layout.offsetof(13); - LONG_METRICS = layout.offsetof(14); - SHORT_METRICS = layout.offsetof(15); - } - - protected TT_VertHeader(long address, @Nullable ByteBuffer container) { - super(address, container); - } - - @Override - protected TT_VertHeader create(long address, @Nullable ByteBuffer container) { - return new TT_VertHeader(address, container); - } - - /** - * Creates a {@code TT_VertHeader} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be - * visible to the struct instance and vice versa. - * - *

    The created instance holds a strong reference to the container object.

    - */ - public TT_VertHeader(ByteBuffer container) { - super(memAddress(container), __checkContainer(container, SIZEOF)); - } - - @Override - public int sizeof() { return SIZEOF; } - - /** @return the value of the {@code Version} field. */ - @NativeType("FT_Fixed") - public long Version() { return nVersion(address()); } - /** @return the value of the {@code Ascender} field. */ - @NativeType("FT_Short") - public short Ascender() { return nAscender(address()); } - /** @return the value of the {@code Descender} field. */ - @NativeType("FT_Short") - public short Descender() { return nDescender(address()); } - /** @return the value of the {@code Line_Gap} field. */ - @NativeType("FT_Short") - public short Line_Gap() { return nLine_Gap(address()); } - /** advance height maximum */ - @NativeType("FT_UShort") - public short advance_Height_Max() { return nadvance_Height_Max(address()); } - /** minimum top-sb */ - @NativeType("FT_Short") - public short min_Top_Side_Bearing() { return nmin_Top_Side_Bearing(address()); } - /** minimum bottom-sb */ - @NativeType("FT_Short") - public short min_Bottom_Side_Bearing() { return nmin_Bottom_Side_Bearing(address()); } - /** ymax extents */ - @NativeType("FT_Short") - public short yMax_Extent() { return nyMax_Extent(address()); } - /** @return the value of the {@code caret_Slope_Rise} field. */ - @NativeType("FT_Short") - public short caret_Slope_Rise() { return ncaret_Slope_Rise(address()); } - /** @return the value of the {@code caret_Slope_Run} field. */ - @NativeType("FT_Short") - public short caret_Slope_Run() { return ncaret_Slope_Run(address()); } - /** @return the value of the {@code caret_Offset} field. */ - @NativeType("FT_Short") - public short caret_Offset() { return ncaret_Offset(address()); } - /** @return a {@link ShortBuffer} view of the {@code Reserved} field. */ - @NativeType("FT_Short[4]") - public ShortBuffer Reserved() { return nReserved(address()); } - /** @return the value at the specified index of the {@code Reserved} field. */ - @NativeType("FT_Short") - public short Reserved(int index) { return nReserved(address(), index); } - /** @return the value of the {@code metric_Data_Format} field. */ - @NativeType("FT_Short") - public short metric_Data_Format() { return nmetric_Data_Format(address()); } - /** @return the value of the {@code number_Of_VMetrics} field. */ - @NativeType("FT_UShort") - public short number_Of_VMetrics() { return nnumber_Of_VMetrics(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code long_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer long_metrics(int capacity) { return nlong_metrics(address(), capacity); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code short_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer short_metrics(int capacity) { return nshort_metrics(address(), capacity); } - - // ----------------------------------- - - /** Returns a new {@code TT_VertHeader} instance for the specified memory address. */ - public static TT_VertHeader create(long address) { - return new TT_VertHeader(address, null); - } - - /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static TT_VertHeader createSafe(long address) { - return address == NULL ? null : new TT_VertHeader(address, null); - } - - /** - * Create a {@link Buffer} instance at the specified memory. - * - * @param address the memory address - * @param capacity the buffer capacity - */ - public static Buffer create(long address, int capacity) { - return new Buffer(address, capacity); - } - - /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ - @Nullable - public static Buffer createSafe(long address, int capacity) { - return address == NULL ? null : new Buffer(address, capacity); - } - - // ----------------------------------- - - /** Unsafe version of {@link #Version}. */ - public static long nVersion(long struct) { return memGetCLong(struct + TT_VertHeader.VERSION); } - /** Unsafe version of {@link #Ascender}. */ - public static short nAscender(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.ASCENDER); } - /** Unsafe version of {@link #Descender}. */ - public static short nDescender(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.DESCENDER); } - /** Unsafe version of {@link #Line_Gap}. */ - public static short nLine_Gap(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.LINE_GAP); } - /** Unsafe version of {@link #advance_Height_Max}. */ - public static short nadvance_Height_Max(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.ADVANCE_HEIGHT_MAX); } - /** Unsafe version of {@link #min_Top_Side_Bearing}. */ - public static short nmin_Top_Side_Bearing(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.MIN_TOP_SIDE_BEARING); } - /** Unsafe version of {@link #min_Bottom_Side_Bearing}. */ - public static short nmin_Bottom_Side_Bearing(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.MIN_BOTTOM_SIDE_BEARING); } - /** Unsafe version of {@link #yMax_Extent}. */ - public static short nyMax_Extent(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.YMAX_EXTENT); } - /** Unsafe version of {@link #caret_Slope_Rise}. */ - public static short ncaret_Slope_Rise(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.CARET_SLOPE_RISE); } - /** Unsafe version of {@link #caret_Slope_Run}. */ - public static short ncaret_Slope_Run(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.CARET_SLOPE_RUN); } - /** Unsafe version of {@link #caret_Offset}. */ - public static short ncaret_Offset(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.CARET_OFFSET); } - /** Unsafe version of {@link #Reserved}. */ - public static ShortBuffer nReserved(long struct) { return memShortBuffer(struct + TT_VertHeader.RESERVED, 4); } - /** Unsafe version of {@link #Reserved(int) Reserved}. */ - public static short nReserved(long struct, int index) { - return UNSAFE.getShort(null, struct + TT_VertHeader.RESERVED + check(index, 4) * 2); - } - /** Unsafe version of {@link #metric_Data_Format}. */ - public static short nmetric_Data_Format(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.METRIC_DATA_FORMAT); } - /** Unsafe version of {@link #number_Of_VMetrics}. */ - public static short nnumber_Of_VMetrics(long struct) { return UNSAFE.getShort(null, struct + TT_VertHeader.NUMBER_OF_VMETRICS); } - /** Unsafe version of {@link #long_metrics(int) long_metrics}. */ - @Nullable public static ByteBuffer nlong_metrics(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + TT_VertHeader.LONG_METRICS), capacity); } - /** Unsafe version of {@link #short_metrics(int) short_metrics}. */ - @Nullable public static ByteBuffer nshort_metrics(long struct, int capacity) { return memByteBufferSafe(memGetAddress(struct + TT_VertHeader.SHORT_METRICS), capacity); } - - // ----------------------------------- - - /** An array of {@link TT_VertHeader} structs. */ - public static class Buffer extends StructBuffer { - - private static final TT_VertHeader ELEMENT_FACTORY = TT_VertHeader.create(-1L); - - /** - * Creates a new {@code TT_VertHeader.Buffer} instance backed by the specified container. - * - *

    Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values - * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided - * by {@link TT_VertHeader#SIZEOF}, and its mark will be undefined.

    - * - *

    The created buffer instance holds a strong reference to the container object.

    - */ - public Buffer(ByteBuffer container) { - super(container, container.remaining() / SIZEOF); - } - - public Buffer(long address, int cap) { - super(address, null, -1, 0, cap, cap); - } - - Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { - super(address, container, mark, pos, lim, cap); - } - - @Override - protected Buffer self() { - return this; - } - - @Override - protected TT_VertHeader getElementFactory() { - return ELEMENT_FACTORY; - } - - /** @return the value of the {@code Version} field. */ - @NativeType("FT_Fixed") - public long Version() { return TT_VertHeader.nVersion(address()); } - /** @return the value of the {@code Ascender} field. */ - @NativeType("FT_Short") - public short Ascender() { return TT_VertHeader.nAscender(address()); } - /** @return the value of the {@code Descender} field. */ - @NativeType("FT_Short") - public short Descender() { return TT_VertHeader.nDescender(address()); } - /** @return the value of the {@code Line_Gap} field. */ - @NativeType("FT_Short") - public short Line_Gap() { return TT_VertHeader.nLine_Gap(address()); } - /** @return the value of the {@link TT_VertHeader#advance_Height_Max} field. */ - @NativeType("FT_UShort") - public short advance_Height_Max() { return TT_VertHeader.nadvance_Height_Max(address()); } - /** @return the value of the {@link TT_VertHeader#min_Top_Side_Bearing} field. */ - @NativeType("FT_Short") - public short min_Top_Side_Bearing() { return TT_VertHeader.nmin_Top_Side_Bearing(address()); } - /** @return the value of the {@link TT_VertHeader#min_Bottom_Side_Bearing} field. */ - @NativeType("FT_Short") - public short min_Bottom_Side_Bearing() { return TT_VertHeader.nmin_Bottom_Side_Bearing(address()); } - /** @return the value of the {@link TT_VertHeader#yMax_Extent} field. */ - @NativeType("FT_Short") - public short yMax_Extent() { return TT_VertHeader.nyMax_Extent(address()); } - /** @return the value of the {@code caret_Slope_Rise} field. */ - @NativeType("FT_Short") - public short caret_Slope_Rise() { return TT_VertHeader.ncaret_Slope_Rise(address()); } - /** @return the value of the {@code caret_Slope_Run} field. */ - @NativeType("FT_Short") - public short caret_Slope_Run() { return TT_VertHeader.ncaret_Slope_Run(address()); } - /** @return the value of the {@code caret_Offset} field. */ - @NativeType("FT_Short") - public short caret_Offset() { return TT_VertHeader.ncaret_Offset(address()); } - /** @return a {@link ShortBuffer} view of the {@code Reserved} field. */ - @NativeType("FT_Short[4]") - public ShortBuffer Reserved() { return TT_VertHeader.nReserved(address()); } - /** @return the value at the specified index of the {@code Reserved} field. */ - @NativeType("FT_Short") - public short Reserved(int index) { return TT_VertHeader.nReserved(address(), index); } - /** @return the value of the {@code metric_Data_Format} field. */ - @NativeType("FT_Short") - public short metric_Data_Format() { return TT_VertHeader.nmetric_Data_Format(address()); } - /** @return the value of the {@code number_Of_VMetrics} field. */ - @NativeType("FT_UShort") - public short number_Of_VMetrics() { return TT_VertHeader.nnumber_Of_VMetrics(address()); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code long_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer long_metrics(int capacity) { return TT_VertHeader.nlong_metrics(address(), capacity); } - /** - * @return a {@link ByteBuffer} view of the data pointed to by the {@code short_metrics} field. - * - * @param capacity the number of elements in the returned buffer - */ - @Nullable - @NativeType("void *") - public ByteBuffer short_metrics(int capacity) { return TT_VertHeader.nshort_metrics(address(), capacity); } - - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/freetype/package-info.java b/LWJGL/src/main/java/org/lwjgl/util/freetype/package-info.java deleted file mode 100644 index 13e53fdb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/freetype/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ - -/** - * Contains bindings to the FreeType, a freely available software library to render fonts. - * - *

    It is written in C, designed to be small, efficient, highly customizable, and portable while capable of producing high-quality output (glyph images) of - * most vector and bitmap font formats.

    - */ -@org.lwjgl.system.NonnullDefault -package org.lwjgl.util.freetype; - diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/Cylinder.java b/LWJGL/src/main/java/org/lwjgl/util/glu/Cylinder.java deleted file mode 100644 index 87166a0f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/Cylinder.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.GL_LINES; -import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; -import static org.lwjgl.opengl.GL11.GL_POINTS; -import static org.lwjgl.opengl.GL11.GL_QUAD_STRIP; -import static org.lwjgl.opengl.GL11.glBegin; -import static org.lwjgl.opengl.GL11.glEnd; -import static org.lwjgl.opengl.GL11.glVertex3f; -import static org.lwjgl.util.glu.GLU.GLU_FILL; -import static org.lwjgl.util.glu.GLU.GLU_INSIDE; -import static org.lwjgl.util.glu.GLU.GLU_LINE; -import static org.lwjgl.util.glu.GLU.GLU_POINT; -import static org.lwjgl.util.glu.GLU.GLU_SILHOUETTE; -import static org.lwjgl.util.glu.GLU.PI; - -/** - * Cylinder.java - * - * - * Created 23-dec-2003 - * @author Erik Duijs - */ -public class Cylinder extends Quadric { - - /** - * Constructor for Cylinder. - */ - public Cylinder() { - super(); - } - - /** - * 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. - * - * 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. - * - * @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) { - - float da, r, dr, dz; - float x, y, z, nz, nsign; - int i, j; - - if (super.orientation == GLU_INSIDE) { - nsign = -1.0f; - } else { - nsign = 1.0f; - } - - da = 2.0f * PI / slices; - dr = (topRadius - baseRadius) / stacks; - dz = height / stacks; - nz = (baseRadius - topRadius) / height; - // Z component of normal vectors - - if (super.drawStyle == GLU_POINT) { - glBegin(GL_POINTS); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - - z = 0.0f; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glVertex3f((x * r), (y * r), z); - z += dz; - r += dr; - } - } - glEnd(); - } else if (super.drawStyle == GLU_LINE || super.drawStyle == GLU_SILHOUETTE) { - // Draw rings - if (super.drawStyle == GLU_LINE) { - z = 0.0f; - r = baseRadius; - for (j = 0; j <= stacks; j++) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * r), (y * r), z); - } - glEnd(); - z += dz; - r += dr; - } - } else { - // draw one ring at each end - if (baseRadius != 0.0) { - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * baseRadius), (y * baseRadius), 0.0f); - } - glEnd(); - glBegin(GL_LINE_LOOP); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * topRadius), (y * topRadius), height); - } - glEnd(); - } - } - // draw length lines - glBegin(GL_LINES); - for (i = 0; i < slices; i++) { - x = cos((i * da)); - y = sin((i * da)); - normal3f(x * nsign, y * nsign, nz * nsign); - glVertex3f((x * baseRadius), (y * baseRadius), 0.0f); - glVertex3f((x * topRadius), (y * topRadius), (height)); - } - glEnd(); - } else if (super.drawStyle == GLU_FILL) { - float ds = 1.0f / slices; - float dt = 1.0f / stacks; - float t = 0.0f; - z = 0.0f; - r = baseRadius; - for (j = 0; j < stacks; j++) { - float s = 0.0f; - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - if (i == slices) { - x = sin(0.0f); - y = cos(0.0f); - } else { - x = sin((i * da)); - y = cos((i * da)); - } - if (nsign == 1.0f) { - normal3f((x * nsign), (y * nsign), (nz * nsign)); - TXTR_COORD(s, t); - glVertex3f((x * r), (y * r), z); - normal3f((x * nsign), (y * nsign), (nz * nsign)); - TXTR_COORD(s, t + dt); - glVertex3f((x * (r + dr)), (y * (r + dr)), (z + dz)); - } else { - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t); - glVertex3f((x * r), (y * r), z); - normal3f(x * nsign, y * nsign, nz * nsign); - TXTR_COORD(s, t + dt); - glVertex3f((x * (r + dr)), (y * (r + dr)), (z + dz)); - } - s += ds; - } // for slices - glEnd(); - r += dr; - t += dt; - z += dz; - } // for stacks - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/Disk.java b/LWJGL/src/main/java/org/lwjgl/util/glu/Disk.java deleted file mode 100644 index 9fbed43c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/Disk.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; -import static org.lwjgl.opengl.GL11.GL_LINE_STRIP; -import static org.lwjgl.opengl.GL11.GL_POINTS; -import static org.lwjgl.opengl.GL11.GL_QUAD_STRIP; -import static org.lwjgl.opengl.GL11.glBegin; -import static org.lwjgl.opengl.GL11.glEnd; -import static org.lwjgl.opengl.GL11.glNormal3f; -import static org.lwjgl.opengl.GL11.glVertex2f; -import static org.lwjgl.util.glu.GLU.GLU_FILL; -import static org.lwjgl.util.glu.GLU.GLU_LINE; -import static org.lwjgl.util.glu.GLU.GLU_NONE; -import static org.lwjgl.util.glu.GLU.GLU_OUTSIDE; -import static org.lwjgl.util.glu.GLU.GLU_POINT; -import static org.lwjgl.util.glu.GLU.GLU_SILHOUETTE; -import static org.lwjgl.util.glu.GLU.PI; - -/** - * Disk.java - * - * - * Created 23-dec-2003 - * @author Erik Duijs - */ -public class Disk extends Quadric { - - /** - * Constructor for Disk. - */ - public Disk() { - super(); - } - - /** - * 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. - * 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). - */ - public void draw(float innerRadius, float outerRadius, int slices, int loops) - { - float da, dr; - - /* Normal vectors */ - if (super.normals != GLU_NONE) { - if (super.orientation == GLU_OUTSIDE) { - glNormal3f(0.0f, 0.0f, +1.0f); - } - else { - glNormal3f(0.0f, 0.0f, -1.0f); - } - } - - da = 2.0f * PI / slices; - dr = (outerRadius - innerRadius) / loops; - - 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) - */ - float dtc = 2.0f * outerRadius; - float sa, ca; - float r1 = innerRadius; - int l; - for (l = 0; l < loops; l++) { - float r2 = r1 + dr; - if (super.orientation == GLU_OUTSIDE) { - int s; - glBegin(GL_QUAD_STRIP); - for (s = 0; s <= slices; s++) { - float a; - if (s == slices) - a = 0.0f; - else - a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5f + sa * r2 / dtc, 0.5f + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5f + sa * r1 / dtc, 0.5f + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - else { - int s; - glBegin(GL_QUAD_STRIP); - for (s = slices; s >= 0; s--) { - float a; - if (s == slices) - a = 0.0f; - else - a = s * da; - sa = sin(a); - ca = cos(a); - TXTR_COORD(0.5f - sa * r2 / dtc, 0.5f + ca * r2 / dtc); - glVertex2f(r2 * sa, r2 * ca); - TXTR_COORD(0.5f - sa * r1 / dtc, 0.5f + ca * r1 / dtc); - glVertex2f(r1 * sa, r1 * ca); - } - glEnd(); - } - r1 = r2; - } - break; - } - case GLU_LINE: - { - int l, s; - /* draw loops */ - for (l = 0; l <= loops; l++) { - float r = innerRadius + l * dr; - glBegin(GL_LINE_LOOP); - for (s = 0; s < slices; s++) { - float a = s * da; - glVertex2f(r * sin(a), r * cos(a)); - } - glEnd(); - } - /* draw spokes */ - for (s = 0; s < slices; s++) { - float a = s * da; - float x = sin(a); - float y = cos(a); - glBegin(GL_LINE_STRIP); - for (l = 0; l <= loops; l++) { - float r = innerRadius + l * dr; - glVertex2f(r * x, r * y); - } - glEnd(); - } - break; - } - case GLU_POINT: - { - int s; - glBegin(GL_POINTS); - for (s = 0; s < slices; s++) { - float a = s * da; - float x = sin(a); - float y = cos(a); - int l; - for (l = 0; l <= loops; l++) { - float r = innerRadius * l * dr; - glVertex2f(r * x, r * y); - } - } - glEnd(); - break; - } - case GLU_SILHOUETTE: - { - if (innerRadius != 0.0) { - float a; - glBegin(GL_LINE_LOOP); - for (a = 0.0f; a < 2.0 * PI; a += da) { - float x = innerRadius * sin(a); - float y = innerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - { - float a; - glBegin(GL_LINE_LOOP); - for (a = 0; a < 2.0f * PI; a += da) { - float x = outerRadius * sin(a); - float y = outerRadius * cos(a); - glVertex2f(x, y); - } - glEnd(); - } - break; - } - default: - return; - } - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/GLU.java b/LWJGL/src/main/java/org/lwjgl/util/glu/GLU.java deleted file mode 100644 index bf57e42d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/GLU.java +++ /dev/null @@ -1,430 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.glOrtho; - -import org.lwjgl.opengl.Util; -import org.lwjgl.util.glu.tessellation.GLUtessellatorImpl; - -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -/** - * GLU.java - * - * - * Created 23-dec-2003 - * @author Erik Duijs - */ -public class GLU { - static final float PI = (float)Math.PI; - - /* Errors: (return value 0 = no error) */ - public static final int GLU_INVALID_ENUM = 100900; - public static final int GLU_INVALID_VALUE = 100901; - public static final int GLU_OUT_OF_MEMORY = 100902; - public static final int GLU_INCOMPATIBLE_GL_VERSION = 100903; - - /* StringName */ - public static final int GLU_VERSION = 100800; - public static final int GLU_EXTENSIONS = 100801; - - /* Boolean */ - public static final boolean GLU_TRUE = true; - public static final boolean GLU_FALSE = false; - - - /**** Quadric constants ****/ - - /* QuadricNormal */ - public static final int GLU_SMOOTH = 100000; - public static final int GLU_FLAT = 100001; - public static final int GLU_NONE = 100002; - - /* QuadricDrawStyle */ - public static final int GLU_POINT = 100010; - public static final int GLU_LINE = 100011; - public static final int GLU_FILL = 100012; - public static final int GLU_SILHOUETTE = 100013; - - /* QuadricOrientation */ - public static final int GLU_OUTSIDE = 100020; - public static final int GLU_INSIDE = 100021; - - /* Callback types: */ - /* ERROR = 100103 */ - - - /**** Tesselation constants ****/ - - public static final double GLU_TESS_MAX_COORD = 1.0e150; - public static final double TESS_MAX_COORD = 1.0e150; - - /* TessProperty */ - public static final int GLU_TESS_WINDING_RULE = 100140; - public static final int GLU_TESS_BOUNDARY_ONLY = 100141; - public static final int GLU_TESS_TOLERANCE = 100142; - - /* TessWinding */ - public static final int GLU_TESS_WINDING_ODD = 100130; - public static final int GLU_TESS_WINDING_NONZERO = 100131; - public static final int GLU_TESS_WINDING_POSITIVE = 100132; - public static final int GLU_TESS_WINDING_NEGATIVE = 100133; - 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) */ - - /* TessError */ - public static final int GLU_TESS_ERROR1 = 100151; - public static final int GLU_TESS_ERROR2 = 100152; - public static final int GLU_TESS_ERROR3 = 100153; - public static final int GLU_TESS_ERROR4 = 100154; - public static final int GLU_TESS_ERROR5 = 100155; - public static final int GLU_TESS_ERROR6 = 100156; - public static final int GLU_TESS_ERROR7 = 100157; - public static final int GLU_TESS_ERROR8 = 100158; - - public static final int GLU_TESS_MISSING_BEGIN_POLYGON = GLU_TESS_ERROR1; - public static final int GLU_TESS_MISSING_BEGIN_CONTOUR = GLU_TESS_ERROR2; - public static final int GLU_TESS_MISSING_END_POLYGON = GLU_TESS_ERROR3; - public static final int GLU_TESS_MISSING_END_CONTOUR = GLU_TESS_ERROR4; - 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 ****/ - - /* NurbsProperty */ - public static final int GLU_AUTO_LOAD_MATRIX = 100200; - public static final int GLU_CULLING = 100201; - public static final int GLU_SAMPLING_TOLERANCE = 100203; - public static final int GLU_DISPLAY_MODE = 100204; - public static final int GLU_PARAMETRIC_TOLERANCE = 100202; - public static final int GLU_SAMPLING_METHOD = 100205; - public static final int GLU_U_STEP = 100206; - public static final int GLU_V_STEP = 100207; - - /* NurbsSampling */ - public static final int GLU_PATH_LENGTH = 100215; - public static final int GLU_PARAMETRIC_ERROR = 100216; - public static final int GLU_DOMAIN_DISTANCE = 100217; - - - /* NurbsTrim */ - public static final int GLU_MAP1_TRIM_2 = 100210; - public static final int GLU_MAP1_TRIM_3 = 100211; - - /* NurbsDisplay */ - /* FILL = 100012 */ - public static final int GLU_OUTLINE_POLYGON = 100240; - public static final int GLU_OUTLINE_PATCH = 100241; - - /* NurbsCallback */ - /* ERROR = 100103 */ - - /* NurbsErrors */ - public static final int GLU_NURBS_ERROR1 = 100251; - public static final int GLU_NURBS_ERROR2 = 100252; - public static final int GLU_NURBS_ERROR3 = 100253; - public static final int GLU_NURBS_ERROR4 = 100254; - public static final int GLU_NURBS_ERROR5 = 100255; - public static final int GLU_NURBS_ERROR6 = 100256; - public static final int GLU_NURBS_ERROR7 = 100257; - public static final int GLU_NURBS_ERROR8 = 100258; - public static final int GLU_NURBS_ERROR9 = 100259; - public static final int GLU_NURBS_ERROR10 = 100260; - public static final int GLU_NURBS_ERROR11 = 100261; - public static final int GLU_NURBS_ERROR12 = 100262; - public static final int GLU_NURBS_ERROR13 = 100263; - public static final int GLU_NURBS_ERROR14 = 100264; - public static final int GLU_NURBS_ERROR15 = 100265; - public static final int GLU_NURBS_ERROR16 = 100266; - public static final int GLU_NURBS_ERROR17 = 100267; - public static final int GLU_NURBS_ERROR18 = 100268; - public static final int GLU_NURBS_ERROR19 = 100269; - public static final int GLU_NURBS_ERROR20 = 100270; - public static final int GLU_NURBS_ERROR21 = 100271; - public static final int GLU_NURBS_ERROR22 = 100272; - public static final int GLU_NURBS_ERROR23 = 100273; - public static final int GLU_NURBS_ERROR24 = 100274; - public static final int GLU_NURBS_ERROR25 = 100275; - public static final int GLU_NURBS_ERROR26 = 100276; - public static final int GLU_NURBS_ERROR27 = 100277; - public static final int GLU_NURBS_ERROR28 = 100278; - public static final int GLU_NURBS_ERROR29 = 100279; - public static final int GLU_NURBS_ERROR30 = 100280; - public static final int GLU_NURBS_ERROR31 = 100281; - public static final int GLU_NURBS_ERROR32 = 100282; - public static final int GLU_NURBS_ERROR33 = 100283; - public static final int GLU_NURBS_ERROR34 = 100284; - public static final int GLU_NURBS_ERROR35 = 100285; - public static final int GLU_NURBS_ERROR36 = 100286; - public static final int GLU_NURBS_ERROR37 = 100287; - - /* Contours types -- obsolete! */ - public static final int GLU_CW = 100120; - public static final int GLU_CCW = 100121; - public static final int GLU_INTERIOR = 100122; - public static final int GLU_EXTERIOR = 100123; - public static final int GLU_UNKNOWN = 100124; - - /* Names without "TESS_" prefix */ - public static final int GLU_BEGIN = GLU_TESS_BEGIN; - public static final int GLU_VERTEX = GLU_TESS_VERTEX; - public static final int GLU_END = GLU_TESS_END; - public static final int GLU_ERROR = GLU_TESS_ERROR; - public static final int GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG; - - /** - * Method gluLookAt - * @param eyex - * @param eyey - * @param eyez - * @param centerx - * @param centery - * @param centerz - * @param upx - * @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) { - - Project.gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz); - } - - /** - * Method gluOrtho2D - * @param left - * @param right - * @param bottom - * @param top - */ - public static void gluOrtho2D( - float left, - float right, - float bottom, - float top) { - - glOrtho(left, right, bottom, top, -1.0, 1.0); - } - - /** - * Method gluPerspective - * @param fovy - * @param aspect - * @param zNear - * @param zFar - */ - public static void gluPerspective( - float fovy, - float aspect, - float zNear, - float zFar) { - - Project.gluPerspective(fovy, aspect, zNear, zFar); - } - - /** - * Method gluProject - * @param objx - * @param objy - * @param objz - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param 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 - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param 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 - * @param height - * @param viewport - */ - public static void gluPickMatrix( - float x, - float y, - float width, - float height, - IntBuffer viewport) { - - Project.gluPickMatrix(x, y, width, height, viewport); - } - - /** - * Method gluGetString. - * @param name - * @return String - */ - public static String gluGetString(int name) { - return Registry.gluGetString(name); - } - - /** - * Method gluCheckExtension. - * @param extName - * @param extString - * @return boolean - */ - public static boolean gluCheckExtension(String extName, String extString) { - return Registry.gluCheckExtension(extName, extString); - } - - /** - * Method gluBuild2DMipmaps - * @param target - * @param components - * @param width - * @param height - * @param format - * @param type - * @param data - * @return int - */ - 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 - * @param typeIn - * @param dataIn - * @param widthOut - * @param heightOut - * @param typeOut - * @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) { - - return MipMap.gluScaleImage(format, widthIn, heightIn, typeIn, dataIn, widthOut, heightOut, typeOut, dataOut); - } - - public static String gluErrorString(int error_code) { - switch (error_code) { - case GLU_INVALID_ENUM: - return "Invalid enum (glu)"; - case GLU_INVALID_VALUE: - return "Invalid value (glu)"; - case GLU_OUT_OF_MEMORY: - return "Out of memory (glu)"; - default: - return Util.translateGLErrorString(error_code); - } - } - - public static GLUtessellator gluNewTess() { - return new GLUtessellatorImpl(); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellator.java b/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellator.java deleted file mode 100644 index 60bf2c24..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellator.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.glu; - -public interface GLUtessellator { - - void gluDeleteTess(); - - void gluTessProperty(int which, double value); - - /* Returns tessellator property */ - void gluGetTessProperty(int which, double[] value, - int value_offset); /* gluGetTessProperty() */ - - void gluTessNormal(double x, double y, double z); - - void gluTessCallback(int which, - GLUtessellatorCallback aCallback); - - void gluTessVertex(double[] coords, int coords_offset, - Object vertexData); - - void gluTessBeginPolygon(Object data); - - void gluTessBeginContour(); - - void gluTessEndContour(); - - void gluTessEndPolygon(); - - /*******************************************************/ - - /* Obsolete calls -- for backward compatibility */ - - void gluBeginPolygon(); - - /*ARGSUSED*/ - void gluNextContour(int type); - - void gluEndPolygon(); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallback.java b/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallback.java deleted file mode 100644 index 0f913f77..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallback.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu; - -/** - * 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. - * - * @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 - */ - 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. - * - * @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 #endData endData - * @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.

    - * - * 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. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #edgeFlagData edgeFlagData - */ - 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. - * - * @param boundaryEdge - * Specifics which edges lie on the polygon boundary. - * @param polygonData - * Specifics a reference to user-defined data. - * - * @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}). - * - * @param vertexData - * Specifics a reference to the vertices of the triangles created - * byt the tessellatin process. - * - * @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. - * - * @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 #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 - * primitive and it takes no arguments. - * - * @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. - * - * @param polygonData - * Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #beginData beginData - * @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 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.

    - * - * 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();
    -   *
    -   *            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. - * - * @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. - * - * @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 #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 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. - * - * @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. - * - * @param errnum - * Specifics the error number code. - * @param polygonData - * Specifics a reference to user-defined data. - * - * @see GLU#gluTessCallback gluTessCallback - * @see #error error - */ - void errorData(int errnum, Object polygonData); - - //void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh); -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java b/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java deleted file mode 100644 index 742529b4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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. - * - * @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) {} - public void vertex(Object vertexData) {} - public void end() {} -// 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) {} - public void beginData(int type, Object polygonData) {} - public void edgeFlagData(boolean boundaryEdge, - Object polygonData) {} - public void vertexData(Object vertexData, Object polygonData) {} - public void endData(Object polygonData) {} - public void errorData(int errnum, Object polygonData) {} - public void combineData(double[] coords, Object[] data, - float[] weight, Object[] outData, - Object polygonData) {} -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/MipMap.java b/LWJGL/src/main/java/org/lwjgl/util/glu/MipMap.java deleted file mode 100644 index 08ee91d7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/MipMap.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.GL_FLOAT; -import static org.lwjgl.opengl.GL11.GL_INVALID_ENUM; -import static org.lwjgl.opengl.GL11.GL_MAX_TEXTURE_SIZE; -import static org.lwjgl.opengl.GL11.GL_PACK_ALIGNMENT; -import static org.lwjgl.opengl.GL11.GL_PACK_ROW_LENGTH; -import static org.lwjgl.opengl.GL11.GL_PACK_SKIP_PIXELS; -import static org.lwjgl.opengl.GL11.GL_PACK_SKIP_ROWS; -import static org.lwjgl.opengl.GL11.GL_UNPACK_ALIGNMENT; -import static org.lwjgl.opengl.GL11.GL_UNPACK_ROW_LENGTH; -import static org.lwjgl.opengl.GL11.GL_UNPACK_SKIP_PIXELS; -import static org.lwjgl.opengl.GL11.GL_UNPACK_SKIP_ROWS; -import static org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE; -import static org.lwjgl.opengl.GL11.glPixelStorei; -import static org.lwjgl.opengl.GL11.glTexImage2D; -import static org.lwjgl.util.glu.GLU.GLU_INVALID_ENUM; -import static org.lwjgl.util.glu.GLU.GLU_INVALID_VALUE; - -import org.lwjgl.BufferUtils; - -import java.nio.ByteBuffer; - -/** - * MipMap.java - * - * - * Created 11-jan-2004 - * @author Erik Duijs - */ -public class MipMap extends Util { - - /** - * Method gluBuild2DMipmaps - * - * @param target - * @param components - * @param width - * @param height - * @param format - * @param type - * @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) { - if ( width < 1 || height < 1 ) return GLU_INVALID_VALUE; - - final int bpp = bytesPerPixel(format, type); - if ( bpp == 0 ) - return GLU_INVALID_ENUM; - - final int maxSize = glGetIntegerv(GL_MAX_TEXTURE_SIZE); - - int w = nearestPower(width); - if ( w > maxSize ) - w = maxSize; - - int h = nearestPower(height); - if ( h > maxSize ) - h = maxSize; - - // Get current glPixelStore state - PixelStoreState pss = new PixelStoreState(); - - // set pixel packing - glPixelStorei(GL_PACK_ROW_LENGTH, 0); - glPixelStorei(GL_PACK_ALIGNMENT, 1); - glPixelStorei(GL_PACK_SKIP_ROWS, 0); - glPixelStorei(GL_PACK_SKIP_PIXELS, 0); - - ByteBuffer image; - int retVal = 0; - boolean done = false; - - if ( w != width || h != height ) { - // must rescale image to get "top" mipmap texture image - image = BufferUtils.createByteBuffer((w + 4) * h * bpp); - int error = gluScaleImage(format, width, height, type, data, w, h, type, image); - if ( error != 0 ) { - retVal = error; - done = true; - } - - /* set pixel unpacking */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - } else { - image = data; - } - - ByteBuffer bufferA = null; - ByteBuffer bufferB = null; - - int level = 0; - while ( !done ) { - if (image != data) { - /* set pixel unpacking */ - glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); - } - - glTexImage2D(target, level, components, w, h, 0, format, type, image); - - if ( w == 1 && h == 1 ) - break; - - final int newW = (w < 2) ? 1 : w >> 1; - final int newH = (h < 2) ? 1 : h >> 1; - - final ByteBuffer newImage; - - if ( bufferA == null ) - newImage = (bufferA = BufferUtils.createByteBuffer((newW + 4) * newH * bpp)); - else if ( bufferB == null ) - newImage = (bufferB = BufferUtils.createByteBuffer((newW + 4) * newH * bpp)); - else - newImage = bufferB; - - int error = gluScaleImage(format, w, h, type, image, newW, newH, type, newImage); - if ( error != 0 ) { - retVal = error; - done = true; - } - - image = newImage; - if ( bufferB != null ) - bufferB = bufferA; - - w = newW; - h = newH; - level++; - } - - // Restore original glPixelStore state - pss.save(); - - return retVal; - } - - /** - * Method gluScaleImage. - * @param format - * @param widthIn - * @param heightIn - * @param typein - * @param dataIn - * @param widthOut - * @param heightOut - * @param typeOut - * @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) { - - final int components = compPerPix(format); - if ( components == -1 ) - return GLU_INVALID_ENUM; - - int i, j, k; - float[] tempIn, tempOut; - float sx, sy; - int sizein, sizeout; - int rowstride, rowlen; - - // temp image data - tempIn = new float[widthIn * heightIn * components]; - tempOut = new float[widthOut * heightOut * components]; - - // Determine bytes per input type - switch ( typein ) { - case GL_UNSIGNED_BYTE: - sizein = 1; - break; - case GL_FLOAT: - sizein = 4; - break; - default: - return GL_INVALID_ENUM; - } - - // Determine bytes per output type - switch ( typeOut ) { - case GL_UNSIGNED_BYTE: - sizeout = 1; - break; - case GL_FLOAT: - sizeout = 4; - break; - default: - return GL_INVALID_ENUM; - } - - // Get glPixelStore state - PixelStoreState pss = new PixelStoreState(); - - //Unpack the pixel data and convert to floating point - if ( pss.unpackRowLength > 0 ) - rowlen = pss.unpackRowLength; - else - rowlen = widthIn; - - if ( sizein >= pss.unpackAlignment ) - rowstride = components * rowlen; - else - rowstride = pss.unpackAlignment / sizein * ceil(components * rowlen * sizein, pss.unpackAlignment); - - switch ( typein ) { - case GL_UNSIGNED_BYTE: - k = 0; - dataIn.rewind(); - for ( i = 0; i < heightIn; i++ ) { - int ubptr = i * rowstride + pss.unpackSkipRows * rowstride + pss.unpackSkipPixels * components; - for ( j = 0; j < widthIn * components; j++ ) { - tempIn[k++] = dataIn.get(ubptr++) & 0xff; - } - } - break; - case GL_FLOAT: - k = 0; - dataIn.rewind(); - for ( i = 0; i < heightIn; i++ ) - { - int fptr = 4 * (i * rowstride + pss.unpackSkipRows * rowstride + pss.unpackSkipPixels * components); - for ( j = 0; j < widthIn * components; j++ ) - { - tempIn[k++] = dataIn.getFloat(fptr); - fptr += 4; - } - } - break; - default: - return GLU_INVALID_ENUM; - } - - // Do scaling - sx = (float)widthIn / (float)widthOut; - sy = (float)heightIn / (float)heightOut; - - float[] c = new float[components]; - int src, dst; - - for ( int iy = 0; iy < heightOut; iy++ ) { - for ( int ix = 0; ix < widthOut; ix++ ) { - int x0 = (int)(ix * sx); - int x1 = (int)((ix + 1) * sx); - int y0 = (int)(iy * sy); - int y1 = (int)((iy + 1) * sy); - - int readPix = 0; - - // reset weighted pixel - for ( int ic = 0; ic < components; ic++ ) { - c[ic] = 0; - } - - // create weighted pixel - for ( int ix0 = x0; ix0 < x1; ix0++ ) { - for ( int iy0 = y0; iy0 < y1; iy0++ ) { - - src = (iy0 * widthIn + ix0) * components; - - for ( int ic = 0; ic < components; ic++ ) { - c[ic] += tempIn[src + ic]; - } - - readPix++; - } - } - - // store weighted pixel - dst = (iy * widthOut + ix) * components; - - if ( readPix == 0 ) { - // Image is sized up, caused by non power of two texture as input - src = (y0 * widthIn + x0) * components; - for ( int ic = 0; ic < components; ic++ ) { - tempOut[dst++] = tempIn[src + ic]; - } - } else { - // sized down - for ( k = 0; k < components; k++ ) { - tempOut[dst++] = c[k] / readPix; - } - } - } - } - - - // Convert temp output - if ( pss.packRowLength > 0 ) - rowlen = pss.packRowLength; - else - rowlen = widthOut; - - if ( sizeout >= pss.packAlignment ) - rowstride = components * rowlen; - else - rowstride = pss.packAlignment / sizeout * ceil(components * rowlen * sizeout, pss.packAlignment); - - switch ( typeOut ) { - case GL_UNSIGNED_BYTE: - k = 0; - for ( i = 0; i < heightOut; i++ ) { - int ubptr = i * rowstride + pss.packSkipRows * rowstride + pss.packSkipPixels * components; - - for ( j = 0; j < widthOut * components; j++ ) { - dataOut.put(ubptr++, (byte)tempOut[k++]); - } - } - break; - case GL_FLOAT: - k = 0; - for ( i = 0; i < heightOut; i++ ) { - int fptr = 4 * (i * rowstride + pss.unpackSkipRows * rowstride + pss.unpackSkipPixels * components); - - for ( j = 0; j < widthOut * components; j++ ) { - dataOut.putFloat(fptr, tempOut[k++]); - fptr += 4; - } - } - break; - default: - return GLU_INVALID_ENUM; - } - - return 0; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/PartialDisk.java b/LWJGL/src/main/java/org/lwjgl/util/glu/PartialDisk.java deleted file mode 100644 index 3fc89343..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/PartialDisk.java +++ /dev/null @@ -1,374 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.GL_LINE_STRIP; -import static org.lwjgl.opengl.GL11.GL_POINTS; -import static org.lwjgl.opengl.GL11.GL_QUAD_STRIP; -import static org.lwjgl.opengl.GL11.GL_TRIANGLE_FAN; -import static org.lwjgl.opengl.GL11.glBegin; -import static org.lwjgl.opengl.GL11.glEnd; -import static org.lwjgl.opengl.GL11.glNormal3f; -import static org.lwjgl.opengl.GL11.glTexCoord2f; -import static org.lwjgl.opengl.GL11.glVertex3f; -import static org.lwjgl.util.glu.GLU.GLU_FILL; -import static org.lwjgl.util.glu.GLU.GLU_FLAT; -import static org.lwjgl.util.glu.GLU.GLU_LINE; -import static org.lwjgl.util.glu.GLU.GLU_NONE; -import static org.lwjgl.util.glu.GLU.GLU_OUTSIDE; -import static org.lwjgl.util.glu.GLU.GLU_POINT; -import static org.lwjgl.util.glu.GLU.GLU_SILHOUETTE; -import static org.lwjgl.util.glu.GLU.GLU_SMOOTH; -import static org.lwjgl.util.glu.GLU.PI; - -/** - * PartialDisk.java - * - * - * Created 23-dec-2003 - * - * @author Erik Duijs - */ -public class PartialDisk extends Quadric { - - private static final int CACHE_SIZE = 240; - - /** - * Constructor for PartialDisk. - */ - public PartialDisk() { - super(); - } - - /** - * 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). - * - * 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). - */ - public void draw( - float innerRadius, - float outerRadius, - int slices, - int loops, - float startAngle, - float sweepAngle) { - - int i, j; - float[] sinCache = new float[CACHE_SIZE]; - float[] cosCache = new float[CACHE_SIZE]; - float angle; - float sintemp, costemp; - float deltaRadius; - float radiusLow, radiusHigh; - float texLow = 0, texHigh = 0; - float angleOffset; - int slices2; - int finish; - - if (slices >= CACHE_SIZE) - slices = CACHE_SIZE - 1; - if (slices < 2 - || loops < 1 - || outerRadius <= 0.0f - || innerRadius < 0.0f - || innerRadius > outerRadius) { - //gluQuadricError(qobj, GLU.GLU_INVALID_VALUE); - System.err.println("PartialDisk: GLU_INVALID_VALUE"); - return; - } - - if (sweepAngle < -360.0f) - sweepAngle = 360.0f; - if (sweepAngle > 360.0f) - sweepAngle = 360.0f; - if (sweepAngle < 0) { - startAngle += sweepAngle; - sweepAngle = -sweepAngle; - } - - if (sweepAngle == 360.0f) { - slices2 = slices; - } else { - slices2 = slices + 1; - } - - /* Compute length (needed for normal calculations) */ - deltaRadius = outerRadius - innerRadius; - - /* Cache is the vertex locations cache */ - - angleOffset = startAngle / 180.0f * PI; - for (i = 0; i <= slices; i++) { - angle = angleOffset + ((PI * sweepAngle) / 180.0f) * i / slices; - sinCache[i] = sin(angle); - cosCache[i] = cos(angle); - } - - if (sweepAngle == 360.0f) { - sinCache[slices] = sinCache[0]; - cosCache[slices] = cosCache[0]; - } - - switch (super.normals) { - case GLU_FLAT : - case GLU_SMOOTH : - if (super.orientation == GLU_OUTSIDE) { - glNormal3f(0.0f, 0.0f, 1.0f); - } else { - glNormal3f(0.0f, 0.0f, -1.0f); - } - break; - default : - case GLU_NONE : - break; - } - - switch (super.drawStyle) { - case GLU_FILL : - if (innerRadius == .0f) { - finish = loops - 1; - /* Triangle strip for inner polygons */ - glBegin(GL_TRIANGLE_FAN); - if (super.textureFlag) { - glTexCoord2f(0.5f, 0.5f); - } - glVertex3f(0.0f, 0.0f, 0.0f); - radiusLow = outerRadius - deltaRadius * ((float) (loops - 1) / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - if (super.orientation == GLU_OUTSIDE) { - for (i = slices; i >= 0; i--) { - if (super.textureFlag) { - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - } else { - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - } - glEnd(); - } else { - finish = loops; - } - for (j = 0; j < finish; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - radiusHigh = outerRadius - deltaRadius * ((float) (j + 1) / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - texHigh = radiusHigh / outerRadius / 2; - } - - glBegin(GL_QUAD_STRIP); - for (i = 0; i <= slices; i++) { - if (super.orientation == GLU_OUTSIDE) { - if (super.textureFlag) { - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - - if (super.textureFlag) { - glTexCoord2f( - texHigh * sinCache[i] + 0.5f, - texHigh * cosCache[i] + 0.5f); - } - glVertex3f( - radiusHigh * sinCache[i], - radiusHigh * cosCache[i], - 0.0f); - } else { - if (super.textureFlag) { - glTexCoord2f( - texHigh * sinCache[i] + 0.5f, - texHigh * cosCache[i] + 0.5f); - } - glVertex3f( - radiusHigh * sinCache[i], - radiusHigh * cosCache[i], - 0.0f); - - if (super.textureFlag) { - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - } - glEnd(); - } - break; - case GLU_POINT : - glBegin(GL_POINTS); - for (i = 0; i < slices2; i++) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); - } - } - glEnd(); - break; - case GLU_LINE : - if (innerRadius == outerRadius) { - glBegin(GL_LINE_STRIP); - - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f(sinCache[i] / 2 + 0.5f, cosCache[i] / 2 + 0.5f); - } - glVertex3f(innerRadius * sinCache[i], innerRadius * cosCache[i], 0.0f); - } - glEnd(); - break; - } - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - glEnd(); - } - for (i = 0; i < slices2; i++) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - glBegin(GL_LINE_STRIP); - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - if (super.textureFlag) { - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); - } - glEnd(); - } - break; - case GLU_SILHOUETTE : - if (sweepAngle < 360.0f) { - for (i = 0; i <= slices; i += slices) { - sintemp = sinCache[i]; - costemp = cosCache[i]; - glBegin(GL_LINE_STRIP); - for (j = 0; j <= loops; j++) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); - } - glEnd(); - } - } - for (j = 0; j <= loops; j += loops) { - radiusLow = outerRadius - deltaRadius * ((float) j / loops); - if (super.textureFlag) { - texLow = radiusLow / outerRadius / 2; - } - - glBegin(GL_LINE_STRIP); - for (i = 0; i <= slices; i++) { - if (super.textureFlag) { - glTexCoord2f( - texLow * sinCache[i] + 0.5f, - texLow * cosCache[i] + 0.5f); - } - glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); - } - glEnd(); - if (innerRadius == outerRadius) - break; - } - break; - default : - break; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/PixelStoreState.java b/LWJGL/src/main/java/org/lwjgl/util/glu/PixelStoreState.java deleted file mode 100644 index e532079e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/PixelStoreState.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.GL_PACK_ALIGNMENT; -import static org.lwjgl.opengl.GL11.GL_PACK_ROW_LENGTH; -import static org.lwjgl.opengl.GL11.GL_PACK_SKIP_PIXELS; -import static org.lwjgl.opengl.GL11.GL_PACK_SKIP_ROWS; -import static org.lwjgl.opengl.GL11.GL_UNPACK_ALIGNMENT; -import static org.lwjgl.opengl.GL11.GL_UNPACK_ROW_LENGTH; -import static org.lwjgl.opengl.GL11.GL_UNPACK_SKIP_PIXELS; -import static org.lwjgl.opengl.GL11.GL_UNPACK_SKIP_ROWS; -import static org.lwjgl.opengl.GL11.glPixelStorei; - -/** - * PixelStoreState.java - * - * - * Created 11-jan-2004 - * @author Erik Duijs - */ -class PixelStoreState extends Util { - - public int unpackRowLength; - public int unpackAlignment; - public int unpackSkipRows; - public int unpackSkipPixels; - public int packRowLength; - public int packAlignment; - public int packSkipRows; - public int packSkipPixels; - - /** - * Constructor for PixelStoreState. - */ - PixelStoreState() { - super(); - load(); - } - - public void load() { - unpackRowLength = glGetIntegerv(GL_UNPACK_ROW_LENGTH); - unpackAlignment = glGetIntegerv(GL_UNPACK_ALIGNMENT); - unpackSkipRows = glGetIntegerv(GL_UNPACK_SKIP_ROWS); - unpackSkipPixels = glGetIntegerv(GL_UNPACK_SKIP_PIXELS); - packRowLength = glGetIntegerv(GL_PACK_ROW_LENGTH); - packAlignment = glGetIntegerv(GL_PACK_ALIGNMENT); - packSkipRows = glGetIntegerv(GL_PACK_SKIP_ROWS); - packSkipPixels = glGetIntegerv(GL_PACK_SKIP_PIXELS); - } - - public void save() { - glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackRowLength); - glPixelStorei(GL_UNPACK_ALIGNMENT, unpackAlignment); - glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackSkipRows); - glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackSkipPixels); - glPixelStorei(GL_PACK_ROW_LENGTH, packRowLength); - glPixelStorei(GL_PACK_ALIGNMENT, packAlignment); - glPixelStorei(GL_PACK_SKIP_ROWS, packSkipRows); - glPixelStorei(GL_PACK_SKIP_PIXELS, packSkipPixels); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/Project.java b/LWJGL/src/main/java/org/lwjgl/util/glu/Project.java deleted file mode 100644 index 504402e4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/Project.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.glMultMatrix; -import static org.lwjgl.opengl.GL11.glScalef; -import static org.lwjgl.opengl.GL11.glTranslatef; - -import org.lwjgl.BufferUtils; - -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -/** - * Project.java - *

    - *

    - * Created 11-jan-2004 - * - * @author Erik Duijs - */ -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 FloatBuffer matrix = BufferUtils.createFloatBuffer(16); - private static final FloatBuffer finalMatrix = BufferUtils.createFloatBuffer(16); - - private static final FloatBuffer tempMatrix = BufferUtils.createFloatBuffer(16); - private static final float[] in = new float[4]; - private static final float[] out = new float[4]; - - private static final float[] forward = new float[3]; - private static final float[] side = new float[3]; - private static final float[] up = new float[3]; - - /** - * Make matrix an identity matrix - */ - private static void __gluMakeIdentityf(FloatBuffer m) { - int oldPos = m.position(); - m.put(IDENTITY_MATRIX); - m.position(oldPos); - } - - /** - * Method __gluMultMatrixVecf - * - * @param m - * @param in - * @param out - */ - 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) - + in[2] * m.get(m.position() + 2*4 + i) - + in[3] * m.get(m.position() + 3*4 + i); - - } - } - - /** - * @param src - * @param inverse - * - * @return true if the matrix was succesfully inverted - */ - private static boolean __gluInvertMatrixf(FloatBuffer src, FloatBuffer inverse) { - int i, j, k, swap; - float t; - FloatBuffer temp = Project.tempMatrix; - - - for (i = 0; i < 16; i++) { - temp.put(i, src.get(i + src.position())); - } - __gluMakeIdentityf(inverse); - - for (i = 0; i < 4; i++) { - /* - * * Look for largest element in column - */ - swap = i; - for (j = i + 1; j < 4; j++) { - /* - * if (fabs(temp[j][i]) > fabs(temp[i][i])) { swap = j; - */ - if (Math.abs(temp.get(j*4 + i)) > Math.abs(temp.get(i* 4 + i))) { - swap = j; - } - } - - if (swap != i) { - /* - * * Swap rows. - */ - for (k = 0; k < 4; k++) { - t = temp.get(i*4 + k); - temp.put(i*4 + k, temp.get(swap*4 + k)); - temp.put(swap*4 + k, t); - - t = inverse.get(i*4 + k); - inverse.put(i*4 + k, inverse.get(swap*4 + k)); - //inverse.put((i << 2) + k, inverse.get((swap << 2) + k)); - inverse.put(swap*4 + k, t); - //inverse.put((swap << 2) + k, t); - } - } - - 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. - */ - return false; - } - - t = temp.get(i*4 + i); - for (k = 0; k < 4; k++) { - temp.put(i*4 + k, temp.get(i*4 + k)/t); - inverse.put(i*4 + k, inverse.get(i*4 + k)/t); - } - for (j = 0; j < 4; j++) { - if (j != i) { - t = temp.get(j*4 + i); - 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);*/ - } - } - } - } - return true; - } - - /** - * @param a - * @param b - * @param r - */ - private static void __gluMultMatricesf(FloatBuffer a, FloatBuffer b, FloatBuffer r) { - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - r.put(r.position() + i*4 + j, - a.get(a.position() + i*4 + 0) * b.get(b.position() + 0*4 + j) + a.get(a.position() + i*4 + 1) * b.get(b.position() + 1*4 + j) + a.get(a.position() + i*4 + 2) * b.get(b.position() + 2*4 + j) + a.get(a.position() + i*4 + 3) * b.get(b.position() + 3*4 + j)); - } - } - } - - /** - * Method gluPerspective. - * - * @param fovy - * @param aspect - * @param zNear - * @param zFar - */ - public static void gluPerspective(float fovy, float aspect, float zNear, float zFar) { - float sine, cotangent, deltaZ; - float radians = fovy / 2 * GLU.PI / 180; - - deltaZ = zFar - zNear; - sine = (float) Math.sin(radians); - - if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) { - return; - } - - cotangent = (float) Math.cos(radians) / sine; - - __gluMakeIdentityf(matrix); - - matrix.put(0 * 4 + 0, cotangent / aspect); - matrix.put(1 * 4 + 1, cotangent); - matrix.put(2 * 4 + 2, - (zFar + zNear) / deltaZ); - matrix.put(2 * 4 + 3, -1); - matrix.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ); - matrix.put(3 * 4 + 3, 0); - - glMultMatrix(matrix); - } - - /** - * Method gluLookAt - * - * @param eyex - * @param eyey - * @param eyez - * @param centerx - * @param centery - * @param centerz - * @param upx - * @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) { - float[] forward = Project.forward; - float[] side = Project.side; - float[] up = Project.up; - - forward[0] = centerx - eyex; - forward[1] = centery - eyey; - forward[2] = centerz - eyez; - - up[0] = upx; - up[1] = upy; - up[2] = upz; - - normalize(forward); - - /* Side = forward x up */ - cross(forward, up, side); - normalize(side); - - /* Recompute up as: up = side x forward */ - cross(side, forward, up); - - __gluMakeIdentityf(matrix); - matrix.put(0 * 4 + 0, side[0]); - matrix.put(1 * 4 + 0, side[1]); - matrix.put(2 * 4 + 0, side[2]); - - matrix.put(0 * 4 + 1, up[0]); - matrix.put(1 * 4 + 1, up[1]); - matrix.put(2 * 4 + 1, up[2]); - - matrix.put(0 * 4 + 2, -forward[0]); - matrix.put(1 * 4 + 2, -forward[1]); - matrix.put(2 * 4 + 2, -forward[2]); - - glMultMatrix(matrix); - glTranslatef(-eyex, -eyey, -eyez); - } - - /** - * Method gluProject - * - * @param objx - * @param objy - * @param objz - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param 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; - - in[0] = objx; - in[1] = objy; - in[2] = objz; - in[3] = 1.0f; - - __gluMultMatrixVecf(modelMatrix, in, out); - __gluMultMatrixVecf(projMatrix, out, in); - - if (in[3] == 0.0) - return false; - - in[3] = (1.0f / in[3]) * 0.5f; - - // Map x, y and z to range 0-1 - in[0] = in[0] * in[3] + 0.5f; - in[1] = in[1] * in[3] + 0.5f; - in[2] = in[2] * in[3] + 0.5f; - - // Map x,y to viewport - win_pos.put(0, in[0] * viewport.get(viewport.position() + 2) + viewport.get(viewport.position() + 0)); - win_pos.put(1, in[1] * viewport.get(viewport.position() + 3) + viewport.get(viewport.position() + 1)); - win_pos.put(2, in[2]); - - return true; - } - - /** - * Method gluUnproject - * - * @param winx - * @param winy - * @param winz - * @param modelMatrix - * @param projMatrix - * @param viewport - * @param 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; - - __gluMultMatricesf(modelMatrix, projMatrix, finalMatrix); - - if (!__gluInvertMatrixf(finalMatrix, finalMatrix)) - return false; - - in[0] = winx; - in[1] = winy; - in[2] = winz; - in[3] = 1.0f; - - // Map x and y from window coordinates - in[0] = (in[0] - viewport.get(viewport.position() + 0)) / viewport.get(viewport.position() + 2); - in[1] = (in[1] - viewport.get(viewport.position() + 1)) / viewport.get(viewport.position() + 3); - - // Map to range -1 to 1 - in[0] = in[0] * 2 - 1; - in[1] = in[1] * 2 - 1; - in[2] = in[2] * 2 - 1; - - __gluMultMatrixVecf(finalMatrix, in, out); - - if (out[3] == 0.0) - return false; - - out[3] = 1.0f / out[3]; - - obj_pos.put(obj_pos.position() + 0, out[0] * out[3]); - obj_pos.put(obj_pos.position() + 1, out[1] * out[3]); - obj_pos.put(obj_pos.position() + 2, out[2] * out[3]); - - return true; - } - - /** - * Method gluPickMatrix - * - * @param x - * @param y - * @param deltaX - * @param deltaY - * @param viewport - */ - public static void gluPickMatrix( - float x, - float y, - float deltaX, - float deltaY, - IntBuffer viewport) { - if (deltaX <= 0 || deltaY <= 0) { - return; - } - - /* Translate and scale the picked region to the entire window */ - glTranslatef( - (viewport.get(viewport.position() + 2) - 2 * (x - viewport.get(viewport.position() + 0))) / deltaX, - (viewport.get(viewport.position() + 3) - 2 * (y - viewport.get(viewport.position() + 1))) / deltaY, - 0); - glScalef(viewport.get(viewport.position() + 2) / deltaX, viewport.get(viewport.position() + 3) / deltaY, 1.0f); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/Quadric.java b/LWJGL/src/main/java/org/lwjgl/util/glu/Quadric.java deleted file mode 100644 index 8cdb50ec..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/Quadric.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.glNormal3f; -import static org.lwjgl.opengl.GL11.glTexCoord2f; -import static org.lwjgl.util.glu.GLU.GLU_FILL; -import static org.lwjgl.util.glu.GLU.GLU_OUTSIDE; -import static org.lwjgl.util.glu.GLU.GLU_SMOOTH; - -/** - * Quadric.java - * - * - * Created 22-dec-2003 - * @author Erik Duijs - */ -public class Quadric { - - protected int drawStyle; - protected int orientation; - protected boolean textureFlag; - protected int normals; - - /** - * Constructor for Quadric. - */ - public Quadric() { - super(); - - drawStyle = GLU_FILL; - orientation = GLU_OUTSIDE; - textureFlag = false; - normals = GLU_SMOOTH; - } - - /** - * Call glNormal3f after scaling normal to unit length. - * - * @param x - * @param y - * @param z - */ - protected void normal3f(float x, float y, float z) { - float mag; - - mag = (float)Math.sqrt(x * x + y * y + z * z); - if (mag > 0.00001F) { - x /= mag; - y /= mag; - z /= mag; - } - glNormal3f(x, y, z); - } - - /** - * specifies the draw style for quadrics. - * - * 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.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.POINT: Quadrics are rendered as a set of points. - * - * @param drawStyle The drawStyle to set - */ - public void setDrawStyle(int drawStyle) { - this.drawStyle = drawStyle; - } - - /** - * specifies what kind of normals are desired for quadrics. - * The legal values are as follows: - * - * GLU.NONE: No normals are generated. - * - * 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. - * - * @param normals The normals to set - */ - public void setNormals(int normals) { - this.normals = normals; - } - - /** - * specifies what kind of orientation is desired for. - * The orientation values are as follows: - * - * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. - * - * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. - * - * Note that the interpretation of outward and inward depends on the quadric - * being drawn. - * - * @param orientation The orientation to set - */ - public void setOrientation(int orientation) { - this.orientation = orientation; - } - - /** - * 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. - * - * @param textureFlag The textureFlag to set - */ - public void setTextureFlag(boolean textureFlag) { - this.textureFlag = textureFlag; - } - - - /** - * Returns the drawStyle. - * @return int - */ - public int getDrawStyle() { - return drawStyle; - } - - /** - * Returns the normals. - * @return int - */ - public int getNormals() { - return normals; - } - - /** - * Returns the orientation. - * @return int - */ - public int getOrientation() { - return orientation; - } - - /** - * Returns the textureFlag. - * @return boolean - */ - public boolean getTextureFlag() { - return textureFlag; - } - - protected void TXTR_COORD(float x, float y) { - if (textureFlag) glTexCoord2f(x,y); - } - - - protected float sin(float r) { - return (float)Math.sin(r); - } - - protected float cos(float r) { - return (float)Math.cos(r); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/Registry.java b/LWJGL/src/main/java/org/lwjgl/util/glu/Registry.java deleted file mode 100644 index 2ed0b992..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/Registry.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.util.glu.GLU.GLU_EXTENSIONS; -import static org.lwjgl.util.glu.GLU.GLU_VERSION; - -/** - * Registry.java - * - * - * Created 11-jan-2004 - * @author Erik Duijs - */ -public class Registry extends Util { - - private static final String versionString = "1.3"; - private static final String extensionString = - "GLU_EXT_nurbs_tessellator " + "GLU_EXT_object_space_tess "; - - /** - * Method gluGetString - * @param name - * @return String - */ - public static String gluGetString(int name) { - - if (name == GLU_VERSION) { - return versionString; - } else if (name == GLU_EXTENSIONS) { - return extensionString; - } - return null; - } - - /** - * 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. - * @return boolean true if extName is found otherwise it returns false. - */ - public static boolean gluCheckExtension(String extName, String extString) { - if (extString == null || extName == null) - return false; - - return extString.indexOf(extName) != -1; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/Sphere.java b/LWJGL/src/main/java/org/lwjgl/util/glu/Sphere.java deleted file mode 100644 index 9ad00601..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/Sphere.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; -import static org.lwjgl.opengl.GL11.GL_LINE_STRIP; -import static org.lwjgl.opengl.GL11.GL_POINTS; -import static org.lwjgl.opengl.GL11.GL_QUAD_STRIP; -import static org.lwjgl.opengl.GL11.GL_TRIANGLE_FAN; -import static org.lwjgl.opengl.GL11.glBegin; -import static org.lwjgl.opengl.GL11.glEnd; -import static org.lwjgl.opengl.GL11.glNormal3f; -import static org.lwjgl.opengl.GL11.glVertex3f; -import static org.lwjgl.util.glu.GLU.GLU_FILL; -import static org.lwjgl.util.glu.GLU.GLU_INSIDE; -import static org.lwjgl.util.glu.GLU.GLU_LINE; -import static org.lwjgl.util.glu.GLU.GLU_NONE; -import static org.lwjgl.util.glu.GLU.GLU_POINT; -import static org.lwjgl.util.glu.GLU.GLU_SILHOUETTE; -import static org.lwjgl.util.glu.GLU.PI; - -/** - * Sphere.java - * - * - * Created 23-dec-2003 - * @author Erik Duijs - */ -public class Sphere extends Quadric { - - /** - * Constructor - */ - public Sphere() { - super(); - } - - /** - * 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 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 - - float rho, drho, theta, dtheta; - float x, y, z; - float s, t, ds, dt; - int i, j, imin, imax; - boolean normals; - float nsign; - - normals = super.normals != GLU_NONE; - - if (super.orientation == GLU_INSIDE) { - nsign = -1.0f; - } else { - nsign = 1.0f; - } - - drho = PI / stacks; - dtheta = 2.0f * PI / slices; - - if (super.drawStyle == GLU_FILL) { - if (!super.textureFlag) { - // draw +Z end as a triangle fan - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0f, 0.0f, 1.0f); - glVertex3f(0.0f, 0.0f, nsign * radius); - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0f : j * dtheta; - x = -sin(theta) * sin(drho); - y = cos(theta) * sin(drho); - z = nsign * cos(drho); - if (normals) { - glNormal3f(x * nsign, y * nsign, z * nsign); - } - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - - ds = 1.0f / slices; - dt = 1.0f / stacks; - t = 1.0f; // because loop now runs from 0 - if (super.textureFlag) { - imin = 0; - imax = stacks; - } else { - imin = 1; - imax = stacks - 1; - } - - // draw intermediate stacks as quad strips - for (i = imin; i < imax; i++) { - rho = i * drho; - glBegin(GL_QUAD_STRIP); - s = 0.0f; - for (j = 0; j <= slices; j++) { - theta = (j == slices) ? 0.0f : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - if (normals) { - glNormal3f(x * nsign, y * nsign, z * nsign); - } - TXTR_COORD(s, t); - glVertex3f(x * radius, y * radius, z * radius); - x = -sin(theta) * sin(rho + drho); - y = cos(theta) * sin(rho + drho); - z = nsign * cos(rho + drho); - if (normals) { - glNormal3f(x * nsign, y * nsign, z * nsign); - } - TXTR_COORD(s, t - dt); - s += ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - t -= dt; - } - - if (!super.textureFlag) { - // draw -Z end as a triangle fan - glBegin(GL_TRIANGLE_FAN); - glNormal3f(0.0f, 0.0f, -1.0f); - glVertex3f(0.0f, 0.0f, -radius * nsign); - rho = PI - drho; - s = 1.0f; - for (j = slices; j >= 0; j--) { - theta = (j == slices) ? 0.0f : j * dtheta; - x = -sin(theta) * sin(rho); - y = cos(theta) * sin(rho); - z = nsign * cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - s -= ds; - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } else if ( - super.drawStyle == GLU_LINE - || super.drawStyle == GLU_SILHOUETTE) { - // draw stack lines - for (i = 1; - i < stacks; - i++) { // stack line at i==stacks-1 was missing here - rho = i * drho; - glBegin(GL_LINE_LOOP); - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - // draw slice lines - for (j = 0; j < slices; j++) { - theta = j * dtheta; - glBegin(GL_LINE_STRIP); - for (i = 0; i <= stacks; i++) { - rho = i * drho; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - glEnd(); - } - } else if (super.drawStyle == GLU_POINT) { - // top and bottom-most points - glBegin(GL_POINTS); - if (normals) - glNormal3f(0.0f, 0.0f, nsign); - glVertex3f(0.0f, 0.0f, radius); - if (normals) - glNormal3f(0.0f, 0.0f, -nsign); - glVertex3f(0.0f, 0.0f, -radius); - - // loop over stacks - for (i = 1; i < stacks - 1; i++) { - rho = i * drho; - for (j = 0; j < slices; j++) { - theta = j * dtheta; - x = cos(theta) * sin(rho); - y = sin(theta) * sin(rho); - z = cos(rho); - if (normals) - glNormal3f(x * nsign, y * nsign, z * nsign); - glVertex3f(x * radius, y * radius, z * radius); - } - } - glEnd(); - } - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/Util.java b/LWJGL/src/main/java/org/lwjgl/util/glu/Util.java deleted file mode 100644 index 0ecbaec1..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/Util.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * 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.glu; - -import static org.lwjgl.opengl.GL11.GL_ALPHA; -import static org.lwjgl.opengl.GL11.GL_BITMAP; -import static org.lwjgl.opengl.GL11.GL_BLUE; -import static org.lwjgl.opengl.GL11.GL_BYTE; -import static org.lwjgl.opengl.GL11.GL_COLOR_INDEX; -import static org.lwjgl.opengl.GL11.GL_DEPTH_COMPONENT; -import static org.lwjgl.opengl.GL11.GL_FLOAT; -import static org.lwjgl.opengl.GL11.GL_GREEN; -import static org.lwjgl.opengl.GL11.GL_INT; -import static org.lwjgl.opengl.GL11.GL_LUMINANCE; -import static org.lwjgl.opengl.GL11.GL_LUMINANCE_ALPHA; -import static org.lwjgl.opengl.GL11.GL_RED; -import static org.lwjgl.opengl.GL11.GL_RGB; -import static org.lwjgl.opengl.GL11.GL_RGBA; -import static org.lwjgl.opengl.GL11.GL_SHORT; -import static org.lwjgl.opengl.GL11.GL_STENCIL_INDEX; -import static org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE; -import static org.lwjgl.opengl.GL11.GL_UNSIGNED_INT; -import static org.lwjgl.opengl.GL11.GL_UNSIGNED_SHORT; -import static org.lwjgl.opengl.GL11.glGetInteger; -import static org.lwjgl.opengl.GL12.GL_BGR; -import static org.lwjgl.opengl.GL12.GL_BGRA; - -import org.lwjgl.BufferUtils; - -import java.nio.IntBuffer; - -/** - * Util.java - *

    - *

    - * Created 7-jan-2004 - * - * @author Erik Duijs - */ -public class Util { - - /** - * temp IntBuffer of one for getting an int from some GL functions - */ - private static IntBuffer scratch = BufferUtils.createIntBuffer(16); - - /** - * Return ceiling of integer division - * - * @param a - * @param b - * - * @return int - */ - protected static int ceil(int a, int b) { - return (a % b == 0 ? a / b : a / b + 1); - } - - /** - * Normalize vector - * - * @param v - * - * @return float[] - */ - protected static float[] normalize(float[] v) { - float r; - - r = (float)Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - if ( r == 0.0 ) - return v; - - r = 1.0f / r; - - v[0] *= r; - v[1] *= r; - v[2] *= r; - - return v; - } - - /** - * Calculate cross-product - * - * @param v1 - * @param v2 - * @param result - */ - protected static void cross(float[] v1, float[] v2, float[] result) { - result[0] = v1[1] * v2[2] - v1[2] * v2[1]; - result[1] = v1[2] * v2[0] - v1[0] * v2[2]; - result[2] = v1[0] * v2[1] - v1[1] * v2[0]; - } - - /** - * Method compPerPix. - * - * @param format - * - * @return int - */ - protected static int compPerPix(int format) { - /* Determine number of components per pixel */ - switch ( format ) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - return 1; - case GL_LUMINANCE_ALPHA: - return 2; - case GL_RGB: - case GL_BGR: - return 3; - case GL_RGBA: - case GL_BGRA: - return 4; - default : - return -1; - } - } - - /** - * Method nearestPower. - *

    - * Compute the nearest power of 2 number. This algorithm is a little strange, but it works quite well. - * - * @param value - * - * @return int - */ - protected static int nearestPower(int value) { - int i; - - i = 1; - - /* Error! */ - if ( value == 0 ) - return -1; - - for ( ; ; ) { - if ( value == 1 ) { - return i; - } else if ( value == 3 ) { - return i << 2; - } - value >>= 1; - i <<= 1; - } - } - - /** - * Method bytesPerPixel. - * - * @param format - * @param type - * - * @return int - */ - protected static int bytesPerPixel(int format, int type) { - int n, m; - - switch ( format ) { - case GL_COLOR_INDEX: - case GL_STENCIL_INDEX: - case GL_DEPTH_COMPONENT: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - n = 1; - break; - case GL_LUMINANCE_ALPHA: - n = 2; - break; - case GL_RGB: - case GL_BGR: - n = 3; - break; - case GL_RGBA: - case GL_BGRA: - n = 4; - break; - default : - n = 0; - } - - switch ( type ) { - case GL_UNSIGNED_BYTE: - m = 1; - break; - case GL_BYTE: - m = 1; - break; - case GL_BITMAP: - m = 1; - break; - case GL_UNSIGNED_SHORT: - m = 2; - break; - case GL_SHORT: - m = 2; - break; - case GL_UNSIGNED_INT: - m = 4; - break; - case GL_INT: - m = 4; - break; - case GL_FLOAT: - m = 4; - break; - default : - m = 0; - } - - return n * m; - } - - /** - * Convenience method for returning an int, rather than getting it out of a buffer yourself. - * - * @param what - * - * @return int - */ - protected static int glGetIntegerv(int what) { - scratch.rewind(); - glGetInteger(what, scratch); - return scratch.get(); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java deleted file mode 100644 index 7b566ec0..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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 */ - 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) */ -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/CachedVertex.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/CachedVertex.java deleted file mode 100644 index d6954760..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/CachedVertex.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - -class CachedVertex { - public double[] coords = new double[3]; - public Object data; -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Dict.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Dict.java deleted file mode 100644 index 55c33209..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Dict.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - -class Dict { - DictNode head; - Object frame; - DictLeq leq; - - private Dict() { - } - - static Dict dictNewDict(Object frame, DictLeq leq) { - Dict dict = new Dict(); - dict.head = new DictNode(); - - dict.head.key = null; - dict.head.next = dict.head; - dict.head.prev = dict.head; - - dict.frame = frame; - dict.leq = leq; - - return dict; - } - - static void dictDeleteDict(Dict dict) { - dict.head = null; - dict.frame = null; - dict.leq = null; - } - - static DictNode dictInsert(Dict dict, Object key) { - return dictInsertBefore(dict, dict.head, key); - } - - static DictNode dictInsertBefore(Dict dict, DictNode node, Object key) { - do { - node = node.prev; - } while (node.key != null && !dict.leq.leq(dict.frame, node.key, key)); - - DictNode newNode = new DictNode(); - newNode.key = key; - newNode.next = node.next; - node.next.prev = newNode; - newNode.prev = node; - node.next = newNode; - - return newNode; - } - - static Object dictKey(DictNode aNode) { - return aNode.key; - } - - static DictNode dictSucc(DictNode aNode) { - return aNode.next; - } - - static DictNode dictPred(DictNode aNode) { - return aNode.prev; - } - - static DictNode dictMin(Dict aDict) { - return aDict.head.next; - } - - static DictNode dictMax(Dict aDict) { - return aDict.head.prev; - } - - static void dictDelete(Dict dict, DictNode node) { - node.next.prev = node.prev; - node.prev.next = node.next; - } - - static DictNode dictSearch(Dict dict, Object key) { - DictNode node = dict.head; - - do { - node = node.next; - } while (node.key != null && !(dict.leq.leq(dict.frame, key, node.key))); - - return node; - } - - public interface DictLeq { - boolean leq(Object frame, Object key1, Object key2); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/DictNode.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/DictNode.java deleted file mode 100644 index ec93eb5b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/DictNode.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - -class DictNode { - Object key; - DictNode next; - DictNode prev; -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUface.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUface.java deleted file mode 100644 index 40ba208a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUface.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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 */ - public Object data; /* room for client's data */ - - /* Internal data (keep hidden) */ - public GLUface trail; /* "stack" for conversion to strips */ - public boolean marked; /* flag for conversion to strips */ - public boolean inside; /* this face is in the polygon interior */ -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java deleted file mode 100644 index 65824c63..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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 */ - public GLUhalfEdge Lnext; /* next edge CCW around left face */ - public GLUvertex Org; /* origin vertex (Overtex too long) */ - public GLUface Lface; /* left face */ - - /* Internal data (keep hidden) */ - public ActiveRegion activeRegion; /* a region with this upper edge (sweep.c) */ - public int winding; /* change in winding number when crossing */ - public boolean first; - - GLUhalfEdge(boolean first) { - this.first = first; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUmesh.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUmesh.java deleted file mode 100644 index 3aa41edb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUmesh.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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 */ - GLUhalfEdge eHeadSym = new GLUhalfEdge(false); /* and its symmetric counterpart */ -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java deleted file mode 100644 index 9edcb163..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java +++ /dev/null @@ -1,697 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - -import static org.lwjgl.util.glu.GLU.GLU_INVALID_ENUM; -import static org.lwjgl.util.glu.GLU.GLU_INVALID_VALUE; -import static org.lwjgl.util.glu.GLU.GLU_OUT_OF_MEMORY; -import static org.lwjgl.util.glu.GLU.GLU_TESS_BEGIN; -import static org.lwjgl.util.glu.GLU.GLU_TESS_BEGIN_DATA; -import static org.lwjgl.util.glu.GLU.GLU_TESS_BOUNDARY_ONLY; -import static org.lwjgl.util.glu.GLU.GLU_TESS_COMBINE; -import static org.lwjgl.util.glu.GLU.GLU_TESS_COMBINE_DATA; -import static org.lwjgl.util.glu.GLU.GLU_TESS_COORD_TOO_LARGE; -import static org.lwjgl.util.glu.GLU.GLU_TESS_EDGE_FLAG; -import static org.lwjgl.util.glu.GLU.GLU_TESS_EDGE_FLAG_DATA; -import static org.lwjgl.util.glu.GLU.GLU_TESS_END; -import static org.lwjgl.util.glu.GLU.GLU_TESS_END_DATA; -import static org.lwjgl.util.glu.GLU.GLU_TESS_ERROR; -import static org.lwjgl.util.glu.GLU.GLU_TESS_ERROR_DATA; -import static org.lwjgl.util.glu.GLU.GLU_TESS_MAX_COORD; -import static org.lwjgl.util.glu.GLU.GLU_TESS_MISSING_BEGIN_CONTOUR; -import static org.lwjgl.util.glu.GLU.GLU_TESS_MISSING_BEGIN_POLYGON; -import static org.lwjgl.util.glu.GLU.GLU_TESS_MISSING_END_CONTOUR; -import static org.lwjgl.util.glu.GLU.GLU_TESS_MISSING_END_POLYGON; -import static org.lwjgl.util.glu.GLU.GLU_TESS_TOLERANCE; -import static org.lwjgl.util.glu.GLU.GLU_TESS_VERTEX; -import static org.lwjgl.util.glu.GLU.GLU_TESS_VERTEX_DATA; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_ABS_GEQ_TWO; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_NEGATIVE; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_NONZERO; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_ODD; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_POSITIVE; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_RULE; - -import org.lwjgl.util.glu.GLUtessellator; -import org.lwjgl.util.glu.GLUtessellatorCallback; -import org.lwjgl.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 */ - - /*** state needed for projecting onto the sweep plane ***/ - - double[] normal = new double[3]; /* user-specified normal (if provided) */ - double[] sUnit = new double[3]; /* unit vector in s-direction (debugging) */ - double[] tUnit = new double[3]; /* unit vector in t-direction (debugging) */ - - /*** state needed for the line sweep ***/ - - private double relTolerance; /* tolerance for merging features */ - int windingRule; /* rule for determining polygon interior */ - boolean fatalError; /* fatal error: needed combine callback */ - - Dict dict; /* edge dictionary for sweep line */ - PriorityQ pq; /* priority queue of vertex events */ - GLUvertex event; /* current sweep event being processed */ - - /*** state needed for rendering callbacks (see render.c) ***/ - - boolean flagBoundary; /* mark boundary edges (use EdgeFlag) */ - boolean boundaryOnly; /* Extract contours, not triangles */ - GLUface lonelyTriList; - /* list of triangles which could not be rendered as strips or fans */ - - - - /*** state needed to cache single-contour polygons for renderCache() */ - - private boolean flushCacheOnNextVertex; /* empty cache on next vertex() call */ - int cacheCount; /* number of cached vertices */ - CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE]; /* the vertex 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 callError; - private GLUtessellatorCallback callCombine; - - private GLUtessellatorCallback callBeginData; - private GLUtessellatorCallback callEdgeFlagData; - private GLUtessellatorCallback callVertexData; - private GLUtessellatorCallback callEndData; -// 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 GLUtessellatorCallback NULL_CB = new GLUtessellatorCallbackAdapter(); - -// #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ -// MAX(sizeof(GLUvertex),sizeof(GLUface)))) - - public GLUtessellatorImpl() { - state = TessState.T_DORMANT; - - normal[0] = 0; - normal[1] = 0; - normal[2] = 0; - - relTolerance = GLU_TESS_DEFAULT_TOLERANCE; - windingRule = GLU_TESS_WINDING_ODD; - flagBoundary = false; - boundaryOnly = false; - - callBegin = NULL_CB; - callEdgeFlag = NULL_CB; - callVertex = NULL_CB; - callEnd = NULL_CB; - callError = NULL_CB; - callCombine = NULL_CB; -// callMesh = NULL_CB; - - callBeginData = NULL_CB; - callEdgeFlagData = NULL_CB; - callVertexData = NULL_CB; - callEndData = NULL_CB; - callErrorData = NULL_CB; - callCombineData = NULL_CB; - - polygonData = null; - - for (int i = 0; i < cache.length; i++) { - cache[i] = new CachedVertex(); - } - } - - public static GLUtessellator gluNewTess() - { - return new GLUtessellatorImpl(); - } - - - private void makeDormant() { - /* Return the tessellator to its original dormant state. */ - - if (mesh != null) { - Mesh.__gl_meshDeleteMesh(mesh); - } - state = TessState.T_DORMANT; - lastEdge = null; - mesh = null; - } - - private void requireState(int newState) { - if (state != newState) gotoState(newState); - } - - private void gotoState(int newState) { - while (state != newState) { - /* We change the current state one level at a time, to get to - * the desired state. - */ - if (state < newState) { - if (state == TessState.T_DORMANT) { - callErrorOrErrorData(GLU_TESS_MISSING_BEGIN_POLYGON); - gluTessBeginPolygon(null); - } else if (state == TessState.T_IN_POLYGON) { - callErrorOrErrorData(GLU_TESS_MISSING_BEGIN_CONTOUR); - gluTessBeginContour(); - } - } else { - if (state == TessState.T_IN_CONTOUR) { - callErrorOrErrorData(GLU_TESS_MISSING_END_CONTOUR); - gluTessEndContour(); - } else if (state == TessState.T_IN_POLYGON) { - callErrorOrErrorData(GLU_TESS_MISSING_END_POLYGON); - /* gluTessEndPolygon( tess ) is too much work! */ - makeDormant(); - } - } - } - } - - public void gluDeleteTess() { - requireState(TessState.T_DORMANT); - } - - public void gluTessProperty(int which, double value) { - switch (which) { - case GLU_TESS_TOLERANCE: - if (value < 0.0 || value > 1.0) break; - relTolerance = value; - return; - - case GLU_TESS_WINDING_RULE: - int windingRule = (int) value; - if (windingRule != value) break; /* not an integer */ - - switch (windingRule) { - case GLU_TESS_WINDING_ODD: - case GLU_TESS_WINDING_NONZERO: - case GLU_TESS_WINDING_POSITIVE: - case GLU_TESS_WINDING_NEGATIVE: - case GLU_TESS_WINDING_ABS_GEQ_TWO: - this.windingRule = windingRule; - return; - default: - break; - } - - case GLU_TESS_BOUNDARY_ONLY: - boundaryOnly = (value != 0); - return; - - default: - callErrorOrErrorData(GLU_INVALID_ENUM); - return; - } - callErrorOrErrorData(GLU_INVALID_VALUE); - } - -/* Returns tessellator property */ - public void gluGetTessProperty(int which, double[] value, int value_offset) { - switch (which) { - case GLU_TESS_TOLERANCE: -/* tolerance should be in range [0..1] */ - assert (0.0 <= relTolerance && relTolerance <= 1.0); - value[value_offset] = relTolerance; - break; - 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); - value[value_offset] = windingRule; - break; - case GLU_TESS_BOUNDARY_ONLY: - assert (boundaryOnly == true || boundaryOnly == false); - value[value_offset] = boundaryOnly ? 1 : 0; - break; - default: - value[value_offset] = 0.0; - callErrorOrErrorData(GLU_INVALID_ENUM); - break; - } - } /* gluGetTessProperty() */ - - public void gluTessNormal(double x, double y, double z) { - normal[0] = x; - normal[1] = y; - normal[2] = z; - } - - public void gluTessCallback(int which, GLUtessellatorCallback aCallback) { - switch (which) { - case GLU_TESS_BEGIN: - callBegin = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_BEGIN_DATA: - callBeginData = aCallback == null ? NULL_CB : aCallback; - return; - 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). - */ - 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). - */ - flagBoundary = (aCallback != null); - return; - case GLU_TESS_VERTEX: - callVertex = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_VERTEX_DATA: - callVertexData = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_END: - callEnd = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_END_DATA: - callEndData = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_ERROR: - callError = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_ERROR_DATA: - callErrorData = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_COMBINE: - callCombine = aCallback == null ? NULL_CB : aCallback; - return; - case GLU_TESS_COMBINE_DATA: - callCombineData = aCallback == null ? NULL_CB : aCallback; - return; -// case GLU_TESS_MESH: -// callMesh = aCallback == null ? NULL_CB : aCallback; -// return; - default: - callErrorOrErrorData(GLU_INVALID_ENUM); - return; - } - } - - private boolean addVertex(double[] coords, Object vertexData) { - GLUhalfEdge e; - - e = lastEdge; - if (e == null) { -/* Make a self-loop (one vertex, one edge). */ - - e = Mesh.__gl_meshMakeEdge(mesh); - 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. - */ - if (Mesh.__gl_meshSplitEdge(e) == null) return false; - e = e.Lnext; - } - -/* The new vertex is now e.Org. */ - e.Org.data = vertexData; - e.Org.coords[0] = coords[0]; - 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. - */ - e.winding = 1; - e.Sym.winding = -1; - - lastEdge = e; - - return true; - } - - private void cacheVertex(double[] coords, Object vertexData) { - if (cache[cacheCount] == null) { - cache[cacheCount] = new CachedVertex(); - } - - CachedVertex v = cache[cacheCount]; - - v.data = vertexData; - v.coords[0] = coords[0]; - v.coords[1] = coords[1]; - v.coords[2] = coords[2]; - ++cacheCount; - } - - - private boolean flushCache() { - CachedVertex[] v = cache; - - mesh = Mesh.__gl_meshNewMesh(); - if (mesh == null) return false; - - for (int i = 0; i < cacheCount; i++) { - CachedVertex vertex = v[i]; - if (!addVertex(vertex.coords, vertex.data)) return false; - } - cacheCount = 0; - flushCacheOnNextVertex = false; - - return true; - } - - public void gluTessVertex(double[] coords, int coords_offset, Object vertexData) { - int i; - boolean tooLarge = false; - double x; - double[] clamped = new double[3]; - - requireState(TessState.T_IN_CONTOUR); - - if (flushCacheOnNextVertex) { - if (!flushCache()) { - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - return; - } - lastEdge = null; - } - for (i = 0; i < 3; ++i) { - x = coords[i+coords_offset]; - if (x < -GLU_TESS_MAX_COORD) { - x = -GLU_TESS_MAX_COORD; - tooLarge = true; - } - if (x > GLU_TESS_MAX_COORD) { - x = GLU_TESS_MAX_COORD; - tooLarge = true; - } - clamped[i] = x; - } - if (tooLarge) { - callErrorOrErrorData(GLU_TESS_COORD_TOO_LARGE); - } - - if (mesh == null) { - if (cacheCount < TESS_MAX_CACHE) { - cacheVertex(clamped, vertexData); - return; - } - if (!flushCache()) { - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - return; - } - } - - if (!addVertex(clamped, vertexData)) { - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - } - } - - - public void gluTessBeginPolygon(Object data) { - requireState(TessState.T_DORMANT); - - state = TessState.T_IN_POLYGON; - cacheCount = 0; - flushCacheOnNextVertex = false; - mesh = null; - - polygonData = data; - } - - - public void gluTessBeginContour() { - requireState(TessState.T_IN_POLYGON); - - 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. - */ - flushCacheOnNextVertex = true; - } - } - - - public void gluTessEndContour() { - requireState(TessState.T_IN_CONTOUR); - state = TessState.T_IN_POLYGON; - } - - public void gluTessEndPolygon() { - GLUmesh mesh; - - try { - requireState(TessState.T_IN_POLYGON); - state = TessState.T_DORMANT; - - if (this.mesh == null) { - 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. - */ - if (Render.__gl_renderCache(this)) { - polygonData = null; - return; - } - } - if (!flushCache()) throw new RuntimeException(); /* could've used a label*/ - } - -/* 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. - */ - if (!Sweep.__gl_computeInterior(this)) { - throw new RuntimeException(); /* could've used a label */ - } - - mesh = this.mesh; - 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 (boundaryOnly) { - rc = TessMono.__gl_meshSetWindingNumber(mesh, 1, true); - } else { - rc = TessMono.__gl_meshTessellateInterior(mesh); - } - if (!rc) throw new RuntimeException(); /* could've used a label */ - - Mesh.__gl_meshCheckMesh(mesh); - - if (callBegin != NULL_CB || callEnd != NULL_CB - || callVertex != NULL_CB || callEdgeFlag != NULL_CB - || callBeginData != NULL_CB - || callEndData != NULL_CB - || callVertexData != NULL_CB - || callEdgeFlagData != NULL_CB) { - if (boundaryOnly) { - Render.__gl_renderBoundary(this, mesh); /* output boundary contours */ - } else { - Render.__gl_renderMesh(this, mesh); /* output strips and fans */ - } - } -// 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; -// } - } - Mesh.__gl_meshDeleteMesh(mesh); - polygonData = null; - mesh = null; - } catch (Exception e) { - e.printStackTrace(); - callErrorOrErrorData(GLU_OUT_OF_MEMORY); - } - } - - /*******************************************************/ - -/* Obsolete calls -- for backward compatibility */ - - public void gluBeginPolygon() { - gluTessBeginPolygon(null); - gluTessBeginContour(); - } - - -/*ARGSUSED*/ - public void gluNextContour(int type) { - gluTessEndContour(); - gluTessBeginContour(); - } - - - public void gluEndPolygon() { - gluTessEndContour(); - gluTessEndPolygon(); - } - - void callBeginOrBeginData(int a) { - if (callBeginData != NULL_CB) - callBeginData.beginData(a, polygonData); - else - callBegin.begin(a); - } - - void callVertexOrVertexData(Object a) { - if (callVertexData != NULL_CB) - callVertexData.vertexData(a, polygonData); - else - callVertex.vertex(a); - } - - void callEdgeFlagOrEdgeFlagData(boolean a) { - if (callEdgeFlagData != NULL_CB) - callEdgeFlagData.edgeFlagData(a, polygonData); - else - callEdgeFlag.edgeFlag(a); - } - - void callEndOrEndData() { - if (callEndData != NULL_CB) - callEndData.endData(polygonData); - else - callEnd.end(); - } - - void callCombineOrCombineData(double[] coords, Object[] vertexData, float[] weights, Object[] outData) { - if (callCombineData != NULL_CB) - callCombineData.combineData(coords, vertexData, weights, outData, polygonData); - else - callCombine.combine(coords, vertexData, weights, outData); - } - - void callErrorOrErrorData(int a) { - if (callErrorData != NULL_CB) - callErrorData.errorData(a, polygonData); - else - callError.error(a); - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUvertex.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUvertex.java deleted file mode 100644 index 374c968c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/GLUvertex.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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 */ - public Object data; /* client's data */ - - /* Internal data (keep hidden) */ - public double[] coords = new double[3]; /* vertex location in 3D */ - public double s, t; /* projection onto the sweep plane */ - public int pqHandle; /* to allow deletion from priority queue */ -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Geom.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Geom.java deleted file mode 100644 index 23fef1fc..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Geom.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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). - */ - static double EdgeEval(GLUvertex u, GLUvertex v, GLUvertex w) { - double gapL, gapR; - - assert (VertLeq(u, v) && VertLeq(v, w)); - - gapL = v.s - u.s; - gapR = w.s - v.s; - - if (gapL + gapR > 0) { - if (gapL < gapR) { - return (v.t - u.t) + (u.t - w.t) * (gapL / (gapL + gapR)); - } else { - return (v.t - w.t) + (w.t - u.t) * (gapR / (gapL + gapR)); - } - } - /* vertical line */ - return 0; - } - - static double EdgeSign(GLUvertex u, GLUvertex v, GLUvertex w) { - double gapL, gapR; - - assert (VertLeq(u, v) && VertLeq(v, w)); - - gapL = v.s - u.s; - gapR = w.s - v.s; - - if (gapL + gapR > 0) { - return (v.t - w.t) * gapL + (v.t - u.t) * gapR; - } - /* vertical line */ - return 0; - } - - - /*********************************************************************** - * 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). - */ - double gapL, gapR; - - assert (TransLeq(u, v) && TransLeq(v, w)); - - gapL = v.t - u.t; - gapR = w.t - v.t; - - if (gapL + gapR > 0) { - if (gapL < gapR) { - return (v.s - u.s) + (u.s - w.s) * (gapL / (gapL + gapR)); - } else { - return (v.s - w.s) + (w.s - u.s) * (gapR / (gapL + gapR)); - } - } - /* vertical line */ - return 0; - } - - 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. - */ - double gapL, gapR; - - assert (TransLeq(u, v) && TransLeq(v, w)); - - gapL = v.t - u.t; - gapR = w.t - v.t; - - if (gapL + gapR > 0) { - return (v.s - w.s) * gapL + (v.s - u.s) * gapR; - } - /* vertical line */ - return 0; - } - - - 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. - */ - 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. - */ - static double Interpolate(double a, double x, double b, double y) { - a = (a < 0) ? 0 : a; - b = (b < 0) ? 0 : b; - if (a <= b) { - if (b == 0) { - return (x + y) / 2.0; - } else { - return (x + (y - x) * (a / (a + b))); - } - } else { - return (y + (x - y) * (b / (a + b))); - } - } - - 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. - */ { - 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. - */ - - if (!VertLeq(o1, d1)) { - GLUvertex temp = o1; - o1 = d1; - d1 = temp; - } - if (!VertLeq(o2, d2)) { - GLUvertex temp = o2; - o2 = d2; - d2 = temp; - } - if (!VertLeq(o1, o2)) { - GLUvertex temp = o1; - o1 = o2; - o2 = temp; - temp = d1; - d1 = d2; - d2 = temp; - } - - if (!VertLeq(o2, d1)) { - /* Technically, no intersection -- do our best */ - v.s = (o2.s + d1.s) / 2.0; - } else if (VertLeq(d1, d2)) { - /* Interpolate between o2 and d1 */ - z1 = EdgeEval(o1, o2, d1); - z2 = EdgeEval(o2, d1, d2); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.s = Interpolate(z1, o2.s, z2, d1.s); - } else { - /* Interpolate between o2 and d2 */ - z1 = EdgeSign(o1, o2, d1); - z2 = -EdgeSign(o1, d2, d1); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.s = Interpolate(z1, o2.s, z2, d2.s); - } - - /* Now repeat the process for t */ - - if (!TransLeq(o1, d1)) { - GLUvertex temp = o1; - o1 = d1; - d1 = temp; - } - if (!TransLeq(o2, d2)) { - GLUvertex temp = o2; - o2 = d2; - d2 = temp; - } - if (!TransLeq(o1, o2)) { - GLUvertex temp = o2; - o2 = o1; - o1 = temp; - temp = d2; - d2 = d1; - d1 = temp; - } - - if (!TransLeq(o2, d1)) { - /* Technically, no intersection -- do our best */ - v.t = (o2.t + d1.t) / 2.0; - } else if (TransLeq(d1, d2)) { - /* Interpolate between o2 and d1 */ - z1 = TransEval(o1, o2, d1); - z2 = TransEval(o2, d1, d2); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.t = Interpolate(z1, o2.t, z2, d1.t); - } else { - /* Interpolate between o2 and d2 */ - z1 = TransSign(o1, o2, d1); - z2 = -TransSign(o1, d2, d1); - if (z1 + z2 < 0) { - z1 = -z1; - z2 = -z2; - } - v.t = Interpolate(z1, o2.t, z2, d2.t); - } - } - - static boolean VertEq(GLUvertex u, GLUvertex v) { - return u.s == v.s && u.t == v.t; - } - - static boolean VertLeq(GLUvertex u, GLUvertex v) { - return u.s < v.s || (u.s == v.s && u.t <= v.t); - } - -/* Versions of VertLeq, EdgeSign, EdgeEval with s and t transposed. */ - - static boolean TransLeq(GLUvertex u, GLUvertex v) { - return u.t < v.t || (u.t == v.t && u.s <= v.s); - } - - static boolean EdgeGoesLeft(GLUhalfEdge e) { - return VertLeq(e.Sym.Org, e.Org); - } - - static boolean EdgeGoesRight(GLUhalfEdge e) { - return VertLeq(e.Org, e.Sym.Org); - } - - static double VertL1dist(GLUvertex u, GLUvertex v) { - return Math.abs(u.s - v.s) + Math.abs(u.t - v.t); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Mesh.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Mesh.java deleted file mode 100644 index 11d10f4d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Mesh.java +++ /dev/null @@ -1,766 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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. - */ - static GLUhalfEdge MakeEdge(GLUhalfEdge eNext) { - GLUhalfEdge e; - GLUhalfEdge eSym; - GLUhalfEdge ePrev; - -// EdgePair * pair = (EdgePair *) -// memAlloc(sizeof(EdgePair)); -// if (pair == NULL) return NULL; -// -// e = &pair - > e; - e = new GLUhalfEdge(true); -// eSym = &pair - > eSym; - eSym = new GLUhalfEdge(false); - - - /* Make sure eNext points to the first edge of the edge pair */ - if (!eNext.first) { - eNext = eNext.Sym; - } - - /* 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; - ePrev.Sym.next = e; - e.next = eNext; - eNext.Sym.next = eSym; - - e.Sym = eSym; - e.Onext = e; - e.Lnext = eSym; - e.Org = null; - e.Lface = null; - e.winding = 0; - e.activeRegion = null; - - eSym.Sym = e; - eSym.Onext = eSym; - eSym.Lnext = e; - eSym.Org = null; - eSym.Lface = null; - eSym.winding = 0; - eSym.activeRegion = null; - - 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. - */ - static void Splice(GLUhalfEdge a, GLUhalfEdge b) { - GLUhalfEdge aOnext = a.Onext; - GLUhalfEdge bOnext = b.Onext; - - aOnext.Sym.Lnext = b; - bOnext.Sym.Lnext = a; - a.Onext = bOnext; - 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. - */ - static void MakeVertex(GLUvertex newVertex, - GLUhalfEdge eOrig, GLUvertex vNext) { - GLUhalfEdge e; - GLUvertex vPrev; - GLUvertex vNew = newVertex; - - assert (vNew != null); - - /* insert in circular doubly-linked list before vNext */ - vPrev = vNext.prev; - vNew.prev = vPrev; - vPrev.next = vNew; - vNew.next = vNext; - vNext.prev = vNew; - - vNew.anEdge = eOrig; - vNew.data = null; - /* leave coords, s, t undefined */ - - /* fix other edges on this vertex loop */ - e = eOrig; - do { - e.Org = vNew; - e = e.Onext; - } 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. - */ - static void MakeFace(GLUface newFace, GLUhalfEdge eOrig, GLUface fNext) { - GLUhalfEdge e; - GLUface fPrev; - GLUface fNew = newFace; - - assert (fNew != null); - - /* insert in circular doubly-linked list before fNext */ - fPrev = fNext.prev; - fNew.prev = fPrev; - fPrev.next = fNew; - fNew.next = fNext; - fNext.prev = fNew; - - fNew.anEdge = eOrig; - fNew.data = null; - 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. - */ - fNew.inside = fNext.inside; - - /* fix other edges on this face loop */ - e = eOrig; - do { - e.Lface = fNew; - e = e.Lnext; - } while (e != eOrig); - } - -/* 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; - - /* Half-edges are allocated in pairs, see EdgePair above */ - if (!eDel.first) { - eDel = eDel.Sym; - } - - /* delete from circular doubly-linked list */ - eNext = eDel.next; - ePrev = eDel.Sym.next; - eNext.Sym.next = ePrev; - 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. - */ - static void KillVertex(GLUvertex vDel, GLUvertex newOrg) { - GLUhalfEdge e, eStart = vDel.anEdge; - GLUvertex vPrev, vNext; - - /* change the origin of all affected edges */ - e = eStart; - do { - e.Org = newOrg; - e = e.Onext; - } while (e != eStart); - - /* delete from circular doubly-linked list */ - vPrev = vDel.prev; - vNext = vDel.next; - vNext.prev = vPrev; - 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. - */ - static void KillFace(GLUface fDel, GLUface newLface) { - GLUhalfEdge e, eStart = fDel.anEdge; - GLUface fPrev, fNext; - - /* change the left face of all affected edges */ - e = eStart; - do { - e.Lface = newLface; - e = e.Lnext; - } while (e != eStart); - - /* delete from circular doubly-linked list */ - fPrev = fDel.prev; - fNext = fDel.next; - fNext.prev = fPrev; - fPrev.next = fNext; - } - - - /****************** Basic Edge Operations **********************/ - -/* __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(); - GLUvertex newVertex2 = new GLUvertex(); - GLUface newFace = new GLUface(); - GLUhalfEdge e; - - e = MakeEdge(mesh.eHead); - if (e == null) return null; - - MakeVertex(newVertex1, e, mesh.vHead); - MakeVertex(newVertex2, e.Sym, mesh.vHead); - MakeFace(newFace, e, mesh.fHead); - 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. - */ - public static boolean __gl_meshSplice(GLUhalfEdge eOrg, GLUhalfEdge eDst) { - boolean joiningLoops = false; - boolean joiningVertices = false; - - if (eOrg == eDst) return true; - - if (eDst.Org != eOrg.Org) { - /* We are merging two disjoint vertices -- destroy eDst->Org */ - joiningVertices = true; - KillVertex(eDst.Org, eOrg.Org); - } - if (eDst.Lface != eOrg.Lface) { - /* We are connecting two disjoint loops -- destroy eDst.Lface */ - joiningLoops = true; - KillFace(eDst.Lface, eOrg.Lface); - } - - /* Change the edge structure */ - Splice(eDst, eOrg); - - 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. - */ - MakeVertex(newVertex, eDst, eOrg.Org); - eOrg.Org.anEdge = eOrg; - } - 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. - */ - MakeFace(newFace, eDst, eOrg.Lface); - eOrg.Lface.anEdge = eOrg; - } - - 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. - */ - 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. - */ - if (eDel.Lface != eDel.Sym.Lface) { - /* We are joining two loops into one -- remove the left face */ - joiningLoops = true; - KillFace(eDel.Lface, eDel.Sym.Lface); - } - - if (eDel.Onext == eDel) { - KillVertex(eDel.Org, null); - } else { - /* Make sure that eDel.Org and eDel.Sym.Lface point to valid half-edges */ - eDel.Sym.Lface.anEdge = eDel.Sym.Lnext; - eDel.Org.anEdge = eDel.Onext; - - Splice(eDel, eDel.Sym.Lnext); - if (!joiningLoops) { - GLUface newFace = new GLUface(); - - /* We are splitting one loop into two -- create a new loop for eDel. */ - MakeFace(newFace, eDel, eDel.Lface); - } - } - - /* 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); - KillFace(eDelSym.Lface, null); - } else { - /* Make sure that eDel.Dst and eDel.Lface point to valid half-edges */ - eDel.Lface.anEdge = eDelSym.Sym.Lnext; - eDelSym.Org.anEdge = eDelSym.Onext; - Splice(eDelSym, eDelSym.Sym.Lnext); - } - - /* Any isolated vertices or faces have already been freed. */ - KillEdge(eDel); - - return true; - } - - - /******************** Other Edge Operations **********************/ - -/* 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. - */ - static GLUhalfEdge __gl_meshAddEdgeVertex(GLUhalfEdge eOrg) { - GLUhalfEdge eNewSym; - GLUhalfEdge eNew = MakeEdge(eOrg); - - eNewSym = eNew.Sym; - - /* Connect the new edge appropriately */ - Splice(eNew, eOrg.Lnext); - - /* Set the vertex and face information */ - eNew.Org = eOrg.Sym.Org; - { - GLUvertex newVertex = new GLUvertex(); - - MakeVertex(newVertex, eNewSym, eNew.Org); - } - eNew.Lface = eNewSym.Lface = eOrg.Lface; - - 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. - */ - public static GLUhalfEdge __gl_meshSplitEdge(GLUhalfEdge eOrg) { - GLUhalfEdge eNew; - GLUhalfEdge tempHalfEdge = __gl_meshAddEdgeVertex(eOrg); - - eNew = tempHalfEdge.Sym; - - /* Disconnect eOrg from eOrg.Sym.Org and connect it to eNew.Org */ - Splice(eOrg.Sym, eOrg.Sym.Sym.Lnext); - Splice(eOrg.Sym, eNew); - - /* Set the vertex and face information */ - eOrg.Sym.Org = eNew.Org; - eNew.Sym.Org.anEdge = eNew.Sym; /* may have pointed to eOrg.Sym */ - eNew.Sym.Lface = eOrg.Sym.Lface; - eNew.winding = eOrg.winding; /* copy old winding information */ - eNew.Sym.winding = eOrg.Sym.winding; - - 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. - * If (eOrg.Lnext.Lnext == eDst), the old face is reduced to two edges. - */ - static GLUhalfEdge __gl_meshConnect(GLUhalfEdge eOrg, GLUhalfEdge eDst) { - GLUhalfEdge eNewSym; - boolean joiningLoops = false; - GLUhalfEdge eNew = MakeEdge(eOrg); - - eNewSym = eNew.Sym; - - if (eDst.Lface != eOrg.Lface) { - /* We are connecting two disjoint loops -- destroy eDst.Lface */ - joiningLoops = true; - KillFace(eDst.Lface, eOrg.Lface); - } - - /* Connect the new edge appropriately */ - Splice(eNew, eOrg.Lnext); - Splice(eNewSym, eDst); - - /* Set the vertex and face information */ - eNew.Org = eOrg.Sym.Org; - eNewSym.Org = eDst.Org; - eNew.Lface = eNewSym.Lface = eOrg.Lface; - - /* Make sure the old face points to a valid half-edge */ - eOrg.Lface.anEdge = eNewSym; - - if (!joiningLoops) { - GLUface newFace = new GLUface(); - - /* We split one loop into two -- the new loop is eNew.Lface */ - MakeFace(newFace, eNew, eOrg.Lface); - } - return eNew; - } - - - /******************** 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! - */ - static void __gl_meshZapFace(GLUface fZap) { - GLUhalfEdge eStart = fZap.anEdge; - GLUhalfEdge e, eNext, eSym; - GLUface fPrev, fNext; - - /* walk around face, deleting edges whose right face is also null */ - eNext = eStart.Lnext; - do { - e = eNext; - eNext = e.Lnext; - - e.Lface = null; - if (e.Sym.Lface == null) { - /* delete the edge -- see __gl_MeshDelete above */ - - if (e.Onext == e) { - KillVertex(e.Org, null); - } else { - /* Make sure that e.Org points to a valid half-edge */ - e.Org.anEdge = e.Onext; - Splice(e, e.Sym.Lnext); - } - eSym = e.Sym; - if (eSym.Onext == eSym) { - KillVertex(eSym.Org, null); - } else { - /* Make sure that eSym.Org points to a valid half-edge */ - eSym.Org.anEdge = eSym.Onext; - Splice(eSym, eSym.Sym.Lnext); - } - KillEdge(e); - } - } while (e != eStart); - - /* delete from circular doubly-linked list */ - fPrev = fZap.prev; - fNext = fZap.next; - fNext.prev = fPrev; - fPrev.next = fNext; - } - - -/* __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; - GLUface f; - GLUhalfEdge e; - GLUhalfEdge eSym; - GLUmesh mesh = new GLUmesh(); - - v = mesh.vHead; - f = mesh.fHead; - e = mesh.eHead; - eSym = mesh.eHeadSym; - - v.next = v.prev = v; - v.anEdge = null; - v.data = null; - - f.next = f.prev = f; - f.anEdge = null; - f.data = null; - f.trail = null; - f.marked = false; - f.inside = false; - - e.next = e; - e.Sym = eSym; - e.Onext = null; - e.Lnext = null; - e.Org = null; - e.Lface = null; - e.winding = 0; - e.activeRegion = null; - - eSym.next = eSym; - eSym.Sym = e; - eSym.Onext = null; - eSym.Lnext = null; - eSym.Org = null; - eSym.Lface = null; - eSym.winding = 0; - eSym.activeRegion = null; - - 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). - */ - static GLUmesh __gl_meshUnion(GLUmesh mesh1, GLUmesh mesh2) { - GLUface f1 = mesh1.fHead; - GLUvertex v1 = mesh1.vHead; - GLUhalfEdge e1 = mesh1.eHead; - GLUface f2 = mesh2.fHead; - GLUvertex v2 = mesh2.vHead; - GLUhalfEdge e2 = mesh2.eHead; - - /* Add the faces, vertices, and edges of mesh2 to those of mesh1 */ - if (f2.next != f2) { - f1.prev.next = f2.next; - f2.next.prev = f1.prev; - f2.prev.next = f1; - f1.prev = f2.prev; - } - - if (v2.next != v2) { - v1.prev.next = v2.next; - v2.next.prev = v1.prev; - v2.prev.next = v1; - v1.prev = v2.prev; - } - - if (e2.next != e2) { - e1.Sym.next.Sym.next = e2.next; - e2.next.Sym.next = e1.Sym.next; - e2.Sym.next.Sym.next = e1; - e1.Sym.next = e2.Sym.next; - } - - return mesh1; - } - - -/* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. - */ - static void __gl_meshDeleteMeshZap(GLUmesh mesh) { - GLUface fHead = mesh.fHead; - - while (fHead.next != fHead) { - __gl_meshZapFace(fHead.next); - } - assert (mesh.vHead.next == mesh.vHead); - } - -/* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. - */ - public static void __gl_meshDeleteMesh(GLUmesh mesh) { - GLUface f, fNext; - GLUvertex v, vNext; - GLUhalfEdge e, eNext; - - for (f = mesh.fHead.next; f != mesh.fHead; f = fNext) { - fNext = f.next; - } - - for (v = mesh.vHead.next; v != mesh.vHead; v = vNext) { - vNext = v.next; - } - - for (e = mesh.eHead.next; e != mesh.eHead; e = eNext) { - /* One call frees both e and e.Sym (see EdgePair above) */ - eNext = e.next; - } - } - -/* __gl_meshCheckMesh( mesh ) checks a mesh for self-consistency. - */ - public static void __gl_meshCheckMesh(GLUmesh mesh) { - GLUface fHead = mesh.fHead; - GLUvertex vHead = mesh.vHead; - GLUhalfEdge eHead = mesh.eHead; - GLUface f, fPrev; - GLUvertex v, vPrev; - GLUhalfEdge e, ePrev; - - fPrev = fHead; - for (fPrev = fHead; (f = fPrev.next) != fHead; fPrev = f) { - assert (f.prev == fPrev); - e = f.anEdge; - do { - assert (e.Sym != e); - assert (e.Sym.Sym == e); - assert (e.Lnext.Onext.Sym == e); - assert (e.Onext.Sym.Lnext == e); - assert (e.Lface == f); - e = e.Lnext; - } while (e != f.anEdge); - } - assert (f.prev == fPrev && f.anEdge == null && f.data == null); - - vPrev = vHead; - for (vPrev = vHead; (v = vPrev.next) != vHead; vPrev = v) { - assert (v.prev == vPrev); - e = v.anEdge; - do { - assert (e.Sym != e); - assert (e.Sym.Sym == e); - assert (e.Lnext.Onext.Sym == e); - assert (e.Onext.Sym.Lnext == e); - assert (e.Org == v); - e = e.Onext; - } while (e != v.anEdge); - } - assert (v.prev == vPrev && v.anEdge == null && v.data == null); - - ePrev = eHead; - for (ePrev = eHead; (e = ePrev.next) != eHead; ePrev = e) { - assert (e.Sym.next == ePrev.Sym); - assert (e.Sym != e); - assert (e.Sym.Sym == e); - assert (e.Org != null); - assert (e.Sym.Org != null); - assert (e.Lnext.Onext.Sym == e); - assert (e.Onext.Sym.Lnext == e); - } - assert (e.Sym.next == ePrev.Sym - && e.Sym == mesh.eHeadSym - && e.Sym.Sym == e - && e.Org == null && e.Sym.Org == null - && e.Lface == null && e.Sym.Lface == null); - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Normal.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Normal.java deleted file mode 100644 index 334081a7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Normal.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - -import org.lwjgl.util.glu.GLU; - -class Normal { - private Normal() { - } - - static boolean SLANTED_SWEEP; - static double S_UNIT_X; /* Pre-normalized */ - static double S_UNIT_Y; - private static final boolean TRUE_PROJECT = false; - - 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). - */ - S_UNIT_X = 0.50941539564955385; /* Pre-normalized */ - S_UNIT_Y = 0.86052074622010633; - } else { - S_UNIT_X = 1.0; - S_UNIT_Y = 0.0; - } - } - - private static double Dot(double[] u, double[] v) { - return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]); - } - - static void Normalize(double[] v) { - double len = v[0] * v[0] + v[1] * v[1] + v[2] * v[2]; - - assert (len > 0); - len = Math.sqrt(len); - v[0] /= len; - v[1] /= len; - v[2] /= len; - } - - static int LongAxis(double[] v) { - int i = 0; - - if (Math.abs(v[1]) > Math.abs(v[0])) { - i = 1; - } - if (Math.abs(v[2]) > Math.abs(v[i])) { - i = 2; - } - return i; - } - - static void ComputeNormal(GLUtessellatorImpl tess, double[] norm) { - GLUvertex v, v1, v2; - double c, tLen2, maxLen2; - double[] maxVal, minVal, d1, d2, tNorm; - GLUvertex[] maxVert, minVert; - GLUvertex vHead = tess.mesh.vHead; - int i; - - maxVal = new double[3]; - minVal = new double[3]; - minVert = new GLUvertex[3]; - maxVert = new GLUvertex[3]; - d1 = new double[3]; - d2 = new double[3]; - tNorm = new double[3]; - - maxVal[0] = maxVal[1] = maxVal[2] = -2 * GLU.TESS_MAX_COORD; - minVal[0] = minVal[1] = minVal[2] = 2 * GLU.TESS_MAX_COORD; - - for (v = vHead.next; v != vHead; v = v.next) { - for (i = 0; i < 3; ++i) { - c = v.coords[i]; - if (c < minVal[i]) { - minVal[i] = c; - minVert[i] = v; - } - if (c > maxVal[i]) { - maxVal[i] = c; - maxVert[i] = v; - } - } - } - -/* 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]) { - i = 1; - } - if (maxVal[2] - minVal[2] > maxVal[i] - minVal[i]) { - i = 2; - } - if (minVal[i] >= maxVal[i]) { -/* All vertices are the same -- normal doesn't matter */ - norm[0] = 0; - norm[1] = 0; - norm[2] = 1; - return; - } - -/* Look for a third vertex which forms the triangle with maximum area - * (Length of normal == twice the triangle area) - */ - maxLen2 = 0; - v1 = minVert[i]; - v2 = maxVert[i]; - d1[0] = v1.coords[0] - v2.coords[0]; - d1[1] = v1.coords[1] - v2.coords[1]; - d1[2] = v1.coords[2] - v2.coords[2]; - for (v = vHead.next; v != vHead; v = v.next) { - d2[0] = v.coords[0] - v2.coords[0]; - d2[1] = v.coords[1] - v2.coords[1]; - d2[2] = v.coords[2] - v2.coords[2]; - tNorm[0] = d1[1] * d2[2] - d1[2] * d2[1]; - tNorm[1] = d1[2] * d2[0] - d1[0] * d2[2]; - tNorm[2] = d1[0] * d2[1] - d1[1] * d2[0]; - tLen2 = tNorm[0] * tNorm[0] + tNorm[1] * tNorm[1] + tNorm[2] * tNorm[2]; - if (tLen2 > maxLen2) { - maxLen2 = tLen2; - norm[0] = tNorm[0]; - norm[1] = tNorm[1]; - norm[2] = tNorm[2]; - } - } - - if (maxLen2 <= 0) { -/* All points lie on a single line -- any decent normal will do */ - norm[0] = norm[1] = norm[2] = 0; - norm[LongAxis(d1)] = 1; - } - } - - static void CheckOrientation(GLUtessellatorImpl tess) { - double area; - GLUface f, fHead = tess.mesh.fHead; - 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. - */ - area = 0; - for (f = fHead.next; f != fHead; f = f.next) { - e = f.anEdge; - if (e.winding <= 0) continue; - do { - area += (e.Org.s - e.Sym.Org.s) * (e.Org.t + e.Sym.Org.t); - e = e.Lnext; - } while (e != f.anEdge); - } - if (area < 0) { -/* Reverse the orientation by flipping all the t-coordinates */ - for (v = vHead.next; v != vHead; v = v.next) { - v.t = -v.t; - } - tess.tUnit[0] = -tess.tUnit[0]; - tess.tUnit[1] = -tess.tUnit[1]; - tess.tUnit[2] = -tess.tUnit[2]; - } - } - -/* 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; - double w; - double[] norm = new double[3]; - double[] sUnit, tUnit; - int i; - boolean computedNormal = false; - - norm[0] = tess.normal[0]; - norm[1] = tess.normal[1]; - norm[2] = tess.normal[2]; - if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) { - ComputeNormal(tess, norm); - computedNormal = true; - } - sUnit = tess.sUnit; - tUnit = tess.tUnit; - i = LongAxis(norm); - - if (TRUE_PROJECT) { -/* Choose the initial sUnit vector to be approximately perpendicular - * to the normal. - */ - Normalize(norm); - - sUnit[i] = 0; - sUnit[(i + 1) % 3] = S_UNIT_X; - sUnit[(i + 2) % 3] = S_UNIT_Y; - -/* Now make it exactly perpendicular */ - w = Dot(sUnit, norm); - sUnit[0] -= w * norm[0]; - sUnit[1] -= w * norm[1]; - sUnit[2] -= w * norm[2]; - Normalize(sUnit); - -/* Choose tUnit so that (sUnit,tUnit,norm) form a right-handed frame */ - tUnit[0] = norm[1] * sUnit[2] - norm[2] * sUnit[1]; - tUnit[1] = norm[2] * sUnit[0] - norm[0] * sUnit[2]; - tUnit[2] = norm[0] * sUnit[1] - norm[1] * sUnit[0]; - Normalize(tUnit); - } else { -/* Project perpendicular to a coordinate axis -- better numerically */ - sUnit[i] = 0; - sUnit[(i + 1) % 3] = S_UNIT_X; - sUnit[(i + 2) % 3] = S_UNIT_Y; - - tUnit[i] = 0; - tUnit[(i + 1) % 3] = (norm[i] > 0) ? -S_UNIT_Y : S_UNIT_Y; - tUnit[(i + 2) % 3] = (norm[i] > 0) ? S_UNIT_X : -S_UNIT_X; - } - -/* Project the vertices onto the sweep plane */ - for (v = vHead.next; v != vHead; v = v.next) { - v.s = Dot(v.coords, sUnit); - v.t = Dot(v.coords, tUnit); - } - if (computedNormal) { - CheckOrientation(tess); - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQ.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQ.java deleted file mode 100644 index 92bee823..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQ.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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 -/* Violates modularity, but a little faster */ -// #include "geom.h" - public static boolean LEQ(Leq leq, Object x, Object y) { - return Geom.VertLeq((GLUvertex) x, (GLUvertex) y); - } - - static PriorityQ pqNewPriorityQ(Leq leq) { - return new PriorityQSort(leq); - } - - abstract void pqDeletePriorityQ(); - - abstract boolean pqInit(); - - abstract int pqInsert(Object keyNew); - - abstract Object pqExtractMin(); - - abstract void pqDelete(int hCurr); - - abstract Object pqMinimum(); - - abstract boolean pqIsEmpty(); -// #endif -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java deleted file mode 100644 index 6b3ee111..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - - - -class PriorityQHeap extends PriorityQ { - PQnode[] nodes; - PQhandleElem[] handles; - int size, max; - int freeList; - boolean initialized; - Leq leq; - -/* really __gl_pqHeapNewPriorityQ */ -PriorityQHeap(Leq leq) { - size = 0; - max = PriorityQ.INIT_SIZE; - nodes = new PQnode[PriorityQ.INIT_SIZE + 1]; - for (int i = 0; i < nodes.length; i++) { - nodes[i] = new PQnode(); - } - handles = new PQhandleElem[PriorityQ.INIT_SIZE + 1]; - for (int i = 0; i < handles.length; i++) { - handles[i] = new PQhandleElem(); - } - initialized = false; - freeList = 0; - this.leq = leq; - - nodes[1].handle = 1; /* so that Minimum() returns NULL */ - handles[1].key = null; - } - -/* really __gl_pqHeapDeletePriorityQ */ - void pqDeletePriorityQ() { - handles = null; - nodes = null; - } - - void FloatDown(int curr) { - PQnode[] n = nodes; - PQhandleElem[] h = handles; - int hCurr, hChild; - int child; - - hCurr = n[curr].handle; - for (; ;) { - child = curr << 1; - if (child < size && LEQ(leq, h[n[child + 1].handle].key, - h[n[child].handle].key)) { - ++child; - } - - assert (child <= max); - - hChild = n[child].handle; - if (child > size || LEQ(leq, h[hCurr].key, h[hChild].key)) { - n[curr].handle = hCurr; - h[hCurr].node = curr; - break; - } - n[curr].handle = hChild; - h[hChild].node = curr; - curr = child; - } - } - - - void FloatUp(int curr) { - PQnode[] n = nodes; - PQhandleElem[] h = handles; - int hCurr, hParent; - int parent; - - hCurr = n[curr].handle; - for (; ;) { - parent = curr >> 1; - hParent = n[parent].handle; - if (parent == 0 || LEQ(leq, h[hParent].key, h[hCurr].key)) { - n[curr].handle = hCurr; - h[hCurr].node = curr; - break; - } - n[curr].handle = hParent; - h[hParent].node = curr; - curr = parent; - } - } - -/* really __gl_pqHeapInit */ - boolean pqInit() { - int i; - - /* This method of building a heap is O(n), rather than O(n lg n). */ - - for (i = size; i >= 1; --i) { - FloatDown(i); - } - initialized = true; - - return true; - } - -/* really __gl_pqHeapInsert */ -/* returns LONG_MAX iff out of memory */ - int pqInsert(Object keyNew) { - int curr; - int free; - - curr = ++size; - if ((curr * 2) > max) { - PQnode[] saveNodes = nodes; - PQhandleElem[] saveHandles = handles; - - /* If the heap overflows, double its size. */ - max <<= 1; -// pq->nodes = (PQnode *)memRealloc( pq->nodes, (size_t) ((pq->max + 1) * sizeof( pq->nodes[0] ))); - PQnode[] pqNodes = new PQnode[max + 1]; - System.arraycopy( nodes, 0, pqNodes, 0, nodes.length ); - for (int i = nodes.length; i < pqNodes.length; i++) { - pqNodes[i] = new PQnode(); - } - nodes = pqNodes; - if (nodes == null) { - nodes = saveNodes; /* restore ptr to free upon return */ - return Integer.MAX_VALUE; - } - -// pq->handles = (PQhandleElem *)memRealloc( pq->handles,(size_t)((pq->max + 1) * sizeof( pq->handles[0] ))); - PQhandleElem[] pqHandles = new PQhandleElem[max + 1]; - System.arraycopy( handles, 0, pqHandles, 0, handles.length ); - for (int i = handles.length; i < pqHandles.length; i++) { - pqHandles[i] = new PQhandleElem(); - } - handles = pqHandles; - if (handles == null) { - handles = saveHandles; /* restore ptr to free upon return */ - return Integer.MAX_VALUE; - } - } - - if (freeList == 0) { - free = curr; - } else { - free = freeList; - freeList = handles[free].node; - } - - nodes[curr].handle = free; - handles[free].node = curr; - handles[free].key = keyNew; - - if (initialized) { - FloatUp(curr); - } - assert (free != Integer.MAX_VALUE); - return free; - } - -/* really __gl_pqHeapExtractMin */ - Object pqExtractMin() { - PQnode[] n = nodes; - PQhandleElem[] h = handles; - int hMin = n[1].handle; - Object min = h[hMin].key; - - if (size > 0) { - n[1].handle = n[size].handle; - h[n[1].handle].node = 1; - - h[hMin].key = null; - h[hMin].node = freeList; - freeList = hMin; - - if (--size > 0) { - FloatDown(1); - } - } - return min; - } - -/* really __gl_pqHeapDelete */ - void pqDelete(int hCurr) { - PQnode[] n = nodes; - PQhandleElem[] h = handles; - int curr; - - assert (hCurr >= 1 && hCurr <= max && h[hCurr].key != null); - - curr = h[hCurr].node; - n[curr].handle = n[size].handle; - h[n[curr].handle].node = curr; - - if (curr <= --size) { - if (curr <= 1 || LEQ(leq, h[n[curr >> 1].handle].key, h[n[curr].handle].key)) { - FloatDown(curr); - } else { - FloatUp(curr); - } - } - h[hCurr].key = null; - h[hCurr].node = freeList; - freeList = hCurr; - } - - Object pqMinimum() { - return handles[nodes[1].handle].key; - } - - boolean pqIsEmpty() { - return size == 0; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java deleted file mode 100644 index 0d96fd5e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 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 -*/ -package org.lwjgl.util.glu.tessellation; - - - -class PriorityQSort extends PriorityQ { - PriorityQHeap heap; - Object[] keys; - - // JAVA: 'order' contains indices into the keys array. - // This simulates the indirect pointers used in the original C code - // (from Frank Suykens, Luciad.com). - int[] order; - int size, max; - boolean initialized; - Leq leq; - - PriorityQSort(Leq leq) { - heap = new PriorityQHeap(leq); - - keys = new Object[PriorityQ.INIT_SIZE]; - - size = 0; - max = PriorityQ.INIT_SIZE; - initialized = false; - this.leq = leq; - } - -/* really __gl_pqSortDeletePriorityQ */ - void pqDeletePriorityQ() { - if (heap != null) heap.pqDeletePriorityQ(); - order = null; - keys = null; - } - - private static boolean LT(Leq leq, Object x, Object y) { - return (!PriorityQHeap.LEQ(leq, y, x)); - } - - private static boolean GT(Leq leq, Object x, Object y) { - return (!PriorityQHeap.LEQ(leq, x, y)); - } - - private static void Swap(int[] array, int a, int b) { - if (true) { - int tmp = array[a]; - array[a] = array[b]; - array[b] = tmp; - } else { - - } - } - - private static class Stack { - int p, r; - } - -/* really __gl_pqSortInit */ - boolean pqInit() { - int p, r, i, j; - int piv; - Stack[] stack = new Stack[50]; - for (int k = 0; k < stack.length; k++) { - stack[k] = new Stack(); - } - int top = 0; - - int seed = 2016473283; - - /* 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. */ - p = 0; - r = size - 1; - for (piv = 0, i = p; i <= r; ++piv, ++i) { - // indirect pointers: keep an index into the keys array, not a direct pointer to its contents - order[i] = piv; - } - - /* Sort the indirect pointers in descending order, - * using randomized Quicksort - */ - stack[top].p = p; - stack[top].r = r; - ++top; - while (--top >= 0) { - p = stack[top].p; - r = stack[top].r; - while (r > p + 10) { - seed = Math.abs( seed * 1539415821 + 1 ); - i = p + seed % (r - p + 1); - piv = order[i]; - order[i] = order[p]; - order[p] = piv; - i = p - 1; - j = r + 1; - do { - do { - ++i; - } while (GT(leq, keys[order[i]], keys[piv])); - do { - --j; - } while (LT(leq, keys[order[j]], keys[piv])); - Swap(order, i, j); - } while (i < j); - Swap(order, i, j); /* Undo last swap */ - if (i - p < r - j) { - stack[top].p = j + 1; - stack[top].r = r; - ++top; - r = i - 1; - } else { - stack[top].p = p; - stack[top].r = i - 1; - ++top; - p = j + 1; - } - } - /* Insertion sort small lists */ - for (i = p + 1; i <= r; ++i) { - piv = order[i]; - for (j = i; j > p && LT(leq, keys[order[j - 1]], keys[piv]); --j) { - order[j] = order[j - 1]; - } - order[j] = piv; - } - } - max = size; - 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*/ - - return true; - } - -/* really __gl_pqSortInsert */ -/* returns LONG_MAX iff out of memory */ - int pqInsert(Object keyNew) { - int curr; - - if (initialized) { - return heap.pqInsert(keyNew); - } - curr = size; - if (++size >= max) { - Object[] saveKey = keys; - - /* If the heap overflows, double its size. */ - max <<= 1; -// 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; - if (keys == null) { - keys = saveKey; /* restore ptr to free upon return */ - return Integer.MAX_VALUE; - } - } - assert curr != Integer.MAX_VALUE; - keys[curr] = keyNew; - - /* Negative handles index the sorted array. */ - return -(curr + 1); - } - -/* really __gl_pqSortExtractMin */ - Object pqExtractMin() { - Object sortMin, heapMin; - - if (size == 0) { - return heap.pqExtractMin(); - } - sortMin = keys[order[size - 1]]; - if (!heap.pqIsEmpty()) { - heapMin = heap.pqMinimum(); - if (LEQ(leq, heapMin, sortMin)) { - return heap.pqExtractMin(); - } - } - do { - --size; - } while (size > 0 && keys[order[size - 1]] == null); - return sortMin; - } - -/* really __gl_pqSortMinimum */ - Object pqMinimum() { - Object sortMin, heapMin; - - if (size == 0) { - return heap.pqMinimum(); - } - sortMin = keys[order[size - 1]]; - if (!heap.pqIsEmpty()) { - heapMin = heap.pqMinimum(); - if (PriorityQHeap.LEQ(leq, heapMin, sortMin)) { - return heapMin; - } - } - return sortMin; - } - -/* really __gl_pqSortIsEmpty */ - boolean pqIsEmpty() { - return (size == 0) && heap.pqIsEmpty(); - } - -/* really __gl_pqSortDelete */ - void pqDelete(int curr) { - if (curr >= 0) { - heap.pqDelete(curr); - return; - } - curr = -(curr + 1); - assert curr < max && keys[curr] != null; - - keys[curr] = null; - while (size > 0 && keys[order[size - 1]] == null) { - --size; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Render.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Render.java deleted file mode 100644 index 672cd8df..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Render.java +++ /dev/null @@ -1,596 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - -import static org.lwjgl.opengl.GL11.GL_LINE_LOOP; -import static org.lwjgl.opengl.GL11.GL_TRIANGLES; -import static org.lwjgl.opengl.GL11.GL_TRIANGLE_FAN; -import static org.lwjgl.opengl.GL11.GL_TRIANGLE_STRIP; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_ABS_GEQ_TWO; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_NEGATIVE; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_NONZERO; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_ODD; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_POSITIVE; - -class Render { - private static final boolean USE_OPTIMIZED_CODE_PATH = false; - - private Render() { - } - - private static final RenderFan renderFan = new RenderFan(); - 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. - */ - private static class FaceCount { - private FaceCount() { - } - - private FaceCount(long size, GLUhalfEdge eStart, renderCallBack render) { - this.size = size; - this.eStart = eStart; - this.render = 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). - */ - public static void __gl_renderMesh(GLUtessellatorImpl tess, GLUmesh mesh) { - GLUface f; - - /* Make a list of separate triangles so we can render them all at once */ - tess.lonelyTriList = null; - - for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { - f.marked = false; - } - 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. - */ - if (f.inside && !f.marked) { - RenderMaximumFaceGroup(tess, f); - assert (f.marked); - } - } - if (tess.lonelyTriList != null) { - RenderLonelyTriangles(tess, tess.lonelyTriList); - tess.lonelyTriList = null; - } - } - - - 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). - */ - GLUhalfEdge e = fOrig.anEdge; - FaceCount max = new FaceCount(); - FaceCount newFace; - - max.size = 1; - max.eStart = e; - max.render = renderTriangle; - - if (!tess.flagBoundary) { - newFace = MaximumFan(e); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumFan(e.Lnext); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumFan(e.Onext.Sym); - if (newFace.size > max.size) { - max = newFace; - } - - newFace = MaximumStrip(e); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumStrip(e.Lnext); - if (newFace.size > max.size) { - max = newFace; - } - newFace = MaximumStrip(e.Onext.Sym); - if (newFace.size > max.size) { - max = newFace; - } - } - 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. - */ - private static boolean Marked(GLUface f) { - return !f.inside || f.marked; - } - - private static GLUface AddToTrail(GLUface f, GLUface t) { - f.trail = t; - f.marked = true; - return f; - } - - private static void FreeTrail(GLUface t) { - if (true) { - while (t != null) { - t.marked = false; - t = t.trail; - } - } else { - /* absorb trailing semicolon */ - } - } - - 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. - */ - FaceCount newFace = new FaceCount(0, null, renderFan); - GLUface trail = null; - GLUhalfEdge e; - - for (e = eOrig; !Marked(e.Lface); e = e.Onext) { - trail = AddToTrail(e.Lface, trail); - ++newFace.size; - } - for (e = eOrig; !Marked(e.Sym.Lface); e = e.Sym.Lnext) { - trail = AddToTrail(e.Sym.Lface, trail); - ++newFace.size; - } - newFace.eStart = e; - /*LINTED*/ - FreeTrail(trail); - return newFace; - } - - - private static boolean IsEven(long n) { - return (n & 0x1L) == 0; - } - - 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. - */ - FaceCount newFace = new FaceCount(0, null, renderStrip); - long headSize = 0, tailSize = 0; - GLUface trail = null; - GLUhalfEdge e, eTail, eHead; - - for (e = eOrig; !Marked(e.Lface); ++tailSize, e = e.Onext) { - trail = AddToTrail(e.Lface, trail); - ++tailSize; - e = e.Lnext.Sym; - if (Marked(e.Lface)) break; - trail = AddToTrail(e.Lface, trail); - } - eTail = e; - - for (e = eOrig; !Marked(e.Sym.Lface); ++headSize, e = e.Sym.Onext.Sym) { - trail = AddToTrail(e.Sym.Lface, trail); - ++headSize; - e = e.Sym.Lnext; - if (Marked(e.Sym.Lface)) break; - trail = AddToTrail(e.Sym.Lface, trail); - } - eHead = e; - - newFace.size = tailSize + headSize; - if (IsEven(tailSize)) { - newFace.eStart = eTail.Sym; - } 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. - */ - --newFace.size; - newFace.eStart = eHead.Onext; - } - /*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. - */ - assert (size == 1); - tess.lonelyTriList = AddToTrail(e.Lface, tess.lonelyTriList); - } - } - - - 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. - */ - GLUhalfEdge e; - int newState; - int edgeState = -1; /* force edge state output for first vertex */ - - tess.callBeginOrBeginData(GL_TRIANGLES); - - for (; f != null; f = f.trail) { - /* Loop once for each edge (there will always be 3 edges) */ - - 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. - */ - newState = (!e.Sym.Lface.inside) ? 1 : 0; - if (edgeState != newState) { - edgeState = newState; - tess.callEdgeFlagOrEdgeFlagData( edgeState != 0); - } - } - tess.callVertexOrVertexData( e.Org.data); - - e = e.Lnext; - } while (e != f.anEdge); - } - tess.callEndOrEndData(); - } - - 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). - */ - tess.callBeginOrBeginData(GL_TRIANGLE_FAN); - tess.callVertexOrVertexData( e.Org.data); - tess.callVertexOrVertexData( e.Sym.Org.data); - - while (!Marked(e.Lface)) { - e.Lface.marked = true; - --size; - e = e.Onext; - tess.callVertexOrVertexData( e.Sym.Org.data); - } - - assert (size == 0); - tess.callEndOrEndData(); - } - } - - 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). - */ - tess.callBeginOrBeginData(GL_TRIANGLE_STRIP); - tess.callVertexOrVertexData( e.Org.data); - tess.callVertexOrVertexData( e.Sym.Org.data); - - while (!Marked(e.Lface)) { - e.Lface.marked = true; - --size; - e = e.Lnext.Sym; - tess.callVertexOrVertexData( e.Org.data); - if (Marked(e.Lface)) break; - - e.Lface.marked = true; - --size; - e = e.Onext; - tess.callVertexOrVertexData( e.Sym.Org.data); - } - - assert (size == 0); - tess.callEndOrEndData(); - } - } - - /************************ 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). - */ - public static void __gl_renderBoundary(GLUtessellatorImpl tess, GLUmesh mesh) { - GLUface f; - GLUhalfEdge e; - - for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { - if (f.inside) { - tess.callBeginOrBeginData(GL_LINE_LOOP); - e = f.anEdge; - do { - tess.callVertexOrVertexData( e.Org.data); - e = e.Lnext; - } while (e != f.anEdge); - tess.callEndOrEndData(); - } - } - } - - - /************************ 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. - */ { - CachedVertex[] v = tess.cache; -// CachedVertex vn = v0 + tess.cacheCount; - int vn = tess.cacheCount; -// 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. - */ - if (!check) { - norm[0] = norm[1] = norm[2] = 0.0; - } - - vc = 1; - xc = v[vc].coords[0] - v[0].coords[0]; - yc = v[vc].coords[1] - v[0].coords[1]; - zc = v[vc].coords[2] - v[0].coords[2]; - while (++vc < vn) { - xp = xc; - yp = yc; - zp = zc; - xc = v[vc].coords[0] - v[0].coords[0]; - yc = v[vc].coords[1] - v[0].coords[1]; - zc = v[vc].coords[2] - v[0].coords[2]; - - /* Compute (vp - v0) cross (vc - v0) */ - n[0] = yp * zc - zp * yc; - n[1] = zp * xc - xp * zc; - n[2] = xp * yc - yp * xc; - - 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) - */ - if (dot >= 0) { - norm[0] += n[0]; - norm[1] += n[1]; - norm[2] += n[2]; - } else { - norm[0] -= n[0]; - norm[1] -= n[1]; - norm[2] -= n[2]; - } - } else if (dot != 0) { - /* Check the new orientation for consistency with previous triangles */ - if (dot > 0) { - if (sign < 0) return SIGN_INCONSISTENT; - sign = 1; - } else { - if (sign > 0) return SIGN_INCONSISTENT; - sign = -1; - } - } - } - 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). - */ - public static boolean __gl_renderCache(GLUtessellatorImpl tess) { - CachedVertex[] v = tess.cache; -// CachedVertex vn = v0 + tess.cacheCount; - int vn = tess.cacheCount; -// CachedVertex vc; - int vc; - double[] norm = new double[3]; - int sign; - - if (tess.cacheCount < 3) { - /* Degenerate contour -- no output */ - return true; - } - - norm[0] = tess.normal[0]; - norm[1] = tess.normal[1]; - norm[2] = tess.normal[2]; - if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) { - ComputeNormal( tess, norm, false); - } - - sign = ComputeNormal( tess, norm, true); - if (sign == SIGN_INCONSISTENT) { - /* Fan triangles did not have a consistent orientation */ - return false; - } - if (sign == 0) { - /* All triangles were degenerate */ - return true; - } - - if ( !USE_OPTIMIZED_CODE_PATH ) { - return false; - } else { - /* Make sure we do the right thing for each winding rule */ - switch (tess.windingRule) { - case GLU_TESS_WINDING_ODD: - case GLU_TESS_WINDING_NONZERO: - break; - case GLU_TESS_WINDING_POSITIVE: - if (sign < 0) return true; - break; - case GLU_TESS_WINDING_NEGATIVE: - if (sign > 0) return true; - break; - case GLU_TESS_WINDING_ABS_GEQ_TWO: - return true; - } - - tess.callBeginOrBeginData( tess.boundaryOnly ? GL_LINE_LOOP - : (tess.cacheCount > 3) ? GL_TRIANGLE_FAN - : GL_TRIANGLES); - - tess.callVertexOrVertexData( v[0].data); - if (sign > 0) { - for (vc = 1; vc < vn; ++vc) { - tess.callVertexOrVertexData( v[vc].data); - } - } else { - for (vc = vn - 1; vc > 0; --vc) { - tess.callVertexOrVertexData( v[vc].data); - } - } - tess.callEndOrEndData(); - return true; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Sweep.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Sweep.java deleted file mode 100644 index 10f56978..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/Sweep.java +++ /dev/null @@ -1,1390 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.util.glu.tessellation; - -import static org.lwjgl.util.glu.GLU.GLU_TESS_MAX_COORD; -import static org.lwjgl.util.glu.GLU.GLU_TESS_NEED_COMBINE_CALLBACK; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_ABS_GEQ_TWO; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_NEGATIVE; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_NONZERO; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_ODD; -import static org.lwjgl.util.glu.GLU.GLU_TESS_WINDING_POSITIVE; - -class Sweep { - private Sweep() { - } - -// #ifdef FOR_TRITE_TEST_PROGRAM -// extern void DebugEvent( GLUtessellator *tess ); -// #else - private static void DebugEvent(GLUtessellatorImpl tess) { - - } -// #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.) - */ - -/* 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; - eDst.Sym.winding += eSrc.Sym.winding; - } - - - private static ActiveRegion RegionBelow(ActiveRegion r) { - return ((ActiveRegion) Dict.dictKey(Dict.dictPred(r.nodeUp))); - } - - private static ActiveRegion RegionAbove(ActiveRegion r) { - 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). - */ { - GLUvertex event = tess.event; - GLUhalfEdge e1, e2; - double t1, t2; - - e1 = reg1.eUp; - e2 = reg2.eUp; - - 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. - */ - if (Geom.VertLeq(e1.Org, e2.Org)) { - return Geom.EdgeSign(e2.Sym.Org, e1.Org, e2.Org) <= 0; - } - return Geom.EdgeSign(e1.Sym.Org, e2.Org, e1.Org) >= 0; - } - return Geom.EdgeSign(e2.Sym.Org, event, e2.Org) <= 0; - } - if (e2.Sym.Org == event) { - return Geom.EdgeSign(e1.Sym.Org, event, e1.Org) >= 0; - } - - /* General case - compute signed distance *from* e1, e2 to event */ - t1 = Geom.EdgeEval(e1.Sym.Org, event, e1.Org); - t2 = Geom.EdgeEval(e2.Sym.Org, event, e2.Org); - return (t1 >= t2); - } - - - 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). - */ - assert (reg.eUp.winding == 0); - } - reg.eUp.activeRegion = null; - Dict.dictDelete(tess.dict, reg.nodeUp); /* __gl_dictListDelete */ - } - - - 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; - reg.eUp = newEdge; - newEdge.activeRegion = reg; - - return true; - } - - static ActiveRegion TopLeftRegion(ActiveRegion reg) { - GLUvertex org = reg.eUp.Org; - GLUhalfEdge e; - - /* Find the region above the uppermost edge with the same origin */ - do { - 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 (reg.fixUpperEdge) { - e = Mesh.__gl_meshConnect(RegionBelow(reg).eUp.Sym, reg.eUp.Lnext); - if (e == null) return null; - if (!FixUpperEdge(reg, e)) return null; - reg = RegionAbove(reg); - } - return reg; - } - - static ActiveRegion TopRightRegion(ActiveRegion reg) { - GLUvertex dst = reg.eUp.Sym.Org; - - /* Find the region above the uppermost edge with the same destination */ - do { - reg = RegionAbove(reg); - } while (reg.eUp.Sym.Org == dst); - 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. - */ { - ActiveRegion regNew = new ActiveRegion(); - if (regNew == null) throw new RuntimeException(); - - regNew.eUp = eNewUp; - /* __gl_dictListInsertBefore */ - regNew.nodeUp = Dict.dictInsertBefore(tess.dict, regAbove.nodeUp, regNew); - if (regNew.nodeUp == null) throw new RuntimeException(); - regNew.fixUpperEdge = false; - regNew.sentinel = false; - regNew.dirty = false; - - eNewUp.activeRegion = regNew; - return regNew; - } - - static boolean IsWindingInside(GLUtessellatorImpl tess, int n) { - switch (tess.windingRule) { - case GLU_TESS_WINDING_ODD: - return (n & 1) != 0; - case GLU_TESS_WINDING_NONZERO: - return (n != 0); - case GLU_TESS_WINDING_POSITIVE: - return (n > 0); - case GLU_TESS_WINDING_NEGATIVE: - return (n < 0); - case GLU_TESS_WINDING_ABS_GEQ_TWO: - return (n >= 2) || (n <= -2); - } - /*LINTED*/ -// assert (false); - throw new InternalError(); - /*NOTREACHED*/ - } - - - static void ComputeWinding(GLUtessellatorImpl tess, ActiveRegion reg) { - reg.windingNumber = RegionAbove(reg).windingNumber + reg.eUp.winding; - 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). - */ { - GLUhalfEdge e = reg.eUp; - GLUface f = e.Lface; - - f.inside = reg.inside; - f.anEdge = e; /* optimization for __gl_meshTessellateMonoRegion() */ - 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. - */ { - ActiveRegion reg, regPrev; - GLUhalfEdge e, ePrev; - - regPrev = regFirst; - ePrev = regFirst.eUp; - while (regPrev != regLast) { - regPrev.fixUpperEdge = false; /* placement was OK */ - reg = RegionBelow(regPrev); - 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. - */ - FinishRegion(tess, regPrev); - break; - } - /* 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(); - if (!FixUpperEdge(reg, e)) throw new RuntimeException(); - } - - /* Relink edges so that ePrev.Onext == e */ - if (ePrev.Onext != e) { - if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(ePrev, e)) throw new RuntimeException(); - } - FinishRegion(tess, regPrev); /* may change reg.eUp */ - ePrev = reg.eUp; - regPrev = reg; - } - 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. - */ { - ActiveRegion reg, regPrev; - GLUhalfEdge e, ePrev; - boolean firstTime = true; - - /* Insert the new right-going edges in the dictionary */ - e = eFirst; - do { - assert (Geom.VertLeq(e.Org, e.Sym.Org)); - AddRegionBelow(tess, regUp, e.Sym); - 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). - */ - if (eTopLeft == null) { - eTopLeft = RegionBelow(regUp).eUp.Sym.Onext; - } - regPrev = regUp; - ePrev = eTopLeft; - for (; ;) { - reg = RegionBelow(regPrev); - e = reg.eUp.Sym; - if (e.Org != ePrev.Org) break; - - if (e.Onext != ePrev) { - /* Unlink e from its current position, and relink below ePrev */ - if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(ePrev.Sym.Lnext, e)) throw new RuntimeException(); - } - /* Compute the winding number and "inside" flag for the new regions */ - 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). - */ - regPrev.dirty = true; - if (!firstTime && CheckForRightSplice(tess, regPrev)) { - AddWinding(e, ePrev); - DeleteRegion(tess, regPrev); - if (!Mesh.__gl_meshDelete(ePrev)) throw new RuntimeException(); - } - firstTime = false; - regPrev = reg; - ePrev = e; - } - regPrev.dirty = true; - assert (regPrev.windingNumber - e.winding == reg.windingNumber); - - if (cleanUp) { - /* Check for intersections between newly adjacent edges. */ - WalkDirtyRegions(tess, regPrev); - } - } - - - static void CallCombine(GLUtessellatorImpl tess, GLUvertex isect, - Object[] data, float[] weights, boolean needed) { - double[] coords = new double[3]; - - /* Copy coord data in case the callback changes it. */ - coords[0] = isect.coords[0]; - coords[1] = isect.coords[1]; - coords[2] = isect.coords[2]; - - Object[] outData = new Object[1]; - tess.callCombineOrCombineData(coords, data, weights, outData); - isect.data = outData[0]; - if (isect.data == null) { - 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. - */ - tess.callErrorOrErrorData(GLU_TESS_NEED_COMBINE_CALLBACK); - tess.fatalError = true; - } - } - } - - 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}; - - data[0] = e1.Org.data; - data[1] = e2.Org.data; - CallCombine(tess, e1.Org, data, weights, false); - 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". - */ { - double t1 = Geom.VertL1dist(org, isect); - double t2 = Geom.VertL1dist(dst, isect); - - weights[0] = (float) (0.5 * t2 / (t1 + t2)); - weights[1] = (float) (0.5 * t1 / (t1 + t2)); - isect.coords[0] += weights[0] * org.coords[0] + weights[1] * dst.coords[0]; - isect.coords[1] += weights[0] * org.coords[1] + weights[1] * dst.coords[1]; - 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. - */ { - Object[] data = new Object[4]; - float[] weights = new float[4]; - float[] weights1 = new float[2]; - float[] weights2 = new float[2]; - - data[0] = orgUp.data; - data[1] = dstUp.data; - data[2] = orgLo.data; - data[3] = dstLo.data; - - isect.coords[0] = isect.coords[1] = isect.coords[2] = 0; - VertexWeights(isect, orgUp, dstUp, weights1); - VertexWeights(isect, orgLo, dstLo, weights2); - System.arraycopy(weights1, 0, weights, 0, 2); - System.arraycopy(weights2, 0, weights, 2, 2); - - 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. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - - if (Geom.VertLeq(eUp.Org, eLo.Org)) { - if (Geom.EdgeSign(eLo.Sym.Org, eUp.Org, eLo.Org) > 0) return false; - - /* eUp.Org appears to be below eLo */ - if (!Geom.VertEq(eUp.Org, eLo.Org)) { - /* Splice eUp.Org into eLo */ - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eUp, eLo.Sym.Lnext)) throw new RuntimeException(); - regUp.dirty = regLo.dirty = true; - - } else if (eUp.Org != eLo.Org) { - /* merge the two vertices, discarding eUp.Org */ - tess.pq.pqDelete(eUp.Org.pqHandle); /* __gl_pqSortDelete */ - SpliceMergeVertices(tess, eLo.Sym.Lnext, eUp); - } - } else { - if (Geom.EdgeSign(eUp.Sym.Org, eLo.Org, eUp.Org) < 0) return false; - - /* eLo.Org appears to be above eUp, so splice eLo.Org into eUp */ - RegionAbove(regUp).dirty = regUp.dirty = true; - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym.Lnext, eUp)) throw new RuntimeException(); - } - 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. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - GLUhalfEdge e; - - assert (!Geom.VertEq(eUp.Sym.Org, eLo.Sym.Org)); - - if (Geom.VertLeq(eUp.Sym.Org, eLo.Sym.Org)) { - if (Geom.EdgeSign(eUp.Sym.Org, eLo.Sym.Org, eUp.Org) < 0) return false; - - /* eLo.Sym.Org is above eUp, so splice eLo.Sym.Org into eUp */ - RegionAbove(regUp).dirty = regUp.dirty = true; - e = Mesh.__gl_meshSplitEdge(eUp); - if (e == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym, e)) throw new RuntimeException(); - e.Lface.inside = regUp.inside; - } else { - if (Geom.EdgeSign(eLo.Sym.Org, eUp.Sym.Org, eLo.Org) > 0) return false; - - /* eUp.Sym.Org is below eLo, so splice eUp.Sym.Org into eLo */ - regUp.dirty = regLo.dirty = true; - e = Mesh.__gl_meshSplitEdge(eLo); - if (e == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eUp.Lnext, eLo.Sym)) throw new RuntimeException(); - e.Sym.Lface.inside = regUp.inside; - } - 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. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - GLUvertex orgUp = eUp.Org; - GLUvertex orgLo = eLo.Org; - GLUvertex dstUp = eUp.Sym.Org; - GLUvertex dstLo = eLo.Sym.Org; - double tMinUp, tMaxLo; - GLUvertex isect = new GLUvertex(); - GLUvertex orgMin; - GLUhalfEdge e; - - assert (!Geom.VertEq(dstLo, dstUp)); - assert (Geom.EdgeSign(dstUp, tess.event, orgUp) <= 0); - assert (Geom.EdgeSign(dstLo, tess.event, orgLo) >= 0); - assert (orgUp != tess.event && orgLo != tess.event); - assert (!regUp.fixUpperEdge && !regLo.fixUpperEdge); - - if (orgUp == orgLo) return false; /* right endpoints are the same */ - - tMinUp = Math.min(orgUp.t, dstUp.t); - tMaxLo = Math.max(orgLo.t, dstLo.t); - if (tMinUp > tMaxLo) return false; /* t ranges do not overlap */ - - if (Geom.VertLeq(orgUp, orgLo)) { - if (Geom.EdgeSign(dstLo, orgUp, orgLo) > 0) return false; - } else { - if (Geom.EdgeSign(dstUp, orgLo, orgUp) < 0) return false; - } - - /* At this point the edges intersect, at least marginally */ - DebugEvent(tess); - - Geom.EdgeIntersect(dstUp, orgUp, dstLo, orgLo, isect); - /* The following properties are guaranteed: */ - assert (Math.min(orgUp.t, dstUp.t) <= isect.t); - assert (isect.t <= Math.max(orgLo.t, dstLo.t)); - assert (Math.min(dstLo.s, dstUp.s) <= isect.s); - 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. - */ - 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). - */ - orgMin = Geom.VertLeq(orgUp, orgLo) ? orgUp : orgLo; - if (Geom.VertLeq(orgMin, isect)) { - isect.s = orgMin.s; - isect.t = orgMin.t; - } - - if (Geom.VertEq(isect, orgUp) || Geom.VertEq(isect, orgLo)) { - /* Easy case -- intersection at one of the right endpoints */ - CheckForRightSplice(tess, regUp); - return false; - } - - 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. - */ - if (dstLo == tess.event) { - /* Splice dstLo into eUp, and process the new region(s) */ - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym, eUp)) throw new RuntimeException(); - regUp = TopLeftRegion(regUp); - if (regUp == null) throw new RuntimeException(); - eUp = RegionBelow(regUp).eUp; - FinishLeftRegions(tess, RegionBelow(regUp), regLo); - AddRightEdges(tess, regUp, eUp.Sym.Lnext, eUp, eUp, true); - return true; - } - if (dstUp == tess.event) { - /* Splice dstUp into eLo, and process the new region(s) */ - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eUp.Lnext, eLo.Sym.Lnext)) throw new RuntimeException(); - regLo = regUp; - regUp = TopRightRegion(regUp); - e = RegionBelow(regUp).eUp.Sym.Onext; - regLo.eUp = eLo.Sym.Lnext; - eLo = FinishLeftRegions(tess, regLo, null); - 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). - */ - if (Geom.EdgeSign(dstUp, tess.event, isect) >= 0) { - RegionAbove(regUp).dirty = regUp.dirty = true; - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - eUp.Org.s = tess.event.s; - eUp.Org.t = tess.event.t; - } - if (Geom.EdgeSign(dstLo, tess.event, isect) <= 0) { - regUp.dirty = regLo.dirty = true; - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - eLo.Org.s = tess.event.s; - eLo.Org.t = tess.event.t; - } - /* leave the rest for ConnectRightVertex */ - 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). - */ - if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); - if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); - if (!Mesh.__gl_meshSplice(eLo.Sym.Lnext, eUp)) throw new RuntimeException(); - eUp.Org.s = isect.s; - eUp.Org.t = isect.t; - eUp.Org.pqHandle = tess.pq.pqInsert(eUp.Org); /* __gl_pqSortInsert */ - if (eUp.Org.pqHandle == Long.MAX_VALUE) { - tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ - tess.pq = null; - throw new RuntimeException(); - } - GetIntersectData(tess, eUp.Org, orgUp, dstUp, orgLo, dstLo); - RegionAbove(regUp).dirty = regUp.dirty = regLo.dirty = true; - 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. - */ { - ActiveRegion regLo = RegionBelow(regUp); - GLUhalfEdge eUp, eLo; - - for (; ;) { - /* Find the lowest dirty region (we walk from the bottom up). */ - while (regLo.dirty) { - regUp = regLo; - regLo = RegionBelow(regLo); - } - if (!regUp.dirty) { - regLo = regUp; - regUp = RegionAbove(regUp); - if (regUp == null || !regUp.dirty) { - /* We've walked all the dirty regions */ - return; - } - } - regUp.dirty = false; - eUp = regUp.eUp; - eLo = regLo.eUp; - - if (eUp.Sym.Org != eLo.Sym.Org) { - /* 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 (regLo.fixUpperEdge) { - DeleteRegion(tess, regLo); - if (!Mesh.__gl_meshDelete(eLo)) throw new RuntimeException(); - regLo = RegionBelow(regUp); - eLo = regLo.eUp; - } else if (regUp.fixUpperEdge) { - DeleteRegion(tess, regUp); - if (!Mesh.__gl_meshDelete(eUp)) throw new RuntimeException(); - regUp = RegionAbove(regLo); - eUp = regUp.eUp; - } - } - } - if (eUp.Org != eLo.Org) { - 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). - */ - 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. - */ - CheckForRightSplice(tess, regUp); - } - } - if (eUp.Org == eLo.Org && eUp.Sym.Org == eLo.Sym.Org) { - /* A degenerate loop consisting of only two edges -- delete it. */ - AddWinding(eLo, eUp); - DeleteRegion(tess, regUp); - if (!Mesh.__gl_meshDelete(eUp)) throw new RuntimeException(); - regUp = RegionAbove(regLo); - } - } - } - - - 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); - GLUhalfEdge eUp = regUp.eUp; - GLUhalfEdge eLo = regLo.eUp; - boolean degenerate = false; - - if (eUp.Sym.Org != eLo.Sym.Org) { - CheckForIntersect(tess, regUp); - } - - /* 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(); - regUp = TopLeftRegion(regUp); - if (regUp == null) throw new RuntimeException(); - eTopLeft = RegionBelow(regUp).eUp; - FinishLeftRegions(tess, RegionBelow(regUp), regLo); - degenerate = true; - } - if (Geom.VertEq(eLo.Org, tess.event)) { - if (!Mesh.__gl_meshSplice(eBottomLeft, eLo.Sym.Lnext)) throw new RuntimeException(); - eBottomLeft = FinishLeftRegions(tess, regLo, null); - degenerate = true; - } - if (degenerate) { - AddRightEdges(tess, regUp, eBottomLeft.Onext, eTopLeft, eTopLeft, true); - return; - } - - /* 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; - } else { - eNew = eUp; - } - 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. - */ - 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 - * 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. - */ { - 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 - */ - assert (TOLERANCE_NONZERO); - SpliceMergeVertices(tess, e, vEvent.anEdge); - return; - } - - if (!Geom.VertEq(e.Sym.Org, vEvent)) { - /* General case -- splice vEvent into edge e which passes through it */ - if (Mesh.__gl_meshSplitEdge(e.Sym) == null) throw new RuntimeException(); - if (regUp.fixUpperEdge) { - /* This edge was fixable -- delete unused portion of original edge */ - if (!Mesh.__gl_meshDelete(e.Onext)) throw new RuntimeException(); - regUp.fixUpperEdge = false; - } - if (!Mesh.__gl_meshSplice(vEvent.anEdge, e)) throw new RuntimeException(); - SweepEvent(tess, vEvent); /* recurse */ - return; - } - - /* vEvent coincides with e.Sym.Org, which has already been processed. - * Splice in the additional right-going edges. - */ - assert (TOLERANCE_NONZERO); - regUp = TopRightRegion(regUp); - reg = RegionBelow(regUp); - 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. - */ - assert (eTopLeft != eTopRight); /* there are some left edges too */ - DeleteRegion(tess, reg); - if (!Mesh.__gl_meshDelete(eTopRight)) throw new RuntimeException(); - eTopRight = eTopLeft.Sym.Lnext; - } - if (!Mesh.__gl_meshSplice(vEvent.anEdge, eTopRight)) throw new RuntimeException(); - if (!Geom.EdgeGoesLeft(eTopLeft)) { - /* e.Sym.Org had no left-going edges -- indicate this to AddRightEdges() */ - eTopLeft = null; - } - 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 - */ { - ActiveRegion regUp, regLo, reg; - GLUhalfEdge eUp, eLo, eNew; - ActiveRegion tmp = new ActiveRegion(); - - /* assert ( vEvent.anEdge.Onext.Onext == vEvent.anEdge ); */ - - /* Get a pointer to the active region containing vEvent */ - tmp.eUp = vEvent.anEdge.Sym; - /* __GL_DICTLISTKEY */ /* __gl_dictListSearch */ - regUp = (ActiveRegion) Dict.dictKey(Dict.dictSearch(tess.dict, tmp)); - regLo = RegionBelow(regUp); - eUp = regUp.eUp; - eLo = regLo.eUp; - - /* Try merging with U or L first */ - if (Geom.EdgeSign(eUp.Sym.Org, vEvent, eUp.Org) == 0) { - ConnectLeftDegenerate(tess, regUp, vEvent); - return; - } - - /* 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; - - if (regUp.inside || reg.fixUpperEdge) { - if (reg == regUp) { - eNew = Mesh.__gl_meshConnect(vEvent.anEdge.Sym, eUp.Lnext); - if (eNew == null) throw new RuntimeException(); - } else { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(eLo.Sym.Onext.Sym, vEvent.anEdge); - if (tempHalfEdge == null) throw new RuntimeException(); - - eNew = tempHalfEdge.Sym; - } - if (reg.fixUpperEdge) { - if (!FixUpperEdge(reg, eNew)) throw new RuntimeException(); - } else { - ComputeWinding(tess, AddRegionBelow(tess, regUp, eNew)); - } - 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. - */ - 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. - */ { - 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. - */ - e = vEvent.anEdge; - while (e.activeRegion == null) { - e = e.Onext; - if (e == vEvent.anEdge) { - /* All edges go right -- not incident to any processed edges */ - ConnectLeftVertex(tess, vEvent); - return; - } - } - - /* 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(); - reg = RegionBelow(regUp); - 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. - */ - if (eBottomLeft.Onext == eTopLeft) { - /* No right-going edges -- add a temporary "fixable" edge */ - ConnectRightVertex(tess, regUp, eBottomLeft); - } else { - AddRightEdges(tess, regUp, eBottomLeft.Onext, eTopLeft, eTopLeft, true); - } - } - - -/* 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. - */ { - GLUhalfEdge e; - ActiveRegion reg = new ActiveRegion(); - if (reg == null) throw new RuntimeException(); - - e = Mesh.__gl_meshMakeEdge(tess.mesh); - if (e == null) throw new RuntimeException(); - - e.Org.s = SENTINEL_COORD; - e.Org.t = t; - e.Sym.Org.s = -SENTINEL_COORD; - e.Sym.Org.t = t; - tess.event = e.Sym.Org; /* initialize it */ - - reg.eUp = e; - reg.windingNumber = 0; - reg.inside = false; - reg.fixUpperEdge = false; - reg.sentinel = true; - reg.dirty = false; - reg.nodeUp = Dict.dictInsert(tess.dict, reg); /* __gl_dictListInsertBefore */ - 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. - */ { - /* __gl_dictListNewDict */ - tess.dict = Dict.dictNewDict(tess, new Dict.DictLeq() { - public boolean leq(Object frame, Object key1, Object key2) { - return EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2); - } - }); - if (tess.dict == null) throw new RuntimeException(); - - AddSentinel(tess, -SENTINEL_COORD); - AddSentinel(tess, SENTINEL_COORD); - } - - - static void DoneEdgeDict(GLUtessellatorImpl tess) { - ActiveRegion reg; - int fixedEdges = 0; - - /* __GL_DICTLISTKEY */ /* __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(). - */ - if (!reg.sentinel) { - assert (reg.fixUpperEdge); - assert (++fixedEdges == 1); - } - assert (reg.windingNumber == 0); - DeleteRegion(tess, reg); -/* __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. - */ { - GLUhalfEdge e, eNext, eLnext; - GLUhalfEdge eHead = tess.mesh.eHead; - - /*LINTED*/ - for (e = eHead.next; e != eHead; e = eNext) { - eNext = e.next; - eLnext = e.Lnext; - - if (Geom.VertEq(e.Org, e.Sym.Org) && e.Lnext.Lnext != e) { - /* Zero-length edge, contour has at least 3 edges */ - - SpliceMergeVertices(tess, eLnext, e); /* deletes e.Org */ - if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); /* e is a self-loop */ - e = eLnext; - eLnext = e.Lnext; - } - if (eLnext.Lnext == e) { - /* Degenerate contour (one or two edges) */ - - if (eLnext != e) { - if (eLnext == eNext || eLnext == eNext.Sym) { - eNext = eNext.next; - } - if (!Mesh.__gl_meshDelete(eLnext)) throw new RuntimeException(); - } - if (e == eNext || e == eNext.Sym) { - eNext = eNext.next; - } - if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); - } - } - } - - 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; - - /* __gl_pqSortNewPriorityQ */ - pq = tess.pq = PriorityQ.pqNewPriorityQ(new PriorityQ.Leq() { - public boolean leq(Object key1, Object key2) { - return Geom.VertLeq(((GLUvertex) key1), (GLUvertex) key2); - } - }); - if (pq == null) return false; - - vHead = tess.mesh.vHead; - for (v = vHead.next; v != vHead; v = v.next) { - v.pqHandle = pq.pqInsert(v); /* __gl_pqSortInsert */ - if (v.pqHandle == Long.MAX_VALUE) break; - } - if (v != vHead || !pq.pqInit()) { /* __gl_pqSortInit */ - tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ - tess.pq = null; - return false; - } - - return true; - } - - - static void DonePriorityQ(GLUtessellatorImpl tess) { - 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. - */ { - GLUface f, fNext; - GLUhalfEdge e; - - /*LINTED*/ - for (f = mesh.fHead.next; f != mesh.fHead; f = fNext) { - fNext = f.next; - e = f.anEdge; - assert (e.Lnext != e); - - if (e.Lnext.Lnext == e) { - /* A face with only two edges */ - AddWinding(e.Onext, e); - if (!Mesh.__gl_meshDelete(e)) return false; - } - } - 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. - */ { - 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) - */ - RemoveDegenerateEdges(tess); - if (!InitPriorityQ(tess)) return false; /* if error */ - InitEdgeDict(tess); - - /* __gl_pqSortExtractMin */ - while ((v = (GLUvertex) tess.pq.pqExtractMin()) != null) { - 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). - */ - vNext = (GLUvertex) tess.pq.pqExtractMin(); /* __gl_pqSortExtractMin*/ - SpliceMergeVertices(tess, v.anEdge, vNext.anEdge); - } - SweepEvent(tess, v); - } - - /* Set tess.event for debugging purposes */ - /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ - tess.event = ((ActiveRegion) Dict.dictKey(Dict.dictMin(tess.dict))).eUp.Org; - DebugEvent(tess); - DoneEdgeDict(tess); - DonePriorityQ(tess); - - if (!RemoveDegenerateFaces(tess.mesh)) return false; - Mesh.__gl_meshCheckMesh(tess.mesh); - - return true; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/TessMono.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/TessMono.java deleted file mode 100644 index 10890e66..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/TessMono.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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). - */ - 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. - */ - 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) - ; - 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. - */ - while (lo.Lnext != up && (Geom.EdgeGoesLeft(lo.Lnext) - || Geom.EdgeSign(lo.Org, lo.Sym.Org, lo.Lnext.Sym.Org) <= 0)) { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(lo.Lnext, lo); - if (tempHalfEdge == null) return false; - lo = tempHalfEdge.Sym; - } - 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)) { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(up, up.Onext.Sym); - if (tempHalfEdge == null) return false; - up = tempHalfEdge.Sym; - } - up = up.Lnext; - } - } - - /* 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) { - GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(lo.Lnext, lo); - if (tempHalfEdge == null) return false; - lo = tempHalfEdge.Sym; - } - - return true; - } - - -/* __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*/ - for (f = mesh.fHead.next; f != mesh.fHead; f = next) { - /* Make sure we don''t try to tessellate the new triangles. */ - next = f.next; - if (f.inside) { - if (!__gl_meshTessellateMonoRegion(f)) return false; - } - } - - 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. - */ - public static void __gl_meshDiscardExterior(GLUmesh mesh) { - GLUface f, next; - - /*LINTED*/ - for (f = mesh.fHead.next; f != mesh.fHead; f = next) { - /* Since f will be destroyed, save its next pointer. */ - next = f.next; - if (!f.inside) { - Mesh.__gl_meshZapFace(f); - } - } - } - -// 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. - */ - public static boolean __gl_meshSetWindingNumber(GLUmesh mesh, int value, boolean keepOnlyBoundary) { - GLUhalfEdge e, eNext; - - for (e = mesh.eHead.next; e != mesh.eHead; e = eNext) { - eNext = e.next; - if (e.Sym.Lface.inside != e.Lface.inside) { - - /* This is a boundary edge (one side is interior, one is exterior). */ - e.winding = (e.Lface.inside) ? value : -value; - } else { - - /* Both regions are interior, or both are exterior. */ - if (!keepOnlyBoundary) { - e.winding = 0; - } else { - if (!Mesh.__gl_meshDelete(e)) return false; - } - } - } - return true; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/TessState.java b/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/TessState.java deleted file mode 100644 index 1c5c396e..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/glu/tessellation/TessState.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * 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. -*/ - -/* -** 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.lwjgl.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/LWJGL/src/main/java/org/lwjgl/util/input/ControllerAdapter.java b/LWJGL/src/main/java/org/lwjgl/util/input/ControllerAdapter.java deleted file mode 100644 index 07a9e5d3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/input/ControllerAdapter.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * 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.input; - -import org.lwjgl.input.Controller; - -/** - * Adapter for the Controller interface. It can be used as placeholder - * Controller, which doesn't do anything (eg if Controllers.create() fails and - * you don't want to take care of that). - * - * @author Onyx, Aho and all the other aliases... - */ -public class ControllerAdapter implements Controller { - - /** - * Get the name assigned to this controller. - * - * @return The name assigned to this controller - */ - public String getName() { - return "Dummy Controller"; - } - - /** - * Get the index of this controller in the collection - * - * @return The index of this controller in the collection - */ - public int getIndex() { - return 0; //-1 maybe? - } - - /** - * Retrieve the number of buttons available on this controller - * - * @return The number of butotns available on this controller - */ - public int getButtonCount() { - return 0; - } - - /** - * Get the name of the specified button. Be warned, often this is as - * exciting as "Button X" - * - * @param index The index of the button whose name should be retrieved - * @return The name of the button requested - */ - public String getButtonName(int index) { - return "button n/a"; - } - - /** - * Check if a button is currently pressed - * - * @param index The button to check - * @return True if the button is currently pressed - */ - public boolean isButtonPressed(int index) { - return false; - } - - /** - * Poll the controller for new data. This will also update events - */ - public void poll() { - } - - /** - * Get the X-Axis value of the POV on this controller - * - * @return The X-Axis value of the POV on this controller - */ - public float getPovX() { - return 0f; - } - - /** - * Get the Y-Axis value of the POV on this controller - * - * @return The Y-Axis value of the POV on this controller - */ - public float getPovY() { - return 0f; - } - - /** - * Get the dead zone for a specified axis - * - * @param index The index of the axis for which to retrieve the dead zone - * @return The dead zone for the specified axis - */ - public float getDeadZone(int index) { - return 0f; - } - - /** - * Set the dead zone for the specified axis - * - * @param index The index of hte axis for which to set the dead zone - * @param zone The dead zone to use for the specified axis - */ - public void setDeadZone(int index, float zone) { - } - - /** - * Retrieve the number of axes available on this controller. - * - * @return The number of axes available on this controller. - */ - public int getAxisCount() { - return 0; - } - - /** - * Get the name that's given to the specified axis - * - * @param index The index of the axis whose name should be retrieved - * @return The name of the specified axis. - */ - public String getAxisName(int index) { - return "axis n/a"; - } - - /** - * Retrieve the value thats currently available on a specified axis. The - * value will always be between 1.0 and -1.0 and will calibrate as values - * are passed read. It may be useful to get the player to wiggle the - * joystick from side to side to get the calibration right. - * - * @param index The index of axis to be read - * @return The value from the specified axis. - */ - public float getAxisValue(int index) { - return 0f; - } - - /** - * Get the value from the X axis if there is one. If no X axis is defined a - * zero value will be returned. - * - * @return The value from the X axis - */ - public float getXAxisValue() { - return 0f; - } - - /** - * Get the dead zone for the X axis. - * - * @return The dead zone for the X axis - */ - public float getXAxisDeadZone() { - return 0f; - } - - /** - * Set the dead zone for the X axis - * - * @param zone The dead zone to use for the X axis - */ - public void setXAxisDeadZone(float zone) { - } - - /** - * Get the value from the Y axis if there is one. If no Y axis is defined a - * zero value will be returned. - * - * @return The value from the Y axis - */ - public float getYAxisValue() { - return 0f; - } - - /** - * Get the dead zone for the Y axis. - * - * @return The dead zone for the Y axis - */ - public float getYAxisDeadZone() { - return 0f; - } - - /** - * Set the dead zone for the Y axis - * - * @param zone The dead zone to use for the Y axis - */ - public void setYAxisDeadZone(float zone) { - } - - /** - * Get the value from the Z axis if there is one. If no Z axis is defined a - * zero value will be returned. - * - * @return The value from the Z axis - */ - public float getZAxisValue() { - return 0f; - } - - /** - * Get the dead zone for the Z axis. - * - * @return The dead zone for the Z axis - */ - public float getZAxisDeadZone() { - return 0f; - } - - /** - * Set the dead zone for the Z axis - * - * @param zone The dead zone to use for the Z axis - */ - public void setZAxisDeadZone(float zone) { - } - - /** - * Get the value from the RX axis if there is one. If no RX axis is defined - * a zero value will be returned. - * - * @return The value from the RX axis - */ - public float getRXAxisValue() { - return 0f; - } - - /** - * Get the dead zone for the RX axis. - * - * @return The dead zone for the RX axis - */ - public float getRXAxisDeadZone() { - return 0f; - } - - /** - * Set the dead zone for the RX axis - * - * @param zone The dead zone to use for the RX axis - */ - public void setRXAxisDeadZone(float zone) { - } - - /** - * Get the value from the RY axis if there is one. If no RY axis is defined - * a zero value will be returned. - * - * @return The value from the RY axis - */ - public float getRYAxisValue() { - return 0f; - } - - /** - * Get the dead zone for the RY axis. - * - * @return The dead zone for the RY axis - */ - public float getRYAxisDeadZone() { - return 0f; - } - - /** - * Set the dead zone for the RY axis - * - * @param zone The dead zone to use for the RY axis - */ - public void setRYAxisDeadZone(float zone) { - } - - /** - * Get the value from the RZ axis if there is one. If no RZ axis is defined - * a zero value will be returned. - * - * @return The value from the RZ axis - */ - public float getRZAxisValue() { - return 0f; - } - - /** - * Get the dead zone for the RZ axis. - * - * @return The dead zone for the RZ axis - */ - public float getRZAxisDeadZone() { - return 0f; - } - - /** - * Set the dead zone for the RZ axis - * - * @param zone The dead zone to use for the RZ axis - */ - public void setRZAxisDeadZone(float zone) { - } - - public int getRumblerCount() { - return 0; - } - - public String getRumblerName(int index) { - return "rumber n/a"; - } - - public void setRumblerStrength(int index, float strength) { - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/jinput/KeyMap.java b/LWJGL/src/main/java/org/lwjgl/util/jinput/KeyMap.java deleted file mode 100644 index b589c129..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/jinput/KeyMap.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * 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.jinput; - -import net.java.games.input.Component; - -import org.lwjgl.input.Keyboard; - -/** - * @author elias - */ -final class KeyMap { - public static Component.Identifier.Key map(int lwjgl_key_code) { - switch (lwjgl_key_code) { - case Keyboard.KEY_ESCAPE: - return Component.Identifier.Key.ESCAPE; - case Keyboard.KEY_1: - return Component.Identifier.Key._1; - case Keyboard.KEY_2: - return Component.Identifier.Key._2; - case Keyboard.KEY_3: - return Component.Identifier.Key._3; - case Keyboard.KEY_4: - return Component.Identifier.Key._4; - case Keyboard.KEY_5: - return Component.Identifier.Key._5; - case Keyboard.KEY_6: - return Component.Identifier.Key._6; - case Keyboard.KEY_7: - return Component.Identifier.Key._7; - case Keyboard.KEY_8: - return Component.Identifier.Key._8; - case Keyboard.KEY_9: - return Component.Identifier.Key._9; - case Keyboard.KEY_0: - return Component.Identifier.Key._0; - case Keyboard.KEY_MINUS: - return Component.Identifier.Key.MINUS; - case Keyboard.KEY_EQUALS: - return Component.Identifier.Key.EQUALS; - case Keyboard.KEY_BACK: - return Component.Identifier.Key.BACK; - case Keyboard.KEY_TAB: - return Component.Identifier.Key.TAB; - case Keyboard.KEY_Q: - return Component.Identifier.Key.Q; - case Keyboard.KEY_W: - return Component.Identifier.Key.W; - case Keyboard.KEY_E: - return Component.Identifier.Key.E; - case Keyboard.KEY_R: - return Component.Identifier.Key.R; - case Keyboard.KEY_T: - return Component.Identifier.Key.T; - case Keyboard.KEY_Y: - return Component.Identifier.Key.Y; - case Keyboard.KEY_U: - return Component.Identifier.Key.U; - case Keyboard.KEY_I: - return Component.Identifier.Key.I; - case Keyboard.KEY_O: - return Component.Identifier.Key.O; - case Keyboard.KEY_P: - return Component.Identifier.Key.P; - case Keyboard.KEY_LBRACKET: - return Component.Identifier.Key.LBRACKET; - case Keyboard.KEY_RBRACKET: - return Component.Identifier.Key.RBRACKET; - case Keyboard.KEY_RETURN: - return Component.Identifier.Key.RETURN; - case Keyboard.KEY_LCONTROL: - return Component.Identifier.Key.LCONTROL; - case Keyboard.KEY_A: - return Component.Identifier.Key.A; - case Keyboard.KEY_S: - return Component.Identifier.Key.S; - case Keyboard.KEY_D: - return Component.Identifier.Key.D; - case Keyboard.KEY_F: - return Component.Identifier.Key.F; - case Keyboard.KEY_G: - return Component.Identifier.Key.G; - case Keyboard.KEY_H: - return Component.Identifier.Key.H; - case Keyboard.KEY_J: - return Component.Identifier.Key.J; - case Keyboard.KEY_K: - return Component.Identifier.Key.K; - case Keyboard.KEY_L: - return Component.Identifier.Key.L; - case Keyboard.KEY_SEMICOLON: - return Component.Identifier.Key.SEMICOLON; - case Keyboard.KEY_APOSTROPHE: - return Component.Identifier.Key.APOSTROPHE; - case Keyboard.KEY_GRAVE: - return Component.Identifier.Key.GRAVE; - case Keyboard.KEY_LSHIFT: - return Component.Identifier.Key.LSHIFT; - case Keyboard.KEY_BACKSLASH: - return Component.Identifier.Key.BACKSLASH; - case Keyboard.KEY_Z: - return Component.Identifier.Key.Z; - case Keyboard.KEY_X: - return Component.Identifier.Key.X; - case Keyboard.KEY_C: - return Component.Identifier.Key.C; - case Keyboard.KEY_V: - return Component.Identifier.Key.V; - case Keyboard.KEY_B: - return Component.Identifier.Key.B; - case Keyboard.KEY_N: - return Component.Identifier.Key.N; - case Keyboard.KEY_M: - return Component.Identifier.Key.M; - case Keyboard.KEY_COMMA: - return Component.Identifier.Key.COMMA; - case Keyboard.KEY_PERIOD: - return Component.Identifier.Key.PERIOD; - case Keyboard.KEY_SLASH: - return Component.Identifier.Key.SLASH; - case Keyboard.KEY_RSHIFT: - return Component.Identifier.Key.RSHIFT; - case Keyboard.KEY_MULTIPLY: - return Component.Identifier.Key.MULTIPLY; - case Keyboard.KEY_LMENU: - return Component.Identifier.Key.LALT; - case Keyboard.KEY_SPACE: - return Component.Identifier.Key.SPACE; - case Keyboard.KEY_CAPITAL: - return Component.Identifier.Key.CAPITAL; - case Keyboard.KEY_F1: - return Component.Identifier.Key.F1; - case Keyboard.KEY_F2: - return Component.Identifier.Key.F2; - case Keyboard.KEY_F3: - return Component.Identifier.Key.F3; - case Keyboard.KEY_F4: - return Component.Identifier.Key.F4; - case Keyboard.KEY_F5: - return Component.Identifier.Key.F5; - case Keyboard.KEY_F6: - return Component.Identifier.Key.F6; - case Keyboard.KEY_F7: - return Component.Identifier.Key.F7; - case Keyboard.KEY_F8: - return Component.Identifier.Key.F8; - case Keyboard.KEY_F9: - return Component.Identifier.Key.F9; - case Keyboard.KEY_F10: - return Component.Identifier.Key.F10; - case Keyboard.KEY_NUMLOCK: - return Component.Identifier.Key.NUMLOCK; - case Keyboard.KEY_SCROLL: - return Component.Identifier.Key.SCROLL; - case Keyboard.KEY_NUMPAD7: - return Component.Identifier.Key.NUMPAD7; - case Keyboard.KEY_NUMPAD8: - return Component.Identifier.Key.NUMPAD8; - case Keyboard.KEY_NUMPAD9: - return Component.Identifier.Key.NUMPAD9; - case Keyboard.KEY_SUBTRACT: - return Component.Identifier.Key.SUBTRACT; - case Keyboard.KEY_NUMPAD4: - return Component.Identifier.Key.NUMPAD4; - case Keyboard.KEY_NUMPAD5: - return Component.Identifier.Key.NUMPAD5; - case Keyboard.KEY_NUMPAD6: - return Component.Identifier.Key.NUMPAD6; - case Keyboard.KEY_ADD: - return Component.Identifier.Key.ADD; - case Keyboard.KEY_NUMPAD1: - return Component.Identifier.Key.NUMPAD1; - case Keyboard.KEY_NUMPAD2: - return Component.Identifier.Key.NUMPAD2; - case Keyboard.KEY_NUMPAD3: - return Component.Identifier.Key.NUMPAD3; - case Keyboard.KEY_NUMPAD0: - return Component.Identifier.Key.NUMPAD0; - case Keyboard.KEY_DECIMAL: - return Component.Identifier.Key.DECIMAL; - case Keyboard.KEY_F11: - return Component.Identifier.Key.F11; - case Keyboard.KEY_F12: - return Component.Identifier.Key.F12; - case Keyboard.KEY_F13: - return Component.Identifier.Key.F13; - case Keyboard.KEY_F14: - return Component.Identifier.Key.F14; - case Keyboard.KEY_F15: - return Component.Identifier.Key.F15; - case Keyboard.KEY_KANA: - return Component.Identifier.Key.KANA; - case Keyboard.KEY_CONVERT: - return Component.Identifier.Key.CONVERT; - case Keyboard.KEY_NOCONVERT: - return Component.Identifier.Key.NOCONVERT; - case Keyboard.KEY_YEN: - return Component.Identifier.Key.YEN; - case Keyboard.KEY_NUMPADEQUALS: - return Component.Identifier.Key.NUMPADEQUAL; - case Keyboard.KEY_CIRCUMFLEX: - return Component.Identifier.Key.CIRCUMFLEX; - case Keyboard.KEY_AT: - return Component.Identifier.Key.AT; - case Keyboard.KEY_COLON: - return Component.Identifier.Key.COLON; - case Keyboard.KEY_UNDERLINE: - return Component.Identifier.Key.UNDERLINE; - case Keyboard.KEY_KANJI: - return Component.Identifier.Key.KANJI; - case Keyboard.KEY_STOP: - return Component.Identifier.Key.STOP; - case Keyboard.KEY_AX: - return Component.Identifier.Key.AX; - case Keyboard.KEY_UNLABELED: - return Component.Identifier.Key.UNLABELED; - case Keyboard.KEY_NUMPADENTER: - return Component.Identifier.Key.NUMPADENTER; - case Keyboard.KEY_RCONTROL: - return Component.Identifier.Key.RCONTROL; - case Keyboard.KEY_NUMPADCOMMA: - return Component.Identifier.Key.NUMPADCOMMA; - case Keyboard.KEY_DIVIDE: - return Component.Identifier.Key.DIVIDE; - case Keyboard.KEY_SYSRQ: - return Component.Identifier.Key.SYSRQ; - case Keyboard.KEY_RMENU: - return Component.Identifier.Key.RALT; - case Keyboard.KEY_PAUSE: - return Component.Identifier.Key.PAUSE; - case Keyboard.KEY_HOME: - return Component.Identifier.Key.HOME; - case Keyboard.KEY_UP: - return Component.Identifier.Key.UP; - case Keyboard.KEY_PRIOR: - return Component.Identifier.Key.PAGEUP; - case Keyboard.KEY_LEFT: - return Component.Identifier.Key.LEFT; - case Keyboard.KEY_RIGHT: - return Component.Identifier.Key.RIGHT; - case Keyboard.KEY_END: - return Component.Identifier.Key.END; - case Keyboard.KEY_DOWN: - return Component.Identifier.Key.DOWN; - case Keyboard.KEY_NEXT: - return Component.Identifier.Key.PAGEDOWN; - case Keyboard.KEY_INSERT: - return Component.Identifier.Key.INSERT; - case Keyboard.KEY_DELETE: - return Component.Identifier.Key.DELETE; - case Keyboard.KEY_LMETA: - return Component.Identifier.Key.LWIN; - case Keyboard.KEY_RMETA: - return Component.Identifier.Key.RWIN; - case Keyboard.KEY_APPS: - return Component.Identifier.Key.APPS; - case Keyboard.KEY_POWER: - return Component.Identifier.Key.POWER; - case Keyboard.KEY_SLEEP: - return Component.Identifier.Key.SLEEP; - default: - return Component.Identifier.Key.UNKNOWN; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java b/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java deleted file mode 100644 index c84c8548..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.jinput; - -import net.java.games.input.Controller; -import net.java.games.input.ControllerEnvironment; -import net.java.games.util.plugins.Plugin; - -/** - * @author elias - */ -public class LWJGLEnvironmentPlugin extends ControllerEnvironment implements Plugin { - private final Controller[] controllers; - - public LWJGLEnvironmentPlugin() { - this.controllers = new Controller[]{new LWJGLKeyboard(), new LWJGLMouse()}; - } - - public Controller[] getControllers() { - return controllers; - } - - public boolean isSupported() { - return true; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLKeyboard.java b/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLKeyboard.java deleted file mode 100644 index 1361892d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLKeyboard.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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.jinput; - -import net.java.games.input.AbstractComponent; -import net.java.games.input.Component; -import net.java.games.input.Controller; -import net.java.games.input.Event; -import net.java.games.input.Keyboard; -import net.java.games.input.Rumbler; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.List; - -/** - * @author elias - */ -final class LWJGLKeyboard extends Keyboard { - LWJGLKeyboard() { - super("LWJGLKeyboard", createComponents(), new Controller[]{}, new Rumbler[]{}); - } - - private static Component[] createComponents() { - List components = new ArrayList(); - Field[] vkey_fields = org.lwjgl.input.Keyboard.class.getFields(); - for ( Field vkey_field : vkey_fields ) { - try { - if (Modifier.isStatic(vkey_field.getModifiers()) && vkey_field.getType() == int.class && - vkey_field.getName().startsWith("KEY_")) { - int vkey_code = vkey_field.getInt(null); - Component.Identifier.Key key_id = KeyMap.map(vkey_code); - if (key_id != Component.Identifier.Key.UNKNOWN) - components.add(new Key(key_id, vkey_code)); - } - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - return components.toArray(new Component[components.size()]); - } - - public synchronized void pollDevice() throws IOException { - if (!org.lwjgl.input.Keyboard.isCreated()) - return; - org.lwjgl.input.Keyboard.poll(); - for ( Component component : getComponents() ) { - Key key = (Key)component; - key.update(); - } - } - - protected synchronized boolean getNextDeviceEvent(Event event) throws IOException { - if (!org.lwjgl.input.Keyboard.isCreated()) - return false; - if (!org.lwjgl.input.Keyboard.next()) - return false; - int lwjgl_key = org.lwjgl.input.Keyboard.getEventKey(); - if (lwjgl_key == org.lwjgl.input.Keyboard.KEY_NONE) - return false; - Component.Identifier.Key key_id = KeyMap.map(lwjgl_key); - if (key_id == null) - return false; - Component key = getComponent(key_id); - if (key == null) - return false; - float value = org.lwjgl.input.Keyboard.getEventKeyState() ? 1 : 0; - event.set(key, value, org.lwjgl.input.Keyboard.getEventNanoseconds()); - return true; - } - - - private static final class Key extends AbstractComponent { - private final int lwjgl_key; - private float value; - - Key(Component.Identifier.Key key_id, int lwjgl_key) { - super(key_id.getName(), key_id); - this.lwjgl_key = lwjgl_key; - } - - public void update() { - this.value = org.lwjgl.input.Keyboard.isKeyDown(lwjgl_key) ? 1 : 0; - } - - protected float poll() { - return value; - } - - public boolean isRelative() { - return false; - } - - public boolean isAnalog() { - return false; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLMouse.java b/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLMouse.java deleted file mode 100644 index 02f01b2a..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/jinput/LWJGLMouse.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 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.jinput; - -import net.java.games.input.AbstractComponent; -import net.java.games.input.Component; -import net.java.games.input.Controller; -import net.java.games.input.Event; -import net.java.games.input.Mouse; -import net.java.games.input.Rumbler; - -import java.io.IOException; - -/** - * @author elias - */ -final class LWJGLMouse extends Mouse { - private static final int EVENT_X = 1; - private static final int EVENT_Y = 2; - private static final int EVENT_WHEEL = 3; - private static final int EVENT_BUTTON = 4; - private static final int EVENT_DONE = 5; - - private int event_state = EVENT_DONE; - - LWJGLMouse() { - super("LWJGLMouse", createComponents(), new Controller[]{}, new Rumbler[]{}); - } - - private static Component[] createComponents() { - return new Component[]{new Axis(Component.Identifier.Axis.X), - new Axis(Component.Identifier.Axis.Y), - new Axis(Component.Identifier.Axis.Z), - new Button(Component.Identifier.Button.LEFT), - new Button(Component.Identifier.Button.MIDDLE), - new Button(Component.Identifier.Button.RIGHT)}; - } - - public synchronized void pollDevice() throws IOException { - if (!org.lwjgl.input.Mouse.isCreated()) - return; - org.lwjgl.input.Mouse.poll(); - for (int i = 0; i < 3; i++) - setButtonState(i); - } - - private Button map(int lwjgl_button) { - switch (lwjgl_button) { - case 0: - return (Button)getLeft(); - case 1: - return (Button)getRight(); - case 2: - return (Button)getMiddle(); - default: - return null; - } - } - - private void setButtonState(int lwjgl_button) { - Button button = map(lwjgl_button); - if (button != null) - button.setValue(org.lwjgl.input.Mouse.isButtonDown(lwjgl_button) ? 1 : 0); - } - - protected synchronized boolean getNextDeviceEvent(Event event) throws IOException { - if (!org.lwjgl.input.Mouse.isCreated()) - return false; - while (true) { - long nanos = org.lwjgl.input.Mouse.getEventNanoseconds(); - switch (event_state) { - case EVENT_X: - event_state = EVENT_Y; - int dx = org.lwjgl.input.Mouse.getEventDX(); - if (dx != 0) { - event.set(getX(), dx, nanos); - return true; - } - break; - case EVENT_Y: - event_state = EVENT_WHEEL; - /* We must negate the y coord since lwjgl uses the - * OpenGL coordinate system - */ - int dy = -org.lwjgl.input.Mouse.getEventDY(); - if (dy != 0) { - event.set(getY(), dy, nanos); - return true; - } - break; - case EVENT_WHEEL: - event_state = EVENT_BUTTON; - int dwheel = org.lwjgl.input.Mouse.getEventDWheel(); - if (dwheel != 0) { - event.set(getWheel(), dwheel, nanos); - return true; - } - break; - case EVENT_BUTTON: - event_state = EVENT_DONE; - int lwjgl_button = org.lwjgl.input.Mouse.getEventButton(); - if (lwjgl_button != -1) { - Button button = map(lwjgl_button); - if (button != null) { - event.set(button, org.lwjgl.input.Mouse.getEventButtonState() ? 1f : 0f, nanos); - return true; - } - } - break; - case EVENT_DONE: - if (!org.lwjgl.input.Mouse.next()) - return false; - event_state = EVENT_X; - break; - default: - break; - } - } - } - - static final class Axis extends AbstractComponent { - Axis(Component.Identifier.Axis axis_id) { - super(axis_id.getName(), axis_id); - } - - public boolean isRelative() { - return true; - } - - protected float poll() throws IOException { - return 0; - } - - public boolean isAnalog() { - return true; - } - } - - static final class Button extends AbstractComponent { - private float value; - - Button(Component.Identifier.Button button_id) { - super(button_id.getName(), button_id); - } - - void setValue(float value) { - this.value = value; - } - - protected float poll() throws IOException { - return value; - } - - public boolean isRelative() { - return false; - } - - public boolean isAnalog() { - return false; - } - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheLinePad.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheLinePad.java deleted file mode 100644 index bda9dc16..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheLinePad.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * When this annotation is used on a field, automatic cache-line-sized padding - * will be inserted around the field. This is useful in multi-threaded algorithms - * to avoid cache line false sharing. The annotation defaults to padding after - * the field, but can be changed to before or both before and after. It can be - * applied to both mapped object fields and POJO primitive fields. - * - * @author Spasi - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface CacheLinePad { - - /** - * When true, cache-line padding will be inserted before the field. - * - * @return true if cache-line padding will be inserted before the field - */ - boolean before() default false; - - /** - * When true, cache-line padding will be inserted after the field. - * - * @return true if cache-line padding will be inserted after the field - */ - boolean after() default true; - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheLineSize.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheLineSize.java deleted file mode 100644 index 38f54167..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheLineSize.java +++ /dev/null @@ -1,142 +0,0 @@ -package org.lwjgl.util.mapped; - -import static org.lwjgl.util.mapped.MappedHelper.ivget; -import static org.lwjgl.util.mapped.MappedHelper.ivput; - -import org.lwjgl.LWJGLUtil; -import org.lwjgl.MemoryUtil; - -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.IntBuffer; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorCompletionService; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -/** - * This micro-benchmark tries to detect the CPU's cache line size. This is - * done by exploiting cache line false sharing in multi-threaded code: - * When 2 threads simultaneously access the same cache line (and at least - * 1 access is a write), performance drops considerably. We detect this - * performance drop while decreasing the memory padding in every test step. - * - * @author Spasi - */ -final class CacheLineSize { - - private CacheLineSize() { - } - - static int getCacheLineSize() { - final int THREADS = 2; - final int REPEATS = 100000 * THREADS; - final int LOCAL_REPEATS = REPEATS / THREADS; - - // Detection will start from CacheLineMaxSize bytes. - final int MAX_SIZE = LWJGLUtil.getPrivilegedInteger("org.lwjgl.util.mapped.CacheLineMaxSize", 1024) / 4; // in # of integers - // Detection will stop when the execution time increases by more than CacheLineTimeThreshold %. - final double TIME_THRESHOLD = 1.0 + LWJGLUtil.getPrivilegedInteger("org.lwjgl.util.mapped.CacheLineTimeThreshold", 50) / 100.0; - - final ExecutorService executorService = Executors.newFixedThreadPool(THREADS); - final ExecutorCompletionService completionService = new ExecutorCompletionService(executorService); - - try { - // We need to use a NIO buffer in order to guarantee memory alignment. - final IntBuffer memory = getMemory(MAX_SIZE); - - // -- WARMUP -- - - final int WARMUP = 10; - for ( int i = 0; i < WARMUP; i++ ) - doTest(THREADS, LOCAL_REPEATS, 0, memory, completionService); - - // -- CACHE LINE SIZE DETECTION -- - - long totalTime = 0; - int count = 0; - int cacheLineSize = 64; // fallback to the most common size these days - boolean found = false; - for ( int i = MAX_SIZE; i >= 1; i >>= 1 ) { - final long time = doTest(THREADS, LOCAL_REPEATS, i, memory, completionService); - if ( totalTime > 0 ) { // Ignore first run - final long avgTime = totalTime / count; - if ( (double)time / (double)avgTime > TIME_THRESHOLD ) { // Try to detect a noticeable jump in execution time - cacheLineSize = (i << 1) * 4; - found = true; - break; - } - } - totalTime += time; - count++; - } - - if ( LWJGLUtil.DEBUG ) { - if ( found ) - LWJGLUtil.log("Cache line size detected: " + cacheLineSize + " bytes"); - else - LWJGLUtil.log("Failed to detect cache line size, assuming " + cacheLineSize + " bytes"); - } - - return cacheLineSize; - } finally { - executorService.shutdown(); - } - } - - public static void main(String[] args) { - CacheUtil.getCacheLineSize(); - } - - static long memoryLoop(final int index, final int repeats, final IntBuffer memory, final int padding) { - final long address = MemoryUtil.getAddress(memory) + (index * padding * 4); - - final long time = System.nanoTime(); - for ( int i = 0; i < repeats; i++ ) { - // Use volatile access to avoid server VM optimizations. - ivput(ivget(address) + 1, address); - } - - return System.nanoTime() - time; - } - - private static IntBuffer getMemory(final int START_SIZE) { - final int PAGE_SIZE = MappedObjectUnsafe.INSTANCE.pageSize(); - - final ByteBuffer buffer = ByteBuffer.allocateDirect((START_SIZE * 4) + PAGE_SIZE).order(ByteOrder.nativeOrder()); - - // Align to page and, consequently, to cache line. Otherwise results will be inconsistent. - if ( MemoryUtil.getAddress(buffer) % PAGE_SIZE != 0 ) { - // Round up to page boundary - buffer.position(PAGE_SIZE - (int)(MemoryUtil.getAddress(buffer) & (PAGE_SIZE - 1))); - } - - return buffer.asIntBuffer(); - } - - private static long doTest(final int threads, final int repeats, final int padding, final IntBuffer memory, final ExecutorCompletionService completionService) { - for ( int i = 0; i < threads; i++ ) - submitTest(completionService, i, repeats, memory, padding); - return waitForResults(threads, completionService); - } - - private static void submitTest(final ExecutorCompletionService completionService, final int index, final int repeats, final IntBuffer memory, final int padding) { - completionService.submit(new Callable() { - public Long call() throws Exception { - return memoryLoop(index, repeats, memory, padding); - } - }); - } - - private static long waitForResults(final int count, final ExecutorCompletionService completionService) { - try { - long totalTime = 0; - for ( int i = 0; i < count; i++ ) - totalTime += completionService.take().get(); - return totalTime; - } catch (Exception e) { - throw new RuntimeException(e); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheUtil.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheUtil.java deleted file mode 100644 index 3c87440b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/CacheUtil.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import org.lwjgl.LWJGLUtil; -import org.lwjgl.MemoryUtil; -import org.lwjgl.PointerBuffer; - -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.CharBuffer; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.LongBuffer; -import java.nio.ShortBuffer; - -/** - * This class provides utility methods for allocating cache-line-aligned - * NIO buffers. The CPU cache line size is detected using a micro-benchmark - * that exploits the performation degredation that occurs when different - * threads write to different locations of the same cache line. The detection - * should be reasonably robust on both the server and client VM, but there - * are a few system properties that can be used to tune it. - * - * @author Spasi - */ -public final class CacheUtil { - - private static final int CACHE_LINE_SIZE; - - static { - final Integer size = LWJGLUtil.getPrivilegedInteger("org.lwjgl.util.mapped.CacheLineSize"); // forces a specific cache line size - - if ( size != null ) { - if ( size < 1 ) - throw new IllegalStateException("Invalid CacheLineSize specified: " + size); - CACHE_LINE_SIZE = size; - } else if ( Runtime.getRuntime().availableProcessors() == 1 ) { // We cannot use false sharing to detect it - /* - Spasi: - - I have implemented a single-threaded benchmark for this, but it requires - lots of memory allocations and could not tune it for both the client and - server VM. It's not a big deal anyway, 64 bytes should be ok for any - single-core CPU. - */ - if ( LWJGLUtil.DEBUG ) - LWJGLUtil.log("Cannot detect cache line size on single-core CPUs, assuming 64 bytes."); - CACHE_LINE_SIZE = 64; - } else - CACHE_LINE_SIZE = CacheLineSize.getCacheLineSize(); - } - - private CacheUtil() { - } - - /** - * Returns the CPU cache line size, in number of bytes. - * - * @return the cache line size - */ - public static int getCacheLineSize() { - return CACHE_LINE_SIZE; - } - - /** - * Construct a direct, native-ordered and cache-line-aligned bytebuffer with the specified size. - * - * @param size The size, in bytes - * - * @return a ByteBuffer - */ - public static ByteBuffer createByteBuffer(int size) { - ByteBuffer buffer = ByteBuffer.allocateDirect(size + CACHE_LINE_SIZE); - - // Align to cache line. - if ( MemoryUtil.getAddress(buffer) % CACHE_LINE_SIZE != 0 ) { - // Round up to cache line boundary - buffer.position(CACHE_LINE_SIZE - (int)(MemoryUtil.getAddress(buffer) & (CACHE_LINE_SIZE - 1))); - } - - buffer.limit(buffer.position() + size); - return buffer.slice().order(ByteOrder.nativeOrder()); - } - - /** - * Construct a direct, native-ordered and cache-line-aligned shortbuffer with the specified number - * of elements. - * - * @param size The size, in shorts - * - * @return a ShortBuffer - */ - public static ShortBuffer createShortBuffer(int size) { - return createByteBuffer(size << 1).asShortBuffer(); - } - - /** - * Construct a direct, native-ordered and cache-line-aligned charbuffer with the specified number - * of elements. - * - * @param size The size, in chars - * - * @return an CharBuffer - */ - public static CharBuffer createCharBuffer(int size) { - return createByteBuffer(size << 1).asCharBuffer(); - } - - /** - * Construct a direct, native-ordered and cache-line-aligned intbuffer with the specified number - * of elements. - * - * @param size The size, in ints - * - * @return an IntBuffer - */ - public static IntBuffer createIntBuffer(int size) { - return createByteBuffer(size << 2).asIntBuffer(); - } - - /** - * Construct a direct, native-ordered and cache-line-aligned longbuffer with the specified number - * of elements. - * - * @param size The size, in longs - * - * @return an LongBuffer - */ - public static LongBuffer createLongBuffer(int size) { - return createByteBuffer(size << 3).asLongBuffer(); - } - - /** - * Construct a direct, native-ordered and cache-line-aligned floatbuffer with the specified number - * of elements. - * - * @param size The size, in floats - * - * @return a FloatBuffer - */ - public static FloatBuffer createFloatBuffer(int size) { - return createByteBuffer(size << 2).asFloatBuffer(); - } - - /** - * Construct a direct, native-ordered and cache-line-aligned doublebuffer with the specified number - * of elements. - * - * @param size The size, in floats - * - * @return a FloatBuffer - */ - public static DoubleBuffer createDoubleBuffer(int size) { - return createByteBuffer(size << 3).asDoubleBuffer(); - } - - /** - * Construct a cache-line-aligned PointerBuffer with the specified number - * of elements. - * - * @param size The size, in memory addresses - * - * @return a PointerBuffer - */ - public static PointerBuffer createPointerBuffer(int size) { - return new PointerBuffer(createByteBuffer(size * PointerBuffer.getPointerSize())); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedField.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedField.java deleted file mode 100644 index c31f4023..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedField.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * This annotation can be used on fields of {@link MappedObject} subclasses, - * to manually specify byte offsets and lengths. This is useful when the - * mapped fields require custom alignment. {@link java.nio.ByteBuffer} - * fields are required to have this annotation with a hardcoded byte length. - * - * @author Riven - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface MappedField { - - /** - * Specifies the field byte offset within the mapped object. - * - * @return the field byte offset - */ - long byteOffset() default -1; - - /** - * Specifies the field byte length. Required for {@link java.nio.ByteBuffer} fields. - * - * @return the field byte length - */ - long byteLength() default -1; - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedForeach.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedForeach.java deleted file mode 100644 index 750cf59b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedForeach.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import java.util.Iterator; - -/** - * Iterable implementation for {@link MappedObject}. - * - * @author Riven - */ -final class MappedForeach implements Iterable { - - final T mapped; - final int elementCount; - - MappedForeach(T mapped, int elementCount) { - this.mapped = mapped; - this.elementCount = elementCount; - } - - public Iterator iterator() { - return new Iterator() { - - private int index; - - public boolean hasNext() { - return this.index < (MappedForeach.this.elementCount); - } - - public T next() { - mapped.setViewAddress(mapped.getViewAddress(this.index++)); - return mapped; - } - - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedHelper.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedHelper.java deleted file mode 100644 index b104096c..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedHelper.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import static org.lwjgl.util.mapped.MappedObjectUnsafe.INSTANCE; - -import org.lwjgl.LWJGLUtil; -import org.lwjgl.MemoryUtil; - -import java.nio.ByteBuffer; - -/** - * [INTERNAL USE ONLY] - *

    - * Helper class used by the bytecode transformer. - * - * @author Riven - */ -public class MappedHelper { - - public static void setup(MappedObject mo, ByteBuffer buffer, int align, int sizeof) { - if ( LWJGLUtil.CHECKS && mo.baseAddress != 0L ) - throw new IllegalStateException("this method should not be called by user-code"); - - if ( LWJGLUtil.CHECKS && !buffer.isDirect() ) - throw new IllegalArgumentException("bytebuffer must be direct"); - mo.preventGC = buffer; - - if ( LWJGLUtil.CHECKS && align <= 0 ) - throw new IllegalArgumentException("invalid alignment"); - - if ( LWJGLUtil.CHECKS && (sizeof <= 0 || sizeof % align != 0) ) - throw new IllegalStateException("sizeof not a multiple of alignment"); - - long addr = MemoryUtil.getAddress(buffer); - if ( LWJGLUtil.CHECKS && addr % align != 0 ) - throw new IllegalStateException("buffer address not aligned on " + align + " bytes"); - - mo.baseAddress = mo.viewAddress = addr; - } - - public static void checkAddress(long viewAddress, MappedObject mapped) { - mapped.checkAddress(viewAddress); - } - - public static void put_views(MappedSet2 set, int view) { - set.view(view); - } - - public static void put_views(MappedSet3 set, int view) { - set.view(view); - } - - public static void put_views(MappedSet4 set, int view) { - set.view(view); - } - - public static void put_view(MappedObject mapped, int view, int sizeof) { - mapped.setViewAddress(mapped.baseAddress + view * sizeof); - } - - public static int get_view(MappedObject mapped, int sizeof) { - return (int)(mapped.viewAddress - mapped.baseAddress) / sizeof; - } - - public static void put_view_shift(MappedObject mapped, int view, int sizeof_shift) { - mapped.setViewAddress(mapped.baseAddress + (view << sizeof_shift)); - } - - public static int get_view_shift(MappedObject mapped, int sizeof_shift) { - return ((int)(mapped.viewAddress - mapped.baseAddress)) >> sizeof_shift; - } - - public static void put_view_next(MappedObject mapped, int sizeof) { - mapped.setViewAddress(mapped.viewAddress + sizeof); - } - - public static MappedObject dup(MappedObject src, MappedObject dst) { - dst.baseAddress = src.baseAddress; - dst.viewAddress = src.viewAddress; - dst.preventGC = src.preventGC; - return dst; - } - - public static MappedObject slice(MappedObject src, MappedObject dst) { - dst.baseAddress = src.viewAddress; // ! - dst.viewAddress = src.viewAddress; - dst.preventGC = src.preventGC; - return dst; - } - - public static void copy(MappedObject src, MappedObject dst, int bytes) { - if ( MappedObject.CHECKS ) { - src.checkRange(bytes); - dst.checkRange(bytes); - } - - INSTANCE.copyMemory(src.viewAddress, dst.viewAddress, bytes); - } - - public static ByteBuffer newBuffer(long address, int capacity) { - return MappedObjectUnsafe.newBuffer(address, capacity); - } - - // ---- primitive fields read/write - - // byte - - public static void bput(byte value, long addr) { - INSTANCE.putByte(addr, value); - } - - public static void bput(MappedObject mapped, byte value, int fieldOffset) { - INSTANCE.putByte(mapped.viewAddress + fieldOffset, value); - } - - public static byte bget(long addr) { - return INSTANCE.getByte(addr); - } - - public static byte bget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getByte(mapped.viewAddress + fieldOffset); - } - - public static void bvput(byte value, long addr) { - INSTANCE.putByteVolatile(null, addr, value); - } - - public static void bvput(MappedObject mapped, byte value, int fieldOffset) { - INSTANCE.putByteVolatile(null, mapped.viewAddress + fieldOffset, value); - } - - public static byte bvget(long addr) { - return INSTANCE.getByteVolatile(null, addr); - } - - public static byte bvget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getByteVolatile(null, mapped.viewAddress + fieldOffset); - } - - // short - - public static void sput(short value, long addr) { - INSTANCE.putShort(addr, value); - } - - public static void sput(MappedObject mapped, short value, int fieldOffset) { - INSTANCE.putShort(mapped.viewAddress + fieldOffset, value); - } - - public static short sget(long addr) { - return INSTANCE.getShort(addr); - } - - public static short sget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getShort(mapped.viewAddress + fieldOffset); - } - - public static void svput(short value, long addr) { - INSTANCE.putShortVolatile(null, addr, value); - } - - public static void svput(MappedObject mapped, short value, int fieldOffset) { - INSTANCE.putShortVolatile(null, mapped.viewAddress + fieldOffset, value); - } - - public static short svget(long addr) { - return INSTANCE.getShortVolatile(null, addr); - } - - public static short svget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getShortVolatile(null, mapped.viewAddress + fieldOffset); - } - - // char - - public static void cput(char value, long addr) { - INSTANCE.putChar(addr, value); - } - - public static void cput(MappedObject mapped, char value, int fieldOffset) { - INSTANCE.putChar(mapped.viewAddress + fieldOffset, value); - } - - public static char cget(long addr) { - return INSTANCE.getChar(addr); - } - - public static char cget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getChar(mapped.viewAddress + fieldOffset); - } - - public static void cvput(char value, long addr) { - INSTANCE.putCharVolatile(null, addr, value); - } - - public static void cvput(MappedObject mapped, char value, int fieldOffset) { - INSTANCE.putCharVolatile(null, mapped.viewAddress + fieldOffset, value); - } - - public static char cvget(long addr) { - return INSTANCE.getCharVolatile(null, addr); - } - - public static char cvget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getCharVolatile(null, mapped.viewAddress + fieldOffset); - } - - // int - - public static void iput(int value, long addr) { - INSTANCE.putInt(addr, value); - } - - public static void iput(MappedObject mapped, int value, int fieldOffset) { - INSTANCE.putInt(mapped.viewAddress + fieldOffset, value); - } - - public static int iget(long address) { - return INSTANCE.getInt(address); - } - - public static int iget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getInt(mapped.viewAddress + fieldOffset); - } - - public static void ivput(int value, long addr) { - INSTANCE.putIntVolatile(null, addr, value); - } - - public static void ivput(MappedObject mapped, int value, int fieldOffset) { - INSTANCE.putIntVolatile(null, mapped.viewAddress + fieldOffset, value); - } - - public static int ivget(long address) { - return INSTANCE.getIntVolatile(null, address); - } - - public static int ivget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getIntVolatile(null, mapped.viewAddress + fieldOffset); - } - - // float - - public static void fput(float value, long addr) { - INSTANCE.putFloat(addr, value); - } - - public static void fput(MappedObject mapped, float value, int fieldOffset) { - INSTANCE.putFloat(mapped.viewAddress + fieldOffset, value); - } - - public static float fget(long addr) { - return INSTANCE.getFloat(addr); - } - - public static float fget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getFloat(mapped.viewAddress + fieldOffset); - } - - public static void fvput(float value, long addr) { - INSTANCE.putFloatVolatile(null, addr, value); - } - - public static void fvput(MappedObject mapped, float value, int fieldOffset) { - INSTANCE.putFloatVolatile(null, mapped.viewAddress + fieldOffset, value); - } - - public static float fvget(long addr) { - return INSTANCE.getFloatVolatile(null, addr); - } - - public static float fvget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getFloatVolatile(null, mapped.viewAddress + fieldOffset); - } - - // long - - public static void jput(long value, long addr) { - INSTANCE.putLong(addr, value); - } - - public static void jput(MappedObject mapped, long value, int fieldOffset) { - INSTANCE.putLong(mapped.viewAddress + fieldOffset, value); - } - - public static long jget(long addr) { - return INSTANCE.getLong(addr); - } - - public static long jget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getLong(mapped.viewAddress + fieldOffset); - } - - public static void jvput(long value, long addr) { - INSTANCE.putLongVolatile(null, addr, value); - } - - public static void jvput(MappedObject mapped, long value, int fieldOffset) { - INSTANCE.putLongVolatile(null, mapped.viewAddress + fieldOffset, value); - } - - public static long jvget(long addr) { - return INSTANCE.getLongVolatile(null, addr); - } - - public static long jvget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getLongVolatile(null, mapped.viewAddress + fieldOffset); - } - - // address - - public static void aput(long value, long addr) { - INSTANCE.putAddress(addr, value); - } - - public static void aput(MappedObject mapped, long value, int fieldOffset) { - INSTANCE.putAddress(mapped.viewAddress + fieldOffset, value); - } - - public static long aget(long addr) { - return INSTANCE.getAddress(addr); - } - - public static long aget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getAddress(mapped.viewAddress + fieldOffset); - } - - // double - - public static void dput(double value, long addr) { - INSTANCE.putDouble(addr, value); - } - - public static void dput(MappedObject mapped, double value, int fieldOffset) { - INSTANCE.putDouble(mapped.viewAddress + fieldOffset, value); - } - - public static double dget(long addr) { - return INSTANCE.getDouble(addr); - } - - public static double dget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getDouble(mapped.viewAddress + fieldOffset); - } - - public static void dvput(double value, long addr) { - INSTANCE.putDoubleVolatile(null, addr, value); - } - - public static void dvput(MappedObject mapped, double value, int fieldOffset) { - INSTANCE.putDoubleVolatile(null, mapped.viewAddress + fieldOffset, value); - } - - public static double dvget(long addr) { - return INSTANCE.getDoubleVolatile(null, addr); - } - - public static double dvget(MappedObject mapped, int fieldOffset) { - return INSTANCE.getDoubleVolatile(null, mapped.viewAddress + fieldOffset); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObject.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObject.java deleted file mode 100644 index bbeba444..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObject.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import org.lwjgl.LWJGLUtil; -import org.lwjgl.MemoryUtil; - -import java.nio.BufferOverflowException; -import java.nio.ByteBuffer; - -/** - * Base superclass of all mapped objects. Classes that require - * data mapping should extend this class and registered with - * {@link MappedObjectTransformer#register(Class)}. - *

    - * Subclasses may only specify the default constructor. Any code - * inside that constructor is optional, but will not run when the - * view is instantiated, see {@link #runViewConstructor()}. - *

    - * Bounds checking may be enabled through a JVM system property: org.lwjgl.util.mapped.Checks=true - * - * @author Riven - */ -public abstract class MappedObject { - - static final boolean CHECKS = LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.Checks"); - - protected MappedObject() { - // - } - - /** The mapped object base memory address, in bytes. Read-only. */ - public long baseAddress; - - /** The mapped object view memory address, in bytes. Read-only. */ - public long viewAddress; - - /** The mapped buffer. */ - ByteBuffer preventGC; - - /** - * Holds the value of sizeof of the sub-type of this MappedObject
    - *
    - * The behavior of this (transformed) method does not follow the normal Java behavior.
    - * Vec2.SIZEOF will yield 8 (2 floats)
    - * Vec3.SIZEOF will yield 12 (3 floats)
    - * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
    - * Using Java 5.0's static-import on this method will break functionality. - */ - public static int SIZEOF = -1; // any method that calls these field will have its call-site modified ('final' per subtype) - - /** - * The mapped object view offset, in elements. Read/write. - * This is a virtual field, used as a convenient getter/setter for {@see viewAddress}. - */ - public int view; - - protected final long getViewAddress(final int view) { - // No call-site modification for this, we override in every subclass instead, - // so that we can use it in MappedForeach. - throw new InternalError("type not registered"); - } - - public final void setViewAddress(final long address) { - if ( CHECKS ) - checkAddress(address); - this.viewAddress = address; - } - - final void checkAddress(final long address) { - final long base = MemoryUtil.getAddress0(preventGC); - final int offset = (int)(address - base); - if ( address < base || preventGC.capacity() < (offset + getSizeof()) ) - throw new IndexOutOfBoundsException(Integer.toString(offset / getSizeof())); - } - - final void checkRange(final int bytes) { - if ( bytes < 0 ) - throw new IllegalArgumentException(); - - if ( preventGC.capacity() < (viewAddress - MemoryUtil.getAddress0(preventGC) + bytes) ) - throw new BufferOverflowException(); - } - - /** The mapped object memory alignment, in bytes. Read-only. */ - /** - * Returns the mapped object memory alignment, in bytes. - * - * @return the memory alignment - */ - public final int getAlign() { - // No call-site modification for this, we override in every subclass instead. - throw new InternalError("type not registered"); - } - - /** - * Returns the mapped object memory sizeof, in bytes. - * - * @return the sizeof value - */ - public final int getSizeof() { - // No call-site modification for this, we override in every subclass instead. - throw new InternalError("type not registered"); - } - - /** - * Returns the number of mapped objects that fit in the mapped buffer. - * - * @return the mapped object capacity - */ - public final int capacity() { - // No call-site modification for this, we override in every subclass instead. - throw new InternalError("type not registered"); - } - - /** - * Creates a MappedObject instance, mapping the memory region of the specified direct ByteBuffer. - *

    - * The behavior of this (transformed) method does not follow the normal Java behavior.
    - * Vec2.map(buffer) will return a mapped Vec2 instance.
    - * Vec3.map(buffer) will return a mapped Vec3 instance.
    - * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
    - * Using Java 5.0's static-import on this method will break functionality. - */ - @SuppressWarnings("unused") - public static T map(ByteBuffer bb) { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Creates a MappedObject instance, mapping the memory region specified. This is useful for mapping - * arbitrary regions in memory, e.g. OpenCL CLMem objects, without creating a ByteBuffer first. - *

    - * The behavior of this (transformed) method does not follow the normal Java behavior.
    - * Vec2.map(buffer) will return a mapped Vec2 instance.
    - * Vec3.map(buffer) will return a mapped Vec3 instance.
    - * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
    - * Using Java 5.0's static-import on this method will break functionality. - */ - @SuppressWarnings("unused") - public static T map(long address, int capacity) { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Creates a MappedObject instance, mapping the memory region of an allocated direct ByteBuffer with a capacity of elementCount*SIZEOF - *

    - * The behavior of this (transformed) method does not follow the normal Java behavior.
    - * Vec2.malloc(int) will return a mapped Vec2 instance.
    - * Vec3.malloc(int) will return a mapped Vec3 instance.
    - * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
    - * Using Java 5.0's static-import on this method will break functionality. - */ - @SuppressWarnings("unused") - public static T malloc(int elementCount) { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Creates an identical new MappedObject instance, comparable to the - * contract of {@link ByteBuffer#duplicate}. This is useful when more than one - * views of the mapped object are required at the same time, e.g. in - * multithreaded access. - */ - public final T dup() { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Creates a new MappedObject instance, with a base offset equal to - * the offset of the current view, comparable to the contract of {@link ByteBuffer#slice}. - */ - public final T slice() { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Any code in the default constructor will not run automatically. This method - * can be used to execute that code on the current view. - */ - public final void runViewConstructor() { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** Moves the current view to the next element. */ - public final void next() { - // No call-site modification for this, we override in every subclass instead, - // so that we can use it in MappedSetX. - throw new InternalError("type not registered"); - } - - /** - * Copies and amount of SIZEOF - padding bytes, from the current - * mapped object, to the specified mapped object. - */ - @SuppressWarnings("unused") - public final void copyTo(T target) { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Copies and amount of SIZEOF * instances bytes, from the - * current mapped object, to the specified mapped object. Note that - * this includes any padding bytes that are part of SIZEOF. - */ - @SuppressWarnings("unused") - public final void copyRange(T target, int instances) { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Creates an {@link Iterable} that will step through - * capacity() views, leaving the view at - * the last valid value.
    - *

    - * For convenience you are encouraged to static-import this specific method: - * import static org.lwjgl.util.mapped.MappedObject.foreach; - */ - public static Iterable foreach(T mapped) { - return foreach(mapped, mapped.capacity()); - } - - /** - * Creates an {@link Iterable} that will step through - * elementCount views, leaving the view at - * the last valid value.
    - *

    - * For convenience you are encouraged to static-import this specific method: - * import static org.lwjgl.util.mapped.MappedObject.foreach; - */ - public static Iterable foreach(T mapped, int elementCount) { - return new MappedForeach(mapped, elementCount); - } - - @SuppressWarnings("unused") - public final T[] asArray() { - // any method that calls this method will have its call-site modified - throw new InternalError("type not registered"); - } - - /** - * Returns the {@link ByteBuffer} that backs this mapped object. - * - * @return the backing buffer - */ - public final ByteBuffer backingByteBuffer() { - return this.preventGC; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java deleted file mode 100644 index 4653a302..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import org.lwjgl.LWJGLUtil; - -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.URLClassLoader; - -/** - * This classloader is responsible for applying the bytecode transformation to mapped objects. - * The transformation can either be applied using a Java agent, or with the convenient {@link #fork} method. - * - * @author Riven - */ -public class MappedObjectClassLoader extends URLClassLoader { - - static final String MAPPEDOBJECT_PACKAGE_PREFIX = MappedObjectClassLoader.class.getPackage().getName() + "."; - - static boolean FORKED; - - /** - * Forks the specified class containing a main method, passing the specified arguments. - * - * @param mainClass the class containing the main method - * @param args the arguments to pass - * - * @return true if the fork was successful. - */ - public static boolean fork(Class mainClass, String[] args) { - if ( FORKED ) { - return false; - } - - FORKED = true; - - try { - MappedObjectClassLoader loader = new MappedObjectClassLoader(mainClass); - loader.loadMappedObject(); - - Class replacedMainClass = loader.loadClass(mainClass.getName()); - Method mainMethod = replacedMainClass.getMethod("main", String[].class); - mainMethod.invoke(null, new Object[] { args }); - } catch (InvocationTargetException exc) { - Thread.currentThread().getUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), exc.getCause()); - } catch (Throwable cause) { - throw new Error("failed to fork", cause); - } - - return true; - } - - private MappedObjectClassLoader(Class mainClass) { - super(((URLClassLoader)mainClass.getClassLoader()).getURLs()); - } - - protected synchronized Class loadMappedObject() throws ClassNotFoundException { - final String name = MappedObject.class.getName(); - String className = name.replace('.', '/'); - - byte[] bytecode = readStream(this.getResourceAsStream(className.concat(".class"))); - - long t0 = System.nanoTime(); - bytecode = MappedObjectTransformer.transformMappedObject(bytecode); - long t1 = System.nanoTime(); - total_time_transforming += (t1 - t0); - - if ( MappedObjectTransformer.PRINT_ACTIVITY ) - printActivity(className, t0, t1); - - Class clazz = super.defineClass(name, bytecode, 0, bytecode.length); - resolveClass(clazz); - return clazz; - } - - private static long total_time_transforming; - - @Override - protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException { - if ( name.startsWith("java.") - || name.startsWith("javax.") - || name.startsWith("sun.") - || name.startsWith("sunw.") - || name.startsWith("org.objectweb.asm.") - ) - return super.loadClass(name, resolve); - - final String className = name.replace('.', '/'); - final boolean inThisPackage = name.startsWith(MAPPEDOBJECT_PACKAGE_PREFIX); - - if ( inThisPackage && ( - name.equals(MappedObjectClassLoader.class.getName()) - || name.equals((MappedObjectTransformer.class.getName())) - || name.equals((CacheUtil.class.getName())) - ) ) - return super.loadClass(name, resolve); - - byte[] bytecode = readStream(this.getResourceAsStream(className.concat(".class"))); - - // Classes in this package do not get transformed, but need to go through here because we have transformed MappedObject. - if ( !(inThisPackage && name.substring(MAPPEDOBJECT_PACKAGE_PREFIX.length()).indexOf('.') == -1) ) { - long t0 = System.nanoTime(); - final byte[] newBytecode = MappedObjectTransformer.transformMappedAPI(className, bytecode); - long t1 = System.nanoTime(); - - total_time_transforming += (t1 - t0); - - if ( bytecode != newBytecode ) { - bytecode = newBytecode; - if ( MappedObjectTransformer.PRINT_ACTIVITY ) - printActivity(className, t0, t1); - } - } - - Class clazz = super.defineClass(name, bytecode, 0, bytecode.length); - if ( resolve ) - resolveClass(clazz); - return clazz; - } - - private static void printActivity(final String className, final long t0, final long t1) { - final StringBuilder msg = new StringBuilder(MappedObjectClassLoader.class.getSimpleName() + ": " + className); - - if ( MappedObjectTransformer.PRINT_TIMING ) - msg.append("\n\ttransforming took " + (t1 - t0) / 1000 + " micros (total: " + (total_time_transforming / 1000 / 1000) + "ms)"); - - LWJGLUtil.log(msg); - } - - private static byte[] readStream(InputStream in) { - byte[] bytecode = new byte[256]; - int len = 0; - try { - while ( true ) { - if ( bytecode.length == len ) - bytecode = copyOf(bytecode, len * 2); - int got = in.read(bytecode, len, bytecode.length - len); - if ( got == -1 ) - break; - len += got; - } - } catch (IOException exc) { - // stop! - } finally { - try { - in.close(); - } catch (IOException exc) { - // ignore... - } - } - return copyOf(bytecode, len); - } - - private static byte[] copyOf(byte[] original, int newLength) { - byte[] copy = new byte[newLength]; - System.arraycopy(original, 0, copy, 0, Math.min(original.length, newLength)); - return copy; - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectTransformer.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectTransformer.java deleted file mode 100644 index ba12c9a3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectTransformer.java +++ /dev/null @@ -1,1340 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import static org.objectweb.asm.ClassWriter.*; -import static org.objectweb.asm.Opcodes.*; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.MemoryUtil; -import org.objectweb.asm.ClassAdapter; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.ClassWriter; -import org.objectweb.asm.FieldVisitor; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.Type; -import org.objectweb.asm.tree.AbstractInsnNode; -import org.objectweb.asm.tree.AnnotationNode; -import org.objectweb.asm.tree.FieldInsnNode; -import org.objectweb.asm.tree.FieldNode; -import org.objectweb.asm.tree.InsnList; -import org.objectweb.asm.tree.InsnNode; -import org.objectweb.asm.tree.IntInsnNode; -import org.objectweb.asm.tree.LdcInsnNode; -import org.objectweb.asm.tree.MethodInsnNode; -import org.objectweb.asm.tree.MethodNode; -import org.objectweb.asm.tree.TypeInsnNode; -import org.objectweb.asm.tree.VarInsnNode; -import org.objectweb.asm.tree.analysis.Analyzer; -import org.objectweb.asm.tree.analysis.AnalyzerException; -import org.objectweb.asm.tree.analysis.BasicValue; -import org.objectweb.asm.tree.analysis.Frame; -import org.objectweb.asm.tree.analysis.SimpleVerifier; -import org.objectweb.asm.util.TraceClassVisitor; - -import java.io.PrintWriter; -import java.io.StringWriter; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.util.HashMap; -import java.util.Map; - -/** - * This class implements the bytecode transformation that mapped object go through. - * Mapped object classes need to first be registered with the transformer, see {@link #register(Class)}. - *

    - * The transformer supports some debugging tools, enabled through JVM system properties:
    - * org.lwjgl.util.mapped.PrintTiming=true, prints timing information for the transformation step.
    - * org.lwjgl.util.mapped.PrintActivity=true, prints activity information.
    - * org.lwjgl.util.mapped.PrintBytecode=true, prints the transformed bytecode.
    - * org.lwjgl.util.Debug must also be set to true for the above to work. - * - * @author Riven - */ -public class MappedObjectTransformer { - - static final boolean PRINT_ACTIVITY = LWJGLUtil.DEBUG && LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.PrintActivity"); - static final boolean PRINT_TIMING = PRINT_ACTIVITY && LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.PrintTiming"); - static final boolean PRINT_BYTECODE = LWJGLUtil.DEBUG && LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.PrintBytecode"); - - static final Map className_to_subtype; - - static final String MAPPED_OBJECT_JVM = jvmClassName(MappedObject.class); - static final String MAPPED_HELPER_JVM = jvmClassName(MappedHelper.class); - - static final String MAPPEDSET_PREFIX = jvmClassName(MappedSet.class); - static final String MAPPED_SET2_JVM = jvmClassName(MappedSet2.class); - static final String MAPPED_SET3_JVM = jvmClassName(MappedSet3.class); - static final String MAPPED_SET4_JVM = jvmClassName(MappedSet4.class); - - static final String CACHE_LINE_PAD_JVM = "L" + jvmClassName(CacheLinePad.class) + ";"; - - // Public methods - static final String VIEWADDRESS_METHOD_NAME = "getViewAddress"; - static final String NEXT_METHOD_NAME = "next"; - static final String ALIGN_METHOD_NAME = "getAlign"; - static final String SIZEOF_METHOD_NAME = "getSizeof"; - static final String CAPACITY_METHOD_NAME = "capacity"; // Used for .asArray().length - - // Internal methods - static final String VIEW_CONSTRUCTOR_NAME = "constructView$LWJGL"; // Used by runViewConstructor - - static final Map OPCODE_TO_NAME = new HashMap(); - static final Map INSNTYPE_TO_NAME = new HashMap(); - - static boolean is_currently_computing_frames; - - static { - getClassEnums(Opcodes.class, OPCODE_TO_NAME, "V1_", "ACC_", "T_", "F_", "MH_"); - getClassEnums(AbstractInsnNode.class, INSNTYPE_TO_NAME); - - className_to_subtype = new HashMap(); - - { - // HACK: required for mapped.view++ - // - // because the compiler generates: - // => GETFIELD MappedObject.view - // => ICONST_1 - // => IADD - // => PUTFIELD MyMappedType.view - // - // instead of: - // => GETFIELD MyMappedType.view - // => ICONST_1 - // => IADD - // => PUTFIELD MyMappedType.view - // - className_to_subtype.put(MAPPED_OBJECT_JVM, new MappedSubtypeInfo(MAPPED_OBJECT_JVM, null, -1, -1, -1, false)); - } - - final String vmName = System.getProperty("java.vm.name"); - if ( vmName != null && !vmName.contains("Server") ) { - System.err.println("Warning: " + MappedObject.class.getSimpleName() + "s have inferiour performance on Client VMs, please consider switching to a Server VM."); - } - } - - /** - * Registers a class as a mapped object. - * The class must extend {@link MappedObject} and be annotated with {@link MappedField}. - * - * @param type the mapped object class. - */ - public static void register(Class type) { - if ( MappedObjectClassLoader.FORKED ) - return; - - final MappedType mapped = type.getAnnotation(MappedType.class); - - if ( mapped != null && mapped.padding() < 0 ) - throw new ClassFormatError("Invalid mapped type padding: " + mapped.padding()); - - if ( type.getEnclosingClass() != null && !Modifier.isStatic(type.getModifiers()) ) - throw new InternalError("only top-level or static inner classes are allowed"); - - final String className = jvmClassName(type); - final Map fields = new HashMap(); - - long sizeof = 0; - for ( Field field : type.getDeclaredFields() ) { - FieldInfo fieldInfo = registerField(mapped == null || mapped.autoGenerateOffsets(), className, sizeof, field); - if ( fieldInfo == null ) - continue; - - fields.put(field.getName(), fieldInfo); - - sizeof = Math.max(sizeof, fieldInfo.offset + fieldInfo.lengthPadded); - } - - int align = 4; - int padding = 0; - boolean cacheLinePadded = false; - - if ( mapped != null ) { - align = mapped.align(); - if ( mapped.cacheLinePadding() ) { - if ( mapped.padding() != 0 ) - throw new ClassFormatError("Mapped type padding cannot be specified together with cacheLinePadding."); - - final int cacheLineMod = (int)(sizeof % CacheUtil.getCacheLineSize()); - if ( cacheLineMod != 0 ) - padding = CacheUtil.getCacheLineSize() - cacheLineMod; - - cacheLinePadded = true; - } else - padding = mapped.padding(); - } - - sizeof += padding; - - final MappedSubtypeInfo mappedType = new MappedSubtypeInfo(className, fields, (int)sizeof, align, padding, cacheLinePadded); - if ( className_to_subtype.put(className, mappedType) != null ) - throw new InternalError("duplicate mapped type: " + mappedType.className); - } - - private static FieldInfo registerField(final boolean autoGenerateOffsets, final String className, long advancingOffset, final Field field) { - if ( Modifier.isStatic(field.getModifiers()) ) // static fields are never mapped - return null; - - // we only support primitives and ByteBuffers - if ( !field.getType().isPrimitive() && field.getType() != ByteBuffer.class ) - throw new ClassFormatError("field '" + className + "." + field.getName() + "' not supported: " + field.getType()); - - MappedField meta = field.getAnnotation(MappedField.class); - if ( meta == null && !autoGenerateOffsets ) - throw new ClassFormatError("field '" + className + "." + field.getName() + "' missing annotation " + MappedField.class.getName() + ": " + className); - - Pointer pointer = field.getAnnotation(Pointer.class); - if ( pointer != null && field.getType() != long.class ) - throw new ClassFormatError("The @Pointer annotation can only be used on long fields. @Pointer field found: " + className + "." + field.getName() + ": " + field.getType()); - - if ( Modifier.isVolatile(field.getModifiers()) && (pointer != null || field.getType() == ByteBuffer.class) ) - throw new ClassFormatError("The volatile keyword is not supported for @Pointer or ByteBuffer fields. Volatile field found: " + className + "." + field.getName() + ": " + field.getType()); - - // quick hack - long byteLength; - if ( field.getType() == long.class || field.getType() == double.class ) { - if ( pointer == null ) - byteLength = 8; - else - byteLength = MappedObjectUnsafe.INSTANCE.addressSize(); - } else if ( field.getType() == double.class ) - byteLength = 8; - else if ( field.getType() == int.class || field.getType() == float.class ) - byteLength = 4; - else if ( field.getType() == char.class || field.getType() == short.class ) - byteLength = 2; - else if ( field.getType() == byte.class ) - byteLength = 1; - else if ( field.getType() == ByteBuffer.class ) { - byteLength = meta.byteLength(); - if ( byteLength < 0 ) - throw new IllegalStateException("invalid byte length for mapped ByteBuffer field: " + className + "." + field.getName() + " [length=" + byteLength + "]"); - } else - throw new ClassFormatError(field.getType().getName()); - - if ( field.getType() != ByteBuffer.class && (advancingOffset % byteLength) != 0 ) - throw new IllegalStateException("misaligned mapped type: " + className + "." + field.getName()); - - CacheLinePad pad = field.getAnnotation(CacheLinePad.class); - - long byteOffset = advancingOffset; - if ( meta != null && meta.byteOffset() != -1 ) { - if ( meta.byteOffset() < 0 ) - throw new ClassFormatError("Invalid field byte offset: " + className + "." + field.getName() + " [byteOffset=" + meta.byteOffset() + "]"); - if ( pad != null ) - throw new ClassFormatError("A field byte offset cannot be specified together with cache-line padding: " + className + "." + field.getName()); - - byteOffset = meta.byteOffset(); - } - - long byteLengthPadded = byteLength; - if ( pad != null ) { - // Pad before - if ( pad.before() && byteOffset % CacheUtil.getCacheLineSize() != 0 ) - byteOffset += CacheUtil.getCacheLineSize() - (byteOffset & (CacheUtil.getCacheLineSize() - 1)); - - // Pad after - if ( pad.after() && (byteOffset + byteLength) % CacheUtil.getCacheLineSize() != 0 ) - byteLengthPadded += CacheUtil.getCacheLineSize() - (byteOffset + byteLength) % CacheUtil.getCacheLineSize(); - - assert !pad.before() || (byteOffset % CacheUtil.getCacheLineSize() == 0); - assert !pad.after() || ((byteOffset + byteLengthPadded) % CacheUtil.getCacheLineSize() == 0); - } - - if ( PRINT_ACTIVITY ) - LWJGLUtil.log(MappedObjectTransformer.class.getSimpleName() + ": " + className + "." + field.getName() + " [type=" + field.getType().getSimpleName() + ", offset=" + byteOffset + "]"); - - return new FieldInfo(byteOffset, byteLength, byteLengthPadded, Type.getType(field.getType()), Modifier.isVolatile(field.getModifiers()), pointer != null); - } - - /** Removes final from methods that will be overriden by subclasses. */ - static byte[] transformMappedObject(byte[] bytecode) { - final ClassWriter cw = new ClassWriter(0); - - ClassVisitor cv = new ClassAdapter(cw) { - - private final String[] DEFINALIZE_LIST = { - VIEWADDRESS_METHOD_NAME, - NEXT_METHOD_NAME, - ALIGN_METHOD_NAME, - SIZEOF_METHOD_NAME, - CAPACITY_METHOD_NAME, - }; - - public MethodVisitor visitMethod(int access, final String name, final String desc, final String signature, final String[] exceptions) { - for ( String method : DEFINALIZE_LIST ) { - if ( name.equals(method) ) { - access &= ~ACC_FINAL; - break; - } - } - return super.visitMethod(access, name, desc, signature, exceptions); - } - }; - - new ClassReader(bytecode).accept(cv, 0); - return cw.toByteArray(); - } - - static byte[] transformMappedAPI(final String className, byte[] bytecode) { - final ClassWriter cw = new ClassWriter(COMPUTE_FRAMES) { - - @Override - protected String getCommonSuperClass(String a, String b) { - // HACK: prevent user-code static-initialization-blocks to be executed - if ( is_currently_computing_frames && !a.startsWith("java/") || !b.startsWith("java/") ) - return "java/lang/Object"; - - return super.getCommonSuperClass(a, b); - } - - }; - - final TransformationAdapter ta = new TransformationAdapter(cw, className); - - ClassVisitor cv = ta; - if ( className_to_subtype.containsKey(className) ) // Do a first pass to generate address getters - cv = getMethodGenAdapter(className, cv); - - new ClassReader(bytecode).accept(cv, ClassReader.SKIP_FRAMES); - - if ( !ta.transformed ) - return bytecode; - - bytecode = cw.toByteArray(); - if ( PRINT_BYTECODE ) - printBytecode(bytecode); - - return bytecode; - } - - private static ClassAdapter getMethodGenAdapter(final String className, final ClassVisitor cv) { - return new ClassAdapter(cv) { - - @Override - public void visitEnd() { - final MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className); - - generateViewAddressGetter(); - generateCapacity(); - generateAlignGetter(mappedSubtype); - generateSizeofGetter(); - generateNext(); - - for ( String fieldName : mappedSubtype.fields.keySet() ) { - final FieldInfo field = mappedSubtype.fields.get(fieldName); - - if ( field.type.getDescriptor().length() > 1 ) { // ByteBuffer, getter only - generateByteBufferGetter(fieldName, field); - } else { - generateFieldGetter(fieldName, field); - generateFieldSetter(fieldName, field); - } - } - - super.visitEnd(); - } - - private void generateViewAddressGetter() { - MethodVisitor mv = super.visitMethod(ACC_PUBLIC, VIEWADDRESS_METHOD_NAME, "(I)J", null, null); - mv.visitCode(); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, MAPPED_OBJECT_JVM, "baseAddress", "J"); - mv.visitVarInsn(ILOAD, 1); - mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); - mv.visitInsn(IMUL); - mv.visitInsn(I2L); - mv.visitInsn(LADD); - if ( MappedObject.CHECKS ) { - mv.visitInsn(DUP2); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, "checkAddress", "(JL" + MAPPED_OBJECT_JVM + ";)V"); - } - mv.visitInsn(LRETURN); - mv.visitMaxs(3, 2); - mv.visitEnd(); - } - - private void generateCapacity() { - // return (backingByteBuffer().capacity() + (int)(MemoryUtil.getAddress0(backingByteBuffer()) - baseAddress)) / SIZEOF; - MethodVisitor mv = super.visitMethod(ACC_PUBLIC, CAPACITY_METHOD_NAME, "()I", null, null); - mv.visitCode(); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKEVIRTUAL, MAPPED_OBJECT_JVM, "backingByteBuffer", "()L" + jvmClassName(ByteBuffer.class) + ";"); - mv.visitInsn(DUP); - mv.visitMethodInsn(INVOKEVIRTUAL, jvmClassName(ByteBuffer.class), "capacity", "()I"); - mv.visitInsn(SWAP); - mv.visitMethodInsn(INVOKESTATIC, jvmClassName(MemoryUtil.class), "getAddress0", "(L" + jvmClassName(Buffer.class) + ";)J"); - mv.visitVarInsn(ALOAD, 0); - mv.visitFieldInsn(GETFIELD, MAPPED_OBJECT_JVM, "baseAddress", "J"); - mv.visitInsn(LSUB); - mv.visitInsn(L2I); - mv.visitInsn(IADD); - mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); - mv.visitInsn(IDIV); - mv.visitInsn(IRETURN); - mv.visitMaxs(3, 1); - mv.visitEnd(); - } - - private void generateAlignGetter(final MappedSubtypeInfo mappedSubtype) { - MethodVisitor mv = super.visitMethod(ACC_PUBLIC, ALIGN_METHOD_NAME, "()I", null, null); - mv.visitCode(); - visitIntNode(mv, mappedSubtype.sizeof); - mv.visitInsn(IRETURN); - mv.visitMaxs(1, 1); - mv.visitEnd(); - } - - private void generateSizeofGetter() { - MethodVisitor mv = super.visitMethod(ACC_PUBLIC, SIZEOF_METHOD_NAME, "()I", null, null); - mv.visitCode(); - mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); - mv.visitInsn(IRETURN); - mv.visitMaxs(1, 1); - mv.visitEnd(); - } - - private void generateNext() { - MethodVisitor mv = super.visitMethod(ACC_PUBLIC, NEXT_METHOD_NAME, "()V", null, null); - mv.visitCode(); - mv.visitVarInsn(ALOAD, 0); - mv.visitInsn(DUP); - mv.visitFieldInsn(GETFIELD, MAPPED_OBJECT_JVM, "viewAddress", "J"); - mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); - mv.visitInsn(I2L); - mv.visitInsn(LADD); - mv.visitMethodInsn(INVOKEVIRTUAL, className, "setViewAddress", "(J)V"); - mv.visitInsn(RETURN); - mv.visitMaxs(3, 1); - mv.visitEnd(); - } - - private void generateByteBufferGetter(final String fieldName, final FieldInfo field) { - MethodVisitor mv = super.visitMethod(ACC_PUBLIC | ACC_STATIC, getterName(fieldName), "(L" + className + ";I)" + field.type.getDescriptor(), null, null); - mv.visitCode(); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, className, VIEWADDRESS_METHOD_NAME, "(I)J"); - visitIntNode(mv, (int)field.offset); - mv.visitInsn(I2L); - mv.visitInsn(LADD); - visitIntNode(mv, (int)field.length); - mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, "newBuffer", "(JI)L" + jvmClassName(ByteBuffer.class) + ";"); - mv.visitInsn(ARETURN); - mv.visitMaxs(3, 2); - mv.visitEnd(); - } - - private void generateFieldGetter(final String fieldName, final FieldInfo field) { - MethodVisitor mv = super.visitMethod(ACC_PUBLIC | ACC_STATIC, getterName(fieldName), "(L" + className + ";I)" + field.type.getDescriptor(), null, null); - mv.visitCode(); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, className, VIEWADDRESS_METHOD_NAME, "(I)J"); - visitIntNode(mv, (int)field.offset); - mv.visitInsn(I2L); - mv.visitInsn(LADD); - mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "get", "(J)" + field.type.getDescriptor()); - mv.visitInsn(field.type.getOpcode(IRETURN)); - mv.visitMaxs(3, 2); - mv.visitEnd(); - } - - private void generateFieldSetter(final String fieldName, final FieldInfo field) { - MethodVisitor mv = super.visitMethod(ACC_PUBLIC | ACC_STATIC, setterName(fieldName), "(L" + className + ";I" + field.type.getDescriptor() + ")V", null, null); - mv.visitCode(); - int load = 0; - switch ( field.type.getSort() ) { - case Type.BOOLEAN: - case Type.CHAR: - case Type.BYTE: - case Type.SHORT: - case Type.INT: - load = ILOAD; - break; - case Type.FLOAT: - load = FLOAD; - break; - case Type.LONG: - load = LLOAD; - break; - case Type.DOUBLE: - load = DLOAD; - break; - } - mv.visitVarInsn(load, 2); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ILOAD, 1); - mv.visitMethodInsn(INVOKEVIRTUAL, className, VIEWADDRESS_METHOD_NAME, "(I)J"); - visitIntNode(mv, (int)field.offset); - mv.visitInsn(I2L); - mv.visitInsn(LADD); - mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "put", "(" + field.type.getDescriptor() + "J)V"); - mv.visitInsn(RETURN); - mv.visitMaxs(4, 4); - mv.visitEnd(); - } - - }; - } - - private static class TransformationAdapter extends ClassAdapter { - - final String className; - - boolean transformed; - - TransformationAdapter(final ClassVisitor cv, final String className) { - super(cv); - this.className = className; - } - - @Override - public FieldVisitor visitField(final int access, final String name, final String desc, final String signature, final Object value) { - // remove redirected fields - final MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className); - if ( mappedSubtype != null && mappedSubtype.fields.containsKey(name) ) { - if ( PRINT_ACTIVITY ) - LWJGLUtil.log(MappedObjectTransformer.class.getSimpleName() + ": discarding field: " + className + "." + name + ":" + desc); - return null; - } - - if ( (access & ACC_STATIC) == 0 ) { - return new FieldNode(access, name, desc, signature, value) { - public void visitEnd() { - if ( visibleAnnotations == null ) { // early-out - accept(cv); - return; - } - - boolean before = false; - boolean after = false; - int byteLength = 0; - for ( AnnotationNode pad : visibleAnnotations ) { - if ( CACHE_LINE_PAD_JVM.equals(pad.desc) ) { - if ( "J".equals(desc) || "D".equals(desc) ) - byteLength = 8; - else if ( "I".equals(desc) || "F".equals(desc) ) - byteLength = 4; - else if ( "S".equals(desc) || "C".equals(desc) ) - byteLength = 2; - else if ( "B".equals(desc) || "Z".equals(desc) ) - byteLength = 1; - else - throw new ClassFormatError("The @CacheLinePad annotation cannot be used on non-primitive fields: " + className + "." + name); - - transformed = true; - - after = true; - if ( pad.values != null ) { - for ( int i = 0; i < pad.values.size(); i += 2 ) { - final boolean value = pad.values.get(i + 1).equals(Boolean.TRUE); - if ( "before".equals(pad.values.get(i)) ) - before = value; - else - after = value; - } - } - break; - } - } - - /* - We make the fields public to force the JVM to keep the fields in the object. - Instead of using only longs or integers, we use the same type as the original - field. That's because modern JVMs usually reorder fields by type: - longs, then doubles, then integers, then booleans, etc. This way it's more - likely that the padding will work as expected. - */ - - if ( before ) { - final int count = CacheUtil.getCacheLineSize() / byteLength - 1; - for ( int i = count; i >= 1; i-- ) - cv.visitField(access | ACC_PUBLIC | ACC_SYNTHETIC, name + "$PAD_" + i, desc, signature, null); - } - - accept(cv); - - if ( after ) { - final int count = CacheUtil.getCacheLineSize() / byteLength - 1; - for ( int i = 1; i <= count; i++ ) - cv.visitField(access | ACC_PUBLIC | ACC_SYNTHETIC, name + "$PAD" + i, desc, signature, null); - } - } - }; - } else - return super.visitField(access, name, desc, signature, value); - } - - @Override - public MethodVisitor visitMethod(final int access, String name, final String desc, final String signature, final String[] exceptions) { - // Move MappedSubtype constructors to another method - if ( "".equals(name) ) { - final MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className); - if ( mappedSubtype != null ) { - if ( !"()V".equals(desc) ) - throw new ClassFormatError(className + " can only have a default constructor, found: " + desc); - - final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); - mv.visitVarInsn(ALOAD, 0); - mv.visitMethodInsn(INVOKESPECIAL, MAPPED_OBJECT_JVM, "", "()V"); - mv.visitInsn(RETURN); - mv.visitMaxs(0, 0); - - // put the method body in another method - name = VIEW_CONSTRUCTOR_NAME; - } - } - - final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); - return new MethodNode(access, name, desc, signature, exceptions) { - - /** When true, the method has touched a mapped object and needs to be transformed. We track this - * so we can skip the expensive frame analysis and tree API usage. */ - boolean needsTransformation; - - @Override - public void visitMaxs(int a, int b) { - try { - is_currently_computing_frames = true; - super.visitMaxs(a, b); - } finally { - is_currently_computing_frames = false; - } - } - - @Override - public void visitFieldInsn(final int opcode, final String owner, final String name, final String desc) { - if ( className_to_subtype.containsKey(owner) || owner.startsWith(MAPPEDSET_PREFIX) ) - needsTransformation = true; - - super.visitFieldInsn(opcode, owner, name, desc); - } - - @Override - public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) { - if ( className_to_subtype.containsKey(owner) ) - needsTransformation = true; - - super.visitMethodInsn(opcode, owner, name, desc); - } - - @Override - public void visitEnd() { - if ( needsTransformation ) { // Early-out for methods that do not touch a mapped object. - //System.err.println("\nTRANSFORMING: " + className + "." + name + desc); - transformed = true; - try { - transformMethod(analyse()); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - // Pass the instruction stream to the adapter's MethodVisitor - accept(mv); - } - - private Frame[] analyse() throws AnalyzerException { - final Analyzer a = new Analyzer(new SimpleVerifier()); - a.analyze(className, this); - return a.getFrames(); - } - - private void transformMethod(final Frame[] frames) { - final InsnList instructions = this.instructions; - - final Map arrayVars = new HashMap(); - - /* - We need this map because we insert/remove instructions from the stream and we need a way - to match each original instruction with the corresponding frame. - TODO: Can we keep track of everything more efficiently without a map? - */ - final Map> frameMap = new HashMap>(); - for ( int i = 0; i < frames.length; i++ ) - frameMap.put(instructions.get(i), frames[i]); - - for ( int i = 0; i < instructions.size(); i++ ) { // f is a separate cursor for frames - final AbstractInsnNode instruction = instructions.get(i); - - //System.out.println("MAIN LOOP #" + i + " - " + getOpcodeName(instruction)); - - switch ( instruction.getType() ) { - case AbstractInsnNode.VAR_INSN: - if ( instruction.getOpcode() == ALOAD ) { - VarInsnNode varInsn = (VarInsnNode)instruction; - final MappedSubtypeInfo mappedSubtype = arrayVars.get(varInsn.var); - if ( mappedSubtype != null ) - i = transformArrayAccess(instructions, i, frameMap, varInsn, mappedSubtype, varInsn.var); - } - break; - case AbstractInsnNode.FIELD_INSN: - FieldInsnNode fieldInsn = (FieldInsnNode)instruction; - - final InsnList list = transformFieldAccess(fieldInsn); - if ( list != null ) - i = replace(instructions, i, instruction, list); - - break; - case AbstractInsnNode.METHOD_INSN: - MethodInsnNode methodInsn = (MethodInsnNode)instruction; - final MappedSubtypeInfo mappedType = className_to_subtype.get(methodInsn.owner); - if ( mappedType != null ) - i = transformMethodCall(instructions, i, frameMap, methodInsn, mappedType, arrayVars); - break; - } - } - } - }; - } - } - - static int transformMethodCall(final InsnList instructions, int i, final Map> frameMap, final MethodInsnNode methodInsn, final MappedSubtypeInfo mappedType, final Map arrayVars) { - switch ( methodInsn.getOpcode() ) { - case INVOKEVIRTUAL: - if ( "asArray".equals(methodInsn.name) && methodInsn.desc.equals("()[L" + MAPPED_OBJECT_JVM + ";") ) { - // Go forward and store the local variable index. - // We only allow this pattern: INVOKEVIRTUAL -> CHECKCAST -> ASTORE. - // We remove the first two and store the target MappedSubtype in the ASTORE variable - AbstractInsnNode nextInstruction; - checkInsnAfterIsArray(nextInstruction = methodInsn.getNext(), CHECKCAST); - checkInsnAfterIsArray(nextInstruction = nextInstruction.getNext(), ASTORE); - - final Frame frame = frameMap.get(nextInstruction); - final String targetType = frame.getStack(frame.getStackSize() - 1).getType().getElementType().getInternalName(); - if ( !methodInsn.owner.equals(targetType) ) { - /* - This may happen with the current API, like so: - MappedA foo = MappedA.malloc(...); - MappedB[] cursor = foo.asArray(); - We have to parameterize MappedObject to avoid this. - */ - throw new ClassCastException("Source: " + methodInsn.owner + " - Target: " + targetType); - } - - final VarInsnNode varInstruction = (VarInsnNode)nextInstruction; - - arrayVars.put(varInstruction.var, mappedType); - - instructions.remove(methodInsn.getNext()); // Remove CHECKCAST - instructions.remove(methodInsn); // Remove INVOKEVIRTUAL - } - - if ( "dup".equals(methodInsn.name) && methodInsn.desc.equals("()L" + MAPPED_OBJECT_JVM + ";") ) { - i = replace(instructions, i, methodInsn, generateDupInstructions(methodInsn)); - break; - } - - if ( "slice".equals(methodInsn.name) && methodInsn.desc.equals("()L" + MAPPED_OBJECT_JVM + ";") ) { - i = replace(instructions, i, methodInsn, generateSliceInstructions(methodInsn)); - break; - } - - if ( "runViewConstructor".equals(methodInsn.name) && "()V".equals(methodInsn.desc) ) { - i = replace(instructions, i, methodInsn, generateRunViewConstructorInstructions(methodInsn)); - break; - } - - if ( "copyTo".equals(methodInsn.name) && methodInsn.desc.equals("(L" + MAPPED_OBJECT_JVM + ";)V") ) { - i = replace(instructions, i, methodInsn, generateCopyToInstructions(mappedType)); - break; - } - - if ( "copyRange".equals(methodInsn.name) && methodInsn.desc.equals("(L" + MAPPED_OBJECT_JVM + ";I)V") ) { - i = replace(instructions, i, methodInsn, generateCopyRangeInstructions(mappedType)); - break; - } - - break; - case INVOKESPECIAL: - // super() in VIEW_CONSTRUCTOR_NAME, remove - if ( methodInsn.owner.equals(MAPPED_OBJECT_JVM) && "".equals(methodInsn.name) && "()V".equals(methodInsn.desc) ) { - instructions.remove(methodInsn.getPrevious()); // ALOAD - instructions.remove(methodInsn); // INVOKESPECIAL - - i -= 2; - } - break; - case INVOKESTATIC: - boolean isMapDirectMethod = "map".equals(methodInsn.name) && methodInsn.desc.equals("(JI)L" + MAPPED_OBJECT_JVM + ";"); - boolean isMapBufferMethod = "map".equals(methodInsn.name) && methodInsn.desc.equals("(Ljava/nio/ByteBuffer;)L" + MAPPED_OBJECT_JVM + ";"); - boolean isMallocMethod = "malloc".equals(methodInsn.name) && methodInsn.desc.equals("(I)L" + MAPPED_OBJECT_JVM + ";"); - - if ( (isMapDirectMethod || isMapBufferMethod) || isMallocMethod ) - i = replace(instructions, i, methodInsn, generateMapInstructions(mappedType, methodInsn.owner, isMapDirectMethod, isMallocMethod)); - break; - } - - return i; - } - - private static InsnList generateCopyRangeInstructions(final MappedSubtypeInfo mappedType) { - final InsnList list = new InsnList(); - - // stack: instances, target, this - list.add(getIntNode(mappedType.sizeof)); - // stack: sizeof, instances, target, this - list.add(new InsnNode(IMUL)); - // stack: bytes, target, this - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "copy", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";I)V")); - // stack: - - - return list; - } - - private static InsnList generateCopyToInstructions(final MappedSubtypeInfo mappedType) { - final InsnList list = new InsnList(); - - // stack: target, this - list.add(getIntNode(mappedType.sizeof - mappedType.padding)); - // stack: sizeof, target, this - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "copy", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";I)V")); - // stack: - - - return list; - } - - private static InsnList generateRunViewConstructorInstructions(final MethodInsnNode methodInsn) { - final InsnList list = new InsnList(); - - // stack: this - list.add(new InsnNode(DUP)); - // stack: this, this - list.add(new MethodInsnNode(INVOKEVIRTUAL, methodInsn.owner, VIEW_CONSTRUCTOR_NAME, "()V")); - // stack: this - - return list; - } - - private static InsnList generateSliceInstructions(final MethodInsnNode methodInsn) { - final InsnList list = new InsnList(); - - // stack: this - list.add(new TypeInsnNode(NEW, methodInsn.owner)); - // stack: new, this - list.add(new InsnNode(DUP)); - // stack: new, new, this - list.add(new MethodInsnNode(INVOKESPECIAL, methodInsn.owner, "", "()V")); - // stack: new, this - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "slice", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";)L" + MAPPED_OBJECT_JVM + ";")); - // stack: new - - return list; - } - - private static InsnList generateDupInstructions(final MethodInsnNode methodInsn) { - final InsnList list = new InsnList(); - - // stack: this - list.add(new TypeInsnNode(NEW, methodInsn.owner)); - // stack: new, this - list.add(new InsnNode(DUP)); - // stack: new, new, this - list.add(new MethodInsnNode(INVOKESPECIAL, methodInsn.owner, "", "()V")); - // stack: new, this - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "dup", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";)L" + MAPPED_OBJECT_JVM + ";")); - // stack: new - - return list; - } - - private static InsnList generateMapInstructions(final MappedSubtypeInfo mappedType, final String className, final boolean mapDirectMethod, final boolean mallocMethod) { - final InsnList trg = new InsnList(); - - if ( mallocMethod ) { - // stack: count - trg.add(getIntNode(mappedType.sizeof)); - // stack: sizeof, count - trg.add(new InsnNode(IMUL)); - // stack: bytes - trg.add(new MethodInsnNode(INVOKESTATIC, mappedType.cacheLinePadded ? jvmClassName(CacheUtil.class) : jvmClassName(BufferUtils.class), "createByteBuffer", "(I)L" + jvmClassName(ByteBuffer.class) + ";")); - // stack: buffer - } else if ( mapDirectMethod ) { - // stack: capacity, address - trg.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "newBuffer", "(JI)L" + jvmClassName(ByteBuffer.class) + ";")); - // stack: buffer - } - - // stack: buffer - trg.add(new TypeInsnNode(NEW, className)); - // stack: new, buffer - trg.add(new InsnNode(DUP)); - // stack: new, new, buffer - trg.add(new MethodInsnNode(INVOKESPECIAL, className, "", "()V")); - // stack: new, buffer - trg.add(new InsnNode(DUP_X1)); - // stack: new, buffer, new - trg.add(new InsnNode(SWAP)); - // stack: buffer, new, new - trg.add(getIntNode(mappedType.align)); - // stack: int, buffer, new, new - trg.add(getIntNode(mappedType.sizeof)); - // stack: int, int, buffer, new, new - trg.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "setup", "(L" + MAPPED_OBJECT_JVM + ";Ljava/nio/ByteBuffer;II)V")); - // stack: new - - return trg; - } - - static InsnList transformFieldAccess(final FieldInsnNode fieldInsn) { - final MappedSubtypeInfo mappedSubtype; - mappedSubtype = className_to_subtype.get(fieldInsn.owner); - if ( mappedSubtype == null ) { // early out - // MappedSet.view - outer: - if ( "view".equals(fieldInsn.name) && fieldInsn.owner.startsWith(MAPPEDSET_PREFIX) ) - return generateSetViewInstructions(fieldInsn); - - return null; // early out - } - - if ( "SIZEOF".equals(fieldInsn.name) ) - return generateSIZEOFInstructions(fieldInsn, mappedSubtype); - - if ( "view".equals(fieldInsn.name) ) - return generateViewInstructions(fieldInsn, mappedSubtype); - - if ( "baseAddress".equals(fieldInsn.name) || "viewAddress".equals(fieldInsn.name) ) { - return generateAddressInstructions(fieldInsn); - } - - final FieldInfo field = mappedSubtype.fields.get(fieldInsn.name); - if ( field == null ) // early out - return null; - - // now we're going to transform ByteBuffer-typed field access - if ( fieldInsn.desc.equals("L" + jvmClassName(ByteBuffer.class) + ";") ) - return generateByteBufferInstructions(fieldInsn, mappedSubtype, field.offset); - - // we're now going to transform the field access - return generateFieldInstructions(fieldInsn, field); - } - - private static InsnList generateSetViewInstructions(final FieldInsnNode fieldInsn) { - if ( fieldInsn.getOpcode() == GETFIELD ) - throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); - if ( fieldInsn.getOpcode() != PUTFIELD ) - throw new InternalError(); - - final InsnList list = new InsnList(); - - // stack: index, this - if ( MAPPED_SET2_JVM.equals(fieldInsn.owner) ) - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_views", "(L" + MAPPED_SET2_JVM + ";I)V")); - else if ( MAPPED_SET3_JVM.equals(fieldInsn.owner) ) - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_views", "(L" + MAPPED_SET3_JVM + ";I)V")); - else if ( MAPPED_SET4_JVM.equals(fieldInsn.owner) ) - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_views", "(L" + MAPPED_SET4_JVM + ";I)V")); - else - throw new InternalError(); - // stack: - - - return list; - } - - private static InsnList generateSIZEOFInstructions(final FieldInsnNode fieldInsn, final MappedSubtypeInfo mappedSubtype) { - if ( !"I".equals(fieldInsn.desc) ) - throw new InternalError(); - - final InsnList list = new InsnList(); - - if ( fieldInsn.getOpcode() == GETSTATIC ) { - list.add(getIntNode(mappedSubtype.sizeof)); - return list; - } - - if ( fieldInsn.getOpcode() == PUTSTATIC ) - throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); - - throw new InternalError(); - } - - private static InsnList generateViewInstructions(final FieldInsnNode fieldInsn, final MappedSubtypeInfo mappedSubtype) { - if ( !"I".equals(fieldInsn.desc) ) - throw new InternalError(); - - final InsnList list = new InsnList(); - - if ( fieldInsn.getOpcode() == GETFIELD ) { - if ( mappedSubtype.sizeof_shift != 0 ) { - // stack: instance - list.add(getIntNode(mappedSubtype.sizeof_shift)); - // stack: sizeof, instance - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "get_view_shift", "(L" + MAPPED_OBJECT_JVM + ";I)I")); - // stack: view - } else { - // stack: instance - list.add(getIntNode(mappedSubtype.sizeof)); - // stack: sizeof, instance - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "get_view", "(L" + MAPPED_OBJECT_JVM + ";I)I")); - // stack: view - } - return list; - } - - if ( fieldInsn.getOpcode() == PUTFIELD ) { - if ( mappedSubtype.sizeof_shift != 0 ) { - // stack: view, instance - list.add(getIntNode(mappedSubtype.sizeof_shift)); - // stack: sizeof, view, instance - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_view_shift", "(L" + MAPPED_OBJECT_JVM + ";II)V")); - // stack: - - } else { - // stack: view, instance - list.add(getIntNode(mappedSubtype.sizeof)); - // stack: sizeof, view, instance - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_view", "(L" + MAPPED_OBJECT_JVM + ";II)V")); - // stack: - - } - return list; - } - - throw new InternalError(); - } - - private static InsnList generateAddressInstructions(final FieldInsnNode fieldInsn) { - if ( !"J".equals(fieldInsn.desc) ) - throw new IllegalStateException(); - - if ( fieldInsn.getOpcode() == GETFIELD ) // do not change a thing - return null; - - if ( fieldInsn.getOpcode() == PUTFIELD ) - throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); - - throw new InternalError(); - } - - private static InsnList generateByteBufferInstructions(final FieldInsnNode fieldInsn, final MappedSubtypeInfo mappedSubtype, final long fieldOffset) { - if ( fieldInsn.getOpcode() == PUTFIELD ) - throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); - - if ( fieldInsn.getOpcode() == GETFIELD ) { - final InsnList list = new InsnList(); - - // stack: ref - list.add(new FieldInsnNode(GETFIELD, mappedSubtype.className, "viewAddress", "J")); - // stack: long - list.add(new LdcInsnNode(fieldOffset)); - // stack: long, long - list.add(new InsnNode(LADD)); - // stack: long - list.add(new LdcInsnNode(mappedSubtype.fields.get(fieldInsn.name).length)); - // stack: long, long - list.add(new InsnNode(L2I)); - // stack: int, long - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "newBuffer", "(JI)L" + jvmClassName(ByteBuffer.class) + ";")); - // stack: buffer - - return list; - } - - throw new InternalError(); - } - - private static InsnList generateFieldInstructions(final FieldInsnNode fieldInsn, final FieldInfo field) { - final InsnList list = new InsnList(); - - if ( fieldInsn.getOpcode() == PUTFIELD ) { - // stack: value, ref - list.add(getIntNode((int)field.offset)); - // stack: fieldOffset, value, ref - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "put", "(L" + MAPPED_OBJECT_JVM + ";" + fieldInsn.desc + "I)V")); - // stack - - return list; - } - - if ( fieldInsn.getOpcode() == GETFIELD ) { - // stack: ref - list.add(getIntNode((int)field.offset)); - // stack: fieldOffset, ref - list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "get", "(L" + MAPPED_OBJECT_JVM + ";I)" + fieldInsn.desc)); - // stack: - - return list; - } - - throw new InternalError(); - } - - static int transformArrayAccess(final InsnList instructions, int i, final Map> frameMap, final VarInsnNode loadInsn, final MappedSubtypeInfo mappedSubtype, final int var) { - // We need to go forward in time to find how we use the array var - final int loadStackSize = frameMap.get(loadInsn).getStackSize() + 1; - - AbstractInsnNode nextInsn = loadInsn; - - while ( true ) { - nextInsn = nextInsn.getNext(); - if ( nextInsn == null ) - throw new InternalError(); - - Frame frame = frameMap.get(nextInsn); - if ( frame == null ) - continue; - - int stackSize = frame.getStackSize(); - - if ( stackSize == loadStackSize + 1 && nextInsn.getOpcode() == AALOAD ) { - final AbstractInsnNode aaLoadInsn = nextInsn; - - while ( true ) { - nextInsn = nextInsn.getNext(); - if ( nextInsn == null ) - break; - - frame = frameMap.get(nextInsn); - if ( frame == null ) - continue; - stackSize = frame.getStackSize(); - - if ( stackSize == loadStackSize + 1 && nextInsn.getOpcode() == PUTFIELD ) { - final FieldInsnNode fieldInsn = (FieldInsnNode)nextInsn; - - // stack: value, view, ref - instructions.insert(nextInsn, new MethodInsnNode(INVOKESTATIC, mappedSubtype.className, setterName(fieldInsn.name), "(L" + mappedSubtype.className + ";I" + fieldInsn.desc + ")V")); - // stack: - - instructions.remove(nextInsn); - - break; - } else if ( stackSize == loadStackSize && nextInsn.getOpcode() == GETFIELD ) { - final FieldInsnNode fieldInsn = (FieldInsnNode)nextInsn; - - // stack: view, ref - instructions.insert(nextInsn, new MethodInsnNode(INVOKESTATIC, mappedSubtype.className, getterName(fieldInsn.name), "(L" + mappedSubtype.className + ";I)" + fieldInsn.desc)); - // stack: value - instructions.remove(nextInsn); - - break; - } else if ( stackSize == loadStackSize && nextInsn.getOpcode() == DUP && nextInsn.getNext().getOpcode() == GETFIELD ) { - // May happen with operator+assignment (e.g. cursor[i].value += 10) - final FieldInsnNode fieldInsn = (FieldInsnNode)nextInsn.getNext(); - - final MethodInsnNode getter = new MethodInsnNode(INVOKESTATIC, mappedSubtype.className, getterName(fieldInsn.name), "(L" + mappedSubtype.className + ";I)" + fieldInsn.desc); - - // stack: view, ref - instructions.insert(nextInsn, new InsnNode(DUP2)); - // stack: view, ref, view, ref - instructions.insert(nextInsn.getNext(), getter); - // stack: value, view, ref - - instructions.remove(nextInsn); - instructions.remove(fieldInsn); - - nextInsn = getter; - continue; - } else if ( stackSize < loadStackSize ) - throw new ClassFormatError("Invalid " + mappedSubtype.className + " view array usage detected: " + getOpcodeName(nextInsn)); - } - - instructions.remove(aaLoadInsn); - - return i; - } else if ( stackSize == loadStackSize && nextInsn.getOpcode() == ARRAYLENGTH ) { - if ( LWJGLUtil.DEBUG && loadInsn.getNext() != nextInsn ) - throw new InternalError(); - - instructions.remove(nextInsn); - loadInsn.var = var; - instructions.insert(loadInsn, new MethodInsnNode(INVOKEVIRTUAL, mappedSubtype.className, CAPACITY_METHOD_NAME, "()I")); - - return i + 1; - } else if ( stackSize < loadStackSize ) // Consumed by something other than AALOAD or ARRAYLENGTH - throw new ClassFormatError("Invalid " + mappedSubtype.className + " view array usage detected: " + getOpcodeName(nextInsn)); - } - } - - private static class FieldInfo { - - final long offset; - final long length; - final long lengthPadded; - final Type type; - final boolean isVolatile; - final boolean isPointer; - - FieldInfo(final long offset, final long length, final long lengthPadded, final Type type, final boolean isVolatile, final boolean isPointer) { - this.offset = offset; - this.length = length; - this.lengthPadded = lengthPadded; - this.type = type; - this.isVolatile = isVolatile; - this.isPointer = isPointer; - } - - String getAccessType() { - return isPointer ? "a" : type.getDescriptor().toLowerCase() + (isVolatile ? "v" : ""); - } - - } - - private static class MappedSubtypeInfo { - - final String className; - - final int sizeof; - final int sizeof_shift; - final int align; - final int padding; - final boolean cacheLinePadded; - - final Map fields; - - MappedSubtypeInfo(String className, Map fields, int sizeof, int align, int padding, final boolean cacheLinePadded) { - this.className = className; - - this.sizeof = sizeof; - if ( ((sizeof - 1) & sizeof) == 0 ) - this.sizeof_shift = getPoT(sizeof); - else - this.sizeof_shift = 0; - this.align = align; - this.padding = padding; - this.cacheLinePadded = cacheLinePadded; - - this.fields = fields; - } - - private static int getPoT(int value) { - int pot = -1; - while ( value > 0 ) { - pot++; - value >>= 1; - } - return pot; - } - - } - - // ------------------------------------------------------- - // -------------------[ MACROS & UTILS ]------------------ - // ------------------------------------------------------- - - private static void getClassEnums(final Class clazz, final Map map, final String... prefixFilters) { - try { - OUTER: - for ( Field field : clazz.getFields() ) { - if ( !Modifier.isStatic(field.getModifiers()) || field.getType() != int.class ) - continue; - - for ( String filter : prefixFilters ) { - if ( field.getName().startsWith(filter) ) - continue OUTER; - } - - if ( map.put((Integer)field.get(null), field.getName()) != null ) - throw new IllegalStateException(); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - static String getOpcodeName(final AbstractInsnNode insn) { - final String op = OPCODE_TO_NAME.get(insn.getOpcode()); - return INSNTYPE_TO_NAME.get(insn.getType()) + ": " + insn.getOpcode() + (op == null ? "" : " [" + OPCODE_TO_NAME.get(insn.getOpcode()) + "]"); - } - - static String jvmClassName(Class type) { - return type.getName().replace('.', '/'); - } - - static String getterName(final String fieldName) { - return "get$" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1) + "$LWJGL"; - } - - static String setterName(final String fieldName) { - return "set$" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1) + "$LWJGL"; - } - - private static void checkInsnAfterIsArray(final AbstractInsnNode instruction, final int opcode) { - if ( instruction == null ) - throw new ClassFormatError("Unexpected end of instructions after .asArray() method."); - - if ( instruction.getOpcode() != opcode ) - throw new ClassFormatError("The result of .asArray() must be stored to a local variable. Found: " + getOpcodeName(instruction)); - } - - static AbstractInsnNode getIntNode(final int value) { - if ( value <= 5 && -1 <= value ) - return new InsnNode(ICONST_M1 + value + 1); - - if ( value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE ) - return new IntInsnNode(BIPUSH, value); - - if ( value >= Short.MIN_VALUE && value <= Short.MAX_VALUE ) - return new IntInsnNode(SIPUSH, value); - - return new LdcInsnNode(value); - } - - static void visitIntNode(final MethodVisitor mv, final int value) { - if ( value <= 5 && -1 <= value ) - mv.visitInsn(ICONST_M1 + value + 1); - else if ( value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE ) - mv.visitIntInsn(BIPUSH, value); - else if ( value >= Short.MIN_VALUE && value <= Short.MAX_VALUE ) - mv.visitIntInsn(SIPUSH, value); - else - mv.visitLdcInsn(value); - } - - /** Replace an instruction with a list of instructions. */ - static int replace(final InsnList instructions, final int i, final AbstractInsnNode location, final InsnList list) { - final int size = list.size(); - - instructions.insert(location, list); - instructions.remove(location); - - return i + (size - 1); - } - - private static void throwAccessErrorOnReadOnlyField(String className, String fieldName) { - throw new IllegalAccessError("The " + className + "." + fieldName + " field is final."); - } - - private static void printBytecode(byte[] bytecode) { - StringWriter sw = new StringWriter(); - ClassVisitor tracer = new TraceClassVisitor(new ClassWriter(0), new PrintWriter(sw)); - new ClassReader(bytecode).accept(tracer, 0); - String dump = sw.toString(); - - LWJGLUtil.log(dump); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java deleted file mode 100644 index 562b5ec7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -import sun.misc.Unsafe; - -/** - * [INTERNAL USE ONLY] - * - * @author Riven - */ -final class MappedObjectUnsafe { - - static final Unsafe INSTANCE = getUnsafeInstance(); - - private static final long BUFFER_ADDRESS_OFFSET = getObjectFieldOffset(ByteBuffer.class, "address"); - private static final long BUFFER_CAPACITY_OFFSET = getObjectFieldOffset(ByteBuffer.class, "capacity"); - - private static final ByteBuffer global = ByteBuffer.allocateDirect(4 * 1024); - - static ByteBuffer newBuffer(long address, int capacity) { - if ( address <= 0L || capacity < 0 ) - throw new IllegalStateException("you almost crashed the jvm"); - - ByteBuffer buffer = global.duplicate().order(ByteOrder.nativeOrder()); - INSTANCE.putLong(buffer, BUFFER_ADDRESS_OFFSET, address); - INSTANCE.putInt(buffer, BUFFER_CAPACITY_OFFSET, capacity); - buffer.position(0); - buffer.limit(capacity); - return buffer; - } - - private static long getObjectFieldOffset(Class type, String fieldName) { - while ( type != null ) { - try { - return INSTANCE.objectFieldOffset(type.getDeclaredField(fieldName)); - } catch (Throwable t) { - type = type.getSuperclass(); - } - } - - throw new UnsupportedOperationException(); - } - - private static Unsafe getUnsafeInstance() { - final Field[] fields = Unsafe.class.getDeclaredFields(); - - /* - Different runtimes use different names for the Unsafe singleton, - so we cannot use .getDeclaredField and we scan instead. For example: - - Oracle: theUnsafe - PERC : m_unsafe_instance - Android: THE_ONE - */ - for ( Field field : fields ) { - if ( !field.getType().equals(Unsafe.class) ) - continue; - - final int modifiers = field.getModifiers(); - if ( !(Modifier.isStatic(modifiers) && Modifier.isFinal(modifiers)) ) - continue; - - field.setAccessible(true); - try { - return (Unsafe)field.get(null); - } catch (IllegalAccessException e) { - // ignore - } - break; - } - - throw new UnsupportedOperationException(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet.java deleted file mode 100644 index fbf3cb7f..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -/** - * Factory for mapped sets. A mapped set can be used as a Structure of Arrays by - * linking together the view of two or more mapped objects. Changing the view - * of the mapped set, changes the corresponding view of all the mapped objects in - * the set. - */ -public class MappedSet { - - /** - * Creates a MappedSet by linking the specified MappedObjects. - * - * @return the mapped set. - */ - public static MappedSet2 create(MappedObject a, MappedObject b) { - return new MappedSet2(a, b); - } - - /** - * Creates a MappedSet by linking the specified MappedObjects. - * - * @return the mapped set. - */ - public static MappedSet3 create(MappedObject a, MappedObject b, MappedObject c) { - return new MappedSet3(a, b, c); - } - - /** - * Creates a MappedSet by linking the specified MappedObjects. - * - * @return the mapped set. - */ - public static MappedSet4 create(MappedObject a, MappedObject b, MappedObject c, MappedObject d) { - return new MappedSet4(a, b, c, d); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet2.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet2.java deleted file mode 100644 index b597e128..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet2.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -/** MappedSet implementation for two MappedObjects. */ -public class MappedSet2 { - - private final MappedObject a, b; - - MappedSet2(MappedObject a, MappedObject b) { - this.a = a; - this.b = b; - } - - public int view; - - void view(int view) { - a.setViewAddress(a.getViewAddress(view)); - b.setViewAddress(b.getViewAddress(view)); - } - - public void next() { - this.a.next(); - this.b.next(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet3.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet3.java deleted file mode 100644 index 196d71f6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet3.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -/** MappedSet implementation for three MappedObjects. */ -public class MappedSet3 { - - private final MappedObject a, b, c; - - MappedSet3(MappedObject a, MappedObject b, MappedObject c) { - this.a = a; - this.b = b; - this.c = c; - } - - public int view; - - void view(int view) { - a.setViewAddress(a.getViewAddress(view)); - b.setViewAddress(b.getViewAddress(view)); - c.setViewAddress(c.getViewAddress(view)); - } - - public void next() { - this.a.next(); - this.b.next(); - this.c.next(); - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet4.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet4.java deleted file mode 100644 index bbb102a9..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedSet4.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -/** MappedSet implementation for four MappedObjects. */ -public class MappedSet4 { - - private final MappedObject a, b, c, d; - - MappedSet4(MappedObject a, MappedObject b, MappedObject c, MappedObject d) { - this.a = a; - this.b = b; - this.c = c; - this.d = d; - } - - public int view; - - void view(int view) { - a.setViewAddress(a.getViewAddress(view)); - b.setViewAddress(b.getViewAddress(view)); - c.setViewAddress(c.getViewAddress(view)); - d.setViewAddress(d.getViewAddress(view)); - } - - public void next() { - this.a.next(); - this.b.next(); - this.c.next(); - this.d.next(); - } -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedType.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedType.java deleted file mode 100644 index 52e991cb..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/MappedType.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * This annotation marks a class as a mapped object, which will go under bytecode - * transformation at runtime. Mapped objects cannot be instantiated directly; a data - * buffer must be mapped first and the mapped object instance will then be used as a - * view on top of the buffer. Instead of a separate instance per "element" in the buffer, - * only a single instance is used to manage everything. See {@link MappedObject} - * for API details and {@link org.lwjgl.test.mapped.TestMappedObject} for examples. - *

    - * The instance fields of the annotated class should only be limited to primitive types or - * {@link java.nio.ByteBuffer}. Static fields are supported and they can have any type. - *

    - * The purpose of mapped objects is to reduce the memory requirements required for the type - * of data that are often used in OpenGL/OpenCL programming, while at the same time enabling - * clean Java code. There are also performance benefits related to not having to copy data - * between buffers and Java objects and the removal of bounds checking when accessing - * buffer data. - * - * @author Riven - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface MappedType { - - /** - * The number of bytes to add to the total byte size. - * SIZEOF will be calculated as SIZEOF = max(field_offset + field_length) + padding. - *

    - * Cannot be used with {@link #cacheLinePadding()}. - * - * @return the padding amount - */ - int padding() default 0; - - /** - * When true, SIZEOF will be increased (if necessary) so that it's a multiple of the CPU cache line size. - * Additionally, {@link MappedObject#malloc(int)} on the mapped object type will automatically use - * {@link CacheUtil#createByteBuffer(int)} instead of the unaligned {@link org.lwjgl.BufferUtils#createByteBuffer(int)}. - *

    - * Cannot be used with {@link #padding()}. - * - * @return if cache-line padding should be applied - * - * @see CacheUtil - */ - boolean cacheLinePadding() default false; - - /** - * The mapped data memory alignment, in bytes. - * - * @return the memory alignment - */ - int align() default 4; - - /** - * When autoGenerateOffsets is true, byte offsets of the mapped fields will - * be generated automatically. This is convenient for packed data. For manually - * aligned data, autoGenerateOffsets must be set to false and the user needs - * to manually specify byte offsets using the {@link MappedField} annotation. - * - * @return true if automatic byte offset generation is required. - */ - boolean autoGenerateOffsets() default true; - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/mapped/Pointer.java b/LWJGL/src/main/java/org/lwjgl/util/mapped/Pointer.java deleted file mode 100644 index 305712d4..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/mapped/Pointer.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.lwjgl.util.mapped; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * This annotation can be used on long fields of {@link MappedObject} subclasses, - * to specify that the long value should be interpreted as a pointer. This - * will determine the actual byte size of the field at runtime (4 or 8 bytes). - * - * @author Spasi - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Pointer { - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/tinyfd/TinyFileDialogs.java b/LWJGL/src/main/java/org/lwjgl/util/tinyfd/TinyFileDialogs.java deleted file mode 100644 index 8a8f36d3..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/tinyfd/TinyFileDialogs.java +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Copyright LWJGL. All rights reserved. - * License terms: https://www.lwjgl.org/license - * MACHINE GENERATED FILE, DO NOT EDIT - */ -package org.lwjgl.util.tinyfd; - -import javax.annotation.*; - -import java.nio.*; - -import org.lwjgl.*; - -import org.lwjgl.system.*; - -import static org.lwjgl.system.Checks.*; -import static org.lwjgl.system.MemoryStack.*; -import static org.lwjgl.system.MemoryUtil.*; - -/** - * Bindings to tiny file dialogs, a native dialog library with support for: - * - *

      - *
    • message / question
    • - *
    • input / password
    • - *
    • save file
    • - *
    • open file & multiple files
    • - *
    • select folder
    • - *
    • color picker
    • - *
    - * - *

    The dialogs can be forced into console mode.

    - */ -public class TinyFileDialogs { - - static { - Library.loadSystem(System::load, System::loadLibrary, TinyFileDialogs.class, "org.lwjgl.tinyfd", Platform.mapLibraryNameBundled("lwjgl_tinyfd")); - if (Platform.get() == Platform.WINDOWS) { - tinyfd_setGlobalInt("tinyfd_winUtf8", 1); - } - } - - /** Contains tinyfd current version number. */ - public static final String tinyfd_version = "tinyfd_version"; - - /** Contains info about requirements. */ - public static final String tinyfd_needs = "tinyfd_needs"; - - /** - * If you pass "tinyfd_query" as {@code aTitle}, the functions will not display the dialogs but will fill {@code tinyfd_response} with the retain solution - * and return 0 for console mode, 1 for graphic mode. - * - *

    Possible values for {@code tinyfd_response} are (all lowercase) for the graphic mode:

    - * - *
    
    -     * windows_wchar windows applescript kdialog zenity zenity3 matedialog
    -     * shellementary qarma yad python2-tkinter python3-tkinter python-dbus
    -     * perl-dbus gxmessage gmessage xmessage xdialog gdialog
    - * - *

    For the console mode:

    - * - *
    
    -     * dialog whiptail basicinput no_solution
    - */ - public static final String tinyfd_response = "tinyfd_response"; - - /** 0 (default) or 1 : on unix, prints the command line calls */ - public static final String tinyfd_verbose = "tinyfd_verbose"; - - /** 1 (default) or 0 : on unix, hide errors and warnings from called dialogs */ - public static final String tinyfd_silent = "tinyfd_silent"; - - /** Curses dialogs are difficult to use, on windows they are only ascii and uses the unix backslash */ - public static final String tinyfd_allowCursesDialogs = "tinyfd_allowCursesDialogs"; - - /** - * 0 (default) or 1. For unix & windows: 0 (graphic mode) or 1 (console mode). - * - *

    0: try to use a graphic solution, if it fails then it uses console mode.

    - * - *

    1: forces all dialogs into console mode even when an X server is present, it can use the package dialog or dialog.exe. On windows it only make sense - * for console applications

    - */ - public static final String tinyfd_forceConsole = "tinyfd_forceConsole"; - - /** - * 0 (default) or 1. - * - *

    Some systems don't set the environment variable {@code DISPLAY} even when a graphic display is present. Set this to 1 to tell tinyfiledialogs to - * assume the existence of a graphic display.

    - */ - public static final String tinyfd_assumeGraphicDisplay = "tinyfd_assumeGraphicDisplay"; - - /** - * On windows, set to 1 if you want to use UTF-8. - * - *

    LWJGL note: this is automatically set to 1.

    - */ - public static final String tinyfd_winUtf8 = "tinyfd_winUtf8"; - - protected TinyFileDialogs() { - throw new UnsupportedOperationException(); - } - - // --- [ tinyfd_getGlobalChar ] --- - - /** Unsafe version of: {@link #tinyfd_getGlobalChar getGlobalChar} */ - public static native long ntinyfd_getGlobalChar(long aCharVariableName); - - /** - * @param aCharVariableName one of:
    {@link #tinyfd_version version}{@link #tinyfd_needs needs}{@link #tinyfd_response response}
    - * - * @return {@code NULL} on error - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_getGlobalChar(@NativeType("char const *") ByteBuffer aCharVariableName) { - if (CHECKS) { - checkNT1(aCharVariableName); - } - long __result = ntinyfd_getGlobalChar(memAddress(aCharVariableName)); - return memASCIISafe(__result); - } - - /** - * @param aCharVariableName one of:
    {@link #tinyfd_version version}{@link #tinyfd_needs needs}{@link #tinyfd_response response}
    - * - * @return {@code NULL} on error - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_getGlobalChar(@NativeType("char const *") CharSequence aCharVariableName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(aCharVariableName, true); - long aCharVariableNameEncoded = stack.getPointerAddress(); - long __result = ntinyfd_getGlobalChar(aCharVariableNameEncoded); - return memASCIISafe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_getGlobalInt ] --- - - /** Unsafe version of: {@link #tinyfd_getGlobalInt getGlobalInt} */ - public static native int ntinyfd_getGlobalInt(long aIntVariableName); - - /** - * @param aIntVariableName one of:
    {@link #tinyfd_verbose verbose}{@link #tinyfd_silent silent}{@link #tinyfd_allowCursesDialogs allowCursesDialogs}{@link #tinyfd_forceConsole forceConsole}{@link #tinyfd_assumeGraphicDisplay assumeGraphicDisplay}{@link #tinyfd_winUtf8 winUtf8}
    - * - * @return -1 on error - */ - public static int tinyfd_getGlobalInt(@NativeType("char const *") ByteBuffer aIntVariableName) { - if (CHECKS) { - checkNT1(aIntVariableName); - } - return ntinyfd_getGlobalInt(memAddress(aIntVariableName)); - } - - /** - * @param aIntVariableName one of:
    {@link #tinyfd_verbose verbose}{@link #tinyfd_silent silent}{@link #tinyfd_allowCursesDialogs allowCursesDialogs}{@link #tinyfd_forceConsole forceConsole}{@link #tinyfd_assumeGraphicDisplay assumeGraphicDisplay}{@link #tinyfd_winUtf8 winUtf8}
    - * - * @return -1 on error - */ - public static int tinyfd_getGlobalInt(@NativeType("char const *") CharSequence aIntVariableName) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(aIntVariableName, true); - long aIntVariableNameEncoded = stack.getPointerAddress(); - return ntinyfd_getGlobalInt(aIntVariableNameEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_setGlobalInt ] --- - - /** Unsafe version of: {@link #tinyfd_setGlobalInt setGlobalInt} */ - public static native int ntinyfd_setGlobalInt(long aIntVariableName, int aValue); - - /** - * @param aIntVariableName one of:
    {@link #tinyfd_verbose verbose}{@link #tinyfd_silent silent}{@link #tinyfd_allowCursesDialogs allowCursesDialogs}{@link #tinyfd_forceConsole forceConsole}{@link #tinyfd_assumeGraphicDisplay assumeGraphicDisplay}{@link #tinyfd_winUtf8 winUtf8}
    - * - * @return -1 on error - */ - public static int tinyfd_setGlobalInt(@NativeType("char const *") ByteBuffer aIntVariableName, int aValue) { - if (CHECKS) { - checkNT1(aIntVariableName); - } - return ntinyfd_setGlobalInt(memAddress(aIntVariableName), aValue); - } - - /** - * @param aIntVariableName one of:
    {@link #tinyfd_verbose verbose}{@link #tinyfd_silent silent}{@link #tinyfd_allowCursesDialogs allowCursesDialogs}{@link #tinyfd_forceConsole forceConsole}{@link #tinyfd_assumeGraphicDisplay assumeGraphicDisplay}{@link #tinyfd_winUtf8 winUtf8}
    - * - * @return -1 on error - */ - public static int tinyfd_setGlobalInt(@NativeType("char const *") CharSequence aIntVariableName, int aValue) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nASCII(aIntVariableName, true); - long aIntVariableNameEncoded = stack.getPointerAddress(); - return ntinyfd_setGlobalInt(aIntVariableNameEncoded, aValue); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_beep ] --- - - public static native void tinyfd_beep(); - - // --- [ tinyfd_notifyPopup ] --- - - /** Unsafe version of: {@link #tinyfd_notifyPopup notifyPopup} */ - public static native int ntinyfd_notifyPopup(long aTitle, long aMessage, long aIconType); - - /** - * Displays a notification popup. - * - * @param aTitle the dialog title or {@code NULL} - * @param aMessage the message or {@code NULL}. It may contain \n and \t characters. - * @param aIconType the icon type. One of:
    "info""warning""error"
    - */ - public static int tinyfd_notifyPopup(@Nullable @NativeType("char const *") ByteBuffer aTitle, @Nullable @NativeType("char const *") ByteBuffer aMessage, @NativeType("char const *") ByteBuffer aIconType) { - if (CHECKS) { - checkNT1Safe(aTitle); - checkNT1Safe(aMessage); - checkNT1(aIconType); - } - return ntinyfd_notifyPopup(memAddressSafe(aTitle), memAddressSafe(aMessage), memAddress(aIconType)); - } - - /** - * Displays a notification popup. - * - * @param aTitle the dialog title or {@code NULL} - * @param aMessage the message or {@code NULL}. It may contain \n and \t characters. - * @param aIconType the icon type. One of:
    "info""warning""error"
    - */ - public static int tinyfd_notifyPopup(@Nullable @NativeType("char const *") CharSequence aTitle, @Nullable @NativeType("char const *") CharSequence aMessage, @NativeType("char const *") CharSequence aIconType) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(aTitle, true); - long aTitleEncoded = aTitle == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aMessage, true); - long aMessageEncoded = aMessage == null ? NULL : stack.getPointerAddress(); - stack.nASCII(aIconType, true); - long aIconTypeEncoded = stack.getPointerAddress(); - return ntinyfd_notifyPopup(aTitleEncoded, aMessageEncoded, aIconTypeEncoded); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_messageBox ] --- - - /** Unsafe version of: {@link #tinyfd_messageBox messageBox} */ - public static native int ntinyfd_messageBox(long aTitle, long aMessage, long aDialogType, long aIconType, int aDefaultButton); - - /** - * Displays a message dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aMessage the message or {@code NULL}. It may contain \n and \t characters. - * @param aDialogType the dialog type. One of:
    "ok""okcancel""yesno""yesnocancel"
    - * @param aIconType the icon type. One of:
    "info""warning""error""question"
    - * @param aDefaultButton 0 for cancel/no, 1 for ok/yes - * - * @return 0 for cancel/no, 1 for ok/yes, 2 for no in yesnocancel - */ - @NativeType("int") - public static boolean tinyfd_messageBox(@Nullable @NativeType("char const *") ByteBuffer aTitle, @Nullable @NativeType("char const *") ByteBuffer aMessage, @NativeType("char const *") ByteBuffer aDialogType, @NativeType("char const *") ByteBuffer aIconType, @NativeType("int") boolean aDefaultButton) { - if (CHECKS) { - checkNT1Safe(aTitle); - checkNT1Safe(aMessage); - checkNT1(aDialogType); - checkNT1(aIconType); - } - return ntinyfd_messageBox(memAddressSafe(aTitle), memAddressSafe(aMessage), memAddress(aDialogType), memAddress(aIconType), aDefaultButton ? 1 : 0) != 0; - } - - /** - * Displays a message dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aMessage the message or {@code NULL}. It may contain \n and \t characters. - * @param aDialogType the dialog type. One of:
    "ok""okcancel""yesno""yesnocancel"
    - * @param aIconType the icon type. One of:
    "info""warning""error""question"
    - * @param aDefaultButton 0 for cancel/no, 1 for ok/yes - * - * @return 0 for cancel/no, 1 for ok/yes, 2 for no in yesnocancel - */ - @NativeType("int") - public static boolean tinyfd_messageBox(@Nullable @NativeType("char const *") CharSequence aTitle, @Nullable @NativeType("char const *") CharSequence aMessage, @NativeType("char const *") CharSequence aDialogType, @NativeType("char const *") CharSequence aIconType, @NativeType("int") boolean aDefaultButton) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(aTitle, true); - long aTitleEncoded = aTitle == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aMessage, true); - long aMessageEncoded = aMessage == null ? NULL : stack.getPointerAddress(); - stack.nASCII(aDialogType, true); - long aDialogTypeEncoded = stack.getPointerAddress(); - stack.nASCII(aIconType, true); - long aIconTypeEncoded = stack.getPointerAddress(); - return ntinyfd_messageBox(aTitleEncoded, aMessageEncoded, aDialogTypeEncoded, aIconTypeEncoded, aDefaultButton ? 1 : 0) != 0; - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_inputBox ] --- - - /** Unsafe version of: {@link #tinyfd_inputBox inputBox} */ - public static native long ntinyfd_inputBox(long aTitle, long aMessage, long aDefaultInput); - - /** - * Displays an input dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aMessage the message or {@code NULL}. May NOT contain \n and \t characters on Windows. - * @param aDefaultInput if {@code NULL} it's a password box - * - * @return the input value or {@code NULL} on cancel - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_inputBox(@Nullable @NativeType("char const *") ByteBuffer aTitle, @Nullable @NativeType("char const *") ByteBuffer aMessage, @Nullable @NativeType("char const *") ByteBuffer aDefaultInput) { - if (CHECKS) { - checkNT1Safe(aTitle); - checkNT1Safe(aMessage); - checkNT1Safe(aDefaultInput); - } - long __result = ntinyfd_inputBox(memAddressSafe(aTitle), memAddressSafe(aMessage), memAddressSafe(aDefaultInput)); - return memUTF8Safe(__result); - } - - /** - * Displays an input dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aMessage the message or {@code NULL}. May NOT contain \n and \t characters on Windows. - * @param aDefaultInput if {@code NULL} it's a password box - * - * @return the input value or {@code NULL} on cancel - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_inputBox(@Nullable @NativeType("char const *") CharSequence aTitle, @Nullable @NativeType("char const *") CharSequence aMessage, @Nullable @NativeType("char const *") CharSequence aDefaultInput) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(aTitle, true); - long aTitleEncoded = aTitle == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aMessage, true); - long aMessageEncoded = aMessage == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aDefaultInput, true); - long aDefaultInputEncoded = aDefaultInput == null ? NULL : stack.getPointerAddress(); - long __result = ntinyfd_inputBox(aTitleEncoded, aMessageEncoded, aDefaultInputEncoded); - return memUTF8Safe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_saveFileDialog ] --- - - /** - * Unsafe version of: {@link #tinyfd_saveFileDialog saveFileDialog} - * - * @param aNumOfFilterPatterns the number of patterns in {@code aFilterPatterns} - */ - public static native long ntinyfd_saveFileDialog(long aTitle, long aDefaultPathAndFile, int aNumOfFilterPatterns, long aFilterPatterns, long aSingleFilterDescription); - - /** - * Displays a file save dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultPathAndFile the default path and/or file or {@code NULL} - * @param aFilterPatterns an array of file type patterns ({@code NULL} or {"*.jpg","*.png"} - * @param aSingleFilterDescription {@code NULL} or "image files" - * - * @return the selected file path or {@code NULL} on cancel - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_saveFileDialog(@Nullable @NativeType("char const *") ByteBuffer aTitle, @Nullable @NativeType("char const *") ByteBuffer aDefaultPathAndFile, @Nullable @NativeType("char const * const *") PointerBuffer aFilterPatterns, @Nullable @NativeType("char const *") ByteBuffer aSingleFilterDescription) { - if (CHECKS) { - checkNT1Safe(aTitle); - checkNT1Safe(aDefaultPathAndFile); - checkNT1Safe(aSingleFilterDescription); - } - long __result = ntinyfd_saveFileDialog(memAddressSafe(aTitle), memAddressSafe(aDefaultPathAndFile), remainingSafe(aFilterPatterns), memAddressSafe(aFilterPatterns), memAddressSafe(aSingleFilterDescription)); - return memUTF8Safe(__result); - } - - /** - * Displays a file save dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultPathAndFile the default path and/or file or {@code NULL} - * @param aFilterPatterns an array of file type patterns ({@code NULL} or {"*.jpg","*.png"} - * @param aSingleFilterDescription {@code NULL} or "image files" - * - * @return the selected file path or {@code NULL} on cancel - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_saveFileDialog(@Nullable @NativeType("char const *") CharSequence aTitle, @Nullable @NativeType("char const *") CharSequence aDefaultPathAndFile, @Nullable @NativeType("char const * const *") PointerBuffer aFilterPatterns, @Nullable @NativeType("char const *") CharSequence aSingleFilterDescription) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(aTitle, true); - long aTitleEncoded = aTitle == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aDefaultPathAndFile, true); - long aDefaultPathAndFileEncoded = aDefaultPathAndFile == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aSingleFilterDescription, true); - long aSingleFilterDescriptionEncoded = aSingleFilterDescription == null ? NULL : stack.getPointerAddress(); - long __result = ntinyfd_saveFileDialog(aTitleEncoded, aDefaultPathAndFileEncoded, remainingSafe(aFilterPatterns), memAddressSafe(aFilterPatterns), aSingleFilterDescriptionEncoded); - return memUTF8Safe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_openFileDialog ] --- - - /** - * Unsafe version of: {@link #tinyfd_openFileDialog openFileDialog} - * - * @param aNumOfFilterPatterns the number of patterns in {@code aFilterPatterns} - */ - public static native long ntinyfd_openFileDialog(long aTitle, long aDefaultPathAndFile, int aNumOfFilterPatterns, long aFilterPatterns, long aSingleFilterDescription, int aAllowMultipleSelects); - - /** - * Displays a file open dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultPathAndFile the default path and/or file or {@code NULL} - * @param aFilterPatterns an array of file type patterns ({@code NULL} or {"*.jpg","*.png"} - * @param aSingleFilterDescription {@code NULL} or "image files" - * @param aAllowMultipleSelects if true, multiple selections are allowed - * - * @return the file(s) selected or {@code NULL} on cancel. In case of multiple files, the separator is '|'. - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_openFileDialog(@Nullable @NativeType("char const *") ByteBuffer aTitle, @Nullable @NativeType("char const *") ByteBuffer aDefaultPathAndFile, @Nullable @NativeType("char const * const *") PointerBuffer aFilterPatterns, @Nullable @NativeType("char const *") ByteBuffer aSingleFilterDescription, @NativeType("int") boolean aAllowMultipleSelects) { - if (CHECKS) { - checkNT1Safe(aTitle); - checkNT1Safe(aDefaultPathAndFile); - checkNT1Safe(aSingleFilterDescription); - } - long __result = ntinyfd_openFileDialog(memAddressSafe(aTitle), memAddressSafe(aDefaultPathAndFile), remainingSafe(aFilterPatterns), memAddressSafe(aFilterPatterns), memAddressSafe(aSingleFilterDescription), aAllowMultipleSelects ? 1 : 0); - return memUTF8Safe(__result); - } - - /** - * Displays a file open dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultPathAndFile the default path and/or file or {@code NULL} - * @param aFilterPatterns an array of file type patterns ({@code NULL} or {"*.jpg","*.png"} - * @param aSingleFilterDescription {@code NULL} or "image files" - * @param aAllowMultipleSelects if true, multiple selections are allowed - * - * @return the file(s) selected or {@code NULL} on cancel. In case of multiple files, the separator is '|'. - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_openFileDialog(@Nullable @NativeType("char const *") CharSequence aTitle, @Nullable @NativeType("char const *") CharSequence aDefaultPathAndFile, @Nullable @NativeType("char const * const *") PointerBuffer aFilterPatterns, @Nullable @NativeType("char const *") CharSequence aSingleFilterDescription, @NativeType("int") boolean aAllowMultipleSelects) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(aTitle, true); - long aTitleEncoded = aTitle == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aDefaultPathAndFile, true); - long aDefaultPathAndFileEncoded = aDefaultPathAndFile == null ? NULL : stack.getPointerAddress(); - stack.nUTF8Safe(aSingleFilterDescription, true); - long aSingleFilterDescriptionEncoded = aSingleFilterDescription == null ? NULL : stack.getPointerAddress(); - long __result = ntinyfd_openFileDialog(aTitleEncoded, aDefaultPathAndFileEncoded, remainingSafe(aFilterPatterns), memAddressSafe(aFilterPatterns), aSingleFilterDescriptionEncoded, aAllowMultipleSelects ? 1 : 0); - return memUTF8Safe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_selectFolderDialog ] --- - - /** Unsafe version of: {@link #tinyfd_selectFolderDialog selectFolderDialog} */ - public static native long ntinyfd_selectFolderDialog(long aTitle, long aDefaultPath); - - /** - * Displays a folder selection dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultPath the default path or {@code NULL} - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_selectFolderDialog(@Nullable @NativeType("char const *") ByteBuffer aTitle, @NativeType("char const *") ByteBuffer aDefaultPath) { - if (CHECKS) { - checkNT1Safe(aTitle); - checkNT1(aDefaultPath); - } - long __result = ntinyfd_selectFolderDialog(memAddressSafe(aTitle), memAddress(aDefaultPath)); - return memUTF8Safe(__result); - } - - /** - * Displays a folder selection dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultPath the default path or {@code NULL} - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_selectFolderDialog(@Nullable @NativeType("char const *") CharSequence aTitle, @NativeType("char const *") CharSequence aDefaultPath) { - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(aTitle, true); - long aTitleEncoded = aTitle == null ? NULL : stack.getPointerAddress(); - stack.nUTF8(aDefaultPath, true); - long aDefaultPathEncoded = stack.getPointerAddress(); - long __result = ntinyfd_selectFolderDialog(aTitleEncoded, aDefaultPathEncoded); - return memUTF8Safe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - - // --- [ tinyfd_colorChooser ] --- - - /** Unsafe version of: {@link #tinyfd_colorChooser colorChooser} */ - public static native long ntinyfd_colorChooser(long aTitle, long aDefaultHexRGB, long aDefaultRGB, long aoResultRGB); - - /** - * Displays a color chooser dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultHexRGB {@code NULL} or "#FF0000" - * @param aDefaultRGB { 0 , 255 , 255 }. Used only if {@code aDefaultHexRGB} is {@code NULL}. - * @param aoResultRGB returns the selected color. {@code aDefaultRGB} and {@code aoResultRGB} can be the same array. - * - * @return the selected hexcolor as a string "#FF0000" or {@code NULL} on cancel - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_colorChooser(@Nullable @NativeType("char const *") ByteBuffer aTitle, @Nullable @NativeType("char const *") ByteBuffer aDefaultHexRGB, @Nullable @NativeType("unsigned char *") ByteBuffer aDefaultRGB, @NativeType("unsigned char *") ByteBuffer aoResultRGB) { - if (CHECKS) { - checkNT1Safe(aTitle); - checkNT1Safe(aDefaultHexRGB); - checkSafe(aDefaultRGB, 3); - check(aoResultRGB, 3); - } - long __result = ntinyfd_colorChooser(memAddressSafe(aTitle), memAddressSafe(aDefaultHexRGB), memAddressSafe(aDefaultRGB), memAddress(aoResultRGB)); - return memUTF8Safe(__result); - } - - /** - * Displays a color chooser dialog. - * - * @param aTitle the dialog title or {@code NULL} - * @param aDefaultHexRGB {@code NULL} or "#FF0000" - * @param aDefaultRGB { 0 , 255 , 255 }. Used only if {@code aDefaultHexRGB} is {@code NULL}. - * @param aoResultRGB returns the selected color. {@code aDefaultRGB} and {@code aoResultRGB} can be the same array. - * - * @return the selected hexcolor as a string "#FF0000" or {@code NULL} on cancel - */ - @Nullable - @NativeType("char const *") - public static String tinyfd_colorChooser(@Nullable @NativeType("char const *") CharSequence aTitle, @Nullable @NativeType("char const *") CharSequence aDefaultHexRGB, @Nullable @NativeType("unsigned char *") ByteBuffer aDefaultRGB, @NativeType("unsigned char *") ByteBuffer aoResultRGB) { - if (CHECKS) { - checkSafe(aDefaultRGB, 3); - check(aoResultRGB, 3); - } - MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); - try { - stack.nUTF8Safe(aTitle, true); - long aTitleEncoded = aTitle == null ? NULL : stack.getPointerAddress(); - stack.nASCIISafe(aDefaultHexRGB, true); - long aDefaultHexRGBEncoded = aDefaultHexRGB == null ? NULL : stack.getPointerAddress(); - long __result = ntinyfd_colorChooser(aTitleEncoded, aDefaultHexRGBEncoded, memAddressSafe(aDefaultRGB), memAddress(aoResultRGB)); - return memUTF8Safe(__result); - } finally { - stack.setPointer(stackPointer); - } - } - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix.java deleted file mode 100644 index 4346d562..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Base class for matrices. When a matrix is constructed it will be the identity - * matrix unless otherwise stated. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ -public abstract class Matrix implements Serializable { - - /** - * Constructor for Matrix. - */ - protected Matrix() { - super(); - } - - /** - * 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. - * - * @param buf A float buffer to read from - * @return this - */ - public abstract Matrix load(FloatBuffer buf); - - - /** - * 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 - */ - public abstract Matrix loadTranspose(FloatBuffer buf); - - - /** - * 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. - * @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. - * @param buf The buffer to store this matrix in - * @return this - */ - public abstract Matrix storeTranspose(FloatBuffer buf); - - - /** - * Transpose this matrix - * @return this - */ - public abstract Matrix transpose(); - - - /** - * Set this matrix to 0. - * @return this - */ - public abstract Matrix setZero(); - - - /** - * @return the determinant of the matrix - */ - public abstract float determinant(); - - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix2f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix2f.java deleted file mode 100644 index 2f9e2ffd..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix2f.java +++ /dev/null @@ -1,400 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 2x2 matrix - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ - -public class Matrix2f extends Matrix implements Serializable { - - private static final long serialVersionUID = 1L; - - public float m00, m01, m10, m11; - - /** - * Constructor for Matrix2f. The matrix is initialised to the identity. - */ - public Matrix2f() { - setIdentity(); - } - - /** - * Constructor - */ - public Matrix2f(Matrix2f src) { - load(src); - } - - /** - * Load from another matrix - * @param src The source matrix - * @return this - */ - public Matrix2f load(Matrix2f src) { - return load(src, this); - } - - /** - * Copy the source matrix to the destination matrix. - * @param src The source matrix - * @param dest The destination matrix, or null if a new one should be created. - * @return The copied matrix - */ - public static Matrix2f load(Matrix2f src, Matrix2f dest) { - if (dest == null) - dest = new Matrix2f(); - - dest.m00 = src.m00; - dest.m01 = src.m01; - dest.m10 = src.m10; - dest.m11 = src.m11; - - return dest; - } - - /** - * 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 - */ - public Matrix load(FloatBuffer buf) { - - m00 = buf.get(); - m01 = buf.get(); - m10 = buf.get(); - m11 = buf.get(); - - return this; - } - - /** - * 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 - */ - public Matrix loadTranspose(FloatBuffer buf) { - - m00 = buf.get(); - m10 = buf.get(); - m01 = buf.get(); - m11 = buf.get(); - - return this; - } - - /** - * 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) { - buf.put(m00); - buf.put(m01); - buf.put(m10); - buf.put(m11); - return this; - } - - /** - * 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) { - buf.put(m00); - buf.put(m10); - buf.put(m01); - buf.put(m11); - return this; - } - - - - /** - * Add two matrices together and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix2f add(Matrix2f left, Matrix2f right, Matrix2f dest) { - if (dest == null) - dest = new Matrix2f(); - - dest.m00 = left.m00 + right.m00; - dest.m01 = left.m01 + right.m01; - dest.m10 = left.m10 + right.m10; - dest.m11 = left.m11 + right.m11; - - return dest; - } - - /** - * Subtract the right matrix from the left and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix2f sub(Matrix2f left, Matrix2f right, Matrix2f dest) { - if (dest == null) - dest = new Matrix2f(); - - dest.m00 = left.m00 - right.m00; - dest.m01 = left.m01 - right.m01; - dest.m10 = left.m10 - right.m10; - dest.m11 = left.m11 - right.m11; - - return dest; - } - - /** - * Multiply the right matrix by the left and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix2f mul(Matrix2f left, Matrix2f right, Matrix2f dest) { - if (dest == null) - dest = new Matrix2f(); - - float m00 = left.m00 * right.m00 + left.m10 * right.m01; - float m01 = left.m01 * right.m00 + left.m11 * right.m01; - float m10 = left.m00 * right.m10 + left.m10 * right.m11; - float m11 = left.m01 * right.m10 + left.m11 * right.m11; - - dest.m00 = m00; - dest.m01 = m01; - dest.m10 = m10; - dest.m11 = m11; - - return dest; - } - - /** - * 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 - * @return the destination vector - */ - public static Vector2f transform(Matrix2f left, Vector2f right, Vector2f dest) { - if (dest == null) - dest = new Vector2f(); - - float x = left.m00 * right.x + left.m10 * right.y; - float y = left.m01 * right.x + left.m11 * right.y; - - dest.x = x; - dest.y = y; - - return dest; - } - - /** - * Transpose this matrix - * @return this - */ - public Matrix transpose() { - return transpose(this); - } - - /** - * 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 - */ - public Matrix2f transpose(Matrix2f dest) { - return transpose(this, dest); - } - - /** - * 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 dest The destination matrix or null if a new matrix is to be created - * @return the transposed matrix - */ - public static Matrix2f transpose(Matrix2f src, Matrix2f dest) { - if (dest == null) - dest = new Matrix2f(); - - float m01 = src.m10; - float m10 = src.m01; - - dest.m01 = m01; - dest.m10 = m10; - - return dest; - } - - /** - * Invert this matrix - * @return this if successful, null otherwise - */ - public Matrix invert() { - return invert(this, this); - } - - /** - * Invert the source matrix and place the result in the destination matrix. - * @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); - */ - - float determinant = src.determinant(); - if (determinant != 0) { - if (dest == null) - dest = new Matrix2f(); - float determinant_inv = 1f/determinant; - float t00 = src.m11*determinant_inv; - float t01 = -src.m01*determinant_inv; - float t11 = src.m00*determinant_inv; - float t10 = -src.m10*determinant_inv; - - dest.m00 = t00; - dest.m01 = t01; - dest.m10 = t10; - dest.m11 = t11; - return dest; - } else - return null; - } - - /** - * Returns a string representation of this matrix - */ - public String toString() { - StringBuilder buf = new StringBuilder(); - buf.append(m00).append(' ').append(m10).append(' ').append('\n'); - buf.append(m01).append(' ').append(m11).append(' ').append('\n'); - return buf.toString(); - } - - /** - * Negate this matrix - * @return this - */ - public Matrix negate() { - return negate(this); - } - - /** - * 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 - */ - public Matrix2f negate(Matrix2f dest) { - return negate(this, dest); - } - - /** - * Negate the source matrix and stash the result in the destination matrix. - * @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 - */ - public static Matrix2f negate(Matrix2f src, Matrix2f dest) { - if (dest == null) - dest = new Matrix2f(); - - dest.m00 = -src.m00; - dest.m01 = -src.m01; - dest.m10 = -src.m10; - dest.m11 = -src.m11; - - return dest; - } - - /** - * Set this matrix to be the identity matrix. - * @return this - */ - public Matrix setIdentity() { - return setIdentity(this); - } - - /** - * Set the source matrix to be the identity matrix. - * @param src The matrix to set to the identity. - * @return The source matrix - */ - public static Matrix2f setIdentity(Matrix2f src) { - src.m00 = 1.0f; - src.m01 = 0.0f; - src.m10 = 0.0f; - src.m11 = 1.0f; - return src; - } - - /** - * Set this matrix to 0. - * @return this - */ - public Matrix setZero() { - return setZero(this); - } - - public static Matrix2f setZero(Matrix2f src) { - src.m00 = 0.0f; - src.m01 = 0.0f; - src.m10 = 0.0f; - src.m11 = 0.0f; - return src; - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Matrix#determinant() - */ - public float determinant() { - return m00 * m11 - m01*m10; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix3f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix3f.java deleted file mode 100644 index 63c20de6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix3f.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 3x3 matrix. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ - -public class Matrix3f extends Matrix implements Serializable { - - private static final long serialVersionUID = 1L; - - public float m00, - m01, - m02, - m10, - m11, - m12, - m20, - m21, - m22; - - /** - * Constructor for Matrix3f. Matrix is initialised to the identity. - */ - public Matrix3f() { - super(); - setIdentity(); - } - - /** - * Load from another matrix - * @param src The source matrix - * @return this - */ - public Matrix3f load(Matrix3f src) { - return load(src, this); - } - - /** - * Copy source matrix to destination 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 - */ - public static Matrix3f load(Matrix3f src, Matrix3f dest) { - if (dest == null) - dest = new Matrix3f(); - - dest.m00 = src.m00; - dest.m10 = src.m10; - dest.m20 = src.m20; - dest.m01 = src.m01; - dest.m11 = src.m11; - dest.m21 = src.m21; - dest.m02 = src.m02; - dest.m12 = src.m12; - dest.m22 = src.m22; - - return dest; - } - - /** - * 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 - */ - public Matrix load(FloatBuffer buf) { - - m00 = buf.get(); - m01 = buf.get(); - m02 = buf.get(); - m10 = buf.get(); - m11 = buf.get(); - m12 = buf.get(); - m20 = buf.get(); - m21 = buf.get(); - m22 = buf.get(); - - return this; - } - - /** - * 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 - */ - public Matrix loadTranspose(FloatBuffer buf) { - - m00 = buf.get(); - m10 = buf.get(); - m20 = buf.get(); - m01 = buf.get(); - m11 = buf.get(); - m21 = buf.get(); - m02 = buf.get(); - m12 = buf.get(); - m22 = buf.get(); - - return this; - } - - /** - * 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) { - buf.put(m00); - buf.put(m01); - buf.put(m02); - buf.put(m10); - buf.put(m11); - buf.put(m12); - buf.put(m20); - buf.put(m21); - buf.put(m22); - return this; - } - - /** - * 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) { - buf.put(m00); - buf.put(m10); - buf.put(m20); - buf.put(m01); - buf.put(m11); - buf.put(m21); - buf.put(m02); - buf.put(m12); - buf.put(m22); - return this; - } - - /** - * Add two matrices together and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix3f add(Matrix3f left, Matrix3f right, Matrix3f dest) { - if (dest == null) - dest = new Matrix3f(); - - dest.m00 = left.m00 + right.m00; - dest.m01 = left.m01 + right.m01; - dest.m02 = left.m02 + right.m02; - dest.m10 = left.m10 + right.m10; - dest.m11 = left.m11 + right.m11; - dest.m12 = left.m12 + right.m12; - dest.m20 = left.m20 + right.m20; - dest.m21 = left.m21 + right.m21; - dest.m22 = left.m22 + right.m22; - - return dest; - } - - /** - * Subtract the right matrix from the left and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix3f sub(Matrix3f left, Matrix3f right, Matrix3f dest) { - if (dest == null) - dest = new Matrix3f(); - - dest.m00 = left.m00 - right.m00; - dest.m01 = left.m01 - right.m01; - dest.m02 = left.m02 - right.m02; - dest.m10 = left.m10 - right.m10; - dest.m11 = left.m11 - right.m11; - dest.m12 = left.m12 - right.m12; - dest.m20 = left.m20 - right.m20; - dest.m21 = left.m21 - right.m21; - dest.m22 = left.m22 - right.m22; - - return dest; - } - - /** - * Multiply the right matrix by the left and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix3f mul(Matrix3f left, Matrix3f right, Matrix3f dest) { - if (dest == null) - dest = new Matrix3f(); - - float m00 = - left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02; - float m01 = - left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02; - float m02 = - left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02; - float m10 = - left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12; - float m11 = - left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12; - float m12 = - left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12; - float m20 = - left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22; - float m21 = - left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22; - float m22 = - left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - - return dest; - } - - /** - * 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 - * @return the destination vector - */ - public static Vector3f transform(Matrix3f left, Vector3f right, Vector3f dest) { - if (dest == null) - dest = new Vector3f(); - - float x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z; - float y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z; - float z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z; - - dest.x = x; - dest.y = y; - dest.z = z; - - return dest; - } - - /** - * Transpose this matrix - * @return this - */ - public Matrix transpose() { - return transpose(this, this); - } - - /** - * 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 - */ - public Matrix3f transpose(Matrix3f dest) { - return transpose(this, dest); - } - - /** - * Transpose the source matrix and place the result into the destination matrix - * @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 - */ - public static Matrix3f transpose(Matrix3f src, Matrix3f dest) { - if (dest == null) - dest = new Matrix3f(); - float m00 = src.m00; - float m01 = src.m10; - float m02 = src.m20; - float m10 = src.m01; - float m11 = src.m11; - float m12 = src.m21; - float m20 = src.m02; - float m21 = src.m12; - float m22 = src.m22; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - return dest; - } - - /** - * @return the determinant of the matrix - */ - public float determinant() { - float f = - m00 * (m11 * m22 - m12 * m21) - + m01 * (m12 * m20 - m10 * m22) - + m02 * (m10 * m21 - m11 * m20); - return f; - } - - /** - * Returns a string representation of this matrix - */ - 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'); - return buf.toString(); - } - - /** - * Invert this matrix - * @return this if successful, null otherwise - */ - public Matrix invert() { - return invert(this, this); - } - - /** - * Invert the source matrix and put the result into the destination matrix - * @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 - */ - public static Matrix3f invert(Matrix3f src, Matrix3f dest) { - float determinant = src.determinant(); - - 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 - */ - float determinant_inv = 1f/determinant; - - // get the conjugate matrix - float t00 = src.m11 * src.m22 - src.m12* src.m21; - float t01 = - src.m10 * src.m22 + src.m12 * src.m20; - float t02 = src.m10 * src.m21 - src.m11 * src.m20; - float t10 = - src.m01 * src.m22 + src.m02 * src.m21; - float t11 = src.m00 * src.m22 - src.m02 * src.m20; - float t12 = - src.m00 * src.m21 + src.m01 * src.m20; - float t20 = src.m01 * src.m12 - src.m02 * src.m11; - float t21 = -src.m00 * src.m12 + src.m02 * src.m10; - float t22 = src.m00 * src.m11 - src.m01 * src.m10; - - dest.m00 = t00*determinant_inv; - dest.m11 = t11*determinant_inv; - dest.m22 = t22*determinant_inv; - dest.m01 = t10*determinant_inv; - dest.m10 = t01*determinant_inv; - dest.m20 = t02*determinant_inv; - dest.m02 = t20*determinant_inv; - dest.m12 = t21*determinant_inv; - dest.m21 = t12*determinant_inv; - return dest; - } else - return null; - } - - - /** - * Negate this matrix - * @return this - */ - public Matrix negate() { - return negate(this); - } - - /** - * 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 - */ - public Matrix3f negate(Matrix3f dest) { - return negate(this, dest); - } - - /** - * Negate the source matrix and place the result in the destination 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 - */ - public static Matrix3f negate(Matrix3f src, Matrix3f dest) { - if (dest == null) - dest = new Matrix3f(); - - dest.m00 = -src.m00; - dest.m01 = -src.m02; - dest.m02 = -src.m01; - dest.m10 = -src.m10; - dest.m11 = -src.m12; - dest.m12 = -src.m11; - dest.m20 = -src.m20; - dest.m21 = -src.m22; - dest.m22 = -src.m21; - return dest; - } - - /** - * Set this matrix to be the identity matrix. - * @return this - */ - public Matrix setIdentity() { - return setIdentity(this); - } - - /** - * Set the matrix to be the identity matrix. - * @param m The matrix to be set to the identity - * @return m - */ - public static Matrix3f setIdentity(Matrix3f m) { - m.m00 = 1.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m10 = 0.0f; - m.m11 = 1.0f; - m.m12 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 1.0f; - return m; - } - - /** - * Set this matrix to 0. - * @return this - */ - public Matrix setZero() { - return setZero(this); - } - - /** - * Set the matrix matrix to 0. - * @param m The matrix to be set to 0 - * @return m - */ - public static Matrix3f setZero(Matrix3f m) { - m.m00 = 0.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m10 = 0.0f; - m.m11 = 0.0f; - m.m12 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 0.0f; - return m; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix4f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix4f.java deleted file mode 100644 index b24dca62..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Matrix4f.java +++ /dev/null @@ -1,849 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * Holds a 4x4 float matrix. - * - * @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; - - /** - * Construct a new matrix, initialized to the identity. - */ - public Matrix4f() { - super(); - setIdentity(); - } - - public Matrix4f(final Matrix4f src) { - super(); - load(src); - } - - /** - * Returns a string representation of this matrix - */ - 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'); - return buf.toString(); - } - - /** - * Set this matrix to be the identity matrix. - * @return this - */ - public Matrix setIdentity() { - return setIdentity(this); - } - - /** - * Set the given matrix to be the identity matrix. - * @param m The matrix to set to the identity - * @return m - */ - public static Matrix4f setIdentity(Matrix4f m) { - m.m00 = 1.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m03 = 0.0f; - m.m10 = 0.0f; - m.m11 = 1.0f; - m.m12 = 0.0f; - m.m13 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 1.0f; - m.m23 = 0.0f; - m.m30 = 0.0f; - m.m31 = 0.0f; - m.m32 = 0.0f; - m.m33 = 1.0f; - - return m; - } - - /** - * Set this matrix to 0. - * @return this - */ - public Matrix setZero() { - return setZero(this); - } - - /** - * Set the given matrix to 0. - * @param m The matrix to set to 0 - * @return m - */ - public static Matrix4f setZero(Matrix4f m) { - m.m00 = 0.0f; - m.m01 = 0.0f; - m.m02 = 0.0f; - m.m03 = 0.0f; - m.m10 = 0.0f; - m.m11 = 0.0f; - m.m12 = 0.0f; - m.m13 = 0.0f; - m.m20 = 0.0f; - m.m21 = 0.0f; - m.m22 = 0.0f; - m.m23 = 0.0f; - m.m30 = 0.0f; - m.m31 = 0.0f; - m.m32 = 0.0f; - m.m33 = 0.0f; - - return m; - } - - /** - * Load from another matrix4f - * @param src The source matrix - * @return this - */ - public Matrix4f load(Matrix4f src) { - return load(src, this); - } - - /** - * Copy the source matrix to the destination 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 - */ - public static Matrix4f load(Matrix4f src, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - dest.m00 = src.m00; - dest.m01 = src.m01; - dest.m02 = src.m02; - dest.m03 = src.m03; - dest.m10 = src.m10; - dest.m11 = src.m11; - dest.m12 = src.m12; - dest.m13 = src.m13; - dest.m20 = src.m20; - dest.m21 = src.m21; - dest.m22 = src.m22; - dest.m23 = src.m23; - dest.m30 = src.m30; - dest.m31 = src.m31; - dest.m32 = src.m32; - dest.m33 = src.m33; - - return dest; - } - - /** - * 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 - */ - public Matrix load(FloatBuffer buf) { - - m00 = buf.get(); - m01 = buf.get(); - m02 = buf.get(); - m03 = buf.get(); - m10 = buf.get(); - m11 = buf.get(); - m12 = buf.get(); - m13 = buf.get(); - m20 = buf.get(); - m21 = buf.get(); - m22 = buf.get(); - m23 = buf.get(); - m30 = buf.get(); - m31 = buf.get(); - m32 = buf.get(); - m33 = buf.get(); - - return this; - } - - /** - * 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 - */ - public Matrix loadTranspose(FloatBuffer buf) { - - m00 = buf.get(); - m10 = buf.get(); - m20 = buf.get(); - m30 = buf.get(); - m01 = buf.get(); - m11 = buf.get(); - m21 = buf.get(); - m31 = buf.get(); - m02 = buf.get(); - m12 = buf.get(); - m22 = buf.get(); - m32 = buf.get(); - m03 = buf.get(); - m13 = buf.get(); - m23 = buf.get(); - m33 = buf.get(); - - return this; - } - - /** - * 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) { - buf.put(m00); - buf.put(m01); - buf.put(m02); - buf.put(m03); - buf.put(m10); - buf.put(m11); - buf.put(m12); - buf.put(m13); - buf.put(m20); - buf.put(m21); - buf.put(m22); - buf.put(m23); - buf.put(m30); - buf.put(m31); - buf.put(m32); - buf.put(m33); - return this; - } - - /** - * 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) { - buf.put(m00); - buf.put(m10); - buf.put(m20); - buf.put(m30); - buf.put(m01); - buf.put(m11); - buf.put(m21); - buf.put(m31); - buf.put(m02); - buf.put(m12); - buf.put(m22); - buf.put(m32); - buf.put(m03); - buf.put(m13); - buf.put(m23); - buf.put(m33); - return this; - } - - /** - * 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) { - buf.put(m00); - buf.put(m01); - buf.put(m02); - buf.put(m10); - buf.put(m11); - buf.put(m12); - buf.put(m20); - buf.put(m21); - buf.put(m22); - return this; - } - - /** - * Add two matrices together and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - - dest.m00 = left.m00 + right.m00; - dest.m01 = left.m01 + right.m01; - dest.m02 = left.m02 + right.m02; - dest.m03 = left.m03 + right.m03; - dest.m10 = left.m10 + right.m10; - dest.m11 = left.m11 + right.m11; - dest.m12 = left.m12 + right.m12; - dest.m13 = left.m13 + right.m13; - dest.m20 = left.m20 + right.m20; - dest.m21 = left.m21 + right.m21; - dest.m22 = left.m22 + right.m22; - dest.m23 = left.m23 + right.m23; - dest.m30 = left.m30 + right.m30; - dest.m31 = left.m31 + right.m31; - dest.m32 = left.m32 + right.m32; - dest.m33 = left.m33 + right.m33; - - return dest; - } - - /** - * Subtract the right matrix from the left and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - - dest.m00 = left.m00 - right.m00; - dest.m01 = left.m01 - right.m01; - dest.m02 = left.m02 - right.m02; - dest.m03 = left.m03 - right.m03; - dest.m10 = left.m10 - right.m10; - dest.m11 = left.m11 - right.m11; - dest.m12 = left.m12 - right.m12; - dest.m13 = left.m13 - right.m13; - dest.m20 = left.m20 - right.m20; - dest.m21 = left.m21 - right.m21; - dest.m22 = left.m22 - right.m22; - dest.m23 = left.m23 - right.m23; - dest.m30 = left.m30 - right.m30; - dest.m31 = left.m31 - right.m31; - dest.m32 = left.m32 - right.m32; - dest.m33 = left.m33 - right.m33; - - return dest; - } - - /** - * Multiply the right matrix by the left and place the result in a third 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 - * @return the destination matrix - */ - public static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - - float m00 = left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02 + left.m30 * right.m03; - float m01 = left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02 + left.m31 * right.m03; - float m02 = left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02 + left.m32 * right.m03; - float m03 = left.m03 * right.m00 + left.m13 * right.m01 + left.m23 * right.m02 + left.m33 * right.m03; - float m10 = left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12 + left.m30 * right.m13; - float m11 = left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12 + left.m31 * right.m13; - float m12 = left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12 + left.m32 * right.m13; - float m13 = left.m03 * right.m10 + left.m13 * right.m11 + left.m23 * right.m12 + left.m33 * right.m13; - float m20 = left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22 + left.m30 * right.m23; - float m21 = left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22 + left.m31 * right.m23; - float m22 = left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22 + left.m32 * right.m23; - float m23 = left.m03 * right.m20 + left.m13 * right.m21 + left.m23 * right.m22 + left.m33 * right.m23; - float m30 = left.m00 * right.m30 + left.m10 * right.m31 + left.m20 * right.m32 + left.m30 * right.m33; - float m31 = left.m01 * right.m30 + left.m11 * right.m31 + left.m21 * right.m32 + left.m31 * right.m33; - float m32 = left.m02 * right.m30 + left.m12 * right.m31 + left.m22 * right.m32 + left.m32 * right.m33; - float m33 = left.m03 * right.m30 + left.m13 * right.m31 + left.m23 * right.m32 + left.m33 * right.m33; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m03 = m03; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m13 = m13; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - dest.m23 = m23; - dest.m30 = m30; - dest.m31 = m31; - dest.m32 = m32; - dest.m33 = m33; - - return dest; - } - - /** - * 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 - * @return the destination vector - */ - public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest) { - if (dest == null) - dest = new Vector4f(); - - float x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z + left.m30 * right.w; - float y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z + left.m31 * right.w; - float z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z + left.m32 * right.w; - float w = left.m03 * right.x + left.m13 * right.y + left.m23 * right.z + left.m33 * right.w; - - dest.x = x; - dest.y = y; - dest.z = z; - dest.w = w; - - return dest; - } - - /** - * Transpose this matrix - * @return this - */ - public Matrix transpose() { - return transpose(this); - } - - /** - * Translate this matrix - * @param vec The vector to translate by - * @return this - */ - public Matrix4f translate(Vector2f vec) { - return translate(vec, this); - } - - /** - * Translate this matrix - * @param vec The vector to translate by - * @return this - */ - public Matrix4f translate(Vector3f vec) { - return translate(vec, this); - } - - /** - * Scales this matrix - * @param vec The vector to scale by - * @return this - */ - public Matrix4f scale(Vector3f vec) { - return scale(vec, this, this); - } - - /** - * 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 dest The destination matrix, or null if a new matrix is to be created - * @return The scaled matrix - */ - public static Matrix4f scale(Vector3f vec, Matrix4f src, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - dest.m00 = src.m00 * vec.x; - dest.m01 = src.m01 * vec.x; - dest.m02 = src.m02 * vec.x; - dest.m03 = src.m03 * vec.x; - dest.m10 = src.m10 * vec.y; - dest.m11 = src.m11 * vec.y; - dest.m12 = src.m12 * vec.y; - dest.m13 = src.m13 * vec.y; - dest.m20 = src.m20 * vec.z; - dest.m21 = src.m21 * vec.z; - dest.m22 = src.m22 * vec.z; - dest.m23 = src.m23 * vec.z; - return dest; - } - - /** - * 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. - * @return this - */ - public Matrix4f rotate(float angle, Vector3f axis) { - return rotate(angle, axis, this); - } - - /** - * 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 - * @return The rotated matrix - */ - public Matrix4f rotate(float angle, Vector3f axis, Matrix4f dest) { - return rotate(angle, axis, this, dest); - } - - /** - * 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 - * @return The rotated matrix - */ - public static Matrix4f rotate(float angle, Vector3f axis, Matrix4f src, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - float c = (float) Math.cos(angle); - float s = (float) Math.sin(angle); - float oneminusc = 1.0f - c; - float xy = axis.x*axis.y; - float yz = axis.y*axis.z; - float xz = axis.x*axis.z; - float xs = axis.x*s; - float ys = axis.y*s; - float zs = axis.z*s; - - float f00 = axis.x*axis.x*oneminusc+c; - float f01 = xy*oneminusc+zs; - float f02 = xz*oneminusc-ys; - // n[3] not used - float f10 = xy*oneminusc-zs; - float f11 = axis.y*axis.y*oneminusc+c; - float f12 = yz*oneminusc+xs; - // n[7] not used - float f20 = xz*oneminusc+ys; - float f21 = yz*oneminusc-xs; - float f22 = axis.z*axis.z*oneminusc+c; - - float t00 = src.m00 * f00 + src.m10 * f01 + src.m20 * f02; - float t01 = src.m01 * f00 + src.m11 * f01 + src.m21 * f02; - float t02 = src.m02 * f00 + src.m12 * f01 + src.m22 * f02; - float t03 = src.m03 * f00 + src.m13 * f01 + src.m23 * f02; - float t10 = src.m00 * f10 + src.m10 * f11 + src.m20 * f12; - float t11 = src.m01 * f10 + src.m11 * f11 + src.m21 * f12; - float t12 = src.m02 * f10 + src.m12 * f11 + src.m22 * f12; - float t13 = src.m03 * f10 + src.m13 * f11 + src.m23 * f12; - dest.m20 = src.m00 * f20 + src.m10 * f21 + src.m20 * f22; - dest.m21 = src.m01 * f20 + src.m11 * f21 + src.m21 * f22; - dest.m22 = src.m02 * f20 + src.m12 * f21 + src.m22 * f22; - dest.m23 = src.m03 * f20 + src.m13 * f21 + src.m23 * f22; - dest.m00 = t00; - dest.m01 = t01; - dest.m02 = t02; - dest.m03 = t03; - dest.m10 = t10; - dest.m11 = t11; - dest.m12 = t12; - dest.m13 = t13; - return dest; - } - - /** - * Translate this matrix and stash the result in another matrix - * @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 - */ - public Matrix4f translate(Vector3f vec, Matrix4f dest) { - return translate(vec, this, dest); - } - - /** - * 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 dest The destination matrix or null if a new matrix is to be created - * @return The translated matrix - */ - public static Matrix4f translate(Vector3f vec, Matrix4f src, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - - dest.m30 += src.m00 * vec.x + src.m10 * vec.y + src.m20 * vec.z; - dest.m31 += src.m01 * vec.x + src.m11 * vec.y + src.m21 * vec.z; - dest.m32 += src.m02 * vec.x + src.m12 * vec.y + src.m22 * vec.z; - dest.m33 += src.m03 * vec.x + src.m13 * vec.y + src.m23 * vec.z; - - return dest; - } - - /** - * Translate this matrix and stash the result in another matrix - * @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 - */ - public Matrix4f translate(Vector2f vec, Matrix4f dest) { - return translate(vec, this, dest); - } - - /** - * 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 dest The destination matrix or null if a new matrix is to be created - * @return The translated matrix - */ - public static Matrix4f translate(Vector2f vec, Matrix4f src, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - - dest.m30 += src.m00 * vec.x + src.m10 * vec.y; - dest.m31 += src.m01 * vec.x + src.m11 * vec.y; - dest.m32 += src.m02 * vec.x + src.m12 * vec.y; - dest.m33 += src.m03 * vec.x + src.m13 * vec.y; - - return dest; - } - - /** - * 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 - */ - public Matrix4f transpose(Matrix4f dest) { - return transpose(this, dest); - } - - /** - * Transpose the source matrix and place the result in the destination 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 - */ - public static Matrix4f transpose(Matrix4f src, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - float m00 = src.m00; - float m01 = src.m10; - float m02 = src.m20; - float m03 = src.m30; - float m10 = src.m01; - float m11 = src.m11; - float m12 = src.m21; - float m13 = src.m31; - float m20 = src.m02; - float m21 = src.m12; - float m22 = src.m22; - float m23 = src.m32; - float m30 = src.m03; - float m31 = src.m13; - float m32 = src.m23; - float m33 = src.m33; - - dest.m00 = m00; - dest.m01 = m01; - dest.m02 = m02; - dest.m03 = m03; - dest.m10 = m10; - dest.m11 = m11; - dest.m12 = m12; - dest.m13 = m13; - dest.m20 = m20; - dest.m21 = m21; - dest.m22 = m22; - dest.m23 = m23; - dest.m30 = m30; - dest.m31 = m31; - dest.m32 = m32; - dest.m33 = m33; - - return dest; - } - - /** - * @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); - 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) - { - 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() { - return invert(this, this); - } - - /** - * Invert the source matrix and put the result in the destination - * @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 - */ - public static Matrix4f invert(Matrix4f src, Matrix4f dest) { - float determinant = src.determinant(); - - if (determinant != 0) { - /* - * 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 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); - // second row - 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 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 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); - // fourth row - 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 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 - dest.m00 = t00*determinant_inv; - dest.m11 = t11*determinant_inv; - dest.m22 = t22*determinant_inv; - dest.m33 = t33*determinant_inv; - dest.m01 = t10*determinant_inv; - dest.m10 = t01*determinant_inv; - dest.m20 = t02*determinant_inv; - dest.m02 = t20*determinant_inv; - dest.m12 = t21*determinant_inv; - dest.m21 = t12*determinant_inv; - dest.m03 = t30*determinant_inv; - dest.m30 = t03*determinant_inv; - dest.m13 = t31*determinant_inv; - dest.m31 = t13*determinant_inv; - dest.m32 = t23*determinant_inv; - dest.m23 = t32*determinant_inv; - return dest; - } else - return null; - } - - /** - * Negate this matrix - * @return this - */ - public Matrix negate() { - return negate(this); - } - - /** - * 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 - */ - public Matrix4f negate(Matrix4f dest) { - return negate(this, dest); - } - - /** - * Negate this matrix and place the result in a destination 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 - */ - public static Matrix4f negate(Matrix4f src, Matrix4f dest) { - if (dest == null) - dest = new Matrix4f(); - - dest.m00 = -src.m00; - dest.m01 = -src.m01; - dest.m02 = -src.m02; - dest.m03 = -src.m03; - dest.m10 = -src.m10; - dest.m11 = -src.m11; - dest.m12 = -src.m12; - dest.m13 = -src.m13; - dest.m20 = -src.m20; - dest.m21 = -src.m21; - dest.m22 = -src.m22; - dest.m23 = -src.m23; - dest.m30 = -src.m30; - dest.m31 = -src.m31; - dest.m32 = -src.m32; - dest.m33 = -src.m33; - - return dest; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Quaternion.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Quaternion.java deleted file mode 100644 index 99d21b27..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Quaternion.java +++ /dev/null @@ -1,530 +0,0 @@ -/* - * 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; - -/** - * - * Quaternions for LWJGL! - * - * @author fbi - * @version $Revision$ - * $Id$ - */ - -import java.nio.FloatBuffer; - -public class Quaternion extends Vector implements ReadableVector4f { - private static final long serialVersionUID = 1L; - - public float x, y, z, w; - - /** - * C'tor. The quaternion will be initialized to the identity. - */ - public Quaternion() { - super(); - setIdentity(); - } - - /** - * C'tor - * - * @param src - */ - public Quaternion(ReadableVector4f src) { - set(src); - } - - /** - * C'tor - * - */ - public Quaternion(float x, float y, float z, float w) { - set(x, y, z, w); - } - - /* - * (non-Javadoc) - * - * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /* - * (non-Javadoc) - * - * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) - */ - public void set(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - } - - /* - * (non-Javadoc) - * - * @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; - this.y = y; - this.z = z; - this.w = w; - } - - /** - * Load from another Vector4f - * - * @param src - * The source vector - * @return this - */ - public Quaternion set(ReadableVector4f src) { - x = src.getX(); - y = src.getY(); - z = src.getZ(); - w = src.getW(); - return this; - } - - /** - * Set this quaternion to the multiplication identity. - * @return this - */ - public Quaternion setIdentity() { - return setIdentity(this); - } - - /** - * Set the given quaternion to the multiplication identity. - * @param q The quaternion - * @return q - */ - public static Quaternion setIdentity(Quaternion q) { - q.x = 0; - q.y = 0; - q.z = 0; - q.w = 1; - return q; - } - - /** - * @return the length squared of the quaternion - */ - public float lengthSquared() { - return x * x + y * y + z * z + w * w; - } - - /** - * 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 - * @return The normalised quaternion - */ - public static Quaternion normalise(Quaternion src, Quaternion dest) { - float inv_l = 1f/src.length(); - - if (dest == null) - dest = new Quaternion(); - - dest.set(src.x * inv_l, src.y * inv_l, src.z * inv_l, src.w * inv_l); - - return dest; - } - - /** - * 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 - * @return the normalised quaternion - */ - public Quaternion normalise(Quaternion dest) { - return normalise(this, dest); - } - - /** - * The dot product of two quaternions - * - * @param left - * The LHS quat - * @param right - * The RHS quat - * @return left dot right - */ - public static float dot(Quaternion left, Quaternion right) { - return left.x * right.x + left.y * right.y + left.z * right.z + left.w - * right.w; - } - - /** - * 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 - */ - public Quaternion negate(Quaternion dest) { - return negate(this, dest); - } - - /** - * 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 - */ - public static Quaternion negate(Quaternion src, Quaternion dest) { - if (dest == null) - dest = new Quaternion(); - - dest.x = -src.x; - dest.y = -src.y; - dest.z = -src.z; - dest.w = src.w; - - return dest; - } - - /** - * Calculate the conjugate of this quaternion - */ - public Vector negate() { - return negate(this, this); - } - - /* (non-Javadoc) - * @see org.lwjgl.util.vector.Vector#load(java.nio.FloatBuffer) - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - z = buf.get(); - w = buf.get(); - return this; - } - - /* - * (non-Javadoc) - * - * @see org.lwjgl.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - return scale(scale, this, this); - } - - /** - * 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 - * @return The scaled quaternion - */ - public static Quaternion scale(float scale, Quaternion src, Quaternion dest) { - if (dest == null) - dest = new Quaternion(); - dest.x = src.x * scale; - dest.y = src.y * scale; - dest.z = src.z * scale; - dest.w = src.w * scale; - return dest; - } - - /* (non-Javadoc) - * @see org.lwjgl.util.vector.ReadableVector#store(java.nio.FloatBuffer) - */ - public Vector store(FloatBuffer buf) { - buf.put(x); - buf.put(y); - buf.put(z); - buf.put(w); - - return this; - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * - * @param y - */ - public final void setY(float y) { - this.y = y; - } - - /** - * Set Z - * - * @param z - */ - public void setZ(float z) { - this.z = z; - } - - /* - * (Overrides) - * - * @see org.lwjgl.vector.ReadableVector3f#getZ() - */ - public float getZ() { - return z; - } - - /** - * Set W - * - * @param w - */ - public void setW(float w) { - this.w = w; - } - - /* - * (Overrides) - * - * @see org.lwjgl.vector.ReadableVector3f#getW() - */ - public float getW() { - return w; - } - - public String toString() { - return "Quaternion: " + x + " " + y + " " + z + " " + w; - } - - /** - * 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 - */ - public static Quaternion mul(Quaternion left, Quaternion right, - Quaternion dest) { - if (dest == null) - dest = new Quaternion(); - dest.set(left.x * right.w + left.w * right.x + left.y * right.z - - left.z * right.y, left.y * right.w + left.w * right.y - + left.z * right.x - left.x * right.z, left.z * right.w - + left.w * right.z + left.x * right.y - left.y * right.x, - left.w * right.w - left.x * right.x - left.y * right.y - - left.z * right.z); - return dest; - } - - /** - * - * 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 - */ - public static Quaternion mulInverse(Quaternion left, Quaternion right, - Quaternion dest) { - float n = right.lengthSquared(); - // zero-div may occur. - n = (n == 0.0 ? n : 1 / n); - // store on stack once for aliasing-safty - if (dest == null) - dest = new Quaternion(); - dest - .set((left.x * right.w - left.w * right.x - left.y - * right.z + left.z * right.y) - * n, (left.y * right.w - left.w * right.y - left.z - * right.x + left.x * right.z) - * n, (left.z * right.w - left.w * right.z - left.x - * right.y + left.y * right.x) - * n, (left.w * right.w + left.x * right.x + left.y - * right.y + left.z * right.z) - * n); - - return dest; - } - - /** - * 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 - */ - public final void setFromAxisAngle(Vector4f a1) { - x = a1.x; - y = a1.y; - z = a1.z; - float n = (float) Math.sqrt(x * x + y * y + z * z); - // zero-div may occur. - float s = (float) (Math.sin(0.5 * a1.w) / n); - x *= s; - y *= s; - z *= s; - w = (float) Math.cos(0.5 * a1.w); - } - - /** - * Sets the value of this quaternion using the rotational component of the - * passed matrix. - * - * @param m - * The matrix - * @return this - */ - public final Quaternion setFromMatrix(Matrix4f m) { - return setFromMatrix(m, this); - } - - /** - * 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 - * @return q - */ - public static Quaternion setFromMatrix(Matrix4f m, Quaternion q) { - return q.setFromMat(m.m00, m.m01, m.m02, m.m10, m.m11, m.m12, m.m20, - m.m21, m.m22); - } - - /** - * Sets the value of this quaternion using the rotational component of the - * passed 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. - * - * @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) { - return q.setFromMat(m.m00, m.m01, m.m02, m.m10, m.m11, m.m12, m.m20, - m.m21, m.m22); - } - - /** - * 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) { - - float s; - float tr = m00 + m11 + m22; - if (tr >= 0.0) { - s = (float) Math.sqrt(tr + 1.0); - w = s * 0.5f; - s = 0.5f / s; - x = (m21 - m12) * s; - y = (m02 - m20) * s; - z = (m10 - m01) * s; - } else { - float max = Math.max(Math.max(m00, m11), m22); - if (max == m00) { - s = (float) Math.sqrt(m00 - (m11 + m22) + 1.0); - x = s * 0.5f; - s = 0.5f / s; - y = (m01 + m10) * s; - z = (m20 + m02) * s; - w = (m21 - m12) * s; - } else if (max == m11) { - s = (float) Math.sqrt(m11 - (m22 + m00) + 1.0); - y = s * 0.5f; - s = 0.5f / s; - z = (m12 + m21) * s; - x = (m01 + m10) * s; - w = (m02 - m20) * s; - } else { - s = (float) Math.sqrt(m22 - (m00 + m11) + 1.0); - z = s * 0.5f; - s = 0.5f / s; - x = (m20 + m02) * s; - y = (m12 + m21) * s; - w = (m10 - m01) * s; - } - } - return this; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector.java b/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector.java deleted file mode 100644 index 7690fe7d..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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; - -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 - */ - Vector store(FloatBuffer buf); -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector2f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector2f.java deleted file mode 100644 index 2342bce8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector2f.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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; - -/** - * @author foo - */ -public interface ReadableVector2f extends ReadableVector { - /** - * @return x - */ - float getX(); - /** - * @return y - */ - float getY(); -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector3f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector3f.java deleted file mode 100644 index 5f77f5ac..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector3f.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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; - -/** - * @author foo - */ -public interface ReadableVector3f extends ReadableVector2f { - /** - * @return z - */ - float getZ(); -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector4f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector4f.java deleted file mode 100644 index 5dee3e3b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/ReadableVector4f.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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; - -/** - * @author foo - */ -public interface ReadableVector4f extends ReadableVector3f { - - /** - * @return w - */ - float getW(); - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Vector.java deleted file mode 100644 index 465969c6..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Base class for vectors. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ -public abstract class Vector implements Serializable, ReadableVector { - - /** - * Constructor for Vector. - */ - protected Vector() { - super(); - } - - /** - * @return the length of the vector - */ - public final float length() { - return (float) Math.sqrt(lengthSquared()); - } - - - /** - * @return the length squared of the vector - */ - public abstract float lengthSquared(); - - /** - * Load this vector from a FloatBuffer - * @param buf The buffer to load it from, at the current position - * @return this - */ - public abstract Vector load(FloatBuffer buf); - - /** - * Negate a vector - * @return this - */ - public abstract Vector negate(); - - - /** - * Normalise this vector - * @return this - */ - public final Vector normalise() { - float len = length(); - if (len != 0.0f) { - float l = 1.0f / len; - return scale(l); - } else - throw new IllegalStateException("Zero length vector"); - } - - - /** - * Store this vector in a FloatBuffer - * @param buf The buffer to store it in, at the current position - * @return this - */ - public abstract Vector store(FloatBuffer buf); - - - /** - * Scale this vector - * @param scale The scale factor - * @return this - */ - public abstract Vector scale(float scale); - - - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector2f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Vector2f.java deleted file mode 100644 index ac5b0430..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector2f.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 2-tuple vector. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ - -public class Vector2f extends Vector implements Serializable, ReadableVector2f, WritableVector2f { - - private static final long serialVersionUID = 1L; - - public float x, y; - - /** - * Constructor for Vector3f. - */ - public Vector2f() { - super(); - } - - /** - * Constructor - */ - public Vector2f(ReadableVector2f src) { - set(src); - } - - /** - * Constructor - */ - public Vector2f(float x, float y) { - set(x, y); - } - - /* (non-Javadoc) - * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /** - * Load from another Vector2f - * @param src The source vector - * @return this - */ - public Vector2f set(ReadableVector2f src) { - x = src.getX(); - y = src.getY(); - return this; - } - - /** - * @return the length squared of the vector - */ - public float lengthSquared() { - return x * x + y * y; - } - - /** - * Translate a vector - * @param x The translation in x - * @param y the translation in y - * @return this - */ - public Vector2f translate(float x, float y) { - this.x += x; - this.y += y; - return this; - } - - /** - * Negate a vector - * @return this - */ - public Vector negate() { - x = -x; - y = -y; - return this; - } - - /** - * 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 - */ - public Vector2f negate(Vector2f dest) { - if (dest == null) - dest = new Vector2f(); - dest.x = -x; - dest.y = -y; - return dest; - } - - - /** - * 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 - */ - public Vector2f normalise(Vector2f dest) { - float l = length(); - - if (dest == null) - dest = new Vector2f(x / l, y / l); - else - dest.set(x / l, y / l); - - return dest; - } - - /** - * 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 - */ - public static float dot(Vector2f left, Vector2f right) { - return left.x * right.x + left.y * right.y; - } - - - - /** - * 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 - */ - public static float angle(Vector2f a, Vector2f b) { - float dls = dot(a, b) / (a.length() * b.length()); - if (dls < -1f) - dls = -1f; - else if (dls > 1.0f) - dls = 1.0f; - return (float)Math.acos(dls); - } - - /** - * 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 - * @return the sum of left and right in dest - */ - public static Vector2f add(Vector2f left, Vector2f right, Vector2f dest) { - if (dest == null) - return new Vector2f(left.x + right.x, left.y + right.y); - else { - dest.set(left.x + right.x, left.y + right.y); - return dest; - } - } - - /** - * 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 - * @return left minus right in dest - */ - public static Vector2f sub(Vector2f left, Vector2f right, Vector2f dest) { - if (dest == null) - return new Vector2f(left.x - right.x, left.y - right.y); - else { - dest.set(left.x - right.x, left.y - right.y); - return dest; - } - } - - /** - * Store this vector in a FloatBuffer - * @param buf The buffer to store it in, at the current position - * @return this - */ - public Vector store(FloatBuffer buf) { - buf.put(x); - buf.put(y); - return this; - } - - /** - * Load this vector from a FloatBuffer - * @param buf The buffer to load it from, at the current position - * @return this - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - return this; - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - - x *= scale; - y *= scale; - - return this; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() { - StringBuilder sb = new StringBuilder(64); - - sb.append("Vector2f["); - sb.append(x); - sb.append(", "); - sb.append(y); - sb.append(']'); - return sb.toString(); - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * @param y - */ - public final void setY(float y) { - this.y = y; - } - - public boolean equals(Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (getClass() != obj.getClass()) return false; - Vector2f other = (Vector2f)obj; - - if (x == other.x && y == other.y) return true; - - return false; - } - -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector3f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Vector3f.java deleted file mode 100644 index 39cd6be7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector3f.java +++ /dev/null @@ -1,358 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 3-tuple vector. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ - -public class Vector3f extends Vector implements Serializable, ReadableVector3f, WritableVector3f { - - private static final long serialVersionUID = 1L; - - public float x, y, z; - - /** - * Constructor for Vector3f. - */ - public Vector3f() { - super(); - } - - /** - * Constructor - */ - public Vector3f(ReadableVector3f src) { - set(src); - } - - /** - * Constructor - */ - public Vector3f(float x, float y, float z) { - set(x, y, z); - } - - /* (non-Javadoc) - * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /* (non-Javadoc) - * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) - */ - public void set(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - } - - /** - * Load from another Vector3f - * @param src The source vector - * @return this - */ - public Vector3f set(ReadableVector3f src) { - x = src.getX(); - y = src.getY(); - z = src.getZ(); - return this; - } - - /** - * @return the length squared of the vector - */ - public float lengthSquared() { - return x * x + y * y + z * z; - } - - /** - * Translate a vector - * @param x The translation in x - * @param y the translation in y - * @return this - */ - public Vector3f translate(float x, float y, float z) { - this.x += x; - this.y += y; - this.z += z; - return this; - } - - /** - * 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 - * @return the sum of left and right in dest - */ - public static Vector3f add(Vector3f left, Vector3f right, Vector3f dest) { - if (dest == null) - return new Vector3f(left.x + right.x, left.y + right.y, left.z + right.z); - else { - dest.set(left.x + right.x, left.y + right.y, left.z + right.z); - return dest; - } - } - - /** - * 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 - * @return left minus right in dest - */ - public static Vector3f sub(Vector3f left, Vector3f right, Vector3f dest) { - if (dest == null) - return new Vector3f(left.x - right.x, left.y - right.y, left.z - right.z); - else { - dest.set(left.x - right.x, left.y - right.y, left.z - right.z); - return dest; - } - } - - /** - * The cross product of two vectors. - * - * @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 - * @return left cross right - */ - public static Vector3f cross( - Vector3f left, - Vector3f right, - Vector3f dest) - { - - if (dest == null) - dest = new Vector3f(); - - dest.set( - left.y * right.z - left.z * right.y, - right.x * left.z - right.z * left.x, - left.x * right.y - left.y * right.x - ); - - return dest; - } - - - - /** - * Negate a vector - * @return this - */ - public Vector negate() { - x = -x; - y = -y; - z = -z; - return this; - } - - /** - * 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 - */ - public Vector3f negate(Vector3f dest) { - if (dest == null) - dest = new Vector3f(); - dest.x = -x; - dest.y = -y; - dest.z = -z; - return dest; - } - - - /** - * 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 - */ - public Vector3f normalise(Vector3f dest) { - float l = length(); - - if (dest == null) - dest = new Vector3f(x / l, y / l, z / l); - else - dest.set(x / l, y / l, z / l); - - return dest; - } - - /** - * 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 - */ - public static float dot(Vector3f left, Vector3f right) { - return left.x * right.x + left.y * right.y + left.z * right.z; - } - - /** - * 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 - */ - public static float angle(Vector3f a, Vector3f b) { - float dls = dot(a, b) / (a.length() * b.length()); - if (dls < -1f) - dls = -1f; - else if (dls > 1.0f) - dls = 1.0f; - return (float)Math.acos(dls); - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Vector#load(FloatBuffer) - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - z = buf.get(); - return this; - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - - x *= scale; - y *= scale; - z *= scale; - - return this; - - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Vector#store(FloatBuffer) - */ - public Vector store(FloatBuffer buf) { - - buf.put(x); - buf.put(y); - buf.put(z); - - return this; - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() { - StringBuilder sb = new StringBuilder(64); - - sb.append("Vector3f["); - sb.append(x); - sb.append(", "); - sb.append(y); - sb.append(", "); - sb.append(z); - sb.append(']'); - return sb.toString(); - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * @param y - */ - public final void setY(float y) { - this.y = y; - } - - /** - * Set Z - * @param z - */ - public void setZ(float z) { - this.z = z; - } - - /* (Overrides) - * @see org.lwjgl.vector.ReadableVector3f#getZ() - */ - public float getZ() { - return z; - } - - public boolean equals(Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (getClass() != obj.getClass()) return false; - Vector3f other = (Vector3f)obj; - - if (x == other.x && y == other.y && z == other.z) return true; - - return false; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector4f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/Vector4f.java deleted file mode 100644 index d3b533c7..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/Vector4f.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * 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; - -import java.io.Serializable; -import java.nio.FloatBuffer; - -/** - * - * Holds a 4-tuple vector. - * - * @author cix_foo - * @version $Revision$ - * $Id$ - */ - -public class Vector4f extends Vector implements Serializable, ReadableVector4f, WritableVector4f { - - private static final long serialVersionUID = 1L; - - public float x, y, z, w; - - /** - * Constructor for Vector4f. - */ - public Vector4f() { - super(); - } - - /** - * Constructor - */ - public Vector4f(ReadableVector4f src) { - set(src); - } - - /** - * Constructor - */ - public Vector4f(float x, float y, float z, float w) { - set(x, y, z, w); - } - - /* (non-Javadoc) - * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) - */ - public void set(float x, float y) { - this.x = x; - this.y = y; - } - - /* (non-Javadoc) - * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) - */ - public void set(float x, float y, float z) { - this.x = x; - this.y = y; - this.z = z; - } - - /* (non-Javadoc) - * @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; - this.y = y; - this.z = z; - this.w = w; - } - - /** - * Load from another Vector4f - * @param src The source vector - * @return this - */ - public Vector4f set(ReadableVector4f src) { - x = src.getX(); - y = src.getY(); - z = src.getZ(); - w = src.getW(); - return this; - } - - /** - * @return the length squared of the vector - */ - public float lengthSquared() { - return x * x + y * y + z * z + w * w; - } - - /** - * Translate a vector - * @param x The translation in x - * @param y the translation in y - * @return this - */ - public Vector4f translate(float x, float y, float z, float w) { - this.x += x; - this.y += y; - this.z += z; - this.w += w; - return this; - } - - /** - * 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 - * @return the sum of left and right in dest - */ - public static Vector4f add(Vector4f left, Vector4f right, Vector4f dest) { - if (dest == null) - return new Vector4f(left.x + right.x, left.y + right.y, left.z + right.z, left.w + right.w); - else { - dest.set(left.x + right.x, left.y + right.y, left.z + right.z, left.w + right.w); - return dest; - } - } - - /** - * 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 - * @return left minus right in dest - */ - public static Vector4f sub(Vector4f left, Vector4f right, Vector4f dest) { - if (dest == null) - return new Vector4f(left.x - right.x, left.y - right.y, left.z - right.z, left.w - right.w); - else { - dest.set(left.x - right.x, left.y - right.y, left.z - right.z, left.w - right.w); - return dest; - } - } - - - /** - * Negate a vector - * @return this - */ - public Vector negate() { - x = -x; - y = -y; - z = -z; - w = -w; - return this; - } - - /** - * 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 - */ - public Vector4f negate(Vector4f dest) { - if (dest == null) - dest = new Vector4f(); - dest.x = -x; - dest.y = -y; - dest.z = -z; - dest.w = -w; - return dest; - } - - - /** - * 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 - */ - public Vector4f normalise(Vector4f dest) { - float l = length(); - - if (dest == null) - dest = new Vector4f(x / l, y / l, z / l, w / l); - else - dest.set(x / l, y / l, z / l, w / l); - - return dest; - } - - /** - * 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 - */ - public static float dot(Vector4f left, Vector4f right) { - return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; - } - - /** - * 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 - */ - public static float angle(Vector4f a, Vector4f b) { - float dls = dot(a, b) / (a.length() * b.length()); - if (dls < -1f) - dls = -1f; - else if (dls > 1.0f) - dls = 1.0f; - return (float)Math.acos(dls); - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Vector#load(FloatBuffer) - */ - public Vector load(FloatBuffer buf) { - x = buf.get(); - y = buf.get(); - z = buf.get(); - w = buf.get(); - return this; - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Vector#scale(float) - */ - public Vector scale(float scale) { - x *= scale; - y *= scale; - z *= scale; - w *= scale; - return this; - } - - /* (non-Javadoc) - * @see org.lwjgl.vector.Vector#store(FloatBuffer) - */ - public Vector store(FloatBuffer buf) { - - buf.put(x); - buf.put(y); - buf.put(z); - buf.put(w); - - return this; - } - - public String toString() { - return "Vector4f: " + x + " " + y + " " + z + " " + w; - } - - /** - * @return x - */ - public final float getX() { - return x; - } - - /** - * @return y - */ - public final float getY() { - return y; - } - - /** - * Set X - * @param x - */ - public final void setX(float x) { - this.x = x; - } - - /** - * Set Y - * @param y - */ - public final void setY(float y) { - this.y = y; - } - - /** - * Set Z - * @param z - */ - public void setZ(float z) { - this.z = z; - } - - - /* (Overrides) - * @see org.lwjgl.vector.ReadableVector3f#getZ() - */ - public float getZ() { - return z; - } - - /** - * Set W - * @param w - */ - public void setW(float w) { - this.w = w; - } - - /* (Overrides) - * @see org.lwjgl.vector.ReadableVector3f#getZ() - */ - public float getW() { - return w; - } - - public boolean equals(Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (getClass() != obj.getClass()) return false; - Vector4f other = (Vector4f)obj; - - if (x == other.x && y == other.y && z == other.z && w == other.w) return true; - - return false; - } -} diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector2f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector2f.java deleted file mode 100644 index a664a43b..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector2f.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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$ - */ -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 - */ - void set(float x, float y); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector3f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector3f.java deleted file mode 100644 index f626f370..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector3f.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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$ - */ -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 - */ - void set(float x, float y, float z); - -} \ No newline at end of file diff --git a/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector4f.java b/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector4f.java deleted file mode 100644 index ac8d3af8..00000000 --- a/LWJGL/src/main/java/org/lwjgl/util/vector/WritableVector4f.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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$ - */ -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 - * @param w - */ - void set(float x, float y, float z, float w); - -} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 25f74774..d9d6e71d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -20,5 +20,5 @@ include ':FCL' include ':FCLCore' include ':FCLauncher' include ':FCLLibrary' -include ':LWJGL' +include ':LWJGL-Pojav' include ':ZipFileSystem'